diff --git a/nx-X11/extras/Mesa b/nx-X11/extras/Mesa index e5e99cbbe9..aee9420315 120000 --- a/nx-X11/extras/Mesa +++ b/nx-X11/extras/Mesa @@ -1 +1 @@ -Mesa_6.4.2 \ No newline at end of file +Mesa_7.7 \ No newline at end of file diff --git a/nx-X11/extras/Mesa.patches b/nx-X11/extras/Mesa.patches index e62962bff3..78e411f129 120000 --- a/nx-X11/extras/Mesa.patches +++ b/nx-X11/extras/Mesa.patches @@ -1 +1 @@ -Mesa.patches_6.4.2 \ No newline at end of file +Mesa.patches_7.7 \ No newline at end of file diff --git a/nx-X11/extras/Mesa.patches_6.4.2/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch b/nx-X11/extras/Mesa.patches_7.0.4/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch similarity index 100% rename from nx-X11/extras/Mesa.patches_6.4.2/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch rename to nx-X11/extras/Mesa.patches_7.0.4/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch diff --git a/nx-X11/extras/Mesa.patches_6.4.2/4002_no-special-glx-memfunctions.patch b/nx-X11/extras/Mesa.patches_7.0.4/4002_no-special-glx-memfunctions.patch similarity index 55% rename from nx-X11/extras/Mesa.patches_6.4.2/4002_no-special-glx-memfunctions.patch rename to nx-X11/extras/Mesa.patches_7.0.4/4002_no-special-glx-memfunctions.patch index 4f68037305..d8ed2e28f8 100644 --- a/nx-X11/extras/Mesa.patches_6.4.2/4002_no-special-glx-memfunctions.patch +++ b/nx-X11/extras/Mesa.patches_7.0.4/4002_no-special-glx-memfunctions.patch @@ -1,28 +1,26 @@ Description: Turn glx_ansic.h into a no-op include. (by using memset, malloc, free directly) Author: Mike Gabriel -Index: Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +Index: Mesa/src/glx/glcontextmodes.c =================================================================== ---- Mesa.orig/src/mesa/drivers/dri/common/glcontextmodes.c -+++ Mesa/src/mesa/drivers/dri/common/glcontextmodes.c -@@ -48,15 +48,14 @@ - +--- Mesa.orig/src/glx/x11/glcontextmodes.c ++++ Mesa/src/glx/x11/glcontextmodes.c +@@ -53,14 +53,14 @@ # ifdef XFree86Server - # include "GL/glx_ansic.h" --extern void * __glXMalloc( size_t size ); --extern void __glXFree( void * ptr ); --# define _mesa_malloc(b) __glXMalloc(b) --# define _mesa_free(m) __glXFree(m) -+# define __glXMemset memset + # include + # include +-# define _mesa_malloc(b) xalloc(b) +-# define _mesa_free(m) xfree(m) +# define _mesa_malloc(b) malloc(b) +# define _mesa_free(m) free(m) + # define _mesa_memset memset # else # include - # define __glXMemset memset + # define _mesa_memset memset -# define _mesa_malloc(b) Xmalloc(b) -# define _mesa_free(m) Xfree(m) +# define _mesa_malloc(b) malloc(b) +# define _mesa_free(m) free(m) # endif /* XFree86Server */ #endif /* !defined(IN_MINI_GLX) */ - + diff --git a/nx-X11/extras/Mesa.patches_6.4.2/4003_CreatePixmap-AllocationHints.patch b/nx-X11/extras/Mesa.patches_7.0.4/4003_CreatePixmap-AllocationHints.patch similarity index 84% rename from nx-X11/extras/Mesa.patches_6.4.2/4003_CreatePixmap-AllocationHints.patch rename to nx-X11/extras/Mesa.patches_7.0.4/4003_CreatePixmap-AllocationHints.patch index f2caf28123..aeab193150 100644 --- a/nx-X11/extras/Mesa.patches_6.4.2/4003_CreatePixmap-AllocationHints.patch +++ b/nx-X11/extras/Mesa.patches_7.0.4/4003_CreatePixmap-AllocationHints.patch @@ -2,12 +2,12 @@ Index: Mesa/include/GL/xmesa_xf86.h =================================================================== --- Mesa.orig/include/GL/xmesa_xf86.h +++ Mesa/include/GL/xmesa_xf86.h -@@ -130,7 +130,7 @@ do { \ +@@ -142,7 +142,7 @@ do { \ /* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */ #define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \ - (*__d->CreatePixmap)(__d, __w, __h, __depth) -+ (*__d->CreatePixmap)(__d, __w, __h, __depth, 0) ++ (*__d->CreatePixmap)(__d, __w, __h, __depth, 0) #define XMesaFreePixmap(__d,__b) \ (*__d->DestroyPixmap)(__b) diff --git a/nx-X11/extras/Mesa.patches_6.4.2/4004_define-USE_IEEE-macro-for-more-platforms.patch b/nx-X11/extras/Mesa.patches_7.0.4/4004_define-USE_IEEE-macro-for-more-platforms.patch similarity index 100% rename from nx-X11/extras/Mesa.patches_6.4.2/4004_define-USE_IEEE-macro-for-more-platforms.patch rename to nx-X11/extras/Mesa.patches_7.0.4/4004_define-USE_IEEE-macro-for-more-platforms.patch diff --git a/nx-X11/extras/Mesa.patches_6.4.2/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch b/nx-X11/extras/Mesa.patches_7.0.4/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch similarity index 70% rename from nx-X11/extras/Mesa.patches_6.4.2/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch rename to nx-X11/extras/Mesa.patches_7.0.4/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch index e5327c339f..ff10f4a8fe 100644 --- a/nx-X11/extras/Mesa.patches_6.4.2/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch +++ b/nx-X11/extras/Mesa.patches_7.0.4/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch @@ -16,53 +16,60 @@ Index: Mesa/include/GL/xmesa.h #include "xmesa_x.h" #endif #include "GL/gl.h" -Index: Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +Index: Mesa/src/glx/x11/glcontextmodes.c =================================================================== ---- Mesa.orig/src/mesa/drivers/dri/common/glcontextmodes.c -+++ Mesa/src/mesa/drivers/dri/common/glcontextmodes.c -@@ -39,7 +39,7 @@ - # include "imports.h" - # define __glXMemset memset - #else --# include -+# include - # include - # include "GL/glxint.h" - -@@ -49,7 +49,7 @@ - # define _mesa_malloc(b) malloc(b) +--- Mesa.orig/src/glx/x11/glcontextmodes.c ++++ Mesa/src/glx/x11/glcontextmodes.c +@@ -37,7 +37,7 @@ + #if defined(HAVE_DIX_CONFIG_H) + # include + #endif +-#include ++#include + #include + #include "GL/glxint.h" + #endif +@@ -57,7 +57,7 @@ # define _mesa_free(m) free(m) + # define _mesa_memset memset # else -# include +# include - # define __glXMemset memset + # define _mesa_memset memset # define _mesa_malloc(b) malloc(b) # define _mesa_free(m) free(m) Index: Mesa/src/mesa/drivers/x11/glxheader.h =================================================================== --- Mesa.orig/src/mesa/drivers/x11/glxheader.h +++ Mesa/src/mesa/drivers/x11/glxheader.h -@@ -43,8 +43,8 @@ +@@ -39,13 +39,13 @@ #else -# include +-# include -# include +# include ++# include +# include # ifdef USE_XSHM /* was SHM */ # include # include +-# include ++# include + # endif + # include + # include Index: Mesa/src/mesa/glapi/glthread.h =================================================================== --- Mesa.orig/src/mesa/glapi/glthread.h +++ Mesa/src/mesa/glapi/glthread.h -@@ -180,7 +180,7 @@ typedef CRITICAL_SECTION _glthread_Mutex +@@ -185,7 +185,7 @@ typedef CRITICAL_SECTION _glthread_Mutex; * We wrap it again for GL. */ #ifdef USE_XTHREADS -#include +#include - + typedef struct { xthread_key_t key; diff --git a/nx-X11/extras/Mesa.patches_7.0.4/5001_nasty-typo-fixes.patch b/nx-X11/extras/Mesa.patches_7.0.4/5001_nasty-typo-fixes.patch new file mode 100644 index 0000000000..b2f211997c --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0.4/5001_nasty-typo-fixes.patch @@ -0,0 +1,94 @@ +Description: Some nasty typos fixed to silence lintian et al. +Author: Mike Gabriel + +Index: Mesa/src/mesa/main/debug.c +=================================================================== +--- Mesa.orig/src/mesa/main/debug.c ++++ Mesa/src/mesa/main/debug.c +@@ -43,7 +43,7 @@ const char *_mesa_prim_name[GL_POLYGON+4 + "GL_QUAD_STRIP", + "GL_POLYGON", + "outside begin/end", +- "inside unkown primitive", ++ "inside unknown primitive", + "unknown state" + }; + +Index: Mesa/src/mesa/shader/arbprogparse.c +=================================================================== +--- Mesa.orig/src/mesa/shader/arbprogparse.c ++++ Mesa/src/mesa/shader/arbprogparse.c +@@ -127,8 +127,8 @@ + * + * Cosmetic Stuff + * ----------------------------------------------------- +- * - remove any leftover unused grammer.c stuff (dict_ ?) +- * - fix grammer.c error handling so its not static ++ * - remove any leftover unused grammar.c stuff (dict_ ?) ++ * - fix grammar.c error handling so its not static + * - #ifdef around stuff pertaining to extentions + * + * Outstanding Questions: +@@ -1673,7 +1673,7 @@ + if (found) { + error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) attrib_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + attrib_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -1864,7 +1864,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) param_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + param_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -1972,7 +1972,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + temp_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -2023,7 +2023,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) output_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + output_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -2057,7 +2057,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + temp_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -2106,7 +2106,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + temp_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -3904,7 +3904,7 @@ + grammar_get_last_error ((GLubyte *) error_msg, 300, &error_pos); + _mesa_set_program_error (ctx, error_pos, error_msg); + _mesa_error (ctx, GL_INVALID_OPERATION, +- "glProgramString(Error loading grammer rule set)"); ++ "glProgramString(Error loading grammar rule set)"); + return GL_FALSE; + } + diff --git a/nx-X11/extras/Mesa.patches_6.4.2/series b/nx-X11/extras/Mesa.patches_7.0.4/series similarity index 69% rename from nx-X11/extras/Mesa.patches_6.4.2/series rename to nx-X11/extras/Mesa.patches_7.0.4/series index 09e99f2b54..1cdc2f7966 100644 --- a/nx-X11/extras/Mesa.patches_6.4.2/series +++ b/nx-X11/extras/Mesa.patches_7.0.4/series @@ -1,6 +1,6 @@ #4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch 4002_no-special-glx-memfunctions.patch 4003_CreatePixmap-AllocationHints.patch -4004_define-USE_IEEE-macro-for-more-platforms.patch -5001_nasty-typo-fixes.patch +#4004_define-USE_IEEE-macro-for-more-platforms.patch +#5001_nasty-typo-fixes.patch 4005_adapt-all-libX11-include-paths-to-libNX_X11.patch diff --git a/nx-X11/extras/Mesa.patches_7.0/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch b/nx-X11/extras/Mesa.patches_7.0/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch new file mode 100644 index 0000000000..c73be36437 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch @@ -0,0 +1,54 @@ +From 44518d07398d663448d79e4f546736b40752630c Mon Sep 17 00:00:00 2001 +From: Ulrich Sibiller +Date: Wed, 16 Mar 2016 14:40:08 +0100 +Subject: [PATCH] Fix non-working GLX in 64bit Xorg 7.0 + +Found the needed patch in debian bugtracker at +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=364233 +--- + src/glx/x11/indirect_vertex_array.c | 2 +- + src/mesa/drivers/dri/common/glcontextmodes.c | 3 +++ + src/mesa/main/glheader.h | 3 +++ + 3 files changed, 7 insertions(+), 1 deletion(-) + +Index: Mesa/src/glx/x11/indirect_vertex_array.c +=================================================================== +--- Mesa.orig/src/glx/x11/indirect_vertex_array.c ++++ Mesa/src/glx/x11/indirect_vertex_array.c +@@ -530,7 +530,7 @@ static GLubyte * + emit_DrawArrays_header_old( __GLXcontext * gc, + struct array_state_vector * arrays, + size_t * elements_per_request, +- size_t * total_requests, ++ unsigned int * total_requests, + GLenum mode, GLsizei count ) + { + size_t command_size; +Index: Mesa/src/mesa/main/glheader.h +=================================================================== +--- Mesa.orig/src/mesa/main/glheader.h ++++ Mesa/src/mesa/main/glheader.h +@@ -46,6 +46,9 @@ + #ifndef GLHEADER_H + #define GLHEADER_H + ++#ifdef HAVE_DIX_CONFIG_H ++#include "dix-config.h" ++#endif + + #if defined(XFree86LOADER) && defined(IN_MODULE) + #include "xf86_ansic.h" +Index: Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/mesa/drivers/dri/common/glcontextmodes.c ++++ Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +@@ -39,6 +39,9 @@ + # include "imports.h" + # define __glXMemset memset + #else ++# if defined (HAVE_DIX_CONFIG_H) ++# include ++# endif + # include + # include + # include "GL/glxint.h" diff --git a/nx-X11/extras/Mesa.patches_7.0/4002_no-special-glx-memfunctions.patch b/nx-X11/extras/Mesa.patches_7.0/4002_no-special-glx-memfunctions.patch new file mode 100644 index 0000000000..d8ed2e28f8 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0/4002_no-special-glx-memfunctions.patch @@ -0,0 +1,26 @@ +Description: Turn glx_ansic.h into a no-op include. (by using memset, malloc, free directly) +Author: Mike Gabriel + +Index: Mesa/src/glx/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/glx/x11/glcontextmodes.c ++++ Mesa/src/glx/x11/glcontextmodes.c +@@ -53,14 +53,14 @@ + # ifdef XFree86Server + # include + # include +-# define _mesa_malloc(b) xalloc(b) +-# define _mesa_free(m) xfree(m) ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # define _mesa_memset memset + # else + # include + # define _mesa_memset memset +-# define _mesa_malloc(b) Xmalloc(b) +-# define _mesa_free(m) Xfree(m) ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # endif /* XFree86Server */ + #endif /* !defined(IN_MINI_GLX) */ + diff --git a/nx-X11/extras/Mesa.patches_7.0/4003_CreatePixmap-AllocationHints.patch b/nx-X11/extras/Mesa.patches_7.0/4003_CreatePixmap-AllocationHints.patch new file mode 100644 index 0000000000..aeab193150 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0/4003_CreatePixmap-AllocationHints.patch @@ -0,0 +1,13 @@ +Index: Mesa/include/GL/xmesa_xf86.h +=================================================================== +--- Mesa.orig/include/GL/xmesa_xf86.h ++++ Mesa/include/GL/xmesa_xf86.h +@@ -142,7 +142,7 @@ do { \ + + /* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */ + #define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \ +- (*__d->CreatePixmap)(__d, __w, __h, __depth) ++ (*__d->CreatePixmap)(__d, __w, __h, __depth, 0) + + #define XMesaFreePixmap(__d,__b) \ + (*__d->DestroyPixmap)(__b) diff --git a/nx-X11/extras/Mesa.patches_7.0/4004_define-USE_IEEE-macro-for-more-platforms.patch b/nx-X11/extras/Mesa.patches_7.0/4004_define-USE_IEEE-macro-for-more-platforms.patch new file mode 100644 index 0000000000..dff1599763 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0/4004_define-USE_IEEE-macro-for-more-platforms.patch @@ -0,0 +1,16 @@ +Author: Mike Gabriel +Description: define USE_IEEE for __aarch64__ and __mc68000__, as well + +Index: Mesa/src/mesa/main/imports.h +=================================================================== +--- Mesa.orig/src/mesa/main/imports.h ++++ Mesa/src/mesa/main/imports.h +@@ -205,6 +205,8 @@ typedef union { GLfloat f; GLint i; } fi + defined(__hppa__) || defined(hpux) || \ + defined(__mips) || defined(_MIPS_ARCH) || \ + defined(__arm__) || \ ++ defined(__aarch64__) || \ ++ defined(__mc68000__) || \ + defined(__sh__) || \ + (defined(__alpha__) && (defined(__IEEE_FLOAT) || !defined(VMS))) + #define USE_IEEE diff --git a/nx-X11/extras/Mesa.patches_7.0/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch b/nx-X11/extras/Mesa.patches_7.0/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch new file mode 100644 index 0000000000..ff10f4a8fe --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch @@ -0,0 +1,75 @@ +Description: Assure that headers from libNX_X11 are always included from ${INCDIR}/nx-X11/. +Author: Mike Gabriel + +Index: Mesa/include/GL/xmesa.h +=================================================================== +--- Mesa.orig/include/GL/xmesa.h ++++ Mesa/include/GL/xmesa.h +@@ -75,8 +75,8 @@ extern "C" { + #ifdef XFree86Server + #include "xmesa_xf86.h" + #else +-#include +-#include ++#include ++#include + #include "xmesa_x.h" + #endif + #include "GL/gl.h" +Index: Mesa/src/glx/x11/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/glx/x11/glcontextmodes.c ++++ Mesa/src/glx/x11/glcontextmodes.c +@@ -37,7 +37,7 @@ + #if defined(HAVE_DIX_CONFIG_H) + # include + #endif +-#include ++#include + #include + #include "GL/glxint.h" + #endif +@@ -57,7 +57,7 @@ + # define _mesa_free(m) free(m) + # define _mesa_memset memset + # else +-# include ++# include + # define _mesa_memset memset + # define _mesa_malloc(b) malloc(b) + # define _mesa_free(m) free(m) +Index: Mesa/src/mesa/drivers/x11/glxheader.h +=================================================================== +--- Mesa.orig/src/mesa/drivers/x11/glxheader.h ++++ Mesa/src/mesa/drivers/x11/glxheader.h +@@ -39,13 +39,13 @@ + + #else + +-# include +-# include +-# include ++# include ++# include ++# include + # ifdef USE_XSHM /* was SHM */ + # include + # include +-# include ++# include + # endif + # include + # include +Index: Mesa/src/mesa/glapi/glthread.h +=================================================================== +--- Mesa.orig/src/mesa/glapi/glthread.h ++++ Mesa/src/mesa/glapi/glthread.h +@@ -185,7 +185,7 @@ typedef CRITICAL_SECTION _glthread_Mutex; + * We wrap it again for GL. + */ + #ifdef USE_XTHREADS +-#include ++#include + + typedef struct { + xthread_key_t key; diff --git a/nx-X11/extras/Mesa.patches_7.0/5001_nasty-typo-fixes.patch b/nx-X11/extras/Mesa.patches_7.0/5001_nasty-typo-fixes.patch new file mode 100644 index 0000000000..b2f211997c --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0/5001_nasty-typo-fixes.patch @@ -0,0 +1,94 @@ +Description: Some nasty typos fixed to silence lintian et al. +Author: Mike Gabriel + +Index: Mesa/src/mesa/main/debug.c +=================================================================== +--- Mesa.orig/src/mesa/main/debug.c ++++ Mesa/src/mesa/main/debug.c +@@ -43,7 +43,7 @@ const char *_mesa_prim_name[GL_POLYGON+4 + "GL_QUAD_STRIP", + "GL_POLYGON", + "outside begin/end", +- "inside unkown primitive", ++ "inside unknown primitive", + "unknown state" + }; + +Index: Mesa/src/mesa/shader/arbprogparse.c +=================================================================== +--- Mesa.orig/src/mesa/shader/arbprogparse.c ++++ Mesa/src/mesa/shader/arbprogparse.c +@@ -127,8 +127,8 @@ + * + * Cosmetic Stuff + * ----------------------------------------------------- +- * - remove any leftover unused grammer.c stuff (dict_ ?) +- * - fix grammer.c error handling so its not static ++ * - remove any leftover unused grammar.c stuff (dict_ ?) ++ * - fix grammar.c error handling so its not static + * - #ifdef around stuff pertaining to extentions + * + * Outstanding Questions: +@@ -1673,7 +1673,7 @@ + if (found) { + error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) attrib_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + attrib_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -1864,7 +1864,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) param_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + param_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -1972,7 +1972,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + temp_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -2023,7 +2023,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) output_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + output_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -2057,7 +2057,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + temp_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -2106,7 +2106,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + temp_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -3904,7 +3904,7 @@ + grammar_get_last_error ((GLubyte *) error_msg, 300, &error_pos); + _mesa_set_program_error (ctx, error_pos, error_msg); + _mesa_error (ctx, GL_INVALID_OPERATION, +- "glProgramString(Error loading grammer rule set)"); ++ "glProgramString(Error loading grammar rule set)"); + return GL_FALSE; + } + diff --git a/nx-X11/extras/Mesa.patches_7.0/series b/nx-X11/extras/Mesa.patches_7.0/series new file mode 100644 index 0000000000..1cdc2f7966 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0/series @@ -0,0 +1,6 @@ +#4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch +4002_no-special-glx-memfunctions.patch +4003_CreatePixmap-AllocationHints.patch +#4004_define-USE_IEEE-macro-for-more-platforms.patch +#5001_nasty-typo-fixes.patch +4005_adapt-all-libX11-include-paths-to-libNX_X11.patch diff --git a/nx-X11/extras/Mesa.patches_7.2/4002_no-special-glx-memfunctions.patch b/nx-X11/extras/Mesa.patches_7.2/4002_no-special-glx-memfunctions.patch new file mode 100644 index 0000000000..b3aa9db252 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.2/4002_no-special-glx-memfunctions.patch @@ -0,0 +1,45 @@ +Index: Mesa/src/glx/x11/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/glx/x11/glcontextmodes.c ++++ Mesa/src/glx/x11/glcontextmodes.c +@@ -53,14 +53,14 @@ + # ifdef XFree86Server + # include + # include +-# define _mesa_malloc(b) xalloc(b) +-# define _mesa_free(m) xfree(m) ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # define _mesa_memset memset + # else + # include + # define _mesa_memset memset +-# define _mesa_malloc(b) Xmalloc(b) +-# define _mesa_free(m) Xfree(m) ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # endif /* XFree86Server */ + #endif /* !defined(IN_MINI_GLX) */ + +Index: Mesa/src/mesa/drivers/x11/xm_image.c +=================================================================== +--- Mesa.orig/src/mesa/drivers/x11/xm_image.c ++++ Mesa/src/mesa/drivers/x11/xm_image.c +@@ -49,7 +49,7 @@ XMesaImage *XMesaCreateImage(int bitsPer + { + XMesaImage *image; + +- image = (XMesaImage *)xalloc(sizeof(XMesaImage)); ++ image = (XMesaImage *)malloc(sizeof(XMesaImage)); + + if (image) { + image->width = width; +@@ -67,7 +67,7 @@ void XMesaDestroyImage(XMesaImage *image + { + if (image->data) + free(image->data); +- xfree(image); ++ free(image); + } + + unsigned long XMesaGetPixel(XMesaImage *image, int x, int y) diff --git a/nx-X11/extras/Mesa.patches_7.2/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch b/nx-X11/extras/Mesa.patches_7.2/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch new file mode 100644 index 0000000000..52d316f919 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.2/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch @@ -0,0 +1,52 @@ +Index: Mesa/src/glx/x11/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/glx/x11/glcontextmodes.c ++++ Mesa/src/glx/x11/glcontextmodes.c +@@ -37,7 +37,7 @@ + #if defined(HAVE_DIX_CONFIG_H) + # include + #endif +-#include ++#include + #include + #include "GL/glxint.h" + #endif +@@ -57,7 +57,7 @@ + # define _mesa_free(m) free(m) + # define _mesa_memset memset + # else +-# include ++# include + # define _mesa_memset memset + # define _mesa_malloc(b) malloc(b) + # define _mesa_free(m) free(m) +Index: Mesa/src/mesa/drivers/x11/glxheader.h +=================================================================== +--- Mesa.orig/src/mesa/drivers/x11/glxheader.h ++++ Mesa/src/mesa/drivers/x11/glxheader.h +@@ -40,9 +40,9 @@ + + #else + +-# include +-# include +-# include ++# include ++# include ++# include + # ifdef USE_XSHM /* was SHM */ + # include + # include +Index: Mesa/src/mesa/drivers/x11/xm_image.c +=================================================================== +--- Mesa.orig/src/mesa/drivers/x11/xm_image.c ++++ Mesa/src/mesa/drivers/x11/xm_image.c +@@ -32,7 +32,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN + */ + + #include +-#include ++#include + + #include "glxheader.h" + #include "xmesaP.h" diff --git a/nx-X11/extras/Mesa.patches_7.2/series b/nx-X11/extras/Mesa.patches_7.2/series new file mode 100644 index 0000000000..78a8cc1411 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.2/series @@ -0,0 +1,2 @@ +4002_no-special-glx-memfunctions.patch +4005_adapt-all-libX11-include-paths-to-libNX_X11.patch diff --git a/nx-X11/extras/Mesa.patches_7.7/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch b/nx-X11/extras/Mesa.patches_7.7/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch new file mode 100644 index 0000000000..c73be36437 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.7/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch @@ -0,0 +1,54 @@ +From 44518d07398d663448d79e4f546736b40752630c Mon Sep 17 00:00:00 2001 +From: Ulrich Sibiller +Date: Wed, 16 Mar 2016 14:40:08 +0100 +Subject: [PATCH] Fix non-working GLX in 64bit Xorg 7.0 + +Found the needed patch in debian bugtracker at +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=364233 +--- + src/glx/x11/indirect_vertex_array.c | 2 +- + src/mesa/drivers/dri/common/glcontextmodes.c | 3 +++ + src/mesa/main/glheader.h | 3 +++ + 3 files changed, 7 insertions(+), 1 deletion(-) + +Index: Mesa/src/glx/x11/indirect_vertex_array.c +=================================================================== +--- Mesa.orig/src/glx/x11/indirect_vertex_array.c ++++ Mesa/src/glx/x11/indirect_vertex_array.c +@@ -530,7 +530,7 @@ static GLubyte * + emit_DrawArrays_header_old( __GLXcontext * gc, + struct array_state_vector * arrays, + size_t * elements_per_request, +- size_t * total_requests, ++ unsigned int * total_requests, + GLenum mode, GLsizei count ) + { + size_t command_size; +Index: Mesa/src/mesa/main/glheader.h +=================================================================== +--- Mesa.orig/src/mesa/main/glheader.h ++++ Mesa/src/mesa/main/glheader.h +@@ -46,6 +46,9 @@ + #ifndef GLHEADER_H + #define GLHEADER_H + ++#ifdef HAVE_DIX_CONFIG_H ++#include "dix-config.h" ++#endif + + #if defined(XFree86LOADER) && defined(IN_MODULE) + #include "xf86_ansic.h" +Index: Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/mesa/drivers/dri/common/glcontextmodes.c ++++ Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +@@ -39,6 +39,9 @@ + # include "imports.h" + # define __glXMemset memset + #else ++# if defined (HAVE_DIX_CONFIG_H) ++# include ++# endif + # include + # include + # include "GL/glxint.h" diff --git a/nx-X11/extras/Mesa.patches_7.7/4002_no-special-glx-memfunctions.patch b/nx-X11/extras/Mesa.patches_7.7/4002_no-special-glx-memfunctions.patch new file mode 100644 index 0000000000..17771f0a66 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.7/4002_no-special-glx-memfunctions.patch @@ -0,0 +1,58 @@ +Index: Mesa/src/glx/x11/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/glx/x11/glcontextmodes.c ++++ Mesa/src/glx/x11/glcontextmodes.c +@@ -53,14 +53,14 @@ + # ifdef XFree86Server + # include + # include +-# define _mesa_malloc(b) xalloc(b) +-# define _mesa_free(m) xfree(m) ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # define _mesa_memset memset + # else + # include + # define _mesa_memset memset +-# define _mesa_malloc(b) Xmalloc(b) +-# define _mesa_free(m) Xfree(m) ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # endif /* XFree86Server */ + #endif /* !defined(IN_MINI_GLX) */ + +Index: Mesa/src/mesa/drivers/x11/xm_image.c +=================================================================== +--- Mesa.orig/src/mesa/drivers/x11/xm_image.c ++++ Mesa/src/mesa/drivers/x11/xm_image.c +@@ -49,7 +49,7 @@ XMesaImage *XMesaCreateImage(int bitsPer + { + XMesaImage *image; + +- image = (XMesaImage *)xalloc(sizeof(XMesaImage)); ++ image = (XMesaImage *)malloc(sizeof(XMesaImage)); + + if (image) { + image->width = width; +@@ -67,7 +67,7 @@ void XMesaDestroyImage(XMesaImage *image + { + if (image->data) + free(image->data); +- xfree(image); ++ free(image); + } + + unsigned long XMesaGetPixel(XMesaImage *image, int x, int y) +Index: Mesa/src/mesa/drivers/x11/xmesa_xf86.h +=================================================================== +--- Mesa.orig/src/mesa/drivers/x11/xmesa_xf86.h ++++ Mesa/src/mesa/drivers/x11/xmesa_xf86.h +@@ -133,7 +133,7 @@ static _X_INLINE XMesaImage *XMesaGetIma + unsigned int height, + unsigned long plane_mask, int format) + { +- XMesaImage *img = Xcalloc(sizeof(*img)); ++ XMesaImage *img = calloc(1, sizeof(*img)); + + img->width = p->drawable.width; + img->height = p->drawable.height; diff --git a/nx-X11/extras/Mesa.patches_7.7/4004_define-USE_IEEE-macro-for-more-platforms.patch b/nx-X11/extras/Mesa.patches_7.7/4004_define-USE_IEEE-macro-for-more-platforms.patch new file mode 100644 index 0000000000..dff1599763 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.7/4004_define-USE_IEEE-macro-for-more-platforms.patch @@ -0,0 +1,16 @@ +Author: Mike Gabriel +Description: define USE_IEEE for __aarch64__ and __mc68000__, as well + +Index: Mesa/src/mesa/main/imports.h +=================================================================== +--- Mesa.orig/src/mesa/main/imports.h ++++ Mesa/src/mesa/main/imports.h +@@ -205,6 +205,8 @@ typedef union { GLfloat f; GLint i; } fi + defined(__hppa__) || defined(hpux) || \ + defined(__mips) || defined(_MIPS_ARCH) || \ + defined(__arm__) || \ ++ defined(__aarch64__) || \ ++ defined(__mc68000__) || \ + defined(__sh__) || \ + (defined(__alpha__) && (defined(__IEEE_FLOAT) || !defined(VMS))) + #define USE_IEEE diff --git a/nx-X11/extras/Mesa.patches_7.7/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch b/nx-X11/extras/Mesa.patches_7.7/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch new file mode 100644 index 0000000000..52d316f919 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.7/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch @@ -0,0 +1,52 @@ +Index: Mesa/src/glx/x11/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/glx/x11/glcontextmodes.c ++++ Mesa/src/glx/x11/glcontextmodes.c +@@ -37,7 +37,7 @@ + #if defined(HAVE_DIX_CONFIG_H) + # include + #endif +-#include ++#include + #include + #include "GL/glxint.h" + #endif +@@ -57,7 +57,7 @@ + # define _mesa_free(m) free(m) + # define _mesa_memset memset + # else +-# include ++# include + # define _mesa_memset memset + # define _mesa_malloc(b) malloc(b) + # define _mesa_free(m) free(m) +Index: Mesa/src/mesa/drivers/x11/glxheader.h +=================================================================== +--- Mesa.orig/src/mesa/drivers/x11/glxheader.h ++++ Mesa/src/mesa/drivers/x11/glxheader.h +@@ -40,9 +40,9 @@ + + #else + +-# include +-# include +-# include ++# include ++# include ++# include + # ifdef USE_XSHM /* was SHM */ + # include + # include +Index: Mesa/src/mesa/drivers/x11/xm_image.c +=================================================================== +--- Mesa.orig/src/mesa/drivers/x11/xm_image.c ++++ Mesa/src/mesa/drivers/x11/xm_image.c +@@ -32,7 +32,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN + */ + + #include +-#include ++#include + + #include "glxheader.h" + #include "xmesaP.h" diff --git a/nx-X11/extras/Mesa.patches_6.4.2/5001_nasty-typo-fixes.patch b/nx-X11/extras/Mesa.patches_7.7/5001_nasty-typo-fixes.patch similarity index 100% rename from nx-X11/extras/Mesa.patches_6.4.2/5001_nasty-typo-fixes.patch rename to nx-X11/extras/Mesa.patches_7.7/5001_nasty-typo-fixes.patch diff --git a/nx-X11/extras/Mesa.patches_7.7/series b/nx-X11/extras/Mesa.patches_7.7/series new file mode 100644 index 0000000000..78a8cc1411 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.7/series @@ -0,0 +1,2 @@ +4002_no-special-glx-memfunctions.patch +4005_adapt-all-libX11-include-paths-to-libNX_X11.patch diff --git a/nx-X11/extras/Mesa_6.4.2/Makefile b/nx-X11/extras/Mesa_6.4.2/Makefile deleted file mode 100644 index 9e11e86bb4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/Makefile +++ /dev/null @@ -1,452 +0,0 @@ -# Top-level Mesa makefile - -TOP = . - -SUBDIRS = src progs - - -default: $(TOP)/configs/current - @for dir in $(SUBDIRS) ; do \ - (cd $$dir ; $(MAKE)) || exit 1 ; \ - done - - -doxygen: - (cd doxygen ; make) ; \ - -clean: - @for dir in $(SUBDIRS) ; do \ - (cd $$dir ; $(MAKE) clean) ; \ - done - - -realclean: - touch $(TOP)/configs/current - $(MAKE) clean - -rm -rf lib* - -rm -f $(TOP)/configs/current - -rm -f `find . -name \*.o` - -rm -f `find . -name \*.a` - -rm -f `find . -name \*.so` - -rm -f `find . -name depend` - - - -install: - @echo "Installing" - $(TOP)/bin/installmesa $(DESTDIR) - -# DirectFBGL module installation -linux-directfb-install: - cd src/mesa/drivers/directfb && $(MAKE) install - -# If there's no current configuration file -$(TOP)/configs/current: - @echo - @echo - @echo "Please choose a configuration from the following list:" - @ls -1 $(TOP)/configs | grep -v "current\|default\|CVS" - @echo - @echo "Then type 'make ' (ex: 'make linux-x86')" - @echo "(ignore the following error message)" - @exit 1 - - -# Rules to set/install a specific build configuration -aix \ -aix-64 \ -aix-gcc \ -aix-static \ -beos \ -darwin \ -darwin-static \ -freebsd \ -freebsd-dri \ -freebsd-dri-amd64 \ -freebsd-dri-x86 \ -hpux10 \ -hpux10-gcc \ -hpux10-static \ -hpux11-32 \ -hpux11-32-static \ -hpux11-32-static-nothreads \ -hpux11-64 \ -hpux11-64-static \ -hpux9 \ -hpux9-gcc \ -irix6-64 \ -irix6-64-static \ -irix6-n32 \ -irix6-n32-static \ -irix6-o32 \ -irix6-o32-static \ -linux \ -linux-alpha \ -linux-alpha-static \ -linux-debug \ -linux-directfb \ -linux-dri \ -linux-dri-x86 \ -linux-dri-x86-64 \ -linux-dri-ppc \ -linux-indirect \ -linux-fbdev \ -linux-glide \ -linux-icc \ -linux-icc-static \ -linux-osmesa16 \ -linux-osmesa16-static \ -linux-osmesa32 \ -linux-ppc \ -linux-ppc-static \ -linux-solo \ -linux-solo-x86 \ -linux-solo-ia64 \ -linux-sparc \ -linux-sparc5 \ -linux-static \ -linux-ultrasparc \ -linux-tcc \ -linux-x86 \ -linux-x86-debug \ -linux-x86-32 \ -linux-x86-64 \ -linux-x86-64-debug \ -linux-x86-64-static \ -linux-x86-xcb \ -linux-x86-glide \ -linux-x86-static \ -netbsd \ -openbsd \ -osf1 \ -solaris-x86 \ -solaris-x86-gcc \ -sunos4 \ -sunos4-gcc \ -sunos4-static \ -sunos5 \ -sunos5-gcc \ -sunos5-smp \ -ultrix-gcc: - (cd configs && rm -f current && ln -s $@ current) - $(MAKE) default - - -# Rules for making release tarballs - -DIRECTORY = Mesa-6.4.2 -LIB_NAME = MesaLib-6.4.2 -DEMO_NAME = MesaDemos-6.4.2 -GLUT_NAME = MesaGLUT-6.4.2 - -MAIN_FILES = \ - $(DIRECTORY)/Makefile* \ - $(DIRECTORY)/descrip.mms \ - $(DIRECTORY)/mms-config. \ - $(DIRECTORY)/bin/mklib \ - $(DIRECTORY)/bin/installmesa \ - $(DIRECTORY)/configs/[a-z]* \ - $(DIRECTORY)/docs/*.html \ - $(DIRECTORY)/docs/COPYING \ - $(DIRECTORY)/docs/README.* \ - $(DIRECTORY)/docs/RELNOTES* \ - $(DIRECTORY)/docs/VERSIONS \ - $(DIRECTORY)/docs/*.spec \ - $(DIRECTORY)/include/GL/internal/glcore.h \ - $(DIRECTORY)/include/GL/amesa.h \ - $(DIRECTORY)/include/GL/dmesa.h \ - $(DIRECTORY)/include/GL/directfbgl.h \ - $(DIRECTORY)/include/GL/fxmesa.h \ - $(DIRECTORY)/include/GL/ggimesa.h \ - $(DIRECTORY)/include/GL/gl.h \ - $(DIRECTORY)/include/GL/glext.h \ - $(DIRECTORY)/include/GL/gl_mangle.h \ - $(DIRECTORY)/include/GL/glu.h \ - $(DIRECTORY)/include/GL/glu_mangle.h \ - $(DIRECTORY)/include/GL/glx.h \ - $(DIRECTORY)/include/GL/glxext.h \ - $(DIRECTORY)/include/GL/glx_mangle.h \ - $(DIRECTORY)/include/GL/glfbdev.h \ - $(DIRECTORY)/include/GL/mesa_wgl.h \ - $(DIRECTORY)/include/GL/mglmesa.h \ - $(DIRECTORY)/include/GL/osmesa.h \ - $(DIRECTORY)/include/GL/svgamesa.h \ - $(DIRECTORY)/include/GL/ugl*.h \ - $(DIRECTORY)/include/GL/vms_x_fix.h \ - $(DIRECTORY)/include/GL/wmesa.h \ - $(DIRECTORY)/include/GL/xmesa.h \ - $(DIRECTORY)/include/GL/xmesa_x.h \ - $(DIRECTORY)/include/GL/xmesa_xf86.h \ - $(DIRECTORY)/include/GLView.h \ - $(DIRECTORY)/src/Makefile \ - $(DIRECTORY)/src/descrip.mms \ - $(DIRECTORY)/src/mesa/Makefile* \ - $(DIRECTORY)/src/mesa/sources \ - $(DIRECTORY)/src/mesa/descrip.mms \ - $(DIRECTORY)/src/mesa/depend \ - $(DIRECTORY)/src/mesa/main/*.[chS] \ - $(DIRECTORY)/src/mesa/main/descrip.mms \ - $(DIRECTORY)/src/mesa/glapi/*.[chS] \ - $(DIRECTORY)/src/mesa/glapi/descrip.mms \ - $(DIRECTORY)/src/mesa/array_cache/*.[ch] \ - $(DIRECTORY)/src/mesa/array_cache/descrip.mms \ - $(DIRECTORY)/src/mesa/math/*.[ch] \ - $(DIRECTORY)/src/mesa/math/descrip.mms \ - $(DIRECTORY)/src/mesa/shader/*.[ch] \ - $(DIRECTORY)/src/mesa/shader/descrip.mms \ - $(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \ - $(DIRECTORY)/src/mesa/shader/grammar/descrip.mms \ - $(DIRECTORY)/src/mesa/shader/slang/*.[ch] \ - $(DIRECTORY)/src/mesa/shader/slang/descrip.mms \ - $(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \ - $(DIRECTORY)/src/mesa/swrast/*.[ch] \ - $(DIRECTORY)/src/mesa/swrast/descrip.mms \ - $(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \ - $(DIRECTORY)/src/mesa/swrast_setup/descrip.mms \ - $(DIRECTORY)/src/mesa/tnl/*.[chS] \ - $(DIRECTORY)/src/mesa/tnl/descrip.mms \ - $(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \ - $(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \ - $(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \ - $(DIRECTORY)/src/mesa/drivers/beos/*.cpp \ - $(DIRECTORY)/src/mesa/drivers/beos/Makefile \ - $(DIRECTORY)/src/mesa/drivers/common/*.[ch] \ - $(DIRECTORY)/src/mesa/drivers/common/descrip.mms \ - $(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \ - $(DIRECTORY)/src/mesa/drivers/directfb/Makefile \ - $(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \ - $(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \ - $(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \ - $(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \ - $(DIRECTORY)/src/mesa/drivers/ggi/ggimesa.conf.in \ - $(DIRECTORY)/src/mesa/drivers/ggi/default/*.c \ - $(DIRECTORY)/src/mesa/drivers/ggi/default/genkgi.conf.in \ - $(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \ - $(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \ - $(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \ - $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \ - $(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \ - $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \ - $(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \ - $(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \ - $(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \ - $(DIRECTORY)/src/mesa/drivers/windows/*/*.def \ - $(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \ - $(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \ - $(DIRECTORY)/src/mesa/ppc/*.[ch] \ - $(DIRECTORY)/src/mesa/sparc/*.[chS] \ - $(DIRECTORY)/src/mesa/x86/Makefile \ - $(DIRECTORY)/src/mesa/x86/*.[ch] \ - $(DIRECTORY)/src/mesa/x86/*.S \ - $(DIRECTORY)/src/mesa/x86/rtasm/*.[ch] \ - $(DIRECTORY)/src/mesa/x86-64/*.[chS] \ - $(DIRECTORY)/src/mesa/x86-64/Makefile \ - $(DIRECTORY)/progs/Makefile \ - $(DIRECTORY)/progs/util/README \ - $(DIRECTORY)/progs/util/*.[ch] \ - $(DIRECTORY)/progs/util/sampleMakefile \ - $(DIRECTORY)/vms/analyze_map.com \ - $(DIRECTORY)/vms/xlib.opt \ - $(DIRECTORY)/vms/xlib_share.opt \ - $(DIRECTORY)/windows/VC6/mesa/gdi/gdi.dsp \ - $(DIRECTORY)/windows/VC6/mesa/glu/*.txt \ - $(DIRECTORY)/windows/VC6/mesa/glu/glu.dsp \ - $(DIRECTORY)/windows/VC6/mesa/mesa.dsw \ - $(DIRECTORY)/windows/VC6/mesa/mesa/mesa.dsp \ - $(DIRECTORY)/windows/VC6/mesa/osmesa/osmesa.dsp \ - $(DIRECTORY)/windows/VC7/mesa/gdi/gdi.vcproj \ - $(DIRECTORY)/windows/VC7/mesa/glu/glu.vcproj \ - $(DIRECTORY)/windows/VC7/mesa/mesa.sln \ - $(DIRECTORY)/windows/VC7/mesa/mesa/mesa.vcproj \ - $(DIRECTORY)/windows/VC7/mesa/osmesa/osmesa.vcproj - -DRI_FILES = \ - $(DIRECTORY)/include/GL/internal/dri_interface.h \ - $(DIRECTORY)/include/GL/internal/sarea.h \ - $(DIRECTORY)/src/glx/Makefile \ - $(DIRECTORY)/src/glx/x11/Makefile \ - $(DIRECTORY)/src/glx/x11/*.[ch] \ - $(DIRECTORY)/src/mesa/drivers/dri/Makefile \ - $(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \ - $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \ - $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \ - $(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \ - $(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \ - $(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile \ - $(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch] - -SGI_GLU_FILES = \ - $(DIRECTORY)/src/glu/Makefile \ - $(DIRECTORY)/src/glu/descrip.mms \ - $(DIRECTORY)/src/glu/sgi/Makefile \ - $(DIRECTORY)/src/glu/sgi/Makefile.win \ - $(DIRECTORY)/src/glu/sgi/Makefile.DJ \ - $(DIRECTORY)/src/glu/sgi/glu.def \ - $(DIRECTORY)/src/glu/sgi/dummy.cc \ - $(DIRECTORY)/src/glu/sgi/descrip.mms \ - $(DIRECTORY)/src/glu/sgi/mesaglu.opt \ - $(DIRECTORY)/src/glu/sgi/include/gluos.h \ - $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \ - $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.cc \ - $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.h \ - $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.cc \ - $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.h \ - $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.cc \ - $(DIRECTORY)/src/glu/sgi/libtess/README \ - $(DIRECTORY)/src/glu/sgi/libtess/alg-outline \ - $(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \ - $(DIRECTORY)/src/glu/sgi/libutil/*.[ch] - -MESA_GLU_FILES = \ - $(DIRECTORY)/src/glu/mesa/README[12] \ - $(DIRECTORY)/src/glu/mesa/Makefile* \ - $(DIRECTORY)/src/glu/mesa/descrip.mms \ - $(DIRECTORY)/src/glu/mesa/mms_depend \ - $(DIRECTORY)/src/glu/mesa/*.def \ - $(DIRECTORY)/src/glu/mesa/depend \ - $(DIRECTORY)/src/glu/mesa/*.[ch] - -GLW_FILES = \ - $(DIRECTORY)/src/glw/*.[ch] \ - $(DIRECTORY)/src/glw/Makefile* \ - $(DIRECTORY)/src/glw/README \ - $(DIRECTORY)/src/glw/depend - -DEMO_FILES = \ - $(DIRECTORY)/progs/beos/*.cpp \ - $(DIRECTORY)/progs/beos/Makefile \ - $(DIRECTORY)/progs/images/*.rgb \ - $(DIRECTORY)/progs/images/*.rgba \ - $(DIRECTORY)/progs/demos/Makefile* \ - $(DIRECTORY)/progs/demos/descrip.mms \ - $(DIRECTORY)/progs/demos/*.[ch] \ - $(DIRECTORY)/progs/demos/*.cxx \ - $(DIRECTORY)/progs/demos/*.dat \ - $(DIRECTORY)/progs/demos/README \ - $(DIRECTORY)/progs/osdemos/Makefile \ - $(DIRECTORY)/progs/osdemos/*.c \ - $(DIRECTORY)/progs/xdemos/Makefile* \ - $(DIRECTORY)/progs/xdemos/descrip.mms \ - $(DIRECTORY)/progs/xdemos/*.[chf] \ - $(DIRECTORY)/progs/redbook/Makefile* \ - $(DIRECTORY)/progs/redbook/README \ - $(DIRECTORY)/progs/redbook/*.[ch] \ - $(DIRECTORY)/progs/samples/Makefile* \ - $(DIRECTORY)/progs/samples/README \ - $(DIRECTORY)/progs/samples/*.c \ - $(DIRECTORY)/progs/windml/Makefile.ugl \ - $(DIRECTORY)/progs/windml/*.c \ - $(DIRECTORY)/progs/windml/*.bmp \ - $(DIRECTORY)/progs/ggi/*.c \ - $(DIRECTORY)/windows/VC6/progs/demos/*.dsp \ - $(DIRECTORY)/windows/VC6/progs/progs.dsw \ - $(DIRECTORY)/windows/VC7/progs/demos/*.vcproj \ - $(DIRECTORY)/windows/VC7/progs/progs.sln - -GLUT_FILES = \ - $(DIRECTORY)/include/GL/glut.h \ - $(DIRECTORY)/include/GL/glutf90.h \ - $(DIRECTORY)/src/glut/glx/Makefile* \ - $(DIRECTORY)/src/glut/glx/depend \ - $(DIRECTORY)/src/glut/glx/*def \ - $(DIRECTORY)/src/glut/glx/descrip.mms \ - $(DIRECTORY)/src/glut/glx/mms_depend \ - $(DIRECTORY)/src/glut/glx/*.[ch] \ - $(DIRECTORY)/src/glut/beos/*.[ch] \ - $(DIRECTORY)/src/glut/beos/*.cpp \ - $(DIRECTORY)/src/glut/beos/Makefile \ - $(DIRECTORY)/src/glut/dos/*.[ch] \ - $(DIRECTORY)/src/glut/dos/Makefile.DJ \ - $(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \ - $(DIRECTORY)/src/glut/ggi/*.[ch] \ - $(DIRECTORY)/src/glut/ggi/Makefile \ - $(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \ - $(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj - -DEPEND_FILES = \ - $(TOP)/src/mesa/depend \ - $(TOP)/src/glw/depend \ - $(TOP)/src/glut/glx/depend \ - $(TOP)/src/glu/sgi/depend - - -LIB_FILES = $(MAIN_FILES) $(DRI_FILES) $(SGI_GLU_FILES) $(GLW_FILES) - - -# Everything for new a Mesa release: -tarballs: rm_depend lib_gz demo_gz glut_gz lib_bz2 demo_bz2 glut_bz2 lib_zip demo_zip glut_zip md5 - - -rm_depend: - @for dep in $(DEPEND_FILES) ; do \ - rm -f $$dep ; \ - touch $$dep ; \ - done - -lib_gz: - rm -f configs/current ; \ - cd .. ; \ - tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \ - gzip $(LIB_NAME).tar ; \ - mv $(LIB_NAME).tar.gz $(DIRECTORY) - -demo_gz: - cd .. ; \ - tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \ - gzip $(DEMO_NAME).tar ; \ - mv $(DEMO_NAME).tar.gz $(DIRECTORY) - -glut_gz: - cd .. ; \ - tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \ - gzip $(GLUT_NAME).tar ; \ - mv $(GLUT_NAME).tar.gz $(DIRECTORY) - -lib_bz2: - rm -f configs/current ; \ - cd .. ; \ - tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \ - bzip2 $(LIB_NAME).tar ; \ - mv $(LIB_NAME).tar.bz2 $(DIRECTORY) - -demo_bz2: - cd .. ; \ - tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \ - bzip2 $(DEMO_NAME).tar ; \ - mv $(DEMO_NAME).tar.bz2 $(DIRECTORY) - -glut_bz2: - cd .. ; \ - tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \ - bzip2 $(GLUT_NAME).tar ; \ - mv $(GLUT_NAME).tar.bz2 $(DIRECTORY) - -lib_zip: - rm -f configs/current ; \ - rm -f $(LIB_NAME).zip ; \ - cd .. ; \ - zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \ - mv $(LIB_NAME).zip $(DIRECTORY) - -demo_zip: - rm -f $(DEMO_NAME).zip ; \ - cd .. ; \ - zip -qr $(DEMO_NAME).zip $(DEMO_FILES) ; \ - mv $(DEMO_NAME).zip $(DIRECTORY) - -glut_zip: - rm -f $(GLUT_NAME).zip ; \ - cd .. ; \ - zip -qr $(GLUT_NAME).zip $(GLUT_FILES) ; \ - mv $(GLUT_NAME).zip $(DIRECTORY) - -md5: - @-md5sum $(LIB_NAME).tar.gz - @-md5sum $(LIB_NAME).tar.bz2 - @-md5sum $(LIB_NAME).zip - @-md5sum $(DEMO_NAME).tar.gz - @-md5sum $(DEMO_NAME).tar.bz2 - @-md5sum $(DEMO_NAME).zip - @-md5sum $(GLUT_NAME).tar.gz - @-md5sum $(GLUT_NAME).tar.bz2 - @-md5sum $(GLUT_NAME).zip diff --git a/nx-X11/extras/Mesa_6.4.2/Makefile.DJ b/nx-X11/extras/Mesa_6.4.2/Makefile.DJ deleted file mode 100644 index 78ebf43efb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/Makefile.DJ +++ /dev/null @@ -1,93 +0,0 @@ -# Mesa 3-D graphics library -# Version: 4.0 -# -# Copyright (C) 1999 Brian Paul All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -# DOS/DJGPP makefile v1.6 for Mesa -# -# Copyright (C) 2002 - Daniel Borca -# Email : dborca@users.sourceforge.net -# Web : http://www.geocities.com/dborca - - -# -# Available options: -# -# Environment variables: -# GLU=[mesa|sgi] specify GLU directory; can be `sgi' (requires GNU/C++) -# or `mesa'. -# default = mesa -# GLIDE path to Glide3 SDK; used with FX. -# default = $(TOP)/glide3 -# FX=1 build for 3dfx Glide3. Note that this disables -# compilation of most DMesa code and requires fxMesa. -# As a consequence, you'll need the DJGPP Glide3 -# library to build any application. -# default = no -# X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow). -# default = no -# -# Targets: -# all: build everything -# libgl: build GL -# libglu: build GLU -# libglut: build GLUT -# clean: remove object files -# realclean: remove all generated files -# - - - -.PHONY : all libgl libglu libglut clean realclean - -GLU ?= mesa - -CFLAGS = -Wall -W -pedantic -CFLAGS += -O2 -ffast-math - -export CFLAGS - -ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) -UNLINK = del $(subst /,\,$(1)) -else -UNLINK = $(RM) $(1) -endif - -all: libgl libglu libglut - -libgl: lib - $(MAKE) -f Makefile.DJ -C src/mesa -libglu: lib - $(MAKE) -f Makefile.DJ -C src/glu/$(GLU) -libglut: lib - $(MAKE) -f Makefile.DJ -C src/glut/dos - -lib: - mkdir lib - -clean: - $(MAKE) -f Makefile.DJ clean -C src/mesa - $(MAKE) -f Makefile.DJ clean -C src/glu/mesa - $(MAKE) -f Makefile.DJ clean -C src/glu/sgi - $(MAKE) -f Makefile.DJ clean -C src/glut/dos - -realclean: clean - -$(call UNLINK,lib/*.a) - -$(call UNLINK,lib/*.dxe) diff --git a/nx-X11/extras/Mesa_6.4.2/Makefile.mgw b/nx-X11/extras/Mesa_6.4.2/Makefile.mgw deleted file mode 100644 index 70c264a8d8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/Makefile.mgw +++ /dev/null @@ -1,88 +0,0 @@ -# Mesa 3-D graphics library -# Version: 4.0 -# -# Copyright (C) 1999 Brian Paul All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -# MinGW makefile v1.2 for Mesa -# -# Copyright (C) 2002 - Daniel Borca -# Email : dborca@users.sourceforge.net -# Web : http://www.geocities.com/dborca - - -# -# Available options: -# -# Environment variables: -# GLIDE path to Glide3 SDK; used with FX. -# default = $(TOP)/glide3 -# FX=1 build for 3dfx Glide3. Note that this disables -# compilation of most WMesa code and requires fxMesa. -# As a consequence, you'll need the Win32 Glide3 -# library to build any application. -# default = no -# ICD=1 build the installable client driver interface -# (windows opengl driver interface) -# default = no -# X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow). -# default = no -# -# Targets: -# all: build everything -# libgl: build GL -# clean: remove object files -# realclean: remove all generated files -# - - - -.PHONY : all libgl clean realclean - -ifeq ($(ICD),1) - # when -std=c99 mingw will not define WIN32 - CFLAGS = -Wall -W -Werror -else - # I love c89 - CFLAGS = -Wall -W -pedantic -endif -CFLAGS += -O2 -ffast-math - -export CFLAGS - -ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) -UNLINK = del $(subst /,\,$(1)) -else -UNLINK = $(RM) $(1) -endif - -all: libgl - -libgl: lib - $(MAKE) -f Makefile.mgw -C src/mesa - -lib: - mkdir lib - -clean: - $(MAKE) -f Makefile.mgw clean -C src/mesa - -realclean: clean - -$(call UNLINK,lib/*.a) - -$(call UNLINK,lib/*.dll) diff --git a/nx-X11/extras/Mesa_6.4.2/bin/installmesa b/nx-X11/extras/Mesa_6.4.2/bin/installmesa deleted file mode 100755 index 8d1ee992dc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/bin/installmesa +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh - -# -# Simple shell script for installing Mesa's header and library files. -# If the copy commands below don't work on a particular system (i.e. the -# -f or -d flags), we may need to branch on `uname` to do the right thing. -# - - -TOP=. - -INCLUDE_DIR="/usr/local/include" -LIB_DIR="/usr/local/lib" - -if [ "x$#" = "x0" ] ; then -echo -echo "***** Mesa installation - You may need root privileges to do this *****" -echo -echo "Default directory for header files is:" ${INCLUDE_DIR} -echo "Enter new directory or press to accept this default." - -read INPUT -if [ "x${INPUT}" != "x" ] ; then - INCLUDE_DIR=${INPUT} -fi - -echo -echo "Default directory for library files is:" ${LIB_DIR} -echo "Enter new directory or press to accept this default." - -read INPUT -if [ "x${INPUT}" != "x" ] ; then - LIB_DIR=${INPUT} -fi - -echo -echo "About to install Mesa header files (GL/*.h) in: " ${INCLUDE_DIR}/GL -echo "and Mesa library files (libGL.*, etc) in: " ${LIB_DIR} -echo "Press to continue, or -C to abort." - -read INPUT - -else -INCLUDE_DIR=$1/include -LIB_DIR=$1/lib -fi - -# flags: -# -f = force -# -d = preserve symlinks (does not work on BSD) - -if [ `uname` = "FreeBSD" ] ; then - CP_FLAGS="-f" -elif [ `uname` = "Darwin" ] ; then - CP_FLAGS="-f" -else - CP_FLAGS="-fd" -fi - - -set -v - -mkdir ${INCLUDE_DIR} -mkdir ${INCLUDE_DIR}/GL -mkdir ${INCLUDE_DIR}/GLES -mkdir ${LIB_DIR} -cp -f ${TOP}/include/GL/*.h ${INCLUDE_DIR}/GL -cp -f ${TOP}/src/glw/*.h ${INCLUDE_DIR}/GL -# NOT YET: cp -f ${TOP}/include/GLES/*.h ${INCLUDE_DIR}/GLES -cp ${CP_FLAGS} ${TOP}/lib*/lib* ${LIB_DIR} - -echo "Done." diff --git a/nx-X11/extras/Mesa_6.4.2/bin/mklib b/nx-X11/extras/Mesa_6.4.2/bin/mklib deleted file mode 100755 index 58c4fa7050..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/bin/mklib +++ /dev/null @@ -1,698 +0,0 @@ -#!/bin/sh - -# Make a shared library. -# This script should be useful for projects other than Mesa. -# Improvements/fixes are welcome. - - -# Copyright (C) 1999-2005 Brian Paul All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -# -# Option defaults -# -LIBNAME="" -MAJOR=1 -MINOR=0 -PATCH="" -DEPS="" -LINK="" -CPLUSPLUS=0 -STATIC=0 -INSTALLDIR="." -ARCH="auto" -ARCHOPT="" -NOPREFIX=0 -EXPORTS="" - - -# -# Parse arguments -# -while true -do - case $1 in - '-h' | '--help') - echo 'Usage: mklib [options] objects' - echo 'Create a shared library from object files.' - echo ' -o LIBRARY specifies the name of the resulting library, without' - echo ' the leading "lib" or any suffix.' - echo ' (eg: "-o GL" might result in "libGL.so" being made)' - echo ' -major N specifies major version number (default is 1)' - echo ' -minor N specifies minor version number (default is 0)' - echo ' -patch N specifies patch version number (default is 0)' - echo ' -lLIBRARY specifies a dependency on LIBRARY' - echo ' -LDIR search in DIR for library dependencies' - echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)' - echo ' Not observed on all systems at this time.' - echo ' -cplusplus link with C++ runtime' - echo ' -static make a static library (default is dynamic/shared)' - echo ' -install DIR put resulting library file(s) in DIR' - echo ' -arch ARCH override using `uname` to determine host system' - echo ' -archopt OPT specify an extra achitecture-specific option OPT' - echo " -noprefix don't prefix library name with 'lib' nor add any suffix" - echo ' -exports FILE only export the symbols listed in FILE' - echo ' -h, --help display this information and exit' - exit 1 - ;; - '-o') - shift 1; - LIBNAME=$1 - ;; - '-major') - shift 1; - MAJOR=$1 - ;; - '-minor') - shift 1; - MINOR=$1 - ;; - '-patch') - shift 1; - PATCH=$1 - ;; - '-linker') - shift 1; - LINK=$1 - ;; - -l*) - DEPS="$DEPS $1" - ;; - -L*) - DEPS="$DEPS $1" - ;; - '-cplusplus') - CPLUSPLUS=1 - ;; - '-static') - STATIC=1 - ;; - '-install') - shift 1; - INSTALLDIR=$1 - ;; - '-arch') - shift 1; - ARCH=$1 - ;; - '-archopt') - shift 1; - ARCHOPT=$1 - ;; - '-noprefix') - NOPREFIX=1 - ;; - '-exports') - shift 1; - EXPORTS=$1 - ;; - -*) - echo "mklib: Unknown option: " $1 ; - exit 1 - ;; - *) - # This should be the first object file, stop parsing - break - esac - shift 1 -done -OBJECTS=$@ - - -if [ ${ARCH} = "auto" ] ; then - ARCH=`uname` -fi - - -# -# Error checking -# -if [ "x${LIBNAME}" = "x" ] ; then - echo "mklib: Error: no library name specified" - exit 1 -fi -if [ "x${OBJECTS}" = "x" ] ; then - echo "mklib: Error: no object files specified" - exit 1 -fi - - -# -# Debugging info -# -if [ ] ; then - echo "-----------------" - echo ARCH is $ARCH - echo LIBNAME is $LIBNAME - echo MAJOR is $MAJOR - echo MINOR is $MINOR - echo PATCH is $PATCH - echo DEPS are $DEPS - echo "EXPORTS in" $EXPORTS - echo "-----------------" -fi - - -# -# OK, make the library now -# -case $ARCH in - - 'Linux' | 'OpenBSD') - # we assume gcc - - if [ "x$LINK" = "x" ] ; then - # -linker was not specified so set default link command now - if [ $CPLUSPLUS = 1 ] ; then - LINK=g++ - else - LINK=gcc - fi - fi - - if [ $NOPREFIX = 1 ] ; then - # No "lib" or ".so" part - echo "mklib: Making" $ARCH "shared library: " ${LIBNAME} - #OPTS="-shared -Wl,-soname,${LIBNAME}" # soname??? - OPTS="-shared" - - # Check if objects are 32-bit and we're running in 64-bit - # environment. If so, pass -m32 flag to linker. - set ${OBJECTS} - ABI32=`file $1 | grep 32-bit` - if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then - OPTS="-m32 ${OPTS}" - fi - - rm -f ${LIBNAME} - # make lib - ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} - # finish up - FINAL_LIBS="${LIBNAME}" - elif [ $STATIC = 1 ] ; then - LIBNAME="lib${LIBNAME}" # prefix with "lib" - echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a - LINK="ar" - OPTS="-ru" - # make lib - ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS} - ranlib ${LIBNAME}.a - # finish up - FINAL_LIBS=${LIBNAME}.a - else - LIBNAME="lib${LIBNAME}" # prefix with "lib" - if [ $ARCH = 'Linux' ] ; then - OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}" - else - OPTS="-shared -Wl,-soname,${LIBNAME}.so.${MAJOR}" - fi - if [ $EXPORTS ] ; then - #OPTS="${OPTS} -Xlinker --retain-symbols-file ${EXPORTS}" - # Make the 'exptmp' file for --version-script option - echo "VERSION_${MAJOR}.${MINOR} {" > exptmp - echo "global:" >> exptmp - sed 's/$/;/' ${EXPORTS} >> exptmp - echo "local:" >> exptmp - echo "*;" >> exptmp - echo "};" >> exptmp - OPTS="${OPTS} -Xlinker --version-script=exptmp" - # exptmp is removed below - fi - - # Check if objects are 32-bit and we're running in 64-bit - # environment. If so, pass -m32 flag to linker. - set ${OBJECTS} - ABI32=`file $1 | grep 32-bit` - if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then - OPTS="-m32 ${OPTS}" - fi - - if [ x${PATCH} = "x" ] ; then - VERSION="${MAJOR}.${MINOR}" - else - VERSION="${MAJOR}.${MINOR}.${PATCH}" - fi - - echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}.so.${VERSION} - - # rm any old libs - rm -f ${LIBNAME}.so.${VERSION} - rm -f ${LIBNAME}.so.${MAJOR} - rm -f ${LIBNAME}.so - - # make lib - ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS} - # make usual symlinks - ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} - ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so - # finish up - FINAL_LIBS="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so" -# rm -f exptmp - fi - ;; - - 'SunOS') - if [ $STATIC = 1 ] ; then - LIBNAME="lib${LIBNAME}.a" - echo "mklib: Making SunOS static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar -ruv ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} - else - LIBNAME="lib${LIBNAME}.so" - echo "mklib: Making SunOS shared library: " ${LIBNAME} - # XXX OPTS for gcc should be -shared, but that doesn't work. - # Using -G does work though. - OPTS="-G" - if [ "x$LINK" = "x" ] ; then - # -linker was not specified, choose default linker now - if [ $CPLUSPLUS = 1 ] ; then - # determine linker and options for C++ code - if [ `which c++` ] ; then - # use Sun c++ - LINK="c++" - elif [ `type g++` ] ; then - # use g++ - LINK="g++" - else - echo "mklib: warning: can't find C++ comiler, trying CC." - LINK="CC" - fi - else - # use native Sun linker for C code - LINK="ld" - fi - fi - echo "mklib: linker is" ${LINK} ${OPTS} - rm -f ${LIBNAME}.${MAJOR} ${LIBNAME} - ${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS} - ln -s ${LIBNAME}.${MAJOR} ${LIBNAME} - FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}" - fi - ;; - - 'FreeBSD') - # we assume gcc - - if [ "x$LINK" = "x" ] ; then - # -linker was not specified so set default link command now - if [ $CPLUSPLUS = 1 ] ; then - LINK=g++ - else - LINK=gcc - fi - fi - - if [ $NOPREFIX = 1 ] ; then - # No "lib" or ".so" part - echo "mklib: Making FreeBSD shared library: " ${LIBNAME} - OPTS="-shared" - rm -f ${LIBNAME} - ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} - FINAL_LIBS=${LIBNAME} - elif [ $STATIC = 1 ] ; then - STLIB="lib${LIBNAME}.a" - echo "mklib: Making FreeBSD static library: " ${STLIB} - rm -f ${STLIB} - ar cq ${STLIB} ${OBJECTS} - ranlib ${STLIB} - FINAL_LIBS=${STLIB} - else - SHLIB="lib${LIBNAME}.so.${MAJOR}" - OPTS="-shared -Wl,-soname,${SHLIB}" - echo "mklib: Making FreeBSD shared library: " ${SHLIB} - rm -f ${SHLIB} - ${LINK} ${OPTS} -o ${SHLIB} ${OBJECTS} ${DEPS} - ln -sf ${SHLIB} "lib${LIBNAME}.so" - FINAL_LIBS="${SHLIB} lib${LIBNAME}.so" - fi - ;; - - 'NetBSD') - if [ $STATIC = 1 ] ; then - LIBNAME="lib${LIBNAME}_pic.a" - echo "mklib: Making NetBSD PIC static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar cq ${LIBNAME} ${OBJECTS} - ranlib ${LIBNAME} - FINAL_LIBS=${LIBNAME} - else - LIBNAME="lib${LIBNAME}.so.${MAJOR}.${MINOR}" - echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME} - rm -f ${LIBNAME} - ld -x -Bshareable -Bforcearchive -o ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} - fi - ;; - - 'IRIX' | 'IRIX64') - if [ $STATIC = 1 ] ; then - LIBNAME="lib${LIBNAME}.a" - rm -f ${LIBNAME} - ar rc ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} - else - LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so" - # XXX we should run 'file' on the first object file to determine - # if it's o32, n32 or 64 format, as we do for Linux above. - if [ $ARCHOPT = "64" ] ; then - # 64-bit ABI - OPTS="-64 -shared -all" - echo "mklib: Making IRIX 64-bit shared library: " ${LIBNAME} - elif [ $ARCHOPT = "o32" ] ; then - # old 32-bit ABI - OPTS="-32 -shared -all" - echo "mklib: Making IRIX o32-bit shared library: " ${LIBNAME} - else - # new 32-bit ABI - OPTS="-n32 -shared -all" - echo "mklib: Making IRIX n32-bit shared library: " ${LIBNAME} - fi - if [ $CPLUSPLUS = 1 ] ; then - LINK="CC" - else - LINK="ld" - fi - ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} - FINAL_LIBS=${LIBNAME} - fi - ;; - - 'linux-cygwin') - LIBNAME="lib${LIBNAME}.a" - echo "mklib: Making linux-cygwin library: " ${LIBNAME} - rm -f ${LIBNAME} - gnuwin32ar ruv ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} - ;; - - 'HP-UX') - if [ $STATIC = 1 ] ; then - LIBNAME="lib${LIBNAME}.a" - echo "mklib: Making HP-UX static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar -ruv ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} - else - RUNLIB="lib${LIBNAME}.${MAJOR}" - DEVLIB="lib${LIBNAME}.sl" - echo "mklib: Making HP-UX shared library: " ${RUNLIB} ${DEVLIB} - ld -b -o ${RUNLIB} +b ${RUNLIB} ${OBJECTS} ${DEPS} - ln -s ${RUNLIB} ${DEVLIB} - FINAL_LIBS="${RUNLIB} ${DEVLIB}" - fi - ;; - - 'AIX' | 'AIX64') - if [ $ARCH = "AIX64" ] ; then - X64="-X64" - fi - - if [ $STATIC = 1 ] ; then - LIBNAME="lib${LIBNAME}.a" - echo "mklib: Making AIX static library: " ${LIBNAME} - ar -ruv ${X64} ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} - else - EXPFILE="lib${LIBNAME}.exp" - OFILE=shr.o #Want to be consistent with the IBM libGL.a - LIBNAME="lib${LIBNAME}.a" # shared objects are still stored in the .a libraries - if [ $ARCH = "AIX64" ] ; then - OPTS="-bE:${EXPFILE} -bM:SRE -bnoentry -q64" - else - OPTS="-bE:${EXPFILE} -bM:SRE -bnoentry" - fi - rm -f ${EXPFILE} ${OFILE} - NM="/bin/nm -eC ${X64}" - echo "#! /usr/lib/${LIBNAME}" > ${EXPFILE} - ${NM} ${OBJECTS} | awk '{ - if ((($2 == "T") || ($2 == "D") || ($2 == "B")) \ - && ( substr($1,1,1) != ".")) { - if (substr ($1, 1, 7) != "__sinit" && - substr ($1, 1, 7) != "__sterm") { - if (substr ($1, 1, 5) == "__tf1") - print (substr ($1, 7)) - else if (substr ($1, 1, 5) == "__tf9") - print (substr ($1, 15)) - else - print $1 - } - } - }' | sort -u >> ${EXPFILE} - cc ${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS} - ar ${X64} -r ${LIBNAME} ${OFILE} - FINAL_LIBS="${LIBNAME}" - fi - ;; - - 'OpenSTEP') - LIBNAME="lib${LIBNAME}.a" - echo "mklib: Making OpenSTEP static library: " ${LIBNAME} - libtool -static -o ${LIBNAME} - ${OBJECTS} - FINAL_LIBS=${LIBNAME} - ;; - - 'OSF1') - if [ $STATIC = 1 ] ; then - LIBNAME="lib${LIBNAME}.a" - echo "mklib: Making OSF/1 static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar -ruv ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} - else - VERSION="${MAJOR}.${MINOR}" - LIBNAME="lib${LIBNAME}.so" - echo "mklib: Making OSF/1 shared library: " ${LIBNAME} - if [ "x$LINK" = "x" ] ; then - if [ $CPLUSPLUS = 1 ] ; then - LINK=cxx - else - LINK=cc - fi - fi - rm -f ${LIBNAME}.${VERSION} - ${LINK} -o ${LIBNAME}.${VERSION} -shared -set_version ${VERSION} -soname ${LIBNAME}.${VERSION} -expect_unresolved \* -all ${OBJECTS} ${DEPS} - ln -sf ${LIBNAME}.${VERSION} ${LIBNAME} - FINAL_LIBS="${LIBNAME} ${LIBNAME}.${VERSION}" - fi - ;; - - 'Darwin') - if [ $STATIC = 1 ] ; then - LIBNAME="lib${LIBNAME}.a" - echo "mklib: Making Darwin static library: " ${LIBNAME} - LINK="ar" - OPTS="-ruv" - ${LINK} ${OPTS} ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} - else - LIBNAME="lib${LIBNAME}.dylib" - echo "mklib: Making Darwin shared library: " ${LIBNAME} - FLAGS="-dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0" - if [ $CPLUSPLUS = 1 ] ; then - LINK="g++" - else - LINK="cc" - fi - ${LINK} ${FLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} - FINAL_LIBS=${LIBNAME} - fi - ;; - - 'LynxOS') - LIBNAME="lib${LIBNAME}.a" - echo "mklib: Making LynxOS static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar ru ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} - ;; - - 'BeOS') - if [ $STATIC = 1 ] ; then - LIBNAME="lib${LIBNAME}.a" - echo "mklib: Making BeOS static library: " ${LIBNAME} - ar -cru "${LIBNAME}" ${OBJECTS} - else - LIBNAME="lib${LIBNAME}.so" - echo "mklib: Making BeOS shared library: " ${LIBNAME} - gcc -nostart -Xlinker "-soname=${LIBNAME}" -L/Be/develop/lib/x86 -lbe ${DEPS} ${OBJECTS} -o "${LIBNAME}" - mimeset -f "${LIBNAME}" - # XXX remove the Mesa3D stuff here since mklib isn't mesa-specific. - setversion "${LIBNAME}" -app ${MAJOR} ${MINOR} ${PATCH} -short "Powered by Mesa3D!" -long "Powered by Mesa3D!" - fi - FINAL_LIBS=${LIBNAME} - ;; - - 'QNX') - LIBNAME="lib${LIBNAME}.a" - echo "mklib: Making QNX library: " ${LIBNAME} - wlib ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} - ;; - - 'MorphOS') - LIBNAME="lib${LIBNAME}.a" - echo "mklib: Making MorphOS library: " ${LIBNAME} - ppc-morphos-ar rc ${LIBNAME} ${OBJECTS} - FINAL_LIBS="${LIBNAME}" - ;; - - 'icc') - # Intel C compiler - # This should get merged into the Linux code, above, since this isn't - # really a different architecture. - LIBNAME="lib${LIBNAME}" # prefix with "lib" - - if [ $STATIC = 1 ] ; then - echo "mklib: Making Intel ICC static library: " ${LIBNAME}.a - LINK="ar" - OPTS="-ruv" - # make lib - ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS} - # finish up - FINAL_LIBS="${LIBNAME}.a" - else - OPTS="-shared" - VERSION="${MAJOR}.${MINOR}.${PATCH}" - echo "mklib: Making Intel ICC shared library: " ${LIBNAME}.so.${VERSION} - - if [ $CPLUSPLUS = 1 ] ; then - LINK="icc" - else - LINK="icc" - fi - # rm any old libs - rm -f ${LIBNAME}.so.${VERSION} - rm -f ${LIBNAME}.so.${MAJOR} - rm -f ${LIBNAME}.so - # make lib - ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS} - # make usual symlinks - ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} - ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so - # finish up - FINAL_LIBS="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so" - fi - ;; - - 'aix-gcc') - # AIX with gcc - if [ $STATIC = 1 ] ; then - LIBNAME="lib${LIBNAME}.a" - echo "mklib: Making AIX GCC static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar ru ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} - else - LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so" - echo "mklib: Making AIX GCC shared library: " ${LIBNAME} - # remove old lib - rm -f ${LIBNAME} - # make the lib - gcc -shared -Wl,-G ${OBJECTS} ${DEPS} -o ${LIBNAME} - # NOTE: the application linking with this library must specify - # the -Wl,-brtl flags to gcc - FINAL_LIBS=${LIBNAME} - fi - ;; - - 'ultrix') - # XXX untested - if [ $STATIC = 0 ] ; then - echo "mklib: Warning shared libs not supported on Ultrix" - fi - LIBNAME="lib${LIBNAME}.a" - echo "mklib: Making static library for Ultrix: " ${LIBNAME} - rm -f ${LIBNAME} - ar ru ${LIBNAME} ${OBJECTS} - FINAL_LIBS="${LIBNAME}" - ;; - - CYGWIN*) - # GCC-based environment - CYGNAME="cyg${LIBNAME}" # prefix with "cyg" - LIBNAME="lib${LIBNAME}" # prefix with "lib" - - if [ $STATIC = 1 ] ; then - echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a - LINK="ar" - OPTS="-ru" - # make lib - ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS} - ranlib ${LIBNAME}.a - # finish up - FINAL_LIBS=${LIBNAME}.a - else - OPTS="-shared -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a" - echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}-${MAJOR}.dll - - if [ $CPLUSPLUS = 1 ] ; then - LINK="g++" - else - LINK="gcc" - fi - - # rm any old libs - rm -f ${LIBNAME}-${MAJOR}.dll - rm -f ${LIBNAME}.dll.a - rm -f ${LIBNAME}.a - - # make lib - ${LINK} ${OPTS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS} - # make usual symlinks - ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a - # finish up - FINAL_LIBS="${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a" - # special case for installing in bin - FINAL_BINS="${CYGNAME}-${MAJOR}.dll" - fi - ;; - - 'example') - # If you're adding support for a new architecture, you can - # start with this: - if [ $STATIC = 1 ] ; then - LIBNAME="lib${LIBNAME}.a" - echo "mklib: Making static library for example arch: " ${LIBNAME} - rm -f ${LIBNAME} - ar rv ${LIBNAME} ${OBJECTS} - FINAL_LIBS="${LIBNAME}" - else - LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so" - echo "mklib: Making shared library for example arch: " ${LIBNAME} - ld -o ${LIBNAME} ${OBJECTS} ${DEPS} - FINAL_LIBS="${LIBNAME}" - fi - ;; - - *) - echo "mklib: ERROR: Don't know how to make a static/shared library for" ${ARCH} - echo "mklib: Please add necessary commands to mklib script." - ;; -esac - - -# -# Put library files into installation directory if specified. -# -if [ ${INSTALLDIR} != "." ] ; then - echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR} - mv ${FINAL_LIBS} ${INSTALLDIR}/ -fi diff --git a/nx-X11/extras/Mesa_6.4.2/configs/aix b/nx-X11/extras/Mesa_6.4.2/configs/aix deleted file mode 100644 index fe8e48cd65..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/aix +++ /dev/null @@ -1,28 +0,0 @@ -# Configuration for AIX, dynamic libs - -include $(TOP)/configs/default - -CONFIG_NAME = aix - -# Compiler and flags -CC = cc -CXX = xlC - -CFLAGS = -O -DAIXV3 -CXXFLAGS = -O -DAIXV3 -MKLIB_OPTIONS = - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -GL_LIB_DEPS = -lX11 -lXext -lm -GLU_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lm -lC -GLUT_LIB_DEPS = -L$(TOP)/lib -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -lX11 -lm -GLW_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lXt -lX11 -OSMESA_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -APP_LIB_DEPS = -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lC - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/aix-64 b/nx-X11/extras/Mesa_6.4.2/configs/aix-64 deleted file mode 100644 index 0d98475293..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/aix-64 +++ /dev/null @@ -1,28 +0,0 @@ -# Configuration for AIX 64-bit, dynamic libs - -include $(TOP)/configs/default - -CONFIG_NAME = aix-64 - -# Compiler and flags -CC = xlc -CXX = xlC - -CFLAGS = -q64 -qmaxmem=16384 -O -DAIXV3 -CXXFLAGS = -q64 -qmaxmem=16384 -O -DAIXV3 -MKLIB_OPTIONS = -arch AIX64 - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -GL_LIB_DEPS = -lX11 -lXext -lm -GLU_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lm -lC -GLUT_LIB_DEPS = -L$(TOP)/lib -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -lX11 -lm -GLW_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lXt -lX11 -OSMESA_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -APP_LIB_DEPS = -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lC - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/aix-gcc b/nx-X11/extras/Mesa_6.4.2/configs/aix-gcc deleted file mode 100644 index 5f10bf25dc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/aix-gcc +++ /dev/null @@ -1,19 +0,0 @@ -# Configuration for AIX with gcc - -include $(TOP)/configs/default - -CONFIG_NAME = aix-gcc - -# Compiler and flags -CC = gcc -CXX = g++ - -CFLAGS = -O2 -DAIXV3 -CXXFLAGS = -O2 -DAIXV3 - -MKLIB_OPTIONS = -arch aix-gcc -GL_LIB_DEPS = -lX11 -lXext -lm -GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -GLUT_LIB_DEPS = -L$(LIB_DIR -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -APP_LIB_DEPS = -L$(LIB_DIR) -Wl,-brtl -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext -lXmu -lXi - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/aix-static b/nx-X11/extras/Mesa_6.4.2/configs/aix-static deleted file mode 100644 index f6f086edb6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/aix-static +++ /dev/null @@ -1,23 +0,0 @@ -# Configuration for AIX, static libs - -include $(TOP)/configs/default - -CONFIG_NAME = aix-static - -# Compiler and flags -CC = cc -CXX = xlC - -CFLAGS = -O -DAIXV3 -CXXFLAGS = -O -DAIXV3 -MKLIB_OPTIONS = -static - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -lXext -lXmu -lXi -lm - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/beos b/nx-X11/extras/Mesa_6.4.2/configs/beos deleted file mode 100644 index 1d2eaa9599..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/beos +++ /dev/null @@ -1,99 +0,0 @@ -# Configuration for BeOS -# Written by Philippe Houdoin - -include $(TOP)/configs/default - -CONFIG_NAME = beos - - -DEFINES = \ - -DBEOS_THREADS - -MACHINE=$(shell uname -m) -ifeq ($(MACHINE), BePC) - CPU = x86 -else - CPU = ppc -endif - -ifeq ($(CPU), x86) - # BeOS x86 settings - - DEFINES += \ - -DGNU_ASSEMBLER \ - -DUSE_X86_ASM \ - -DUSE_MMX_ASM \ - -DUSE_3DNOW_ASM \ - -DUSE_SSE_ASM - - ASM_SOURCES = $(X86_SOURCES) $(X86_API) - - CC = gcc - CXX = g++ - LD = gcc - - CFLAGS = \ - -Wall -Wno-multichar -Wno-ctor-dtor-privacy \ - $(DEFINES) - - CXXFLAGS = $(CFLAGS) - - LDFLAGS += -Xlinker - - ifdef DEBUG - CFLAGS += -g -O0 - LDFLAGS += -g - DEFINES += -DDEBUG - else - CFLAGS += -O3 - endif - - GLUT_CFLAGS = -fexceptions - -else - # BeOS PPC settings - - CC = mwcc - CXX = $(CC) - LD = mwldppc - - CFLAGS = \ - -w on -requireprotos \ - $(DEFINES) - - CXXFLAGS = $(CFLAGS) - - LDFLAGS += \ - -export pragma \ - -init _init_routine_ \ - -term _term_routine_ \ - -lroot \ - /boot/develop/lib/ppc/glue-noinit.a \ - /boot/develop/lib/ppc/init_term_dyn.o \ - /boot/develop/lib/ppc/start_dyn.o - - ifdef DEBUG - CFLAGS += -g -O0 - CXXFLAGS += -g -O0 - LDFLAGS += -g - else - CFLAGS += -O7 - CXXFLAGS += -O7 - endif - - GLUT_CFLAGS = -fexceptions -endif - -# Directories -SRC_DIRS = mesa glu glut/beos -GLU_DIRS = sgi -DRIVER_DIRS = beos -PROGRAM_DIRS = beos samples redbook demos tests - -# Library/program dependencies -GL_LIB_DEPS = -OSMESA_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -GLU_LIB_DEPS = -GLUT_LIB_DEPS = -lgame -L$(LIB_DIR) -l$(GL_LIB) -APP_LIB_DEPS = -lbe -L$(LIB_DIR) -l$(GL_LIB) -l$(GLUT_LIB) - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/darwin b/nx-X11/extras/Mesa_6.4.2/configs/darwin deleted file mode 100644 index 0c8a6ec47a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/darwin +++ /dev/null @@ -1,29 +0,0 @@ -# Configuration for Darwin / MacOS X, making dynamic libs - -include $(TOP)/configs/default - -CONFIG_NAME = darwin - -# Compiler and flags -CC = cc -CXX = cc -CFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin -CXXFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin - -# Library names (actual file names) -GL_LIB_NAME = libGL.dylib -GLU_LIB_NAME = libGLU.dylib -GLUT_LIB_NAME = libglut.dylib -GLW_LIB_NAME = libGLw.dylib -OSMESA_LIB_NAME = libOSMesa.dylib - -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL -GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -GLUT_LIB_DEPS = -L$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext -GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib -APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm - -# omit glw lib for now: -SRC_DIRS = mesa glu glut/glx - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/darwin-static b/nx-X11/extras/Mesa_6.4.2/configs/darwin-static deleted file mode 100644 index c7f9c5f06b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/darwin-static +++ /dev/null @@ -1,24 +0,0 @@ -# Configuration for Darwin / MacOS X, making static libs - -include $(TOP)/configs/darwin - -CONFIG_NAME = darwin-static - -# Compiler and flags -CFLAGS = -I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin -CXXFLAGS = -I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin -MKLIB_OPTIONS = -static - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -OSMESA_LIB_DEPS = -GLU_LIB_DEPS = -GLUT_LIB_DEPS = -GLW_LIB_DEPS = -APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/default b/nx-X11/extras/Mesa_6.4.2/configs/default deleted file mode 100644 index 6b2d2339fe..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/default +++ /dev/null @@ -1,74 +0,0 @@ -# Default/template configuration - -# This is included by other config files which may override some -# of these variables. - -CONFIG_NAME = default - -# Version info -MESA_MAJOR=6 -MESA_MINOR=4 -MESA_TINY=2 - -# external projects. This should be useless now that we use libdrm. -DRM_SOURCE_PATH=$(TOP)/../drm - -# Compiler and flags -CC = cc -CXX = CC -CFLAGS = -O -CXXFLAGS = -O -GLU_CFLAGS = - -# Misc tools and flags -MKLIB_OPTIONS = -MKDEP = makedepend -MKDEP_OPTIONS = -fdepend -MAKE = make - -# Python and flags (generally only needed by the developers) -PYTHON2 = python -PYTHON_FLAGS = -t -O -O - -# Library names (base name) -GL_LIB = GL -GLU_LIB = GLU -GLUT_LIB = glut -GLW_LIB = GLw -OSMESA_LIB = OSMesa - - -# Library names (actual file names) -GL_LIB_NAME = lib$(GL_LIB).so -GLU_LIB_NAME = lib$(GLU_LIB).so -GLUT_LIB_NAME = lib$(GLUT_LIB).so -GLW_LIB_NAME = lib$(GLW_LIB).so -OSMESA_LIB_NAME = lib$(OSMESA_LIB).so - - -# Optional assembly language optimization files for libGL -ASM_SOURCES = - -# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in -# order to build the Motif widget too) -GLW_SOURCES = GLwDrawA.c - - -# Directories -LIB_DIR = $(TOP)/lib -INSTALL_PREFIX = /usr/local -SRC_DIRS = mesa glu glut/glx glw -GLU_DIRS = sgi -DRIVER_DIRS = x11 osmesa -# Which subdirs under $(TOP)/progs/ to enter: -PROGRAM_DIRS = demos redbook samples xdemos - - -# Library/program dependencies -EXTRA_LIB_PATH ?= -GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread -OSMESA_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm -GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11 -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/freebsd b/nx-X11/extras/Mesa_6.4.2/configs/freebsd deleted file mode 100644 index 910352abd3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/freebsd +++ /dev/null @@ -1,16 +0,0 @@ -# Configuration for FreeBSD - -include $(TOP)/configs/default - -CONFIG_NAME = FreeBSD - -# Compiler and flags -CC = gcc -CXX = g++ -MAKE = gmake - -CFLAGS = -O2 -fPIC -pedantic -I/usr/X11R6/include -DUSE_XSHM -DHZ=100 -CXXFLAGS = -O2 -fPIC -pedantic -GLUT_CFLAGS = -fexceptions - -APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/freebsd-dri b/nx-X11/extras/Mesa_6.4.2/configs/freebsd-dri deleted file mode 100644 index fd07dbefe5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/freebsd-dri +++ /dev/null @@ -1,45 +0,0 @@ -# -*-makefile-*- -# Configuration for freebsd-dri: FreeBSD DRI hardware drivers - -include $(TOP)/configs/freebsd - -CONFIG_NAME = freebsd-dri - -# Compiler and flags -CC = gcc -CXX = g++ -WARN_FLAGS = -Wall -OPT_FLAGS = -O - -EXPAT_INCLUDES = -I/usr/local/include -X11_INCLUDES = -I/usr/X11R6/include -DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \ - -DGLX_DIRECT_RENDERING -DHAVE_ALIAS -CFLAGS = $(DEFINES) -Wmissing-prototypes -g -std=c99 -Wundef -fPIC \ - -ffast-math $(X11_INCLUDES) -CXXFLAGS = $(DEFINES) -Wall -g -ansi -pedantic -fPIC - -ASM_SOURCES = - -# Library/program dependencies -LIBDRM_LIB = `pkg-config --libs libdrm` -ldrm -DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat $(LIBDRM_LIB) -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread $(LIBDRM_LIB) - -GLUT_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm -GLW_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lXm -lX11 - - -# Directories -SRC_DIRS = glx/x11 mesa glu glut/glx glw -DRIVER_DIRS = dri -PROGRAM_DIRS = -WINDOW_SYSTEM=dri - -DRM_SOURCE_PATH=$(TOP)/../drm - -# ffb and gamma are missing because they have not been converted to use the new -# interface. -DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 r300 radeon tdfx \ - unichrome savage sis - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/freebsd-dri-amd64 b/nx-X11/extras/Mesa_6.4.2/configs/freebsd-dri-amd64 deleted file mode 100644 index ffddfd8354..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/freebsd-dri-amd64 +++ /dev/null @@ -1,9 +0,0 @@ -# -*-makefile-*- -# Configuration for freebsd-dri-amd64: FreeBSD DRI hardware drivers - -include $(TOP)/configs/freebsd-dri - -CONFIG_NAME = freebsd-dri-x86-64 - -ASM_FLAGS = -DUSE_X86_64_ASM -ASM_SOURCES = $(X86-64_SOURCES) $(X86-64_API) diff --git a/nx-X11/extras/Mesa_6.4.2/configs/freebsd-dri-x86 b/nx-X11/extras/Mesa_6.4.2/configs/freebsd-dri-x86 deleted file mode 100644 index 31316b1f7a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/freebsd-dri-x86 +++ /dev/null @@ -1,12 +0,0 @@ -# -*-makefile-*- -# Configuration for freebsd-dri: FreeBSD DRI hardware drivers - -include $(TOP)/configs/freebsd-dri - -CONFIG_NAME = freebsd-dri-x86 - -# Unnecessary on x86, generally. -PIC_FLAGS = - -ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -ASM_SOURCES = $(X86_SOURCES) diff --git a/nx-X11/extras/Mesa_6.4.2/configs/hpux10 b/nx-X11/extras/Mesa_6.4.2/configs/hpux10 deleted file mode 100644 index e17c8b6813..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/hpux10 +++ /dev/null @@ -1,14 +0,0 @@ -# Configuration for HPUX v10, shared libs - -include $(TOP)/configs/default - -CONFIG_NAME = hpux10 - -# Compiler and flags -CC = cc -CXX = aCC - -CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE - -APP_LIB_DEPS = -$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/hpux10-gcc b/nx-X11/extras/Mesa_6.4.2/configs/hpux10-gcc deleted file mode 100644 index 107a99a85c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/hpux10-gcc +++ /dev/null @@ -1,16 +0,0 @@ -# Configuration for HPUX v10, with gcc - -include $(TOP)/configs/default - -CONFIG_NAME = hpux10-gcc - -# Compiler and flags -CC = gcc -CXX = g++ - -CFLAGS = -ansi -O3 -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -CXXFLAGS = -ansi -O3 -D_HPUX_SOURCE -GLUT_CFLAGS = -fexceptions - -APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/hpux10-static b/nx-X11/extras/Mesa_6.4.2/configs/hpux10-static deleted file mode 100644 index 38a1313e69..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/hpux10-static +++ /dev/null @@ -1,30 +0,0 @@ -# Configuration for HPUX v10, static libs - -include $(TOP)/configs/default - -CONFIG_NAME = hpux10-static - -# Compiler and flags -CC = cc -CXX = aCC - -CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE - -MKLIB_OPTIONS = -static - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -# Library/program dependencies (static libs don't have dependencies) -GL_LIB_DEPS = -OSMESA_LIB_DEPS = -GLU_LIB_DEPS = -GLUT_LIB_DEPS = -GLW_LIB_DEPS = -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++ -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm -lstdc++ diff --git a/nx-X11/extras/Mesa_6.4.2/configs/hpux11-32 b/nx-X11/extras/Mesa_6.4.2/configs/hpux11-32 deleted file mode 100644 index 9ff407bd53..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/hpux11-32 +++ /dev/null @@ -1,26 +0,0 @@ -# Configuration for HPUX v11 - -include $(TOP)/configs/default - -CONFIG_NAME = hpux11-32 - -# Compiler and flags -CC = cc -CXX = aCC - -CFLAGS = +z -Ae +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS - -CXXFLAGS = +z -Aa +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include - -MKLIB_OPTIONS = - - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -# Library/program dependencies -APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/hpux11-32-static b/nx-X11/extras/Mesa_6.4.2/configs/hpux11-32-static deleted file mode 100644 index 7507ab0b0b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/hpux11-32-static +++ /dev/null @@ -1,26 +0,0 @@ -# Configuration for HPUX v11, static libs - -include $(TOP)/configs/default - -CONFIG_NAME = hpux11-32-static - -# Compiler and flags -CC = cc -CXX = aCC - -CFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS - -CXXFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include - -MKLIB_OPTIONS = -static - - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -# Library/program dependencies -APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/hpux11-32-static-nothreads b/nx-X11/extras/Mesa_6.4.2/configs/hpux11-32-static-nothreads deleted file mode 100644 index 91b365408c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/hpux11-32-static-nothreads +++ /dev/null @@ -1,26 +0,0 @@ -# Configuration for HPUX v11, static libs - -include $(TOP)/configs/default - -CONFIG_NAME = hpux11-32-static - -# Compiler and flags -CC = cc -CXX = aCC - -CFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM - -CXXFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include - -MKLIB_OPTIONS = -static - - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -# Library/program dependencies -APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/hpux11-64 b/nx-X11/extras/Mesa_6.4.2/configs/hpux11-64 deleted file mode 100644 index b0869cf81d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/hpux11-64 +++ /dev/null @@ -1,27 +0,0 @@ -# Configuration for HPUX v11, 64-bit - -include $(TOP)/configs/default - -CONFIG_NAME = hpux11-64 - -# Compiler and flags -CC = cc -CXX = aCC - -CFLAGS = +z -Ae +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS - -CXXFLAGS = +z -Aa +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include - -MKLIB_OPTIONS = - -LIBDIR = $(TOP)/lib64 - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -# Library/program dependencies -APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/hpux11-64-static b/nx-X11/extras/Mesa_6.4.2/configs/hpux11-64-static deleted file mode 100644 index 451dc4208e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/hpux11-64-static +++ /dev/null @@ -1,27 +0,0 @@ -# Configuration for HPUX v11, 64-bit, static libs - -include $(TOP)/configs/default - -CONFIG_NAME = hpux11-64-static - -# Compiler and flags -CC = cc -CXX = aCC - -CFLAGS = +O3 +DA2.0W -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS - -CXXFLAGS = +O3 +DA2.0W -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include - -MKLIB_OPTIONS = -static - -LIBDIR = $(TOP)/lib64 - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -# Library/program dependencies -APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/hpux9 b/nx-X11/extras/Mesa_6.4.2/configs/hpux9 deleted file mode 100644 index 0373817576..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/hpux9 +++ /dev/null @@ -1,16 +0,0 @@ -# Configuration for HPUX v9, shared libs - -include $(TOP)/configs/default - -CONFIG_NAME = hpux9 - -# Compiler and flags -CC = cc -# XXX fix this -CXX = c++ - -CFLAGS = +z +O3 +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5 -DUSE_XSHM -CXXFLAGS = +z +O3 +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5 - -APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R5 -s -Wl,+s,-B,nonfatal,-B,immediate -lXext -lXmu -lXi -lX11 -lm - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/hpux9-gcc b/nx-X11/extras/Mesa_6.4.2/configs/hpux9-gcc deleted file mode 100644 index 47d579ea56..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/hpux9-gcc +++ /dev/null @@ -1,14 +0,0 @@ -# Configuration for HPUX v10, shared libs - -include $(TOP)/configs/default - -CONFIG_NAME = hpux9-gcc - -# Compiler and flags -CC = cc -CXX = aCC - -CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE - -APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/irix6-64 b/nx-X11/extras/Mesa_6.4.2/configs/irix6-64 deleted file mode 100644 index 6c33d33ba9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/irix6-64 +++ /dev/null @@ -1,18 +0,0 @@ -# Configuration for IRIX 6.x, make n64 DSOs - -include $(TOP)/configs/default - -CONFIG_NAME = irix6-64 - -# Compiler and flags -CC = cc -CXX = CC -CFLAGS = -64 -O3 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DUSE_XSHM -CXXFLAGS = -64 -O3 -ansi -woff 1174 -MKLIB_OPTIONS = -archopt 64 - -GLW_SOURCES = GLwDrawA.c GLwMDrawA.c - -LIB_DIR = $(TOP)/lib64 - -APP_LIB_DEPS = -L$(LIB_DIR) -64 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/irix6-64-static b/nx-X11/extras/Mesa_6.4.2/configs/irix6-64-static deleted file mode 100644 index d66af5be87..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/irix6-64-static +++ /dev/null @@ -1,25 +0,0 @@ -# Configuration for IRIX 6.x, make n64 static libs - -include $(TOP)/configs/default - -CONFIG_NAME = irix6-64-static - -# Compiler and flags -CC = cc -CXX = CC -CFLAGS = -64 -O3 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DUSE_XSHM -CXXFLAGS = -64 -O3 -ansi -woff 1174 -MKLIB_OPTIONS = -archopt 64 -static - -GLW_SOURCES = GLwDrawA.c GLwMDrawA.c - -LIB_DIR = $(TOP)/lib64 - -APP_LIB_DEPS = -L$(LIB_DIR) -64 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm - -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/irix6-n32 b/nx-X11/extras/Mesa_6.4.2/configs/irix6-n32 deleted file mode 100644 index 4bf2964014..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/irix6-n32 +++ /dev/null @@ -1,18 +0,0 @@ -# Configuration for IRIX 6.x, make n32 DSOs - -include $(TOP)/configs/default - -CONFIG_NAME = irix6-n32 - -# Compiler and flags -CC = cc -CXX = CC -CFLAGS = -n32 -mips3 -O3 -ansi -woff 1174,1521,1552 -DUSE_XSHM -CXXFLAGS = -n32 -mips3 -O3 -ansi -woff 1174,1552 -MKLIB_OPTIONS = -archopt n32 - -GLW_SOURCES = GLwDrawA.c GLwMDrawA.c - -LIB_DIR = $(TOP)/lib32 - -APP_LIB_DEPS = -L$(LIB_DIR) -n32 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lfpe -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/irix6-n32-static b/nx-X11/extras/Mesa_6.4.2/configs/irix6-n32-static deleted file mode 100644 index b60de380c6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/irix6-n32-static +++ /dev/null @@ -1,25 +0,0 @@ -# Configuration for IRIX 6.x, make n32 static libs - -include $(TOP)/configs/default - -CONFIG_NAME = irix6-n32-static - -# Compiler and flags -CC = cc -CXX = CC -CFLAGS = -n32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM -CXXFLAGS = -n32 -mips2 -O2 -ansi -woff 3262,3666 -MKLIB_OPTIONS = -archopt n32 -static - -GLW_SOURCES = GLwDrawA.c GLwMDrawA.c - -LIB_DIR = $(TOP)/lib32 - -APP_LIB_DEPS = -L$(LIB_DIR) -n32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm - -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/irix6-o32 b/nx-X11/extras/Mesa_6.4.2/configs/irix6-o32 deleted file mode 100644 index 56a1979603..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/irix6-o32 +++ /dev/null @@ -1,19 +0,0 @@ -# Configuration for IRIX 6.x, make o32 DSOs - -include $(TOP)/configs/default - -CONFIG_NAME = irix6-o32 - -# Compiler and flags -CC = cc -CXX = CC -CFLAGS = -32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM -CXXFLAGS = -32 -mips2 -O2 -ansi -woff 3262,3666 -MKLIB_OPTIONS = -archopt o32 - -GLW_SOURCES = GLwDrawA.c GLwMDrawA.c - -LIB_DIR = $(TOP)/lib32 - -APP_LIB_DEPS = -L$(LIB_DIR) -32 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/irix6-o32-static b/nx-X11/extras/Mesa_6.4.2/configs/irix6-o32-static deleted file mode 100644 index ac3d6ee17a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/irix6-o32-static +++ /dev/null @@ -1,25 +0,0 @@ -# Configuration for IRIX 6.x, make o32 static libs - -include $(TOP)/configs/default - -CONFIG_NAME = irix6-o32-static - -# Compiler and flags -CC = cc -CXX = CC -CFLAGS = -32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM -CXXFLAGS = -32 -mips2 -O2 -ansi -woff 3262,3666 -MKLIB_OPTIONS = -archopt o32 -static - -GLW_SOURCES = GLwDrawA.c GLwMDrawA.c - -LIB_DIR = $(TOP)/lib32 - -APP_LIB_DEPS = -L$(LIB_DIR) -32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm - -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux b/nx-X11/extras/Mesa_6.4.2/configs/linux deleted file mode 100644 index e3119ec5cd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux +++ /dev/null @@ -1,33 +0,0 @@ -# Configuration for generic Linux - -include $(TOP)/configs/default - -CONFIG_NAME = linux - -# Compiler and flags -CC = gcc -CXX = g++ - -WARN_FLAGS = -Wall -OPT_FLAGS = -O3 -g -PIC_FLAGS = -fPIC - -# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. Add -m32 -# to build properly on 64-bit platforms. - -ARCH_FLAGS ?= - -DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ - -D_BSD_SOURCE -DPTHREADS -DUSE_XSHM - -X11_INCLUDES = -I/usr/X11R6/include - -CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ - $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math - -CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ - $(X11_INCLUDES) - -GLUT_CFLAGS = -fexceptions - -EXTRA_LIB_PATH = -L/usr/X11R6/lib diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-alpha b/nx-X11/extras/Mesa_6.4.2/configs/linux-alpha deleted file mode 100644 index 507c808451..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-alpha +++ /dev/null @@ -1,18 +0,0 @@ -# Configuration for Linux on Alpha - -include $(TOP)/configs/default - -CONFIG_NAME = linux-alpha - -# Compiler and flags -CC = gcc -CXX = g++ -CFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -fPIC -D_XOPEN_SOURCE -DUSE_XSHM -CXXFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -fPIC -D_XOPEN_SOURCE -GLUT_CFLAGS = -fexceptions - -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11 -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-alpha-static b/nx-X11/extras/Mesa_6.4.2/configs/linux-alpha-static deleted file mode 100644 index 7b7ee07ebb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-alpha-static +++ /dev/null @@ -1,27 +0,0 @@ -# Configuration for Linux on Alpha, static libs - -include $(TOP)/configs/default - -CONFIG_NAME = linux-alpha-static - -# Compiler and flags -CC = gcc -CXX = g++ -CFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -D_XOPEN_SOURCE -DUSE_XSHM -CXXFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -D_XOPEN_SOURCE -GLUT_CFLAGS = -fexceptions -MKLIB_OPTIONS = -static - - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - - -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11 -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -L/usr/X11R6/lib -lX11 -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-debug b/nx-X11/extras/Mesa_6.4.2/configs/linux-debug deleted file mode 100644 index ff4d1c33b5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-debug +++ /dev/null @@ -1,8 +0,0 @@ -# Configuration for debugging on Linux - -include $(TOP)/configs/linux - -CONFIG_NAME = linux-debug - -OPT_FLAGS = -g -DEFINES += -DDEBUG -DMESA_DEBUG -DRUN_DEBUG_BENCHMARK diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-directfb b/nx-X11/extras/Mesa_6.4.2/configs/linux-directfb deleted file mode 100644 index f09c69ddab..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-directfb +++ /dev/null @@ -1,29 +0,0 @@ -# Configuration for DirectFB - -include $(TOP)/configs/default - -CONFIG_NAME = linux-directfb - -# Compiler and flags -CC = gcc -CXX = g++ - -CFLAGS = -Wall -O3 -ffast-math -fPIC -std=c99 -D_GNU_SOURCE -D_POSIX_SOURCE -D_SVID_SOURCE \ - -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DPTHREADS - -CXXFLAGS = -Wall -O3 -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE - -HAVE_X86 = $(shell uname -m | grep 'i[3-6]86' >/dev/null && echo yes) -ifeq ($(HAVE_X86), yes) - CFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM - CXXFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM - ASM_SOURCES = $(X86_SOURCES) $(X86_API) -endif - -# Directories -SRC_DIRS = mesa glu -DRIVER_DIRS = directfb -PROGRAM_DIRS = # disabled - -# Library/program dependencies -GL_LIB_DEPS = -lm -lpthread diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-dri b/nx-X11/extras/Mesa_6.4.2/configs/linux-dri deleted file mode 100644 index 293f2e789d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-dri +++ /dev/null @@ -1,68 +0,0 @@ -# -*-makefile-*- -# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others - -include $(TOP)/configs/default - -CONFIG_NAME = linux-dri - -# Compiler and flags -CC = gcc -CXX = g++ - -MKDEP = /usr/X11R6/bin/makedepend -#MKDEP = gcc -M -#MKDEP_OPTIONS = -MF depend - -WARN_FLAGS = -Wall -OPT_FLAGS = -O -g -PIC_FLAGS = -fPIC - -# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. -ARCH_FLAGS ?= - -DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ - -D_BSD_SOURCE -D_GNU_SOURCE \ - -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \ - -DGLX_DIRECT_RENDERING -DHAVE_ALIAS - -X11_INCLUDES = -I/usr/X11R6/include - -CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ - $(ASM_FLAGS) -std=c99 -ffast-math - -CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) - - -ASM_SOURCES = - -# Library/program dependencies -EXTRA_LIB_PATH=-L/usr/X11R6/lib - -LIBDRM_LIB = `pkg-config --libs libdrm` -ldrm -DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) -GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \ - $(LIBDRM_LIB) - - -# This is now 0 by default since it seems to confuse the hell out of people -# and generate a lot of extra noise on bugzilla. If you need to build with -# EGL, do 'make linux-dri USING_EGL=1' - -USING_EGL=0 - -# Directories -ifeq ($(USING_EGL), 1) -SRC_DIRS = egl glx/x11 mesa glu glut/glx glw -PROGRAM_DIRS = egl -else -SRC_DIRS = glx/x11 mesa glu glut/glx glw -PROGRAM_DIRS = -endif - -DRIVER_DIRS = dri -WINDOW_SYSTEM=dri - -# gamma are missing because they have not been converted to use the new -# interface. -DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 r300 radeon s3v \ - savage sis tdfx trident unichrome ffb diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-dri-ppc b/nx-X11/extras/Mesa_6.4.2/configs/linux-dri-ppc deleted file mode 100644 index fb87688065..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-dri-ppc +++ /dev/null @@ -1,17 +0,0 @@ -# -*-makefile-*- -# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others - -include $(TOP)/configs/linux-dri - -CONFIG_NAME = linux-dri-ppc - -OPT_FLAGS = -Os -mcpu=603 -PIC_FLAGS = -fPIC - -ASM_FLAGS = -DUSE_PPC_ASM -DUSE_VMX_ASM -ASM_SOURCES = $(PPC_SOURCES) - -# Build only the drivers for cards that exist on PowerPC. At some point MGA -# will be added, but not yet. -DRI_DIRS = mach64 r128 r200 r300 radeon tdfx - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-dri-x86 b/nx-X11/extras/Mesa_6.4.2/configs/linux-dri-x86 deleted file mode 100644 index bef24e059e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-dri-x86 +++ /dev/null @@ -1,16 +0,0 @@ -# -*-makefile-*- -# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others - -include $(TOP)/configs/linux-dri - -CONFIG_NAME = linux-dri-x86 - -# Unnecessary on x86, generally. -PIC_FLAGS = - -# Add -m32 to CFLAGS: -ARCH_FLAGS = -m32 - -ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -ASM_SOURCES = $(X86_SOURCES) - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-dri-x86-64 b/nx-X11/extras/Mesa_6.4.2/configs/linux-dri-x86-64 deleted file mode 100644 index affbe2bc61..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-dri-x86-64 +++ /dev/null @@ -1,23 +0,0 @@ -# -*-makefile-*- -# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others - -include $(TOP)/configs/linux-dri - -CONFIG_NAME = linux-dri-x86-64 - -ARCH_FLAGS = -m64 - -ASM_FLAGS = -DUSE_X86_64_ASM -ASM_SOURCES = $(X86-64_SOURCES) $(X86-64_API) - -LIB_DIR = $(TOP)/lib64 - -# Library/program dependencies -EXTRA_LIB_PATH=-L/usr/X11R6/lib64 - -# ffb, gamma, and sis are missing because they have not be converted to use -# the new interface. i810 and i830 are missing because there is no x86-64 -# system where they could *ever* be used. -# -DRI_DIRS = i915 mach64 mga r128 r200 radeon tdfx unichrome savage r300 - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-fbdev b/nx-X11/extras/Mesa_6.4.2/configs/linux-fbdev deleted file mode 100644 index c357485ea1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-fbdev +++ /dev/null @@ -1,10 +0,0 @@ -# Configuration for Linux fbdev interface - -include $(TOP)/configs/linux - -CONFIG_NAME = linux-fbdev -DRIVER_DIRS = fbdev - -CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -DUSE_GLFBDEV_DRIVER - -PROGRAM_DIRS = fbdev diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-glide b/nx-X11/extras/Mesa_6.4.2/configs/linux-glide deleted file mode 100644 index d3e0dc32d5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-glide +++ /dev/null @@ -1,20 +0,0 @@ -# Configuration for generic Linux with 3Dfx Glide driver - -include $(TOP)/configs/default - -CONFIG_NAME = linux-glide - -# Compiler and flags -CC = gcc -CXX = g++ - -CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DFX -I/usr/include/glide -I/usr/local/glide/include -CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -GLUT_CFLAGS = -fexceptions - - -# Library/program dependencies -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11 -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/local/glide/lib -lglide3x -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-icc b/nx-X11/extras/Mesa_6.4.2/configs/linux-icc deleted file mode 100644 index 0da3b836a7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-icc +++ /dev/null @@ -1,21 +0,0 @@ -# Configuration for Linux with Intel C compiler - -include $(TOP)/configs/default - -CONFIG_NAME = linux-icc - -# Compiler and flags -CC = icc -CXX = g++ -CFLAGS = -O3 -tpp6 -axK -KPIC -D_GCC_LIMITS_H_ -D__GNUC__ -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include -CXXFLAGS = -O3 -GLUT_CFLAGS = -fexceptions -MKLIB_OPTIONS = -arch icc - -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm - -ASM_SOURCES = $(X86_SOURCES) $(X86_API) - - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-icc-static b/nx-X11/extras/Mesa_6.4.2/configs/linux-icc-static deleted file mode 100644 index 5c65f05618..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-icc-static +++ /dev/null @@ -1,29 +0,0 @@ -# Configuration for Linux with Intel C compiler, static libs - -include $(TOP)/configs/default - -CONFIG_NAME = linux-icc-static - -# Compiler and flags -CC = icc -CXX = g++ -CFLAGS = -O3 -tpp6 -axK -D_GCC_LIMITS_H_ -D__GNUC__ -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include -CXXFLAGS = -O3 -GLUT_CFLAGS = -fexceptions -MKLIB_OPTIONS = -static -arch icc - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -MKLIB_OPTIONS = -arch icc - -ASM_SOURCES = $(X86_SOURCES) $(X86_API) - - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-indirect b/nx-X11/extras/Mesa_6.4.2/configs/linux-indirect deleted file mode 100644 index 93166e2e98..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-indirect +++ /dev/null @@ -1,49 +0,0 @@ -# -*-makefile-*- -# Configuration for linux-indirect: Builds a libGL capable of indirect -# rendering, but *NOT* capable of direct rendering. - -include $(TOP)/configs/default - -CONFIG_NAME = linux-dri - -# Compiler and flags -CC = gcc -CXX = g++ - -MKDEP = /usr/X11R6/bin/makedepend -#MKDEP = gcc -M -#MKDEP_OPTIONS = -MF depend - -WARN_FLAGS = -Wall -OPT_FLAGS = -O -g -PIC_FLAGS = -fPIC - -# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. -ARCH_FLAGS ?= - -DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ - -D_BSD_SOURCE -D_GNU_SOURCE \ - -DPTHREADS -DHAVE_ALIAS - -X11_INCLUDES = -I/usr/X11R6/include - -CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ - $(ASM_FLAGS) -std=c99 -ffast-math - -CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) - - -ASM_SOURCES = - -# Library/program dependencies -EXTRA_LIB_PATH=-L/usr/X11R6/lib - -DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl -GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl - - -# Directories -SRC_DIRS = glx/x11 glu glut/glx glw -DRIVER_DIRS = -PROGRAM_DIRS = -WINDOW_SYSTEM=dri diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-osmesa16 b/nx-X11/extras/Mesa_6.4.2/configs/linux-osmesa16 deleted file mode 100644 index 16a3b0bbae..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-osmesa16 +++ /dev/null @@ -1,27 +0,0 @@ -# Configuration for 16 bits/channel OSMesa library on Linux - -include $(TOP)/configs/default - -CONFIG_NAME = linux-osmesa16 - -# Compiler and flags -CC = gcc -CXX = g++ -CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31 -CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE - - -# Library names -OSMESA_LIB = OSMesa16 -OSMESA_LIB_NAME = libOSMesa16.so - - -# Directories -SRC_DIRS = mesa glu -DRIVER_DIRS = osmesa -PROGRAM_DIRS = - - -# Dependencies -OSMESA_LIB_DEPS = -lm -lpthread -APP_LIB_DEPS = -lOSMesa16 diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-osmesa16-static b/nx-X11/extras/Mesa_6.4.2/configs/linux-osmesa16-static deleted file mode 100644 index 6645504478..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-osmesa16-static +++ /dev/null @@ -1,28 +0,0 @@ -# Configuration for 16 bits/channel OSMesa library on Linux - -include $(TOP)/configs/default - -CONFIG_NAME = linux-osmesa16-static - -# Compiler and flags -CC = gcc -CXX = g++ -CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31 -CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -MKLIB_OPTIONS = -static - - -# Library names -OSMESA_LIB = OSMesa16 -OSMESA_LIB_NAME = libOSMesa16.a - - -# Directories -SRC_DIRS = mesa glu -DRIVER_DIRS = osmesa -PROGRAM_DIRS = - - -# Dependencies -OSMESA_LIB_DEPS = -lm -lpthread -APP_LIB_DEPS = -lOSMesa16 diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-osmesa32 b/nx-X11/extras/Mesa_6.4.2/configs/linux-osmesa32 deleted file mode 100644 index 0ff0a6db9b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-osmesa32 +++ /dev/null @@ -1,27 +0,0 @@ -# Configuration for 32 bits/channel OSMesa library on Linux - -include $(TOP)/configs/default - -CONFIG_NAME = linux-osmesa32 - -# Compiler and flags -CC = gcc -CXX = g++ -CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31 -CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE - - -# Library names -OSMESA_LIB = OSMesa32 -OSMESA_LIB_NAME = libOSMesa32.so - - -# Directories -SRC_DIRS = mesa glu -DRIVER_DIRS = osmesa -PROGRAM_DIRS = - - -# Dependencies -OSMESA_LIB_DEPS = -lm -lpthread -APP_LIB_DEPS = -lOSMesa32 diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-ppc b/nx-X11/extras/Mesa_6.4.2/configs/linux-ppc deleted file mode 100644 index 13cfdeb422..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-ppc +++ /dev/null @@ -1,9 +0,0 @@ -# Configuration for Linux on PPC - -include $(TOP)/configs/linux - -CONFIG_NAME = linux-ppc - -OPT_FLAGS = -O3 -mcpu=603 -fsigned-char -funroll-loops - -# FIXME: Use of PowerPC assembly should be enabled here. \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-ppc-static b/nx-X11/extras/Mesa_6.4.2/configs/linux-ppc-static deleted file mode 100644 index d0e168811f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-ppc-static +++ /dev/null @@ -1,14 +0,0 @@ -# Configuration for Linux on PPC, static libs - -include $(TOP)/configs/linux-ppc - -CONFIG_NAME = linux-ppc-static - -MKLIB_OPTIONS = -static - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-profile b/nx-X11/extras/Mesa_6.4.2/configs/linux-profile deleted file mode 100644 index b2531f5628..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-profile +++ /dev/null @@ -1,29 +0,0 @@ -# Configuration for profiling on Linux with gprof - -include $(TOP)/configs/default - -CONFIG_NAME = linux-profile - -# Compiler and flags -CC = gcc -CXX = g++ - -CFLAGS = -pg -O -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG - -CXXFLAGS = -pg -O -ansi -pedantic -Wall -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -DDEBUG -DMESA_DEBUG - -GLUT_CFLAGS = -fexceptions - -# Need to have -L/usr/X11R6/lib in these: -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -L/usr/X11R6/lib -lX11 - -# Need to make static libs for profiling: -MKLIB_OPTIONS = -static -GL_LIB_NAME = lib$(GL_LIB).a -GLU_LIB_NAME = lib$(GLU_LIB).a -GLUT_LIB_NAME = lib$(GLUT_LIB).a -GLW_LIB_NAME = lib$(GLW_LIB).a -OSMESA_LIB_NAME = lib$(OSMesa).a -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-solo b/nx-X11/extras/Mesa_6.4.2/configs/linux-solo deleted file mode 100644 index a3deb7c200..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-solo +++ /dev/null @@ -1,43 +0,0 @@ -# Configuration for linux-solo: Linux DRI hardware drivers for fbdev - -include $(TOP)/configs/default - -CONFIG_NAME = linux-solo - -# Compiler and flags -CC = gcc -CXX = g++ - -WARN_FLAGS = -Wall -Wundef -OPT_FLAGS = -O3 -g -PIC_FLAGS = -fPIC - -# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. -ARCH_FLAGS ?= - -DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ - -D_BSD_SOURCE -D_GNU_SOURCE \ - -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DDRM_USE_MALLOC -DIN_DRI_DRIVER - -CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ - $(ASM_FLAGS) -std=c99 -ffast-math - -CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) - - -ASM_SOURCES = - -# Library/program dependencies -DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl -L$(LIB_DIR) -GL_LIB_DEPS = -lm -lpthread -ldl -GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread - -# Directories -SRC_DIRS = glx/mini mesa glu glut/mini -DRIVER_DIRS = dri -PROGRAM_DIRS = miniglx - -#DRI_DIRS = ffb gamma sis savage -DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 radeon tdfx unichrome fb diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-solo-ia64 b/nx-X11/extras/Mesa_6.4.2/configs/linux-solo-ia64 deleted file mode 100644 index b2051fac85..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-solo-ia64 +++ /dev/null @@ -1,7 +0,0 @@ -# Configuration for linux-solo-ia64: Linux DRI hardware drivers for fbdev - -include $(TOP)/configs/linux-solo - -CONFIG_NAME = linux-solo-ia64 - -DRI_DIRS = fb mach64 mga r128 r200 radeon sis tdfx unichrome diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-solo-x86 b/nx-X11/extras/Mesa_6.4.2/configs/linux-solo-x86 deleted file mode 100644 index b4e79ba2c0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-solo-x86 +++ /dev/null @@ -1,12 +0,0 @@ -# -*-makefile-*- -# Configuration for linux-solo-x86: Linux hardware drivers for fbdev for x86 - -include $(TOP)/configs/linux-solo - -CONFIG_NAME = linux-solo-x86 - -# Unnecessary on x86, generally. -PIC_FLAGS = - -ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -ASM_SOURCES = $(X86_SOURCES) diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-sparc b/nx-X11/extras/Mesa_6.4.2/configs/linux-sparc deleted file mode 100644 index 15e0b6d4bb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-sparc +++ /dev/null @@ -1,30 +0,0 @@ -# Configuration for Linux on Sparc - -include $(TOP)/configs/default - -CONFIG_NAME = linux-sparc - -# Compiler and flags -CC = gcc -CXX = g++ - -WARN_FLAGS = -Wall -OPT_FLAGS = -O2 -PIC_FLAGS = -fPIC - -DEFINES = -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM - -X11_INCLUDES = -I/usr/X11R6/include - -CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ - $(ASM_FLAGS) -std=c99 -ffast-math - -CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) - -GLUT_CFLAGS = -fexceptions - -EXTRA_LIB_PATH=-L/usr/X11R6/lib - -GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm -GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11 diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-sparc5 b/nx-X11/extras/Mesa_6.4.2/configs/linux-sparc5 deleted file mode 100644 index aa9461af76..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-sparc5 +++ /dev/null @@ -1,17 +0,0 @@ -# Configuration for Linux on Sparc5 - -include $(TOP)/configs/default - -CONFIG_NAME = linux-sparc5 - -# Compiler and flags -CC = gcc -CXX = g++ -CFLAGS = -mcpu=ultrasparc -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -CXXFLAGS = -mcpu=ultrasparc -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -GLUT_CFLAGS = -fexceptions - -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11 - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-static b/nx-X11/extras/Mesa_6.4.2/configs/linux-static deleted file mode 100644 index 0104d34022..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-static +++ /dev/null @@ -1,21 +0,0 @@ -# Configuration for generic Linux, making static libs - -include $(TOP)/configs/linux - -CONFIG_NAME = linux-static - -MKLIB_OPTIONS = -static - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -# Library/program dependencies (static libs don't have dependencies) -GL_LIB_DEPS = -OSMESA_LIB_DEPS = -GLU_LIB_DEPS = -GLUT_LIB_DEPS = -GLW_LIB_DEPS = diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-tcc b/nx-X11/extras/Mesa_6.4.2/configs/linux-tcc deleted file mode 100644 index 4371fe21fc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-tcc +++ /dev/null @@ -1,22 +0,0 @@ -# Configuration for debugging on Linux - -include $(TOP)/configs/default - -CONFIG_NAME = linux-tcc - -# Compiler and flags -CC = gcc -CXX = g++ - -TCC_DIR=/home/progs/tcc-0.9.20 - -CFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG -DUSE_TCC -I$(TCC_DIR) - -CXXFLAGS = -g -ansi -pedantic -Wall -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -DDEBUG -DMESA_DEBUG - -GLUT_CFLAGS = -fexceptions - -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -L$(TCC_DIR) -ltcc -ldl -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -L/usr/X11R6/lib -lX11 -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-ultrasparc b/nx-X11/extras/Mesa_6.4.2/configs/linux-ultrasparc deleted file mode 100644 index e235b56def..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-ultrasparc +++ /dev/null @@ -1,17 +0,0 @@ -# Configuration for Linux on UltraSparc - -include $(TOP)/configs/default - -CONFIG_NAME = linux-ultrasparc - -# Compiler and flags -CC = gcc -CXX = g++ -CFLAGS = -mv8 -O2 -mtune=ultrasparc -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -CXXFLAGS = -mv8 -O2 -mtune=ultrasparc -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -GLUT_CFLAGS = -fexceptions - -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11 -APP_LIB_DEPS = -L$(LIB_DIR)-l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86 b/nx-X11/extras/Mesa_6.4.2/configs/linux-x86 deleted file mode 100644 index b239653e6b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86 +++ /dev/null @@ -1,8 +0,0 @@ -# Configuration for Linux with x86 optimizations - -include $(TOP)/configs/linux - -CONFIG_NAME = linux-x86 - -ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -ASM_SOURCES = $(X86_SOURCES) $(X86_API) diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-32 b/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-32 deleted file mode 100644 index f18ce7a459..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-32 +++ /dev/null @@ -1,7 +0,0 @@ -# To build Linux x86 32-bit in an x86-64 environment - -include $(TOP)/configs/linux-x86 - -CONFIG_NAME = linux-x86-32 - -ARCH_FLAGS += -m32 diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-64 b/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-64 deleted file mode 100644 index f8ff5489f1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-64 +++ /dev/null @@ -1,13 +0,0 @@ -# Configuration for Linux for 64-bit X86 (Opteron) - -include $(TOP)/configs/linux - -CONFIG_NAME = linux-x86-64 - -ARCH_FLAGS = -m64 - -ASM_SOURCES = $(X86-64_SOURCES) $(X86-64_API) -ASM_FLAGS = -DUSE_X86_64_ASM - -LIB_DIR = $(TOP)/lib64 -EXTRA_LIB_PATH = -L/usr/X11R6/lib64 diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-64-debug b/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-64-debug deleted file mode 100644 index bbdaec8014..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-64-debug +++ /dev/null @@ -1,7 +0,0 @@ -# Configuration for Linux for 64-bit X86 (Opteron) - -include $(TOP)/configs/linux-x86-64 - -CONFIG_NAME = linux-x86-64-debug - -DEFINES += -DDEBUG -DMESA_DEBUG -DRUN_DEBUG_BENCHMARK diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-64-static b/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-64-static deleted file mode 100644 index 05f21d87a6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-64-static +++ /dev/null @@ -1,21 +0,0 @@ -# Configuration for Linux for 64-bit X86 (Opteron), static libs - -include $(TOP)/configs/linux-x86-64 - -CONFIG_NAME = linux-x86-64-static - -MKLIB_OPTIONS = -static - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -# Library/program dependencies (static libs don't have dependencies) -GL_LIB_DEPS = -OSMESA_LIB_DEPS = -GLU_LIB_DEPS = -GLUT_LIB_DEPS = -GLW_LIB_DEPS = diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-debug b/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-debug deleted file mode 100644 index dbb970300e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-debug +++ /dev/null @@ -1,9 +0,0 @@ -# Configuration for Linux with x86 code, but no gcc optimizations and -# debugging enabled. - -include $(TOP)/configs/linux-x86 - -CONFIG_NAME = linux-x86-debug - -OPT_FLAGS = -g -DEFINES += -DDEBUG -DMESA_DEBUG -DRUN_DEBUG_BENCHMARK diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-glide b/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-glide deleted file mode 100644 index b874b923ff..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-glide +++ /dev/null @@ -1,24 +0,0 @@ -# Configuration for Linux with 3Dfx Glide driver and x86 optimizations - -include $(TOP)/configs/default - -CONFIG_NAME = linux-x86-glide - -# Compiler and flags -CC = gcc -CXX = g++ - -CFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include -DFX -I/usr/include/glide -I/usr/local/glide/include - -CXXFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE - -GLUT_CFLAGS = -fexceptions - - -ASM_SOURCES = $(X86_SOURCES) $(X86_API) - -# Library/program dependencies -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11 -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/local/glide/lib -lglide3x -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-static b/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-static deleted file mode 100644 index d4ccfca803..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-static +++ /dev/null @@ -1,21 +0,0 @@ -# Configuration for Linux with x86 optimizations, static libs - -include $(TOP)/configs/linux-x86 - -CONFIG_NAME = linux-x86-static - -MKLIB_OPTIONS = -static - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -# Library/program dependencies (static libs don't have dependencies) -GL_LIB_DEPS = -OSMESA_LIB_DEPS = -GLU_LIB_DEPS = -GLUT_LIB_DEPS = -GLW_LIB_DEPS = diff --git a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-xcb b/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-xcb deleted file mode 100644 index 7c5074c308..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/linux-x86-xcb +++ /dev/null @@ -1,24 +0,0 @@ -# Configuration for Linux with x86 optimizations - -include $(TOP)/configs/default - -CONFIG_NAME = linux-x86-xcb - -# Compiler and flags -CC = gcc -CXX = g++ - -CFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -DUSE_XCB -I/usr/X11R6/include - -CXXFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XCB - -GLUT_CFLAGS = -fexceptions - - -ASM_SOURCES = $(X86_SOURCES) $(X86_API) - -# Library/program dependencies -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lXCB -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11 -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/netbsd b/nx-X11/extras/Mesa_6.4.2/configs/netbsd deleted file mode 100644 index 104daae0dd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/netbsd +++ /dev/null @@ -1,14 +0,0 @@ -# Configuration for NetBSD - -include $(TOP)/configs/default - -CONFIG_NAME = netbsd - -# Compiler and flags -CC = gcc -CXX = g++ -CFLAGS = -O2 -fPIC -DUSE_XSHM -I/usr/X11R6/include -DHZ=100 -CXXFLAGS = -O2 -fPIC -GLUT_CFLAGS = -fexceptions -APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/openbsd b/nx-X11/extras/Mesa_6.4.2/configs/openbsd deleted file mode 100644 index f769259a33..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/openbsd +++ /dev/null @@ -1,18 +0,0 @@ -# Configuration for OpenBSD - -include $(TOP)/configs/default - -CONFIG_NAME = openbsd - -# Compiler and flags -CC = gcc -CXX = g++ -CFLAGS = -O2 -fPIC -I/usr/X11R6/include -DUSE_XSHM -DHZ=100 -CXXFLAGS = -O2 -fPIC -I/usr/X11R6/include -DHZ=100 - -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -OSMESA_LIB_DEPS = -lm -GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm -APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/osf1 b/nx-X11/extras/Mesa_6.4.2/configs/osf1 deleted file mode 100644 index bc88c20422..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/osf1 +++ /dev/null @@ -1,16 +0,0 @@ -# Configuration for OSF/1 - -include $(TOP)/configs/default - -CONFIG_NAME = osf1 - -# Compiler and flags -CC = cc -CXX = cxx -CFLAGS = -O0 -std1 -ieee_with_no_inexact -DUSE_XSHM -CXXFLAGS = -O2 -std ansi -ieee - -GL_LIB_DEPS = -lX11 -lXext -lm -lpthread -GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm -APP_LIB_DEPS = -L$(LIB_DIR) -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/solaris-x86 b/nx-X11/extras/Mesa_6.4.2/configs/solaris-x86 deleted file mode 100644 index 7a04417f0c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/solaris-x86 +++ /dev/null @@ -1,18 +0,0 @@ -# Configuration for Solaris on x86 - -include $(TOP)/configs/default - -CONFIG_NAME = solaris-x86 - -# Compiler and flags -CC = cc -CFLAGS = -Xa -xO3 -xpentium -KPIC -I/usr/openwin/include -DUSE_XSHM -MKLIB_OPTIONS = -static - -APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm -lglut -lGLU -lGL - -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a diff --git a/nx-X11/extras/Mesa_6.4.2/configs/solaris-x86-gcc b/nx-X11/extras/Mesa_6.4.2/configs/solaris-x86-gcc deleted file mode 100644 index 01f3d86d1d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/solaris-x86-gcc +++ /dev/null @@ -1,24 +0,0 @@ -# Configuration for Solaris on x86 with gcc, static libs - -include $(TOP)/configs/default - -CONFIG_NAME = solaris-x86-gcc - -# Compiler and flags -CC = gcc -CXX = g++ -CFLAGS = -O3 -m486 -fPIC -I/usr/openwin/include -DUSE_XSHM -CXXFLAGS = -O3 -m486 -fPIC -GLUT_CFLAGS = -fexceptions -MKLIB_OPTIONS = -static - -GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lm -lpthread -GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm -APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm - -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a diff --git a/nx-X11/extras/Mesa_6.4.2/configs/sunos4 b/nx-X11/extras/Mesa_6.4.2/configs/sunos4 deleted file mode 100644 index 483b9aa730..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/sunos4 +++ /dev/null @@ -1,12 +0,0 @@ -# Configuration for SunOS 4, shared libs - -include $(TOP)/configs/default - -CONFIG_NAME = sunos4 - -# Compiler and flags -CC = acc -CFLAGS = -Kpic -O -I/usr/include/X11R5 -DUSE_XSHM -DSUNOS4 -APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R5 -lX11 -lXext -lXmu -lXi -lm - - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/sunos4-gcc b/nx-X11/extras/Mesa_6.4.2/configs/sunos4-gcc deleted file mode 100644 index 8fb1414fa9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/sunos4-gcc +++ /dev/null @@ -1,15 +0,0 @@ -# Configuration for SunOS 4, with gcc, shared libs - -include $(TOP)/configs/default - -CONFIG_NAME = sunos4-gcc - -# Compiler and flags -CC = gcc -CXX = g++ -CFLAGS = -fPIC -O3 -I/usr/openwin/include -I/usr/include/X11R5 -I/usr/include/X11R5 -DUSE_XSHM -DSUNOS4 -CXXFLAGS = -fPIC -O3 -I/usr/openwin/include -DSUNOS4 -GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG - -APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/sunos4-static b/nx-X11/extras/Mesa_6.4.2/configs/sunos4-static deleted file mode 100644 index 3e510e7514..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/sunos4-static +++ /dev/null @@ -1,25 +0,0 @@ -# Configuration for SunOS 4, static libs - -include $(TOP)/configs/default - -CONFIG_NAME = sunos4-static - -# Compiler and flags -CC = acc -CFLAGS = -O -DUSE_XSHM -DSUNOS4 -MKLIB_OPTIONS = -static - -# Library names (actual file names) -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -# Library/program dependencies (static libs don't have dependencies) -GL_LIB_DEPS = -OSMESA_LIB_DEPS = -GLU_LIB_DEPS = -GLUT_LIB_DEPS = -GLW_LIB_DEPS = -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/sunos5 b/nx-X11/extras/Mesa_6.4.2/configs/sunos5 deleted file mode 100644 index 9347fb842a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/sunos5 +++ /dev/null @@ -1,18 +0,0 @@ -# Configuration for SunOS 5 - -include $(TOP)/configs/default - -CONFIG_NAME = sunos5 - -# Compiler and flags -CC = cc -CXX = c++ -CFLAGS = -KPIC -Xa -O -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM -CXXFLAGS = -KPIC -Xa -O -I/usr/openwin/include -I/usr/dt/include -GLUT_CFLAGS = -DSOLARIS_2_4_BUG - -GL_LIB_DEPS = -L/usr/openwin/lib -L/usr/dt/lib -lX11 -lXext -lXmu -lXi -lm -GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm -GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11 -APP_LIB_DEPS = -L$(LIB_DIR) -lCrun -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/sunos5-gcc b/nx-X11/extras/Mesa_6.4.2/configs/sunos5-gcc deleted file mode 100644 index 7917c9b004..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/sunos5-gcc +++ /dev/null @@ -1,35 +0,0 @@ -# Configuration for SunOS 5, with gcc - -include $(TOP)/configs/default - -CONFIG_NAME = sunos5-gcc - -# Compiler and flags -CC = gcc -CXX = g++ - -WARN_FLAGS = -Wall -OPT_FLAGS = -O3 -g -fomit-frame-pointer -pipe -PIC_FLAGS = -fPIC - -ARCH_FLAGS ?= - -DEFINES = -D_REENTRANT -DUSE_XSHM - -ASM_SOURCES = $(SPARC_SOURCES) $(SPARC_API) -ASM_FLAGS = -DUSE_SPARC_ASM - -CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ - $(ASM_FLAGS) -std=c99 -ffast-math -I/usr/openwin/include - -CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ - -I/usr/openwin/include - -GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG - -# Library/program dependencies -EXTRA_LIB_PATH=-L/usr/openwin/lib - -GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXi -lm -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm -APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm diff --git a/nx-X11/extras/Mesa_6.4.2/configs/sunos5-smp b/nx-X11/extras/Mesa_6.4.2/configs/sunos5-smp deleted file mode 100644 index 633bced683..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/sunos5-smp +++ /dev/null @@ -1,19 +0,0 @@ -# Configuration for SunOS 5, SMP systems - -include $(TOP)/configs/default - -CONFIG_NAME = sunos5-smp - -# Compiler and flags -CC = cc -CXX = c++ -CFLAGS = -KPIC -Xa -native -fast -xO5 -xlibmil -xsafe=mem -xdepend -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM -DSOLARIS_2_4_BUG -CXXFLAGS = -KPIC -Xa -native -fast -xO5 -xlibmil -xsafe=mem -xdepend -I/usr/openwin/include -I/usr/dt/include -GLUT_CFLAGS = -DSOLARIS_2_4_BUG - -GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm -GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm -GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11 -APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lCrun - diff --git a/nx-X11/extras/Mesa_6.4.2/configs/ultrix-gcc b/nx-X11/extras/Mesa_6.4.2/configs/ultrix-gcc deleted file mode 100644 index c65e275825..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/configs/ultrix-gcc +++ /dev/null @@ -1,21 +0,0 @@ -# Configuration for Ultrix, with gcc - -include $(TOP)/configs/default - -CONFIG_NAME = ultrix-gcc - -# Compiler and flags -CC = gcc -CXX = g++ -CFLAGS = -pedantic -O2 -CXXFLAGS = -pedantic -O2 -GLUT_CFLAGS = -fexceptions -MKLIB_OPTIONS = -static - -GL_LIB_NAME = libGL.a -GLU_LIB_NAME = libGLU.a -GLUT_LIB_NAME = libglut.a -GLW_LIB_NAME = libGLw.a -OSMESA_LIB_NAME = libOSMesa.a - -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXmu -lX11 -lXi -lm diff --git a/nx-X11/extras/Mesa_6.4.2/descrip.mms b/nx-X11/extras/Mesa_6.4.2/descrip.mms deleted file mode 100644 index 11d9498891..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/descrip.mms +++ /dev/null @@ -1,22 +0,0 @@ -# Makefile for Mesa for VMS -# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl - -macro : - @ macro="" -.ifdef NOSHARE -.else - @ if f$getsyi("HW_MODEL") .ge. 1024 then macro= "/MACRO=(SHARE=1)" -.endif - $(MMS)$(MMSQUALIFIERS)'macro' all - -all : - if f$search("lib.dir") .eqs. "" then create/directory [.lib] - set default [.src] - $(MMS)$(MMSQUALIFIERS) - set default [-.progs.util] - $(MMS)$(MMSQUALIFIERS) - set default [-.demos] - $(MMS)$(MMSQUALIFIERS) - set default [-.xdemos] - $(MMS)$(MMSQUALIFIERS) - if f$search("[-]test.DIR") .nes. "" then pipe set default [-.test] ; $(MMS)$(MMSQUALIFIERS) diff --git a/nx-X11/extras/Mesa_6.4.2/docs/COPYING b/nx-X11/extras/Mesa_6.4.2/docs/COPYING deleted file mode 100644 index b88946cc66..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/COPYING +++ /dev/null @@ -1,490 +0,0 @@ - -Some parts of Mesa are copyrighted under the GNU LGPL. See the -Mesa/docs/COPYRIGHT file for details. - -The following is the standard GNU copyright file. ----------------------------------------------------------------------- - - - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MESA_agp_offset.spec b/nx-X11/extras/Mesa_6.4.2/docs/MESA_agp_offset.spec deleted file mode 100644 index 8dcc72379c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MESA_agp_offset.spec +++ /dev/null @@ -1,95 +0,0 @@ -Name - - MESA_agp_offset - -Name Strings - - GLX_MESA_agp_offset - -Contact - - Brian Paul, Tungsten Graphics, Inc. (brian.paul 'at' tungstengraphics.com) - Keith Whitwell, Tungsten Graphics, Inc. (keith 'at' tungstengraphics.com) - -Status - - Shipping (Mesa 4.0.4 and later. Only implemented in particular - XFree86/DRI drivers.) - -Version - - 1.0 - -Number - - TBD - -Dependencies - - OpenGL 1.0 or later is required - GLX_NV_vertex_array_range is required. - This extensions is written against the OpenGL 1.4 Specification. - -Overview - - This extensions provides a way to convert pointers in an AGP memory - region into byte offsets into the AGP aperture. - Note, this extension depends on GLX_NV_vertex_array_range, for which - no real specification exists. See GL_NV_vertex_array_range for more - information. - -IP Status - - None - -Issues - - None - -New Procedures and Functions - - unsigned int glXGetAGPOffsetMESA( const void *pointer ) - -New Tokens - - None - -Additions to the OpenGL 1.4 Specification - - None - -Additions to Chapter 3 the GLX 1.4 Specification (Functions and Errors) - - Add a new section, 3.6 as follows: - - 3.6 AGP Memory Access - - On "PC" computers, AGP memory can be allocated with glXAllocateMemoryNV - and freed with glXFreeMemoryNV. Sometimes it's useful to know where a - block of AGP memory is located with respect to the start of the AGP - aperature. The function - - GLuint glXGetAGPOffsetMESA( const GLvoid *pointer ) - - Returns the offset of the given memory block from the start of AGP - memory in basic machine units (i.e. bytes). If pointer is invalid - the value ~0 will be returned. - -GLX Protocol - - None. This is a client side-only extension. - -Errors - - glXGetAGPOffsetMESA will return ~0 if the pointer does not point to - an AGP memory region. - -New State - - None - -Revision History - - 20 September 2002 - Initial draft - 2 October 2002 - finished GLX chapter 3 additions - 27 July 2004 - use unsigned int instead of GLuint, void instead of GLvoid diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MESA_copy_sub_buffer.spec b/nx-X11/extras/Mesa_6.4.2/docs/MESA_copy_sub_buffer.spec deleted file mode 100644 index 43424a5f46..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MESA_copy_sub_buffer.spec +++ /dev/null @@ -1,88 +0,0 @@ -Name - - MESA_copy_sub_buffer - -Name Strings - - GLX_MESA_copy_sub_buffer - -Contact - - Brian Paul (brian.paul 'at' tungstengraphics.com) - -Status - - Shipping since Mesa 2.6 in February, 1998. - -Version - - Last Modified Date: 8 June 2000 - -Number - - 215 - -Dependencies - - OpenGL 1.0 or later is required. - GLX 1.0 or later is required. - -Overview - - The glxCopySubBufferMESA() function copies a rectangular region - of the back color buffer to the front color buffer. This can be - used to quickly repaint 3D windows in response to expose events - when the back color buffer cannot be damaged by other windows. - -IP Status - - Open-source; freely implementable. - -Issues - - None. - -New Procedures and Functions - - void glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable, - int x, int y, int width, int height ); - -New Tokens - - None. - -Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors) - - Add to section 3.3.10 Double Buffering: - - The function - - void glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable, - int x, int y, int width, int height ); - - may be used to copy a rectangular region of the back color buffer to - the front color buffer. This can be used to quickly repaint 3D windows - in response to expose events when the back color buffer cannot be - damaged by other windows. - - and indicates the lower-left corner of the region to copy and - and indicate the size in pixels. Coordinate (0,0) - corresponds to the lower-left pixel of the window, like glReadPixels. - -GLX Protocol - - None at this time. The extension is implemented in terms of ordinary - Xlib protocol inside of Mesa. - -Errors - - None. - -New State - - None. - -Revision History - - 8 June 2000 - initial specification - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MESA_pack_invert.spec b/nx-X11/extras/Mesa_6.4.2/docs/MESA_pack_invert.spec deleted file mode 100644 index 53d5fca71b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MESA_pack_invert.spec +++ /dev/null @@ -1,138 +0,0 @@ -Name - - MESA_pack_invert - -Name Strings - - GL_MESA_pack_invert - -Contact - - Brian Paul, Tungsten Graphics, Inc. (brian.paul 'at' tungstengraphics.com) - Keith Whitwell, Tungsten Graphics, Inc. (keith 'at' tungstengraphics.com) - -Status - - Shipping (Mesa 4.0.4 and later) - -Version - - 1.0 - -Number - - TBD - -Dependencies - - OpenGL 1.0 or later is required - This extensions is written against the OpenGL 1.4 Specification. - -Overview - - This extension adds a new pixel storage parameter to indicate that - images are to be packed in top-to-bottom order instead of OpenGL's - conventional bottom-to-top order. Only pixel packing can be - inverted (i.e. for glReadPixels, glGetTexImage, glGetConvolutionFilter, - etc). - - Almost all known image file formats store images in top-to-bottom - order. As it is, OpenGL reads images from the frame buffer in - bottom-to-top order. Thus, images usually have to be inverted before - writing them to a file with image I/O libraries. This extension - allows images to be read such that inverting isn't needed. - -IP Status - - None - -Issues - - 1. Should we also defined UNPACK_INVERT_MESA for glDrawPixels, etc? - - Resolved: No, we're only concerned with pixel packing. There are other - solutions for inverting images when using glDrawPixels (negative Y pixel - zoom) or glTexImage (invert the vertex T coordinates). It would be easy - enough to define a complementary extension for pixel packing in the - future if needed. - -New Procedures and Functions - - None - -New Tokens - - Accepted by the parameter of PixelStorei and PixelStoref - and the parameter of GetIntegerv, GetFloatv, GetDoublev - and GetBooleanv: - - PACK_INVERT_MESA 0x8758 - -Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation) - - None - -Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization) - - None - -Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment -Operations and the Frame Buffer) - - Add the following entry to table 4.4 (PixelStore parameters) on page 182: - - Parameter Name Type Initial Value Valid Range - --------------------------------------------------------- - PACK_INVERT_MESA boolean FALSE TRUE/FALSE - - In the section labeled "Placement in Client Memory" on page 184 - insert the following text into the paragraph before the sentence - that starts with "If the format is RED, GREEN, BLUE...": - - "The parameter PACK_INVERT_MESA controls whether the image is packed - in bottom-to-top order (the default) or top-to-bottom order. Equation - 3.8 is modified as follows: - - ... the first element of the Nth row is indicated by - - p + Nk, if PACK_INVERT_MESA is false - p + k * (H - 1) - Nk, if PACK_INVERT_MESA is true, where H is the - image height - " - -Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions) - - None - -Additions to Chapter 6 of the OpenGL 1.4 Specification (State and -State Requests) - - None - -Additions to Appendix A of the OpenGL 1.4 Specification (Invariance) - - None - -Additions to the AGL/GLX/WGL Specifications - - None - -GLX Protocol - - None - -Errors - - None - -New State - - Add the following entry to table 6.20 (Pixels) on page 235: - - Get Value Type Get Cmd Initial Value Description Sec Attribute - -------------------------------------------------------------------------------------------------- - PACK_INVERT_MESA boolean GetBoolean FALSE Value of PACK_INVERT_MESA 4.3.2 pixel-store - -Revision History - - 21 September 2002 - Initial draft diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MESA_packed_depth_stencil.spec b/nx-X11/extras/Mesa_6.4.2/docs/MESA_packed_depth_stencil.spec deleted file mode 100644 index 4f7ab1e28c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MESA_packed_depth_stencil.spec +++ /dev/null @@ -1,231 +0,0 @@ -Name - - MESA_packed_depth_stencil - -Name Strings - - GL_MESA_packed_depth_stencil - -Contact - - Keith Whitwell, VA Linux Systems Inc. (keithw 'at' valinux.com) - Brian Paul, VA Linux Systems Inc. (brianp 'at' valinux.com) - -Status - - Obsolete. - -Version - - $Id: MESA_packed_depth_stencil.spec,v 1.2 2003/09/19 14:58:21 brianp Exp $ - -Number - - ??? - -Dependencies - - EXT_abgr affects the definition of this extension - SGIS_texture4D affects the definition of this extension - EXT_cmyka affects the definition of this extension - ARB_packed_pixels affects the definition of this extension - -Overview - - Provides a mechanism for DrawPixels and ReadPixels to efficiently - transfer depth and stencil image data. Specifically, we defined new - packed pixel formats and types which pack both stencil and depth - into one value. - -Issues: - - 1. Is this the right way to distinguish between 24/8 and 8/24 - pixel formats? Should we instead provide both: - - GL_DEPTH_STENCIL_MESA - GL_STENCIL_DEPTH_MESA - - And perhaps just use GL_UNSIGNED_INT, GL_UNSIGNED_SHORT ? - - 2. If not, is it correct to use _REV to indicate that stencil - preceeds depth in the 1_15 and 8_24 formats? - - 3. Do we really want the GL_UNSIGNED_SHORT formats? - - -New Procedures and Functions - - None. - -New Tokens - - Accepted by the parameter of ReadPixels and DrawPixels: - - GL_DEPTH_STENCIL_MESA 0x8750 - - Accepted by the parameter of ReadPixels and DrawPixels: - - GL_UNSIGNED_INT_24_8_MESA 0x8751 - GL_UNSIGNED_INT_8_24_REV_MESA 0x8752 - GL_UNSIGNED_SHORT_15_1_MESA 0x8753 - GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754 - -Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation) - - None - -Additions to Chapter 3 of the 1.1 Specification (Rasterization) - - One entry is added to table 3.5 (DrawPixels and ReadPixels formats). - The new table is: - - Target - Format Name Buffer Element Meaning and Order - ----------- ------ ------------------------- - COLOR_INDEX Color Color index - STENCIL_INDEX Stencil Stencil index - DEPTH_COMPONENT Depth Depth component - RED Color R component - GREEN Color G component - BLUE Color B component - ALPHA Color A component - RGB Color R, G, B components - RGBA Color R, G, B, A components - BGRA Color B, G, R, A components - ABGR_EXT Color A, B, G, R components - CMYK_EXT Color Cyan, Magenta, Yellow, Black components - CMYKA_EXT Color Cyan, Magenta, Yellow, Black, A components - LUMINANCE Color Luminance component - LUMINANCE_ALPHA Color Luminance, A components - DEPTH_STENCIL Depth, Depth component, stencil index. - Stencil - - Table 3.5: DrawPixels and ReadPixels formats. The third column - gives a description of and the number and order of elements in a - group. - - Add to the description of packed pixel formats: - - Parameter Data of Matching - Token Name Type Elements Pixel Formats - ---------------- ---- -------- ------------- - - UNSIGNED_BYTE_3_3_2 ubyte 3 RGB - UNSIGNED_BYTE_2_3_3_REV ubyte 3 RGB - UNSIGNED_SHORT_5_6_5 ushort 3 RGB - UNSIGNED_SHORT_5_6_5_REV ushort 3 RGB - UNSIGNED_SHORT_4_4_4_4 ushort 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT - UNSIGNED_SHORT_4_4_4_4_REV ushort 4 RGBA,BGRA - UNSIGNED_SHORT_5_5_5_1 ushort 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT - UNSIGNED_SHORT_1_5_5_5_REV ushort 4 RGBA,BGRA - UNSIGNED_INT_8_8_8_8 uint 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT - UNSIGNED_INT_8_8_8_8_REV uint 4 RGBA,BGRA - UNSIGNED_INT_10_10_10_2 uint 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT - UNSIGNED_INT_2_10_10_10_REV uint 4 RGBA,BGRA - UNSIGNED_SHORT_15_1_MESA ushort 2 DEPTH_STENCIL_MESA - UNSIGNED_SHORT_1_15_REV_MESA ushort 2 DEPTH_STENCIL_MESA - UNSIGNED_SHORT_24_8_MESA ushort 2 DEPTH_STENCIL_MESA - UNSIGNED_SHORT_8_24_REV_MESA ushort 2 DEPTH_STENCIL_MESA - - UNSIGNED_INT_8_24: - - 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - +-----------------------+-----------------------------------------------------------------------+ - | | | - +-----------------------+-----------------------------------------------------------------------+ - - first second - element element - - - UNSIGNED_INT_24_8: - - 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - +----------------------------------------------------------------------+------------------------+ - | | | - +----------------------------------------------------------------------+------------------------+ - - first second - element element - - UNSIGNED_SHORT_15_1: - - 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - +-----------------------------------------------------------+---+ - | | | - +-----------------------------------------------------------+---+ - - first second - element element - - - UNSIGNED_SHORT_1_15_REV: - - 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - +---+-----------------------------------------------------------+ - | | | - +---+-----------------------------------------------------------+ - - second first - element element - - The assignment of elements to fields in the packed pixel is as - described in the table below: - - First Second Third Fourth - Format Element Element Element Element - ------ ------- ------- ------- ------- - RGB red green blue - RGBA red green blue alpha - BGRA blue green red alpha - ABGR_EXT alpha blue green red - CMYK_EXT cyan magenta yellow black - DEPTH_STENCIL_MESA depth stencil - -Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations -and the Frame Buffer) - - The new format is added to the discussion of Obtaining Pixels from the - Framebuffer. It should read " If the is one of RED, GREEN, - BLUE, ALPHA, RGB, RGBA, ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, and - the GL is in color index mode, then the color index is obtained." - - The new format is added to the discussion of Index Lookup. It should - read "If is one of RED, GREEN, BLUE, ALPHA, RGB, RGBA, - ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, then the index is used to - reference 4 tables of color components: PIXEL_MAP_I_TO_R, - PIXEL_MAP_I_TO_G, PIXEL_MAP_I_TO_B, and PIXEL_MAP_I_TO_A." - - -Additions to Chapter 5 of the 1.1 Specification (Special Functions) - - None - -Additions to Chapter 6 of the 1.1 Specification (State and State Requests) - - None - -Additions to the GLX Specification - - None - -GLX Protocol - - TBD - -Errors - - None - -New State - - None - -Revision History - - Version 1.0 - 23 Sep 2000 - Keith's original version. - - Version 1.1 - 3 Nov 2000 - Brian's edits, assigned values to new enums. - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MESA_pixmap_colormap.spec b/nx-X11/extras/Mesa_6.4.2/docs/MESA_pixmap_colormap.spec deleted file mode 100644 index fb0b441cc5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MESA_pixmap_colormap.spec +++ /dev/null @@ -1,90 +0,0 @@ -Name - - MESA_pixmap_colormap - -Name Strings - - GLX_MESA_pixmap_colormap - -Contact - - Brian Paul (brian.paul 'at' tungstengraphics.com) - -Status - - Shipping since Mesa 1.2.8 in May, 1996. - -Version - - Last Modified Date: 8 June 2000 - -Number - - 216 - -Dependencies - - OpenGL 1.0 or later is required. - GLX 1.0 or later is required. - -Overview - - Since Mesa allows RGB rendering into drawables with PseudoColor, - StaticColor, GrayScale and StaticGray visuals, Mesa needs a colormap - in order to compute pixel values during rendering. - - The colormap associated with a window can be queried with normal - Xlib functions but there is no colormap associated with pixmaps. - - The glXCreateGLXPixmapMESA function is an alternative to glXCreateGLXPixmap - which allows specification of a colormap. - -IP Status - - Open-source; freely implementable. - -Issues - - None. - -New Procedures and Functions - - GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual, - Pixmap pixmap, Colormap cmap ); - -New Tokens - - None. - -Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors) - - Add to section 3.4.2 Off Screen Rendering - - The Mesa implementation of GLX allows RGB rendering into X windows and - pixmaps of any visual class, not just TrueColor or DirectColor. In order - to compute pixel values from RGB values Mesa requires a colormap. - - The function - - GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual, - Pixmap pixmap, Colormap cmap ); - - allows one to create a GLXPixmap with a specific colormap. The image - rendered into the pixmap may then be copied to a window (which uses the - same colormap and visual) with the expected results. - -GLX Protocol - - None since this is a client-side extension. - -Errors - - None. - -New State - - None. - -Revision History - - 8 June 2000 - initial specification diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MESA_program_debug.spec b/nx-X11/extras/Mesa_6.4.2/docs/MESA_program_debug.spec deleted file mode 100644 index 391d39fa70..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MESA_program_debug.spec +++ /dev/null @@ -1,357 +0,0 @@ -Name - - MESA_program_debug - -Name Strings - - GL_MESA_program_debug - -Contact - - Brian Paul (brian.paul 'at' tungstengraphics.com) - -Status - - XXX - Not complete yet!!! - -Version - - Last Modified Date: July 20, 2003 - Author Revision: 1.0 - $Date: 2004/03/25 01:42:41 $ $Revision: 1.4 $ - -Number - - TBD - -Dependencies - - OpenGL 1.4 is required - The extension is written against the OpenGL 1.4 specification. - ARB_vertex_program or ARB_fragment_program or NV_vertex_program - or NV_fragment_program is required. - -Overview - - The extension provides facilities for implementing debuggers for - vertex and fragment programs. - - The concept is that vertex and fragment program debuggers will be - implemented outside of the GL as a utility package. This extension - only provides the minimal hooks required to implement a debugger. - - There are facilities to do the following: - 1. Have the GL call a user-specified function prior to executing - each vertex or fragment instruction. - 2. Query the current program string's execution position. - 3. Query the current values of intermediate program values. - - The main feature is the ProgramCallbackMESA function. It allows the - user to register a callback function with the GL. The callback will - be called prior to executing each vertex or fragment program instruction. - - From within the callback, the user may issue Get* commands to - query current GL state. The GetProgramRegisterfvMESA function allows - current program values to be queried (such as temporaries, input - attributes, and result registers). - - There are flags for enabling/disabling the program callbacks. - - The current execution position (as an offset from the start of the - program string) can be queried with - GetIntegerv(GL_FRAGMENT_PROGRAM_POSITION_MESA, &pos) or - GetIntegerv(GL_VERTEX_PROGRAM_POSITION_MESA, &pos). - - -IP Status - - None - -Issues - - 1. Is this the right model for a debugger? - - It seems prudent to minimize the scope of this extension and leave - it up to the developer (or developer community) to write debuggers - that layer on top of this extension. - - If the debugger were fully implemented within the GL it's not - clear how terminal and GUI-based interfaces would work, for - example. - - 2. There aren't any other extensions that register callbacks with - the GL. Isn't there another solution? - - If we want to be able to single-step through vertex/fragment - programs I don't see another way to do it. - - 3. How do we prevent the user from doing something crazy in the - callback function, like trying to call glBegin (leading to - recursion)? - - The rule is that the callback function can only issue glGet*() - functions and no other GL commands. It could be difficult to - enforce this, however. Therefore, calling any non-get GL - command from within the callback will result in undefined - results. - - 4. Is this extension amenable to hardware implementation? - - Hopefully, but if not, the GL implementation will have to fall - back to a software path when debugging. This may be acceptable - for debugging. - - 5. What's the parameter to ProgramCallbackMESA for? - - It's a common programming practice to associate a user-supplied - value with callback functions. - - 6. Debuggers often allow one to modify intermediate program values, - then continue. Does this extension support that? - - No. - - -New Procedures and Functions (and datatypes) - - typedef void (*programcallbackMESA)(enum target, void *data) - - void ProgramCallbackMESA(enum target, programcallbackMESA callback, - void *data) - - void GetProgramRegisterfvMESA(enum target, sizei len, - const ubyte *registerName, float *v) - -New Tokens - - Accepted by the parameter of Enable, Disable, IsEnabled, - GetBooleanv, GetDoublev, GetFloatv and GetIntegerv: - - FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1 - VERTEX_PROGRAM_CALLBACK_MESA 0x8bb4 - - Accepted by the parameter GetBooleanv, GetDoublev, - GetFloatv and GetIntegerv: - - FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0 - VERTEX_PROGRAM_POSITION_MESA 0x8bb4 - - Accepted by the parameter of GetPointerv: - - FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2 - FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3 - VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6 - VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7 - -Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation) - - None. - -Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization) - - None. - -Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment -Operations and the Frame Buffer) - - None. - -Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions) - - In section 5.4 "Display Lists", page 202, add the following command - to the list of those that are not compiled into display lists: - - ProgramCallbackMESA. - - - Add a new section 5.7 "Callback Functions" - - The function - - void ProgramCallbackMESA(enum target, programcallbackMESA callback, - void *data) - - registers a user-defined callback function with the GL. - may be FRAGMENT_PROGRAM_ARB or VERTEX_PROGRAM_ARB. The enabled - callback functions registered with these targets will be called - prior to executing each instruction in the current fragment or - vertex program, respectively. The callbacks are enabled and - disabled by calling Enable or Disable with - FRAGMENT_PROGRAM_ARB or VERTEX_PROGRAM_ARB. - - The callback function's signature must match the typedef - - typedef void (*programcallbackMESA)(enum target, void *data) - - When the callback function is called, will either be - FRAGMENT_PROGRAM_ARB or VERTEX_PROGRAM_ARB to indicate which - program is currently executing and will be the value - specified when ProgramCallbackMESA was called. - - From within the callback function, only the following GL commands - may be called: - - GetBooleanv - GetDoublev - GetFloatv - GetIntegerv - GetProgramLocalParameter - GetProgramEnvParameter - GetProgramRegisterfvMESA - GetProgramivARB - GetProgramStringARB - GetError - - Calling any other command from within the callback results in - undefined behaviour. - - -Additions to Chapter 6 of the OpenGL 1.4 Specification (State and -State Requests) - - Add a new section 6.1.3 "Program Value Queries": - - The command - - void GetProgramRegisterfvMESA(enum target, sizei len, - const ubyte *registerName, - float *v) - - Is used to query the value of program variables and registers - during program execution. GetProgramRegisterfvMESA may only be - called from within a callback function registered with - ProgramCallbackMESA. - - and specify the name a variable, input - attribute, temporary, or result register in the program string. - The current value of the named variable is returned as four - values in . If doesn't exist in the program string, - the error INVALID_OPERATION is generated. - -Additions to Appendix A of the OpenGL 1.4 Specification (Invariance) - - None. - -Additions to the AGL/GLX/WGL Specifications - - None. - -GLX Protocol - - XXX TBD - -Dependencies on NV_vertex_program and NV_fragment_program - - If NV_vertex_program and/or NV_fragment_program are supported, - vertex and/or fragment programs defined by those extensions may - be debugged as well. Register queries will use the syntax used - by those extensions (i.e. "v[X]" to query vertex attributes, - "o[X]" for vertex outputs, etc.) - -Errors - - INVALID_OPERATION is generated if ProgramCallbackMESA is called - between Begin and End. - - INVALID_ENUM is generated by ProgramCallbackMESA if is not - a supported vertex or fragment program type. - - Note: INVALID_OPERAION IS NOT generated by GetProgramRegisterfvMESA, - GetBooleanv, GetDoublev, GetFloatv, or GetIntegerv if called between - Begin and End when a vertex or fragment program is currently executing. - - INVALID_ENUM is generated by ProgramCallbackMESA, - GetProgramRegisterfvMESA if is not a program target supported - by ARB_vertex_program, ARB_fragment_program (or NV_vertex_program or - NV_fragment_program). - - INVALID_VALUE is generated by GetProgramRegisterfvMESA if - does not name a known program register or variable. - - INVALID_OPERATION is generated by GetProgramRegisterfvMESA when a - register query is attempted for a program target that's not currently - being executed. - - -New State - - XXX finish - -(table 6.N, p. ###) - Initial - Get Value Type Get Command Value Description Sec. Attribute - --------- ---- ----------- ----- ----------- ---- --------- - FRAGMENT_PROGRAM_CALLBACK_MESA B IsEnabled FALSE XXX XXX enable - VERTEX_PROGRAM_CALLBACK_MESA B IsEnabled FALSE XXX XXX enable - FRAGMENT_PROGRAM_POSITION_MESA Z+ GetIntegerv -1 XXX XXX - - VERTEX_PROGRAM_POSITION_MESA Z+ GetIntegerv -1 XXX XXX - - FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA P GetPointerv NULL XXX XXX - - VERTEX_PROGRAM_CALLBACK_FUNC_MESA P GetPointerv NULL XXX XXX - - FRAGMENT_PROGRAM_CALLBACK_DATA_MESA P GetPointerv NULL XXX XXX - - VERTEX_PROGRAM_CALLBACK_DATA_MESA P GetPointerv NULL XXX XXX - - - XXX more? - -New Implementation Dependent State - - None. - -Revision History - - 8 July 2003 - Initial draft. (Brian Paul) - 11 July 2003 - Second draft. (Brian Paul) - 20 July 2003 - Third draft. Lots of fundamental changes. (Brian Paul) - 23 July 2003 - Added chapter 5 and 6 spec language. (Brian Paul) - -Example Usage - - The following is a very simple example of how this extension may - be used to print the values of R0, R1, R2 and R3 while executing - vertex programs. - - - /* This is called by the GL when the vertex program is executing. - * We can only make glGet* calls from within this function! - */ - void DebugCallback(GLenum target, GLvoid *data) - { - GLint pos; - GLuint i; - - /* Get PC and current instruction string */ - glGetIntegerv(GL_VERTEX_PROGRAM_POSITION_ARB, &pos); - - printf("Current position: %d\n", pos); - - printf("Current temporary registers:\n"); - for (i = 0; i < 4; i++) { - GLfloat v[4]; - char s[10]; - sprintf(s, "R%d", i); - glGetProgramRegisterfvMESA(GL_VERTEX_PROGRAM_ARB, strlen(s), s, v); - printf("R%d = %g, %g, %g, %g\n", i, v[0], v[1], v[2], v[3]); - } - } - - - /* - * elsewhere... - */ - - /* Register our debugger callback function */ - glProgramCallbackMESA(GL_VERTEX_PROGRAM_ARB, DebugCallback, NULL); - glEnable(GL_VERTEX_PROGRAM_CALLBACK_MESA); - - /* define/bind a vertex program */ - - glEnable(GL_VERTEX_PROGRAM); - - /* render something */ - glBegin(GL_POINTS); - glVertex2f(0, 0); - glEnd(); - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MESA_release_buffers.spec b/nx-X11/extras/Mesa_6.4.2/docs/MESA_release_buffers.spec deleted file mode 100644 index 8db9350d83..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MESA_release_buffers.spec +++ /dev/null @@ -1,85 +0,0 @@ -Name - - MESA_release_buffers - -Name Strings - - GLX_MESA_release_buffers - -Contact - - Brian Paul (brian.paul 'at' tungstengraphics.com) - -Status - - Shipping since Mesa 2.0 in October, 1996. - -Version - - Last Modified Date: 8 June 2000 - -Number - - 217 - -Dependencies - - OpenGL 1.0 or later is required. - GLX 1.0 or later is required. - -Overview - - Mesa's implementation of GLX is entirely implemented on the client side. - Therefore, Mesa cannot immediately detect when an X window or pixmap is - destroyed in order to free any ancilliary data associated with the window - or pixmap. - - The glxMesaReleaseBuffers() function can be used to explicitly indicate - when the back color buffer, depth buffer, stencil buffer, and/or accum- - ulation buffer associated with a drawable can be freed. - -IP Status - - Open-source; freely implementable. - -Issues - - None. - -New Procedures and Functions - - Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d ); - -New Tokens - - None. - -Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors) - - The function - - Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d ); - - causes all software ancilliary buffers (back buffer, depth, stencil, - accum, etc) associated with the named drawable to be immediately - deallocated. True is returned if is a valid Mesa GLX drawable, - else False is returned. After calling glXReleaseBuffersMESA, the - drawable should no longer be used for GL rendering. Results of - attempting to do so are undefined. - - -GLX Protocol - - None, since this is a client-side operation. - -Errors - - None. - -New State - - None. - -Revision History - - 8 June 2000 - initial specification diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MESA_resize_buffers.spec b/nx-X11/extras/Mesa_6.4.2/docs/MESA_resize_buffers.spec deleted file mode 100644 index f79d29c405..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MESA_resize_buffers.spec +++ /dev/null @@ -1,82 +0,0 @@ -Name - - MESA_resize_buffers - -Name Strings - - GL_MESA_resize_buffers - -Contact - - Brian Paul (brian.paul 'at' tungstengraphics.com) - -Status - - Shipping (since Mesa version 2.2) - -Version - - $Id: MESA_resize_buffers.spec,v 1.3 2004/03/25 01:42:42 brianp Exp $ - -Number - - 196 - -Dependencies - - Mesa 2.2 or later is required. - -Overview - - Mesa is often used as a client library with no integration with - the computer's window system (an X server, for example). And since - Mesa does not have an event loop nor window system callbacks, it - cannot properly respond to window system events. In particular, - Mesa cannot automatically detect when a window has been resized. - - Mesa's glViewport command queries the current window size and updates - its internal data structors accordingly. This normally works fine - since most applications call glViewport in responce to window size - changes. - - In some situations, however, the application may not call glViewport - when a window size changes but would still like Mesa to adjust to - the new window size. This extension exports a new function to solve - this problem. - -New Procedures and Functions - - void glResizeBuffersMESA( void ) - -New Tokens - - none - -Additions to the OpenGL Specification (no particular section) - - The glResizeBuffersMESA command may be called when the client - determines that a window has been resized. Calling - glResizeBuffersMESA causes Mesa to query the current window size - and adjust its internal data structures. This may include - reallocating depth, stencil, alpha and accumulation buffers. - -Additions to the AGL/GLX/WGL Specifications - - None - -Errors - - INVALID_OPERATION is generated if ResizeBuffersMESA is called betweeen - Begin and End. - -New State - - None. - -New Implementation Dependent State - - None. - -Revision History - - * Revision 1.0 - Initial specification diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MESA_set_3dfx_mode.spec b/nx-X11/extras/Mesa_6.4.2/docs/MESA_set_3dfx_mode.spec deleted file mode 100644 index 06d97ca021..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MESA_set_3dfx_mode.spec +++ /dev/null @@ -1,85 +0,0 @@ -Name - - MESA_set_3dfx_mode - -Name Strings - - GLX_MESA_set_3dfx_mode - -Contact - - Brian Paul (brian.paul 'at' tungstengraphics.com) - -Status - - Shipping since Mesa 2.6 in February, 1998. - -Version - - Last Modified Date: 8 June 2000 - -Number - - 218 - -Dependencies - - OpenGL 1.0 or later is required. - GLX 1.0 or later is required. - -Overview - - The Mesa Glide driver allows full-screen rendering or rendering into - an X window. The glXSet3DfxModeMESA() function allows an application - to switch between full-screen and windowed rendering. - -IP Status - - Open-source; freely implementable. - -Issues - - None. - -New Procedures and Functions - - GLboolean glXSet3DfxModeMESA( GLint mode ); - -New Tokens - - GLX_3DFX_WINDOW_MODE_MESA 0x1 - GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 - -Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors) - - The Mesa Glide device driver allows either rendering in full-screen - mode or rendering into an X window. An application can switch between - full-screen and window rendering with the command: - - GLboolean glXSet3DfxModeMESA( GLint mode ); - - may either be GLX_3DFX_WINDOW_MODE_MESA to indicate window - rendering or GLX_3DFX_FULLSCREEN_MODE_MESA to indicate full-screen mode. - - GL_TRUE is returned if is valid and the operation completed - normally. GL_FALSE is returned if is invalid or if the Glide - driver is not being used. - - Note that only one drawable and context can be created at any given - time with the Mesa Glide driver. - -GLX Protocol - - None since this is a client-side extension. - -Errors - - None. - -New State - - None. - -Revision History - - 8 June 2000 - initial specification diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MESA_sprite_point.spec b/nx-X11/extras/Mesa_6.4.2/docs/MESA_sprite_point.spec deleted file mode 100644 index 9422ff5729..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MESA_sprite_point.spec +++ /dev/null @@ -1,191 +0,0 @@ -Name - - MESA_sprite_point - -Name Strings - - GL_MESA_sprite_point - -Contact - - Brian Paul, VA Linux Systems Inc. (brianp 'at' valinux.com) - -Status - - Obsolete - see GL_ARB_point_sprite. - -Version - - $Id: MESA_sprite_point.spec,v 1.2 2003/09/19 14:58:21 brianp Exp $ - -Number - - ??? - -Dependencies - - GL_EXT_point_parameters effects the definition of this extension - GL_ARB_multitexture effects the definition of this extension - -Overview - - This extension modifies the way in which points are rendered, - specifically when they're textured. When SPRITE_POINT_MESA is enabled - a point is rendered as if it were a quadrilateral with unique texture - coordinates at each vertex. This extension effectively turns points - into sprites which may be rendered more easily and quickly than using - conventional textured quadrilaterals. - - When using point size > 1 or attenuated points this extension is an - effective way to render many small sprite images for particle systems - or other effects. - -Issues: - - 1. How are the texture coordinates computed? - - The lower-left corner has texture coordinate (0,0,r,q). - The lower-right, (1,0,r,q). The upper-right, (1,1,r,q). - The upper-left, (0,1,r,q). - - 2. What about texgen and texture matrices? - - Texgen and the texture matrix have no effect on the point's s and t - texture coordinates. The r and q coordinates may have been computed - by texgen or the texture matrix. Note that with a 3D texture and/or - texgen that the r coordinate could be used to select a slice in the - 3D texture. - - 3. What about point smoothing? - - When point smoothing is enabled, a triangle fan could be rendered - to approximate a circular point. This could be problematic to - define and implement so POINT_SMOOTH is ignored when drawing sprite - points. - - Smoothed points can be approximated by using an appropriate texture - images, alpha testing and blending. - - POLYGON_SMOOTH does effect the rendering of the quadrilateral, however. - - 4. What about sprite rotation? - - There is none. Sprite points are always rendered as window-aligned - squares. One could define rotated texture images if desired. A 3D - texture and appropriate texture r coordinates could be used to - effectively specify image rotation per point. - - 5. What about POLYGON_MODE? - - POLYGON_MODE does not effect the rasterization of the quadrilateral. - - 6. What about POLYGON_CULL? - - TBD. Polygon culling is normally specified and implemented in the - transformation stage of OpenGL. However, some rasterization hardware - implements it later during triangle setup. - - Polygon culling wouldn't be useful for sprite points since the - quadrilaterals are always defined in counter-clockwise order in - window space. For that reason, polygon culling should probably be - ignored. - - 7. Should sprite points be alpha-attenuated if their size is below the - point parameter's threshold size? - - 8. Should there be an advertisized maximum sprite point size? - - No. Since we're rendering the point as a quadrilateral there's no - need to limit the size. - - -New Procedures and Functions - - None. - -New Tokens - - Accepted by the parameter of Enable, Disable, IsEnabled, - GetIntegerv, GetBooleanv, GetFloatv and GetDoublev: - - SPRITE_POINT_MESA 0x???? - MAX_SPRITE_POINT_SIZE_MESA 0x???? (need this?) - -Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation) - - None - -Additions to Chapter 3 of the 1.1 Specification (Rasterization) - - Section ???. - - When SPRITE_POINT_MESA is enabled points are rasterized as screen- - aligned quadrilaterals. If the four vertices of the quadrilateral - are labeled A, B, C, and D, starting at the lower-left corner and moving - counter-clockwise around the quadrilateral, then the vertex and - texture coordinates are computed as follows: - - vertex window coordinate texture coordinate - A (x-r, y-r, z, w) (0, 0, r, q) - B (x+r, y-r, z, w) (1, 0, r, q) - C (x+r, y+r, z, w) (1, 1, r, q) - D (x-r, y+r, z, w) (0, 1, r, q) - - where x, y, z, w are the point's window coordinates, r and q are the - point's 3rd and 4th texture coordinates and r is half the point's - size. The other vertex attributes (such as the color and fog coordinate) - are simply duplicated from the original point vertex. - - Point size may either be specified with PointSize or computed - according to the EXT_point_parameters extension. - - The new texture coordinates are not effected by texgen or the texture - matrix. Note, however, that the texture r and q coordinates are passed - unchanged and may have been computed with texgen and/or the texture - matrix. - - If multiple texture units are present the same texture coordinate is - used for all texture units. - - The point is then rendered as if it were a quadrilateral using the - normal point sampling rules. POLYGON_MODE does not effect the - rasterization of the quadrilateral but POLYGON_SMOOTH does. - - POINT_SMOOTH has no effect when SPRITE_POINT_MESA is enabled. - -Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations -and the Frame Buffer) - - None. - -Additions to Chapter 5 of the 1.1 Specification (Special Functions) - - None - -Additions to Chapter 6 of the 1.1 Specification (State and State Requests) - - None - -Additions to the GLX Specification - - None - -GLX Protocol - - TBD - -Errors - - None - -New State - - Add boolean variable SPRITE_POINT_MESA to the point attribute group. - -Revision History - - Version 1.0 - 4 Dec 2000 - Original draft. - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MESA_swap_control.spec b/nx-X11/extras/Mesa_6.4.2/docs/MESA_swap_control.spec deleted file mode 100644 index ecc674649e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MESA_swap_control.spec +++ /dev/null @@ -1,132 +0,0 @@ -Name - - MESA_swap_control - -Name Strings - - GLX_MESA_swap_control - -Contact - - Ian Romanick, IBM, idr at us.ibm.com - -Status - - Deployed in DRI drivers post-XFree86 4.3. - -Version - - Date: 5/1/2003 Revision: 1.1 - -Number - - ??? - -Dependencies - - None - - Based on GLX_SGI_swap_control version 1.9 and WGL_EXT_swap_control - version 1.5. - -Overview - - This extension allows an application to specify a minimum periodicity - of color buffer swaps, measured in video frame periods. - -Issues - - * Should implementations that export GLX_MESA_swap_control also export - GL_EXT_swap_control for compatibility with WGL_EXT_swap_control? - - UNRESOLVED. - -New Procedures and Functions - - int glXSwapIntervalMESA(int interval) - int glXGetSwapIntervalMESA(void) - -New Tokens - - None - -Additions to Chapter 2 of the 1.4 GL Specification (OpenGL Operation) - - None - -Additions to Chapter 3 of the 1.4 GL Specification (Rasterization) - - None - -Additions to Chapter 4 of the 1.4 GL Specification (Per-Fragment Operations -and the Framebuffer) - - None - -Additions to Chapter 5 of the 1.4 GL Specification (Special Functions) - - None - -Additions to Chapter 6 of the 1.4 GL Specification (State and State Requests) - - None - -Additions to the GLX 1.3 Specification - - [Add the following to Section 3.3.10 of the GLX Specification (Double - Buffering)] - - glXSwapIntervalMESA specifies the minimum number of video frame periods - per buffer swap. (e.g. a value of two means that the color buffers - will be swapped at most every other video frame.) A return value - of zero indicates success; otherwise an error occurred. The interval - takes effect when glXSwapBuffers is first called subsequent to the - glXSwapIntervalMESA call. - - A video frame period is the time required by the monitor to display a - full frame of video data. In the case of an interlaced monitor, - this is typically the time required to display both the even and odd - fields of a frame of video data. - - If is set to a value of 0, buffer swaps are not synchron- - ized to a video frame. The value is silently clamped to - the maximum implementation-dependent value supported before being - stored. - - The swap interval is not part of the render context state. It cannot - be pushed or popped. The current swap interval for the window - associated with the current context can be obtained by calling - glXGetSwapIntervalMESA. The default swap interval is 0. - - On XFree86, setting the environment variable LIBGL_THROTTLE_REFRESH sets - the swap interval to 1. - -Errors - - glXSwapIntervalMESA returns GLX_BAD_VALUE if parameter is - less than zero. - - glXSwapIntervalMESA returns GLX_BAD_CONTEXT if there is no current - GLXContext. - -GLX Protocol - - None. This extension only extends to direct rendering contexts. - -New State - - Get Value Get Command Type Initial Value - --------- ----------- ---- ------------- - [swap interval] GetSwapInterval Z+ 0 - -New Implementation Dependent State - - None - - -Revision History - - 1.1, 5/1/03 Added the issues section and contact information. - Changed the default swap interval to 0. - 1.0, 3/17/03 Initial version based on GLX_SGI_swap_control and - WGL_EXT_swap_control. diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MESA_swap_frame_usage.spec b/nx-X11/extras/Mesa_6.4.2/docs/MESA_swap_frame_usage.spec deleted file mode 100644 index 38cf51a209..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MESA_swap_frame_usage.spec +++ /dev/null @@ -1,201 +0,0 @@ -Name - - MESA_swap_frame_usage - -Name Strings - - GLX_MESA_swap_frame_usage - -Contact - - Ian Romanick, IBM, idr at us.ibm.com - -Status - - Deployed in DRI drivers post-XFree86 4.3. - -Version - - Date: 5/1/2003 Revision: 1.1 - -Number - - ??? - -Dependencies - - GLX_SGI_swap_control affects the definition of this extension. - GLX_MESA_swap_control affects the definition of this extension. - GLX_OML_sync_control affects the definition of this extension. - - Based on WGL_I3D_swap_frame_usage version 1.3. - -Overview - - This extension allows an application to deterine what portion of the - swap period has elapsed since the last swap operation completed. The - "usage" value is a floating point value on the range [0,max] which is - calculated as follows: - - td - percent = ---- - tf - - where td is the time measured from the last completed buffer swap (or - call to enable the statistic) to when the next buffer swap completes, tf - is the entire time for a frame which may be multiple screen refreshes - depending on the swap interval as set by the GLX_SGI_swap_control or - GLX_OML_sync_control extensions. - - The value, percent, indicates the amount of time spent between the - completion of the two swaps. If the value is in the range [0,1], the - buffer swap occurred within the time period required to maintain a - constant frame rate. If the value is in the range (1,max], a constant - frame rate was not achieved. The value indicates the number of frames - required to draw. - - This definition of "percent" differs slightly from - WGL_I3D_swap_frame_usage. In WGL_I3D_swap_frame_usage, the measurement - is taken from the completion of one swap to the issuance of the next. - This representation may not be as useful as measuring between - completions, as a significant amount of time may pass between the - issuance of a swap and the swap actually occuring. - - There is also a mechanism to determine whether a frame swap was - missed. - -New Procedures and Functions - - int glXGetFrameUsageMESA(Display *dpy, - GLXDrawable drawable, - float *usage) - - int glXBeginFrameTrackingMESA(Display *dpy, - GLXDrawable drawable) - - int glXEndFrameTrackingMESA(Display *dpy, - GLXDrawable drawable) - - int glXQueryFrameTrackingMESA(Display *dpy, - GLXDrawable drawable, - int64_t *swapCount, - int64_t *missedFrames, - float *lastMissedUsage) - -New Tokens - - None - -Additions to Chapter 2 of the 1.4 GL Specification (OpenGL Operation) - - None - -Additions to Chapter 3 of the 1.4 GL Specification (Rasterization) - - None - -Additions to Chapter 4 of the 1.4 GL Specification (Per-Fragment Operations -and the Framebuffer) - - None - -Additions to Chapter 5 of the 1.4 GL Specification (Special Functions) - - None - -Additions to Chapter 6 of the 1.4 GL Specification (State and State Requests) - - None - -Additions to the GLX 1.3 Specification - - The frame usage is measured as the percentage of the swap period elapsed - between two buffer-swap operations being commited. In unextened GLX the - swap period is the vertical refresh time. If SGI_swap_control or - MESA_swap_control are supported, the swap period is the vertical refresh - time multiplied by the swap interval (or one if the swap interval is set - to zero). - - If OML_sync_control is supported, the swap period is the vertical - refresh time multiplied by the divisor parameter to - glXSwapBuffersMscOML. The frame usage in this case is less than 1.0 if - the swap is commited before target_msc, and is greater than or equal to - 1.0 otherwise. The actual usage value is based on the divisor and is - never less than 0.0. - - int glXBeginFrameTrackingMESA(Display *dpy, - GLXDrawable drawable, - float *usage) - - glXGetFrameUsageMESA returns a floating-point value in - that represents the current swap usage, as defined above. - - Missed frame swaps can be tracked by calling the following function: - - int glXBeginFrameTrackingMESA(Display *dpy, - GLXDrawable drawable) - - glXBeginFrameTrackingMESA resets a "missed frame" count and - synchronizes with the next frame vertical sync before it returns. - If a swap is missed based in the rate control specified by the - set by glXSwapIntervalSGI or the default swap of once - per frame, the missed frame count is incremented. - - The current missed frame count and total number of swaps since - the last call to glXBeginFrameTrackingMESA can be obtained by - callling the following function: - - int glXQueryFrameTrackingMESA(Display *dpy, - GLXDrawable drawable, - int64_t *swapCount, - int64_t *missedFrames, - float *lastMissedUsage) - - The location pointed to by will be updated with the - number of swaps that have been commited. This value may not match the - number of swaps that have been requested since swaps may be - queued by the implementation. This function can be called at any - time and does not synchronize to vertical blank. - - The location pointed to by will contain the number - swaps that missed the specified frame. The frame usage for the - last missed frame is returned in the location pointed to by - . - - Frame tracking is disabled by calling the function - - int glXEndFrameTrackingMESA(Display *dpy, - GLXDrawable drawable) - - This function will not return until all swaps have occurred. The - application can call glXQueryFrameTrackingMESA for a final swap and - missed frame count. - - If these functions are succesful, zero is returned. If the context - associated with dpy and drawable is not a direct context, - GLX_BAD_CONTEXT is returned. - -Errors - - If the function succeeds, zero is returned. If the function - fails, one of the following error codes is returned: - - GLX_BAD_CONTEXT The current rendering context is not a direct - context. - -GLX Protocol - - None. This extension only extends to direct rendering contexts. - -New State - - None - -New Implementation Dependent State - - None - -Revision History - - 1.1, 5/1/03 Added contact information. - 1.0, 3/17/03 Initial version based on WGL_I3D_swap_frame_usage. diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MESA_trace.spec b/nx-X11/extras/Mesa_6.4.2/docs/MESA_trace.spec deleted file mode 100644 index f0a79c7df9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MESA_trace.spec +++ /dev/null @@ -1,360 +0,0 @@ -Name - - MESA_trace - -Name Strings - - GL_MESA_trace - -Contact - - Bernd Kreimeier, Loki Entertainment, bk 'at' lokigames.com - Brian Paul, VA Linux Systems, Inc., brianp 'at' valinux.com - -Status - - Obsolete. - -Version - - $Id: MESA_trace.spec,v 1.4 2004/03/25 01:42:42 brianp Exp $ - -Number - - none yet - -Dependencies - - OpenGL 1.2 is required. - The extension is written against the OpenGL 1.2 Specification - -Overview - - Provides the application with means to enable and disable logging - of GL calls including parameters as readable text. The verbosity - of the generated log can be controlled. The resulting logs are - valid (but possibly incomplete) C code and can be compiled and - linked for standalone test programs. The set of calls and the - amount of static data that is logged can be controlled at runtime. - The application can add comments and enable or disable tracing of GL - operations at any time. The data flow from the application to GL - and back is unaffected except for timing. - - Application-side implementation of these features raises namespace - and linkage issues. In the driver dispatch table a simple - "chain of responsibility" pattern (aka "composable piepline") - can be added. - -IP Status - - The extension spec is in the public domain. The current implementation - in Mesa is covered by Mesa's XFree86-style copyright by the authors above. - This extension is partially inspired by the Quake2 QGL wrapper. - -Issues - - - (1) Is this Extension obsolete because it can - be implemented as a wrapper DLL? - - RESOLVED: No. While certain operating systems (Win32) provide linkers - that facilitate this kind of solution, other operating systems - (Linux) do not support hierarchical linking, so a wrapper solution - would result in symbol collisions. - Further, IHV's might have builtin support for tracing GL execution - that enjoys privileged access, or that they do not wish to separate - the tracing code from their driver code base. - - (2) Should the Trace API explicitely support the notion of "frames? - This would require hooking into glXSwapBuffers calls as well. - - RESOLVED: No. The application can use NewTraceMESA/EndTraceMESA - and TraceComment along with external parsing tools to split the - trace into frames, in whatever way considered adequate. - - (2a) Should GLX calls be traced? - - PBuffers and other render-to-texture solutions demonstrate that - context level commands beyond SwapBuffers might have to be - traced. The GL DLL exports the entry points, so this would not - be out of the question. - - (3) Should the specification mandate the actual output format? - - RESOLVED: No. It is sufficient to guarantee that all data and commands - will be traced as requested by Enable/DisableTraceMESA, in the order - encountered. Whether the resulting trace is available as a readable - text file, binary metafile, compilable source code, much less which - indentation and formatting has been used, is up to the implementation. - For the same reason this specification does not enforce or prohibit - additional information added to the trace (statistics, profiling/timing, - warnings on possible error conditions). - - (4) Should the comment strings associated with names and pointer (ranges) - be considered persistent state? - - RESOLVED: No. The implementation is not forced to use this information - on subsequent occurences of name/pointer, and is free to consider it - transient state. - - (5) Should comment commands be prohibited between Begin/End? - - RESOLVED: Yes, with the exception of TraceCommentMESA. TraceCommentMESA - is transient, the other commands might cause storage of persistent - data in the context. There is no need to have the ability mark names - or pointers between Begin and End. - - -New Procedures and Functions - - void NewTraceMESA( bitfield mask, const ubyte * traceName ) - - void EndTraceMESA( void ) - - void EnableTraceMESA( bitfield mask ) - - void DisableTraceMESA( bitfield mask ) - - void TraceAssertAttribMESA( bitfield attribMask ) - - void TraceCommentMESA( const ubyte* comment ) - - void TraceTextureMESA( uint name, const ubyte* comment ) - - void TraceListMESA( uint name, const ubyte* comment ) - - void TracePointerMESA( void* pointer, const ubyte* comment ) - - void TracePointerRangeMESA( const void* first, - const void* last, - const ubyte* comment ) - -New Tokens - - Accepted by the parameter of EnableTrace and DisableTrace: - - TRACE_ALL_BITS_MESA 0xFFFF - TRACE_OPERATIONS_BIT_MESA 0x0001 - TRACE_PRIMITIVES_BIT_MESA 0x0002 - TRACE_ARRAYS_BIT_MESA 0x0004 - TRACE_TEXTURES_BIT_MESA 0x0008 - TRACE_PIXELS_BIT_MESA 0x0010 - TRACE_ERRORS_BIT_MESA 0x0020 - - Accepted by the parameter of GetIntegerv, GetBooleanv, - GetFloatv, and GetDoublev: - - TRACE_MASK_MESA 0x8755 - - Accepted by the parameter to GetString: - - TRACE_NAME_MESA 0x8756 - - -Additions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation) - - None. - -Additions to Chapter 3 of the OpenGL 1.2.1 Specification (OpenGL Operation) - - None. - -Additions to Chapter 4 of the OpenGL 1.2.1 Specification (OpenGL Operation) - - None. - -Additions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions) - - Add a new section: - - 5.7 Tracing - - The tracing facility is used to record the execution of a GL program - to a human-readable log. The log appears as a sequence of GL commands - using C syntax. The primary intention of tracing is to aid in program - debugging. - - A trace is started with the command - - void NewTraceMESA( bitfield mask, const GLubyte * traceName ) - - may be any value accepted by PushAttrib and specifies a set of - attribute groups. The state values included in those attribute groups - is written to the trace as a sequence of GL commands. - - specifies a name or label for the trace. It is expected - that will be interpreted as a filename in most implementations. - - A trace is ended by calling the command - - void EndTraceMESA( void ) - - It is illegal to call NewTraceMESA or EndTraceMESA between Begin and End. - - The commands - - void EnableTraceMESA( bitfield mask ) - void DisableTraceMESA( bitfield mask ) - - enable or disable tracing of different classes of GL commands. - may be the union of any of TRACE_OPERATIONS_BIT_MESA, - TRACE_PRIMITIVES_BIT_MESA, TRACE_ARRAYS_BIT_MESA, TRACE_TEXTURES_BIT_MESA, - and TRACE_PIXELS_BIT_MESA. The special token TRACE_ALL_BITS_MESA - indicates all classes of commands are to be logged. - - TRACE_OPERATIONS_BIT_MESA controls logging of all commands outside of - Begin/End, including Begin/End. - - TRACE_PRIMITIVES_BIT_MESA controls logging of all commands inside of - Begin/End, including Begin/End. - - TRACE_ARRAYS_BIT_MESA controls logging of VertexPointer, NormalPointer, - ColorPointer, IndexPointer, TexCoordPointer and EdgeFlagPointer commands. - - TRACE_TEXTURES_BIT_MESA controls logging of texture data dereferenced by - TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, and - TexSubImage3D commands. - - TRACE_PIXELS_BIT_MESA controls logging of image data dereferenced by - Bitmap and DrawPixels commands. - - TRACE_ERRORS_BIT_MESA controls logging of all errors. If this bit is - set, GetError will be executed whereever applicable, and the result will - be added to the trace as a comment. The error returns are cached and - returned to the application on its GetError calls. If the user does not - wish the additional GetError calls to be performed, this bit should not - be set. - - The command - - void TraceCommentMESA( const ubyte* comment ) - - immediately adds the string to the trace output, surrounded - by C-style comment delimiters. - - The commands - - void TraceTextureMESA( uint name, const ubyte* comment ) - void TraceListMESA( uint name, const ubyte* comment ) - - associates with the texture object or display list specified - by . Logged commands which reference the named texture object or - display list will be annotated with . If IsTexture(name) or - IsList(name) fail (respectively) the command is quietly ignored. - - The commands - - void TracePointerMESA( void* pointer, const ubyte* comment ) - - void TracePointerRangeMESA( const void* first, - const void* last, - const ubyte* comment ) - - associate with the address specified by or with - a range of addresses specified by through . - Any logged commands which reference or an address between - and will be annotated with . - - The command - - void TraceAssertAttribMESA( bitfield attribMask ) - - will add GL state queries and assertion statements to the log to - confirm that the current state at the time TraceAssertAttrib is - executed matches the current state when the trace log is executed - in the future. - - is any value accepted by PushAttrib and specifies - the groups of state variables which are to be asserted. - - The commands NewTraceMESA, EndTraceMESA, EnableTraceMESA, DisableTraceMESA, - TraceAssertAttribMESA, TraceCommentMESA, TraceTextureMESA, TraceListMESA, - TracePointerMESA and TracePointerRangeMESA are not compiled into display lists. - - - Examples: - - The command NewTraceMESA(DEPTH_BUFFER_BIT, "log") will query the state - variables DEPTH_TEST, DEPTH_FUNC, DEPTH_WRITEMASK, and DEPTH_CLEAR_VALUE - to get the values , , , and respectively. - Statements equivalent to the following will then be logged: - - glEnable(GL_DEPTH_TEST); (if is true) - glDisable(GL_DEPTH_TEST); (if is false) - glDepthFunc(); - glDepthMask(); - glClearDepth(); - - - The command TraceAssertAttribMESA(DEPTH_BUFFER_BIT) will query the state - variables DEPTH_TEST, DEPTH_FUNC, DEPTH_WRITEMASK, and DEPTH_CLEAR_VALUE - to get the values , , , and respectively. - The resulting trace might then look will like this: - - { - GLboolean b; - GLint i; - GLfloat f; - b = glIsEnabled(GL_DEPTH_TEST); - assert(b == ); - glGetIntegerv(GL_DEPTH_FUNC, &i); - assert(i == ); - glGetIntegerv(GL_DEPTH_MASK, &i); - assert(i == ); - glGetFloatv(GL_DEPTH_CLEAR_VALUE, &f); - assert(f == ); - } - - -Additions to Chapter 6 of the OpenGL 1.2.1 Specification - (State and State Requests) - - Querying TRACE_MASK_MESA with GetIntegerv, GetFloatv, GetBooleanv or - GetDoublev returns the current command class trace mask. - - Querying TRACE_NAME_MESA with GetString returns the current trace name. - - -Additions to Appendix A of the OpenGL 1.2.1 Specification (Invariance) - - The MESA_trace extension can be used in a way that does not affect data - flow from application to OpenGL, as well as data flow from OpenGL to - application, except for timing, possible print I/O. TRACE_ERRORS_BIT_MESA - will add additional GetError queries. Setting a trace mask with NewTraceMESA - as well as use of TraceAssertAttribMESA might cause additional state queries. - With the possible exception of performance, OpenGL rendering should not be - affected at all by a properly chosen logging operation. - -Additions to the AGL/GLX/WGL Specifications - - None. - -GLX Protocol - - None. The logging operation is carried out client-side, by exporting - entry points to the wrapper functions that execute the logging operation. - -Errors - - INVALID_OPERATION is generated if any trace command except TraceCommentMESA - is called between Begin and End. - -New State - - The current trace name and current command class mask are stored - per-context. - -New Implementation Dependent State - - None. - -Revision History - - * Revision 0.1 - Initial draft from template (bk000415) - * Revision 0.2 - Draft (bk000906) - * Revision 0.3 - Draft (bk000913) - * Revision 0.4 - Reworked text, fixed typos (bp000914) - * Revision 0.5 - Assigned final GLenum values (bp001103) - * Revision 0.6 - TRACE_ERRORS_BIT_MESA (bk000916) - * Revision 0.7 - Added MESA postfix (bk010126) - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MESA_window_pos.spec b/nx-X11/extras/Mesa_6.4.2/docs/MESA_window_pos.spec deleted file mode 100644 index eb1d0d1f06..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MESA_window_pos.spec +++ /dev/null @@ -1,127 +0,0 @@ -Name - - MESA_window_pos - -Name Strings - - GL_MESA_window_pos - -Contact - - Brian Paul, brian.paul 'at' tungstengraphics.com - -Status - - Shipping (since Mesa version 1.2.8) - -Version - - $Id: MESA_window_pos.spec,v 1.4 2004/03/25 01:42:42 brianp Exp $ - -Number - - 197 - -Dependencies - - OpenGL 1.0 is required. - The extension is written against the OpenGL 1.2 Specification - -Overview - - In order to set the current raster position to a specific window - coordinate with the RasterPos command, the modelview matrix, projection - matrix and viewport must be set very carefully. Furthermore, if the - desired window coordinate is outside of the window's bounds one must - rely on a subtle side-effect of the Bitmap command in order to circumvent - frustum clipping. - - This extension provides a set of functions to directly set the - current raster position, bypassing the modelview matrix, the - projection matrix and the viewport to window mapping. Furthermore, - clip testing is not performed. - - This greatly simplifies the process of setting the current raster - position to a specific window coordinate prior to calling DrawPixels, - CopyPixels or Bitmap. - -New Procedures and Functions - - void WindowPos2dMESA(double x, double y) - void WindowPos2fMESA(float x, float y) - void WindowPos2iMESA(int x, int y) - void WindowPos2sMESA(short x, short y) - void WindowPos2ivMESA(const int *p) - void WindowPos2svMESA(const short *p) - void WindowPos2fvMESA(const float *p) - void WindowPos2dvMESA(const double *p) - void WindowPos3iMESA(int x, int y, int z) - void WindowPos3sMESA(short x, short y, short z) - void WindowPos3fMESA(float x, float y, float z) - void WindowPos3dMESA(double x, double y, double z) - void WindowPos3ivMESA(const int *p) - void WindowPos3svMESA(const short *p) - void WindowPos3fvMESA(const float *p) - void WindowPos3dvMESA(const double *p) - void WindowPos4iMESA(int x, int y, int z, int w) - void WindowPos4sMESA(short x, short y, short z, short w) - void WindowPos4fMESA(float x, float y, float z, float w) - void WindowPos4dMESA(double x, double y, double z, double ) - void WindowPos4ivMESA(const int *p) - void WindowPos4svMESA(const short *p) - void WindowPos4fvMESA(const float *p) - void WindowPos4dvMESA(const double *p) - -New Tokens - - none - -Additions to Chapter 2 of the OpenGL 1.2 Specification (OpenGL Operation) - - - (2.12, p. 41) Insert after third paragraph: - - Alternately, the current raster position may be set by one of the - WindowPosMESA commands: - - void WindowPos{234}{sidf}MESA( T coords ); - void WindowPos{234}{sidf}vMESA( T coords ); - - WindosPos4MESA takes four values indicating x, y, z, and w. - WindowPos3MESA (or WindowPos2MESA) is analaguos, but sets only - x, y, and z with w implicitly set to 1 (or only x and y with z - implicititly set to 0 and w implicitly set to 1). - - WindowPosMESA operates like RasterPos except that the current modelview - matrix, projection matrix and viewport parameters are ignored and the - clip test operation always passes. The current raster position values - are directly set to the parameters passed to WindowPosMESA. The current - color, color index and texture coordinate update the current raster - position's associated data. - -Additions to the AGL/GLX/WGL Specifications - - None - -GLX Protocol - - Not specified at this time. However, a protocol message very similar - to that of RasterPos is expected. - -Errors - - INVALID_OPERATION is generated if WindowPosMESA is called betweeen - Begin and End. - -New State - - None. - -New Implementation Dependent State - - None. - -Revision History - - * Revision 1.0 - Initial specification - * Revision 1.1 - Minor clean-up (7 Jan 2000, Brian Paul) - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MESA_ycbcr_texture.spec b/nx-X11/extras/Mesa_6.4.2/docs/MESA_ycbcr_texture.spec deleted file mode 100644 index 0fa1f7b39d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MESA_ycbcr_texture.spec +++ /dev/null @@ -1,204 +0,0 @@ -Name - - MESA_ycbcr_texture - -Name Strings - - GL_MESA_ycbcr_texture - -Contact - - Brian Paul, Tungsten Graphics, Inc. (brian.paul 'at' tungstengraphics.com) - Keith Whitwell, Tungsten Graphics, Inc. (keith 'at' tungstengraphics.com) - -Status - - Shipping (Mesa 4.0.4 and later) - -Version - - 1.0 - -Number - - TBD - -Dependencies - - OpenGL 1.0 or later is required - This extensions is written against the OpenGL 1.4 Specification. - NV_texture_rectangle effects the definition of this extension. - -Overview - - This extension supports texture images stored in the YCbCr format. - There is no support for converting YCbCr images to RGB or vice versa - during pixel transfer. The texture's YCbCr colors are converted to - RGB during texture sampling, after-which, all the usual per-fragment - operations take place. Only 2D texture images are supported (not - glDrawPixels, glReadPixels, etc). - - A YCbCr pixel (texel) is a 16-bit unsigned short with two components. - The first component is luminance (Y). For pixels in even-numbered - image columns, the second component is Cb. For pixels in odd-numbered - image columns, the second component is Cr. If one were to convert the - data to RGB one would need to examine two pixels from columns N and N+1 - (where N is even) to deduce the RGB color. - -IP Status - - None - -Issues - - None - -New Procedures and Functions - - None - -New Tokens - - Accepted by the and parameters of - TexImage2D and TexSubImage2D: - - YCBCR_MESA 0x8757 - - Accepted by the parameter of TexImage2D and TexSubImage2D: - - UNSIGNED_SHORT_8_8_MESA 0x85BA /* same as Apple's */ - UNSIGNED_SHORT_8_8_REV_MESA 0x85BB /* same as Apple's */ - -Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation) - - None - -Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization) - - In section 3.6.4, Rasterization of Pixel Rectangles, on page 101, - add the following to Table 3.8 (Packed pixel formats): - - type Parameter GL Data Number of Matching - Token Name Type Components Pixel Formats - -------------- ------- ---------- ------------- - UNSIGNED_SHORT_8_8_MESA ushort 2 YCBCR_MESA - UNSIGNED_SHORT_8_8_REV_MESA ushort 2 YCBCR_MESA - - - In section 3.6.4, Rasterization of Pixel Rectangles, on page 102, - add the following to Table 3.10 (UNSIGNED_SHORT formats): - - UNSIGNED_SHORT_8_8_MESA: - - 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - +-------------------------------+-------------------------------+ - | 1st | 2nd | - +-------------------------------+-------------------------------+ - - UNSIGNED_SHORT_8_8_REV_MESA: - - 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - +-------------------------------+-------------------------------+ - | 2nd | 1st | - +-------------------------------+-------------------------------+ - - - In section 3.6.4, Rasterization of Pixel Rectangles, on page 104, - add the following to Table 3.12 (Packed pixel fiedl assignments): - - First Second Third Fourth - Format Element Element Element Element - ------ ------- ------- ------- ------- - YCBCR_MESA luminance chroma - - - In section 3.8.1, Texture Image Specification, on page 125, add - another item to the list of TexImage2D and TexImage3D equivalence - exceptions: - - * The value of internalformat and format may be YCBCR_MESA to - indicate that the image data is in YCbCr format. type must - be either UNSIGNED_SHORT_8_8_MESA or UNSIGNED_SHORT_8_8_REV_MESA - as seen in tables 3.8 and 3.10. Table 3.12 describes the mapping - between Y and Cb/Cr to the components. - If NV_texture_rectangle is supported target may also be - TEXTURE_RECTANGLE_NV or PROXY_TEXTURE_RECTANGLE_NV. - All pixel transfer operations are bypassed. The texture is stored as - YCbCr, not RGB. Queries of the texture's red, green and blue component - sizes will return zero. The YCbCr colors are converted to RGB during - texture sampling using an implementation dependent conversion. - - - In section 3.8.1, Texture Image Specification, on page 126, add - another item to the list of TexImage1D and TexImage2D equivalence - exceptions: - - * The value of internalformat and format can not be YCBCR_MESA. - - - In section 3.8.2, Alternate Texture Image Specification Commands, on - page 129, insert this paragraph after the first full paragraph on the - page: - - "If the internal storage format of the image being updated by - TexSubImage2D is YCBCR_MESA then format must be YCBCR_MESA. - The error INVALID_OPERATION will be generated otherwise." - - -Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment -Operations and the Frame Buffer) - - None - -Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions) - - None - -Additions to Chapter 6 of the OpenGL 1.4 Specification (State and -State Requests) - - None - -Additions to Appendix A of the OpenGL 1.4 Specification (Invariance) - - None - -Additions to the AGL/GLX/WGL Specifications - - None - -GLX Protocol - - None - -Errors - - INVALID_ENUM is generated by TexImage2D if is - MESA_YCBCR but is not MESA_YCBCR. - - INVALID_ENUM is generated by TexImage2D if is MESA_YCBCR but - is not MESA_YCBCR. - - INVALID_VALUE is generated by TexImage2D if is MESA_YCBCR and - is MESA_YCBCR and is not zero. - - INVALID_OPERATION is generated by TexSubImage2D if the internal image - format is YCBCR_MESA and is not YCBCR_MESA. - - INVALID_OPERATION is generated by CopyTexSubImage2D if the internal - image is YCBCR_MESA. - -New State - - Edit table 6.16 on page 231: change the type of TEXTURE_INTERNAL_FORMAT - from n x Z42 to n x Z43 to indicate that internal format may also be - YCBCR_MESA. - -Revision History - - 20 September 2002 - Initial draft - 29 April 2003 - minor updates - 3 September 2003 - further clarify when YCbCr->RGB conversion takes place - 19 September 2003 - a few more updates prior to submitting to extension - registry. - 3 April 2004 - fix assorted inaccuracies diff --git a/nx-X11/extras/Mesa_6.4.2/docs/MiniGLX.html b/nx-X11/extras/Mesa_6.4.2/docs/MiniGLX.html deleted file mode 100644 index 3429812993..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/MiniGLX.html +++ /dev/null @@ -1,547 +0,0 @@ - - - - Mini GLX Specification - - -

-
Mini GLX Specification
-

-

-
Tungsten Graphics, Inc.
-
-January 20, 2003
-
-
-

-

Copyright © 2002-2003 by Tungsten Graphics, Inc., Cedar Park, -Texas. All Rights Reserved.
-
-Permission is granted to make and distribute verbatim copies of this -document provided the copyright notice and this permission notice are -preserved on all copies.
-
-

-

1. Introduction

-

The Mini GLX interface facilitates OpenGL rendering on embedded -devices. The interface is a subset of the GLX interface, plus a minimal -set of Xlib-like functions.

-

Programs written to the Mini GLX specification should run unchanged -on systems with the X Window System and the GLX extension. The intention -is to allow flexibility for prototyping and testing.

-

This document serves as both the reference guide and programming -guide for Mini GLX.
-
-

-

2. Mini GLX Concepts

-

The OpenGL specification does not describe how OpenGL rendering -contexts and drawing surfaces (i.e. the frame buffer) are created and -managed. Rather, this is handled by an OpenGL window system interface, -such as Mini GLX.

-

There are three main datatypes or resources managed by Mini GLX. The -resources and their corresponding GLX or Xlib data types are:

- - - - - - - - - - - - - - - - - - - -
ResourceData type
pixel formatsX Visual and XVisualInfo
drawing surfacesX Window or GLXDrawable
rendering contextsGLXContext
-

Pixel formats or X Visuals describe the per-pixel attributes of the -frame buffer. For example, bits per color component, Z buffer size, -stencil size, TrueColor vs PseudoColor, etc.

-

Drawing surfaces or X Windows typically describe a spatial -allocation of the frame buffer (i.e. the position and size of a -rectangular region of pixels). Since MiniGLX doesn't really support a -window system, the window is effectively the entire frame buffer.

-

A rendering context represents the current OpenGL state such as -current drawing color, line width, blending mode, texture parameters, -etc. Several rendering contexts can be created but only one can be in -use at any given time.

-

The Mini GLX interface provides all the functions needed for -choosing pixel formats, create drawing surfaces, creating rendering -contexts and binding rendering contexts to drawing surfaces.
-
-

-

3. Using Mini GLX

-

To use the Mini GLX interface in your application, include the -GL/miniglx.h header file at compile time:

-
#include <GL/miniglx.h>
-
-Applications should link with libGL.so (i.e. gcc -myprogram.o -lGL -o myprogram).  libGL.so implements the -MiniGLX API functions and, in turn, loads a hardware-specific device -driver (such as radeon_dri.so) at runtime.  The -environment variable LIBGL_DRIVERS_PATH should name the -directory where these modules are located.
-
-Prior to running a MiniGXL application, the following kernel modules -must be installed:
-
-
agpgart.o
-radeonfb.o  (assuming Radeon hardware)
-radeon.o  (assuming Radeon hardware)
-
-
-Finally, MiniGLX reads a configuration file (by default, -/etc/miniglx.conf) to determine basic configuration information. - The configuration file may also be located in the directory -specified by the MINIGLX_CONF environment variable).
-
-The remainder of this section describes the MiniGLX API functions.
-
-

3.1 Initialization

-

The XOpenDisplay function is used to initialize the graphics system:

-
-
Display *XOpenDisplay(const char *displayname)
-
-

The displayName parameter is currently ignored in Mini -GLX. It is recommended that NULL be passed as thedisplayName -parameter.

-

If XOpenDisplay is able to initialize the graphics system a pointer -to a Display will be returned. Otherwise, NULL will be returned.

-

3.2 Choosing a Visual

-

A visual (i.e. pixel format) must be chosen before a drawing surface -or rendering context can be created. This is done with the -glXChooseVisual function:

-
-
XVisualInfo *glXChooseVisual(Display *dpy, int screen, const int *attribList)
-
-

dpy is a pointer to the display returned by -XOpenDisplay.

-

screen is currently ignored by Mini GLX and should be -zero.

-

attribList is a list of GLX attributes which describe -the desired pixel format. It is terminated by the token None. -The attributes are as follows:

-
-
-
GLX_USE_GL
-
This attribute should always be present in order to maintain -compatibility with GLX.
-
GLX_RGBA
-
If present, only RGBA pixel formats will be considered. -Otherwise, only color index formats are considered.
-
GLX_DOUBLEBUFFER
-
if present, only double-buffered pixel formats will be chosen.
-
GLX_RED_SIZE n
-
Must be followed by a non-negative integer indicating the -minimum number of bits per red pixel component that is acceptable.
-
GLX_GREEN_SIZE n
-
Must be followed by a non-negative integer indicating the -minimum number of bits per green pixel component that is acceptable.
-
GLX_BLUE_SIZE n
-
Must be followed by a non-negative integer indicating the -minimum number of bits per blue pixel component that is acceptable.
-
GLX_ALPHA_SIZE n
-
Must be followed by a non-negative integer indicating the -minimum number of bits per alpha pixel component that is acceptable.
-
GLX_STENCIL_SIZE n
-
Must be followed by a non-negative integer indicating the -minimum number of bits per stencil value that is acceptable.
-
None
-
This token is used to terminate the attribute list.
-
-
-

glXChooseVisual will return a pointer to an XVisualInfo object which -most closely matches the requirements of the attribute list. If there -is no visual which matches the request, NULL will be returned.

-

Note that visuals with accumulation buffers and depth buffers are -not available.
-
-

-

3.3 Creating a Drawing Surface

-

Drawing surfaces are created as X windows.  For Mini GLX, -windows are full-screen; they cover the entire frame buffer. - Also, Mini GLX imposes a limit of one window. A second window -cannot be created until the first one is destroyed.

-

3.3.1 Window Creation

-

The XCreateWindow function is used to create a drawing surface:

-
-
Window XCreateWindow( Display *display,
Window parent,
int x, int y,
unsigned int width, unsigned int height,
unsigned int borderWidth,
int depth,
unsigned int class,
Visual *visual,
unsigned long valuemask,
XSetWindowAttributes *attributes )
-
-

The parameters are as follows:

-
-
-
display
-
A Display pointer, as returned by XOpenDisplay.
-
parent
-
The parent window for the new window. For Mini GLX, this -should beRootWindow(dpy, 0).
-
x, y
-
The position of the window. For Mini GLX, both values should -be zero.
-
width, height
-
The size of the window. For Mini GLX, this specifies the -desired screen size such as 1024, 768 or 1280, 1024.
-
borderWidth
-
This parameter should be zero.
-
depth
-
The pixel depth for the window. For Mini GLX this should be -the depth found in the XVisualInfo object returned by glxChooseVisual.
-
class
-
The window class. For Mini GLX this value should be InputOutput.
-
visual
-
This parameter should be the visual field of the XVisualInfo -object returned by glxChooseVisual.
-
valuemask
-
This parameter indicates which fields of the XSetWindowAttributes -are to be used. For Mini GLX this is typically the bitmaskCWBackPixel -| CWBorderPixel | CWColormap.
-
attributes
-
Initial window attributes. Of the fields in the XSetWindowAttributes -structure, thebackground_pixel, border_pixel -and colormap fields should be set.  See the discussion -below regarding colormaps.
-
-
-

XCreateWindow will return a window handle if it succeeds -or zero if it fails.

-

3.3.2 Window Mapping

-

To display the window the XMapWindow function must be called:

-
-
void XMapWindow(Display *dpy, Window w)
-
-

This function does nothing in Mini GLX but is required for Xlib/GLX -compatibility

-

3.3.3 Colormaps
-

-

Xlib requires specification of a colormap when creating a window. - For purposes of interoperability, Mini GLX requires this as well, -though the colormap is not actually used.  The XCreateColormap -function is used to create a colormap:

-
Colormap XCreateColormap(Display *dpy, Window window, -Visual *visual, int alloc)
-
-

The parameters are as follows:
-

-
-
-
dpy
-
The display handle as returned by XOpenDisplay.
-
window
-
This parameter is ignored by Mini GLX but should be the value -returned by the RootWindow(dpy, 0) macro.
-
-
visual
-
This parameter is ignored by Mini GLX but should be the visual -field of the XVisualInfo object returned by glXChooseVisual.
-
alloc
-
This parameter is ignored by Mini GLX but should be set to AllocNone.
-
-
-
-

3.4 Creating a Rendering Context

-

An OpenGL rendering context is created with the glXCreateContext -function:

-
-
GLXContext glXCreateContext(Display *dpy, XVisualInfo *visInfo, GLXContext shareList, Bool direct)
-
-

The parameters are as follows:

-
-
-
dpy
-
The display handle as returned by XOpenDisplay.
-
visInfo
-
The visual as returned by glXChooseVisual.
-
shareList
-
If non-zero, texture objects and display lists are shared with -the named rendering context. If zero, texture objects and display lists -will (initially) be private to this context. They may be shared when a -subsequent context is created.
-
direct
-
Specifies whether direct or indirect rendering is desired. For -Mini GLX this value is ignored but it should be set to True.
-
-
-

glXCreateContext will return a GLXContext handle if it -succeeds or zero if it fails due to invalid parameter or insufficient -resources.
-
-

-

3.5 Binding a Rendering Context

-

The final step before beginning OpenGL rendering is to bind (i.e. -activate) a rendering context and drawing surface with the -glXMakeCurrent function:

-
-
Bool glXMakeCurrent(Display *dpy, GLXDrawable drawable, GLXContext ctx)
-
-

The parameters are as follows:

-
-
-
dpy
-
The display handle, as returned by XOpenDisplay.
-
drawable
-
The window or drawable to bind to the rendering context. This -should be the value returned by XCreateWindow.
-
ctx
-
The rendering context to bind, as returned by glXCreateContext.
-
-
-

If glXMakeCurrent succeeds True is returned. Otherwise False is -returned to indicate an invalid display, window or context parameter.

-

After the rendering context has been bound to the drawing surface -OpenGL rendering can begin.

-

The current rendering context may be unbound by calling -glXMakeCurrent with the window and context parameters set to zero.

-

An application may create any number of rendering contexts and bind -them as needed. Note that binding a rendering context is generally not a -light-weight operation.  Most simple OpenGL applications create -only one rendering context.
-
-

-

3.6 Color Buffer Swapping

-

A double buffered window has two color buffers: a front buffer and a -back buffer. Normally, rendering is directed to the back buffer while -the front buffer is displayed. When rendering of a frame is finished -the front and back buffers are swapped to provide the illusion of -instanteous screen updates.

-

The color buffers for a particular window (i.e. drawable) may be -swapped with the glXSwapBuffers command:

-
-
void glXSwapBuffers(Display *dpy, GLXDrawable drawable)
-
-Any pending rendering commands will be completed before the buffer swap -takes place.
-
-Calling glXSwapBuffers on a window which is single-buffered has no -effect.
-
-

3.7 Releasing Resources

-

3.7.1 Releasing Rendering Contexts

-

A rendering context may be destroyed by calling glXDestroyContext:

-
-
void glXDestroyContext(Display *dpy, GLXContext ctx)
-
-

3.7.2 Releasing Windows

-

A window may be destroyed by calling XDestroyWindow:

-
-
void XDestroyWindow(Display *dpy, Window window)
-
-

3.7.3 Releasing Visuals

-

An XVisualInfo object may be freed by calling XFree:

-
-
void XFree(void *data)
-
-

3.7.4 Releasing Colormaps

-

A colormap may be freed by calling XFreeColormap:

-
-
void XFreeColormap(Display *dpy, Colormap colormap)
-
-

3.7.4 Releasing Display Resources

-

When the application is about to exit, the resources associated with -the graphics system can be released by calling XCloseDisplay:

-
-
void XCloseDisplay(Display *dpy)
-
-

The display handle becomes invalid at this point.
-
-

-

3.8 Query Functions

-

3.8.1 Querying Available Visuals

-A list of all available visuals can be obtained with the XGetVisualInfo -function:
-
-
XVisualInfo -*XGetVisualInfo(Display *dpy, long vinfo_mask, XVisualInfo -*vinfo_template, int *nitems_return)
-
-
-The parameters are as follows:
-
-
-
dpy
-
The display handle, as returned by XOpenDisplay.
-
vinfo_mask
-
A bitmask indicating which fields of the vinfo_template are to -be matched.  The value must be VisualScreenMask.
-
vinfo_template
-
A template whose fields indicate which visual attributes must -be matched by the results.  The screen field of this structure must -be zero.
-
nitems_return
-
Returns the number of visuals returned.
-
-
-The return value is the address of an array of all available visuals.
-
-An example of using XGetVisualInfo to get all available visuals follows:
-
-
XVisualInfo visTemplate, *results;
-int numVisuals;
-Display *dpy = XOpenDisplay(NULL);
-visTemplate.screen = 0;
-results = XGetVisualInfo(dpy, VisualScreenMask, &visTemplate, -&numVisuals);
-
-
-

3.8.2 Querying Visual Attributes

-

The GLX attributes of an X visual may be queried with the -glXGetConfig function:

-
-
int glXGetConfig(Display *dpy, XVisualInfo *vis, int attribute, int *value)
-
-

The parameters are as follows:

-
-
-
dpy
-
The display handle, as returned by XOpenDisplay.
-
vis
-
The visual, as returned by glXChooseVisual.
-
attribute
-
The attribute to query. The attributes are listed below.
-
value
-
Pointer to an integer in which the result of the query will be -stored.
-
-
-

The return value will be zero if no error occurs. - GLX_INVALID_ATTRIBUTE will be returned if the attribute -parameter is invalid.  GLX_BAD_VISUAL will be returned -if the XVisualInfo parameter is invalid.

-

The following attributes may be queried:

-
-
-
GLX_USE_GL
-
The result will be True or False to -indicate if OpenGL rendering is supported with the visual. Mini GLX -always return True.
-
GLX_RGBA
-
The result will be True for RGBA visuals or False -for color index visuals.
-
GLX_DOUBLEBUFFER
-
The result will be True if the visual has two -color buffers or False if the visual has one color buffer.
-
GLX_RED_SIZE
-
The result will be the number of red bits per pixel.
-
GLX_GREEN_SIZE
-
The result will be the number of green bits per pixel.
-
GLX_BLUE_SIZE
-
The result will be the number of blue bits per pixel.
-
GLX_ALPHA_SIZE
-
The result will be the number of alpha bits per pixel.
-
GLX_DEPTH_SIZE
-
The result will be the number of bits per Z value.
-
GLX_STENCIL_SIZE
-
The result will be the number of bits per stencil value.
-
-
-
-
-

3.8.3 Querying the Current Rendering Context

-

The current rendering context can be queried with -glXGetCurrentContext:

-
-
GLXContext glXGetCurrentContext(void)
-
-

Zero will be returned if no context is currently bound.
-
-

-

3.8.4 Querying the Current Drawable

-

The current drawable (i.e. window or drawing surface) can be queried -with glXGetCurrentDrawable:

-
-
GLXDrawable glXGetCurrentDrawable(void)
-
-

Zero will be returned if no drawable is currently bound.
-
-

-

3.8.5 Function Address Queries

-

The glXGetProcAddress function will return the address of any -available OpenGL or Mini GLX function:

-
-
void *glXGetProcAddress(const GLubyte *procName)
-
-

If procName is a valid function name, a pointer to that -function will be returned.  Otherwise, NULL will be returned.

-

The purpose of glXGetProcAddress is to facilitate using future -extensions to OpenGL or Mini GLX. If a future version of the library -adds new extension functions they'll be accessible via -glXGetProcAddress. The alternative is to hard-code calls to the new -functions in the application but doing so will prevent linking the -application with older versions of the library.
-
-

-

3.9 Versioning

-The Mini GLX version can be queried at run time with glXQueryVersion: -
-
Bool glXQueryVersion(Display *dpy, int *major, int *minor)
-
-

major will be set to the major version number andminor -will be set to the minor version number.True will be -returned if the function succeeds. False will be returned -if the function fails due to invalid parameters. The dpy -argument is currently ignored, but should be the value returned by -XOpenDisplay.

-

At compile time, the Mini GLX interface version can be tested with -the MINI_GLX_VERSION_1_x preprocessor tokens. For example, if -version 1.0 of Mini GLX is supported, then MINI_GLX_VERSION_1_0 -will be defined. If version 1.1 of Mini GLX is supported, then -MINI_GLX_VERSION_1_1 will be defined.

-

At the time of writing the current Mini GLX version is 1.0.
-
-

-

4.0 Interoperability with GLX and Xlib

-While Mini GLX strives to be compatible with GLX and Xlib there are -some unavoidable differences which must be taken into consideration.
-

4.1 Public vs Private Structures

-The structure of many X data types is public.  For example, the Display -data type is defined as a structure in /usr/include/X11/Xlib.h and -programmers may access any fields of that structure at will.  Mini -GLX also defines a Display data type but its fields are hidden and not -visiblein miniglx.h.  Duplicating the Xlib -declaration for the Display data type in minigl.h would -require defining a large number of other superfluous Xlib datatypes.
-
-Mini GLX users are discouraged from directly accessing the fields of -Xlib data types to maximize portability - though this is unavoidable to -some extent.  For example, the XVisualInfo and XSetWindowAtttributes -data types must be completely public. -

4.2 Macros

-In some cases, Xlib defines macros which are meant to be used instead -of direct structure accesses.  For example, the RootWindow(dpy, -screen) macro returns the root window for a given screen on a -given display.  Unfortunately, macros do nothing to aid in ABI -compatibility since they are resolved at compile time instead of at -link/run time.
-
-Mini GLX also defines a RootWindow macro since it's -essential for creating windows.  But the implementation of this -macro by Xlib and Mini GLX is completely different.
-

4.3 Summary

-Because Xlib and Mini GLX define data types and macros differently, -Mini GLX applications must be recompiled when retargeting Mini GLX or -native Xlib/GLX.  That is, applications can't simply be re-linked -because of ABI incompatibilities.
-
-Nevertheless, the fact that Mini GLX programs can be recompiled for -Xlib and GLX increases portability and flexibility for testing and -prototyping.
-
-

5.0 Example Program

-

This section shows an example program which uses the Mini GLX -interface. The program simply draws several frames of a rotating square.
-

-

The program may be compiled for use with Xlib/GLX or Mini GLX by -setting the USE_MINIGLX token to 0 or 1, respectively. - Note that the only difference is the header files which are -included.
-

-

-

#define USE_MINIGLX 1 /* 1 = use Mini GLX, 0 = use Xlib/GLX */

#include <stdio.h>
#include <stdlib.h>
#include <GL/gl.h>

#if USE_MINIGLX
#include <GL/miniglx.h>
#else
#include <GL/glx.h>
#include <X11/Xlib.h>
#endif

/*
* Create a simple double-buffered RGBA window.
*/
static Window
MakeWindow(Display * dpy, unsigned int width, unsigned int height)
{
int visAttributes[] = {
GLX_RGBA,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_DOUBLEBUFFER,
None
};
XSetWindowAttributes attr;
unsigned long attrMask;
Window root;
Window win;
GLXContext ctx;
XVisualInfo *visinfo;

root = RootWindow(dpy, 0);

/* Choose GLX visual / pixel format */
visinfo = glXChooseVisual(dpy, 0, visAttributes);
if (!visinfo) {
printf("Error: couldn't get an RGB, Double-buffered visual\n");
exit(1);
}

/* Create the window */
attr.background_pixel = 0;
attr.border_pixel = 0;
attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);
attrMask = CWBackPixel | CWBorderPixel | CWColormap;
win = XCreateWindow(dpy, root, 0, 0, width, height,
0, visinfo->depth, InputOutput,
visinfo->visual, attrMask, &attr);
if (!win) {
printf("Error: XCreateWindow failed\n");
exit(1);
}

/* Display the window */
XMapWindow(dpy, win);

/* Create GLX rendering context */
ctx = glXCreateContext(dpy, visinfo, NULL, True);
if (!ctx) {
printf("Error: glXCreateContext failed\n");
exit(1);
}

/* Bind the rendering context and window */
glXMakeCurrent(dpy, win, ctx);

return win;
}


/*
* Draw a few frames of a rotating square.
*/
static void
DrawFrames(Display * dpy, Window win)
{
int angle;
glShadeModel(GL_FLAT);
glClearColor(0.5, 0.5, 0.5, 1.0);
for (angle = 0; angle < 360; angle += 10) {
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 1.0, 0.0);
glPushMatrix();
glRotatef(angle, 0, 0, 1);
glRectf(-0.8, -0.8, 0.8, 0.8);
glPopMatrix();
glXSwapBuffers(dpy, win);
}
}


int
main(int argc, char *argv[])
{
Display *dpy;
Window win;

dpy = XOpenDisplay(NULL);
if (!dpy) {
printf("Error: XOpenDisplay failed\n");
return 1;
}

win = MakeWindow(dpy, 300, 300);

DrawFrames(dpy, win);

return 0;
}
-
- - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.3DFX b/nx-X11/extras/Mesa_6.4.2/docs/README.3DFX deleted file mode 100644 index 037e8fa7cc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.3DFX +++ /dev/null @@ -1,830 +0,0 @@ - - 3Dfx Glide device driver - - - -Requirements: -------------- - -A Voodoo-based videocard/accelerator -DOS (with DJGPP), Windows9x/2k (with MinGW), Linux -Glide3x library for your OS - -http://sourceforge.net/projects/glide/ - - - -How to compile: ---------------- - -DJGPP: - Place the Glide3 SDK in the top Mesa directory: - $(MESA)/glide3/include/ - 3dfx.h, g3ext.h, glide.h, glidesys.h, glideutl.h, sst1vid.h - $(MESA)/glide3/lib/ - libgld3x.a, libgld3i.a, glide3x.dxe - Type: - make -f Makefile.DJ X86=1 FX=1 - Look into the makefile for further information. - -MinGW: - Place the Glide3 SDK in the top Mesa directory: - $(MESA)/glide3/include/ - 3dfx.h, g3ext.h, glide.h, glidesys.h, glideutl.h, sst1vid.h - $(MESA)/glide3/lib/ - libglide3x.a, glide3x.dll - Type: - make -f Makefile.mgw X86=1 FX=1 - Look into the makefile for further information. - -Linux: - Place the Glide3 SDK in /usr/local/glide - /usr/local/glide/include/ - 3dfx.h, g3ext.h, glide.h, glidesys.h, glideutl.h, sst1vid.h - /usr/local/glide/lib/ - libglide3x.a, libglide3x.so - Type: - make linux-glide - or - make linux-x86-glide - - - -Compilation defines: --------------------- - -FX_DEBUG - enable driver debug code -FX_TRAP_GLIDE - enable Glide trace code -FX_PACKEDCOLOR - use packed color in vertex structure -FX_TC_NAPALM - map GL_COMPRESSED_RGB[A] to FXT1. Works with VSA100-based cards only. -FX_COMPRESS_S3TC_AS_FXT1_HACK - map S3TC to FXT1 -FX_RESCALE_BIG_TEXURES_HACK - fake textures larger than HW can support - (see MESA_FX_MAXLOD environment variable) - - - -Environment variables: ----------------------- - -The following environment variables affect MesaFX. Those that affect Glide -only, are beyond the scope of this section. Entries that don't have a "Value" -field, can have any value whatsoever - ex: set MESA_FX_IGNORE_CMBEXT=y - -"Note" (*) means that the environment variable affects Glide, too; also, if -the var is not found in the environment, it is searched in windoze registry. -"Note" (!) means that the environment variable is not working as expected; -may have undefined effects, might have effects only at Glide level or might -not have any effect whatsoever. Caveat emptor! Those are to be revised soon. - -It is recommended to leave the envvars alone, so that Mesa/Glide will run with -default values. Use them only when you experience crashes or strange behavior. - -FX_GLIDE_NUM_TMU - OS: all - HW: dual-TMU cards (Voodoo2, Avenger, Napalm) - Desc: force single-TMU - Note: (*) - Value: "1" -FX_GLIDE_SWAPPENDINGCOUNT - OS: all - HW: all - Desc: max # of buffers allowed to build up - Note: (*) (!) - Value: "0", "1", "2", "3", "4", "5" or "6" -FX_GLIDE_SWAPINTERVAL - OS: all - HW: all - Desc: number of vertical retraces to wait before swapping - Note: (*) (!) works only at Glide-level? -SSTH3_SLI_AA_CONFIGURATION - OS: all - HW: VSA100-based cards - Desc: SLI/AA setup - Note: (*) (!) works only at Glide-level? - Value: - 1, 2, 4 chip cards - "0" - SLI & AA disable - "1" - SLI disabled, 2 sample AA enabled - 2, 4 chip cards - "2" - 2-way SLI enabled, AA disabled - "3" - 2-way SLI enabled, 2 sample AA enabled - "4" - SLI disabled, 4 sample AA enabled - 4 chip cards - "5" - 4-way SLI enabled, AA disabled - "6" - 4-way SLI enabled, 2 sample AA enabled - "7" - 2-way SLI enabled, 4 sample AA enabled - "8" - SLI disabled, 8 sample AA enabled -SST_DUALHEAD - OS: win32 - HW: ? - Desc: ? - Note: (!) disabled? -MESA_FX_NO_SIGNALS - OS: linux - HW: all - Desc: avoid installing signals - Note: (!) untested! -MESA_FX_INFO - OS: all - HW: all - Desc: verbose to stderr - Value: any; special value "r" to redirect stderr to MESA.LOG -MESA_FX_NOSNAP - OS: all - HW: Voodoo1, Rush, Banshee - Desc: do not snap vertices inside Mesa - Note: to be used with Glide3x that snaps vertices internally -MESA_FX_POINTCAST - OS: all - HW: dual-TMU cards (some Voodoo1, Voodoo2, Avenger, Napalm) - Desc: try to use pointcast palette - Note: may give adverse effects on UMA cards (Avenger, Napalm) -MESA_FX_IGNORE_PALEXT - OS: all - HW: all - Desc: disable 6666 palette -MESA_FX_IGNORE_PIXEXT - OS: all - HW: Napalm - Desc: force 565 16bpp mode (traditional Voodoo, no 32/15bpp) -MESA_FX_IGNORE_TEXFMT - OS: all - HW: Napalm - Desc: disable 32bit textures -MESA_FX_IGNORE_CMBEXT - OS: all - HW: Napalm - Desc: disable Napalm combiners (color/alpha/texture) - Note: this option allows dual-TMU cards perform single-pass - trilinear, but some advanced (multi)texturing modes - won't work (GL_EXT_texture_env_combine) -MESA_FX_IGNORE_MIREXT - OS: all - HW: all - Desc: disable mirror extension -MESA_FX_IGNORE_TEXUMA - OS: all - HW: all - Desc: disable UMA -MESA_FX_IGNORE_TEXUS2 - OS: all - HW: all - Desc: disable Texus2 -MESA_FX_MAXLOD - OS: all - HW: non VSA-100 cards - Desc: enable large texture support using SW rescaling - Value: - "9" - 512x512 textures - "10" - 1024x1024 textures - "11" - 2048x2048 textures -MESA_FX_ALLOW_VP - OS: all - HW: all - Desc: allow vertex program extensions -MESA_GLX_FX - OS: linux - HW: Voodoo1, Rush, Voodoo2 - Desc: display mode - Note: (!) experimental - Value: - "w" - windowed mode - "f" - fullscreen mode - "d" - disable glide driver - OS: win32 - HW: Rush, Banshee, Avenger, Napalm - Desc: display mode - Note: (!) experimental - Value: - "w" - windowed mode - - - -Contact: --------- - -Daniel Borca -Hiroshi Morii - - - -WARNING! The info below this line is outdated (yet some of it useful). WARNING! -******************************************************************************* - - - -Info for Mesa 4.1 ------------------ - -The 3dfx Glide driver in Mesa is disabled by default. Not too many people -use this driver anymore and at some point down the road it will be dropped. - -To use/enable the Glide driver either do this: - -'./configure --with-glide=DIR' Where DIR is the location of Glide, like - /usr/ or /usr/local - -OR - -'make linux-x86-glide' If using the old-style Makefile system. - -The rest of this file hasn't changed since Mesa 3.3. Some of it's out of -date, but some is still valid. - - - -What do you need ? ------------------- - - - A PC with a 3Dfx Voodoo1/2 Graphics or Voodoo Rush based board - (Pure3D, Monster 3D, R3D, Obsidian, Stingray 128/3D, etc.). - The Quantum3D Obsidian3D-2 X-24 requires some special env. setting - under Linux (more information in the "Useful Glide Environment - Variables"); - - - The 3Dfx Glide library 2.3 or later for your OS (the 2.4 works fine). - The Voodoo2 requires the Glide library 2.51. The Glide 3.1 is not - compatible with the Glide 2.x so it doesn't work with the current - version of the driver; - - - A compiler supported by the Glide library (Micro$oft VC++ (tested), - Watcom (tested), GCC for Linux (tested), etc.); - - - It's nice to have two monitors - one for your normal graphics - card and one for your 3Dfx card. If something goes wrong with - an application using the 3Dfx hardware you can still see your - normal screen in order to recover. - - - -Tested on: ----------- - Windows 95 - David Bucciarelli - Windows NT - Henri Fousse - MS-DOS - Linux - Daryll Strauss, Brian Paul, David Bucciarelli - FreeBSD - BeOS - Duncan Wilcox - MacOS - Fazekas Miklos - - -What is able to do ? --------------------- - - - It is able accelerate points, lines and polygon with flat - shading, gouraud shading, Z-buffer, texture mapping, blending, fog and - antialiasing (when possible). There is also the support for rendering - in a window with a slow trick for the Voodoo Graphics (available only - for Linux) and at full speed with the Voodoo Rush chipset. - Under Linux is also possible to switch on-the-fly between the fullscreen - and in-window rendering hack. - There is also the support for using more than one Voodoo Graphics in the - some application/PC (you can create one context for each board and use - multiple video outputs for driving monitors, videoprojectors or HMDs). - The driver is able to fallback to pure software rendering when afeature - isn't supported by the Voodoo hardware (however software rendering is - very slow compared to hardware supported rendering) - - - -How to compile: ---------------- - -Linux: ------- - Here are the basic steps for using the 3Dfx hardware with Mesa - on Linux: - - - You'll need the Glide library and headers. Mesa expects: - /usr/local/glide/include/*.h // all the Glide headers - /usr/local/glide/lib/libglide2x.so - - If your Glide libraries and headers are in a different directory - you'll have to modify the Mesa-config and mklib.glide files. - - - Unpack the MesaLib-3.1.tar.gz and MesaDemos-3.1.tar.gz archives; - - - If you're going to use a newer Mesa/Glide driver than v0.27 then - unpack the new driver archive over the Mesa directory. - - - In the Mesa-3.1 directory type "make linux-glide" - - - Compilation _should_ finish without errors; - - - Set your LD_LIBRARY_PATH environment variable so that the - libglide2x.so and Mesa library files can be found. For example: - setenv LD_LIBRARY_PATH "/usr/local/glide/lib:/SOMEDIR/Mesa-3.1/lib" - - - You'll have to run Glide-based programs as root or set the suid - bit on executables; - - - Try a demo: - cd gdemos - su - setenv MESA_GLX_FX f - ./gears (hit ESC to exit) - - - You can find the demos especially designed for the Voodoo driver in - in the Mesa-3.1/3Dfx/demos directory (type "make" in order to compile - everything). - -MacOS: ------- - Check the WEB page at http://valerie.inf.elte.hu/~boga/Mesa.html - -MS Windows: ------------ - - For the MSVC++: - - The glide2x.lib have to be in the default MSVC++ lib directory; - - - The Glide headers have to be in the default MSVC++ include directory; - - - You must have the vcvars32.bat script in your PATH; - - - Go to the directory Mesa-3.1 and run the mesafx.bat; - - - The script will compile everything (Mesa-3.1/lib/OpenGL32.{lib,dll}, - Mesa-3.1/lib/GLU32.{lib,dll}, Mesa-3.1/lib/GLUT32.{lib,dll} and - Voodoo demos); - - - At the end, you will be in the Mesa-3.1/3Dfx/demos directory; - - - Try some demo (fire.exe, teapot.exe, etc.) in order to check if - everything is OK (you can use Alt-Tab or Ctrl-F9 to switch between - the Voodoo screen and the windows desktop); - - - Remember to copy the Mesa OpenGL32.dll, GLU32.dll and GLUT32.dll in the - some directory were you run your Mesa based applications. - - - I think that you can easy change the Makefile.fx files in order - to work with other kind of compilers; - - - To discover how open the 3Dfx screen, read the sources under - the Mesa-3.1/3Dfx/demos directory. You can use the GLUT library or - the Diego Picciani's wgl emulator. - - NOTE: the MSVC++ 5.0 optimizer is really buggy. Also if you install the - SP3, you could have some problem (you can disable optimization in order - solve these kind of problems). - - -Doing more with Mesa & Linux Glide: ------------------------------------ - - The MESA_GLX_FX environment variable can be used to coax most - GLX-based programs into using Glide (and the __GLUT library - is GLX-based__). - - Full-screen 3Dfx rendering: - --------------------------- - - 1. Set the MESA_GLX_FX variable to "fullscreen": - - ksh: - export MESA_GLX_FX = "fullscreen" - csh: - setenv MESA_GLX_FX fullscreen - - 2. As root, run a GLX-based program (any GLUT demo on Linux). - - 3. Be careful: once the 3Dfx screen appears you won't be able - to see the GLUT windows on your X display. This can make using - the mouse tricky! One solution is to hook up your 3Dfx card to - a second monitor. If you can do this then set these env vars - first: - - setenv SST_VGA_PASS 1 - setenv SST_NOSHUTDOWN - - or for the Voodoo2: - - setenv SSTV2_VGA_PASS 1 - setenv SSTV2_NOSHUTDOWN - - Rendering into an X window with the help of the Voodoo hardware: - ---------------------------------------------------------------- - - 1. Start your X server in 16 bpp mode (XFree86: startx -- -bpp 16) - in order to have the best performance and the best visual - quality. However you can use any visual depth supported by X. - - 2. Set the following environment variables: - export MESA_GLX_FX="window" # to enable window rendering - export SST_VGA_PASS=1 # to stop video signal switching - export SST_NOSHUTDOWN=1 # to stop video signal switching - OR - setenv MESA_GLX_FX window - setenv SST_VGA_PASS 1 - setenv SST_NOSHUTDOWN 1 - - (the Voodoo2 requires to use "SSTV2_" instead "SST_"). - - 3. As root, try running a GLX-based program - - How does it work? We use the 3Dfx hardware to do rendering then - copy the image from the 3Dfx frame buffer into an X window when - the SwapBuffers() function is called. The problem with this - idea is it's slow. The image must be copied from the 3Dfx frame - buffer to main memory then copied into the X window (and when the X - visual depth doesn't match the Voodoo framebufffer bit per pixel, it - is required also a pixel format translation). - - NOTE: the in-window rendering feature only works with double-buffering. - - - On the fly switching between in window rendering and full screen rendering - -------------------------------------------------------------------------- - - The Mesa 2.6 has introduced the capability of switching - on-the-fly between the fullscreen/fullspeed rendering and the in-window - hack and vice versa. The on-the-fly switching requires a direct support - by the application but it is really easy to add. You have to start - your X server in 16 bpp mode and to add the following lines to your - application: - - #if defined(FX) && define(XMESA) - #include - - static int fullscreen=1; - #endif - - ... - - /* In the GLUT keyboard event callback */ - - #if defined(FX) && !define(WIN32) - case ' ': - fullscreen=(!fullscreen); - XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW); - break; - #endif - ... - - See the 3Dfx/demos/tunnel.c program - for an example. You have to set the -DXMESA flag in the Makefile's COPTS - to enable it. - - Rendering into an X window with the X11 software driver: - -------------------------------------------------------- - - Set the MESA_GLX_FX variable to "disable" your GLX-based program will use - the X11 software driver (the 3Dfx hardware isn't used at all). - - - -Useful Glide Environment Variables: ------------------------------------ - - - To disable the 3Dfx logo, set the FX_GLIDE_NO_SPLASH variable. - - - To disable video signal switching: - setenv SST_VGA_PASS 1 - setenv SST_NOSHUTDOWN - or for the Voodoo2: - setenv SSTV2_VGA_PASS 1 - setenv SSTV2_NOSHUTDOWN - - - To set the default screen refresh rate: - setenv SST_SCREENREFRESH=75 - - the supported values are 60, 70, 72, 75, 80, 85, 90, 100, 120. - - - To force the Mesa library to swap buffers as fast as possible, - without any vertical blanking synchronization (useful for benchmarks): - setenv FX_GLIDE_SWAPINTERVAL 0 - setenv SST_SWAP_EN_WAIT_ON_VIDSYNC 0 - - - You can slight improve the performances of your Voodoo1 board with - the following env. var.: - setenv SST_FASTMEM 1 - setenv SST_PCIRD 1 - setenv SST_GRXCLK 57 - - (don't use this setting with the Quantum3D 100SB or with any other - SLI configuration: it will hang everything !). - The following setting can be used with the Voodoo2: - setenv SSTV2_FASTMEM_RAS_READS=1 - setenv SSTV2_FASTPCIRD=1 - setenv SSTV2_GRXCLK=95 - - - The Quantum3D Obsidian3D-2 X-24 requires some special env. setting - in order to work under Linux: - - export SSTV2_FT_CLKDEL=5 - export SSTV2_TF0_CLKDEL=7 - export SSTV2_TF1_CLKDEL=7 - export SSTV2_TF2_CLKDEL=7 - export SSTV2_SLIM_VIN_CLKDEL=3 - export SSTV2_SLIM_VOUT_CLKDEL=2 - export SSTV2_SLIS_VIN_CLKDEL=3 - export SSTV2_SLIS_VOUT_CLKDEL=2 - - (Thanks to Phil Ross for this trick). - - - - -The Mesa/Voodoo Environment Variables: --------------------------------------- - - - Only for Windows/Voodoo Rush users, if you define the - env. var. MESA_WGL_FX: - export MESA_WGL_FX=fullscreen - you will get fullscreen rendering; - - - Only for Windows/Voodoo Rush users, if you define the - env. var. MESA_WGL_FX: - export MESA_WGL_FX=window - you will get window rendering (default value); - - - Only for Linux users, you can find more informations about - the env. var. MESA_GLX_FX in the "Doing more with Mesa & Linux Glide" - section; - - - If you define the env. var. MESA_FX_SWAP_PENDING: - export MESA_FX_SWAP_PENDING=4 - you will able to set the maximum number of swapbuffers - commands in the Voodoo FIFO after a swapbuffer (default value: 2); - - - If you define the env. var. MESA_FX_INFO: - export MESA_FX_INFO=1 - you will get some useful statistic. - - - If you define the env. var. MESA_FX_NO_SIGNALS: - export MESA_FX_NO_SIGNALS=1 - Mesa/FX will not install atexit() or signal() handlers. - - - -Know BUGS and Problems: ------------------------ - - - fog doesn't work in the right way when using the glDepthRange() function; - - - Maximum texture size: 256x256 (this is an hardware limit); - - - Texture border aren't yet supported; - - - A GL_BLEND in a glTexEnv() is not supported (it is an hardware limit); - - - Use the glBindTexture extension (standard in OpenGL 1.1) for texture - mapping (the old way: glTexImage inside a display list, download - the texture map each time that you call the display list !!!); - - - Stencil buffer and Accumulation buffer are emulated in software (they are not - directly supported by the Hardware); - - - Color index mode not implemented (this is an hardware limit); - - - Thre is an know bug in the Linux Glide library so the in-window-rendering hack - and any other operations that requires to read the Voodoo frame buffer - (like the accumulation buffer support) doesn't work on Voodoo SLI cards. - - - The driver switch to pure software (_slow_) rendering when: - - - Stencil enabled; - - Using the Accumulation buffer; - - Blend enabled and blend equation != GL_FUNC_ADD_EXT; - - Color logic operation enabled and color logic operation != GL_COPY; - - Using GL_SEPARATE_SPECULAR_COLOR; - - The four values of glColorMask() aren't the some; - - Texture 1D or 3D enabled; - - Texture function is GL_BLEND; - - Using the Multitexture extension with Voodoo cards with only one TMU; - - Using the Multitexture extension with Voodoo cards with more than - one TMU, and texture function isn't GL_MODULATE; - - Point size is != 1.0 or point params vector != (1.0,0.0,0.0); - - Line width != 1.0 or using stipple lines. - - Using polygon offset or stipple polygons; - - NOTE: this is list is not yet complete. - - -Hints and Special Features: ---------------------------- - - - Under Linux and with a Voodoo Graphics board, you can use - XMesaSetFXmode(XMESA_FX_FULLSCREEN or XMESA_FX_WINDOW) in order to - switch on the fly between fullscreen rendering and the in-window-rendering - hack. - - - The driver is able to use all the texture memory available: 2/4MB on - Voodoo1 boards and 8MB (!) on high-end Voodoo1 and Voodoo2 boards. - - - Trilinear filtering is fully supported on Voodoo boards with two TMUs - (high-end Voodoo1 boards and Voodoo2 boards). When only one TMU is - available the driver fallback to bilinear filter also if you ask - for trilinear filtering. - - - The Voodoo driver support multiple Voodoo Graphics boards in the - some PC. Using this feature, you can write applications that use - multiple monitors, videoprojectors or HMDs for the output. See - Mesa-3.1/3Dfx/demos/tunnel2.c for an example of how setup one - context for each board. - - - The v0.19 introduces a new powerful texture memory manager: the - texture memory is used as a cache of the set of all defined texture - maps. You can now define several MBs of texture maps also with a 2MB - of texture memory (the texture memory manager will do automatically - all the swap out/swap in - texture memory work). The new texture memory manager has also - solved a lot of other bugs/no specs compliance/problems - related to the texture memory usage. - - - Use triangles and quads strip: they are a LOT faster than sparse - triangles and quads. - - - The Voodoo driver supports the GL_EXT_paletted_texture. it works - only with GL_COLOR_INDEX8_EXT, GL_RGBA palettes and the alpha value - is ignored because this is a limitation of the the current Glide - version and of the Voodoo hardware. See Mesa-3.1/3Dfx/demos/paltex.c for - a demo of this extension. - - - The Voodoo driver directly supports 3Dfx Global Palette extension. - It was written for GLQuake and I think that it isn't a good idea - to use this extension for any other purpose (it is a trick). See - Mesa-3.1/3Dfx/demos/glbpaltex.c for a demo of this extension. - - - The Voodoo driver chooses the screen resolution according to the - requested window size. If you open a 640x480 window, you will get - a 640x480 screen resolution, if you open a 800x600 window, you - will get a 800x600 screen resolution, etc. - Most GLUT demos support the '-geometry' option, so you can choose - the screen resolution: 'tunnel -geometry 800x600'. - Clearly, you Voodoo board must have enough framebuffer RAM (otherwise - the window creation will fail). - - - The glGetString(GL_RENDERER) returns more information - about the hardware configuration: "Mesa Glide - CARD/ FB/ - TM/ TMU/" - where: CARD is the card used for the current context, - FB is the number of MB for the framebuffer, - TM is the number of MB for the texture memory, - TMU is the number of TMU. You can try to run - Mesa/demos/glinfo in order to have an example of the output. - -Did you find a lot BUGs and problems ? Good, send me an email. - - - -FAQ: ----- - -For a complete FAQ check the Bernd Kreimeier's Linux 3Dfx HOWTO -available at http://www.gamers.org/dEngine/xf3D (it includes also -a lot of informations not strictly related to Linux, so it can be -useful also if you don't use Linux) - -1. What is 3Dfx? - -3Dfx Interactive, Inc. is the company which builds the VooDoo 3-D graphics -chipset (and others) used in popular PC cards such as the Diamond Monster 3D -and the Orchid Righteous 3D (more informations at http://www.3dfx.com). - - -2. What is Glide? - -Glide is a "thin" programming interface for the 3Dfx hardware. It was -originally written for Windows/Intel but has been ported to Linux/Intel -by Daryll Strauss. - -3Dfx, Inc. should be applauded for allowing the Linux version of Glide -to be written. - -You can directly program with the Glide library if you wish. You can -obtain Glide from the "Developer" section of the 3Dfx website: www.3dfx.com -There's a Linux/Glide newsgroup at news://news.3dfx.com/3dfx.glide.linux - - -3. What is fxmesa? - -"fxmesa" is the name of the Mesa device driver for the 3Dfx Glide library. -It was written by David Bucciarelli and others. It works on both Linux -and Windows. Basically, it allows you to write and run OpenGL-style programs -on the 3Dfx hardware. - - -4. What is GLQuake? - -Quake is a very popular game from id software, Inc. See www.idsoftware.com -GLQuake is a version of Quake written for OpenGL. There is now a Linux -version of GLQuake with works with the Mesa/3Dfx/Glide combo. - -Here's what you need to run GLQuake on Linux: - PC with 100MHz Pentium or better - a 3Dfx-based card - Mesa 3.1 libraries: libMesaGL.so libMesaGLU.so - Glide 2.4 libraries: libglide2x.so libtexus.so - GLQuake for Linux. - -Also, the windows version of GLQuake works fine with the Mesa OpenGL32.dll, -you have only to copy the Mesa-3.1/lib/OpenGL32.dll in the GLQuake directory -in order to test 'MesaQuake'. - - -5. What is GLUT? - -GLUT is Mark Kilgard's OpenGL Utility Toolkit. It provides an API for -writing portable OpenGL programs with support for multiple windows, pop- -up menus, event handling, etc. - -Check the Mark's home page for more informations (http://reality.sgi.com/mjk_asd). - -Every OpenGL programmer should check out GLUT. - -GLUT on Linux uses GLX. - - -6. What is GLX? - -GLX is the OpenGL extension to the X Window System. I defines both a -programming API (glX*() functions) and a network protocol. Mesa implements -an emulation of GLX on Linux. A real GLX implementation would requires -hooks into the X server. The 3Dfx hardware can be used with GLX-based -programs via the MESA_GLX_FX environment variable. - - -7. Is the Voodoo driver able to use the 4Mb texture memory of -the Pure3D boards ? - -Yes, the Voodoo driver v0.20 includes the support for Voodoo -Graphics boards with more than 2Mb of texture memory. - - -8. Do the Voodoo driver support the Voodoo Rush under Windows ? - -Yes, Diego Picciani has developed the support for the Voodoo -Rush but David Bucciarelli has a Pure3D and a Monster3D and Brian Paul -has a Monster3D, so the new versions of the Mesa/Voodoo sometime are -not tested with the Voodoo Rush. - - -9. Do the Voodoo driver support the Voodoo Rush under Linux ? - -No because the Linux Glide doesn't (yet) support the Voodoo Rush. - - -10. Can I sell my Mesa/Voodoo based software and include -a binary copy of the Mesa in order to make the software -working out of the box ? - -Yes. - - -11. Which is the best make target for compiling the Mesa for -Linux GLQuake ('make linux-glide', 'make linux-386-glide', etc.) ? - -'make linux-386-opt-glide' for Voodoo1 and 'make linux-386-opt-V2-glide' -for Voodoo2 boards because it doesn't include the '-fPIC' -option (4-5% faster). - - -12. Can I use a Mesa compiled with a 'make linux-386-opt-V2-glide' -for my applications/programs/demos ? - -Yes, there is only one constrain: you can't run two Mesa applications -at the some time. This isn't a big issue with the today Voodoo Graphics. - - -Thanks to: ----------- - -Henri Fousse (he has written several parts of the v0.15 and the old GLUT - emulator for Win); - -Diego Picciani (he has developed all the Voodoo Rush support and the wgl - emulator); - -Daryll Strauss (for the Linux Glide and the first Linux support); - -Brian Paul (of course); - -Dave 'Zoid' Kirsch (for the Linux GLQuake and Linux Quake2test/Q2 ports) - -Bernd Kreimeier (for the Linux 3Dfx HOWTO and for pushing companies to offer - a better Linux support) - -3Dfx and Quantum3D (for actively supporting Linux) - -The most update places where find Mesa VooDoo driver related informations are -the Mesa mailing list and my driver WEB page -(http://www-hmw.caribel.pisa.it/fxmesa/index.shtml) - - -David Bucciarelli (davibu@tin.it) - -Humanware s.r.l. -Via XXIV Maggio 62 -Pisa, Italy -Tel./Fax +39-50-554108 -email: info.hmw@plus.it -www: www-hmw.caribel.pisa.it diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.AMIWIN b/nx-X11/extras/Mesa_6.4.2/docs/README.AMIWIN deleted file mode 100644 index 47cf696cc1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.AMIWIN +++ /dev/null @@ -1,181 +0,0 @@ -AMIGA AMIWIN PORT of MESA: THE OPENGL SOFTWARE EMULATION -======================================================== -Port by Victor Ng-Thow-Hing (victorng@dgp.toronto.edu) -Original Author (Brian Paul (brianp@ssec.wisc.edu) - -Dec.1 , 1995: Port of release Mesa 1.2.5 - - Modifications made to minimize changes to Mesa distribution. - -Nov.25, 1995: Port of release Mesa 1.2.4 - - -HISTORY -======= -As a 3D graphics progammer, I was increasingly frustrated to see OpenGL -appearing on so many platforms EXCEPT the Amiga. Up to now, the task -of porting OpenGL directly from native Amiga drawing routines seemed like -a daunting task. However, two important events made this port possible. - -First of all, Brian Paul wrote Mesa, the OpenGL software emulator that -can be found on many platforms - except the Amiga and Atari (who cares -about the latter!). This was pretty ironic considering that Mesa was -originally prototyped on an Amiga! The second great event was when -Holger Kruse developed AmiWin, the X11R6 server for the Amiga (definitely -register for this great piece of software) and released a development kit -so one could compile X programs with SAS/C. - -Since Mesa had X routines as its primitive drawing operations, this made -a marriage of Mesa and Amiwin feasible. I copied over the sources from -an ftp site, played with the code, wrote some Smakefiles, and voila, -I had OpenGL programs displaying on my Amiga. - -Although the speed is nothing to be impressed about, this port can be -potentially useful to those who want to quickly test their code in -wireframe or perhaps learn more about programming with the OpenGL API. - -I hope Amiga developers will continue to write excellent software for -their machine, especially more X clients for Amiwin. If you have any -solutions so some of my problems in the porting notes, please send me -some email! - -See you around, -Vic. - -HOW TO CREATE THE LIBRARIES AND SAMPLE CODE -=========================================== - -Just run the shell script mklib.amiwin in the mesa directory. This will -make all the libraries and copy them into the mesa/lib directory. If you -don't want to compile everything, just go to the desired directory and -type smake in that directory. - -Change any of the variables in the smakefiles as necessary. You will REQUIRE -the Amiwin development kit to compile these libraries since you need X11.LIB -and the shareable X libraries. Some examples require the AmiTCP4.0 -net.lib static link library and related header files for unix related -header files and functions like sleep(). - -HOW TO USE THE MESA LIBRARIES -============================= - -Study the Smakefiles in the demos, samples and book directories for the -proper SAS/C options and linkable libraries to use. Basically aux calls -require Mesaaux.LIB, gl calls require MesaGL.LIB, glu calls MesaGLU.LIB, -tk calls Mesatk.LIB. There is a preliminary port of MesaGLUT.LIB toolkit -available in the lib directory with the other Mesa libraries. However, -it seems to cause crashes on some of the sample code. Someone else may want -to attempt a more stable port. - -PORTING NOTES TO AMIWIN -======================= - -My strategy of porting was to leave as much of the code untouched as -possible. I surrounded any amiga specific changes with -#ifdef AMIWIN ... #endif or #ifndef AMIWIN ... #endif preprocessor -symbols. The code was ported on an Amiga 2000, with Fusion 40 accelerator -and a Picasso II graphics card. The SAS/C 6.56 compiler was used, with -the AmiWin 2.16 X development kit. - -All compilations were done for a 68040 CPU with 68882 math coprocessor for -maximum speed. Please edit the smakefile for other compilers. -I wrote smakefiles for the directories I ported. I omitted the Windows -and Widgets directories. The former is for MS Windows and the latter -requires Motif, which is not easily available for the Amiga. - -Here are the changes I did per directory: - -* mesa -Nov. 25, 1995 v 1.2.4 - - added a mklib.amiwin shell script that will make all the libraries and - sample code for Mesa - - created this readme file: readme.AMIGA - -* mesa/include -Dec. 1, 1995 v 1.2.5 - - added the following to GL/xmesa.h - #ifdef AMIWIN - #include - extern struct Library *XLibBase; - #endif -NET CHANGE: xmesa.h - -* mesa/src -Nov. 25, 1995 v 1.2.4 - - added the necessary pragma calls for X functions to the following: - xmesa1.c, xmesa2.c, xmesa3.c, xfonts.c, glx.c - This prevents undefined symbols errors during the linking phase for - X library calls - - created smakefile -Dec. 1, 1995 v 1.2.5 - - removed AMIWIN includes from xmesa1.c, xmesa2.c, xmesa3.c, xfonts.c, - glx.c since they are now defined in include/GL/xmesa.h -NET CHANGE: smakefile - -* mesa/src-tk -Nov. 25, 1995 v 1.2.4 - - added the necessary pragma calls for X functions to the following: - private.h - - created smakefile -Dec. 1, 1995 v 1.2.5 - - removed AMIWIN includes from private.h since it is now defined in - include/GL/xmesa.h -NET CHANGE: smakefile - -* mesa/src-glu -Nov. 25, 1995 v 1.2.4 - - created smakefile -NET CHANGE: smakefile - -* mesa/src-aux -Nov. 25, 1995 v 1.2.4 - - added the necessary pragma calls for X functions to the following: - glaux.c - - created smakefile -NET CHANGE: glaux.c, smakefile - -* mesa/demos -Nov. 25, 1995 v 1.2.4 - - added the necessary pragma calls for X functions to the following: - xdemo.c, glxdemo.c, offset.c - - created smakefile - - put #ifndef AMIWIN ... #endif around sleep() calls in xdemo.c since - they are not part of AmigaDOS. -Dec. 1, 1995 v 1.2.5 - - removed AMIWIN defines from xdemo.c, glxdemo.c, offset.c since - already defined in include/GL/xmesa.h - - modified Smakefile to include header and includes from the AmiTCP4.0 - net.lib linkable library to provide unix-compatible sys/time.h and - the sleep() function - - removed AMIWIN defines in xdemo.c since sleep() now defined -NET CHANGE: smakefile - -* mesa/samples -Nov. 25, 1995 v 1.2.4 - - added the necessary pragma calls for X functions to the following: - oglinfo.c - - created smakefile - - put #ifndef AMIWIN ... #endif around sleep() in blendxor.c - - removed olympic from smakefile targets since not defined -Dec. 1, 1995 v 1.2.5 - - removed AMIWIN defines from oglinfo.c, since already defined in - include/GL/xmesa.h - - modified Smakefile to include header and includes from the AmiTCP4.0 - net.lib linkable library to provide unix-compatible sys/time.h and - the sleep() function - - removed AMIWIN defines in blendxor.c for sleep() - - added AMIWIN defines around _MACHTEN_ in olympic.c since xrandom() - functions are not defined in any libraries - - added olympic back into the Smakefile targets -NET CHANGE: smakefile, olympic.c - -* mesa/book -Nov. 25, 1995 v 1.2.4 -- created smakefile -- removed accpersp and dof from smakefile targets since the SAS/C compile seems to - confuse the near,far variables with near/far memory models. -NET CHANGE: smakefile - -* mesa/windows -Dec. 1, 1995 v 1.2.5 -- Removed directory to save space since this is only needed for Windows based - machines. diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.BEOS b/nx-X11/extras/Mesa_6.4.2/docs/README.BEOS deleted file mode 100644 index 5847730af0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.BEOS +++ /dev/null @@ -1,137 +0,0 @@ - - Mesa / BeOS Information - - - -* Introduction - -Brian Paul added in Mesa 3.1 a driver for BeOS R4.5 operating system. -This driver implements a clone of the BGLView class. This class, -derived from BView, allows OpenGL rendering into any BeOS window. His -driver was updated in Mesa 4.1 and again in version 6.1 by Philippe -Houdoin, who's maintaining this driver since. - -Any application which uses the BGLView should be able to use Mesa -instead of Be's OpenGL without changing any code. - -Since Be's OpenGL implementation (as of R5) is basically just the -SGI sample implementation, it's pretty slow. You'll see that Mesa -is considerably faster. - - -* Source Code - -The source code for the driver is in src/mesa/drivers/beos/ directory. -It's not 100% finished at this time but many GLUT-based demos are -working. No optimizations have been made at this time. - - -* Compiling - -Since Mesa 6.x, it can be build under BeOS with both the R5 builtin gcc version -or more recent gcc versions available for BeOS, like this gcc version 2.95.3 for BeOS -you can find at http://www.bebits.com/app/2157. -Anyway, keep in mind that to take full advantage of Mesa x86 optimizations, you better -want to use gcc 2.95.3 or sooner versions... - -To build Mesa-powered BeOS libGL.so version, open an Terminal window, -move to Mesa root folder and type this command: - -$ make beos - -Note that the "beos" argument is only needed the first time to setup build config. -Next times, typing "make" will be enough. - -When it finishes the Mesa based libGL.so library for -BeOS will be in the lib/ directory, along libglut.so library. -Several demo/test programs should have been build too under progs/* folders. -If it stop when building one of the progs/* programs, you may want to ignore it -and force make to move on next target by adding the -k make option: - -$ cd progs -$ make -k - -To install it as Be's default libGL.so replacement, put it in your -/boot/home/config/lib/ directory. All your GL/GLUT apps will use -the Mesa based then. - -By default, it build a non-debug version library. -The x86 (MMX, SSE and 3DNOW) optimizations are also supported for x86 target. -For PowerPC BeOS flavor, sorry, Mesa don't have ppc (Altivec) optimizations -yet. - -To build a DEBUG version, type instead this : - -$ DEBUG=1 make - - -* Example Programs - -Look under progs/beos/ for some BGLView-based programs. -You should find under progs/samples and progs/redbook directories GLUT-based programs too. -They all should have been compiled along with the Mesa library. - - -* GLUT - -A beta version of GLUT 3.7 port for BeOS, made by Jake Hamby, can be found at -http://anobject.com/jehamby/Code/Glut-3.7-x86.zip. -This is the version currently included in Mesa source code, and -build in lib/libglut.so. - -A previous 3.5 version of this GLUT BeOS port used to be available at -http://home.beoscentral.com/jehamby/Glut-3.5-x86.zip. - -They're special versions of GLUT for the BeOS platform. I don't -believe Mark Kilgard's normal GLUT distribution includes BeOS -support. - - -* Special Features - -Mesa's implementation of the BGLView class has an extra member -function: CopySubBufferMESA(). It basically works like SwapBuffers() -but it only copies a sub region from the back buffer to the front -buffer. This is a useful optimization for some applications. -If you use this method in your code be sure that you check at runtime -that you're actually using Mesa (with glGetString) so you don't -cause a fatal error when running with Be's OpenGL. - - -* Work Left To Do - -- BDirectWindow single buffering support is not implemented yet. -- Color index mode is not implemented yet. -- Reading pixels from the front buffer not implemented yet. -- There is also a BGLScreen class in BeOS for full-screen OpenGL rendering. - This should also be implemented for Mesa. -- Multiple renderers add-ons support, first step toward hardware acceleration - support. - -* Other contributors to this BeOS port - -Jake Hamby jhamby anobject com -Marcin Konicki ahwayakchih neoni net -Francois Revol revol free fr -Nathan Whitehorn nathanw uchicago edu - - -* Older BeOS Driver - -Mesa 2.6 had an earlier BeOS driver. It was based on Mesa's Off-screen -rendering interface, not BGLView. If you're interested in the older -driver you should get Mesa 2.6. - - -* BeOS and Glide - -Mesa 3.0 supported the 3Dfx/Glide library on Beos. Download Mesa 3.0 -if interested. Ideally, the 3Dfx/Glide support should be updated to -work with the new Mesa 3.1 BGLView implementation. - -The Glide library hasn't been updated for BeOS R4 and newer, to my knowledge, -as of February, 1999. - - ----------------------------------------------------------------------- -$Id: README.BEOS,v 1.12 2004/10/13 00:35:55 phoudoin Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.CYGWIN b/nx-X11/extras/Mesa_6.4.2/docs/README.CYGWIN deleted file mode 100644 index 58d5af3e29..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.CYGWIN +++ /dev/null @@ -1,256 +0,0 @@ - - Mesa Cygwin/X11 Information - - -WARNING -======= - -If you installed X11 (packages xorg-x11-devel and xorg-x11-bin-dlls ) with the -latest setup.exe from Cygwin the GL (Mesa) libraries and include are already -installed in /usr/X11R6. - -The following will explain how to "replace" them. - -Installation -============ - -How to compile Mesa on Cygwin/X11 systems: - -1. Shared libs: - type 'make cygwin-sl'. - - When finished, the Mesa DLL will be in the Mesa-x.y/lib/ and - Mesa-x.y/bin directories. - - -2. Static libs: - type 'make cygwin-static'. - When finished, the Mesa libraries will be in the Mesa-x.y/lib/ directory. - -Header and library files: - After you've compiled Mesa and tried the demos I recommend the following - procedure for "installing" Mesa. - - Copy the Mesa include/GL directory to /usr/X11R6/include: - cp -a include/GL /usr/X11R6/include - - Copy the Mesa library files to /usr/X11R6/lib: - cp -a lib/* /usr/X11R6ocal/lib - - Copy the Mesa bin files (used by the DLL stuff) to /usr/X11R6/bin: - cp -a lib/cyg* /usr/X11R6/bin - -Xt/Motif widgets: - If you want to use Mesa or OpenGL in your Xt/Motif program you can build - the widgets found in either the widgets-mesa or widgets-sgi directories. - The former were written for Mesa and the later are the original SGI - widgets. Look in those directories for more information. - For the Motif widgets you must have downloaded the lesstif package. - - -Using the library -================= - -Configuration options: - The file src/mesa/main/config.h has many parameters which you can adjust - such as maximum number of lights, clipping planes, maximum texture size, - etc. In particular, you may want to change DEPTH_BITS from 16 to 32 - if a 16-bit depth buffer isn't precise enough for your application. - - -Shared libraries: - If you compile shared libraries (Win32 DLLS) you may have to set an - environment variable to specify where the Mesa libraries are located. - Set the PATH variable to include /your-dir/Mesa-2.6/bin. - Otherwise, when you try to run a demo it may fail with a message saying - that one or more DLL couldn't be found. - - -Xt/Motif Widgets: - Two versions of the Xt/Motif OpenGL drawing area widgets are included: - - widgets-sgi/ SGI's stock widgets - widgets-mesa/ Mesa-tuned widgets - - Look in those directories for details - - -Togl: - Togl is an OpenGL/Mesa widget for Tcl/Tk. - See http://togl.sourceforge.net for more information. - - - -X Display Modes: - Mesa supports RGB(A) rendering into almost any X visual type and depth. - - The glXChooseVisual function tries its best to pick an appropriate visual - for the given attribute list. However, if this doesn't suit your needs - you can force Mesa to use any X visual you want (any supported by your - X server that is) by setting the MESA_RGB_VISUAL and MESA_CI_VISUAL - environment variables. When an RGB visual is requested, glXChooseVisual - will first look if the MESA_RGB_VISUAL variable is defined. If so, it - will try to use the specified visual. Similarly, when a color index - visual is requested, glXChooseVisual will look for the MESA_CI_VISUAL - variable. - - The format of accepted values is: - Here are some examples: - - using the C-shell: - % setenv MESA_RGB_VISUAL "TrueColor 8" // 8-bit TrueColor - % setenv MESA_CI_VISUAL "PseudoColor 12" // 12-bit PseudoColor - % setenv MESA_RGB_VISUAL "PseudoColor 8" // 8-bit PseudoColor - - using the KornShell: - $ export MESA_RGB_VISUAL="TrueColor 8" - $ export MESA_CI_VISUAL="PseudoColor 12" - $ export MESA_RGB_VISUAL="PseudoColor 8" - - -Double buffering: - Mesa can use either an X Pixmap or XImage as the backbuffer when in - double buffer mode. Using GLX, the default is to use an XImage. The - MESA_BACK_BUFFER environment variable can override this. The valid - values for MESA_BACK_BUFFER are: Pixmap and XImage (only the first - letter is checked, case doesn't matter). - - A pixmap is faster when drawing simple lines and polygons while an - XImage is faster when Mesa has to do pixel-by-pixel rendering. If you - need depth buffering the XImage will almost surely be faster. Exper- - iment with the MESA_BACK_BUFFER variable to see which is faster for - your application. - - -Colormaps: - When using Mesa directly or with GLX, it's up to the application writer - to create a window with an appropriate colormap. The aux, tk, and GLUT - toolkits try to minimize colormap "flashing" by sharing colormaps when - possible. Specifically, if the visual and depth of the window matches - that of the root window, the root window's colormap will be shared by - the Mesa window. Otherwise, a new, private colormap will be allocated. - - When sharing the root colormap, Mesa may be unable to allocate the colors - it needs, resulting in poor color quality. This can happen when a - large number of colorcells in the root colormap are already allocated. - To prevent colormap sharing in aux, tk and GLUT, define the environment - variable MESA_PRIVATE_CMAP. The value isn't significant. - - -Gamma correction: - To compensate for the nonlinear relationship between pixel values - and displayed intensities, there is a gamma correction feature in - Mesa. Some systems, such as Silicon Graphics, support gamma - correction in hardware (man gamma) so you won't need to use Mesa's - gamma facility. Other systems, however, may need gamma adjustment - to produce images which look correct. If in the past you thought - Mesa's images were too dim, read on. - - Gamma correction is controlled with the MESA_GAMMA environment - variable. Its value is of the form "Gr Gg Gb" or just "G" where - Gr is the red gamma value, Gg is the green gamma value, Gb is the - blue gamma value and G is one gamma value to use for all three - channels. Each value is a positive real number typically in the - range 1.0 to 2.5. The defaults are all 1.0, effectively disabling - gamma correction. Examples using csh: - - % setenv MESA_GAMMA "2.3 2.2 2.4" // separate R,G,B values - % setenv MESA_GAMMA "2.0" // same gamma for R,G,B - - The demos/gamma.c program may help you to determine reasonable gamma - value for your display. With correct gamma values, the color intensities - displayed in the top row (drawn by dithering) should nearly match those - in the bottom row (drawn as grays). - - Alex De Bruyn reports that gamma values of 1.6, 1.6 and 1.9 work well - on HP displays using the HP-ColorRecovery technology. - - Mesa implements gamma correction with a lookup table which translates - a "linear" pixel value to a gamma-corrected pixel value. There is a - small performance penalty. Gamma correction only works in RGB mode. - Also be aware that pixel values read back from the frame buffer will - not be "un-corrected" so glReadPixels may not return the same data - drawn with glDrawPixels. - - For more information about gamma correction see: - http://www.inforamp.net/~poynton/notes/colour_and_gamma/GammaFAQ.html - - -Overlay Planes - - Overlay planes in the frame buffer are supported by Mesa but require - hardware and X server support. To determine if your X server has - overlay support you can test for the SERVER_OVERLAY_VISUALS property: - - xprop -root | grep SERVER_OVERLAY_VISUALS - - -HPCR glClear(GL_COLOR_BUFFER_BIT) dithering - - If you set the MESA_HPCR_CLEAR environment variable then dithering - will be used when clearing the color buffer. This is only applicable - to HP systems with the HPCR (Color Recovery) system. - - -Extensions -========== - There are three Mesa-specific GLX extensions at this time. - - GLX_MESA_pixmap_colormap - - This extension adds the GLX function: - - GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual, - Pixmap pixmap, Colormap cmap ) - - It is an alternative to the standard glXCreateGLXPixmap() function. - Since Mesa supports RGB rendering into any X visual, not just True- - Color or DirectColor, Mesa needs colormap information to convert RGB - values into pixel values. An X window carries this information but a - pixmap does not. This function associates a colormap to a GLX pixmap. - See the xdemos/glxpixmap.c file for an example of how to use this - extension. - - GLX_MESA_release_buffers - - Mesa associates a set of ancillary (depth, accumulation, stencil and - alpha) buffers with each X window it draws into. These ancillary - buffers are allocated for each X window the first time the X window - is passed to glXMakeCurrent(). Mesa, however, can't detect when an - X window has been destroyed in order to free the ancillary buffers. - - The best it can do is to check for recently destroyed windows whenever - the client calls the glXCreateContext() or glXDestroyContext() - functions. This may not be sufficient in all situations though. - - The GLX_MESA_release_buffers extension allows a client to explicitly - deallocate the ancillary buffers by calling glxReleaseBuffersMESA() - just before an X window is destroyed. For example: - - #ifdef GLX_MESA_release_buffers - glXReleaseBuffersMESA( dpy, window ); - #endif - XDestroyWindow( dpy, window ); - - This extension is new in Mesa 2.0. - - GLX_MESA_copy_sub_buffer - - This extension adds the glXCopySubBufferMESA() function. It works - like glXSwapBuffers() but only copies a sub-region of the window - instead of the whole window. - - This extension is new in Mesa version 2.6 - - - -Summary of X-related environment variables: - MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode (X only) - MESA_CI_VISUAL - specifies the X visual and depth for CI mode (X only) - MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only) - MESA_PRIVATE_CMAP - force aux/tk libraries to use private colormaps (X only) - MESA_GAMMA - gamma correction coefficients (X only) - - ----------------------------------------------------------------------- -README.CYGWIN - lassauge April 2004 - based on README.X11 diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.D3D b/nx-X11/extras/Mesa_6.4.2/docs/README.D3D deleted file mode 100644 index b41fcb6208..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.D3D +++ /dev/null @@ -1,124 +0,0 @@ - - DirectX 6 Driver for Mesa 3.0 - - -This software is distributed under the terms of the GNU Library -General Public License, see the LICENSE file for details. - - - -What do you need ? ------------------- - - - A PC with a DirectX 6 video driver installed. - - - Mesa 3.0 - - - The 3Dfx Glide library 2.3 or later for your OS (the 2.4 works fine). - The Voodoo2 requires the Glide library 2.51. The Glide 3.0 is not - compatible with the Glide 2.x so it doesn't work with the current - version of the driver; - - - Visual C++ 5.0 is only compiler test but others should be ok with - changes to the makefiles (CFLAGS/LFLAGS). - - - DirectX 6 SDK (was a MS download but not sure if still available). - - - SoftIce or another debugger that will get DPF's is nice. - - -Tested on: ----------- - Windows 95 - Windows 98 - Windows NT 5.0 (beta 2) - - -What is able to do ? --------------------- - - - the driver will try and use DirectX to rasterize the OpenGL primitives - that are sent to the driver. The driver will fall back to SW if the rendering - context is too big. The fallback to SW still uses DirectDraw. If the driver - fails to support and operation (accum, stencil, etc) then it will try and get - Mesa to render it in SW. DirectX 6 features that are unsupported by the - installed DirectX 6 driver will be mapped to some other best fit feature. - - -How to compile: ---------------- - - These instructions assume you have Visual C++ installed. - - You might need to increase you enviroment space. You can do this by - adding the following statement to you config.sys. - - shell=C:\COMMAND.COM C:\ /p /e:8198 - - Next setup you compiler enviroment by running vcvars32.bat in the Visual C++ - 'bin' directoy. - - c:\DevStudio\VC\bin\vcvars32.bat - - Modify the D3D makefile to point at your SDK install. Example has the SDK - installed on my 'f' drive in the root. - - file: \Mesa-3.0\src\makefile.d3d - - SDKROOT=f:\mssdk - - Now you can simply make the project. If you look in the makefile you can see - I have some different targets like 'install'. - - nmake /f makefile.d3d - - -FAQ: ----- - - 1) I don't think the driver is using my DirectX driver. - - This maybe true as the current version will only select the Primary D3D driver - installed. If you 3D card is the secondary (3dfx) then your out of luck for this - release. - - 2) The driver seems like its not HW accelerated. - - If you have a video card with limited memory then you might want to try and - change your destop resolution to a low setting (640x480x16) so that the 3D part - of the card has more resources. Remeber the driver can't make the card better... - - 3) Nothing works. - - Make sure you have a DirectX '6' driver installed. Check you driver docs for this - info or use the SDK info utilities. - The final 'dll' is named opengl32.dll and is either in the same directory as the - OpenGL program or in your system directory (x:\windows\system or x:\winnt\system32). - Check your destop resolution. Most DirectX 6 drivers will only support 16bit and - 32bit color depth. To find out for sure you can check the DirectX Info Viewer in - the SDK. - - - 4) Rendering doesn't look right. - - Sometimes this is because the card doesn't support a feature that that is required. - This is usually due to unsupported alpha functions (test/blend) or texture mapping. - Some cards suffer from too small of an alpha channel. The driver does its best to - fallback on unsupported features. This is not to say the driver may not have a bug(s). - - 5) Textures look bad. - - No mipmapping in this release. - - -Thanks to: ----------- - -Brian Paul - - - - -Leigh McRae (leigh@altsoftware.com) -February 9, 1999 - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.DJ b/nx-X11/extras/Mesa_6.4.2/docs/README.DJ deleted file mode 100644 index 7180223c24..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.DJ +++ /dev/null @@ -1,275 +0,0 @@ - Mesa 6.3 DOS/DJGPP Port v1.7 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - - -Description: -~~~~~~~~~~~~ - -Well, guess what... this is the DOS port of Mesa 6.3, for DJGPP fans... Whoa! -The driver has its origins in ddsample.c, written by Brian Paul and found by me -in Mesa 3.4.2. - - - -Legal: -~~~~~~ - -Mesa copyright applies, provided this package is used within Mesa. For anything -else, see GPL. - - - -Installation: -~~~~~~~~~~~~~ - -Unzip and type: - - make -f Makefile.DJ [OPTIONS...] - -Available options: - - Environment variables: - CPU optimize for the given processor. - default = pentium - GLU=[mesa|sgi] specify GLU directory; can be `sgi' (requires GNU/C++) - or `mesa'. - default = mesa - GLIDE path to Glide3 SDK; used with FX. - default = $(TOP)/glide3 - FX=1 build for 3dfx Glide3. Note that this disables - compilation of most DMesa code and requires fxMesa. - As a consequence, you'll need the DJGPP Glide3 - library to build any application. - default = no - X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow). - default = no - - Targets: - all: build everything - libgl: build GL - libglu: build GLU - libglut: build GLUT - clean: remove object files - realclean: remove all generated files - - - -Tested on: - CPU: AMD Athlon XP 1800+ - Mainboard: GA-7VTXE w/ 512 MB DDRAM - Video card: Voodoo5 6000 AGP w/ 128 MB SDRAM - DJGPP: djdev 2.04 + gcc v3.4.3 + make v3.80 - OS: DOS and Win98SE - - - -FAQ: -~~~~ - -1. Compilation - - Q) `make' barfs and exits because it cannot find some stupid file. - A) You need LFN support. - A) When compiling for Glide (FX=1), pay attention to Glide path. - - Q) Libraries built OK, but linker complains about `vsnprintf' every time I - compile some demo. - A) Upgrade to DJGPP 2.04. - A) Add `vsnprintf.c' to the CORE_SOURCES in `src/Makefile.DJ' (untested!). - A) Patch `src/mesa/main/imports.c' with the following line: - #define vsnprintf(buf, max, fmt, arg) vsprintf(buf, fmt, arg) - This hack should be safe in 90% of the cases, but if anything goes wrong, - don't come back to me crying. - - Q) `make' complains about DXE3 or something, yet it builds the libraries. - A) DXE3 refers to the DJGPP dynamic modules. You'll need either the latest - DJGPP distro, or download the separate package from my web page. Read the - DXE3 documentation on how to use them. - A) When compiling for Glide (FX=1), make sure `glide3x.dxe' can be found in - LD_LIBRARY_PATH (or top `lib' directory). - -2. Using Mesa for DJGPP - - Q) Every test I tried crashes badly. - A) If you have compiled with SSE and you're running under plain DOS, you - have to disable SSE at run-time. See environment variables below. - - Q) DMesa is so SLOOOW! The Win32 OpenGL performs so much better... - A) Is that a question? If you have a 3dfx Voodoo (any model), you're - lucky (check http://sourceforge.net/projects/glide for the DJGPP port). - If you haven't, sorry; everything is done in software. Suggestions? - - Q) I tried to set refresh rate w/ DMesa, but without success. - A) Refresh rate control works only for VESA 3.0 and the 3dfx driver (in - which case FX_GLIDE_REFRESH will be overwritten if it is defined and - is not 0). - - Q) I made a simple application and it does nothing. It exits right away. Not - even a blank screen. - A) Pure software drivers (VESA/VGA/NUL) support only double-buffered modes. - A) Another weird "feature" is that buffer width must be multiple of 8 (I'm a - lazy programmer and I found that the easiest way to keep buffer handling - at peak performance ;-). - - Q) I'm getting a "bad font!" fatal error. - A) Always use GLUT_STROKE_* and GLUT_BITMAP_* constants when dealing with - GLUT fonts. If you're using `glut.dxe', then make sure GLUT_STROKE_* and - GLUT_BITMAP_* are mapped to integer constants, not to the actual font - address (same mechanism used for Win32 _DLL). - - Q) What is NUL driver good for, if I don't get any output at all? - A) For debugging. The NUL driver is very much like OSMesa. Everything is - done just the same as VESA/VGA drivers, only it doesn't touch your video - hardware. You can query the actual buffer by issuing: - DMesaGetIntegerv(DMESA_GET_BUFFER_ADDR, &buffer); - and dump it to a file. - - Q) How do I query for a list of available video modes to choose as a visual? - A) This is an ugly hack, for which I'm sure I'll burn in hell. - First, query for a list of modes: - n = DMesaGetIntegerv(DMESA_GET_VIDEO_MODES, NULL); - If `n' is strictly positive, you allocate an array of pointers to a given - struct (which is guaranteed to be extended only - not changed in future): - struct { - int xres, yres; - int bpp; - } **l = malloc(n * sizeof(void *)); - Now pass the newly allocated buffer to fill in: - DMesaGetIntegerv(DMESA_GET_VIDEO_MODES, (GLint *)l); - And collect the info: - for (i = 0; i < n; i++) { - printf("%dx%d:%d\n", l[i]->xres, l[i]->yres, l[i]->bpp); - } - - Q) The GLUT is incomplete. - A) See below. - - - -libGLUT (the toolkit): -~~~~~~~~~~~~~~~~~~~~~~ - -Well, this "skeletal" GLUT implementation was taken from AllegGL project and -heavily changed. Thanks should go to Bernhard Tschirren, Mark Kilgard, Brian -Paul and probably others (or probably not ;-). GLUT functionality will be -extended only on an "as needed" basis. - -GLUT talks to hardware via PC_HW package which was put together from various -pieces I wrote long time ago. It consists from the keyboard, mouse and timer -drivers. - -My keyboard driver used only scancodes; as GLUT requires ASCII values for keys, -I borrowed the translation tables (and maybe more) from Allegro -- many thanks -to Shawn Hargreaves et co. Ctrl-Alt-Del (plus Ctrl-Alt-End, for Windows users) -will shut down the GLUT engine unconditionally: it will raise SIGINT, which in -turn will (hopefully) call the destructors, thus cleaning up your/my mess ;-) -NB: since the DJGPP guys ensured signal handlers won't go beyond program's -space (and since dynamic modules shall) the SIGINT can't be hooked (well, it -can, but it is useless), therefore you must live with the 'Exiting due to -signal SIGINT' message... - -The mouse driver is far from complete (lack of drawing, etc), but is enough to -make almost all the demos work. Supports the CuteMouse WheelAPI. - -The timer is pretty versatile for it supports multiple timers with different -frequencies. While not being the most accurate timer in the known universe, I -think it's OK. Take this example: you have timer A with a very high rate, and -then you have timer B with very low rate compared to A; now, A ticks OK, but -timer B will probably loose precision! - -As an addition, stdout and stderr are redirected and dumped upon exit. This -means that `printf' can be safely called during graphics. A bit of a hack, I -know, because all messages come in bulk, but I think it's better than nothing. -"Borrowed" from LIBRHUTI (Robert Hoehne). - -Window creating defaults: (0, 0, 300, 300), 16bpp. However, the video mode is -chosen in such a way that first window will fit. If you need high resolution -with small windows, set initial position far to the right (or way down); then -you can move them back to any position right before the main loop. - - - -Environment variables: -~~~~~~~~~~~~~~~~~~~~~~ - DMESA_NULDRV - (any value) force NUL driver - GLUT_FPS - print frames/second statistics to stderr - MESA_NO_SSE - (any value) safe option under pure DOS - DMESA_GLUT_REFRESH - set vertical screen refresh rate (VESA3) - DMESA_GLUT_BPP - set default bits per pixel (VGA needs 8) - DMESA_GLUT_ALPHA - set default alpha bits (8) - DMESA_GLUT_DEPTH - set default depth bits (16) - DMESA_GLUT_STENCIL - set default stencil bits (8) - DMESA_GLUT_ACCUM - set default accum bits (16) - - - -History: -~~~~~~~~ - -v1.0 (mar-2002) - initial release - -v1.1 (sep-2002) - + added 3dfx Glide3 support - + added refresh rate control - + added fonts in GLUT - * lots of minor changes - -v1.2 (nov-2002) - * synced w/ Mesa-4.1 - - removed dmesadxe.h - -v1.3 (mar-2003) - + enabled OpenGL 1.4 support - + added MMX clear/blit routines - + enabled SGI's GLU compilation - + added samples makefile - + added new GLUT functions - + added color-index modes - + added Matrox Millennium MGA2064W driver - + added 8bit FakeColor (thanks to Neil Funk) - + added VGA support (to keep Ben Decker happy) - ! fixed some compilation errors (reported by Chan Kar Heng) - * optimized driver for faster callback access... yeah, right :) - * overhauled virtual buffer and internal video drivers - * better fxMesa integration - * revamped GLUT - * switched to DXE3 - -v1.4 (dec-2003) - + enabled GLUT fonts with DXE - + truly added multi-window support in GLUT (for Adrian Woodward) - * accomodated makefiles with the new sourcetree - * fixed some ALPHA issues - * minor changes to PC_HW/timer interface - x hacked and slashed the 3dfx driver (w/ help from Hiroshi Morii) - -v1.5 (jan-2004) - + added interface to query available "visuals" (GLFW - Marcus Geelnard) - + added GLUT timer callback - - removed Matrox Millennium MGA2064W driver - x more changes to the 3dfx driver - -v1.6 (aug-2004) - + implemented NUL driver - + added DMesaGetProcAddress and glutGetProcAddress - * reorganized fxMesa wrapper to handle multiple contexts - ! fixed a horrible bug in VGA initialization routine - ! fixed partial clears - -v1.7 (???-2005) - + enabled OpenGL 2.0 support - + added support for sw texture compression - + added FreeGLUT specific functions - * no more GLX sources in DOS GLUT - * made GLUT timer callbacks less accurate but safer - - - -Contact: -~~~~~~~~ - -Name: Daniel Borca -E-mail: dborca@users.sourceforge.net -WWW: http://www.geocities.com/dborca/ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.GGI b/nx-X11/extras/Mesa_6.4.2/docs/README.GGI deleted file mode 100644 index ddb67725f1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.GGI +++ /dev/null @@ -1,26 +0,0 @@ -GGIMesa for LibGGI 2.x - -Requirements: -------------- -LibGGI 2.0 or greater - -Installation: -------------- -To install GGIMesa, follow the instructions in INSTALL.GNU. If you -wish to install GGIGLUT as well, first install GGIMesa and then run - -make -make install (must be root) - -in ggi/ggiglut. - -Notes: ------- - -* Set the environment variables GGIMESA_DEBUG and/or GGIGLUT_DEBUG -to 255 to see lots of debugging output. - -* GGIGLUT contains support for all of the GLUT 3.6 API except for the -high-level primitive drawing functions, but many of the functions (in -particular the menu drawing functions) are just stubs. - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.LYNXOS b/nx-X11/extras/Mesa_6.4.2/docs/README.LYNXOS deleted file mode 100644 index e3ab9804bd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.LYNXOS +++ /dev/null @@ -1,64 +0,0 @@ - -Mesa 3.0 for LynxOS builds in the following way: - -make lynxos - -This will build all the libraries and demo applications. You should have -around 400 megabytes free for everything since everything is done with -static -libraries. - -Before using this make file however, you should perform the following -actions: -0) cd to the Mesa-3.0 directory -1) Copy the GL directory under the include directory to /usr/include. -2) Copy the files in the lib directory to /lib. -3) Make links so that the Mesa libraries look like ordinary OpenGL -libraries -in /lib. This is important for compatibility with other OpenGL apps. This -is done as follows: - -cd /lib -ln -s libMesaGL.a libGL.a -ln -s libMesaGLU.a libGLU.a - -Mesa 3.0 includes the GLUT (GL Utility Toolkit) by default. -The demo applications are done using this toolkit. - -Mesa makefiles for building their apps could be used as well, but the -following one is much more concise. Note that the order of the X libraries -is important to the linker so that all symbols get resolved correctly. -Changing the order may result in having to list a library twice to make -sure all linkages are made correctly. - -----cut here for Makefile ----- - -FILES = your_app.x - -SPECIAL_INCLUDES = -I/usr/include/GL - -SPECIAL_CFLAGS = -g -ansi -pedantic -funroll-loops -ffast-math -DSHM - -SPECIAL_LIBS = -lglut -lGLU -lGL -lm -L/usr/X11/lib -lXext -lXmu -lXi \ --lX11 -lbsd -g - -STANDARD_OFILES = $(FILES:.x=.o) - -%.o: %.c - gcc -c $(SPECIAL_CFLAGS) $(SPECIAL_INCLUDES) $< -o $@ - -all: $(STANDARD_OFILES) - gcc -o your_app $(STANDARD_OFILES) $(SPECIAL_LIBS) - - -----cut here for Makefile----- - -I have tested Mesa under LynxOS 3.0 and 3.01. It should build fine under -other -versions as well. Note, however, that LynxOS versions prior to 3.0 are not -binary compatible, so you will have to rebuild from source. - - -Vik Sohal -vik@lynx.com -January 13, 1999 diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.MINGW32 b/nx-X11/extras/Mesa_6.4.2/docs/README.MINGW32 deleted file mode 100644 index 2b39f12090..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.MINGW32 +++ /dev/null @@ -1,90 +0,0 @@ - Mesa 6.1 for MinGW32 - ~~~~~~~~~~~~~~~~~~~~ - - - -Quick & dirty start: --------------------- - - mingw32-make -f Makefile.mgw [OPTIONS...] - - Look into the corresponding makefiles for further information. - Check README.3DFX to find out how to compile Mesa Glide3 driver - with MinGW32! - - - -******************************************************************************* -The Mingw port for Mesa 3-D Graphics Library was created August 30, 1998 by Paul Garceau. - -Updated January 13, 2000; June 3, 2005 -- Paul Garceau - -DISCLAIMER: I make this port of the Mesa 3-D Graphics Library as a service -to the general public. I can, in no way support or make any guarantee that the -build will work for your system. - -Acknowledgements: - - Daniel Borca, whose work and commitment to maintaining the Mingw port of the Mesa 3-D Graphics Library has been, and will continue to be greatly appreciated by an overworked and underpaid developer such as myself. - Without the creative inspiration and personal commitment provided by Mumit Khan, Jan-Jaap Vanderhagen and Colin Peters, Mingw would never have existed. Acknowledgements also need to be given to all of the developers who have worked on Mingw, Mesa and Msys over the years. - Last, but certainly far from the least, Brian Paul, who has dedicated at least the last seven or eight years of his life to making Mesa 3-D Graphics Library what it is today and managing the development for all of those years. -********************************************************************************* - -Greetings, - - Feel free to modify or change things related to the Mingw build as you see fit, just remember that, the author of the current build may not be able to support any modifications you might want to make to the files which have been included for the build. - -Mesa core components are licensed under XFree-86 (for more on licensing of Mesa 3-D Graphics Library, check out the Mesa homepage (http://www.mesa3d.org). - -The Mingw generated libraries themselves are licensed under the GNU-LGPL license. Source code for Mingw can be found at http://www.mingw.org. For licensing terms on Mingw, please visit http://www.mingw.org. - - It is recommended that you use the latest "stable" release of Mingw. "Candidates" are beta testing distributions for Mingw. Mingw is available at http://www.mingw.org. - - This build has been tested under WinNT4/SP6. Win9x and WinNT5 remain untested by me. I have not tested any of the demos included with Mesa3d. - -Installation: - - This readme assumes that you already have extracted the necessary files to a working directory/folder that Mingw can use to build the Mesa3D libraries and that you know where that directory/folder is located on your Windows system. If you have any questions about how to set things up properly which is specific to Mesa3D, the folks on the Mesa3D mailing lists (http://www.mesa3d.org) would probably be happy to assist you. Also you can probably ask anyone on the Mingw mailing lists for any questions specific to Mingw (http://www.mingw.org) - -Targets and Environment variables used for Mingw build: - - Before going into the actual build of the libraries, here is a list of available targets for the make process: - - "all" or "libgl" -- this target will build libopengl.a, a static library. It will not build the demos, etc. - - clean -- this target will clean up most of the Mesa 3-D Graphics Library/object code from your hard drive. - - realclean -- this target will clean up all of the Mesa 3D Graphics Library and the Mesa object code that it can find. - - Environment Variables: - - The environment variables are used to determine what sort of graphics driver support needs to be included in the finished Mesa 3-D Graphics Library. - - GLIDE path to Glide3 SDK; used with FX. - default = $(TOP)/glide3 - FX=1 build for 3dfx Glide3. Note that this disables - compilation of most WMesa code and requires fxMesa. - As a consequence, you'll need the Win32 Glide3 - library to build any application. - default = no - ICD=1 build the installable client driver interface - (windows opengl driver interface) - default = no - X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow). - default = no - - -Running the Build: - - Launch Mingw. - From the Windows Command Prompt: - Set Environment Variables (as needed). - "cd" to your Mesa3D 'root' directory. - Enter "mingw32-make -f makefile.mgw - - That's all there is to it. - - Enjoy! - - Paul G. - Daniel Borca diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.MITS b/nx-X11/extras/Mesa_6.4.2/docs/README.MITS deleted file mode 100644 index a89176a62e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.MITS +++ /dev/null @@ -1,102 +0,0 @@ - - Mesa 3.0 MITS Information - - -This software is distributed under the terms of the GNU Library -General Public License, see the LICENSE file for details. - - -This document is a preliminary introduction to help you get -started. For more detaile information consult the web page. - -http://10-dencies.zkm.de/~mesa/ - - - -Version 0.1 (Yes it's very alpha code so be warned!) -Contributors: - Emil Briggs (briggs@bucky.physics.ncsu.edu) - David Bucciarelli (tech.hmw@plus.it) - Andreas Schiffler (schiffler@zkm.de) - - - -1. Requirements: - Mesa 3.0. - An SMP capable machine running Linux 2.x - libpthread installed on your machine. - - -2. What does MITS stand for? - MITS stands for Mesa Internal Threading System. By adding - internal threading to Mesa it should be possible to improve - performance of OpenGL applications on SMP machines. - - -3. Do applications have to be recoded to take advantage of MITS? - No. The threading is internal to Mesa and transparent to - applications. - - -4. Will all applications benefit from the current implementation of MITS? - No. This implementation splits the processing of the vertex buffer - over two threads. There is a certain amount of overhead involved - with the thread synchronization and if there is not enough work - to be done the extra overhead outweighs any speedup from using - dual processors. You will not for example see any speedup when - running Quake because it uses GL_POLYGON and there is only one - polygon for each vertex buffer processed. Test results on a - dual 200 Mhz. Pentium Pro system show that one needs around - 100-200 vertices in the vertex buffer before any there is any - appreciable benefit from the threading. - - -5. Are there any parameters that I can tune to try to improve performance. - Yes. You can try to vary the size of the vertex buffer which is - define in VB_MAX located in the file src/vb.h from your top level - Mesa distribution. The number needs to be a multiple of 12 and - the optimum value will probably depend on the capabilities of - your machine and the particular application you are running. - - -6. Are there any ways I can modify the application to improve its - performance with the MITS? - Yes. Try to use as many vertices between each Begin/End pair - as possbile. This will reduce the thread synchronization - overhead. - - -7. What sort of speedups can I expect? - On some benchmarks performance gains of up to 30% have been - observerd. Others may see no gain at all and in a few rare - cases even some degradation. - - -8. What still needs to be done? - Lots of testing and benchmarking. - A portable implementation that works within the Mesa thread API. - Threading of additional areas of Mesa to improve performance - even more. - - - -Installation: - - 1. This assumes that you already have a working Mesa 3.0 installation - from source. - 2. Place the tarball MITS.tar.gz in your top level Mesa directory. - 3. Unzip it and untar it. It will replace the following files in - your Mesa source tree so back them up if you want to save them. - - - README.MITS - Make-config - Makefile - mklib.glide - src/vbxform.c - src/vb.h - - 4. Rebuild Mesa using the command - - make linux-386-glide-mits - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.NeXT b/nx-X11/extras/Mesa_6.4.2/docs/README.NeXT deleted file mode 100644 index 1ad9a9e5c2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.NeXT +++ /dev/null @@ -1,6 +0,0 @@ -The NeXT support has now been incorporated into the OpenStep support. -You can build NeXT libraries simply by typing "make next", though before -linking they will need to be ranlib'd by hand. For more information see -the README.OpenStep file, together with the README files in OpenStep/Old_Demos. - --Pete French. (pete@ohm.york.ac.uk) 28/5/1998 diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.OS2 b/nx-X11/extras/Mesa_6.4.2/docs/README.OS2 deleted file mode 100644 index b3374ea232..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.OS2 +++ /dev/null @@ -1,96 +0,0 @@ - README for port of Mesa 3.x to XFree86 on OS/2 (X/2) - (as of 19990514) - - - Contents: - - 1) Binary release - 2) Building from sources - 3) History - 4) Todo - 5) Mesa Home Page - - -1) Binary release - - Though the Mesa sources should build in a quite reasonable time even on - a 585 class machine a binary relase is available (check topic 4) for an URL) - This package includes: - - - lib/MesaGL.dll, MesaGL.a - - lib/MesaGLU.dll, MesaGLU.a - - lib/glut.dll, glut.a - - include/GL/*.h - - Installing this in your XFree86 tree will enable you to build and - run all applications compatible with Mesa (and the current DLL - interface, of course ;-) - As usual the OMF-style libraries can be created using emxomf. - (e.g. "emxomf foo.a" creates the foo.lib omf-style library). - The static libraries are rarely used and you have to rebuild - Mesa to get them. They're a supported target, so you get - them in a straightforward way (see below). - - The testing of these libraries was limited to the supplied - demos/examples and a quite small number of third-party apps. - No warranty ... as usual ... ;-) - - -2) Instructions to build Mesa 3.x for XFree86/OS2 from sources: - - Except the official Mesa source distribution you need: - - a recent version of XFree86 (3.3.x or above) including - the programming libraries - - EMX 0.9c (0.9d might work, never checked) - - GNU make - - REXX (!) - - The creation of the DLLs as well as of the static libraries - (if you want to have them) is handled in "mklib-emx.cmd", - a small REXX script. Perhaps not the best idea, but this - way it fits best in the scheme used to build libraries - on all platforms in Mesa 3.x. - - To actually build the libraries and demos, check mklib-emx.cmd - and modify it as desired. Then type - make os2-x11 - and wait for completion ;-) - - -3) History - - Initially Darren Abbott (abbott@hiwaay.net) ported Mesa versions 2.x - to XFree86 OS/2. This port might still be available from - http://fly.HiWAAY.net/~abbott/xfree86-os2/xfree86.html - - The current port picked up things during the beta test for 3.0. - No major changes in the source were done. The build mechanism under OS/2 - has been made very similar to other platforms (if you treat mklib-emx.cmd - as a "black box"). - Advantage is that X/2 is now a valid target and all files are - integrated in the official source distribution. - Disadvantage is that this port (i.e. the DLLs' interface itself) is - definitly NOT COMPATIBLE to those of version 2.x. - It's uncertain whether this would be at all possible but since there - a _very_ few those apps it's not worth to find out anyway. - Also some libs (MesaTK, MesaAUX) are withdrawn from the Mesa distribution, - and accordingly from the OS/2 port. - -4) Todo - - By now binary compatiblity is ensured by using the function names - as entry points instead of ordinals. This might cost performance and - is subject to change in future. In addition the supplied X86 assembler - source is not used yet. - -5) Mesa Home Page - - You can get the source code and more information about Mesa from - http://www.mesa3d.org/ - - The OS/2 ports should be available from - http://r350.ee.ntu.edu.tw/~hcchu/os2/ports - --- -Alexander Mai -st002279@hrzpub.tu-darmstadt.de diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.OpenStep b/nx-X11/extras/Mesa_6.4.2/docs/README.OpenStep deleted file mode 100644 index a566eca676..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.OpenStep +++ /dev/null @@ -1,35 +0,0 @@ -This is a port of the GL and GLU libraries to NeXT/Apple object -orientated systems. As these systems have their own window handling -systems we simply use the offscreen rendering capability of Mesa -to generate bitmaps which may then be displayed by the application -with a View as required. Example pieces of code may be found in the -OpenStep directory. - -Sadly there are now a proliferation of different system that we need to -support compilation for: The original NextStep system, The OpenStep -system, the Rhapsody/Mac OS X system and also the windows implementations -of the latter two systems. This version of the code has been compiled and -tested under the following architectures: - - NextStep 3.3 - OpenStep 4.2 - Rhapsody DR2 - WebObjects for NT 3.5 - WebObjects for NT 4.0 - -All tests were done with Intel processors. Feedback on other systems would, -however, be appreciated ! - -On UNIX systems simply type "make openstep". Under Windows systems -with WebObjects run the "win32-openstep.sh" script from within the Bourne -shell provided with the development environment. In both cases this will -build the libraries and place them into the "lib" directory. Some examples -may be found in the OpenStep directory showing how to use the code in an -actual application (MesaView) as well as some command line demos. - -The CC variable may be specified on the command line for doing such things -as building FFAT libraries or using alternative compilers to the standard 'cc' -e.g. make CC='cc -arch m68k -arch i386' openstep" will build the libraries -with both intel and motorola architectures. - --Pete French. (pete@ohm.york.ac.uk) 7/6/1999 diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.QUAKE b/nx-X11/extras/Mesa_6.4.2/docs/README.QUAKE deleted file mode 100644 index 5a13b7a498..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.QUAKE +++ /dev/null @@ -1,208 +0,0 @@ - - Info on using Mesa 3.0 with Linux Quake I and Quake II - - - -Disclaimer ----------- - -I am _not_ a Quake expert by any means. I pretty much only run it to -test Mesa. There have been a lot of questions about Linux Quake and -Mesa so I'm trying to provide some useful info here. If this file -doesn't help you then you should look elsewhere for help. The Mesa -mailing list or the news://news.3dfx.com/3dfx.linux.glide newsgroup -might be good. - -Again, all the information I have is in this file. Please don't email -me with questions. - -If you have information to contribute to this file please send it to -me at brianp@elastic.avid.com - - - -Linux Quake ------------ - -You can get Linux Quake from http://www.idsoftware.com/ - -Quake I and II for Linux were tested with, and include, Mesa 2.6. You -shouldn't have too many problems if you simply follow the instructions -in the Quake distribution. - - - -RedHat 5.0 Linux problems -------------------------- - -RedHat Linux 5.x uses the GNU C library ("glibc" or "libc6") whereas -previous RedHat and other Linux distributions use "libc5" for its -runtime C library. - -Linux Quake I and II were compiled for libc5. If you compile Mesa -on a RedHat 5.x system the resulting libMesaGL.so file will not work -with Linux Quake because of the different C runtime libraries. -The symptom of this is a segmentation fault soon after starting Quake. - -If you want to use a newer version of Mesa (like 3.x) with Quake on -RedHat 5.x then read on. - -The solution to the C library problem is to force Mesa to use libc5. -libc5 is in /usr/i486-linux-libc5/lib on RedHat 5.x systems. - -Emil Briggs (briggs@tick.physics.ncsu.edu) nicely gave me the following -info: - -> I only know what works on a RedHat 5.0 distribution. RH5 includes -> a full set of libraries for both libc5 and glibc. The loader ld.so -> uses the libc5 libraries in /usr/i486-linux-libc5/lib for programs -> linked against libc5 while it uses the glibc libraries in /lib and -> /usr/lib for programs linked against glibc. -> -> Anyway I changed line 41 of mklib.glide to -> GLIDELIBS="-L/usr/local/glide/lib -lglide2x -L/usr/i486-linux-libc5/lib" -> -> And I started quake2 up with a script like this -> #!/bin/csh -> setenv LD_LIBRARY_PATH /usr/i486-linux-libc5/lib -> setenv MESA_GLX_FX f -> ./quake2 +set vid_ref gl -> kbd_mode -a -> reset - - -I've already patched the mklib.glide file. You'll have to start Quake -with the script shown above though. - - - -********************** - -Daryll Strauss writes: - -Here's my thoughts on the problem. On a RH 5.x system, you can NOT build -a libc5 executable or library. Red Hat just doesn't include the right -stuff to do it. - -Since Quake is a libc5 based application, you are in trouble. You need -libc5 libraries. - -What can you do about it? Well there's a package called gcc5 that does -MOST of the right stuff to compile with libc5. (It brings back older -header files, makes appropriate symbolic links for libraries, and sets -up the compiler to use the correct directories) You can find gcc5 here: -ftp://ecg.mit.edu/pub/linux/gcc5-1.0-1.i386.rpm - -No, this isn't quite enough. There are still a few tricks to getting -Mesa to compile as a libc5 application. First you have to make sure that -every compile uses gcc5 instead of gcc. Second, in some cases the link -line actually lists -L/usr/lib which breaks gcc5 (because it forces you -to use the glibc version of things) - -If you get all the stuff correctly compiled with gcc5 it should work. -I've run Mesa 3.0B6 and its demos in a window with my Rush on a Red Hat -5.1 system. It is a big hassle, but it can be done. I've only made Quake -segfault, but I think that's from my libRush using the wrong libc. - -Yes, mixing libc5 and glibc is a major pain. I've been working to get -all my libraries compiling correctly with this setup. Someone should -make an RPM out of it and feed changes back to Brian once they get it -all working. If no one else has done so by the time I get the rest of my -stuff straightened out, I'll try to do it myself. - - - |Daryll - - - -********************* - -David Bucciarelli (tech.hmw@plus.it) writes: - -I'm using the Mesa-3.0beta7 and the RedHat 5.1 and QuakeII is -working fine for me. I had only to make a small change to the -Mesa-3.0/mklib.glide file, from: - - - GLIDELIBS="-L/usr/local/glide/lib -lglide2x --L/usr/i486-linux-libc5/lib -lm" - -to: - - GLIDELIBS="-L/usr/i486-linux-libc5/lib -lglide2x" - -and to make two symbolic links: - -[david@localhost Mesa]$ ln -s libMesaGL.so libMesaGL.so.2 -[david@localhost Mesa]$ ln -s libMesaGLU.so libMesaGLU.so.2 - -I'm using the Daryll's Linux glide rpm for the Voodoo2 and glibc (it -includes also the Glide for the libc5). I'm not using the /dev/3Dfx and -running QuakeII as root with the following env. var: - -export -LD_LIBRARY_PATH=/dsk1/home/david/src/gl/Mesa/lib:/usr/i486-linux-libc5/lib - -I think that all problems are related to the glibc, Quake will never -work if you get the following output: - -[david@localhost Mesa]$ ldd lib/libMesaGL.so - libglide2x.so => /usr/lib/libglide2x.so (0x400f8000) - libm.so.6 => /lib/libm.so.6 (0x40244000) - libc.so.6 => /lib/libc.so.6 (0x4025d000) - /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000) - -You must get the following outputs: - -[david@localhost Mesa]# ldd lib/libMesaGL.so - libglide2x.so => /usr/i486-linux-libc5/lib/libglide2x.so -(0x400f3000) - -[root@localhost quake2]# ldd quake2 - libdl.so.1 => /lib/libdl.so.1 (0x40005000) - libm.so.5 => /usr/i486-linux-libc5/lib/libm.so.5 (0x40008000) - libc.so.5 => /usr/i486-linux-libc5/lib/libc.so.5 (0x40010000) - -[root@localhost quake2]# ldd ref_gl.so - libMesaGL.so.2 => -/dsk1/home/david/src/gl/Mesa/lib/libMesaGL.so.2 (0x400eb000) - libglide2x.so => /usr/i486-linux-libc5/lib/libglide2x.so -(0x401d9000) - libX11.so.6 => /usr/i486-linux-libc5/lib/libX11.so.6 -(0x40324000) - libXext.so.6 => /usr/i486-linux-libc5/lib/libXext.so.6 -(0x403b7000) - libvga.so.1 => /usr/i486-linux-libc5/lib/libvga.so.1 -(0x403c1000) - libm.so.5 => /usr/i486-linux-libc5/lib/libm.so.5 (0x403f5000) - libc.so.5 => /usr/i486-linux-libc5/lib/libc.so.5 (0x403fd000) - - -*********************** - -Steve Davies (steve@one47.demon.co.uk) writes: - - -Try using: - - export LD_LIBRARY_PATH=/usr/i486-linux-libc5/lib - ./quake2 +set vid_ref gl - -to start the game... Works for me, but assumes that you have the -compatability libc5 RPMs installed. - - -*************************** - -WWW resources - you may find additional Linux Quake help at these URLs: - - -http://quake.medina.net/howto - -http://webpages.mr.net/bobz - -http://www.linuxgames.com/quake2/ - - - ----------------------------------------------------------------------- -$Id: README.QUAKE,v 1.3 1998/08/23 15:26:26 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.THREADS b/nx-X11/extras/Mesa_6.4.2/docs/README.THREADS deleted file mode 100644 index fb6e0ff3d1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.THREADS +++ /dev/null @@ -1,52 +0,0 @@ - - -Mesa Threads README -------------------- - -Thread safety was introduced in Mesa 2.6 by John Stone and -Christoph Poliwoda. - -It was redesigned in Mesa 3.3 so that thread safety is -supported by default (on systems which support threads, -that is). There is no measurable penalty on single -threaded applications. - -NOTE that the only _driver_ which is thread safe at this time -is the OS/Mesa driver! - - -At present the mthreads code supports three thread APIS: - 1) POSIX threads (aka pthreads). - 2) Solaris / Unix International threads. - 3) Win32 threads (Win 95/NT). - -Support for other thread libraries can be added src/glthread.[ch] - - -In order to guarantee proper operation, it is -necessary for both Mesa and application code to use the same threads API. -So, if your application uses Sun's thread API, then you should build Mesa -using one of the targets for Sun threads. - -The mtdemos directory contains some example programs which use -multiple threads to render to osmesa rendering context(s). - -Linux users should be aware that there exist many different POSIX -threads packages. The best solution is the linuxthreads package -(http://pauillac.inria.fr/~xleroy/linuxthreads/) as this package is the -only one that really supports multiprocessor machines (AFAIK). See -http://pauillac.inria.fr/~xleroy/linuxthreads/README for further -information about the usage of linuxthreads. - -If you are interested in helping with thread safety work in Mesa -join the Mesa developers mailing list and post your proposal. - - -Regards, - John Stone -- j.stone@acm.org johns@cs.umr.edu - Christoph Poliwoda -- poliwoda@volumegraphics.com - - -Version info: - Mesa 2.6 - initial thread support. - Mesa 3.3 - thread support mostly rewritten (Brian Paul) diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.VMS b/nx-X11/extras/Mesa_6.4.2/docs/README.VMS deleted file mode 100644 index c435727c04..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.VMS +++ /dev/null @@ -1,32 +0,0 @@ - -VMS support contributed by Jouk Jansen (joukj@hrem.stm.tudelft.nl) - - -The latest version was tested on a VMSAlpha7.2 system using DECC6.0, but -probably also works for other versions. - -At the moment only the libraries LIBMESGL.EXE/LIBMESGL.OLB, -LIBMESAGLU.EXE/LIBMESAGLU.OLB and LIBGLUT.EXE/LIBGLUT.OLB and the demos of the -directory [.DEMOS] can be build. -However, feel free to create the missing "decrip.mms-files" in the other -directories. - - The make files were tested -using the DIGITAL make utility called MMS. There is also a public domain -clone available (MMK) and I think, but it is not tested, that this -utility will give (hardly) any problem. - -To make everything just type MMS (or MMK) in the main directory of -mesagl. For MMS the deafult makefile is called descrip.mms, and -that is what I have called it. I included alse some config files, -all having mms somewhere in the name which all the makefiles need -(just as your unix makefiles). - -On Alpha platforms at default a sharable images for the libraries are created. -To get a static library make it by typing MMS/MACRO=(NOSHARE=1). -On VAX platforms only static libraries can be build. - - -You may want to compile Mesa to use IEEE floating point arithmetic, instead -of VAX floating point by specifying the /float=IEEE flag to the compiler. -For more information see https://bugs.freedesktop.org/show_bug.cgi?id=4270 diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.WIN32 b/nx-X11/extras/Mesa_6.4.2/docs/README.WIN32 deleted file mode 100644 index 675a3b3645..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.WIN32 +++ /dev/null @@ -1,139 +0,0 @@ -File: docs/README.WIN32 - -Last updated: Jul 01, 2005 - Karl Schultz - kschultz@users.sourceforge.net - -Quick Start ------ ----- - -Unzip both ZIP files (MesaLib and MesaDemos) into the same directory. -The libs and demos build separately, so if you do not care about the -demos, you do not have to unzip that zip file. But if you do, it does -need to be unzipped into the same directory as the lib zip file -because the demos depend on the libs. - -The Windows build system uses Microsoft Visual Studio. Project files -for a specific version of Visual Studio are in their own directory in -the top-level "windows" directory. For example, Visual Studio 6 files -are in windows/VC6. If a directory does not exist for your version of -Visual Studio, you can try importing the project files from an earlier -version of Visual Studio. At this time, project files exist for -Version 6 and Version 7. The code has been built with a beta version -of Version 8 and it runs on 64-bit Windows. If you want to try this, -start by importing the VC7 files and create the 64-bit targets in the -configuration manager. - -The project files to build the core Mesa library, Windows Mesa -drivers, OSMesa, and GLU are in the mesa directory. The project files -to build GLUT and some demo programs are in the progs directory. - -Makefiles are no longer shipped or supported, but can be generated -from the projects using Visual Studio. - - -Windows Drivers -------- ------- - -At this time, only the GDI driver is known to work, as it has been -ported and rewritten to the latest Mesa DD interfaces. Source code -also exists in the tree for other drivers in src/mesa/drivers/windows, -but the status of this code is unknown. - -The GDI driver operates basically by writing pixel spans into a DIB -section and then blitting the DIB to the window. The driver was -recently cleaned up and rewitten and so may have bugs or may be -missing some functionality. The older versions of the CVS source may -be useful in figuring out any problems, or report them to me. - -To build Mesa with the GDI driver, build the mesa, gdi, and glu -projects in the Visual Studio workspace found at - - windows/VC6/mesa/mesa.dsw -or - windows/VC7/mesa/mesa.sln - -The osmesa DLL can also be built with the osmesa project. - -The build system creates a lib top-level directory and copies -resulting LIB and DLL files to this lib directory. The files are: - - OPENGL32.LIB, GLU32.LIB, OSMESA32.LIB - OPENGL32.DLL, GLU32.DLL, OSMESA32.DLL - -If the MesaDemos ZIP file was extracted, the DLL files are also copied -to the demos directory. This facilitates running the demos as described -below. - - -GLUT and Demos ----- --- ----- - -A Visual Studio workspace can be found at - - windows/VC6/progs/progs.dsw -or - windows/VC7/progs/progs.sln - -It can be used to build GLUT and a few demos. The GLUT lib and DLL -are copied to the top-level lib directory, along with the Mesa libs. - -The demo build system expects to find the LIB files in the top level -lib directory, so you must build the Mesa libs first. The demo -executables are placed in the demos directory, because some of them -rely on data files found there. Also, the Mesa lib DLL's were copied -there by the Mesa lib build process. Therefore, you should be able to -simply run the demo executables from the demo directory. - -If you want to run the demos from the Visual Studio, you may have to -change the startup directory and explicitly state where the executables are. - - -Build System Notes ------ ------ ----- - -VC6 ---- - -Visual Studio 6 does not recognize files with the .cc extension as C++ -language files, without a lot of unnatural tweaking. So, the VC6 -build process uses custom build steps to compile these files in the -GLU library. - - -VC7 ---- - -The above-mentioned .cc problem does not exist in this version. - - -General -------- - -After building, you can copy the above DLL files to a place in your -PATH such as $SystemRoot/SYSTEM32. If you don't like putting things -in a system directory, place them in the same directory as the -executable(s). Be careful about accidentially overwriting files of -the same name in the SYSTEM32 directory. - -The DLL files are built so that the external entry points use the -stdcall calling convention. - -Static LIB files are not built. The LIB files that are built with are -the linker import files associated with the DLL files. - -The si-glu sources are used to build the GLU libs. This was done -mainly to get the better tessellator code. - -To build "mangled" Mesa, add the preprocessor define USE_MGL_NAMESPACE -to the project settings. You will also need to edit src/mesa.def to -change all the gl* symbols to mgl*. Because this is easy to do with a -global replace operation in a text editor, no additional mangled -version of mesa.def is maintained or shipped. - -If you have a Windows-related build problem or question, it is -probably better to direct it to me (kschultz@users.sourceforge.net), -rather than directly to the other Mesa developers. I will help you as -much as I can. I also monitor the Mesa mailing lists and will answer -questions in this area there as well. - - -Karl Schultz diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.WINDML b/nx-X11/extras/Mesa_6.4.2/docs/README.WINDML deleted file mode 100644 index 448db71f8b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.WINDML +++ /dev/null @@ -1,146 +0,0 @@ - - WindML Driver for Mesa 4.0 - - -Requirements ------------- - -Tornado 2 + WindML, Cumulative Patchs are recommended. - -I suppose you have a valid WindML installation. Double buffer hardware -gives better performance than double buffer software so if you can -compile your WindML driver with this option, just do it. I/O -redirection is adviced in target server. - - -Tested on ---------- - -During the development, my main target was a CoolMonster: -- Video card: CT69000 -- CPU: PENTIUM 266MHz - -and my host a Windows NT + Tornado 2. - - -Installation ------------- - -1. Mesa sources must be in root directory (C:\) - -2. Add the following line to your torVars.bat: -set MESA_BASE=C:\Mesa - -OR copy the new torVars.bat in your bin path: -c:/Mesa/src/ugl/tornado/torVars.sample -> -/mnt/nt/Tornado/host/x86-win32/bin/torVars (for example) - -3. In a command prompt: -$ torVars -$ cd c:\Mesa -$ make -f Makefile.ugl CPU=PENTIUM - -Take a long while... - -5. Include all the files from ugldemos folder to build some downloadable - application modules - -4. Download UGL/Mesa object files on target - -For example via the WindShell: -ld < c:\Tornado\target\lib\objMesaGL.o -ld < c:\Tornado\target\lib\objMesaUGL.o -ld < c:\Tornado\target\lib\objMesaGLU.o -ld < c:\Tornado\target\lib\objGLUTshapes.o -ld < c:\Tornado\target\lib\objMesaOS.o - -You can put the previous lines in a file and use: -< filename - -6. Download the application modules. - -7. In WindShell, run: --> uglalldemos - -During the show some messages will appear, it provides some useful -information on key management. - - -Coding ------- - -Sample Usage: - -In addition to the usual ugl calls to initialize UGL, (may be find an -input driver), you must do the following to use the UGL/Mesa interface: - -1. Call uglMesaCreateContext() to create a UGL/Mesa rendering context, - given the display format. - -2. Call uglMesaMakeCurrent() to bind the UGL/Mesa buffers to an - UGL/Mesa Context and to make the context the current one. - -3. Make gl* calls to render your graphics. - -4. Use uglMesaSwapBuffers() when double buffering to swap front/back buffers. - -5. Before the UGL is destroyed, call MesaDestroyContext(). - -6. Before exiting, call if required uglEventQDestroy and then - uglDeinitialize(); - -Limitations ------------ - -I found the following limitations in my driver : - - Color Indexed management is only in 8 bits - - It's possible to mix UGL/OpenGL application with a software - double buffer - -Modifications ------------- - -New files in Mesa: -- Makefile.ugl -- rules.windmlmesa -- docs/README.UGL -- include/GL/uglmesa.h -- si-glu/Makefile.ugl -- src/Makefile.ugl -- src/ugl/torGLUTShapesInit.c -- src/ugl/torMesaUGLInit.c -- src/ugl/ugl_api.c -- src/ugl/ugl_dd.c -- src/ugl/ugl_glutshapes.c -- src/ugl/ugl_line.c -- src/ugl/ugl_span.c -- src/ugl/ugl_tri.c -- src/ugl/uglmesaP.h -- ugldemos/* - -Modified files in Tornado 2.0: -- c:\Tornado\host\x86-win32\bin\torVars.bat -rem Command line build environments -set WIND_HOST_TYPE=x86-win32 -set WIND_BASE=C:\Tornado -set MESA_BASE=C:\Mesa -set PATH=%WIND_BASE%\host\%WIND_HOST_TYPE%\bin;%PATH% -- c:\Tornado\target\config\comps\VxWorks\01uglmesa.cdf -- c:\Tornado\target\h\GL\* - -Todo ----- -- GCC 2.96, ASM compilation - -Thanks to: ----------- - -Precision Insight team for their great job around Mesa, XFree, and DRI. -Wind River Systems to take me as an intern. - - -Stephane Raimbault - - - -July 24, 2001 diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.X11 b/nx-X11/extras/Mesa_6.4.2/docs/README.X11 deleted file mode 100644 index 4cbd126181..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.X11 +++ /dev/null @@ -1,314 +0,0 @@ - - Mesa Unix/X11 Information - - - -Installation -============ - -There are two ways to compile Mesa on Unix/X11 systems: - -1. The old way: - First type 'make' alone to see the list of system - configurations currently supported. If you see your configuration on the - list, type 'make '. Most popular Unix/X workstations are currently - supported. - - If your system configuration is not listed by 'make', you'll have to modify - the top-level Makefile and Make-config files. There are instructions in - each file. - - When finished, the Mesa libraries will be in the Mesa-x.y/lib/ directory. - - -2. The new way: - Type './configure' and then 'make'. This uses GNU autoconfig. - Run 'make check' to build the demos. - See docs/INSTALL for more details. - When finished, the Mesa libraries will be in the Mesa-x.y/src/.libs/, - Mesa-x.y/si-glu/.libs, etc directories. - - -Notes on assembly language optimizations: - - When using the old-style Makefiles, you can specify a configuration - that uses X86 assembly language optimizations (linux-3dnow for example). - - The detection of MMX, 3DNow!, PIII/SSE, etc capability is done at - runtime. That means you can compile Mesa for 3DNow! optimizations - even if you don't have an AMD CPU. - - However, your Linux binutils and assembler must understand the - special instructions in order to compile them. If you have - compilation problems, try upgrading your binutils. - - -Header and library files: - After you've compiled Mesa and tried the demos I recommend the following - procedure for "installing" Mesa. - - Copy the Mesa include/GL directory to /usr/local/include: - cp -r include/GL /usr/local/include - - Copy the Mesa library files to /usr/local/lib: - cp lib/* /usr/local/lib - - (actually, use "cp -d" on Linux to preserve symbolic links) - - -Xt/Motif widgets: - If you want to use Mesa or OpenGL in your Xt/Motif program you can build - the widgets found in either the widgets-mesa or widgets-sgi directories. - The former were written for Mesa and the later are the original SGI - widgets. Look in those directories for more information. - - -Notes: - HP users: a Mesa user reports that the HP-UX 10.01 C compiler has - a bug which effects glReadPixels. A patch for the compiler (PHSS_5743) is - available. Otherwise be sure your compiler is version 10.13 or later. - - QNX users: if you have problems running the demos try setting the - stack size to 200K or larger with -N200K, for example. - - SunOS 5.x users: The X shared memory extension may not work - correctly. If Mesa prints an error message to the effect of "Shared memory - error" then you'll have to append the following three lines to the end of - your /etc/system file then reboot: - set shmsys:shminfo_shmmax = 0x2000000 - set shmsys:shminfo_shmmni = 0x1000 - set shmsys:shminfo_shmseg = 0x100 - - - -Using the library -================= - -Configuration options: - The file src/mesa/main/config.h has many parameters which you can adjust - such as maximum number of lights, clipping planes, maximum texture size, - etc. In particular, you may want to change DEPTH_BITS from 16 to 32 - if a 16-bit depth buffer isn't precise enough for your application. - - -Shared libraries: - If you compile shared libraries you may have to set an environment - variable to specify where the Mesa libraries are located. On Linux and - Sun systems for example, set the LD_LIBRARY_PATH variable to include - /your-dir/Mesa-2.6/lib. Otherwise, when you try to run a demo it - may fail with a message saying that one or more libraries couldn't be - found. - - -Remote display of OpenGL/GLX programs: - As of version 1.2.3, Mesa's header files use the same GLenum and GLUenum - values as SGI's (and most/all other vendor's) OpenGL headers. This means - you can freely mix object files compiled with OpenGL or Mesa headers. - In fact, on systems with dynamic runtime linkers it's possible to dynam- - ically link with Mesa or OpenGL shared libraries at runtime, without - recompiling or relinking anything! - - Using IRIX 5.x as an example, you can run SGI's OpenGL demos with the - Mesa shared libraries as follows. Let's assume you're installing Mesa - in /usr/local/Mesa and using the C-shell: - % cd /usr/local/Mesa - % make irix5-dso - % setenv _RLD_LIST "/usr/local/Mesa/lib/libGL.so:DEFAULT" - % /usr/demos/bin/ideas_ogl // this is a test - - You can now run OpenGL executables on almost any X display! There may - be some problems from the fact that Mesa supports many X visual types - that an OpenGL client may not expect (grayscale for example). In this - case the application may abort, print error messages, or just behave - strangely. You may have to experiment with the MESA_RGB_VISUAL envi- - ronment variable. - - -Xt/Motif Widgets: - Two versions of the Xt/Motif OpenGL drawing area widgets are included: - - widgets-sgi/ SGI's stock widgets - widgets-mesa/ Mesa-tuned widgets - - Look in those directories for details - - -Togl: - Togl is an OpenGL/Mesa widget for Tcl/Tk. - See http://togl.sourceforge.net for more information. - - - -X Display Modes: - Mesa supports RGB(A) rendering into almost any X visual type and depth. - - The glXChooseVisual function tries its best to pick an appropriate visual - for the given attribute list. However, if this doesn't suit your needs - you can force Mesa to use any X visual you want (any supported by your - X server that is) by setting the MESA_RGB_VISUAL and MESA_CI_VISUAL - environment variables. When an RGB visual is requested, glXChooseVisual - will first look if the MESA_RGB_VISUAL variable is defined. If so, it - will try to use the specified visual. Similarly, when a color index - visual is requested, glXChooseVisual will look for the MESA_CI_VISUAL - variable. - - The format of accepted values is: - Here are some examples: - - using the C-shell: - % setenv MESA_RGB_VISUAL "TrueColor 8" // 8-bit TrueColor - % setenv MESA_CI_VISUAL "PseudoColor 12" // 12-bit PseudoColor - % setenv MESA_RGB_VISUAL "PseudoColor 8" // 8-bit PseudoColor - - using the KornShell: - $ export MESA_RGB_VISUAL="TrueColor 8" - $ export MESA_CI_VISUAL="PseudoColor 12" - $ export MESA_RGB_VISUAL="PseudoColor 8" - - -Double buffering: - Mesa can use either an X Pixmap or XImage as the backbuffer when in - double buffer mode. Using GLX, the default is to use an XImage. The - MESA_BACK_BUFFER environment variable can override this. The valid - values for MESA_BACK_BUFFER are: Pixmap and XImage (only the first - letter is checked, case doesn't matter). - - A pixmap is faster when drawing simple lines and polygons while an - XImage is faster when Mesa has to do pixel-by-pixel rendering. If you - need depth buffering the XImage will almost surely be faster. Exper- - iment with the MESA_BACK_BUFFER variable to see which is faster for - your application. - - -Colormaps: - When using Mesa directly or with GLX, it's up to the application writer - to create a window with an appropriate colormap. The aux, tk, and GLUT - toolkits try to minimize colormap "flashing" by sharing colormaps when - possible. Specifically, if the visual and depth of the window matches - that of the root window, the root window's colormap will be shared by - the Mesa window. Otherwise, a new, private colormap will be allocated. - - When sharing the root colormap, Mesa may be unable to allocate the colors - it needs, resulting in poor color quality. This can happen when a - large number of colorcells in the root colormap are already allocated. - To prevent colormap sharing in aux, tk and GLUT, define the environment - variable MESA_PRIVATE_CMAP. The value isn't significant. - - -Gamma correction: - To compensate for the nonlinear relationship between pixel values - and displayed intensities, there is a gamma correction feature in - Mesa. Some systems, such as Silicon Graphics, support gamma - correction in hardware (man gamma) so you won't need to use Mesa's - gamma facility. Other systems, however, may need gamma adjustment - to produce images which look correct. If in the past you thought - Mesa's images were too dim, read on. - - Gamma correction is controlled with the MESA_GAMMA environment - variable. Its value is of the form "Gr Gg Gb" or just "G" where - Gr is the red gamma value, Gg is the green gamma value, Gb is the - blue gamma value and G is one gamma value to use for all three - channels. Each value is a positive real number typically in the - range 1.0 to 2.5. The defaults are all 1.0, effectively disabling - gamma correction. Examples using csh: - - % setenv MESA_GAMMA "2.3 2.2 2.4" // separate R,G,B values - % setenv MESA_GAMMA "2.0" // same gamma for R,G,B - - The demos/gamma.c program may help you to determine reasonable gamma - value for your display. With correct gamma values, the color intensities - displayed in the top row (drawn by dithering) should nearly match those - in the bottom row (drawn as grays). - - Alex De Bruyn reports that gamma values of 1.6, 1.6 and 1.9 work well - on HP displays using the HP-ColorRecovery technology. - - Mesa implements gamma correction with a lookup table which translates - a "linear" pixel value to a gamma-corrected pixel value. There is a - small performance penalty. Gamma correction only works in RGB mode. - Also be aware that pixel values read back from the frame buffer will - not be "un-corrected" so glReadPixels may not return the same data - drawn with glDrawPixels. - - For more information about gamma correction see: - http://www.inforamp.net/~poynton/notes/colour_and_gamma/GammaFAQ.html - - -Overlay Planes - - Overlay planes in the frame buffer are supported by Mesa but require - hardware and X server support. To determine if your X server has - overlay support you can test for the SERVER_OVERLAY_VISUALS property: - - xprop -root | grep SERVER_OVERLAY_VISUALS - - -HPCR glClear(GL_COLOR_BUFFER_BIT) dithering - - If you set the MESA_HPCR_CLEAR environment variable then dithering - will be used when clearing the color buffer. This is only applicable - to HP systems with the HPCR (Color Recovery) system. - - -Extensions -========== - There are three Mesa-specific GLX extensions at this time. - - GLX_MESA_pixmap_colormap - - This extension adds the GLX function: - - GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual, - Pixmap pixmap, Colormap cmap ) - - It is an alternative to the standard glXCreateGLXPixmap() function. - Since Mesa supports RGB rendering into any X visual, not just True- - Color or DirectColor, Mesa needs colormap information to convert RGB - values into pixel values. An X window carries this information but a - pixmap does not. This function associates a colormap to a GLX pixmap. - See the xdemos/glxpixmap.c file for an example of how to use this - extension. - - GLX_MESA_release_buffers - - Mesa associates a set of ancillary (depth, accumulation, stencil and - alpha) buffers with each X window it draws into. These ancillary - buffers are allocated for each X window the first time the X window - is passed to glXMakeCurrent(). Mesa, however, can't detect when an - X window has been destroyed in order to free the ancillary buffers. - - The best it can do is to check for recently destroyed windows whenever - the client calls the glXCreateContext() or glXDestroyContext() - functions. This may not be sufficient in all situations though. - - The GLX_MESA_release_buffers extension allows a client to explicitly - deallocate the ancillary buffers by calling glxReleaseBuffersMESA() - just before an X window is destroyed. For example: - - #ifdef GLX_MESA_release_buffers - glXReleaseBuffersMESA( dpy, window ); - #endif - XDestroyWindow( dpy, window ); - - This extension is new in Mesa 2.0. - - GLX_MESA_copy_sub_buffer - - This extension adds the glXCopySubBufferMESA() function. It works - like glXSwapBuffers() but only copies a sub-region of the window - instead of the whole window. - - This extension is new in Mesa version 2.6 - - - -Summary of X-related environment variables: - MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode (X only) - MESA_CI_VISUAL - specifies the X visual and depth for CI mode (X only) - MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only) - MESA_PRIVATE_CMAP - force aux/tk libraries to use private colormaps (X only) - MESA_GAMMA - gamma correction coefficients (X only) - - ----------------------------------------------------------------------- -$Id: README.X11,v 3.11 2003/12/17 15:14:31 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/README.directfb b/nx-X11/extras/Mesa_6.4.2/docs/README.directfb deleted file mode 100644 index 169ebe486e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/README.directfb +++ /dev/null @@ -1,28 +0,0 @@ - - Mesa DirectFB Information - - -Requirements -============ - - To build Mesa with DirectFB (DirectFBGL) support you need: - - DirectFB at least 0.9.21 (http://directfb.org) - - pkg-config at least 0.9 (http://pkgconfig.sf.net) - - -Installation -============ - Run - - make linux-directfb - - to build Mesa and DirectFBGL module, - - make install - - to install OpenGL libraries and - - make linux-directfb-install - - to install DirectFBGL module in the proper location. - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.1 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.1 deleted file mode 100644 index 4d6e3c2f44..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.1 +++ /dev/null @@ -1,146 +0,0 @@ - - Mesa 3.1 release notes - - PLEASE READ!!!! - - -New copyright -------------- - -Mesa 3.1 will be distributed under an XFree86-style copyright instead -of the GNU LGPL. - - -New directories ---------------- - -All documentation files are now in the docs/ directory. -All shell scripts are now in the bin/ directory. - - -New library names ------------------ - -Formerly, the main Mesa library was named libMesaGL.so (or libMesaGL.a) -and the GLU library was named libMesaGLU.so (or libMesaGLU.a). - -Now, the main library is named libGL.so (or libGL.a) and the GLU library -is named libGLU.so (or libGLU.a). - -The change allows Mesa to be more easily substituted for OpenGL. -Specifically, the linker/loader on some Unix-like systems won't -allow libMesaGL.so to be used instead of libGL.so if the application -was linked with the former. - -Warning: if you have another OpenGL implementation installed on your -system (i.e. you have another OpenGL libGL.so) you'll have to be -carefull about which library (OpenGL or Mesa) you link against. Be -aware of -L linker flags and the value of the LD_LIBRARY_PATH environment -variable. - - -New library versioning ----------------------- - -Previously, the Mesa GL library was named libMesaGL.so.3.0 -To better support Linux/OpenGL standards, the Mesa GL library is now -named libGL.so.1.2.030100 This indicates version 1.2 of the OpenGL spec -and Mesa implementation 3.1.0 - -In the long term this will allow better interoperability with other -OpenGL implementations, especially on Linux. In the short term, -OpenGL apps may have to be relinked to use the new library naming. - - - -New makefiles -------------- - -The old Makefiles found in the various directories have been renamed -to Makefile.X11 in order to prevent filename collisions with autoconfig- -generated Makefiles. - -The top-level Makefile simply includes Makefile.X11 -If your top-level Makefile get's overwritten/destroyed you can restore -it by copying Makefile.X11 to Makefile - - -New extensions --------------- - -GL_EXT_stencil_wrap - Implements two new stencil operations: GL_INCR_WRAP_EXT and - GL_DECR_WRAP_EXT which allow stencil increment and decrement - without clamping. - -GL_INGR_blend_func_separate - Allows specification of blend factors for RGB and Alpha independently. - (INGR = Intergraph) - -GL_ARB_multitexture - Multiple simultaneous textures. (ARB = Architecture Review Board) - -GL_NV_texgen_reflection - nVidia texgen extension for better reflection mapping. - -GL_PGI_misc_hints - Assorted transformation hints. - -GL_EXT_compiled_vertex_array - Compiled vertex arrays. - -GL_EXT_clip_volume_hint - Allows one to disable clip volume (frustum) testing. - - - -Extensions removed ------------------- - -GL_EXT_multitexture - obsolete in favor of GL_ARB_multitexture - - - -Config file ------------ - -By default, /etc/mesa.conf will be read when Mesa starts. This -file controls default hints, enable/disable of extensions, and -more. See the CONFIG file for documentation. - - - -Optimizations -------------- - -Keith Whitwell has contributed significant optimizations to Mesa's -vertex transformation code. Basically, the whole transformation -stage of Mesa has been rewritten. - -It's impossible to give a speedup factor. You'll just have to -try your app and see how it performs. - - - -Device Driver changes ---------------------- - -A bunch of new device driver functions have been added. See src/dd.h -Keith Harrison contributed many of them. I've been planning on adding -a bunch of functions like these to make writing hardware drivers easier. -More such function will probably be added in the near future. - - - -Miscellaneous -------------- - -util/glstate.c has some handy functions for debugging. Basically, it -offers a simple function for printing GL state variables. It's not -finished yet. There's a LOT more GLenum records to be added (see the -code). Anyone want to help? - - - ----------------------------------------------------------------------- -$Id: RELNOTES-3.1,v 1.2 2000/04/07 17:08:06 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.2 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.2 deleted file mode 100644 index 7737c28e80..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.2 +++ /dev/null @@ -1,12 +0,0 @@ - - Mesa 3.2 release notes - - PLEASE READ!!!! - - -Mesa 3.2 is a stabilization of the Mesa 3.1 release. No new features -have been added. For a list of bug fixes please read the VERSIONS file. - - ----------------------------------------------------------------------- -$Id: RELNOTES-3.2,v 1.2 2000/04/07 17:08:06 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.2.1 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.2.1 deleted file mode 100644 index 2ad5b9046a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.2.1 +++ /dev/null @@ -1,32 +0,0 @@ - - Mesa 3.2.1 release notes - - PLEASE READ!!!! - - - -The Mesa 3.2.1 release mainly just fixes bugs since the 3.2 release. -See the VERSIONS file for the exact list. - - - -GLU Polygon Tessellator ------------------------ - -The GLU tessellator has been reverted back to the version included -with Mesa 3.0 since it's more stable. The Mesa 3.1/3.2 tessellator -implemented the GLU 1.3 specification but suffered from a number of -bugs. - -Mesa implements GLU 1.1. - -Ideally, people should use the GLU 1.3 library included in SGI's -OpenGL Sample Implementation (SI) available from -http://oss.sgi.com/projects/ogl-sample/ -People are working to make easy-to-install Linux RPMs of the -GLU library. - - - ----------------------------------------------------------------------- -$Id: RELNOTES-3.2.1,v 1.2 2000/07/21 16:32:33 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.3 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.3 deleted file mode 100644 index 362a74ee31..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.3 +++ /dev/null @@ -1,271 +0,0 @@ - - Mesa 3.3 release notes - - July 21, 2000 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 3.3) designate new developmental releases. -Even numbered versions (such as 3.2.1) designate stable releases. - -Mesa 3.3 has a undergone many internal changes since version 3.2 -and features a lot of new extensions. 3.3 is expected to be pretty -stable, but perhaps not as stable as 3.2 which has been used by -thousands of users over the past months. - -Everyone is encouraged to try Mesa 3.3. Bugs should be reported to -the Mesa bug database on www.sourceforge.net. - - - -Header file / GLenum changes ----------------------------- - -The gl.h and glu.h headers now use #defines to define all GL_* tokens -instead of C-language enums. This change improves Mesa/OpenGL -interoperability. - - - -New API dispatch code ---------------------- - -The core Mesa gl* functions are now implemented with a new dispatch -(jump table) which will allow simultaneous direct/indirect rendering. - -The code is found in the glapi*.[ch] files. - -Of interest: the actual "glFooBar" functions are generated with -templatized code defined in glapitemp.h and included by glapi.c -The glapitemp.h template should be reusable for all sorts of OpenGL -projects. - -The new dispatch code has also optimized with x86 assembly code. -This optimization eliminates copying the function arguments during -dispatch. - - - -New thread support ------------------- - -Thread support in Mesa has been rewritten. The glthread.[ch] files -replace mthreads.[ch]. Thread safety is always enabled (on platforms -which support threads, that is). There is virtually no performance -penalty for typical single-thread applications. See the glapi.c -file for details. - -The Xlib driver (XMesa) is now thread-safe as well. Be sure to -call XInitThreads() in your app first. See the xdemos/glthreads.c -demo for an example. - - - -Make configuration changes --------------------------- - -If you use the old-style (non GNU automake) method to build Mesa note -that several of the configuration names have changed: - - Old name New name - ------------- ---------------- - linux-elf linux - linux linux-static - linux-386-elf linux-386 - linux-386 linux-386-static - etc. - - - -New extensions --------------- - -GL_ARB_transpose_matrix - Adds glLoadTransposeMatrixARB() and glMultTransposeMatrixARB() - functions. - -GL_ARB_texture_cube_map - For cube-based reflection mapping. - -GL_EXT_texture_add_env - Adds GL_ADD texture environment mode. - See http://www.berkelium.com/OpenGL/EXT/texture_env_add.txt - -GL_EXT_texture_lod_bias - Allows mipmapped texture blurring and sharpening. - -GLX_EXT_visual_rating extension - This extension has no effect in stand-alone Mesa (used for DRI). - -GL_HP_occlusion_test - Used for bounding box occlusion testing (see demos/occlude.c). - -GL_SGIX_pixel_texture / GL_SGIS_pixel_texture - Lets glDraw/CopyPixels draw a texture coordinate image. - -GL_SGI_color_matrix - Adds a color matrix and another set of scale and bias parameters - to the glDraw/CopyPixels paths. - -GL_SGI_color_table - Adds additional color tables to the glDraw/Read/CopyPixels paths. - -GL_EXT_histogram - Compute histograms for glDraw/Read/CopyPixels. - -GL_EXT_blend_func_separate - This is the same as GL_INGR_blend_func_separate. - -GL_ARB_texture_cube_mapping - 6-face cube mapping, nicer than sphere mapping - -GL_EXT_texture_env_combine - For advanced texture environment effects. - - -Documentation for all these functions can be found at -http://oss.sgi.com/projects/ogl-sample/registry/ - - - -GLX_SGI_make_current_read functionality ---------------------------------------- - -The functionality of this extension is needed for GLX 1.3 (and required -for the Linux/OpenGL standards base). - -Implementing this function required a **DEVICE DRIVER CHANGE**. -The old SetBuffer() function has been replaced by SetReadBuffer() and -SetDrawBuffer(). All device drivers will have to be updated because -of this change. - -The new function, glXMakeContextCurrent(), in GLX 1.3 now works in Mesa. -The xdemos/wincopy.c program demonstrates it. - - - -Image-related code changes --------------------------- - -The imaging path code used by glDrawPixels, glTexImage[123]D, -glTexSubImage[123], etc has been rewritten. It's now faster, -uses less memory and has several bug fixes. This work was -actually started in Mesa 3.1 with the glTexImage paths but has now -been carried over to glDrawPixels as well. - - - -Device driver interface changes -------------------------------- - -Added new functions for hardware stencil buffer support: - WriteStencilSpan - ReadStencilSpan - WriteStencilPixels - ReadStencilPixels - - -Removed old depth buffer functions: - AllocDepthBuffer - DepthTestSpan - DepthTestPixels - ReadDepthSpanFloat - ReadDepthSpanInt - - -Added new depth buffer functions: - WriteDepthSpan - ReadDepthSpan - WriteDepthPixels - ReadDepthPixels - - These functions always read/write 32-bit GLuints. This will allow - drivers to have anywhere from 0 to 32-bit Z buffers without - recompiling for 16 vs 32 bits as was previously needed. - - -New texture image functions - The entire interface for texture image specification has been updated. - With the new functions, it's optional for Mesa to keep an internal copy - of all textures. Texture download should be a lot faster when the extra - copy isn't made. - -Misc changes - TexEnv now takes a target argument - Removed UseGlobalTexturePalette (use Enable function instead) - - -Also added - ReadPixels - CopyPixels - - -The SetBufffer function has been replaced by SetDrawBuffer and -SetReadBuffer functions. This lets core Mesa independently -specify which buffer is to be used for reading and which for -drawing. - -The Clear function's mask parameter has changed. Instead of -mask being the flags specified by the user to glClear, the -mask is now a bitmask of the DD_*_BIT flags in dd.h. Now -multiple color buffers can be specified for clearing (ala -glDrawBuffers). The driver's Clear function must also -check the glColorMask glIndexMask, and glStencilMask settings -and do the right thing. See the X/Mesa, OS/Mesa, or FX/Mesa -drivers for examples. - - -The depth buffer changes shouldn't be hard to make for existing -drivers. In fact, it should simply the code. Be careful with -the depthBits value passed to gl_create_context(). 1 is a bad -value! It should normally be 0, 16, 24, or 32. - - -gl_create_framebuffer() takes new arguments which explicitly tell -core Mesa which ancillary buffers (depth, stencil, accum, alpha) -should be implemented in software. Mesa hardware drivers should -carefully set these flags depending on which buffers are in the -graphics card. - - - -Internal constants ------------------- - -Point and line size range and granularity limits are now stored -in the gl_constants struct, which is the Const member of GLcontext. -The limits are initialized from values in config.h but may be -overridden by device drivers to reflect the limits of that driver's -hardware. - -Also added constants for NumAuxBuffers and SubPixelBits. - - - -OpenGL Conformance ------------------- - -Mesa now passes all the OpenGL 1.1 conformance tests, except for -antialiased lines. AA lines fail on some, but not all, the tests. -In order to fix the remaining failures, a new AA line algorithm will -be needed (which computes coverage values for end-point fragments). -This will be done for Mesa 3.5/3.6. - - - -OpenGL 1.2 GL_ARB_imaging subset --------------------------------- - -Mesa 3.3 implements all the features of GL_ARB_imaging except for -image convolution. This will (hopefully) be done for Mesa 3.5/3.6. - - - ----------------------------------------------------------------------- -$Id: RELNOTES-3.3,v 1.8 2000/07/21 16:26:41 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.4 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.4 deleted file mode 100644 index 4aa607a37c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.4 +++ /dev/null @@ -1,22 +0,0 @@ - - Mesa 3.4 release notes - - November 3, 2000 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 3.3) designate new developmental releases. -Even numbered versions (such as 3.4) designate stable releases. - -Mesa 3.4 simply fixes bugs found in the Mesa 3.3 release. For details, -see the VERSIONS file. - - ----------------------------------------------------------------------- -$Id: RELNOTES-3.4,v 1.2 2002/03/23 02:37:17 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.4.1 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.4.1 deleted file mode 100644 index 18443507c2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.4.1 +++ /dev/null @@ -1,22 +0,0 @@ - - Mesa 3.4.1 release notes - - February 9, 2001 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 3.3) designate new developmental releases. -Even numbered versions (such as 3.4) designate stable releases. - -Mesa 3.4.1 is a maintenance release that simply fixes bugs found since -the Mesa 3.4 release. For details, see the VERSIONS file. - - ----------------------------------------------------------------------- -$Id: RELNOTES-3.4.1,v 1.2 2001/05/23 14:45:01 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.4.2 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.4.2 deleted file mode 100644 index 894ed199ff..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.4.2 +++ /dev/null @@ -1,22 +0,0 @@ - - Mesa 3.4.2 release notes - - May 17, 2001 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 3.3) designate new developmental releases. -Even numbered versions (such as 3.4) designate stable releases. - -Mesa 3.4.2 is a maintenance release that simply fixes bugs found since -the Mesa 3.4.1 release. For details, see the VERSIONS file. - - ----------------------------------------------------------------------- -$Id: RELNOTES-3.4.2,v 1.2 2001/05/23 14:45:01 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.5 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.5 deleted file mode 100644 index 52097a1cd6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-3.5 +++ /dev/null @@ -1,228 +0,0 @@ - - Mesa 3.5 release notes - - June 21, 2001 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 3.5) designate new developmental releases. -Even numbered versions (such as 3.4) designate stable releases. - -The biggest change in Mesa 3.5 is a complete overhaul of the source -code in order to make it more modular. This was driven by the DRI -hardware drivers. It simplifies the DRI drivers and opens the door -to hardware transform/clip/lighting (TCL). Keith Whitwell can take -the credit for that. - - - -Driver Support --------------- - -The device driver interface in Mesa 3.5 has changed a lot since Mesa 3.4 -Not all of the older Mesa drivers have been updated. Here's the status: - -Driver Status ----------------------- ----------- -XMesa (Xlib) updated -OSMesa (off-screen) updated -FX (3dfx Voodoo1/2) updated -SVGA updated -GGI not updated -Windows/Win32 not updated -DOS/DJGPP not updated -BeOS not updated -Allegro not updated -D3D not updated -DOS not updated - -We're looking for volunteers to update the remaining drivers. Please -post to the Mesa3d-dev mailing list if you can help. - - - -GLU 1.3 -------- - -Mesa 3.5 includes the SGI Sample Implementation (SI) GLU library. -This version of GLU supports the GLU 1.3 specification. The old -Mesa GLU library implemented the 1.1 specification. The SI GLU -library should work much better. - -You'll need a C++ compiler to compile the SI GLU library. This may -be a problem on some systems. - - - -New Extensions --------------- - -GL_EXT_convolution - Adds image convolution to glRead/Copy/DrawPixels/TexImage. - -GL_ARB_imaging - This is the optional imaging subset of OpenGL 1.2. - It's the GL_EXT_convolution, GL_HP_convolution_border_modes, - GL_EXT_histogram, GL_EXT_color_table, GL_EXT_color_subtable - GL_EXT_blend_color, GL_EXT_blend_minmax, GL_EXT_blend_subtract - and GL_SGI_color_matrix extensions all rolled together. - This is supported in all software renderers but not in all - hardware drivers (3dfx for example). - -GL_ARB_texture_compression - This is supported in Mesa but only used by the 3dfx DRI drivers - for Voodoo4 and later. - -GL_ARB_texture_env_add - This is identical to GL_EXT_texture_env_add. - -GL_NV_blend_square - Adds extra blend source and dest factors which allow squaring - of color values. - -GL_EXT_fog_coord - Allows specification of a per-vertex fog coordinate instead of - having fog always computed from the eye distance. - -GL_EXT_secondary_color - Allows specifying the secondary (specular) color for each vertex - instead of getting it only from lighting in GL_SEPARATE_SPECULAR_COLOR - mode. - -GL_ARB_texture_env_combine - Basically the same as GL_EXT_texture_env_combine - -GL_ARB_texture_env_add extension - Texture addition mode. - -GL_ARB_texture_env_dot3 extension - Dot product texture environment. - -GL_ARB_texture_border_clamp - Adds GL_CLAMP_TO_BORDER_ARB texture wrap mode - -GL_SGIX_depth_texture, GL_SGIX_shadow and GL_SGIX_shadow_ambient - Implements a shadow casting algorithm based on depth map textures - -GL_SGIS_generate_mipmap - Automatically generate lower mipmap images whenever the base mipmap - image is changed with glTexImage, glCopyTexImage, etc. - - - -libOSMesa.so ------------- - -libOSMesa.so is a new library which contains the OSMesa interface for -off-screen rendering. Apps which need the OSMesa interface should link -with both -lOSMesa and -lGL. This change was made so that stand-alone -Mesa works the same way as XFree86/DRI's libGL. - - - -Device Driver Changes / Core Mesa Changes ------------------------------------------ - -The ctx->Driver.LogicOp() function has been removed. It used to -be called during state update in order to determine if the driver -could do glLogicOp() operations, and if not, set the SWLogicOpEnabled -flag. Drivers should instead examine the LogicOp state themselves -and choose specialized point, line, and triangle functions appropriately, -or fall back to software rendering. The Xlib driver was the only driver -to use this function. And since the Xlib driver no longer draws -points, lines or triangles using Xlib, the LogicOp function isn't needed. - -The ctx->Driver.Dither() function has been removed. Drivers should -detect dither enable/disable via ctx->Driver.Enable() instead. - -The ctx->Driver.IndexMask() and ctx->Driver.ColorMask() functions -are now just called from glIndexMask and glColorMask like the other -GL state-changing functions. They are no longer called from inside -gl_update_state(). Also, they now return void. The change was made -mostly for sake of uniformity. - -The NEW_DRVSTATE[0123] flags have been removed. They weren't being used -and are obsolete w.r.t. the way state updates are done in DRI drivers. - - -Removed obsolete gl_create_visual() and gl_destroy_visual(). - -Renamed functions (new namespace): - -old new -gl_create_framebuffer _mesa_create_framebuffer -gl_destroy_framebuffer _mesa_destroy_framebuffer -gl_create_context _mesa_create_context -gl_destroy_context _mesa_destroy_context -gl_context_initialize _mesa_context_initialize -gl_copy_context _mesa_copy_context -gl_make_current _mesa_make_current -gl_make_current2 _mesa_make_current2 -gl_get_current_context _mesa_get_current_context -gl_flush_vb _mesa_flush_vb -gl_warning _mesa_warning -gl_compile_error _mesa_compile_error - - -All the drivers have been updated, but not all of them have been -tested since I can't test some platforms (DOS, Windows, Allegro, etc). - - -X/Mesa Driver -------------- - -The source files for the X/Mesa driver in src/X have been renamed. -The xmesa[1234].c files are gone. The new files are xm_api.c, -xm_dd.c, xm_line.c, xm_span.c and xm_tri.c. - - - -Multitexture ------------- - -Eight texture units are now supported by default. - - - -OpenGL SI related changes -------------------------- - -In an effort to make Mesa's internal interfaces more like the OpenGL -SI interfaces, a number of changes have been made: - -1. Importing the SI's glcore.h file which defines a number of -interface structures like __GLimports and __GLexports. - -2. Renamed "struct gl_context" to "struct __GLcontextRec". - -3. Added __glCoreCreateContext() and __glCoreNopDispatch() functions. - -4. The GLcontext member Visual is no longer a pointer. - -5. New file: imports.c to setup default import functions for Mesa. - - - - -16-bit color channels ---------------------- - -There's experimental support for 16-bit color channels (64-bit pixels) -in Mesa 3.5. Only the OSMesa interface can be used for 16-bit rendering. -Type "make linux-osmesa16" in the top-level directory to build the -special libOSMesa16.so library. - -This hasn't been tested very thoroughly yet so please file bug reports -if you have trouble. - -In the future I hope to implement support for 32-bit, floating point -color channels. - ----------------------------------------------------------------------- -$Id: RELNOTES-3.5,v 1.14 2001/06/20 19:02:48 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-4.0 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-4.0 deleted file mode 100644 index e4249cfa17..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-4.0 +++ /dev/null @@ -1,163 +0,0 @@ - - Mesa 4.0 release notes - - October 18, 2001 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 3.3) designate new developmental releases. -Even numbered versions (such as 3.4) designate stable releases. - -Mesa version 4.0 signifies two things: - - 1. A stabilization of the 3.5 development release - 2. Implementation of the OpenGL 1.3 specification - - -Note that the Mesa major version number is incremented with the OpenGL -minor version number: - - Mesa 1.x == OpenGL 1.0 - Mesa 2.x == OpenGL 1.1 - Mesa 3.x == OpenGL 1.2 - Mesa 4.x == OpenGL 1.3 - - - -New Features ------------- - -Mesa 3.5 already had all the new features of OpenGL 1.3, implemented as -extensions. These extensions were simply promoted to standard features: - - GL_ARB_multisample - GL_ARB_multitexture - GL_ARB_texture_border_clamp - GL_ARB_texture_compression - GL_ARB_texture_cube_map - GL_ARB_texture_env_add - GL_ARB_texture_env_combine - GL_ARB_texture_env_dot3 - GL_ARB_transpose_matrix - -In Mesa 4.0 the functions defined by these extensions are now available -without the "ARB" suffix. For example, glLoadTransposeMatrixf() is now -a standard API function. The new functions in OpenGL 1.3 and Mesa 4.0 are: - - glActiveTexture - glClientActiveTexture - glCompressedTexImage1D - glCompressedTexImage2D - glCompressedTexImage3D - glCompressedTexSubImage1D - glCompressedTexSubImage2D - glCompressedTexSubImage3D - glGetCompressedTexImage - glLoadTransposeMatrixd - glLoadTransposeMatrixf - glMultiTexCoord1d - glMultiTexCoord1dv - glMultiTexCoord1f - glMultiTexCoord1fv - glMultiTexCoord1i - glMultiTexCoord1iv - glMultiTexCoord1s - glMultiTexCoord1sv - glMultiTexCoord2d - glMultiTexCoord2dv - glMultiTexCoord2f - glMultiTexCoord2fv - glMultiTexCoord2i - glMultiTexCoord2iv - glMultiTexCoord2s - glMultiTexCoord2sv - glMultiTexCoord3d - glMultiTexCoord3dv - glMultiTexCoord3f - glMultiTexCoord3fv - glMultiTexCoord3i - glMultiTexCoord3iv - glMultiTexCoord3s - glMultiTexCoord3sv - glMultiTexCoord4d - glMultiTexCoord4dv - glMultiTexCoord4f - glMultiTexCoord4fv - glMultiTexCoord4i - glMultiTexCoord4iv - glMultiTexCoord4s - glMultiTexCoord4sv - glMultTransposeMatrixd - glMultTransposeMatrixf - glSampleCoverage - glSamplePass - - -GLX 1.4 is the companion to OpenGL 1.3. The only new features in GLX 1.4 -are support for multisampling and the GLX_ARB_get_proc_address extension. -glXGetProcAddress() is the only new function in GLX 1.4. - - - -Multisample and Texture Compression ------------------------------------ - -The OpenGL 1.3 specification allows the multisample and texture compression -features to essentially be no-ops. For example, if you query for multisample -support you'll find none, but the API functions work. - -Similarly, texture compression is not implemented by any of the software -drivers but you can specify a generic compressed texture format (like -GL_COMPRESSED_RGBA) to glTexImage2D and it'll be accepted. - - - -Device Drivers --------------- - -Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on the -device driver. If the driver enables all the ARB extensions which are part -of OpenGL 1.3 then glGetString(GL_VERSION) will return "1.3". Otherwise, -it'll return "1.2". - -A number of Mesa's software drivers haven't been actively maintained for -some time. We rely on volunteers to maintain many of the drivers. -Here's the current status of all included drivers: - - -Driver Status ----------------------- --------------------- -XMesa (Xlib) implements OpenGL 1.3 -OSMesa (off-screen) implements OpenGL 1.3 -FX (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.3 -GGI needs updating -DOS/DJGPP needs updating -BeOS needs updating -Allegro needs updating -D3D needs updating -DOS needs updating - -Special thanks go to Karl Schultz for updating the Windows driver. - -The XFree86/DRI drivers have not yet been updated to use Mesa 4.0 as of -September 2001, but that should happen eventually. - - - -Other Changes -------------- - -See the VERSIONS file for more details about bug fixes, etc. in Mesa 4.0. - - ----------------------------------------------------------------------- -$Id: RELNOTES-4.0,v 3.2 2001/10/17 14:59:21 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-4.0.1 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-4.0.1 deleted file mode 100644 index b4d7efca81..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-4.0.1 +++ /dev/null @@ -1,22 +0,0 @@ - - Mesa 4.0.1 release notes - - December 17, 2001 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 3.3) designate new developmental releases. -Even numbered versions (such as 3.4) designate stable releases. - -Mesa 4.0.1 only contains bug fixes since version 4.0. - -See the docs/VERSIONS file for the list of bug fixes. - ----------------------------------------------------------------------- -$Id: RELNOTES-4.0.1,v 1.2 2001/12/18 14:08:23 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-4.0.2 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-4.0.2 deleted file mode 100644 index 1b7eaaa8fe..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-4.0.2 +++ /dev/null @@ -1,50 +0,0 @@ - - Mesa 4.0.2 release notes - - March 25, 2002 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 3.3) designate new developmental releases. -Even numbered versions (such as 3.4) designate stable releases. - -Mesa 4.0.2 only contains bug fixes and a new DOS driver since version 4.0.1. - -See the docs/VERSIONS file for the list of bug fixes. - - -Device Drivers --------------- - -Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on the -device driver. If the driver enables all the ARB extensions which are part -of OpenGL 1.3 then glGetString(GL_VERSION) will return "1.3". Otherwise, -it'll return "1.2". - -A number of Mesa's software drivers haven't been actively maintained for -some time. We rely on volunteers to maintain many of the drivers. -Here's the current status of all included drivers: - -Driver Status ----------------------- --------------------- -XMesa (Xlib) implements OpenGL 1.3 -OSMesa (off-screen) implements OpenGL 1.3 -FX (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.3 -DOS/DJGPP implements OpenGL 1.3 (new in Mesa 4.0.2) -GGI needs updating -BeOS needs updating -Allegro needs updating -D3D needs updating - - ----------------------------------------------------------------------- -$Id: RELNOTES-4.0.2,v 1.2 2002/03/23 02:38:39 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-4.0.3 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-4.0.3 deleted file mode 100644 index c69b6a279e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-4.0.3 +++ /dev/null @@ -1,52 +0,0 @@ - - Mesa 4.0.3 release notes - - June 25, 2002 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 3.3) designate new developmental releases. -Even numbered versions (such as 3.4) designate stable releases. - -Mesa 4.0.3 basically just contains bug fixes version 4.0.2. - -See the docs/VERSIONS file for the list of bug fixes. - -The GGI driver has been updated, thanks to Filip Spacek. - - -Device Drivers --------------- - -Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on the -device driver. If the driver enables all the ARB extensions which are part -of OpenGL 1.3 then glGetString(GL_VERSION) will return "1.3". Otherwise, -it'll return "1.2". - -A number of Mesa's software drivers haven't been actively maintained for -some time. We rely on volunteers to maintain many of the drivers. -Here's the current status of all included drivers: - -Driver Status ----------------------- --------------------- -XMesa (Xlib) implements OpenGL 1.3 -OSMesa (off-screen) implements OpenGL 1.3 -FX (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.3 -DOS/DJGPP implements OpenGL 1.3 (new in Mesa 4.0.2) -GGI implements OpenGL 1.3 -BeOS needs updating -Allegro needs updating -D3D needs updating - - ----------------------------------------------------------------------- -$Id: RELNOTES-4.0.3,v 1.2 2002/06/26 02:36:34 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-4.1 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-4.1 deleted file mode 100644 index 92cf9196f0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-4.1 +++ /dev/null @@ -1,308 +0,0 @@ - - Mesa 4.1 release notes - - October 29, 2002 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Even numbered versions (such as 4.0) designate stable releases. -Odd numbered versions (such as 4.1) designate new developmental releases. - - -New Features in Mesa 4.1 ------------------------- - -New extensions. Docs at http://oss.sgi.com/projects/ogl-sample/registry/ - -GL_NV_vertex_program - - NVIDIA's vertex programming extension - -GL_NV_vertex_program1_1 - - A few features built on top of GL_NV_vertex_program - -GL_ARB_window_pos - - This is the ARB-approved version of GL_MESA_window_pos - -GL_ARB_depth_texture - - This is the ARB-approved version of GL_SGIX_depth_texture. - It allows depth (Z buffer) data to be stored in textures. - This is used by GL_ARB_shadow - -GL_ARB_shadow - - Shadow mapping with depth textures. - This is the ARB-approved version of GL_SGIX_shadow. - -GL_ARB_shadow_ambient - - Allows one to specify the luminance of shadowed pixels. - This is the ARB-approved version of GL_SGIX_shadow_ambient. - -GL_EXT_shadow_funcs - - Extends the set of GL_ARB_shadow texture comparision functions to - include all eight of standard OpenGL dept-test functions. - -GL_ARB_point_parameters - - This is basically the same as GL_EXT_point_parameters. - -GL_ARB_texture_env_crossbar - - Allows any texture combine stage to reference any texture source unit. - -GL_NV_point_sprite - - For rendering points as textured quads. Useful for particle effects. - -GL_NV_texture_rectangle (new in 4.0.4 actually) - - Allows one to use textures with sizes that are not powers of two. - Note that mipmapping and several texture wrap modes are not allowed. - -GL_EXT_multi_draw_arrays - - Allows arrays of vertex arrays to be rendered with one call. - -GL_EXT_stencil_two_side - - Separate stencil modes for front and back-facing polygons. - -GLX_SGIX_fbconfig & GLX_SGIX_pbuffer - - Off-screen rendering support. - -GL_ATI_texture_mirror_once - - Adds two new texture wrap modes: GL_MIRROR_CLAMP_ATI and - GL_MIRROR_CLAMP_TO_EDGE_ATI. - - - -Device Driver Status --------------------- - -A number of Mesa's software drivers haven't been actively maintained for -some time. We rely on volunteers to maintain many of these drivers. -Here's the current status of all included drivers: - - -Driver Status ----------------------- --------------------- -XMesa (Xlib) implements OpenGL 1.3 -OSMesa (off-screen) implements OpenGL 1.3 -FX (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.3 -DOS/DJGPP implements OpenGL 1.3 -GGI implements OpenGL 1.3 -BeOS needs updating (underway) -Allegro needs updating -D3D needs updating -DOS needs updating - - - -New features in GLUT --------------------- - -1. Frames per second printing - - GLUT now looks for an environment variable called "GLUT_FPS". If it's - set, GLUT will print out a frames/second statistic to stderr when - glutSwapBuffers() is called. By default, frames/second is computed - and displayed once every 5 seconds. You can specify a different - interval (in milliseconds) when you set the env var. For example - 'export GLUT_FPS=1000' or 'setenv GLUT_FPS 1000' will set the interval - to one second. - - NOTE: the demo or application must call the glutInit() function for - this to work. Otherwise, the env var will be ignored. - - Finally, this feature may not be reliable in multi-window programs. - - -2. glutGetProcAddress() function - - The new function: - - void *glutGetProcAddress(const char *procName) - - is a wrapper for glXGetProcAddressARB() and wglGetProcAddress(). It - lets you dynamically get the address of an OpenGL function at runtime. - The GLUT_API_VERSION has been bumped to 5, but I haven't bumped the - GLUT version number from 3.7 since that's probably Mark Kilgard's role. - - This function should probably also be able to return the address of - GLUT functions themselves, but it doesn't do that yet. - - - -XXX Things To Do Yet XXXX -------------------------- - -isosurf with vertex program exhibits some missing triangles (probably -when recycling the vertex buffer for long prims). - - - -Porting Info ------------- - -If you're porting a DRI or other driver from Mesa 4.0.x to Mesa 4.1 here -are some things to change: - -1. ctx->Texture._ReallyEnabled is obsolete. - - Since there are now 5 texture targets (1D, 2D, 3D, cube and rect) that - left room for only 6 units (6*5 < 32) in this field. - This field is being replaced by ctx->Texture._EnabledUnits which has one - bit per texture unit. If the bit k of _EnabledUnits is set, that means - ctx->Texture.Unit[k]._ReallyEnabled is non-zero. You'll have to look at - ctx->Texture.Unit[k]._ReallyEnabled to learn if the 1D, 2D, 3D, cube or - rect texture is enabled for unit k. - - This also means that the constants TEXTURE1_*, TEXTURE2_*, etc are - obsolete. - - The tokens TEXTURE0_* have been replaced as well (since there's no - significance to the "0" part: - - old token new token - TEXTURE0_1D TEXTURE_1D_BIT - TEXTURE0_2D TEXTURE_2D_BIT - TEXTURE0_3D TEXTURE_3D_BIT - TEXTURE0_CUBE TEXTURE_CUBE_BIT - TEXTURE_RECT_BIT - - These tokens are only used for the ctx->Texture.Unit[i].Enabled and - ctx->Texture.Unit[i]._ReallyEnabled fields. Exactly 0 or 1 bits will - be set in _ReallyEnabled at any time! - - Q: "What's the purpose of Unit[i].Enabled vs Unit[i]._ReallyEnabled?" - A: The user can enable GL_TEXTURE_1D, GL_TEXTURE_2D, etc for any - texure unit all at once (an unusual thing to do). - OpenGL defines priorities that basically say GL_TEXTURE_2D has - higher priority than GL_TEXTURE_1D, etc. Also, just because a - texture target is enabled by the user doesn't mean we'll actually - use that texture! If a texture object is incomplete (missing mip- - map levels, etc) it's as if texturing is disabled for that target. - The _ReallyEnabled field will have a bit set ONLY if the texture - target is enabled and complete. This spares the driver writer from - examining a _lot_ of GL state to determine which texture target is - to be used. - - -2. Tnl tokens changes - - During the implementation of GL_NV_vertex_program some of the vertex - buffer code was changed. Specifically, the VERT_* bits defined in - tnl/t_context.h have been renamed to better match the conventions of - GL_NV_vertex_program. The old names are still present but obsolete. - Drivers should use the newer names. - - For example: VERT_RGBA is now VERT_BIT_COLOR0 and - VERT_SPEC_RGB is now VERT_BIT_COLOR1. - - - -3. Read/Draw Buffer changes - - The business of setting the current read/draw buffers in Mesa 4.0.x - was complicated. It's much simpler now in Mesa 4.1. - - Here are the changes: - - - Renamed ctx->Color.DrawDestMask to ctx->Color._DrawDestMask - - Removed ctx->Color.DriverDrawBuffer - - Removed ctx->Pixel.DriverReadBuffer - - Removed ctx->Color.MultiDrawBuffer - - Removed ctx->Driver.SetDrawBuffer() - - Removed swrast->Driver.SetReadBuffer(). - - Added ctx->Color._DrawDestMask - a bitmask of FRONT/BACK_LEFT/RIGHT_BIT - values to indicate the current draw buffers. - - Added ctx->Pixel._ReadSrcMask to indicate the source for pixel reading. - The value is _one_ of the FRONT/BACK_LEFT/RIGHT_BIT values. - - Added ctx->Driver.DrawBuffer() and ctx->Driver.ReadBuffer(). - These functions exactly correspond to glDrawBuffer and glReadBuffer calls. - Many drivers will set ctx->Driver.DrawBuffer = _swrast_DrawBuffer and - leave ctx->Draw.ReadBuffer NULL. - DRI drivers should implement their own function for ctx->Driver.DrawBuffer - and use it to set the current hardware drawing buffer. You'll probably - also want to check for GL_FRONT_AND_BACK mode and fall back to software. - Call _swrast_DrawBuffer() too, to update the swrast state. - - Added swrast->Driver.SetBuffer(). - This function should be implemented by all device drivers that use swrast. - Mesa will call it to specify the buffer to use for span reading AND - writing and point/line/triangle rendering. - There should be no confusion between current read or draw buffer anymore. - - Added swrast->CurrentBuffer to indicate which color buffer to read/draw. - Will be FRONT_LEFT_BIT, BACK_LEFT_BIT, FRONT_RIGHT_BIT or BACK_RIGHT_BIT. - This value is usually passed to swrast->Driver.SetBuffer(). - - -4. _mesa_create_context() changes. This function now takes a pointer to - a __GLimports object. The __GLimports structure contains function - pointers to system functions like fprintf(), malloc(), etc. - The _mesa_init_default_imports() function can be used to initialize - a __GLimports object. Most device drivers (like the DRI drivers) - should use this. - - -5. In tnl's struct vertex_buffer, the field "ProjectedClipCoords" - has been replaced by "NdcPtr" to better match the OpenGL spec's - terminology. - - -6. Since GL_EXT_stencil_two_side has been implemented, many of the - ctx->Stencil fields are now 2-element arrays. For example, - "GLenum Ref" is now "GLenum Ref[2]" The [0] elements are the front-face - values and the [1] elements are the back-face values. - ctx->Stencil.ActiveFace is 0 or 1 to indicate the current face for - the glStencilOp/Func/Mask() functions. - ctx->Stencil.TestTwoSide controls whether or not 1 or 2-sided stenciling - is enabled. - - -7. Removed ctx->Polygon._OffsetAny. Removed ctx->Polygon.OffsetMRD. - - -8. GLfloat / GLchan changes: - - - Changed ctx->Driver.ClearColor() to take GLfloat[4] instead of GLchan[4]. - ctx->Color.ClearColor is now GLfloat[4] too. - - Changed ctx->Driver.AlphaRef() to take GLfloat instead of GLchan. - - ctx->Color.AlphaRef is now GLfloat. - - texObj->BorderColor is now GLfloat[4]. texObj->_BorderChan is GLchan[4]. - - This is part of an effort to remove all GLchan types from core Mesa so - that someday we can support 8, 16 and 32-bit color channels dynamically - at runtime, instead of at compile-time. - - -9. GLboolean ctx->Tranform.ClipEnabled[MAX_CLIP_PLANES] has been replaced - by GLuint ctx->Transform.ClipPlanesEnabled. The later is a bitfield. - - -10. There's a new matrix_stack type in mtypes.h used for the Modelview, - Projection, Color and Texcoord matrix stacks. - - -11. The ctx->Current.* fields have changed a lot. Now, there's a - ctx->Current.Attrib[] array for all vertex attributes which matches - the NV vertex program conventions. - - ----------------------------------------------------------------------- -$Id: RELNOTES-4.1,v 1.22 2002/10/29 15:06:37 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-5.0 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-5.0 deleted file mode 100644 index 565e4ad78e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-5.0 +++ /dev/null @@ -1,85 +0,0 @@ - - Mesa 5.0 release notes - - November 13, 2002 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Even-numbered versions (such as 5.0) designate stable releases. -Odd-numbered versions (such as 4.1) designate new developmental releases. - -Mesa 5.0 is basically just a stabilization of Mesa 4.1. To see a list of -bug fixes, etc. see the VERSIONS file. - - - -New Features in Mesa 5.0 ------------------------- - -Mesa 5.0 supports OpenGL 1.4. Note Mesa's versioning convention: - - OpenGL Version Mesa Version - ------------------------------ - 1.0 1.x - 1.1 2.x - 1.2 3.x - 1.3 4.x - 1.4 5.x - -OpenGL 1.4 (and Mesa 5.0) incorporates the following OpenGL extensions as -standard features: - - GL_ARB_depth_texture - GL_ARB_shadow - GL_ARB_texture_env_crossbar - GL_ARB_texture_mirror_repeat - GL_ARB_window_pos - GL_EXT_blend_color - GL_EXT_blend_func_separate - GL_EXT_blend_logic_op - GL_EXT_blend_minmax - GL_EXT_blend_subtract - GL_EXT_fog_coord - GL_EXT_multi_draw_arrays - GL_EXT_point_parameters - GL_EXT_secondary_color - GL_EXT_stencil_wrap - GL_SGIS_generate_mipmap - - - -Device Driver Status --------------------- - -A number of Mesa's software drivers haven't been actively maintained for -some time. We rely on volunteers to maintain many of these drivers. -Here's the current status of all included drivers: - - -Driver Status ----------------------- --------------------- -XMesa (Xlib) implements OpenGL 1.4 -OSMesa (off-screen) implements OpenGL 1.4 -FX (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.4 -DOS/DJGPP implements OpenGL 1.3 -GGI implements OpenGL 1.3 -DOS implements OpenGL 1.4 -BeOS needs updating (underway) -Allegro needs updating -D3D needs updating - -Note: supporting OpenGL 1.4 (vs. 1.3 or 1.2) usually only requires that the -driver call the _mesa_enable_1_4_extensions() function. - - ----------------------------------------------------------------------- -$Id: RELNOTES-5.0,v 3.2 2002/11/13 15:33:51 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-5.0.1 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-5.0.1 deleted file mode 100644 index 8d72cc44c1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-5.0.1 +++ /dev/null @@ -1,46 +0,0 @@ - - Mesa 5.0.1 release notes - - March 30, 2003 - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Even-numbered versions (such as 5.0.x) designate stable releases. -Odd-numbered versions (such as 4.1.x) designate new developmental releases. - -Mesa 5.0.1 just fixes bugs found since the 5.0 release. See the VERSIONS -file for details. - - -Device Driver Status --------------------- - -A number of Mesa's software drivers haven't been actively maintained for -some time. We rely on volunteers to maintain many of these drivers. -Here's the current status of all included drivers: - - -Driver Status ----------------------- --------------------- -XMesa (Xlib) implements OpenGL 1.4 -OSMesa (off-screen) implements OpenGL 1.4 -FX (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.4 -DJGPP implements OpenGL 1.4 -GGI implements OpenGL 1.3 -BeOS implements OpenGL 1.4 -Allegro needs updating -D3D needs updating - -Note: supporting OpenGL 1.4 (vs. 1.3 or 1.2) usually only requires that the -driver call the _mesa_enable_1_4_extensions() function. - - ----------------------------------------------------------------------- -$Id: RELNOTES-5.0.1,v 3.1 2003/03/30 16:17:54 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-5.0.2 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-5.0.2 deleted file mode 100644 index cfc9ad04fd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-5.0.2 +++ /dev/null @@ -1,46 +0,0 @@ - - Mesa 5.0.2 release notes - - September 5, 2003 - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Even-numbered versions (such as 5.0.x) designate stable releases. -Odd-numbered versions (such as 4.1.x) designate new developmental releases. - -Mesa 5.0.2 just fixes bugs found since the 5.0.1 release. See the VERSIONS -file for details. - - -Device Driver Status --------------------- - -A number of Mesa's software drivers haven't been actively maintained for -some time. We rely on volunteers to maintain many of these drivers. -Here's the current status of all included drivers: - - -Driver Status ----------------------- --------------------- -XMesa (Xlib) implements OpenGL 1.4 -OSMesa (off-screen) implements OpenGL 1.4 -FX (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.4 -DJGPP implements OpenGL 1.4 -GGI implements OpenGL 1.3 -BeOS implements OpenGL 1.4 -Allegro needs updating -D3D needs updating - -Note: supporting OpenGL 1.4 (vs. 1.3 or 1.2) usually only requires that the -driver call the _mesa_enable_1_4_extensions() function. - - ----------------------------------------------------------------------- -$Id: RELNOTES-5.0.2,v 1.1 2003/09/04 23:10:38 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-5.1 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-5.1 deleted file mode 100644 index aed6e102b0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-5.1 +++ /dev/null @@ -1,279 +0,0 @@ - - Mesa 5.1 release notes - - December 17, 2003 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Even-numbered versions (such as 5.0) designate stable releases. -Odd-numbered versions (such as 5.1) designate new developmental releases. - - -Bug fixes ---------- -See the VERSIONS file for a list of bugs fixed in this release. - - - -New Features in Mesa 5.1 ------------------------- - -GL_ARB_vertex_program / GL_ARB_fragment_program - Michal Krol and Karl Rasche implemented these extensions. Thanks! - Be aware that there may be some rough edges and lurking bugs. - -GL_ATI_texture_env_combine3 extension - This adds a few new texture combine modes. - Contributed by Ian Romanick. - -GL_SGI_texture_color_table - Adds a color table lookup to the RGBA texture path. There's a separate - color table for each texture unit. - Contributed by Eric Plante. - -GL_NV_fragment_program - NVIDIA's fragment-level programming feature. - Possible lurking bugs: - - the DDX and DDY commands aren't fully tested - - there may be bugs in the parser - - the TEX and TXP instructions both do perspective correction - - the pack/unpack instructions may not be correct - -GL_EXT_depth_bounds_test - This extension adds a scissor-like test for the Z axis. It's used to - optimize stencil-volume shadow algorithms. - -GL_NV_light_max_exponent - Lifts the 128 limit for max light exponent. - -GL_EXT_texture_rectangle - Identical to GL_NV_texture_rectangle - -GL_ARB_occlusion_query - Useful for visibility-based culling. - -GL_ARB_texture_non_power_of_two - Removes the restriction that texture dimensions must be powers of two. - -GL_ARB_vertex_buffer_object - Allows server-side vertex arrays, optimized host/card data transfers, etc. - -GL_ARB_point_sprite - ARB-approved version of GL_NV_point_sprite. Basically allows textures - to be applied to points. - -GL_IBM_multimode_draw_arrays - Allows multiple vertex arrays to be drawn with one call, including arrays - of different types of primitives. - -GL_SUN_multi_draw_arrays - An alias for GL_EXT_multi_draw_arrays, standard in OpenGL 1.4. - -Faster glDrawPixels / glCopyPixels in X11 driver - If your X screen is 32bpp, glDrawPixels to the front color buffer will - be accelerated (via XPutImage()) if the image format is GL_BGRA and the - type is GL_UNSIGNED_BYTE. No raster operations, such as depth test, - blend, fog, etc. can be enabled. - - If your X screen is 16bpp, glDrawPixels to the front color buffer will - be accelerated (via XPutImage()) if the image format is GL_RGB and the - type is GL_UNSIGNED_SHORT_5_6_5. No raster operations, such as depth - test, blend, fog, etc. can be enabled. - - glCopyPixels() calls for the front color buffer will be accelerated - (via XCopyArea()) if no raster operations, such as depth test, blend, - fog, pixel zoom, etc. are enabled. - - The speed-up over typical software rendering is a factor of 10 for - glDrawPixels and 100 for glCopyPixels. - - -With the addition of GL_ARB_occlusion_query, GL_ARB_vertex_buffer_object, -GL_ARB_texture_non_power_of_two and GL_EXT_shadow_funcs, Mesa 5.1 supports -all the new features of OpenGL 1.5. Mesa 6.0 (the next stable release) -will advertise GL_VERSION = "1.5". - - - -Vertex/Fragment program debugger --------------------------------- - -GL_MESA_program_debug is an experimental extension to support -interactive debugging of vertex and fragment programs. See the -docs/MESA_program_debug.spec file for details. - -The bulk of the vertex/fragment program debugger is implemented -outside of Mesa. The GL_MESA_program_debug extension just has minimal -hooks for stopping running programs and inspecting programs. - -The progs/tests/debugger.c (only in CVS) program is an example of how -the extension can be used. Presently, the debugger code and demo code -is in the same file. Eventually the debugger code should be moved -into a reusable module. - -As it is now, the demo lets you set breakpoings in vertex/fragment -programs, single step, and print intermediate register values. It's -basically just a proof of concept. - - - -Directory tree reorganization ------------------------------ - -The directory structure for Mesa has been overhauled to improve its layout. -All source code for Mesa, GLU, GLUT, etc is now under the src/ directory -in appropriate subdirectories. - -The Mesa source code and drivers has been reorganized under src/mesa/. - -All demonstration programs and tests are now in subdirectories under progs/. - - - -Build System Changes --------------------- - -The GNU automake/autoconf support has been removed. As it was, it seldom -worked on anything but Linux. The Mesa developers aren't big fans of -automake/autoconf/libtool and didn't have the time to maintain it. -If someone wants to contribute new automake/autoconf support (and is -willing to maintain it), it may be re-incorporated into Mesa, subject -to some requirements. - -The "old style" makefile system has been updated: - 1. Make-config has been trimmed down to fewer, modern configurations. - 2. Most of the bin/mklib.* scripts have been rolled into a new "mklib" - script that works on all sorts of systems. There are probably some - bugs in it, but it's been tested on Linux, SunOS 5.8 and IRIX 6.5. - Improvements/contributes are greatly appreciated. - 3. The Makefile.X11 files have been cleaned up in various ways - - - -Source File Changes -------------------- - -The mmath.[ch] files are obsolete. Their contents have been moved -into the imports.[ch] and macros.[ch] files. - -The files related to vertex and fragment programming have changed. -Old files: - vpexec.[ch] - vpparse.[ch] - vpstate.[ch] -New files: - program.[ch] - generic ARB/NV program code - arbprogram.[ch] - ARB program API functions - arbfragparse.[ch] - ARB fragment program parsing - arbvertparse.[ch] - ARB vertex program parsing - arbparse.[ch] - ARB vertex/fragment parsing - arbparse_syn.h - vertex/fragment program syntax - nvprogram.[ch] - NV program API functions - nvvertprog.h - NV vertex program definitions - nvfragprog.h - NV fragment program definitions - nvvertparse.[ch] - NV vertex program parser - nvfragparse.[ch] - NV fragment program parser - nvvertexec.[ch] - NV vertex program execution - swrast/s_nvfragprog.[ch] - NV fragment program execution - -The files related to per-vertex handling have changed. -Old files: - tnl/t_eval_api.c - old per-vertex code - tnl/t_imm_alloc.c - old per-vertex code - tnl/t_imm_api.c - old per-vertex code - tnl/t_imm_debug.c - old per-vertex code - tnl/t_imm_dlist.c - old per-vertex code - tnl/t_imm_elt.c - old per-vertex code - tnl/t_imm_eval.c - old per-vertex code - tnl/t_imm_exec.c - old per-vertex code - tnl/t_imm_fixup.c - old per-vertex code - tnl/t_vtx_sse.c - old per-vertex code - tnl/t_vtx_x86.c - old per-vertex code -New files: - tnl/t_save_api.c - new per-vertex code - tnl/t_save_loopback.c - new per-vertex code - tnl/t_save_playback.c - new per-vertex code - tnl/t_vtx_eval.c - old per-vertex code - -Other new files: - bufferobj.[ch] - GL_ARB_vertex_buffer_object functions - version.h - defines the Mesa version info - -Other removed files: - swrast/s_histogram.[ch] - moved into src/histogram.c - - - -Other Changes -------------- - -The ctx->Driver.CreateTexture function has been removed - it wasn't used. - -New device driver hook functions: - NewTextureObject - used to allocate struct gl_texture_objects - NewTextureImage - used to allocate struct gl_texture_images - -New ctx->Texture._EnabledCoordUnits field: - With the addition of GL_NV_fragment_program we may need to interpolate - various sets of texture coordinates even when the corresponding texture - unit is not enabled. That is, glEnable(GL_TEXTURE_xD) may never get - called but we still may have to interpolate texture coordinates across - triangles so that the fragment program will get them. - This new field indicates which sets of texture coordinates are needed. - If a bit is set in the ctx->Texture._EnabledUnits bitmask is set, the - same bit MUST be set in ctx->Texture._EnabledCoordUnits. - -The ctx->_TriangleCaps field is deprecated. - Instead of testing the DD_* bits in _TriangleCaps, you should instead - directly test the relevant state variables, or use one of the helper - functions like NEED_SECONDARY_COLOR() at the bottom of context.h - While testing _TriangleCaps bits was fast, it was kludgey, and setting - the bits in the first place could be error prone. - -New vertex processing code. - The code behind glBegin, glEnd, glVertex, glNormal, etc. has been - totally rewritten. It's a cleaner implementation now and should use - less memory. (Keith) - - - -To Do ------ -Add screen-awareness to fakeglx.c - - - - -Device Driver Status --------------------- - -A number of Mesa's software drivers haven't been actively maintained for -some time. We rely on volunteers to maintain many of these drivers. -Here's the current status of all included drivers: - - -Driver Status ----------------------- --------------------- -XMesa (Xlib) implements OpenGL 1.4 -OSMesa (off-screen) implements OpenGL 1.4 -FX (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.4 -DJGPP implements OpenGL 1.4 -GGI implements OpenGL 1.3 -BeOS implements OpenGL 1.4 -Allegro needs updating -D3D needs updating - -Note: supporting OpenGL 1.4 (vs. 1.3 or 1.2) usually only requires that the -driver call the _mesa_enable_1_4_extensions() function. - - ----------------------------------------------------------------------- diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.0 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.0 deleted file mode 100644 index de01a879a4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.0 +++ /dev/null @@ -1,87 +0,0 @@ - - Mesa 6.0 release notes - - January 16, 2004 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 5.1) designate new developmental releases. -Even numbered versions (such as 6.0) designate stable releases. - -Mesa version 6.0 signifies two things: - - 1. A stabilization of the 5.1 development release - 2. Implementation of the OpenGL 1.5 specification. When you query - glGetString(GL_VERSION) "1.5" will be returned (as long as the - driver supports all the required features). - - -Note that the Mesa major version number is incremented with the OpenGL -minor version number: - - Mesa 1.x == OpenGL 1.0 - Mesa 2.x == OpenGL 1.1 - Mesa 3.x == OpenGL 1.2 - Mesa 4.x == OpenGL 1.3 - Mesa 5.x == OpenGL 1.4 - Mesa 6.x == OpenGL 1.5 - - - -New Features ------------- - -Mesa 5.1 already had all the new features of OpenGL 1.5, implemented as -extensions. These extensions were simply promoted to standard features: - - GL_ARB_occlusion_query extension - GL_ARB_texture_non_power_of_two extension - GL_ARB_vertex_buffer_object extension - GL_EXT_shadow_funcs - - - -Device Drivers --------------- - -Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on -the device driver. For example, if the driver enables all the ARB -extensions which are part of OpenGL 1.3 then glGetString(GL_VERSION) -will return "1.3". Otherwise, it'll return "1.2". - -A number of Mesa's software drivers haven't been actively maintained for -some time. We rely on volunteers to maintain many of the drivers. -Here's the current status of all included drivers: - - -Driver Status ----------------------- --------------------- -XMesa (Xlib) implements OpenGL 1.5 -OSMesa (off-screen) implements OpenGL 1.5 -FX (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.5 -DJGPP implements OpenGL 1.5 -GGI implements OpenGL 1.3 -BeOS implements OpenGL 1.5 -Allegro needs updating -D3D needs updating - - - - -Other Changes -------------- - -See the VERSIONS file for more details about bug fixes, etc. in Mesa 6.0. - - ----------------------------------------------------------------------- -$Id: RELNOTES-6.0,v 1.3 2004/01/15 15:47:57 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.0.1 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.0.1 deleted file mode 100644 index e72d9fe891..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.0.1 +++ /dev/null @@ -1,50 +0,0 @@ - - Mesa 6.0.1 release notes - - April 2, 2003 - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Even-numbered versions (such as 6.0.x) designate stable releases. -Odd-numbered versions (such as 6.1.x) designate new developmental releases. - -Mesa 6.0.1 just fixes bugs found since the 6.0 release. See the VERSIONS -file for details. - - - -Device Drivers --------------- - -Mesa advertises itself as supporting OpenGL 1.2, 1.3, 1.4 or 1.5 -depending on the device driver's capabilities. For example, if the -driver enables all the ARB extensions which are part of OpenGL 1.5 -then glGetString(GL_VERSION) will return "1.5". Otherwise, it'll -return "1.4" or the next lower version that implements all required -functionality. - -A number of Mesa's software drivers haven't been actively maintained for -some time. We rely on volunteers to maintain many of the drivers. -Here's the current status of all included drivers: - -Driver Status ----------------------- --------------------- -XMesa (Xlib) implements OpenGL 1.5 -OSMesa (off-screen) implements OpenGL 1.5 -FX (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.5 -DJGPP implements OpenGL 1.5 -GGI implements OpenGL 1.3 -BeOS implements OpenGL 1.5 -Allegro needs updating -D3D needs updating - - ----------------------------------------------------------------------- -$Id: RELNOTES-6.0.1,v 3.1 2004/04/02 23:37:02 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.1 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.1 deleted file mode 100644 index 830f1e47e7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.1 +++ /dev/null @@ -1,112 +0,0 @@ - - Mesa 6.1 release notes - - August 18, 2004 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 6.1) designate new developmental releases. -Even numbered versions (such as 6.0) designate stable releases. - - -New Features ------------- - -Half-precision floating point (GLhalf) pixel formats are supported -in Mesa, but the feature isn't exposed yet since the ARB extension -hasn't been finalized yet. - - -Texture image handling ----------------------- - -The code which implements image conversion, pixel transfer ops, etc -for glTexImage commands has been rewritten. - -Now the gl_texture_format struct has a new StoreImage function -pointer. Each texture format must implement this function. The -function is totally responsible for converting the user's texture -image into the specific format. A few helper functions makes this -relatively simple. - -Overall, the code is much simpler, cleaner and easier to work with -now. Adding new texture formats is straight-forward and there's no -longer any distinction between "hardware" and "software" formats. - -Finally, the code for compressed texture images has been reorganized -as well. - -Removed files: - texutil.c - texutil.h - texutil_tmp.h - -New files: - texcompress_s3tc.c - texcompress_fxt1.c - - - -Driver / context changes ------------------------- - -The _mesa_create_context() and _mesa_initialize_context() function -parameters have changed. They now take a pointer to a struct -dd_function_table. Drivers can initialize this table by calling -_mesa_init_driver_functions(). Drivers should then plug in the special -functions they implement. In particular, the ctx->Driver.NewTextureObject -pointer _must_ be set so that the default texture objects created in -_mesa_create/initialize_context() are correctly built. - -The _mesa_init_driver_functions() function allows a lot of redundant code -to be removed from the device drivers (such as initializing -ctx->Driver.Accum to point to _swrast_Accum). Adding new functions to -the dd_function_table can be done with less hassle since the pointer can -be initialized in _mesa_init_driver_functions() rather than in _all_ the -drivers. - - -Device Drivers --------------- - -Mesa advertises itself as supporting OpenGL 1.2, 1.3, 1.4 or 1.5 -depending on the device driver's capabilities. For example, if the -driver enables all the ARB extensions which are part of OpenGL 1.5 -then glGetString(GL_VERSION) will return "1.5". Otherwise, it'll -return "1.4" or the next lower version that implements all required -functionality. - -A number of Mesa's software drivers haven't been actively maintained for -some time. We rely on volunteers to maintain many of the drivers. -Here's the current status of all included drivers: - -Driver Status ----------------------- --------------------- -XMesa (Xlib) implements OpenGL 1.5 -OSMesa (off-screen) implements OpenGL 1.5 -Glide (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.5 -DJGPP implements OpenGL 1.5 -GGI implements OpenGL 1.3 -BeOS implements OpenGL 1.5 -Allegro needs updating -D3D needs updating - - - -Other Changes -------------- - -See the VERSIONS file for more details about bug fixes, etc. in Mesa 6.1. - - ----------------------------------------------------------------------- -$Id: RELNOTES-6.1,v 3.5 2004/08/17 22:58:23 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.2 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.2 deleted file mode 100644 index 4043a5655e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.2 +++ /dev/null @@ -1,52 +0,0 @@ - - Mesa 6.2 release notes - - October 2, 2004 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 6.1) designate new developmental releases. -Even numbered versions (such as 6.2) designate stable releases. - - -This release primarily just fixes bugs found in the Mesa 6.1 release. -See the VERSIONS file for details. - - -ToDo: PBO for polygon stipple, convolution filter, etc. - - - -Known Issues ------------- - -The GL_EXT_pixel_buffer_object extension isn't fully implemented for -functions like glPolygonStipple, glConvolutionFilter, glColorTable, -etc. The important functions like glRead/DrawPixels, glTex[Sub]Image, -and glBitmap work with PBOs. - - - -Driver Status ----------------------- --------------------- -XMesa (Xlib) implements OpenGL 1.5 -OSMesa (off-screen) implements OpenGL 1.5 -Glide (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.5 -DJGPP implements OpenGL 1.5 -GGI implements OpenGL 1.3 -BeOS implements OpenGL 1.5 -Allegro needs updating -D3D needs updating - - ----------------------------------------------------------------------- -$Id: RELNOTES-6.2,v 3.4 2004/10/02 15:43:14 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.2.1 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.2.1 deleted file mode 100644 index d72560e5af..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.2.1 +++ /dev/null @@ -1,50 +0,0 @@ - - Mesa 6.2.1 release notes - - December 9, 2004 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 6.1) designate new developmental releases. -Even numbered versions (such as 6.2.x) designate stable releases. - - -This release primarily just fixes bugs found in the Mesa 6.2 release. -See the VERSIONS file for details. - - - -Known Issues ------------- - -The GL_EXT_pixel_buffer_object extension isn't fully implemented for -functions like glPolygonStipple, glConvolutionFilter, glColorTable, -etc. The important functions like glRead/DrawPixels, glTex[Sub]Image, -and glBitmap work with PBOs. This has been fixed for Mesa 6.3. - - - - -Driver Status ----------------------- --------------------- -XMesa (Xlib) implements OpenGL 1.5 -OSMesa (off-screen) implements OpenGL 1.5 -Glide (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.5 -DJGPP implements OpenGL 1.5 -GGI implements OpenGL 1.3 -BeOS implements OpenGL 1.5 -Allegro needs updating -D3D needs updating - - ----------------------------------------------------------------------- -$Id: RELNOTES-6.2.1,v 3.1 2004/12/09 23:21:36 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.3 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.3 deleted file mode 100644 index dde335eec1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.3 +++ /dev/null @@ -1,115 +0,0 @@ - - Mesa 6.3 release notes - - July 20, 2005 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 6.3) designate new developmental releases. -Even numbered versions (such as 6.2) designate stable releases. - - - -New Features ------------- - -GL_ARB_draw_buffers - allows a fragment program to write to a number of - separate color buffers, instead of just one. - -GL_OES_read_format - allows one to query the fastest glReadPixels format - and datatype. - -GL_ARB_pixel_buffer_object - buffer objects for pixel read/write functions. - -GL_EXT_framebuffer_object - allows render-to-texture and provides a - window-system indepedent Pbuffer facility. - The Mesa CVS tree contains a couple tests of this extension. - -DirectFB driver, contributed by Claudio Ciccani. See docs/README.directfb -for details. - - - -Vertex/Fragment Program PRINT Instruction ------------------------------------------ - -The GL_NV_vertex_program and GL_NV_fragment_program languages have been -extended with a PRINT instruction. - - - -glDeleteTextures(), glDeletePrograms() and glDeleteBuffers() Changed --------------------------------------------------------------------- - -To match the behaviour of other OpenGL implementations, glDeleteTextures, -glDeletePrograms and glDeleteBuffers have been modified so that: - - * The named texture/program/buffer ID is immediately freed for re-use. - - * The actual texture object, program or buffers isn't really deleted until - it is no longer bound in any rendering context (the reference count - is zero). - -Previously, the texture/program/buffer ID wasn't freed until the object -was really deleted. - -Note that textures, programs and buffers can be shared by several rendering -contexts so they can't be deleted until they're unbound in _all_ contexts. - - - -GL_EXT_framebuffer_object changes ---------------------------------- - -Implementing this extension involved changing a lot of code (for the better). - -The gl_framebuffer object now a collection of gl_renderbuffer objects. -Renderbuffers may store colors, stencil indices, or depth values. The -gl_framebuffer and gl_renderbuffer types are object-oriented in design. - -All the old RGB, color index, stencil and depth-related span functions for -reading/writing pixels from/to buffers has changed. Now, all pixels are -read/written through a set of common renderbuffer functions (methods). - -Most device drivers have been updated for these changes, but some haven't. - - - -To Do (someday) items ---------------------- - Switch to freeglut - Increase MAX_DRAWBUFFERS - driver hooks for BeginQuery/EndQuery - - - -Miscellaneous -------------- - -The main/get.c file is now generated with a Python script (get_gen.py). - - - -Driver Status ----------------------- --------------------- -XMesa (Xlib) implements OpenGL 1.5 -OSMesa (off-screen) implements OpenGL 1.5 -Glide (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.5 -DJGPP implements OpenGL 1.5 -GGI implements OpenGL 1.3 -BeOS implements OpenGL 1.5 -Allegro needs updating -D3D needs updating - - ----------------------------------------------------------------------- -$Id: RELNOTES-6.3,v 3.13 2005/07/21 15:57:29 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.3.1 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.3.1 deleted file mode 100644 index cc6e8be1b2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.3.1 +++ /dev/null @@ -1,49 +0,0 @@ - - Mesa 6.3.1 release notes - - July XX, 2005 - - PLEASE READ!!!! - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 6.3) designate new developmental releases. -Even numbered versions (such as 6.2) designate stable releases. - - - -DRI drivers ------------ - -This release includes the DRI drivers and GLX code for hardware rendering. - - - -Bug fixes ---------- - -Bugs fixed in 6.3.1 are listed in the VERSIONS file. - - - -Driver Status ----------------------- --------------------- -XMesa (Xlib) implements OpenGL 1.5 -OSMesa (off-screen) implements OpenGL 1.5 -Glide (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.5 -DJGPP implements OpenGL 1.5 -GGI implements OpenGL 1.3 -BeOS implements OpenGL 1.5 -Allegro needs updating -D3D needs updating - - ----------------------------------------------------------------------- -$Id: RELNOTES-6.3.1,v 3.1 2005/07/21 18:45:54 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.3.2 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.3.2 deleted file mode 100644 index f2d47bff19..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.3.2 +++ /dev/null @@ -1,37 +0,0 @@ - - Mesa 6.3.2 Release Notes - - August 19, 2005 - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 6.3) designate new developmental releases. -Even numbered versions (such as 6.2) designate stable releases. - - -6.3.2 is primarily a bug-fix release. See the VERSIONS file for details. - - - -Driver Status ----------------------- ---------------------- -DRI drivers varies with the driver -XMesa (Xlib) implements OpenGL 1.5 -OSMesa (off-screen) implements OpenGL 1.5 -Glide (3dfx Voodoo1/2) implements OpenGL 1.3 -SVGA implements OpenGL 1.3 -Wind River UGL implements OpenGL 1.3 -Windows/Win32 implements OpenGL 1.5 -DJGPP implements OpenGL 1.5 -GGI implements OpenGL 1.3 -BeOS implements OpenGL 1.5 -Allegro needs updating -D3D needs updating - - ----------------------------------------------------------------------- -$Id: RELNOTES-6.3.2,v 3.2 2005/08/19 16:57:50 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.4 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.4 deleted file mode 100644 index 5fa00b1d06..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.4 +++ /dev/null @@ -1,50 +0,0 @@ - - Mesa 6.4 Release Notes - - October 24, 2005 - - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 6.3) designate new developmental releases. -Even numbered versions (such as 6.4) designate stable releases. - - -6.4 is a bug-fix release. See the VERSIONS file for details. - - - -GLUT tarball ------------- - -Starting with 6.4, the GLUT library sources are distributed in a separate -tarball. This was done at the request of Linux distro vendors who prefer -to use freeglut. - - - - -Driver Status ----------------------- ---------------------- -DRI drivers varies with the driver -XMesa (Xlib) implements OpenGL 1.5 -OSMesa (off-screen) implements OpenGL 1.5 -Windows/Win32 implements OpenGL 1.5 -Glide (3dfx Voodoo1/2) requires updates -SVGA requires updates -DJGPP requires updates -GGI requires updates -BeOS requires updates -Allegro requires updates -D3D requires updates - -The drivers which require updates mostly need to be updated to work -with the new gl_renderbuffer / gl_framebuffer infrastructure introduced -in Mesa 6.3. - - ----------------------------------------------------------------------- -$Id: RELNOTES-6.4,v 1.1.2.5 2005/10/24 23:12:29 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.4.1 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.4.1 deleted file mode 100644 index 7af7380ce8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.4.1 +++ /dev/null @@ -1,47 +0,0 @@ - - Mesa 6.4.1 Release Notes - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 6.3) designate new developmental releases. -Even numbered versions (such as 6.4) designate stable releases. - - -6.4.1 is a bug-fix release. See the VERSIONS file for details. - - - -GLUT tarball ------------- - -Starting with 6.4, the GLUT library sources are distributed in a separate -tarball. This was done at the request of Linux distro vendors who prefer -to use freeglut. - - - - -Driver Status ----------------------- ---------------------- -DRI drivers varies with the driver -XMesa (Xlib) implements OpenGL 1.5 -OSMesa (off-screen) implements OpenGL 1.5 -Windows/Win32 implements OpenGL 1.5 -Glide (3dfx Voodoo1/2) requires updates -SVGA requires updates -DJGPP requires updates -GGI requires updates -BeOS requires updates -Allegro requires updates -D3D requires updates - -The drivers which require updates mostly need to be updated to work -with the new gl_renderbuffer / gl_framebuffer infrastructure introduced -in Mesa 6.3. - - ----------------------------------------------------------------------- -$Id: RELNOTES-6.4.1,v 1.1.2.1 2005/11/30 01:15:15 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.4.2 b/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.4.2 deleted file mode 100644 index a1ac8a3d6b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/RELNOTES-6.4.2 +++ /dev/null @@ -1,47 +0,0 @@ - - Mesa 6.4.2 Release Notes - - -Introduction ------------- - -Mesa uses an even/odd version number scheme like the Linux kernel. -Odd numbered versions (such as 6.3) designate new developmental releases. -Even numbered versions (such as 6.4) designate stable releases. - - -6.4.2 is a minor bug-fix release. See the VERSIONS file for details. - - - -GLUT tarball ------------- - -Starting with 6.4, the GLUT library sources are distributed in a separate -tarball. This was done at the request of Linux distro vendors who prefer -to use freeglut. - - - - -Driver Status ----------------------- ---------------------- -DRI drivers varies with the driver -XMesa (Xlib) implements OpenGL 1.5 -OSMesa (off-screen) implements OpenGL 1.5 -Windows/Win32 implements OpenGL 1.5 -Glide (3dfx Voodoo1/2) requires updates -SVGA requires updates -DJGPP requires updates -GGI requires updates -BeOS requires updates -Allegro requires updates -D3D requires updates - -The drivers which require updates mostly need to be updated to work -with the new gl_renderbuffer / gl_framebuffer infrastructure introduced -in Mesa 6.3. - - ----------------------------------------------------------------------- -$Id: RELNOTES-6.4.2,v 1.1.2.1 2006/02/01 18:05:08 brianp Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/VERSIONS b/nx-X11/extras/Mesa_6.4.2/docs/VERSIONS deleted file mode 100644 index 35fb461e07..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/VERSIONS +++ /dev/null @@ -1,1434 +0,0 @@ - - -Mesa Version History -==================== - -1.0 beta February 1995 - Initial release - -1.1 beta March 4, 1995 - Changes: - faster point and line drawing (2x faster) - more systems supported, better Makefiles - Renamed lib*.a files to avoid collisions - many small bug fixes - New: - pseudo-GLX functions added - new implementation of evaluators (eval2.c) - GLUT support - -1.1.1 beta March 7, 1995 - Changes: - Reverted from eval2.c to eval.c due to FPE on Linux - more speed improvements - more Makefile changes - -1.1.2 beta March 14, 1995 - New: - implementation of SGI's blending extensions - glXUseXFont implemented - added MESA_DEBUG environment variable support - Changes: - Using eval2.c again - more FPE-prevention checks (0-length normals are OK) - a few small bug fixes - much faster pixel logic ops! - faster transformation arithmetic - -1.1.3 beta March 31, 1995 - New: - gluScaleImage() and gluBuild2DMipMaps() implemented - Mesa widgets for Xt/Motif - blendEXT demos - added environment variables for selecting visuals - Changes: - almost all GLUT demos work correctly now - faster X device driver functions - more bug fixes - -1.1.4 beta April 20, 1995 - Bug fixes: - - missing #define SEEK_SET in src-tk/image.c - - compile glShadeModel into display lists - - fixed pow() domain error in src/light.c - - fixed "flickering bitmaps" in double buffer mode - - fixed tk.h and aux.h for C++ - - state of LIGHT_MODEL_LOCAL_VIEWER was inverted - New features: - - MUCH, MUCH nicer dithering in 8-bit RGB mode - - updated widgets and widget demos - - Implemented GLXPixmap functions - - Added GLU 1.1 and GLX 1.1 functions - - Changed the X/Mesa interface API, more versatile - - Implemented gluPartialDisk() - -1.2 May 22, 1995 - Bug fixes: - - IRIX 4.x makefile problem - - modified tk to share root colormap as needed - - gluLookAt normalization problem - - suppress Expose, NoExpose events in swapbuffers - - glBitmap() and glDrawPixels() clipping - New features: - - GL_BLEND, GL_MODULATE, GL_DECAL, and GL_REPLACE_EXT texture - modes implemented - - texture maps stored more efficiently - - texture maps can be compiled into display lists - - Bogdan Sikorski's GLU polygon tesselation code - - Linas Vepstas's sweep and extrusion library - - glXCreateContext()'s shareList parameter works as it's supposed to. - XMesaCreateContext() updated to accept a shareList parameter too. - - Mesa can be compiled with real OpenGL .h files - - MESA_BACK_BUFFER environment variable - - better GLX error checking - -1.2.1 June 22, 1995 - Bug fixes: - - X/Mesa double buffer window resize crash - - widgets now pass PointerMotion events - - X/Mesa incorrect default clear color and drawing color - - more robust X MIT-SHM support in X/Mesa - - glTexImage( format=GL_LUMINANCE ) didn't work - - GL_LINE mode polygons with line width > 1.0 could cause a crash - - numerous feedback bugs - - glReadPixels() from depth buffer was wrong - - error prone depth and stencil buffer allocation - New features: - - Preliminary Microsoft Windows driver - - Implemented a number of missing functions: glEvalCoord[12][df]v(), - glGet...(), etc. - - Added a few missing symbols to gl.h and glu.h - - Faster rendering of smooth-shaded, RGBA, depth-buffered polygons. - - Faster rendering of lines when width=2.0 - - Stencil-related functions now work in display lists - Changes: - - renamed aux.h as glaux.h (MS-DOS names can't start with aux) - - most filenames are in 8.3 format to accomodate MS-DOS - - use GLubytes to store arrays of colors instead of GLints - -1.2.2 August 2, 1995 - New features: - - texture mapped points and lines - - NURBS! (but not 100% complete) - - viewports may safely extend beyond window boundaries - - MESA_PRIVATE_CMAP environment variable - - Grayscale X display support - - two new demos: demos/gears.c and demos/shadow.c - - MachTen for Macintosh configuration - Bug fixes: - - glGet*(GL_DEPTH_BITS) returned bytes, not bits - - point, line, and bitmap rasterization suffered from roundoff errors - - fixed a division by zero error in line clippping - - occasional wrong default background color really fixed! - - glDepthFunc(GL_ALWAYS) with glDepthMask(GL_FALSE) didn't work - - gluBuild2DMipmaps malloc problem fixed - - view volume clipping of smooth shaded lines resulted in bad colors - Changes: - - new visual selection method in glXChooseVisual() - - improved GLU quadric functions - - call XSync for glFinish and XFlush for glFlush - - glVertex() calls now use a function pointer to avoid conditionals - - removed contrib directory from Mesa tar file (available on ftp site) - - AIX shared library support - - Removed GLUenum type as it's not in OpenGL - -1.2.3 September 26, 1995 - New features: - - Mesa header files now equivalent to SGI OpenGL headers - - Support for HP's Color Recovery dithering displays - - Faster vertex transformation - - Faster raster operations into X windows under certain conditions - - New configurations: HP w/ shared libs, Ultrix w/ GCC, Data General - - 4-bit visuals now supported - Bug fixes: - - glScissor bug fixed - - round-off errors in clipping lines against clip planes fixed - - byte swapping between hosts and display servers implemented - - glGetError() can be called without a current rendering context - - problem with accidentally culled polygons is fixed - - fixed some widget compilation problems - -1.2.4 November 17, 1995 - New features: - - More speed improvements (lighting, fogging, polygon drawing) - - Window system and OS-independent off-screen rendering - - Preliminary Fortran bindings - - glPolygonOffsetEXT implemented - - glColorMask and glIndexMask now fully implemented - - glPixelZoom implemented - - display lists fully implemented - - gamma correction - - dithering in 8-bit TrueColor/DirectColor visuals - Changes: - - Improved device driver interface - - tk.h renamed to gltk.h to avoid conflicts with Tcl's Tk - - Dithering support moved from core into device driver - Bug fixes: - - glEnable/Disable( GL_LIGHTING ) didn't always take effect - - glReadPixels byte swapping was broken - - glMaterial with pname==GL_AMBIENT_AND_DIFFUSE was broken - - duplicate glColor4b() prototype in GL/gl.h removed - - stripes in wave -ci demo fixed - - GL_LINEAR_MIPMAP_NEAREST had wrong value - - bugs in HP Color Recovery support fixed - - fixed bug when blending lines, points, bitmaps outside of window - -1.2.5 November 30, 1995 - New Features: - - updated MS Windows driver - - new implementation of StaticGray/GrayScale visual support - Bug fixes: - - pixelzooming with gamma correction or blending didn't work - - HP color recovery visual wasn't being picked by glXChooseVisual - - glClear didn't always observe glColorMask changes - - olympic and offset demos didn't compile on some Suns - - texcoord clamping wasn't correct - - a polygon optimization introduced an occasional sampling problem - -1.2.6 January 26, 1996 - New Features: - - faster line and polygon rendering under certain conditions. See - Performance Tips 9 and 10 in README - - profiling - - lighting is a bit faster - - better perspective corrected texture mapping - - Amiga AmiWin (X11) support - - preliminary Linux SVGA driver - Changes: - - now using a 16-bit depth buffer, faster, smaller - - GL_NORMALIZE is disabled by default - Bug fixes: - - projective texture mapping - - fixed a memory leak in the context destroy function - - GL_POLYGON with less than 3 vertices caused a crash - - glGet*() returned wrong result for GL_INDEX_MODE - - reading pixels from an unmapped X window caused a BadMatch error - -1.2.7 March 5, 1996 - New: - - faster lighting - - faster 16-bit TrueColor rendering on Linux - - faster 32-bit TrueColor rendering on Linux, HP, IBM - - non-depth-buffered XImage polygons are faster - - vertex array extension - - software alpha planes - - updated Macintosh driver - - new NeXT driver - - GLU quadric functions generate texture coordinates - - reflect.c demo - reflective, textured surface demo - Changes: - - gamma correction code moved into the X driver for better performance - Bug fixes: - - multiple glClipPlane()'s didn't work reliably - - glPolygonMode() didn't always work - - glCullFace( GL_FRONT_AND_BACK ) didn't work - - texture mapping with gamma correction was buggy - - floating point exceptions in texture coordinate interpolation - - XImage byte swapping didn't always work - - polygon edge flags weren't always used correctly - -1.2.8 May 22, 1996 - New: - - overlay planes on X servers with the SERVER_OVERLAY_VISUALS property - - better monochrome output - - more IRIX 6.x configurations - - more robust RGB mode color allocation - - added MESA_XSYNC environment variable - - GLX_MESA_pixmap_colormap and GLX_EXT_visual_info extensions - - GL_MESA_window_pos extension - - faster glReadPixels/glDrawPixels for GL_DEPTH and GL_UNSIGNED_SHORT - and GL_UNSIGNED_INT - - driver for prototype Cirrus Mondello 3-D board - - updated AmigaDOS driver - - a few small speed optimizations in polygon rendering - Changes: - - internal device driver interface modified to simplify device - driver implementations and to support hardware Z buffers - - several changes to the X/Mesa interface (xmesa.h) - Bug fixes: - - fixed pow(0,0) domain error triggered on some systems - - glStencilClear() in a display list caused an infinite loop - - glRasterPos*() was sometimes off by +/-0.5 in X and Y - - color masking and blending were performed in wrong order - - auxSolidCylinder() sometimes drew a wire-frame cylinder - - fixed file writing bug in osdemo.c - - pixel mapping didn't always work - - the GL_GEQUAL stencil func didn't work - - the GL_INVERT stencil op didn't work - - the stencil write mask didn't work - - glPush/PopAttrib() didn't do enough error checking - - glIsList() didn't always work correctly - -2.0 October 10, 1996 - New: - - Implements OpenGL 1.1 API functions - - all texture filtering modes supported (mipmapping) - - faster texture mapping, see Performance Tip 11 in README - - antialiased RGB points - - X support for line and polygon stippling - - glDrawBuffer( GL_FRONT_AND_BACK ) works - - util/ directory of useful stuff - - demos/texobj demo of texture objects - Changes: - - major internal changes for thread-safeness - - new device driver interface - - MESA_ALPHA env variable removed - - triangle rasterizer replaces polygon rasterizer - Bug fixes: - - glPopAttrib() bug - - glDrawBuffer(GL_NONE) works now - -2.1 December 14, 1996 - New: - - VMS support - - MS-DOS driver - - OpenStep support - - updated, combined Windows 95/NT driver - - implemented glGetLighti() and glGetTexGen*() - - GLX does garbage collection of ancillary buffers - Bug fixes: - - removed unused _EXT constants from gl.h - - fixed polygon offset bugs - - Z coordinates of clipped lines were incorrect - - glEdgeFlag() in display lists didn't always work - - glLight*() in display lists didn't work - - fixed X line stipple bugs (Michael Pichler) - - glXUseXfonts XFreeFont/XFreeFontInfo bug fixed - - fixed a feedback bug - - glTexGen*() now transforms GL_EYE_PLANE by inverse modelview matrix - - polygons were sometimes culled instead of clipped - - triangle rasterizer suffered from float/int overflow exceptions - - fixed FP underflow exception in lighting (specular exponent) - - glEnable/glDisable of GL_EXT_vertex_array enums didn't work - - fixed free(NULL) in GLU tesselator code - - using 24-bit color on some X servers resulted in garbage rendering - - 32-bit per pixel mode for XFree86 now works - - glRotate(a,0,0,0) gave unpredictable results - - GL_LINE_STRIP with > 480 vertices had occasional clipping problems - - 8-bit TrueColor GLXPixmap rendering incorrectly required a colormap - - glMaterial() wasn't ignored when GL_COLOR_MATERIAL was enabled - - glEnable(GL_COLOR_MATERIAL) followed by glColor() didn't work right - - accumulation buffer was limited to positive values - - projective textures didn't work - - selection buffer overflows weren't handled correctly - Changes: - - restored the GL_EXT_polygon_offset extension - - slightly faster RGB dithering - - the SVGA driver works again - - Amiga driver now distributed separately - - NeXT driver updated for Mesa 2.x - -2.2 March 14, 1997 - New: - - better color selection when dithering - - added GL_EXT_texture_object extension - - updated MS-DOS driver for DJGPP - - added openbsd make configuration - - faster dithered flat-shaded triangles - - various compilation problems with Motif widgets fixed - - gl.h, glx.h and glu.h name mangling option - - BeOS driver - - 3D texture mapping extension - - GL_MESA_resize_buffers extension - - morph3d, stex3d and spectex demos - - 3Dfx support - Bug fixes: - - glColorMaterial should finally work right in all respects - - linear interpolation of mipmap levels was incorrectly weighted - - readpix.c didn't compile on Macintosh - - GL_INVERT and related logic ops didn't work right - - glTexImage[12]D() didn't check its parameters consistantly - - fixed a memory leak in glTexImage[12]D() - - kludged around a SunOS 5.x/GCC compiler bug in the feedback code - - glReadPixels aborted instead of normally catching some errors - - a few 1.1 constants were missing or misnamed in gl.h - - glBegin(p); glBegin(q); didn't generate an error - - fixed a memory leak in GLX code - - clipping of concave polygons could cause a core dump - - 1-component alpha texture maps didn't work - - fixed a GLU polygon tesselator bug - - polygons with colinear vertices were sometimes culled - - feedback triangle colors were wrong when using smooth shading - - textures with borders didn't work correctly - - colors returned in feedback mode were wrong when using lighting - - spotlights didn't effect ambient lighting correctly - - gluPartialDisk() had a few bugs - Changes: - - device driver interface expanded to support texture mapping - - faster matrix inversion subroutine - - commented out #include "wmesa_extend.h" from src/wmesa.c - - fixed many compiler warnings in the demo programs - -2.3 June 30, 1997 - New: - - Mesa distribution divided into two pieces: library code and demos - - faster vertex transformation, clip testing, lighting - - faster line drawing - - TrueColor visuals how have dithering (for depths < 24 bits) - - added MESA_NO_DITHER environment variable - - new device driver function: NearFar(), RenderVB(), RasterSetup() - - added LynxOS configuration - - added cygnus Win32 configuration - - added texcyl.c GLUT demo - - added XMesaDitherColor() to X/Mesa interface - - new NURBS code from Bogdan Sikorski - - added demos/shape.c (non-rectangular X window!) - Bug fixes: - - glEnable/DisableClientState() were missing from GL/gl.h - - GL_SPHERE_MAP texcoord generation didn't work correctly - - glXGetConfig() returned wrong number of depth, stencil, accum bits - - glDrawPixels feedback/selection didn't examine RasterPos valid bit - - black and white were reversed on some monochrome displays - - fixed potential image memory leak (wasn't setting reference counter) - - glDrawPixels sometimes didn't recognize some GL state changes - - gluProject/UnProject() didn't check for divide by zero - - stex3d demo called random() and srandom(), not portable - - fixed memory leaks in context.c and drawpix.c - - fixed NULL dereferencing problem in gl_update_texture_state() - - glReadPixels between glBegin/glEnd didn't generate an error. - - fixed memory leak in polygon tesselator (Randy Frank) - - fixed seg fault bug drawing flat-shaded, depth-tested lines - - clipped GL_TRIANGLE_STRIPs sometimes had wrong color when flat-shaded - - glBindTexture sometimes didn't work - - fixed a bug deep in glXReleaseBuffersMESA() - - fog was mistakenly applied to alpha - - glPopMatrix didn't set "dirty matrix" flag - - glPolygonStipple pattern was sometimes wrong - - glClear wasn't disabled during feedback and selection - - fixed memory leak in glTexSubImage[123]D - Changes: - - many library source files reorganized - - faster X color allocation, colors also freed when finished with them - - new texture sampling function pointer in texture objects - - incorporated 3Dfx VooDoo driver v0.16 into main source tree - - many 3Dfx driver updates - - cygnus Makefiles now included - - updated DOS driver - - made a few changes to dosmesa.c and wmesa.c (VB->Unclipped) - - internally, colors now stored in GLubytes, not GLfixed - - optimized changing of GL_SHININESS parameter - -2.4 September 18, 1997 - New: - - updated 3Dfx Glide driver - - hacks for 3Dfx rendering into an X window or fullscreen - - added depth buffer access functions to X/Mesa and OS/Mesa interfaces - Bug fixes: - - pixel buffer could overflow with long, wide lines - - fixed FP underflow problems in lighting - - glTexSubImage1D() had an unitialized variable - - incomplete texture objects could cause a segfault - - glDrawPixels with GL_COMPILE_AND_EXECUTE caused infinite loop - - flat-shaded quads in a strip were miscolored if clipped - - mipmapped triangle lod computation now works correctly - - fixed a few under/overflow bugs in triangle rasterizer - - glArrayElement() assigned bad normal if normal array disabled - - changed argument to glXReleaseBuffersMESA() - - fixed small triangle underflow bugs in tritemp.h (hopefully) - - glBindTexture(target, 0) caused a crash - - glTexImage[123]D() with NULL image pointer caused crash - - glPixelStore parameters are now ignored during display list execution - - fixed a two-sided lighting w/ clipping bug (black vertices) - - textures with width!=height were sometimes mis-rendered - - "weird" projection matrices could cause div by 0, other fp errors - Changes: - - changed precompiled header symbol from PCH to PC_HEADER - - split api.c into api1.c and api2.c - - added hash.c source file (but not used yet) - - a few Sun and HP configuration file changes - - MESA_GLX_FX env var replaces MESA_FX_WINDOW and MESA_FX_FULLSCREEN - - fixed a few cygnus build problems (src/Makefile.cygnus, src/wmesa.c) - -2.5 November 20, 1997 - New: - - updated 3Dfx driver (v20) for GLQuake - - added GL_EXT_paletted_texture extension - - added GL_EXT_shared_texture_palette extension - - added GL_EXT_point_parameters extension - - now including Mark Kilgard's GLUT library v3.6 - - new GLUT-based demos in gdemos/ - - added a few more Unix config targets - - added Intel X86 assembly language vertex transformation code - - 3Dfx/Glide driver for Mesa now recognizes SST_SCREENREFRESH env var - - Windows 95 S3 Virge driver - Bug fixes: - - glCopyTexImage?D would crash due to uninitialized variable - - glColor w/ glColorMaterial in a display list caused a bug - - fixed several glDrawPixels() and ReadPixels() bugs in 3Dfx driver - - glVertex4*() vertices weren't always projected correctly - - trying to use mipmapped textured points or lines caused crash - - glColor[34][fd]() values now clamped to [0,1] before int conversion - Changes: - - new device driver functions for texture mapping - - hash tables used for display list and texture object lookup - - fixed GLX visual handling code to avoid saving redundant visuals - - 3Dfx Glide libraries automatically linked to libMesaGL.so - - dropped the Cirrus Logic Mondello code since it's obsolete - - updated Cygnus Makefiles (Stephane Rehel) - - updated Windows MSVC++ Makefiles (Oleg Letsinsky) - - procedure for making library files has changed: scripts now take - a major and minor version arguments. Make-config changed a lot. - - new implementation of glTexSubImage2D() - - updated widgets-mesa directory to create libMesaGLwM.a (Motif widget) - - separate linux-glide and linux-386-glide configurations - -2.6 February 12, 1998 - New: - - Windows WGL functions - - updated VMS, DOS, Windows, Cygnus, BeOS, Amiga compilation support - - v0.22 of 3Dfx Glide driver - - more X86 assembly language optimizations - - faster blending for some modes - - XMesaSetFXmode() to switch between 3Dfx window and full-screen mode - - added preliminary thread support - - added GLX_MESA_copy_sub_buffer extension - - some clipping optimizations - Bug fixes: - - fixed shading/material bug when drawing long primitive strips - - fixed clipping problem in long primitive strips - - fixed clipping bug when using 3Dfx driver - - fixed a problem when trying to use X fonts w/ 3Dfx driver - - fixed a texture filter bug in 3Dfx/Glide driver - - fixed bug in 3Dfx/Glide driver involving depth mask & clearing - - glLoadMatrix to set projection matrix confused the 3Dfx driver - - non-identity texture matrices didn't work with linux-386 configs - - glGenTextures() didn't reserve the returned texture IDs - - NULL proxy image sent to glTexImageXD() caused crash - - added texture state validation optimization (Henk Kok) - - fixed colormap reuse problem when using both RGB and CI windows - - 32bpp True/DirectColor X visuals weren't recognized - - fixed potential problem in evaluators memory allocation - - fixed assorted demo compilation bugs - Changes: - - replaced old Mesa/windows/ directory with Mesa/WIN32/ directory - - converted a few old glaux/gltk demos to GLUT - - renamed directories: demos -> xdemos, gdemos -> demos - - -3.0 September 17, 1998 - New: - - OpenGL 1.2 API - - GL_EXT_abgr pixel format extension - - GL_SGIS_texture_edge_clamp extension - - GL_SGIS_multitexture extension (to be replaced by GL_ARB_multitex) - - GL_EXT_multitexture extension (to be replaced by GL_ARB_multitex) - - GL_EXT_rescale_normal extension and renormal.c demo - - GLX_SGI_video_sync extension (a no-op) - - antialiased lines - - glGetTexImage() now implemented - - glDraw/Copy/ReadPixels() optimizations - - optimized textured triangle code (Marten Stromberg) - - more optimization of dithered TrueColor triangles in X driver - - Linux GGI driver - - updated MGL driver - Bug fixes: - - lots of assorted compilation fixes - - glInitNames didn't write initial hit record - - glBitmap didn't always check for invalid raster position - - switching between GLX and OSMesa contexts caused a crash - - fixed uninitialized variable in Mesa widget code - - fixed typo in texture code which caused book/texgen to crash - - fixed texture sampling bug when filter=GL_LINEAR and wrap=GL_CLAMP - - gluDisk() in POINT or LINE mode sometimes failed - - fixed texture + fog bug - - GL_COMPILE_AND_EXECUTE mode didn't work reliably - - glMultMatrix in projection matrix mode w/ 3Dfx driver could fail - - glDrawPixels(color index pixels) weren't converted to RGBA - - fixed possible getenv() buffer overflow security bug - - glBitmap in feedback mode was offset by xOrig, yOrig params - - device driver's DrawPixels hook was never used - - glDrawPixels with zoomY!=1 and top/bottom clipping didn't work - - glDrawPixels optimized for GL_LUMINANCE, GL_LUMINANCE_ALPHA, GLubyte - - fixed MakeCurrent bug in GLwRedrawObjects() in MesaWorkstation.c - - glCopyTexSubImage2D() didn't work with 3Dfx driver - - lines with width = 2 could cause crash - - glClear with scissor rect sometimes cleared whole buffer - - glTexSubImage2D( .. GL_COLOR_INDEX .. ) didn't work - - glTexImageXD( .. GL_ABGR_EXT .. ) didn't work - - computation of inverse modelview matrix sometimes failed - - fixed GL_CLAMP mode texture sampling bug - - textured line interpolation was somewhat broken - - textured triangle interpolation was also somewhat broken - - glGet(MODELVIEW/PROJECTION/TEXTURE_MATRIX_STACK_DEPTH) off by one - - evaluator state wasn't fully initialized - - texture coordinate clipping was buggy - - evaluator surfaces could be mis-colored - - glAccum(GL_RETURN, s) didn't obey glColorMask() settings - - zero area polygons shouldn't be culled if polygon mode is point/line - - clipped width and height of glReadPixels was sometimes off by one - - blending with alpha = 0 or 1.0 wasn't always exact - - reading of pixels from clipped region was buggy - - minor tweaking of X visual management in GLX emulator - - glPolygonStipple now obeys pixel unpacking parameters - - glGetPolygonStipple now obeys pixel packing parameters - - interleaved vertex array texture coordinates were broken - - query of proxy texture internal format was broken - - alpha channel wasn't reliably cleared - - fixed divide by zero error in gluScaleImage if dest size = 1 x 1 - Conformance bug fixes: - - GL_SELECTION_BUFFER_POINTER and GL_SELECTION_BUFFER_SIZE were missing - - GL_TEXTURE_INTERNAL_FORMAT was missing - - glGet*(GL_POLYGON_STIPPLE) was broken - - glPush/PopAttrib() didn't save/restore all texture state - - glBitmap in feedback mode didn't work - - feedback of texture coords didn't always work - - glDrawPixels w/ format=GL_DEPTH_COMPONENT, type=GLbyte was broke - - glDrawPixels w/ format=GL_DEPTH_COMPONENT, type=GLubyte was broke - - glDrawPixels w/ format=GL_STENCIL_INDEX, type=GL_BITMAP was broke - Changes: - - upgraded GLUT to version 3.7 - - only GL and GLU library code included in MesaLib.tar.gz - - GLUT and all demos now in MesaDemos.tar.gz - - glaux and gltk libraries removed - - IRIX -n32 and -64 libs go in lib32/ and lib64/ directories - - -3.1 beta 1 November 19, 1998 - New: - - GL_EXT_stencil_wrap extension - - GL_INGR_blend_func_separate extension - - GL_ARB_multitexture extension - - GL_NV_texgen_reflection extension - - newly optimized vertex transformation code - - updated GLUT 3.7 code - - better precision when using 32-bit Z buffer - - Allegro DJGPP driver - Bug fixes: - - glCopyPixels between front/back buffers didn't copy alpha correctly - - fixed out-of-bounds memory access in optimized 2-D texture code - - glPixelStorei didn't accept GL_PACK/UNPACK_IMAGE_HEIGHT parameter - - glGet*() didn't accept GL_MAX_3D_TEXTURE_SIZE parameter - - clipping of texture coordinates sometimes had bad R,Q values - - GL_CLAMP_TO_EDGE texture sampling was off by 0.5 texels - - glEdgeFlagPointer() now takes a GLvoid * instead of GLboolean * - - texture was sometimes applied twice with 3Dfx driver - - glPush/PopAttrib() fouled up texture object reference counts - - glDeleteLists(0, n) caused assertion failure - - bilinear texture sampling wasn't accurate enough - - glClear w/ glDepthMask(GL_FALSE) didn't work right on 3Dfx - - color components were reversed on big endian 32 bpp X visuals - Changes: - - removed GL_EXT_multitexture extension - - -3.1 beta 2 May 24, 1999 - New: - - multi-textured points and lines (mjk@nvidia.com) - - optimized 24bpp X rendering (bernd.paysan@gmx.de) - - added allegro support (bernie-t@geocities.com) - - cleaned-up Windows-related stuff (Ted Jump) - - minor stereo changes (KendallB@scitechsoft.com) - - new BeOS driver which implements BGLView class - - new Direct3D driver (see src/D3D) - - more efficient filled gluCylinder() function - - utilities: util/showbuffer.[ch] and util/glstate.[ch] - - fixed some IRIX compiler warnings - - added support for building Mesa in XFree86 with - SGI's GLX (kevin@precisioninsight.com) - Bug fixes: - - a variety of Windows/Mesa bug fixes (mjk@nvidia.com) - - packed pixel images weren't unpacked correctly - - patches some win32 files in GLUT (mjk@nvidia.com) - - glTexImage[123]D() didn't accept internalFormat == GL_COLOR_INDEX - - fixed lighting bug in Keith's new shading code - - fixed texture segfault seen in Lament screensaver - - fixed miscellaneous low-memory bugs - - glClear(GL_COLOR_BUFFER_BIT) with RGBA or CI masking was broken - - GL_LINEAR sampling of 3D textures was broken - - fixed SVR4 'cc' compiler macro problem (dawes@xfree86.org) - - added GL_TEXTURE_PRIORITY fix (keithh@netcomuk.co.uk) - - fixed wide point and wide line conformance bugs (brianp) - Changes: - - some device driver changes (see src/dd.h) - - new copyright on core Mesa code - - -3.1 beta 3 September 17, 1999 - New: - - optimized glAccum function - - optimized 24bpp rendering in XMesa driver - - GLU 1.2 polygon tessellator - Bug Fixes: - - glGetTexLevelParameter wasn't fully implemented - - glXUseXFont now handles multi-byte fonts - - glIsEnabled(GL_TEXTURE_2D / 3D) returned wrong result - - alpha channel of blending points, lines was sometimes incorrect - Changes: - - New library names: "libGL" instead of "libMesaGL" - - New library numbering: libGL.so.1.2.310 - - New subdirectories: docs/ and bin/ - - New Makefile-system (autoconf,automake,libtool) - - -3.1 final December 14, 1999 - New: - - added demos/gloss.c - - added xdemos/glxdpyinfo.c - - added GLX_ARB_get_proc_address extension - - rewritten glTexImage code paths (faster, less memory, bug fixes) - Bug Fixes: - - several vertex array bug fixes - - overlapping glCopyPixels with pixel zooming now works - - glXUseXFont() bitmaps were vertically shifted by one pixel - - glCopyPixels with pixel zooming now works - - -3.2 final April 24, 2000 - Bug fixes: - - fixed memcpy bugs in span.c - - fixed missing glEnd problem in demos/tessdemo.c - - fixed bug when clearing 24bpp Ximages - - fixed clipping problem found in Unreal Tournament - - fixed Loki's "ice bug" and "crazy triangles" seen in Heretic2 - - fixed Loki's 3dfx RGB vs BGR bug - - fixed Loki's 3dfx smooth/flat shading bug in SoF - Changes: - - updated docs/README file - - use bcopy() optimizations on FreeBSD - - re-enabled the optimized persp_textured_triangle() function - - -3.2.1 July 19, 2000 - Bug fixes: - - gluBuild2DMipmaps() didn't accept GL_BGRA - - Fixed compile/makefile problems on IRIX - - fixed segfault in 3dfx driver when using GL selection/feedback - - no longer cull very, very tiny triangles - - blending w/ drawbuffer==GL_FRONT_BACK caused segfault (sw rendering) - - fixed Motif detection code in widgets-mesa/configure.in - - glColorMaterial and glMaterial updates to emissive and ambient - didn't always work right - - Specular highlights weren't always in the right place - - clipped GL_LINE mode polygons had interior lines appear - - blend term GL_ONE_MINUS_CONSTANT_ALPHA was broken - - GL_NICEST fog didn't always work with flat shading - - glRect commands in display lists were sometimes miscolored - - Line Z offset didn't always work - - fixed texgen normal vector problem (gloss's teapot) - - numerous GL conformance bugs fixed - Changes: - - glColorMask(false, false, false, false) handled better/faster - - reverted to old GLU polygon tessellator, GLU 1.1 - - updated Win32 build files - - -3.3 July 21, 2000 - New: - - antialiased triangles now implemented - - GL_EXT_texture_env_add texture mode extension - - GLX 1.3 API - - support for separate draw/read buffers (ie GL_SGI_make_current_read) - - thread-safe API dispath - - improved glxinfo program - - demos/texdown program to measure texture download performance - - glext.h header file - - demos/geartrain program - - GL_EXT_texture_lod_bias extension - - demos/lodbias program - - further optimized glRead/DrawPixels for 16-bit TrueColor X visuals - - GLX_EXT_visual_rating extension (a no-op, however) - - GL_HP_occlusion_test extension (for X and OS/Mesa drivers) - - demos/occlude program - - GL_SGIS_pixel_texture and GL_SGIX_pixel_texture extensions - - demos/pixeltex program - - GL_SGI_color_matrix extension - - GL_SGI_color_table extension - - GL_EXT_histogram extension - - GL_ARB_texture_cube_map extension - - added xdemos/glxheads and xdemos/manywin - - demos/texenv.c demo - - GL_EXT_texture_env_combine extension (by Holger Waechtler) - - Xlib driver is now thread-safe (see xdemos/glthreads) - Bug Fixes: - - various GL conformance failures fixed since 3.2.1 - Changes: - - gl.h now uses #defines instead of C enums for all tokens - - glu.h now uses #defines instead of C enums for all tokens - - moved programs from 3Dfx/demos/ into demos/ directory - - -3.4 November 3, 2000 - New: - - optimized glDrawPixels for glPixelZoom(1,-1) - Bug Fixes: - - widgets-mesa/src/*.c files were missing from 3.3 distro - - include/GL/mesa_wgl.h file was missing from 3.3 distro - - fixed some Win32 compile problems - - texture object priorities weren't getting initialized to 1.0 - - glAreTexturesResident return value was wrong when using hardware - - glXUseXFont segfaulted when using 3dfx driver (via MESA_GLX_FX) - - glReadPixels with GLushort packed types was broken - - fixed a few bugs in the GL_EXT_texture_env_combine texture code - - glPush/PopAttrib(GL_ENABLE_BIT) mishandled multi-texture enables - - fixed some typos/bugs in the VB code - - glDrawPixels(GL_COLOR_INDEX) to RGB window didn't work - - optimized glDrawPixels paths weren't being used - - per-fragment fog calculation didn't work without a Z buffer - - improved blending accuracy, fixes Glean blendFunc test failures - - glPixelStore(GL_PACK/UNPACK_SKIP_IMAGES) wasn't handled correctly - - glXGetProcAddressARB() didn't always return the right address - - gluBuild[12]DMipmaps() didn't grok the GL_BGR pixel format - - texture matrix changes weren't always detected (GLUT projtex demo) - - fixed random color problem in vertex fog code - - fixed Glide-related bug that let Quake get a 24-bit Z buffer - Changes: - - finished internal support for compressed textures for DRI - - -3.4.1 February 14, 2001 - New: - - fixed some Linux build problems - - fixed some Windows build problems - - GL_EXT_texture_env_dot3 extension (Gareth Hughes) - Bug fixes: - - added RENDER_START/RENDER_FINISH macros for glCopyTexImage in DRI - - various state-update code changes needed for DRI bugs - - disabled pixel transfer ops in glColorTable commands, not needed - - fixed bugs in glCopyConvolutionFilter1D/2D, glGetConvolutionFilter - - updated sources and fixed compile problems in widgets-mesa/ - - GLX_PBUFFER enum value was wrong in glx.h - - fixed a glColorMaterial lighting bug - - fixed bad args to Read/WriteStencilSpan in h/w stencil clear function - - glXCopySubBufferMESA() Y position was off by one - - Error checking of glTexSubImage3D() was broken (bug 128775) - - glPopAttrib() didn't restore all derived Mesa state correctly - - Better glReadPixels accuracy for 16bpp color - fixes lots of OpenGL - conformance problems at 16bpp. - - clearing depth buffer with scissoring was broken, would segfault - - OSMesaGetDepthBuffer() returned bad bytesPerValue value - - fixed a line clipping bug (reported by Craig McDaniel) - - fixed RGB color over/underflow bug for very tiny triangles - Known problems: - - NURBS or evaluator surfaces inside display lists don't always work - - -3.4.2 May 17, 2001 - Bug fixes: - - deleting the currently bound texture could cause bad problems - - using fog could result in random vertex alpha values - - AA triangle rendering could touch pixels outside right window bound - - fixed byteswapping problem in clear_32bit_ximage() function - - fixed bugs in wglUseFontBitmapsA(), by Frank Warmerdam - - fixed memory leak in glXUseXFont() - - fragment sampling in AA triangle function was off by 1/2 pixel - - Windows: reading pixels from framebuffer didn't always work - - glConvolutionFilter2D could segfault or cause FP exception - - fixed segfaults in FX and X drivers when using tex unit 1 but not 0 - - GL_NAND logicop didn't work right in RGBA mode - - fixed a memory corruption bug in vertex buffer reset code - - clearing the softwara alpha buffer with scissoring was broken - - fixed a few color index mode fog bugs - - fixed some bad assertions in color index mode - - fixed FX line 'stipple' bug #420091 - - fixed stencil buffer clear width/height typo - - fixed GL error glitches in gl[Client]ActiveTextureARB() - - fixed Windows compilation problem in texutil.c - - fixed 1/8-pixel AA triangle sampling error - Changes: - - optimized writing mono-colored pixel spans to X pixmaps - - increased max viewport size to 2048 x 2048 - - -3.5 June 21, 2001 - New: - - internals of Mesa divided into modular pieces (Keith Whitwell) - - 100% OpenGL 1.2 conformance (passes all conformance tests) - - new AA line algorithm - - GL_EXT_convolution extension - - GL_ARB_imaging subset - - OSMesaCreateContextExt() function - - GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add) - - GL_MAX_TEXTURE_UNITS_ARB now defaults to eight - - GL_EXT_fog_coord extension (Keith Whitwell) - - GL_EXT_secondary_color extension (Keith Whitwell) - - GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add) - - GL_SGIX_depth_texture extension - - GL_SGIX_shadow and GL_SGIX_shadow_ambient extensions - - demos/shadowtex.c demo of GL_SGIX_depth_texture and GL_SGIX_shadow - - GL_ARB_texture_env_combine extension - - GL_ARB_texture_env_dot3 extension - - GL_ARB_texture_border_clamp (aka GL_SGIS_texture_border_clamp) - - OSMesaCreateContextExt() function - - libOSMesa.so library, contains the OSMesa driver interface - - GL/glxext.h header file for GLX extensions - - somewhat faster software texturing, fogging, depth testing - - all color-index conformance tests now pass (only 8bpp tested) - - SPARC assembly language TCL optimizations (David Miller) - - GL_SGIS_generate_mipmap extension - Bug Fixes: - - fbiRev and tmuRev were unitialized when using Glide3 - - fixed a few color index mode conformance failures; all pass now - - now appling antialiasing coverage to alpha after texturing - - colors weren't getting clamped to [0,1] before color table lookup - - fixed RISC alignment errors caused by COPY_4UBV macro - - drawing wide, flat-shaded lines could cause a segfault - - vertices now snapped to 1/16 pixel to fix rendering of tiny triangles - Changes: - - SGI's Sample Implementation (SI) 1.3 GLU library replaces Mesa GLU - - new libOSMesa.so library, contains the OSMesa driver interface - - -4.0 October 22, 2001 - New: - - Mesa 4.0 implements the OpenGL 1.3 specification - - GL_IBM_rasterpos_clip extension - - GL_EXT_texture_edge_clamp extension (aka GL_SGIS_texture_edge_clamp) - - GL_ARB_texture_mirrored_repeat extension - - WindML UGL driver (Stephane Raimbault) - - added OSMESA_MAX_WIDTH/HEIGHT queries - - attempted compiliation fixes for Solaris 5, 7 and 8 - - updated glext.h and glxext.h files - - updated Windows driver (Karl Schultz) - Bug fixes: - - added some missing GLX 1.3 tokens to include/GL/glx.h - - GL_COLOR_MATRIX changes weren't recognized by teximage functions - - glCopyPixels with scale and bias was broken - - glRasterPos with lighting could segfault - - glDeleteTextures could leave a dangling pointer - - Proxy textures for cube maps didn't work - - fixed a number of 16-bit color channel bugs - - fixed a few minor memory leaks - - GLX context sharing was broken in 3.5 - - fixed state-update bugs in glPopClientAttrib() - - fixed glDrawRangeElements() bug - - fixed a glPush/PopAttrib() bug related to texture binding - - flat-shaded, textured lines were broken - - fixed a dangling pointer problem in the XMesa code (Chris Burghart) - - lighting didn't always produce the correct alpha value - - fixed 3DNow! code to not read past end of arrays (Andrew Lewycky) - - -4.0.1 December 17, 2001 - New: - - better sub-pixel sample positions for AA triangles (Ray Tice) - - slightly faster blending for (GL_ZERO, GL_ONE) and (GL_ONE, GL_ZERO) - Bug fixes: - - added missing break statements in glGet*() for multisample cases - - fixed uninitialized hash table mutex bug (display lists / texobjs) - - fixed bad teximage error check conditional (bug 476846) - - fixed demos readtex.c compilation problem on Windows (Karl Schultz) - - added missing glGet() query for GL_MAX_TEXTURE_LOD_BIAS_EXT - - silence some compiler warnings (gcc 2.96) - - enable the #define GL_VERSION_1_3 in GL/gl.h - - added GL 1.3 and GLX 1.4 entries to gl_mangle.h and glx_mangle.h - - fixed glu.h typedef problem found with MSDev 6.0 - - build libGL.so with -Bsymbolic (fixes bug found with Chromium) - - added missing 'const' to glXGetContextIDEXT() in glxext.h - - fixed a few glXGetProcAddress() errors (texture compression, etc) - - fixed start index bug in compiled vertex arrays (Keith) - - fixed compilation problems in src/SPARC/glapi_sparc.S - - fixed triangle strip "parity" bug found in VTK medical1 demo (Keith) - - use glXGetProcAddressARB in GLUT to avoid extension linking problems - - provoking vertex of flat-shaded, color-index triangles was wrong - - fixed a few display list bugs (GLUT walker, molecule, etc) (Keith) - - glTexParameter didn't flush the vertex buffer (Ray Tice) - - feedback attributes for glDraw/CopyPixels and glBitmap were wrong - - fixed bug in normal length caching (ParaView lighting bug) - - fixed separate_specular color bug found in Chimera (18 Dec 2001) - - -4.0.2 April 2, 2002 - New: - - New DOS (DJGPP) driver written by Daniel Borca - - New driver interface functions for TCL drivers (such as Radeon DRI) - - GL_RENDERER string returns "Mesa Offscreen16" or "Mesa Offscreen32" - if using deep color channels - - latest GL/glext.h and GL/glxext.h headers from SGI - Bug fixes: - - GL_BLEND with non-black texture env color wasn't always correct - - GL_REPLACE with GL_RGB texture format wasn't always correct (alpha) - - glTexEnviv( pname != GL_TEXTURE_ENV_COLOR ) was broken - - glReadPixels was sometimes mistakenly clipped by the scissor box - - glDraw/ReadPixels didn't catch all the errors that they should have - - Fixed 24bpp rendering problem in Windows driver (Karl Schultz) - - 16-bit GLchan mode fixes (m_trans_tmp.h, s_triangle.c) - - Fixed 1-bit float->int conversion bug in glDrawPixels(GL_DEPTH_COMP) - - glColorMask as sometimes effecting glXSwapBuffers() - - fixed a potential bug in XMesaGarbageCollect() - - N threads rendering into one window didn't work reliably - - glCopyPixels didn't work for deep color channels - - improved 8 -> 16bit/channel texture image conversion (Gerk Huisma) - - glPopAttrib() didn't correctly restore user clip planes - - user clip planes failed for some perspective projections (Chromium) - Known bugs: - - mipmap LOD computation - - -4.0.3 June 25, 2002 - New: - - updated GL/glext.h file (version 15) - - corrected MMX blend code (Jose Fonseca) - - support for software-based alpha planes in Windows driver - - updated GGI driver (Filip Spacek) - Bug fixes: - - glext.h had wrong values for GL_DOT3_RGB[A]_EXT tokens - - OSMesaMakeCurrent() didn't recognize buffer size changes - - assorted conformance fixes for 16-bit/channel rendering - - texcombine alpha subtraction mode was broken - - fixed lighting bug with non-uniform scaling and display lists - - fixed bug when deleting shared display lists - - disabled SPARC cliptest assembly code (Mesa bug 544665) - - fixed a couple Solaris compilation/link problems - - blending clipped glDrawPixels didn't always work - - glGetTexImage() didn't accept packed pixel types - - glPixelMapu[is]v() could explode given too large of pixelmap - - glGetTexParameter[if]v() didn't accept GL_TEXTURE_MAX_ANISOTROPY_EXT - - glXCopyContext() could lead to segfaults - - glCullFace(GL_FRONT_AND_BACK) didn't work (bug 572665) - Changes: - - lots of C++ (g++) code clean-ups - - lots of T&L updates for the Radeon DRI driver - Known bugs: - - mipmap LOD computation (fixed for Mesa 4.1) - - -4.0.4 October 3, 2002 - New: - - GL_NV_texture_rectangle extension - - updated glext.h header (version 17) - - updated DOS driver (Daniel Borca) - - updated BeOS R5 driver (Philippe Houdoin) - - added GL_IBM_texture_mirror_repeat - - glxinfo now takes -l option to print interesting OpenGL limits info - - GL_MESA_ycbcr_texture extension - - GL_APPLE_client_storage extension (for some DRI drivers only) - - GL_MESA_pack_invert extension - Bug fixes: - - fixed GL_LINEAR fog bug by adding clamping - - fixed FP exceptions found using Alpha CPU - - 3dfx MESA_GLX_FX=window (render to window) didn't work - - fixed memory leak in wglCreateContest (Karl Schultz) - - define GLAPIENTRY and GLAPI if undefined in glu.h - - wglGetProcAddress didn't handle all API functions - - when testing for OpenGL 1.2 vs 1.3, check for GL_ARB_texture_cube_map - - removed GL_MAX_CONVOLUTION_WIDTH/HEIGHT from glGetInteger/Float/etc() - - error checking in compressed tex image functions had some glitches - - fixed AIX compile problem in src/config.c - - glGetTexImage was using pixel unpacking instead of packing params - - auto-mipmap generation for cube maps was incorrect - Changes: - - max texture units reduced to six to accomodate texture rectangles - - removed unfinished GL_MESA_sprite_point extension code - - -4.1 October 29, 2002 - New: - - GL_NV_vertex_program extension - - GL_NV_vertex_program1_1 extension - - GL_ARB_window_pos extension - - GL_ARB_depth_texture extension - - GL_ARB_shadow extension - - GL_ARB_shadow_ambient extension - - GL_EXT_shadow_funcs extension - - GL_ARB_point_parameters extension - - GL_ARB_texture_env_crossbar - - GL_NV_point_sprite extension - - GL_NV_texture_rectangle extension - - GL_EXT_multi_draw_arrays extension - - GL_EXT_stencil_two_side extension - - GLX_SGIX_fbconfig and GLX_SGIX_pbuffer extensions - - GL_ATI_texture_mirror_once extension (Ian Romanick) - - massive overhaul/simplification of software rasterizer module, - many contributions from Klaus Niederkrueger - - faster software texturing in some cases (i.e. trilinear filtering) - - new OSMesaGetProcAddress() function - - more blend modes implemented with MMX code (Jose Fonseca) - - added glutGetProcAddress() to GLUT - - added GLUT_FPS env var to compute frames/second in glutSwapBuffers() - - pbinfo and pbdemo PBuffer programs - - glxinfo -v prints transprent pixel info (Gerd Sussner) - Bug fixes: - - better mipmap LOD computation (prevents excessive blurriness) - - OSMesaMakeCurrent() didn't recognize buffer size changes - - assorted conformance fixes for 16-bit/channel rendering - - texcombine alpha subtraction mode was broken - - fixed some blend problems when GLchan==GLfloat (Gerk Huisma) - - clamp colors to [0,inf] in OSMesa if GLchan==GLfloat (Gerk Huisma) - - fixed divide by zero error in NURBS tessellator (Jon Perry) - - fixed GL_LINEAR fog bug by adding clamping - - fixed FP exceptions found using Alpha CPU - - 3dfx/glide driver render-to-window feature was broken - - added missing GLX_TRANSPARENT_RGB token to glx.h - - fixed error checking related to paletted textures - - fixed reference count error in glDeleteTextures (Randy Fayan) - Changes: - - New spec file and Python code to generate some GL dispatch files - - Glide driver defaults to "no" with autoconf/automake - - updated demos/stex3d with new options - - -5.0 November 13, 2002 - New: - - OpenGL 1.4 support (glGetString(GL_VERSION) returns "1.4") - - removed some overlooked debugging code - - glxinfo updated to support GLX_ARB_multisample - - GLUT now support GLX_ARB_multisample - - updated DOS driver (Daniel Borca) - Bug fixes: - - GL_POINT and GL_LINE-mode polygons didn't obey cull state - - fixed potential bug in _mesa_align_malloc/calloc() - - fixed missing triangle bug when running vertex programs - - fixed a few HPUX compilation problems - - FX (Glide) driver didn't compile - - setting GL_TEXTURE_BORDER_COLOR with glTexParameteriv() didn't work - - a few EXT functions, like glGenTexturesEXT, were no-ops - - a few OpenGL 1.4 functions like glFogCoord*, glBlendFuncSeparate, - glMultiDrawArrays and glMultiDrawElements were missing - - glGet*(GL_ACTIVE_STENCIL_FACE_EXT) was broken - - Pentium 4 Mobile was mistakenly identified as having 3DNow! - - fixed one-bit error in point/line fragment Z calculation - - fixed potential segfault in fakeglx code - - fixed color overflow problem in DOT3 texture env mode - - -5.0.1 March 30, 2003 - New: - - DOS driver updates from Daniel Borca - - updated GL/gl_mangle.h file (Bill Hoffman) - Bug fixes: - - auto mipmap generation for cube maps was broken (bug 641363) - - writing/clearing software alpha channels was unreliable - - minor compilation fixes for OS/2 (Evgeny Kotsuba) - - fixed some bad assertions found with shadowtex demo - - fixed error checking bug in glCopyTexSubImage2D (bug 659020) - - glRotate(angle, -x, 0, 0) was incorrect (bug 659677) - - fixed potential segfault in texture object validation (bug 659012) - - fixed some bogus code in _mesa_test_os_sse_exception_support (Linus) - - fix fog stride bug in tnl code for h/w drivers (Michel Danzer) - - fixed glActiveTexture / glMatrixMode(GL_TEXTURE) bug (#669080) - - glGet(GL_CURRENT_SECONDARY_COLOR) should return 4 values, not 3 - - fixed compilation problem on Solaris7/x86 (bug 536406) - - fixed prefetch bug in 3DNow! code (Felix Kuhling) - - fixed NeXT build problem (FABSF macro) - - glDrawPixels Z values when glPixelZoom!=1 were invalid (bug 687811) - - zoomed glDraw/CopyPixels with clipping sometimes failed (bug 689964) - - AA line and triangle Z values are now rounded, not truncated - - fixed color interpolation bug when GLchan==GLfloat (bug 694461) - - glArePrograms/TexturesResident() wasn't 100% correct (Jose Fonseca) - - fixed a minor GL_COLOR_MATERIAL bug - - NV vertex program EXP instruction was broken - - glColorMask misbehaved with X window / pixmap rendering - - fix autoconf/libtool GLU C++ linker problem on Linux (a total hack) - - attempt to fix GGI compilation problem when MesaDemos not present - - NV vertex program ARL-relative fetches didn't work - Changes: - - use glPolygonOffset in gloss demo to avoid z-fighting artifacts - - updated winpos and pointblast demos to use ARB extensions - - disable SPARC normal transformation code (bug 673938) - - GLU fixes for OS/2 (Evgeny Kotsuba) - - -5.0.2 September 5, 2003 - Bug fixes: - - fixed texgen problem causing texcoord's Q to be zero (stex3d) - - default GL_TEXTURE_COMPARE_MODE_ARB was wrong - - GL_CURRENT_MATRIX_NV query was wrong - - GL_CURRENT_MATRIX_STACK_DEPTH_NV query was off by one - - GL_LIST_MODE query wasn't correct - - GL_FOG_COORDINATE_SOURCE_EXT query wasn't supported - - GL_SECONDARY_COLOR_ARRAY_SIZE_EXT query returned wrong value - - blended, wide lines didn't always work correctly (bug 711595) - - glVertexAttrib4svNV w component was always 1 - - fixed bug in GL_IBM_rasterpos_clip (missing return) - - GL_DEPTH_TEXTURE_MODE = GL_ALPHA didn't work correctly - - a few Solaris compilation fixes - - fixed glClear() problem for DRI drivers (non-existant stencil, etc) - - fixed int/REAL mixup in GLU NURBS curve evaluator (Eric Cazeaux) - - fixed delete [] bug in SI GLU (bug 721765) (Diego Santa Cruz) - - glFog() didn't clamp fog colors - - fixed bad float/int conversion for GL_TEXTURE_PRIORITY in the - gl[Get]TexParameteri[v] functions - - fixed invalid memory references in glTexGen functions (bug 781602) - - integer-valued color arrays weren't handled correctly - - glDrawPixels(GL_DEPTH_COMPONENT) with glPixelZoom didn't work - - GL_EXT_texture_lod_bias is part of 1.4, overlooked in 5.0.1 - Changes: - - build GLUT with -fexceptions so C++ apps propogate exceptions - - -5.1 December 17, 2003 - New: - - reorganized directory tree - - GL_ARB_vertex/fragment_program extensions (Michal Krol & Karl Rasche) - - GL_ATI_texture_env_combine3 extension (Ian Romanick) - - GL_SGI_texture_color_table extension (Eric Plante) - - GL_NV_fragment_program extension - - GL_NV_light_max_exponent extension - - GL_EXT_texture_rectangle (identical to GL_NV_texture_rectangle) - - GL_ARB_occlusion_query extension - - GL_ARB_point_sprite extension - - GL_ARB_texture_non_power_of_two extension - - GL_IBM_multimode_draw_arrays extension - - GL_EXT_texture_mirror_clamp extension (Ian Romanick) - - GL_ARB_vertex_buffer_object extension - - new X86 feature detection code (Petr Sebor) - - less memory used for display lists and vertex buffers - - demo of per-pixel lighting with a fragment program (demos/fplight.c) - - new version (18) of glext.h header - - new spriteblast.c demo of GL_ARB_point_sprite - - faster glDrawPixels in X11 driver in some cases (see RELNOTES-5.1) - - faster glCopyPixels in X11 driver in some cases (see RELNOTES-5.1) - Bug fixes: - - really enable OpenGL 1.4 features in DOS driver. - - fixed issues in glDrawPixels and glCopyPixels for very wide images - - glPixelMapf/ui/usv()'s size parameter is GLsizei, not GLint - - fixed some texgen bugs reported by Daniel Borca - - fixed wglMakeCurrent(NULL, NULL) bug (#835861) - - fixed glTexSubImage3D z-offset bug (Cedric Gautier) - - fixed RGBA blend enable bug (Ville Syrjala) - - glAccum is supposed to be a no-op in selection/feedback mode - - fixed texgen bug #597589 (John Popplewell) - Changes: - - dropped API trace feature (src/Trace/) - - documentation overhaul. merged with website content. more html. - - glxgears.c demo updated to use GLX swap rate extensions - - glTexImage1/2/3D now allows width/height/depth = 0 - - disable SPARC asm code on Linux (bug 852204) - - -6.0 January 16, 2004 - New: - - full OpenGL 1.5 support - - updated GL/glext.h file to version 21 - Changes: - - changed max framebuffer size to 4Kx4K (MAX_WIDTH/HEIGHT in config.h) - Bug fixes: - - fixed bug in UNCLAMPED_FLOAT_TO_UBYTE macro; solves a color - clamping issue - - updated suno5-gcc configs - - glColor3 functions sometimes resulted in undefined alpha values - - fixed FP divide by zero error seen on VMS with xlockmore, others - - fixed vertex/fragment program debug problem (bug 873011) - - building on AIX with gcc works now - - glDeleteProgramsARB failed for ARB fragment programs (bug 876160) - - glDrawRangeElements tried to modify potentially read-only storage - - updated files for building on Windows - - -6.0.1 April 2, 2004 - New: - - upgraded glext.h to version 22 - - new build targets (Dan Schikore) - - new linux-x86-opteron build target (Heath Feather) - Bug fixes: - - glBindProgramARB didn't update all necessary state - - fixed build problems on OpenBSD - - omit CVS directories from tarballs - - glGetTexImage(GL_COLOR_INDEX) was broken - - fixed an infinite loop in t&l module - - silenced some valgrind warnings about using unitialized memory - - fixed some compilation/link glitches on IRIX (Mike Stephens) - - glBindProgram wasn't getting compiled into display lists - - GLX_FBCONFIG_ID wasn't recognized in glXChooseFBConfig() (bug 888079) - - two-sided lighting and vertex program didn't work (bug 887330) - - stores to program parameter registers in vertex state programs - didn't work. - - fixed glOrtho bug found with gcc 3.2.2 (RH9) - - glXCreateWindow() wasn't fully implemented (bug 890894) - - generic vertex attribute arrays didn't work in display lists - - vertex buffer objects' default usage and access fields were wrong - - glDrawArrays with start!=0 was broken - - fragment program PK2H, UP2H, UP4B and UP4UB instructions were broken - - linux-osmesa16-static config didn't work - - fixed a few color index rendering problems (bug 910687) - - glInterleavedArrays didn't respect GL_CLIENT_ACTIVE_TEXTURE - - OSMesa RGB and BGR modes were broken - - glProgramStringARB mistakenly required a null-terminated string - - fragment program XPD instruction was incorrect - - glGetMaterial() didn't work reliably - - ARB_fragment_program KIL instruction was incorrect - - -6.1 August 18, 2004 - New: - - Revamped Makefile system - - glXUseRotatedXFont() utility (see xdemos/xuserotfont.c) - - internal driver interface changes related to texture object - allocation, vertex/fragment programs, BlendEquationSeparate, etc. - - option to walk triangle edges with double-precision floats - (Justin Novosad of Discreet) (see config.h file) - - support for AUX buffers in software GLX driver - - updated glext.h to version 24 and glxext.h to version 6 - - new MESA_GLX_FORCE_ALPHA and MESA_GLX_DEPTH_BITS env vars - - updated BeOS support (Philippe Houdoin) - Changes: - - fragment fog interpolation is perspective corrected now - - new glTexImage code, much cleaner, may be a bit faster - Bug fixes: - - glArrayElement in display lists didn't handle generic vertex attribs - - glFogCoord didn't always work properly - - ARB_fragment_program fog options didn't work - - frag prog TEX instruction no longer incorrectly divides s,t,r by q - - ARB frag prog TEX and TEXP instructions now use LOD=0 - - glTexEnviv in display lists didn't work - - glRasterPos didn't do texgen or apply texture matrix - - GL_DOUBLE-valued vertex arrays were broken in some cases - - fixed texture rectangle edge/border sampling bugs - - sampling an incomplete texture in a fragment program would segfault - - glTexImage was missing a few error checks - - fixed some minor glGetTexParameter glitches - - GL_INTENSITY was mistakenly accepted as a to glTexImage - - fragment program writes to RC/HC register were broken - - fixed a few glitches in GL_HP_occlusion_test extension - - glBeginQueryARB and glEndQueryARB didn't work inside display lists - - vertex program state references were broken - - fixed triangle color interpolation bug on AIX (Shane Blackett) - - fixed a number of minor memory leaks (bug #1002030) - - -6.2 October 2, 2004 - New: - - enabled GL_ARB_texture_rectangle (same as GL_NV_texture_rectangle) - - updated Doxygen support (Jose Fonseca) - Changes: - - some GGI driver updates (Christoph Egger, bug 1025977) - Bug fixes: - - Omit GL_ARB_texture_non_power_of_two from list of OpenGL 1.5 features - - fixed a few compilation issues on IRIX - - fixed a matrix classification bug (reported by Wes Bethel) - - we weren't reseting the vertex/fragment program error state - before parsing (Dave Reveman) - - adjust texcoords for sampling texture rectangles (Dave Reveman) - - glGet*(GL_MAX_VERTEX_ATTRIBS_ARB) wasn't implemented - - repeated calls to glDeleteTexture(t) could lead to a crash - - fixed potential ref count bugs in VBOs and vertex/fragment programs - - spriteblast demo didn't handle window size changes correctly - - glTexSubImage didn't handle pixels=NULL correctly for PBOs - - fixed color index mode glDrawPixels bug (Karl Schultz) - - -6.2.1 December 9, 2004 - Bug fixes: - - don't apply regular fog or color sum when using a fragment program - - glProgramEnvParameter4fARB always generated an error on - GL_FRAGMENT_PROGRAM_ARB (fdo bug 1645) - - glVertexAttrib3svNV and glVertexAttrib3svARB were broken - - fixed width/height mix-up in glSeparableFilter2D() - - fixed regression in glCopyPixels + convolution - - glReadPixels from a clipped front color buffer didn't always work - - glTexImage didn't accept GL_RED/GREEN/BLUE as the format - - Attempting queries/accesses of VBO 0 weren't detected as errors - - paletted textures failed if the palette had fewer than 256 entries - Changes: - - fixed a bunch of compiler warnings found with gcc 3.4 - - bug reports should to go bugzilla.freedesktop.org - - -6.3 July 20, 2005 - New: - - GL_EXT_framebuffer_object extension - - GL_ARB_draw_buffers extension - - GL_ARB_pixel_buffer_object extension - - GL_OES_read_format extension (Ian Romanick) - - DirectFB driver (Claudio Ciccani) - - x86_64 vertex transformation code (Mikko T.) - - Updated GL/glext.h to version 29 - Changes: - - added -stereo option for glxgears demo (Jacek Rosik) - - updated the PBuffer demo code in xdemos/ directory - - glDeleteTextures/Programs/Buffers() now makes the object ID - available for immediate re-use - - assorted 64-bit clean-ups fixes (x86_64 and Win64) - - lots of internal changes for GL_EXT_framebuffer_object - Bug fixes: - - some functions didn't support PBO functionality - - glGetTexImage didn't convert color index images to RGBA as required - - fragment program texcoords were sometimes wrong for points and lines - - fixed problem with negative dot product in arbfplight, fplight demos - - fixed bug in perspective correction of antialiased, textured lines - - querying GL_POST_CONVOLUTION_ALPHA_BIAS_EXT returned wrong value - - fixed a couple per-pixel fog bugs (Soju Matsumoto) - - glGetBooleanv(GL_FRAGMENT_PROGRAM_BINDING_NV) was broken - - fixed float parsing bug in ARB frag/vert programs (bug 2520) - - XMesaGetDepthBuffer() returned incorrect value for bytesPerValue - - GL_COLOR_MATERIAL with glColor3 didn't properly set diffuse alpha - - glXChooseFBConfig() crashed if attribList pointer was NULL - - program state.light[n].spot.direction.w was wrong value (bug 3083) - - fragment program fog option required glEnable(GL_FOG) - wrong. - - glColorTable() could produce a Mesa implementation error (bug 3135) - - RasterPos could get corrupted by color index rendering path - - Removed bad XTranslateCoordinates call when rendering to Pixmaps - - glPopAttrib() didn't properly restore GL_TEXTURE_GEN enable state - - fixed a few Darwin compilation problems - - -6.3.1 - This was an intermediate release for X.org which wasn't otherwise released. - - -6.3.2 August 19, 2005 - New: - - The distribution now includes the DRI drivers and GLX code - Changes: - - Made the DRI "new" driver interface standard, remove old code - Bug fixes: - - GL_ARB_vertex/fragment_shader were mistakenly listed in the - extensions string - - negative relative addressing in vertex programs was broken - - update/fix SPARC assembly code for vertex transformation - - fixed memory leak when freeing GLX drawables/renderbuffers - - fixed display list memory leak - - the GL_PIXEL_MAP_I_TO_I table is now floating point, not integer - - wglGetProcAddress() didn't handle wgl-functions - - fixed glxext.h cross-compile issue (Colin Harrison) - - assorted DRI driver fixes - - -6.4 October 24, 2005 - New: - - Added a fast XOR line drawing function in Xlib driver - - Added support for GL_ARB_texture_mirrored_repeat to savage - driver (supported only on Savage4 hardware). - Changes: - - Mesa now packaged in three parts: Library, Demos and GLUT - Bug fixes: - - GLX_X_RENDERABLE token wasn't accepted by glXChooseFBConfig - - Some files were present multiple times in the 6.3.2 tarballs - - r200_vtxtmp_x86.S file was missing from 6.3.2 tarball (bug 4207) - - glxgears_fbconfig demo didn't work (bug 4237) - - fixed bug when bilinear sampling 2d textures with borders - - glXCreatePbuffer() could segfault instead of returning 0 (bug 4235) - - fixed undefined frexp and rand in X.org libGLcore.a (bug 4242) - - fixed a few problems with proxy color tables (bug 4270) - - fixed precision problem in Z clearing (bug 4395) - - glBitmap, glDraw/CopyPixels mistakenly generated selection hits - - fixed potential segfault caused by reading pixels outside - of renderbuffer bounds - - glGetTexLevelParameter didn't accept GL_TEXTURE_DEPTH_SIZE_ARB - - fixed memory corruption bug involving software alpha buffers - - glReadPixels clipped by window bounds was sometimes broken - - glDraw/CopyPixels of stencil data ignored the stencil write mask - - glReadPixels from a texture bound to a framebuffer object didn't work - - glIsRender/FramebufferEXT weren't totally correct - - fixed a number of point size attenuation/fade bugs - - fixed glFogCoord bug 4729 - - GLX encoding for transpose matrix functions was broken - - fixed broken fragment program KIL and SWZ instructions - - fragment programs that wrote result.depth.z didn't work - - -6.4.1 November 30, 2005 - Bug fixes: - - redefining a vertex program string didn't take effect in TNL module - - fixed occasional segfault upon vertex/fragment parsing error - - vertex program LIT instruction didn't handle 0^0=1 correctly - - fragment program fog option didn't work with glDrawPixels, glBitmap - - USE_MGL_NAMESPACE didn't work for x86-64 - - OSMesa demos were missing from previous release tarballs - - fixed problem with float->ushort conversion in glClear (bug 4992) - - popping of GL_EYE_PLANE texgen state was broken (bug 4996) - - popping of GL_SPOT_DIRECTION light state was broken (bug 5005) - - fixed occasional triangle color interpolation problem on VMS - - work around invalid free() call (bug 5131) - - fixed BSD X server compilation problem by including stdint.h - - -6.4.2 February 2, 2006 - New: - - added OSMesaColorClamp() function/feature - - added wglGetExtensionStringARB() function - Bug fixes: - - fixed some problems when building on Windows - - GLw header files weren't installed by installmesa script (bug 5396) - - GL/glfbdev.h file was missing from tarballs - - fixed TNL initialization bug which could lead to crash (bug 5791) diff --git a/nx-X11/extras/Mesa_6.4.2/docs/banner.html b/nx-X11/extras/Mesa_6.4.2/docs/banner.html deleted file mode 100644 index 9cb27bb6d1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/banner.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - Banner - - -
- - - - - - - - -
-

-
The -Mesa 3D Graphics Library -

-
-


-

-
- - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/bugs.html b/nx-X11/extras/Mesa_6.4.2/docs/bugs.html deleted file mode 100644 index d255f4292c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/bugs.html +++ /dev/null @@ -1,49 +0,0 @@ - - -Mesa Bug Reporting - - - - - -

Bug Database

- -

-The Mesa bug database is now hosted on -freedesktop.org -instead of SourceForge. -

- -

-To file a Mesa bug, go to - -Bugzilla on freedesktop.org -

- -

-Please follow these bug reporting guidelines: -

- -
    -
  • Make sure you're using the most recent version of Mesa -
  • Make sure your bug isn't already reported -
  • Include as much information as possible in the report -
  • Provide a simple GLUT-based test program if possible -
  • Check back for follow-ups to the report -
- -

-Bug reports will automatically be forwarded to the Mesa developer's mailing -list. -

- -

-The easier a bug is to reproduce, the sooner it will be fixed. -Please do everything you can to facilitate quickly fixing bugs. -If your bug report is vague or your test program doesn't compile -easily, the problem may not be fixed very quickly. -

- - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/conform.html b/nx-X11/extras/Mesa_6.4.2/docs/conform.html deleted file mode 100644 index 3611f8c6fb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/conform.html +++ /dev/null @@ -1,695 +0,0 @@ - - -Conformance - - - - - -

Conformance

- -

-The SGI OpenGL conformance tests verify correct operation of OpenGL -implementations. I, Brian Paul, have been given a copy of the tests -for testing Mesa. The tests are not publically available. -

-

-This file has the latest results of testing Mesa with the OpenGL 1.2 -conformance tests. Testing with the preliminary OpenGL 1.3 tests has -also been done. Mesa passes all the 1.3 tests. -

-

-The tests were run using the software X11 device driver on 24-bpp -and 16-bpp displays. -

-

-Mesa 4.0 and later pass all conformance tests at all path levels. -Note that this says nothing about the conformance of hardware drivers -based upon Mesa. -

- - -
-
-COVERAGE TESTS
---------------
-
-Test that all API functions accept the legal parameters and reject
-illegal parameters.  The result of each test is either pass or fail.
-
-% covgl
-OpenGL Coverage Test.
-Version 1.2
-
-covgl passed.
-
-covgl passed at 1.1 level.
-
-covgl passed at 1.2 level.
-
-covgl passed for ARB_multitexture.
-
-
-% covglu
-OpenGL GLU Coverage Test.
-Version 1.3
-
-covglu passed.
-
-covglu passed at 1.1 level.
-
-
-% covglx
-OpenGL X Coverage Test.
-Version 1.1.1
-
-covglx passed.
-
-
-% primtest -v
-Open GL Primitives Test.
-Version 1.2
-
-[lots of output deleted]
-
-292159 Combinations.
-primtest passed.
-
-
-
-
-GL CONFORMANCE TEST
-===================
-
-Render test images, read them back, then test for expected results.
-
-
-----------------------------------------------------------------------
-% conform -v 2
-
-OpenGL Conformance Test
-Version 1.2
-
-Setup Report.
-    Verbose level = 2.
-    Random number seed = 1.
-    Path inactive.
-
-Visual Report.
-    Display ID = 35. Indirect Rendering.
-    Double Buffered.
-    RGBA (5, 6, 5, 0).
-    Stencil (8).
-    Depth (16).
-    Accumulation (16, 16, 16, 16).
-
-Epsilon Report.
-    zero error epsilon = 0.000122.
-    RGBA error epsilon = 0.0324, 0.016, 0.0324, 0.000122.
-    Depth buffer error epsilon = 0.000137.
-    Stencil plane error epsilon = 0.00404.
-    Accumulation error epsilon = 0.000137, 0.000137, 0.000137, 0.000137.
-
-Default State test passed.
-Must Pass test passed.
-Divide By Zero test passed.
-Viewport Clamp test passed.
-Matrix Stack test passed.
-Matrix Stack Mixing test passed.
-Vertex Order test passed.
-Transformations test passed.
-Transformation Normal test passed.
-Viewport Transformation test passed.
-Buffer Clear test passed.
-Buffer Corners test passed.
-Buffer Color test passed.
-Color Ramp test passed.
-Mask test passed.
-Buffer Invariance test passed.
-Accumulation Buffer test passed.
-Select test passed.
-Feedback test passed.
-Scissor test passed.
-Alpha Plane Function test passed.
-Stencil Plane Clear test passed.
-Stencil Plane Corners test passed.
-Stencil Plane Operation test passed.
-Stencil Plane Function test passed.
-Depth Buffer Clear test passed.
-Depth Buffer Function test passed.
-Blend test passed.
-Dither test passed.
-LogicOp Function test does not exist for an RGB visual.
-DrawPixels test passed.
-CopyPixels test passed.
-Bitmap Rasterization test passed.
-Point Rasterization test passed.
-Anti-aliased Point test passed.
-Line Rasterization test passed.
-Line Stipple test passed.
-Anti-aliased Line test passed.
-Horizontal and Vertical Line test passed.
-Triangle Rasterization test passed.
-Triangle Tile test passed.
-Triangle Stipple test passed.
-Anti-aliased Triangles test passed.
-Quad Rasterization test passed.
-Polygon Face test passed.
-Polygon Cull test passed.
-Polygon Stipple test passed.
-Polygon Edge test passed.
-Ambient Material test passed.
-Ambient Scene test passed.
-Attenuation Position test passed.
-Diffuse Light test passed.
-Diffuse Material test passed.
-Diffuse Material Normal test passed.
-Diffuse Material Positioning test passed.
-Emissive Material test passed.
-Specular Exponent test passed.
-Specular Exponent Normal test passed.
-Specular Local Eye Half Angle test passed.
-Specular Light test passed.
-Specular Material test passed.
-Specular Normal test passed.
-Spot Positioning test passed.
-Spot Exponent and Positioning test passed.
-Spot Exponent and Direction test passed.
-Fog Exponential test passed.
-Fog Linear test passed.
-Texture Decal test passed.
-Texture Border test passed.
-Mipmaps Selection test passed.
-Mipmaps Interpolation test passed.
-Display Lists test passed.
-Evaluator test passed.
-Evaluator Color test passed.
-Texture Edge Clamp test passed.
-Packed Pixels test passed.
-Texture LOD test passed.
-Rescale Normal test passed.
-Color Table test passed.
-Convolution test passed.
-Convolution Border test passed.
-Histogram test passed.
-MinMax test passed.
-MultiTexture test passed.
-
-Conform passed.
-
-----------------------------------------------------------------------
-% conform -v 2 -p 1
-
-OpenGL Conformance Test
-Version 1.2
-
-Setup Report.
-    Verbose level = 2.
-    Random number seed = 1.
-    Path level = 1.
-
-Visual Report.
-    Display ID = 35. Indirect Rendering.
-    Double Buffered.
-    RGBA (5, 6, 5, 0).
-    Stencil (8).
-    Depth (16).
-    Accumulation (16, 16, 16, 16).
-
-Epsilon Report.
-    zero error epsilon = 0.000122.
-    RGBA error epsilon = 0.0324, 0.016, 0.0324, 0.000122.
-    Depth buffer error epsilon = 0.000137.
-    Stencil plane error epsilon = 0.00404.
-    Accumulation error epsilon = 0.000137, 0.000137, 0.000137, 0.000137.
-
-Default State test passed.
-Must Pass test passed.
-Divide By Zero test passed.
-Viewport Clamp test passed.
-Matrix Stack test passed.
-Matrix Stack Mixing test passed.
-Vertex Order test passed.
-Transformations test passed.
-Transformation Normal test passed.
-Viewport Transformation test passed.
-Buffer Clear test passed.
-Buffer Corners test passed.
-Buffer Color test passed.
-Color Ramp test passed.
-Mask test passed.
-Buffer Invariance test passed.
-Accumulation Buffer test passed.
-Select test passed.
-Feedback test passed.
-Scissor test passed.
-Alpha Plane Function test passed.
-Stencil Plane Clear test passed.
-Stencil Plane Corners test passed.
-Stencil Plane Operation test passed.
-Stencil Plane Function test passed.
-Depth Buffer Clear test passed.
-Depth Buffer Function test passed.
-Blend test passed.
-Dither test passed.
-LogicOp Function test does not exist for an RGB visual.
-DrawPixels test passed.
-CopyPixels test passed.
-Bitmap Rasterization test passed.
-Point Rasterization test passed.
-Anti-aliased Point test passed.
-Line Rasterization test passed.
-Line Stipple test passed.
-Anti-aliased Line test passed.
-Horizontal and Vertical Line test passed.
-Triangle Rasterization test passed.
-Triangle Tile test passed.
-Triangle Stipple test passed.
-Anti-aliased Triangles test passed.
-Quad Rasterization test passed.
-Polygon Face test passed.
-Polygon Cull test passed.
-Polygon Stipple test passed.
-Polygon Edge test passed.
-Ambient Material test passed.
-Ambient Scene test passed.
-Attenuation Position test passed.
-Diffuse Light test passed.
-Diffuse Material test passed.
-Diffuse Material Normal test passed.
-Diffuse Material Positioning test passed.
-Emissive Material test passed.
-Specular Exponent test passed.
-Specular Exponent Normal test passed.
-Specular Local Eye Half Angle test passed.
-Specular Light test passed.
-Specular Material test passed.
-Specular Normal test passed.
-Spot Positioning test passed.
-Spot Exponent and Positioning test passed.
-Spot Exponent and Direction test passed.
-Fog Exponential test passed.
-Fog Linear test passed.
-Texture Decal test passed.
-Texture Border test passed.
-Mipmaps Selection test passed.
-Mipmaps Interpolation test passed.
-Display Lists test passed.
-Evaluator test passed.
-Evaluator Color test passed.
-Texture Edge Clamp test passed.
-Packed Pixels test passed.
-Texture LOD test passed.
-Rescale Normal test passed.
-Color Table test passed.
-Convolution test passed.
-Convolution Border test passed.
-Histogram test passed.
-MinMax test passed.
-MultiTexture test passed.
-
-Conform passed.
-
-----------------------------------------------------------------------
-% conform -v 2 -p 2
-
-OpenGL Conformance Test
-Version 1.2
-
-Setup Report.
-    Verbose level = 2.
-    Random number seed = 1.
-    Path level = 2.
-
-Visual Report.
-    Display ID = 35. Indirect Rendering.
-    Double Buffered.
-    RGBA (5, 6, 5, 0).
-    Stencil (8).
-    Depth (16).
-    Accumulation (16, 16, 16, 16).
-
-Epsilon Report.
-    zero error epsilon = 0.000122.
-    RGBA error epsilon = 0.0324, 0.016, 0.0324, 0.000122.
-    Depth buffer error epsilon = 0.000137.
-    Stencil plane error epsilon = 0.00404.
-    Accumulation error epsilon = 0.000137, 0.000137, 0.000137, 0.000137.
-
-Default State test passed.
-Must Pass test passed.
-Divide By Zero test passed.
-Viewport Clamp test passed.
-Matrix Stack test passed.
-Matrix Stack Mixing test passed.
-Vertex Order test passed.
-Transformations test passed.
-Transformation Normal test passed.
-Viewport Transformation test passed.
-Buffer Clear test passed.
-Buffer Corners test passed.
-Buffer Color test passed.
-Color Ramp test passed.
-Mask test passed.
-Buffer Invariance test passed.
-Accumulation Buffer test passed.
-Select test passed.
-Feedback test passed.
-Scissor test passed.
-Alpha Plane Function test passed.
-Stencil Plane Clear test passed.
-Stencil Plane Corners test passed.
-Stencil Plane Operation test passed.
-Stencil Plane Function test passed.
-Depth Buffer Clear test passed.
-Depth Buffer Function test passed.
-Blend test passed.
-Dither test passed.
-LogicOp Function test does not exist for an RGB visual.
-DrawPixels test passed.
-CopyPixels test passed.
-Bitmap Rasterization test passed.
-Point Rasterization test passed.
-Anti-aliased Point test passed.
-Line Rasterization test passed.
-Line Stipple test passed.
-Anti-aliased Line test passed.
-Horizontal and Vertical Line test passed.
-Triangle Rasterization test passed.
-Triangle Tile test passed.
-Triangle Stipple test passed.
-Anti-aliased Triangles test passed.
-Quad Rasterization test passed.
-Polygon Face test passed.
-Polygon Cull test passed.
-Polygon Stipple test passed.
-Polygon Edge test passed.
-Ambient Material test passed.
-Ambient Scene test passed.
-Attenuation Position test passed.
-Diffuse Light test passed.
-Diffuse Material test passed.
-Diffuse Material Normal test passed.
-Diffuse Material Positioning test passed.
-Emissive Material test passed.
-Specular Exponent test passed.
-Specular Exponent Normal test passed.
-Specular Local Eye Half Angle test passed.
-Specular Light test passed.
-Specular Material test passed.
-Specular Normal test passed.
-Spot Positioning test passed.
-Spot Exponent and Positioning test passed.
-Spot Exponent and Direction test passed.
-Fog Exponential test passed.
-Fog Linear test passed.
-Texture Decal test passed.
-Texture Border test passed.
-Mipmaps Selection test passed.
-Mipmaps Interpolation test passed.
-Display Lists test passed.
-Evaluator test passed.
-Evaluator Color test passed.
-Texture Edge Clamp test passed.
-Packed Pixels test passed.
-Texture LOD test passed.
-Rescale Normal test passed.
-Color Table test passed.
-Convolution test passed.
-Convolution Border test passed.
-Histogram test passed.
-MinMax test passed.
-MultiTexture test passed.
-
-Conform passed.
-
-----------------------------------------------------------------------
-% conform -v 2 -p 3
-
-OpenGL Conformance Test
-Version 1.2
-
-Setup Report.
-    Verbose level = 2.
-    Random number seed = 1.
-    Path level = 3.
-
-Visual Report.
-    Display ID = 35. Indirect Rendering.
-    Double Buffered.
-    RGBA (5, 6, 5, 0).
-    Stencil (8).
-    Depth (16).
-    Accumulation (16, 16, 16, 16).
-
-Epsilon Report.
-    zero error epsilon = 0.000122.
-    RGBA error epsilon = 0.0324, 0.016, 0.0324, 0.000122.
-    Depth buffer error epsilon = 0.000137.
-    Stencil plane error epsilon = 0.00404.
-    Accumulation error epsilon = 0.000137, 0.000137, 0.000137, 0.000137.
-
-Default State test passed.
-Must Pass test passed.
-Divide By Zero test passed.
-Viewport Clamp test passed.
-Matrix Stack test passed.
-Matrix Stack Mixing test passed.
-Vertex Order test passed.
-Transformations test passed.
-Transformation Normal test passed.
-Viewport Transformation test passed.
-Buffer Clear test passed.
-Buffer Corners test passed.
-Buffer Color test passed.
-Color Ramp test passed.
-Mask test passed.
-Buffer Invariance test passed.
-Accumulation Buffer test passed.
-Select test passed.
-Feedback test passed.
-Scissor test passed.
-Alpha Plane Function test passed.
-Stencil Plane Clear test passed.
-Stencil Plane Corners test passed.
-Stencil Plane Operation test passed.
-Stencil Plane Function test passed.
-Depth Buffer Clear test passed.
-Depth Buffer Function test passed.
-Blend test passed.
-Dither test passed.
-LogicOp Function test does not exist for an RGB visual.
-DrawPixels test passed.
-CopyPixels test passed.
-Bitmap Rasterization test passed.
-Point Rasterization test passed.
-Anti-aliased Point test passed.
-Line Rasterization test passed.
-Line Stipple test passed.
-Anti-aliased Line test passed.
-Horizontal and Vertical Line test passed.
-Triangle Rasterization test passed.
-Triangle Tile test passed.
-Triangle Stipple test passed.
-Anti-aliased Triangles test passed.
-Quad Rasterization test passed.
-Polygon Face test passed.
-Polygon Cull test passed.
-Polygon Stipple test passed.
-Polygon Edge test passed.
-Ambient Material test passed.
-Ambient Scene test passed.
-Attenuation Position test passed.
-Diffuse Light test passed.
-Diffuse Material test passed.
-Diffuse Material Normal test passed.
-Diffuse Material Positioning test passed.
-Emissive Material test passed.
-Specular Exponent test passed.
-Specular Exponent Normal test passed.
-Specular Local Eye Half Angle test passed.
-Specular Light test passed.
-Specular Material test passed.
-Specular Normal test passed.
-Spot Positioning test passed.
-Spot Exponent and Positioning test passed.
-Spot Exponent and Direction test passed.
-Fog Exponential test passed.
-Fog Linear test passed.
-Texture Decal test passed.
-Texture Border test passed.
-Mipmaps Selection test passed.
-Mipmaps Interpolation test passed.
-Display Lists test passed.
-Evaluator test passed.
-Evaluator Color test passed.
-Texture Edge Clamp test passed.
-Packed Pixels test passed.
-Texture LOD test passed.
-Rescale Normal test passed.
-Color Table test passed.
-Convolution test passed.
-Convolution Border test passed.
-Histogram test passed.
-MinMax test passed.
-MultiTexture test passed.
-
-Conform passed.
-
-----------------------------------------------------------------------
-% conform -v 2 -p 4
-
-OpenGL Conformance Test
-Version 1.2
-
-Setup Report.
-    Verbose level = 2.
-    Random number seed = 1.
-    Path level = 4.
-
-Visual Report.
-    Display ID = 35. Indirect Rendering.
-    Double Buffered.
-    RGBA (5, 6, 5, 0).
-    Stencil (8).
-    Depth (16).
-    Accumulation (16, 16, 16, 16).
-
-Epsilon Report.
-    zero error epsilon = 0.000122.
-    RGBA error epsilon = 0.0324, 0.016, 0.0324, 0.000122.
-    Depth buffer error epsilon = 0.000137.
-    Stencil plane error epsilon = 0.00404.
-    Accumulation error epsilon = 0.000137, 0.000137, 0.000137, 0.000137.
-
-Default State test passed.
-Must Pass test passed.
-Divide By Zero test passed.
-Viewport Clamp test passed.
-Matrix Stack test passed.
-Matrix Stack Mixing test passed.
-Vertex Order test passed.
-Transformations test passed.
-Transformation Normal test passed.
-Viewport Transformation test passed.
-Buffer Clear test passed.
-Buffer Corners test passed.
-Buffer Color test passed.
-Color Ramp test passed.
-Mask test passed.
-Buffer Invariance test passed.
-Accumulation Buffer test passed.
-Select test passed.
-Feedback test passed.
-Scissor test passed.
-Alpha Plane Function test passed.
-Stencil Plane Clear test passed.
-Stencil Plane Corners test passed.
-Stencil Plane Operation test passed.
-Stencil Plane Function test passed.
-Depth Buffer Clear test passed.
-Depth Buffer Function test passed.
-Blend test passed.
-Dither test passed.
-LogicOp Function test does not exist for an RGB visual.
-DrawPixels test passed.
-CopyPixels test passed.
-Bitmap Rasterization test passed.
-Point Rasterization test passed.
-Anti-aliased Point test passed.
-Line Rasterization test passed.
-Line Stipple test passed.
-Anti-aliased Line test passed.
-Horizontal and Vertical Line test passed.
-Triangle Rasterization test passed.
-Triangle Tile test passed.
-Triangle Stipple test passed.
-Anti-aliased Triangles test passed.
-Quad Rasterization test passed.
-Polygon Face test passed.
-Polygon Cull test passed.
-Polygon Stipple test passed.
-Polygon Edge test passed.
-Ambient Material test passed.
-Ambient Scene test passed.
-Attenuation Position test passed.
-Diffuse Light test passed.
-Diffuse Material test passed.
-Diffuse Material Normal test passed.
-Diffuse Material Positioning test passed.
-Emissive Material test passed.
-Specular Exponent test passed.
-Specular Exponent Normal test passed.
-Specular Local Eye Half Angle test passed.
-Specular Light test passed.
-Specular Material test passed.
-Specular Normal test passed.
-Spot Positioning test passed.
-Spot Exponent and Positioning test passed.
-Spot Exponent and Direction test passed.
-Fog Exponential test passed.
-Fog Linear test passed.
-Texture Decal test passed.
-Texture Border test passed.
-Mipmaps Selection test passed.
-Mipmaps Interpolation test passed.
-Display Lists test passed.
-Evaluator test passed.
-Evaluator Color test passed.
-Texture Edge Clamp test passed.
-Packed Pixels test passed.
-Texture LOD test passed.
-Rescale Normal test passed.
-Color Table test passed.
-Convolution test passed.
-Convolution Border test passed.
-Histogram test passed.
-MinMax test passed.
-MultiTexture test passed.
-
-Conform passed.
-
-
-
-GLX CONFORMANCE TEST
-====================
-
-% conformx -v 2
-
-OpenGL X Conformance Test
-Version 1.1.1
-
-Setup Report.
-    Verbose level = 2.
-    Random number seed = 1.
-    Path inactive.
-
-Visual Report.
-    Display ID = 34. Direct Rendering.
-    Double Buffered.
-    RGBA (8, 8, 8, 0).
-    Stencil (8).
-    Depth (16).
-    Accumulation (16, 16, 16, 16).
-
-Epsilon Report.
-    zero error epsilon = 0.000122.
-    RGBA error epsilon = 0.00404, 0.00404, 0.00404, 0.000122.
-    Depth buffer error epsilon = 0.000137.
-    Stencil plane error epsilon = 0.00404.
-    Accumulation error epsilon = 0.000137, 0.000137, 0.000137, 0.000137.
-
-Default State test passed.
-glReadPixels() test passed.
-Font test passed.
-
-Conformx passed.
-
-
-
- -NOTE: conformx passes for all machine path levels (-p option). - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/contents.html b/nx-X11/extras/Mesa_6.4.2/docs/contents.html deleted file mode 100644 index 88b7bc7de8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/contents.html +++ /dev/null @@ -1,101 +0,0 @@ - - -Contents - - - - - - - -Documentation - - -Download / Install - - -Resources - - -User Topics - - -Developer Topics - - -Links - - -Hosted by: -
-
-Sourceforge.net -
- - - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/docs/custom.html b/nx-X11/extras/Mesa_6.4.2/docs/custom.html deleted file mode 100644 index e9beba6fa9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/custom.html +++ /dev/null @@ -1,27 +0,0 @@ - - -Custom Development - - - - - -

Custom Development

- -

-Mesa is primarily developed and maintained on a volunteer basis. -Some Mesa development work has been done in conjuction with contracted -projects, such as the XFree86/DRI drivers. -

- -

-

[Begin shameless plug]
-If you have a need for specific or custom Mesa development work, - -Tungsten Graphics, Inc. may be able to help you. -
[End shameless plug]
-

- - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/cvs_access.html b/nx-X11/extras/Mesa_6.4.2/docs/cvs_access.html deleted file mode 100644 index c57f1c8329..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/cvs_access.html +++ /dev/null @@ -1,106 +0,0 @@ - - -CVS Access - - - - - -

CVS Access

- -

-Mesa's CVS repository (code management system) is hosted on -freedesktop.org. -

- -

-You may access the repository either as an -anonymous user (read-only) or as a -developer -(read/write). -

- -

-You may also -browse the CVS repository. -

- - - -

Anonymous CVS Access

- -

-Anonymous, public, read-only access to the CVS repository is available. -Here are the basic instructions for Unix systems: -

- -
    -
  1. Install CVS client software on your computer if needed. - Version 1.9.28 is known to work. -
  2. Login as an anonymous user: -
    -    cvs -d:pserver:anonymous@pdx.freedesktop.org:/cvs/mesa login
    -    
    - Just press Enter/Return when prompted for a password. -
    -
    -
  3. Check out the code: -
    -    cvs -d:pserver:anonymous@pdx.freedesktop.org:/cvs/mesa co Mesa
    -    
    -
- - -

To update your Mesa CVS source to the latest CVS source:

- -
    -
  1. cd Mesa -
  2. cvs -z3 -d:pserver:anonymous@pdx.freedesktop.org:/cvs/mesa update -
- - -
-

Developer CVS Access

- -

-Mesa developers working with the Mesa CVS repository need to first -have an account on -freedesktop.org. -To get an account, please ask Brian or the other Mesa developers for -permission. -Then, if there are no objections, follow this - -procedure. -

- -

-Once your account is established, you can check out the Mesa CVS tree -with: -

-   setenv CVS_RSH ssh        (if using a csh-like shell)
-
-OR -
-   export CVS_RSH=rsh        (if using a bash-like shell)
-
-followed by: -
-   cvs -d:ext:yourusername@pdx.freedesktop.org:/cvs/mesa co Mesa
-
- -

-Of course, replace yourusername with your actual login name. -

- -

-Subsequent updates should only require: -

-
-   cvs update
-
- - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/cvs_branches.html b/nx-X11/extras/Mesa_6.4.2/docs/cvs_branches.html deleted file mode 100644 index 98df3d0f4f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/cvs_branches.html +++ /dev/null @@ -1,80 +0,0 @@ - - -CVS Branches - - - - - -

CVS Branch Information

- -

-At any given time, there may be several active branches in Mesa's -CVS repository. - -Generally, the CVS trunk contains the latest development (unstable) -code while a CVS branch has the latest stable code. -

- -

-Currently (Oct 2004), the trunk is the Mesa 6.3 development code -while the mesa_6_2_branch branch has the stable Mesa 6.2.x code. -

- -

-Mesa releases use an even/odd numbering scheme to represent stable/development -releases. - -For example, Mesa 6.2 (0 is considered even) is a stable release while -Mesa 6.3 is a development release. -

- -

-To checkout a specific CVS branch pass -r and -the branch tag after your CVS command. - -For example cvs checkout -r mesa_6_2_branch Mesa will -checkout the 6.2 branch and cvs update -r -mesa_6_2_branch will convert your current CVS tree to the 6.2 -branch. - -Consult http://www.durak.org/cvswebsites/doc/cvs_5.php3#SEC54 -for more on branching in CVS. -

- -

-To see a list of all the CVS branches run cvs log README (or any -other file) and look for the section labeled symbolic names. -You'll see something like this: -

- -
  symbolic names:
-        mesa_4_0: 1.3
-        mesa_4_0_branch: 1.3.0.6
-        mesa_3_5: 1.3
-        mesa_3_4_2: 1.3
-        mesa_3_4_1: 1.3
-        mesa_3_4: 1.3
-        mesa_3_4_branch: 1.3.0.4
-        mesa_3_3: 1.3
-        mesa_3_2_1: 1.1.1.1
-        mesa_3_3_texture_env_combine2: 1.3.0.2
-        mesa_3_2: 1.1.1.1
-        mesa_3_2_beta_1: 1.1.1.1
-        mesa_3_1: 1.1.1.1
-        mesa_3_2_dev: 1.1.1.1.0.2
-        mesa_3_1_beta_3: 1.1.1.1
-        start: 1.1.1.1
-        mesa: 1.1.1
-
- -

-Most will be obsolete branches. Generally, the newer branches are at -the top. Ask on the mesa3d-dev mailing list to learn which branches -are active. -

- - - - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/docs/debugging.html b/nx-X11/extras/Mesa_6.4.2/docs/debugging.html deleted file mode 100644 index 2df62f56ea..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/debugging.html +++ /dev/null @@ -1,38 +0,0 @@ - - -Debugging Tips - - - - - -

Debugging Tips

- -

- Normally Mesa (and OpenGL) records but does not notify the user of - errors. It is up to the application to call - glGetError to check for errors. Mesa supports an - environment variable, MESA_DEBUG, to help with debugging. If - MESA_DEBUG is defined, a message will be printed to stdout whenever - an error occurs. -

- -

- More extensive error checking is done when Mesa is compiled with the - DEBUG symbol defined. You'll have to edit the Make-config file and - add -DDEBUG to the CFLAGS line for your system configuration. You may - also want to replace any optimization flags with the -g flag so you can - use your debugger. After you've edited Make-config type 'make clean' - before recompiling. -

-

- In your debugger you can set a breakpoint in _mesa_error() to trap Mesa - errors. -

-

- There is a display list printing/debugging facility. See the end of - src/dlist.c for details. -

- - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/demos.html b/nx-X11/extras/Mesa_6.4.2/docs/demos.html deleted file mode 100644 index b4a2cc5e36..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/demos.html +++ /dev/null @@ -1,18 +0,0 @@ - - -Demos - - - - - -

Demos

- - - - - - - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/docs/devinfo.html b/nx-X11/extras/Mesa_6.4.2/docs/devinfo.html deleted file mode 100644 index 9fcd8cf535..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/devinfo.html +++ /dev/null @@ -1,206 +0,0 @@ - - -Development Notes - - - - - -

Development Notes

- - -

Adding Extentions

- -

-To add a new GL extension to Mesa you have to do at least the following. - -

    -
  • - If glext.h doesn't define the extension, edit include/GL/gl.h and add - code like this: -
    -     #ifndef GL_EXT_the_extension_name
    -     #define GL_EXT_the_extension_name 1
    -     /* declare the new enum tokens */
    -     /* prototype the new functions */
    -     /* TYPEDEFS for the new functions */
    -     #endif
    -   
    -
  • -
  • - In the src/mesa/glapi/ directory, add the new extension functions and - enums to the gl_API.xml file. - Then, a bunch of source files must be regenerated by executing the - corresponding Python scripts. -
  • -
  • - Find an existing extension that's similar to the new one and search - the sources for code related to that extension. - Implement new code as needed. - In general, new state variables will be added to mtypes.h. If the - extension is rather large, try to implement it in a new source file. -
  • -
  • - If the new extension adds new GL state, the functions in get.c, enable.c - and attrib.c will most likely require new code. -
  • -
- - - -

Coding Style

- -

-Mesa's code style has changed over the years. Here's the latest. -

- -

-Comment your code! It's extremely important that open-source code be -well documented. Also, strive to write clean, easily understandable code. -

- -

-3-space indentation -

- -

-If you use tabs, set them to 8 columns -

- -

-Brace example: -

-
-	if (condition) {
-	   foo;
-	}
-	else {
-	   bar;
-	}
-
- -

-Here's the GNU indent command which will best approximate my preferred style: -

-
-	indent -br -i3 -npcs infile.c -o outfile.c
-
- - -

-Local variable name example: localVarName (no underscores) -

- -

-Constants and macros are ALL_UPPERCASE, with _ between words -

- -

-Global variables are not allowed. -

- -

-Function name examples: -

-
-	glFooBar()       - a public GL entry point (in dispatch.c)
-	_mesa_FooBar()   - the internal immediate mode function
-	save_FooBar()    - retained mode (display list) function in dlist.c
-	foo_bar()        - a static (private) function
-	_mesa_foo_bar()  - an internal non-static Mesa function
-
- - -

Making a New Mesa Release

- -

-These are the instructions for making a new Mesa release. -

- -

Get latest source files

-

-Use "cvs update -dAP " to get the latest Mesa files from CVS. -

- - -

Verify and update version info

-

-Create/edit the docs/RELNOTES-X.Y file to document what's new in the release. -Add the new RELNOTES-X.Y file to relnotes.html. -Update the docs/VERSIONS file too. -

- -

-Edit configs/default and change the MESA_MAJOR, MESA_MINOR and MESA_TINY -version numbers. -

- -

-Make sure the values in src/mesa/main/version.h is correct. -

- -

-Edit the top-level Makefile and verify that DIRECTORY, LIB_NAME and -DEMO_NAME are correct. -

- -

-Update the docs/news.html file and docs/contents.html files. -

- -

-Check in all updates to CVS. -

- -

-Tag the CVS files with the release name (in the form mesa_X_Y). -

- - -

Make the tarballs

-

-Make a symbolic link from $(DIRECTORY) to 'Mesa'. For example, -ln -s Mesa Mesa-6.3 -This is needed in order to make a correct tar file in the next step. -

- -

-Make the distribution files. From inside the Mesa directory: -

-	make tarballs
-
- -

-After the tarballs are created, the md5 checksums for the files will -be computed. -Add them to the docs/news.html file. -

- -

-Copy the distribution files to a temporary directory, unpack them, -compile everything, and run some demos to be sure everything works. -

- -

Update the website and announce the release

-

-Follow the directions on SourceForge for creating a new "release" and -uploading the tarballs. -

- -

-Update the web site by copying the docs/ directory's files to -/home/users/b/br/brianp/mesa-www/htdocs/ -

- -

-Make an announcement on the mailing lists: -mesa3d-dev@lists.sf.net, -mesa3d-users@lists.sf.net -and -mesa3d-announce@lists.sf.net -

- - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/download.html b/nx-X11/extras/Mesa_6.4.2/docs/download.html deleted file mode 100644 index 72ca0f498d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/download.html +++ /dev/null @@ -1,130 +0,0 @@ - - -Getting Mesa - - - - - -

Downloading

- -

-Current stable release: 6.4.2 -

- -

-Primary download site: -SourceForge -

- - -

-Mesa is distributed in several parts: -

-
    -
  • MesaLib-x.y.z - the main Mesa library source code, drivers - and documentation. -
  • -
  • MesaDemos-x.y.z - OpenGL demonstration and test programs. - Most of the programs require GLUT (either the - original GLUT by Mark Kilgard or - freeglut or - OpenGLUT). -
  • -
  • MesaGLUT-x.y.z - Mark Kilgard's GLUT, easily compiled and used - with Mesa. Plus, other implementation of GLUT for DOS, OS/2, BeOS, etc. -
  • -
- -

-If you're not interested in running the demos, you'll only need the first -package. -

- -

-The packages are available in .tar.gz, .tar.bz2 and .zip formats. -Other organizations might offer additional package formats. -

- -

Unpacking

- -

-All the packages should be in the same directory prior to unpacking. -

- -
    -
  • To unpack .tar.gz files: -
    -	tar zxf MesaLib-X.Y.tar.gz
    -	tar zxf MesaDemos-X.Y.tar.gz
    -	tar zxf MesaGLUT-X.Y.tar.gz
    -
    -or -
    -	gzcat MesaLib-X.Y.tar.gz | tar xf -
    -	gzcat MesaDemos-X.Y.tar.gz | tar xf -
    -	gzcat MesaGLUT-X.Y.tar.gz | tar xf -
    -
    -or -
    -	gunzip MesaLib-X.Y.tar.gz ; tar xf MesaLib-X.Y.tar
    -	gunzip MesaDemos-X.Y.tar.gz ; tar xf MesaDemos-X.Y.tar
    -	gunzip MesaGLUT-X.Y.tar.gz ; tar xf MesaGLUT-X.Y.tar
    -
    -
  • To unpack .tar.bz2 files: -
    -	bunzip2 -c MesaLib-X.Y.tar.gz | tar xf -
    -	bunzip2 -c MesaDemos-X.Y.tar.gz | tar xf -
    -	bunzip2 -c MesaGLUT-X.Y.tar.gz | tar xf -
    -
    -
  • To unpack .zip files: -
    -	unzip MesaLib-X.Y.zip
    -	unzip MesaDemos-X.Y.zip
    -	unzip MesaGLUT-X.Y.zip
    -
    -
- - -

Contents

- -

-After unpacking you'll have these directories: -

-
-Makefile	- top-level Makefile for most systems
-configs/	- makefile parameter files for various systems
-include/	- GL header (include) files
-bin/		- shell scripts for making shared libraries, etc
-docs/		- documentation
-src/		- source code for libraries
-src/mesa	- sources for the main Mesa library and device drivers
-src/glu		- libGLU source code
-src/glw		- Xt/Motif/OpenGL widget code
-
- -If you downloaded and unpacked the MesaDemos.X.Y package: - -
-progs/demos	- original Mesa demos
-progs/xdemos	- GLX OpenGL/Mesa demos
-progs/redbook	- examples from the OpenGL Programming Guide
-progs/samples	- examples from SGI
-progs/images/	- image files
-
- -If you downloaded and unpacked the MesaGLUT.X.Y package: -
-src/glut	- GLUT library source code
-
- -

-Proceed to the compilation and installation -instructions. -

- - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/enums.txt b/nx-X11/extras/Mesa_6.4.2/docs/enums.txt deleted file mode 100644 index 218391c30d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/enums.txt +++ /dev/null @@ -1,42 +0,0 @@ - -Blocks allocated to Mesa: - 0x8750-0x875F - 0x8BB0-0x8BBF - - -GL_MESA_packed_depth_stencil - GL_DEPTH_STENCIL_MESA 0x8750 - GL_UNSIGNED_INT_24_8_MESA 0x8751 - GL_UNSIGNED_INT_8_24_REV_MESA 0x8752 - GL_UNSIGNED_SHORT_15_1_MESA 0x8753 - GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754 - -GL_MESA_trace.spec: - GL_TRACE_ALL_BITS_MESA 0xFFFF - GL_TRACE_OPERATIONS_BIT_MESA 0x0001 - GL_TRACE_PRIMITIVES_BIT_MESA 0x0002 - GL_TRACE_ARRAYS_BIT_MESA 0x0004 - GL_TRACE_TEXTURES_BIT_MESA 0x0008 - GL_TRACE_PIXELS_BIT_MESA 0x0010 - GL_TRACE_ERRORS_BIT_MESA 0x0020 - GL_TRACE_MASK_MESA 0x8755 - GL_TRACE_NAME_MESA 0x8756 - -MESA_ycbcr_texture.spec: - GL_YCBCR_MESA 0x8757 - GL_UNSIGNED_SHORT_8_8_MESA 0x85BA /* same as Apple's */ - GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB /* same as Apple's */ - -GL_MESA_pack_invert.spec - GL_PACK_INVERT_MESA 0x8758 - -GL_MESA_program_debug.spec: - GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x???? - GL_VERTEX_PROGRAM_CALLBACK_MESA 0x???? - GL_FRAGMENT_PROGRAM_POSITION_MESA 0x???? - GL_VERTEX_PROGRAM_POSITION_MESA 0x???? - GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x???? - GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x???? - GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x???? - GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x???? - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/envvars.html b/nx-X11/extras/Mesa_6.4.2/docs/envvars.html deleted file mode 100644 index efa8604360..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/envvars.html +++ /dev/null @@ -1,46 +0,0 @@ - - -Environment Variables - - - - - -

Environment Variables

- -

-Mesa supports the following environment variables: -

-
    -
  • MESA_NO_ASM - if set, disables all assembly language optimizations -
  • MESA_NO_MMX - if set, disables Intel MMX optimizations -
  • MESA_NO_3DNOW - if set, disables AMD 3DNow! optimizations -
  • MESA_NO_SSE - if set, disables Intel SSE optimizations -
  • MESA_DEBUG - if set, error messages are printed to stderr. -If the value of MESA_DEBUG is "FP" floating point arithmetic errors will -generate exceptions. -
  • MESA_NO_DITHER - if set, disables dithering, overriding glEnable(GL_DITHER) -
- -

-The following environment variables are only applicable to the Xlib/X11 -software driver. -See the README.X11 file for details. -

-
    -
  • MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode -
  • MESA_CI_VISUAL - specifies the X visual and depth for CI mode -
  • MESA_BACK_BUFFER - specifies how to implement the back color buffer, - either "pixmap" or "ximage" -
  • MESA_GAMMA - gamma correction coefficients for red, green, blue channels -
  • MESA_XSYNC - enable synchronous X behavior (for debugging only) -
  • MESA_GLX_FORCE_CI - if set, force GLX to treat 8bpp visuals as CI visuals -
  • MESA_GLX_FX - set to either "fullscreen" for full-screen rendering, - "window" to render into a window, or "disable" to disable the Glide driver. -
  • MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel. -
  • MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer. -
- - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/extensions.html b/nx-X11/extras/Mesa_6.4.2/docs/extensions.html deleted file mode 100644 index dbb8ebadaf..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/extensions.html +++ /dev/null @@ -1,34 +0,0 @@ - - -Mesa Extensions - - - - - -

Mesa Extensions

- -

-A number of extensions have been developed especially for Mesa. -The specifications follow. -

- - - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/faq.html b/nx-X11/extras/Mesa_6.4.2/docs/faq.html deleted file mode 100644 index b93d5007dc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/faq.html +++ /dev/null @@ -1,394 +0,0 @@ - - -Mesa FAQ - - - - - - -
-

Mesa Frequently Asked Questions

-Last updated: 21 October 2004 -
- -
-
-

Index

-1. High-level Questions and Answers -
-2. Compilation and Installation Problems -
-3. Runtime / Rendering Problems -
-4. Developer Questions -
-
-
- - - - -

1. High-level Questions and Answers

- -

1.1 What is Mesa?

-

-Mesa is an open-source implementation of the OpenGL specification. -OpenGL is a programming library for writing interactive 3D applications. -See the OpenGL website for more -information. -

-

-Mesa 6.x supports the OpenGL 1.5 specification. -

- - -

1.2 Does Mesa support/use graphics hardware?

-

-Yes. Specifically, Mesa serves as the OpenGL core for the open-source DRI -drivers for XFree86/X.org. See the DRI -website for more information. -

-

-There have been other hardware drivers for Mesa over the years (such as -the 3Dfx Glide/Voodoo driver, an old S3 driver, etc) but the DRI drivers -are the modern ones. -

- -

1.3 What purpose does Mesa serve today?

-

-Hardware-accelerated OpenGL implementations are available for most popular -operating systems today. -Still, Mesa serves at least these purposes: -

-
    -
  • Mesa is used as the core of the open-source XFree86/X.org DRI - hardware drivers. -
  • -
  • Mesa is quite portable and allows OpenGL to be used on systems - that have no other OpenGL solution. -
  • -
  • Software rendering with Mesa serves as a reference for validating the - hardware drivers. -
  • -
  • A software implementation of OpenGL is useful for experimentation, - such as testing new rendering techniques. -
  • -
  • Mesa can render images with deep color channels: 16-bit integer - and 32-bit floating point color channels are supported. - This capability is only now appearing in hardware. -
  • -
  • Mesa's internal limits (max lights, clip planes, texture size, etc) can be - changed for special needs (hardware limits are hard to overcome). -
  • -
- - -

1.4 What's the difference between"Stand-Alone" Mesa and the DRI drivers?

-

-Stand-alone Mesa is the original incarnation of Mesa. -On systems running the X Window System it does all its rendering through -the Xlib API: -

    -
  • The GLX API is supported, but it's really just an emulation of the - real thing. -
  • The GLX wire protocol is not supported and there's no OpenGL extension - loaded by the X server. -
  • There is no hardware acceleration. -
  • The OpenGL library, libGL.so, contains everything (the programming API, - the GLX functions and all the rendering code). -
-

-

-Alternately, Mesa acts as the core for a number of OpenGL hardware drivers -within the DRI (Direct Rendering Infrastructure): -

    -
  • The libGL.so library provides the GL and GLX API functions, a GLX - protocol encoder, and a device driver loader. -
  • The device driver modules (such as r200_dri.so) contain a built-in - copy of the core Mesa code. -
  • The X server loads the GLX module. - The GLX module decodes incoming GLX protocol and dispatches the commands - to a rendering module. - For the DRI, this module is basically a software Mesa renderer. -
- - - -

1.5 How do I upgrade my DRI installation to use a new Mesa release?

-

-This wasn't easy in the past. -Now, the DRI drivers are included in the Mesa tree and can be compiled -separately from the X server. -Just follow the Mesa compilation instructions. -

- - -

1.6 Are there other open-source implementations of OpenGL?

-

-Yes, SGI's -OpenGL Sample Implemenation (SI) is available. -The SI was written during the time that OpenGL was originally designed. -Unfortunately, development of the SI has stagnated. -Mesa is much more up to date with modern features and extensions. -

- -

-Vincent is -an open-source implementation of OpenGL ES for mobile devices. - -

-miniGL -is a subset of OpenGL for PalmOS devices. - -

-TinyGL is a subset of OpenGL. -

- -

-SoftGL -is an OpenGL subset for mobile devices. -

- -

-Chromium -isn't a conventional OpenGL implementation (it's layered upon OpenGL), -but it does export the OpenGL API. It allows tiled rendering, sort-last -rendering, etc. -

- -

-There may be other open OpenGL implementations, but Mesa is the most -popular and feature-complete. -

- - - -
-
- - - -

2. Compilation and Installation Problems

- - -

2.1 What's the easiest way to install Mesa?

-

-If you're using a Linux-based system, your distro CD most likely already -has Mesa packages (like RPM or DEB) which you can easily install. -

- - -

2.2 Running configure; make doesn't Work

-

-Mesa no longer supports GNU autoconf/automake. Why? -

    -
  • It seemed to seldom work on anything but Linux -
  • The config files were hard to maintain and hard to understand -
  • libtool caused a lot of grief -
- -

-Now Mesa again uses a conventional Makefile system (as it did originally). -Basically, each Makefile in the tree includes one of the configuration -files from the config/ directory. -The config files specify all the variables for a variety of popular systems. -

- - -

2.3 I get undefined symbols such as bgnpolygon, v3f, etc...

-

-You're application is written in IRIS GL, not OpenGL. -IRIS GL was the predecessor to OpenGL and is a different thing (almost) -entirely. -Mesa's not the solution. -

- - -

2.4 Where is the GLUT library?

-

-GLUT (OpenGL Utility Toolkit) is in the separate MesaGLUT-x.y.z.tar.gz file. -If you don't already have GLUT installed, you should grab the MesaGLUT -package and compile it with the rest of Mesa. -

- - - -

2.5 What's the proper place for the libraries and headers?

-

-On Linux-based systems you'll want to follow the -Linux ABI standard. -Basically you'll want the following: -

-
    -
  • /usr/include/GL/gl.h - the main OpenGL header -
  • /usr/include/GL/glu.h - the OpenGL GLU (utility) header -
  • /usr/include/GL/glx.h - the OpenGL GLX header -
  • /usr/include/GL/glext.h - the OpenGL extensions header -
  • /usr/include/GL/glxext.h - the OpenGL GLX extensions header -
  • /usr/include/GL/osmesa.h - the Mesa off-screen rendering header -
  • /usr/lib/libGL.so - a symlink to libGL.so.1 -
  • /usr/lib/libGL.so.1 - a symlink to libGL.so.1.xyz -
  • /usr/lib/libGL.so.xyz - the actual OpenGL/Mesa library. xyz denotes the -Mesa version number. -
  • /usr/lib/libGLU.so - a symlink to libGLU.so.1 -
  • /usr/lib/libGLU.so.1 - a symlink to libGLU.so.1.3.xyz -
  • /usr/lib/libGLU.so.xyz - the OpenGL Utility library. xyz denotes the Mesa -version number. -
-

-After installing XFree86/X.org and the DRI drivers, some of these files -may be symlinks into the /usr/X11R6/ tree. -

-

-The old-style Makefile system doesn't install the Mesa libraries; it's -up to you to copy them (and the headers) to the right place. -

-

-The GLUT header and library should go in the same directories. -

-
-
- - - -

3. Runtime / Rendering Problems

- -

3.1 Rendering is slow / why isn't my graphics hardware being used?

-

-Stand-alone Mesa (downloaded as MesaLib-x.y.z.tar.gz) doesn't have any -support for hardware acceleration (with the exception of the 3DFX Voodoo -driver). -

-

-What you really want is a DRI or NVIDIA (or another vendor's OpenGL) driver -for your particular hardware. -

-

-You can run the glxinfo program to learn about your OpenGL -library. -Look for the GL_VENDOR and GL_RENDERER values. -That will identify who's OpenGL library you're using and what sort of -hardware it has detected. -

-

-If your DRI-based driver isn't working, go to the -DRI website for trouble-shooting information. -

- - -

3.2 I'm seeing errors in depth (Z) buffering. Why?

-

-Make sure the ratio of the far to near clipping planes isn't too great. -Look - -here for details. -

-

-Mesa uses a 16-bit depth buffer by default which is smaller and faster -to clear than a 32-bit buffer but not as accurate. -If you need a deeper you can modify the parameters to - glXChooseVisual in your code. -

- - -

3.3 Why Isn't depth buffering working at all?

-

-Be sure you're requesting a depth buffered-visual. If you set the MESA_DEBUG -environment variable it will warn you about trying to enable depth testing -when you don't have a depth buffer. -

-

Specifically, make sure glutInitDisplayMode is being called -with GLUT_DEPTH or glXChooseVisual is being -called with a non-zero value for GLX_DEPTH_SIZE. -

-

This discussion applies to stencil buffers, accumulation buffers and -alpha channels too. -

- - -

3.4 Why does glGetString() always return NULL?

-

-Be sure you have an active/current OpenGL rendering context before -calling glGetString. -

- - -

3.5 GL_POINTS and GL_LINES don't touch the right pixels

-

-If you're trying to draw a filled region by using GL_POINTS or GL_LINES -and seeing holes or gaps it's because of a float-to-int rounding problem. -But this is not a bug. -See Appendix H of the OpenGL Programming Guide - "OpenGL Correctness Tips". -Basically, applying a translation of (0.375, 0.375, 0.0) to your coordinates -will fix the problem. -

- -
-
- - - -

4. Developer Questions

- -

4.1 How can I contribute?

-

-First, join the Mesa3d-dev mailing list. That's where Mesa development -is discussed. -

-

-The -OpenGL Specification is the bible for OpenGL implemention work. -You should read it. -

-

Most of the Mesa development work involves implementing new OpenGL -extensions, writing hardware drivers (for the DRI), and code optimization. -

- -

4.2 How do I write a new device driver?

-

-Unfortunately, writing a device driver isn't easy. -It requires detailed understanding of OpenGL, the Mesa code, and your -target hardware/operating system. -3D graphics are not simple. -

-

-The best way to get started is to use an existing driver as your starting -point. -For a software driver, the X11 and OSMesa drivers are good examples. -For a hardware driver, the Radeon and R200 DRI drivers are good examples. -

-

The DRI website has more information about writing hardware drivers. -The process isn't well document because the Mesa driver interface changes -over time, and we seldome have spare time for writing documentation. -That being said, many people have managed to figure out the process. -

-

-Joining the appropriate mailing lists and asking questions (and searching -the archives) is a good way to get information. -

- - -

4.3 Why isn't GL_EXT_texture_compression_s3tc implemented in Mesa and/or the DRI drivers?

-

-The specification for the extension -indicates that there are intellectual property (IP) and/or patent issues -to be dealt with. -

-

We've been unsucessful in getting a response from S3 (or whoever owns -the IP nowadays) to indicate whether or not an open source project can -implement the extension (specifically the compression/decompression -algorithms). -

-

-Until we can get official permission to do so, this extension will not -be implemented in Mesa. -

- - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/fbdev-dri.html b/nx-X11/extras/Mesa_6.4.2/docs/fbdev-dri.html deleted file mode 100644 index 18b0ca815e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/fbdev-dri.html +++ /dev/null @@ -1,315 +0,0 @@ - - -Mesa fbdev/DRI Environment - - - - - -

Mesa fbdev/DRI Drivers

- - -

1. Introduction

- -

-The fbdev/DRI sub-project within Mesa brings hardware accelerated OpenGL -rendering to the Linux fbdev environment. -The X Window System / XFree86 is not needed. -

- -

-Basically, the DRI drivers for hardware -accelerated OpenGL for XFree86 have been ported to fbdev so that X is -not needed. -This means fbdev/DRI works in full-screen mode only. -

- -

-DRI driver writers may find this simplified environment easier to work in, -compared to the full XFree86/DRI environment. -

- -

-Much of the work for this project has been done by Jon Smirl and -Keith Whitwell. -

- -

-To use fbdev/DRI, you'll need a Linux 2.4 or 2.6 kernel. -

- -

Background Info

- -

-The Mesa-based DRI drivers used to be hosted in the DRI tree (which is -basically a copy of the XFree86 tree). -Since the Mesa-based DRI drivers are moreso "Mesa drivers" than "XFree86 -drivers" and the fact that with some work, the drivers could be used -without X, the driver code was moved into the Mesa tree. -

- -

-So now the DRI drivers can be compiled for two different environments: -fbdev and XFree86. -To build the drivers for XFree86, one has to download/build the DRI -source tree. -Eventually, we'd like to be able to build the drivers for XFree86 outside -of the XFree86/DRI trees. -

- - - - -

2. Compilation

- -

2.1 Compiling the DRM modules

- -

-First, you'll need the DRM (Direct Rendering Manager) kernel module sources. -They're found in a module of the DRI CVS tree. -To obtain the code do the following: -

-
-   cvs -d:pserver:anonymous@pdx.freedesktop.org:/cvs/dri login
-
-

-Press Enter/Return when prompted for a password. Then, -

-
-   cvs -d:pserver:anonymous@pdx.freedesktop.org:/cvs/dri co drm
-
- -

-Compile the DRM kernel modules: -

-
-  cd drm/linux
-  make
-
- -

-Note: you may need to be root in order to make a few symlinks. -

-

-When compilation is done, you should have at least the following -kernel modules: -

-
-  gamma.o
-  i810.o
-  i830.o
-  mach64.o
-  mga.o
-  r128.o
-  radeon.o
-  savage.o
-  sis.o
-  tdfx.o
-  via.o
-
-

-You'll probably want to copy/move them into your kernel module directory -(for example: /lib/modules/2.4.18-14/kernel/drivers/char/drm/). -

- - - -

2.2 Compiling the Mesa drivers

- -

-Begin by editing the Mesa/configs/default file to set -the DRM_SOURCE_PATH variable. -Set it to the location where the DRM module sources are located. -For example, if your current directory in step 2.1 was /home/fred/ -set DRM_SOURCE_PATH to /home/fred/drm -

- -

-Next, assuming you're starting with a fresh Mesa CVS checkout, -do the following: -

-
-   make linux-solo
-
- -

-If you previously built the source tree, run make realclean -first to remove the old object files. -

- -

-When this is finished, check the Mesa/lib/ directory -to verify that the following files were made: -

- -
    -
  • libGL.so.1.2 - the client-side OpenGL library - (and a few symlinks to it). -
  • libGLU.so.1.1 - the GLU library (and a few symlinks to it). -
  • libglut.so.3.7 - the GLUT library (and a few symlinks to it). -
  • mga_dri.so - DRI driver for Matrox G200/G400 cards. -
  • r128_dri.so - DRI driver for ATI Rage 128 cards. -
  • r200_dri.so - DRI driver for ATI R200 Radeon cards. -
  • radeon_dri.so - DRI driver for original ATI Radeon cards. -
  • i810_dri.so - DRI driver for Intel i810/i815 chips. -
  • i830_dri.so - DRI driver for Intel i830/i845 chips. -
  • mga_dri.so - DRI driver for Matrox G200/G400 cards. -
  • sis_dri.so - DRI driver for SIS cards. -
  • tdfx_dri.so - DRI driver for 3dfx Voodoo 3/4/5 cards. -
  • gamma_dri.so - DRI driver for 3Dlabs gamma cards. -
  • fb_dri.so - software-only fbdev driver. -
  • miniglx.conf - configuration file for the MiniGLX interface -
- - -

3. Using fbdev/DRI

- -

-If XFree86 is currently running, exit/stop the X server so you're -working from the console. -

- - -

3.1 Load Kernel Modules

- -

-You'll need to load the kernel modules specific to your graphics hardware. -Typically, this consists of the agpgart module, an fbdev driver module -and the DRM kernel module (from step 2.1). -

- - -

-If you have ATI Radeon/R200 hardware, run as root: -

-
-   modprobe agpgart            # the AGP GART module
-   modprobe radeonfb           # the Radeon fbdev driver
-   modprobe radeon             # the Radeon DRI kernel module
-
- -

-If you have ATI Rage 128 hardware, run as root: -

-
-   modprobe agpgart            # the AGP GART module
-   modprobe aty128fb           # the Rage 128 fbdev driver
-   modprobe r128               # the Rage 128 DRI kernel module
-
- -

-If you have Matrox G200/G400 hardware, run as root: -

-
-   modprobe agpgart            # the AGP GART module
-   modprobe mgafb              # the Matrox fbdev driver
-   modprobe mga                # the Matrox DRI kernel module
-
- -

-Then run lsmod to be sure the modules are loaded. -For a Radeon card, you should see something like this: -

-
-Module                  Size  Used by    Not tainted
-radeon                110308   0  (unused)
-radeonfb               21900   0  (unused)
-agpgart                43072   1 
-
- - - -

3.2 Configuration File

- -

-The Mesa/lib/miniglx.conf file should be installed -in /etc/. -

- -

-Edit /etc/miniglx.conf to be sure it's set up correctly -for your hardware. -Comments in the file explain the options. -

- - -

3.3 Running fbdev/DRI Programs

- -

-Make sure your LD_LIBRARY_PATH environment variable is set to the -Mesa/lib/ directory. -

- -

-Change to the Mesa/progs/miniglx/ directory and -start the sample_server program in the background: -

-
-   ./sample_server &
-
- -

-Then try running the miniglxtest program: -

-
-   ./miniglxtest
-
-

-You should see a rotating quadrilateral which changes color as it rotates. -It will exit automatically after a bit. -

- -

-If you run other tests in the miniglx/ directory, you may want to run -them from a remote shell so that you can stop them with ctrl-C. -

- - - -

4.0 Troubleshooting

- -

-If you try to run miniglxtest and get the following: -

-
-   [miniglx] failed to probe chipset
-   connect: Connection refused
-   server connection lost
-
-

-It means that the sample_server process is not running. -

- - - - -

5.0 Programming Information

- -

-The full OpenGL API is available with fbdev/DRI. -

- -

-OpenGL/Mesa is interfaced to fbdev via the MiniGLX -interface. -MiniGLX is a subset of Xlib and GLX API functions which provides just -enough functionality to setup OpenGL rendering and respond to simple -input events. -

- -

-Since MiniGLX is a subset of the usual Xlib and GLX APIs, programs written -to the MiniGLX API can also be run on full Xlib/GLX implementations. -This allows some degree of flexibility for software development and testing. -

- -

-However, the MiniGLX API is not binary-compatible with full Xlib/GLX. -Some of the structures are different and some macros/functions work -differently. -See the GL/miniglx.h header file for details. -

- - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/games.html b/nx-X11/extras/Mesa_6.4.2/docs/games.html deleted file mode 100644 index dcf5cf2d01..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/games.html +++ /dev/null @@ -1,64 +0,0 @@ - - -Games - - - - - -

Games

- - - - - - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/docs/gears.png b/nx-X11/extras/Mesa_6.4.2/docs/gears.png deleted file mode 100644 index 4052b30ed0..0000000000 Binary files a/nx-X11/extras/Mesa_6.4.2/docs/gears.png and /dev/null differ diff --git a/nx-X11/extras/Mesa_6.4.2/docs/glfbdev-driver.html b/nx-X11/extras/Mesa_6.4.2/docs/glfbdev-driver.html deleted file mode 100644 index b49950eb9e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/glfbdev-driver.html +++ /dev/null @@ -1,90 +0,0 @@ - - -Mesa glFBDev Driver - - - - - -

Mesa glFBDev Driver

- - -

1. Introduction

- -

-The GLFBDev driver interface allows one to do OpenGL rendering into a -framebuffer managed with the Linux's fbdev interface. -

- -

-Basically, the programmer uses the fbdev functions to initialize the -graphics hardware and setup the framebuffer. -Then, using a calls to Mesa's glFBDev API functions, one can render -into the framebuffer with the OpenGL API functions. -

- -

-Note, only software rendering is supported; there is no hardware -acceleration. -

- - -

-The GL/glfbdev.h header file defines the glFBDev interface. -

- -

-The progs/fbdev/glfbdevtest.c demonstrates how to use the glFBDev interface. -

- -

-For more information about fbdev, see the - -Framebuffer Howto -

- - -

2. Compilation

- -

-To compile Mesa with support for the glFBDev interface: -

-   XXX todo
-
- -

-When compilation is finished look in progs/glfbdev/ for the glfbdevtest demo. -

- -

-xxx todo -

- - -

3. Compiling and linking glFBDev programs

- -

-xxx todo -

- - - -

4. Running glFBDev programs

- -

-First, you need to have a working fbdev environment. -See the - -Framebuffer Howto for information. -

- -

-Programs must be run with root permission. -

- -

- - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/glu.html b/nx-X11/extras/Mesa_6.4.2/docs/glu.html deleted file mode 100644 index 8adaf42bcb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/glu.html +++ /dev/null @@ -1,45 +0,0 @@ - - -SGI GLU - - - - - -

SGI SI GLU

- -(Silicon Graphics, Inc. Sample Implementation of the OpenGL Utility library) - -

-SGI open-sourced their OpenGL Sample Implementation (SI) in January, 2000. -This includes the GLU library. -

- -

-The SI GLU library implements GLU version 1.3 whereas the original -Mesa GLU library only implemented version 1.2. -We recommend using the SI GLU library instead of Mesa's GLU library -since it's more up-to-date, complete and reliable. -We're no longer developing the original Mesa GLU library. -

- -

-The SI GLU library code is included in the Mesa distribution. -You don't have to download it separately. -

- - -

-Olivier Michel has made Linux RPMs of GLU for i386 and PowerPC. -You can download them from the -download area under Miscellaneous. -

- -

-Visit the -OpenGL Sample Implementation home page for more information about the SI. -

- - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/helpwanted.html b/nx-X11/extras/Mesa_6.4.2/docs/helpwanted.html deleted file mode 100644 index 346f093d64..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/helpwanted.html +++ /dev/null @@ -1,74 +0,0 @@ - - -Help Wanted - - - - - -

Help Wanted

- -

-We can always use more help with the Mesa project. -Here are some specific ideas and areas where help would be appreciated: -

- -
    -
  1. - Generate the src/mesa/main/enums.c file with a Python script which - uses the gl_API.xml file. -

    -
  2. - Try to auto-generate the display list "save" functions seen in dlist.c - using a Python script and the gl_API.xml file. - The gl_API.xml file will probably need a new tag to indicate whether or - not each function gets compiled into display lists. -

    -
  3. - Maintenance of assembly language files on Linux, Windows and SPARC systems. -

    -
  4. - Help to incorporate the 3Dlabs' shading language compiler for OpenGL 2.0. -

    -
  5. - Implement assembly language (SSE/MMX) code generation for - vertex/fragment programs. -

    -
  6. - Windows 98/NT driver building, maintenance and testing - (Karl Schultz has been doing a great job of this lately). -

    -
  7. - Maintenance and testing of various drivers, such as DOS/DJGPP, GGI, etc. -

    -
  8. - Write new tests for Glean. -

    -
- - -

-If you want to help with Mesa, first join the Mesa developer's -mailing list. -Then post a message to propose what you want to do, just to make sure -there's no issues. -

- -

-Anyone is welcome to contribute code to the Mesa project. -By doing so, it's assumed that you agree to the code's licensing terms. -

- -

-Finally: -

- -

    -
  1. Try to write high-quality code that follows the existing style. -
  2. Use uniform indentation, write comments, use meaningful identifiers, etc. -
  3. Test your code thoroughly. Include test programs if appropriate. -
- - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/index.html b/nx-X11/extras/Mesa_6.4.2/docs/index.html deleted file mode 100644 index eec4d725cd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - -Mesa Home Page - - - - - - - - - - - - - - - -<p>Sorry, this site requires frame support</p> - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/install.html b/nx-X11/extras/Mesa_6.4.2/docs/install.html deleted file mode 100644 index 129daced42..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/install.html +++ /dev/null @@ -1,309 +0,0 @@ - - -Compilation and Installation - - - - - - -

Compilation and Installation

- -
    -
  1. Unix / X11 -
  2. Windows -
  3. VMS -
  4. Other -
- - - - -

1. Unix/X11 Compilation and Installation

- -

1.1 Compilation

- -

-Mesa may be compiled in several different ways: -

-
- - -

-Later, if you want to rebuild for a different configuration run -make realclean before rebuilding. -

- - -

1.2 The libraries

- -

-When compilation has finished, look in the top-level lib/ -directory. -You'll see a set of library files similar to this: -

-
-lrwxrwxrwx    1 brian    users          10 Mar 26 07:53 libGL.so -> libGL.so.1*
-lrwxrwxrwx    1 brian    users          19 Mar 26 07:53 libGL.so.1 -> libGL.so.1.5.060100*
--rwxr-xr-x    1 brian    users     3375861 Mar 26 07:53 libGL.so.1.5.060100*
-lrwxrwxrwx    1 brian    users          11 Mar 26 07:53 libGLU.so -> libGLU.so.1*
-lrwxrwxrwx    1 brian    users          20 Mar 26 07:53 libGLU.so.1 -> libGLU.so.1.3.060100*
--rwxr-xr-x    1 brian    users      549269 Mar 26 07:53 libGLU.so.1.3.060100*
-lrwxrwxrwx    1 brian    users          12 Mar 26 07:53 libglut.so -> libglut.so.3*
-lrwxrwxrwx    1 brian    users          16 Mar 26 07:53 libglut.so.3 -> libglut.so.3.7.1*
--rwxr-xr-x    1 brian    users      597754 Mar 26 07:53 libglut.so.3.7.1*
-lrwxrwxrwx    1 brian    users          11 Mar 26 08:04 libGLw.so -> libGLw.so.1*
-lrwxrwxrwx    1 brian    users          15 Mar 26 08:04 libGLw.so.1 -> libGLw.so.1.0.0*
--rwxr-xr-x    1 brian    users       20750 Mar 26 08:04 libGLw.so.1.0.0*
-lrwxrwxrwx    1 brian    users          14 Mar 26 07:53 libOSMesa.so -> libOSMesa.so.6*
-lrwxrwxrwx    1 brian    users          23 Mar 26 07:53 libOSMesa.so.6 -> libOSMesa.so.6.1.060100*
--rwxr-xr-x    1 brian    users       23871 Mar 26 07:53 libOSMesa.so.6.1.060100*
-
- -

-libGL is the main OpenGL library (i.e. Mesa). -
-libGLU is the OpenGL Utility library. -
-libglut is the GLUT library. -
-libGLw is the Xt/Motif OpenGL drawing area widget library. -
-libOSMesa is the OSMesa (Off-Screen) interface library. -

- -

-If you built the DRI hardware drivers, you'll also see the DRI drivers: -

-
--rwxr-xr-x   1 brian users 11320803 Jul 21 12:11 mach64_dri.so
--rwxr-xr-x   1 brian users 11418014 Jul 21 12:12 mga_dri.so
--rwxr-xr-x   1 brian users 11064426 Jul 21 12:12 r128_dri.so
--rwxr-xr-x   1 brian users 11849858 Jul 21 12:12 r200_dri.so
--rwxr-xr-x   1 brian users 11757388 Jul 21 12:12 radeon_dri.so
--rwxr-xr-x   1 brian users 11232304 Jul 21 12:13 s3v_dri.so
--rwxr-xr-x   1 brian users 11062970 Jul 21 12:13 savage_dri.so
--rwxr-xr-x   1 brian users 11214212 Jul 21 12:13 sis_dri.so
--rwxr-xr-x   1 brian users 11368736 Jul 21 12:13 tdfx_dri.so
--rwxr-xr-x   1 brian users 10598868 Jul 21 12:13 trident_dri.so
--rwxr-xr-x   1 brian users 10997120 Jul 21 12:13 unichrome_dri.so
-
- - -

1.3 Running the demos

- -

-If you downloaded/unpacked the MesaDemos-x.y.z.tar.gz archive or -obtained Mesa from CVS, the progs/ directory will contain a -bunch of demonstration programs. -

- -

-Before running a demo, you may have to set an environment variable -(such as LD_LIBRARY_PATH on Linux) to indicate where the -libraries are located. For example: -

-

-cd into the Mesa lib/ directory. -
-setenv LD_LIBRARY_PATH ${cwd} (if using csh or tcsh shell) -
-or, -
-export LD_LIBRARY_PATH=${PWD} (if using bash or sh shell) -
- -

-Next, change to the Mesa/demos/ directory: -

-
-cd ../progs/demos -
- -

-Run a demo such as gears: -

-
-./gears -
- -

-If this doesn't work, try the Mesa/progs/xdemos/glxinfo program -and see that it prints the expected Mesa version number. -

- -

-If you're using Linux or a similar OS, verify that the demo program is -being linked with the proper library files: -

-
-ldd gears -
- -

-You should see something like this: -

-
-        libglut.so.3 => /home/brian/Mesa/lib/libglut.so.3 (0x40013000)
-        libGLU.so.1 => /home/brian/Mesa/lib/libGLU.so.1 (0x40051000)
-        libGL.so.1 => /home/brian/Mesa/lib/libGL.so.1 (0x400e0000)
-        libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
-        libm.so.6 => /lib/i686/libm.so.6 (0x403da000)
-        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x403fc000)
-        libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x404da000)
-        libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x404f1000)
-        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x40543000)
-        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4054b000)
-        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x405fd000)
-        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40605000)
-        libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40613000)
-        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
-        libdl.so.2 => /lib/libdl.so.2 (0x40644000)
-        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40647000)
-        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40650000)
-
- -

-Retrace your steps if this doesn't look right. -

- - -

1.4 Installing the header and library files

- -

-The standard location for the OpenGL header files on Unix-type systems is -in /usr/include/GL/. -The standard location for the libraries is /usr/lib/. -For more information see, the - -Linux/OpenGL ABI specification. -

- -

-If you'd like Mesa to co-exist with another implementation of OpenGL that's -already installed, you'll have to choose different directories, like -/usr/local/include/GL/ and /usr/local/lib/. -

- -

-To install Mesa's headers and libraries, run make install -You'll be prompted to enter alternative directories for the headers -and libraries. -

- -

-Note: at runtime, you can set the LD_LIBRARY_PATH (on Linux) to switch -between the Mesa libs and another vendor libs whenever you want. -This is a handy way to compare multiple OpenGL implementations. -

- - - - -

2. Windows Compilation and Installation

- -

-Please see the README.WIN32 file. -

- - - - - -

3. VMS Compilation and Installation

- -

-Please see the README.VMS file. -

- - - - - -

4. Other systems

- -

-Documentation for other environments (some may be very out of date): -

- -
- - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/intro.html b/nx-X11/extras/Mesa_6.4.2/docs/intro.html deleted file mode 100644 index 374d124b34..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/intro.html +++ /dev/null @@ -1,306 +0,0 @@ - - -Mesa Introduction - - - - - -

Introduction

- -

-Mesa is a 3-D graphics library with an API which is very similar to -that of OpenGL.* -To the extent that Mesa utilizes the OpenGL command syntax or state -machine, it is being used with authorization from Silicon Graphics, -Inc.(SGI). However, the author does not possess an OpenGL license -from SGI, and makes no claim that Mesa is in any way a compatible -replacement for OpenGL or associated with SGI. Those who want a -licensed implementation of OpenGL should contact a licensed -vendor. -

- -

-Please do not refer to the library as MesaGL (for legal -reasons). It's just Mesa or The Mesa 3-D graphics -library.
-

- -

-* OpenGL is a trademark of Silicon Graphics Incorporated. -

- - -

Project History

- -

-The Mesa project was founded by me, Brian Paul. Here's a short history -of the project. -

- -

-August, 1993: I begin working on Mesa in my spare time. The project -has no name at that point. I was simply interested in writing a simple -3D graphics library that used the then-new OpenGL API. I was partially -inspired by the VOGL library which emulated a subset of IRIS GL. -I had been programming with IRIS GL since 1991. -

- -

-November 1994: I contact SGI to ask permission to distribute my OpenGL-like -graphics library on the internet. SGI was generally receptive to the -idea and after negotiations with SGI's legal department, I get permission -to release it. -

- -

-February 1995: Mesa 1.0 is released on the internet. I expected that -a few people would be interested in it, but not thousands. -I was soon receiving patches, new features and thank-you notes on a -daily basis. That encouraged me to continue working on Mesa. The -name Mesa just popped into my head one day. SGI had asked me not to use -the terms "Open" or "GL" in the project name and I didn't -want to make up a new acronym. Later, I heard of the Mesa programming -language and the Mesa spreadsheet for NeXTStep. -

- -

-In the early days, OpenGL wasn't available on too many systems. -It even took a while for SGI to support it across their product line. -Mesa filled a big hole during that time. -For a lot of people, Mesa was their first introduction to OpenGL. -I think SGI recognized that Mesa actually helped to promote -the OpenGL API, so they didn't feel threatened by the project. -

- - -

-1995-1996: I continue working on Mesa both during my spare time and during -my work hours at the Space Science and Engineering Center at the University -of Wisconsin in Madison. My supervisor, Bill Hibbard, lets me do this because -Mesa is now being using for the Vis5D project. -

-October 1996: Mesa 2.0 is released. It implements the OpenGL 1.1 specification. -

- -

-March 1997: Mesa 2.2 is released. It supports the new 3dfx Voodoo graphics -card via the Glide library. It's the first really popular hardware OpenGL -implementation for Linux. -

- -

-September 1998: Mesa 3.0 is released. It's the first publicly-available -implementation of the OpenGL 1.2 API. -

- -

-March 1999: I attend my first OpenGL ARB meeting. I contribute to the -development of several official OpenGL extensions over the years. -

- -

-September 1999: I'm hired by Precision Insight, Inc. Mesa is a key -component of 3D hardware acceleration in the new DRI project for XFree86. -Drivers for 3dfx, 3dLabs, Intel, Matrox and ATI hardware soon follow. -

- -

-October 2001: Mesa 4.0 is released. -It implements the OpenGL 1.3 specification. -

- - -

-November 2001: I cofound -Tungsten Graphics, Inc. with Keith Whitwell, Jens Owen, David Dawes and -Frank LaMonica. -I continue to develop Mesa as part of my resposibilities with Tungsten -Graphics and as a spare-time project. -

- -

-November 2002: Mesa 5.0 is released. -It implements the OpenGL 1.4 specification. -

- -

-January 2003: Mesa 6.0 is released. It implements the OpenGL 1.5 -specification as well as the GL_ARB_vertex_program and -GL_ARB_fragment_program extensions. -

- - -

-Ongoing: Mesa is used as the core of many hardware OpenGL drivers for -the XFree86 X.org X servers within the -DRI project. -I continue to enhance Mesa with new extensions and features. -

- - - -

Major Versions

- -

-This is a summary of the major versions of Mesa. Note that Mesa's major -version number tracks OpenGL's minor version number (+1). -Work is underway to implement the OpenGL 2.0 specification. -

- - -

Version 6.x features

-

-Version 6.x of Mesa implements the OpenGL 1.5 API with the following -extensions incorporated as standard features: -

-
    -
  • GL_ARB_occlusion_query -
  • GL_ARB_vertex_buffer_object -
  • GL_EXT_shadow_funcs -
-

-Also note that several OpenGL tokens were renamed in OpenGL 1.5 -for the sake of consistency. -The old tokens are still available. -

-
-New Token                   Old Token
-------------------------------------------------------------
-GL_FOG_COORD_SRC            GL_FOG_COORDINATE_SOURCE
-GL_FOG_COORD                GL_FOG_COORDINATE
-GL_CURRENT_FOG_COORD        GL_CURRENT_FOG_COORDINATE
-GL_FOG_COORD_ARRAY_TYPE     GL_FOG_COORDINATE_ARRAY_TYPE
-GL_FOG_COORD_ARRAY_STRIDE   GL_FOG_COORDINATE_ARRAY_STRIDE
-GL_FOG_COORD_ARRAY_POINTER  GL_FOG_COORDINATE_ARRAY_POINTER
-GL_FOG_COORD_ARRAY          GL_FOG_COORDINATE_ARRAY
-GL_SRC0_RGB                 GL_SOURCE0_RGB
-GL_SRC1_RGB                 GL_SOURCE1_RGB
-GL_SRC2_RGB                 GL_SOURCE2_RGB
-GL_SRC0_ALPHA               GL_SOURCE0_ALPHA
-GL_SRC1_ALPHA               GL_SOURCE1_ALPHA
-GL_SRC2_ALPHA               GL_SOURCE2_ALPHA
-
-

-See the - -OpenGL specification for more details. -

- - - -

Version 5.x features

-

-Version 5.x of Mesa implements the OpenGL 1.4 API with the following -extensions incorporated as standard features: -

-
    -
  • GL_ARB_depth_texture -
  • GL_ARB_shadow -
  • GL_ARB_texture_env_crossbar -
  • GL_ARB_texture_mirror_repeat -
  • GL_ARB_window_pos -
  • GL_EXT_blend_color -
  • GL_EXT_blend_func_separate -
  • GL_EXT_blend_logic_op -
  • GL_EXT_blend_minmax -
  • GL_EXT_blend_subtract -
  • GL_EXT_fog_coord -
  • GL_EXT_multi_draw_arrays -
  • GL_EXT_point_parameters -
  • GL_EXT_secondary_color -
  • GL_EXT_stencil_wrap -
  • GL_EXT_texture_lod_bias (plus, a per-texture LOD bias parameter) -
  • GL_SGIS_generate_mipmap -
- - -

Version 4.x features

- -

-Version 4.x of Mesa implements the OpenGL 1.3 API with the following -extensions incorporated as standard features: -

- -
    -
  • GL_ARB_multisample -
  • GL_ARB_multitexture -
  • GL_ARB_texture_border_clamp -
  • GL_ARB_texture_compression -
  • GL_ARB_texture_cube_map -
  • GL_ARB_texture_env_add -
  • GL_ARB_texture_env_combine -
  • GL_ARB_texture_env_dot3 -
  • GL_ARB_transpose_matrix -
- -

Version 3.x features

- -

-Version 3.x of Mesa implements the OpenGL 1.2 API with the following -features: -

-
    -
  • BGR, BGRA and packed pixel formats -
  • New texture border clamp mode -
  • glDrawRangeElements() -
  • standard 3-D texturing -
  • advanced MIPMAP control -
  • separate specular color interpolation -
- - -

Version 2.x features

-

-Version 2.x of Mesa implements the OpenGL 1.1 API with the following -features. -

-
    -
  • Texture mapping: -
      -
    • glAreTexturesResident -
    • glBindTexture -
    • glCopyTexImage1D -
    • glCopyTexImage2D -
    • glCopyTexSubImage1D -
    • glCopyTexSubImage2D -
    • glDeleteTextures -
    • glGenTextures -
    • glIsTexture -
    • glPrioritizeTextures -
    • glTexSubImage1D -
    • glTexSubImage2D -
    -
  • Vertex Arrays: -
      -
    • glArrayElement -
    • glColorPointer -
    • glDrawElements -
    • glEdgeFlagPointer -
    • glIndexPointer -
    • glInterleavedArrays -
    • glNormalPointer -
    • glTexCoordPointer -
    • glVertexPointer -
    -
  • Client state management: -
      -
    • glDisableClientState -
    • glEnableClientState -
    • glPopClientAttrib -
    • glPushClientAttrib -
    -
  • Misc: -
      -
    • glGetPointer -
    • glIndexub -
    • glIndexubv -
    • glPolygonOffset -
    -
- - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/libraries.html b/nx-X11/extras/Mesa_6.4.2/docs/libraries.html deleted file mode 100644 index ce0ee70e69..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/libraries.html +++ /dev/null @@ -1,57 +0,0 @@ - - -Libraries and Toolkits - - - - - -

Libraries and Toolkits

- -
    -
  • Apprentice - free OpenInventor work-alike -
  • Coin - OSS Open Inventor clone -
  • Ch - OpenGL bindings for the Ch C/C++ interpreter -
  • FOX - GUI Library -
  • GL4Java - a Java wrapper for OpenGL -
  • GtkGLArea - OpenGL Gtk widget -
  • GtkGLArea-- - OpenGL Gtk-- widget for C++ -
  • GTKpas - OpenGL Gtk widget for FreePascal -
  • FreeGLUT - a GLUT work-alike -
  • Fortran77/90 bindings for OpenGL and Mesa - by William Mitchell -
  • GLOW - a GUI toolkit for GLUT and OpenGL -
  • Glt - an OpenGL C++ toolkit -
  • GLUT (GL Utility Toolkit) - by Mark Kilgard -
  • GuileGL - OpenGL and GtkGLArea language bindings for Guile -
  • IDL - Interactive Data Language -
  • JX - C++ application framework and GUI library -
  • MAM/VRS - object-oriented toolkit for 3D graphics -
  • MINOS - GUI library -
  • OglCLib - C++ wrapper for OpenGL -
  • Open Inventor - the Open Inventor toolkit from SGI -
  • Open Inventor - the Open Inventor toolkit from Template Graphics Software, Inc. -
  • OpenRM -- Open Source, multithreaded, parallel scene graph API -
  • -Open SG PLUS - a scene-graph library -
  • Open Scene Graph - - a scene-graph library -
  • OpenVRML -- a VRML parsing/display library with "lookat" - an example VRML browser -
  • PLIB - A collection of portable games libraries, including an OpenGL GUI and a simple Scene Graph API -
  • Pryan - an OpenInventor-like toolkit -
  • PyOpenGL - OpenGL interface for Python -
  • Quesa - QuickDraw3D-compatible library based on OpenGL, Mesa or Direct3D -
  • repGL - IRIS GL emulated with OpenGL -
  • SciTech MGL - A multiplatform (Windows, Linux, OS/2, DOS, QNX, SMX, RT-Target & more) graphics library -
  • SGL - a 3D Scene Graph Library -
  • SoFree - a free implementation of Open Inventor -
  • Togl - Tcl/Tk widget for OpenGL -
  • VLE - Virtual Reality Toolkit -
  • View3D Widget - 3-D GUI widget -
  • VTK - Visualization Toolkit -
  • YAJOGL - Yet Another Java GL Binding. -
- - - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/docs/license.html b/nx-X11/extras/Mesa_6.4.2/docs/license.html deleted file mode 100644 index dd878619be..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/license.html +++ /dev/null @@ -1,86 +0,0 @@ - - -License / Cppyright Information - - - - - -

License / Copyright Information

- -

-The Mesa distribution consists of several components. Different copyrights -and licenses apply to different components. For example, GLUT is copyrighted -by Mark Kilgard, some demo programs are copyrighted by SGI, some of the Mesa -device drivers are copyrighted by their authors. See below for a list of -Mesa's main components and the license for each. -

-

-The core Mesa library is licensed according to the terms of the MIT license. -This allows integration with the XFree86, Xorg and DRI projects. -

-

-The default Mesa license is as follows: -

- -
-Copyright (C) 1999-2005  Brian Paul   All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- - -

Attention, Contributors

- -

-When contributing to the Mesa project you must agree to the licensing terms -of the component to which you're contributing. -The following section lists the primary components of the Mesa distribution -and their respective licenses. -

- - -

Mesa Component Licenses

- -
-Component         Location               Primary Author      License
-----------------------------------------------------------------------------
-Main Mesa code    src/mesa/              Brian Paul          Mesa (MIT)
-
-Device drivers    src/mesa/drivers/*     See drivers         See drivers
-
-Ext headers       include/GL/glext.h     SGI                 SGI Free B
-                  include/GL/glxext.h
-
-GLUT              src/glut/              Mark Kilgard        Mark's copyright
-
-Mesa GLU library  src/glu/mesa/          Brian Paul          GNU-LGPL
-
-SGI GLU library   src/glu/sgi/           SGI                 SGI Free B
-
-demo programs     progs/demos/           various             see source files
-
-X demos           progs/xdemos/          Brian Paul          see source files
-
-SGI demos         progs/samples/         SGI                 SGI copyright
-
-RedBook demos     progs/redbook/         SGI                 SGI copyright
-
- - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/lists.html b/nx-X11/extras/Mesa_6.4.2/docs/lists.html deleted file mode 100644 index 76ebf32c3f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/lists.html +++ /dev/null @@ -1,55 +0,0 @@ - - -Mesa Mailing Lists - - - - - -

Mailing Lists

- - -

There are four Mesa mailing lists:

-
    -
  • mesa3d-users - intended for users of the Mesa library. -Newbie questions are appropriate, but please try reading the Mesa documentation first. -
  • mesa3d-dev - intended for developers of the Mesa library. -This is not for beginners. -
  • mesa3d-cvs - CVS check-in messages are sent to this list. -This is useful for tracking ongoing development changes. -
  • mesa3d-announce - announcements of new Mesa versions are sent to this list. -
- -

-To subscribe or unsubscribe, go to the - -SourceForge lists page. -

- -

The mailing lists are managed by SourceForge. If you're having trouble -with the mailing lists please contact the SourceForge administrators for help.

- -

Archives of the old Mesa mailing list which was hosted by unicamp.br -are available here.

- -

-Here are some other OpenGL-related forums you might find useful: -

- -

-Usenet newsgroups: -

    -
  • comp.graphics.algorithms -
  • comp.graphics.api.opengl -
  • comp.os.linux.x -
-

- -

-OpenGL discussion forums -at www.opengl.org -

- - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/mangling.html b/nx-X11/extras/Mesa_6.4.2/docs/mangling.html deleted file mode 100644 index cb19e7568a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/mangling.html +++ /dev/null @@ -1,28 +0,0 @@ - - -Function Name Mangling - - - - - -

Function Name Mangling

- -

-If you want to use Mesa and native OpenGL in the same application at -the same time you may find it useful to compile Mesa with -name mangling. -This results in all the Mesa functions being prefixed with -mgl instead of gl. -

- -

-To do this, recompile Mesa with the compiler flag -DUSE_MGL_NAMESPACE. -Add the flag to the other compiler flags in Make-config (if using the -old-style build system) or in src/Makefile if using GNU autoconf/ -automake to build Mesa. -

- - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/mesa.css b/nx-X11/extras/Mesa_6.4.2/docs/mesa.css deleted file mode 100644 index a53a9df8b0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/mesa.css +++ /dev/null @@ -1,33 +0,0 @@ -/* Mesa CSS */ -body { - background-color: #ffffff; - font: 14px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif; - color: black; - link: #111188; -} - -h1 { - font: 24px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif; - font-weight: bold; - color: black; -} - -h2 { - font: 18px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif, bold; - font-weight: bold; - color: black; -} - -code { - font-family: monospace; - font-size: 10pt; - color: black; -} - - -pre { - /*font-family: monospace;*/ - font-size: 10pt; - /*color: black;*/ -} - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/modelers.html b/nx-X11/extras/Mesa_6.4.2/docs/modelers.html deleted file mode 100644 index 617a031596..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/modelers.html +++ /dev/null @@ -1,70 +0,0 @@ - - -Modelers, Renderers and Viewers - - - - - -

Modelers, Renderers and Viewers

- - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/news.html b/nx-X11/extras/Mesa_6.4.2/docs/news.html deleted file mode 100644 index 1a0c217b88..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/news.html +++ /dev/null @@ -1,1165 +0,0 @@ - - -Mesa News - - - - - - - -

News

- - -

February 2, 2006

-

-Mesa 6.4.2 has been released. This is primarily a bug-fix release. -

-
-    New items:
-	- added OSMesaColorClamp() function/feature
-	- added wglGetExtensionStringARB() function
-    Bug fixes:
-	- fixed some problems when building on Windows
-	- GLw header files weren't installed by installmesa script (bug 5396)
-	- GL/glfbdev.h file was missing from tarballs
-
-

-The MD5 checksums are: -

-
-TBD
-
- - -

November 29, 2005

-

-Mesa 6.4.1 has been released. This is a stable, bug-fix release. -

-
-    Bug fixes:
-	- redefining a vertex program string didn't take effect in TNL module
-	- fixed occasional segfault upon vertex/fragment parsing error
-	- vertex program LIT instruction didn't handle 0^0=1 correctly
-	- fragment program fog option didn't work with glDrawPixels, glBitmap
-	- USE_MGL_NAMESPACE didn't work for x86-64
-	- OSMesa demos were missing from previous release tarballs
-	- fixed problem with float->ushort conversion in glClear (bug 4992)
-	- popping of GL_EYE_PLANE texgen state was broken (bug 4996)
-	- popping of GL_SPOT_DIRECTION light state was broken (bug 5005)
-	- fixed occasional triangle color interpolation problem on VMS
-	- work around invalid free() call (bug 5131)
-	- fixed BSD X server compilation problem by including stdint.h
-
-

-The MD5 checksums are: -

-
-698ceb574cf882b0226761f5913c0da9  MesaLib-6.4.1.tar.gz
-ea148c828ec6f645526451db1b8556f1  MesaLib-6.4.1.tar.bz2
-42e93279468975ed2bf3111b8721e5d9  MesaLib-6.4.1.zip
-e3b0d50807fd2bdcd1a95aaddd786f13  MesaDemos-6.4.1.tar.gz
-99df1fdcb98d391666b476ca6f1dda8a  MesaDemos-6.4.1.tar.bz2
-b999d2c6d92fb4b7740a3dbd889348e3  MesaDemos-6.4.1.zip
-eadfe01fe5ddfb1eb8227dd567b31635  MesaGLUT-6.4.1.tar.gz
-bd003bb4f981a4f91dee4c38644d4f3f  MesaGLUT-6.4.1.tar.bz2
-71c401c037088bf688a88afdaeb3420f  MesaGLUT-6.4.1.zip
-
- - - - -

October 24, 2005

-

-Mesa 6.4 has been released. This is a stable, bug-fix release. -

-
-    New:
-	- Added a fast XOR line drawing function in Xlib driver
-	- Added support for GL_ARB_texture_mirrored_repeat to savage
-	  driver (supported only on Savage4 hardware).
-    Changes:
-	- Mesa now packaged in three parts: Library, Demos and GLUT
-    Bug fixes:
-	- GLX_X_RENDERABLE token wasn't accepted by glXChooseFBConfig
-	- Some files were present multiple times in the 6.3.2 tarballs
-	- r200_vtxtmp_x86.S file was missing from 6.3.2 tarball (bug 4207)
-	- glxgears_fbconfig demo didn't work (bug 4237)
-	- fixed bug when bilinear sampling 2d textures with borders
-	- glXCreatePbuffer() could segfault instead of returning 0 (bug 4235)
-	- fixed undefined frexp and rand in X.org libGLcore.a (bug 4242)
-	- fixed a few problems with proxy color tables (bug 4270)
-	- fixed precision problem in Z clearing (bug 4395)
-	- glBitmap, glDraw/CopyPixels mistakenly generated selection hits
-	- fixed potential segfault caused by reading pixels outside
-	  of renderbuffer bounds
-	- glGetTexLevelParameter didn't accept GL_TEXTURE_DEPTH_SIZE_ARB
-	- fixed memory corruption bug involving software alpha buffers
-	- glReadPixels clipped by window bounds was sometimes broken
-	- glDraw/CopyPixels of stencil data ignored the stencil write mask
-	- glReadPixels from a texture bound to a framebuffer object didn't work
-	- glIsRender/FramebufferEXT weren't totally correct
-	- fixed a number of point size attenuation/fade bugs
-	- fixed glFogCoord bug 4729
-	- GLX encoding for transpose matrix functions was broken
-	- fixed broken fragment program KIL and SWZ instructions
-
-

-The MD5 checksums are: -

-
-1cce0c1eb4fd15e9dfe837a1ce0c9812  MesaLib-6.4.tar.gz
-85a84e47a3f718f752f306b9e0954ef6  MesaLib-6.4.tar.bz2
-b976fea4f3ee06354c53f91b6e3f2ffc  MesaLib-6.4.zip
-d8734f2c69bcf7ef9f5ae454a85743ba  MesaDemos-6.4.tar.gz
-1a8c4d4fc699233f5fdb902b8753099e  MesaDemos-6.4.tar.bz2
-607ab7c7a7de0cc5febbdde2bfa03098  MesaDemos-6.4.zip
-3260156f66174322a092be0767962d34  MesaGLUT-6.4.tar.gz
-0465d053f83775f44a12dec4050dfd78  MesaGLUT-6.4.tar.bz2
-02abfcdcdf72ba938ae00f6e3b70fbe0  MesaGLUT-6.4.zip
-
- - -

August 19, 2005

-

-Mesa 6.3.2 has been released. -Note: there was no public release of version 6.3.1. -

-
-    New:
-	- The distribution now includes the DRI drivers and GLX code
-    Changes:
-	- Made the DRI "new" driver interface standard, remove old code
-    Bug fixes:
-	- GL_ARB_vertex/fragment_shader were mistakenly listed in the
-	  extensions string
-	- negative relative addressing in vertex programs was broken
-	- update/fix SPARC assembly code for vertex transformation
-	- fixed memory leak when freeing GLX drawables/renderbuffers
-	- fixed display list memory leak
-	- the GL_PIXEL_MAP_I_TO_I table is now floating point, not integer
-	- wglGetProcAddress() didn't handle wgl-functions
-	- fixed glxext.h cross-compile issue (Colin Harrison)
-	- assorted DRI driver fixes
-
-

-The MD5 checksums are: -

-
-98192e45ed8d69113688f89f90869346  MesaLib-6.3.2.tar.gz
-0df27701df0924d17ddf41185efa8ce1  MesaLib-6.3.2.tar.bz2
-ccb2423aab77fc7e81ce628734586140  MesaLib-6.3.2.zip
-9d0fca0a7d051c34a0b485423fb3e85d  MesaDemos-6.3.2.tar.gz
-96708868450c188205e42229b5d813c4  MesaDemos-6.3.2.tar.bz2
-c5102501e609aa8996d832fafacb8ab9  MesaDemos-6.3.2.zip
-
- - -

July 20, 2005

-

-Mesa 6.3 has been released. -This is a development release with new features, changes and bug fixes. -

-
-    New:
-	- GL_EXT_framebuffer_object extension
-	- GL_ARB_draw_buffers extension
-	- GL_ARB_pixel_buffer_object extension
-	- GL_OES_read_format extension (Ian Romanick)
-	- DirectFB driver (Claudio Ciccani)
-	- x86_64 vertex transformation code (Mikko T.)
-    Changes:
-	- added -stereo option for glxgears demo (Jacek Rosik)
-	- updated the PBuffer demo code in xdemos/ directory
-	- glDeleteTextures/Programs/Buffers() now makes the object ID
-	  available for immediate re-use
-	- assorted 64-bit clean-ups fixes (x86_64 and Win64)
-	- lots of internal changes for GL_EXT_framebuffer_object
-    Bug fixes:
-	- some functions didn't support PBO functionality
-	- glGetTexImage didn't convert color index images to RGBA as required
-	- fragment program texcoords were sometimes wrong for points and lines
-	- fixed problem with negative dot product in arbfplight, fplight demos
-	- fixed bug in perspective correction of antialiased, textured lines
-	- querying GL_POST_CONVOLUTION_ALPHA_BIAS_EXT returned wrong value
-	- fixed a couple per-pixel fog bugs (Soju Matsumoto)
-	- glGetBooleanv(GL_FRAGMENT_PROGRAM_BINDING_NV) was broken
-	- fixed float parsing bug in ARB frag/vert programs (bug 2520)
-	- XMesaGetDepthBuffer() returned incorrect value for bytesPerValue
-	- GL_COLOR_MATERIAL with glColor3 didn't properly set diffuse alpha
-	- glXChooseFBConfig() crashed if attribList pointer was NULL
-	- program state.light[n].spot.direction.w was wrong value (bug 3083)
-	- fragment program fog option required glEnable(GL_FOG) - wrong.
-	- glColorTable() could produce a Mesa implementation error (bug 3135)
-	- RasterPos could get corrupted by color index rendering path
-	- Removed bad XTranslateCoordinates call when rendering to Pixmaps
-	- glPopAttrib() didn't properly restore GL_TEXTURE_GEN enable state
-	- fixed a few Darwin compilation problems
-
-

-The MD5 checksums are: -

-
-0236f552d37514776945d5a013e5bb7b  MesaLib-6.3.tar.gz
-60e1a8f78c4a8c7750a1e95753190986  MesaLib-6.3.tar.bz2
-ca7c950fbace68c70caa822322db7223  MesaLib-6.3.zip
-25ea801645b376c014051804fe4974b2  MesaDemos-6.3.tar.gz
-9248e74872ea88c57ec25c900c295057  MesaDemos-6.3.tar.bz2
-8537dfa734ef258dcc7272097558d434  MesaDemos-6.3.zip
-
- - -

December 9, 2004

-

-Mesa 6.2.1 has been released. -This is a stable release which just fixes bugs since the 6.2 release. -

-
-    Bug fixes:
-	- don't apply regular fog or color sum when using a fragment program
-	- glProgramEnvParameter4fARB always generated an error on
-	  GL_FRAGMENT_PROGRAM_ARB (fdo bug 1645)
-	- glVertexAttrib3svNV and glVertexAttrib3svARB were broken
-	- fixed width/height mix-up in glSeparableFilter2D()
-	- fixed regression in glCopyPixels + convolution
-	- glReadPixels from a clipped front color buffer didn't always work
-	- glTexImage didn't accept GL_RED/GREEN/BLUE as the format
-	- Attempting queries/accesses of VBO 0 weren't detected as errors
-	- paletted textures failed if the palette had fewer than 256 entries
-    Changes:
-	- fixed a bunch of compiler warnings found with gcc 3.4
-	- bug reports should to go bugzilla.freedesktop.org
-
-

-The MD5 checksums are: -

-
-80008a92f6e055d3bfdde2cf331ec3fa  MesaLib-6.2.1.tar.gz
-f43228cd2bf70f583ef3275c1c545421  MesaLib-6.2.1.tar.bz2
-dec26cfd40116ad021020fea2d94f652  MesaLib-6.2.1.zip
-2c7af3c986a7571c8713c8bfee7e49e3  MesaDemos-6.2.1.tar.gz
-3cac74667b50bcbd4f67f594fb4224a2  MesaDemos-6.2.1.tar.bz2
-75b3edd12eb2b370caf05f29b99e508a  MesaDemos-6.2.1.zip
-
- - -

October 2, 2004

-

-Mesa 6.2 has been released. -This is a stable release which just fixes bugs since the 6.1 release. -

-
-    New:
-	- enabled GL_ARB_texture_rectangle (same as GL_NV_texture_rectangle)
-	- updated Doxygen support (Jose Fonseca)
-    Changes:
-	- some GGI driver updates (Christoph Egger, bug 1025977)
-    Bug fixes:
-	- Omit GL_ARB_texture_non_power_of_two from list of OpenGL 1.5 features
-	- fixed a few compilation issues on IRIX
-	- fixed a matrix classification bug (reported by Wes Bethel)
-	- we weren't reseting the vertex/fragment program error state
-	  before parsing (Dave Reveman)
-	- adjust texcoords for sampling texture rectangles (Dave Reveman)
-	- glGet*(GL_MAX_VERTEX_ATTRIBS_ARB) wasn't implemented
-	- repeated calls to glDeleteTexture(t) could lead to a crash
-	- fixed potential ref count bugs in VBOs and vertex/fragment programs
-	- spriteblast demo didn't handle window size changes correctly
-	- glTexSubImage didn't handle pixels=NULL correctly for PBOs
-	- fixed color index mode glDrawPixels bug (Karl Schultz)
-
-

-The MD5 checksums are: -

-
-9e8f34b059272dbb8e1f2c968b33bbf0  MesaLib-6.2.tar.gz
-3d6a6362390b6a37d3cb2e615f3ac7db  MesaLib-6.2.tar.bz2
-6cfd7895d28e695c0dbbed9469564091  MesaLib-6.2.zip
-3e06e33b0809f09855cb60883b8bdfef  MesaDemos-6.2.tar.gz
-9d160009c3dfdb35fe7e4088c9ba8f85  MesaDemos-6.2.tar.bz2
-856f7ec947122eb3c8985ebc2f654dcd  MesaDemos-6.2.zip
-
- - -

August 18, 2004

-

-Mesa 6.1 has been released. -This is a new development release (version 6.2 will be a stabilization -release). -

-
-    New:
-	- Revamped Makefile system
-	- glXUseRotatedXFont() utility (see xdemos/xuserotfont.c)
-	- internal driver interface changes related to texture object
-	  allocation, vertex/fragment programs, BlendEquationSeparate, etc.
-	- option to walk triangle edges with double-precision floats
-	  (Justin Novosad of Discreet) (see config.h file)
-	- support for AUX buffers in software GLX driver
-	- updated glext.h to version 24 and glxext.h to version 6
-	- new MESA_GLX_FORCE_ALPHA and MESA_GLX_DEPTH_BITS env vars
-	- updated BeOS support (Philippe Houdoin)
-    Changes:
-	- fragment fog interpolation is perspective corrected now
-	- new glTexImage code, much cleaner, may be a bit faster
-    Bug fixes:
-	- glArrayElement in display lists didn't handle generic vertex attribs
-	- glFogCoord didn't always work properly
-	- ARB_fragment_program fog options didn't work
-	- frag prog TEX instruction no longer incorrectly divides s,t,r by q
-	- ARB frag prog TEX and TEXP instructions now use LOD=0
-	- glTexEnviv in display lists didn't work
-	- glRasterPos didn't do texgen or apply texture matrix
-	- GL_DOUBLE-valued vertex arrays were broken in some cases
-	- fixed texture rectangle edge/border sampling bugs
-	- sampling an incomplete texture in a fragment program would segfault
-	- glTexImage was missing a few error checks
-	- fixed some minor glGetTexParameter glitches
-	- GL_INTENSITY was mistakenly accepted as a  to glTexImage
-	- fragment program writes to RC/HC register were broken
-	- fixed a few glitches in GL_HP_occlusion_test extension
-	- glBeginQueryARB and glEndQueryARB didn't work inside display lists
-	- vertex program state references were broken
-	- fixed triangle color interpolation bug on AIX (Shane Blackett)
-	- fixed a number of minor memory leaks (bug #1002030)
-
-The MD5 checksums are: -

-
-c9284d295ebcd2e0486cc3cd54e5863c  MesaLib-6.1.tar.gz
-5de1f53ec0709f60fc68fdfed57351f3  MesaLib-6.1.tar.bz2
-483e77cac4789a5d36c42f3c0136d6d8  MesaLib-6.1.zip
-8c46cfa6f9732acc6f6c25724aad0246  MesaDemos-6.1.tar.gz
-89bfe0f6c69b39fd0ebd9fff481a4e9b  MesaDemos-6.1.tar.bz2
-161268531fcc6f0c5a056430ee97e0c1  MesaDemos-6.1.zip
-
- - - -

April 2, 2004

- -

-Mesa 6.0.1 has been released. -This release basically just fixes bugs since the 6.0. release. -

-
-    New:
-	- upgraded glext.h to version 22
-	- new build targets (Dan Schikore)
-	- new linux-x86-opteron build target (Heath Feather)
-    Bug fixes:
-	- glBindProgramARB didn't update all necessary state
-	- fixed build problems on OpenBSD
-	- omit CVS directories from tarballs
-	- glGetTexImage(GL_COLOR_INDEX) was broken
-	- fixed an infinite loop in t&l module
-	- silenced some valgrind warnings about using unitialized memory
-	- fixed some compilation/link glitches on IRIX (Mike Stephens)
-	- glBindProgram wasn't getting compiled into display lists
-	- GLX_FBCONFIG_ID wasn't recognized in glXChooseFBConfig() (bug 888079)
-	- two-sided lighting and vertex program didn't work (bug 887330)
-	- stores to program parameter registers in vertex state programs
-	  didn't work.
-	- fixed glOrtho bug found with gcc 3.2.2 (RH9)
-	- glXCreateWindow() wasn't fully implemented (bug 890894)
-	- generic vertex attribute arrays didn't work in display lists
-	- vertex buffer objects' default usage and access fields were wrong
-	- glDrawArrays with start!=0 was broken
-	- fragment program PK2H, UP2H, UP4B and UP4UB instructions were broken
-	- linux-osmesa16-static config didn't work
-	- fixed a few color index rendering problems (bug 910687)
-	- glInterleavedArrays didn't respect GL_CLIENT_ACTIVE_TEXTURE
-	- OSMesa RGB and BGR modes were broken
-	- glProgramStringARB mistakenly required a null-terminated string
-	- fragment program XPD instruction was incorrect
-	- glGetMaterial() didn't work reliably
-
-The MD5 checksums are: -

-
-011be0e79666c7a6eb9693fbf9348653  MesaLib-6.0.1.tar.gz
-b7f14088c5c2f14490d2739a91102112  MesaLib-6.0.1.tar.bz2
-bf0510cf0a2b87d64cdd317eca3f1db1  MesaLib-6.0.1.zip
-b7b648599e0aaee1c4ffc554a2a9139e  MesaDemos-6.0.1.tar.gz
-dd6aadfd9ca8e1cfa90c6ee492bc6f43  MesaDemos-6.0.1.tar.bz2
-eff71d59c211825e949199852f5a2316  MesaDemos-6.0.1.zip
-
- - - -

January 16, 2004

- -

-Mesa 6.0 has been released. This is a stabilization of the 5.1 release -and primarily just incorporates bug fixes. -

-
-    New:
-	- full OpenGL 1.5 support
-	- updated GL/glext.h file to version 21
-    Changes:
-	- changed max framebuffer size to 4Kx4K (MAX_WIDTH/HEIGHT in config.h)
-    Bug fixes:
-	- fixed bug in UNCLAMPED_FLOAT_TO_UBYTE macro; solves a color
-	  clamping issue
-	- updated suno5-gcc configs
-	- glColor3 functions sometimes resulted in undefined alpha values
-	- fixed FP divide by zero error seen on VMS with xlockmore, others
-	- fixed vertex/fragment program debug problem (bug 873011)
-	- building on AIX with gcc works now
-	- glDeleteProgramsARB failed for ARB fragment programs (bug 876160)
-	- glDrawRangeElements tried to modify potentially read-only storage
-	- updated files for building on Windows
-
- - - -

December 28, 2003

- -

-The Mesa CVS server has been moved to -freedesktop.org because of problems with SourceForge's anonymous -CVS service. -

- -

Please see the CVS access page for details. -

- - -

December 17, 2003

- -

-Mesa 5.1 has been released. This is a new development release. -Mesa 6.0 will be the next stable release and will support all -OpenGL 1.5 features. -

-
-    New features:
-	- reorganized directory tree
-	- GL_ARB_vertex/fragment_program extensions (Michal Krol & Karl Rasche)
-	- GL_ATI_texture_env_combine3 extension (Ian Romanick)
-	- GL_SGI_texture_color_table extension (Eric Plante)
-	- GL_NV_fragment_program extension
-	- GL_NV_light_max_exponent extension
-	- GL_EXT_texture_rectangle (identical to GL_NV_texture_rectangle)
-	- GL_ARB_occlusion_query extension
-	- GL_ARB_point_sprite extension
-	- GL_ARB_texture_non_power_of_two extension
-	- GL_IBM_multimode_draw_arrays extension
-	- GL_EXT_texture_mirror_clamp extension (Ian Romanick)
-	- GL_ARB_vertex_buffer_object extension
-	- new X86 feature detection code (Petr Sebor)
-	- less memory used for display lists and vertex buffers
-	- demo of per-pixel lighting with a fragment program (demos/fplight.c)
-	- new version (18) of glext.h header
-	- new spriteblast.c demo of GL_ARB_point_sprite
-	- faster glDrawPixels in X11 driver in some cases (see RELNOTES-5.1)
-	- faster glCopyPixels in X11 driver in some cases (see RELNOTES-5.1)
-    Bug fixes:
-	- really enable OpenGL 1.4 features in DOS driver.
-	- fixed issues in glDrawPixels and glCopyPixels for very wide images
-	- glPixelMapf/ui/usv()'s size parameter is GLsizei, not GLint
-	- fixed some texgen bugs reported by Daniel Borca
-	- fixed wglMakeCurrent(NULL, NULL) bug (#835861)
-	- fixed glTexSubImage3D z-offset bug (Cedric Gautier)
-	- fixed RGBA blend enable bug (Ville Syrjala)
-	- glAccum is supposed to be a no-op in selection/feedback mode
-	- fixed texgen bug #597589 (John Popplewell)
-    Changes:
-	- dropped API trace feature (src/Trace/)
-	- documentation overhaul.  merged with website content.  more html.
-	- glxgears.c demo updated to use GLX swap rate extensions
-	- glTexImage1/2/3D now allows width/height/depth = 0
-	- disable SPARC asm code on Linux (bug 852204)
-
- -The MD5 checksums are: -

-
-78f452f6c55478471a744f07147612b5  MesaLib-5.1.tar.gz
-67b3b8d3f7f4c8c44904551b851d01af  MesaLib-5.1.tar.bz2
-6dd19ffa750ec7f634e370a987505c9d  MesaLib-5.1.zip
-e0214d4ebb22409dfa9262f2b52fd828  MesaDemos-5.1.tar.gz
-066c9aff4fd924405de1ae9bad5ec9a7  MesaDemos-5.1.tar.bz2
-d2b5ba32b53e0ad0576c637a4cc1fb41  MesaDemos-5.1.zip
-
- - -

November 12, 2003

- -

-New Mesa 5.0.2 tarballs have been uploaded to SourceForge which fix a -number of automake/libtool problems. -

-

-The new MD5 checksums are: -

-
-a9dcf3ff9ad1b7d6ce73a0df7cff8b5b  MesaLib-5.0.2.tar.gz
-7b4bf9261657c2fca03796d4955e6f50  MesaLib-5.0.2.tar.bz2
-79c141bddcbad557647535d02194f346  MesaLib-5.0.2.zip
-952d9dc823dd818981d1a648d7b2668a  MesaDemos-5.0.2.tar.gz
-b81fafff90995025d2f25ea02b786642  MesaDemos-5.0.2.tar.bz2
-a21be975589e8a2d1871b6bb7874fffa  MesaDemos-5.0.2.zip
-
- - - -

September 5, 2003

- -

-Mesa 5.0.2 has been released. This is a stable, bug-fix release. -

-
-    Bug fixes:
-	- fixed texgen problem causing texcoord's Q to be zero (stex3d)
-	- default GL_TEXTURE_COMPARE_MODE_ARB was wrong
-	- GL_CURRENT_MATRIX_NV query was wrong
-	- GL_CURRENT_MATRIX_STACK_DEPTH_NV query was off by one
-	- GL_LIST_MODE query wasn't correct
-	- GL_FOG_COORDINATE_SOURCE_EXT query wasn't supported
-	- GL_SECONDARY_COLOR_ARRAY_SIZE_EXT query returned wrong value
-	- blended, wide lines didn't always work correctly (bug 711595)
-	- glVertexAttrib4svNV w component was always 1
-	- fixed bug in GL_IBM_rasterpos_clip (missing return)
-	- GL_DEPTH_TEXTURE_MODE = GL_ALPHA didn't work correctly
-	- a few Solaris compilation fixes
-	- fixed glClear() problem for DRI drivers (non-existant stencil, etc)
-	- fixed int/REAL mixup in GLU NURBS curve evaluator (Eric Cazeaux)
-	- fixed delete [] bug in SI GLU (bug 721765) (Diego Santa Cruz)
-	- glFog() didn't clamp fog colors
-	- fixed bad float/int conversion for GL_TEXTURE_PRIORITY in the
-	  gl[Get]TexParameteri[v] functions
-	- fixed invalid memory references in glTexGen functions (bug 781602)
-	- integer-valued color arrays weren't handled correctly
-	- glDrawPixels(GL_DEPTH_COMPONENT) with glPixelZoom didn't work
-	- GL_EXT_texture_lod_bias is part of 1.4, overlooked in 5.0.1
-    Changes:
-	- build GLUT with -fexceptions so C++ apps propogate exceptions
-
- - - -

June 2003

- -

-Mesa's directory tree has been overhauled. -Things are better organized now with some thought toward future needs. -

-

-In CVS, the latest Mesa 5.1 development code is now rooted under the -Mesa-newtree/ directory. The old top-level Mesa/ directory -holds the Mesa 5.0.x code which will be abandoned at some point. -

- - - -

March 30, 2003

- -

-Mesa 5.0.1 has been released. This is a stable, bug-fix release. -

-
-    New:
-	- DOS driver updates from Daniel Borca
-	- updated GL/gl_mangle.h file (Bill Hoffman)
-    Bug fixes:
-	- auto mipmap generation for cube maps was broken (bug 641363)
-	- writing/clearing software alpha channels was unreliable
-	- minor compilation fixes for OS/2 (Evgeny Kotsuba)
-	- fixed some bad assertions found with shadowtex demo
-	- fixed error checking bug in glCopyTexSubImage2D (bug 659020)
-	- glRotate(angle, -x, 0, 0) was incorrect (bug 659677)
-	- fixed potential segfault in texture object validation (bug 659012)
-	- fixed some bogus code in _mesa_test_os_sse_exception_support (Linus)
-	- fix fog stride bug in tnl code for h/w drivers (Michel Danzer)
-	- fixed glActiveTexture / glMatrixMode(GL_TEXTURE) bug (#669080)
-	- glGet(GL_CURRENT_SECONDARY_COLOR) should return 4 values, not 3
-	- fixed compilation problem on Solaris7/x86 (bug 536406)
-	- fixed prefetch bug in 3DNow! code (Felix Kuhling)
-	- fixed NeXT build problem (FABSF macro)
-	- glDrawPixels Z values when glPixelZoom!=1 were invalid (bug 687811)
-	- zoomed glDraw/CopyPixels with clipping sometimes failed (bug 689964)
-	- AA line and triangle Z values are now rounded, not truncated
-	- fixed color interpolation bug when GLchan==GLfloat (bug 694461)
-	- glArePrograms/TexturesResident() wasn't 100% correct (Jose Fonseca)
-	- fixed a minor GL_COLOR_MATERIAL bug
-	- NV vertex program EXP instruction was broken
-	- glColorMask misbehaved with X window / pixmap rendering
-	- fix autoconf/libtool GLU C++ linker problem on Linux (a total hack)
-	- attempt to fix GGI compilation problem when MesaDemos not present
-	- NV vertex program ARL-relative fetches didn't work
-    Changes:
-	- use glPolygonOffset in gloss demo to avoid z-fighting artifacts
-	- updated winpos and pointblast demos to use ARB extensions
-	- disable SPARC normal transformation code (bug 673938)
-	- GLU fixes for OS/2 (Evgeny Kotsuba)
-
-

-MD5 checksums follow: -

-
-b80f8b5d53a3e9f19b9fde5af0c542f0  MesaLib-5.0.1.tar.gz
-513b4bbd7d38951f05027179063d876b  MesaLib-5.0.1.tar.bz2
-eebd395678f4520d33b267e5d5c22651  MesaLib-5.0.1.zip
-49d7feaec6dc1d2091d7c3cc72a9b320  MesaDemos-5.0.1.tar.gz
-37190374a98c3c892f0698be9ca3acf0  MesaDemos-5.0.1.tar.bz2
-becd8bf17f5791361b4a54ba2a78e5c9  MesaDemos-5.0.1.zip
-
- - - -

March 7, 2003

-

-Website and documentation overhaul. -

-

-The website content and Mesa documentation (from the doc/ directory) have -been merged together. -All the documentation files have been entered into the CVS repository. -Many of the old plain-text files have been converted to html and modernized. -

- - -

November 13, 2002

-

Mesa 5.0 has been released. This is a stable release which -implements the OpenGL 1.4 specification. -

New:
-    - OpenGL 1.4 support (glGetString(GL_VERSION) returns "1.4")
-    - removed some overlooked debugging code
-    - glxinfo updated to support GLX_ARB_multisample
-    - GLUT now support GLX_ARB_multisample
-    - updated DOS driver (Daniel Borca)
-Bug fixes:
-    - GL_POINT and GL_LINE-mode polygons didn't obey cull state
-    - fixed potential bug in _mesa_align_malloc/calloc()
-    - fixed missing triangle bug when running vertex programs
-    - fixed a few HPUX compilation problems
-    - FX (Glide) driver didn't compile
-    - setting GL_TEXTURE_BORDER_COLOR with glTexParameteriv() didn't work
-    - a few EXT functions, like glGenTexturesEXT, were no-ops
-    - a few OpenGL 1.4 functions like glFogCoord*, glBlendFuncSeparate,
-      glMultiDrawArrays and glMultiDrawElements were missing
-    - glGet*(GL_ACTIVE_STENCIL_FACE_EXT) was broken
-    - Pentium 4 Mobile was mistakenly identified as having 3DNow!
-    - fixed one-bit error in point/line fragment Z calculation
-    - fixed potential segfault in fakeglx code
-    - fixed color overflow problem in DOT3 texture env mode
-
- - -

October 29, 2002

-

Mesa 4.1 has been released. This is a new development release. -For a stable release, get 4.0.4. -

New:
-    - GL_NV_vertex_program extension
-    - GL_NV_vertex_program1_1 extension
-    - GL_ARB_window_pos extension
-    - GL_ARB_depth_texture extension
-    - GL_ARB_shadow extension
-    - GL_ARB_shadow_ambient extension
-    - GL_EXT_shadow_funcs extension
-    - GL_ARB_point_parameters extension
-    - GL_ARB_texture_env_crossbar
-    - GL_NV_point_sprite extension
-    - GL_NV_texture_rectangle extension
-    - GL_EXT_multi_draw_arrays extension
-    - GL_EXT_stencil_two_side extension
-    - GLX_SGIX_fbconfig and GLX_SGIX_pbuffer extensions
-    - GL_ATI_texture_mirror_once extension (Ian Romanick)
-    - massive overhaul/simplification of software rasterizer module,
-      many contributions from Klaus Niederkrueger
-    - faster software texturing in some cases (i.e. trilinear filtering)
-    - new OSMesaGetProcAddress() function
-    - more blend modes implemented with MMX code (Jose Fonseca)
-    - added glutGetProcAddress() to GLUT
-    - added GLUT_FPS env var to compute frames/second in glutSwapBuffers()
-    - pbinfo and pbdemo PBuffer programs
-    - glxinfo -v prints transprent pixel info (Gerd Sussner)
-Bug fixes:
-    - better mipmap LOD computation (prevents excessive blurriness)
-    - OSMesaMakeCurrent() didn't recognize buffer size changes
-    - assorted conformance fixes for 16-bit/channel rendering
-    - texcombine alpha subtraction mode was broken
-    - fixed some blend problems when GLchan==GLfloat (Gerk Huisma)
-    - clamp colors to [0,1] in OSMesa if GLchan==GLfloat (Gerk Huisma)
-    - fixed divide by zero error in NURBS tessellator (Jon Perry)
-    - fixed GL_LINEAR fog bug by adding clamping
-    - fixed FP exceptions found using Alpha CPU
-    - 3dfx/glide driver render-to-window feature was broken
-    - added missing GLX_TRANSPARENT_RGB token to glx.h
-    - fixed error checking related to paletted textures
-    - fixed reference count error in glDeleteTextures (Randy Fayan)
-Changes:
-    - New spec file and Python code to generate some GL dispatch files
-    - Glide driver defaults to "no" with autoconf/automake
-    - floating point color channels now clamped to [0,inf)
-    - updated demos/stex3d with new options
-
- - -

October 4, 2002

-

-The Mesa FAQ has been rewritten. -

- -

October 3, 2002

-

Mesa 4.0.4 has been released. This is a stable bug-fix release. -

    New:
-	- GL_NV_texture_rectangle extension
-	- updated glext.h header (version 17)
-	- updated DOS driver (Daniel Borca)
-	- updated BeOS R5 driver (Philippe Houdoin)
-	- added GL_IBM_texture_mirror_repeat
-	- glxinfo now takes -l option to print interesting OpenGL limits info
-	- GL_MESA_ycbcr_texture extension
-	- GL_APPLE_client_storage extension (for some DRI drivers only)
-	- GL_MESA_pack_invert extension
-    Bug fixes:
-	- fixed GL_LINEAR fog bug by adding clamping
-	- fixed FP exceptions found using Alpha CPU
-	- 3dfx MESA_GLX_FX=window (render to window) didn't work
-	- fixed memory leak in wglCreateContest (Karl Schultz)
-	- define GLAPIENTRY and GLAPI if undefined in glu.h
-	- wglGetProcAddress didn't handle all API functions
-	- when testing for OpenGL 1.2 vs 1.3, check for GL_ARB_texture_cube_map
-	- removed GL_MAX_CONVOLUTION_WIDTH/HEIGHT from glGetInteger/Float/etc()
-	- error checking in compressed tex image functions had some glitches
-	- fixed AIX compile problem in src/config.c
-	- glGetTexImage was using pixel unpacking instead of packing params
-	- auto-mipmap generation for cube maps was incorrect
-    Changes:
-	- max texture units reduced to six to accomodate texture rectangles
-	- removed unfinished GL_MESA_sprite_point extension code
-
- -

June 25, 2002

-

Mesa 4.0.3 has been released. This is a stable bug-fix release. -

    New:
-    - updated GL/glext.h file (version 15)
-    - corrected MMX blend code (Jose Fonseca)
-    - support for software-based alpha planes in Windows driver
-    - updated GGI driver (Filip Spacek)
-    Bug fixes:
-    - glext.h had wrong values for GL_DOT3_RGB[A]_EXT tokens
-    - OSMesaMakeCurrent() didn't recognize buffer size changes
-    - assorted conformance fixes for 16-bit/channel rendering
-    - texcombine alpha subtraction mode was broken
-    - fixed lighting bug with non-uniform scaling and display lists
-    - fixed bug when deleting shared display lists
-    - disabled SPARC cliptest assembly code (Mesa bug 544665)
-    - fixed a couple Solaris compilation/link problems
-    - blending clipped glDrawPixels didn't always work
-    - glGetTexImage() didn't accept packed pixel types
-    - glPixelMapu[is]v() could explode given too large of pixelmap
-    - glGetTexParameter[if]v() didn't accept GL_TEXTURE_MAX_ANISOTROPY_EXT
-    - glXCopyContext() could lead to segfaults
-    - glCullFace(GL_FRONT_AND_BACK) didn't work (bug 572665)
-    Changes:
-    - lots of C++ (g++) code clean-ups
-    - lots of T&L updates for the Radeon DRI driver
-    Known bugs:
-    - mipmap LOD computation (fixed for Mesa 4.1)
-
- -

April 2, 2002

-

Mesa 4.0.2 has been released. This is a stable bug-fix release. -

    New:
-      - New DOS (DJGPP) driver written by Daniel Borca
-      - New driver interface functions for TCL drivers (such as Radeon DRI)
-      - GL_RENDERER string returns "Mesa Offscreen16" or "Mesa Offscreen32"
-        if using deep color channels
-      - latest GL/glext.h and GL/glxext.h headers from SGI
-    Bug fixes:
-      - GL_BLEND with non-black texture env color wasn't always correct
-      - GL_REPLACE with GL_RGB texture format wasn't always correct (alpha)
-      - glTexEnviv( pname != GL_TEXTURE_ENV_COLOR ) was broken
-      - glReadPixels was sometimes mistakenly clipped by the scissor box
-      - glDraw/ReadPixels didn't catch all the errors that they should have
-      - Fixed 24bpp rendering problem in Windows driver (Karl Schultz)
-      - 16-bit GLchan mode fixes (m_trans_tmp.h, s_triangle.c)
-      - Fixed 1-bit float->int conversion bug in glDrawPixels(GL_DEPTH_COMP)
-      - glColorMask as sometimes effecting glXSwapBuffers()
-      - fixed a potential bug in XMesaGarbageCollect()
-      - N threads rendering into one window didn't work reliably
-      - glCopyPixels didn't work for deep color channels
-      - improved 8 -> 16bit/channel texture image conversion (Gerk Huisma)
-      - glPopAttrib() didn't correctly restore user clip planes
-      - user clip planes failed for some perspective projections (Chromium)
-
- -

December 17, 2001

-

Mesa 4.0.1 has been released. This is a stable bug-fix release. -

    New:
-      - better sub-pixel sample positions for AA triangles (Ray Tice)
-      - slightly faster blending for (GL_ZERO, GL_ONE) and (GL_ONE, GL_ZERO)
-    Bug fixes:
-      - added missing break statements in glGet*() for multisample cases
-      - fixed uninitialized hash table mutex bug (display lists / texobjs)
-      - fixed bad teximage error check conditional (bug 476846)
-      - fixed demos readtex.c compilation problem on Windows (Karl Schultz)
-      - added missing glGet() query for GL_MAX_TEXTURE_LOD_BIAS_EXT
-      - silence some compiler warnings (gcc 2.96)
-      - enable the #define GL_VERSION_1_3 in GL/gl.h
-      - added GL 1.3 and GLX 1.4 entries to gl_mangle.h and glx_mangle.h
-      - fixed glu.h typedef problem found with MSDev 6.0
-      - build libGL.so with -Bsymbolic (fixes bug found with Chromium)
-      - added missing 'const' to glXGetContextIDEXT() in glxext.h
-      - fixed a few glXGetProcAddress() errors (texture compression, etc)
-      - fixed start index bug in compiled vertex arrays (Keith)
-      - fixed compilation problems in src/SPARC/glapi_sparc.S
-      - fixed triangle strip "parity" bug found in VTK medical1 demo (Keith)
-      - use glXGetProcAddressARB in GLUT to avoid extension linking problems
-      - provoking vertex of flat-shaded, color-index triangles was wrong
-      - fixed a few display list bugs (GLUT walker, molecule, etc) (Keith)
-      - glTexParameter didn't flush the vertex buffer (Ray Tice)
-      - feedback attributes for glDraw/CopyPixels and glBitmap were wrong
-      - fixed bug in normal length caching (ParaView lighting bug)
-
- -

October 22, 2001

-

Mesa 4.0 has been released. This is a stable release. -

    New:
-      - Mesa 4.0 implements the OpenGL 1.3 specification
-      - GL_IBM_rasterpos_clip extension
-      - GL_EXT_texture_edge_clamp extension (aka GL_SGIS_texture_edge_clamp)
-      - GL_ARB_texture_mirrored_repeat extension
-      - WindML UGL driver (Stephane Raimbault)
-      - added OSMESA_MAX_WIDTH/HEIGHT queries
-      - attempted compiliation fixes for Solaris 5, 7 and 8
-      - updated glext.h and glxext.h files
-      - updated Windows driver (Karl Schultz)
-    Bug fixes:
-      - added some missing GLX 1.3 tokens to include/GL/glx.h
-      - GL_COLOR_MATRIX changes weren't recognized by teximage functions
-      - glCopyPixels with scale and bias was broken
-      - glRasterPos with lighting could segfault
-      - glDeleteTextures could leave a dangling pointer
-      - Proxy textures for cube maps didn't work
-      - fixed a number of 16-bit color channel bugs
-      - fixed a few minor memory leaks
-      - GLX context sharing was broken in 3.5
-      - fixed state-update bugs in glPopClientAttrib()
-      - fixed glDrawRangeElements() bug
-      - fixed a glPush/PopAttrib() bug related to texture binding
-      - flat-shaded, textured lines were broken
-      - fixed a dangling pointer problem in the XMesa code (Chris Burghart)
-      - lighting didn't always produce the correct alpha value
-      - fixed 3DNow! code to not read past end of arrays (Andrew Lewycky)
-
- - -

June 21, 2001

-

Mesa 3.5 has been released. This is a new development release. -

    New:
-	- internals of Mesa divided into modular pieces (Keith Whitwell)
-	- 100% OpenGL 1.2 conformance (passes all conformance tests)
-	- new AA line algorithm
-	- GL_EXT_convolution extension
-        - GL_ARB_imaging subset
-        - OSMesaCreateContextExt() function
-        - GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add)
-        - GL_MAX_TEXTURE_UNITS_ARB now defaults to eight
-        - GL_EXT_fog_coord extension (Keith Whitwell)
-        - GL_EXT_secondary_color extension (Keith Whitwell)
-        - GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add)
-        - GL_SGIX_depth_texture extension
-        - GL_SGIX_shadow and GL_SGIX_shadow_ambient extensions
-        - demos/shadowtex.c demo of GL_SGIX_depth_texture and GL_SGIX_shadow
-        - GL_ARB_texture_env_combine extension
-        - GL_ARB_texture_env_dot3 extension
-        - GL_ARB_texture_border_clamp (aka GL_SGIS_texture_border_clamp)
-        - OSMesaCreateContextExt() function
-        - libOSMesa.so library, contains the OSMesa driver interface
-        - GL/glxext.h header file for GLX extensions
-        - somewhat faster software texturing, fogging, depth testing
-        - all color-index conformance tests now pass (only 8bpp tested)
-        - SPARC assembly language TCL optimizations (David Miller)
-        - GL_SGIS_generate_mipmap extension
-    Bug Fixes:
-        - fbiRev and tmuRev were unitialized when using Glide3
-        - fixed a few color index mode conformance failures; all pass now
-        - now appling antialiasing coverage to alpha after texturing
-        - colors weren't getting clamped to [0,1] before color table lookup
-        - fixed RISC alignment errors caused by COPY_4UBV macro
-        - drawing wide, flat-shaded lines could cause a segfault
-        - vertices now snapped to 1/16 pixel to fix rendering of tiny triangles
-    Changes:
-        - SGI's Sample Implementation (SI) 1.3 GLU library replaces Mesa GLU
-        - new libOSMesa.so library, contains the OSMesa driver interface
-
- - -

May 17, 2001

-

Mesa 3.4.2 has been released. This is basically just a bug-fix release. -Here's what's new:

-
    Bug fixes:
-        - deleting the currently bound texture could cause bad problems
-        - using fog could result in random vertex alpha values
-         - AA triangle rendering could touch pixels outside right window bound
-        - fixed byteswapping problem in clear_32bit_ximage() function
-        - fixed bugs in wglUseFontBitmapsA(), by Frank Warmerdam
-        - fixed memory leak in glXUseXFont()
-        - fragment sampling in AA triangle function was off by 1/2 pixel
-        - Windows: reading pixels from framebuffer didn't always work
-        - glConvolutionFilter2D could segfault or cause FP exception
-        - fixed segfaults in FX and X drivers when using tex unit 1 but not 0
-        - GL_NAND logicop didn't work right in RGBA mode
-        - fixed a memory corruption bug in vertex buffer reset code
-        - clearing the softwara alpha buffer with scissoring was broken
-        - fixed a few color index mode fog bugs
-        - fixed some bad assertions in color index mode
-        - fixed FX line 'stipple' bug #420091
-    Changes:
-        - optimized writing mono-colored pixel spans to X pixmaps
-        - increased max viewport size to 2048 x 2048
-
- - -

April 29, 2001

-

New Mesa website

-

Mark Manning produced the new website.
Thanks, Mark!

- - -

February 14, 2001

-

Mesa 3.4.1 has been released. Here's what's new:

-
    New:
-        - fixed some Linux build problems
-        - fixed some Windows build problems
-        - GL_EXT_texture_env_dot3 extension (Gareth Hughes)
-    Bug fixes:
-        - added RENDER_START/RENDER_FINISH macros for glCopyTexImage in DRI
-        - various state-update code changes needed for DRI bugs
-        - disabled pixel transfer ops in glColorTable commands, not needed
-        - fixed bugs in glCopyConvolutionFilter1D/2D, glGetConvolutionFilter
-        - updated sources and fixed compile problems in widgets-mesa/
-        - GLX_PBUFFER enum value was wrong in glx.h
-        - fixed a glColorMaterial lighting bug
-        - fixed bad args to Read/WriteStencilSpan in h/w stencil clear function
-        - glXCopySubBufferMESA() Y position was off by one
-        - Error checking of glTexSubImage3D() was broken (bug 128775)
-        - glPopAttrib() didn't restore all derived Mesa state correctly
-        - Better glReadPixels accuracy for 16bpp color - fixes lots of OpenGL
-          conformance problems at 16bpp.
-        - clearing depth buffer with scissoring was broken, would segfault
-        - OSMesaGetDepthBuffer() returned bad bytesPerValue value
-        - fixed a line clipping bug (reported by Craig McDaniel)
-        - fixed RGB color over/underflow bug for very tiny triangles
-    Known problems:
-        - NURBS or evaluator surfaces inside display lists don't always work
-
-

-

November 3, 2000

-

Mesa 3.4 has been released. Here's what's new since the 3.3 release:

-
    New:
-    - optimized glDrawPixels for glPixelZoom(1,-1)
-    Bug Fixes:
-    - widgets-mesa/src/*.c files were missing from 3.3 distro
-    - include/GL/mesa_wgl.h file was missing from 3.3 distro
-    - fixed some Win32 compile problems
-    - texture object priorities weren't getting initialized to 1.0
-    - glAreTexturesResident return value was wrong when using hardware
-    - glXUseXFont segfaulted when using 3dfx driver (via MESA_GLX_FX)
-    - glReadPixels with GLushort packed types was broken
-    - fixed a few bugs in the GL_EXT_texture_env_combine texture code
-    - glPush/PopAttrib(GL_ENABLE_BIT) mishandled multi-texture enables
-    - fixed some typos/bugs in the VB code
-    - glDrawPixels(GL_COLOR_INDEX) to RGB window didn't work
-    - optimized glDrawPixels paths weren't being used
-    - per-fragment fog calculation didn't work without a Z buffer
-    - improved blending accuracy, fixes Glean  blendFunc test failures
-    - glPixelStore(GL_PACK/UNPACK_SKIP_IMAGES) wasn't handled correctly
-    - glXGetProcAddressARB() didn't always return the right address
-    - gluBuild[12]DMipmaps() didn't grok the GL_BGR pixel format
-    - texture matrix changes weren't always detected (GLUT projtex demo)
-    - fixed random color problem in vertex fog code
-    - fixed Glide-related bug that let Quake get a 24-bit Z buffer
-    Changes:
-    - finished internal support for compressed textures for DRI
-
-

-

April 24, 2000

-

Mesa 3.2 has been released. Here's what's new since the beta release:

-
    Bug fixes:
-    - fixed memcpy bugs in span.c
-    - fixed missing glEnd problem in demos/tessdemo.c
-    - fixed bug when clearing 24bpp Ximages
-    - fixed clipping problem found in Unreal Tournament
-    - fixed Loki's "ice bug" and "crazy triangles" seen in Heretic2
-    - fixed Loki's 3dfx RGB vs BGR bug
-    - fixed Loki's 3dfx smooth/flat shading bug in SoF
-    Changes:
-    - updated docs/README file
-    - use bcopy() optimizations on FreeBSD
-    - re-enabled the optimized persp_textured_triangle() function
-
-

-

March 23, 2000

-

I've just upload the Mesa 3.2 beta 1 files to SourceForge at http://sourceforge.net/project/filelist.php?group_id=3

-

3.2 (note even number) is a stabilization release of Mesa 3.1 meaning it's mainly -just bug fixes.

-

Here's what's changed: - -

    - Bug fixes: -
      - - mixed drawing of lines and bitmaps sometimes had wrong colors
      - - added missing glHintPGI() function
      - - fixed a polygon culling bug
      - - fixed bugs in gluPartialDisk()
      - - Z values in selection mode were wrong
      - - added missing tokens: -
        - GL_SMOOTH_POINT_SIZE_RANGE
        - GL_SMOOTH_POINT_SIZE_GRANULARITY
        - GL_SMOOTH_LINE_WIDTH_RANGE
        - GL_SMOOTH_LINE_WIDTH_GRANULARITY
        - GL_ALIASED_POINT_SIZE_RANGE
        - GL_ALIASED_LINE_WIDTH_RANGE -
      - - fixed glCopyPixels when copying from back to front buffer
      - - GL_EXT_compiled_vertex_array tokens had _SGI suffix instead of _EXT
      - - glDrawRangeElements(GL_LINES, 0, 1, 2, type, indices) was broken
      - - glDeleteTextures() didn't decrement reference count correctly
      - - GL_SRCA_ALPHA_SATURATE blend mode didn't work correctly
      - - Actual depth of transformation matrix stacks was off by one
      - - 24bpp visuals didn't address pixels correctly
      - - mipmap level of detail (lambda) calculation simplified, more accurate
      - - 101691 - Polygon clipping and GL_LINE
      - - 101928 - Polygon clipping and GL_LINE (same fix as above)
      - - 101808 - Non-glVertexArrays tristrip bug
      - - 101971 - find_last_3f on Dec OSF (worked around)
      - - 102369 - segv on dec osf (possibly a duplicate of the above)
      - - 102893 - orientations of modelview cause segfault -
    - New: -
      - - updated SVGA Linux driver
      - - added the MESA_FX_NO_SIGNALS env var, see docs/README.3DFX
      - - build libGLw.a (Xt/OpenGL drawing area widget) library by default
      - - changed -O2 to -O3 for a number of gcc configs -
    - Changes: -
      - - glXCopyContext's mask parameter is now unsigned long, per GLX spec -
    -
- -

Please report any problems with this release ASAP. Bugs should be filed on the -Mesa3D website at sourceforge.
-After 3.2 is wrapped up I hope to release 3.3 beta 1 soon afterward.

-

-- Brian

-

-

December 17, 1999

-

A Slashdot interview with Brian about Mesa (questions submitted by Slashdot readers) -can be found at http://slashdot.org/interviews/99/12/17/0927212.shtml.

-

-

December 14, 1999

-

Mesa 3.1 is released!

-

-

September 21, 1999

-

There appear to be two new files on the ftp site, MesaLib-3.1beta3.tar.gz -and MesaDemos-3.1beta3.tar.gz, -that seem to be... yes, I've just received confirmation from the beta center, they -are indeed the THIRD beta release of Mesa 3.1! Happy Days. Happy Days. Thanks -Keith Whitwell for preparing these for us during Brian's absence.

-

-

August 30, 1999

-

I'm pleased to announce that I've accepted a position with Precision Insight, -Inc. effective October, 1999. I'll be leaving Avid Technology in September.

-

I've been working on Mesa in my spare time for over five years. With Precision -Insight I now have the opportunity to devote my full attention to advancing Mesa -and OpenGL on Linux.

-

While I'll be focused on Linux, the X Window System, and hardware acceleration, -my work will continue to be open sourced and available to any other programmers who -may want to contribute to it, or use it for other projects or platforms

-

PS: I'm going to be traveling until Sep 6 and won't be reading email until then.

-

-

August 23, 1999

-

Anonymous CVS access is back online so suck up all the bandwidth you can afford. -Note that this is a new archive, so you will need to re-checkout the archive. That -means don't cvs update from a previous download.

-

-

August 17, 1999

-

A report from the SIGGRAPH '99 Linux/OpenGL -BOF meeting is now available.

-

-Brian

-

-

August 14, 1999

-

www.mesa3d.org is having technical problems due to hardware failures at VA Linux -systems. The Mac pages, ftp, and CVS services aren't fully restored yet. Please be -patient.

-

-Brian

-

-

June 7, 1999

-

RPMS of the nVidia RIVA server can be found at ftp://ftp.mesa3d.org/mesa/misc/nVidia/.

-

-

June 2, 1999

-

nVidia has released some Linux binaries for -xfree86 3.3.3.1, along with the full source, which includes GLX acceleration -based on Mesa 3.0. They can be downloaded from http://www.nvidia.com/Products.nsf/htmlmedia/software_drivers.html.

-

-

May 24, 1999

-

Beta 2 of Mesa 3.1 has been make available at ftp://ftp.mesa3d.org/mesa/beta/. -If you are into the quake scene, you may want to try this out, as it contains some -optimizations specifically in the Q3A rendering path. -

-

May 13, 1999

-

For those interested in the integration of Mesa into XFree86 4.0, Precision Insight -has posted their lowlevel design documents at http://www.precisioninsight.com.

-

-

May 13, 1999

-
May 1999 - John Carmack of id Software, Inc. has made a donation of
-US$10,000 to the Mesa project to support its continuing development.
-Mesa is a free implementation of the OpenGL 3D graphics library and id's
-newest game, Quake 3 Arena, will use Mesa as the 3D renderer on Linux.
-
-The donation will go to Keith Whitwell, who has been optimizing Mesa to
-improve performance on 3d hardware.  Thanks to Keith's work, many
-applications using Mesa 3.1 will see a dramatic performance increase
-over Mesa 3.0.  The donation will allow Keith to continue working on
-Mesa full time for some time to come.
-
-For more information about Mesa see www.mesa3d.org.  For more
-information about id Software, Inc. see www.idsoftware.com.
-
---------------------------------
-
-This donation from John/id is very generous.  Keith and I are very
-grateful.
-
-
-

-

May 1, 1999

-

John Carmack made an interesting .plan update yesterday: - -

    - "I put together a document on optimizing OpenGL drivers for Q3 that - should be helpful to the various Linux 3D teams.
    -
    http://www.quake3arena.com/news/glopt.html" -
- -

-

April 7, 1999

-

Updated the Mesa contributors section and added links to RPM Mesa packages.

-

-

March 18, 1999

-

The new webpages are now online. Enjoy, and let me know if you find any errors. -For an eye-candy free version you can use http://www.mesa3d.org/txt/.

-

-

February 16, 1999

-

SGI releases its GLX -source code.

-

-

January 22, 1999

-

www.mesa3d.org established

- - -

- - -
-$Id: news.html,v 3.24.2.6 2006/02/01 18:08:25 brianp Exp $ - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/osmesa.html b/nx-X11/extras/Mesa_6.4.2/docs/osmesa.html deleted file mode 100644 index 6feb8df52a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/osmesa.html +++ /dev/null @@ -1,77 +0,0 @@ - - -Off-screen Rendering - - - - - -

Off-screen Rendering

- - -

-Mesa 1.2.4 introduced off-screen rendering, a facility for generating -3-D imagery without having to open a window on your display. Mesa's -simple off-screen rendering interface is completely operating system -and window system independent so programs which use off-screen -rendering should be very portable. This feature effectively -enables you to use Mesa as an off-line, batch-oriented renderer. -

-

-The "OSMesa" API provides 3 functions for making off-screen -renderings: OSMesaCreateContext(), OSMesaMakeCurrent(), and -OSMesaDestroyContext(). See the Mesa/include/GL/osmesa.h header for -more information. See the demos/osdemo.c file for an example program. -There is no facility for writing images to files. That's up to you. -

-

-If you want to generate large images (larger than 1280x1024) you'll -have to edit the src/config.h file to change MAX_WIDTH and MAX_HEIGHT -then recompile Mesa. Image size should only be limited by available -memory. -

- - -

Deep color channels

- -

- For some applications 8-bit color channels don't have sufficient - accuracy (film and IBR, for example). If you're in this situation - you'll be happy to know that Mesa supports 16-bit and 32-bit color - channels through the OSMesa interface. When using 16-bit channels, - channels are GLushorts and RGBA pixels occupy 8 bytes. When using 32-bit - channels, channels are GLfloats and RGBA pixels occupy 16 bytes. -

-

- To build Mesa/OSMesa with 16-bit color channels: -

-      make realclean
-      make linux-osmesa16
-
- - For 32-bit channels: -
-      make realclean
-      make linux-osmesa32
-
- -

-You'll wind up with a library named libOSMesa16.so or libOSMesa32.so. -

- -

-If you need to compile on a non-Linux platform, copy Mesa/configs/linux-osmesa16 -to a new config file and edit it as needed. Then, add the new config name to -the top-level Makefile. Send a patch to the Mesa developers too, if you're -inclined. -

- -

-BE WARNED: 16 and 32-bit channel support has not been exhaustively -tested and there may be some bugs. However, a number of people have -been using this feature successfully so it can't be too broken. -

- - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/pbuffers.html b/nx-X11/extras/Mesa_6.4.2/docs/pbuffers.html deleted file mode 100644 index 2599101555..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/pbuffers.html +++ /dev/null @@ -1,54 +0,0 @@ - - -PBuffer Rendering - - - - - -

PBuffer Rendering

- -

-Basically, FBconfigs and PBuffers allow you to do off-screen rendering -with OpenGL. The OSMesa interface does basically the same thing, but -fbconfigs and pbuffers are supported by more vendors. -PBuffer rendering may also be hardware accelerated. -

- -

-PBuffers are getting more use nowadays, though they've actually been -around for a long time on IRIX systems and other workstations. -

- -

-The -GL_SGIX_fbconfig -and - -GL_SGIX_pbuffer extensions describe the functionality. -More recently, these extensions have been promoted to ARB extensions (on -Windows at least). -

- -

-The Mesa/progs/xdemos/ directory has some useful code for working -with pbuffers: -

- -
    -
  • pbinfo.c - like glxinfo, it prints a list of available - fbconfigs and whether each supports pbuffers. -
  • pbutil.c - a few utility functions for dealing with - fbconfigs and pbuffers. -
  • pbdemo.c - a demonstration of off-screen rendering with pbuffers. -
- -

-Mesa 4.1 and later support GL_SGIX_fbconfig and GL_SGIX_pbuffer (software -rendering only). -

- - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/perf.html b/nx-X11/extras/Mesa_6.4.2/docs/perf.html deleted file mode 100644 index ee9c4b117d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/perf.html +++ /dev/null @@ -1,68 +0,0 @@ - - -Performance Tips - - - - - -

Performance Tips

- -

-Performance tips for software rendering: -

-
    - -
  1. Turn off smooth shading when you don't need it (glShadeModel) -
  2. Turn off depth buffering when you don't need it. -
  3. Turn off dithering when not needed. -
  4. Use double buffering as it's often faster than single buffering -
  5. Compile in the X Shared Memory extension option if it's supported - on your system by adding -DSHM to CFLAGS and -lXext to XLIBS for - your system in the Make-config file. -
  6. Recompile Mesa with more optimization if possible. -
  7. Try to maximize the amount of drawing done between glBegin/glEnd pairs. -
  8. Use the MESA_BACK_BUFFER variable to find best performance in double - buffered mode. (X users only) -
  9. Optimized polygon rasterizers are employed when: - rendering into back buffer which is an XImage - RGB mode, not grayscale, not monochrome - depth buffering is GL_LESS, or disabled - flat or smooth shading - dithered or non-dithered - no other rasterization operations enabled (blending, stencil, etc) -
  10. Optimized line drawing is employed when: - rendering into back buffer which is an XImage - RGB mode, not grayscale, not monochrome - depth buffering is GL_LESS or disabled - flat shading - dithered or non-dithered - no other rasterization operations enabled (blending, stencil, etc) -
  11. Textured polygons are fastest when: - using a 3-component (RGB), 2-D texture - minification and magnification filters are GL_NEAREST - texture coordinate wrap modes for S and T are GL_REPEAT - GL_DECAL environment mode - glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST ) - depth buffering is GL_LESS or disabled -
  12. Lighting is fastest when: - Two-sided lighting is disabled - GL_LIGHT_MODEL_LOCAL_VIEWER is false - GL_COLOR_MATERIAL is disabled - No spot lights are used (all GL_SPOT_CUTOFFs are 180.0) - No local lights are used (all position W's are 0.0) - All material and light coefficients are >= zero -
  13. XFree86 users: if you want to use 24-bit color try starting your - X server in 32-bit per pixel mode for better performance. That is, - start your X server with - startx -- -bpp 32 - instead of - startx -- -bpp 24 -
  14. Try disabling dithering with the MESA_NO_DITHER environment variable. - If this env var is defined Mesa will disable dithering and the - command glEnable(GL_DITHER) will be ignored. -
- - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/precompiled.html b/nx-X11/extras/Mesa_6.4.2/docs/precompiled.html deleted file mode 100644 index 166d33d828..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/precompiled.html +++ /dev/null @@ -1,26 +0,0 @@ - - -Precompiled libraries - - - - - -

Precompiled Libraries

- -

-In general, precompiled libraries are not available. -However, people occasionally prepare packages of precompiled libraries -for some systems. -

- -

Mesa-6.0 for Solaris

- -

-Steve Christensen has submitted precompiled Mesa-6.0 libraries for -Solaris at -sunfreeware.com. -

- - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/relnotes.html b/nx-X11/extras/Mesa_6.4.2/docs/relnotes.html deleted file mode 100644 index 270567d182..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/relnotes.html +++ /dev/null @@ -1,46 +0,0 @@ - - -Mesa Release Notes - - - - - -

Release Notes

- -

-The release notes summarize what's new or changed in each Mesa release. -

- - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/science.html b/nx-X11/extras/Mesa_6.4.2/docs/science.html deleted file mode 100644 index f55cf31241..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/science.html +++ /dev/null @@ -1,72 +0,0 @@ - - -Science and Technical - - - - - -

Science and Technical

- -
    -
  • Ch - OpenGL bindings for the Ch C/C++ interpreter -
  • CLEO3D - event displayer for the CLEOIII detector -
  • DINO - Visualizing - Structural Biology -
  • General - Mesh Viewer (GMV) - scientific vis. -
  • GiD - finite element - analysis -
  • glpoisson - A finite - element analysis program that simulates wave in an arbitrary region. -
  • GLWaves - - Electromagnetic wave visualization -
  • Gmsh - - finite element mesh generator / viewer -
  • gOpenMol - - computational chemistry -
  • GPS 3D - GPS-based map visualization -
  • Hitchhiker - - virtual solar system -
  • Hydra - physics - and engineering pkg -
  • Light Speed - - a real-time, interactive relativistic simulator -
  • LinkWinds - scientific - vis -
  • MathGL3d - Mathematica viewer -
  • Mathworks - - mathematics and visualization -
  • Medit - 3D surface mesh viewer -
  • MOLMOL - - molecular modeling and analysis -
  • Molscript - molecular - modeling -
  • -
  • OpenDX - Data visualization - system -
  • -
  • ORSA - An interactive tool for Celestial Mechanics -
  • -
  • ParaView - Scientific visualization package -
  • -
  • PHLEX - Finite element vis -
  • ROOT - Object Oriented Data - Analysis Framework -
  • SLFFEA - GNU finite element - package -
  • Spock - molecular - modeling -
  • Ssystem - solar - system simulation -
  • SPARROW - robot simulation -
  • Vis5D - - atmospheric visualization -
  • VMD - molecular - modeling -
  • Webots - 3-D mobile - robot simulator -
- - - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/docs/sourcedocs.html b/nx-X11/extras/Mesa_6.4.2/docs/sourcedocs.html deleted file mode 100644 index a5248d988d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/sourcedocs.html +++ /dev/null @@ -1,26 +0,0 @@ - - -Source Code Documentation - - - - - -

Source Code Documentation

- -

-Doxygen -is used to automatically -produce cross-referenced documentation from the Mesa sources. -This is not included in the normal Mesa distribution. -Download Mesa from CVS if interested. -

- -

-If you're reading this page from your local copy of Mesa, and have -run the doxygen scripts, you can read the documentation -here -

- - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/subset-A.html b/nx-X11/extras/Mesa_6.4.2/docs/subset-A.html deleted file mode 100644 index dac66a61ba..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/subset-A.html +++ /dev/null @@ -1,3579 +0,0 @@ - - - - Mini GLX Specification - - - -

-
Mesa Subset Specification
-

-

-
-

Tungsten Graphics, Inc.

-

February 26, 2003
-

-
-

-

Copyright © 2002-2003 by Tungsten Graphics, Inc., -Cedar Park, Texas. All Rights Reserved.
-
-Permission is granted to make and distribute verbatim copies of this -document provided the copyright notice and this permission notice are -preserved on all copies.
-

-

OpenGL is a trademark of Silicon -Graphics, Inc..

-

1. Introduction

-This document describes a subset of the Mesa implemented by Tungsten -Graphics, Inc. for embedded devices.  Prior to reading this -document the reader should be familiar with the OpenGL 1.2.1 -specification dated April 1, 1999 (available from http://www.opengl.org/developers/documentation/specs.html.) - Experience with OpenGL programming is highly advisable.
-

-Tungsten Graphics, Inc. is working with industry standards -organizations +in an attempt to standardize this Mesa subset and any -other possible subsets +as a result of this work.
-
-Appendix A contains a list of issues of which some may not be resolved.
-
-To summarize, the following major features of Mesa are omitted from the -subset:
-
    -
  • Vertex arrays
  • -
  • Texture coordinate generation
  • -
  • Lighting
  • -
  • Point size
  • -
  • Polygon stipple
  • -
  • DrawPixels, CopyPixels, PixelZoom
  • -
  • 1-D and 3-D textures
  • -
  • CopyTex[Sub]Image
  • -
  • Fog
  • -
  • Depth test
  • -
  • Color Index mode
  • -
  • Accumulation buffer
  • -
  • Feedback mode
  • -
  • Evaluators
  • -
  • Push/Pop attributes
  • -
  • Display lists
    -
  • -
-

Further reductions are made at a lower level of detail.
-

-

Mesa function names are printed in bold -face.  Function parameters are printed in italics.
-

-

The Tungsten Graphics, Inc. Mesa subset library is hereafter -referred to as the subset.
-
-

-

2. Primitive Specification

-

2.1 glBegin, glEnd and glVertex Commands

-The basic rendering primitives are points, lines and triangles. - Quadrilaterals and polygons are composed of triangles. - Primitives are drawn with the glBegin -and glEnd commands and a subset -of the glVertex commands:
-
-
void glBegin(GLenummode)
-void glEnd(void)
-
-void glVertex2f(GLfloat x, GLfloat y)
-void glVertex2fv(const GLfloat -*v)
-void glVertex3f(GLfloat x, GLfloat y, GLfloat z)
-void glVertex3fv(const GLfloat -*v)
-
-
-The mode parameter to glBegin may be one of the following
-
-
GL_POINTS - a series of individual -points
-GL_LINES - a series of disjoint line segments
-GL_LINE_STRIP - series of connected line segments
-GL_LINE_LOOP - a closed loop of line segments
-GL_TRIANGLES - a series of individual triangles
-GL_TRIANGLE_STRIP - a connected strip of triangles
-GL_TRIANGLE_FAN - a sequence of triangles all sharing a common vertex
-GL_QUADS - a sequence of individual quadrilaterals
-GL_QUAD_STRIP - a connected strip of quadrilaterals
-GL_POLYGON - a closed, convex polygon
-
-
-
-The glVertex commands take two -or three floating point coordinates, or a pointer to an array of two or -three floating point coordinates.  Vertices are actually 4-element -homogeneous coordinates.  The fourth component, unspecified by the -subset's glVertex commands, is -one.
-
- -

2.2 Other Per-vertex Commands
-

-The glColor and glTexCoord commands may be used to -specify colors and texture coordinates for each vertex:
-
-
void glColor3f(GLfloatred, GLfloat green, GLfloat blue)
-void glColor3fv(const GLfloat *rgb)
-void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-void glColor4fv(const GLfloat *rgba)
-void glTexCoord2f(GLfloat s, GLfloat t)
-void glTexCoord2fv(const -GLfloat *c)
-
-
-The glColor commands specify -the color and optionally, the alpha value, for subsequent vertices. - For the glColor3 commands, -alpha is set to one.
-
-The glTexCoord2 commands -specify the texture coordinate for subsequent vertices.  Texture -coordinates are actually four-component coordinates: (s, t, r, q). - The glTexCoord2 commands -set s and t explicitly.  The r and q components are zero and one, -respectively.
-
-Only glVertex, glColor and glTexCoord commands are allowed -between glBegin and glEnd.  Calling any other -command between glBegin and glEnd will result in the error -GL_INVALID_OPERATION.
-
-

2.3 Unsupported Commands

-None of the following commands related to primitive specification are -supported by the subset:
-
-
Per-Vertex commands:
-
-
-
glVertex2d, -glVertex2i, glVertex2s, glVertex3d, glVertex3i, glVertex3s, glVertex4d, -glVertex4i, glVertex4s, glVertex2dv, glVertex2iv, glVertex2sv, -glVertex3dv, glVertex3iv, glVertex3sv, glVertex4dv, glVertex4iv, -glVertex4sv,
-glNormal3b, glNormal3d, glNormal3f, glNormal3i, glNormal3s,
glNormal3bv, glNormal3dv, glNormal3fv, -glNormal3iv, glNormal3sv,
-glIndexd, glIndexf, glIndexi, glIndexs, glIndexub, glIndexdv, -glIndexfv, glIndexiv, glIndexsv, glIndexubv,
-glColor3b, glColor3d, glColor3i, glColor3s, glColor3ub, glColor3ui, -glColor3us,
glColor3bv, -glColor3dv, glColor3iv, glColor3sv, glColor3ubv, glColor3uiv, -glColor3usv, lColor4b, -glColor4d, glColor4i, glColor4s, glColor4ub, glColor4ui, glColor4us, glColor4bv, glColor4dv, glColor4iv, -glColor4sv, glColor4ubv, glColor4uiv, glColor4usv,
-
glTexCoord1d, glTexCoord1f, -glTexCoord1i, glTexCoord1s, glTexCoord2d, glTexCoord2i, glTexCoord2s, -glTexCoord3d, glTexCoord3f, glTexCoord3i, glTexCoord3s, glTexCoord4d, -glTexCoord4f, glTexCoord4i, glTexCoord4s, glTexCoord1dv, glTexCoord1fv, -glTexCoord1iv, glTexCoord1sv, glTexCoord2dv, glTexCoord2iv, -glTexCoord2sv, glTexCoord3dv, glTexCoord3fv, glTexCoord3iv, -glTexCoord3sv, glTexCoord4dv, glTexCoord4fv, glTexCoord4iv, -glTexCoord4sv,
-glEdgeFlag, glEdgeFlagv

-
-
-Vertex array commands:
-
glVertexPointer, -glColorPointer, glIndexPointer, glTexCoordPointer, glEdgeFlagPointer, -glNormalPointer, glInterleavedArrays, glArrayElement, glDrawArrays, -glDrawElements, glDrawRangeElements, glEnableClientState, -glDisableClientState
-
-
-

-Rectangle commands:
-
glRects, -glRecti, glRectf, glRectd, glRectsv, glRectiv, glRectfv, glRectdv,
-
-
-
-
Lighting commands:
-
-
glMaterialf, -glMateriali, glMaterialfv, glMaterialiv
-

-
-
Evaluator commands:
-
glEvalCoord1d, -glEvalCoord1f, glEvalCoord1dv, glEvalCoord1fv, glEvalCoord2d, glEvalCoord2f, -glEvalCoord2dv, glEvalCoord2fv,
-
glEvalPoint1, glEvalPoint2
-
-
-
-

3. Coordinate Transformation

-

3.1 Vertex Transformation

-Vertex coordinates are transformed by the current modelview and -projection matrices then mapped to window coordinates as specified by -the viewport.  The following coordinate transformation commands are -supported by the subset
-
-
glMatrixMode(GLenum mode)
-glLoadIdentity(void)
-glPushMatrix(void)
-glPopMatrix(void)
-glLoadMatrixf(const GLfloat *m)
-glMultMatrixf(const GLfloat *m)
-glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
-glTranslatef(GLfloat x, GLfloat y, GLfloat z)
-glScalef(GLfloat x, GLfloat y, GLfloat z)
-glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far)

-glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far)
-glViewport(GLint x, GLint y, GLsize width, GLsizei height)
-
-
-The glMatrixMode command -specifies the current matrix. - The mode parameter may be GL_MODELVIEW or GL_PROJECTION to specify -the modelview matrix or projection matrix.  Subsequent matrix -commands will effect the current matrix.  Also associated with the -modelview and projection matrices are a modelview matrix stack and -projection matrix stack.
-
-The glLoadIdentity command -replaces the current matrix with the identity matrix.  The matrix -elements are specified in column-major order.
-
-The glPushMatrix command pushes -a copy of the current matrix onto either the modelview matrix stack or -the projection matrix stack.  The glPopMatrix -command replaces the current matrix with a copy of the top matrix off -the modelview matrix stack or projection matrix stack, the pops the -stack.  Matrix stacks are useful for traversing and rendering -hierarchical models.
-
-The glMultMatrixf command -post-multiplies the current matrix by the specified matrix.  The -matrix elements are specified in column-major order.
-
-The glRotatef command -post-multiplies the current matrix by a rotation matrix defined by the -angle and rotation axis defined by x, y and z.
-
-The glTranslatef command -post-multiplies the current matrix by a translation matrix defined by -the x, y and z translation parameters.
-
-The glScalef command -post-multiplies the current matrix by a scaling matrix defined by the x, y and z scale factors.
-
-The glFrustum command -post-multiplies the current matrix by a perspective projection matrix. - The near and far values specify the position of -the hither and yon Z-axis clipping planes.  The left, right, bottom and top parameters are the X and Y -extents at the near clipping plane.  glFrustum is normally used to modify -the projection matrix.
-
-The glOrtho command -post-multiplies the current matrix by an orthographic projection matrix. - The near and far values specify the position of -the hither and yon Z-axis clipping planes.  The left, right, bottom and top parameters specify the X and -Y-axis clipping planes.  glOrtho -is normally used to modify the projection matrix.
-
-The glViewport command -specifies the mapping of coordinates from normalized device coordinates -to window coordinates.  The x -and y parameters specify the -viewport's lower-left corner in the window and the width and height parameters specify the size -of the viewport.  glViewport -does not effect the current matrix.
-
-A coordinate transformed to window coordinates is hereafter known as (xw, -yw, zw).
-
-

3.2 Clipping

-View-volume clipping automatically discards or trims primitives which -lie completely or partially outside of the view volume specified by glFrustum and glOrtho.  Note that the glViewport command does not define a -clipping region.
-
-Clipping occurs in clip coordinate -space - the coordinates produced after applying the projection -matrix.
-
-

3.3 Current Raster Position

-The current raster position specifies the location for drawing images -with glBitmap.  The current -raster position is set with the commands:
-
-
void glRasterPos2f(GLfloatx, GLfloat y)
-void glRasterPos2fv(const -GLfloat *v)
-void glRasterPos2i(GLint x, GLint y)
-void glRasterPos2iv(const -GLint *v)
-
-
-glRasterPos specifies a -4-component coordinate (x, y, 0, 1).  The coordinate is processed -like a vertex; it is transformed by the modelview matrix, the projection -matrix and mapped to the viewport.  The resulting window coordinate -is stored as the current raster position.  The coordinate is -clipped-tested against the frustum like a vertex.  If the -coordinate is clipped, then the current raster position becomes invalid -and subsequent glBitmap commands -have no effect.
-
-glRasterPos also updates the -current raster color and current raster texture coordinates.  The -current raster color is updated (copied) from the current color (as -specified by glColor). - The current raster texture coordinate is updated (copied) from the -current texture coordinate (as specified by glTexCoord).
-
-

3.4 Unsupported Commands

-The following commands related to vertex transformation are not -supported by the subset:
-
-
User-defined clip plane commands:
-
glClipPlane
-
-
-
-
Lighting and material commands:
-
glLightModeli, -glLightModelf, glLightModeliv, -glLightModelfv, glLightf, -glLighti, glLightfv, glLightiv, glColorMaterial
-
-
-
Automatic texture coordinate generation -commands:
-
-
-
glTexGend, -glTexGenf, glTexGeni, glTexGendv, -glTexGenfv, glTexGeniv,
-
-
-Double-valued commands:
-
glLoadMatrixd, -glMultMatrixd, glRotated, glTranslated, glScaled
-
-
-Depth Range command:
-
glDepthRange -(the near value is always 0.0 and the far value is always 1.0)
-
-
-Extra RasterPos commands:
-
glRasterPos2d, -glRasterPos2s, glRasterPos3d, glRasterPos3f, glRasterPos3i, -glRasterPos3s, glRasterPos4d, glRasterPos4f, glRasterPos4i, -glRasterPos4s, glRasterPos2dv, glRasterPos2sv, glRasterPos3dv, -glRasterPos3fv, glRasterPos3iv, glRasterPos3sv, glRasterPos4dv, -glRasterPos4fv, glRasterPos4iv, glRasterPos4sv
-
-
-
-
-

4. Rasterization

-This section describes the commands and options for drawing points, -lines, triangles and bitmaps.  Rasterization -is the term for the process which produces fragments from the geometric -description of a primitive (a point, line, polygon or bitmap).  For -example, given the two coordinates for the end-points of a line segment, -rasterization determines which pixels in the frame buffer are modified -to draw the line.  A -fragment is a tuple which consists of a window coordinate, colors and -texture coordinates.  The fragments produced by rasterization are -subsequently processed by the per-fragment operations described later.
-
-

4.1 Point Rasterization

-Points are rendered with the command sequence glBegin(GL_POINTS), glVertex, ... glEnd.  The window coordinate (xw, -yw, zw) is truncated to rasterize the point. - The truncated coordinate with its associated color and texture -coordinate is sent as a single fragment to the per-fragment processing -stages.
-
-The glPointSize command is not -supported; only 1-pixel points are supported.
-
-Point smoothing (antialiasing) is also not supported.
-
-

4.2 Line Rasterization

-Lines are rendered with the command sequence glBegin(mode), glVertex, glVertex, ... glEnd where mode is one of GL_LINES, -GL_LINE_STRIP or GL_LINE_LOOP.  Lines are rasterized as described -in the OpenGL specification.  Note that OpenGL specifies the half-open convention for drawing -lines: the last fragment in a line segment is omitted so that endpoint -pixels shared by two line segments will only be drawn once instead of -twice.
-
-

4.2.1 Line Width

-The width of lines can be controlled by
-
-
void glLineWidth(GLfloatwidth)
-
-
-where width is the line width -in pixels.  The width defaults to 1.0.  Attempting to set the -width to a value less than or equal to zero will raise the error -GL_INVALID_VALUE.
-
-

4.2.2 Line Stipple
-

-Lines may be stippled (i.e. dashed) with the command
-
-
glLineStipple(GLintfactor, GLushort pattern)
-
-
-pattern describes an on/off -pattern for the fragments produced by rasterization and factor specifies how many subsequent -fragments are kept or culled for each pattern bit.  Line stippling -can be enabled or disabled by the commands glEnable(GL_LINE_STIPPLE) and glDisable(GL_LINE_STIPPLE).
-
-

4.2.3 Line Antialiasing

-Lines may be antialiased.  For antialiased lines, each fragment -produced by rasterization is assigned a coverage value which describes how -much of the fragment's area is considered to be inside the line.  Later, the -alpha value of each fragment is multiplied by the coverage value. - By blending the fragments into the frame buffer, the edges of -lines appear smoothed.
-
-Line antialiasing can be enabled or disabled with the commands glEnable(GL_LINE_SMOOTH) and glDisable(GL_LINE_SMOOTH).
-
-

4.3 Polygon Rasterization

-Polygons, quadrilaterals and triangles share the same polygon -rasterization options.
-
-Triangles are rendered by the command sequence glBegin(mode),glVertex, glVertex, ... glEnd where mode may be one of GL_TRIANGLES, -GL_TRIANGLE_STRIP or GL_TRIANGLE_FAN. - For GL_TRIANGLES mode, the number of vertices should be a multiple -of three - extra vertices will be ignored.  For GL_TRIANGLE_STRIP -and GL_TRIANGLE_FAN, at least three vertices should be specified. - If less than three are specified, nothing is drawn.  
-
-Quadrilaterals are rendered by -the command sequence glBegin(mode),glVertex, glVertex, ... glEnd where mode may be one of GL_QUADS or -GL_QUAD_STRIP.   For -GL_QUADS, the number of vertices should be a multiple of four - extra -vertices will be ignored.  For GL_QUAD_STRIP, the number of -vertices should be even and at least four.  Extra vertices (one) -will be ignored.
-
-Convex polygons are rendered -by the command sequence glBegin(GL_POLYGON),glVertex, glVertex, ... glEnd. - If less than three vertices are specified, nothing is drawn.
-
-

4.3.1 Polygon Orientation

-The winding order of vertices -(clockwise or counter-clockwise) is significant.  It is used to -determine the front-facing or back-facing orientation of polygons. - By default, a front-facing polygon's vertices are in -counter-clockwise order (in window coordinates).  Figures 2.4 and -2.5 of the OpenGL 1.2.1 specification illustrate the winding order for -front-facing triangles and quadrilaterals, respectively.
-
-The command
-
-
void glFrontFace(GLenum mode)
-
-
-specifies whether clockwise or counter-clockwise winding indicates a -front-facing polygon.  If mode -is GL_CW then polygons with clockwise winding are front-facing.  If mode is GL_CCW then polygons with -counter-clockwise winding are front-facing.  The default value is -GL_CCW.  If mode is not -GL_CCW or GL_CW then the error GL_INVALID_ENUM will be raised.
-
-

4.3.2 Polygon Culling

-Polygons may be culled (discarded) depending on whether they are -front-facing or back-facing.  The command
-
-
void -glCullFace(GLenum mode)
-
-
-specifies whether front-facing, back-facing or all polygons should be -culled.  If mode is -GL_FRONT then front-facing polygons will be culled.  If mode is GL_BACK then back-facing -polygons will be culled. Otherwise, if mode -is GL_FRONT_AND_BACK then all polygons will be culled.  Any other -value for mode will raise the -error GL_INVALID_ENUM.
-
-Polygon culling is enabled and disabled with the commands glEnable(GL_CULL_FACE) and glDisable(GL_CULL_FACE), -respectively.
-
-

4.3.3 Polygon Antialiasing

-Polygons may be antialiased in order to smooth their edges. - Polygon antialiasing is enabled and disabled with the commands glEnable(GL_POLYGON_SMOOTH) and glDisable(GL_POLYGON_SMOOTH).
-
-When polygon antialiasing is enabled each fragment produced by polygon, -triangle and quadrilateral rasterization will be given a coverage value which indicates how -much of the fragment is covered by the polygon.  Fragments -completely inside the polygon have coverage 1.0.  Fragments -completely outside the polygon have zero coverage (in theory). - Fragments which intersect the polygon's edge have a coverage value -in the range (0, 1).
-
-The fragment's alpha value is multiplied by the coverage value. - By enabling the appropriate blending mode, polygon edges will -appear smoothed.
-
-

4.4 Shading

-The command
-
-
void glShadeModel(GLenummode)
-
-
-determines whether colors are interpolated between vertices during -rasterization.  If mode is -GL_FLAT then vertex colors are not interpolated.  The color used -for drawing lines, triangles and quadrilaterals is that of the last -vertex used to specify each primitive.  For polygons, the color of -the first vertex specifies the color for the entire polygon.  If mode is GL_SMOOTH then vertex colors -are linearly interpolated to produce the fragment colors.
-
-

4.5 Bitmap Rasterization

-A bitmap is a monochromatic, binary image in which each image element -(or pixel) is represented by one bit.  Fragments are only generated -for the bits (pixels) which are set.  Bitmaps are commonly used to -draw text (glyphs) and markers.
-
-A bitmap is drawn with the command
-
-
void glBitmap(GLsizeiwidth, GLsizei height, GLfloat xOrig, GLfloat yOrig, GLfloat xMove, GLfloat yMove, const  GLubyte *image)
-
-
-width and height specify the image size in -pixels.  xOrig and yOrig specify the bitmap origin. - xMove and yMove are added to the current -raster position after the bitmap is rasterized.  image is a pointer to the bitmap -data.
-
-If the current raster position is not valid, glBitmap has no effect.
-
-

4.5.1 Bitmap Unpacking

-The first step in bitmap rendering is unpacking. - Unpacking is the process of extracting image data from -client memory subject to byte swapping, non-default row strides, etc. - The unpacking parameters are specified with the command
-
-
void -glPixelStorei(GLenum pname, GLint value)
-
-
-The following unpacking parameters may be set:
-
- - - - - - - - - - - - - - - - - - -
Parameter (pname)
-
Value (value)
-
Default
-
GL_UNPACK_ROW_LENGTH
-
Width of the image in memory, in -pixels.
-
0
-
GL_UNPACK_LSB_FIRST
-
GL_FALSE indicates that the most -significant bit is unpacked first from each byte.  GL_TRUE -indicates that the least significant bit is unpacked first from each -byte.
-
GL_FALSE
-
-
-
-The GL_UNPACK_ROW_LENGTH specifies the stride (in pixels) for advancing -from one row of the image to the next.  If it's zero, the width parameter to glBitmap specifies the width of the -image in memory.
-
-GL_UNPACK_LSB_FIRST determines whether the least significant or most -significant bit in each byte is unpacked first.  Unpacking occurs -in left to right order (in image space).
-
-The value of bit (i, j) of the image (where i is the image row and j is -the image column) is found as follows:
-
-
rowLength = (GL_UNPACK_ROW_LENGTH != 0) -? GL_UNPACK_ROW_LENGTH : width;
-
-byte = image[((rowLength + 7) -/ 8) * i + j / 8];
-
-if (GL_UNPACK_LSB_FIRST != 0)
-    bitMask = 1 << (j % 8);
-else
-    bitMask = 128 >> (j % 8);
-
-if (byte & bitMask)
-    bit = 1;
-else
-    bit = 0;
-
-
- -

4.5.2 Rasterization

-If the current raster position is (xrp, yrp, zrp, -wrp), then the bitmap is rasterized according to the -following algorithm:
-
-for (j = 0; j < height; -j++) {
-    for (i = 0; i < width; -i++) {
-        if (bit(i,j)) {
-            fragment.x = -floor(xrp - xOrig) -+ i;
-            fragment.y = -floor(yrp - yOrig) -+ j;
-            fragment.color -= GL_CURRENT_RASTER_COLOR;
-            -fragment.texture = GL_CURRENT_RASTER_TEXTURE_COORDS;
-            -ProcessFragment(fragment)
-         }
-    }
-}
-
-After the bitmap has been rendered the current raster position is -updated as follows:
-
-
xrp = xrp + xMove
-yrp = yrp + yMove
-
-
-

4.5.3 Per-fragment Operations

-XXX supported?  See issue in appendix A.
-
-

4.6 Unsupported Commands

-The following commands related to rasterization are not supported by -the subset.
-
-
Point commands:
-
glPointSize
-
-
-Polygon commands:
-
glPolygonStipple
-glPolygonOffset
-glPolygonMode
-
-
-
-
Pixel storage commands:
-
-
glPixelStoref
-
-
-
-

5. Texture Mapping
-

-There are four elements to texture mapping: texture coordinate -specification, texture image specification, texture sampling and texture -application.
-
-Texture mapping is enabled and disabled with the commands glEnable(GL_TEXTURE_2D) and glDisable(GL_TEXTURE_2D).
-
-

5.1 Texture Image Specification

-A texture image is specified with the command:
-
-
void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels )
-
-
-target must be GL_TEXTURE_2D. - level indicates the -mipmap level for mipmap textures.  internalFormat -is a hint to indicate the preferred internal storage format for the -texture.  width and height indicate the image size in -pixels (or texels).  border must -be zero.  format and type describe the pixel format and -data type for the incoming image.  pixels -points to the incoming texture image.  These parameters are -described in more detail below.
-
-

5.1.1 Texture Image Size and Mipmaps

-

-Texture images must have dimensions (width and height) that are powers -of two. For example: 256 x 256, 32 x 1024, 1 x 8, etc.  That is, it -must be the case that width = -2n and height = 2m -for some positive integers n and m.
-
-Mipmapping is a method of antialiasing or filtering textures to improve -their appearance.  A mipmap is a set of images consisting of a base -image and a set of filtered, reduced-resolution images.  If the -base image (level=0) is of -width 2n and height 2m then the level 1 image must -be of width 2n-1 and height 2m-1.  Each mipmap -level is half the width and height of the previous level, or at least -one.  The last mipmap level has a width and height of one.
-
-The following is an example of a mipmap's image levels:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mipmap level
-
width
-
height
-
0
-
256
-
64
-
1
-
128
-
32
-
2
-
64
-
16
-
3
-
32
-
8
-
4
-
16
-
4
-
5
-
8
-
2
-
6
-
4
-
1
-
7
-
2
-
1
-
8
-
1
-
1
-
-
-If the width or height parameters are not powers of -two, the error GL_INVALID_VALUE is raised.  If the image levels in -a mipmap do not satisfy the restrictions listed above the texture is -considered to be inconsistent -and the system will behave as if the texturing is disabled.
-
-

5.1.2 Texture Image Formats and Unpacking

-The glTexImage2D command's format and type parameters describe the format -of the incoming texture image.  Accepted values for format are GL_INTENSITY, GL_RGB and -GL_RGBA.  The type -parameter must be GL_UNSIGNED_BYTE.  Pixel component values are -thus in the range 0 through 255.
-
-If format is GL_INTENSITY then -the image has one byte per pixel which specifies the pixel's red, green, -blue and alpha values.
-
-If format is GL_RGB then the -image has three bytes per pixel which specify the pixel's red, green and -blue values (in that order).  The alpha value defaults to 255.
-
-If format is GL_RGBA then the -image has four bytes per pixel which specify the pixel's red, green, -blue and alpha values (in that order).
-
-The command
-
-
void -glPixelStorei(GLenum pname, -GLint value)
-
-
-controls the unpacking of texture image data from client memory.  pname may be GL_UNPACK_ROW_LENGTH to -indicate the stride, in pixels, between subsequent rows of the image in -client memory.  If GL_UNPACK_ROW_LENGTH is zero (the default) then -the width parameter to glTexImage2D determines the stride.
-
-

5.1.3 Internal Texture Format

-glTexImage2D converts the incoming -texture image to one of the supported internal texture formats.
-
-The internalFormat parameter -indicates the desired internal format for the texture and may be either -GL_INTENSITY8, GL_RGB5 or GL_RGBA8.
-
-If internalFormat is -GL_INTENSITY8 then the texture has one byte per texel (texture element) -which indicates the texel's intensity (or brightness).  The -intensity is obtained from the incoming image's red channel.
-
-If internalFormat is GL_RGB5 -then the texture is stored with two bytes per texel:  5 bits per -red value, 5 bits per green value and 5 bits per blue value.
-
-If internalFormat is -GL_RGBA8 then the texture is stored with four bytes per texel:  8 -bits for each of the red, green,  blue and alpha values.
-
-The internal format is also significant to texture application (see -section 5.4).
-
-

5.2 Texture Coordinates

-Texture coordinates control the mapping from local polygon space to -texture image space.  Texture coordinates are set for each vertex -with the glTexCoord commands. - During line and polygon rasterization the vertex's texture -coordinates are interpolated across the primitive to produce a texture -coordinate for each fragment.  The fragment texture coordinates are -used to sample the current texture image.
-
-Texture coordinates are normally in the range [0, 1].  Values -outside that range are processed according to the texture wrap mode.  The -texture wrap mode is set with the command
-
-
void glTexParameteri(GLenum target, GLenum pname, GLint value)
-
-
-target must be GL_TEXTURE_2D. - If pname is -GL_TEXTURE_WRAP_S or GL_TEXTURE_WRAP_T then value must be either -GL_CLAMP_TO_EDGE or GL_REPEAT.
-
-For GL_CLAMP_TO_EDGE, texture coordinates are effectively clamped to -the interval [0, 1].
-
-For GL_REPEAT, the integer part of texture coordinates is ignored; only -the fractional part of the texture coordinates is used.  This -allows texture images to repeated or tiled across an object.
-
-

5.3 Texture Sampling

-Texture sampling is the process of using texture coordinates to extract -a color from the texture image.  Multiple, weighted samples may be -taken from the texture and combined during the filtering step.
-
-During texture coordinate interpolation a level of detail value (lambda) is -computed for each fragment.  For a mipmapped texture, lambda -determines which level (or levels) of the mipmap will be sampled to -obtain the texture color.
-
-If lambda indicates that multiple texels map to a single screen pixel, -then the texture minification -filter will be used.  Otherwise, if lambda indicates that a single -texel maps to multiple screen pixels, then the texture magnification filter will be used.
-
-

5.3.1 Texture Minification

-The texture minification filter is set with the glTexParameteri command by setting target to GL_TEXTURE_2D, setting pname to GL_TEXTURE_MIN_FILTER and -setting value to GL_NEAREST, -GL_LINEAR, GL_NEAREST_MIPMAP_NEAREST,  -GL_NEAREST_MIPMAP_LINEAR,   GL_LINEAR_MIPMAP_NEAREST or -GL_LINEAR_MIPMAP_LINEAR.
-
-GL_NEAREST samples the texel nearest the texture coordinate in the -level 0 texture image.
-
-GL_LINEAR samples the four texels around the texture coordinate in the -level 0 texture image.  The four texels are linearly weighted to -compute the final texel value.
-
-GL_NEAREST_MIPMAP_NEAREST samples the texel nearest the texture -coordinate in the level N texture image.  N is the level of detail -and is computed by the partial derivatives of the texture coordinates -with respect to the window coordinates.
-
-GL_NEAREST_MIPMAP_LINEAR samples two texels nearest the texture -coordinates in the level N and N+1 texture images.  The two texels -are linearly weighted to compute the final texel value.  N is the -level of detail and is computed by the partial derivatives of the -texture coordinates with respect to the window coordinates.
-
-GL_LINEAR_MIPMAP_NEAREST samples four texels around the texture -coordinate in the level N texture image.  The four texels are -linearly weighted to compute the final texel value.  N is the level -of detail and is computed by the partial derivatives of the texture -coordinates with respect to the window coordinates.
-
-GL_LINEAR_MIPMAP_LINEAR samples four texels around the texture -coordinate in the level N texture image and four texels around the -texture coordinate in the level N+1 texture image.  The eight -texels are linearly weighted to compute the final texel value.  N -is the level of detail and is computed by the partial derivatives of the -texture coordinates with respect to the window coordinates.
-
-Filter modes other than GL_LINEAR and GL_NEAREST requires that the -texture have a complete set of mipmaps.  If the mipmap is -incomplete, it is as if texturing is disabled.

-

5.3.2 Texture Magnification

-The texture magnification filter is set with the glTexParameteri command -by setting target to -GL_TEXTURE_2D, setting pname to -GL_TEXTURE_MAG_FILTER and setting value -to GL_NEAREST or GL_LINEAR.
-
-GL_NEAREST samples the texel nearest the texture coordinate in the -level 0 texture image.
-
-GL_LINEAR samples the four texels around the texture coordinate in the -level 0 texture image.  The four texels are linearly weighted to -compute the final texel value.
-
-

5.4 Texture Application

-The sampled texture value is combined with the incoming fragment color -to produce a new fragment color.  The fragment and texture colors -are combined according to the texture environment mode and the current -texture's base internal format.  The texture environment mode is -set with the command
-
-
void -glTexEnvi(GLenum target, -GLenum pname, GLint value)
-
-
-target must be GL_TEXTURE_ENV. - If pname is -GL_TEXTURE_ENV_MODE then value -must be one of GL_REPLACE, GL_MODULATE, GL_DECAL, or GL_BLEND.
-
-There is also a texture environment -color that can factor into texture application.  The texture -environment color can be set with the command
-
-
void -glTexEnvfv(GLenum target, -GLenum pname, const GLfloat *value)
-
-
-target must be GL_TEXTURE_ENV. - If pname is -GL_TEXTURE_ENV_COLOR then value must -point to an array of four values which specify the red, green, blue, -and alpha values of the texture environment color.  The values are -clamped to the range [0, 1].  The default color is (0, 0, 0, 0).
-
-The following table describes the arithmetic used for each combination -of environment mode and base internal format.  (Rf, Gf, Bf, Af) is -the incoming fragment color.  (Rt, Gt, Bt, At) is the sampled -texture color.  Lt is the sampled texture luminance.  'It' is the sampled texture -intensity.  (Rc, Gc, Bc, Ac) is the texture environment color. - (Rv, Gv, Bv, Av) is the resulting value.
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Base Internal Format
-
GL_REPLACE
-
GL_MODULATE
-
GL_DECAL
-
GL_BLEND
-
GL_INTENSITY
-
Rv = It
-Gv = It
-Bv = It
-Bf = It
-
Rv = Rf * It
-Gv = Gf * It
-Bv = Bf * It
-Av = Af * It
undefined
-
Rv = Rf*(1-It) + Rc*It
-Gv = Gf*(1-It) + Gc*It
-Bv = Bf*(1-It) + Bc*It
-Av = Af*(1-It) + Ac*It
GL_RGB
-
Rv = Rt
-Gv = Gt
-Bv = Bt
-Av = Af
-
Rv = Rf * Rt
-Gv = Gf * Gt
-Bv = Bf * Bt
-Av = Af
-
Rv = Rt
-Gv = Gt
-Bv = Bt
-Av = Af
Rv = Rf*(1-Rt) + Rc*Rt
-Gv = Gf*(1-Gt) + Gc*Gt
-Bv = Bf*(1-Bt) + Bc*Bt
-Av = Af
GL_RGBA
-
Rv = Rt
-Gv = Gt
-Bv = Bt
-Av = At
-
Rv = Rf * Rt
-Gv = Gf * Gt
-Bv = Bf * Bt
-Av = Af * At
Rv = Rf*(1-At) + Rt*At
-Gv = Gf*(1-At) + Gt*At
-Bv = Bf*(1-At) + Bt*At
-Av = Af
-
Rv = Rf*(1-Rt) + Rc*Rt
-Gv = Gf*(1-Gt) + Gc*Gt
-Bv = Bf*(1-Bt) + Bc*Bt
-Av = Af*At
-
-
-
-

5.5 Texture Objects

-Texture objects encapsulate a set of texture images (mipmap) and -related state into a named object.  This facilitates use of -multiple textures in an application.  Texture objects are named -with GLuints (unsigned integers).  There is a default texture -object with the name/identifier zero which can never be deleted.
-
-

5.5.1 Creating Texture Objects

-A texture object is created by binding a new GLuint identifier to the -GL_TEXTURE_2D target with the command:
-
-
void glBindTexture(GLenum target, GLuint textureID)
-
-
-target must be GL_TEXTURE_2D. - textureID may be any -unsigned integer.  If textureID -does not name an existing texture object, a new texture object with that -ID will be created, initialized to the default state.  Whether the -ID is new or existed previously, that named texture object is bound as -the current texture object. - Subsequent glTexParameter andglTexImage2D calls will effect the -current texture object.
-
-

5.5.2 Deleting Texture Objects

-One or more texture objects may be deleted with the command:
-
-
void glDeleteTextures(GLsizein, const GLuint *textureIDs)
-
-
-textureIDs is an array of n texture IDs.  The named -texture objects will be deleted.  If the current texture object is -deleted the default texture object (number 0) will be bound as the -current texture object.
-
-

5.5.3 Allocating Texture Object Identifiers

-A list of new, unused texture IDs can be obtained by calling the command
-
-
void glGenTextures(GLsizei n, GLuint *textureIDs)
-
-
-An array of n unused texture -IDs will be returned in the textureIDs -array.
-
-
-

6. Per-fragment Operations

-The fragments produced by rasterization are subjected to a number of -operations which either modify the fragment or test the fragment -(discarding the fragment if the test fails.)  This chapter -describes the per-fragment operations.  They are presented in the -order in which they're performed.  If a fragment fails a test it is -discarded and not subjected to subsequent tests or modifications.
-
-

6.1 Scissor Test

-The scissor test limits rendering to a 2-D rectangular region of the -framebuffer.  The command
-
-
void glScissor(GLintx, GLint y, GLsizei width, GLsizei height)
-
-
-defines a clipping region with the lower-left corner at (x, y) and the given width and height.  The scissor test is -enabled and disabled with the command glEnable(GL_SCISSOR_TEST) -and glDisable(GL_SCISSOR_TEST).
-
-If the incoming fragment's position is (xf, yf) -then the fragment will pass the test if x <= xf < x + width and y <= yf < y + height.  Otherwise, the -fragment is discarded.
-
-If width or height is less than zero the error -GL_INVALID_VALUE is raised.  The default scissor rectangle bounds -are (0, 0, w, h) where w is the initial window width and h is the -initial window height.  The scissor test is disabled by default.
-
-

6.2 Alpha Test

-The alpha test compares the fragment's alpha value against a reference -value and discards the fragment if the comparison fails.  The test -is specified by the command
-
-
void glAlphaFunc(GLenummode, GLclampf reference)
-
-
-mode specifies an inequality -and reference specifies a value -to compare against.  The following table lists all possible -modes and the -corresponding test:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Comparison mode
-
The test passes if
-
GL_LESS
-
alpha < reference
-
GL_LEQUAL
-
alpha <= reference
GL_GREATER
-
alpha > reference
GL_GEQUAL
-
alpha >= reference
GL_EQUAL
-
alpha == reference
GL_NOTEQUAL
-
alpha != reference
GL_NEVER
-
never pass
-
GL_ALWAYS
-
always passes
-
-
-The reference parameter is -clamped to the range [0, 1].
-
-The alpha test is enabled and disabled with the commands glEnable(GL_ALPHA_TEST) and glDisable(GL_ALPHA_TEST).
-
-The default mode is GL_ALWAYS and the default reference value is 0.
-
-

6.3 Stencil Test

-The stencil buffer stores an N-bit integer value for each pixel in the -frame buffer.  The stencil test compares the stencil buffer value -at the fragment's position to a reference value and possibly discards -the fragment based on the outcome.  Furthermore, the stencil buffer -value may be updated or modified depending on the outcome.  If -there is no stencil buffer the stencil test is bypassed.
-
-Stenciling is controlled by the commands
-
-
void glStencilFunc(GLenumfunc, GLint ref, GLuint mask)
-void glStencilOp(GLenum stencilFail, GLenum depthTestFail, GLenum depthTestPass)
-
-
-The glStencilFunc command controls the -stencil test while glStencilOp -command controls the how the stencil buffer is updated/modified after -the test.
-
-ref is clamped to the range [0, -2N-1] where N is the number of bits per stencil value in the -stencil buffer.
-
-The following table lists all possible values for the func parameter and when the stencil -test will pass.  Both the stencil buffer value and the stencil -reference value are bit-wise ANDed with the mask parameter before the test.
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Stencil func value
-
Stencil test passes if
-
GL_LESS
-
(ref&mask) < (stencil buffer value -& mask)
-
GL_LEQUAL
-
(ref -& mask) <= (stencil -buffer value & mask)
GL_GREATER
-
(ref -& mask) > (stencil -buffer value & mask)
GL_GEQUAL
-
(ref -& mask) >= (stencil -buffer value & mask)
GL_EQUAL
-
(ref -& mask) == (stencil -buffer value & mask)
GL_NOTEQUAL
-
(ref -& mask) != (stencil -buffer value & mask)
GL_NEVER
-
never passes
-
GL_ALWAYS
-
always passes
-
-
-
-If the stencil test passes, the fragment is passed to the next -per-fragment operation.  Otherwise, if the stencil test fails, the -value in the stencil buffer is updated according to the value of the stencilFail parameter to glStencilOp.
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
stencilFail -value
-
New stencil buffer value
-
GL_KEEP
-
originalValue
-
GL_ZERO
-
0
-
GL_INVERT
-
BitWiseInvert(originalValue) -i.e. ~originalValue
-
GL_REPLACE
-
ref
-
GL_INCR
-
originalValue + 1, clamped to -[0, 2N-1]
GL_DECR
-
originalValue - 1, clamped to -[0, 2N-1]
-
-
-The depthTestFail and depthTestPass parameters to glStencilOp are ignored.  Values -for func and stencilFail other than those listed -in the table will cause the error GL_INVALID_ENUM to be raised.
-
-The stencil test is enabled and disabled with the commands glEnable(GL_STENCIL_TEST) and glDisable(GL_STENCIL_TEST).
-
-The default stencil function is GL_ALWAYS.  The default stencil -reference value is 0.  The default stencil mask is ~0.  The -default stencil fail operation is GL_KEEP.
-
-Values written into the stencil buffer are masked with the command
-
-
void glStencilMask(GLuintmask)
-
-
-Only the bits which are set in mask -will be modified in the stencil buffer when written to.  If each -stencil buffer value has N bits, only the least significant N bits of mask are relevant.  The default -stencil mask is ~0.
-
-

6.4 Blending and Logicop

-Blending or a logic operation combines the incoming fragment color with -the destination frame buffer color according to a blending equation or -bit-wise Boolean logical operation.
-
-Blending is enabled and disabled with the commands glEnable(GL_BLEND) and glDisable(GL_BLEND).
-
-The logic operation is enabled and disabled with the commands glEnable(GL_LOGIC_OP) and glDisable(GL_LOGIC_OP).
-
-If both blending and the logic operation are enabled, the logic -operation has higher priority; blending is bypassed.
-
-

6.4.1 Logic Op

-The command
-
-
void glLogicop(GLenummode)
-
-
-Specifies the Boolean logic operation for combining the incoming -fragment color with the destination frame buffer color.  Both the -incoming fragment color and destination frame buffer colors are -interpreted as four-tuples of unsigned integer color components in the -range [0, 2N-1] where N is the number of bits per color -channel.  N may not be the same for all color channels.
-
-The following table lists all values for mode and the boolean arithmetic used -to combine the incoming fragment color value (src) with the destination framebuffer -color value (dst).  Standard ANSI C operators used.
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LogicOp mode
-
Resulting channel value
-
GL_CLEAR
-
0
-
GL_SET
-
~0
-
GL_COPY
-
src
-
GL_COPY_INVERTED
-
~s
-
GL_NOOP
-
dst
-
GL_INVERT
-
~dst
-
GL_AND
-
src & dst
-
GL_NAND
-
~(src & dst)
-
GL_AND_REVERSE
-
src & ~dst
-
GL_AND_INVERTED
-
~src & dst
-
GL_OR
-
src | dst
-
GL_NOR
-
~(src | dst)
-
GL_OR_REVERSE
-
src | ~dst
-
GL_OR_INVERTED
-
~src | dst
-
GL_XOR
-
src ^ dst
-
GL_EQUIV
-
~(src ^ dst)
-
-
-The fragment's color is replaced by the result of the logic operation.
-
-Specifying any value for mode -other than those listed in the above table will cause the error -GL_INVALID_ENUM to be raised.
-
-The default value for mode is -GL_COPY.  The logic operation is disabled by default.
-
-

6.4.2 Blending

-The command
-
-
void glBlendFunc(GLenumsrcTerm, GLenum dstTerm)
-
-
-specifies the terms of the blending equation.  If Cf = (Rf, Gf, -Bf, Af) is the incoming fragment color and Cb = (Rb, Gb, Bb, Ab) is the -frame buffer color, then the resulting color Cv = (Rv, Gv, Bv, Av) is -computed by:
-
-
Cv = Cf * srcTerm + Cb * dstTerm
-
-
-All possible values for srcTerm -and the corresponding arithmetic term are listed in the following table:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
srcTerm
-
srcTermArithmetic
-
GL_ZERO
-
(0, 0, 0, 0)
-
GL_ONE
-
(1, 1, 1, 1)
-
GL_DST_COLOR
-
(Rb, Gb, Bb, Ab)
-
GL_ONE_MINUS_DST_COLOR
-
(1-Rb, 1-Gb, 1-Bb, 1-Ab)
-
GL_SRC_ALPHA
-
(Af, Af, Af, AF)
-
GL_ONE_MINUS_SRC_ALPHA
-
(1-Af, 1-Af, 1-Af, 1-Af)
-
GL_DST_ALPHA
-
(Ab, Ab, Ab, Ab)
-
GL_ONE_MINUS_DST_ALPHA
-
(1-Ab, 1-Ab, 1-Ab, 1-Ab)
-
GL_SRC_ALPHA_SATURATE
-
(m, m, m, 1) where m = MIN(Af, -1-Ab)
-
-
-All possible values for srcTerm -and the corresponding arithmetic term are listed in the following table:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
dstTerm
-
dstTermArithmetic
-
GL_ZERO
-
(0, 0, 0, 0)
-
GL_ONE
-
(1, 1, 1, 1)
-
GL_SRC_COLOR
-
(Rf, Gf, Bf, Af)
-
GL_ONE_MINUS_SRC_COLOR
-
(1-Rf, 1-Gf, 1-Bf, 1-Af)
-
GL_SRC_ALPHA
-
(Af, Af, Af, AF)
-
GL_ONE_MINUS_SRC_ALPHA
-
(1-Af, 1-Af, 1-Af, 1-Af)
-
GL_DST_ALPHA
-
(Ab, Ab, Ab, Ab)
-
GL_ONE_MINUS_DST_ALPHA
-
(1-Ab, 1-Ab, 1-Ab, 1-Ab)
-
-
-The fragment's color is replaced by the result of the blending equation.
-
-Values for srcTerm and dstTerm other than those listed in -the table will cause the error GL_INVALID_ENUM to be raised.
-
-The default value for srcTerm -is GL_ONE.  The default value for dstTerm -is GL_ZERO.  Blending is disabled by default.
-
-

6.5 Color Mask

-The final fragment color is written into the current color buffer at -the end of the per-fragment operations.  Normally, all color -channels in the frame buffer are replaced with the final fragment color. - However, the command
-
-
void glColorMask(GLbooleanredMask, GLboolean greenMask, GLboolean blueMask, GLboolean alphaMask)
-
-
-allows selective writing to individual color channels.  If redMask is GL_TRUE then writing to -the red color channel is enabled, otherwise it's disabled. - Similarly, the green, blue and alpha channels can also be masked.
-
-Initially all four mask values are GL_TRUE.
-
-Color masking is not enabled/disabled with the glEnable/glDisable commands.
-
-

7. Frame Buffer Operations

-The frame buffer is considered to be a two-dimensional array of pixels. - The frame buffer is also organized into layers or logical buffers. - There may be a front color buffer, back color buffer and stencil -buffer.  A double-buffered frame buffer has both a front color -buffer and back color buffer.  A single-buffered framebuffer only -has a front color buffer.  Each pixel in a color buffer has a red, -green and blue value and an optional alpha value.
-
-

7.1 Clearing Buffers

-Buffers are cleared (set to uniform values) with the command
-
-
void glClear(GLbitfieldbuffers)
-
-
-buffers is a bitmask for which -the value may be the bitwise-OR of the values GL_COLOR_BUFFER_BIT and -GL_STENCIL_BUFFER_BIT.  If the GL_COLOR_BUFFER_BIT bit is -specified, the current color buffer will be cleared.  If the -GL_STENCIL_BUFFER_BIT bit is specified, the stencil buffer will be -cleared.
-
-The current color buffer is specified with the command
-
-
void glDrawBuffer(GLenum buffer)
-
-
-buffer may be either GL_FRONT, -GL_BACK or GL_NONE.  GL_FRONT indicates that the front color buffer -will be modified by glClear and -any drawing command.  GL_BACK indicates that the back color buffer -will be modified by glClear and -any drawing command.  GL_NONE indicates that neither color buffer -will be modified by glClear or -any drawing command.  GL_BACK is only valid for double-buffered -frame buffers.
-
-The current scissor rectangle, set by the glScissor command, effects glClear, limiting -the clear to the scissor rectangle, if it's enabled.  Furthermore, only the color channels enabled by glColorMask will be effected by glClear(GL_COLOR_BUFFER_BIT). - Likewise, only the stencil bits enabled by glStencilMask will be effected by glClear(GL_STENCIL_BUFFER_BIT).
-
-The current clear color is set with the command
-
-
void glClearColor(GLclampfred, GLclampf green, GLclampf blue, GLclampf alpha)
-
-
-Subsequent calls to glClear -will use the color (red, green, blue, -alpha) to clear the front or back color buffers.
-
-The current stencil clear value is set with the command
-
-
void glClearStencil(GLintclearValue)
-
-
-If the stencil buffer is N bits deep, the least significant N bits of clearValue will be used to clear the -stencil buffer.
-
-
-

8. Other Features

-

8.1 Frame Buffer Readback

-A rectangular region of pixels can be read from the frame buffer and -placed in client memory with the command
-
-
void glReadPixels(GLintx, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *data)
-
-
-x and y specify the coordinate of the -lower-left corner of the region to read and width and height specify the size of the -rectangular region to read.  format -specifies the format of image data and must be either GL_RGB or -GL_RGBA.  type specify the -data type of the image data and must be either GL_UNSIGNED_BYTE or -GL_FLOAT.  Other values for format -or type will cause the error -GL_INVALID_ENUM to be raised.
-
-The framebuffer may contain 3-component colors (red, green, blue) or -4-component colors (red, green, blue, alpha).  If an alpha channel -is not present, alpha values default to 1.0.
-
-The frame buffer color components (red, green, blue, alpha) are either -converted to 8-bit unsigned integers in the range[0, 255] if type is GL_UNSIGNED_BYTE or -converted to floating point values in the range [0, 1] if type is GL_FLOAT.  The (red, -green, blue, alpha) tuples are then stored as GL_RGB triplets (by -dropping the alpha component) or GL_RGBA quadruples in client memory.
-
-Image data is packed into -client memory according to the pixel packing parameters which are set by -the command
-
-
void glPixelStorei(GLenum pname, GLint value)
-
-
-pname must be -GL_PACK_ROW_LENGTH.  value -indicates the stride (in pixels) between subsequent rows in the -destination image.  If GL_PACK_ROW_LENGTH is zero (the default) -then the width parameter to glReadPixels indicates the row stride.
-
-Pixel readback takes place as follows:
-
-
if (GL_PACK_ROW_LENGTH == 0)
-    rowLength = width;
-else
-    rowLength = GL_PACK_ROW_LENGTH
-
-if (format == GL_RGB) {
-    for (i = 0; i < height; -i++) {
-        for (j = 0; j < width; j++) {
-            k = (i * -rowLength + j) * 3;
-            data[k+0] = FrameBuffer(x + j, y + i).red;
-            data[k+1] = FrameBuffer(x + j, y + i).green;
-            data[k+2] = FrameBuffer(x + j, y + i).blue;
-        }
-    }
-}
-else {
-    for (i = 0; i < height; -i++) {
-        for (j = 0; j < width; j++) {
-            k = (i * -rowLength + j) * 4;
-            data[k+0] = FrameBuffer(x + j, y + i).red;
-            data[k+1] = FrameBuffer(x + j, y + i).green;
-            data[k+2] = FrameBuffer(x + j, y + i).blue;
-            data[k+3] = FrameBuffer(x + j, y + i).alpha;
-        }
-    }
-}
-
-
-The function FrameBuffer(c, r) -returns the pixel in the frame buffer at column c of row r.  data is considered to be either a -GLubyte pointer or a GLfloat pointer, depending on the type parameter.  Similarly, the -FrameBuffer function returns either GLubyte values in the range [0, 255] -or GLfloat values in the range [0,1], depending on the type parameter.
-
-Pixels may be read from either the front or back color buffer. - The command
-
-
void glReadBuffer(GLenumbuffer)
-
-
-specifies the source for reading images with glReadPixels.  If buffer is GL_FRONT then front color -buffer is the source.  If buffer -is GL_BACK then the back color buffer is the source.  It is illegal -to specify GL_BACK when the color buffer is not double buffered. - Any invalid value for buffer -will raise the error GL_INVALID_ENUM.
-
-The default read source is GL_BACK if the frame buffer is double -buffered.  Otherwise, the default read source is GL_FRONT.
-
-

8.2 Selection Mode

-Selection mode is typically used to implement picking: determining which -primitive(s) are present at particular window positions.  The -command
-
-
GLint glRenderMode(GLenummode)
-
-
-is used to enable selection mode.  If mode is GL_SELECTION the graphics -library is put into selection mode.  If mode is GL_RENDER the graphic -library is put into normal rendering mode.  Any other value for mode will raise the error -GL_INVALID_ENUM.
-
-When in selection mode rendering commands will not effect the -framebuffer.  Instead, a record of the primitives that would have -been drawn is placed in the selection buffer.  The selection buffer -is specified with the command
-
-
void glSelectionBuffer(GLsizein, GLuint *buffer)
-
-
-buffer
is an array of n -unsigned integers.  No more than n -values will be placed in the buffer.
-
-The name stack is a stack -(LIFO) of unsigned integer names.  The following commands -manipulate the name stack:
-
-
void glInitNames(void)
-void glPushName(GLuint name)
-void glPopName(void)
-void glLoadName(GLuint name)
-
-
-glInitNames resets the name -stack to an empty state.  glPushName pushes the given name value onto the stack.  glPopName pops the top name from the -stack.  glLoadName replaces the top value on -the stack with the specified name. - Stack underflow and overflow conditions cause the errors -GL_STACK_OVERFLOW and GL_STACK_UNDERFLOW to be raised.
-
-While in selection mode, primitives (points, lines, polygons) are -transformed and clip-tested normally.  Primitives which aren't -discarded by clipping cause the hit data to be updated.  The hit -data consists of three pieces of information: a hit flag, a minimum Z -value and a maximum Z value.  First, the hit flag is set. - Then, for each of the primitive's vertices, the vertex Z value is -compared to the minimum and maximum Z values.  The minimum Z value -is updated if the vertex's Z value is less than the minimum Z value. - The maximum Z value is updated if the vertex's Z value is greater -than the maximum Z value.
-
-When any of glInitNames, glPushName, glPopName, glLoadName or glRenderMode are called and the hit -flag is set, a hit record is -written to the selection buffer.
-
-A hit record consists of a sequence of unsigned integers.  The -first value is the size of the name stack.  The second value is the -minimum Z value multiplied by 232-1.  The third value is -the maximum Z value multiplied by 232-1.  The remaining -values are the values in the name stack, in bottom to top order. - The hit flag is cleared after a hit record is written to the -selection buffer.  Hit records are places sequentially into the -selection buffer until it is full or selection mode is terminated.
-
-Selection mode is terminated by calling glRenderMode(GL_RENDER).   The -return value of glRenderMode -will be -1 if the selection buffer overflowed.  Otherwise, the -return value will indicate the number of values written into the -selection buffer.
-
-

8.3 Synchronization

-The command
-
-
void glFlush(void)
-
-
-makes the graphics library to flush all pending graphics commands. - The command
-

-void glFinish(void)
-
-
-makes the graphics library flush the command queue and wait until those -commands are completed.  glFlush -will not return until all previous graphics commands have been fully -completed.
-
-These commands are typically used to force completion of rendering to -the front color buffer.  Otherwise, rendering to the front color -buffer may not appear.  The swapbuffers -command (part of the window system binding library) does an implicit -flush before swapping the front and back color buffers.  The glReadPixels command also does an -implicit flush before reading pixel data from the frame buffer.
-
-

9. State Queries

-The current value of nearly all library state variables can be queried. - This chapter describes the commands used for querying the value of -state variables.
-
-

9.1 General State Queries

-The command
-
-
void glGetFloatv(GLenumpname, GLfloat *values)
-
-
-returns the value(s) of the state variable specified by pname.  The following table -lists all accepted values for pname -and a description of the value(s).  Specifying any other value for pname causes the error -GL_INVALID_ENUM to be raised.
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Variable (pname)
-
Number of values
-
Value(s) Description
-
GL_ALPHA_BITS
-
1
-
Number of bits per alpha value -in the frame buffer.
-
GL_ALPHA_TEST
-
1
-
Zero if the alpha test is -disabled.
-One if the alpha test is enabled.
-
GL_ALPHA_TEST_FUNC
-
1
-
The alpha test function.
-
GL_BLEND
-
1
-
Zero if blending is disabled.
-One if blending is enabled.
-
GL_BLEND_DST
-
1
-
Blend destination function/term.
-
GL_BLEND_SRC
-
1
-
Blend source function/term.
-
GL_BLUE_BITS
-
1
-
Number of bits per blue value in -the frame buffer.
-
GL_COLOR_CLEAR_VALUE
-
4
-
Clear color (red, green, blue, -alpha).
-
GL_COLOR_WRITE_MASK
-
4
-
Color buffer writemask (red, -green, blue, alpha).
-Zero if writing is disabled.
-One if writing is enabled.
-
GL_CULL_FACE
-
1
-
Zero if polygon culling is -disabled.
-One if polygon culling is enabled.
-
GL_CULL_FACE_MODE
-
1
-
Polygon cull mode: GL_FRONT, -GL_BACK or GL_FRONT_AND_BACK.
-
GL_CURRENT_COLOR
-
4
-
Current color (red, green, blue, -alpha).
-
GL_CURRENT_RASTER_COLOR
-
4
-
Current raster position color -(red, green, blue, alpha).
-
GL_CURRENT_RASTER_TEXTURE_COORDS
-
4
-
Current raster position texture -coordinates (s, t, r, q).
-
GL_CURRENT_RASTER_POSITION
-
4
-
Current raster position (x, y, -z, w).
-
GL_CURRENT_POSITION_VALID
-
1
-
Zero if current raster position -is invalid.
-One if current raster position is valid.
-
GL_CURRENT_TEXTURE_COORDS
-
4
-
Current texture coordinates (s, -t, r, q)
-
GL_DOUBLEBUFFER
-
1
-
Zero if color buffer is -single-buffered.
-One if color buffer is double-buffered.
-
GL_DRAW_BUFFER
-
1
-
Current color draw buffer: -GL_FRONT or GL_BACK.
-
GL_FRONT_FACE1
-
Polygon front-face winding: -GL_CW or GL_CCW.
-
GL_GREEN_BITS
-
1
-
Number of bits per green value -in the frame buffer.
-
GL_LINE_SMOOTH
-
1
-
Zero if line smoothing is -disabled.
-One if line smoothing is enabled.
-
GL_LINE_STIPPLE
-
1
-
Zero if line stippling is -disabled.
-One if line stippling is enabled.
-
GL_LINE_STIPPLE_PATTERN
-
1
-
Line stipple pattern.
-
GL_LINE_STIPPLE_REPEAT
-
1
-
Line stipple repeat factor.
-
GL_LINE_WIDTH
-
1
-
Line width in pixels.
-
GL_LINE_WIDTH_GRANULARITY
-
1
-
Aliased line width granularity.
-
GL_LINE_WIDTH_RANGE
-
2
-
Minimum and maximum aliased line -widths.
-
GL_ALIASED_LINE_WIDTH_RANGE
-
2
-
Minimum and maximum antialiased -line widths.
GL_COLOR_LOGIC_OP
-
1
-
Zero if logicop is disabled.
-One if logicop is enabled.
-
GL_LOGIC_OP_MODE
-
1
-
Logicop function.
-
GL_MATRIX_MODE
-
1
-
Matrix mode: GL_MODELVIEW or -GL_PROJECTION.
-
GL_MAX_MODELVIEW_STACK_DEPTH
-
1
-
Maximum size of the modelview -matrix stack.
-
GL_MAX_NAME_STACK_DEPTH
-
1
-
Maximum size of the selection -name stack.
-
GL_MAX_PROJECTION_STACK_DEPTH
-
1
-
Maximum size of the projection -matrix stack.
-
GL_MAX_TEXTURE_SIZE
-
1
-
Maximum 2D texture image width -and height.
-
GL_MAX_VIEWPORT_DIMS
-
2Maximum viewport width and -height in pixels.
-
GL_MODELVIEW_MATRIX
-
16
-
Current/top modelview matrix -values.
-
GL_MODELVIEW_MATRIX_STACK_DEPTH
-
1
-
Current size of the modelview -matrix stack.
-
GL_NAME_STACK_DEPTH
-
1
-
Current size of the selection -name stack.
-
GL_PACK_ROW_LENGTH
-
1
-
Pixel packing row length.
-
GL_POLYGON_SMOOTH
-
1
-
Zero if polygon smoothing is -disabled.
-One if polygon smoothing is enabled.
-
GL_PROJECTION_MATRIX
-
16
-
Current/top projection matrix -values.
-
GL_PROJECTION_STACK_DEPTH
-
1
-
Current size of projection -matrix stack.
-
GL_READ_BUFFER
-
1
-
Current read buffer: GL_FRONT or -GL_BACK.
-
GL_RED_BITS
-
1
-
Number of bits per red value in -the frame buffer.
-
GL_RENDER_MODE
-
1
-
Current rendering mode: -GL_RENDER or GL_SELECTION.
-
GL_RGBA_MODE
-
1
-
Always one.
-
GL_SCISSOR_BOX
-
4
-
Scissor box (x, y, width, -height).
-
GL_SCISSOR_TEST
-
1
-
Zero if scissor test is disabled.
-One if scissor test is enabled.
-
GL_SELECTION_BUFFER_SIZE
-
1
-
Size of selection buffer.
-
GL_SHADE_MODEL
-
1
-
Shade model: GL_FLAT or -GL_SMOOTH.
-
GL_STENCIL_BITS
-
1
-
Number of bits per stencil value -in the frame buffer.
-
GL_STENCIL_CLEAR_VALUE
-
1
-
Stencil buffer clear value.
-
GL_STENCIL_FAIL
-
1
-
Stencil fail operation.
-
GL_STENCIL_FUNC
-
1
-
Stencil function.
-
GL_STENCIL_REF
-
1
-
Stencil reference value.
-
GL_STENCIL_TEST
-
1
-
Zero if stencil test is disabled.
-One if stencil test is enabled.
-
GL_STENCIL_VALUE_MASK
-
1
-
Stencil mask value.
-
GL_STENCIL_WRITE_MASK
-
1
-
Stencil buffer write mask.
-
GL_TEXTURE_2D
-
1
-
Zero if 2D texture mapping is -disabled.
-One if 2D texture mapping is enabled.
-
GL_TEXTURE_BINDING_2D1
-
Name of currently bound 2D -texture object.
-
GL_TEXTURE_ENV_COLOR
-
4
-
Texture environment color (red, -green, blue, alpha).
-
GL_TEXTURE_ENV_MODE
-
1
-
Texture environment mode.
-
GL_UNPACK_ROW_LENGTH
-
1
-
Pixel unpacking row length.
-
GL_UNPACK_LSB_FIRST
-
1
-
Zero if most significant bit is -unpacked first for bitmaps.
-One if least significant bit is unpacked first for bitmaps.
-
GL_VIEWPORT
-
4
-
Current viewport (x, y, width, -height).
-
-
-
-

9.2 String Queries

-The command
-
-
const GLubyte *glGetString(GLenum name)
-
-
-is used to query string-valued values.  The legal values for name are described in the following -table:
-
- - - - - - - - - - - - - - - - - - - - - - - -
name
-
Return value
-
GL_VERSION
-
The library version, such as -"1.2".
-
GL_RENDERER
-
The renderer, such as "Mesa DRI -Radeon".
-
GL_VENDOR
-
The vendor of this -implementation, such as "Tungsten Graphics, Inc."
-
GL_EXTENSIONS
-
A white-space separated list of -the supported extensions.
-
-

9.3 Error Queries

-The command
-
-
GLenum glGetError(void)
-
-
-returns the current error code.  The current error code will be -set by a GL command when an error condition has been detected.  If -the current error code is already set, subsequent errors will not be -recorded.  The error code is reset/cleared to GL_NO_ERROR when glGetError returns.  The -following error codes are possible:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Error code
-
Meaning
-
GL_NO_ERROR
-
No error has been recorded.
-
GL_INVALID_ENUM
-
An enum parameter had an invalid -value.
-
GL_INVALID_VALUE
-
A numeric parameter had an -invalid value.
-
GL_INVALID_OPERATION
-
A function was called when not -legal to do so.
-
GL_STACK_OVERFLOW
-
The current transformation -matrix stack is full.
-
GL_STACK_UNDERFLOW
-
The current transformation -matrix stack is empty.
-
GL_OUT_OF_MEMORY
-
The system ran out of dynamic -memory.
-
-
-
-

10. Unsupported Features

-This section lists other features and functions which are not supported -and not previously discussed.
-
-

10.1 Feedback Mode

-Feedback mode and the following related functions are not supported.
-
-
glFeedbackBuffer
-glPassThrough
-
-
-

10.2 1D and 3D Textures
-

-Only 2D texture images are supported.  The following functions -used to specify 1D and 3D texture images are not supported:
-
-
glTexImage1D
-glTexImage3D
-glTexSubImage1D
- glTexSubImage3D
-glCopyTexImage1D
- glCopyTexSubImage1D
- glCopyTexSubImage3D
-
-
-

10.3 Alternate Texture Image Commands
-

-Texture images may only be specified with glTexImage2D.  The following -alternate texture image commands are not supported:
-
-
glTexSubImage2D
-glCopyTexImage2D
-glCopyTexSubImage2D
-
-
-

10.4 Proxy Textures

-Proxy textures are not supported and the GL_PROXY_TEXTURE_2D token is -not supported by any function.
-
-
-

10.5 Other Texture Commands

-The following commands related to texture mapping are not supported by -the subset:
-
-
glPrioritizeTextures
-glAreTexturesResident
-glIsTexture
-glTexEnviv
-glTexEnvf
-glTexParameterf
-glTexParameteriv
-glTexParameterfv
-
-
-
-

10.6 Copy and Draw Pixels
-

-The following commands are not supported:
-
-
glDrawPixels
-glCopyPixels
-glPixelZoom
-
-
-

10.7 Color Index Mode
-

-Color index mode and the following related commands are not supported:
-
- -
glIndexub
-
glIndexi
-glIndexs
-glIndexf
-glIndexd
-
glIndexubv
-
glIndexiv
-glIndexsv
-glIndexfv
-glIndexdv

-glIndexMask
-
glClearIndex
-glIndexPointer

-
-
-

10.8 Pixel Transfer Operations

-The pixel transfer operations (scale, bias, look-up table, etc) are not -supported and the following commands are omitted:
-
-
glPixelTransferf
-glPixelTransferi
-glPixelMapfv
-glPixelMapuiv
-glPixelMapusv
-glGetPixelMapfv
-glGetPixelMapuiv
-glGetPixelMapusv
-
-
-

10.9 Hints

-Hints and the following related command is not supported:
-
-
glHint
-

-
-

10.10 State Query Commands
-

-The following state query commands are not supported:
-
-
glGetBooleanv
-glGetIntegerv
-glGetDoublev
-glGetPointerv
-glGetTexEnvi
-glGetTexEnvf
-glGetTexParameteriv
-glGetTexParameterfv
-glGetTexLevelParameteriv
-glGetTexLevelParameterfv
-glGetTexImage
-glGetClipPlane
-
-
-

10.11 Attribute Stacks

-State attribute stacks and the following related commands are not -supported:
-
-
glPushAttrib
-glPopAtttrib
-
-
-

10.12 Double-Valued Functions

-All functions which take double-precision floating point values, but -for which there is an equivalent single-precision valued function, are -omitted.  This includes, but is not limited to:
-
-
glVertex2d
-glVertex2dv
-glVertex3d
- glVertex3dv
-glVertex4d
- glVertex4dv
-glColor3d
-glColor3dv
-glColor4d
- glColor4dv
-glTexCoord1d
-glTexCoord1dv
-glTexCoord2d
- glTexCoord2dv
-glTexCoord3d
- glTexCoord3dv
-glTexCoord4d
- glTexCoord4dv
-glRasterPos2d
- glRasterPos2dv
-glRasterPos3d
- glRasterPos3dv
-glRasterPos4d
- glRasterPos4dv
-glLoadMatrixd
-glMultMatrixd
-glScaled
-glRotated
-glTranslated
-glRectd
-glRectdv
-

-
-

10.13 Evaluators

-Evaluators and the following related commands are not supported:
-
-
glMap1f
-glMap2d
-glMap2f
-glGetMapdv
-glGetMapfv
-glGetMapiv
-glEvalCoord1d
-glEvalCoord1f
-glEvalCoord1dv
-glEvalCoord1fv
-glEvalCoord2d
-glEvalCoord2f
-glEvalCoord2dv
-glEvalCoord2fv
-glMapGrid1d
-glMapGrid1f
-glMapGrid2d
-glMapGrid2f
-glEvalPoint1
-glEvalPoint2
-glEvalMesh1
-glEvalMesh2
-
-
-

10.14 Display Lists

-Display lists and the following related commands are not supported:
-
-
glIsList
-glDeleteLists
-glGenLists
-glNewList
-glEndList
-glCallList
-glCallLists
-glListBase
-
-
-

10.15 Accumulation Buffer

-The accumulation buffer and the following related commands are not -supported:
-
-
glAccum
-glClearAccum
-
-
-

10.16 Fog

-Fog and the following related commands are not supported:
-
-
glFogi
-glFogf
-glFogiv
-glFogfv
-
-
-

10.17 Depth Test

-Depth testing and the following related commands are not supported:
-
-
glDepthFunc
-glDepthMask
-glDepthRange
-glClearDepth
-
-
-

10.18 Imaging Subset

-The OpenGL imaging subset (which implements features such as -convolution, histogram, min/max recording, color matrix and color -tables) is not supported.
-
-
-

Appendix A: Issues

-This appendix lists documentation and subset issues with their current -status.  For items which are still open, the documentation (above) -follows the recommended solution.
-
-

A.1 Vertex Arrays

-Should vertex arrays be supported?  Is there a performance -advantage?
-
-RESOLUTION: No, there isn't enough of a performance advantage to -justify them.
-
-

A.2 Polygon Antialiasing and Edge Flags

-Should edge flags be supported for antialiasing?
-
-Edge flags don't effect antialiasing, at least not normally.  A -number of approaches to antialiasing have been summarized in email.
-
-RECOMMENDATION: don't support edge flags.  They don't effect -polygon antialiasing.
-
-RESOLUTION: closed, as of 26 Feb 2003.
-
-

A.3 glRasterPos vs. glWindowPos

-Should glRasterPos and/or glWindowPos commands be supported?
-
-RESOLUTION: Closed: implement glRasterPos commands, but not glWindowPos -commands.
-
-

A.4 GL_IBM_rasterpos_clip extension

-Should the GL_IBM_rasterpos_clip extension be implemented?
-
-RESOLUTION:  No.  It's not required.
-
-

A.5 Image Formats and Types

-Which image formats and types should be supported for glTexImage2D and glReadPixels?
-
-OpenGL specifies a large -variety of image formats and data types.  Only a few are commonly -used.
-
-RECOMMENDATION:  we propose a subset:
-
-For glTexImage2D only allow type=GL_UNSIGNED_BYTE and format=GL_RGBA, GL_RGB, -GL_INTENSITY.   Only allow internalFormat -to be GL_RGBA, GL_RGB or GL_INTENSITY as well.  Basically, only -support image formats/types that are directly supported by the Radeon -hardware.  This will allow glTexImage2D -to basically just use memcpy to -copy texture images.
-
-For glReadPixels, only allow type = GL_UNSIGNED_BYTE or GL_FLOAT. - Only allow format = -GL_RGB or GL_RGBA.  This is just enough to support the OpenGL -conformance tests.
-
-RESOLUTION: open
-
-

A.6 Texture Environment Modes

-Which texture environment modes should be supported?  OpenGL 1.2 -has GL_REPLACE, GL_MODULATE, GL_DECAL and GL_BLEND.  GL_DECAL isn't -defined for all base internal texture formats.  GL_ADD is another -useful mode.  Perhaps drop GL_DECAL mode and add GL_ADD mode.
-
-RECOMMENDATION: implement the standard modes GL_REPLACE, GL_MODULATE, -GL_DECAL and GL_BLEND.
-
-RESOLUTION: open
-
-

A.7 Truncated Mipmaps and LOD Control

-Should we support the GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_MAX_LEVEL, -GL_TEXTURE_MIN_LOD and GL_TEXTURE_MAX_LOD texture parameters?
-
-RECOMMENDATION:  We propose omitting these features at this time, -in the interest of simplifying the driver.
-
-RESOLUTION: open
-
-

A.8 Texture Priorities and Residency

-Should the subset support texture priorities via glPrioritizeTextures and the glAreTexturesResident command?
-
-RECOMMENDATION:  Few applications use these features and -functions.  We propose omitting them to simplify the driver.
-
-RESOLUTION: open
-
-

A.9 Pixel Pack/Unpack Alignment Control

-Should we support the GL_PACK_ALIGNMENT and GL_UNPACK_ALIGNMENT options?
-
-These are used to align pixel data addresses to 1, 2 and 4-byte -multiples for glBitmap, glTexImage2D -and glReadPixels.  These -aren't strictly needed since the user can provide a 1, 2 or 4-byte -aligned address and appropriate GL_PACK_ROW_LENGTH or -GL_UNPACK_ROW_LENGTH values instead.
-
-RECOMMENDATION:  We recommend omitting them to simplify the driver.
-
-RESOLUTION: open
-
-

A.10 Pixel Pack/Unpack Skip Rows/Pixels Control

-Should we support the GL_UNPACK_SKIP_PIXELS, GL_UNPACK_SKIP_ROWS, -GL_PACK_SKIP_PIXELS and GL_PACK_SKIP_ROWS options for pixel -unpacking/packing?
-
-These options aren't really needed since the user can adjust the start -address and GL_PACK/UNPACK_ROW_LENGTH parameters to achieve the same -effect.
-
-RECOMMENDATION:  omit these parameters.
-
-RESOLUTION: open
-
-

A.11 Texture State Queries

-Should we support the command glGetTexEnvi/fv, -glGetTexParameteri/fv and glGetTexLevelParameteri/fv?
-
-RECOMMENDATION:  No. They're seldom needed and their -implementation is several hundred lines of code in length.
-
-RESOLUTION:  open
-
-

A.12 glGetIntegerv, glGetBooleanv and glGetDoublev

-Should we support the commands glGetIntegerv, -glGetBooleanv and glGetDoublev -in addition to glGetFloatv?
-
-RECOMMENDATION:  Omit the boolean, integer and double-valued -functions. All state values which can be queried by these commands can -be expressed as floating point values and queried with glGetFloatv.  The -implementation of the other three commands involves many lines of code.
-
-RESOLUTION:  open
-
-

A.13 glBitmap and Per-Fragment Operations

-Should bitmaps rendered with glBitmap -be subjected to the per-fragment operations?
-
-If bitmaps are implemented with points it will be easy to implement the -per-fragment operations.  Otherwise, it could be difficult.
-
-RECOMMENDATION:  Implement glBitmap by drawing points/pixels with -the hardware.  This will make supporting the per-fragments -trivially easy.  Also, it makes portrait-mode display relatively -easy.
-
-RESOLUTION:  open
-
-

A.14 Reduced gl.h Header File

-Should we produce a reduced gl.h header file which only defines the -tokens and functions which are implemented by the subset?
-
-RECOMMENDATION: yes.  It would be a useful reference to -programmers to quickly determine which functions and tokens are -supported.
-
-RESOLUTION: open
-
-

A.15 glPolygonMode

-Is glPolygonMode needed?
-
-RECOMMENDATION: No.  Omit it.
-
-RESOLUTION: closed, as of 26 Feb 2003
-
-
-

- - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/subset.html b/nx-X11/extras/Mesa_6.4.2/docs/subset.html deleted file mode 100644 index dd1d742a82..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/subset.html +++ /dev/null @@ -1,33 +0,0 @@ - - -Mesa Subset - - - - - -

Mesa Subset

- -

-In 2002/2003 Tungsten Graphics was contracted to develop a subset Mesa/Radeon -driver for an embedded environment. The result is a reduced-size DRI driver -for the ATI R200 chip, for use with Linux fbdev rather than XFree86. -

- -

-The specification for this subset can be found -here. -

- -

-The MiniGLX specification describes the -interface between fbdev and Mesa. -

- -

-More info to come... -

- - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/systems.html b/nx-X11/extras/Mesa_6.4.2/docs/systems.html deleted file mode 100644 index 3a6594f5ff..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/systems.html +++ /dev/null @@ -1,56 +0,0 @@ - - -Supported Systems and Drivers - - - - - -

Supported Systems and Drivers

- -

-Mesa was originally designed for Unix/X11 systems and is still best -supported on those systems. All you need is an ANSI C compiler and the -X development environment to use Mesa. -

- -

-The DRI hardware drivers for the X.org server and XFree86 provide -hardware accelerated rendering for chips from ATI, Intel, Matrox, 3dfx -and others on Linux and FreeBSD. -

- -

-Drivers for other assorted platforms include: -the Amiga, Apple Macintosh, BeOS, NeXT, OS/2, MS-DOS, VMS, Windows -9x/NT, and Direct3D. -

- -

-Details about particular drivers follows. -Be warned that some drivers may be out of date and no longer function. -

- - - - - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/docs/thanks.html b/nx-X11/extras/Mesa_6.4.2/docs/thanks.html deleted file mode 100644 index 78b9e3e5ec..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/thanks.html +++ /dev/null @@ -1,134 +0,0 @@ - - - -Acknowledgements - - - - - - -

Acknowledgments

- - -The following individuals and groups are to be acknowledged for their -contributions to Mesa over the years. -This list is far from complete and somewhat dated, unfortunately. - - -
    -
  • Early Mesa development was done while Brian was part of the -SSEC Visualization Project at the University of -Wisconsin. He'd like to thank Bill Hibbard for letting him work on -Mesa as part of that project. -
    -
    -
  • John Carmack of id Software, Inc. funded Keith Whitwell in 1999 in -order to optimize Mesa's vertex transformation module. This is a very -substantial piece of work. -
    -
    -
  • Precision Insight, Inc., VA Linux Systems, Inc., and most recently, -Tungsten Graphics, Inc. have supported the ongoing development of Mesa. -
    -
    -
  • The -Mesa -website is hosted by - -Sourceforge.net -
    -
    - -
  • The Mesa CVS repository is hosted by -freedesktop.org. -
    -
    - - -
  • alt.software contributed the Direct3D driver. - -
  • Bernd Barsuhn wrote the evaluator code for (splines, -patches) in Mesa. - -
  • Bernhard Tschirren wrote the Allegro DJGPP driver. - -
  • Bogdan Sikorski wrote the GLU NURBS and polygon tessellator -in Mesa. - -
  • Charlie Wallace wrote the MS-DOS driver. - -
  • CJ Beyer was the www.mesa3d.org webmaster. - -
  • Darren Abbott provided the OS/2 driver. - -
  • David Bucciarelli wrote and maintained the 3Dfx Glide -driver. Thousands of Linux/Quake players thank David! - -
  • Gareth Hughes wrote new GLU 1.2 Polygon Tessellation code -(now superceded by SGI SI GLU). - -
  • Holger Waechtler contributed AMD 3DNow! assembly code which -accelerates vertex transformation in Mesa 3.1. Holger also implemented -the GL_EXT_texture_env_combine extension. - -
  • Jeroen van der Zijp and Thorsten Ohl contributed the -Xt/Motif widget code. - -
  • John Stone provided the multi-threading support in Mesa 3.0. - -
  • John Watson assisted with web page design. - -
  • Josh Vanderhoof contributed Intel x86 assembly code which -accelerates vertex transformation in Mesa 3.x. - -
  • Jouk Jansen contributed and continues to maintain the VMS -support. - -
  • Karl Schultz has been maintaining the Windows driver. - -
  • Keith Whitwell has made extension contributions to Mesa -since 1999. - -
  • Kendall Bennett wrote the SciTech MGL driver. - -
  • Klaus Niederkrueger contributed many improvements to Mesa's -software rasterizer. - -
  • Mark Kilgard contributed antialiased line improvements and -several extensions. - -
  • Michael Pichler contributed many bug fixes - -
  • Miklos Fazekas wrote and maintains the Macintosh driver. - -
  • Pascal Thibaudeau wrote the NeXT driver. - -
  • Pedro Vazquez setup and maintains the Mesa Mailing list. - -
  • Randy Frank contributed many bug fixes. - -
  • Stefan Zivkovic wrote the Amiga driver. - -
  • Stephane Rehel provided the Cygnus Win32 support - -
  • Ted Jump maintained the -makefiles and project files for Windows 95/98/NT compilation for some time. - -
  • Uwe Maurer wrote the LibGGI driver for Mesa-3.0. - -
  • Victor Ng-Thow-Hing wrote the Amiwin driver for the Amiga. - -
- -

-Apologies to anyone who's been omitted. -Please send corrections and additions to Brian. -

- - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/utilities.html b/nx-X11/extras/Mesa_6.4.2/docs/utilities.html deleted file mode 100644 index 4693639b8a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/utilities.html +++ /dev/null @@ -1,26 +0,0 @@ - - -Development Utilities - - - - - -

Development Utilities

- -
    - -
  • The Mesa distribution includes several utility routines in the -progs/util/ directory - -
  • Allen Akin's glean is a framework for OpenGL testing. - -
  • Valgrind is a very useful tool for tracking down -memory-related problems in your code. - -
- - - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/docs/utility.html b/nx-X11/extras/Mesa_6.4.2/docs/utility.html deleted file mode 100644 index c7cad0114b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/utility.html +++ /dev/null @@ -1,44 +0,0 @@ - - -Utilities - - - - - -

Utilities

- - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/docs/webmaster.html b/nx-X11/extras/Mesa_6.4.2/docs/webmaster.html deleted file mode 100644 index e645b90ba1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/docs/webmaster.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Mesa Introduction - - - - - -

Webmaster

- -

-If you have problems, edits or additions for this website send them -to Brian -(brian_e_paul@yahoo.com). -

- -

-Mark Manning made the frame-based layout for the website. -Brian's modified it a lot since then. -

- - - - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/.cvsignore b/nx-X11/extras/Mesa_6.4.2/doxygen/.cvsignore deleted file mode 100644 index 1b0edf90a6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/.cvsignore +++ /dev/null @@ -1,15 +0,0 @@ -*.tag -agpgart -array_cache -core -core_subset -math -math_subset -miniglx -radeon_subset -radeondrm -radeonfb -swrast -swrast_setup -tnl -tnl_dd diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/Makefile b/nx-X11/extras/Mesa_6.4.2/doxygen/Makefile deleted file mode 100644 index 055b17386d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/Makefile +++ /dev/null @@ -1,33 +0,0 @@ - -default: full - -all: full subset - -%.tag: %.doxy - doxygen $< - -FULL = \ - main.doxy \ - math.doxy \ - array_cache.doxy \ - glapi.doxy \ - shader.doxy \ - swrast.doxy \ - swrast_setup.doxy \ - tnl.doxy \ - tnl_dd.doxy - -full: $(FULL:.doxy=.tag) - $(foreach FILE,$(FULL),doxygen $(FILE);) - -SUBSET = \ - main.doxy \ - math.doxy \ - miniglx.doxy - -subset: $(SUBSET:.doxy=.tag) - $(foreach FILE,$(SUBSET),doxygen $(FILE);) - -clean: - rm -rf $(FULL:.doxy=) $(SUBSET:.doxy=) - rm -rf *.tag diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/README b/nx-X11/extras/Mesa_6.4.2/doxygen/README deleted file mode 100644 index 9b820041d1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/README +++ /dev/null @@ -1,10 +0,0 @@ - -This directory is for doxygen (a source code documentation system). - -See http://www.doxygen.org/ for more info. - -Either run 'make' (Unix) or 'doxy.bat' (Windows) to run doxygen -and generate souce code documentation. - -Then, load either doxygen/main/index.html or doxygen/core_subset/index.html into -your web browser. diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/array_cache.doxy b/nx-X11/extras/Mesa_6.4.2/doxygen/array_cache.doxy deleted file mode 100644 index ae0b1fa139..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/array_cache.doxy +++ /dev/null @@ -1,50 +0,0 @@ -# Doxyfile 0.1 - -@INCLUDE = common.doxy - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "Mesa array_cache" -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../src/mesa/array_cache/ -FILE_PATTERNS = *.c \ - *.h -RECURSIVE = NO -EXCLUDE = -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -HTML_OUTPUT = array_cache -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = main.tag=../core \ - math.tag=../math \ - shader.tag=../shader \ - swrast.tag=../swrast \ - swrast_setup.tag=../swrast_setup \ - tnl.tag=../tnl \ - tnl_dd.tag=../tnl_dd -GENERATE_TAGFILE = array_cache.tag diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/common.doxy b/nx-X11/extras/Mesa_6.4.2/doxygen/common.doxy deleted file mode 100644 index 1b5e5fece6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/common.doxy +++ /dev/null @@ -1,1153 +0,0 @@ -# Doxyfile 1.3.8 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = Mesa - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = 6.2 - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of source -# files, where putting all generated files in the same directory would otherwise -# cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, -# Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is used -# as the annotated text. Otherwise, the brief description is used as-is. If left -# blank, the following values are used ("$name" is automatically replaced with the -# name of the entity): "The $name class" "The $name widget" "The $name file" -# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = YES - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = YES - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = header.html - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = ../include - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse the -# parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = NO - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superseded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes that -# lay further from the root node will be omitted. Note that setting this option to -# 1 or 2 may greatly reduce the computation time needed for large code bases. Also -# note that a graph may be further truncated if the graph's image dimensions are -# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). -# If 0 is used for the depth value (the default), the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/core_subset.doxy b/nx-X11/extras/Mesa_6.4.2/doxygen/core_subset.doxy deleted file mode 100644 index 35faf565dc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/core_subset.doxy +++ /dev/null @@ -1,226 +0,0 @@ -# Doxyfile 0.1 - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "Mesa Main" -PROJECT_NUMBER = -OUTPUT_DIRECTORY = -OUTPUT_LANGUAGE = English -EXTRACT_ALL = NO -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -INTERNAL_DOCS = YES -STRIP_CODE_COMMENTS = YES -CASE_SENSE_NAMES = YES -SHORT_NAMES = NO -HIDE_SCOPE_NAMES = NO -VERBATIM_HEADERS = YES -SHOW_INCLUDE_FILES = YES -JAVADOC_AUTOBRIEF = NO -INHERIT_DOCS = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -DISTRIBUTE_GROUP_DOC = NO -TAB_SIZE = 8 -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -ALIASES = -ENABLED_SECTIONS = subset -MAX_INITIALIZER_LINES = 30 -OPTIMIZE_OUTPUT_FOR_C = NO -SHOW_USED_FILES = YES -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_UNDOCUMENTED = NO -WARN_FORMAT = -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../src/mesa/main/ -FILE_PATTERNS = \ - accum.h \ - attrib.h \ - blend.[ch] \ - buffers.[ch] \ - dd.h \ - debug.h \ - depth.h \ - dlist.h \ - context.[ch] \ - config.h \ - colormac.h \ - colortab.h \ - enable.h \ - enums.h \ - eval.h \ - extensions.h \ - feedback.[ch] \ - fog.h \ - get.h \ - glheader.h \ - glthread.h \ - hash.[ch] \ - hint.h \ - histogram.h \ - image.[ch] \ - imports.[ch] \ - lines.[ch] \ - light.h \ - matrix.[ch] \ - macros.h \ - mmath.h \ - mtypes.h \ - pixel.h \ - points.[ch] \ - polygon.[ch] \ - rastpos.[ch] \ - simple_list.h \ - state.[ch] \ - stencil.[ch] \ - subset_*.c \ - texformat.h \ - teximage.h \ - texstate.h \ - texstore.h \ - texobj.[ch] \ - texutil_tmp.h \ - varray.h -RECURSIVE = NO -EXCLUDE = -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = core_subset -HTML_HEADER = header_subset.html -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = -MAN_EXTENSION = -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = ../include/ -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = \ - math_subset.tag=../math_subset \ - miniglx.tag=../miniglx -GENERATE_TAGFILE = core_subset.tag -ALLEXTERNALS = NO -PERL_PATH = -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -TEMPLATE_RELATIONS = YES -HIDE_UNDOC_RELATIONS = YES -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -GRAPHICAL_HIERARCHY = YES -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO -CGI_NAME = -CGI_URL = -DOC_URL = -DOC_ABSPATH = -BIN_ABSPATH = -EXT_DOC_PATHS = diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/doxy.bat b/nx-X11/extras/Mesa_6.4.2/doxygen/doxy.bat deleted file mode 100644 index 2d8b567ce3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/doxy.bat +++ /dev/null @@ -1,19 +0,0 @@ -doxygen tnl_dd.doxy -doxygen array_cache.doxy -doxygen math.doxy -doxygen swrast.doxy -doxygen swrast_setup.doxy -doxygen tnl.doxy -doxygen core.doxy -doxygen glapi.doxy -doxygen shader.doxy - -echo Building again, to resolve tags -doxygen tnl_dd.doxy -doxygen array_cache.doxy -doxygen math.doxy -doxygen swrast.doxy -doxygen swrast_setup.doxy -doxygen tnl.doxy -doxygen glapi.doxy -doxygen shader.doxy diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/glapi.doxy b/nx-X11/extras/Mesa_6.4.2/doxygen/glapi.doxy deleted file mode 100644 index eafc2a109a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/glapi.doxy +++ /dev/null @@ -1,49 +0,0 @@ -# Doxyfile 0.1 - -@INCLUDE = common.doxy - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "Mesa GL API dispatcher" -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../src/mesa/glapi/ -FILE_PATTERNS = *.c *.h -RECURSIVE = NO -EXCLUDE = -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -HTML_OUTPUT = glapi -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = ../include/ -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = main.tag=../core \ - math.tag=../math \ - tnl_dd.tag=../tnl_dd \ - swrast.tag=../swrast \ - swrast_setup.tag=../swrast_setup \ - tnl.tag=../tnl \ - array_cache.tag=array_cache -GENERATE_TAGFILE = swrast.tag diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/header.html b/nx-X11/extras/Mesa_6.4.2/doxygen/header.html deleted file mode 100644 index 5ca2763e0d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/header.html +++ /dev/null @@ -1,17 +0,0 @@ - - -Mesa Source Code Documentation - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/header_subset.html b/nx-X11/extras/Mesa_6.4.2/doxygen/header_subset.html deleted file mode 100644 index e7f001060e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/header_subset.html +++ /dev/null @@ -1,11 +0,0 @@ - -Mesa Source Code Documentation - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/main.doxy b/nx-X11/extras/Mesa_6.4.2/doxygen/main.doxy deleted file mode 100644 index 3cb05967aa..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/main.doxy +++ /dev/null @@ -1,50 +0,0 @@ -# Doxyfile 0.1 - -@INCLUDE = common.doxy - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "Mesa Main" -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../src/mesa/main/ -FILE_PATTERNS = *.c *.h -RECURSIVE = NO -EXCLUDE = ../src/glapitemp.h ../src/glapioffsets.h -EXCLUDE_PATTERNS = subset_* -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -HTML_OUTPUT = main -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = YES -SEARCH_INCLUDES = YES -INCLUDE_PATH = ../include/ -INCLUDE_FILE_PATTERNS = -PREDEFINED = _HAVE_FULL_GL=1 -EXPAND_AS_DEFINED = _glthread_DECLARE_STATIC_MUTEX -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = tnl_dd.tag=../tnl_dd \ - array_cache.tag=../array_cache \ - glapi.tag=../glapi \ - math.tag=../math \ - shader.tag=../shader \ - swrast.tag=../swrast \ - swrast_setup.tag=../swrast_setup \ - tnl.tag=../tnl -GENERATE_TAGFILE = main.tag diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/math.doxy b/nx-X11/extras/Mesa_6.4.2/doxygen/math.doxy deleted file mode 100644 index 72ec2e3cd2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/math.doxy +++ /dev/null @@ -1,49 +0,0 @@ -# Doxyfile 0.1 - -@INCLUDE = common.doxy - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "Mesa math module" -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../src/mesa/math/ -FILE_PATTERNS = *.c \ - *.h -RECURSIVE = NO -EXCLUDE = -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -HTML_OUTPUT = math -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = tnl_dd.tag=../tnl_dd \ - main.tag=../core \ - swrast.tag=../swrast \ - swrast_setup.tag=../swrast_setup \ - tnl.tag=../tnl \ - array_cache.tag=../array_cache -GENERATE_TAGFILE = math.tag diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/math_subset.doxy b/nx-X11/extras/Mesa_6.4.2/doxygen/math_subset.doxy deleted file mode 100644 index 9f6e95ff62..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/math_subset.doxy +++ /dev/null @@ -1,177 +0,0 @@ -# Doxyfile 0.1 - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "Mesa math module" -PROJECT_NUMBER = -OUTPUT_DIRECTORY = . -OUTPUT_LANGUAGE = English -EXTRACT_ALL = NO -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -INTERNAL_DOCS = NO -STRIP_CODE_COMMENTS = YES -CASE_SENSE_NAMES = YES -SHORT_NAMES = NO -HIDE_SCOPE_NAMES = NO -VERBATIM_HEADERS = YES -SHOW_INCLUDE_FILES = YES -JAVADOC_AUTOBRIEF = NO -INHERIT_DOCS = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -DISTRIBUTE_GROUP_DOC = NO -TAB_SIZE = 8 -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -ALIASES = -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -OPTIMIZE_OUTPUT_FOR_C = YES -SHOW_USED_FILES = YES -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_UNDOCUMENTED = NO -WARN_FORMAT = -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../src/mesa/math/ -FILE_PATTERNS = m_matrix.[ch] -RECURSIVE = NO -EXCLUDE = -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = math_subset -HTML_HEADER = header_subset.html -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = -MAN_EXTENSION = -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = core_subset.tag=../core_subset -GENERATE_TAGFILE = math_subset.tag -ALLEXTERNALS = NO -PERL_PATH = -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -TEMPLATE_RELATIONS = YES -HIDE_UNDOC_RELATIONS = YES -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -GRAPHICAL_HIERARCHY = YES -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO -CGI_NAME = -CGI_URL = -DOC_URL = -DOC_ABSPATH = -BIN_ABSPATH = -EXT_DOC_PATHS = diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/miniglx.doxy b/nx-X11/extras/Mesa_6.4.2/doxygen/miniglx.doxy deleted file mode 100644 index 61c376caf2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/miniglx.doxy +++ /dev/null @@ -1,179 +0,0 @@ -# Doxyfile 0.1 - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "MiniGLX" -PROJECT_NUMBER = -OUTPUT_DIRECTORY = -OUTPUT_LANGUAGE = English -EXTRACT_ALL = NO -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -INTERNAL_DOCS = YES -STRIP_CODE_COMMENTS = YES -CASE_SENSE_NAMES = YES -SHORT_NAMES = NO -HIDE_SCOPE_NAMES = NO -VERBATIM_HEADERS = NO -SHOW_INCLUDE_FILES = NO -JAVADOC_AUTOBRIEF = NO -INHERIT_DOCS = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -DISTRIBUTE_GROUP_DOC = NO -TAB_SIZE = 8 -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -ALIASES = -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -OPTIMIZE_OUTPUT_FOR_C = NO -SHOW_USED_FILES = YES -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_UNDOCUMENTED = NO -WARN_FORMAT = -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../src/glx/mini/ ../include/GL/miniglx.h -FILE_PATTERNS = *.h *.c -RECURSIVE = NO -EXCLUDE = ../src/glx/mini/glapi.c -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = miniglx -HTML_HEADER = header_subset.html -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = -MAN_EXTENSION = -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = ../include/ -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = \ - core_subset.tag=../core_subset \ - math_subset.tag=../math_subset -GENERATE_TAGFILE = miniglx.tag -ALLEXTERNALS = NO -PERL_PATH = -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -TEMPLATE_RELATIONS = YES -HIDE_UNDOC_RELATIONS = YES -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -GRAPHICAL_HIERARCHY = YES -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO -CGI_NAME = -CGI_URL = -DOC_URL = -DOC_ABSPATH = -BIN_ABSPATH = -EXT_DOC_PATHS = diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/radeon_subset.doxy b/nx-X11/extras/Mesa_6.4.2/doxygen/radeon_subset.doxy deleted file mode 100644 index fb9d0e9535..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/radeon_subset.doxy +++ /dev/null @@ -1,203 +0,0 @@ -# Doxyfile 0.1 - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "Radeon Subset Driver" -PROJECT_NUMBER = -OUTPUT_DIRECTORY = -OUTPUT_LANGUAGE = English -EXTRACT_ALL = NO -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -INTERNAL_DOCS = YES -STRIP_CODE_COMMENTS = YES -CASE_SENSE_NAMES = YES -SHORT_NAMES = NO -HIDE_SCOPE_NAMES = NO -VERBATIM_HEADERS = NO -SHOW_INCLUDE_FILES = NO -JAVADOC_AUTOBRIEF = NO -INHERIT_DOCS = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -DISTRIBUTE_GROUP_DOC = NO -TAB_SIZE = 8 -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -ALIASES = -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -OPTIMIZE_OUTPUT_FOR_C = NO -SHOW_USED_FILES = YES -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_UNDOCUMENTED = NO -WARN_FORMAT = -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = \ - ../src/mesa/drivers/dri/common/mm.c \ - ../src/mesa/drivers/dri/common/mm.h \ - ../src/mesa/drivers/dri/radeon/radeon_context.c \ - ../src/mesa/drivers/dri/radeon/radeon_context.h \ - ../src/mesa/drivers/dri/radeon/radeon_ioctl.c \ - ../src/mesa/drivers/dri/radeon/radeon_ioctl.h \ - ../src/mesa/drivers/dri/radeon/radeon_lock.c \ - ../src/mesa/drivers/dri/radeon/radeon_lock.h \ - ../src/mesa/drivers/dri/radeon/radeon_screen.c \ - ../src/mesa/drivers/dri/radeon/radeon_screen.h \ - ../src/mesa/drivers/dri/radeon/radeon_state.c \ - ../src/mesa/drivers/dri/radeon/radeon_state.h \ - ../src/mesa/drivers/dri/radeon/radeon_state_init.c \ - ../src/mesa/drivers/dri/radeon/radeon_subset.h \ - ../src/mesa/drivers/dri/radeon/radeon_subset_bitmap.c \ - ../src/mesa/drivers/dri/radeon/radeon_subset_readpix.c \ - ../src/mesa/drivers/dri/radeon/radeon_subset_select.c \ - ../src/mesa/drivers/dri/radeon/radeon_subset_tex.c \ - ../src/mesa/drivers/dri/radeon/radeon_subset_vtx.c \ - ../src/mesa/drivers/dri/radeon/radeon_tcl.h \ - ../src/mesa/drivers/dri/radeon/radeon_tex.h \ - ../src/mesa/drivers/dri/radeon/radeon_vtxfmt.h \ - ../src/mesa/drivers/dri/radeon/server -FILE_PATTERNS = *.h *.c -RECURSIVE = NO -EXCLUDE = -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = radeon_subset -HTML_HEADER = header_subset.html -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = -MAN_EXTENSION = -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = ../include/ -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = \ - core_subset.tag=../core_subset \ - math_subset.tag=../math_subset \ - miniglx.tag=../miniglx -GENERATE_TAGFILE = radeon_subset.tag -ALLEXTERNALS = NO -PERL_PATH = -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -TEMPLATE_RELATIONS = YES -HIDE_UNDOC_RELATIONS = YES -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -GRAPHICAL_HIERARCHY = YES -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO -CGI_NAME = -CGI_URL = -DOC_URL = -DOC_ABSPATH = -BIN_ABSPATH = -EXT_DOC_PATHS = diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/shader.doxy b/nx-X11/extras/Mesa_6.4.2/doxygen/shader.doxy deleted file mode 100644 index 44fc7c4cfe..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/shader.doxy +++ /dev/null @@ -1,49 +0,0 @@ -# Doxyfile 0.1 - -@INCLUDE = common.doxy - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "Mesa Vertex and Fragment Program code" -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../src/mesa/shader/ -FILE_PATTERNS = *.c *.h -RECURSIVE = NO -EXCLUDE = -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -HTML_OUTPUT = shader -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = ../include/ -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = main.tag=../core \ - math.tag=../math \ - tnl_dd.tag=../tnl_dd \ - swrast.tag=../swrast \ - swrast_setup.tag=../swrast_setup \ - tnl.tag=../tnl \ - array_cache.tag=array_cache -GENERATE_TAGFILE = swrast.tag diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/swrast.doxy b/nx-X11/extras/Mesa_6.4.2/doxygen/swrast.doxy deleted file mode 100644 index b0ba953676..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/swrast.doxy +++ /dev/null @@ -1,48 +0,0 @@ -# Doxyfile 0.1 - -@INCLUDE = common.doxy - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "Mesa Software Rasterization (swrast)" -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../src/mesa/swrast/ -FILE_PATTERNS = *.c *.h -RECURSIVE = NO -EXCLUDE = -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -HTML_OUTPUT = swrast -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = ../include/ -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = main.tag=../core \ - math.tag=../math \ - tnl_dd.tag=../tnl_dd \ - swrast_setup.tag=../swrast_setup \ - tnl.tag=../tnl \ - array_cache.tag=array_cache -GENERATE_TAGFILE = swrast.tag diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/swrast_setup.doxy b/nx-X11/extras/Mesa_6.4.2/doxygen/swrast_setup.doxy deleted file mode 100644 index 9e2d72e36e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/swrast_setup.doxy +++ /dev/null @@ -1,49 +0,0 @@ -# Doxyfile 0.1 - -@INCLUDE = common.doxy - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "Mesa swrast_setup" -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../src/mesa/swrast_setup/ -FILE_PATTERNS = *.c \ - *.h -RECURSIVE = NO -EXCLUDE = -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -HTML_OUTPUT = swrast_setup -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = tnl_dd.tag=../tnl_dd \ - main.tag=../core \ - math.tag=../math \ - swrast.tag=../swrast \ - tnl.tag=../tnl \ - array_cache.tag=../array_cache -GENERATE_TAGFILE = swrast_setup.tag diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/tnl.doxy b/nx-X11/extras/Mesa_6.4.2/doxygen/tnl.doxy deleted file mode 100644 index 67f992f11e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/tnl.doxy +++ /dev/null @@ -1,50 +0,0 @@ -# Doxyfile 0.1 - -@INCLUDE = common.doxy - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "Mesa Transform and Lighting (tnl)" -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../src/mesa/tnl/ -FILE_PATTERNS = *.c \ - *.h -RECURSIVE = NO -EXCLUDE = -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -HTML_OUTPUT = tnl -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = tnl_dd.tag=../tnl \ - main.tag=../core \ - math.tag=../math \ - shader.tag=../shader \ - swrast.tag=../swrast \ - swrast_setup.tag=swrast_setup \ - array_cache.tag=array_cache -GENERATE_TAGFILE = tnl.tag diff --git a/nx-X11/extras/Mesa_6.4.2/doxygen/tnl_dd.doxy b/nx-X11/extras/Mesa_6.4.2/doxygen/tnl_dd.doxy deleted file mode 100644 index b7bd6e9744..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/doxygen/tnl_dd.doxy +++ /dev/null @@ -1,49 +0,0 @@ -# Doxyfile 0.1 - -@INCLUDE = common.doxy - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "Mesa tnl_dd" -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../src/mesa/tnl_dd/ -FILE_PATTERNS = *.c *.h -RECURSIVE = YES -EXCLUDE = -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -HTML_OUTPUT = tnl_dd -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = main.tag=../core \ - math.tag=../math \ - shader.tag=../shader \ - swrast.tag=../swrast \ - swrast_setup.tag=../swrast_setup \ - tnl.tag=../tnl \ - array_cache.tag=array_cache -GENERATE_TAGFILE = tnl_dd.tag diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/Makefile.am b/nx-X11/extras/Mesa_6.4.2/include/GL/Makefile.am deleted file mode 100644 index 199bd5c8f3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -## Process this file with automake to produce Makefile.in - -GLincludedir = $(includedir)/GL - -INC_FX = fxmesa.h -INC_GGI = ggimesa.h -INC_OSMESA = osmesa.h -INC_SVGA = svgamesa.h -INC_X11 = glx.h glxext.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h -INC_GLUT = glut.h glutf90.h - -if HAVE_FX -sel_inc_fx = $(INC_FX) -endif - -if HAVE_GGI -sel_inc_ggi = $(INC_GGI) -endif - -if HAVE_OSMESA -sel_inc_osmesa = $(INC_OSMESA) -endif - -if HAVE_SVGA -sel_inc_svga = $(INC_SVGA) -endif - -if HAVE_X11 -sel_inc_x11 = $(INC_X11) -endif - -if NEED_GLUT -sel_inc_glut = $(INC_GLUT) -endif - -EXTRA_HEADERS = amesa.h dosmesa.h foomesa.h glut_h.dja mesa_wgl.h mglmesa.h \ - vms_x_fix.h wmesa.h \ - $(INC_FX) $(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT) - -GLinclude_HEADERS = gl.h glext.h gl_mangle.h glu.h glu_mangle.h \ - $(sel_inc_fx) $(sel_inc_ggi) $(sel_inc_osmesa) $(sel_inc_svga) \ - $(sel_inc_x11) $(sel_inc_glut) -include $(top_srcdir)/common_rules.make diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/amesa.h b/nx-X11/extras/Mesa_6.4.2/include/GL/amesa.h deleted file mode 100644 index 852d34cf4f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/amesa.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* Allegro (DJGPP) driver by Bernhard Tschirren (bernie-t@geocities.com) */ - - -#ifndef AMESA_H -#define AMESA_H - - -#define AMESA_MAJOR_VERSION 3 -#define AMESA_MINOR_VERSION 3 - - -typedef struct amesa_visual *AMesaVisual; -typedef struct amesa_buffer *AMesaBuffer; -typedef struct amesa_context *AMesaContext; - - -extern AMesaVisual AMesaCreateVisual(GLboolean dbFlag, GLint depth, - GLint depthSize, - GLint stencilSize, - GLint accumSize); - -extern void AMesaDestroyVisual(AMesaVisual visual); - -extern AMesaBuffer AMesaCreateBuffer(AMesaVisual visual, - GLint width, GLint height); - -extern void AMesaDestroyBuffer(AMesaBuffer buffer); - - -extern AMesaContext AMesaCreateContext(AMesaVisual visual, - AMesaContext sharelist); - -extern void AMesaDestroyContext(AMesaContext context); - -extern GLboolean AMesaMakeCurrent(AMesaContext context, AMesaBuffer buffer); - -extern void AMesaSwapBuffers(AMesaBuffer buffer); - - -#endif /* AMESA_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/directfbgl.h b/nx-X11/extras/Mesa_6.4.2/include/GL/directfbgl.h deleted file mode 100644 index 984c4b1427..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/directfbgl.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - (c) Copyright 2001 convergence integrated media GmbH. - All rights reserved. - - Written by Denis Oliver Kropp and - Andreas Hundt . - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#ifndef __DIRECTFBGL_H__ -#define __DIRECTFBGL_H__ - -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - - -typedef struct { - int buffer_size; - int depth_size; - int stencil_size; - int aux_buffers; - - int red_size; - int green_size; - int blue_size; - int alpha_size; - - int accum_red_size; - int accum_green_size; - int accum_blue_size; - int accum_alpha_size; - - DFBBoolean double_buffer; - DFBBoolean stereo; -} DFBGLAttributes; - - -DEFINE_INTERFACE( IDirectFBGL, - - /** Context handling **/ - - /* - * Acquire the hardware lock. - */ - DFBResult (*Lock) ( - IDirectFBGL *thiz - ); - - /* - * Release the lock. - */ - DFBResult (*Unlock) ( - IDirectFBGL *thiz - ); - - /* - * Query the OpenGL attributes. - */ - DFBResult (*GetAttributes) ( - IDirectFBGL *thiz, - DFBGLAttributes *attributes - ); -) - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/dmesa.h b/nx-X11/extras/Mesa_6.4.2/include/GL/dmesa.h deleted file mode 100644 index e67b3426f9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/dmesa.h +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.1 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * DOS/DJGPP device driver v1.7 for Mesa - * - * Copyright (C) 2002 - Daniel Borca - * Email : dborca@users.sourceforge.net - * Web : http://www.geocities.com/dborca - */ - - -#ifndef DMESA_H_included -#define DMESA_H_included - -#define DMESA_MAJOR_VERSION 6 -#define DMESA_MINOR_VERSION 3 - -/* Sample Usage: - * - * 1. Call DMesaCreateVisual() to initialize graphics. - * 2. Call DMesaCreateContext() to create a DMesa rendering context. - * 3. Call DMesaCreateBuffer() to define the window. - * 4. Call DMesaMakeCurrent() to bind the DMesaBuffer to a DMesaContext. - * 5. Make gl* calls to render your graphics. - * 6. Use DMesaSwapBuffers() when double buffering to swap front/back buffers. - * 7. Before exiting, destroy DMesaBuffer, DMesaContext and DMesaVisual. - */ - -typedef struct dmesa_context *DMesaContext; -typedef struct dmesa_visual *DMesaVisual; -typedef struct dmesa_buffer *DMesaBuffer; - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Create a new Visual and set graphics mode. - */ -DMesaVisual DMesaCreateVisual (GLint width, /* X res */ - GLint height, /* Y res */ - GLint colDepth, /* BPP */ - GLint refresh, /* refresh rate: 0=default */ - GLboolean dbFlag, /* double-buffered */ - GLboolean rgbFlag, /* RGB mode */ - GLint alphaSize, /* requested bits/alpha */ - GLint depthSize, /* requested bits/depth */ - GLint stencilSize, /* requested bits/stencil */ - GLint accumSize); /* requested bits/accum */ - -/* - * Destroy Visual and restore screen. - */ -void DMesaDestroyVisual (DMesaVisual v); - - - -/* - * Create a new Context for rendering. - */ -DMesaContext DMesaCreateContext (DMesaVisual visual, DMesaContext share); - -/* - * Destroy Context. - */ -void DMesaDestroyContext (DMesaContext c); - -/* - * Return a handle to the current context. - */ -DMesaContext DMesaGetCurrentContext (void); - - - -/* - * Create a new Buffer (window). - */ -DMesaBuffer DMesaCreateBuffer (DMesaVisual visual, - GLint xpos, GLint ypos, - GLint width, GLint height); - -/* - * Destroy Buffer. - */ -void DMesaDestroyBuffer (DMesaBuffer b); - -/* - * Return a handle to the current buffer. - */ -DMesaBuffer DMesaGetCurrentBuffer (void); - -/* - * Swap the front and back buffers for the given Buffer. - * No action is taken if the buffer is not double buffered. - */ -void DMesaSwapBuffers (DMesaBuffer b); - -/* - * Bind Buffer to Context and make the Context the current one. - */ -GLboolean DMesaMakeCurrent (DMesaContext c, DMesaBuffer b); - - - -/* - * Move/Resize current Buffer. - */ -GLboolean DMesaMoveBuffer (GLint xpos, GLint ypos); -GLboolean DMesaResizeBuffer (GLint width, GLint height); - -/* - * Set palette index, using normalized values. - */ -void DMesaSetCI (int ndx, GLfloat red, GLfloat green, GLfloat blue); - -/* - * DMesa functions - */ -typedef void (*DMesaProc) (void); -DMesaProc DMesaGetProcAddress (const char *name); - -/* - * DMesa state retrieval. - */ -#define DMESA_GET_SCREEN_SIZE 0x0100 -#define DMESA_GET_DRIVER_CAPS 0x0200 -#define DMESA_GET_VIDEO_MODES 0x0300 -#define DMESA_GET_BUFFER_ADDR 0x0400 - -#define DMESA_DRIVER_SWDB_BIT 0x1 /* software double-buffered */ -#define DMESA_DRIVER_LLWO_BIT 0x2 /* lower-left window origin */ -int DMesaGetIntegerv (GLenum pname, GLint *params); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/foomesa.h b/nx-X11/extras/Mesa_6.4.2/include/GL/foomesa.h deleted file mode 100644 index 8517d88388..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/foomesa.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.0 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * Example Foo/Mesa interface. See src/ddsample.c for more info. - */ - - - -#ifndef FOOMESA_H -#define FOOMESA_H - - - -typedef struct foo_mesa_visual *FooMesaVisual; - -typedef struct foo_mesa_buffer *FooMesaBuffer; - -typedef struct foo_mesa_context *FooMesaContext; - - - -#ifdef BEOS -#pragma export on -#endif - - -extern FooMesaVisual FooMesaChooseVisual( /* your params */ ); - -extern void FooMesaDestroyVisual( FooMesaVisual visual ); - - -extern FooMesaBuffer FooMesaCreateBuffer( FooMesaVisual visual, - void *your_window_id ); - -extern void FooMesaDestroyBuffer( FooMesaBuffer buffer ); - - -extern FooMesaContext FooMesaCreateContext( FooMesaVisual visual, - FooMesaContext sharelist ); - -extern void FooMesaDestroyContext( FooMesaContext context ); - - -extern void FooMesaMakeCurrent( FooMesaContext context, FooMesaBuffer buffer ); - - -extern void FooMesaSwapBuffers( FooMesaBuffer buffer ); - - -/* Probably some more functions... */ - - -#ifdef BEOS -#pragma export off -#endif - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/fxmesa.h b/nx-X11/extras/Mesa_6.4.2/include/GL/fxmesa.h deleted file mode 100644 index f8e9661f9c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/fxmesa.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0 - * Copyright (C) 1995-2001 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * FXMesa - 3Dfx Glide driver for Mesa. Contributed by David Bucciarelli - * - * NOTE: This version requires Glide3 (http://sourceforge.net/projects/glide) - */ - - -#ifndef FXMESA_H -#define FXMESA_H - - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -#define FXMESA_MAJOR_VERSION 6 -#define FXMESA_MINOR_VERSION 3 - - -/* - * Values for attribList parameter to fxMesaCreateContext(): - */ -#define FXMESA_NONE 0 /* to terminate attribList */ -#define FXMESA_DOUBLEBUFFER 10 -#define FXMESA_ALPHA_SIZE 11 /* followed by an integer */ -#define FXMESA_DEPTH_SIZE 12 /* followed by an integer */ -#define FXMESA_STENCIL_SIZE 13 /* followed by an integer */ -#define FXMESA_ACCUM_SIZE 14 /* followed by an integer */ -#define FXMESA_COLORDEPTH 20 /* followed by an integer */ -#define FXMESA_SHARE_CONTEXT 990099 /* keep in sync with xmesa1.c! */ - - - -typedef struct tfxMesaContext *fxMesaContext; - - -#if defined (__BEOS__) -#pragma export on -#endif - - -GLAPI fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win, GrScreenResolution_t, - GrScreenRefresh_t, - const GLint attribList[]); - -GLAPI fxMesaContext GLAPIENTRY fxMesaCreateBestContext(GLuint win, - GLint width, GLint height, - const GLint attribList[]); -GLAPI void GLAPIENTRY fxMesaDestroyContext(fxMesaContext ctx); - -GLAPI GLint GLAPIENTRY fxMesaSelectCurrentBoard(int n); - -GLAPI void GLAPIENTRY fxMesaMakeCurrent(fxMesaContext ctx); - -GLAPI fxMesaContext GLAPIENTRY fxMesaGetCurrentContext(void); - -GLAPI void GLAPIENTRY fxMesaSwapBuffers(void); - -GLAPI void GLAPIENTRY fxMesaSetNearFar(GLfloat nearVal, GLfloat farVal); - -GLAPI void GLAPIENTRY fxMesaUpdateScreenSize(fxMesaContext ctx); - -GLAPI void GLAPIENTRY fxCloseHardware(void); - -GLAPI void GLAPIENTRY fxGetScreenGeometry (GLint *w, GLint *h); - - -#if defined (__BEOS__) -#pragma export off -#endif - - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/ggimesa.h b/nx-X11/extras/Mesa_6.4.2/include/GL/ggimesa.h deleted file mode 100644 index 90e0b42222..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/ggimesa.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Mesa 3-D graphics library GGI bindings (GGIGL [giggle]) - * Version: 4.0 - * Copyright (C) 1995-2000 Brian Paul - * Copyright (C) 1998 Uwe Maurer - * Copyrigth (C) 2001 Filip Spacek - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifndef GGIMESA_H -#define GGIMESA_H - -#define GGIMESA_MAJOR_VERSION 4 -#define GGIMESA_MINOR_VERSION 0 - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include "GL/gl.h" - -typedef struct ggi_mesa_context *ggi_mesa_context_t; - -/* - * Initialize Mesa GGI extension - */ -int ggiMesaInit(void); -/* - * Clean up Mesa GGI exension - */ -int ggiMesaExit(void); - -/* - * Attach Mesa GGI extension to the visual 'vis' - */ -int ggiMesaAttach(ggi_visual_t vis); -/* - * Detach Mesa GGI extension from the visual 'vis' - */ -int ggiMesaDetach(ggi_visual_t vis); - -int ggiMesaExtendVisual(ggi_visual_t vis, GLboolean alpha_flag, - GLboolean stereo_flag, GLint depth_size, - GLint stencil_size, GLint accum_red_size, - GLint accum_green_size, GLint accum_blue_size, - GLint accum_alpha_size, GLint num_samples); - -/* - * Create a new context capable of displaying on the visual vis. - */ -ggi_mesa_context_t ggiMesaCreateContext(ggi_visual_t vis); -/* - * Destroy the context 'ctx' - */ -void ggiMesaDestroyContext(ggi_mesa_context_t ctx); - -/* - * Make context 'ctx' the current context and bind it to visual 'vis'. - * Note that the context must have been created with respect to that visual. - */ -void ggiMesaMakeCurrent(ggi_mesa_context_t ctx, ggi_visual_t vis); - -void ggiMesaSwapBuffers(void); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/gl.h b/nx-X11/extras/Mesa_6.4.2/include/GL/gl.h deleted file mode 100644 index 1ea97f3907..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/gl.h +++ /dev/null @@ -1,2261 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.3 - * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef __gl_h_ -#define __gl_h_ - -#if defined(USE_MGL_NAMESPACE) -#include "gl_mangle.h" -#endif - - -/********************************************************************** - * Begin system-specific stuff. Do not do any of this when building - * for SciTech SNAP, as this is all done before this header file is - * included. - */ -#if !defined(__SCITECH_SNAP__) - -#if defined(__BEOS__) -#include /* to get some BeOS-isms */ -#endif - -#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO)) -#define OPENSTEP -#endif - -#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) -#define __WIN32__ -#endif - -#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) -# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ -# define GLAPI __declspec(dllexport) -# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ -# define GLAPI __declspec(dllimport) -# else /* for use with static link lib build of Win32 edition only */ -# define GLAPI extern -# endif /* _STATIC_MESA support */ -# define GLAPIENTRY __stdcall -#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */ -# define GLAPI extern -# define GLAPIENTRY __stdcall -#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 -# define GLAPI __attribute__((visibility("default"))) -# define GLAPIENTRY -#endif /* WIN32 && !CYGWIN */ - -#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) -# define PRAGMA_EXPORT_SUPPORTED 1 -#endif - -/* - * WINDOWS: Include windows.h here to define APIENTRY. - * It is also useful when applications include this file by - * including only glut.h, since glut.h depends on windows.h. - * Applications needing to include windows.h with parms other - * than "WIN32_LEAN_AND_MEAN" may include windows.h before - * glut.h or gl.h. - */ -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) -#define WIN32_LEAN_AND_MEAN 1 -#include -#endif - -#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__) -#include -#endif - -#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED -#pragma import on -#endif - -#ifndef GLAPI -#define GLAPI extern -#endif - -#ifndef GLAPIENTRY -#define GLAPIENTRY -#endif - -#ifndef APIENTRY -#define APIENTRY GLAPIENTRY -#endif - -/* "P" suffix to be used for a pointer to a function */ -#ifndef APIENTRYP -#define APIENTRYP APIENTRY * -#endif - -#ifndef GLAPIENTRYP -#define GLAPIENTRYP GLAPIENTRY * -#endif - -#ifdef CENTERLINE_CLPP -#define signed -#endif - -#if defined(PRAGMA_EXPORT_SUPPORTED) -#pragma export on -#endif - -#endif /* !__SCITECH_SNAP__ */ -/* - * End system-specific stuff. - **********************************************************************/ - - - -#ifdef __cplusplus -extern "C" { -#endif - - - -#define GL_VERSION_1_1 1 -#define GL_VERSION_1_2 1 -#define GL_VERSION_1_3 1 -#define GL_ARB_imaging 1 - - -/* - * Datatypes - */ -typedef unsigned int GLenum; -typedef unsigned char GLboolean; -typedef unsigned int GLbitfield; -typedef void GLvoid; -typedef signed char GLbyte; /* 1-byte signed */ -typedef short GLshort; /* 2-byte signed */ -typedef int GLint; /* 4-byte signed */ -typedef unsigned char GLubyte; /* 1-byte unsigned */ -typedef unsigned short GLushort; /* 2-byte unsigned */ -typedef unsigned int GLuint; /* 4-byte unsigned */ -typedef int GLsizei; /* 4-byte signed */ -typedef float GLfloat; /* single precision float */ -typedef float GLclampf; /* single precision float in [0,1] */ -typedef double GLdouble; /* double precision float */ -typedef double GLclampd; /* double precision float in [0,1] */ - - - -/* - * Constants - */ - -/* Boolean values */ -#define GL_FALSE 0x0 -#define GL_TRUE 0x1 - -/* Data types */ -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_INT 0x1404 -#define GL_UNSIGNED_INT 0x1405 -#define GL_FLOAT 0x1406 -#define GL_2_BYTES 0x1407 -#define GL_3_BYTES 0x1408 -#define GL_4_BYTES 0x1409 -#define GL_DOUBLE 0x140A - -/* Primitives */ -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 -#define GL_QUADS 0x0007 -#define GL_QUAD_STRIP 0x0008 -#define GL_POLYGON 0x0009 - -/* Vertex Arrays */ -#define GL_VERTEX_ARRAY 0x8074 -#define GL_NORMAL_ARRAY 0x8075 -#define GL_COLOR_ARRAY 0x8076 -#define GL_INDEX_ARRAY 0x8077 -#define GL_TEXTURE_COORD_ARRAY 0x8078 -#define GL_EDGE_FLAG_ARRAY 0x8079 -#define GL_VERTEX_ARRAY_SIZE 0x807A -#define GL_VERTEX_ARRAY_TYPE 0x807B -#define GL_VERTEX_ARRAY_STRIDE 0x807C -#define GL_NORMAL_ARRAY_TYPE 0x807E -#define GL_NORMAL_ARRAY_STRIDE 0x807F -#define GL_COLOR_ARRAY_SIZE 0x8081 -#define GL_COLOR_ARRAY_TYPE 0x8082 -#define GL_COLOR_ARRAY_STRIDE 0x8083 -#define GL_INDEX_ARRAY_TYPE 0x8085 -#define GL_INDEX_ARRAY_STRIDE 0x8086 -#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 -#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 -#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A -#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C -#define GL_VERTEX_ARRAY_POINTER 0x808E -#define GL_NORMAL_ARRAY_POINTER 0x808F -#define GL_COLOR_ARRAY_POINTER 0x8090 -#define GL_INDEX_ARRAY_POINTER 0x8091 -#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 -#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093 -#define GL_V2F 0x2A20 -#define GL_V3F 0x2A21 -#define GL_C4UB_V2F 0x2A22 -#define GL_C4UB_V3F 0x2A23 -#define GL_C3F_V3F 0x2A24 -#define GL_N3F_V3F 0x2A25 -#define GL_C4F_N3F_V3F 0x2A26 -#define GL_T2F_V3F 0x2A27 -#define GL_T4F_V4F 0x2A28 -#define GL_T2F_C4UB_V3F 0x2A29 -#define GL_T2F_C3F_V3F 0x2A2A -#define GL_T2F_N3F_V3F 0x2A2B -#define GL_T2F_C4F_N3F_V3F 0x2A2C -#define GL_T4F_C4F_N3F_V4F 0x2A2D - -/* Matrix Mode */ -#define GL_MATRIX_MODE 0x0BA0 -#define GL_MODELVIEW 0x1700 -#define GL_PROJECTION 0x1701 -#define GL_TEXTURE 0x1702 - -/* Points */ -#define GL_POINT_SMOOTH 0x0B10 -#define GL_POINT_SIZE 0x0B11 -#define GL_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_POINT_SIZE_RANGE 0x0B12 - -/* Lines */ -#define GL_LINE_SMOOTH 0x0B20 -#define GL_LINE_STIPPLE 0x0B24 -#define GL_LINE_STIPPLE_PATTERN 0x0B25 -#define GL_LINE_STIPPLE_REPEAT 0x0B26 -#define GL_LINE_WIDTH 0x0B21 -#define GL_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_LINE_WIDTH_RANGE 0x0B22 - -/* Polygons */ -#define GL_POINT 0x1B00 -#define GL_LINE 0x1B01 -#define GL_FILL 0x1B02 -#define GL_CW 0x0900 -#define GL_CCW 0x0901 -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_POLYGON_MODE 0x0B40 -#define GL_POLYGON_SMOOTH 0x0B41 -#define GL_POLYGON_STIPPLE 0x0B42 -#define GL_EDGE_FLAG 0x0B43 -#define GL_CULL_FACE 0x0B44 -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -#define GL_POLYGON_OFFSET_POINT 0x2A01 -#define GL_POLYGON_OFFSET_LINE 0x2A02 -#define GL_POLYGON_OFFSET_FILL 0x8037 - -/* Display Lists */ -#define GL_COMPILE 0x1300 -#define GL_COMPILE_AND_EXECUTE 0x1301 -#define GL_LIST_BASE 0x0B32 -#define GL_LIST_INDEX 0x0B33 -#define GL_LIST_MODE 0x0B30 - -/* Depth buffer */ -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 -#define GL_DEPTH_TEST 0x0B71 -#define GL_DEPTH_BITS 0x0D56 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_COMPONENT 0x1902 - -/* Lighting */ -#define GL_LIGHTING 0x0B50 -#define GL_LIGHT0 0x4000 -#define GL_LIGHT1 0x4001 -#define GL_LIGHT2 0x4002 -#define GL_LIGHT3 0x4003 -#define GL_LIGHT4 0x4004 -#define GL_LIGHT5 0x4005 -#define GL_LIGHT6 0x4006 -#define GL_LIGHT7 0x4007 -#define GL_SPOT_EXPONENT 0x1205 -#define GL_SPOT_CUTOFF 0x1206 -#define GL_CONSTANT_ATTENUATION 0x1207 -#define GL_LINEAR_ATTENUATION 0x1208 -#define GL_QUADRATIC_ATTENUATION 0x1209 -#define GL_AMBIENT 0x1200 -#define GL_DIFFUSE 0x1201 -#define GL_SPECULAR 0x1202 -#define GL_SHININESS 0x1601 -#define GL_EMISSION 0x1600 -#define GL_POSITION 0x1203 -#define GL_SPOT_DIRECTION 0x1204 -#define GL_AMBIENT_AND_DIFFUSE 0x1602 -#define GL_COLOR_INDEXES 0x1603 -#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 -#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51 -#define GL_LIGHT_MODEL_AMBIENT 0x0B53 -#define GL_FRONT_AND_BACK 0x0408 -#define GL_SHADE_MODEL 0x0B54 -#define GL_FLAT 0x1D00 -#define GL_SMOOTH 0x1D01 -#define GL_COLOR_MATERIAL 0x0B57 -#define GL_COLOR_MATERIAL_FACE 0x0B55 -#define GL_COLOR_MATERIAL_PARAMETER 0x0B56 -#define GL_NORMALIZE 0x0BA1 - -/* User clipping planes */ -#define GL_CLIP_PLANE0 0x3000 -#define GL_CLIP_PLANE1 0x3001 -#define GL_CLIP_PLANE2 0x3002 -#define GL_CLIP_PLANE3 0x3003 -#define GL_CLIP_PLANE4 0x3004 -#define GL_CLIP_PLANE5 0x3005 - -/* Accumulation buffer */ -#define GL_ACCUM_RED_BITS 0x0D58 -#define GL_ACCUM_GREEN_BITS 0x0D59 -#define GL_ACCUM_BLUE_BITS 0x0D5A -#define GL_ACCUM_ALPHA_BITS 0x0D5B -#define GL_ACCUM_CLEAR_VALUE 0x0B80 -#define GL_ACCUM 0x0100 -#define GL_ADD 0x0104 -#define GL_LOAD 0x0101 -#define GL_MULT 0x0103 -#define GL_RETURN 0x0102 - -/* Alpha testing */ -#define GL_ALPHA_TEST 0x0BC0 -#define GL_ALPHA_TEST_REF 0x0BC2 -#define GL_ALPHA_TEST_FUNC 0x0BC1 - -/* Blending */ -#define GL_BLEND 0x0BE2 -#define GL_BLEND_SRC 0x0BE1 -#define GL_BLEND_DST 0x0BE0 -#define GL_ZERO 0x0 -#define GL_ONE 0x1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 - -/* Render Mode */ -#define GL_FEEDBACK 0x1C01 -#define GL_RENDER 0x1C00 -#define GL_SELECT 0x1C02 - -/* Feedback */ -#define GL_2D 0x0600 -#define GL_3D 0x0601 -#define GL_3D_COLOR 0x0602 -#define GL_3D_COLOR_TEXTURE 0x0603 -#define GL_4D_COLOR_TEXTURE 0x0604 -#define GL_POINT_TOKEN 0x0701 -#define GL_LINE_TOKEN 0x0702 -#define GL_LINE_RESET_TOKEN 0x0707 -#define GL_POLYGON_TOKEN 0x0703 -#define GL_BITMAP_TOKEN 0x0704 -#define GL_DRAW_PIXEL_TOKEN 0x0705 -#define GL_COPY_PIXEL_TOKEN 0x0706 -#define GL_PASS_THROUGH_TOKEN 0x0700 -#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0 -#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1 -#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2 - -/* Selection */ -#define GL_SELECTION_BUFFER_POINTER 0x0DF3 -#define GL_SELECTION_BUFFER_SIZE 0x0DF4 - -/* Fog */ -#define GL_FOG 0x0B60 -#define GL_FOG_MODE 0x0B65 -#define GL_FOG_DENSITY 0x0B62 -#define GL_FOG_COLOR 0x0B66 -#define GL_FOG_INDEX 0x0B61 -#define GL_FOG_START 0x0B63 -#define GL_FOG_END 0x0B64 -#define GL_LINEAR 0x2601 -#define GL_EXP 0x0800 -#define GL_EXP2 0x0801 - -/* Logic Ops */ -#define GL_LOGIC_OP 0x0BF1 -#define GL_INDEX_LOGIC_OP 0x0BF1 -#define GL_COLOR_LOGIC_OP 0x0BF2 -#define GL_LOGIC_OP_MODE 0x0BF0 -#define GL_CLEAR 0x1500 -#define GL_SET 0x150F -#define GL_COPY 0x1503 -#define GL_COPY_INVERTED 0x150C -#define GL_NOOP 0x1505 -#define GL_INVERT 0x150A -#define GL_AND 0x1501 -#define GL_NAND 0x150E -#define GL_OR 0x1507 -#define GL_NOR 0x1508 -#define GL_XOR 0x1506 -#define GL_EQUIV 0x1509 -#define GL_AND_REVERSE 0x1502 -#define GL_AND_INVERTED 0x1504 -#define GL_OR_REVERSE 0x150B -#define GL_OR_INVERTED 0x150D - -/* Stencil */ -#define GL_STENCIL_TEST 0x0B90 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_STENCIL_BITS 0x0D57 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_INDEX 0x1901 -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 - -/* Buffers, Pixel Drawing/Reading */ -#define GL_NONE 0x0 -#define GL_LEFT 0x0406 -#define GL_RIGHT 0x0407 -/*GL_FRONT 0x0404 */ -/*GL_BACK 0x0405 */ -/*GL_FRONT_AND_BACK 0x0408 */ -#define GL_FRONT_LEFT 0x0400 -#define GL_FRONT_RIGHT 0x0401 -#define GL_BACK_LEFT 0x0402 -#define GL_BACK_RIGHT 0x0403 -#define GL_AUX0 0x0409 -#define GL_AUX1 0x040A -#define GL_AUX2 0x040B -#define GL_AUX3 0x040C -#define GL_COLOR_INDEX 0x1900 -#define GL_RED 0x1903 -#define GL_GREEN 0x1904 -#define GL_BLUE 0x1905 -#define GL_ALPHA 0x1906 -#define GL_LUMINANCE 0x1909 -#define GL_LUMINANCE_ALPHA 0x190A -#define GL_ALPHA_BITS 0x0D55 -#define GL_RED_BITS 0x0D52 -#define GL_GREEN_BITS 0x0D53 -#define GL_BLUE_BITS 0x0D54 -#define GL_INDEX_BITS 0x0D51 -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_AUX_BUFFERS 0x0C00 -#define GL_READ_BUFFER 0x0C02 -#define GL_DRAW_BUFFER 0x0C01 -#define GL_DOUBLEBUFFER 0x0C32 -#define GL_STEREO 0x0C33 -#define GL_BITMAP 0x1A00 -#define GL_COLOR 0x1800 -#define GL_DEPTH 0x1801 -#define GL_STENCIL 0x1802 -#define GL_DITHER 0x0BD0 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 - -/* Implementation limits */ -#define GL_MAX_LIST_NESTING 0x0B31 -#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35 -#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 -#define GL_MAX_NAME_STACK_DEPTH 0x0D37 -#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 -#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 -#define GL_MAX_EVAL_ORDER 0x0D30 -#define GL_MAX_LIGHTS 0x0D31 -#define GL_MAX_CLIP_PLANES 0x0D32 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_PIXEL_MAP_TABLE 0x0D34 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B - -/* Gets */ -#define GL_ATTRIB_STACK_DEPTH 0x0BB0 -#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1 -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_CURRENT_INDEX 0x0B01 -#define GL_CURRENT_COLOR 0x0B00 -#define GL_CURRENT_NORMAL 0x0B02 -#define GL_CURRENT_RASTER_COLOR 0x0B04 -#define GL_CURRENT_RASTER_DISTANCE 0x0B09 -#define GL_CURRENT_RASTER_INDEX 0x0B05 -#define GL_CURRENT_RASTER_POSITION 0x0B07 -#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06 -#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08 -#define GL_CURRENT_TEXTURE_COORDS 0x0B03 -#define GL_INDEX_CLEAR_VALUE 0x0C20 -#define GL_INDEX_MODE 0x0C30 -#define GL_INDEX_WRITEMASK 0x0C21 -#define GL_MODELVIEW_MATRIX 0x0BA6 -#define GL_MODELVIEW_STACK_DEPTH 0x0BA3 -#define GL_NAME_STACK_DEPTH 0x0D70 -#define GL_PROJECTION_MATRIX 0x0BA7 -#define GL_PROJECTION_STACK_DEPTH 0x0BA4 -#define GL_RENDER_MODE 0x0C40 -#define GL_RGBA_MODE 0x0C31 -#define GL_TEXTURE_MATRIX 0x0BA8 -#define GL_TEXTURE_STACK_DEPTH 0x0BA5 -#define GL_VIEWPORT 0x0BA2 - -/* Evaluators */ -#define GL_AUTO_NORMAL 0x0D80 -#define GL_MAP1_COLOR_4 0x0D90 -#define GL_MAP1_INDEX 0x0D91 -#define GL_MAP1_NORMAL 0x0D92 -#define GL_MAP1_TEXTURE_COORD_1 0x0D93 -#define GL_MAP1_TEXTURE_COORD_2 0x0D94 -#define GL_MAP1_TEXTURE_COORD_3 0x0D95 -#define GL_MAP1_TEXTURE_COORD_4 0x0D96 -#define GL_MAP1_VERTEX_3 0x0D97 -#define GL_MAP1_VERTEX_4 0x0D98 -#define GL_MAP2_COLOR_4 0x0DB0 -#define GL_MAP2_INDEX 0x0DB1 -#define GL_MAP2_NORMAL 0x0DB2 -#define GL_MAP2_TEXTURE_COORD_1 0x0DB3 -#define GL_MAP2_TEXTURE_COORD_2 0x0DB4 -#define GL_MAP2_TEXTURE_COORD_3 0x0DB5 -#define GL_MAP2_TEXTURE_COORD_4 0x0DB6 -#define GL_MAP2_VERTEX_3 0x0DB7 -#define GL_MAP2_VERTEX_4 0x0DB8 -#define GL_MAP1_GRID_DOMAIN 0x0DD0 -#define GL_MAP1_GRID_SEGMENTS 0x0DD1 -#define GL_MAP2_GRID_DOMAIN 0x0DD2 -#define GL_MAP2_GRID_SEGMENTS 0x0DD3 -#define GL_COEFF 0x0A00 -#define GL_DOMAIN 0x0A02 -#define GL_ORDER 0x0A01 - -/* Hints */ -#define GL_FOG_HINT 0x0C54 -#define GL_LINE_SMOOTH_HINT 0x0C52 -#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 -#define GL_POINT_SMOOTH_HINT 0x0C51 -#define GL_POLYGON_SMOOTH_HINT 0x0C53 -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 - -/* Scissor box */ -#define GL_SCISSOR_TEST 0x0C11 -#define GL_SCISSOR_BOX 0x0C10 - -/* Pixel Mode / Transfer */ -#define GL_MAP_COLOR 0x0D10 -#define GL_MAP_STENCIL 0x0D11 -#define GL_INDEX_SHIFT 0x0D12 -#define GL_INDEX_OFFSET 0x0D13 -#define GL_RED_SCALE 0x0D14 -#define GL_RED_BIAS 0x0D15 -#define GL_GREEN_SCALE 0x0D18 -#define GL_GREEN_BIAS 0x0D19 -#define GL_BLUE_SCALE 0x0D1A -#define GL_BLUE_BIAS 0x0D1B -#define GL_ALPHA_SCALE 0x0D1C -#define GL_ALPHA_BIAS 0x0D1D -#define GL_DEPTH_SCALE 0x0D1E -#define GL_DEPTH_BIAS 0x0D1F -#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1 -#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0 -#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2 -#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3 -#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4 -#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5 -#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6 -#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7 -#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8 -#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9 -#define GL_PIXEL_MAP_S_TO_S 0x0C71 -#define GL_PIXEL_MAP_I_TO_I 0x0C70 -#define GL_PIXEL_MAP_I_TO_R 0x0C72 -#define GL_PIXEL_MAP_I_TO_G 0x0C73 -#define GL_PIXEL_MAP_I_TO_B 0x0C74 -#define GL_PIXEL_MAP_I_TO_A 0x0C75 -#define GL_PIXEL_MAP_R_TO_R 0x0C76 -#define GL_PIXEL_MAP_G_TO_G 0x0C77 -#define GL_PIXEL_MAP_B_TO_B 0x0C78 -#define GL_PIXEL_MAP_A_TO_A 0x0C79 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_PACK_LSB_FIRST 0x0D01 -#define GL_PACK_ROW_LENGTH 0x0D02 -#define GL_PACK_SKIP_PIXELS 0x0D04 -#define GL_PACK_SKIP_ROWS 0x0D03 -#define GL_PACK_SWAP_BYTES 0x0D00 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_UNPACK_LSB_FIRST 0x0CF1 -#define GL_UNPACK_ROW_LENGTH 0x0CF2 -#define GL_UNPACK_SKIP_PIXELS 0x0CF4 -#define GL_UNPACK_SKIP_ROWS 0x0CF3 -#define GL_UNPACK_SWAP_BYTES 0x0CF0 -#define GL_ZOOM_X 0x0D16 -#define GL_ZOOM_Y 0x0D17 - -/* Texture mapping */ -#define GL_TEXTURE_ENV 0x2300 -#define GL_TEXTURE_ENV_MODE 0x2200 -#define GL_TEXTURE_1D 0x0DE0 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_ENV_COLOR 0x2201 -#define GL_TEXTURE_GEN_S 0x0C60 -#define GL_TEXTURE_GEN_T 0x0C61 -#define GL_TEXTURE_GEN_MODE 0x2500 -#define GL_TEXTURE_BORDER_COLOR 0x1004 -#define GL_TEXTURE_WIDTH 0x1000 -#define GL_TEXTURE_HEIGHT 0x1001 -#define GL_TEXTURE_BORDER 0x1005 -#define GL_TEXTURE_COMPONENTS 0x1003 -#define GL_TEXTURE_RED_SIZE 0x805C -#define GL_TEXTURE_GREEN_SIZE 0x805D -#define GL_TEXTURE_BLUE_SIZE 0x805E -#define GL_TEXTURE_ALPHA_SIZE 0x805F -#define GL_TEXTURE_LUMINANCE_SIZE 0x8060 -#define GL_TEXTURE_INTENSITY_SIZE 0x8061 -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 -#define GL_OBJECT_LINEAR 0x2401 -#define GL_OBJECT_PLANE 0x2501 -#define GL_EYE_LINEAR 0x2400 -#define GL_EYE_PLANE 0x2502 -#define GL_SPHERE_MAP 0x2402 -#define GL_DECAL 0x2101 -#define GL_MODULATE 0x2100 -#define GL_NEAREST 0x2600 -#define GL_REPEAT 0x2901 -#define GL_CLAMP 0x2900 -#define GL_S 0x2000 -#define GL_T 0x2001 -#define GL_R 0x2002 -#define GL_Q 0x2003 -#define GL_TEXTURE_GEN_R 0x0C62 -#define GL_TEXTURE_GEN_Q 0x0C63 - -/* Utility */ -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 - -/* Errors */ -#define GL_NO_ERROR 0x0 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_OPERATION 0x0502 -#define GL_STACK_OVERFLOW 0x0503 -#define GL_STACK_UNDERFLOW 0x0504 -#define GL_OUT_OF_MEMORY 0x0505 - -/* glPush/PopAttrib bits */ -#define GL_CURRENT_BIT 0x00000001 -#define GL_POINT_BIT 0x00000002 -#define GL_LINE_BIT 0x00000004 -#define GL_POLYGON_BIT 0x00000008 -#define GL_POLYGON_STIPPLE_BIT 0x00000010 -#define GL_PIXEL_MODE_BIT 0x00000020 -#define GL_LIGHTING_BIT 0x00000040 -#define GL_FOG_BIT 0x00000080 -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_ACCUM_BUFFER_BIT 0x00000200 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_VIEWPORT_BIT 0x00000800 -#define GL_TRANSFORM_BIT 0x00001000 -#define GL_ENABLE_BIT 0x00002000 -#define GL_COLOR_BUFFER_BIT 0x00004000 -#define GL_HINT_BIT 0x00008000 -#define GL_EVAL_BIT 0x00010000 -#define GL_LIST_BIT 0x00020000 -#define GL_TEXTURE_BIT 0x00040000 -#define GL_SCISSOR_BIT 0x00080000 -#define GL_ALL_ATTRIB_BITS 0x000FFFFF - - -/* OpenGL 1.1 */ -#define GL_PROXY_TEXTURE_1D 0x8063 -#define GL_PROXY_TEXTURE_2D 0x8064 -#define GL_TEXTURE_PRIORITY 0x8066 -#define GL_TEXTURE_RESIDENT 0x8067 -#define GL_TEXTURE_BINDING_1D 0x8068 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 -#define GL_ALPHA4 0x803B -#define GL_ALPHA8 0x803C -#define GL_ALPHA12 0x803D -#define GL_ALPHA16 0x803E -#define GL_LUMINANCE4 0x803F -#define GL_LUMINANCE8 0x8040 -#define GL_LUMINANCE12 0x8041 -#define GL_LUMINANCE16 0x8042 -#define GL_LUMINANCE4_ALPHA4 0x8043 -#define GL_LUMINANCE6_ALPHA2 0x8044 -#define GL_LUMINANCE8_ALPHA8 0x8045 -#define GL_LUMINANCE12_ALPHA4 0x8046 -#define GL_LUMINANCE12_ALPHA12 0x8047 -#define GL_LUMINANCE16_ALPHA16 0x8048 -#define GL_INTENSITY 0x8049 -#define GL_INTENSITY4 0x804A -#define GL_INTENSITY8 0x804B -#define GL_INTENSITY12 0x804C -#define GL_INTENSITY16 0x804D -#define GL_R3_G3_B2 0x2A10 -#define GL_RGB4 0x804F -#define GL_RGB5 0x8050 -#define GL_RGB8 0x8051 -#define GL_RGB10 0x8052 -#define GL_RGB12 0x8053 -#define GL_RGB16 0x8054 -#define GL_RGBA2 0x8055 -#define GL_RGBA4 0x8056 -#define GL_RGB5_A1 0x8057 -#define GL_RGBA8 0x8058 -#define GL_RGB10_A2 0x8059 -#define GL_RGBA12 0x805A -#define GL_RGBA16 0x805B -#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001 -#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002 -#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF -#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF - - - -/* - * Miscellaneous - */ - -GLAPI void GLAPIENTRY glClearIndex( GLfloat c ); - -GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); - -GLAPI void GLAPIENTRY glClear( GLbitfield mask ); - -GLAPI void GLAPIENTRY glIndexMask( GLuint mask ); - -GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ); - -GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref ); - -GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor ); - -GLAPI void GLAPIENTRY glLogicOp( GLenum opcode ); - -GLAPI void GLAPIENTRY glCullFace( GLenum mode ); - -GLAPI void GLAPIENTRY glFrontFace( GLenum mode ); - -GLAPI void GLAPIENTRY glPointSize( GLfloat size ); - -GLAPI void GLAPIENTRY glLineWidth( GLfloat width ); - -GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern ); - -GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode ); - -GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units ); - -GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask ); - -GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask ); - -GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag ); - -GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag ); - -GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height); - -GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation ); - -GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation ); - -GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode ); - -GLAPI void GLAPIENTRY glReadBuffer( GLenum mode ); - -GLAPI void GLAPIENTRY glEnable( GLenum cap ); - -GLAPI void GLAPIENTRY glDisable( GLenum cap ); - -GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap ); - - -GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */ - -GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */ - - -GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params ); - -GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params ); - -GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params ); - -GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params ); - - -GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask ); - -GLAPI void GLAPIENTRY glPopAttrib( void ); - - -GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */ - -GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */ - - -GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode ); - -GLAPI GLenum GLAPIENTRY glGetError( void ); - -GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name ); - -GLAPI void GLAPIENTRY glFinish( void ); - -GLAPI void GLAPIENTRY glFlush( void ); - -GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode ); - - -/* - * Depth Buffer - */ - -GLAPI void GLAPIENTRY glClearDepth( GLclampd depth ); - -GLAPI void GLAPIENTRY glDepthFunc( GLenum func ); - -GLAPI void GLAPIENTRY glDepthMask( GLboolean flag ); - -GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val ); - - -/* - * Accumulation Buffer - */ - -GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); - -GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value ); - - -/* - * Transformation - */ - -GLAPI void GLAPIENTRY glMatrixMode( GLenum mode ); - -GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right, - GLdouble bottom, GLdouble top, - GLdouble near_val, GLdouble far_val ); - -GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right, - GLdouble bottom, GLdouble top, - GLdouble near_val, GLdouble far_val ); - -GLAPI void GLAPIENTRY glViewport( GLint x, GLint y, - GLsizei width, GLsizei height ); - -GLAPI void GLAPIENTRY glPushMatrix( void ); - -GLAPI void GLAPIENTRY glPopMatrix( void ); - -GLAPI void GLAPIENTRY glLoadIdentity( void ); - -GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m ); -GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m ); - -GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m ); -GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m ); - -GLAPI void GLAPIENTRY glRotated( GLdouble angle, - GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glRotatef( GLfloat angle, - GLfloat x, GLfloat y, GLfloat z ); - -GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z ); - -GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z ); - - -/* - * Display Lists - */ - -GLAPI GLboolean GLAPIENTRY glIsList( GLuint list ); - -GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range ); - -GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range ); - -GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode ); - -GLAPI void GLAPIENTRY glEndList( void ); - -GLAPI void GLAPIENTRY glCallList( GLuint list ); - -GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type, - const GLvoid *lists ); - -GLAPI void GLAPIENTRY glListBase( GLuint base ); - - -/* - * Drawing Functions - */ - -GLAPI void GLAPIENTRY glBegin( GLenum mode ); - -GLAPI void GLAPIENTRY glEnd( void ); - - -GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y ); -GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y ); -GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y ); -GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y ); - -GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z ); -GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z ); -GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z ); - -GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); -GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); -GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w ); -GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w ); - -GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glVertex2iv( const GLint *v ); -GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glVertex3iv( const GLint *v ); -GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glVertex4iv( const GLint *v ); -GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v ); - - -GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz ); -GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz ); -GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz ); -GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz ); -GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz ); - -GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v ); -GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glNormal3iv( const GLint *v ); -GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v ); - - -GLAPI void GLAPIENTRY glIndexd( GLdouble c ); -GLAPI void GLAPIENTRY glIndexf( GLfloat c ); -GLAPI void GLAPIENTRY glIndexi( GLint c ); -GLAPI void GLAPIENTRY glIndexs( GLshort c ); -GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */ - -GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c ); -GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c ); -GLAPI void GLAPIENTRY glIndexiv( const GLint *c ); -GLAPI void GLAPIENTRY glIndexsv( const GLshort *c ); -GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */ - -GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue ); -GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue ); -GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue ); -GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue ); -GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue ); -GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue ); -GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue ); -GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue ); - -GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green, - GLbyte blue, GLbyte alpha ); -GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green, - GLdouble blue, GLdouble alpha ); -GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green, - GLfloat blue, GLfloat alpha ); -GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green, - GLint blue, GLint alpha ); -GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green, - GLshort blue, GLshort alpha ); -GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green, - GLubyte blue, GLubyte alpha ); -GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green, - GLuint blue, GLuint alpha ); -GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green, - GLushort blue, GLushort alpha ); - - -GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v ); -GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glColor3iv( const GLint *v ); -GLAPI void GLAPIENTRY glColor3sv( const GLshort *v ); -GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v ); -GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v ); -GLAPI void GLAPIENTRY glColor3usv( const GLushort *v ); - -GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v ); -GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glColor4iv( const GLint *v ); -GLAPI void GLAPIENTRY glColor4sv( const GLshort *v ); -GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v ); -GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v ); -GLAPI void GLAPIENTRY glColor4usv( const GLushort *v ); - - -GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s ); -GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s ); -GLAPI void GLAPIENTRY glTexCoord1i( GLint s ); -GLAPI void GLAPIENTRY glTexCoord1s( GLshort s ); - -GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t ); -GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t ); -GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t ); -GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t ); - -GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r ); -GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r ); -GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r ); -GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r ); - -GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q ); -GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q ); -GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q ); -GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q ); - -GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v ); -GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v ); -GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v ); -GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v ); -GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v ); - - -GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y ); -GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y ); -GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y ); -GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y ); - -GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z ); -GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z ); -GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z ); - -GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); -GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); -GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w ); -GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w ); - -GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v ); -GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v ); -GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v ); -GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v ); - - -GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 ); -GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ); -GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 ); -GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 ); - - -GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 ); -GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 ); -GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 ); -GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 ); - - -/* - * Vertex Arrays (1.1) - */ - -GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride, - const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride, - const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params ); - -GLAPI void GLAPIENTRY glArrayElement( GLint i ); - -GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count ); - -GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count, - GLenum type, const GLvoid *indices ); - -GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride, - const GLvoid *pointer ); - -/* - * Lighting - */ - -GLAPI void GLAPIENTRY glShadeModel( GLenum mode ); - -GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param ); -GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname, - const GLfloat *params ); -GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname, - const GLint *params ); - -GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname, - GLfloat *params ); -GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname, - GLint *params ); - -GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param ); -GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params ); -GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params ); - -GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param ); -GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params ); -GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params ); - -GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params ); -GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params ); - -GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode ); - - -/* - * Raster functions - */ - -GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor ); - -GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize, - const GLfloat *values ); -GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize, - const GLuint *values ); -GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize, - const GLushort *values ); - -GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values ); -GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values ); -GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values ); - -GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height, - GLfloat xorig, GLfloat yorig, - GLfloat xmove, GLfloat ymove, - const GLubyte *bitmap ); - -GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - GLvoid *pixels ); - -GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *pixels ); - -GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum type ); - -/* - * Stenciling - */ - -GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask ); - -GLAPI void GLAPIENTRY glStencilMask( GLuint mask ); - -GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass ); - -GLAPI void GLAPIENTRY glClearStencil( GLint s ); - - - -/* - * Texture mapping - */ - -GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param ); -GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params ); -GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params ); -GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params ); - -GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params ); -GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ); -GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params ); - - -GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params ); -GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params ); - -GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ); -GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params ); - - -GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname, - const GLfloat *params ); -GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname, - const GLint *params ); - -GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target, - GLenum pname, GLfloat *params); -GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target, - GLenum pname, GLint *params ); - -GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level, - GLenum pname, GLfloat *params ); -GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level, - GLenum pname, GLint *params ); - - -GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level, - GLint internalFormat, - GLsizei width, GLint border, - GLenum format, GLenum type, - const GLvoid *pixels ); - -GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level, - GLint internalFormat, - GLsizei width, GLsizei height, - GLint border, GLenum format, GLenum type, - const GLvoid *pixels ); - -GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level, - GLenum format, GLenum type, - GLvoid *pixels ); - - -/* 1.1 functions */ - -GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures ); - -GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures); - -GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture ); - -GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n, - const GLuint *textures, - const GLclampf *priorities ); - -GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n, - const GLuint *textures, - GLboolean *residences ); - -GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture ); - - -GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level, - GLint xoffset, - GLsizei width, GLenum format, - GLenum type, const GLvoid *pixels ); - - -GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *pixels ); - - -GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level, - GLenum internalformat, - GLint x, GLint y, - GLsizei width, GLint border ); - - -GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level, - GLenum internalformat, - GLint x, GLint y, - GLsizei width, GLsizei height, - GLint border ); - - -GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level, - GLint xoffset, GLint x, GLint y, - GLsizei width ); - - -GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint x, GLint y, - GLsizei width, GLsizei height ); - - -/* - * Evaluators - */ - -GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2, - GLint stride, - GLint order, const GLdouble *points ); -GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2, - GLint stride, - GLint order, const GLfloat *points ); - -GLAPI void GLAPIENTRY glMap2d( GLenum target, - GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, - GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, - const GLdouble *points ); -GLAPI void GLAPIENTRY glMap2f( GLenum target, - GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, - GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, - const GLfloat *points ); - -GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v ); -GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v ); -GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v ); - -GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u ); -GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u ); - -GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u ); -GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u ); - -GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v ); -GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v ); - -GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u ); -GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u ); - -GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 ); -GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 ); - -GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2, - GLint vn, GLdouble v1, GLdouble v2 ); -GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2, - GLint vn, GLfloat v1, GLfloat v2 ); - -GLAPI void GLAPIENTRY glEvalPoint1( GLint i ); - -GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j ); - -GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 ); - -GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); - - -/* - * Fog - */ - -GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param ); - -GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params ); - -GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params ); - - -/* - * Selection and Feedback - */ - -GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ); - -GLAPI void GLAPIENTRY glPassThrough( GLfloat token ); - -GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer ); - -GLAPI void GLAPIENTRY glInitNames( void ); - -GLAPI void GLAPIENTRY glLoadName( GLuint name ); - -GLAPI void GLAPIENTRY glPushName( GLuint name ); - -GLAPI void GLAPIENTRY glPopName( void ); - - - -/* - * OpenGL 1.2 - */ - -#define GL_RESCALE_NORMAL 0x803A -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_BGR 0x80E0 -#define GL_BGRA 0x80E1 -#define GL_UNSIGNED_BYTE_3_3_2 0x8032 -#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 -#define GL_UNSIGNED_INT_8_8_8_8 0x8035 -#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 -#define GL_UNSIGNED_INT_10_10_10_2 0x8036 -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 -#define GL_SINGLE_COLOR 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR 0x81FA -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 -#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 -#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_PACK_SKIP_IMAGES 0x806B -#define GL_PACK_IMAGE_HEIGHT 0x806C -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_TEXTURE_3D 0x806F -#define GL_PROXY_TEXTURE_3D 0x8070 -#define GL_TEXTURE_DEPTH 0x8071 -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_TEXTURE_BINDING_3D 0x806A - -GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start, - GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); - -GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level, - GLint internalFormat, - GLsizei width, GLsizei height, - GLsizei depth, GLint border, - GLenum format, GLenum type, - const GLvoid *pixels ); - -GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, - GLenum format, - GLenum type, const GLvoid *pixels); - -GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint zoffset, GLint x, - GLint y, GLsizei width, - GLsizei height ); - -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); - - -/* - * GL_ARB_imaging - */ - -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_COLOR_TABLE 0x80D0 -#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 -#define GL_PROXY_COLOR_TABLE 0x80D3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 -#define GL_COLOR_TABLE_SCALE 0x80D6 -#define GL_COLOR_TABLE_BIAS 0x80D7 -#define GL_COLOR_TABLE_FORMAT 0x80D8 -#define GL_COLOR_TABLE_WIDTH 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF -#define GL_CONVOLUTION_1D 0x8010 -#define GL_CONVOLUTION_2D 0x8011 -#define GL_SEPARABLE_2D 0x8012 -#define GL_CONVOLUTION_BORDER_MODE 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS 0x8015 -#define GL_REDUCE 0x8016 -#define GL_CONVOLUTION_FORMAT 0x8017 -#define GL_CONVOLUTION_WIDTH 0x8018 -#define GL_CONVOLUTION_HEIGHT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH 0x801A -#define GL_MAX_CONVOLUTION_HEIGHT 0x801B -#define GL_POST_CONVOLUTION_RED_SCALE 0x801C -#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D -#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E -#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F -#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 -#define GL_CONSTANT_BORDER 0x8151 -#define GL_REPLICATE_BORDER 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR 0x8154 -#define GL_COLOR_MATRIX 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 -#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 -#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB -#define GL_HISTOGRAM 0x8024 -#define GL_PROXY_HISTOGRAM 0x8025 -#define GL_HISTOGRAM_WIDTH 0x8026 -#define GL_HISTOGRAM_FORMAT 0x8027 -#define GL_HISTOGRAM_RED_SIZE 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE 0x802A -#define GL_HISTOGRAM_ALPHA_SIZE 0x802B -#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C -#define GL_HISTOGRAM_SINK 0x802D -#define GL_MINMAX 0x802E -#define GL_MINMAX_FORMAT 0x802F -#define GL_MINMAX_SINK 0x8030 -#define GL_TABLE_TOO_LARGE 0x8031 -#define GL_BLEND_EQUATION 0x8009 -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_FUNC_ADD 0x8006 -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_BLEND_COLOR 0x8005 - - -GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat, - GLsizei width, GLenum format, - GLenum type, const GLvoid *table ); - -GLAPI void GLAPIENTRY glColorSubTable( GLenum target, - GLsizei start, GLsizei count, - GLenum format, GLenum type, - const GLvoid *data ); - -GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname, - const GLint *params); - -GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname, - const GLfloat *params); - -GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start, - GLint x, GLint y, GLsizei width ); - -GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat, - GLint x, GLint y, GLsizei width ); - -GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format, - GLenum type, GLvoid *table ); - -GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname, - GLfloat *params ); - -GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname, - GLint *params ); - -GLAPI void GLAPIENTRY glBlendEquation( GLenum mode ); - -GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green, - GLclampf blue, GLclampf alpha ); - -GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width, - GLenum internalformat, GLboolean sink ); - -GLAPI void GLAPIENTRY glResetHistogram( GLenum target ); - -GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset, - GLenum format, GLenum type, - GLvoid *values ); - -GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname, - GLfloat *params ); - -GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname, - GLint *params ); - -GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat, - GLboolean sink ); - -GLAPI void GLAPIENTRY glResetMinmax( GLenum target ); - -GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset, - GLenum format, GLenum types, - GLvoid *values ); - -GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname, - GLfloat *params ); - -GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname, - GLint *params ); - -GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target, - GLenum internalformat, GLsizei width, GLenum format, GLenum type, - const GLvoid *image ); - -GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target, - GLenum internalformat, GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid *image ); - -GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname, - GLfloat params ); - -GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname, - const GLfloat *params ); - -GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname, - GLint params ); - -GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname, - const GLint *params ); - -GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target, - GLenum internalformat, GLint x, GLint y, GLsizei width ); - -GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target, - GLenum internalformat, GLint x, GLint y, GLsizei width, - GLsizei height); - -GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format, - GLenum type, GLvoid *image ); - -GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname, - GLfloat *params ); - -GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname, - GLint *params ); - -GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target, - GLenum internalformat, GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid *row, const GLvoid *column ); - -GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format, - GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ); - -typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); -typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); - - - -/* - * OpenGL 1.3 - */ - -/* multitexture */ -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 -#define GL_MAX_TEXTURE_UNITS 0x84E2 -/* texture_cube_map */ -#define GL_NORMAL_MAP 0x8511 -#define GL_REFLECTION_MAP 0x8512 -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -/* texture_compression */ -#define GL_COMPRESSED_ALPHA 0x84E9 -#define GL_COMPRESSED_LUMINANCE 0x84EA -#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB -#define GL_COMPRESSED_INTENSITY 0x84EC -#define GL_COMPRESSED_RGB 0x84ED -#define GL_COMPRESSED_RGBA 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 -#define GL_TEXTURE_COMPRESSED 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -/* multisample */ -#define GL_MULTISAMPLE 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE 0x809F -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_MULTISAMPLE_BIT 0x20000000 -/* transpose_matrix */ -#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 -#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 -#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 -#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 -/* texture_env_combine */ -#define GL_COMBINE 0x8570 -#define GL_COMBINE_RGB 0x8571 -#define GL_COMBINE_ALPHA 0x8572 -#define GL_SOURCE0_RGB 0x8580 -#define GL_SOURCE1_RGB 0x8581 -#define GL_SOURCE2_RGB 0x8582 -#define GL_SOURCE0_ALPHA 0x8588 -#define GL_SOURCE1_ALPHA 0x8589 -#define GL_SOURCE2_ALPHA 0x858A -#define GL_OPERAND0_RGB 0x8590 -#define GL_OPERAND1_RGB 0x8591 -#define GL_OPERAND2_RGB 0x8592 -#define GL_OPERAND0_ALPHA 0x8598 -#define GL_OPERAND1_ALPHA 0x8599 -#define GL_OPERAND2_ALPHA 0x859A -#define GL_RGB_SCALE 0x8573 -#define GL_ADD_SIGNED 0x8574 -#define GL_INTERPOLATE 0x8575 -#define GL_SUBTRACT 0x84E7 -#define GL_CONSTANT 0x8576 -#define GL_PRIMARY_COLOR 0x8577 -#define GL_PREVIOUS 0x8578 -/* texture_env_dot3 */ -#define GL_DOT3_RGB 0x86AE -#define GL_DOT3_RGBA 0x86AF -/* texture_border_clamp */ -#define GL_CLAMP_TO_BORDER 0x812D - -GLAPI void GLAPIENTRY glActiveTexture( GLenum texture ); - -GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture ); - -GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img ); - -GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s ); - -GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s ); - -GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s ); - -GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s ); - -GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t ); - -GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t ); - -GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t ); - -GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t ); - -GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r ); - -GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r ); - -GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r ); - -GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r ); - -GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ); - -GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); - -GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q ); - -GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ); - -GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v ); - - -GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] ); - -GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] ); - -GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] ); - -GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] ); - -GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert ); - -typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img); - - -/* - * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1) - */ -#ifndef GL_ARB_multitexture -#define GL_ARB_multitexture 1 - -#define GL_TEXTURE0_ARB 0x84C0 -#define GL_TEXTURE1_ARB 0x84C1 -#define GL_TEXTURE2_ARB 0x84C2 -#define GL_TEXTURE3_ARB 0x84C3 -#define GL_TEXTURE4_ARB 0x84C4 -#define GL_TEXTURE5_ARB 0x84C5 -#define GL_TEXTURE6_ARB 0x84C6 -#define GL_TEXTURE7_ARB 0x84C7 -#define GL_TEXTURE8_ARB 0x84C8 -#define GL_TEXTURE9_ARB 0x84C9 -#define GL_TEXTURE10_ARB 0x84CA -#define GL_TEXTURE11_ARB 0x84CB -#define GL_TEXTURE12_ARB 0x84CC -#define GL_TEXTURE13_ARB 0x84CD -#define GL_TEXTURE14_ARB 0x84CE -#define GL_TEXTURE15_ARB 0x84CF -#define GL_TEXTURE16_ARB 0x84D0 -#define GL_TEXTURE17_ARB 0x84D1 -#define GL_TEXTURE18_ARB 0x84D2 -#define GL_TEXTURE19_ARB 0x84D3 -#define GL_TEXTURE20_ARB 0x84D4 -#define GL_TEXTURE21_ARB 0x84D5 -#define GL_TEXTURE22_ARB 0x84D6 -#define GL_TEXTURE23_ARB 0x84D7 -#define GL_TEXTURE24_ARB 0x84D8 -#define GL_TEXTURE25_ARB 0x84D9 -#define GL_TEXTURE26_ARB 0x84DA -#define GL_TEXTURE27_ARB 0x84DB -#define GL_TEXTURE28_ARB 0x84DC -#define GL_TEXTURE29_ARB 0x84DD -#define GL_TEXTURE30_ARB 0x84DE -#define GL_TEXTURE31_ARB 0x84DF -#define GL_ACTIVE_TEXTURE_ARB 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 -#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 - -GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture); -GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture); -GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s); -GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v); -GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s); -GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v); -GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s); -GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v); -GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s); -GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v); -GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t); -GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v); -GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t); -GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v); -GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t); -GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v); -GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t); -GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v); -GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r); -GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v); -GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r); -GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v); -GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r); -GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v); -GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r); -GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v); -GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v); -GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v); -GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q); -GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v); -GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v); - -typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); - -#endif /* GL_ARB_multitexture */ - - - -/* - * Define this token if you want "old-style" header file behaviour (extensions - * defined in gl.h). Otherwise, extensions will be included from glext.h. - */ -#if defined(GL_GLEXT_LEGACY) - -/* All extensions that used to be here are now found in glext.h */ - -#else /* GL_GLEXT_LEGACY */ - -#include - -#endif /* GL_GLEXT_LEGACY */ - - - -/* - * ???. GL_MESA_trace - * XXX obsolete - */ -#ifndef GL_MESA_trace -#define GL_MESA_trace 1 - -#define GL_TRACE_ALL_BITS_MESA 0xFFFF -#define GL_TRACE_OPERATIONS_BIT_MESA 0x0001 -#define GL_TRACE_PRIMITIVES_BIT_MESA 0x0002 -#define GL_TRACE_ARRAYS_BIT_MESA 0x0004 -#define GL_TRACE_TEXTURES_BIT_MESA 0x0008 -#define GL_TRACE_PIXELS_BIT_MESA 0x0010 -#define GL_TRACE_ERRORS_BIT_MESA 0x0020 -#define GL_TRACE_MASK_MESA 0x8755 -#define GL_TRACE_NAME_MESA 0x8756 - -GLAPI void GLAPIENTRY glEnableTraceMESA( GLbitfield mask ); -GLAPI void GLAPIENTRY glDisableTraceMESA( GLbitfield mask ); -GLAPI void GLAPIENTRY glNewTraceMESA( GLbitfield mask, const GLubyte * traceName ); -GLAPI void GLAPIENTRY glEndTraceMESA( void ); -GLAPI void GLAPIENTRY glTraceAssertAttribMESA( GLbitfield attribMask ); -GLAPI void GLAPIENTRY glTraceCommentMESA( const GLubyte * comment ); -GLAPI void GLAPIENTRY glTraceTextureMESA( GLuint name, const GLubyte* comment ); -GLAPI void GLAPIENTRY glTraceListMESA( GLuint name, const GLubyte* comment ); -GLAPI void GLAPIENTRY glTracePointerMESA( GLvoid* pointer, const GLubyte* comment ); -GLAPI void GLAPIENTRY glTracePointerRangeMESA( const GLvoid* first, const GLvoid* last, const GLubyte* comment ); - -#endif /* GL_MESA_trace */ - - -/* - * ???. GL_MESA_packed_depth_stencil - * XXX obsolete - */ -#ifndef GL_MESA_packed_depth_stencil -#define GL_MESA_packed_depth_stencil 1 - -#define GL_DEPTH_STENCIL_MESA 0x8750 -#define GL_UNSIGNED_INT_24_8_MESA 0x8751 -#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752 -#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753 -#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754 - -#endif /* GL_MESA_packed_depth_stencil */ - - -#ifndef GL_MESA_program_debug -#define GL_MESA_program_debug 1 - -#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0 -#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1 -#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2 -#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3 -#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4 -#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5 -#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6 -#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7 - -typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data); - -GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data); - -GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v); - -#endif /* GL_MESA_program_debug */ - - -#ifndef GL_ATI_blend_equation_separate -#define GL_ATI_blend_equation_separate 1 - -#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D - -GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA ); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA); - -#endif /* GL_ATI_blend_equation_separate */ - - -/** - ** NOTE!!!!! If you add new functions to this file, or update - ** glext.h be sure to regenerate the gl_mangle.h file. See comments - ** in that file for details. - **/ - - - -/********************************************************************** - * Begin system-specific stuff - */ -#if defined(PRAGMA_EXPORT_SUPPORTED) -#pragma export off -#endif - -#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED -#pragma import off -#endif -/* - * End system-specific stuff - **********************************************************************/ - - -#ifdef __cplusplus -} -#endif - -#endif /* __gl_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/gl_mangle.h b/nx-X11/extras/Mesa_6.4.2/include/GL/gl_mangle.h deleted file mode 100644 index c1b443c6b0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/gl_mangle.h +++ /dev/null @@ -1,1472 +0,0 @@ -#if 0 -#define GL_MANGLE_C1 "DO NOT EDIT!!! - TO REGENERATE from gl.h, EXECUTE THIS FILE IN SHELL (/bin/sh) and save the output" -#define GL_MANGLE_C2 "This file is used to create GL function protypes and aliases for the function names" - files="gl.h glext.h" -#define GL_MANGLE_C3 "get regeneration header - copy everything in this file above the 'REGENERATE_TO_END' line" - awk '!done; /^\/\*REGENERATE_TO_END/ {done=1}' $0 - echo "" -#define GL_MANGLE_C4 get aliases - grep '^GLAPI' $files | sed -e 's/.*ENTRY gl\([^( ]*\).*$/#define gl\1 MANGLE(\1)/' | sort | uniq - echo "" - echo "#endif /* GL_MANGLE_H */" - exit -#endif /* REGENERATION */ - -/* - * If you compile Mesa with USE_MGL_NAMESPACE defined then you can link - * your application both with OpenGL and Mesa. The Mesa functions will - * be redefined so they are prefixed with "mgl" instead of "gl". - * Mgl contributed by Randy Frank (rfrank@rsinc.com) - * Regneration code contributed by Ray Tice (rayt@ma.ultra.net) - */ - -#ifndef GL_MANGLE_H -#define GL_MANGLE_H - -#ifndef MANGLE -#define MANGLE(x) mgl##x -#endif /*MANGLE*/ - -/* Internal symbols which may collide with other OpenGL implementations. */ -#define __glCoreCreateContext __mglCoreCreateContext -#define __glCoreNopDispatch __mglCoreNopDispatch - -/*REGENERATE_TO_END-----------ALL LINES BELOW HERE GET REPLACED ON REGENERATION */ - -#define glAccum MANGLE(Accum) -#define glActiveStencilFaceEXT MANGLE(ActiveStencilFaceEXT) -#define glActiveTextureARB MANGLE(ActiveTextureARB) -#define glActiveTexture MANGLE(ActiveTexture) -#define glAlphaFragmentOp1ATI MANGLE(AlphaFragmentOp1ATI) -#define glAlphaFragmentOp2ATI MANGLE(AlphaFragmentOp2ATI) -#define glAlphaFragmentOp3ATI MANGLE(AlphaFragmentOp3ATI) -#define glAlphaFunc MANGLE(AlphaFunc) -#define glApplyTextureEXT MANGLE(ApplyTextureEXT) -#define glAreProgramsResidentNV MANGLE(AreProgramsResidentNV) -#define glAreTexturesResidentEXT MANGLE(AreTexturesResidentEXT) -#define glAreTexturesResident MANGLE(AreTexturesResident) -#define glArrayElementEXT MANGLE(ArrayElementEXT) -#define glArrayElement MANGLE(ArrayElement) -#define glArrayObjectATI MANGLE(ArrayObjectATI) -#define glAsyncMarkerSGIX MANGLE(AsyncMarkerSGIX) -#define glAttachObjectARB MANGLE(AttachObjectARB) -#define glAttachShader MANGLE(AttachShader) -#define glBeginFragmentShaderATI MANGLE(BeginFragmentShaderATI) -#define glBegin MANGLE(Begin) -#define glBeginOcclusionQueryNV MANGLE(BeginOcclusionQueryNV) -#define glBeginQueryARB MANGLE(BeginQueryARB) -#define glBeginQuery MANGLE(BeginQuery) -#define glBeginVertexShaderEXT MANGLE(BeginVertexShaderEXT) -#define glBindAttribLocationARB MANGLE(BindAttribLocationARB) -#define glBindAttribLocation MANGLE(BindAttribLocation) -#define glBindBufferARB MANGLE(BindBufferARB) -#define glBindBuffer MANGLE(BindBuffer) -#define glBindFragmentShaderATI MANGLE(BindFragmentShaderATI) -#define glBindFramebufferEXT MANGLE(BindFramebufferEXT) -#define glBindLightParameterEXT MANGLE(BindLightParameterEXT) -#define glBindMaterialParameterEXT MANGLE(BindMaterialParameterEXT) -#define glBindParameterEXT MANGLE(BindParameterEXT) -#define glBindProgramARB MANGLE(BindProgramARB) -#define glBindProgramNV MANGLE(BindProgramNV) -#define glBindRenderbufferEXT MANGLE(BindRenderbufferEXT) -#define glBindTexGenParameterEXT MANGLE(BindTexGenParameterEXT) -#define glBindTextureEXT MANGLE(BindTextureEXT) -#define glBindTexture MANGLE(BindTexture) -#define glBindTextureUnitParameterEXT MANGLE(BindTextureUnitParameterEXT) -#define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE) -#define glBindVertexShaderEXT MANGLE(BindVertexShaderEXT) -#define glBinormal3bEXT MANGLE(Binormal3bEXT) -#define glBinormal3bvEXT MANGLE(Binormal3bvEXT) -#define glBinormal3dEXT MANGLE(Binormal3dEXT) -#define glBinormal3dvEXT MANGLE(Binormal3dvEXT) -#define glBinormal3fEXT MANGLE(Binormal3fEXT) -#define glBinormal3fvEXT MANGLE(Binormal3fvEXT) -#define glBinormal3iEXT MANGLE(Binormal3iEXT) -#define glBinormal3ivEXT MANGLE(Binormal3ivEXT) -#define glBinormal3sEXT MANGLE(Binormal3sEXT) -#define glBinormal3svEXT MANGLE(Binormal3svEXT) -#define glBinormalPointerEXT MANGLE(BinormalPointerEXT) -#define glBitmap MANGLE(Bitmap) -#define glBlendColorEXT MANGLE(BlendColorEXT) -#define glBlendColor MANGLE(BlendColor) -#define glBlendEquationEXT MANGLE(BlendEquationEXT) -#define glBlendEquation MANGLE(BlendEquation) -#define glBlendEquationSeparateATI MANGLE(BlendEquationSeparateATI) -#define glBlendEquationSeparateEXT MANGLE(BlendEquationSeparateEXT) -#define glBlendEquationSeparate MANGLE(BlendEquationSeparate) -#define glBlendFunc MANGLE(BlendFunc) -#define glBlendFuncSeparateEXT MANGLE(BlendFuncSeparateEXT) -#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR) -#define glBlendFuncSeparate MANGLE(BlendFuncSeparate) -#define glBufferDataARB MANGLE(BufferDataARB) -#define glBufferData MANGLE(BufferData) -#define glBufferSubDataARB MANGLE(BufferSubDataARB) -#define glBufferSubData MANGLE(BufferSubData) -#define glCallList MANGLE(CallList) -#define glCallLists MANGLE(CallLists) -#define glCheckFramebufferStatusEXT MANGLE(CheckFramebufferStatusEXT) -#define glClampColorARB MANGLE(ClampColorARB) -#define glClearAccum MANGLE(ClearAccum) -#define glClearColor MANGLE(ClearColor) -#define glClearDepth MANGLE(ClearDepth) -#define glClearIndex MANGLE(ClearIndex) -#define glClear MANGLE(Clear) -#define glClearStencil MANGLE(ClearStencil) -#define glClientActiveTextureARB MANGLE(ClientActiveTextureARB) -#define glClientActiveTexture MANGLE(ClientActiveTexture) -#define glClientActiveVertexStreamATI MANGLE(ClientActiveVertexStreamATI) -#define glClipPlane MANGLE(ClipPlane) -#define glColor3b MANGLE(Color3b) -#define glColor3bv MANGLE(Color3bv) -#define glColor3d MANGLE(Color3d) -#define glColor3dv MANGLE(Color3dv) -#define glColor3f MANGLE(Color3f) -#define glColor3fVertex3fSUN MANGLE(Color3fVertex3fSUN) -#define glColor3fVertex3fvSUN MANGLE(Color3fVertex3fvSUN) -#define glColor3fv MANGLE(Color3fv) -#define glColor3hNV MANGLE(Color3hNV) -#define glColor3hvNV MANGLE(Color3hvNV) -#define glColor3i MANGLE(Color3i) -#define glColor3iv MANGLE(Color3iv) -#define glColor3s MANGLE(Color3s) -#define glColor3sv MANGLE(Color3sv) -#define glColor3ub MANGLE(Color3ub) -#define glColor3ubv MANGLE(Color3ubv) -#define glColor3ui MANGLE(Color3ui) -#define glColor3uiv MANGLE(Color3uiv) -#define glColor3us MANGLE(Color3us) -#define glColor3usv MANGLE(Color3usv) -#define glColor4b MANGLE(Color4b) -#define glColor4bv MANGLE(Color4bv) -#define glColor4d MANGLE(Color4d) -#define glColor4dv MANGLE(Color4dv) -#define glColor4f MANGLE(Color4f) -#define glColor4fNormal3fVertex3fSUN MANGLE(Color4fNormal3fVertex3fSUN) -#define glColor4fNormal3fVertex3fvSUN MANGLE(Color4fNormal3fVertex3fvSUN) -#define glColor4fv MANGLE(Color4fv) -#define glColor4hNV MANGLE(Color4hNV) -#define glColor4hvNV MANGLE(Color4hvNV) -#define glColor4i MANGLE(Color4i) -#define glColor4iv MANGLE(Color4iv) -#define glColor4s MANGLE(Color4s) -#define glColor4sv MANGLE(Color4sv) -#define glColor4ub MANGLE(Color4ub) -#define glColor4ubVertex2fSUN MANGLE(Color4ubVertex2fSUN) -#define glColor4ubVertex2fvSUN MANGLE(Color4ubVertex2fvSUN) -#define glColor4ubVertex3fSUN MANGLE(Color4ubVertex3fSUN) -#define glColor4ubVertex3fvSUN MANGLE(Color4ubVertex3fvSUN) -#define glColor4ubv MANGLE(Color4ubv) -#define glColor4ui MANGLE(Color4ui) -#define glColor4uiv MANGLE(Color4uiv) -#define glColor4us MANGLE(Color4us) -#define glColor4usv MANGLE(Color4usv) -#define glColorFragmentOp1ATI MANGLE(ColorFragmentOp1ATI) -#define glColorFragmentOp2ATI MANGLE(ColorFragmentOp2ATI) -#define glColorFragmentOp3ATI MANGLE(ColorFragmentOp3ATI) -#define glColorMask MANGLE(ColorMask) -#define glColorMaterial MANGLE(ColorMaterial) -#define glColorPointerEXT MANGLE(ColorPointerEXT) -#define glColorPointerListIBM MANGLE(ColorPointerListIBM) -#define glColorPointer MANGLE(ColorPointer) -#define glColorPointervINTEL MANGLE(ColorPointervINTEL) -#define glColorSubTableEXT MANGLE(ColorSubTableEXT) -#define glColorSubTable MANGLE(ColorSubTable) -#define glColorTableEXT MANGLE(ColorTableEXT) -#define glColorTable MANGLE(ColorTable) -#define glColorTableParameterfv MANGLE(ColorTableParameterfv) -#define glColorTableParameterfvSGI MANGLE(ColorTableParameterfvSGI) -#define glColorTableParameteriv MANGLE(ColorTableParameteriv) -#define glColorTableParameterivSGI MANGLE(ColorTableParameterivSGI) -#define glColorTableSGI MANGLE(ColorTableSGI) -#define glCombinerInputNV MANGLE(CombinerInputNV) -#define glCombinerOutputNV MANGLE(CombinerOutputNV) -#define glCombinerParameterfNV MANGLE(CombinerParameterfNV) -#define glCombinerParameterfvNV MANGLE(CombinerParameterfvNV) -#define glCombinerParameteriNV MANGLE(CombinerParameteriNV) -#define glCombinerParameterivNV MANGLE(CombinerParameterivNV) -#define glCombinerStageParameterfvNV MANGLE(CombinerStageParameterfvNV) -#define glCompileShaderARB MANGLE(CompileShaderARB) -#define glCompileShader MANGLE(CompileShader) -#define glCompressedTexImage1DARB MANGLE(CompressedTexImage1DARB) -#define glCompressedTexImage1D MANGLE(CompressedTexImage1D) -#define glCompressedTexImage2DARB MANGLE(CompressedTexImage2DARB) -#define glCompressedTexImage2D MANGLE(CompressedTexImage2D) -#define glCompressedTexImage3DARB MANGLE(CompressedTexImage3DARB) -#define glCompressedTexImage3D MANGLE(CompressedTexImage3D) -#define glCompressedTexSubImage1DARB MANGLE(CompressedTexSubImage1DARB) -#define glCompressedTexSubImage1D MANGLE(CompressedTexSubImage1D) -#define glCompressedTexSubImage2DARB MANGLE(CompressedTexSubImage2DARB) -#define glCompressedTexSubImage2D MANGLE(CompressedTexSubImage2D) -#define glCompressedTexSubImage3DARB MANGLE(CompressedTexSubImage3DARB) -#define glCompressedTexSubImage3D MANGLE(CompressedTexSubImage3D) -#define glConvolutionFilter1DEXT MANGLE(ConvolutionFilter1DEXT) -#define glConvolutionFilter1D MANGLE(ConvolutionFilter1D) -#define glConvolutionFilter2DEXT MANGLE(ConvolutionFilter2DEXT) -#define glConvolutionFilter2D MANGLE(ConvolutionFilter2D) -#define glConvolutionParameterfEXT MANGLE(ConvolutionParameterfEXT) -#define glConvolutionParameterf MANGLE(ConvolutionParameterf) -#define glConvolutionParameterfvEXT MANGLE(ConvolutionParameterfvEXT) -#define glConvolutionParameterfv MANGLE(ConvolutionParameterfv) -#define glConvolutionParameteriEXT MANGLE(ConvolutionParameteriEXT) -#define glConvolutionParameteri MANGLE(ConvolutionParameteri) -#define glConvolutionParameterivEXT MANGLE(ConvolutionParameterivEXT) -#define glConvolutionParameteriv MANGLE(ConvolutionParameteriv) -#define glCopyColorSubTableEXT MANGLE(CopyColorSubTableEXT) -#define glCopyColorSubTable MANGLE(CopyColorSubTable) -#define glCopyColorTable MANGLE(CopyColorTable) -#define glCopyColorTableSGI MANGLE(CopyColorTableSGI) -#define glCopyConvolutionFilter1DEXT MANGLE(CopyConvolutionFilter1DEXT) -#define glCopyConvolutionFilter1D MANGLE(CopyConvolutionFilter1D) -#define glCopyConvolutionFilter2DEXT MANGLE(CopyConvolutionFilter2DEXT) -#define glCopyConvolutionFilter2D MANGLE(CopyConvolutionFilter2D) -#define glCopyPixels MANGLE(CopyPixels) -#define glCopyTexImage1DEXT MANGLE(CopyTexImage1DEXT) -#define glCopyTexImage1D MANGLE(CopyTexImage1D) -#define glCopyTexImage2DEXT MANGLE(CopyTexImage2DEXT) -#define glCopyTexImage2D MANGLE(CopyTexImage2D) -#define glCopyTexSubImage1DEXT MANGLE(CopyTexSubImage1DEXT) -#define glCopyTexSubImage1D MANGLE(CopyTexSubImage1D) -#define glCopyTexSubImage2DEXT MANGLE(CopyTexSubImage2DEXT) -#define glCopyTexSubImage2D MANGLE(CopyTexSubImage2D) -#define glCopyTexSubImage3DEXT MANGLE(CopyTexSubImage3DEXT) -#define glCopyTexSubImage3D MANGLE(CopyTexSubImage3D) -#define glCreateProgram MANGLE(CreateProgram) -#define glCreateProgramObjectARB MANGLE(CreateProgramObjectARB) -#define glCreateShader MANGLE(CreateShader) -#define glCreateShaderObjectARB MANGLE(CreateShaderObjectARB) -#define glCullFace MANGLE(CullFace) -#define glCullParameterdvEXT MANGLE(CullParameterdvEXT) -#define glCullParameterfvEXT MANGLE(CullParameterfvEXT) -#define glCurrentPaletteMatrixARB MANGLE(CurrentPaletteMatrixARB) -#define glDeformationMap3dSGIX MANGLE(DeformationMap3dSGIX) -#define glDeformationMap3fSGIX MANGLE(DeformationMap3fSGIX) -#define glDeformSGIX MANGLE(DeformSGIX) -#define glDeleteAsyncMarkersSGIX MANGLE(DeleteAsyncMarkersSGIX) -#define glDeleteBuffersARB MANGLE(DeleteBuffersARB) -#define glDeleteBuffers MANGLE(DeleteBuffers) -#define glDeleteFencesAPPLE MANGLE(DeleteFencesAPPLE) -#define glDeleteFencesNV MANGLE(DeleteFencesNV) -#define glDeleteFragmentShaderATI MANGLE(DeleteFragmentShaderATI) -#define glDeleteFramebuffersEXT MANGLE(DeleteFramebuffersEXT) -#define glDeleteLists MANGLE(DeleteLists) -#define glDeleteObjectARB MANGLE(DeleteObjectARB) -#define glDeleteOcclusionQueriesNV MANGLE(DeleteOcclusionQueriesNV) -#define glDeleteProgram MANGLE(DeleteProgram) -#define glDeleteProgramsARB MANGLE(DeleteProgramsARB) -#define glDeleteProgramsNV MANGLE(DeleteProgramsNV) -#define glDeleteQueriesARB MANGLE(DeleteQueriesARB) -#define glDeleteQueries MANGLE(DeleteQueries) -#define glDeleteRenderbuffersEXT MANGLE(DeleteRenderbuffersEXT) -#define glDeleteShader MANGLE(DeleteShader) -#define glDeleteTexturesEXT MANGLE(DeleteTexturesEXT) -#define glDeleteTextures MANGLE(DeleteTextures) -#define glDeleteVertexArraysAPPLE MANGLE(DeleteVertexArraysAPPLE) -#define glDeleteVertexShaderEXT MANGLE(DeleteVertexShaderEXT) -#define glDepthBoundsEXT MANGLE(DepthBoundsEXT) -#define glDepthFunc MANGLE(DepthFunc) -#define glDepthMask MANGLE(DepthMask) -#define glDepthRange MANGLE(DepthRange) -#define glDetachObjectARB MANGLE(DetachObjectARB) -#define glDetachShader MANGLE(DetachShader) -#define glDetailTexFuncSGIS MANGLE(DetailTexFuncSGIS) -#define glDisableClientState MANGLE(DisableClientState) -#define glDisable MANGLE(Disable) -#define glDisableTraceMESA MANGLE(DisableTraceMESA) -#define glDisableVariantClientStateEXT MANGLE(DisableVariantClientStateEXT) -#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB) -#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray) -#define glDrawArraysEXT MANGLE(DrawArraysEXT) -#define glDrawArrays MANGLE(DrawArrays) -#define glDrawBuffer MANGLE(DrawBuffer) -#define glDrawBuffersARB MANGLE(DrawBuffersARB) -#define glDrawBuffersATI MANGLE(DrawBuffersATI) -#define glDrawBuffers MANGLE(DrawBuffers) -#define glDrawElementArrayAPPLE MANGLE(DrawElementArrayAPPLE) -#define glDrawElementArrayATI MANGLE(DrawElementArrayATI) -#define glDrawElements MANGLE(DrawElements) -#define glDrawMeshArraysSUN MANGLE(DrawMeshArraysSUN) -#define glDrawPixels MANGLE(DrawPixels) -#define glDrawRangeElementArrayAPPLE MANGLE(DrawRangeElementArrayAPPLE) -#define glDrawRangeElementArrayATI MANGLE(DrawRangeElementArrayATI) -#define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT) -#define glDrawRangeElements MANGLE(DrawRangeElements) -#define glEdgeFlag MANGLE(EdgeFlag) -#define glEdgeFlagPointerEXT MANGLE(EdgeFlagPointerEXT) -#define glEdgeFlagPointerListIBM MANGLE(EdgeFlagPointerListIBM) -#define glEdgeFlagPointer MANGLE(EdgeFlagPointer) -#define glEdgeFlagv MANGLE(EdgeFlagv) -#define glElementPointerAPPLE MANGLE(ElementPointerAPPLE) -#define glElementPointerATI MANGLE(ElementPointerATI) -#define glEnableClientState MANGLE(EnableClientState) -#define glEnable MANGLE(Enable) -#define glEnableTraceMESA MANGLE(EnableTraceMESA) -#define glEnableVariantClientStateEXT MANGLE(EnableVariantClientStateEXT) -#define glEnableVertexAttribArrayARB MANGLE(EnableVertexAttribArrayARB) -#define glEnableVertexAttribArray MANGLE(EnableVertexAttribArray) -#define glEndFragmentShaderATI MANGLE(EndFragmentShaderATI) -#define glEndList MANGLE(EndList) -#define glEnd MANGLE(End) -#define glEndOcclusionQueryNV MANGLE(EndOcclusionQueryNV) -#define glEndQueryARB MANGLE(EndQueryARB) -#define glEndQuery MANGLE(EndQuery) -#define glEndTraceMESA MANGLE(EndTraceMESA) -#define glEndVertexShaderEXT MANGLE(EndVertexShaderEXT) -#define glEvalCoord1d MANGLE(EvalCoord1d) -#define glEvalCoord1dv MANGLE(EvalCoord1dv) -#define glEvalCoord1f MANGLE(EvalCoord1f) -#define glEvalCoord1fv MANGLE(EvalCoord1fv) -#define glEvalCoord2d MANGLE(EvalCoord2d) -#define glEvalCoord2dv MANGLE(EvalCoord2dv) -#define glEvalCoord2f MANGLE(EvalCoord2f) -#define glEvalCoord2fv MANGLE(EvalCoord2fv) -#define glEvalMapsNV MANGLE(EvalMapsNV) -#define glEvalMesh1 MANGLE(EvalMesh1) -#define glEvalMesh2 MANGLE(EvalMesh2) -#define glEvalPoint1 MANGLE(EvalPoint1) -#define glEvalPoint2 MANGLE(EvalPoint2) -#define glExecuteProgramNV MANGLE(ExecuteProgramNV) -#define glExtractComponentEXT MANGLE(ExtractComponentEXT) -#define glFeedbackBuffer MANGLE(FeedbackBuffer) -#define glFinalCombinerInputNV MANGLE(FinalCombinerInputNV) -#define glFinishAsyncSGIX MANGLE(FinishAsyncSGIX) -#define glFinishFenceAPPLE MANGLE(FinishFenceAPPLE) -#define glFinishFenceNV MANGLE(FinishFenceNV) -#define glFinish MANGLE(Finish) -#define glFinishObjectAPPLE MANGLE(FinishObjectAPPLE) -#define glFinishTextureSUNX MANGLE(FinishTextureSUNX) -#define glFlush MANGLE(Flush) -#define glFlushPixelDataRangeNV MANGLE(FlushPixelDataRangeNV) -#define glFlushRasterSGIX MANGLE(FlushRasterSGIX) -#define glFlushVertexArrayRangeAPPLE MANGLE(FlushVertexArrayRangeAPPLE) -#define glFlushVertexArrayRangeNV MANGLE(FlushVertexArrayRangeNV) -#define glFogCoorddEXT MANGLE(FogCoorddEXT) -#define glFogCoordd MANGLE(FogCoordd) -#define glFogCoorddvEXT MANGLE(FogCoorddvEXT) -#define glFogCoorddv MANGLE(FogCoorddv) -#define glFogCoordfEXT MANGLE(FogCoordfEXT) -#define glFogCoordf MANGLE(FogCoordf) -#define glFogCoordfvEXT MANGLE(FogCoordfvEXT) -#define glFogCoordfv MANGLE(FogCoordfv) -#define glFogCoordhNV MANGLE(FogCoordhNV) -#define glFogCoordhvNV MANGLE(FogCoordhvNV) -#define glFogCoordPointerEXT MANGLE(FogCoordPointerEXT) -#define glFogCoordPointerListIBM MANGLE(FogCoordPointerListIBM) -#define glFogCoordPointer MANGLE(FogCoordPointer) -#define glFogf MANGLE(Fogf) -#define glFogFuncSGIS MANGLE(FogFuncSGIS) -#define glFogfv MANGLE(Fogfv) -#define glFogi MANGLE(Fogi) -#define glFogiv MANGLE(Fogiv) -#define glFragmentColorMaterialSGIX MANGLE(FragmentColorMaterialSGIX) -#define glFragmentLightfSGIX MANGLE(FragmentLightfSGIX) -#define glFragmentLightfvSGIX MANGLE(FragmentLightfvSGIX) -#define glFragmentLightiSGIX MANGLE(FragmentLightiSGIX) -#define glFragmentLightivSGIX MANGLE(FragmentLightivSGIX) -#define glFragmentLightModelfSGIX MANGLE(FragmentLightModelfSGIX) -#define glFragmentLightModelfvSGIX MANGLE(FragmentLightModelfvSGIX) -#define glFragmentLightModeliSGIX MANGLE(FragmentLightModeliSGIX) -#define glFragmentLightModelivSGIX MANGLE(FragmentLightModelivSGIX) -#define glFragmentMaterialfSGIX MANGLE(FragmentMaterialfSGIX) -#define glFragmentMaterialfvSGIX MANGLE(FragmentMaterialfvSGIX) -#define glFragmentMaterialiSGIX MANGLE(FragmentMaterialiSGIX) -#define glFragmentMaterialivSGIX MANGLE(FragmentMaterialivSGIX) -#define glFramebufferRenderbufferEXT MANGLE(FramebufferRenderbufferEXT) -#define glFramebufferTexture1DEXT MANGLE(FramebufferTexture1DEXT) -#define glFramebufferTexture2DEXT MANGLE(FramebufferTexture2DEXT) -#define glFramebufferTexture3DEXT MANGLE(FramebufferTexture3DEXT) -#define glFrameZoomSGIX MANGLE(FrameZoomSGIX) -#define glFreeObjectBufferATI MANGLE(FreeObjectBufferATI) -#define glFrontFace MANGLE(FrontFace) -#define glFrustum MANGLE(Frustum) -#define glGenAsyncMarkersSGIX MANGLE(GenAsyncMarkersSGIX) -#define glGenBuffersARB MANGLE(GenBuffersARB) -#define glGenBuffers MANGLE(GenBuffers) -#define glGenerateMipmapEXT MANGLE(GenerateMipmapEXT) -#define glGenFencesAPPLE MANGLE(GenFencesAPPLE) -#define glGenFencesNV MANGLE(GenFencesNV) -#define glGenFragmentShadersATI MANGLE(GenFragmentShadersATI) -#define glGenFramebuffersEXT MANGLE(GenFramebuffersEXT) -#define glGenLists MANGLE(GenLists) -#define glGenOcclusionQueriesNV MANGLE(GenOcclusionQueriesNV) -#define glGenProgramsARB MANGLE(GenProgramsARB) -#define glGenProgramsNV MANGLE(GenProgramsNV) -#define glGenQueriesARB MANGLE(GenQueriesARB) -#define glGenQueries MANGLE(GenQueries) -#define glGenRenderbuffersEXT MANGLE(GenRenderbuffersEXT) -#define glGenSymbolsEXT MANGLE(GenSymbolsEXT) -#define glGenTexturesEXT MANGLE(GenTexturesEXT) -#define glGenTextures MANGLE(GenTextures) -#define glGenVertexArraysAPPLE MANGLE(GenVertexArraysAPPLE) -#define glGenVertexShadersEXT MANGLE(GenVertexShadersEXT) -#define glGetActiveAttribARB MANGLE(GetActiveAttribARB) -#define glGetActiveAttrib MANGLE(GetActiveAttrib) -#define glGetActiveUniformARB MANGLE(GetActiveUniformARB) -#define glGetActiveUniform MANGLE(GetActiveUniform) -#define glGetArrayObjectfvATI MANGLE(GetArrayObjectfvATI) -#define glGetArrayObjectivATI MANGLE(GetArrayObjectivATI) -#define glGetAttachedObjectsARB MANGLE(GetAttachedObjectsARB) -#define glGetAttachedShaders MANGLE(GetAttachedShaders) -#define glGetAttribLocationARB MANGLE(GetAttribLocationARB) -#define glGetAttribLocation MANGLE(GetAttribLocation) -#define glGetBooleanv MANGLE(GetBooleanv) -#define glGetBufferParameterivARB MANGLE(GetBufferParameterivARB) -#define glGetBufferParameteriv MANGLE(GetBufferParameteriv) -#define glGetBufferPointervARB MANGLE(GetBufferPointervARB) -#define glGetBufferPointerv MANGLE(GetBufferPointerv) -#define glGetBufferSubDataARB MANGLE(GetBufferSubDataARB) -#define glGetBufferSubData MANGLE(GetBufferSubData) -#define glGetClipPlane MANGLE(GetClipPlane) -#define glGetColorTableEXT MANGLE(GetColorTableEXT) -#define glGetColorTable MANGLE(GetColorTable) -#define glGetColorTableParameterfvEXT MANGLE(GetColorTableParameterfvEXT) -#define glGetColorTableParameterfv MANGLE(GetColorTableParameterfv) -#define glGetColorTableParameterfvSGI MANGLE(GetColorTableParameterfvSGI) -#define glGetColorTableParameterivEXT MANGLE(GetColorTableParameterivEXT) -#define glGetColorTableParameteriv MANGLE(GetColorTableParameteriv) -#define glGetColorTableParameterivSGI MANGLE(GetColorTableParameterivSGI) -#define glGetColorTableSGI MANGLE(GetColorTableSGI) -#define glGetCombinerInputParameterfvNV MANGLE(GetCombinerInputParameterfvNV) -#define glGetCombinerInputParameterivNV MANGLE(GetCombinerInputParameterivNV) -#define glGetCombinerOutputParameterfvNV MANGLE(GetCombinerOutputParameterfvNV) -#define glGetCombinerOutputParameterivNV MANGLE(GetCombinerOutputParameterivNV) -#define glGetCombinerStageParameterfvNV MANGLE(GetCombinerStageParameterfvNV) -#define glGetCompressedTexImageARB MANGLE(GetCompressedTexImageARB) -#define glGetCompressedTexImage MANGLE(GetCompressedTexImage) -#define glGetConvolutionFilterEXT MANGLE(GetConvolutionFilterEXT) -#define glGetConvolutionFilter MANGLE(GetConvolutionFilter) -#define glGetConvolutionParameterfvEXT MANGLE(GetConvolutionParameterfvEXT) -#define glGetConvolutionParameterfv MANGLE(GetConvolutionParameterfv) -#define glGetConvolutionParameterivEXT MANGLE(GetConvolutionParameterivEXT) -#define glGetConvolutionParameteriv MANGLE(GetConvolutionParameteriv) -#define glGetDetailTexFuncSGIS MANGLE(GetDetailTexFuncSGIS) -#define glGetDoublev MANGLE(GetDoublev) -#define glGetError MANGLE(GetError) -#define glGetFenceivNV MANGLE(GetFenceivNV) -#define glGetFinalCombinerInputParameterfvNV MANGLE(GetFinalCombinerInputParameterfvNV) -#define glGetFinalCombinerInputParameterivNV MANGLE(GetFinalCombinerInputParameterivNV) -#define glGetFloatv MANGLE(GetFloatv) -#define glGetFogFuncSGIS MANGLE(GetFogFuncSGIS) -#define glGetFragmentLightfvSGIX MANGLE(GetFragmentLightfvSGIX) -#define glGetFragmentLightivSGIX MANGLE(GetFragmentLightivSGIX) -#define glGetFragmentMaterialfvSGIX MANGLE(GetFragmentMaterialfvSGIX) -#define glGetFragmentMaterialivSGIX MANGLE(GetFragmentMaterialivSGIX) -#define glGetFramebufferAttachmentParameterivEXT MANGLE(GetFramebufferAttachmentParameterivEXT) -#define glGetHandleARB MANGLE(GetHandleARB) -#define glGetHistogramEXT MANGLE(GetHistogramEXT) -#define glGetHistogram MANGLE(GetHistogram) -#define glGetHistogramParameterfvEXT MANGLE(GetHistogramParameterfvEXT) -#define glGetHistogramParameterfv MANGLE(GetHistogramParameterfv) -#define glGetHistogramParameterivEXT MANGLE(GetHistogramParameterivEXT) -#define glGetHistogramParameteriv MANGLE(GetHistogramParameteriv) -#define glGetImageTransformParameterfvHP MANGLE(GetImageTransformParameterfvHP) -#define glGetImageTransformParameterivHP MANGLE(GetImageTransformParameterivHP) -#define glGetInfoLogARB MANGLE(GetInfoLogARB) -#define glGetInstrumentsSGIX MANGLE(GetInstrumentsSGIX) -#define glGetIntegerv MANGLE(GetIntegerv) -#define glGetInvariantBooleanvEXT MANGLE(GetInvariantBooleanvEXT) -#define glGetInvariantFloatvEXT MANGLE(GetInvariantFloatvEXT) -#define glGetInvariantIntegervEXT MANGLE(GetInvariantIntegervEXT) -#define glGetLightfv MANGLE(GetLightfv) -#define glGetLightiv MANGLE(GetLightiv) -#define glGetListParameterfvSGIX MANGLE(GetListParameterfvSGIX) -#define glGetListParameterivSGIX MANGLE(GetListParameterivSGIX) -#define glGetLocalConstantBooleanvEXT MANGLE(GetLocalConstantBooleanvEXT) -#define glGetLocalConstantFloatvEXT MANGLE(GetLocalConstantFloatvEXT) -#define glGetLocalConstantIntegervEXT MANGLE(GetLocalConstantIntegervEXT) -#define glGetMapAttribParameterfvNV MANGLE(GetMapAttribParameterfvNV) -#define glGetMapAttribParameterivNV MANGLE(GetMapAttribParameterivNV) -#define glGetMapControlPointsNV MANGLE(GetMapControlPointsNV) -#define glGetMapdv MANGLE(GetMapdv) -#define glGetMapfv MANGLE(GetMapfv) -#define glGetMapiv MANGLE(GetMapiv) -#define glGetMapParameterfvNV MANGLE(GetMapParameterfvNV) -#define glGetMapParameterivNV MANGLE(GetMapParameterivNV) -#define glGetMaterialfv MANGLE(GetMaterialfv) -#define glGetMaterialiv MANGLE(GetMaterialiv) -#define glGetMinmaxEXT MANGLE(GetMinmaxEXT) -#define glGetMinmax MANGLE(GetMinmax) -#define glGetMinmaxParameterfvEXT MANGLE(GetMinmaxParameterfvEXT) -#define glGetMinmaxParameterfv MANGLE(GetMinmaxParameterfv) -#define glGetMinmaxParameterivEXT MANGLE(GetMinmaxParameterivEXT) -#define glGetMinmaxParameteriv MANGLE(GetMinmaxParameteriv) -#define glGetObjectBufferfvATI MANGLE(GetObjectBufferfvATI) -#define glGetObjectBufferivATI MANGLE(GetObjectBufferivATI) -#define glGetObjectParameterfvARB MANGLE(GetObjectParameterfvARB) -#define glGetObjectParameterivARB MANGLE(GetObjectParameterivARB) -#define glGetOcclusionQueryivNV MANGLE(GetOcclusionQueryivNV) -#define glGetOcclusionQueryuivNV MANGLE(GetOcclusionQueryuivNV) -#define glGetPixelMapfv MANGLE(GetPixelMapfv) -#define glGetPixelMapuiv MANGLE(GetPixelMapuiv) -#define glGetPixelMapusv MANGLE(GetPixelMapusv) -#define glGetPixelTexGenParameterfvSGIS MANGLE(GetPixelTexGenParameterfvSGIS) -#define glGetPixelTexGenParameterivSGIS MANGLE(GetPixelTexGenParameterivSGIS) -#define glGetPointervEXT MANGLE(GetPointervEXT) -#define glGetPointerv MANGLE(GetPointerv) -#define glGetPolygonStipple MANGLE(GetPolygonStipple) -#define glGetProgramEnvParameterdvARB MANGLE(GetProgramEnvParameterdvARB) -#define glGetProgramEnvParameterfvARB MANGLE(GetProgramEnvParameterfvARB) -#define glGetProgramInfoLog MANGLE(GetProgramInfoLog) -#define glGetProgramivARB MANGLE(GetProgramivARB) -#define glGetProgramiv MANGLE(GetProgramiv) -#define glGetProgramivNV MANGLE(GetProgramivNV) -#define glGetProgramLocalParameterdvARB MANGLE(GetProgramLocalParameterdvARB) -#define glGetProgramLocalParameterfvARB MANGLE(GetProgramLocalParameterfvARB) -#define glGetProgramNamedParameterdvNV MANGLE(GetProgramNamedParameterdvNV) -#define glGetProgramNamedParameterfvNV MANGLE(GetProgramNamedParameterfvNV) -#define glGetProgramParameterdvNV MANGLE(GetProgramParameterdvNV) -#define glGetProgramParameterfvNV MANGLE(GetProgramParameterfvNV) -#define glGetProgramRegisterfvMESA MANGLE(GetProgramRegisterfvMESA) -#define glGetProgramStringARB MANGLE(GetProgramStringARB) -#define glGetProgramStringNV MANGLE(GetProgramStringNV) -#define glGetQueryivARB MANGLE(GetQueryivARB) -#define glGetQueryiv MANGLE(GetQueryiv) -#define glGetQueryObjectivARB MANGLE(GetQueryObjectivARB) -#define glGetQueryObjectiv MANGLE(GetQueryObjectiv) -#define glGetQueryObjectuivARB MANGLE(GetQueryObjectuivARB) -#define glGetQueryObjectuiv MANGLE(GetQueryObjectuiv) -#define glGetRenderbufferParameterivEXT MANGLE(GetRenderbufferParameterivEXT) -#define glGetSeparableFilterEXT MANGLE(GetSeparableFilterEXT) -#define glGetSeparableFilter MANGLE(GetSeparableFilter) -#define glGetShaderInfoLog MANGLE(GetShaderInfoLog) -#define glGetShaderiv MANGLE(GetShaderiv) -#define glGetShaderSourceARB MANGLE(GetShaderSourceARB) -#define glGetShaderSource MANGLE(GetShaderSource) -#define glGetSharpenTexFuncSGIS MANGLE(GetSharpenTexFuncSGIS) -#define glGetString MANGLE(GetString) -#define glGetTexBumpParameterfvATI MANGLE(GetTexBumpParameterfvATI) -#define glGetTexBumpParameterivATI MANGLE(GetTexBumpParameterivATI) -#define glGetTexEnvfv MANGLE(GetTexEnvfv) -#define glGetTexEnviv MANGLE(GetTexEnviv) -#define glGetTexFilterFuncSGIS MANGLE(GetTexFilterFuncSGIS) -#define glGetTexGendv MANGLE(GetTexGendv) -#define glGetTexGenfv MANGLE(GetTexGenfv) -#define glGetTexGeniv MANGLE(GetTexGeniv) -#define glGetTexImage MANGLE(GetTexImage) -#define glGetTexLevelParameterfv MANGLE(GetTexLevelParameterfv) -#define glGetTexLevelParameteriv MANGLE(GetTexLevelParameteriv) -#define glGetTexParameterfv MANGLE(GetTexParameterfv) -#define glGetTexParameteriv MANGLE(GetTexParameteriv) -#define glGetTrackMatrixivNV MANGLE(GetTrackMatrixivNV) -#define glGetUniformfvARB MANGLE(GetUniformfvARB) -#define glGetUniformfv MANGLE(GetUniformfv) -#define glGetUniformivARB MANGLE(GetUniformivARB) -#define glGetUniformiv MANGLE(GetUniformiv) -#define glGetUniformLocationARB MANGLE(GetUniformLocationARB) -#define glGetUniformLocation MANGLE(GetUniformLocation) -#define glGetVariantArrayObjectfvATI MANGLE(GetVariantArrayObjectfvATI) -#define glGetVariantArrayObjectivATI MANGLE(GetVariantArrayObjectivATI) -#define glGetVariantBooleanvEXT MANGLE(GetVariantBooleanvEXT) -#define glGetVariantFloatvEXT MANGLE(GetVariantFloatvEXT) -#define glGetVariantIntegervEXT MANGLE(GetVariantIntegervEXT) -#define glGetVariantPointervEXT MANGLE(GetVariantPointervEXT) -#define glGetVertexAttribArrayObjectfvATI MANGLE(GetVertexAttribArrayObjectfvATI) -#define glGetVertexAttribArrayObjectivATI MANGLE(GetVertexAttribArrayObjectivATI) -#define glGetVertexAttribdvARB MANGLE(GetVertexAttribdvARB) -#define glGetVertexAttribdv MANGLE(GetVertexAttribdv) -#define glGetVertexAttribdvNV MANGLE(GetVertexAttribdvNV) -#define glGetVertexAttribfvARB MANGLE(GetVertexAttribfvARB) -#define glGetVertexAttribfv MANGLE(GetVertexAttribfv) -#define glGetVertexAttribfvNV MANGLE(GetVertexAttribfvNV) -#define glGetVertexAttribivARB MANGLE(GetVertexAttribivARB) -#define glGetVertexAttribiv MANGLE(GetVertexAttribiv) -#define glGetVertexAttribivNV MANGLE(GetVertexAttribivNV) -#define glGetVertexAttribPointervARB MANGLE(GetVertexAttribPointervARB) -#define glGetVertexAttribPointerv MANGLE(GetVertexAttribPointerv) -#define glGetVertexAttribPointervNV MANGLE(GetVertexAttribPointervNV) -#define glGlobalAlphaFactorbSUN MANGLE(GlobalAlphaFactorbSUN) -#define glGlobalAlphaFactordSUN MANGLE(GlobalAlphaFactordSUN) -#define glGlobalAlphaFactorfSUN MANGLE(GlobalAlphaFactorfSUN) -#define glGlobalAlphaFactoriSUN MANGLE(GlobalAlphaFactoriSUN) -#define glGlobalAlphaFactorsSUN MANGLE(GlobalAlphaFactorsSUN) -#define glGlobalAlphaFactorubSUN MANGLE(GlobalAlphaFactorubSUN) -#define glGlobalAlphaFactoruiSUN MANGLE(GlobalAlphaFactoruiSUN) -#define glGlobalAlphaFactorusSUN MANGLE(GlobalAlphaFactorusSUN) -#define glHint MANGLE(Hint) -#define glHintPGI MANGLE(HintPGI) -#define glHistogramEXT MANGLE(HistogramEXT) -#define glHistogram MANGLE(Histogram) -#define glIglooInterfaceSGIX MANGLE(IglooInterfaceSGIX) -#define glImageTransformParameterfHP MANGLE(ImageTransformParameterfHP) -#define glImageTransformParameterfvHP MANGLE(ImageTransformParameterfvHP) -#define glImageTransformParameteriHP MANGLE(ImageTransformParameteriHP) -#define glImageTransformParameterivHP MANGLE(ImageTransformParameterivHP) -#define glIndexd MANGLE(Indexd) -#define glIndexdv MANGLE(Indexdv) -#define glIndexf MANGLE(Indexf) -#define glIndexFuncEXT MANGLE(IndexFuncEXT) -#define glIndexfv MANGLE(Indexfv) -#define glIndexi MANGLE(Indexi) -#define glIndexiv MANGLE(Indexiv) -#define glIndexMask MANGLE(IndexMask) -#define glIndexMaterialEXT MANGLE(IndexMaterialEXT) -#define glIndexPointerEXT MANGLE(IndexPointerEXT) -#define glIndexPointerListIBM MANGLE(IndexPointerListIBM) -#define glIndexPointer MANGLE(IndexPointer) -#define glIndexs MANGLE(Indexs) -#define glIndexsv MANGLE(Indexsv) -#define glIndexub MANGLE(Indexub) -#define glIndexubv MANGLE(Indexubv) -#define glInitNames MANGLE(InitNames) -#define glInsertComponentEXT MANGLE(InsertComponentEXT) -#define glInstrumentsBufferSGIX MANGLE(InstrumentsBufferSGIX) -#define glInterleavedArrays MANGLE(InterleavedArrays) -#define glIsAsyncMarkerSGIX MANGLE(IsAsyncMarkerSGIX) -#define glIsBufferARB MANGLE(IsBufferARB) -#define glIsBuffer MANGLE(IsBuffer) -#define glIsEnabled MANGLE(IsEnabled) -#define glIsFenceAPPLE MANGLE(IsFenceAPPLE) -#define glIsFenceNV MANGLE(IsFenceNV) -#define glIsFramebufferEXT MANGLE(IsFramebufferEXT) -#define glIsList MANGLE(IsList) -#define glIsObjectBufferATI MANGLE(IsObjectBufferATI) -#define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV) -#define glIsProgramARB MANGLE(IsProgramARB) -#define glIsProgram MANGLE(IsProgram) -#define glIsProgramNV MANGLE(IsProgramNV) -#define glIsQueryARB MANGLE(IsQueryARB) -#define glIsQuery MANGLE(IsQuery) -#define glIsRenderbufferEXT MANGLE(IsRenderbufferEXT) -#define glIsShader MANGLE(IsShader) -#define glIsTextureEXT MANGLE(IsTextureEXT) -#define glIsTexture MANGLE(IsTexture) -#define glIsVariantEnabledEXT MANGLE(IsVariantEnabledEXT) -#define glIsVertexArrayAPPLE MANGLE(IsVertexArrayAPPLE) -#define glLightEnviSGIX MANGLE(LightEnviSGIX) -#define glLightf MANGLE(Lightf) -#define glLightfv MANGLE(Lightfv) -#define glLighti MANGLE(Lighti) -#define glLightiv MANGLE(Lightiv) -#define glLightModelf MANGLE(LightModelf) -#define glLightModelfv MANGLE(LightModelfv) -#define glLightModeli MANGLE(LightModeli) -#define glLightModeliv MANGLE(LightModeliv) -#define glLineStipple MANGLE(LineStipple) -#define glLineWidth MANGLE(LineWidth) -#define glLinkProgramARB MANGLE(LinkProgramARB) -#define glLinkProgram MANGLE(LinkProgram) -#define glListBase MANGLE(ListBase) -#define glListParameterfSGIX MANGLE(ListParameterfSGIX) -#define glListParameterfvSGIX MANGLE(ListParameterfvSGIX) -#define glListParameteriSGIX MANGLE(ListParameteriSGIX) -#define glListParameterivSGIX MANGLE(ListParameterivSGIX) -#define glLoadIdentityDeformationMapSGIX MANGLE(LoadIdentityDeformationMapSGIX) -#define glLoadIdentity MANGLE(LoadIdentity) -#define glLoadMatrixd MANGLE(LoadMatrixd) -#define glLoadMatrixf MANGLE(LoadMatrixf) -#define glLoadName MANGLE(LoadName) -#define glLoadProgramNV MANGLE(LoadProgramNV) -#define glLoadTransposeMatrixdARB MANGLE(LoadTransposeMatrixdARB) -#define glLoadTransposeMatrixd MANGLE(LoadTransposeMatrixd) -#define glLoadTransposeMatrixfARB MANGLE(LoadTransposeMatrixfARB) -#define glLoadTransposeMatrixf MANGLE(LoadTransposeMatrixf) -#define glLockArraysEXT MANGLE(LockArraysEXT) -#define glLogicOp MANGLE(LogicOp) -#define glMap1d MANGLE(Map1d) -#define glMap1f MANGLE(Map1f) -#define glMap2d MANGLE(Map2d) -#define glMap2f MANGLE(Map2f) -#define glMapBufferARB MANGLE(MapBufferARB) -#define glMapBuffer MANGLE(MapBuffer) -#define glMapControlPointsNV MANGLE(MapControlPointsNV) -#define glMapGrid1d MANGLE(MapGrid1d) -#define glMapGrid1f MANGLE(MapGrid1f) -#define glMapGrid2d MANGLE(MapGrid2d) -#define glMapGrid2f MANGLE(MapGrid2f) -#define glMapObjectBufferATI MANGLE(MapObjectBufferATI) -#define glMapParameterfvNV MANGLE(MapParameterfvNV) -#define glMapParameterivNV MANGLE(MapParameterivNV) -#define glMaterialf MANGLE(Materialf) -#define glMaterialfv MANGLE(Materialfv) -#define glMateriali MANGLE(Materiali) -#define glMaterialiv MANGLE(Materialiv) -#define glMatrixIndexPointerARB MANGLE(MatrixIndexPointerARB) -#define glMatrixIndexubvARB MANGLE(MatrixIndexubvARB) -#define glMatrixIndexuivARB MANGLE(MatrixIndexuivARB) -#define glMatrixIndexusvARB MANGLE(MatrixIndexusvARB) -#define glMatrixMode MANGLE(MatrixMode) -#define glMinmaxEXT MANGLE(MinmaxEXT) -#define glMinmax MANGLE(Minmax) -#define glMultiDrawArraysEXT MANGLE(MultiDrawArraysEXT) -#define glMultiDrawArrays MANGLE(MultiDrawArrays) -#define glMultiDrawElementArrayAPPLE MANGLE(MultiDrawElementArrayAPPLE) -#define glMultiDrawElementsEXT MANGLE(MultiDrawElementsEXT) -#define glMultiDrawElements MANGLE(MultiDrawElements) -#define glMultiDrawRangeElementArrayAPPLE MANGLE(MultiDrawRangeElementArrayAPPLE) -#define glMultiModeDrawArraysIBM MANGLE(MultiModeDrawArraysIBM) -#define glMultiModeDrawElementsIBM MANGLE(MultiModeDrawElementsIBM) -#define glMultiTexCoord1dARB MANGLE(MultiTexCoord1dARB) -#define glMultiTexCoord1d MANGLE(MultiTexCoord1d) -#define glMultiTexCoord1dvARB MANGLE(MultiTexCoord1dvARB) -#define glMultiTexCoord1dv MANGLE(MultiTexCoord1dv) -#define glMultiTexCoord1fARB MANGLE(MultiTexCoord1fARB) -#define glMultiTexCoord1f MANGLE(MultiTexCoord1f) -#define glMultiTexCoord1fvARB MANGLE(MultiTexCoord1fvARB) -#define glMultiTexCoord1fv MANGLE(MultiTexCoord1fv) -#define glMultiTexCoord1hNV MANGLE(MultiTexCoord1hNV) -#define glMultiTexCoord1hvNV MANGLE(MultiTexCoord1hvNV) -#define glMultiTexCoord1iARB MANGLE(MultiTexCoord1iARB) -#define glMultiTexCoord1i MANGLE(MultiTexCoord1i) -#define glMultiTexCoord1ivARB MANGLE(MultiTexCoord1ivARB) -#define glMultiTexCoord1iv MANGLE(MultiTexCoord1iv) -#define glMultiTexCoord1sARB MANGLE(MultiTexCoord1sARB) -#define glMultiTexCoord1s MANGLE(MultiTexCoord1s) -#define glMultiTexCoord1svARB MANGLE(MultiTexCoord1svARB) -#define glMultiTexCoord1sv MANGLE(MultiTexCoord1sv) -#define glMultiTexCoord2dARB MANGLE(MultiTexCoord2dARB) -#define glMultiTexCoord2d MANGLE(MultiTexCoord2d) -#define glMultiTexCoord2dvARB MANGLE(MultiTexCoord2dvARB) -#define glMultiTexCoord2dv MANGLE(MultiTexCoord2dv) -#define glMultiTexCoord2fARB MANGLE(MultiTexCoord2fARB) -#define glMultiTexCoord2f MANGLE(MultiTexCoord2f) -#define glMultiTexCoord2fvARB MANGLE(MultiTexCoord2fvARB) -#define glMultiTexCoord2fv MANGLE(MultiTexCoord2fv) -#define glMultiTexCoord2hNV MANGLE(MultiTexCoord2hNV) -#define glMultiTexCoord2hvNV MANGLE(MultiTexCoord2hvNV) -#define glMultiTexCoord2iARB MANGLE(MultiTexCoord2iARB) -#define glMultiTexCoord2i MANGLE(MultiTexCoord2i) -#define glMultiTexCoord2ivARB MANGLE(MultiTexCoord2ivARB) -#define glMultiTexCoord2iv MANGLE(MultiTexCoord2iv) -#define glMultiTexCoord2sARB MANGLE(MultiTexCoord2sARB) -#define glMultiTexCoord2s MANGLE(MultiTexCoord2s) -#define glMultiTexCoord2svARB MANGLE(MultiTexCoord2svARB) -#define glMultiTexCoord2sv MANGLE(MultiTexCoord2sv) -#define glMultiTexCoord3dARB MANGLE(MultiTexCoord3dARB) -#define glMultiTexCoord3d MANGLE(MultiTexCoord3d) -#define glMultiTexCoord3dvARB MANGLE(MultiTexCoord3dvARB) -#define glMultiTexCoord3dv MANGLE(MultiTexCoord3dv) -#define glMultiTexCoord3fARB MANGLE(MultiTexCoord3fARB) -#define glMultiTexCoord3f MANGLE(MultiTexCoord3f) -#define glMultiTexCoord3fvARB MANGLE(MultiTexCoord3fvARB) -#define glMultiTexCoord3fv MANGLE(MultiTexCoord3fv) -#define glMultiTexCoord3hNV MANGLE(MultiTexCoord3hNV) -#define glMultiTexCoord3hvNV MANGLE(MultiTexCoord3hvNV) -#define glMultiTexCoord3iARB MANGLE(MultiTexCoord3iARB) -#define glMultiTexCoord3i MANGLE(MultiTexCoord3i) -#define glMultiTexCoord3ivARB MANGLE(MultiTexCoord3ivARB) -#define glMultiTexCoord3iv MANGLE(MultiTexCoord3iv) -#define glMultiTexCoord3sARB MANGLE(MultiTexCoord3sARB) -#define glMultiTexCoord3s MANGLE(MultiTexCoord3s) -#define glMultiTexCoord3svARB MANGLE(MultiTexCoord3svARB) -#define glMultiTexCoord3sv MANGLE(MultiTexCoord3sv) -#define glMultiTexCoord4dARB MANGLE(MultiTexCoord4dARB) -#define glMultiTexCoord4d MANGLE(MultiTexCoord4d) -#define glMultiTexCoord4dvARB MANGLE(MultiTexCoord4dvARB) -#define glMultiTexCoord4dv MANGLE(MultiTexCoord4dv) -#define glMultiTexCoord4fARB MANGLE(MultiTexCoord4fARB) -#define glMultiTexCoord4f MANGLE(MultiTexCoord4f) -#define glMultiTexCoord4fvARB MANGLE(MultiTexCoord4fvARB) -#define glMultiTexCoord4fv MANGLE(MultiTexCoord4fv) -#define glMultiTexCoord4hNV MANGLE(MultiTexCoord4hNV) -#define glMultiTexCoord4hvNV MANGLE(MultiTexCoord4hvNV) -#define glMultiTexCoord4iARB MANGLE(MultiTexCoord4iARB) -#define glMultiTexCoord4i MANGLE(MultiTexCoord4i) -#define glMultiTexCoord4ivARB MANGLE(MultiTexCoord4ivARB) -#define glMultiTexCoord4iv MANGLE(MultiTexCoord4iv) -#define glMultiTexCoord4sARB MANGLE(MultiTexCoord4sARB) -#define glMultiTexCoord4s MANGLE(MultiTexCoord4s) -#define glMultiTexCoord4svARB MANGLE(MultiTexCoord4svARB) -#define glMultiTexCoord4sv MANGLE(MultiTexCoord4sv) -#define glMultMatrixd MANGLE(MultMatrixd) -#define glMultMatrixf MANGLE(MultMatrixf) -#define glMultTransposeMatrixdARB MANGLE(MultTransposeMatrixdARB) -#define glMultTransposeMatrixd MANGLE(MultTransposeMatrixd) -#define glMultTransposeMatrixfARB MANGLE(MultTransposeMatrixfARB) -#define glMultTransposeMatrixf MANGLE(MultTransposeMatrixf) -#define glNewList MANGLE(NewList) -#define glNewObjectBufferATI MANGLE(NewObjectBufferATI) -#define glNewTraceMESA MANGLE(NewTraceMESA) -#define glNormal3b MANGLE(Normal3b) -#define glNormal3bv MANGLE(Normal3bv) -#define glNormal3d MANGLE(Normal3d) -#define glNormal3dv MANGLE(Normal3dv) -#define glNormal3f MANGLE(Normal3f) -#define glNormal3fVertex3fSUN MANGLE(Normal3fVertex3fSUN) -#define glNormal3fVertex3fvSUN MANGLE(Normal3fVertex3fvSUN) -#define glNormal3fv MANGLE(Normal3fv) -#define glNormal3hNV MANGLE(Normal3hNV) -#define glNormal3hvNV MANGLE(Normal3hvNV) -#define glNormal3i MANGLE(Normal3i) -#define glNormal3iv MANGLE(Normal3iv) -#define glNormal3s MANGLE(Normal3s) -#define glNormal3sv MANGLE(Normal3sv) -#define glNormalPointerEXT MANGLE(NormalPointerEXT) -#define glNormalPointerListIBM MANGLE(NormalPointerListIBM) -#define glNormalPointer MANGLE(NormalPointer) -#define glNormalPointervINTEL MANGLE(NormalPointervINTEL) -#define glNormalStream3bATI MANGLE(NormalStream3bATI) -#define glNormalStream3bvATI MANGLE(NormalStream3bvATI) -#define glNormalStream3dATI MANGLE(NormalStream3dATI) -#define glNormalStream3dvATI MANGLE(NormalStream3dvATI) -#define glNormalStream3fATI MANGLE(NormalStream3fATI) -#define glNormalStream3fvATI MANGLE(NormalStream3fvATI) -#define glNormalStream3iATI MANGLE(NormalStream3iATI) -#define glNormalStream3ivATI MANGLE(NormalStream3ivATI) -#define glNormalStream3sATI MANGLE(NormalStream3sATI) -#define glNormalStream3svATI MANGLE(NormalStream3svATI) -#define glOrtho MANGLE(Ortho) -#define glPassTexCoordATI MANGLE(PassTexCoordATI) -#define glPassThrough MANGLE(PassThrough) -#define glPixelDataRangeNV MANGLE(PixelDataRangeNV) -#define glPixelMapfv MANGLE(PixelMapfv) -#define glPixelMapuiv MANGLE(PixelMapuiv) -#define glPixelMapusv MANGLE(PixelMapusv) -#define glPixelStoref MANGLE(PixelStoref) -#define glPixelStorei MANGLE(PixelStorei) -#define glPixelTexGenParameterfSGIS MANGLE(PixelTexGenParameterfSGIS) -#define glPixelTexGenParameterfvSGIS MANGLE(PixelTexGenParameterfvSGIS) -#define glPixelTexGenParameteriSGIS MANGLE(PixelTexGenParameteriSGIS) -#define glPixelTexGenParameterivSGIS MANGLE(PixelTexGenParameterivSGIS) -#define glPixelTexGenSGIX MANGLE(PixelTexGenSGIX) -#define glPixelTransferf MANGLE(PixelTransferf) -#define glPixelTransferi MANGLE(PixelTransferi) -#define glPixelTransformParameterfEXT MANGLE(PixelTransformParameterfEXT) -#define glPixelTransformParameterfvEXT MANGLE(PixelTransformParameterfvEXT) -#define glPixelTransformParameteriEXT MANGLE(PixelTransformParameteriEXT) -#define glPixelTransformParameterivEXT MANGLE(PixelTransformParameterivEXT) -#define glPixelZoom MANGLE(PixelZoom) -#define glPNTrianglesfATI MANGLE(PNTrianglesfATI) -#define glPNTrianglesiATI MANGLE(PNTrianglesiATI) -#define glPointParameterfARB MANGLE(PointParameterfARB) -#define glPointParameterfEXT MANGLE(PointParameterfEXT) -#define glPointParameterf MANGLE(PointParameterf) -#define glPointParameterfSGIS MANGLE(PointParameterfSGIS) -#define glPointParameterfvARB MANGLE(PointParameterfvARB) -#define glPointParameterfvEXT MANGLE(PointParameterfvEXT) -#define glPointParameterfv MANGLE(PointParameterfv) -#define glPointParameterfvSGIS MANGLE(PointParameterfvSGIS) -#define glPointParameteri MANGLE(PointParameteri) -#define glPointParameteriNV MANGLE(PointParameteriNV) -#define glPointParameteriv MANGLE(PointParameteriv) -#define glPointParameterivNV MANGLE(PointParameterivNV) -#define glPointSize MANGLE(PointSize) -#define glPollAsyncSGIX MANGLE(PollAsyncSGIX) -#define glPollInstrumentsSGIX MANGLE(PollInstrumentsSGIX) -#define glPolygonMode MANGLE(PolygonMode) -#define glPolygonOffsetEXT MANGLE(PolygonOffsetEXT) -#define glPolygonOffset MANGLE(PolygonOffset) -#define glPolygonStipple MANGLE(PolygonStipple) -#define glPopAttrib MANGLE(PopAttrib) -#define glPopClientAttrib MANGLE(PopClientAttrib) -#define glPopMatrix MANGLE(PopMatrix) -#define glPopName MANGLE(PopName) -#define glPrimitiveRestartIndexNV MANGLE(PrimitiveRestartIndexNV) -#define glPrimitiveRestartNV MANGLE(PrimitiveRestartNV) -#define glPrioritizeTexturesEXT MANGLE(PrioritizeTexturesEXT) -#define glPrioritizeTextures MANGLE(PrioritizeTextures) -#define glProgramCallbackMESA MANGLE(ProgramCallbackMESA) -#define glProgramEnvParameter4dARB MANGLE(ProgramEnvParameter4dARB) -#define glProgramEnvParameter4dvARB MANGLE(ProgramEnvParameter4dvARB) -#define glProgramEnvParameter4fARB MANGLE(ProgramEnvParameter4fARB) -#define glProgramEnvParameter4fvARB MANGLE(ProgramEnvParameter4fvARB) -#define glProgramLocalParameter4dARB MANGLE(ProgramLocalParameter4dARB) -#define glProgramLocalParameter4dvARB MANGLE(ProgramLocalParameter4dvARB) -#define glProgramLocalParameter4fARB MANGLE(ProgramLocalParameter4fARB) -#define glProgramLocalParameter4fvARB MANGLE(ProgramLocalParameter4fvARB) -#define glProgramNamedParameter4dNV MANGLE(ProgramNamedParameter4dNV) -#define glProgramNamedParameter4dvNV MANGLE(ProgramNamedParameter4dvNV) -#define glProgramNamedParameter4fNV MANGLE(ProgramNamedParameter4fNV) -#define glProgramNamedParameter4fvNV MANGLE(ProgramNamedParameter4fvNV) -#define glProgramParameter4dNV MANGLE(ProgramParameter4dNV) -#define glProgramParameter4dvNV MANGLE(ProgramParameter4dvNV) -#define glProgramParameter4fNV MANGLE(ProgramParameter4fNV) -#define glProgramParameter4fvNV MANGLE(ProgramParameter4fvNV) -#define glProgramParameters4dvNV MANGLE(ProgramParameters4dvNV) -#define glProgramParameters4fvNV MANGLE(ProgramParameters4fvNV) -#define glProgramStringARB MANGLE(ProgramStringARB) -#define glPushAttrib MANGLE(PushAttrib) -#define glPushClientAttrib MANGLE(PushClientAttrib) -#define glPushMatrix MANGLE(PushMatrix) -#define glPushName MANGLE(PushName) -#define glRasterPos2d MANGLE(RasterPos2d) -#define glRasterPos2dv MANGLE(RasterPos2dv) -#define glRasterPos2f MANGLE(RasterPos2f) -#define glRasterPos2fv MANGLE(RasterPos2fv) -#define glRasterPos2i MANGLE(RasterPos2i) -#define glRasterPos2iv MANGLE(RasterPos2iv) -#define glRasterPos2s MANGLE(RasterPos2s) -#define glRasterPos2sv MANGLE(RasterPos2sv) -#define glRasterPos3d MANGLE(RasterPos3d) -#define glRasterPos3dv MANGLE(RasterPos3dv) -#define glRasterPos3f MANGLE(RasterPos3f) -#define glRasterPos3fv MANGLE(RasterPos3fv) -#define glRasterPos3i MANGLE(RasterPos3i) -#define glRasterPos3iv MANGLE(RasterPos3iv) -#define glRasterPos3s MANGLE(RasterPos3s) -#define glRasterPos3sv MANGLE(RasterPos3sv) -#define glRasterPos4d MANGLE(RasterPos4d) -#define glRasterPos4dv MANGLE(RasterPos4dv) -#define glRasterPos4f MANGLE(RasterPos4f) -#define glRasterPos4fv MANGLE(RasterPos4fv) -#define glRasterPos4i MANGLE(RasterPos4i) -#define glRasterPos4iv MANGLE(RasterPos4iv) -#define glRasterPos4s MANGLE(RasterPos4s) -#define glRasterPos4sv MANGLE(RasterPos4sv) -#define glReadBuffer MANGLE(ReadBuffer) -#define glReadInstrumentsSGIX MANGLE(ReadInstrumentsSGIX) -#define glReadPixels MANGLE(ReadPixels) -#define glRectd MANGLE(Rectd) -#define glRectdv MANGLE(Rectdv) -#define glRectf MANGLE(Rectf) -#define glRectfv MANGLE(Rectfv) -#define glRecti MANGLE(Recti) -#define glRectiv MANGLE(Rectiv) -#define glRects MANGLE(Rects) -#define glRectsv MANGLE(Rectsv) -#define glReferencePlaneSGIX MANGLE(ReferencePlaneSGIX) -#define glRenderbufferStorageEXT MANGLE(RenderbufferStorageEXT) -#define glRenderMode MANGLE(RenderMode) -#define glReplacementCodePointerSUN MANGLE(ReplacementCodePointerSUN) -#define glReplacementCodeubSUN MANGLE(ReplacementCodeubSUN) -#define glReplacementCodeubvSUN MANGLE(ReplacementCodeubvSUN) -#define glReplacementCodeuiColor3fVertex3fSUN MANGLE(ReplacementCodeuiColor3fVertex3fSUN) -#define glReplacementCodeuiColor3fVertex3fvSUN MANGLE(ReplacementCodeuiColor3fVertex3fvSUN) -#define glReplacementCodeuiColor4fNormal3fVertex3fSUN MANGLE(ReplacementCodeuiColor4fNormal3fVertex3fSUN) -#define glReplacementCodeuiColor4fNormal3fVertex3fvSUN MANGLE(ReplacementCodeuiColor4fNormal3fVertex3fvSUN) -#define glReplacementCodeuiColor4ubVertex3fSUN MANGLE(ReplacementCodeuiColor4ubVertex3fSUN) -#define glReplacementCodeuiColor4ubVertex3fvSUN MANGLE(ReplacementCodeuiColor4ubVertex3fvSUN) -#define glReplacementCodeuiNormal3fVertex3fSUN MANGLE(ReplacementCodeuiNormal3fVertex3fSUN) -#define glReplacementCodeuiNormal3fVertex3fvSUN MANGLE(ReplacementCodeuiNormal3fVertex3fvSUN) -#define glReplacementCodeuiSUN MANGLE(ReplacementCodeuiSUN) -#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN MANGLE(ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN) -#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN MANGLE(ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN) -#define glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN MANGLE(ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN) -#define glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN MANGLE(ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN) -#define glReplacementCodeuiTexCoord2fVertex3fSUN MANGLE(ReplacementCodeuiTexCoord2fVertex3fSUN) -#define glReplacementCodeuiTexCoord2fVertex3fvSUN MANGLE(ReplacementCodeuiTexCoord2fVertex3fvSUN) -#define glReplacementCodeuiVertex3fSUN MANGLE(ReplacementCodeuiVertex3fSUN) -#define glReplacementCodeuiVertex3fvSUN MANGLE(ReplacementCodeuiVertex3fvSUN) -#define glReplacementCodeuivSUN MANGLE(ReplacementCodeuivSUN) -#define glReplacementCodeusSUN MANGLE(ReplacementCodeusSUN) -#define glReplacementCodeusvSUN MANGLE(ReplacementCodeusvSUN) -#define glRequestResidentProgramsNV MANGLE(RequestResidentProgramsNV) -#define glResetHistogramEXT MANGLE(ResetHistogramEXT) -#define glResetHistogram MANGLE(ResetHistogram) -#define glResetMinmaxEXT MANGLE(ResetMinmaxEXT) -#define glResetMinmax MANGLE(ResetMinmax) -#define glResizeBuffersMESA MANGLE(ResizeBuffersMESA) -#define glRotated MANGLE(Rotated) -#define glRotatef MANGLE(Rotatef) -#define glSampleCoverageARB MANGLE(SampleCoverageARB) -#define glSampleCoverage MANGLE(SampleCoverage) -#define glSampleMapATI MANGLE(SampleMapATI) -#define glSampleMaskEXT MANGLE(SampleMaskEXT) -#define glSampleMaskSGIS MANGLE(SampleMaskSGIS) -#define glSamplePatternEXT MANGLE(SamplePatternEXT) -#define glSamplePatternSGIS MANGLE(SamplePatternSGIS) -#define glScaled MANGLE(Scaled) -#define glScalef MANGLE(Scalef) -#define glScissor MANGLE(Scissor) -#define glSecondaryColor3bEXT MANGLE(SecondaryColor3bEXT) -#define glSecondaryColor3b MANGLE(SecondaryColor3b) -#define glSecondaryColor3bvEXT MANGLE(SecondaryColor3bvEXT) -#define glSecondaryColor3bv MANGLE(SecondaryColor3bv) -#define glSecondaryColor3dEXT MANGLE(SecondaryColor3dEXT) -#define glSecondaryColor3d MANGLE(SecondaryColor3d) -#define glSecondaryColor3dvEXT MANGLE(SecondaryColor3dvEXT) -#define glSecondaryColor3dv MANGLE(SecondaryColor3dv) -#define glSecondaryColor3fEXT MANGLE(SecondaryColor3fEXT) -#define glSecondaryColor3f MANGLE(SecondaryColor3f) -#define glSecondaryColor3fvEXT MANGLE(SecondaryColor3fvEXT) -#define glSecondaryColor3fv MANGLE(SecondaryColor3fv) -#define glSecondaryColor3hNV MANGLE(SecondaryColor3hNV) -#define glSecondaryColor3hvNV MANGLE(SecondaryColor3hvNV) -#define glSecondaryColor3iEXT MANGLE(SecondaryColor3iEXT) -#define glSecondaryColor3i MANGLE(SecondaryColor3i) -#define glSecondaryColor3ivEXT MANGLE(SecondaryColor3ivEXT) -#define glSecondaryColor3iv MANGLE(SecondaryColor3iv) -#define glSecondaryColor3sEXT MANGLE(SecondaryColor3sEXT) -#define glSecondaryColor3s MANGLE(SecondaryColor3s) -#define glSecondaryColor3svEXT MANGLE(SecondaryColor3svEXT) -#define glSecondaryColor3sv MANGLE(SecondaryColor3sv) -#define glSecondaryColor3ubEXT MANGLE(SecondaryColor3ubEXT) -#define glSecondaryColor3ub MANGLE(SecondaryColor3ub) -#define glSecondaryColor3ubvEXT MANGLE(SecondaryColor3ubvEXT) -#define glSecondaryColor3ubv MANGLE(SecondaryColor3ubv) -#define glSecondaryColor3uiEXT MANGLE(SecondaryColor3uiEXT) -#define glSecondaryColor3ui MANGLE(SecondaryColor3ui) -#define glSecondaryColor3uivEXT MANGLE(SecondaryColor3uivEXT) -#define glSecondaryColor3uiv MANGLE(SecondaryColor3uiv) -#define glSecondaryColor3usEXT MANGLE(SecondaryColor3usEXT) -#define glSecondaryColor3us MANGLE(SecondaryColor3us) -#define glSecondaryColor3usvEXT MANGLE(SecondaryColor3usvEXT) -#define glSecondaryColor3usv MANGLE(SecondaryColor3usv) -#define glSecondaryColorPointerEXT MANGLE(SecondaryColorPointerEXT) -#define glSecondaryColorPointerListIBM MANGLE(SecondaryColorPointerListIBM) -#define glSecondaryColorPointer MANGLE(SecondaryColorPointer) -#define glSelectBuffer MANGLE(SelectBuffer) -#define glSeparableFilter2DEXT MANGLE(SeparableFilter2DEXT) -#define glSeparableFilter2D MANGLE(SeparableFilter2D) -#define glSetFenceAPPLE MANGLE(SetFenceAPPLE) -#define glSetFenceNV MANGLE(SetFenceNV) -#define glSetFragmentShaderConstantATI MANGLE(SetFragmentShaderConstantATI) -#define glSetInvariantEXT MANGLE(SetInvariantEXT) -#define glSetLocalConstantEXT MANGLE(SetLocalConstantEXT) -#define glShadeModel MANGLE(ShadeModel) -#define glShaderOp1EXT MANGLE(ShaderOp1EXT) -#define glShaderOp2EXT MANGLE(ShaderOp2EXT) -#define glShaderOp3EXT MANGLE(ShaderOp3EXT) -#define glShaderSourceARB MANGLE(ShaderSourceARB) -#define glShaderSource MANGLE(ShaderSource) -#define glSharpenTexFuncSGIS MANGLE(SharpenTexFuncSGIS) -#define glSpriteParameterfSGIX MANGLE(SpriteParameterfSGIX) -#define glSpriteParameterfvSGIX MANGLE(SpriteParameterfvSGIX) -#define glSpriteParameteriSGIX MANGLE(SpriteParameteriSGIX) -#define glSpriteParameterivSGIX MANGLE(SpriteParameterivSGIX) -#define glStartInstrumentsSGIX MANGLE(StartInstrumentsSGIX) -#define glStencilFunc MANGLE(StencilFunc) -#define glStencilFuncSeparateATI MANGLE(StencilFuncSeparateATI) -#define glStencilFuncSeparate MANGLE(StencilFuncSeparate) -#define glStencilMask MANGLE(StencilMask) -#define glStencilMaskSeparate MANGLE(StencilMaskSeparate) -#define glStencilOp MANGLE(StencilOp) -#define glStencilOpSeparateATI MANGLE(StencilOpSeparateATI) -#define glStencilOpSeparate MANGLE(StencilOpSeparate) -#define glStopInstrumentsSGIX MANGLE(StopInstrumentsSGIX) -#define glStringMarkerGREMEDY MANGLE(StringMarkerGREMEDY) -#define glSwizzleEXT MANGLE(SwizzleEXT) -#define glTagSampleBufferSGIX MANGLE(TagSampleBufferSGIX) -#define glTangent3bEXT MANGLE(Tangent3bEXT) -#define glTangent3bvEXT MANGLE(Tangent3bvEXT) -#define glTangent3dEXT MANGLE(Tangent3dEXT) -#define glTangent3dvEXT MANGLE(Tangent3dvEXT) -#define glTangent3fEXT MANGLE(Tangent3fEXT) -#define glTangent3fvEXT MANGLE(Tangent3fvEXT) -#define glTangent3iEXT MANGLE(Tangent3iEXT) -#define glTangent3ivEXT MANGLE(Tangent3ivEXT) -#define glTangent3sEXT MANGLE(Tangent3sEXT) -#define glTangent3svEXT MANGLE(Tangent3svEXT) -#define glTangentPointerEXT MANGLE(TangentPointerEXT) -#define glTbufferMask3DFX MANGLE(TbufferMask3DFX) -#define glTestFenceAPPLE MANGLE(TestFenceAPPLE) -#define glTestFenceNV MANGLE(TestFenceNV) -#define glTestObjectAPPLE MANGLE(TestObjectAPPLE) -#define glTexBumpParameterfvATI MANGLE(TexBumpParameterfvATI) -#define glTexBumpParameterivATI MANGLE(TexBumpParameterivATI) -#define glTexCoord1d MANGLE(TexCoord1d) -#define glTexCoord1dv MANGLE(TexCoord1dv) -#define glTexCoord1f MANGLE(TexCoord1f) -#define glTexCoord1fv MANGLE(TexCoord1fv) -#define glTexCoord1hNV MANGLE(TexCoord1hNV) -#define glTexCoord1hvNV MANGLE(TexCoord1hvNV) -#define glTexCoord1i MANGLE(TexCoord1i) -#define glTexCoord1iv MANGLE(TexCoord1iv) -#define glTexCoord1s MANGLE(TexCoord1s) -#define glTexCoord1sv MANGLE(TexCoord1sv) -#define glTexCoord2d MANGLE(TexCoord2d) -#define glTexCoord2dv MANGLE(TexCoord2dv) -#define glTexCoord2fColor3fVertex3fSUN MANGLE(TexCoord2fColor3fVertex3fSUN) -#define glTexCoord2fColor3fVertex3fvSUN MANGLE(TexCoord2fColor3fVertex3fvSUN) -#define glTexCoord2fColor4fNormal3fVertex3fSUN MANGLE(TexCoord2fColor4fNormal3fVertex3fSUN) -#define glTexCoord2fColor4fNormal3fVertex3fvSUN MANGLE(TexCoord2fColor4fNormal3fVertex3fvSUN) -#define glTexCoord2fColor4ubVertex3fSUN MANGLE(TexCoord2fColor4ubVertex3fSUN) -#define glTexCoord2fColor4ubVertex3fvSUN MANGLE(TexCoord2fColor4ubVertex3fvSUN) -#define glTexCoord2f MANGLE(TexCoord2f) -#define glTexCoord2fNormal3fVertex3fSUN MANGLE(TexCoord2fNormal3fVertex3fSUN) -#define glTexCoord2fNormal3fVertex3fvSUN MANGLE(TexCoord2fNormal3fVertex3fvSUN) -#define glTexCoord2fVertex3fSUN MANGLE(TexCoord2fVertex3fSUN) -#define glTexCoord2fVertex3fvSUN MANGLE(TexCoord2fVertex3fvSUN) -#define glTexCoord2fv MANGLE(TexCoord2fv) -#define glTexCoord2hNV MANGLE(TexCoord2hNV) -#define glTexCoord2hvNV MANGLE(TexCoord2hvNV) -#define glTexCoord2i MANGLE(TexCoord2i) -#define glTexCoord2iv MANGLE(TexCoord2iv) -#define glTexCoord2s MANGLE(TexCoord2s) -#define glTexCoord2sv MANGLE(TexCoord2sv) -#define glTexCoord3d MANGLE(TexCoord3d) -#define glTexCoord3dv MANGLE(TexCoord3dv) -#define glTexCoord3f MANGLE(TexCoord3f) -#define glTexCoord3fv MANGLE(TexCoord3fv) -#define glTexCoord3hNV MANGLE(TexCoord3hNV) -#define glTexCoord3hvNV MANGLE(TexCoord3hvNV) -#define glTexCoord3i MANGLE(TexCoord3i) -#define glTexCoord3iv MANGLE(TexCoord3iv) -#define glTexCoord3s MANGLE(TexCoord3s) -#define glTexCoord3sv MANGLE(TexCoord3sv) -#define glTexCoord4d MANGLE(TexCoord4d) -#define glTexCoord4dv MANGLE(TexCoord4dv) -#define glTexCoord4fColor4fNormal3fVertex4fSUN MANGLE(TexCoord4fColor4fNormal3fVertex4fSUN) -#define glTexCoord4fColor4fNormal3fVertex4fvSUN MANGLE(TexCoord4fColor4fNormal3fVertex4fvSUN) -#define glTexCoord4f MANGLE(TexCoord4f) -#define glTexCoord4fVertex4fSUN MANGLE(TexCoord4fVertex4fSUN) -#define glTexCoord4fVertex4fvSUN MANGLE(TexCoord4fVertex4fvSUN) -#define glTexCoord4fv MANGLE(TexCoord4fv) -#define glTexCoord4hNV MANGLE(TexCoord4hNV) -#define glTexCoord4hvNV MANGLE(TexCoord4hvNV) -#define glTexCoord4i MANGLE(TexCoord4i) -#define glTexCoord4iv MANGLE(TexCoord4iv) -#define glTexCoord4s MANGLE(TexCoord4s) -#define glTexCoord4sv MANGLE(TexCoord4sv) -#define glTexCoordPointerEXT MANGLE(TexCoordPointerEXT) -#define glTexCoordPointerListIBM MANGLE(TexCoordPointerListIBM) -#define glTexCoordPointer MANGLE(TexCoordPointer) -#define glTexCoordPointervINTEL MANGLE(TexCoordPointervINTEL) -#define glTexEnvf MANGLE(TexEnvf) -#define glTexEnvfv MANGLE(TexEnvfv) -#define glTexEnvi MANGLE(TexEnvi) -#define glTexEnviv MANGLE(TexEnviv) -#define glTexFilterFuncSGIS MANGLE(TexFilterFuncSGIS) -#define glTexGend MANGLE(TexGend) -#define glTexGendv MANGLE(TexGendv) -#define glTexGenf MANGLE(TexGenf) -#define glTexGenfv MANGLE(TexGenfv) -#define glTexGeni MANGLE(TexGeni) -#define glTexGeniv MANGLE(TexGeniv) -#define glTexImage1D MANGLE(TexImage1D) -#define glTexImage2D MANGLE(TexImage2D) -#define glTexImage3DEXT MANGLE(TexImage3DEXT) -#define glTexImage3D MANGLE(TexImage3D) -#define glTexImage4DSGIS MANGLE(TexImage4DSGIS) -#define glTexParameterf MANGLE(TexParameterf) -#define glTexParameterfv MANGLE(TexParameterfv) -#define glTexParameteri MANGLE(TexParameteri) -#define glTexParameteriv MANGLE(TexParameteriv) -#define glTexSubImage1DEXT MANGLE(TexSubImage1DEXT) -#define glTexSubImage1D MANGLE(TexSubImage1D) -#define glTexSubImage2DEXT MANGLE(TexSubImage2DEXT) -#define glTexSubImage2D MANGLE(TexSubImage2D) -#define glTexSubImage3DEXT MANGLE(TexSubImage3DEXT) -#define glTexSubImage3D MANGLE(TexSubImage3D) -#define glTexSubImage4DSGIS MANGLE(TexSubImage4DSGIS) -#define glTextureColorMaskSGIS MANGLE(TextureColorMaskSGIS) -#define glTextureLightEXT MANGLE(TextureLightEXT) -#define glTextureMaterialEXT MANGLE(TextureMaterialEXT) -#define glTextureNormalEXT MANGLE(TextureNormalEXT) -#define glTraceAssertAttribMESA MANGLE(TraceAssertAttribMESA) -#define glTraceCommentMESA MANGLE(TraceCommentMESA) -#define glTraceListMESA MANGLE(TraceListMESA) -#define glTracePointerMESA MANGLE(TracePointerMESA) -#define glTracePointerRangeMESA MANGLE(TracePointerRangeMESA) -#define glTraceTextureMESA MANGLE(TraceTextureMESA) -#define glTrackMatrixNV MANGLE(TrackMatrixNV) -#define glTranslated MANGLE(Translated) -#define glTranslatef MANGLE(Translatef) -#define glUniform1fARB MANGLE(Uniform1fARB) -#define glUniform1f MANGLE(Uniform1f) -#define glUniform1fvARB MANGLE(Uniform1fvARB) -#define glUniform1fv MANGLE(Uniform1fv) -#define glUniform1iARB MANGLE(Uniform1iARB) -#define glUniform1i MANGLE(Uniform1i) -#define glUniform1ivARB MANGLE(Uniform1ivARB) -#define glUniform1iv MANGLE(Uniform1iv) -#define glUniform2fARB MANGLE(Uniform2fARB) -#define glUniform2f MANGLE(Uniform2f) -#define glUniform2fvARB MANGLE(Uniform2fvARB) -#define glUniform2fv MANGLE(Uniform2fv) -#define glUniform2iARB MANGLE(Uniform2iARB) -#define glUniform2i MANGLE(Uniform2i) -#define glUniform2ivARB MANGLE(Uniform2ivARB) -#define glUniform2iv MANGLE(Uniform2iv) -#define glUniform3fARB MANGLE(Uniform3fARB) -#define glUniform3f MANGLE(Uniform3f) -#define glUniform3fvARB MANGLE(Uniform3fvARB) -#define glUniform3fv MANGLE(Uniform3fv) -#define glUniform3iARB MANGLE(Uniform3iARB) -#define glUniform3i MANGLE(Uniform3i) -#define glUniform3ivARB MANGLE(Uniform3ivARB) -#define glUniform3iv MANGLE(Uniform3iv) -#define glUniform4fARB MANGLE(Uniform4fARB) -#define glUniform4f MANGLE(Uniform4f) -#define glUniform4fvARB MANGLE(Uniform4fvARB) -#define glUniform4fv MANGLE(Uniform4fv) -#define glUniform4iARB MANGLE(Uniform4iARB) -#define glUniform4i MANGLE(Uniform4i) -#define glUniform4ivARB MANGLE(Uniform4ivARB) -#define glUniform4iv MANGLE(Uniform4iv) -#define glUniformMatrix2fvARB MANGLE(UniformMatrix2fvARB) -#define glUniformMatrix2fv MANGLE(UniformMatrix2fv) -#define glUniformMatrix3fvARB MANGLE(UniformMatrix3fvARB) -#define glUniformMatrix3fv MANGLE(UniformMatrix3fv) -#define glUniformMatrix4fvARB MANGLE(UniformMatrix4fvARB) -#define glUniformMatrix4fv MANGLE(UniformMatrix4fv) -#define glUnlockArraysEXT MANGLE(UnlockArraysEXT) -#define glUnmapBufferARB MANGLE(UnmapBufferARB) -#define glUnmapBuffer MANGLE(UnmapBuffer) -#define glUnmapObjectBufferATI MANGLE(UnmapObjectBufferATI) -#define glUpdateObjectBufferATI MANGLE(UpdateObjectBufferATI) -#define glUseProgram MANGLE(UseProgram) -#define glUseProgramObjectARB MANGLE(UseProgramObjectARB) -#define glValidateProgramARB MANGLE(ValidateProgramARB) -#define glValidateProgram MANGLE(ValidateProgram) -#define glVariantArrayObjectATI MANGLE(VariantArrayObjectATI) -#define glVariantbvEXT MANGLE(VariantbvEXT) -#define glVariantdvEXT MANGLE(VariantdvEXT) -#define glVariantfvEXT MANGLE(VariantfvEXT) -#define glVariantivEXT MANGLE(VariantivEXT) -#define glVariantPointerEXT MANGLE(VariantPointerEXT) -#define glVariantsvEXT MANGLE(VariantsvEXT) -#define glVariantubvEXT MANGLE(VariantubvEXT) -#define glVariantuivEXT MANGLE(VariantuivEXT) -#define glVariantusvEXT MANGLE(VariantusvEXT) -#define glVertex2d MANGLE(Vertex2d) -#define glVertex2dv MANGLE(Vertex2dv) -#define glVertex2f MANGLE(Vertex2f) -#define glVertex2fv MANGLE(Vertex2fv) -#define glVertex2hNV MANGLE(Vertex2hNV) -#define glVertex2hvNV MANGLE(Vertex2hvNV) -#define glVertex2i MANGLE(Vertex2i) -#define glVertex2iv MANGLE(Vertex2iv) -#define glVertex2s MANGLE(Vertex2s) -#define glVertex2sv MANGLE(Vertex2sv) -#define glVertex3d MANGLE(Vertex3d) -#define glVertex3dv MANGLE(Vertex3dv) -#define glVertex3f MANGLE(Vertex3f) -#define glVertex3fv MANGLE(Vertex3fv) -#define glVertex3hNV MANGLE(Vertex3hNV) -#define glVertex3hvNV MANGLE(Vertex3hvNV) -#define glVertex3i MANGLE(Vertex3i) -#define glVertex3iv MANGLE(Vertex3iv) -#define glVertex3s MANGLE(Vertex3s) -#define glVertex3sv MANGLE(Vertex3sv) -#define glVertex4d MANGLE(Vertex4d) -#define glVertex4dv MANGLE(Vertex4dv) -#define glVertex4f MANGLE(Vertex4f) -#define glVertex4fv MANGLE(Vertex4fv) -#define glVertex4hNV MANGLE(Vertex4hNV) -#define glVertex4hvNV MANGLE(Vertex4hvNV) -#define glVertex4i MANGLE(Vertex4i) -#define glVertex4iv MANGLE(Vertex4iv) -#define glVertex4s MANGLE(Vertex4s) -#define glVertex4sv MANGLE(Vertex4sv) -#define glVertexArrayParameteriAPPLE MANGLE(VertexArrayParameteriAPPLE) -#define glVertexArrayRangeAPPLE MANGLE(VertexArrayRangeAPPLE) -#define glVertexArrayRangeNV MANGLE(VertexArrayRangeNV) -#define glVertexAttrib1dARB MANGLE(VertexAttrib1dARB) -#define glVertexAttrib1d MANGLE(VertexAttrib1d) -#define glVertexAttrib1dNV MANGLE(VertexAttrib1dNV) -#define glVertexAttrib1dvARB MANGLE(VertexAttrib1dvARB) -#define glVertexAttrib1dv MANGLE(VertexAttrib1dv) -#define glVertexAttrib1dvNV MANGLE(VertexAttrib1dvNV) -#define glVertexAttrib1fARB MANGLE(VertexAttrib1fARB) -#define glVertexAttrib1f MANGLE(VertexAttrib1f) -#define glVertexAttrib1fNV MANGLE(VertexAttrib1fNV) -#define glVertexAttrib1fvARB MANGLE(VertexAttrib1fvARB) -#define glVertexAttrib1fv MANGLE(VertexAttrib1fv) -#define glVertexAttrib1fvNV MANGLE(VertexAttrib1fvNV) -#define glVertexAttrib1hNV MANGLE(VertexAttrib1hNV) -#define glVertexAttrib1hvNV MANGLE(VertexAttrib1hvNV) -#define glVertexAttrib1sARB MANGLE(VertexAttrib1sARB) -#define glVertexAttrib1s MANGLE(VertexAttrib1s) -#define glVertexAttrib1sNV MANGLE(VertexAttrib1sNV) -#define glVertexAttrib1svARB MANGLE(VertexAttrib1svARB) -#define glVertexAttrib1sv MANGLE(VertexAttrib1sv) -#define glVertexAttrib1svNV MANGLE(VertexAttrib1svNV) -#define glVertexAttrib2dARB MANGLE(VertexAttrib2dARB) -#define glVertexAttrib2d MANGLE(VertexAttrib2d) -#define glVertexAttrib2dNV MANGLE(VertexAttrib2dNV) -#define glVertexAttrib2dvARB MANGLE(VertexAttrib2dvARB) -#define glVertexAttrib2dv MANGLE(VertexAttrib2dv) -#define glVertexAttrib2dvNV MANGLE(VertexAttrib2dvNV) -#define glVertexAttrib2fARB MANGLE(VertexAttrib2fARB) -#define glVertexAttrib2f MANGLE(VertexAttrib2f) -#define glVertexAttrib2fNV MANGLE(VertexAttrib2fNV) -#define glVertexAttrib2fvARB MANGLE(VertexAttrib2fvARB) -#define glVertexAttrib2fv MANGLE(VertexAttrib2fv) -#define glVertexAttrib2fvNV MANGLE(VertexAttrib2fvNV) -#define glVertexAttrib2hNV MANGLE(VertexAttrib2hNV) -#define glVertexAttrib2hvNV MANGLE(VertexAttrib2hvNV) -#define glVertexAttrib2sARB MANGLE(VertexAttrib2sARB) -#define glVertexAttrib2s MANGLE(VertexAttrib2s) -#define glVertexAttrib2sNV MANGLE(VertexAttrib2sNV) -#define glVertexAttrib2svARB MANGLE(VertexAttrib2svARB) -#define glVertexAttrib2sv MANGLE(VertexAttrib2sv) -#define glVertexAttrib2svNV MANGLE(VertexAttrib2svNV) -#define glVertexAttrib3dARB MANGLE(VertexAttrib3dARB) -#define glVertexAttrib3d MANGLE(VertexAttrib3d) -#define glVertexAttrib3dNV MANGLE(VertexAttrib3dNV) -#define glVertexAttrib3dvARB MANGLE(VertexAttrib3dvARB) -#define glVertexAttrib3dv MANGLE(VertexAttrib3dv) -#define glVertexAttrib3dvNV MANGLE(VertexAttrib3dvNV) -#define glVertexAttrib3fARB MANGLE(VertexAttrib3fARB) -#define glVertexAttrib3f MANGLE(VertexAttrib3f) -#define glVertexAttrib3fNV MANGLE(VertexAttrib3fNV) -#define glVertexAttrib3fvARB MANGLE(VertexAttrib3fvARB) -#define glVertexAttrib3fv MANGLE(VertexAttrib3fv) -#define glVertexAttrib3fvNV MANGLE(VertexAttrib3fvNV) -#define glVertexAttrib3hNV MANGLE(VertexAttrib3hNV) -#define glVertexAttrib3hvNV MANGLE(VertexAttrib3hvNV) -#define glVertexAttrib3sARB MANGLE(VertexAttrib3sARB) -#define glVertexAttrib3s MANGLE(VertexAttrib3s) -#define glVertexAttrib3sNV MANGLE(VertexAttrib3sNV) -#define glVertexAttrib3svARB MANGLE(VertexAttrib3svARB) -#define glVertexAttrib3sv MANGLE(VertexAttrib3sv) -#define glVertexAttrib3svNV MANGLE(VertexAttrib3svNV) -#define glVertexAttrib4bvARB MANGLE(VertexAttrib4bvARB) -#define glVertexAttrib4bv MANGLE(VertexAttrib4bv) -#define glVertexAttrib4dARB MANGLE(VertexAttrib4dARB) -#define glVertexAttrib4d MANGLE(VertexAttrib4d) -#define glVertexAttrib4dNV MANGLE(VertexAttrib4dNV) -#define glVertexAttrib4dvARB MANGLE(VertexAttrib4dvARB) -#define glVertexAttrib4dv MANGLE(VertexAttrib4dv) -#define glVertexAttrib4dvNV MANGLE(VertexAttrib4dvNV) -#define glVertexAttrib4fARB MANGLE(VertexAttrib4fARB) -#define glVertexAttrib4f MANGLE(VertexAttrib4f) -#define glVertexAttrib4fNV MANGLE(VertexAttrib4fNV) -#define glVertexAttrib4fvARB MANGLE(VertexAttrib4fvARB) -#define glVertexAttrib4fv MANGLE(VertexAttrib4fv) -#define glVertexAttrib4fvNV MANGLE(VertexAttrib4fvNV) -#define glVertexAttrib4hNV MANGLE(VertexAttrib4hNV) -#define glVertexAttrib4hvNV MANGLE(VertexAttrib4hvNV) -#define glVertexAttrib4ivARB MANGLE(VertexAttrib4ivARB) -#define glVertexAttrib4iv MANGLE(VertexAttrib4iv) -#define glVertexAttrib4NbvARB MANGLE(VertexAttrib4NbvARB) -#define glVertexAttrib4Nbv MANGLE(VertexAttrib4Nbv) -#define glVertexAttrib4NivARB MANGLE(VertexAttrib4NivARB) -#define glVertexAttrib4Niv MANGLE(VertexAttrib4Niv) -#define glVertexAttrib4NsvARB MANGLE(VertexAttrib4NsvARB) -#define glVertexAttrib4Nsv MANGLE(VertexAttrib4Nsv) -#define glVertexAttrib4NubARB MANGLE(VertexAttrib4NubARB) -#define glVertexAttrib4Nub MANGLE(VertexAttrib4Nub) -#define glVertexAttrib4NubvARB MANGLE(VertexAttrib4NubvARB) -#define glVertexAttrib4Nubv MANGLE(VertexAttrib4Nubv) -#define glVertexAttrib4NuivARB MANGLE(VertexAttrib4NuivARB) -#define glVertexAttrib4Nuiv MANGLE(VertexAttrib4Nuiv) -#define glVertexAttrib4NusvARB MANGLE(VertexAttrib4NusvARB) -#define glVertexAttrib4Nusv MANGLE(VertexAttrib4Nusv) -#define glVertexAttrib4sARB MANGLE(VertexAttrib4sARB) -#define glVertexAttrib4s MANGLE(VertexAttrib4s) -#define glVertexAttrib4sNV MANGLE(VertexAttrib4sNV) -#define glVertexAttrib4svARB MANGLE(VertexAttrib4svARB) -#define glVertexAttrib4sv MANGLE(VertexAttrib4sv) -#define glVertexAttrib4svNV MANGLE(VertexAttrib4svNV) -#define glVertexAttrib4ubNV MANGLE(VertexAttrib4ubNV) -#define glVertexAttrib4ubvARB MANGLE(VertexAttrib4ubvARB) -#define glVertexAttrib4ubv MANGLE(VertexAttrib4ubv) -#define glVertexAttrib4ubvNV MANGLE(VertexAttrib4ubvNV) -#define glVertexAttrib4uivARB MANGLE(VertexAttrib4uivARB) -#define glVertexAttrib4uiv MANGLE(VertexAttrib4uiv) -#define glVertexAttrib4usvARB MANGLE(VertexAttrib4usvARB) -#define glVertexAttrib4usv MANGLE(VertexAttrib4usv) -#define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI) -#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB) -#define glVertexAttribPointer MANGLE(VertexAttribPointer) -#define glVertexAttribPointerNV MANGLE(VertexAttribPointerNV) -#define glVertexAttribs1dvNV MANGLE(VertexAttribs1dvNV) -#define glVertexAttribs1fvNV MANGLE(VertexAttribs1fvNV) -#define glVertexAttribs1hvNV MANGLE(VertexAttribs1hvNV) -#define glVertexAttribs1svNV MANGLE(VertexAttribs1svNV) -#define glVertexAttribs2dvNV MANGLE(VertexAttribs2dvNV) -#define glVertexAttribs2fvNV MANGLE(VertexAttribs2fvNV) -#define glVertexAttribs2hvNV MANGLE(VertexAttribs2hvNV) -#define glVertexAttribs2svNV MANGLE(VertexAttribs2svNV) -#define glVertexAttribs3dvNV MANGLE(VertexAttribs3dvNV) -#define glVertexAttribs3fvNV MANGLE(VertexAttribs3fvNV) -#define glVertexAttribs3hvNV MANGLE(VertexAttribs3hvNV) -#define glVertexAttribs3svNV MANGLE(VertexAttribs3svNV) -#define glVertexAttribs4dvNV MANGLE(VertexAttribs4dvNV) -#define glVertexAttribs4fvNV MANGLE(VertexAttribs4fvNV) -#define glVertexAttribs4hvNV MANGLE(VertexAttribs4hvNV) -#define glVertexAttribs4svNV MANGLE(VertexAttribs4svNV) -#define glVertexAttribs4ubvNV MANGLE(VertexAttribs4ubvNV) -#define glVertexBlendARB MANGLE(VertexBlendARB) -#define glVertexBlendEnvfATI MANGLE(VertexBlendEnvfATI) -#define glVertexBlendEnviATI MANGLE(VertexBlendEnviATI) -#define glVertexPointerEXT MANGLE(VertexPointerEXT) -#define glVertexPointerListIBM MANGLE(VertexPointerListIBM) -#define glVertexPointer MANGLE(VertexPointer) -#define glVertexPointervINTEL MANGLE(VertexPointervINTEL) -#define glVertexStream1dATI MANGLE(VertexStream1dATI) -#define glVertexStream1dvATI MANGLE(VertexStream1dvATI) -#define glVertexStream1fATI MANGLE(VertexStream1fATI) -#define glVertexStream1fvATI MANGLE(VertexStream1fvATI) -#define glVertexStream1iATI MANGLE(VertexStream1iATI) -#define glVertexStream1ivATI MANGLE(VertexStream1ivATI) -#define glVertexStream1sATI MANGLE(VertexStream1sATI) -#define glVertexStream1svATI MANGLE(VertexStream1svATI) -#define glVertexStream2dATI MANGLE(VertexStream2dATI) -#define glVertexStream2dvATI MANGLE(VertexStream2dvATI) -#define glVertexStream2fATI MANGLE(VertexStream2fATI) -#define glVertexStream2fvATI MANGLE(VertexStream2fvATI) -#define glVertexStream2iATI MANGLE(VertexStream2iATI) -#define glVertexStream2ivATI MANGLE(VertexStream2ivATI) -#define glVertexStream2sATI MANGLE(VertexStream2sATI) -#define glVertexStream2svATI MANGLE(VertexStream2svATI) -#define glVertexStream3dATI MANGLE(VertexStream3dATI) -#define glVertexStream3dvATI MANGLE(VertexStream3dvATI) -#define glVertexStream3fATI MANGLE(VertexStream3fATI) -#define glVertexStream3fvATI MANGLE(VertexStream3fvATI) -#define glVertexStream3iATI MANGLE(VertexStream3iATI) -#define glVertexStream3ivATI MANGLE(VertexStream3ivATI) -#define glVertexStream3sATI MANGLE(VertexStream3sATI) -#define glVertexStream3svATI MANGLE(VertexStream3svATI) -#define glVertexStream4dATI MANGLE(VertexStream4dATI) -#define glVertexStream4dvATI MANGLE(VertexStream4dvATI) -#define glVertexStream4fATI MANGLE(VertexStream4fATI) -#define glVertexStream4fvATI MANGLE(VertexStream4fvATI) -#define glVertexStream4iATI MANGLE(VertexStream4iATI) -#define glVertexStream4ivATI MANGLE(VertexStream4ivATI) -#define glVertexStream4sATI MANGLE(VertexStream4sATI) -#define glVertexStream4svATI MANGLE(VertexStream4svATI) -#define glVertexWeightfEXT MANGLE(VertexWeightfEXT) -#define glVertexWeightfvEXT MANGLE(VertexWeightfvEXT) -#define glVertexWeighthNV MANGLE(VertexWeighthNV) -#define glVertexWeighthvNV MANGLE(VertexWeighthvNV) -#define glVertexWeightPointerEXT MANGLE(VertexWeightPointerEXT) -#define glViewport MANGLE(Viewport) -#define glWeightbvARB MANGLE(WeightbvARB) -#define glWeightdvARB MANGLE(WeightdvARB) -#define glWeightfvARB MANGLE(WeightfvARB) -#define glWeightivARB MANGLE(WeightivARB) -#define glWeightPointerARB MANGLE(WeightPointerARB) -#define glWeightsvARB MANGLE(WeightsvARB) -#define glWeightubvARB MANGLE(WeightubvARB) -#define glWeightuivARB MANGLE(WeightuivARB) -#define glWeightusvARB MANGLE(WeightusvARB) -#define glWindowPos2dARB MANGLE(WindowPos2dARB) -#define glWindowPos2d MANGLE(WindowPos2d) -#define glWindowPos2dMESA MANGLE(WindowPos2dMESA) -#define glWindowPos2dvARB MANGLE(WindowPos2dvARB) -#define glWindowPos2dv MANGLE(WindowPos2dv) -#define glWindowPos2dvMESA MANGLE(WindowPos2dvMESA) -#define glWindowPos2fARB MANGLE(WindowPos2fARB) -#define glWindowPos2f MANGLE(WindowPos2f) -#define glWindowPos2fMESA MANGLE(WindowPos2fMESA) -#define glWindowPos2fvARB MANGLE(WindowPos2fvARB) -#define glWindowPos2fv MANGLE(WindowPos2fv) -#define glWindowPos2fvMESA MANGLE(WindowPos2fvMESA) -#define glWindowPos2iARB MANGLE(WindowPos2iARB) -#define glWindowPos2i MANGLE(WindowPos2i) -#define glWindowPos2iMESA MANGLE(WindowPos2iMESA) -#define glWindowPos2ivARB MANGLE(WindowPos2ivARB) -#define glWindowPos2iv MANGLE(WindowPos2iv) -#define glWindowPos2ivMESA MANGLE(WindowPos2ivMESA) -#define glWindowPos2sARB MANGLE(WindowPos2sARB) -#define glWindowPos2s MANGLE(WindowPos2s) -#define glWindowPos2sMESA MANGLE(WindowPos2sMESA) -#define glWindowPos2svARB MANGLE(WindowPos2svARB) -#define glWindowPos2sv MANGLE(WindowPos2sv) -#define glWindowPos2svMESA MANGLE(WindowPos2svMESA) -#define glWindowPos3dARB MANGLE(WindowPos3dARB) -#define glWindowPos3d MANGLE(WindowPos3d) -#define glWindowPos3dMESA MANGLE(WindowPos3dMESA) -#define glWindowPos3dvARB MANGLE(WindowPos3dvARB) -#define glWindowPos3dv MANGLE(WindowPos3dv) -#define glWindowPos3dvMESA MANGLE(WindowPos3dvMESA) -#define glWindowPos3fARB MANGLE(WindowPos3fARB) -#define glWindowPos3f MANGLE(WindowPos3f) -#define glWindowPos3fMESA MANGLE(WindowPos3fMESA) -#define glWindowPos3fvARB MANGLE(WindowPos3fvARB) -#define glWindowPos3fv MANGLE(WindowPos3fv) -#define glWindowPos3fvMESA MANGLE(WindowPos3fvMESA) -#define glWindowPos3iARB MANGLE(WindowPos3iARB) -#define glWindowPos3i MANGLE(WindowPos3i) -#define glWindowPos3iMESA MANGLE(WindowPos3iMESA) -#define glWindowPos3ivARB MANGLE(WindowPos3ivARB) -#define glWindowPos3iv MANGLE(WindowPos3iv) -#define glWindowPos3ivMESA MANGLE(WindowPos3ivMESA) -#define glWindowPos3sARB MANGLE(WindowPos3sARB) -#define glWindowPos3s MANGLE(WindowPos3s) -#define glWindowPos3sMESA MANGLE(WindowPos3sMESA) -#define glWindowPos3svARB MANGLE(WindowPos3svARB) -#define glWindowPos3sv MANGLE(WindowPos3sv) -#define glWindowPos3svMESA MANGLE(WindowPos3svMESA) -#define glWindowPos4dMESA MANGLE(WindowPos4dMESA) -#define glWindowPos4dvMESA MANGLE(WindowPos4dvMESA) -#define glWindowPos4fMESA MANGLE(WindowPos4fMESA) -#define glWindowPos4fvMESA MANGLE(WindowPos4fvMESA) -#define glWindowPos4iMESA MANGLE(WindowPos4iMESA) -#define glWindowPos4ivMESA MANGLE(WindowPos4ivMESA) -#define glWindowPos4sMESA MANGLE(WindowPos4sMESA) -#define glWindowPos4svMESA MANGLE(WindowPos4svMESA) -#define glWriteMaskEXT MANGLE(WriteMaskEXT) - -#endif /* GL_MANGLE_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/glext.h b/nx-X11/extras/Mesa_6.4.2/include/GL/glext.h deleted file mode 100644 index 7bb8e6e7cc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/glext.h +++ /dev/null @@ -1,6495 +0,0 @@ -#ifndef __glext_h_ -#define __glext_h_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: This software was created using the -** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has -** not been independently verified as being compliant with the OpenGL(R) -** version 1.2.1 Specification. -*/ - -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -#define WIN32_LEAN_AND_MEAN 1 -#include -#endif - -#ifndef APIENTRY -#define APIENTRY -#endif -#ifndef APIENTRYP -#define APIENTRYP APIENTRY * -#endif -#ifndef GLAPI -#define GLAPI extern -#endif - -/*************************************************************/ - -/* Header file version number, required by OpenGL ABI for Linux */ -/* glext.h last updated 2005/06/20 */ -/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */ -#define GL_GLEXT_VERSION 29 - -#ifndef GL_VERSION_1_2 -#define GL_UNSIGNED_BYTE_3_3_2 0x8032 -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_INT_8_8_8_8 0x8035 -#define GL_UNSIGNED_INT_10_10_10_2 0x8036 -#define GL_RESCALE_NORMAL 0x803A -#define GL_TEXTURE_BINDING_3D 0x806A -#define GL_PACK_SKIP_IMAGES 0x806B -#define GL_PACK_IMAGE_HEIGHT 0x806C -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_TEXTURE_3D 0x806F -#define GL_PROXY_TEXTURE_3D 0x8070 -#define GL_TEXTURE_DEPTH 0x8071 -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 -#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_BGR 0x80E0 -#define GL_BGRA 0x80E1 -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 -#define GL_SINGLE_COLOR 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR 0x81FA -#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 -#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 -#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#endif - -#ifndef GL_ARB_imaging -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 -#define GL_FUNC_ADD 0x8006 -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_BLEND_EQUATION 0x8009 -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_CONVOLUTION_1D 0x8010 -#define GL_CONVOLUTION_2D 0x8011 -#define GL_SEPARABLE_2D 0x8012 -#define GL_CONVOLUTION_BORDER_MODE 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS 0x8015 -#define GL_REDUCE 0x8016 -#define GL_CONVOLUTION_FORMAT 0x8017 -#define GL_CONVOLUTION_WIDTH 0x8018 -#define GL_CONVOLUTION_HEIGHT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH 0x801A -#define GL_MAX_CONVOLUTION_HEIGHT 0x801B -#define GL_POST_CONVOLUTION_RED_SCALE 0x801C -#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D -#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E -#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F -#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 -#define GL_HISTOGRAM 0x8024 -#define GL_PROXY_HISTOGRAM 0x8025 -#define GL_HISTOGRAM_WIDTH 0x8026 -#define GL_HISTOGRAM_FORMAT 0x8027 -#define GL_HISTOGRAM_RED_SIZE 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE 0x802A -#define GL_HISTOGRAM_ALPHA_SIZE 0x802B -#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C -#define GL_HISTOGRAM_SINK 0x802D -#define GL_MINMAX 0x802E -#define GL_MINMAX_FORMAT 0x802F -#define GL_MINMAX_SINK 0x8030 -#define GL_TABLE_TOO_LARGE 0x8031 -#define GL_COLOR_MATRIX 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 -#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 -#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB -#define GL_COLOR_TABLE 0x80D0 -#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 -#define GL_PROXY_COLOR_TABLE 0x80D3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 -#define GL_COLOR_TABLE_SCALE 0x80D6 -#define GL_COLOR_TABLE_BIAS 0x80D7 -#define GL_COLOR_TABLE_FORMAT 0x80D8 -#define GL_COLOR_TABLE_WIDTH 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF -#define GL_CONSTANT_BORDER 0x8151 -#define GL_REPLICATE_BORDER 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR 0x8154 -#endif - -#ifndef GL_VERSION_1_3 -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 -#define GL_MAX_TEXTURE_UNITS 0x84E2 -#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 -#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 -#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 -#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 -#define GL_MULTISAMPLE 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE 0x809F -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_MULTISAMPLE_BIT 0x20000000 -#define GL_NORMAL_MAP 0x8511 -#define GL_REFLECTION_MAP 0x8512 -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -#define GL_COMPRESSED_ALPHA 0x84E9 -#define GL_COMPRESSED_LUMINANCE 0x84EA -#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB -#define GL_COMPRESSED_INTENSITY 0x84EC -#define GL_COMPRESSED_RGB 0x84ED -#define GL_COMPRESSED_RGBA 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 -#define GL_TEXTURE_COMPRESSED 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -#define GL_CLAMP_TO_BORDER 0x812D -#define GL_COMBINE 0x8570 -#define GL_COMBINE_RGB 0x8571 -#define GL_COMBINE_ALPHA 0x8572 -#define GL_SOURCE0_RGB 0x8580 -#define GL_SOURCE1_RGB 0x8581 -#define GL_SOURCE2_RGB 0x8582 -#define GL_SOURCE0_ALPHA 0x8588 -#define GL_SOURCE1_ALPHA 0x8589 -#define GL_SOURCE2_ALPHA 0x858A -#define GL_OPERAND0_RGB 0x8590 -#define GL_OPERAND1_RGB 0x8591 -#define GL_OPERAND2_RGB 0x8592 -#define GL_OPERAND0_ALPHA 0x8598 -#define GL_OPERAND1_ALPHA 0x8599 -#define GL_OPERAND2_ALPHA 0x859A -#define GL_RGB_SCALE 0x8573 -#define GL_ADD_SIGNED 0x8574 -#define GL_INTERPOLATE 0x8575 -#define GL_SUBTRACT 0x84E7 -#define GL_CONSTANT 0x8576 -#define GL_PRIMARY_COLOR 0x8577 -#define GL_PREVIOUS 0x8578 -#define GL_DOT3_RGB 0x86AE -#define GL_DOT3_RGBA 0x86AF -#endif - -#ifndef GL_VERSION_1_4 -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_POINT_SIZE_MIN 0x8126 -#define GL_POINT_SIZE_MAX 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 -#define GL_POINT_DISTANCE_ATTENUATION 0x8129 -#define GL_GENERATE_MIPMAP 0x8191 -#define GL_GENERATE_MIPMAP_HINT 0x8192 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_DEPTH_COMPONENT24 0x81A6 -#define GL_DEPTH_COMPONENT32 0x81A7 -#define GL_MIRRORED_REPEAT 0x8370 -#define GL_FOG_COORDINATE_SOURCE 0x8450 -#define GL_FOG_COORDINATE 0x8451 -#define GL_FRAGMENT_DEPTH 0x8452 -#define GL_CURRENT_FOG_COORDINATE 0x8453 -#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 -#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 -#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 -#define GL_FOG_COORDINATE_ARRAY 0x8457 -#define GL_COLOR_SUM 0x8458 -#define GL_CURRENT_SECONDARY_COLOR 0x8459 -#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A -#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B -#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C -#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D -#define GL_SECONDARY_COLOR_ARRAY 0x845E -#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD -#define GL_TEXTURE_FILTER_CONTROL 0x8500 -#define GL_TEXTURE_LOD_BIAS 0x8501 -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 -#define GL_TEXTURE_DEPTH_SIZE 0x884A -#define GL_DEPTH_TEXTURE_MODE 0x884B -#define GL_TEXTURE_COMPARE_MODE 0x884C -#define GL_TEXTURE_COMPARE_FUNC 0x884D -#define GL_COMPARE_R_TO_TEXTURE 0x884E -#endif - -#ifndef GL_VERSION_1_5 -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 -#define GL_QUERY_COUNTER_BITS 0x8864 -#define GL_CURRENT_QUERY 0x8865 -#define GL_QUERY_RESULT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 -#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 -#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 -#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 -#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A -#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B -#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C -#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D -#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F -#define GL_READ_ONLY 0x88B8 -#define GL_WRITE_ONLY 0x88B9 -#define GL_READ_WRITE 0x88BA -#define GL_BUFFER_ACCESS 0x88BB -#define GL_BUFFER_MAPPED 0x88BC -#define GL_BUFFER_MAP_POINTER 0x88BD -#define GL_STREAM_DRAW 0x88E0 -#define GL_STREAM_READ 0x88E1 -#define GL_STREAM_COPY 0x88E2 -#define GL_STATIC_DRAW 0x88E4 -#define GL_STATIC_READ 0x88E5 -#define GL_STATIC_COPY 0x88E6 -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_DYNAMIC_READ 0x88E9 -#define GL_DYNAMIC_COPY 0x88EA -#define GL_SAMPLES_PASSED 0x8914 -#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE -#define GL_FOG_COORD GL_FOG_COORDINATE -#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE -#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE -#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE -#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER -#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY -#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING -#define GL_SRC0_RGB GL_SOURCE0_RGB -#define GL_SRC1_RGB GL_SOURCE1_RGB -#define GL_SRC2_RGB GL_SOURCE2_RGB -#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA -#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA -#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA -#endif - -#ifndef GL_VERSION_2_0 -#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 -#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_MAX_DRAW_BUFFERS 0x8824 -#define GL_DRAW_BUFFER0 0x8825 -#define GL_DRAW_BUFFER1 0x8826 -#define GL_DRAW_BUFFER2 0x8827 -#define GL_DRAW_BUFFER3 0x8828 -#define GL_DRAW_BUFFER4 0x8829 -#define GL_DRAW_BUFFER5 0x882A -#define GL_DRAW_BUFFER6 0x882B -#define GL_DRAW_BUFFER7 0x882C -#define GL_DRAW_BUFFER8 0x882D -#define GL_DRAW_BUFFER9 0x882E -#define GL_DRAW_BUFFER10 0x882F -#define GL_DRAW_BUFFER11 0x8830 -#define GL_DRAW_BUFFER12 0x8831 -#define GL_DRAW_BUFFER13 0x8832 -#define GL_DRAW_BUFFER14 0x8833 -#define GL_DRAW_BUFFER15 0x8834 -#define GL_BLEND_EQUATION_ALPHA 0x883D -#define GL_POINT_SPRITE 0x8861 -#define GL_COORD_REPLACE 0x8862 -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_MAX_TEXTURE_COORDS 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A -#define GL_MAX_VARYING_FLOATS 0x8B4B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_SHADER_TYPE 0x8B4F -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_1D 0x8B5D -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_3D 0x8B5F -#define GL_SAMPLER_CUBE 0x8B60 -#define GL_SAMPLER_1D_SHADOW 0x8B61 -#define GL_SAMPLER_2D_SHADOW 0x8B62 -#define GL_DELETE_STATUS 0x8B80 -#define GL_COMPILE_STATUS 0x8B81 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D -#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 -#define GL_LOWER_LEFT 0x8CA1 -#define GL_UPPER_LEFT 0x8CA2 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#endif - -#ifndef GL_ARB_multitexture -#define GL_TEXTURE0_ARB 0x84C0 -#define GL_TEXTURE1_ARB 0x84C1 -#define GL_TEXTURE2_ARB 0x84C2 -#define GL_TEXTURE3_ARB 0x84C3 -#define GL_TEXTURE4_ARB 0x84C4 -#define GL_TEXTURE5_ARB 0x84C5 -#define GL_TEXTURE6_ARB 0x84C6 -#define GL_TEXTURE7_ARB 0x84C7 -#define GL_TEXTURE8_ARB 0x84C8 -#define GL_TEXTURE9_ARB 0x84C9 -#define GL_TEXTURE10_ARB 0x84CA -#define GL_TEXTURE11_ARB 0x84CB -#define GL_TEXTURE12_ARB 0x84CC -#define GL_TEXTURE13_ARB 0x84CD -#define GL_TEXTURE14_ARB 0x84CE -#define GL_TEXTURE15_ARB 0x84CF -#define GL_TEXTURE16_ARB 0x84D0 -#define GL_TEXTURE17_ARB 0x84D1 -#define GL_TEXTURE18_ARB 0x84D2 -#define GL_TEXTURE19_ARB 0x84D3 -#define GL_TEXTURE20_ARB 0x84D4 -#define GL_TEXTURE21_ARB 0x84D5 -#define GL_TEXTURE22_ARB 0x84D6 -#define GL_TEXTURE23_ARB 0x84D7 -#define GL_TEXTURE24_ARB 0x84D8 -#define GL_TEXTURE25_ARB 0x84D9 -#define GL_TEXTURE26_ARB 0x84DA -#define GL_TEXTURE27_ARB 0x84DB -#define GL_TEXTURE28_ARB 0x84DC -#define GL_TEXTURE29_ARB 0x84DD -#define GL_TEXTURE30_ARB 0x84DE -#define GL_TEXTURE31_ARB 0x84DF -#define GL_ACTIVE_TEXTURE_ARB 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 -#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 -#endif - -#ifndef GL_ARB_transpose_matrix -#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 -#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 -#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 -#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 -#endif - -#ifndef GL_ARB_multisample -#define GL_MULTISAMPLE_ARB 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F -#define GL_SAMPLE_COVERAGE_ARB 0x80A0 -#define GL_SAMPLE_BUFFERS_ARB 0x80A8 -#define GL_SAMPLES_ARB 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB -#define GL_MULTISAMPLE_BIT_ARB 0x20000000 -#endif - -#ifndef GL_ARB_texture_env_add -#endif - -#ifndef GL_ARB_texture_cube_map -#define GL_NORMAL_MAP_ARB 0x8511 -#define GL_REFLECTION_MAP_ARB 0x8512 -#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C -#endif - -#ifndef GL_ARB_texture_compression -#define GL_COMPRESSED_ALPHA_ARB 0x84E9 -#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA -#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB -#define GL_COMPRESSED_INTENSITY_ARB 0x84EC -#define GL_COMPRESSED_RGB_ARB 0x84ED -#define GL_COMPRESSED_RGBA_ARB 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 -#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 -#endif - -#ifndef GL_ARB_texture_border_clamp -#define GL_CLAMP_TO_BORDER_ARB 0x812D -#endif - -#ifndef GL_ARB_point_parameters -#define GL_POINT_SIZE_MIN_ARB 0x8126 -#define GL_POINT_SIZE_MAX_ARB 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 -#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 -#endif - -#ifndef GL_ARB_vertex_blend -#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 -#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 -#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 -#define GL_VERTEX_BLEND_ARB 0x86A7 -#define GL_CURRENT_WEIGHT_ARB 0x86A8 -#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 -#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA -#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB -#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC -#define GL_WEIGHT_ARRAY_ARB 0x86AD -#define GL_MODELVIEW0_ARB 0x1700 -#define GL_MODELVIEW1_ARB 0x850A -#define GL_MODELVIEW2_ARB 0x8722 -#define GL_MODELVIEW3_ARB 0x8723 -#define GL_MODELVIEW4_ARB 0x8724 -#define GL_MODELVIEW5_ARB 0x8725 -#define GL_MODELVIEW6_ARB 0x8726 -#define GL_MODELVIEW7_ARB 0x8727 -#define GL_MODELVIEW8_ARB 0x8728 -#define GL_MODELVIEW9_ARB 0x8729 -#define GL_MODELVIEW10_ARB 0x872A -#define GL_MODELVIEW11_ARB 0x872B -#define GL_MODELVIEW12_ARB 0x872C -#define GL_MODELVIEW13_ARB 0x872D -#define GL_MODELVIEW14_ARB 0x872E -#define GL_MODELVIEW15_ARB 0x872F -#define GL_MODELVIEW16_ARB 0x8730 -#define GL_MODELVIEW17_ARB 0x8731 -#define GL_MODELVIEW18_ARB 0x8732 -#define GL_MODELVIEW19_ARB 0x8733 -#define GL_MODELVIEW20_ARB 0x8734 -#define GL_MODELVIEW21_ARB 0x8735 -#define GL_MODELVIEW22_ARB 0x8736 -#define GL_MODELVIEW23_ARB 0x8737 -#define GL_MODELVIEW24_ARB 0x8738 -#define GL_MODELVIEW25_ARB 0x8739 -#define GL_MODELVIEW26_ARB 0x873A -#define GL_MODELVIEW27_ARB 0x873B -#define GL_MODELVIEW28_ARB 0x873C -#define GL_MODELVIEW29_ARB 0x873D -#define GL_MODELVIEW30_ARB 0x873E -#define GL_MODELVIEW31_ARB 0x873F -#endif - -#ifndef GL_ARB_matrix_palette -#define GL_MATRIX_PALETTE_ARB 0x8840 -#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 -#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 -#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 -#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 -#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 -#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 -#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 -#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 -#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 -#endif - -#ifndef GL_ARB_texture_env_combine -#define GL_COMBINE_ARB 0x8570 -#define GL_COMBINE_RGB_ARB 0x8571 -#define GL_COMBINE_ALPHA_ARB 0x8572 -#define GL_SOURCE0_RGB_ARB 0x8580 -#define GL_SOURCE1_RGB_ARB 0x8581 -#define GL_SOURCE2_RGB_ARB 0x8582 -#define GL_SOURCE0_ALPHA_ARB 0x8588 -#define GL_SOURCE1_ALPHA_ARB 0x8589 -#define GL_SOURCE2_ALPHA_ARB 0x858A -#define GL_OPERAND0_RGB_ARB 0x8590 -#define GL_OPERAND1_RGB_ARB 0x8591 -#define GL_OPERAND2_RGB_ARB 0x8592 -#define GL_OPERAND0_ALPHA_ARB 0x8598 -#define GL_OPERAND1_ALPHA_ARB 0x8599 -#define GL_OPERAND2_ALPHA_ARB 0x859A -#define GL_RGB_SCALE_ARB 0x8573 -#define GL_ADD_SIGNED_ARB 0x8574 -#define GL_INTERPOLATE_ARB 0x8575 -#define GL_SUBTRACT_ARB 0x84E7 -#define GL_CONSTANT_ARB 0x8576 -#define GL_PRIMARY_COLOR_ARB 0x8577 -#define GL_PREVIOUS_ARB 0x8578 -#endif - -#ifndef GL_ARB_texture_env_crossbar -#endif - -#ifndef GL_ARB_texture_env_dot3 -#define GL_DOT3_RGB_ARB 0x86AE -#define GL_DOT3_RGBA_ARB 0x86AF -#endif - -#ifndef GL_ARB_texture_mirrored_repeat -#define GL_MIRRORED_REPEAT_ARB 0x8370 -#endif - -#ifndef GL_ARB_depth_texture -#define GL_DEPTH_COMPONENT16_ARB 0x81A5 -#define GL_DEPTH_COMPONENT24_ARB 0x81A6 -#define GL_DEPTH_COMPONENT32_ARB 0x81A7 -#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A -#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B -#endif - -#ifndef GL_ARB_shadow -#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C -#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D -#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E -#endif - -#ifndef GL_ARB_shadow_ambient -#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF -#endif - -#ifndef GL_ARB_window_pos -#endif - -#ifndef GL_ARB_vertex_program -#define GL_COLOR_SUM_ARB 0x8458 -#define GL_VERTEX_PROGRAM_ARB 0x8620 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 -#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 -#define GL_PROGRAM_LENGTH_ARB 0x8627 -#define GL_PROGRAM_STRING_ARB 0x8628 -#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E -#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F -#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 -#define GL_CURRENT_MATRIX_ARB 0x8641 -#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 -#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B -#define GL_PROGRAM_BINDING_ARB 0x8677 -#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A -#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 -#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 -#define GL_PROGRAM_FORMAT_ARB 0x8876 -#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 -#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 -#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 -#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 -#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 -#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 -#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 -#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 -#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 -#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 -#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA -#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB -#define GL_PROGRAM_ATTRIBS_ARB 0x88AC -#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD -#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE -#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF -#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 -#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 -#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 -#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 -#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 -#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 -#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 -#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 -#define GL_MATRIX0_ARB 0x88C0 -#define GL_MATRIX1_ARB 0x88C1 -#define GL_MATRIX2_ARB 0x88C2 -#define GL_MATRIX3_ARB 0x88C3 -#define GL_MATRIX4_ARB 0x88C4 -#define GL_MATRIX5_ARB 0x88C5 -#define GL_MATRIX6_ARB 0x88C6 -#define GL_MATRIX7_ARB 0x88C7 -#define GL_MATRIX8_ARB 0x88C8 -#define GL_MATRIX9_ARB 0x88C9 -#define GL_MATRIX10_ARB 0x88CA -#define GL_MATRIX11_ARB 0x88CB -#define GL_MATRIX12_ARB 0x88CC -#define GL_MATRIX13_ARB 0x88CD -#define GL_MATRIX14_ARB 0x88CE -#define GL_MATRIX15_ARB 0x88CF -#define GL_MATRIX16_ARB 0x88D0 -#define GL_MATRIX17_ARB 0x88D1 -#define GL_MATRIX18_ARB 0x88D2 -#define GL_MATRIX19_ARB 0x88D3 -#define GL_MATRIX20_ARB 0x88D4 -#define GL_MATRIX21_ARB 0x88D5 -#define GL_MATRIX22_ARB 0x88D6 -#define GL_MATRIX23_ARB 0x88D7 -#define GL_MATRIX24_ARB 0x88D8 -#define GL_MATRIX25_ARB 0x88D9 -#define GL_MATRIX26_ARB 0x88DA -#define GL_MATRIX27_ARB 0x88DB -#define GL_MATRIX28_ARB 0x88DC -#define GL_MATRIX29_ARB 0x88DD -#define GL_MATRIX30_ARB 0x88DE -#define GL_MATRIX31_ARB 0x88DF -#endif - -#ifndef GL_ARB_fragment_program -#define GL_FRAGMENT_PROGRAM_ARB 0x8804 -#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 -#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 -#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 -#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 -#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 -#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A -#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B -#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C -#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D -#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E -#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F -#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 -#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 -#endif - -#ifndef GL_ARB_vertex_buffer_object -#define GL_BUFFER_SIZE_ARB 0x8764 -#define GL_BUFFER_USAGE_ARB 0x8765 -#define GL_ARRAY_BUFFER_ARB 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 -#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 -#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 -#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 -#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 -#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 -#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A -#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B -#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C -#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D -#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F -#define GL_READ_ONLY_ARB 0x88B8 -#define GL_WRITE_ONLY_ARB 0x88B9 -#define GL_READ_WRITE_ARB 0x88BA -#define GL_BUFFER_ACCESS_ARB 0x88BB -#define GL_BUFFER_MAPPED_ARB 0x88BC -#define GL_BUFFER_MAP_POINTER_ARB 0x88BD -#define GL_STREAM_DRAW_ARB 0x88E0 -#define GL_STREAM_READ_ARB 0x88E1 -#define GL_STREAM_COPY_ARB 0x88E2 -#define GL_STATIC_DRAW_ARB 0x88E4 -#define GL_STATIC_READ_ARB 0x88E5 -#define GL_STATIC_COPY_ARB 0x88E6 -#define GL_DYNAMIC_DRAW_ARB 0x88E8 -#define GL_DYNAMIC_READ_ARB 0x88E9 -#define GL_DYNAMIC_COPY_ARB 0x88EA -#endif - -#ifndef GL_ARB_occlusion_query -#define GL_QUERY_COUNTER_BITS_ARB 0x8864 -#define GL_CURRENT_QUERY_ARB 0x8865 -#define GL_QUERY_RESULT_ARB 0x8866 -#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 -#define GL_SAMPLES_PASSED_ARB 0x8914 -#endif - -#ifndef GL_ARB_shader_objects -#define GL_PROGRAM_OBJECT_ARB 0x8B40 -#define GL_SHADER_OBJECT_ARB 0x8B48 -#define GL_OBJECT_TYPE_ARB 0x8B4E -#define GL_OBJECT_SUBTYPE_ARB 0x8B4F -#define GL_FLOAT_VEC2_ARB 0x8B50 -#define GL_FLOAT_VEC3_ARB 0x8B51 -#define GL_FLOAT_VEC4_ARB 0x8B52 -#define GL_INT_VEC2_ARB 0x8B53 -#define GL_INT_VEC3_ARB 0x8B54 -#define GL_INT_VEC4_ARB 0x8B55 -#define GL_BOOL_ARB 0x8B56 -#define GL_BOOL_VEC2_ARB 0x8B57 -#define GL_BOOL_VEC3_ARB 0x8B58 -#define GL_BOOL_VEC4_ARB 0x8B59 -#define GL_FLOAT_MAT2_ARB 0x8B5A -#define GL_FLOAT_MAT3_ARB 0x8B5B -#define GL_FLOAT_MAT4_ARB 0x8B5C -#define GL_SAMPLER_1D_ARB 0x8B5D -#define GL_SAMPLER_2D_ARB 0x8B5E -#define GL_SAMPLER_3D_ARB 0x8B5F -#define GL_SAMPLER_CUBE_ARB 0x8B60 -#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 -#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 -#define GL_SAMPLER_2D_RECT_ARB 0x8B63 -#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 -#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 -#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 -#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 -#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 -#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 -#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 -#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 -#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 -#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 -#endif - -#ifndef GL_ARB_vertex_shader -#define GL_VERTEX_SHADER_ARB 0x8B31 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A -#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D -#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 -#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A -#endif - -#ifndef GL_ARB_fragment_shader -#define GL_FRAGMENT_SHADER_ARB 0x8B30 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B -#endif - -#ifndef GL_ARB_shading_language_100 -#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C -#endif - -#ifndef GL_ARB_texture_non_power_of_two -#endif - -#ifndef GL_ARB_point_sprite -#define GL_POINT_SPRITE_ARB 0x8861 -#define GL_COORD_REPLACE_ARB 0x8862 -#endif - -#ifndef GL_ARB_fragment_program_shadow -#endif - -#ifndef GL_ARB_draw_buffers -#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 -#define GL_DRAW_BUFFER0_ARB 0x8825 -#define GL_DRAW_BUFFER1_ARB 0x8826 -#define GL_DRAW_BUFFER2_ARB 0x8827 -#define GL_DRAW_BUFFER3_ARB 0x8828 -#define GL_DRAW_BUFFER4_ARB 0x8829 -#define GL_DRAW_BUFFER5_ARB 0x882A -#define GL_DRAW_BUFFER6_ARB 0x882B -#define GL_DRAW_BUFFER7_ARB 0x882C -#define GL_DRAW_BUFFER8_ARB 0x882D -#define GL_DRAW_BUFFER9_ARB 0x882E -#define GL_DRAW_BUFFER10_ARB 0x882F -#define GL_DRAW_BUFFER11_ARB 0x8830 -#define GL_DRAW_BUFFER12_ARB 0x8831 -#define GL_DRAW_BUFFER13_ARB 0x8832 -#define GL_DRAW_BUFFER14_ARB 0x8833 -#define GL_DRAW_BUFFER15_ARB 0x8834 -#endif - -#ifndef GL_ARB_texture_rectangle -#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 -#endif - -#ifndef GL_ARB_color_buffer_float -#define GL_RGBA_FLOAT_MODE_ARB 0x8820 -#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A -#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B -#define GL_CLAMP_READ_COLOR_ARB 0x891C -#define GL_FIXED_ONLY_ARB 0x891D -#endif - -#ifndef GL_ARB_half_float_pixel -#define GL_HALF_FLOAT_ARB 0x140B -#endif - -#ifndef GL_ARB_texture_float -#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 -#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 -#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 -#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 -#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 -#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 -#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 -#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 -#define GL_RGBA32F_ARB 0x8814 -#define GL_RGB32F_ARB 0x8815 -#define GL_ALPHA32F_ARB 0x8816 -#define GL_INTENSITY32F_ARB 0x8817 -#define GL_LUMINANCE32F_ARB 0x8818 -#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 -#define GL_RGBA16F_ARB 0x881A -#define GL_RGB16F_ARB 0x881B -#define GL_ALPHA16F_ARB 0x881C -#define GL_INTENSITY16F_ARB 0x881D -#define GL_LUMINANCE16F_ARB 0x881E -#define GL_LUMINANCE_ALPHA16F_ARB 0x881F -#endif - -#ifndef GL_ARB_pixel_buffer_object -#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB -#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF -#endif - -#ifndef GL_EXT_abgr -#define GL_ABGR_EXT 0x8000 -#endif - -#ifndef GL_EXT_blend_color -#define GL_CONSTANT_COLOR_EXT 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 -#define GL_CONSTANT_ALPHA_EXT 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 -#define GL_BLEND_COLOR_EXT 0x8005 -#endif - -#ifndef GL_EXT_polygon_offset -#define GL_POLYGON_OFFSET_EXT 0x8037 -#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 -#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 -#endif - -#ifndef GL_EXT_texture -#define GL_ALPHA4_EXT 0x803B -#define GL_ALPHA8_EXT 0x803C -#define GL_ALPHA12_EXT 0x803D -#define GL_ALPHA16_EXT 0x803E -#define GL_LUMINANCE4_EXT 0x803F -#define GL_LUMINANCE8_EXT 0x8040 -#define GL_LUMINANCE12_EXT 0x8041 -#define GL_LUMINANCE16_EXT 0x8042 -#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 -#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 -#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 -#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 -#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 -#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 -#define GL_INTENSITY_EXT 0x8049 -#define GL_INTENSITY4_EXT 0x804A -#define GL_INTENSITY8_EXT 0x804B -#define GL_INTENSITY12_EXT 0x804C -#define GL_INTENSITY16_EXT 0x804D -#define GL_RGB2_EXT 0x804E -#define GL_RGB4_EXT 0x804F -#define GL_RGB5_EXT 0x8050 -#define GL_RGB8_EXT 0x8051 -#define GL_RGB10_EXT 0x8052 -#define GL_RGB12_EXT 0x8053 -#define GL_RGB16_EXT 0x8054 -#define GL_RGBA2_EXT 0x8055 -#define GL_RGBA4_EXT 0x8056 -#define GL_RGB5_A1_EXT 0x8057 -#define GL_RGBA8_EXT 0x8058 -#define GL_RGB10_A2_EXT 0x8059 -#define GL_RGBA12_EXT 0x805A -#define GL_RGBA16_EXT 0x805B -#define GL_TEXTURE_RED_SIZE_EXT 0x805C -#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D -#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E -#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F -#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 -#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 -#define GL_REPLACE_EXT 0x8062 -#define GL_PROXY_TEXTURE_1D_EXT 0x8063 -#define GL_PROXY_TEXTURE_2D_EXT 0x8064 -#define GL_TEXTURE_TOO_LARGE_EXT 0x8065 -#endif - -#ifndef GL_EXT_texture3D -#define GL_PACK_SKIP_IMAGES_EXT 0x806B -#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C -#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D -#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E -#define GL_TEXTURE_3D_EXT 0x806F -#define GL_PROXY_TEXTURE_3D_EXT 0x8070 -#define GL_TEXTURE_DEPTH_EXT 0x8071 -#define GL_TEXTURE_WRAP_R_EXT 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 -#endif - -#ifndef GL_SGIS_texture_filter4 -#define GL_FILTER4_SGIS 0x8146 -#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 -#endif - -#ifndef GL_EXT_subtexture -#endif - -#ifndef GL_EXT_copy_texture -#endif - -#ifndef GL_EXT_histogram -#define GL_HISTOGRAM_EXT 0x8024 -#define GL_PROXY_HISTOGRAM_EXT 0x8025 -#define GL_HISTOGRAM_WIDTH_EXT 0x8026 -#define GL_HISTOGRAM_FORMAT_EXT 0x8027 -#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A -#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B -#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C -#define GL_HISTOGRAM_SINK_EXT 0x802D -#define GL_MINMAX_EXT 0x802E -#define GL_MINMAX_FORMAT_EXT 0x802F -#define GL_MINMAX_SINK_EXT 0x8030 -#define GL_TABLE_TOO_LARGE_EXT 0x8031 -#endif - -#ifndef GL_EXT_convolution -#define GL_CONVOLUTION_1D_EXT 0x8010 -#define GL_CONVOLUTION_2D_EXT 0x8011 -#define GL_SEPARABLE_2D_EXT 0x8012 -#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 -#define GL_REDUCE_EXT 0x8016 -#define GL_CONVOLUTION_FORMAT_EXT 0x8017 -#define GL_CONVOLUTION_WIDTH_EXT 0x8018 -#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A -#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B -#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C -#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D -#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E -#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F -#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 -#endif - -#ifndef GL_SGI_color_matrix -#define GL_COLOR_MATRIX_SGI 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 -#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 -#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB -#endif - -#ifndef GL_SGI_color_table -#define GL_COLOR_TABLE_SGI 0x80D0 -#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 -#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 -#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 -#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 -#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 -#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF -#endif - -#ifndef GL_SGIS_pixel_texture -#define GL_PIXEL_TEXTURE_SGIS 0x8353 -#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 -#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 -#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 -#endif - -#ifndef GL_SGIX_pixel_texture -#define GL_PIXEL_TEX_GEN_SGIX 0x8139 -#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B -#endif - -#ifndef GL_SGIS_texture4D -#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 -#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 -#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 -#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 -#define GL_TEXTURE_4D_SGIS 0x8134 -#define GL_PROXY_TEXTURE_4D_SGIS 0x8135 -#define GL_TEXTURE_4DSIZE_SGIS 0x8136 -#define GL_TEXTURE_WRAP_Q_SGIS 0x8137 -#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 -#define GL_TEXTURE_4D_BINDING_SGIS 0x814F -#endif - -#ifndef GL_SGI_texture_color_table -#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC -#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD -#endif - -#ifndef GL_EXT_cmyka -#define GL_CMYK_EXT 0x800C -#define GL_CMYKA_EXT 0x800D -#define GL_PACK_CMYK_HINT_EXT 0x800E -#define GL_UNPACK_CMYK_HINT_EXT 0x800F -#endif - -#ifndef GL_EXT_texture_object -#define GL_TEXTURE_PRIORITY_EXT 0x8066 -#define GL_TEXTURE_RESIDENT_EXT 0x8067 -#define GL_TEXTURE_1D_BINDING_EXT 0x8068 -#define GL_TEXTURE_2D_BINDING_EXT 0x8069 -#define GL_TEXTURE_3D_BINDING_EXT 0x806A -#endif - -#ifndef GL_SGIS_detail_texture -#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 -#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 -#define GL_LINEAR_DETAIL_SGIS 0x8097 -#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 -#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 -#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A -#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B -#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C -#endif - -#ifndef GL_SGIS_sharpen_texture -#define GL_LINEAR_SHARPEN_SGIS 0x80AD -#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE -#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF -#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 -#endif - -#ifndef GL_EXT_packed_pixels -#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 -#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 -#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 -#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 -#endif - -#ifndef GL_SGIS_texture_lod -#define GL_TEXTURE_MIN_LOD_SGIS 0x813A -#define GL_TEXTURE_MAX_LOD_SGIS 0x813B -#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C -#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D -#endif - -#ifndef GL_SGIS_multisample -#define GL_MULTISAMPLE_SGIS 0x809D -#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F -#define GL_SAMPLE_MASK_SGIS 0x80A0 -#define GL_1PASS_SGIS 0x80A1 -#define GL_2PASS_0_SGIS 0x80A2 -#define GL_2PASS_1_SGIS 0x80A3 -#define GL_4PASS_0_SGIS 0x80A4 -#define GL_4PASS_1_SGIS 0x80A5 -#define GL_4PASS_2_SGIS 0x80A6 -#define GL_4PASS_3_SGIS 0x80A7 -#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 -#define GL_SAMPLES_SGIS 0x80A9 -#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA -#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB -#define GL_SAMPLE_PATTERN_SGIS 0x80AC -#endif - -#ifndef GL_EXT_rescale_normal -#define GL_RESCALE_NORMAL_EXT 0x803A -#endif - -#ifndef GL_EXT_vertex_array -#define GL_VERTEX_ARRAY_EXT 0x8074 -#define GL_NORMAL_ARRAY_EXT 0x8075 -#define GL_COLOR_ARRAY_EXT 0x8076 -#define GL_INDEX_ARRAY_EXT 0x8077 -#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 -#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 -#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A -#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B -#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C -#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D -#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E -#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F -#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 -#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 -#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 -#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 -#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 -#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 -#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 -#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 -#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 -#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 -#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A -#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B -#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C -#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D -#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E -#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F -#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 -#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 -#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 -#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 -#endif - -#ifndef GL_EXT_misc_attribute -#endif - -#ifndef GL_SGIS_generate_mipmap -#define GL_GENERATE_MIPMAP_SGIS 0x8191 -#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 -#endif - -#ifndef GL_SGIX_clipmap -#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 -#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 -#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 -#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 -#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 -#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 -#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 -#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 -#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 -#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D -#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E -#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F -#endif - -#ifndef GL_SGIX_shadow -#define GL_TEXTURE_COMPARE_SGIX 0x819A -#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B -#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C -#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D -#endif - -#ifndef GL_SGIS_texture_edge_clamp -#define GL_CLAMP_TO_EDGE_SGIS 0x812F -#endif - -#ifndef GL_SGIS_texture_border_clamp -#define GL_CLAMP_TO_BORDER_SGIS 0x812D -#endif - -#ifndef GL_EXT_blend_minmax -#define GL_FUNC_ADD_EXT 0x8006 -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 -#define GL_BLEND_EQUATION_EXT 0x8009 -#endif - -#ifndef GL_EXT_blend_subtract -#define GL_FUNC_SUBTRACT_EXT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B -#endif - -#ifndef GL_EXT_blend_logic_op -#endif - -#ifndef GL_SGIX_interlace -#define GL_INTERLACE_SGIX 0x8094 -#endif - -#ifndef GL_SGIX_pixel_tiles -#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E -#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F -#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 -#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 -#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 -#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 -#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 -#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 -#endif - -#ifndef GL_SGIS_texture_select -#define GL_DUAL_ALPHA4_SGIS 0x8110 -#define GL_DUAL_ALPHA8_SGIS 0x8111 -#define GL_DUAL_ALPHA12_SGIS 0x8112 -#define GL_DUAL_ALPHA16_SGIS 0x8113 -#define GL_DUAL_LUMINANCE4_SGIS 0x8114 -#define GL_DUAL_LUMINANCE8_SGIS 0x8115 -#define GL_DUAL_LUMINANCE12_SGIS 0x8116 -#define GL_DUAL_LUMINANCE16_SGIS 0x8117 -#define GL_DUAL_INTENSITY4_SGIS 0x8118 -#define GL_DUAL_INTENSITY8_SGIS 0x8119 -#define GL_DUAL_INTENSITY12_SGIS 0x811A -#define GL_DUAL_INTENSITY16_SGIS 0x811B -#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C -#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D -#define GL_QUAD_ALPHA4_SGIS 0x811E -#define GL_QUAD_ALPHA8_SGIS 0x811F -#define GL_QUAD_LUMINANCE4_SGIS 0x8120 -#define GL_QUAD_LUMINANCE8_SGIS 0x8121 -#define GL_QUAD_INTENSITY4_SGIS 0x8122 -#define GL_QUAD_INTENSITY8_SGIS 0x8123 -#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 -#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 -#endif - -#ifndef GL_SGIX_sprite -#define GL_SPRITE_SGIX 0x8148 -#define GL_SPRITE_MODE_SGIX 0x8149 -#define GL_SPRITE_AXIS_SGIX 0x814A -#define GL_SPRITE_TRANSLATION_SGIX 0x814B -#define GL_SPRITE_AXIAL_SGIX 0x814C -#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D -#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E -#endif - -#ifndef GL_SGIX_texture_multi_buffer -#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E -#endif - -#ifndef GL_EXT_point_parameters -#define GL_POINT_SIZE_MIN_EXT 0x8126 -#define GL_POINT_SIZE_MAX_EXT 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 -#define GL_DISTANCE_ATTENUATION_EXT 0x8129 -#endif - -#ifndef GL_SGIS_point_parameters -#define GL_POINT_SIZE_MIN_SGIS 0x8126 -#define GL_POINT_SIZE_MAX_SGIS 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 -#define GL_DISTANCE_ATTENUATION_SGIS 0x8129 -#endif - -#ifndef GL_SGIX_instruments -#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 -#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 -#endif - -#ifndef GL_SGIX_texture_scale_bias -#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 -#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A -#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B -#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C -#endif - -#ifndef GL_SGIX_framezoom -#define GL_FRAMEZOOM_SGIX 0x818B -#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C -#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D -#endif - -#ifndef GL_SGIX_tag_sample_buffer -#endif - -#ifndef GL_FfdMaskSGIX -#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 -#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 -#endif - -#ifndef GL_SGIX_polynomial_ffd -#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 -#define GL_TEXTURE_DEFORMATION_SGIX 0x8195 -#define GL_DEFORMATIONS_MASK_SGIX 0x8196 -#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 -#endif - -#ifndef GL_SGIX_reference_plane -#define GL_REFERENCE_PLANE_SGIX 0x817D -#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E -#endif - -#ifndef GL_SGIX_flush_raster -#endif - -#ifndef GL_SGIX_depth_texture -#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 -#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 -#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 -#endif - -#ifndef GL_SGIS_fog_function -#define GL_FOG_FUNC_SGIS 0x812A -#define GL_FOG_FUNC_POINTS_SGIS 0x812B -#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C -#endif - -#ifndef GL_SGIX_fog_offset -#define GL_FOG_OFFSET_SGIX 0x8198 -#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 -#endif - -#ifndef GL_HP_image_transform -#define GL_IMAGE_SCALE_X_HP 0x8155 -#define GL_IMAGE_SCALE_Y_HP 0x8156 -#define GL_IMAGE_TRANSLATE_X_HP 0x8157 -#define GL_IMAGE_TRANSLATE_Y_HP 0x8158 -#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 -#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A -#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B -#define GL_IMAGE_MAG_FILTER_HP 0x815C -#define GL_IMAGE_MIN_FILTER_HP 0x815D -#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E -#define GL_CUBIC_HP 0x815F -#define GL_AVERAGE_HP 0x8160 -#define GL_IMAGE_TRANSFORM_2D_HP 0x8161 -#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 -#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 -#endif - -#ifndef GL_HP_convolution_border_modes -#define GL_IGNORE_BORDER_HP 0x8150 -#define GL_CONSTANT_BORDER_HP 0x8151 -#define GL_REPLICATE_BORDER_HP 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 -#endif - -#ifndef GL_INGR_palette_buffer -#endif - -#ifndef GL_SGIX_texture_add_env -#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE -#endif - -#ifndef GL_EXT_color_subtable -#endif - -#ifndef GL_PGI_vertex_hints -#define GL_VERTEX_DATA_HINT_PGI 0x1A22A -#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B -#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C -#define GL_MAX_VERTEX_HINT_PGI 0x1A22D -#define GL_COLOR3_BIT_PGI 0x00010000 -#define GL_COLOR4_BIT_PGI 0x00020000 -#define GL_EDGEFLAG_BIT_PGI 0x00040000 -#define GL_INDEX_BIT_PGI 0x00080000 -#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 -#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 -#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 -#define GL_MAT_EMISSION_BIT_PGI 0x00800000 -#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 -#define GL_MAT_SHININESS_BIT_PGI 0x02000000 -#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 -#define GL_NORMAL_BIT_PGI 0x08000000 -#define GL_TEXCOORD1_BIT_PGI 0x10000000 -#define GL_TEXCOORD2_BIT_PGI 0x20000000 -#define GL_TEXCOORD3_BIT_PGI 0x40000000 -#define GL_TEXCOORD4_BIT_PGI 0x80000000 -#define GL_VERTEX23_BIT_PGI 0x00000004 -#define GL_VERTEX4_BIT_PGI 0x00000008 -#endif - -#ifndef GL_PGI_misc_hints -#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 -#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD -#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE -#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 -#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 -#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 -#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C -#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D -#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E -#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F -#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 -#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 -#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 -#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 -#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 -#define GL_FULL_STIPPLE_HINT_PGI 0x1A219 -#define GL_CLIP_NEAR_HINT_PGI 0x1A220 -#define GL_CLIP_FAR_HINT_PGI 0x1A221 -#define GL_WIDE_LINE_HINT_PGI 0x1A222 -#define GL_BACK_NORMALS_HINT_PGI 0x1A223 -#endif - -#ifndef GL_EXT_paletted_texture -#define GL_COLOR_INDEX1_EXT 0x80E2 -#define GL_COLOR_INDEX2_EXT 0x80E3 -#define GL_COLOR_INDEX4_EXT 0x80E4 -#define GL_COLOR_INDEX8_EXT 0x80E5 -#define GL_COLOR_INDEX12_EXT 0x80E6 -#define GL_COLOR_INDEX16_EXT 0x80E7 -#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED -#endif - -#ifndef GL_EXT_clip_volume_hint -#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 -#endif - -#ifndef GL_SGIX_list_priority -#define GL_LIST_PRIORITY_SGIX 0x8182 -#endif - -#ifndef GL_SGIX_ir_instrument1 -#define GL_IR_INSTRUMENT1_SGIX 0x817F -#endif - -#ifndef GL_SGIX_calligraphic_fragment -#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 -#endif - -#ifndef GL_SGIX_texture_lod_bias -#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E -#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F -#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 -#endif - -#ifndef GL_SGIX_shadow_ambient -#define GL_SHADOW_AMBIENT_SGIX 0x80BF -#endif - -#ifndef GL_EXT_index_texture -#endif - -#ifndef GL_EXT_index_material -#define GL_INDEX_MATERIAL_EXT 0x81B8 -#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 -#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA -#endif - -#ifndef GL_EXT_index_func -#define GL_INDEX_TEST_EXT 0x81B5 -#define GL_INDEX_TEST_FUNC_EXT 0x81B6 -#define GL_INDEX_TEST_REF_EXT 0x81B7 -#endif - -#ifndef GL_EXT_index_array_formats -#define GL_IUI_V2F_EXT 0x81AD -#define GL_IUI_V3F_EXT 0x81AE -#define GL_IUI_N3F_V2F_EXT 0x81AF -#define GL_IUI_N3F_V3F_EXT 0x81B0 -#define GL_T2F_IUI_V2F_EXT 0x81B1 -#define GL_T2F_IUI_V3F_EXT 0x81B2 -#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 -#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 -#endif - -#ifndef GL_EXT_compiled_vertex_array -#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 -#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 -#endif - -#ifndef GL_EXT_cull_vertex -#define GL_CULL_VERTEX_EXT 0x81AA -#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB -#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC -#endif - -#ifndef GL_SGIX_ycrcb -#define GL_YCRCB_422_SGIX 0x81BB -#define GL_YCRCB_444_SGIX 0x81BC -#endif - -#ifndef GL_SGIX_fragment_lighting -#define GL_FRAGMENT_LIGHTING_SGIX 0x8400 -#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 -#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 -#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 -#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 -#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 -#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 -#define GL_LIGHT_ENV_MODE_SGIX 0x8407 -#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 -#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 -#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A -#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B -#define GL_FRAGMENT_LIGHT0_SGIX 0x840C -#define GL_FRAGMENT_LIGHT1_SGIX 0x840D -#define GL_FRAGMENT_LIGHT2_SGIX 0x840E -#define GL_FRAGMENT_LIGHT3_SGIX 0x840F -#define GL_FRAGMENT_LIGHT4_SGIX 0x8410 -#define GL_FRAGMENT_LIGHT5_SGIX 0x8411 -#define GL_FRAGMENT_LIGHT6_SGIX 0x8412 -#define GL_FRAGMENT_LIGHT7_SGIX 0x8413 -#endif - -#ifndef GL_IBM_rasterpos_clip -#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 -#endif - -#ifndef GL_HP_texture_lighting -#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 -#define GL_TEXTURE_POST_SPECULAR_HP 0x8168 -#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 -#endif - -#ifndef GL_EXT_draw_range_elements -#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 -#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 -#endif - -#ifndef GL_WIN_phong_shading -#define GL_PHONG_WIN 0x80EA -#define GL_PHONG_HINT_WIN 0x80EB -#endif - -#ifndef GL_WIN_specular_fog -#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC -#endif - -#ifndef GL_EXT_light_texture -#define GL_FRAGMENT_MATERIAL_EXT 0x8349 -#define GL_FRAGMENT_NORMAL_EXT 0x834A -#define GL_FRAGMENT_COLOR_EXT 0x834C -#define GL_ATTENUATION_EXT 0x834D -#define GL_SHADOW_ATTENUATION_EXT 0x834E -#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F -#define GL_TEXTURE_LIGHT_EXT 0x8350 -#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 -#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 -/* reuse GL_FRAGMENT_DEPTH_EXT */ -#endif - -#ifndef GL_SGIX_blend_alpha_minmax -#define GL_ALPHA_MIN_SGIX 0x8320 -#define GL_ALPHA_MAX_SGIX 0x8321 -#endif - -#ifndef GL_SGIX_impact_pixel_texture -#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184 -#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185 -#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186 -#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187 -#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188 -#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189 -#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A -#endif - -#ifndef GL_EXT_bgra -#define GL_BGR_EXT 0x80E0 -#define GL_BGRA_EXT 0x80E1 -#endif - -#ifndef GL_SGIX_async -#define GL_ASYNC_MARKER_SGIX 0x8329 -#endif - -#ifndef GL_SGIX_async_pixel -#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C -#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D -#define GL_ASYNC_READ_PIXELS_SGIX 0x835E -#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F -#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 -#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 -#endif - -#ifndef GL_SGIX_async_histogram -#define GL_ASYNC_HISTOGRAM_SGIX 0x832C -#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D -#endif - -#ifndef GL_INTEL_texture_scissor -#endif - -#ifndef GL_INTEL_parallel_arrays -#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 -#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 -#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 -#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 -#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 -#endif - -#ifndef GL_HP_occlusion_test -#define GL_OCCLUSION_TEST_HP 0x8165 -#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 -#endif - -#ifndef GL_EXT_pixel_transform -#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 -#define GL_PIXEL_MAG_FILTER_EXT 0x8331 -#define GL_PIXEL_MIN_FILTER_EXT 0x8332 -#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 -#define GL_CUBIC_EXT 0x8334 -#define GL_AVERAGE_EXT 0x8335 -#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 -#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 -#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 -#endif - -#ifndef GL_EXT_pixel_transform_color_table -#endif - -#ifndef GL_EXT_shared_texture_palette -#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB -#endif - -#ifndef GL_EXT_separate_specular_color -#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 -#define GL_SINGLE_COLOR_EXT 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA -#endif - -#ifndef GL_EXT_secondary_color -#define GL_COLOR_SUM_EXT 0x8458 -#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 -#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A -#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B -#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C -#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D -#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E -#endif - -#ifndef GL_EXT_texture_perturb_normal -#define GL_PERTURB_EXT 0x85AE -#define GL_TEXTURE_NORMAL_EXT 0x85AF -#endif - -#ifndef GL_EXT_multi_draw_arrays -#endif - -#ifndef GL_EXT_fog_coord -#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 -#define GL_FOG_COORDINATE_EXT 0x8451 -#define GL_FRAGMENT_DEPTH_EXT 0x8452 -#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 -#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 -#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 -#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 -#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 -#endif - -#ifndef GL_REND_screen_coordinates -#define GL_SCREEN_COORDINATES_REND 0x8490 -#define GL_INVERTED_SCREEN_W_REND 0x8491 -#endif - -#ifndef GL_EXT_coordinate_frame -#define GL_TANGENT_ARRAY_EXT 0x8439 -#define GL_BINORMAL_ARRAY_EXT 0x843A -#define GL_CURRENT_TANGENT_EXT 0x843B -#define GL_CURRENT_BINORMAL_EXT 0x843C -#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E -#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F -#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 -#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 -#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 -#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 -#define GL_MAP1_TANGENT_EXT 0x8444 -#define GL_MAP2_TANGENT_EXT 0x8445 -#define GL_MAP1_BINORMAL_EXT 0x8446 -#define GL_MAP2_BINORMAL_EXT 0x8447 -#endif - -#ifndef GL_EXT_texture_env_combine -#define GL_COMBINE_EXT 0x8570 -#define GL_COMBINE_RGB_EXT 0x8571 -#define GL_COMBINE_ALPHA_EXT 0x8572 -#define GL_RGB_SCALE_EXT 0x8573 -#define GL_ADD_SIGNED_EXT 0x8574 -#define GL_INTERPOLATE_EXT 0x8575 -#define GL_CONSTANT_EXT 0x8576 -#define GL_PRIMARY_COLOR_EXT 0x8577 -#define GL_PREVIOUS_EXT 0x8578 -#define GL_SOURCE0_RGB_EXT 0x8580 -#define GL_SOURCE1_RGB_EXT 0x8581 -#define GL_SOURCE2_RGB_EXT 0x8582 -#define GL_SOURCE0_ALPHA_EXT 0x8588 -#define GL_SOURCE1_ALPHA_EXT 0x8589 -#define GL_SOURCE2_ALPHA_EXT 0x858A -#define GL_OPERAND0_RGB_EXT 0x8590 -#define GL_OPERAND1_RGB_EXT 0x8591 -#define GL_OPERAND2_RGB_EXT 0x8592 -#define GL_OPERAND0_ALPHA_EXT 0x8598 -#define GL_OPERAND1_ALPHA_EXT 0x8599 -#define GL_OPERAND2_ALPHA_EXT 0x859A -#endif - -#ifndef GL_APPLE_specular_vector -#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 -#endif - -#ifndef GL_APPLE_transform_hint -#define GL_TRANSFORM_HINT_APPLE 0x85B1 -#endif - -#ifndef GL_SGIX_fog_scale -#define GL_FOG_SCALE_SGIX 0x81FC -#define GL_FOG_SCALE_VALUE_SGIX 0x81FD -#endif - -#ifndef GL_SUNX_constant_data -#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 -#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 -#endif - -#ifndef GL_SUN_global_alpha -#define GL_GLOBAL_ALPHA_SUN 0x81D9 -#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA -#endif - -#ifndef GL_SUN_triangle_list -#define GL_RESTART_SUN 0x0001 -#define GL_REPLACE_MIDDLE_SUN 0x0002 -#define GL_REPLACE_OLDEST_SUN 0x0003 -#define GL_TRIANGLE_LIST_SUN 0x81D7 -#define GL_REPLACEMENT_CODE_SUN 0x81D8 -#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 -#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 -#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 -#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 -#define GL_R1UI_V3F_SUN 0x85C4 -#define GL_R1UI_C4UB_V3F_SUN 0x85C5 -#define GL_R1UI_C3F_V3F_SUN 0x85C6 -#define GL_R1UI_N3F_V3F_SUN 0x85C7 -#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 -#define GL_R1UI_T2F_V3F_SUN 0x85C9 -#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA -#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB -#endif - -#ifndef GL_SUN_vertex -#endif - -#ifndef GL_EXT_blend_func_separate -#define GL_BLEND_DST_RGB_EXT 0x80C8 -#define GL_BLEND_SRC_RGB_EXT 0x80C9 -#define GL_BLEND_DST_ALPHA_EXT 0x80CA -#define GL_BLEND_SRC_ALPHA_EXT 0x80CB -#endif - -#ifndef GL_INGR_color_clamp -#define GL_RED_MIN_CLAMP_INGR 0x8560 -#define GL_GREEN_MIN_CLAMP_INGR 0x8561 -#define GL_BLUE_MIN_CLAMP_INGR 0x8562 -#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 -#define GL_RED_MAX_CLAMP_INGR 0x8564 -#define GL_GREEN_MAX_CLAMP_INGR 0x8565 -#define GL_BLUE_MAX_CLAMP_INGR 0x8566 -#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 -#endif - -#ifndef GL_INGR_interlace_read -#define GL_INTERLACE_READ_INGR 0x8568 -#endif - -#ifndef GL_EXT_stencil_wrap -#define GL_INCR_WRAP_EXT 0x8507 -#define GL_DECR_WRAP_EXT 0x8508 -#endif - -#ifndef GL_EXT_422_pixels -#define GL_422_EXT 0x80CC -#define GL_422_REV_EXT 0x80CD -#define GL_422_AVERAGE_EXT 0x80CE -#define GL_422_REV_AVERAGE_EXT 0x80CF -#endif - -#ifndef GL_NV_texgen_reflection -#define GL_NORMAL_MAP_NV 0x8511 -#define GL_REFLECTION_MAP_NV 0x8512 -#endif - -#ifndef GL_EXT_texture_cube_map -#define GL_NORMAL_MAP_EXT 0x8511 -#define GL_REFLECTION_MAP_EXT 0x8512 -#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C -#endif - -#ifndef GL_SUN_convolution_border_modes -#define GL_WRAP_BORDER_SUN 0x81D4 -#endif - -#ifndef GL_EXT_texture_env_add -#endif - -#ifndef GL_EXT_texture_lod_bias -#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD -#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 -#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 -#endif - -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF -#endif - -#ifndef GL_EXT_vertex_weighting -#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH -#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 -#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX -#define GL_MODELVIEW1_MATRIX_EXT 0x8506 -#define GL_VERTEX_WEIGHTING_EXT 0x8509 -#define GL_MODELVIEW0_EXT GL_MODELVIEW -#define GL_MODELVIEW1_EXT 0x850A -#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B -#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C -#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D -#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E -#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F -#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 -#endif - -#ifndef GL_NV_light_max_exponent -#define GL_MAX_SHININESS_NV 0x8504 -#define GL_MAX_SPOT_EXPONENT_NV 0x8505 -#endif - -#ifndef GL_NV_vertex_array_range -#define GL_VERTEX_ARRAY_RANGE_NV 0x851D -#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E -#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F -#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 -#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 -#endif - -#ifndef GL_NV_register_combiners -#define GL_REGISTER_COMBINERS_NV 0x8522 -#define GL_VARIABLE_A_NV 0x8523 -#define GL_VARIABLE_B_NV 0x8524 -#define GL_VARIABLE_C_NV 0x8525 -#define GL_VARIABLE_D_NV 0x8526 -#define GL_VARIABLE_E_NV 0x8527 -#define GL_VARIABLE_F_NV 0x8528 -#define GL_VARIABLE_G_NV 0x8529 -#define GL_CONSTANT_COLOR0_NV 0x852A -#define GL_CONSTANT_COLOR1_NV 0x852B -#define GL_PRIMARY_COLOR_NV 0x852C -#define GL_SECONDARY_COLOR_NV 0x852D -#define GL_SPARE0_NV 0x852E -#define GL_SPARE1_NV 0x852F -#define GL_DISCARD_NV 0x8530 -#define GL_E_TIMES_F_NV 0x8531 -#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 -#define GL_UNSIGNED_IDENTITY_NV 0x8536 -#define GL_UNSIGNED_INVERT_NV 0x8537 -#define GL_EXPAND_NORMAL_NV 0x8538 -#define GL_EXPAND_NEGATE_NV 0x8539 -#define GL_HALF_BIAS_NORMAL_NV 0x853A -#define GL_HALF_BIAS_NEGATE_NV 0x853B -#define GL_SIGNED_IDENTITY_NV 0x853C -#define GL_SIGNED_NEGATE_NV 0x853D -#define GL_SCALE_BY_TWO_NV 0x853E -#define GL_SCALE_BY_FOUR_NV 0x853F -#define GL_SCALE_BY_ONE_HALF_NV 0x8540 -#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 -#define GL_COMBINER_INPUT_NV 0x8542 -#define GL_COMBINER_MAPPING_NV 0x8543 -#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 -#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 -#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 -#define GL_COMBINER_MUX_SUM_NV 0x8547 -#define GL_COMBINER_SCALE_NV 0x8548 -#define GL_COMBINER_BIAS_NV 0x8549 -#define GL_COMBINER_AB_OUTPUT_NV 0x854A -#define GL_COMBINER_CD_OUTPUT_NV 0x854B -#define GL_COMBINER_SUM_OUTPUT_NV 0x854C -#define GL_MAX_GENERAL_COMBINERS_NV 0x854D -#define GL_NUM_GENERAL_COMBINERS_NV 0x854E -#define GL_COLOR_SUM_CLAMP_NV 0x854F -#define GL_COMBINER0_NV 0x8550 -#define GL_COMBINER1_NV 0x8551 -#define GL_COMBINER2_NV 0x8552 -#define GL_COMBINER3_NV 0x8553 -#define GL_COMBINER4_NV 0x8554 -#define GL_COMBINER5_NV 0x8555 -#define GL_COMBINER6_NV 0x8556 -#define GL_COMBINER7_NV 0x8557 -/* reuse GL_TEXTURE0_ARB */ -/* reuse GL_TEXTURE1_ARB */ -/* reuse GL_ZERO */ -/* reuse GL_NONE */ -/* reuse GL_FOG */ -#endif - -#ifndef GL_NV_fog_distance -#define GL_FOG_DISTANCE_MODE_NV 0x855A -#define GL_EYE_RADIAL_NV 0x855B -#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C -/* reuse GL_EYE_PLANE */ -#endif - -#ifndef GL_NV_texgen_emboss -#define GL_EMBOSS_LIGHT_NV 0x855D -#define GL_EMBOSS_CONSTANT_NV 0x855E -#define GL_EMBOSS_MAP_NV 0x855F -#endif - -#ifndef GL_NV_blend_square -#endif - -#ifndef GL_NV_texture_env_combine4 -#define GL_COMBINE4_NV 0x8503 -#define GL_SOURCE3_RGB_NV 0x8583 -#define GL_SOURCE3_ALPHA_NV 0x858B -#define GL_OPERAND3_RGB_NV 0x8593 -#define GL_OPERAND3_ALPHA_NV 0x859B -#endif - -#ifndef GL_MESA_resize_buffers -#endif - -#ifndef GL_MESA_window_pos -#endif - -#ifndef GL_EXT_texture_compression_s3tc -#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 -#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 -#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 -#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 -#endif - -#ifndef GL_IBM_cull_vertex -#define GL_CULL_VERTEX_IBM 103050 -#endif - -#ifndef GL_IBM_multimode_draw_arrays -#endif - -#ifndef GL_IBM_vertex_array_lists -#define GL_VERTEX_ARRAY_LIST_IBM 103070 -#define GL_NORMAL_ARRAY_LIST_IBM 103071 -#define GL_COLOR_ARRAY_LIST_IBM 103072 -#define GL_INDEX_ARRAY_LIST_IBM 103073 -#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 -#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 -#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 -#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 -#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 -#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 -#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 -#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 -#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 -#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 -#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 -#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 -#endif - -#ifndef GL_SGIX_subsample -#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 -#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 -#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 -#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 -#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 -#endif - -#ifndef GL_SGIX_ycrcb_subsample -#endif - -#ifndef GL_SGIX_ycrcba -#define GL_YCRCB_SGIX 0x8318 -#define GL_YCRCBA_SGIX 0x8319 -#endif - -#ifndef GL_SGI_depth_pass_instrument -#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310 -#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311 -#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312 -#endif - -#ifndef GL_3DFX_texture_compression_FXT1 -#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 -#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 -#endif - -#ifndef GL_3DFX_multisample -#define GL_MULTISAMPLE_3DFX 0x86B2 -#define GL_SAMPLE_BUFFERS_3DFX 0x86B3 -#define GL_SAMPLES_3DFX 0x86B4 -#define GL_MULTISAMPLE_BIT_3DFX 0x20000000 -#endif - -#ifndef GL_3DFX_tbuffer -#endif - -#ifndef GL_EXT_multisample -#define GL_MULTISAMPLE_EXT 0x809D -#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F -#define GL_SAMPLE_MASK_EXT 0x80A0 -#define GL_1PASS_EXT 0x80A1 -#define GL_2PASS_0_EXT 0x80A2 -#define GL_2PASS_1_EXT 0x80A3 -#define GL_4PASS_0_EXT 0x80A4 -#define GL_4PASS_1_EXT 0x80A5 -#define GL_4PASS_2_EXT 0x80A6 -#define GL_4PASS_3_EXT 0x80A7 -#define GL_SAMPLE_BUFFERS_EXT 0x80A8 -#define GL_SAMPLES_EXT 0x80A9 -#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA -#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB -#define GL_SAMPLE_PATTERN_EXT 0x80AC -#define GL_MULTISAMPLE_BIT_EXT 0x20000000 -#endif - -#ifndef GL_SGIX_vertex_preclip -#define GL_VERTEX_PRECLIP_SGIX 0x83EE -#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF -#endif - -#ifndef GL_SGIX_convolution_accuracy -#define GL_CONVOLUTION_HINT_SGIX 0x8316 -#endif - -#ifndef GL_SGIX_resample -#define GL_PACK_RESAMPLE_SGIX 0x842C -#define GL_UNPACK_RESAMPLE_SGIX 0x842D -#define GL_RESAMPLE_REPLICATE_SGIX 0x842E -#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F -#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 -#endif - -#ifndef GL_SGIS_point_line_texgen -#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 -#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 -#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 -#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 -#define GL_EYE_POINT_SGIS 0x81F4 -#define GL_OBJECT_POINT_SGIS 0x81F5 -#define GL_EYE_LINE_SGIS 0x81F6 -#define GL_OBJECT_LINE_SGIS 0x81F7 -#endif - -#ifndef GL_SGIS_texture_color_mask -#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF -#endif - -#ifndef GL_EXT_texture_env_dot3 -#define GL_DOT3_RGB_EXT 0x8740 -#define GL_DOT3_RGBA_EXT 0x8741 -#endif - -#ifndef GL_ATI_texture_mirror_once -#define GL_MIRROR_CLAMP_ATI 0x8742 -#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 -#endif - -#ifndef GL_NV_fence -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FENCE_CONDITION_NV 0x84F4 -#endif - -#ifndef GL_IBM_texture_mirrored_repeat -#define GL_MIRRORED_REPEAT_IBM 0x8370 -#endif - -#ifndef GL_NV_evaluators -#define GL_EVAL_2D_NV 0x86C0 -#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 -#define GL_MAP_TESSELLATION_NV 0x86C2 -#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 -#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 -#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 -#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 -#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 -#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 -#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 -#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA -#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB -#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC -#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD -#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE -#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF -#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 -#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 -#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 -#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 -#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 -#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 -#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 -#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 -#endif - -#ifndef GL_NV_packed_depth_stencil -#define GL_DEPTH_STENCIL_NV 0x84F9 -#define GL_UNSIGNED_INT_24_8_NV 0x84FA -#endif - -#ifndef GL_NV_register_combiners2 -#define GL_PER_STAGE_CONSTANTS_NV 0x8535 -#endif - -#ifndef GL_NV_texture_compression_vtc -#endif - -#ifndef GL_NV_texture_rectangle -#define GL_TEXTURE_RECTANGLE_NV 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 -#endif - -#ifndef GL_NV_texture_shader -#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C -#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D -#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E -#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 -#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA -#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB -#define GL_DSDT_MAG_INTENSITY_NV 0x86DC -#define GL_SHADER_CONSISTENT_NV 0x86DD -#define GL_TEXTURE_SHADER_NV 0x86DE -#define GL_SHADER_OPERATION_NV 0x86DF -#define GL_CULL_MODES_NV 0x86E0 -#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 -#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 -#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 -#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV -#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV -#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV -#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 -#define GL_CONST_EYE_NV 0x86E5 -#define GL_PASS_THROUGH_NV 0x86E6 -#define GL_CULL_FRAGMENT_NV 0x86E7 -#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 -#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 -#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA -#define GL_DOT_PRODUCT_NV 0x86EC -#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED -#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE -#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 -#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 -#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 -#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 -#define GL_HILO_NV 0x86F4 -#define GL_DSDT_NV 0x86F5 -#define GL_DSDT_MAG_NV 0x86F6 -#define GL_DSDT_MAG_VIB_NV 0x86F7 -#define GL_HILO16_NV 0x86F8 -#define GL_SIGNED_HILO_NV 0x86F9 -#define GL_SIGNED_HILO16_NV 0x86FA -#define GL_SIGNED_RGBA_NV 0x86FB -#define GL_SIGNED_RGBA8_NV 0x86FC -#define GL_SIGNED_RGB_NV 0x86FE -#define GL_SIGNED_RGB8_NV 0x86FF -#define GL_SIGNED_LUMINANCE_NV 0x8701 -#define GL_SIGNED_LUMINANCE8_NV 0x8702 -#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 -#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 -#define GL_SIGNED_ALPHA_NV 0x8705 -#define GL_SIGNED_ALPHA8_NV 0x8706 -#define GL_SIGNED_INTENSITY_NV 0x8707 -#define GL_SIGNED_INTENSITY8_NV 0x8708 -#define GL_DSDT8_NV 0x8709 -#define GL_DSDT8_MAG8_NV 0x870A -#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B -#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C -#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D -#define GL_HI_SCALE_NV 0x870E -#define GL_LO_SCALE_NV 0x870F -#define GL_DS_SCALE_NV 0x8710 -#define GL_DT_SCALE_NV 0x8711 -#define GL_MAGNITUDE_SCALE_NV 0x8712 -#define GL_VIBRANCE_SCALE_NV 0x8713 -#define GL_HI_BIAS_NV 0x8714 -#define GL_LO_BIAS_NV 0x8715 -#define GL_DS_BIAS_NV 0x8716 -#define GL_DT_BIAS_NV 0x8717 -#define GL_MAGNITUDE_BIAS_NV 0x8718 -#define GL_VIBRANCE_BIAS_NV 0x8719 -#define GL_TEXTURE_BORDER_VALUES_NV 0x871A -#define GL_TEXTURE_HI_SIZE_NV 0x871B -#define GL_TEXTURE_LO_SIZE_NV 0x871C -#define GL_TEXTURE_DS_SIZE_NV 0x871D -#define GL_TEXTURE_DT_SIZE_NV 0x871E -#define GL_TEXTURE_MAG_SIZE_NV 0x871F -#endif - -#ifndef GL_NV_texture_shader2 -#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF -#endif - -#ifndef GL_NV_vertex_array_range2 -#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 -#endif - -#ifndef GL_NV_vertex_program -#define GL_VERTEX_PROGRAM_NV 0x8620 -#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 -#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 -#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 -#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 -#define GL_CURRENT_ATTRIB_NV 0x8626 -#define GL_PROGRAM_LENGTH_NV 0x8627 -#define GL_PROGRAM_STRING_NV 0x8628 -#define GL_MODELVIEW_PROJECTION_NV 0x8629 -#define GL_IDENTITY_NV 0x862A -#define GL_INVERSE_NV 0x862B -#define GL_TRANSPOSE_NV 0x862C -#define GL_INVERSE_TRANSPOSE_NV 0x862D -#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E -#define GL_MAX_TRACK_MATRICES_NV 0x862F -#define GL_MATRIX0_NV 0x8630 -#define GL_MATRIX1_NV 0x8631 -#define GL_MATRIX2_NV 0x8632 -#define GL_MATRIX3_NV 0x8633 -#define GL_MATRIX4_NV 0x8634 -#define GL_MATRIX5_NV 0x8635 -#define GL_MATRIX6_NV 0x8636 -#define GL_MATRIX7_NV 0x8637 -#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 -#define GL_CURRENT_MATRIX_NV 0x8641 -#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 -#define GL_PROGRAM_PARAMETER_NV 0x8644 -#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 -#define GL_PROGRAM_TARGET_NV 0x8646 -#define GL_PROGRAM_RESIDENT_NV 0x8647 -#define GL_TRACK_MATRIX_NV 0x8648 -#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 -#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A -#define GL_PROGRAM_ERROR_POSITION_NV 0x864B -#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 -#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 -#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 -#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 -#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 -#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 -#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 -#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 -#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 -#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 -#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A -#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B -#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C -#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D -#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E -#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F -#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 -#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 -#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 -#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 -#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 -#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 -#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 -#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 -#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 -#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 -#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A -#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B -#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C -#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D -#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E -#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F -#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 -#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 -#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 -#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 -#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 -#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 -#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 -#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 -#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 -#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 -#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A -#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B -#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C -#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D -#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E -#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F -#endif - -#ifndef GL_SGIX_texture_coordinate_clamp -#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 -#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A -#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B -#endif - -#ifndef GL_SGIX_scalebias_hint -#define GL_SCALEBIAS_HINT_SGIX 0x8322 -#endif - -#ifndef GL_OML_interlace -#define GL_INTERLACE_OML 0x8980 -#define GL_INTERLACE_READ_OML 0x8981 -#endif - -#ifndef GL_OML_subsample -#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 -#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 -#endif - -#ifndef GL_OML_resample -#define GL_PACK_RESAMPLE_OML 0x8984 -#define GL_UNPACK_RESAMPLE_OML 0x8985 -#define GL_RESAMPLE_REPLICATE_OML 0x8986 -#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 -#define GL_RESAMPLE_AVERAGE_OML 0x8988 -#define GL_RESAMPLE_DECIMATE_OML 0x8989 -#endif - -#ifndef GL_NV_copy_depth_to_color -#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E -#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F -#endif - -#ifndef GL_ATI_envmap_bumpmap -#define GL_BUMP_ROT_MATRIX_ATI 0x8775 -#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 -#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 -#define GL_BUMP_TEX_UNITS_ATI 0x8778 -#define GL_DUDV_ATI 0x8779 -#define GL_DU8DV8_ATI 0x877A -#define GL_BUMP_ENVMAP_ATI 0x877B -#define GL_BUMP_TARGET_ATI 0x877C -#endif - -#ifndef GL_ATI_fragment_shader -#define GL_FRAGMENT_SHADER_ATI 0x8920 -#define GL_REG_0_ATI 0x8921 -#define GL_REG_1_ATI 0x8922 -#define GL_REG_2_ATI 0x8923 -#define GL_REG_3_ATI 0x8924 -#define GL_REG_4_ATI 0x8925 -#define GL_REG_5_ATI 0x8926 -#define GL_REG_6_ATI 0x8927 -#define GL_REG_7_ATI 0x8928 -#define GL_REG_8_ATI 0x8929 -#define GL_REG_9_ATI 0x892A -#define GL_REG_10_ATI 0x892B -#define GL_REG_11_ATI 0x892C -#define GL_REG_12_ATI 0x892D -#define GL_REG_13_ATI 0x892E -#define GL_REG_14_ATI 0x892F -#define GL_REG_15_ATI 0x8930 -#define GL_REG_16_ATI 0x8931 -#define GL_REG_17_ATI 0x8932 -#define GL_REG_18_ATI 0x8933 -#define GL_REG_19_ATI 0x8934 -#define GL_REG_20_ATI 0x8935 -#define GL_REG_21_ATI 0x8936 -#define GL_REG_22_ATI 0x8937 -#define GL_REG_23_ATI 0x8938 -#define GL_REG_24_ATI 0x8939 -#define GL_REG_25_ATI 0x893A -#define GL_REG_26_ATI 0x893B -#define GL_REG_27_ATI 0x893C -#define GL_REG_28_ATI 0x893D -#define GL_REG_29_ATI 0x893E -#define GL_REG_30_ATI 0x893F -#define GL_REG_31_ATI 0x8940 -#define GL_CON_0_ATI 0x8941 -#define GL_CON_1_ATI 0x8942 -#define GL_CON_2_ATI 0x8943 -#define GL_CON_3_ATI 0x8944 -#define GL_CON_4_ATI 0x8945 -#define GL_CON_5_ATI 0x8946 -#define GL_CON_6_ATI 0x8947 -#define GL_CON_7_ATI 0x8948 -#define GL_CON_8_ATI 0x8949 -#define GL_CON_9_ATI 0x894A -#define GL_CON_10_ATI 0x894B -#define GL_CON_11_ATI 0x894C -#define GL_CON_12_ATI 0x894D -#define GL_CON_13_ATI 0x894E -#define GL_CON_14_ATI 0x894F -#define GL_CON_15_ATI 0x8950 -#define GL_CON_16_ATI 0x8951 -#define GL_CON_17_ATI 0x8952 -#define GL_CON_18_ATI 0x8953 -#define GL_CON_19_ATI 0x8954 -#define GL_CON_20_ATI 0x8955 -#define GL_CON_21_ATI 0x8956 -#define GL_CON_22_ATI 0x8957 -#define GL_CON_23_ATI 0x8958 -#define GL_CON_24_ATI 0x8959 -#define GL_CON_25_ATI 0x895A -#define GL_CON_26_ATI 0x895B -#define GL_CON_27_ATI 0x895C -#define GL_CON_28_ATI 0x895D -#define GL_CON_29_ATI 0x895E -#define GL_CON_30_ATI 0x895F -#define GL_CON_31_ATI 0x8960 -#define GL_MOV_ATI 0x8961 -#define GL_ADD_ATI 0x8963 -#define GL_MUL_ATI 0x8964 -#define GL_SUB_ATI 0x8965 -#define GL_DOT3_ATI 0x8966 -#define GL_DOT4_ATI 0x8967 -#define GL_MAD_ATI 0x8968 -#define GL_LERP_ATI 0x8969 -#define GL_CND_ATI 0x896A -#define GL_CND0_ATI 0x896B -#define GL_DOT2_ADD_ATI 0x896C -#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D -#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E -#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F -#define GL_NUM_PASSES_ATI 0x8970 -#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 -#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 -#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 -#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 -#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 -#define GL_SWIZZLE_STR_ATI 0x8976 -#define GL_SWIZZLE_STQ_ATI 0x8977 -#define GL_SWIZZLE_STR_DR_ATI 0x8978 -#define GL_SWIZZLE_STQ_DQ_ATI 0x8979 -#define GL_SWIZZLE_STRQ_ATI 0x897A -#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B -#define GL_RED_BIT_ATI 0x00000001 -#define GL_GREEN_BIT_ATI 0x00000002 -#define GL_BLUE_BIT_ATI 0x00000004 -#define GL_2X_BIT_ATI 0x00000001 -#define GL_4X_BIT_ATI 0x00000002 -#define GL_8X_BIT_ATI 0x00000004 -#define GL_HALF_BIT_ATI 0x00000008 -#define GL_QUARTER_BIT_ATI 0x00000010 -#define GL_EIGHTH_BIT_ATI 0x00000020 -#define GL_SATURATE_BIT_ATI 0x00000040 -#define GL_COMP_BIT_ATI 0x00000002 -#define GL_NEGATE_BIT_ATI 0x00000004 -#define GL_BIAS_BIT_ATI 0x00000008 -#endif - -#ifndef GL_ATI_pn_triangles -#define GL_PN_TRIANGLES_ATI 0x87F0 -#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 -#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 -#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 -#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 -#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 -#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 -#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 -#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 -#endif - -#ifndef GL_ATI_vertex_array_object -#define GL_STATIC_ATI 0x8760 -#define GL_DYNAMIC_ATI 0x8761 -#define GL_PRESERVE_ATI 0x8762 -#define GL_DISCARD_ATI 0x8763 -#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 -#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 -#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 -#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 -#endif - -#ifndef GL_EXT_vertex_shader -#define GL_VERTEX_SHADER_EXT 0x8780 -#define GL_VERTEX_SHADER_BINDING_EXT 0x8781 -#define GL_OP_INDEX_EXT 0x8782 -#define GL_OP_NEGATE_EXT 0x8783 -#define GL_OP_DOT3_EXT 0x8784 -#define GL_OP_DOT4_EXT 0x8785 -#define GL_OP_MUL_EXT 0x8786 -#define GL_OP_ADD_EXT 0x8787 -#define GL_OP_MADD_EXT 0x8788 -#define GL_OP_FRAC_EXT 0x8789 -#define GL_OP_MAX_EXT 0x878A -#define GL_OP_MIN_EXT 0x878B -#define GL_OP_SET_GE_EXT 0x878C -#define GL_OP_SET_LT_EXT 0x878D -#define GL_OP_CLAMP_EXT 0x878E -#define GL_OP_FLOOR_EXT 0x878F -#define GL_OP_ROUND_EXT 0x8790 -#define GL_OP_EXP_BASE_2_EXT 0x8791 -#define GL_OP_LOG_BASE_2_EXT 0x8792 -#define GL_OP_POWER_EXT 0x8793 -#define GL_OP_RECIP_EXT 0x8794 -#define GL_OP_RECIP_SQRT_EXT 0x8795 -#define GL_OP_SUB_EXT 0x8796 -#define GL_OP_CROSS_PRODUCT_EXT 0x8797 -#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 -#define GL_OP_MOV_EXT 0x8799 -#define GL_OUTPUT_VERTEX_EXT 0x879A -#define GL_OUTPUT_COLOR0_EXT 0x879B -#define GL_OUTPUT_COLOR1_EXT 0x879C -#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D -#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E -#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F -#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 -#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 -#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 -#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 -#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 -#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 -#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 -#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 -#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 -#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 -#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA -#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB -#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC -#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD -#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE -#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF -#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 -#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 -#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 -#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 -#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 -#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 -#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 -#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 -#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 -#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 -#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA -#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB -#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC -#define GL_OUTPUT_FOG_EXT 0x87BD -#define GL_SCALAR_EXT 0x87BE -#define GL_VECTOR_EXT 0x87BF -#define GL_MATRIX_EXT 0x87C0 -#define GL_VARIANT_EXT 0x87C1 -#define GL_INVARIANT_EXT 0x87C2 -#define GL_LOCAL_CONSTANT_EXT 0x87C3 -#define GL_LOCAL_EXT 0x87C4 -#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 -#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 -#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 -#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 -#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE -#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF -#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 -#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 -#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 -#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 -#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 -#define GL_X_EXT 0x87D5 -#define GL_Y_EXT 0x87D6 -#define GL_Z_EXT 0x87D7 -#define GL_W_EXT 0x87D8 -#define GL_NEGATIVE_X_EXT 0x87D9 -#define GL_NEGATIVE_Y_EXT 0x87DA -#define GL_NEGATIVE_Z_EXT 0x87DB -#define GL_NEGATIVE_W_EXT 0x87DC -#define GL_ZERO_EXT 0x87DD -#define GL_ONE_EXT 0x87DE -#define GL_NEGATIVE_ONE_EXT 0x87DF -#define GL_NORMALIZED_RANGE_EXT 0x87E0 -#define GL_FULL_RANGE_EXT 0x87E1 -#define GL_CURRENT_VERTEX_EXT 0x87E2 -#define GL_MVP_MATRIX_EXT 0x87E3 -#define GL_VARIANT_VALUE_EXT 0x87E4 -#define GL_VARIANT_DATATYPE_EXT 0x87E5 -#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 -#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 -#define GL_VARIANT_ARRAY_EXT 0x87E8 -#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 -#define GL_INVARIANT_VALUE_EXT 0x87EA -#define GL_INVARIANT_DATATYPE_EXT 0x87EB -#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC -#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED -#endif - -#ifndef GL_ATI_vertex_streams -#define GL_MAX_VERTEX_STREAMS_ATI 0x876B -#define GL_VERTEX_STREAM0_ATI 0x876C -#define GL_VERTEX_STREAM1_ATI 0x876D -#define GL_VERTEX_STREAM2_ATI 0x876E -#define GL_VERTEX_STREAM3_ATI 0x876F -#define GL_VERTEX_STREAM4_ATI 0x8770 -#define GL_VERTEX_STREAM5_ATI 0x8771 -#define GL_VERTEX_STREAM6_ATI 0x8772 -#define GL_VERTEX_STREAM7_ATI 0x8773 -#define GL_VERTEX_SOURCE_ATI 0x8774 -#endif - -#ifndef GL_ATI_element_array -#define GL_ELEMENT_ARRAY_ATI 0x8768 -#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 -#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A -#endif - -#ifndef GL_SUN_mesh_array -#define GL_QUAD_MESH_SUN 0x8614 -#define GL_TRIANGLE_MESH_SUN 0x8615 -#endif - -#ifndef GL_SUN_slice_accum -#define GL_SLICE_ACCUM_SUN 0x85CC -#endif - -#ifndef GL_NV_multisample_filter_hint -#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 -#endif - -#ifndef GL_NV_depth_clamp -#define GL_DEPTH_CLAMP_NV 0x864F -#endif - -#ifndef GL_NV_occlusion_query -#define GL_PIXEL_COUNTER_BITS_NV 0x8864 -#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 -#define GL_PIXEL_COUNT_NV 0x8866 -#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 -#endif - -#ifndef GL_NV_point_sprite -#define GL_POINT_SPRITE_NV 0x8861 -#define GL_COORD_REPLACE_NV 0x8862 -#define GL_POINT_SPRITE_R_MODE_NV 0x8863 -#endif - -#ifndef GL_NV_texture_shader3 -#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 -#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 -#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 -#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 -#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 -#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 -#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 -#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 -#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 -#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 -#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A -#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B -#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C -#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D -#define GL_HILO8_NV 0x885E -#define GL_SIGNED_HILO8_NV 0x885F -#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 -#endif - -#ifndef GL_NV_vertex_program1_1 -#endif - -#ifndef GL_EXT_shadow_funcs -#endif - -#ifndef GL_EXT_stencil_two_side -#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 -#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 -#endif - -#ifndef GL_ATI_text_fragment_shader -#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 -#endif - -#ifndef GL_APPLE_client_storage -#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 -#endif - -#ifndef GL_APPLE_element_array -#define GL_ELEMENT_ARRAY_APPLE 0x8768 -#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769 -#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A -#endif - -#ifndef GL_APPLE_fence -#define GL_DRAW_PIXELS_APPLE 0x8A0A -#define GL_FENCE_APPLE 0x8A0B -#endif - -#ifndef GL_APPLE_vertex_array_object -#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 -#endif - -#ifndef GL_APPLE_vertex_array_range -#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D -#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E -#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F -#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 -#define GL_STORAGE_CACHED_APPLE 0x85BE -#define GL_STORAGE_SHARED_APPLE 0x85BF -#endif - -#ifndef GL_APPLE_ycbcr_422 -#define GL_YCBCR_422_APPLE 0x85B9 -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB -#endif - -#ifndef GL_S3_s3tc -#define GL_RGB_S3TC 0x83A0 -#define GL_RGB4_S3TC 0x83A1 -#define GL_RGBA_S3TC 0x83A2 -#define GL_RGBA4_S3TC 0x83A3 -#endif - -#ifndef GL_ATI_draw_buffers -#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 -#define GL_DRAW_BUFFER0_ATI 0x8825 -#define GL_DRAW_BUFFER1_ATI 0x8826 -#define GL_DRAW_BUFFER2_ATI 0x8827 -#define GL_DRAW_BUFFER3_ATI 0x8828 -#define GL_DRAW_BUFFER4_ATI 0x8829 -#define GL_DRAW_BUFFER5_ATI 0x882A -#define GL_DRAW_BUFFER6_ATI 0x882B -#define GL_DRAW_BUFFER7_ATI 0x882C -#define GL_DRAW_BUFFER8_ATI 0x882D -#define GL_DRAW_BUFFER9_ATI 0x882E -#define GL_DRAW_BUFFER10_ATI 0x882F -#define GL_DRAW_BUFFER11_ATI 0x8830 -#define GL_DRAW_BUFFER12_ATI 0x8831 -#define GL_DRAW_BUFFER13_ATI 0x8832 -#define GL_DRAW_BUFFER14_ATI 0x8833 -#define GL_DRAW_BUFFER15_ATI 0x8834 -#endif - -#ifndef GL_ATI_pixel_format_float -#define GL_TYPE_RGBA_FLOAT_ATI 0x8820 -#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 -#endif - -#ifndef GL_ATI_texture_env_combine3 -#define GL_MODULATE_ADD_ATI 0x8744 -#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 -#define GL_MODULATE_SUBTRACT_ATI 0x8746 -#endif - -#ifndef GL_ATI_texture_float -#define GL_RGBA_FLOAT32_ATI 0x8814 -#define GL_RGB_FLOAT32_ATI 0x8815 -#define GL_ALPHA_FLOAT32_ATI 0x8816 -#define GL_INTENSITY_FLOAT32_ATI 0x8817 -#define GL_LUMINANCE_FLOAT32_ATI 0x8818 -#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 -#define GL_RGBA_FLOAT16_ATI 0x881A -#define GL_RGB_FLOAT16_ATI 0x881B -#define GL_ALPHA_FLOAT16_ATI 0x881C -#define GL_INTENSITY_FLOAT16_ATI 0x881D -#define GL_LUMINANCE_FLOAT16_ATI 0x881E -#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F -#endif - -#ifndef GL_NV_float_buffer -#define GL_FLOAT_R_NV 0x8880 -#define GL_FLOAT_RG_NV 0x8881 -#define GL_FLOAT_RGB_NV 0x8882 -#define GL_FLOAT_RGBA_NV 0x8883 -#define GL_FLOAT_R16_NV 0x8884 -#define GL_FLOAT_R32_NV 0x8885 -#define GL_FLOAT_RG16_NV 0x8886 -#define GL_FLOAT_RG32_NV 0x8887 -#define GL_FLOAT_RGB16_NV 0x8888 -#define GL_FLOAT_RGB32_NV 0x8889 -#define GL_FLOAT_RGBA16_NV 0x888A -#define GL_FLOAT_RGBA32_NV 0x888B -#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C -#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D -#define GL_FLOAT_RGBA_MODE_NV 0x888E -#endif - -#ifndef GL_NV_fragment_program -#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 -#define GL_FRAGMENT_PROGRAM_NV 0x8870 -#define GL_MAX_TEXTURE_COORDS_NV 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 -#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 -#define GL_PROGRAM_ERROR_STRING_NV 0x8874 -#endif - -#ifndef GL_NV_half_float -#define GL_HALF_FLOAT_NV 0x140B -#endif - -#ifndef GL_NV_pixel_data_range -#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 -#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 -#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A -#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B -#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C -#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D -#endif - -#ifndef GL_NV_primitive_restart -#define GL_PRIMITIVE_RESTART_NV 0x8558 -#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 -#endif - -#ifndef GL_NV_texture_expand_normal -#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F -#endif - -#ifndef GL_NV_vertex_program2 -#endif - -#ifndef GL_ATI_map_object_buffer -#endif - -#ifndef GL_ATI_separate_stencil -#define GL_STENCIL_BACK_FUNC_ATI 0x8800 -#define GL_STENCIL_BACK_FAIL_ATI 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 -#endif - -#ifndef GL_ATI_vertex_attrib_array_object -#endif - -#ifndef GL_OES_read_format -#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B -#endif - -#ifndef GL_EXT_depth_bounds_test -#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 -#define GL_DEPTH_BOUNDS_EXT 0x8891 -#endif - -#ifndef GL_EXT_texture_mirror_clamp -#define GL_MIRROR_CLAMP_EXT 0x8742 -#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 -#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 -#endif - -#ifndef GL_EXT_blend_equation_separate -#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION -#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D -#endif - -#ifndef GL_MESA_pack_invert -#define GL_PACK_INVERT_MESA 0x8758 -#endif - -#ifndef GL_MESA_ycbcr_texture -#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB -#define GL_YCBCR_MESA 0x8757 -#endif - -#ifndef GL_EXT_pixel_buffer_object -#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB -#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF -#endif - -#ifndef GL_NV_fragment_program_option -#endif - -#ifndef GL_NV_fragment_program2 -#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 -#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 -#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 -#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 -#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 -#endif - -#ifndef GL_NV_vertex_program2_option -/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ -/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */ -#endif - -#ifndef GL_NV_vertex_program3 -/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ -#endif - -#ifndef GL_EXT_framebuffer_object -#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 -#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 -#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 -#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 -#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 -#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC -#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD -#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF -#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 -#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 -#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 -#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 -#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 -#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 -#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 -#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 -#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 -#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 -#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA -#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB -#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC -#define GL_COLOR_ATTACHMENT13_EXT 0x8CED -#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE -#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF -#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 -#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 -#define GL_FRAMEBUFFER_EXT 0x8D40 -#define GL_RENDERBUFFER_EXT 0x8D41 -#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 -#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 -#define GL_STENCIL_INDEX1_EXT 0x8D46 -#define GL_STENCIL_INDEX4_EXT 0x8D47 -#define GL_STENCIL_INDEX8_EXT 0x8D48 -#define GL_STENCIL_INDEX16_EXT 0x8D49 -#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 -#endif - -#ifndef GL_GREMEDY_string_marker -#endif - - -/*************************************************************/ - -#include -#ifndef GL_VERSION_2_0 -/* GL type for program/shader text */ -typedef char GLchar; /* native character */ -#endif - -#ifndef GL_VERSION_1_5 -/* GL types for handling large vertex buffer objects */ -typedef ptrdiff_t GLintptr; -typedef ptrdiff_t GLsizeiptr; -#endif - -#ifndef GL_ARB_vertex_buffer_object -/* GL types for handling large vertex buffer objects */ -typedef ptrdiff_t GLintptrARB; -typedef ptrdiff_t GLsizeiptrARB; -#endif - -#ifndef GL_ARB_shader_objects -/* GL types for handling shader object handles and program/shader text */ -typedef char GLcharARB; /* native character */ -typedef unsigned int GLhandleARB; /* shader object handle */ -#endif - -/* GL types for "half" precision (s10e5) float data in host memory */ -#ifndef GL_ARB_half_float_pixel -typedef unsigned short GLhalfARB; -#endif - -#ifndef GL_NV_half_float -typedef unsigned short GLhalfNV; -#endif - -#ifndef GL_VERSION_1_2 -#define GL_VERSION_1_2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf); -GLAPI void APIENTRY glBlendEquation (GLenum); -GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *); -GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei); -GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei); -GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat); -GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint); -GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei); -GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei); -GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *); -GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *); -GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean); -GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean); -GLAPI void APIENTRY glResetHistogram (GLenum); -GLAPI void APIENTRY glResetMinmax (GLenum); -GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); -typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); -typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif - -#ifndef GL_VERSION_1_3 -#define GL_VERSION_1_3 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveTexture (GLenum); -GLAPI void APIENTRY glClientActiveTexture (GLenum); -GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble); -GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat); -GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint); -GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort); -GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *); -GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble); -GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat); -GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint); -GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort); -GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *); -GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint); -GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *); -GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *); -GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *); -GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *); -GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *); -GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *); -GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean); -GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); -#endif - -#ifndef GL_VERSION_1_4 -#define GL_VERSION_1_4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum); -GLAPI void APIENTRY glFogCoordf (GLfloat); -GLAPI void APIENTRY glFogCoordfv (const GLfloat *); -GLAPI void APIENTRY glFogCoordd (GLdouble); -GLAPI void APIENTRY glFogCoorddv (const GLdouble *); -GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei); -GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); -GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat); -GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *); -GLAPI void APIENTRY glPointParameteri (GLenum, GLint); -GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *); -GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte); -GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *); -GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *); -GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *); -GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint); -GLAPI void APIENTRY glSecondaryColor3iv (const GLint *); -GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort); -GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *); -GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte); -GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *); -GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint); -GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *); -GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort); -GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *); -GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble); -GLAPI void APIENTRY glWindowPos2dv (const GLdouble *); -GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat); -GLAPI void APIENTRY glWindowPos2fv (const GLfloat *); -GLAPI void APIENTRY glWindowPos2i (GLint, GLint); -GLAPI void APIENTRY glWindowPos2iv (const GLint *); -GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort); -GLAPI void APIENTRY glWindowPos2sv (const GLshort *); -GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glWindowPos3dv (const GLdouble *); -GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glWindowPos3fv (const GLfloat *); -GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint); -GLAPI void APIENTRY glWindowPos3iv (const GLint *); -GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort); -GLAPI void APIENTRY glWindowPos3sv (const GLshort *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord); -typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord); -typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord); -typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v); -#endif - -#ifndef GL_VERSION_1_5 -#define GL_VERSION_1_5 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *); -GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *); -GLAPI GLboolean APIENTRY glIsQuery (GLuint); -GLAPI void APIENTRY glBeginQuery (GLenum, GLuint); -GLAPI void APIENTRY glEndQuery (GLenum); -GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *); -GLAPI void APIENTRY glBindBuffer (GLenum, GLuint); -GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *); -GLAPI GLboolean APIENTRY glIsBuffer (GLuint); -GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum); -GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *); -GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *); -GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum); -GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum); -GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); -typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); -typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); -typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); -typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); -typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params); -#endif - -#ifndef GL_VERSION_2_0 -#define GL_VERSION_2_0 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum); -GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *); -GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum); -GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint); -GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint); -GLAPI void APIENTRY glAttachShader (GLuint, GLuint); -GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *); -GLAPI void APIENTRY glCompileShader (GLuint); -GLAPI GLuint APIENTRY glCreateProgram (void); -GLAPI GLuint APIENTRY glCreateShader (GLenum); -GLAPI void APIENTRY glDeleteProgram (GLuint); -GLAPI void APIENTRY glDeleteShader (GLuint); -GLAPI void APIENTRY glDetachShader (GLuint, GLuint); -GLAPI void APIENTRY glDisableVertexAttribArray (GLuint); -GLAPI void APIENTRY glEnableVertexAttribArray (GLuint); -GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *); -GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *); -GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *); -GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *); -GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *); -GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *); -GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *); -GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *); -GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *); -GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *); -GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *); -GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *); -GLAPI GLboolean APIENTRY glIsProgram (GLuint); -GLAPI GLboolean APIENTRY glIsShader (GLuint); -GLAPI void APIENTRY glLinkProgram (GLuint); -GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *); -GLAPI void APIENTRY glUseProgram (GLuint); -GLAPI void APIENTRY glUniform1f (GLint, GLfloat); -GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat); -GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glUniform1i (GLint, GLint); -GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint); -GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *); -GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *); -GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *); -GLAPI void APIENTRY glValidateProgram (GLuint); -GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble); -GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat); -GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort); -GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *); -GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *); -GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); -GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *); -GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *); -GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *); -GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *); -GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *); -GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *); -GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *); -GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *); -GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); -typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); -typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); -typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); -typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); -typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); -typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); -typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); -typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader); -typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); -typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); -typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_ARB_multitexture -#define GL_ARB_multitexture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveTextureARB (GLenum); -GLAPI void APIENTRY glClientActiveTextureARB (GLenum); -GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble); -GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat); -GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint); -GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort); -GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *); -GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble); -GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat); -GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint); -GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort); -GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *); -GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint); -GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *); -GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); -#endif - -#ifndef GL_ARB_transpose_matrix -#define GL_ARB_transpose_matrix 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *); -GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *); -GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *); -GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); -#endif - -#ifndef GL_ARB_multisample -#define GL_ARB_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); -#endif - -#ifndef GL_ARB_texture_env_add -#define GL_ARB_texture_env_add 1 -#endif - -#ifndef GL_ARB_texture_cube_map -#define GL_ARB_texture_cube_map 1 -#endif - -#ifndef GL_ARB_texture_compression -#define GL_ARB_texture_compression 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img); -#endif - -#ifndef GL_ARB_texture_border_clamp -#define GL_ARB_texture_border_clamp 1 -#endif - -#ifndef GL_ARB_point_parameters -#define GL_ARB_point_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat); -GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); -#endif - -#ifndef GL_ARB_vertex_blend -#define GL_ARB_vertex_blend 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *); -GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *); -GLAPI void APIENTRY glWeightivARB (GLint, const GLint *); -GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *); -GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *); -GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *); -GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *); -GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *); -GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glVertexBlendARB (GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); -typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); -typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); -typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); -typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); -typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); -typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); -typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); -typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count); -#endif - -#ifndef GL_ARB_matrix_palette -#define GL_ARB_matrix_palette 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint); -GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *); -GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *); -GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *); -GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); -typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_ARB_texture_env_combine -#define GL_ARB_texture_env_combine 1 -#endif - -#ifndef GL_ARB_texture_env_crossbar -#define GL_ARB_texture_env_crossbar 1 -#endif - -#ifndef GL_ARB_texture_env_dot3 -#define GL_ARB_texture_env_dot3 1 -#endif - -#ifndef GL_ARB_texture_mirrored_repeat -#define GL_ARB_texture_mirrored_repeat 1 -#endif - -#ifndef GL_ARB_depth_texture -#define GL_ARB_depth_texture 1 -#endif - -#ifndef GL_ARB_shadow -#define GL_ARB_shadow 1 -#endif - -#ifndef GL_ARB_shadow_ambient -#define GL_ARB_shadow_ambient 1 -#endif - -#ifndef GL_ARB_window_pos -#define GL_ARB_window_pos 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble); -GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *); -GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat); -GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *); -GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint); -GLAPI void APIENTRY glWindowPos2ivARB (const GLint *); -GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort); -GLAPI void APIENTRY glWindowPos2svARB (const GLshort *); -GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *); -GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *); -GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint); -GLAPI void APIENTRY glWindowPos3ivARB (const GLint *); -GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort); -GLAPI void APIENTRY glWindowPos3svARB (const GLshort *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); -#endif - -#ifndef GL_ARB_vertex_program -#define GL_ARB_vertex_program 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble); -GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat); -GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort); -GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *); -GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *); -GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); -GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *); -GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *); -GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *); -GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *); -GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *); -GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *); -GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *); -GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *); -GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *); -GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint); -GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint); -GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint); -GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *); -GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *); -GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *); -GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *); -GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *); -GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *); -GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *); -GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *); -GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *); -GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *); -GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *); -GLAPI GLboolean APIENTRY glIsProgramARB (GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); -typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); -typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); -typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program); -#endif - -#ifndef GL_ARB_fragment_program -#define GL_ARB_fragment_program 1 -/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */ -#endif - -#ifndef GL_ARB_vertex_buffer_object -#define GL_ARB_vertex_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint); -GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *); -GLAPI GLboolean APIENTRY glIsBufferARB (GLuint); -GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum); -GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *); -GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *); -GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum); -GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum); -GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); -typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); -typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); -typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); -typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); -typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params); -#endif - -#ifndef GL_ARB_occlusion_query -#define GL_ARB_occlusion_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *); -GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *); -GLAPI GLboolean APIENTRY glIsQueryARB (GLuint); -GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint); -GLAPI void APIENTRY glEndQueryARB (GLenum); -GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); -#endif - -#ifndef GL_ARB_shader_objects -#define GL_ARB_shader_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB); -GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum); -GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB); -GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum); -GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *); -GLAPI void APIENTRY glCompileShaderARB (GLhandleARB); -GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void); -GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB); -GLAPI void APIENTRY glLinkProgramARB (GLhandleARB); -GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB); -GLAPI void APIENTRY glValidateProgramARB (GLhandleARB); -GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat); -GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat); -GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glUniform1iARB (GLint, GLint); -GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint); -GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *); -GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *); -GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *); -GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *); -GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *); -GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); -GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *); -GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *); -GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); -GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *); -GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *); -GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); -typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname); -typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); -typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); -typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); -typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); -typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void); -typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); -typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); -typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); -typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); -typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); -typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); -#endif - -#ifndef GL_ARB_vertex_shader -#define GL_ARB_vertex_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *); -GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); -GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); -#endif - -#ifndef GL_ARB_fragment_shader -#define GL_ARB_fragment_shader 1 -#endif - -#ifndef GL_ARB_shading_language_100 -#define GL_ARB_shading_language_100 1 -#endif - -#ifndef GL_ARB_texture_non_power_of_two -#define GL_ARB_texture_non_power_of_two 1 -#endif - -#ifndef GL_ARB_point_sprite -#define GL_ARB_point_sprite 1 -#endif - -#ifndef GL_ARB_fragment_program_shadow -#define GL_ARB_fragment_program_shadow 1 -#endif - -#ifndef GL_ARB_draw_buffers -#define GL_ARB_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); -#endif - -#ifndef GL_ARB_texture_rectangle -#define GL_ARB_texture_rectangle 1 -#endif - -#ifndef GL_ARB_color_buffer_float -#define GL_ARB_color_buffer_float 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClampColorARB (GLenum, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); -#endif - -#ifndef GL_ARB_half_float_pixel -#define GL_ARB_half_float_pixel 1 -#endif - -#ifndef GL_ARB_texture_float -#define GL_ARB_texture_float 1 -#endif - -#ifndef GL_ARB_pixel_buffer_object -#define GL_ARB_pixel_buffer_object 1 -#endif - -#ifndef GL_EXT_abgr -#define GL_EXT_abgr 1 -#endif - -#ifndef GL_EXT_blend_color -#define GL_EXT_blend_color 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -#endif - -#ifndef GL_EXT_polygon_offset -#define GL_EXT_polygon_offset 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); -#endif - -#ifndef GL_EXT_texture -#define GL_EXT_texture 1 -#endif - -#ifndef GL_EXT_texture3D -#define GL_EXT_texture3D 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -#endif - -#ifndef GL_SGIS_texture_filter4 -#define GL_SGIS_texture_filter4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); -typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); -#endif - -#ifndef GL_EXT_subtexture -#define GL_EXT_subtexture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -#endif - -#ifndef GL_EXT_copy_texture -#define GL_EXT_copy_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint); -GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); -GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei); -GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); -GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif - -#ifndef GL_EXT_histogram -#define GL_EXT_histogram 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean); -GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean); -GLAPI void APIENTRY glResetHistogramEXT (GLenum); -GLAPI void APIENTRY glResetMinmaxEXT (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); -typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target); -#endif - -#ifndef GL_EXT_convolution -#define GL_EXT_convolution 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat); -GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint); -GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei); -GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei); -GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *); -GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -#endif - -#ifndef GL_EXT_color_matrix -#define GL_EXT_color_matrix 1 -#endif - -#ifndef GL_SGI_color_table -#define GL_SGI_color_table 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei); -GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); -#endif - -#ifndef GL_SGIX_pixel_texture -#define GL_SGIX_pixel_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTexGenSGIX (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); -#endif - -#ifndef GL_SGIS_pixel_texture -#define GL_SGIS_pixel_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint); -GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *); -GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat); -GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *); -GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *); -GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); -#endif - -#ifndef GL_SGIS_texture4D -#define GL_SGIS_texture4D 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); -#endif - -#ifndef GL_SGI_texture_color_table -#define GL_SGI_texture_color_table 1 -#endif - -#ifndef GL_EXT_cmyka -#define GL_EXT_cmyka 1 -#endif - -#ifndef GL_EXT_texture_object -#define GL_EXT_texture_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *); -GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint); -GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *); -GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint); -GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); -typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); -typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); -typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture); -typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); -#endif - -#ifndef GL_SGIS_detail_texture -#define GL_SGIS_detail_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *); -GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); -#endif - -#ifndef GL_SGIS_sharpen_texture -#define GL_SGIS_sharpen_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *); -GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); -#endif - -#ifndef GL_EXT_packed_pixels -#define GL_EXT_packed_pixels 1 -#endif - -#ifndef GL_SGIS_texture_lod -#define GL_SGIS_texture_lod 1 -#endif - -#ifndef GL_SGIS_multisample -#define GL_SGIS_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean); -GLAPI void APIENTRY glSamplePatternSGIS (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); -#endif - -#ifndef GL_EXT_rescale_normal -#define GL_EXT_rescale_normal 1 -#endif - -#ifndef GL_EXT_vertex_array -#define GL_EXT_vertex_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glArrayElementEXT (GLint); -GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); -GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei); -GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *); -GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *); -GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *); -GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *); -GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); -GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i); -typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); -typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); -typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -#endif - -#ifndef GL_EXT_misc_attribute -#define GL_EXT_misc_attribute 1 -#endif - -#ifndef GL_SGIS_generate_mipmap -#define GL_SGIS_generate_mipmap 1 -#endif - -#ifndef GL_SGIX_clipmap -#define GL_SGIX_clipmap 1 -#endif - -#ifndef GL_SGIX_shadow -#define GL_SGIX_shadow 1 -#endif - -#ifndef GL_SGIS_texture_edge_clamp -#define GL_SGIS_texture_edge_clamp 1 -#endif - -#ifndef GL_SGIS_texture_border_clamp -#define GL_SGIS_texture_border_clamp 1 -#endif - -#ifndef GL_EXT_blend_minmax -#define GL_EXT_blend_minmax 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationEXT (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); -#endif - -#ifndef GL_EXT_blend_subtract -#define GL_EXT_blend_subtract 1 -#endif - -#ifndef GL_EXT_blend_logic_op -#define GL_EXT_blend_logic_op 1 -#endif - -#ifndef GL_SGIX_interlace -#define GL_SGIX_interlace 1 -#endif - -#ifndef GL_SGIX_pixel_tiles -#define GL_SGIX_pixel_tiles 1 -#endif - -#ifndef GL_SGIX_texture_select -#define GL_SGIX_texture_select 1 -#endif - -#ifndef GL_SGIX_sprite -#define GL_SGIX_sprite 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat); -GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *); -GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint); -GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); -#endif - -#ifndef GL_SGIX_texture_multi_buffer -#define GL_SGIX_texture_multi_buffer 1 -#endif - -#ifndef GL_EXT_point_parameters -#define GL_EXT_point_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat); -GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); -#endif - -#ifndef GL_SGIS_point_parameters -#define GL_SGIS_point_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat); -GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); -#endif - -#ifndef GL_SGIX_instruments -#define GL_SGIX_instruments 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLint APIENTRY glGetInstrumentsSGIX (void); -GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *); -GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *); -GLAPI void APIENTRY glReadInstrumentsSGIX (GLint); -GLAPI void APIENTRY glStartInstrumentsSGIX (void); -GLAPI void APIENTRY glStopInstrumentsSGIX (GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void); -typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); -typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); -typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); -typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void); -typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); -#endif - -#ifndef GL_SGIX_texture_scale_bias -#define GL_SGIX_texture_scale_bias 1 -#endif - -#ifndef GL_SGIX_framezoom -#define GL_SGIX_framezoom 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFrameZoomSGIX (GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor); -#endif - -#ifndef GL_SGIX_tag_sample_buffer -#define GL_SGIX_tag_sample_buffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTagSampleBufferSGIX (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); -#endif - -#ifndef GL_SGIX_polynomial_ffd -#define GL_SGIX_polynomial_ffd 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *); -GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *); -GLAPI void APIENTRY glDeformSGIX (GLbitfield); -GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); -typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); -typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); -#endif - -#ifndef GL_SGIX_reference_plane -#define GL_SGIX_reference_plane 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); -#endif - -#ifndef GL_SGIX_flush_raster -#define GL_SGIX_flush_raster 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFlushRasterSGIX (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void); -#endif - -#ifndef GL_SGIX_depth_texture -#define GL_SGIX_depth_texture 1 -#endif - -#ifndef GL_SGIS_fog_function -#define GL_SGIS_fog_function 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *); -GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); -#endif - -#ifndef GL_SGIX_fog_offset -#define GL_SGIX_fog_offset 1 -#endif - -#ifndef GL_HP_image_transform -#define GL_HP_image_transform 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint); -GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat); -GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); -#endif - -#ifndef GL_HP_convolution_border_modes -#define GL_HP_convolution_border_modes 1 -#endif - -#ifndef GL_SGIX_texture_add_env -#define GL_SGIX_texture_add_env 1 -#endif - -#ifndef GL_EXT_color_subtable -#define GL_EXT_color_subtable 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -#endif - -#ifndef GL_PGI_vertex_hints -#define GL_PGI_vertex_hints 1 -#endif - -#ifndef GL_PGI_misc_hints -#define GL_PGI_misc_hints 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glHintPGI (GLenum, GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode); -#endif - -#ifndef GL_EXT_paletted_texture -#define GL_EXT_paletted_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -#endif - -#ifndef GL_EXT_clip_volume_hint -#define GL_EXT_clip_volume_hint 1 -#endif - -#ifndef GL_SGIX_list_priority -#define GL_SGIX_list_priority 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat); -GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *); -GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint); -GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); -#endif - -#ifndef GL_SGIX_ir_instrument1 -#define GL_SGIX_ir_instrument1 1 -#endif - -#ifndef GL_SGIX_calligraphic_fragment -#define GL_SGIX_calligraphic_fragment 1 -#endif - -#ifndef GL_SGIX_texture_lod_bias -#define GL_SGIX_texture_lod_bias 1 -#endif - -#ifndef GL_SGIX_shadow_ambient -#define GL_SGIX_shadow_ambient 1 -#endif - -#ifndef GL_EXT_index_texture -#define GL_EXT_index_texture 1 -#endif - -#ifndef GL_EXT_index_material -#define GL_EXT_index_material 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); -#endif - -#ifndef GL_EXT_index_func -#define GL_EXT_index_func 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); -#endif - -#ifndef GL_EXT_index_array_formats -#define GL_EXT_index_array_formats 1 -#endif - -#ifndef GL_EXT_compiled_vertex_array -#define GL_EXT_compiled_vertex_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei); -GLAPI void APIENTRY glUnlockArraysEXT (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void); -#endif - -#ifndef GL_EXT_cull_vertex -#define GL_EXT_cull_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *); -GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); -#endif - -#ifndef GL_SGIX_ycrcb -#define GL_SGIX_ycrcb 1 -#endif - -#ifndef GL_SGIX_fragment_lighting -#define GL_SGIX_fragment_lighting 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum); -GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat); -GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint); -GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat); -GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *); -GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint); -GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *); -GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat); -GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint); -GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); -#endif - -#ifndef GL_IBM_rasterpos_clip -#define GL_IBM_rasterpos_clip 1 -#endif - -#ifndef GL_HP_texture_lighting -#define GL_HP_texture_lighting 1 -#endif - -#ifndef GL_EXT_draw_range_elements -#define GL_EXT_draw_range_elements 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -#endif - -#ifndef GL_WIN_phong_shading -#define GL_WIN_phong_shading 1 -#endif - -#ifndef GL_WIN_specular_fog -#define GL_WIN_specular_fog 1 -#endif - -#ifndef GL_EXT_light_texture -#define GL_EXT_light_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glApplyTextureEXT (GLenum); -GLAPI void APIENTRY glTextureLightEXT (GLenum); -GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); -typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); -#endif - -#ifndef GL_SGIX_blend_alpha_minmax -#define GL_SGIX_blend_alpha_minmax 1 -#endif - -#ifndef GL_EXT_bgra -#define GL_EXT_bgra 1 -#endif - -#ifndef GL_SGIX_async -#define GL_SGIX_async 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint); -GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *); -GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *); -GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei); -GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei); -GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker); -typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); -typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); -typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); -typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); -typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); -#endif - -#ifndef GL_SGIX_async_pixel -#define GL_SGIX_async_pixel 1 -#endif - -#ifndef GL_SGIX_async_histogram -#define GL_SGIX_async_histogram 1 -#endif - -#ifndef GL_INTEL_parallel_arrays -#define GL_INTEL_parallel_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *); -GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *); -GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *); -GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); -typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer); -typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); -#endif - -#ifndef GL_HP_occlusion_test -#define GL_HP_occlusion_test 1 -#endif - -#ifndef GL_EXT_pixel_transform -#define GL_EXT_pixel_transform 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint); -GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat); -GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); -#endif - -#ifndef GL_EXT_pixel_transform_color_table -#define GL_EXT_pixel_transform_color_table 1 -#endif - -#ifndef GL_EXT_shared_texture_palette -#define GL_EXT_shared_texture_palette 1 -#endif - -#ifndef GL_EXT_separate_specular_color -#define GL_EXT_separate_specular_color 1 -#endif - -#ifndef GL_EXT_secondary_color -#define GL_EXT_secondary_color 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte); -GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *); -GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *); -GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *); -GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint); -GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *); -GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort); -GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *); -GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte); -GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *); -GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint); -GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *); -GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort); -GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *); -GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_EXT_texture_perturb_normal -#define GL_EXT_texture_perturb_normal 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureNormalEXT (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode); -#endif - -#ifndef GL_EXT_multi_draw_arrays -#define GL_EXT_multi_draw_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei); -GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -#endif - -#ifndef GL_EXT_fog_coord -#define GL_EXT_fog_coord 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFogCoordfEXT (GLfloat); -GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *); -GLAPI void APIENTRY glFogCoorddEXT (GLdouble); -GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *); -GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord); -typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); -typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord); -typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_REND_screen_coordinates -#define GL_REND_screen_coordinates 1 -#endif - -#ifndef GL_EXT_coordinate_frame -#define GL_EXT_coordinate_frame 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte); -GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *); -GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *); -GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *); -GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint); -GLAPI void APIENTRY glTangent3ivEXT (const GLint *); -GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort); -GLAPI void APIENTRY glTangent3svEXT (const GLshort *); -GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte); -GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *); -GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *); -GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *); -GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint); -GLAPI void APIENTRY glBinormal3ivEXT (const GLint *); -GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort); -GLAPI void APIENTRY glBinormal3svEXT (const GLshort *); -GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); -typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); -typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); -typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); -typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); -typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); -typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); -typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); -typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); -typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); -typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_EXT_texture_env_combine -#define GL_EXT_texture_env_combine 1 -#endif - -#ifndef GL_APPLE_specular_vector -#define GL_APPLE_specular_vector 1 -#endif - -#ifndef GL_APPLE_transform_hint -#define GL_APPLE_transform_hint 1 -#endif - -#ifndef GL_SGIX_fog_scale -#define GL_SGIX_fog_scale 1 -#endif - -#ifndef GL_SUNX_constant_data -#define GL_SUNX_constant_data 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFinishTextureSUNX (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void); -#endif - -#ifndef GL_SUN_global_alpha -#define GL_SUN_global_alpha 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte); -GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort); -GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint); -GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat); -GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble); -GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte); -GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort); -GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); -#endif - -#ifndef GL_SUN_triangle_list -#define GL_SUN_triangle_list 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint); -GLAPI void APIENTRY glReplacementCodeusSUN (GLushort); -GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte); -GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *); -GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *); -GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *); -GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer); -#endif - -#ifndef GL_SUN_vertex -#define GL_SUN_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat); -GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *); -GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *); -GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *); -GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -#endif - -#ifndef GL_EXT_blend_func_separate -#define GL_EXT_blend_func_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif - -#ifndef GL_INGR_blend_func_separate -#define GL_INGR_blend_func_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif - -#ifndef GL_INGR_color_clamp -#define GL_INGR_color_clamp 1 -#endif - -#ifndef GL_INGR_interlace_read -#define GL_INGR_interlace_read 1 -#endif - -#ifndef GL_EXT_stencil_wrap -#define GL_EXT_stencil_wrap 1 -#endif - -#ifndef GL_EXT_422_pixels -#define GL_EXT_422_pixels 1 -#endif - -#ifndef GL_NV_texgen_reflection -#define GL_NV_texgen_reflection 1 -#endif - -#ifndef GL_SUN_convolution_border_modes -#define GL_SUN_convolution_border_modes 1 -#endif - -#ifndef GL_EXT_texture_env_add -#define GL_EXT_texture_env_add 1 -#endif - -#ifndef GL_EXT_texture_lod_bias -#define GL_EXT_texture_lod_bias 1 -#endif - -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_EXT_texture_filter_anisotropic 1 -#endif - -#ifndef GL_EXT_vertex_weighting -#define GL_EXT_vertex_weighting 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexWeightfEXT (GLfloat); -GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *); -GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_NV_light_max_exponent -#define GL_NV_light_max_exponent 1 -#endif - -#ifndef GL_NV_vertex_array_range -#define GL_NV_vertex_array_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFlushVertexArrayRangeNV (void); -GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); -typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer); -#endif - -#ifndef GL_NV_register_combiners -#define GL_NV_register_combiners 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *); -GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat); -GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *); -GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint); -GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum); -GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean); -GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum); -GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); -typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); -#endif - -#ifndef GL_NV_fog_distance -#define GL_NV_fog_distance 1 -#endif - -#ifndef GL_NV_texgen_emboss -#define GL_NV_texgen_emboss 1 -#endif - -#ifndef GL_NV_blend_square -#define GL_NV_blend_square 1 -#endif - -#ifndef GL_NV_texture_env_combine4 -#define GL_NV_texture_env_combine4 1 -#endif - -#ifndef GL_MESA_resize_buffers -#define GL_MESA_resize_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glResizeBuffersMESA (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void); -#endif - -#ifndef GL_MESA_window_pos -#define GL_MESA_window_pos 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble); -GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *); -GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat); -GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *); -GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint); -GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *); -GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort); -GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *); -GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *); -GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *); -GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint); -GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *); -GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort); -GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *); -GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *); -GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *); -GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *); -GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); -#endif - -#ifndef GL_IBM_cull_vertex -#define GL_IBM_cull_vertex 1 -#endif - -#ifndef GL_IBM_multimode_draw_arrays -#define GL_IBM_multimode_draw_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint); -GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); -typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); -#endif - -#ifndef GL_IBM_vertex_array_lists -#define GL_IBM_vertex_array_lists 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); -GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); -GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint); -GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint); -GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint); -GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint); -GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); -GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -#endif - -#ifndef GL_SGIX_subsample -#define GL_SGIX_subsample 1 -#endif - -#ifndef GL_SGIX_ycrcba -#define GL_SGIX_ycrcba 1 -#endif - -#ifndef GL_SGIX_ycrcb_subsample -#define GL_SGIX_ycrcb_subsample 1 -#endif - -#ifndef GL_SGIX_depth_pass_instrument -#define GL_SGIX_depth_pass_instrument 1 -#endif - -#ifndef GL_3DFX_texture_compression_FXT1 -#define GL_3DFX_texture_compression_FXT1 1 -#endif - -#ifndef GL_3DFX_multisample -#define GL_3DFX_multisample 1 -#endif - -#ifndef GL_3DFX_tbuffer -#define GL_3DFX_tbuffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTbufferMask3DFX (GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); -#endif - -#ifndef GL_EXT_multisample -#define GL_EXT_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean); -GLAPI void APIENTRY glSamplePatternEXT (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); -#endif - -#ifndef GL_SGIX_vertex_preclip -#define GL_SGIX_vertex_preclip 1 -#endif - -#ifndef GL_SGIX_convolution_accuracy -#define GL_SGIX_convolution_accuracy 1 -#endif - -#ifndef GL_SGIX_resample -#define GL_SGIX_resample 1 -#endif - -#ifndef GL_SGIS_point_line_texgen -#define GL_SGIS_point_line_texgen 1 -#endif - -#ifndef GL_SGIS_texture_color_mask -#define GL_SGIS_texture_color_mask 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -#endif - -#ifndef GL_SGIX_igloo_interface -#define GL_SGIX_igloo_interface 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params); -#endif - -#ifndef GL_EXT_texture_env_dot3 -#define GL_EXT_texture_env_dot3 1 -#endif - -#ifndef GL_ATI_texture_mirror_once -#define GL_ATI_texture_mirror_once 1 -#endif - -#ifndef GL_NV_fence -#define GL_NV_fence 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *); -GLAPI GLboolean APIENTRY glIsFenceNV (GLuint); -GLAPI GLboolean APIENTRY glTestFenceNV (GLuint); -GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glFinishFenceNV (GLuint); -GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); -#endif - -#ifndef GL_NV_evaluators -#define GL_NV_evaluators 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *); -GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *); -GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); -typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); -typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); -#endif - -#ifndef GL_NV_packed_depth_stencil -#define GL_NV_packed_depth_stencil 1 -#endif - -#ifndef GL_NV_register_combiners2 -#define GL_NV_register_combiners2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); -#endif - -#ifndef GL_NV_texture_compression_vtc -#define GL_NV_texture_compression_vtc 1 -#endif - -#ifndef GL_NV_texture_rectangle -#define GL_NV_texture_rectangle 1 -#endif - -#ifndef GL_NV_texture_shader -#define GL_NV_texture_shader 1 -#endif - -#ifndef GL_NV_texture_shader2 -#define GL_NV_texture_shader2 1 -#endif - -#ifndef GL_NV_vertex_array_range2 -#define GL_NV_vertex_array_range2 1 -#endif - -#ifndef GL_NV_vertex_program -#define GL_NV_vertex_program 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *); -GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint); -GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *); -GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *); -GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *); -GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *); -GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *); -GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *); -GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *); -GLAPI GLboolean APIENTRY glIsProgramNV (GLuint); -GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *); -GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *); -GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *); -GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *); -GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *); -GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *); -GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum); -GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble); -GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat); -GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort); -GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); -GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *); -GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *); -GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *); -GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *); -GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *); -GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *); -GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *); -GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *); -GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *); -GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); -typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); -typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); -typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); -typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v); -typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); -#endif - -#ifndef GL_SGIX_texture_coordinate_clamp -#define GL_SGIX_texture_coordinate_clamp 1 -#endif - -#ifndef GL_SGIX_scalebias_hint -#define GL_SGIX_scalebias_hint 1 -#endif - -#ifndef GL_OML_interlace -#define GL_OML_interlace 1 -#endif - -#ifndef GL_OML_subsample -#define GL_OML_subsample 1 -#endif - -#ifndef GL_OML_resample -#define GL_OML_resample 1 -#endif - -#ifndef GL_NV_copy_depth_to_color -#define GL_NV_copy_depth_to_color 1 -#endif - -#ifndef GL_ATI_envmap_bumpmap -#define GL_ATI_envmap_bumpmap 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *); -GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *); -GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *); -GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); -typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); -typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); -#endif - -#ifndef GL_ATI_fragment_shader -#define GL_ATI_fragment_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint); -GLAPI void APIENTRY glBindFragmentShaderATI (GLuint); -GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint); -GLAPI void APIENTRY glBeginFragmentShaderATI (void); -GLAPI void APIENTRY glEndFragmentShaderATI (void); -GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum); -GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum); -GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); -typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); -typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void); -typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void); -typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); -typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); -#endif - -#ifndef GL_ATI_pn_triangles -#define GL_ATI_pn_triangles 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint); -GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); -#endif - -#ifndef GL_ATI_vertex_array_object -#define GL_ATI_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum); -GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint); -GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum); -GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glFreeObjectBufferATI (GLuint); -GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint); -GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint); -GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); -typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); -typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); -#endif - -#ifndef GL_EXT_vertex_shader -#define GL_EXT_vertex_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginVertexShaderEXT (void); -GLAPI void APIENTRY glEndVertexShaderEXT (void); -GLAPI void APIENTRY glBindVertexShaderEXT (GLuint); -GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint); -GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint); -GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint); -GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum); -GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum); -GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint); -GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint); -GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint); -GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *); -GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *); -GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *); -GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *); -GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *); -GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *); -GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *); -GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *); -GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *); -GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *); -GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *); -GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint); -GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint); -GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum); -GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum); -GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum); -GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum); -GLAPI GLuint APIENTRY glBindParameterEXT (GLenum); -GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum); -GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *); -GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *); -GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *); -GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *); -GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void); -typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void); -typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); -typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); -typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); -typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); -typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); -typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); -typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); -typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); -typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); -typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); -typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); -typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); -typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); -typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); -typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); -typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); -typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); -typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); -typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); -typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); -typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); -typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); -typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value); -typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); -typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); -typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -#endif - -#ifndef GL_ATI_vertex_streams -#define GL_ATI_vertex_streams 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort); -GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *); -GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint); -GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *); -GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat); -GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *); -GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble); -GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *); -GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort); -GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *); -GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint); -GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *); -GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *); -GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *); -GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *); -GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint); -GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *); -GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *); -GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *); -GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *); -GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *); -GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *); -GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *); -GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte); -GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *); -GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *); -GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint); -GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *); -GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *); -GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *); -GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum); -GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint); -GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); -typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); -#endif - -#ifndef GL_ATI_element_array -#define GL_ATI_element_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *); -GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei); -GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); -#endif - -#ifndef GL_SUN_mesh_array -#define GL_SUN_mesh_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); -#endif - -#ifndef GL_SUN_slice_accum -#define GL_SUN_slice_accum 1 -#endif - -#ifndef GL_NV_multisample_filter_hint -#define GL_NV_multisample_filter_hint 1 -#endif - -#ifndef GL_NV_depth_clamp -#define GL_NV_depth_clamp 1 -#endif - -#ifndef GL_NV_occlusion_query -#define GL_NV_occlusion_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *); -GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *); -GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint); -GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint); -GLAPI void APIENTRY glEndOcclusionQueryNV (void); -GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void); -typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); -#endif - -#ifndef GL_NV_point_sprite -#define GL_NV_point_sprite 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint); -GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); -#endif - -#ifndef GL_NV_texture_shader3 -#define GL_NV_texture_shader3 1 -#endif - -#ifndef GL_NV_vertex_program1_1 -#define GL_NV_vertex_program1_1 1 -#endif - -#ifndef GL_EXT_shadow_funcs -#define GL_EXT_shadow_funcs 1 -#endif - -#ifndef GL_EXT_stencil_two_side -#define GL_EXT_stencil_two_side 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); -#endif - -#ifndef GL_ATI_text_fragment_shader -#define GL_ATI_text_fragment_shader 1 -#endif - -#ifndef GL_APPLE_client_storage -#define GL_APPLE_client_storage 1 -#endif - -#ifndef GL_APPLE_element_array -#define GL_APPLE_element_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *); -GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei); -GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei); -GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei); -GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); -#endif - -#ifndef GL_APPLE_fence -#define GL_APPLE_fence 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *); -GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *); -GLAPI void APIENTRY glSetFenceAPPLE (GLuint); -GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint); -GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint); -GLAPI void APIENTRY glFinishFenceAPPLE (GLuint); -GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint); -GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); -typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); -typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); -typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); -#endif - -#ifndef GL_APPLE_vertex_array_object -#define GL_APPLE_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint); -GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, const GLuint *); -GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); -typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); -typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); -typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); -#endif - -#ifndef GL_APPLE_vertex_array_range -#define GL_APPLE_vertex_array_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *); -GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *); -GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); -typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); -#endif - -#ifndef GL_APPLE_ycbcr_422 -#define GL_APPLE_ycbcr_422 1 -#endif - -#ifndef GL_S3_s3tc -#define GL_S3_s3tc 1 -#endif - -#ifndef GL_ATI_draw_buffers -#define GL_ATI_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); -#endif - -#ifndef GL_ATI_pixel_format_float -#define GL_ATI_pixel_format_float 1 -/* This is really a WGL extension, but defines some associated GL enums. - * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string. - */ -#endif - -#ifndef GL_ATI_texture_env_combine3 -#define GL_ATI_texture_env_combine3 1 -#endif - -#ifndef GL_ATI_texture_float -#define GL_ATI_texture_float 1 -#endif - -#ifndef GL_NV_float_buffer -#define GL_NV_float_buffer 1 -#endif - -#ifndef GL_NV_fragment_program -#define GL_NV_fragment_program 1 -/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *); -GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *); -GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *); -GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); -typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); -#endif - -#ifndef GL_NV_half_float -#define GL_NV_half_float 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *); -GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *); -GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *); -GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *); -GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *); -GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *); -GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV); -GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *); -GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *); -GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *); -GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *); -GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV); -GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *); -GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *); -GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *); -GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *); -GLAPI void APIENTRY glFogCoordhNV (GLhalfNV); -GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *); -GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *); -GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV); -GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *); -GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV); -GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *); -GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *); -GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *); -GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *); -GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *); -GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *); -GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *); -GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); -typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); -typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); -typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); -typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); -typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); -typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); -typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); -typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -#endif - -#ifndef GL_NV_pixel_data_range -#define GL_NV_pixel_data_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *); -GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer); -typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); -#endif - -#ifndef GL_NV_primitive_restart -#define GL_NV_primitive_restart 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPrimitiveRestartNV (void); -GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void); -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); -#endif - -#ifndef GL_NV_texture_expand_normal -#define GL_NV_texture_expand_normal 1 -#endif - -#ifndef GL_NV_vertex_program2 -#define GL_NV_vertex_program2 1 -#endif - -#ifndef GL_ATI_map_object_buffer -#define GL_ATI_map_object_buffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint); -GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); -#endif - -#ifndef GL_ATI_separate_stencil -#define GL_ATI_separate_stencil 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum); -GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); -#endif - -#ifndef GL_ATI_vertex_attrib_array_object -#define GL_ATI_vertex_attrib_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint); -GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); -#endif - -#ifndef GL_OES_read_format -#define GL_OES_read_format 1 -#endif - -#ifndef GL_EXT_depth_bounds_test -#define GL_EXT_depth_bounds_test 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); -#endif - -#ifndef GL_EXT_texture_mirror_clamp -#define GL_EXT_texture_mirror_clamp 1 -#endif - -#ifndef GL_EXT_blend_equation_separate -#define GL_EXT_blend_equation_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); -#endif - -#ifndef GL_MESA_pack_invert -#define GL_MESA_pack_invert 1 -#endif - -#ifndef GL_MESA_ycbcr_texture -#define GL_MESA_ycbcr_texture 1 -#endif - -#ifndef GL_EXT_pixel_buffer_object -#define GL_EXT_pixel_buffer_object 1 -#endif - -#ifndef GL_NV_fragment_program_option -#define GL_NV_fragment_program_option 1 -#endif - -#ifndef GL_NV_fragment_program2 -#define GL_NV_fragment_program2 1 -#endif - -#ifndef GL_NV_vertex_program2_option -#define GL_NV_vertex_program2_option 1 -#endif - -#ifndef GL_NV_vertex_program3 -#define GL_NV_vertex_program3 1 -#endif - -#ifndef GL_EXT_framebuffer_object -#define GL_EXT_framebuffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint); -GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint); -GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *); -GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei); -GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *); -GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint); -GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint); -GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *); -GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum); -GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint); -GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint); -GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint); -GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint); -GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGenerateMipmapEXT (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); -typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); -typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); -typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); -typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); -#endif - -#ifndef GL_GREMEDY_string_marker -#define GL_GREMEDY_string_marker 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string); -#endif - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/glfbdev.h b/nx-X11/extras/Mesa_6.4.2/include/GL/glfbdev.h deleted file mode 100644 index 6af3ac3142..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/glfbdev.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef GLFBDEV_H -#define GLFBDEV_H - - -/* avoid including linux/fb.h */ -struct fb_fix_screeninfo; -struct fb_var_screeninfo; - - -/* public types */ -typedef struct GLFBDevVisualRec *GLFBDevVisualPtr; -typedef struct GLFBDevBufferRec *GLFBDevBufferPtr; -typedef struct GLFBDevContextRec *GLFBDevContextPtr; - - -/* API version */ -#define GLFBDEV_VERSION_1_0 1 - - -/* For glFBDevCreateVisual */ -#define GLFBDEV_DOUBLE_BUFFER 100 -#define GLFBDEV_COLOR_INDEX 101 -#define GLFBDEV_DEPTH_SIZE 102 -#define GLFBDEV_STENCIL_SIZE 103 -#define GLFBDEV_ACCUM_SIZE 104 -#define GLFBDEV_LEVEL 105 -#define GLFBDEV_NONE 0 - -/* For glFBDevGetString */ -#define GLFBDEV_VERSION 200 -#define GLFBDEV_VENDOR 201 - - -/* Misc functions */ - -extern const char * -glFBDevGetString( int str ); - - -typedef void (*GLFBDevProc)(); - - -extern const GLFBDevProc -glFBDevGetProcAddress( const char *procName ); - - - -/** - * Create a GLFBDevVisual. - * \param fixInfo - needed to get the visual types, etc. - * \param varInfo - needed to get the bits_per_pixel, etc. - * \param attribs - for requesting depth, stencil, accum buffers, etc. - */ -extern GLFBDevVisualPtr -glFBDevCreateVisual( const struct fb_fix_screeninfo *fixInfo, - const struct fb_var_screeninfo *varInfo, - const int *attribs ); - -extern void -glFBDevDestroyVisual( GLFBDevVisualPtr visual ); - -extern int -glFBDevGetVisualAttrib( const GLFBDevVisualPtr visual, int attrib); - - - -/** - * Create a GLFBDevBuffer. - * \param fixInfo, varInfo - needed in order to get the screen size - * (resolution), etc. - * \param visual - as returned by glFBDevCreateVisual() - * \param frontBuffer - address of front color buffer - * \param backBuffer - address of back color buffer (may be NULL) - * \param size - size of the color buffer(s) in bytes. - */ -extern GLFBDevBufferPtr -glFBDevCreateBuffer( const struct fb_fix_screeninfo *fixInfo, - const struct fb_var_screeninfo *varInfo, - const GLFBDevVisualPtr visual, - void *frontBuffer, void *backBuffer, size_t size ); - -extern void -glFBDevDestroyBuffer( GLFBDevBufferPtr buffer ); - -extern int -glFBDevGetBufferAttrib( const GLFBDevBufferPtr buffer, int attrib); - -extern GLFBDevBufferPtr -glFBDevGetCurrentDrawBuffer( void ); - -extern GLFBDevBufferPtr -glFBDevGetCurrentReadBuffer( void ); - -extern void -glFBDevSwapBuffers( GLFBDevBufferPtr buffer ); - - - -/** - * Create a GLFBDevContext. - * \param visual - as created by glFBDevCreateVisual. - * \param share - specifies another context with which to share textures, - * display lists, etc. (may be NULL). - */ -extern GLFBDevContextPtr -glFBDevCreateContext( const GLFBDevVisualPtr visual, GLFBDevContextPtr share ); - -extern void -glFBDevDestroyContext( GLFBDevContextPtr context ); - -extern int -glFBDevGetContextAttrib( const GLFBDevContextPtr context, int attrib); - -extern GLFBDevContextPtr -glFBDevGetCurrentContext( void ); - -extern int -glFBDevMakeCurrent( GLFBDevContextPtr context, - GLFBDevBufferPtr drawBuffer, - GLFBDevBufferPtr readBuffer ); - - -#endif /* GLFBDEV_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/glu.h b/nx-X11/extras/Mesa_6.4.2/include/GL/glu.h deleted file mode 100644 index c0bac75a8c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/glu.h +++ /dev/null @@ -1,340 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: This software was created using the -** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has -** not been independently verified as being compliant with the OpenGL(R) -** version 1.2.1 Specification. -*/ - -#ifndef __glu_h__ -#define __glu_h__ - -#if defined(USE_MGL_NAMESPACE) -#include "glu_mangle.h" -#endif - -#include - -#ifndef GLAPIENTRY -#define GLAPIENTRY -#endif - -#ifndef GLAPIENTRYP -#define GLAPIENTRYP GLAPIENTRY * -#endif - -#ifndef GLAPI -#define GLAPI -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************/ - -/* Extensions */ -#define GLU_EXT_object_space_tess 1 -#define GLU_EXT_nurbs_tessellator 1 - -/* Boolean */ -#define GLU_FALSE 0 -#define GLU_TRUE 1 - -/* Version */ -#define GLU_VERSION_1_1 1 -#define GLU_VERSION_1_2 1 -#define GLU_VERSION_1_3 1 - -/* StringName */ -#define GLU_VERSION 100800 -#define GLU_EXTENSIONS 100801 - -/* ErrorCode */ -#define GLU_INVALID_ENUM 100900 -#define GLU_INVALID_VALUE 100901 -#define GLU_OUT_OF_MEMORY 100902 -#define GLU_INCOMPATIBLE_GL_VERSION 100903 -#define GLU_INVALID_OPERATION 100904 - -/* NurbsDisplay */ -/* GLU_FILL */ -#define GLU_OUTLINE_POLYGON 100240 -#define GLU_OUTLINE_PATCH 100241 - -/* NurbsCallback */ -#define GLU_NURBS_ERROR 100103 -#define GLU_ERROR 100103 -#define GLU_NURBS_BEGIN 100164 -#define GLU_NURBS_BEGIN_EXT 100164 -#define GLU_NURBS_VERTEX 100165 -#define GLU_NURBS_VERTEX_EXT 100165 -#define GLU_NURBS_NORMAL 100166 -#define GLU_NURBS_NORMAL_EXT 100166 -#define GLU_NURBS_COLOR 100167 -#define GLU_NURBS_COLOR_EXT 100167 -#define GLU_NURBS_TEXTURE_COORD 100168 -#define GLU_NURBS_TEX_COORD_EXT 100168 -#define GLU_NURBS_END 100169 -#define GLU_NURBS_END_EXT 100169 -#define GLU_NURBS_BEGIN_DATA 100170 -#define GLU_NURBS_BEGIN_DATA_EXT 100170 -#define GLU_NURBS_VERTEX_DATA 100171 -#define GLU_NURBS_VERTEX_DATA_EXT 100171 -#define GLU_NURBS_NORMAL_DATA 100172 -#define GLU_NURBS_NORMAL_DATA_EXT 100172 -#define GLU_NURBS_COLOR_DATA 100173 -#define GLU_NURBS_COLOR_DATA_EXT 100173 -#define GLU_NURBS_TEXTURE_COORD_DATA 100174 -#define GLU_NURBS_TEX_COORD_DATA_EXT 100174 -#define GLU_NURBS_END_DATA 100175 -#define GLU_NURBS_END_DATA_EXT 100175 - -/* NurbsError */ -#define GLU_NURBS_ERROR1 100251 -#define GLU_NURBS_ERROR2 100252 -#define GLU_NURBS_ERROR3 100253 -#define GLU_NURBS_ERROR4 100254 -#define GLU_NURBS_ERROR5 100255 -#define GLU_NURBS_ERROR6 100256 -#define GLU_NURBS_ERROR7 100257 -#define GLU_NURBS_ERROR8 100258 -#define GLU_NURBS_ERROR9 100259 -#define GLU_NURBS_ERROR10 100260 -#define GLU_NURBS_ERROR11 100261 -#define GLU_NURBS_ERROR12 100262 -#define GLU_NURBS_ERROR13 100263 -#define GLU_NURBS_ERROR14 100264 -#define GLU_NURBS_ERROR15 100265 -#define GLU_NURBS_ERROR16 100266 -#define GLU_NURBS_ERROR17 100267 -#define GLU_NURBS_ERROR18 100268 -#define GLU_NURBS_ERROR19 100269 -#define GLU_NURBS_ERROR20 100270 -#define GLU_NURBS_ERROR21 100271 -#define GLU_NURBS_ERROR22 100272 -#define GLU_NURBS_ERROR23 100273 -#define GLU_NURBS_ERROR24 100274 -#define GLU_NURBS_ERROR25 100275 -#define GLU_NURBS_ERROR26 100276 -#define GLU_NURBS_ERROR27 100277 -#define GLU_NURBS_ERROR28 100278 -#define GLU_NURBS_ERROR29 100279 -#define GLU_NURBS_ERROR30 100280 -#define GLU_NURBS_ERROR31 100281 -#define GLU_NURBS_ERROR32 100282 -#define GLU_NURBS_ERROR33 100283 -#define GLU_NURBS_ERROR34 100284 -#define GLU_NURBS_ERROR35 100285 -#define GLU_NURBS_ERROR36 100286 -#define GLU_NURBS_ERROR37 100287 - -/* NurbsProperty */ -#define GLU_AUTO_LOAD_MATRIX 100200 -#define GLU_CULLING 100201 -#define GLU_SAMPLING_TOLERANCE 100203 -#define GLU_DISPLAY_MODE 100204 -#define GLU_PARAMETRIC_TOLERANCE 100202 -#define GLU_SAMPLING_METHOD 100205 -#define GLU_U_STEP 100206 -#define GLU_V_STEP 100207 -#define GLU_NURBS_MODE 100160 -#define GLU_NURBS_MODE_EXT 100160 -#define GLU_NURBS_TESSELLATOR 100161 -#define GLU_NURBS_TESSELLATOR_EXT 100161 -#define GLU_NURBS_RENDERER 100162 -#define GLU_NURBS_RENDERER_EXT 100162 - -/* NurbsSampling */ -#define GLU_OBJECT_PARAMETRIC_ERROR 100208 -#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208 -#define GLU_OBJECT_PATH_LENGTH 100209 -#define GLU_OBJECT_PATH_LENGTH_EXT 100209 -#define GLU_PATH_LENGTH 100215 -#define GLU_PARAMETRIC_ERROR 100216 -#define GLU_DOMAIN_DISTANCE 100217 - -/* NurbsTrim */ -#define GLU_MAP1_TRIM_2 100210 -#define GLU_MAP1_TRIM_3 100211 - -/* QuadricDrawStyle */ -#define GLU_POINT 100010 -#define GLU_LINE 100011 -#define GLU_FILL 100012 -#define GLU_SILHOUETTE 100013 - -/* QuadricCallback */ -/* GLU_ERROR */ - -/* QuadricNormal */ -#define GLU_SMOOTH 100000 -#define GLU_FLAT 100001 -#define GLU_NONE 100002 - -/* QuadricOrientation */ -#define GLU_OUTSIDE 100020 -#define GLU_INSIDE 100021 - -/* TessCallback */ -#define GLU_TESS_BEGIN 100100 -#define GLU_BEGIN 100100 -#define GLU_TESS_VERTEX 100101 -#define GLU_VERTEX 100101 -#define GLU_TESS_END 100102 -#define GLU_END 100102 -#define GLU_TESS_ERROR 100103 -#define GLU_TESS_EDGE_FLAG 100104 -#define GLU_EDGE_FLAG 100104 -#define GLU_TESS_COMBINE 100105 -#define GLU_TESS_BEGIN_DATA 100106 -#define GLU_TESS_VERTEX_DATA 100107 -#define GLU_TESS_END_DATA 100108 -#define GLU_TESS_ERROR_DATA 100109 -#define GLU_TESS_EDGE_FLAG_DATA 100110 -#define GLU_TESS_COMBINE_DATA 100111 - -/* TessContour */ -#define GLU_CW 100120 -#define GLU_CCW 100121 -#define GLU_INTERIOR 100122 -#define GLU_EXTERIOR 100123 -#define GLU_UNKNOWN 100124 - -/* TessProperty */ -#define GLU_TESS_WINDING_RULE 100140 -#define GLU_TESS_BOUNDARY_ONLY 100141 -#define GLU_TESS_TOLERANCE 100142 - -/* TessError */ -#define GLU_TESS_ERROR1 100151 -#define GLU_TESS_ERROR2 100152 -#define GLU_TESS_ERROR3 100153 -#define GLU_TESS_ERROR4 100154 -#define GLU_TESS_ERROR5 100155 -#define GLU_TESS_ERROR6 100156 -#define GLU_TESS_ERROR7 100157 -#define GLU_TESS_ERROR8 100158 -#define GLU_TESS_MISSING_BEGIN_POLYGON 100151 -#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152 -#define GLU_TESS_MISSING_END_POLYGON 100153 -#define GLU_TESS_MISSING_END_CONTOUR 100154 -#define GLU_TESS_COORD_TOO_LARGE 100155 -#define GLU_TESS_NEED_COMBINE_CALLBACK 100156 - -/* TessWinding */ -#define GLU_TESS_WINDING_ODD 100130 -#define GLU_TESS_WINDING_NONZERO 100131 -#define GLU_TESS_WINDING_POSITIVE 100132 -#define GLU_TESS_WINDING_NEGATIVE 100133 -#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134 - -/*************************************************************/ - - -#ifdef __cplusplus -class GLUnurbs; -class GLUquadric; -class GLUtesselator; -#else -typedef struct GLUnurbs GLUnurbs; -typedef struct GLUquadric GLUquadric; -typedef struct GLUtesselator GLUtesselator; -#endif - -typedef GLUnurbs GLUnurbsObj; -typedef GLUquadric GLUquadricObj; -typedef GLUtesselator GLUtesselatorObj; -typedef GLUtesselator GLUtriangulatorObj; - -#define GLU_TESS_MAX_COORD 1.0e150 - -/* Internal convenience typedefs */ -typedef void (GLAPIENTRYP _GLUfuncptr)(); - -GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb); -GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess); -GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb); -GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb); -GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data); -GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data); -GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data); -GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data); -GLAPI GLint GLAPIENTRY gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data); -GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); -GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString); -GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks); -GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb); -GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad); -GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess); -GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops); -GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb); -GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess); -GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb); -GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb); -GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error); -GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data); -GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name); -GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data); -GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view); -GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ); -GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void); -GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void); -GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void); -GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type); -GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc); -GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData); -GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData); -GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type); -GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value); -GLAPI void GLAPIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type); -GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top); -GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep); -GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar); -GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport); -GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ); -GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type); -GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc); -GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw); -GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal); -GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation); -GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture); -GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut); -GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks); -GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess); -GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data); -GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc); -GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess); -GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess); -GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ); -GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data); -GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data); -GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ); -GLAPI GLint GLAPIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW); - -#ifdef __cplusplus -} -#endif - -#endif /* __glu_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/glu_mangle.h b/nx-X11/extras/Mesa_6.4.2/include/GL/glu_mangle.h deleted file mode 100644 index 9c25aa864c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/glu_mangle.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.0 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifndef GLU_MANGLE_H -#define GLU_MANGLE_H - - -#define gluLookAt mgluLookAt -#define gluOrtho2D mgluOrtho2D -#define gluPerspective mgluPerspective -#define gluPickMatrix mgluPickMatrix -#define gluProject mgluProject -#define gluUnProject mgluUnProject -#define gluErrorString mgluErrorString -#define gluScaleImage mgluScaleImage -#define gluBuild1DMipmaps mgluBuild1DMipmaps -#define gluBuild2DMipmaps mgluBuild2DMipmaps -#define gluNewQuadric mgluNewQuadric -#define gluDeleteQuadric mgluDeleteQuadric -#define gluQuadricDrawStyle mgluQuadricDrawStyle -#define gluQuadricOrientation mgluQuadricOrientation -#define gluQuadricNormals mgluQuadricNormals -#define gluQuadricTexture mgluQuadricTexture -#define gluQuadricCallback mgluQuadricCallback -#define gluCylinder mgluCylinder -#define gluSphere mgluSphere -#define gluDisk mgluDisk -#define gluPartialDisk mgluPartialDisk -#define gluNewNurbsRenderer mgluNewNurbsRenderer -#define gluDeleteNurbsRenderer mgluDeleteNurbsRenderer -#define gluLoadSamplingMatrices mgluLoadSamplingMatrices -#define gluNurbsProperty mgluNurbsProperty -#define gluGetNurbsProperty mgluGetNurbsProperty -#define gluBeginCurve mgluBeginCurve -#define gluEndCurve mgluEndCurve -#define gluNurbsCurve mgluNurbsCurve -#define gluBeginSurface mgluBeginSurface -#define gluEndSurface mgluEndSurface -#define gluNurbsSurface mgluNurbsSurface -#define gluBeginTrim mgluBeginTrim -#define gluEndTrim mgluEndTrim -#define gluPwlCurve mgluPwlCurve -#define gluNurbsCallback mgluNurbsCallback -#define gluNewTess mgluNewTess -#define gluDeleteTess mgluDeleteTess -#define gluTessBeginPolygon mgluTessBeginPolygon -#define gluTessBeginContour mgluTessBeginContour -#define gluTessVertex mgluTessVertex -#define gluTessEndPolygon mgluTessEndPolygon -#define gluTessEndContour mgluTessEndContour -#define gluTessProperty mgluTessProperty -#define gluTessNormal mgluTessNormal -#define gluTessCallback mgluTessCallback -#define gluGetTessProperty mgluGetTessProperty -#define gluBeginPolygon mgluBeginPolygon -#define gluNextContour mgluNextContour -#define gluEndPolygon mgluEndPolygon -#define gluGetString mgluGetString -#define gluBuild1DMipmapLevels mgluBuild1DMipmapLevels -#define gluBuild2DMipmapLevels mgluBuild2DMipmapLevels -#define gluBuild3DMipmapLevels mgluBuild3DMipmapLevels -#define gluBuild3DMipmaps mgluBuild3DMipmaps -#define gluCheckExtension mgluCheckExtension -#define gluUnProject4 mgluUnProject4 -#define gluNurbsCallbackData mgluNurbsCallbackData -#define gluNurbsCallbackDataEXT mgluNurbsCallbackDataEXT - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/glut.h b/nx-X11/extras/Mesa_6.4.2/include/GL/glut.h deleted file mode 100644 index 23c740ee11..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/glut.h +++ /dev/null @@ -1,748 +0,0 @@ -#ifndef __glut_h__ -#define __glut_h__ - -/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */ - -/* This program is freely distributable without licensing fees and is - provided without guarantee or warrantee expressed or implied. This - program is -not- in the public domain. */ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(_WIN32) - -/* GLUT 3.7 now tries to avoid including - to avoid name space pollution, but Win32's - needs APIENTRY and WINGDIAPI defined properly. - - tjump@spgs.com contributes: - If users are building glut code on MS Windows, then they should - make sure they include windows.h early, let's not get into a - header definitions war since MS has proven it's capability to - change header dependencies w/o publishing they have done so. - - So, let's not include windows.h here, as it's not really required and - MS own gl/gl.h *should* include it if the dependency is there. */ - -/* To disable automatic library usage for GLUT, define GLUT_NO_LIB_PRAGMA - in your compile preprocessor options. */ -# if !defined(GLUT_BUILDING_LIB) && !defined(GLUT_NO_LIB_PRAGMA) -# pragma comment (lib, "winmm.lib") /* link with Windows MultiMedia lib */ -/* To enable automatic SGI OpenGL for Windows library usage for GLUT, - define GLUT_USE_SGI_OPENGL in your compile preprocessor options. */ -# ifdef GLUT_USE_SGI_OPENGL -# pragma comment (lib, "opengl.lib") /* link with SGI OpenGL for Windows lib */ -# pragma comment (lib, "glu.lib") /* link with SGI OpenGL Utility lib */ -# pragma comment (lib, "glut.lib") /* link with Win32 GLUT for SGI OpenGL lib */ -# else -# pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */ -# pragma comment (lib, "glu32.lib") /* link with Microsoft OpenGL Utility lib */ -# pragma comment (lib, "glut32.lib") /* link with Win32 GLUT lib */ -# endif -# endif - -/* To disable supression of annoying warnings about floats being promoted - to doubles, define GLUT_NO_WARNING_DISABLE in your compile preprocessor - options. */ -# ifndef GLUT_NO_WARNING_DISABLE -# pragma warning (disable:4244) /* Disable bogus VC++ 4.2 conversion warnings. */ -# pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */ -# endif - -/* Win32 has an annoying issue where there are multiple C run-time - libraries (CRTs). If the executable is linked with a different CRT - from the GLUT DLL, the GLUT DLL will not share the same CRT static - data seen by the executable. In particular, atexit callbacks registered - in the executable will not be called if GLUT calls its (different) - exit routine). GLUT is typically built with the - "/MD" option (the CRT with multithreading DLL support), but the Visual - C++ linker default is "/ML" (the single threaded CRT). - - One workaround to this issue is requiring users to always link with - the same CRT as GLUT is compiled with. That requires users supply a - non-standard option. GLUT 3.7 has its own built-in workaround where - the executable's "exit" function pointer is covertly passed to GLUT. - GLUT then calls the executable's exit function pointer to ensure that - any "atexit" calls registered by the application are called if GLUT - needs to exit. - - Note that the __glut*WithExit routines should NEVER be called directly. - To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */ - -/* XXX This is from Win32's */ -# if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__cdecl) - /* Define __cdecl for non-Microsoft compilers. */ -# define __cdecl -# define GLUT_DEFINED___CDECL -# endif -# ifndef _CRTIMP -# ifdef _NTSDK - /* Definition compatible with NT SDK */ -# define _CRTIMP -# else - /* Current definition */ -# ifdef _DLL -# define _CRTIMP __declspec(dllimport) -# else -# define _CRTIMP -# endif -# endif -# define GLUT_DEFINED__CRTIMP -# endif -# ifndef GLUT_BUILDING_LIB -extern _CRTIMP void __cdecl exit(int); -# endif - -/* GLUT callback calling convention for Win32. */ -# define GLUTCALLBACK __cdecl - -/* for callback/function pointer defs */ -# define GLUTAPIENTRYV __cdecl - -/* glut-win32 specific macros, defined to prevent collision with - and redifinition of Windows system defs, also removes requirement of - pretty much any standard windows header from this file */ - -#if (_MSC_VER >= 800) || defined(__MINGW32__) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__) -# define GLUTAPIENTRY __stdcall -#else -# define GLUTAPIENTRY -#endif - -/* GLUT API entry point declarations for Win32. */ -#if defined(GLUT_BUILDING_LIB) && defined(_DLL) -# define GLUTAPI __declspec(dllexport) -#elif defined(_DLL) -# define GLUTAPI __declspec(dllimport) -#else -# define GLUTAPI extern -#endif - -#if defined(_WIN32) && !defined(_WINDEF_) && !defined(MESA) -# if !defined(MESA_MINWARN) -# pragma message( "note: WINDOWS.H not included, providing Mesa definition of CALLBACK macro" ) -# pragma message( "----: and PROC typedef. If you receive compiler warnings about either ") -# pragma message( "----: being multiply defined you should include WINDOWS.H priot to gl/glut.h" ) -# endif -# define CALLBACK __stdcall -typedef int (GLUTAPIENTRY *PROC)(); -typedef void *HGLRC; -typedef void *HDC; -typedef unsigned long COLORREF; -#endif - -#if defined(_WIN32) && !defined(_WINGDI_) && !defined(MESA) -# if !defined(MESA_MINWARN) -# pragma message( "note: WINDOWS.H not included, providing Mesa definition of wgl functions" ) -# pragma message( "----: and macros. If you receive compiler warnings about any being multiply ") -# pragma message( "----: defined you should include WINDOWS.H priot to gl/glut.h" ) -# endif -# define WGL_FONT_LINES 0 -# define WGL_FONT_POLYGONS 1 -# ifdef UNICODE -# define wglUseFontBitmaps wglUseFontBitmapsW -# define wglUseFontOutlines wglUseFontOutlinesW -# else -# define wglUseFontBitmaps wglUseFontBitmapsA -# define wglUseFontOutlines wglUseFontOutlinesA -# endif /* !UNICODE */ -typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR; -typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT; -# pragma warning( push ) -# pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */ -# define WGLAPI __declspec(dllimport) -WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC); -WGLAPI int GLAPIENTRY wglMakeCurrent(HDC,HGLRC); -WGLAPI int GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *); -WGLAPI int GLAPIENTRY wglSwapBuffers(HDC hdc); -WGLAPI HDC GLAPIENTRY wglGetCurrentDC(void); -WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC); -WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int); -WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void); -WGLAPI PROC GLAPIENTRY wglGetProcAddress(const char*); -WGLAPI int GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *); -WGLAPI int GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int); -WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC); -WGLAPI int GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR); -WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR); -WGLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *); -WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc); -WGLAPI int GLAPIENTRY wglMakeCurrent(HDC, HGLRC); -WGLAPI int GLAPIENTRY wglRealizeLayerPalette(HDC, int, int); -WGLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *); -WGLAPI int GLAPIENTRY wglShareLists(HGLRC, HGLRC); -WGLAPI int GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int); -WGLAPI int GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long); -WGLAPI int GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long); -WGLAPI int GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT); -WGLAPI int GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT); -WGLAPI int GLAPIENTRY SwapBuffers(HDC); -WGLAPI int GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *); -WGLAPI int GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR); -WGLAPI int GLAPIENTRY GetPixelFormat(HDC); -WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *); -# undef WGLAPI -# pragma warning( pop ) -#endif - -#else /* _WIN32 not defined */ - -/* Define GLUTAPIENTRY and GLUTCALLBACK to nothing if we aren't on Win32. */ -# define GLUTAPIENTRY GLAPIENTRY -# define GLUTAPIENTRYV -# define GLUTCALLBACK -# define GLUTAPI extern - -#endif - - -/** - GLUT API revision history: - - GLUT_API_VERSION is updated to reflect incompatible GLUT - API changes (interface changes, semantic changes, deletions, - or additions). - - GLUT_API_VERSION=1 First public release of GLUT. 11/29/94 - - GLUT_API_VERSION=2 Added support for OpenGL/GLX multisampling, - extension. Supports new input devices like tablet, dial and button - box, and Spaceball. Easy to query OpenGL extensions. - - GLUT_API_VERSION=3 glutMenuStatus added. - - GLUT_API_VERSION=4 glutInitDisplayString, glutWarpPointer, - glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic - video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc, - glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat, - glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!). - - GLUT_API_VERSION=5 glutGetProcAddress (added by BrianP) -**/ -#ifndef GLUT_API_VERSION /* allow this to be overriden */ -#define GLUT_API_VERSION 5 -#endif - -/** - GLUT implementation revision history: - - GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT - API revisions and implementation revisions (ie, bug fixes). - - GLUT_XLIB_IMPLEMENTATION=1 mjk's first public release of - GLUT Xlib-based implementation. 11/29/94 - - GLUT_XLIB_IMPLEMENTATION=2 mjk's second public release of - GLUT Xlib-based implementation providing GLUT version 2 - interfaces. - - GLUT_XLIB_IMPLEMENTATION=3 mjk's GLUT 2.2 images. 4/17/95 - - GLUT_XLIB_IMPLEMENTATION=4 mjk's GLUT 2.3 images. 6/?/95 - - GLUT_XLIB_IMPLEMENTATION=5 mjk's GLUT 3.0 images. 10/?/95 - - GLUT_XLIB_IMPLEMENTATION=7 mjk's GLUT 3.1+ with glutWarpPoitner. 7/24/96 - - GLUT_XLIB_IMPLEMENTATION=8 mjk's GLUT 3.1+ with glutWarpPoitner - and video resize. 1/3/97 - - GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routines. - - GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release. - - GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routines + signal handling. - - GLUT_XLIB_IMPLEMENTATION=13 mjk's GLUT 3.7 beta with GameGLUT support. - - GLUT_XLIB_IMPLEMENTATION=14 mjk's GLUT 3.7 beta with f90gl friend interface. - - GLUT_XLIB_IMPLEMENTATION=15 mjk's GLUT 3.7 beta sync'ed with Mesa -**/ -#ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overriden. */ -#define GLUT_XLIB_IMPLEMENTATION 15 -#endif - -/* Display mode bit masks. */ -#define GLUT_RGB 0 -#define GLUT_RGBA GLUT_RGB -#define GLUT_INDEX 1 -#define GLUT_SINGLE 0 -#define GLUT_DOUBLE 2 -#define GLUT_ACCUM 4 -#define GLUT_ALPHA 8 -#define GLUT_DEPTH 16 -#define GLUT_STENCIL 32 -#if (GLUT_API_VERSION >= 2) -#define GLUT_MULTISAMPLE 128 -#define GLUT_STEREO 256 -#endif -#if (GLUT_API_VERSION >= 3) -#define GLUT_LUMINANCE 512 -#endif - -/* Mouse buttons. */ -#define GLUT_LEFT_BUTTON 0 -#define GLUT_MIDDLE_BUTTON 1 -#define GLUT_RIGHT_BUTTON 2 - -/* Mouse button state. */ -#define GLUT_DOWN 0 -#define GLUT_UP 1 - -#if (GLUT_API_VERSION >= 2) -/* function keys */ -#define GLUT_KEY_F1 1 -#define GLUT_KEY_F2 2 -#define GLUT_KEY_F3 3 -#define GLUT_KEY_F4 4 -#define GLUT_KEY_F5 5 -#define GLUT_KEY_F6 6 -#define GLUT_KEY_F7 7 -#define GLUT_KEY_F8 8 -#define GLUT_KEY_F9 9 -#define GLUT_KEY_F10 10 -#define GLUT_KEY_F11 11 -#define GLUT_KEY_F12 12 -/* directional keys */ -#define GLUT_KEY_LEFT 100 -#define GLUT_KEY_UP 101 -#define GLUT_KEY_RIGHT 102 -#define GLUT_KEY_DOWN 103 -#define GLUT_KEY_PAGE_UP 104 -#define GLUT_KEY_PAGE_DOWN 105 -#define GLUT_KEY_HOME 106 -#define GLUT_KEY_END 107 -#define GLUT_KEY_INSERT 108 -#endif - -/* Entry/exit state. */ -#define GLUT_LEFT 0 -#define GLUT_ENTERED 1 - -/* Menu usage state. */ -#define GLUT_MENU_NOT_IN_USE 0 -#define GLUT_MENU_IN_USE 1 - -/* Visibility state. */ -#define GLUT_NOT_VISIBLE 0 -#define GLUT_VISIBLE 1 - -/* Window status state. */ -#define GLUT_HIDDEN 0 -#define GLUT_FULLY_RETAINED 1 -#define GLUT_PARTIALLY_RETAINED 2 -#define GLUT_FULLY_COVERED 3 - -/* Color index component selection values. */ -#define GLUT_RED 0 -#define GLUT_GREEN 1 -#define GLUT_BLUE 2 - -/* Layers for use. */ -#define GLUT_NORMAL 0 -#define GLUT_OVERLAY 1 - -#if defined(_WIN32) || defined (GLUT_IMPORT_LIB) -/* Stroke font constants (use these in GLUT program). */ -#define GLUT_STROKE_ROMAN ((void*)0) -#define GLUT_STROKE_MONO_ROMAN ((void*)1) - -/* Bitmap font constants (use these in GLUT program). */ -#define GLUT_BITMAP_9_BY_15 ((void*)2) -#define GLUT_BITMAP_8_BY_13 ((void*)3) -#define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4) -#define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5) -#if (GLUT_API_VERSION >= 3) -#define GLUT_BITMAP_HELVETICA_10 ((void*)6) -#define GLUT_BITMAP_HELVETICA_12 ((void*)7) -#define GLUT_BITMAP_HELVETICA_18 ((void*)8) -#endif -#else -/* Stroke font opaque addresses (use constants instead in source code). */ -GLUTAPI void *glutStrokeRoman; -GLUTAPI void *glutStrokeMonoRoman; - -/* Stroke font constants (use these in GLUT program). */ -#define GLUT_STROKE_ROMAN (&glutStrokeRoman) -#define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman) - -/* Bitmap font opaque addresses (use constants instead in source code). */ -GLUTAPI void *glutBitmap9By15; -GLUTAPI void *glutBitmap8By13; -GLUTAPI void *glutBitmapTimesRoman10; -GLUTAPI void *glutBitmapTimesRoman24; -GLUTAPI void *glutBitmapHelvetica10; -GLUTAPI void *glutBitmapHelvetica12; -GLUTAPI void *glutBitmapHelvetica18; - -/* Bitmap font constants (use these in GLUT program). */ -#define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15) -#define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13) -#define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10) -#define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24) -#if (GLUT_API_VERSION >= 3) -#define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10) -#define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12) -#define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18) -#endif -#endif - -/* glutGet parameters. */ -#define GLUT_WINDOW_X 100 -#define GLUT_WINDOW_Y 101 -#define GLUT_WINDOW_WIDTH 102 -#define GLUT_WINDOW_HEIGHT 103 -#define GLUT_WINDOW_BUFFER_SIZE 104 -#define GLUT_WINDOW_STENCIL_SIZE 105 -#define GLUT_WINDOW_DEPTH_SIZE 106 -#define GLUT_WINDOW_RED_SIZE 107 -#define GLUT_WINDOW_GREEN_SIZE 108 -#define GLUT_WINDOW_BLUE_SIZE 109 -#define GLUT_WINDOW_ALPHA_SIZE 110 -#define GLUT_WINDOW_ACCUM_RED_SIZE 111 -#define GLUT_WINDOW_ACCUM_GREEN_SIZE 112 -#define GLUT_WINDOW_ACCUM_BLUE_SIZE 113 -#define GLUT_WINDOW_ACCUM_ALPHA_SIZE 114 -#define GLUT_WINDOW_DOUBLEBUFFER 115 -#define GLUT_WINDOW_RGBA 116 -#define GLUT_WINDOW_PARENT 117 -#define GLUT_WINDOW_NUM_CHILDREN 118 -#define GLUT_WINDOW_COLORMAP_SIZE 119 -#if (GLUT_API_VERSION >= 2) -#define GLUT_WINDOW_NUM_SAMPLES 120 -#define GLUT_WINDOW_STEREO 121 -#endif -#if (GLUT_API_VERSION >= 3) -#define GLUT_WINDOW_CURSOR 122 -#endif -#define GLUT_SCREEN_WIDTH 200 -#define GLUT_SCREEN_HEIGHT 201 -#define GLUT_SCREEN_WIDTH_MM 202 -#define GLUT_SCREEN_HEIGHT_MM 203 -#define GLUT_MENU_NUM_ITEMS 300 -#define GLUT_DISPLAY_MODE_POSSIBLE 400 -#define GLUT_INIT_WINDOW_X 500 -#define GLUT_INIT_WINDOW_Y 501 -#define GLUT_INIT_WINDOW_WIDTH 502 -#define GLUT_INIT_WINDOW_HEIGHT 503 -#define GLUT_INIT_DISPLAY_MODE 504 -#if (GLUT_API_VERSION >= 2) -#define GLUT_ELAPSED_TIME 700 -#endif -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) -#define GLUT_WINDOW_FORMAT_ID 123 -#endif - -#if (GLUT_API_VERSION >= 2) -/* glutDeviceGet parameters. */ -#define GLUT_HAS_KEYBOARD 600 -#define GLUT_HAS_MOUSE 601 -#define GLUT_HAS_SPACEBALL 602 -#define GLUT_HAS_DIAL_AND_BUTTON_BOX 603 -#define GLUT_HAS_TABLET 604 -#define GLUT_NUM_MOUSE_BUTTONS 605 -#define GLUT_NUM_SPACEBALL_BUTTONS 606 -#define GLUT_NUM_BUTTON_BOX_BUTTONS 607 -#define GLUT_NUM_DIALS 608 -#define GLUT_NUM_TABLET_BUTTONS 609 -#endif -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) -#define GLUT_DEVICE_IGNORE_KEY_REPEAT 610 -#define GLUT_DEVICE_KEY_REPEAT 611 -#define GLUT_HAS_JOYSTICK 612 -#define GLUT_OWNS_JOYSTICK 613 -#define GLUT_JOYSTICK_BUTTONS 614 -#define GLUT_JOYSTICK_AXES 615 -#define GLUT_JOYSTICK_POLL_RATE 616 -#endif - -#if (GLUT_API_VERSION >= 3) -/* glutLayerGet parameters. */ -#define GLUT_OVERLAY_POSSIBLE 800 -#define GLUT_LAYER_IN_USE 801 -#define GLUT_HAS_OVERLAY 802 -#define GLUT_TRANSPARENT_INDEX 803 -#define GLUT_NORMAL_DAMAGED 804 -#define GLUT_OVERLAY_DAMAGED 805 - -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -/* glutVideoResizeGet parameters. */ -#define GLUT_VIDEO_RESIZE_POSSIBLE 900 -#define GLUT_VIDEO_RESIZE_IN_USE 901 -#define GLUT_VIDEO_RESIZE_X_DELTA 902 -#define GLUT_VIDEO_RESIZE_Y_DELTA 903 -#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 904 -#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 905 -#define GLUT_VIDEO_RESIZE_X 906 -#define GLUT_VIDEO_RESIZE_Y 907 -#define GLUT_VIDEO_RESIZE_WIDTH 908 -#define GLUT_VIDEO_RESIZE_HEIGHT 909 -#endif - -/* glutUseLayer parameters. */ -#define GLUT_NORMAL 0 -#define GLUT_OVERLAY 1 - -/* glutGetModifiers return mask. */ -#define GLUT_ACTIVE_SHIFT 1 -#define GLUT_ACTIVE_CTRL 2 -#define GLUT_ACTIVE_ALT 4 - -/* glutSetCursor parameters. */ -/* Basic arrows. */ -#define GLUT_CURSOR_RIGHT_ARROW 0 -#define GLUT_CURSOR_LEFT_ARROW 1 -/* Symbolic cursor shapes. */ -#define GLUT_CURSOR_INFO 2 -#define GLUT_CURSOR_DESTROY 3 -#define GLUT_CURSOR_HELP 4 -#define GLUT_CURSOR_CYCLE 5 -#define GLUT_CURSOR_SPRAY 6 -#define GLUT_CURSOR_WAIT 7 -#define GLUT_CURSOR_TEXT 8 -#define GLUT_CURSOR_CROSSHAIR 9 -/* Directional cursors. */ -#define GLUT_CURSOR_UP_DOWN 10 -#define GLUT_CURSOR_LEFT_RIGHT 11 -/* Sizing cursors. */ -#define GLUT_CURSOR_TOP_SIDE 12 -#define GLUT_CURSOR_BOTTOM_SIDE 13 -#define GLUT_CURSOR_LEFT_SIDE 14 -#define GLUT_CURSOR_RIGHT_SIDE 15 -#define GLUT_CURSOR_TOP_LEFT_CORNER 16 -#define GLUT_CURSOR_TOP_RIGHT_CORNER 17 -#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18 -#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 19 -/* Inherit from parent window. */ -#define GLUT_CURSOR_INHERIT 100 -/* Blank cursor. */ -#define GLUT_CURSOR_NONE 101 -/* Fullscreen crosshair (if available). */ -#define GLUT_CURSOR_FULL_CROSSHAIR 102 -#endif - -/* GLUT initialization sub-API. */ -GLUTAPI void GLUTAPIENTRY glutInit(int *argcp, char **argv); -#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) -GLUTAPI void GLUTAPIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int)); -#ifndef GLUT_BUILDING_LIB -static void GLUTAPIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); } -#define glutInit glutInit_ATEXIT_HACK -#endif -#endif -GLUTAPI void GLUTAPIENTRY glutInitDisplayMode(unsigned int mode); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -GLUTAPI void GLUTAPIENTRY glutInitDisplayString(const char *string); -#endif -GLUTAPI void GLUTAPIENTRY glutInitWindowPosition(int x, int y); -GLUTAPI void GLUTAPIENTRY glutInitWindowSize(int width, int height); -GLUTAPI void GLUTAPIENTRY glutMainLoop(void); - -/* GLUT window sub-API. */ -GLUTAPI int GLUTAPIENTRY glutCreateWindow(const char *title); -#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) -GLUTAPI int GLUTAPIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int)); -#ifndef GLUT_BUILDING_LIB -static int GLUTAPIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); } -#define glutCreateWindow glutCreateWindow_ATEXIT_HACK -#endif -#endif -GLUTAPI int GLUTAPIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height); -GLUTAPI void GLUTAPIENTRY glutDestroyWindow(int win); -GLUTAPI void GLUTAPIENTRY glutPostRedisplay(void); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11) -GLUTAPI void GLUTAPIENTRY glutPostWindowRedisplay(int win); -#endif -GLUTAPI void GLUTAPIENTRY glutSwapBuffers(void); -GLUTAPI int GLUTAPIENTRY glutGetWindow(void); -GLUTAPI void GLUTAPIENTRY glutSetWindow(int win); -GLUTAPI void GLUTAPIENTRY glutSetWindowTitle(const char *title); -GLUTAPI void GLUTAPIENTRY glutSetIconTitle(const char *title); -GLUTAPI void GLUTAPIENTRY glutPositionWindow(int x, int y); -GLUTAPI void GLUTAPIENTRY glutReshapeWindow(int width, int height); -GLUTAPI void GLUTAPIENTRY glutPopWindow(void); -GLUTAPI void GLUTAPIENTRY glutPushWindow(void); -GLUTAPI void GLUTAPIENTRY glutIconifyWindow(void); -GLUTAPI void GLUTAPIENTRY glutShowWindow(void); -GLUTAPI void GLUTAPIENTRY glutHideWindow(void); -#if (GLUT_API_VERSION >= 3) -GLUTAPI void GLUTAPIENTRY glutFullScreen(void); -GLUTAPI void GLUTAPIENTRY glutSetCursor(int cursor); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -GLUTAPI void GLUTAPIENTRY glutWarpPointer(int x, int y); -#endif - -/* GLUT overlay sub-API. */ -GLUTAPI void GLUTAPIENTRY glutEstablishOverlay(void); -GLUTAPI void GLUTAPIENTRY glutRemoveOverlay(void); -GLUTAPI void GLUTAPIENTRY glutUseLayer(GLenum layer); -GLUTAPI void GLUTAPIENTRY glutPostOverlayRedisplay(void); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11) -GLUTAPI void GLUTAPIENTRY glutPostWindowOverlayRedisplay(int win); -#endif -GLUTAPI void GLUTAPIENTRY glutShowOverlay(void); -GLUTAPI void GLUTAPIENTRY glutHideOverlay(void); -#endif - -/* GLUT menu sub-API. */ -GLUTAPI int GLUTAPIENTRY glutCreateMenu(void (GLUTCALLBACK *func)(int)); -#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) -GLUTAPI int GLUTAPIENTRY __glutCreateMenuWithExit(void (GLUTCALLBACK *func)(int), void (__cdecl *exitfunc)(int)); -#ifndef GLUT_BUILDING_LIB -static int GLUTAPIENTRY glutCreateMenu_ATEXIT_HACK(void (GLUTCALLBACK *func)(int)) { return __glutCreateMenuWithExit(func, exit); } -#define glutCreateMenu glutCreateMenu_ATEXIT_HACK -#endif -#endif -GLUTAPI void GLUTAPIENTRY glutDestroyMenu(int menu); -GLUTAPI int GLUTAPIENTRY glutGetMenu(void); -GLUTAPI void GLUTAPIENTRY glutSetMenu(int menu); -GLUTAPI void GLUTAPIENTRY glutAddMenuEntry(const char *label, int value); -GLUTAPI void GLUTAPIENTRY glutAddSubMenu(const char *label, int submenu); -GLUTAPI void GLUTAPIENTRY glutChangeToMenuEntry(int item, const char *label, int value); -GLUTAPI void GLUTAPIENTRY glutChangeToSubMenu(int item, const char *label, int submenu); -GLUTAPI void GLUTAPIENTRY glutRemoveMenuItem(int item); -GLUTAPI void GLUTAPIENTRY glutAttachMenu(int button); -GLUTAPI void GLUTAPIENTRY glutDetachMenu(int button); - -/* GLUT window callback sub-API. */ -GLUTAPI void GLUTAPIENTRY glutDisplayFunc(void (GLUTCALLBACK *func)(void)); -GLUTAPI void GLUTAPIENTRY glutReshapeFunc(void (GLUTCALLBACK *func)(int width, int height)); -GLUTAPI void GLUTAPIENTRY glutKeyboardFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y)); -GLUTAPI void GLUTAPIENTRY glutMouseFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y)); -GLUTAPI void GLUTAPIENTRY glutMotionFunc(void (GLUTCALLBACK *func)(int x, int y)); -GLUTAPI void GLUTAPIENTRY glutPassiveMotionFunc(void (GLUTCALLBACK *func)(int x, int y)); -GLUTAPI void GLUTAPIENTRY glutEntryFunc(void (GLUTCALLBACK *func)(int state)); -GLUTAPI void GLUTAPIENTRY glutVisibilityFunc(void (GLUTCALLBACK *func)(int state)); -GLUTAPI void GLUTAPIENTRY glutIdleFunc(void (GLUTCALLBACK *func)(void)); -GLUTAPI void GLUTAPIENTRY glutTimerFunc(unsigned int millis, void (GLUTCALLBACK *func)(int value), int value); -GLUTAPI void GLUTAPIENTRY glutMenuStateFunc(void (GLUTCALLBACK *func)(int state)); -#if (GLUT_API_VERSION >= 2) -GLUTAPI void GLUTAPIENTRY glutSpecialFunc(void (GLUTCALLBACK *func)(int key, int x, int y)); -GLUTAPI void GLUTAPIENTRY glutSpaceballMotionFunc(void (GLUTCALLBACK *func)(int x, int y, int z)); -GLUTAPI void GLUTAPIENTRY glutSpaceballRotateFunc(void (GLUTCALLBACK *func)(int x, int y, int z)); -GLUTAPI void GLUTAPIENTRY glutSpaceballButtonFunc(void (GLUTCALLBACK *func)(int button, int state)); -GLUTAPI void GLUTAPIENTRY glutButtonBoxFunc(void (GLUTCALLBACK *func)(int button, int state)); -GLUTAPI void GLUTAPIENTRY glutDialsFunc(void (GLUTCALLBACK *func)(int dial, int value)); -GLUTAPI void GLUTAPIENTRY glutTabletMotionFunc(void (GLUTCALLBACK *func)(int x, int y)); -GLUTAPI void GLUTAPIENTRY glutTabletButtonFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y)); -#if (GLUT_API_VERSION >= 3) -GLUTAPI void GLUTAPIENTRY glutMenuStatusFunc(void (GLUTCALLBACK *func)(int status, int x, int y)); -GLUTAPI void GLUTAPIENTRY glutOverlayDisplayFunc(void (GLUTCALLBACK *func)(void)); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -GLUTAPI void GLUTAPIENTRY glutWindowStatusFunc(void (GLUTCALLBACK *func)(int state)); -#endif -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) -GLUTAPI void GLUTAPIENTRY glutKeyboardUpFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y)); -GLUTAPI void GLUTAPIENTRY glutSpecialUpFunc(void (GLUTCALLBACK *func)(int key, int x, int y)); -GLUTAPI void GLUTAPIENTRY glutJoystickFunc(void (GLUTCALLBACK *func)(unsigned int buttonMask, int x, int y, int z), int pollInterval); -#endif -#endif -#endif - -/* GLUT color index sub-API. */ -GLUTAPI void GLUTAPIENTRY glutSetColor(int ndx, GLfloat red, GLfloat green, GLfloat blue); -GLUTAPI GLfloat GLUTAPIENTRY glutGetColor(int ndx, int component); -GLUTAPI void GLUTAPIENTRY glutCopyColormap(int win); - -/* GLUT state retrieval sub-API. */ -GLUTAPI int GLUTAPIENTRY glutGet(GLenum type); -GLUTAPI int GLUTAPIENTRY glutDeviceGet(GLenum type); -#if (GLUT_API_VERSION >= 2) -/* GLUT extension support sub-API */ -GLUTAPI int GLUTAPIENTRY glutExtensionSupported(const char *name); -#endif -#if (GLUT_API_VERSION >= 3) -GLUTAPI int GLUTAPIENTRY glutGetModifiers(void); -GLUTAPI int GLUTAPIENTRY glutLayerGet(GLenum type); -#endif -#if (GLUT_API_VERSION >= 5) -typedef void (*GLUTproc)(); -GLUTAPI GLUTproc GLUTAPIENTRY glutGetProcAddress(const char *procName); -#endif - -/* GLUT font sub-API */ -GLUTAPI void GLUTAPIENTRY glutBitmapCharacter(void *font, int character); -GLUTAPI int GLUTAPIENTRY glutBitmapWidth(void *font, int character); -GLUTAPI void GLUTAPIENTRY glutStrokeCharacter(void *font, int character); -GLUTAPI int GLUTAPIENTRY glutStrokeWidth(void *font, int character); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -GLUTAPI int GLUTAPIENTRY glutBitmapLength(void *font, const unsigned char *string); -GLUTAPI int GLUTAPIENTRY glutStrokeLength(void *font, const unsigned char *string); -#endif - -/* GLUT pre-built models sub-API */ -GLUTAPI void GLUTAPIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks); -GLUTAPI void GLUTAPIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks); -GLUTAPI void GLUTAPIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); -GLUTAPI void GLUTAPIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); -GLUTAPI void GLUTAPIENTRY glutWireCube(GLdouble size); -GLUTAPI void GLUTAPIENTRY glutSolidCube(GLdouble size); -GLUTAPI void GLUTAPIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); -GLUTAPI void GLUTAPIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); -GLUTAPI void GLUTAPIENTRY glutWireDodecahedron(void); -GLUTAPI void GLUTAPIENTRY glutSolidDodecahedron(void); -GLUTAPI void GLUTAPIENTRY glutWireTeapot(GLdouble size); -GLUTAPI void GLUTAPIENTRY glutSolidTeapot(GLdouble size); -GLUTAPI void GLUTAPIENTRY glutWireOctahedron(void); -GLUTAPI void GLUTAPIENTRY glutSolidOctahedron(void); -GLUTAPI void GLUTAPIENTRY glutWireTetrahedron(void); -GLUTAPI void GLUTAPIENTRY glutSolidTetrahedron(void); -GLUTAPI void GLUTAPIENTRY glutWireIcosahedron(void); -GLUTAPI void GLUTAPIENTRY glutSolidIcosahedron(void); - -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -/* GLUT video resize sub-API. */ -GLUTAPI int GLUTAPIENTRY glutVideoResizeGet(GLenum param); -GLUTAPI void GLUTAPIENTRY glutSetupVideoResizing(void); -GLUTAPI void GLUTAPIENTRY glutStopVideoResizing(void); -GLUTAPI void GLUTAPIENTRY glutVideoResize(int x, int y, int width, int height); -GLUTAPI void GLUTAPIENTRY glutVideoPan(int x, int y, int width, int height); - -/* GLUT debugging sub-API. */ -GLUTAPI void GLUTAPIENTRY glutReportErrors(void); -#endif - -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) -/* GLUT device control sub-API. */ -/* glutSetKeyRepeat modes. */ -#define GLUT_KEY_REPEAT_OFF 0 -#define GLUT_KEY_REPEAT_ON 1 -#define GLUT_KEY_REPEAT_DEFAULT 2 - -/* Joystick button masks. */ -#define GLUT_JOYSTICK_BUTTON_A 1 -#define GLUT_JOYSTICK_BUTTON_B 2 -#define GLUT_JOYSTICK_BUTTON_C 4 -#define GLUT_JOYSTICK_BUTTON_D 8 - -GLUTAPI void GLUTAPIENTRY glutIgnoreKeyRepeat(int ignore); -GLUTAPI void GLUTAPIENTRY glutSetKeyRepeat(int repeatMode); -GLUTAPI void GLUTAPIENTRY glutForceJoystickFunc(void); - -/* GLUT game mode sub-API. */ -/* glutGameModeGet. */ -#define GLUT_GAME_MODE_ACTIVE 0 -#define GLUT_GAME_MODE_POSSIBLE 1 -#define GLUT_GAME_MODE_WIDTH 2 -#define GLUT_GAME_MODE_HEIGHT 3 -#define GLUT_GAME_MODE_PIXEL_DEPTH 4 -#define GLUT_GAME_MODE_REFRESH_RATE 5 -#define GLUT_GAME_MODE_DISPLAY_CHANGED 6 - -GLUTAPI void GLUTAPIENTRY glutGameModeString(const char *string); -GLUTAPI int GLUTAPIENTRY glutEnterGameMode(void); -GLUTAPI void GLUTAPIENTRY glutLeaveGameMode(void); -GLUTAPI int GLUTAPIENTRY glutGameModeGet(GLenum mode); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __glut_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/glut_h.dja b/nx-X11/extras/Mesa_6.4.2/include/GL/glut_h.dja deleted file mode 100644 index e76dcb985e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/glut_h.dja +++ /dev/null @@ -1,340 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.1 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * This header file is based on the REAL glut.h by Mark J. Kilgard. - * - * The DJGPP/ALLEGRO (DJA) GLUT implementation was written by - * Bernhard Tschirren (bernie-t@geocities.com) for the sole purpose - * of compiling all the sample programs (which use GLUT). Therefore, - * is NOT AT ALL a complete version of GLUT! - */ - - -#ifndef __AGLUT_H__ -#define __AGLUT_H__ - -#include -#include - -#define GLUTCALLBACK -#define APIENTRY -#define GLUTAPI extern - -#define GLUT_RGB 0 -#define GLUT_RGBA GLUT_RGB -#define GLUT_INDEX 1 -#define GLUT_SINGLE 0 -#define GLUT_DOUBLE 2 -#define GLUT_ACCUM 4 -#define GLUT_ALPHA 8 -#define GLUT_DEPTH 16 -#define GLUT_STENCIL 32 - -/* Mouse buttons. */ -#define GLUT_LEFT_BUTTON 0 -#define GLUT_MIDDLE_BUTTON 1 -#define GLUT_RIGHT_BUTTON 2 - -/* Mouse button state. */ -#define GLUT_DOWN 0 -#define GLUT_UP 1 - -/* function keys */ -#define GLUT_KEY_F1 1 -#define GLUT_KEY_F2 2 -#define GLUT_KEY_F3 3 -#define GLUT_KEY_F4 4 -#define GLUT_KEY_F5 5 -#define GLUT_KEY_F6 6 -#define GLUT_KEY_F7 7 -#define GLUT_KEY_F8 8 -#define GLUT_KEY_F9 9 -#define GLUT_KEY_F10 10 -#define GLUT_KEY_F11 11 -#define GLUT_KEY_F12 12 - -/* directional keys */ -#define GLUT_KEY_LEFT 100 -#define GLUT_KEY_UP 101 -#define GLUT_KEY_RIGHT 102 -#define GLUT_KEY_DOWN 103 -#define GLUT_KEY_PAGE_UP 104 -#define GLUT_KEY_PAGE_DOWN 105 -#define GLUT_KEY_HOME 106 -#define GLUT_KEY_END 107 -#define GLUT_KEY_INSERT 108 - -/* Entry/exit state. */ -#define GLUT_LEFT 0 -#define GLUT_ENTERED 1 - -/* Visibility state. */ -#define GLUT_NOT_VISIBLE 0 -#define GLUT_VISIBLE 1 - -/* Color index component selection values. */ -#define GLUT_RED 0 -#define GLUT_GREEN 1 -#define GLUT_BLUE 2 - -/* Layers for use. */ -#define GLUT_NORMAL 0 -#define GLUT_OVERLAY 1 - -/* Stroke font constants (use these in GLUT program). */ -#define GLUT_STROKE_ROMAN ((void*)0) -#define GLUT_STROKE_MONO_ROMAN ((void*)1) - -/* Bitmap font constants (use these in GLUT program). */ -#define GLUT_BITMAP_9_BY_15 ((void*)2) -#define GLUT_BITMAP_8_BY_13 ((void*)3) -#define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4) -#define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5) -#define GLUT_BITMAP_HELVETICA_10 ((void*)6) -#define GLUT_BITMAP_HELVETICA_12 ((void*)7) -#define GLUT_BITMAP_HELVETICA_18 ((void*)8) - -/* glutGet parameters. */ -#define GLUT_WINDOW_X 100 -#define GLUT_WINDOW_Y 101 -#define GLUT_WINDOW_WIDTH 102 -#define GLUT_WINDOW_HEIGHT 103 -#define GLUT_WINDOW_BUFFER_SIZE 104 -#define GLUT_WINDOW_STENCIL_SIZE 105 -#define GLUT_WINDOW_DEPTH_SIZE 106 -#define GLUT_WINDOW_RED_SIZE 107 -#define GLUT_WINDOW_GREEN_SIZE 108 -#define GLUT_WINDOW_BLUE_SIZE 109 -#define GLUT_WINDOW_ALPHA_SIZE 110 -#define GLUT_WINDOW_ACCUM_RED_SIZE 111 -#define GLUT_WINDOW_ACCUM_GREEN_SIZE 112 -#define GLUT_WINDOW_ACCUM_BLUE_SIZE 113 -#define GLUT_WINDOW_ACCUM_ALPHA_SIZE 114 -#define GLUT_WINDOW_DOUBLEBUFFER 115 -#define GLUT_WINDOW_RGBA 116 -#define GLUT_WINDOW_PARENT 117 -#define GLUT_WINDOW_NUM_CHILDREN 118 -#define GLUT_WINDOW_COLORMAP_SIZE 119 -#define GLUT_WINDOW_NUM_SAMPLES 120 -#define GLUT_WINDOW_STEREO 121 -#define GLUT_WINDOW_CURSOR 122 -#define GLUT_SCREEN_WIDTH 200 -#define GLUT_SCREEN_HEIGHT 201 -#define GLUT_SCREEN_WIDTH_MM 202 -#define GLUT_SCREEN_HEIGHT_MM 203 -#define GLUT_MENU_NUM_ITEMS 300 -#define GLUT_DISPLAY_MODE_POSSIBLE 400 -#define GLUT_INIT_WINDOW_X 500 -#define GLUT_INIT_WINDOW_Y 501 -#define GLUT_INIT_WINDOW_WIDTH 502 -#define GLUT_INIT_WINDOW_HEIGHT 503 -#define GLUT_INIT_DISPLAY_MODE 504 -#define GLUT_ELAPSED_TIME 700 -#define GLUT_WINDOW_FORMAT_ID 123 - -/* glutDeviceGet parameters. */ -#define GLUT_HAS_KEYBOARD 600 -#define GLUT_HAS_MOUSE 601 -#define GLUT_HAS_SPACEBALL 602 -#define GLUT_HAS_DIAL_AND_BUTTON_BOX 603 -#define GLUT_HAS_TABLET 604 -#define GLUT_NUM_MOUSE_BUTTONS 605 -#define GLUT_NUM_SPACEBALL_BUTTONS 606 -#define GLUT_NUM_BUTTON_BOX_BUTTONS 607 -#define GLUT_NUM_DIALS 608 -#define GLUT_NUM_TABLET_BUTTONS 609 -#define GLUT_DEVICE_IGNORE_KEY_REPEAT 610 -#define GLUT_DEVICE_KEY_REPEAT 611 -#define GLUT_HAS_JOYSTICK 612 -#define GLUT_OWNS_JOYSTICK 613 -#define GLUT_JOYSTICK_BUTTONS 614 -#define GLUT_JOYSTICK_AXES 615 -#define GLUT_JOYSTICK_POLL_RATE 616 - -/* glutLayerGet parameters. */ -#define GLUT_OVERLAY_POSSIBLE 800 -#define GLUT_LAYER_IN_USE 801 -#define GLUT_HAS_OVERLAY 802 -#define GLUT_TRANSPARENT_INDEX 803 -#define GLUT_NORMAL_DAMAGED 804 -#define GLUT_OVERLAY_DAMAGED 805 - -/* glutVideoResizeGet parameters. */ -#define GLUT_VIDEO_RESIZE_POSSIBLE 900 -#define GLUT_VIDEO_RESIZE_IN_USE 901 -#define GLUT_VIDEO_RESIZE_X_DELTA 902 -#define GLUT_VIDEO_RESIZE_Y_DELTA 903 -#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 904 -#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 905 -#define GLUT_VIDEO_RESIZE_X 906 -#define GLUT_VIDEO_RESIZE_Y 907 -#define GLUT_VIDEO_RESIZE_WIDTH 908 -#define GLUT_VIDEO_RESIZE_HEIGHT 909 - -/* glutUseLayer parameters. */ -#define GLUT_NORMAL 0 -#define GLUT_OVERLAY 1 - -/* glutGetModifiers return mask. */ -#define GLUT_ACTIVE_SHIFT 1 -#define GLUT_ACTIVE_CTRL 2 -#define GLUT_ACTIVE_ALT 4 - -/* glutSetCursor parameters. */ -/* Basic arrows. */ -#define GLUT_CURSOR_RIGHT_ARROW 0 -#define GLUT_CURSOR_LEFT_ARROW 1 -/* Symbolic cursor shapes. */ -#define GLUT_CURSOR_INFO 2 -#define GLUT_CURSOR_DESTROY 3 -#define GLUT_CURSOR_HELP 4 -#define GLUT_CURSOR_CYCLE 5 -#define GLUT_CURSOR_SPRAY 6 -#define GLUT_CURSOR_WAIT 7 -#define GLUT_CURSOR_TEXT 8 -#define GLUT_CURSOR_CROSSHAIR 9 -/* Directional cursors. */ -#define GLUT_CURSOR_UP_DOWN 10 -#define GLUT_CURSOR_LEFT_RIGHT 11 -/* Sizing cursors. */ -#define GLUT_CURSOR_TOP_SIDE 12 -#define GLUT_CURSOR_BOTTOM_SIDE 13 -#define GLUT_CURSOR_LEFT_SIDE 14 -#define GLUT_CURSOR_RIGHT_SIDE 15 -#define GLUT_CURSOR_TOP_LEFT_CORNER 16 -#define GLUT_CURSOR_TOP_RIGHT_CORNER 17 -#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18 -#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 19 -/* Inherit from parent window. */ -#define GLUT_CURSOR_INHERIT 100 -/* Blank cursor. */ -#define GLUT_CURSOR_NONE 101 -/* Fullscreen crosshair (if available). */ -#define GLUT_CURSOR_FULL_CROSSHAIR 102 - -/* GLUT initialization sub-API. */ -GLUTAPI void APIENTRY glutInit(int *argcp, char **argv); -GLUTAPI void APIENTRY glutInitDisplayMode(unsigned int mode); -GLUTAPI void APIENTRY glutInitWindowPosition(int x, int y); -GLUTAPI void APIENTRY glutInitWindowSize(int width, int height); -GLUTAPI void APIENTRY glutMainLoop(void); - -/* GLUT window sub-API. */ -GLUTAPI int APIENTRY glutCreateWindow(const char *title); -GLUTAPI int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height); -GLUTAPI void APIENTRY glutDestroyWindow(int win); -GLUTAPI void APIENTRY glutPostRedisplay(void); -GLUTAPI void APIENTRY glutSwapBuffers(void); -GLUTAPI int APIENTRY glutGetWindow(void); -GLUTAPI void APIENTRY glutSetWindow(int win); -GLUTAPI void APIENTRY glutSetWindowTitle(const char *title); -GLUTAPI void APIENTRY glutSetIconTitle(const char *title); -GLUTAPI void APIENTRY glutPositionWindow(int x, int y); -GLUTAPI void APIENTRY glutReshapeWindow(int width, int height); -GLUTAPI void APIENTRY glutPopWindow(void); -GLUTAPI void APIENTRY glutPushWindow(void); -GLUTAPI void APIENTRY glutIconifyWindow(void); -GLUTAPI void APIENTRY glutShowWindow(void); -GLUTAPI void APIENTRY glutHideWindow(void); - -/* GLUT overlay sub-API. */ -GLUTAPI void APIENTRY glutEstablishOverlay(void); -GLUTAPI void APIENTRY glutRemoveOverlay(void); -GLUTAPI void APIENTRY glutUseLayer(GLenum layer); -GLUTAPI void APIENTRY glutPostOverlayRedisplay(void); -GLUTAPI void APIENTRY glutShowOverlay(void); -GLUTAPI void APIENTRY glutHideOverlay(void); - -/* GLUT menu sub-API. */ -GLUTAPI int APIENTRY glutCreateMenu(void (GLUTCALLBACK *)(int)); -GLUTAPI void APIENTRY glutDestroyMenu(int menu); -GLUTAPI int APIENTRY glutGetMenu(void); -GLUTAPI void APIENTRY glutSetMenu(int menu); -GLUTAPI void APIENTRY glutAddMenuEntry(const char *label, int value); -GLUTAPI void APIENTRY glutAddSubMenu(const char *label, int submenu); -GLUTAPI void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value); -GLUTAPI void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu); -GLUTAPI void APIENTRY glutRemoveMenuItem(int item); -GLUTAPI void APIENTRY glutAttachMenu(int button); -GLUTAPI void APIENTRY glutDetachMenu(int button); - -/* GLUT window callback sub-API. */ -GLUTAPI void APIENTRY glutDisplayFunc(void (GLUTCALLBACK * func)(void)); -GLUTAPI void APIENTRY glutReshapeFunc(void (GLUTCALLBACK * func)(int width, int height)); -GLUTAPI void APIENTRY glutKeyboardFunc(void (GLUTCALLBACK * func)(unsigned char key, int x, int y)); -GLUTAPI void APIENTRY glutMouseFunc(void (GLUTCALLBACK * func)(int button, int state, int x, int y)); -GLUTAPI void APIENTRY glutMotionFunc(void (GLUTCALLBACK * func)(int x, int y)); -GLUTAPI void APIENTRY glutPassiveMotionFunc(void (GLUTCALLBACK * func)(int x, int y)); -GLUTAPI void APIENTRY glutEntryFunc(void (GLUTCALLBACK * func)(int state)); -GLUTAPI void APIENTRY glutVisibilityFunc(void (GLUTCALLBACK * func)(int state)); -GLUTAPI void APIENTRY glutIdleFunc(void (GLUTCALLBACK * func)(void)); -GLUTAPI void APIENTRY glutTimerFunc(unsigned int millis, void (GLUTCALLBACK * func)(int value), int value); -GLUTAPI void APIENTRY glutMenuStateFunc(void (GLUTCALLBACK * func)(int state)); -GLUTAPI void APIENTRY glutSpecialFunc(void (GLUTCALLBACK * func)(int key, int x, int y)); -GLUTAPI void APIENTRY glutSpaceballMotionFunc(void (GLUTCALLBACK * func)(int x, int y, int z)); -GLUTAPI void APIENTRY glutSpaceballRotateFunc(void (GLUTCALLBACK * func)(int x, int y, int z)); -GLUTAPI void APIENTRY glutSpaceballButtonFunc(void (GLUTCALLBACK * func)(int button, int state)); -GLUTAPI void APIENTRY glutButtonBoxFunc(void (GLUTCALLBACK * func)(int button, int state)); -GLUTAPI void APIENTRY glutDialsFunc(void (GLUTCALLBACK * func)(int dial, int value)); -GLUTAPI void APIENTRY glutTabletMotionFunc(void (GLUTCALLBACK * func)(int x, int y)); -GLUTAPI void APIENTRY glutTabletButtonFunc(void (GLUTCALLBACK * func)(int button, int state, int x, int y)); -GLUTAPI void APIENTRY glutMenuStatusFunc(void (GLUTCALLBACK * func)(int status, int x, int y)); -GLUTAPI void APIENTRY glutOverlayDisplayFunc(void (GLUTCALLBACK * func)(void)); -GLUTAPI void APIENTRY glutWindowStatusFunc(void (GLUTCALLBACK * func)(int state)); - -/* GLUT color index sub-API. */ -GLUTAPI void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue); -GLUTAPI GLfloat APIENTRY glutGetColor(int ndx, int component); -GLUTAPI void APIENTRY glutCopyColormap(int win); - -/* GLUT state retrieval sub-API. */ -GLUTAPI int APIENTRY glutGet(GLenum type); -GLUTAPI int APIENTRY glutDeviceGet(GLenum type); - -/* GLUT font sub-API */ -GLUTAPI void APIENTRY glutBitmapCharacter(void *font, int character); -GLUTAPI int APIENTRY glutBitmapWidth(void *font, int character); -GLUTAPI void APIENTRY glutStrokeCharacter(void *font, int character); -GLUTAPI int APIENTRY glutStrokeWidth(void *font, int character); - -/* GLUT pre-built models sub-API */ -GLUTAPI void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks); -GLUTAPI void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks); -GLUTAPI void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); -GLUTAPI void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); -GLUTAPI void APIENTRY glutWireCube(GLdouble size); -GLUTAPI void APIENTRY glutSolidCube(GLdouble size); -GLUTAPI void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); -GLUTAPI void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); -GLUTAPI void APIENTRY glutWireDodecahedron(void); -GLUTAPI void APIENTRY glutSolidDodecahedron(void); -GLUTAPI void APIENTRY glutWireTeapot(GLdouble size); -GLUTAPI void APIENTRY glutSolidTeapot(GLdouble size); -GLUTAPI void APIENTRY glutWireOctahedron(void); -GLUTAPI void APIENTRY glutSolidOctahedron(void); -GLUTAPI void APIENTRY glutWireTetrahedron(void); -GLUTAPI void APIENTRY glutSolidTetrahedron(void); -GLUTAPI void APIENTRY glutWireIcosahedron(void); -GLUTAPI void APIENTRY glutSolidIcosahedron(void); - -#endif /* __AGLUT_H__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/glutf90.h b/nx-X11/extras/Mesa_6.4.2/include/GL/glutf90.h deleted file mode 100644 index 7ba3e19ef9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/glutf90.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef __glutf90_h__ -#define __glutf90_h__ - -/* Copyright (c) Mark J. Kilgard & Willam F. Mitchell, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -/* This header provides the binding interface for William Mitchell's - f90gl Fortran 90 GLUT binding. Other GLUT language bindings - can and should use this interace. */ - -/* I appreciate the guidance from William Mitchell - (mitchell@cam.nist.gov) in developing this friend interface - for use by the f90gl package. See ../../README.fortran */ - -#include - -/* Which callback enumerants for the __glutSetFCB/__glutGetFCB routines. */ -/* NOTE These values are part of a binary interface for the f90gl Fortran - 90 binding and so must NOT changes (additions are allowed). */ - -/* GLUTwindow callbacks. */ -#define GLUT_FCB_DISPLAY 0 /* GLUTdisplayFCB */ -#define GLUT_FCB_RESHAPE 1 /* GLUTreshapeFCB */ -#define GLUT_FCB_MOUSE 2 /* GLUTmouseFCB */ -#define GLUT_FCB_MOTION 3 /* GLUTmotionFCB */ -#define GLUT_FCB_PASSIVE 4 /* GLUTpassiveFCB */ -#define GLUT_FCB_ENTRY 5 /* GLUTentryFCB */ -#define GLUT_FCB_KEYBOARD 6 /* GLUTkeyboardFCB */ -#define GLUT_FCB_KEYBOARD_UP 7 /* GLUTkeyboardFCB */ -#define GLUT_FCB_WINDOW_STATUS 8 /* GLUTwindowStatusFCB */ -#define GLUT_FCB_VISIBILITY 9 /* GLUTvisibilityFCB */ -#define GLUT_FCB_SPECIAL 10 /* GLUTspecialFCB */ -#define GLUT_FCB_SPECIAL_UP 11 /* GLUTspecialFCB */ -#define GLUT_FCB_BUTTON_BOX 12 /* GLUTbuttonBoxFCB */ -#define GLUT_FCB_DIALS 13 /* GLUTdialsFCB */ -#define GLUT_FCB_SPACE_MOTION 14 /* GLUTspaceMotionFCB */ -#define GLUT_FCB_SPACE_ROTATE 15 /* GLUTspaceRotateFCB */ -#define GLUT_FCB_SPACE_BUTTON 16 /* GLUTspaceButtonFCB */ -#define GLUT_FCB_TABLET_MOTION 17 /* GLUTtabletMotionFCB */ -#define GLUT_FCB_TABLET_BUTTON 18 /* GLUTtabletButtonFCB */ -#define GLUT_FCB_JOYSTICK 19 /* GLUTjoystickFCB */ -/* Non-GLUTwindow callbacks. */ -#define GLUT_FCB_OVERLAY_DISPLAY 100 /* GLUTdisplayFCB */ -#define GLUT_FCB_SELECT 101 /* GLUTselectFCB */ -#define GLUT_FCB_TIMER 102 /* GLUTtimerFCB */ - -/* GLUT Fortran callback function types. */ -typedef void (GLUTCALLBACK *GLUTdisplayFCB) (void); -typedef void (GLUTCALLBACK *GLUTreshapeFCB) (int *, int *); -/* NOTE the pressed key is int, not unsigned char for Fortran! */ -typedef void (GLUTCALLBACK *GLUTkeyboardFCB) (int *, int *, int *); -typedef void (GLUTCALLBACK *GLUTmouseFCB) (int *, int *, int *, int *); -typedef void (GLUTCALLBACK *GLUTmotionFCB) (int *, int *); -typedef void (GLUTCALLBACK *GLUTpassiveFCB) (int *, int *); -typedef void (GLUTCALLBACK *GLUTentryFCB) (int *); -typedef void (GLUTCALLBACK *GLUTwindowStatusFCB) (int *); -typedef void (GLUTCALLBACK *GLUTvisibilityFCB) (int *); -typedef void (GLUTCALLBACK *GLUTspecialFCB) (int *, int *, int *); -typedef void (GLUTCALLBACK *GLUTbuttonBoxFCB) (int *, int *); -typedef void (GLUTCALLBACK *GLUTdialsFCB) (int *, int *); -typedef void (GLUTCALLBACK *GLUTspaceMotionFCB) (int *, int *, int *); -typedef void (GLUTCALLBACK *GLUTspaceRotateFCB) (int *, int *, int *); -typedef void (GLUTCALLBACK *GLUTspaceButtonFCB) (int *, int *); -typedef void (GLUTCALLBACK *GLUTtabletMotionFCB) (int *, int *); -typedef void (GLUTCALLBACK *GLUTtabletButtonFCB) (int *, int *, int *, int *); -typedef void (GLUTCALLBACK *GLUTjoystickFCB) (unsigned int *buttonMask, int *x, int *y, int *z); - -typedef void (GLUTCALLBACK *GLUTselectFCB) (int *); -typedef void (GLUTCALLBACK *GLUTtimerFCB) (int *); -typedef void (GLUTCALLBACK *GLUTmenuStateFCB) (int *); /* DEPRICATED. */ -typedef void (GLUTCALLBACK *GLUTmenuStatusFCB) (int *, int *, int *); -typedef void (GLUTCALLBACK *GLUTidleFCB) (void); - -/* Functions that set and return Fortran callback functions. */ -GLUTAPI void* APIENTRY __glutGetFCB(int which); -GLUTAPI void APIENTRY __glutSetFCB(int which, void *func); - -#endif /* __glutf90_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/glx.h b/nx-X11/extras/Mesa_6.4.2/include/GL/glx.h deleted file mode 100644 index ab0467c188..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/glx.h +++ /dev/null @@ -1,551 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.3 - * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef GLX_H -#define GLX_H - - -#ifdef __VMS -#include -# ifdef __cplusplus -/* VMS Xlib.h gives problems with C++. - * this avoids a bunch of trivial warnings */ -#pragma message disable nosimpint -#endif -#endif -#include -#include -#ifdef __VMS -# ifdef __cplusplus -#pragma message enable nosimpint -#endif -#endif -#include - - -#if defined(USE_MGL_NAMESPACE) -#include "glx_mangle.h" -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - - -#define GLX_VERSION_1_1 1 -#define GLX_VERSION_1_2 1 -#define GLX_VERSION_1_3 1 -#define GLX_VERSION_1_4 1 - -#define GLX_EXTENSION_NAME "GLX" - - - -/* - * Tokens for glXChooseVisual and glXGetConfig: - */ -#define GLX_USE_GL 1 -#define GLX_BUFFER_SIZE 2 -#define GLX_LEVEL 3 -#define GLX_RGBA 4 -#define GLX_DOUBLEBUFFER 5 -#define GLX_STEREO 6 -#define GLX_AUX_BUFFERS 7 -#define GLX_RED_SIZE 8 -#define GLX_GREEN_SIZE 9 -#define GLX_BLUE_SIZE 10 -#define GLX_ALPHA_SIZE 11 -#define GLX_DEPTH_SIZE 12 -#define GLX_STENCIL_SIZE 13 -#define GLX_ACCUM_RED_SIZE 14 -#define GLX_ACCUM_GREEN_SIZE 15 -#define GLX_ACCUM_BLUE_SIZE 16 -#define GLX_ACCUM_ALPHA_SIZE 17 - - -/* - * Error codes returned by glXGetConfig: - */ -#define GLX_BAD_SCREEN 1 -#define GLX_BAD_ATTRIBUTE 2 -#define GLX_NO_EXTENSION 3 -#define GLX_BAD_VISUAL 4 -#define GLX_BAD_CONTEXT 5 -#define GLX_BAD_VALUE 6 -#define GLX_BAD_ENUM 7 - - -/* - * GLX 1.1 and later: - */ -#define GLX_VENDOR 1 -#define GLX_VERSION 2 -#define GLX_EXTENSIONS 3 - - -/* - * GLX 1.3 and later: - */ -#define GLX_CONFIG_CAVEAT 0x20 -#define GLX_DONT_CARE 0xFFFFFFFF -#define GLX_X_VISUAL_TYPE 0x22 -#define GLX_TRANSPARENT_TYPE 0x23 -#define GLX_TRANSPARENT_INDEX_VALUE 0x24 -#define GLX_TRANSPARENT_RED_VALUE 0x25 -#define GLX_TRANSPARENT_GREEN_VALUE 0x26 -#define GLX_TRANSPARENT_BLUE_VALUE 0x27 -#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 -#define GLX_WINDOW_BIT 0x00000001 -#define GLX_PIXMAP_BIT 0x00000002 -#define GLX_PBUFFER_BIT 0x00000004 -#define GLX_AUX_BUFFERS_BIT 0x00000010 -#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 -#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 -#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 -#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 -#define GLX_DEPTH_BUFFER_BIT 0x00000020 -#define GLX_STENCIL_BUFFER_BIT 0x00000040 -#define GLX_ACCUM_BUFFER_BIT 0x00000080 -#define GLX_NONE 0x8000 -#define GLX_SLOW_CONFIG 0x8001 -#define GLX_TRUE_COLOR 0x8002 -#define GLX_DIRECT_COLOR 0x8003 -#define GLX_PSEUDO_COLOR 0x8004 -#define GLX_STATIC_COLOR 0x8005 -#define GLX_GRAY_SCALE 0x8006 -#define GLX_STATIC_GRAY 0x8007 -#define GLX_TRANSPARENT_RGB 0x8008 -#define GLX_TRANSPARENT_INDEX 0x8009 -#define GLX_VISUAL_ID 0x800B -#define GLX_SCREEN 0x800C -#define GLX_NON_CONFORMANT_CONFIG 0x800D -#define GLX_DRAWABLE_TYPE 0x8010 -#define GLX_RENDER_TYPE 0x8011 -#define GLX_X_RENDERABLE 0x8012 -#define GLX_FBCONFIG_ID 0x8013 -#define GLX_RGBA_TYPE 0x8014 -#define GLX_COLOR_INDEX_TYPE 0x8015 -#define GLX_MAX_PBUFFER_WIDTH 0x8016 -#define GLX_MAX_PBUFFER_HEIGHT 0x8017 -#define GLX_MAX_PBUFFER_PIXELS 0x8018 -#define GLX_PRESERVED_CONTENTS 0x801B -#define GLX_LARGEST_PBUFFER 0x801C -#define GLX_WIDTH 0x801D -#define GLX_HEIGHT 0x801E -#define GLX_EVENT_MASK 0x801F -#define GLX_DAMAGED 0x8020 -#define GLX_SAVED 0x8021 -#define GLX_WINDOW 0x8022 -#define GLX_PBUFFER 0x8023 -#define GLX_PBUFFER_HEIGHT 0x8040 -#define GLX_PBUFFER_WIDTH 0x8041 -#define GLX_RGBA_BIT 0x00000001 -#define GLX_COLOR_INDEX_BIT 0x00000002 -#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 - - -/* - * GLX 1.4 and later: - */ -#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/ -#define GLX_SAMPLES 0x186a1 /*100001*/ - - - -typedef struct __GLXcontextRec *GLXContext; -typedef XID GLXPixmap; -typedef XID GLXDrawable; -/* GLX 1.3 and later */ -typedef struct __GLXFBConfigRec *GLXFBConfig; -typedef XID GLXFBConfigID; -typedef XID GLXContextID; -typedef XID GLXWindow; -typedef XID GLXPbuffer; - - - -extern XVisualInfo* glXChooseVisual( Display *dpy, int screen, - int *attribList ); - -extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis, - GLXContext shareList, Bool direct ); - -extern void glXDestroyContext( Display *dpy, GLXContext ctx ); - -extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable, - GLXContext ctx); - -extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst, - unsigned long mask ); - -extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable ); - -extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual, - Pixmap pixmap ); - -extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap ); - -extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event ); - -extern Bool glXQueryVersion( Display *dpy, int *maj, int *min ); - -extern Bool glXIsDirect( Display *dpy, GLXContext ctx ); - -extern int glXGetConfig( Display *dpy, XVisualInfo *visual, - int attrib, int *value ); - -extern GLXContext glXGetCurrentContext( void ); - -extern GLXDrawable glXGetCurrentDrawable( void ); - -extern void glXWaitGL( void ); - -extern void glXWaitX( void ); - -extern void glXUseXFont( Font font, int first, int count, int list ); - - - -/* GLX 1.1 and later */ -extern const char *glXQueryExtensionsString( Display *dpy, int screen ); - -extern const char *glXQueryServerString( Display *dpy, int screen, int name ); - -extern const char *glXGetClientString( Display *dpy, int name ); - - -/* GLX 1.2 and later */ -extern Display *glXGetCurrentDisplay( void ); - - -/* GLX 1.3 and later */ -extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen, - const int *attribList, int *nitems ); - -extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config, - int attribute, int *value ); - -extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen, - int *nelements ); - -extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, - GLXFBConfig config ); - -extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config, - Window win, const int *attribList ); - -extern void glXDestroyWindow( Display *dpy, GLXWindow window ); - -extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config, - Pixmap pixmap, const int *attribList ); - -extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap ); - -extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config, - const int *attribList ); - -extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf ); - -extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute, - unsigned int *value ); - -extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config, - int renderType, GLXContext shareList, - Bool direct ); - -extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw, - GLXDrawable read, GLXContext ctx ); - -extern GLXDrawable glXGetCurrentReadDrawable( void ); - -extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute, - int *value ); - -extern void glXSelectEvent( Display *dpy, GLXDrawable drawable, - unsigned long mask ); - -extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable, - unsigned long *mask ); - - -/* GLX 1.4 and later */ -extern void (*glXGetProcAddress(const GLubyte *procname))( void ); - - -#ifndef GLX_GLXEXT_LEGACY - -#include - -#else - - -/* - * 28. GLX_EXT_visual_info extension - */ -#ifndef GLX_EXT_visual_info -#define GLX_EXT_visual_info 1 - -#define GLX_X_VISUAL_TYPE_EXT 0x22 -#define GLX_TRANSPARENT_TYPE_EXT 0x23 -#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 -#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 -#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 -#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 -#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 -#define GLX_TRUE_COLOR_EXT 0x8002 -#define GLX_DIRECT_COLOR_EXT 0x8003 -#define GLX_PSEUDO_COLOR_EXT 0x8004 -#define GLX_STATIC_COLOR_EXT 0x8005 -#define GLX_GRAY_SCALE_EXT 0x8006 -#define GLX_STATIC_GRAY_EXT 0x8007 -#define GLX_NONE_EXT 0x8000 -#define GLX_TRANSPARENT_RGB_EXT 0x8008 -#define GLX_TRANSPARENT_INDEX_EXT 0x8009 - -#endif /* 28. GLX_EXT_visual_info extension */ - - - -/* - * 41. GLX_SGI_video_sync - */ -#ifndef GLX_SGI_video_sync -#define GLX_SGI_video_sync 1 - -extern int glXGetVideoSyncSGI(unsigned int *count); -extern int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count); - -#endif /* GLX_SGI_video_sync */ - - - -/* - * 42. GLX_EXT_visual_rating - */ -#ifndef GLX_EXT_visual_rating -#define GLX_EXT_visual_rating 1 - -#define GLX_VISUAL_CAVEAT_EXT 0x20 -/*#define GLX_NONE_EXT 0x8000*/ -#define GLX_SLOW_VISUAL_EXT 0x8001 -#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D - -#endif /* GLX_EXT_visual_rating */ - - - -/* - * 47. GLX_EXT_import_context - */ -#ifndef GLX_EXT_import_context -#define GLX_EXT_import_context 1 - -#define GLX_SHARE_CONTEXT_EXT 0x800A -#define GLX_VISUAL_ID_EXT 0x800B -#define GLX_SCREEN_EXT 0x800C - -extern void glXFreeContextEXT(Display *dpy, GLXContext context); - -extern GLXContextID glXGetContextIDEXT(const GLXContext context); - -extern Display *glXGetCurrentDisplayEXT(void); - -extern GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID); - -extern int glXQueryContextInfoEXT(Display *dpy, GLXContext context, - int attribute,int *value); - -#endif /* GLX_EXT_import_context */ - - - -/* - * 215. GLX_MESA_copy_sub_buffer - */ -#ifndef GLX_MESA_copy_sub_buffer -#define GLX_MESA_copy_sub_buffer 1 - -extern void glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable, - int x, int y, int width, int height ); - -#endif - - - -/* - * 216. GLX_MESA_pixmap_colormap - */ -#ifndef GLX_MESA_pixmap_colormap -#define GLX_MESA_pixmap_colormap 1 - -extern GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual, - Pixmap pixmap, Colormap cmap ); - -#endif /* GLX_MESA_pixmap_colormap */ - - - -/* - * 217. GLX_MESA_release_buffers - */ -#ifndef GLX_MESA_release_buffers -#define GLX_MESA_release_buffers 1 - -extern Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d ); - -#endif /* GLX_MESA_release_buffers */ - - - -/* - * 218. GLX_MESA_set_3dfx_mode - */ -#ifndef GLX_MESA_set_3dfx_mode -#define GLX_MESA_set_3dfx_mode 1 - -#define GLX_3DFX_WINDOW_MODE_MESA 0x1 -#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 - -extern Bool glXSet3DfxModeMESA( int mode ); - -#endif /* GLX_MESA_set_3dfx_mode */ - - - -/* - * ARB 2. GLX_ARB_get_proc_address - */ -#ifndef GLX_ARB_get_proc_address -#define GLX_ARB_get_proc_address 1 - -extern void (*glXGetProcAddressARB(const GLubyte *procName))(); - -#endif /* GLX_ARB_get_proc_address */ - - - -#endif /* GLX_GLXEXT_LEGACY */ - - -/** - ** The following aren't in glxext.h yet. - **/ - - -/* - * ???. GLX_NV_vertex_array_range - */ -#ifndef GLX_NV_vertex_array_range -#define GLX_NV_vertex_array_range - -extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); -extern void glXFreeMemoryNV(GLvoid *pointer); -typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); -typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer); - -#endif /* GLX_NV_vertex_array_range */ - - - -/* - * ???. GLX_MESA_agp_offset - */ -#ifndef GLX_MESA_agp_offset -#define GLX_MESA_agp_offset 1 - -extern GLuint glXGetAGPOffsetMESA(const GLvoid *pointer); -typedef GLuint (* PFNGLXGETAGPOFFSETMESAPROC) (const GLvoid *pointer); - -#endif /* GLX_MESA_agp_offset */ - - -/* - * ???. GLX_MESA_allocate_memory - */ -#ifndef GLX_MESA_allocate_memory -#define GLX_MESA_allocate_memory 1 - -extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority); -extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer); -extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer); -typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority); -typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer); -typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer); - -#endif /* GLX_MESA_allocate_memory */ - -/* - * ARB ?. GLX_ARB_render_texture - */ -#ifndef GLX_ARB_render_texture -#define GLX_ARB_render_texture 1 - -extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer); -extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer); -extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList); - -#endif /* GLX_ARB_render_texture */ - - -/* - * Remove this when glxext.h is updated. - */ -#ifndef GLX_NV_float_buffer -#define GLX_NV_float_buffer 1 - -#define GLX_FLOAT_COMPONENTS_NV 0x20B0 - -#endif /* GLX_NV_float_buffer */ - - -/*** Should these go here, or in another header? */ -/* -** GLX Events -*/ -typedef struct { - int event_type; /* GLX_DAMAGED or GLX_SAVED */ - int draw_type; /* GLX_WINDOW or GLX_PBUFFER */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came for SendEvent request */ - Display *display; /* display the event was read from */ - GLXDrawable drawable; /* XID of Drawable */ - unsigned int buffer_mask; /* mask indicating which buffers are affected */ - unsigned int aux_buffer; /* which aux buffer was affected */ - int x, y; - int width, height; - int count; /* if nonzero, at least this many more */ -} GLXPbufferClobberEvent; - -typedef union __GLXEvent { - GLXPbufferClobberEvent glxpbufferclobber; - long pad[24]; -} GLXEvent; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/glx_mangle.h b/nx-X11/extras/Mesa_6.4.2/include/GL/glx_mangle.h deleted file mode 100644 index d0b47d94e7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/glx_mangle.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.1 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifndef GLX_MANGLE_H -#define GLX_MANGLE_H - -#define glXChooseVisual mglXChooseVisual -#define glXCreateContext mglXCreateContext -#define glXDestroyContext mglXDestroyContext -#define glXMakeCurrent mglXMakeCurrent -#define glXCopyContext mglXCopyContext -#define glXSwapBuffers mglXSwapBuffers -#define glXCreateGLXPixmap mglXCreateGLXPixmap -#define glXDestroyGLXPixmap mglXDestroyGLXPixmap -#define glXQueryExtension mglXQueryExtension -#define glXQueryVersion mglXQueryVersion -#define glXIsDirect mglXIsDirect -#define glXGetConfig mglXGetConfig -#define glXGetCurrentContext mglXGetCurrentContext -#define glXGetCurrentDrawable mglXGetCurrentDrawable -#define glXWaitGL mglXWaitGL -#define glXWaitX mglXWaitX -#define glXUseXFont mglXUseXFont -#define glXQueryExtensionsString mglXQueryExtensionsString -#define glXQueryServerString mglXQueryServerString -#define glXGetClientString mglXGetClientString -#define glXCreateGLXPixmapMESA mglXCreateGLXPixmapMESA -#define glXReleaseBuffersMESA mglXReleaseBuffersMESA -#define glXCopySubBufferMESA mglXCopySubBufferMESA -#define glXGetVideoSyncSGI mglXGetVideoSyncSGI -#define glXWaitVideoSyncSGI mglXWaitVideoSyncSGI - -/* GLX 1.4 */ -#define glXGetProcAddress mglXGetProcAddress - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/glxext.h b/nx-X11/extras/Mesa_6.4.2/include/GL/glxext.h deleted file mode 100644 index 589d1ef363..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/glxext.h +++ /dev/null @@ -1,693 +0,0 @@ -#ifndef __glxext_h_ -#define __glxext_h_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: This software was created using the -** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has -** not been independently verified as being compliant with the OpenGL(R) -** version 1.2.1 Specification. -*/ - -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -#define WIN32_LEAN_AND_MEAN 1 -#include -#endif - -#ifndef APIENTRY -#define APIENTRY -#endif -#ifndef APIENTRYP -#define APIENTRYP APIENTRY * -#endif -#ifndef GLAPI -#define GLAPI extern -#endif - -/*************************************************************/ - -/* Header file version number, required by OpenGL ABI for Linux */ -/* glxext.h last updated 2004/07/26 */ -/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */ -#define GLX_GLXEXT_VERSION 6 - -#ifndef GLX_VERSION_1_3 -#define GLX_WINDOW_BIT 0x00000001 -#define GLX_PIXMAP_BIT 0x00000002 -#define GLX_PBUFFER_BIT 0x00000004 -#define GLX_RGBA_BIT 0x00000001 -#define GLX_COLOR_INDEX_BIT 0x00000002 -#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 -#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 -#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 -#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 -#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 -#define GLX_AUX_BUFFERS_BIT 0x00000010 -#define GLX_DEPTH_BUFFER_BIT 0x00000020 -#define GLX_STENCIL_BUFFER_BIT 0x00000040 -#define GLX_ACCUM_BUFFER_BIT 0x00000080 -#define GLX_CONFIG_CAVEAT 0x20 -#define GLX_X_VISUAL_TYPE 0x22 -#define GLX_TRANSPARENT_TYPE 0x23 -#define GLX_TRANSPARENT_INDEX_VALUE 0x24 -#define GLX_TRANSPARENT_RED_VALUE 0x25 -#define GLX_TRANSPARENT_GREEN_VALUE 0x26 -#define GLX_TRANSPARENT_BLUE_VALUE 0x27 -#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 -#define GLX_DONT_CARE 0xFFFFFFFF -#define GLX_NONE 0x8000 -#define GLX_SLOW_CONFIG 0x8001 -#define GLX_TRUE_COLOR 0x8002 -#define GLX_DIRECT_COLOR 0x8003 -#define GLX_PSEUDO_COLOR 0x8004 -#define GLX_STATIC_COLOR 0x8005 -#define GLX_GRAY_SCALE 0x8006 -#define GLX_STATIC_GRAY 0x8007 -#define GLX_TRANSPARENT_RGB 0x8008 -#define GLX_TRANSPARENT_INDEX 0x8009 -#define GLX_VISUAL_ID 0x800B -#define GLX_SCREEN 0x800C -#define GLX_NON_CONFORMANT_CONFIG 0x800D -#define GLX_DRAWABLE_TYPE 0x8010 -#define GLX_RENDER_TYPE 0x8011 -#define GLX_X_RENDERABLE 0x8012 -#define GLX_FBCONFIG_ID 0x8013 -#define GLX_RGBA_TYPE 0x8014 -#define GLX_COLOR_INDEX_TYPE 0x8015 -#define GLX_MAX_PBUFFER_WIDTH 0x8016 -#define GLX_MAX_PBUFFER_HEIGHT 0x8017 -#define GLX_MAX_PBUFFER_PIXELS 0x8018 -#define GLX_PRESERVED_CONTENTS 0x801B -#define GLX_LARGEST_PBUFFER 0x801C -#define GLX_WIDTH 0x801D -#define GLX_HEIGHT 0x801E -#define GLX_EVENT_MASK 0x801F -#define GLX_DAMAGED 0x8020 -#define GLX_SAVED 0x8021 -#define GLX_WINDOW 0x8022 -#define GLX_PBUFFER 0x8023 -#define GLX_PBUFFER_HEIGHT 0x8040 -#define GLX_PBUFFER_WIDTH 0x8041 -#endif - -#ifndef GLX_VERSION_1_4 -#define GLX_SAMPLE_BUFFERS 100000 -#define GLX_SAMPLES 100001 -#endif - -#ifndef GLX_ARB_get_proc_address -#endif - -#ifndef GLX_ARB_multisample -#define GLX_SAMPLE_BUFFERS_ARB 100000 -#define GLX_SAMPLES_ARB 100001 -#endif - -#ifndef GLX_SGIS_multisample -#define GLX_SAMPLE_BUFFERS_SGIS 100000 -#define GLX_SAMPLES_SGIS 100001 -#endif - -#ifndef GLX_EXT_visual_info -#define GLX_X_VISUAL_TYPE_EXT 0x22 -#define GLX_TRANSPARENT_TYPE_EXT 0x23 -#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 -#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 -#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 -#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 -#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 -#define GLX_NONE_EXT 0x8000 -#define GLX_TRUE_COLOR_EXT 0x8002 -#define GLX_DIRECT_COLOR_EXT 0x8003 -#define GLX_PSEUDO_COLOR_EXT 0x8004 -#define GLX_STATIC_COLOR_EXT 0x8005 -#define GLX_GRAY_SCALE_EXT 0x8006 -#define GLX_STATIC_GRAY_EXT 0x8007 -#define GLX_TRANSPARENT_RGB_EXT 0x8008 -#define GLX_TRANSPARENT_INDEX_EXT 0x8009 -#endif - -#ifndef GLX_SGI_swap_control -#endif - -#ifndef GLX_SGI_video_sync -#endif - -#ifndef GLX_SGI_make_current_read -#endif - -#ifndef GLX_SGIX_video_source -#endif - -#ifndef GLX_EXT_visual_rating -#define GLX_VISUAL_CAVEAT_EXT 0x20 -#define GLX_SLOW_VISUAL_EXT 0x8001 -#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D -/* reuse GLX_NONE_EXT */ -#endif - -#ifndef GLX_EXT_import_context -#define GLX_SHARE_CONTEXT_EXT 0x800A -#define GLX_VISUAL_ID_EXT 0x800B -#define GLX_SCREEN_EXT 0x800C -#endif - -#ifndef GLX_SGIX_fbconfig -#define GLX_WINDOW_BIT_SGIX 0x00000001 -#define GLX_PIXMAP_BIT_SGIX 0x00000002 -#define GLX_RGBA_BIT_SGIX 0x00000001 -#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002 -#define GLX_DRAWABLE_TYPE_SGIX 0x8010 -#define GLX_RENDER_TYPE_SGIX 0x8011 -#define GLX_X_RENDERABLE_SGIX 0x8012 -#define GLX_FBCONFIG_ID_SGIX 0x8013 -#define GLX_RGBA_TYPE_SGIX 0x8014 -#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015 -/* reuse GLX_SCREEN_EXT */ -#endif - -#ifndef GLX_SGIX_pbuffer -#define GLX_PBUFFER_BIT_SGIX 0x00000004 -#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000 -#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001 -#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002 -#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004 -#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008 -#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010 -#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020 -#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040 -#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080 -#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100 -#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016 -#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017 -#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018 -#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 -#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A -#define GLX_PRESERVED_CONTENTS_SGIX 0x801B -#define GLX_LARGEST_PBUFFER_SGIX 0x801C -#define GLX_WIDTH_SGIX 0x801D -#define GLX_HEIGHT_SGIX 0x801E -#define GLX_EVENT_MASK_SGIX 0x801F -#define GLX_DAMAGED_SGIX 0x8020 -#define GLX_SAVED_SGIX 0x8021 -#define GLX_WINDOW_SGIX 0x8022 -#define GLX_PBUFFER_SGIX 0x8023 -#endif - -#ifndef GLX_SGI_cushion -#endif - -#ifndef GLX_SGIX_video_resize -#define GLX_SYNC_FRAME_SGIX 0x00000000 -#define GLX_SYNC_SWAP_SGIX 0x00000001 -#endif - -#ifndef GLX_SGIX_dmbuffer -#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024 -#endif - -#ifndef GLX_SGIX_swap_group -#endif - -#ifndef GLX_SGIX_swap_barrier -#endif - -#ifndef GLX_SGIS_blended_overlay -#define GLX_BLENDED_RGBA_SGIS 0x8025 -#endif - -#ifndef GLX_SGIS_shared_multisample -#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026 -#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027 -#endif - -#ifndef GLX_SUN_get_transparent_index -#endif - -#ifndef GLX_3DFX_multisample -#define GLX_SAMPLE_BUFFERS_3DFX 0x8050 -#define GLX_SAMPLES_3DFX 0x8051 -#endif - -#ifndef GLX_MESA_copy_sub_buffer -#endif - -#ifndef GLX_MESA_pixmap_colormap -#endif - -#ifndef GLX_MESA_release_buffers -#endif - -#ifndef GLX_MESA_set_3dfx_mode -#define GLX_3DFX_WINDOW_MODE_MESA 0x1 -#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 -#endif - -#ifndef GLX_SGIX_visual_select_group -#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 -#endif - -#ifndef GLX_OML_swap_method -#define GLX_SWAP_METHOD_OML 0x8060 -#define GLX_SWAP_EXCHANGE_OML 0x8061 -#define GLX_SWAP_COPY_OML 0x8062 -#define GLX_SWAP_UNDEFINED_OML 0x8063 -#endif - -#ifndef GLX_OML_sync_control -#endif - -#ifndef GLX_SGIX_hyperpipe_group -#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 -#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91 -#define GLX_BAD_HYPERPIPE_SGIX 92 -#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001 -#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002 -#define GLX_PIPE_RECT_SGIX 0x00000001 -#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002 -#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003 -#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004 -#define GLX_HYPERPIPE_ID_SGIX 0x8030 -#endif - -#ifndef GLX_MESA_agp_offset -#endif - - -/*************************************************************/ - -#ifndef GLX_ARB_get_proc_address -typedef void (*__GLXextFuncPtr)(void); -#endif - -#ifndef GLX_SGIX_video_source -typedef XID GLXVideoSourceSGIX; -#endif - -#ifndef GLX_SGIX_fbconfig -typedef XID GLXFBConfigIDSGIX; -typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; -#endif - -#ifndef GLX_SGIX_pbuffer -typedef XID GLXPbufferSGIX; -typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came for SendEvent request */ - Display *display; /* display the event was read from */ - GLXDrawable drawable; /* i.d. of Drawable */ - int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */ - int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */ - unsigned int mask; /* mask indicating which buffers are affected*/ - int x, y; - int width, height; - int count; /* if nonzero, at least this many more */ -} GLXBufferClobberEventSGIX; -#endif - -#if defined(__sun__) -#include -#if defined(__STDC__) -#if defined(__arch64__) -typedef long int int64_t; -#else -typedef long long int int64_t; -#endif /* __arch64__ */ -#endif /* __STDC__ */ -#elif defined(__UNIXOS2__) || defined(__SOL64__) -typedef long int int32_t; -typedef long long int int64_t; -#elif defined( __VMS ) -#include -#elif defined(__SCO__) || defined(__USLC__) -#include -#elif defined(WIN32) && defined(__GNUC__) -#include -#endif - -#ifndef GLX_VERSION_1_3 -#define GLX_VERSION_1_3 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *); -extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *); -extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *); -extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig); -extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *); -extern void glXDestroyWindow (Display *, GLXWindow); -extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *); -extern void glXDestroyPixmap (Display *, GLXPixmap); -extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *); -extern void glXDestroyPbuffer (Display *, GLXPbuffer); -extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *); -extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool); -extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext); -extern GLXDrawable glXGetCurrentReadDrawable (void); -extern Display * glXGetCurrentDisplay (void); -extern int glXQueryContext (Display *, GLXContext, int, int *); -extern void glXSelectEvent (Display *, GLXDrawable, unsigned long); -extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements); -typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); -typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value); -typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config); -typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); -typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win); -typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); -typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap); -typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list); -typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf); -typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); -typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); -typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); -typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void); -typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void); -typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); -typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask); -typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); -#endif - -#ifndef GLX_VERSION_1_4 -#define GLX_VERSION_1_4 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); -#endif - -#ifndef GLX_ARB_get_proc_address -#define GLX_ARB_get_proc_address 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName); -#endif - -#ifndef GLX_ARB_multisample -#define GLX_ARB_multisample 1 -#endif - -#ifndef GLX_SGIS_multisample -#define GLX_SGIS_multisample 1 -#endif - -#ifndef GLX_EXT_visual_info -#define GLX_EXT_visual_info 1 -#endif - -#ifndef GLX_SGI_swap_control -#define GLX_SGI_swap_control 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXSwapIntervalSGI (int); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval); -#endif - -#ifndef GLX_SGI_video_sync -#define GLX_SGI_video_sync 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXGetVideoSyncSGI (unsigned int *); -extern int glXWaitVideoSyncSGI (int, int, unsigned int *); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count); -typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count); -#endif - -#ifndef GLX_SGI_make_current_read -#define GLX_SGI_make_current_read 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext); -extern GLXDrawable glXGetCurrentReadDrawableSGI (void); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); -typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void); -#endif - -#ifndef GLX_SGIX_video_source -#define GLX_SGIX_video_source 1 -#ifdef _VL_H -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode); -extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); -typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource); -#endif /* _VL_H */ -#endif - -#ifndef GLX_EXT_visual_rating -#define GLX_EXT_visual_rating 1 -#endif - -#ifndef GLX_EXT_import_context -#define GLX_EXT_import_context 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Display * glXGetCurrentDisplayEXT (void); -extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *); -extern GLXContextID glXGetContextIDEXT (const GLXContext); -extern GLXContext glXImportContextEXT (Display *, GLXContextID); -extern void glXFreeContextEXT (Display *, GLXContext); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void); -typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value); -typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context); -typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID); -typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context); -#endif - -#ifndef GLX_SGIX_fbconfig -#define GLX_SGIX_fbconfig 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *); -extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *); -extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap); -extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool); -extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX); -extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); -typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements); -typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); -typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); -typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config); -typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis); -#endif - -#ifndef GLX_SGIX_pbuffer -#define GLX_SGIX_pbuffer 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *); -extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX); -extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *); -extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long); -extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); -typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf); -typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); -typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask); -typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask); -#endif - -#ifndef GLX_SGI_cushion -#define GLX_SGI_cushion 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXCushionSGI (Display *, Window, float); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion); -#endif - -#ifndef GLX_SGIX_video_resize -#define GLX_SGIX_video_resize 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXBindChannelToWindowSGIX (Display *, int, int, Window); -extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int); -extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *); -extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *); -extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window); -typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h); -typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); -typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h); -typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype); -#endif - -#ifndef GLX_SGIX_dmbuffer -#define GLX_SGIX_dmbuffer 1 -#ifdef _DM_BUFFER_H_ -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); -#endif /* _DM_BUFFER_H_ */ -#endif - -#ifndef GLX_SGIX_swap_group -#define GLX_SGIX_swap_group 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member); -#endif - -#ifndef GLX_SGIX_swap_barrier -#define GLX_SGIX_swap_barrier 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int); -extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier); -typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max); -#endif - -#ifndef GLX_SUN_get_transparent_index -#define GLX_SUN_get_transparent_index 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex); -#endif - -#ifndef GLX_MESA_copy_sub_buffer -#define GLX_MESA_copy_sub_buffer 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); -#endif - -#ifndef GLX_MESA_pixmap_colormap -#define GLX_MESA_pixmap_colormap 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); -#endif - -#ifndef GLX_MESA_release_buffers -#define GLX_MESA_release_buffers 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable); -#endif - -#ifndef GLX_MESA_set_3dfx_mode -#define GLX_MESA_set_3dfx_mode 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXSet3DfxModeMESA (int); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode); -#endif - -#ifndef GLX_SGIX_visual_select_group -#define GLX_SGIX_visual_select_group 1 -#endif - -#ifndef GLX_OML_swap_method -#define GLX_OML_swap_method 1 -#endif - -#ifndef GLX_OML_sync_control -#define GLX_OML_sync_control 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *); -extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *); -extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t); -extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *); -extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); -typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); -typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); -typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); -typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); -#endif - -#ifndef GLX_SGIX_hyperpipe_group -#define GLX_SGIX_hyperpipe_group 1 - -typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int networkId; -} GLXHyperpipeNetworkSGIX; - -typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int channel; - unsigned int - participationType; - int timeSlice; -} GLXHyperpipeConfigSGIX; - -typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int srcXOrigin, srcYOrigin, srcWidth, srcHeight; - int destXOrigin, destYOrigin, destWidth, destHeight; -} GLXPipeRect; - -typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int XOrigin, YOrigin, maxHeight, maxWidth; -} GLXPipeRectLimits; - -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *); -extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *); -extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *); -extern int glXDestroyHyperpipeConfigSGIX (Display *, int); -extern int glXBindHyperpipeSGIX (Display *, int); -extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *); -extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *); -extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes); -typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId); -typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes); -typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId); -typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId); -typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList); -typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList); -typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList); -#endif - -#ifndef GLX_MESA_agp_offset -#define GLX_MESA_agp_offset 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern unsigned int glXGetAGPOffsetMESA (const void *); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer); -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/internal/dri_interface.h b/nx-X11/extras/Mesa_6.4.2/include/GL/internal/dri_interface.h deleted file mode 100644 index 0f3555b576..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/internal/dri_interface.h +++ /dev/null @@ -1,477 +0,0 @@ -/* - * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file dri_interface.h - * - * This file contains all the types and functions that define the interface - * between a DRI driver and driver loader. Currently, the most common driver - * loader is the XFree86 libGL.so. However, other loaders do exist, and in - * the future the server-side libglx.a will also be a loader. - * - * \author Kevin E. Martin - * \author Ian Romanick - */ - -#ifndef DRI_INTERFACE_H -#define DRI_INTERFACE_H - -#include -#include - -/** - * \name DRI interface structures - * - * The following structures define the interface between the GLX client - * side library and the DRI (direct rendering infrastructure). - */ -/*@{*/ -typedef struct __DRIdisplayRec __DRIdisplay; -typedef struct __DRIscreenRec __DRIscreen; -typedef struct __DRIcontextRec __DRIcontext; -typedef struct __DRIdrawableRec __DRIdrawable; -typedef struct __DRIdriverRec __DRIdriver; -typedef struct __DRIframebufferRec __DRIframebuffer; -typedef struct __DRIversionRec __DRIversion; -typedef struct __DRIinterfaceMethodsRec __DRIinterfaceMethods; -typedef unsigned long __DRIid; -typedef void __DRInativeDisplay; -/*@}*/ - - -/** - * \name Functions provided by the driver loader. - */ -/*@{*/ -/** - * Type of a pointer to \c glXGetScreenDriver, as returned by - * \c glXGetProcAddress. This function is used to get the name of the DRI - * driver for the specified screen of the specified display. The driver - * name is typically used with \c glXGetDriverConfig. - * - * \sa glXGetScreenDriver, glXGetProcAddress, glXGetDriverConfig - */ -typedef const char * (* PFNGLXGETSCREENDRIVERPROC) (__DRInativeDisplay *dpy, int scrNum); - -/** - * Type of a pointer to \c glXGetDriverConfig, as returned by - * \c glXGetProcAddress. This function is used to get the XML document - * describing the configuration options available for the specified driver. - * - * \sa glXGetDriverConfig, glXGetProcAddress, glXGetScreenDriver - */ -typedef const char * (* PFNGLXGETDRIVERCONFIGPROC) (const char *driverName); - -/** - * Type of a pointer to \c glxEnableExtension, as returned by - * \c __DRIinterfaceMethods::getProcAddress. This function is used to enable - * a GLX extension on the specified screen. - */ -typedef void (* PFNGLXSCRENABLEEXTENSIONPROC) ( void *psc, const char * name ); -/*@}*/ - - -/** - * \name Functions and data provided by the driver. - */ -/*@{*/ - -typedef void *(CREATENEWSCREENFUNC)(__DRInativeDisplay *dpy, int scrn, - __DRIscreen *psc, const __GLcontextModes * modes, - const __DRIversion * ddx_version, const __DRIversion * dri_version, - const __DRIversion * drm_version, const __DRIframebuffer * frame_buffer, - void * pSAREA, int fd, int internal_api_version, - const __DRIinterfaceMethods * interface, - __GLcontextModes ** driver_modes); -typedef CREATENEWSCREENFUNC* PFNCREATENEWSCREENFUNC; -extern CREATENEWSCREENFUNC __driCreateNewScreen_20050727; - - -/** - * XML document describing the configuration options supported by the - * driver. - */ -extern const char __driConfigOptions[]; - -/*@}*/ - - -/** - * Stored version of some component (i.e., server-side DRI module, kernel-side - * DRM, etc.). - * - * \todo - * There are several data structures that explicitly store a major version, - * minor version, and patch level. These structures should be modified to - * have a \c __DRIversionRec instead. - */ -struct __DRIversionRec { - int major; /**< Major version number. */ - int minor; /**< Minor version number. */ - int patch; /**< Patch-level. */ -}; - - -typedef void (*__DRIfuncPtr)(void); - -struct __DRIinterfaceMethodsRec { - /** - * Get pointer to named function. - */ - __DRIfuncPtr (*getProcAddress)( const char * proc_name ); - - /** - * Create a list of \c __GLcontextModes structures. - */ - __GLcontextModes * (*createContextModes)(unsigned count, - size_t minimum_bytes_per_struct); - - /** - * Destroy a list of \c __GLcontextModes structures. - * - * \todo - * Determine if the drivers actually need to call this. - */ - void (*destroyContextModes)( __GLcontextModes * modes ); - - /** - * Get the \c __DRIscreen for a given display and screen number. - */ - __DRIscreen *(*getScreen)(__DRInativeDisplay *dpy, int screenNum); - - - /** - * \name Client/server protocol functions. - * - * These functions implement the DRI client/server protocol for - * context and drawable operations. Platforms that do not implement - * the wire protocol (e.g., EGL) will implement glorified no-op functions. - */ - /*@{*/ - /** - * Determine if the specified window ID still exists. - * - * \note - * Implementations may assume that the driver will only pass an ID into - * this function that actually corresponds to a window. On - * implementations where windows can only be destroyed by the DRI driver - * (e.g., EGL), this function is allowed to always return \c GL_TRUE. - */ - GLboolean (*windowExists)(__DRInativeDisplay *dpy, __DRIid draw); - - /** - * Create the server-side portion of the GL context. - */ - GLboolean (* createContext)( __DRInativeDisplay *dpy, int screenNum, - int configID, void * contextID, drm_context_t * hw_context ); - - /** - * Destroy the server-side portion of the GL context. - */ - GLboolean (* destroyContext)( __DRInativeDisplay *dpy, int screenNum, - __DRIid context ); - - /** - * Create the server-side portion of the drawable. - */ - GLboolean (*createDrawable)( __DRInativeDisplay * ndpy, int screen, - __DRIid drawable, drm_drawable_t * hHWDrawable ); - - /** - * Destroy the server-side portion of the drawable. - */ - GLboolean (*destroyDrawable)( __DRInativeDisplay * ndpy, int screen, - __DRIid drawable ); - - /** - * This function is used to get information about the position, size, and - * clip rects of a drawable. - */ - GLboolean (* getDrawableInfo) ( __DRInativeDisplay *dpy, int scrn, - __DRIid draw, unsigned int * index, unsigned int * stamp, - int * x, int * y, int * width, int * height, - int * numClipRects, drm_clip_rect_t ** pClipRects, - int * backX, int * backY, - int * numBackClipRects, drm_clip_rect_t ** pBackClipRects ); - /*@}*/ - - - /** - * \name Timing related functions. - */ - /*@{*/ - /** - * Get the 64-bit unadjusted system time (UST). - */ - int (*getUST)(int64_t * ust); - - /** - * Get the media stream counter (MSC) rate. - * - * Matching the definition in GLX_OML_sync_control, this function returns - * the rate of the "media stream counter". In practical terms, this is - * the frame refresh rate of the display. - */ - GLboolean (*getMSCRate)(__DRInativeDisplay * dpy, __DRIid drawable, - int32_t * numerator, int32_t * denominator); - /*@}*/ -}; - - -/** - * Framebuffer information record. Used by libGL to communicate information - * about the framebuffer to the driver's \c __driCreateNewScreen function. - * - * In XFree86, most of this information is derrived from data returned by - * calling \c XF86DRIGetDeviceInfo. - * - * \sa XF86DRIGetDeviceInfo __DRIdisplayRec::createNewScreen - * __driUtilCreateNewScreen CallCreateNewScreen - * - * \bug This structure could be better named. - */ -struct __DRIframebufferRec { - unsigned char *base; /**< Framebuffer base address in the CPU's - * address space. This value is calculated by - * calling \c drmMap on the framebuffer handle - * returned by \c XF86DRIGetDeviceInfo (or a - * similar function). - */ - int size; /**< Framebuffer size, in bytes. */ - int stride; /**< Number of bytes from one line to the next. */ - int width; /**< Pixel width of the framebuffer. */ - int height; /**< Pixel height of the framebuffer. */ - int dev_priv_size; /**< Size of the driver's dev-priv structure. */ - void *dev_priv; /**< Pointer to the driver's dev-priv structure. */ -}; - - -/** - * Screen dependent methods. This structure is initialized during the - * \c __DRIdisplayRec::createScreen call. - */ -struct __DRIscreenRec { - /** - * Method to destroy the private DRI screen data. - */ - void (*destroyScreen)(__DRInativeDisplay *dpy, int scrn, void *screenPrivate); - - /** - * Method to create the private DRI drawable data and initialize the - * drawable dependent methods. - */ - void *(*createNewDrawable)(__DRInativeDisplay *dpy, const __GLcontextModes *modes, - __DRIid draw, __DRIdrawable *pdraw, - int renderType, const int *attrs); - - /** - * Method to return a pointer to the DRI drawable data. - */ - __DRIdrawable *(*getDrawable)(__DRInativeDisplay *dpy, __DRIid draw, - void *drawablePrivate); - - /** - * Opaque pointer to private per screen direct rendering data. \c NULL - * if direct rendering is not supported on this screen. Never - * dereferenced in libGL. - */ - void *private; - - /** - * Get the number of vertical refreshes since some point in time before - * this function was first called (i.e., system start up). - * - * \since Internal API version 20030317. - */ - int (*getMSC)( void *screenPrivate, int64_t *msc ); - - /** - * Opaque pointer that points back to the containing - * \c __GLXscreenConfigs. This data structure is shared with DRI drivers - * but \c __GLXscreenConfigs is not. However, they are needed by some GLX - * functions called by DRI drivers. - * - * \since Internal API version 20030813. - */ - void *screenConfigs; - - /** - * Functions associated with MESA_allocate_memory. - * - * \since Internal API version 20030815. - */ - /*@{*/ - void *(*allocateMemory)(__DRInativeDisplay *dpy, int scrn, GLsizei size, - GLfloat readfreq, GLfloat writefreq, - GLfloat priority); - - void (*freeMemory)(__DRInativeDisplay *dpy, int scrn, GLvoid *pointer); - - GLuint (*memoryOffset)(__DRInativeDisplay *dpy, int scrn, const GLvoid *pointer); - /*@}*/ - - /** - * Method to create the private DRI context data and initialize the - * context dependent methods. - * - * \since Internal API version 20031201. - */ - void * (*createNewContext)(__DRInativeDisplay *dpy, const __GLcontextModes *modes, - int render_type, - void *sharedPrivate, __DRIcontext *pctx); -}; - -/** - * Context dependent methods. This structure is initialized during the - * \c __DRIscreenRec::createContext call. - */ -struct __DRIcontextRec { - /** - * Method to destroy the private DRI context data. - */ - void (*destroyContext)(__DRInativeDisplay *dpy, int scrn, void *contextPrivate); - - /** - * Opaque pointer to private per context direct rendering data. - * \c NULL if direct rendering is not supported on the display or - * screen used to create this context. Never dereferenced in libGL. - */ - void *private; - - /** - * Pointer to the mode used to create this context. - * - * \since Internal API version 20040317. - */ - const __GLcontextModes * mode; - - /** - * Method to bind a DRI drawable to a DRI graphics context. - * - * \since Internal API version 20050727. - */ - GLboolean (*bindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw, - __DRIid read, __DRIcontext *ctx); - - /** - * Method to unbind a DRI drawable from a DRI graphics context. - * - * \since Internal API version 20050727. - */ - GLboolean (*unbindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw, - __DRIid read, __DRIcontext *ctx); -}; - -/** - * Drawable dependent methods. This structure is initialized during the - * \c __DRIscreenRec::createDrawable call. \c createDrawable is not called - * by libGL at this time. It's currently used via the dri_util.c utility code - * instead. - */ -struct __DRIdrawableRec { - /** - * Method to destroy the private DRI drawable data. - */ - void (*destroyDrawable)(__DRInativeDisplay *dpy, void *drawablePrivate); - - /** - * Method to swap the front and back buffers. - */ - void (*swapBuffers)(__DRInativeDisplay *dpy, void *drawablePrivate); - - /** - * Opaque pointer to private per drawable direct rendering data. - * \c NULL if direct rendering is not supported on the display or - * screen used to create this drawable. Never dereferenced in libGL. - */ - void *private; - - /** - * Get the number of completed swap buffers for this drawable. - * - * \since Internal API version 20030317. - */ - int (*getSBC)(__DRInativeDisplay *dpy, void *drawablePrivate, int64_t *sbc ); - - /** - * Wait for the SBC to be greater than or equal target_sbc. - * - * \since Internal API version 20030317. - */ - int (*waitForSBC)( __DRInativeDisplay * dpy, void *drawablePriv, - int64_t target_sbc, - int64_t * msc, int64_t * sbc ); - - /** - * Wait for the MSC to equal target_msc, or, if that has already passed, - * the next time (MSC % divisor) is equal to remainder. If divisor is - * zero, the function will return as soon as MSC is greater than or equal - * to target_msc. - * - * \since Internal API version 20030317. - */ - int (*waitForMSC)( __DRInativeDisplay * dpy, void *drawablePriv, - int64_t target_msc, int64_t divisor, int64_t remainder, - int64_t * msc, int64_t * sbc ); - - /** - * Like \c swapBuffers, but does NOT have an implicit \c glFlush. Once - * rendering is complete, waits until MSC is equal to target_msc, or - * if that has already passed, waits until (MSC % divisor) is equal - * to remainder. If divisor is zero, the swap will happen as soon as - * MSC is greater than or equal to target_msc. - * - * \since Internal API version 20030317. - */ - int64_t (*swapBuffersMSC)(__DRInativeDisplay *dpy, void *drawablePrivate, - int64_t target_msc, - int64_t divisor, int64_t remainder); - - /** - * Enable or disable frame usage tracking. - * - * \since Internal API version 20030317. - */ - int (*frameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate, GLboolean enable); - - /** - * Retrieve frame usage information. - * - * \since Internal API version 20030317. - */ - int (*queryFrameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate, - int64_t * sbc, int64_t * missedFrames, - float * lastMissedUsage, float * usage ); - - /** - * Used by drivers that implement the GLX_SGI_swap_control or - * GLX_MESA_swap_control extension. - * - * \since Internal API version 20030317. - */ - unsigned swap_interval; -}; - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/internal/glcore.h b/nx-X11/extras/Mesa_6.4.2/include/GL/internal/glcore.h deleted file mode 100644 index 48748d91e8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/internal/glcore.h +++ /dev/null @@ -1,498 +0,0 @@ -/* $XFree86: xc/lib/GL/include/GL/internal/glcore.h,v 1.7 2001/03/25 05:32:00 tsi Exp $ */ -#ifndef __gl_core_h_ -#define __gl_core_h_ - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#ifndef XFree86LOADER -#include -#endif - -#ifdef CAPI -#undef CAPI -#endif -#define CAPI - -#define GL_CORE_SGI 1 -#define GL_CORE_MESA 2 -#define GL_CORE_APPLE 4 - -typedef struct __GLcontextRec __GLcontext; -typedef struct __GLinterfaceRec __GLinterface; - -/* -** This file defines the interface between the GL core and the surrounding -** "operating system" that supports it (currently the GLX or WGL extensions). -** -** Members (data and function pointers) are documented as imported or -** exported according to how they are used by the core rendering functions. -** Imported members are initialized by the "operating system" and used by -** the core functions. Exported members are initialized by the core functions -** and used by the "operating system". -*/ - -/* -** Mode and limit information for a context. This information is -** kept around in the context so that values can be used during -** command execution, and for returning information about the -** context to the application. -*/ -typedef struct __GLcontextModesRec { - struct __GLcontextModesRec * next; - - GLboolean rgbMode; - GLboolean floatMode; - GLboolean colorIndexMode; - GLuint doubleBufferMode; - GLuint stereoMode; - - GLboolean haveAccumBuffer; - GLboolean haveDepthBuffer; - GLboolean haveStencilBuffer; - - GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ - GLuint redMask, greenMask, blueMask, alphaMask; - GLint rgbBits; /* total bits for rgb */ - GLint indexBits; /* total bits for colorindex */ - - GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; - GLint depthBits; - GLint stencilBits; - - GLint numAuxBuffers; - - GLint level; - - GLint pixmapMode; - - /* GLX */ - GLint visualID; - GLint visualType; /**< One of the GLX X visual types. (i.e., - * \c GLX_TRUE_COLOR, etc.) - */ - - /* EXT_visual_rating / GLX 1.2 */ - GLint visualRating; - - /* EXT_visual_info / GLX 1.2 */ - GLint transparentPixel; - /* colors are floats scaled to ints */ - GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; - GLint transparentIndex; - - /* ARB_multisample / SGIS_multisample */ - GLint sampleBuffers; - GLint samples; - - /* SGIX_fbconfig / GLX 1.3 */ - GLint drawableType; - GLint renderType; - GLint xRenderable; - GLint fbconfigID; - - /* SGIX_pbuffer / GLX 1.3 */ - GLint maxPbufferWidth; - GLint maxPbufferHeight; - GLint maxPbufferPixels; - GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */ - GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */ - - /* SGIX_visual_select_group */ - GLint visualSelectGroup; - - /* OML_swap_method */ - GLint swapMethod; - - GLint screen; -} __GLcontextModes; - -/* Several fields of __GLcontextModes can take these as values. Since - * GLX header files may not be available everywhere they need to be used, - * redefine them here. - */ -#define GLX_NONE 0x8000 -#define GLX_SLOW_CONFIG 0x8001 -#define GLX_TRUE_COLOR 0x8002 -#define GLX_DIRECT_COLOR 0x8003 -#define GLX_PSEUDO_COLOR 0x8004 -#define GLX_STATIC_COLOR 0x8005 -#define GLX_GRAY_SCALE 0x8006 -#define GLX_STATIC_GRAY 0x8007 -#define GLX_TRANSPARENT_RGB 0x8008 -#define GLX_TRANSPARENT_INDEX 0x8009 -#define GLX_NON_CONFORMANT_CONFIG 0x800D -#define GLX_SWAP_EXCHANGE_OML 0x8061 -#define GLX_SWAP_COPY_OML 0x8062 -#define GLX_SWAP_UNDEFINED_OML 0x8063 - -#define GLX_DONT_CARE 0xFFFFFFFF - -#define GLX_RGBA_BIT 0x00000001 -#define GLX_COLOR_INDEX_BIT 0x00000002 -#define GLX_WINDOW_BIT 0x00000001 -#define GLX_PIXMAP_BIT 0x00000002 -#define GLX_PBUFFER_BIT 0x00000004 - -/************************************************************************/ - -/* -** Structure used for allocating and freeing drawable private memory. -** (like software buffers, for example). -** -** The memory allocation routines are provided by the surrounding -** "operating system" code, and they are to be used for allocating -** software buffers and things which are associated with the drawable, -** and used by any context which draws to that drawable. There are -** separate memory allocation functions for drawables and contexts -** since drawables and contexts can be created and destroyed independently -** of one another, and the "operating system" may want to use separate -** allocation arenas for each. -** -** The freePrivate function is filled in by the core routines when they -** allocates software buffers, and stick them in "private". The freePrivate -** function will destroy anything allocated to this drawable (to be called -** when the drawable is destroyed). -*/ -typedef struct __GLdrawableRegionRec __GLdrawableRegion; -typedef struct __GLdrawableBufferRec __GLdrawableBuffer; -typedef struct __GLdrawablePrivateRec __GLdrawablePrivate; - -typedef struct __GLregionRectRec { - /* lower left (inside the rectangle) */ - GLint x0, y0; - /* upper right (outside the rectangle) */ - GLint x1, y1; -} __GLregionRect; - -struct __GLdrawableRegionRec { - GLint numRects; - __GLregionRect *rects; - __GLregionRect boundingRect; -}; - -/************************************************************************/ - -/* masks for the buffers */ -#define __GL_FRONT_BUFFER_MASK 0x00000001 -#define __GL_FRONT_LEFT_BUFFER_MASK 0x00000001 -#define __GL_FRONT_RIGHT_BUFFER_MASK 0x00000002 -#define __GL_BACK_BUFFER_MASK 0x00000004 -#define __GL_BACK_LEFT_BUFFER_MASK 0x00000004 -#define __GL_BACK_RIGHT_BUFFER_MASK 0x00000008 -#define __GL_ACCUM_BUFFER_MASK 0x00000010 -#define __GL_DEPTH_BUFFER_MASK 0x00000020 -#define __GL_STENCIL_BUFFER_MASK 0x00000040 -#define __GL_AUX_BUFFER_MASK(i) (0x0000080 << (i)) - -#define __GL_ALL_BUFFER_MASK 0xffffffff - -/* what Resize routines return if resize resorted to fallback case */ -#define __GL_BUFFER_FALLBACK 0x10 - -typedef void (*__GLbufFallbackInitFn)(__GLdrawableBuffer *buf, - __GLdrawablePrivate *glPriv, GLint bits); -typedef void (*__GLbufMainInitFn)(__GLdrawableBuffer *buf, - __GLdrawablePrivate *glPriv, GLint bits, - __GLbufFallbackInitFn back); - -/* -** A drawable buffer -** -** This data structure describes the context side of a drawable. -** -** According to the spec there could be multiple contexts bound to the same -** drawable at the same time (from different threads). In order to avoid -** multiple-access conflicts, locks are used to serialize access. When a -** thread needs to access (read or write) a member of the drawable, it takes -** a lock first. Some of the entries in the drawable are treated "mostly -** constant", so we take the freedom of allowing access to them without -** taking a lock (for optimization reasons). -** -** For more details regarding locking, see buffers.h in the GL core -*/ -struct __GLdrawableBufferRec { - /* - ** Buffer dimensions - */ - GLint width, height, depth; - - /* - ** Framebuffer base address - */ - void *base; - - /* - ** Framebuffer size (in bytes) - */ - GLuint size; - - /* - ** Size (in bytes) of each element in the framebuffer - */ - GLuint elementSize; - GLuint elementSizeLog2; - - /* - ** Element skip from one scanline to the next. - ** If the buffer is part of another buffer (for example, fullscreen - ** front buffer), outerWidth is the width of that buffer. - */ - GLint outerWidth; - - /* - ** outerWidth * elementSize - */ - GLint byteWidth; - - /* - ** Allocation/deallocation is done based on this handle. A handle - ** is conceptually different from the framebuffer 'base'. - */ - void *handle; - - /* imported */ - GLboolean (*resize)(__GLdrawableBuffer *buf, - GLint x, GLint y, GLuint width, GLuint height, - __GLdrawablePrivate *glPriv, GLuint bufferMask); - void (*lock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv); - void (*unlock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv); - void (*fill)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv, - GLuint val, GLint x, GLint y, GLint w, GLint h); - void (*free)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv); - - /* exported */ - void (*freePrivate)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv); -#ifdef __cplusplus - void *privatePtr; -#else - void *private; -#endif - - /* private */ - void *other; /* implementation private data */ - __GLbufMainInitFn mainInit; - __GLbufFallbackInitFn fallbackInit; -}; - -/* -** The context side of the drawable private -*/ -struct __GLdrawablePrivateRec { - /* - ** Drawable Modes - */ - __GLcontextModes *modes; - - /* - ** Drawable size - */ - GLuint width, height; - - /* - ** Origin in screen coordinates of the drawable - */ - GLint xOrigin, yOrigin; -#ifdef __GL_ALIGNED_BUFFERS - /* - ** Drawable offset from screen origin - */ - GLint xOffset, yOffset; - - /* - ** Alignment restriction - */ - GLint xAlignment, yAlignment; -#endif - /* - ** Should we invert the y axis? - */ - GLint yInverted; - - /* - ** Mask specifying which buffers are renderable by the hw - */ - GLuint accelBufferMask; - - /* - ** the buffers themselves - */ - __GLdrawableBuffer frontBuffer; - __GLdrawableBuffer backBuffer; - __GLdrawableBuffer accumBuffer; - __GLdrawableBuffer depthBuffer; - __GLdrawableBuffer stencilBuffer; -#if defined(__GL_NUMBER_OF_AUX_BUFFERS) && (__GL_NUMBER_OF_AUX_BUFFERS > 0) - __GLdrawableBuffer *auxBuffer; -#endif - - __GLdrawableRegion ownershipRegion; - - /* - ** Lock for the drawable private structure - */ - void *lock; -#ifdef DEBUG - /* lock debugging info */ - int lockRefCount; - int lockLine[10]; - char *lockFile[10]; -#endif - - /* imported */ - void *(*malloc)(size_t size); - void *(*calloc)(size_t numElem, size_t elemSize); - void *(*realloc)(void *oldAddr, size_t newSize); - void (*free)(void *addr); - - GLboolean (*addSwapRect)(__GLdrawablePrivate *glPriv, - GLint x, GLint y, GLsizei width, GLsizei height); - void (*setClipRect)(__GLdrawablePrivate *glPriv, - GLint x, GLint y, GLsizei width, GLsizei height); - void (*updateClipRegion)(__GLdrawablePrivate *glPriv); - GLboolean (*resize)(__GLdrawablePrivate *glPriv); - void (*getDrawableSize)(__GLdrawablePrivate *glPriv, - GLint *x, GLint *y, GLuint *width, GLuint *height); - - void (*lockDP)(__GLdrawablePrivate *glPriv, __GLcontext *gc); - void (*unlockDP)(__GLdrawablePrivate *glPriv); - - /* exported */ -#ifdef __cplusplus - void *privatePtr; -#else - void *private; -#endif - void (*freePrivate)(__GLdrawablePrivate *); - - /* client data */ - void *other; -}; - -/* -** Macros to lock/unlock the drawable private -*/ -#if defined(DEBUG) -#define __GL_LOCK_DP(glPriv,gc) \ - (*(glPriv)->lockDP)(glPriv,gc); \ - (glPriv)->lockLine[(glPriv)->lockRefCount] = __LINE__; \ - (glPriv)->lockFile[(glPriv)->lockRefCount] = __FILE__; \ - (glPriv)->lockRefCount++ -#define __GL_UNLOCK_DP(glPriv) \ - (glPriv)->lockRefCount--; \ - (glPriv)->lockLine[(glPriv)->lockRefCount] = 0; \ - (glPriv)->lockFile[(glPriv)->lockRefCount] = NULL; \ - (*(glPriv)->unlockDP)(glPriv) -#else /* DEBUG */ -#define __GL_LOCK_DP(glPriv,gc) (*(glPriv)->lockDP)(glPriv,gc) -#define __GL_UNLOCK_DP(glPriv) (*(glPriv)->unlockDP)(glPriv) -#endif /* DEBUG */ - - -/* -** Procedures which are imported by the GL from the surrounding -** "operating system". Math functions are not considered part of the -** "operating system". -*/ -typedef struct __GLimportsRec { - /* Memory management */ - void * (*malloc)(__GLcontext *gc, size_t size); - void *(*calloc)(__GLcontext *gc, size_t numElem, size_t elemSize); - void *(*realloc)(__GLcontext *gc, void *oldAddr, size_t newSize); - void (*free)(__GLcontext *gc, void *addr); - - /* Error handling */ - void (*warning)(__GLcontext *gc, char *fmt); - void (*fatal)(__GLcontext *gc, char *fmt); - - /* other system calls */ - char *(CAPI *getenv)(__GLcontext *gc, const char *var); - int (CAPI *atoi)(__GLcontext *gc, const char *str); - int (CAPI *sprintf)(__GLcontext *gc, char *str, const char *fmt, ...); - void *(CAPI *fopen)(__GLcontext *gc, const char *path, const char *mode); - int (CAPI *fclose)(__GLcontext *gc, void *stream); - int (CAPI *fprintf)(__GLcontext *gc, void *stream, const char *fmt, ...); - - /* Drawing surface management */ - __GLdrawablePrivate *(*getDrawablePrivate)(__GLcontext *gc); - __GLdrawablePrivate *(*getReadablePrivate)(__GLcontext *gc); - - /* Operating system dependent data goes here */ - void *other; -} __GLimports; - -/************************************************************************/ - -/* -** Procedures which are exported by the GL to the surrounding "operating -** system" so that it can manage multiple GL context's. -*/ -typedef struct __GLexportsRec { - /* Context management (return GL_FALSE on failure) */ - GLboolean (*destroyContext)(__GLcontext *gc); - GLboolean (*loseCurrent)(__GLcontext *gc); - /* oldglPriv isn't used anymore, kept for backwards compatibility */ - GLboolean (*makeCurrent)(__GLcontext *gc); - GLboolean (*shareContext)(__GLcontext *gc, __GLcontext *gcShare); - GLboolean (*copyContext)(__GLcontext *dst, const __GLcontext *src, GLuint mask); - GLboolean (*forceCurrent)(__GLcontext *gc); - - /* Drawing surface notification callbacks */ - GLboolean (*notifyResize)(__GLcontext *gc); - void (*notifyDestroy)(__GLcontext *gc); - void (*notifySwapBuffers)(__GLcontext *gc); - - /* Dispatch table override control for external agents like libGLS */ - struct __GLdispatchStateRec* (*dispatchExec)(__GLcontext *gc); - void (*beginDispatchOverride)(__GLcontext *gc); - void (*endDispatchOverride)(__GLcontext *gc); -} __GLexports; - -/************************************************************************/ - -/* -** This must be the first member of a __GLcontext structure. This is the -** only part of a context that is exposed to the outside world; everything -** else is opaque. -*/ -struct __GLinterfaceRec { - __GLimports imports; - __GLexports exports; -}; - -extern __GLcontext *__glCoreCreateContext(__GLimports *, __GLcontextModes *); -extern void __glCoreNopDispatch(void); - -#endif /* __gl_core_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/internal/sarea.h b/nx-X11/extras/Mesa_6.4.2/include/GL/internal/sarea.h deleted file mode 100644 index 77c16e0efe..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/internal/sarea.h +++ /dev/null @@ -1,94 +0,0 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.11 2002/10/30 12:52:03 alanh Exp $ */ -/** - * \file sarea.h - * SAREA definitions. - * - * \author Kevin E. Martin - * \author Jens Owen - * \author Rickard E. (Rik) Faith - */ - -/* - * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. - * Copyright 2000 VA Linux Systems, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.11 2002/10/30 12:52:03 alanh Exp $ */ - -#ifndef _SAREA_H_ -#define _SAREA_H_ - -#include "xf86drm.h" - -/* SAREA area needs to be at least a page */ -#if defined(__alpha__) -#define SAREA_MAX 0x2000 -#elif defined(__ia64__) -#define SAREA_MAX 0x10000 /* 64kB */ -#else -/* Intel 830M driver needs at least 8k SAREA */ -#define SAREA_MAX 0x2000 -#endif - -#define SAREA_MAX_DRAWABLES 256 - -#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000 - -/** - * SAREA per drawable information. - * - * \sa _XF86DRISAREA. - */ -typedef struct _XF86DRISAREADrawable { - unsigned int stamp; - unsigned int flags; -} XF86DRISAREADrawableRec, *XF86DRISAREADrawablePtr; - -/** - * SAREA frame information. - * - * \sa _XF86DRISAREA. - */ -typedef struct _XF86DRISAREAFrame { - unsigned int x; - unsigned int y; - unsigned int width; - unsigned int height; - unsigned int fullscreen; -} XF86DRISAREAFrameRec, *XF86DRISAREAFramePtr; - -/** - * SAREA definition. - */ -typedef struct _XF86DRISAREA { - /** first thing is always the DRM locking structure */ - drmLock lock; - /** \todo Use readers/writer lock for drawable_lock */ - drmLock drawable_lock; - XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES]; - XF86DRISAREAFrameRec frame; - drm_context_t dummy_context; -} XF86DRISAREARec, *XF86DRISAREAPtr; - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/mesa_wgl.h b/nx-X11/extras/Mesa_6.4.2/include/GL/mesa_wgl.h deleted file mode 100644 index acc7eac2a7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/mesa_wgl.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.1 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* prototypes for the Mesa WGL functions */ -/* relocated here so that I could make GLUT get them properly */ - -#define _mesa_wgl_h_ - -#ifndef _mesa_wgl_h_ -#define _mesa_wgl_h_ - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__)) -# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ -# define GLAPI __declspec(dllexport) -# define WGLAPI __declspec(dllexport) -# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ -# define GLAPI __declspec(dllimport) -# define WGLAPI __declspec(dllimport) -# else /* for use with static link lib build of Win32 edition only */ -# define GLAPI extern -# define WGLAPI __declspec(dllimport) -# endif /* _STATIC_MESA support */ -# define GLAPIENTRY __stdcall -#else -/* non-Windows compilation */ -# define GLAPI extern -# define GLAPIENTRY -#endif /* WIN32 / CYGWIN32 bracket */ - - -#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) -#ifndef _GNU_H_WINDOWS32_FUNCTIONS -# ifdef UNICODE -# define wglUseFontBitmaps wglUseFontBitmapsW -# define wglUseFontOutlines wglUseFontOutlinesW -# else -# define wglUseFontBitmaps wglUseFontBitmapsA -# define wglUseFontOutlines wglUseFontOutlinesA -# endif /* !UNICODE */ -#endif /* _GNU_H_WINDOWS32_FUNCTIONS */ -typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR; -typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT; -typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR; -#endif - - -#ifdef _MSC_VER -# pragma warning( disable : 4615 ) /* pragma warning : unknown user warning type*/ -# pragma warning( push ) -# pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */ -#endif - -WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC); -WGLAPI int GLAPIENTRY wglMakeCurrent(HDC,HGLRC); -WGLAPI int GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *); -WGLAPI int GLAPIENTRY wglSwapBuffers(HDC hdc); -WGLAPI HDC GLAPIENTRY wglGetCurrentDC(void); -WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC); -WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int); -WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void); -WGLAPI PROC GLAPIENTRY wglGetProcAddress(const char*); -WGLAPI int GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *); -WGLAPI int GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int); -WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC); -WGLAPI int GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR); -WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR); -WGLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *); -WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc); -WGLAPI int GLAPIENTRY wglMakeCurrent(HDC, HGLRC); -WGLAPI int GLAPIENTRY wglRealizeLayerPalette(HDC, int, int); -WGLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *); -WGLAPI int GLAPIENTRY wglShareLists(HGLRC, HGLRC); -WGLAPI int GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int); -WGLAPI int GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long); -WGLAPI int GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long); -WGLAPI int GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT); -WGLAPI int GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT); -WGLAPI int GLAPIENTRY SwapBuffers(HDC); -WGLAPI int GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *); -WGLAPI int GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR); -WGLAPI int GLAPIENTRY GetPixelFormat(HDC); -WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *); - - -#ifndef WGL_ARB_extensions_string -#define WGL_ARB_extensions_string 1 - -WGLAPI const char * GLAPIENTRY wglGetExtensionsStringARB(HDC hdc); - -#endif /* WGL_ARB_extensions_string */ - - -#ifdef _MSC_VER -# pragma warning( pop ) -#endif - -#ifdef __cplusplus -} -#endif - - -#endif /* _mesa_wgl_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/mglmesa.h b/nx-X11/extras/Mesa_6.4.2/include/GL/mglmesa.h deleted file mode 100644 index d9ba61c175..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/mglmesa.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -* -* Mesa bindings for SciTech MGL -* -* Copyright (C) 1996 SciTech Software. -* All rights reserved. -* -* Filename: mglmesa.h -* Version: Revision: 1.1.1.1 -* -* Language: ANSI C -* Environment: Any -* -* Description: Header file for the Mesa/OpenGL interface bindings for the -* SciTech MGL graphics library. Uses the MGL internal -* device context structures to get direct access to the -* high performance MGL rasterization functions for maximum -* performance. Utilizes the VESA VBE/AF Accelerator Functions -* via the MGL's accelerated device driver functions, as well -* as basic DirectDraw accelerated functions provided by the -* MGL. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Library General Public -* License as published by the Free Software Foundation; either -* version 2 of the License, or (at your option) any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Library General Public License for more details. -* -* You should have received a copy of the GNU Library General Public -* License along with this library; if not, write to the Free -* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -* -* -****************************************************************************/ - -#ifndef __MGLMESA_H -#define __MGLMESA_H - -#include "mgraph.h" - -/*------------------------- Function Prototypes ---------------------------*/ - -#ifdef __cplusplus -extern "C" { /* Use "C" linkage when in C++ mode */ -#endif - -#ifndef __WINDOWS__ -#define GLAPIENTRY -#endif - -#ifdef __WINDOWS__ -bool GLAPIENTRY MGLMesaInitDLL(MGLCallbacks *cb,char *version); -#endif -void GLAPIENTRY MGLMesaChooseVisual(MGLDC *dc,MGLVisual *visual); -bool GLAPIENTRY MGLMesaSetVisual(MGLDC *dc,MGLVisual *visual); -bool GLAPIENTRY MGLMesaCreateContext(MGLDC *dc,bool forceMemDC); -void GLAPIENTRY MGLMesaDestroyContext(MGLDC *dc); -void GLAPIENTRY MGLMesaMakeCurrent(MGLDC *dc); -void GLAPIENTRY MGLMesaSwapBuffers(MGLDC *dc,bool waitVRT); - -/* Palette manipulation support. The reason we provide palette manipulation - * routines is so that when rendering in double buffered modes with a - * software backbuffer, the palette for the backbuffer is kept consistent - * with the hardware front buffer. - */ - -void GLAPIENTRY MGLMesaSetPaletteEntry(MGLDC *dc,int entry,uchar red,uchar green,uchar blue); -void GLAPIENTRY MGLMesaSetPalette(MGLDC *dc,palette_t *pal,int numColors,int startIndex); -void GLAPIENTRY MGLMesaRealizePalette(MGLDC *dc,int numColors,int startIndex,int waitVRT); - -#ifdef __cplusplus -} /* End of "C" linkage for C++ */ -#endif /* __cplusplus */ - -#endif /* __MGLMESA_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/miniglx.h b/nx-X11/extras/Mesa_6.4.2/include/GL/miniglx.h deleted file mode 100644 index 8c6180be60..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/miniglx.h +++ /dev/null @@ -1,482 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.1 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/** - * \file miniglx.h - * \brief Mini GLX interface functions. - * \author Brian Paul - * - * See comments miniglx.c for more information. - */ - -#ifndef MINIGLX_H -#define MINIGLX_H - -#include -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -/** - * \name Replacement Xlib/GLX types - */ -/*@{*/ -/** - * \brief Boolean type. - * - * It can have the values #True or #False. - */ -#ifndef MINIGLX_NO_XTYPES -typedef int Bool; -#endif -typedef int MINI_Bool; - -/** - * \brief Color map. - * - * Alias for private ::MiniGLXColormapRec structure. - */ -typedef struct MiniGLXColormapRec *MINI_Colormap; -#ifndef MINIGLX_NO_XTYPES -typedef struct MiniGLXColormapRec *Colormap; -#endif - -/** - * \brief Window attributes. - */ -typedef struct MiniGLXSetWindowAttributesRec { - int background_pixel; /**< \brief background pixel */ - int border_pixel; /**< \brief border pixel value */ - MINI_Colormap colormap; /**< \brief color map to be associated with window */ - int event_mask; /**< \brief set of events that should be saved */ -} XSetWindowAttributes; - -/** - * \brief Visual. - * - * Alias for the private ::MiniGLXVisualRec structure. - * - * \sa \ref datatypes. - */ -typedef struct MiniGLXVisualRec Visual; - -/** - * \brief Visual information. - * - * \sa \ref datatypes. - */ -#ifndef MINIGLX_NO_XTYPES -typedef unsigned long VisualID; -#endif -typedef unsigned long MINI_VisualID; -typedef struct MiniGLXXVisualInfoRec { - Visual *visual; /**< \brief pointer to the GLX Visual */ - MINI_VisualID visualid; /**< \brief visual ID */ - int screen; /**< \brief screen number */ - int depth; /**< \brief bit depth */ -#if defined(__cplusplus) || defined(c_plusplus) - int c_class; /**< \brief class */ -#else - int class; /**< \brief class */ -#endif - int bits_per_rgb; /**< \brief total bits per pixel */ -} XVisualInfo; - -/** - * \brief GLX Frame Buffer Configuration (for pbuffers) - * \sa \ref datatypes. - */ -typedef struct MiniGLXFBConfigRec { - XVisualInfo *visInfo; -} GLXFBConfig; - - -/** - * \brief Display handle. - * - * Alias for the private ::MiniGLXDisplayRec structure. - * - * \sa \ref datatypes. - */ -#ifndef MINIGLX_NO_XTYPES -typedef struct MiniGLXDisplayRec Display; -#endif -typedef struct MiniGLXDisplayRec MINI_Display; - -/** - * \brief Window handle. - * - * Alias for the private ::MiniGLXWindowRec structure. - * - * \sa \ref datatypes. - */ -#ifndef MINIGLX_NO_XTYPES -typedef struct MiniGLXWindowRec *Window; -#endif -typedef struct MiniGLXWindowRec *MINI_Window; - -/** - * \brief Drawable. - * - * Alias for the private ::MiniGLXWindowRec structure. - * - * For Mini GLX only the full-screen window can be used as source and - * destination in graphics operations. - * - * \sa \ref datatypes. - */ -#ifndef MINIGLX_NO_XTYPES -typedef struct MiniGLXWindowRec *Drawable; -#endif -typedef struct MiniGLXWindowRec *MINI_Drawable; - -/** - * \brief GLX drawable. - * - * Alias for the private ::MiniGLXWindowRec structure. - * - * Same as #Drawable. - * - * \sa \ref datatypes. - */ -typedef struct MiniGLXWindowRec *GLXDrawable; - -/** - * \brief GLX pbuffer. - * - * Alias for the private ::MiniGLXWindowRec structure. - * - * Same as #Drawable. - * - * \sa \ref datatypes. - */ -typedef struct MiniGLXWindowRec *GLXPbuffer; - -/** - * \brief GLX context. - * - * Alias for the private ::MiniGLXContext structure. - * - * \sa \ref datatypes. - */ -typedef struct MiniGLXContextRec *GLXContext; -/*@}*/ - - -typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - MINI_Bool send_event; /* true if this came from a SendEvent request */ - MINI_Display *display; /* Display the event was read from */ - MINI_Window window; - int x, y; - int width, height; - int count; /* if non-zero, at least this many more */ -} XExposeEvent; - -typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - MINI_Bool send_event; /* true if this came from a SendEvent request */ - MINI_Display *display; /* Display the event was read from */ - MINI_Window parent; /* parent of the window */ - MINI_Window window; /* window id of window created */ - int x, y; /* window location */ - int width, height; /* size of window */ - int border_width; /* border width */ - MINI_Bool override_redirect; /* creation should be overridden */ -} XCreateWindowEvent; - -typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - MINI_Bool send_event; /* true if this came from a SendEvent request */ - MINI_Display *display; /* Display the event was read from */ - MINI_Window event; - MINI_Window window; -} XDestroyWindowEvent; - -typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - MINI_Bool send_event; /* true if this came from a SendEvent request */ - MINI_Display *display; /* Display the event was read from */ - MINI_Window event; - MINI_Window window; - MINI_Bool from_configure; -} XUnmapEvent; - -typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - MINI_Bool send_event; /* true if this came from a SendEvent request */ - MINI_Display *display; /* Display the event was read from */ - MINI_Window event; - MINI_Window window; - MINI_Bool override_redirect; /* boolean, is override set... */ -} XMapEvent; - - -typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - MINI_Bool send_event; /* true if this came from a SendEvent request */ - MINI_Display *display; /* Display the event was read from */ - MINI_Window parent; - MINI_Window window; -} XMapRequestEvent; - -typedef union _XEvent { - int type; /* must not be changed; first element */ - XExposeEvent xexpose; - XCreateWindowEvent xcreatewindow; - XDestroyWindowEvent xdestroywindow; - XUnmapEvent xunmap; - XMapEvent xmap; - XMapRequestEvent xmaprequest; - long pad[24]; -} XEvent; - - -/** - * \name Xlib constants - */ -/*@{*/ -#define False 0 -#define True 1 -#define None 0 -#define AllocNone 0 -#define InputOutput 1 -#define ExposureMask (1L<<15) -#define StructureNotifyMask (1L<<17) -#define CWBackPixel (1L<<1) -#define CWBorderPixel (1L<<3) -#define CWEventMask (1L<<11) -#define CWColormap (1L<<13) -#define PseudoColor 3 -#define TrueColor 4 -#define VisualIDMask 0x1 -#define VisualScreenMask 0x2 -#define Expose 12 -#define CreateNotify 16 -#define DestroyNotify 17 -#define UnmapNotify 18 -#define MapNotify 19 -#define MapRequest 20 - -/*@}*/ - -/** - * \name Standard GLX tokens - */ -/*@{*/ -#define GLX_USE_GL 1 -#define GLX_BUFFER_SIZE 2 -#define GLX_LEVEL 3 -#define GLX_RGBA 4 -#define GLX_DOUBLEBUFFER 5 -#define GLX_STEREO 6 -#define GLX_AUX_BUFFERS 7 -#define GLX_RED_SIZE 8 -#define GLX_GREEN_SIZE 9 -#define GLX_BLUE_SIZE 10 -#define GLX_ALPHA_SIZE 11 -#define GLX_DEPTH_SIZE 12 -#define GLX_STENCIL_SIZE 13 -#define GLX_ACCUM_RED_SIZE 14 -#define GLX_ACCUM_GREEN_SIZE 15 -#define GLX_ACCUM_BLUE_SIZE 16 -#define GLX_ACCUM_ALPHA_SIZE 17 -#define GLX_BAD_ATTRIBUTE 1 -#define GLX_BAD_VISUAL 4 -/*@}*/ - - -/** - * \name Unique to Mini GLX - * - * At compile time, the Mini GLX interface version can be tested with the - * MINI_GLX_VERSION_1_x preprocessor tokens. - * - * \sa glXQueryVersion() - */ -/*@{*/ -/** \brief Defined if version 1.0 of Mini GLX is supported. */ -#define MINI_GLX_VERSION_1_0 1 -/** \brief Defined if version 1.1 of Mini GLX is supported. */ -#define MINI_GLX_VERSION_1_1 1 -/*@}*/ - - -/** - * \name Server-specific functions - */ -extern MINI_Display * -__miniglx_StartServer( const char *display_name ); - -extern int -__miniglx_Select( MINI_Display *dpy, int maxfd, - fd_set *rfds, fd_set *wfds, fd_set *xfds, - struct timeval *tv ); - - -/** - * \name Simulated Xlib functions - */ -/*@{*/ -extern MINI_Display * -XOpenDisplay( const char *dpy_name ); - - -extern void -XCloseDisplay( MINI_Display *display ); - -extern MINI_Window -XCreateWindow( MINI_Display *display, MINI_Window parent, int x, int y, - unsigned int width, unsigned int height, - unsigned int border_width, int depth, unsigned int winclass, - Visual *visual, unsigned long valuemask, - XSetWindowAttributes *attributes ); - -extern int -XNextEvent(MINI_Display *display, XEvent *event_return); - -extern MINI_Bool -XCheckMaskEvent( MINI_Display *dpy, long event_mask, XEvent *event_return ); - -/** - * \brief Return the root window. - * - * \param display the display handle. It is ignored by Mini GLX, but should be - * the value returned by XOpenDisplay(). - * \param screen the screen number on the host server. It is ignored by Mini - * GLX but should be zero. - * - * \return the root window. Always zero on Mini GLX. - */ -#define RootWindow(display, screen) 0 -#define DefaultScreen(dpy) 0 - -extern void -XDestroyWindow( MINI_Display *display, MINI_Window w ); - -extern void -XMapWindow( MINI_Display *display, MINI_Window w ); - -/* Should clients have access to this? - */ -extern void -XUnmapWindow( MINI_Display *display, MINI_Window w ); - -extern MINI_Colormap -XCreateColormap( MINI_Display *display, MINI_Window w, Visual *visual, int alloc ); - -extern void -XFreeColormap( MINI_Display *display, MINI_Colormap cmap ); - -extern void -XFree( void *data ); - -extern XVisualInfo * -XGetVisualInfo( MINI_Display *display, long vinfo_mask, - XVisualInfo *vinfo_template, int *nitems_return ); -/*@}*/ - - - -/** - * \name GLX functions - */ -/*@{*/ -extern XVisualInfo* -glXChooseVisual( MINI_Display *dpy, int screen, int *attribList ); - -extern int -glXGetConfig( MINI_Display *dpy, XVisualInfo *vis, int attrib, int *value ); - -extern GLXContext -glXCreateContext( MINI_Display *dpy, XVisualInfo *vis, - GLXContext shareList, MINI_Bool direct ); - -extern void -glXDestroyContext( MINI_Display *dpy, GLXContext ctx ); - -extern MINI_Bool -glXMakeCurrent( MINI_Display *dpy, GLXDrawable drawable, GLXContext ctx); - -extern void -glXSwapBuffers( MINI_Display *dpy, GLXDrawable drawable ); - -extern GLXContext -glXGetCurrentContext( void ); - -extern GLXDrawable -glXGetCurrentDrawable( void ); - -extern void -(*glXGetProcAddress(const GLubyte *procname))( void ); - -extern MINI_Bool -glXQueryVersion( MINI_Display *dpy, int *major, int *minor ); - -/* Added in MiniGLX 1.1 */ -extern GLXPbuffer -glXCreatePbuffer( MINI_Display *dpy, GLXFBConfig config, const int *attribList ); - -extern void -glXDestroyPbuffer( MINI_Display *dpy, GLXPbuffer pbuf ); - -extern GLXFBConfig * -glXChooseFBConfig( MINI_Display *dpy, int screen, const int *attribList, - int *nitems ); - -extern XVisualInfo * -glXGetVisualFromFBConfig( MINI_Display *dpy, GLXFBConfig config ); - -extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, - size_t size, float readFreq, - float writeFreq, float priority); - -extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer); - -extern GLuint glXGetMemoryOffsetMESA( Display *dpy, int scrn, - const void *pointer ); -/*@}*/ - -extern void -__glXScrEnableExtension( void *, const char * name ); - -/*@}*/ - - -#ifdef __cplusplus -} -#endif - -#endif /* MINIGLX_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/osmesa.h b/nx-X11/extras/Mesa_6.4.2/include/GL/osmesa.h deleted file mode 100644 index 8d559783ff..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/osmesa.h +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.3 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * Mesa Off-Screen rendering interface. - * - * This is an operating system and window system independent interface to - * Mesa which allows one to render images into a client-supplied buffer in - * main memory. Such images may manipulated or saved in whatever way the - * client wants. - * - * These are the API functions: - * OSMesaCreateContext - create a new Off-Screen Mesa rendering context - * OSMesaMakeCurrent - bind an OSMesaContext to a client's image buffer - * and make the specified context the current one. - * OSMesaDestroyContext - destroy an OSMesaContext - * OSMesaGetCurrentContext - return thread's current context ID - * OSMesaPixelStore - controls how pixels are stored in image buffer - * OSMesaGetIntegerv - return OSMesa state parameters - * - * - * The limits on the width and height of an image buffer are MAX_WIDTH and - * MAX_HEIGHT as defined in Mesa/src/config.h. Defaults are 1280 and 1024. - * You can increase them as needed but beware that many temporary arrays in - * Mesa are dimensioned by MAX_WIDTH or MAX_HEIGHT. - */ - - -#ifndef OSMESA_H -#define OSMESA_H - - -#ifdef __cplusplus -extern "C" { -#endif - - -#include - - -#define OSMESA_MAJOR_VERSION 6 -#define OSMESA_MINOR_VERSION 4 -#define OSMESA_PATCH_VERSION 2 - - - -/* - * Values for the format parameter of OSMesaCreateContext() - * New in version 2.0. - */ -#define OSMESA_COLOR_INDEX GL_COLOR_INDEX -#define OSMESA_RGBA GL_RGBA -#define OSMESA_BGRA 0x1 -#define OSMESA_ARGB 0x2 -#define OSMESA_RGB GL_RGB -#define OSMESA_BGR 0x4 -#define OSMESA_RGB_565 0x5 - - -/* - * OSMesaPixelStore() parameters: - * New in version 2.0. - */ -#define OSMESA_ROW_LENGTH 0x10 -#define OSMESA_Y_UP 0x11 - - -/* - * Accepted by OSMesaGetIntegerv: - */ -#define OSMESA_WIDTH 0x20 -#define OSMESA_HEIGHT 0x21 -#define OSMESA_FORMAT 0x22 -#define OSMESA_TYPE 0x23 -#define OSMESA_MAX_WIDTH 0x24 /* new in 4.0 */ -#define OSMESA_MAX_HEIGHT 0x25 /* new in 4.0 */ - - -typedef struct osmesa_context *OSMesaContext; - - -#if defined(__BEOS__) || defined(__QUICKDRAW__) -#pragma export on -#endif - - -/* - * Create an Off-Screen Mesa rendering context. The only attribute needed is - * an RGBA vs Color-Index mode flag. - * - * Input: format - one of OSMESA_COLOR_INDEX, OSMESA_RGBA, OSMESA_BGRA, - * OSMESA_ARGB, OSMESA_RGB, or OSMESA_BGR. - * sharelist - specifies another OSMesaContext with which to share - * display lists. NULL indicates no sharing. - * Return: an OSMesaContext or 0 if error - */ -GLAPI OSMesaContext GLAPIENTRY -OSMesaCreateContext( GLenum format, OSMesaContext sharelist ); - - - -/* - * Create an Off-Screen Mesa rendering context and specify desired - * size of depth buffer, stencil buffer and accumulation buffer. - * If you specify zero for depthBits, stencilBits, accumBits you - * can save some memory. - * - * New in Mesa 3.5 - */ -GLAPI OSMesaContext GLAPIENTRY -OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, - GLint accumBits, OSMesaContext sharelist); - - -/* - * Destroy an Off-Screen Mesa rendering context. - * - * Input: ctx - the context to destroy - */ -GLAPI void GLAPIENTRY -OSMesaDestroyContext( OSMesaContext ctx ); - - - -/* - * Bind an OSMesaContext to an image buffer. The image buffer is just a - * block of memory which the client provides. Its size must be at least - * as large as width*height*sizeof(type). Its address should be a multiple - * of 4 if using RGBA mode. - * - * Image data is stored in the order of glDrawPixels: row-major order - * with the lower-left image pixel stored in the first array position - * (ie. bottom-to-top). - * - * Since the only type initially supported is GL_UNSIGNED_BYTE, if the - * context is in RGBA mode, each pixel will be stored as a 4-byte RGBA - * value. If the context is in color indexed mode, each pixel will be - * stored as a 1-byte value. - * - * If the context's viewport hasn't been initialized yet, it will now be - * initialized to (0,0,width,height). - * - * Input: ctx - the rendering context - * buffer - the image buffer memory - * type - data type for pixel components, only GL_UNSIGNED_BYTE - * supported now - * width, height - size of image buffer in pixels, at least 1 - * Return: GL_TRUE if success, GL_FALSE if error because of invalid ctx, - * invalid buffer address, type!=GL_UNSIGNED_BYTE, width<1, height<1, - * width>internal limit or height>internal limit. - */ -GLAPI GLboolean GLAPIENTRY -OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type, - GLsizei width, GLsizei height ); - - - - -/* - * Return the current Off-Screen Mesa rendering context handle. - */ -GLAPI OSMesaContext GLAPIENTRY -OSMesaGetCurrentContext( void ); - - - -/* - * Set pixel store/packing parameters for the current context. - * This is similar to glPixelStore. - * Input: pname - OSMESA_ROW_LENGTH - * specify actual pixels per row in image buffer - * 0 = same as image width (default) - * OSMESA_Y_UP - * zero = Y coordinates increase downward - * non-zero = Y coordinates increase upward (default) - * value - the value for the parameter pname - * - * New in version 2.0. - */ -GLAPI void GLAPIENTRY -OSMesaPixelStore( GLint pname, GLint value ); - - - -/* - * Return an integer value like glGetIntegerv. - * Input: pname - - * OSMESA_WIDTH return current image width - * OSMESA_HEIGHT return current image height - * OSMESA_FORMAT return image format - * OSMESA_TYPE return color component data type - * OSMESA_ROW_LENGTH return row length in pixels - * OSMESA_Y_UP returns 1 or 0 to indicate Y axis direction - * value - pointer to integer in which to return result. - */ -GLAPI void GLAPIENTRY -OSMesaGetIntegerv( GLint pname, GLint *value ); - - - -/* - * Return the depth buffer associated with an OSMesa context. - * Input: c - the OSMesa context - * Output: width, height - size of buffer in pixels - * bytesPerValue - bytes per depth value (2 or 4) - * buffer - pointer to depth buffer values - * Return: GL_TRUE or GL_FALSE to indicate success or failure. - * - * New in Mesa 2.4. - */ -GLAPI GLboolean GLAPIENTRY -OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height, - GLint *bytesPerValue, void **buffer ); - - - -/* - * Return the color buffer associated with an OSMesa context. - * Input: c - the OSMesa context - * Output: width, height - size of buffer in pixels - * format - buffer format (OSMESA_FORMAT) - * buffer - pointer to depth buffer values - * Return: GL_TRUE or GL_FALSE to indicate success or failure. - * - * New in Mesa 3.3. - */ -GLAPI GLboolean GLAPIENTRY -OSMesaGetColorBuffer( OSMesaContext c, GLint *width, GLint *height, - GLint *format, void **buffer ); - - - -/** - * This typedef is new in Mesa 6.3. - */ -typedef void (*OSMESAproc)(); - - -/* - * Return pointer to the named function. - * New in Mesa 4.1 - * Return OSMESAproc in 6.3. - */ -GLAPI OSMESAproc GLAPIENTRY -OSMesaGetProcAddress( const char *funcName ); - - - -/** - * Enable/disable color clamping, off by default. - * New in Mesa 6.4.2 - */ -GLAPI void GLAPIENTRY -OSMesaColorClamp(GLboolean enable); - - -#if defined(__BEOS__) || defined(__QUICKDRAW__) -#pragma export off -#endif - - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/svgamesa.h b/nx-X11/extras/Mesa_6.4.2/include/GL/svgamesa.h deleted file mode 100644 index 67c0e4c5c6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/svgamesa.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0 - * Copyright (C) 1995-2001 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * SVGA/Mesa interface for Linux. - */ - - -/* - * Intro to using the VGA/Mesa interface - * - * 1. #include the file - * 2. Call vga_init() to initialize the SVGA library. - * 3. Call vga_setmode() to specify the screen size and color depth. - * 4. Call SVGAMesaCreateContext() to setup a Mesa context. If using 8-bit - * color Mesa assumes color index mode, if using 16-bit or deeper color - * Mesa assumes RGB mode. - * 5. Call SVGAMesaMakeCurrent() to activate the Mesa context. - * 6. You can now use the Mesa API functions. - * 7. Before exiting, call SVGAMesaDestroyContext() then vga_setmode(TEXT) - * to restore the original text screen. - * - * Notes - * 1. You must run your executable as root (or use the set UID-bit) because - * the SVGA library requires it. - * 2. The SVGA driver is not fully implemented yet. See svgamesa.c for what - * has to be done yet. - */ - - -#ifndef SVGAMESA_H -#define SVGAMESA_H - - -#define SVGAMESA_MAJOR_VERSION 4 -#define SVGAMESA_MINOR_VERSION 0 - - -#ifdef __cplusplus -extern "C" { -#endif - - -#include "GL/gl.h" - - - -/* - * This is the SVGAMesa context 'handle': - */ -typedef struct svgamesa_context *SVGAMesaContext; - - - -/* - * doubleBuffer flag new in version 2.4 - */ -extern int SVGAMesaInit( int GraphMode ); - -extern int SVGAMesaClose( void ); - -extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer ); - -extern void SVGAMesaDestroyContext( SVGAMesaContext ctx ); - -extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx ); - -extern void SVGAMesaSwapBuffers( void ); - -extern void SVGAMesaSetCI(int ndx, GLubyte red, GLubyte green, GLubyte blue); - -extern SVGAMesaContext SVGAMesaGetCurrentContext( void ); - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/uglglutshapes.h b/nx-X11/extras/Mesa_6.4.2/include/GL/uglglutshapes.h deleted file mode 100644 index 28192de2d5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/uglglutshapes.h +++ /dev/null @@ -1,45 +0,0 @@ -/* uglglutshapes.h - Public header GLUT Shapes */ - -/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */ - -/* This program is freely distributable without licensing fees and is - provided without guarantee or warrantee expressed or implied. This - program is -not- in the public domain. */ - -#ifndef GLUTSHAPES_H -#define GLUTSHAPES_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -void glutWireSphere (GLdouble radius, GLint slices, GLint stacks); -void glutSolidSphere (GLdouble radius, GLint slices, GLint stacks); -void glutWireCone (GLdouble base, GLdouble height, - GLint slices, GLint stacks); -void glutSolidCone (GLdouble base, GLdouble height, - GLint slices, GLint stacks); -void glutWireCube (GLdouble size); -void glutSolidCube (GLdouble size); -void glutWireTorus (GLdouble innerRadius, GLdouble outerRadius, - GLint sides, GLint rings); -void glutSolidTorus (GLdouble innerRadius, GLdouble outerRadius, - GLint sides, GLint rings); -void glutWireDodecahedron (void); -void glutSolidDodecahedron (void); -void glutWireOctahedron (void); -void glutSolidOctahedron (void); -void glutWireTetrahedron (void); -void glutSolidTetrahedron (void); -void glutWireIcosahedron (void); -void glutSolidIcosahedron (void); -void glutWireTeapot (GLdouble size); -void glutSolidTeapot (GLdouble size); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/uglmesa.h b/nx-X11/extras/Mesa_6.4.2/include/GL/uglmesa.h deleted file mode 100644 index 7ef5843504..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/uglmesa.h +++ /dev/null @@ -1,155 +0,0 @@ -/* uglmesa.h - Public header UGL/Mesa */ - -/* Copyright (C) 2001 by Wind River Systems, Inc */ - -/* - * Mesa 3-D graphics library - * Version: 4.0 - * - * The MIT License - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* - * Author: - * Stephane Raimbault - */ - -#ifndef UGLMESA_H -#define UGLMESA_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define UGL_MESA_MAJOR_VERSION 4 -#define UGL_MESA_MINOR_VERSION 0 - -#include -#include - -/* - * Values for display mode of uglMesaCreateContext () - */ - -/* - * With these mask values, it's possible to test double buffer mode - * with UGL_MESA_DOUBLE mask - * - * SINGLE 0000 0001 - * DOUBLE 0000 0110 - * - SOFT 0000 0010 - * - HARD 0000 0100 - * WINDML 0001 0000 - * - * - */ -#define UGL_MESA_SINGLE 0x01 -#define UGL_MESA_DOUBLE 0x06 -#define UGL_MESA_DOUBLE_SOFTWARE 0x02 -#define UGL_MESA_DOUBLE_HARDWARE 0x04 - -#define UGL_MESA_WINDML_EXCLUSIVE 0x10 - -#define UGL_MESA_FULLSCREEN_WIDTH 0x0 -#define UGL_MESA_FULLSCREEN_HEIGHT 0x0 - -/* - * uglMesaPixelStore() parameters: - */ - -#define UGL_MESA_ROW_LENGTH 0x20 -#define UGL_MESA_Y_UP 0x21 - -/* - * Accepted by uglMesaGetIntegerv: - */ - -#define UGL_MESA_LEFT_X 0x01 -#define UGL_MESA_TOP_Y 0x02 -#define UGL_MESA_WIDTH 0x03 -#define UGL_MESA_HEIGHT 0x04 -#define UGL_MESA_DISPLAY_WIDTH 0x05 -#define UGL_MESA_DISPLAY_HEIGHT 0x06 -#define UGL_MESA_COLOR_FORMAT 0x07 -#define UGL_MESA_COLOR_MODEL 0x08 -#define UGL_MESA_PIXEL_FORMAT 0x09 -#define UGL_MESA_TYPE 0x0A -#define UGL_MESA_RGB 0x0B -#define UGL_MESA_COLOR_INDEXED 0x0C -#define UGL_MESA_SINGLE_BUFFER 0x0D -#define UGL_MESA_DOUBLE_BUFFER 0x0E -#define UGL_MESA_DOUBLE_BUFFER_SOFTWARE 0x0F -#define UGL_MESA_DOUBLE_BUFFER_HARDWARE 0x10 - -/* - * typedefs - */ - -typedef struct uglMesaContext * UGL_MESA_CONTEXT; - -UGL_MESA_CONTEXT uglMesaCreateNewContext (GLenum mode, - UGL_MESA_CONTEXT share_list); - -UGL_MESA_CONTEXT uglMesaCreateNewContextExt (GLenum mode, - GLint depth_bits, - GLint stencil_bits, - GLint accum_red_bits, - GLint accum_green_bits, - GLint accum_blue_bits, - GLint accum_alpha_bits, - UGL_MESA_CONTEXT share_list); - -GLboolean uglMesaMakeCurrentContext (UGL_MESA_CONTEXT umc, - GLsizei left, GLsizei top, - GLsizei width, GLsizei height); - -GLboolean uglMesaMoveWindow (GLsizei dx, GLsizei dy); - -GLboolean uglMesaMoveToWindow (GLsizei left, GLsizei top); - -GLboolean uglMesaResizeWindow (GLsizei dw, GLsizei dh); - -GLboolean uglMesaResizeToWindow (GLsizei width, GLsizei height); - -void uglMesaDestroyContext (void); - -UGL_MESA_CONTEXT uglMesaGetCurrentContext (void); - -void uglMesaSwapBuffers (void); - -void uglMesaPixelStore (GLint pname, GLint value); - -void uglMesaGetIntegerv (GLint pname, GLint *value); - -GLboolean uglMesaGetDepthBuffer (GLint *width, GLint *height, - GLint *bytesPerValue, void **buffer); - -GLboolean uglMesaGetColorBuffer (GLint *width, GLint *height, - GLint *format, void **buffer); - -GLboolean uglMesaSetColor (GLubyte index, GLfloat red, - GLfloat green, GLfloat blue); - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/vms_x_fix.h b/nx-X11/extras/Mesa_6.4.2/include/GL/vms_x_fix.h deleted file mode 100644 index db754f6556..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/vms_x_fix.h +++ /dev/null @@ -1,880 +0,0 @@ -/*************************************************************************** - * * - * Repair definitions of Xlib when compileing with /name=(as_is) on VMS * - * * - * Author : Jouk Jansen (joukj@hrem.stm.tudelft.nl) * - * * - * Last revision : 22 August 2000 * - * * - ***************************************************************************/ - -#ifndef VMS_X_FIX -#define VMS_X_FIX - -#define _XRegisterFilterByType _XREGISTERFILTERBYTYPE -#define XAllocClassHint XALLOCCLASSHINT -#define XAllocColor XALLOCCOLOR -#define XAllocColorCells XALLOCCOLORCELLS -#define XAllocSizeHints XALLOCSIZEHINTS -#define XAllocWMHints XALLOCWMHINTS -#define XAutoRepeatOff XAUTOREPEATOFF -#define XAutoRepeatOn XAUTOREPEATON -#define XBaseFontNameListOfFontSet XBASEFONTNAMELISTOFFONTSET -#define XBell XBELL -#define XBitmapPad XBITMAPPAD -#define XChangeActivePointerGrab XCHANGEACTIVEPOINTERGRAB -#define XChangeGC XCHANGEGC -#define XChangeProperty XCHANGEPROPERTY -#define XChangeWindowAttributes XCHANGEWINDOWATTRIBUTES -#define XCheckIfEvent XCHECKIFEVENT -#define XCheckMaskEvent XCHECKMASKEVENT -#define XCheckTypedWindowEvent XCHECKTYPEDWINDOWEVENT -#define XCheckWindowEvent XCHECKWINDOWEVENT -#define XClearArea XCLEARAREA -#define XClearWindow XCLEARWINDOW -#define XClipBox XCLIPBOX -#define XCloseDisplay XCLOSEDISPLAY -#define XCloseIM XCLOSEIM -#define XConfigureWindow XCONFIGUREWINDOW -#define XConvertSelection XCONVERTSELECTION -#define XCopyArea XCOPYAREA -#define XCopyGC XCOPYGC -#define XCopyPlane XCOPYPLANE -#define XCreateBitmapFromData XCREATEBITMAPFROMDATA -#define XCreateColormap XCREATECOLORMAP -#define XCreateFontCursor XCREATEFONTCURSOR -#define XCreateFontSet XCREATEFONTSET -#define XCreateGC XCREATEGC -#define XCreateIC XCREATEIC -#define XCreateImage XCREATEIMAGE -#define XCreatePixmap XCREATEPIXMAP -#define XCreatePixmapCursor XCREATEPIXMAPCURSOR -#define XCreatePixmapFromBitmapData XCREATEPIXMAPFROMBITMAPDATA -#define XCreateRegion XCREATEREGION -#define XCreateSimpleWindow XCREATESIMPLEWINDOW -#define XCreateWindow XCREATEWINDOW -#define XDefaultScreenOfDisplay XDEFAULTSCREENOFDISPLAY -#define XDefineCursor XDEFINECURSOR -#define XDeleteProperty XDELETEPROPERTY -#define XDestroyIC XDESTROYIC -#define XDestroyRegion XDESTROYREGION -#define XDestroyWindow XDESTROYWINDOW -#define XDisplayName XDISPLAYNAME -#define XDisplayOfScreen XDISPLAYOFSCREEN -#define XDrawArc XDRAWARC -#define XDrawImageString XDRAWIMAGESTRING -#define XDrawImageString16 XDRAWIMAGESTRING16 -#define XDrawLine XDRAWLINE -#define XDrawLines XDRAWLINES -#define XDrawPoint XDRAWPOINT -#define XDrawPoints XDRAWPOINTS -#define XDrawRectangle XDRAWRECTANGLE -#define XDrawSegments XDRAWSEGMENTS -#define XDrawString XDRAWSTRING -#define XDrawString16 XDRAWSTRING16 -#define XEmptyRegion XEMPTYREGION -#define XEqualRegion XEQUALREGION -#define XEventsQueued XEVENTSQUEUED -#define XExtentsOfFontSet XEXTENTSOFFONTSET -#define XFillArc XFILLARC -#define XFillPolygon XFILLPOLYGON -#define XFillRectangle XFILLRECTANGLE -#define XFillRectangles XFILLRECTANGLES -#define XFilterEvent XFILTEREVENT -#define XFlush XFLUSH -#define XFontsOfFontSet XFONTSOFFONTSET -#define XFree XFREE -#define XFreeColormap XFREECOLORMAP -#define XFreeColors XFREECOLORS -#define XFreeCursor XFREECURSOR -#define XFreeFont XFREEFONT -#define XFreeFontInfo XFREEFONTINFO -#define XFreeFontNames XFREEFONTNAMES -#define XFreeFontSet XFREEFONTSET -#define XFreeGC XFREEGC -#define XFreeModifiermap XFREEMODIFIERMAP -#define XFreePixmap XFREEPIXMAP -#define XFreeStringList XFREESTRINGLIST -#define XGetAtomName XGETATOMNAME -#define XGetDefault XGETDEFAULT -#define XGetErrorDatabaseText XGETERRORDATABASETEXT -#define XGetErrorText XGETERRORTEXT -#define XGetFontProperty XGETFONTPROPERTY -#define XGetGCValues XGETGCVALUES -#define XGetGeometry XGETGEOMETRY -#define XGetICValues XGETICVALUES -#define XGetIMValues XGETIMVALUES -#define XGetImage XGETIMAGE -#define XGetKeyboardControl XGETKEYBOARDCONTROL -#define XGetModifierMapping XGETMODIFIERMAPPING -#define XGetMotionEvents XGETMOTIONEVENTS -#define XGetNormalHints XGETNORMALHINTS -#define XGetSelectionOwner XGETSELECTIONOWNER -#define XGetSubImage XGETSUBIMAGE -#define XGetVisualInfo XGETVISUALINFO -#define XGetWMColormapWindows XGETWMCOLORMAPWINDOWS -#define XGetWMHints XGETWMHINTS -#define XGetWMName XGETWMNAME -#define XGetWMNormalHints XGETWMNORMALHINTS -#define XGetWindowAttributes XGETWINDOWATTRIBUTES -#define XGetWindowProperty XGETWINDOWPROPERTY -#define XGrabKeyboard XGRABKEYBOARD -#define XGrabPointer XGRABPOINTER -#define XGrabServer XGRABSERVER -#define XHeightOfScreen XHEIGHTOFSCREEN -#define XIfEvent XIFEVENT -#define XInternAtom XINTERNATOM -#define XIntersectRegion XINTERSECTREGION -#define XKeycodeToKeysym XKEYCODETOKEYSYM -#define XKeysymToKeycode XKEYSYMTOKEYCODE -#define XKeysymToString XKEYSYMTOSTRING -#define XListFonts XLISTFONTS -#define XListFontsWithInfo XLISTFONTSWITHINFO -#define XListPixmapFormats XLISTPIXMAPFORMATS -#define XListProperties XLISTPROPERTIES -#define XLoadQueryFont XLOADQUERYFONT -#define XLookupString XLOOKUPSTRING -#define XLowerWindow XLOWERWINDOW -#define XMapRaised XMAPRAISED -#define XMapWindow XMAPWINDOW -#define XMatchVisualInfo XMATCHVISUALINFO -#define XMoveResizeWindow XMOVERESIZEWINDOW -#define XMoveWindow XMOVEWINDOW -#define XNextEvent XNEXTEVENT -#define XOffsetRegion XOFFSETREGION -#define XOpenDisplay XOPENDISPLAY -#define XOpenIM XOPENIM -#define XParseColor XPARSECOLOR -#define XParseGeometry XPARSEGEOMETRY -#define XPeekEvent XPEEKEVENT -#define XPending XPENDING -#define XPointInRegion XPOINTINREGION -#define XPolygonRegion XPOLYGONREGION -#define XPutBackEvent XPUTBACKEVENT -#define XPutImage XPUTIMAGE -#define XQueryColor XQUERYCOLOR -#define XQueryColors XQUERYCOLORS -#define XQueryExtension XQUERYEXTENSION -#define XQueryPointer XQUERYPOINTER -#define XQueryTree XQUERYTREE -#define XRaiseWindow XRAISEWINDOW -#define XReconfigureWMWindow XRECONFIGUREWMWINDOW -#define XRectInRegion XRECTINREGION -#define XRefreshKeyboardMapping XREFRESHKEYBOARDMAPPING -#define XReparentWindow XREPARENTWINDOW -#define XResizeWindow XRESIZEWINDOW -#define XRestackWindows XRESTACKWINDOWS -#define XRootWindowOfScreen XROOTWINDOWOFSCREEN -#define XScreenNumberOfScreen XSCREENNUMBEROFSCREEN -#define XSelectAsyncEvent XSELECTASYNCEVENT -#define XSelectAsyncInput XSELECTASYNCINPUT -#define XSelectInput XSELECTINPUT -#define XSendEvent XSENDEVENT -#define XServerVendor XSERVERVENDOR -#define XSetBackground XSETBACKGROUND -#define XSetClassHint XSETCLASSHINT -#define XSetClipMask XSETCLIPMASK -#define XSetClipOrigin XSETCLIPORIGIN -#define XSetClipRectangles XSETCLIPRECTANGLES -#define XSetCloseDownMode XSETCLOSEDOWNMODE -#define XSetCommand XSETCOMMAND -#define XSetDashes XSETDASHES -#define XSetErrorHandler XSETERRORHANDLER -#define XSetFillStyle XSETFILLSTYLE -#define XSetFont XSETFONT -#define XSetForeground XSETFOREGROUND -#define XSetFunction XSETFUNCTION -#define XSetGraphicsExposures XSETGRAPHICSEXPOSURES -#define XSetICFocus XSETICFOCUS -#define XSetICValues XSETICVALUES -#define XSetIOErrorHandler XSETIOERRORHANDLER -#define XSetInputFocus XSETINPUTFOCUS -#define XSetLineAttributes XSETLINEATTRIBUTES -#define XSetLocaleModifiers XSETLOCALEMODIFIERS -#define XSetNormalHints XSETNORMALHINTS -#define XSetRegion XSETREGION -#define XSetSelectionOwner XSETSELECTIONOWNER -#define XSetStipple XSETSTIPPLE -#define XSetSubwindowMode XSETSUBWINDOWMODE -#define XSetTSOrigin XSETTSORIGIN -#define XSetTile XSETTILE -#define XSetTransientForHint XSETTRANSIENTFORHINT -#define XSetWMColormapWindows XSETWMCOLORMAPWINDOWS -#define XSetWMHints XSETWMHINTS -#define XSetWMIconName XSETWMICONNAME -#define XSetWMName XSETWMNAME -#define XSetWMNormalHints XSETWMNORMALHINTS -#define XSetWMProperties XSETWMPROPERTIES -#define XSetWMProtocols XSETWMPROTOCOLS -#define XSetWindowBackground XSETWINDOWBACKGROUND -#define XSetWindowBackgroundPixmap XSETWINDOWBACKGROUNDPIXMAP -#define XSetWindowColormap XSETWINDOWCOLORMAP -#define XShapeCombineMask XSHAPECOMBINEMASK -#define XShapeCombineRectangles XSHAPECOMBINERECTANGLES -#define XShapeGetRectangles XSHAPEGETRECTANGLES -#define XShrinkRegion XSHRINKREGION -#define XStoreColor XSTORECOLOR -#define XStoreColors XSTORECOLORS -#define XStoreName XSTORENAME -#define XStringToKeysym XSTRINGTOKEYSYM -#define XSubtractRegion XSUBTRACTREGION -#define XSupportsLocale XSUPPORTSLOCALE -#define XSync XSYNC -#define XSynchronize XSYNCHRONIZE -#define XTextExtents XTEXTEXTENTS -#define XTextExtents16 XTEXTEXTENTS16 -#define XTextWidth XTEXTWIDTH -#define XTextWidth16 XTEXTWIDTH16 -#define XTranslateCoordinates XTRANSLATECOORDINATES -#define XUndefineCursor XUNDEFINECURSOR -#define XUngrabKeyboard XUNGRABKEYBOARD -#define XUngrabPointer XUNGRABPOINTER -#define XUngrabServer XUNGRABSERVER -#define XUnionRectWithRegion XUNIONRECTWITHREGION -#define XUnionRegion XUNIONREGION -#define XUnmapWindow XUNMAPWINDOW -#define _XUnregisterFilter _XUNREGISTERFILTER -#define XUnsetICFocus XUNSETICFOCUS -#define XVaCreateNestedList XVACREATENESTEDLIST -#define XVisualIDFromVisual XVISUALIDFROMVISUAL -#define XWidthOfScreen XWIDTHOFSCREEN -#define XWindowEvent XWINDOWEVENT -#define XWithdrawWindow XWITHDRAWWINDOW -#define XXorRegion XXORREGION -#define XmAddProtocolCallback XMADDPROTOCOLCALLBACK -#define XmAddProtocols XMADDPROTOCOLS -#define XmChangeColor XMCHANGECOLOR -#define XmClipboardCopy XMCLIPBOARDCOPY -#define XmClipboardEndCopy XMCLIPBOARDENDCOPY -#define XmClipboardInquireLength XMCLIPBOARDINQUIRELENGTH -#define XmClipboardLock XMCLIPBOARDLOCK -#define XmClipboardRetrieve XMCLIPBOARDRETRIEVE -#define XmClipboardStartCopy XMCLIPBOARDSTARTCOPY -#define XmClipboardUnlock XMCLIPBOARDUNLOCK -#define XmCreateArrowButton XMCREATEARROWBUTTON -#define XmCreateArrowButtonGadget XMCREATEARROWBUTTONGADGET -#define XmCreateCascadeButton XMCREATECASCADEBUTTON -#define XmCreateDialogShell XMCREATEDIALOGSHELL -#define XmCreateDragIcon XMCREATEDRAGICON -#define XmCreateDrawingArea XMCREATEDRAWINGAREA -#define XmCreateDrawnButton XMCREATEDRAWNBUTTON -#define XmCreateFileSelectionBox XMCREATEFILESELECTIONBOX -#define XmCreateFileSelectionDialog XMCREATEFILESELECTIONDIALOG -#define XmCreateForm XMCREATEFORM -#define XmCreateFormDialog XMCREATEFORMDIALOG -#define XmCreateFrame XMCREATEFRAME -#define XmCreateInformationDialog XMCREATEINFORMATIONDIALOG -#define XmCreateLabelGadget XMCREATELABELGADGET -#define XmCreateMainWindow XMCREATEMAINWINDOW -#define XmCreateMenuBar XMCREATEMENUBAR -#define XmCreateMessageBox XMCREATEMESSAGEBOX -#define XmCreateMessageDialog XMCREATEMESSAGEDIALOG -#define XmCreateOptionMenu XMCREATEOPTIONMENU -#define XmCreatePanedWindow XMCREATEPANEDWINDOW -#define XmCreatePopupMenu XMCREATEPOPUPMENU -#define XmCreatePromptDialog XMCREATEPROMPTDIALOG -#define XmCreatePulldownMenu XMCREATEPULLDOWNMENU -#define XmCreatePushButton XMCREATEPUSHBUTTON -#define XmCreatePushButtonGadget XMCREATEPUSHBUTTONGADGET -#define XmCreateQuestionDialog XMCREATEQUESTIONDIALOG -#define XmCreateRadioBox XMCREATERADIOBOX -#define XmCreateRowColumn XMCREATEROWCOLUMN -#define XmCreateScale XMCREATESCALE -#define XmCreateScrollBar XMCREATESCROLLBAR -#define XmCreateScrolledList XMCREATESCROLLEDLIST -#define XmCreateScrolledText XMCREATESCROLLEDTEXT -#define XmCreateScrolledWindow XMCREATESCROLLEDWINDOW -#define XmCreateSelectionDialog XMCREATESELECTIONDIALOG -#define XmCreateSeparator XMCREATESEPARATOR -#define XmCreateSeparatorGadget XMCREATESEPARATORGADGET -#define XmCreateTemplateDialog XMCREATETEMPLATEDIALOG -#define XmCreateText XMCREATETEXT -#define XmCreateTextField XMCREATETEXTFIELD -#define XmCreateToggleButton XMCREATETOGGLEBUTTON -#define XmCreateToggleButtonGadget XMCREATETOGGLEBUTTONGADGET -#define XmDragStart XMDRAGSTART -#define XmDropSiteRegister XMDROPSITEREGISTER -#define XmDropSiteUnregister XMDROPSITEUNREGISTER -#define XmDropSiteUpdate XMDROPSITEUPDATE -#define XmDropTransferStart XMDROPTRANSFERSTART -#define XmFileSelectionBoxGetChild XMFILESELECTIONBOXGETCHILD -#define XmFileSelectionDoSearch XMFILESELECTIONDOSEARCH -#define XmFontListAppendEntry XMFONTLISTAPPENDENTRY -#define XmFontListCopy XMFONTLISTCOPY -#define XmFontListCreate XMFONTLISTCREATE -#define XmFontListEntryCreate XMFONTLISTENTRYCREATE -#define XmFontListEntryFree XMFONTLISTENTRYFREE -#define XmFontListEntryGetFont XMFONTLISTENTRYGETFONT -#define XmFontListEntryGetTag XMFONTLISTENTRYGETTAG -#define XmFontListEntryLoad XMFONTLISTENTRYLOAD -#define XmFontListFree XMFONTLISTFREE -#define XmFontListFreeFontContext XMFONTLISTFREEFONTCONTEXT -#define XmFontListGetNextFont XMFONTLISTGETNEXTFONT -#define XmFontListInitFontContext XMFONTLISTINITFONTCONTEXT -#define XmFontListNextEntry XMFONTLISTNEXTENTRY -#define XmGetColors XMGETCOLORS -#define XmGetFocusWidget XMGETFOCUSWIDGET -#define XmGetMenuCursor XMGETMENUCURSOR -#define XmGetPixmapByDepth XMGETPIXMAPBYDEPTH -#define XmGetTearOffControl XMGETTEAROFFCONTROL -#define XmGetXmDisplay XMGETXMDISPLAY -#define XmImMbLookupString XMIMMBLOOKUPSTRING -#define XmImRegister XMIMREGISTER -#define XmImSetFocusValues XMIMSETFOCUSVALUES -#define XmImSetValues XMIMSETVALUES -#define XmImUnregister XMIMUNREGISTER -#define XmImUnsetFocus XMIMUNSETFOCUS -#define XmInternAtom XMINTERNATOM -#define XmIsMotifWMRunning XMISMOTIFWMRUNNING -#define XmListAddItem XMLISTADDITEM -#define XmListAddItemUnselected XMLISTADDITEMUNSELECTED -#define XmListAddItemsUnselected XMLISTADDITEMSUNSELECTED -#define XmListDeleteAllItems XMLISTDELETEALLITEMS -#define XmListDeleteItemsPos XMLISTDELETEITEMSPOS -#define XmListDeletePos XMLISTDELETEPOS -#define XmListDeselectAllItems XMLISTDESELECTALLITEMS -#define XmListDeselectPos XMLISTDESELECTPOS -#define XmListGetKbdItemPos XMLISTGETKBDITEMPOS -#define XmListGetMatchPos XMLISTGETMATCHPOS -#define XmListGetSelectedPos XMLISTGETSELECTEDPOS -#define XmListPosSelected XMLISTPOSSELECTED -#define XmListSelectItem XMLISTSELECTITEM -#define XmListSelectPos XMLISTSELECTPOS -#define XmListSetBottomPos XMLISTSETBOTTOMPOS -#define XmListSetItem XMLISTSETITEM -#define XmListSetKbdItemPos XMLISTSETKBDITEMPOS -#define XmListSetPos XMLISTSETPOS -#define XmMainWindowSetAreas XMMAINWINDOWSETAREAS -#define XmMenuPosition XMMENUPOSITION -#define XmMessageBoxGetChild XMMESSAGEBOXGETCHILD -#define XmOptionButtonGadget XMOPTIONBUTTONGADGET -#define XmOptionLabelGadget XMOPTIONLABELGADGET -#define XmProcessTraversal XMPROCESSTRAVERSAL -#define XmQmotif XMQMOTIF -#define XmRemoveProtocolCallback XMREMOVEPROTOCOLCALLBACK -#define XmRepTypeGetId XMREPTYPEGETID -#define XmRepTypeGetRecord XMREPTYPEGETRECORD -#define XmRepTypeRegister XMREPTYPEREGISTER -#define XmRepTypeValidValue XMREPTYPEVALIDVALUE -#define XmScrollBarSetValues XMSCROLLBARSETVALUES -#define XmScrolledWindowSetAreas XMSCROLLEDWINDOWSETAREAS -#define XmSelectionBoxGetChild XMSELECTIONBOXGETCHILD -#define XmStringByteCompare XMSTRINGBYTECOMPARE -#define XmStringCompare XMSTRINGCOMPARE -#define XmStringConcat XMSTRINGCONCAT -#define XmStringCopy XMSTRINGCOPY -#define XmStringCreate XMSTRINGCREATE -#define XmStringCreateLocalized XMSTRINGCREATELOCALIZED -#define XmStringCreateLtoR XMSTRINGCREATELTOR -#define XmStringCreateSimple XMSTRINGCREATESIMPLE -#define XmStringDraw XMSTRINGDRAW -#define XmStringDrawUnderline XMSTRINGDRAWUNDERLINE -#define XmStringExtent XMSTRINGEXTENT -#define XmStringFree XMSTRINGFREE -#define XmStringFreeContext XMSTRINGFREECONTEXT -#define XmStringGetLtoR XMSTRINGGETLTOR -#define XmStringGetNextComponent XMSTRINGGETNEXTCOMPONENT -#define XmStringGetNextSegment XMSTRINGGETNEXTSEGMENT -#define XmStringInitContext XMSTRINGINITCONTEXT -#define XmStringLength XMSTRINGLENGTH -#define XmStringLtoRCreate XMSTRINGLTORCREATE -#define XmStringNConcat XMSTRINGNCONCAT -#define XmStringSegmentCreate XMSTRINGSEGMENTCREATE -#define XmStringWidth XMSTRINGWIDTH -#define XmTextClearSelection XMTEXTCLEARSELECTION -#define XmTextFieldGetEditable XMTEXTFIELDGETEDITABLE -#define XmTextFieldGetInsertionPosition XMTEXTFIELDGETINSERTIONPOSITION -#define XmTextFieldGetLastPosition XMTEXTFIELDGETLASTPOSITION -#define XmTextFieldGetSelection XMTEXTFIELDGETSELECTION -#define XmTextFieldGetString XMTEXTFIELDGETSTRING -#define XmTextFieldInsert XMTEXTFIELDINSERT -#define XmTextFieldRemove XMTEXTFIELDREMOVE -#define XmTextFieldSetSelection XMTEXTFIELDSETSELECTION -#define XmTextFieldSetString XMTEXTFIELDSETSTRING -#define XmTextGetCursorPosition XMTEXTGETCURSORPOSITION -#define XmTextGetInsertionPosition XMTEXTGETINSERTIONPOSITION -#define XmTextGetLastPosition XMTEXTGETLASTPOSITION -#define XmTextGetMaxLength XMTEXTGETMAXLENGTH -#define XmTextGetSelection XMTEXTGETSELECTION -#define XmTextGetSelectionPosition XMTEXTGETSELECTIONPOSITION -#define XmTextGetString XMTEXTGETSTRING -#define XmTextInsert XMTEXTINSERT -#define XmTextRemove XMTEXTREMOVE -#define XmTextReplace XMTEXTREPLACE -#define XmTextSetCursorPosition XMTEXTSETCURSORPOSITION -#define XmTextSetHighlight XMTEXTSETHIGHLIGHT -#define XmTextSetInsertionPosition XMTEXTSETINSERTIONPOSITION -#define XmTextSetSelection XMTEXTSETSELECTION -#define XmTextSetString XMTEXTSETSTRING -#define XmToggleButtonGadgetGetState XMTOGGLEBUTTONGADGETGETSTATE -#define XmToggleButtonGadgetSetState XMTOGGLEBUTTONGADGETSETSTATE -#define XmToggleButtonGetState XMTOGGLEBUTTONGETSTATE -#define XmToggleButtonSetState XMTOGGLEBUTTONSETSTATE -#define XmUpdateDisplay XMUPDATEDISPLAY -#define XmVaCreateSimpleRadioBox XMVACREATESIMPLERADIOBOX -#define XmbDrawString XMBDRAWSTRING -#define XmbLookupString XMBLOOKUPSTRING -#define XmbResetIC XMBRESETIC -#define XmbSetWMProperties XMBSETWMPROPERTIES -#define XmbTextEscapement XMBTEXTESCAPEMENT -#define XmbTextExtents XMBTEXTEXTENTS -#define XmbTextListToTextProperty XMBTEXTLISTTOTEXTPROPERTY -#define XmbTextPropertyToTextList XMBTEXTPROPERTYTOTEXTLIST -#define XmuClientWindow XMUCLIENTWINDOW -#define XmuPrintDefaultErrorMessage XMUPRINTDEFAULTERRORMESSAGE -#define XrmGetDatabase XRMGETDATABASE -#define XrmGetResource XRMGETRESOURCE -#define XrmPutStringResource XRMPUTSTRINGRESOURCE -#define XrmQuarkToString XRMQUARKTOSTRING -#define XrmStringToQuark XRMSTRINGTOQUARK -#define XtAddCallback XTADDCALLBACK -#define XtAddCallbacks XTADDCALLBACKS -#define XtAddEventHandler XTADDEVENTHANDLER -#define XtAddGrab XTADDGRAB -#define XtAllocateGC XTALLOCATEGC -#define XtAppAddActions XTAPPADDACTIONS -#define XtAppAddInput XTAPPADDINPUT -#define XtAppAddTimeOut XTAPPADDTIMEOUT -#define XtAppCreateShell XTAPPCREATESHELL -#define XtAppInitialize XTAPPINITIALIZE -#define XtAppNextEvent XTAPPNEXTEVENT -#define XtAppPeekEvent XTAPPPEEKEVENT -#define XtAppPending XTAPPPENDING -#define XtAppProcessEvent XTAPPPROCESSEVENT -#define XtAppSetErrorHandler XTAPPSETERRORHANDLER -#define XtAppSetFallbackResources XTAPPSETFALLBACKRESOURCES -#define XtAppSetWarningHandler XTAPPSETWARNINGHANDLER -#define XtAppSetWarningMsgHandler XTAPPSETWARNINGMSGHANDLER -#define XtAppWarning XTAPPWARNING -#define XtCallActionProc XTCALLACTIONPROC -#define XtCallCallbackList XTCALLCALLBACKLIST -#define XtCallCallbacks XTCALLCALLBACKS -#define XtConfigureWidget XTCONFIGUREWIDGET -#define XtConvertAndStore XTCONVERTANDSTORE -#define XtCreateApplicationContext XTCREATEAPPLICATIONCONTEXT -#define XtCreateManagedWidget XTCREATEMANAGEDWIDGET -#define XtCreatePopupShell XTCREATEPOPUPSHELL -#define XtCreateWidget XTCREATEWIDGET -#define XtDatabase XTDATABASE -#define XtDestroyWidget XTDESTROYWIDGET -#define XtDisownSelection XTDISOWNSELECTION -#define XtDispatchEvent XTDISPATCHEVENT -#define XtDisplayOfObject XTDISPLAYOFOBJECT -#define XtDisplayStringConvWarning XTDISPLAYSTRINGCONVWARNING -#define XtDisplayToApplicationContext XTDISPLAYTOAPPLICATIONCONTEXT -#define XtAppAddWorkProc XTAPPADDWORKPROC -#define XtRemoveWorkProc XTREMOVEWORKPROC -#define XtFree XTFREE -#define XtGetActionKeysym XTGETACTIONKEYSYM -#define XtGetActionList XTGETACTIONLIST -#define XtGetApplicationNameAndClass XTGETAPPLICATIONNAMEANDCLASS -#define XtGetApplicationResources XTGETAPPLICATIONRESOURCES -#define XtGetGC XTGETGC -#define XtGetMultiClickTime XTGETMULTICLICKTIME -#define XtGetSelectionValue XTGETSELECTIONVALUE -#define XtGetSelectionValues XTGETSELECTIONVALUES -#define XtGetSubresources XTGETSUBRESOURCES -#define XtGetValues XTGETVALUES -#define XtGrabKeyboard XTGRABKEYBOARD -#define XtGrabPointer XTGRABPOINTER -#define XtHasCallbacks XTHASCALLBACKS -#define XtInitializeWidgetClass XTINITIALIZEWIDGETCLASS -#define XtInsertEventHandler XTINSERTEVENTHANDLER -#define XtIsManaged XTISMANAGED -#define XtIsObject XTISOBJECT -#define XtIsSensitive XTISSENSITIVE -#define XtIsSubclass XTISSUBCLASS -#define XtLastTimestampProcessed XTLASTTIMESTAMPPROCESSED -#define XtMakeGeometryRequest XTMAKEGEOMETRYREQUEST -#define XtMakeResizeRequest XTMAKERESIZEREQUEST -#define XtMalloc XTMALLOC -#define XtManageChild XTMANAGECHILD -#define XtManageChildren XTMANAGECHILDREN -#define XtMergeArgLists XTMERGEARGLISTS -#define XtMoveWidget XTMOVEWIDGET -#define XtName XTNAME -#define XtNameToWidget XTNAMETOWIDGET -#define XtOpenDisplay XTOPENDISPLAY -#define XtOverrideTranslations XTOVERRIDETRANSLATIONS -#define XtOwnSelection XTOWNSELECTION -#define XtParseTranslationTable XTPARSETRANSLATIONTABLE -#define XtPopdown XTPOPDOWN -#define XtPopup XTPOPUP -#define XtQueryGeometry XTQUERYGEOMETRY -#define XtRealizeWidget XTREALIZEWIDGET -#define XtRealloc XTREALLOC -#define XtReleaseGC XTRELEASEGC -#define XtRemoveAllCallbacks XTREMOVEALLCALLBACKS -#define XtRemoveCallback XTREMOVECALLBACK -#define XtRemoveEventHandler XTREMOVEEVENTHANDLER -#define XtRemoveGrab XTREMOVEGRAB -#define XtRemoveInput XTREMOVEINPUT -#define XtRemoveTimeOut XTREMOVETIMEOUT -#define XtResizeWidget XTRESIZEWIDGET -#define XtResolvePathname XTRESOLVEPATHNAME -#define XtSetKeyboardFocus XTSETKEYBOARDFOCUS -#define XtSetMappedWhenManaged XTSETMAPPEDWHENMANAGED -#define XtSetSensitive XTSETSENSITIVE -#define XtSetTypeConverter XTSETTYPECONVERTER -#define XtSetValues XTSETVALUES -#define XtShellStrings XTSHELLSTRINGS -#define XtStrings XTSTRINGS -#define XtToolkitInitialize XTTOOLKITINITIALIZE -#define XtTranslateCoords XTTRANSLATECOORDS -#define XtTranslateKeycode XTTRANSLATEKEYCODE -#define XtUngrabKeyboard XTUNGRABKEYBOARD -#define XtUngrabPointer XTUNGRABPOINTER -#define XtUnmanageChild XTUNMANAGECHILD -#define XtUnmanageChildren XTUNMANAGECHILDREN -#define XtUnrealizeWidget XTUNREALIZEWIDGET -#define XtVaCreateManagedWidget XTVACREATEMANAGEDWIDGET -#define XtVaCreateWidget XTVACREATEWIDGET -#define XtVaGetValues XTVAGETVALUES -#define XtVaSetValues XTVASETVALUES -#define XtWarning XTWARNING -#define XtWidgetToApplicationContext XTWIDGETTOAPPLICATIONCONTEXT -#define XtWindowOfObject XTWINDOWOFOBJECT -#define XtWindowToWidget XTWINDOWTOWIDGET -#define XwcDrawString XWCDRAWSTRING -#define XwcFreeStringList XWCFREESTRINGLIST -#define XwcTextEscapement XWCTEXTESCAPEMENT -#define XwcTextExtents XWCTEXTEXTENTS -#define XwcTextListToTextProperty XWCTEXTLISTTOTEXTPROPERTY -#define XwcTextPropertyToTextList XWCTEXTPROPERTYTOTEXTLIST -#define _XmBottomShadowColorDefault _XMBOTTOMSHADOWCOLORDEFAULT -#define _XmClearBorder _XMCLEARBORDER -#define _XmConfigureObject _XMCONFIGUREOBJECT -#define _XmDestroyParentCallback _XMDESTROYPARENTCALLBACK -#define _XmDrawArrow _XMDRAWARROW -#define _XmDrawShadows _XMDRAWSHADOWS -#define _XmFontListGetDefaultFont _XMFONTLISTGETDEFAULTFONT -#define _XmFromHorizontalPixels _XMFROMHORIZONTALPIXELS -#define _XmFromVerticalPixels _XMFROMVERTICALPIXELS -#define _XmGetClassExtensionPtr _XMGETCLASSEXTENSIONPTR -#define _XmGetDefaultFontList _XMGETDEFAULTFONTLIST -#define _XmGetTextualDragIcon _XMGETTEXTUALDRAGICON -#define _XmGetWidgetExtData _XMGETWIDGETEXTDATA -#define _XmGrabKeyboard _XMGRABKEYBOARD -#define _XmGrabPointer _XMGRABPOINTER -#define _XmInheritClass _XMINHERITCLASS -#define _XmInputInGadget _XMINPUTINGADGET -#define _XmMakeGeometryRequest _XMMAKEGEOMETRYREQUEST -#define _XmMenuPopDown _XMMENUPOPDOWN -#define _XmMoveObject _XMMOVEOBJECT -#define _XmNavigChangeManaged _XMNAVIGCHANGEMANAGED -#define _XmOSBuildFileList _XMOSBUILDFILELIST -#define _XmOSFileCompare _XMOSFILECOMPARE -#define _XmOSFindPatternPart _XMOSFINDPATTERNPART -#define _XmOSQualifyFileSpec _XMOSQUALIFYFILESPEC -#define _XmPostPopupMenu _XMPOSTPOPUPMENU -#define _XmPrimitiveEnter _XMPRIMITIVEENTER -#define _XmPrimitiveLeave _XMPRIMITIVELEAVE -#define _XmRedisplayGadgets _XMREDISPLAYGADGETS -#define _XmShellIsExclusive _XMSHELLISEXCLUSIVE -#define _XmStringDraw _XMSTRINGDRAW -#define _XmStringGetTextConcat _XMSTRINGGETTEXTCONCAT -#define _XmStrings _XMSTRINGS -#define _XmToHorizontalPixels _XMTOHORIZONTALPIXELS -#define _XmToVerticalPixels _XMTOVERTICALPIXELS -#define _XmTopShadowColorDefault _XMTOPSHADOWCOLORDEFAULT -#define _Xm_fastPtr _XM_FASTPTR -#define _XtCheckSubclassFlag _XTCHECKSUBCLASSFLAG -#define _XtInherit _XTINHERIT -#define _XtInheritTranslations _XTINHERITTRANSLATIONS -#define applicationShellWidgetClass APPLICATIONSHELLWIDGETCLASS -#define compositeWidgetClass COMPOSITEWIDGETCLASS -#define overrideShellWidgetClass OVERRIDESHELLWIDGETCLASS -#define shellWidgetClass SHELLWIDGETCLASS -#define topLevelShellClassRec TOPLEVELSHELLCLASSREC -#define topLevelShellWidgetClass TOPLEVELSHELLWIDGETCLASS -#define transientShellWidgetClass TRANSIENTSHELLWIDGETCLASS -#define vendorShellClassRec VENDORSHELLCLASSREC -#define vendorShellWidgetClass VENDORSHELLWIDGETCLASS -#define wmShellWidgetClass WMSHELLWIDGETCLASS -#define xmArrowButtonWidgetClass XMARROWBUTTONWIDGETCLASS -#define xmCascadeButtonClassRec XMCASCADEBUTTONCLASSREC -#define xmCascadeButtonGadgetClass XMCASCADEBUTTONGADGETCLASS -#define xmCascadeButtonWidgetClass XMCASCADEBUTTONWIDGETCLASS -#define xmDialogShellWidgetClass XMDIALOGSHELLWIDGETCLASS -#define xmDrawingAreaWidgetClass XMDRAWINGAREAWIDGETCLASS -#define xmDrawnButtonWidgetClass XMDRAWNBUTTONWIDGETCLASS -#define xmFileSelectionBoxWidgetClass XMFILESELECTIONBOXWIDGETCLASS -#define xmFormWidgetClass XMFORMWIDGETCLASS -#define xmFrameWidgetClass XMFRAMEWIDGETCLASS -#define xmGadgetClass XMGADGETCLASS -#define xmLabelGadgetClass XMLABELGADGETCLASS -#define xmLabelWidgetClass XMLABELWIDGETCLASS -#define xmListWidgetClass XMLISTWIDGETCLASS -#define xmMainWindowWidgetClass XMMAINWINDOWWIDGETCLASS -#define xmManagerClassRec XMMANAGERCLASSREC -#define xmManagerWidgetClass XMMANAGERWIDGETCLASS -#define xmMenuShellWidgetClass XMMENUSHELLWIDGETCLASS -#define xmMessageBoxWidgetClass XMMESSAGEBOXWIDGETCLASS -#define xmPrimitiveClassRec XMPRIMITIVECLASSREC -#define xmPrimitiveWidgetClass XMPRIMITIVEWIDGETCLASS -#define xmPushButtonClassRec XMPUSHBUTTONCLASSREC -#define xmPushButtonGadgetClass XMPUSHBUTTONGADGETCLASS -#define xmPushButtonWidgetClass XMPUSHBUTTONWIDGETCLASS -#define xmRowColumnWidgetClass XMROWCOLUMNWIDGETCLASS -#define xmSashWidgetClass XMSASHWIDGETCLASS -#define xmScrollBarWidgetClass XMSCROLLBARWIDGETCLASS -#define xmScrolledWindowClassRec XMSCROLLEDWINDOWCLASSREC -#define xmScrolledWindowWidgetClass XMSCROLLEDWINDOWWIDGETCLASS -#define xmSeparatorGadgetClass XMSEPARATORGADGETCLASS -#define xmSeparatorWidgetClass XMSEPARATORWIDGETCLASS -#define xmTextFieldWidgetClass XMTEXTFIELDWIDGETCLASS -#define xmTextWidgetClass XMTEXTWIDGETCLASS -#define xmToggleButtonGadgetClass XMTOGGLEBUTTONGADGETCLASS -#define xmToggleButtonWidgetClass XMTOGGLEBUTTONWIDGETCLASS -#define XtRegisterDrawable _XTREGISTERWINDOW -#define XtUnregisterDrawable _XTUNREGISTERWINDOW -#define XQueryFont XQUERYFONT -#define XSetPlaneMask XSETPLANEMASK -#define XChangeKeyboardControl XCHANGEKEYBOARDCONTROL -#define XDestroySubwindows XDESTROYSUBWINDOWS -#define XFreeDeviceList XFREEDEVICELIST -#define XFreeDeviceState XFREEDEVICESTATE -#define XGetExtensionVersion XGETEXTENSIONVERSION -#define XGetRGBColormaps XGETRGBCOLORMAPS -#define XIconifyWindow XICONIFYWINDOW -#define XInstallColormap XINSTALLCOLORMAP -#define XListInputDevices XLISTINPUTDEVICES -#define XLookupKeysym XLOOKUPKEYSYM -#define XOpenDevice XOPENDEVICE -#define XQueryDeviceState XQUERYDEVICESTATE -#define XSelectExtensionEvent XSELECTEXTENSIONEVENT -#define XWarpPointer XWARPPOINTER -#define XmuLookupStandardColormap XMULOOKUPSTANDARDCOLORMAP -#define XAllocNamedColor XALLOCNAMEDCOLOR -#define XBlackPixelOfScreen XBLACKPIXELOFSCREEN -#define XDefaultColormap XDEFAULTCOLORMAP -#define XDefaultColormapOfScreen XDEFAULTCOLORMAPOFSCREEN -#define XDefaultDepth XDEFAULTDEPTH -#define XDefaultScreen XDEFAULTSCREEN -#define XDefaultVisual XDEFAULTVISUAL -#define XSetIconName XSETICONNAME -#define XtInitialize XTINITIALIZE -#define XtMainLoop XTMAINLOOP -#define DtSaverGetWindows DTSAVERGETWINDOWS -#define XAddHosts XADDHOSTS -#define XDisableAccessControl XDISABLEACCESSCONTROL -#define XEnableAccessControl XENABLEACCESSCONTROL -#define XFillArcs XFILLARCS -#define XForceScreenSaver XFORCESCREENSAVER -#define XGetScreenSaver XGETSCREENSAVER -#define XListHosts XLISTHOSTS -#define XReadBitmapFile XREADBITMAPFILE -#define XRemoveHosts XREMOVEHOSTS -#define XResetScreenSaver XRESETSCREENSAVER -#define XResourceManagerString XRESOURCEMANAGERSTRING -#define XSetScreenSaver XSETSCREENSAVER -#define XStringListToTextProperty XSTRINGLISTTOTEXTPROPERTY -#define XrmDestroyDatabase XRMDESTROYDATABASE -#define XrmGetFileDatabase XRMGETFILEDATABASE -#define XrmGetStringDatabase XRMGETSTRINGDATABASE -#define XrmInitialize XRMINITIALIZE -#define XrmMergeDatabases XRMMERGEDATABASES -#define XrmParseCommand XRMPARSECOMMAND -#define XrmPutLineResource XRMPUTLINERESOURCE -#define XrmQPutStringResource XRMQPUTSTRINGRESOURCE -#define XrmStringToBindingQuarkList XRMSTRINGTOBINDINGQUARKLIST -#define XrmStringToQuark XRMSTRINGTOQUARK -#define XmCreateLabel XMCREATELABEL - -#ifdef __cplusplus -extern "C" { -#endif -extern void XtFree(char*); -#ifdef __cplusplus -} -#endif - -#define pthread_attr_create PTHREAD_ATTR_CREATE -#define pthread_attr_delete PTHREAD_ATTR_DELETE -#define pthread_attr_destroy PTHREAD_ATTR_DESTROY -#define pthread_attr_getdetach_np PTHREAD_ATTR_GETDETACH_NP -#define pthread_attr_getguardsize_np PTHREAD_ATTR_GETGUARDSIZE_NP -#define pthread_attr_getinheritsched PTHREAD_ATTR_GETINHERITSCHED -#define pthread_attr_getprio PTHREAD_ATTR_GETPRIO -#define pthread_attr_getsched PTHREAD_ATTR_GETSCHED -#define pthread_attr_getschedparam PTHREAD_ATTR_GETSCHEDPARAM -#define pthread_attr_getstacksize PTHREAD_ATTR_GETSTACKSIZE -#define pthread_attr_init PTHREAD_ATTR_INIT -#define pthread_attr_setdetach_np PTHREAD_ATTR_SETDETACH_NP -#define pthread_attr_setdetachstate PTHREAD_ATTR_SETDETACHSTATE -#define pthread_attr_setguardsize_np PTHREAD_ATTR_SETGUARDSIZE_NP -#define pthread_attr_setinheritsched PTHREAD_ATTR_SETINHERITSCHED -#define pthread_attr_setprio PTHREAD_ATTR_SETPRIO -#define pthread_attr_setsched PTHREAD_ATTR_SETSCHED -#define pthread_attr_setschedparam PTHREAD_ATTR_SETSCHEDPARAM -#define pthread_attr_setschedpolicy PTHREAD_ATTR_SETSCHEDPOLICY -#define pthread_attr_setstacksize PTHREAD_ATTR_SETSTACKSIZE -#define pthread_cancel PTHREAD_CANCEL -#define pthread_cancel_e PTHREAD_CANCEL_E -#define pthread_cond_broadcast PTHREAD_COND_BROADCAST -#define pthread_cond_destroy PTHREAD_COND_DESTROY -#define pthread_cond_init PTHREAD_COND_INIT -#define pthread_cond_sig_preempt_int_np PTHREAD_COND_SIG_PREEMPT_INT_NP -#define pthread_cond_signal PTHREAD_COND_SIGNAL -#define pthread_cond_signal_int_np PTHREAD_COND_SIGNAL_INT_NP -#define pthread_cond_timedwait PTHREAD_COND_TIMEDWAIT -#define pthread_cond_wait PTHREAD_COND_WAIT -#define pthread_condattr_create PTHREAD_CONDATTR_CREATE -#define pthread_condattr_delete PTHREAD_CONDATTR_DELETE -#define pthread_condattr_init PTHREAD_CONDATTR_INIT -#define pthread_create PTHREAD_CREATE -#define pthread_delay_np PTHREAD_DELAY_NP -#define pthread_detach PTHREAD_DETACH -#define pthread_equal PTHREAD_EQUAL -#define pthread_exc_fetch_fp_np PTHREAD_EXC_FETCH_FP_NP -#define pthread_exc_handler_np PTHREAD_EXC_HANDLER_NP -#define pthread_exc_pop_ctx_np PTHREAD_EXC_POP_CTX_NP -#define pthread_exc_push_ctx_np PTHREAD_EXC_PUSH_CTX_NP -#define pthread_exc_savecontext_np PTHREAD_EXC_SAVECONTEXT_NP -#define pthread_exit PTHREAD_EXIT -#define pthread_get_expiration_np PTHREAD_GET_EXPIRATION_NP -#define pthread_getprio PTHREAD_GETPRIO -#define pthread_getschedparam PTHREAD_GETSCHEDPARAM -#define pthread_getscheduler PTHREAD_GETSCHEDULER -#define pthread_getspecific PTHREAD_GETSPECIFIC -#define pthread_getunique_np PTHREAD_GETUNIQUE_NP -#define pthread_join PTHREAD_JOIN -#define pthread_join32 PTHREAD_JOIN32 -#define pthread_keycreate PTHREAD_KEYCREATE -#define pthread_key_create PTHREAD_KEY_CREATE -#define pthread_kill PTHREAD_KILL -#define pthread_lock_global_np PTHREAD_LOCK_GLOBAL_NP -#define pthread_mutex_destroy PTHREAD_MUTEX_DESTROY -#define pthread_mutex_init PTHREAD_MUTEX_INIT -#define pthread_mutex_lock PTHREAD_MUTEX_LOCK -#define pthread_mutex_trylock PTHREAD_MUTEX_TRYLOCK -#define pthread_mutex_unlock PTHREAD_MUTEX_UNLOCK -#define pthread_mutexattr_create PTHREAD_MUTEXATTR_CREATE -#define pthread_mutexattr_delete PTHREAD_MUTEXATTR_DELETE -#define pthread_mutexattr_destroy PTHREAD_MUTEXATTR_DESTROY -#define pthread_mutexattr_getkind_np PTHREAD_MUTEXATTR_GETKIND_NP -#define pthread_mutexattr_init PTHREAD_MUTEXATTR_INIT -#define pthread_mutexattr_setkind_np PTHREAD_MUTEXATTR_SETKIND_NP -#define pthread_mutexattr_settype_np PTHREAD_MUTEXATTR_SETTYPE_NP -#define pthread_once PTHREAD_ONCE -#define pthread_resume_np PTHREAD_RESUME_NP -#define pthread_self PTHREAD_SELF -#define pthread_setasynccancel PTHREAD_SETASYNCCANCEL -#define pthread_setcancel PTHREAD_SETCANCEL -#define pthread_setcancelstate PTHREAD_SETCANCELSTATE -#define pthread_setprio PTHREAD_SETPRIO -#define pthread_setschedparam PTHREAD_SETSCHEDPARAM -#define pthread_setscheduler PTHREAD_SETSCHEDULER -#define pthread_setspecific PTHREAD_SETSPECIFIC -#define pthread_suspend_np PTHREAD_SUSPEND_NP -#define pthread_testcancel PTHREAD_TESTCANCEL -#define pthread_unlock_global_np PTHREAD_UNLOCK_GLOBAL_NP -#define pthread_yield PTHREAD_YIELD -#define pthread_yield_np PTHREAD_YIELD_NP -#define XDefaultRootWindow XDEFAULTROOTWINDOW -#define XDisplayCells XDISPLAYCELLS -#define XMaxRequestSize XMAXREQUESTSIZE -#define XScreenOfDisplay XSCREENOFDISPLAY -#define XSetFillRule XSETFILLRULE -#define XmActivateProtocol XMACTIVATEPROTOCOL -#define XmCreateBulletinBoardDialog XMCREATEBULLETINBOARDDIALOG -#define XmCreateErrorDialog XMCREATEERRORDIALOG -#define XmCreateWarningDialog XMCREATEWARNINGDIALOG -#define XmCvtCTToXmString XMCVTCTTOXMSTRING -#define XmDestroyPixmap XMDESTROYPIXMAP -#define XmGetPixmap XMGETPIXMAP -#define XmInstallImage XMINSTALLIMAGE -#define XmListAddItems XMLISTADDITEMS -#define XmListDeleteItem XMLISTDELETEITEM -#define XmListItemExists XMLISTITEMEXISTS -#define XmListItemPos XMLISTITEMPOS -#define XmListReplaceItems XMLISTREPLACEITEMS -#define XmListReplaceItemsPos XMLISTREPLACEITEMSPOS -#define XmRemoveProtocols XMREMOVEPROTOCOLS -#define XmRemoveTabGroup XMREMOVETABGROUP -#define XmSetColorCalculation XMSETCOLORCALCULATION -#define XmTextCopy XMTEXTCOPY -#define XmTextCut XMTEXTCUT -#define XmTextFieldClearSelection XMTEXTFIELDCLEARSELECTION -#define XmTextFieldCopy XMTEXTFIELDCOPY -#define XmTextFieldCut XMTEXTFIELDCUT -#define XmTextFieldGetMaxLength XMTEXTFIELDGETMAXLENGTH -#define XmTextFieldGetSelectionPosition XMTEXTFIELDGETSELECTIONPOSITION -#define XmTextFieldPaste XMTEXTFIELDPASTE -#define XmTextFieldReplace XMTEXTFIELDREPLACE -#define XmTextFieldSetAddMode XMTEXTFIELDSETADDMODE -#define XmTextFieldSetHighlight XMTEXTFIELDSETHIGHLIGHT -#define XmTextFieldSetInsertionPosition XMTEXTFIELDSETINSERTIONPOSITION -#define XmTextFieldSetMaxLength XMTEXTFIELDSETMAXLENGTH -#define XmTextFieldShowPosition XMTEXTFIELDSHOWPOSITION -#define XmTextGetEditable XMTEXTGETEDITABLE -#define XmTextPaste XMTEXTPASTE -#define XmTextPosToXY XMTEXTPOSTOXY -#define XmTextSetEditable XMTEXTSETEDITABLE -#define XmTextShowPosition XMTEXTSHOWPOSITION -#define XmUninstallImage XMUNINSTALLIMAGE -#define XmuCvtStringToBitmap XMUCVTSTRINGTOBITMAP -#define XrmPutFileDatabase XRMPUTFILEDATABASE -#define XtAddConverter XTADDCONVERTER -#define XtError XTERROR -#define XtVaCreatePopupShell XTVACREATEPOPUPSHELL -#define pthread_attr_getschedpolicy PTHREAD_ATTR_GETSCHEDPOLICY -#define pthread_key_delete PTHREAD_KEY_DELETE -#define xmBulletinBoardWidgetClass XMBULLETINBOARDWIDGETCLASS -#define xmScaleWidgetClass XMSCALEWIDGETCLASS -#define XtDisplay XTDISPLAY -#define XtScreen XTSCREEN -#define XAllocIconSize XALLOCICONSIZE -#define XAllocStandardColormap XALLOCSTANDARDCOLORMAP -#define XAllowEvents XALLOWEVENTS -#define XBlackPixel XBLACKPIXEL -#define XCopyColormapAndFree XCOPYCOLORMAPANDFREE -#define XDefaultGC XDEFAULTGC -#define XDisplayHeight XDISPLAYHEIGHT -#define XDisplayWidth XDISPLAYWIDTH -#define XGetCommand XGETCOMMAND -#define XGetIconSizes XGETICONSIZES -#define XKillClient XKILLCLIENT -#define XListInstalledColormaps XLISTINSTALLEDCOLORMAPS -#define XRootWindow XROOTWINDOW -#define XWMGeometry XWMGEOMETRY -#define XWhitePixel XWHITEPIXEL -#define XrmCombineDatabase XRMCOMBINEDATABASE -#define XrmCombineFileDatabase XRMCOMBINEFILEDATABASE -#define XSetStandardProperties XSETSTANDARDPROPERTIES -#define XSetState XSETSTATE -#define XDrawRectangles XDRAWRECTANGLES -#define XGrabButton XGRABBUTTON -#define XLookupColor XLOOKUPCOLOR -#define XMapSubwindows XMAPSUBWINDOWS -#define XRecolorCursor XRECOLORCURSOR -#define XStoreBytes XSTOREBYTES -#define XUngrabButton XUNGRABBUTTON -#define XUninstallColormap XUNINSTALLCOLORMAP -#define lib$wait LIB$WAIT -#define lib$find_file LIB$FIND_FILE -#define lib$find_file_end LIB$FIND_FILE_END -#define lib$set_symbol LIB$SET_SYMBOL -#define lib$sfree1_dd LIB$SFREE1_DD -#define lib$spawn LIB$SPAWN -#define sys$assign SYS$ASSIGN -#define sys$crembx SYS$CREMBX -#define sys$dassgn SYS$DASSGN -#define sys$dclexh SYS$DCLEXH -#define sys$getdviw SYS$GETDVIW -#define sys$getsyiw SYS$GETSYIW -#define sys$qio SYS$QIO -#define sys$qiow SYS$QIOW -#define sys$setef SYS$SETEF -#define sys$synch SYS$SYNCH -#define XDrawText XDRAWTEXT -#define XtCloseDisplay XTCLOSEDISPLAY -#define XtDestroyApplicationContext XTDESTROYAPPLICATIONCONTEXT -#define lib$ediv LIB$EDIV -#define lib$subx LIB$SUBX -#define sys$bintim SYS$BINTIM -#define sys$gettim SYS$GETTIM -#define XFetchName XFETCHNAME -#define XPeekIfEvent XPEEKIFEVENT -#define XQueryKeymap XQUERYKEYMAP -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/wmesa.h b/nx-X11/extras/Mesa_6.4.2/include/GL/wmesa.h deleted file mode 100644 index 66f3dbe82f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/wmesa.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.0 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - - -/* - * Windows driver by: Mark E. Peterson (markp@ic.mankato.mn.us) - * Updated by Li Wei (liwei@aiar.xjtu.edu.cn) - * - * - *************************************************************** - * WMesa * - * version 2.3 * - * * - * By * - * Li Wei * - * Institute of Artificial Intelligence & Robotics * - * Xi'an Jiaotong University * - * Email: liwei@aiar.xjtu.edu.cn * - * Web page: http://sun.aiar.xjtu.edu.cn * - * * - * July 7th, 1997 * - *************************************************************** - */ - - -#ifndef WMESA_H -#define WMESA_H - - -#ifdef __cplusplus -extern "C" { -#endif - - -#include "GL/gl.h" - -#if defined(_MSV_VER) && !defined(__GNUC__) -# pragma warning (disable:4273) -# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */ -# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */ -# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */ -# pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */ -# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */ -# pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */ -# if (MESA_WARNQUIET>1) -# pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */ -# endif -#endif - -/* - * This is the WMesa context 'handle': - */ -typedef struct wmesa_context *WMesaContext; - - - -/* - * Create a new WMesaContext for rendering into a window. You must - * have already created the window of correct visual type and with an - * appropriate colormap. - * - * Input: - * hDC - Windows device or memory context - * Pal - Palette to use - * rgb_flag - GL_TRUE = RGB mode, - * GL_FALSE = color index mode - * db_flag - GL_TRUE = double-buffered, - * GL_FALSE = single buffered - * alpha_flag - GL_TRUE = create software alpha buffer, - * GL_FALSE = no software alpha buffer - * - * Note: Indexed mode requires double buffering under Windows. - * - * Return: a WMesa_context or NULL if error. - */ -extern WMesaContext WMesaCreateContext(HDC hDC,HPALETTE* pPal, - GLboolean rgb_flag, - GLboolean db_flag, - GLboolean alpha_flag); - - -/* - * Destroy a rendering context as returned by WMesaCreateContext() - */ -/*extern void WMesaDestroyContext( WMesaContext ctx );*/ -extern void WMesaDestroyContext( void ); - - - -/* - * Make the specified context the current one. - */ -extern void WMesaMakeCurrent( WMesaContext ctx ); - - -/* - * Return a handle to the current context. - */ -extern WMesaContext WMesaGetCurrentContext( void ); - - -/* - * Swap the front and back buffers for the current context. No action - * taken if the context is not double buffered. - */ -extern void WMesaSwapBuffers(void); - - -/* - * In indexed color mode we need to know when the palette changes. - */ -extern void WMesaPaletteChange(HPALETTE Pal); - -extern void WMesaMove(void); - - - -#ifdef __cplusplus -} -#endif - - -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/xmesa.h b/nx-X11/extras/Mesa_6.4.2/include/GL/xmesa.h deleted file mode 100644 index ab813b23ba..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/xmesa.h +++ /dev/null @@ -1,390 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * Mesa/X11 interface. This header file serves as the documentation for - * the Mesa/X11 interface functions. - * - * Note: this interface isn't intended for user programs. It's primarily - * just for implementing the pseudo-GLX interface. - */ - - -/* Sample Usage: - -In addition to the usual X calls to select a visual, create a colormap -and create a window, you must do the following to use the X/Mesa interface: - -1. Call XMesaCreateVisual() to make an XMesaVisual from an XVisualInfo. - -2. Call XMesaCreateContext() to create an X/Mesa rendering context, given - the XMesaVisual. - -3. Call XMesaCreateWindowBuffer() to create an XMesaBuffer from an X window - and XMesaVisual. - -4. Call XMesaMakeCurrent() to bind the XMesaBuffer to an XMesaContext and - to make the context the current one. - -5. Make gl* calls to render your graphics. - -6. Use XMesaSwapBuffers() when double buffering to swap front/back buffers. - -7. Before the X window is destroyed, call XMesaDestroyBuffer(). - -8. Before exiting, call XMesaDestroyVisual and XMesaDestroyContext. - -*/ - - - - -#ifndef XMESA_H -#define XMESA_H - -#ifdef __VMS -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef XFree86Server -#include "xmesa_xf86.h" -#else -#include -#include -#include "xmesa_x.h" -#endif -#include "GL/gl.h" - -#ifdef AMIWIN -#include -extern struct Library *XLibBase; -#endif - - -#define XMESA_MAJOR_VERSION 6 -#define XMESA_MINOR_VERSION 3 - - - -/* - * Values passed to XMesaGetString: - */ -#define XMESA_VERSION 1 -#define XMESA_EXTENSIONS 2 - - -/* - * Values passed to XMesaSetFXmode: - */ -#define XMESA_FX_WINDOW 1 -#define XMESA_FX_FULLSCREEN 2 - - - -typedef struct xmesa_context *XMesaContext; - -typedef struct xmesa_visual *XMesaVisual; - -typedef struct xmesa_buffer *XMesaBuffer; - - - -/* - * Create a new X/Mesa visual. - * Input: display - X11 display - * visinfo - an XVisualInfo pointer - * rgb_flag - GL_TRUE = RGB mode, - * GL_FALSE = color index mode - * alpha_flag - alpha buffer requested? - * db_flag - GL_TRUE = double-buffered, - * GL_FALSE = single buffered - * stereo_flag - stereo visual? - * ximage_flag - GL_TRUE = use an XImage for back buffer, - * GL_FALSE = use an off-screen pixmap for back buffer - * depth_size - requested bits/depth values, or zero - * stencil_size - requested bits/stencil values, or zero - * accum_red_size - requested bits/red accum values, or zero - * accum_green_size - requested bits/green accum values, or zero - * accum_blue_size - requested bits/blue accum values, or zero - * accum_alpha_size - requested bits/alpha accum values, or zero - * num_samples - number of samples/pixel if multisampling, or zero - * level - visual level, usually 0 - * visualCaveat - ala the GLX extension, usually GLX_NONE_EXT - * Return; a new XMesaVisual or 0 if error. - */ -extern XMesaVisual XMesaCreateVisual( XMesaDisplay *display, - XMesaVisualInfo visinfo, - GLboolean rgb_flag, - GLboolean alpha_flag, - GLboolean db_flag, - GLboolean stereo_flag, - GLboolean ximage_flag, - GLint depth_size, - GLint stencil_size, - GLint accum_red_size, - GLint accum_green_size, - GLint accum_blue_size, - GLint accum_alpha_size, - GLint num_samples, - GLint level, - GLint visualCaveat ); - -/* - * Destroy an XMesaVisual, but not the associated XVisualInfo. - */ -extern void XMesaDestroyVisual( XMesaVisual v ); - - - -/* - * Create a new XMesaContext for rendering into an X11 window. - * - * Input: visual - an XMesaVisual - * share_list - another XMesaContext with which to share display - * lists or NULL if no sharing is wanted. - * Return: an XMesaContext or NULL if error. - */ -extern XMesaContext XMesaCreateContext( XMesaVisual v, - XMesaContext share_list ); - - -/* - * Destroy a rendering context as returned by XMesaCreateContext() - */ -extern void XMesaDestroyContext( XMesaContext c ); - - -/* - * Create an XMesaBuffer from an X window. - */ -extern XMesaBuffer XMesaCreateWindowBuffer( XMesaVisual v, XMesaWindow w ); - - -/* - * Create an XMesaBuffer from an X pixmap. - */ -extern XMesaBuffer XMesaCreatePixmapBuffer( XMesaVisual v, - XMesaPixmap p, - XMesaColormap cmap ); - - -/* - * Destroy an XMesaBuffer, but not the corresponding window or pixmap. - */ -extern void XMesaDestroyBuffer( XMesaBuffer b ); - - -/* - * Return the XMesaBuffer handle which corresponds to an X drawable, if any. - * - * New in Mesa 2.3. - */ -extern XMesaBuffer XMesaFindBuffer( XMesaDisplay *dpy, - XMesaDrawable d ); - - - -/* - * Bind a buffer to a context and make the context the current one. - */ -extern GLboolean XMesaMakeCurrent( XMesaContext c, - XMesaBuffer b ); - - -/* - * Bind two buffers (read and draw) to a context and make the - * context the current one. - * New in Mesa 3.3 - */ -extern GLboolean XMesaMakeCurrent2( XMesaContext c, - XMesaBuffer drawBuffer, - XMesaBuffer readBuffer ); - - -/* - * Unbind the current context from its buffer. - */ -extern GLboolean XMesaUnbindContext( XMesaContext c ); - - -/* - * Return a handle to the current context. - */ -extern XMesaContext XMesaGetCurrentContext( void ); - - -/* - * Return handle to the current (draw) buffer. - */ -extern XMesaBuffer XMesaGetCurrentBuffer( void ); - - -/* - * Return handle to the current read buffer. - * New in Mesa 3.3 - */ -extern XMesaBuffer XMesaGetCurrentReadBuffer( void ); - - -/* - * Swap the front and back buffers for the given buffer. No action is - * taken if the buffer is not double buffered. - */ -extern void XMesaSwapBuffers( XMesaBuffer b ); - - -/* - * Copy a sub-region of the back buffer to the front buffer. - * - * New in Mesa 2.6 - */ -extern void XMesaCopySubBuffer( XMesaBuffer b, - int x, - int y, - int width, - int height ); - - -/* - * Return a pointer to the the Pixmap or XImage being used as the back - * color buffer of an XMesaBuffer. This function is a way to get "under - * the hood" of X/Mesa so one can manipulate the back buffer directly. - * Input: b - the XMesaBuffer - * Output: pixmap - pointer to back buffer's Pixmap, or 0 - * ximage - pointer to back buffer's XImage, or NULL - * Return: GL_TRUE = context is double buffered - * GL_FALSE = context is single buffered - */ -extern GLboolean XMesaGetBackBuffer( XMesaBuffer b, - XMesaPixmap *pixmap, - XMesaImage **ximage ); - - - -/* - * Return the depth buffer associated with an XMesaBuffer. - * Input: b - the XMesa buffer handle - * Output: width, height - size of buffer in pixels - * bytesPerValue - bytes per depth value (2 or 4) - * buffer - pointer to depth buffer values - * Return: GL_TRUE or GL_FALSE to indicate success or failure. - * - * New in Mesa 2.4. - */ -extern GLboolean XMesaGetDepthBuffer( XMesaBuffer b, - GLint *width, - GLint *height, - GLint *bytesPerValue, - void **buffer ); - - - -/* - * Flush/sync a context - */ -extern void XMesaFlush( XMesaContext c ); - - - -/* - * Get an X/Mesa-specific string. - * Input: name - either XMESA_VERSION or XMESA_EXTENSIONS - */ -extern const char *XMesaGetString( XMesaContext c, int name ); - - - -/* - * Scan for XMesaBuffers whose window/pixmap has been destroyed, then free - * any memory used by that buffer. - * - * New in Mesa 2.3. - */ -extern void XMesaGarbageCollect( void ); - - - -/* - * Return a dithered pixel value. - * Input: c - XMesaContext - * x, y - window coordinate - * red, green, blue, alpha - color components in [0,1] - * Return: pixel value - * - * New in Mesa 2.3. - */ -extern unsigned long XMesaDitherColor( XMesaContext xmesa, - GLint x, - GLint y, - GLfloat red, - GLfloat green, - GLfloat blue, - GLfloat alpha ); - - - -/* - * 3Dfx Glide driver only! - * Set 3Dfx/Glide full-screen or window rendering mode. - * Input: mode - either XMESA_FX_WINDOW (window rendering mode) or - * XMESA_FX_FULLSCREEN (full-screen rendering mode) - * Return: GL_TRUE if success - * GL_FALSE if invalid mode or if not using 3Dfx driver - * - * New in Mesa 2.6. - */ -extern GLboolean XMesaSetFXmode( GLint mode ); - - - -/* - * Reallocate the back/depth/stencil/accum/etc/ buffers associated with - * buffer if its size has changed. - * - * New in Mesa 4.0.2 - */ -extern void XMesaResizeBuffers( XMesaBuffer b ); - - - -/* - * Create a pbuffer. - * New in Mesa 4.1 - */ -extern XMesaBuffer XMesaCreatePBuffer(XMesaVisual v, XMesaColormap cmap, - unsigned int width, unsigned int height); - - - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/xmesa_x.h b/nx-X11/extras/Mesa_6.4.2/include/GL/xmesa_x.h deleted file mode 100644 index 1455c88adb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/xmesa_x.h +++ /dev/null @@ -1,84 +0,0 @@ - -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * - * When we're building the XMesa driver for stand-alone Mesa we - * include this file when building the xm_*.c files. - * We need to define some types and macros differently when building - * in the Xserver vs. stand-alone Mesa. - */ - -#ifndef _XMESA_X_H_ -#define _XMESA_X_H_ - -typedef Display XMesaDisplay; -typedef Pixmap XMesaPixmap; -typedef Colormap XMesaColormap; -typedef Drawable XMesaDrawable; -typedef Window XMesaWindow; -typedef GC XMesaGC; -typedef XVisualInfo *XMesaVisualInfo; -typedef XImage XMesaImage; -typedef XPoint XMesaPoint; -typedef XColor XMesaColor; - -#define XMesaDestroyImage XDestroyImage - -#define XMesaPutPixel XPutPixel -#define XMesaGetPixel XGetPixel - -#define XMesaSetForeground XSetForeground -#define XMesaSetBackground XSetBackground -#define XMesaSetPlaneMask XSetPlaneMask -#define XMesaSetFunction XSetFunction -#define XMesaSetFillStyle XSetFillStyle -#define XMesaSetTile XSetTile - -#define XMesaDrawPoint XDrawPoint -#define XMesaDrawPoints XDrawPoints -#define XMesaFillRectangle XFillRectangle -#define XMesaPutImage XPutImage -#define XMesaCopyArea XCopyArea - -#define XMesaCreatePixmap XCreatePixmap -#define XMesaFreePixmap XFreePixmap -#define XMesaFreeGC XFreeGC - -#define GET_COLORMAP_SIZE(__v) __v->visinfo->colormap_size -#define GET_REDMASK(__v) __v->mesa_visual.redMask -#define GET_GREENMASK(__v) __v->mesa_visual.greenMask -#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask -#define GET_VISUAL_DEPTH(__v) __v->visinfo->depth -#define GET_BLACK_PIXEL(__v) BlackPixel(__v->display, __v->mesa_visual.screen) -#define CHECK_BYTE_ORDER(__v) host_byte_order()==ImageByteOrder(__v->display) -#define CHECK_FOR_HPCR(__v) XInternAtom(__v->display, "_HP_RGB_SMOOTH_MAP_LIST", True) - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GL/xmesa_xf86.h b/nx-X11/extras/Mesa_6.4.2/include/GL/xmesa_xf86.h deleted file mode 100644 index 63a8e57dbc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GL/xmesa_xf86.h +++ /dev/null @@ -1,153 +0,0 @@ - -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * - * When we're building the XMesa driver for use in the X server (as the - * indirect render) we include this file when building the xm_*.c files. - * We need to define some types and macros differently when building - * in the Xserver vs. stand-alone Mesa. - */ - -#ifndef _XMESA_XF86_H_ -#define _XMESA_XF86_H_ - -#include "scrnintstr.h" -#include "pixmapstr.h" - -typedef struct _XMesaImageRec XMesaImage; - -typedef ScreenRec XMesaDisplay; -typedef PixmapPtr XMesaPixmap; -typedef ColormapPtr XMesaColormap; -typedef DrawablePtr XMesaDrawable; -typedef WindowPtr XMesaWindow; -typedef GCPtr XMesaGC; -typedef VisualPtr XMesaVisualInfo; -typedef DDXPointRec XMesaPoint; -typedef xColorItem XMesaColor; - -#define XMesaSetGeneric(__d,__gc,__val,__mask) \ -do { \ - CARD32 __v[1]; \ - (void) __d; \ - __v[0] = __val; \ - dixChangeGC(NullClient, __gc, __mask, __v, NULL); \ -} while (0) - -#define XMesaSetGenericPtr(__d,__gc,__pval,__mask) \ -do { \ - ChangeGCVal __v[1]; \ - (void) __d; \ - __v[0].ptr = __pval; \ - dixChangeGC(NullClient, __gc, __mask, NULL, __v); \ -} while (0) - -#define XMesaSetForeground(d,gc,v) XMesaSetGeneric(d,gc,v,GCForeground) -#define XMesaSetBackground(d,gc,v) XMesaSetGeneric(d,gc,v,GCBackground) -#define XMesaSetPlaneMask(d,gc,v) XMesaSetGeneric(d,gc,v,GCPlaneMask) -#define XMesaSetFunction(d,gc,v) XMesaSetGeneric(d,gc,v,GCFunction) -#define XMesaSetFillStyle(d,gc,v) XMesaSetGeneric(d,gc,v,GCFillStyle) - -#define XMesaSetTile(d,gc,v) XMesaSetGenericPtr(d,gc,v,GCTile) - -#define XMesaDrawPoint(__d,__b,__gc,__x,__y) \ -do { \ - XMesaPoint __p[1]; \ - (void) __d; \ - __p[0].x = __x; \ - __p[0].y = __y; \ - ValidateGC(__b, __gc); \ - (*gc->ops->PolyPoint)(__b, __gc, CoordModeOrigin, 1, __p); \ -} while (0) - -#define XMesaDrawPoints(__d,__b,__gc,__p,__n,__m) \ -do { \ - (void) __d; \ - ValidateGC(__b, __gc); \ - (*gc->ops->PolyPoint)(__b, __gc, __m, __n, __p); \ -} while (0) - -#define XMesaFillRectangle(__d,__b,__gc,__x,__y,__w,__h) \ -do { \ - xRectangle __r[1]; \ - (void) __d; \ - ValidateGC((DrawablePtr)__b, __gc); \ - __r[0].x = __x; \ - __r[0].y = __y; \ - __r[0].width = __w; \ - __r[0].height = __h; \ - (*__gc->ops->PolyFillRect)((DrawablePtr)__b, __gc, 1, __r); \ -} while (0) - -#define XMesaPutImage(__d,__b,__gc,__i,__sx,__sy,__x,__y,__w,__h) \ -do { \ - /* Assumes: Images are always in ZPixmap format */ \ - (void) __d; \ - if (__sx || __sy) /* The non-trivial case */ \ - XMesaPutImageHelper(__d,__b,__gc,__i,__sx,__sy,__x,__y,__w,__h); \ - ValidateGC(__b, __gc); \ - (*__gc->ops->PutImage)(__b, __gc, ((XMesaDrawable)(__b))->depth, \ - __x, __y, __w, __h, 0, ZPixmap, \ - ((XMesaImage *)(__i))->data); \ -} while (0) - -#define XMesaCopyArea(__d,__sb,__db,__gc,__sx,__sy,__w,__h,__x,__y) \ -do { \ - (void) __d; \ - ValidateGC(__db, __gc); \ - (*__gc->ops->CopyArea)((DrawablePtr)__sb, __db, __gc, \ - __sx, __sy, __w, __h, __x, __y); \ -} while (0) - - -/* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */ -#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \ - (*__d->CreatePixmap)(__d, __w, __h, __depth) - -#define XMesaFreePixmap(__d,__b) \ - (*__d->DestroyPixmap)(__b) - -#define XMesaFreeGC(__d,__gc) \ -do { \ - (void) __d; \ - FreeScratchGC(__gc); \ -} while (0) - -#define GET_COLORMAP_SIZE(__v) __v->ColormapEntries -#define GET_REDMASK(__v) __v->mesa_visual.redMask -#define GET_GREENMASK(__v) __v->mesa_visual.greenMask -#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask -#define GET_VISUAL_DEPTH(__v) __v->nplanes -#define GET_BLACK_PIXEL(__v) __v->display->blackPixel -#define CHECK_BYTE_ORDER(__v) GL_TRUE -#define CHECK_FOR_HPCR(__v) GL_FALSE - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/include/GLES/egl.h b/nx-X11/extras/Mesa_6.4.2/include/GLES/egl.h deleted file mode 100644 index d62786d03d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GLES/egl.h +++ /dev/null @@ -1,274 +0,0 @@ -#ifndef _EGL_H -#define _EGL_H - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.0 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -#if 0/*XXX TEMPORARY HACK*/ -#include -#else -#include -#endif -#include - -/* XXX should go in eglext.h */ -#define GL_OES_VERSION_1_0 1 -#define GL_OES_read_format 1 -#define GL_OES_compressed_paletted_texture 1 -#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B -#define GL_PALETTE4_RGB8_OES 0x8B90 -#define GL_PALETTE4_RGBA8_OES 0x8B91 -#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 -#define GL_PALETTE4_RGBA4_OES 0x8B93 -#define GL_PALETTE4_RGB5_A1_OES 0x8B94 -#define GL_PALETTE8_RGB8_OES 0x8B95 -#define GL_PALETTE8_RGBA8_OES 0x8B96 -#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 -#define GL_PALETTE8_RGBA4_OES 0x8B98 -#define GL_PALETTE8_RGB5_A1_OES 0x8B99 -/* XXX */ - -/* -** Versioning and extensions -*/ -#define EGL_VERSION_1_0 1 -#if 0 -#define EGL_VERSION_1_1 1 -#endif - -/* -** Boolean -*/ -#define EGL_FALSE 0 -#define EGL_TRUE 1 - -/* -** Errors -*/ -#define EGL_SUCCESS 0x3000 -#define EGL_NOT_INITIALIZED 0x3001 -#define EGL_BAD_ACCESS 0x3002 -#define EGL_BAD_ALLOC 0x3003 -#define EGL_BAD_ATTRIBUTE 0x3004 -#define EGL_BAD_CONFIG 0x3005 -#define EGL_BAD_CONTEXT 0x3006 -#define EGL_BAD_CURRENT_SURFACE 0x3007 -#define EGL_BAD_DISPLAY 0x3008 -#define EGL_BAD_MATCH 0x3009 -#define EGL_BAD_NATIVE_PIXMAP 0x300A -#define EGL_BAD_NATIVE_WINDOW 0x300B -#define EGL_BAD_PARAMETER 0x300C -#define EGL_BAD_SURFACE 0x300D -#define EGL_CONTEXT_LOST 0x300E -/* 0x300F - 0x301F reserved for additional errors. */ - -/* -** Config attributes -*/ -#define EGL_BUFFER_SIZE 0x3020 -#define EGL_ALPHA_SIZE 0x3021 -#define EGL_BLUE_SIZE 0x3022 -#define EGL_GREEN_SIZE 0x3023 -#define EGL_RED_SIZE 0x3024 -#define EGL_DEPTH_SIZE 0x3025 -#define EGL_STENCIL_SIZE 0x3026 -#define EGL_CONFIG_CAVEAT 0x3027 -#define EGL_CONFIG_ID 0x3028 -#define EGL_LEVEL 0x3029 -#define EGL_MAX_PBUFFER_HEIGHT 0x302A -#define EGL_MAX_PBUFFER_PIXELS 0x302B -#define EGL_MAX_PBUFFER_WIDTH 0x302C -#define EGL_NATIVE_RENDERABLE 0x302D -#define EGL_NATIVE_VISUAL_ID 0x302E -#define EGL_NATIVE_VISUAL_TYPE 0x302F -/*#define EGL_PRESERVED_RESOURCES 0x3030*/ -#define EGL_SAMPLES 0x3031 -#define EGL_SAMPLE_BUFFERS 0x3032 -#define EGL_SURFACE_TYPE 0x3033 -#define EGL_TRANSPARENT_TYPE 0x3034 -#define EGL_TRANSPARENT_BLUE_VALUE 0x3035 -#define EGL_TRANSPARENT_GREEN_VALUE 0x3036 -#define EGL_TRANSPARENT_RED_VALUE 0x3037 -#define EGL_NONE 0x3038 /* Also a config value */ -#define EGL_BIND_TO_TEXTURE_RGB 0x3039 -#define EGL_BIND_TO_TEXTURE_RGBA 0x303A -#define EGL_MIN_SWAP_INTERVAL 0x303B -#define EGL_MAX_SWAP_INTERVAL 0x303C - -/* -** Config values -*/ -#define EGL_DONT_CARE ((EGLint) -1) - -#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */ -#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* " */ -#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */ -#define EGL_NO_TEXTURE 0x305C /* EGL_TEXTURE_FORMAT/TARGET value */ -#define EGL_TEXTURE_RGB 0x305D /* EGL_TEXTURE_FORMAT value */ -#define EGL_TEXTURE_RGBA 0x305E /* " */ -#define EGL_TEXTURE_2D 0x305F /* EGL_TEXTURE_TARGET value */ - -/* -** Config attribute mask bits -*/ -#define EGL_PBUFFER_BIT 0x01 /* EGL_SURFACE_TYPE mask bit */ -#define EGL_PIXMAP_BIT 0x02 /* " */ -#define EGL_WINDOW_BIT 0x04 /* " */ - -/* -** String names -*/ -#define EGL_VENDOR 0x3053 /* eglQueryString target */ -#define EGL_VERSION 0x3054 /* " */ -#define EGL_EXTENSIONS 0x3055 /* " */ - -/* -** Surface attributes -*/ -#define EGL_HEIGHT 0x3056 -#define EGL_WIDTH 0x3057 -#define EGL_LARGEST_PBUFFER 0x3058 -#define EGL_TEXTURE_FORMAT 0x3080 /* For pbuffers bound as textures */ -#define EGL_TEXTURE_TARGET 0x3081 /* " */ -#define EGL_MIPMAP_TEXTURE 0x3082 /* " */ -#define EGL_MIPMAP_LEVEL 0x3083 /* " */ - -/* -** BindTexImage / ReleaseTexImage buffer target -*/ -#define EGL_BACK_BUFFER 0x3084 - -/* -** Current surfaces -*/ -#define EGL_DRAW 0x3059 -#define EGL_READ 0x305A - -/* -** Engines -*/ -#define EGL_CORE_NATIVE_ENGINE 0x305B - -/* 0x305C-0x3FFFF reserved for future use */ - -/* -** Functions -*/ -#ifdef __cplusplus -extern "C" { -#endif - -GLAPI EGLint APIENTRY eglGetError (void); - -GLAPI EGLDisplay APIENTRY eglGetDisplay (NativeDisplayType display); -GLAPI EGLBoolean APIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor); -GLAPI EGLBoolean APIENTRY eglTerminate (EGLDisplay dpy); -GLAPI const char * APIENTRY eglQueryString (EGLDisplay dpy, EGLint name); -GLAPI void (* APIENTRY eglGetProcAddress (const char *procname))(void); - -GLAPI EGLBoolean APIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config); -GLAPI EGLBoolean APIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); -GLAPI EGLBoolean APIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); - -GLAPI EGLSurface APIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list); -GLAPI EGLSurface APIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list); -GLAPI EGLSurface APIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); -GLAPI EGLBoolean APIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface); -GLAPI EGLBoolean APIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value); - -/* EGL 1.1 render-to-texture APIs */ -GLAPI EGLBoolean APIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); -GLAPI EGLBoolean APIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); -GLAPI EGLBoolean APIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); - -/* EGL 1.1 swap control API */ -GLAPI EGLBoolean APIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval); - -GLAPI EGLContext APIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list); -GLAPI EGLBoolean APIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx); -GLAPI EGLBoolean APIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); -GLAPI EGLContext APIENTRY eglGetCurrentContext (void); -GLAPI EGLSurface APIENTRY eglGetCurrentSurface (EGLint readdraw); -GLAPI EGLDisplay APIENTRY eglGetCurrentDisplay (void); -GLAPI EGLBoolean APIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value); - -GLAPI EGLBoolean APIENTRY eglWaitGL (void); -GLAPI EGLBoolean APIENTRY eglWaitNative (EGLint engine); -GLAPI EGLBoolean APIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface draw); -GLAPI EGLBoolean APIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, NativePixmapType target); - - - -/* EGL_MESA_screen extension >>> PRELIMINARY <<< */ -#ifndef EGL_MESA_screen_surface -#define EGL_MESA_screen_surface 1 - -#define EGL_BAD_SCREEN_MESA 0x4000 -#define EGL_BAD_MODE_MESA 0x4001 -#define EGL_SCREEN_COUNT_MESA 0x4002 -#define EGL_SCREEN_POSITION_MESA 0x4003 -#define EGL_MODE_ID_MESA 0x4004 -#define EGL_REFRESH_RATE_MESA 0x4005 -#define EGL_OPTIMAL_MODE_MESA 0x4006 -#define EGL_SCREEN_BIT_MESA 0x08 - -GLAPI EGLBoolean APIENTRY eglChooseModeMESA(EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); -GLAPI EGLBoolean APIENTRY eglGetModesMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); -GLAPI EGLBoolean APIENTRY eglGetModeAttribMESA(EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value); -GLAPI EGLBoolean APIENTRY eglGetScreensMESA(EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens); -GLAPI EGLSurface APIENTRY eglCreateScreenSurfaceMESA(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); -GLAPI EGLBoolean APIENTRY eglShowSurfaceMESA(EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode); -GLAPI EGLBoolean APIENTRY eglScreenPositionMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y); -GLAPI EGLBoolean APIENTRY eglQueryScreenMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value); -GLAPI EGLBoolean APIENTRY eglQueryScreenSurfaceMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface); -GLAPI EGLBoolean APIENTRY eglQueryScreenModeMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode); -GLAPI const char * APIENTRY eglQueryModeStringMESA(EGLDisplay dpy, EGLModeMESA mode); - -#endif /* EGL_MESA_screen_surface */ - - -#ifndef EGL_MESA_copy_context -#define EGL_MESA_copy_context 1 - -GLAPI EGLBoolean APIENTRY eglCopyContextMESA(EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask); - -#endif /* EGL_MESA_copy_context */ - - -#ifdef __cplusplus -} -#endif - -#endif /* _EGL_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/include/GLES/egltypes.h b/nx-X11/extras/Mesa_6.4.2/include/GLES/egltypes.h deleted file mode 100644 index 65cba8d579..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GLES/egltypes.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -** egltypes.h for Mesa -** -** ONLY egl.h SHOULD INCLUDE THIS FILE! -** -** See comments about egltypes.h in the standard egl.h file. -*/ - - -#include - - -/* -** These opaque EGL types are implemented as unsigned 32-bit integers: -*/ -typedef u_int32_t EGLDisplay; -typedef u_int32_t EGLConfig; -typedef u_int32_t EGLSurface; -typedef u_int32_t EGLContext; - -/* EGL_MESA_screen_surface */ -typedef u_int32_t EGLModeMESA; -typedef u_int32_t EGLScreenMESA; - - -/* -** Other basic EGL types: -*/ -typedef u_int8_t EGLBoolean; -typedef int32_t EGLint; - -typedef void * NativeDisplayType; -typedef int NativePixmapType; -typedef int NativeWindowType; - -/* -** EGL and native handle null values: -*/ -#define EGL_DEFAULT_DISPLAY ((NativeDisplayType) 0) -#define EGL_NO_CONTEXT ((EGLContext) 0) -#define EGL_NO_DISPLAY ((EGLDisplay) 0) -#define EGL_NO_SURFACE ((EGLSurface) 0) - -/* EGL_MESA_screen_surface */ -#define EGL_NO_MODE_MESA ((EGLModeMESA) 0) diff --git a/nx-X11/extras/Mesa_6.4.2/include/GLView.h b/nx-X11/extras/Mesa_6.4.2/include/GLView.h deleted file mode 100644 index 8d9d25bb1c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/include/GLView.h +++ /dev/null @@ -1,192 +0,0 @@ -/******************************************************************************* -/ -/ File: GLView.h -/ -/ Copyright 1993-98, Be Incorporated, All Rights Reserved. -/ -*******************************************************************************/ - -#ifndef BGLVIEW_H -#define BGLVIEW_H - -#include - -#define BGL_RGB 0 -#define BGL_INDEX 1 -#define BGL_SINGLE 0 -#define BGL_DOUBLE 2 -#define BGL_DIRECT 0 -#define BGL_INDIRECT 4 -#define BGL_ACCUM 8 -#define BGL_ALPHA 16 -#define BGL_DEPTH 32 -#define BGL_OVERLAY 64 -#define BGL_UNDERLAY 128 -#define BGL_STENCIL 512 - -#ifdef __cplusplus - - -#include -#include -#include -#include -#include -#include - -class BGLView : public BView { -public: - - BGLView(BRect rect, char *name, - ulong resizingMode, ulong mode, - ulong options); -virtual ~BGLView(); - - void LockGL(); - void UnlockGL(); - void SwapBuffers(); - void SwapBuffers( bool vSync ); - BView * EmbeddedView(); - status_t CopyPixelsOut(BPoint source, BBitmap *dest); - status_t CopyPixelsIn(BBitmap *source, BPoint dest); -virtual void ErrorCallback(unsigned long errorCode); // Mesa's GLenum is uint where Be's ones was ulong! - -virtual void Draw(BRect updateRect); - -virtual void AttachedToWindow(); -virtual void AllAttached(); -virtual void DetachedFromWindow(); -virtual void AllDetached(); - -virtual void FrameResized(float width, float height); -virtual status_t Perform(perform_code d, void *arg); - - /* The public methods below, for the moment, - are just pass-throughs to BView */ - -virtual status_t Archive(BMessage *data, bool deep = true) const; - -virtual void MessageReceived(BMessage *msg); -virtual void SetResizingMode(uint32 mode); - -virtual void Show(); -virtual void Hide(); - -virtual BHandler *ResolveSpecifier(BMessage *msg, int32 index, - BMessage *specifier, int32 form, - const char *property); -virtual status_t GetSupportedSuites(BMessage *data); - -/* New public functions */ - void DirectConnected( direct_buffer_info *info ); - void EnableDirectMode( bool enabled ); - - void * getGC() { return m_gc; } - -private: - -virtual void _ReservedGLView1(); -virtual void _ReservedGLView2(); -virtual void _ReservedGLView3(); -virtual void _ReservedGLView4(); -virtual void _ReservedGLView5(); -virtual void _ReservedGLView6(); -virtual void _ReservedGLView7(); -virtual void _ReservedGLView8(); - - BGLView(const BGLView &); - BGLView &operator=(const BGLView &); - - void dither_front(); - bool confirm_dither(); - void draw(BRect r); - - void * m_gc; - uint32 m_options; - uint32 m_ditherCount; - BLocker m_drawLock; - BLocker m_displayLock; - void * m_clip_info; - void * _Unused1; - - BBitmap * m_ditherMap; - BRect m_bounds; - int16 * m_errorBuffer[2]; - uint64 _reserved[8]; - - /* Direct Window stuff */ -private: - void drawScanline( int x1, int x2, int y, void *data ); -static void scanlineHandler(struct rasStateRec *state, GLint x1, GLint x2); - - void lock_draw(); - void unlock_draw(); - bool validateView(); -}; - - - -class BGLScreen : public BWindowScreen { -public: - BGLScreen(char *name, - ulong screenMode, ulong options, - status_t *error, bool debug=false); - ~BGLScreen(); - - void LockGL(); - void UnlockGL(); - void SwapBuffers(); - virtual void ErrorCallback(GLenum errorCode); - - virtual void ScreenConnected(bool connected); - virtual void FrameResized(float width, float height); - virtual status_t Perform(perform_code d, void *arg); - - /* The public methods below, for the moment, - are just pass-throughs to BWindowScreen */ - - virtual status_t Archive(BMessage *data, bool deep = true) const; - virtual void MessageReceived(BMessage *msg); - - virtual void Show(); - virtual void Hide(); - - virtual BHandler *ResolveSpecifier(BMessage *msg, - int32 index, - BMessage *specifier, - int32 form, - const char *property); - virtual status_t GetSupportedSuites(BMessage *data); - -private: - - virtual void _ReservedGLScreen1(); - virtual void _ReservedGLScreen2(); - virtual void _ReservedGLScreen3(); - virtual void _ReservedGLScreen4(); - virtual void _ReservedGLScreen5(); - virtual void _ReservedGLScreen6(); - virtual void _ReservedGLScreen7(); - virtual void _ReservedGLScreen8(); - - BGLScreen(const BGLScreen &); - BGLScreen &operator=(const BGLScreen &); - - void * m_gc; - long m_options; - BLocker m_drawLock; - - int32 m_colorSpace; - uint32 m_screen_mode; - - uint64 _reserved[7]; -}; - -#endif // __cplusplus - -#endif // BGLVIEW_H - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/mms-config. b/nx-X11/extras/Mesa_6.4.2/mms-config. deleted file mode 100644 index 6a960084b3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/mms-config. +++ /dev/null @@ -1,23 +0,0 @@ -# Makefile for VMS -# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl - - -#vms -.ifdef SHARE -GL_SHAR = libMesaGL.exe -GLU_SHAR = libMesaGLU.exe -GLUT_SHAR = libglut.exe -.endif -GL_LIB = libMesaGL.olb -GLU_LIB = libMesaGLU.olb -GLUT_LIB = libglut.olb -CC = cc -CXX = cxx/define=(LIBRARYBUILD=1)/assume=(nostdnew,noglobal_array_new) -CFLAGS1 = -MAKELIB = library/create -RANLIB = true -.ifdef SHARE -XLIBS = [--.vms]xlib_share/opt -.else -XLIBS = [--.vms]xlib/opt -.endif diff --git a/nx-X11/extras/Mesa_6.4.2/progs/Makefile b/nx-X11/extras/Mesa_6.4.2/progs/Makefile deleted file mode 100644 index 858d628c0a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# progs/Makefile - -TOP = .. - -include $(TOP)/configs/current - -SUBDIRS = $(PROGRAM_DIRS) - - -default: message subdirs - - -message: - @echo "Making programs for" $(CONFIG_NAME) - - -subdirs: - @for dir in $(SUBDIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir ; $(MAKE)) || exit 1 ; \ - fi \ - done - - -clean: - @for dir in $(SUBDIRS) tests ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir ; $(MAKE) clean) ; \ - fi \ - done diff --git a/nx-X11/extras/Mesa_6.4.2/progs/beos/GLInfo.cpp b/nx-X11/extras/Mesa_6.4.2/progs/beos/GLInfo.cpp deleted file mode 100644 index cfa8c83af8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/beos/GLInfo.cpp +++ /dev/null @@ -1,151 +0,0 @@ -// Small app to display GL infos - -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include - -#define GLUT_INFO 1 -#ifdef GLUT_INFO - #include -#endif - - -class GLInfoWindow : public BWindow -{ -public: - GLInfoWindow(BRect frame); - virtual bool QuitRequested() { be_app->PostMessage(B_QUIT_REQUESTED); return true; } - -private: - BGLView *gl; - BOutlineListView *list; - BScrollView *scroller; -}; - - -class GLInfoApp : public BApplication -{ -public: - GLInfoApp(); -private: - GLInfoWindow *window; -}; - - -GLInfoApp::GLInfoApp() - : BApplication("application/x-vnd.OBOS-GLInfo") -{ - window = new GLInfoWindow(BRect(50, 50, 350, 350)); -} - -GLInfoWindow::GLInfoWindow(BRect frame) - : BWindow(frame, "OpenGL Info", B_TITLED_WINDOW, 0) -{ - BRect r = Bounds(); - char *s; - BString l; - - // Add a outline list view - r.right -= B_V_SCROLL_BAR_WIDTH; - list = new BOutlineListView(r, "GLInfoList", B_SINGLE_SELECTION_LIST, B_FOLLOW_ALL_SIDES); - scroller = new BScrollView("GLInfoListScroller", list, B_FOLLOW_ALL_SIDES, - B_WILL_DRAW | B_FRAME_EVENTS, false, true); - - gl = new BGLView(r, "opengl", B_FOLLOW_ALL_SIDES, 0, BGL_RGB | BGL_DOUBLE); - gl->Hide(); - AddChild(gl); - AddChild(scroller); - - Show(); - - LockLooper(); - - // gl->LockGL(); - - list->AddItem(new BStringItem("OpenGL", 0)); - - s = (char *) glGetString(GL_VENDOR); - if (s) { - l = ""; l << "Vendor Name: " << s; - list->AddItem(new BStringItem(l.String(), 1)); - } - - s = (char *) glGetString(GL_VERSION); - if (s) { - l = ""; l << "Version: " << s; - list->AddItem(new BStringItem(l.String(), 1)); - } - - s = (char *) glGetString(GL_RENDERER); - if (s) { - l = ""; l << "Renderer Name: " << s; - list->AddItem(new BStringItem(l.String(), 1)); - } - - s = (char *) glGetString(GL_EXTENSIONS); - if (s) { - list->AddItem(new BStringItem("Extensions", 1)); - while (*s) { - char extname[255]; - int n = strcspn(s, " "); - strncpy(extname, s, n); - extname[n] = 0; - list->AddItem(new BStringItem(extname, 2)); - if (! s[n]) - break; - s += (n + 1); // next ! - } - } - - list->AddItem(new BStringItem("GLU", 0)); - s = (char *) gluGetString(GLU_VERSION); - if (s) { - l = ""; l << "Version: " << s; - list->AddItem(new BStringItem(l.String(), 1)); - } - - s = (char *) gluGetString(GLU_EXTENSIONS); - if (s) { - list->AddItem(new BStringItem("Extensions", 1)); - while (*s) { - char extname[255]; - int n = strcspn(s, " "); - strncpy(extname, s, n); - extname[n] = 0; - list->AddItem(new BStringItem(extname, 2)); - if (! s[n]) - break; - s += (n + 1); // next ! - } - } - -#ifdef GLUT_INFO - list->AddItem(new BStringItem("GLUT", 0)); - l = "API version: "; l << GLUT_API_VERSION; - list->AddItem(new BStringItem(l.String(), 1)); -#endif - - // gl->UnlockGL(); - - UnlockLooper(); -} - - - -int main(int argc, char *argv[]) -{ - GLInfoApp *app = new GLInfoApp; - app->Run(); - delete app; - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/beos/Makefile b/nx-X11/extras/Mesa_6.4.2/progs/beos/Makefile deleted file mode 100644 index 45782fb3cf..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/beos/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# progs/beos/Makefile - -TOP = ../.. -include $(TOP)/configs/current - -# Makefile for BeOS demos - -# Written by Brian Paul -# This file is in the public domain. -# -# Modified by Philippe Houdoin - -LDFLAGS += -soname=_APP_ $(APP_LIB_DEPS) - -INCLUDES = -I. -I- -I../../include - -default: demo sample GLInfo - -clean: - rm -f demo sample GLInfo - rm -f *.o - -demo: demo.o - $(LD) demo.o $(LDFLAGS) -o $@ - -sample: sample.o - $(LD) sample.o $(LDFLAGS) -o $@ - -GTLInfo: GLInfo.o - $(LD) GLInfo.o $(INCLUDES) $(LDFLAGS) -o $@ - -.cpp.o: - $(CC) -c $< $(INCLUDES) $(CFLAGS) -o $@ diff --git a/nx-X11/extras/Mesa_6.4.2/progs/beos/demo.cpp b/nx-X11/extras/Mesa_6.4.2/progs/beos/demo.cpp deleted file mode 100644 index 6b0b9576d6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/beos/demo.cpp +++ /dev/null @@ -1,147 +0,0 @@ -// $Id: demo.cpp,v 1.2 2004/08/14 09:59:16 phoudoin Exp $ - -// Simple BeOS GLView demo -// Written by Brian Paul -// Changes by Philippe Houdoin -// This file is in the public domain. - - - -#include -#include -#include -#include - -class MyGL : public BGLView -{ -public: - MyGL(BRect rect, char *name, ulong options); - - virtual void AttachedToWindow(); - virtual void Pulse(); - virtual void FrameResized(float w, float h); - -private: - void Render(); - void Reshape(float w, float h); - float mAngle; -}; - - -class MyWindow : public BWindow -{ -public: - MyWindow(BRect frame); - virtual bool QuitRequested(); -}; - - -MyWindow::MyWindow(BRect frame) - : BWindow(frame, "demo", B_TITLED_WINDOW, B_NOT_ZOOMABLE) -{ - // Make OpenGL view and put it in the window - BRect r = Bounds(); - r.InsetBy(5, 5); - - MyGL *gl = new MyGL(r, "GL", BGL_RGB | BGL_DOUBLE); - AddChild(gl); - SetPulseRate(1000000 / 30); -} - -bool MyWindow::QuitRequested() -{ - be_app->PostMessage(B_QUIT_REQUESTED); - return true; -} - - - -MyGL::MyGL(BRect rect, char *name, ulong options) - : BGLView(rect, name, B_FOLLOW_ALL_SIDES, B_PULSE_NEEDED, options) -{ - mAngle = 0.0; -} - - -void MyGL::AttachedToWindow() -{ - BGLView::AttachedToWindow(); - - LockGL(); - glClearColor(0.7, 0.7, 0, 0); - Reshape(Bounds().Width(), Bounds().Height()); - UnlockGL(); -} - - -void MyGL::FrameResized(float w, float h) -{ - BGLView::FrameResized(w, h); - - LockGL(); - Reshape(w, h); - UnlockGL(); - - Render(); -} - - -void MyGL::Pulse() -{ - mAngle += 1.0; - Render(); -} - - -void MyGL::Render() -{ - LockGL(); - - glClear(GL_COLOR_BUFFER_BIT); - - glPushMatrix(); - - glRotated(mAngle, 0, 0, 1); - glColor3f(0, 0, 1); - - glBegin(GL_POLYGON); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - glPopMatrix(); - - SwapBuffers(); - - UnlockGL(); -} - - -void MyGL::Reshape(float w, float h) -{ - glViewport(0, 0, (int) (w + 1), (int) (h + 1)); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1, 1, -1, 1, 10, 30); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0, 0, -18); -} - - -int main(int argc, char *argv[]) -{ - BApplication *app = new BApplication("application/demo"); - - // make top-level window - MyWindow *win = new MyWindow(BRect(100, 100, 500, 500)); - win->Show(); - - app->Run(); - - delete app; - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/beos/sample.cpp b/nx-X11/extras/Mesa_6.4.2/progs/beos/sample.cpp deleted file mode 100644 index a86a118747..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/beos/sample.cpp +++ /dev/null @@ -1,225 +0,0 @@ -// sample BGLView app from the Be Book - - -#include -#include -#include -#include - - -class SampleGLView : public BGLView -{ -public: - SampleGLView(BRect frame, uint32 type); - virtual void AttachedToWindow(void); - virtual void FrameResized(float newWidth, float newHeight); - virtual void ErrorCallback(GLenum which); - - void Render(void); - -private: - void gInit(void); - void gDraw(void); - void gReshape(int width, int height); - - float width; - float height; -}; - - - -class SampleGLWindow : public BWindow -{ -public: - SampleGLWindow(BRect frame, uint32 type); - virtual bool QuitRequested() { be_app->PostMessage(B_QUIT_REQUESTED); return true; } - -private: - SampleGLView *theView; -}; - - -class SampleGLApp : public BApplication -{ -public: - SampleGLApp(); -private: - SampleGLWindow *theWindow; -}; - - -SampleGLApp::SampleGLApp() - : BApplication("application/x-vnd.sample") -{ - BRect windowRect; - uint32 type = BGL_RGB|BGL_DOUBLE; - - windowRect.Set(50, 50, 350, 350); - - theWindow = new SampleGLWindow(windowRect, type); -} - - - -SampleGLWindow::SampleGLWindow(BRect frame, uint32 type) - : BWindow(frame, "OpenGL Test", B_TITLED_WINDOW, 0) -{ - theView = new SampleGLView(Bounds(), type); - AddChild(theView); - Show(); - theView->Render(); -} - - - -SampleGLView::SampleGLView(BRect frame, uint32 type) - : BGLView(frame, "SampleGLView", B_FOLLOW_ALL_SIDES, 0, type) -{ - width = frame.right-frame.left; - height = frame.bottom-frame.top; -} - - -void SampleGLView::AttachedToWindow(void) -{ - LockGL(); - BGLView::AttachedToWindow(); - gInit(); - gReshape(width, height); - UnlockGL(); -} - - -void SampleGLView::FrameResized(float newWidth, float newHeight) -{ - BGLView::FrameResized(newWidth, newHeight); - - LockGL(); - - width = newWidth; - height = newHeight; - - gReshape(width,height); - - UnlockGL(); - Render(); -} - - -void SampleGLView::ErrorCallback(GLenum whichError) -{ -// fprintf(stderr, "Unexpected error occured (%d):\\n", whichError); -// fprintf(stderr, " %s\\n", gluErrorString(whichError)); -} - - - -// globals -GLenum use_stipple_mode; // GL_TRUE to use dashed lines -GLenum use_smooth_mode; // GL_TRUE to use anti-aliased lines -GLint linesize; // Line width -GLint pointsize; // Point diameter - -float pntA[3] = { - -160.0, 0.0, 0.0 -}; -float pntB[3] = { - -130.0, 0.0, 0.0 -}; - - - -void SampleGLView::gInit(void) -{ - glClearColor(0.0, 0.0, 0.0, 0.0); - glLineStipple(1, 0xF0E0); - glBlendFunc(GL_SRC_ALPHA, GL_ONE); - use_stipple_mode = GL_FALSE; - use_smooth_mode = GL_TRUE; - linesize = 2; - pointsize = 6; -} - - - -void SampleGLView::gDraw(void) -{ - GLint i; - - glClear(GL_COLOR_BUFFER_BIT); - glLineWidth(linesize); - -/* - - if (use_stipple_mode) { - glEnable(GL_LINE_STIPPLE); - } else { - glDisable(GL_LINE_STIPPLE); - } -*/ - - glDisable(GL_POINT_SMOOTH); - - - glPushMatrix(); - - glPointSize(pointsize); // Set size for point - - for (i = 0; i < 360; i += 5) { - glRotatef(5.0, 0,0,1); // Rotate right 5 degrees - - if (use_smooth_mode) { - glEnable(GL_LINE_SMOOTH); - glEnable(GL_BLEND); - } else { - glDisable(GL_LINE_SMOOTH); - glDisable(GL_BLEND); - } - - glColor3f(1.0, 1.0, 0.0); // Set color for line - glBegin(GL_LINE_STRIP); // And create the line - glVertex3fv(pntA); - glVertex3fv(pntB); - glEnd(); - - glDisable(GL_POINT_SMOOTH); - glDisable(GL_BLEND); - - glColor3f(0.0, 1.0, 0.0); // Set color for point - glBegin(GL_POINTS); - glVertex3fv(pntA); // Draw point at one end - glVertex3fv(pntB); // Draw point at other end - glEnd(); - } - - glPopMatrix(); // Done with matrix -} - - -void SampleGLView::gReshape(int width, int height) -{ - glViewport(0, 0, width, height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-175, 175, -175, 175, -1, 1); - glMatrixMode(GL_MODELVIEW); -} - - -void SampleGLView::Render(void) -{ - LockGL(); - gDraw(); - SwapBuffers(); - UnlockGL(); -} - - - -int main(int argc, char *argv[]) -{ - SampleGLApp *app = new SampleGLApp; - app->Run(); - delete app; - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/.cvsignore b/nx-X11/extras/Mesa_6.4.2/progs/demos/.cvsignore deleted file mode 100644 index 2b8a225129..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/.cvsignore +++ /dev/null @@ -1,46 +0,0 @@ -.cvsignore -arbfplight -arbocclude -bounce -clearspd -cubemap -drawpix -fire -fplight -gamma -gears -geartrain -glinfo -gloss -gltestperf -glutfx -ipers -isosurf -lodbias -morph3d -multiarb -occlude -osdemo -paltex -pixeltex -pointblast -ray -readpix -readtex.c -readtex.h -reflect -renormal -shadowtex -spectex -stex3d -teapot -terrain -tessdemo -texcyl -texdown -texenv -texobj -trispd -tunnel -tunnel2 -winpos diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Makefile b/nx-X11/extras/Mesa_6.4.2/progs/demos/Makefile deleted file mode 100644 index 4bd72d8a5c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Makefile +++ /dev/null @@ -1,115 +0,0 @@ -# progs/demos/Makefile - -TOP = ../.. -include $(TOP)/configs/current - -INCDIR = $(TOP)/include - -OSMESA_LIBS = -L$(LIB_DIR) -lglut -lOSMesa -lGLU -lGL $(APP_LIB_DEPS) - -OSMESA16_LIBS = -L$(LIB_DIR) -lglut -lOSMesa16 -lGLU -lGL $(APP_LIB_DEPS) - -OSMESA32_LIBS = -L$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS) - -LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(GLU_LIB_NAME) $(LIB_DIR)/$(GLUT_LIB_NAME) - -PROGS = \ - arbfplight \ - arbocclude \ - bounce \ - clearspd \ - cubemap \ - drawpix \ - fire \ - fogcoord \ - fplight \ - gamma \ - gears \ - geartrain \ - glinfo \ - gloss \ - gltestperf \ - glutfx \ - isosurf \ - ipers \ - lodbias \ - morph3d \ - multiarb \ - occlude \ - paltex \ - pixeltex \ - pointblast \ - ray \ - readpix \ - reflect \ - renormal \ - shadowtex \ - spectex \ - spriteblast \ - stex3d \ - teapot \ - terrain \ - tessdemo \ - texcyl \ - texdown \ - texenv \ - texobj \ - trispd \ - tunnel \ - tunnel2 \ - winpos - - -##### RULES ##### - -.SUFFIXES: -.SUFFIXES: .c - - -# make executable from .c file: -.c: $(LIB_DEP) readtex.o - $(CC) -I$(INCDIR) $(CFLAGS) $< readtex.o $(APP_LIB_DEPS) -o $@ - - -##### TARGETS ##### - -default: readtex.o $(PROGS) - - -readtex.c: $(TOP)/progs/util/readtex.c - cp $< . - -readtex.h: $(TOP)/progs/util/readtex.h - cp $< . - -readtex.o: readtex.c readtex.h - $(CC) -c -I$(INCDIR) $(CFLAGS) readtex.c - - -showbuffer.c: $(TOP)/progs/util/showbuffer.c - cp $< . - -showbuffer.h: $(TOP)/progs/util/showbuffer.h - cp $< . - -showbuffer.o: showbuffer.c showbuffer.h - $(CC) -c -I$(INCDIR) $(CFLAGS) showbuffer.c - - -reflect: reflect.o showbuffer.o readtex.o - $(CC) -I$(INCDIR) $(CFLAGS) reflect.o showbuffer.o readtex.o $(APP_LIB_DEPS) -o $@ - -reflect.o: reflect.c showbuffer.h - $(CC) -c -I$(INCDIR) $(CFLAGS) reflect.c - - -shadowtex: shadowtex.o showbuffer.o - $(CC) -I$(INCDIR) $(CFLAGS) shadowtex.o showbuffer.o $(APP_LIB_DEPS) -o $@ - -shadowtex.o: shadowtex.c showbuffer.h - $(CC) -c -I$(INCDIR) $(CFLAGS) shadowtex.c - -clean: - -rm -f $(PROGS) - -rm -f *.o *~ - -rm -f readtex.[ch] showbuffer.[ch] diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Makefile.cygnus b/nx-X11/extras/Mesa_6.4.2/progs/demos/Makefile.cygnus deleted file mode 100644 index 0efc1ab0c9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Makefile.cygnus +++ /dev/null @@ -1,87 +0,0 @@ - -# Mesa 3-D graphics library -# Version: 3.3 -# Copyright (C) 1995-2000 Brian Paul - - -# Makefile for demo programs for cygnus -# Stephane Rehel (rehel@worldnet.fr) April 13 1997 - - - -##### MACROS ##### - -INCDIR = ../include -LIBDIR = ../lib - -GL_LIBS = -L$(LIBDIR) -lglut -lMesaGLU -lMesaGL -lm $(WLIBS) - -LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLUT_LIB) - -PROGS = bounce \ - clearspd \ - cubemap \ - drawpix \ - fire \ - gamma \ - gears \ - geartrain \ - glinfo \ - gloss \ - gltestperf \ - glutfx \ - isosurf \ - ipers \ - lodbias \ - morph3d \ - multiarb \ - occlude \ - osdemo \ - paltex \ - pixeltex \ - pointblast \ - ray \ - readpix \ - reflect \ - renormal \ - spectex \ - stex3d \ - teapot \ - terrain \ - tessdemo \ - texcyl \ - texdown \ - texenv \ - texobj \ - trispd \ - tunnel \ - tunnel2 \ - winpos - - -##### RULES ##### - -.SUFFIXES: -.SUFFIXES: .c - -.c: $(LIB_DEP) - $(CC) -I$(INCDIR) -I../util $(CFLAGS) $< $(GL_LIBS) -o $@ - - -##### TARGETS ##### - -default: - @echo "Specify a target configuration" - -clean: - -rm *.o *~ - -realclean: - -rm $(PROGS:=.exe) - -rm *.o *~ - -targets: $(PROGS) - -include ../Make-config - - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/README b/nx-X11/extras/Mesa_6.4.2/progs/demos/README deleted file mode 100644 index a3d0c18bb9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/README +++ /dev/null @@ -1,230 +0,0 @@ -INTRODUCTION ------------- - -This directory is usually included in the Mesa demos distribution or -in the GLUT distribution. - -I have written the demos included in this directory mainly for showing -the capabilities of the Mesa library when using the Voodoo driver. -However all the demos are written using the GLUT and OpenGL so they -work with any GLUT/OpenGL platform (tested: Linux+Mesa+Voodoo driver, -Linux+Mesa+X11 driver, Win95+Mesa+Voodoo driver and SGI Onyx IR thanks -to Mark Kilgard). - -All the demos make an heavy use of texture mapping, blending, etc. so -you _need_ some kind of hardware support for the OpenGL otherwise they -will run at ~1fps. You need also a OpenGL 1.1 compliant library. - -You can find some screenshot of these demos at -http://www-hmw.caribel.pisa.it/fxmesa/fxdemos.hmtl - -Write me if you find some bug in the demos. - -David Bucciarelli (tech.hmw@plus.it) - -Humanware s.r.l. -Via XXIV Maggio 62 -Pisa, Italy -Tel./Fax +39-50-554108 -email: info.hmw@plus.it -www: www-hmw.caribel.pisa.it - - -A BRIEF DESCRIPTION OF THE DEMOS --------------------------------- - - -IPERS ------ - -Sources: ipers.c image.c - -A nice spinning fractal object. - - -RAY ---- - -Sources: ray.c - -I'm using ray tracing to dynamically generate texture maps with -specular, diffuse, shadows, and mirror colors. Each frame the texture -maps of the plane and of the sphere are partially updated. With this -technique you can obtain true mirrors, shadows, specular highlights, -bump mapping, etc. in realtime. This demo is really CPU intensive -(~25fps on a PentiumII@300MHz with a Pure3D). Support on-the-fly -switching between fullscreen and in-window rendering under Linux/Mesa -(start your X server in 16 bpp mode and press the spacebar). - - -TUNNEL ------- - -Sources: tunnel.c image.c sources.c -Data: bw.rgb tile.rgb - -The model was designed and prelighted with Alias|Wavefront -PowerAnimator V8. Triangle strips were built with a tool written by me -and then statically included in the sources. This demo doesn't -require the ZBuffer and use antialiased polygons. Support on-the-fly -switching between fullscreen and in-window rendering under Linux/Mesa -(start your X server in 16 bpp mode and press the spacebar). - - -TUNNEL2 ------- - -Sources: tunnel2.c image.c sources.c -Data: bw.rgb tile.rgb - -The some tunnel demo but with two output channels. A nice -example of the Mesa/Voodoo support for multiple boards in -the some PC. - - -TEAPOT ------- - -Sources: teapot.c image.c dteapot.c shadow.c -Data: bw.rgb tile.rgb - -The shadow is drawn projecting the teapot geometry over the plane. All -other light effects are drawn using the standard OpenGL capabilities. -Support on-the-fly switching between fullscreen and in-window -rendering under Linux/Mesa (start your X server in 16 bpp mode and -press the spacebar). - - -FIRE ----- - -Sources: fire.c image.c -Data: s128.rgb tree2.rgb - -The demo use a small particle system to draw some nice visual effect. -You can interactively change many parameters of the particle system -and you can choose the number of particles at the startup ('fire -4000'). This demo should be called fountain. Support on-the-fly -switching between fullscreen and in-window rendering under Linux/Mesa -(start your X server in 16 bpp mode and press the spacebar). - - -TERRAIN -------- - -Sources: mesaland.c - -This demo is base on another demo written by Mikael SkiZoWalker. I -have added the capabilities to freely fly around, view culling and -some nice color. Support on-the-fly switching between fullscreen and -in-window rendering under Linux/Mesa (start your X server in 16 bpp -mode and press the spacebar). - - -GLTEST ------- - -Sources: gltest.c - -This is a simple benchmark suite that I'm using in the development of -the Mesa/Voodoo driver. Type 'gltest >my.res' and you will get some -data about the performances of your OpenGL. Follow the results with my -PC (Linux+Mesa-2.6+PentiumII@300MHz+Pure3D): - -Simple Points -587900.080674 Pnts/sec - -Smooth Lines -SIZE=480 => 39007.426183 Lins/sec -SIZE=250 => 74575.016485 Lins/sec -SIZE=100 => 179734.882409 Lins/sec -SIZE=050 => 183987.795297 Lins/sec -SIZE=025 => 183820.086309 Lins/sec - - -ZSmooth Triangles -SIZE=480 => 784.954997 Tris/sec -SIZE=250 => 2862.325889 Tris/sec -SIZE=100 => 17779.492938 Tris/sec -SIZE=050 => 159339.829844 Tris/sec -SIZE=025 => 428602.984008 Tris/sec - - -ZSmooth Tex Blend Triangles -SIZE=480 => 784.473931 Tris/sec -SIZE=250 => 2853.781513 Tris/sec -SIZE=100 => 17598.252146 Tris/sec -SIZE=050 => 152632.578337 Tris/sec -SIZE=025 => 377584.760048 Tris/sec - - -ZSmooth Tex Blend TMesh Triangles -SIZE=400 => 563.900695 Tris/sec, MPixel Fill/sec: 45.112056 -SIZE=250 => 1449.777225 Tris/sec, MPixel Fill/sec: 45.305538 -SIZE=100 => 8702.869121 Tris/sec, MPixel Fill/sec: 43.514346 -SIZE=050 => 31896.867466 Tris/sec, MPixel Fill/sec: 39.871084 -SIZE=025 => 114037.262894 Tris/sec, MPixel Fill/sec: 35.636645 -SIZE=010 => 220494.235839 Tris/sec, MPixel Fill/sec: 11.024712 -SIZE=005 => 225615.506651 Tris/sec, MPixel Fill/sec: 2.820194 -SIZE=002 => 225607.681439 Tris/sec, MPixel Fill/sec: 0.451215 - - -Color/Depth Buffer Clears -295.042474 Clrs/sec, MPixel Fill/sec: 90.553256 - - -Follow the results with my -PC (Linux+Mesa-3.0beta5+PentiumII@300MHz+Voodoo2): - - -Simple Points -1620113.525130 Pnts/sec - -Smooth Lines -SIZE=480 => 73841.166065 Lins/sec -SIZE=250 => 140794.035316 Lins/sec -SIZE=100 => 344185.242157 Lins/sec -SIZE=050 => 420399.008289 Lins/sec -SIZE=025 => 420261.389773 Lins/sec - - -ZSmooth Triangles -SIZE=480 => 1434.668506 Tris/sec -SIZE=250 => 5228.449614 Tris/sec -SIZE=100 => 46603.815842 Tris/sec -SIZE=050 => 325757.045961 Tris/sec -SIZE=025 => 589022.403336 Tris/sec - - -ZSmooth Tex Blend Triangles -SIZE=480 => 1414.900041 Tris/sec -SIZE=250 => 5006.055235 Tris/sec -SIZE=100 => 43602.252031 Tris/sec -SIZE=050 => 303497.092692 Tris/sec -SIZE=025 => 517087.428669 Tris/sec - - -ZSmooth Tex Blend TMesh Triangles -SIZE=400 => 1023.273112 Tris/sec, MPixel Fill/sec: 81.861849 -SIZE=250 => 2595.692121 Tris/sec, MPixel Fill/sec: 81.115379 -SIZE=100 => 15788.198912 Tris/sec, MPixel Fill/sec: 78.940995 -SIZE=050 => 58784.121300 Tris/sec, MPixel Fill/sec: 73.480152 -SIZE=025 => 244233.873481 Tris/sec, MPixel Fill/sec: 76.323085 -SIZE=010 => 474995.004191 Tris/sec, MPixel Fill/sec: 23.749750 -SIZE=005 => 475124.354163 Tris/sec, MPixel Fill/sec: 5.939054 -SIZE=002 => 474959.089503 Tris/sec, MPixel Fill/sec: 0.949918 - - -Color/Depth Buffer Clears -478.654830 Clrs/sec, MPixel Fill/sec: 146.906826 - - -PALTEX and GLBPALTX -------------------- - -Sources: paltex.c and glbpaltx.c - -The PALTEX example was written by Brian Paul and it shows the -capabilities of the GL_EXT_paletted_texture extension. I have written -the other example in order to show the capabilities of the -gl3DfxSetPaletteEXT() (it used only by GLQuake and Quake2). diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/all.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/all.dsp deleted file mode 100644 index b47283c588..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/all.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="all" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Application" 0x0101 - -CFG=all - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "all.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "all.mak" CFG="all - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "all - Win32 Release" (based on "Win32 (x86) Application") -!MESSAGE "all - Win32 Debug" (based on "Win32 (x86) Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "all - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 - -!ELSEIF "$(CFG)" == "all - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "all - Win32 Release" -# Name "all - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/bounce.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/bounce.dsp deleted file mode 100644 index 0510e77d99..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/bounce.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="bounce" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=bounce - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "bounce.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "bounce.mak" CFG="bounce - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "bounce - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "bounce - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "bounce - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../bounce.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "bounce - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../bounce.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "bounce - Win32 Release" -# Name "bounce - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\bounce.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/clearspd.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/clearspd.dsp deleted file mode 100644 index 440c7ae64e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/clearspd.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="clearspd" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=clearspd - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "clearspd.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "clearspd.mak" CFG="clearspd - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "clearspd - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "clearspd - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "clearspd - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../clearspd.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "clearspd - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../clearspd.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "clearspd - Win32 Release" -# Name "clearspd - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\clearspd.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/cubemap.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/cubemap.dsp deleted file mode 100644 index 220a3a0df6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/cubemap.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="cubemap" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=cubemap - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "cubemap.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "cubemap.mak" CFG="cubemap - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "cubemap - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "cubemap - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "cubemap - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../cubemap.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "cubemap - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../cubemap.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "cubemap - Win32 Release" -# Name "cubemap - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\cubemap.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/demos.dsw b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/demos.dsw deleted file mode 100644 index 2d6f629e07..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/demos.dsw +++ /dev/null @@ -1,782 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "all"=".\all.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name bounce - End Project Dependency - Begin Project Dependency - Project_Dep_Name clearspd - End Project Dependency - Begin Project Dependency - Project_Dep_Name cubemap - End Project Dependency - Begin Project Dependency - Project_Dep_Name drawpix - End Project Dependency - Begin Project Dependency - Project_Dep_Name fire - End Project Dependency - Begin Project Dependency - Project_Dep_Name gears - End Project Dependency - Begin Project Dependency - Project_Dep_Name geartrain - End Project Dependency - Begin Project Dependency - Project_Dep_Name glinfo - End Project Dependency - Begin Project Dependency - Project_Dep_Name gloss - End Project Dependency - Begin Project Dependency - Project_Dep_Name gltestperf - End Project Dependency - Begin Project Dependency - Project_Dep_Name glutfx - End Project Dependency - Begin Project Dependency - Project_Dep_Name ipers - End Project Dependency - Begin Project Dependency - Project_Dep_Name isosurf - End Project Dependency - Begin Project Dependency - Project_Dep_Name lodbias - End Project Dependency - Begin Project Dependency - Project_Dep_Name morph3d - End Project Dependency - Begin Project Dependency - Project_Dep_Name multiarb - End Project Dependency - Begin Project Dependency - Project_Dep_Name occlude - End Project Dependency - Begin Project Dependency - Project_Dep_Name osdemo - End Project Dependency - Begin Project Dependency - Project_Dep_Name paltex - End Project Dependency - Begin Project Dependency - Project_Dep_Name pixeltex - End Project Dependency - Begin Project Dependency - Project_Dep_Name pointblast - End Project Dependency - Begin Project Dependency - Project_Dep_Name rain - End Project Dependency - Begin Project Dependency - Project_Dep_Name ray - End Project Dependency - Begin Project Dependency - Project_Dep_Name readpix - End Project Dependency - Begin Project Dependency - Project_Dep_Name reflect - End Project Dependency - Begin Project Dependency - Project_Dep_Name renormal - End Project Dependency - Begin Project Dependency - Project_Dep_Name shadowtex - End Project Dependency - Begin Project Dependency - Project_Dep_Name spectex - End Project Dependency - Begin Project Dependency - Project_Dep_Name stex3d - End Project Dependency - Begin Project Dependency - Project_Dep_Name teapot - End Project Dependency - Begin Project Dependency - Project_Dep_Name terrain - End Project Dependency - Begin Project Dependency - Project_Dep_Name tessdemo - End Project Dependency - Begin Project Dependency - Project_Dep_Name texcyl - End Project Dependency - Begin Project Dependency - Project_Dep_Name texdown - End Project Dependency - Begin Project Dependency - Project_Dep_Name texenv - End Project Dependency - Begin Project Dependency - Project_Dep_Name texobj - End Project Dependency - Begin Project Dependency - Project_Dep_Name trispd - End Project Dependency - Begin Project Dependency - Project_Dep_Name tunnel - End Project Dependency - Begin Project Dependency - Project_Dep_Name tunnel2 - End Project Dependency - Begin Project Dependency - Project_Dep_Name winpos - End Project Dependency - Begin Project Dependency - Project_Dep_Name spriteblast - End Project Dependency - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "bounce"=".\bounce.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "clearspd"=".\clearspd.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "cubemap"=".\cubemap.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "drawpix"=".\drawpix.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "fire"=".\fire.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "gears"=".\gears.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "geartrain"=".\geartrain.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "glinfo"=".\glinfo.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "gloss"=".\gloss.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "gltestperf"=".\gltestperf.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "glut"="..\..\..\src\glut\glx\glut.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "glutfx"=".\glutfx.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "ipers"=".\ipers.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "isosurf"=".\isosurf.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "lodbias"=".\loadbias.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "morph3d"=".\morph3d.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "multiarb"=".\multiarb.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "occlude"=".\occlude.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "osdemo"=".\osdemo.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "paltex"=".\paltex.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "pixeltex"=".\pixeltex.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "pointblast"=".\pointblast.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "rain"=".\rain.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "ray"=".\ray.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "readpix"=".\readpix.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "reflect"=".\reflect.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "renormal"=".\renormal.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "shadowtex"=".\shadowtex.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "spectex"=".\spectex.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "spriteblast"=".\spriteblast.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "stex3d"=".\stex3d.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "teapot"=".\teapot.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "terrain"=".\terrain.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "tessdemo"=".\tessdemo.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "texcyl"=".\texcyl.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "texdown"=".\texdown.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "texenv"=".\texenv.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "texobj"=".\texobj.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "trispd"=".\trispd.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "tunnel"=".\tunnel.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "tunnel2"=".\tunnel2.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Project: "winpos"=".\winpos.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name glut - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/drawpix.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/drawpix.dsp deleted file mode 100644 index 57003e616b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/drawpix.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="drawpix" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=drawpix - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "drawpix.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "drawpix.mak" CFG="drawpix - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "drawpix - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "drawpix - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "drawpix - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../../../include" /I "../../util" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../drawpix.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "drawpix - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../drawpix.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "drawpix - Win32 Release" -# Name "drawpix - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\drawpix.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/fire.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/fire.dsp deleted file mode 100644 index f8a536d334..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/fire.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="fire" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=fire - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "fire.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "fire.mak" CFG="fire - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "fire - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "fire - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "fire - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../fire.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "fire - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../fire.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "fire - Win32 Release" -# Name "fire - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\fire.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/gears.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/gears.dsp deleted file mode 100644 index 43a588dc68..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/gears.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="gears" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=gears - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "gears.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "gears.mak" CFG="gears - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "gears - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "gears - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "gears - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../gears.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "gears - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../gears.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "gears - Win32 Release" -# Name "gears - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\gears.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/geartrain.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/geartrain.dsp deleted file mode 100644 index 8dee77de4d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/geartrain.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="geartrain" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=geartrain - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "geartrain.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "geartrain.mak" CFG="geartrain - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "geartrain - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "geartrain - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "geartrain - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../geartrain.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "geartrain - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../geartrain.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "geartrain - Win32 Release" -# Name "geartrain - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\geartrain.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/glinfo.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/glinfo.dsp deleted file mode 100644 index d9d61eb424..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/glinfo.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="glinfo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=glinfo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "glinfo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "glinfo.mak" CFG="glinfo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "glinfo - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "glinfo - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "glinfo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../glinfo.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "glinfo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../glinfo.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "glinfo - Win32 Release" -# Name "glinfo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\glinfo.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/gloss.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/gloss.dsp deleted file mode 100644 index 402d291f4d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/gloss.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="gloss" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=gloss - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "gloss.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "gloss.mak" CFG="gloss - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "gloss - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "gloss - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "gloss - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../gloss.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "gloss - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../gloss.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "gloss - Win32 Release" -# Name "gloss - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\gloss.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/gltestperf.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/gltestperf.dsp deleted file mode 100644 index e506620152..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/gltestperf.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="gltestperf" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=gltestperf - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "gltestperf.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "gltestperf.mak" CFG="gltestperf - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "gltestperf - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "gltestperf - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "gltestperf - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../gltestperf.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "gltestperf - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../gltestperf.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "gltestperf - Win32 Release" -# Name "gltestperf - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\gltestperf.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/glutfx.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/glutfx.dsp deleted file mode 100644 index 90eca930d2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/glutfx.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="glutfx" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=glutfx - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "glutfx.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "glutfx.mak" CFG="glutfx - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "glutfx - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "glutfx - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "glutfx - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../glutfx.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "glutfx - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../glutfx.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "glutfx - Win32 Release" -# Name "glutfx - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\glutfx.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/ipers.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/ipers.dsp deleted file mode 100644 index 430f1b6258..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/ipers.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="ipers" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=ipers - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ipers.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ipers.mak" CFG="ipers - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ipers - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "ipers - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "ipers - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../ipers.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "ipers - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../ipers.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "ipers - Win32 Release" -# Name "ipers - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\ipers.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/isosurf.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/isosurf.dsp deleted file mode 100644 index 1c59d40081..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/isosurf.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="isosurf" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=isosurf - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "isosurf.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "isosurf.mak" CFG="isosurf - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "isosurf - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "isosurf - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "isosurf - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../isosurf.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "isosurf - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../isosurf.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "isosurf - Win32 Release" -# Name "isosurf - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\isosurf.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/loadbias.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/loadbias.dsp deleted file mode 100644 index ed51960e49..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/loadbias.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="lodbias" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=lodbias - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "lodbias.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "lodbias.mak" CFG="lodbias - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "lodbias - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "lodbias - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "lodbias - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../lodbias.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "lodbias - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../lodbias.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "lodbias - Win32 Release" -# Name "lodbias - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\lodbias.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/morph3d.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/morph3d.dsp deleted file mode 100644 index 247dbf03d7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/morph3d.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="morph3d" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=morph3d - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "morph3d.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "morph3d.mak" CFG="morph3d - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "morph3d - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "morph3d - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "morph3d - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../morph3d.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "morph3d - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../morph3d.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "morph3d - Win32 Release" -# Name "morph3d - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\morph3d.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/multiarb.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/multiarb.dsp deleted file mode 100644 index 57c32deb29..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/multiarb.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="multiarb" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=multiarb - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "multiarb.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "multiarb.mak" CFG="multiarb - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "multiarb - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "multiarb - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "multiarb - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../multiarb.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "multiarb - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../multiarb.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "multiarb - Win32 Release" -# Name "multiarb - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\multiarb.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/occlude.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/occlude.dsp deleted file mode 100644 index ca4afa579e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/occlude.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="occlude" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=occlude - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "occlude.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "occlude.mak" CFG="occlude - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "occlude - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "occlude - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "occlude - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../occlude.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "occlude - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../occlude.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "occlude - Win32 Release" -# Name "occlude - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\occlude.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/osdemo.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/osdemo.dsp deleted file mode 100644 index ccaa6d2b42..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/osdemo.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="osdemo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=osdemo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "osdemo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "osdemo.mak" CFG="osdemo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "osdemo - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "osdemo - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "osdemo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB ../../../lib/OSMESA32.LIB /nologo /subsystem:console /machine:I386 /out:"../osdemo.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "osdemo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB ../../../lib/OSMESA32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../osdemo.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "osdemo - Win32 Release" -# Name "osdemo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\osdemo.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/paltex.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/paltex.dsp deleted file mode 100644 index efc6384211..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/paltex.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="paltex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=paltex - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "paltex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "paltex.mak" CFG="paltex - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "paltex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "paltex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "paltex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../paltex.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "paltex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../paltex.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "paltex - Win32 Release" -# Name "paltex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\paltex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/pixeltex.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/pixeltex.dsp deleted file mode 100644 index d09f9f312c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/pixeltex.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="pixeltex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=pixeltex - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "pixeltex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "pixeltex.mak" CFG="pixeltex - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "pixeltex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "pixeltex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "pixeltex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../pixeltex.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "pixeltex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../pixeltex.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "pixeltex - Win32 Release" -# Name "pixeltex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\pixeltex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/pointblast.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/pointblast.dsp deleted file mode 100644 index 7be695839f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/pointblast.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="pointblast" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=pointblast - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "pointblast.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "pointblast.mak" CFG="pointblast - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "pointblast - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "pointblast - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "pointblast - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../pointblast.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "pointblast - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../pointblast.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "pointblast - Win32 Release" -# Name "pointblast - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\pointblast.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/rain.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/rain.dsp deleted file mode 100644 index 7e380e66aa..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/rain.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="rain" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=rain - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "rain.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "rain.mak" CFG="rain - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "rain - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "rain - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "rain - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../rain.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "rain - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../rain.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "rain - Win32 Release" -# Name "rain - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\rain.cxx -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/ray.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/ray.dsp deleted file mode 100644 index dfa26e7755..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/ray.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="ray" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=ray - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ray.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ray.mak" CFG="ray - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ray - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "ray - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "ray - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../ray.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "ray - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../ray.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "ray - Win32 Release" -# Name "ray - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\ray.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/readpix.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/readpix.dsp deleted file mode 100644 index 8097d10625..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/readpix.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="readpix" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=readpix - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "readpix.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "readpix.mak" CFG="readpix - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "readpix - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "readpix - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "readpix - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../readpix.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "readpix - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../readpix.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "readpix - Win32 Release" -# Name "readpix - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\readpix.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/reflect.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/reflect.dsp deleted file mode 100644 index fa09700afe..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/reflect.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="reflect" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=reflect - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "reflect.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "reflect.mak" CFG="reflect - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "reflect - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "reflect - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "reflect - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../reflect.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "reflect - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../reflect.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "reflect - Win32 Release" -# Name "reflect - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\reflect.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/renormal.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/renormal.dsp deleted file mode 100644 index 4d72e88d8e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/renormal.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="renormal" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=renormal - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "renormal.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "renormal.mak" CFG="bounce - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "renormal - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "renormal - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "renormal - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../renormal.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "renormal - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../renormal.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "renormal - Win32 Release" -# Name "renormal - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\renormal.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/shadowtex.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/shadowtex.dsp deleted file mode 100644 index 419ec24138..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/shadowtex.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="shadowtex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=shadowtex - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "shadowtex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "shadowtex.mak" CFG="bounce - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "shadowtex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "shadowtex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "shadowtex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../shadowtex.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "shadowtex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../shadowtex.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "shadowtex - Win32 Release" -# Name "shadowtex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\shadowtex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/spectex.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/spectex.dsp deleted file mode 100644 index d1960b3d13..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/spectex.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="spectex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=spectex - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "spectex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "spectex.mak" CFG="bounce - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "spectex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "spectex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "spectex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../spectex.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "spectex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../spectex.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "spectex - Win32 Release" -# Name "spectex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\spectex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/spriteblast.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/spriteblast.dsp deleted file mode 100644 index 8a02ed50d3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/spriteblast.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="spriteblast" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=spriteblast - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "spriteblast.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "spriteblast.mak" CFG="bounce - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "spriteblast - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "spriteblast - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "spriteblast - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../spriteblast.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "spriteblast - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../spriteblast.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "spriteblast - Win32 Release" -# Name "spriteblast - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\spriteblast.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/stex3d.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/stex3d.dsp deleted file mode 100644 index 7c112d62ca..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/stex3d.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="stex3d" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=stex3d - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "stex3d.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "stex3d.mak" CFG="bounce - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "stex3d - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "stex3d - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "stex3d - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../stex3d.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "stex3d - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../stex3d.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "stex3d - Win32 Release" -# Name "stex3d - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\stex3d.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/teapot.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/teapot.dsp deleted file mode 100644 index 3260e635a4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/teapot.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="teapot" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=teapot - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "teapot.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "teapot.mak" CFG="gloss - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "teapot - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "teapot - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "teapot - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../teapot.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "teapot - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../teapot.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "teapot - Win32 Release" -# Name "teapot - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\teapot.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/terrain.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/terrain.dsp deleted file mode 100644 index 9fe490db81..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/terrain.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="terrain" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=terrain - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "terrain.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "terrain.mak" CFG="bounce - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "terrain - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "terrain - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "terrain - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../terrain.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "terrain - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../terrain.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "terrain - Win32 Release" -# Name "terrain - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\terrain.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/tessdemo.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/tessdemo.dsp deleted file mode 100644 index 61345c79e6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/tessdemo.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tessdemo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tessdemo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tessdemo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tessdemo.mak" CFG="bounce - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tessdemo - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tessdemo - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tessdemo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../tessdemo.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "tessdemo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../tessdemo.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "tessdemo - Win32 Release" -# Name "tessdemo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\tessdemo.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/texcyl.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/texcyl.dsp deleted file mode 100644 index b227e02c29..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/texcyl.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="texcyl" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=texcyl - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "texcyl.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "texcyl.mak" CFG="gloss - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "texcyl - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "texcyl - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "texcyl - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../texcyl.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "texcyl - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../texcyl.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "texcyl - Win32 Release" -# Name "texcyl - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\texcyl.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/texdown.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/texdown.dsp deleted file mode 100644 index acea7666af..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/texdown.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="texdown" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=texdown - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "texdown.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "texdown.mak" CFG="bounce - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "texdown - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "texdown - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "texdown - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../texdown.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "texdown - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../texdown.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "texdown - Win32 Release" -# Name "texdown - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\texdown.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/texenv.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/texenv.dsp deleted file mode 100644 index 3eb7eecdb7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/texenv.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="texenv" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=texenv - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "texenv.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "texenv.mak" CFG="bounce - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "texenv - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "texenv - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "texenv - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../texenv.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "texenv - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../texenv.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "texenv - Win32 Release" -# Name "texenv - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\texenv.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/texobj.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/texobj.dsp deleted file mode 100644 index 5db5f2ee79..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/texobj.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="texobj" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=texobj - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "texobj.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "texobj.mak" CFG="bounce - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "texobj - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "texobj - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "texobj - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../texobj.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "texobj - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../texobj.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "texobj - Win32 Release" -# Name "texobj - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\texobj.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/trispd.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/trispd.dsp deleted file mode 100644 index 7e27cf3d04..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/trispd.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="trispd" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=trispd - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "trispd.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "trispd.mak" CFG="bounce - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "trispd - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "trispd - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "trispd - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../trispd.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "trispd - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../trispd.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "trispd - Win32 Release" -# Name "trispd - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\trispd.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/tunnel.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/tunnel.dsp deleted file mode 100644 index 965f109c33..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/tunnel.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tunnel" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tunnel - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tunnel.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tunnel.mak" CFG="gloss - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tunnel - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tunnel - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tunnel - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../tunnel.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "tunnel - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../tunnel.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "tunnel - Win32 Release" -# Name "tunnel - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\tunnel.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/tunnel2.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/tunnel2.dsp deleted file mode 100644 index 3ae2800a04..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/tunnel2.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tunnel2" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tunnel2 - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tunnel2.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tunnel2.mak" CFG="gloss - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tunnel2 - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tunnel2 - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tunnel2 - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../tunnel2.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "tunnel2 - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../tunnel2.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "tunnel2 - Win32 Release" -# Name "tunnel2 - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\tunnel2.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/winpos.dsp b/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/winpos.dsp deleted file mode 100644 index b7b569e640..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/Windows/winpos.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="winpos" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=winpos - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "winpos.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "winpos.mak" CFG="gloss - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "winpos - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "winpos - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "winpos - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../winpos.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "winpos - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../winpos.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "winpos - Win32 Release" -# Name "winpos - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\winpos.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/arbfplight.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/arbfplight.c deleted file mode 100644 index 6ad95d4d76..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/arbfplight.c +++ /dev/null @@ -1,395 +0,0 @@ -/* - * Use GL_ARB_fragment_program and GL_ARB_vertex_program to implement - * simple per-pixel lighting. - * - * Brian Paul - * 17 April 2003 - */ - -#include -#include -#include -#include -#include -#include - - -static GLfloat Diffuse[4] = { 0.5, 0.5, 1.0, 1.0 }; -static GLfloat Specular[4] = { 0.8, 0.8, 0.8, 1.0 }; -static GLfloat LightPos[4] = { 0.0, 10.0, 20.0, 1.0 }; -static GLfloat Delta = 1.0; - -static GLuint FragProg; -static GLuint VertProg; -static GLboolean Anim = GL_TRUE; -static GLboolean Wire = GL_FALSE; -static GLboolean PixelLight = GL_TRUE; - -static GLint T0 = 0; -static GLint Frames = 0; - -static GLfloat Xrot = 0, Yrot = 0; - -static PFNGLPROGRAMLOCALPARAMETER4FVARBPROC glProgramLocalParameter4fvARB_func; -static PFNGLPROGRAMLOCALPARAMETER4DARBPROC glProgramLocalParameter4dARB_func; -static PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC glGetProgramLocalParameterdvARB_func; -static PFNGLGENPROGRAMSARBPROC glGenProgramsARB_func; -static PFNGLPROGRAMSTRINGARBPROC glProgramStringARB_func; -static PFNGLBINDPROGRAMARBPROC glBindProgramARB_func; -static PFNGLISPROGRAMARBPROC glIsProgramARB_func; -static PFNGLDELETEPROGRAMSARBPROC glDeleteProgramsARB_func; - -/* These must match the indexes used in the fragment program */ -#define LIGHTPOS 3 - -/* Set to one to test ARB_fog_linear program option */ -#define DO_FRAGMENT_FOG 0 - - -static void Redisplay( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - if (PixelLight) { - glProgramLocalParameter4fvARB_func(GL_FRAGMENT_PROGRAM_ARB, - LIGHTPOS, LightPos); - glEnable(GL_FRAGMENT_PROGRAM_ARB); - glEnable(GL_VERTEX_PROGRAM_ARB); - glDisable(GL_LIGHTING); - } - else { - glLightfv(GL_LIGHT0, GL_POSITION, LightPos); - glDisable(GL_FRAGMENT_PROGRAM_ARB); - glDisable(GL_VERTEX_PROGRAM_ARB); - glEnable(GL_LIGHTING); - } - - glPushMatrix(); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - glutSolidSphere(2.0, 10, 5); - glPopMatrix(); - - glutSwapBuffers(); - - Frames++; - - if (Anim) { - GLint t = glutGet(GLUT_ELAPSED_TIME); - if (t - T0 >= 5000) { - GLfloat seconds = (t - T0) / 1000.0; - GLfloat fps = Frames / seconds; - printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps); - T0 = t; - Frames = 0; - } - } -} - - -static void Idle(void) -{ - LightPos[0] += Delta; - if (LightPos[0] > 25.0) - Delta = -1.0; - else if (LightPos[0] <- 25.0) - Delta = 1.0; - glutPostRedisplay(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case ' ': - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 'x': - LightPos[0] -= 1.0; - break; - case 'X': - LightPos[0] += 1.0; - break; - case 'w': - Wire = !Wire; - if (Wire) - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - else - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - break; - case 'p': - PixelLight = !PixelLight; - if (PixelLight) { - printf("Per-pixel lighting\n"); - } - else { - printf("Conventional lighting\n"); - } - break; - case 27: - glDeleteProgramsARB_func(1, &VertProg); - glDeleteProgramsARB_func(1, &FragProg); - exit(0); - break; - } - glutPostRedisplay(); -} - -static void SpecialKey( int key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - Xrot -= step; - break; - case GLUT_KEY_DOWN: - Xrot += step; - break; - case GLUT_KEY_LEFT: - Yrot -= step; - break; - case GLUT_KEY_RIGHT: - Yrot += step; - break; - } - glutPostRedisplay(); -} - - -/* A helper for finding errors in program strings */ -static int FindLine( const char *program, int position ) -{ - int i, line = 1; - for (i = 0; i < position; i++) { - if (program[i] == '\n') - line++; - } - return line; -} - - -static void Init( void ) -{ - GLint errorPos; - - /* Yes, this could be expressed more efficiently */ - static const char *fragProgramText = - "!!ARBfp1.0\n" -#if DO_FRAGMENT_FOG - "OPTION ARB_fog_linear; \n" -#endif - "PARAM Diffuse = state.material.diffuse; \n" - "PARAM Specular = state.material.specular; \n" - "PARAM LightPos = program.local[3]; \n" - "TEMP lightDir, normal, len; \n" - "TEMP dotProd, specAtten; \n" - "TEMP diffuseColor, specularColor; \n" - - "# Compute normalized light direction \n" - "DP3 len.x, LightPos, LightPos; \n" - "RSQ len.y, len.x; \n" - "MUL lightDir, LightPos, len.y; \n" - - "# Compute normalized normal \n" - "DP3 len.x, fragment.texcoord[0], fragment.texcoord[0]; \n" - "RSQ len.y, len.x; \n" - "MUL normal, fragment.texcoord[0], len.y; \n" - - "# Compute dot product of light direction and normal vector\n" - "DP3_SAT dotProd, lightDir, normal; # limited to [0,1]\n" - - "MUL diffuseColor, Diffuse, dotProd; # diffuse attenuation\n" - - "POW specAtten.x, dotProd.x, {20.0}.x; # specular exponent\n" - - "MUL specularColor, Specular, specAtten.x; # specular attenuation\n" - -#if DO_FRAGMENT_FOG - "# need to clamp color to [0,1] before fogging \n" - "ADD_SAT result.color, diffuseColor, specularColor; # add colors\n" -#else - "# clamping will be done after program's finished \n" - "ADD result.color, diffuseColor, specularColor; # add colors\n" -#endif - "END \n" - ; - - static const char *vertProgramText = - "!!ARBvp1.0\n" - "ATTRIB pos = vertex.position; \n" - "ATTRIB norm = vertex.normal; \n" - "PARAM modelview[4] = { state.matrix.modelview }; \n" - "PARAM modelviewProj[4] = { state.matrix.mvp }; \n" - "PARAM invModelview[4] = { state.matrix.modelview.invtrans }; \n" - - "# typical modelview/projection transform \n" - "DP4 result.position.x, pos, modelviewProj[0]; \n" - "DP4 result.position.y, pos, modelviewProj[1]; \n" - "DP4 result.position.z, pos, modelviewProj[2]; \n" - "DP4 result.position.w, pos, modelviewProj[3]; \n" - - "# transform normal by inv transpose of modelview, put in tex0 \n" - "DP3 result.texcoord[0].x, norm, invModelview[0]; \n" - "DP3 result.texcoord[0].y, norm, invModelview[1]; \n" - "DP3 result.texcoord[0].z, norm, invModelview[2]; \n" - "DP3 result.texcoord[0].w, norm, invModelview[3]; \n" - -#if DO_FRAGMENT_FOG - "# compute fog coordinate = vertex eye-space Z coord (negated)\n" - "DP4 result.fogcoord, -pos, modelview[2]; \n" -#endif - "END\n"; - ; - - if (!glutExtensionSupported("GL_ARB_vertex_program")) { - printf("Sorry, this demo requires GL_ARB_vertex_program\n"); - exit(1); - } - if (!glutExtensionSupported("GL_ARB_fragment_program")) { - printf("Sorry, this demo requires GL_ARB_fragment_program\n"); - exit(1); - } - - /* - * Get extension function pointers. - */ - glProgramLocalParameter4fvARB_func = (PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) glutGetProcAddress("glProgramLocalParameter4fvARB"); - assert(glProgramLocalParameter4fvARB_func); - - glProgramLocalParameter4dARB_func = (PFNGLPROGRAMLOCALPARAMETER4DARBPROC) glutGetProcAddress("glProgramLocalParameter4dARB"); - assert(glProgramLocalParameter4dARB_func); - - glGetProgramLocalParameterdvARB_func = (PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) glutGetProcAddress("glGetProgramLocalParameterdvARB"); - assert(glGetProgramLocalParameterdvARB_func); - - glGenProgramsARB_func = (PFNGLGENPROGRAMSARBPROC) glutGetProcAddress("glGenProgramsARB"); - assert(glGenProgramsARB_func); - - glProgramStringARB_func = (PFNGLPROGRAMSTRINGARBPROC) glutGetProcAddress("glProgramStringARB"); - assert(glProgramStringARB_func); - - glBindProgramARB_func = (PFNGLBINDPROGRAMARBPROC) glutGetProcAddress("glBindProgramARB"); - assert(glBindProgramARB_func); - - glIsProgramARB_func = (PFNGLISPROGRAMARBPROC) glutGetProcAddress("glIsProgramARB"); - assert(glIsProgramARB_func); - - glDeleteProgramsARB_func = (PFNGLDELETEPROGRAMSARBPROC) glutGetProcAddress("glDeleteProgramsARB"); - assert(glDeleteProgramsARB_func); - - /* - * Fragment program - */ - glGenProgramsARB_func(1, &FragProg); - assert(FragProg > 0); - glBindProgramARB_func(GL_FRAGMENT_PROGRAM_ARB, FragProg); - glProgramStringARB_func(GL_FRAGMENT_PROGRAM_ARB, - GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(fragProgramText), - (const GLubyte *) fragProgramText); - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorPos); - if (glGetError() != GL_NO_ERROR || errorPos != -1) { - int l = FindLine(fragProgramText, errorPos); - printf("Fragment Program Error (pos=%d line=%d): %s\n", errorPos, l, - (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB)); - exit(0); - } - assert(glIsProgramARB_func(FragProg)); - - /* - * Do some sanity tests - */ - { - GLdouble v[4]; - glProgramLocalParameter4dARB_func(GL_FRAGMENT_PROGRAM_ARB, 8, - 10.0, 20.0, 30.0, 40.0); - glGetProgramLocalParameterdvARB_func(GL_FRAGMENT_PROGRAM_ARB, 8, v); - assert(v[0] == 10.0); - assert(v[1] == 20.0); - assert(v[2] == 30.0); - assert(v[3] == 40.0); - } - - /* - * Vertex program - */ - glGenProgramsARB_func(1, &VertProg); - assert(VertProg > 0); - glBindProgramARB_func(GL_VERTEX_PROGRAM_ARB, VertProg); - glProgramStringARB_func(GL_VERTEX_PROGRAM_ARB, - GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(vertProgramText), - (const GLubyte *) vertProgramText); - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorPos); - if (glGetError() != GL_NO_ERROR || errorPos != -1) { - int l = FindLine(fragProgramText, errorPos); - printf("Vertex Program Error (pos=%d line=%d): %s\n", errorPos, l, - (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB)); - exit(0); - } - assert(glIsProgramARB_func(VertProg)); - - /* - * Misc init - */ - glClearColor(0.3, 0.3, 0.3, 0.0); - glEnable(GL_DEPTH_TEST); - glEnable(GL_LIGHT0); - glEnable(GL_LIGHTING); - glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, Diffuse); - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, Specular); - glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 20.0); - -#if DO_FRAGMENT_FOG - { - /* Green-ish fog color */ - static const GLfloat fogColor[4] = {0.5, 1.0, 0.5, 0}; - glFogfv(GL_FOG_COLOR, fogColor); - glFogf(GL_FOG_START, 5.0); - glFogf(GL_FOG_END, 25.0); - } -#endif - - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("Press p to toggle between per-pixel and per-vertex lighting\n"); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 200, 200 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Redisplay ); - if (Anim) - glutIdleFunc(Idle); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/arbocclude.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/arbocclude.c deleted file mode 100644 index ddbb1f1b75..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/arbocclude.c +++ /dev/null @@ -1,283 +0,0 @@ -/* - * GL_ARB_occlusion_query demo - * - * Brian Paul - * 12 June 2003 - * - * Copyright (C) 2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -#define TEST_DISPLAY_LISTS 0 - -static GLboolean Anim = GL_TRUE; -static GLfloat Xpos = 0; -static GLuint OccQuery; - - - -static void -PrintString(const char *s) -{ - while (*s) { - glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s); - s++; - } -} - - - -static void Idle(void) -{ - static int lastTime = 0; - static int sign = +1; - int time = glutGet(GLUT_ELAPSED_TIME); - float step; - - if (lastTime == 0) - lastTime = time; - else if (time - lastTime < 20) /* 50Hz update */ - return; - - step = (time - lastTime) / 1000.0 * sign; - lastTime = time; - - Xpos += step; - - if (Xpos > 2.5) { - Xpos = 2.5; - sign = -1; - } - else if (Xpos < -2.5) { - Xpos = -2.5; - sign = +1; - } - glutPostRedisplay(); -} - - -static void Display( void ) -{ - GLuint passed; - GLint ready; - char s[100]; - - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); - - /* draw the occluding polygons */ - glColor3f(0, 0.6, 0.8); - glBegin(GL_QUADS); - glVertex2f(-1.6, -1.5); - glVertex2f(-0.4, -1.5); - glVertex2f(-0.4, 1.5); - glVertex2f(-1.6, 1.5); - - glVertex2f( 0.4, -1.5); - glVertex2f( 1.6, -1.5); - glVertex2f( 1.6, 1.5); - glVertex2f( 0.4, 1.5); - glEnd(); - - /* draw the test polygon with occlusion testing */ - glPushMatrix(); - glTranslatef(Xpos, 0, -0.5); - glScalef(0.3, 0.3, 1.0); - glRotatef(-90.0 * Xpos, 0, 0, 1); - -#if defined(GL_ARB_occlusion_query) -#if TEST_DISPLAY_LISTS - glNewList(10, GL_COMPILE); - glBeginQueryARB(GL_SAMPLES_PASSED_ARB, OccQuery); - glEndList(); - glCallList(10); -#else - glBeginQueryARB(GL_SAMPLES_PASSED_ARB, OccQuery); -#endif - - glColorMask(0, 0, 0, 0); - glDepthMask(GL_FALSE); - - glBegin(GL_POLYGON); - glVertex3f(-1, -1, 0); - glVertex3f( 1, -1, 0); - glVertex3f( 1, 1, 0); - glVertex3f(-1, 1, 0); - glEnd(); - -#if TEST_DISPLAY_LISTS - glNewList(11, GL_COMPILE); - glEndQueryARB(GL_SAMPLES_PASSED_ARB); - glEndList(); - glCallList(11); -#else - glEndQueryARB(GL_SAMPLES_PASSED_ARB); -#endif - - do { - /* do useful work here, if any */ - glGetQueryObjectivARB(OccQuery, GL_QUERY_RESULT_AVAILABLE_ARB, &ready); - } while (!ready); - glGetQueryObjectuivARB(OccQuery, GL_QUERY_RESULT_ARB, &passed); - - /* turn off occlusion testing */ - glColorMask(1, 1, 1, 1); - glDepthMask(GL_TRUE); -#endif /* GL_ARB_occlusion_query */ - - /* draw the orange rect, so we can see what's going on */ - glColor3f(0.8, 0.5, 0); - glBegin(GL_POLYGON); - glVertex3f(-1, -1, 0); - glVertex3f( 1, -1, 0); - glVertex3f( 1, 1, 0); - glVertex3f(-1, 1, 0); - glEnd(); - - glPopMatrix(); - - - /* Print result message */ - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - - glColor3f(1, 1, 1); -#if defined(GL_ARB_occlusion_query) - sprintf(s, " %4d Fragments Visible", passed); - glRasterPos3f(-0.50, -0.7, 0); - PrintString(s); - if (!passed) { - glRasterPos3f(-0.25, -0.8, 0); - PrintString("Fully Occluded"); - } -#else - glRasterPos3f(-0.25, -0.8, 0); - PrintString("GL_ARB_occlusion_query not available at compile time"); -#endif /* GL_ARB_occlusion_query */ - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - case ' ': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - const GLfloat step = 0.1; - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_LEFT: - Xpos -= step; - break; - case GLUT_KEY_RIGHT: - Xpos += step; - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - const char *ext = (const char *) glGetString(GL_EXTENSIONS); - GLint bits; - - if (!strstr(ext, "GL_ARB_occlusion_query")) { - printf("Sorry, this demo requires the GL_ARB_occlusion_query extension\n"); - exit(-1); - } - -#if defined(GL_ARB_occlusion_query) - glGetQueryivARB(GL_SAMPLES_PASSED_ARB, GL_QUERY_COUNTER_BITS_ARB, &bits); - if (!bits) { - printf("Hmmm, GL_QUERY_COUNTER_BITS_ARB is zero!\n"); - exit(-1); - } -#endif /* GL_ARB_occlusion_query */ - - glGetIntegerv(GL_DEPTH_BITS, &bits); - printf("Depthbits: %d\n", bits); - -#if defined(GL_ARB_occlusion_query) - glGenQueriesARB(1, &OccQuery); - assert(OccQuery > 0); -#endif /* GL_ARB_occlusion_query */ - - glEnable(GL_DEPTH_TEST); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 400, 400 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutIdleFunc( Idle ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/bounce.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/bounce.c deleted file mode 100644 index 2f3fa9fd97..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/bounce.c +++ /dev/null @@ -1,228 +0,0 @@ - -/* - * Bouncing ball demo. - * - * This program is in the public domain - * - * Brian Paul - * - * Conversion to GLUT by Mark J. Kilgard - */ - - -#include -#include -#include -#include -#include -#include - -#define COS(X) cos( (X) * 3.14159/180.0 ) -#define SIN(X) sin( (X) * 3.14159/180.0 ) - -#define RED 1 -#define WHITE 2 -#define CYAN 3 - -GLboolean IndexMode = GL_FALSE; -GLuint Ball; -GLenum Mode; -GLfloat Zrot = 0.0, Zstep = 180.0; -GLfloat Xpos = 0.0, Ypos = 1.0; -GLfloat Xvel = 2.0, Yvel = 0.0; -GLfloat Xmin = -4.0, Xmax = 4.0; -GLfloat Ymin = -3.8, Ymax = 4.0; -GLfloat G = -9.8; - -static GLuint -make_ball(void) -{ - GLuint list; - GLfloat a, b; - GLfloat da = 18.0, db = 18.0; - GLfloat radius = 1.0; - GLuint color; - GLfloat x, y, z; - - list = glGenLists(1); - - glNewList(list, GL_COMPILE); - - color = 0; - for (a = -90.0; a + da <= 90.0; a += da) { - - glBegin(GL_QUAD_STRIP); - for (b = 0.0; b <= 360.0; b += db) { - - if (color) { - glIndexi(RED); - glColor3f(1, 0, 0); - } else { - glIndexi(WHITE); - glColor3f(1, 1, 1); - } - - x = radius * COS(b) * COS(a); - y = radius * SIN(b) * COS(a); - z = radius * SIN(a); - glVertex3f(x, y, z); - - x = radius * COS(b) * COS(a + da); - y = radius * SIN(b) * COS(a + da); - z = radius * SIN(a + da); - glVertex3f(x, y, z); - - color = 1 - color; - } - glEnd(); - - } - - glEndList(); - - return list; -} - -static void -reshape(int width, int height) -{ - float aspect = (float) width / (float) height; - glViewport(0, 0, (GLint) width, (GLint) height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-6.0 * aspect, 6.0 * aspect, -6.0, 6.0, -6.0, 6.0); - glMatrixMode(GL_MODELVIEW); -} - -/* ARGSUSED1 */ -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - } -} - -static void -draw(void) -{ - GLint i; - - glClear(GL_COLOR_BUFFER_BIT); - - glIndexi(CYAN); - glColor3f(0, 1, 1); - glBegin(GL_LINES); - for (i = -5; i <= 5; i++) { - glVertex2i(i, -5); - glVertex2i(i, 5); - } - for (i = -5; i <= 5; i++) { - glVertex2i(-5, i); - glVertex2i(5, i); - } - for (i = -5; i <= 5; i++) { - glVertex2i(i, -5); - glVertex2f(i * 1.15, -5.9); - } - glVertex2f(-5.3, -5.35); - glVertex2f(5.3, -5.35); - glVertex2f(-5.75, -5.9); - glVertex2f(5.75, -5.9); - glEnd(); - - glPushMatrix(); - glTranslatef(Xpos, Ypos, 0.0); - glScalef(2.0, 2.0, 2.0); - glRotatef(8.0, 0.0, 0.0, 1.0); - glRotatef(90.0, 1.0, 0.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - - glCallList(Ball); - - glPopMatrix(); - - glFlush(); - glutSwapBuffers(); -} - -static void -idle(void) -{ - static float vel0 = -100.0; - static double t0 = -1.; - double t, dt; - t = glutGet(GLUT_ELAPSED_TIME) / 1000.; - if (t0 < 0.) - t0 = t; - dt = t - t0; - t0 = t; - - Zrot += Zstep*dt; - - Xpos += Xvel*dt; - if (Xpos >= Xmax) { - Xpos = Xmax; - Xvel = -Xvel; - Zstep = -Zstep; - } - if (Xpos <= Xmin) { - Xpos = Xmin; - Xvel = -Xvel; - Zstep = -Zstep; - } - Ypos += Yvel*dt; - Yvel += G*dt; - if (Ypos < Ymin) { - Ypos = Ymin; - if (vel0 == -100.0) - vel0 = fabs(Yvel); - Yvel = vel0; - } - glutPostRedisplay(); -} - -static void -visible(int vis) -{ - if (vis == GLUT_VISIBLE) - glutIdleFunc(idle); - else - glutIdleFunc(NULL); -} - -int main(int argc, char *argv[]) -{ - glutInit(&argc, argv); - glutInitWindowPosition(0, 0); - glutInitWindowSize(600, 450); - - - IndexMode = argc > 1 && strcmp(argv[1], "-ci") == 0; - if (IndexMode) - glutInitDisplayMode(GLUT_INDEX | GLUT_DOUBLE); - else - glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); - - glutCreateWindow("Bounce"); - Ball = make_ball(); - glCullFace(GL_BACK); - glEnable(GL_CULL_FACE); - glDisable(GL_DITHER); - glShadeModel(GL_FLAT); - - glutDisplayFunc(draw); - glutReshapeFunc(reshape); - glutVisibilityFunc(visible); - glutKeyboardFunc(key); - - if (IndexMode) { - glutSetColor(RED, 1.0, 0.0, 0.0); - glutSetColor(WHITE, 1.0, 1.0, 1.0); - glutSetColor(CYAN, 0.0, 1.0, 1.0); - } - - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/clearspd.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/clearspd.c deleted file mode 100644 index 42953f6675..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/clearspd.c +++ /dev/null @@ -1,218 +0,0 @@ - -/* - * Simple GLUT program to measure glClear() and glutSwapBuffers() speed. - * Brian Paul February 15, 1997 This file in public domain. - */ - - -#include -#include -#include -#include -#include - - -static float MinPeriod = 2.0; /* 2 seconds */ -static int ColorMode = GLUT_RGB; -static int Width = 400.0; -static int Height = 400.0; -static int Loops = 100; -static float ClearColor = 0.0; -static GLbitfield BufferMask = GL_COLOR_BUFFER_BIT; -static GLboolean SwapFlag = GL_FALSE; - - - -static void Idle( void ) -{ - glutPostRedisplay(); -} - - -static void Display( void ) -{ - double t0, t1; - double clearRate; - double pixelRate; - int i; - - glClearColor( ClearColor, ClearColor, ClearColor, 0.0 ); - ClearColor += 0.1; - if (ClearColor>1.0) - ClearColor = 0.0; - - if (SwapFlag) { - t0 = glutGet(GLUT_ELAPSED_TIME) * 0.001; - for (i=0;i -#include -#include -#include -#include -#include "GL/glut.h" -#include "readtex.h" - - -static GLfloat Xrot = 0, Yrot = 0; -static GLfloat EyeDist = 10; -static GLboolean use_vertex_arrays = GL_FALSE; -static GLboolean anim = GL_TRUE; - -#define eps1 0.99 -#define br 20.0 /* box radius */ - -static const GLfloat tex_coords[] = { - /* +X side */ - 1.0, -eps1, -eps1, - 1.0, -eps1, eps1, - 1.0, eps1, eps1, - 1.0, eps1, -eps1, - - /* -X side */ - -1.0, eps1, -eps1, - -1.0, eps1, eps1, - -1.0, -eps1, eps1, - -1.0, -eps1, -eps1, - - /* +Y side */ - -eps1, 1.0, -eps1, - -eps1, 1.0, eps1, - eps1, 1.0, eps1, - eps1, 1.0, -eps1, - - /* -Y side */ - -eps1, -1.0, -eps1, - -eps1, -1.0, eps1, - eps1, -1.0, eps1, - eps1, -1.0, -eps1, - - /* +Z side */ - eps1, -eps1, 1.0, - -eps1, -eps1, 1.0, - -eps1, eps1, 1.0, - eps1, eps1, 1.0, - - /* -Z side */ - eps1, eps1, -1.0, - -eps1, eps1, -1.0, - -eps1, -eps1, -1.0, - eps1, -eps1, -1.0, -}; - -static const GLfloat vtx_coords[] = { - /* +X side */ - br, -br, -br, - br, -br, br, - br, br, br, - br, br, -br, - - /* -X side */ - -br, br, -br, - -br, br, br, - -br, -br, br, - -br, -br, -br, - - /* +Y side */ - -br, br, -br, - -br, br, br, - br, br, br, - br, br, -br, - - /* -Y side */ - -br, -br, -br, - -br, -br, br, - br, -br, br, - br, -br, -br, - - /* +Z side */ - br, -br, br, - -br, -br, br, - -br, br, br, - br, br, br, - - /* -Z side */ - br, br, -br, - -br, br, -br, - -br, -br, -br, - br, -br, -br, -}; - -static void draw_skybox( void ) -{ - if ( use_vertex_arrays ) { - glTexCoordPointer( 3, GL_FLOAT, 0, tex_coords ); - glVertexPointer( 3, GL_FLOAT, 0, vtx_coords ); - - glEnableClientState( GL_TEXTURE_COORD_ARRAY ); - glEnableClientState( GL_VERTEX_ARRAY ); - - glDrawArrays( GL_QUADS, 0, 24 ); - - glDisableClientState( GL_TEXTURE_COORD_ARRAY ); - glDisableClientState( GL_VERTEX_ARRAY ); - } - else { - unsigned i; - - glBegin(GL_QUADS); - for ( i = 0 ; i < 24 ; i++ ) { - glTexCoord3fv( & tex_coords[ i * 3 ] ); - glVertex3fv ( & vtx_coords[ i * 3 ] ); - } - glEnd(); - } -} - - -static void draw( void ) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); /*MODELVIEW*/ - glTranslatef( 0.0, 0.0, -EyeDist ); - - /* skybox */ - glDisable(GL_TEXTURE_GEN_S); - glDisable(GL_TEXTURE_GEN_T); - glDisable(GL_TEXTURE_GEN_R); - - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - draw_skybox(); - glPopMatrix(); - - /* sphere */ - glMatrixMode(GL_TEXTURE); - glLoadIdentity(); - glRotatef(-Yrot, 0, 1, 0); - glRotatef(-Xrot, 1, 0, 0); - - glEnable(GL_TEXTURE_GEN_S); - glEnable(GL_TEXTURE_GEN_T); - glEnable(GL_TEXTURE_GEN_R); - glutSolidSphere(2.0, 20, 20); - - glLoadIdentity(); /* texture */ - - glMatrixMode(GL_MODELVIEW); - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void idle(void) -{ - GLfloat t = 0.05 * glutGet(GLUT_ELAPSED_TIME); - Yrot = t; - glutPostRedisplay(); -} - - -static void set_mode(GLuint mode) -{ - if (mode == 0) { - glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_ARB); - glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_ARB); - glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_ARB); - printf("GL_REFLECTION_MAP_ARB mode\n"); - } - else if (mode == 1) { - glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_ARB); - glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_ARB); - glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_ARB); - printf("GL_NORMAL_MAP_ARB mode\n"); - } -} - - -static void key(unsigned char k, int x, int y) -{ - static GLuint mode = 0; - (void) x; - (void) y; - switch (k) { - case ' ': - anim = !anim; - if (anim) - glutIdleFunc(idle); - else - glutIdleFunc(NULL); - break; - case 'm': - mode = !mode; - set_mode(mode); - break; - case 'v': - use_vertex_arrays = ! use_vertex_arrays; - printf( "Vertex arrays are %sabled\n", - (use_vertex_arrays) ? "en" : "dis" ); - break; - case 'z': - EyeDist -= 0.5; - if (EyeDist < 6.0) - EyeDist = 6.0; - break; - case 'Z': - EyeDist += 0.5; - if (EyeDist > 90.0) - EyeDist = 90; - break; - case 27: - exit(0); - } - glutPostRedisplay(); -} - - -static void specialkey(int key, int x, int y) -{ - GLfloat step = 5; - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - Xrot += step; - break; - case GLUT_KEY_DOWN: - Xrot -= step; - break; - case GLUT_KEY_LEFT: - Yrot -= step; - break; - case GLUT_KEY_RIGHT: - Yrot += step; - break; - } - glutPostRedisplay(); -} - - -/* new window size or exposure */ -static void reshape(int width, int height) -{ - GLfloat ar = (float) width / (float) height; - glViewport(0, 0, (GLint)width, (GLint)height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum( -2.0*ar, 2.0*ar, -2.0, 2.0, 4.0, 100.0 ); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - - -static void init_checkers( void ) -{ -#define CUBE_TEX_SIZE 64 - GLubyte image[CUBE_TEX_SIZE][CUBE_TEX_SIZE][3]; - static const GLubyte colors[6][3] = { - { 255, 0, 0 }, /* face 0 - red */ - { 0, 255, 255 }, /* face 1 - cyan */ - { 0, 255, 0 }, /* face 2 - green */ - { 255, 0, 255 }, /* face 3 - purple */ - { 0, 0, 255 }, /* face 4 - blue */ - { 255, 255, 0 } /* face 5 - yellow */ - }; - static const GLenum targets[6] = { - GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, - GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, - GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB - }; - - GLint i, j, f; - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - /* make colored checkerboard cube faces */ - for (f = 0; f < 6; f++) { - for (i = 0; i < CUBE_TEX_SIZE; i++) { - for (j = 0; j < CUBE_TEX_SIZE; j++) { - if ((i/4 + j/4) & 1) { - image[i][j][0] = colors[f][0]; - image[i][j][1] = colors[f][1]; - image[i][j][2] = colors[f][2]; - } - else { - image[i][j][0] = 255; - image[i][j][1] = 255; - image[i][j][2] = 255; - } - } - } - - glTexImage2D(targets[f], 0, GL_RGB, CUBE_TEX_SIZE, CUBE_TEX_SIZE, 0, - GL_RGB, GL_UNSIGNED_BYTE, image); - } -} - - -static void load(GLenum target, const char *filename, - GLboolean flipTB, GLboolean flipLR) -{ - GLint w, h; - GLenum format; - GLubyte *img = LoadRGBImage( filename, &w, &h, &format ); - if (!img) { - printf("Error: couldn't load texture image %s\n", filename); - exit(1); - } - assert(format == GL_RGB); - - /* the way the texture cube mapping works, we have to flip - * images to make things look right. - */ - if (flipTB) { - const int stride = 3 * w; - GLubyte temp[3*1024]; - int i; - for (i = 0; i < h / 2; i++) { - memcpy(temp, img + i * stride, stride); - memcpy(img + i * stride, img + (h - i - 1) * stride, stride); - memcpy(img + (h - i - 1) * stride, temp, stride); - } - } - if (flipLR) { - const int stride = 3 * w; - GLubyte temp[3]; - GLubyte *row; - int i, j; - for (i = 0; i < h; i++) { - row = img + i * stride; - for (j = 0; j < w / 2; j++) { - int k = w - j - 1; - temp[0] = row[j*3+0]; - temp[1] = row[j*3+1]; - temp[2] = row[j*3+2]; - row[j*3+0] = row[k*3+0]; - row[j*3+1] = row[k*3+1]; - row[j*3+2] = row[k*3+2]; - row[k*3+0] = temp[0]; - row[k*3+1] = temp[1]; - row[k*3+2] = temp[2]; - } - } - } - - gluBuild2DMipmaps(target, GL_RGB, w, h, format, GL_UNSIGNED_BYTE, img); - free(img); -} - - -static void load_envmaps(void) -{ - load(GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, "right.rgb", GL_TRUE, GL_FALSE); - load(GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, "left.rgb", GL_TRUE, GL_FALSE); - load(GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, "top.rgb", GL_FALSE, GL_TRUE); - load(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, "bottom.rgb", GL_FALSE, GL_TRUE); - load(GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, "front.rgb", GL_TRUE, GL_FALSE); - load(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, "back.rgb", GL_TRUE, GL_FALSE); -} - - -static void init( GLboolean useImageFiles ) -{ - GLenum filter; - - /* check for extension */ - { - char *exten = (char *) glGetString(GL_EXTENSIONS); - if (!strstr(exten, "GL_ARB_texture_cube_map")) { - printf("Sorry, this demo requires GL_ARB_texture_cube_map\n"); - exit(0); - } - } - printf("GL_RENDERER: %s\n", (char *) glGetString(GL_RENDERER)); - - if (useImageFiles) { - load_envmaps(); - filter = GL_LINEAR; - } - else { - init_checkers(); - filter = GL_NEAREST; - } - - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, filter); - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER, filter); - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - - glEnable(GL_TEXTURE_CUBE_MAP_ARB); - glEnable(GL_DEPTH_TEST); - - glClearColor(.3, .3, .3, 0); - glColor3f( 1.0, 1.0, 1.0 ); - - set_mode(0); -} - - -static void usage(void) -{ - printf("keys:\n"); - printf(" SPACE - toggle animation\n"); - printf(" CURSOR KEYS - rotation\n"); - printf(" m - toggle texgen reflection mode\n"); - printf(" z/Z - change viewing distance\n"); -} - - -int main( int argc, char *argv[] ) -{ - glutInitWindowPosition(0, 0); - glutInitWindowSize(600, 500); - glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE ); - glutCreateWindow("Texture Cube Mapping"); - - if (argc > 1 && strcmp(argv[1] , "-i") == 0) - init( 1 ); - else - init( 0 ); - glutReshapeFunc( reshape ); - glutKeyboardFunc( key ); - glutSpecialFunc( specialkey ); - glutDisplayFunc( draw ); - if (anim) - glutIdleFunc(idle); - usage(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/descrip.mms b/nx-X11/extras/Mesa_6.4.2/progs/demos/descrip.mms deleted file mode 100644 index cc9350ce66..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/descrip.mms +++ /dev/null @@ -1,90 +0,0 @@ -# Makefile for GLUT-based demo programs for VMS -# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl -# Last update : 20 May 2005 - -.first - define gl [--.include.gl] - -.include [--]mms-config. - -##### MACROS ##### - -INCDIR = ([--.include],[-.util]) -CFLAGS = /include=$(INCDIR)/prefix=all/name=(as_is,short) - -.ifdef SHARE -GL_LIBS = $(XLIBS) -LIB_DEP = [--.lib]$(GL_SHAR) [--.lib]$(GLU_SHAR) [--.lib]$(GLUT_SHAR) -.else -GL_LIBS = [--.lib]libGLUT/l,libMesaGLU/l,libMesaGL/l,$(XLIBS) -LIB_DEP = [--.lib]$(GL_LIB) [--.lib]$(GLU_LIB) [--.lib]$(GLUT_LIB) -.endif - - -PROGS = bounce.exe;,clearspd.exe;,drawpix.exe;,gamma.exe;,gears.exe;,\ - glinfo.exe;,glutfx.exe;,isosurf.exe;,morph3d.exe;,\ - paltex.exe;,pointblast.exe;,reflect.exe;,spectex.exe;,stex3d.exe;,\ - tessdemo.exe;,texcyl.exe;,texobj.exe;,trispd.exe;,winpos.exe; - - -##### RULES ##### -.obj.exe : - cxxlink $(MMS$TARGET_NAME),$(GL_LIBS) - -##### TARGETS ##### -default : - $(MMS)$(MMSQUALIFIERS) $(PROGS) - -clean : - delete *.obj;* - -realclean : - delete $(PROGS) - delete *.obj;* - -bounce.exe; : bounce.obj $(LIB_DEP) -clearspd.exe; : clearspd.obj $(LIB_DEP) -drawpix.exe; : drawpix.obj $(LIB_DEP) [-.util]readtex.obj - cxxlink $(MMS$TARGET_NAME),[-.util]readtex.obj,$(GL_LIBS) -gamma.exe; : gamma.obj $(LIB_DEP) -gears.exe; : gears.obj $(LIB_DEP) -glinfo.exe; : glinfo.obj $(LIB_DEP) -glutfx.exe; : glutfx.obj $(LIB_DEP) -isosurf.exe; : isosurf.obj $(LIB_DEP) [-.util]readtex.obj - cxxlink $(MMS$TARGET_NAME),[-.util]readtex.obj,$(GL_LIBS) -morph3d.exe; : morph3d.obj $(LIB_DEP) -paltex.exe; : paltex.obj $(LIB_DEP) -pointblast.exe; : pointblast.obj $(LIB_DEP) -reflect.exe; : reflect.obj [-.util]readtex.obj [-.util]showbuffer.obj\ - $(LIB_DEP) - cxxlink $(MMS$TARGET_NAME),[-.util]readtex,showbuffer,$(GL_LIBS) -spectex.exe; : spectex.obj $(LIB_DEP) -stex3d.exe; : stex3d.obj $(LIB_DEP) -tessdemo.exe; : tessdemo.obj $(LIB_DEP) -texcyl.exe; : texcyl.obj [-.util]readtex.obj $(LIB_DEP) - cxxlink $(MMS$TARGET_NAME),[-.util]readtex.obj,$(GL_LIBS) -texobj.exe; : texobj.obj $(LIB_DEP) -trispd.exe; : trispd.obj $(LIB_DEP) -winpos.exe; : winpos.obj [-.util]readtex.obj $(LIB_DEP) - cxxlink $(MMS$TARGET_NAME),[-.util]readtex.obj,$(GL_LIBS) - - -bounce.obj : bounce.c -clearspd.obj : clearspd.c -drawpix.obj : drawpix.c -gamma.obj : gamma.c -gears.obj : gears.c -glinfo.obj : glinfo.c -glutfx.obj : glutfx.c -isosurf.obj : isosurf.c -morph3d.obj : morph3d.c -paltex.obj : paltex.c -pointblast.obj : pointblast.c -reflect.obj : reflect.c -spectex.obj : spectex.c -stex3d.obj : stex3d.c -tessdemo.obj : tessdemo.c -texcyl.obj : texcyl.c -texobj.obj : texobj.c -trispd.obj : trispd.c -winpos.obj : winpos.c diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/drawpix.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/drawpix.c deleted file mode 100644 index d2f5748674..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/drawpix.c +++ /dev/null @@ -1,358 +0,0 @@ - -/* - * glDrawPixels demo/test/benchmark - * - * Brian Paul September 25, 1997 This file is in the public domain. - */ - -#include -#include -#include -#include -#include - -#include "readtex.h" - -#define IMAGE_FILE "../images/girl.rgb" - -static int ImgWidth, ImgHeight; -static GLenum ImgFormat; -static GLubyte *Image = NULL; - -static int Xpos, Ypos; -static int SkipPixels, SkipRows; -static int DrawWidth, DrawHeight; -static int Scissor = 0; -static int Fog = 0; -static GLfloat Zpos = -1.0; -static float Xzoom, Yzoom; -static GLboolean DrawFront = GL_FALSE; -static GLboolean Dither = GL_TRUE; - - -static void Reset( void ) -{ - Xpos = Ypos = 20; - DrawWidth = ImgWidth; - DrawHeight = ImgHeight; - SkipPixels = SkipRows = 0; - Scissor = 0; - Fog = 0; - Zpos = -1.0; - Xzoom = Yzoom = 1.0; -} - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT ); - -#if 0 - glRasterPos2i(Xpos, Ypos); -#else - /* This allows negative raster positions: */ - glRasterPos3f(0, 0, Zpos); - glBitmap(0, 0, 0, 0, Xpos, Ypos, NULL); -#endif - - glPixelStorei(GL_UNPACK_SKIP_PIXELS, SkipPixels); - glPixelStorei(GL_UNPACK_SKIP_ROWS, SkipRows); - - glPixelZoom( Xzoom, Yzoom ); - - if (Scissor) - glEnable(GL_SCISSOR_TEST); - - if (Fog) - glEnable(GL_FOG); - - glDrawPixels(DrawWidth, DrawHeight, ImgFormat, GL_UNSIGNED_BYTE, Image); - - glDisable(GL_SCISSOR_TEST); - glDisable(GL_FOG); - - if (DrawFront) - glFinish(); - else - glutSwapBuffers(); -} - - -static void Benchmark( void ) -{ - int startTime, endTime; - int draws = 500; - double seconds, pixelsPerSecond; - - printf("Benchmarking...\n"); - /* GL set-up */ - glPixelStorei(GL_UNPACK_SKIP_PIXELS, SkipPixels); - glPixelStorei(GL_UNPACK_SKIP_ROWS, SkipRows); - glPixelZoom( Xzoom, Yzoom ); - if (Scissor) - glEnable(GL_SCISSOR_TEST); - if (Fog) - glEnable(GL_FOG); - - if (DrawFront) - glDrawBuffer(GL_FRONT); - else - glDrawBuffer(GL_BACK); - - /* Run timing test */ - draws = 0; - startTime = glutGet(GLUT_ELAPSED_TIME); - do { - glDrawPixels(DrawWidth, DrawHeight, ImgFormat, GL_UNSIGNED_BYTE, Image); - draws++; - endTime = glutGet(GLUT_ELAPSED_TIME); - } while (endTime - startTime < 4000); /* 4 seconds */ - - /* GL clean-up */ - glDisable(GL_SCISSOR_TEST); - glDisable(GL_FOG); - - /* Results */ - seconds = (double) (endTime - startTime) / 1000.0; - pixelsPerSecond = draws * DrawWidth * DrawHeight / seconds; - printf("Result: %d draws in %f seconds = %f pixels/sec\n", - draws, seconds, pixelsPerSecond); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( 0.0, width, 0.0, height, 0.0, 2.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - - glScissor(width/4, height/4, width/2, height/2); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case ' ': - Reset(); - break; - case 'd': - Dither = !Dither; - if (Dither) - glEnable(GL_DITHER); - else - glDisable(GL_DITHER); - break; - case 'w': - if (DrawWidth > 0) - DrawWidth--; - break; - case 'W': - DrawWidth++; - break; - case 'h': - if (DrawHeight > 0) - DrawHeight--; - break; - case 'H': - DrawHeight++; - break; - case 'p': - if (SkipPixels > 0) - SkipPixels--; - break; - case 'P': - SkipPixels++; - break; - case 'r': - if (SkipRows > 0) - SkipRows--; - break; - case 'R': - SkipRows++; - break; - case 's': - Scissor = !Scissor; - break; - case 'x': - Xzoom -= 0.1; - break; - case 'X': - Xzoom += 0.1; - break; - case 'y': - Yzoom -= 0.1; - break; - case 'Y': - Yzoom += 0.1; - break; - case 'z': - Zpos -= 0.1; - printf("RasterPos Z = %g\n", Zpos); - break; - case 'Z': - Zpos += 0.1; - printf("RasterPos Z = %g\n", Zpos); - break; - case 'b': - Benchmark(); - break; - case 'F': - Fog = !Fog; - printf("Fog %d\n", Fog); - break; - case 'f': - DrawFront = !DrawFront; - if (DrawFront) - glDrawBuffer(GL_FRONT); - else - glDrawBuffer(GL_BACK); - printf("glDrawBuffer(%s)\n", DrawFront ? "GL_FRONT" : "GL_BACK"); - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - Ypos += 1; - break; - case GLUT_KEY_DOWN: - Ypos -= 1; - break; - case GLUT_KEY_LEFT: - Xpos -= 1; - break; - case GLUT_KEY_RIGHT: - Xpos += 1; - break; - } - glutPostRedisplay(); -} - - -static void Init( GLboolean ciMode, const char *filename ) -{ - static const GLfloat fogColor[4] = {0, 1, 0, 0}; - - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - - Image = LoadRGBImage( filename, &ImgWidth, &ImgHeight, &ImgFormat ); - if (!Image) { - printf("Couldn't read %s\n", filename); - exit(0); - } - - if (ciMode) { - /* Convert RGB image to grayscale */ - GLubyte *indexImage = (GLubyte *) malloc( ImgWidth * ImgHeight ); - GLint i; - for (i=0; i i && strcmp(argv[i], "-ci")==0) { - ciMode = GL_TRUE; - i++; - } - if (argc > i) { - filename = argv[i]; - } - - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 500, 400 ); - - if (ciMode) - glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE ); - else - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE); - - glutCreateWindow(argv[0]); - - Init(ciMode, filename); - Usage(); - - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/fire.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/fire.c deleted file mode 100644 index dd70f6141d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/fire.c +++ /dev/null @@ -1,777 +0,0 @@ -/* - * This program is under the GNU GPL. - * Use at your own risk. - * - * written by David Bucciarelli (tech.hmw@plus.it) - * Humanware s.r.l. - */ - -#include -#include -#include -#include -#include - -#ifdef WIN32 -#include -#include -#endif - -#include -#include "readtex.h" - -#ifdef XMESA -#include "GL/xmesa.h" -static int fullscreen = 1; -#endif - -#ifndef M_PI -#define M_PI 3.1415926535 -#endif - -#define vinit(a,i,j,k) {\ - (a)[0]=i;\ - (a)[1]=j;\ - (a)[2]=k;\ -} - -#define vinit4(a,i,j,k,w) {\ - (a)[0]=i;\ - (a)[1]=j;\ - (a)[2]=k;\ - (a)[3]=w;\ -} - - -#define vadds(a,dt,b) {\ - (a)[0]+=(dt)*(b)[0];\ - (a)[1]+=(dt)*(b)[1];\ - (a)[2]+=(dt)*(b)[2];\ -} - -#define vequ(a,b) {\ - (a)[0]=(b)[0];\ - (a)[1]=(b)[1];\ - (a)[2]=(b)[2];\ -} - -#define vinter(a,dt,b,c) {\ - (a)[0]=(dt)*(b)[0]+(1.0-dt)*(c)[0];\ - (a)[1]=(dt)*(b)[1]+(1.0-dt)*(c)[1];\ - (a)[2]=(dt)*(b)[2]+(1.0-dt)*(c)[2];\ -} - -#define clamp(a) ((a) < 0.0 ? 0.0 : ((a) < 1.0 ? (a) : 1.0)) - -#define vclamp(v) {\ - (v)[0]=clamp((v)[0]);\ - (v)[1]=clamp((v)[1]);\ - (v)[2]=clamp((v)[2]);\ -} - -static int WIDTH = 640; -static int HEIGHT = 480; - -static GLint T0 = 0; -static GLint Frames = 0; -static GLint NiceFog = 1; - -#define DIMP 20.0 -#define DIMTP 16.0 - -#define RIDCOL 0.4 - -#define NUMTREE 50 -#define TREEINR 2.5 -#define TREEOUTR 8.0 - -#define AGRAV -9.8 - -typedef struct -{ - int age; - float p[3][3]; - float v[3]; - float c[3][4]; -} -part; - -static float treepos[NUMTREE][3]; - -static float black[3] = { 0.0, 0.0, 0.0 }; -static float blu[3] = { 1.0, 0.2, 0.0 }; -static float blu2[3] = { 1.0, 1.0, 0.0 }; - -static float fogcolor[4] = { 1.0, 1.0, 1.0, 1.0 }; - -static float q[4][3] = { - {-DIMP, 0.0, -DIMP}, - {DIMP, 0.0, -DIMP}, - {DIMP, 0.0, DIMP}, - {-DIMP, 0.0, DIMP} -}; - -static float qt[4][2] = { - {-DIMTP, -DIMTP}, - {DIMTP, -DIMTP}, - {DIMTP, DIMTP}, - {-DIMTP, DIMTP} -}; - -static int win = 0; - -static int np; -static float eject_r, dt, maxage, eject_vy, eject_vl; -static short shadows; -static float ridtri; -static int fog = 1; -static int help = 1; -static int joyavailable = 0; -static int joyactive = 0; - -static part *p; - -static GLuint groundid; -static GLuint treeid; - -static float obs[3] = { 2.0, 1.0, 0.0 }; -static float dir[3]; -static float v = 0.0; -static float alpha = -84.0; -static float beta = 90.0; - -static float -vrnd(void) -{ - return (((float) rand()) / RAND_MAX); -} - -static void -setnewpart(part * p) -{ - float a, v[3], *c; - - p->age = 0; - - a = vrnd() * 3.14159265359 * 2.0; - - vinit(v, sin(a) * eject_r * vrnd(), 0.15, cos(a) * eject_r * vrnd()); - vinit(p->p[0], v[0] + vrnd() * ridtri, v[1] + vrnd() * ridtri, - v[2] + vrnd() * ridtri); - vinit(p->p[1], v[0] + vrnd() * ridtri, v[1] + vrnd() * ridtri, - v[2] + vrnd() * ridtri); - vinit(p->p[2], v[0] + vrnd() * ridtri, v[1] + vrnd() * ridtri, - v[2] + vrnd() * ridtri); - - vinit(p->v, v[0] * eject_vl / (eject_r / 2), - vrnd() * eject_vy + eject_vy / 2, v[2] * eject_vl / (eject_r / 2)); - - c = blu; - - vinit4(p->c[0], c[0] * ((1.0 - RIDCOL) + vrnd() * RIDCOL), - c[1] * ((1.0 - RIDCOL) + vrnd() * RIDCOL), - c[2] * ((1.0 - RIDCOL) + vrnd() * RIDCOL), 1.0); - vinit4(p->c[1], c[0] * ((1.0 - RIDCOL) + vrnd() * RIDCOL), - c[1] * ((1.0 - RIDCOL) + vrnd() * RIDCOL), - c[2] * ((1.0 - RIDCOL) + vrnd() * RIDCOL), 1.0); - vinit4(p->c[2], c[0] * ((1.0 - RIDCOL) + vrnd() * RIDCOL), - c[1] * ((1.0 - RIDCOL) + vrnd() * RIDCOL), - c[2] * ((1.0 - RIDCOL) + vrnd() * RIDCOL), 1.0); -} - -static void -setpart(part * p) -{ - float fact; - - if (p->p[0][1] < 0.1) { - setnewpart(p); - return; - } - - p->v[1] += AGRAV * dt; - - vadds(p->p[0], dt, p->v); - vadds(p->p[1], dt, p->v); - vadds(p->p[2], dt, p->v); - - p->age++; - - if ((p->age) > maxage) { - vequ(p->c[0], blu2); - vequ(p->c[1], blu2); - vequ(p->c[2], blu2); - } - else { - fact = 1.0 / maxage; - vadds(p->c[0], fact, blu2); - vclamp(p->c[0]); - p->c[0][3] = fact * (maxage - p->age); - - vadds(p->c[1], fact, blu2); - vclamp(p->c[1]); - p->c[1][3] = fact * (maxage - p->age); - - vadds(p->c[2], fact, blu2); - vclamp(p->c[2]); - p->c[2][3] = fact * (maxage - p->age); - } -} - -static void -drawtree(float x, float y, float z) -{ - glBegin(GL_QUADS); - glTexCoord2f(0.0, 0.0); - glVertex3f(x - 1.5, y + 0.0, z); - - glTexCoord2f(1.0, 0.0); - glVertex3f(x + 1.5, y + 0.0, z); - - glTexCoord2f(1.0, 1.0); - glVertex3f(x + 1.5, y + 3.0, z); - - glTexCoord2f(0.0, 1.0); - glVertex3f(x - 1.5, y + 3.0, z); - - - glTexCoord2f(0.0, 0.0); - glVertex3f(x, y + 0.0, z - 1.5); - - glTexCoord2f(1.0, 0.0); - glVertex3f(x, y + 0.0, z + 1.5); - - glTexCoord2f(1.0, 1.0); - glVertex3f(x, y + 3.0, z + 1.5); - - glTexCoord2f(0.0, 1.0); - glVertex3f(x, y + 3.0, z - 1.5); - - glEnd(); - -} - -static void -calcposobs(void) -{ - dir[0] = sin(alpha * M_PI / 180.0); - dir[2] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0); - dir[1] = cos(beta * M_PI / 180.0); - - if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5) - dir[0] = 0; - if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5) - dir[1] = 0; - if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5) - dir[2] = 0; - - obs[0] += v * dir[0]; - obs[1] += v * dir[1]; - obs[2] += v * dir[2]; -} - -static void -printstring(void *font, char *string) -{ - int len, i; - - len = (int) strlen(string); - for (i = 0; i < len; i++) - glutBitmapCharacter(font, string[i]); -} - -static void -reshape(int width, int height) -{ - WIDTH = width; - HEIGHT = height; - glViewport(0, 0, (GLint) width, (GLint) height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(70.0, width / (float) height, 0.1, 30.0); - - glMatrixMode(GL_MODELVIEW); -} - -static void -printhelp(void) -{ - glColor4f(0.0, 0.0, 0.0, 0.5); - glRecti(40, 40, 600, 440); - - glColor3f(1.0, 0.0, 0.0); - glRasterPos2i(300, 420); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Help"); - - glRasterPos2i(60, 390); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "h - Toggle Help"); - - glRasterPos2i(60, 360); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "t - Increase particle size"); - glRasterPos2i(60, 330); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "T - Decrease particle size"); - - glRasterPos2i(60, 300); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "r - Increase emission radius"); - glRasterPos2i(60, 270); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "R - Decrease emission radius"); - - glRasterPos2i(60, 240); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "f - Toggle Fog"); - glRasterPos2i(60, 210); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "s - Toggle shadows"); - glRasterPos2i(60, 180); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Arrow Keys - Rotate"); - glRasterPos2i(60, 150); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "a - Increase velocity"); - glRasterPos2i(60, 120); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "z - Decrease velocity"); - - glRasterPos2i(60, 90); - if (joyavailable) - printstring(GLUT_BITMAP_TIMES_ROMAN_24, - "j - Toggle jostick control (Joystick control available)"); - else - printstring(GLUT_BITMAP_TIMES_ROMAN_24, - "(No Joystick control available)"); -} - -static void -dojoy(void) -{ -#ifdef WIN32 - static UINT max[2] = { 0, 0 }; - static UINT min[2] = { 0xffffffff, 0xffffffff }, center[2]; - MMRESULT res; - JOYINFO joy; - - res = joyGetPos(JOYSTICKID1, &joy); - - if (res == JOYERR_NOERROR) { - joyavailable = 1; - - if (max[0] < joy.wXpos) - max[0] = joy.wXpos; - if (min[0] > joy.wXpos) - min[0] = joy.wXpos; - center[0] = (max[0] + min[0]) / 2; - - if (max[1] < joy.wYpos) - max[1] = joy.wYpos; - if (min[1] > joy.wYpos) - min[1] = joy.wYpos; - center[1] = (max[1] + min[1]) / 2; - - if (joyactive) { - if (fabs(center[0] - (float) joy.wXpos) > 0.1 * (max[0] - min[0])) - alpha += - 2.5 * (center[0] - (float) joy.wXpos) / (max[0] - min[0]); - if (fabs(center[1] - (float) joy.wYpos) > 0.1 * (max[1] - min[1])) - beta += 2.5 * (center[1] - (float) joy.wYpos) / (max[1] - min[1]); - - if (joy.wButtons & JOY_BUTTON1) - v += 0.01; - if (joy.wButtons & JOY_BUTTON2) - v -= 0.01; - } - } - else - joyavailable = 0; -#endif -} - -static void -drawfire(void) -{ - static char frbuf[80] = ""; - int j; - static double t0 = -1.; - double t = glutGet(GLUT_ELAPSED_TIME) / 1000.0; - if (t0 < 0.0) - t0 = t; - dt = (t - t0) * 1.0; - t0 = t; - - dojoy(); - - if (NiceFog) - glHint(GL_FOG_HINT, GL_NICEST); - else - glHint(GL_FOG_HINT, GL_DONT_CARE); - - glEnable(GL_DEPTH_TEST); - - if (fog) - glEnable(GL_FOG); - else - glDisable(GL_FOG); - - glDepthMask(GL_TRUE); - glClearColor(1.0, 1.0, 1.0, 1.0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - calcposobs(); - gluLookAt(obs[0], obs[1], obs[2], - obs[0] + dir[0], obs[1] + dir[1], obs[2] + dir[2], - 0.0, 1.0, 0.0); - - glColor4f(1.0, 1.0, 1.0, 1.0); - - glEnable(GL_TEXTURE_2D); - - glBindTexture(GL_TEXTURE_2D, groundid); -#if 1 - glBegin(GL_QUADS); - glTexCoord2fv(qt[0]); - glVertex3fv(q[0]); - glTexCoord2fv(qt[1]); - glVertex3fv(q[1]); - glTexCoord2fv(qt[2]); - glVertex3fv(q[2]); - glTexCoord2fv(qt[3]); - glVertex3fv(q[3]); - glEnd(); -#else - /* Subdivide the ground into a bunch of quads. This improves fog - * if GL_FOG_HINT != GL_NICEST - */ - { - float x, y; - float dx = 1.0, dy = 1.0; - glBegin(GL_QUADS); - for (y = -DIMP; y < DIMP; y += 1.0) { - for (x = -DIMP; x < DIMP; x += 1.0) { - glTexCoord2f(0, 0); glVertex3f(x, 0, y); - glTexCoord2f(1, 0); glVertex3f(x+dx, 0, y); - glTexCoord2f(1, 1); glVertex3f(x+dx, 0, y+dy); - glTexCoord2f(0, 1); glVertex3f(x, 0, y+dy); - } - } - glEnd(); - } -#endif - - - glEnable(GL_ALPHA_TEST); - glAlphaFunc(GL_GEQUAL, 0.9); - - glBindTexture(GL_TEXTURE_2D, treeid); - for (j = 0; j < NUMTREE; j++) - drawtree(treepos[j][0], treepos[j][1], treepos[j][2]); - - glDisable(GL_TEXTURE_2D); - glDepthMask(GL_FALSE); - glDisable(GL_ALPHA_TEST); - - if (shadows) { - glBegin(GL_TRIANGLES); - for (j = 0; j < np; j++) { - glColor4f(black[0], black[1], black[2], p[j].c[0][3]); - glVertex3f(p[j].p[0][0], 0.1, p[j].p[0][2]); - - glColor4f(black[0], black[1], black[2], p[j].c[1][3]); - glVertex3f(p[j].p[1][0], 0.1, p[j].p[1][2]); - - glColor4f(black[0], black[1], black[2], p[j].c[2][3]); - glVertex3f(p[j].p[2][0], 0.1, p[j].p[2][2]); - } - glEnd(); - } - - glBegin(GL_TRIANGLES); - for (j = 0; j < np; j++) { - glColor4fv(p[j].c[0]); - glVertex3fv(p[j].p[0]); - - glColor4fv(p[j].c[1]); - glVertex3fv(p[j].p[1]); - - glColor4fv(p[j].c[2]); - glVertex3fv(p[j].p[2]); - - setpart(&p[j]); - } - glEnd(); - - glDisable(GL_TEXTURE_2D); - glDisable(GL_ALPHA_TEST); - glDisable(GL_DEPTH_TEST); - glDisable(GL_FOG); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-0.5, 639.5, -0.5, 479.5, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - glColor3f(1.0, 0.0, 0.0); - glRasterPos2i(10, 10); - printstring(GLUT_BITMAP_HELVETICA_18, frbuf); - glRasterPos2i(370, 470); - printstring(GLUT_BITMAP_HELVETICA_10, - "Fire V1.5 Written by David Bucciarelli (tech.hmw@plus.it)"); - - if (help) - printhelp(); - - reshape(WIDTH, HEIGHT); - glPopMatrix(); - - glutSwapBuffers(); - - Frames++; - { - GLint t = glutGet(GLUT_ELAPSED_TIME); - if (t - T0 >= 2000) { - GLfloat seconds = (t - T0) / 1000.0; - GLfloat fps = Frames / seconds; - sprintf(frbuf, "Frame rate: %f", fps); - T0 = t; - Frames = 0; - } - } -} - - -static void -idle(void) -{ - glutPostRedisplay(); -} - - -static void -special(int key, int x, int y) -{ - switch (key) { - case GLUT_KEY_LEFT: - alpha += 2.0; - break; - case GLUT_KEY_RIGHT: - alpha -= 2.0; - break; - case GLUT_KEY_DOWN: - beta -= 2.0; - break; - case GLUT_KEY_UP: - beta += 2.0; - break; - } - glutPostRedisplay(); -} - -static void -key(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - - case 'a': - v += 0.0005; - break; - case 'z': - v -= 0.0005; - break; - - case 'j': - joyactive = (!joyactive); - break; - case 'h': - help = (!help); - break; - case 'f': - fog = (!fog); - break; - case 's': - shadows = !shadows; - break; - case 'R': - eject_r -= 0.03; - break; - case 'r': - eject_r += 0.03; - break; - case 't': - ridtri += 0.005; - break; - case 'T': - ridtri -= 0.005; - break; -#ifdef XMESA - case ' ': - XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW); - fullscreen = (!fullscreen); - break; -#endif - case 'n': - NiceFog = !NiceFog; - printf("NiceFog %d\n", NiceFog); - break; - } - glutPostRedisplay(); -} - -static void -inittextures(void) -{ - GLenum gluerr; - GLubyte tex[128][128][4]; - - glGenTextures(1, &groundid); - glBindTexture(GL_TEXTURE_2D, groundid); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 4); - if (!LoadRGBMipmaps("../images/s128.rgb", GL_RGB)) { - fprintf(stderr, "Error reading a texture.\n"); - exit(-1); - } - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR_MIPMAP_LINEAR); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); - - glGenTextures(1, &treeid); - glBindTexture(GL_TEXTURE_2D, treeid); - - if (1) - { - int w, h; - GLenum format; - int x, y; - GLubyte *image = LoadRGBImage("../images/tree3.rgb", &w, &h, &format); - - if (!image) { - fprintf(stderr, "Error reading a texture.\n"); - exit(-1); - } - - for (y = 0; y < 128; y++) - for (x = 0; x < 128; x++) { - tex[x][y][0] = image[(y + x * 128) * 3]; - tex[x][y][1] = image[(y + x * 128) * 3 + 1]; - tex[x][y][2] = image[(y + x * 128) * 3 + 2]; - if ((tex[x][y][0] == tex[x][y][1]) && - (tex[x][y][1] == tex[x][y][2]) && (tex[x][y][2] == 255)) - tex[x][y][3] = 0; - else - tex[x][y][3] = 255; - } - - if ((gluerr = gluBuild2DMipmaps(GL_TEXTURE_2D, 4, 128, 128, GL_RGBA, - GL_UNSIGNED_BYTE, (GLvoid *) (tex)))) { - fprintf(stderr, "GLULib%s\n", (char *) gluErrorString(gluerr)); - exit(-1); - } - } - else { - if (!LoadRGBMipmaps("../images/tree2.rgba", GL_RGBA)) { - fprintf(stderr, "Error reading a texture.\n"); - exit(-1); - } - } - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR_MIPMAP_LINEAR); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); -} - -static void -inittree(void) -{ - int i; - float dist; - - for (i = 0; i < NUMTREE; i++) - do { - treepos[i][0] = vrnd() * TREEOUTR * 2.0 - TREEOUTR; - treepos[i][1] = 0.0; - treepos[i][2] = vrnd() * TREEOUTR * 2.0 - TREEOUTR; - dist = - sqrt(treepos[i][0] * treepos[i][0] + - treepos[i][2] * treepos[i][2]); - } while ((dist < TREEINR) || (dist > TREEOUTR)); -} - -int -main(int ac, char **av) -{ - int i; - - fprintf(stderr, - "Fire V1.5\nWritten by David Bucciarelli (tech.hmw@plus.it)\n"); - - /* Default settings */ - - np = 800; - eject_r = -0.65; - dt = 0.015; - eject_vy = 4; - eject_vl = 1; - shadows = 1; - ridtri = 0.25; - - maxage = 1.0 / dt; - - if (ac == 2) - np = atoi(av[1]); - - if (ac == 4) { - WIDTH = atoi(av[2]); - HEIGHT = atoi(av[3]); - } - - glutInitWindowPosition(0, 0); - glutInitWindowSize(WIDTH, HEIGHT); - glutInit(&ac, av); - - glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); - - if (!(win = glutCreateWindow("Fire"))) { - fprintf(stderr, "Error opening a window.\n"); - exit(-1); - } - - reshape(WIDTH, HEIGHT); - - inittextures(); - - glShadeModel(GL_FLAT); - glEnable(GL_DEPTH_TEST); - - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - glEnable(GL_FOG); - glFogi(GL_FOG_MODE, GL_EXP); - glFogfv(GL_FOG_COLOR, fogcolor); - glFogf(GL_FOG_DENSITY, 0.1); - - p = (part *) malloc(sizeof(part) * np); - - for (i = 0; i < np; i++) - setnewpart(&p[i]); - - inittree(); - - glutKeyboardFunc(key); - glutSpecialFunc(special); - glutDisplayFunc(drawfire); - glutIdleFunc(idle); - glutReshapeFunc(reshape); - glutMainLoop(); - - return (0); -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/fogcoord.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/fogcoord.c deleted file mode 100644 index 19a15f05b8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/fogcoord.c +++ /dev/null @@ -1,420 +0,0 @@ -/* - * EXT_fog_coord. - * - * Based on glutskel.c by Brian Paul - * and NeHe's Volumetric fog tutorial! - * - * Daniel Borca - */ - - -#include -#include -#include -#include - -#include "readtex.h" - -#define TEXTURE_FILE "../images/bw.rgb" - -#define ARRAYS 0 /* use glDrawElements */ - -#define VERBOSE 1 /* tell me what happens */ - -#define DEPTH 15.0f - -#if !defined(GLAPIENTRYP) -# define GLAPIENTRYP * -#endif - -typedef void (GLAPIENTRYP GLFOGCOORDFEXTPROC) (GLfloat f); -typedef void (GLAPIENTRYP GLFOGCOORDPOINTEREXTPROC) (GLenum, GLsizei, const GLvoid *); - -static GLFOGCOORDFEXTPROC glFogCoordf_ext; -#if ARRAYS -static GLFOGCOORDPOINTEREXTPROC glFogCoordPointer_ext; -#endif -static GLboolean have_fog_coord; - -static GLfloat camz; -static GLuint texture[1]; - -static GLint fogMode; -static GLboolean fogCoord; -static GLfloat fogDensity = 0.75; -static GLfloat fogStart = 1.0, fogEnd = 40.0; -static GLfloat fogColor[4] = {0.6f, 0.3f, 0.0f, 1.0f}; - - -static void APIENTRY glFogCoordf_nop (GLfloat f) -{ - (void)f; -} - - -static int BuildTexture (const char *filename, GLuint texid[]) -{ - GLubyte *tex_data; - GLenum tex_format; - GLint tex_width, tex_height; - - tex_data = LoadRGBImage(filename, &tex_width, &tex_height, &tex_format); - if (tex_data == NULL) { - return -1; - } - - { - GLint tex_max; - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &tex_max); - if ((tex_width > tex_max) || (tex_height > tex_max)) { - return -1; - } - } - - glGenTextures(1, texid); - - glBindTexture(GL_TEXTURE_2D, texid[0]); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - glTexImage2D(GL_TEXTURE_2D, 0, tex_format, tex_width, tex_height, 0, - tex_format, GL_UNSIGNED_BYTE, tex_data); - - return 0; -} - - -static int SetFogMode (GLint fogMode) -{ - fogMode &= 3; - switch (fogMode) { - case 0: - glDisable(GL_FOG); -#if VERBOSE - printf("fog(disable)\n"); -#endif - break; - case 1: - glEnable(GL_FOG); - glFogi(GL_FOG_MODE, GL_LINEAR); - glFogf(GL_FOG_START, fogStart); - glFogf(GL_FOG_END, fogEnd); -#if VERBOSE - printf("fog(GL_LINEAR, %.2f, %.2f)\n", fogStart, fogEnd); -#endif - break; - case 2: - glEnable(GL_FOG); - glFogi(GL_FOG_MODE, GL_EXP); - glFogf(GL_FOG_DENSITY, fogDensity); -#if VERBOSE - printf("fog(GL_EXP, %.2f)\n", fogDensity); -#endif - break; - case 3: - glEnable(GL_FOG); - glFogi(GL_FOG_MODE, GL_EXP2); - glFogf(GL_FOG_DENSITY, fogDensity); -#if VERBOSE - printf("fog(GL_EXP2, %.2f)\n", fogDensity); -#endif - break; - } - return fogMode; -} - - -static GLboolean SetFogCoord (GLboolean fogCoord) -{ - glFogCoordf_ext = glFogCoordf_nop; - - if (!have_fog_coord) { -#if VERBOSE - printf("fog(GL_FRAGMENT_DEPTH_EXT)%s\n", fogCoord ? " EXT_fog_coord not available!" : ""); -#endif - return GL_FALSE; - } - - if (fogCoord) { - glFogCoordf_ext = (GLFOGCOORDFEXTPROC)glutGetProcAddress("glFogCoordfEXT"); - glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT); -#if VERBOSE - printf("fog(GL_FOG_COORDINATE_EXT)\n"); -#endif - } else { - glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT); -#if VERBOSE - printf("fog(GL_FRAGMENT_DEPTH_EXT)\n"); -#endif - } - return fogCoord; -} - - -#if ARRAYS -/* could reuse vertices */ -static GLuint vertex_index[] = { - /* Back */ - 0, 1, 2, 3, - - /* Floor */ - 4, 5, 6, 7, - - /* Roof */ - 8, 9, 10, 11, - - /* Right */ - 12, 13, 14, 15, - - /* Left */ - 16, 17, 18, 19 -}; - -static GLfloat vertex_pointer[][3] = { - /* Back */ - {-2.5f,-2.5f,-DEPTH}, { 2.5f,-2.5f,-DEPTH}, { 2.5f, 2.5f,-DEPTH}, {-2.5f, 2.5f,-DEPTH}, - - /* Floor */ - {-2.5f,-2.5f,-DEPTH}, { 2.5f,-2.5f,-DEPTH}, { 2.5f,-2.5f, DEPTH}, {-2.5f,-2.5f, DEPTH}, - - /* Roof */ - {-2.5f, 2.5f,-DEPTH}, { 2.5f, 2.5f,-DEPTH}, { 2.5f, 2.5f, DEPTH}, {-2.5f, 2.5f, DEPTH}, - - /* Right */ - { 2.5f,-2.5f, DEPTH}, { 2.5f, 2.5f, DEPTH}, { 2.5f, 2.5f,-DEPTH}, { 2.5f,-2.5f,-DEPTH}, - - /* Left */ - {-2.5f,-2.5f, DEPTH}, {-2.5f, 2.5f, DEPTH}, {-2.5f, 2.5f,-DEPTH}, {-2.5f,-2.5f,-DEPTH} -}; - -static GLfloat texcoord_pointer[][2] = { - /* Back */ - {0.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}, {0.0f, 1.0f}, - - /* Floor */ - {0.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}, {0.0f, 1.0f}, - - /* Roof */ - {0.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}, {0.0f, 1.0f}, - - /* Right */ - {0.0f, 0.0f}, {0.0f, 1.0f}, {1.0f, 1.0f}, {1.0f, 0.0f}, - - /* Left */ - {0.0f, 0.0f}, {0.0f, 1.0f}, {1.0f, 1.0f}, {1.0f, 0.0f} -}; - -static GLfloat fogcoord_pointer[][1] = { - /* Back */ - {1.0f}, {1.0f}, {1.0f}, {1.0f}, - - /* Floor */ - {1.0f}, {1.0f}, {0.0f}, {0.0f}, - - /* Roof */ - {1.0f}, {1.0f}, {0.0f}, {0.0f}, - - /* Right */ - {0.0f}, {0.0f}, {1.0f}, {1.0f}, - - /* Left */ - {0.0f}, {0.0f}, {1.0f}, {1.0f} -}; -#endif - - -static void Display( void ) -{ - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glLoadIdentity (); - - glTranslatef(0.0f, 0.0f, camz); - -#if ARRAYS - glDrawElements(GL_QUADS, sizeof(vertex_index) / sizeof(vertex_index[0]), GL_UNSIGNED_INT, vertex_index); -#else - /* Back */ - glBegin(GL_QUADS); - glFogCoordf_ext(1.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f(-2.5f,-2.5f,-DEPTH); - glFogCoordf_ext(1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f( 2.5f,-2.5f,-DEPTH); - glFogCoordf_ext(1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f( 2.5f, 2.5f,-DEPTH); - glFogCoordf_ext(1.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-2.5f, 2.5f,-DEPTH); - glEnd(); - - /* Floor */ - glBegin(GL_QUADS); - glFogCoordf_ext(1.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f(-2.5f,-2.5f,-DEPTH); - glFogCoordf_ext(1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f( 2.5f,-2.5f,-DEPTH); - glFogCoordf_ext(0.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f( 2.5f,-2.5f, DEPTH); - glFogCoordf_ext(0.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-2.5f,-2.5f, DEPTH); - glEnd(); - - /* Roof */ - glBegin(GL_QUADS); - glFogCoordf_ext(1.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f(-2.5f, 2.5f,-DEPTH); - glFogCoordf_ext(1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f( 2.5f, 2.5f,-DEPTH); - glFogCoordf_ext(0.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f( 2.5f, 2.5f, DEPTH); - glFogCoordf_ext(0.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-2.5f, 2.5f, DEPTH); - glEnd(); - - /* Right */ - glBegin(GL_QUADS); - glFogCoordf_ext(0.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f( 2.5f,-2.5f, DEPTH); - glFogCoordf_ext(0.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f( 2.5f, 2.5f, DEPTH); - glFogCoordf_ext(1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f( 2.5f, 2.5f,-DEPTH); - glFogCoordf_ext(1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f( 2.5f,-2.5f,-DEPTH); - glEnd(); - - /* Left */ - glBegin(GL_QUADS); - glFogCoordf_ext(0.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f(-2.5f,-2.5f, DEPTH); - glFogCoordf_ext(0.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-2.5f, 2.5f, DEPTH); - glFogCoordf_ext(1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f(-2.5f, 2.5f,-DEPTH); - glFogCoordf_ext(1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f(-2.5f,-2.5f,-DEPTH); - glEnd(); -#endif - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport(0, 0, width, height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(45.0f, (GLfloat)(width)/(GLfloat)(height), 0.1f, 100.0f); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 'f': - fogMode = SetFogMode(fogMode + 1); - break; - case '+': - if (fogDensity < 1.0) { - fogDensity += 0.05; - } - SetFogMode(fogMode); - break; - case '-': - if (fogDensity > 0.0) { - fogDensity -= 0.05; - } - SetFogMode(fogMode); - break; - case 's': - if (fogStart > 0.0) { - fogStart -= 1.0; - } - SetFogMode(fogMode); - break; - case 'S': - if (fogStart < fogEnd) { - fogStart += 1.0; - } - SetFogMode(fogMode); - break; - case 'e': - if (fogEnd > fogStart) { - fogEnd -= 1.0; - } - SetFogMode(fogMode); - break; - case 'E': - if (fogEnd < 100.0) { - fogEnd += 1.0; - } - SetFogMode(fogMode); - break; - case 'c': - fogCoord = SetFogCoord(fogCoord ^ GL_TRUE); - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - if (camz < (DEPTH - 1.0)) { - camz += 1.0f; - } - break; - case GLUT_KEY_DOWN: - if (camz > -19.0) { - camz -= 1.0f; - } - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - have_fog_coord = glutExtensionSupported("GL_EXT_fog_coord"); - - if (BuildTexture(TEXTURE_FILE, texture) == -1) { - exit(1); - } - - glEnable(GL_TEXTURE_2D); - glClearColor(0.0f, 0.0f, 0.0f, 0.5f); - glClearDepth(1.0f); - glDepthFunc(GL_LEQUAL); - glEnable(GL_DEPTH_TEST); - glShadeModel(GL_SMOOTH); - glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); - - glFogfv(GL_FOG_COLOR, fogColor); - glHint(GL_FOG_HINT, GL_NICEST); - fogCoord = SetFogCoord(GL_TRUE); /* try to enable fog_coord */ - fogMode = SetFogMode(2); /* GL_EXP */ - - camz = -19.0f; - -#if ARRAYS - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, 0, vertex_pointer); - - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, 0, texcoord_pointer); - - if (have_fog_coord) { - glFogCoordPointer_ext = (GLFOGCOORDPOINTEREXTPROC)glutGetProcAddress("glFogCoordPointerEXT"); - glEnableClientState(GL_FOG_COORDINATE_ARRAY_EXT); - glFogCoordPointer_ext(GL_FLOAT, 0, fogcoord_pointer); - } -#endif -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 640, 480 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/fplight.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/fplight.c deleted file mode 100644 index c7a38248d3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/fplight.c +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Use GL_NV_fragment_program to implement per-pixel lighting. - * - * Brian Paul - * 7 April 2003 - */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - - -static GLfloat Diffuse[4] = { 0.5, 0.5, 1.0, 1.0 }; -static GLfloat Specular[4] = { 0.8, 0.8, 0.8, 1.0 }; -static GLfloat LightPos[4] = { 0.0, 10.0, 20.0, 1.0 }; -static GLfloat Delta = 1.0; - -static GLuint FragProg; -static GLuint VertProg; -static GLboolean Anim = GL_TRUE; -static GLboolean Wire = GL_FALSE; -static GLboolean PixelLight = GL_TRUE; - -static GLfloat Xrot = 0, Yrot = 0; - - -#define NAMED_PARAMETER4FV(prog, name, v) \ - glProgramNamedParameter4fvNV(prog, strlen(name), (const GLubyte *) name, v) - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - if (PixelLight) { -#if defined(GL_NV_fragment_program) - NAMED_PARAMETER4FV(FragProg, "LightPos", LightPos); - glEnable(GL_FRAGMENT_PROGRAM_NV); - glEnable(GL_VERTEX_PROGRAM_NV); -#endif - glDisable(GL_LIGHTING); - } - else { - glLightfv(GL_LIGHT0, GL_POSITION, LightPos); -#if defined(GL_NV_fragment_program) - glDisable(GL_FRAGMENT_PROGRAM_NV); - glDisable(GL_VERTEX_PROGRAM_NV); -#endif - glEnable(GL_LIGHTING); - } - - glPushMatrix(); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - -#if 1 - glutSolidSphere(2.0, 10, 5); -#else - { - GLUquadricObj *q = gluNewQuadric(); - gluQuadricNormals(q, GL_SMOOTH); - gluQuadricTexture(q, GL_TRUE); - glRotatef(90, 1, 0, 0); - glTranslatef(0, 0, -1); - gluCylinder(q, 1.0, 1.0, 2.0, 24, 1); - gluDeleteQuadric(q); - } -#endif - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Idle(void) -{ - LightPos[0] += Delta; - if (LightPos[0] > 25.0) - Delta = -1.0; - else if (LightPos[0] <- 25.0) - Delta = 1.0; - glutPostRedisplay(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - /*glOrtho( -2.0, 2.0, -2.0, 2.0, 5.0, 25.0 );*/ - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case ' ': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 'x': - LightPos[0] -= 1.0; - break; - case 'X': - LightPos[0] += 1.0; - break; - case 'w': - Wire = !Wire; - if (Wire) - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - else - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - break; - case 'p': - PixelLight = !PixelLight; - if (PixelLight) { - printf("Per-pixel lighting\n"); - } - else { - printf("Conventional lighting\n"); - } - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - -static void SpecialKey( int key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - Xrot -= step; - break; - case GLUT_KEY_DOWN: - Xrot += step; - break; - case GLUT_KEY_LEFT: - Yrot -= step; - break; - case GLUT_KEY_RIGHT: - Yrot += step; - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - static const char *fragProgramText = - "!!FP1.0\n" - "DECLARE Diffuse; \n" - "DECLARE Specular; \n" - "DECLARE LightPos; \n" - - "# Compute normalized LightPos, put it in R0\n" - "DP3 R0.x, LightPos, LightPos;\n" - "RSQ R0.y, R0.x;\n" - "MUL R0, LightPos, R0.y;\n" - - "# Compute normalized normal, put it in R1\n" - "DP3 R1, f[TEX0], f[TEX0]; \n" - "RSQ R1.y, R1.x;\n" - "MUL R1, f[TEX0], R1.y;\n" - - "# Compute dot product of light direction and normal vector\n" - "DP3_SAT R2, R0, R1;" - - "MUL R3, Diffuse, R2; # diffuse attenuation\n" - - "POW R4, R2.x, {20.0}.x; # specular exponent\n" - - "MUL R5, Specular, R4; # specular attenuation\n" - - "ADD o[COLR], R3, R5; # add diffuse and specular colors\n" - "END \n" - ; - - static const char *vertProgramText = - "!!VP1.0\n" - "# typical modelview/projection transform\n" - "DP4 o[HPOS].x, c[0], v[OPOS] ;\n" - "DP4 o[HPOS].y, c[1], v[OPOS] ;\n" - "DP4 o[HPOS].z, c[2], v[OPOS] ;\n" - "DP4 o[HPOS].w, c[3], v[OPOS] ;\n" - "# transform normal by inv transpose of modelview, put in tex0\n" - "DP3 o[TEX0].x, c[4], v[NRML] ;\n" - "DP3 o[TEX0].y, c[5], v[NRML] ;\n" - "DP3 o[TEX0].z, c[6], v[NRML] ;\n" - "DP3 o[TEX0].w, c[7], v[NRML] ;\n" - "END\n"; - ; - - if (!glutExtensionSupported("GL_NV_vertex_program")) { - printf("Sorry, this demo requires GL_NV_vertex_program\n"); - exit(1); - } - if (!glutExtensionSupported("GL_NV_fragment_program")) { - printf("Sorry, this demo requires GL_NV_fragment_program\n"); - exit(1); - } - -#if defined(GL_NV_fragment_program) - glGenProgramsNV(1, &FragProg); - assert(FragProg > 0); - glGenProgramsNV(1, &VertProg); - assert(VertProg > 0); - - /* - * Fragment program - */ - glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, FragProg, - strlen(fragProgramText), - (const GLubyte *) fragProgramText); - assert(glIsProgramNV(FragProg)); - glBindProgramNV(GL_FRAGMENT_PROGRAM_NV, FragProg); - - NAMED_PARAMETER4FV(FragProg, "Diffuse", Diffuse); - NAMED_PARAMETER4FV(FragProg, "Specular", Specular); - - /* - * Vertex program - */ - glLoadProgramNV(GL_VERTEX_PROGRAM_NV, VertProg, - strlen(vertProgramText), - (const GLubyte *) vertProgramText); - assert(glIsProgramNV(VertProg)); - glBindProgramNV(GL_VERTEX_PROGRAM_NV, VertProg); - glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 0, GL_MODELVIEW_PROJECTION_NV, GL_IDENTITY_NV); - glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 4, GL_MODELVIEW, GL_INVERSE_TRANSPOSE_NV); -#endif - - /* - * Misc init - */ - glClearColor(0.3, 0.3, 0.3, 0.0); - glEnable(GL_DEPTH_TEST); - glEnable(GL_LIGHT0); - glEnable(GL_LIGHTING); - glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, Diffuse); - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, Specular); - glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 20.0); - - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("Press p to toggle between per-pixel and per-vertex lighting\n"); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 200, 200 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - if (Anim) - glutIdleFunc(Idle); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/gamma.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/gamma.c deleted file mode 100644 index 9b2c3e1052..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/gamma.c +++ /dev/null @@ -1,162 +0,0 @@ - -/* Draw test patterns to help determine correct gamma value for a display. - When the intensities of the inner squares nearly match the intensities - of their frames (from some distance the borders should disappear) then - you've found the right gamma value. - - You can set Mesa's gamma values (for red, green and blue) with the - MESA_GAMMA environment variable. But only on X windows! - For example: - setenv MESA_GAMMA 1.5 1.6 1.4 - Sets the red gamma value to 1.5, green to 1.6 and blue to 1.4. - See the main README file for more information. - - For more info about gamma correction see: - http://www.inforamp.net/~poynton/notes/colour_and_gamma/GammaFAQ.html - - This program is in the public domain - - Brian Paul 19 Oct 1995 - Kai Schuetz 05 Jun 1999 */ - -/* Conversion to GLUT by Mark J. Kilgard */ - - -#include -#include -#include -#include - -static void -Reshape(int width, int height) -{ - glViewport(0, 0, (GLint) width, (GLint) height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glShadeModel(GL_FLAT); -} - -/* ARGSUSED1 */ -static void -key_esc(unsigned char key, int x, int y) -{ - if(key == 27) exit(0); /* Exit on Escape */ -} - -static GLubyte p25[] = { - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, -}; - -static GLubyte p50[] = { - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, -}; - -static GLubyte p75[] = { - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, - 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, -}; - -static GLubyte *stippletab[4] = {NULL, p25, p50, p75}; - -static void -gamma_ramp(GLfloat yoffs, GLfloat r, GLfloat g, GLfloat b) -{ - GLint d; - - glColor3f(0.0, 0.0, 0.0); /* solid black, no stipple */ - glRectf(-1.0, yoffs, -0.6, yoffs + 0.5); - - for(d = 1; d < 4; d++) { /* increasing density from 25% to 75% */ - GLfloat xcoord = (-1.0 + d*0.4); - GLfloat t = d * 0.25; - - glColor3f(r*t, g*t, b*t); /* draw outer rect */ - glRectf(xcoord, yoffs, xcoord+0.4, yoffs + 0.5); - - glColor3f(0.0, 0.0, 0.0); /* "clear" inner rect */ - glRectf(xcoord + 0.1, yoffs + 0.125, xcoord + 0.3, yoffs + 0.375); - - glColor3f(r, g, b); /* draw stippled inner rect */ - glEnable(GL_POLYGON_STIPPLE); - glPolygonStipple(stippletab[d]); - glRectf(xcoord + 0.1, yoffs + 0.125, xcoord + 0.3, yoffs + 0.375); - glDisable(GL_POLYGON_STIPPLE); - } - glColor3f(r, g, b); /* solid color, no stipple */ - glRectf(0.6, yoffs, 1.0, yoffs + 0.5); -} - -static void -display(void) -{ - gamma_ramp( 0.5, 1.0, 1.0, 1.0); /* white ramp */ - gamma_ramp( 0.0, 1.0, 0.0, 0.0); /* red ramp */ - gamma_ramp(-0.5, 0.0, 1.0, 0.0); /* green ramp */ - gamma_ramp(-1.0, 0.0, 0.0, 1.0); /* blue ramp */ - glFlush(); -} - -int -main(int argc, char **argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE); - - glutInitWindowPosition(50, 50); - glutInitWindowSize(500, 400); - - glutCreateWindow("gamma test patterns"); - glutReshapeFunc(Reshape); - glutDisplayFunc(display); - glutKeyboardFunc(key_esc); - - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/gears.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/gears.c deleted file mode 100644 index ab9bc00742..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/gears.c +++ /dev/null @@ -1,381 +0,0 @@ -/* - * 3-D gear wheels. This program is in the public domain. - * - * Command line options: - * -info print GL implementation information - * -exit automatically exit after 30 seconds - * - * - * Brian Paul - */ - -/* Conversion to GLUT by Mark J. Kilgard */ - - - -#include -#include -#include -#include -#include - -#ifndef M_PI -#define M_PI 3.14159265 -#endif - -static GLint T0 = 0; -static GLint Frames = 0; -static GLint autoexit = 0; -static GLint win = 0; - - -/** - - Draw a gear wheel. You'll probably want to call this function when - building a display list since we do a lot of trig here. - - Input: inner_radius - radius of hole at center - outer_radius - radius at center of teeth - width - width of gear - teeth - number of teeth - tooth_depth - depth of tooth - - **/ - -static void -gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, - GLint teeth, GLfloat tooth_depth) -{ - GLint i; - GLfloat r0, r1, r2; - GLfloat angle, da; - GLfloat u, v, len; - - r0 = inner_radius; - r1 = outer_radius - tooth_depth / 2.0; - r2 = outer_radius + tooth_depth / 2.0; - - da = 2.0 * M_PI / teeth / 4.0; - - glShadeModel(GL_FLAT); - - glNormal3f(0.0, 0.0, 1.0); - - /* draw front face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - if (i < teeth) { - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); - } - } - glEnd(); - - /* draw front sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); - } - glEnd(); - - glNormal3f(0.0, 0.0, -1.0); - - /* draw back face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - if (i < teeth) { - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - } - } - glEnd(); - - /* draw back sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - } - glEnd(); - - /* draw outward faces of teeth */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - u = r2 * cos(angle + da) - r1 * cos(angle); - v = r2 * sin(angle + da) - r1 * sin(angle); - len = sqrt(u * u + v * v); - u /= len; - v /= len; - glNormal3f(v, -u, 0.0); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5); - u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); - v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); - glNormal3f(v, -u, 0.0); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - } - - glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5); - glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5); - - glEnd(); - - glShadeModel(GL_SMOOTH); - - /* draw inside radius cylinder */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glNormal3f(-cos(angle), -sin(angle), 0.0); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - } - glEnd(); - -} - -static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0; -static GLint gear1, gear2, gear3; -static GLfloat angle = 0.0; - -static void -cleanup(void) -{ - glDeleteLists(gear1, 1); - glDeleteLists(gear2, 1); - glDeleteLists(gear3, 1); - glutDestroyWindow(win); -} - -static void -draw(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - glRotatef(view_rotx, 1.0, 0.0, 0.0); - glRotatef(view_roty, 0.0, 1.0, 0.0); - glRotatef(view_rotz, 0.0, 0.0, 1.0); - - glPushMatrix(); - glTranslatef(-3.0, -2.0, 0.0); - glRotatef(angle, 0.0, 0.0, 1.0); - glCallList(gear1); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(3.1, -2.0, 0.0); - glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0); - glCallList(gear2); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(-3.1, 4.2, 0.0); - glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0); - glCallList(gear3); - glPopMatrix(); - - glPopMatrix(); - - glutSwapBuffers(); - - Frames++; - - { - GLint t = glutGet(GLUT_ELAPSED_TIME); - if (t - T0 >= 5000) { - GLfloat seconds = (t - T0) / 1000.0; - GLfloat fps = Frames / seconds; - printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps); - T0 = t; - Frames = 0; - if ((t >= 999.0 * autoexit) && (autoexit)) { - cleanup(); - exit(0); - } - } - } -} - - -static void -idle(void) -{ - static double t0 = -1.; - double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0; - if (t0 < 0.0) - t0 = t; - dt = t - t0; - t0 = t; - - angle += 70.0 * dt; /* 70 degrees per second */ - angle = fmod(angle, 360.0); /* prevents eventual overflow */ - - glutPostRedisplay(); -} - -/* change view angle, exit upon ESC */ -/* ARGSUSED1 */ -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 'z': - view_rotz += 5.0; - break; - case 'Z': - view_rotz -= 5.0; - break; - case 27: /* Escape */ - cleanup(); - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* change view angle */ -/* ARGSUSED1 */ -static void -special(int k, int x, int y) -{ - switch (k) { - case GLUT_KEY_UP: - view_rotx += 5.0; - break; - case GLUT_KEY_DOWN: - view_rotx -= 5.0; - break; - case GLUT_KEY_LEFT: - view_roty += 5.0; - break; - case GLUT_KEY_RIGHT: - view_roty -= 5.0; - break; - default: - return; - } - glutPostRedisplay(); -} - -/* new window size or exposure */ -static void -reshape(int width, int height) -{ - GLfloat h = (GLfloat) height / (GLfloat) width; - - glViewport(0, 0, (GLint) width, (GLint) height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -40.0); -} - -static void -init(int argc, char *argv[]) -{ - static GLfloat pos[4] = {5.0, 5.0, 10.0, 0.0}; - static GLfloat red[4] = {0.8, 0.1, 0.0, 1.0}; - static GLfloat green[4] = {0.0, 0.8, 0.2, 1.0}; - static GLfloat blue[4] = {0.2, 0.2, 1.0, 1.0}; - GLint i; - - glLightfv(GL_LIGHT0, GL_POSITION, pos); - glEnable(GL_CULL_FACE); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - /* make the gears */ - gear1 = glGenLists(1); - glNewList(gear1, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); - gear(1.0, 4.0, 1.0, 20, 0.7); - glEndList(); - - gear2 = glGenLists(1); - glNewList(gear2, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); - gear(0.5, 2.0, 2.0, 10, 0.7); - glEndList(); - - gear3 = glGenLists(1); - glNewList(gear3, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); - gear(1.3, 2.0, 0.5, 10, 0.7); - glEndList(); - - glEnable(GL_NORMALIZE); - - for ( i=1; i - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * SHOBHAN KUMAR DUTTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT - * OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - - -#include -#include -#include -#include -#include - -#ifndef min -#define min(x, y) ( x < y ? x : y ) -#endif - -#ifndef M_PI -#define M_PI 3.14159265 -#endif /* */ -typedef GLfloat TDA[4]; - -TDA background; - - -struct AXLE - { - char name[20]; - GLint id; - GLfloat radius; - GLint axis; - TDA color; - TDA position; - GLfloat length; - GLint motored; - GLfloat angular_velocity; - GLint direction; - }; - - -struct GEAR - { - char name[20]; - char type[7]; - GLint face; - GLint id; - GLfloat radius; - GLfloat width; - GLint teeth; - GLfloat tooth_depth; - GLfloat angle; - GLfloat angular_velocity; - TDA color; - GLint relative_position; - TDA position; - char axle_name[20]; - GLint axis; - GLint direction; - GLint motored; - }; - - -struct BELT - { - char name[20]; - GLint id; - char gear1_name[20]; - char gear2_name[20]; - }; - - -FILE * mainfile; -struct GEAR g[10]; -struct AXLE a[10]; -struct BELT b[10]; -int number_of_gears; -int number_of_axles; -int number_of_belts; - - -char Buf1[256], Buf2[256], Buf3[256], Buf4[256], Buf5[256]; - -static GLint T0 = 0; -static GLint Frames = 0; - - -#ifndef _WIN32 -static void -strset (char buf[], char ch) -{ - int i; - for (i = 0; i < strlen (buf); i++) - buf[i] = ch; -} -#endif - - -static void -Clear_Buffers () -{ - strset (Buf1, 0); - strset (Buf2, 0); - strset (Buf3, 0); - strset (Buf4, 0); - strset (Buf5, 0); -} - - -static void -LoadTriplet (TDA A) -{ - Clear_Buffers (); - fscanf (mainfile, "%s %s %s %s", Buf1, Buf2, Buf3, Buf4); - A[0] = atof (Buf2); - A[1] = atof (Buf3); - A[2] = atof (Buf4); -} - - -static void -LoadReal (float *a) -{ - Clear_Buffers (); - fscanf (mainfile, "%s %s", Buf1, Buf2); - *a = atof (Buf2); -} - - -static void -LoadInteger (int *a) -{ - Clear_Buffers (); - fscanf (mainfile, "%s %s", Buf1, Buf2); - *a = atoi (Buf2); -} - - -static void -LoadText (char *a) -{ - Clear_Buffers (); - fscanf (mainfile, "%s %s", Buf1, Buf2); - strcpy (a, Buf2); -} - - -static void -getdata (char filename[]) -{ - int gear_count = 0, axle_count = 0, belt_count = 0, i; - - mainfile = fopen (filename, "r"); - if (!mainfile) { - printf("Error: couldn't open %s\n", filename); - exit(-1); - } - - do - { - Clear_Buffers (); - fscanf (mainfile, "%s", Buf1); - if (ferror (mainfile)) - { - printf ("\nError opening file !\n"); - exit (1); - } - - if (!(strcmp (Buf1, "BACKGROUND"))) - LoadTriplet (background); - - if (!(strcmp (Buf1, "ANAME"))) - { - LoadText (a[axle_count].name); - axle_count++; - } - - if (!(strcmp (Buf1, "ARADIUS"))) - LoadReal (&a[axle_count - 1].radius); - - if (!(strcmp (Buf1, "AAXIS"))) - LoadInteger (&a[axle_count - 1].axis); - - if (!(strcmp (Buf1, "ACOLOR"))) - LoadTriplet (a[axle_count - 1].color); - - if (!(strcmp (Buf1, "APOSITION"))) - LoadTriplet (a[axle_count - 1].position); - - if (!(strcmp (Buf1, "ALENGTH"))) - LoadReal (&a[axle_count - 1].length); - - if (!(strcmp (Buf1, "AMOTORED"))) - LoadInteger (&a[axle_count - 1].motored); - - if (!(strcmp (Buf1, "AANGULARVELOCITY"))) - LoadReal (&a[axle_count - 1].angular_velocity); - - if (!(strcmp (Buf1, "ADIRECTION"))) - LoadInteger (&a[axle_count - 1].direction); - - if (!(strcmp (Buf1, "GNAME"))) - { - LoadText (g[gear_count].name); - gear_count++; - } - - if (!(strcmp (Buf1, "GTYPE"))) - LoadText (g[gear_count - 1].type); - - if (!(strcmp (Buf1, "GFACE"))) - LoadInteger (&g[gear_count - 1].face); - - if (!(strcmp (Buf1, "GRADIUS"))) - LoadReal (&g[gear_count - 1].radius); - - if (!(strcmp (Buf1, "GWIDTH"))) - LoadReal (&g[gear_count - 1].width); - - if (!(strcmp (Buf1, "GTEETH"))) - LoadInteger (&g[gear_count - 1].teeth); - - if (!(strcmp (Buf1, "GTOOTHDEPTH"))) - LoadReal (&g[gear_count - 1].tooth_depth); - - if (!(strcmp (Buf1, "GCOLOR"))) - LoadTriplet (g[gear_count - 1].color); - - if (!(strcmp (Buf1, "GAXLE"))) - LoadText (g[gear_count - 1].axle_name); - - if (!(strcmp (Buf1, "GPOSITION"))) - LoadInteger (&g[gear_count - 1].relative_position); - - if (!(strcmp (Buf1, "BELTNAME"))) - { - LoadText (b[belt_count].name); - belt_count++; - } - - if (!(strcmp (Buf1, "GEAR1NAME"))) - LoadText (b[belt_count - 1].gear1_name); - - if (!(strcmp (Buf1, "GEAR2NAME"))) - LoadText (b[belt_count - 1].gear2_name); - } - - while (Buf1[0] != 0); - - for (i = 0; i < number_of_gears; i++) - { - g[i].axis = -1; - g[i].direction = 0; - g[i].angular_velocity = 0.0; - } - - number_of_gears = gear_count; - number_of_axles = axle_count; - number_of_belts = belt_count; - fclose (mainfile); -} - - -static void -axle (GLint j, GLfloat radius, GLfloat length) -{ - GLfloat angle, rad, incr = 10.0 * M_PI / 180.0; - - /* draw main cylinder */ - glBegin (GL_QUADS); - for (angle = 0.0; angle < 360.0; angle += 5.0) - { - rad = angle * M_PI / 180.0; - glNormal3f (cos (rad), sin (rad), 0.0); - glVertex3f (radius * cos (rad), radius * sin (rad), length / 2); - glVertex3f (radius * cos (rad), radius * sin (rad), -length / 2); - glVertex3f (radius * cos (rad + incr), radius * sin (rad + incr), -length / 2); - glVertex3f (radius * cos (rad + incr), radius * sin (rad + incr), length / 2); - } - glEnd (); - - /* draw front face */ - glNormal3f (0.0, 0.0, 1.0); - glBegin (GL_TRIANGLES); - for (angle = 0.0; angle < 360.0; angle += 5.0) - { - rad = angle * M_PI / 180.0; - glVertex3f (0.0, 0.0, length / 2); - glVertex3f (radius * cos (rad), radius * sin (rad), length / 2); - glVertex3f (radius * cos (rad + incr), radius * sin (rad + incr), length / 2); - glVertex3f (0.0, 0.0, length / 2); - } - glEnd (); - - /* draw back face */ - glNormal3f (0.0, 0.0, -1.0); - glBegin (GL_TRIANGLES); - for (angle = 0.0; angle <= 360.0; angle += 5.0) - { - rad = angle * M_PI / 180.0; - glVertex3f (0.0, 0.0, -length / 2); - glVertex3f (radius * cos (rad), radius * sin (rad), -length / 2); - glVertex3f (radius * cos (rad + incr), radius * sin (rad + incr), -length / 2); - glVertex3f (0.0, 0.0, -length / 2); - } - glEnd (); -} - - - -static void -gear (GLint j, char type[], GLfloat radius, GLfloat width, - GLint teeth, GLfloat tooth_depth) -{ - GLint i; - GLfloat r1, r2; - GLfloat angle, da; - GLfloat u, v, len, fraction = 0.5; - GLfloat n = 1.0; - - r1 = radius - tooth_depth; - r2 = radius; - - da = 2.0 * M_PI / teeth / 4.0; - if (!g[j].face) - { - fraction = -0.5; - n = -1.0; - } - if (!(strcmp (type, "NORMAL"))) - { - fraction = 0.5; - n = 1.0; - } - - /* draw front face */ - if (!(strcmp (type, "NORMAL"))) - { - glNormal3f (0.0, 0.0, 1.0 * n); - glBegin (GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) - { - angle = i * 2.0 * M_PI / teeth; - glVertex3f (0.0, 0.0, width * fraction); - glVertex3f (r1 * cos (angle), r1 * sin (angle), width * fraction); - glVertex3f (0.0, 0.0, width * fraction); - glVertex3f (r1 * cos (angle + 3 * da), r1 * sin (angle + 3 * da), width * fraction); - } - glEnd (); - } - else - { - glNormal3f (0.0, 0.0, 1.0 * n); - glBegin (GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) - { - angle = i * 2.0 * M_PI / teeth; - glVertex3f (0.0, 0.0, width * fraction); - glVertex3f ((r2 - width) * cos (angle), (r2 - width) * sin (angle), width * fraction); - glVertex3f (0.0, 0.0, width * fraction); - glVertex3f ((r2 - width) * cos (angle + 3 * da), (r2 - width) * sin (angle + 3 * da), width * fraction); - } - glEnd (); - } - - /* draw front sides of teeth */ - if (!(strcmp (type, "NORMAL"))) - { - glNormal3f (0.0, 0.0, 1.0 * n); - glBegin (GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) - { - angle = i * 2.0 * M_PI / teeth; - glVertex3f (r1 * cos (angle), r1 * sin (angle), width * fraction); - glVertex3f (r2 * cos (angle + da), r2 * sin (angle + da), width * fraction); - glVertex3f (r2 * cos (angle + 2 * da), r2 * sin (angle + 2 * da), width * fraction); - glVertex3f (r1 * cos (angle + 3 * da), r1 * sin (angle + 3 * da), width * fraction); - } - glEnd (); - } - - glNormal3f (0.0, 0.0, -1.0 * n); - - /* draw back face */ - glBegin (GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) - { - angle = i * 2.0 * M_PI / teeth; - glVertex3f (r1 * cos (angle), r1 * sin (angle), -width * fraction); - glVertex3f (0.0, 0.0, -width * fraction); - glVertex3f (r1 * cos (angle + 3 * da), r1 * sin (angle + 3 * da), -width * fraction); - glVertex3f (0.0, 0.0, -width * fraction); - } - glEnd (); - - /* draw back sides of teeth */ - glNormal3f (0.0, 0.0, -1.0 * n); - glBegin (GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) - { - angle = i * 2.0 * M_PI / teeth; - glVertex3f (r1 * cos (angle + 3 * da), r1 * sin (angle + 3 * da), -width * fraction); - glVertex3f (r2 * cos (angle + 2 * da), r2 * sin (angle + 2 * da), -width * fraction); - glVertex3f (r2 * cos (angle + da), r2 * sin (angle + da), -width * fraction); - glVertex3f (r1 * cos (angle), r1 * sin (angle), -width * fraction); - } - glEnd (); - - - /* draw outward faces of teeth */ - if (!(strcmp (type, "NORMAL"))) - { - glBegin (GL_QUAD_STRIP); - for (i = 0; i < teeth; i++) - { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f (r1 * cos (angle), r1 * sin (angle), width * fraction); - glVertex3f (r1 * cos (angle), r1 * sin (angle), -width * fraction); - u = r2 * cos (angle + da) - r1 * cos (angle); - v = r2 * sin (angle + da) - r1 * sin (angle); - len = sqrt (u * u + v * v); - u /= len; - v /= len; - glNormal3f (v, -u, 0.0); - glVertex3f (r2 * cos (angle + da), r2 * sin (angle + da), width * fraction); - glVertex3f (r2 * cos (angle + da), r2 * sin (angle + da), -width * fraction); - glNormal3f (cos (angle), sin (angle), 0.0); - glVertex3f (r2 * cos (angle + 2 * da), r2 * sin (angle + 2 * da), width * fraction); - glVertex3f (r2 * cos (angle + 2 * da), r2 * sin (angle + 2 * da), -width * fraction); - u = r1 * cos (angle + 3 * da) - r2 * cos (angle + 2 * da); - v = r1 * sin (angle + 3 * da) - r2 * sin (angle + 2 * da); - glNormal3f (v, -u, 0.0); - glVertex3f (r1 * cos (angle + 3 * da), r1 * sin (angle + 3 * da), width * fraction); - glVertex3f (r1 * cos (angle + 3 * da), r1 * sin (angle + 3 * da), -width * fraction); - glNormal3f (cos (angle), sin (angle), 0.0); - } - } - else - { - glBegin (GL_QUAD_STRIP); - for (i = 0; i < teeth; i++) - { - angle = i * 2.0 * M_PI / teeth; - glVertex3f (r1 * cos (angle), r1 * sin (angle), width * fraction); - glVertex3f (r1 * cos (angle), r1 * sin (angle), -width * fraction); - u = r2 * cos (angle + da) - r1 * cos (angle); - v = r2 * sin (angle + da) - r1 * sin (angle); - len = sqrt (u * u + v * v); - u /= len; - v /= len; - glNormal3f (v, -u, 0.0); - glVertex3f ((r2 - width) * cos (angle + da), (r2 - width) * sin (angle + da), width * fraction); - glVertex3f (r2 * cos (angle + da), r2 * sin (angle + da), -width * fraction); - glNormal3f (cos (angle), sin (angle), n); - glVertex3f ((r2 - width) * cos (angle + 2 * da), (r2 - width) * sin (angle + 2 * da), width * fraction); - glVertex3f (r2 * cos (angle + 2 * da), r2 * sin (angle + 2 * da), -width * fraction); - u = r1 * cos (angle + 3 * da) - r2 * cos (angle + 2 * da); - v = r1 * sin (angle + 3 * da) - r2 * sin (angle + 2 * da); - glNormal3f (v, -u, 0.0); - glVertex3f (r1 * cos (angle + 3 * da), r1 * sin (angle + 3 * da), width * fraction); - glVertex3f (r1 * cos (angle + 3 * da), r1 * sin (angle + 3 * da), -width * fraction); - glNormal3f (cos (angle), sin (angle), n); - } - } - - glVertex3f (r1 * cos (0), r1 * sin (0), width * fraction); - glVertex3f (r1 * cos (0), r1 * sin (0), -width * fraction); - glEnd (); -} - - -static void -belt (struct GEAR g1, struct GEAR g2) -{ - GLfloat D, alpha, phi, angle, incr, width; - GLint indexes[3] = - { - 0, 0, 0 - }; - - GLfloat col[3] = - { - 0.0, 0.0, 0.0 - }; - - width = min (g1.width, g2.width); - D = sqrt (pow (g1.position[0] - g2.position[0], 2) + pow (g1.position[1] - g2.position[1], 2) + pow (g1.position[2] - g2.position[2], 2)); - alpha = acos ((g2.position[0] - g1.position[0]) / D); - phi = acos ((g1.radius - g2.radius) / D); - glBegin (GL_QUADS); - glColor3fv (col); - glMaterialiv (GL_FRONT, GL_COLOR_INDEXES, indexes); - incr = 1.2 * 360.0 / g1.teeth * M_PI / 180.00; - for (angle = alpha + phi; angle <= 2 * M_PI - phi + alpha; angle += 360.0 / g1.teeth * M_PI / 180.00) - { - glNormal3f (cos (angle), sin (angle), 0.0); - glVertex3f (g1.radius * cos (angle), g1.radius * sin (angle), width * 0.5); - glVertex3f (g1.radius * cos (angle), g1.radius * sin (angle), -width * 0.5); - glVertex3f (g1.radius * cos (angle + incr), g1.radius * sin (angle + incr), -width * 0.5); - glVertex3f (g1.radius * cos (angle + incr), g1.radius * sin (angle + incr), width * 0.5); - } - glEnd (); - glBegin (GL_QUADS); - glColor3fv (col); - glMaterialiv (GL_FRONT, GL_COLOR_INDEXES, indexes); - incr = 1.2 * 360.0 / g2.teeth * M_PI / 180.00; - for (angle = -phi + alpha; angle <= phi + alpha; angle += 360.0 / g1.teeth * M_PI / 180.0) - { - glNormal3f (cos (angle), sin (angle), 0.0); - glVertex3f (g2.radius * cos (angle) + g2.position[0] - g1.position[0], g2.radius * sin (angle) + g2.position[1] - g1.position[1], width * 0.5); - glVertex3f (g2.radius * cos (angle) + g2.position[0] - g1.position[0], g2.radius * sin (angle) + g2.position[1] - g1.position[1], width * -0.5); - glVertex3f (g2.radius * cos (angle + incr) + g2.position[0] - g1.position[0], g2.radius * sin (angle + incr) + g2.position[1] - g1.position[1], width * -0.5); - glVertex3f (g2.radius * cos (angle + incr) + g2.position[0] - g1.position[0], g2.radius * sin (angle + incr) + g2.position[1] - g1.position[1], width * 0.5); - } - glEnd (); - - glBegin (GL_QUADS); - glColor3fv (col); - glMaterialiv (GL_FRONT, GL_COLOR_INDEXES, indexes); - glVertex3f (g1.radius * cos (alpha + phi), g1.radius * sin (alpha + phi), width * 0.5); - glVertex3f (g1.radius * cos (alpha + phi), g1.radius * sin (alpha + phi), width * -0.5); - glVertex3f (g2.radius * cos (alpha + phi) + g2.position[0] - g1.position[0], g2.radius * sin (alpha + phi) + g2.position[1] - g1.position[1], width * -0.5); - glVertex3f (g2.radius * cos (alpha + phi) + g2.position[0] - g1.position[0], g2.radius * sin (alpha + phi) + g2.position[1] - g1.position[1], width * 0.5); - glVertex3f (g1.radius * cos (alpha - phi), g1.radius * sin (alpha - phi), width * 0.5); - glVertex3f (g1.radius * cos (alpha - phi), g1.radius * sin (alpha - phi), width * -0.5); - glVertex3f (g2.radius * cos (alpha - phi) + g2.position[0] - g1.position[0], g2.radius * sin (alpha - phi) + g2.position[1] - g1.position[1], width * -0.5); - glVertex3f (g2.radius * cos (alpha - phi) + g2.position[0] - g1.position[0], g2.radius * sin (alpha - phi) + g2.position[1] - g1.position[1], width * 0.5); - glEnd (); -} - - -static int -axle_find (char axle_name[]) -{ - int i; - - for (i = 0; i < number_of_axles; i++) - { - if (!(strcmp (axle_name, a[i].name))) - break; - } - return i; -} - - -static int -gear_find (char gear_name[]) -{ - int i; - - for (i = 0; i < number_of_gears; i++) - { - if (!(strcmp (gear_name, g[i].name))) - break; - } - return i; -} - - -static void -process () -{ - GLfloat x, y, z, D, dist; - GLint axle_index, i, j, g1, g2, k; - char error[80]; - - for (i = 0; i < number_of_gears; i++) - { - x = 0.0; - y = 0.0; - z = 0.0; - axle_index = axle_find (g[i].axle_name); - g[i].axis = a[axle_index].axis; - g[i].motored = a[axle_index].motored; - if (a[axle_index].motored) - { - g[i].direction = a[axle_index].direction; - g[i].angular_velocity = a[axle_index].angular_velocity; - } - if (g[i].axis == 0) - x = 1.0; - else if (g[i].axis == 1) - y = 1.0; - else - z = 1.0; - - g[i].position[0] = a[axle_index].position[0] + x * g[i].relative_position; - g[i].position[1] = a[axle_index].position[1] + y * g[i].relative_position; - g[i].position[2] = a[axle_index].position[2] + z * g[i].relative_position; - } - - for (k = 0; k < number_of_axles; k++) - { - for (i = 0; i < number_of_gears - 1; i++) - { - for (j = 0; j < number_of_gears; j++) - { - if (!(strcmp (g[i].type, g[j].type)) && (!(strcmp (g[i].type, "NORMAL"))) && ((strcmp (g[i].axle_name, g[j].axle_name) != 0)) && (g[i].axis == g[j].axis)) - { - D = sqrt (pow (g[i].position[0] - g[j].position[0], 2) + pow (g[i].position[1] - g[j].position[1], 2) + pow (g[i].position[2] - g[j].position[2], 2)); - if (D < 1.1 * (g[i].radius - g[i].tooth_depth + g[j].radius - g[j].tooth_depth)) - { - printf (error, "Gear %s and %s are too close to each other.", g[i].name, g[j].name); - - /*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/ - exit (1); - } - - if (g[i].axis == 0) - { - dist = g[i].position[0] - g[j].position[0]; - } - else if (g[i].axis == 1) - { - dist = g[i].position[1] - g[j].position[1]; - } - else - dist = g[i].position[2] - g[j].position[2]; - - dist = fabs (dist); - - if (dist < (g[i].width / 2 + g[j].width / 2)) - { - if ((g[i].motored) && (!(g[j].motored)) && (D < 0.95 * (g[i].radius + g[j].radius))) - { - axle_index = axle_find (g[j].axle_name); - if ((a[axle_index].direction != 0) && (g[j].angular_velocity != g[i].angular_velocity * g[i].teeth / g[j].teeth * g[i].radius / g[j].radius)) - { - printf (error, "Error in tooth linkage of gears %s and %s.", g[i].name, g[j].name); - /*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/ - exit (1); - } - - g[j].motored = (a[axle_index].motored = 1); - g[j].direction = (a[axle_index].direction = -g[i].direction); - a[axle_index].angular_velocity = g[i].angular_velocity * g[i].teeth / g[j].teeth; - g[j].angular_velocity = (a[axle_index].angular_velocity *= g[i].radius / g[j].radius); - } - - if ((!(g[i].motored)) && (g[j].motored) && (D < 0.95 * (g[i].radius + g[j].radius))) - { - axle_index = axle_find (g[i].axle_name); - if ((a[axle_index].direction != 0) && (g[i].angular_velocity != g[j].angular_velocity * g[j].teeth / g[i].teeth * g[j].radius / g[i].radius)) - { - printf (error, "Error in tooth linkage of gears %s and %s.", g[i].name, g[j].name); - /*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/ - exit (1); - } - - g[i].motored = (a[axle_index].motored = 1); - g[i].direction = (a[axle_index].direction = -g[j].direction); - a[axle_index].angular_velocity = g[j].angular_velocity * g[j].teeth / g[i].teeth; - g[i].angular_velocity = (a[axle_index].angular_velocity *= g[j].radius / g[i].radius); - - } - } - } - - if (!(strcmp (g[i].type, g[j].type)) && (!(strcmp (g[i].type, "BEVEL"))) && ((strcmp (g[i].axle_name, g[j].axle_name) != 0)) && (g[i].axis != g[j].axis)) - { - D = sqrt (pow (g[i].position[0] - g[j].position[0], 2) + pow (g[i].position[1] - g[j].position[1], 2) + pow (g[i].position[2] - g[j].position[2], 2)); - if ((g[i].motored) && (!(g[j].motored)) && (D < 0.95 * sqrt (g[i].radius * g[i].radius + g[j].radius * g[j].radius))) - { - axle_index = axle_find (g[j].axle_name); - if ((a[axle_index].direction != 0) && (g[j].angular_velocity != g[i].angular_velocity * g[i].teeth / g[j].teeth * g[i].radius / g[j].radius)) - { - printf (error, "Error in tooth linkage of gears %s and %s.", g[i].name, g[j].name); - /*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/ - exit (1); - } - g[j].motored = (a[axle_index].motored = 1); - g[j].direction = (a[axle_index].direction = -g[i].direction); - a[axle_index].angular_velocity = g[i].angular_velocity * g[i].teeth / g[j].teeth; - g[j].angular_velocity = (a[axle_index].angular_velocity *= g[i].radius / g[j].radius); - } - - - if ((!(g[i].motored)) && (g[j].motored) && (D < 0.95 * sqrt (g[i].radius * g[i].radius + g[j].radius * g[j].radius))) - { - axle_index = axle_find (g[i].axle_name); - if ((a[axle_index].direction != 0) && (g[i].angular_velocity != g[j].angular_velocity * g[j].teeth / g[i].teeth * g[j].radius / g[i].radius)) - { - printf (error, "Error in tooth linkage of gears %s and %s.", g[i].name, g[j].name); - /*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/ - exit (1); - } - g[i].motored = (a[axle_index].motored = 1); - g[i].direction = (a[axle_index].direction = -g[j].direction); - a[axle_index].angular_velocity = g[j].angular_velocity * g[j].teeth / g[i].teeth; - g[i].angular_velocity = (a[axle_index].angular_velocity *= g[j].radius / g[i].radius); - } - } - } - } - - for (i = 0; i < number_of_gears; i++) - { - axle_index = axle_find (g[i].axle_name); - g[i].motored = a[axle_index].motored; - if (a[axle_index].motored) - { - g[i].direction = a[axle_index].direction; - g[i].angular_velocity = a[axle_index].angular_velocity; - } - } - - for (i = 0; i < number_of_belts; i++) - { - g1 = gear_find (b[i].gear1_name); - g2 = gear_find (b[i].gear2_name); - D = sqrt (pow (g[g1].position[0] - g[g2].position[0], 2) + pow (g[g1].position[1] - g[g2].position[1], 2) + pow (g[g1].position[2] - g[g2].position[2], 2)); - if (!((g[g1].axis == g[g2].axis) && (!strcmp (g[g1].type, g[g2].type)) && (!strcmp (g[g1].type, "NORMAL")))) - { - printf (error, "Belt %s invalid.", b[i].name); - /*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/ - exit (1); - } - - if ((g[g1].axis == g[g2].axis) && (!strcmp (g[g1].type, g[g2].type)) && (!strcmp (g[g1].type, "NORMAL"))) - { - /* - if((g[g1].motored)&&(g[g2].motored)) - if(g[g2].angular_velocity!=(g[g1].angular_velocity*g[g1].radius/g[g2].radius)) - { - printf(error,"Error in belt linkage of gears %s and %s".,g[g1].name,g[g2].name); - MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK); - exit(1); - } - */ - if (g[g1].axis == 0) - { - dist = g[g1].position[0] - g[g2].position[0]; - } - else if (g[i].axis == 1) - { - dist = g[g1].position[1] - g[g2].position[1]; - } - else - dist = g[g1].position[2] - g[g2].position[2]; - - dist = fabs (dist); - - if (dist > (g[g1].width / 2 + g[g2].width / 2)) - { - printf (error, "Belt %s invalid.", b[i].name); - /*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/ - exit (1); - } - - if (dist < (g[g1].width / 2 + g[g2].width / 2)) - { - if (D < g[g1].radius + g[g2].radius) - { - printf (error, "Gears %s and %s too close to be linked with belts", g[g1].name, g[g2].name); - /*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/ - exit (1); - } - - if ((g[g1].motored) && (!(g[g2].motored))) - { - axle_index = axle_find (g[g2].axle_name); - g[g2].motored = (a[axle_index].motored = 1); - g[g2].direction = (a[axle_index].direction = g[g1].direction); - g[g2].angular_velocity = (a[axle_index].angular_velocity = g[g1].angular_velocity * g[g1].radius / g[g2].radius); - } - - if ((!(g[g1].motored)) && (g[g2].motored)) - { - axle_index = axle_find (g[g1].axle_name); - g[g1].motored = (a[axle_index].motored = 1); - g[g1].direction = (a[axle_index].direction = g[g2].direction); - g[g1].angular_velocity = (a[axle_index].angular_velocity = g[g2].angular_velocity * g[g2].radius / g[g1].radius); - } - } - } - } - - for (i = 0; i < number_of_gears; i++) - { - axle_index = axle_find (g[i].axle_name); - g[i].motored = a[axle_index].motored; - if (a[axle_index].motored) - { - g[i].direction = a[axle_index].direction; - g[i].angular_velocity = a[axle_index].angular_velocity; - } - } - } -} - - - -GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 10.0; - - -static void -draw (void) -{ - int i; - GLfloat x, y, z; - int index; - - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix (); - glRotatef (view_rotx, 1.0, 0.0, 0.0); - glRotatef (view_roty, 0.0, 1.0, 0.0); - glRotatef (view_rotz, 0.0, 0.0, 1.0); - - for (i = 0; i < number_of_gears; i++) - { - x = 0.0; - y = 0.0; - z = 0.0; - glPushMatrix (); -/*glTranslatef( -3.0, -2.0, 0.0 );*/ - glTranslatef (g[i].position[0], g[i].position[1], g[i].position[2]); - if (g[i].axis == 0) - y = 1.0; - else if (g[i].axis == 1) - x = 1.0; - else - z = 1.0; - - if (z != 1.0) - glRotatef (90.0, x, y, z); - - glRotatef (g[i].direction * g[i].angle, 0.0, 0.0, 1.0); - glCallList (g[i].id); - glPopMatrix (); - } - - for (i = 0; i < number_of_axles; i++) - { - x = 0.0; - y = 0.0; - z = 0.0; - glPushMatrix (); - glTranslatef (a[i].position[0], a[i].position[1], a[i].position[2]); - if (a[i].axis == 0) - y = 1.0; - else if (a[i].axis == 1) - x = 1.0; - else - z = 1.0; - - if (z != 1.0) - glRotatef (90.0, x, y, z); - - glCallList (a[i].id); - glPopMatrix (); - } - - for (i = 0; i < number_of_belts; i++) - { - x = 0.0; - y = 0.0; - z = 0.0; - glPushMatrix (); - index = gear_find (b[i].gear1_name); - glTranslatef (g[index].position[0], g[index].position[1], g[index].position[2]); - if (g[index].axis == 0) - y = 1.0; - else if (g[index].axis == 1) - x = 1.0; - else - z = 1.0; - - if (z != 1.0) - glRotatef (90.0, x, y, z); - - glCallList (b[i].id); - glPopMatrix (); - } - - glPopMatrix (); - glutSwapBuffers (); - - { - GLint t = glutGet(GLUT_ELAPSED_TIME); - Frames++; - if (t - T0 >= 5000) { - GLfloat seconds = (t - T0) / 1000.0; - GLfloat fps = Frames / seconds; - printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps); - T0 = t; - Frames = 0; - } - } -} - - -static void -idle (void) -{ - int i; - static double t0 = -1.; - double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0; - if (t0 < 0.0) - t0 = t; - dt = t - t0; - t0 = t; - for (i = 0; i < number_of_gears; i++) - g[i].angle += g[i].angular_velocity * dt; - glutPostRedisplay(); -} - - - - -/* change view angle, exit upon ESC */ -static void -key (unsigned char k, int x, int y) -{ - switch (k) - { - case 'x': - view_rotx += 5.0; - break; - case 'X': - view_rotx -= 5.0; - break; - case 'y': - view_roty += 5.0; - break; - case 'Y': - view_roty -= 5.0; - break; - case 'z': - view_rotz += 5.0; - break; - case 'Z': - view_rotz -= 5.0; - break; - case 0x1B: - exit(0); - } -} - - - - -/* new window size or exposure */ -static void -reshape (int width, int height) -{ - glViewport (0, 0, (GLint) width, (GLint) height); - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - if (width > height) - { - GLfloat w = (GLfloat) width / (GLfloat) height; - glFrustum (-w, w, -1.0, 1.0, 5.0, 60.0); - } - else - { - GLfloat h = (GLfloat) height / (GLfloat) width; - glFrustum (-1.0, 1.0, -h, h, 5.0, 60.0); - } - - glMatrixMode (GL_MODELVIEW); - glLoadIdentity (); - glTranslatef (0.0, 0.0, -40.0); - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); -} - - - -static void -init (void) -{ - GLfloat matShine = 20.00F; - GLfloat light0Pos[4] = - { - 0.70F, 0.70F, 1.25F, 0.50F - }; - int i; - - glClearColor (background[0], background[1], background[2], 1.0F); - glClearIndex ((GLfloat) 0.0); - - glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, matShine); - glLightfv (GL_LIGHT0, GL_POSITION, light0Pos); - glEnable (GL_LIGHT0); - - glEnable (GL_LIGHTING); - glEnable (GL_DEPTH_TEST); - for (i = 0; i < number_of_gears; i++) - g[i].angle = 0.0; - - for (i = 0; i < number_of_gears; i++) - { - g[i].id = glGenLists (1); - glNewList (g[i].id, GL_COMPILE); - glColor3fv (g[i].color); - glMaterialfv (GL_FRONT, GL_SPECULAR, g[i].color); - gear (i, g[i].type, g[i].radius, g[i].width, g[i].teeth, g[i].tooth_depth); - glEndList (); - } - - for (i = 0; i < number_of_axles; i++) - { - a[i].id = glGenLists (1); - glNewList (a[i].id, GL_COMPILE); - glColor3fv (a[i].color); - glMaterialfv (GL_FRONT, GL_SPECULAR, a[i].color); - axle (i, a[i].radius, a[i].length); - glEndList (); - } - - for (i = 0; i < number_of_belts; i++) - { - b[i].id = glGenLists (1); - glNewList (b[i].id, GL_COMPILE); - belt (g[gear_find (b[i].gear1_name)], g[gear_find (b[i].gear2_name)]); - glEndList (); - } - - glEnable (GL_COLOR_MATERIAL); -} - - - -int -main (int argc, char *argv[]) -{ - char *file; - - if (argc < 2) - file = "geartrain.dat"; - else - file = argv[1]; - - glutInitWindowPosition (0, 0); - glutInitWindowSize(640,480); - glutInitDisplayMode (GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE ); - - if (glutCreateWindow ("Gear Train Simulation") == GL_FALSE) - exit (1); - - getdata (file); - process (); - init (); - - glutDisplayFunc (draw); - glutReshapeFunc (reshape); - glutKeyboardFunc (key); - glutIdleFunc (idle); - glutMainLoop (); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/geartrain.dat b/nx-X11/extras/Mesa_6.4.2/progs/demos/geartrain.dat deleted file mode 100644 index 374de48bd5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/geartrain.dat +++ /dev/null @@ -1,119 +0,0 @@ -BACKGROUND = 0.000 0.500 0.700 - -ANAME = AXLE1 -ARADIUS = 1.000 -AAXIS = 2 -APOSITION = -7.000 0.000 0.000 -ACOLOR = 0.800 0.500 0.200 -ALENGTH = 6.000 -AMOTORED = 1 -AANGULARVELOCITY = 90.000 -ADIRECTION = 1 - -ANAME = AXLE2 -ARADIUS = 1.000 -AAXIS = 2 -APOSITION = -3.000 0.000 0.000 -ACOLOR = 0.800 0.500 0.200 -ALENGTH = 12.000 -AMOTORED = 0 - -ANAME = AXLE3 -ARADIUS = 1.000 -AAXIS = 2 -APOSITION = 1.000 0.000 0.000 -ACOLOR = 0.800 0.500 0.200 -ALENGTH = 6.000 -AMOTORED = 0 - -ANAME = AXLE4 -ARADIUS = 1.000 -AAXIS = 2 -APOSITION = 8.000 0.000 0.000 -ACOLOR = 0.800 0.500 0.200 -ALENGTH = 18.000 -AMOTORED = 0 - -ANAME = AXLE5 -ARADIUS = 1.000 -AAXIS = 1 -APOSITION = 8.000 -8.200 -7.400 -ACOLOR = 0.800 0.500 0.200 -ALENGTH = 12.000 -AMOTORED = 0 - -GNAME = GEAR1 -GTYPE = NORMAL -GRADIUS = 2.200 -GWIDTH = 3.000 -GTEETH = 40 -GTOOTHDEPTH = 0.500 -GCOLOR = 0.500 0.500 0.500 -GAXLE = AXLE1 -GPOSITION = 0.000 - -GNAME = GEAR2 -GTYPE = NORMAL -GRADIUS = 2.200 -GWIDTH = 3.000 -GTEETH = 30 -GTOOTHDEPTH = 0.500 -GCOLOR = 0.500 0.500 0.500 -GAXLE = AXLE2 -GPOSITION = 0.000 - -GNAME = GEAR3 -GTYPE = NORMAL -GRADIUS = 2.200 -GWIDTH = 3.000 -GTEETH = 20 -GTOOTHDEPTH = 0.500 -GCOLOR = 0.500 0.500 0.500 -GAXLE = AXLE3 -GPOSITION = 0.000 - -GNAME = GEAR4 -GTYPE = NORMAL -GRADIUS = 1.700 -GWIDTH = 1.000 -GTEETH = 20 -GTOOTHDEPTH = 0.500 -GCOLOR = 0.500 0.500 0.500 -GAXLE = AXLE2 -GPOSITION = 5.000 - -GNAME = GEAR5 -GTYPE = NORMAL -GRADIUS = 3.000 -GWIDTH = 1.000 -GTEETH = 20 -GTOOTHDEPTH = 0.500 -GCOLOR = 0.500 0.500 0.500 -GAXLE = AXLE4 -GPOSITION = 5.000 - -GNAME = GEAR6 -GTYPE = BEVEL -GFACE = 0 -GRADIUS = 4.000 -GWIDTH = 1.000 -GTEETH = 20 -GTOOTHDEPTH = 1.700 -GCOLOR = 0.500 0.500 0.500 -GAXLE = AXLE4 -GPOSITION = -4.000 - -GNAME = GEAR7 -GTYPE = BEVEL -GFACE = 0 -GRADIUS = 4.000 -GWIDTH = 1.000 -GTEETH = 20 -GTOOTHDEPTH = 1.700 -GCOLOR = 0.500 0.500 0.500 -GAXLE = AXLE5 -GPOSITION = 5.000 - -BELTNAME = BELT1 -GEAR1NAME = GEAR5 -GEAR2NAME = GEAR4 diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/glinfo.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/glinfo.c deleted file mode 100644 index a6a7478288..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/glinfo.c +++ /dev/null @@ -1,32 +0,0 @@ - -/* - * Print GL, GLU and GLUT version and extension info - * - * Brian Paul This file in public domain. - * October 3, 1997 - */ - - -#include -#include - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitDisplayMode( GLUT_RGB ); - glutCreateWindow(argv[0]); - - printf("GL_VERSION: %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_EXTENSIONS: %s\n", (char *) glGetString(GL_EXTENSIONS)); - printf("GL_RENDERER: %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VENDOR: %s\n", (char *) glGetString(GL_VENDOR)); - printf("GLU_VERSION: %s\n", (char *) gluGetString(GLU_VERSION)); - printf("GLU_EXTENSIONS: %s\n", (char *) gluGetString(GLU_EXTENSIONS)); - printf("GLUT_API_VERSION: %d\n", GLUT_API_VERSION); -#ifdef GLUT_XLIB_IMPLEMENTATION - printf("GLUT_XLIB_IMPLEMENTATION: %d\n", GLUT_XLIB_IMPLEMENTATION); -#endif - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/gloss.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/gloss.c deleted file mode 100644 index 4e7adc8d48..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/gloss.c +++ /dev/null @@ -1,435 +0,0 @@ - -/* - * Specular reflection demo. The specular highlight is modulated by - * a sphere-mapped texture. The result is a high-gloss surface. - * NOTE: you really need hardware acceleration for this. - * Also note, this technique can't be implemented with multi-texture - * and separate specular color interpolation because there's no way - * to indicate that the second texture unit (the reflection map) - * should modulate the specular color and not the base color. - * A future multi-texture extension could fix that. - * - * Command line options: - * -info print GL implementation information - * - * - * Brian Paul October 22, 1999 This program is in the public domain. - */ - - -#include -#include -#include -#include -#include -#include - -#include "readtex.h" - -#define SPECULAR_TEXTURE_FILE "../images/reflect.rgb" -#define BASE_TEXTURE_FILE "../images/tile.rgb" - -/* Menu items */ -#define DO_SPEC_TEXTURE 1 -#define OBJECT 2 -#define ANIMATE 3 -#define QUIT 100 - -/* for convolution */ -#define FILTER_SIZE 7 - -static GLuint CylinderObj = 0; -static GLuint TeapotObj = 0; -static GLuint Object = 0; -static GLboolean Animate = GL_TRUE; - -static GLfloat Xrot = 0.0, Yrot = 0.0, Zrot = 0.0; -static GLfloat DXrot = 20.0, DYrot = 50.; - -static GLfloat Black[4] = { 0, 0, 0, 0 }; -static GLfloat White[4] = { 1, 1, 1, 1 }; -static GLfloat Diffuse[4] = { .3, .3, 1.0, 1.0 }; /* blue */ -static GLfloat Shininess = 6; - -static GLuint BaseTexture, SpecularTexture; -static GLboolean DoSpecTexture = GL_TRUE; - -/* performance info */ -static GLint T0 = 0; -static GLint Frames = 0; - - -static void Idle( void ) -{ - static double t0 = -1.; - double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0; - if (t0 < 0.0) - t0 = t; - dt = t - t0; - t0 = t; - - if (Animate) { - Xrot += DXrot*dt; - Yrot += DYrot*dt; - glutPostRedisplay(); - } -} - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - - /* First pass: diffuse lighting with base texture */ - glMaterialfv(GL_FRONT, GL_DIFFUSE, Diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, Black); - glEnable(GL_TEXTURE_2D); - glBindTexture(GL_TEXTURE_2D, BaseTexture); - glCallList(Object); - - /* Second pass: specular lighting with reflection texture */ - glEnable(GL_POLYGON_OFFSET_FILL); - glBlendFunc(GL_ONE, GL_ONE); /* add */ - glEnable(GL_BLEND); - glMaterialfv(GL_FRONT, GL_DIFFUSE, Black); - glMaterialfv(GL_FRONT, GL_SPECULAR, White); - if (DoSpecTexture) { - glBindTexture(GL_TEXTURE_2D, SpecularTexture); - glEnable(GL_TEXTURE_GEN_S); - glEnable(GL_TEXTURE_GEN_T); - } - else { - glDisable(GL_TEXTURE_2D); - } - glCallList(Object); - glDisable(GL_TEXTURE_GEN_S); - glDisable(GL_TEXTURE_GEN_T); - glDisable(GL_BLEND); - glDisable(GL_POLYGON_OFFSET_FILL); - - glPopMatrix(); - - glutSwapBuffers(); - - if (Animate) { - GLint t = glutGet(GLUT_ELAPSED_TIME); - Frames++; - if (t - T0 >= 5000) { - GLfloat seconds = (t - T0) / 1000.0; - GLfloat fps = Frames / seconds; - printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps); - T0 = t; - Frames = 0; - } - } -} - - -static void Reshape( int width, int height ) -{ - GLfloat h = 30.0; - GLfloat w = h * width / height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -w, w, -h, h, 150.0, 500.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -380.0 ); -} - - -static void ToggleAnimate(void) -{ - Animate = !Animate; - if (Animate) { - glutIdleFunc( Idle ); - T0 = glutGet(GLUT_ELAPSED_TIME); - Frames = 0; - } - else { - glutIdleFunc( NULL ); - } -} - - -static void ModeMenu(int entry) -{ - if (entry==ANIMATE) { - ToggleAnimate(); - } - else if (entry==DO_SPEC_TEXTURE) { - DoSpecTexture = !DoSpecTexture; - } - else if (entry==OBJECT) { - if (Object == TeapotObj) - Object = CylinderObj; - else - Object = TeapotObj; - } - else if (entry==QUIT) { - exit(0); - } - glutPostRedisplay(); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 's': - Shininess--; - if (Shininess < 0.0) - Shininess = 0.0; - glMaterialf(GL_FRONT, GL_SHININESS, Shininess); - printf("Shininess = %g\n", Shininess); - break; - case 'S': - Shininess++; - if (Shininess > 128.0) - Shininess = 128.0; - glMaterialf(GL_FRONT, GL_SHININESS, Shininess); - printf("Shininess = %g\n", Shininess); - break; - case ' ': - ToggleAnimate(); - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - float step = 3.0; - (void) x; - (void) y; - - switch (key) { - case GLUT_KEY_UP: - Xrot += step; - break; - case GLUT_KEY_DOWN: - Xrot -= step; - break; - case GLUT_KEY_LEFT: - Yrot += step; - break; - case GLUT_KEY_RIGHT: - Yrot -= step; - break; - } - glutPostRedisplay(); -} - - -static void Init( int argc, char *argv[] ) -{ - GLboolean convolve = GL_FALSE; - int i; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-info")==0) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } - else if (strcmp(argv[i], "-c")==0) { - convolve = GL_TRUE; - } - } - - - /* Cylinder object */ - { - static GLfloat height = 100.0; - static GLfloat radius = 40.0; - static GLint slices = 24; /* pie slices around Z axis */ - static GLint stacks = 10; /* subdivisions along length of cylinder */ - static GLint rings = 4; /* rings in the end disks */ - GLUquadricObj *q = gluNewQuadric(); - assert(q); - gluQuadricTexture(q, GL_TRUE); - - CylinderObj = glGenLists(1); - glNewList(CylinderObj, GL_COMPILE); - - glPushMatrix(); - glTranslatef(0.0, 0.0, -0.5 * height); - - glMatrixMode(GL_TEXTURE); - glLoadIdentity(); - /*glScalef(8.0, 4.0, 2.0);*/ - glMatrixMode(GL_MODELVIEW); - - /* cylinder */ - gluQuadricNormals(q, GL_SMOOTH); - gluQuadricTexture(q, GL_TRUE); - gluCylinder(q, radius, radius, height, slices, stacks); - - /* end cap */ - glMatrixMode(GL_TEXTURE); - glLoadIdentity(); - glScalef(3.0, 3.0, 1.0); - glMatrixMode(GL_MODELVIEW); - - glTranslatef(0.0, 0.0, height); - gluDisk(q, 0.0, radius, slices, rings); - - /* other end cap */ - glTranslatef(0.0, 0.0, -height); - gluQuadricOrientation(q, GLU_INSIDE); - gluDisk(q, 0.0, radius, slices, rings); - - glPopMatrix(); - - glMatrixMode(GL_TEXTURE); - glLoadIdentity(); - glMatrixMode(GL_MODELVIEW); - - glEndList(); - gluDeleteQuadric(q); - } - - /* Teapot */ - { - TeapotObj = glGenLists(1); - glNewList(TeapotObj, GL_COMPILE); - - glFrontFace(GL_CW); - glutSolidTeapot(40.0); - glFrontFace(GL_CCW); - - glEndList(); - } - - /* show cylinder by default */ - Object = CylinderObj; - - - /* lighting */ - glEnable(GL_LIGHTING); - { - GLfloat pos[4] = { 3, 3, 3, 1 }; - glLightfv(GL_LIGHT0, GL_AMBIENT, Black); - glLightfv(GL_LIGHT0, GL_DIFFUSE, White); - glLightfv(GL_LIGHT0, GL_SPECULAR, White); - glLightfv(GL_LIGHT0, GL_POSITION, pos); - glEnable(GL_LIGHT0); - glMaterialfv(GL_FRONT, GL_AMBIENT, Black); - glMaterialf(GL_FRONT, GL_SHININESS, Shininess); - glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1); - } - - /* Base texture */ - glGenTextures(1, &BaseTexture); - glBindTexture(GL_TEXTURE_2D, BaseTexture); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - if (!LoadRGBMipmaps(BASE_TEXTURE_FILE, GL_RGB)) { - printf("Error: couldn't load texture image file %s\n", BASE_TEXTURE_FILE); - exit(1); - } - - /* Specular texture */ - glGenTextures(1, &SpecularTexture); - glBindTexture(GL_TEXTURE_2D, SpecularTexture); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); - glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); - if (convolve) { - /* use convolution to blur the texture to simulate a dull finish - * on the object. - */ - GLubyte *img; - GLenum format; - GLint w, h; - GLfloat filter[FILTER_SIZE][FILTER_SIZE][4]; - - for (h = 0; h < FILTER_SIZE; h++) { - for (w = 0; w < FILTER_SIZE; w++) { - const GLfloat k = 1.0 / (FILTER_SIZE * FILTER_SIZE); - filter[h][w][0] = k; - filter[h][w][1] = k; - filter[h][w][2] = k; - filter[h][w][3] = k; - } - } - - glEnable(GL_CONVOLUTION_2D); - glConvolutionParameteri(GL_CONVOLUTION_2D, - GL_CONVOLUTION_BORDER_MODE, GL_CONSTANT_BORDER); - glConvolutionFilter2D(GL_CONVOLUTION_2D, GL_RGBA, - FILTER_SIZE, FILTER_SIZE, - GL_RGBA, GL_FLOAT, filter); - - img = LoadRGBImage(SPECULAR_TEXTURE_FILE, &w, &h, &format); - if (!img) { - printf("Error: couldn't load texture image file %s\n", - SPECULAR_TEXTURE_FILE); - exit(1); - } - - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, w, h, 0, - format, GL_UNSIGNED_BYTE, img); - free(img); - } - else { - /* regular path */ - if (!LoadRGBMipmaps(SPECULAR_TEXTURE_FILE, GL_RGB)) { - printf("Error: couldn't load texture image file %s\n", - SPECULAR_TEXTURE_FILE); - exit(1); - } - } - - /* misc */ - glEnable(GL_CULL_FACE); - glEnable(GL_TEXTURE_2D); - glEnable(GL_DEPTH_TEST); - glEnable(GL_NORMALIZE); - - glPolygonOffset( -1, -1 ); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition(0, 0); - glutInitWindowSize( 500, 500 ); - - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - - glutCreateWindow(argv[0] ); - - Init(argc, argv); - - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - glutIdleFunc( Idle ); - - glutCreateMenu(ModeMenu); - glutAddMenuEntry("Toggle Highlight", DO_SPEC_TEXTURE); - glutAddMenuEntry("Toggle Object", OBJECT); - glutAddMenuEntry("Toggle Animate", ANIMATE); - glutAddMenuEntry("Quit", QUIT); - glutAttachMenu(GLUT_RIGHT_BUTTON); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/gltestperf.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/gltestperf.c deleted file mode 100644 index be95390101..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/gltestperf.c +++ /dev/null @@ -1,580 +0,0 @@ -/* - * This program is under the GNU GPL. - * Use at your own risk. - * - * written by David Bucciarelli (tech.hmw@plus.it) - * Humanware s.r.l. - */ - -#include -#include -#include -#include -#include - -typedef struct -{ - char *name; - char *unit; - void (*init) (void); - int (*run) (int, int); - int type; - int numsize; - int size[10]; -} -benchmark; - -static int frontbuffer = 1; - -/***************************************************************************/ - -static void -init_test01(void) -{ - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(-0.5, 639.5, -0.5, 479.5); - glMatrixMode(GL_MODELVIEW); - - glShadeModel(GL_FLAT); - glDisable(GL_DEPTH_TEST); - - glClearColor(0.0, 0.1, 1.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT); - glColor3f(1.0, 0.0, 0.0); -} - -static int -test01(int size, int num) -{ - int x, y; - - glBegin(GL_POINTS); - for (y = 0; y < num; y++) - for (x = 0; x < 480; x++) - glVertex2i(x, x); - glEnd(); - - return 480 * num; -} - -/***************************************************************************/ - -static void -init_test02(void) -{ - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(-0.5, 639.5, -0.5, 479.5); - glMatrixMode(GL_MODELVIEW); - - glShadeModel(GL_SMOOTH); - glDisable(GL_DEPTH_TEST); - - glClearColor(0.0, 0.1, 1.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT); -} - -static int -test02(int size, int num) -{ - int x, y; - - glBegin(GL_LINES); - for (y = 0; y < num; y++) - for (x = 0; x < size; x++) { - glColor3f(0.0, 1.0, y / (float) num); - glVertex2i(0, size - 1); - glColor3f(1.0, 0.0, x / (float) size); - glVertex2i(x, x); - } - glEnd(); - - return num * size; -} - -/***************************************************************************/ - -static void -init_test03(void) -{ - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-0.5, 639.5, -0.5, 479.5, 1.0, -1000.0 * 480.0); - glMatrixMode(GL_MODELVIEW); - - glShadeModel(GL_SMOOTH); - glEnable(GL_DEPTH_TEST); - - glClearColor(0.0, 0.1, 1.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); -} - -static int -test03(int size, int num) -{ - int x, y, z; - - glBegin(GL_TRIANGLES); - for (y = 0; y < num; y++) - for (x = 0; x < size; x += 5) { - z = num * size - (y * size + x); - glColor3f(0.0, 1.0, 0.0); - glVertex3i(0, x, z); - - glColor3f(1.0, 0.0, x / (float) size); - glVertex3i(size - 1 - x, 0, z); - - glColor3f(1.0, x / (float) size, 0.0); - glVertex3i(x, size - 1 - x, z); - } - glEnd(); - - return size * num / 5; -} - -/***************************************************************************/ - -static void -init_test04(void) -{ - int x, y; - GLubyte tex[128 * 128 * 3]; - GLenum gluerr; - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-0.5, 639.5, -0.5, 479.5, 1.0, -1000.0 * 480.0); - - glMatrixMode(GL_MODELVIEW); - - glShadeModel(GL_SMOOTH); - glEnable(GL_DEPTH_TEST); - - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - for (y = 0; y < 128; y++) - for (x = 0; x < 128; x++) { - tex[(x + y * 128) * 3 + 0] = ((x % (128 / 4)) < (128 / 8)) ? 255 : 0; - tex[(x + y * 128) * 3 + 1] = ((y % (128 / 4)) < (128 / 8)) ? 255 : 0; - tex[(x + y * 128) * 3 + 2] = x; - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - if ((gluerr = gluBuild2DMipmaps(GL_TEXTURE_2D, 3, 128, 128, GL_RGB, - GL_UNSIGNED_BYTE, (GLvoid *) (&tex[0])))) { - fprintf(stderr, "GLULib%s\n", (char *) gluErrorString(gluerr)); - exit(-1); - } - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR_MIPMAP_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - glEnable(GL_TEXTURE_2D); - - glClearColor(0.0, 0.1, 1.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); -} - -static int -test04(int size, int num) -{ - int x, y, z; - - glBegin(GL_TRIANGLES); - for (y = 0; y < num; y++) - for (x = 0; x < size; x += 5) { - z = num * size - (y * size + x); - glTexCoord2f(1.0, 1.0); - glColor3f(1.0, 0.0, 0.0); - glVertex3i(0, x, z); - - glTexCoord2f(0.0, 1.0); - glColor3f(0.0, 1.0, 0.0); - glVertex3i(size - 1 - x, 0, z); - - glTexCoord2f(1.0, 0.0); - glColor3f(0.0, 0.0, 1.0); - glVertex3i(x, size - 1 - x, z); - } - glEnd(); - - return num * size / 5; -} - -/***************************************************************************/ - -static void -init_test05(void) -{ - int x, y; - GLubyte tex[128 * 128 * 3]; - GLenum gluerr; - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-0.5, 639.5, -0.5, 479.5, -1.0, 1.0); - - glMatrixMode(GL_MODELVIEW); - - glShadeModel(GL_SMOOTH); - glEnable(GL_DEPTH_TEST); - - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - for (y = 0; y < 128; y++) - for (x = 0; x < 128; x++) { - tex[(x + y * 128) * 3 + 0] = ((x % (128 / 4)) < (128 / 8)) ? 255 : 0; - tex[(x + y * 128) * 3 + 1] = ((y % (128 / 4)) < (128 / 8)) ? 255 : 0; - tex[(x + y * 128) * 3 + 2] = x; - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - if ((gluerr = gluBuild2DMipmaps(GL_TEXTURE_2D, 3, 128, 128, GL_RGB, - GL_UNSIGNED_BYTE, (GLvoid *) (&tex[0])))) { - fprintf(stderr, "GLULib%s\n", (char *) gluErrorString(gluerr)); - exit(-1); - } - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR_MIPMAP_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - glEnable(GL_TEXTURE_2D); - - glDepthFunc(GL_ALWAYS); - - glClearColor(0.0, 0.1, 1.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); -} - -static int -test05(int size, int num) -{ - int y; - float v0[3], v1[3], v2[3], v3[3]; - float cv0[3], cv1[3], cv2[3], cv3[3]; - float tv0[3], tv1[3], tv2[3], tv3[3]; - - v0[0] = 320 - size / 2; - v0[1] = 240 - size / 2; - v0[2] = 0.0; - v1[0] = 320 + size / 2; - v1[1] = 240 - size / 2; - v1[2] = 0.0; - v2[0] = 320 - size / 2; - v2[1] = 240 + size / 2; - v2[2] = 0.0; - v3[0] = 320 + size / 2; - v3[1] = 240 + size / 2; - v3[2] = 0.0; - cv0[0] = 1.0; - cv0[1] = 0.0; - cv0[2] = 0.0; - cv1[0] = 1.0; - cv1[1] = 1.0; - cv1[2] = 0.0; - cv2[0] = 1.0; - cv2[1] = 0.0; - cv2[2] = 1.0; - cv3[0] = 1.0; - cv3[1] = 1.0; - cv3[2] = 1.0; - tv0[0] = 0.0; - tv0[1] = 0.0; - tv0[2] = 0.0; - tv1[0] = 1.0; - tv1[1] = 0.0; - tv1[2] = 0.0; - tv2[0] = 0.0; - tv2[1] = 1.0; - tv2[2] = 0.0; - tv3[0] = 1.0; - tv3[1] = 1.0; - tv3[2] = 0.0; - - glBegin(GL_TRIANGLE_STRIP); - for (y = 0; y < num; y++) { - glColor3fv(cv0); - glTexCoord2fv(tv0); - glVertex3fv(v0); - - glColor3fv(cv1); - glTexCoord2fv(tv1); - glVertex3fv(v1); - - glColor3fv(cv2); - glTexCoord2fv(tv2); - glVertex3fv(v2); - - glColor3fv(cv3); - glTexCoord2fv(tv3); - glVertex3fv(v3); - } - glEnd(); - - return 4 * num - 2; -} - -/***************************************************************************/ - -static void -init_test06(void) -{ - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(-0.5, 639.5, -0.5, 479.5); - glMatrixMode(GL_MODELVIEW); - - glShadeModel(GL_SMOOTH); - glEnable(GL_DEPTH_TEST); - - glClearColor(0.0, 0.1, 1.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); -} - -static int -test06(int size, int num) -{ - int y; - - for (y = 0; y < num; y++) { - glClearColor(y / (float) num, 0.1, 1.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - } - - return num; -} - -/***************************************************************************/ - -#define BMARKS_TIME 5.0 - -#define NUM_BMARKS 6 - -/* 554 ~= sqrt(640*480) */ - -static benchmark bmarks[NUM_BMARKS] = { - {"Simple Points", "Pnts", init_test01, test01, 0, 0, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, - {"Smooth Lines", "Lins", init_test02, test02, 1, 5, - {480, 250, 100, 50, 25, 0, 0, 0, 0, 0}}, - {"ZSmooth Triangles", "Tris", init_test03, test03, 1, 5, - {480, 250, 100, 50, 25, 0, 0, 0, 0, 0}}, - {"ZSmooth Tex Blend Triangles", "Tris", init_test04, test04, 1, 5, - {480, 250, 100, 50, 25, 0, 0, 0, 0, 0}}, - {"ZSmooth Tex Blend TMesh Triangles", "Tris", init_test05, test05, 2, 8, - {400, 250, 100, 50, 25, 10, 5, 2, 0, 0}}, - {"Color/Depth Buffer Clears", "Clrs", init_test06, test06, 3, 0, - {554, 0, 0, 0, 0, 0, 0, 0, 0, 0}} -}; - -/***************************************************************************/ - -static void -dotest0param(benchmark * bmark) -{ - float stime, etime, dtime, tottime, maxtime, mintime; - int num, numelem, calibnum, j; - - glPushAttrib(GL_ALL_ATTRIB_BITS); - bmark->init(); - - stime = glutGet(GLUT_ELAPSED_TIME); - - dtime = 0.0; - calibnum = 0; - while (dtime < 2.0) { - bmark->run(0, 1); - glFinish(); - etime = glutGet(GLUT_ELAPSED_TIME); - dtime = (etime - stime) / 1000.0; - calibnum++; - } - glPopAttrib(); - - fprintf(stderr, "Elapsed time for the calibration test (%d): %f\n", - calibnum, dtime); - - num = (int) ((BMARKS_TIME / dtime) * calibnum); - - if (num < 1) - num = 1; - - fprintf(stderr, "Selected number of benchmark iterations: %d\n", num); - - mintime = HUGE_VAL; - maxtime = -HUGE_VAL; - - for (tottime = 0.0, j = 0; j < 5; j++) { - glPushAttrib(GL_ALL_ATTRIB_BITS); - bmark->init(); - - stime = glutGet(GLUT_ELAPSED_TIME); - numelem = bmark->run(0, num); - glFinish(); - etime = glutGet(GLUT_ELAPSED_TIME); - - glPopAttrib(); - - dtime = (etime - stime) / 1000.0; - tottime += dtime; - - fprintf(stderr, "Elapsed time for run %d: %f\n", j, dtime); - - if (dtime < mintime) - mintime = dtime; - if (dtime > maxtime) - maxtime = dtime; - } - - tottime -= mintime + maxtime; - - fprintf(stdout, "%s\n%f %s/sec", bmark->name, numelem / (tottime / 3.0), - bmark->unit); - - if (bmark->type == 3) - fprintf(stdout, ", MPixel Fill/sec: %f\n\n", - (numelem * bmark->size[0] * (float) bmark->size[0]) / - (1000000.0 * tottime / 3.0)); - else - fprintf(stdout, "\n\n"); -} - -/***************************************************************************/ - -static void -dotest1param(benchmark * bmark) -{ - float stime, etime, dtime, tottime, maxtime, mintime; - int num, numelem, calibnum, j, k; - - fprintf(stdout, "%s\n", bmark->name); - - for (j = 0; j < bmark->numsize; j++) { - fprintf(stderr, "Current size: %d\n", bmark->size[j]); - - glPushAttrib(GL_ALL_ATTRIB_BITS); - bmark->init(); - - stime = glutGet(GLUT_ELAPSED_TIME); - - dtime = 0.0; - calibnum = 0; - while (dtime < 2.0) { - bmark->run(bmark->size[j], 1); - glFinish(); - etime = glutGet(GLUT_ELAPSED_TIME); - dtime = (etime - stime) / 1000.0; - calibnum++; - } - glPopAttrib(); - - fprintf(stderr, "Elapsed time for the calibration test (%d): %f\n", - calibnum, dtime); - - num = (int) ((BMARKS_TIME / dtime) * calibnum); - - if (num < 1) - num = 1; - - fprintf(stderr, "Selected number of benchmark iterations: %d\n", num); - - mintime = HUGE_VAL; - maxtime = -HUGE_VAL; - - for (numelem = 1, tottime = 0.0, k = 0; k < 5; k++) { - glPushAttrib(GL_ALL_ATTRIB_BITS); - bmark->init(); - - stime = glutGet(GLUT_ELAPSED_TIME); - numelem = bmark->run(bmark->size[j], num); - glFinish(); - etime = glutGet(GLUT_ELAPSED_TIME); - - glPopAttrib(); - - dtime = (etime - stime) / 1000.0; - tottime += dtime; - - fprintf(stderr, "Elapsed time for run %d: %f\n", k, dtime); - - if (dtime < mintime) - mintime = dtime; - if (dtime > maxtime) - maxtime = dtime; - } - - tottime -= mintime + maxtime; - - fprintf(stdout, "SIZE=%03d => %f %s/sec", bmark->size[j], - numelem / (tottime / 3.0), bmark->unit); - if (bmark->type == 2) - fprintf(stdout, ", MPixel Fill/sec: %f\n", - (numelem * bmark->size[j] * bmark->size[j] / 2) / - (1000000.0 * tottime / 3.0)); - else - fprintf(stdout, "\n"); - } - - fprintf(stdout, "\n\n"); -} - -/***************************************************************************/ - -static void -display(void) -{ - int i; - - if (frontbuffer) - glDrawBuffer(GL_FRONT); - else - glDrawBuffer(GL_BACK); - - for (i = 0; i < NUM_BMARKS; i++) { - fprintf(stderr, "Benchmark: %d\n", i); - - switch (bmarks[i].type) { - case 0: - case 3: - dotest0param(&bmarks[i]); - break; - case 1: - case 2: - dotest1param(&bmarks[i]); - break; - } - } - - exit(0); -} - -int -main(int ac, char **av) -{ - fprintf(stderr, "GLTest v1.0\nWritten by David Bucciarelli\n"); - - if (ac == 2) - frontbuffer = 0; - - glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowPosition(0, 0); - glutInitWindowSize(640, 480); - glutCreateWindow("OpenGL/Mesa Performances"); - glutDisplayFunc(display); - glutMainLoop(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/glutfx.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/glutfx.c deleted file mode 100644 index 8bf5582389..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/glutfx.c +++ /dev/null @@ -1,189 +0,0 @@ - -/* - * Example of how one might use GLUT with the 3Dfx driver in full-screen mode. - * Note: this only works with X since we're using Mesa's GLX "hack" for - * using Glide. - * - * Goals: - * easy setup and input event handling with GLUT - * use 3Dfx hardware - * automatically set MESA environment variables - * don't lose mouse input focus - * - * Brian Paul This file is in the public domain. - */ - - -#include -#include -#include -#include - - -#define WIDTH 640 -#define HEIGHT 480 - - -static int Window = 0; -static int ScreenWidth, ScreenHeight; -static GLuint Torus = 0; -static GLfloat Xrot = 0.0, Yrot = 0.0; - - - -static void Display( void ) -{ - static GLfloat blue[4] = {0.2, 0.2, 1.0, 1.0}; - static GLfloat red[4] = {1.0, 0.2, 0.2, 1.0}; - static GLfloat green[4] = {0.2, 1.0, 0.2, 1.0}; - - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - - glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, blue); - glCallList(Torus); - - glRotatef(90.0, 1, 0, 0); - glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, red); - glCallList(Torus); - - glRotatef(90.0, 0, 1, 0); - glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, green); - glCallList(Torus); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - float ratio = (float) width / (float) height; - - ScreenWidth = width; - ScreenHeight = height; - - /* - * The 3Dfx driver is limited to 640 x 480 but the X window may be larger. - * Enforce that here. - */ - if (width > WIDTH) - width = WIDTH; - if (height > HEIGHT) - height = HEIGHT; - - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -ratio, ratio, -1.0, 1.0, 5.0, 30.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -20.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - glutDestroyWindow(Window); - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - break; - case GLUT_KEY_DOWN: - break; - case GLUT_KEY_LEFT: - break; - case GLUT_KEY_RIGHT: - break; - } - glutPostRedisplay(); -} - - -static void MouseMove( int x, int y ) -{ - Xrot = y - ScreenWidth / 2; - Yrot = x - ScreenHeight / 2; - glutPostRedisplay(); -} - - -static void Init( void ) -{ - Torus = glGenLists(1); - glNewList(Torus, GL_COMPILE); - glutSolidTorus(0.5, 2.0, 10, 20); - glEndList(); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - - glEnable(GL_DEPTH_TEST); - glEnable(GL_CULL_FACE); -} - - -int main( int argc, char *argv[] ) -{ -#ifndef _WIN32 - printf("NOTE: if you've got 3Dfx VooDoo hardware you must run this"); - printf(" program as root.\n\n"); - printf("Move the mouse. Press ESC to exit.\n\n"); -#endif - - /* Tell Mesa GLX to use 3Dfx driver in fullscreen mode. */ - putenv("MESA_GLX_FX=fullscreen"); - - /* Disable 3Dfx Glide splash screen */ - putenv("FX_GLIDE_NO_SPLASH="); - - /* Give an initial size and position so user doesn't have to place window */ - glutInitWindowPosition(0, 0); - glutInitWindowSize(WIDTH, HEIGHT); - glutInit( &argc, argv ); - - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - - Window = glutCreateWindow(argv[0]); - if (!Window) { - printf("Error, couldn't open window\n"); - exit(1); - } - - /* - * Want the X window to fill the screen so that we don't have to - * worry about losing the mouse input focus. - * Note that we won't actually see the X window since we never draw - * to it, hence, the original X screen's contents aren't disturbed. - */ - glutFullScreen(); - - Init(); - - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - glutPassiveMotionFunc( MouseMove ); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/ipers.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/ipers.c deleted file mode 100644 index 6e153c04e1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/ipers.c +++ /dev/null @@ -1,712 +0,0 @@ -/* - * This program is under the GNU GPL. - * Use at your own risk. - * - * written by David Bucciarelli (tech.hmw@plus.it) - * Humanware s.r.l. - */ - -#include -#include -#include -#include - -#if defined (WIN32)|| defined(_WIN32) -#include -#include -#endif - -#include - -#include "readtex.h" - -#ifdef XMESA -#include "GL/xmesa.h" -static int fullscreen = 1; -#endif - -static int WIDTH = 640; -static int HEIGHT = 480; - -static GLint T0; -static GLint Frames; - -#define MAX_LOD 9 - -#define TEX_SKY_WIDTH 256 -#define TEX_SKY_HEIGHT TEX_SKY_WIDTH - -#ifndef M_PI -#define M_PI 3.1415926535 -#endif - -#define FROM_NONE 0 -#define FROM_DOWN 1 -#define FROM_UP 2 -#define FROM_LEFT 3 -#define FROM_RIGHT 4 -#define FROM_FRONT 5 -#define FROM_BACK 6 - -static int win = 0; - -static float obs[3] = { 3.8, 0.0, 0.0 }; -static float dir[3]; -static float v = 0.0; -static float alpha = -90.0; -static float beta = 90.0; - -static int fog = 1; -static int bfcull = 1; -static int usetex = 1; -static int help = 1; -static int poutline = 0; -static int normext = 1; -static int joyavailable = 0; -static int joyactive = 0; -static int LODbias = 3; -static int maxdepth = MAX_LOD; - -static unsigned int totpoly = 0; - -static GLuint t1id, t2id; -static GLuint skydlist, LODdlist[MAX_LOD], LODnumpoly[MAX_LOD]; - -static void -initlight(void) -{ - GLfloat lspec[4] = { 1.0, 1.0, 1.0, 1.0 }; - static GLfloat lightpos[4] = { 30, 15.0, 30.0, 1.0 }; - - glLightfv(GL_LIGHT0, GL_POSITION, lightpos); - glLightfv(GL_LIGHT0, GL_SPECULAR, lspec); - - glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 32.0); - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, lspec); -} - -static void -initdlists(void) -{ - static int slicetable[MAX_LOD][2] = { - {21, 10}, - {18, 9}, - {15, 8}, - {12, 7}, - {9, 6}, - {7, 5}, - {5, 4}, - {4, 3}, - {3, 2} - }; - GLUquadricObj *obj; - int i, xslices, yslices; - - obj = gluNewQuadric(); - - skydlist = glGenLists(1); - glNewList(skydlist, GL_COMPILE); - glBindTexture(GL_TEXTURE_2D, t2id); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - glColor3f(1.0f, 1.0f, 1.0f); - - gluQuadricDrawStyle(obj, GLU_FILL); - gluQuadricNormals(obj, GLU_NONE); - gluQuadricTexture(obj, GL_TRUE); - gluQuadricOrientation(obj, GLU_INSIDE); - gluSphere(obj, 40.0f, 18, 9); - - glEndList(); - - for (i = 0; i < MAX_LOD; i++) { - LODdlist[i] = glGenLists(1); - glNewList(LODdlist[i], GL_COMPILE); - - gluQuadricDrawStyle(obj, GLU_FILL); - gluQuadricNormals(obj, GLU_SMOOTH); - gluQuadricTexture(obj, GL_TRUE); - gluQuadricOrientation(obj, GLU_OUTSIDE); - xslices = slicetable[i][0]; - yslices = slicetable[i][1]; - gluSphere(obj, 1.0f, xslices, yslices); - LODnumpoly[i] = xslices * (yslices - 2) + 2 * (xslices - 1); - - glEndList(); - } -} - -static void -inittextures(void) -{ - GLubyte tsky[TEX_SKY_HEIGHT][TEX_SKY_WIDTH][3]; - GLuint x, y; - GLfloat fact; - GLenum gluerr; - - /* Brick */ - - glGenTextures(1, &t1id); - glBindTexture(GL_TEXTURE_2D, t1id); - - if (!LoadRGBMipmaps("../images/bw.rgb", 3)) { - fprintf(stderr, "Error reading a texture.\n"); - exit(-1); - } - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR_MIPMAP_LINEAR); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - /* Sky */ - - glGenTextures(1, &t2id); - glBindTexture(GL_TEXTURE_2D, t2id); - - for (y = 0; y < TEX_SKY_HEIGHT; y++) - for (x = 0; x < TEX_SKY_WIDTH; x++) - if (y < TEX_SKY_HEIGHT / 2) { - fact = y / (GLfloat) (TEX_SKY_HEIGHT / 2); - tsky[y][x][0] = - (GLubyte) (255.0f * (0.1f * fact + 0.3f * (1.0f - fact))); - tsky[y][x][1] = - (GLubyte) (255.0f * (0.2f * fact + 1.0f * (1.0f - fact))); - tsky[y][x][2] = 255; - } - else { - tsky[y][x][0] = tsky[TEX_SKY_HEIGHT - y - 1][x][0]; - tsky[y][x][1] = tsky[TEX_SKY_HEIGHT - y - 1][x][1]; - tsky[y][x][2] = 255; - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - if ( - (gluerr = - gluBuild2DMipmaps(GL_TEXTURE_2D, 3, TEX_SKY_WIDTH, TEX_SKY_HEIGHT, - GL_RGB, GL_UNSIGNED_BYTE, (GLvoid *) (tsky)))) { - fprintf(stderr, "GLULib%s\n", (char *) gluErrorString(gluerr)); - exit(-1); - } - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR_MIPMAP_LINEAR); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -} - -static void -calcposobs(void) -{ - dir[0] = sin(alpha * M_PI / 180.0); - dir[1] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0); - dir[2] = cos(beta * M_PI / 180.0); - - if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5) - dir[0] = 0; - if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5) - dir[1] = 0; - if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5) - dir[2] = 0; - - obs[0] += v * dir[0]; - obs[1] += v * dir[1]; - obs[2] += v * dir[2]; -} - -static void -special(int k, int x, int y) -{ - switch (k) { - case GLUT_KEY_LEFT: - alpha -= 2.0; - break; - case GLUT_KEY_RIGHT: - alpha += 2.0; - break; - case GLUT_KEY_DOWN: - beta -= 2.0; - break; - case GLUT_KEY_UP: - beta += 2.0; - break; - } -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: - exit(0); - break; - - case 'a': - v += 0.01; - break; - case 'z': - v -= 0.01; - break; - -#ifdef XMESA - case ' ': - fullscreen = (!fullscreen); - XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW); - break; -#endif - - case '+': - LODbias--; - break; - case '-': - LODbias++; - break; - case 'j': - joyactive = (!joyactive); - break; - case 'h': - help = (!help); - break; - case 'f': - fog = (!fog); - break; - case 't': - usetex = (!usetex); - break; - case 'n': - normext = (!normext); - break; - case 'b': - if (bfcull) { - glDisable(GL_CULL_FACE); - bfcull = 0; - } - else { - glEnable(GL_CULL_FACE); - bfcull = 1; - } - break; - case 'p': - if (poutline) { - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - poutline = 0; - usetex = 1; - } - else { - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - poutline = 1; - usetex = 0; - } - break; - } -} - -static void -reshape(int w, int h) -{ - WIDTH = w; - HEIGHT = h; - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(90.0, w / (float) h, 0.8, 100.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glViewport(0, 0, w, h); -} - -static void -printstring(void *font, char *string) -{ - int len, i; - - len = (int) strlen(string); - for (i = 0; i < len; i++) - glutBitmapCharacter(font, string[i]); -} - -static void -printhelp(void) -{ - glEnable(GL_BLEND); - glColor4f(0.5, 0.5, 0.5, 0.5); - glRecti(40, 40, 600, 440); - glDisable(GL_BLEND); - - glColor3f(1.0, 0.0, 0.0); - glRasterPos2i(300, 420); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Help"); - - glRasterPos2i(60, 390); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "h - Toggle Help"); - glRasterPos2i(60, 360); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "t - Toggle Textures"); - glRasterPos2i(60, 330); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "f - Toggle Fog"); - glRasterPos2i(60, 300); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "b - Toggle Back face culling"); - glRasterPos2i(60, 270); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Arrow Keys - Rotate"); - glRasterPos2i(60, 240); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "a - Increase velocity"); - glRasterPos2i(60, 210); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "z - Decrease velocity"); - glRasterPos2i(60, 180); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "p - Toggle Wire frame"); - glRasterPos2i(60, 150); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, - "n - Toggle GL_EXT_rescale_normal extension"); - glRasterPos2i(60, 120); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, - "+/- - Increase/decrease the Object maximum LOD"); - - glRasterPos2i(60, 90); - if (joyavailable) - printstring(GLUT_BITMAP_TIMES_ROMAN_24, - "j - Toggle jostick control (Joystick control available)"); - else - printstring(GLUT_BITMAP_TIMES_ROMAN_24, - "(No Joystick control available)"); -} - -static void -dojoy(void) -{ -#ifdef _WIN32 - static UINT max[2] = { 0, 0 }; - static UINT min[2] = { 0xffffffff, 0xffffffff }, center[2]; - MMRESULT res; - JOYINFO joy; - - res = joyGetPos(JOYSTICKID1, &joy); - - if (res == JOYERR_NOERROR) { - joyavailable = 1; - - if (max[0] < joy.wXpos) - max[0] = joy.wXpos; - if (min[0] > joy.wXpos) - min[0] = joy.wXpos; - center[0] = (max[0] + min[0]) / 2; - - if (max[1] < joy.wYpos) - max[1] = joy.wYpos; - if (min[1] > joy.wYpos) - min[1] = joy.wYpos; - center[1] = (max[1] + min[1]) / 2; - - if (joyactive) { - if (fabs(center[0] - (float) joy.wXpos) > 0.1 * (max[0] - min[0])) - alpha -= - 2.0 * (center[0] - (float) joy.wXpos) / (max[0] - min[0]); - if (fabs(center[1] - (float) joy.wYpos) > 0.1 * (max[1] - min[1])) - beta += 2.0 * (center[1] - (float) joy.wYpos) / (max[1] - min[1]); - - if (joy.wButtons & JOY_BUTTON1) - v += 0.01; - if (joy.wButtons & JOY_BUTTON2) - v -= 0.01; - } - } - else - joyavailable = 0; -#endif -} - -static void -drawipers(int depth, int from) -{ - int lod; - - if (depth == maxdepth) - return; - - lod = depth + LODbias; - if (lod < 0) - lod = 0; - if (lod >= MAX_LOD) - return; - - switch (from) { - case FROM_NONE: - glCallList(LODdlist[lod]); - - depth++; - drawipers(depth, FROM_DOWN); - drawipers(depth, FROM_UP); - drawipers(depth, FROM_FRONT); - drawipers(depth, FROM_BACK); - drawipers(depth, FROM_LEFT); - drawipers(depth, FROM_RIGHT); - break; - case FROM_FRONT: - glPushMatrix(); - glTranslatef(0.0f, -1.5f, 0.0f); - glScalef(0.5f, 0.5f, 0.5f); - - glCallList(LODdlist[lod]); - - depth++; - drawipers(depth, FROM_DOWN); - drawipers(depth, FROM_UP); - drawipers(depth, FROM_FRONT); - drawipers(depth, FROM_LEFT); - drawipers(depth, FROM_RIGHT); - glPopMatrix(); - break; - case FROM_BACK: - glPushMatrix(); - glTranslatef(0.0f, 1.5f, 0.0f); - glScalef(0.5f, 0.5f, 0.5f); - - glCallList(LODdlist[lod]); - - depth++; - drawipers(depth, FROM_DOWN); - drawipers(depth, FROM_UP); - drawipers(depth, FROM_BACK); - drawipers(depth, FROM_LEFT); - drawipers(depth, FROM_RIGHT); - glPopMatrix(); - break; - case FROM_LEFT: - glPushMatrix(); - glTranslatef(-1.5f, 0.0f, 0.0f); - glScalef(0.5f, 0.5f, 0.5f); - - glCallList(LODdlist[lod]); - - depth++; - drawipers(depth, FROM_DOWN); - drawipers(depth, FROM_UP); - drawipers(depth, FROM_FRONT); - drawipers(depth, FROM_BACK); - drawipers(depth, FROM_LEFT); - glPopMatrix(); - break; - case FROM_RIGHT: - glPushMatrix(); - glTranslatef(1.5f, 0.0f, 0.0f); - glScalef(0.5f, 0.5f, 0.5f); - - glCallList(LODdlist[lod]); - - depth++; - drawipers(depth, FROM_DOWN); - drawipers(depth, FROM_UP); - drawipers(depth, FROM_FRONT); - drawipers(depth, FROM_BACK); - drawipers(depth, FROM_RIGHT); - glPopMatrix(); - break; - case FROM_DOWN: - glPushMatrix(); - glTranslatef(0.0f, 0.0f, 1.5f); - glScalef(0.5f, 0.5f, 0.5f); - - glCallList(LODdlist[lod]); - - depth++; - drawipers(depth, FROM_DOWN); - drawipers(depth, FROM_FRONT); - drawipers(depth, FROM_BACK); - drawipers(depth, FROM_LEFT); - drawipers(depth, FROM_RIGHT); - glPopMatrix(); - break; - case FROM_UP: - glPushMatrix(); - glTranslatef(0.0f, 0.0f, -1.5f); - glScalef(0.5f, 0.5f, 0.5f); - - glCallList(LODdlist[lod]); - - depth++; - drawipers(depth, FROM_UP); - drawipers(depth, FROM_FRONT); - drawipers(depth, FROM_BACK); - drawipers(depth, FROM_LEFT); - drawipers(depth, FROM_RIGHT); - glPopMatrix(); - break; - } - - totpoly += LODnumpoly[lod]; -} - -static void -draw(void) -{ - static char frbuf[80] = ""; - static GLfloat alpha = 0.0f; - static GLfloat beta = 0.0f; - static float fr = 0.0; - static double t0 = -1.; - double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0; - if (t0 < 0.0) - t0 = t; - dt = t - t0; - t0 = t; - - dojoy(); - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - if (usetex) - glEnable(GL_TEXTURE_2D); - else - glDisable(GL_TEXTURE_2D); - - if (fog) - glEnable(GL_FOG); - else - glDisable(GL_FOG); - - glPushMatrix(); - calcposobs(); - gluLookAt(obs[0], obs[1], obs[2], - obs[0] + dir[0], obs[1] + dir[1], obs[2] + dir[2], - 0.0, 0.0, 1.0); - - /* Scene */ - glEnable(GL_DEPTH_TEST); - - glShadeModel(GL_SMOOTH); - glBindTexture(GL_TEXTURE_2D, t1id); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - glColor3f(1.0f, 1.0f, 1.0f); - glEnable(GL_LIGHT0); - glEnable(GL_LIGHTING); - - if (normext) - glEnable(GL_RESCALE_NORMAL_EXT); - else - glEnable(GL_NORMALIZE); - - glPushMatrix(); - glRotatef(alpha, 0.0f, 0.0f, 1.0f); - glRotatef(beta, 1.0f, 0.0f, 0.0f); - totpoly = 0; - drawipers(0, FROM_NONE); - glPopMatrix(); - - alpha += 4.f * dt; - beta += 2.4f * dt; - - glDisable(GL_LIGHTING); - glDisable(GL_LIGHT0); - glShadeModel(GL_FLAT); - - if (normext) - glDisable(GL_RESCALE_NORMAL_EXT); - else - glDisable(GL_NORMALIZE); - - glCallList(skydlist); - - glPopMatrix(); - - /* Help Screen */ - - sprintf(frbuf, - "Frame rate: %0.2f LOD: %d Tot. poly.: %d Poly/sec: %.1f", - fr, LODbias, totpoly, totpoly * fr); - - glDisable(GL_TEXTURE_2D); - glDisable(GL_FOG); - glShadeModel(GL_FLAT); - glDisable(GL_DEPTH_TEST); - - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); - glOrtho(-0.5, 639.5, -0.5, 479.5, -1.0, 1.0); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - glColor3f(1.0, 0.0, 0.0); - glRasterPos2i(10, 10); - printstring(GLUT_BITMAP_HELVETICA_18, frbuf); - glRasterPos2i(350, 470); - printstring(GLUT_BITMAP_HELVETICA_10, - "IperS V1.0 Written by David Bucciarelli (tech.hmw@plus.it)"); - - if (help) - printhelp(); - - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - glMatrixMode(GL_MODELVIEW); - - glutSwapBuffers(); - - Frames++; - { - GLint t = glutGet(GLUT_ELAPSED_TIME); - if (t - T0 >= 2000) { - GLfloat seconds = (t - T0) / 1000.0; - fr = Frames / seconds; - T0 = t; - Frames = 0; - } - } -} - -int -main(int ac, char **av) -{ - float fogcolor[4] = { 0.7, 0.7, 0.7, 1.0 }; - - fprintf(stderr, - "IperS V1.0\nWritten by David Bucciarelli (tech.hmw@plus.it)\n"); - - glutInitWindowPosition(0, 0); - glutInitWindowSize(WIDTH, HEIGHT); - glutInit(&ac, av); - - glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); - - if (!(win = glutCreateWindow("IperS"))) { - fprintf(stderr, "Error, couldn't open window\n"); - exit(-1); - } - - reshape(WIDTH, HEIGHT); - - glShadeModel(GL_SMOOTH); - glEnable(GL_DEPTH_TEST); - glEnable(GL_CULL_FACE); - glEnable(GL_TEXTURE_2D); - - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - glEnable(GL_FOG); - glFogi(GL_FOG_MODE, GL_EXP2); - glFogfv(GL_FOG_COLOR, fogcolor); - - glFogf(GL_FOG_DENSITY, 0.006); - - glHint(GL_FOG_HINT, GL_NICEST); - - inittextures(); - initdlists(); - initlight(); - - glClearColor(fogcolor[0], fogcolor[1], fogcolor[2], fogcolor[3]); - glClear(GL_COLOR_BUFFER_BIT); - - calcposobs(); - - glutReshapeFunc(reshape); - glutDisplayFunc(draw); - glutKeyboardFunc(key); - glutSpecialFunc(special); - glutIdleFunc(draw); - - glutMainLoop(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/isosurf.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/isosurf.c deleted file mode 100644 index 0710bc6047..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/isosurf.c +++ /dev/null @@ -1,1125 +0,0 @@ - -/* - * Display an isosurface of 3-D wind speed volume. - * - * Command line options: - * -info print GL implementation information - * - * Brian Paul This file in public domain. - */ - - -/* Keys: - * ===== - * - * - Arrow keys to rotate - * - 's' toggles smooth shading - * - 'l' toggles lighting - * - 'f' toggles fog - * - 'I' and 'i' zoom in and out - * - 'c' toggles a user clip plane - * - 'm' toggles colorful materials in GL_TRIANGLES modes. - * - '+' and '-' move the user clip plane - * - * Other options are available via the popup menu. - */ - -#include -#include -#include -#include -#include -#ifdef _WIN32 -#include -#undef CLIP_MASK -#endif -#define GL_GLEXT_PROTOTYPES -#include "GL/glut.h" - -#include "readtex.h" -#define TEXTURE_FILE "../images/reflect.rgb" - -#define LIT 0x00000001 -#define UNLIT 0x00000002 -#define REFLECT 0x00000004 -#define POINT_FILTER 0x00000008 -#define LINEAR_FILTER 0x00000010 -#define GLVERTEX 0x00000020 -#define DRAW_ELTS 0x00000040 -#define DRAW_ARRAYS 0x00000080 -#define ARRAY_ELT 0x00000100 -#define LOCKED 0x00000200 -#define UNLOCKED 0x00000400 -#define IMMEDIATE 0x00000800 -#define DISPLAYLIST 0x00001000 -#define SHADE_SMOOTH 0x00002000 -#define SHADE_FLAT 0x00004000 -#define TRIANGLES 0x00008000 -#define STRIPS 0x00010000 -#define POINTS 0x00020000 -#define USER_CLIP 0x00040000 -#define NO_USER_CLIP 0x00080000 -#define MATERIALS 0x00100000 -#define NO_MATERIALS 0x00200000 -#define FOG 0x00400000 -#define NO_FOG 0x00800000 -#define QUIT 0x01000000 -#define GLINFO 0x02000000 -#define STIPPLE 0x04000000 -#define NO_STIPPLE 0x08000000 -#define POLYGON_FILL 0x10000000 -#define POLYGON_LINE 0x20000000 - -#define LIGHT_MASK (LIT|UNLIT|REFLECT) -#define FILTER_MASK (POINT_FILTER|LINEAR_FILTER) -#define RENDER_STYLE_MASK (GLVERTEX|DRAW_ARRAYS|DRAW_ELTS|ARRAY_ELT) -#define DLIST_MASK (IMMEDIATE|DISPLAYLIST) -#define LOCK_MASK (LOCKED|UNLOCKED) -#define MATERIAL_MASK (MATERIALS|NO_MATERIALS) -#define PRIMITIVE_MASK (TRIANGLES|STRIPS|POINTS) -#define CLIP_MASK (USER_CLIP|NO_USER_CLIP) -#define SHADE_MASK (SHADE_SMOOTH|SHADE_FLAT) -#define FOG_MASK (FOG|NO_FOG) -#define STIPPLE_MASK (STIPPLE|NO_STIPPLE) -#define POLYGON_MASK (POLYGON_FILL|POLYGON_LINE) - -#define MAXVERTS 10000 -static GLint maxverts = MAXVERTS; -static float data[MAXVERTS][6]; -static float compressed_data[MAXVERTS][6]; -static float expanded_data[MAXVERTS*3][6]; -static GLuint indices[MAXVERTS]; -static GLuint tri_indices[MAXVERTS*3]; -static GLuint strip_indices[MAXVERTS]; -static GLfloat col[100][4]; -static GLint numverts, num_tri_verts, numuniq; - -static GLfloat xrot; -static GLfloat yrot; -static GLfloat dist; -static GLint state, allowed = ~0; -static GLboolean doubleBuffer = GL_TRUE; -static GLdouble plane[4]; -static GLuint surf1, dlist_state; - -static GLboolean PrintInfo = GL_FALSE; - - -static GLubyte halftone[] = { - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, - 0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, - 0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, - 0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, - 0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, - 0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55}; - - -static void read_surface( char *filename ) -{ - FILE *f; - - f = fopen(filename,"r"); - if (!f) { - printf("couldn't read %s\n", filename); - exit(1); - } - - numverts = 0; - while (!feof(f) && numverts 0) return 1; \ - return 0; \ -} - -COMPARE_FUNC(0) -COMPARE_FUNC(1) -COMPARE_FUNC(2) -COMPARE_FUNC(3) -COMPARE_FUNC(4) -COMPARE_FUNC(5) -COMPARE_FUNC(6) - -int (*(compare[7]))( const void *a, const void *b ) = -{ - compare_axis_0, - compare_axis_1, - compare_axis_2, - compare_axis_3, - compare_axis_4, - compare_axis_5, - compare_axis_6, -}; - - -#define VEC_ELT(f, s, i) (float *)(((char *)f) + s * i) - -static int sort_axis( int axis, - int vec_size, - int vec_stride, - struct data_idx *indices, - int start, - int finish, - float *out, - int uniq, - const float fudge ) -{ - int i; - - if (finish-start > 2) - { - qsort( indices+start, finish-start, sizeof(*indices), compare[axis] ); - } - else if (indices[start].data[axis] > indices[start+1].data[axis]) - { - struct data_idx tmp = indices[start]; - indices[start] = indices[start+1]; - indices[start+1] = tmp; - } - - if (axis == vec_size-1) { - for (i = start ; i < finish ; ) { - float max = indices[i].data[axis] + fudge; - float *dest = VEC_ELT(out, vec_stride, uniq); - int j; - - for (j = 0 ; j < vec_size ; j++) - dest[j] = indices[i].data[j]; - - for ( ; i < finish && max >= indices[i].data[axis]; i++) - indices[i].uniq_idx = uniq; - - uniq++; - } - } else { - for (i = start ; i < finish ; ) { - int j = i + 1; - float max = indices[i].data[axis] + fudge; - while (j < finish && max >= indices[j].data[axis]) j++; - if (j == i+1) { - float *dest = VEC_ELT(out, vec_stride, uniq); - int k; - - indices[i].uniq_idx = uniq; - - for (k = 0 ; k < vec_size ; k++) - dest[k] = indices[i].data[k]; - - uniq++; - } else { - uniq = sort_axis( axis+1, vec_size, vec_stride, - indices, i, j, out, uniq, fudge ); - } - i = j; - } - } - - return uniq; -} - - -static void extract_indices1( const struct data_idx *in, unsigned int *out, - int n ) -{ - int i; - for ( i = 0 ; i < n ; i++ ) { - out[in[i].idx] = in[i].uniq_idx; - } -} - - -static void compactify_arrays(void) -{ - int i; - struct data_idx *ind; - - ind = (struct data_idx *) malloc( sizeof(struct data_idx) * numverts ); - - for (i = 0 ; i < numverts ; i++) { - ind[i].idx = i; - ind[i].data = data[i]; - } - - numuniq = sort_axis(0, - sizeof(compressed_data[0])/sizeof(float), - sizeof(compressed_data[0]), - ind, - 0, - numverts, - (float *)compressed_data, - 0, - 1e-6); - - printf("Nr unique vertex/normal pairs: %d\n", numuniq); - - extract_indices1( ind, indices, numverts ); - free( ind ); -} - -static void expand_arrays(void) -{ - int i; - int parity = 0; - for (i = 2 ; i < numverts ; i++, parity ^= 1) { - int v0 = i-2+parity; - int v1 = i-1-parity; - int v2 = i; - memcpy( expanded_data[(i-2)*3+0], data[v0], sizeof(data[0]) ); - memcpy( expanded_data[(i-2)*3+1], data[v1], sizeof(data[0]) ); - memcpy( expanded_data[(i-2)*3+2], data[v2], sizeof(data[0]) ); - } -} - -static float myrand( float max ) -{ - return max*rand()/(RAND_MAX+1.0); -} - - -static void make_tri_indices( void ) -{ - unsigned int *v = tri_indices; - unsigned int parity = 0; - int i, j; - - for (j=2;j Can't do strips here as ordering has been lost in - * compaction process... - */ - glVertexPointerEXT( 3, GL_FLOAT, sizeof(data[0]), numuniq, - compressed_data ); - glNormalPointerEXT( GL_FLOAT, sizeof(data[0]), numuniq, - &compressed_data[0][3]); -#ifdef GL_EXT_compiled_vertex_array - if (allowed & LOCKED) { - if (state & LOCKED) { - glLockArraysEXT( 0, numuniq ); - } else { - glUnlockArraysEXT(); - } - } -#endif - } - else if ((state & PRIMITIVE_MASK) == TRIANGLES && - (state & RENDER_STYLE_MASK) == DRAW_ARRAYS) { - fprintf(stderr, "enabling big arrays\n"); - /* Only get here for TRIANGLES and drawarrays - */ - glVertexPointerEXT( 3, GL_FLOAT, sizeof(data[0]), (numverts-2) * 3, - expanded_data ); - glNormalPointerEXT( GL_FLOAT, sizeof(data[0]), (numverts-2) * 3, - &expanded_data[0][3]); - -#ifdef GL_EXT_compiled_vertex_array - if (allowed & LOCKED) { - if (state & LOCKED) { - glLockArraysEXT( 0, (numverts-2)*3 ); - } else { - glUnlockArraysEXT(); - } - } -#endif - } - else { - fprintf(stderr, "enabling normal arrays\n"); - glVertexPointerEXT( 3, GL_FLOAT, sizeof(data[0]), numverts, data ); - glNormalPointerEXT( GL_FLOAT, sizeof(data[0]), numverts, &data[0][3]); -#ifdef GL_EXT_compiled_vertex_array - if (allowed & LOCKED) { - if (state & LOCKED) { - glLockArraysEXT( 0, numverts ); - } else { - glUnlockArraysEXT(); - } - } -#endif - } - - } -#endif - - - if (m & DLIST_MASK) { - UPDATE(state, m, DLIST_MASK); - } - - if (m & MATERIAL_MASK) { - UPDATE(state, m, MATERIAL_MASK); - } - - print_flags("new flags", state); - - glutPostRedisplay(); -} - - - -static void Init(int argc, char *argv[]) -{ - GLfloat fogColor[4] = {0.5,1.0,0.5,1.0}; - - xrot = 0; - yrot = 0; - dist = -6; - plane[0] = 1.0; - plane[1] = 0.0; - plane[2] = -1.0; - plane[3] = 0.0; - - glClearColor(0.0, 0.0, 1.0, 0.0); - glEnable( GL_DEPTH_TEST ); - glEnable( GL_VERTEX_ARRAY_EXT ); - glEnable( GL_NORMAL_ARRAY_EXT ); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5, 25 ); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glClipPlane(GL_CLIP_PLANE0, plane); - - InitMaterials(); - - set_matrix(); - - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); - - glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); - glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); - - - /* Green fog is easy to see */ - glFogi(GL_FOG_MODE,GL_EXP2); - glFogfv(GL_FOG_COLOR,fogColor); - glFogf(GL_FOG_DENSITY,0.15); - glHint(GL_FOG_HINT,GL_DONT_CARE); - - { - static int firsttime = 1; - if (firsttime) { - firsttime = 0; - compactify_arrays(); - expand_arrays(); - make_tri_indices(); - - if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) { - printf("Error: couldn't load texture image\n"); - exit(1); - } - } - } - - ModeMenu(SHADE_SMOOTH| - LIT| - POINT_FILTER| - NO_USER_CLIP| - NO_MATERIALS| - NO_FOG| - NO_STIPPLE| - IMMEDIATE| - STRIPS| - UNLOCKED| - GLVERTEX); - - if (PrintInfo) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } -} - - - -static void Reshape(int width, int height) -{ - glViewport(0, 0, (GLint)width, (GLint)height); -} - - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - case 'f': - ModeMenu((state ^ FOG_MASK) & FOG_MASK); - break; - case 's': - ModeMenu((state ^ SHADE_MASK) & SHADE_MASK); - break; - case 't': - ModeMenu((state ^ STIPPLE_MASK) & STIPPLE_MASK); - break; - case 'l': - ModeMenu((state ^ LIGHT_MASK) & (LIT|UNLIT)); - break; - case 'm': - ModeMenu((state ^ MATERIAL_MASK) & MATERIAL_MASK); - break; - case 'c': - ModeMenu((state ^ CLIP_MASK) & CLIP_MASK); - break; - case 'v': - ModeMenu((LOCKED|IMMEDIATE|DRAW_ELTS|TRIANGLES) & allowed); - break; - case 'V': - ModeMenu(UNLOCKED|IMMEDIATE|GLVERTEX|STRIPS); - break; - case 'b': - Benchmark(5.0, 0); - break; - case 'B': - Benchmark(0, 5.0); - break; - case 'i': - dist += .25; - set_matrix(); - glutPostRedisplay(); - break; - case 'I': - dist -= .25; - set_matrix(); - glutPostRedisplay(); - break; - case '-': - case '_': - plane[3] += 2.0; - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glClipPlane(GL_CLIP_PLANE0, plane); - set_matrix(); - glutPostRedisplay(); - break; - case '+': - case '=': - plane[3] -= 2.0; - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glClipPlane(GL_CLIP_PLANE0, plane); - set_matrix(); - glutPostRedisplay(); - break; - case ' ': - Init(0,0); - break; - } -} - - -static void SpecialKey( int key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_LEFT: - yrot -= 15.0; - break; - case GLUT_KEY_RIGHT: - yrot += 15.0; - break; - case GLUT_KEY_UP: - xrot += 15.0; - break; - case GLUT_KEY_DOWN: - xrot -= 15.0; - break; - default: - return; - } - set_matrix(); - glutPostRedisplay(); -} - - - -static GLint Args(int argc, char **argv) -{ - GLint i; - GLint mode = 0; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } - else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } - else if (strcmp(argv[i], "-info") == 0) { - PrintInfo = GL_TRUE; - } - else if (strcmp(argv[i], "-10") == 0) { - maxverts = 10; - } - else if (strcmp(argv[i], "-100") == 0) { - maxverts = 100; - } - else if (strcmp(argv[i], "-1000") == 0) { - maxverts = 1000; - } - else { - printf("%s (Bad option).\n", argv[i]); - return QUIT; - } - } - - return mode; -} - -int main(int argc, char **argv) -{ - GLenum type; - char *extensions; - - GLuint arg_mode = Args(argc, argv); - - if (arg_mode & QUIT) - exit(0); - - read_surface( "isosurf.dat" ); - - glutInitWindowPosition(0, 0); - glutInitWindowSize(400, 400); - - type = GLUT_DEPTH; - type |= GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Isosurface") <= 0) { - exit(0); - } - - /* Make sure server supports the vertex array extension */ - extensions = (char *) glGetString( GL_EXTENSIONS ); - - if (!strstr( extensions, "GL_EXT_vertex_array" )) - { - printf("Vertex arrays not supported by this renderer\n"); - allowed &= ~(LOCKED|DRAW_ARRAYS|DRAW_ELTS|ARRAY_ELT); - } - else if (!strstr( extensions, "GL_EXT_compiled_vertex_array" )) - { - printf("Compiled vertex arrays not supported by this renderer\n"); - allowed &= ~LOCKED; - } - - Init(argc, argv); - ModeMenu(arg_mode); - - glutCreateMenu(ModeMenu); - glutAddMenuEntry("GL info", GLINFO); - glutAddMenuEntry("", 0); - glutAddMenuEntry("Lit", LIT); - glutAddMenuEntry("Unlit", UNLIT); - glutAddMenuEntry("Reflect", REFLECT); - glutAddMenuEntry("", 0); - glutAddMenuEntry("Smooth", SHADE_SMOOTH); - glutAddMenuEntry("Flat", SHADE_FLAT); - glutAddMenuEntry("", 0); - glutAddMenuEntry("Fog", FOG); - glutAddMenuEntry("No Fog", NO_FOG); - glutAddMenuEntry("", 0); - glutAddMenuEntry("Stipple", STIPPLE); - glutAddMenuEntry("No Stipple", NO_STIPPLE); - glutAddMenuEntry("", 0); - glutAddMenuEntry("Polygon Mode Fill", POLYGON_FILL); - glutAddMenuEntry("Polygon Mode Line", POLYGON_LINE); - glutAddMenuEntry("", 0); - glutAddMenuEntry("Point Filtered", POINT_FILTER); - glutAddMenuEntry("Linear Filtered", LINEAR_FILTER); - glutAddMenuEntry("", 0); - glutAddMenuEntry("GL_TRIANGLES", TRIANGLES); - glutAddMenuEntry("GL_TRIANGLE_STRIPS", STRIPS); - glutAddMenuEntry("GL_POINTS", POINTS); - glutAddMenuEntry("", 0); - glutAddMenuEntry("Displaylist", DISPLAYLIST); - glutAddMenuEntry("Immediate", IMMEDIATE); - glutAddMenuEntry("", 0); - if (allowed & LOCKED) { - glutAddMenuEntry("Locked Arrays (CVA)", LOCKED); - glutAddMenuEntry("Unlocked Arrays", UNLOCKED); - glutAddMenuEntry("", 0); - } - glutAddMenuEntry("glVertex", GLVERTEX); - if (allowed & DRAW_ARRAYS) { - glutAddMenuEntry("glDrawElements", DRAW_ELTS); - glutAddMenuEntry("glDrawArrays", DRAW_ARRAYS); - glutAddMenuEntry("glArrayElement", ARRAY_ELT); - } - glutAddMenuEntry("", 0); - glutAddMenuEntry("Quit", QUIT); - glutAttachMenu(GLUT_RIGHT_BUTTON); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(SpecialKey); - glutDisplayFunc(Display); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/isosurf.dat b/nx-X11/extras/Mesa_6.4.2/progs/demos/isosurf.dat deleted file mode 100644 index 5cadecdb43..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/isosurf.dat +++ /dev/null @@ -1,7179 +0,0 @@ --1.000000 0.050200 0.254800 0.280000 0.504000 0.808000 --1.000000 0.061400 0.243900 0.248000 0.608000 0.744000 --0.973900 0.050200 0.243900 0.312000 0.448000 0.832000 --1.000000 0.100400 0.207000 0.040000 0.608000 0.784000 --0.950000 0.050200 0.232900 0.312000 0.424000 0.840000 --0.950000 0.100400 0.204500 0.176000 0.504000 0.840000 --0.900000 0.050200 0.202100 0.368000 0.256000 0.888000 --0.900000 0.100400 0.184100 0.296000 0.408000 0.856000 --0.865600 0.050200 0.182900 0.480000 0.256000 0.832000 --0.897500 0.100400 0.182900 0.392000 0.408000 0.816000 --0.850000 0.050200 0.170400 0.488000 0.296000 0.816000 --0.850000 0.100400 0.150400 0.488000 0.512000 0.696000 --0.800000 0.050200 0.139800 0.504000 0.392000 0.760000 --0.820700 0.100400 0.121900 0.496000 0.488000 0.704000 --0.800000 0.077200 0.121900 0.512000 0.416000 0.744000 --0.800000 0.100400 0.105500 0.480000 0.456000 0.736000 --0.781300 0.050200 0.121900 0.536000 0.400000 0.736000 --0.750000 0.100400 0.065100 0.488000 0.448000 0.736000 --0.750000 0.050200 0.097600 0.464000 0.408000 0.776000 --0.744800 0.100400 0.060900 0.496000 0.456000 0.728000 --0.700000 0.050200 0.061900 0.536000 0.368000 0.752000 --0.700000 0.051600 0.060900 0.528000 0.416000 0.728000 --0.699000 0.050200 0.060900 0.608000 0.360000 0.696000 --0.700000 0.100400 0.019100 0.504000 0.504000 0.688000 --0.650000 0.050200 0.008200 0.568000 0.384000 0.720000 --0.680200 0.100400 0.000000 0.600000 0.440000 0.656000 --0.650000 0.063100 0.000000 0.592000 0.392000 0.696000 --0.650000 0.100400 -0.043200 0.600000 0.608000 0.496000 --0.641800 0.050200 0.000000 0.616000 0.400000 0.664000 --0.638000 0.100400 -0.060900 0.672000 0.632000 0.368000 --0.600000 0.050200 -0.054100 0.640000 0.448000 0.616000 --0.600000 0.057600 -0.060900 0.728000 0.536000 0.408000 --0.594700 0.050200 -0.060900 0.744000 0.504000 0.416000 --0.600000 0.050200 -0.083400 0.800000 0.528000 -0.248000 --0.573200 0.000000 -0.060900 0.920000 0.296000 -0.248000 --0.600000 0.000000 -0.117700 0.848000 0.200000 -0.488000 --0.554400 -0.050200 -0.060900 0.944000 0.280000 0.128000 --0.600000 -0.008200 -0.121900 0.848000 0.208000 -0.472000 --0.586600 -0.050200 -0.121900 0.872000 0.224000 -0.424000 --0.600000 -0.050200 -0.162700 0.904000 0.232000 -0.344000 --0.578300 -0.100400 -0.121900 0.848000 0.312000 -0.424000 --0.600000 -0.077900 -0.182900 0.856000 0.208000 -0.464000 --0.594100 -0.100400 -0.182900 0.816000 0.296000 -0.480000 --0.600000 -0.100400 -0.193800 0.776000 0.296000 -0.544000 --0.561800 -0.150600 -0.182900 0.544000 0.784000 -0.280000 --0.600000 -0.150600 -0.229400 0.416000 0.744000 -0.512000 --0.550000 -0.155500 -0.182900 0.296000 0.920000 -0.232000 --0.600000 -0.160400 -0.243900 0.432000 0.688000 -0.576000 --0.550000 -0.172700 -0.243900 0.008000 0.856000 -0.512000 --0.600000 -0.200800 -0.299500 0.000000 0.872000 -0.480000 --0.550000 -0.200800 -0.303600 -0.040000 0.880000 -0.464000 --0.600000 -0.203400 -0.304800 0.008000 0.768000 -0.632000 --0.550000 -0.201300 -0.304800 -0.032000 0.864000 -0.488000 --0.600000 -0.251000 -0.360600 -0.120000 0.624000 -0.760000 --0.550000 -0.245600 -0.365800 -0.104000 0.680000 -0.720000 --0.576800 -0.251000 -0.365800 -0.136000 0.624000 -0.760000 --0.550000 -0.251000 -0.371400 -0.120000 0.616000 -0.768000 --0.600000 -0.256300 -0.365800 -0.112000 0.608000 -0.776000 --0.550000 -0.301200 -0.401000 0.000000 0.424000 -0.904000 --0.600000 -0.301200 -0.399100 0.008000 0.480000 -0.872000 --0.550000 -0.349500 -0.426800 0.056000 0.416000 -0.904000 --0.600000 -0.340300 -0.426800 0.032000 0.512000 -0.848000 --0.600000 -0.301200 -0.399100 0.008000 0.480000 -0.872000 --0.650000 -0.337200 -0.426800 0.016000 0.520000 -0.848000 --0.650000 -0.301200 -0.398600 0.000000 0.528000 -0.840000 --0.700000 -0.338200 -0.426800 -0.192000 0.592000 -0.776000 --0.700000 -0.301200 -0.401600 0.016000 0.504000 -0.856000 --0.736800 -0.351500 -0.426800 -0.240000 0.480000 -0.832000 --0.750000 -0.301200 -0.392900 -0.104000 0.352000 -0.928000 --0.750000 -0.351500 -0.422100 -0.312000 0.448000 -0.824000 --0.800000 -0.301200 -0.380800 -0.264000 0.104000 -0.952000 --0.800000 -0.351500 -0.388300 -0.664000 -0.152000 -0.728000 --0.826000 -0.301200 -0.365800 -0.648000 -0.448000 -0.600000 --0.812200 -0.351500 -0.365800 -0.856000 -0.296000 -0.408000 --0.850000 -0.301200 -0.321900 -0.728000 -0.616000 -0.280000 --0.821000 -0.351500 -0.304800 -0.824000 -0.504000 0.232000 --0.850000 -0.306900 -0.304800 -0.768000 -0.624000 0.072000 --0.807300 -0.351500 -0.243900 -0.864000 -0.472000 0.152000 --0.850000 -0.301200 -0.293400 -0.744000 -0.560000 0.336000 --0.834700 -0.301200 -0.243900 -0.840000 -0.504000 0.184000 --0.850000 -0.276800 -0.243900 -0.792000 -0.552000 0.248000 --0.831100 -0.301200 -0.182900 -0.848000 -0.520000 0.016000 --0.850000 -0.271300 -0.182900 -0.816000 -0.568000 0.032000 --0.832400 -0.301200 -0.121900 -0.840000 -0.528000 0.048000 --0.850000 -0.274400 -0.121900 -0.816000 -0.568000 0.008000 --0.826600 -0.301200 -0.060900 -0.824000 -0.544000 0.120000 --0.850000 -0.265600 -0.060900 -0.808000 -0.568000 0.104000 --0.817700 -0.301200 0.000000 -0.808000 -0.560000 0.168000 --0.850000 -0.254700 0.000000 -0.800000 -0.568000 0.168000 --0.805900 -0.301200 0.060900 -0.800000 -0.536000 0.232000 --0.850000 -0.251000 0.014600 -0.800000 -0.560000 0.176000 --0.838400 -0.251000 0.060900 -0.808000 -0.528000 0.248000 --0.850000 -0.233200 0.060900 -0.816000 -0.512000 0.248000 --0.819200 -0.251000 0.121900 -0.760000 -0.496000 0.400000 --0.850000 -0.203500 0.121900 -0.792000 -0.528000 0.288000 --0.800000 -0.251000 0.157900 -0.576000 -0.400000 0.696000 --0.850000 -0.200800 0.125700 -0.776000 -0.360000 0.504000 --0.800000 -0.206500 0.182900 -0.304000 -0.264000 0.912000 --0.803100 -0.200800 0.182900 -0.456000 -0.168000 0.864000 --0.800000 -0.200800 0.184500 -0.256000 -0.128000 0.952000 --0.836800 -0.150600 0.182900 -0.304000 -0.304000 0.896000 --0.800000 -0.150600 0.189500 -0.240000 -0.056000 0.960000 --0.850000 -0.137400 0.182900 -0.304000 -0.312000 0.896000 --0.800000 -0.100400 0.186900 0.104000 0.048000 0.992000 --0.850000 -0.100400 0.192600 -0.136000 -0.312000 0.936000 --0.800000 -0.063400 0.182900 0.240000 0.160000 0.952000 --0.850000 -0.050200 0.193400 0.200000 0.072000 0.968000 --0.809300 -0.050200 0.182900 0.232000 0.160000 0.952000 --0.850000 0.000000 0.186200 0.256000 0.144000 0.952000 --0.839600 0.000000 0.182900 0.264000 0.152000 0.944000 --0.850000 0.016800 0.182900 0.328000 0.184000 0.920000 --0.800000 0.000000 0.163200 0.400000 0.288000 0.864000 --0.850000 0.050200 0.170400 0.488000 0.296000 0.816000 --0.800000 0.050200 0.139800 0.504000 0.392000 0.760000 --0.800000 0.000000 0.163200 0.400000 0.288000 0.864000 --0.781300 0.050200 0.121900 0.536000 0.400000 0.736000 --0.750000 0.000000 0.129400 0.496000 0.360000 0.776000 --0.750000 0.012900 0.121900 0.496000 0.384000 0.768000 --0.740500 0.000000 0.121900 0.504000 0.352000 0.784000 --0.750000 0.050200 0.097600 0.464000 0.408000 0.776000 --0.700000 0.000000 0.089700 0.584000 0.336000 0.736000 --0.700000 0.050200 0.061900 0.536000 0.368000 0.752000 --0.666100 0.000000 0.060900 0.560000 0.376000 0.728000 --0.699000 0.050200 0.060900 0.608000 0.360000 0.696000 --0.650000 0.000000 0.045200 0.576000 0.400000 0.704000 --0.650000 0.050200 0.008200 0.568000 0.384000 0.720000 --0.609800 0.000000 0.000000 0.696000 0.384000 0.592000 --0.641800 0.050200 0.000000 0.616000 0.400000 0.664000 --0.600000 0.000000 -0.017800 0.736000 0.384000 0.544000 --0.600000 0.050200 -0.054100 0.640000 0.448000 0.616000 --0.573200 0.000000 -0.060900 0.920000 0.296000 -0.248000 --0.594700 0.050200 -0.060900 0.744000 0.504000 0.416000 --0.594700 0.050200 -0.060900 0.744000 0.504000 0.416000 --1.000000 0.050200 0.254800 0.280000 0.504000 0.808000 --1.000000 0.050200 0.254800 0.280000 0.504000 0.808000 --1.000000 0.000000 0.260200 0.424000 -0.312000 0.840000 --0.973900 0.050200 0.243900 0.312000 0.448000 0.832000 --0.976100 0.000000 0.243900 0.464000 -0.432000 0.768000 --0.950000 0.050200 0.232900 0.312000 0.424000 0.840000 --0.950000 0.000000 0.224500 0.344000 -0.144000 0.920000 --0.900000 0.050200 0.202100 0.368000 0.256000 0.888000 --0.900000 0.000000 0.204000 0.296000 0.088000 0.944000 --0.865600 0.050200 0.182900 0.480000 0.256000 0.832000 --0.850000 0.000000 0.186200 0.256000 0.144000 0.952000 --0.850000 0.016800 0.182900 0.328000 0.184000 0.920000 --0.865600 0.050200 0.182900 0.480000 0.256000 0.832000 --0.850000 0.050200 0.170400 0.488000 0.296000 0.816000 --0.850000 0.050200 0.170400 0.488000 0.296000 0.816000 --1.000000 0.000000 0.260200 0.424000 -0.312000 0.840000 --1.000000 0.000000 0.260200 0.424000 -0.312000 0.840000 --0.976100 0.000000 0.243900 0.464000 -0.432000 0.768000 --1.000000 -0.016700 0.243900 0.424000 -0.608000 0.656000 --0.950000 0.000000 0.224500 0.344000 -0.144000 0.920000 --1.000000 -0.050200 0.185900 -0.256000 -0.768000 0.576000 --0.950000 -0.050200 0.212200 0.160000 -0.384000 0.904000 --1.000000 -0.052000 0.182900 -0.336000 -0.760000 0.544000 --0.950000 -0.074300 0.182900 -0.344000 -0.776000 0.520000 --1.000000 -0.075600 0.121900 -0.328000 -0.896000 0.264000 --0.950000 -0.095300 0.121900 -0.400000 -0.864000 0.280000 --1.000000 -0.090800 0.060900 -0.320000 -0.912000 0.248000 --0.950000 -0.100400 0.101700 -0.400000 -0.872000 0.264000 --0.973400 -0.100400 0.060900 -0.344000 -0.904000 0.240000 --0.950000 -0.110600 0.060900 -0.432000 -0.856000 0.248000 --1.000000 -0.100400 0.014600 -0.304000 -0.920000 0.208000 --0.950000 -0.123700 0.000000 -0.488000 -0.840000 0.216000 --1.000000 -0.103100 0.000000 -0.304000 -0.920000 0.208000 --0.950000 -0.136200 -0.060900 -0.528000 -0.832000 0.152000 --1.000000 -0.112800 -0.060900 -0.376000 -0.912000 0.144000 --0.950000 -0.144800 -0.121900 -0.536000 -0.832000 0.120000 --1.000000 -0.120900 -0.121900 -0.400000 -0.904000 0.136000 --0.950000 -0.150600 -0.169000 -0.584000 -0.792000 0.136000 --1.000000 -0.129600 -0.182900 -0.400000 -0.904000 0.136000 --0.952800 -0.150600 -0.182900 -0.568000 -0.808000 0.136000 --1.000000 -0.135800 -0.243900 -0.400000 -0.904000 0.096000 --0.966700 -0.150600 -0.243900 -0.472000 -0.864000 0.152000 --1.000000 -0.142300 -0.304800 -0.328000 -0.456000 -0.824000 --0.989000 -0.150600 -0.304800 -0.440000 -0.624000 -0.640000 --1.000000 -0.100400 -0.332000 -0.256000 -0.392000 -0.880000 --0.950000 -0.150600 -0.330800 -0.416000 -0.432000 -0.792000 --0.950000 -0.100400 -0.349400 -0.088000 -0.160000 -0.976000 --0.900000 -0.150600 -0.338300 -0.216000 -0.104000 -0.968000 --0.900000 -0.100400 -0.346700 0.112000 -0.048000 -0.984000 --0.850000 -0.150600 -0.349400 0.072000 0.056000 -0.992000 --0.850000 -0.100400 -0.332400 0.280000 0.112000 -0.952000 --0.800000 -0.150600 -0.340500 0.312000 0.288000 -0.896000 --0.800000 -0.100400 -0.313000 0.368000 0.216000 -0.896000 --0.750000 -0.150600 -0.317800 0.416000 0.384000 -0.816000 --0.785000 -0.100400 -0.304800 0.328000 0.224000 -0.912000 --0.750000 -0.129200 -0.304800 0.392000 0.376000 -0.832000 --0.750000 -0.100400 -0.291100 0.336000 0.256000 -0.896000 --0.731900 -0.150600 -0.304800 0.424000 0.400000 -0.808000 --0.700000 -0.100400 -0.274700 0.392000 0.112000 -0.904000 --0.700000 -0.150600 -0.284500 0.376000 0.392000 -0.832000 --0.650000 -0.100400 -0.251900 0.448000 0.224000 -0.856000 --0.650000 -0.150600 -0.267500 0.376000 0.464000 -0.792000 --0.638400 -0.100400 -0.243900 0.560000 0.160000 -0.808000 --0.612700 -0.150600 -0.243900 0.496000 0.576000 -0.640000 --0.600000 -0.100400 -0.193800 0.776000 0.296000 -0.544000 --0.600000 -0.150600 -0.229400 0.416000 0.744000 -0.512000 --0.612700 -0.150600 -0.243900 0.496000 0.576000 -0.640000 --0.600000 -0.160400 -0.243900 0.432000 0.688000 -0.576000 --0.650000 -0.150600 -0.267500 0.376000 0.464000 -0.792000 --0.600000 -0.200800 -0.299500 0.000000 0.872000 -0.480000 --0.650000 -0.200800 -0.303800 0.136000 0.680000 -0.712000 --0.600000 -0.203400 -0.304800 0.008000 0.768000 -0.632000 --0.650000 -0.201600 -0.304800 0.104000 0.688000 -0.704000 --0.600000 -0.251000 -0.360600 -0.120000 0.624000 -0.760000 --0.650000 -0.251000 -0.354800 0.152000 0.632000 -0.752000 --0.600000 -0.256300 -0.365800 -0.112000 0.608000 -0.776000 --0.650000 -0.261300 -0.365800 0.088000 0.568000 -0.808000 --0.600000 -0.301200 -0.399100 0.008000 0.480000 -0.872000 --0.650000 -0.301200 -0.398600 0.000000 0.528000 -0.840000 --0.650000 -0.261300 -0.365800 0.088000 0.568000 -0.808000 --0.700000 -0.301200 -0.401600 0.016000 0.504000 -0.856000 --0.700000 -0.252100 -0.365800 0.096000 0.552000 -0.824000 --0.750000 -0.301200 -0.392900 -0.104000 0.352000 -0.928000 --0.707800 -0.251000 -0.365800 0.064000 0.432000 -0.896000 --0.750000 -0.251000 -0.369800 0.056000 0.280000 -0.952000 --0.750000 -0.240500 -0.365800 0.056000 0.272000 -0.952000 --0.800000 -0.251000 -0.370300 -0.064000 0.200000 -0.976000 --0.800000 -0.234100 -0.365800 -0.112000 0.264000 -0.952000 --0.828000 -0.251000 -0.365800 -0.248000 0.216000 -0.936000 --0.800000 -0.200800 -0.355700 0.080000 0.256000 -0.960000 --0.850000 -0.251000 -0.359600 -0.320000 0.248000 -0.912000 --0.850000 -0.200800 -0.351200 -0.168000 0.112000 -0.976000 --0.891700 -0.251000 -0.304800 -0.808000 -0.512000 -0.264000 --0.900000 -0.200800 -0.331500 -0.576000 -0.328000 -0.736000 --0.900000 -0.236500 -0.304800 -0.680000 -0.456000 -0.560000 --0.931500 -0.200800 -0.304800 -0.648000 -0.520000 -0.544000 --0.900000 -0.212400 -0.243900 -0.672000 -0.712000 0.176000 --0.914100 -0.200800 -0.243900 -0.664000 -0.728000 0.128000 --0.900000 -0.206900 -0.182900 -0.648000 -0.752000 0.056000 --0.907400 -0.200800 -0.182900 -0.688000 -0.712000 0.072000 --0.900000 -0.204500 -0.121900 -0.688000 -0.712000 0.104000 --0.903800 -0.200800 -0.121900 -0.696000 -0.704000 0.120000 --0.900000 -0.200800 -0.096200 -0.752000 -0.632000 0.128000 --0.943100 -0.150600 -0.121900 -0.672000 -0.720000 0.120000 --0.900000 -0.192500 -0.060900 -0.856000 -0.488000 0.144000 --0.932400 -0.150600 -0.060900 -0.688000 -0.696000 0.176000 --0.900000 -0.169600 0.000000 -0.800000 -0.552000 0.224000 --0.915700 -0.150600 0.000000 -0.696000 -0.672000 0.232000 --0.900000 -0.150600 0.057700 -0.744000 -0.616000 0.232000 --0.950000 -0.123700 0.000000 -0.488000 -0.840000 0.216000 --0.900000 -0.149700 0.060900 -0.696000 -0.664000 0.232000 --0.950000 -0.110600 0.060900 -0.432000 -0.856000 0.248000 --0.900000 -0.127600 0.121900 -0.608000 -0.704000 0.344000 --0.950000 -0.100400 0.101700 -0.400000 -0.872000 0.264000 --0.939400 -0.100400 0.121900 -0.456000 -0.816000 0.336000 --0.950000 -0.095300 0.121900 -0.400000 -0.864000 0.280000 --0.900000 -0.100400 0.174900 -0.400000 -0.624000 0.656000 --0.950000 -0.074300 0.182900 -0.344000 -0.776000 0.520000 --0.900000 -0.094400 0.182900 -0.312000 -0.608000 0.720000 --0.950000 -0.050200 0.212200 0.160000 -0.384000 0.904000 --0.900000 -0.050200 0.208600 0.200000 -0.168000 0.960000 --0.950000 0.000000 0.224500 0.344000 -0.144000 0.920000 --0.900000 0.000000 0.204000 0.296000 0.088000 0.944000 --0.900000 -0.050200 0.208600 0.200000 -0.168000 0.960000 --0.850000 0.000000 0.186200 0.256000 0.144000 0.952000 --0.850000 -0.050200 0.193400 0.200000 0.072000 0.968000 --0.900000 -0.050200 0.208600 0.200000 -0.168000 0.960000 --0.850000 -0.100400 0.192600 -0.136000 -0.312000 0.936000 --0.900000 -0.094400 0.182900 -0.312000 -0.608000 0.720000 --0.886800 -0.100400 0.182900 -0.288000 -0.576000 0.752000 --0.900000 -0.100400 0.174900 -0.400000 -0.624000 0.656000 --0.850000 -0.137400 0.182900 -0.304000 -0.312000 0.896000 --0.900000 -0.127600 0.121900 -0.608000 -0.704000 0.344000 --0.850000 -0.150600 0.175600 -0.632000 -0.392000 0.664000 --0.878400 -0.150600 0.121900 -0.736000 -0.560000 0.368000 --0.850000 -0.200800 0.125700 -0.776000 -0.360000 0.504000 --0.851500 -0.200800 0.121900 -0.832000 -0.360000 0.408000 --0.850000 -0.203500 0.121900 -0.792000 -0.528000 0.288000 --0.869300 -0.200800 0.060900 -0.824000 -0.496000 0.248000 --0.850000 -0.233200 0.060900 -0.816000 -0.512000 0.248000 --0.882700 -0.200800 0.000000 -0.840000 -0.496000 0.192000 --0.850000 -0.251000 0.014600 -0.800000 -0.560000 0.176000 --0.852600 -0.251000 0.000000 -0.800000 -0.568000 0.168000 --0.850000 -0.254700 0.000000 -0.800000 -0.568000 0.168000 --0.860100 -0.251000 -0.060900 -0.808000 -0.568000 0.112000 --0.850000 -0.265600 -0.060900 -0.808000 -0.568000 0.104000 --0.866600 -0.251000 -0.121900 -0.808000 -0.576000 0.072000 --0.850000 -0.274400 -0.121900 -0.816000 -0.568000 0.008000 --0.864200 -0.251000 -0.182900 -0.800000 -0.592000 0.000000 --0.850000 -0.271300 -0.182900 -0.816000 -0.568000 0.032000 --0.869200 -0.251000 -0.243900 -0.768000 -0.600000 0.200000 --0.850000 -0.276800 -0.243900 -0.792000 -0.552000 0.248000 --0.891700 -0.251000 -0.304800 -0.808000 -0.512000 -0.264000 --0.850000 -0.301200 -0.293400 -0.744000 -0.560000 0.336000 --0.854400 -0.301200 -0.304800 -0.776000 -0.608000 0.112000 --0.850000 -0.306900 -0.304800 -0.768000 -0.624000 0.072000 --0.850000 -0.301200 -0.321900 -0.728000 -0.616000 -0.280000 --0.854400 -0.301200 -0.304800 -0.776000 -0.608000 0.112000 --0.850000 -0.251000 -0.359600 -0.320000 0.248000 -0.912000 --0.891700 -0.251000 -0.304800 -0.808000 -0.512000 -0.264000 --0.891700 -0.251000 -0.304800 -0.808000 -0.512000 -0.264000 --1.000000 0.100400 0.207000 0.040000 0.608000 0.784000 --1.000000 0.100400 0.207000 0.040000 0.608000 0.784000 --0.950000 0.100400 0.204500 0.176000 0.504000 0.840000 --1.000000 0.136100 0.182900 0.152000 0.600000 0.776000 --0.950000 0.127100 0.182900 0.248000 0.536000 0.800000 --1.000000 0.150600 0.170300 0.208000 0.568000 0.792000 --0.950000 0.150600 0.154300 0.208000 0.640000 0.736000 --1.000000 0.192500 0.121900 0.192000 0.664000 0.720000 --0.950000 0.178500 0.121900 0.272000 0.648000 0.704000 --1.000000 0.200800 0.112700 0.192000 0.656000 0.720000 --0.950000 0.200800 0.096100 0.208000 0.672000 0.704000 --1.000000 0.241600 0.060900 0.248000 0.768000 0.584000 --0.950000 0.226300 0.060900 0.264000 0.760000 0.584000 --1.000000 0.251000 0.045400 0.264000 0.768000 0.568000 --0.950000 0.251000 0.016800 0.288000 0.808000 0.504000 --1.000000 0.274600 0.000000 0.264000 0.848000 0.448000 --0.950000 0.258900 0.000000 0.296000 0.848000 0.432000 --1.000000 0.294800 -0.060900 0.312000 0.944000 0.080000 --0.950000 0.277400 -0.060900 0.336000 0.928000 0.080000 --1.000000 0.286500 -0.121900 0.328000 0.872000 -0.344000 --0.950000 0.267200 -0.121900 0.344000 0.864000 -0.336000 --1.000000 0.256900 -0.182900 0.288000 0.752000 -0.584000 --0.950000 0.251000 -0.157200 0.320000 0.808000 -0.480000 --0.985000 0.251000 -0.182900 0.288000 0.752000 -0.576000 --0.950000 0.237800 -0.182900 0.296000 0.760000 -0.568000 --1.000000 0.251000 -0.191500 0.280000 0.728000 -0.616000 --0.950000 0.200800 -0.231900 0.272000 0.640000 -0.704000 --1.000000 0.207900 -0.243900 0.232000 0.640000 -0.728000 --0.980800 0.200800 -0.243900 0.232000 0.632000 -0.736000 --1.000000 0.200800 -0.251300 0.232000 0.624000 -0.736000 --0.950000 0.189400 -0.243900 0.264000 0.616000 -0.728000 --1.000000 0.150600 -0.296000 0.168000 0.544000 -0.816000 --0.950000 0.150600 -0.281200 0.240000 0.600000 -0.752000 --1.000000 0.137800 -0.304800 0.104000 0.472000 -0.872000 --0.950000 0.126000 -0.304800 0.168000 0.528000 -0.824000 --1.000000 0.100400 -0.326700 0.072000 0.384000 -0.912000 --0.950000 0.100400 -0.325900 0.192000 0.384000 -0.896000 --1.000000 0.050200 -0.349300 0.080000 0.216000 -0.968000 --0.950000 0.050200 -0.340200 0.184000 0.072000 -0.976000 --1.000000 0.000000 -0.357700 0.216000 -0.064000 -0.968000 --0.950000 0.000000 -0.337100 0.184000 -0.088000 -0.976000 --1.000000 -0.050200 -0.339100 0.152000 -0.176000 -0.968000 --0.950000 -0.050200 -0.337400 0.088000 0.008000 -0.992000 --1.000000 -0.100400 -0.332000 -0.256000 -0.392000 -0.880000 --0.950000 -0.100400 -0.349400 -0.088000 -0.160000 -0.976000 --0.950000 -0.050200 -0.337400 0.088000 0.008000 -0.992000 --0.900000 -0.100400 -0.346700 0.112000 -0.048000 -0.984000 --0.900000 -0.050200 -0.330000 0.160000 0.128000 -0.976000 --0.850000 -0.100400 -0.332400 0.280000 0.112000 -0.952000 --0.850000 -0.050200 -0.323400 0.248000 0.176000 -0.944000 --0.800000 -0.100400 -0.313000 0.368000 0.216000 -0.896000 --0.808200 -0.050200 -0.304800 0.280000 0.136000 -0.944000 --0.800000 -0.066700 -0.304800 0.296000 0.144000 -0.936000 --0.800000 -0.050200 -0.302200 0.264000 0.120000 -0.952000 --0.785000 -0.100400 -0.304800 0.328000 0.224000 -0.912000 --0.750000 -0.050200 -0.287100 0.288000 0.040000 -0.952000 --0.750000 -0.100400 -0.291100 0.336000 0.256000 -0.896000 --0.700000 -0.050200 -0.272000 0.360000 0.104000 -0.920000 --0.700000 -0.100400 -0.274700 0.392000 0.112000 -0.904000 --0.650000 -0.050200 -0.249300 0.496000 0.208000 -0.840000 --0.650000 -0.100400 -0.251900 0.448000 0.224000 -0.856000 --0.642900 -0.050200 -0.243900 0.560000 0.208000 -0.792000 --0.638400 -0.100400 -0.243900 0.560000 0.160000 -0.808000 --0.606100 -0.050200 -0.182900 0.864000 0.248000 -0.424000 --0.600000 -0.100400 -0.193800 0.776000 0.296000 -0.544000 --0.600000 -0.077900 -0.182900 0.856000 0.208000 -0.464000 --0.606100 -0.050200 -0.182900 0.864000 0.248000 -0.424000 --0.600000 -0.050200 -0.162700 0.904000 0.232000 -0.344000 --0.621400 0.000000 -0.182900 0.848000 0.280000 -0.440000 --0.600000 -0.008200 -0.121900 0.848000 0.208000 -0.472000 --0.601900 0.000000 -0.121900 0.848000 0.208000 -0.472000 --0.600000 0.000000 -0.117700 0.848000 0.200000 -0.488000 --0.614300 0.050200 -0.121900 0.720000 0.480000 -0.480000 --0.600000 0.050200 -0.083400 0.800000 0.528000 -0.248000 --0.650000 0.089500 -0.121900 0.728000 0.552000 -0.384000 --0.600000 0.057600 -0.060900 0.728000 0.536000 0.408000 --0.650000 0.100400 -0.098000 0.720000 0.624000 -0.288000 --0.638000 0.100400 -0.060900 0.672000 0.632000 0.368000 --0.650000 0.112000 -0.060900 0.672000 0.704000 0.200000 --0.650000 0.100400 -0.043200 0.600000 0.608000 0.496000 --0.689800 0.150600 -0.060900 0.640000 0.736000 0.192000 --0.680200 0.100400 0.000000 0.600000 0.440000 0.656000 --0.700000 0.150600 -0.043600 0.552000 0.712000 0.424000 --0.700000 0.121800 0.000000 0.536000 0.544000 0.632000 --0.734000 0.150600 0.000000 0.496000 0.640000 0.576000 --0.700000 0.100400 0.019100 0.504000 0.504000 0.688000 --0.750000 0.150600 0.014500 0.472000 0.624000 0.608000 --0.744800 0.100400 0.060900 0.496000 0.456000 0.728000 --0.750000 0.106000 0.060900 0.496000 0.464000 0.728000 --0.750000 0.100400 0.065100 0.488000 0.448000 0.736000 --0.796300 0.150600 0.060900 0.512000 0.584000 0.616000 --0.800000 0.100400 0.105500 0.480000 0.456000 0.736000 --0.800000 0.150600 0.064100 0.424000 0.560000 0.704000 --0.820700 0.100400 0.121900 0.496000 0.488000 0.704000 --0.850000 0.150600 0.098600 0.360000 0.600000 0.704000 --0.850000 0.127100 0.121900 0.424000 0.560000 0.704000 --0.892900 0.150600 0.121900 0.360000 0.624000 0.680000 --0.850000 0.100400 0.150400 0.488000 0.512000 0.696000 --0.900000 0.150600 0.126400 0.344000 0.632000 0.688000 --0.897500 0.100400 0.182900 0.392000 0.408000 0.816000 --0.900000 0.101900 0.182900 0.304000 0.552000 0.768000 --0.900000 0.100400 0.184100 0.296000 0.408000 0.856000 --0.950000 0.127100 0.182900 0.248000 0.536000 0.800000 --0.950000 0.100400 0.204500 0.176000 0.504000 0.840000 --0.950000 0.100400 0.204500 0.176000 0.504000 0.840000 --0.886800 -0.100400 0.182900 -0.288000 -0.576000 0.752000 --0.886800 -0.100400 0.182900 -0.288000 -0.576000 0.752000 --0.850000 -0.100400 0.192600 -0.136000 -0.312000 0.936000 --0.850000 -0.137400 0.182900 -0.304000 -0.312000 0.896000 --0.850000 -0.137400 0.182900 -0.304000 -0.312000 0.896000 --0.800000 -0.100400 0.186900 0.104000 0.048000 0.992000 --0.800000 -0.100400 0.186900 0.104000 0.048000 0.992000 --0.800000 -0.063400 0.182900 0.240000 0.160000 0.952000 --0.776900 -0.100400 0.182900 0.184000 0.120000 0.968000 --0.800000 -0.050200 0.179900 0.264000 0.176000 0.944000 --0.750000 -0.100400 0.174700 0.320000 0.192000 0.920000 --0.750000 -0.050200 0.155100 0.464000 0.288000 0.832000 --0.700000 -0.100400 0.138900 0.488000 0.288000 0.816000 --0.708600 -0.050200 0.121900 0.496000 0.344000 0.784000 --0.700000 -0.062200 0.121900 0.504000 0.344000 0.784000 --0.700000 -0.050200 0.115300 0.496000 0.344000 0.792000 --0.677900 -0.100400 0.121900 0.528000 0.328000 0.776000 --0.650000 -0.050200 0.076400 0.576000 0.320000 0.744000 --0.650000 -0.100400 0.096100 0.592000 0.288000 0.744000 --0.635700 -0.050200 0.060900 0.640000 0.304000 0.696000 --0.612900 -0.100400 0.060900 0.624000 0.376000 0.672000 --0.600000 -0.050200 0.018400 0.648000 0.320000 0.688000 --0.600000 -0.100400 0.044600 0.672000 0.336000 0.656000 --0.584800 -0.050200 0.000000 0.744000 0.336000 0.568000 --0.565600 -0.100400 0.000000 0.744000 0.440000 0.496000 --0.554400 -0.050200 -0.060900 0.944000 0.280000 0.128000 --0.550000 -0.100400 -0.036900 0.792000 0.376000 0.464000 --0.550000 -0.066800 -0.060900 0.944000 0.320000 -0.008000 --0.533200 -0.100400 -0.060900 0.712000 0.696000 -0.024000 --0.550000 -0.100400 -0.079500 0.552000 0.552000 -0.616000 --0.500000 -0.119500 -0.060900 -0.160000 0.976000 0.112000 --0.550000 -0.145600 -0.121900 0.512000 0.792000 -0.312000 --0.500000 -0.144400 -0.121900 -0.376000 0.880000 -0.280000 --0.550000 -0.150600 -0.142400 0.376000 0.896000 -0.200000 --0.500000 -0.150600 -0.154000 -0.424000 0.880000 -0.160000 --0.550000 -0.155500 -0.182900 0.296000 0.920000 -0.232000 --0.500000 -0.154300 -0.182900 -0.320000 0.920000 -0.176000 --0.550000 -0.172700 -0.243900 0.008000 0.856000 -0.512000 --0.500000 -0.169200 -0.243900 -0.328000 0.880000 -0.312000 --0.550000 -0.200800 -0.303600 -0.040000 0.880000 -0.464000 --0.500000 -0.196700 -0.304800 -0.120000 0.848000 -0.504000 --0.544700 -0.200800 -0.304800 -0.080000 0.824000 -0.552000 --0.500000 -0.200800 -0.313000 -0.112000 0.824000 -0.544000 --0.550000 -0.201300 -0.304800 -0.032000 0.864000 -0.488000 --0.500000 -0.238600 -0.365800 -0.072000 0.656000 -0.744000 --0.550000 -0.245600 -0.365800 -0.104000 0.680000 -0.720000 --0.500000 -0.251000 -0.377000 -0.032000 0.528000 -0.840000 --0.550000 -0.251000 -0.371400 -0.120000 0.616000 -0.768000 --0.500000 -0.301200 -0.402500 0.040000 0.344000 -0.936000 --0.550000 -0.301200 -0.401000 0.000000 0.424000 -0.904000 --0.500000 -0.351500 -0.423900 0.056000 0.504000 -0.856000 --0.550000 -0.349500 -0.426800 0.056000 0.416000 -0.904000 --0.538500 -0.351500 -0.426800 0.048000 0.480000 -0.872000 --0.500000 -0.351500 -0.423900 0.056000 0.504000 -0.856000 --0.500000 -0.355300 -0.426800 0.056000 0.520000 -0.848000 --0.450000 -0.351500 -0.418600 0.080000 0.512000 -0.848000 --0.450000 -0.362400 -0.426800 0.064000 0.520000 -0.848000 --0.400000 -0.351500 -0.411400 0.000000 0.616000 -0.784000 --0.400000 -0.368700 -0.426800 0.024000 0.560000 -0.824000 --0.350000 -0.351500 -0.416300 -0.176000 0.600000 -0.768000 --0.350000 -0.360100 -0.426800 -0.128000 0.680000 -0.712000 --0.319100 -0.351500 -0.426800 -0.216000 0.568000 -0.784000 --0.350000 -0.351500 -0.416300 -0.176000 0.600000 -0.768000 --0.300000 -0.341100 -0.426800 -0.128000 0.536000 -0.832000 --0.350000 -0.301200 -0.377400 0.232000 0.208000 -0.944000 --0.300000 -0.301200 -0.369600 0.320000 0.544000 -0.768000 --0.350000 -0.251000 -0.367200 0.240000 0.168000 -0.952000 --0.300000 -0.296900 -0.365800 0.296000 0.528000 -0.784000 --0.345700 -0.251000 -0.365800 0.320000 0.336000 -0.880000 --0.300000 -0.251000 -0.348000 0.192000 0.248000 -0.944000 --0.350000 -0.248400 -0.365800 0.184000 0.424000 -0.880000 --0.300000 -0.200800 -0.340600 0.016000 0.280000 -0.952000 --0.350000 -0.200800 -0.339000 0.200000 0.416000 -0.880000 --0.300000 -0.150600 -0.319300 -0.256000 0.480000 -0.832000 --0.350000 -0.159400 -0.304800 -0.248000 0.528000 -0.808000 --0.331500 -0.150600 -0.304800 -0.256000 0.464000 -0.840000 --0.350000 -0.150600 -0.298700 -0.264000 0.464000 -0.840000 --0.300000 -0.118900 -0.304800 -0.376000 0.264000 -0.880000 --0.350000 -0.100400 -0.248500 -0.576000 0.440000 -0.680000 --0.300000 -0.100400 -0.298100 -0.480000 0.288000 -0.824000 --0.350000 -0.093900 -0.243900 -0.600000 0.408000 -0.680000 --0.300000 -0.050200 -0.270300 -0.824000 0.232000 -0.512000 --0.321700 -0.050200 -0.243900 -0.656000 0.344000 -0.656000 --0.300000 0.000000 -0.248500 -0.656000 0.560000 -0.488000 --0.301700 0.000000 -0.243900 -0.744000 0.392000 -0.536000 --0.300000 0.001800 -0.243900 -0.496000 0.680000 -0.520000 --0.340600 0.000000 -0.182900 -0.696000 0.480000 -0.520000 --0.300000 0.050200 -0.185100 -0.648000 0.560000 -0.504000 --0.301000 0.050200 -0.182900 -0.704000 0.472000 -0.512000 --0.300000 0.052000 -0.182900 -0.664000 0.464000 -0.568000 --0.335400 0.050200 -0.121900 -0.752000 0.472000 -0.456000 --0.300000 0.100400 -0.141500 -0.560000 0.512000 -0.640000 --0.317300 0.100400 -0.121900 -0.712000 0.264000 -0.640000 --0.300000 0.144000 -0.121900 -0.728000 0.496000 -0.456000 --0.350000 0.100400 -0.076700 -0.736000 0.256000 -0.616000 --0.300000 0.150600 -0.105900 -0.768000 0.536000 -0.320000 --0.350000 0.148000 -0.060900 -0.504000 0.552000 0.656000 --0.346000 0.150600 -0.060900 -0.768000 -0.144000 0.616000 --0.350000 0.100400 -0.017600 -0.744000 0.352000 0.552000 --0.300000 0.150600 -0.036000 -0.360000 0.064000 0.920000 --0.321000 0.100400 0.000000 -0.264000 0.416000 0.864000 --0.300000 0.112500 0.000000 -0.064000 0.472000 0.872000 --0.300000 0.100400 0.006400 -0.200000 0.408000 0.880000 --0.250000 0.104200 0.000000 0.144000 0.480000 0.856000 --0.250000 0.100400 0.002600 0.144000 0.496000 0.848000 --0.238500 0.100400 0.000000 0.152000 0.496000 0.848000 --0.250000 0.050200 0.048300 0.000000 0.552000 0.832000 --0.200000 0.089800 0.000000 0.216000 0.544000 0.800000 --0.200000 0.050200 0.037800 0.512000 0.448000 0.720000 --0.163800 0.050200 0.000000 0.704000 0.216000 0.664000 --0.200000 0.020500 0.060900 0.664000 0.440000 0.600000 --0.150800 0.000000 0.000000 0.744000 0.072000 0.656000 --0.190300 0.000000 0.060900 0.816000 0.200000 0.536000 --0.152800 -0.050200 0.000000 0.848000 0.032000 0.520000 --0.193200 -0.050200 0.060900 0.808000 0.008000 0.584000 --0.150600 -0.100400 0.000000 0.800000 0.040000 0.592000 --0.190200 -0.100400 0.060900 0.752000 -0.248000 0.600000 --0.150000 -0.104300 0.000000 0.496000 0.120000 0.848000 --0.200000 -0.121800 0.060900 0.728000 -0.328000 0.592000 --0.150000 -0.150600 0.010200 0.376000 0.208000 0.896000 --0.200000 -0.150600 0.042600 0.640000 -0.096000 0.752000 --0.150000 -0.200800 0.013600 0.104000 0.200000 0.968000 --0.200000 -0.200800 0.045500 0.568000 -0.152000 0.808000 --0.150000 -0.251000 0.002400 -0.056000 -0.176000 0.976000 --0.200000 -0.251000 0.018200 0.408000 -0.392000 0.816000 --0.150000 -0.301200 0.010200 -0.304000 -0.280000 0.904000 --0.200000 -0.279600 0.000000 -0.016000 -0.496000 0.864000 --0.169100 -0.301200 0.000000 -0.376000 -0.392000 0.832000 --0.200000 -0.301200 -0.017500 -0.064000 -0.432000 0.896000 --0.150000 -0.346200 0.000000 -0.392000 -0.160000 0.904000 --0.200000 -0.351500 -0.031500 -0.320000 -0.128000 0.936000 --0.150000 -0.351500 -0.001100 -0.192000 -0.352000 0.912000 --0.200000 -0.401700 -0.023400 -0.056000 -0.008000 0.992000 --0.150000 -0.401700 -0.019000 0.408000 -0.232000 0.880000 --0.200000 -0.451900 -0.018000 0.376000 -0.112000 0.912000 --0.150000 -0.451900 -0.041900 0.560000 -0.440000 0.696000 --0.200000 -0.502100 -0.039000 0.512000 -0.608000 0.592000 --0.150000 -0.470000 -0.060900 0.568000 -0.552000 0.600000 --0.181900 -0.502100 -0.060900 0.504000 -0.680000 0.520000 --0.150000 -0.502100 -0.111600 0.592000 -0.752000 0.280000 --0.200000 -0.511900 -0.060900 0.416000 -0.800000 0.424000 --0.150000 -0.505100 -0.121900 0.584000 -0.768000 0.240000 --0.200000 -0.534300 -0.121900 0.456000 -0.832000 0.296000 --0.150000 -0.510100 -0.182900 0.616000 -0.760000 0.168000 --0.200000 -0.549300 -0.182900 0.504000 -0.784000 0.344000 --0.150000 -0.530700 -0.243900 0.632000 -0.664000 0.392000 --0.200000 -0.552300 -0.190900 0.520000 -0.768000 0.360000 --0.172800 -0.552300 -0.243900 0.592000 -0.568000 0.560000 --0.200000 -0.579600 -0.243900 0.568000 -0.648000 0.496000 --0.150000 -0.552300 -0.270100 0.544000 -0.504000 0.656000 --0.200000 -0.602500 -0.268600 0.488000 -0.432000 0.752000 --0.150000 -0.602500 -0.302600 0.392000 -0.240000 0.880000 --0.200000 -0.652700 -0.286600 0.488000 -0.272000 0.824000 --0.150000 -0.609400 -0.304800 0.840000 -0.512000 0.152000 --0.171500 -0.652700 -0.304800 0.576000 -0.304000 0.752000 --0.150000 -0.602500 -0.307600 0.456000 -0.280000 -0.840000 --0.200000 -0.652700 -0.326500 0.488000 -0.272000 -0.824000 --0.200000 -0.602500 -0.345500 0.488000 -0.272000 -0.824000 --0.250000 -0.652700 -0.361600 0.240000 -0.216000 -0.944000 --0.229500 -0.602500 -0.365800 0.408000 -0.240000 -0.872000 --0.250000 -0.639500 -0.365800 0.216000 -0.224000 -0.944000 --0.250000 -0.602500 -0.376000 0.360000 -0.328000 -0.872000 --0.282800 -0.652700 -0.365800 0.080000 -0.160000 -0.976000 --0.300000 -0.602500 -0.397300 -0.248000 -0.488000 -0.832000 --0.300000 -0.652700 -0.367500 0.064000 -0.112000 -0.984000 --0.328400 -0.602500 -0.365800 -0.832000 -0.248000 -0.488000 --0.350000 -0.652700 -0.376000 0.560000 0.160000 -0.808000 --0.350000 -0.629600 -0.365800 0.056000 0.640000 -0.760000 --0.400000 -0.652700 -0.368100 -0.128000 -0.872000 -0.456000 --0.357100 -0.602500 -0.365800 0.904000 0.256000 -0.312000 --0.400000 -0.621700 -0.426800 0.392000 -0.856000 -0.304000 --0.370300 -0.602500 -0.426800 0.624000 -0.760000 -0.160000 --0.357100 -0.602500 -0.365800 0.904000 0.256000 -0.312000 --0.350000 -0.582100 -0.426800 0.344000 -0.808000 -0.456000 --0.350000 -0.585900 -0.365800 0.168000 -0.792000 -0.576000 --0.300000 -0.582000 -0.426800 0.336000 -0.608000 -0.712000 --0.328400 -0.602500 -0.365800 -0.832000 -0.248000 -0.488000 --0.300000 -0.602500 -0.397300 -0.248000 -0.488000 -0.832000 --0.300000 -0.582000 -0.426800 0.336000 -0.608000 -0.712000 --0.250000 -0.602500 -0.376000 0.360000 -0.328000 -0.872000 --0.275900 -0.552300 -0.426800 0.528000 -0.480000 -0.696000 --0.250000 -0.552300 -0.402600 0.504000 -0.312000 -0.792000 --0.250000 -0.526200 -0.426800 0.576000 -0.448000 -0.672000 --0.200000 -0.552300 -0.367100 0.360000 -0.232000 -0.896000 --0.235700 -0.502100 -0.426800 0.696000 -0.464000 -0.536000 --0.200000 -0.502100 -0.370700 0.184000 -0.352000 -0.912000 --0.200000 -0.459900 -0.426800 0.560000 -0.592000 -0.576000 --0.150000 -0.502100 -0.367300 0.088000 -0.320000 -0.936000 --0.191200 -0.451900 -0.426800 0.664000 -0.480000 -0.560000 --0.150000 -0.451900 -0.368100 0.456000 -0.056000 -0.880000 --0.194300 -0.401700 -0.426800 0.792000 0.416000 -0.432000 --0.150000 -0.417500 -0.365800 0.544000 0.056000 -0.832000 --0.151700 -0.401700 -0.365800 0.568000 0.104000 -0.808000 --0.150000 -0.401700 -0.364300 0.552000 0.080000 -0.824000 --0.200000 -0.365300 -0.365800 0.504000 0.768000 -0.376000 --0.150000 -0.351500 -0.350300 0.512000 0.192000 -0.832000 --0.200000 -0.351500 -0.343300 0.312000 0.640000 -0.696000 --0.150000 -0.301200 -0.318500 -0.024000 0.504000 -0.856000 --0.200000 -0.301200 -0.313400 0.328000 0.152000 -0.928000 --0.150000 -0.286300 -0.304800 -0.184000 0.480000 -0.848000 --0.200000 -0.251000 -0.307600 0.408000 0.096000 -0.904000 --0.195100 -0.251000 -0.304800 0.376000 0.112000 -0.912000 --0.200000 -0.200800 -0.306700 0.368000 -0.184000 -0.904000 --0.196100 -0.200800 -0.304800 0.360000 -0.200000 -0.904000 --0.200000 -0.150600 -0.333300 0.216000 -0.272000 -0.936000 --0.150000 -0.159100 -0.304800 0.152000 -0.400000 -0.896000 --0.150000 -0.150600 -0.309500 -0.032000 -0.400000 -0.912000 --0.108400 -0.200800 -0.304800 -0.496000 -0.048000 -0.856000 --0.100000 -0.150600 -0.315000 -0.456000 -0.064000 -0.880000 --0.100000 -0.200800 -0.311700 -0.496000 0.128000 -0.856000 --0.050000 -0.150600 -0.332400 0.016000 -0.080000 -0.992000 --0.050000 -0.200800 -0.320900 -0.056000 0.280000 -0.952000 -0.000000 -0.150600 -0.318000 0.160000 0.016000 -0.984000 -0.000000 -0.200800 -0.332000 -0.296000 0.528000 -0.784000 -0.050000 -0.150600 -0.318000 0.352000 0.312000 -0.872000 -0.050000 -0.200800 -0.360800 -0.016000 0.576000 -0.808000 -0.096000 -0.150600 -0.304800 0.176000 0.336000 -0.920000 -0.100000 -0.200800 -0.352600 0.240000 0.528000 -0.800000 -0.100000 -0.151600 -0.304800 -0.176000 0.536000 -0.816000 -0.150000 -0.200800 -0.325200 0.160000 0.176000 -0.968000 -0.101900 -0.150600 -0.304800 -0.296000 0.368000 -0.872000 -0.150000 -0.150600 -0.323600 -0.232000 0.464000 -0.848000 -0.114400 -0.100400 -0.304800 -0.344000 0.128000 -0.928000 -0.150000 -0.100400 -0.322200 0.000000 0.224000 -0.968000 -0.150000 -0.064700 -0.304800 -0.200000 0.328000 -0.912000 -0.185500 -0.100400 -0.304800 0.296000 0.104000 -0.944000 -0.150000 -0.050200 -0.298400 -0.176000 0.328000 -0.920000 -0.200000 -0.100400 -0.298900 0.088000 0.040000 -0.992000 -0.188500 -0.050200 -0.304800 -0.128000 0.184000 -0.968000 -0.200000 -0.061600 -0.304800 0.000000 -0.144000 -0.984000 -0.200000 -0.050200 -0.307000 0.000000 0.192000 -0.976000 -0.211400 -0.050200 -0.304800 0.152000 0.184000 -0.968000 -0.200000 -0.045300 -0.304800 -0.008000 0.344000 -0.936000 -0.250000 -0.050200 -0.297000 0.000000 0.040000 -0.992000 -0.200000 0.000000 -0.277300 0.080000 0.528000 -0.840000 -0.250000 0.000000 -0.271900 -0.336000 0.528000 -0.776000 -0.200000 0.025700 -0.243900 0.016000 0.752000 -0.648000 -0.250000 0.018500 -0.243900 -0.144000 0.856000 -0.480000 -0.200000 0.019700 -0.182900 0.160000 0.648000 0.736000 -0.250000 0.002800 -0.182900 0.128000 0.640000 0.752000 -0.200000 0.000000 -0.161400 0.032000 0.656000 0.752000 -0.250000 0.000000 -0.180400 0.176000 0.568000 0.792000 -0.200000 -0.041200 -0.121900 0.160000 0.488000 0.856000 -0.250000 -0.050200 -0.132500 0.192000 0.528000 0.816000 -0.222300 -0.050200 -0.121900 0.200000 0.432000 0.872000 -0.250000 -0.068700 -0.121900 0.096000 0.400000 0.904000 -0.200000 -0.050200 -0.116900 0.136000 0.368000 0.912000 -0.250000 -0.100400 -0.106800 0.080000 0.336000 0.936000 -0.200000 -0.100400 -0.095800 0.064000 0.272000 0.952000 -0.250000 -0.150600 -0.087200 0.040000 0.104000 0.992000 -0.200000 -0.150600 -0.099300 0.040000 0.104000 0.992000 -0.250000 -0.200800 -0.084100 0.120000 -0.168000 0.976000 -0.200000 -0.200800 -0.086600 0.112000 -0.336000 0.928000 -0.250000 -0.237200 -0.121900 0.048000 -0.656000 0.744000 -0.200000 -0.240500 -0.121900 0.152000 -0.656000 0.728000 -0.250000 -0.251000 -0.140300 -0.072000 -0.512000 0.848000 -0.200000 -0.251000 -0.134700 0.128000 -0.784000 0.600000 -0.250000 -0.301200 -0.149400 -0.376000 -0.584000 0.712000 -0.200000 -0.290700 -0.182900 -0.520000 -0.680000 0.512000 -0.211500 -0.301200 -0.182900 -0.568000 -0.672000 0.464000 -0.200000 -0.301200 -0.206400 -0.600000 -0.688000 0.384000 -0.250000 -0.319600 -0.182900 -0.280000 -0.832000 0.472000 -0.200000 -0.319700 -0.243900 -0.624000 -0.696000 0.328000 -0.250000 -0.343100 -0.243900 -0.320000 -0.920000 0.208000 -0.200000 -0.340400 -0.304800 -0.480000 -0.448000 -0.744000 -0.250000 -0.348300 -0.304800 -0.128000 -0.736000 -0.656000 -0.200000 -0.301200 -0.321600 -0.488000 -0.368000 -0.784000 -0.250000 -0.313600 -0.365800 -0.336000 -0.640000 -0.680000 -0.236200 -0.301200 -0.365800 -0.608000 -0.320000 -0.712000 -0.250000 -0.301200 -0.379400 -0.536000 -0.264000 -0.792000 -0.250000 -0.271800 -0.365800 -0.320000 0.360000 -0.872000 -0.300000 -0.301200 -0.372900 0.128000 -0.472000 -0.864000 -0.300000 -0.284400 -0.365800 0.136000 0.360000 -0.920000 -0.333500 -0.301200 -0.365800 0.208000 -0.080000 -0.968000 -0.300000 -0.251000 -0.347800 0.304000 0.384000 -0.864000 -0.350000 -0.301200 -0.360500 0.376000 0.184000 -0.904000 -0.350000 -0.251000 -0.329500 0.536000 0.472000 -0.688000 -0.400000 -0.301200 -0.307300 0.704000 0.496000 -0.496000 -0.366700 -0.251000 -0.304800 0.704000 0.488000 -0.496000 -0.400000 -0.299100 -0.304800 0.736000 0.472000 -0.472000 -0.399000 -0.251000 -0.243900 0.912000 -0.008000 -0.392000 -0.400000 -0.252300 -0.243900 0.744000 0.488000 -0.440000 -0.398900 -0.251000 -0.182900 0.896000 -0.160000 0.400000 -0.400000 -0.252800 -0.182900 0.760000 0.464000 0.440000 -0.354900 -0.251000 -0.121900 0.704000 -0.304000 0.632000 -0.400000 -0.301200 -0.149800 0.528000 0.376000 0.752000 -0.350000 -0.260400 -0.121900 0.448000 -0.472000 0.752000 -0.350000 -0.301200 -0.148100 0.392000 -0.048000 0.912000 -0.328900 -0.251000 -0.121900 -0.264000 -0.304000 0.912000 -0.300000 -0.301200 -0.149800 -0.024000 -0.480000 0.872000 -0.300000 -0.251000 -0.132800 -0.224000 -0.464000 0.856000 -0.250000 -0.301200 -0.149400 -0.376000 -0.584000 0.712000 -0.250000 -0.251000 -0.140300 -0.072000 -0.512000 0.848000 -0.300000 -0.251000 -0.132800 -0.224000 -0.464000 0.856000 -0.250000 -0.237200 -0.121900 0.048000 -0.656000 0.744000 -0.300000 -0.234400 -0.121900 0.104000 -0.472000 0.872000 -0.250000 -0.200800 -0.084100 0.120000 -0.168000 0.976000 -0.300000 -0.200800 -0.101500 0.424000 -0.216000 0.872000 -0.250000 -0.150600 -0.087200 0.040000 0.104000 0.992000 -0.300000 -0.150600 -0.090800 0.240000 -0.024000 0.968000 -0.250000 -0.100400 -0.106800 0.080000 0.336000 0.936000 -0.300000 -0.100400 -0.098900 -0.360000 0.344000 0.856000 -0.250000 -0.068700 -0.121900 0.096000 0.400000 0.904000 -0.300000 -0.060700 -0.121900 -0.512000 0.456000 0.720000 -0.250000 -0.050200 -0.132500 0.192000 0.528000 0.816000 -0.300000 -0.050200 -0.130700 -0.504000 0.472000 0.720000 -0.250000 0.000000 -0.180400 0.176000 0.568000 0.792000 -0.300000 0.000000 -0.166100 -0.488000 0.464000 0.728000 -0.250000 0.002800 -0.182900 0.128000 0.640000 0.752000 -0.300000 0.018000 -0.182900 -0.296000 0.768000 0.552000 -0.250000 0.018500 -0.243900 -0.144000 0.856000 -0.480000 -0.300000 0.032100 -0.243900 -0.576000 0.680000 -0.432000 -0.250000 0.000000 -0.271900 -0.336000 0.528000 -0.776000 -0.300000 0.000000 -0.302400 -0.544000 0.608000 -0.568000 -0.250000 -0.050200 -0.297000 0.000000 0.040000 -0.992000 -0.300000 -0.003100 -0.304800 -0.376000 0.424000 -0.816000 -0.266500 -0.050200 -0.304800 -0.280000 0.064000 -0.952000 -0.300000 -0.050200 -0.319900 -0.536000 0.224000 -0.808000 -0.278900 -0.100400 -0.304800 -0.176000 0.256000 -0.944000 -0.300000 -0.100400 -0.310000 -0.248000 0.072000 -0.960000 -0.250000 -0.114900 -0.304800 -0.104000 0.280000 -0.952000 -0.300000 -0.150600 -0.312600 0.312000 -0.200000 -0.920000 -0.250000 -0.150600 -0.317700 0.024000 0.336000 -0.936000 -0.300000 -0.200800 -0.324200 0.480000 0.248000 -0.832000 -0.250000 -0.200800 -0.343100 0.104000 0.232000 -0.960000 -0.300000 -0.251000 -0.347800 0.304000 0.384000 -0.864000 -0.250000 -0.251000 -0.353900 0.064000 0.384000 -0.920000 -0.300000 -0.284400 -0.365800 0.136000 0.360000 -0.920000 -0.250000 -0.271800 -0.365800 -0.320000 0.360000 -0.872000 -0.250000 -0.251000 -0.353900 0.064000 0.384000 -0.920000 -0.236200 -0.301200 -0.365800 -0.608000 -0.320000 -0.712000 -0.200000 -0.251000 -0.346500 -0.184000 0.088000 -0.976000 -0.200000 -0.301200 -0.321600 -0.488000 -0.368000 -0.784000 -0.150000 -0.251000 -0.336000 0.080000 -0.336000 -0.928000 -0.170700 -0.301200 -0.304800 -0.520000 -0.608000 -0.592000 -0.150000 -0.287400 -0.304800 0.000000 -0.712000 -0.688000 -0.176900 -0.301200 -0.243900 -0.504000 -0.800000 0.304000 -0.150000 -0.287700 -0.243900 -0.208000 -0.968000 0.064000 -0.200000 -0.301200 -0.206400 -0.600000 -0.688000 0.384000 -0.150000 -0.278000 -0.182900 -0.064000 -0.936000 0.328000 -0.200000 -0.290700 -0.182900 -0.520000 -0.680000 0.512000 -0.150000 -0.253200 -0.121900 0.192000 -0.808000 0.552000 -0.200000 -0.251000 -0.134700 0.128000 -0.784000 0.600000 -0.161400 -0.251000 -0.121900 0.152000 -0.792000 0.576000 -0.200000 -0.240500 -0.121900 0.152000 -0.656000 0.728000 -0.150000 -0.251000 -0.118100 0.224000 -0.792000 0.560000 -0.200000 -0.200800 -0.086600 0.112000 -0.336000 0.928000 -0.150000 -0.200800 -0.071800 0.312000 -0.208000 0.920000 -0.200000 -0.150600 -0.099300 0.040000 0.104000 0.992000 -0.150000 -0.150600 -0.071000 0.136000 0.176000 0.968000 -0.200000 -0.100400 -0.095800 0.064000 0.272000 0.952000 -0.150000 -0.100400 -0.080500 0.184000 0.336000 0.920000 -0.200000 -0.050200 -0.116900 0.136000 0.368000 0.912000 -0.150000 -0.050200 -0.113700 0.032000 0.448000 0.888000 -0.200000 -0.041200 -0.121900 0.160000 0.488000 0.856000 -0.150000 -0.036300 -0.121900 0.008000 0.488000 0.864000 -0.200000 0.000000 -0.161400 0.032000 0.656000 0.752000 -0.150000 0.000000 -0.166100 -0.096000 0.688000 0.712000 -0.200000 0.019700 -0.182900 0.160000 0.648000 0.736000 -0.150000 0.016800 -0.182900 -0.152000 0.840000 0.520000 -0.200000 0.025700 -0.243900 0.016000 0.752000 -0.648000 -0.150000 0.015400 -0.243900 -0.208000 0.728000 -0.640000 -0.200000 0.000000 -0.277300 0.080000 0.528000 -0.840000 -0.150000 0.000000 -0.257100 -0.208000 0.552000 -0.800000 -0.200000 -0.045300 -0.304800 -0.008000 0.344000 -0.936000 -0.150000 -0.050200 -0.298400 -0.176000 0.328000 -0.920000 -0.188500 -0.050200 -0.304800 -0.128000 0.184000 -0.968000 -0.200000 -0.045300 -0.304800 -0.008000 0.344000 -0.936000 -0.200000 -0.050200 -0.307000 0.000000 0.192000 -0.976000 -0.200000 -0.050200 -0.307000 0.000000 0.192000 -0.976000 --0.800000 -0.100400 0.186900 0.104000 0.048000 0.992000 --0.800000 -0.100400 0.186900 0.104000 0.048000 0.992000 --0.776900 -0.100400 0.182900 0.184000 0.120000 0.968000 --0.800000 -0.150600 0.189500 -0.240000 -0.056000 0.960000 --0.750000 -0.136500 0.182900 0.216000 0.112000 0.968000 --0.750000 -0.150600 0.184600 0.192000 0.080000 0.976000 --0.743500 -0.150600 0.182900 0.192000 0.096000 0.968000 --0.750000 -0.200800 0.187200 0.064000 -0.048000 0.992000 --0.703900 -0.200800 0.182900 0.128000 0.064000 0.984000 --0.750000 -0.251000 0.186100 -0.160000 -0.136000 0.976000 --0.700000 -0.208700 0.182900 0.176000 0.120000 0.968000 --0.700000 -0.251000 0.184700 0.008000 -0.024000 0.992000 --0.650000 -0.249200 0.182900 0.176000 0.464000 0.864000 --0.650000 -0.251000 0.183700 0.152000 0.272000 0.944000 --0.638500 -0.251000 0.182900 0.072000 0.424000 0.896000 --0.650000 -0.301200 0.185200 -0.152000 0.008000 0.984000 --0.600000 -0.260000 0.182900 0.056000 0.320000 0.944000 --0.600000 -0.301200 0.196400 -0.152000 0.176000 0.968000 --0.550000 -0.264400 0.182900 -0.072000 0.456000 0.880000 --0.550000 -0.301200 0.200100 -0.040000 0.312000 0.944000 --0.512000 -0.251000 0.182900 -0.112000 0.632000 0.760000 --0.500000 -0.301200 0.199600 -0.128000 0.216000 0.960000 --0.500000 -0.251000 0.185100 -0.112000 0.632000 0.760000 --0.450000 -0.301200 0.203900 0.032000 0.168000 0.984000 --0.450000 -0.251000 0.195400 -0.152000 0.392000 0.904000 --0.400000 -0.301200 0.211000 0.416000 0.000000 0.904000 --0.400000 -0.251000 0.203200 0.024000 0.208000 0.976000 --0.369700 -0.301200 0.182900 0.552000 -0.328000 0.752000 --0.350000 -0.251000 0.206900 0.584000 -0.272000 0.760000 --0.350000 -0.276800 0.182900 0.600000 -0.432000 0.664000 --0.334800 -0.251000 0.182900 0.672000 -0.480000 0.552000 --0.350000 -0.301200 0.167500 0.592000 -0.368000 0.712000 --0.300000 -0.251000 0.131000 0.632000 -0.616000 0.464000 --0.327200 -0.301200 0.121900 0.792000 -0.368000 0.472000 --0.300000 -0.256400 0.121900 0.624000 -0.624000 0.456000 --0.300000 -0.301200 0.065200 0.504000 -0.568000 0.640000 --0.294600 -0.251000 0.121900 0.616000 -0.600000 0.488000 --0.295000 -0.301200 0.060900 0.472000 -0.584000 0.648000 --0.250000 -0.251000 0.071500 0.528000 -0.408000 0.736000 --0.250000 -0.262800 0.060900 0.496000 -0.520000 0.688000 --0.236900 -0.251000 0.060900 0.464000 -0.480000 0.728000 --0.250000 -0.301200 0.006000 0.344000 -0.608000 0.704000 --0.200000 -0.251000 0.018200 0.408000 -0.392000 0.816000 --0.235900 -0.301200 0.000000 0.272000 -0.568000 0.768000 --0.200000 -0.279600 0.000000 -0.016000 -0.496000 0.864000 --0.200000 -0.301200 -0.017500 -0.064000 -0.432000 0.896000 --0.235900 -0.301200 0.000000 0.272000 -0.568000 0.768000 --0.200000 -0.351500 -0.031500 -0.320000 -0.128000 0.936000 --0.250000 -0.307700 0.000000 0.288000 -0.576000 0.760000 --0.250000 -0.351500 -0.038300 0.104000 -0.504000 0.848000 --0.300000 -0.343500 0.000000 0.832000 -0.408000 0.360000 --0.300000 -0.351500 -0.012600 0.872000 -0.352000 0.320000 --0.303300 -0.351500 0.000000 0.888000 -0.344000 0.288000 --0.300000 -0.401700 -0.045100 0.792000 -0.248000 0.544000 --0.319500 -0.401700 0.000000 0.536000 -0.584000 0.592000 --0.300000 -0.435300 -0.060900 -0.192000 -0.360000 0.912000 --0.350000 -0.427600 0.000000 0.560000 -0.752000 0.336000 --0.338500 -0.451900 -0.060900 0.112000 -0.632000 0.760000 --0.350000 -0.451900 -0.058800 0.248000 -0.624000 0.728000 --0.350000 -0.453900 -0.060900 0.248000 -0.624000 0.728000 --0.400000 -0.451900 -0.009600 0.744000 -0.536000 0.376000 --0.380200 -0.502100 -0.060900 0.648000 -0.616000 0.432000 --0.400000 -0.502100 -0.024700 0.848000 -0.224000 0.464000 --0.400000 -0.527700 -0.060900 0.080000 -0.768000 0.624000 --0.450000 -0.502100 -0.045100 0.560000 -0.696000 0.432000 --0.450000 -0.512800 -0.060900 0.208000 -0.760000 0.608000 --0.466200 -0.502100 0.000000 0.712000 -0.616000 0.320000 --0.478800 -0.552300 -0.060900 0.704000 -0.592000 0.376000 --0.500000 -0.548400 0.000000 0.368000 -0.816000 0.432000 --0.500000 -0.552300 -0.009400 0.352000 -0.840000 0.400000 --0.509600 -0.552300 0.000000 0.320000 -0.840000 0.424000 --0.500000 -0.570000 -0.060900 0.480000 -0.800000 0.328000 --0.550000 -0.565800 0.000000 0.224000 -0.872000 0.424000 --0.550000 -0.588500 -0.060900 0.224000 -0.888000 0.384000 --0.600000 -0.566300 0.000000 -0.184000 -0.816000 0.544000 --0.600000 -0.601900 -0.060900 -0.072000 -0.808000 0.568000 --0.633400 -0.552300 0.000000 -0.384000 -0.672000 0.624000 --0.650000 -0.594800 -0.060900 -0.368000 -0.640000 0.664000 --0.650000 -0.552300 -0.012600 -0.496000 -0.592000 0.624000 --0.685200 -0.552300 -0.060900 -0.696000 -0.384000 0.592000 --0.650000 -0.541900 0.000000 -0.528000 -0.600000 0.592000 --0.700000 -0.507800 -0.060900 -0.864000 -0.200000 0.448000 --0.674300 -0.502100 0.000000 -0.656000 -0.632000 0.384000 --0.700000 -0.502100 -0.057900 -0.752000 -0.512000 0.400000 --0.700000 -0.478200 0.000000 -0.704000 -0.632000 0.312000 --0.701200 -0.502100 -0.060900 -0.816000 -0.416000 0.392000 --0.719800 -0.451900 0.000000 -0.816000 -0.520000 0.240000 --0.735400 -0.451900 -0.060900 -0.768000 -0.512000 0.360000 --0.750000 -0.403200 0.000000 -0.832000 -0.504000 0.216000 --0.750000 -0.426100 -0.060900 -0.864000 -0.448000 0.200000 --0.750800 -0.401700 0.000000 -0.816000 -0.520000 0.208000 --0.762700 -0.401700 -0.060900 -0.840000 -0.496000 0.168000 --0.782800 -0.351500 0.000000 -0.816000 -0.536000 0.208000 --0.794800 -0.351500 -0.060900 -0.816000 -0.552000 0.144000 --0.800000 -0.327900 0.000000 -0.800000 -0.560000 0.176000 --0.800000 -0.343900 -0.060900 -0.816000 -0.552000 0.128000 --0.817700 -0.301200 0.000000 -0.808000 -0.560000 0.168000 --0.826600 -0.301200 -0.060900 -0.824000 -0.544000 0.120000 --0.800000 -0.343900 -0.060900 -0.816000 -0.552000 0.128000 --0.832400 -0.301200 -0.121900 -0.840000 -0.528000 0.048000 --0.800000 -0.351500 -0.101400 -0.840000 -0.528000 0.104000 --0.802000 -0.351500 -0.121900 -0.840000 -0.520000 0.096000 --0.800000 -0.354700 -0.121900 -0.848000 -0.512000 0.080000 --0.802200 -0.351500 -0.182900 -0.872000 -0.480000 0.016000 --0.800000 -0.355500 -0.182900 -0.872000 -0.472000 0.032000 --0.807300 -0.351500 -0.243900 -0.864000 -0.472000 0.152000 --0.800000 -0.365300 -0.243900 -0.880000 -0.440000 0.160000 --0.821000 -0.351500 -0.304800 -0.824000 -0.504000 0.232000 --0.800000 -0.395700 -0.304800 -0.920000 -0.376000 0.000000 --0.812200 -0.351500 -0.365800 -0.856000 -0.296000 -0.408000 --0.800000 -0.388500 -0.365800 -0.864000 -0.288000 -0.400000 --0.800000 -0.351500 -0.388300 -0.664000 -0.152000 -0.728000 --0.796500 -0.401700 -0.365800 -0.952000 -0.168000 -0.232000 --0.750000 -0.351500 -0.422100 -0.312000 0.448000 -0.824000 --0.777800 -0.401700 -0.426800 -0.928000 0.040000 -0.360000 --0.750000 -0.359700 -0.426800 -0.368000 0.408000 -0.832000 --0.750000 -0.351500 -0.422100 -0.312000 0.448000 -0.824000 --0.736800 -0.351500 -0.426800 -0.240000 0.480000 -0.832000 --0.736800 -0.351500 -0.426800 -0.240000 0.480000 -0.832000 --0.750000 -0.150600 0.184600 0.192000 0.080000 0.976000 --0.750000 -0.150600 0.184600 0.192000 0.080000 0.976000 --0.800000 -0.150600 0.189500 -0.240000 -0.056000 0.960000 --0.750000 -0.200800 0.187200 0.064000 -0.048000 0.992000 --0.800000 -0.200800 0.184500 -0.256000 -0.128000 0.952000 --0.750000 -0.251000 0.186100 -0.160000 -0.136000 0.976000 --0.800000 -0.206500 0.182900 -0.304000 -0.264000 0.912000 --0.762000 -0.251000 0.182900 -0.256000 -0.192000 0.936000 --0.800000 -0.251000 0.157900 -0.576000 -0.400000 0.696000 --0.750000 -0.267900 0.182900 -0.232000 -0.192000 0.944000 --0.800000 -0.280700 0.121900 -0.736000 -0.528000 0.408000 --0.750000 -0.301200 0.168400 -0.360000 -0.432000 0.816000 --0.783300 -0.301200 0.121900 -0.688000 -0.568000 0.440000 --0.750000 -0.342500 0.121900 -0.536000 -0.592000 0.592000 --0.800000 -0.301200 0.085900 -0.768000 -0.544000 0.304000 --0.750000 -0.351500 0.110100 -0.600000 -0.584000 0.536000 --0.800000 -0.310100 0.060900 -0.800000 -0.544000 0.224000 --0.767900 -0.351500 0.060900 -0.760000 -0.568000 0.296000 --0.800000 -0.327900 0.000000 -0.800000 -0.560000 0.176000 --0.782800 -0.351500 0.000000 -0.816000 -0.536000 0.208000 --0.767900 -0.351500 0.060900 -0.760000 -0.568000 0.296000 --0.750800 -0.401700 0.000000 -0.816000 -0.520000 0.208000 --0.750000 -0.377100 0.060900 -0.760000 -0.552000 0.320000 --0.750000 -0.401700 0.004100 -0.816000 -0.520000 0.232000 --0.731300 -0.401700 0.060900 -0.784000 -0.496000 0.344000 --0.750000 -0.403200 0.000000 -0.832000 -0.504000 0.216000 --0.701000 -0.451900 0.060900 -0.792000 -0.480000 0.344000 --0.719800 -0.451900 0.000000 -0.816000 -0.520000 0.240000 --0.700000 -0.453200 0.060900 -0.560000 -0.720000 0.392000 --0.700000 -0.478200 0.000000 -0.704000 -0.632000 0.312000 --0.650000 -0.495900 0.060900 -0.528000 -0.720000 0.432000 --0.674300 -0.502100 0.000000 -0.656000 -0.632000 0.384000 --0.650000 -0.502100 0.048300 -0.536000 -0.712000 0.440000 --0.650000 -0.541900 0.000000 -0.528000 -0.600000 0.592000 --0.640700 -0.502100 0.060900 -0.496000 -0.728000 0.456000 --0.633400 -0.552300 0.000000 -0.384000 -0.672000 0.624000 --0.600000 -0.531600 0.060900 -0.448000 -0.736000 0.496000 --0.600000 -0.552300 0.023900 -0.224000 -0.776000 0.584000 --0.550000 -0.532000 0.060900 0.080000 -0.776000 0.624000 --0.550000 -0.552300 0.031000 0.256000 -0.800000 0.528000 --0.500000 -0.517700 0.060900 0.632000 -0.632000 0.440000 --0.509600 -0.552300 0.000000 0.320000 -0.840000 0.424000 --0.500000 -0.548400 0.000000 0.368000 -0.816000 0.432000 --0.500000 -0.517700 0.060900 0.632000 -0.632000 0.440000 --0.466200 -0.502100 0.000000 0.712000 -0.616000 0.320000 --0.489100 -0.502100 0.060900 0.704000 -0.616000 0.328000 --0.450000 -0.489500 0.000000 0.584000 -0.760000 0.264000 --0.450000 -0.471900 0.060900 0.592000 -0.752000 0.272000 --0.403800 -0.451900 0.000000 0.744000 -0.560000 0.352000 --0.425300 -0.451900 0.060900 0.696000 -0.640000 0.304000 --0.400000 -0.447100 0.000000 0.720000 -0.584000 0.344000 --0.400000 -0.423000 0.060900 0.616000 -0.696000 0.360000 --0.350000 -0.427600 0.000000 0.560000 -0.752000 0.336000 --0.350000 -0.406300 0.060900 0.592000 -0.728000 0.320000 --0.319500 -0.401700 0.000000 0.536000 -0.584000 0.592000 --0.344500 -0.401700 0.060900 0.632000 -0.688000 0.328000 --0.303300 -0.351500 0.000000 0.888000 -0.344000 0.288000 --0.319700 -0.351500 0.060900 0.864000 -0.376000 0.328000 --0.300000 -0.343500 0.000000 0.832000 -0.408000 0.360000 --0.300000 -0.305300 0.060900 0.512000 -0.568000 0.632000 --0.250000 -0.307700 0.000000 0.288000 -0.576000 0.760000 --0.295000 -0.301200 0.060900 0.472000 -0.584000 0.648000 --0.250000 -0.301200 0.006000 0.344000 -0.608000 0.704000 --0.250000 -0.262800 0.060900 0.496000 -0.520000 0.688000 --0.250000 -0.262800 0.060900 0.496000 -0.520000 0.688000 --0.762000 -0.251000 0.182900 -0.256000 -0.192000 0.936000 --0.762000 -0.251000 0.182900 -0.256000 -0.192000 0.936000 --0.750000 -0.251000 0.186100 -0.160000 -0.136000 0.976000 --0.750000 -0.267900 0.182900 -0.232000 -0.192000 0.944000 --0.700000 -0.251000 0.184700 0.008000 -0.024000 0.992000 --0.700000 -0.272200 0.182900 -0.072000 -0.128000 0.984000 --0.650000 -0.251000 0.183700 0.152000 0.272000 0.944000 --0.671000 -0.301200 0.182900 -0.120000 -0.104000 0.984000 --0.650000 -0.301200 0.185200 -0.152000 0.008000 0.984000 --0.663400 -0.351500 0.182900 -0.304000 -0.080000 0.944000 --0.650000 -0.351500 0.187800 -0.272000 -0.048000 0.952000 --0.650000 -0.385200 0.182900 -0.496000 -0.152000 0.848000 --0.600000 -0.351500 0.201700 -0.216000 0.016000 0.968000 --0.644900 -0.401700 0.182900 -0.528000 -0.240000 0.808000 --0.600000 -0.401700 0.205900 -0.320000 -0.144000 0.928000 --0.600000 -0.446800 0.182900 -0.240000 -0.464000 0.848000 --0.550000 -0.401700 0.218500 0.000000 -0.272000 0.960000 --0.583500 -0.451900 0.182900 -0.128000 -0.544000 0.824000 --0.550000 -0.451900 0.188900 -0.024000 -0.624000 0.776000 --0.550000 -0.456500 0.182900 0.056000 -0.736000 0.672000 --0.523100 -0.451900 0.182900 0.136000 -0.648000 0.744000 --0.550000 -0.494000 0.121900 0.024000 -0.832000 0.536000 --0.500000 -0.451900 0.177400 0.160000 -0.648000 0.736000 --0.500000 -0.486900 0.121900 0.296000 -0.800000 0.504000 --0.450000 -0.451900 0.126400 0.752000 -0.472000 0.448000 --0.450000 -0.453600 0.121900 0.584000 -0.744000 0.288000 --0.447800 -0.451900 0.121900 0.672000 -0.648000 0.344000 --0.450000 -0.471900 0.060900 0.592000 -0.752000 0.272000 --0.425300 -0.451900 0.060900 0.696000 -0.640000 0.304000 --0.447800 -0.451900 0.121900 0.672000 -0.648000 0.344000 --0.400000 -0.423000 0.060900 0.616000 -0.696000 0.360000 --0.404400 -0.401700 0.121900 0.648000 -0.656000 0.368000 --0.400000 -0.401700 0.111300 0.640000 -0.680000 0.336000 --0.400000 -0.397400 0.121900 0.632000 -0.672000 0.368000 --0.350000 -0.401700 0.073400 0.632000 -0.688000 0.344000 --0.350000 -0.369000 0.121900 0.736000 -0.464000 0.480000 --0.344500 -0.401700 0.060900 0.632000 -0.688000 0.328000 --0.341600 -0.351500 0.121900 0.808000 -0.352000 0.456000 --0.319700 -0.351500 0.060900 0.864000 -0.376000 0.328000 --0.327200 -0.301200 0.121900 0.792000 -0.368000 0.472000 --0.300000 -0.305300 0.060900 0.512000 -0.568000 0.632000 --0.300000 -0.301200 0.065200 0.504000 -0.568000 0.640000 --0.295000 -0.301200 0.060900 0.472000 -0.584000 0.648000 --0.295000 -0.301200 0.060900 0.472000 -0.584000 0.648000 --0.650000 -0.301200 0.185200 -0.152000 0.008000 0.984000 --0.650000 -0.301200 0.185200 -0.152000 0.008000 0.984000 --0.650000 -0.351500 0.187800 -0.272000 -0.048000 0.952000 --0.600000 -0.301200 0.196400 -0.152000 0.176000 0.968000 --0.600000 -0.351500 0.201700 -0.216000 0.016000 0.968000 --0.550000 -0.301200 0.200100 -0.040000 0.312000 0.944000 --0.550000 -0.351500 0.211500 0.000000 0.128000 0.984000 --0.500000 -0.301200 0.199600 -0.128000 0.216000 0.960000 --0.500000 -0.351500 0.209200 0.072000 0.104000 0.984000 --0.450000 -0.301200 0.203900 0.032000 0.168000 0.984000 --0.450000 -0.351500 0.215900 0.592000 -0.216000 0.768000 --0.400000 -0.301200 0.211000 0.416000 0.000000 0.904000 --0.400000 -0.351500 0.196700 0.560000 -0.576000 0.584000 --0.369700 -0.301200 0.182900 0.552000 -0.328000 0.752000 --0.389000 -0.351500 0.182900 0.544000 -0.632000 0.536000 --0.350000 -0.301200 0.167500 0.592000 -0.368000 0.712000 --0.350000 -0.351500 0.138600 0.680000 -0.440000 0.568000 --0.327200 -0.301200 0.121900 0.792000 -0.368000 0.472000 --0.341600 -0.351500 0.121900 0.808000 -0.352000 0.456000 --0.350000 -0.351500 0.138600 0.680000 -0.440000 0.568000 --0.350000 -0.369000 0.121900 0.736000 -0.464000 0.480000 --0.389000 -0.351500 0.182900 0.544000 -0.632000 0.536000 --0.400000 -0.397400 0.121900 0.632000 -0.672000 0.368000 --0.400000 -0.359600 0.182900 0.520000 -0.680000 0.496000 --0.404400 -0.401700 0.121900 0.648000 -0.656000 0.368000 --0.445800 -0.401700 0.182900 0.648000 -0.488000 0.568000 --0.447800 -0.451900 0.121900 0.672000 -0.648000 0.344000 --0.450000 -0.407300 0.182900 0.664000 -0.488000 0.552000 --0.450000 -0.451900 0.126400 0.752000 -0.472000 0.448000 --0.500000 -0.444100 0.182900 0.168000 -0.480000 0.848000 --0.500000 -0.451900 0.177400 0.160000 -0.648000 0.736000 --0.523100 -0.451900 0.182900 0.136000 -0.648000 0.744000 --0.500000 -0.444100 0.182900 0.168000 -0.480000 0.848000 --0.550000 -0.451900 0.188900 -0.024000 -0.624000 0.776000 --0.500000 -0.401700 0.210500 0.208000 -0.296000 0.928000 --0.550000 -0.401700 0.218500 0.000000 -0.272000 0.960000 --0.500000 -0.351500 0.209200 0.072000 0.104000 0.984000 --0.550000 -0.351500 0.211500 0.000000 0.128000 0.984000 --0.550000 -0.401700 0.218500 0.000000 -0.272000 0.960000 --0.600000 -0.351500 0.201700 -0.216000 0.016000 0.968000 --0.600000 -0.401700 0.205900 -0.320000 -0.144000 0.928000 --0.600000 -0.401700 0.205900 -0.320000 -0.144000 0.928000 --0.512000 -0.251000 0.182900 -0.112000 0.632000 0.760000 --0.512000 -0.251000 0.182900 -0.112000 0.632000 0.760000 --0.500000 -0.249000 0.182900 -0.112000 0.656000 0.744000 --0.500000 -0.251000 0.185100 -0.112000 0.632000 0.760000 --0.450000 -0.233700 0.182900 -0.216000 0.472000 0.848000 --0.450000 -0.251000 0.195400 -0.152000 0.392000 0.904000 --0.400000 -0.206800 0.182900 -0.168000 0.424000 0.880000 --0.400000 -0.251000 0.203200 0.024000 0.208000 0.976000 --0.383500 -0.200800 0.182900 -0.152000 0.448000 0.872000 --0.350000 -0.251000 0.206900 0.584000 -0.272000 0.760000 --0.350000 -0.200800 0.190300 -0.112000 0.384000 0.912000 --0.334800 -0.251000 0.182900 0.672000 -0.480000 0.552000 --0.300000 -0.200800 0.189700 0.744000 -0.432000 0.496000 --0.300000 -0.205800 0.182900 0.768000 -0.472000 0.416000 --0.296900 -0.200800 0.182900 0.792000 -0.440000 0.408000 --0.300000 -0.251000 0.131000 0.632000 -0.616000 0.464000 --0.278100 -0.200800 0.121900 0.816000 -0.432000 0.368000 --0.294600 -0.251000 0.121900 0.616000 -0.600000 0.488000 --0.250000 -0.200800 0.078600 0.664000 -0.312000 0.672000 --0.250000 -0.251000 0.071500 0.528000 -0.408000 0.736000 --0.222100 -0.200800 0.060900 0.488000 -0.184000 0.848000 --0.236900 -0.251000 0.060900 0.464000 -0.480000 0.728000 --0.200000 -0.200800 0.045500 0.568000 -0.152000 0.808000 --0.200000 -0.251000 0.018200 0.408000 -0.392000 0.816000 --0.200000 -0.251000 0.018200 0.408000 -0.392000 0.816000 --0.450000 -0.351500 0.215900 0.592000 -0.216000 0.768000 --0.450000 -0.351500 0.215900 0.592000 -0.216000 0.768000 --0.500000 -0.351500 0.209200 0.072000 0.104000 0.984000 --0.450000 -0.401700 0.188700 0.656000 -0.464000 0.584000 --0.500000 -0.401700 0.210500 0.208000 -0.296000 0.928000 --0.450000 -0.407300 0.182900 0.664000 -0.488000 0.552000 --0.500000 -0.444100 0.182900 0.168000 -0.480000 0.848000 --0.500000 -0.444100 0.182900 0.168000 -0.480000 0.848000 --0.400000 -0.351500 0.196700 0.560000 -0.576000 0.584000 --0.400000 -0.351500 0.196700 0.560000 -0.576000 0.584000 --0.400000 -0.359600 0.182900 0.520000 -0.680000 0.496000 --0.450000 -0.351500 0.215900 0.592000 -0.216000 0.768000 --0.445800 -0.401700 0.182900 0.648000 -0.488000 0.568000 --0.450000 -0.401700 0.188700 0.656000 -0.464000 0.584000 --0.450000 -0.407300 0.182900 0.664000 -0.488000 0.552000 --0.450000 -0.407300 0.182900 0.664000 -0.488000 0.552000 --0.383500 -0.200800 0.182900 -0.152000 0.448000 0.872000 --0.383500 -0.200800 0.182900 -0.152000 0.448000 0.872000 --0.350000 -0.189600 0.182900 -0.288000 0.472000 0.824000 --0.350000 -0.200800 0.190300 -0.112000 0.384000 0.912000 --0.311100 -0.150600 0.182900 -0.424000 0.464000 0.768000 --0.300000 -0.200800 0.189700 0.744000 -0.432000 0.496000 --0.300000 -0.150600 0.190700 0.000000 0.520000 0.848000 --0.296900 -0.200800 0.182900 0.792000 -0.440000 0.408000 --0.288800 -0.150600 0.182900 0.600000 0.360000 0.712000 --0.278100 -0.200800 0.121900 0.816000 -0.432000 0.368000 --0.252800 -0.150600 0.121900 0.720000 -0.296000 0.616000 --0.250000 -0.200800 0.078600 0.664000 -0.312000 0.672000 --0.250000 -0.150600 0.117900 0.712000 -0.320000 0.616000 --0.222100 -0.200800 0.060900 0.488000 -0.184000 0.848000 --0.212600 -0.150600 0.060900 0.712000 -0.216000 0.664000 --0.200000 -0.200800 0.045500 0.568000 -0.152000 0.808000 --0.200000 -0.150600 0.042600 0.640000 -0.096000 0.752000 --0.212600 -0.150600 0.060900 0.712000 -0.216000 0.664000 --0.200000 -0.121800 0.060900 0.728000 -0.328000 0.592000 --0.250000 -0.150600 0.117900 0.712000 -0.320000 0.616000 --0.200000 -0.100400 0.076800 0.784000 -0.136000 0.600000 --0.250000 -0.144000 0.121900 0.720000 -0.312000 0.608000 --0.230200 -0.100400 0.121900 0.776000 -0.176000 0.600000 --0.250000 -0.100400 0.155000 0.480000 0.160000 0.856000 --0.247100 -0.050200 0.121900 0.488000 0.512000 0.696000 --0.250000 -0.050200 0.123600 0.200000 0.440000 0.864000 --0.250000 -0.048000 0.121900 0.272000 0.640000 0.704000 --0.255700 -0.050200 0.121900 -0.192000 0.512000 0.832000 --0.250000 0.000000 0.079500 -0.144000 0.552000 0.816000 --0.300000 -0.050200 0.104800 -0.312000 0.512000 0.792000 --0.300000 0.000000 0.088800 -0.240000 0.432000 0.864000 --0.350000 -0.050200 0.083200 -0.416000 0.344000 0.832000 --0.348200 0.000000 0.060900 -0.376000 0.448000 0.800000 --0.350000 -0.001900 0.060900 -0.656000 0.280000 0.688000 --0.350000 0.000000 0.059800 -0.688000 0.400000 0.592000 --0.367400 -0.050200 0.060900 -0.696000 0.408000 0.584000 --0.373100 0.000000 0.000000 -0.880000 0.240000 0.392000 --0.399300 -0.050200 0.000000 -0.696000 0.680000 0.184000 --0.377800 0.000000 -0.060900 -0.864000 0.424000 -0.248000 --0.400000 -0.050200 -0.003200 -0.712000 0.672000 0.168000 --0.400000 -0.037800 -0.060900 -0.728000 0.664000 0.152000 --0.406900 -0.050200 -0.060900 -0.848000 0.520000 0.000000 --0.400000 -0.050200 -0.118700 -0.832000 0.528000 -0.160000 --0.450000 -0.099400 -0.060900 -0.760000 0.616000 0.160000 --0.400000 -0.050900 -0.121900 -0.736000 0.536000 -0.408000 --0.450000 -0.100400 -0.065100 -0.512000 0.824000 -0.200000 --0.434900 -0.100400 -0.121900 -0.608000 0.744000 -0.256000 --0.450000 -0.111500 -0.121900 -0.376000 0.896000 -0.224000 --0.403600 -0.100400 -0.182900 -0.616000 0.592000 -0.512000 --0.450000 -0.128500 -0.182900 -0.504000 0.800000 -0.296000 --0.400000 -0.100400 -0.188300 -0.616000 0.576000 -0.520000 --0.450000 -0.150600 -0.239400 -0.408000 0.792000 -0.448000 --0.400000 -0.131400 -0.243900 -0.384000 0.744000 -0.536000 --0.444500 -0.150600 -0.243900 -0.312000 0.784000 -0.528000 --0.400000 -0.150600 -0.272200 -0.312000 0.624000 -0.704000 --0.450000 -0.152500 -0.243900 -0.384000 0.800000 -0.448000 --0.400000 -0.174400 -0.304800 -0.224000 0.736000 -0.632000 --0.450000 -0.186700 -0.304800 -0.216000 0.808000 -0.528000 --0.400000 -0.200800 -0.333600 -0.064000 0.568000 -0.816000 --0.450000 -0.200800 -0.327900 -0.112000 0.704000 -0.696000 --0.400000 -0.239300 -0.365800 0.048000 0.512000 -0.848000 --0.450000 -0.235000 -0.365800 -0.016000 0.592000 -0.800000 --0.400000 -0.251000 -0.373300 0.080000 0.400000 -0.904000 --0.450000 -0.251000 -0.376500 0.032000 0.432000 -0.896000 --0.400000 -0.301200 -0.390900 0.144000 0.296000 -0.936000 --0.450000 -0.301200 -0.399100 0.080000 0.320000 -0.936000 --0.400000 -0.351500 -0.411400 0.000000 0.616000 -0.784000 --0.450000 -0.351500 -0.418600 0.080000 0.512000 -0.848000 --0.450000 -0.301200 -0.399100 0.080000 0.320000 -0.936000 --0.500000 -0.351500 -0.423900 0.056000 0.504000 -0.856000 --0.500000 -0.301200 -0.402500 0.040000 0.344000 -0.936000 --0.450000 -0.301200 -0.399100 0.080000 0.320000 -0.936000 --0.500000 -0.251000 -0.377000 -0.032000 0.528000 -0.840000 --0.450000 -0.251000 -0.376500 0.032000 0.432000 -0.896000 --0.500000 -0.238600 -0.365800 -0.072000 0.656000 -0.744000 --0.450000 -0.235000 -0.365800 -0.016000 0.592000 -0.800000 --0.500000 -0.200800 -0.313000 -0.112000 0.824000 -0.544000 --0.450000 -0.200800 -0.327900 -0.112000 0.704000 -0.696000 --0.500000 -0.196700 -0.304800 -0.120000 0.848000 -0.504000 --0.450000 -0.186700 -0.304800 -0.216000 0.808000 -0.528000 --0.500000 -0.169200 -0.243900 -0.328000 0.880000 -0.312000 --0.450000 -0.152500 -0.243900 -0.384000 0.800000 -0.448000 --0.500000 -0.154300 -0.182900 -0.320000 0.920000 -0.176000 --0.450000 -0.150600 -0.239400 -0.408000 0.792000 -0.448000 --0.491700 -0.150600 -0.182900 -0.448000 0.848000 -0.264000 --0.450000 -0.128500 -0.182900 -0.504000 0.800000 -0.296000 --0.500000 -0.150600 -0.154000 -0.424000 0.880000 -0.160000 --0.450000 -0.111500 -0.121900 -0.376000 0.896000 -0.224000 --0.500000 -0.144400 -0.121900 -0.376000 0.880000 -0.280000 --0.450000 -0.100400 -0.065100 -0.512000 0.824000 -0.200000 --0.500000 -0.119500 -0.060900 -0.160000 0.976000 0.112000 --0.452400 -0.100400 -0.060900 -0.344000 0.936000 -0.016000 --0.500000 -0.141000 0.000000 -0.040000 0.880000 0.456000 --0.450000 -0.100400 -0.057100 -0.400000 0.872000 0.264000 --0.450000 -0.112700 0.000000 -0.520000 0.784000 0.320000 --0.434300 -0.100400 0.000000 -0.648000 0.720000 0.208000 --0.450000 -0.136300 0.060900 -0.512000 0.720000 0.448000 --0.405500 -0.100400 0.060900 -0.712000 0.456000 0.520000 --0.450000 -0.150600 0.089400 -0.440000 0.744000 0.496000 --0.400000 -0.100400 0.069600 -0.688000 0.456000 0.552000 --0.414900 -0.150600 0.121900 -0.424000 0.616000 0.648000 --0.400000 -0.140400 0.121900 -0.448000 0.624000 0.632000 --0.400000 -0.150600 0.133500 -0.392000 0.600000 0.688000 --0.351400 -0.100400 0.121900 -0.608000 0.368000 0.696000 --0.350000 -0.150600 0.151300 -0.584000 0.352000 0.720000 --0.350000 -0.100400 0.123500 -0.608000 0.328000 0.712000 --0.311100 -0.150600 0.182900 -0.424000 0.464000 0.768000 --0.300000 -0.100400 0.149000 -0.304000 0.432000 0.840000 --0.300000 -0.142200 0.182900 0.000000 0.616000 0.776000 --0.250000 -0.100400 0.155000 0.480000 0.160000 0.856000 --0.288800 -0.150600 0.182900 0.600000 0.360000 0.712000 --0.250000 -0.144000 0.121900 0.720000 -0.312000 0.608000 --0.252800 -0.150600 0.121900 0.720000 -0.296000 0.616000 --0.250000 -0.150600 0.117900 0.712000 -0.320000 0.616000 --0.250000 -0.150600 0.117900 0.712000 -0.320000 0.616000 --0.400000 -0.351500 0.196700 0.560000 -0.576000 0.584000 --0.400000 -0.351500 0.196700 0.560000 -0.576000 0.584000 --0.389000 -0.351500 0.182900 0.544000 -0.632000 0.536000 --0.400000 -0.359600 0.182900 0.520000 -0.680000 0.496000 --0.400000 -0.359600 0.182900 0.520000 -0.680000 0.496000 --0.311100 -0.150600 0.182900 -0.424000 0.464000 0.768000 --0.311100 -0.150600 0.182900 -0.424000 0.464000 0.768000 --0.300000 -0.142200 0.182900 0.000000 0.616000 0.776000 --0.300000 -0.150600 0.190700 0.000000 0.520000 0.848000 --0.288800 -0.150600 0.182900 0.600000 0.360000 0.712000 --0.288800 -0.150600 0.182900 0.600000 0.360000 0.712000 -0.577700 0.301200 0.182900 -0.536000 0.272000 0.792000 -0.577700 0.301200 0.182900 -0.536000 0.272000 0.792000 -0.600000 0.327100 0.182900 -0.144000 0.552000 0.816000 -0.600000 0.301200 0.199900 -0.528000 0.136000 0.832000 -0.650000 0.311500 0.182900 0.424000 0.496000 0.752000 -0.650000 0.301200 0.190400 0.408000 0.464000 0.776000 -0.660200 0.301200 0.182900 0.480000 0.488000 0.720000 -0.650000 0.251000 0.217300 -0.016000 0.232000 0.968000 -0.700000 0.263400 0.182900 0.512000 0.536000 0.664000 -0.700000 0.251000 0.193900 0.488000 0.504000 0.704000 -0.711700 0.251000 0.182900 0.560000 0.528000 0.624000 -0.700000 0.200800 0.226400 0.328000 0.432000 0.832000 -0.750000 0.208300 0.182900 0.448000 0.624000 0.632000 -0.750000 0.200800 0.191100 0.424000 0.552000 0.712000 -0.761100 0.200800 0.182900 0.432000 0.472000 0.760000 -0.750000 0.150600 0.201100 0.320000 0.240000 0.912000 -0.797300 0.150600 0.182900 0.336000 0.288000 0.888000 -0.750000 0.100400 0.207000 0.032000 -0.192000 0.976000 -0.800000 0.148000 0.182900 0.424000 0.336000 0.832000 -0.800000 0.100400 0.199400 -0.032000 0.024000 0.992000 -0.850000 0.129700 0.182900 0.408000 0.752000 0.504000 -0.850000 0.100400 0.222500 0.440000 0.584000 0.672000 -0.891700 0.100400 0.182900 0.576000 0.688000 0.424000 -0.850000 0.050200 0.216300 -0.184000 -0.272000 0.936000 -0.900000 0.093100 0.182900 0.568000 0.672000 0.464000 -0.900000 0.050200 0.226800 0.488000 0.496000 0.712000 -0.940200 0.050200 0.182900 0.624000 0.528000 0.568000 -0.900000 0.000000 0.237100 -0.176000 -0.616000 0.760000 -0.950000 0.037400 0.182900 0.520000 0.504000 0.680000 -0.950000 0.000000 0.206500 0.400000 0.008000 0.912000 -1.000000 0.004900 0.182900 0.336000 0.520000 0.776000 -1.000000 0.000000 0.186800 0.376000 0.128000 0.912000 -0.950000 0.000000 0.206500 0.400000 0.008000 0.912000 -1.000000 -0.012000 0.182900 0.384000 -0.248000 0.880000 -0.950000 -0.050200 0.197900 0.336000 -0.192000 0.920000 -0.975800 -0.050200 0.182900 0.464000 -0.232000 0.848000 -0.950000 -0.100400 0.196500 0.208000 -0.704000 0.672000 -0.959000 -0.100400 0.182900 0.616000 -0.584000 0.520000 -0.950000 -0.108800 0.182900 0.232000 -0.768000 0.584000 -1.000000 -0.100400 0.134700 0.432000 -0.528000 0.720000 -0.950000 -0.142500 0.121900 -0.608000 -0.672000 0.392000 -1.000000 -0.126300 0.121900 0.016000 -0.480000 0.872000 -0.950000 -0.150600 0.094900 -0.648000 -0.696000 0.272000 -1.000000 -0.150600 0.101600 -0.080000 -0.576000 0.808000 -0.950000 -0.158100 0.060900 -0.608000 -0.760000 0.200000 -1.000000 -0.176100 0.060900 -0.688000 -0.632000 0.336000 -0.950000 -0.168100 0.000000 -0.640000 -0.744000 0.184000 -1.000000 -0.200800 0.012500 -0.656000 -0.696000 0.264000 -0.995800 -0.200800 0.000000 -0.648000 -0.704000 0.264000 -1.000000 -0.204500 0.000000 -0.624000 -0.728000 0.256000 -0.973000 -0.200800 -0.060900 -0.584000 -0.760000 0.264000 -1.000000 -0.224100 -0.060900 -0.616000 -0.728000 0.280000 -0.950500 -0.200800 -0.121900 -0.632000 -0.744000 0.192000 -1.000000 -0.243600 -0.121900 -0.640000 -0.736000 0.184000 -0.950000 -0.200800 -0.124000 -0.680000 -0.712000 0.160000 -1.000000 -0.251000 -0.154300 -0.728000 -0.648000 0.200000 -0.950000 -0.211700 -0.182900 -0.704000 -0.680000 0.176000 -0.993400 -0.251000 -0.182900 -0.736000 -0.640000 0.200000 -0.950000 -0.224400 -0.243900 -0.688000 -0.640000 0.328000 -0.978600 -0.251000 -0.243900 -0.696000 -0.616000 0.352000 -0.950000 -0.251000 -0.295200 -0.640000 -0.496000 0.576000 -1.000000 -0.277900 -0.243900 -0.712000 -0.592000 0.360000 -0.950000 -0.261400 -0.304800 -0.752000 -0.584000 0.288000 -1.000000 -0.301200 -0.291200 -0.640000 -0.488000 0.576000 -0.989600 -0.301200 -0.304800 -0.816000 -0.560000 0.128000 -1.000000 -0.316200 -0.304800 -0.800000 -0.552000 0.224000 -1.000000 -0.301200 -0.328200 -0.784000 -0.440000 -0.424000 -0.989600 -0.301200 -0.304800 -0.816000 -0.560000 0.128000 -1.000000 -0.251000 -0.355700 -0.816000 -0.248000 -0.504000 -0.950000 -0.261400 -0.304800 -0.752000 -0.584000 0.288000 -0.950000 -0.251000 -0.328200 -0.712000 -0.568000 -0.392000 -0.942100 -0.251000 -0.304800 -0.752000 -0.552000 0.344000 -0.950000 -0.200800 -0.357000 -0.272000 -0.104000 -0.952000 -0.911900 -0.200800 -0.304800 -0.864000 -0.480000 -0.128000 -0.950000 -0.150600 -0.345500 -0.032000 0.064000 -0.992000 -0.900000 -0.181100 -0.304800 -0.768000 -0.440000 -0.448000 -0.900000 -0.150600 -0.332000 -0.672000 -0.328000 -0.656000 -0.883200 -0.150600 -0.304800 -0.864000 -0.368000 -0.320000 -0.900000 -0.100400 -0.341700 -0.464000 -0.104000 -0.872000 -0.869700 -0.100400 -0.304800 -0.880000 -0.248000 -0.400000 -0.900000 -0.050200 -0.348300 -0.256000 0.192000 -0.944000 -0.867300 -0.050200 -0.304800 -0.784000 -0.136000 -0.600000 -0.900000 0.000000 -0.329500 -0.080000 0.648000 -0.744000 -0.877300 0.000000 -0.304800 -0.592000 0.480000 -0.632000 -0.900000 0.016700 -0.304800 -0.152000 0.720000 -0.664000 -0.850000 0.000000 -0.279000 -0.536000 0.488000 -0.680000 -0.900000 0.050200 -0.268900 0.208000 0.672000 -0.696000 -0.850000 0.042400 -0.243900 -0.408000 0.528000 -0.736000 -0.858900 0.050200 -0.243900 -0.424000 0.568000 -0.696000 -0.850000 0.050200 -0.237100 -0.376000 0.576000 -0.720000 -0.900000 0.070800 -0.243900 -0.096000 0.744000 -0.656000 -0.850000 0.100400 -0.218500 0.128000 0.592000 -0.784000 -0.900000 0.100400 -0.203200 0.536000 0.688000 -0.472000 -0.850000 0.127100 -0.182900 0.192000 0.744000 -0.632000 -0.900000 0.111100 -0.182900 0.552000 0.712000 -0.416000 -0.850000 0.150600 -0.140900 0.432000 0.840000 -0.304000 -0.900000 0.127900 -0.121900 0.560000 0.776000 -0.264000 -0.859300 0.150600 -0.121900 0.456000 0.840000 -0.272000 -0.900000 0.143500 -0.060900 0.528000 0.808000 -0.240000 -0.888500 0.150600 -0.060900 0.504000 0.856000 -0.040000 -0.900000 0.131100 0.000000 0.480000 0.848000 0.192000 -0.867700 0.150600 0.000000 0.552000 0.816000 0.152000 -0.900000 0.118900 0.060900 0.472000 0.856000 0.184000 -0.855400 0.150600 0.060900 0.680000 0.720000 0.072000 -0.900000 0.107300 0.121900 0.512000 0.832000 0.184000 -0.850900 0.150600 0.121900 0.704000 0.704000 0.080000 -0.900000 0.100400 0.165200 0.584000 0.744000 0.296000 -0.850000 0.150600 0.126500 0.640000 0.560000 0.512000 -0.891700 0.100400 0.182900 0.576000 0.688000 0.424000 -0.850000 0.129700 0.182900 0.408000 0.752000 0.504000 -0.850000 0.150600 0.126500 0.640000 0.560000 0.512000 -0.800000 0.148000 0.182900 0.424000 0.336000 0.832000 -0.800000 0.150600 0.181400 0.520000 0.336000 0.776000 -0.797300 0.150600 0.182900 0.336000 0.288000 0.888000 -0.800000 0.190400 0.121900 0.624000 0.752000 0.168000 -0.761100 0.200800 0.182900 0.432000 0.472000 0.760000 -0.788900 0.200800 0.121900 0.632000 0.744000 0.184000 -0.750000 0.208300 0.182900 0.448000 0.624000 0.632000 -0.750000 0.233400 0.121900 0.720000 0.680000 -0.080000 -0.711700 0.251000 0.182900 0.560000 0.528000 0.624000 -0.736800 0.251000 0.121900 0.752000 0.632000 0.144000 -0.700000 0.263400 0.182900 0.512000 0.536000 0.664000 -0.700000 0.297800 0.121900 0.728000 0.680000 -0.032000 -0.660200 0.301200 0.182900 0.480000 0.488000 0.720000 -0.696500 0.301200 0.121900 0.712000 0.672000 0.168000 -0.650000 0.311500 0.182900 0.424000 0.496000 0.752000 -0.653800 0.351500 0.121900 0.656000 0.616000 0.424000 -0.650000 0.351500 0.128300 0.616000 0.616000 0.480000 -0.650000 0.355500 0.121900 0.632000 0.632000 0.432000 -0.600000 0.351500 0.157200 -0.376000 0.584000 0.704000 -0.600000 0.382600 0.121900 0.272000 0.776000 0.560000 -0.566500 0.351500 0.121900 -0.632000 0.576000 0.496000 -0.600000 0.401700 0.085900 0.096000 0.928000 0.336000 -0.550000 0.351500 0.078000 -0.616000 0.672000 0.392000 -0.584600 0.401700 0.060900 -0.416000 0.872000 0.248000 -0.550000 0.359900 0.060900 -0.592000 0.640000 0.480000 -0.568400 0.401700 0.000000 -0.472000 0.832000 -0.264000 -0.550000 0.388900 0.000000 -0.392000 0.856000 0.320000 -0.600000 0.401700 -0.057700 0.168000 0.920000 -0.344000 -0.550000 0.398000 -0.060900 0.000000 0.968000 -0.216000 -0.600000 0.400600 -0.060900 -0.072000 0.912000 -0.384000 -0.550000 0.362300 -0.121900 0.400000 0.656000 -0.632000 -0.600000 0.351500 -0.101600 0.448000 0.496000 -0.736000 -0.566700 0.351500 -0.121900 0.448000 0.536000 -0.704000 -0.600000 0.310600 -0.121900 0.480000 0.424000 -0.760000 -0.550000 0.351500 -0.135900 0.456000 0.632000 -0.616000 -0.600000 0.301200 -0.128700 0.472000 0.520000 -0.704000 -0.550000 0.301200 -0.167400 0.408000 0.504000 -0.752000 -0.600000 0.256700 -0.182900 0.328000 0.496000 -0.792000 -0.550000 0.283200 -0.182900 0.320000 0.472000 -0.816000 -0.600000 0.251000 -0.187000 0.320000 0.456000 -0.816000 -0.550000 0.251000 -0.199600 0.176000 0.288000 -0.936000 -0.600000 0.200800 -0.209200 0.248000 0.288000 -0.920000 -0.550000 0.200800 -0.211100 0.016000 0.048000 -0.992000 -0.600000 0.150600 -0.225200 0.008000 0.128000 -0.984000 -0.550000 0.150600 -0.215400 -0.144000 0.080000 -0.984000 -0.600000 0.100400 -0.237100 -0.096000 0.168000 -0.976000 -0.550000 0.100400 -0.212600 -0.200000 0.352000 -0.904000 -0.600000 0.076600 -0.243900 -0.096000 0.360000 -0.920000 -0.550000 0.067800 -0.243900 0.024000 0.672000 -0.728000 -0.600000 0.050200 -0.251100 0.248000 0.344000 -0.896000 -0.550000 0.050200 -0.258400 0.160000 0.632000 -0.752000 -0.600000 0.000000 -0.284600 0.512000 0.112000 -0.840000 -0.550000 0.015600 -0.304800 0.472000 0.712000 -0.512000 -0.578400 0.000000 -0.304800 0.536000 0.480000 -0.688000 -0.550000 0.000000 -0.335900 0.576000 0.464000 -0.664000 -0.587300 -0.050200 -0.304800 0.688000 0.056000 -0.712000 -0.550000 -0.050200 -0.345500 0.192000 -0.560000 -0.792000 -0.550000 -0.083700 -0.304800 0.088000 -0.736000 -0.664000 -0.500000 -0.050200 -0.339600 -0.136000 -0.672000 -0.720000 -0.500000 -0.082600 -0.304800 0.216000 -0.680000 -0.688000 -0.450000 -0.050200 -0.325200 -0.120000 -0.568000 -0.808000 -0.475800 -0.100400 -0.304800 0.512000 -0.104000 -0.848000 -0.450000 -0.100400 -0.322200 0.392000 -0.360000 -0.840000 -0.500000 -0.127100 -0.304800 0.480000 0.456000 -0.744000 -0.450000 -0.150600 -0.321300 -0.008000 0.120000 -0.992000 -0.500000 -0.150600 -0.319100 0.336000 0.504000 -0.792000 -0.450000 -0.200800 -0.331300 -0.472000 -0.400000 -0.776000 -0.500000 -0.200800 -0.334200 -0.376000 -0.448000 -0.800000 -0.450000 -0.217600 -0.304800 -0.352000 -0.736000 -0.560000 -0.500000 -0.222600 -0.304800 -0.320000 -0.704000 -0.624000 -0.450000 -0.248400 -0.243900 -0.224000 -0.888000 -0.384000 -0.500000 -0.251000 -0.264200 -0.272000 -0.744000 -0.600000 -0.459300 -0.251000 -0.243900 -0.280000 -0.864000 -0.400000 -0.500000 -0.282700 -0.243900 -0.568000 -0.592000 -0.560000 -0.450000 -0.251000 -0.203800 -0.216000 -0.960000 -0.144000 -0.500000 -0.288400 -0.182900 -0.520000 -0.656000 0.528000 -0.450000 -0.255300 -0.182900 -0.208000 -0.656000 0.712000 -0.500000 -0.251000 -0.123800 -0.544000 -0.688000 0.456000 -0.450000 -0.251000 -0.179900 -0.288000 -0.680000 0.664000 -0.500000 -0.250100 -0.121900 -0.432000 -0.712000 0.536000 -0.450000 -0.227100 -0.121900 -0.296000 -0.712000 0.624000 -0.500000 -0.203100 -0.060900 -0.256000 -0.616000 0.736000 -0.450000 -0.200800 -0.072200 -0.256000 -0.536000 0.800000 -0.491400 -0.200800 -0.060900 -0.168000 -0.584000 0.784000 -0.450000 -0.150600 -0.064700 -0.192000 0.128000 0.968000 -0.463100 -0.150600 -0.060900 -0.168000 0.352000 0.912000 -0.450000 -0.100400 -0.078400 -0.088000 0.200000 0.968000 -0.500000 -0.139000 -0.060900 0.080000 0.536000 0.832000 -0.500000 -0.100400 -0.086800 -0.048000 0.256000 0.960000 -0.530700 -0.150600 -0.060900 0.208000 0.504000 0.832000 -0.550000 -0.100400 -0.076900 0.056000 0.056000 0.992000 -0.550000 -0.150600 -0.067100 0.240000 0.480000 0.840000 -0.600000 -0.100400 -0.077400 0.584000 0.048000 0.800000 -0.600000 -0.150600 -0.093600 0.304000 0.568000 0.752000 -0.626600 -0.100400 -0.121900 0.848000 0.208000 0.472000 -0.650000 -0.150600 -0.116200 0.720000 0.480000 0.488000 -0.650000 -0.146100 -0.121900 0.720000 0.504000 0.464000 -0.652900 -0.150600 -0.121900 0.752000 0.456000 0.464000 -0.650000 -0.117900 -0.182900 0.792000 0.600000 0.024000 -0.675300 -0.150600 -0.182900 0.768000 0.552000 0.296000 -0.650000 -0.120200 -0.243900 0.704000 0.520000 -0.472000 -0.674200 -0.150600 -0.243900 0.696000 0.600000 -0.384000 -0.650000 -0.150600 -0.274900 0.544000 0.464000 -0.688000 -0.700000 -0.175300 -0.243900 0.752000 0.600000 -0.240000 -0.650000 -0.200800 -0.297000 0.088000 0.616000 -0.776000 -0.700000 -0.200800 -0.294000 0.576000 0.608000 -0.536000 -0.650000 -0.208600 -0.304800 0.024000 0.680000 -0.728000 -0.700000 -0.211400 -0.304800 0.288000 0.624000 -0.720000 -0.650000 -0.245700 -0.365800 0.168000 0.856000 -0.480000 -0.700000 -0.251000 -0.357800 0.296000 0.496000 -0.808000 -0.678000 -0.251000 -0.365800 0.264000 0.520000 -0.808000 -0.700000 -0.301200 -0.354900 0.160000 -0.240000 -0.952000 -0.650000 -0.267900 -0.365800 0.280000 -0.440000 -0.848000 -0.650000 -0.301200 -0.350300 0.016000 -0.440000 -0.888000 -0.600000 -0.288400 -0.365800 -0.376000 -0.712000 -0.584000 -0.600000 -0.301200 -0.352300 -0.528000 -0.312000 -0.776000 -0.573000 -0.251000 -0.365800 -0.696000 0.544000 -0.464000 -0.567500 -0.301200 -0.304800 -0.696000 0.400000 -0.584000 -0.550000 -0.251000 -0.326800 -0.648000 -0.504000 -0.560000 -0.550000 -0.272400 -0.304800 -0.680000 -0.440000 -0.576000 -0.535300 -0.251000 -0.304800 -0.648000 -0.480000 -0.576000 -0.550000 -0.301200 -0.279200 -0.712000 0.120000 -0.680000 -0.500000 -0.251000 -0.264200 -0.272000 -0.744000 -0.600000 -0.513800 -0.301200 -0.243900 -0.728000 0.592000 -0.328000 -0.500000 -0.282700 -0.243900 -0.568000 -0.592000 -0.560000 -0.511800 -0.301200 -0.182900 -0.912000 0.352000 0.176000 -0.500000 -0.288400 -0.182900 -0.520000 -0.656000 0.528000 -0.550000 -0.301200 -0.123600 -0.624000 -0.440000 0.632000 -0.500000 -0.251000 -0.123800 -0.544000 -0.688000 0.456000 -0.550000 -0.300100 -0.121900 -0.624000 -0.616000 0.472000 -0.501100 -0.251000 -0.121900 -0.552000 -0.624000 0.544000 -0.550000 -0.251000 -0.069700 -0.416000 -0.584000 0.688000 -0.500000 -0.250100 -0.121900 -0.432000 -0.712000 0.536000 -0.550000 -0.242100 -0.060900 -0.400000 -0.536000 0.736000 -0.500000 -0.203100 -0.060900 -0.256000 -0.616000 0.736000 -0.550000 -0.200800 -0.034900 0.016000 -0.040000 0.992000 -0.500000 -0.200800 -0.058700 -0.200000 -0.576000 0.784000 -0.550000 -0.159500 -0.060900 0.248000 0.472000 0.840000 -0.500000 -0.150600 -0.051600 0.024000 0.352000 0.928000 -0.530700 -0.150600 -0.060900 0.208000 0.504000 0.832000 -0.500000 -0.139000 -0.060900 0.080000 0.536000 0.832000 -0.500000 -0.150600 -0.051600 0.024000 0.352000 0.928000 -0.463100 -0.150600 -0.060900 -0.168000 0.352000 0.912000 -0.500000 -0.200800 -0.058700 -0.200000 -0.576000 0.784000 -0.491400 -0.200800 -0.060900 -0.168000 -0.584000 0.784000 -0.500000 -0.203100 -0.060900 -0.256000 -0.616000 0.736000 -0.500000 -0.203100 -0.060900 -0.256000 -0.616000 0.736000 -0.600000 0.251000 0.198700 -0.584000 -0.144000 0.792000 -0.600000 0.251000 0.198700 -0.584000 -0.144000 0.792000 -0.600000 0.301200 0.199900 -0.528000 0.136000 0.832000 -0.586200 0.251000 0.182900 -0.672000 -0.144000 0.720000 -0.577700 0.301200 0.182900 -0.536000 0.272000 0.792000 -0.550000 0.251000 0.125100 -0.872000 -0.184000 0.440000 -0.550000 0.301200 0.149100 -0.896000 -0.096000 0.416000 -0.548800 0.251000 0.121900 -0.912000 -0.176000 0.360000 -0.538800 0.301200 0.121900 -0.912000 0.128000 0.376000 -0.533200 0.251000 0.060900 -0.856000 0.032000 0.512000 -0.526500 0.301200 0.060900 -0.896000 0.008000 0.432000 -0.500800 0.251000 0.000000 -0.792000 -0.016000 0.608000 -0.500000 0.301200 0.002700 -0.768000 -0.080000 0.624000 -0.500000 0.266900 0.000000 -0.760000 -0.040000 0.640000 -0.497900 0.301200 0.000000 -0.728000 -0.144000 0.664000 -0.500000 0.251000 -0.000900 -0.496000 0.112000 0.856000 -0.450000 0.301200 -0.039700 -0.448000 -0.256000 0.848000 -0.450000 0.251000 -0.039600 -0.400000 -0.080000 0.904000 -0.400000 0.301200 -0.051900 -0.168000 -0.472000 0.856000 -0.400000 0.251000 -0.058700 -0.328000 -0.176000 0.920000 -0.353900 0.301200 -0.060900 -0.128000 -0.544000 0.824000 -0.395100 0.251000 -0.060900 -0.344000 -0.184000 0.912000 -0.350000 0.301200 -0.062100 -0.176000 -0.704000 0.680000 -0.350000 0.251000 -0.088400 -0.448000 -0.320000 0.824000 -0.300000 0.301200 -0.077400 -0.160000 -0.712000 0.680000 -0.300000 0.251000 -0.114600 -0.168000 -0.536000 0.824000 -0.250000 0.301200 -0.083600 -0.096000 -0.744000 0.648000 -0.271900 0.251000 -0.121900 -0.240000 -0.760000 0.592000 -0.250000 0.256500 -0.121900 -0.200000 -0.800000 0.552000 -0.300000 0.251000 -0.156100 -0.368000 -0.808000 -0.448000 -0.250000 0.284000 -0.182900 -0.096000 -0.256000 -0.952000 -0.300000 0.284000 -0.182900 -0.168000 -0.184000 -0.960000 -0.250000 0.301200 -0.184400 -0.080000 -0.056000 -0.992000 -0.300000 0.301200 -0.184400 -0.064000 -0.072000 -0.992000 -0.250000 0.351500 -0.189100 -0.160000 0.168000 -0.968000 -0.300000 0.351500 -0.193900 -0.008000 0.064000 -0.992000 -0.250000 0.370000 -0.182900 -0.184000 0.304000 -0.928000 -0.300000 0.379400 -0.182900 -0.016000 0.272000 -0.960000 -0.250000 0.401700 -0.172700 -0.016000 0.288000 -0.952000 -0.300000 0.401700 -0.174800 0.040000 0.368000 -0.920000 -0.250000 0.451900 -0.137900 0.128000 0.536000 -0.824000 -0.300000 0.451900 -0.131100 0.200000 0.712000 -0.664000 -0.250000 0.466900 -0.121900 0.232000 0.968000 0.016000 -0.300000 0.458100 -0.121900 0.224000 0.952000 -0.176000 -0.250000 0.451900 -0.094000 0.248000 0.784000 0.552000 -0.300000 0.451900 -0.106900 0.184000 0.864000 0.456000 -0.250000 0.432000 -0.060900 0.224000 0.624000 0.736000 -0.300000 0.430700 -0.060900 0.128000 0.808000 0.568000 -0.250000 0.401700 -0.026800 -0.216000 0.176000 0.952000 -0.300000 0.401700 -0.022200 0.096000 0.472000 0.864000 -0.250000 0.351500 -0.020200 -0.488000 -0.416000 0.760000 -0.300000 0.351500 -0.009100 -0.016000 -0.144000 0.984000 -0.250000 0.317900 -0.060900 -0.432000 -0.680000 0.584000 -0.300000 0.310700 -0.060900 -0.072000 -0.760000 0.640000 -0.250000 0.301200 -0.083600 -0.096000 -0.744000 0.648000 -0.300000 0.301200 -0.077400 -0.160000 -0.712000 0.680000 -0.300000 0.310700 -0.060900 -0.072000 -0.760000 0.640000 -0.350000 0.301200 -0.062100 -0.176000 -0.704000 0.680000 -0.350000 0.302200 -0.060900 -0.144000 -0.624000 0.760000 -0.353900 0.301200 -0.060900 -0.128000 -0.544000 0.824000 -0.350000 0.351500 -0.021800 0.032000 -0.048000 0.992000 -0.400000 0.301200 -0.051900 -0.168000 -0.472000 0.856000 -0.400000 0.351500 -0.018700 -0.136000 -0.208000 0.960000 -0.450000 0.301200 -0.039700 -0.448000 -0.256000 0.848000 -0.450000 0.351500 -0.003200 -0.296000 0.344000 0.888000 -0.497900 0.301200 0.000000 -0.728000 -0.144000 0.664000 -0.458200 0.351500 0.000000 -0.280000 0.520000 0.800000 -0.500000 0.301200 0.002700 -0.768000 -0.080000 0.624000 -0.500000 0.351500 0.029100 -0.680000 0.048000 0.728000 -0.526500 0.301200 0.060900 -0.896000 0.008000 0.432000 -0.540600 0.351500 0.060900 -0.584000 0.632000 0.496000 -0.538800 0.301200 0.121900 -0.912000 0.128000 0.376000 -0.550000 0.351500 0.078000 -0.616000 0.672000 0.392000 -0.550000 0.331800 0.121900 -0.696000 0.536000 0.456000 -0.566500 0.351500 0.121900 -0.632000 0.576000 0.496000 -0.550000 0.301200 0.149100 -0.896000 -0.096000 0.416000 -0.600000 0.351500 0.157200 -0.376000 0.584000 0.704000 -0.577700 0.301200 0.182900 -0.536000 0.272000 0.792000 -0.600000 0.327100 0.182900 -0.144000 0.552000 0.816000 -0.600000 0.351500 0.157200 -0.376000 0.584000 0.704000 -0.650000 0.311500 0.182900 0.424000 0.496000 0.752000 -0.650000 0.351500 0.128300 0.616000 0.616000 0.480000 -0.650000 0.351500 0.128300 0.616000 0.616000 0.480000 -0.586200 0.251000 0.182900 -0.672000 -0.144000 0.720000 -0.586200 0.251000 0.182900 -0.672000 -0.144000 0.720000 -0.600000 0.251000 0.198700 -0.584000 -0.144000 0.792000 -0.600000 0.211800 0.182900 -0.672000 -0.280000 0.672000 -0.650000 0.251000 0.217300 -0.016000 0.232000 0.968000 -0.604600 0.200800 0.182900 -0.672000 -0.288000 0.664000 -0.650000 0.200800 0.219700 -0.496000 -0.256000 0.824000 -0.641000 0.150600 0.182900 -0.528000 -0.464000 0.696000 -0.650000 0.150600 0.191100 -0.504000 -0.472000 0.720000 -0.650000 0.141000 0.182900 -0.512000 -0.488000 0.704000 -0.700000 0.150600 0.220800 -0.264000 -0.416000 0.864000 -0.685300 0.100400 0.182900 -0.504000 -0.560000 0.648000 -0.700000 0.100400 0.197200 -0.456000 -0.560000 0.680000 -0.700000 0.088000 0.182900 -0.464000 -0.608000 0.640000 -0.750000 0.100400 0.207000 0.032000 -0.192000 0.976000 -0.750000 0.062100 0.182900 -0.416000 -0.632000 0.648000 -0.800000 0.100400 0.199400 -0.032000 0.024000 0.992000 -0.762700 0.050200 0.182900 -0.512000 -0.672000 0.520000 -0.800000 0.050200 0.211000 -0.336000 -0.552000 0.752000 -0.800000 0.035400 0.182900 -0.432000 -0.808000 0.384000 -0.850000 0.050200 0.216300 -0.184000 -0.272000 0.936000 -0.846600 0.000000 0.182900 -0.736000 -0.616000 0.264000 -0.850000 0.000000 0.194300 -0.704000 -0.640000 0.296000 -0.850000 -0.004200 0.182900 -0.720000 -0.616000 0.288000 -0.900000 0.000000 0.237100 -0.176000 -0.616000 0.760000 -0.880500 -0.050200 0.182900 -0.744000 -0.528000 0.384000 -0.900000 -0.050200 0.230400 -0.448000 -0.568000 0.680000 -0.900000 -0.076800 0.182900 -0.504000 -0.624000 0.592000 -0.950000 -0.050200 0.197900 0.336000 -0.192000 0.920000 -0.934300 -0.100400 0.182900 -0.392000 -0.752000 0.520000 -0.950000 -0.100400 0.196500 0.208000 -0.704000 0.672000 -0.950000 -0.108800 0.182900 0.232000 -0.768000 0.584000 -0.934300 -0.100400 0.182900 -0.392000 -0.752000 0.520000 -0.950000 -0.142500 0.121900 -0.608000 -0.672000 0.392000 -0.900000 -0.100400 0.145900 -0.608000 -0.728000 0.304000 -0.900000 -0.107100 0.121900 -0.584000 -0.768000 0.240000 -0.892500 -0.100400 0.121900 -0.688000 -0.680000 0.240000 -0.900000 -0.117100 0.060900 -0.656000 -0.736000 0.136000 -0.881900 -0.100400 0.060900 -0.752000 -0.632000 0.152000 -0.900000 -0.125700 0.000000 -0.664000 -0.728000 0.136000 -0.873300 -0.100400 0.000000 -0.752000 -0.632000 0.120000 -0.900000 -0.135500 -0.060900 -0.672000 -0.712000 0.168000 -0.865600 -0.100400 -0.060900 -0.776000 -0.616000 0.120000 -0.900000 -0.148200 -0.121900 -0.664000 -0.728000 0.088000 -0.858300 -0.100400 -0.121900 -0.792000 -0.600000 0.056000 -0.900000 -0.150600 -0.145400 -0.696000 -0.704000 0.104000 -0.858100 -0.100400 -0.182900 -0.824000 -0.552000 0.000000 -0.895100 -0.150600 -0.182900 -0.744000 -0.648000 0.104000 -0.860900 -0.100400 -0.243900 -0.856000 -0.496000 -0.072000 -0.890800 -0.150600 -0.243900 -0.848000 -0.512000 0.064000 -0.869700 -0.100400 -0.304800 -0.880000 -0.248000 -0.400000 -0.883200 -0.150600 -0.304800 -0.864000 -0.368000 -0.320000 -0.890800 -0.150600 -0.243900 -0.848000 -0.512000 0.064000 -0.900000 -0.181100 -0.304800 -0.768000 -0.440000 -0.448000 -0.900000 -0.163000 -0.243900 -0.816000 -0.552000 0.128000 -0.911900 -0.200800 -0.304800 -0.864000 -0.480000 -0.128000 -0.928800 -0.200800 -0.243900 -0.736000 -0.616000 0.240000 -0.942100 -0.251000 -0.304800 -0.752000 -0.552000 0.344000 -0.950000 -0.224400 -0.243900 -0.688000 -0.640000 0.328000 -0.950000 -0.251000 -0.295200 -0.640000 -0.496000 0.576000 -0.942100 -0.251000 -0.304800 -0.752000 -0.552000 0.344000 -0.950000 -0.261400 -0.304800 -0.752000 -0.584000 0.288000 -0.950000 -0.261400 -0.304800 -0.752000 -0.584000 0.288000 -0.650000 0.251000 0.217300 -0.016000 0.232000 0.968000 -0.650000 0.251000 0.217300 -0.016000 0.232000 0.968000 -0.600000 0.251000 0.198700 -0.584000 -0.144000 0.792000 -0.650000 0.301200 0.190400 0.408000 0.464000 0.776000 -0.600000 0.301200 0.199900 -0.528000 0.136000 0.832000 -0.600000 0.301200 0.199900 -0.528000 0.136000 0.832000 -0.700000 0.251000 0.193900 0.488000 0.504000 0.704000 -0.700000 0.251000 0.193900 0.488000 0.504000 0.704000 -0.650000 0.251000 0.217300 -0.016000 0.232000 0.968000 -0.700000 0.200800 0.226400 0.328000 0.432000 0.832000 -0.650000 0.200800 0.219700 -0.496000 -0.256000 0.824000 -0.700000 0.150600 0.220800 -0.264000 -0.416000 0.864000 -0.650000 0.150600 0.191100 -0.504000 -0.472000 0.720000 -0.650000 0.150600 0.191100 -0.504000 -0.472000 0.720000 -0.750000 0.200800 0.191100 0.424000 0.552000 0.712000 -0.750000 0.200800 0.191100 0.424000 0.552000 0.712000 -0.700000 0.200800 0.226400 0.328000 0.432000 0.832000 -0.750000 0.150600 0.201100 0.320000 0.240000 0.912000 -0.700000 0.150600 0.220800 -0.264000 -0.416000 0.864000 -0.750000 0.100400 0.207000 0.032000 -0.192000 0.976000 -0.700000 0.100400 0.197200 -0.456000 -0.560000 0.680000 -0.700000 0.100400 0.197200 -0.456000 -0.560000 0.680000 -0.850000 0.050200 0.216300 -0.184000 -0.272000 0.936000 -0.850000 0.050200 0.216300 -0.184000 -0.272000 0.936000 -0.800000 0.050200 0.211000 -0.336000 -0.552000 0.752000 -0.850000 0.100400 0.222500 0.440000 0.584000 0.672000 -0.800000 0.100400 0.199400 -0.032000 0.024000 0.992000 -0.800000 0.100400 0.199400 -0.032000 0.024000 0.992000 -0.900000 0.000000 0.237100 -0.176000 -0.616000 0.760000 -0.900000 0.000000 0.237100 -0.176000 -0.616000 0.760000 -0.850000 0.000000 0.194300 -0.704000 -0.640000 0.296000 -0.900000 0.050200 0.226800 0.488000 0.496000 0.712000 -0.850000 0.050200 0.216300 -0.184000 -0.272000 0.936000 -0.850000 0.050200 0.216300 -0.184000 -0.272000 0.936000 -0.950000 -0.050200 0.197900 0.336000 -0.192000 0.920000 -0.950000 -0.050200 0.197900 0.336000 -0.192000 0.920000 -0.900000 -0.050200 0.230400 -0.448000 -0.568000 0.680000 -0.950000 0.000000 0.206500 0.400000 0.008000 0.912000 -0.900000 0.000000 0.237100 -0.176000 -0.616000 0.760000 -0.900000 0.000000 0.237100 -0.176000 -0.616000 0.760000 --0.950000 0.150600 0.154300 0.208000 0.640000 0.736000 --0.950000 0.150600 0.154300 0.208000 0.640000 0.736000 --0.900000 0.150600 0.126400 0.344000 0.632000 0.688000 --0.950000 0.178500 0.121900 0.272000 0.648000 0.704000 --0.900000 0.154600 0.121900 0.352000 0.624000 0.688000 --0.950000 0.200800 0.096100 0.208000 0.672000 0.704000 --0.900000 0.200800 0.074800 0.296000 0.712000 0.624000 --0.950000 0.226300 0.060900 0.264000 0.760000 0.584000 --0.900000 0.210300 0.060900 0.312000 0.744000 0.576000 --0.950000 0.251000 0.016800 0.288000 0.808000 0.504000 --0.900000 0.240500 0.000000 0.368000 0.840000 0.376000 --0.928700 0.251000 0.000000 0.312000 0.848000 0.408000 --0.900000 0.251000 -0.035000 0.384000 0.864000 0.312000 --0.950000 0.258900 0.000000 0.296000 0.848000 0.432000 --0.900000 0.258900 -0.060900 0.400000 0.896000 0.144000 --0.950000 0.277400 -0.060900 0.336000 0.928000 0.080000 --0.900000 0.251000 -0.101700 0.376000 0.896000 -0.216000 --0.950000 0.267200 -0.121900 0.344000 0.864000 -0.336000 --0.910500 0.251000 -0.121900 0.344000 0.880000 -0.304000 --0.950000 0.251000 -0.157200 0.320000 0.808000 -0.480000 --0.900000 0.246900 -0.121900 0.360000 0.872000 -0.304000 --0.950000 0.237800 -0.182900 0.296000 0.760000 -0.568000 --0.900000 0.214200 -0.182900 0.360000 0.720000 -0.576000 --0.950000 0.200800 -0.231900 0.272000 0.640000 -0.704000 --0.900000 0.200800 -0.201400 0.352000 0.680000 -0.640000 --0.950000 0.189400 -0.243900 0.264000 0.616000 -0.728000 --0.900000 0.162400 -0.243900 0.336000 0.616000 -0.704000 --0.950000 0.150600 -0.281200 0.240000 0.600000 -0.752000 --0.900000 0.150600 -0.256300 0.328000 0.616000 -0.704000 --0.950000 0.126000 -0.304800 0.168000 0.528000 -0.824000 --0.900000 0.104600 -0.304800 0.304000 0.568000 -0.760000 --0.950000 0.100400 -0.325900 0.192000 0.384000 -0.896000 --0.900000 0.100400 -0.308600 0.312000 0.536000 -0.776000 --0.950000 0.050200 -0.340200 0.184000 0.072000 -0.976000 --0.900000 0.050200 -0.331200 0.320000 0.232000 -0.912000 --0.950000 0.000000 -0.337100 0.184000 -0.088000 -0.976000 --0.900000 0.000000 -0.328400 0.216000 0.000000 -0.968000 --0.950000 -0.050200 -0.337400 0.088000 0.008000 -0.992000 --0.900000 -0.050200 -0.330000 0.160000 0.128000 -0.976000 --0.900000 0.000000 -0.328400 0.216000 0.000000 -0.968000 --0.850000 -0.050200 -0.323400 0.248000 0.176000 -0.944000 --0.850000 0.000000 -0.313800 0.264000 0.064000 -0.960000 --0.808200 -0.050200 -0.304800 0.280000 0.136000 -0.944000 --0.823600 0.000000 -0.304800 0.296000 0.080000 -0.944000 --0.800000 -0.050200 -0.302200 0.264000 0.120000 -0.952000 --0.800000 0.000000 -0.298500 0.248000 0.080000 -0.960000 --0.750000 -0.050200 -0.287100 0.288000 0.040000 -0.952000 --0.750000 0.000000 -0.285200 0.328000 0.160000 -0.920000 --0.700000 -0.050200 -0.272000 0.360000 0.104000 -0.920000 --0.700000 0.000000 -0.262900 0.392000 0.288000 -0.864000 --0.650000 -0.050200 -0.249300 0.496000 0.208000 -0.840000 --0.669700 0.000000 -0.243900 0.480000 0.312000 -0.808000 --0.650000 -0.035200 -0.243900 0.544000 0.264000 -0.792000 --0.650000 0.000000 -0.224600 0.632000 0.368000 -0.672000 --0.642900 -0.050200 -0.243900 0.560000 0.208000 -0.792000 --0.621400 0.000000 -0.182900 0.848000 0.280000 -0.440000 --0.606100 -0.050200 -0.182900 0.864000 0.248000 -0.424000 --0.606100 -0.050200 -0.182900 0.864000 0.248000 -0.424000 --0.950000 0.127100 0.182900 0.248000 0.536000 0.800000 --0.950000 0.127100 0.182900 0.248000 0.536000 0.800000 --0.950000 0.150600 0.154300 0.208000 0.640000 0.736000 --0.900000 0.101900 0.182900 0.304000 0.552000 0.768000 --0.900000 0.150600 0.126400 0.344000 0.632000 0.688000 --0.900000 0.150600 0.126400 0.344000 0.632000 0.688000 --0.939400 -0.100400 0.121900 -0.456000 -0.816000 0.336000 --0.939400 -0.100400 0.121900 -0.456000 -0.816000 0.336000 --0.900000 -0.100400 0.174900 -0.400000 -0.624000 0.656000 --0.900000 -0.127600 0.121900 -0.608000 -0.704000 0.344000 --0.900000 -0.127600 0.121900 -0.608000 -0.704000 0.344000 --0.900000 0.150600 0.126400 0.344000 0.632000 0.688000 --0.900000 0.150600 0.126400 0.344000 0.632000 0.688000 --0.900000 0.154600 0.121900 0.352000 0.624000 0.688000 --0.892900 0.150600 0.121900 0.360000 0.624000 0.680000 --0.900000 0.200800 0.074800 0.296000 0.712000 0.624000 --0.850000 0.150600 0.098600 0.360000 0.600000 0.704000 --0.879600 0.200800 0.060900 0.352000 0.712000 0.600000 --0.850000 0.184100 0.060900 0.376000 0.632000 0.664000 --0.850000 0.200800 0.035600 0.384000 0.744000 0.536000 --0.800000 0.153700 0.060900 0.432000 0.632000 0.632000 --0.811000 0.200800 0.000000 0.408000 0.816000 0.392000 --0.800000 0.195100 0.000000 0.456000 0.768000 0.432000 --0.800000 0.200800 -0.016800 0.416000 0.840000 0.336000 --0.750000 0.162200 0.000000 0.464000 0.672000 0.560000 --0.768900 0.200800 -0.060900 0.424000 0.888000 0.160000 --0.750000 0.191300 -0.060900 0.496000 0.856000 0.072000 --0.800000 0.200800 -0.113900 0.392000 0.880000 -0.256000 --0.750000 0.174400 -0.121900 0.448000 0.824000 -0.336000 --0.800000 0.198900 -0.121900 0.384000 0.872000 -0.288000 --0.750000 0.150600 -0.159200 0.432000 0.664000 -0.600000 --0.800000 0.163000 -0.182900 0.392000 0.688000 -0.600000 --0.779100 0.150600 -0.182900 0.400000 0.664000 -0.616000 --0.800000 0.150600 -0.199200 0.384000 0.648000 -0.648000 --0.750000 0.132600 -0.182900 0.408000 0.656000 -0.624000 --0.800000 0.108800 -0.243900 0.352000 0.608000 -0.704000 --0.750000 0.100400 -0.222000 0.432000 0.576000 -0.680000 --0.785800 0.100400 -0.243900 0.360000 0.584000 -0.720000 --0.750000 0.077000 -0.243900 0.368000 0.552000 -0.744000 --0.800000 0.100400 -0.252800 0.360000 0.584000 -0.720000 --0.750000 0.050200 -0.267100 0.368000 0.432000 -0.816000 --0.800000 0.050200 -0.288900 0.352000 0.360000 -0.856000 --0.750000 0.000000 -0.285200 0.328000 0.160000 -0.920000 --0.800000 0.000000 -0.298500 0.248000 0.080000 -0.960000 --0.800000 0.050200 -0.288900 0.352000 0.360000 -0.856000 --0.823600 0.000000 -0.304800 0.296000 0.080000 -0.944000 --0.836500 0.050200 -0.304800 0.336000 0.344000 -0.872000 --0.850000 0.000000 -0.313800 0.264000 0.064000 -0.960000 --0.850000 0.050200 -0.311100 0.336000 0.328000 -0.872000 --0.900000 0.000000 -0.328400 0.216000 0.000000 -0.968000 --0.900000 0.050200 -0.331200 0.320000 0.232000 -0.912000 --0.850000 0.050200 -0.311100 0.336000 0.328000 -0.872000 --0.900000 0.100400 -0.308600 0.312000 0.536000 -0.776000 --0.850000 0.061400 -0.304800 0.336000 0.392000 -0.848000 --0.892300 0.100400 -0.304800 0.320000 0.536000 -0.776000 --0.850000 0.100400 -0.281200 0.344000 0.488000 -0.792000 --0.900000 0.104600 -0.304800 0.304000 0.568000 -0.760000 --0.850000 0.135500 -0.243900 0.320000 0.608000 -0.712000 --0.900000 0.150600 -0.256300 0.328000 0.616000 -0.704000 --0.878700 0.150600 -0.243900 0.328000 0.616000 -0.704000 --0.900000 0.162400 -0.243900 0.336000 0.616000 -0.704000 --0.850000 0.150600 -0.229000 0.320000 0.608000 -0.720000 --0.900000 0.200800 -0.201400 0.352000 0.680000 -0.640000 --0.850000 0.188600 -0.182900 0.360000 0.712000 -0.592000 --0.874200 0.200800 -0.182900 0.360000 0.712000 -0.584000 --0.850000 0.200800 -0.163600 0.360000 0.768000 -0.512000 --0.900000 0.214200 -0.182900 0.360000 0.720000 -0.576000 --0.850000 0.222300 -0.121900 0.408000 0.856000 -0.296000 --0.900000 0.246900 -0.121900 0.360000 0.872000 -0.304000 --0.850000 0.235300 -0.060900 0.408000 0.904000 0.008000 --0.900000 0.251000 -0.101700 0.376000 0.896000 -0.216000 --0.884300 0.251000 -0.060900 0.432000 0.880000 0.144000 --0.900000 0.258900 -0.060900 0.400000 0.896000 0.144000 --0.900000 0.251000 -0.035000 0.384000 0.864000 0.312000 --0.884300 0.251000 -0.060900 0.432000 0.880000 0.144000 --0.900000 0.240500 0.000000 0.368000 0.840000 0.376000 --0.850000 0.235300 -0.060900 0.408000 0.904000 0.008000 --0.850000 0.219100 0.000000 0.368000 0.824000 0.424000 --0.800000 0.214400 -0.060900 0.400000 0.896000 0.176000 --0.811000 0.200800 0.000000 0.408000 0.816000 0.392000 --0.800000 0.200800 -0.016800 0.416000 0.840000 0.336000 --0.800000 0.214400 -0.060900 0.400000 0.896000 0.176000 --0.768900 0.200800 -0.060900 0.424000 0.888000 0.160000 --0.800000 0.200800 -0.113900 0.392000 0.880000 -0.256000 --0.800000 0.214400 -0.060900 0.400000 0.896000 0.176000 --0.804300 0.200800 -0.121900 0.384000 0.872000 -0.288000 --0.850000 0.235300 -0.060900 0.408000 0.904000 0.008000 --0.850000 0.222300 -0.121900 0.408000 0.856000 -0.296000 --0.804300 0.200800 -0.121900 0.384000 0.872000 -0.288000 --0.850000 0.200800 -0.163600 0.360000 0.768000 -0.512000 --0.800000 0.198900 -0.121900 0.384000 0.872000 -0.288000 --0.850000 0.188600 -0.182900 0.360000 0.712000 -0.592000 --0.800000 0.163000 -0.182900 0.392000 0.688000 -0.600000 --0.850000 0.150600 -0.229000 0.320000 0.608000 -0.720000 --0.800000 0.150600 -0.199200 0.384000 0.648000 -0.648000 --0.850000 0.135500 -0.243900 0.320000 0.608000 -0.712000 --0.800000 0.108800 -0.243900 0.352000 0.608000 -0.704000 --0.850000 0.100400 -0.281200 0.344000 0.488000 -0.792000 --0.800000 0.100400 -0.252800 0.360000 0.584000 -0.720000 --0.850000 0.061400 -0.304800 0.336000 0.392000 -0.848000 --0.800000 0.050200 -0.288900 0.352000 0.360000 -0.856000 --0.836500 0.050200 -0.304800 0.336000 0.344000 -0.872000 --0.850000 0.061400 -0.304800 0.336000 0.392000 -0.848000 --0.850000 0.050200 -0.311100 0.336000 0.328000 -0.872000 --0.850000 0.050200 -0.311100 0.336000 0.328000 -0.872000 --0.850000 0.127100 0.121900 0.424000 0.560000 0.704000 --0.850000 0.127100 0.121900 0.424000 0.560000 0.704000 --0.820700 0.100400 0.121900 0.496000 0.488000 0.704000 --0.850000 0.100400 0.150400 0.488000 0.512000 0.696000 --0.850000 0.100400 0.150400 0.488000 0.512000 0.696000 --0.839600 0.000000 0.182900 0.264000 0.152000 0.944000 --0.839600 0.000000 0.182900 0.264000 0.152000 0.944000 --0.809300 -0.050200 0.182900 0.232000 0.160000 0.952000 --0.800000 0.000000 0.163200 0.400000 0.288000 0.864000 --0.800000 -0.050200 0.179900 0.264000 0.176000 0.944000 --0.750000 0.000000 0.129400 0.496000 0.360000 0.776000 --0.750000 -0.050200 0.155100 0.464000 0.288000 0.832000 --0.740500 0.000000 0.121900 0.504000 0.352000 0.784000 --0.708600 -0.050200 0.121900 0.496000 0.344000 0.784000 --0.700000 0.000000 0.089700 0.584000 0.336000 0.736000 --0.700000 -0.050200 0.115300 0.496000 0.344000 0.792000 --0.666100 0.000000 0.060900 0.560000 0.376000 0.728000 --0.650000 -0.050200 0.076400 0.576000 0.320000 0.744000 --0.650000 -0.023500 0.060900 0.576000 0.360000 0.720000 --0.635700 -0.050200 0.060900 0.640000 0.304000 0.696000 --0.650000 0.000000 0.045200 0.576000 0.400000 0.704000 --0.600000 -0.050200 0.018400 0.648000 0.320000 0.688000 --0.609800 0.000000 0.000000 0.696000 0.384000 0.592000 --0.600000 -0.018300 0.000000 0.712000 0.368000 0.584000 --0.600000 0.000000 -0.017800 0.736000 0.384000 0.544000 --0.584800 -0.050200 0.000000 0.744000 0.336000 0.568000 --0.573200 0.000000 -0.060900 0.920000 0.296000 -0.248000 --0.554400 -0.050200 -0.060900 0.944000 0.280000 0.128000 --0.554400 -0.050200 -0.060900 0.944000 0.280000 0.128000 --0.800000 -0.063400 0.182900 0.240000 0.160000 0.952000 --0.800000 -0.063400 0.182900 0.240000 0.160000 0.952000 --0.809300 -0.050200 0.182900 0.232000 0.160000 0.952000 --0.800000 -0.050200 0.179900 0.264000 0.176000 0.944000 --0.800000 -0.050200 0.179900 0.264000 0.176000 0.944000 --0.850000 -0.137400 0.182900 -0.304000 -0.312000 0.896000 --0.850000 -0.137400 0.182900 -0.304000 -0.312000 0.896000 --0.836800 -0.150600 0.182900 -0.304000 -0.304000 0.896000 --0.850000 -0.150600 0.175600 -0.632000 -0.392000 0.664000 --0.803100 -0.200800 0.182900 -0.456000 -0.168000 0.864000 --0.850000 -0.200800 0.125700 -0.776000 -0.360000 0.504000 --0.850000 -0.200800 0.125700 -0.776000 -0.360000 0.504000 --0.800000 -0.251000 0.157900 -0.576000 -0.400000 0.696000 --0.800000 -0.251000 0.157900 -0.576000 -0.400000 0.696000 --0.800000 -0.280700 0.121900 -0.736000 -0.528000 0.408000 --0.819200 -0.251000 0.121900 -0.760000 -0.496000 0.400000 --0.800000 -0.301200 0.085900 -0.768000 -0.544000 0.304000 --0.838400 -0.251000 0.060900 -0.808000 -0.528000 0.248000 --0.805900 -0.301200 0.060900 -0.800000 -0.536000 0.232000 --0.800000 -0.301200 0.085900 -0.768000 -0.544000 0.304000 --0.800000 -0.310100 0.060900 -0.800000 -0.544000 0.224000 --0.805900 -0.301200 0.060900 -0.800000 -0.536000 0.232000 --0.800000 -0.327900 0.000000 -0.800000 -0.560000 0.176000 --0.817700 -0.301200 0.000000 -0.808000 -0.560000 0.168000 --0.817700 -0.301200 0.000000 -0.808000 -0.560000 0.168000 --0.800000 0.077200 0.121900 0.512000 0.416000 0.744000 --0.800000 0.077200 0.121900 0.512000 0.416000 0.744000 --0.781300 0.050200 0.121900 0.536000 0.400000 0.736000 --0.800000 0.050200 0.139800 0.504000 0.392000 0.760000 --0.800000 0.050200 0.139800 0.504000 0.392000 0.760000 --0.776900 -0.100400 0.182900 0.184000 0.120000 0.968000 --0.776900 -0.100400 0.182900 0.184000 0.120000 0.968000 --0.750000 -0.100400 0.174700 0.320000 0.192000 0.920000 --0.750000 -0.136500 0.182900 0.216000 0.112000 0.968000 --0.700000 -0.100400 0.138900 0.488000 0.288000 0.816000 --0.743500 -0.150600 0.182900 0.192000 0.096000 0.968000 --0.700000 -0.150600 0.164200 0.408000 0.248000 0.872000 --0.703900 -0.200800 0.182900 0.128000 0.064000 0.984000 --0.700000 -0.200800 0.182200 0.152000 0.072000 0.984000 --0.700000 -0.208700 0.182900 0.176000 0.120000 0.968000 --0.650000 -0.200800 0.153500 0.376000 0.280000 0.872000 --0.650000 -0.249200 0.182900 0.176000 0.464000 0.864000 --0.600000 -0.200800 0.130000 0.152000 0.560000 0.808000 --0.638500 -0.251000 0.182900 0.072000 0.424000 0.896000 --0.600000 -0.251000 0.177800 0.080000 0.520000 0.840000 --0.600000 -0.260000 0.182900 0.056000 0.320000 0.944000 --0.550000 -0.251000 0.173600 -0.016000 0.472000 0.872000 --0.550000 -0.264400 0.182900 -0.072000 0.456000 0.880000 --0.512000 -0.251000 0.182900 -0.112000 0.632000 0.760000 --0.550000 -0.251000 0.173600 -0.016000 0.472000 0.872000 --0.500000 -0.249000 0.182900 -0.112000 0.656000 0.744000 --0.550000 -0.202900 0.121900 0.032000 0.728000 0.680000 --0.500000 -0.200800 0.127000 -0.088000 0.600000 0.784000 --0.536800 -0.200800 0.121900 -0.104000 0.736000 0.664000 --0.500000 -0.196200 0.121900 -0.112000 0.784000 0.600000 --0.550000 -0.200800 0.118700 0.032000 0.784000 0.608000 --0.500000 -0.166600 0.060900 -0.304000 0.832000 0.448000 --0.550000 -0.166800 0.060900 0.264000 0.816000 0.504000 --0.500000 -0.150600 0.019400 -0.216000 0.856000 0.464000 --0.550000 -0.150600 0.029600 0.504000 0.688000 0.512000 --0.500000 -0.141000 0.000000 -0.040000 0.880000 0.456000 --0.550000 -0.125000 0.000000 0.608000 0.616000 0.488000 --0.500000 -0.119500 -0.060900 -0.160000 0.976000 0.112000 --0.550000 -0.100400 -0.036900 0.792000 0.376000 0.464000 --0.533200 -0.100400 -0.060900 0.712000 0.696000 -0.024000 --0.533200 -0.100400 -0.060900 0.712000 0.696000 -0.024000 --0.750000 -0.267900 0.182900 -0.232000 -0.192000 0.944000 --0.750000 -0.267900 0.182900 -0.232000 -0.192000 0.944000 --0.750000 -0.301200 0.168400 -0.360000 -0.432000 0.816000 --0.700000 -0.272200 0.182900 -0.072000 -0.128000 0.984000 --0.700000 -0.301200 0.175400 -0.248000 -0.280000 0.920000 --0.671000 -0.301200 0.182900 -0.120000 -0.104000 0.984000 --0.700000 -0.351500 0.155000 -0.664000 -0.344000 0.656000 --0.663400 -0.351500 0.182900 -0.304000 -0.080000 0.944000 --0.700000 -0.401700 0.124500 -0.664000 -0.408000 0.616000 --0.650000 -0.385200 0.182900 -0.496000 -0.152000 0.848000 --0.650000 -0.401700 0.178700 -0.552000 -0.344000 0.752000 --0.644900 -0.401700 0.182900 -0.528000 -0.240000 0.808000 --0.650000 -0.451900 0.140100 -0.528000 -0.568000 0.624000 --0.600000 -0.446800 0.182900 -0.240000 -0.464000 0.848000 --0.600000 -0.451900 0.179400 -0.216000 -0.496000 0.832000 --0.583500 -0.451900 0.182900 -0.128000 -0.544000 0.824000 --0.600000 -0.495400 0.121900 -0.392000 -0.720000 0.560000 --0.550000 -0.456500 0.182900 0.056000 -0.736000 0.672000 --0.550000 -0.494000 0.121900 0.024000 -0.832000 0.536000 --0.600000 -0.495400 0.121900 -0.392000 -0.720000 0.560000 --0.550000 -0.502100 0.104800 0.104000 -0.840000 0.520000 --0.600000 -0.502100 0.110700 -0.280000 -0.792000 0.528000 --0.550000 -0.532000 0.060900 0.080000 -0.776000 0.624000 --0.600000 -0.531600 0.060900 -0.448000 -0.736000 0.496000 --0.600000 -0.502100 0.110700 -0.280000 -0.792000 0.528000 --0.640700 -0.502100 0.060900 -0.496000 -0.728000 0.456000 --0.600000 -0.495400 0.121900 -0.392000 -0.720000 0.560000 --0.650000 -0.495900 0.060900 -0.528000 -0.720000 0.432000 --0.650000 -0.463300 0.121900 -0.512000 -0.696000 0.496000 --0.700000 -0.453200 0.060900 -0.560000 -0.720000 0.392000 --0.664200 -0.451900 0.121900 -0.552000 -0.696000 0.448000 --0.700000 -0.451900 0.063700 -0.672000 -0.600000 0.424000 --0.700000 -0.404000 0.121900 -0.624000 -0.536000 0.560000 --0.701000 -0.451900 0.060900 -0.792000 -0.480000 0.344000 --0.701700 -0.401700 0.121900 -0.704000 -0.408000 0.568000 --0.731300 -0.401700 0.060900 -0.784000 -0.496000 0.344000 --0.739400 -0.351500 0.121900 -0.528000 -0.576000 0.616000 --0.750000 -0.377100 0.060900 -0.760000 -0.552000 0.320000 --0.750000 -0.351500 0.110100 -0.600000 -0.584000 0.536000 --0.767900 -0.351500 0.060900 -0.760000 -0.568000 0.296000 --0.767900 -0.351500 0.060900 -0.760000 -0.568000 0.296000 --0.750000 -0.301200 0.168400 -0.360000 -0.432000 0.816000 --0.750000 -0.301200 0.168400 -0.360000 -0.432000 0.816000 --0.700000 -0.301200 0.175400 -0.248000 -0.280000 0.920000 --0.750000 -0.342500 0.121900 -0.536000 -0.592000 0.592000 --0.700000 -0.351500 0.155000 -0.664000 -0.344000 0.656000 --0.739400 -0.351500 0.121900 -0.528000 -0.576000 0.616000 --0.700000 -0.401700 0.124500 -0.664000 -0.408000 0.616000 --0.701700 -0.401700 0.121900 -0.704000 -0.408000 0.568000 --0.700000 -0.404000 0.121900 -0.624000 -0.536000 0.560000 --0.700000 -0.401700 0.124500 -0.664000 -0.408000 0.616000 --0.664200 -0.451900 0.121900 -0.552000 -0.696000 0.448000 --0.650000 -0.401700 0.178700 -0.552000 -0.344000 0.752000 --0.650000 -0.451900 0.140100 -0.528000 -0.568000 0.624000 --0.664200 -0.451900 0.121900 -0.552000 -0.696000 0.448000 --0.650000 -0.463300 0.121900 -0.512000 -0.696000 0.496000 --0.650000 -0.451900 0.140100 -0.528000 -0.568000 0.624000 --0.600000 -0.495400 0.121900 -0.392000 -0.720000 0.560000 --0.600000 -0.451900 0.179400 -0.216000 -0.496000 0.832000 --0.600000 -0.451900 0.179400 -0.216000 -0.496000 0.832000 --0.700000 -0.062200 0.121900 0.504000 0.344000 0.784000 --0.700000 -0.062200 0.121900 0.504000 0.344000 0.784000 --0.677900 -0.100400 0.121900 0.528000 0.328000 0.776000 --0.700000 -0.100400 0.138900 0.488000 0.288000 0.816000 --0.650000 -0.141800 0.121900 0.432000 0.328000 0.832000 --0.700000 -0.150600 0.164200 0.408000 0.248000 0.872000 --0.650000 -0.150600 0.126000 0.408000 0.336000 0.840000 --0.700000 -0.200800 0.182200 0.152000 0.072000 0.984000 --0.650000 -0.200800 0.153500 0.376000 0.280000 0.872000 --0.650000 -0.150600 0.126000 0.408000 0.336000 0.840000 --0.600000 -0.200800 0.130000 0.152000 0.560000 0.808000 --0.642900 -0.150600 0.121900 0.408000 0.352000 0.832000 --0.600000 -0.190600 0.121900 0.296000 0.496000 0.808000 --0.600000 -0.150600 0.080700 0.576000 0.424000 0.688000 --0.559300 -0.200800 0.121900 0.160000 0.720000 0.672000 --0.575700 -0.150600 0.060900 0.384000 0.664000 0.632000 --0.550000 -0.200800 0.118700 0.032000 0.784000 0.608000 --0.550000 -0.166800 0.060900 0.264000 0.816000 0.504000 --0.575700 -0.150600 0.060900 0.384000 0.664000 0.632000 --0.550000 -0.150600 0.029600 0.504000 0.688000 0.512000 --0.600000 -0.122400 0.060900 0.616000 0.400000 0.664000 --0.550000 -0.125000 0.000000 0.608000 0.616000 0.488000 --0.600000 -0.100400 0.044600 0.672000 0.336000 0.656000 --0.565600 -0.100400 0.000000 0.744000 0.440000 0.496000 --0.550000 -0.125000 0.000000 0.608000 0.616000 0.488000 --0.550000 -0.100400 -0.036900 0.792000 0.376000 0.464000 --0.550000 -0.100400 -0.036900 0.792000 0.376000 0.464000 --0.650000 -0.150600 0.126000 0.408000 0.336000 0.840000 --0.650000 -0.150600 0.126000 0.408000 0.336000 0.840000 --0.650000 -0.141800 0.121900 0.432000 0.328000 0.832000 --0.642900 -0.150600 0.121900 0.408000 0.352000 0.832000 --0.650000 -0.100400 0.096100 0.592000 0.288000 0.744000 --0.600000 -0.150600 0.080700 0.576000 0.424000 0.688000 --0.612900 -0.100400 0.060900 0.624000 0.376000 0.672000 --0.600000 -0.122400 0.060900 0.616000 0.400000 0.664000 --0.600000 -0.100400 0.044600 0.672000 0.336000 0.656000 --0.600000 -0.100400 0.044600 0.672000 0.336000 0.656000 --0.600000 -0.190600 0.121900 0.296000 0.496000 0.808000 --0.600000 -0.190600 0.121900 0.296000 0.496000 0.808000 --0.559300 -0.200800 0.121900 0.160000 0.720000 0.672000 --0.600000 -0.200800 0.130000 0.152000 0.560000 0.808000 --0.550000 -0.202900 0.121900 0.032000 0.728000 0.680000 --0.600000 -0.251000 0.177800 0.080000 0.520000 0.840000 --0.550000 -0.251000 0.173600 -0.016000 0.472000 0.872000 --0.550000 -0.251000 0.173600 -0.016000 0.472000 0.872000 --0.500000 -0.200800 0.127000 -0.088000 0.600000 0.784000 --0.500000 -0.200800 0.127000 -0.088000 0.600000 0.784000 --0.450000 -0.200800 0.150000 -0.304000 0.608000 0.720000 --0.500000 -0.196200 0.121900 -0.112000 0.784000 0.600000 --0.450000 -0.173700 0.121900 -0.368000 0.648000 0.656000 --0.500000 -0.166600 0.060900 -0.304000 0.832000 0.448000 --0.450000 -0.150600 0.089400 -0.440000 0.744000 0.496000 --0.472400 -0.150600 0.060900 -0.464000 0.768000 0.416000 --0.450000 -0.136300 0.060900 -0.512000 0.720000 0.448000 --0.500000 -0.150600 0.019400 -0.216000 0.856000 0.464000 --0.450000 -0.112700 0.000000 -0.520000 0.784000 0.320000 --0.500000 -0.141000 0.000000 -0.040000 0.880000 0.456000 --0.500000 -0.141000 0.000000 -0.040000 0.880000 0.456000 --0.500000 -0.200800 0.127000 -0.088000 0.600000 0.784000 --0.500000 -0.200800 0.127000 -0.088000 0.600000 0.784000 --0.500000 -0.249000 0.182900 -0.112000 0.656000 0.744000 --0.450000 -0.200800 0.150000 -0.304000 0.608000 0.720000 --0.450000 -0.233700 0.182900 -0.216000 0.472000 0.848000 --0.400000 -0.200800 0.179200 -0.200000 0.464000 0.856000 --0.400000 -0.206800 0.182900 -0.168000 0.424000 0.880000 --0.383500 -0.200800 0.182900 -0.152000 0.448000 0.872000 --0.400000 -0.200800 0.179200 -0.200000 0.464000 0.856000 --0.350000 -0.189600 0.182900 -0.288000 0.472000 0.824000 --0.400000 -0.150600 0.133500 -0.392000 0.600000 0.688000 --0.350000 -0.150600 0.151300 -0.584000 0.352000 0.720000 --0.350000 -0.189600 0.182900 -0.288000 0.472000 0.824000 --0.311100 -0.150600 0.182900 -0.424000 0.464000 0.768000 --0.311100 -0.150600 0.182900 -0.424000 0.464000 0.768000 --0.400000 -0.200800 0.179200 -0.200000 0.464000 0.856000 --0.400000 -0.200800 0.179200 -0.200000 0.464000 0.856000 --0.450000 -0.200800 0.150000 -0.304000 0.608000 0.720000 --0.400000 -0.150600 0.133500 -0.392000 0.600000 0.688000 --0.450000 -0.173700 0.121900 -0.368000 0.648000 0.656000 --0.414900 -0.150600 0.121900 -0.424000 0.616000 0.648000 --0.450000 -0.150600 0.089400 -0.440000 0.744000 0.496000 --0.450000 -0.150600 0.089400 -0.440000 0.744000 0.496000 --0.351400 -0.100400 0.121900 -0.608000 0.368000 0.696000 --0.351400 -0.100400 0.121900 -0.608000 0.368000 0.696000 --0.350000 -0.097900 0.121900 -0.560000 0.424000 0.704000 --0.350000 -0.100400 0.123500 -0.608000 0.328000 0.712000 --0.300000 -0.066800 0.121900 -0.280000 0.584000 0.752000 --0.300000 -0.100400 0.149000 -0.304000 0.432000 0.840000 --0.255700 -0.050200 0.121900 -0.192000 0.512000 0.832000 --0.250000 -0.100400 0.155000 0.480000 0.160000 0.856000 --0.250000 -0.050200 0.123600 0.200000 0.440000 0.864000 --0.250000 -0.050200 0.123600 0.200000 0.440000 0.864000 --0.369700 -0.301200 0.182900 0.552000 -0.328000 0.752000 --0.369700 -0.301200 0.182900 0.552000 -0.328000 0.752000 --0.350000 -0.276800 0.182900 0.600000 -0.432000 0.664000 --0.350000 -0.301200 0.167500 0.592000 -0.368000 0.712000 --0.350000 -0.301200 0.167500 0.592000 -0.368000 0.712000 --0.334800 -0.251000 0.182900 0.672000 -0.480000 0.552000 --0.334800 -0.251000 0.182900 0.672000 -0.480000 0.552000 --0.300000 -0.205800 0.182900 0.768000 -0.472000 0.416000 --0.300000 -0.251000 0.131000 0.632000 -0.616000 0.464000 --0.300000 -0.251000 0.131000 0.632000 -0.616000 0.464000 --0.300000 -0.251000 0.131000 0.632000 -0.616000 0.464000 --0.300000 -0.251000 0.131000 0.632000 -0.616000 0.464000 --0.294600 -0.251000 0.121900 0.616000 -0.600000 0.488000 --0.300000 -0.256400 0.121900 0.624000 -0.624000 0.456000 --0.300000 -0.256400 0.121900 0.624000 -0.624000 0.456000 -0.550000 0.331800 0.121900 -0.696000 0.536000 0.456000 -0.550000 0.331800 0.121900 -0.696000 0.536000 0.456000 -0.550000 0.301200 0.149100 -0.896000 -0.096000 0.416000 -0.538800 0.301200 0.121900 -0.912000 0.128000 0.376000 -0.538800 0.301200 0.121900 -0.912000 0.128000 0.376000 -0.548800 0.251000 0.121900 -0.912000 -0.176000 0.360000 -0.548800 0.251000 0.121900 -0.912000 -0.176000 0.360000 -0.550000 0.251000 0.125100 -0.872000 -0.184000 0.440000 -0.550000 0.246100 0.121900 -0.904000 -0.224000 0.352000 -0.586200 0.251000 0.182900 -0.672000 -0.144000 0.720000 -0.567500 0.200800 0.121900 -0.784000 -0.344000 0.504000 -0.600000 0.211800 0.182900 -0.672000 -0.280000 0.672000 -0.600000 0.200800 0.176700 -0.712000 -0.296000 0.624000 -0.604600 0.200800 0.182900 -0.672000 -0.288000 0.664000 -0.600000 0.150600 0.141200 -0.712000 -0.440000 0.536000 -0.641000 0.150600 0.182900 -0.528000 -0.464000 0.696000 -0.600000 0.134700 0.121900 -0.776000 -0.456000 0.424000 -0.650000 0.141000 0.182900 -0.512000 -0.488000 0.704000 -0.627900 0.100400 0.121900 -0.608000 -0.608000 0.504000 -0.650000 0.100400 0.150000 -0.536000 -0.592000 0.592000 -0.650000 0.080100 0.121900 -0.576000 -0.640000 0.496000 -0.685300 0.100400 0.182900 -0.504000 -0.560000 0.648000 -0.692100 0.050200 0.121900 -0.432000 -0.784000 0.424000 -0.700000 0.088000 0.182900 -0.464000 -0.608000 0.640000 -0.700000 0.050200 0.131500 -0.112000 -0.824000 0.544000 -0.750000 0.062100 0.182900 -0.416000 -0.632000 0.648000 -0.744700 0.050200 0.121900 0.096000 -0.864000 0.480000 -0.750000 0.050900 0.121900 0.096000 -0.792000 0.600000 -0.750000 0.050200 0.120200 -0.160000 -0.904000 0.376000 -0.751700 0.050200 0.121900 -0.392000 -0.816000 0.416000 -0.750000 0.031700 0.060900 -0.136000 -0.928000 0.336000 -0.800000 0.028400 0.121900 -0.376000 -0.808000 0.432000 -0.798100 0.000000 0.060900 -0.504000 -0.792000 0.312000 -0.800000 0.000000 0.064400 -0.576000 -0.736000 0.344000 -0.800000 -0.001000 0.060900 -0.584000 -0.776000 0.216000 -0.829700 0.000000 0.121900 -0.704000 -0.616000 0.344000 -0.843600 -0.050200 0.060900 -0.704000 -0.672000 0.184000 -0.850000 -0.029600 0.121900 -0.840000 -0.432000 0.312000 -0.850000 -0.050200 0.089500 -0.768000 -0.592000 0.216000 -0.857500 -0.050200 0.121900 -0.848000 -0.448000 0.272000 -0.850000 -0.056700 0.060900 -0.720000 -0.664000 0.176000 -0.892500 -0.100400 0.121900 -0.688000 -0.680000 0.240000 -0.881900 -0.100400 0.060900 -0.752000 -0.632000 0.152000 -0.850000 -0.056700 0.060900 -0.720000 -0.664000 0.176000 -0.873300 -0.100400 0.000000 -0.752000 -0.632000 0.120000 -0.850000 -0.068700 0.000000 -0.752000 -0.640000 0.136000 -0.865600 -0.100400 -0.060900 -0.776000 -0.616000 0.120000 -0.850000 -0.079400 -0.060900 -0.768000 -0.616000 0.120000 -0.858300 -0.100400 -0.121900 -0.792000 -0.600000 0.056000 -0.850000 -0.088400 -0.121900 -0.808000 -0.584000 0.016000 -0.858100 -0.100400 -0.182900 -0.824000 -0.552000 0.000000 -0.850000 -0.086900 -0.182900 -0.848000 -0.512000 -0.048000 -0.860900 -0.100400 -0.243900 -0.856000 -0.496000 -0.072000 -0.850000 -0.077200 -0.243900 -0.824000 -0.432000 -0.344000 -0.869700 -0.100400 -0.304800 -0.880000 -0.248000 -0.400000 -0.850000 -0.050200 -0.276700 -0.784000 -0.280000 -0.544000 -0.867300 -0.050200 -0.304800 -0.784000 -0.136000 -0.600000 -0.850000 0.000000 -0.279000 -0.536000 0.488000 -0.680000 -0.877300 0.000000 -0.304800 -0.592000 0.480000 -0.632000 -0.877300 0.000000 -0.304800 -0.592000 0.480000 -0.632000 -0.600000 0.150600 0.141200 -0.712000 -0.440000 0.536000 -0.600000 0.150600 0.141200 -0.712000 -0.440000 0.536000 -0.600000 0.200800 0.176700 -0.712000 -0.296000 0.624000 -0.591100 0.150600 0.121900 -0.792000 -0.400000 0.440000 -0.567500 0.200800 0.121900 -0.784000 -0.344000 0.504000 -0.560700 0.150600 0.060900 -0.704000 -0.368000 0.592000 -0.550000 0.200800 0.086900 -0.880000 -0.256000 0.392000 -0.550000 0.174700 0.060900 -0.744000 -0.320000 0.576000 -0.538800 0.200800 0.060900 -0.824000 -0.216000 0.520000 -0.550000 0.150600 0.048400 -0.632000 -0.416000 0.640000 -0.500000 0.200800 0.008600 -0.576000 -0.176000 0.792000 -0.510200 0.150600 0.000000 -0.752000 -0.384000 0.520000 -0.500000 0.181600 0.000000 -0.600000 -0.304000 0.728000 -0.500000 0.150600 -0.020200 -0.704000 -0.472000 0.520000 -0.488800 0.200800 0.000000 -0.512000 0.024000 0.856000 -0.460500 0.150600 -0.060900 -0.624000 -0.512000 0.584000 -0.450000 0.200800 -0.035500 -0.536000 -0.264000 0.792000 -0.450000 0.163500 -0.060900 -0.600000 -0.504000 0.608000 -0.416500 0.200800 -0.060900 -0.560000 -0.352000 0.744000 -0.450000 0.150600 -0.075000 -0.616000 -0.488000 0.608000 -0.400000 0.200800 -0.077800 -0.600000 -0.432000 0.664000 -0.401900 0.150600 -0.121900 -0.864000 -0.496000 -0.024000 -0.400000 0.152400 -0.121900 -0.688000 -0.712000 -0.048000 -0.407800 0.150600 -0.182900 -0.544000 -0.240000 -0.800000 -0.400000 0.155900 -0.182900 -0.216000 -0.144000 -0.960000 -0.450000 0.150600 -0.187200 -0.088000 0.168000 -0.976000 -0.400000 0.200800 -0.189400 -0.152000 -0.072000 -0.984000 -0.450000 0.200800 -0.192400 -0.128000 -0.040000 -0.984000 -0.400000 0.251000 -0.186400 -0.152000 0.040000 -0.984000 -0.450000 0.251000 -0.188200 -0.104000 0.040000 -0.992000 -0.400000 0.301200 -0.184200 -0.016000 -0.016000 -0.992000 -0.450000 0.301200 -0.186200 0.000000 -0.016000 -0.992000 -0.400000 0.351500 -0.194500 0.000000 0.072000 -0.992000 -0.450000 0.351500 -0.196000 0.120000 0.128000 -0.976000 -0.400000 0.377300 -0.182900 0.016000 0.320000 -0.944000 -0.450000 0.373800 -0.182900 0.104000 0.432000 -0.888000 -0.400000 0.401700 -0.171200 0.088000 0.472000 -0.872000 -0.450000 0.401700 -0.160800 0.376000 0.656000 -0.640000 -0.400000 0.432800 -0.121900 0.160000 0.904000 -0.384000 -0.450000 0.422200 -0.121900 0.368000 0.832000 -0.392000 -0.400000 0.419800 -0.060900 0.080000 0.848000 0.520000 -0.450000 0.414500 -0.060900 0.192000 0.928000 0.304000 -0.400000 0.401700 -0.034800 -0.040000 0.584000 0.808000 -0.450000 0.401700 -0.038900 -0.120000 0.592000 0.784000 -0.400000 0.351500 -0.018700 -0.136000 -0.208000 0.960000 -0.450000 0.351500 -0.003200 -0.296000 0.344000 0.888000 -0.450000 0.401700 -0.038900 -0.120000 0.592000 0.784000 -0.458200 0.351500 0.000000 -0.280000 0.520000 0.800000 -0.500000 0.401700 -0.057700 0.096000 0.864000 0.480000 -0.500000 0.369100 0.000000 -0.184000 0.800000 0.552000 -0.517100 0.401700 -0.060900 0.080000 0.968000 0.224000 -0.550000 0.388900 0.000000 -0.392000 0.856000 0.320000 -0.550000 0.398000 -0.060900 0.000000 0.968000 -0.216000 -0.517100 0.401700 -0.060900 0.080000 0.968000 0.224000 -0.550000 0.362300 -0.121900 0.400000 0.656000 -0.632000 -0.500000 0.401700 -0.069300 0.168000 0.952000 -0.216000 -0.500000 0.393600 -0.121900 0.504000 0.744000 -0.432000 -0.488600 0.401700 -0.121900 0.504000 0.776000 -0.368000 -0.500000 0.355500 -0.182900 0.400000 0.616000 -0.664000 -0.450000 0.401700 -0.160800 0.376000 0.656000 -0.640000 -0.450000 0.373800 -0.182900 0.104000 0.432000 -0.888000 -0.500000 0.355500 -0.182900 0.400000 0.616000 -0.664000 -0.450000 0.351500 -0.196000 0.120000 0.128000 -0.976000 -0.500000 0.351500 -0.187300 0.416000 0.568000 -0.696000 -0.450000 0.301200 -0.186200 0.000000 -0.016000 -0.992000 -0.500000 0.301200 -0.193500 0.168000 0.072000 -0.976000 -0.450000 0.251000 -0.188200 -0.104000 0.040000 -0.992000 -0.500000 0.251000 -0.199400 0.072000 0.096000 -0.984000 -0.450000 0.200800 -0.192400 -0.128000 -0.040000 -0.984000 -0.500000 0.200800 -0.200200 -0.104000 -0.048000 -0.992000 -0.450000 0.150600 -0.187200 -0.088000 0.168000 -0.976000 -0.500000 0.150600 -0.194400 -0.208000 0.240000 -0.944000 -0.450000 0.100400 -0.233000 -0.008000 0.816000 -0.568000 -0.500000 0.100400 -0.210700 0.048000 0.704000 -0.704000 -0.450000 0.095300 -0.243900 -0.008000 0.856000 -0.512000 -0.500000 0.082500 -0.243900 0.216000 0.832000 -0.504000 -0.450000 0.055500 -0.304800 0.064000 0.864000 -0.496000 -0.500000 0.050200 -0.303800 0.264000 0.816000 -0.504000 -0.496000 0.050200 -0.304800 0.104000 0.800000 -0.576000 -0.500000 0.049600 -0.304800 0.264000 0.736000 -0.616000 -0.450000 0.050200 -0.314200 0.064000 0.744000 -0.656000 -0.500000 0.014000 -0.365800 0.216000 0.784000 -0.568000 -0.450000 0.007700 -0.365800 -0.264000 0.744000 -0.600000 -0.500000 0.000000 -0.393700 0.528000 0.072000 -0.840000 -0.450000 0.000000 -0.377000 -0.360000 0.400000 -0.840000 -0.500000 -0.027200 -0.365800 0.264000 -0.576000 -0.768000 -0.450000 -0.014200 -0.365800 -0.336000 -0.568000 -0.744000 -0.500000 -0.050200 -0.339600 -0.136000 -0.672000 -0.720000 -0.450000 -0.050200 -0.325200 -0.120000 -0.568000 -0.808000 -0.450000 -0.014200 -0.365800 -0.336000 -0.568000 -0.744000 -0.400000 -0.050200 -0.360800 0.184000 -0.432000 -0.872000 -0.431500 0.000000 -0.365800 -0.424000 0.312000 -0.840000 -0.400000 0.000000 -0.343200 -0.216000 0.592000 -0.768000 -0.450000 0.007700 -0.365800 -0.264000 0.744000 -0.600000 -0.400000 0.041200 -0.304800 -0.352000 0.672000 -0.648000 -0.450000 0.050200 -0.314200 0.064000 0.744000 -0.656000 -0.419200 0.050200 -0.304800 -0.224000 0.736000 -0.632000 -0.450000 0.055500 -0.304800 0.064000 0.864000 -0.496000 -0.400000 0.050200 -0.294000 -0.352000 0.672000 -0.640000 -0.450000 0.095300 -0.243900 -0.008000 0.856000 -0.512000 -0.400000 0.083700 -0.243900 -0.328000 0.768000 -0.536000 -0.450000 0.100400 -0.233000 -0.008000 0.816000 -0.568000 -0.400000 0.100400 -0.207800 -0.424000 0.688000 -0.576000 -0.450000 0.150600 -0.187200 -0.088000 0.168000 -0.976000 -0.400000 0.146600 -0.182900 -0.440000 0.464000 -0.760000 -0.407800 0.150600 -0.182900 -0.544000 -0.240000 -0.800000 -0.400000 0.100400 -0.150800 -0.768000 0.376000 0.512000 -0.401900 0.150600 -0.121900 -0.864000 -0.496000 -0.024000 -0.415000 0.100400 -0.121900 -0.640000 0.192000 0.736000 -0.450000 0.150600 -0.075000 -0.616000 -0.488000 0.608000 -0.450000 0.100400 -0.090700 -0.384000 -0.320000 0.856000 -0.460500 0.150600 -0.060900 -0.624000 -0.512000 0.584000 -0.500000 0.100400 -0.067100 -0.632000 -0.296000 0.704000 -0.500000 0.107000 -0.060900 -0.608000 -0.480000 0.616000 -0.504600 0.100400 -0.060900 -0.704000 -0.248000 0.656000 -0.500000 0.150600 -0.020200 -0.704000 -0.472000 0.520000 -0.550000 0.100400 -0.005700 -0.672000 -0.576000 0.448000 -0.510200 0.150600 0.000000 -0.752000 -0.384000 0.520000 -0.550000 0.104000 0.000000 -0.664000 -0.568000 0.464000 -0.550000 0.150600 0.048400 -0.632000 -0.416000 0.640000 -0.553100 0.100400 0.000000 -0.664000 -0.576000 0.464000 -0.560700 0.150600 0.060900 -0.704000 -0.368000 0.592000 -0.593200 0.100400 0.060900 -0.640000 -0.584000 0.496000 -0.591100 0.150600 0.121900 -0.792000 -0.400000 0.440000 -0.600000 0.100400 0.071800 -0.648000 -0.592000 0.472000 -0.600000 0.134700 0.121900 -0.776000 -0.456000 0.424000 -0.627900 0.100400 0.121900 -0.608000 -0.608000 0.504000 -0.600000 0.100400 0.071800 -0.648000 -0.592000 0.472000 -0.650000 0.080100 0.121900 -0.576000 -0.640000 0.496000 -0.600000 0.093600 0.060900 -0.624000 -0.616000 0.464000 -0.650000 0.050200 0.073400 -0.576000 -0.624000 0.512000 -0.641200 0.050200 0.060900 -0.600000 -0.608000 0.512000 -0.650000 0.041800 0.060900 -0.568000 -0.648000 0.504000 -0.602900 0.050200 0.000000 -0.576000 -0.704000 0.400000 -0.650000 0.013100 0.000000 -0.448000 -0.792000 0.392000 -0.600000 0.050200 -0.005300 -0.440000 -0.752000 0.480000 -0.650000 0.000000 -0.040500 0.104000 -0.944000 0.296000 -0.600000 0.000000 -0.044900 -0.016000 -0.720000 0.688000 -0.650000 -0.010200 -0.060900 0.168000 -0.784000 0.592000 -0.600000 -0.012300 -0.060900 0.104000 -0.576000 0.800000 -0.650000 -0.033500 -0.121900 0.512000 -0.672000 0.520000 -0.600000 -0.050200 -0.088500 0.448000 -0.400000 0.792000 -0.638000 -0.050200 -0.121900 0.800000 -0.536000 0.256000 -0.600000 -0.100400 -0.077400 0.584000 0.048000 0.800000 -0.626600 -0.100400 -0.121900 0.848000 0.208000 0.472000 -0.638000 -0.050200 -0.121900 0.800000 -0.536000 0.256000 -0.638900 -0.100400 -0.182900 0.920000 0.368000 0.072000 -0.649100 -0.050200 -0.182900 0.816000 -0.544000 0.144000 -0.637300 -0.100400 -0.243900 0.848000 0.016000 -0.520000 -0.637200 -0.050200 -0.243900 0.840000 -0.080000 -0.528000 -0.604900 -0.100400 -0.304800 0.744000 -0.360000 -0.552000 -0.600000 -0.050200 -0.286000 0.712000 0.144000 -0.680000 -0.600000 -0.086300 -0.304800 0.440000 0.312000 -0.832000 -0.587300 -0.050200 -0.304800 0.688000 0.056000 -0.712000 -0.589400 -0.100400 -0.304800 -0.440000 -0.424000 -0.784000 -0.550000 -0.083700 -0.304800 0.088000 -0.736000 -0.664000 -0.550000 -0.100400 -0.280800 -0.008000 -0.528000 -0.840000 -0.500000 -0.082600 -0.304800 0.216000 -0.680000 -0.688000 -0.500000 -0.100400 -0.277800 0.560000 -0.104000 -0.816000 -0.475800 -0.100400 -0.304800 0.512000 -0.104000 -0.848000 -0.500000 -0.127100 -0.304800 0.480000 0.456000 -0.744000 -0.500000 -0.100400 -0.277800 0.560000 -0.104000 -0.816000 -0.523400 -0.150600 -0.304800 0.376000 0.592000 -0.704000 -0.550000 -0.100400 -0.280800 -0.008000 -0.528000 -0.840000 -0.550000 -0.150600 -0.287800 0.352000 0.528000 -0.768000 -0.589400 -0.100400 -0.304800 -0.440000 -0.424000 -0.784000 -0.600000 -0.150600 -0.265200 0.248000 0.032000 -0.960000 -0.600000 -0.105700 -0.304800 0.312000 -0.728000 -0.600000 -0.650000 -0.150600 -0.274900 0.544000 0.464000 -0.688000 -0.604900 -0.100400 -0.304800 0.744000 -0.360000 -0.552000 -0.650000 -0.120200 -0.243900 0.704000 0.520000 -0.472000 -0.637300 -0.100400 -0.243900 0.848000 0.016000 -0.520000 -0.650000 -0.117900 -0.182900 0.792000 0.600000 0.024000 -0.638900 -0.100400 -0.182900 0.920000 0.368000 0.072000 -0.650000 -0.146100 -0.121900 0.720000 0.504000 0.464000 -0.626600 -0.100400 -0.121900 0.848000 0.208000 0.472000 -0.626600 -0.100400 -0.121900 0.848000 0.208000 0.472000 -0.591100 0.150600 0.121900 -0.792000 -0.400000 0.440000 -0.591100 0.150600 0.121900 -0.792000 -0.400000 0.440000 -0.600000 0.150600 0.141200 -0.712000 -0.440000 0.536000 -0.600000 0.134700 0.121900 -0.776000 -0.456000 0.424000 -0.600000 0.134700 0.121900 -0.776000 -0.456000 0.424000 -0.650000 0.141000 0.182900 -0.512000 -0.488000 0.704000 -0.650000 0.141000 0.182900 -0.512000 -0.488000 0.704000 -0.685300 0.100400 0.182900 -0.504000 -0.560000 0.648000 -0.650000 0.100400 0.150000 -0.536000 -0.592000 0.592000 -0.650000 0.100400 0.150000 -0.536000 -0.592000 0.592000 -0.692100 0.050200 0.121900 -0.432000 -0.784000 0.424000 -0.692100 0.050200 0.121900 -0.432000 -0.784000 0.424000 -0.700000 0.050200 0.131500 -0.112000 -0.824000 0.544000 -0.700000 0.046100 0.121900 -0.152000 -0.904000 0.376000 -0.744700 0.050200 0.121900 0.096000 -0.864000 0.480000 -0.700000 0.026800 0.060900 -0.288000 -0.896000 0.328000 -0.750000 0.050200 0.120200 -0.160000 -0.904000 0.376000 -0.750000 0.031700 0.060900 -0.136000 -0.928000 0.336000 -0.700000 0.026800 0.060900 -0.288000 -0.896000 0.328000 -0.750000 0.013300 0.000000 -0.240000 -0.936000 0.240000 -0.700000 0.012000 0.000000 -0.032000 -0.960000 0.272000 -0.750000 0.001600 -0.060900 -0.416000 -0.904000 -0.016000 -0.700000 0.001400 -0.060900 0.088000 -0.968000 0.192000 -0.750000 0.004300 -0.121900 -0.408000 -0.880000 -0.216000 -0.700000 0.000400 -0.121900 0.224000 -0.968000 0.032000 -0.750000 0.019900 -0.182900 -0.176000 -0.792000 -0.576000 -0.700000 0.009000 -0.182900 0.456000 -0.744000 -0.472000 -0.750000 0.050200 -0.223600 -0.168000 -0.552000 -0.808000 -0.700000 0.050200 -0.225700 0.368000 -0.368000 -0.848000 -0.750000 0.100400 -0.218500 0.200000 0.232000 -0.944000 -0.700000 0.100400 -0.234000 0.272000 0.000000 -0.960000 -0.750000 0.150600 -0.191500 0.256000 0.656000 -0.704000 -0.700000 0.150600 -0.210500 0.296000 0.424000 -0.848000 -0.750000 0.157000 -0.182900 0.280000 0.720000 -0.624000 -0.700000 0.190400 -0.182900 0.432000 0.560000 -0.696000 -0.750000 0.186400 -0.121900 0.504000 0.648000 -0.560000 -0.700000 0.200800 -0.171600 0.480000 0.608000 -0.616000 -0.734900 0.200800 -0.121900 0.552000 0.608000 -0.552000 -0.700000 0.229200 -0.121900 0.528000 0.656000 -0.528000 -0.750000 0.200800 -0.104400 0.480000 0.680000 -0.544000 -0.700000 0.251000 -0.093200 0.552000 0.600000 -0.568000 -0.750000 0.228900 -0.060900 0.576000 0.696000 -0.416000 -0.725300 0.251000 -0.060900 0.696000 0.648000 -0.288000 -0.750000 0.219200 0.000000 0.672000 0.728000 0.080000 -0.721000 0.251000 0.000000 0.784000 0.608000 -0.040000 -0.750000 0.222200 0.060900 0.704000 0.696000 -0.080000 -0.727500 0.251000 0.060900 0.792000 0.584000 -0.112000 -0.750000 0.233400 0.121900 0.720000 0.680000 -0.080000 -0.736800 0.251000 0.121900 0.752000 0.632000 0.144000 -0.727500 0.251000 0.060900 0.792000 0.584000 -0.112000 -0.700000 0.297800 0.121900 0.728000 0.680000 -0.032000 -0.700000 0.290800 0.060900 0.800000 0.576000 -0.104000 -0.696500 0.301200 0.121900 0.712000 0.672000 0.168000 -0.692400 0.301200 0.060900 0.752000 0.648000 -0.056000 -0.653800 0.351500 0.121900 0.656000 0.616000 0.424000 -0.663900 0.351500 0.060900 0.768000 0.624000 0.096000 -0.650000 0.355500 0.121900 0.632000 0.632000 0.432000 -0.650000 0.370100 0.060900 0.776000 0.624000 0.048000 -0.600000 0.382600 0.121900 0.272000 0.776000 0.560000 -0.612200 0.401700 0.060900 0.488000 0.832000 0.224000 -0.600000 0.401700 0.085900 0.096000 0.928000 0.336000 -0.600000 0.407100 0.060900 0.120000 0.968000 0.184000 -0.584600 0.401700 0.060900 -0.416000 0.872000 0.248000 -0.600000 0.410900 0.000000 0.104000 0.992000 -0.032000 -0.568400 0.401700 0.000000 -0.472000 0.832000 -0.264000 -0.600000 0.401700 -0.057700 0.168000 0.920000 -0.344000 -0.600000 0.410900 0.000000 0.104000 0.992000 -0.032000 -0.616700 0.401700 0.000000 0.496000 0.864000 -0.032000 -0.600000 0.407100 0.060900 0.120000 0.968000 0.184000 -0.612200 0.401700 0.060900 0.488000 0.832000 0.224000 -0.616700 0.401700 0.000000 0.496000 0.864000 -0.032000 -0.650000 0.370100 0.060900 0.776000 0.624000 0.048000 -0.650000 0.368200 0.000000 0.792000 0.584000 -0.144000 -0.663900 0.351500 0.060900 0.768000 0.624000 0.096000 -0.660900 0.351500 0.000000 0.832000 0.512000 -0.176000 -0.692400 0.301200 0.060900 0.752000 0.648000 -0.056000 -0.685300 0.301200 0.000000 0.832000 0.536000 -0.104000 -0.700000 0.290800 0.060900 0.800000 0.576000 -0.104000 -0.700000 0.279600 0.000000 0.792000 0.600000 -0.048000 -0.727500 0.251000 0.060900 0.792000 0.584000 -0.112000 -0.721000 0.251000 0.000000 0.784000 0.608000 -0.040000 -0.700000 0.279600 0.000000 0.792000 0.600000 -0.048000 -0.725300 0.251000 -0.060900 0.696000 0.648000 -0.288000 -0.700000 0.278700 -0.060900 0.648000 0.584000 -0.472000 -0.700000 0.251000 -0.093200 0.552000 0.600000 -0.568000 -0.680100 0.301200 -0.060900 0.752000 0.544000 -0.368000 -0.673000 0.251000 -0.121900 0.568000 0.576000 -0.584000 -0.650000 0.301200 -0.100800 0.528000 0.504000 -0.672000 -0.650000 0.278000 -0.121900 0.448000 0.624000 -0.624000 -0.608400 0.301200 -0.121900 0.448000 0.488000 -0.744000 -0.650000 0.251000 -0.154700 0.488000 0.640000 -0.584000 -0.600000 0.301200 -0.128700 0.472000 0.520000 -0.704000 -0.608400 0.251000 -0.182900 0.328000 0.488000 -0.800000 -0.600000 0.256700 -0.182900 0.328000 0.496000 -0.792000 -0.600000 0.251000 -0.187000 0.320000 0.456000 -0.816000 -0.608400 0.251000 -0.182900 0.328000 0.488000 -0.800000 -0.600000 0.200800 -0.209200 0.248000 0.288000 -0.920000 -0.650000 0.227800 -0.182900 0.368000 0.576000 -0.720000 -0.650000 0.200800 -0.204000 0.272000 0.408000 -0.864000 -0.687200 0.200800 -0.182900 0.432000 0.544000 -0.712000 -0.650000 0.150600 -0.219600 0.200000 0.280000 -0.928000 -0.700000 0.190400 -0.182900 0.432000 0.560000 -0.696000 -0.700000 0.150600 -0.210500 0.296000 0.424000 -0.848000 -0.650000 0.150600 -0.219600 0.200000 0.280000 -0.928000 -0.700000 0.100400 -0.234000 0.272000 0.000000 -0.960000 -0.650000 0.100400 -0.241400 0.232000 0.064000 -0.968000 -0.700000 0.050200 -0.225700 0.368000 -0.368000 -0.848000 -0.650000 0.067400 -0.243900 0.208000 0.056000 -0.968000 -0.653800 0.050200 -0.243900 0.232000 0.032000 -0.968000 -0.650000 0.050200 -0.244900 0.216000 0.040000 -0.968000 -0.653800 0.000000 -0.243900 0.576000 -0.112000 -0.808000 -0.650000 0.000000 -0.248500 0.680000 -0.160000 -0.712000 -0.650000 -0.016900 -0.243900 0.704000 -0.184000 -0.672000 -0.600000 0.000000 -0.284600 0.512000 0.112000 -0.840000 -0.637200 -0.050200 -0.243900 0.840000 -0.080000 -0.528000 -0.600000 -0.050200 -0.286000 0.712000 0.144000 -0.680000 -0.600000 0.000000 -0.284600 0.512000 0.112000 -0.840000 -0.587300 -0.050200 -0.304800 0.688000 0.056000 -0.712000 -0.578400 0.000000 -0.304800 0.536000 0.480000 -0.688000 -0.578400 0.000000 -0.304800 0.536000 0.480000 -0.688000 -0.750000 0.062100 0.182900 -0.416000 -0.632000 0.648000 -0.750000 0.062100 0.182900 -0.416000 -0.632000 0.648000 -0.750000 0.050900 0.121900 0.096000 -0.792000 0.600000 -0.762700 0.050200 0.182900 -0.512000 -0.672000 0.520000 -0.751700 0.050200 0.121900 -0.392000 -0.816000 0.416000 -0.800000 0.035400 0.182900 -0.432000 -0.808000 0.384000 -0.800000 0.028400 0.121900 -0.376000 -0.808000 0.432000 -0.846600 0.000000 0.182900 -0.736000 -0.616000 0.264000 -0.829700 0.000000 0.121900 -0.704000 -0.616000 0.344000 -0.850000 -0.004200 0.182900 -0.720000 -0.616000 0.288000 -0.850000 -0.029600 0.121900 -0.840000 -0.432000 0.312000 -0.880500 -0.050200 0.182900 -0.744000 -0.528000 0.384000 -0.857500 -0.050200 0.121900 -0.848000 -0.448000 0.272000 -0.900000 -0.076800 0.182900 -0.504000 -0.624000 0.592000 -0.892500 -0.100400 0.121900 -0.688000 -0.680000 0.240000 -0.900000 -0.100400 0.145900 -0.608000 -0.728000 0.304000 -0.900000 -0.076800 0.182900 -0.504000 -0.624000 0.592000 -0.934300 -0.100400 0.182900 -0.392000 -0.752000 0.520000 -0.934300 -0.100400 0.182900 -0.392000 -0.752000 0.520000 -0.800000 0.150600 0.181400 0.520000 0.336000 0.776000 -0.800000 0.150600 0.181400 0.520000 0.336000 0.776000 -0.850000 0.150600 0.126500 0.640000 0.560000 0.512000 -0.800000 0.190400 0.121900 0.624000 0.752000 0.168000 -0.850000 0.151600 0.121900 0.680000 0.720000 0.080000 -0.800000 0.182100 0.060900 0.560000 0.824000 -0.024000 -0.850000 0.154700 0.060900 0.576000 0.800000 0.096000 -0.800000 0.184600 0.000000 0.464000 0.872000 0.120000 -0.850000 0.161100 0.000000 0.480000 0.856000 0.160000 -0.800000 0.194300 -0.060900 0.416000 0.824000 -0.360000 -0.850000 0.171300 -0.060900 0.448000 0.864000 -0.216000 -0.800000 0.164900 -0.121900 0.312000 0.800000 -0.504000 -0.850000 0.155600 -0.121900 0.432000 0.856000 -0.272000 -0.800000 0.150600 -0.164100 0.256000 0.800000 -0.528000 -0.850000 0.150600 -0.140900 0.432000 0.840000 -0.304000 -0.800000 0.138600 -0.182900 0.232000 0.712000 -0.656000 -0.850000 0.127100 -0.182900 0.192000 0.744000 -0.632000 -0.800000 0.100400 -0.216300 0.104000 0.416000 -0.896000 -0.850000 0.100400 -0.218500 0.128000 0.592000 -0.784000 -0.800000 0.050200 -0.233400 -0.176000 0.416000 -0.880000 -0.850000 0.050200 -0.237100 -0.376000 0.576000 -0.720000 -0.800000 0.000000 -0.217200 -0.656000 -0.464000 -0.584000 -0.850000 0.042400 -0.243900 -0.408000 0.528000 -0.736000 -0.819700 0.000000 -0.243900 -0.752000 -0.192000 -0.616000 -0.850000 0.000000 -0.279000 -0.536000 0.488000 -0.680000 -0.835300 -0.050200 -0.243900 -0.840000 -0.416000 -0.336000 -0.850000 -0.050200 -0.276700 -0.784000 -0.280000 -0.544000 -0.850000 -0.077200 -0.243900 -0.824000 -0.432000 -0.344000 -0.835300 -0.050200 -0.243900 -0.840000 -0.416000 -0.336000 -0.850000 -0.086900 -0.182900 -0.848000 -0.512000 -0.048000 -0.822900 -0.050200 -0.182900 -0.792000 -0.592000 -0.088000 -0.850000 -0.088400 -0.121900 -0.808000 -0.584000 0.016000 -0.818400 -0.050200 -0.121900 -0.760000 -0.640000 0.016000 -0.850000 -0.079400 -0.060900 -0.768000 -0.616000 0.120000 -0.823600 -0.050200 -0.060900 -0.736000 -0.664000 0.112000 -0.850000 -0.068700 0.000000 -0.752000 -0.640000 0.136000 -0.832800 -0.050200 0.000000 -0.728000 -0.656000 0.144000 -0.850000 -0.056700 0.060900 -0.720000 -0.664000 0.176000 -0.843600 -0.050200 0.060900 -0.704000 -0.672000 0.184000 -0.850000 -0.050200 0.089500 -0.768000 -0.592000 0.216000 -0.850000 -0.050200 0.089500 -0.768000 -0.592000 0.216000 -0.850000 0.150600 0.126500 0.640000 0.560000 0.512000 -0.850000 0.150600 0.126500 0.640000 0.560000 0.512000 -0.850000 0.151600 0.121900 0.680000 0.720000 0.080000 -0.850900 0.150600 0.121900 0.704000 0.704000 0.080000 -0.850000 0.154700 0.060900 0.576000 0.800000 0.096000 -0.855400 0.150600 0.060900 0.680000 0.720000 0.072000 -0.850000 0.161100 0.000000 0.480000 0.856000 0.160000 -0.867700 0.150600 0.000000 0.552000 0.816000 0.152000 -0.850000 0.171300 -0.060900 0.448000 0.864000 -0.216000 -0.888500 0.150600 -0.060900 0.504000 0.856000 -0.040000 -0.850000 0.155600 -0.121900 0.432000 0.856000 -0.272000 -0.859300 0.150600 -0.121900 0.456000 0.840000 -0.272000 -0.850000 0.150600 -0.140900 0.432000 0.840000 -0.304000 -0.850000 0.150600 -0.140900 0.432000 0.840000 -0.304000 -0.891700 0.100400 0.182900 0.576000 0.688000 0.424000 -0.891700 0.100400 0.182900 0.576000 0.688000 0.424000 -0.900000 0.100400 0.165200 0.584000 0.744000 0.296000 -0.900000 0.093100 0.182900 0.568000 0.672000 0.464000 -0.911800 0.100400 0.121900 0.528000 0.800000 0.264000 -0.940200 0.050200 0.182900 0.624000 0.528000 0.568000 -0.950000 0.069700 0.121900 0.360000 0.840000 0.384000 -0.950000 0.050200 0.169400 0.600000 0.560000 0.560000 -1.000000 0.053600 0.121900 0.280000 0.872000 0.392000 -1.000000 0.050200 0.131000 0.336000 0.784000 0.512000 -0.950000 0.050200 0.169400 0.600000 0.560000 0.560000 -1.000000 0.004900 0.182900 0.336000 0.520000 0.776000 -0.950000 0.037400 0.182900 0.520000 0.504000 0.680000 -0.950000 0.050200 0.169400 0.600000 0.560000 0.560000 -0.940200 0.050200 0.182900 0.624000 0.528000 0.568000 -0.940200 0.050200 0.182900 0.624000 0.528000 0.568000 -0.900000 0.100400 0.165200 0.584000 0.744000 0.296000 -0.900000 0.100400 0.165200 0.584000 0.744000 0.296000 -0.900000 0.107300 0.121900 0.512000 0.832000 0.184000 -0.911800 0.100400 0.121900 0.528000 0.800000 0.264000 -0.900000 0.118900 0.060900 0.472000 0.856000 0.184000 -0.936800 0.100400 0.060900 0.456000 0.872000 0.168000 -0.900000 0.131100 0.000000 0.480000 0.848000 0.192000 -0.950000 0.100400 0.012800 0.496000 0.848000 0.136000 -0.950000 0.102000 0.000000 0.472000 0.864000 0.120000 -0.952900 0.100400 0.000000 0.504000 0.848000 0.120000 -0.950000 0.106300 -0.060900 0.576000 0.776000 -0.240000 -0.957800 0.100400 -0.060900 0.544000 0.824000 -0.120000 -0.950000 0.100400 -0.078300 0.560000 0.768000 -0.304000 -1.000000 0.074600 -0.060900 0.496000 0.816000 -0.280000 -0.950000 0.086300 -0.121900 0.544000 0.784000 -0.280000 -1.000000 0.056100 -0.121900 0.488000 0.808000 -0.304000 -0.950000 0.069900 -0.182900 0.544000 0.736000 -0.392000 -1.000000 0.050200 -0.141200 0.512000 0.792000 -0.320000 -0.978000 0.050200 -0.182900 0.512000 0.768000 -0.376000 -1.000000 0.035800 -0.182900 0.504000 0.768000 -0.376000 -0.950000 0.050200 -0.224500 0.472000 0.712000 -0.504000 -1.000000 0.004200 -0.243900 0.464000 0.680000 -0.552000 -0.950000 0.037500 -0.243900 0.432000 0.688000 -0.576000 -1.000000 0.000000 -0.249700 0.512000 0.464000 -0.720000 -0.950000 0.000000 -0.291100 0.424000 0.536000 -0.720000 -1.000000 -0.050200 -0.288900 0.520000 0.432000 -0.728000 -0.950000 -0.016600 -0.304800 0.448000 0.520000 -0.720000 -0.981700 -0.050200 -0.304800 0.528000 0.432000 -0.720000 -0.950000 -0.050200 -0.338500 0.440000 0.400000 -0.800000 -1.000000 -0.073100 -0.304800 0.536000 0.424000 -0.720000 -0.950000 -0.100400 -0.351000 0.336000 0.064000 -0.936000 -1.000000 -0.100400 -0.325200 0.488000 0.344000 -0.792000 -0.950000 -0.150600 -0.345500 -0.032000 0.064000 -0.992000 -1.000000 -0.150600 -0.335800 0.136000 0.136000 -0.976000 -0.950000 -0.200800 -0.357000 -0.272000 -0.104000 -0.952000 -1.000000 -0.200800 -0.338800 0.136000 -0.384000 -0.904000 -0.950000 -0.251000 -0.328200 -0.712000 -0.568000 -0.392000 -1.000000 -0.251000 -0.355700 -0.816000 -0.248000 -0.504000 -1.000000 -0.251000 -0.355700 -0.816000 -0.248000 -0.504000 -1.000000 -0.012000 0.182900 0.384000 -0.248000 0.880000 -1.000000 -0.012000 0.182900 0.384000 -0.248000 0.880000 -1.000000 -0.050200 0.168100 0.416000 -0.344000 0.832000 -0.975800 -0.050200 0.182900 0.464000 -0.232000 0.848000 -1.000000 -0.100400 0.134700 0.432000 -0.528000 0.720000 -0.959000 -0.100400 0.182900 0.616000 -0.584000 0.520000 -0.959000 -0.100400 0.182900 0.616000 -0.584000 0.520000 --0.900000 0.200800 0.074800 0.296000 0.712000 0.624000 --0.900000 0.200800 0.074800 0.296000 0.712000 0.624000 --0.900000 0.210300 0.060900 0.312000 0.744000 0.576000 --0.879600 0.200800 0.060900 0.352000 0.712000 0.600000 --0.900000 0.240500 0.000000 0.368000 0.840000 0.376000 --0.850000 0.200800 0.035600 0.384000 0.744000 0.536000 --0.850000 0.219100 0.000000 0.368000 0.824000 0.424000 --0.811000 0.200800 0.000000 0.408000 0.816000 0.392000 --0.811000 0.200800 0.000000 0.408000 0.816000 0.392000 --0.900000 -0.127600 0.121900 -0.608000 -0.704000 0.344000 --0.900000 -0.127600 0.121900 -0.608000 -0.704000 0.344000 --0.900000 -0.149700 0.060900 -0.696000 -0.664000 0.232000 --0.878400 -0.150600 0.121900 -0.736000 -0.560000 0.368000 --0.899200 -0.150600 0.060900 -0.816000 -0.504000 0.256000 --0.851500 -0.200800 0.121900 -0.832000 -0.360000 0.408000 --0.869300 -0.200800 0.060900 -0.824000 -0.496000 0.248000 --0.899200 -0.150600 0.060900 -0.816000 -0.504000 0.256000 --0.882700 -0.200800 0.000000 -0.840000 -0.496000 0.192000 --0.900000 -0.150600 0.057700 -0.744000 -0.616000 0.232000 --0.900000 -0.169600 0.000000 -0.800000 -0.552000 0.224000 --0.882700 -0.200800 0.000000 -0.840000 -0.496000 0.192000 --0.900000 -0.192500 -0.060900 -0.856000 -0.488000 0.144000 --0.895700 -0.200800 -0.060900 -0.864000 -0.480000 0.136000 --0.900000 -0.200800 -0.096200 -0.752000 -0.632000 0.128000 --0.860100 -0.251000 -0.060900 -0.808000 -0.568000 0.112000 --0.900000 -0.204500 -0.121900 -0.688000 -0.712000 0.104000 --0.866600 -0.251000 -0.121900 -0.808000 -0.576000 0.072000 --0.900000 -0.206900 -0.182900 -0.648000 -0.752000 0.056000 --0.864200 -0.251000 -0.182900 -0.800000 -0.592000 0.000000 --0.900000 -0.212400 -0.243900 -0.672000 -0.712000 0.176000 --0.869200 -0.251000 -0.243900 -0.768000 -0.600000 0.200000 --0.900000 -0.236500 -0.304800 -0.680000 -0.456000 -0.560000 --0.891700 -0.251000 -0.304800 -0.808000 -0.512000 -0.264000 --0.891700 -0.251000 -0.304800 -0.808000 -0.512000 -0.264000 --0.850000 0.184100 0.060900 0.376000 0.632000 0.664000 --0.850000 0.184100 0.060900 0.376000 0.632000 0.664000 --0.850000 0.150600 0.098600 0.360000 0.600000 0.704000 --0.800000 0.153700 0.060900 0.432000 0.632000 0.632000 --0.800000 0.150600 0.064100 0.424000 0.560000 0.704000 --0.796300 0.150600 0.060900 0.512000 0.584000 0.616000 --0.800000 0.153700 0.060900 0.432000 0.632000 0.632000 --0.750000 0.150600 0.014500 0.472000 0.624000 0.608000 --0.800000 0.195100 0.000000 0.456000 0.768000 0.432000 --0.750000 0.162200 0.000000 0.464000 0.672000 0.560000 --0.750000 0.150600 0.014500 0.472000 0.624000 0.608000 --0.734000 0.150600 0.000000 0.496000 0.640000 0.576000 --0.750000 0.162200 0.000000 0.464000 0.672000 0.560000 --0.700000 0.150600 -0.043600 0.552000 0.712000 0.424000 --0.750000 0.191300 -0.060900 0.496000 0.856000 0.072000 --0.700000 0.159000 -0.060900 0.600000 0.776000 0.184000 --0.750000 0.174400 -0.121900 0.448000 0.824000 -0.336000 --0.700000 0.150600 -0.089800 0.592000 0.744000 -0.280000 --0.715000 0.150600 -0.121900 0.512000 0.744000 -0.408000 --0.700000 0.140000 -0.121900 0.536000 0.728000 -0.408000 --0.750000 0.150600 -0.159200 0.432000 0.664000 -0.600000 --0.700000 0.100400 -0.182100 0.536000 0.592000 -0.592000 --0.750000 0.132600 -0.182900 0.408000 0.656000 -0.624000 --0.700900 0.100400 -0.182900 0.440000 0.608000 -0.648000 --0.750000 0.100400 -0.222000 0.432000 0.576000 -0.680000 --0.700000 0.099700 -0.182900 0.504000 0.560000 -0.640000 --0.750000 0.077000 -0.243900 0.368000 0.552000 -0.744000 --0.700000 0.050200 -0.235800 0.504000 0.432000 -0.744000 --0.711800 0.050200 -0.243900 0.416000 0.432000 -0.792000 --0.700000 0.037400 -0.243900 0.440000 0.392000 -0.800000 --0.750000 0.050200 -0.267100 0.368000 0.432000 -0.816000 --0.700000 0.000000 -0.262900 0.392000 0.288000 -0.864000 --0.750000 0.000000 -0.285200 0.328000 0.160000 -0.920000 --0.750000 0.000000 -0.285200 0.328000 0.160000 -0.920000 --0.750000 0.012900 0.121900 0.496000 0.384000 0.768000 --0.750000 0.012900 0.121900 0.496000 0.384000 0.768000 --0.781300 0.050200 0.121900 0.536000 0.400000 0.736000 --0.750000 0.050200 0.097600 0.464000 0.408000 0.776000 --0.750000 0.050200 0.097600 0.464000 0.408000 0.776000 --0.800000 -0.280700 0.121900 -0.736000 -0.528000 0.408000 --0.800000 -0.280700 0.121900 -0.736000 -0.528000 0.408000 --0.783300 -0.301200 0.121900 -0.688000 -0.568000 0.440000 --0.800000 -0.301200 0.085900 -0.768000 -0.544000 0.304000 --0.800000 -0.301200 0.085900 -0.768000 -0.544000 0.304000 --0.750000 -0.342500 0.121900 -0.536000 -0.592000 0.592000 --0.750000 -0.342500 0.121900 -0.536000 -0.592000 0.592000 --0.739400 -0.351500 0.121900 -0.528000 -0.576000 0.616000 --0.750000 -0.351500 0.110100 -0.600000 -0.584000 0.536000 --0.750000 -0.351500 0.110100 -0.600000 -0.584000 0.536000 --0.701000 -0.451900 0.060900 -0.792000 -0.480000 0.344000 --0.701000 -0.451900 0.060900 -0.792000 -0.480000 0.344000 --0.700000 -0.451900 0.063700 -0.672000 -0.600000 0.424000 --0.700000 -0.453200 0.060900 -0.560000 -0.720000 0.392000 --0.700000 -0.453200 0.060900 -0.560000 -0.720000 0.392000 --0.650000 -0.141800 0.121900 0.432000 0.328000 0.832000 --0.650000 -0.141800 0.121900 0.432000 0.328000 0.832000 --0.677900 -0.100400 0.121900 0.528000 0.328000 0.776000 --0.650000 -0.100400 0.096100 0.592000 0.288000 0.744000 --0.650000 -0.100400 0.096100 0.592000 0.288000 0.744000 --0.600000 -0.122400 0.060900 0.616000 0.400000 0.664000 --0.600000 -0.122400 0.060900 0.616000 0.400000 0.664000 --0.575700 -0.150600 0.060900 0.384000 0.664000 0.632000 --0.600000 -0.150600 0.080700 0.576000 0.424000 0.688000 --0.600000 -0.150600 0.080700 0.576000 0.424000 0.688000 --0.559300 -0.200800 0.121900 0.160000 0.720000 0.672000 --0.559300 -0.200800 0.121900 0.160000 0.720000 0.672000 --0.550000 -0.200800 0.118700 0.032000 0.784000 0.608000 --0.550000 -0.202900 0.121900 0.032000 0.728000 0.680000 --0.536800 -0.200800 0.121900 -0.104000 0.736000 0.664000 --0.536800 -0.200800 0.121900 -0.104000 0.736000 0.664000 --0.550000 -0.494000 0.121900 0.024000 -0.832000 0.536000 --0.550000 -0.494000 0.121900 0.024000 -0.832000 0.536000 --0.550000 -0.502100 0.104800 0.104000 -0.840000 0.520000 --0.500000 -0.486900 0.121900 0.296000 -0.800000 0.504000 --0.500000 -0.502100 0.088800 0.616000 -0.688000 0.376000 --0.450000 -0.453600 0.121900 0.584000 -0.744000 0.288000 --0.489100 -0.502100 0.060900 0.704000 -0.616000 0.328000 --0.450000 -0.471900 0.060900 0.592000 -0.752000 0.272000 --0.450000 -0.471900 0.060900 0.592000 -0.752000 0.272000 --0.550000 -0.502100 0.104800 0.104000 -0.840000 0.520000 --0.550000 -0.502100 0.104800 0.104000 -0.840000 0.520000 --0.550000 -0.532000 0.060900 0.080000 -0.776000 0.624000 --0.500000 -0.502100 0.088800 0.616000 -0.688000 0.376000 --0.500000 -0.517700 0.060900 0.632000 -0.632000 0.440000 --0.489100 -0.502100 0.060900 0.704000 -0.616000 0.328000 --0.489100 -0.502100 0.060900 0.704000 -0.616000 0.328000 --0.405500 -0.100400 0.060900 -0.712000 0.456000 0.520000 --0.405500 -0.100400 0.060900 -0.712000 0.456000 0.520000 --0.400000 -0.090100 0.060900 -0.696000 0.400000 0.584000 --0.400000 -0.100400 0.069600 -0.688000 0.456000 0.552000 --0.367400 -0.050200 0.060900 -0.696000 0.408000 0.584000 --0.351400 -0.100400 0.121900 -0.608000 0.368000 0.696000 --0.350000 -0.050200 0.083200 -0.416000 0.344000 0.832000 --0.350000 -0.097900 0.121900 -0.560000 0.424000 0.704000 --0.300000 -0.050200 0.104800 -0.312000 0.512000 0.792000 --0.300000 -0.066800 0.121900 -0.280000 0.584000 0.752000 --0.255700 -0.050200 0.121900 -0.192000 0.512000 0.832000 --0.255700 -0.050200 0.121900 -0.192000 0.512000 0.832000 --0.350000 -0.001900 0.060900 -0.656000 0.280000 0.688000 --0.350000 -0.001900 0.060900 -0.656000 0.280000 0.688000 --0.350000 -0.050200 0.083200 -0.416000 0.344000 0.832000 --0.367400 -0.050200 0.060900 -0.696000 0.408000 0.584000 --0.367400 -0.050200 0.060900 -0.696000 0.408000 0.584000 --0.351400 -0.100400 0.121900 -0.608000 0.368000 0.696000 --0.351400 -0.100400 0.121900 -0.608000 0.368000 0.696000 --0.400000 -0.140400 0.121900 -0.448000 0.624000 0.632000 --0.400000 -0.100400 0.069600 -0.688000 0.456000 0.552000 --0.400000 -0.100400 0.069600 -0.688000 0.456000 0.552000 --0.400000 -0.401700 0.111300 0.640000 -0.680000 0.336000 --0.400000 -0.401700 0.111300 0.640000 -0.680000 0.336000 --0.400000 -0.423000 0.060900 0.616000 -0.696000 0.360000 --0.350000 -0.401700 0.073400 0.632000 -0.688000 0.344000 --0.350000 -0.406300 0.060900 0.592000 -0.728000 0.320000 --0.344500 -0.401700 0.060900 0.632000 -0.688000 0.328000 --0.344500 -0.401700 0.060900 0.632000 -0.688000 0.328000 --0.348200 0.000000 0.060900 -0.376000 0.448000 0.800000 --0.348200 0.000000 0.060900 -0.376000 0.448000 0.800000 --0.300000 0.027200 0.060900 -0.160000 0.552000 0.808000 --0.300000 0.000000 0.088800 -0.240000 0.432000 0.864000 --0.250000 0.033500 0.060900 0.056000 0.528000 0.840000 --0.250000 0.000000 0.079500 -0.144000 0.552000 0.816000 --0.200000 0.020500 0.060900 0.664000 0.440000 0.600000 --0.200000 0.000000 0.081400 0.696000 0.336000 0.624000 --0.190300 0.000000 0.060900 0.816000 0.200000 0.536000 --0.200000 -0.050200 0.072600 0.688000 0.360000 0.624000 --0.193200 -0.050200 0.060900 0.808000 0.008000 0.584000 --0.200000 -0.100400 0.076800 0.784000 -0.136000 0.600000 --0.190200 -0.100400 0.060900 0.752000 -0.248000 0.600000 --0.200000 -0.121800 0.060900 0.728000 -0.328000 0.592000 --0.200000 -0.121800 0.060900 0.728000 -0.328000 0.592000 --0.250000 0.000000 0.079500 -0.144000 0.552000 0.816000 --0.250000 0.000000 0.079500 -0.144000 0.552000 0.816000 --0.200000 0.000000 0.081400 0.696000 0.336000 0.624000 --0.250000 -0.048000 0.121900 0.272000 0.640000 0.704000 --0.200000 -0.050200 0.072600 0.688000 0.360000 0.624000 --0.247100 -0.050200 0.121900 0.488000 0.512000 0.696000 --0.200000 -0.100400 0.076800 0.784000 -0.136000 0.600000 --0.230200 -0.100400 0.121900 0.776000 -0.176000 0.600000 --0.230200 -0.100400 0.121900 0.776000 -0.176000 0.600000 -0.550000 0.351500 0.078000 -0.616000 0.672000 0.392000 -0.550000 0.351500 0.078000 -0.616000 0.672000 0.392000 -0.540600 0.351500 0.060900 -0.584000 0.632000 0.496000 -0.550000 0.359900 0.060900 -0.592000 0.640000 0.480000 -0.500000 0.351500 0.029100 -0.680000 0.048000 0.728000 -0.550000 0.388900 0.000000 -0.392000 0.856000 0.320000 -0.500000 0.369100 0.000000 -0.184000 0.800000 0.552000 -0.500000 0.351500 0.029100 -0.680000 0.048000 0.728000 -0.458200 0.351500 0.000000 -0.280000 0.520000 0.800000 -0.458200 0.351500 0.000000 -0.280000 0.520000 0.800000 -0.550000 0.246100 0.121900 -0.904000 -0.224000 0.352000 -0.550000 0.246100 0.121900 -0.904000 -0.224000 0.352000 -0.550000 0.200800 0.086900 -0.880000 -0.256000 0.392000 -0.548800 0.251000 0.121900 -0.912000 -0.176000 0.360000 -0.538800 0.200800 0.060900 -0.824000 -0.216000 0.520000 -0.533200 0.251000 0.060900 -0.856000 0.032000 0.512000 -0.500000 0.200800 0.008600 -0.576000 -0.176000 0.792000 -0.500800 0.251000 0.000000 -0.792000 -0.016000 0.608000 -0.500000 0.245700 0.000000 -0.568000 0.120000 0.808000 -0.500000 0.251000 -0.000900 -0.496000 0.112000 0.856000 -0.488800 0.200800 0.000000 -0.512000 0.024000 0.856000 -0.450000 0.251000 -0.039600 -0.400000 -0.080000 0.904000 -0.450000 0.200800 -0.035500 -0.536000 -0.264000 0.792000 -0.400000 0.251000 -0.058700 -0.328000 -0.176000 0.920000 -0.416500 0.200800 -0.060900 -0.560000 -0.352000 0.744000 -0.400000 0.242400 -0.060900 -0.352000 -0.192000 0.904000 -0.400000 0.200800 -0.077800 -0.600000 -0.432000 0.664000 -0.395100 0.251000 -0.060900 -0.344000 -0.184000 0.912000 -0.366500 0.200800 -0.121900 -0.760000 -0.624000 0.168000 -0.350000 0.251000 -0.088400 -0.448000 -0.320000 0.824000 -0.350000 0.218900 -0.121900 -0.504000 -0.816000 0.264000 -0.300000 0.251000 -0.114600 -0.168000 -0.536000 0.824000 -0.300000 0.236900 -0.121900 -0.304000 -0.688000 0.640000 -0.271900 0.251000 -0.121900 -0.240000 -0.760000 0.592000 -0.300000 0.251000 -0.156100 -0.368000 -0.808000 -0.448000 -0.300000 0.236900 -0.121900 -0.304000 -0.688000 0.640000 -0.321900 0.251000 -0.182900 -0.240000 -0.296000 -0.920000 -0.350000 0.218900 -0.121900 -0.504000 -0.816000 0.264000 -0.350000 0.236900 -0.182900 -0.272000 -0.424000 -0.856000 -0.366500 0.200800 -0.121900 -0.760000 -0.624000 0.168000 -0.380800 0.200800 -0.182900 -0.440000 -0.264000 -0.856000 -0.400000 0.152400 -0.121900 -0.688000 -0.712000 -0.048000 -0.400000 0.155900 -0.182900 -0.216000 -0.144000 -0.960000 -0.380800 0.200800 -0.182900 -0.440000 -0.264000 -0.856000 -0.400000 0.200800 -0.189400 -0.152000 -0.072000 -0.984000 -0.350000 0.236900 -0.182900 -0.272000 -0.424000 -0.856000 -0.400000 0.251000 -0.186400 -0.152000 0.040000 -0.984000 -0.350000 0.251000 -0.187300 -0.168000 -0.184000 -0.960000 -0.400000 0.301200 -0.184200 -0.016000 -0.016000 -0.992000 -0.350000 0.301200 -0.184400 -0.056000 0.000000 -0.992000 -0.400000 0.351500 -0.194500 0.000000 0.072000 -0.992000 -0.350000 0.351500 -0.192800 0.000000 0.056000 -0.992000 -0.400000 0.377300 -0.182900 0.016000 0.320000 -0.944000 -0.350000 0.377400 -0.182900 0.000000 0.280000 -0.952000 -0.400000 0.401700 -0.171200 0.088000 0.472000 -0.872000 -0.350000 0.401700 -0.174600 0.056000 0.440000 -0.888000 -0.400000 0.432800 -0.121900 0.160000 0.904000 -0.384000 -0.350000 0.445000 -0.121900 0.208000 0.960000 -0.152000 -0.400000 0.419800 -0.060900 0.080000 0.848000 0.520000 -0.350000 0.424300 -0.060900 0.120000 0.824000 0.544000 -0.400000 0.401700 -0.034800 -0.040000 0.584000 0.808000 -0.350000 0.401700 -0.031000 0.032000 0.488000 0.864000 -0.400000 0.351500 -0.018700 -0.136000 -0.208000 0.960000 -0.350000 0.351500 -0.021800 0.032000 -0.048000 0.992000 -0.350000 0.401700 -0.031000 0.032000 0.488000 0.864000 -0.300000 0.351500 -0.009100 -0.016000 -0.144000 0.984000 -0.300000 0.401700 -0.022200 0.096000 0.472000 0.864000 -0.350000 0.401700 -0.031000 0.032000 0.488000 0.864000 -0.300000 0.430700 -0.060900 0.128000 0.808000 0.568000 -0.350000 0.424300 -0.060900 0.120000 0.824000 0.544000 -0.300000 0.451900 -0.106900 0.184000 0.864000 0.456000 -0.350000 0.445000 -0.121900 0.208000 0.960000 -0.152000 -0.323400 0.451900 -0.121900 0.248000 0.944000 -0.200000 -0.350000 0.401700 -0.174600 0.056000 0.440000 -0.888000 -0.300000 0.451900 -0.131100 0.200000 0.712000 -0.664000 -0.300000 0.401700 -0.174800 0.040000 0.368000 -0.920000 -0.350000 0.401700 -0.174600 0.056000 0.440000 -0.888000 -0.300000 0.379400 -0.182900 -0.016000 0.272000 -0.960000 -0.350000 0.377400 -0.182900 0.000000 0.280000 -0.952000 -0.300000 0.351500 -0.193900 -0.008000 0.064000 -0.992000 -0.350000 0.351500 -0.192800 0.000000 0.056000 -0.992000 -0.300000 0.301200 -0.184400 -0.064000 -0.072000 -0.992000 -0.350000 0.301200 -0.184400 -0.056000 0.000000 -0.992000 -0.300000 0.284000 -0.182900 -0.168000 -0.184000 -0.960000 -0.350000 0.251000 -0.187300 -0.168000 -0.184000 -0.960000 -0.321900 0.251000 -0.182900 -0.240000 -0.296000 -0.920000 -0.350000 0.236900 -0.182900 -0.272000 -0.424000 -0.856000 -0.350000 0.236900 -0.182900 -0.272000 -0.424000 -0.856000 -0.550000 0.246100 0.121900 -0.904000 -0.224000 0.352000 -0.550000 0.246100 0.121900 -0.904000 -0.224000 0.352000 -0.567500 0.200800 0.121900 -0.784000 -0.344000 0.504000 -0.550000 0.200800 0.086900 -0.880000 -0.256000 0.392000 -0.550000 0.200800 0.086900 -0.880000 -0.256000 0.392000 -0.600000 0.100400 0.071800 -0.648000 -0.592000 0.472000 -0.600000 0.100400 0.071800 -0.648000 -0.592000 0.472000 -0.600000 0.093600 0.060900 -0.624000 -0.616000 0.464000 -0.593200 0.100400 0.060900 -0.640000 -0.584000 0.496000 -0.600000 0.053300 0.000000 -0.472000 -0.712000 0.512000 -0.553100 0.100400 0.000000 -0.664000 -0.576000 0.464000 -0.600000 0.050200 -0.005300 -0.440000 -0.752000 0.480000 -0.550000 0.100400 -0.005700 -0.672000 -0.576000 0.448000 -0.550000 0.050200 -0.037800 -0.320000 -0.688000 0.640000 -0.504600 0.100400 -0.060900 -0.704000 -0.248000 0.656000 -0.500000 0.050200 -0.057700 -0.560000 0.128000 0.816000 -0.500000 0.067400 -0.060900 -0.592000 0.120000 0.792000 -0.495100 0.050200 -0.060900 -0.456000 0.136000 0.872000 -0.500000 0.100400 -0.067100 -0.632000 -0.296000 0.704000 -0.450000 0.050200 -0.077000 -0.360000 0.120000 0.920000 -0.450000 0.100400 -0.090700 -0.384000 -0.320000 0.856000 -0.400000 0.050200 -0.114800 -0.552000 0.256000 0.784000 -0.415000 0.100400 -0.121900 -0.640000 0.192000 0.736000 -0.400000 0.072600 -0.121900 -0.632000 0.256000 0.720000 -0.400000 0.100400 -0.150800 -0.768000 0.376000 0.512000 -0.393200 0.050200 -0.121900 -0.648000 0.352000 0.664000 -0.381500 0.100400 -0.182900 -0.896000 0.440000 -0.008000 -0.357200 0.050200 -0.182900 -0.736000 0.640000 0.184000 -0.400000 0.100400 -0.207800 -0.424000 0.688000 -0.576000 -0.351400 0.050200 -0.243900 -0.480000 0.768000 -0.416000 -0.400000 0.083700 -0.243900 -0.328000 0.768000 -0.536000 -0.400000 0.050200 -0.294000 -0.352000 0.672000 -0.640000 -0.351400 0.050200 -0.243900 -0.480000 0.768000 -0.416000 -0.400000 0.041200 -0.304800 -0.352000 0.672000 -0.648000 -0.350000 0.049300 -0.243900 -0.512000 0.784000 -0.320000 -0.350000 0.024300 -0.304800 -0.456000 0.784000 -0.408000 -0.300000 0.032100 -0.243900 -0.576000 0.680000 -0.432000 -0.301400 0.000000 -0.304800 -0.584000 0.656000 -0.464000 -0.300000 0.000000 -0.302400 -0.544000 0.608000 -0.568000 -0.300000 -0.003100 -0.304800 -0.376000 0.424000 -0.816000 -0.301400 0.000000 -0.304800 -0.584000 0.656000 -0.464000 -0.300000 -0.050200 -0.319900 -0.536000 0.224000 -0.808000 -0.350000 0.000000 -0.339100 -0.264000 0.552000 -0.784000 -0.342100 -0.050200 -0.365800 -0.640000 -0.104000 -0.752000 -0.350000 -0.037900 -0.365800 -0.440000 0.432000 -0.776000 -0.350000 -0.050200 -0.374000 -0.496000 -0.096000 -0.856000 -0.383500 -0.050200 -0.365800 0.200000 -0.288000 -0.928000 -0.350000 -0.059800 -0.365800 -0.280000 -0.560000 -0.768000 -0.400000 -0.050200 -0.360800 0.184000 -0.432000 -0.872000 -0.350000 -0.100400 -0.331300 -0.432000 -0.520000 -0.728000 -0.400000 -0.100400 -0.340000 -0.040000 -0.360000 -0.928000 -0.350000 -0.127600 -0.304800 0.032000 -0.600000 -0.792000 -0.400000 -0.150600 -0.318400 -0.432000 -0.416000 -0.792000 -0.380400 -0.150600 -0.304800 -0.424000 -0.456000 -0.776000 -0.400000 -0.168700 -0.304800 -0.504000 -0.464000 -0.720000 -0.350000 -0.150600 -0.283600 -0.064000 -0.424000 -0.896000 -0.400000 -0.200800 -0.276700 0.448000 -0.472000 -0.752000 -0.350000 -0.200800 -0.271400 0.216000 0.224000 -0.944000 -0.400000 -0.249400 -0.243900 0.760000 -0.472000 -0.424000 -0.350000 -0.228300 -0.304800 0.616000 0.528000 -0.576000 -0.399000 -0.251000 -0.243900 0.912000 -0.008000 -0.392000 -0.366700 -0.251000 -0.304800 0.704000 0.488000 -0.496000 -0.350000 -0.228300 -0.304800 0.616000 0.528000 -0.576000 -0.350000 -0.251000 -0.329500 0.536000 0.472000 -0.688000 -0.320800 -0.200800 -0.304800 0.496000 0.328000 -0.800000 -0.300000 -0.251000 -0.347800 0.304000 0.384000 -0.864000 -0.300000 -0.200800 -0.324200 0.480000 0.248000 -0.832000 -0.320800 -0.200800 -0.304800 0.496000 0.328000 -0.800000 -0.300000 -0.150600 -0.312600 0.312000 -0.200000 -0.920000 -0.313400 -0.150600 -0.304800 0.400000 -0.360000 -0.840000 -0.300000 -0.100400 -0.310000 -0.248000 0.072000 -0.960000 -0.350000 -0.127600 -0.304800 0.032000 -0.600000 -0.792000 -0.350000 -0.100400 -0.331300 -0.432000 -0.520000 -0.728000 -0.300000 -0.100400 -0.310000 -0.248000 0.072000 -0.960000 -0.350000 -0.059800 -0.365800 -0.280000 -0.560000 -0.768000 -0.300000 -0.050200 -0.319900 -0.536000 0.224000 -0.808000 -0.342100 -0.050200 -0.365800 -0.640000 -0.104000 -0.752000 -0.350000 -0.059800 -0.365800 -0.280000 -0.560000 -0.768000 -0.350000 -0.050200 -0.374000 -0.496000 -0.096000 -0.856000 -0.350000 -0.050200 -0.374000 -0.496000 -0.096000 -0.856000 -0.650000 0.080100 0.121900 -0.576000 -0.640000 0.496000 -0.650000 0.080100 0.121900 -0.576000 -0.640000 0.496000 -0.692100 0.050200 0.121900 -0.432000 -0.784000 0.424000 -0.650000 0.050200 0.073400 -0.576000 -0.624000 0.512000 -0.700000 0.046100 0.121900 -0.152000 -0.904000 0.376000 -0.650000 0.041800 0.060900 -0.568000 -0.648000 0.504000 -0.700000 0.026800 0.060900 -0.288000 -0.896000 0.328000 -0.650000 0.013100 0.000000 -0.448000 -0.792000 0.392000 -0.700000 0.012000 0.000000 -0.032000 -0.960000 0.272000 -0.650000 0.000000 -0.040500 0.104000 -0.944000 0.296000 -0.700000 0.001400 -0.060900 0.088000 -0.968000 0.192000 -0.686800 0.000000 -0.060900 0.208000 -0.960000 0.144000 -0.700000 0.000400 -0.121900 0.224000 -0.968000 0.032000 -0.698200 0.000000 -0.121900 0.296000 -0.952000 0.032000 -0.700000 0.009000 -0.182900 0.456000 -0.744000 -0.472000 -0.687300 0.000000 -0.182900 0.648000 -0.600000 -0.456000 -0.700000 0.050200 -0.225700 0.368000 -0.368000 -0.848000 -0.653800 0.000000 -0.243900 0.576000 -0.112000 -0.808000 -0.653800 0.050200 -0.243900 0.232000 0.032000 -0.968000 -0.653800 0.050200 -0.243900 0.232000 0.032000 -0.968000 -0.750000 0.233400 0.121900 0.720000 0.680000 -0.080000 -0.750000 0.233400 0.121900 0.720000 0.680000 -0.080000 -0.788900 0.200800 0.121900 0.632000 0.744000 0.184000 -0.750000 0.222200 0.060900 0.704000 0.696000 -0.080000 -0.772600 0.200800 0.060900 0.648000 0.736000 -0.136000 -0.750000 0.219200 0.000000 0.672000 0.728000 0.080000 -0.770200 0.200800 0.000000 0.616000 0.776000 0.056000 -0.750000 0.228900 -0.060900 0.576000 0.696000 -0.416000 -0.787300 0.200800 -0.060900 0.520000 0.824000 -0.184000 -0.750000 0.200800 -0.104400 0.480000 0.680000 -0.544000 -0.800000 0.194300 -0.060900 0.416000 0.824000 -0.360000 -0.750000 0.186400 -0.121900 0.504000 0.648000 -0.560000 -0.800000 0.164900 -0.121900 0.312000 0.800000 -0.504000 -0.750000 0.157000 -0.182900 0.280000 0.720000 -0.624000 -0.800000 0.150600 -0.164100 0.256000 0.800000 -0.528000 -0.769100 0.150600 -0.182900 0.248000 0.704000 -0.648000 -0.800000 0.138600 -0.182900 0.232000 0.712000 -0.656000 -0.750000 0.150600 -0.191500 0.256000 0.656000 -0.704000 -0.800000 0.100400 -0.216300 0.104000 0.416000 -0.896000 -0.750000 0.100400 -0.218500 0.200000 0.232000 -0.944000 -0.800000 0.050200 -0.233400 -0.176000 0.416000 -0.880000 -0.750000 0.050200 -0.223600 -0.168000 -0.552000 -0.808000 -0.800000 0.000000 -0.217200 -0.656000 -0.464000 -0.584000 -0.750000 0.019900 -0.182900 -0.176000 -0.792000 -0.576000 -0.776700 0.000000 -0.182900 -0.576000 -0.728000 -0.360000 -0.750000 0.004300 -0.121900 -0.408000 -0.880000 -0.216000 -0.756600 0.000000 -0.121900 -0.496000 -0.856000 -0.080000 -0.750000 0.001600 -0.060900 -0.416000 -0.904000 -0.016000 -0.753100 0.000000 -0.060900 -0.472000 -0.872000 0.000000 -0.750000 0.013300 0.000000 -0.240000 -0.936000 0.240000 -0.772100 0.000000 0.000000 -0.504000 -0.832000 0.224000 -0.750000 0.031700 0.060900 -0.136000 -0.928000 0.336000 -0.798100 0.000000 0.060900 -0.504000 -0.792000 0.312000 -0.772100 0.000000 0.000000 -0.504000 -0.832000 0.224000 -0.800000 -0.001000 0.060900 -0.584000 -0.776000 0.216000 -0.800000 -0.015400 0.000000 -0.560000 -0.800000 0.184000 -0.843600 -0.050200 0.060900 -0.704000 -0.672000 0.184000 -0.832800 -0.050200 0.000000 -0.728000 -0.656000 0.144000 -0.800000 -0.015400 0.000000 -0.560000 -0.800000 0.184000 -0.823600 -0.050200 -0.060900 -0.736000 -0.664000 0.112000 -0.800000 -0.024700 -0.060900 -0.616000 -0.776000 0.088000 -0.818400 -0.050200 -0.121900 -0.760000 -0.640000 0.016000 -0.800000 -0.027900 -0.121900 -0.664000 -0.736000 -0.072000 -0.822900 -0.050200 -0.182900 -0.792000 -0.592000 -0.088000 -0.800000 -0.017800 -0.182900 -0.616000 -0.680000 -0.376000 -0.835300 -0.050200 -0.243900 -0.840000 -0.416000 -0.336000 -0.800000 0.000000 -0.217200 -0.656000 -0.464000 -0.584000 -0.819700 0.000000 -0.243900 -0.752000 -0.192000 -0.616000 -0.819700 0.000000 -0.243900 -0.752000 -0.192000 -0.616000 -0.788900 0.200800 0.121900 0.632000 0.744000 0.184000 -0.788900 0.200800 0.121900 0.632000 0.744000 0.184000 -0.800000 0.190400 0.121900 0.624000 0.752000 0.168000 -0.772600 0.200800 0.060900 0.648000 0.736000 -0.136000 -0.800000 0.182100 0.060900 0.560000 0.824000 -0.024000 -0.770200 0.200800 0.000000 0.616000 0.776000 0.056000 -0.800000 0.184600 0.000000 0.464000 0.872000 0.120000 -0.787300 0.200800 -0.060900 0.520000 0.824000 -0.184000 -0.800000 0.194300 -0.060900 0.416000 0.824000 -0.360000 -0.800000 0.194300 -0.060900 0.416000 0.824000 -0.360000 -0.800000 0.028400 0.121900 -0.376000 -0.808000 0.432000 -0.800000 0.028400 0.121900 -0.376000 -0.808000 0.432000 -0.829700 0.000000 0.121900 -0.704000 -0.616000 0.344000 -0.800000 0.000000 0.064400 -0.576000 -0.736000 0.344000 -0.800000 0.000000 0.064400 -0.576000 -0.736000 0.344000 -0.911800 0.100400 0.121900 0.528000 0.800000 0.264000 -0.911800 0.100400 0.121900 0.528000 0.800000 0.264000 -0.950000 0.069700 0.121900 0.360000 0.840000 0.384000 -0.936800 0.100400 0.060900 0.456000 0.872000 0.168000 -0.950000 0.091300 0.060900 0.600000 0.776000 0.176000 -0.950000 0.100400 0.012800 0.496000 0.848000 0.136000 -1.000000 0.068400 0.060900 0.464000 0.872000 0.104000 -0.952900 0.100400 0.000000 0.504000 0.848000 0.120000 -1.000000 0.075000 0.000000 0.472000 0.872000 0.072000 -0.957800 0.100400 -0.060900 0.544000 0.824000 -0.120000 -1.000000 0.074600 -0.060900 0.496000 0.816000 -0.280000 -1.000000 0.074600 -0.060900 0.496000 0.816000 -0.280000 -0.950000 -0.142500 0.121900 -0.608000 -0.672000 0.392000 -0.950000 -0.142500 0.121900 -0.608000 -0.672000 0.392000 -0.950000 -0.150600 0.094900 -0.648000 -0.696000 0.272000 -0.900000 -0.107100 0.121900 -0.584000 -0.768000 0.240000 -0.942000 -0.150600 0.060900 -0.704000 -0.672000 0.200000 -0.900000 -0.117100 0.060900 -0.656000 -0.736000 0.136000 -0.931300 -0.150600 0.000000 -0.640000 -0.744000 0.144000 -0.900000 -0.125700 0.000000 -0.664000 -0.728000 0.136000 -0.917800 -0.150600 -0.060900 -0.640000 -0.736000 0.184000 -0.900000 -0.135500 -0.060900 -0.672000 -0.712000 0.168000 -0.902600 -0.150600 -0.121900 -0.664000 -0.736000 0.096000 -0.900000 -0.148200 -0.121900 -0.664000 -0.728000 0.088000 -0.900000 -0.150600 -0.145400 -0.696000 -0.704000 0.104000 -0.902600 -0.150600 -0.121900 -0.664000 -0.736000 0.096000 -0.900000 -0.155900 -0.182900 -0.744000 -0.648000 0.112000 -0.950000 -0.200400 -0.121900 -0.720000 -0.672000 0.136000 -0.939100 -0.200800 -0.182900 -0.712000 -0.672000 0.160000 -0.950000 -0.200800 -0.124000 -0.680000 -0.712000 0.160000 -0.950000 -0.211700 -0.182900 -0.704000 -0.680000 0.176000 -0.939100 -0.200800 -0.182900 -0.712000 -0.672000 0.160000 -0.950000 -0.224400 -0.243900 -0.688000 -0.640000 0.328000 -0.928800 -0.200800 -0.243900 -0.736000 -0.616000 0.240000 -0.939100 -0.200800 -0.182900 -0.712000 -0.672000 0.160000 -0.900000 -0.163000 -0.243900 -0.816000 -0.552000 0.128000 -0.900000 -0.155900 -0.182900 -0.744000 -0.648000 0.112000 -0.890800 -0.150600 -0.243900 -0.848000 -0.512000 0.064000 -0.895100 -0.150600 -0.182900 -0.744000 -0.648000 0.104000 -0.900000 -0.155900 -0.182900 -0.744000 -0.648000 0.112000 -0.900000 -0.150600 -0.145400 -0.696000 -0.704000 0.104000 -0.900000 -0.150600 -0.145400 -0.696000 -0.704000 0.104000 -0.950000 -0.150600 0.094900 -0.648000 -0.696000 0.272000 -0.950000 -0.150600 0.094900 -0.648000 -0.696000 0.272000 -0.950000 -0.158100 0.060900 -0.608000 -0.760000 0.200000 -0.942000 -0.150600 0.060900 -0.704000 -0.672000 0.200000 -0.950000 -0.168100 0.000000 -0.640000 -0.744000 0.184000 -0.931300 -0.150600 0.000000 -0.640000 -0.744000 0.144000 -0.950000 -0.183700 -0.060900 -0.632000 -0.728000 0.232000 -0.917800 -0.150600 -0.060900 -0.640000 -0.736000 0.184000 -0.950000 -0.200400 -0.121900 -0.720000 -0.672000 0.136000 -0.902600 -0.150600 -0.121900 -0.664000 -0.736000 0.096000 -0.902600 -0.150600 -0.121900 -0.664000 -0.736000 0.096000 -1.000000 0.053600 0.121900 0.280000 0.872000 0.392000 -1.000000 0.053600 0.121900 0.280000 0.872000 0.392000 -0.950000 0.069700 0.121900 0.360000 0.840000 0.384000 -1.000000 0.068400 0.060900 0.464000 0.872000 0.104000 -0.950000 0.091300 0.060900 0.600000 0.776000 0.176000 -0.950000 0.091300 0.060900 0.600000 0.776000 0.176000 --1.000000 -0.090800 0.060900 -0.320000 -0.912000 0.248000 --1.000000 -0.090800 0.060900 -0.320000 -0.912000 0.248000 --0.973400 -0.100400 0.060900 -0.344000 -0.904000 0.240000 --1.000000 -0.100400 0.014600 -0.304000 -0.920000 0.208000 --1.000000 -0.100400 0.014600 -0.304000 -0.920000 0.208000 --0.950000 0.258900 0.000000 0.296000 0.848000 0.432000 --0.950000 0.258900 0.000000 0.296000 0.848000 0.432000 --0.928700 0.251000 0.000000 0.312000 0.848000 0.408000 --0.950000 0.251000 0.016800 0.288000 0.808000 0.504000 --0.950000 0.251000 0.016800 0.288000 0.808000 0.504000 --0.900000 -0.149700 0.060900 -0.696000 -0.664000 0.232000 --0.900000 -0.149700 0.060900 -0.696000 -0.664000 0.232000 --0.899200 -0.150600 0.060900 -0.816000 -0.504000 0.256000 --0.900000 -0.150600 0.057700 -0.744000 -0.616000 0.232000 --0.900000 -0.150600 0.057700 -0.744000 -0.616000 0.232000 --0.750000 0.106000 0.060900 0.496000 0.464000 0.728000 --0.750000 0.106000 0.060900 0.496000 0.464000 0.728000 --0.796300 0.150600 0.060900 0.512000 0.584000 0.616000 --0.750000 0.150600 0.014500 0.472000 0.624000 0.608000 --0.750000 0.150600 0.014500 0.472000 0.624000 0.608000 --0.750800 -0.401700 0.000000 -0.816000 -0.520000 0.208000 --0.750800 -0.401700 0.000000 -0.816000 -0.520000 0.208000 --0.750000 -0.401700 0.004100 -0.816000 -0.520000 0.232000 --0.750000 -0.403200 0.000000 -0.832000 -0.504000 0.216000 --0.750000 -0.403200 0.000000 -0.832000 -0.504000 0.216000 --0.700000 0.051600 0.060900 0.528000 0.416000 0.728000 --0.700000 0.051600 0.060900 0.528000 0.416000 0.728000 --0.744800 0.100400 0.060900 0.496000 0.456000 0.728000 --0.700000 0.100400 0.019100 0.504000 0.504000 0.688000 --0.700000 0.100400 0.019100 0.504000 0.504000 0.688000 --0.700000 0.121800 0.000000 0.536000 0.544000 0.632000 --0.700000 0.121800 0.000000 0.536000 0.544000 0.632000 --0.680200 0.100400 0.000000 0.600000 0.440000 0.656000 --0.700000 0.100400 0.019100 0.504000 0.504000 0.688000 --0.700000 0.100400 0.019100 0.504000 0.504000 0.688000 --0.650000 -0.023500 0.060900 0.576000 0.360000 0.720000 --0.650000 -0.023500 0.060900 0.576000 0.360000 0.720000 --0.666100 0.000000 0.060900 0.560000 0.376000 0.728000 --0.650000 0.000000 0.045200 0.576000 0.400000 0.704000 --0.650000 0.000000 0.045200 0.576000 0.400000 0.704000 --0.650000 0.063100 0.000000 0.592000 0.392000 0.696000 --0.650000 0.063100 0.000000 0.592000 0.392000 0.696000 --0.641800 0.050200 0.000000 0.616000 0.400000 0.664000 --0.650000 0.050200 0.008200 0.568000 0.384000 0.720000 --0.650000 0.050200 0.008200 0.568000 0.384000 0.720000 --0.650000 -0.495900 0.060900 -0.528000 -0.720000 0.432000 --0.650000 -0.495900 0.060900 -0.528000 -0.720000 0.432000 --0.640700 -0.502100 0.060900 -0.496000 -0.728000 0.456000 --0.650000 -0.502100 0.048300 -0.536000 -0.712000 0.440000 --0.650000 -0.502100 0.048300 -0.536000 -0.712000 0.440000 --0.633400 -0.552300 0.000000 -0.384000 -0.672000 0.624000 --0.633400 -0.552300 0.000000 -0.384000 -0.672000 0.624000 --0.600000 -0.552300 0.023900 -0.224000 -0.776000 0.584000 --0.600000 -0.566300 0.000000 -0.184000 -0.816000 0.544000 --0.550000 -0.552300 0.031000 0.256000 -0.800000 0.528000 --0.550000 -0.565800 0.000000 0.224000 -0.872000 0.424000 --0.509600 -0.552300 0.000000 0.320000 -0.840000 0.424000 --0.509600 -0.552300 0.000000 0.320000 -0.840000 0.424000 --0.600000 -0.018300 0.000000 0.712000 0.368000 0.584000 --0.600000 -0.018300 0.000000 0.712000 0.368000 0.584000 --0.584800 -0.050200 0.000000 0.744000 0.336000 0.568000 --0.600000 -0.050200 0.018400 0.648000 0.320000 0.688000 --0.600000 -0.050200 0.018400 0.648000 0.320000 0.688000 --0.472400 -0.150600 0.060900 -0.464000 0.768000 0.416000 --0.472400 -0.150600 0.060900 -0.464000 0.768000 0.416000 --0.500000 -0.166600 0.060900 -0.304000 0.832000 0.448000 --0.500000 -0.150600 0.019400 -0.216000 0.856000 0.464000 --0.500000 -0.150600 0.019400 -0.216000 0.856000 0.464000 --0.434300 -0.100400 0.000000 -0.648000 0.720000 0.208000 --0.434300 -0.100400 0.000000 -0.648000 0.720000 0.208000 --0.405500 -0.100400 0.060900 -0.712000 0.456000 0.520000 --0.400000 -0.050900 0.000000 -0.776000 0.576000 0.224000 --0.400000 -0.090100 0.060900 -0.696000 0.400000 0.584000 --0.399300 -0.050200 0.000000 -0.696000 0.680000 0.184000 --0.367400 -0.050200 0.060900 -0.696000 0.408000 0.584000 --0.367400 -0.050200 0.060900 -0.696000 0.408000 0.584000 --0.355100 0.050200 0.000000 -0.872000 0.216000 0.416000 --0.355100 0.050200 0.000000 -0.872000 0.216000 0.416000 --0.350000 0.077100 0.000000 -0.776000 0.256000 0.568000 --0.350000 0.050200 0.010900 -0.568000 0.448000 0.680000 --0.321000 0.100400 0.000000 -0.264000 0.416000 0.864000 --0.300000 0.050200 0.038600 -0.224000 0.544000 0.800000 --0.300000 0.100400 0.006400 -0.200000 0.408000 0.880000 --0.250000 0.050200 0.048300 0.000000 0.552000 0.832000 --0.250000 0.100400 0.002600 0.144000 0.496000 0.848000 --0.250000 0.100400 0.002600 0.144000 0.496000 0.848000 --0.350000 0.000000 0.059800 -0.688000 0.400000 0.592000 --0.350000 0.000000 0.059800 -0.688000 0.400000 0.592000 --0.350000 0.050200 0.010900 -0.568000 0.448000 0.680000 --0.373100 0.000000 0.000000 -0.880000 0.240000 0.392000 --0.355100 0.050200 0.000000 -0.872000 0.216000 0.416000 --0.377800 0.000000 -0.060900 -0.864000 0.424000 -0.248000 --0.358600 0.050200 -0.060900 -0.920000 0.168000 -0.328000 --0.372200 0.000000 -0.121900 -0.848000 0.480000 -0.200000 --0.350000 0.050200 -0.078800 -0.832000 0.272000 -0.472000 --0.350000 0.031200 -0.121900 -0.744000 0.552000 -0.352000 --0.335400 0.050200 -0.121900 -0.752000 0.472000 -0.456000 --0.350000 0.000000 -0.171400 -0.688000 0.416000 -0.584000 --0.301000 0.050200 -0.182900 -0.704000 0.472000 -0.512000 --0.340600 0.000000 -0.182900 -0.696000 0.480000 -0.520000 --0.350000 0.000000 -0.171400 -0.688000 0.416000 -0.584000 --0.350000 -0.016600 -0.182900 -0.688000 0.360000 -0.616000 --0.372200 0.000000 -0.121900 -0.848000 0.480000 -0.200000 --0.365500 -0.050200 -0.182900 -0.728000 0.384000 -0.560000 --0.399400 -0.050200 -0.121900 -0.760000 0.504000 -0.392000 --0.400000 -0.096400 -0.182900 -0.664000 0.552000 -0.496000 --0.400000 -0.050900 -0.121900 -0.736000 0.536000 -0.408000 --0.403600 -0.100400 -0.182900 -0.616000 0.592000 -0.512000 --0.434900 -0.100400 -0.121900 -0.608000 0.744000 -0.256000 --0.434900 -0.100400 -0.121900 -0.608000 0.744000 -0.256000 --0.350000 0.000000 0.059800 -0.688000 0.400000 0.592000 --0.350000 0.000000 0.059800 -0.688000 0.400000 0.592000 --0.350000 0.050200 0.010900 -0.568000 0.448000 0.680000 --0.348200 0.000000 0.060900 -0.376000 0.448000 0.800000 --0.300000 0.050200 0.038600 -0.224000 0.544000 0.800000 --0.300000 0.027200 0.060900 -0.160000 0.552000 0.808000 --0.250000 0.050200 0.048300 0.000000 0.552000 0.832000 --0.250000 0.033500 0.060900 0.056000 0.528000 0.840000 --0.200000 0.050200 0.037800 0.512000 0.448000 0.720000 --0.200000 0.020500 0.060900 0.664000 0.440000 0.600000 --0.200000 0.020500 0.060900 0.664000 0.440000 0.600000 --0.208400 0.401700 0.000000 -0.424000 0.248000 0.864000 --0.208400 0.401700 0.000000 -0.424000 0.248000 0.864000 --0.200000 0.408700 0.000000 -0.112000 0.496000 0.856000 --0.200000 0.401700 0.005100 -0.168000 0.288000 0.936000 --0.185900 0.401700 0.000000 0.264000 0.248000 0.928000 --0.200000 0.384800 0.000000 -0.112000 -0.232000 0.960000 --0.150000 0.401700 -0.011900 0.240000 0.256000 0.928000 --0.200000 0.351500 -0.009600 0.208000 -0.208000 0.952000 --0.150000 0.351500 -0.029900 0.096000 -0.168000 0.976000 --0.200000 0.301200 -0.022600 0.056000 -0.176000 0.976000 --0.150000 0.301200 -0.033800 0.040000 -0.024000 0.992000 --0.200000 0.251000 -0.048300 -0.120000 -0.296000 0.944000 --0.150000 0.251000 -0.027500 -0.136000 -0.104000 0.984000 --0.200000 0.206100 -0.060900 -0.448000 -0.184000 0.872000 --0.150000 0.200800 -0.027500 -0.320000 -0.168000 0.928000 --0.198000 0.200800 -0.060900 -0.464000 0.288000 0.832000 --0.150000 0.150600 -0.037800 0.256000 -0.016000 0.960000 --0.200000 0.199100 -0.060900 -0.320000 0.504000 0.792000 --0.200000 0.150600 -0.023100 -0.360000 0.472000 0.792000 --0.250000 0.177000 -0.060900 -0.096000 0.568000 0.808000 --0.250000 0.150600 -0.042200 0.008000 0.568000 0.816000 --0.277600 0.200800 -0.060900 0.584000 -0.072000 0.800000 --0.300000 0.150600 -0.036000 -0.360000 0.064000 0.920000 --0.300000 0.200800 -0.040500 0.440000 0.208000 0.864000 --0.346000 0.150600 -0.060900 -0.768000 -0.144000 0.616000 --0.350000 0.200800 -0.003200 -0.528000 -0.104000 0.832000 --0.350000 0.153200 -0.060900 -0.608000 -0.784000 0.016000 --0.368900 0.200800 -0.060900 -0.952000 0.040000 -0.280000 --0.350000 0.200800 -0.076700 -0.368000 -0.104000 -0.920000 --0.356100 0.251000 -0.060900 -0.936000 0.104000 -0.312000 --0.350000 0.251000 -0.067500 -0.624000 0.048000 -0.768000 --0.353500 0.301200 -0.060900 -0.872000 0.080000 -0.464000 --0.350000 0.301200 -0.064600 -0.624000 0.064000 -0.768000 --0.350000 0.329400 -0.060900 -0.960000 0.152000 -0.224000 --0.300000 0.301200 -0.089300 -0.344000 0.056000 -0.936000 --0.344500 0.351500 -0.060900 -0.776000 0.288000 0.552000 --0.300000 0.351500 -0.083400 -0.432000 0.176000 -0.880000 --0.307400 0.401700 -0.060900 -0.696000 0.688000 -0.152000 --0.300000 0.401700 -0.066400 -0.448000 0.440000 -0.768000 --0.300000 0.408800 -0.060900 -0.664000 0.712000 -0.184000 --0.250000 0.401700 -0.091800 -0.416000 0.456000 -0.776000 --0.250000 0.447500 -0.060900 -0.512000 0.744000 0.408000 --0.208300 0.401700 -0.121900 -0.432000 0.432000 -0.784000 --0.242600 0.451900 -0.060900 -0.440000 0.728000 0.512000 --0.200000 0.409200 -0.121900 -0.400000 0.464000 -0.776000 --0.200000 0.451900 -0.081300 -0.400000 0.504000 -0.752000 --0.152100 0.451900 -0.121900 -0.424000 0.536000 -0.720000 --0.200000 0.477600 -0.060900 -0.544000 0.808000 -0.208000 --0.150000 0.453400 -0.121900 -0.320000 0.624000 -0.704000 --0.150000 0.501300 -0.060900 -0.376000 0.880000 -0.280000 --0.100000 0.479800 -0.121900 -0.288000 0.584000 -0.752000 --0.146800 0.502100 -0.060900 -0.272000 0.960000 0.016000 --0.100000 0.502100 -0.081300 -0.184000 0.840000 -0.488000 --0.100000 0.517800 -0.060900 -0.120000 0.976000 0.136000 --0.050000 0.502100 -0.117100 -0.040000 0.912000 -0.392000 --0.050000 0.515300 -0.060900 0.432000 0.792000 0.408000 --0.033200 0.502100 -0.060900 0.616000 0.496000 0.600000 --0.050000 0.502100 -0.046900 0.400000 0.496000 0.760000 --0.023600 0.451900 -0.060900 0.376000 0.152000 0.904000 --0.050000 0.451900 -0.049700 0.432000 0.024000 0.896000 --0.005200 0.401700 -0.060900 0.264000 0.168000 0.944000 --0.050000 0.401700 -0.052300 0.176000 0.040000 0.976000 -0.000000 0.393800 -0.060900 0.224000 0.176000 0.952000 --0.050000 0.351500 -0.043600 0.248000 0.032000 0.960000 -0.000000 0.351500 -0.051600 0.280000 -0.248000 0.920000 --0.050000 0.301200 -0.044600 0.440000 -0.008000 0.896000 -0.000000 0.334500 -0.060900 0.312000 -0.368000 0.864000 --0.027600 0.301200 -0.060900 0.456000 -0.208000 0.856000 -0.000000 0.301200 -0.076500 0.296000 -0.272000 0.904000 --0.035000 0.251000 -0.060900 0.512000 -0.448000 0.728000 -0.000000 0.251000 -0.086600 0.344000 -0.360000 0.864000 --0.050000 0.236000 -0.060900 0.536000 -0.496000 0.672000 -0.000000 0.211400 -0.121900 0.496000 -0.712000 0.480000 --0.050000 0.200800 -0.090500 0.520000 -0.520000 0.672000 --0.012800 0.200800 -0.121900 0.688000 -0.616000 0.376000 --0.050000 0.170300 -0.121900 0.584000 -0.576000 0.560000 -0.000000 0.200800 -0.169000 0.576000 -0.744000 0.320000 --0.050000 0.150600 -0.159500 0.712000 -0.480000 0.504000 -0.000000 0.195100 -0.182900 0.504000 -0.656000 -0.544000 --0.033200 0.150600 -0.182900 0.832000 -0.552000 -0.016000 -0.000000 0.200800 -0.186400 0.272000 -0.456000 -0.840000 --0.050000 0.150600 -0.210200 0.840000 -0.208000 -0.496000 --0.050000 0.200800 -0.204500 0.304000 -0.328000 -0.888000 --0.077600 0.150600 -0.243900 0.320000 0.328000 -0.880000 --0.100000 0.200800 -0.221500 0.056000 0.392000 -0.912000 --0.100000 0.164100 -0.243900 -0.032000 0.432000 -0.896000 --0.150000 0.200800 -0.199200 -0.328000 0.272000 -0.896000 --0.126800 0.150600 -0.243900 -0.208000 0.496000 -0.832000 --0.150000 0.150600 -0.235500 -0.296000 0.536000 -0.784000 --0.150000 0.141700 -0.243900 -0.352000 0.528000 -0.768000 --0.200000 0.150600 -0.197300 -0.488000 0.464000 -0.728000 --0.198500 0.100400 -0.243900 -0.376000 0.480000 -0.784000 --0.200000 0.100400 -0.242800 -0.520000 0.512000 -0.672000 --0.200000 0.099300 -0.243900 -0.456000 0.488000 -0.736000 --0.249100 0.100400 -0.182900 -0.576000 0.496000 -0.640000 --0.250000 0.055800 -0.243900 -0.560000 0.648000 -0.504000 --0.250000 0.099600 -0.182900 -0.488000 0.616000 -0.608000 --0.256300 0.050200 -0.243900 -0.592000 0.624000 -0.488000 --0.300000 0.052000 -0.182900 -0.664000 0.464000 -0.568000 --0.300000 0.050200 -0.185100 -0.648000 0.560000 -0.504000 --0.256300 0.050200 -0.243900 -0.592000 0.624000 -0.488000 --0.300000 0.001800 -0.243900 -0.496000 0.680000 -0.520000 --0.250000 0.050200 -0.254100 -0.584000 0.656000 -0.464000 --0.300000 0.000000 -0.248500 -0.656000 0.560000 -0.488000 --0.250000 0.000000 -0.286200 -0.320000 0.712000 -0.616000 --0.300000 -0.050200 -0.270300 -0.824000 0.232000 -0.512000 --0.250000 -0.028200 -0.304800 -0.400000 0.416000 -0.808000 --0.266700 -0.050200 -0.304800 -0.504000 0.288000 -0.808000 --0.250000 -0.050200 -0.318700 -0.440000 0.320000 -0.832000 --0.288100 -0.100400 -0.304800 -0.408000 0.240000 -0.872000 --0.250000 -0.100400 -0.327300 -0.384000 0.152000 -0.904000 --0.300000 -0.118900 -0.304800 -0.376000 0.264000 -0.880000 --0.250000 -0.150600 -0.327500 -0.120000 0.152000 -0.976000 --0.300000 -0.150600 -0.319300 -0.256000 0.480000 -0.832000 --0.250000 -0.200800 -0.333200 0.168000 0.080000 -0.976000 --0.300000 -0.200800 -0.340600 0.016000 0.280000 -0.952000 --0.250000 -0.251000 -0.337900 0.384000 0.112000 -0.912000 --0.300000 -0.251000 -0.348000 0.192000 0.248000 -0.944000 --0.250000 -0.301200 -0.349000 0.296000 0.272000 -0.912000 --0.300000 -0.296900 -0.365800 0.296000 0.528000 -0.784000 --0.291400 -0.301200 -0.365800 0.272000 0.504000 -0.808000 --0.300000 -0.301200 -0.369600 0.320000 0.544000 -0.768000 --0.250000 -0.342900 -0.365800 0.504000 0.512000 -0.680000 --0.300000 -0.341100 -0.426800 -0.128000 0.536000 -0.832000 --0.250000 -0.351500 -0.379700 0.552000 0.712000 -0.416000 --0.273100 -0.351500 -0.426800 0.480000 0.752000 -0.440000 --0.250000 -0.368100 -0.426800 0.504000 0.792000 -0.336000 --0.250000 -0.351500 -0.379700 0.552000 0.712000 -0.416000 --0.200000 -0.393200 -0.426800 0.696000 0.632000 -0.328000 --0.241400 -0.351500 -0.365800 0.488000 0.640000 -0.576000 --0.200000 -0.365300 -0.365800 0.504000 0.768000 -0.376000 --0.200000 -0.351500 -0.343300 0.312000 0.640000 -0.696000 --0.241400 -0.351500 -0.365800 0.488000 0.640000 -0.576000 --0.200000 -0.301200 -0.313400 0.328000 0.152000 -0.928000 --0.250000 -0.342900 -0.365800 0.504000 0.512000 -0.680000 --0.250000 -0.301200 -0.349000 0.296000 0.272000 -0.912000 --0.291400 -0.301200 -0.365800 0.272000 0.504000 -0.808000 --0.291400 -0.301200 -0.365800 0.272000 0.504000 -0.808000 --0.200000 0.401700 0.005100 -0.168000 0.288000 0.936000 --0.200000 0.401700 0.005100 -0.168000 0.288000 0.936000 --0.200000 0.384800 0.000000 -0.112000 -0.232000 0.960000 --0.208400 0.401700 0.000000 -0.424000 0.248000 0.864000 --0.200000 0.351500 -0.009600 0.208000 -0.208000 0.952000 --0.250000 0.401700 -0.023000 -0.400000 -0.016000 0.912000 --0.250000 0.351500 -0.004200 0.040000 0.000000 0.992000 --0.300000 0.401700 -0.053800 -0.512000 0.520000 0.672000 --0.300000 0.351500 -0.024700 -0.384000 0.216000 0.896000 --0.307400 0.401700 -0.060900 -0.696000 0.688000 -0.152000 --0.344500 0.351500 -0.060900 -0.776000 0.288000 0.552000 --0.300000 0.351500 -0.024700 -0.384000 0.216000 0.896000 --0.350000 0.329400 -0.060900 -0.960000 0.152000 -0.224000 --0.300000 0.301200 -0.020200 -0.184000 0.032000 0.976000 --0.350000 0.301200 -0.051600 -0.832000 0.120000 0.528000 --0.300000 0.251000 -0.020200 0.208000 -0.160000 0.960000 --0.350000 0.251000 -0.040500 -0.808000 0.200000 0.544000 --0.300000 0.200800 -0.040500 0.440000 0.208000 0.864000 --0.350000 0.200800 -0.003200 -0.528000 -0.104000 0.832000 --0.350000 0.251000 -0.040500 -0.808000 0.200000 0.544000 --0.368900 0.200800 -0.060900 -0.952000 0.040000 -0.280000 --0.356100 0.251000 -0.060900 -0.936000 0.104000 -0.312000 --0.350000 0.251000 -0.040500 -0.808000 0.200000 0.544000 --0.353500 0.301200 -0.060900 -0.872000 0.080000 -0.464000 --0.350000 0.301200 -0.051600 -0.832000 0.120000 0.528000 --0.350000 0.329400 -0.060900 -0.960000 0.152000 -0.224000 --0.350000 0.329400 -0.060900 -0.960000 0.152000 -0.224000 --0.250000 -0.301200 0.006000 0.344000 -0.608000 0.704000 --0.250000 -0.301200 0.006000 0.344000 -0.608000 0.704000 --0.235900 -0.301200 0.000000 0.272000 -0.568000 0.768000 --0.250000 -0.307700 0.000000 0.288000 -0.576000 0.760000 --0.250000 -0.307700 0.000000 0.288000 -0.576000 0.760000 --0.169100 -0.301200 0.000000 -0.376000 -0.392000 0.832000 --0.169100 -0.301200 0.000000 -0.376000 -0.392000 0.832000 --0.150000 -0.301200 0.010200 -0.304000 -0.280000 0.904000 --0.150000 -0.346200 0.000000 -0.392000 -0.160000 0.904000 --0.100000 -0.301200 0.037800 -0.016000 -0.152000 0.984000 --0.100000 -0.344900 0.000000 0.072000 -0.528000 0.840000 --0.050000 -0.301200 0.029100 0.312000 -0.280000 0.904000 --0.050000 -0.329200 0.000000 0.264000 -0.624000 0.720000 --0.002200 -0.301200 0.000000 0.384000 -0.648000 0.648000 --0.050000 -0.351500 -0.027000 0.488000 -0.688000 0.528000 -0.000000 -0.301200 -0.001900 0.408000 -0.704000 0.568000 --0.029100 -0.351500 -0.060900 0.584000 -0.680000 0.424000 -0.000000 -0.326800 -0.060900 0.344000 -0.824000 0.432000 -0.000000 -0.351500 -0.112600 0.544000 -0.704000 0.448000 -0.032200 -0.301200 -0.060900 0.552000 -0.696000 0.448000 -0.006400 -0.351500 -0.121900 0.552000 -0.776000 0.288000 -0.050000 -0.301200 -0.085900 0.528000 -0.704000 0.464000 -0.050000 -0.321600 -0.121900 0.584000 -0.712000 0.376000 -0.074000 -0.301200 -0.121900 0.536000 -0.792000 0.264000 -0.050000 -0.327900 -0.182900 0.552000 -0.824000 0.048000 -0.088900 -0.301200 -0.182900 0.488000 -0.864000 0.072000 -0.050000 -0.327900 -0.243900 0.480000 -0.872000 0.000000 -0.091700 -0.301200 -0.243900 0.488000 -0.864000 -0.008000 -0.050000 -0.326800 -0.304800 0.424000 -0.880000 -0.184000 -0.085600 -0.301200 -0.304800 0.544000 -0.768000 -0.320000 -0.050000 -0.303000 -0.365800 0.400000 -0.792000 -0.448000 -0.052200 -0.301200 -0.365800 0.552000 -0.720000 -0.416000 -0.050000 -0.301200 -0.369000 0.376000 -0.768000 -0.512000 -0.100000 -0.263400 -0.365800 0.480000 -0.672000 -0.544000 -0.050000 -0.251000 -0.406500 0.232000 -0.312000 -0.912000 -0.100000 -0.251000 -0.380100 0.472000 -0.384000 -0.784000 -0.050000 -0.206300 -0.365800 -0.112000 0.608000 -0.776000 -0.100000 -0.224900 -0.365800 0.352000 0.456000 -0.808000 -0.050000 -0.200800 -0.360800 -0.016000 0.576000 -0.808000 -0.100000 -0.200800 -0.352600 0.240000 0.528000 -0.800000 -0.100000 -0.224900 -0.365800 0.352000 0.456000 -0.808000 -0.150000 -0.200800 -0.325200 0.160000 0.176000 -0.968000 -0.118000 -0.251000 -0.365800 0.536000 -0.224000 -0.808000 -0.150000 -0.251000 -0.336000 0.080000 -0.336000 -0.928000 -0.100000 -0.263400 -0.365800 0.480000 -0.672000 -0.544000 -0.150000 -0.287400 -0.304800 0.000000 -0.712000 -0.688000 -0.100000 -0.292600 -0.304800 0.432000 -0.840000 -0.304000 -0.150000 -0.287700 -0.243900 -0.208000 -0.968000 0.064000 -0.100000 -0.296900 -0.243900 0.408000 -0.912000 0.000000 -0.150000 -0.278000 -0.182900 -0.064000 -0.936000 0.328000 -0.100000 -0.295100 -0.182900 0.440000 -0.880000 0.144000 -0.150000 -0.253200 -0.121900 0.192000 -0.808000 0.552000 -0.100000 -0.284500 -0.121900 0.464000 -0.744000 0.472000 -0.150000 -0.251000 -0.118100 0.224000 -0.792000 0.560000 -0.100000 -0.256900 -0.060900 0.456000 -0.800000 0.368000 -0.110300 -0.251000 -0.060900 0.504000 -0.760000 0.392000 -0.100000 -0.251000 -0.044600 0.544000 -0.608000 0.568000 -0.130700 -0.200800 -0.060900 0.504000 0.008000 0.856000 -0.100000 -0.200800 -0.044900 0.416000 0.232000 0.872000 -0.100000 -0.170000 -0.060900 0.256000 0.296000 0.912000 -0.050000 -0.200800 -0.016400 0.232000 0.648000 0.720000 -0.076800 -0.150600 -0.060900 0.208000 0.432000 0.872000 -0.050000 -0.150600 -0.053500 0.160000 0.448000 0.872000 -0.050000 -0.140200 -0.060900 0.152000 0.504000 0.848000 -0.000000 -0.150600 -0.047300 0.168000 0.600000 0.768000 -0.000000 -0.136800 -0.060900 0.088000 0.520000 0.840000 --0.050000 -0.150600 -0.033100 0.152000 0.512000 0.840000 --0.050000 -0.119400 -0.060900 0.168000 0.528000 0.824000 --0.100000 -0.150600 -0.019000 0.512000 0.456000 0.720000 --0.100000 -0.105500 -0.060900 0.480000 0.464000 0.736000 --0.129500 -0.150600 0.000000 0.416000 0.264000 0.864000 --0.104300 -0.100400 -0.060900 0.528000 0.416000 0.728000 --0.150000 -0.104300 0.000000 0.496000 0.120000 0.848000 --0.150000 -0.100400 -0.001300 0.848000 0.032000 0.520000 --0.150600 -0.100400 0.000000 0.800000 0.040000 0.592000 --0.150000 -0.050200 -0.005700 0.768000 -0.024000 0.632000 --0.152800 -0.050200 0.000000 0.848000 0.032000 0.520000 --0.150000 0.000000 -0.001200 0.744000 0.064000 0.656000 --0.150800 0.000000 0.000000 0.744000 0.072000 0.656000 --0.150000 0.050200 -0.012600 0.624000 0.240000 0.728000 --0.163800 0.050200 0.000000 0.704000 0.216000 0.664000 --0.150000 0.100400 -0.027500 0.432000 0.296000 0.848000 --0.200000 0.089800 0.000000 0.216000 0.544000 0.800000 --0.200000 0.100400 -0.008800 0.176000 0.488000 0.848000 --0.238500 0.100400 0.000000 0.152000 0.496000 0.848000 --0.200000 0.150600 -0.023100 -0.360000 0.472000 0.792000 --0.250000 0.104200 0.000000 0.144000 0.480000 0.856000 --0.250000 0.150600 -0.042200 0.008000 0.568000 0.816000 --0.300000 0.112500 0.000000 -0.064000 0.472000 0.872000 --0.300000 0.150600 -0.036000 -0.360000 0.064000 0.920000 --0.300000 0.150600 -0.036000 -0.360000 0.064000 0.920000 --0.150000 -0.104300 0.000000 0.496000 0.120000 0.848000 --0.150000 -0.104300 0.000000 0.496000 0.120000 0.848000 --0.129500 -0.150600 0.000000 0.416000 0.264000 0.864000 --0.150000 -0.150600 0.010200 0.376000 0.208000 0.896000 --0.100000 -0.188700 0.000000 0.176000 0.408000 0.888000 --0.150000 -0.200800 0.013600 0.104000 0.200000 0.968000 --0.100000 -0.200800 0.005100 0.056000 0.344000 0.936000 --0.150000 -0.251000 0.002400 -0.056000 -0.176000 0.976000 --0.100000 -0.251000 0.029400 -0.128000 0.120000 0.976000 --0.150000 -0.301200 0.010200 -0.304000 -0.280000 0.904000 --0.100000 -0.301200 0.037800 -0.016000 -0.152000 0.984000 --0.100000 -0.251000 0.029400 -0.128000 0.120000 0.976000 --0.050000 -0.301200 0.029100 0.312000 -0.280000 0.904000 --0.050000 -0.251000 0.040700 0.136000 0.064000 0.984000 --0.002200 -0.301200 0.000000 0.384000 -0.648000 0.648000 -0.000000 -0.251000 0.031300 0.424000 -0.232000 0.872000 -0.000000 -0.299000 0.000000 0.440000 -0.464000 0.760000 -0.050000 -0.251000 0.003400 0.512000 0.320000 0.792000 -0.050000 -0.253500 0.000000 0.448000 -0.608000 0.648000 -0.054200 -0.251000 0.000000 0.552000 0.192000 0.800000 -0.050000 -0.286400 -0.060900 0.528000 -0.720000 0.440000 -0.100000 -0.251000 -0.044600 0.544000 -0.608000 0.568000 -0.100000 -0.256900 -0.060900 0.456000 -0.800000 0.368000 -0.050000 -0.286400 -0.060900 0.528000 -0.720000 0.440000 -0.100000 -0.284500 -0.121900 0.464000 -0.744000 0.472000 -0.050000 -0.301200 -0.085900 0.528000 -0.704000 0.464000 -0.074000 -0.301200 -0.121900 0.536000 -0.792000 0.264000 -0.100000 -0.284500 -0.121900 0.464000 -0.744000 0.472000 -0.088900 -0.301200 -0.182900 0.488000 -0.864000 0.072000 -0.100000 -0.295100 -0.182900 0.440000 -0.880000 0.144000 -0.091700 -0.301200 -0.243900 0.488000 -0.864000 -0.008000 -0.100000 -0.296900 -0.243900 0.408000 -0.912000 0.000000 -0.085600 -0.301200 -0.304800 0.544000 -0.768000 -0.320000 -0.100000 -0.292600 -0.304800 0.432000 -0.840000 -0.304000 -0.052200 -0.301200 -0.365800 0.552000 -0.720000 -0.416000 -0.100000 -0.263400 -0.365800 0.480000 -0.672000 -0.544000 -0.100000 -0.263400 -0.365800 0.480000 -0.672000 -0.544000 --0.100000 -0.200800 0.005100 0.056000 0.344000 0.936000 --0.100000 -0.200800 0.005100 0.056000 0.344000 0.936000 --0.050000 -0.200800 0.008600 0.032000 0.536000 0.840000 --0.100000 -0.188700 0.000000 0.176000 0.408000 0.888000 --0.050000 -0.190400 0.000000 0.096000 0.648000 0.744000 --0.100000 -0.150600 -0.019000 0.512000 0.456000 0.720000 --0.050000 -0.150600 -0.033100 0.152000 0.512000 0.840000 --0.050000 -0.190400 0.000000 0.096000 0.648000 0.744000 -0.000000 -0.150600 -0.047300 0.168000 0.600000 0.768000 -0.000000 -0.198800 0.000000 0.160000 0.688000 0.704000 -0.050000 -0.150600 -0.053500 0.160000 0.448000 0.872000 -0.006800 -0.200800 0.000000 0.232000 0.576000 0.776000 -0.050000 -0.200800 -0.016400 0.232000 0.648000 0.720000 -0.050000 -0.244100 0.000000 0.488000 0.320000 0.800000 -0.100000 -0.200800 -0.044900 0.416000 0.232000 0.872000 -0.054200 -0.251000 0.000000 0.552000 0.192000 0.800000 -0.100000 -0.251000 -0.044600 0.544000 -0.608000 0.568000 -0.100000 -0.251000 -0.044600 0.544000 -0.608000 0.568000 --0.100000 -0.200800 0.005100 0.056000 0.344000 0.936000 --0.100000 -0.200800 0.005100 0.056000 0.344000 0.936000 --0.100000 -0.251000 0.029400 -0.128000 0.120000 0.976000 --0.050000 -0.200800 0.008600 0.032000 0.536000 0.840000 --0.050000 -0.251000 0.040700 0.136000 0.064000 0.984000 -0.000000 -0.200800 0.002300 0.160000 0.560000 0.808000 -0.000000 -0.251000 0.031300 0.424000 -0.232000 0.872000 -0.006800 -0.200800 0.000000 0.232000 0.576000 0.776000 -0.050000 -0.251000 0.003400 0.512000 0.320000 0.792000 -0.050000 -0.244100 0.000000 0.488000 0.320000 0.800000 -0.054200 -0.251000 0.000000 0.552000 0.192000 0.800000 -0.054200 -0.251000 0.000000 0.552000 0.192000 0.800000 --0.050000 -0.190400 0.000000 0.096000 0.648000 0.744000 --0.050000 -0.190400 0.000000 0.096000 0.648000 0.744000 --0.050000 -0.200800 0.008600 0.032000 0.536000 0.840000 -0.000000 -0.198800 0.000000 0.160000 0.688000 0.704000 -0.000000 -0.200800 0.002300 0.160000 0.560000 0.808000 -0.006800 -0.200800 0.000000 0.232000 0.576000 0.776000 -0.006800 -0.200800 0.000000 0.232000 0.576000 0.776000 -0.500000 0.245700 0.000000 -0.568000 0.120000 0.808000 -0.500000 0.245700 0.000000 -0.568000 0.120000 0.808000 -0.500000 0.200800 0.008600 -0.576000 -0.176000 0.792000 -0.488800 0.200800 0.000000 -0.512000 0.024000 0.856000 -0.500000 0.181600 0.000000 -0.600000 -0.304000 0.728000 -0.500000 0.181600 0.000000 -0.600000 -0.304000 0.728000 -0.550000 0.174700 0.060900 -0.744000 -0.320000 0.576000 -0.550000 0.174700 0.060900 -0.744000 -0.320000 0.576000 -0.560700 0.150600 0.060900 -0.704000 -0.368000 0.592000 -0.550000 0.150600 0.048400 -0.632000 -0.416000 0.640000 -0.550000 0.150600 0.048400 -0.632000 -0.416000 0.640000 -0.641200 0.050200 0.060900 -0.600000 -0.608000 0.512000 -0.641200 0.050200 0.060900 -0.600000 -0.608000 0.512000 -0.600000 0.093600 0.060900 -0.624000 -0.616000 0.464000 -0.602900 0.050200 0.000000 -0.576000 -0.704000 0.400000 -0.600000 0.053300 0.000000 -0.472000 -0.712000 0.512000 -0.600000 0.050200 -0.005300 -0.440000 -0.752000 0.480000 -0.600000 0.050200 -0.005300 -0.440000 -0.752000 0.480000 --0.915700 -0.150600 0.000000 -0.696000 -0.672000 0.232000 --0.915700 -0.150600 0.000000 -0.696000 -0.672000 0.232000 --0.950000 -0.123700 0.000000 -0.488000 -0.840000 0.216000 --0.932400 -0.150600 -0.060900 -0.688000 -0.696000 0.176000 --0.950000 -0.136200 -0.060900 -0.528000 -0.832000 0.152000 --0.943100 -0.150600 -0.121900 -0.672000 -0.720000 0.120000 --0.950000 -0.144800 -0.121900 -0.536000 -0.832000 0.120000 --0.950000 -0.150600 -0.169000 -0.584000 -0.792000 0.136000 --0.943100 -0.150600 -0.121900 -0.672000 -0.720000 0.120000 --0.950000 -0.152700 -0.182900 -0.600000 -0.784000 0.144000 --0.903800 -0.200800 -0.121900 -0.696000 -0.704000 0.120000 --0.907400 -0.200800 -0.182900 -0.688000 -0.712000 0.072000 --0.950000 -0.152700 -0.182900 -0.600000 -0.784000 0.144000 --0.914100 -0.200800 -0.243900 -0.664000 -0.728000 0.128000 --0.950000 -0.161800 -0.243900 -0.584000 -0.784000 0.176000 --0.931500 -0.200800 -0.304800 -0.648000 -0.520000 -0.544000 --0.950000 -0.180000 -0.304800 -0.552000 -0.600000 -0.568000 --0.900000 -0.200800 -0.331500 -0.576000 -0.328000 -0.736000 --0.950000 -0.150600 -0.330800 -0.416000 -0.432000 -0.792000 --0.900000 -0.150600 -0.338300 -0.216000 -0.104000 -0.968000 --0.900000 -0.200800 -0.331500 -0.576000 -0.328000 -0.736000 --0.850000 -0.150600 -0.349400 0.072000 0.056000 -0.992000 --0.850000 -0.200800 -0.351200 -0.168000 0.112000 -0.976000 --0.800000 -0.150600 -0.340500 0.312000 0.288000 -0.896000 --0.800000 -0.200800 -0.355700 0.080000 0.256000 -0.960000 --0.750000 -0.150600 -0.317800 0.416000 0.384000 -0.816000 --0.750000 -0.200800 -0.348300 0.272000 0.384000 -0.872000 --0.731900 -0.150600 -0.304800 0.424000 0.400000 -0.808000 --0.700000 -0.200800 -0.326900 0.208000 0.528000 -0.816000 --0.700000 -0.175200 -0.304800 0.352000 0.528000 -0.768000 --0.651700 -0.200800 -0.304800 0.320000 0.544000 -0.768000 --0.700000 -0.150600 -0.284500 0.376000 0.392000 -0.832000 --0.650000 -0.200800 -0.303800 0.136000 0.680000 -0.712000 --0.650000 -0.150600 -0.267500 0.376000 0.464000 -0.792000 --0.650000 -0.150600 -0.267500 0.376000 0.464000 -0.792000 --0.895700 -0.200800 -0.060900 -0.864000 -0.480000 0.136000 --0.895700 -0.200800 -0.060900 -0.864000 -0.480000 0.136000 --0.882700 -0.200800 0.000000 -0.840000 -0.496000 0.192000 --0.860100 -0.251000 -0.060900 -0.808000 -0.568000 0.112000 --0.852600 -0.251000 0.000000 -0.800000 -0.568000 0.168000 --0.852600 -0.251000 0.000000 -0.800000 -0.568000 0.168000 --0.700000 -0.502100 -0.057900 -0.752000 -0.512000 0.400000 --0.700000 -0.502100 -0.057900 -0.752000 -0.512000 0.400000 --0.700000 -0.507800 -0.060900 -0.864000 -0.200000 0.448000 --0.701200 -0.502100 -0.060900 -0.816000 -0.416000 0.392000 --0.700000 -0.552300 -0.082500 -0.736000 -0.280000 0.608000 --0.723300 -0.502100 -0.121900 -0.896000 -0.224000 0.368000 --0.750000 -0.552300 -0.119400 0.072000 0.512000 0.848000 --0.750000 -0.549900 -0.121900 0.080000 0.648000 0.752000 --0.800000 -0.552300 -0.095900 0.424000 0.264000 0.864000 --0.800000 -0.539500 -0.121900 0.176000 0.680000 0.704000 --0.850000 -0.552300 -0.082300 -0.704000 -0.480000 0.504000 --0.850000 -0.519700 -0.121900 0.200000 0.624000 0.752000 --0.868200 -0.552300 -0.121900 -0.520000 -0.224000 0.816000 --0.850000 -0.502100 -0.144600 0.400000 0.776000 0.480000 --0.900000 -0.511500 -0.121900 -0.520000 -0.664000 0.528000 --0.878700 -0.502100 -0.121900 0.408000 0.368000 0.832000 --0.900000 -0.502100 -0.104000 -0.752000 0.000000 0.656000 --0.900000 -0.492700 -0.121900 -0.520000 0.712000 0.448000 --0.906100 -0.502100 -0.121900 -0.920000 0.072000 0.376000 --0.900000 -0.462200 -0.182900 0.320000 0.888000 0.304000 --0.925200 -0.502100 -0.182900 -0.976000 -0.008000 0.208000 --0.900000 -0.451900 -0.229200 0.512000 0.832000 0.168000 --0.929300 -0.502100 -0.243900 -0.992000 0.064000 -0.008000 --0.921000 -0.451900 -0.243900 -0.184000 0.968000 0.160000 --0.920600 -0.502100 -0.304800 -0.888000 -0.288000 -0.344000 --0.912200 -0.451900 -0.304800 -0.496000 0.720000 -0.464000 --0.900000 -0.502100 -0.352600 -0.672000 0.128000 -0.720000 --0.900000 -0.451900 -0.318500 0.104000 0.872000 -0.464000 --0.864000 -0.502100 -0.365800 -0.304000 0.480000 -0.816000 --0.891000 -0.451900 -0.304800 0.528000 0.824000 -0.192000 --0.850000 -0.496800 -0.365800 -0.176000 0.616000 -0.760000 --0.850000 -0.473200 -0.304800 0.272000 0.896000 -0.336000 --0.800000 -0.496400 -0.365800 -0.664000 0.416000 -0.608000 --0.800000 -0.473000 -0.304800 -0.736000 0.648000 -0.168000 --0.786000 -0.451900 -0.365800 -0.872000 0.080000 -0.472000 --0.787800 -0.451900 -0.304800 -0.984000 0.136000 -0.040000 --0.796500 -0.401700 -0.365800 -0.952000 -0.168000 -0.232000 --0.797400 -0.401700 -0.304800 -0.928000 -0.344000 0.056000 --0.800000 -0.388500 -0.365800 -0.864000 -0.288000 -0.400000 --0.800000 -0.395700 -0.304800 -0.920000 -0.376000 0.000000 --0.797400 -0.401700 -0.304800 -0.928000 -0.344000 0.056000 --0.800000 -0.365300 -0.243900 -0.880000 -0.440000 0.160000 --0.781800 -0.401700 -0.243900 -0.912000 -0.336000 0.208000 --0.800000 -0.355500 -0.182900 -0.872000 -0.472000 0.032000 --0.775200 -0.401700 -0.182900 -0.904000 -0.400000 0.120000 --0.800000 -0.354700 -0.121900 -0.848000 -0.512000 0.080000 --0.771000 -0.401700 -0.121900 -0.872000 -0.456000 0.128000 --0.800000 -0.351500 -0.101400 -0.840000 -0.528000 0.104000 --0.762700 -0.401700 -0.060900 -0.840000 -0.496000 0.168000 --0.794800 -0.351500 -0.060900 -0.816000 -0.552000 0.144000 --0.800000 -0.351500 -0.101400 -0.840000 -0.528000 0.104000 --0.800000 -0.343900 -0.060900 -0.816000 -0.552000 0.128000 --0.800000 -0.343900 -0.060900 -0.816000 -0.552000 0.128000 --0.700000 0.150600 -0.043600 0.552000 0.712000 0.424000 --0.700000 0.150600 -0.043600 0.552000 0.712000 0.424000 --0.700000 0.159000 -0.060900 0.600000 0.776000 0.184000 --0.689800 0.150600 -0.060900 0.640000 0.736000 0.192000 --0.700000 0.150600 -0.089800 0.592000 0.744000 -0.280000 --0.650000 0.112000 -0.060900 0.672000 0.704000 0.200000 --0.700000 0.140000 -0.121900 0.536000 0.728000 -0.408000 --0.650000 0.100400 -0.098000 0.720000 0.624000 -0.288000 --0.657700 0.100400 -0.121900 0.728000 0.576000 -0.360000 --0.650000 0.089500 -0.121900 0.728000 0.552000 -0.384000 --0.700000 0.100400 -0.182100 0.536000 0.592000 -0.592000 --0.650000 0.050200 -0.178200 0.664000 0.544000 -0.504000 --0.700000 0.099700 -0.182900 0.504000 0.560000 -0.640000 --0.652800 0.050200 -0.182900 0.592000 0.536000 -0.592000 --0.700000 0.050200 -0.235800 0.504000 0.432000 -0.744000 --0.650000 0.045800 -0.182900 0.672000 0.432000 -0.592000 --0.700000 0.037400 -0.243900 0.440000 0.392000 -0.800000 --0.650000 0.000000 -0.224600 0.632000 0.368000 -0.672000 --0.669700 0.000000 -0.243900 0.480000 0.312000 -0.808000 --0.700000 0.037400 -0.243900 0.440000 0.392000 -0.800000 --0.700000 0.000000 -0.262900 0.392000 0.288000 -0.864000 --0.700000 0.000000 -0.262900 0.392000 0.288000 -0.864000 --0.650000 -0.541900 0.000000 -0.528000 -0.600000 0.592000 --0.650000 -0.541900 0.000000 -0.528000 -0.600000 0.592000 --0.633400 -0.552300 0.000000 -0.384000 -0.672000 0.624000 --0.650000 -0.552300 -0.012600 -0.496000 -0.592000 0.624000 --0.650000 -0.552300 -0.012600 -0.496000 -0.592000 0.624000 --0.452400 -0.100400 -0.060900 -0.344000 0.936000 -0.016000 --0.452400 -0.100400 -0.060900 -0.344000 0.936000 -0.016000 --0.450000 -0.099400 -0.060900 -0.760000 0.616000 0.160000 --0.450000 -0.100400 -0.057100 -0.400000 0.872000 0.264000 --0.406900 -0.050200 -0.060900 -0.848000 0.520000 0.000000 --0.434300 -0.100400 0.000000 -0.648000 0.720000 0.208000 --0.400000 -0.050200 -0.003200 -0.712000 0.672000 0.168000 --0.400000 -0.050900 0.000000 -0.776000 0.576000 0.224000 --0.399300 -0.050200 0.000000 -0.696000 0.680000 0.184000 --0.399300 -0.050200 0.000000 -0.696000 0.680000 0.184000 --0.466200 -0.502100 0.000000 0.712000 -0.616000 0.320000 --0.466200 -0.502100 0.000000 0.712000 -0.616000 0.320000 --0.450000 -0.489500 0.000000 0.584000 -0.760000 0.264000 --0.450000 -0.502100 -0.045100 0.560000 -0.696000 0.432000 --0.403800 -0.451900 0.000000 0.744000 -0.560000 0.352000 --0.400000 -0.502100 -0.024700 0.848000 -0.224000 0.464000 --0.400000 -0.451900 -0.009600 0.744000 -0.536000 0.376000 --0.403800 -0.451900 0.000000 0.744000 -0.560000 0.352000 --0.400000 -0.447100 0.000000 0.720000 -0.584000 0.344000 --0.400000 -0.451900 -0.009600 0.744000 -0.536000 0.376000 --0.350000 -0.427600 0.000000 0.560000 -0.752000 0.336000 --0.350000 -0.451900 -0.058800 0.248000 -0.624000 0.728000 --0.350000 -0.451900 -0.058800 0.248000 -0.624000 0.728000 --0.500000 -0.552300 -0.009400 0.352000 -0.840000 0.400000 --0.500000 -0.552300 -0.009400 0.352000 -0.840000 0.400000 --0.478800 -0.552300 -0.060900 0.704000 -0.592000 0.376000 --0.500000 -0.570000 -0.060900 0.480000 -0.800000 0.328000 --0.452200 -0.552300 -0.121900 0.864000 0.184000 0.464000 --0.500000 -0.589900 -0.121900 0.408000 -0.832000 0.352000 --0.450000 -0.552300 -0.127200 0.616000 -0.144000 0.768000 --0.500000 -0.602500 -0.155300 0.000000 -0.920000 0.376000 --0.450000 -0.558900 -0.121900 0.808000 0.320000 0.488000 --0.474100 -0.602500 -0.121900 -0.520000 -0.712000 0.456000 --0.450000 -0.602500 -0.084100 -0.232000 -0.736000 0.624000 --0.450000 -0.612400 -0.121900 0.032000 -0.944000 0.312000 --0.410500 -0.602500 -0.121900 0.456000 -0.632000 0.616000 --0.450000 -0.629600 -0.182900 -0.344000 -0.872000 0.320000 --0.400000 -0.602500 -0.131300 0.560000 -0.576000 0.584000 --0.400000 -0.651500 -0.182900 -0.552000 -0.472000 0.672000 --0.386500 -0.602500 -0.182900 0.376000 -0.032000 0.920000 --0.400000 -0.652700 -0.184800 -0.640000 -0.536000 0.536000 --0.350000 -0.647900 -0.182900 0.008000 0.768000 0.624000 --0.396000 -0.652700 -0.182900 -0.176000 0.000000 0.984000 --0.350000 -0.652700 -0.168800 -0.864000 0.056000 0.488000 --0.350700 -0.703000 -0.182900 -0.792000 -0.176000 0.576000 --0.350000 -0.703000 -0.180700 -0.616000 -0.504000 0.592000 --0.350000 -0.704300 -0.182900 -0.112000 -0.808000 0.576000 --0.300000 -0.703000 -0.173800 0.616000 -0.544000 0.552000 --0.300000 -0.708000 -0.182900 0.360000 -0.768000 0.520000 --0.293800 -0.703000 -0.182900 0.608000 -0.624000 0.488000 --0.300000 -0.736500 -0.243900 0.320000 -0.832000 0.440000 --0.256000 -0.703000 -0.243900 0.696000 -0.392000 0.584000 --0.300000 -0.753200 -0.286100 0.088000 -0.928000 0.352000 --0.250000 -0.703000 -0.252700 0.704000 -0.368000 0.600000 --0.281500 -0.753200 -0.304800 0.312000 -0.920000 -0.216000 --0.250000 -0.737300 -0.304800 0.568000 -0.808000 -0.112000 --0.300000 -0.753200 -0.317300 0.136000 -0.840000 -0.512000 --0.250000 -0.703000 -0.346500 0.432000 -0.280000 -0.848000 --0.300000 -0.703000 -0.365100 0.056000 -0.232000 -0.968000 --0.250000 -0.652700 -0.361600 0.240000 -0.216000 -0.944000 --0.300000 -0.687100 -0.365800 0.104000 -0.048000 -0.992000 --0.282800 -0.652700 -0.365800 0.080000 -0.160000 -0.976000 --0.300000 -0.652700 -0.367500 0.064000 -0.112000 -0.984000 --0.300000 -0.687100 -0.365800 0.104000 -0.048000 -0.992000 --0.350000 -0.652700 -0.376000 0.560000 0.160000 -0.808000 --0.350000 -0.679200 -0.365800 -0.072000 -0.176000 -0.976000 --0.400000 -0.652700 -0.368100 -0.128000 -0.872000 -0.456000 --0.400000 -0.653700 -0.365800 -0.176000 -0.888000 -0.416000 --0.405700 -0.652700 -0.365800 -0.144000 -0.920000 -0.344000 --0.400000 -0.672200 -0.304800 -0.400000 -0.904000 -0.128000 --0.450000 -0.652700 -0.319500 -0.256000 -0.952000 -0.136000 --0.450000 -0.654300 -0.304800 -0.272000 -0.952000 0.040000 --0.455200 -0.652700 -0.304800 -0.280000 -0.952000 0.040000 --0.450000 -0.652700 -0.293400 -0.288000 -0.936000 0.160000 --0.500000 -0.637800 -0.304800 -0.208000 -0.976000 -0.032000 --0.450000 -0.644000 -0.243900 -0.352000 -0.912000 0.200000 --0.500000 -0.625200 -0.243900 -0.096000 -0.960000 0.240000 --0.450000 -0.629600 -0.182900 -0.344000 -0.872000 0.320000 --0.500000 -0.610400 -0.182900 -0.136000 -0.936000 0.304000 --0.450000 -0.612400 -0.121900 0.032000 -0.944000 0.312000 --0.500000 -0.602500 -0.155300 0.000000 -0.920000 0.376000 --0.474100 -0.602500 -0.121900 -0.520000 -0.712000 0.456000 --0.474100 -0.602500 -0.121900 -0.520000 -0.712000 0.456000 --0.350000 0.148000 -0.060900 -0.504000 0.552000 0.656000 --0.350000 0.148000 -0.060900 -0.504000 0.552000 0.656000 --0.350000 0.100400 -0.017600 -0.744000 0.352000 0.552000 --0.361800 0.100400 -0.060900 -0.920000 0.112000 -0.352000 --0.350000 0.077100 0.000000 -0.776000 0.256000 0.568000 --0.358600 0.050200 -0.060900 -0.920000 0.168000 -0.328000 --0.355100 0.050200 0.000000 -0.872000 0.216000 0.416000 --0.355100 0.050200 0.000000 -0.872000 0.216000 0.416000 --0.307400 0.401700 -0.060900 -0.696000 0.688000 -0.152000 --0.307400 0.401700 -0.060900 -0.696000 0.688000 -0.152000 --0.300000 0.408800 -0.060900 -0.664000 0.712000 -0.184000 --0.300000 0.401700 -0.053800 -0.512000 0.520000 0.672000 --0.250000 0.447500 -0.060900 -0.512000 0.744000 0.408000 --0.250000 0.401700 -0.023000 -0.400000 -0.016000 0.912000 --0.242600 0.451900 -0.060900 -0.440000 0.728000 0.512000 --0.208400 0.401700 0.000000 -0.424000 0.248000 0.864000 --0.200000 0.451900 -0.034900 -0.360000 0.584000 0.720000 --0.200000 0.408700 0.000000 -0.112000 0.496000 0.856000 --0.150000 0.451900 -0.004000 -0.136000 0.584000 0.792000 --0.185900 0.401700 0.000000 0.264000 0.248000 0.928000 --0.150000 0.401700 -0.011900 0.240000 0.256000 0.928000 --0.150000 0.451900 -0.004000 -0.136000 0.584000 0.792000 --0.100000 0.401700 -0.042400 0.232000 -0.088000 0.960000 --0.100000 0.451900 -0.019200 0.136000 0.056000 0.984000 --0.050000 0.401700 -0.052300 0.176000 0.040000 0.976000 --0.050000 0.451900 -0.049700 0.432000 0.024000 0.896000 --0.100000 0.451900 -0.019200 0.136000 0.056000 0.984000 --0.050000 0.502100 -0.046900 0.400000 0.496000 0.760000 --0.100000 0.502100 -0.041900 -0.080000 0.528000 0.840000 --0.050000 0.515300 -0.060900 0.432000 0.792000 0.408000 --0.100000 0.517800 -0.060900 -0.120000 0.976000 0.136000 --0.100000 0.502100 -0.041900 -0.080000 0.528000 0.840000 --0.146800 0.502100 -0.060900 -0.272000 0.960000 0.016000 --0.100000 0.451900 -0.019200 0.136000 0.056000 0.984000 --0.150000 0.501300 -0.060900 -0.376000 0.880000 -0.280000 --0.150000 0.451900 -0.004000 -0.136000 0.584000 0.792000 --0.200000 0.477600 -0.060900 -0.544000 0.808000 -0.208000 --0.200000 0.451900 -0.034900 -0.360000 0.584000 0.720000 --0.242600 0.451900 -0.060900 -0.440000 0.728000 0.512000 --0.200000 0.477600 -0.060900 -0.544000 0.808000 -0.208000 --0.200000 0.451900 -0.081300 -0.400000 0.504000 -0.752000 --0.200000 0.451900 -0.081300 -0.400000 0.504000 -0.752000 --0.321000 0.100400 0.000000 -0.264000 0.416000 0.864000 --0.321000 0.100400 0.000000 -0.264000 0.416000 0.864000 --0.350000 0.077100 0.000000 -0.776000 0.256000 0.568000 --0.350000 0.100400 -0.017600 -0.744000 0.352000 0.552000 --0.350000 0.100400 -0.017600 -0.744000 0.352000 0.552000 --0.250000 0.351500 -0.004200 0.040000 0.000000 0.992000 --0.250000 0.351500 -0.004200 0.040000 0.000000 0.992000 --0.300000 0.351500 -0.024700 -0.384000 0.216000 0.896000 --0.250000 0.301200 -0.005700 0.112000 -0.104000 0.984000 --0.300000 0.301200 -0.020200 -0.184000 0.032000 0.976000 --0.250000 0.251000 -0.029400 0.176000 -0.456000 0.864000 --0.300000 0.251000 -0.020200 0.208000 -0.160000 0.960000 --0.250000 0.219300 -0.060900 0.304000 -0.640000 0.696000 --0.300000 0.200800 -0.040500 0.440000 0.208000 0.864000 --0.277600 0.200800 -0.060900 0.584000 -0.072000 0.800000 --0.250000 0.219300 -0.060900 0.304000 -0.640000 0.696000 --0.250000 0.200800 -0.094600 -0.184000 -0.064000 0.976000 --0.200000 0.206100 -0.060900 -0.448000 -0.184000 0.872000 --0.200000 0.200800 -0.062300 -0.304000 0.376000 0.864000 --0.198000 0.200800 -0.060900 -0.464000 0.288000 0.832000 --0.200000 0.199100 -0.060900 -0.320000 0.504000 0.792000 --0.200000 0.200800 -0.062300 -0.304000 0.376000 0.864000 --0.250000 0.177000 -0.060900 -0.096000 0.568000 0.808000 --0.250000 0.200800 -0.094600 -0.184000 -0.064000 0.976000 --0.277600 0.200800 -0.060900 0.584000 -0.072000 0.800000 --0.277600 0.200800 -0.060900 0.584000 -0.072000 0.800000 --0.250000 -0.351500 -0.038300 0.104000 -0.504000 0.848000 --0.250000 -0.351500 -0.038300 0.104000 -0.504000 0.848000 --0.300000 -0.351500 -0.012600 0.872000 -0.352000 0.320000 --0.250000 -0.401700 -0.058800 -0.096000 -0.136000 0.984000 --0.300000 -0.401700 -0.045100 0.792000 -0.248000 0.544000 --0.250000 -0.451900 -0.040500 -0.352000 -0.008000 0.928000 --0.300000 -0.435300 -0.060900 -0.192000 -0.360000 0.912000 --0.287100 -0.451900 -0.060900 -0.448000 -0.328000 0.824000 --0.300000 -0.451900 -0.070300 -0.328000 -0.392000 0.856000 --0.279200 -0.502100 -0.060900 -0.688000 -0.328000 0.640000 --0.300000 -0.502100 -0.097100 -0.592000 -0.576000 0.560000 --0.250000 -0.533000 -0.060900 -0.336000 -0.760000 0.544000 --0.300000 -0.516400 -0.121900 -0.256000 -0.872000 0.400000 --0.250000 -0.552300 -0.101500 -0.080000 -0.904000 0.400000 --0.260200 -0.552300 -0.121900 -0.560000 -0.752000 0.336000 --0.250000 -0.559400 -0.121900 -0.088000 -0.912000 0.384000 --0.285200 -0.552300 -0.182900 -0.616000 -0.680000 0.384000 --0.250000 -0.581300 -0.182900 -0.104000 -0.888000 0.440000 --0.300000 -0.552300 -0.209900 -0.624000 -0.616000 0.456000 --0.250000 -0.602500 -0.226600 0.288000 -0.512000 0.800000 --0.300000 -0.594300 -0.243900 -0.424000 -0.464000 0.768000 --0.286800 -0.602500 -0.243900 -0.320000 0.232000 0.912000 --0.300000 -0.602500 -0.250000 -0.408000 0.368000 0.824000 --0.300000 -0.607200 -0.243900 -0.248000 0.672000 0.688000 --0.344900 -0.602500 -0.304800 -0.744000 0.664000 -0.032000 --0.350000 -0.630200 -0.243900 -0.144000 0.776000 0.600000 --0.350000 -0.605300 -0.304800 0.248000 0.960000 -0.032000 --0.371400 -0.602500 -0.243900 0.928000 0.016000 0.352000 --0.351600 -0.602500 -0.304800 0.944000 0.304000 0.024000 --0.363900 -0.552300 -0.243900 0.816000 -0.480000 0.304000 --0.350000 -0.594300 -0.304800 0.520000 -0.800000 0.280000 --0.350000 -0.552300 -0.283400 -0.096000 -0.680000 0.720000 --0.344900 -0.602500 -0.304800 -0.744000 0.664000 -0.032000 --0.317500 -0.552300 -0.243900 -0.600000 -0.648000 0.448000 --0.300000 -0.602500 -0.250000 -0.408000 0.368000 0.824000 --0.300000 -0.594300 -0.243900 -0.424000 -0.464000 0.768000 --0.317500 -0.552300 -0.243900 -0.600000 -0.648000 0.448000 --0.300000 -0.552300 -0.209900 -0.624000 -0.616000 0.456000 --0.350000 -0.535600 -0.243900 0.360000 -0.840000 0.384000 --0.300000 -0.538300 -0.182900 -0.584000 -0.696000 0.408000 --0.350000 -0.518400 -0.182900 -0.088000 -0.928000 0.360000 --0.300000 -0.516400 -0.121900 -0.256000 -0.872000 0.400000 --0.350000 -0.503000 -0.121900 0.232000 -0.880000 0.400000 --0.300000 -0.502100 -0.097100 -0.592000 -0.576000 0.560000 --0.350000 -0.502100 -0.119400 0.240000 -0.864000 0.424000 --0.300000 -0.451900 -0.070300 -0.328000 -0.392000 0.856000 --0.350000 -0.453900 -0.060900 0.248000 -0.624000 0.728000 --0.338500 -0.451900 -0.060900 0.112000 -0.632000 0.760000 --0.300000 -0.451900 -0.070300 -0.328000 -0.392000 0.856000 --0.300000 -0.435300 -0.060900 -0.192000 -0.360000 0.912000 --0.300000 -0.435300 -0.060900 -0.192000 -0.360000 0.912000 --0.287100 -0.451900 -0.060900 -0.448000 -0.328000 0.824000 --0.287100 -0.451900 -0.060900 -0.448000 -0.328000 0.824000 --0.279200 -0.502100 -0.060900 -0.688000 -0.328000 0.640000 --0.250000 -0.451900 -0.040500 -0.352000 -0.008000 0.928000 --0.250000 -0.502100 -0.016400 -0.320000 -0.344000 0.872000 --0.200000 -0.451900 -0.018000 0.376000 -0.112000 0.912000 --0.200000 -0.502100 -0.039000 0.512000 -0.608000 0.592000 --0.250000 -0.502100 -0.016400 -0.320000 -0.344000 0.872000 --0.200000 -0.511900 -0.060900 0.416000 -0.800000 0.424000 --0.250000 -0.533000 -0.060900 -0.336000 -0.760000 0.544000 --0.200000 -0.534300 -0.121900 0.456000 -0.832000 0.296000 --0.250000 -0.552300 -0.101500 -0.080000 -0.904000 0.400000 --0.235800 -0.552300 -0.121900 0.448000 -0.816000 0.336000 --0.250000 -0.559400 -0.121900 -0.088000 -0.912000 0.384000 --0.204600 -0.552300 -0.182900 0.504000 -0.776000 0.360000 --0.250000 -0.581300 -0.182900 -0.104000 -0.888000 0.440000 --0.200000 -0.552300 -0.190900 0.520000 -0.768000 0.360000 --0.250000 -0.602500 -0.226600 0.288000 -0.512000 0.800000 --0.200000 -0.579600 -0.243900 0.568000 -0.648000 0.496000 --0.233200 -0.602500 -0.243900 0.608000 -0.320000 0.720000 --0.200000 -0.602500 -0.268600 0.488000 -0.432000 0.752000 --0.241600 -0.652700 -0.243900 0.680000 -0.216000 0.688000 --0.200000 -0.652700 -0.286600 0.488000 -0.272000 0.824000 --0.250000 -0.679700 -0.243900 0.728000 -0.208000 0.640000 --0.200000 -0.693500 -0.304800 0.872000 -0.464000 -0.120000 --0.250000 -0.703000 -0.252700 0.704000 -0.368000 0.600000 --0.204300 -0.703000 -0.304800 0.856000 -0.496000 -0.088000 --0.250000 -0.737300 -0.304800 0.568000 -0.808000 -0.112000 --0.250000 -0.703000 -0.346500 0.432000 -0.280000 -0.848000 --0.204300 -0.703000 -0.304800 0.856000 -0.496000 -0.088000 --0.250000 -0.652700 -0.361600 0.240000 -0.216000 -0.944000 --0.200000 -0.693500 -0.304800 0.872000 -0.464000 -0.120000 --0.200000 -0.652700 -0.326500 0.488000 -0.272000 -0.824000 --0.171500 -0.652700 -0.304800 0.576000 -0.304000 0.752000 --0.200000 -0.693500 -0.304800 0.872000 -0.464000 -0.120000 --0.200000 -0.652700 -0.286600 0.488000 -0.272000 0.824000 --0.200000 -0.652700 -0.286600 0.488000 -0.272000 0.824000 --0.279200 -0.502100 -0.060900 -0.688000 -0.328000 0.640000 --0.279200 -0.502100 -0.060900 -0.688000 -0.328000 0.640000 --0.250000 -0.502100 -0.016400 -0.320000 -0.344000 0.872000 --0.250000 -0.533000 -0.060900 -0.336000 -0.760000 0.544000 --0.250000 -0.533000 -0.060900 -0.336000 -0.760000 0.544000 --0.200000 0.351500 -0.009600 0.208000 -0.208000 0.952000 --0.200000 0.351500 -0.009600 0.208000 -0.208000 0.952000 --0.250000 0.351500 -0.004200 0.040000 0.000000 0.992000 --0.200000 0.301200 -0.022600 0.056000 -0.176000 0.976000 --0.250000 0.301200 -0.005700 0.112000 -0.104000 0.984000 --0.200000 0.251000 -0.048300 -0.120000 -0.296000 0.944000 --0.250000 0.251000 -0.029400 0.176000 -0.456000 0.864000 --0.200000 0.206100 -0.060900 -0.448000 -0.184000 0.872000 --0.250000 0.219300 -0.060900 0.304000 -0.640000 0.696000 --0.250000 0.219300 -0.060900 0.304000 -0.640000 0.696000 --0.200000 -0.351500 -0.031500 -0.320000 -0.128000 0.936000 --0.200000 -0.351500 -0.031500 -0.320000 -0.128000 0.936000 --0.250000 -0.351500 -0.038300 0.104000 -0.504000 0.848000 --0.200000 -0.401700 -0.023400 -0.056000 -0.008000 0.992000 --0.250000 -0.401700 -0.058800 -0.096000 -0.136000 0.984000 --0.200000 -0.451900 -0.018000 0.376000 -0.112000 0.912000 --0.250000 -0.451900 -0.040500 -0.352000 -0.008000 0.928000 --0.250000 -0.451900 -0.040500 -0.352000 -0.008000 0.928000 --0.200000 0.150600 -0.023100 -0.360000 0.472000 0.792000 --0.200000 0.150600 -0.023100 -0.360000 0.472000 0.792000 --0.200000 0.100400 -0.008800 0.176000 0.488000 0.848000 --0.150000 0.150600 -0.037800 0.256000 -0.016000 0.960000 --0.150000 0.100400 -0.027500 0.432000 0.296000 0.848000 --0.114400 0.150600 -0.060900 0.520000 -0.344000 0.776000 --0.122500 0.100400 -0.060900 0.768000 -0.048000 0.624000 --0.100000 0.150600 -0.075000 0.592000 -0.416000 0.688000 --0.100000 0.100400 -0.099400 0.760000 -0.264000 0.584000 --0.067900 0.150600 -0.121900 0.736000 -0.432000 0.504000 --0.089100 0.100400 -0.121900 0.816000 -0.232000 0.520000 --0.050000 0.150600 -0.159500 0.712000 -0.480000 0.504000 --0.053800 0.100400 -0.182900 0.984000 -0.072000 0.112000 --0.050000 0.116900 -0.182900 0.944000 -0.304000 0.048000 --0.051400 0.100400 -0.243900 0.776000 0.216000 -0.576000 --0.050000 0.150600 -0.210200 0.840000 -0.208000 -0.496000 --0.077600 0.150600 -0.243900 0.320000 0.328000 -0.880000 --0.051400 0.100400 -0.243900 0.776000 0.216000 -0.576000 --0.100000 0.150600 -0.251000 -0.024000 0.408000 -0.904000 --0.100000 0.100400 -0.276400 0.032000 0.376000 -0.920000 --0.126800 0.150600 -0.243900 -0.208000 0.496000 -0.832000 --0.150000 0.100400 -0.267100 -0.312000 0.440000 -0.832000 --0.150000 0.141700 -0.243900 -0.352000 0.528000 -0.768000 --0.198500 0.100400 -0.243900 -0.376000 0.480000 -0.784000 --0.150000 0.100400 -0.267100 -0.312000 0.440000 -0.832000 --0.200000 0.099300 -0.243900 -0.456000 0.488000 -0.736000 --0.150000 0.050200 -0.299600 -0.080000 0.408000 -0.904000 --0.200000 0.050200 -0.277000 -0.312000 0.416000 -0.848000 --0.150000 0.040500 -0.304800 -0.136000 0.416000 -0.896000 --0.200000 0.008900 -0.304800 -0.304000 0.456000 -0.832000 --0.150000 0.000000 -0.322200 0.064000 0.240000 -0.968000 --0.200000 0.000000 -0.310700 -0.288000 0.424000 -0.848000 --0.150000 -0.050200 -0.328000 0.128000 0.064000 -0.984000 --0.200000 -0.050200 -0.330400 -0.144000 0.264000 -0.944000 --0.150000 -0.100400 -0.338700 0.056000 -0.088000 -0.992000 --0.200000 -0.100400 -0.330100 -0.024000 -0.008000 -0.992000 --0.150000 -0.150600 -0.309500 -0.032000 -0.400000 -0.912000 --0.200000 -0.150600 -0.333300 0.216000 -0.272000 -0.936000 --0.200000 -0.100400 -0.330100 -0.024000 -0.008000 -0.992000 --0.250000 -0.150600 -0.327500 -0.120000 0.152000 -0.976000 --0.250000 -0.100400 -0.327300 -0.384000 0.152000 -0.904000 --0.200000 -0.100400 -0.330100 -0.024000 -0.008000 -0.992000 --0.250000 -0.050200 -0.318700 -0.440000 0.320000 -0.832000 --0.200000 -0.050200 -0.330400 -0.144000 0.264000 -0.944000 --0.250000 -0.028200 -0.304800 -0.400000 0.416000 -0.808000 --0.200000 0.000000 -0.310700 -0.288000 0.424000 -0.848000 --0.213400 0.000000 -0.304800 -0.304000 0.448000 -0.832000 --0.200000 0.008900 -0.304800 -0.304000 0.456000 -0.832000 --0.250000 0.000000 -0.286200 -0.320000 0.712000 -0.616000 --0.200000 0.050200 -0.277000 -0.312000 0.416000 -0.848000 --0.250000 0.050200 -0.254100 -0.584000 0.656000 -0.464000 --0.200000 0.099300 -0.243900 -0.456000 0.488000 -0.736000 --0.250000 0.055800 -0.243900 -0.560000 0.648000 -0.504000 --0.250000 0.050200 -0.254100 -0.584000 0.656000 -0.464000 --0.256300 0.050200 -0.243900 -0.592000 0.624000 -0.488000 --0.256300 0.050200 -0.243900 -0.592000 0.624000 -0.488000 --0.200000 -0.502100 -0.039000 0.512000 -0.608000 0.592000 --0.200000 -0.502100 -0.039000 0.512000 -0.608000 0.592000 --0.181900 -0.502100 -0.060900 0.504000 -0.680000 0.520000 --0.200000 -0.511900 -0.060900 0.416000 -0.800000 0.424000 --0.200000 -0.511900 -0.060900 0.416000 -0.800000 0.424000 --0.100000 0.401700 -0.042400 0.232000 -0.088000 0.960000 --0.100000 0.401700 -0.042400 0.232000 -0.088000 0.960000 --0.150000 0.401700 -0.011900 0.240000 0.256000 0.928000 --0.100000 0.351500 -0.035500 0.120000 0.000000 0.992000 --0.150000 0.351500 -0.029900 0.096000 -0.168000 0.976000 --0.100000 0.301200 -0.032000 0.168000 0.008000 0.984000 --0.150000 0.301200 -0.033800 0.040000 -0.024000 0.992000 --0.100000 0.251000 -0.029400 0.344000 -0.104000 0.928000 --0.150000 0.251000 -0.027500 -0.136000 -0.104000 0.984000 --0.100000 0.200800 -0.041900 0.456000 -0.304000 0.832000 --0.150000 0.200800 -0.027500 -0.320000 -0.168000 0.928000 --0.100000 0.167200 -0.060900 0.520000 -0.424000 0.736000 --0.150000 0.150600 -0.037800 0.256000 -0.016000 0.960000 --0.114400 0.150600 -0.060900 0.520000 -0.344000 0.776000 --0.100000 0.167200 -0.060900 0.520000 -0.424000 0.736000 --0.100000 0.150600 -0.075000 0.592000 -0.416000 0.688000 --0.078700 0.200800 -0.060900 0.568000 -0.416000 0.704000 --0.067900 0.150600 -0.121900 0.736000 -0.432000 0.504000 --0.050000 0.200800 -0.090500 0.520000 -0.520000 0.672000 --0.050000 0.170300 -0.121900 0.584000 -0.576000 0.560000 --0.067900 0.150600 -0.121900 0.736000 -0.432000 0.504000 --0.050000 0.150600 -0.159500 0.712000 -0.480000 0.504000 --0.050000 0.150600 -0.159500 0.712000 -0.480000 0.504000 --0.150000 0.100400 -0.027500 0.432000 0.296000 0.848000 --0.150000 0.100400 -0.027500 0.432000 0.296000 0.848000 --0.150000 0.050200 -0.012600 0.624000 0.240000 0.728000 --0.122500 0.100400 -0.060900 0.768000 -0.048000 0.624000 --0.123500 0.050200 -0.060900 0.888000 -0.104000 0.440000 --0.100000 0.100400 -0.099400 0.760000 -0.264000 0.584000 --0.100700 0.050200 -0.121900 0.856000 0.048000 0.504000 --0.100000 0.054100 -0.121900 0.816000 -0.176000 0.544000 --0.100000 0.050200 -0.123300 0.696000 -0.176000 0.688000 --0.089100 0.100400 -0.121900 0.816000 -0.232000 0.520000 --0.051100 0.050200 -0.182900 0.712000 0.184000 0.664000 --0.053800 0.100400 -0.182900 0.984000 -0.072000 0.112000 --0.050000 0.050200 -0.189300 0.800000 0.488000 0.336000 --0.051400 0.100400 -0.243900 0.776000 0.216000 -0.576000 --0.050000 0.095100 -0.243900 0.808000 0.256000 -0.520000 --0.100000 0.100400 -0.276400 0.032000 0.376000 -0.920000 --0.050000 0.050200 -0.257500 0.608000 0.208000 -0.760000 --0.100000 0.050200 -0.292200 0.304000 0.312000 -0.896000 --0.050000 0.000000 -0.288000 0.256000 0.560000 -0.776000 --0.100000 0.022400 -0.304800 0.184000 0.304000 -0.928000 --0.077600 0.000000 -0.304800 0.248000 0.344000 -0.896000 --0.100000 0.000000 -0.309600 0.168000 0.152000 -0.968000 --0.050000 -0.015100 -0.304800 0.280000 0.536000 -0.784000 --0.100000 -0.050200 -0.318600 0.080000 0.144000 -0.984000 --0.050000 -0.050200 -0.321000 0.120000 0.280000 -0.944000 --0.100000 -0.100400 -0.323700 -0.040000 -0.152000 -0.984000 --0.050000 -0.100400 -0.342800 0.056000 -0.032000 -0.992000 --0.100000 -0.150600 -0.315000 -0.456000 -0.064000 -0.880000 --0.050000 -0.150600 -0.332400 0.016000 -0.080000 -0.992000 --0.050000 -0.100400 -0.342800 0.056000 -0.032000 -0.992000 -0.000000 -0.150600 -0.318000 0.160000 0.016000 -0.984000 -0.000000 -0.100400 -0.336000 0.328000 -0.184000 -0.920000 -0.050000 -0.150600 -0.318000 0.352000 0.312000 -0.872000 -0.039400 -0.100400 -0.304800 0.408000 0.224000 -0.880000 -0.050000 -0.119800 -0.304800 0.416000 0.264000 -0.864000 -0.050000 -0.100400 -0.298100 0.360000 0.248000 -0.896000 -0.096000 -0.150600 -0.304800 0.176000 0.336000 -0.920000 -0.100000 -0.100400 -0.298900 0.040000 0.136000 -0.984000 -0.100000 -0.150600 -0.303900 -0.176000 0.088000 -0.976000 -0.114400 -0.100400 -0.304800 -0.344000 0.128000 -0.928000 -0.101900 -0.150600 -0.304800 -0.296000 0.368000 -0.872000 -0.100000 -0.150600 -0.303900 -0.176000 0.088000 -0.976000 -0.100000 -0.151600 -0.304800 -0.176000 0.536000 -0.816000 -0.096000 -0.150600 -0.304800 0.176000 0.336000 -0.920000 -0.096000 -0.150600 -0.304800 0.176000 0.336000 -0.920000 --0.150000 0.050200 -0.012600 0.624000 0.240000 0.728000 --0.150000 0.050200 -0.012600 0.624000 0.240000 0.728000 --0.150000 0.000000 -0.001200 0.744000 0.064000 0.656000 --0.123500 0.050200 -0.060900 0.888000 -0.104000 0.440000 --0.120900 0.000000 -0.060900 0.800000 0.080000 0.592000 --0.100700 0.050200 -0.121900 0.856000 0.048000 0.504000 --0.100000 0.000000 -0.110200 0.808000 0.176000 0.552000 --0.100000 0.044900 -0.121900 0.816000 0.112000 0.552000 --0.089600 0.000000 -0.121900 0.568000 0.512000 0.632000 --0.100000 0.050200 -0.123300 0.696000 -0.176000 0.688000 --0.050000 0.000000 -0.158900 0.584000 0.336000 0.728000 --0.051100 0.050200 -0.182900 0.712000 0.184000 0.664000 --0.050000 0.047900 -0.182900 0.488000 0.480000 0.720000 --0.050000 0.050200 -0.189300 0.800000 0.488000 0.336000 -0.000000 0.039200 -0.182900 0.256000 0.544000 0.792000 -0.000000 0.050200 -0.198900 0.168000 0.840000 0.504000 -0.050000 0.005700 -0.182900 0.312000 0.584000 0.744000 -0.046000 0.050200 -0.243900 0.728000 0.480000 -0.472000 -0.050000 0.042300 -0.243900 0.688000 0.376000 -0.616000 -0.000000 0.050200 -0.275900 0.288000 0.416000 -0.856000 -0.050000 0.000000 -0.258500 0.448000 0.256000 -0.848000 -0.000000 0.000000 -0.289100 0.520000 0.272000 -0.800000 -0.050000 -0.050200 -0.279200 0.280000 0.320000 -0.896000 -0.000000 -0.038700 -0.304800 0.368000 0.192000 -0.904000 -0.004800 -0.050200 -0.304800 0.368000 0.176000 -0.904000 -0.000000 -0.050200 -0.306900 0.320000 0.152000 -0.928000 -0.039400 -0.100400 -0.304800 0.408000 0.224000 -0.880000 -0.000000 -0.100400 -0.336000 0.328000 -0.184000 -0.920000 -0.000000 -0.050200 -0.306900 0.320000 0.152000 -0.928000 --0.050000 -0.100400 -0.342800 0.056000 -0.032000 -0.992000 --0.050000 -0.050200 -0.321000 0.120000 0.280000 -0.944000 -0.000000 -0.050200 -0.306900 0.320000 0.152000 -0.928000 --0.050000 -0.015100 -0.304800 0.280000 0.536000 -0.784000 -0.000000 -0.038700 -0.304800 0.368000 0.192000 -0.904000 --0.050000 0.000000 -0.288000 0.256000 0.560000 -0.776000 -0.000000 0.000000 -0.289100 0.520000 0.272000 -0.800000 --0.050000 0.050200 -0.257500 0.608000 0.208000 -0.760000 -0.000000 0.050200 -0.275900 0.288000 0.416000 -0.856000 --0.050000 0.095100 -0.243900 0.808000 0.256000 -0.520000 -0.000000 0.087200 -0.243900 0.456000 0.816000 -0.344000 --0.050000 0.050200 -0.189300 0.800000 0.488000 0.336000 -0.000000 0.050200 -0.198900 0.168000 0.840000 0.504000 -0.000000 0.087200 -0.243900 0.456000 0.816000 -0.344000 -0.046000 0.050200 -0.243900 0.728000 0.480000 -0.472000 -0.000000 0.050200 -0.275900 0.288000 0.416000 -0.856000 -0.000000 0.050200 -0.275900 0.288000 0.416000 -0.856000 --0.150000 0.000000 -0.001200 0.744000 0.064000 0.656000 --0.150000 0.000000 -0.001200 0.744000 0.064000 0.656000 --0.150000 -0.050200 -0.005700 0.768000 -0.024000 0.632000 --0.120900 0.000000 -0.060900 0.800000 0.080000 0.592000 --0.114700 -0.050200 -0.060900 0.632000 0.112000 0.760000 --0.100000 0.000000 -0.110200 0.808000 0.176000 0.552000 --0.100000 -0.050200 -0.077100 0.584000 0.232000 0.768000 --0.089600 0.000000 -0.121900 0.568000 0.512000 0.632000 --0.050000 -0.050200 -0.098600 0.240000 0.488000 0.832000 --0.050000 -0.024600 -0.121900 0.296000 0.656000 0.688000 -0.000000 -0.050200 -0.114000 0.064000 0.408000 0.904000 -0.000000 -0.035500 -0.121900 0.072000 0.496000 0.856000 -0.050000 -0.050200 -0.115700 0.016000 0.416000 0.904000 -0.050000 -0.038600 -0.121900 0.000000 0.528000 0.840000 -0.100000 -0.050200 -0.113200 -0.016000 0.464000 0.880000 -0.100000 -0.037100 -0.121900 -0.016000 0.544000 0.832000 -0.150000 -0.050200 -0.113700 0.032000 0.448000 0.888000 -0.150000 -0.036300 -0.121900 0.008000 0.488000 0.864000 -0.100000 -0.037100 -0.121900 -0.016000 0.544000 0.832000 -0.150000 0.000000 -0.166100 -0.096000 0.688000 0.712000 -0.100000 0.000000 -0.179900 0.000000 0.528000 0.840000 -0.150000 0.016800 -0.182900 -0.152000 0.840000 0.520000 -0.100000 0.004900 -0.182900 -0.288000 0.864000 0.400000 -0.150000 0.015400 -0.243900 -0.208000 0.728000 -0.640000 -0.100000 0.000000 -0.203800 -0.256000 0.936000 -0.224000 -0.113100 0.000000 -0.243900 -0.392000 0.768000 -0.496000 -0.100000 -0.005500 -0.243900 -0.184000 0.760000 -0.616000 -0.150000 0.000000 -0.257100 -0.208000 0.552000 -0.800000 -0.100000 -0.050200 -0.272200 -0.136000 0.384000 -0.904000 -0.150000 -0.050200 -0.298400 -0.176000 0.328000 -0.920000 -0.100000 -0.100400 -0.298900 0.040000 0.136000 -0.984000 -0.150000 -0.064700 -0.304800 -0.200000 0.328000 -0.912000 -0.114400 -0.100400 -0.304800 -0.344000 0.128000 -0.928000 -0.114400 -0.100400 -0.304800 -0.344000 0.128000 -0.928000 --0.150000 -0.050200 -0.005700 0.768000 -0.024000 0.632000 --0.150000 -0.050200 -0.005700 0.768000 -0.024000 0.632000 --0.150000 -0.100400 -0.001300 0.848000 0.032000 0.520000 --0.114700 -0.050200 -0.060900 0.632000 0.112000 0.760000 --0.104300 -0.100400 -0.060900 0.528000 0.416000 0.728000 --0.100000 -0.050200 -0.077100 0.584000 0.232000 0.768000 --0.100000 -0.100400 -0.064700 0.496000 0.416000 0.752000 --0.050000 -0.050200 -0.098600 0.240000 0.488000 0.832000 --0.050000 -0.100400 -0.073900 0.136000 0.480000 0.864000 -0.000000 -0.050200 -0.114000 0.064000 0.408000 0.904000 -0.000000 -0.100400 -0.085100 0.096000 0.456000 0.880000 -0.050000 -0.050200 -0.115700 0.016000 0.416000 0.904000 -0.050000 -0.100400 -0.083400 0.000000 0.440000 0.888000 -0.100000 -0.050200 -0.113200 -0.016000 0.464000 0.880000 -0.100000 -0.100400 -0.084200 0.032000 0.360000 0.928000 -0.150000 -0.050200 -0.113700 0.032000 0.448000 0.888000 -0.150000 -0.100400 -0.080500 0.184000 0.336000 0.920000 -0.100000 -0.100400 -0.084200 0.032000 0.360000 0.928000 -0.150000 -0.150600 -0.071000 0.136000 0.176000 0.968000 -0.100000 -0.150600 -0.068400 0.184000 0.416000 0.888000 -0.150000 -0.200800 -0.071800 0.312000 -0.208000 0.920000 -0.100000 -0.170000 -0.060900 0.256000 0.296000 0.912000 -0.130700 -0.200800 -0.060900 0.504000 0.008000 0.856000 -0.150000 -0.200800 -0.071800 0.312000 -0.208000 0.920000 -0.110300 -0.251000 -0.060900 0.504000 -0.760000 0.392000 -0.150000 -0.251000 -0.118100 0.224000 -0.792000 0.560000 -0.150000 -0.251000 -0.118100 0.224000 -0.792000 0.560000 --0.100000 -0.188700 0.000000 0.176000 0.408000 0.888000 --0.100000 -0.188700 0.000000 0.176000 0.408000 0.888000 --0.129500 -0.150600 0.000000 0.416000 0.264000 0.864000 --0.100000 -0.150600 -0.019000 0.512000 0.456000 0.720000 --0.100000 -0.150600 -0.019000 0.512000 0.456000 0.720000 --0.150000 -0.346200 0.000000 -0.392000 -0.160000 0.904000 --0.150000 -0.346200 0.000000 -0.392000 -0.160000 0.904000 --0.150000 -0.351500 -0.001100 -0.192000 -0.352000 0.912000 --0.100000 -0.344900 0.000000 0.072000 -0.528000 0.840000 --0.100000 -0.351500 -0.005700 0.248000 -0.576000 0.776000 --0.050000 -0.329200 0.000000 0.264000 -0.624000 0.720000 --0.050000 -0.351500 -0.027000 0.488000 -0.688000 0.528000 --0.100000 -0.351500 -0.005700 0.248000 -0.576000 0.776000 --0.050000 -0.370100 -0.060900 0.592000 -0.672000 0.424000 --0.100000 -0.401700 -0.044900 0.592000 -0.496000 0.624000 --0.087700 -0.401700 -0.060900 0.608000 -0.600000 0.504000 --0.100000 -0.415900 -0.060900 0.680000 -0.544000 0.480000 --0.054100 -0.401700 -0.121900 0.656000 -0.688000 0.280000 --0.100000 -0.451900 -0.117700 0.624000 -0.664000 0.392000 --0.098000 -0.451900 -0.121900 0.712000 -0.680000 0.120000 --0.100000 -0.453500 -0.121900 0.600000 -0.776000 0.168000 --0.098100 -0.451900 -0.182900 0.736000 -0.672000 0.032000 --0.100000 -0.453800 -0.182900 0.696000 -0.712000 0.024000 --0.094700 -0.451900 -0.243900 0.784000 -0.568000 0.216000 --0.100000 -0.458900 -0.243900 0.744000 -0.632000 0.192000 --0.061500 -0.451900 -0.304800 0.928000 -0.352000 0.088000 --0.100000 -0.502100 -0.283200 0.616000 -0.376000 0.680000 --0.074100 -0.502100 -0.304800 0.864000 -0.480000 0.112000 --0.100000 -0.549700 -0.304800 0.696000 -0.392000 0.592000 --0.100000 -0.502100 -0.325200 0.520000 -0.368000 -0.760000 --0.101500 -0.552300 -0.304800 0.552000 -0.392000 0.720000 --0.147100 -0.502100 -0.365800 0.472000 -0.192000 -0.848000 --0.150000 -0.552300 -0.337600 0.424000 -0.304000 -0.840000 --0.150000 -0.505900 -0.365800 0.272000 -0.320000 -0.904000 --0.196100 -0.552300 -0.365800 0.320000 -0.272000 -0.904000 --0.150000 -0.502100 -0.367300 0.088000 -0.320000 -0.936000 --0.200000 -0.552300 -0.367100 0.360000 -0.232000 -0.896000 --0.200000 -0.502100 -0.370700 0.184000 -0.352000 -0.912000 --0.200000 -0.502100 -0.370700 0.184000 -0.352000 -0.912000 --0.100000 -0.351500 -0.005700 0.248000 -0.576000 0.776000 --0.100000 -0.351500 -0.005700 0.248000 -0.576000 0.776000 --0.150000 -0.351500 -0.001100 -0.192000 -0.352000 0.912000 --0.100000 -0.401700 -0.044900 0.592000 -0.496000 0.624000 --0.150000 -0.401700 -0.019000 0.408000 -0.232000 0.880000 --0.100000 -0.415900 -0.060900 0.680000 -0.544000 0.480000 --0.150000 -0.451900 -0.041900 0.560000 -0.440000 0.696000 --0.133200 -0.451900 -0.060900 0.584000 -0.656000 0.464000 --0.150000 -0.470000 -0.060900 0.568000 -0.552000 0.600000 --0.100000 -0.451900 -0.117700 0.624000 -0.664000 0.392000 --0.150000 -0.502100 -0.111600 0.592000 -0.752000 0.280000 --0.100000 -0.453500 -0.121900 0.600000 -0.776000 0.168000 --0.146100 -0.502100 -0.121900 0.616000 -0.744000 0.232000 --0.100000 -0.453800 -0.182900 0.696000 -0.712000 0.024000 --0.141200 -0.502100 -0.182900 0.696000 -0.688000 0.184000 --0.100000 -0.458900 -0.243900 0.744000 -0.632000 0.192000 --0.125700 -0.502100 -0.243900 0.664000 -0.408000 0.624000 --0.100000 -0.502100 -0.283200 0.616000 -0.376000 0.680000 --0.150000 -0.530700 -0.243900 0.632000 -0.664000 0.392000 --0.100000 -0.549700 -0.304800 0.696000 -0.392000 0.592000 --0.150000 -0.552300 -0.270100 0.544000 -0.504000 0.656000 --0.101500 -0.552300 -0.304800 0.552000 -0.392000 0.720000 --0.150000 -0.602500 -0.302600 0.392000 -0.240000 0.880000 --0.145700 -0.602500 -0.304800 0.824000 -0.528000 0.192000 --0.150000 -0.609400 -0.304800 0.840000 -0.512000 0.152000 --0.150000 -0.602500 -0.307600 0.456000 -0.280000 -0.840000 --0.145700 -0.602500 -0.304800 0.824000 -0.528000 0.192000 --0.150000 -0.552300 -0.337600 0.424000 -0.304000 -0.840000 --0.101500 -0.552300 -0.304800 0.552000 -0.392000 0.720000 --0.101500 -0.552300 -0.304800 0.552000 -0.392000 0.720000 --0.050000 0.401700 -0.052300 0.176000 0.040000 0.976000 --0.050000 0.401700 -0.052300 0.176000 0.040000 0.976000 --0.100000 0.401700 -0.042400 0.232000 -0.088000 0.960000 --0.050000 0.351500 -0.043600 0.248000 0.032000 0.960000 --0.100000 0.351500 -0.035500 0.120000 0.000000 0.992000 --0.050000 0.301200 -0.044600 0.440000 -0.008000 0.896000 --0.100000 0.301200 -0.032000 0.168000 0.008000 0.984000 --0.050000 0.251000 -0.047300 0.528000 -0.360000 0.760000 --0.100000 0.251000 -0.029400 0.344000 -0.104000 0.928000 --0.050000 0.236000 -0.060900 0.536000 -0.496000 0.672000 --0.100000 0.200800 -0.041900 0.456000 -0.304000 0.832000 --0.078700 0.200800 -0.060900 0.568000 -0.416000 0.704000 --0.100000 0.167200 -0.060900 0.520000 -0.424000 0.736000 --0.100000 0.167200 -0.060900 0.520000 -0.424000 0.736000 --0.027600 0.301200 -0.060900 0.456000 -0.208000 0.856000 --0.027600 0.301200 -0.060900 0.456000 -0.208000 0.856000 --0.050000 0.301200 -0.044600 0.440000 -0.008000 0.896000 --0.035000 0.251000 -0.060900 0.512000 -0.448000 0.728000 --0.050000 0.251000 -0.047300 0.528000 -0.360000 0.760000 --0.050000 0.236000 -0.060900 0.536000 -0.496000 0.672000 --0.050000 0.236000 -0.060900 0.536000 -0.496000 0.672000 --0.002200 -0.301200 0.000000 0.384000 -0.648000 0.648000 --0.002200 -0.301200 0.000000 0.384000 -0.648000 0.648000 -0.000000 -0.299000 0.000000 0.440000 -0.464000 0.760000 -0.000000 -0.301200 -0.001900 0.408000 -0.704000 0.568000 -0.050000 -0.253500 0.000000 0.448000 -0.608000 0.648000 -0.032200 -0.301200 -0.060900 0.552000 -0.696000 0.448000 -0.050000 -0.286400 -0.060900 0.528000 -0.720000 0.440000 -0.050000 -0.301200 -0.085900 0.528000 -0.704000 0.464000 -0.050000 -0.301200 -0.085900 0.528000 -0.704000 0.464000 --0.050000 -0.351500 -0.027000 0.488000 -0.688000 0.528000 --0.050000 -0.351500 -0.027000 0.488000 -0.688000 0.528000 --0.029100 -0.351500 -0.060900 0.584000 -0.680000 0.424000 --0.050000 -0.370100 -0.060900 0.592000 -0.672000 0.424000 -0.000000 -0.351500 -0.112600 0.544000 -0.704000 0.448000 --0.050000 -0.398200 -0.121900 0.592000 -0.704000 0.368000 -0.000000 -0.356400 -0.121900 0.560000 -0.728000 0.384000 --0.050000 -0.389600 -0.182900 0.656000 -0.736000 -0.128000 -0.000000 -0.353400 -0.182900 0.520000 -0.832000 -0.160000 --0.050000 -0.380500 -0.243900 0.664000 -0.736000 -0.104000 -0.000000 -0.351500 -0.193300 0.504000 -0.832000 -0.176000 --0.013800 -0.351500 -0.243900 0.552000 -0.808000 -0.168000 -0.000000 -0.343100 -0.243900 0.464000 -0.864000 -0.160000 --0.026900 -0.351500 -0.304800 0.608000 -0.688000 -0.384000 -0.000000 -0.336000 -0.304800 0.392000 -0.872000 -0.264000 --0.050000 -0.351500 -0.336900 0.024000 -0.576000 -0.808000 -0.000000 -0.316900 -0.365800 0.224000 -0.832000 -0.496000 --0.050000 -0.309800 -0.365800 -0.336000 -0.416000 -0.840000 -0.000000 -0.301200 -0.413400 -0.392000 -0.192000 -0.896000 --0.050000 -0.301200 -0.370400 -0.392000 -0.264000 -0.872000 -0.000000 -0.251000 -0.386300 -0.352000 0.496000 -0.792000 --0.050000 -0.266900 -0.365800 -0.288000 0.088000 -0.944000 --0.044700 -0.251000 -0.365800 -0.216000 0.376000 -0.896000 --0.050000 -0.251000 -0.364300 -0.216000 0.352000 -0.904000 -0.000000 -0.238800 -0.365800 -0.192000 0.648000 -0.728000 --0.050000 -0.200800 -0.320900 -0.056000 0.280000 -0.952000 -0.000000 -0.200800 -0.332000 -0.296000 0.528000 -0.784000 -0.000000 -0.238800 -0.365800 -0.192000 0.648000 -0.728000 -0.050000 -0.200800 -0.360800 -0.016000 0.576000 -0.808000 -0.050000 -0.206300 -0.365800 -0.112000 0.608000 -0.776000 -0.000000 -0.238800 -0.365800 -0.192000 0.648000 -0.728000 -0.050000 -0.251000 -0.406500 0.232000 -0.312000 -0.912000 -0.000000 -0.251000 -0.386300 -0.352000 0.496000 -0.792000 -0.050000 -0.301200 -0.369000 0.376000 -0.768000 -0.512000 -0.000000 -0.301200 -0.413400 -0.392000 -0.192000 -0.896000 -0.050000 -0.303000 -0.365800 0.400000 -0.792000 -0.448000 -0.000000 -0.316900 -0.365800 0.224000 -0.832000 -0.496000 -0.050000 -0.326800 -0.304800 0.424000 -0.880000 -0.184000 -0.000000 -0.336000 -0.304800 0.392000 -0.872000 -0.264000 -0.050000 -0.327900 -0.243900 0.480000 -0.872000 0.000000 -0.000000 -0.343100 -0.243900 0.464000 -0.864000 -0.160000 -0.050000 -0.327900 -0.182900 0.552000 -0.824000 0.048000 -0.000000 -0.351500 -0.193300 0.504000 -0.832000 -0.176000 -0.003100 -0.351500 -0.182900 0.504000 -0.840000 -0.160000 -0.000000 -0.353400 -0.182900 0.520000 -0.832000 -0.160000 -0.006400 -0.351500 -0.121900 0.552000 -0.776000 0.288000 -0.000000 -0.356400 -0.121900 0.560000 -0.728000 0.384000 -0.000000 -0.351500 -0.112600 0.544000 -0.704000 0.448000 -0.000000 -0.351500 -0.112600 0.544000 -0.704000 0.448000 -0.000000 0.351500 -0.051600 0.280000 -0.248000 0.920000 -0.000000 0.351500 -0.051600 0.280000 -0.248000 0.920000 -0.000000 0.393800 -0.060900 0.224000 0.176000 0.952000 -0.042100 0.351500 -0.060900 0.160000 -0.080000 0.976000 -0.000000 0.401700 -0.062800 0.256000 0.176000 0.944000 -0.050000 0.351500 -0.062500 0.000000 -0.264000 0.960000 -0.050000 0.401700 -0.062500 -0.008000 0.136000 0.984000 -0.065700 0.351500 -0.060900 -0.064000 -0.312000 0.944000 -0.100000 0.401700 -0.066700 -0.048000 0.000000 0.992000 -0.100000 0.368600 -0.060900 0.104000 0.120000 0.984000 -0.150000 0.401700 -0.062100 -0.392000 -0.400000 0.816000 -0.111400 0.351500 -0.060900 0.184000 -0.224000 0.952000 -0.150000 0.351500 -0.070300 -0.056000 -0.480000 0.872000 -0.100000 0.345700 -0.060900 0.056000 -0.392000 0.912000 -0.150000 0.301200 -0.094700 0.096000 -0.408000 0.904000 -0.100000 0.301200 -0.081200 0.144000 -0.392000 0.904000 -0.150000 0.253300 -0.121900 0.144000 -0.672000 0.712000 -0.100000 0.251000 -0.119300 0.048000 -0.664000 0.736000 -0.134200 0.251000 -0.121900 0.072000 -0.752000 0.648000 -0.100000 0.248700 -0.121900 0.064000 -0.824000 0.552000 -0.150000 0.251000 -0.128300 0.144000 -0.904000 0.392000 -0.100000 0.246100 -0.182900 0.136000 -0.488000 -0.856000 -0.150000 0.224100 -0.182900 0.056000 -0.672000 -0.728000 -0.100000 0.251000 -0.185300 0.160000 -0.296000 -0.936000 -0.150000 0.251000 -0.192500 0.112000 0.024000 -0.992000 -0.100000 0.301200 -0.188500 0.112000 0.128000 -0.984000 -0.150000 0.284700 -0.182900 0.352000 0.368000 -0.856000 -0.133500 0.301200 -0.182900 0.272000 0.264000 -0.920000 -0.150000 0.251000 -0.128300 0.144000 -0.904000 0.392000 -0.150000 0.301200 -0.172900 0.456000 0.432000 -0.768000 -0.134200 0.251000 -0.121900 0.072000 -0.752000 0.648000 -0.150000 0.253300 -0.121900 0.144000 -0.672000 0.712000 -0.150000 0.301200 -0.172900 0.456000 0.432000 -0.768000 -0.200000 0.269500 -0.121900 -0.008000 -0.896000 0.432000 -0.200000 0.301200 -0.179700 -0.152000 -0.352000 -0.920000 -0.250000 0.256500 -0.121900 -0.200000 -0.800000 0.552000 -0.215700 0.301200 -0.182900 -0.120000 -0.160000 -0.976000 -0.250000 0.284000 -0.182900 -0.096000 -0.256000 -0.952000 -0.250000 0.301200 -0.184400 -0.080000 -0.056000 -0.992000 -0.215700 0.301200 -0.182900 -0.120000 -0.160000 -0.976000 -0.250000 0.351500 -0.189100 -0.160000 0.168000 -0.968000 -0.226900 0.351500 -0.182900 -0.224000 0.192000 -0.952000 -0.250000 0.370000 -0.182900 -0.184000 0.304000 -0.928000 -0.200000 0.351500 -0.169700 -0.320000 0.304000 -0.888000 -0.250000 0.401700 -0.172700 -0.016000 0.288000 -0.952000 -0.200000 0.401700 -0.169400 -0.056000 0.168000 -0.976000 -0.250000 0.451900 -0.137900 0.128000 0.536000 -0.824000 -0.200000 0.451900 -0.151000 0.136000 0.400000 -0.896000 -0.250000 0.466900 -0.121900 0.232000 0.968000 0.016000 -0.200000 0.484800 -0.121900 0.312000 0.872000 0.360000 -0.250000 0.451900 -0.094000 0.248000 0.784000 0.552000 -0.200000 0.453000 -0.060900 0.112000 0.728000 0.672000 -0.203100 0.451900 -0.060900 0.264000 0.672000 0.680000 -0.200000 0.451900 -0.059700 0.136000 0.632000 0.760000 -0.250000 0.432000 -0.060900 0.224000 0.624000 0.736000 -0.200000 0.401700 -0.033800 -0.352000 0.000000 0.928000 -0.250000 0.401700 -0.026800 -0.216000 0.176000 0.952000 -0.200000 0.352900 -0.060900 -0.368000 -0.496000 0.776000 -0.250000 0.351500 -0.020200 -0.488000 -0.416000 0.760000 -0.201200 0.351500 -0.060900 -0.488000 -0.576000 0.648000 -0.250000 0.317900 -0.060900 -0.432000 -0.680000 0.584000 -0.200000 0.351500 -0.062100 -0.312000 -0.640000 0.696000 -0.250000 0.301200 -0.083600 -0.096000 -0.744000 0.648000 -0.200000 0.301200 -0.098800 -0.120000 -0.584000 0.800000 -0.250000 0.256500 -0.121900 -0.200000 -0.800000 0.552000 -0.200000 0.269500 -0.121900 -0.008000 -0.896000 0.432000 -0.200000 0.301200 -0.098800 -0.120000 -0.584000 0.800000 -0.150000 0.253300 -0.121900 0.144000 -0.672000 0.712000 -0.150000 0.301200 -0.094700 0.096000 -0.408000 0.904000 -0.200000 0.301200 -0.098800 -0.120000 -0.584000 0.800000 -0.150000 0.351500 -0.070300 -0.056000 -0.480000 0.872000 -0.200000 0.351500 -0.062100 -0.312000 -0.640000 0.696000 -0.150000 0.401700 -0.062100 -0.392000 -0.400000 0.816000 -0.200000 0.352900 -0.060900 -0.368000 -0.496000 0.776000 -0.151400 0.401700 -0.060900 -0.480000 -0.416000 0.760000 -0.200000 0.401700 -0.033800 -0.352000 0.000000 0.928000 -0.150000 0.409600 -0.060900 -0.208000 -0.072000 0.968000 -0.200000 0.451900 -0.059700 0.136000 0.632000 0.760000 -0.150000 0.451900 -0.057100 -0.080000 0.496000 0.856000 -0.200000 0.453000 -0.060900 0.112000 0.728000 0.672000 -0.150000 0.456100 -0.060900 0.048000 0.664000 0.736000 -0.200000 0.484800 -0.121900 0.312000 0.872000 0.360000 -0.150000 0.502100 -0.119700 0.016000 0.656000 0.752000 -0.153400 0.502100 -0.121900 0.448000 0.824000 -0.336000 -0.150000 0.503100 -0.121900 0.272000 0.456000 -0.840000 -0.150000 0.502100 -0.123200 0.032000 0.424000 -0.896000 -0.138500 0.502100 -0.121900 -0.184000 0.952000 -0.216000 -0.150000 0.451900 -0.151900 0.184000 0.376000 -0.904000 -0.100000 0.494400 -0.121900 -0.184000 0.952000 -0.216000 -0.100000 0.451900 -0.146900 -0.088000 0.224000 -0.968000 -0.050000 0.485400 -0.121900 -0.032000 0.904000 -0.408000 -0.050000 0.451900 -0.139600 -0.080000 0.232000 -0.960000 -0.000000 0.493800 -0.121900 0.128000 0.960000 -0.232000 -0.000000 0.451900 -0.135500 0.000000 0.160000 -0.984000 --0.050000 0.500300 -0.121900 -0.104000 0.896000 -0.424000 --0.050000 0.451900 -0.137500 0.040000 0.112000 -0.992000 --0.100000 0.479800 -0.121900 -0.288000 0.584000 -0.752000 --0.100000 0.451900 -0.142300 -0.128000 0.312000 -0.936000 --0.150000 0.453400 -0.121900 -0.320000 0.624000 -0.704000 --0.150000 0.451900 -0.123200 -0.344000 0.512000 -0.784000 --0.152100 0.451900 -0.121900 -0.424000 0.536000 -0.720000 --0.150000 0.401700 -0.148200 -0.240000 0.400000 -0.872000 --0.200000 0.409200 -0.121900 -0.400000 0.464000 -0.776000 --0.200000 0.401700 -0.127400 -0.400000 0.440000 -0.800000 --0.208300 0.401700 -0.121900 -0.432000 0.432000 -0.784000 --0.200000 0.351500 -0.146000 -0.416000 0.224000 -0.872000 --0.233300 0.351500 -0.121900 -0.616000 0.184000 -0.752000 --0.200000 0.301200 -0.154100 -0.392000 0.112000 -0.904000 --0.245300 0.301200 -0.121900 -0.680000 0.120000 -0.720000 --0.200000 0.251000 -0.156200 -0.432000 0.168000 -0.880000 --0.250000 0.268200 -0.121900 -0.464000 0.088000 -0.872000 --0.250000 0.251000 -0.124000 -0.376000 0.088000 -0.920000 --0.254200 0.251000 -0.121900 -0.384000 0.088000 -0.912000 --0.250000 0.200800 -0.129700 -0.392000 0.152000 -0.904000 --0.263400 0.200800 -0.121900 -0.480000 0.216000 -0.840000 --0.250000 0.150600 -0.154100 -0.464000 0.344000 -0.808000 --0.295300 0.150600 -0.121900 -0.728000 0.520000 -0.432000 --0.250000 0.100400 -0.182000 -0.504000 0.488000 -0.704000 --0.300000 0.144000 -0.121900 -0.728000 0.496000 -0.456000 --0.300000 0.100400 -0.141500 -0.560000 0.512000 -0.640000 --0.250000 0.100400 -0.182000 -0.504000 0.488000 -0.704000 --0.300000 0.052000 -0.182900 -0.664000 0.464000 -0.568000 --0.250000 0.099600 -0.182900 -0.488000 0.616000 -0.608000 --0.250000 0.100400 -0.182000 -0.504000 0.488000 -0.704000 --0.249100 0.100400 -0.182900 -0.576000 0.496000 -0.640000 --0.250000 0.150600 -0.154100 -0.464000 0.344000 -0.808000 --0.216700 0.150600 -0.182900 -0.560000 0.376000 -0.728000 --0.250000 0.200800 -0.129700 -0.392000 0.152000 -0.904000 --0.200000 0.172600 -0.182900 -0.488000 0.416000 -0.760000 --0.200000 0.200800 -0.161600 -0.480000 0.384000 -0.776000 --0.173800 0.200800 -0.182900 -0.480000 0.344000 -0.800000 --0.200000 0.251000 -0.156200 -0.432000 0.168000 -0.880000 --0.153800 0.251000 -0.182900 -0.312000 0.176000 -0.928000 --0.200000 0.301200 -0.154100 -0.392000 0.112000 -0.904000 --0.150000 0.257900 -0.182900 -0.288000 0.168000 -0.936000 --0.150000 0.301200 -0.169700 -0.080000 0.248000 -0.960000 --0.100000 0.273500 -0.182900 -0.112000 0.208000 -0.968000 --0.100000 0.301200 -0.172200 -0.168000 0.416000 -0.888000 --0.058500 0.301200 -0.182900 -0.128000 0.320000 -0.936000 --0.100000 0.351500 -0.158200 0.008000 0.264000 -0.960000 --0.050000 0.304700 -0.182900 -0.120000 0.336000 -0.928000 --0.050000 0.351500 -0.155800 -0.048000 0.328000 -0.936000 -0.000000 0.313300 -0.182900 -0.064000 0.304000 -0.944000 -0.000000 0.351500 -0.164900 -0.080000 0.368000 -0.920000 -0.050000 0.327400 -0.182900 -0.016000 0.344000 -0.936000 -0.050000 0.351500 -0.166400 0.000000 0.392000 -0.912000 -0.100000 0.320500 -0.182900 0.096000 0.312000 -0.936000 -0.100000 0.351500 -0.169000 0.056000 0.272000 -0.952000 -0.133500 0.301200 -0.182900 0.272000 0.264000 -0.920000 -0.150000 0.351500 -0.160600 0.144000 0.128000 -0.976000 -0.150000 0.301200 -0.172900 0.456000 0.432000 -0.768000 -0.200000 0.351500 -0.169700 -0.320000 0.304000 -0.888000 -0.200000 0.301200 -0.179700 -0.152000 -0.352000 -0.920000 -0.226900 0.351500 -0.182900 -0.224000 0.192000 -0.952000 -0.215700 0.301200 -0.182900 -0.120000 -0.160000 -0.976000 -0.215700 0.301200 -0.182900 -0.120000 -0.160000 -0.976000 -0.000000 0.351500 -0.051600 0.280000 -0.248000 0.920000 -0.000000 0.351500 -0.051600 0.280000 -0.248000 0.920000 -0.042100 0.351500 -0.060900 0.160000 -0.080000 0.976000 -0.000000 0.334500 -0.060900 0.312000 -0.368000 0.864000 -0.050000 0.351500 -0.062500 0.000000 -0.264000 0.960000 -0.000000 0.301200 -0.076500 0.296000 -0.272000 0.904000 -0.050000 0.301200 -0.074400 0.160000 -0.248000 0.952000 -0.000000 0.251000 -0.086600 0.344000 -0.360000 0.864000 -0.050000 0.251000 -0.100200 0.224000 -0.464000 0.848000 -0.000000 0.211400 -0.121900 0.496000 -0.712000 0.480000 -0.050000 0.230600 -0.121900 0.312000 -0.824000 0.464000 -0.000000 0.200800 -0.169000 0.576000 -0.744000 0.320000 -0.050000 0.219300 -0.182900 0.280000 -0.632000 -0.712000 -0.008500 0.200800 -0.182900 0.416000 -0.688000 -0.584000 -0.050000 0.251000 -0.200200 0.040000 -0.232000 -0.968000 -0.000000 0.200800 -0.186400 0.272000 -0.456000 -0.840000 -0.000000 0.251000 -0.201400 0.024000 -0.152000 -0.984000 --0.050000 0.200800 -0.204500 0.304000 -0.328000 -0.888000 --0.050000 0.251000 -0.205600 -0.136000 0.216000 -0.960000 --0.100000 0.200800 -0.221500 0.056000 0.392000 -0.912000 --0.100000 0.251000 -0.188700 -0.192000 0.256000 -0.944000 --0.150000 0.200800 -0.199200 -0.328000 0.272000 -0.896000 --0.150000 0.251000 -0.184400 -0.280000 0.168000 -0.936000 --0.173800 0.200800 -0.182900 -0.480000 0.344000 -0.800000 --0.153800 0.251000 -0.182900 -0.312000 0.176000 -0.928000 --0.150000 0.251000 -0.184400 -0.280000 0.168000 -0.936000 --0.150000 0.257900 -0.182900 -0.288000 0.168000 -0.936000 --0.100000 0.251000 -0.188700 -0.192000 0.256000 -0.944000 --0.100000 0.273500 -0.182900 -0.112000 0.208000 -0.968000 --0.050000 0.251000 -0.205600 -0.136000 0.216000 -0.960000 --0.058500 0.301200 -0.182900 -0.128000 0.320000 -0.936000 --0.050000 0.301200 -0.184300 -0.112000 0.296000 -0.944000 --0.050000 0.304700 -0.182900 -0.120000 0.336000 -0.928000 -0.000000 0.301200 -0.186500 -0.056000 0.232000 -0.968000 -0.000000 0.313300 -0.182900 -0.064000 0.304000 -0.944000 -0.050000 0.301200 -0.192400 0.024000 0.192000 -0.976000 -0.050000 0.327400 -0.182900 -0.016000 0.344000 -0.936000 -0.100000 0.301200 -0.188500 0.112000 0.128000 -0.984000 -0.100000 0.320500 -0.182900 0.096000 0.312000 -0.936000 -0.133500 0.301200 -0.182900 0.272000 0.264000 -0.920000 -0.133500 0.301200 -0.182900 0.272000 0.264000 -0.920000 -0.000000 -0.301200 -0.001900 0.408000 -0.704000 0.568000 -0.000000 -0.301200 -0.001900 0.408000 -0.704000 0.568000 -0.032200 -0.301200 -0.060900 0.552000 -0.696000 0.448000 -0.000000 -0.326800 -0.060900 0.344000 -0.824000 0.432000 -0.000000 -0.326800 -0.060900 0.344000 -0.824000 0.432000 -0.065700 0.351500 -0.060900 -0.064000 -0.312000 0.944000 -0.065700 0.351500 -0.060900 -0.064000 -0.312000 0.944000 -0.100000 0.368600 -0.060900 0.104000 0.120000 0.984000 -0.100000 0.351500 -0.058100 0.120000 -0.240000 0.960000 -0.111400 0.351500 -0.060900 0.184000 -0.224000 0.952000 -0.100000 0.345700 -0.060900 0.056000 -0.392000 0.912000 -0.100000 0.351500 -0.058100 0.120000 -0.240000 0.960000 -0.065700 0.351500 -0.060900 -0.064000 -0.312000 0.944000 -0.100000 0.345700 -0.060900 0.056000 -0.392000 0.912000 -0.050000 0.351500 -0.062500 0.000000 -0.264000 0.960000 -0.100000 0.301200 -0.081200 0.144000 -0.392000 0.904000 -0.050000 0.301200 -0.074400 0.160000 -0.248000 0.952000 -0.100000 0.251000 -0.119300 0.048000 -0.664000 0.736000 -0.050000 0.251000 -0.100200 0.224000 -0.464000 0.848000 -0.100000 0.248700 -0.121900 0.064000 -0.824000 0.552000 -0.050000 0.230600 -0.121900 0.312000 -0.824000 0.464000 -0.100000 0.246100 -0.182900 0.136000 -0.488000 -0.856000 -0.050000 0.219300 -0.182900 0.280000 -0.632000 -0.712000 -0.100000 0.251000 -0.185300 0.160000 -0.296000 -0.936000 -0.050000 0.251000 -0.200200 0.040000 -0.232000 -0.968000 -0.100000 0.301200 -0.188500 0.112000 0.128000 -0.984000 -0.050000 0.301200 -0.192400 0.024000 0.192000 -0.976000 -0.050000 0.251000 -0.200200 0.040000 -0.232000 -0.968000 -0.000000 0.301200 -0.186500 -0.056000 0.232000 -0.968000 -0.000000 0.251000 -0.201400 0.024000 -0.152000 -0.984000 --0.050000 0.301200 -0.184300 -0.112000 0.296000 -0.944000 --0.050000 0.251000 -0.205600 -0.136000 0.216000 -0.960000 --0.050000 0.251000 -0.205600 -0.136000 0.216000 -0.960000 -0.150000 0.456100 -0.060900 0.048000 0.664000 0.736000 -0.150000 0.456100 -0.060900 0.048000 0.664000 0.736000 -0.150000 0.451900 -0.057100 -0.080000 0.496000 0.856000 -0.121900 0.451900 -0.060900 -0.112000 0.472000 0.872000 -0.150000 0.409600 -0.060900 -0.208000 -0.072000 0.968000 -0.100000 0.451900 -0.066700 -0.192000 0.072000 0.976000 -0.150000 0.401700 -0.062100 -0.392000 -0.400000 0.816000 -0.100000 0.401700 -0.066700 -0.048000 0.000000 0.992000 -0.100000 0.451900 -0.066700 -0.192000 0.072000 0.976000 -0.050000 0.401700 -0.062500 -0.008000 0.136000 0.984000 -0.050000 0.451900 -0.077800 0.016000 0.408000 0.912000 -0.000000 0.401700 -0.062800 0.256000 0.176000 0.944000 -0.000000 0.451900 -0.081100 0.280000 0.456000 0.832000 --0.005200 0.401700 -0.060900 0.264000 0.168000 0.944000 --0.023600 0.451900 -0.060900 0.376000 0.152000 0.904000 -0.000000 0.451900 -0.081100 0.280000 0.456000 0.832000 --0.033200 0.502100 -0.060900 0.616000 0.496000 0.600000 -0.000000 0.493800 -0.121900 0.128000 0.960000 -0.232000 --0.050000 0.502100 -0.117100 -0.040000 0.912000 -0.392000 --0.050000 0.500300 -0.121900 -0.104000 0.896000 -0.424000 --0.100000 0.502100 -0.081300 -0.184000 0.840000 -0.488000 --0.100000 0.479800 -0.121900 -0.288000 0.584000 -0.752000 --0.100000 0.479800 -0.121900 -0.288000 0.584000 -0.752000 -0.350000 0.302200 -0.060900 -0.144000 -0.624000 0.760000 -0.350000 0.302200 -0.060900 -0.144000 -0.624000 0.760000 -0.300000 0.310700 -0.060900 -0.072000 -0.760000 0.640000 -0.350000 0.351500 -0.021800 0.032000 -0.048000 0.992000 -0.300000 0.351500 -0.009100 -0.016000 -0.144000 0.984000 -0.300000 0.351500 -0.009100 -0.016000 -0.144000 0.984000 -0.395100 0.251000 -0.060900 -0.344000 -0.184000 0.912000 -0.395100 0.251000 -0.060900 -0.344000 -0.184000 0.912000 -0.400000 0.251000 -0.058700 -0.328000 -0.176000 0.920000 -0.400000 0.242400 -0.060900 -0.352000 -0.192000 0.904000 -0.400000 0.242400 -0.060900 -0.352000 -0.192000 0.904000 -0.450000 0.401700 -0.038900 -0.120000 0.592000 0.784000 -0.450000 0.401700 -0.038900 -0.120000 0.592000 0.784000 -0.500000 0.401700 -0.057700 0.096000 0.864000 0.480000 -0.450000 0.414500 -0.060900 0.192000 0.928000 0.304000 -0.500000 0.403100 -0.060900 0.112000 0.944000 0.280000 -0.450000 0.422200 -0.121900 0.368000 0.832000 -0.392000 -0.500000 0.401700 -0.069300 0.168000 0.952000 -0.216000 -0.488600 0.401700 -0.121900 0.504000 0.776000 -0.368000 -0.450000 0.422200 -0.121900 0.368000 0.832000 -0.392000 -0.450000 0.401700 -0.160800 0.376000 0.656000 -0.640000 -0.450000 0.401700 -0.160800 0.376000 0.656000 -0.640000 -0.460500 0.150600 -0.060900 -0.624000 -0.512000 0.584000 -0.460500 0.150600 -0.060900 -0.624000 -0.512000 0.584000 -0.500000 0.150600 -0.020200 -0.704000 -0.472000 0.520000 -0.500000 0.107000 -0.060900 -0.608000 -0.480000 0.616000 -0.500000 0.107000 -0.060900 -0.608000 -0.480000 0.616000 -0.500000 0.000000 -0.045100 -0.376000 -0.208000 0.896000 -0.500000 0.000000 -0.045100 -0.376000 -0.208000 0.896000 -0.500000 0.050200 -0.057700 -0.560000 0.128000 0.816000 -0.478700 0.000000 -0.060900 -0.440000 -0.008000 0.888000 -0.495100 0.050200 -0.060900 -0.456000 0.136000 0.872000 -0.450000 0.000000 -0.073300 -0.344000 -0.088000 0.928000 -0.450000 0.050200 -0.077000 -0.360000 0.120000 0.920000 -0.400000 0.000000 -0.102200 -0.272000 0.176000 0.936000 -0.400000 0.050200 -0.114800 -0.552000 0.256000 0.784000 -0.351500 0.000000 -0.121900 -0.376000 0.528000 0.752000 -0.393200 0.050200 -0.121900 -0.648000 0.352000 0.664000 -0.350000 0.000000 -0.123200 -0.512000 0.592000 0.608000 -0.357200 0.050200 -0.182900 -0.736000 0.640000 0.184000 -0.350000 0.043300 -0.182900 -0.488000 0.704000 0.504000 -0.351400 0.050200 -0.243900 -0.480000 0.768000 -0.416000 -0.350000 0.049300 -0.243900 -0.512000 0.784000 -0.320000 -0.350000 0.043300 -0.182900 -0.488000 0.704000 0.504000 -0.300000 0.032100 -0.243900 -0.576000 0.680000 -0.432000 -0.300000 0.018000 -0.182900 -0.296000 0.768000 0.552000 -0.350000 0.043300 -0.182900 -0.488000 0.704000 0.504000 -0.300000 0.000000 -0.166100 -0.488000 0.464000 0.728000 -0.350000 0.000000 -0.123200 -0.512000 0.592000 0.608000 -0.300000 -0.050200 -0.130700 -0.504000 0.472000 0.720000 -0.350000 -0.001200 -0.121900 -0.472000 0.472000 0.736000 -0.307700 -0.050200 -0.121900 -0.592000 0.464000 0.648000 -0.350000 -0.050200 -0.093300 -0.312000 0.392000 0.856000 -0.300000 -0.060700 -0.121900 -0.512000 0.456000 0.720000 -0.350000 -0.100400 -0.081200 -0.280000 0.032000 0.952000 -0.300000 -0.100400 -0.098900 -0.360000 0.344000 0.856000 -0.350000 -0.150600 -0.101500 0.088000 -0.352000 0.928000 -0.300000 -0.150600 -0.090800 0.240000 -0.024000 0.968000 -0.350000 -0.182300 -0.121900 -0.032000 -0.520000 0.848000 -0.300000 -0.200800 -0.101500 0.424000 -0.216000 0.872000 -0.329200 -0.200800 -0.121900 0.376000 -0.264000 0.880000 -0.300000 -0.234400 -0.121900 0.104000 -0.472000 0.872000 -0.350000 -0.200800 -0.137500 0.248000 -0.232000 0.936000 -0.300000 -0.251000 -0.132800 -0.224000 -0.464000 0.856000 -0.350000 -0.234100 -0.121900 0.384000 0.224000 0.888000 -0.328900 -0.251000 -0.121900 -0.264000 -0.304000 0.912000 -0.350000 -0.251000 -0.114600 0.576000 -0.200000 0.784000 -0.350000 -0.260400 -0.121900 0.448000 -0.472000 0.752000 -0.354900 -0.251000 -0.121900 0.704000 -0.304000 0.632000 -0.350000 -0.251000 -0.114600 0.576000 -0.200000 0.784000 -0.350000 -0.234100 -0.121900 0.384000 0.224000 0.888000 -0.354900 -0.251000 -0.121900 0.704000 -0.304000 0.632000 -0.350000 -0.200800 -0.137500 0.248000 -0.232000 0.936000 -0.400000 -0.203000 -0.121900 -0.184000 -0.672000 0.712000 -0.391400 -0.200800 -0.121900 -0.176000 -0.648000 0.736000 -0.400000 -0.200800 -0.119100 -0.200000 -0.688000 0.688000 -0.350000 -0.182300 -0.121900 -0.032000 -0.520000 0.848000 -0.400000 -0.150600 -0.068400 -0.344000 -0.312000 0.880000 -0.350000 -0.150600 -0.101500 0.088000 -0.352000 0.928000 -0.400000 -0.100400 -0.080400 -0.024000 0.176000 0.976000 -0.350000 -0.100400 -0.081200 -0.280000 0.032000 0.952000 -0.400000 -0.050200 -0.089900 -0.128000 0.176000 0.968000 -0.350000 -0.050200 -0.093300 -0.312000 0.392000 0.856000 -0.400000 0.000000 -0.102200 -0.272000 0.176000 0.936000 -0.350000 -0.001200 -0.121900 -0.472000 0.472000 0.736000 -0.351500 0.000000 -0.121900 -0.376000 0.528000 0.752000 -0.350000 0.000000 -0.123200 -0.512000 0.592000 0.608000 -0.350000 0.000000 -0.123200 -0.512000 0.592000 0.608000 -0.478700 0.000000 -0.060900 -0.440000 -0.008000 0.888000 -0.478700 0.000000 -0.060900 -0.440000 -0.008000 0.888000 -0.500000 0.000000 -0.045100 -0.376000 -0.208000 0.896000 -0.500000 -0.026100 -0.060900 -0.336000 -0.328000 0.872000 -0.550000 0.000000 -0.046900 0.008000 -0.120000 0.992000 -0.550000 -0.046200 -0.060900 -0.104000 -0.168000 0.976000 -0.600000 0.000000 -0.044900 -0.016000 -0.720000 0.688000 -0.600000 -0.012300 -0.060900 0.104000 -0.576000 0.800000 -0.550000 -0.046200 -0.060900 -0.104000 -0.168000 0.976000 -0.600000 -0.050200 -0.088500 0.448000 -0.400000 0.792000 -0.550000 -0.050200 -0.061500 -0.064000 -0.152000 0.984000 -0.600000 -0.100400 -0.077400 0.584000 0.048000 0.800000 -0.550000 -0.100400 -0.076900 0.056000 0.056000 0.992000 -0.550000 -0.050200 -0.061500 -0.064000 -0.152000 0.984000 -0.500000 -0.100400 -0.086800 -0.048000 0.256000 0.960000 -0.500000 -0.050200 -0.068900 -0.136000 -0.144000 0.976000 -0.450000 -0.100400 -0.078400 -0.088000 0.200000 0.968000 -0.450000 -0.050200 -0.086300 -0.128000 -0.040000 0.984000 -0.400000 -0.100400 -0.080400 -0.024000 0.176000 0.976000 -0.400000 -0.050200 -0.089900 -0.128000 0.176000 0.968000 -0.450000 -0.050200 -0.086300 -0.128000 -0.040000 0.984000 -0.400000 0.000000 -0.102200 -0.272000 0.176000 0.936000 -0.450000 0.000000 -0.073300 -0.344000 -0.088000 0.928000 -0.450000 -0.050200 -0.086300 -0.128000 -0.040000 0.984000 -0.478700 0.000000 -0.060900 -0.440000 -0.008000 0.888000 -0.500000 -0.050200 -0.068900 -0.136000 -0.144000 0.976000 -0.500000 -0.026100 -0.060900 -0.336000 -0.328000 0.872000 -0.550000 -0.050200 -0.061500 -0.064000 -0.152000 0.984000 -0.550000 -0.046200 -0.060900 -0.104000 -0.168000 0.976000 -0.550000 -0.046200 -0.060900 -0.104000 -0.168000 0.976000 -0.500000 0.401700 -0.057700 0.096000 0.864000 0.480000 -0.500000 0.401700 -0.057700 0.096000 0.864000 0.480000 -0.500000 0.403100 -0.060900 0.112000 0.944000 0.280000 -0.517100 0.401700 -0.060900 0.080000 0.968000 0.224000 -0.500000 0.401700 -0.069300 0.168000 0.952000 -0.216000 -0.500000 0.401700 -0.069300 0.168000 0.952000 -0.216000 -0.500000 0.266900 0.000000 -0.760000 -0.040000 0.640000 -0.500000 0.266900 0.000000 -0.760000 -0.040000 0.640000 -0.500800 0.251000 0.000000 -0.792000 -0.016000 0.608000 -0.500000 0.251000 -0.000900 -0.496000 0.112000 0.856000 -0.500000 0.251000 -0.000900 -0.496000 0.112000 0.856000 -0.500000 0.050200 -0.057700 -0.560000 0.128000 0.816000 -0.500000 0.050200 -0.057700 -0.560000 0.128000 0.816000 -0.500000 0.000000 -0.045100 -0.376000 -0.208000 0.896000 -0.550000 0.050200 -0.037800 -0.320000 -0.688000 0.640000 -0.550000 0.000000 -0.046900 0.008000 -0.120000 0.992000 -0.600000 0.050200 -0.005300 -0.440000 -0.752000 0.480000 -0.600000 0.000000 -0.044900 -0.016000 -0.720000 0.688000 -0.600000 0.000000 -0.044900 -0.016000 -0.720000 0.688000 -0.550000 0.104000 0.000000 -0.664000 -0.568000 0.464000 -0.550000 0.104000 0.000000 -0.664000 -0.568000 0.464000 -0.553100 0.100400 0.000000 -0.664000 -0.576000 0.464000 -0.550000 0.100400 -0.005700 -0.672000 -0.576000 0.448000 -0.550000 0.100400 -0.005700 -0.672000 -0.576000 0.448000 -0.550000 -0.200800 -0.034900 0.016000 -0.040000 0.992000 -0.550000 -0.200800 -0.034900 0.016000 -0.040000 0.992000 -0.600000 -0.200800 -0.056500 0.336000 0.448000 0.816000 -0.550000 -0.159500 -0.060900 0.248000 0.472000 0.840000 -0.600000 -0.194800 -0.060900 0.352000 0.496000 0.784000 -0.550000 -0.150600 -0.067100 0.240000 0.480000 0.840000 -0.600000 -0.150600 -0.093600 0.304000 0.568000 0.752000 -0.600000 -0.194800 -0.060900 0.352000 0.496000 0.784000 -0.650000 -0.150600 -0.116200 0.720000 0.480000 0.488000 -0.608400 -0.200800 -0.060900 0.360000 0.488000 0.792000 -0.650000 -0.200800 -0.092600 0.656000 0.384000 0.640000 -0.650000 -0.242600 -0.060900 0.392000 0.384000 0.824000 -0.677400 -0.200800 -0.121900 0.528000 0.512000 0.672000 -0.657600 -0.251000 -0.060900 0.456000 -0.072000 0.880000 -0.700000 -0.217500 -0.121900 0.616000 0.552000 0.544000 -0.700000 -0.251000 -0.086700 0.608000 0.464000 0.632000 -0.719200 -0.251000 -0.121900 0.760000 0.456000 0.440000 -0.700000 -0.301200 -0.068800 0.336000 0.392000 0.848000 -0.750000 -0.297400 -0.121900 0.656000 0.584000 0.464000 -0.750000 -0.301200 -0.116500 0.704000 0.400000 0.568000 -0.752700 -0.301200 -0.121900 0.792000 0.344000 0.488000 -0.750000 -0.351500 -0.097900 0.640000 0.048000 0.760000 -0.775700 -0.351500 -0.121900 0.600000 0.328000 0.720000 -0.750000 -0.401700 -0.115900 -0.264000 -0.344000 0.896000 -0.800000 -0.391100 -0.121900 0.384000 0.416000 0.816000 -0.800000 -0.401700 -0.115500 0.392000 0.184000 0.896000 -0.810500 -0.401700 -0.121900 0.456000 0.104000 0.872000 -0.800000 -0.418600 -0.121900 0.304000 -0.320000 0.888000 -0.850000 -0.401700 -0.151500 0.608000 0.552000 0.560000 -0.800000 -0.451900 -0.135400 0.168000 -0.384000 0.904000 -0.850000 -0.451900 -0.123600 0.328000 0.296000 0.888000 -0.800000 -0.502100 -0.171200 -0.360000 -0.648000 0.664000 -0.850000 -0.502100 -0.142100 -0.224000 -0.520000 0.816000 -0.800000 -0.511100 -0.182900 -0.376000 -0.744000 0.544000 -0.850000 -0.533300 -0.182900 -0.416000 -0.736000 0.528000 -0.800000 -0.519900 -0.243900 -0.400000 -0.904000 -0.112000 -0.850000 -0.540400 -0.243900 -0.360000 -0.768000 -0.512000 -0.800000 -0.502100 -0.293400 -0.120000 -0.840000 -0.520000 -0.850000 -0.504700 -0.304800 -0.096000 -0.664000 -0.736000 -0.832800 -0.502100 -0.304800 -0.104000 -0.544000 -0.824000 -0.850000 -0.502100 -0.307100 0.032000 -0.240000 -0.968000 -0.850000 -0.490600 -0.304800 0.216000 0.112000 -0.968000 -0.856800 -0.502100 -0.304800 0.288000 0.144000 -0.944000 -0.850000 -0.451900 -0.293100 0.448000 0.248000 -0.848000 -0.900000 -0.502100 -0.284600 -0.008000 -0.096000 -0.992000 -0.900000 -0.451900 -0.272400 0.368000 0.408000 -0.824000 -0.950000 -0.502100 -0.277800 0.272000 0.288000 -0.912000 -0.950000 -0.451900 -0.300000 0.488000 0.464000 -0.728000 -1.000000 -0.502100 -0.271100 0.392000 0.584000 -0.696000 -0.980700 -0.451900 -0.243900 0.752000 0.648000 0.032000 -1.000000 -0.475100 -0.243900 0.736000 0.608000 -0.280000 -0.950000 -0.451900 -0.206400 0.504000 0.736000 0.440000 -1.000000 -0.502100 -0.189300 0.760000 0.568000 0.296000 -0.950000 -0.463500 -0.182900 0.464000 0.672000 0.568000 -0.998000 -0.502100 -0.182900 0.528000 0.664000 0.520000 -0.950000 -0.502100 -0.136000 -0.296000 0.400000 0.864000 -1.000000 -0.503200 -0.182900 0.400000 0.704000 0.576000 -0.950000 -0.531200 -0.121900 -0.376000 0.368000 0.840000 -1.000000 -0.544400 -0.121900 0.360000 0.712000 0.592000 -0.950000 -0.552300 -0.115100 -0.432000 -0.368000 0.816000 -1.000000 -0.552300 -0.111000 0.040000 -0.024000 0.992000 -0.950000 -0.560000 -0.121900 -0.400000 -0.536000 0.728000 -1.000000 -0.602500 -0.115100 -0.504000 -0.464000 0.712000 -0.992300 -0.602500 -0.121900 -0.520000 -0.480000 0.696000 -1.000000 -0.611000 -0.121900 -0.528000 -0.480000 0.696000 -0.950000 -0.602500 -0.169200 -0.536000 -0.520000 0.656000 -1.000000 -0.652700 -0.168000 -0.488000 -0.568000 0.656000 -0.950000 -0.619400 -0.182900 -0.632000 -0.592000 0.480000 -0.983200 -0.652700 -0.182900 -0.528000 -0.608000 0.584000 -0.950000 -0.619400 -0.243900 -0.600000 -0.584000 -0.536000 -0.979500 -0.652700 -0.243900 -0.672000 -0.664000 -0.304000 -0.950000 -0.602500 -0.260200 -0.544000 -0.504000 -0.664000 -1.000000 -0.652700 -0.268800 -0.592000 -0.512000 -0.608000 -0.990600 -0.602500 -0.304800 -0.488000 -0.376000 -0.784000 -1.000000 -0.614600 -0.304800 -0.488000 -0.376000 -0.776000 -1.000000 -0.602500 -0.311200 -0.448000 -0.336000 -0.816000 -0.990600 -0.602500 -0.304800 -0.488000 -0.376000 -0.784000 -1.000000 -0.552300 -0.319800 -0.248000 0.216000 -0.936000 -0.953900 -0.552300 -0.304800 -0.328000 0.312000 -0.888000 -1.000000 -0.525900 -0.304800 -0.248000 0.496000 -0.824000 -0.950000 -0.552300 -0.303200 -0.304000 0.392000 -0.864000 -1.000000 -0.502100 -0.271100 0.392000 0.584000 -0.696000 -0.950000 -0.502100 -0.277800 0.272000 0.288000 -0.912000 -0.950000 -0.552300 -0.303200 -0.304000 0.392000 -0.864000 -0.900000 -0.502100 -0.284600 -0.008000 -0.096000 -0.992000 -0.900000 -0.552300 -0.278500 -0.424000 -0.592000 -0.672000 -0.856800 -0.502100 -0.304800 0.288000 0.144000 -0.944000 -0.868400 -0.552300 -0.243900 -0.552000 -0.760000 -0.328000 -0.850000 -0.504700 -0.304800 -0.096000 -0.664000 -0.736000 -0.850000 -0.540400 -0.243900 -0.360000 -0.768000 -0.512000 -0.868400 -0.552300 -0.243900 -0.552000 -0.760000 -0.328000 -0.850000 -0.533300 -0.182900 -0.416000 -0.736000 0.528000 -0.876500 -0.552300 -0.182900 -0.528000 -0.672000 0.504000 -0.850000 -0.502100 -0.142100 -0.224000 -0.520000 0.816000 -0.900000 -0.552300 -0.159100 -0.496000 -0.592000 0.632000 -0.900000 -0.502100 -0.123800 -0.168000 -0.208000 0.960000 -0.940600 -0.552300 -0.121900 -0.512000 -0.272000 0.808000 -0.950000 -0.502100 -0.136000 -0.296000 0.400000 0.864000 -0.950000 -0.531200 -0.121900 -0.376000 0.368000 0.840000 -0.940600 -0.552300 -0.121900 -0.512000 -0.272000 0.808000 -0.950000 -0.552300 -0.115100 -0.432000 -0.368000 0.816000 -0.950000 -0.560000 -0.121900 -0.400000 -0.536000 0.728000 -0.940600 -0.552300 -0.121900 -0.512000 -0.272000 0.808000 -0.950000 -0.602500 -0.169200 -0.536000 -0.520000 0.656000 -0.900000 -0.552300 -0.159100 -0.496000 -0.592000 0.632000 -0.935000 -0.602500 -0.182900 -0.552000 -0.552000 0.608000 -0.900000 -0.573700 -0.182900 -0.608000 -0.704000 0.344000 -0.933200 -0.602500 -0.243900 -0.584000 -0.624000 -0.512000 -0.900000 -0.578300 -0.243900 -0.552000 -0.704000 -0.440000 -0.950000 -0.602500 -0.260200 -0.544000 -0.504000 -0.664000 -0.900000 -0.552300 -0.278500 -0.424000 -0.592000 -0.672000 -0.950000 -0.552300 -0.303200 -0.304000 0.392000 -0.864000 -0.950000 -0.602500 -0.260200 -0.544000 -0.504000 -0.664000 -0.953900 -0.552300 -0.304800 -0.328000 0.312000 -0.888000 -0.990600 -0.602500 -0.304800 -0.488000 -0.376000 -0.784000 -0.990600 -0.602500 -0.304800 -0.488000 -0.376000 -0.784000 -0.550000 -0.242100 -0.060900 -0.400000 -0.536000 0.736000 -0.550000 -0.242100 -0.060900 -0.400000 -0.536000 0.736000 -0.550000 -0.200800 -0.034900 0.016000 -0.040000 0.992000 -0.562800 -0.251000 -0.060900 -0.368000 -0.568000 0.720000 -0.600000 -0.200800 -0.056500 0.336000 0.448000 0.816000 -0.600000 -0.251000 -0.042400 -0.104000 -0.208000 0.968000 -0.608400 -0.200800 -0.060900 0.360000 0.488000 0.792000 -0.650000 -0.251000 -0.056300 0.424000 -0.024000 0.896000 -0.650000 -0.242600 -0.060900 0.392000 0.384000 0.824000 -0.657600 -0.251000 -0.060900 0.456000 -0.072000 0.880000 -0.650000 -0.251000 -0.056300 0.424000 -0.024000 0.896000 -0.650000 -0.258100 -0.060900 0.392000 -0.456000 0.792000 -0.600000 -0.251000 -0.042400 -0.104000 -0.208000 0.968000 -0.600000 -0.272000 -0.060900 -0.264000 -0.632000 0.720000 -0.562800 -0.251000 -0.060900 -0.368000 -0.568000 0.720000 -0.600000 -0.301200 -0.098800 -0.176000 -0.576000 0.792000 -0.550000 -0.251000 -0.069700 -0.416000 -0.584000 0.688000 -0.552600 -0.301200 -0.121900 -0.368000 -0.384000 0.840000 -0.550000 -0.300100 -0.121900 -0.624000 -0.616000 0.472000 -0.550000 -0.301200 -0.123600 -0.624000 -0.440000 0.632000 -0.552600 -0.301200 -0.121900 -0.368000 -0.384000 0.840000 -0.550000 -0.317100 -0.121900 -0.368000 0.064000 0.920000 -0.600000 -0.333000 -0.121900 0.024000 -0.312000 0.944000 -0.558500 -0.351500 -0.121900 0.208000 -0.648000 0.728000 -0.600000 -0.351500 -0.136300 0.144000 -0.792000 0.584000 -0.550000 -0.353000 -0.121900 -0.032000 -0.832000 0.536000 -0.600000 -0.392700 -0.182900 -0.184000 -0.752000 0.624000 -0.550000 -0.389500 -0.182900 -0.304000 -0.784000 0.528000 -0.600000 -0.401700 -0.203000 -0.208000 -0.872000 0.432000 -0.550000 -0.401700 -0.218900 -0.128000 -0.904000 0.392000 -0.600000 -0.414700 -0.243900 -0.184000 -0.936000 0.272000 -0.550000 -0.409700 -0.243900 -0.144000 -0.944000 0.272000 -0.600000 -0.422100 -0.304800 -0.120000 -0.768000 -0.616000 -0.550000 -0.415900 -0.304800 -0.192000 -0.848000 -0.480000 -0.600000 -0.401700 -0.327900 -0.024000 -0.544000 -0.832000 -0.550000 -0.401700 -0.333700 -0.144000 -0.688000 -0.704000 -0.600000 -0.351500 -0.337900 0.040000 -0.080000 -0.992000 -0.550000 -0.351500 -0.364500 0.120000 -0.104000 -0.984000 -0.600000 -0.301200 -0.352300 -0.528000 -0.312000 -0.776000 -0.550000 -0.316300 -0.304800 -0.472000 0.688000 -0.536000 -0.567500 -0.301200 -0.304800 -0.696000 0.400000 -0.584000 -0.550000 -0.301200 -0.279200 -0.712000 0.120000 -0.680000 -0.550000 -0.272400 -0.304800 -0.680000 -0.440000 -0.576000 -0.550000 -0.272400 -0.304800 -0.680000 -0.440000 -0.576000 -0.616700 0.401700 0.000000 0.496000 0.864000 -0.032000 -0.616700 0.401700 0.000000 0.496000 0.864000 -0.032000 -0.650000 0.368200 0.000000 0.792000 0.584000 -0.144000 -0.600000 0.401700 -0.057700 0.168000 0.920000 -0.344000 -0.650000 0.351500 -0.057700 0.800000 0.552000 -0.208000 -0.600000 0.400600 -0.060900 -0.072000 0.912000 -0.384000 -0.648900 0.351500 -0.060900 0.576000 0.600000 -0.544000 -0.600000 0.351500 -0.101600 0.448000 0.496000 -0.736000 -0.650000 0.350500 -0.060900 0.712000 0.536000 -0.440000 -0.600000 0.310600 -0.121900 0.480000 0.424000 -0.760000 -0.650000 0.301200 -0.100800 0.528000 0.504000 -0.672000 -0.608400 0.301200 -0.121900 0.448000 0.488000 -0.744000 -0.600000 0.310600 -0.121900 0.480000 0.424000 -0.760000 -0.600000 0.301200 -0.128700 0.472000 0.520000 -0.704000 -0.600000 0.301200 -0.128700 0.472000 0.520000 -0.704000 -0.648900 0.351500 -0.060900 0.576000 0.600000 -0.544000 -0.648900 0.351500 -0.060900 0.576000 0.600000 -0.544000 -0.650000 0.350500 -0.060900 0.712000 0.536000 -0.440000 -0.650000 0.351500 -0.057700 0.800000 0.552000 -0.208000 -0.680100 0.301200 -0.060900 0.752000 0.544000 -0.368000 -0.660900 0.351500 0.000000 0.832000 0.512000 -0.176000 -0.685300 0.301200 0.000000 0.832000 0.536000 -0.104000 -0.680100 0.301200 -0.060900 0.752000 0.544000 -0.368000 -0.700000 0.279600 0.000000 0.792000 0.600000 -0.048000 -0.700000 0.278700 -0.060900 0.648000 0.584000 -0.472000 -0.700000 0.278700 -0.060900 0.648000 0.584000 -0.472000 -0.600000 -0.194800 -0.060900 0.352000 0.496000 0.784000 -0.600000 -0.194800 -0.060900 0.352000 0.496000 0.784000 -0.608400 -0.200800 -0.060900 0.360000 0.488000 0.792000 -0.600000 -0.200800 -0.056500 0.336000 0.448000 0.816000 -0.600000 -0.200800 -0.056500 0.336000 0.448000 0.816000 -0.650000 0.368200 0.000000 0.792000 0.584000 -0.144000 -0.650000 0.368200 0.000000 0.792000 0.584000 -0.144000 -0.650000 0.351500 -0.057700 0.800000 0.552000 -0.208000 -0.660900 0.351500 0.000000 0.832000 0.512000 -0.176000 -0.660900 0.351500 0.000000 0.832000 0.512000 -0.176000 -0.650000 0.000000 -0.040500 0.104000 -0.944000 0.296000 -0.650000 0.000000 -0.040500 0.104000 -0.944000 0.296000 -0.686800 0.000000 -0.060900 0.208000 -0.960000 0.144000 -0.650000 -0.010200 -0.060900 0.168000 -0.784000 0.592000 -0.698200 0.000000 -0.121900 0.296000 -0.952000 0.032000 -0.650000 -0.033500 -0.121900 0.512000 -0.672000 0.520000 -0.687300 0.000000 -0.182900 0.648000 -0.600000 -0.456000 -0.650000 -0.048900 -0.182900 0.792000 -0.584000 0.152000 -0.653800 0.000000 -0.243900 0.576000 -0.112000 -0.808000 -0.650000 -0.016900 -0.243900 0.704000 -0.184000 -0.672000 -0.650000 -0.048900 -0.182900 0.792000 -0.584000 0.152000 -0.637200 -0.050200 -0.243900 0.840000 -0.080000 -0.528000 -0.649100 -0.050200 -0.182900 0.816000 -0.544000 0.144000 -0.650000 -0.048900 -0.182900 0.792000 -0.584000 0.152000 -0.638000 -0.050200 -0.121900 0.800000 -0.536000 0.256000 -0.650000 -0.033500 -0.121900 0.512000 -0.672000 0.520000 -0.650000 -0.033500 -0.121900 0.512000 -0.672000 0.520000 -0.800000 -0.015400 0.000000 -0.560000 -0.800000 0.184000 -0.800000 -0.015400 0.000000 -0.560000 -0.800000 0.184000 -0.772100 0.000000 0.000000 -0.504000 -0.832000 0.224000 -0.800000 -0.024700 -0.060900 -0.616000 -0.776000 0.088000 -0.753100 0.000000 -0.060900 -0.472000 -0.872000 0.000000 -0.800000 -0.027900 -0.121900 -0.664000 -0.736000 -0.072000 -0.756600 0.000000 -0.121900 -0.496000 -0.856000 -0.080000 -0.800000 -0.017800 -0.182900 -0.616000 -0.680000 -0.376000 -0.776700 0.000000 -0.182900 -0.576000 -0.728000 -0.360000 -0.800000 0.000000 -0.217200 -0.656000 -0.464000 -0.584000 -0.800000 0.000000 -0.217200 -0.656000 -0.464000 -0.584000 -0.900000 0.131100 0.000000 0.480000 0.848000 0.192000 -0.900000 0.131100 0.000000 0.480000 0.848000 0.192000 -0.950000 0.102000 0.000000 0.472000 0.864000 0.120000 -0.900000 0.143500 -0.060900 0.528000 0.808000 -0.240000 -0.950000 0.106300 -0.060900 0.576000 0.776000 -0.240000 -0.900000 0.127900 -0.121900 0.560000 0.776000 -0.264000 -0.950000 0.100400 -0.078300 0.560000 0.768000 -0.304000 -0.931600 0.100400 -0.121900 0.600000 0.744000 -0.272000 -0.950000 0.086300 -0.121900 0.544000 0.784000 -0.280000 -0.912000 0.100400 -0.182900 0.600000 0.704000 -0.360000 -0.950000 0.069900 -0.182900 0.544000 0.736000 -0.392000 -0.900000 0.100400 -0.203200 0.536000 0.688000 -0.472000 -0.950000 0.050200 -0.224500 0.472000 0.712000 -0.504000 -0.900000 0.070800 -0.243900 -0.096000 0.744000 -0.656000 -0.929600 0.050200 -0.243900 0.432000 0.672000 -0.584000 -0.900000 0.050200 -0.268900 0.208000 0.672000 -0.696000 -0.950000 0.037500 -0.243900 0.432000 0.688000 -0.576000 -0.900000 0.016700 -0.304800 -0.152000 0.720000 -0.664000 -0.950000 0.000000 -0.291100 0.424000 0.536000 -0.720000 -0.927400 0.000000 -0.304800 0.400000 0.560000 -0.720000 -0.950000 -0.016600 -0.304800 0.448000 0.520000 -0.720000 -0.900000 0.000000 -0.329500 -0.080000 0.648000 -0.744000 -0.950000 -0.050200 -0.338500 0.440000 0.400000 -0.800000 -0.900000 -0.050200 -0.348300 -0.256000 0.192000 -0.944000 -0.950000 -0.100400 -0.351000 0.336000 0.064000 -0.936000 -0.900000 -0.100400 -0.341700 -0.464000 -0.104000 -0.872000 -0.950000 -0.150600 -0.345500 -0.032000 0.064000 -0.992000 -0.900000 -0.150600 -0.332000 -0.672000 -0.328000 -0.656000 -0.900000 -0.150600 -0.332000 -0.672000 -0.328000 -0.656000 -0.995800 -0.200800 0.000000 -0.648000 -0.704000 0.264000 -0.995800 -0.200800 0.000000 -0.648000 -0.704000 0.264000 -0.950000 -0.168100 0.000000 -0.640000 -0.744000 0.184000 -0.973000 -0.200800 -0.060900 -0.584000 -0.760000 0.264000 -0.950000 -0.183700 -0.060900 -0.632000 -0.728000 0.232000 -0.950500 -0.200800 -0.121900 -0.632000 -0.744000 0.192000 -0.950000 -0.200400 -0.121900 -0.720000 -0.672000 0.136000 -0.950000 -0.200800 -0.124000 -0.680000 -0.712000 0.160000 -0.950000 -0.200800 -0.124000 -0.680000 -0.712000 0.160000 --0.910500 0.251000 -0.121900 0.344000 0.880000 -0.304000 --0.910500 0.251000 -0.121900 0.344000 0.880000 -0.304000 --0.900000 0.246900 -0.121900 0.360000 0.872000 -0.304000 --0.900000 0.251000 -0.101700 0.376000 0.896000 -0.216000 --0.900000 0.251000 -0.101700 0.376000 0.896000 -0.216000 --0.900000 -0.502100 -0.104000 -0.752000 0.000000 0.656000 --0.900000 -0.502100 -0.104000 -0.752000 0.000000 0.656000 --0.900000 -0.511500 -0.121900 -0.520000 -0.664000 0.528000 --0.906100 -0.502100 -0.121900 -0.920000 0.072000 0.376000 --0.900000 -0.542100 -0.182900 -0.808000 -0.560000 0.136000 --0.925200 -0.502100 -0.182900 -0.976000 -0.008000 0.208000 --0.900000 -0.551700 -0.243900 -0.808000 -0.568000 -0.120000 --0.929300 -0.502100 -0.243900 -0.992000 0.064000 -0.008000 --0.900000 -0.539600 -0.304800 -0.720000 -0.488000 -0.480000 --0.920600 -0.502100 -0.304800 -0.888000 -0.288000 -0.344000 --0.900000 -0.502100 -0.352600 -0.672000 0.128000 -0.720000 --0.900000 -0.539600 -0.304800 -0.720000 -0.488000 -0.480000 --0.864000 -0.502100 -0.365800 -0.304000 0.480000 -0.816000 --0.891900 -0.552300 -0.304800 -0.800000 -0.568000 -0.136000 --0.860100 -0.552300 -0.365800 -0.680000 -0.432000 -0.584000 --0.850000 -0.602000 -0.304800 -0.640000 -0.736000 -0.184000 --0.850000 -0.564700 -0.365800 -0.608000 -0.528000 -0.584000 --0.849200 -0.602500 -0.304800 -0.536000 -0.720000 -0.432000 --0.806700 -0.602500 -0.365800 -0.520000 -0.656000 -0.536000 --0.800000 -0.636000 -0.304800 -0.536000 -0.792000 -0.272000 --0.800000 -0.607700 -0.365800 -0.488000 -0.640000 -0.584000 --0.750000 -0.652200 -0.304800 -0.040000 -0.952000 -0.288000 --0.750000 -0.628000 -0.365800 -0.232000 -0.808000 -0.528000 --0.734200 -0.652700 -0.304800 -0.024000 -0.976000 -0.192000 --0.700000 -0.639000 -0.365800 -0.040000 -0.920000 -0.376000 --0.700000 -0.652700 -0.309000 0.024000 -0.952000 -0.296000 --0.650000 -0.641900 -0.365800 -0.024000 -0.952000 -0.280000 --0.688500 -0.652700 -0.304800 0.080000 -0.992000 -0.064000 --0.650000 -0.650400 -0.304800 0.048000 -0.992000 0.096000 --0.700000 -0.652700 -0.298900 0.056000 -0.976000 0.184000 --0.650000 -0.641500 -0.243900 0.040000 -0.976000 0.168000 --0.700000 -0.645500 -0.243900 -0.008000 -0.984000 0.160000 --0.650000 -0.630900 -0.182900 0.008000 -0.968000 0.232000 --0.700000 -0.633400 -0.182900 -0.064000 -0.960000 0.248000 --0.650000 -0.615500 -0.121900 -0.008000 -0.952000 0.304000 --0.700000 -0.614700 -0.121900 -0.136000 -0.888000 0.424000 --0.650000 -0.602500 -0.069700 -0.072000 -0.800000 0.584000 --0.700000 -0.602500 -0.083600 -0.192000 -0.680000 0.704000 --0.650000 -0.594800 -0.060900 -0.368000 -0.640000 0.664000 --0.700000 -0.552300 -0.082500 -0.736000 -0.280000 0.608000 --0.685200 -0.552300 -0.060900 -0.696000 -0.384000 0.592000 --0.700000 -0.507800 -0.060900 -0.864000 -0.200000 0.448000 --0.700000 -0.507800 -0.060900 -0.864000 -0.200000 0.448000 --0.868200 -0.552300 -0.121900 -0.520000 -0.224000 0.816000 --0.868200 -0.552300 -0.121900 -0.520000 -0.224000 0.816000 --0.850000 -0.552300 -0.082300 -0.704000 -0.480000 0.504000 --0.850000 -0.569100 -0.121900 -0.488000 -0.776000 0.384000 --0.800000 -0.552300 -0.095900 0.424000 0.264000 0.864000 --0.800000 -0.584500 -0.121900 -0.288000 -0.544000 0.776000 --0.750000 -0.552300 -0.119400 0.072000 0.512000 0.848000 --0.764000 -0.602500 -0.121900 -0.176000 -0.816000 0.544000 --0.750000 -0.602500 -0.116200 -0.176000 -0.808000 0.544000 --0.750000 -0.605000 -0.121900 -0.152000 -0.872000 0.456000 --0.700000 -0.602500 -0.083600 -0.192000 -0.680000 0.704000 --0.700000 -0.614700 -0.121900 -0.136000 -0.888000 0.424000 --0.750000 -0.605000 -0.121900 -0.152000 -0.872000 0.456000 --0.700000 -0.633400 -0.182900 -0.064000 -0.960000 0.248000 --0.750000 -0.630100 -0.182900 -0.144000 -0.912000 0.360000 --0.700000 -0.645500 -0.243900 -0.008000 -0.984000 0.160000 --0.750000 -0.646000 -0.243900 -0.088000 -0.984000 0.144000 --0.700000 -0.652700 -0.298900 0.056000 -0.976000 0.184000 --0.750000 -0.652200 -0.304800 -0.040000 -0.952000 -0.288000 --0.734200 -0.652700 -0.304800 -0.024000 -0.976000 -0.192000 --0.700000 -0.652700 -0.298900 0.056000 -0.976000 0.184000 --0.700000 -0.653800 -0.304800 0.056000 -0.992000 -0.080000 --0.688500 -0.652700 -0.304800 0.080000 -0.992000 -0.064000 --0.700000 -0.652700 -0.309000 0.024000 -0.952000 -0.296000 --0.700000 -0.653800 -0.304800 0.056000 -0.992000 -0.080000 --0.734200 -0.652700 -0.304800 -0.024000 -0.976000 -0.192000 --0.734200 -0.652700 -0.304800 -0.024000 -0.976000 -0.192000 --0.804300 0.200800 -0.121900 0.384000 0.872000 -0.288000 --0.804300 0.200800 -0.121900 0.384000 0.872000 -0.288000 --0.800000 0.198900 -0.121900 0.384000 0.872000 -0.288000 --0.800000 0.200800 -0.113900 0.392000 0.880000 -0.256000 --0.800000 0.200800 -0.113900 0.392000 0.880000 -0.256000 --0.762700 -0.401700 -0.060900 -0.840000 -0.496000 0.168000 --0.762700 -0.401700 -0.060900 -0.840000 -0.496000 0.168000 --0.771000 -0.401700 -0.121900 -0.872000 -0.456000 0.128000 --0.750000 -0.426100 -0.060900 -0.864000 -0.448000 0.200000 --0.750000 -0.448400 -0.121900 -0.880000 -0.432000 0.160000 --0.735400 -0.451900 -0.060900 -0.768000 -0.512000 0.360000 --0.748200 -0.451900 -0.121900 -0.880000 -0.440000 0.160000 --0.701200 -0.502100 -0.060900 -0.816000 -0.416000 0.392000 --0.723300 -0.502100 -0.121900 -0.896000 -0.224000 0.368000 --0.748200 -0.451900 -0.121900 -0.880000 -0.440000 0.160000 --0.749300 -0.502100 -0.182900 -0.920000 -0.232000 0.288000 --0.750000 -0.451900 -0.133400 -0.896000 -0.392000 0.184000 --0.750000 -0.499500 -0.182900 -0.936000 -0.200000 0.264000 --0.757600 -0.451900 -0.182900 -0.952000 -0.232000 0.184000 --0.750000 -0.502100 -0.184800 -0.496000 0.696000 0.496000 --0.769800 -0.451900 -0.243900 -0.952000 -0.080000 0.272000 --0.800000 -0.502100 -0.227500 0.432000 0.824000 0.352000 --0.800000 -0.496000 -0.243900 0.424000 0.840000 0.320000 --0.820300 -0.502100 -0.182900 0.496000 0.792000 0.344000 --0.850000 -0.480800 -0.243900 0.376000 0.912000 0.152000 --0.850000 -0.490700 -0.182900 0.328000 0.896000 0.288000 --0.896800 -0.451900 -0.243900 0.600000 0.776000 0.136000 --0.900000 -0.462200 -0.182900 0.320000 0.888000 0.304000 --0.900000 -0.451900 -0.229200 0.512000 0.832000 0.168000 --0.896800 -0.451900 -0.243900 0.600000 0.776000 0.136000 --0.900000 -0.449600 -0.243900 0.496000 0.856000 0.136000 --0.891000 -0.451900 -0.304800 0.528000 0.824000 -0.192000 --0.900000 -0.446300 -0.304800 0.160000 0.912000 -0.360000 --0.900000 -0.451900 -0.318500 0.104000 0.872000 -0.464000 --0.912200 -0.451900 -0.304800 -0.496000 0.720000 -0.464000 --0.900000 -0.446300 -0.304800 0.160000 0.912000 -0.360000 --0.921000 -0.451900 -0.243900 -0.184000 0.968000 0.160000 --0.900000 -0.449600 -0.243900 0.496000 0.856000 0.136000 --0.900000 -0.451900 -0.229200 0.512000 0.832000 0.168000 --0.900000 -0.451900 -0.229200 0.512000 0.832000 0.168000 --0.700000 -0.602500 -0.083600 -0.192000 -0.680000 0.704000 --0.700000 -0.602500 -0.083600 -0.192000 -0.680000 0.704000 --0.750000 -0.602500 -0.116200 -0.176000 -0.808000 0.544000 --0.700000 -0.552300 -0.082500 -0.736000 -0.280000 0.608000 --0.750000 -0.552300 -0.119400 0.072000 0.512000 0.848000 --0.750000 -0.552300 -0.119400 0.072000 0.512000 0.848000 --0.650000 -0.594800 -0.060900 -0.368000 -0.640000 0.664000 --0.650000 -0.594800 -0.060900 -0.368000 -0.640000 0.664000 --0.650000 -0.602500 -0.069700 -0.072000 -0.800000 0.584000 --0.600000 -0.601900 -0.060900 -0.072000 -0.808000 0.568000 --0.600000 -0.602500 -0.062100 -0.056000 -0.816000 0.560000 --0.550000 -0.588500 -0.060900 0.224000 -0.888000 0.384000 --0.550000 -0.602500 -0.100200 0.256000 -0.912000 0.288000 --0.500000 -0.570000 -0.060900 0.480000 -0.800000 0.328000 --0.531000 -0.602500 -0.121900 0.248000 -0.920000 0.272000 --0.500000 -0.589900 -0.121900 0.408000 -0.832000 0.352000 --0.500000 -0.602500 -0.155300 0.000000 -0.920000 0.376000 --0.531000 -0.602500 -0.121900 0.248000 -0.920000 0.272000 --0.500000 -0.610400 -0.182900 -0.136000 -0.936000 0.304000 --0.550000 -0.606400 -0.121900 0.192000 -0.952000 0.216000 --0.550000 -0.618800 -0.182900 0.168000 -0.944000 0.272000 --0.600000 -0.616000 -0.121900 0.080000 -0.960000 0.256000 --0.600000 -0.629300 -0.182900 0.072000 -0.968000 0.224000 --0.650000 -0.615500 -0.121900 -0.008000 -0.952000 0.304000 --0.650000 -0.630900 -0.182900 0.008000 -0.968000 0.232000 --0.600000 -0.629300 -0.182900 0.072000 -0.968000 0.224000 --0.650000 -0.641500 -0.243900 0.040000 -0.976000 0.168000 --0.600000 -0.640700 -0.243900 0.080000 -0.976000 0.192000 --0.650000 -0.650400 -0.304800 0.048000 -0.992000 0.096000 --0.600000 -0.650800 -0.304800 0.064000 -0.992000 0.000000 --0.650000 -0.641900 -0.365800 -0.024000 -0.952000 -0.280000 --0.600000 -0.645500 -0.365800 0.016000 -0.968000 -0.216000 --0.650000 -0.621300 -0.426800 -0.080000 -0.904000 -0.400000 --0.600000 -0.630300 -0.426800 -0.072000 -0.944000 -0.312000 --0.600000 -0.645500 -0.365800 0.016000 -0.968000 -0.216000 --0.550000 -0.626200 -0.426800 0.144000 -0.960000 -0.232000 --0.550000 -0.637200 -0.365800 0.152000 -0.968000 -0.168000 --0.500000 -0.621400 -0.426800 0.072000 -0.968000 -0.232000 --0.500000 -0.633000 -0.365800 -0.088000 -0.968000 -0.200000 --0.450000 -0.629300 -0.426800 -0.048000 -0.904000 -0.416000 --0.450000 -0.645700 -0.365800 -0.144000 -0.904000 -0.392000 --0.400000 -0.621700 -0.426800 0.392000 -0.856000 -0.304000 --0.405700 -0.652700 -0.365800 -0.144000 -0.920000 -0.344000 --0.400000 -0.652700 -0.368100 -0.128000 -0.872000 -0.456000 --0.400000 -0.652700 -0.368100 -0.128000 -0.872000 -0.456000 --0.650000 -0.602500 -0.069700 -0.072000 -0.800000 0.584000 --0.650000 -0.602500 -0.069700 -0.072000 -0.800000 0.584000 --0.650000 -0.615500 -0.121900 -0.008000 -0.952000 0.304000 --0.600000 -0.602500 -0.062100 -0.056000 -0.816000 0.560000 --0.600000 -0.616000 -0.121900 0.080000 -0.960000 0.256000 --0.550000 -0.602500 -0.100200 0.256000 -0.912000 0.288000 --0.550000 -0.606400 -0.121900 0.192000 -0.952000 0.216000 --0.531000 -0.602500 -0.121900 0.248000 -0.920000 0.272000 --0.531000 -0.602500 -0.121900 0.248000 -0.920000 0.272000 --0.554400 -0.050200 -0.060900 0.944000 0.280000 0.128000 --0.554400 -0.050200 -0.060900 0.944000 0.280000 0.128000 --0.586600 -0.050200 -0.121900 0.872000 0.224000 -0.424000 --0.550000 -0.066800 -0.060900 0.944000 0.320000 -0.008000 --0.578300 -0.100400 -0.121900 0.848000 0.312000 -0.424000 --0.550000 -0.100400 -0.079500 0.552000 0.552000 -0.616000 --0.550000 -0.145600 -0.121900 0.512000 0.792000 -0.312000 --0.578300 -0.100400 -0.121900 0.848000 0.312000 -0.424000 --0.550000 -0.150600 -0.142400 0.376000 0.896000 -0.200000 --0.594100 -0.100400 -0.182900 0.816000 0.296000 -0.480000 --0.561800 -0.150600 -0.182900 0.544000 0.784000 -0.280000 --0.550000 -0.150600 -0.142400 0.376000 0.896000 -0.200000 --0.550000 -0.155500 -0.182900 0.296000 0.920000 -0.232000 --0.550000 -0.155500 -0.182900 0.296000 0.920000 -0.232000 --0.452400 -0.100400 -0.060900 -0.344000 0.936000 -0.016000 --0.452400 -0.100400 -0.060900 -0.344000 0.936000 -0.016000 --0.450000 -0.100400 -0.065100 -0.512000 0.824000 -0.200000 --0.450000 -0.099400 -0.060900 -0.760000 0.616000 0.160000 --0.450000 -0.099400 -0.060900 -0.760000 0.616000 0.160000 --0.450000 -0.512800 -0.060900 0.208000 -0.760000 0.608000 --0.450000 -0.512800 -0.060900 0.208000 -0.760000 0.608000 --0.478800 -0.552300 -0.060900 0.704000 -0.592000 0.376000 --0.450000 -0.549200 -0.121900 -0.080000 -0.800000 0.584000 --0.452200 -0.552300 -0.121900 0.864000 0.184000 0.464000 --0.450000 -0.552300 -0.127200 0.616000 -0.144000 0.768000 --0.450000 -0.549200 -0.121900 -0.080000 -0.800000 0.584000 --0.440600 -0.552300 -0.121900 -0.264000 -0.768000 0.568000 --0.450000 -0.512800 -0.060900 0.208000 -0.760000 0.608000 --0.400000 -0.552300 -0.100200 0.624000 -0.512000 0.584000 --0.400000 -0.527700 -0.060900 0.080000 -0.768000 0.624000 --0.393200 -0.552300 -0.121900 0.872000 -0.352000 0.320000 --0.380200 -0.502100 -0.060900 0.648000 -0.616000 0.432000 --0.350000 -0.503000 -0.121900 0.232000 -0.880000 0.400000 --0.350000 -0.502100 -0.119400 0.240000 -0.864000 0.424000 --0.380200 -0.502100 -0.060900 0.648000 -0.616000 0.432000 --0.350000 -0.453900 -0.060900 0.248000 -0.624000 0.728000 --0.350000 -0.453900 -0.060900 0.248000 -0.624000 0.728000 --0.450000 -0.602500 -0.084100 -0.232000 -0.736000 0.624000 --0.450000 -0.602500 -0.084100 -0.232000 -0.736000 0.624000 --0.450000 -0.558900 -0.121900 0.808000 0.320000 0.488000 --0.410500 -0.602500 -0.121900 0.456000 -0.632000 0.616000 --0.450000 -0.552300 -0.127200 0.616000 -0.144000 0.768000 --0.400000 -0.602500 -0.131300 0.560000 -0.576000 0.584000 --0.440600 -0.552300 -0.121900 -0.264000 -0.768000 0.568000 --0.400000 -0.588000 -0.121900 0.672000 -0.144000 0.720000 --0.400000 -0.552300 -0.100200 0.624000 -0.512000 0.584000 --0.393200 -0.552300 -0.121900 0.872000 -0.352000 0.320000 --0.400000 -0.588000 -0.121900 0.672000 -0.144000 0.720000 --0.379200 -0.552300 -0.182900 0.864000 -0.416000 0.264000 --0.400000 -0.602500 -0.131300 0.560000 -0.576000 0.584000 --0.386500 -0.602500 -0.182900 0.376000 -0.032000 0.920000 --0.379200 -0.552300 -0.182900 0.864000 -0.416000 0.264000 --0.371400 -0.602500 -0.243900 0.928000 0.016000 0.352000 --0.363900 -0.552300 -0.243900 0.816000 -0.480000 0.304000 --0.379200 -0.552300 -0.182900 0.864000 -0.416000 0.264000 --0.350000 -0.535600 -0.243900 0.360000 -0.840000 0.384000 --0.350000 -0.518400 -0.182900 -0.088000 -0.928000 0.360000 --0.379200 -0.552300 -0.182900 0.864000 -0.416000 0.264000 --0.350000 -0.503000 -0.121900 0.232000 -0.880000 0.400000 --0.393200 -0.552300 -0.121900 0.872000 -0.352000 0.320000 --0.393200 -0.552300 -0.121900 0.872000 -0.352000 0.320000 --0.350000 0.148000 -0.060900 -0.504000 0.552000 0.656000 --0.350000 0.148000 -0.060900 -0.504000 0.552000 0.656000 --0.361800 0.100400 -0.060900 -0.920000 0.112000 -0.352000 --0.350000 0.100400 -0.076700 -0.736000 0.256000 -0.616000 --0.358600 0.050200 -0.060900 -0.920000 0.168000 -0.328000 --0.350000 0.050200 -0.078800 -0.832000 0.272000 -0.472000 --0.350000 0.100400 -0.076700 -0.736000 0.256000 -0.616000 --0.335400 0.050200 -0.121900 -0.752000 0.472000 -0.456000 --0.317300 0.100400 -0.121900 -0.712000 0.264000 -0.640000 --0.317300 0.100400 -0.121900 -0.712000 0.264000 -0.640000 --0.377800 0.000000 -0.060900 -0.864000 0.424000 -0.248000 --0.377800 0.000000 -0.060900 -0.864000 0.424000 -0.248000 --0.400000 -0.037800 -0.060900 -0.728000 0.664000 0.152000 --0.372200 0.000000 -0.121900 -0.848000 0.480000 -0.200000 --0.400000 -0.050200 -0.118700 -0.832000 0.528000 -0.160000 --0.399400 -0.050200 -0.121900 -0.760000 0.504000 -0.392000 --0.400000 -0.050900 -0.121900 -0.736000 0.536000 -0.408000 --0.400000 -0.050900 -0.121900 -0.736000 0.536000 -0.408000 --0.350000 0.301200 -0.064600 -0.624000 0.064000 -0.768000 --0.350000 0.301200 -0.064600 -0.624000 0.064000 -0.768000 --0.300000 0.301200 -0.089300 -0.344000 0.056000 -0.936000 --0.350000 0.251000 -0.067500 -0.624000 0.048000 -0.768000 --0.300000 0.251000 -0.090000 -0.368000 0.088000 -0.920000 --0.350000 0.200800 -0.076700 -0.368000 -0.104000 -0.920000 --0.300000 0.200800 -0.077300 -0.504000 0.240000 -0.824000 --0.350000 0.153200 -0.060900 -0.608000 -0.784000 0.016000 --0.300000 0.150600 -0.105900 -0.768000 0.536000 -0.320000 --0.346000 0.150600 -0.060900 -0.768000 -0.144000 0.616000 --0.346000 0.150600 -0.060900 -0.768000 -0.144000 0.616000 --0.300000 0.401700 -0.066400 -0.448000 0.440000 -0.768000 --0.300000 0.401700 -0.066400 -0.448000 0.440000 -0.768000 --0.250000 0.401700 -0.091800 -0.416000 0.456000 -0.776000 --0.300000 0.351500 -0.083400 -0.432000 0.176000 -0.880000 --0.250000 0.351500 -0.107800 -0.464000 0.176000 -0.864000 --0.300000 0.301200 -0.089300 -0.344000 0.056000 -0.936000 --0.250000 0.301200 -0.116200 -0.672000 0.120000 -0.720000 --0.300000 0.251000 -0.090000 -0.368000 0.088000 -0.920000 --0.250000 0.268200 -0.121900 -0.464000 0.088000 -0.872000 --0.254200 0.251000 -0.121900 -0.384000 0.088000 -0.912000 --0.300000 0.251000 -0.090000 -0.368000 0.088000 -0.920000 --0.263400 0.200800 -0.121900 -0.480000 0.216000 -0.840000 --0.300000 0.200800 -0.077300 -0.504000 0.240000 -0.824000 --0.295300 0.150600 -0.121900 -0.728000 0.520000 -0.432000 --0.300000 0.150600 -0.105900 -0.768000 0.536000 -0.320000 --0.300000 0.144000 -0.121900 -0.728000 0.496000 -0.456000 --0.300000 0.144000 -0.121900 -0.728000 0.496000 -0.456000 --0.250000 0.401700 -0.091800 -0.416000 0.456000 -0.776000 --0.250000 0.401700 -0.091800 -0.416000 0.456000 -0.776000 --0.208300 0.401700 -0.121900 -0.432000 0.432000 -0.784000 --0.250000 0.351500 -0.107800 -0.464000 0.176000 -0.864000 --0.233300 0.351500 -0.121900 -0.616000 0.184000 -0.752000 --0.250000 0.301200 -0.116200 -0.672000 0.120000 -0.720000 --0.245300 0.301200 -0.121900 -0.680000 0.120000 -0.720000 --0.250000 0.268200 -0.121900 -0.464000 0.088000 -0.872000 --0.250000 0.268200 -0.121900 -0.464000 0.088000 -0.872000 --0.104300 -0.100400 -0.060900 0.528000 0.416000 0.728000 --0.104300 -0.100400 -0.060900 0.528000 0.416000 0.728000 --0.100000 -0.100400 -0.064700 0.496000 0.416000 0.752000 --0.100000 -0.105500 -0.060900 0.480000 0.464000 0.736000 --0.050000 -0.100400 -0.073900 0.136000 0.480000 0.864000 --0.050000 -0.119400 -0.060900 0.168000 0.528000 0.824000 -0.000000 -0.100400 -0.085100 0.096000 0.456000 0.880000 -0.000000 -0.136800 -0.060900 0.088000 0.520000 0.840000 -0.050000 -0.100400 -0.083400 0.000000 0.440000 0.888000 -0.050000 -0.140200 -0.060900 0.152000 0.504000 0.848000 -0.100000 -0.100400 -0.084200 0.032000 0.360000 0.928000 -0.076800 -0.150600 -0.060900 0.208000 0.432000 0.872000 -0.100000 -0.150600 -0.068400 0.184000 0.416000 0.888000 -0.100000 -0.170000 -0.060900 0.256000 0.296000 0.912000 -0.100000 -0.170000 -0.060900 0.256000 0.296000 0.912000 --0.133200 -0.451900 -0.060900 0.584000 -0.656000 0.464000 --0.133200 -0.451900 -0.060900 0.584000 -0.656000 0.464000 --0.100000 -0.415900 -0.060900 0.680000 -0.544000 0.480000 --0.100000 -0.451900 -0.117700 0.624000 -0.664000 0.392000 --0.100000 -0.451900 -0.117700 0.624000 -0.664000 0.392000 --0.150000 -0.502100 -0.111600 0.592000 -0.752000 0.280000 --0.150000 -0.502100 -0.111600 0.592000 -0.752000 0.280000 --0.146100 -0.502100 -0.121900 0.616000 -0.744000 0.232000 --0.150000 -0.505100 -0.121900 0.584000 -0.768000 0.240000 --0.141200 -0.502100 -0.182900 0.696000 -0.688000 0.184000 --0.150000 -0.510100 -0.182900 0.616000 -0.760000 0.168000 --0.125700 -0.502100 -0.243900 0.664000 -0.408000 0.624000 --0.150000 -0.530700 -0.243900 0.632000 -0.664000 0.392000 --0.150000 -0.530700 -0.243900 0.632000 -0.664000 0.392000 --0.078700 0.200800 -0.060900 0.568000 -0.416000 0.704000 --0.078700 0.200800 -0.060900 0.568000 -0.416000 0.704000 --0.050000 0.236000 -0.060900 0.536000 -0.496000 0.672000 --0.050000 0.200800 -0.090500 0.520000 -0.520000 0.672000 --0.050000 0.200800 -0.090500 0.520000 -0.520000 0.672000 --0.100000 0.100400 -0.099400 0.760000 -0.264000 0.584000 --0.100000 0.100400 -0.099400 0.760000 -0.264000 0.584000 --0.089100 0.100400 -0.121900 0.816000 -0.232000 0.520000 --0.100000 0.054100 -0.121900 0.816000 -0.176000 0.544000 --0.100000 0.054100 -0.121900 0.816000 -0.176000 0.544000 --0.050000 -0.370100 -0.060900 0.592000 -0.672000 0.424000 --0.050000 -0.370100 -0.060900 0.592000 -0.672000 0.424000 --0.087700 -0.401700 -0.060900 0.608000 -0.600000 0.504000 --0.050000 -0.398200 -0.121900 0.592000 -0.704000 0.368000 --0.054100 -0.401700 -0.121900 0.656000 -0.688000 0.280000 --0.050000 -0.389600 -0.182900 0.656000 -0.736000 -0.128000 --0.061900 -0.401700 -0.182900 0.744000 -0.648000 -0.120000 --0.050000 -0.380500 -0.243900 0.664000 -0.736000 -0.104000 --0.071000 -0.401700 -0.243900 0.856000 -0.496000 -0.072000 --0.050000 -0.374600 -0.304800 0.584000 -0.672000 -0.448000 --0.073900 -0.401700 -0.304800 0.784000 -0.304000 -0.528000 --0.050000 -0.351500 -0.336900 0.024000 -0.576000 -0.808000 --0.100000 -0.401700 -0.330800 0.576000 -0.152000 -0.792000 --0.100000 -0.351500 -0.338800 0.024000 -0.312000 -0.944000 --0.150000 -0.401700 -0.364300 0.552000 0.080000 -0.824000 --0.150000 -0.351500 -0.350300 0.512000 0.192000 -0.832000 --0.100000 -0.351500 -0.338800 0.024000 -0.312000 -0.944000 --0.150000 -0.301200 -0.318500 -0.024000 0.504000 -0.856000 --0.100000 -0.301200 -0.349000 -0.368000 0.264000 -0.888000 --0.150000 -0.286300 -0.304800 -0.184000 0.480000 -0.848000 --0.100000 -0.251000 -0.333700 -0.512000 0.248000 -0.816000 --0.123600 -0.251000 -0.304800 -0.536000 0.288000 -0.784000 --0.100000 -0.200800 -0.311700 -0.496000 0.128000 -0.856000 --0.108400 -0.200800 -0.304800 -0.496000 -0.048000 -0.856000 --0.123600 -0.251000 -0.304800 -0.536000 0.288000 -0.784000 --0.150000 -0.200800 -0.284500 0.024000 -0.216000 -0.968000 --0.150000 -0.251000 -0.289400 -0.264000 0.272000 -0.920000 --0.196100 -0.200800 -0.304800 0.360000 -0.200000 -0.904000 --0.195100 -0.251000 -0.304800 0.376000 0.112000 -0.912000 --0.150000 -0.251000 -0.289400 -0.264000 0.272000 -0.920000 --0.150000 -0.286300 -0.304800 -0.184000 0.480000 -0.848000 --0.123600 -0.251000 -0.304800 -0.536000 0.288000 -0.784000 --0.123600 -0.251000 -0.304800 -0.536000 0.288000 -0.784000 -0.000000 0.393800 -0.060900 0.224000 0.176000 0.952000 -0.000000 0.393800 -0.060900 0.224000 0.176000 0.952000 --0.005200 0.401700 -0.060900 0.264000 0.168000 0.944000 -0.000000 0.401700 -0.062800 0.256000 0.176000 0.944000 -0.000000 0.401700 -0.062800 0.256000 0.176000 0.944000 -0.000000 0.493800 -0.121900 0.128000 0.960000 -0.232000 -0.000000 0.493800 -0.121900 0.128000 0.960000 -0.232000 -0.000000 0.451900 -0.081100 0.280000 0.456000 0.832000 -0.050000 0.485400 -0.121900 -0.032000 0.904000 -0.408000 -0.050000 0.451900 -0.077800 0.016000 0.408000 0.912000 -0.100000 0.494400 -0.121900 -0.184000 0.952000 -0.216000 -0.100000 0.451900 -0.066700 -0.192000 0.072000 0.976000 -0.138500 0.502100 -0.121900 -0.184000 0.952000 -0.216000 -0.121900 0.451900 -0.060900 -0.112000 0.472000 0.872000 -0.150000 0.502100 -0.119700 0.016000 0.656000 0.752000 -0.150000 0.456100 -0.060900 0.048000 0.664000 0.736000 -0.150000 0.456100 -0.060900 0.048000 0.664000 0.736000 -0.150000 0.503100 -0.121900 0.272000 0.456000 -0.840000 -0.150000 0.503100 -0.121900 0.272000 0.456000 -0.840000 -0.150000 0.502100 -0.119700 0.016000 0.656000 0.752000 -0.138500 0.502100 -0.121900 -0.184000 0.952000 -0.216000 -0.138500 0.502100 -0.121900 -0.184000 0.952000 -0.216000 -0.150000 0.409600 -0.060900 -0.208000 -0.072000 0.968000 -0.150000 0.409600 -0.060900 -0.208000 -0.072000 0.968000 -0.151400 0.401700 -0.060900 -0.480000 -0.416000 0.760000 -0.150000 0.401700 -0.062100 -0.392000 -0.400000 0.816000 -0.150000 0.401700 -0.062100 -0.392000 -0.400000 0.816000 -0.150000 -0.251000 -0.118100 0.224000 -0.792000 0.560000 -0.150000 -0.251000 -0.118100 0.224000 -0.792000 0.560000 -0.161400 -0.251000 -0.121900 0.152000 -0.792000 0.576000 -0.150000 -0.253200 -0.121900 0.192000 -0.808000 0.552000 -0.150000 -0.253200 -0.121900 0.192000 -0.808000 0.552000 -0.250000 0.432000 -0.060900 0.224000 0.624000 0.736000 -0.250000 0.432000 -0.060900 0.224000 0.624000 0.736000 -0.203100 0.451900 -0.060900 0.264000 0.672000 0.680000 -0.250000 0.451900 -0.094000 0.248000 0.784000 0.552000 -0.250000 0.451900 -0.094000 0.248000 0.784000 0.552000 -0.200000 0.352900 -0.060900 -0.368000 -0.496000 0.776000 -0.200000 0.352900 -0.060900 -0.368000 -0.496000 0.776000 -0.201200 0.351500 -0.060900 -0.488000 -0.576000 0.648000 -0.200000 0.351500 -0.062100 -0.312000 -0.640000 0.696000 -0.200000 0.351500 -0.062100 -0.312000 -0.640000 0.696000 -0.200000 -0.041200 -0.121900 0.160000 0.488000 0.856000 -0.200000 -0.041200 -0.121900 0.160000 0.488000 0.856000 -0.222300 -0.050200 -0.121900 0.200000 0.432000 0.872000 -0.200000 -0.050200 -0.116900 0.136000 0.368000 0.912000 -0.200000 -0.050200 -0.116900 0.136000 0.368000 0.912000 -0.300000 0.451900 -0.106900 0.184000 0.864000 0.456000 -0.300000 0.451900 -0.106900 0.184000 0.864000 0.456000 -0.300000 0.458100 -0.121900 0.224000 0.952000 -0.176000 -0.323400 0.451900 -0.121900 0.248000 0.944000 -0.200000 -0.300000 0.451900 -0.131100 0.200000 0.712000 -0.664000 -0.300000 0.451900 -0.131100 0.200000 0.712000 -0.664000 -0.366500 0.200800 -0.121900 -0.760000 -0.624000 0.168000 -0.366500 0.200800 -0.121900 -0.760000 -0.624000 0.168000 -0.400000 0.200800 -0.077800 -0.600000 -0.432000 0.664000 -0.400000 0.152400 -0.121900 -0.688000 -0.712000 -0.048000 -0.400000 0.152400 -0.121900 -0.688000 -0.712000 -0.048000 -0.400000 0.072600 -0.121900 -0.632000 0.256000 0.720000 -0.400000 0.072600 -0.121900 -0.632000 0.256000 0.720000 -0.400000 0.050200 -0.114800 -0.552000 0.256000 0.784000 -0.393200 0.050200 -0.121900 -0.648000 0.352000 0.664000 -0.393200 0.050200 -0.121900 -0.648000 0.352000 0.664000 -0.450000 -0.100400 -0.078400 -0.088000 0.200000 0.968000 -0.450000 -0.100400 -0.078400 -0.088000 0.200000 0.968000 -0.400000 -0.100400 -0.080400 -0.024000 0.176000 0.976000 -0.450000 -0.150600 -0.064700 -0.192000 0.128000 0.968000 -0.400000 -0.150600 -0.068400 -0.344000 -0.312000 0.880000 -0.450000 -0.200800 -0.072200 -0.256000 -0.536000 0.800000 -0.400000 -0.200800 -0.119100 -0.200000 -0.688000 0.688000 -0.450000 -0.227100 -0.121900 -0.296000 -0.712000 0.624000 -0.400000 -0.203000 -0.121900 -0.184000 -0.672000 0.712000 -0.450000 -0.251000 -0.179900 -0.288000 -0.680000 0.664000 -0.400000 -0.249800 -0.182900 0.472000 -0.752000 0.448000 -0.415700 -0.251000 -0.182900 -0.088000 -0.872000 0.480000 -0.400000 -0.249400 -0.243900 0.760000 -0.472000 -0.424000 -0.450000 -0.251000 -0.203800 -0.216000 -0.960000 -0.144000 -0.450000 -0.248400 -0.243900 -0.224000 -0.888000 -0.384000 -0.459300 -0.251000 -0.243900 -0.280000 -0.864000 -0.400000 -0.459300 -0.251000 -0.243900 -0.280000 -0.864000 -0.400000 -0.450000 0.163500 -0.060900 -0.600000 -0.504000 0.608000 -0.450000 0.163500 -0.060900 -0.600000 -0.504000 0.608000 -0.460500 0.150600 -0.060900 -0.624000 -0.512000 0.584000 -0.450000 0.150600 -0.075000 -0.616000 -0.488000 0.608000 -0.450000 0.150600 -0.075000 -0.616000 -0.488000 0.608000 -0.504600 0.100400 -0.060900 -0.704000 -0.248000 0.656000 -0.504600 0.100400 -0.060900 -0.704000 -0.248000 0.656000 -0.500000 0.067400 -0.060900 -0.592000 0.120000 0.792000 -0.500000 0.100400 -0.067100 -0.632000 -0.296000 0.704000 -0.500000 0.100400 -0.067100 -0.632000 -0.296000 0.704000 -0.550000 -0.159500 -0.060900 0.248000 0.472000 0.840000 -0.550000 -0.159500 -0.060900 0.248000 0.472000 0.840000 -0.530700 -0.150600 -0.060900 0.208000 0.504000 0.832000 -0.550000 -0.150600 -0.067100 0.240000 0.480000 0.840000 -0.550000 -0.150600 -0.067100 0.240000 0.480000 0.840000 -0.546800 -0.351500 -0.121900 -0.560000 -0.304000 0.760000 -0.546800 -0.351500 -0.121900 -0.560000 -0.304000 0.760000 -0.550000 -0.317100 -0.121900 -0.368000 0.064000 0.920000 -0.550000 -0.351500 -0.118900 -0.368000 0.056000 0.920000 -0.558500 -0.351500 -0.121900 0.208000 -0.648000 0.728000 -0.550000 -0.353000 -0.121900 -0.032000 -0.832000 0.536000 -0.550000 -0.351500 -0.118900 -0.368000 0.056000 0.920000 -0.546800 -0.351500 -0.121900 -0.560000 -0.304000 0.760000 -0.550000 -0.353000 -0.121900 -0.032000 -0.832000 0.536000 -0.500000 -0.351500 -0.156800 -0.392000 -0.248000 0.880000 -0.550000 -0.389500 -0.182900 -0.304000 -0.784000 0.528000 -0.500000 -0.372900 -0.182900 -0.184000 -0.776000 0.592000 -0.550000 -0.401700 -0.218900 -0.128000 -0.904000 0.392000 -0.500000 -0.400600 -0.243900 0.024000 -0.920000 0.384000 -0.503900 -0.401700 -0.243900 -0.232000 -0.936000 0.256000 -0.500000 -0.400200 -0.304800 -0.176000 -0.672000 -0.712000 -0.502600 -0.401700 -0.304800 -0.320000 -0.840000 -0.416000 -0.500000 -0.351500 -0.354900 -0.384000 -0.472000 -0.784000 -0.550000 -0.401700 -0.333700 -0.144000 -0.688000 -0.704000 -0.550000 -0.351500 -0.364500 0.120000 -0.104000 -0.984000 -0.500000 -0.351500 -0.354900 -0.384000 -0.472000 -0.784000 -0.550000 -0.316300 -0.304800 -0.472000 0.688000 -0.536000 -0.500000 -0.333600 -0.304800 -0.408000 0.824000 -0.376000 -0.550000 -0.301200 -0.279200 -0.712000 0.120000 -0.680000 -0.500000 -0.310500 -0.243900 -0.600000 0.776000 -0.152000 -0.513800 -0.301200 -0.243900 -0.728000 0.592000 -0.328000 -0.500000 -0.316400 -0.182900 -0.704000 0.472000 0.520000 -0.511800 -0.301200 -0.182900 -0.912000 0.352000 0.176000 -0.500000 -0.351500 -0.156800 -0.392000 -0.248000 0.880000 -0.550000 -0.301200 -0.123600 -0.624000 -0.440000 0.632000 -0.546800 -0.351500 -0.121900 -0.560000 -0.304000 0.760000 -0.550000 -0.317100 -0.121900 -0.368000 0.064000 0.920000 -0.550000 -0.317100 -0.121900 -0.368000 0.064000 0.920000 -0.550000 -0.242100 -0.060900 -0.400000 -0.536000 0.736000 -0.550000 -0.242100 -0.060900 -0.400000 -0.536000 0.736000 -0.562800 -0.251000 -0.060900 -0.368000 -0.568000 0.720000 -0.550000 -0.251000 -0.069700 -0.416000 -0.584000 0.688000 -0.550000 -0.251000 -0.069700 -0.416000 -0.584000 0.688000 -0.552600 -0.301200 -0.121900 -0.368000 -0.384000 0.840000 -0.552600 -0.301200 -0.121900 -0.368000 -0.384000 0.840000 -0.600000 -0.301200 -0.098800 -0.176000 -0.576000 0.792000 -0.600000 -0.333000 -0.121900 0.024000 -0.312000 0.944000 -0.650000 -0.301200 -0.100200 0.264000 -0.568000 0.768000 -0.650000 -0.327200 -0.121900 -0.280000 -0.536000 0.792000 -0.700000 -0.301200 -0.068800 0.336000 0.392000 0.848000 -0.679500 -0.351500 -0.121900 -0.424000 -0.464000 0.768000 -0.700000 -0.351500 -0.108700 -0.352000 -0.464000 0.808000 -0.700000 -0.372000 -0.121900 -0.360000 -0.440000 0.816000 -0.750000 -0.351500 -0.097900 0.640000 0.048000 0.760000 -0.737900 -0.401700 -0.121900 -0.352000 -0.448000 0.816000 -0.750000 -0.401700 -0.115900 -0.264000 -0.344000 0.896000 -0.750000 -0.411100 -0.121900 -0.304000 -0.456000 0.824000 -0.800000 -0.401700 -0.115500 0.392000 0.184000 0.896000 -0.800000 -0.418600 -0.121900 0.304000 -0.320000 0.888000 -0.750000 -0.411100 -0.121900 -0.304000 -0.456000 0.824000 -0.800000 -0.451900 -0.135400 0.168000 -0.384000 0.904000 -0.750000 -0.451900 -0.153800 -0.384000 -0.528000 0.752000 -0.800000 -0.502100 -0.171200 -0.360000 -0.648000 0.664000 -0.750000 -0.479900 -0.182900 -0.456000 -0.632000 0.616000 -0.783200 -0.502100 -0.182900 -0.448000 -0.720000 0.512000 -0.750000 -0.502100 -0.236900 -0.448000 -0.776000 0.432000 -0.800000 -0.511100 -0.182900 -0.376000 -0.744000 0.544000 -0.750000 -0.505200 -0.243900 -0.480000 -0.856000 0.152000 -0.800000 -0.519900 -0.243900 -0.400000 -0.904000 -0.112000 -0.750000 -0.502100 -0.254300 -0.448000 -0.832000 -0.312000 -0.800000 -0.502100 -0.293400 -0.120000 -0.840000 -0.520000 -0.750000 -0.487000 -0.304800 -0.104000 -0.744000 -0.656000 -0.800000 -0.493800 -0.304800 0.032000 -0.688000 -0.720000 -0.750000 -0.451900 -0.330900 0.152000 -0.080000 -0.984000 -0.800000 -0.451900 -0.330300 0.328000 0.200000 -0.920000 -0.750000 -0.401700 -0.321600 0.336000 0.000000 -0.936000 -0.800000 -0.418300 -0.304800 0.408000 0.496000 -0.760000 -0.779200 -0.401700 -0.304800 0.400000 0.336000 -0.848000 -0.800000 -0.401700 -0.291400 0.440000 0.456000 -0.760000 -0.754800 -0.351500 -0.304800 0.424000 0.136000 -0.888000 -0.800000 -0.351500 -0.277300 0.568000 0.408000 -0.704000 -0.750000 -0.334300 -0.304800 0.512000 0.112000 -0.840000 -0.800000 -0.328800 -0.243900 0.640000 0.656000 -0.384000 -0.750000 -0.301200 -0.299800 0.512000 0.144000 -0.840000 -0.780500 -0.301200 -0.243900 0.848000 0.504000 -0.128000 -0.750000 -0.251000 -0.256700 0.824000 0.520000 -0.208000 -0.752500 -0.251000 -0.243900 0.840000 0.528000 -0.096000 -0.750000 -0.247000 -0.243900 0.832000 0.536000 -0.096000 -0.750000 -0.251000 -0.218200 0.840000 0.520000 0.096000 -0.717800 -0.200800 -0.243900 0.824000 0.560000 -0.064000 -0.746300 -0.251000 -0.182900 0.848000 0.496000 0.152000 -0.713600 -0.200800 -0.182900 0.824000 0.512000 0.224000 -0.719200 -0.251000 -0.121900 0.760000 0.456000 0.440000 -0.700000 -0.200800 -0.144600 0.696000 0.528000 0.480000 -0.700000 -0.217500 -0.121900 0.616000 0.552000 0.544000 -0.677400 -0.200800 -0.121900 0.528000 0.512000 0.672000 -0.700000 -0.200800 -0.144600 0.696000 0.528000 0.480000 -0.652900 -0.150600 -0.121900 0.752000 0.456000 0.464000 -0.700000 -0.178500 -0.182900 0.792000 0.568000 0.200000 -0.675300 -0.150600 -0.182900 0.768000 0.552000 0.296000 -0.700000 -0.175300 -0.243900 0.752000 0.600000 -0.240000 -0.674200 -0.150600 -0.243900 0.696000 0.600000 -0.384000 -0.674200 -0.150600 -0.243900 0.696000 0.600000 -0.384000 -0.600000 -0.272000 -0.060900 -0.264000 -0.632000 0.720000 -0.600000 -0.272000 -0.060900 -0.264000 -0.632000 0.720000 -0.600000 -0.301200 -0.098800 -0.176000 -0.576000 0.792000 -0.650000 -0.258100 -0.060900 0.392000 -0.456000 0.792000 -0.650000 -0.301200 -0.100200 0.264000 -0.568000 0.768000 -0.657600 -0.251000 -0.060900 0.456000 -0.072000 0.880000 -0.700000 -0.301200 -0.068800 0.336000 0.392000 0.848000 -0.700000 -0.251000 -0.086700 0.608000 0.464000 0.632000 -0.700000 -0.251000 -0.086700 0.608000 0.464000 0.632000 -0.650000 0.350500 -0.060900 0.712000 0.536000 -0.440000 -0.650000 0.350500 -0.060900 0.712000 0.536000 -0.440000 -0.650000 0.301200 -0.100800 0.528000 0.504000 -0.672000 -0.680100 0.301200 -0.060900 0.752000 0.544000 -0.368000 -0.680100 0.301200 -0.060900 0.752000 0.544000 -0.368000 -0.700000 0.251000 -0.093200 0.552000 0.600000 -0.568000 -0.700000 0.251000 -0.093200 0.552000 0.600000 -0.568000 -0.673000 0.251000 -0.121900 0.568000 0.576000 -0.584000 -0.700000 0.229200 -0.121900 0.528000 0.656000 -0.528000 -0.650000 0.251000 -0.154700 0.488000 0.640000 -0.584000 -0.700000 0.200800 -0.171600 0.480000 0.608000 -0.616000 -0.650000 0.227800 -0.182900 0.368000 0.576000 -0.720000 -0.687200 0.200800 -0.182900 0.432000 0.544000 -0.712000 -0.700000 0.200800 -0.171600 0.480000 0.608000 -0.616000 -0.700000 0.190400 -0.182900 0.432000 0.560000 -0.696000 -0.700000 0.190400 -0.182900 0.432000 0.560000 -0.696000 -0.650000 -0.200800 -0.092600 0.656000 0.384000 0.640000 -0.650000 -0.200800 -0.092600 0.656000 0.384000 0.640000 -0.650000 -0.150600 -0.116200 0.720000 0.480000 0.488000 -0.677400 -0.200800 -0.121900 0.528000 0.512000 0.672000 -0.652900 -0.150600 -0.121900 0.752000 0.456000 0.464000 -0.652900 -0.150600 -0.121900 0.752000 0.456000 0.464000 -0.734900 0.200800 -0.121900 0.552000 0.608000 -0.552000 -0.734900 0.200800 -0.121900 0.552000 0.608000 -0.552000 -0.750000 0.186400 -0.121900 0.504000 0.648000 -0.560000 -0.750000 0.200800 -0.104400 0.480000 0.680000 -0.544000 -0.750000 0.200800 -0.104400 0.480000 0.680000 -0.544000 -0.750000 -0.351500 -0.097900 0.640000 0.048000 0.760000 -0.750000 -0.351500 -0.097900 0.640000 0.048000 0.760000 -0.700000 -0.351500 -0.108700 -0.352000 -0.464000 0.808000 -0.750000 -0.301200 -0.116500 0.704000 0.400000 0.568000 -0.700000 -0.301200 -0.068800 0.336000 0.392000 0.848000 -0.700000 -0.301200 -0.068800 0.336000 0.392000 0.848000 --0.950000 -0.150600 -0.169000 -0.584000 -0.792000 0.136000 --0.950000 -0.150600 -0.169000 -0.584000 -0.792000 0.136000 --0.950000 -0.152700 -0.182900 -0.600000 -0.784000 0.144000 --0.952800 -0.150600 -0.182900 -0.568000 -0.808000 0.136000 --0.950000 -0.161800 -0.243900 -0.584000 -0.784000 0.176000 --0.966700 -0.150600 -0.243900 -0.472000 -0.864000 0.152000 --0.950000 -0.180000 -0.304800 -0.552000 -0.600000 -0.568000 --0.989000 -0.150600 -0.304800 -0.440000 -0.624000 -0.640000 --0.950000 -0.150600 -0.330800 -0.416000 -0.432000 -0.792000 --0.950000 -0.150600 -0.330800 -0.416000 -0.432000 -0.792000 --0.900000 -0.492700 -0.121900 -0.520000 0.712000 0.448000 --0.900000 -0.492700 -0.121900 -0.520000 0.712000 0.448000 --0.900000 -0.462200 -0.182900 0.320000 0.888000 0.304000 --0.878700 -0.502100 -0.121900 0.408000 0.368000 0.832000 --0.850000 -0.490700 -0.182900 0.328000 0.896000 0.288000 --0.850000 -0.502100 -0.144600 0.400000 0.776000 0.480000 --0.820300 -0.502100 -0.182900 0.496000 0.792000 0.344000 --0.850000 -0.519700 -0.121900 0.200000 0.624000 0.752000 --0.800000 -0.513200 -0.182900 -0.080000 0.880000 0.456000 --0.800000 -0.539500 -0.121900 0.176000 0.680000 0.704000 --0.750000 -0.503000 -0.182900 -0.200000 0.848000 0.472000 --0.750000 -0.549900 -0.121900 0.080000 0.648000 0.752000 --0.749300 -0.502100 -0.182900 -0.920000 -0.232000 0.288000 --0.723300 -0.502100 -0.121900 -0.896000 -0.224000 0.368000 --0.723300 -0.502100 -0.121900 -0.896000 -0.224000 0.368000 --0.900000 -0.511500 -0.121900 -0.520000 -0.664000 0.528000 --0.900000 -0.511500 -0.121900 -0.520000 -0.664000 0.528000 --0.900000 -0.542100 -0.182900 -0.808000 -0.560000 0.136000 --0.868200 -0.552300 -0.121900 -0.520000 -0.224000 0.816000 --0.892400 -0.552300 -0.182900 -0.760000 -0.624000 0.176000 --0.850000 -0.569100 -0.121900 -0.488000 -0.776000 0.384000 --0.850000 -0.592600 -0.182900 -0.520000 -0.800000 0.264000 --0.800000 -0.584500 -0.121900 -0.288000 -0.544000 0.776000 --0.832500 -0.602500 -0.182900 -0.576000 -0.768000 0.272000 --0.800000 -0.602500 -0.136500 -0.416000 -0.648000 0.632000 --0.800000 -0.620600 -0.182900 -0.312000 -0.880000 0.336000 --0.764000 -0.602500 -0.121900 -0.176000 -0.816000 0.544000 --0.750000 -0.630100 -0.182900 -0.144000 -0.912000 0.360000 --0.750000 -0.605000 -0.121900 -0.152000 -0.872000 0.456000 --0.750000 -0.605000 -0.121900 -0.152000 -0.872000 0.456000 --0.802000 -0.351500 -0.121900 -0.840000 -0.520000 0.096000 --0.802000 -0.351500 -0.121900 -0.840000 -0.520000 0.096000 --0.832400 -0.301200 -0.121900 -0.840000 -0.528000 0.048000 --0.802200 -0.351500 -0.182900 -0.872000 -0.480000 0.016000 --0.831100 -0.301200 -0.182900 -0.848000 -0.520000 0.016000 --0.807300 -0.351500 -0.243900 -0.864000 -0.472000 0.152000 --0.834700 -0.301200 -0.243900 -0.840000 -0.504000 0.184000 --0.834700 -0.301200 -0.243900 -0.840000 -0.504000 0.184000 --0.779100 0.150600 -0.182900 0.400000 0.664000 -0.616000 --0.779100 0.150600 -0.182900 0.400000 0.664000 -0.616000 --0.750000 0.132600 -0.182900 0.408000 0.656000 -0.624000 --0.750000 0.150600 -0.159200 0.432000 0.664000 -0.600000 --0.750000 0.150600 -0.159200 0.432000 0.664000 -0.600000 --0.750000 -0.448400 -0.121900 -0.880000 -0.432000 0.160000 --0.750000 -0.448400 -0.121900 -0.880000 -0.432000 0.160000 --0.750000 -0.451900 -0.133400 -0.896000 -0.392000 0.184000 --0.771000 -0.401700 -0.121900 -0.872000 -0.456000 0.128000 --0.757600 -0.451900 -0.182900 -0.952000 -0.232000 0.184000 --0.775200 -0.401700 -0.182900 -0.904000 -0.400000 0.120000 --0.769800 -0.451900 -0.243900 -0.952000 -0.080000 0.272000 --0.781800 -0.401700 -0.243900 -0.912000 -0.336000 0.208000 --0.787800 -0.451900 -0.304800 -0.984000 0.136000 -0.040000 --0.797400 -0.401700 -0.304800 -0.928000 -0.344000 0.056000 --0.797400 -0.401700 -0.304800 -0.928000 -0.344000 0.056000 --0.800000 -0.584500 -0.121900 -0.288000 -0.544000 0.776000 --0.800000 -0.584500 -0.121900 -0.288000 -0.544000 0.776000 --0.764000 -0.602500 -0.121900 -0.176000 -0.816000 0.544000 --0.800000 -0.602500 -0.136500 -0.416000 -0.648000 0.632000 --0.800000 -0.602500 -0.136500 -0.416000 -0.648000 0.632000 --0.750000 0.174400 -0.121900 0.448000 0.824000 -0.336000 --0.750000 0.174400 -0.121900 0.448000 0.824000 -0.336000 --0.750000 0.150600 -0.159200 0.432000 0.664000 -0.600000 --0.715000 0.150600 -0.121900 0.512000 0.744000 -0.408000 --0.715000 0.150600 -0.121900 0.512000 0.744000 -0.408000 --0.700900 0.100400 -0.182900 0.440000 0.608000 -0.648000 --0.700900 0.100400 -0.182900 0.440000 0.608000 -0.648000 --0.700000 0.099700 -0.182900 0.504000 0.560000 -0.640000 --0.700000 0.100400 -0.182100 0.536000 0.592000 -0.592000 --0.700000 0.100400 -0.182100 0.536000 0.592000 -0.592000 --0.750000 -0.448400 -0.121900 -0.880000 -0.432000 0.160000 --0.750000 -0.448400 -0.121900 -0.880000 -0.432000 0.160000 --0.748200 -0.451900 -0.121900 -0.880000 -0.440000 0.160000 --0.750000 -0.451900 -0.133400 -0.896000 -0.392000 0.184000 --0.750000 -0.451900 -0.133400 -0.896000 -0.392000 0.184000 --0.700000 0.140000 -0.121900 0.536000 0.728000 -0.408000 --0.700000 0.140000 -0.121900 0.536000 0.728000 -0.408000 --0.700000 0.100400 -0.182100 0.536000 0.592000 -0.592000 --0.657700 0.100400 -0.121900 0.728000 0.576000 -0.360000 --0.657700 0.100400 -0.121900 0.728000 0.576000 -0.360000 --0.652800 0.050200 -0.182900 0.592000 0.536000 -0.592000 --0.652800 0.050200 -0.182900 0.592000 0.536000 -0.592000 --0.650000 0.045800 -0.182900 0.672000 0.432000 -0.592000 --0.650000 0.050200 -0.178200 0.664000 0.544000 -0.504000 --0.621400 0.000000 -0.182900 0.848000 0.280000 -0.440000 --0.614300 0.050200 -0.121900 0.720000 0.480000 -0.480000 --0.601900 0.000000 -0.121900 0.848000 0.208000 -0.472000 --0.601900 0.000000 -0.121900 0.848000 0.208000 -0.472000 --0.650000 0.089500 -0.121900 0.728000 0.552000 -0.384000 --0.650000 0.089500 -0.121900 0.728000 0.552000 -0.384000 --0.650000 0.050200 -0.178200 0.664000 0.544000 -0.504000 --0.614300 0.050200 -0.121900 0.720000 0.480000 -0.480000 --0.614300 0.050200 -0.121900 0.720000 0.480000 -0.480000 --0.491700 -0.150600 -0.182900 -0.448000 0.848000 -0.264000 --0.491700 -0.150600 -0.182900 -0.448000 0.848000 -0.264000 --0.500000 -0.150600 -0.154000 -0.424000 0.880000 -0.160000 --0.500000 -0.154300 -0.182900 -0.320000 0.920000 -0.176000 --0.500000 -0.154300 -0.182900 -0.320000 0.920000 -0.176000 --0.372200 0.000000 -0.121900 -0.848000 0.480000 -0.200000 --0.372200 0.000000 -0.121900 -0.848000 0.480000 -0.200000 --0.350000 0.000000 -0.171400 -0.688000 0.416000 -0.584000 --0.350000 0.031200 -0.121900 -0.744000 0.552000 -0.352000 --0.350000 0.031200 -0.121900 -0.744000 0.552000 -0.352000 --0.350000 -0.652700 -0.168800 -0.864000 0.056000 0.488000 --0.350000 -0.652700 -0.168800 -0.864000 0.056000 0.488000 --0.300000 -0.652700 -0.176500 0.496000 0.568000 0.648000 --0.350000 -0.647900 -0.182900 0.008000 0.768000 0.624000 --0.300000 -0.647500 -0.182900 0.464000 0.632000 0.616000 --0.350000 -0.630200 -0.243900 -0.144000 0.776000 0.600000 --0.300000 -0.607200 -0.243900 -0.248000 0.672000 0.688000 --0.300000 -0.647500 -0.182900 0.464000 0.632000 0.616000 --0.286800 -0.602500 -0.243900 -0.320000 0.232000 0.912000 --0.293900 -0.652700 -0.182900 0.576000 0.496000 0.640000 --0.250000 -0.602500 -0.226600 0.288000 -0.512000 0.800000 --0.250000 -0.652700 -0.232900 0.624000 0.072000 0.768000 --0.233200 -0.602500 -0.243900 0.608000 -0.320000 0.720000 --0.241600 -0.652700 -0.243900 0.680000 -0.216000 0.688000 --0.250000 -0.652700 -0.232900 0.624000 0.072000 0.768000 --0.250000 -0.679700 -0.243900 0.728000 -0.208000 0.640000 --0.293900 -0.652700 -0.182900 0.576000 0.496000 0.640000 --0.256000 -0.703000 -0.243900 0.696000 -0.392000 0.584000 --0.293800 -0.703000 -0.182900 0.608000 -0.624000 0.488000 --0.293900 -0.652700 -0.182900 0.576000 0.496000 0.640000 --0.300000 -0.703000 -0.173800 0.616000 -0.544000 0.552000 --0.300000 -0.652700 -0.176500 0.496000 0.568000 0.648000 --0.350000 -0.703000 -0.180700 -0.616000 -0.504000 0.592000 --0.350000 -0.652700 -0.168800 -0.864000 0.056000 0.488000 --0.350000 -0.652700 -0.168800 -0.864000 0.056000 0.488000 --0.260200 -0.552300 -0.121900 -0.560000 -0.752000 0.336000 --0.260200 -0.552300 -0.121900 -0.560000 -0.752000 0.336000 --0.300000 -0.516400 -0.121900 -0.256000 -0.872000 0.400000 --0.285200 -0.552300 -0.182900 -0.616000 -0.680000 0.384000 --0.300000 -0.538300 -0.182900 -0.584000 -0.696000 0.408000 --0.300000 -0.552300 -0.209900 -0.624000 -0.616000 0.456000 --0.300000 -0.552300 -0.209900 -0.624000 -0.616000 0.456000 --0.300000 -0.647500 -0.182900 0.464000 0.632000 0.616000 --0.300000 -0.647500 -0.182900 0.464000 0.632000 0.616000 --0.293900 -0.652700 -0.182900 0.576000 0.496000 0.640000 --0.300000 -0.652700 -0.176500 0.496000 0.568000 0.648000 --0.300000 -0.652700 -0.176500 0.496000 0.568000 0.648000 --0.200000 0.251000 -0.156200 -0.432000 0.168000 -0.880000 --0.200000 0.251000 -0.156200 -0.432000 0.168000 -0.880000 --0.250000 0.251000 -0.124000 -0.376000 0.088000 -0.920000 --0.200000 0.200800 -0.161600 -0.480000 0.384000 -0.776000 --0.250000 0.200800 -0.129700 -0.392000 0.152000 -0.904000 --0.250000 0.200800 -0.129700 -0.392000 0.152000 -0.904000 --0.200000 -0.534300 -0.121900 0.456000 -0.832000 0.296000 --0.200000 -0.534300 -0.121900 0.456000 -0.832000 0.296000 --0.235800 -0.552300 -0.121900 0.448000 -0.816000 0.336000 --0.200000 -0.549300 -0.182900 0.504000 -0.784000 0.344000 --0.204600 -0.552300 -0.182900 0.504000 -0.776000 0.360000 --0.200000 -0.552300 -0.190900 0.520000 -0.768000 0.360000 --0.200000 -0.552300 -0.190900 0.520000 -0.768000 0.360000 --0.200000 0.401700 -0.127400 -0.400000 0.440000 -0.800000 --0.200000 0.401700 -0.127400 -0.400000 0.440000 -0.800000 --0.150000 0.401700 -0.148200 -0.240000 0.400000 -0.872000 --0.200000 0.351500 -0.146000 -0.416000 0.224000 -0.872000 --0.150000 0.351500 -0.156300 -0.024000 0.152000 -0.984000 --0.200000 0.301200 -0.154100 -0.392000 0.112000 -0.904000 --0.150000 0.301200 -0.169700 -0.080000 0.248000 -0.960000 --0.150000 0.351500 -0.156300 -0.024000 0.152000 -0.984000 --0.100000 0.301200 -0.172200 -0.168000 0.416000 -0.888000 --0.100000 0.351500 -0.158200 0.008000 0.264000 -0.960000 --0.150000 0.351500 -0.156300 -0.024000 0.152000 -0.984000 --0.100000 0.401700 -0.143600 0.056000 0.120000 -0.984000 --0.150000 0.401700 -0.148200 -0.240000 0.400000 -0.872000 --0.100000 0.451900 -0.142300 -0.128000 0.312000 -0.936000 --0.150000 0.451900 -0.123200 -0.344000 0.512000 -0.784000 --0.150000 0.451900 -0.123200 -0.344000 0.512000 -0.784000 --0.100000 0.044900 -0.121900 0.816000 0.112000 0.552000 --0.100000 0.044900 -0.121900 0.816000 0.112000 0.552000 --0.100700 0.050200 -0.121900 0.856000 0.048000 0.504000 --0.100000 0.050200 -0.123300 0.696000 -0.176000 0.688000 --0.100000 0.050200 -0.123300 0.696000 -0.176000 0.688000 --0.100000 0.451900 -0.142300 -0.128000 0.312000 -0.936000 --0.100000 0.451900 -0.142300 -0.128000 0.312000 -0.936000 --0.050000 0.451900 -0.137500 0.040000 0.112000 -0.992000 --0.100000 0.401700 -0.143600 0.056000 0.120000 -0.984000 --0.050000 0.401700 -0.142300 0.000000 0.168000 -0.984000 --0.100000 0.351500 -0.158200 0.008000 0.264000 -0.960000 --0.050000 0.351500 -0.155800 -0.048000 0.328000 -0.936000 --0.050000 0.401700 -0.142300 0.000000 0.168000 -0.984000 -0.000000 0.351500 -0.164900 -0.080000 0.368000 -0.920000 -0.000000 0.401700 -0.144600 -0.056000 0.192000 -0.976000 -0.050000 0.351500 -0.166400 0.000000 0.392000 -0.912000 -0.050000 0.401700 -0.150400 -0.088000 0.216000 -0.968000 -0.100000 0.351500 -0.169000 0.056000 0.272000 -0.952000 -0.100000 0.401700 -0.152800 -0.048000 0.168000 -0.984000 -0.150000 0.351500 -0.160600 0.144000 0.128000 -0.976000 -0.150000 0.401700 -0.154900 -0.096000 0.088000 -0.984000 -0.200000 0.351500 -0.169700 -0.320000 0.304000 -0.888000 -0.200000 0.401700 -0.169400 -0.056000 0.168000 -0.976000 -0.150000 0.401700 -0.154900 -0.096000 0.088000 -0.984000 -0.200000 0.451900 -0.151000 0.136000 0.400000 -0.896000 -0.150000 0.451900 -0.151900 0.184000 0.376000 -0.904000 -0.200000 0.484800 -0.121900 0.312000 0.872000 0.360000 -0.150000 0.502100 -0.123200 0.032000 0.424000 -0.896000 -0.153400 0.502100 -0.121900 0.448000 0.824000 -0.336000 -0.153400 0.502100 -0.121900 0.448000 0.824000 -0.336000 --0.089600 0.000000 -0.121900 0.568000 0.512000 0.632000 --0.089600 0.000000 -0.121900 0.568000 0.512000 0.632000 --0.050000 0.000000 -0.158900 0.584000 0.336000 0.728000 --0.050000 -0.024600 -0.121900 0.296000 0.656000 0.688000 -0.000000 0.000000 -0.165000 0.096000 0.640000 0.752000 -0.000000 -0.035500 -0.121900 0.072000 0.496000 0.856000 -0.050000 0.000000 -0.179700 0.216000 0.504000 0.832000 -0.050000 -0.038600 -0.121900 0.000000 0.528000 0.840000 -0.100000 0.000000 -0.179900 0.000000 0.528000 0.840000 -0.100000 -0.037100 -0.121900 -0.016000 0.544000 0.832000 -0.100000 -0.037100 -0.121900 -0.016000 0.544000 0.832000 --0.054100 -0.401700 -0.121900 0.656000 -0.688000 0.280000 --0.054100 -0.401700 -0.121900 0.656000 -0.688000 0.280000 --0.098000 -0.451900 -0.121900 0.712000 -0.680000 0.120000 --0.061900 -0.401700 -0.182900 0.744000 -0.648000 -0.120000 --0.098100 -0.451900 -0.182900 0.736000 -0.672000 0.032000 --0.071000 -0.401700 -0.243900 0.856000 -0.496000 -0.072000 --0.094700 -0.451900 -0.243900 0.784000 -0.568000 0.216000 --0.073900 -0.401700 -0.304800 0.784000 -0.304000 -0.528000 --0.061500 -0.451900 -0.304800 0.928000 -0.352000 0.088000 --0.100000 -0.401700 -0.330800 0.576000 -0.152000 -0.792000 --0.100000 -0.451900 -0.336100 0.496000 -0.048000 -0.856000 --0.150000 -0.401700 -0.364300 0.552000 0.080000 -0.824000 --0.145700 -0.451900 -0.365800 0.464000 0.040000 -0.880000 --0.150000 -0.417500 -0.365800 0.544000 0.056000 -0.832000 --0.150000 -0.451900 -0.368100 0.456000 -0.056000 -0.880000 --0.145700 -0.451900 -0.365800 0.464000 0.040000 -0.880000 --0.150000 -0.502100 -0.367300 0.088000 -0.320000 -0.936000 --0.147100 -0.502100 -0.365800 0.472000 -0.192000 -0.848000 --0.150000 -0.505900 -0.365800 0.272000 -0.320000 -0.904000 --0.150000 -0.505900 -0.365800 0.272000 -0.320000 -0.904000 --0.050000 0.401700 -0.142300 0.000000 0.168000 -0.984000 --0.050000 0.401700 -0.142300 0.000000 0.168000 -0.984000 --0.050000 0.451900 -0.137500 0.040000 0.112000 -0.992000 -0.000000 0.401700 -0.144600 -0.056000 0.192000 -0.976000 -0.000000 0.451900 -0.135500 0.000000 0.160000 -0.984000 -0.050000 0.401700 -0.150400 -0.088000 0.216000 -0.968000 -0.050000 0.451900 -0.139600 -0.080000 0.232000 -0.960000 -0.100000 0.401700 -0.152800 -0.048000 0.168000 -0.984000 -0.100000 0.451900 -0.146900 -0.088000 0.224000 -0.968000 -0.150000 0.401700 -0.154900 -0.096000 0.088000 -0.984000 -0.150000 0.451900 -0.151900 0.184000 0.376000 -0.904000 -0.150000 0.451900 -0.151900 0.184000 0.376000 -0.904000 --0.012800 0.200800 -0.121900 0.688000 -0.616000 0.376000 --0.012800 0.200800 -0.121900 0.688000 -0.616000 0.376000 -0.000000 0.211400 -0.121900 0.496000 -0.712000 0.480000 -0.000000 0.200800 -0.169000 0.576000 -0.744000 0.320000 -0.000000 0.200800 -0.169000 0.576000 -0.744000 0.320000 --0.050000 0.150600 -0.159500 0.712000 -0.480000 0.504000 --0.050000 0.150600 -0.159500 0.712000 -0.480000 0.504000 --0.033200 0.150600 -0.182900 0.832000 -0.552000 -0.016000 --0.050000 0.116900 -0.182900 0.944000 -0.304000 0.048000 --0.050000 0.150600 -0.210200 0.840000 -0.208000 -0.496000 --0.050000 0.150600 -0.210200 0.840000 -0.208000 -0.496000 --0.050000 0.047900 -0.182900 0.488000 0.480000 0.720000 --0.050000 0.047900 -0.182900 0.488000 0.480000 0.720000 --0.050000 0.000000 -0.158900 0.584000 0.336000 0.728000 -0.000000 0.039200 -0.182900 0.256000 0.544000 0.792000 -0.000000 0.000000 -0.165000 0.096000 0.640000 0.752000 -0.050000 0.005700 -0.182900 0.312000 0.584000 0.744000 -0.050000 0.000000 -0.179700 0.216000 0.504000 0.832000 -0.100000 0.004900 -0.182900 -0.288000 0.864000 0.400000 -0.100000 0.000000 -0.179900 0.000000 0.528000 0.840000 -0.100000 0.000000 -0.179900 0.000000 0.528000 0.840000 -0.000000 0.200800 -0.169000 0.576000 -0.744000 0.320000 -0.000000 0.200800 -0.169000 0.576000 -0.744000 0.320000 -0.008500 0.200800 -0.182900 0.416000 -0.688000 -0.584000 -0.000000 0.195100 -0.182900 0.504000 -0.656000 -0.544000 -0.000000 0.200800 -0.186400 0.272000 -0.456000 -0.840000 -0.000000 0.200800 -0.186400 0.272000 -0.456000 -0.840000 -0.050000 -0.327900 -0.182900 0.552000 -0.824000 0.048000 -0.050000 -0.327900 -0.182900 0.552000 -0.824000 0.048000 -0.003100 -0.351500 -0.182900 0.504000 -0.840000 -0.160000 -0.050000 -0.321600 -0.121900 0.584000 -0.712000 0.376000 -0.006400 -0.351500 -0.121900 0.552000 -0.776000 0.288000 -0.006400 -0.351500 -0.121900 0.552000 -0.776000 0.288000 -0.150000 0.251000 -0.128300 0.144000 -0.904000 0.392000 -0.150000 0.251000 -0.128300 0.144000 -0.904000 0.392000 -0.150000 0.284700 -0.182900 0.352000 0.368000 -0.856000 -0.194700 0.251000 -0.182900 0.496000 -0.104000 -0.856000 -0.150000 0.251000 -0.192500 0.112000 0.024000 -0.992000 -0.150000 0.224100 -0.182900 0.056000 -0.672000 -0.728000 -0.194700 0.251000 -0.182900 0.496000 -0.104000 -0.856000 -0.150000 0.251000 -0.128300 0.144000 -0.904000 0.392000 -0.150000 0.251000 -0.128300 0.144000 -0.904000 0.392000 -0.211500 -0.301200 -0.182900 -0.568000 -0.672000 0.464000 -0.211500 -0.301200 -0.182900 -0.568000 -0.672000 0.464000 -0.250000 -0.301200 -0.149400 -0.376000 -0.584000 0.712000 -0.250000 -0.319600 -0.182900 -0.280000 -0.832000 0.472000 -0.300000 -0.301200 -0.149800 -0.024000 -0.480000 0.872000 -0.300000 -0.330300 -0.182900 -0.312000 -0.696000 0.632000 -0.350000 -0.301200 -0.148100 0.392000 -0.048000 0.912000 -0.331500 -0.351500 -0.182900 -0.432000 -0.576000 0.688000 -0.350000 -0.351500 -0.171100 -0.312000 -0.512000 0.792000 -0.350000 -0.366900 -0.182900 -0.368000 -0.552000 0.736000 -0.400000 -0.351500 -0.165500 0.064000 -0.056000 0.992000 -0.400000 -0.370500 -0.182900 -0.008000 -0.616000 0.776000 -0.450000 -0.351500 -0.174300 0.040000 0.080000 0.992000 -0.450000 -0.370700 -0.182900 -0.080000 -0.520000 0.848000 -0.500000 -0.351500 -0.156800 -0.392000 -0.248000 0.880000 -0.500000 -0.372900 -0.182900 -0.184000 -0.776000 0.592000 -0.450000 -0.370700 -0.182900 -0.080000 -0.520000 0.848000 -0.500000 -0.400600 -0.243900 0.024000 -0.920000 0.384000 -0.450000 -0.401700 -0.212100 0.240000 -0.816000 0.520000 -0.496800 -0.401700 -0.243900 0.256000 -0.880000 0.376000 -0.450000 -0.418500 -0.243900 -0.152000 -0.896000 0.400000 -0.492100 -0.401700 -0.304800 0.152000 -0.576000 -0.792000 -0.450000 -0.411100 -0.304800 -0.144000 -0.808000 -0.560000 -0.450000 -0.401700 -0.316200 -0.184000 -0.360000 -0.904000 -0.428900 -0.401700 -0.304800 -0.392000 -0.464000 -0.784000 -0.450000 -0.380500 -0.304800 -0.144000 0.256000 -0.952000 -0.400000 -0.401700 -0.257800 0.112000 -0.952000 -0.280000 -0.450000 -0.351500 -0.290700 -0.176000 0.632000 -0.744000 -0.400000 -0.388800 -0.304800 0.392000 -0.800000 -0.448000 -0.437100 -0.351500 -0.304800 0.688000 0.472000 -0.536000 -0.400000 -0.351500 -0.338800 0.360000 -0.568000 -0.728000 -0.401200 -0.301200 -0.304800 0.744000 0.488000 -0.440000 -0.400000 -0.301200 -0.307300 0.704000 0.496000 -0.496000 -0.400000 -0.299100 -0.304800 0.736000 0.472000 -0.472000 -0.401200 -0.301200 -0.304800 0.744000 0.488000 -0.440000 -0.400000 -0.252300 -0.243900 0.744000 0.488000 -0.440000 -0.429200 -0.301200 -0.243900 0.816000 0.544000 -0.176000 -0.400000 -0.252800 -0.182900 0.760000 0.464000 0.440000 -0.427100 -0.301200 -0.182900 0.776000 0.464000 0.416000 -0.400000 -0.301200 -0.149800 0.528000 0.376000 0.752000 -0.450000 -0.338000 -0.182900 0.248000 0.592000 0.752000 -0.400000 -0.351500 -0.165500 0.064000 -0.056000 0.992000 -0.450000 -0.351500 -0.174300 0.040000 0.080000 0.992000 -0.450000 -0.338000 -0.182900 0.248000 0.592000 0.752000 -0.500000 -0.351500 -0.156800 -0.392000 -0.248000 0.880000 -0.500000 -0.316400 -0.182900 -0.704000 0.472000 0.520000 -0.450000 -0.338000 -0.182900 0.248000 0.592000 0.752000 -0.500000 -0.310500 -0.243900 -0.600000 0.776000 -0.152000 -0.450000 -0.327300 -0.243900 -0.064000 0.864000 -0.488000 -0.500000 -0.333600 -0.304800 -0.408000 0.824000 -0.376000 -0.450000 -0.351500 -0.290700 -0.176000 0.632000 -0.744000 -0.458900 -0.351500 -0.304800 -0.472000 0.360000 -0.792000 -0.450000 -0.380500 -0.304800 -0.144000 0.256000 -0.952000 -0.500000 -0.400200 -0.304800 -0.176000 -0.672000 -0.712000 -0.492100 -0.401700 -0.304800 0.152000 -0.576000 -0.792000 -0.500000 -0.400600 -0.243900 0.024000 -0.920000 0.384000 -0.496800 -0.401700 -0.243900 0.256000 -0.880000 0.376000 -0.496800 -0.401700 -0.243900 0.256000 -0.880000 0.376000 -0.265700 0.200800 -0.182900 -0.312000 -0.760000 -0.552000 -0.265700 0.200800 -0.182900 -0.312000 -0.760000 -0.552000 -0.300000 0.218000 -0.182900 0.768000 0.424000 -0.464000 -0.300000 0.200800 -0.174500 0.536000 -0.360000 0.752000 -0.306800 0.200800 -0.182900 0.752000 -0.400000 -0.512000 -0.300000 0.193900 -0.182900 0.520000 -0.696000 -0.480000 -0.300000 0.200800 -0.185900 0.256000 -0.192000 -0.944000 -0.265700 0.200800 -0.182900 -0.312000 -0.760000 -0.552000 -0.300000 0.218000 -0.182900 0.768000 0.424000 -0.464000 -0.300000 0.200800 -0.185900 0.256000 -0.192000 -0.944000 -0.306800 0.200800 -0.182900 0.752000 -0.400000 -0.512000 -0.306800 0.200800 -0.182900 0.752000 -0.400000 -0.512000 -0.265700 0.200800 -0.182900 -0.312000 -0.760000 -0.552000 -0.265700 0.200800 -0.182900 -0.312000 -0.760000 -0.552000 -0.300000 0.200800 -0.174500 0.536000 -0.360000 0.752000 -0.300000 0.193900 -0.182900 0.520000 -0.696000 -0.480000 -0.300000 0.193900 -0.182900 0.520000 -0.696000 -0.480000 -0.300000 0.284000 -0.182900 -0.168000 -0.184000 -0.960000 -0.300000 0.284000 -0.182900 -0.168000 -0.184000 -0.960000 -0.300000 0.251000 -0.156100 -0.368000 -0.808000 -0.448000 -0.321900 0.251000 -0.182900 -0.240000 -0.296000 -0.920000 -0.321900 0.251000 -0.182900 -0.240000 -0.296000 -0.920000 -0.307700 -0.050200 -0.121900 -0.592000 0.464000 0.648000 -0.307700 -0.050200 -0.121900 -0.592000 0.464000 0.648000 -0.300000 -0.060700 -0.121900 -0.512000 0.456000 0.720000 -0.300000 -0.050200 -0.130700 -0.504000 0.472000 0.720000 -0.300000 -0.050200 -0.130700 -0.504000 0.472000 0.720000 -0.329200 -0.200800 -0.121900 0.376000 -0.264000 0.880000 -0.329200 -0.200800 -0.121900 0.376000 -0.264000 0.880000 -0.350000 -0.182300 -0.121900 -0.032000 -0.520000 0.848000 -0.350000 -0.200800 -0.137500 0.248000 -0.232000 0.936000 -0.391400 -0.200800 -0.121900 -0.176000 -0.648000 0.736000 -0.391400 -0.200800 -0.121900 -0.176000 -0.648000 0.736000 -0.400000 0.100400 -0.150800 -0.768000 0.376000 0.512000 -0.400000 0.100400 -0.150800 -0.768000 0.376000 0.512000 -0.381500 0.100400 -0.182900 -0.896000 0.440000 -0.008000 -0.400000 0.146600 -0.182900 -0.440000 0.464000 -0.760000 -0.400000 0.100400 -0.207800 -0.424000 0.688000 -0.576000 -0.400000 0.100400 -0.207800 -0.424000 0.688000 -0.576000 -0.400000 -0.203000 -0.121900 -0.184000 -0.672000 0.712000 -0.400000 -0.203000 -0.121900 -0.184000 -0.672000 0.712000 -0.354900 -0.251000 -0.121900 0.704000 -0.304000 0.632000 -0.400000 -0.249800 -0.182900 0.472000 -0.752000 0.448000 -0.398900 -0.251000 -0.182900 0.896000 -0.160000 0.400000 -0.400000 -0.249400 -0.243900 0.760000 -0.472000 -0.424000 -0.399000 -0.251000 -0.243900 0.912000 -0.008000 -0.392000 -0.399000 -0.251000 -0.243900 0.912000 -0.008000 -0.392000 -0.400000 -0.351500 -0.165500 0.064000 -0.056000 0.992000 -0.400000 -0.351500 -0.165500 0.064000 -0.056000 0.992000 -0.350000 -0.351500 -0.171100 -0.312000 -0.512000 0.792000 -0.400000 -0.301200 -0.149800 0.528000 0.376000 0.752000 -0.350000 -0.301200 -0.148100 0.392000 -0.048000 0.912000 -0.350000 -0.301200 -0.148100 0.392000 -0.048000 0.912000 -0.450000 -0.251000 -0.179900 -0.288000 -0.680000 0.664000 -0.450000 -0.251000 -0.179900 -0.288000 -0.680000 0.664000 -0.450000 -0.255300 -0.182900 -0.208000 -0.656000 0.712000 -0.415700 -0.251000 -0.182900 -0.088000 -0.872000 0.480000 -0.450000 -0.251000 -0.203800 -0.216000 -0.960000 -0.144000 -0.450000 -0.251000 -0.203800 -0.216000 -0.960000 -0.144000 -0.500000 0.355500 -0.182900 0.400000 0.616000 -0.664000 -0.500000 0.355500 -0.182900 0.400000 0.616000 -0.664000 -0.506000 0.351500 -0.182900 0.424000 0.584000 -0.680000 -0.500000 0.393600 -0.121900 0.504000 0.744000 -0.432000 -0.550000 0.351500 -0.135900 0.456000 0.632000 -0.616000 -0.550000 0.362300 -0.121900 0.400000 0.656000 -0.632000 -0.566700 0.351500 -0.121900 0.448000 0.536000 -0.704000 -0.566700 0.351500 -0.121900 0.448000 0.536000 -0.704000 -0.550000 0.351500 -0.135900 0.456000 0.632000 -0.616000 -0.550000 0.351500 -0.135900 0.456000 0.632000 -0.616000 -0.550000 0.301200 -0.167400 0.408000 0.504000 -0.752000 -0.506000 0.351500 -0.182900 0.424000 0.584000 -0.680000 -0.526000 0.301200 -0.182900 0.408000 0.312000 -0.848000 -0.500000 0.351500 -0.187300 0.416000 0.568000 -0.696000 -0.500000 0.301200 -0.193500 0.168000 0.072000 -0.976000 -0.526000 0.301200 -0.182900 0.408000 0.312000 -0.848000 -0.500000 0.251000 -0.199400 0.072000 0.096000 -0.984000 -0.550000 0.283200 -0.182900 0.320000 0.472000 -0.816000 -0.550000 0.251000 -0.199600 0.176000 0.288000 -0.936000 -0.500000 0.251000 -0.199400 0.072000 0.096000 -0.984000 -0.550000 0.200800 -0.211100 0.016000 0.048000 -0.992000 -0.500000 0.200800 -0.200200 -0.104000 -0.048000 -0.992000 -0.550000 0.150600 -0.215400 -0.144000 0.080000 -0.984000 -0.500000 0.150600 -0.194400 -0.208000 0.240000 -0.944000 -0.550000 0.100400 -0.212600 -0.200000 0.352000 -0.904000 -0.500000 0.100400 -0.210700 0.048000 0.704000 -0.704000 -0.550000 0.067800 -0.243900 0.024000 0.672000 -0.728000 -0.500000 0.082500 -0.243900 0.216000 0.832000 -0.504000 -0.550000 0.050200 -0.258400 0.160000 0.632000 -0.752000 -0.500000 0.050200 -0.303800 0.264000 0.816000 -0.504000 -0.550000 0.015600 -0.304800 0.472000 0.712000 -0.512000 -0.500000 0.049600 -0.304800 0.264000 0.736000 -0.616000 -0.550000 0.000000 -0.335900 0.576000 0.464000 -0.664000 -0.500000 0.014000 -0.365800 0.216000 0.784000 -0.568000 -0.524100 0.000000 -0.365800 0.648000 0.312000 -0.688000 -0.500000 0.000000 -0.393700 0.528000 0.072000 -0.840000 -0.500000 -0.027200 -0.365800 0.264000 -0.576000 -0.768000 -0.524100 0.000000 -0.365800 0.648000 0.312000 -0.688000 -0.500000 -0.050200 -0.339600 -0.136000 -0.672000 -0.720000 -0.550000 0.000000 -0.335900 0.576000 0.464000 -0.664000 -0.550000 -0.050200 -0.345500 0.192000 -0.560000 -0.792000 -0.550000 -0.050200 -0.345500 0.192000 -0.560000 -0.792000 -0.526000 0.301200 -0.182900 0.408000 0.312000 -0.848000 -0.526000 0.301200 -0.182900 0.408000 0.312000 -0.848000 -0.550000 0.283200 -0.182900 0.320000 0.472000 -0.816000 -0.550000 0.301200 -0.167400 0.408000 0.504000 -0.752000 -0.550000 0.301200 -0.167400 0.408000 0.504000 -0.752000 -0.500000 -0.250100 -0.121900 -0.432000 -0.712000 0.536000 -0.500000 -0.250100 -0.121900 -0.432000 -0.712000 0.536000 -0.501100 -0.251000 -0.121900 -0.552000 -0.624000 0.544000 -0.500000 -0.251000 -0.123800 -0.544000 -0.688000 0.456000 -0.500000 -0.251000 -0.123800 -0.544000 -0.688000 0.456000 -0.608400 0.251000 -0.182900 0.328000 0.488000 -0.800000 -0.608400 0.251000 -0.182900 0.328000 0.488000 -0.800000 -0.650000 0.227800 -0.182900 0.368000 0.576000 -0.720000 -0.650000 0.251000 -0.154700 0.488000 0.640000 -0.584000 -0.650000 0.251000 -0.154700 0.488000 0.640000 -0.584000 -0.600000 -0.333000 -0.121900 0.024000 -0.312000 0.944000 -0.600000 -0.333000 -0.121900 0.024000 -0.312000 0.944000 -0.600000 -0.351500 -0.136300 0.144000 -0.792000 0.584000 -0.650000 -0.327200 -0.121900 -0.280000 -0.536000 0.792000 -0.650000 -0.351500 -0.143500 -0.280000 -0.536000 0.784000 -0.679500 -0.351500 -0.121900 -0.424000 -0.464000 0.768000 -0.650000 -0.401700 -0.175000 -0.240000 -0.688000 0.680000 -0.700000 -0.372000 -0.121900 -0.360000 -0.440000 0.816000 -0.700000 -0.401700 -0.145100 -0.400000 -0.504000 0.752000 -0.737900 -0.401700 -0.121900 -0.352000 -0.448000 0.816000 -0.700000 -0.435200 -0.182900 -0.448000 -0.712000 0.536000 -0.750000 -0.411100 -0.121900 -0.304000 -0.456000 0.824000 -0.719600 -0.451900 -0.182900 -0.568000 -0.640000 0.512000 -0.750000 -0.451900 -0.153800 -0.384000 -0.528000 0.752000 -0.750000 -0.479900 -0.182900 -0.456000 -0.632000 0.616000 -0.719600 -0.451900 -0.182900 -0.568000 -0.640000 0.512000 -0.750000 -0.502100 -0.236900 -0.448000 -0.776000 0.432000 -0.700000 -0.451900 -0.215800 -0.528000 -0.696000 0.472000 -0.744200 -0.502100 -0.243900 -0.480000 -0.864000 0.128000 -0.700000 -0.472400 -0.243900 -0.560000 -0.816000 -0.016000 -0.750000 -0.502100 -0.254300 -0.448000 -0.832000 -0.312000 -0.700000 -0.481300 -0.304800 -0.240000 -0.712000 -0.656000 -0.750000 -0.487000 -0.304800 -0.104000 -0.744000 -0.656000 -0.700000 -0.451900 -0.321600 -0.136000 -0.312000 -0.936000 -0.750000 -0.451900 -0.330900 0.152000 -0.080000 -0.984000 -0.700000 -0.401700 -0.334100 0.120000 -0.128000 -0.976000 -0.750000 -0.401700 -0.321600 0.336000 0.000000 -0.936000 -0.700000 -0.351500 -0.333900 0.344000 -0.040000 -0.936000 -0.750000 -0.351500 -0.307800 0.512000 0.128000 -0.840000 -0.700000 -0.301200 -0.354900 0.160000 -0.240000 -0.952000 -0.750000 -0.334300 -0.304800 0.512000 0.112000 -0.840000 -0.744500 -0.301200 -0.304800 0.640000 0.104000 -0.760000 -0.750000 -0.301200 -0.299800 0.512000 0.144000 -0.840000 -0.728900 -0.251000 -0.304800 0.720000 0.440000 -0.528000 -0.750000 -0.251000 -0.256700 0.824000 0.520000 -0.208000 -0.700000 -0.211400 -0.304800 0.288000 0.624000 -0.720000 -0.750000 -0.247000 -0.243900 0.832000 0.536000 -0.096000 -0.700000 -0.200800 -0.294000 0.576000 0.608000 -0.536000 -0.717800 -0.200800 -0.243900 0.824000 0.560000 -0.064000 -0.700000 -0.175300 -0.243900 0.752000 0.600000 -0.240000 -0.713600 -0.200800 -0.182900 0.824000 0.512000 0.224000 -0.700000 -0.178500 -0.182900 0.792000 0.568000 0.200000 -0.700000 -0.200800 -0.144600 0.696000 0.528000 0.480000 -0.700000 -0.200800 -0.144600 0.696000 0.528000 0.480000 -0.600000 -0.351500 -0.136300 0.144000 -0.792000 0.584000 -0.600000 -0.351500 -0.136300 0.144000 -0.792000 0.584000 -0.650000 -0.351500 -0.143500 -0.280000 -0.536000 0.784000 -0.600000 -0.392700 -0.182900 -0.184000 -0.752000 0.624000 -0.650000 -0.401700 -0.175000 -0.240000 -0.688000 0.680000 -0.628900 -0.401700 -0.182900 -0.216000 -0.760000 0.608000 -0.650000 -0.407700 -0.182900 -0.272000 -0.728000 0.624000 -0.600000 -0.401700 -0.203000 -0.208000 -0.872000 0.432000 -0.650000 -0.436800 -0.243900 -0.416000 -0.848000 0.320000 -0.600000 -0.414700 -0.243900 -0.184000 -0.936000 0.272000 -0.650000 -0.449600 -0.304800 -0.280000 -0.432000 -0.848000 -0.600000 -0.422100 -0.304800 -0.120000 -0.768000 -0.616000 -0.650000 -0.401700 -0.330300 -0.240000 -0.360000 -0.896000 -0.600000 -0.401700 -0.327900 -0.024000 -0.544000 -0.832000 -0.650000 -0.351500 -0.332000 0.016000 -0.144000 -0.984000 -0.600000 -0.351500 -0.337900 0.040000 -0.080000 -0.992000 -0.650000 -0.301200 -0.350300 0.016000 -0.440000 -0.888000 -0.600000 -0.301200 -0.352300 -0.528000 -0.312000 -0.776000 -0.600000 -0.301200 -0.352300 -0.528000 -0.312000 -0.776000 -0.650000 0.278000 -0.121900 0.448000 0.624000 -0.624000 -0.650000 0.278000 -0.121900 0.448000 0.624000 -0.624000 -0.650000 0.251000 -0.154700 0.488000 0.640000 -0.584000 -0.673000 0.251000 -0.121900 0.568000 0.576000 -0.584000 -0.673000 0.251000 -0.121900 0.568000 0.576000 -0.584000 -0.700000 -0.401700 -0.145100 -0.400000 -0.504000 0.752000 -0.700000 -0.401700 -0.145100 -0.400000 -0.504000 0.752000 -0.650000 -0.401700 -0.175000 -0.240000 -0.688000 0.680000 -0.700000 -0.435200 -0.182900 -0.448000 -0.712000 0.536000 -0.650000 -0.407700 -0.182900 -0.272000 -0.728000 0.624000 -0.700000 -0.451900 -0.215800 -0.528000 -0.696000 0.472000 -0.650000 -0.436800 -0.243900 -0.416000 -0.848000 0.320000 -0.673600 -0.451900 -0.243900 -0.480000 -0.752000 0.448000 -0.650000 -0.449600 -0.304800 -0.280000 -0.432000 -0.848000 -0.653100 -0.451900 -0.304800 -0.336000 -0.480000 -0.800000 -0.650000 -0.401700 -0.330300 -0.240000 -0.360000 -0.896000 -0.700000 -0.451900 -0.321600 -0.136000 -0.312000 -0.936000 -0.700000 -0.401700 -0.334100 0.120000 -0.128000 -0.976000 -0.650000 -0.401700 -0.330300 -0.240000 -0.360000 -0.896000 -0.700000 -0.351500 -0.333900 0.344000 -0.040000 -0.936000 -0.650000 -0.351500 -0.332000 0.016000 -0.144000 -0.984000 -0.700000 -0.301200 -0.354900 0.160000 -0.240000 -0.952000 -0.650000 -0.301200 -0.350300 0.016000 -0.440000 -0.888000 -0.650000 -0.301200 -0.350300 0.016000 -0.440000 -0.888000 -0.719200 -0.251000 -0.121900 0.760000 0.456000 0.440000 -0.719200 -0.251000 -0.121900 0.760000 0.456000 0.440000 -0.750000 -0.297400 -0.121900 0.656000 0.584000 0.464000 -0.746300 -0.251000 -0.182900 0.848000 0.496000 0.152000 -0.750000 -0.257500 -0.182900 0.856000 0.488000 0.120000 -0.750000 -0.251000 -0.218200 0.840000 0.520000 0.096000 -0.777000 -0.301200 -0.182900 0.784000 0.536000 0.304000 -0.752500 -0.251000 -0.243900 0.840000 0.528000 -0.096000 -0.780500 -0.301200 -0.243900 0.848000 0.504000 -0.128000 -0.777000 -0.301200 -0.182900 0.784000 0.536000 0.304000 -0.800000 -0.328800 -0.243900 0.640000 0.656000 -0.384000 -0.800000 -0.333100 -0.182900 0.680000 0.680000 0.256000 -0.829500 -0.351500 -0.243900 0.648000 0.640000 -0.400000 -0.821300 -0.351500 -0.182900 0.624000 0.648000 0.416000 -0.850000 -0.375700 -0.243900 0.544000 0.616000 -0.552000 -0.850000 -0.381900 -0.182900 0.632000 0.696000 0.328000 -0.890600 -0.401700 -0.243900 0.576000 0.616000 -0.528000 -0.872200 -0.401700 -0.182900 0.632000 0.640000 0.416000 -0.900000 -0.412700 -0.243900 0.520000 0.640000 -0.552000 -0.900000 -0.433800 -0.182900 0.512000 0.688000 0.504000 -0.950000 -0.433400 -0.243900 0.528000 0.832000 0.152000 -0.933400 -0.451900 -0.182900 0.464000 0.712000 0.512000 -0.950000 -0.451900 -0.206400 0.504000 0.736000 0.440000 -0.950000 -0.463500 -0.182900 0.464000 0.672000 0.568000 -0.933400 -0.451900 -0.182900 0.464000 0.712000 0.512000 -0.950000 -0.502100 -0.136000 -0.296000 0.400000 0.864000 -0.900000 -0.451900 -0.156900 0.400000 0.632000 0.656000 -0.900000 -0.502100 -0.123800 -0.168000 -0.208000 0.960000 -0.850000 -0.451900 -0.123600 0.328000 0.296000 0.888000 -0.850000 -0.502100 -0.142100 -0.224000 -0.520000 0.816000 -0.850000 -0.502100 -0.142100 -0.224000 -0.520000 0.816000 -0.750000 -0.257500 -0.182900 0.856000 0.488000 0.120000 -0.750000 -0.257500 -0.182900 0.856000 0.488000 0.120000 -0.750000 -0.297400 -0.121900 0.656000 0.584000 0.464000 -0.777000 -0.301200 -0.182900 0.784000 0.536000 0.304000 -0.752700 -0.301200 -0.121900 0.792000 0.344000 0.488000 -0.800000 -0.333100 -0.182900 0.680000 0.680000 0.256000 -0.775700 -0.351500 -0.121900 0.600000 0.328000 0.720000 -0.800000 -0.351500 -0.149400 0.664000 0.512000 0.528000 -0.800000 -0.391100 -0.121900 0.384000 0.416000 0.816000 -0.821300 -0.351500 -0.182900 0.624000 0.648000 0.416000 -0.810500 -0.401700 -0.121900 0.456000 0.104000 0.872000 -0.850000 -0.381900 -0.182900 0.632000 0.696000 0.328000 -0.850000 -0.401700 -0.151500 0.608000 0.552000 0.560000 -0.872200 -0.401700 -0.182900 0.632000 0.640000 0.416000 -0.850000 -0.451900 -0.123600 0.328000 0.296000 0.888000 -0.900000 -0.433800 -0.182900 0.512000 0.688000 0.504000 -0.900000 -0.451900 -0.156900 0.400000 0.632000 0.656000 -0.933400 -0.451900 -0.182900 0.464000 0.712000 0.512000 -0.933400 -0.451900 -0.182900 0.464000 0.712000 0.512000 -0.783200 -0.502100 -0.182900 -0.448000 -0.720000 0.512000 -0.783200 -0.502100 -0.182900 -0.448000 -0.720000 0.512000 -0.800000 -0.502100 -0.171200 -0.360000 -0.648000 0.664000 -0.800000 -0.511100 -0.182900 -0.376000 -0.744000 0.544000 -0.800000 -0.511100 -0.182900 -0.376000 -0.744000 0.544000 -0.800000 -0.333100 -0.182900 0.680000 0.680000 0.256000 -0.800000 -0.333100 -0.182900 0.680000 0.680000 0.256000 -0.821300 -0.351500 -0.182900 0.624000 0.648000 0.416000 -0.800000 -0.351500 -0.149400 0.664000 0.512000 0.528000 -0.800000 -0.351500 -0.149400 0.664000 0.512000 0.528000 -0.900000 -0.552300 -0.159100 -0.496000 -0.592000 0.632000 -0.900000 -0.552300 -0.159100 -0.496000 -0.592000 0.632000 -0.900000 -0.573700 -0.182900 -0.608000 -0.704000 0.344000 -0.876500 -0.552300 -0.182900 -0.528000 -0.672000 0.504000 -0.900000 -0.578300 -0.243900 -0.552000 -0.704000 -0.440000 -0.868400 -0.552300 -0.243900 -0.552000 -0.760000 -0.328000 -0.900000 -0.552300 -0.278500 -0.424000 -0.592000 -0.672000 -0.900000 -0.552300 -0.278500 -0.424000 -0.592000 -0.672000 -0.900000 0.127900 -0.121900 0.560000 0.776000 -0.264000 -0.900000 0.127900 -0.121900 0.560000 0.776000 -0.264000 -0.931600 0.100400 -0.121900 0.600000 0.744000 -0.272000 -0.900000 0.111100 -0.182900 0.552000 0.712000 -0.416000 -0.912000 0.100400 -0.182900 0.600000 0.704000 -0.360000 -0.900000 0.100400 -0.203200 0.536000 0.688000 -0.472000 -0.900000 0.100400 -0.203200 0.536000 0.688000 -0.472000 -0.950000 -0.602500 -0.169200 -0.536000 -0.520000 0.656000 -0.950000 -0.602500 -0.169200 -0.536000 -0.520000 0.656000 -0.950000 -0.619400 -0.182900 -0.632000 -0.592000 0.480000 -0.935000 -0.602500 -0.182900 -0.552000 -0.552000 0.608000 -0.950000 -0.619400 -0.243900 -0.600000 -0.584000 -0.536000 -0.933200 -0.602500 -0.243900 -0.584000 -0.624000 -0.512000 -0.950000 -0.602500 -0.260200 -0.544000 -0.504000 -0.664000 -0.950000 -0.602500 -0.260200 -0.544000 -0.504000 -0.664000 -1.000000 -0.251000 -0.154300 -0.728000 -0.648000 0.200000 -1.000000 -0.251000 -0.154300 -0.728000 -0.648000 0.200000 -1.000000 -0.258900 -0.182900 -0.752000 -0.616000 0.208000 -0.993400 -0.251000 -0.182900 -0.736000 -0.640000 0.200000 -1.000000 -0.277900 -0.243900 -0.712000 -0.592000 0.360000 -0.978600 -0.251000 -0.243900 -0.696000 -0.616000 0.352000 -0.978600 -0.251000 -0.243900 -0.696000 -0.616000 0.352000 -0.950000 -0.560000 -0.121900 -0.400000 -0.536000 0.728000 -0.950000 -0.560000 -0.121900 -0.400000 -0.536000 0.728000 -0.992300 -0.602500 -0.121900 -0.520000 -0.480000 0.696000 -0.950000 -0.602500 -0.169200 -0.536000 -0.520000 0.656000 -0.950000 -0.602500 -0.169200 -0.536000 -0.520000 0.656000 -1.000000 -0.652700 -0.168000 -0.488000 -0.568000 0.656000 -1.000000 -0.652700 -0.168000 -0.488000 -0.568000 0.656000 -1.000000 -0.666200 -0.182900 -0.536000 -0.632000 0.544000 -0.983200 -0.652700 -0.182900 -0.528000 -0.608000 0.584000 -1.000000 -0.673300 -0.243900 -0.656000 -0.656000 -0.368000 -0.979500 -0.652700 -0.243900 -0.672000 -0.664000 -0.304000 -1.000000 -0.652700 -0.268800 -0.592000 -0.512000 -0.608000 -1.000000 -0.652700 -0.268800 -0.592000 -0.512000 -0.608000 --1.000000 0.256900 -0.182900 0.288000 0.752000 -0.584000 --1.000000 0.256900 -0.182900 0.288000 0.752000 -0.584000 --1.000000 0.251000 -0.191500 0.280000 0.728000 -0.616000 --0.985000 0.251000 -0.182900 0.288000 0.752000 -0.576000 --0.985000 0.251000 -0.182900 0.288000 0.752000 -0.576000 --0.980800 0.200800 -0.243900 0.232000 0.632000 -0.736000 --0.980800 0.200800 -0.243900 0.232000 0.632000 -0.736000 --0.950000 0.189400 -0.243900 0.264000 0.616000 -0.728000 --0.950000 0.200800 -0.231900 0.272000 0.640000 -0.704000 --0.950000 0.200800 -0.231900 0.272000 0.640000 -0.704000 --0.900000 0.214200 -0.182900 0.360000 0.720000 -0.576000 --0.900000 0.214200 -0.182900 0.360000 0.720000 -0.576000 --0.900000 0.200800 -0.201400 0.352000 0.680000 -0.640000 --0.874200 0.200800 -0.182900 0.360000 0.712000 -0.584000 --0.874200 0.200800 -0.182900 0.360000 0.712000 -0.584000 --0.878700 0.150600 -0.243900 0.328000 0.616000 -0.704000 --0.878700 0.150600 -0.243900 0.328000 0.616000 -0.704000 --0.850000 0.135500 -0.243900 0.320000 0.608000 -0.712000 --0.850000 0.150600 -0.229000 0.320000 0.608000 -0.720000 --0.850000 0.150600 -0.229000 0.320000 0.608000 -0.720000 --0.900000 -0.542100 -0.182900 -0.808000 -0.560000 0.136000 --0.900000 -0.542100 -0.182900 -0.808000 -0.560000 0.136000 --0.900000 -0.551700 -0.243900 -0.808000 -0.568000 -0.120000 --0.892400 -0.552300 -0.182900 -0.760000 -0.624000 0.176000 --0.899500 -0.552300 -0.243900 -0.800000 -0.592000 -0.072000 --0.850000 -0.592600 -0.182900 -0.520000 -0.800000 0.264000 --0.851300 -0.602500 -0.243900 -0.680000 -0.720000 -0.008000 --0.850000 -0.602500 -0.238600 -0.616000 -0.752000 0.216000 --0.850000 -0.603800 -0.243900 -0.656000 -0.744000 0.064000 --0.832500 -0.602500 -0.182900 -0.576000 -0.768000 0.272000 --0.800000 -0.632800 -0.243900 -0.432000 -0.896000 0.072000 --0.800000 -0.620600 -0.182900 -0.312000 -0.880000 0.336000 --0.750000 -0.646000 -0.243900 -0.088000 -0.984000 0.144000 --0.750000 -0.630100 -0.182900 -0.144000 -0.912000 0.360000 --0.750000 -0.630100 -0.182900 -0.144000 -0.912000 0.360000 --0.820300 -0.502100 -0.182900 0.496000 0.792000 0.344000 --0.820300 -0.502100 -0.182900 0.496000 0.792000 0.344000 --0.800000 -0.502100 -0.227500 0.432000 0.824000 0.352000 --0.800000 -0.513200 -0.182900 -0.080000 0.880000 0.456000 --0.750000 -0.502100 -0.184800 -0.496000 0.696000 0.496000 --0.750000 -0.503000 -0.182900 -0.200000 0.848000 0.472000 --0.749300 -0.502100 -0.182900 -0.920000 -0.232000 0.288000 --0.750000 -0.502100 -0.184800 -0.496000 0.696000 0.496000 --0.750000 -0.499500 -0.182900 -0.936000 -0.200000 0.264000 --0.750000 -0.499500 -0.182900 -0.936000 -0.200000 0.264000 --0.850000 -0.592600 -0.182900 -0.520000 -0.800000 0.264000 --0.850000 -0.592600 -0.182900 -0.520000 -0.800000 0.264000 --0.832500 -0.602500 -0.182900 -0.576000 -0.768000 0.272000 --0.850000 -0.602500 -0.238600 -0.616000 -0.752000 0.216000 --0.850000 -0.602500 -0.238600 -0.616000 -0.752000 0.216000 --0.650000 0.045800 -0.182900 0.672000 0.432000 -0.592000 --0.650000 0.045800 -0.182900 0.672000 0.432000 -0.592000 --0.650000 0.000000 -0.224600 0.632000 0.368000 -0.672000 --0.621400 0.000000 -0.182900 0.848000 0.280000 -0.440000 --0.621400 0.000000 -0.182900 0.848000 0.280000 -0.440000 --0.600000 -0.629300 -0.182900 0.072000 -0.968000 0.224000 --0.600000 -0.629300 -0.182900 0.072000 -0.968000 0.224000 --0.600000 -0.640700 -0.243900 0.080000 -0.976000 0.192000 --0.550000 -0.618800 -0.182900 0.168000 -0.944000 0.272000 --0.550000 -0.629900 -0.243900 0.160000 -0.960000 0.200000 --0.500000 -0.610400 -0.182900 -0.136000 -0.936000 0.304000 --0.500000 -0.625200 -0.243900 -0.096000 -0.960000 0.240000 --0.550000 -0.629900 -0.243900 0.160000 -0.960000 0.200000 --0.500000 -0.637800 -0.304800 -0.208000 -0.976000 -0.032000 --0.550000 -0.639800 -0.304800 0.152000 -0.984000 0.000000 --0.500000 -0.633000 -0.365800 -0.088000 -0.968000 -0.200000 --0.550000 -0.637200 -0.365800 0.152000 -0.968000 -0.168000 --0.550000 -0.639800 -0.304800 0.152000 -0.984000 0.000000 --0.600000 -0.645500 -0.365800 0.016000 -0.968000 -0.216000 --0.600000 -0.650800 -0.304800 0.064000 -0.992000 0.000000 --0.550000 -0.639800 -0.304800 0.152000 -0.984000 0.000000 --0.600000 -0.640700 -0.243900 0.080000 -0.976000 0.192000 --0.550000 -0.629900 -0.243900 0.160000 -0.960000 0.200000 --0.550000 -0.629900 -0.243900 0.160000 -0.960000 0.200000 --0.403600 -0.100400 -0.182900 -0.616000 0.592000 -0.512000 --0.403600 -0.100400 -0.182900 -0.616000 0.592000 -0.512000 --0.400000 -0.100400 -0.188300 -0.616000 0.576000 -0.520000 --0.400000 -0.096400 -0.182900 -0.664000 0.552000 -0.496000 --0.354400 -0.100400 -0.243900 -0.584000 0.448000 -0.664000 --0.365500 -0.050200 -0.182900 -0.728000 0.384000 -0.560000 --0.350000 -0.093900 -0.243900 -0.600000 0.408000 -0.680000 --0.350000 -0.050200 -0.209400 -0.696000 0.392000 -0.584000 --0.321700 -0.050200 -0.243900 -0.656000 0.344000 -0.656000 --0.350000 -0.016600 -0.182900 -0.688000 0.360000 -0.616000 --0.301700 0.000000 -0.243900 -0.744000 0.392000 -0.536000 --0.340600 0.000000 -0.182900 -0.696000 0.480000 -0.520000 --0.340600 0.000000 -0.182900 -0.696000 0.480000 -0.520000 --0.444500 -0.150600 -0.243900 -0.312000 0.784000 -0.528000 --0.444500 -0.150600 -0.243900 -0.312000 0.784000 -0.528000 --0.450000 -0.150600 -0.239400 -0.408000 0.792000 -0.448000 --0.450000 -0.152500 -0.243900 -0.384000 0.800000 -0.448000 --0.450000 -0.152500 -0.243900 -0.384000 0.800000 -0.448000 --0.400000 -0.651500 -0.182900 -0.552000 -0.472000 0.672000 --0.400000 -0.651500 -0.182900 -0.552000 -0.472000 0.672000 --0.400000 -0.652700 -0.184800 -0.640000 -0.536000 0.536000 --0.450000 -0.629600 -0.182900 -0.344000 -0.872000 0.320000 --0.428400 -0.652700 -0.243900 -0.584000 -0.736000 0.336000 --0.450000 -0.644000 -0.243900 -0.352000 -0.912000 0.200000 --0.450000 -0.652700 -0.293400 -0.288000 -0.936000 0.160000 --0.428400 -0.652700 -0.243900 -0.584000 -0.736000 0.336000 --0.450000 -0.654300 -0.304800 -0.272000 -0.952000 0.040000 --0.400000 -0.663600 -0.243900 -0.504000 -0.840000 0.160000 --0.400000 -0.672200 -0.304800 -0.400000 -0.904000 -0.128000 --0.363900 -0.703000 -0.243900 -0.784000 -0.584000 0.176000 --0.371300 -0.703000 -0.304800 -0.816000 -0.552000 -0.144000 --0.350000 -0.730400 -0.243900 -0.544000 -0.776000 0.296000 --0.350000 -0.747900 -0.304800 -0.512000 -0.832000 -0.184000 --0.300000 -0.736500 -0.243900 0.320000 -0.832000 0.440000 --0.330700 -0.753200 -0.304800 -0.192000 -0.968000 -0.112000 --0.300000 -0.753200 -0.286100 0.088000 -0.928000 0.352000 --0.300000 -0.758500 -0.304800 0.104000 -0.976000 -0.144000 --0.281500 -0.753200 -0.304800 0.312000 -0.920000 -0.216000 --0.300000 -0.753200 -0.317300 0.136000 -0.840000 -0.512000 --0.300000 -0.758500 -0.304800 0.104000 -0.976000 -0.144000 --0.330700 -0.753200 -0.304800 -0.192000 -0.968000 -0.112000 --0.300000 -0.753200 -0.317300 0.136000 -0.840000 -0.512000 --0.350000 -0.747900 -0.304800 -0.512000 -0.832000 -0.184000 --0.300000 -0.703000 -0.365100 0.056000 -0.232000 -0.968000 --0.350000 -0.703000 -0.357000 -0.336000 -0.496000 -0.792000 --0.300000 -0.687100 -0.365800 0.104000 -0.048000 -0.992000 --0.350000 -0.679200 -0.365800 -0.072000 -0.176000 -0.976000 --0.350000 -0.703000 -0.357000 -0.336000 -0.496000 -0.792000 --0.400000 -0.653700 -0.365800 -0.176000 -0.888000 -0.416000 --0.371300 -0.703000 -0.304800 -0.816000 -0.552000 -0.144000 --0.400000 -0.672200 -0.304800 -0.400000 -0.904000 -0.128000 --0.400000 -0.672200 -0.304800 -0.400000 -0.904000 -0.128000 --0.428400 -0.652700 -0.243900 -0.584000 -0.736000 0.336000 --0.428400 -0.652700 -0.243900 -0.584000 -0.736000 0.336000 --0.400000 -0.652700 -0.184800 -0.640000 -0.536000 0.536000 --0.400000 -0.663600 -0.243900 -0.504000 -0.840000 0.160000 --0.396000 -0.652700 -0.182900 -0.176000 0.000000 0.984000 --0.363900 -0.703000 -0.243900 -0.784000 -0.584000 0.176000 --0.350700 -0.703000 -0.182900 -0.792000 -0.176000 0.576000 --0.350000 -0.730400 -0.243900 -0.544000 -0.776000 0.296000 --0.350000 -0.704300 -0.182900 -0.112000 -0.808000 0.576000 --0.300000 -0.736500 -0.243900 0.320000 -0.832000 0.440000 --0.300000 -0.708000 -0.182900 0.360000 -0.768000 0.520000 --0.300000 -0.708000 -0.182900 0.360000 -0.768000 0.520000 --0.365500 -0.050200 -0.182900 -0.728000 0.384000 -0.560000 --0.365500 -0.050200 -0.182900 -0.728000 0.384000 -0.560000 --0.350000 -0.050200 -0.209400 -0.696000 0.392000 -0.584000 --0.350000 -0.016600 -0.182900 -0.688000 0.360000 -0.616000 --0.350000 -0.016600 -0.182900 -0.688000 0.360000 -0.616000 --0.400000 -0.100400 -0.188300 -0.616000 0.576000 -0.520000 --0.400000 -0.100400 -0.188300 -0.616000 0.576000 -0.520000 --0.400000 -0.131400 -0.243900 -0.384000 0.744000 -0.536000 --0.354400 -0.100400 -0.243900 -0.584000 0.448000 -0.664000 --0.400000 -0.150600 -0.272200 -0.312000 0.624000 -0.704000 --0.350000 -0.100400 -0.248500 -0.576000 0.440000 -0.680000 --0.350000 -0.150600 -0.298700 -0.264000 0.464000 -0.840000 --0.400000 -0.150600 -0.272200 -0.312000 0.624000 -0.704000 --0.350000 -0.159400 -0.304800 -0.248000 0.528000 -0.808000 --0.400000 -0.174400 -0.304800 -0.224000 0.736000 -0.632000 --0.350000 -0.200800 -0.339000 0.200000 0.416000 -0.880000 --0.400000 -0.200800 -0.333600 -0.064000 0.568000 -0.816000 --0.350000 -0.248400 -0.365800 0.184000 0.424000 -0.880000 --0.400000 -0.239300 -0.365800 0.048000 0.512000 -0.848000 --0.350000 -0.251000 -0.367200 0.240000 0.168000 -0.952000 --0.400000 -0.251000 -0.373300 0.080000 0.400000 -0.904000 --0.350000 -0.301200 -0.377400 0.232000 0.208000 -0.944000 --0.400000 -0.301200 -0.390900 0.144000 0.296000 -0.936000 --0.350000 -0.351500 -0.416300 -0.176000 0.600000 -0.768000 --0.400000 -0.351500 -0.411400 0.000000 0.616000 -0.784000 --0.400000 -0.351500 -0.411400 0.000000 0.616000 -0.784000 --0.350000 -0.647900 -0.182900 0.008000 0.768000 0.624000 --0.350000 -0.647900 -0.182900 0.008000 0.768000 0.624000 --0.386500 -0.602500 -0.182900 0.376000 -0.032000 0.920000 --0.350000 -0.630200 -0.243900 -0.144000 0.776000 0.600000 --0.371400 -0.602500 -0.243900 0.928000 0.016000 0.352000 --0.371400 -0.602500 -0.243900 0.928000 0.016000 0.352000 --0.200000 0.172600 -0.182900 -0.488000 0.416000 -0.760000 --0.200000 0.172600 -0.182900 -0.488000 0.416000 -0.760000 --0.216700 0.150600 -0.182900 -0.560000 0.376000 -0.728000 --0.200000 0.150600 -0.197300 -0.488000 0.464000 -0.728000 --0.249100 0.100400 -0.182900 -0.576000 0.496000 -0.640000 --0.200000 0.100400 -0.242800 -0.520000 0.512000 -0.672000 --0.200000 0.100400 -0.242800 -0.520000 0.512000 -0.672000 --0.200000 0.172600 -0.182900 -0.488000 0.416000 -0.760000 --0.200000 0.172600 -0.182900 -0.488000 0.416000 -0.760000 --0.200000 0.150600 -0.197300 -0.488000 0.464000 -0.728000 --0.173800 0.200800 -0.182900 -0.480000 0.344000 -0.800000 --0.150000 0.150600 -0.235500 -0.296000 0.536000 -0.784000 --0.150000 0.200800 -0.199200 -0.328000 0.272000 -0.896000 --0.150000 0.200800 -0.199200 -0.328000 0.272000 -0.896000 -0.100000 0.004900 -0.182900 -0.288000 0.864000 0.400000 -0.100000 0.004900 -0.182900 -0.288000 0.864000 0.400000 -0.050000 0.005700 -0.182900 0.312000 0.584000 0.744000 -0.100000 0.000000 -0.203800 -0.256000 0.936000 -0.224000 -0.050000 0.042300 -0.243900 0.688000 0.376000 -0.616000 -0.078000 0.000000 -0.243900 0.336000 0.616000 -0.696000 -0.050000 0.000000 -0.258500 0.448000 0.256000 -0.848000 -0.100000 -0.005500 -0.243900 -0.184000 0.760000 -0.616000 -0.050000 -0.050200 -0.279200 0.280000 0.320000 -0.896000 -0.100000 -0.050200 -0.272200 -0.136000 0.384000 -0.904000 -0.050000 -0.100400 -0.298100 0.360000 0.248000 -0.896000 -0.100000 -0.100400 -0.298900 0.040000 0.136000 -0.984000 -0.100000 -0.100400 -0.298900 0.040000 0.136000 -0.984000 -0.078000 0.000000 -0.243900 0.336000 0.616000 -0.696000 -0.078000 0.000000 -0.243900 0.336000 0.616000 -0.696000 -0.100000 -0.005500 -0.243900 -0.184000 0.760000 -0.616000 -0.100000 0.000000 -0.203800 -0.256000 0.936000 -0.224000 -0.100000 0.000000 -0.203800 -0.256000 0.936000 -0.224000 -0.200000 -0.301200 -0.206400 -0.600000 -0.688000 0.384000 -0.200000 -0.301200 -0.206400 -0.600000 -0.688000 0.384000 -0.200000 -0.319700 -0.243900 -0.624000 -0.696000 0.328000 -0.176900 -0.301200 -0.243900 -0.504000 -0.800000 0.304000 -0.200000 -0.340400 -0.304800 -0.480000 -0.448000 -0.744000 -0.170700 -0.301200 -0.304800 -0.520000 -0.608000 -0.592000 -0.200000 -0.301200 -0.321600 -0.488000 -0.368000 -0.784000 -0.200000 -0.301200 -0.321600 -0.488000 -0.368000 -0.784000 -0.300000 -0.330300 -0.182900 -0.312000 -0.696000 0.632000 -0.300000 -0.330300 -0.182900 -0.312000 -0.696000 0.632000 -0.300000 -0.351500 -0.225700 -0.416000 -0.800000 0.416000 -0.250000 -0.319600 -0.182900 -0.280000 -0.832000 0.472000 -0.277600 -0.351500 -0.243900 -0.264000 -0.888000 0.352000 -0.250000 -0.343100 -0.243900 -0.320000 -0.920000 0.208000 -0.271900 -0.351500 -0.304800 -0.112000 -0.784000 -0.608000 -0.250000 -0.348300 -0.304800 -0.128000 -0.736000 -0.656000 -0.300000 -0.351500 -0.310200 -0.192000 -0.728000 -0.648000 -0.250000 -0.313600 -0.365800 -0.336000 -0.640000 -0.680000 -0.300000 -0.308000 -0.365800 0.080000 -0.656000 -0.744000 -0.250000 -0.301200 -0.379400 -0.536000 -0.264000 -0.792000 -0.300000 -0.301200 -0.372900 0.128000 -0.472000 -0.864000 -0.300000 -0.308000 -0.365800 0.080000 -0.656000 -0.744000 -0.333500 -0.301200 -0.365800 0.208000 -0.080000 -0.968000 -0.300000 -0.351500 -0.310200 -0.192000 -0.728000 -0.648000 -0.350000 -0.301200 -0.360500 0.376000 0.184000 -0.904000 -0.348000 -0.351500 -0.365800 -0.720000 -0.032000 -0.680000 -0.350000 -0.334300 -0.365800 -0.304000 0.096000 -0.944000 -0.350000 -0.351500 -0.368100 -0.440000 0.096000 -0.888000 -0.355700 -0.351500 -0.365800 0.360000 -0.072000 -0.928000 -0.350000 -0.354600 -0.365800 -0.264000 -0.632000 -0.720000 -0.400000 -0.351500 -0.338800 0.360000 -0.568000 -0.728000 -0.350000 -0.401700 -0.317400 -0.608000 -0.560000 -0.544000 -0.400000 -0.388800 -0.304800 0.392000 -0.800000 -0.448000 -0.376800 -0.401700 -0.304800 0.336000 -0.848000 -0.392000 -0.400000 -0.401700 -0.257800 0.112000 -0.952000 -0.280000 -0.350000 -0.410700 -0.304800 -0.592000 -0.664000 -0.440000 -0.400000 -0.404800 -0.243900 0.016000 -0.968000 0.240000 -0.350000 -0.409600 -0.243900 -0.632000 -0.696000 0.320000 -0.400000 -0.401700 -0.239700 -0.184000 -0.720000 0.656000 -0.350000 -0.401700 -0.229000 -0.616000 -0.656000 0.416000 -0.400000 -0.370500 -0.182900 -0.008000 -0.616000 0.776000 -0.350000 -0.366900 -0.182900 -0.368000 -0.552000 0.736000 -0.350000 -0.401700 -0.229000 -0.616000 -0.656000 0.416000 -0.331500 -0.351500 -0.182900 -0.432000 -0.576000 0.688000 -0.343800 -0.401700 -0.243900 -0.728000 -0.584000 0.344000 -0.300000 -0.351500 -0.225700 -0.416000 -0.800000 0.416000 -0.300000 -0.357600 -0.243900 -0.288000 -0.920000 0.248000 -0.277600 -0.351500 -0.243900 -0.264000 -0.888000 0.352000 -0.300000 -0.355300 -0.304800 -0.272000 -0.752000 -0.592000 -0.271900 -0.351500 -0.304800 -0.112000 -0.784000 -0.608000 -0.300000 -0.351500 -0.310200 -0.192000 -0.728000 -0.648000 -0.300000 -0.355300 -0.304800 -0.272000 -0.752000 -0.592000 -0.348000 -0.351500 -0.365800 -0.720000 -0.032000 -0.680000 -0.344100 -0.401700 -0.304800 -0.784000 -0.512000 -0.336000 -0.350000 -0.354600 -0.365800 -0.264000 -0.632000 -0.720000 -0.350000 -0.401700 -0.317400 -0.608000 -0.560000 -0.544000 -0.344100 -0.401700 -0.304800 -0.784000 -0.512000 -0.336000 -0.350000 -0.410700 -0.304800 -0.592000 -0.664000 -0.440000 -0.343800 -0.401700 -0.243900 -0.728000 -0.584000 0.344000 -0.350000 -0.409600 -0.243900 -0.632000 -0.696000 0.320000 -0.350000 -0.401700 -0.229000 -0.616000 -0.656000 0.416000 -0.350000 -0.401700 -0.229000 -0.616000 -0.656000 0.416000 -0.300000 -0.330300 -0.182900 -0.312000 -0.696000 0.632000 -0.300000 -0.330300 -0.182900 -0.312000 -0.696000 0.632000 -0.331500 -0.351500 -0.182900 -0.432000 -0.576000 0.688000 -0.300000 -0.351500 -0.225700 -0.416000 -0.800000 0.416000 -0.300000 -0.351500 -0.225700 -0.416000 -0.800000 0.416000 -0.427100 -0.301200 -0.182900 0.776000 0.464000 0.416000 -0.427100 -0.301200 -0.182900 0.776000 0.464000 0.416000 -0.450000 -0.338000 -0.182900 0.248000 0.592000 0.752000 -0.429200 -0.301200 -0.243900 0.816000 0.544000 -0.176000 -0.450000 -0.327300 -0.243900 -0.064000 0.864000 -0.488000 -0.401200 -0.301200 -0.304800 0.744000 0.488000 -0.440000 -0.450000 -0.351500 -0.290700 -0.176000 0.632000 -0.744000 -0.437100 -0.351500 -0.304800 0.688000 0.472000 -0.536000 -0.437100 -0.351500 -0.304800 0.688000 0.472000 -0.536000 -0.450000 -0.370700 -0.182900 -0.080000 -0.520000 0.848000 -0.450000 -0.370700 -0.182900 -0.080000 -0.520000 0.848000 -0.400000 -0.370500 -0.182900 -0.008000 -0.616000 0.776000 -0.450000 -0.401700 -0.212100 0.240000 -0.816000 0.520000 -0.400000 -0.401700 -0.239700 -0.184000 -0.720000 0.656000 -0.450000 -0.418500 -0.243900 -0.152000 -0.896000 0.400000 -0.400000 -0.404800 -0.243900 0.016000 -0.968000 0.240000 -0.450000 -0.411100 -0.304800 -0.144000 -0.808000 -0.560000 -0.400000 -0.401700 -0.257800 0.112000 -0.952000 -0.280000 -0.428900 -0.401700 -0.304800 -0.392000 -0.464000 -0.784000 -0.428900 -0.401700 -0.304800 -0.392000 -0.464000 -0.784000 -0.500000 0.355500 -0.182900 0.400000 0.616000 -0.664000 -0.500000 0.355500 -0.182900 0.400000 0.616000 -0.664000 -0.500000 0.351500 -0.187300 0.416000 0.568000 -0.696000 -0.506000 0.351500 -0.182900 0.424000 0.584000 -0.680000 -0.506000 0.351500 -0.182900 0.424000 0.584000 -0.680000 -0.550000 -0.401700 -0.218900 -0.128000 -0.904000 0.392000 -0.550000 -0.401700 -0.218900 -0.128000 -0.904000 0.392000 -0.550000 -0.409700 -0.243900 -0.144000 -0.944000 0.272000 -0.503900 -0.401700 -0.243900 -0.232000 -0.936000 0.256000 -0.550000 -0.415900 -0.304800 -0.192000 -0.848000 -0.480000 -0.502600 -0.401700 -0.304800 -0.320000 -0.840000 -0.416000 -0.550000 -0.401700 -0.333700 -0.144000 -0.688000 -0.704000 -0.550000 -0.401700 -0.333700 -0.144000 -0.688000 -0.704000 -0.600000 0.200800 -0.209200 0.248000 0.288000 -0.920000 -0.600000 0.200800 -0.209200 0.248000 0.288000 -0.920000 -0.650000 0.200800 -0.204000 0.272000 0.408000 -0.864000 -0.600000 0.150600 -0.225200 0.008000 0.128000 -0.984000 -0.650000 0.150600 -0.219600 0.200000 0.280000 -0.928000 -0.600000 0.100400 -0.237100 -0.096000 0.168000 -0.976000 -0.650000 0.100400 -0.241400 0.232000 0.064000 -0.968000 -0.600000 0.076600 -0.243900 -0.096000 0.360000 -0.920000 -0.650000 0.067400 -0.243900 0.208000 0.056000 -0.968000 -0.600000 0.050200 -0.251100 0.248000 0.344000 -0.896000 -0.650000 0.050200 -0.244900 0.216000 0.040000 -0.968000 -0.600000 0.000000 -0.284600 0.512000 0.112000 -0.840000 -0.650000 0.000000 -0.248500 0.680000 -0.160000 -0.712000 -0.650000 0.000000 -0.248500 0.680000 -0.160000 -0.712000 -0.600000 -0.392700 -0.182900 -0.184000 -0.752000 0.624000 -0.600000 -0.392700 -0.182900 -0.184000 -0.752000 0.624000 -0.628900 -0.401700 -0.182900 -0.216000 -0.760000 0.608000 -0.600000 -0.401700 -0.203000 -0.208000 -0.872000 0.432000 -0.600000 -0.401700 -0.203000 -0.208000 -0.872000 0.432000 -0.700000 -0.451900 -0.215800 -0.528000 -0.696000 0.472000 -0.700000 -0.451900 -0.215800 -0.528000 -0.696000 0.472000 -0.700000 -0.472400 -0.243900 -0.560000 -0.816000 -0.016000 -0.673600 -0.451900 -0.243900 -0.480000 -0.752000 0.448000 -0.700000 -0.481300 -0.304800 -0.240000 -0.712000 -0.656000 -0.653100 -0.451900 -0.304800 -0.336000 -0.480000 -0.800000 -0.700000 -0.451900 -0.321600 -0.136000 -0.312000 -0.936000 -0.700000 -0.451900 -0.321600 -0.136000 -0.312000 -0.936000 -0.700000 -0.435200 -0.182900 -0.448000 -0.712000 0.536000 -0.700000 -0.435200 -0.182900 -0.448000 -0.712000 0.536000 -0.719600 -0.451900 -0.182900 -0.568000 -0.640000 0.512000 -0.700000 -0.451900 -0.215800 -0.528000 -0.696000 0.472000 -0.700000 -0.451900 -0.215800 -0.528000 -0.696000 0.472000 -0.750000 -0.502100 -0.236900 -0.448000 -0.776000 0.432000 -0.750000 -0.502100 -0.236900 -0.448000 -0.776000 0.432000 -0.750000 -0.505200 -0.243900 -0.480000 -0.856000 0.152000 -0.744200 -0.502100 -0.243900 -0.480000 -0.864000 0.128000 -0.750000 -0.502100 -0.254300 -0.448000 -0.832000 -0.312000 -0.750000 -0.502100 -0.254300 -0.448000 -0.832000 -0.312000 -0.750000 0.157000 -0.182900 0.280000 0.720000 -0.624000 -0.750000 0.157000 -0.182900 0.280000 0.720000 -0.624000 -0.750000 0.150600 -0.191500 0.256000 0.656000 -0.704000 -0.769100 0.150600 -0.182900 0.248000 0.704000 -0.648000 -0.769100 0.150600 -0.182900 0.248000 0.704000 -0.648000 -0.929600 0.050200 -0.243900 0.432000 0.672000 -0.584000 -0.929600 0.050200 -0.243900 0.432000 0.672000 -0.584000 -0.950000 0.037500 -0.243900 0.432000 0.688000 -0.576000 -0.950000 0.050200 -0.224500 0.472000 0.712000 -0.504000 -0.950000 0.050200 -0.224500 0.472000 0.712000 -0.504000 -0.950000 0.069900 -0.182900 0.544000 0.736000 -0.392000 -0.950000 0.069900 -0.182900 0.544000 0.736000 -0.392000 -0.950000 0.050200 -0.224500 0.472000 0.712000 -0.504000 -0.978000 0.050200 -0.182900 0.512000 0.768000 -0.376000 -0.978000 0.050200 -0.182900 0.512000 0.768000 -0.376000 -0.950000 -0.451900 -0.206400 0.504000 0.736000 0.440000 -0.950000 -0.451900 -0.206400 0.504000 0.736000 0.440000 -0.950000 -0.433400 -0.243900 0.528000 0.832000 0.152000 -0.980700 -0.451900 -0.243900 0.752000 0.648000 0.032000 -0.950000 -0.451900 -0.300000 0.488000 0.464000 -0.728000 -0.950000 -0.433400 -0.243900 0.528000 0.832000 0.152000 -0.900000 -0.451900 -0.272400 0.368000 0.408000 -0.824000 -0.900000 -0.412700 -0.243900 0.520000 0.640000 -0.552000 -0.850000 -0.451900 -0.293100 0.448000 0.248000 -0.848000 -0.890600 -0.401700 -0.243900 0.576000 0.616000 -0.528000 -0.850000 -0.401700 -0.268600 0.504000 0.432000 -0.744000 -0.850000 -0.375700 -0.243900 0.544000 0.616000 -0.552000 -0.800000 -0.401700 -0.291400 0.440000 0.456000 -0.760000 -0.829500 -0.351500 -0.243900 0.648000 0.640000 -0.400000 -0.800000 -0.351500 -0.277300 0.568000 0.408000 -0.704000 -0.800000 -0.328800 -0.243900 0.640000 0.656000 -0.384000 -0.800000 -0.328800 -0.243900 0.640000 0.656000 -0.384000 -1.000000 -0.503200 -0.182900 0.400000 0.704000 0.576000 -1.000000 -0.503200 -0.182900 0.400000 0.704000 0.576000 -0.998000 -0.502100 -0.182900 0.528000 0.664000 0.520000 -1.000000 -0.502100 -0.189300 0.760000 0.568000 0.296000 -1.000000 -0.502100 -0.189300 0.760000 0.568000 0.296000 --0.891000 -0.451900 -0.304800 0.528000 0.824000 -0.192000 --0.891000 -0.451900 -0.304800 0.528000 0.824000 -0.192000 --0.896800 -0.451900 -0.243900 0.600000 0.776000 0.136000 --0.850000 -0.473200 -0.304800 0.272000 0.896000 -0.336000 --0.850000 -0.480800 -0.243900 0.376000 0.912000 0.152000 --0.800000 -0.473000 -0.304800 -0.736000 0.648000 -0.168000 --0.800000 -0.496000 -0.243900 0.424000 0.840000 0.320000 --0.787800 -0.451900 -0.304800 -0.984000 0.136000 -0.040000 --0.769800 -0.451900 -0.243900 -0.952000 -0.080000 0.272000 --0.769800 -0.451900 -0.243900 -0.952000 -0.080000 0.272000 --0.900000 -0.551700 -0.243900 -0.808000 -0.568000 -0.120000 --0.900000 -0.551700 -0.243900 -0.808000 -0.568000 -0.120000 --0.900000 -0.539600 -0.304800 -0.720000 -0.488000 -0.480000 --0.899500 -0.552300 -0.243900 -0.800000 -0.592000 -0.072000 --0.891900 -0.552300 -0.304800 -0.800000 -0.568000 -0.136000 --0.851300 -0.602500 -0.243900 -0.680000 -0.720000 -0.008000 --0.850000 -0.602000 -0.304800 -0.640000 -0.736000 -0.184000 --0.850000 -0.602500 -0.285600 -0.672000 -0.728000 -0.024000 --0.849200 -0.602500 -0.304800 -0.536000 -0.720000 -0.432000 --0.850000 -0.603800 -0.243900 -0.656000 -0.744000 0.064000 --0.800000 -0.636000 -0.304800 -0.536000 -0.792000 -0.272000 --0.800000 -0.632800 -0.243900 -0.432000 -0.896000 0.072000 --0.750000 -0.652200 -0.304800 -0.040000 -0.952000 -0.288000 --0.750000 -0.646000 -0.243900 -0.088000 -0.984000 0.144000 --0.750000 -0.646000 -0.243900 -0.088000 -0.984000 0.144000 --0.850000 -0.603800 -0.243900 -0.656000 -0.744000 0.064000 --0.850000 -0.603800 -0.243900 -0.656000 -0.744000 0.064000 --0.850000 -0.602500 -0.285600 -0.672000 -0.728000 -0.024000 --0.851300 -0.602500 -0.243900 -0.680000 -0.720000 -0.008000 --0.851300 -0.602500 -0.243900 -0.680000 -0.720000 -0.008000 --0.800000 0.108800 -0.243900 0.352000 0.608000 -0.704000 --0.800000 0.108800 -0.243900 0.352000 0.608000 -0.704000 --0.800000 0.100400 -0.252800 0.360000 0.584000 -0.720000 --0.785800 0.100400 -0.243900 0.360000 0.584000 -0.720000 --0.785800 0.100400 -0.243900 0.360000 0.584000 -0.720000 --0.750000 0.077000 -0.243900 0.368000 0.552000 -0.744000 --0.750000 0.077000 -0.243900 0.368000 0.552000 -0.744000 --0.750000 0.050200 -0.267100 0.368000 0.432000 -0.816000 --0.711800 0.050200 -0.243900 0.416000 0.432000 -0.792000 --0.711800 0.050200 -0.243900 0.416000 0.432000 -0.792000 --0.731900 -0.150600 -0.304800 0.424000 0.400000 -0.808000 --0.731900 -0.150600 -0.304800 0.424000 0.400000 -0.808000 --0.700000 -0.175200 -0.304800 0.352000 0.528000 -0.768000 --0.700000 -0.150600 -0.284500 0.376000 0.392000 -0.832000 --0.700000 -0.150600 -0.284500 0.376000 0.392000 -0.832000 --0.650000 -0.200800 -0.303800 0.136000 0.680000 -0.712000 --0.650000 -0.200800 -0.303800 0.136000 0.680000 -0.712000 --0.651700 -0.200800 -0.304800 0.320000 0.544000 -0.768000 --0.650000 -0.201600 -0.304800 0.104000 0.688000 -0.704000 --0.700000 -0.200800 -0.326900 0.208000 0.528000 -0.816000 --0.650000 -0.251000 -0.354800 0.152000 0.632000 -0.752000 --0.700000 -0.251000 -0.364900 0.104000 0.560000 -0.816000 --0.650000 -0.261300 -0.365800 0.088000 0.568000 -0.808000 --0.700000 -0.252100 -0.365800 0.096000 0.552000 -0.824000 --0.700000 -0.251000 -0.364900 0.104000 0.560000 -0.816000 --0.707800 -0.251000 -0.365800 0.064000 0.432000 -0.896000 --0.700000 -0.200800 -0.326900 0.208000 0.528000 -0.816000 --0.750000 -0.240500 -0.365800 0.056000 0.272000 -0.952000 --0.750000 -0.200800 -0.348300 0.272000 0.384000 -0.872000 --0.800000 -0.234100 -0.365800 -0.112000 0.264000 -0.952000 --0.800000 -0.200800 -0.355700 0.080000 0.256000 -0.960000 --0.800000 -0.200800 -0.355700 0.080000 0.256000 -0.960000 --0.650000 -0.035200 -0.243900 0.544000 0.264000 -0.792000 --0.650000 -0.035200 -0.243900 0.544000 0.264000 -0.792000 --0.650000 -0.050200 -0.249300 0.496000 0.208000 -0.840000 --0.642900 -0.050200 -0.243900 0.560000 0.208000 -0.792000 --0.642900 -0.050200 -0.243900 0.560000 0.208000 -0.792000 --0.544700 -0.200800 -0.304800 -0.080000 0.824000 -0.552000 --0.544700 -0.200800 -0.304800 -0.080000 0.824000 -0.552000 --0.550000 -0.200800 -0.303600 -0.040000 0.880000 -0.464000 --0.550000 -0.201300 -0.304800 -0.032000 0.864000 -0.488000 --0.550000 -0.201300 -0.304800 -0.032000 0.864000 -0.488000 --0.354400 -0.100400 -0.243900 -0.584000 0.448000 -0.664000 --0.354400 -0.100400 -0.243900 -0.584000 0.448000 -0.664000 --0.350000 -0.100400 -0.248500 -0.576000 0.440000 -0.680000 --0.350000 -0.093900 -0.243900 -0.600000 0.408000 -0.680000 --0.350000 -0.093900 -0.243900 -0.600000 0.408000 -0.680000 --0.363900 -0.552300 -0.243900 0.816000 -0.480000 0.304000 --0.363900 -0.552300 -0.243900 0.816000 -0.480000 0.304000 --0.350000 -0.535600 -0.243900 0.360000 -0.840000 0.384000 --0.350000 -0.552300 -0.283400 -0.096000 -0.680000 0.720000 --0.317500 -0.552300 -0.243900 -0.600000 -0.648000 0.448000 --0.317500 -0.552300 -0.243900 -0.600000 -0.648000 0.448000 --0.300000 -0.050200 -0.270300 -0.824000 0.232000 -0.512000 --0.300000 -0.050200 -0.270300 -0.824000 0.232000 -0.512000 --0.266700 -0.050200 -0.304800 -0.504000 0.288000 -0.808000 --0.300000 -0.100400 -0.298100 -0.480000 0.288000 -0.824000 --0.288100 -0.100400 -0.304800 -0.408000 0.240000 -0.872000 --0.300000 -0.118900 -0.304800 -0.376000 0.264000 -0.880000 --0.300000 -0.118900 -0.304800 -0.376000 0.264000 -0.880000 --0.256000 -0.703000 -0.243900 0.696000 -0.392000 0.584000 --0.256000 -0.703000 -0.243900 0.696000 -0.392000 0.584000 --0.250000 -0.679700 -0.243900 0.728000 -0.208000 0.640000 --0.250000 -0.703000 -0.252700 0.704000 -0.368000 0.600000 --0.250000 -0.703000 -0.252700 0.704000 -0.368000 0.600000 --0.213400 0.000000 -0.304800 -0.304000 0.448000 -0.832000 --0.213400 0.000000 -0.304800 -0.304000 0.448000 -0.832000 --0.250000 0.000000 -0.286200 -0.320000 0.712000 -0.616000 --0.250000 -0.028200 -0.304800 -0.400000 0.416000 -0.808000 --0.250000 -0.028200 -0.304800 -0.400000 0.416000 -0.808000 --0.196100 -0.200800 -0.304800 0.360000 -0.200000 -0.904000 --0.196100 -0.200800 -0.304800 0.360000 -0.200000 -0.904000 --0.150000 -0.200800 -0.284500 0.024000 -0.216000 -0.968000 --0.150000 -0.159100 -0.304800 0.152000 -0.400000 -0.896000 --0.108400 -0.200800 -0.304800 -0.496000 -0.048000 -0.856000 --0.108400 -0.200800 -0.304800 -0.496000 -0.048000 -0.856000 --0.172800 -0.552300 -0.243900 0.592000 -0.568000 0.560000 --0.172800 -0.552300 -0.243900 0.592000 -0.568000 0.560000 --0.150000 -0.530700 -0.243900 0.632000 -0.664000 0.392000 --0.150000 -0.552300 -0.270100 0.544000 -0.504000 0.656000 --0.150000 -0.552300 -0.270100 0.544000 -0.504000 0.656000 --0.126800 0.150600 -0.243900 -0.208000 0.496000 -0.832000 --0.126800 0.150600 -0.243900 -0.208000 0.496000 -0.832000 --0.100000 0.150600 -0.251000 -0.024000 0.408000 -0.904000 --0.100000 0.164100 -0.243900 -0.032000 0.432000 -0.896000 --0.077600 0.150600 -0.243900 0.320000 0.328000 -0.880000 --0.077600 0.150600 -0.243900 0.320000 0.328000 -0.880000 --0.150000 0.100400 -0.267100 -0.312000 0.440000 -0.832000 --0.150000 0.100400 -0.267100 -0.312000 0.440000 -0.832000 --0.100000 0.100400 -0.276400 0.032000 0.376000 -0.920000 --0.150000 0.050200 -0.299600 -0.080000 0.408000 -0.904000 --0.100000 0.050200 -0.292200 0.304000 0.312000 -0.896000 --0.150000 0.040500 -0.304800 -0.136000 0.416000 -0.896000 --0.100000 0.022400 -0.304800 0.184000 0.304000 -0.928000 --0.150000 0.000000 -0.322200 0.064000 0.240000 -0.968000 --0.100000 0.000000 -0.309600 0.168000 0.152000 -0.968000 --0.150000 -0.050200 -0.328000 0.128000 0.064000 -0.984000 --0.100000 -0.050200 -0.318600 0.080000 0.144000 -0.984000 --0.150000 -0.100400 -0.338700 0.056000 -0.088000 -0.992000 --0.100000 -0.100400 -0.323700 -0.040000 -0.152000 -0.984000 --0.150000 -0.150600 -0.309500 -0.032000 -0.400000 -0.912000 --0.100000 -0.150600 -0.315000 -0.456000 -0.064000 -0.880000 --0.100000 -0.150600 -0.315000 -0.456000 -0.064000 -0.880000 --0.077600 0.000000 -0.304800 0.248000 0.344000 -0.896000 --0.077600 0.000000 -0.304800 0.248000 0.344000 -0.896000 --0.050000 -0.015100 -0.304800 0.280000 0.536000 -0.784000 --0.050000 0.000000 -0.288000 0.256000 0.560000 -0.776000 --0.050000 0.000000 -0.288000 0.256000 0.560000 -0.776000 --0.013800 -0.351500 -0.243900 0.552000 -0.808000 -0.168000 --0.013800 -0.351500 -0.243900 0.552000 -0.808000 -0.168000 --0.050000 -0.380500 -0.243900 0.664000 -0.736000 -0.104000 --0.026900 -0.351500 -0.304800 0.608000 -0.688000 -0.384000 --0.050000 -0.374600 -0.304800 0.584000 -0.672000 -0.448000 --0.050000 -0.351500 -0.336900 0.024000 -0.576000 -0.808000 --0.050000 -0.351500 -0.336900 0.024000 -0.576000 -0.808000 -0.050000 -0.050200 -0.279200 0.280000 0.320000 -0.896000 -0.050000 -0.050200 -0.279200 0.280000 0.320000 -0.896000 -0.004800 -0.050200 -0.304800 0.368000 0.176000 -0.904000 -0.050000 -0.100400 -0.298100 0.360000 0.248000 -0.896000 -0.039400 -0.100400 -0.304800 0.408000 0.224000 -0.880000 -0.039400 -0.100400 -0.304800 0.408000 0.224000 -0.880000 -0.113100 0.000000 -0.243900 -0.392000 0.768000 -0.496000 -0.113100 0.000000 -0.243900 -0.392000 0.768000 -0.496000 -0.150000 0.000000 -0.257100 -0.208000 0.552000 -0.800000 -0.150000 0.015400 -0.243900 -0.208000 0.728000 -0.640000 -0.150000 0.015400 -0.243900 -0.208000 0.728000 -0.640000 -0.200000 -0.100400 -0.298900 0.088000 0.040000 -0.992000 -0.200000 -0.100400 -0.298900 0.088000 0.040000 -0.992000 -0.185500 -0.100400 -0.304800 0.296000 0.104000 -0.944000 -0.200000 -0.139100 -0.304800 0.208000 0.104000 -0.968000 -0.150000 -0.100400 -0.322200 0.000000 0.224000 -0.968000 -0.200000 -0.150600 -0.306400 0.192000 0.112000 -0.968000 -0.150000 -0.150600 -0.323600 -0.232000 0.464000 -0.848000 -0.200000 -0.200800 -0.335700 -0.120000 0.200000 -0.968000 -0.150000 -0.200800 -0.325200 0.160000 0.176000 -0.968000 -0.200000 -0.251000 -0.346500 -0.184000 0.088000 -0.976000 -0.150000 -0.251000 -0.336000 0.080000 -0.336000 -0.928000 -0.150000 -0.251000 -0.336000 0.080000 -0.336000 -0.928000 -0.211400 -0.050200 -0.304800 0.152000 0.184000 -0.968000 -0.211400 -0.050200 -0.304800 0.152000 0.184000 -0.968000 -0.200000 -0.061600 -0.304800 0.000000 -0.144000 -0.984000 -0.250000 -0.050200 -0.297000 0.000000 0.040000 -0.992000 -0.200000 -0.100400 -0.298900 0.088000 0.040000 -0.992000 -0.250000 -0.100400 -0.298400 -0.088000 0.216000 -0.968000 -0.200000 -0.139100 -0.304800 0.208000 0.104000 -0.968000 -0.250000 -0.114900 -0.304800 -0.104000 0.280000 -0.952000 -0.200000 -0.150600 -0.306400 0.192000 0.112000 -0.968000 -0.250000 -0.150600 -0.317700 0.024000 0.336000 -0.936000 -0.200000 -0.200800 -0.335700 -0.120000 0.200000 -0.968000 -0.250000 -0.200800 -0.343100 0.104000 0.232000 -0.960000 -0.200000 -0.251000 -0.346500 -0.184000 0.088000 -0.976000 -0.250000 -0.251000 -0.353900 0.064000 0.384000 -0.920000 -0.250000 -0.251000 -0.353900 0.064000 0.384000 -0.920000 -0.250000 -0.050200 -0.297000 0.000000 0.040000 -0.992000 -0.250000 -0.050200 -0.297000 0.000000 0.040000 -0.992000 -0.266500 -0.050200 -0.304800 -0.280000 0.064000 -0.952000 -0.250000 -0.100400 -0.298400 -0.088000 0.216000 -0.968000 -0.278900 -0.100400 -0.304800 -0.176000 0.256000 -0.944000 -0.250000 -0.114900 -0.304800 -0.104000 0.280000 -0.952000 -0.250000 -0.114900 -0.304800 -0.104000 0.280000 -0.952000 -0.350000 -0.127600 -0.304800 0.032000 -0.600000 -0.792000 -0.350000 -0.127600 -0.304800 0.032000 -0.600000 -0.792000 -0.313400 -0.150600 -0.304800 0.400000 -0.360000 -0.840000 -0.350000 -0.150600 -0.283600 -0.064000 -0.424000 -0.896000 -0.320800 -0.200800 -0.304800 0.496000 0.328000 -0.800000 -0.350000 -0.200800 -0.271400 0.216000 0.224000 -0.944000 -0.350000 -0.228300 -0.304800 0.616000 0.528000 -0.576000 -0.350000 -0.228300 -0.304800 0.616000 0.528000 -0.576000 -0.300000 -0.357600 -0.243900 -0.288000 -0.920000 0.248000 -0.300000 -0.357600 -0.243900 -0.288000 -0.920000 0.248000 -0.343800 -0.401700 -0.243900 -0.728000 -0.584000 0.344000 -0.300000 -0.355300 -0.304800 -0.272000 -0.752000 -0.592000 -0.344100 -0.401700 -0.304800 -0.784000 -0.512000 -0.336000 -0.344100 -0.401700 -0.304800 -0.784000 -0.512000 -0.336000 -0.350000 -0.127600 -0.304800 0.032000 -0.600000 -0.792000 -0.350000 -0.127600 -0.304800 0.032000 -0.600000 -0.792000 -0.350000 -0.150600 -0.283600 -0.064000 -0.424000 -0.896000 -0.380400 -0.150600 -0.304800 -0.424000 -0.456000 -0.776000 -0.380400 -0.150600 -0.304800 -0.424000 -0.456000 -0.776000 -0.419200 0.050200 -0.304800 -0.224000 0.736000 -0.632000 -0.419200 0.050200 -0.304800 -0.224000 0.736000 -0.632000 -0.400000 0.050200 -0.294000 -0.352000 0.672000 -0.640000 -0.400000 0.041200 -0.304800 -0.352000 0.672000 -0.648000 -0.400000 0.041200 -0.304800 -0.352000 0.672000 -0.648000 -0.400000 -0.168700 -0.304800 -0.504000 -0.464000 -0.720000 -0.400000 -0.168700 -0.304800 -0.504000 -0.464000 -0.720000 -0.400000 -0.200800 -0.276700 0.448000 -0.472000 -0.752000 -0.424400 -0.200800 -0.304800 -0.552000 -0.520000 -0.648000 -0.400000 -0.249400 -0.243900 0.760000 -0.472000 -0.424000 -0.450000 -0.217600 -0.304800 -0.352000 -0.736000 -0.560000 -0.450000 -0.248400 -0.243900 -0.224000 -0.888000 -0.384000 -0.450000 -0.248400 -0.243900 -0.224000 -0.888000 -0.384000 -0.550000 -0.150600 -0.287800 0.352000 0.528000 -0.768000 -0.550000 -0.150600 -0.287800 0.352000 0.528000 -0.768000 -0.523400 -0.150600 -0.304800 0.376000 0.592000 -0.704000 -0.550000 -0.162200 -0.304800 0.376000 0.720000 -0.576000 -0.500000 -0.150600 -0.319100 0.336000 0.504000 -0.792000 -0.550000 -0.194000 -0.365800 0.224000 0.896000 -0.368000 -0.500000 -0.200800 -0.334200 -0.376000 -0.448000 -0.800000 -0.535800 -0.200800 -0.365800 -0.736000 0.208000 -0.632000 -0.500000 -0.222600 -0.304800 -0.320000 -0.704000 -0.624000 -0.550000 -0.216200 -0.365800 -0.080000 -0.576000 -0.808000 -0.535300 -0.251000 -0.304800 -0.648000 -0.480000 -0.576000 -0.550000 -0.251000 -0.326800 -0.648000 -0.504000 -0.560000 -0.550000 -0.216200 -0.365800 -0.080000 -0.576000 -0.808000 -0.573000 -0.251000 -0.365800 -0.696000 0.544000 -0.464000 -0.559600 -0.200800 -0.365800 0.680000 0.504000 -0.520000 -0.600000 -0.231600 -0.365800 0.072000 0.640000 -0.760000 -0.594200 -0.200800 -0.304800 0.544000 0.576000 -0.600000 -0.600000 -0.206100 -0.304800 0.488000 0.616000 -0.608000 -0.600000 -0.200800 -0.298700 0.448000 0.592000 -0.656000 -0.650000 -0.208600 -0.304800 0.024000 0.680000 -0.728000 -0.650000 -0.200800 -0.297000 0.088000 0.616000 -0.776000 -0.600000 -0.200800 -0.298700 0.448000 0.592000 -0.656000 -0.650000 -0.150600 -0.274900 0.544000 0.464000 -0.688000 -0.600000 -0.150600 -0.265200 0.248000 0.032000 -0.960000 -0.600000 -0.200800 -0.298700 0.448000 0.592000 -0.656000 -0.550000 -0.150600 -0.287800 0.352000 0.528000 -0.768000 -0.594200 -0.200800 -0.304800 0.544000 0.576000 -0.600000 -0.550000 -0.162200 -0.304800 0.376000 0.720000 -0.576000 -0.559600 -0.200800 -0.365800 0.680000 0.504000 -0.520000 -0.550000 -0.194000 -0.365800 0.224000 0.896000 -0.368000 -0.550000 -0.200800 -0.388300 0.280000 0.584000 -0.752000 -0.535800 -0.200800 -0.365800 -0.736000 0.208000 -0.632000 -0.550000 -0.216200 -0.365800 -0.080000 -0.576000 -0.808000 -0.550000 -0.200800 -0.388300 0.280000 0.584000 -0.752000 -0.559600 -0.200800 -0.365800 0.680000 0.504000 -0.520000 -0.559600 -0.200800 -0.365800 0.680000 0.504000 -0.520000 -0.500000 -0.222600 -0.304800 -0.320000 -0.704000 -0.624000 -0.500000 -0.222600 -0.304800 -0.320000 -0.704000 -0.624000 -0.500000 -0.251000 -0.264200 -0.272000 -0.744000 -0.600000 -0.535300 -0.251000 -0.304800 -0.648000 -0.480000 -0.576000 -0.535300 -0.251000 -0.304800 -0.648000 -0.480000 -0.576000 -0.800000 -0.401700 -0.291400 0.440000 0.456000 -0.760000 -0.800000 -0.401700 -0.291400 0.440000 0.456000 -0.760000 -0.800000 -0.418300 -0.304800 0.408000 0.496000 -0.760000 -0.850000 -0.401700 -0.268600 0.504000 0.432000 -0.744000 -0.837100 -0.451900 -0.304800 0.528000 0.264000 -0.800000 -0.850000 -0.451900 -0.293100 0.448000 0.248000 -0.848000 -0.800000 -0.493800 -0.304800 0.032000 -0.688000 -0.720000 -0.850000 -0.490600 -0.304800 0.216000 0.112000 -0.968000 -0.800000 -0.502100 -0.293400 -0.120000 -0.840000 -0.520000 -0.832800 -0.502100 -0.304800 -0.104000 -0.544000 -0.824000 -0.832800 -0.502100 -0.304800 -0.104000 -0.544000 -0.824000 -0.858900 0.050200 -0.243900 -0.424000 0.568000 -0.696000 -0.858900 0.050200 -0.243900 -0.424000 0.568000 -0.696000 -0.900000 0.050200 -0.268900 0.208000 0.672000 -0.696000 -0.900000 0.070800 -0.243900 -0.096000 0.744000 -0.656000 -0.900000 0.070800 -0.243900 -0.096000 0.744000 -0.656000 -0.981700 -0.050200 -0.304800 0.528000 0.432000 -0.720000 -0.981700 -0.050200 -0.304800 0.528000 0.432000 -0.720000 -1.000000 -0.073100 -0.304800 0.536000 0.424000 -0.720000 -1.000000 -0.050200 -0.288900 0.520000 0.432000 -0.728000 -1.000000 -0.050200 -0.288900 0.520000 0.432000 -0.728000 --0.900000 0.104600 -0.304800 0.304000 0.568000 -0.760000 --0.900000 0.104600 -0.304800 0.304000 0.568000 -0.760000 --0.900000 0.100400 -0.308600 0.312000 0.536000 -0.776000 --0.892300 0.100400 -0.304800 0.320000 0.536000 -0.776000 --0.892300 0.100400 -0.304800 0.320000 0.536000 -0.776000 --0.850000 -0.301200 -0.321900 -0.728000 -0.616000 -0.280000 --0.850000 -0.301200 -0.321900 -0.728000 -0.616000 -0.280000 --0.850000 -0.251000 -0.359600 -0.320000 0.248000 -0.912000 --0.826000 -0.301200 -0.365800 -0.648000 -0.448000 -0.600000 --0.828000 -0.251000 -0.365800 -0.248000 0.216000 -0.936000 --0.800000 -0.301200 -0.380800 -0.264000 0.104000 -0.952000 --0.800000 -0.251000 -0.370300 -0.064000 0.200000 -0.976000 --0.750000 -0.301200 -0.392900 -0.104000 0.352000 -0.928000 --0.750000 -0.251000 -0.369800 0.056000 0.280000 -0.952000 --0.750000 -0.251000 -0.369800 0.056000 0.280000 -0.952000 --0.800000 -0.066700 -0.304800 0.296000 0.144000 -0.936000 --0.800000 -0.066700 -0.304800 0.296000 0.144000 -0.936000 --0.800000 -0.100400 -0.313000 0.368000 0.216000 -0.896000 --0.785000 -0.100400 -0.304800 0.328000 0.224000 -0.912000 --0.785000 -0.100400 -0.304800 0.328000 0.224000 -0.912000 --0.750000 -0.129200 -0.304800 0.392000 0.376000 -0.832000 --0.750000 -0.129200 -0.304800 0.392000 0.376000 -0.832000 --0.750000 -0.150600 -0.317800 0.416000 0.384000 -0.816000 --0.731900 -0.150600 -0.304800 0.424000 0.400000 -0.808000 --0.731900 -0.150600 -0.304800 0.424000 0.400000 -0.808000 --0.576800 -0.251000 -0.365800 -0.136000 0.624000 -0.760000 --0.576800 -0.251000 -0.365800 -0.136000 0.624000 -0.760000 --0.600000 -0.251000 -0.360600 -0.120000 0.624000 -0.760000 --0.600000 -0.256300 -0.365800 -0.112000 0.608000 -0.776000 --0.600000 -0.256300 -0.365800 -0.112000 0.608000 -0.776000 --0.500000 -0.637800 -0.304800 -0.208000 -0.976000 -0.032000 --0.500000 -0.637800 -0.304800 -0.208000 -0.976000 -0.032000 --0.455200 -0.652700 -0.304800 -0.280000 -0.952000 0.040000 --0.500000 -0.633000 -0.365800 -0.088000 -0.968000 -0.200000 --0.450000 -0.652700 -0.319500 -0.256000 -0.952000 -0.136000 --0.450000 -0.645700 -0.365800 -0.144000 -0.904000 -0.392000 --0.405700 -0.652700 -0.365800 -0.144000 -0.920000 -0.344000 --0.405700 -0.652700 -0.365800 -0.144000 -0.920000 -0.344000 --0.350000 -0.585900 -0.365800 0.168000 -0.792000 -0.576000 --0.350000 -0.585900 -0.365800 0.168000 -0.792000 -0.576000 --0.350000 -0.594300 -0.304800 0.520000 -0.800000 0.280000 --0.357100 -0.602500 -0.365800 0.904000 0.256000 -0.312000 --0.351600 -0.602500 -0.304800 0.944000 0.304000 0.024000 --0.350000 -0.629600 -0.365800 0.056000 0.640000 -0.760000 --0.350000 -0.605300 -0.304800 0.248000 0.960000 -0.032000 --0.328400 -0.602500 -0.365800 -0.832000 -0.248000 -0.488000 --0.344900 -0.602500 -0.304800 -0.744000 0.664000 -0.032000 --0.350000 -0.585900 -0.365800 0.168000 -0.792000 -0.576000 --0.350000 -0.594300 -0.304800 0.520000 -0.800000 0.280000 --0.350000 -0.594300 -0.304800 0.520000 -0.800000 0.280000 --0.350000 -0.747900 -0.304800 -0.512000 -0.832000 -0.184000 --0.350000 -0.747900 -0.304800 -0.512000 -0.832000 -0.184000 --0.350000 -0.703000 -0.357000 -0.336000 -0.496000 -0.792000 --0.371300 -0.703000 -0.304800 -0.816000 -0.552000 -0.144000 --0.371300 -0.703000 -0.304800 -0.816000 -0.552000 -0.144000 --0.331500 -0.150600 -0.304800 -0.256000 0.464000 -0.840000 --0.331500 -0.150600 -0.304800 -0.256000 0.464000 -0.840000 --0.300000 -0.150600 -0.319300 -0.256000 0.480000 -0.832000 --0.300000 -0.118900 -0.304800 -0.376000 0.264000 -0.880000 --0.300000 -0.118900 -0.304800 -0.376000 0.264000 -0.880000 --0.250000 -0.639500 -0.365800 0.216000 -0.224000 -0.944000 --0.250000 -0.639500 -0.365800 0.216000 -0.224000 -0.944000 --0.282800 -0.652700 -0.365800 0.080000 -0.160000 -0.976000 --0.250000 -0.652700 -0.361600 0.240000 -0.216000 -0.944000 --0.250000 -0.652700 -0.361600 0.240000 -0.216000 -0.944000 --0.250000 -0.150600 -0.327500 -0.120000 0.152000 -0.976000 --0.250000 -0.150600 -0.327500 -0.120000 0.152000 -0.976000 --0.200000 -0.150600 -0.333300 0.216000 -0.272000 -0.936000 --0.250000 -0.200800 -0.333200 0.168000 0.080000 -0.976000 --0.200000 -0.200800 -0.306700 0.368000 -0.184000 -0.904000 --0.250000 -0.251000 -0.337900 0.384000 0.112000 -0.912000 --0.200000 -0.251000 -0.307600 0.408000 0.096000 -0.904000 --0.250000 -0.301200 -0.349000 0.296000 0.272000 -0.912000 --0.200000 -0.301200 -0.313400 0.328000 0.152000 -0.928000 --0.200000 -0.301200 -0.313400 0.328000 0.152000 -0.928000 --0.200000 -0.602500 -0.345500 0.488000 -0.272000 -0.824000 --0.200000 -0.602500 -0.345500 0.488000 -0.272000 -0.824000 --0.200000 -0.558000 -0.365800 0.448000 -0.240000 -0.856000 --0.229500 -0.602500 -0.365800 0.408000 -0.240000 -0.872000 --0.200000 -0.552300 -0.367100 0.360000 -0.232000 -0.896000 --0.250000 -0.602500 -0.376000 0.360000 -0.328000 -0.872000 --0.250000 -0.552300 -0.402600 0.504000 -0.312000 -0.792000 --0.250000 -0.552300 -0.402600 0.504000 -0.312000 -0.792000 --0.150000 -0.602500 -0.307600 0.456000 -0.280000 -0.840000 --0.150000 -0.602500 -0.307600 0.456000 -0.280000 -0.840000 --0.150000 -0.552300 -0.337600 0.424000 -0.304000 -0.840000 --0.200000 -0.602500 -0.345500 0.488000 -0.272000 -0.824000 --0.196100 -0.552300 -0.365800 0.320000 -0.272000 -0.904000 --0.200000 -0.558000 -0.365800 0.448000 -0.240000 -0.856000 --0.200000 -0.552300 -0.367100 0.360000 -0.232000 -0.896000 --0.200000 -0.552300 -0.367100 0.360000 -0.232000 -0.896000 --0.147100 -0.502100 -0.365800 0.472000 -0.192000 -0.848000 --0.147100 -0.502100 -0.365800 0.472000 -0.192000 -0.848000 --0.145700 -0.451900 -0.365800 0.464000 0.040000 -0.880000 --0.100000 -0.502100 -0.325200 0.520000 -0.368000 -0.760000 --0.100000 -0.451900 -0.336100 0.496000 -0.048000 -0.856000 --0.074100 -0.502100 -0.304800 0.864000 -0.480000 0.112000 --0.061500 -0.451900 -0.304800 0.928000 -0.352000 0.088000 --0.061500 -0.451900 -0.304800 0.928000 -0.352000 0.088000 --0.100000 -0.200800 -0.311700 -0.496000 0.128000 -0.856000 --0.100000 -0.200800 -0.311700 -0.496000 0.128000 -0.856000 --0.050000 -0.200800 -0.320900 -0.056000 0.280000 -0.952000 --0.100000 -0.251000 -0.333700 -0.512000 0.248000 -0.816000 --0.050000 -0.251000 -0.364300 -0.216000 0.352000 -0.904000 --0.100000 -0.301200 -0.349000 -0.368000 0.264000 -0.888000 --0.050000 -0.266900 -0.365800 -0.288000 0.088000 -0.944000 --0.058500 -0.301200 -0.365800 -0.384000 -0.288000 -0.872000 --0.050000 -0.301200 -0.370400 -0.392000 -0.264000 -0.872000 --0.050000 -0.309800 -0.365800 -0.336000 -0.416000 -0.840000 --0.058500 -0.301200 -0.365800 -0.384000 -0.288000 -0.872000 --0.050000 -0.351500 -0.336900 0.024000 -0.576000 -0.808000 --0.100000 -0.301200 -0.349000 -0.368000 0.264000 -0.888000 --0.100000 -0.351500 -0.338800 0.024000 -0.312000 -0.944000 --0.100000 -0.351500 -0.338800 0.024000 -0.312000 -0.944000 -0.050000 -0.119800 -0.304800 0.416000 0.264000 -0.864000 -0.050000 -0.119800 -0.304800 0.416000 0.264000 -0.864000 -0.050000 -0.150600 -0.318000 0.352000 0.312000 -0.872000 -0.096000 -0.150600 -0.304800 0.176000 0.336000 -0.920000 -0.096000 -0.150600 -0.304800 0.176000 0.336000 -0.920000 -0.301400 0.000000 -0.304800 -0.584000 0.656000 -0.464000 -0.301400 0.000000 -0.304800 -0.584000 0.656000 -0.464000 -0.350000 0.000000 -0.339100 -0.264000 0.552000 -0.784000 -0.350000 0.024300 -0.304800 -0.456000 0.784000 -0.408000 -0.400000 0.000000 -0.343200 -0.216000 0.592000 -0.768000 -0.400000 0.041200 -0.304800 -0.352000 0.672000 -0.648000 -0.400000 0.041200 -0.304800 -0.352000 0.672000 -0.648000 -0.383500 -0.050200 -0.365800 0.200000 -0.288000 -0.928000 -0.383500 -0.050200 -0.365800 0.200000 -0.288000 -0.928000 -0.400000 -0.050200 -0.360800 0.184000 -0.432000 -0.872000 -0.350000 -0.037900 -0.365800 -0.440000 0.432000 -0.776000 -0.400000 0.000000 -0.343200 -0.216000 0.592000 -0.768000 -0.350000 0.000000 -0.339100 -0.264000 0.552000 -0.784000 -0.350000 0.000000 -0.339100 -0.264000 0.552000 -0.784000 -0.355700 -0.351500 -0.365800 0.360000 -0.072000 -0.928000 -0.355700 -0.351500 -0.365800 0.360000 -0.072000 -0.928000 -0.400000 -0.351500 -0.338800 0.360000 -0.568000 -0.728000 -0.350000 -0.334300 -0.365800 -0.304000 0.096000 -0.944000 -0.400000 -0.301200 -0.307300 0.704000 0.496000 -0.496000 -0.350000 -0.301200 -0.360500 0.376000 0.184000 -0.904000 -0.350000 -0.301200 -0.360500 0.376000 0.184000 -0.904000 -0.376800 -0.401700 -0.304800 0.336000 -0.848000 -0.392000 -0.376800 -0.401700 -0.304800 0.336000 -0.848000 -0.392000 -0.350000 -0.401700 -0.317400 -0.608000 -0.560000 -0.544000 -0.350000 -0.410700 -0.304800 -0.592000 -0.664000 -0.440000 -0.350000 -0.410700 -0.304800 -0.592000 -0.664000 -0.440000 -0.400000 -0.050200 -0.360800 0.184000 -0.432000 -0.872000 -0.400000 -0.050200 -0.360800 0.184000 -0.432000 -0.872000 -0.450000 -0.050200 -0.325200 -0.120000 -0.568000 -0.808000 -0.400000 -0.100400 -0.340000 -0.040000 -0.360000 -0.928000 -0.450000 -0.100400 -0.322200 0.392000 -0.360000 -0.840000 -0.400000 -0.150600 -0.318400 -0.432000 -0.416000 -0.792000 -0.450000 -0.150600 -0.321300 -0.008000 0.120000 -0.992000 -0.400000 -0.168700 -0.304800 -0.504000 -0.464000 -0.720000 -0.450000 -0.200800 -0.331300 -0.472000 -0.400000 -0.776000 -0.424400 -0.200800 -0.304800 -0.552000 -0.520000 -0.648000 -0.450000 -0.217600 -0.304800 -0.352000 -0.736000 -0.560000 -0.450000 -0.217600 -0.304800 -0.352000 -0.736000 -0.560000 -0.450000 0.055500 -0.304800 0.064000 0.864000 -0.496000 -0.450000 0.055500 -0.304800 0.064000 0.864000 -0.496000 -0.450000 0.050200 -0.314200 0.064000 0.744000 -0.656000 -0.496000 0.050200 -0.304800 0.104000 0.800000 -0.576000 -0.496000 0.050200 -0.304800 0.104000 0.800000 -0.576000 -0.500000 -0.333600 -0.304800 -0.408000 0.824000 -0.376000 -0.500000 -0.333600 -0.304800 -0.408000 0.824000 -0.376000 -0.458900 -0.351500 -0.304800 -0.472000 0.360000 -0.792000 -0.500000 -0.351500 -0.354900 -0.384000 -0.472000 -0.784000 -0.500000 -0.400200 -0.304800 -0.176000 -0.672000 -0.712000 -0.500000 -0.400200 -0.304800 -0.176000 -0.672000 -0.712000 -0.450000 -0.380500 -0.304800 -0.144000 0.256000 -0.952000 -0.450000 -0.380500 -0.304800 -0.144000 0.256000 -0.952000 -0.450000 -0.401700 -0.316200 -0.184000 -0.360000 -0.904000 -0.492100 -0.401700 -0.304800 0.152000 -0.576000 -0.792000 -0.492100 -0.401700 -0.304800 0.152000 -0.576000 -0.792000 -0.500000 -0.127100 -0.304800 0.480000 0.456000 -0.744000 -0.500000 -0.127100 -0.304800 0.480000 0.456000 -0.744000 -0.500000 -0.150600 -0.319100 0.336000 0.504000 -0.792000 -0.523400 -0.150600 -0.304800 0.376000 0.592000 -0.704000 -0.523400 -0.150600 -0.304800 0.376000 0.592000 -0.704000 -0.600000 -0.086300 -0.304800 0.440000 0.312000 -0.832000 -0.600000 -0.086300 -0.304800 0.440000 0.312000 -0.832000 -0.589400 -0.100400 -0.304800 -0.440000 -0.424000 -0.784000 -0.600000 -0.100400 -0.312700 0.376000 -0.472000 -0.792000 -0.600000 -0.105700 -0.304800 0.312000 -0.728000 -0.600000 -0.604900 -0.100400 -0.304800 0.744000 -0.360000 -0.552000 -0.600000 -0.100400 -0.312700 0.376000 -0.472000 -0.792000 -0.600000 -0.086300 -0.304800 0.440000 0.312000 -0.832000 -0.600000 -0.086300 -0.304800 0.440000 0.312000 -0.832000 -0.600000 -0.206100 -0.304800 0.488000 0.616000 -0.608000 -0.600000 -0.206100 -0.304800 0.488000 0.616000 -0.608000 -0.650000 -0.208600 -0.304800 0.024000 0.680000 -0.728000 -0.600000 -0.231600 -0.365800 0.072000 0.640000 -0.760000 -0.650000 -0.245700 -0.365800 0.168000 0.856000 -0.480000 -0.600000 -0.249700 -0.426800 -0.344000 0.872000 -0.328000 -0.650000 -0.251000 -0.378600 0.328000 0.752000 -0.560000 -0.604800 -0.251000 -0.426800 0.544000 0.248000 -0.792000 -0.650000 -0.267900 -0.365800 0.280000 -0.440000 -0.848000 -0.600000 -0.252700 -0.426800 -0.416000 -0.736000 -0.520000 -0.600000 -0.288400 -0.365800 -0.376000 -0.712000 -0.584000 -0.598300 -0.251000 -0.426800 -0.848000 0.144000 -0.496000 -0.573000 -0.251000 -0.365800 -0.696000 0.544000 -0.464000 -0.600000 -0.249700 -0.426800 -0.344000 0.872000 -0.328000 -0.600000 -0.231600 -0.365800 0.072000 0.640000 -0.760000 -0.600000 -0.231600 -0.365800 0.072000 0.640000 -0.760000 -0.700000 -0.211400 -0.304800 0.288000 0.624000 -0.720000 -0.700000 -0.211400 -0.304800 0.288000 0.624000 -0.720000 -0.700000 -0.251000 -0.357800 0.296000 0.496000 -0.808000 -0.728900 -0.251000 -0.304800 0.720000 0.440000 -0.528000 -0.700000 -0.301200 -0.354900 0.160000 -0.240000 -0.952000 -0.744500 -0.301200 -0.304800 0.640000 0.104000 -0.760000 -0.744500 -0.301200 -0.304800 0.640000 0.104000 -0.760000 -0.750000 -0.334300 -0.304800 0.512000 0.112000 -0.840000 -0.750000 -0.334300 -0.304800 0.512000 0.112000 -0.840000 -0.750000 -0.351500 -0.307800 0.512000 0.128000 -0.840000 -0.754800 -0.351500 -0.304800 0.424000 0.136000 -0.888000 -0.750000 -0.401700 -0.321600 0.336000 0.000000 -0.936000 -0.779200 -0.401700 -0.304800 0.400000 0.336000 -0.848000 -0.779200 -0.401700 -0.304800 0.400000 0.336000 -0.848000 -0.800000 -0.418300 -0.304800 0.408000 0.496000 -0.760000 -0.800000 -0.418300 -0.304800 0.408000 0.496000 -0.760000 -0.800000 -0.451900 -0.330300 0.328000 0.200000 -0.920000 -0.837100 -0.451900 -0.304800 0.528000 0.264000 -0.800000 -0.800000 -0.493800 -0.304800 0.032000 -0.688000 -0.720000 -0.800000 -0.493800 -0.304800 0.032000 -0.688000 -0.720000 -0.856800 -0.502100 -0.304800 0.288000 0.144000 -0.944000 -0.856800 -0.502100 -0.304800 0.288000 0.144000 -0.944000 -0.850000 -0.502100 -0.307100 0.032000 -0.240000 -0.968000 -0.850000 -0.504700 -0.304800 -0.096000 -0.664000 -0.736000 -0.850000 -0.504700 -0.304800 -0.096000 -0.664000 -0.736000 -0.900000 0.016700 -0.304800 -0.152000 0.720000 -0.664000 -0.900000 0.016700 -0.304800 -0.152000 0.720000 -0.664000 -0.900000 0.000000 -0.329500 -0.080000 0.648000 -0.744000 -0.927400 0.000000 -0.304800 0.400000 0.560000 -0.720000 -0.927400 0.000000 -0.304800 0.400000 0.560000 -0.720000 --0.850000 -0.496800 -0.365800 -0.176000 0.616000 -0.760000 --0.850000 -0.496800 -0.365800 -0.176000 0.616000 -0.760000 --0.864000 -0.502100 -0.365800 -0.304000 0.480000 -0.816000 --0.850000 -0.502100 -0.370900 -0.184000 0.560000 -0.800000 --0.860100 -0.552300 -0.365800 -0.680000 -0.432000 -0.584000 --0.850000 -0.552300 -0.378600 -0.568000 -0.344000 -0.736000 --0.850000 -0.564700 -0.365800 -0.608000 -0.528000 -0.584000 --0.800000 -0.552300 -0.401000 -0.552000 -0.288000 -0.776000 --0.806700 -0.602500 -0.365800 -0.520000 -0.656000 -0.536000 --0.800000 -0.602500 -0.372400 -0.488000 -0.592000 -0.624000 --0.800000 -0.607700 -0.365800 -0.488000 -0.640000 -0.584000 --0.750000 -0.602500 -0.401000 -0.336000 -0.696000 -0.624000 --0.750000 -0.628000 -0.365800 -0.232000 -0.808000 -0.528000 --0.714100 -0.602500 -0.426800 -0.368000 -0.680000 -0.624000 --0.700000 -0.639000 -0.365800 -0.040000 -0.920000 -0.376000 --0.700000 -0.609100 -0.426800 -0.336000 -0.744000 -0.568000 --0.650000 -0.641900 -0.365800 -0.024000 -0.952000 -0.280000 --0.650000 -0.621300 -0.426800 -0.080000 -0.904000 -0.400000 --0.650000 -0.621300 -0.426800 -0.080000 -0.904000 -0.400000 --0.850000 -0.496800 -0.365800 -0.176000 0.616000 -0.760000 --0.850000 -0.496800 -0.365800 -0.176000 0.616000 -0.760000 --0.800000 -0.496400 -0.365800 -0.664000 0.416000 -0.608000 --0.850000 -0.502100 -0.370900 -0.184000 0.560000 -0.800000 --0.800000 -0.502100 -0.369300 -0.768000 0.256000 -0.576000 --0.850000 -0.552300 -0.378600 -0.568000 -0.344000 -0.736000 --0.800000 -0.552300 -0.401000 -0.552000 -0.288000 -0.776000 --0.800000 -0.502100 -0.369300 -0.768000 0.256000 -0.576000 --0.750000 -0.552300 -0.422100 -0.552000 -0.096000 -0.824000 --0.750000 -0.502100 -0.424900 -0.848000 -0.112000 -0.512000 --0.744500 -0.552300 -0.426800 -0.560000 -0.080000 -0.816000 --0.748800 -0.502100 -0.426800 -0.584000 -0.048000 -0.800000 --0.750000 -0.502100 -0.424900 -0.848000 -0.112000 -0.512000 --0.750000 -0.498100 -0.426800 -0.864000 -0.184000 -0.448000 --0.800000 -0.502100 -0.369300 -0.768000 0.256000 -0.576000 --0.764100 -0.451900 -0.426800 -0.880000 -0.256000 -0.384000 --0.800000 -0.496400 -0.365800 -0.664000 0.416000 -0.608000 --0.786000 -0.451900 -0.365800 -0.872000 0.080000 -0.472000 --0.764100 -0.451900 -0.426800 -0.880000 -0.256000 -0.384000 --0.796500 -0.401700 -0.365800 -0.952000 -0.168000 -0.232000 --0.777800 -0.401700 -0.426800 -0.928000 0.040000 -0.360000 --0.777800 -0.401700 -0.426800 -0.928000 0.040000 -0.360000 --0.800000 -0.602500 -0.372400 -0.488000 -0.592000 -0.624000 --0.800000 -0.602500 -0.372400 -0.488000 -0.592000 -0.624000 --0.800000 -0.552300 -0.401000 -0.552000 -0.288000 -0.776000 --0.750000 -0.602500 -0.401000 -0.336000 -0.696000 -0.624000 --0.750000 -0.552300 -0.422100 -0.552000 -0.096000 -0.824000 --0.714100 -0.602500 -0.426800 -0.368000 -0.680000 -0.624000 --0.744500 -0.552300 -0.426800 -0.560000 -0.080000 -0.816000 --0.744500 -0.552300 -0.426800 -0.560000 -0.080000 -0.816000 --0.350000 -0.248400 -0.365800 0.184000 0.424000 -0.880000 --0.350000 -0.248400 -0.365800 0.184000 0.424000 -0.880000 --0.350000 -0.251000 -0.367200 0.240000 0.168000 -0.952000 --0.345700 -0.251000 -0.365800 0.320000 0.336000 -0.880000 --0.345700 -0.251000 -0.365800 0.320000 0.336000 -0.880000 --0.250000 -0.342900 -0.365800 0.504000 0.512000 -0.680000 --0.250000 -0.342900 -0.365800 0.504000 0.512000 -0.680000 --0.250000 -0.351500 -0.379700 0.552000 0.712000 -0.416000 --0.241400 -0.351500 -0.365800 0.488000 0.640000 -0.576000 --0.241400 -0.351500 -0.365800 0.488000 0.640000 -0.576000 --0.200000 -0.365300 -0.365800 0.504000 0.768000 -0.376000 --0.200000 -0.365300 -0.365800 0.504000 0.768000 -0.376000 --0.200000 -0.393200 -0.426800 0.696000 0.632000 -0.328000 --0.151700 -0.401700 -0.365800 0.568000 0.104000 -0.808000 --0.194300 -0.401700 -0.426800 0.792000 0.416000 -0.432000 --0.194300 -0.401700 -0.426800 0.792000 0.416000 -0.432000 --0.044700 -0.251000 -0.365800 -0.216000 0.376000 -0.896000 --0.044700 -0.251000 -0.365800 -0.216000 0.376000 -0.896000 -0.000000 -0.251000 -0.386300 -0.352000 0.496000 -0.792000 -0.000000 -0.238800 -0.365800 -0.192000 0.648000 -0.728000 -0.000000 -0.238800 -0.365800 -0.192000 0.648000 -0.728000 -0.100000 -0.224900 -0.365800 0.352000 0.456000 -0.808000 -0.100000 -0.224900 -0.365800 0.352000 0.456000 -0.808000 -0.100000 -0.251000 -0.380100 0.472000 -0.384000 -0.784000 -0.118000 -0.251000 -0.365800 0.536000 -0.224000 -0.808000 -0.100000 -0.263400 -0.365800 0.480000 -0.672000 -0.544000 -0.100000 -0.263400 -0.365800 0.480000 -0.672000 -0.544000 -0.350000 -0.354600 -0.365800 -0.264000 -0.632000 -0.720000 -0.350000 -0.354600 -0.365800 -0.264000 -0.632000 -0.720000 -0.350000 -0.351500 -0.368100 -0.440000 0.096000 -0.888000 -0.348000 -0.351500 -0.365800 -0.720000 -0.032000 -0.680000 -0.348000 -0.351500 -0.365800 -0.720000 -0.032000 -0.680000 -0.450000 0.007700 -0.365800 -0.264000 0.744000 -0.600000 -0.450000 0.007700 -0.365800 -0.264000 0.744000 -0.600000 -0.431500 0.000000 -0.365800 -0.424000 0.312000 -0.840000 -0.450000 0.000000 -0.377000 -0.360000 0.400000 -0.840000 -0.450000 -0.014200 -0.365800 -0.336000 -0.568000 -0.744000 -0.450000 -0.014200 -0.365800 -0.336000 -0.568000 -0.744000 -0.650000 -0.245700 -0.365800 0.168000 0.856000 -0.480000 -0.650000 -0.245700 -0.365800 0.168000 0.856000 -0.480000 -0.650000 -0.251000 -0.378600 0.328000 0.752000 -0.560000 -0.678000 -0.251000 -0.365800 0.264000 0.520000 -0.808000 -0.650000 -0.267900 -0.365800 0.280000 -0.440000 -0.848000 diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/lodbias.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/lodbias.c deleted file mode 100644 index a4db22e26e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/lodbias.c +++ /dev/null @@ -1,282 +0,0 @@ -/* - * GL_EXT_texture_lod_bias demo - * - * Thanks to Michael Vance for implementing this extension in Mesa. - * - * Brian Paul - * 20 March 2000 - * - * Copyright (C) 2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include -#include -#include -#include -#include -#include - -#include "readtex.h" - -#define TEXTURE_FILE "../images/girl.rgb" - -static GLfloat Xrot = 0, Yrot = -30, Zrot = 0; -static GLboolean Anim = GL_TRUE; -static GLint Bias = 0, BiasStepSign = +1; /* ints avoid fp precision problem */ -static GLint BiasMin = -400, BiasMax = 400; - - - -static void -PrintString(const char *s) -{ - while (*s) { - glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s); - s++; - } -} - -static void Idle( void ) -{ - static int lastTime = 0; - int time = glutGet(GLUT_ELAPSED_TIME); - int step; - - if (lastTime == 0) - lastTime = time; - else if (time - lastTime < 10) - return; - - step = (time - lastTime) / 10 * BiasStepSign; - lastTime = time; - - Bias += step; - if (Bias < BiasMin) { - Bias = BiasMin; - BiasStepSign = +1; - } - else if (Bias > BiasMax) { - Bias = BiasMax; - BiasStepSign = -1; - } - - glutPostRedisplay(); -} - - -static void Display( void ) -{ - char str[100]; - - glClear( GL_COLOR_BUFFER_BIT ); - - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho(-1, 1, -1, 1, -1, 1); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - - glDisable(GL_TEXTURE_2D); - glColor3f(1,1,1); - glRasterPos3f(-0.9, -0.9, 0.0); - sprintf(str, "Texture LOD Bias = %4.1f", Bias * 0.01); - PrintString(str); - - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -8.0 ); - - glPushMatrix(); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - glRotatef(Zrot, 0, 0, 1); - - glEnable(GL_TEXTURE_2D); - glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, 0.01 * Bias); - - glBegin(GL_POLYGON); - glTexCoord2f(0, 0); glVertex2f(-1, -1); - glTexCoord2f(2, 0); glVertex2f( 1, -1); - glTexCoord2f(2, 2); glVertex2f( 1, 1); - glTexCoord2f(0, 2); glVertex2f(-1, 1); - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 'z': - Zrot -= step; - break; - case 'Z': - Zrot += step; - break; - case 'b': - Bias -= 10; - break; - case 'B': - Bias += 10; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - Xrot -= step; - break; - case GLUT_KEY_DOWN: - Xrot += step; - break; - case GLUT_KEY_LEFT: - Yrot -= step; - break; - case GLUT_KEY_RIGHT: - Yrot += step; - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - GLfloat maxBias; - - if (!glutExtensionSupported("GL_EXT_texture_lod_bias")) { - printf("Sorry, GL_EXT_texture_lod_bias not supported by this renderer.\n"); - exit(1); - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - if (glutExtensionSupported("GL_SGIS_generate_mipmap")) { - /* test auto mipmap generation */ - GLint width, height, i; - GLenum format; - GLubyte *image = LoadRGBImage(TEXTURE_FILE, &width, &height, &format); - if (!image) { - printf("Error: could not load texture image %s\n", TEXTURE_FILE); - exit(1); - } - /* resize to 256 x 256 */ - if (width != 256 || height != 256) { - GLubyte *newImage = malloc(256 * 256 * 4); - gluScaleImage(format, width, height, GL_UNSIGNED_BYTE, image, - 256, 256, GL_UNSIGNED_BYTE, newImage); - free(image); - image = newImage; - } - printf("Using GL_SGIS_generate_mipmap\n"); - glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE); - glTexImage2D(GL_TEXTURE_2D, 0, format, 256, 256, 0, - format, GL_UNSIGNED_BYTE, image); - free(image); - - /* make sure mipmap was really generated correctly */ - width = height = 256; - for (i = 0; i < 9; i++) { - GLint w, h; - glGetTexLevelParameteriv(GL_TEXTURE_2D, i, GL_TEXTURE_WIDTH, &w); - glGetTexLevelParameteriv(GL_TEXTURE_2D, i, GL_TEXTURE_HEIGHT, &h); - printf("Level %d size: %d x %d\n", i, w, h); - assert(w == width); - assert(h == height); - width /= 2; - height /= 2; - } - - } - else if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) { - printf("Error: could not load texture image %s\n", TEXTURE_FILE); - exit(1); - } - - /* mipmapping required for this extension */ - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - - glGetFloatv(GL_MAX_TEXTURE_LOD_BIAS_EXT, &maxBias); - printf("LOD bias range: [%g, %g]\n", -maxBias, maxBias); - BiasMin = -100 * maxBias; - BiasMax = 100 * maxBias; - - /* Since we have (about) 8 mipmap levels, no need to bias beyond - * the range [-1, +8]. - */ - if (BiasMin < -100) - BiasMin = -100; - if (BiasMax > 800) - BiasMax = 800; -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 350, 350 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - if (Anim) - glutIdleFunc(Idle); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/morph3d.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/morph3d.c deleted file mode 100644 index 047d571c70..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/morph3d.c +++ /dev/null @@ -1,886 +0,0 @@ - -/*- - * morph3d.c - Shows 3D morphing objects - * - * Converted to GLUT by brianp on 1/1/98 - * - * This program was inspired on a WindowsNT(R)'s screen saver. It was written - * from scratch and it was not based on any other source code. - * - * Porting it to xlock (the final objective of this code since the moment I - * decided to create it) was possible by comparing the original Mesa's gear - * demo with it's ported version, so thanks for Danny Sung for his indirect - * help (look at gear.c in xlock source tree). NOTE: At the moment this code - * was sent to Brian Paul for package inclusion, the XLock Version was not - * available. In fact, I'll wait it to appear on the next Mesa release (If you - * are reading this, it means THIS release) to send it for xlock package - * inclusion). It will probably there be a GLUT version too. - * - * Thanks goes also to Brian Paul for making it possible and inexpensive - * to use OpenGL at home. - * - * Since I'm not a native english speaker, my apologies for any gramatical - * mistake. - * - * My e-mail addresses are - * - * vianna@cat.cbpf.br - * and - * marcelo@venus.rdc.puc-rio.br - * - * Marcelo F. Vianna (Feb-13-1997) - */ - -/* -This document is VERY incomplete, but tries to describe the mathematics used -in the program. At this moment it just describes how the polyhedra are -generated. On futhurer versions, this document will be probabbly improved. - -Since I'm not a native english speaker, my apologies for any gramatical -mistake. - -Marcelo Fernandes Vianna -- Undergraduate in Computer Engeneering at Catholic Pontifical University -- of Rio de Janeiro (PUC-Rio) Brasil. -- e-mail: vianna@cat.cbpf.br or marcelo@venus.rdc.puc-rio.br -- Feb-13-1997 - -POLYHEDRA GENERATION - -For the purpose of this program it's not sufficient to know the polyhedra -vertexes coordinates. Since the morphing algorithm applies a nonlinear -transformation over the surfaces (faces) of the polyhedron, each face has -to be divided into smaller ones. The morphing algorithm needs to transform -each vertex of these smaller faces individually. It's a very time consoming -task. - -In order to reduce calculation overload, and since all the macro faces of -the polyhedron are transformed by the same way, the generation is made by -creating only one face of the polyhedron, morphing it and then rotating it -around the polyhedron center. - -What we need to know is the face radius of the polyhedron (the radius of -the inscribed sphere) and the angle between the center of two adjacent -faces using the center of the sphere as the angle's vertex. - -The face radius of the regular polyhedra are known values which I decided -to not waste my time calculating. Following is a table of face radius for -the regular polyhedra with edge length = 1: - - TETRAHEDRON : 1/(2*sqrt(2))/sqrt(3) - CUBE : 1/2 - OCTAHEDRON : 1/sqrt(6) - DODECAHEDRON : T^2 * sqrt((T+2)/5) / 2 -> where T=(sqrt(5)+1)/2 - ICOSAHEDRON : (3*sqrt(3)+sqrt(15))/12 - -I've not found any reference about the mentioned angles, so I needed to -calculate them, not a trivial task until I figured out how :) -Curiously these angles are the same for the tetrahedron and octahedron. -A way to obtain this value is inscribing the tetrahedron inside the cube -by matching their vertexes. So you'll notice that the remaining unmatched -vertexes are in the same straight line starting in the cube/tetrahedron -center and crossing the center of each tetrahedron's face. At this point -it's easy to obtain the bigger angle of the isosceles triangle formed by -the center of the cube and two opposite vertexes on the same cube face. -The edges of this triangle have the following lenghts: sqrt(2) for the base -and sqrt(3)/2 for the other two other edges. So the angle we want is: - +-----------------------------------------------------------+ - | 2*ARCSIN(sqrt(2)/sqrt(3)) = 109.47122063449069174 degrees | - +-----------------------------------------------------------+ -For the cube this angle is obvious, but just for formality it can be -easily obtained because we also know it's isosceles edge lenghts: -sqrt(2)/2 for the base and 1/2 for the other two edges. So the angle we -want is: - +-----------------------------------------------------------+ - | 2*ARCSIN((sqrt(2)/2)/1) = 90.000000000000000000 degrees | - +-----------------------------------------------------------+ -For the octahedron we use the same idea used for the tetrahedron, but now -we inscribe the cube inside the octahedron so that all cubes's vertexes -matches excatly the center of each octahedron's face. It's now clear that -this angle is the same of the thetrahedron one: - +-----------------------------------------------------------+ - | 2*ARCSIN(sqrt(2)/sqrt(3)) = 109.47122063449069174 degrees | - +-----------------------------------------------------------+ -For the dodecahedron it's a little bit harder because it's only relationship -with the cube is useless to us. So we need to solve the problem by another -way. The concept of Face radius also exists on 2D polygons with the name -Edge radius: - Edge Radius For Pentagon (ERp) - ERp = (1/2)/TAN(36 degrees) * VRp = 0.6881909602355867905 - (VRp is the pentagon's vertex radio). - Face Radius For Dodecahedron - FRd = T^2 * sqrt((T+2)/5) / 2 = 1.1135163644116068404 -Why we need ERp? Well, ERp and FRd segments forms a 90 degrees angle, -completing this triangle, the lesser angle is a half of the angle we are -looking for, so this angle is: - +-----------------------------------------------------------+ - | 2*ARCTAN(ERp/FRd) = 63.434948822922009981 degrees | - +-----------------------------------------------------------+ -For the icosahedron we can use the same method used for dodecahedron (well -the method used for dodecahedron may be used for all regular polyhedra) - Edge Radius For Triangle (this one is well known: 1/3 of the triangle height) - ERt = sin(60)/3 = sqrt(3)/6 = 0.2886751345948128655 - Face Radius For Icosahedron - FRi= (3*sqrt(3)+sqrt(15))/12 = 0.7557613140761707538 -So the angle is: - +-----------------------------------------------------------+ - | 2*ARCTAN(ERt/FRi) = 41.810314895778596167 degrees | - +-----------------------------------------------------------+ - -*/ - - -#include -#include -#ifndef _WIN32 -#include -#endif -#include -#include -#include - -#define Scale 0.3 - -#define VectMul(X1,Y1,Z1,X2,Y2,Z2) (Y1)*(Z2)-(Z1)*(Y2),(Z1)*(X2)-(X1)*(Z2),(X1)*(Y2)-(Y1)*(X2) -#define sqr(A) ((A)*(A)) - -/* Increasing this values produces better image quality, the price is speed. */ -/* Very low values produces erroneous/incorrect plotting */ -#define tetradivisions 23 -#define cubedivisions 20 -#define octadivisions 21 -#define dodecadivisions 10 -#define icodivisions 15 - -#define tetraangle 109.47122063449069174 -#define cubeangle 90.000000000000000000 -#define octaangle 109.47122063449069174 -#define dodecaangle 63.434948822922009981 -#define icoangle 41.810314895778596167 - -#ifndef Pi -#define Pi 3.1415926535897932385 -#endif -#define SQRT2 1.4142135623730951455 -#define SQRT3 1.7320508075688771932 -#define SQRT5 2.2360679774997898051 -#define SQRT6 2.4494897427831778813 -#define SQRT15 3.8729833462074170214 -#define cossec36_2 0.8506508083520399322 -#define cos72 0.3090169943749474241 -#define sin72 0.9510565162951535721 -#define cos36 0.8090169943749474241 -#define sin36 0.5877852522924731292 - -/*************************************************************************/ - -static int mono=0; -static int smooth=1; -static GLint WindH, WindW; -static GLfloat step=0; -static GLfloat seno; -static int object; -static int edgedivisions; -static void (*draw_object)( void ); -static float Magnitude; -static float *MaterialColor[20]; - -static float front_shininess[] = {60.0}; -static float front_specular[] = { 0.7, 0.7, 0.7, 1.0 }; -static float ambient[] = { 0.0, 0.0, 0.0, 1.0 }; -static float diffuse[] = { 1.0, 1.0, 1.0, 1.0 }; -static float position0[] = { 1.0, 1.0, 1.0, 0.0 }; -static float position1[] = {-1.0,-1.0, 1.0, 0.0 }; -static float lmodel_ambient[] = { 0.5, 0.5, 0.5, 1.0 }; -static float lmodel_twoside[] = {GL_TRUE}; - -static float MaterialRed[] = { 0.7, 0.0, 0.0, 1.0 }; -static float MaterialGreen[] = { 0.1, 0.5, 0.2, 1.0 }; -static float MaterialBlue[] = { 0.0, 0.0, 0.7, 1.0 }; -static float MaterialCyan[] = { 0.2, 0.5, 0.7, 1.0 }; -static float MaterialYellow[] = { 0.7, 0.7, 0.0, 1.0 }; -static float MaterialMagenta[] = { 0.6, 0.2, 0.5, 1.0 }; -static float MaterialWhite[] = { 0.7, 0.7, 0.7, 1.0 }; -static float MaterialGray[] = { 0.2, 0.2, 0.2, 1.0 }; - -#define TRIANGLE(Edge, Amp, Divisions, Z) \ -{ \ - GLfloat Xf,Yf,Xa,Yb,Xf2,Yf2; \ - GLfloat Factor,Factor1,Factor2; \ - GLfloat VertX,VertY,VertZ,NeiAX,NeiAY,NeiAZ,NeiBX,NeiBY,NeiBZ; \ - GLfloat Ax,Ay,Bx; \ - int Ri,Ti; \ - GLfloat Vr=(Edge)*SQRT3/3; \ - GLfloat AmpVr2=(Amp)/sqr(Vr); \ - GLfloat Zf=(Edge)*(Z); \ - \ - Ax=(Edge)*(+0.5/(Divisions)), Ay=(Edge)*(-SQRT3/(2*Divisions)); \ - Bx=(Edge)*(-0.5/(Divisions)); \ - \ - for (Ri=1; Ri<=(Divisions); Ri++) { \ - glBegin(GL_TRIANGLE_STRIP); \ - for (Ti=0; Ti 2 texture units. - */ - - -#include -#include -#include -#include -#include - -#include "readtex.h" - -#define TEXTURE_1_FILE "../images/girl.rgb" -#define TEXTURE_2_FILE "../images/reflect.rgb" - -#define TEX0 1 -#define TEX7 8 -#define ANIMATE 10 -#define QUIT 100 - -static GLboolean Animate = GL_TRUE; -static GLint NumUnits = 1; -static GLboolean TexEnabled[8]; - -static GLfloat Drift = 0.0; -static GLfloat drift_increment = 0.005; -static GLfloat Xrot = 20.0, Yrot = 30.0, Zrot = 0.0; - - -static void Idle( void ) -{ - if (Animate) { - GLint i; - - Drift += drift_increment; - if (Drift >= 1.0) - Drift = 0.0; - - for (i = 0; i < NumUnits; i++) { - glActiveTextureARB(GL_TEXTURE0_ARB + i); - glMatrixMode(GL_TEXTURE); - glLoadIdentity(); - if (i == 0) { - glTranslatef(Drift, 0.0, 0.0); - glScalef(2, 2, 1); - } - else if (i == 1) { - glTranslatef(0.0, Drift, 0.0); - } - else { - glTranslatef(0.5, 0.5, 0.0); - glRotatef(180.0 * Drift, 0, 0, 1); - glScalef(1.0/i, 1.0/i, 1.0/i); - glTranslatef(-0.5, -0.5, 0.0); - } - } - glMatrixMode(GL_MODELVIEW); - - glutPostRedisplay(); - } -} - - -static void DrawObject(void) -{ - GLint i; - GLint j; - static const GLfloat tex_coords[] = { 0.0, 0.0, 1.0, 1.0, 0.0 }; - static const GLfloat vtx_coords[] = { -1.0, -1.0, 1.0, 1.0, -1.0 }; - - if (!TexEnabled[0] && !TexEnabled[1]) - glColor3f(0.1, 0.1, 0.1); /* add onto this */ - else - glColor3f(1, 1, 1); /* modulate this */ - - glBegin(GL_QUADS); - - /* Toggle between the vector and scalar entry points. This is done purely - * to hit multiple paths in the driver. - */ - if ( Drift > 0.49 ) { - for (j = 0; j < 4; j++ ) { - for (i = 0; i < NumUnits; i++) - glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, - tex_coords[j], tex_coords[j+1]); - glVertex2f( vtx_coords[j], vtx_coords[j+1] ); - } - } - else { - for (j = 0; j < 4; j++ ) { - for (i = 0; i < NumUnits; i++) - glMultiTexCoord2fvARB(GL_TEXTURE0_ARB + i, & tex_coords[j]); - glVertex2fv( & vtx_coords[j] ); - } - } - - glEnd(); -} - - - -static void Display( void ) -{ - static GLint T0 = 0; - static GLint Frames = 0; - GLint t; - - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - glScalef(5.0, 5.0, 5.0); - DrawObject(); - glPopMatrix(); - - glutSwapBuffers(); - - Frames++; - - t = glutGet(GLUT_ELAPSED_TIME); - if (t - T0 >= 250) { - GLfloat seconds = (t - T0) / 1000.0; - drift_increment = 2.2 * seconds / Frames; - T0 = t; - Frames = 0; - } -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 10.0, 100.0 ); - /*glOrtho( -6.0, 6.0, -6.0, 6.0, 10.0, 100.0 );*/ - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -70.0 ); -} - - -static void ModeMenu(int entry) -{ - if (entry >= TEX0 && entry <= TEX7) { - /* toggle */ - GLint i = entry - TEX0; - TexEnabled[i] = !TexEnabled[i]; - glActiveTextureARB(GL_TEXTURE0_ARB + i); - if (TexEnabled[i]) - glEnable(GL_TEXTURE_2D); - else - glDisable(GL_TEXTURE_2D); - printf("Enabled: "); - for (i = 0; i < NumUnits; i++) - printf("%d ", (int) TexEnabled[i]); - printf("\n"); - } - else if (entry==ANIMATE) { - Animate = !Animate; - } - else if (entry==QUIT) { - exit(0); - } - - glutPostRedisplay(); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - float step = 3.0; - (void) x; - (void) y; - - switch (key) { - case GLUT_KEY_UP: - Xrot += step; - break; - case GLUT_KEY_DOWN: - Xrot -= step; - break; - case GLUT_KEY_LEFT: - Yrot += step; - break; - case GLUT_KEY_RIGHT: - Yrot -= step; - break; - } - glutPostRedisplay(); -} - - -static void Init( int argc, char *argv[] ) -{ - GLuint texObj[8]; - GLint size, i; - - const char *exten = (const char *) glGetString(GL_EXTENSIONS); - if (!strstr(exten, "GL_ARB_multitexture")) { - printf("Sorry, GL_ARB_multitexture not supported by this renderer.\n"); - exit(1); - } - - glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &NumUnits); - printf("%d texture units supported\n", NumUnits); - if (NumUnits > 8) - NumUnits = 8; - - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size); - printf("%d x %d max texture size\n", size, size); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - for (i = 0; i < NumUnits; i++) { - if (i < 2) - TexEnabled[i] = GL_TRUE; - else - TexEnabled[i] = GL_FALSE; - } - - /* allocate two texture objects */ - glGenTextures(NumUnits, texObj); - - /* setup the texture objects */ - for (i = 0; i < NumUnits; i++) { - - glActiveTextureARB(GL_TEXTURE0_ARB + i); - glBindTexture(GL_TEXTURE_2D, texObj[i]); - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - - if (i == 0) { - if (!LoadRGBMipmaps(TEXTURE_1_FILE, GL_RGB)) { - printf("Error: couldn't load texture image\n"); - exit(1); - } - } - else if (i == 1) { - if (!LoadRGBMipmaps(TEXTURE_2_FILE, GL_RGB)) { - printf("Error: couldn't load texture image\n"); - exit(1); - } - } - else { - /* checker */ - GLubyte image[8][8][3]; - GLint i, j; - for (i = 0; i < 8; i++) { - for (j = 0; j < 8; j++) { - if ((i + j) & 1) { - image[i][j][0] = 50; - image[i][j][1] = 50; - image[i][j][2] = 50; - } - else { - image[i][j][0] = 25; - image[i][j][1] = 25; - image[i][j][2] = 25; - } - } - } - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 8, 8, 0, - GL_RGB, GL_UNSIGNED_BYTE, (GLvoid *) image); - } - - /* Bind texObj[i] to ith texture unit */ - if (i < 2) - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - else - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD); - - if (TexEnabled[i]) - glEnable(GL_TEXTURE_2D); - } - - glShadeModel(GL_FLAT); - glClearColor(0.3, 0.3, 0.4, 1.0); - - if (argc > 1 && strcmp(argv[1], "-info")==0) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } -} - - -int main( int argc, char *argv[] ) -{ - GLint i; - - glutInit( &argc, argv ); - glutInitWindowSize( 300, 300 ); - glutInitWindowPosition( 0, 0 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0] ); - - Init( argc, argv ); - - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - glutIdleFunc( Idle ); - - glutCreateMenu(ModeMenu); - - for (i = 0; i < NumUnits; i++) { - char s[100]; - sprintf(s, "Toggle Texture %d", i); - glutAddMenuEntry(s, TEX0 + i); - } - glutAddMenuEntry("Toggle Animation", ANIMATE); - glutAddMenuEntry("Quit", QUIT); - glutAttachMenu(GLUT_RIGHT_BUTTON); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/occlude.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/occlude.c deleted file mode 100644 index 8f7b90984e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/occlude.c +++ /dev/null @@ -1,234 +0,0 @@ -/* - * GL_HP_occlustion_test demo - * - * Brian Paul - * 31 March 2000 - * - * Copyright (C) 2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include -#include -#include -#include -#include -#include - - -static GLfloat Xpos = 0; -static GLboolean Anim = GL_TRUE; - - -static void -PrintString(const char *s) -{ - while (*s) { - glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s); - s++; - } -} - - - -static void Idle(void) -{ - static int lastTime = 0; - static int sign = +1; - int time = glutGet(GLUT_ELAPSED_TIME); - float step; - - if (lastTime == 0) - lastTime = time; - else if (time - lastTime < 20) /* 50Hz update */ - return; - - step = (time - lastTime) / 1000.0 * sign; - lastTime = time; - - Xpos += step; - - if (Xpos > 2.5) { - Xpos = 2.5; - sign = -1; - } - else if (Xpos < -2.5) { - Xpos = -2.5; - sign = +1; - } - glutPostRedisplay(); -} - - -static void Display( void ) -{ - GLboolean result; - - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); - - /* draw the occluding polygons */ - glColor3f(0, 0.6, 0.8); - glBegin(GL_QUADS); - glVertex2f(-1.6, -1.5); - glVertex2f(-0.4, -1.5); - glVertex2f(-0.4, 1.5); - glVertex2f(-1.6, 1.5); - - glVertex2f( 0.4, -1.5); - glVertex2f( 1.6, -1.5); - glVertex2f( 1.6, 1.5); - glVertex2f( 0.4, 1.5); - glEnd(); - - /* draw the test polygon with occlusion testing */ - glPushMatrix(); - glTranslatef(Xpos, 0, -0.5); - glScalef(0.3, 0.3, 1.0); - glRotatef(-90.0 * Xpos, 0, 0, 1); - - glEnable(GL_OCCLUSION_TEST_HP); /* NOTE: enabling the occlusion test */ - /* doesn't clear the result flag! */ - glColorMask(0, 0, 0, 0); - glDepthMask(GL_FALSE); - /* this call clear's the result flag. Not really needed for this demo. */ - glGetBooleanv(GL_OCCLUSION_TEST_RESULT_HP, &result); - - glBegin(GL_POLYGON); - glVertex3f(-1, -1, 0); - glVertex3f( 1, -1, 0); - glVertex3f( 1, 1, 0); - glVertex3f(-1, 1, 0); - glEnd(); - - glGetBooleanv(GL_OCCLUSION_TEST_RESULT_HP, &result); - /* turn off occlusion testing */ - glDisable(GL_OCCLUSION_TEST_HP); - glColorMask(1, 1, 1, 1); - glDepthMask(GL_TRUE); - - /* draw the green rect, so we can see what's going on */ - glColor3f(0.8, 0.5, 0); - glBegin(GL_POLYGON); - glVertex3f(-1, -1, 0); - glVertex3f( 1, -1, 0); - glVertex3f( 1, 1, 0); - glVertex3f(-1, 1, 0); - glEnd(); - - glPopMatrix(); - - - /* Print result message */ - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - - glColor3f(1, 1, 1); - glRasterPos3f(-0.25, -0.7, 0); - - if (result) - PrintString(" Visible"); - else - PrintString("Fully Occluded"); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc( Idle ); - else - glutIdleFunc( NULL ); - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - const GLfloat step = 0.1; - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_LEFT: - Xpos -= step; - break; - case GLUT_KEY_RIGHT: - Xpos += step; - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - const char *ext = (const char *) glGetString(GL_EXTENSIONS); - if (!strstr(ext, "GL_HP_occlusion_test")) { - printf("Sorry, this demo requires the GL_HP_occlusion_test extension\n"); - exit(-1); - } - - glEnable(GL_DEPTH_TEST); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 400, 400 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutIdleFunc( Idle ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/paltex.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/paltex.c deleted file mode 100644 index aa9c0da36b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/paltex.c +++ /dev/null @@ -1,270 +0,0 @@ - -/* - * Paletted texture demo. Written by Brian Paul. - * This program is in the public domain. - */ - -#include -#include -#include -#include -#ifdef _WIN32 -#include -#endif -#define GL_GLEXT_PROTOTYPES -#include - - -static float Rot = 0.0; -static GLboolean Anim = 1; - - -static void Idle( void ) -{ - float t = glutGet(GLUT_ELAPSED_TIME) * 0.001; /* in seconds */ - Rot = t * 360 / 4; /* 1 rotation per 4 seconds */ - glutPostRedisplay(); -} - - -static void Display( void ) -{ - /* draw background gradient */ - glDisable(GL_TEXTURE_2D); - glBegin(GL_POLYGON); - glColor3f(1.0, 0.0, 0.2); glVertex2f(-1.5, -1.0); - glColor3f(1.0, 0.0, 0.2); glVertex2f( 1.5, -1.0); - glColor3f(0.0, 0.0, 1.0); glVertex2f( 1.5, 1.0); - glColor3f(0.0, 0.0, 1.0); glVertex2f(-1.5, 1.0); - glEnd(); - - glPushMatrix(); - glRotatef(Rot, 0, 0, 1); - - glEnable(GL_TEXTURE_2D); - glBegin(GL_POLYGON); - glTexCoord2f(0, 1); glVertex2f(-1, -0.5); - glTexCoord2f(1, 1); glVertex2f( 1, -0.5); - glTexCoord2f(1, 0); glVertex2f( 1, 0.5); - glTexCoord2f(0, 0); glVertex2f(-1, 0.5); - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( -1.5, 1.5, -1.0, 1.0, -1.0, 1.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - case 's': - Rot += 0.5; - break; - case ' ': - Anim = !Anim; - if (Anim) - glutIdleFunc( Idle ); - else - glutIdleFunc( NULL ); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ -#define HEIGHT 8 -#define WIDTH 32 - /* 257 = HEIGHT * WIDTH + 1 (for trailing '\0') */ - static char texture[257] = {"\ - \ - MMM EEEE SSS AAA \ - M M M E S S A A \ - M M M EEEE SS A A \ - M M M E SS AAAAA \ - M M E S S A A \ - M M EEEE SSS A A \ - " - }; - GLubyte table[256][4]; - - if (!glutExtensionSupported("GL_EXT_paletted_texture")) { - printf("Sorry, GL_EXT_paletted_texture not supported\n"); - exit(0); - } - - /* load the color table for each texel-index */ - memset(table, 0, 256*4); - table[' '][0] = 255; - table[' '][1] = 255; - table[' '][2] = 255; - table[' '][3] = 64; - table['M'][0] = 255; - table['M'][1] = 0; - table['M'][2] = 0; - table['M'][3] = 255; - table['E'][0] = 0; - table['E'][1] = 255; - table['E'][2] = 0; - table['E'][3] = 255; - table['S'][0] = 0; - table['S'][1] = 0; - table['S'][2] = 255; - table['S'][3] = 255; - table['A'][0] = 255; - table['A'][1] = 255; - table['A'][2] = 0; - table['A'][3] = 255; - -#ifdef GL_EXT_paletted_texture - -#if defined(GL_EXT_shared_texture_palette) && defined(USE_SHARED_PALETTE) - printf("Using shared palette\n"); - glColorTableEXT(GL_SHARED_TEXTURE_PALETTE_EXT, /* target */ - GL_RGBA, /* internal format */ - 256, /* table size */ - GL_RGBA, /* table format */ - GL_UNSIGNED_BYTE, /* table type */ - table); /* the color table */ - glEnable(GL_SHARED_TEXTURE_PALETTE_EXT); -#else - glColorTableEXT(GL_TEXTURE_2D, /* target */ - GL_RGBA, /* internal format */ - 256, /* table size */ - GL_RGBA, /* table format */ - GL_UNSIGNED_BYTE, /* table type */ - table); /* the color table */ -#endif - - glTexImage2D(GL_TEXTURE_2D, /* target */ - 0, /* level */ - GL_COLOR_INDEX8_EXT, /* internal format */ - WIDTH, HEIGHT, /* width, height */ - 0, /* border */ - GL_COLOR_INDEX, /* texture format */ - GL_UNSIGNED_BYTE, /* texture type */ - texture); /* the texture */ -#endif - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - glEnable(GL_TEXTURE_2D); - - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -#undef HEIGHT -#undef WIDTH -} - - - -/* - * Color ramp test - */ -static void Init2( void ) -{ -#define HEIGHT 32 -#define WIDTH 256 - static char texture[HEIGHT][WIDTH]; - GLubyte table[256][4]; - int i, j; - - if (!glutExtensionSupported("GL_EXT_paletted_texture")) { - printf("Sorry, GL_EXT_paletted_texture not supported\n"); - exit(0); - } - - for (j = 0; j < HEIGHT; j++) { - for (i = 0; i < WIDTH; i++) { - texture[j][i] = i; - } - } - - for (i = 0; i < 255; i++) { - table[i][0] = i; - table[i][1] = 0; - table[i][2] = 0; - table[i][3] = 255; - } - -#ifdef GL_EXT_paletted_texture - -#if defined(GL_EXT_shared_texture_palette) && defined(USE_SHARED_PALETTE) - printf("Using shared palette\n"); - glColorTableEXT(GL_SHARED_TEXTURE_PALETTE_EXT, /* target */ - GL_RGBA, /* internal format */ - 256, /* table size */ - GL_RGBA, /* table format */ - GL_UNSIGNED_BYTE, /* table type */ - table); /* the color table */ - glEnable(GL_SHARED_TEXTURE_PALETTE_EXT); -#else - glColorTableEXT(GL_TEXTURE_2D, /* target */ - GL_RGBA, /* internal format */ - 256, /* table size */ - GL_RGBA, /* table format */ - GL_UNSIGNED_BYTE, /* table type */ - table); /* the color table */ -#endif - - glTexImage2D(GL_TEXTURE_2D, /* target */ - 0, /* level */ - GL_COLOR_INDEX8_EXT, /* internal format */ - WIDTH, HEIGHT, /* width, height */ - 0, /* border */ - GL_COLOR_INDEX, /* texture format */ - GL_UNSIGNED_BYTE, /* texture type */ - texture); /* teh texture */ -#endif - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - glEnable(GL_TEXTURE_2D); - - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 400, 300 ); - - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - - glutCreateWindow(argv[0]); - - Init(); - (void) Init2; /* silence warning */ - - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - if (Anim) - glutIdleFunc( Idle ); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/particles.cxx b/nx-X11/extras/Mesa_6.4.2/progs/demos/particles.cxx deleted file mode 100644 index b88c318e0b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/particles.cxx +++ /dev/null @@ -1,219 +0,0 @@ -/* - * This program is under the GNU GPL. - * Use at your own risk. - * - * written by David Bucciarelli (humanware@plus.it) - * Humanware s.r.l. - */ - -#include - -#include "particles.h" - -#define vinit(a,i,j,k) {\ - (a)[0]=i;\ - (a)[1]=j;\ - (a)[2]=k;\ -} - -#define vadds(a,dt,b) {\ - (a)[0]+=(dt)*(b)[0];\ - (a)[1]+=(dt)*(b)[1];\ - (a)[2]+=(dt)*(b)[2];\ -} - -#define vequ(a,b) {\ - (a)[0]=(b)[0];\ - (a)[1]=(b)[1];\ - (a)[2]=(b)[2];\ -} - -#define vinter(a,dt,b,c) {\ - (a)[0]=(dt)*(b)[0]+(1.0-dt)*(c)[0];\ - (a)[1]=(dt)*(b)[1]+(1.0-dt)*(c)[1];\ - (a)[2]=(dt)*(b)[2]+(1.0-dt)*(c)[2];\ -} - -#define clamp(a) ((a) < 0.0 ? 0.0 : ((a) < 1.0 ? (a) : 1.0)) - -#define vclamp(v) {\ - (v)[0]=clamp((v)[0]);\ - (v)[1]=clamp((v)[1]);\ - (v)[2]=clamp((v)[2]);\ -} - - -float rainParticle::min[3]; -float rainParticle::max[3]; -float rainParticle::partLength=0.2f; - - -static float vrnd(void) -{ - return(((float)rand())/RAND_MAX); -} - - -particle::particle() -{ - age=0.0f; - - vinit(acc,0.0f,0.0f,0.0f); - vinit(vel,0.0f,0.0f,0.0f); - vinit(pos,0.0f,0.0f,0.0f); -} - -void particle::elapsedTime(float dt) -{ - age+=dt; - - vadds(vel,dt,acc); - - vadds(pos,dt,vel); -} - -///////////////////////////////////////// -// Particle System -///////////////////////////////////////// - -particleSystem::particleSystem() -{ - t=0.0f; - - part=NULL; - - particleNum=0; -} - -particleSystem::~particleSystem() -{ - if(part) - free(part); -} - -void particleSystem::addParticle(particle *p) -{ - if(!part) { - part=(particle **)calloc(1,sizeof(particle *)); - part[0]=p; - particleNum=1; - } else { - particleNum++; - part=(particle **)realloc(part,sizeof(particle *)*particleNum); - part[particleNum-1]=p; - } -} - -void particleSystem::reset(void) -{ - if(part) - free(part); - - t=0.0f; - - part=NULL; - - particleNum=0; -} - -void particleSystem::draw(void) -{ - if(!part) - return; - - part[0]->beginDraw(); - for(unsigned int i=0;idraw(); - part[0]->endDraw(); -} - -void particleSystem::addTime(float dt) -{ - if(!part) - return; - - for(unsigned int i=0;ielapsedTime(dt); - part[i]->checkAge(); - } -} - -///////////////////////////////////////// -// Rain -///////////////////////////////////////// - -void rainParticle::init(void) -{ - age=0.0f; - - acc[0]=0.0f; - acc[1]=-0.98f; - acc[2]=0.0f; - - vel[0]=0.0f; - vel[1]=0.0f; - vel[2]=0.0f; - - oldpos[0]=pos[0]=min[0]+(max[0]-min[0])*vrnd(); - oldpos[1]=pos[1]=max[1]+0.2f*max[1]*vrnd(); - oldpos[2]=pos[2]=min[2]+(max[2]-min[2])*vrnd(); - - vadds(oldpos,-partLength,vel); -} - -rainParticle::rainParticle() -{ - init(); -} - -void rainParticle::setRainingArea(float minx, float miny, float minz, - float maxx, float maxy, float maxz) -{ - vinit(min,minx,miny,minz); - vinit(max,maxx,maxy,maxz); -} - -void rainParticle::setLength(float l) -{ - partLength=l; -} - -void rainParticle::draw(void) -{ - glColor4f(0.7f,0.95f,1.0f,0.0f); - glVertex3fv(oldpos); - - glColor4f(0.3f,0.7f,1.0f,1.0f); - glVertex3fv(pos); -} - -void rainParticle::checkAge(void) -{ - if(pos[1]max[0]) - pos[0]=min[0]+(pos[0]-max[0]); - if(pos[2]>max[2]) - pos[2]=min[2]+(pos[2]-max[2]); - - vequ(oldpos,pos); - vadds(oldpos,-partLength,vel); -} - -void rainParticle::randomHeight(void) -{ - pos[1]=(max[1]-min[1])*vrnd()+min[1]; - - oldpos[1]=pos[1]-partLength*vel[1]; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/particles.h b/nx-X11/extras/Mesa_6.4.2/progs/demos/particles.h deleted file mode 100644 index a49dd691e4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/particles.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * This program is under the GNU GPL. - * Use at your own risk. - * - * written by David Bucciarelli (humanware@plus.it) - * Humanware s.r.l. - */ - -#ifndef PARTICLES_H -#define PARTICLES_H - -#include - -class particle { - protected: - float age; // in seconds - float acc[3]; - float vel[3]; - float pos[3]; - - public: - particle(); - virtual ~particle() {}; - - virtual void beginDraw(void) {}; - virtual void draw(void)=0; - virtual void endDraw(void) {}; - - virtual void elapsedTime(float); - virtual void checkAge(void) {}; -}; - -class particleSystem { - protected: - particle **part; - - float t; - - unsigned long particleNum; - public: - particleSystem(); - ~particleSystem(); - - void addParticle(particle *); - - void reset(void); - - void draw(void); - - void addTime(float); -}; - -class rainParticle : public particle { - protected: - static float min[3]; - static float max[3]; - static float partLength; - - float oldpos[3]; - - void init(void); - public: - rainParticle(); - - static void setRainingArea(float, float, float, - float, float, float); - static void setLength(float); - static float getLength(void) { return partLength; }; - - void beginDraw(void) { glBegin(GL_LINES); }; - void draw(void); - void endDraw(void) { glEnd(); }; - - void elapsedTime(float); - - void checkAge(void); - - void randomHeight(void); -}; - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/pixeltex.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/pixeltex.c deleted file mode 100644 index 03e653a454..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/pixeltex.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * GL_SGIS_pixel_texture demo - * - * Brian Paul - * 6 Apr 2000 - * - * Copyright (C) 2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * How this works: - * 1. We load the image into a 2D texture. - * 2. We generate a sequence of RGB images in which the R component - * is really the S texture coordinate and the G component is really - * the T texture coordinate. - * By warping the mapping from R to S and G to T we can get non-linear - * distortions. - * 3. Draw the warped image (a 2-D warping function) with pixel texgen - * enabled. - * 4. Loop over the warped images to animate. - * - * The pixel texgen extension can also be used to do color-space - * conversions. For example, we could convert YCR to RGB with a - * 3D texture map which takes YCR as the S,T,R texture coordinate and - * returns RGB texel values. - * - * You can use this extension in (at least) two ways: - * 1. glDrawPixels w/ color space conversion/warping - * 2. glDrawPixels to spatially warp another image in texture memory - * - * We're basically using glDrawPixels to draw a texture coordinate image. - */ - - -#include -#include -#include -#include -#include -#include -#include "readtex.h" - -#define TEXTURE_FILE "../images/girl.rgb" - -static int ImgWidth = 300, ImgHeight = 300; -#define FRAMES 20 -static GLubyte *ImgData[FRAMES]; -static GLint Frame = 0; - -static GLboolean TextureFlag = GL_TRUE; - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT ); - - if (TextureFlag) { - glEnable(GL_PIXEL_TEXTURE_SGIS); - glEnable(GL_TEXTURE_2D); - } - else { - glDisable(GL_PIXEL_TEXTURE_SGIS); - glDisable(GL_TEXTURE_2D); - } - - glColor3f(1, 1, 1); - glRasterPos2f(10, 10); - glDrawPixels(ImgWidth, ImgHeight, GL_RGB, GL_UNSIGNED_BYTE, ImgData[Frame]); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho(0, width, 0, height, -1, 1); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case ' ': - TextureFlag = !TextureFlag; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Idle(void) -{ - Frame++; - if (Frame >= FRAMES) - Frame = 0; - glutPostRedisplay(); -} - - -static GLubyte warp(GLfloat s, int frame) -{ - static const GLfloat pi = 3.14159265; - static int halfFrame = FRAMES / 2; - GLfloat y, weight, v; - if (frame >= halfFrame) - frame = halfFrame - (frame - halfFrame); - y = sin(s * pi); - weight = (float) frame / (FRAMES-1); - v = y * (0.8 * weight + 0.2); - return (GLint) (v * 255.0F); -} - - -static void InitImage(void) -{ - int i, j, frame; - for (frame = 0; frame < FRAMES; frame++) { - ImgData[frame] = (GLubyte *) malloc(ImgWidth * ImgHeight * 3); - for (i = 0; i < ImgHeight; i++) { - for (j = 0; j < ImgWidth; j++) { - GLubyte *pixel = ImgData[frame] + (i * ImgWidth + j) * 3; - pixel[0] = warp((float) j / (ImgWidth - 0), frame); - pixel[1] = warp((float) i / (ImgHeight - 0), frame); - pixel[2] = 0.0; - } - } - } -} - - -static void Init( int argc, char *argv[] ) -{ - const char *exten = (const char *) glGetString(GL_EXTENSIONS); - if (!strstr(exten, "GL_SGIS_pixel_texture")) { - printf("Sorry, GL_SGIS_pixel_texture not supported by this renderer.\n"); - exit(1); - } - - /* linear filtering looks nicer, but it's slower, since it's in software */ -#if 1 - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -#else - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); -#endif - - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) { - printf("Error: couldn't load texture image\n"); - exit(1); - } - - glClearColor(0.3, 0.3, 0.4, 1.0); - - InitImage(); - - printf("Hit SPACE to toggle pixel texgen\n"); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowSize( 330, 330 ); - glutInitWindowPosition( 0, 0 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0] ); - - Init( argc, argv ); - - glutKeyboardFunc( Key ); - glutReshapeFunc( Reshape ); - glutDisplayFunc( Display ); - glutIdleFunc( Idle ); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/pointblast.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/pointblast.c deleted file mode 100644 index 715813f176..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/pointblast.c +++ /dev/null @@ -1,498 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -/* This example demonstrates how to render particle effects - with OpenGL. A cloud of pinkish/orange particles explodes with the - particles bouncing off the ground. When the EXT_point_parameters - is present , the particle size is attenuated based on eye distance. */ - - -#include -#include -#include -#include /* for cos(), sin(), and sqrt() */ -#ifdef _WIN32 -#include -#endif -#define GL_GLEXT_PROTOTYPES -#include - -/* Some files do not define M_PI... */ -#ifndef M_PI -#define M_PI 3.14159265 -#endif - -#if 0 /* For debugging. */ -#undef GL_EXT_point_parameters -#endif - -static GLfloat angle = -150; /* in degrees */ -static int spin = 0; -static int moving, begin; -static int newModel = 1; -static float theTime; -static int repeat = 1; -static int blend = 1; -int useMipmaps = 1; -int linearFiltering = 1; - -static GLfloat constant[3] = { 1/5.0, 0.0, 0.0 }; -static GLfloat linear[3] = { 0.0, 1/5.0, 0.0 }; -static GLfloat theQuad[3] = { 0.25, 0.0, 1/60.0 }; - -#define MAX_POINTS 2000 - -static int numPoints = 200; - -static GLfloat pointList[MAX_POINTS][3]; -static GLfloat pointTime[MAX_POINTS]; -static GLfloat pointVelocity[MAX_POINTS][2]; -static GLfloat pointDirection[MAX_POINTS][2]; -static int colorList[MAX_POINTS]; -static int animate = 1, motion = 0; - -static GLfloat colorSet[][4] = { - /* Shades of red. */ - { 0.7, 0.2, 0.4, 0.5 }, - { 0.8, 0.0, 0.7, 0.5 }, - { 1.0, 0.0, 0.0, 0.5 }, - { 0.9, 0.3, 0.6, 0.5 }, - { 1.0, 0.4, 0.0, 0.5 }, - { 1.0, 0.0, 0.5, 0.5 }, -}; - -#define NUM_COLORS (sizeof(colorSet)/sizeof(colorSet[0])) - -#define DEAD (NUM_COLORS+1) - - -#if 0 /* drand48 might be better on Unix machines */ -#define RANDOM_RANGE(lo, hi) ((lo) + (hi - lo) * drand48()) -#else -static float float_rand(void) { return rand() / (float) RAND_MAX; } -#define RANDOM_RANGE(lo, hi) ((lo) + (hi - lo) * float_rand()) -#endif - -#define MEAN_VELOCITY 3.0 -#define GRAVITY 2.0 - -/* Modeling units of ground extent in each X and Z direction. */ -#define EDGE 12 - -static void -makePointList(void) -{ - float angle, velocity, direction; - int i; - - motion = 1; - for (i=0; i EDGE) { - /* Particle has hit ground past the distance duration of - the particles. Mark particle as dead. */ - colorList[i] = NUM_COLORS; /* Not moving. */ - continue; - } - - pointVelocity[i][1] *= 0.8; /* 80% of previous up velocity. */ - pointTime[i] = 0.0; /* Reset the particles sense of up time. */ - } - motion = 1; - pointTime[i] += dt; - } - theTime += dt; - if (!motion && !spin) { - if (repeat) { - makePointList(); - } else { - glutIdleFunc(NULL); - } - } -} - -static void -idle(void) -{ - updatePointList(); - if (spin) { - angle += 0.3; - newModel = 1; - } - glutPostRedisplay(); -} - -static void -visible(int vis) -{ - if (vis == GLUT_VISIBLE) { - if (animate && (motion || spin)) { - glutIdleFunc(idle); - } - } else { - glutIdleFunc(NULL); - } -} - -static void -recalcModelView(void) -{ - glPopMatrix(); - glPushMatrix(); - glRotatef(angle, 0.0, 1.0, 0.0); - newModel = 0; -} - -static void -redraw(void) -{ - int i; - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - if (newModel) - recalcModelView(); - - glDepthMask(GL_FALSE); - - /* Draw the floor. */ -/* glEnable(GL_TEXTURE_2D);*/ - glColor3f(0.5, 1.0, 0.5); - glBegin(GL_QUADS); - glTexCoord2f(0.0, 0.0); - glVertex3f(-EDGE, -0.05, -EDGE); - glTexCoord2f(20.0, 0.0); - glVertex3f(EDGE, -0.05, -EDGE); - glTexCoord2f(20.0, 20.0); - glVertex3f(EDGE, -0.05, EDGE); - glTexCoord2f(0.0, 20.0); - glVertex3f(-EDGE, -0.05, EDGE); - glEnd(); - - /* Allow particles to blend with each other. */ - glDepthMask(GL_TRUE); - - if (blend) - glEnable(GL_BLEND); - - glDisable(GL_TEXTURE_2D); - glBegin(GL_POINTS); - for (i=0; i -#include -#include -#include -#include -#ifndef M_PI -#define M_PI 3.14159265 -#endif - -#include "particles.h" -extern "C" { -#include "readtex.h" -} - -#ifdef _WIN32 -#include -#include -#include "particles.cxx" -#include "readtex.c" -#endif - -#ifdef XMESA -#include "GL/xmesa.h" -static int fullscreen=1; -#endif - -static int WIDTH=640; -static int HEIGHT=480; -static int NUMPART=7500; - -#define FRAME 50 - -static float fogcolor[4]={1.0,1.0,1.0,1.0}; - -#define DIMP 40.0 -#define DIMTP 32.0 - -static float q[4][3]={ - {-DIMP,0.0,-DIMP}, - {DIMP,0.0,-DIMP}, - {DIMP,0.0,DIMP}, - {-DIMP,0.0,DIMP} -}; - -static float qt[4][2]={ - {-DIMTP,-DIMTP}, - {DIMTP,-DIMTP}, - {DIMTP,DIMTP}, - {-DIMTP,DIMTP} -}; - -static int win=0; - -static int fog=1; -static int help=1; - -static GLuint groundid; - -static float obs[3]={2.0,1.0,0.0}; -static float dir[3]; -static float v=0.0; -static float alpha=-90.0; -static float beta=90.0; - -static particleSystem *ps; - -static float gettime() -{ - static clock_t told=0; - clock_t tnew,ris; - - tnew=clock(); - - ris=tnew-told; - - told=tnew; - - return(ris/(float)CLOCKS_PER_SEC); -} - -static float gettimerain() -{ - static clock_t told=0; - clock_t tnew,ris; - - tnew=clock(); - - ris=tnew-told; - - told=tnew; - - return(ris/(float)CLOCKS_PER_SEC); -} - -static void calcposobs(void) -{ - dir[0]=sin(alpha*M_PI/180.0); - dir[2]=cos(alpha*M_PI/180.0)*sin(beta*M_PI/180.0); - dir[1]=cos(beta*M_PI/180.0); - - obs[0]+=v*dir[0]; - obs[1]+=v*dir[1]; - obs[2]+=v*dir[2]; - - rainParticle::setRainingArea(obs[0]-7.0f,-0.2f,obs[2]-7.0f,obs[0]+7.0f,8.0f,obs[2]+7.0f); -} - -static void printstring(void *font, char *string) -{ - int len,i; - - len=(int)strlen(string); - for(i=0;idraw(); - ps->addTime(gettimerain()); - - glShadeModel(GL_FLAT); - - - if((count % FRAME)==0) { - fr=gettime(); - sprintf(frbuf,"Frame rate: %f",FRAME/fr); - } - - glDisable(GL_TEXTURE_2D); - glDisable(GL_DEPTH_TEST); - glDisable(GL_FOG); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-0.5,639.5,-0.5,479.5,-1.0,1.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - glColor3f(1.0,0.0,0.0); - glRasterPos2i(10,10); - printstring(GLUT_BITMAP_HELVETICA_18,frbuf); - glRasterPos2i(350,470); - printstring(GLUT_BITMAP_HELVETICA_10,"Rain V1.0 Written by David Bucciarelli (humanware@plus.it)"); - - if(help) - printhelp(); - - reshape(WIDTH,HEIGHT); - glPopMatrix(); - - glutSwapBuffers(); - - count++; -} - - -static void special(int key, int x, int y) -{ - switch (key) { - case GLUT_KEY_LEFT: - alpha+=2.0; - break; - case GLUT_KEY_RIGHT: - alpha-=2.0; - break; - case GLUT_KEY_DOWN: - beta-=2.0; - break; - case GLUT_KEY_UP: - beta+=2.0; - break; - } -} - -static void key(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - - case 'a': - v+=0.01; - break; - case 'z': - v-=0.01; - break; - - case 'l': - rainParticle::setLength(rainParticle::getLength()+0.025f); - break; - case 'k': - rainParticle::setLength(rainParticle::getLength()-0.025f); - break; - - case 'h': - help=(!help); - break; - case 'f': - fog=(!fog); - break; -#ifdef XMESA - case ' ': - XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW); - fullscreen=(!fullscreen); - break; -#endif - } -} - -static void inittextures(void) -{ - GLubyte *img; - GLint width,height; - GLenum format; - GLenum gluerr; - - glGenTextures(1,&groundid); - glBindTexture(GL_TEXTURE_2D,groundid); - - if(!(img=LoadRGBImage("../images/s128.rgb",&width,&height,&format))){ - fprintf(stderr,"Error reading a texture.\n"); - exit(-1); - } - glPixelStorei(GL_UNPACK_ALIGNMENT,4); - if((gluerr=(GLenum)gluBuild2DMipmaps(GL_TEXTURE_2D, 3, width, height,GL_RGB, - GL_UNSIGNED_BYTE, (GLvoid *)(img)))) { - fprintf(stderr,"GLULib%s\n",gluErrorString(gluerr)); - exit(-1); - } - - glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR); - glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); - - glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_DECAL); -} - -static void initparticle(void) -{ - ps=new particleSystem; - - rainParticle::setRainingArea(-7.0f,-0.2f,-7.0f,7.0f,8.0f,7.0f); - - for(int i=0;irandomHeight(); - - ps->addParticle((particle *)p); - } -} - -int main(int ac,char **av) -{ - fprintf(stderr,"Rain V1.0\nWritten by David Bucciarelli (humanware@plus.it)\n"); - - /* Default settings */ - - WIDTH=640; - HEIGHT=480; - - glutInitWindowPosition(0,0); - glutInitWindowSize(WIDTH,HEIGHT); - glutInit(&ac,av); - - glutInitDisplayMode(GLUT_RGB|GLUT_DEPTH|GLUT_DOUBLE); - - if(!(win=glutCreateWindow("Rain"))) { - fprintf(stderr,"Error opening a window.\n"); - exit(-1); - } - - reshape(WIDTH,HEIGHT); - - inittextures(); - - glShadeModel(GL_FLAT); - glEnable(GL_DEPTH_TEST); - - glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); - - glEnable(GL_FOG); - glFogi(GL_FOG_MODE,GL_EXP); - glFogfv(GL_FOG_COLOR,fogcolor); - glFogf(GL_FOG_DENSITY,0.1); -#ifdef FX - glHint(GL_FOG_HINT,GL_NICEST); -#endif - - initparticle(); - - glutKeyboardFunc(key); - glutSpecialFunc(special); - glutDisplayFunc(drawrain); - glutIdleFunc(drawrain); - glutReshapeFunc(reshape); - glutMainLoop(); - - return(0); -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/ray.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/ray.c deleted file mode 100644 index eb1d19f863..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/ray.c +++ /dev/null @@ -1,902 +0,0 @@ -/* - * This program is under the GNU GPL. - * Use at your own risk. - * - * written by David Bucciarelli (tech.hmw@plus.it) - * Humanware s.r.l. - */ - -#include -#include -#include -#include - -#ifdef WIN32 -#include -#endif - -#include - -#ifdef XMESA -#include "GL/xmesa.h" -static int fullscreen = 1; -#endif - -static int WIDTH = 640; -static int HEIGHT = 480; - -static GLint T0 = 0; -static GLint Frames = 0; - -#define BASESIZE 7.5f -#define SPHERE_RADIUS 0.75f - -#define TEX_CHECK_WIDTH 256 -#define TEX_CHECK_HEIGHT 256 -#define TEX_CHECK_SLOT_SIZE (TEX_CHECK_HEIGHT/16) -#define TEX_CHECK_NUMSLOT (TEX_CHECK_HEIGHT/TEX_CHECK_SLOT_SIZE) - -#define TEX_REFLECT_WIDTH 256 -#define TEX_REFLECT_HEIGHT 256 -#define TEX_REFLECT_SLOT_SIZE (TEX_REFLECT_HEIGHT/16) -#define TEX_REFLECT_NUMSLOT (TEX_REFLECT_HEIGHT/TEX_REFLECT_SLOT_SIZE) - -#ifndef M_PI -#define M_PI 3.1415926535 -#endif - -#define EPSILON 0.0001 - -#define clamp255(a) ( (a)<(0.0f) ? (0.0f) : ((a)>(255.0f) ? (255.0f) : (a)) ) - -#define fabs(x) ((x)<0.0f?-(x):(x)) - -#define vequ(a,b) { (a)[0]=(b)[0]; (a)[1]=(b)[1]; (a)[2]=(b)[2]; } -#define vsub(a,b,c) { (a)[0]=(b)[0]-(c)[0]; (a)[1]=(b)[1]-(c)[1]; (a)[2]=(b)[2]-(c)[2]; } -#define dprod(a,b) ((a)[0]*(b)[0]+(a)[1]*(b)[1]+(a)[2]*(b)[2]) -#define vnormalize(a,b) { \ - register float m_norm; \ - m_norm=sqrt((double)dprod((a),(a))); \ - (a)[0] /=m_norm; \ - (a)[1] /=m_norm; \ - (a)[2] /=m_norm; } - -static GLubyte checkmap[TEX_CHECK_HEIGHT][TEX_CHECK_WIDTH][3]; -static GLuint checkid; -static int checkmap_currentslot = 0; - -static GLubyte reflectmap[TEX_REFLECT_HEIGHT][TEX_REFLECT_WIDTH][3]; -static GLuint reflectid; -static int reflectmap_currentslot = 0; - -static GLuint lightdlist; -static GLuint objdlist; - -static float lightpos[3] = { 2.1, 2.1, 2.8 }; -static float objpos[3] = { 0.0, 0.0, 1.0 }; - -static float sphere_pos[TEX_CHECK_HEIGHT][TEX_REFLECT_WIDTH][3]; - -static int win = 0; - -static float fogcolor[4] = { 0.05, 0.05, 0.05, 1.0 }; - -static float obs[3] = { 7.0, 0.0, 2.0 }; -static float dir[3]; -static float v = 0.0; -static float alpha = -90.0; -static float beta = 90.0; - -static int fog = 1; -static int bfcull = 1; -static int poutline = 0; -static int help = 1; -static int showcheckmap = 1; -static int showreflectmap = 1; -static int joyavailable = 0; -static int joyactive = 0; - -static void -calcposobs(void) -{ - dir[0] = sin(alpha * M_PI / 180.0); - dir[1] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0); - dir[2] = cos(beta * M_PI / 180.0); - - if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5) - dir[0] = 0; - if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5) - dir[1] = 0; - if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5) - dir[2] = 0; - - obs[0] += v * dir[0]; - obs[1] += v * dir[1]; - obs[2] += v * dir[2]; -} - -static void -special(int k, int x, int y) -{ - switch (k) { - case GLUT_KEY_LEFT: - alpha -= 2.0; - break; - case GLUT_KEY_RIGHT: - alpha += 2.0; - break; - case GLUT_KEY_DOWN: - beta -= 2.0; - break; - case GLUT_KEY_UP: - beta += 2.0; - break; - } -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: - exit(0); - break; - - case 's': - lightpos[1] -= 0.1; - break; - case 'd': - lightpos[1] += 0.1; - break; - case 'e': - lightpos[0] -= 0.1; - break; - case 'x': - lightpos[0] += 0.1; - break; - case 'w': - lightpos[2] -= 0.1; - break; - case 'r': - lightpos[2] += 0.1; - break; - - case 'j': - objpos[1] -= 0.1; - break; - case 'k': - objpos[1] += 0.1; - break; - case 'i': - objpos[0] -= 0.1; - break; - case 'm': - objpos[0] += 0.1; - break; - case 'u': - objpos[2] -= 0.1; - break; - case 'o': - objpos[2] += 0.1; - break; - - case 'a': - v += 0.005; - break; - case 'z': - v -= 0.005; - break; - - case 'g': - joyactive = (!joyactive); - break; - case 'h': - help = (!help); - break; - case 'f': - fog = (!fog); - break; - - case '1': - showcheckmap = (!showcheckmap); - break; - case '2': - showreflectmap = (!showreflectmap); - break; - - case 'b': - if (bfcull) { - glDisable(GL_CULL_FACE); - bfcull = 0; - } - else { - glEnable(GL_CULL_FACE); - bfcull = 1; - } - break; - case 'p': - if (poutline) { - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - poutline = 0; - } - else { - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - poutline = 1; - } - break; -#ifdef XMESA - case ' ': - XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW); - fullscreen = (!fullscreen); - break; -#endif - } -} - -static void -reshape(int w, int h) -{ - WIDTH = w; - HEIGHT = h; - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(45.0, w / (float) h, 0.8, 40.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -static void -printstring(void *font, char *string) -{ - int len, i; - - len = (int) strlen(string); - for (i = 0; i < len; i++) - glutBitmapCharacter(font, string[i]); -} - -static void -printhelp(void) -{ - glEnable(GL_BLEND); - glColor4f(0.5, 0.5, 0.5, 0.5); - glRecti(40, 40, 600, 440); - glDisable(GL_BLEND); - - glColor3f(0.0, 0.0, 1.0); - glRasterPos2i(300, 420); - printstring(GLUT_BITMAP_HELVETICA_18, "Help"); - - glRasterPos2i(60, 390); - printstring(GLUT_BITMAP_HELVETICA_12, "h - Toggle Help"); - glRasterPos2i(60, 370); - printstring(GLUT_BITMAP_HELVETICA_12, "f - Toggle Fog"); - glRasterPos2i(60, 350); - printstring(GLUT_BITMAP_HELVETICA_12, "b - Toggle Back face culling"); - glRasterPos2i(60, 330); - printstring(GLUT_BITMAP_HELVETICA_12, "p - Toggle Wire frame"); - glRasterPos2i(60, 310); - printstring(GLUT_BITMAP_HELVETICA_12, "Arrow Keys - Rotate"); - glRasterPos2i(60, 290); - printstring(GLUT_BITMAP_HELVETICA_12, "a - Increase velocity"); - glRasterPos2i(60, 270); - printstring(GLUT_BITMAP_HELVETICA_12, "z - Decrease velocity"); - - glRasterPos2i(60, 250); - if (joyavailable) - printstring(GLUT_BITMAP_HELVETICA_12, - "j - Toggle jostick control (Joystick control available)"); - else - printstring(GLUT_BITMAP_HELVETICA_12, - "(No Joystick control available)"); - - glRasterPos2i(60, 230); - printstring(GLUT_BITMAP_HELVETICA_12, - "To move the light source: s - left, d - right, e - far, x - near, w - down r - up"); - glRasterPos2i(60, 210); - printstring(GLUT_BITMAP_HELVETICA_12, - "To move the mirror sphere: j - left, k - right, i - far, m - near, u - down o - up"); - - glRasterPos2i(60, 190); - printstring(GLUT_BITMAP_HELVETICA_12, - "1 - Toggle the plane texture map window"); - - glRasterPos2i(60, 170); - printstring(GLUT_BITMAP_HELVETICA_12, - "2 - Toggle the sphere texture map window"); -} - -static GLboolean -seelight(float p[3], float dir[3]) -{ - float c[3], b, a, d, t, dist[3]; - - vsub(c, p, objpos); - b = -dprod(c, dir); - a = dprod(c, c) - SPHERE_RADIUS * SPHERE_RADIUS; - - if ((d = b * b - a) < 0.0 || (b < 0.0 && a > 0.0)) - return GL_FALSE; - - d = sqrt(d); - - t = b - d; - - if (t < EPSILON) { - t = b + d; - if (t < EPSILON) - return GL_FALSE; - } - - vsub(dist, lightpos, p); - if (dprod(dist, dist) < t * t) - return GL_FALSE; - - return GL_TRUE; -} - -static int -colorcheckmap(float ppos[3], float c[3]) -{ - static float norm[3] = { 0.0f, 0.0f, 1.0f }; - float ldir[3], vdir[3], h[3], dfact, kfact, r, g, b; - int x, y; - - x = (int) ((ppos[0] + BASESIZE / 2) * (10.0f / BASESIZE)); - if ((x < 0) || (x > 10)) - return GL_FALSE; - - y = (int) ((ppos[1] + BASESIZE / 2) * (10.0f / BASESIZE)); - if ((y < 0) || (y > 10)) - return GL_FALSE; - - r = 255.0f; - if (y & 1) { - if (x & 1) - g = 255.0f; - else - g = 0.0f; - } - else { - if (x & 1) - g = 0.0f; - else - g = 255.0f; - } - b = 0.0f; - - vsub(ldir, lightpos, ppos); - vnormalize(ldir, ldir); - - if (seelight(ppos, ldir)) { - c[0] = r * 0.05f; - c[1] = g * 0.05f; - c[2] = b * 0.05f; - - return GL_TRUE; - } - - dfact = dprod(ldir, norm); - if (dfact < 0.0f) - dfact = 0.0f; - - vsub(vdir, obs, ppos); - vnormalize(vdir, vdir); - h[0] = 0.5f * (vdir[0] + ldir[0]); - h[1] = 0.5f * (vdir[1] + ldir[1]); - h[2] = 0.5f * (vdir[2] + ldir[2]); - kfact = dprod(h, norm); - kfact = pow(kfact, 6.0) * 7.0 * 255.0; - - r = r * dfact + kfact; - g = g * dfact + kfact; - b = b * dfact + kfact; - - c[0] = clamp255(r); - c[1] = clamp255(g); - c[2] = clamp255(b); - - return GL_TRUE; -} - -static void -updatecheckmap(int slot) -{ - float c[3], ppos[3]; - int x, y; - - glBindTexture(GL_TEXTURE_2D, checkid); - - ppos[2] = 0.0f; - for (y = slot * TEX_CHECK_SLOT_SIZE; y < (slot + 1) * TEX_CHECK_SLOT_SIZE; - y++) { - ppos[1] = (y / (float) TEX_CHECK_HEIGHT) * BASESIZE - BASESIZE / 2; - - for (x = 0; x < TEX_CHECK_WIDTH; x++) { - ppos[0] = (x / (float) TEX_CHECK_WIDTH) * BASESIZE - BASESIZE / 2; - - colorcheckmap(ppos, c); - checkmap[y][x][0] = (GLubyte) c[0]; - checkmap[y][x][1] = (GLubyte) c[1]; - checkmap[y][x][2] = (GLubyte) c[2]; - } - } - - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, slot * TEX_CHECK_SLOT_SIZE, - TEX_CHECK_WIDTH, TEX_CHECK_SLOT_SIZE, GL_RGB, - GL_UNSIGNED_BYTE, - &checkmap[slot * TEX_CHECK_SLOT_SIZE][0][0]); - -} - -static void -updatereflectmap(int slot) -{ - float rf, r, g, b, t, dfact, kfact, rdir[3]; - float rcol[3], ppos[3], norm[3], ldir[3], h[3], vdir[3], planepos[3]; - int x, y; - - glBindTexture(GL_TEXTURE_2D, reflectid); - - for (y = slot * TEX_REFLECT_SLOT_SIZE; - y < (slot + 1) * TEX_REFLECT_SLOT_SIZE; y++) - for (x = 0; x < TEX_REFLECT_WIDTH; x++) { - ppos[0] = sphere_pos[y][x][0] + objpos[0]; - ppos[1] = sphere_pos[y][x][1] + objpos[1]; - ppos[2] = sphere_pos[y][x][2] + objpos[2]; - - vsub(norm, ppos, objpos); - vnormalize(norm, norm); - - vsub(ldir, lightpos, ppos); - vnormalize(ldir, ldir); - vsub(vdir, obs, ppos); - vnormalize(vdir, vdir); - - rf = 2.0f * dprod(norm, vdir); - if (rf > EPSILON) { - rdir[0] = rf * norm[0] - vdir[0]; - rdir[1] = rf * norm[1] - vdir[1]; - rdir[2] = rf * norm[2] - vdir[2]; - - t = -objpos[2] / rdir[2]; - - if (t > EPSILON) { - planepos[0] = objpos[0] + t * rdir[0]; - planepos[1] = objpos[1] + t * rdir[1]; - planepos[2] = 0.0f; - - if (!colorcheckmap(planepos, rcol)) - rcol[0] = rcol[1] = rcol[2] = 0.0f; - } - else - rcol[0] = rcol[1] = rcol[2] = 0.0f; - } - else - rcol[0] = rcol[1] = rcol[2] = 0.0f; - - dfact = 0.1f * dprod(ldir, norm); - - if (dfact < 0.0f) { - dfact = 0.0f; - kfact = 0.0f; - } - else { - h[0] = 0.5f * (vdir[0] + ldir[0]); - h[1] = 0.5f * (vdir[1] + ldir[1]); - h[2] = 0.5f * (vdir[2] + ldir[2]); - kfact = dprod(h, norm); - kfact = pow(kfact, 4.0); - if (kfact < 1.0e-10) - kfact = 0.0; - } - - r = dfact + kfact; - g = dfact + kfact; - b = dfact + kfact; - - r *= 255.0f; - g *= 255.0f; - b *= 255.0f; - - r += rcol[0]; - g += rcol[1]; - b += rcol[2]; - - r = clamp255(r); - g = clamp255(g); - b = clamp255(b); - - reflectmap[y][x][0] = (GLubyte) r; - reflectmap[y][x][1] = (GLubyte) g; - reflectmap[y][x][2] = (GLubyte) b; - } - - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, slot * TEX_REFLECT_SLOT_SIZE, - TEX_REFLECT_WIDTH, TEX_REFLECT_SLOT_SIZE, GL_RGB, - GL_UNSIGNED_BYTE, - &reflectmap[slot * TEX_REFLECT_SLOT_SIZE][0][0]); -} - -static void -drawbase(void) -{ - glColor3f(0.0, 0.0, 0.0); - glBindTexture(GL_TEXTURE_2D, checkid); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - - glBegin(GL_QUADS); - glTexCoord2f(0.0f, 0.0f); - glVertex3f(-BASESIZE / 2.0f, -BASESIZE / 2.0f, 0.0f); - - glTexCoord2f(1.0f, 0.0f); - glVertex3f(BASESIZE / 2.0f, -BASESIZE / 2.0f, 0.0f); - - glTexCoord2f(1.0f, 1.0f); - glVertex3f(BASESIZE / 2.0f, BASESIZE / 2.0f, 0.0f); - - glTexCoord2f(0.0f, 1.0f); - glVertex3f(-BASESIZE / 2.0f, BASESIZE / 2.0f, 0.0f); - - glEnd(); -} - -static void -drawobj(void) -{ - glColor3f(0.0, 0.0, 0.0); - glBindTexture(GL_TEXTURE_2D, reflectid); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - - glPushMatrix(); - glTranslatef(objpos[0], objpos[1], objpos[2]); - glCallList(objdlist); - glPopMatrix(); -} - -static void -dojoy(void) -{ -#ifdef WIN32 - static UINT max[2] = { 0, 0 }; - static UINT min[2] = { 0xffffffff, 0xffffffff }, center[2]; - MMRESULT res; - JOYINFO joy; - - res = joyGetPos(JOYSTICKID1, &joy); - - if (res == JOYERR_NOERROR) { - joyavailable = 1; - - if (max[0] < joy.wXpos) - max[0] = joy.wXpos; - if (min[0] > joy.wXpos) - min[0] = joy.wXpos; - center[0] = (max[0] + min[0]) / 2; - - if (max[1] < joy.wYpos) - max[1] = joy.wYpos; - if (min[1] > joy.wYpos) - min[1] = joy.wYpos; - center[1] = (max[1] + min[1]) / 2; - - if (joyactive) { - if (fabs(center[0] - (float) joy.wXpos) > 0.1 * (max[0] - min[0])) - alpha -= - 2.5 * (center[0] - (float) joy.wXpos) / (max[0] - min[0]); - if (fabs(center[1] - (float) joy.wYpos) > 0.1 * (max[1] - min[1])) - beta += 2.5 * (center[1] - (float) joy.wYpos) / (max[1] - min[1]); - - if (joy.wButtons & JOY_BUTTON1) - v += 0.005; - if (joy.wButtons & JOY_BUTTON2) - v -= 0.005; - } - } - else - joyavailable = 0; -#endif -} - -static void -updatemaps(void) -{ - updatecheckmap(checkmap_currentslot); - checkmap_currentslot = (checkmap_currentslot + 1) % TEX_CHECK_NUMSLOT; - - updatereflectmap(reflectmap_currentslot); - reflectmap_currentslot = - (reflectmap_currentslot + 1) % TEX_REFLECT_NUMSLOT; -} - -static void -draw(void) -{ - static char frbuf[80] = ""; - - dojoy(); - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glEnable(GL_TEXTURE_2D); - glEnable(GL_DEPTH_TEST); - if (fog) - glEnable(GL_FOG); - else - glDisable(GL_FOG); - - glPushMatrix(); - calcposobs(); - - gluLookAt(obs[0], obs[1], obs[2], - obs[0] + dir[0], obs[1] + dir[1], obs[2] + dir[2], - 0.0, 0.0, 1.0); - - drawbase(); - drawobj(); - - glColor3f(1.0, 1.0, 1.0); - glDisable(GL_TEXTURE_2D); - - glPushMatrix(); - glTranslatef(lightpos[0], lightpos[1], lightpos[2]); - glCallList(lightdlist); - glPopMatrix(); - - glPopMatrix(); - - glDisable(GL_DEPTH_TEST); - glDisable(GL_FOG); - - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); - glOrtho(-0.5, 639.5, -0.5, 479.5, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - - glColor3f(0.0f, 0.3f, 1.0f); - - if (showcheckmap) { - glEnable(GL_TEXTURE_2D); - glBindTexture(GL_TEXTURE_2D, checkid); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - - glBegin(GL_QUADS); - glTexCoord2f(1.0f, 0.0f); - glVertex2i(10, 30); - glTexCoord2f(1.0f, 1.0f); - glVertex2i(10 + 90, 30); - glTexCoord2f(0.0f, 1.0f); - glVertex2i(10 + 90, 30 + 90); - glTexCoord2f(0.0f, 0.0f); - glVertex2i(10, 30 + 90); - glEnd(); - - glDisable(GL_TEXTURE_2D); - glBegin(GL_LINE_LOOP); - glVertex2i(10, 30); - glVertex2i(10 + 90, 30); - glVertex2i(10 + 90, 30 + 90); - glVertex2i(10, 30 + 90); - glEnd(); - glRasterPos2i(105, 65); - printstring(GLUT_BITMAP_HELVETICA_18, "Plane Texture Map"); - } - - if (showreflectmap) { - glEnable(GL_TEXTURE_2D); - glBindTexture(GL_TEXTURE_2D, reflectid); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - - glBegin(GL_QUADS); - glTexCoord2f(1.0f, 0.0f); - glVertex2i(540, 30); - glTexCoord2f(1.0f, 1.0f); - glVertex2i(540 + 90, 30); - glTexCoord2f(0.0f, 1.0f); - glVertex2i(540 + 90, 30 + 90); - glTexCoord2f(0.0f, 0.0f); - glVertex2i(540, 30 + 90); - glEnd(); - - glDisable(GL_TEXTURE_2D); - glBegin(GL_LINE_LOOP); - glVertex2i(540, 30); - glVertex2i(540 + 90, 30); - glVertex2i(540 + 90, 30 + 90); - glVertex2i(540, 30 + 90); - glEnd(); - glRasterPos2i(360, 65); - printstring(GLUT_BITMAP_HELVETICA_18, "Sphere Texture Map"); - } - - glDisable(GL_TEXTURE_2D); - - glRasterPos2i(10, 10); - printstring(GLUT_BITMAP_HELVETICA_18, frbuf); - glRasterPos2i(360, 470); - printstring(GLUT_BITMAP_HELVETICA_10, - "Ray V1.0 Written by David Bucciarelli (tech.hmw@plus.it)"); - - if (help) - printhelp(); - - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - glMatrixMode(GL_MODELVIEW); - - updatemaps(); - - glutSwapBuffers(); - - Frames++; - { - GLint t = glutGet(GLUT_ELAPSED_TIME); - if (t - T0 >= 2000) { - GLfloat seconds = (t - T0) / 1000.0; - GLfloat fps = Frames / seconds; - sprintf(frbuf, "Frame rate: %f", fps); - T0 = t; - Frames = 0; - } - } -} - -static void -inittextures(void) -{ - int y; - - glGenTextures(1, &checkid); - glBindTexture(GL_TEXTURE_2D, checkid); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glTexImage2D(GL_TEXTURE_2D, 0, 3, TEX_CHECK_WIDTH, TEX_CHECK_HEIGHT, - 0, GL_RGB, GL_UNSIGNED_BYTE, checkmap); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - for (y = 0; y < TEX_CHECK_NUMSLOT; y++) - updatecheckmap(y); - - - - glGenTextures(1, &reflectid); - glBindTexture(GL_TEXTURE_2D, reflectid); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glTexImage2D(GL_TEXTURE_2D, 0, 3, TEX_REFLECT_WIDTH, TEX_REFLECT_HEIGHT, - 0, GL_RGB, GL_UNSIGNED_BYTE, reflectmap); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - for (y = 0; y < TEX_REFLECT_NUMSLOT; y++) - updatereflectmap(y); - - -} - -static void -initspherepos(void) -{ - float alpha, beta, sa, ca, sb, cb; - int x, y; - - for (y = 0; y < TEX_REFLECT_HEIGHT; y++) { - beta = M_PI - y * (M_PI / TEX_REFLECT_HEIGHT); - - for (x = 0; x < TEX_REFLECT_WIDTH; x++) { - alpha = -x * (2.0f * M_PI / TEX_REFLECT_WIDTH); - - sa = sin(alpha); - ca = cos(alpha); - - sb = sin(beta); - cb = cos(beta); - - sphere_pos[y][x][0] = SPHERE_RADIUS * sa * sb; - sphere_pos[y][x][1] = SPHERE_RADIUS * ca * sb; - sphere_pos[y][x][2] = SPHERE_RADIUS * cb; - } - } -} - -static void -initdlists(void) -{ - GLUquadricObj *obj; - - obj = gluNewQuadric(); - - lightdlist = glGenLists(1); - glNewList(lightdlist, GL_COMPILE); - gluQuadricDrawStyle(obj, GLU_FILL); - gluQuadricNormals(obj, GLU_NONE); - gluQuadricTexture(obj, GL_TRUE); - gluSphere(obj, 0.25f, 6, 6); - glEndList(); - - objdlist = glGenLists(1); - glNewList(objdlist, GL_COMPILE); - gluQuadricDrawStyle(obj, GLU_FILL); - gluQuadricNormals(obj, GLU_NONE); - gluQuadricTexture(obj, GL_TRUE); - gluSphere(obj, SPHERE_RADIUS, 16, 16); - glEndList(); -} - -int -main(int ac, char **av) -{ - fprintf(stderr, - "Ray V1.0\nWritten by David Bucciarelli (tech.hmw@plus.it)\n"); - - /* - if(!SetPriorityClass(GetCurrentProcess(),REALTIME_PRIORITY_CLASS)) { - fprintf(stderr,"Error setting the process class.\n"); - return 0; - } - - if(!SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_TIME_CRITICAL)) { - fprintf(stderr,"Error setting the process priority.\n"); - return 0; - } - */ - - glutInitWindowPosition(0, 0); - glutInitWindowSize(WIDTH, HEIGHT); - glutInit(&ac, av); - - glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); - - if (!(win = glutCreateWindow("Ray"))) { - fprintf(stderr, "Error, couldn't open window\n"); - return -1; - } - - reshape(WIDTH, HEIGHT); - - glShadeModel(GL_FLAT); - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_LEQUAL); - glEnable(GL_CULL_FACE); - glEnable(GL_TEXTURE_2D); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - glEnable(GL_FOG); - glFogi(GL_FOG_MODE, GL_EXP2); - glFogfv(GL_FOG_COLOR, fogcolor); - - glFogf(GL_FOG_DENSITY, 0.01); -#ifdef FX - glHint(GL_FOG_HINT, GL_NICEST); -#endif - - calcposobs(); - - initspherepos(); - - inittextures(); - initdlists(); - - glClearColor(fogcolor[0], fogcolor[1], fogcolor[2], fogcolor[3]); - - glutReshapeFunc(reshape); - glutDisplayFunc(draw); - glutKeyboardFunc(key); - glutSpecialFunc(special); - glutIdleFunc(draw); - - glutMainLoop(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/readpix.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/readpix.c deleted file mode 100644 index 75ba45c1e5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/readpix.c +++ /dev/null @@ -1,344 +0,0 @@ - -/* - * glReadPixels and glCopyPixels test - * - * Brian Paul March 1, 2000 This file is in the public domain. - */ - -#include -#include -#include -#include -#include -#include - -#include "readtex.h" - -#define IMAGE_FILE "../images/girl.rgb" - -static int ImgWidth, ImgHeight; -static GLenum ImgFormat; -static GLubyte *Image = NULL; - -static int APosX, APosY; /* simple drawpixels */ -static int BPosX, BPosY; /* read/draw pixels */ -static int CPosX, CPosY; /* copypixels */ - -static GLboolean DrawFront = GL_FALSE; -static GLboolean ScaleAndBias = GL_FALSE; -static GLboolean Benchmark = GL_FALSE; -static GLubyte *TempImage = NULL; - -#if 0 -#define ReadFormat ImgFormat -#define ReadType GL_UNSIGNED_BYTE -#endif -#if 1 -static GLenum ReadFormat = GL_RGBA; -static GLenum ReadType = GL_UNSIGNED_BYTE; -#endif -#if 0 -static GLenum ReadFormat = GL_RGB; -static GLenum ReadType = GL_UNSIGNED_BYTE; -#endif -#if 0 -static GLenum ReadFormat = GL_RGB; -static GLenum ReadType = GL_UNSIGNED_SHORT_5_6_5; -#endif -#if 0 -static GLenum ReadFormat = GL_RGBA; -static GLenum ReadType = GL_UNSIGNED_SHORT_1_5_5_5_REV; -#endif -#if 0 -static GLenum ReadFormat = GL_BGRA; -static GLenum ReadType = GL_UNSIGNED_SHORT_5_5_5_1; -#endif -#if 0 -static GLenum ReadFormat = GL_BGRA; -static GLenum ReadType = GL_UNSIGNED_SHORT_4_4_4_4_REV; -#endif - - -static void -Reset( void ) -{ - APosX = 5; APosY = 20; - BPosX = APosX + ImgWidth + 5; BPosY = 20; - CPosX = BPosX + ImgWidth + 5; CPosY = 20; -} - - -static void -PrintString(const char *s) -{ - while (*s) { - glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s); - s++; - } -} - - -static void -SetupPixelTransfer(GLboolean invert) -{ - if (invert) { - glPixelTransferf(GL_RED_SCALE, -1.0); - glPixelTransferf(GL_RED_BIAS, 1.0); - glPixelTransferf(GL_GREEN_SCALE, -1.0); - glPixelTransferf(GL_GREEN_BIAS, 1.0); - glPixelTransferf(GL_BLUE_SCALE, -1.0); - glPixelTransferf(GL_BLUE_BIAS, 1.0); - } - else { - glPixelTransferf(GL_RED_SCALE, 1.0); - glPixelTransferf(GL_RED_BIAS, 0.0); - glPixelTransferf(GL_GREEN_SCALE, 1.0); - glPixelTransferf(GL_GREEN_BIAS, 0.0); - glPixelTransferf(GL_BLUE_SCALE, 1.0); - glPixelTransferf(GL_BLUE_BIAS, 0.0); - } -} - - -/** - * Exercise Pixel Pack parameters by reading the image in four pieces. - */ -static void -ComplexReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, GLvoid *pixels) -{ - const GLsizei width0 = width / 2; - const GLsizei width1 = width - width0; - const GLsizei height0 = height / 2; - const GLsizei height1 = height - height0; - - glPixelStorei(GL_PACK_ROW_LENGTH, width); - - /* lower-left quadrant */ - glReadPixels(x, y, width0, height0, format, type, pixels); - - /* lower-right quadrant */ - glPixelStorei(GL_PACK_SKIP_PIXELS, width0); - glReadPixels(x + width0, y, width1, height0, format, type, pixels); - - /* upper-left quadrant */ - glPixelStorei(GL_PACK_SKIP_PIXELS, 0); - glPixelStorei(GL_PACK_SKIP_ROWS, height0); - glReadPixels(x, y + height0, width0, height1, format, type, pixels); - - /* upper-right quadrant */ - glPixelStorei(GL_PACK_SKIP_PIXELS, width0); - glPixelStorei(GL_PACK_SKIP_ROWS, height0); - glReadPixels(x + width0, y + height0, width1, height1, format, type, pixels); - - /* restore defaults */ - glPixelStorei(GL_PACK_SKIP_PIXELS, 0); - glPixelStorei(GL_PACK_SKIP_ROWS, 0); - glPixelStorei(GL_PACK_ROW_LENGTH, ImgWidth); -} - - - -static void -Display( void ) -{ - glClearColor(.3, .3, .3, 1); - glClear( GL_COLOR_BUFFER_BIT ); - - glRasterPos2i(5, ImgHeight+25); - PrintString("f = toggle front/back s = toggle scale/bias b = benchmark"); - - /* draw original image */ - glRasterPos2i(APosX, 5); - PrintString("Original"); - glRasterPos2i(APosX, APosY); - glEnable(GL_DITHER); - SetupPixelTransfer(GL_FALSE); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glDrawPixels(ImgWidth, ImgHeight, ImgFormat, GL_UNSIGNED_BYTE, Image); - - /* might try alignment=4 here for testing */ - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glPixelStorei(GL_PACK_ALIGNMENT, 1); - - /* do readpixels, drawpixels */ - glRasterPos2i(BPosX, 5); - PrintString("Read/DrawPixels"); - SetupPixelTransfer(ScaleAndBias); - if (Benchmark) { - GLint reads = 0; - GLint endTime; - GLint startTime = glutGet(GLUT_ELAPSED_TIME); - GLdouble seconds, pixelsPerSecond; - printf("Benchmarking...\n"); - do { - glReadPixels(APosX, APosY, ImgWidth, ImgHeight, - ReadFormat, ReadType, TempImage); - reads++; - endTime = glutGet(GLUT_ELAPSED_TIME); - } while (endTime - startTime < 4000); /* 4 seconds */ - seconds = (double) (endTime - startTime) / 1000.0; - pixelsPerSecond = reads * ImgWidth * ImgHeight / seconds; - printf("Result: %d reads in %f seconds = %f pixels/sec\n", - reads, seconds, pixelsPerSecond); - Benchmark = GL_FALSE; - } - else { - /* clear the temporary image to white (helpful for debugging */ - memset(TempImage, 255, ImgWidth * ImgHeight * 4); -#if 1 - glReadPixels(APosX, APosY, ImgWidth, ImgHeight, - ReadFormat, ReadType, TempImage); - (void) ComplexReadPixels; -#else - /* you might use this when debugging */ - ComplexReadPixels(APosX, APosY, ImgWidth, ImgHeight, - ReadFormat, ReadType, TempImage); -#endif - } - glRasterPos2i(BPosX, BPosY); - glDisable(GL_DITHER); - SetupPixelTransfer(GL_FALSE); - glDrawPixels(ImgWidth, ImgHeight, ReadFormat, ReadType, TempImage); - - /* do copypixels */ - glRasterPos2i(CPosX, 5); - PrintString("CopyPixels"); - glRasterPos2i(CPosX, CPosY); - glDisable(GL_DITHER); - SetupPixelTransfer(ScaleAndBias); - glCopyPixels(APosX, APosY, ImgWidth, ImgHeight, GL_COLOR); - - if (!DrawFront) - glutSwapBuffers(); - else - glFinish(); -} - - -static void -Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( 0.0, width, 0.0, height, -1.0, 1.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); -} - - -static void -Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 'b': - Benchmark = GL_TRUE; - break; - case 's': - ScaleAndBias = !ScaleAndBias; - break; - case 'f': - DrawFront = !DrawFront; - if (DrawFront) { - glDrawBuffer(GL_FRONT); - glReadBuffer(GL_FRONT); - } - else { - glDrawBuffer(GL_BACK); - glReadBuffer(GL_BACK); - } - printf("glDrawBuffer(%s)\n", DrawFront ? "GL_FRONT" : "GL_BACK"); - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void -Init( GLboolean ciMode ) -{ - GLboolean have_read_format = GL_FALSE; - - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - - Image = LoadRGBImage( IMAGE_FILE, &ImgWidth, &ImgHeight, &ImgFormat ); - if (!Image) { - printf("Couldn't read %s\n", IMAGE_FILE); - exit(0); - } - - if (ciMode) { - /* Convert RGB image to grayscale */ - GLubyte *indexImage = (GLubyte *) malloc( ImgWidth * ImgHeight ); - GLint i; - for (i=0; i 1 && strcmp(argv[1], "-ci")==0) { - ciMode = GL_TRUE; - } - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 750, 250 ); - if (ciMode) - glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE ); - else - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0]); - Init(ciMode); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/reflect.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/reflect.c deleted file mode 100644 index bf6d91aaad..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/reflect.c +++ /dev/null @@ -1,404 +0,0 @@ - -/* - * Demo of a reflective, texture-mapped surface with OpenGL. - * Brian Paul August 14, 1995 This file is in the public domain. - * - * Hardware texture mapping is highly recommended! - * - * The basic steps are: - * 1. Render the reflective object (a polygon) from the normal viewpoint, - * setting the stencil planes = 1. - * 2. Render the scene from a special viewpoint: the viewpoint which - * is on the opposite side of the reflective plane. Only draw where - * stencil = 1. This draws the objects in the reflective surface. - * 3. Render the scene from the original viewpoint. This draws the - * objects in the normal fashion. Use blending when drawing - * the reflective, textured surface. - * - * This is a very crude demo. It could be much better. - */ - -/* - * Authors: - * Brian Paul - * Dirk Reiners (reiners@igd.fhg.de) made some modifications to this code. - * Mark Kilgard (April 1997) - * Brian Paul (April 2000 - added keyboard d/s options) - */ - - -#include -#include -#include -#include "GL/glut.h" -#include "showbuffer.h" -#include "readtex.h" - - -#define DEG2RAD (3.14159/180.0) - -#define TABLE_TEXTURE "../images/tile.rgb" - -static GLint ImgWidth, ImgHeight; -static GLenum ImgFormat; -static GLubyte *Image = NULL; - -#define MAX_OBJECTS 2 -static GLint table_list; -static GLint objects_list[MAX_OBJECTS]; - -static GLfloat xrot, yrot; -static GLfloat spin; - -static GLint Width = 400, Height = 300; -static GLenum ShowBuffer = GL_NONE; -static GLboolean Anim = GL_TRUE; - -/* performance info */ -static GLint T0 = 0; -static GLint Frames = 0; - - -static void make_table( void ) -{ - static GLfloat table_mat[] = { 1.0, 1.0, 1.0, 0.6 }; - static GLfloat gray[] = { 0.4, 0.4, 0.4, 1.0 }; - - table_list = glGenLists(1); - glNewList( table_list, GL_COMPILE ); - - /* load table's texture */ - glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, table_mat ); -/* glMaterialfv( GL_FRONT, GL_EMISSION, gray );*/ - glMaterialfv( GL_FRONT, GL_DIFFUSE, table_mat ); - glMaterialfv( GL_FRONT, GL_AMBIENT, gray ); - - /* draw textured square for the table */ - glPushMatrix(); - glScalef( 4.0, 4.0, 4.0 ); - glBegin( GL_POLYGON ); - glNormal3f( 0.0, 1.0, 0.0 ); - glTexCoord2f( 0.0, 0.0 ); glVertex3f( -1.0, 0.0, 1.0 ); - glTexCoord2f( 1.0, 0.0 ); glVertex3f( 1.0, 0.0, 1.0 ); - glTexCoord2f( 1.0, 1.0 ); glVertex3f( 1.0, 0.0, -1.0 ); - glTexCoord2f( 0.0, 1.0 ); glVertex3f( -1.0, 0.0, -1.0 ); - glEnd(); - glPopMatrix(); - - glDisable( GL_TEXTURE_2D ); - - glEndList(); -} - - -static void make_objects( void ) -{ - GLUquadricObj *q; - - static GLfloat cyan[] = { 0.0, 1.0, 1.0, 1.0 }; - static GLfloat green[] = { 0.2, 1.0, 0.2, 1.0 }; - static GLfloat black[] = { 0.0, 0.0, 0.0, 0.0 }; - - q = gluNewQuadric(); - gluQuadricDrawStyle( q, GLU_FILL ); - gluQuadricNormals( q, GLU_SMOOTH ); - - objects_list[0] = glGenLists(1); - glNewList( objects_list[0], GL_COMPILE ); - glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, cyan ); - glMaterialfv( GL_FRONT, GL_EMISSION, black ); - gluCylinder( q, 0.5, 0.5, 1.0, 15, 1 ); - glEndList(); - - objects_list[1] = glGenLists(1); - glNewList( objects_list[1], GL_COMPILE ); - glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green ); - glMaterialfv( GL_FRONT, GL_EMISSION, black ); - gluCylinder( q, 1.5, 0.0, 2.5, 15, 1 ); - glEndList(); -} - - -static void init( void ) -{ - make_table(); - make_objects(); - - Image = LoadRGBImage( TABLE_TEXTURE, &ImgWidth, &ImgHeight, &ImgFormat ); - if (!Image) { - printf("Couldn't read %s\n", TABLE_TEXTURE); - exit(0); - } - - gluBuild2DMipmaps(GL_TEXTURE_2D, 3, ImgWidth, ImgHeight, - ImgFormat, GL_UNSIGNED_BYTE, Image); - - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); - - xrot = 30.0; - yrot = 50.0; - spin = 0.0; - - glShadeModel( GL_FLAT ); - - glEnable( GL_LIGHT0 ); - glEnable( GL_LIGHTING ); - - glClearColor( 0.5, 0.5, 0.9, 0.0 ); - - glEnable( GL_NORMALIZE ); -} - - - -static void reshape(int w, int h) -{ - GLfloat yAspect = 2.5; - GLfloat xAspect = yAspect * (float) w / (float) h; - Width = w; - Height = h; - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum( -xAspect, xAspect, -yAspect, yAspect, 10.0, 30.0 ); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - - - -static void draw_objects( GLfloat eyex, GLfloat eyey, GLfloat eyez ) -{ - (void) eyex; - (void) eyey; - (void) eyez; -#ifndef USE_ZBUFFER - if (eyex<0.5) { -#endif - glPushMatrix(); - glTranslatef( 1.0, 1.5, 0.0 ); - glRotatef( spin, 1.0, 0.5, 0.0 ); - glRotatef( 0.5*spin, 0.0, 0.5, 1.0 ); - glCallList( objects_list[0] ); - glPopMatrix(); - - glPushMatrix(); - glTranslatef( -1.0, 0.85+3.0*fabs( cos(0.01*spin) ), 0.0 ); - glRotatef( 0.5*spin, 0.0, 0.5, 1.0 ); - glRotatef( spin, 1.0, 0.5, 0.0 ); - glScalef( 0.5, 0.5, 0.5 ); - glCallList( objects_list[1] ); - glPopMatrix(); -#ifndef USE_ZBUFFER - } - else { - glPushMatrix(); - glTranslatef( -1.0, 0.85+3.0*fabs( cos(0.01*spin) ), 0.0 ); - glRotatef( 0.5*spin, 0.0, 0.5, 1.0 ); - glRotatef( spin, 1.0, 0.5, 0.0 ); - glScalef( 0.5, 0.5, 0.5 ); - glCallList( objects_list[1] ); - glPopMatrix(); - - glPushMatrix(); - glTranslatef( 1.0, 1.5, 0.0 ); - glRotatef( spin, 1.0, 0.5, 0.0 ); - glRotatef( 0.5*spin, 0.0, 0.5, 1.0 ); - glCallList( objects_list[0] ); - glPopMatrix(); - } -#endif -} - - - -static void draw_table( void ) -{ - glCallList( table_list ); -} - - - -static void draw_scene( void ) -{ - static GLfloat light_pos[] = { 0.0, 20.0, 0.0, 1.0 }; - GLfloat dist = 20.0; - GLfloat eyex, eyey, eyez; - - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - - - eyex = dist * cos(yrot*DEG2RAD) * cos(xrot*DEG2RAD); - eyez = dist * sin(yrot*DEG2RAD) * cos(xrot*DEG2RAD); - eyey = dist * sin(xrot*DEG2RAD); - - /* view from top */ - glPushMatrix(); - gluLookAt( eyex, eyey, eyez, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 ); - - glLightfv( GL_LIGHT0, GL_POSITION, light_pos ); - - /* draw table into stencil planes */ - glDisable( GL_DEPTH_TEST ); - glEnable( GL_STENCIL_TEST ); - glStencilFunc( GL_ALWAYS, 1, 0xffffffff ); - glStencilOp( GL_REPLACE, GL_REPLACE, GL_REPLACE ); - glColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE ); - draw_table(); - glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE ); - - glEnable( GL_DEPTH_TEST ); - - /* render view from below (reflected viewport) */ - /* only draw where stencil==1 */ - if (eyey>0.0) { - glPushMatrix(); - - glStencilFunc( GL_EQUAL, 1, 0xffffffff ); /* draw if ==1 */ - glStencilOp( GL_KEEP, GL_KEEP, GL_KEEP ); - glScalef( 1.0, -1.0, 1.0 ); - - /* Reposition light in reflected space. */ - glLightfv(GL_LIGHT0, GL_POSITION, light_pos); - - draw_objects(eyex, eyey, eyez); - glPopMatrix(); - - /* Restore light's original unreflected position. */ - glLightfv(GL_LIGHT0, GL_POSITION, light_pos); - } - - glDisable( GL_STENCIL_TEST ); - - glEnable( GL_BLEND ); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); - - glEnable( GL_TEXTURE_2D ); - draw_table(); - glDisable( GL_TEXTURE_2D ); - glDisable( GL_BLEND ); - - /* view from top */ - glPushMatrix(); - - draw_objects(eyex, eyey, eyez); - - glPopMatrix(); - - glPopMatrix(); - - if (ShowBuffer == GL_DEPTH) { - ShowDepthBuffer(Width, Height, 1.0, 0.0); - } - else if (ShowBuffer == GL_STENCIL) { - ShowStencilBuffer(Width, Height, 255.0, 0.0); - } - else if (ShowBuffer == GL_ALPHA) { - ShowAlphaBuffer(Width, Height); - } - - glutSwapBuffers(); - - { - GLint t = glutGet(GLUT_ELAPSED_TIME); - Frames++; - if (t - T0 >= 5000) { - GLfloat seconds = (t - T0) / 1000.0; - GLfloat fps = Frames / seconds; - printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps); - T0 = t; - Frames = 0; - } - } -} - - -static void idle( void ) -{ - static double t0 = -1.; - double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0; - if (t0 < 0.0) - t0 = t; - dt = t - t0; - t0 = t; - spin += 60.0 * dt; - yrot += 90.0 * dt; - glutPostRedisplay(); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - if (key == 'd') { - ShowBuffer = GL_DEPTH; - } - else if (key == 's') { - ShowBuffer = GL_STENCIL; - } - else if (key == 'a') { - ShowBuffer = GL_ALPHA; - } - else if (key == ' ') { - Anim = !Anim; - if (Anim) - glutIdleFunc(idle); - else - glutIdleFunc(NULL); - } - else if (key==27) { - exit(0); - } - else { - ShowBuffer = GL_NONE; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - xrot += 3.0; - if ( xrot > 85 ) - xrot = 85; - break; - case GLUT_KEY_DOWN: - xrot -= 3.0; - if ( xrot < 5 ) - xrot = 5; - break; - case GLUT_KEY_LEFT: - yrot += 3.0; - break; - case GLUT_KEY_RIGHT: - yrot -= 3.0; - break; - } - glutPostRedisplay(); -} - - -int main( int argc, char *argv[] ) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL | GLUT_ALPHA); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( Width, Height ); - glutCreateWindow(argv[0]); - glutReshapeFunc(reshape); - glutDisplayFunc(draw_scene); - glutKeyboardFunc(Key); - glutSpecialFunc(SpecialKey); - glutIdleFunc(idle); - init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/renormal.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/renormal.c deleted file mode 100644 index 9e5da95484..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/renormal.c +++ /dev/null @@ -1,139 +0,0 @@ - -/* - * Test GL_EXT_rescale_normal extension - * Brian Paul January 1998 This program is in the public domain. - */ - -#include -#include -#include -#include - - -static GLfloat Phi = 0.0; - - -static void Idle( void ) -{ - static double t0 = -1.; - double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0; - if (t0 < 0.0) - t0 = t; - dt = t - t0; - t0 = t; - Phi += 3.0 * dt; - glutPostRedisplay(); -} - - -static void Display( void ) -{ - GLfloat scale = 0.6 + 0.5 * sin(Phi); - glClear( GL_COLOR_BUFFER_BIT ); - glPushMatrix(); - glScalef(scale, scale, scale); - glutSolidSphere(2.0, 20, 20); - glPopMatrix(); - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - - -static void Init( void ) -{ - static GLfloat mat[4] = { 0.8, 0.8, 0.0, 1.0 }; - static GLfloat pos[4] = { -1.0, 1.0, 1.0, 0.0 }; - - /* setup lighting, etc */ - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, mat); - glLightfv(GL_LIGHT0, GL_POSITION, pos); - - glEnable(GL_CULL_FACE); - - glDisable(GL_RESCALE_NORMAL_EXT); - glDisable(GL_NORMALIZE); -} - - -#define UNSCALED 1 -#define NORMALIZE 2 -#define RESCALE 3 -#define QUIT 4 - - -static void ModeMenu(int entry) -{ - if (entry==UNSCALED) { - glDisable(GL_RESCALE_NORMAL_EXT); - glDisable(GL_NORMALIZE); - } - else if (entry==NORMALIZE) { - glEnable(GL_NORMALIZE); - glDisable(GL_RESCALE_NORMAL_EXT); - } - else if (entry==RESCALE) { - glDisable(GL_NORMALIZE); - glEnable(GL_RESCALE_NORMAL_EXT); - } - else if (entry==QUIT) { - exit(0); - } - glutPostRedisplay(); -} - -static void -key(unsigned char k, int x, int y) -{ - (void) x; - (void) y; - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition(0, 0); - glutInitWindowSize( 400, 400 ); - - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - - glutCreateWindow(argv[0]); - - Init(); - - glutIdleFunc( Idle ); - glutReshapeFunc( Reshape ); - glutDisplayFunc( Display ); - glutKeyboardFunc(key); - - glutCreateMenu(ModeMenu); - glutAddMenuEntry("Unscaled", UNSCALED); - glutAddMenuEntry("Normalize", NORMALIZE); - glutAddMenuEntry("Rescale EXT", RESCALE); - glutAddMenuEntry("Quit", QUIT); - glutAttachMenu(GLUT_RIGHT_BUTTON); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/shadowtex.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/shadowtex.c deleted file mode 100644 index e918751a7a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/shadowtex.c +++ /dev/null @@ -1,600 +0,0 @@ -/* - * Shadow demo using the GL_ARB_depth_texture, GL_ARB_shadow and - * GL_ARB_shadow_ambient extensions (or the old SGIX extensions). - * - * Brian Paul - * 19 Feb 2001 - * - * Added GL_EXT_shadow_funcs support on 23 March 2002 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include -#include -#include -#include -#include -#include "showbuffer.h" - -#if 0 /* change to 1 if you want to use the old SGIX extensions */ -#undef GL_ARB_depth_texture -#undef GL_ARB_shadow -#undef GL_ARB_shadow_ambient -#endif - - -#define DEG_TO_RAD (3.14159 / 180.0) - -static GLint WindowWidth = 450, WindowHeight = 300; -static GLfloat Xrot = 15, Yrot = 0, Zrot = 0; - -static GLfloat Red[4] = {1, 0, 0, 1}; -static GLfloat Green[4] = {0, 1, 0, 1}; -static GLfloat Blue[4] = {0, 0, 1, 1}; -static GLfloat Yellow[4] = {1, 1, 0, 1}; - -static GLfloat LightDist = 10; -static GLfloat LightLatitude = 45.0; -static GLfloat LightLongitude = 45.0; -static GLfloat LightPos[4]; -static GLfloat SpotDir[3]; -static GLfloat SpotAngle = 40.0 * DEG_TO_RAD; -static GLfloat ShadowNear = 4.0, ShadowFar = 24.0; -static GLint ShadowTexWidth = 256, ShadowTexHeight = 256; - -static GLboolean LinearFilter = GL_FALSE; - -static GLfloat Bias = -0.06; - -static GLboolean Anim = GL_TRUE; - -static GLboolean HaveEXTshadowFuncs = GL_FALSE; -static GLint Operator = 0; -static const GLenum OperatorFunc[8] = { - GL_LEQUAL, GL_LESS, GL_GEQUAL, GL_GREATER, - GL_EQUAL, GL_NOTEQUAL, GL_ALWAYS, GL_NEVER }; -static const char *OperatorName[8] = { - "GL_LEQUAL", "GL_LESS", "GL_GEQUAL", "GL_GREATER", - "GL_EQUAL", "GL_NOTEQUAL", "GL_ALWAYS", "GL_NEVER" }; - - -static GLuint DisplayMode; -#define SHOW_NORMAL 0 -#define SHOW_DEPTH_IMAGE 1 -#define SHOW_DEPTH_MAPPING 2 -#define SHOW_DISTANCE 3 - - - -static void -DrawScene(void) -{ - GLfloat k = 6; - /* sphere */ - glPushMatrix(); - glTranslatef(1.6, 2.2, 2.7); - glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Green); - glColor4fv(Green); - glutSolidSphere(1.5, 15, 15); - glPopMatrix(); - /* dodecahedron */ - glPushMatrix(); - glTranslatef(-2.0, 1.2, 2.1); - glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Red); - glColor4fv(Red); - glutSolidDodecahedron(); - glPopMatrix(); - /* icosahedron */ - glPushMatrix(); - glTranslatef(-0.6, 1.3, -0.5); - glScalef(1.5, 1.5, 1.5); - glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Yellow); - glColor4fv(Red); - glutSolidIcosahedron(); - glPopMatrix(); - /* a plane */ - glPushMatrix(); - glTranslatef(0, -1.1, 0); - glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Blue); - glColor4fv(Blue); - glNormal3f(0, 1, 0); - glBegin(GL_POLYGON); - glVertex3f(-k, 0, -k); - glVertex3f( k, 0, -k); - glVertex3f( k, 0, k); - glVertex3f(-k, 0, k); - glEnd(); - glPopMatrix(); -} - - -/* - * Load the GL_TEXTURE matrix with the projection from the light - * source's point of view. - */ -static void -MakeShadowMatrix(const GLfloat lightPos[4], const GLfloat spotDir[3], - GLfloat spotAngle, GLfloat shadowNear, GLfloat shadowFar) -{ - GLfloat d; - - glMatrixMode(GL_TEXTURE); - glLoadIdentity(); - glTranslatef(0.5, 0.5, 0.5 + Bias); - glScalef(0.5, 0.5, 0.5); - d = shadowNear * tan(spotAngle); - glFrustum(-d, d, -d, d, shadowNear, shadowFar); - gluLookAt(lightPos[0], lightPos[1], lightPos[2], - lightPos[0] + spotDir[0], - lightPos[1] + spotDir[1], - lightPos[2] + spotDir[2], - 0, 1, 0); - glMatrixMode(GL_MODELVIEW); -} - - -static void -EnableIdentityTexgen(void) -{ - /* texgen so that texcoord = vertex coord */ - static GLfloat sPlane[4] = { 1, 0, 0, 0 }; - static GLfloat tPlane[4] = { 0, 1, 0, 0 }; - static GLfloat rPlane[4] = { 0, 0, 1, 0 }; - static GLfloat qPlane[4] = { 0, 0, 0, 1 }; - - glTexGenfv(GL_S, GL_EYE_PLANE, sPlane); - glTexGenfv(GL_T, GL_EYE_PLANE, tPlane); - glTexGenfv(GL_R, GL_EYE_PLANE, rPlane); - glTexGenfv(GL_Q, GL_EYE_PLANE, qPlane); - glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); - glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); - glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); - glTexGeni(GL_Q, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); - - glEnable(GL_TEXTURE_GEN_S); - glEnable(GL_TEXTURE_GEN_T); - glEnable(GL_TEXTURE_GEN_R); - glEnable(GL_TEXTURE_GEN_Q); -} - - -/* - * Setup 1-D texgen so that the distance from the light source, between - * the near and far planes maps to s=0 and s=1. When we draw the scene, - * the grayness will indicate the fragment's distance from the light - * source. - */ -static void -EnableDistanceTexgen(const GLfloat lightPos[4], const GLfloat lightDir[3], - GLfloat lightNear, GLfloat lightFar) -{ - GLfloat m, d; - GLfloat sPlane[4]; - GLfloat nearPoint[3]; - - m = sqrt(lightDir[0] * lightDir[0] + - lightDir[1] * lightDir[1] + - lightDir[2] * lightDir[2]); - - d = lightFar - lightNear; - - /* nearPoint = point on light direction vector which intersects the - * near plane of the light frustum. - */ - nearPoint[0] = LightPos[0] + lightDir[0] / m * lightNear; - nearPoint[1] = LightPos[1] + lightDir[1] / m * lightNear; - nearPoint[2] = LightPos[2] + lightDir[2] / m * lightNear; - - sPlane[0] = lightDir[0] / d / m; - sPlane[1] = lightDir[1] / d / m; - sPlane[2] = lightDir[2] / d / m; - sPlane[3] = -(sPlane[0] * nearPoint[0] - + sPlane[1] * nearPoint[1] - + sPlane[2] * nearPoint[2]); - - glTexGenfv(GL_S, GL_EYE_PLANE, sPlane); - glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); - glEnable(GL_TEXTURE_GEN_S); -} - - -static void -DisableTexgen(void) -{ - glDisable(GL_TEXTURE_GEN_S); - glDisable(GL_TEXTURE_GEN_T); - glDisable(GL_TEXTURE_GEN_R); - glDisable(GL_TEXTURE_GEN_Q); -} - - -static void -ComputeLightPos(GLfloat dist, GLfloat latitude, GLfloat longitude, - GLfloat pos[4], GLfloat dir[3]) -{ - - pos[0] = dist * sin(longitude * DEG_TO_RAD); - pos[1] = dist * sin(latitude * DEG_TO_RAD); - pos[2] = dist * cos(latitude * DEG_TO_RAD) * cos(longitude * DEG_TO_RAD); - pos[3] = 1; - dir[0] = -pos[0]; - dir[1] = -pos[1]; - dir[2] = -pos[2]; -} - - -static void -Display(void) -{ - GLfloat ar = (GLfloat) WindowWidth / (GLfloat) WindowHeight; - GLfloat d; - GLenum error; - - ComputeLightPos(LightDist, LightLatitude, LightLongitude, - LightPos, SpotDir); - /* - * Step 1: render scene from point of view of the light source - */ - /* compute frustum to enclose spot light cone */ - d = ShadowNear * tan(SpotAngle); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-d, d, -d, d, ShadowNear, ShadowFar); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - gluLookAt(LightPos[0], LightPos[1], LightPos[2], /* from */ - 0, 0, 0, /* target */ - 0, 1, 0); /* up */ - - glViewport(0, 0, ShadowTexWidth, ShadowTexHeight); - glClear(GL_DEPTH_BUFFER_BIT); - DrawScene(); - - /* - * Step 2: copy depth buffer into texture map - */ - if (DisplayMode == SHOW_DEPTH_MAPPING) { - /* load depth image as gray-scale luminance texture */ - GLfloat *depth = (GLfloat *) malloc(ShadowTexWidth * ShadowTexHeight - * sizeof(GLfloat)); - if (depth) { - glReadPixels(0, 0, ShadowTexWidth, ShadowTexHeight, - GL_DEPTH_COMPONENT, GL_FLOAT, depth); - glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, - ShadowTexWidth, ShadowTexHeight, 0, - GL_LUMINANCE, GL_FLOAT, depth); - free(depth); - } - } - else { - /* The normal shadow case */ - glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, - 0, 0, ShadowTexWidth, ShadowTexHeight, 0); - } - - /* - * Step 3: render scene from point of view of the camera - */ - glViewport(0, 0, WindowWidth, WindowHeight); - if (DisplayMode == SHOW_DEPTH_IMAGE) { - ShowDepthBuffer(WindowWidth, WindowHeight, 0, 1); - } - else { - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-ar, ar, -1.0, 1.0, 4.0, 50.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -22.0); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - glRotatef(Zrot, 0, 0, 1); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glLightfv(GL_LIGHT0, GL_POSITION, LightPos); - if (LinearFilter) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - } - else { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } - if (DisplayMode == SHOW_DEPTH_MAPPING) { -#if defined(GL_ARB_shadow) - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE); -#elif defined(GL_SGIX_shadow) - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_SGIX, GL_FALSE); -#endif - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - glEnable(GL_TEXTURE_2D); - MakeShadowMatrix(LightPos, SpotDir, SpotAngle, ShadowNear, ShadowFar); - EnableIdentityTexgen(); - } - else if (DisplayMode == SHOW_DISTANCE) { - glMatrixMode(GL_TEXTURE); - glLoadIdentity(); - glMatrixMode(GL_MODELVIEW); - EnableDistanceTexgen(LightPos, SpotDir, ShadowNear+Bias, ShadowFar); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - glEnable(GL_TEXTURE_1D); - } - else { - assert(DisplayMode == SHOW_NORMAL); -#if defined(GL_ARB_shadow) - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, - GL_COMPARE_R_TO_TEXTURE_ARB); -#elif defined(GL_SGIX_shadow) - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_SGIX, GL_TRUE); -#endif - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - glEnable(GL_TEXTURE_2D); - MakeShadowMatrix(LightPos, SpotDir, SpotAngle, ShadowNear, ShadowFar); - EnableIdentityTexgen(); - } - DrawScene(); - DisableTexgen(); - glDisable(GL_TEXTURE_1D); - glDisable(GL_TEXTURE_2D); - } - - glutSwapBuffers(); - - error = glGetError(); - if (error) { - printf("GL Error: %s\n", (char *) gluErrorString(error)); - } -} - - -static void -Reshape(int width, int height) -{ - WindowWidth = width; - WindowHeight = height; - if (width >= 512 && height >= 512) { - ShadowTexWidth = ShadowTexHeight = 512; - } - else if (width >= 256 && height >= 256) { - ShadowTexWidth = ShadowTexHeight = 256; - } - else { - ShadowTexWidth = ShadowTexHeight = 128; - } - printf("Using %d x %d depth texture\n", ShadowTexWidth, ShadowTexHeight); -} - - -static void -Idle(void) -{ - static double t0 = -1.; - double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0; - if (t0 < 0.0) - t0 = t; - dt = t - t0; - t0 = t; - Yrot += 75.0 * dt; - /*LightLongitude -= 5.0;*/ - glutPostRedisplay(); -} - - -static void -Key(unsigned char key, int x, int y) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 'b': - Bias -= 0.01; - printf("Bias %g\n", Bias); - break; - case 'B': - Bias += 0.01; - printf("Bias %g\n", Bias); - break; - case 'd': - DisplayMode = SHOW_DISTANCE; - break; - case 'f': - LinearFilter = !LinearFilter; - printf("%s filtering\n", LinearFilter ? "Bilinear" : "Nearest"); - break; - case 'i': - DisplayMode = SHOW_DEPTH_IMAGE; - break; - case 'm': - DisplayMode = SHOW_DEPTH_MAPPING; - break; - case 'n': - case ' ': - DisplayMode = SHOW_NORMAL; - break; - case 'o': - if (HaveEXTshadowFuncs) { - Operator++; - if (Operator >= 8) - Operator = 0; - printf("Operator: %s\n", OperatorName[Operator]); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, - OperatorFunc[Operator]); - } - break; - case 'z': - Zrot -= step; - break; - case 'Z': - Zrot += step; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void -SpecialKey(int key, int x, int y) -{ - const GLfloat step = 3.0; - const int mod = glutGetModifiers(); - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - if (mod) - LightLatitude += step; - else - Xrot += step; - break; - case GLUT_KEY_DOWN: - if (mod) - LightLatitude -= step; - else - Xrot -= step; - break; - case GLUT_KEY_LEFT: - if (mod) - LightLongitude += step; - else - Yrot += step; - break; - case GLUT_KEY_RIGHT: - if (mod) - LightLongitude -= step; - else - Yrot -= step; - break; - } - glutPostRedisplay(); -} - - -static void -Init(void) -{ -#if defined(GL_ARB_depth_texture) && defined(GL_ARB_shadow) - if (!glutExtensionSupported("GL_ARB_depth_texture") || - !glutExtensionSupported("GL_ARB_shadow")) { - printf("Sorry, this demo requires the GL_ARB_depth_texture and GL_ARB_shadow extensions\n"); - exit(1); - } - printf("Using GL_ARB_depth_texture and GL_ARB_shadow\n"); -#elif defined(GL_SGIX_depth_texture) && defined(GL_SGIX_shadow) - if (!glutExtensionSupported("GL_SGIX_depth_texture") || - !glutExtensionSupported("GL_SGIX_shadow")) { - printf("Sorry, this demo requires the GL_SGIX_depth_texture and GL_SGIX_shadow extensions\n"); - exit(1); - } - printf("Using GL_SGIX_depth_texture and GL_SGIX_shadow\n"); -#endif - HaveEXTshadowFuncs = glutExtensionSupported("GL_EXT_shadow_funcs"); - - glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP); - glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); -#if defined(GL_ARB_shadow) - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, - GL_COMPARE_R_TO_TEXTURE_ARB); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL); -#elif defined(GL_SGIX_shadow) - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_OPERATOR_SGIX, - GL_TEXTURE_LEQUAL_R_SGIX); -#endif - -#if defined(GL_ARB_shadow_ambient) - if (glutExtensionSupported("GL_ARB_shadow_ambient")) { - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FAIL_VALUE_ARB, 0.3); - printf("and GL_ARB_shadow_ambient\n"); - } -#elif defined(GL_SGIX_shadow_ambient) - if (glutExtensionSupported("GL_SGIX_shadow_ambient")) { - glTexParameterf(GL_TEXTURE_2D, GL_SHADOW_AMBIENT_SGIX, 0.3); - printf("and GL_SGIX_shadow_ambient\n"); - } -#endif - - /* setup 1-D grayscale texture image for SHOW_DISTANCE mode */ - { - GLuint i; - GLubyte image[256]; - for (i = 0; i < 256; i++) - image[i] = i; - glTexImage1D(GL_TEXTURE_1D, 0, GL_LUMINANCE, - 256, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, image); - } - - glEnable(GL_DEPTH_TEST); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); -} - - -static void -PrintHelp(void) -{ - printf("Keys:\n"); - printf(" a = toggle animation\n"); - printf(" i = show depth texture image\n"); - printf(" m = show depth texture mapping\n"); - printf(" d = show fragment distance from light source\n"); - printf(" n = show normal, shadowed image\n"); - printf(" f = toggle nearest/bilinear texture filtering\n"); - printf(" b/B = decrease/increase shadow map Z bias\n"); - printf(" cursor keys = rotate scene\n"); - printf(" + cursor keys = rotate light source\n"); - if (HaveEXTshadowFuncs) - printf(" o = cycle through comparison modes\n"); -} - - -int -main(int argc, char *argv[]) -{ - glutInit(&argc, argv); - glutInitWindowPosition(0, 0); - glutInitWindowSize(WindowWidth, WindowHeight); - glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); - glutCreateWindow(argv[0]); - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(SpecialKey); - glutDisplayFunc(Display); - if (Anim) - glutIdleFunc(Idle); - Init(); - PrintHelp(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/spectex.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/spectex.c deleted file mode 100644 index 6ab1191579..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/spectex.c +++ /dev/null @@ -1,272 +0,0 @@ - -/* - * GLUT demonstration of texturing with specular highlights. - * - * When drawing a lit, textured surface one usually wants the specular - * highlight to override the texture colors. However, OpenGL applies - * texturing after lighting so the specular highlight is modulated by - * the texture. - * - * The solution here shown here is a two-pass algorithm: - * 1. Draw the textured surface without specular lighting. - * 2. Enable blending to add the next pass: - * 3. Redraw the surface with a matte white material and only the - * specular components of light sources enabled. - * - * Brian Paul February 1997 - */ - -#include -#include -#include -#include - - -static GLUquadricObj *Quadric; -static GLuint Sphere; -static GLfloat LightPos[4] = {10.0, 10.0, 10.0, 1.0}; -static GLfloat Delta = 20.0; -static GLint Mode = 4; - -/*static GLfloat Blue[4] = {0.0, 0.0, 1.0, 1.0};*/ -/*static GLfloat Gray[4] = {0.5, 0.5, 0.5, 1.0};*/ -static GLfloat Black[4] = {0.0, 0.0, 0.0, 1.0}; -static GLfloat White[4] = {1.0, 1.0, 1.0, 1.0}; - -static GLboolean smooth = 1; - -static void -Idle(void) -{ - static double t0 = -1.; - double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;; - if (t0 < 0.0) - t0 = t; - dt = t - t0; - t0 = t; - LightPos[0] += Delta * dt; - if (LightPos[0]>15.0 || LightPos[0]<-15.0) - Delta = -Delta; - - glutPostRedisplay(); -} - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glLightfv(GL_LIGHT0, GL_POSITION, LightPos); - - glPushMatrix(); - glRotatef(90.0, 1.0, 0.0, 0.0); - - if (Mode==0) { - /* Typical method: diffuse + specular + texture */ - glEnable(GL_TEXTURE_2D); - glLightfv(GL_LIGHT0, GL_DIFFUSE, White); /* enable diffuse */ - glLightfv(GL_LIGHT0, GL_SPECULAR, White); /* enable specular */ -#ifdef GL_VERSION_1_2 - glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SINGLE_COLOR); -#endif - glCallList(Sphere); - } - else if (Mode==1) { - /* just specular highlight */ - glDisable(GL_TEXTURE_2D); - glLightfv(GL_LIGHT0, GL_DIFFUSE, Black); /* disable diffuse */ - glLightfv(GL_LIGHT0, GL_SPECULAR, White); /* enable specular */ -#ifdef GL_VERSION_1_2 - glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SINGLE_COLOR); -#endif - glCallList(Sphere); - } - else if (Mode==2) { - /* diffuse textured */ - glEnable(GL_TEXTURE_2D); - glLightfv(GL_LIGHT0, GL_DIFFUSE, White); /* enable diffuse */ - glLightfv(GL_LIGHT0, GL_SPECULAR, Black); /* disable specular */ -#ifdef GL_VERSION_1_2 - glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SINGLE_COLOR); -#endif - glCallList(Sphere); - } - else if (Mode==3) { - /* 2-pass: diffuse textured then add specular highlight*/ - glEnable(GL_TEXTURE_2D); - glLightfv(GL_LIGHT0, GL_DIFFUSE, White); /* enable diffuse */ - glLightfv(GL_LIGHT0, GL_SPECULAR, Black); /* disable specular */ -#ifdef GL_VERSION_1_2 - glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SINGLE_COLOR); -#endif - glCallList(Sphere); - /* specular highlight */ - glDepthFunc(GL_EQUAL); /* redraw same pixels */ - glDisable(GL_TEXTURE_2D); - glEnable(GL_BLEND); /* add */ - glLightfv(GL_LIGHT0, GL_DIFFUSE, Black); /* disable diffuse */ - glLightfv(GL_LIGHT0, GL_SPECULAR, White); /* enable specular */ - glCallList(Sphere); - glDepthFunc(GL_LESS); - glDisable(GL_BLEND); - } - else if (Mode==4) { - /* OpenGL 1.2's separate diffuse and specular color */ - glEnable(GL_TEXTURE_2D); - glLightfv(GL_LIGHT0, GL_DIFFUSE, White); /* enable diffuse */ - glLightfv(GL_LIGHT0, GL_SPECULAR, White); /* enable specular */ -#ifdef GL_VERSION_1_2 - glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR); -#endif - glCallList(Sphere); - } - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -12.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - case 's': - smooth = !smooth; - if (smooth) - glShadeModel(GL_SMOOTH); - else - glShadeModel(GL_FLAT); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - break; - case GLUT_KEY_DOWN: - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - int i, j; - GLubyte texImage[64][64][3]; - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 0); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, Black); - - glShadeModel(GL_SMOOTH); - - glMaterialfv(GL_FRONT, GL_DIFFUSE, White); - glMaterialfv(GL_FRONT, GL_SPECULAR, White); - glMaterialf(GL_FRONT, GL_SHININESS, 20.0); - - /* Actually, these are set again later */ - glLightfv(GL_LIGHT0, GL_DIFFUSE, White); - glLightfv(GL_LIGHT0, GL_SPECULAR, White); - - Quadric = gluNewQuadric(); - gluQuadricTexture( Quadric, GL_TRUE ); - - Sphere= glGenLists(1); - glNewList( Sphere, GL_COMPILE ); - gluSphere( Quadric, 1.0, 24, 24 ); - glEndList(); - - glEnable(GL_DEPTH_TEST); - glEnable(GL_CULL_FACE); - - for (i=0;i<64;i++) { - for (j=0;j<64;j++) { - int k = ((i>>3)&1) ^ ((j>>3)&1); - texImage[i][j][0] = 255*k; - texImage[i][j][1] = 255*(1-k); - texImage[i][j][2] = 0; - } - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glTexImage2D( GL_TEXTURE_2D, - 0, - 3, - 64, 64, - 0, - GL_RGB, GL_UNSIGNED_BYTE, - texImage ); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glEnable(GL_TEXTURE_2D); - - glBlendFunc(GL_ONE, GL_ONE); -} - - -static void ModeMenu(int entry) -{ - if (entry==99) - exit(0); - Mode = entry; -} - - -int main( int argc, char *argv[] ) -{ - - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 300, 300 ); - - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - - glutCreateWindow( "spectex" ); - - Init(); - - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - glutIdleFunc( Idle ); - - glutCreateMenu( ModeMenu ); - glutAddMenuEntry("1-pass lighting + texturing", 0); - glutAddMenuEntry("specular lighting", 1); - glutAddMenuEntry("diffuse lighting + texturing", 2); - glutAddMenuEntry("2-pass lighting + texturing", 3); -#ifdef GL_VERSION_1_2 - glutAddMenuEntry("OpenGL 1.2 separate specular", 4); -#endif - glutAddMenuEntry("Quit", 99); - glutAttachMenu(GLUT_RIGHT_BUTTON); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/spriteblast.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/spriteblast.c deleted file mode 100644 index d6e9a4de2f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/spriteblast.c +++ /dev/null @@ -1,554 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -/* This example demonstrates how to render particle effects - with OpenGL. A cloud of pinkish/orange particles explodes with the - particles bouncing off the ground. When the EXT_point_parameters - is present , the particle size is attenuated based on eye distance. */ - - -/* Modified by Brian Paul to test GL_ARB_point_sprite */ - - -#include -#include -#include -#include /* for cos(), sin(), and sqrt() */ -#ifdef _WIN32 -#include -#endif -#define GL_GLEXT_PROTOTYPES -#include - -/* Some files do not define M_PI... */ -#ifndef M_PI -#define M_PI 3.14159265 -#endif - -#if 0 /* For debugging. */ -#undef GL_EXT_point_parameters -#endif - -static GLfloat angle = -150; /* in degrees */ -static int spin = 0; -static int moving, begin; -static float theTime; -static int repeat = 1; -static int blend = 1; -int useMipmaps = 1; -int linearFiltering = 1; - -static GLfloat constant[3] = { .2, 0.0, 0.0 }; -static GLfloat linear[3] = { .0, .1, 0.0 }; -static GLfloat theQuad[3] = { .005, 0.1, 1/600.0 }; - -#define MAX_POINTS 2000 - -static int numPoints = 200; - -static GLfloat pointList[MAX_POINTS][3]; -static GLfloat pointTime[MAX_POINTS]; -static GLfloat pointVelocity[MAX_POINTS][2]; -static GLfloat pointDirection[MAX_POINTS][2]; -static int colorList[MAX_POINTS]; -static int animate = 1, motion = 0, org = 0, sprite = 1, smooth = 1; - -static GLfloat colorSet[][4] = { - /* Shades of red. */ - { 0.7, 0.2, 0.4, 0.5 }, - { 0.8, 0.0, 0.7, 0.5 }, - { 1.0, 0.0, 0.0, 0.5 }, - { 0.9, 0.3, 0.6, 0.5 }, - { 1.0, 0.4, 0.0, 0.5 }, - { 1.0, 0.0, 0.5, 0.5 }, -}; - -#define NUM_COLORS (sizeof(colorSet)/sizeof(colorSet[0])) - -#define DEAD (NUM_COLORS+1) - - -/* GL */ -static GLint spritePattern[16][16] = { - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0 }, - { 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0 }, - { 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0 }, - { 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0 }, - { 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0 }, - { 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0 }, - { 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0 }, - { 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0 }, - { 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0 }, - { 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } -}; - - - - -#if 0 /* drand48 might be better on Unix machines */ -#define RANDOM_RANGE(lo, hi) ((lo) + (hi - lo) * drand48()) -#else -static float float_rand(void) { return rand() / (float) RAND_MAX; } -#define RANDOM_RANGE(lo, hi) ((lo) + (hi - lo) * float_rand()) -#endif - -#define MEAN_VELOCITY 3.0 -#define GRAVITY 2.0 - -/* Modeling units of ground extent in each X and Z direction. */ -#define EDGE 12 - -static void -makePointList(void) -{ - float angle, velocity, direction; - int i; - - motion = 1; - for (i=0; i EDGE) { - /* Particle has hit ground past the distance duration of - the particles. Mark particle as dead. */ - colorList[i] = NUM_COLORS; /* Not moving. */ - continue; - } - - pointVelocity[i][1] *= 0.8; /* 80% of previous up velocity. */ - pointTime[i] = 0.0; /* Reset the particles sense of up time. */ - } - motion = 1; - pointTime[i] += dt; - } - theTime += dt; - if (!motion && !spin) { - if (repeat) { - makePointList(); - } else { - glutIdleFunc(NULL); - } - } -} - -static void -idle(void) -{ - updatePointList(); - if (spin) { - angle += 0.3; - } - glutPostRedisplay(); -} - -static void -visible(int vis) -{ - if (vis == GLUT_VISIBLE) { - if (animate && (motion || spin)) { - glutIdleFunc(idle); - } - } else { - glutIdleFunc(NULL); - } -} - -static void -redraw(void) -{ - int i; - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - glRotatef(15.0, 1.0, 0.0, 0.0); - glRotatef(angle, 0.0, 1.0, 0.0); - - glDepthMask(GL_FALSE); - - /* Draw the floor. */ -/* glEnable(GL_TEXTURE_2D);*/ - glColor3f(0.1, 0.5, 1.0); - glBegin(GL_QUADS); - glTexCoord2f(0.0, 0.0); - glVertex3f(-EDGE, -0.05, -EDGE); - glTexCoord2f(20.0, 0.0); - glVertex3f(EDGE, -0.05, -EDGE); - glTexCoord2f(20.0, 20.0); - glVertex3f(EDGE, -0.05, EDGE); - glTexCoord2f(0.0, 20.0); - glVertex3f(-EDGE, -0.05, EDGE); - glEnd(); - - /* Allow particles to blend with each other. */ - glDepthMask(GL_TRUE); - - if (blend) - glEnable(GL_BLEND); - - if (sprite) { - glEnable(GL_TEXTURE_2D); -#ifdef GL_ARB_point_sprite - glEnable(GL_POINT_SPRITE_ARB); -#endif - } - - glColor3f(1,1,1); - glBegin(GL_POINTS); - for (i=0; i -#include -#include -#include -#include -#include - - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -#define NOISE_TEXTURE 1 -#define GRADIENT_TEXTURE 2 - -#define TORUS 1 -#define SPHERE 2 - -static int tex_width=64, tex_height=64, tex_depth=64; -static float angx=0, angy=0, angz=0; -static int texgen = 2, animate = 1, smooth = 1, wireframe = 0; -static int CurTexture = NOISE_TEXTURE, CurObject = TORUS; - - -static void -BuildTorus(void) -{ - GLint i, j; - float theta1, phi1, theta2, phi2, rings, sides; - float v0[03], v1[3], v2[3], v3[3]; - float t0[03], t1[3], t2[3], t3[3]; - float n0[3], n1[3], n2[3], n3[3]; - float innerRadius = 0.25; - float outerRadius = 0.5; - float scalFac; - - rings = 16; - sides = 12; - scalFac = 1 / (outerRadius * 2); - - glNewList(TORUS, GL_COMPILE); - for (i = 0; i < rings; i++) { - theta1 = (float) i *2.0 * M_PI / rings; - theta2 = (float) (i + 1) * 2.0 * M_PI / rings; - for (j = 0; j < sides; j++) { - phi1 = (float) j *2.0 * M_PI / sides; - phi2 = (float) (j + 1) * 2.0 * M_PI / sides; - - v0[0] = cos(theta1) * (outerRadius + innerRadius * cos(phi1)); - v0[1] = -sin(theta1) * (outerRadius + innerRadius * cos(phi1)); - v0[2] = innerRadius * sin(phi1); - - v1[0] = cos(theta2) * (outerRadius + innerRadius * cos(phi1)); - v1[1] = -sin(theta2) * (outerRadius + innerRadius * cos(phi1)); - v1[2] = innerRadius * sin(phi1); - v2[0] = cos(theta2) * (outerRadius + innerRadius * cos(phi2)); - v2[1] = -sin(theta2) * (outerRadius + innerRadius * cos(phi2)); - v2[2] = innerRadius * sin(phi2); - - v3[0] = cos(theta1) * (outerRadius + innerRadius * cos(phi2)); - v3[1] = -sin(theta1) * (outerRadius + innerRadius * cos(phi2)); - v3[2] = innerRadius * sin(phi2); - - n0[0] = cos(theta1) * (cos(phi1)); - n0[1] = -sin(theta1) * (cos(phi1)); - n0[2] = sin(phi1); - - n1[0] = cos(theta2) * (cos(phi1)); - n1[1] = -sin(theta2) * (cos(phi1)); - n1[2] = sin(phi1); - - n2[0] = cos(theta2) * (cos(phi2)); - n2[1] = -sin(theta2) * (cos(phi2)); - n2[2] = sin(phi2); - - n3[0] = cos(theta1) * (cos(phi2)); - n3[1] = -sin(theta1) * (cos(phi2)); - n3[2] = sin(phi2); - - t0[0] = v0[0] * scalFac + 0.5; - t0[1] = v0[1] * scalFac + 0.5; - t0[2] = v0[2] * scalFac + 0.5; - - t1[0] = v1[0] * scalFac + 0.5; - t1[1] = v1[1] * scalFac + 0.5; - t1[2] = v1[2] * scalFac + 0.5; - - t2[0] = v2[0] * scalFac + 0.5; - t2[1] = v2[1] * scalFac + 0.5; - t2[2] = v2[2] * scalFac + 0.5; - - t3[0] = v3[0] * scalFac + 0.5; - t3[1] = v3[1] * scalFac + 0.5; - t3[2] = v3[2] * scalFac + 0.5; - - glBegin(GL_POLYGON); - glNormal3fv(n3); - glTexCoord3fv(t3); - glVertex3fv(v3); - glNormal3fv(n2); - glTexCoord3fv(t2); - glVertex3fv(v2); - glNormal3fv(n1); - glTexCoord3fv(t1); - glVertex3fv(v1); - glNormal3fv(n0); - glTexCoord3fv(t0); - glVertex3fv(v0); - glEnd(); - } - } - glEndList(); -} - - -/*-------------------------------------------------------------------- - noise function over R3 - implemented by a pseudorandom tricubic spline - EXCERPTED FROM SIGGRAPH 92, COURSE 23 - PROCEDURAL MODELING - Ken Perlin - New York University -----------------------------------------------------------------------*/ - - -#define DOT(a,b) (a[0] * b[0] + a[1] * b[1] + a[2] * b[2]) -#define B 128 -static int p[B + B + 2]; -static float g[B + B + 2][3]; -#define setup(i,b0,b1,r0,r1) \ - t = vec[i] + 10000.; \ - b0 = ((int)t) & (B-1); \ - b1 = (b0+1) & (B-1); \ - r0 = t - (int)t; \ - r1 = r0 - 1.; - -static float -noise3(float vec[3]) -{ - int bx0, bx1, by0, by1, bz0, bz1, b00, b10, b01, b11; - float rx0, rx1, ry0, ry1, rz0, rz1, *q, sx, sy, sz, a, b, c, d, t, u, v; - register int i, j; - - setup(0, bx0, bx1, rx0, rx1); - setup(1, by0, by1, ry0, ry1); - setup(2, bz0, bz1, rz0, rz1); - - i = p[bx0]; - j = p[bx1]; - - b00 = p[i + by0]; - b10 = p[j + by0]; - b01 = p[i + by1]; - b11 = p[j + by1]; - -#define at(rx,ry,rz) ( rx * q[0] + ry * q[1] + rz * q[2] ) -#define surve(t) ( t * t * (3. - 2. * t) ) -#define lerp(t, a, b) ( a + t * (b - a) ) - - sx = surve(rx0); - sy = surve(ry0); - sz = surve(rz0); - - q = g[b00 + bz0]; - u = at(rx0, ry0, rz0); - q = g[b10 + bz0]; - v = at(rx1, ry0, rz0); - a = lerp(sx, u, v); - - q = g[b01 + bz0]; - u = at(rx0, ry1, rz0); - q = g[b11 + bz0]; - v = at(rx1, ry1, rz0); - b = lerp(sx, u, v); - - c = lerp(sy, a, b); /* interpolate in y at lo x */ - - q = g[b00 + bz1]; - u = at(rx0, ry0, rz1); - q = g[b10 + bz1]; - v = at(rx1, ry0, rz1); - a = lerp(sx, u, v); - - q = g[b01 + bz1]; - u = at(rx0, ry1, rz1); - q = g[b11 + bz1]; - v = at(rx1, ry1, rz1); - b = lerp(sx, u, v); - - d = lerp(sy, a, b); /* interpolate in y at hi x */ - - return 1.5 * lerp(sz, c, d); /* interpolate in z */ -} - -static void -initNoise(void) -{ - /*long random(); */ - int i, j, k; - float v[3], s; - - /* Create an array of random gradient vectors uniformly on the unit sphere */ - /*srandom(1); */ - srand(1); - for (i = 0; i < B; i++) { - do { /* Choose uniformly in a cube */ - for (j = 0; j < 3; j++) - v[j] = (float) ((rand() % (B + B)) - B) / B; - s = DOT(v, v); - } while (s > 1.0); /* If not in sphere try again */ - s = sqrt(s); - for (j = 0; j < 3; j++) /* Else normalize */ - g[i][j] = v[j] / s; - } - - /* Create a pseudorandom permutation of [1..B] */ - for (i = 0; i < B; i++) - p[i] = i; - for (i = B; i > 0; i -= 2) { - k = p[i]; - p[i] = p[j = rand() % B]; - p[j] = k; - } - - /* Extend g and p arrays to allow for faster indexing */ - for (i = 0; i < B + 2; i++) { - p[B + i] = p[i]; - for (j = 0; j < 3; j++) - g[B + i][j] = g[i][j]; - } -} - - -static float -turbulence(float point[3], float lofreq, float hifreq) -{ - float freq, t, p[3]; - - p[0] = point[0] + 123.456; - p[1] = point[1]; - p[2] = point[2]; - - t = 0; - for (freq = lofreq; freq < hifreq; freq *= 2.) { - t += fabs(noise3(p)) / freq; - p[0] *= 2.; - p[1] *= 2.; - p[2] *= 2.; - } - return t - 0.3; /* readjust to make mean value = 0.0 */ -} - - -static void -create3Dtexture(void) -{ - unsigned char *voxels = NULL; - int i, j, k; - unsigned char *vp; - float vec[3]; - int tmp; - - printf("creating 3d textures...\n"); - voxels = - (unsigned char *) - malloc((size_t) (4 * tex_width * tex_height * tex_depth)); - vp = voxels; - for (i = 0; i < tex_width; i++) { - vec[0] = i; - for (j = 0; j < tex_height; j++) { - vec[1] = j; - for (k = 0; k < tex_depth; k++) { - vec[2] = k; - tmp = (sin(k * i * j + turbulence(vec, 0.01, 1)) + 1) * 127.5; - *vp++ = 0; - *vp++ = 0; - *vp++ = tmp; - *vp++ = tmp + 128; - } - } - } - - printf("setting up 3d texture...\n"); - - glBindTexture(GL_TEXTURE_3D, NOISE_TEXTURE); - glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_REPEAT); - glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_REPEAT); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA, - tex_width, tex_height, tex_depth, - 0, GL_RGBA, GL_UNSIGNED_BYTE, voxels); - - free(voxels); - - printf("finished setting up 3d texture image.\n"); -} - - -static void -printHelp(void) -{ - printf("\nUsage: stex3d \n"); - printf(" cmd line options:\n"); - printf(" -wxxx Width of the texture (Default=64)\n"); - printf(" -hxxx Height of the texture (Default=64)\n"); - printf(" -dxxx Depth of the texture (Default=64)\n"); - printf(" Keyboard Options:\n"); - printf(" up/down rotate around X\n"); - printf(" left/right rotate around Y\n"); - printf(" z/Z rotate around Z\n"); - printf(" a toggle animation\n"); - printf(" s toggle smooth shading\n"); - printf(" t toggle texgen mode\n"); - printf(" o toggle object: torus/sphere\n"); - printf(" i toggle texture image: noise/gradient\n"); -} - - -static GLenum -parseCmdLine(int argc, char **argv) -{ - GLint i; - - for (i = 1; i < argc; i++) { - if (strstr(argv[i], "-w") == 0) { - tex_width = atoi((argv[i]) + 2); - } - else if (strstr(argv[i], "-h") == 0) { - tex_height = atoi((argv[i]) + 2); - } - else if (strstr(argv[i], "-d") == 0) { - tex_depth = atoi((argv[i]) + 2); - } - else if (strcmp(argv[i], "-help") == 0) { - printHelp(); - return GL_FALSE; - } - else { - printf("%s (Bad option).\n", argv[i]); - printHelp(); - return GL_FALSE; - } - } - if (tex_width == 0 || tex_height == 0 || tex_depth == 0) { - printf("%s (Bad option).\n", "size parameters can't be 0"); - printHelp(); - return GL_FALSE; - } - return GL_TRUE; -} - - -static void -drawScene(void) -{ - static const GLfloat sPlane[4] = { 0.5, 0, 0, -.5 }; - static const GLfloat tPlane[4] = { 0, 0.5, 0, -.5 }; - static const GLfloat rPlane[4] = { 0, 0, 0.5, -.5 }; - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glPushMatrix(); - if (texgen == 2) { - glTexGenfv(GL_S, GL_EYE_PLANE, sPlane); - glTexGenfv(GL_T, GL_EYE_PLANE, tPlane); - glTexGenfv(GL_R, GL_EYE_PLANE, rPlane); - } - - glRotatef(angx, 1.0, 0.0, 0.0); - glRotatef(angy, 0.0, 1.0, 0.0); - glRotatef(angz, 0.0, 0.0, 1.0); - - if (texgen == 1) { - glTexGenfv(GL_S, GL_EYE_PLANE, sPlane); - glTexGenfv(GL_T, GL_EYE_PLANE, tPlane); - glTexGenfv(GL_R, GL_EYE_PLANE, rPlane); - } - - if (texgen) { - glEnable(GL_TEXTURE_GEN_S); - glEnable(GL_TEXTURE_GEN_T); - glEnable(GL_TEXTURE_GEN_R); - } - else { - glDisable(GL_TEXTURE_GEN_S); - glDisable(GL_TEXTURE_GEN_T); - glDisable(GL_TEXTURE_GEN_R); - } - - glCallList(CurObject); - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void -resize(int w, int h) -{ - float ar = (float) w / (float) h; - float ax = 0.6 * ar; - float ay = 0.6; - glViewport(0, 0, (GLint) w, (GLint) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-ax, ax, -ay, ay, 2, 20); - /*glOrtho(-2, 2, -2, 2, -10, 10);*/ - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0, 0, -4); -} - - -static void -Idle(void) -{ - float t = glutGet(GLUT_ELAPSED_TIME); - angx = 0.01 * t; - angy = 0.03 * t; - angz += 0; - glutPostRedisplay(); -} - - -static void -SpecialKey(int k, int x, int y) -{ - switch (k) { - case GLUT_KEY_UP: - angx += 5.0; - break; - case GLUT_KEY_DOWN: - angx -= 5.0; - break; - case GLUT_KEY_LEFT: - angy += 5.0; - break; - case GLUT_KEY_RIGHT: - angy -= 5.0; - break; - default: - return; - } - glutPostRedisplay(); -} - - -static void -KeyHandler(unsigned char key, int x, int y) -{ - static const char *mode[] = { - "glTexCoord3f (no texgen)", - "texgen fixed to object coords", - "texgen fixed to eye coords" - }; - (void) x; - (void) y; - switch (key) { - case 27: - case 'q': - case 'Q': /* quit game. */ - exit(0); - break; - case 'z': - angz += 10; - break; - case 'Z': - angz -= 10; - break; - case 's': - smooth = !smooth; - if (smooth) - glShadeModel(GL_SMOOTH); - else - glShadeModel(GL_FLAT); - break; - case 't': - texgen++; - if (texgen > 2) - texgen = 0; - printf("Texgen: %s\n", mode[texgen]); - break; - case 'o': - if (CurObject == TORUS) - CurObject = SPHERE; - else - CurObject = TORUS; - break; - case 'i': - if (CurTexture == NOISE_TEXTURE) - CurTexture = GRADIENT_TEXTURE; - else - CurTexture = NOISE_TEXTURE; - glBindTexture(GL_TEXTURE_3D, CurTexture); - break; - case 'a': - animate = !animate; - if (animate) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 'w': - wireframe = !wireframe; - if (wireframe) - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - else - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - break; - default: - break; - } - glutPostRedisplay(); -} - - -static void -create3Dgradient(void) -{ - unsigned char *v; - int i, j, k; - unsigned char *voxels = NULL; - - voxels = (unsigned char *) malloc(4 * tex_width * tex_height * tex_depth); - v = voxels; - - for (i = 0; i < tex_depth; i++) { - for (j = 0; j < tex_height; j++) { - for (k = 0; k < tex_width; k++) { - GLint r = (255 * i) / (tex_depth - 1); - GLint g = (255 * j) / (tex_height - 1); - GLint b = (255 * k) / (tex_width - 1); - *v++ = r; - *v++ = g; - *v++ = b; - *v++ = 255; - } - } - } - - - glBindTexture(GL_TEXTURE_3D, GRADIENT_TEXTURE); - glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_REPEAT); - glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_REPEAT); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA, - tex_width, tex_height, tex_depth, - 0, GL_RGBA, GL_UNSIGNED_BYTE, voxels); - - free(voxels); -} - - - -static void -init(void) -{ - static const GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - static const GLfloat mat_shininess[] = { 25.0 }; - static const GLfloat gray[] = { 0.6, 0.6, 0.6, 0.0 }; - static const GLfloat white[] = { 1.0, 1.0, 1.0, 0.0 }; - static const GLfloat light_position[] = { 0.0, 1.0, 1.0, 0.0 }; - - int max; - - /* see if we have OpenGL 1.2 or later, for 3D texturing */ - { - const char *version = (const char *) glGetString(GL_VERSION); - if (strncmp(version, "1.0", 3) == 0 || strncmp(version, "1.1", 3) == 0) { - printf("Sorry, OpenGL 1.2 or later is required\n"); - exit(1); - } - } - printf("GL_RENDERER: %s\n", (char *) glGetString(GL_RENDERER)); - glGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, &max); - printf("GL_MAX_3D_TEXTURE_SIZE: %d\n", max); - printf("Current 3D texture size: %d x %d x %d\n", - tex_width, tex_height, tex_depth); - - /* init light */ - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); - glLightfv(GL_LIGHT1, GL_POSITION, light_position); - glLightfv(GL_LIGHT1, GL_AMBIENT, gray); - glLightfv(GL_LIGHT1, GL_DIFFUSE, white); - glLightfv(GL_LIGHT1, GL_SPECULAR, white); - glColorMaterial(GL_FRONT, GL_DIFFUSE); - glEnable(GL_COLOR_MATERIAL); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT1); - - glClearColor(.5, .5, .5, 0); - - { - GLUquadricObj *q; - q = gluNewQuadric(); - gluQuadricTexture( q, GL_TRUE ); - glNewList(SPHERE, GL_COMPILE); - gluSphere( q, 0.95, 30, 15 ); - glEndList(); - gluDeleteQuadric(q); - } - - BuildTorus(); - - - create3Dgradient(); - - initNoise(); - create3Dtexture(); - - glEnable(GL_TEXTURE_3D); - - /* - glBlendFunc(GL_SRC_COLOR, GL_SRC_ALPHA); - glEnable(GL_BLEND); - */ - glEnable(GL_DEPTH_TEST); - - glColor3f(0.6, 0.7, 0.8); -} - - -int -main(int argc, char **argv) -{ - glutInit(&argc, argv); - - if (parseCmdLine(argc, argv) == GL_FALSE) { - exit(0); - } - - glutInitWindowPosition(0, 0); - glutInitWindowSize(400, 400); - glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); - - if (glutCreateWindow("stex3d") <= 0) { - exit(0); - } - - init(); - - printHelp(); - - glutReshapeFunc(resize); - glutKeyboardFunc(KeyHandler); - glutSpecialFunc(SpecialKey); - glutDisplayFunc(drawScene); - if (animate) - glutIdleFunc(Idle); - glutMainLoop(); - return 0; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/teapot.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/teapot.c deleted file mode 100644 index 38ede7ac3e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/teapot.c +++ /dev/null @@ -1,675 +0,0 @@ -/* - * This program is under the GNU GPL. - * Use at your own risk. - * - * written by David Bucciarelli (tech.hmw@plus.it) - * Humanware s.r.l. - */ - -#include -#include -#include -#include -#include - -#ifdef WIN32 -#include -#endif - -#include -#include "readtex.h" - -#ifdef XMESA -#include "GL/xmesa.h" -static int fullscreen=1; -#endif - -static int WIDTH=640; -static int HEIGHT=480; - -static GLint T0 = 0; -static GLint Frames = 0; - -#define BASESIZE 10.0 - -#define BASERES 12 -#define TEAPOTRES 3 - -#ifndef M_PI -#define M_PI 3.1415926535 -#endif - -extern void shadowmatrix(GLfloat [4][4], GLfloat [4], GLfloat [4]); -extern void findplane(GLfloat [4], GLfloat [3], GLfloat [3], GLfloat [3]); - - -static int win=0; - -static float obs[3]={5.0,0.0,1.0}; -static float dir[3]; -static float v=0.0; -static float alpha=-90.0; -static float beta=90.0; - -static GLfloat baseshadow[4][4]; -static GLfloat lightpos[4]={2.3,0.0,3.0,1.0}; -static GLfloat lightdir[3]={-2.3,0.0,-3.0}; -static GLfloat lightalpha=0.0; - -static int fog=1; -static int bfcull=1; -static int usetex=1; -static int help=1; -static int joyavailable=0; -static int joyactive=0; - -static GLuint t1id,t2id; -static GLuint teapotdlist,basedlist,lightdlist; - - - -/******************** begin shadow code ********************/ - -/* Taken from the projshadow.c - by Tom McReynolds, SGI */ - -/* Modified by David Bucciarelli */ - -enum { - X, Y, Z, W -}; -enum { - A, B, C, D -}; - -/* create a matrix that will project the desired shadow */ -void -shadowmatrix(GLfloat shadowMat[4][4], - GLfloat groundplane[4], - GLfloat lightpos[4]) -{ - GLfloat dot; - - /* find dot product between light position vector and ground plane normal */ - dot = groundplane[X] * lightpos[X] + - groundplane[Y] * lightpos[Y] + - groundplane[Z] * lightpos[Z] + - groundplane[W] * lightpos[W]; - - shadowMat[0][0] = dot - lightpos[X] * groundplane[X]; - shadowMat[1][0] = 0.f - lightpos[X] * groundplane[Y]; - shadowMat[2][0] = 0.f - lightpos[X] * groundplane[Z]; - shadowMat[3][0] = 0.f - lightpos[X] * groundplane[W]; - - shadowMat[X][1] = 0.f - lightpos[Y] * groundplane[X]; - shadowMat[1][1] = dot - lightpos[Y] * groundplane[Y]; - shadowMat[2][1] = 0.f - lightpos[Y] * groundplane[Z]; - shadowMat[3][1] = 0.f - lightpos[Y] * groundplane[W]; - - shadowMat[X][2] = 0.f - lightpos[Z] * groundplane[X]; - shadowMat[1][2] = 0.f - lightpos[Z] * groundplane[Y]; - shadowMat[2][2] = dot - lightpos[Z] * groundplane[Z]; - shadowMat[3][2] = 0.f - lightpos[Z] * groundplane[W]; - - shadowMat[X][3] = 0.f - lightpos[W] * groundplane[X]; - shadowMat[1][3] = 0.f - lightpos[W] * groundplane[Y]; - shadowMat[2][3] = 0.f - lightpos[W] * groundplane[Z]; - shadowMat[3][3] = dot - lightpos[W] * groundplane[W]; - -} - -/* find the plane equation given 3 points */ -void -findplane(GLfloat plane[4], - GLfloat v0[3], GLfloat v1[3], GLfloat v2[3]) -{ - GLfloat vec0[3], vec1[3]; - - /* need 2 vectors to find cross product */ - vec0[X] = v1[X] - v0[X]; - vec0[Y] = v1[Y] - v0[Y]; - vec0[Z] = v1[Z] - v0[Z]; - - vec1[X] = v2[X] - v0[X]; - vec1[Y] = v2[Y] - v0[Y]; - vec1[Z] = v2[Z] - v0[Z]; - - /* find cross product to get A, B, and C of plane equation */ - plane[A] = vec0[Y] * vec1[Z] - vec0[Z] * vec1[Y]; - plane[B] = -(vec0[X] * vec1[Z] - vec0[Z] * vec1[X]); - plane[C] = vec0[X] * vec1[Y] - vec0[Y] * vec1[X]; - - plane[D] = -(plane[A] * v0[X] + plane[B] * v0[Y] + plane[C] * v0[Z]); -} - -/******************** end shadow code ********************/ - - -static void calcposobs(void) -{ - dir[0]=sin(alpha*M_PI/180.0); - dir[1]=cos(alpha*M_PI/180.0)*sin(beta*M_PI/180.0); - dir[2]=cos(beta*M_PI/180.0); - - obs[0]+=v*dir[0]; - obs[1]+=v*dir[1]; - obs[2]+=v*dir[2]; -} - -static void special(int k, int x, int y) -{ - switch(k) { - case GLUT_KEY_LEFT: - alpha-=2.0; - break; - case GLUT_KEY_RIGHT: - alpha+=2.0; - break; - case GLUT_KEY_DOWN: - beta-=2.0; - break; - case GLUT_KEY_UP: - beta+=2.0; - break; - } -} - -static void key(unsigned char k, int x, int y) -{ - switch(k) { - case 27: - exit(0); - break; - - case 'a': - v+=0.005; - break; - case 'z': - v-=0.005; - break; - - case 'j': - joyactive=(!joyactive); - break; - case 'h': - help=(!help); - break; - case 'f': - fog=(!fog); - break; - case 't': - usetex=(!usetex); - break; - case 'b': - if(bfcull) { - glDisable(GL_CULL_FACE); - bfcull=0; - } else { - glEnable(GL_CULL_FACE); - bfcull=1; - } - break; -#ifdef XMESA - case ' ': - XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW); - fullscreen=(!fullscreen); - break; -#endif - } -} - -static void reshape(int w, int h) -{ - WIDTH=w; - HEIGHT=h; - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(45.0,w/(float)h,0.2,40.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glViewport(0,0,w,h); -} - -static void printstring(void *font, char *string) -{ - int len,i; - - len=(int)strlen(string); - for(i=0;ijoy.wXpos) - min[0]=joy.wXpos; - center[0]=(max[0]+min[0])/2; - - if(max[1]joy.wYpos) - min[1]=joy.wYpos; - center[1]=(max[1]+min[1])/2; - - if(joyactive) { - if(fabs(center[0]-(float)joy.wXpos)>0.1*(max[0]-min[0])) - alpha-=2.5*(center[0]-(float)joy.wXpos)/(max[0]-min[0]); - if(fabs(center[1]-(float)joy.wYpos)>0.1*(max[1]-min[1])) - beta+=2.5*(center[1]-(float)joy.wYpos)/(max[1]-min[1]); - - if(joy.wButtons & JOY_BUTTON1) - v+=0.005; - if(joy.wButtons & JOY_BUTTON2) - v-=0.005; - } - } else - joyavailable=0; -#endif -} - -static void draw(void) -{ - static char frbuf[80] = ""; - - dojoy(); - - glEnable(GL_DEPTH_TEST); - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); - - if(usetex) - glEnable(GL_TEXTURE_2D); - else - glDisable(GL_TEXTURE_2D); - - if(fog) - glEnable(GL_FOG); - else - glDisable(GL_FOG); - - glEnable(GL_LIGHTING); - - glShadeModel(GL_SMOOTH); - - glPushMatrix(); - calcposobs(); - - gluLookAt(obs[0],obs[1],obs[2], - obs[0]+dir[0],obs[1]+dir[1],obs[2]+dir[2], - 0.0,0.0,1.0); - - drawlight1(); - glCallList(basedlist); - drawteapot(); - drawlight2(); - glPopMatrix(); - - glDisable(GL_LIGHTING); - glDisable(GL_TEXTURE_2D); - glDisable(GL_DEPTH_TEST); - glDisable(GL_FOG); - glShadeModel(GL_FLAT); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-0.5,639.5,-0.5,479.5,-1.0,1.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - glColor3f(1.0,0.0,0.0); - glRasterPos2i(10,10); - printstring(GLUT_BITMAP_HELVETICA_18,frbuf); - glRasterPos2i(350,470); - printstring(GLUT_BITMAP_HELVETICA_10,"Teapot V1.2 Written by David Bucciarelli (tech.hmw@plus.it)"); - - if(help) - printhelp(); - - reshape(WIDTH,HEIGHT); - - glutSwapBuffers(); - - Frames++; - - { - GLint t = glutGet(GLUT_ELAPSED_TIME); - if (t - T0 >= 2000) { - GLfloat seconds = (t - T0) / 1000.0; - GLfloat fps = Frames / seconds; - sprintf(frbuf, "Frame rate: %f", fps); - T0 = t; - Frames = 0; - } - } -} - -static void inittextures(void) -{ - glGenTextures(1,&t1id); - glBindTexture(GL_TEXTURE_2D,t1id); - - glPixelStorei(GL_UNPACK_ALIGNMENT,4); - if (!LoadRGBMipmaps("../images/tile.rgb", GL_RGB)) { - fprintf(stderr,"Error reading a texture.\n"); - exit(-1); - } - - glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR); - glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); - - glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE); - - glGenTextures(1,&t2id); - glBindTexture(GL_TEXTURE_2D,t2id); - - glPixelTransferf(GL_RED_SCALE, 0.75); - glPixelTransferf(GL_RED_BIAS, 0.25); - glPixelTransferf(GL_GREEN_SCALE, 0.75); - glPixelTransferf(GL_GREEN_BIAS, 0.25); - glPixelTransferf(GL_BLUE_SCALE, 0.75); - glPixelTransferf(GL_BLUE_BIAS, 0.25); - - if (!LoadRGBMipmaps("../images/bw.rgb", GL_RGB)) { - fprintf(stderr,"Error reading a texture.\n"); - exit(-1); - } - - glPixelTransferf(GL_RED_SCALE, 1.0); - glPixelTransferf(GL_RED_BIAS, 0.0); - glPixelTransferf(GL_GREEN_SCALE, 1.0); - glPixelTransferf(GL_GREEN_BIAS, 0.0); - glPixelTransferf(GL_BLUE_SCALE, 1.0); - glPixelTransferf(GL_BLUE_BIAS, 0.0); - - - glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR); - glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); - - glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE); -} - -static void initlight(void) -{ - float matamb[4] ={0.5, 0.5, 0.5, 1.0}; - float matdiff[4]={0.9, 0.2, 0.2, 1.0}; - float matspec[4]={1.0,1.0,1.0,1.0}; - - float lamb[4] ={1.5, 1.5, 1.5, 1.0}; - float ldiff[4]={1.0, 1.0, 1.0, 1.0}; - float lspec[4]={1.0, 1.0, 1.0, 1.0}; - - glLightf(GL_LIGHT0,GL_SPOT_CUTOFF,70.0); - glLightf(GL_LIGHT0,GL_SPOT_EXPONENT,20.0); - glLightfv(GL_LIGHT0,GL_AMBIENT,lamb); - glLightfv(GL_LIGHT0,GL_DIFFUSE,ldiff); - glLightfv(GL_LIGHT0,GL_SPECULAR,lspec); - - glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 15.0); - glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, matdiff); - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, matspec); - glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, matamb); - - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lamb); - glEnable(GL_LIGHT0); -} - -static void initdlists(void) -{ - GLUquadricObj *lcone,*lbase; - GLfloat plane[4]; - GLfloat v0[3]={0.0,0.0,0.0}; - GLfloat v1[3]={1.0,0.0,0.0}; - GLfloat v2[3]={0.0,1.0,0.0}; - - findplane(plane,v0,v1,v2); - shadowmatrix(baseshadow,plane,lightpos); - - teapotdlist=glGenLists(1); - glNewList(teapotdlist,GL_COMPILE); - glRotatef(90.0,1.0,0.0,0.0); - glCullFace(GL_FRONT); - glBindTexture(GL_TEXTURE_2D,t2id); - glutSolidTeapot(0.75); - glCullFace(GL_BACK); - glEndList(); - - basedlist=glGenLists(1); - glNewList(basedlist,GL_COMPILE); - drawbase(); - glEndList(); - - lightdlist=glGenLists(1); - glNewList(lightdlist,GL_COMPILE); - glDisable(GL_LIGHTING); - - lcone=gluNewQuadric(); - lbase=gluNewQuadric(); - glRotatef(45.0,0.0,1.0,0.0); - - glColor3f(1.0,1.0,1.0); - glCullFace(GL_FRONT); - gluDisk(lbase,0.0,0.2,12.0,1.0); - glCullFace(GL_BACK); - - glColor3f(0.5,0.0,0.0); - gluCylinder(lcone,0.2,0.0,0.5,12,1); - - gluDeleteQuadric(lcone); - gluDeleteQuadric(lbase); - - glEnable(GL_LIGHTING); - glEndList(); -} - -int main(int ac, char **av) -{ - float fogcolor[4]={0.025,0.025,0.025,1.0}; - - fprintf(stderr,"Teapot V1.2\nWritten by David Bucciarelli (tech.hmw@plus.it)\n"); - - /* - if(!SetPriorityClass(GetCurrentProcess(),REALTIME_PRIORITY_CLASS)) { - fprintf(stderr,"Error setting the process class.\n"); - return 0; - } - - if(!SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_TIME_CRITICAL)) { - fprintf(stderr,"Error setting the process priority.\n"); - return 0; - } - */ - - glutInitWindowPosition(0,0); - glutInitWindowSize(WIDTH,HEIGHT); - glutInit(&ac,av); - - glutInitDisplayMode(GLUT_RGB|GLUT_DEPTH|GLUT_DOUBLE); - - if(!(win=glutCreateWindow("Teapot"))) { - fprintf(stderr,"Error, couldn't open window\n"); - return -1; - } - - reshape(WIDTH,HEIGHT); - - glShadeModel(GL_SMOOTH); - glEnable(GL_DEPTH_TEST); - glEnable(GL_CULL_FACE); - glEnable(GL_TEXTURE_2D); - - glEnable(GL_FOG); - glFogi(GL_FOG_MODE,GL_EXP2); - glFogfv(GL_FOG_COLOR,fogcolor); - - glFogf(GL_FOG_DENSITY,0.04); - glHint(GL_FOG_HINT,GL_NICEST); - glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); - - calcposobs(); - - inittextures(); - initlight(); - - initdlists(); - - glClearColor(fogcolor[0],fogcolor[1],fogcolor[2],fogcolor[3]); - - glutReshapeFunc(reshape); - glutDisplayFunc(draw); - glutKeyboardFunc(key); - glutSpecialFunc(special); - glutIdleFunc(draw); - - glutMainLoop(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/terrain.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/terrain.c deleted file mode 100644 index be78ea4950..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/terrain.c +++ /dev/null @@ -1,656 +0,0 @@ -/* - * This program is under the GNU GPL. - * Use at your own risk. - * - * written by David Bucciarelli (tech.hmw@plus.it) - * Humanware s.r.l. - * - * based on a Mikael SkiZoWalker's (MoDEL) / France (Skizo@Hol.Fr) demo - */ - -#include -#include -#include -#include -#include - -#ifdef WIN32 -#include -#endif - -#include - -#ifdef XMESA -#include "GL/xmesa.h" -static int fullscreen = 1; -#endif - -#ifndef M_PI -#define M_PI 3.14159265 -#endif - -#define heightMnt 450 -#define lenghtXmnt 62 -#define lenghtYmnt 62 - -#define stepXmnt 96.0 -#define stepYmnt 96.0 - -#define WIDTH 640 -#define HEIGHT 480 - -static GLint T0 = 0; -static GLint Frames = 0; - -#define TSCALE 4 - -#define FOV 85 - -static GLfloat terrain[256 * 256]; -static GLfloat terraincolor[256 * 256][3]; - -static int win = 0; - -static int fog = 1; -static int bfcull = 1; -static int usetex = 1; -static int poutline = 0; -static int help = 1; -static int joyavailable = 0; -static int joyactive = 0; -static float ModZMnt; -static long GlobalMnt = 0; - -static int scrwidth = WIDTH; -static int scrheight = HEIGHT; - -#define OBSSTARTX 992.0 -#define OBSSTARTY 103.0 - -static float obs[3] = { OBSSTARTX, heightMnt * 1.3, OBSSTARTY }; -static float dir[3], v1[2], v2[2]; -static float v = 900.0; -static float alpha = 75.0; -static float beta = 90.0; - -static void -calcposobs(void) -{ - float alpha1, alpha2; - static double t0 = -1.; - double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0; - if (t0 < 0.0) - t0 = t; - dt = t - t0; - t0 = t; - - dir[0] = sin(alpha * M_PI / 180.0); - dir[2] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0); - dir[1] = cos(beta * M_PI / 180.0); - - if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5) - dir[0] = 0; - if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5) - dir[1] = 0; - if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5) - dir[2] = 0; - - alpha1 = alpha + FOV / 2.0; - v1[0] = sin(alpha1 * M_PI / 180.0); - v1[1] = cos(alpha1 * M_PI / 180.0); - - alpha2 = alpha - FOV / 2.0; - v2[0] = sin(alpha2 * M_PI / 180.0); - v2[1] = cos(alpha2 * M_PI / 180.0); - - obs[0] += v * dir[0] * dt; - obs[1] += v * dir[1] * dt; - obs[2] += v * dir[2] * dt; - - if (obs[1] < 0.0) - obs[1] = 0.0; -} - -static void -reshape(int width, int height) -{ - scrwidth = width; - scrheight = height; - glViewport(0, 0, (GLint) width, (GLint) height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(50.0, ((GLfloat) width / (GLfloat) height), - lenghtXmnt * stepYmnt * 0.01, lenghtXmnt * stepYmnt * 0.7); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -static int -clipstrip(float y, float *start, float *end) -{ - float x1, x2, t1, t2, tmp; - - if (v1[1] == 0.0) { - t1 = 0.0; - x1 = -HUGE_VAL; - } - else { - t1 = y / v1[1]; - x1 = t1 * v1[0]; - } - - if (v2[1] == 0.0) { - t2 = 0.0; - x2 = HUGE_VAL; - } - else { - t2 = y / v2[1]; - x2 = t2 * v2[0]; - } - - if (((x1 < -(lenghtXmnt * stepXmnt) / 2) && (t2 <= 0.0)) || - ((t1 <= 0.0) && (x2 > (lenghtXmnt * stepXmnt) / 2)) || - ((t1 < 0.0) && (t2 < 0.0))) - return 0; - - if ((t1 == 0.0) && (t2 == 0.0)) { - if ((v1[0] < 0.0) && (v1[1] > 0.0) && (v2[0] < 0.0) && (v2[1] < 0.0)) { - *start = -(lenghtXmnt * stepXmnt) / 2; - *end = stepXmnt; - return 1; - } - else { - if ((v1[0] > 0.0) && (v1[1] < 0.0) && (v2[0] > 0.0) && (v2[1] > 0.0)) { - *start = -stepXmnt; - *end = (lenghtXmnt * stepXmnt) / 2; - return 1; - } - else - return 0; - } - } - else { - if (t2 < 0.0) { - if (x1 < 0.0) - x2 = -(lenghtXmnt * stepXmnt) / 2; - else - x2 = (lenghtXmnt * stepXmnt) / 2; - } - - if (t1 < 0.0) { - if (x2 < 0.0) - x1 = -(lenghtXmnt * stepXmnt) / 2; - else - x1 = (lenghtXmnt * stepXmnt) / 2; - } - } - - if (x1 > x2) { - tmp = x1; - x1 = x2; - x2 = tmp; - } - - x1 -= stepXmnt; - if (x1 < -(lenghtXmnt * stepXmnt) / 2) - x1 = -(lenghtXmnt * stepXmnt) / 2; - - x2 += stepXmnt; - if (x2 > (lenghtXmnt * stepXmnt) / 2) - x2 = (lenghtXmnt * stepXmnt) / 2; - - *start = ((int) (x1 / stepXmnt)) * stepXmnt; - *end = ((int) (x2 / stepXmnt)) * stepXmnt; - - return 1; -} - -static void -printstring(void *font, char *string) -{ - int len, i; - - len = (int) strlen(string); - for (i = 0; i < len; i++) - glutBitmapCharacter(font, string[i]); -} - -static void -printhelp(void) -{ - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glColor4f(0.0, 0.0, 0.0, 0.5); - glRecti(40, 40, 600, 440); - glDisable(GL_BLEND); - - glColor3f(1.0, 0.0, 0.0); - glRasterPos2i(300, 420); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Help"); - - glRasterPos2i(60, 390); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "h - Toggle Help"); - glRasterPos2i(60, 360); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "t - Toggle Textures"); - glRasterPos2i(60, 330); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "f - Toggle Fog"); - glRasterPos2i(60, 300); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "p - Wire frame"); - glRasterPos2i(60, 270); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "b - Toggle Back face culling"); - glRasterPos2i(60, 240); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Arrow Keys - Rotate"); - glRasterPos2i(60, 210); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "a - Increase velocity"); - glRasterPos2i(60, 180); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "z - Decrease velocity"); - - glRasterPos2i(60, 150); - if (joyavailable) - printstring(GLUT_BITMAP_TIMES_ROMAN_24, - "j - Toggle jostick control (Joystick control available)"); - else - printstring(GLUT_BITMAP_TIMES_ROMAN_24, - "(No Joystick control available)"); -} - -static void -drawterrain(void) -{ - int h, i, idx, ox, oy; - float j, k, start, end; - - ox = (int) (obs[0] / stepXmnt); - oy = (int) (obs[2] / stepYmnt); - GlobalMnt = ((ox * TSCALE) & 255) + ((oy * TSCALE) & 255) * 256; - - glPushMatrix(); - glTranslatef((float) ox * stepXmnt, 0, (float) oy * stepYmnt); - - for (h = 0, k = -(lenghtYmnt * stepYmnt) / 2; h < lenghtYmnt; - k += stepYmnt, h++) { - if (!clipstrip(k, &start, &end)) - continue; - - glBegin(GL_TRIANGLE_STRIP); /* I hope that the optimizer will be able to improve this code */ - for (i = (int) (lenghtXmnt / 2 + start / stepXmnt), j = start; j <= end; - j += stepXmnt, i++) { - idx = (i * TSCALE + h * 256 * TSCALE + GlobalMnt) & 65535; - glColor3fv(terraincolor[idx]); - glTexCoord2f((ox + i) / 8.0, (oy + h) / 8.0); - glVertex3f(j, terrain[idx], k); - - idx = - (i * TSCALE + h * 256 * TSCALE + 256 * TSCALE + - GlobalMnt) & 65535; - glColor3fv(terraincolor[idx]); - glTexCoord2f((ox + i) / 8.0, (oy + h + 1) / 8.0); - glVertex3f(j, terrain[idx], k + stepYmnt); - } - glEnd(); - } - - glDisable(GL_CULL_FACE); - glDisable(GL_TEXTURE_2D); - glEnable(GL_BLEND); - glBegin(GL_QUADS); - glColor4f(0.1, 0.7, 1.0, 0.4); - glVertex3f(-(lenghtXmnt * stepXmnt) / 2.0, heightMnt * 0.6, - -(lenghtYmnt * stepYmnt) / 2.0); - glVertex3f(-(lenghtXmnt * stepXmnt) / 2.0, heightMnt * 0.6, - (lenghtYmnt * stepYmnt) / 2.0); - glVertex3f((lenghtXmnt * stepXmnt) / 2.0, heightMnt * 0.6, - (lenghtYmnt * stepYmnt) / 2.0); - glVertex3f((lenghtXmnt * stepXmnt) / 2.0, heightMnt * 0.6, - -(lenghtYmnt * stepYmnt) / 2.0); - glEnd(); - glDisable(GL_BLEND); - if (bfcull) - glEnable(GL_CULL_FACE); - glEnable(GL_TEXTURE_2D); - - glPopMatrix(); - -} - -static void -dojoy(void) -{ -#ifdef WIN32 - static UINT max[2] = { 0, 0 }; - static UINT min[2] = { 0xffffffff, 0xffffffff }, center[2]; - MMRESULT res; - JOYINFO joy; - - res = joyGetPos(JOYSTICKID1, &joy); - - if (res == JOYERR_NOERROR) { - joyavailable = 1; - - if (max[0] < joy.wXpos) - max[0] = joy.wXpos; - if (min[0] > joy.wXpos) - min[0] = joy.wXpos; - center[0] = (max[0] + min[0]) / 2; - - if (max[1] < joy.wYpos) - max[1] = joy.wYpos; - if (min[1] > joy.wYpos) - min[1] = joy.wYpos; - center[1] = (max[1] + min[1]) / 2; - - if (joyactive) { - if (fabs(center[0] - (float) joy.wXpos) > 0.1 * (max[0] - min[0])) - alpha += - 2.5 * (center[0] - (float) joy.wXpos) / (max[0] - min[0]); - if (fabs(center[1] - (float) joy.wYpos) > 0.1 * (max[1] - min[1])) - beta += 2.5 * (center[1] - (float) joy.wYpos) / (max[1] - min[1]); - - if (joy.wButtons & JOY_BUTTON1) - v += 0.5; - if (joy.wButtons & JOY_BUTTON2) - v -= 0.5; - } - } - else - joyavailable = 0; -#endif -} - -static void -drawscene(void) -{ - static char frbuf[80] = ""; - - dojoy(); - - glShadeModel(GL_SMOOTH); - glEnable(GL_DEPTH_TEST); - - if (usetex) - glEnable(GL_TEXTURE_2D); - else - glDisable(GL_TEXTURE_2D); - - if (fog) - glEnable(GL_FOG); - else - glDisable(GL_FOG); - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - - calcposobs(); - gluLookAt(obs[0], obs[1], obs[2], - obs[0] + dir[0], obs[1] + dir[1], obs[2] + dir[2], - 0.0, 1.0, 0.0); - - drawterrain(); - glPopMatrix(); - - glDisable(GL_TEXTURE_2D); - glDisable(GL_DEPTH_TEST); - glDisable(GL_FOG); - glShadeModel(GL_FLAT); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-0.5, 639.5, -0.5, 479.5, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - glColor3f(1.0, 0.0, 0.0); - glRasterPos2i(10, 10); - printstring(GLUT_BITMAP_HELVETICA_18, frbuf); - glRasterPos2i(350, 470); - printstring(GLUT_BITMAP_HELVETICA_10, - "Terrain V1.2 Written by David Bucciarelli (tech.hmw@plus.it)"); - glRasterPos2i(434, 457); - printstring(GLUT_BITMAP_HELVETICA_10, - "Based on a Mickael's demo (Skizo@Hol.Fr)"); - - if (help) - printhelp(); - - reshape(scrwidth, scrheight); - - glutSwapBuffers(); - - Frames++; - { - GLint t = glutGet(GLUT_ELAPSED_TIME); - if (t - T0 >= 2000) { - GLfloat seconds = (t - T0) / 1000.0; - GLfloat fps = Frames / seconds; - sprintf(frbuf, "Frame rate: %f", fps); - T0 = t; - Frames = 0; - } - } -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: - exit(0); - break; - case 'a': - v += 50.; - break; - case 'z': - v -= 50.; - break; - case 'p': - if (poutline) { - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - poutline = 0; - } - else { - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - poutline = 1; - } - break; - case 'j': - joyactive = (!joyactive); - break; - case 'h': - help = (!help); - break; - case 'f': - fog = (!fog); - break; - case 't': - usetex = (!usetex); - break; - case 'b': - if (bfcull) { - glDisable(GL_CULL_FACE); - bfcull = 0; - } - else { - glEnable(GL_CULL_FACE); - bfcull = 1; - } - break; -#ifdef XMESA - case ' ': - XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW); - fullscreen = (!fullscreen); - break; -#endif - } -} - -static void -special(int k, int x, int y) -{ - switch (k) { - case GLUT_KEY_LEFT: - alpha += 2.0; - break; - case GLUT_KEY_RIGHT: - alpha -= 2.0; - break; - case GLUT_KEY_DOWN: - beta -= 2.0; - break; - case GLUT_KEY_UP: - beta += 2.0; - break; - } -} - -static void -calccolor(GLfloat height, GLfloat c[3]) -{ - GLfloat color[4][3] = { - {1.0, 1.0, 1.0}, - {0.0, 0.8, 0.0}, - {1.0, 1.0, 0.3}, - {0.0, 0.0, 0.8} - }; - GLfloat fact; - - height = height * (1.0 / 255.0); - - if (height >= 0.9) { - c[0] = color[0][0]; - c[1] = color[0][1]; - c[2] = color[0][2]; - return; - } - - if ((height < 0.9) && (height >= 0.7)) { - fact = (height - 0.7) * 5.0; - c[0] = fact * color[0][0] + (1.0 - fact) * color[1][0]; - c[1] = fact * color[0][1] + (1.0 - fact) * color[1][1]; - c[2] = fact * color[0][2] + (1.0 - fact) * color[1][2]; - return; - } - - if ((height < 0.7) && (height >= 0.6)) { - fact = (height - 0.6) * 10.0; - c[0] = fact * color[1][0] + (1.0 - fact) * color[2][0]; - c[1] = fact * color[1][1] + (1.0 - fact) * color[2][1]; - c[2] = fact * color[1][2] + (1.0 - fact) * color[2][2]; - return; - } - - if ((height < 0.6) && (height >= 0.5)) { - fact = (height - 0.5) * 10.0; - c[0] = fact * color[2][0] + (1.0 - fact) * color[3][0]; - c[1] = fact * color[2][1] + (1.0 - fact) * color[3][1]; - c[2] = fact * color[2][2] + (1.0 - fact) * color[3][2]; - return; - } - - c[0] = color[3][0]; - c[1] = color[3][1]; - c[2] = color[3][2]; -} - -static void -loadpic(void) -{ - GLubyte bufferter[256 * 256], terrainpic[256 * 256]; - FILE *FilePic; - int i, tmp; - GLenum gluerr; - - if ((FilePic = fopen("terrain.dat", "r")) == NULL) { - fprintf(stderr, "Error loading terrain.dat\n"); - exit(-1); - } - fread(bufferter, 256 * 256, 1, FilePic); - fclose(FilePic); - - for (i = 0; i < (256 * 256); i++) { - terrain[i] = (bufferter[i] * (heightMnt / 255.0f)); - calccolor((GLfloat) bufferter[i], terraincolor[i]); - tmp = (((int) bufferter[i]) + 96); - terrainpic[i] = (tmp > 255) ? 255 : tmp; - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - if ((gluerr = gluBuild2DMipmaps(GL_TEXTURE_2D, 1, 256, 256, GL_LUMINANCE, - GL_UNSIGNED_BYTE, - (GLvoid *) (&terrainpic[0])))) { - fprintf(stderr, "GLULib%s\n", (char *) gluErrorString(gluerr)); - exit(-1); - } - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR_MIPMAP_LINEAR); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - glEnable(GL_TEXTURE_2D); -} - -static void -init(void) -{ - float fogcolor[4] = { 0.6, 0.7, 0.7, 1.0 }; - - glClearColor(fogcolor[0], fogcolor[1], fogcolor[2], fogcolor[3]); - glClearDepth(1.0); - glDepthFunc(GL_LEQUAL); - glShadeModel(GL_SMOOTH); - glEnable(GL_DEPTH_TEST); - glEnable(GL_CULL_FACE); - - glDisable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - glEnable(GL_FOG); - glFogi(GL_FOG_MODE, GL_EXP2); - glFogfv(GL_FOG_COLOR, fogcolor); - glFogf(GL_FOG_DENSITY, 0.0007); -#ifdef FX - glHint(GL_FOG_HINT, GL_NICEST); -#endif - - reshape(scrwidth, scrheight); -} - - -int -main(int ac, char **av) -{ - glutInitWindowPosition(0, 0); - glutInitWindowSize(WIDTH, HEIGHT); - glutInit(&ac, av); - - glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); - - if (!(win = glutCreateWindow("Terrain"))) { - fprintf(stderr, "Error, couldn't open window\n"); - return -1; - } - - ModZMnt = 0.0f; - loadpic(); - - init(); - -#ifndef FX - glDisable(GL_TEXTURE_2D); - usetex = 0; -#endif - - glutReshapeFunc(reshape); - glutDisplayFunc(drawscene); - glutKeyboardFunc(key); - glutSpecialFunc(special); - glutIdleFunc(drawscene); - - glutMainLoop(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/terrain.dat b/nx-X11/extras/Mesa_6.4.2/progs/demos/terrain.dat deleted file mode 100644 index 2af385e9c2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/terrain.dat +++ /dev/null @@ -1 +0,0 @@ -‚ƒƒ…†„ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‡‰‹“•––•––––—˜š›œœš–“‘ŽŒ‹‹‹‹‹Œ‹‹ŽŒŒŒ‹‰†……„ƒ‚ƒ‚‚ƒ…ˆŠ‹‹ˆ…ƒ‚ƒ„…†‡‡†…ƒƒ„„…‡ˆ‰ŠŽ“““’’•˜š›™–•””•˜™—“ŽŽŽŽ‹‰†ƒ‚‚‚‚ƒ…‡…„ƒƒƒƒ‚ƒ‚‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„…†‰ŒŽ“•––••–—˜˜˜™œ™•“‘Œ‰ˆˆˆˆˆˆˆ‡‡‰‹‹ŠŠŠ‰ˆ‡†††„ƒ„…ƒƒƒ„†ˆŠ‹ˆ…‚‚ƒ…†‡‡††††ˆ‰ˆˆˆˆˆŠŽŽŽŽ‘”—›š˜———˜š›—”‘‹ˆ†ƒ‚‚‚‚‚„†„„ƒ‚ƒ„†‡…„„…ƒ‚ƒ„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…†ˆŒ‘’”•––•••—˜™™›œœœ˜–•’މ‡†…„„††…„„…††ˆˆ‡††……†…„„‡ˆ‡††…†ˆ‹Œ‰†ƒ‚ƒ†ˆ‰‰ˆˆˆŒŒŠ‰ˆŠ‹Š‰ˆŠŒ’–›œ›š›››œœ˜•’‘’’’‘Ž‹ˆ…‚‚‚‚‚‚„…ƒ‚‚‚ƒ…ˆŠˆˆˆ‡…„…‡…‚‚‚‚‚‚‚ƒƒƒ„„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡‰ŠŽ‘”••–—•”‘‘“•™œœœœš˜•’‰†„ƒ‚ƒƒƒƒ‚‚‚‚ƒ„ƒƒƒ„„„…†‡ˆŠŒ‹Šˆ††ˆŠŒ‹‰…ƒ„…ˆŒ‹‹ŒŽ‘’“ދЉˆ‡††ˆ‹”˜›žœœ›—•’‘‘““Œˆ„‚‚‚‚‚‚„…‚‚‚‚ƒ†ŠŒ‹‹Šˆ‡†ˆˆ…‚‚‚‚‚‚ƒ…†‡ˆ‡…ƒƒ‚‚ƒƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…†‰‹Ž‘•————–”’‘“—›œœœœ›˜•‘Œ‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ………‡‰ŠŽŽŽŒŠ‰ˆ‰‹Ž‰…„„†ŠŒŒ’“”•–”‹ˆ††……ˆŒ”˜›žžžœ›š—•’‘“”Œˆ„‚‚‚‚‚„……ƒ‚ƒƒ„†‰ŒŒŠˆ‰‰ˆ…ƒ‚‚‚‚‚„‡ˆˆˆ‡‡‡‡……†‡‡†…„ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‚‚‚‚‚ƒ‚‚ƒ†ˆŠŠ‹Ž’•——–••’ŽŽ‘”—˜š›š˜–“‘Іƒ‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…†‡ˆ‰ŠŒŽŒ‹‹ŠŠ‹‹‡„‚„‡ŠŒ’”“”—™–“ŒŠˆ‡†‡‰Œ“–™œ››››™˜™™—•‘‘“”’މ…ƒ‚‚‚ƒ„…………††‡ˆŠŒŽŽ‹Š‰ˆ…ƒ‚‚‚‚„†ˆˆˆˆ‰‹Œ‹‰‹Œ‹‰ˆ†„ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…„„ƒƒ…†„„…ˆ‰‹‹Œ“–—–•”“‘ŽŽ‘’”—š›š˜–”’‹‡„ƒ‚‚‚‚‚‚‚‚‚‚‚ƒ…†‡ˆ‰‹ŒŽ‘‘Œ‹‹Š‹ŒŠ‡…„…‡‰‹Ž‘”•”–š›˜•‘ŽŒŠˆ‡‰‹“–™›š™˜˜––—˜–“Ž“”‘‰†„ƒ‚‚‚ƒ„†‡ˆ‡ˆŠ‹‘ŽŠˆ…ƒƒ„„…‡ˆˆˆ‰ŠŒ‘’‘ŽŒŠ‡††…ƒ‚‚‚‚‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ„…†‡‰‡‡ˆˆ‡†‡ˆ‰Š‹‘”–—–•’‘’’’”—™š™—”’Ž‹‰‡…ƒ‚‚‚‚‚‚‚‚‚„…†‡ˆˆ‰‹Œ’••’ŽŒŒŒŒŒŠ‰ˆˆ‡‡ˆ‰‹’•––˜šœš—’ŒŠ‡†ˆ‹Ž‘”˜šœ›š—•••–•“‘Ž’“‹‰‡…„‚‚‚‚„†‡‡‡‰‹Œ‘‘‘““‘Œ‰ˆ‡†‡ˆˆŠŠŠŠ‹Ž‘“”““““‘Ž‹‰‰‰ˆ…ƒ‚‚‚‚ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„†……†Š‹Š‰‰‰ˆ‡ˆˆˆ‰Œ’”–—–“Ž‘’’‘“•˜›š—”’Ž‹‰‡†„‚‚‚‚‚‚‚‚„†‡‡ˆ‰Š‰Š‘”˜™•‘ŽŽ‹Š‹Œ‹‹Š‰ŠŒ’•–—™›œš–’Œ‰†ˆŒ’•˜šœ›™–””““”’Ž’’Ž‹‰‡…„‚‚‚‚‚‚ƒ„†Š‹Œ‘‘’’‘‘Ž‹ˆˆˆŠ‹ŒŒŽ‘“““’ދЋŒ‹‰‡……†„ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ…‡Š‹Š‰‡‡†‡‡‡ˆ‹Ž‘’”“’ŽŽŽ‘’”•—•“’‹‰‡‡…ƒ‚‚‚‚‚‚‚ƒ…‡‡‡‡ŠŠ‰ŠŒ•™š—”’Ž‹‹ŒŠŠŒ’”–—˜—•“މ‡ŠŽ‘”–˜™˜–”“‘’“ŽŒŒŽ‹‰†…ƒ‚‚‚‚‚‚‚‚ƒ†Š‹‹Ž‘’’‘’’’ŠŠ‹ŽŽŽ’‘‘‘ŒŒŽŒŒ‹Š‹‹‡„„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„†‰Š‰ˆ†††‡‡‡ŠŽ‘‘‘’’‘‘Œ‘“””•“‘Œ‰‡†ƒ‚‚‚‚‚‚‚ƒ„‡‰‡†‰‹‹ŠŠ‹–›š˜–“‘ŽŽŽŽŒŒŽ’“”–•“‘ŒŠ‹Ž“•———–”’‘““ŽŽŒŠ‡…„‚‚‚‚‚‚‚‚‚ƒˆ‹‹‘‘‘‘’’“‘ŽŽŽŽ‘‘‘‘ŽŽŽŽŽŽŠ‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‡‡‡‡‡ˆ‰‰‰Œ‘’‘‘‘’’’‘ŽŽ‘”•–•”“’‘‹ˆ…ƒ‚‚‚‚ƒƒ„…‡‰‰‡ˆŠŠŠŠŠ’˜ž žš˜–•””’Ž’’’‘‘’“’‘’“’ŽŽŽŽŽ’”–––•”’’““ŽŒŒŒŠ‰‡…ƒ‚‚‚‚‚‚‚‚ƒ†ŠŽŽŽ’“”’‘‘‘’“‘‘‘‘“’‘Œ‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…†‡‡ˆˆ‰‹‹ŒŽ’‘Ž‘’’‘ŽŽŽ“•–——–•”’‘ŽŒˆ„‚‚‚‚‚ƒ„†‡ˆˆˆˆˆŠ‹ŠŠŒŽ’˜ž¢¡ ššš™˜•’‘“•””’‘‘‘Ž‘’’’‘‘”–—–––•“’‘ŽŒŒŒŒ‹‰‡†…„‚‚‚‚‚‚‚‚‚„ˆ‹ŽŽŽŽŽ‘’‘‘ŽŽŽŽ‘”’‘‘““‘Ž‹†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„†‡…„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„††††‡ˆŠ‹‹‹ŒŽŒŒŽ‘‘“–˜˜˜˜™—•“Ї„ƒ‚ƒ„ƒ„………‡ˆ‰ˆˆŠŒ‹ŒŽ“˜  Ÿœššœœ›˜––•““•––•““‘ŽŒŒŽŽŽ‘’”––—™™–”“’ŽŒŠˆ„ƒƒ„ƒ‚‚‚‚‚‚‚‚ƒ…‰ŒŽŽŽŽ’’ŽŽ’•“‘‘ŽŽ‘“”“Іƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ…‡‰‹Œ‹‰‡…ƒ‚ƒ„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ………„…†ˆŠ‹‹‹‹ŠŠ‹ŒŒ‹‹Œ‘“•–™›››œ›—•“‘‰†…„ƒ………„„„…†‡‰‰ˆ‹ŽŽ”˜œŸŸŸœšœžŸ ››š™˜™š™—–”’ŒŒŒ‹‰‰Œ“””•——™››˜—–•“Œ‰†ƒ‚‚‚‚‚‚‚‚‚‚‚‚ƒ†ŠŒŽŽŒ‹Œ‘‘ŽŽŽŒŒŒ‘”‘ŽŽŽŒ‹‹‘“–”’І„ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„„…‡‰ŠŽŽŽŒŠ‡†‡ˆ††…„ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚„…‡Š‹ŒŒ‹Š‰‰‰‰‰‰‹Ž‘“—™šœŸŸŸŸœ˜•”’‰†………†‡‡…ƒ„†ˆ‰ŠŠŒŽŽ’•™žŸ¡£¡ ŸŸœ›™˜—“ŒŠŠŠˆˆŠŒ‘“––—˜šš›œ›™˜˜•“‘‰„‚‚‚‚‚‚‚‚‚‚‚‚‚„‡ŠŒŽŽŽŒ‹‹’““‘ŽŽŽŒ‹ŒŽ’”“ދЋ‘”––“Šˆ†„„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡ˆ‰‹’‘ŽŠ‰Š‰ŠŠ‰ˆ†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„†ˆ‹‹‹Š‰‡†‡‰‰Š‹’–šœŸ ¡¡Ÿœ˜–•’Ї…†ˆ‰Š‰‡††‡‰‹Ž‘‘“•™œœžžŸ £¤¤¥¤£¡  Ÿ››™”ŒŠ‰‰ˆ‰Œ‘’’“–™™š››œœœ›˜•“Іƒ‚‚‚‚‚‚‚‚‚‚‚„†‰ŒŽ‘’””•’Ž‹Œ”—–“ŽŽ’“”•”“Ž‹Šˆ†„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‡Š‹Ž‘’““‹‹‰‰‡†††††„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡ˆ‰ˆ‡††‡‰ŠŒ’•˜š›žœš˜–•“Œ‡…†‰ŠŠ‰‰‰‰ŠŒŽŽŽ’“““““”—š›œžžŸ¢¢£¥¤£¢¢¢¢¡¡ž›•‘Ž‹ŒŽŽ’•––•–™››œœ›œžžžžžœ—”‘Ž‹‡ƒ‚‚‚‚‚‚‚‚‚‚ƒ†‰‹ŽŽŽ‘“••—˜•’ŽŽŒ”˜—•’‘‘‘’““••••”““’ŒŒ‹‰‡…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„…‡‰ŠŽŽ’“”••‹Š‰‡…„ƒ‚„…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„†‡†…†‡‰ŠŒŽ‘”˜šœœœš˜—•“ŽŒ‰‡ˆŠŠ‰Š‹ŒŒŽ‘‘“•—––—˜˜šœœžŸŸ ¡¢£¤¤¤¤¤¤¥¤¢ž›–’’”–˜š›š˜™œžŸŸžŸŸ  žœ˜”‘Œ‰„‚‚‚‚‚‚‚‚‚‚ƒ†Š‹ŒŽ‘•˜™››š—•‘Œ‹ŒŽ‘”—˜—”’“””””“•—•••”““’Ž‹ˆ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ„…†ˆŠ‹ŽŽ‘““•––“‹ˆ…ƒ‚‚‚ƒ„„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„„„…†ˆŠ’”—š›››œœžœ™—–”‘ŽŽŽŒŠŠ‹ŠŠ‹ŒŒŒ“————˜™šœžžŸŸŸŸžžŸ¡¢£¢¢¢£¤¥§©¦¢Ÿœ˜”‘‘“•˜šœžžœž  ¡¢¡ ¡¡¢ žžž™•“‘Ž‹‡„‚‚‚‚‚‚‚‚‚ƒ‡ŒŒ‘‘’“•˜šœ›—“‹Š‹’’“–˜˜—•••–––•–˜˜—––•“’‘‘‘’’’‹†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‡‡†ˆŠ‹ŒŽ’“•–——•І„‚‚‚ƒ„„„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ„‡‰Œ’•™œœ›œœ›š™–”’‘ŽŒŒ‹Ž”˜šššššœ £¢¢¡¡ ŸŸŸ¡¤¤¤£¡¡£¥¨¬­©¥¢™•““–™œŸ   ¡  ¡£¤¥¤£¤¥¥£ ŸŸš˜–”‘މ…‚‚‚‚‚‚‚‚‚ƒ‡ŒŽ’“”–˜˜šžžš–’‰ˆ‰‹Ž“•–”””•••–——™™˜˜—–”’‘“““Š…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡ˆ‰‹ŒŽ’”•••–——˜–•“‹‡„ƒ‚‚ƒ…††ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„†ˆŠ‘“—›Ÿžœœ›šš›™—–•”“’’‘‘‘’”–™šœœœŸ¡£¥¦¥£¢¡   ¢¤¦¦¦¤¢¢¤¨­¯°«§£Ÿ›˜––˜šž¡¡ ¡£¤¥¥¦¦¦¥¥¦§¥¢¡¡žœœœš—’ˆ…ƒ‚‚‚‚‚‚‚‚ƒ‡‘“•—šœœœŸ Ÿ™•‘Œ‰‡ˆ‹‹Œ’“””•–——˜™ššš™™™™—•”‘’”•”‹‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ˆ‰‰ŠŒŽ“•–™››ššš˜—–•“‹†…ƒ‚‚ƒ„†‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡‰Œ”•˜¡ŸžŸž›™››š™™™˜—–•””‘“•—šœžžžž ¢¤¦¨©«©§¦¤¤££¥¦§§¦¥££¥«¯²±¯«¦¡žœ™˜™¡¤££¤§©ª©©©©¨§¨§¥££¢žž›˜”Œ‰†…‚‚‚‚‚‚‚„ˆŒŽ’–˜›ž¡¡¡¡¡Ÿœ˜•‘‹‰‰ŠŠ‹Ž‘“–—˜—˜š››œš˜——™š˜—”’’’“–—•’Іƒ‚‚‚‚‚‚‚‚‚‚‚ƒ„„„ƒ‚‚‚‚„‡ŠŠŠŒŽ‘•˜™šŸžœœ›˜–••‘ˆ…ƒ‚‚‚‚„‡‡…„„„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‰“–—™¡Ÿž ¡Ÿš™™™™œžžœ™—–•’’“–˜šœŸ¢£¢¢¤¦§¨©ª¬¬««ª¨¨©©©©©§¦¦¦§©¬±µ·µ±«¥£¡ŸžŸ¢¤¦¥¦§ª¬®®®­­¬ª©¨¦¥¥¤¡Ÿœ™–‘Їƒ‚‚‚‚‚ƒ†‰‹Ž”˜›ž £¤¤¢¡š—”’Œ‹‹‹‹‹Œ“—————™š››š—–—™›š—••”“•——–”‘Œ‡ƒ‚‚‚‚‚ƒƒƒƒ„…‡‡‡†„ƒ‚‚ƒ†ŠŒŒŽ’”–šœžŸ¢£¢Ÿœ˜••”‘ˆ…‚‚‚‚ƒ…†………††ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‡ŠŽ’”•—™ž¡¡¡¢¡Ÿœš˜—˜›ž ¢¡Ÿœš˜–••˜›œŸ¢¥§§§¨ª«¬ª«®®¯°¯®¬­­­¬¬ª¨©©ª¬¬¯²·º·³­©§¥£¢¢¤¦¨¨©«­®±±±±°®«ª©§§§¤¢žœœš–’‹‡ƒ‚‚‚‚ƒ…ˆˆ‰‘•šŸ¡¢¢¡¢¢™–•’ŽŒ‹Š‰‹“““’‘’”–˜–””–˜š˜˜˜˜–•–—––•“Ї„‚‚‚ƒ„…††‡ˆ†„„„ƒ‚‚‚‚…‰Œ‘’•—™šœŸ£¥¦¢Ÿ›—––•“Œˆ„‚‚‚‚‚‚‚ƒ…††ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†ˆ‹Ž’”—œ ¡¢¡¡Ÿœš˜—™œ ¢¢ œ™˜˜š ¢¤¦¨©©©©©ªªª­°°°±²±°¯°°¯­¬­­¬­®¯²µ¸¹¶²¯¬©§¥£¥§¨ª«¬®°±±°°¯¯­«ª©§¦¤¢žš™˜˜˜•’Œˆ„‚‚‚‚‚…ˆ‰ˆŠŽ“˜› ¢¢  ¢¢˜—–“‘‘‘ŠŠŠ‹ŽŽ’””““”–˜˜™™™˜————˜˜—”Œ‡„‚ƒ„‡ˆ‰ŠŠ‰†ƒ‚‚‚‚‚‚ƒ…‰Œ”•˜š››¡¥¨¨¥¢Ÿ›˜—˜˜•‘Ž‹‡„‚‚‚‚‚‚ƒ„…„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‡ŠŒ’–šž ¢¢¡Ÿœ›šš›¡¢¢ ŸŸœ›œ¡¥§©«­­­¬«¬««¬°²±²´¶¶´³´´²°°²²²²³³´¶¸¹·µ²¯«©§¦¨©ª¬®°²µ´²²±°¯­«ª©§¦¢Ÿš–••””’Œˆ„‚‚‚ƒ„ˆˆˆˆŠŽ”™ ¢£¢¡¡¡¡žš™—”’’’ŽŒ‹‰‰Š‹‹Š‹‹‹’“’‘‘“—™š™˜˜˜™™›œ›™–“ŽŠ‡……‡‰ŠŒŒŒ‹‡„ƒƒ‚‚‚‚ƒ‡‹Ž’–˜ššš›Ÿ£¨«¬©¥¡žš˜—–“Œˆ…‚‚‚‚‚‚‚‚ƒ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡‰Œ’–šžŸ   Ÿœœœœž   Ÿ  Ÿžžž¡¥©¬¯±³²±°°°±°°±±³µ·º¹¸¶¶´´´µ¶¸¹ºº¹¸¸º»º¸¶´±¯«ªªªª­±´¸º·µ´²°¯­«ª¨§¥ ›–“’‘ŽŽŒ‹‡„‚‚ƒ„†Š‰‡‰Œ•𡣤¤¢ ¡¡ š™—–––”‘ŽŒŠ‰ˆˆˆ‰‰‰Š‹’‘’—š›™˜™™šœž ›™—’Ž‹ˆ‰ŠŒŽŽŽŠ†„ƒƒƒ‚‚„ˆ”—šœœœ¡¤¨­®¬©¤ ›˜–•’‘‹‡„‚‚‚‚‚‚‚‚„„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ˆ‹“—šœž   Ÿœœžžžž ¢¢¡ ¡¢¥©­±´·º¸¶µµµµ´³³´·¹»¼½¼º¸¶¶·¹»½¿¿¾¾½¼¼½»¹¹·´±®­«ª¬®³¸¼¾»¸µ³²±®¬ª¨§¤˜“ŽŒ‹ŒŒŠ‡…………†ŠŽŒŠ‹‘—›žŸ¡£¤¢¢£¤¢Ÿ›ššš™˜•’‹‰‡††…†‡ˆ‹ŽŽ“˜œžœ›š›œž ¡žœš™•’ŠŒŽ‘‰‡………„‚ƒˆŽ“–˜œžžž £¥¨¬®­©¤ž›™˜–“‘މ…‚‚‚‚‚‚‚‚‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…ˆŒ”—™œŸ   ŸŸœœž ¢¤£¢£¥§«¯³µ·¼¿½»º»º¸¶·¸¹º»¼¾¾½½½»»»¼½¾¿¿¿¿¾¾¾½º¹·µ³±¯®¬­¯°´¹½¿½»¹·¶´±¯¬¨¤¡œ—‘Œ‹Š‹Ž‹‰‰‰‰‰‹Ž‘’—›Ÿ¡¢££¤¥¦¤¢šœœ›˜•’‹‰‡„ƒ„……†ŠŒŒŒ“™ž Ÿžž¡¤£Ÿœš™•Ž‘’’“’’Ž‹‰ˆˆ‡…„…Š‘–™šž¡¡¡£¦§©­°®ª£žœ™—•“Žˆ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‰Ž“–—™œŸ ¡  ŸžœžŸ¢£¥¥§¨©­±¶º»¼ÁÄÃÁÂÁ¾¼»¼½½¾¾¿¿¿¿ÁÂÁÀÀÀÀÁÁÀÀÀÀÀ¿¾¼¹¶³²²±¯°±²´·º¾ÀÀ¾¼º¸¶¶³®¨£Ÿœ—’Œ‹‹ŽŽŒ‹Š‹‘“’’’’“—›Ÿ¢¥§¨§¨¨¨¥¢žž ¡¡š•‘Œˆ…„‚‚‚‚‚ƒ†‰ŠŒ”™ž ŸŸŸŸ ¢¤¤ ››™—”’’’’’’“”“ŽŒŒŠ‰‡†‰•™›¢¦¥¦§¨©ª­°­¨£ žœ›š—“‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‰Ž”–˜›žŸŸ ¢¡ŸœœœŸ¢¤¦¨ªª­²·»ÀÀÂÆÉÇÆÇÆÃÂÁÂÁÁÁÂÃÄÄÄÅÅÅÅÄÄÄÄÄÃÁÀÀÀ¿¿¼¹¶´³³²²³µµ·¹¼ÀÃÀ¾½¼º¸·µ°ª£™–‘ŽŽŽŒ‹Š‹Ž‘‘’“’”•”“”˜œ £§©©¨¨§¦¤¡Ÿž ¢¢¡Ÿœ—‘Œˆ…„ƒƒƒ‚‚ƒ†ˆŠ‘–›ž      ¢¤¤¡›š™˜–”“’‘‘’”–•“ŽŒŠ‰‰’—› ¥¨©©¨¨©«®¯¬¨¥¡œœ—“‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†ˆ‹”–˜›žž £ Ÿœœ››œž¢¤¨ª«­°¶¼ÀÃÄÆÊÍËÊËËÈÆÆÅÄÄÅÆÈÈÈÈÉÉÉÉÈÇÈÈÆÃÁÁÁÁÀ¾¼¹¶µµµ´µ¶¸¸º¼¾ÂÃÁ¿¾¼»º¹·²¬¥ž™•ŽŽ‘Œ‹‹‹‘’”’‘’“–˜›ž¢¤¥¤£¢¡Ÿž››œžŸžœ–’Šˆˆˆ†…†‡‰Š‘“–šŸ   ŸžžŸ ¡Ÿœš›˜•“’‘‘Ž’”–“ŒŠŠŒ“˜œ¡¤§¨§¦¥§ª¬­ª§£ ž›˜“Š…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…ˆ‹‘“”–™œœœž žœššš›™™œ¡¥ªª«®²¸½¿ÂÄÇËÎÌÌÍÍÌÊÈÈÈÉÉÊÊÊÉÉÊËËËËËËËÉÇÄÃÂÂÀ¿¼º¸¸·¶¶·¹ºº»¼¿ÁÁ¿¾¼¹¹º¹·±¬¥ž™“Ž‹ŠŠŒŒ‹‹ŒŽ‘ŽŽ‘“•—›ž¡¢¡Ÿžœ›˜˜™šœœš–““‘ŽŽŒ‹Š‹‘•˜›Ÿ ¢¢¡Ÿœœžœ››™•’‘‘‘Ž”–’ŽŒŒ’–› £§§§¥¤¦¨ªª¨¦¢ Ÿ™•ˆƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‰‘‘’”•™œœœž›šš›œ›™˜œ¢§«¬®°´º½¿ÁÃÆËÏÎÎÎÏÎÍËËËÍÍÍÌÌËËÌËÌÍÎÍÎÏÎÊÇÄÃÂÁ¿½¼¼»º¹º¼½½¼½½¿¿¾¾½º¹¹¹¹¸³®§ ™’‰ˆˆ‰ŠŒŒŠŒŽŽŒŒŽ’“•˜œŸ¡Ÿœœœ›™˜—˜š›œ›˜—–•““’’“’“–™› ¢¢£¢¢ ››œœš—’Ž“”‘ŽŽ’”–šŸ¡¤£¢¢£¥¦§§¦¤¢¡ž›–‘‹†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚†Œ“’‘’“”•˜š››œœšš›œ›š™šž£§¬°³µ¹¼¾¿ÀÃÇÌÐÏÎÍÎÍÍÌÍÎÐÏÎÍÌËËÊÊÊÌÌÍÏÒÑÏËÇÅÄÃÁÀÀ¿¾¾¿ÀÂÀ½½½½½¼¼»¹¹¹¹º»»·²«£š’‹‡‡ˆ‰Š‹Œ‹ŒŒŒŒŽŽ‘”—šžœšš›œœš™—˜™š›š™™˜——–•””•–˜™šœœž ¢¢££££Ÿœš™šœœš˜”‘ŒŽ‘’‘‘“”••—š ¡  ¡££¤¤¥¤££¡˜“Ž‹ˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„‰Ž“––”•••–—˜™šš™˜™›œ›™™›Ÿ£§¬±¶¹¼¾¿¿ÀÄÉÎÑÑÐÎÍÍÎÎÏÐÐÏÎÍÍÌÊÊÌÍÎÏÐÓÕÔÑÍÊÇÅÄÂÂÂÁÁÂÃÅÇÿ½¼¼¼»¹·¸¹¹º¼¼»·³­¥›“‹†‡ˆŠ‹ŒŽŒŒŽŒŒŽ“•—™›š™š›››š™˜˜˜™™˜™š˜˜˜˜˜—––—šœžŸ¡¡ ¡¡¡ œš—–•–––”’‘‘ŽŽ‘“””””•••–˜š›žŸ ¡¢¢¡£¥£¡ Ÿš•‹ˆ†ƒ‚‚‚‚‚‚‚ƒ„„„ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚„†‡‹”˜™™™™˜˜—–––•”–˜š›™˜™›ž¢¦ª°µº¾ÀÂÃÅÉÍÑÕÕÒÎÌÍÏÏÎÏÐÏÏÏÏÎÍÏÒÓÔÕÕÖÖÓÏÌÊÆÄÂÁÁÂÁÂÃÆÉÊÆÁ¾¼¼¼º¶¶¸¸¸º»»º¶±ª¢š“‹†‡‰ŒŽŽ‘ŒŒ‹ŒŒ‘’“–˜˜™››š™˜——˜˜˜˜—˜™™š›››š˜—š ¡  ¡¢¡ ¡¡ ž›˜–•’‘’’‘‘’‘“–——˜˜˜––—˜™™›œŸŸŸ ŸŸ£¤¢Ÿ›–‘Œˆ…ƒ‚‚‚‚‚ƒ‚ƒ†‡‡‡†…‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡‰Œ‘–šœš™—”“‘‘”–˜™˜—™› ¤©®³º¿ÂÄÇÊÍÐÕÙ×ÓÐÎÏÐÏÎÐÑÑÒÒÒÑÑÓÖ×ÙÚÚÙ×ÓÏÌÊÇÄÁ¿¿ÁÁÂÅÉËÍÉÄÀ½¼¼¸µ¶¶·¸¹»»¹´®©¢›”Œ‡ˆ‹Ž‘‘’’“’’ŽŠŠ‹‘‘’“””–˜™˜–•–—™˜˜˜˜˜™šŸ  ŸŸ¡£¤£££¤£¢£¢ ž›˜•’ŒŒ‘’’‘‘•—™š››š™™™™˜˜™›œŸ¡£¡ž›˜“މ…ƒ‚‚‚‚‚„……†ˆŠŠŠ‰†ƒ‚‚‚‚‚‚‚‚‚‚‚ƒˆŒ‘“˜œœš–’Ž’•˜––™›ž¡¥ª®³¹¾ÂÆÊÎÐÔÙÛØÖÒÏÎÎÍÏÑÓÕÖÔÔÕÕÖØÚÛÛÛÙØÔÐÍËÈÄÀ¾¾ÀÁÃÆÉÍÏËǾ¼º¶µµ¶·¹º»¹¶²®©£œ•‰‹“””–—––”’‘‘Œ‹‹ŒŽ‘“””•—™—””–˜™˜™™˜—™¡£¤¤£¡ ¢¤¦¦¥¤¤¤¤¤¥¥¢žœ™–‘‰‰‰Š‹‘“““’“–˜šœœœ›››››š˜™™šš™™œŸ¢¤¢ž™–‘ˆ…ƒ‚‚‚‚ƒ…†‡‰Š‹ŠŠ‰‡„‚‚‚‚‚‚‚‚‚‚‚…‹”•—›žž›˜”‘Ž‘”•–˜›ž¡£¦ª®³¹¾ÃÇËÐÒÖÚÜÚØÔÑÏÏÐÑÓÖØÙØ×ØØÚÜÝÝÜÜÛÙÕÒÏËÉÆÁ¾ÀÂÃÄÇËÎÎÌÉÄÀ½»¹¶µ¶¸¹¹¹·´±®ª¤–Œ“––—™›š˜•’‘‘’“ŽŽŽ’•–—–—™š—••—™šš››š› ¢¤¦¦¥¢¡¢£¤¤£¢£¤¤¥§§£ š•‹ˆ‰‰ˆŠŒ‘‘‘ŽŒ““”–™™™™ššššœ›š˜––——™œ ¤¦£Ÿ›—“Ї„‚‚‚‚‚‚ƒ„‡ˆˆ‡ˆ‰ˆ†„ƒ‚‚‚‚‚‚‚‚ƒˆŽ’––—šœœ›™–“‘‘‘‘‘“–™›¡£§©¬¯³¸¼ÀÄÊÐÓÖÙÛÚ×ÕÒÑÑÓÔÖØÚÛÚÚÚÚÛÜÜÝÝÝÛÚ×ÕÏËÉÆÁ¿ÂÅÆÇÉËÌÍÊÈÄÁ¾½»¹¸¸··¶·´²°®©¤ž˜‘Œ•˜š™˜™›˜•“’‘““ŽŽ‘‘’•—š›šš››™˜˜™šœžŸ ¢¤§©©¨¦££¢£¤£¡£¥¥¦©©¦¡ž›•‹‰‰‰ˆˆŠŒŽŽ‹ŠŒ’“’“•—˜™š›››ž›–““”•—šŸ£¦£ œ™–’‰†ƒ‚‚‚‚‚‚ƒ…†‡‡‡ˆ‰‡…ƒ‚‚‚‚‚‚‚„†‹•—–—™›››š™—•“’““”“’“•—›¡¥§ª­¯±´¸º¾ÃÊÐÔ×ÛÜÚÖÔÒÑÒÔרÚÚÜÜÜÛÛÛÜÜÞÞÝÜÚØÔÏËÈÆÃÂÆÉÊËËÌËËÉÆÄÂÁ¿½¼º¹·¶µµ³±¯­©¤Ÿ˜’“˜œœšš™–””“‘‘’““’’“”–””–™œœ›œœ››œœ ¢¢£££¥©«­¬«¨¦¥¤¥¥¢¡¢££¥¨©¥¢Ÿ›•Œ‹‰ˆ‡ˆ‰‹ŒŠˆŠŽ’””••—šœžŸŸŸŸžœ˜•””•–˜›Ÿ£¦¤¡ž›˜•‘Ї„‚‚‚‚‚‚ƒ„‡††ˆˆ…ƒ‚ƒ‚‚‚‚‚…‡Š‘”••–—˜™˜˜˜–”“““““”•–—˜šž£§©«­¯²µ¶¸½ÃÉÏÒÖÚÜÙÕÒÑÑÓÖØÙÙÚÜÜÜÜÝÜÝßàÞÝÜÛ×ÓÐÍÊÈÆÇÉËÍÎÍËÊÈÅÃÃÃÃÁ¿½»¸¶µµµ´²¯«§£ž™•’–šŸœš™˜——•“’“““”••–——––™›ž ŸžžžŸŸžŸ¡¤¦§§§¦¨«­¯®­ª¨§¥¥¥¢¡ ¡£¥¨©§¤Ÿ›–’ŒŠˆˆ‰‰‰‹ŽŒŠ‰‡‰’••••˜›ž ¡¢¡ žœ˜•””–˜™›¢¦¥£ š˜•‘Ž‹†ƒ‚‚‚‚‚‚„†……‡†…„……ƒ‚‚‚…‰‹’”–––––––——•““••••––—˜˜›Ÿ¤¨«¬®°²³´¶¼ÂÈÍÑÔÙÛØÕÓÑÒÕØÚÚÙÛÝÝÞßßÞßáâàßÞÜØÕÒÏÌËÊÉËÌÏÐÍËÊÈÅÄÅÅÄÂÁ¿»·µ´´´´²­¨¥¡ž›—–šœŸ ž›™˜˜˜•“““’‘‘’“••••—›ž ¡¡¡ Ÿ¡£££¥¨©©ª«ª©«¬¯±°­ª©¦¥¦¦¤£¡¡¢£§ª§¥¡žš˜•‘ŒŒ‰‡‰Šˆˆˆ‰Œ’“•–˜šž¡¢£¢ žœš—••–˜™š¢¦¥¢ Ÿœ›—“‹†ƒ‚‚‚‚‚ƒƒƒƒ„…†‡ˆˆˆ†„ƒ„†ˆŠŒŽ’•˜–”““““””“’“••–———˜˜™›ž£§«­­­®±±³¹¿ÄÊÍÑÕ×ÖÖÔÓÔÖÙÛÜÜÞßàâââááãäääãáÝÙÕÒÑÏËÉÈÊÌÌËÊÊÉÈÇÆÆÃÂÂÀ½º¶³²±°®«§£žœ™—˜šœŸ¡Ÿœš™—–“‘‘‘ŽŽŽ‘“”•–™œŸ ¢£££¢¤¦§©«¬¬­®®­­­®°³±­«ª¨§§§¦¤¢¢¢¤¨ª¨¦£ žœ™–”“‘‹‰ˆ‡……ˆ‹Ž‘’”•—šž¢¤¥¦£Ÿš—–—˜˜˜š¢¦¤¢¢¢ œ™•‘‹‡„‚‚‚‚ƒƒ‚‚ƒ„†ˆ‰‰Š‹‰ˆˆˆˆ‰‹Œ“—™—•“’““’’’’”••–˜™™™™™œ¡¥¨¬¬ª«­¯°²¸½ÃÈÌÏÒÕÖÖÖÕÖØÛÝÞßàâåçæäããæçççæäàÛØÕÓÏËÈÈÈÉËËËËËÊÈÇÅÃÂÂÁ¾»·´±®¬¬©¦¡š››œœ ¡ žœš—•’Ž‘”–˜šœŸ¡¢££¤¥¦§©«­¯¯°²´´²±±±²³±¯­¬«ª¨§¤¢¢£¥¨ªª©¨¦¥¢Ÿžœš˜•‘‰†…„…ˆ‹Ž’”–—œ¡¤§¨©¥¡Ÿš˜——˜™™šœž¡¤¤¥¥¥¡›™•‹†„ƒ‚‚‚‚‚ƒ„†‰ŠŠŠ‹ŒŒŒŒŒŽŽŽ‘•˜š™—”’‘‘‘“••–—˜˜™š›Ÿ£§ª«ªª««¬®²·½ÂÆÊÎÑÔÕÖÖÖ×ÙÛÝÞâäçéêèèçèèèçççæáÜÙÖÒÏÍËÊÊÉÈÊÌÌÌÊÈÈÇÅÄþ»¸¶²­ª¨¥£ŸŸŸŸžžŸ    Ÿœ˜“‘Ž‹ŒŽ•˜›ž ¡¢¢£¥¦¨©«®±²²µ·¸·µ´³²³³²°¯®®¬ª§¤¢£¥¨ªªªªª¨§¥¢¡ š–’މ„‚ƒ†ˆŒŽ‘“•˜¡¥¨©©¥¢Ÿ›˜—˜˜™ššš›Ÿ¡£¤£¢Ÿœš–‘Œ‡„‚‚‚‚‚‚ƒ„†‰‰ŠŠŒŽŽ‘“•˜š™—”Œ“–––—˜ššœŸ¢¥ª­­¬¬««¬®±¶½ÁÅÈÌÏÒÓÔÕÖ×ÙÛÝáäçéêëëëëëëêèæçæáÝÚ×ÔÒÏÍÌÊÈÈËÍÎÎËÉÉÈÆÅÃÁ¾º¹·³®«¨¦¤ ž ¢££¢¡¡ ¡¡¡ ™”‘ŽŒ‹Š‹’–™š›œŸ¡¢¤¤¦¨ª¬¯²µ¶¸¹¸µ´³´µ¶³¯­­¬¬«ª¨§¨ª©¨¨ª«©§¦£ Ÿ™–“‘‰„ƒ„‡ˆŠ‹ŒŽ•› ¢¢£¤¢¡˜––––—˜˜™™™™›ž›š˜—–•‘‡ƒ‚‚‚‚‚‚‚‚‚ƒ„†††‡ˆ‰Š‰‰‹Œ’“”—™™˜”‹Š‘“–——™›œ £¥§¬°°°®­®°±³¸¾ÂÅÈÊÍÏÐÑÓÕØÜÝàáãåèëììììììëéèèæáÞÜÚÖÓÑÏÎÎÌÌÎÏÐÏÌÊÊÉÇÅÃÁ¾¼º¸¶³°­ª¨£ ¡£¤¥¥¤¢¡ ŸŸžœ˜•’‹ŠˆŠŒŽ“–˜™™›Ÿ¡¢¢¤§©«¯³µ·¹¹·¶¶¶·¸¸´°®¬­®­¬««­®«¨¨ªª¨¦¤ ›–“‘Œ‰…ƒ…††‡ˆ‰‰Š“™žžŸ Ÿžš—–••••–˜˜—–•–—–””’‘‘‘ˆ„‚‚‚‚‚‚‚‚‚‚‚ƒ„ƒƒƒ„†‡††‡‹”••–˜™™•‘ŽŒŠŠ’”—˜™›Ÿ £¥§ª¯³´´±°²´µ¶º¾ÂÆÈÉËÌÎÑÔ×ÚÝàáââåçëíííìììëêêéæãáàÞÚ×ÕÓÑÐÏÐÒÓÒÐÍËÊÊÈÅÃÀ½¼ºº·´³±®ª¦¤¤¥§¨¨§¤¡ Ÿž›™–’‹‰ˆ‰‹‘”–™š››Ÿ ¡£¥§«°²´·º¹¸¸¹¹º»¹µ²°¯¯®­¯¯±³²¯«©¨¦¥¤¡›œš–’Ž‹ˆ……………………„†‹‘—›œœœœš˜–””••”•––”’’’ŽŽ‹Š‹‹†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚ƒ†Š•—˜˜™™˜–”‹‰‰‘•˜š›œŸŸ £¦©­²···µ´µ¶¸»½ÀÃÈÉÊËËÎÑÔÙÜßâååååçéëíïîííìëêèæäâââÞÙÖÔÔÕÕÖÖÕÓÐÍËÊÉÆÄ¿¼»º¸¶µµ´±­ª¨¦§©ªª¨¥£ žœš—•’‹ˆ…ˆ‹Ž‘•˜™šš›žŸ £¦«¯±´¸»º¹¹º¼½½»·´²°°¯°±³µ¶µ±®«§¥¤¢Ÿ››š—“Šˆ††††……„ƒ‚„Š”˜ššš›™—–•““““““””‘Ž‹‰ˆˆ‡……†…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…Š•—™š››š˜•‹‹Ž“—šœž ¡¡¢¦©­±µ¹¹¹¹¸¸¹¼¿ÁÂÆÉÊËËÌÎÑÕÙÜßåééçæçêëíïïîíììêèçæçææáÜÙØØÙÙÙØÖÔÑÎÌËÈÇÆÃÁ½»¹·¶µ¶¶³°®¬ªª«¬¬ª§¤¡š—”’Ž‹‰†„‡Š‹‹’”••–—˜˜™›ž¢§­±¶¹»º¹¹ºººº¹¶´²±²´µ¶¶¶¶´±¯«¨¦¤¡žœšš˜”’Ž‹‰‡††††‡…ƒ‚ƒ†ŠŽ’•˜™›™—–•“’‘Ž‹‰‡…„…„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒˆ‘”˜š››˜–”’ŽŽ‘•˜›ž¡¤¥¥§ª­°³·ºº»¼¼½¿ÂÅÆÇÈÈÉÉÉÊÌÑÔØÛàæêêèçèéêìîîîíìììêéêêêéäàÞÝÜÛÚØ×ÖÓÐÍÌËÊÉÇÅÄ¿¼¹¹¸·¶¶´³±¯®®®¯­ª¦£Ÿ›˜”’‹‰‡……ˆŠ‰ˆ‹Ž‘’”””–—˜›¡¥«°µ¹¼¼»ºº¹¹º¹¶´²²µ·¹¹¸·¶´²¯¬ª¨¥¡œœ™–“‘ŽŒ‹‰‡†††‡…ƒ‚‚ƒ†‰Œ‘•™›™˜——•’‘Ž‹‰‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚‚‚‚ƒ†Š‘–™›š™˜—”“’’”–™¡¥¨©«¬¯±³¶¹¼½¾¿ÁÂÄÇÈÉÉÉÉÊÊÉÉÌÐÔ×ÜáçëêéèéêëíïððïîððííîîíëèæäáàßÛØ×ÖÔÒÏÌÌÊÈÇÇÅÁ½¼»»¹¸¸¸·µ´³±±±®©¥¢˜”‘ŒŠ‰‡†…‡ˆˆ‡†‰ŒŒŒŽ‘“”•––—› £¨¯µ¹¼½¼»º»¼»º·µ´µ·¹»»º¸µ³°®­­ª¦¢žœ›˜—•’ŽŒŠ‡…„ƒ„…„„ƒƒƒ…†‰’—š™˜˜˜–”‘‹ˆ†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„ƒ‚‚‚‚‚…‡Š”—™š››š˜—”’•˜œŸ¢¦ª®±³´¶¸º¼¿ÀÁÃÄÅÇÉÉÉÉÊËËÊÉÊÍÐÒ×ÛßåééèèêëîðòóóññòñïïïïïîëêèæãáÜÙØ×ÖÕÒÎËÈÇÆÆÆÂÀ¿¿¾½½¼»º¹·´²²±¬§¥¢›•‹‹‰ˆ‡††‡‡‡††ˆ‰‰‹Ž‘“””•–šŸ¢§­²·»¼¼»¼½½¼»¸·¸º»»½½¼¹¶³±°¯¯¬¨£žœš˜—•”‹Š‡„‚‚ƒ……„ƒ‚‚ƒ„†ŠŽ“—––––”’ŽŠ‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„„ƒ‚‚‚‚‚ƒ„‡Œ‘–™›œœ›š˜••—𢤩®³µ·¸¹»½¿ÂÃÆÇÈÈÉËËÊËÍÍÍÌËÌÏÑÓ×ÛàæêèçèéíðòôõõôôòððïïðïîíìêèåáÝÚÙ×××ÓÎËÉÇÆÆÇÅÃÃÃÂÁÀ¿¾½¼º·´²±­¨¦¢›”ŒŠŠ‰ˆˆ‡‡†††……†‰‰ŠŠ‹Ž‘’“•™ž ¤©®³¸¹¹º»½¾½½¼¼¼¼¼¼¼¼¼º¹¹¶´³±®ª¦¡Ÿžš–“’ŒŠ‰‡„ƒƒ…†…„ƒ‚‚ƒƒ„†Š’‘ދЉ†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ˆ‹“•–˜˜˜—•••—šŸ¤¨­°³µ·¹»¼¿ÂÅÆÇÈÉÉÊÊÊÊÍÏÏÎÎÎÎÐÓÕØÞäéëêêêëîïñóóòòòðîíììëììêéçåâàÝÜÛÙØ×ÔÑÎÌÉÇÈÊÇÅÅÆÅÅÃÂÁÀ½»¹¶µ³®ª¦¡™”‘ŽŒŠ‰ˆ‡…„………†‡‡‡‡ˆŠ‹Ž”—›Ÿ¡£§«°´·¹º»½¾¿À¿¿¿¿¿¾½½¼»½¼»¹¸µ²¯ª¦£Ÿ™–”’‹‰‡††‡‰‰ˆ…ƒ‚‚ƒ‚ƒ„‡‹Œ‰†…„„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†ˆ‹Ž‘“””•–••––™ž¢§«®±´¶·»½ÀÃÆÈÈÇÈÉÊËÊÊÍÐÐÐÑÒÑÏÒÕØÜâèëíîîîîîïðññðñóðîììêéêéçååäáßßßßÜÙ×ÕÔÑÎÌËËËÉÈÈÉÉÉÆÄÄÃÀ¾¼¸·´°«¥¡Ÿœ—”‘ŽŒ‹ˆ…ƒƒƒ…‡‰‡………†‡‰ŠŒ•™¡¢¤§«®±µ¹»¼¾¿ÁÁÀÁÂÂÀ¿ÀÀ¿ÁÁÀ¿¿¾ºµ°«§£ž›™™—”’‹ŠŠ‹‹Šˆ…ƒƒ„………„…††„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…†ˆ‹Ž“‘‘’“”—™›Ÿ£¥©¬°³·¸»¾ÂÄÇÊËÉÈÈÉËÌÍÎÐÒÒÓÓÔÒÑÔ×ÚßäèëîîîðñðñññððòóñîìëéèçææååäããââáßÛÙ×ÖÒÐÐÏÎÍÌÌÌÍÌÊÈÇÆÄÁÀ½º·µ°ª¥¡Ÿ›™•‘Ž‹ˆ†ƒ‚ƒ†‰‰†…„ƒ„†‡ˆ‹—œž¡£¤§©¬°µ¸¼¾¾¿ÁÁÂÃÅÄÂÁÂÃÄÅÄÃÃÂÁ¾¹³®©¤ žœ›˜•“ŽŒ‹‰†„„„†…„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…†‰’’“–™œž¢¥§©¬¯µ¸»½ÀÄÆÊÌÍËËÊÉËÎÎÏÐÒÔÕÕÔÒÒÕÚÞâæéíðððñóòññðïðòóðîìêèçæææççææååäãáÞÛÚØÕÓÓÒÐÎÎÏÏÏÎÌËÊÇÄÃÁ¾»¸´¯ª¦¢ ŸŸ™•‘ŽŠ†ƒ‚ƒ†‡‡†„ƒ‚‚„…†Š•š ¢£¦¨¬¯±³¶¹»¾ÀÃÄÅÅÅÅÅÄÄÅÆÆÆÅÃÁÀ¼·²®ª¨¤¡Ÿ›š˜–”“‘ŽŽ‰†„„…„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‡‹Ž‘””’‘“–˜š›Ÿ¢¥©¬°´·»¾ÁÄÇËÌÍÍÍËÊËÌÍÏÑÒÕÖÔÒÑÒÖÛßäèëïòñïðñðîíííïñòðíëéèèææçééèèèçäãâàßÝÛØÕÔÒÐÎÏÑÐÐÏÎÍÊÇÆÄÁ¾¼¸´¯«©¦¤£¡žš–’Žˆ„‚‚ƒ„…‡†…„‚‚‚ƒ…Š•™œŸ¡¢¤§ª¬®°±´·¼ÁÄÅÅÅÆÇÇÆÆÇÈÈÈÇÅÄÿ»·³°­©¦¢žžžœš™•“““‘ˆ„…†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†Š’”–•”–˜™š›Ÿ¡¤§«¯³·»¾ÁÄÉÌÍÏÐÑÎËÌÌÐÓÓÔרÕÓÑÒØÜáåéíðñïîïïîìììíïðïîìéççççéëëììëëèåäãããáÞÛØÕÒÏÎÐÑÑÑÑÐÎËÊÉÅÁ¾¼¸´²°­«ª§£ œ–’Œ‡ƒ‚‚‚‚ƒ………ƒ‚‚ƒ„…‰Ž“—šœž ¢¤¦©«­¯²µ¹¿ÃÃÄÅÆÇÈÇÇÇÈÈÉÈÉÉǾ»¸´°¬©¥¢¡¡ Ÿžš———“‰††…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ˆ‹‘”——˜š››œœŸ¡£¥§«¯³·º½ÀÄÈÌÏÒÓÒÏÎÏÐÓÕÖØÚÚ×ÕÔÕØÝãçêîïïîííììëìíííìëêêçææçêííîîîîíéæäåæèåáÞÚÕÑÏÏÐÑÑÑÒÑÐÏÍÊÅÁ¿½¹·µ´²±¯«¦¢—‘‹‡„ƒ‚‚‚„…„„„ƒ„…†ˆ‹”˜š›Ÿ¡¤¦¨«®¯¯²·¾ÂÂÂÃÅÇÈÇÇÇÉÈÉÊËËÈÃÁ¾º¶²¯¬§¤¢¡¡¢¢¡ž›š™”‹ˆ‡†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…ˆ‹’–šš›œœœœž £¥¦¨¬¯³·¹¼ÀÄÈÍÒÕÕÔÒÑÑÓÔÖØÙÛÜÚØÖ×ÚÞäèêìîïîííìëëíííìêèççååæèëîîííííëèåääçèåáßÛÖÒÐÎÏÐÑÒÑÐÐÏÌÊÅÁ¿½»··µ´³±¬§¤Ÿ™’Œˆ…„„ƒ„†‡‡ˆ†…‡Š‹‘”–™›Ÿ¡¤§§¨«­®¯²¶»¿ÁÁÂÃÆÈÆÅÆÇÆÇÇÈÇÄÁ¿»·³°­ª§¤¡ ¡£¢ œ˜”ŽŠˆ†„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‰‹“˜œœž›œžŸ¢¤¥©­°´¹»½ÀÃÇÌÒרÖÕÓÓÔÔÔÕØÚÛÚØ×ÙÛàäèëíïïîîîíììíííìêçæåäääåçéééççæåãáßàãäáÝÛ×ÔÓÐÎÎÐÐÏÍËËËÊÈÃÀ¾¼¹·¶´²°®«¨¥ ›•‘Œˆ‡†††‡ˆ‰‰ˆˆ‹’•—˜™›ž ¡£¦¨©ª¬­­®±´¹½ÀÀÁÂÄÆÆÅÆÅÄÅÅÄÄÂÀ½¹¶²®¬ª¨¥¢¡£¥£¡ ŸŸš•‘Ž‹ˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…‡‰‹Ž’•šŸ Ÿ››œœž £§¬°³·º¼¿ÁÄÈÎÔÙØ×ÖÕÔÔÓÓÖØÚÚÙØØÚÝàäèëîðñðïïðïîîîííêèæäãâããäåååäââàÞÜÛÛÝßÜÙÖÓÒÒÏÍÎÎÎÎËÈÈÈÇÅÂÀ¾¼¸µ´²°¯®ª§¤ œ™–‘ЋЉ‹ŒŒ‹Š‹Ž“–šžŸ¡£¦§ª¬­¬««­®±¶º¼½¿ÁÂÄÄÅÅÄÃÄÄÃþº·´±®¬¬«©¥£¤¥¥¤¡Ÿžœ˜•’‰†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ˆ‰‹‘”—ž£¢¡žœœ›šœ ¦«°´·»¾¿¿ÁÄÊÑÖÚÙØØ×ÕÔÔÕ×ÙÚÚÚÙÙÛÞáãæéíðñðïððïïîíìëéèæäâááââáàáßßßÞÜÚØ×ÙÚØÖÓÐÐÐÎÍÌÌÌÌÈÆÄÃÃÃÂÁ¾ºµ±°¯®®¬¨¦¤¡Ÿœ™•‘ŽŒŽŽŽ’•™ž ¡¡¡¡£¥§©¬¯¯®¬«¬­°´·¹»¿ÁÁÂÃÄÃÁÀÁÂÂÁ¿»·µ²¯­®®­«¨¥¦§§¥¢Ÿžœ™•’Œ‰„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡‹‹”˜£¦¥£¡Ÿžœ›œ¡¨®³·º¿ÁÁÁÄÈÍÓ×ÛÚÙÙÙ×ÖÖÖØÚÛÜÜÛÜÞàâäæéíïñððññðïîíëëêéæãáßßßÞÜÜÜÛÜÜÛÙÖÔÕÖÖÕÓÐÎÎÏÎÌËÊÊÉÆÃÁ¿ÀÁ¾¸²°¯®®­ª§¦¥£ ›˜–“‘ŽŽ‘‘“–šžŸ¡¢¤¦¨¨©¬®®®­¬««­°±³¶º½¿¿¾¿Á¿½½½¾¿½¼¹·µ²°¯®®­­©§¨¨§¥¢ žœ˜“ŒŠ†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ŠŽ’•™£¦¨§¦¤¢¡Ÿœ¡¨®³µº¾ÁÂÅÉÌÐÔ×ÚÙÙÚÛÛÚÚÛÜÝßàßÞÞàâäåçêîðòòòóôóðîîìêéçâßÞÞÞÝÜÛÛÚØ××ÖÕÔÒÒÒÒÑÏÍÌÍÍÊÈÆÆÆÇÄÁ½»¼¾¿À»¶³±°°¯®ª§¨¨¤ žœš˜•”‘Ž’“““•™  ¢¤¦©«ª«­¯¯¯®®«ª¬¯¯±´·º½¼¼¾À¾¼ºº¼¼¼º¹·µ´±¯¯®¯¯¬«ªª©¦£ š—“Ž‹ˆ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ˆ’•—›Ÿ£§©«ª©¦¥£ žœ¡¦­²¶»ÀÄÇÊÍÐÒÔ×ÚÙÙÛÝÜÝÞßàáäåâáàáãäæçëïñóôõö÷ôòðîìêçäàÞÞÞÝÝÜÛÙ×ÕÔÓÑÑÒÐÐÐÏÎÍÌÌËÉÇÅÄÃÄÄÁ½»¹¹º»¼¹µ³²²²°®ª©©¨¤¡ žœ™—•“‘‘“”•˜œ ¢¢¤¦¨«­­­®¯°±°¯¬¬¬­­¯±´¶¹»¼¾¾¼º¸¸¸¸¹¹¸·µµ³³²±°¯¯°¯­ª§¢œ™—“ŒŠ…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡Š“˜šž¢¥§©«­­¬©§¤¡œ›Ÿ¥¬³¸½ÂÈÌÏÑÓÔÕ×ÚÙØÙÛÜÞàâãæçèæåããâãåçêîòõö÷÷÷õõóñíèäáßÞÝÜÚÚÙØÖÓÒÑÐÐÐÏÍÌÌËËËÊÊÈÆÅÄÁÀÀÀ¾¼º¹¸¹ºº¸µ³³³³±¯¬ª©©§¥£ ›˜•““‘‘“•—™ ¢¥§©«®¯®®®®°±°¯­¬¬¬­®¯±µ¸¹º»¼º¹·¶´µ¶¶¶µ´³´³³²°°±³±¯«§¡œ˜”‘ŽŒ‰„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡Œ”˜›Ÿ£¨«««­¯®­¬©¦¢›ž¥­³¸½ÃÉÍÑÓÕÔÕ×ÙÙØÙÛÝÞâäæèêêéçæåããäåèìñôö÷öõö÷õóîèäâáßÝÚØÖÕÕÓÐÎÍÍÎÍÌÉÈÇÈÈÈÇÇÅ¿¾¾½½»ºº¸·¸¹¹·¶´´´³±¯­«ª©§¦£ ž›—“’‘‘‘’”•˜›ž¡¥§©¬­­«««¬­®®¯­«¬®®®¯±³´µ¶¸ºº¹·µ´³±±²²°¯®®¯¯¯°±²°®«§£ š”ŽŒŠ†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„†Š“˜œ £¦«®¬«¬®®®¬ª¨¤žœŸ¤ª±¶»ÁÆÊÎÒÔÔÕ×ÙØÙÛÜÜÞâåçéêëéçççåääåæéîòôôóôöööõïêçåâßÜÚ×ÓÒÑÎËÉÈÈÉÈÇÆÆÅÆÅÃÁÁ¿½¼º»¼¼¼º¸¶µµ¶¶·¶µ³³³²°®«©¨§¤¡Ÿž›™•’‘‘““““•˜›Ÿ¢¥¨ª¬¬«ª©©ª««¬¬¬¬­¯®®¯°±²³´·¹¹¹¶µ´²®¬®®­¬«««¬­®¯±±¯¬ª§¢›”‘Žˆƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‡‹Ž’—œ¡¦§ª®¯®­®¯®­­«©¥ ž¡¥«±¶º¾ÂÇÌÐÒÓÔÖØ×ÙÛÜÜßâåçèêëéèèèæããåæèìðñòòóõõ÷öðìêçãßÛØÔÐÏÎËÈÆÄÄÄÂÂÃÃÄÄÁ¿½¼º¹¶¶¸¹º»¹¶´´´³´µµ´³³²°®¬¨¦¦¥¢žž›—“‘•˜—••—šž £¥§©««ª©¨§¨¨©ªª«¬®¯®®®®­­¯±´¶¶µµµ´°¬©©ª«««ªªªª«­¯¯®®®ª£›–”“‘Š…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„†‰Œ‘“—œ ¦ª«­®¯¯°°°­¬¬«¨¦¢ £¨¬±µ·º¾ÄÉÎÑÓÔÕÖÖ×ÙÛÞàãåæçéêéèèéæääæææéìîñññòóööòíëéäÞÙÕÏÌËÊÈÆÄÂÁÀ¾¾¾¿ÁÂÀ¾º·µ´²²´¶¸º¸¶´³²²±²´µµ´²¯­«§¤¤£ Ÿžœ™–‘‘”—š˜–—™œŸ¢¥¦¨ª«ª©©¨§¨©©©©ª­®®­­¬¬««­°³µ´³´´±­©¥¥¦¨ªªª©ª©ª¬­­®±²¬¥˜–”’‘Œ‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ˆŒ’•˜™œ ¥«°°°°±²³²¯¬««©¨§¤¢¥©®²µ¶¸»ÁÇÍÐÒÒÔÕÖ×ÚÞáâäåæçéëêéêêèææçæçéêíïïñòóööóïìéäÝ×ÑÌÊÈÇÆÅÄÁ¿½»»º»¾¿¾¼¸´²±°°²µ¸¹¸·¶³²±°±³µ¶µ±®¬©¥£¢¡Ÿž›™—”‘‘“”—™™™š› ¤§¨ª««««««ªªªªªª¬­«ª©©©«¬­®±²²±°°¯«§£ Ÿ¡¥§§¨©ª©ª­®­®°°«¥˜–•“‹‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„„„…ˆ‹’–™œ ¤©¯µµµ³²³´²¯¬«©§¦¦£¤§¬¯³³´·º¾ÄÉÌÎÐÓÕÖÙÝààáâåçêëìëëêêééèèèêêëìíîðòóõõñíêçãÞÖÐÍÊÈÇÆÆÄÀ½»º¸¶·¸ºº¸´±¯®¯°±³µ¶·¸·¶µµ³²²²³³°®«§¥¤¢ œš—–”““““”–™šœœž ¢¥§©«¬¬­®¯¯­¬¬­¬¬¬«©§§¦¨ª«¬¯¯¯¯®­¬¬§¢Ÿœ £¥¥§©ª©ª­¯®®°¯«¥ž™—•’Іƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‡‡†ˆ‹Ž’•™ ¢¥©¯¶ºº¸¶µµµ³°­ª¨§¦¦¦¦ª­±³³³µ·¼ÂÆÊÌÏÓÖÙÛßáááâäçêíííìëëëìêêêëììììîðòôõõòíèåáÜÕÐÍÊÈÇÇÆÄ¿»¹¸¶µ´´µµ´³°®®®¯°±²´µ¶¸¸¸¶´²±°²²°®ª¨¦¤¢ž›˜—•“‘’“”–˜š ¡¤¤¤¥§¨ª¬®°±±°¯¯¯®¬«ª©¨¨§¦¨©«®®­¬­¬«©§¢ž›› ¢£¥©«­­®¯¯¯°±±­¨¢œ˜”‘މ…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…‰Œ‹‹‘”—œ ¤§ª¯´º¾¼¹¹¸¶µ³²°­ª©©©©©¬¯±´´´µ·¼ÀÃÇËÐÔØÛÞàâãäååæèëííîîííîííìììíìëìïñóõ÷òìçâÞÚÕÐÍËÊÊÉÆÂ¾¹·µ´´³²²²²°®­­®¯¯¯¯°²µ·¹¹·µ³±°²²±¯¬©¦£¡ž›˜•“‘’•–—šœ £¦§¦¦¦§¨©¬¯°±°±±¯®­¬ª©§¦§¦¦¦¨ª¬¬«««©¨¥£ŸœššœžŸ¡¥©«­®¯®®°²³²®ª¥Ÿ™”Œ‰…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‹ŽŽŽ‘”–—šž£§«¯³¶¼Á¿¼¼»¸µµ´²¯¬ª«¬¬¬¯°²µ´µ¶¸¼ÀÃÇÌÑÕÙÜßáäåæææåæêìîïïïïïððîíííëêìïñô÷÷ñëæáÝÙÔÐÍËÊÉÇÅÁ½º·´³³³±±°¯®¬¬­­¬¬­­®°²µ¸·µ³±¯¯±³±®­ª¦¢ žœ™–“’“•——˜™œ £¥§¦¦¥¦¦§©ªª¬­®¬ª©¨§§¥¤¤¤¢¢¢¤¥§§¦§§¦¥¢ œ™——˜šœ¡¥¥¦¨ªª«®±²±®©¤ž˜“Ž‹‰†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‰Ž’–šœžŸ¢¦©¬¯²¸ÀÄÂÀ¿¾º·¶µ²¯­­­­®°²³´µ¶¸¹º½ÁÃÇÍÒÕ×ÛÞàâäååååæéìíîîððïïïïïíìêéëïòôööñìæáÛÕÐÌÊÉÇÄÃÁÀ¿½º¶³²²±°®¬ª¨§¨§¦¦§¨ª¬®°°®®¬ª«­±´±®¬©¤ Ÿžœš™˜—˜™šš™šœŸ¢¥¦¥¤¤¤¤¦¦¦¦§¨ª¨¦¥¤¤¤£¢¢¡Ÿ  ¡£¢¡¡¢£¢¡Ÿ™–•–—™ŸŸ¢¤¦§ª­±²²¯ª¤˜“ދЇ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…ˆ‹Ž‘“—œ¡££¤§©«­°´ºÃÈÆÄÃÁ½¹¸¶²¯¯®®¯±´µµ¶¶¸º»»¿ÂÅÊÎÒÔÖÛÞáãääääääçéêìîðïîîïïíëéééíðòôôôðìçâÛÔÍÇÇÇÄÁ¿¿ÀÀ¾»¶³²²±¯®«¦¤££¢¢¢£¤¦¨©©¨¨§¦¦©­²´±®«¨¤ žœœœœœœœœ›››œž¡£¥¦¥¥¥¤£¢£££¤¦¤¢¡¡¡¡   Ÿžœœœœœœžžžœœ›™–•••˜™š›ž £¥¨«¯²´¯©£ž™“ŽŒ‰‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚†‰‹‘“–šŸ¥¦¦§ª«­¯²¶½ÄÉÈÇŽº¸µ±°°°°²´¶¶¸¸¸¹»¼¾ÁÄÇËÎÑÔ×ÛßáääåäãâãäåçêîðïîïðîìéçèêíðòóòòðíèâÛÔËÆÅÄÂÀ¾¾¾¿¾»·´²±°¯¬©¤¢ ŸžžŸ¡¢¤¤¤££¤¤£¤§«°²¯¬ª¨£Ÿ›š›œžžœœž ¢¥¥¥¥¥£  ¡  ¡¡ŸžžžžŸŸŸœ›š˜—˜™˜˜™™ššš›š™—•””•–––™› £¦ª®³´¯ª¥ š”Œ‰‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ˆŒ‘”–™¢¦¨©ª«­¯²¶º¿ÅÊËÊÈÅÀ½¹¶³³´´³µ¶·¸»ºº¼¾¿ÂÄÈËÎÐÓÕØÜáãåæåäãâáâäæéíðïîïïîëçæéêìîðñññîëèâÛÓÊÅÄÃÁ¿¾¾¿¿¾»¸µ³°¯­ª¦¢Ÿš™™› ¢¡ŸžžŸ  ¢¥ª®°®¬ª§¢Ÿ›™™›ŸŸžžžžžžŸ ¡£££¤¤¢¡ žŸžžœ›œœœ›šš™˜—•–—˜˜˜————˜˜—–”’“”•••—š›œž¡¤¨¬°±­¨¤ ›–‘Ї„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‰Œ’•™œœž¡¤¥¨ª­¯±´¹¼ÀÆËÌÌÊÇÄÀ½¹¹¹¸·¶··¸»½¼¼ÀÂÄÆÉÍÐÓÔÖ×ÙÝáâãããäæåäãäçëíîííîîíëèææçéëîðïîëéåß×ÐÉÄÃÄÃÀ¾¾¿¿¼¸µ³±°­«¨¤ ›—”’’”—šœ›š™šœŸ ¢¤§«­«¨¦¥¢ž›š›œžŸ¡¡¡ ŸŸŸ     ¡¢££¢ žž›››š››™˜˜—–”””–˜˜–•””•–––•“‘’’’“”—™››œŸ£¨¬¯°¬¨¥¡œ˜“ŽŠˆ…ƒ‚‚„„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‡Š•™œŸŸ¡¢¢¤¨«¯°³¸½ÁÅÊÍÎÍÌÊÈÆÁ½¾½¼»¹¹¹»¾¿¿ÀÄÈÉÊÍÑÕ×××ÙÛÞàáááâåèçæåæéììííííììëéæææèëííîíêæáÜÕÎÈÄÄÅÄÂÀ¿¿¿¼·µ³²¯¬©¥ ›•’Ž‘”—–•–—™›ž ¢¥©¬©¦¥£ žœœœ ¢£¥¢¡ŸžŸŸœ›œž ¡¡¡¡žœœ›š›šš™™—–••””’’•—•“‘‘“”””’‘’”˜š™šœ ¥ª®°¬§¤ œ˜“ŽŠ‡…ƒ„……†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†ˆ‹‘•™ž¢¢££¤¦ª­±³·¼ÁÅÉÍÑÐÎÍÌËÈÃÀÀÀ¿¾½½½¾¿ÁÂÄÈËÍÏÑÔØÚÚÚÜÞßàáâãåçèèèééëíííìëëëêêèççæèêëëîïêåáÝÕÏÉÆÄÃÄÄÂÀÀ¿¼¹·´°­«§¢œ–’‹‰‹Ž‘’”—›Ÿ¡¤¨©¦¤£¡ŸŸžœœœŸ¢¥¦¤¢¡ Ÿ›™˜™œžŸŸ  œš™˜™™™——–”“”•”’‘’““‘ŽŒŒŽ‘’’‘ŒŒŽ“–˜™™šœ¢¨¬­«¨¤ ™”Šˆ‡‡ˆ†‡‡„ƒ‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚†‰‹Œ“–›¡¤¤¥¥§©­°³·»ÀÄÈÍÒÕÓÐÏÎÌÊÆÃÂÂÁÁÂÂÂÁÂÃÅÈÊÍÐÒÓÖÙÛÛÛÜÞßßàâãåçèèéêëìíííìêëëëêèèççéêëìïîéåáÜÕÏÉÅÂÃÅÅÃÁÀ¾½º·²®«¨¤Ÿš”Ž‹ˆ†‡‰Š‹ŠŠ‹Ž‘—œŸ¢¥¥¤£¡ ŸŸžœž¡£¤¥¥¥¥¥¢Ÿœ™˜˜˜™š›žœ™–“’’’’‘‘’“’‘’‘ŒŒŒ‰ˆˆ‹ŽŽ‹ˆ‡‡ˆ‹‘“–˜™˜šŸ£¦©¨¦¡žš–“ŒŒ‹ˆ††…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ŠŽ’•˜œ¡¤¦§¨¨©¬±´·»¿ÄÈÍÓÖØÖÔÑÎÌÊÇÅÄÅÄÅÄÃÂÁÂÄÄÆÉÎÒÓÔÖר×ÖØÚÝßàáâäåææèèéêêêëëíííìëéèçéééêëìëçãÞØÑÌÇÃÂÃÃÃÂÂÀ¾¼¹´®©¦¢žœ˜“Œ‰†„…‡‰‰ˆˆˆˆŠŽ”™›œž   ŸŸž››ŸžŸ ¢¤¦¦§©¨¤ žœš™–•–˜šœš–’ŽŽŒ‘‘‘’ŒŠŠ‰…„…‰‹‹ˆ…ƒƒ„†‰ŒŽ‘•˜™˜—œ¡¥§¥¤Ÿœ˜–“‘‰††„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†Š“–˜šŸ£§¨ª¬¬¬­±µ¹¼¿ÃÈÌÑÖÙÚÙ×ÓÐÍÊÈÇÈÉÉÉÇÅÃÂÃÄÅÇÊÏÑÓÔÕÕÖÔÓÔ×ÛßâãããäååççééêêëìíîîíëéèèééèèééèäàÚÓÍÉÄÁÁÂÂÃÃÃÀ¿¼¸³¬§£ž›š—“ŽŠ†…ƒ„†‡‡………†ˆ“——˜›œœœœ›š›Ÿ ¡¡¡£¦§§©««¨¤¡Ÿœš—“”–˜™–‘Œ‹ŠŠŠŠŠŒŽ’Œˆ†……ƒ‚„†‡‡…ƒ‚‚‚„†‰’•–—––› ¤¦¥£ ›™•“‘‘Œ‰†…„ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‡Œ‘—›Ÿ¢¥¨«­¯°°¯±µ¹½ÁÄÇËÏÔØÛÞÜÚÖÔÐÎÍËËÌÎÎÊÆÄÂÂÃÅÇÉÌÎÑÑÒÒÑÐÏÑÕÚßãååäãåæçèéëìììììíîìêéèççæååååãÞÚÖÑÌÈÄÂÂÃÃÄÄÃÂÀ¼·²¬¦¡œ™–”Œˆ„ƒƒ„……„ƒ‚ƒ…‡‹Ž’”–˜™™š››š™™œŸ¡£¥¥§¨ª«¬¬­ª¦¤¢Ÿ›–’“•––“Œ‹Š‰ˆˆ‰Š‹‘’ŽŠ†ƒƒƒ‚‚ƒƒƒƒ‚‚‚‚‚ƒ„†Š’””••–šž¡¤£¢ œ›˜–”’’’Œˆ†……„ƒƒ„„ƒƒ‚‚ƒ‚‚‚‚„…‡‰Œ‘–› ¥¨«¬­°²²²³µ¹½ÂÅÇÊÍÑÖÚßâàÝÛØÕÓÑÐÏÏÒÒÎÉÅÃÄÅÇÉÉÉÍÐÐÏÎÎÎÏÑÕÚÝâååãäæçèéëííîîîíîîìëêèèæåããâáßÚÕÒÐÍÊÆÃÃÃÃÃÃÃÃÁ¼¶±«¤Ÿ™•“‘‰†ƒ‚‚ƒƒƒƒƒƒƒ…‡ˆŠ‘•—–•—˜˜˜™œ ¢¥§¨¨«®®®®­©¦¥£Ÿ›–’‘‘‹‹ŒŒ‹Š‰ŠŠŠŠ‹Ž‘’‰„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†ŠŽ‘‘’’“—›žŸŸžœš™™™™–““’ŒŠˆ†„ƒ„………„ƒƒ„„„„†‰Œ”™œ ¤©¬®®¯±³´¶·º¾ÂÆÉËÍÏÓÙßãæåäâßÜÙ×ÕÔÓÔÓÐËÇÇÈÉÊÊÉÉÍÏÏÎÍÌÍÎÐÓÖÚàäãâäææçéëìííïïðïíìëëëêéåãâáßÞÚÖÓÒÏËÇÅÃÂÀ¿¿¿À¿º´®§¢—’Ї„‚‚‚‚‚‚‚ƒ„‚‚…‡‡ˆ‰Œ‘’“•˜œŸ¢£¤§©­±°¯®­ª¨¦£Ÿš•ŽŒ‹Š‰‹‹‹ŠŠŠ‹‹‹‹ŽŽ‰„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‰ŒŽ‘•˜™ššš™˜—˜™š˜–•”‘ŽŒ‰†……††‡‡†…†‡ˆˆŠŒ‘”—šž¡¥©¬¯²±°²´µ·¹¾ÃÇËÏÐÑÓÖÝãçëìëèäâàÜÚÙ×ÖÕÑÍËÊËËÌÍËÊÌÌÍÍÍÌÌÎÐÑÔÙÞáâäæèççèêììîðññðîííííìêæãàßÞÜÚ×ÕÔÑÍÊÈÄÁ¾½½¼½¼¸³«¤Ÿš”Œ‰†„‚‚‚‚‚‚‚‚ƒƒ‚ƒ„„ƒ„…‡‰Š‹ŒŽ’–šŸ¡¢£¦ª¯³±¯®¬©§¥£ž˜“Œ‰‡‡†‡ˆ‰ˆ‡‡ˆ‰‹ŒŽ‘މ…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ˆ‰‹’”–—––––•—™šš™˜–“Ž‹‰ˆ‡†‡‰ŠŠŠ‹Œ’“•˜›ž¢¦«­¯²´³²²³µ¸»ÁÆÉÍÑÓÖØÛáçíòòñîëèåàÝÛÚØÕÒÐÎÎÍÍÎÎÍÌËÊËÍÍÍÍÍÎÐÔØÜàãæèêèçèéìíïññððððððïïìèãàßÝÛÙ×ÕÔÑÏÌÉÅ¿¼»»»º´®§¢œ–Œ‰†„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„„…‡‰Œ‘—›ž ¢£¤¦«°µ²°­«¨¥¤¢˜”Ї†„…†‡ˆˆ‡‡‡‰ŒŽ‘‘‰…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„‡ŠŒŽ‘“””“““”•—š›š™—“ŽŒ‹Š‰‡ˆ‹ŒŽŽŽ“–——™›Ÿ¢¥ª®°±´µ³²²³¶¹¾ÄÇÊÎÒÖÙÛßåëñõõôòïìçäáàÞÛ×ÖÓÒÑÏÏÐÐÐÏÍÌÎÏÏÏÎÍÏÒÕØÜàäæèééééêìïñóòññðïïïïîëèãßÝÛÙØÖÔÒÑÏÌÉÆÂ¾ºº¹¹¶°ª¦¡›”Ž‹‰…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‡‹‘— ¢£¤¥§¬±¶´±­«©¦£ ›˜”Іƒ„…‡‰ˆ‡†‡ŠŽŽŠ‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‰‹Ž’‘‘‘’“•—™˜––”‘ŽŒŒŒŒ‰‰ŠŒŽ’•˜™™›ž¡¤§«®±³µµ´´´µ¸¼ÀÄÆÈÌÒÕ×ÛàåêîñððîîêçåãâáÝÚ×ÕÖÖÓÒÒÓÓÓÒÓÓÒÐÏÏÐÓÖÙÛÞáâäæèéêêëíðññðïîìëêèçæåâßÜÚ×ÔÓÒÐÎÎÍËÉÅÁ¼¸¶´´±«§¤ ›•’‘‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…‰’˜ ¡¢£¥¨­³·µ°­ª©¦£Ÿœ™–“‹†ƒ‚„‡ˆˆ‡‡‡‹ŽŽŽ‹‰†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ˆŠ‹ŒŽ‘‘’‘‘“—˜•”’‘ŽŽŽŽŽŒ‹‹‘’•˜š›œž¡¤§ª­°±³µµ¶··¸»¾ÂÄÅÈÌÏÒÖÛáæéìîìëëëéççåäâßÛÙÙÚÚ×ÖÖÖÖÖØÙØÕÒÐÒÓ×ÛÝßáâãäçêëëìíïòòñïîëêçåáßàßßÝÙÕÒÏÏÏÍËÌËÊÊÅÁ»·´±¯­¨¥¢žš——•Іƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡‹•šž ¡£¤¦©¯µ·³¯¬ª©§¤ œ˜–“Іƒƒ„†‡††‡‰ŒŽŽŒ‹‰ˆ…ƒ‚‚‚‚ƒ„ƒ„„„ƒƒ‚‚‚‚‚‚ƒ†ˆ‰‹‘’’“’’‘’•–•“‘‘‘ŽŽ‘Ž‘“–˜ššš›ž¢¥©­°³³³´µ·¸º¾ÁÃÄÅÇÉËÎÑÕÛáãåçéèççèççèèæäáÞÝÜÞßÝÜÚÙÙÚÜÝÚ×ÔÓÓÕÙÝßáâäååéìììíîðòòñîìéæãàÜÛÛÜÜÚÕÐÍËÊÊÉÊÊÉÉÈÿ»¶±®¬ª§¥¢žœœ›™“Œ†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‹‘–œ £¥§¨©¬±¶¸´¯­«©¦£Ÿš–”‘‰†„„„„……†ˆŠŒŽŒ‹‹Š‡…ƒ‚‚ƒ…‡‡‡‡‡†…ƒ‚‚‚‚‚ƒ…†‡‹’’“””’’“”–•’ŽŽŽŽ“–™™š™™›ž£¨«¯²´´´´µ¸»¿ÃÄÅÅÆÈÉÉÌÑÖÜàáãåææåæççèêìéçäãâáááááÞÜÝÞàáÞÛØÖÖÙÝáââãææçëîíìíîïññðíêæâßÛØÖרÙÖÑÌÉÇÅÅÇÈÈÈÈÅÁ¾ºµ°­«¨§¦¢Ÿ žš”†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‹’˜¡¥§©ªª®³¶¹¶±­ª¦£ œ˜“‹ˆ…ƒ‚‚‚ƒ……„…†‡Š‘‘މ…ƒƒ…†ˆ‰ˆ‰Š‹‹‰†„ƒ‚‚‚‚ƒ…ˆŒ‘’”–•”••––•’ŒŒŒŽŽŒŒ’•—™™™™›œ¢§«®°²´µµ·¹¼¿ÂÂÂÄÆÈÉÉËÐÖÚÞáååææççèèèëíëèççäãááâãáßßâäåâàÝÜÝßáäããåççéíïíëêëíîîíêçâÝÙÖÕÔÓÒÒÐÍÉÆÄÂÂÄÅÃÃÂÀ¾¼¸´±­ª§§¥¡ Ÿ žš•ˆ„ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡Œ“—œŸ¢¦¨©ª°µ¹¼¹³­¨£Ÿœ™–‘Œˆ…ƒ‚‚‚‚ƒ„ƒ‚‚ƒ…ˆ‹‘’’’’’’‘Œˆ…„†‰Š‰ŠŒŽŒ‰‡…ƒ‚‚‚ƒ…‰Œ“•—––———–”’ŒŒ‹ŠŠŒ‹Š‰‰Š‘“•—˜˜™šœœž¢¦ª¬¯²µ·¹»¾ÀÁÂÂÂÅÆÈÉÊÌÑÖÚÞâååæçèçççéíïìêëéçåããääãâãåæçåãâáâãäæååæèéëíïíëêêëììêèæàÚÖÓÒÐÍËËÊÈÅÃÁÀ¿ÀÁ¿¿¾¼»¸µ²¯­©¦¦¥£¡¡¡Ÿ˜’Œ‡‡…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†Œ’–šœ ¤§©«°µº½¸²«¥ œ˜•’‹‡„‚‚‚‚‚ƒ„ƒ‚‚ƒ„…‰ŒŽ‘““””“Œˆ†‡ˆŠŒŽ’”‘Ž‹ˆ…ƒ‚ƒ„†‡Š’–˜™™š˜–•”’‹‹Šˆ‡‡†‡ˆ‰Š‘“•——˜šœž ¢¤¦ª®²µº¼¿ÀÁÃÄÃÃÃÄÆÉÊÌÐÓÙßáãäççèèèéìïïíííìêçææåååæçèéêèçççççèèççæçèéëíìëëëëííëèäÞØÓÏÍËÈÆÅÃÁ¿¾½»»¼½½½»º¸¶³°­¬¨§§§¥£¢¢¢¡œ˜’Œ‰†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‰“˜œ ¤§©¬°¶»½·°ª¥Ÿ™•‘‰†ƒ‚‚‚‚‚ƒƒƒ‚‚‚‚ƒ‡‹‘”•”””‘ŽŠ‡‡‰‹Ž’–—•‘Ž‹ˆ††‡ˆˆ‰ŒŽ’–šœœœœ˜”“’‘‹Š‰‡†„„†‰ŠŒŽ’“”––˜šœžŸ ¡¤¨­²¶º½ÀÁÃÅÄÃÂÂÄÆÈÊÌÐÔÚÞàâåèèèèéëíïðïïðïìêèæææèéêëííííììëëêêéèççèêëëëìëêêëëéåàÚÖÒÎËÈÆÄÀ¾¼¹¹¹¸·¸ººº¹¹¶´±¯­«ª©¨§¦£¢¡¢¢Ÿ›•Іƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡‘–œ¡¥§©¬±µº»´®¨£ž™”Œˆ†…ƒ‚‚‚‚‚‚‚‚‚‚‚‚„‡Š‹Œ’’’“‘Ї†‡‰Œ’•—–”‘‹‹‹ŒŽ‘•™œœœ—“‘ŽŠˆ†„„ƒ‚ƒ†‰ŠŒ‘”••–—™š›œŸ¢¤§¬°³¸»¾ÀÂÂÃÄÅÅÆÇÈÈÊÎÔÚÞàãæééèèéêíîððððïíêæãäåæçéëíîïðïîîîììëéèèêìëêééééèçæäßÚÕÒÎËÇÅÃÁ¿¼¸···µ´µµ¶···µ²¯®¬«ª¨¦¥¤¡ ¡¢¡ž™“ˆ…ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‰•›¡¤¦¨«¯´¹¹²«¦£Ÿš•Ї……„‚‚‚‚‚‚‚‚‚‚‚ƒ„‡‰Š‹‰††…‡Š’“•˜˜–”’‘‘’‘‘’’•—œŸŸ›–’Œ‹‹Š‰†ƒ‚‚‚ƒ‡‰Š‹Ž‘”•–—™›››š £¤¦«¯²µ¸»¾ÀÁÄÆÇÇÇÈÈÇÈÎÕÚÞàãçëëêéèêìïòòòñïíêåâãääçéìïñóõôòñðîíìëééëìëêéêéçåâáÞÙÔÐÌÉÆÄÂÀ¿½»¸¶µµ³²±°²´µ´²°­­««©§§¦¢Ÿ ¢¢ ˜‘Œˆ†…„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡“š¡£¥¦©®³¶¶°ª¥¢˜“‹ˆ†„‚‚‚‚‚‚‚‚‚‚‚ƒƒƒ„…‡‰‹Œ‹ŒŒŠ…ƒƒƒ„‡‹‘’•˜—˜˜˜˜˜™™—–••–™ž   ž›—“‹‹‹‹‹ˆ„‚‚‚„‡‰‰‹Ž’“•˜š››š›Ÿ¢¤§ª®±²µ¹½ÀÂÅÆÇÈÈÉÊÈÉÍÓØÞáäèìëêèèêîòôòñïíêèäááâäçêïòô÷øöôòñïíììëëììííììéæâÞÛØÔÐÌÈÄÂÁÀ¿½»¹·¶µµ³²¯®¯°°¯­¬««ªª§¦¦¥¡Ÿ¡¡¡ ˜’ŽŠˆ‡…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…Š˜ž ¢¤¨­±´´¯©¥¡œ—‘‹Š‡ƒ‚‚‚‚‚‚‚‚‚‚ƒ„ƒƒƒƒ…ˆ‰‰‰‰ˆ‡„‚‚‚ƒ†‹’•˜˜™šžŸŸŸœš˜™›ž ¡¡Ÿœ˜“‹ŠŠŒŠ†ƒ‚ƒ†ˆ‰ŠŒ‘’”—˜™š™š›Ÿ¡¤§«¯¯°´¸»¿ÂÄÅÇÇÇÈÈÇÈÍÒØÞáãçêëêééìðôöóðîëéæãàáãäçìñô÷ø÷÷öóðîîîîîîíîîîìéçåàÚÖÓÏËÉÄÁÀ¿¾¾¼º···¶´³±¯¬¬¬««©¨¨¨©©¨§¥¤¡ ŸŸ Ÿœ˜“ŽŒ‹‰†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒˆŽ–œ £§«®²²¬§£Ÿœ—‘‹‰†ƒ‚‚‚‚‚‚‚‚‚‚‚ƒƒƒ‚‚„†„„……„…„ƒ‚‚„‰‘“–š™™œžŸ¡¡¡ Ÿœš›œž   žœ—’ŒŠŠŒŽŒˆ„‚ƒ†ˆ‰‹Ž‘”—˜—–—˜™š ¤§«¯±°±³¶¹»½ÀÂÃÂÃÅÆÆÈÍÓØÝàãåèêëêëïóôõòðïîëçäâãããæëîòõõôôõòððððïîííîíìèåäãÝ×ÔÐËÇÄÂÁ¿»ººº¸···¶´³±­ªª«ª¨§§§§§¨§¥¢ žœœœ˜•’Ž‹ˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚†‹‘–›ž¡¤¦¨«°±¬§£Ÿ›–Œ‹‰‡„‚‚‚‚‚‚‚‚‚‚ƒ„„„‚‚ƒƒ‚‚‚‚‚‚ƒƒ‚ƒ‡‹‘’“˜›››Ÿ¡£¤¥£¢žžŸ    Ÿ˜“ŒŒŽŽŒˆ…‚ƒ…‡Š‘”—™™–••—™šœ ¤¨¬°³²±³¶¸¹»¾¿¿¾¿ÂÄÅÈÎÔØÛßãåéëììîñóôôòññðìçåååååçëíñôóòóóòòóôòðïíííìéæââßÚÕÑÌÈÄÁÀ¾»·µ·¹··¶¶µ´³°«©©ª¨§¦§§§§¨¥£ ž›››š™™—•’Ž‹ˆ†„„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒˆŽ’—›Ÿ¢¤¥¦©®®ª¦ ›—“‹ˆ…ƒ‚‚‚‚‚‚‚‚‚ƒ„„ƒ‚‚‚‚‚‚‚‚‚‚‚ƒƒ†‰Ž’’”˜››œž¡£¥¨¨¥¢ŸŸ¡¢¡¢¡ Ÿ™•ŒŽŽ‹ˆ…„„†‰ŒŽ‘”——˜—––——™›ž¡¥¨¬±´²²³¶¸º½½¼¼¼½ÀÂÅÉÎÓÖÚÞáåêíïðòóôôôóóòòíèçæçèèéëîñóòñññòõ÷÷óïìëêéèçäáàÝØÓÎÉÅÂÀ½º¶³³´´¶·¶µ´´³¯«©¨§§¦¥¥§¨¨¨¥£ š™˜———•“‘ŽŒ‹‰ˆˆ‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚„Š”˜œŸ¢£¤¦¨«©¦¡™•‘‹‰†ƒ‚‚‚‚‚‚‚‚‚ƒ„ƒ‚‚‚‚‚‚‚‚‚‚‚‚„…ˆŠŽ’“”˜ššœž¡¤¦¨©¦¢¡¡£££¢¡ Ÿ™•ŒŽŠ†…††‡Š’–˜—––—˜˜˜š ¤¦©¬°²²³µ¸¹º¼½¼»¼¾ÀÃÇËÏÓ×ÛÞáåëîïóõôóôõôóòñíéççééêêíðòóòññòôøúøóîìëéèçåâßÝÚÕÑÌÆÃÁ¾»·²°°°±³µ³³´´±®«©§¦¦¤£¥§§§¦¤¡žœ™˜—–•”“’ދЉˆ‰ˆ†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚…‹•˜šŸ¢£¤¥¥¢ž›—’ŽŒŠˆ†…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡‰‹‘‘’”•–—™œ £¤¥£¢  ¡¡ Ÿžœ™–’Œˆ‰‹ŠŠˆ‡‡‡††‰‹Ž‘•—–•••––˜œŸ¢¤¦¨ª­°°²µ¸··º½½½¿ÁÄÈÊÎÑÕØÜßâæëìîðòòôõõóððïìèççèéëîñóôõôõõõ÷ùøöóðîîëéæäàÛ×ÔÐÍÉÅÁ¾»¸³®­¬«¬­®¯²³³±®«¨¦¥¢ ¡¤¤¤£¢ žœš™™˜–“‘‘ŽŒ‹‰†………„„‚‚‚‚‚‚‚‚‚‚‚‚‚‚…‰Ž“–™™›œž ¡¡ž™–’Ž‹‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‡‰Š‹‹‘‘’”–™œžŸ ¡ žŸŸžœ›™—”І†‡ˆ‡ˆˆˆ‰ˆ‡‰Š‹Ž“•–•”““”˜œŸ¡¤¥§«­¯¯±µ···º¼¾ÁÃÅÊÍÏÒÔÖÙÜßäéììíïñòôõõñïîíêèçæçêîñóö÷÷øøøøúú÷õóððïíéçåàÚÓÏËÉÆÃÀ¼¸´°¬ª©¨©©©¬¯±³±¯ª§¥£ ž ¢¢¡ žœ››š™˜—•’ŽŒŠˆ…ƒ‚‚ƒ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚…‰‘”––—˜šœœ™•‘ŽŒŠ‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡ˆ‰‹‰ˆŠ‹‹ŽŽ’“•—š›œœœœœ›ššš™—•’ŽŠ‡……††‡‰Š‹Œ‰‡‡ˆˆ‹’““’‘‘“—œ ¢¥¨«¬­®¯³µ¶·¹¼ÀÅÈÌÎÐÒÔÕ×ÚÝâèíïïðïîïñóõñíìëéèçåéíñõ÷ùúüüüûûüüøõòððïëéèåߨÐÊÇÅÂÀ½¹´°­ª§¦¥¥¥¦ª®±²±­§¤£¡Ÿžžžœœ›šš™˜—”’‘ŒŠˆ…‚‚‚‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„ˆŒ‘““““•••––’Ž‹‰†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„†‡†ˆŠ‰ˆˆˆ‰ŠŒŽ‘’’“•–—˜˜™™——™›š—“‹‡…………†‡‰ŒŽŒˆˆ‡ˆŠ‘”˜œŸ¡¤§ª«­­®±´µ¸º½ÂÈÌÏÑÒÔÖרÛßåêðóòñîììîóôñîìêééçæëïòöøúûýþýýýüûùöòññîêèçåÞÖÎÈÅÂÀ¾ºµ±­ª¦¤£££££§¬°²°«¦£¡Ÿœ››œ››ššš™—•’’‘‘‘‹‡„‚‚‚‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‰‹ŒŽ‘‘’““ŒŠˆ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒƒ†ˆˆˆ‡‡‡ˆ‹Ž‘’’“““•—–—š›˜”Œ‰†„…‡‡‡‰‹ŽŒŠ‰ˆ‰ŠŒŽŽ‘”—›Ÿ¢¥§ªª«­¯²¶º¿ÄÈÌÎÑÒÓÖØÚÜàåêðôóòðîíïòóñïìëêêççëîñóöùúûûûûûúúù÷óðîêèæåâÛÔÌǾ»¸³¯¬©¥¢¡¡ŸžžŸ£©­¯¬¨¦¥¢   žœœš˜•“““’‘‘Ї…‚‚‚‚‚ƒ‚‚‚‚‚‚ƒ„„ƒƒ‚‚ƒ‡‹ŒŒŒŒŽ‘’“”‘Šˆ†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡ˆ‡‡‡†‡ŠŽŽŽ’•–—šœš•‘Ž‹‡…†ˆˆˆŠŽ‹‰‰ˆˆŠ‹ŽŽ“–™››œ £¤¥¥§ª¬°µºÀÅÈÊÍÐÒÕØÚÜÞâçìñôôóóñððòóñðîìëêééìîðòõùúûûüûûúøùøôïëçæäãߨÒËž¹·²­ª¨¥¡ŸŸŸžœž¢¦ª¬ª§¦¥¤££¢ žžžŸŸž›˜•“””““’Œˆ†„‚‚‚‚‚ƒ‚‚‚‚ƒ„†ˆ†…„„ƒƒˆŽŒŠ‰Š‹’’‹‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„††…………†ˆ‹‹‹ŠŠˆˆ‰‹ŒŽ“–˜›œ™•’Œˆ†‡Š‹Œ‘’’‹‰ˆ†‡ˆ‰‹ŒŒ‘”–˜™™›žŸ¡¡£§«¯´ºÁÅÆÉÍÑÕØÛÞáâåéîòõõöõõóððñññññðïííîîîðô÷úüýýúù÷õööñìèååãáßÙÒÊü¸´¯©¥£¡ ŸžžžžœŸ¡¥©©¨§§¦¥¤£ žžŸžžœ™–••••–”‘Œ‡„‚‚‚‚‚„†…„ƒƒƒ„‡Š‰ˆ†…„†Š‹ˆ‡‡ˆ‹ŽŽ‰†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…†…ƒ„……†ˆŠŠˆˆ‰†…†‡ŠŒ‘•™œž›˜•“‹ˆ†ˆŠŒ’”••‘ŒŠ‰ˆˆˆˆŠ‹Ž“•––˜™ššœžŸ¢¥¨­³»ÁÃÆÊÎÓØÛßâäæéëïôö÷øø÷ôñðñòóõõóòðîîíîðóöúüýüúøöõõõðëçäãââàÙÑÈÀ»¶²­¨¤¡Ÿžžœœ›œž¡¥¦§¨§¦¥¤£¢ Ÿžœ›œš˜–•””–˜•Š…ƒ‚‚‚‚ƒ…‡‡…„„„…‡‰‰‰‡‡‡‰Œ‹‰‡††‰‹‹‹Œ‹ˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†……„ƒ„‡ŠŒ‹ŠŠ‰‡†„…‰ŒŽ‘•˜šš–”’Œˆ…ƒ„‡Š“””‘ŽŒŒ‹‰‰‹‘‘“”––—˜šŸ £¤§®µ¼ÁÄÈÌÏÓ×ÚÞáäçêíñõøøø÷õòñðñòôõõòðîííîîïòöøúúùøøöõ÷÷ñëæãâââàØÐÇ¿º¶±­«¨¤ žœšš››š›žžž ¢££¢¡¡¢ Ÿžœ™˜š›™–”“’“••‘ŽŠ†…„„„„„……ƒ‚‚ƒƒ„……†……†‡‰‹ŒŠ‰ˆ†„…‡‰ŠŠŠ‰†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ………„ƒ…ˆŒŽŒ‹‰‡…ƒ…ˆŒŽ‘”–˜—”‰…ƒ‚ƒ†Š’“”’ŽŒ‹Œ“”’‘’“”–˜™œŸ¢£¤§¯·½ÂÅÉÍÐÓÖÚÞáåèëïó÷úúù÷óñïïñòóôôñïìëííîðòõ÷ø÷ö÷÷ö÷úúóìæââããáÙÑÇÀºµ²®­«§¤ ™™™™šœœ›™˜š›žžŸž›˜––—™˜•“’‘’““‘ŽŠˆ‡‡†††…„‚‚‚‚‚‚‚‚ƒƒƒ„†ˆ‰‰‰‡‡‡‡……†ˆ‰‰ˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒƒ‚ƒ„‡‹ŽŒŠ‰ˆ†„„†Š’”••‘‹Š‡„‚‚ƒˆŒ‘’”––”“’‘‘Ž’•–•”Ž’”•—šžŸ¡£§®¶¼ÁÄÇËÏÓÖÛßãçéëïóøüúùöóðîïñòóôôòñíìììîððóöøöõõõöùûúôíæãäææäÜÓÉÁ»·³¯­«©§£Ÿš˜˜šœœ›™•“”–˜š›œœœš™–”””–—•”“’‘’‘ŒŠˆ‡††„ƒ‚‚‚‚‚‚‚‚‚ƒƒ„„†††…„„„†‡‡ˆˆ‡††„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‹ŽŒŠˆ‰‡…„„†‰‘‘’’ŽŠˆ†…ƒ‚‚…‰‘‘’–˜˜—–•”“’•–˜–“ŒŽ‘”—›Ÿ¢¤©¯µ»¿ÂÅÊÎÑÖÛáäçèëïõúüûú÷ôñðññòôõôôòïíììîððòô÷öõôõ÷úûúôíèåæèèåÝÓʼ¸´±®¬«©¦¡›–—™›œš–‘Ž‘•˜™™™˜—•’‘‘’“””“’‘‘‘‘‹‰‡†††„‚‚‚‚‚‚‚‚‚‚ƒƒ„…ƒ‚‚‚ƒ„†‡ˆˆˆ‡†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„„‡‹ŒŠˆ‡…ƒ‚ƒ†ŠŽ‰†„ƒƒ‚‚‚ƒ‡‹‘“–˜™™—•””““”•••’ŽŽŽŽ‘”™›¡¤¦ª®´¹½ÀÃÇËÐÔÙßâäæéïõùýüû÷ôóóòòóõõôôóðïîïðññóõööööö÷øùøòíéææçæâÛÓËĽ¸³¯­­«©¦£œ––—™™–’Š‹‘””““”’ŽŽ‘’’‘‘‘’’’’‹Š‰ˆˆ‡…ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ„…‡ˆˆˆ‰‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‰Œ‹‰‡†„‚‚‚…ˆŠ‹‰ˆ‰ˆ„‚‚‚‚‚‚‚ƒ†Š’“—šœ™——˜———–•“ŽŽ‘•˜›¡¥¨«¯³¸¼¾ÁÅÉÎÒØÞàâæêïõùüýüøööõôôõööõôòñññññòóõ÷ö÷÷øøøùùøôïëèèçåâÛÓÌž¹³¯¯¯¬©§£—–•——”މ‡‡‰ŒŽŽ‹ŠŠŒŽ‘’’’““’Œ‹Š‰‰ˆ‡‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚„……†ˆˆˆ‰Šˆ†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡‰ˆˆ‡…ƒ‚‚ƒ„…†‡‡†…ƒ‚‚‚‚‚‚‚‚„‡ŠŽ”™žŸžœ›œœ›š˜—•’‘’‘Ž’•˜›ž¡¥¨¬¯±µº½ÀÃÆÊÏ×Ýßáåêïôùýþýûúø÷÷øø÷÷÷õôôõôóôõö÷øúúúøø÷÷øøôðíëéæäáÙÒÍÇÀº´±°°­«§£žš—–••І„…‡‰Š‹Œ‹‹‰ˆˆˆ‰Š‹’““•–”’ŽŒ‹Š‰‰ˆˆˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚„‡‡‡‡ˆˆ‰Š‰†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ„……†…„‚‚ƒ‚‚ƒ…‡†ƒ‚‚‚‚‚‚‚‚‚ƒ†‰‹Ž‘–œ¡¡Ÿžžž›™–”’’“’’’‘’•™ž¢¤§ª®¯±µ¹¼¿ÂÃÈÎÖÜßáæêïôùüüýüüúùúúøö÷÷öôõöôôôõö÷ùûúù÷õõõ÷øôðíëèåâÞ×ÐËÅ¿¹´°¯®­ª¦¢Ÿ›˜–”‘‹†ƒƒ„…†‡‡‡ˆ‰ˆ‡‡†…†Š‹Œ’“•––“‘‹‹‹‹Šˆ‰ˆ†ƒ‚‚‚‚‚‚‚‚‚‚‚‚…††‡††ˆ‰Š‰…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„„„ƒƒƒƒ…‡‡ˆ…ƒ‚‚‚‚‚‚‚‚‚ƒ‡‹’•˜œ¡ ž›ššœœ›˜•“““““•”“‘’—¢¦¨ª«¬®²µ¸º½ÀÃÉÏÖÜßâåêïôøúúúúûúùøøõôóòññòòññðñóôõõóòññðñóõòîëèãàÜØÒÌÆÁº´¯­«ª©§¢Ÿš—”‘‡ƒ‚‚‚‚‚‚‚„†‰ˆˆ‡„ƒ…ˆŠŠ‹‘“’‘Œ‹ŠŠ‹‰ˆˆ‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚ƒ…„ƒ‚‚ƒ„…„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…„„„…‡‰‰ˆ†ƒ‚‚‚‚ƒ…†…„…ˆŽ‘•—˜œ Ÿš˜™›››˜•••“”•––•““™ ¦ª¬­¬­°´·¹»¾ÀÄÉÏÖÜàäçêïô÷ùùùúûúùø÷õòïììííîïïîîïïïíìëììíîñòðìéåáÜ×ÓÍÈþ¶°¬ª¨¦¤¡ž›™–“‘ŽŠ…‚‚‚‚‚‚‚‚‚…‡ˆ‡…ƒƒ„‡‰ŠŠ‹ŒŽŽŽŒŒŒ‹ŒŒŠˆ‡…„ƒ‚‚‚‚‚‚‚‚‚‚‚‚ƒ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„††……††‡ˆˆ†ƒ‚‚‚„†ŠŠ‰‡‡Š‘–™šž Ÿ›™™š›œš™˜—••–—––•–œ£©®°±¯¯²¶¹¼½¿ÂÆÊÏÕÜáæéìðóöøùùùùùúø÷óðëççééêëëëëêéçååæèêëíîîêæãáÛÕÒÏÊÅÀº²¬§¤¡Ÿ›™–”‘‰…‚‚‚‚‚‚‚‚‚‚ƒ……„ƒƒ‚„…†‡‡ˆŠŒŒŒŠ‰‰Š‹ŒŽ‹‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†††††……‡‡…ƒ‚‚ƒ†ŠŽŒŒŒ”™›Ÿ Ÿžœ™™šœœ››š˜––––———𠦬±³³²²µ¹¼¾¿ÁÃÈÌÏÕÜáçêíñóöùúúùùùùøöòíæããääåçèçæãâáààáãåçéêêåáÞÛÕÐÍÉÅÀ»¶¯¨£ž›™˜–”’Ž‹ˆ„‚‚‚‚‚‚‚‚‚‚‚ƒƒƒƒƒƒƒƒ„………†‡‰Š‰‰ˆ‡‡‡‰ŒŽ‹‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„……‡†…„…†‡…„‚‚‚†ŠŽ‘“–˜š›œžŸž›™™š››ššš™—–•””–™œ£©®²²²²´¸»¾ÁÂÂÅÈËÏÕÜáæèíðòô÷øùùùøöôòíæàÝÜÜÜÜÞàààßÞÝÝÝÞàâäååäßÛØÖÐÊÆÄ¿ºµ±ª¤ œ˜–•“ŒŠˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡†…„„………†…„ƒƒ†‰‹Œˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„…„…‡†…„„†‡…„‚‚„ˆ‹Ž’“•—™šœœžžž›˜˜—˜˜˜˜™™—•““”—›¡¦¬±²²³µ¸»½ÀÁÂÄÆÈËÐÖÛàäçìïòôö÷øùù÷óñîèâÝÙ×ÕÔÕ×ÙÙÚÚÚÚÛÚÛÜÞÞßàßÛÖÔÑÌÆÃÀºµ±¬¦¢ž›—•“ŒŠˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡†„‚‚‚‚ƒƒ‚‚‚ƒ…‡‰Šˆ†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„……„„ƒ‚‚„†…„ƒƒ†‹Ž’”—™›œœžžžžžžž›™–”““““”••”““•˜£¨®±´¶¸¹»¼¾¿ÀÃÇÈËÎÑÕÚÝáæëïóöøø÷øøóïíêæàÚÖÒÐÏÐÑÒÓÔÕÖÖÖÖÖÖÖÕÖÙÛÖÒÏËÇÃÀ¼¸³®¨¥¢ž›˜•‘Šˆ…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…ˆ†„‚‚‚‚‚‚‚‚‚ƒ…‡‰‹Š‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡…„ƒƒ‚‚„†……„…ŠŽ’”–™œŸžž   ŸŸŸŸŸ™–”“’‘‘“––•““–™Ÿ¥ª­²¶¸º»»¼¾¿¿ÄÈÊÍÏÐÔ×Úßäéíòöøø÷öôðëéæáÜ×ÒÏÌÊËËËÍÏÐÑÒÓÓÒÑÐÏÒÕÖÓÎɯĽ¹µ±«¥£¡š—”‹ˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‡…ƒ‚‚‚‚‚‚‚‚‚ƒ„‡Š‹Šˆ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‚‚‚‚ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†…„ƒƒƒ„†‡‡‡‡‰‹‘”•—šœœœžŸŸ¡¡ œ™˜˜–“’“–˜––”“•™Ÿ¤§¬±·¹º¹¹»½¼¾ÂÇÊÍÎÐÒÕØÜàäêïòõõóòñìçäàÜ×ÒÏÍËÉÈÆÅÆÇÈËÍÎÎÎÍÌÍÐÓÕÐÊÆÄ¾¸´²¯¨¢ —“’‹†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†…ƒ‚‚‚‚‚‚‚‚‚‚ƒ†‡‡‡†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚‚‚‚ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„…†…ƒ‚ƒ…ˆŠŠŠ‹ŒŽ‘“”–™››š™šž ££¡ššš—•••™š˜–””—› £§«±¸¹¸··¹º»½ÁÆÊÎÏÏÒÔØÜßâæêïòñðïìèäßÛ×ÒÎËÊÈÇÅÃÁÁÁÃÆÉËÊÊÉÊËÎÑÓÎÈÅÁ¾¹´±¯¬¦¡™“Іƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…„ƒ‚‚‚‚‚‚‚‚‚‚„††……„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚ƒ…†††…„ƒ„…†……„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ„…„ƒƒƒ„‡‹‘’’’’”•–—˜˜˜˜™›¡¥¥¤ ›˜—–—šœš——𡤍¬²¸·¶µ¶·¸»¾ÃÈÌÏÐÑÓÖÙÜÜÞãèíñïìéæãßÛ×ÒÍÊÈÅÂÁÀ¿¾¼¼¿ÂÇÊÉÉÉÉÊËÎÐËǾºµ±­«¨¥¡›•‹ˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ……ƒƒƒƒ‚‚‚‚‚‚ƒƒƒƒ„„ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚ƒ†ˆ‰ˆ‡†††ˆ‰ˆˆ‡‡…ƒ‚‚ƒƒ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„„ƒ‚ƒ…ˆ”——•”””•––—˜˜˜™œž£¦¦¥¢¡ žœšššžœš›Ÿ¢¦ª®³··µ´µ·¹¼ÀÅÊÍÏÑÒÔÖØÚÙÛàæêíëçäáÝÚÖÒÎÊÇÿ½»ººº¹¹»¿ÅÈÈÇÈÉÈÉÌÌÊÆÁ¼·²¯«¨¦¤ ™’‰…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡…„„ƒ‚‚‚‚‚‚ƒ„‚‚‚‚‚ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒƒ„†ˆ†…†‡……†‡‡†‡ˆ††‡‡‡†„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„„ƒƒ„‡ŠŽ‘“•—˜——–•””•–—™šœž¡¥§¨§¥¤££¡   ¡¡ ŸžŸ¡¤§«¯³¶¶´²³¶¹»¿ÃÇËÏÐÑÔרØÖ×ÛàãååãÞÙÖÓÎÉÆÄ¿¼º¸¶´´µ¶·¹½ÂÆÆÇÈÉÉÊËÊÇÄÀ¼¶±¬¨¥¤¡˜’Œˆ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ƒ‚‚‚‚‚‚‚‚ƒ„„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒƒƒ„„ƒ„†‡†„†‡†‡‰‹‹‹ŒŒ‹Šˆ†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„„…†ˆ‹Ž’•–—™™™˜—•“”•–˜›Ÿ¡¤§©©©¨§§§§¦¦§¦¤£¢¡ ¡£§ª­°³µµ³²²µ·º¾ÂÆËÎÏÐÔØ×ÖÔÕØÜàâàÜ×ÒÏÌÅÀ¿¼¸µ³±¯®®°²´·»ÀÄÅÇÉÉÉÉÉÈÅ¿¼¶¯ª¦£¡ž›–‘‹‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„ƒƒ‚‚ƒ„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…††……†‡ˆ‰‹Ž‰…„ƒ‚‚‚‚‚ƒ„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚…‡ŠŠŒ”—™›œœ™—–••••˜›ž ¢¤§©ª©¨¨©¨©©«««©§¤¢¡ ¡¤§«¬¯±²±°°±±³·»¿ÅÉÌÍÐÕØÖÔÓÔ×ÛÞÞÙÔÏÌÉžº·´±®«¨§§©­¯²µ¸¼ÀÃÆÆÇÆÆÇÇÄÀ½º´®ª¥¡ž›˜“ŽŠ†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„……………„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„…„„……‡‰‰ŠŒ’“““““Œ‰ˆ†…„ƒƒ„†‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚„‡ŠŽ’•˜›Ÿž›™—–––—™¡£¤¥¦¨©¨¨©ª©©¬­¬¬ª¨¥£¡ ¢¥¨¬¬®¯¯¯¯¯¯¯±´¸½ÃÇËÌÎÓÕÔÒÒÒÕØÚÚÔÎÊÇÿ¹´¯¬ª§¤¡  £¨«­°³¶»¿ÁÂÄÄÃÅŽº¸²­©¤Ÿš˜”‹‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…†‡‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„„„„„ƒƒ„…††††‰‘‘‘Љˆˆ…ƒ„…‡ˆ…ƒƒƒ‚‚‚‚‚‚‚‚‚‚„ˆ‰ŠŒŽ‘”–™œ ¢£ š———˜›ž¡¢¢¡¢¤§§¦§§§¨ªª©§¥¤£¢ŸžŸ ¤©ª¬­¯±²±°±³´µºÀÄÈÉÊÍÏÏÏÍÍÑÔÖÖÐËÆÂ½¹´¯©¥¤¢¡ žŸ ¢¤©¬°³µ·¹¼¼½½½»¸¶³®ª§£˜’‰…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒƒ„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‡‡††…„ƒ„„…†…†ŠŽŽ‘‘ŠŠ‰†„…†‡ˆ‡…†…ƒ‚‚‚‚‚‚‚‚‚„†‡ŠŒ“–˜› £¥§¥¡œšššœŸ¡¢¡ Ÿ ¢¤¤¥¦¦§§¨§¥£¡¡  œœž£¦©«­±³³²±³³²³¸½ÂÆÇÆÇÈÊËÉÉÍÐÓÓÎǽ¸³®©¤ žž›šš›¡¦ª­­®°³µµ¶¶µ´²¯ª§¥¢œ•Žˆ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…ˆ‰‰ˆ‡†……††……‡ŠŒŽ‘’’‘ŽŒ‰‡††‡ˆˆ†…††„ƒƒƒ‚‚‚‚‚‚ƒ…‡ŠŒ’–› ¢¤¨ª¨¥ žŸ¢£¢¡ŸŸŸŸ ¢¥¥§§¦¥¤¢ ž›˜˜š ¢¦ª®³´´²³²±°²µ¹¾ÂÁÁÂÃÅÆÆÇÉËÍÎÊü¶²­§£Ÿœ™—————–—–—šž£§§¨¨©ª¬¯°°¯®«§¤¢ š“‹…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ˆ‰‰ŠŠ‰ˆˆ‰‡‡‡ˆ‰‹ŒŽŽ‘’’’Œ‰‰‰Š‹Œ‹Š‰‰‰ˆ‡†…„ƒ„ƒƒƒ„†ˆ‹’–šŸ¢¥§«®«§£  ¡£¤¤¢ ŸŸžž¡£¥§§§¥£  ž›™——™œž¡¥©¯´´³²±±°°±³·»¾½½¾¿ÀÂÃÅÆÇÉÊž¶±­¨£ž›š—•“’“”””“”–šž¡¡¡¡¡¢¥ª«ª©¨¦£¡ —ˆƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‡ˆ‹ŽŒŒ‹‰‰ˆˆŠŒŒŒŒŽŽ‹‹‹Œ‘’ŽŒ‹ŠŠ‰ˆ‡††‡‡‰‹“—›ž¢¥©¬®¯¬¨¤¡ ¢¢¡ Ÿœœœ››Ÿ£¦¥¤¢¡¡¡Ÿœ›™˜šŸ¢¦ª¯³³²±¯¯®°²³µ¸º¹ººº»½¿ÀÀÁÃþ·±­©¥¡š˜”’Ž‘“”–—™›œžŸŸ¡¤¥£¡ Ÿœ›˜’Œ‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…†ˆ‘ŽŒŠ‰ŠŒŒŒ‹ŠŠŠŒŽŒŽ‘“–—–”“’‘ŽŒŠ‰‰ŠŒ“–›ž¢¥©­°±±­ª§¤¤¥£¡Ÿ›š››™™›ž£¥£¢¡   žœš™™› £§¬¯±±°®­­®°²²³´µ´´´´·¹»¼¼¾¿½·±¬¨¥¢Ÿœ™•’‘ŽŒŒŒ‹Ž‘‘“•–˜š›œœžŸ›››š˜–“ŽŠ‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…Š••”’‘ŽŽŽŽ‹‰ˆ‰‰Š‹Ž‘’“—šœž›™–”“’’‘Ž‘”˜œŸ¤¨¬¯²´³¯¬ª¨¨§¥£¡Ÿœš›š˜˜›ž¡££¢¡ žœœœš˜——›Ÿ¡£§«­°¯­««¬®°±±°¯®­¬­¯²´µµµ··µ±­¨£ ž›˜•’‘Œ‰ˆ‡‡ŠŒŒ‘“•——˜˜˜—˜˜˜—•’І„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„…„‚‚‚‚‚‚‚‚‚‚„ˆ”š›™—•“‘‘‘‘ŽŒŠŠŠŠ‹’“”–™ ¢£¢ ™—––—•”””““”–›Ÿ¢¦«°²µµ³°®¬ª¨§¥£¢žš™˜˜——šœž¡¡   ž›››˜——™œž £¦©¬®­ªªª«­¯°°®¬©§¨©«­®¯¯¯°°°­ª¤Ÿ›˜”‘ŽŒ‰†…„„†ˆˆ‰ŠŒŽ‘’“““’“““”“‘Œ‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‡†„‚‚‚‚‚‚‚‚ƒ…ˆŠ”šš˜™˜•’‘‘‘’‘ŽŽŽŽŽ’”•–––˜šŸ ŸŸ›š™™›››šš™˜—𢥍­²´µ´²°­¨¥¤¢¡ ™———–”•—™œŸŸžŸ ›š——˜™š›œŸ£§ª­«ª«««¬®¯®¬ª¨§§¦¦¦§¨©ª«¬«¨¥ œ™–“Šˆ‡…ƒ‚‚‚„„…‡‰‰‰‹Ž‹‰‰ˆ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚‚‚‚‚‚‚‚‚‚„‡‹—ššš››—”’‘‘’’“’’’’’“”––—˜˜———˜šœžžœœž ¡¡¡ Ÿœ ¤¦©¯´¶¶µ²¯«¨¥¡žœ™––—–•“”–™œžœžŸžœ˜–—˜šœšš›œ¡¦©«ªª«­¬¬­­¬©§¦¥¤¢   ¡¢£¦§§¥¢˜”‘ŽŒ‹‰…„„ƒ‚‚‚‚‚‚ƒ…‡†‡ˆŠŒŒŒŒŽŒŠ†……†…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ˆ“–™ššœœ˜–••–————˜˜˜™™˜˜——™›™˜–•–˜š›žŸ¡£¤¥¦¦¦¥¤¡¡£¥§¬°´¶·¶´¯«¨¤Ÿœ™˜—–•”“““”–˜šœœŸ ž›—•–˜šœ™™™šž¡¥¨©ª¬®¬ª©©¦¤£££¡š™™™šœž¡¢ œ™–“‹‡…ƒ‚‚‚‚‚‚‚‚‚‚‚ƒ„……„…‡‰ŒŒŠ‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‰‘”—˜š››šššš››››œžœ›š™››š™—–•—™›Ÿ£¦§©ª«ªª©©¥¤¤¥ª®²´¶··µ°«¨¥ ›˜—–•”“’’’“•˜™›œžž›—•—˜›œ™˜˜™›ž¢¦¨ª¬¬ª¨¨§¤¢¢¢Ÿœ˜•“’’“–™ž›—•“‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚‚ƒ„‡‰‹Š‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…‹’”–˜šœžžžŸŸžžžŸŸ  Ÿ   ›››œœš™™š›Ÿ¢¥§¨ª¬®­¬«©§§¨«®°²´¶¸¹¸²­«¨¢œ˜–•”“‘‘’’’”––—™œœœœš–”–™œœš™šœžŸ ¢¥§¨©©©¨§¦¤£¡œ—’Ž’–——”’Ž‹†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…†…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‹‘’’•—™œž ¡¡¤¥£¡¢£¢¡¡¢£¤££ žžžžžžŸŸŸž ¤¦©ª­°²°¯­«ª«­°²³´µ·¸ººµ°®¬¥žš—–•“’’’‘‘“”””—šš››™–•—šœ››œŸŸžŸ¢£¤¥§©¨¨§¦¤ ›”ŒŒ‹ŒŽ‘‘‹‰…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…Š’”–™›ž¢¤¦¨©§¥¥¦¥££¥¦¦¦¥£¢¡Ÿžž ¢¡¡ Ÿ¢¦ª­®°³µ´²°­­¯²´µµµµµ·»¼¸³±­§¢™—–•”‘‘’““”•˜š™˜˜˜˜™›œœžž››› £¥¦§©¨¥£ š”Œ‹ŠŠŠŠ‹‹‹ˆ†„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ŠŽ‘”–™œ ¤¥¨ª¬ª¨¨¨§¤¤¤¥¦§¨¦¥£ Ÿ ¢£¡¡Ÿž¡¦«®¯°²³³´±°±³µ·¸·¶¶¶¹¼¼¹µ²¯ª¥ž™———•‘Ž“—š˜———˜˜šœœ›™—™œ ¤¥¥§©¨¦¤ š“‹Š‰ˆ‡‡‡‡‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„„‡‹“–˜›Ÿ¡£¤§ª©¨¦¦¤¢¡¡¢£¦§¥£¡¡¡¢£¢Ÿœœž¡¥¨ª««¬®°°°²´¶¸¸···¹»»»¹·´°ª£™˜˜—•’‹‹Š‹’–š˜–•–••˜›œœœœœœššœž¢¦§§§¨¦¤¢ž˜’‰‡‡‡‡‡‡ˆ‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‡‡ˆŒŽŽ“•–˜œž¡£¦ª©¦¥¤¢¡Ÿ ¡£§§¥££¢¡¢¢¡ž›šš›Ÿ£¥¦¦§ª­®°²´¶¸¸···º»»»º¸¶²«¤žš™—–”’ŽŠ‡†‡‰‹Ž’–š™—•”“”˜›œœ›šœœ›œž ¤§§§§¦¤£ œ—“‰‡††‡‡‡ˆ‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ˆ‹ŒŒŒŽ“””—˜›Ÿ¢¦©¦£¢ ŸŸžŸ¡¤¦¦¥¥¥¤£¢¡ ™——˜™œ ¡¢¢£¥¨«®°²´¶¶¶¶·º¼¼¼¹¶µ²¬¥Ÿ›˜–”’‹†ƒƒ…ˆ‹”™™—”‘’—ššš™›œœžŸ¡£¥¥¥¥¥¤£ œ—“І„„………†‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„‡ŠŒŽŒ‘’’”•–˜£§§¤¡ŸŸ¡£¤¤¤¦¥¥¤¢¡ œ˜–•–—šžžž ¤©®°²´¶¶¶··¹»¼»¸µµ³®¨¢™–”’މ„‚ƒ„ˆ‹”˜˜–“’•—˜˜š›œœžŸ¡£¥££¤¤¤¢ ›—’Ž‹ˆ†…„„„……ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‡ŠŽ‘‘‘”—˜™¡¤¥¢Ÿœšš›œžžžžž ¢¢£¢¡Ÿ›š˜˜——™›š™š›Ÿ£§«¯²µ¸¸¸··¹¼¼»¸µ´³¯ª¤žš—•’‡ƒ‚‚ƒ†‰“–•”’‘“–˜™š››œŸ ¡¢¢¡¡¢¢¡Ÿš–’ŽŒ‹‰‰‰ˆ†„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ…ˆ‹ŒŒŒ‘‘’•˜šœŸ¢¤¡žš™˜™››šššŸ ¡ Ÿ›ššš™˜———–•˜›ž¡¤¨­±·º¹¸··¹»¼¼¸µ´²¯«¦£ž™–’Œ†ƒ‚‚‚…‰‘’’“’’‘‘“•–——˜œŸŸžŸ  ŸŸ¡Ÿœ›–“‘Ž‹‰†„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…†ˆ‹ŒŒŒŽ‘“–™›œŸŸžœ™——™›››š™™œŸ ¡Ÿžœš™š™˜•“““’‘“—œ ¤§«°¶¹¸·¸¹¸¹»»¹·µ±­ª¨¦Ÿš–‘‹†ƒ‚‚…ˆ‹ŒŽ‘‘‘‘Ž‘’’”—œŸžžžŸ Ÿžž˜•‘‘ŽŒ‰†„„„ƒ„„ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…‡‰ŒŽŽŽ‘“–™›››››˜–—™š›››™˜›ž ¡ Ÿ›››™˜”’‘‘‘•šŸ£§ª¯´¸¸¹¹¸·¸ºº¹¸µ°¬ªª§ ™•Š…‚‚ƒ…ˆŠŠ‹Ž‹ŒŽ’—œžœ››œœž   ŸŸ™•’‘‘‘‹‡…„………†………„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡‰‹‘ŒŒ‘““”–—˜™›œœš™—•–™›œœ™˜›ž¡¤¤¢ žŸž›™–“’’‘’“”—›Ÿ£§«±µ·¶µµ¶¸¹¹·µ±­«ª§¢˜‘‹†ƒ‚‚‚ƒ‡ŠŠ‹ŽŽŒŒŠ‰Š’•˜™˜˜™™š››œ›—’ŽŒ‹ˆ…ƒ‚‚‚‚‚‚‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„†ˆŠ‹ŽŽŒŒŒŽ‘“““”””–˜šœœš˜––˜›œžŸŸœ›Ÿ¢¦§¦¤££¡š˜•“’“””•—›ž¢¤¨®²´³²²³µ··µ³¯­«¨£Ÿ›”‡„ƒ‚‚‚ƒ‡ŠŠ‹ŒŠ‰‰Š‹‰ˆŠ‘’“”•——––˜˜˜™ššš™”Ž‹‰‰‰‰ˆ†…ƒ‚‚‚‚‚‚‚ƒ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‡ˆ‰ŠŒŒ‹ŒŽ‘““’“••—™›š˜˜šŸ ¢£¢  ¡£¦©©©©©§¤ ™—””•––—˜œŸ¡£¦ª®®­­®®°²´³³±®©¥Ÿš•‹‡„ƒ‚‚‚„‡ŠŠ‹‹‹ŠŠ‰ˆˆˆ‡‡‰Œ‘’“”••”•––—˜———–‘Œˆ‡‡‡†„‚‚‚‚‚‚‚‚‚‚„„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…††………‡ŠŒŽ‘’‘’”••–šœš™šœ £¤¥¥¤¤¤¥§©ª«¬««ª§¤Ÿ™–•––——™œŸ¢£¤§ª©¨©«¬­¯±²²°­¨¢š”‘Ž‹‡„ƒ‚‚‚„‡ŠŠ‹‹Œ‹‰ˆ‡‡ˆˆ‡‰‹‘“””””••–—•““‘ˆ†……„‚‚‚‚‚‚‚‚‚‚‚‚ƒ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„††„ƒƒ…ˆ‰‰ŠŠ‹Ž‘‘’““”—™š™™›Ÿ¢¤¥§¨§¦§©««ª©©©©¨¦£¢žš˜˜——–•—™œŸŸŸ¢¥¦¥¦§©¬­¯°¯®«¥Ÿ–‘ŽŠ‡„ƒƒƒ„†‰Œ‹ŠŠŒŠ‡†††‡‡‡‰ŽŽŽ‘’””Œ‹‡…„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„†„ƒ„†ˆˆˆ‡‡ŠŒŽ‘‘’’“•—˜™™› £¥¨ª©§¨ª¬­¬¬ª©©©§¤¤£ žœ›™˜–””—š›šš¡¢¢¢£§ª¬®®­¬©¢›“ދЇ„ƒƒ„‡‰Œ‹‰ŠŒ‰††‡ˆ‰‰ˆ‹ŽŒ‹‹ŠŠ‹‹Œ‘Œ‰‡…ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ……ƒƒ…†‡‡†…†‡ˆŠ’““”•••–˜š £§©ª©¨©¬­­®¯¬ª©¨¥¥¦¦¤¡ Ÿš–“”–———˜š››œŸ£¨«­¬¬ª¦ ™’ŽŒŠˆ†…„„†ˆŠŒŒ‰ˆŠ‹‰‰‰Š‹‹‹ŒŒŠŠˆ‡‡‡ˆŠ‹ŒŠ†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„†…ƒ‚‚‚ƒ„…„„…††ˆŒ‘“”””““”–™ž¢¥§¨©©©«®­­¯°¯¬©¦¥¦¨©§¥¤¢Ÿ™“‘’””•––———˜™œ¡¦ª­­ª¦¢˜’Ž‹‰‡††‡‡‡ˆŠ‹Š‰‰Š‹‹‹‹ŒŒŒŽŽŽŽ‹‹‰ˆ††…†‡‰Šˆ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„……ƒ‚‚‚‚‚ƒ†………‡ˆŠ‘“’’’“–› ¤¥¥¦¨©«­°®®°³²¯«¨§¨©©¦¤¡žš•‘“”””••–—˜› ¤©­¬¨¤žš–’Ž‹ˆ‡††‡‡††ˆ‡‡‰Š‹Œ‹Š‰‰Š‹ŒŒŒŒŒ‹ŒŒ‹Š‰ˆˆ‰ŠŠ‡„ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„ƒ‚‚‚‚ƒ†‰‡……‡ˆŠŒŽŽŽ‘‘‘’”—›¡¥¦¦¦§©«¯±¯¯²´³±®ªªªªª¦£Ÿš–‘Œ‹ŒŽ‘‘‘”–—™œŸ£¨­«¨¢›˜”‹‰ˆ‡††………„„…ˆ‹ŽŠ‰ˆ‰ŠŒŒ‹Œ‹ŒŽŽŒ‹Œ‹Š‡………„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„ƒ‚‚‚ƒ…ˆŠ‡………†ˆ‹ŽŽ‘“•˜œ¡¥¦§¦§¨ª®°°±²³³²°®­¬«©¤ ›—’ŠˆˆŠ‹“–™›ž¡¥©¬©¥Ÿš–’‹‰ˆ†„ƒ‚ƒ‚‚‚ƒ‡ŒŽŽŒŠˆŠŒŽŒ‹‹‹Œ’’“‘ŽŠ‡‡‡ˆ‰‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒƒ‚ƒ……ˆŠ‡……†‡ˆ‹ŒŽ‘’–˜›ž¢¥¦§§§¨ª­¯°±³´³²±°®¬ª¨£ž˜“Œˆ…†ˆŠŠŠ‹Ž’—™ ¢¥©¬¨¤ž™•’Œ‹‰‡„ƒƒƒ‚‚‚„ˆ‹ŽŽŠˆ‹ŽŒŠ‰‹Ž’”••”’‰‡ˆŠ‹Šˆ†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‡…„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„„…‡‡†‡‰Š‰‰‰ŠŒŽ‘“–™œ ¢£¥¦§¥¥¦¨ª«¬®±´²°¯®¬ª©§£ž—‘Œ‡„…ˆŠ‹‹Œ”—™› £§ª§¢™—”ŒŒŠ‰‡†……………ˆ‹Œ‹Šˆ†ˆŠŒ‹‰ˆ‰Œ’”•––•’ŽŠˆ‰Š‰ˆˆ†„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„…„„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‡ˆ‰‹‹Š‰ˆˆ‹Ž’—› £¤¤¥¦¦¥¥¥¦§¨©«¯±°¯®®¬ª©§¢œ–’‡„„‡ŠŒŽ’•—˜™›ž¡¦©§£Ÿ›™—“ŽŒŒ‹‰‡‡‡ˆŠŒŒ‹‰‰‡†‡ˆŠŠˆ‡‡‰’“•–—–“‹ˆ‰Šˆˆ‡‡‡†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†ˆ‰‹Œ‹‰‡‡‹’–šœ ¤¦¦¦¦¤¤¥¦¦¦¦¦§©¬¯±±°¯¬ª©¦¡œ˜”‘‡„…‡ŠŽ’•——˜šœ ¥§§¥¢Ÿ›–‘ދЉ‰‹ŽŽŒŠŠ‰‡‡‡ˆŠ‰‡‡‡ŠŽ‘”–——–“‹Š‰ˆˆ‡‡ˆ‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚‚‚‚‚ƒ„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‰‹ŒŠ‰ˆˆ‹Ž“—›ž£§§§¦¦¥¤¥¨§¥¥¥¦©­°²²±°­«¨¥ ›˜•‘Œ‡„…ˆ‹Ž’“•–———šŸ¤¨§¥¤¡žœ—’ŽŽŽŽŒ‹‹ŽŒ‹‹Šˆˆˆˆˆ‰ˆˆ‰‰‹Ž‘“–———–“‘Ž‹Šˆˆ‰ˆˆˆ‰‡…‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‚‚‚‚‚‚ƒ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡Š‹Šˆ‡‰Š‹“–šŸ£¦¦§¦§¦¥¦¦¥¥¤¤§«¯²²±±¯¬¨¦¤ž™•’ŽŠ†ƒ„ˆ‹Ž’••–••˜¢¥£¡ žœ›—“ŽŒŒŒ‹ŠŠ‹‹ŒŒŒŠ‰‰ˆˆ‰‰ˆŠ‹Š‹Ž‘”–••–•“‹ˆˆˆˆ‰‰ˆ‡†„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡ˆ‡†‡Š‘’•šŸ£¦§¦§¨§¥¦¦¦¦¦§ª®²´²¯°¯ª¥£¡œ—“ŒŠ†ƒ…‡ŠŒŽ’••”’’–›Ÿ¢¡Ÿ›š™—“ŽŒŠ‹Œ‰‡ˆ‡‰‹ŽŒ‰‰ˆ‰‰‰ŠŒŒ‹ŒŽ’”•””””’‰†‡‡ˆ‰ˆˆ†„ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„ƒ‚ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„…†‰Œ”•””–™ž¢¥¥¦¨ª§¥¥¦§©©ª¬¯±´²°®­¨£¡Ÿš•‹‰ˆ†…†‡‰Œ“•”’’”˜›žœ™—–•”“’‘ŒŠ‰ˆ††††ˆ‹Ž‰ˆ‡‡ˆ‰Š‹‹‹ŒŽ‘“••”“’Œ‡††‡ˆ‰ˆ‡……„ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ„‚‚ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…Š•˜˜˜˜™š ¤¥¦©ª¨¦¦¦§©ª¬­¯²µ²¯®«¦£ ™“މ‡‡‡†…†‰‹Œ’”“’•˜šš˜–”““”””’‘Œ‰‡‡†……„ˆŒ’‹‰†‡‰ŠŠ‹‹‹‹’””“‘‹ˆ†„„†‰Šˆ‡…„ƒƒ„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…†„ƒƒ„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…‹’—š›žž ¡¢¤¥§¨¨¨©¨§¨©«®°²´µ±®«©¥¡š—“‡„„…„ƒ…‡ˆŠŒ‘‘‘“””••”“””–––•“ŽŠ‡‡‡…„„…‰‘Ї‡ˆ‰‰‰ŠŠŠ‹ŽŽ‹ˆ‡†„‚‚„‡Š‰‡„ƒƒ…„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‡…ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†Ž”˜Ÿ¢£¤¤¤¥¥§¨¨©ª«©¨©«®²´µ··²­ª§£ œ˜–’‹†„„ƒ‚ƒ„…†ˆ‰ŒŽŽŽ‘‘‘’’’’“•–—–”‘Ž‹‰‡‡‡…„„†‰ŒŽ‘Œ‰‰ˆ‰‰ŠŠ‰ˆŠ‹ŽŒ‰†„„„ƒ‚‚ƒ†‰Šˆ†………ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…„…‡ˆ†„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‰•› £¦§¨¨©¨§¨ª«««ª©©«®±µ¶¸º¹´¯©¥¡žš—”‹‡††ƒƒ‚‚‚ƒ„†ˆ‹‹‹ŒŽŽŒŽ‘‘“““”•’ŽŒ‹‰ˆ‡†…„…‡‰ŠŽŽŒŒ‹Š‰ŠŠŠ‰‰‹ŽŒ‰…‚‚‚‚‚‚ƒ†‰Š‰ˆ‡…ƒ‚‚‚‚‚‚‚‚‚‚ƒƒƒ‚‚ƒ…††‰‹‹‰†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡Š‘—¢¥¨©ªª«ª©ª¬¬«ªª©©¬¯³¶¸º»ºµ¯©¤ œ™—”Œ‰ˆ‡…„ƒ‚‚‚‚ƒ‡ˆ‰Š‹Œ‹ŠŠ‹Ž’”ŒŒŠ‰ˆ‡ˆˆ‡‡‰‰‰ŒŽŒŠ‰‰ŠŠŠ‹ŒŽŽ‹‡„‚‚‚‚‚‚„†‡ˆ‡‡†„‚‚‚‚‚‚‚‚‚‚ƒ„„ƒƒƒ„…‡‰‹‹‰†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†ˆˆŠ–œ¡£¤¥¦¦¦¦§¨©ª«ª©¦¦©­±´¸»½½¸³¬§ ›š™•‘ŽŒŠ‰ˆ‡…ƒ‚‚‚…††ˆ‰ŠŠŠ‹ŠŠŒŒŒ’ŽŒ‹Š‰ˆ‰ŠŠ‰‰‰‰Š‹Œ‹ŠŠŠŠˆ†‡ˆˆˆ‡‡‰Š†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚‚‚‚ƒ…ˆˆ‰Š‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡ˆ‰ˆ‰Ž•›Ÿ ¡¢£££¤¥¦¨ªª©¨¥¤§¬°³¸º½¾¹´®¨¡žœ›—“‘‹‹‹ˆ„ƒ‚„………†ˆ‡‰Š‹Š‰‰‰‰Š‹‹Ž‘ŽŒ‹‹ˆˆŠŒŒ‹Š‰‰‰ŠŠŠ‰‡‡‡†„„†‡†„ƒƒ…†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ˆˆ‰ŒŠˆ‡„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„‡‰‹‹Œ‘–›Ÿ Ÿ ¢£¤¥¥¦§¨©§¤¡¡¤ª­²µ¸»½¹µ°©£Ÿœ—””“ŽŽŽŠ‡……ƒƒƒ„†ˆ‰‰ˆ‰‡†………†‡‰Ž‘ŒŠˆ†‡ŠŒ‹Šˆ‡ˆ‰ˆˆ‡†……ƒ‚‚‚„…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡†‡‹Ž‹ŠŠ‡…„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ŠŒŽ”–šžžžŸ ¢¤¤¦§§¨¨¤ žŸ£¨¬°³¶¹»¹¶°ª¤ ž›˜———•“‘ŒŠˆ†ƒƒ„„†‡ˆˆˆ‰ˆ†„„ƒ„…ˆ‹ŽŒŠ‡‡†ˆŠŒ‹Š‰‰‰ˆ‡††…„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ………‡ŠŒŠˆ‰Š‰‡†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‰Ž‘“”•˜ššš› ¢¤¦¦§¨¨¤ ŸŸ¢¦©«¯³¶¹·´¯ª¥¡›™™šš˜”’‹ˆ‡……„ƒƒƒ„„…‡‡†…†„„…†ˆ‰‡…„……†‰‹ŒŒ‹‹‰‡†‡††„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„„„†‰†……†††…„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ…†‰Œ‘’”––•“”–––™šž¢¥¦¥¦§§£ŸŸŸ ¡¤§«°´¶µ³¯«§¢žœ››œœ™–”‘Ž‹‰ˆ‡‡„‚‚‚‚‚ƒ„…†††„ƒ„…†…ƒ‚‚‚ƒ„ˆ‹ŒŒŒŒ‰†…‡‡‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†„ƒ‚ƒ„„„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‰ŠŒŽ’—˜™˜—”’“””•—™¡¤¦¦¦¦¤ žžŸ £¨­±³²±¯­©¦¢Ÿžœš™—”‘‹‡„‚‚‚‚‚‚‚ƒ†‰ˆ…‚‚‚„„ƒ‚‚‚‚‚ƒ…ˆ‰‰ŠŒŠ‡‡‡‡‡†…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚†‹Ž‘”—š›š˜•””””•—™¡¤§¦¦¤ žœœœ›ž¡¥©­¯¯°¯®ª§£¡ žœ›™—”‘Ž‹†ƒ‚‚‚‚‚‚‚‚†Šˆ„‚‚ƒƒ‚‚‚‚‚‚‚‚ƒ……†‰‹‰ˆ†††††…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡Œ“˜œŸžœ›š˜™™˜˜˜™› £¥¥£Ÿœšš›™™šœ¡¦¨ª¬­«©¦£¡¡Ÿœš˜•’‹Šˆ„‚‚‚‚‚‚‚‚‚†Š‡ƒ‚‚‚ƒƒ‚‚‚‚‚‚‚‚‚‚ƒ………ƒƒƒƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…„„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ˆŒ–›ž¡ žœœžŸžœœœŸ¡£¢ œ›™˜™˜˜—˜™ž£¦¨©©¨¥£¡¡ ›™–“ŽŒ‰†……‚‚‚‚‚‚‚‚‚ƒ‡‰†ƒ‚‚‚ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ††…ƒ‚‚ƒƒ„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ˆ‹•›Ÿ¤£¡   ¢£¤¢ žž   žœš™—•••–———šŸ£¦¥¥¤¢¡  žš—”’ŽŒŠˆ†„„„‚‚‚‚‚‚‚‚ƒ…††„ƒ‚‚ƒ„„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡†…ƒƒ…‡ˆˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…ˆŠ”𡦥¤¤£¤¦¨©¨¥¢Ÿ ¡ ž›˜™˜–“““”•––˜œ¡¤£¡  Ÿ žœ—“‘Œ‹‰†…ƒ„ƒ‚‚‚‚‚‚‚‚ƒ„……„„ƒ‚ƒ„„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ˆ‡†……‡Š‹Œ‰†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‰”›¢¦¦¦¤¤§ª«¬ª¨¤¡¡¢ žš˜˜˜”‘‘‘’•™ž¡Ÿœœœœœš˜•“’މ‡††…„ƒ‚‚‚‚‚‚‚‚ƒ„†„„ƒ‚‚ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…ˆ†…„„†ˆ‹‹‰…‚‚ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†Š‘–œ£¨¨¦¥¦¨«­¯®«¦¢¢¢¡Ÿ›˜–”’ŽŽŽ’•šœššš™˜––•”’‘ŽŠ‡‡††…ƒ‚‚‚‚‚‚‚‚‚„†…„„ƒ‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…ˆ†„ƒ„†‰ŒŽŠ…ƒ„……„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡“˜ž£¨§¦¥¦¨ª®°¯¬¨§¥¢¡Ÿ›˜”’ŽŽŽ‘”˜š™ššš˜—–•••““Šˆ†………ƒ‚‚‚‚‚‚‚‚‚„…„„„„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‡†…†ˆŠ‹ŽŠ‡††ˆ‰ˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…Š–™£§¦¥¥¦¨«®±¯­ª§¤¢¡Ÿœ˜”ŽŒŒ“•–˜˜—••”““’‘‘ŽŠˆ‡…„„ƒ‚‚‚‚‚‚‚‚‚‚ƒƒƒƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…„†‡Š‹ŒŽ‹‰ˆ‰‹Œˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒˆ’—šž£§¦¥¥¦©«®¯®«¥¡ŸŸ›™—“ŒŠ‰‡‡†…‡‡ˆ‹ŽŒŠ‰ˆ†„„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ„†‰‰‹‘Ž‹ŠŠŠ‹‰†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‰”˜œ £¤¦§¦§¨ª­®¬¨¢œœ›š˜–’І…„ƒ‚‚‚‚„…‡ˆ‰‰‰‰ˆ‰Š‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…†ˆˆ‰Ž‘ŒŽŽ‹‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡Œ’–™ ¡£¥¦¦¦¥¥¨ª§¤Ÿ›š™˜—•“‡„‚‚‚‚‚‚‚‚‚‚ƒ„„„ƒƒ……ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„††Š’’‘ŒŠ†„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‹•˜šœž ¢£¤¤£¢¢¤¥£¡œš—–•“’‘Ž‹‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„‡Š””“’‘‘Šˆ…„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚†‹”˜›žžŸ¡£££¢¡ŸŸ ¡Ÿš—”“‘ŽŒŠˆ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†ˆŒ‘”““’’’’‹ˆ†„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‰Ž“˜›Ÿ¢£¤¥¥¥¤£¡ž›˜–“‘ŒŠ‰ˆ†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‰Œ‘”“““”“‘މ‡„ƒ„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒˆ“˜œ ¤§¨§§¨¨¦£Ÿœ›˜”’Œ‰†„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ˆ‹’‘’’ŽŽŒ‹‰‡†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚†Œ“™ž¡¥¨ªª©ª«ª¦¢Ÿ›™•‘ŽŒŠ‰†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ˆŠŽŽ‘“‘ŒŠ‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‰˜Ÿ£¥¨ª¬¬¬¬¬©¦¢Ÿœ™•“‘Ž‹ˆ†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡ŠŒŒŽ‘“’’’“’‘‘‘‰†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…‰–œ¡¤¦©««¬¬­ª¦£¡Ÿ™—•’މ‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„ˆ‹ŒŽ’““”•–•“““‹‡…„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡‹•› ¤¦ª««¬®¯«¨¥¢Ÿœ™˜”‘‰†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡ŠŒ‘’’”–™˜––•’Ї…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ˆŒ“˜¡¦ª­­®±³®©¦¢Ÿœ›™”‘ˆ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡Š‘’”—š™˜—–“‘‰‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‚ƒ„…‰Ž’–𠥫®¯°²´¯«§¤¡žœ™•‘‹†ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ˆ‹Ž’“•˜š™——–“‹ˆ†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡‡‰‰ŠŒŽ’•™Ÿ¥¨«­°´¶²­©¥¢Ÿ›—‘Š…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ˆŠŒ’”•˜š˜˜—•“Ž‹‰…ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ˆŒŽ“”–™ž£§ª­±µ·²­§£¡ žœ—‘‹…‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡ˆŠ‘’“–˜–•••“‘‘‘ŽŠ‡†…„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‰‘“•––””•–—šŸ¥¨«­°´µ±¬¨¥£¡ž›–Š„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†ˆ‰‘“–—•”””“““’Œ‰ˆ‡†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‰‘”—ššš™™™™šœ ¥¨«­°´¶³¯ª¦£¡œ—’‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ˆ‹Ž“”•“’“”””“’Ї…„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒˆ‘•™š›››šš™š¢¦©¬°´µ³°«§¤Ÿ™”‹‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ˆ‹Ž‘“““’’“”““’’Ž‹ˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‰Ž•™›œœ››™˜˜› ¥©¬°³³±®¬©¢œ—“Ž‹‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…ˆŠŒ‘’“’‘‘‘‘‘’‘Œ‹‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…ŠŽ”˜š›œœš˜——›¡§ª¬¯±±¯®«§ š•Ї„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡ˆ‹Ž‘“”“’’‘’‘’ŽŒŒ‰†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†Š”–™›œœœ™™——œ£©¬¬­¯¯­ª§¤Ÿ˜’Œˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡‰‹’”•”•““’’’‘ŽŽ‹ˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‰Œ“–˜™˜—˜˜–—œ£¨ª«®¯®ª§¤ œ–ˆ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†ˆŠŒ’•——–•””“’‘ŽŒˆ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…†‰“•–””–––˜¤§ª«­®®©¤ œ—’Œ‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡‰Œ’”–˜˜˜—•”’’“’’‘‹ˆ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‰‘’‘‘’”–˜™ž£§«¬®¯®¨¢ž™”Ї„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‡ŠŽ’””––—˜—•“’““““‘Їƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ˆŒŽŽŽ‘“–˜›ž¢§ª¬®®¬¥ œ™”‹‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†Š’’“”“’’‘‘‘‘Ž‹ˆ…„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‰ŒŒŽŽ’•™žŸ£§ª¬­«¥ š•‹‡ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒƒƒƒƒ‚ƒƒ‡ŠŒŽ‹‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†ŠŠŠ‹ŒŽ’–šžž¢¥§ª¬«¦¡™”‹ˆ…„ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†††…„ƒ„„…‰ŒŒŽŽŽ‹ŠŠ‹ŒŒŒŠˆ…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†ˆ‡‡ˆ‹ŒŽ’—›žž ¡£¦ª©¥ œ˜•‘Šˆ††‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ˆ‰ˆ†„„†‡ˆŠ‹ŒŽŽŒŠˆ†‡‡‰ŠŠˆ†„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‚‚‚‚‚‚‚‚‚‚ƒ„…†††ˆŠŒ”˜›žžžž¡¤¦¥£ ›—”’Ž‹ŠŠ‰ˆ†…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ˆŠŠˆ††‡ˆ‰‹ŒŒ‹ˆ†……„„…‡…„ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ƒ‚‚‚‚‚‚‚‚ƒƒƒƒ„…‡‰”–˜šœž £¢¡ ™•”‘ŽŒŠ‰‡†…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ˆ‰Š‹ŠŠ‰‰Š‹ŒŽŽ‹‡…„ƒ‚‚ƒƒƒ‚ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚†ˆ…ƒ‚‚‚‚‚ƒ„…„ƒƒƒ…†‰’–˜˜šœœœŸ¡ ž›˜–”’‘Œ‹Š‰ˆˆ‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒƒƒ„†ˆŠ‹ŒŽŒŒ‘‘ŽŒ‡…ƒ‚‚‚‚‚‚‚ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ˆŠˆ‡„ƒƒƒ…‡ˆˆ†„ƒ„…‡Š“˜™™›žž››œžžžš–”’‘‘ŒŠ‰ˆˆˆˆ‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„„ƒ„†ˆ‹ŽŽŽ‘ŽŽ‘’‘‹‡„‚‚‚‚‚‚‚ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚‚‚‚‚‚‚ƒ„†ŠŒ‹‰†„„…ˆ‹‹‰‡…„…‡ˆŒ•™ššŸžžœœœŸœ˜•”’‹ˆ‡‡†††‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒƒ„‡‹ŽŽŒ‹‹‹‹ŒŽŒ‹‹ˆ†„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„‡ŠŒŽŒ‰†…„…ˆ‹‹‹Šˆ‡‡‡ŠŽ‘•™™šžœœŸ¡ž›˜—“‘‹ˆ‡†„„…†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„„ˆŒ’Œ‹Š‰‰‰ˆ‰ŠŠ‰‰‰Š‰ˆ†…ƒ‚ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„„†ŠŒŽŠ‡‡††ˆ‹ŒŒŒ‹‰‡ˆ‹•˜™š›œžžž¡¡Ÿ›™”‘Šˆ†„ƒƒ„†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„…„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…†‡Š’ŽŒŠˆˆ‰ˆ†‡ˆ‰ˆˆˆ‰ˆ‡††„„„„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†‡ŠŒ‘ŒŠˆ‡‡Š‹‰‰Š‹Œ“–˜™™šœŸŸ ¢¡ Ÿœ™”‘‹ˆ…ƒ‚‚ƒ„ƒƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…†…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†ˆ‰Š‘’‘ŽŒˆˆ‰‰‡††‡ˆ‡ˆ‰‰ˆˆˆ‡†‡‡†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‚‚‚‚‚‚‚ƒ„†‰‹ŒŽ‘“‘‹ŠŠŒŒŽ‹‹Œ‹Œ’•—™š›œŸ Ÿ Ÿœ›™–“’Ž‹‡„ƒƒ‚‚‚‚‚‚„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…‡ˆ‰‹‘Љ‰‰ˆ‡‡‡‰Š‹Œ‹‹Š‹‰ˆˆˆ‡‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†ˆŠ‘””’‘ŽŽŽŽŽ’”•—™š›œœœœ›š™—•”“‰†„„ƒ‚‚‚‚‚ƒ„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„†‡ˆ‹Ž‘ŒŠŠŠŠ‰‰‰Š‹ŒŽŒŒ‹Š‰ˆ‡‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‡Š’•••–”’‘‘’’’’‘’”••–™››œœœ›ššš™˜—–”‘Ž‹‡ƒ‚‚‚‚‚‚‚‚ƒ„„„ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…†††‡‰ŠŒ‹‹‹‹Œ‹‹ŒŽŽŽŽŒŒ‹‹Šˆˆ‡„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†ŠŽ“•–˜˜˜—–•••––•••“’“•–—™›œ›™™š™—––•’Š…ƒ‚‚‚‚‚‚‚‚ƒ„……†„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„†ˆ‡†ˆ‰‰‰ŒŒŒŒŒŒŒŽŒŒ‰ˆˆ‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„‰Ž’•——˜šš™˜—˜™™˜—•”“•———˜šœœ››œš˜˜—•”’‘‘Œ‡„„ƒƒ‚‚‚‚‚‚‚ƒƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…ˆ††‡ˆ‡‡ŠŒŒŒ‹ŒŽŽ‘ŽŒ‹‹ŠŠˆ‡…ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ‡Œ“““•–——–––˜˜–––––——–––˜˜—˜šš™—–•“‘ŽŽŽŒˆ…„„„„‚‚‚‚‚‚‚ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ‚‚ƒ†‡††††…†ˆŠŒŒŒ‹‘ŽŽŒ‹ŠŠˆˆ‡„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…‰‘‘’”•••––——–—˜˜™™—•”•––••—˜˜–”’ŽŒŒŠˆ…„ƒ‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ„…‡‡………†ˆˆˆˆ‡ˆŠŒ’“‘Ž’‘Œ‹Š‰†„„ƒ‚‚ƒƒƒ„ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ†‡‡…………„ƒ‚‚ƒƒƒƒ‚‚‚‚‚ƒ„†ŠŽ‘“–˜™—–•”–—™š—•“’”••””““”‘ŒŠ‰‰Š‹‡„ƒ‚‚‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ…„ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„†‡†††††‡ˆˆˆ‡‡ˆŠ‘”•“‘ŽŽ‘””’‘‘ŒŠ‡……„ƒ‚„……………„ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚…ˆŠŠ‰‰‰ˆ†„ƒ„…††„‚‚‚‚ƒƒ„†ŠŽ‘”—š›™–”“”—››—”’‘’’“”’Œ‹Šˆ††ˆ‰†…„ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚„„„„…†‡‡‡ˆ‹‹‹Œ’•–•“‘‘‘“••”“‘ދЉ‰‡†……‡ˆ‡†‡‡††††…ƒƒ‚‚‚‚‚‚‚‚‚‚„‡ŠŠ‰‰ˆ†…„„……††…ƒ‚‚‚ƒ„††ˆŒ‘“”–šœ™–’‘’–™š˜•‘’’Œ‹ŠŠˆ…„„†‡†…„„ƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒ„††††ˆŽŽ“”—˜–”““”–—˜—•‘ŽŽ‹‰Š‹‰ˆ‡‡‰ŠŠŠ‹‹‰ˆ‰‰ˆ†„ƒ‚‚‚‚‚‚‚‚„†‰‹Š‰ˆ†„ƒƒ…†††…„ƒ‚ƒƒ„…‡ˆŠŽ‘’“”–™›š—’’•˜š˜•ŽŒŠ‰ˆ‡„ƒƒƒ…†„ƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒ„…‡ˆŠ‘‘“””––•””–˜™šš™–’Œ‹‹‹‹Š‰ŠŠ‹ŒŽ‹Š‹Šˆ†„ƒ‚‚‚‚‚‚‚„†ˆŠŠˆ†„ƒƒƒ„…†††…ƒ‚ƒƒƒ…‡‰ŠŒ‘’’’“•—™š™–“’“•˜˜—”Ž‹‰ˆ†„0 \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/tessdemo.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/tessdemo.c deleted file mode 100644 index 26403eee0a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/tessdemo.c +++ /dev/null @@ -1,524 +0,0 @@ - -/* - * A demo of the GLU polygon tesselation functions written by Bogdan Sikorski. - * Updated for GLU 1.3 tessellation by Gareth Hughes - */ - -#include -#include -#include -#include - -#define MAX_POINTS 256 -#define MAX_CONTOURS 32 -#define MAX_TRIANGLES 256 - -#ifndef GLCALLBACK -#ifdef CALLBACK -#define GLCALLBACK CALLBACK -#else -#define GLCALLBACK -#endif -#endif - -#ifdef GLU_VERSION_1_2 - -typedef enum{ QUIT, TESSELATE, CLEAR } menu_entries; -typedef enum{ DEFINE, TESSELATED } mode_type; - -static GLsizei width, height; -static GLuint contour_cnt; -static GLuint triangle_cnt; - -static mode_type mode; -static int menu; - -static GLuint list_start; - -static GLfloat edge_color[3]; - -static struct { - GLfloat p[MAX_POINTS][2]; - GLuint point_cnt; -} contours[MAX_CONTOURS]; - -static struct { - GLsizei no; - GLfloat p[3][2]; - GLclampf color[3][3]; -} triangles[MAX_TRIANGLES]; - - - -static void GLCALLBACK error_callback( GLenum err ) -{ - int len, i; - char const *str; - - glColor3f( 0.9, 0.9, 0.9 ); - glRasterPos2i( 5, 5 ); - - str = (const char *) gluErrorString( err ); - len = strlen( str ); - - for ( i = 0 ; i < len ; i++ ) { - glutBitmapCharacter( GLUT_BITMAP_9_BY_15, str[i] ); - } -} - -static void GLCALLBACK begin_callback( GLenum mode ) -{ - /* Allow multiple triangles to be output inside the begin/end pair. */ - triangle_cnt = 0; - triangles[triangle_cnt].no = 0; -} - -static void GLCALLBACK edge_callback( GLenum flag ) -{ - /* Persist the edge flag across triangles. */ - if ( flag == GL_TRUE ) { - edge_color[0] = 1.0; - edge_color[1] = 1.0; - edge_color[2] = 0.5; - } else { - edge_color[0] = 1.0; - edge_color[1] = 0.0; - edge_color[2] = 0.0; - } -} - -static void GLCALLBACK end_callback() -{ - GLuint i; - - glBegin( GL_LINES ); - - /* Output the three edges of each triangle as lines colored - according to their edge flag. */ - for ( i = 0 ; i < triangle_cnt ; i++ ) { - glColor3f( triangles[i].color[0][0], - triangles[i].color[0][1], - triangles[i].color[0][2] ); - - glVertex2f( triangles[i].p[0][0], triangles[i].p[0][1] ); - glVertex2f( triangles[i].p[1][0], triangles[i].p[1][1] ); - - glColor3f( triangles[i].color[1][0], - triangles[i].color[1][1], - triangles[i].color[1][2] ); - - glVertex2f( triangles[i].p[1][0], triangles[i].p[1][1] ); - glVertex2f( triangles[i].p[2][0], triangles[i].p[2][1] ); - - glColor3f( triangles[i].color[2][0], - triangles[i].color[2][1], - triangles[i].color[2][2] ); - - glVertex2f( triangles[i].p[2][0], triangles[i].p[2][1] ); - glVertex2f( triangles[i].p[0][0], triangles[i].p[0][1] ); - } - - glEnd(); -} - -static void GLCALLBACK vertex_callback( void *data ) -{ - GLsizei no; - GLfloat *p; - - p = (GLfloat *) data; - no = triangles[triangle_cnt].no; - - triangles[triangle_cnt].p[no][0] = p[0]; - triangles[triangle_cnt].p[no][1] = p[1]; - - triangles[triangle_cnt].color[no][0] = edge_color[0]; - triangles[triangle_cnt].color[no][1] = edge_color[1]; - triangles[triangle_cnt].color[no][2] = edge_color[2]; - - /* After every three vertices, initialize the next triangle. */ - if ( ++(triangles[triangle_cnt].no) == 3 ) { - triangle_cnt++; - triangles[triangle_cnt].no = 0; - } -} - -static void GLCALLBACK combine_callback( GLdouble coords[3], - GLdouble *vertex_data[4], - GLfloat weight[4], void **data ) -{ - GLfloat *vertex; - - vertex = (GLfloat *) malloc( 2 * sizeof(GLfloat) ); - - vertex[0] = (GLfloat) coords[0]; - vertex[1] = (GLfloat) coords[1]; - - *data = vertex; -} - - -static void set_screen_wh( GLsizei w, GLsizei h ) -{ - width = w; - height = h; -} - -typedef void (GLAPIENTRY *callback_t)(); - -static void tesse( void ) -{ - GLUtesselator *tobj; - GLdouble data[3]; - GLuint i, j, point_cnt; - - list_start = glGenLists( 2 ); - - tobj = gluNewTess(); - - if ( tobj != NULL ) { - gluTessNormal( tobj, 0.0, 0.0, 1.0 ); - gluTessCallback( tobj, GLU_TESS_BEGIN, (callback_t) glBegin ); - gluTessCallback( tobj, GLU_TESS_VERTEX, (callback_t) glVertex2fv ); - gluTessCallback( tobj, GLU_TESS_END, (callback_t) glEnd ); - gluTessCallback( tobj, GLU_TESS_ERROR, (callback_t) error_callback ); - gluTessCallback( tobj, GLU_TESS_COMBINE, (callback_t) combine_callback ); - - glNewList( list_start, GL_COMPILE ); - gluBeginPolygon( tobj ); - - for ( j = 0 ; j <= contour_cnt ; j++ ) { - point_cnt = contours[j].point_cnt; - gluNextContour( tobj, GLU_UNKNOWN ); - - for ( i = 0 ; i < point_cnt ; i++ ) { - data[0] = (GLdouble)( contours[j].p[i][0] ); - data[1] = (GLdouble)( contours[j].p[i][1] ); - data[2] = 0.0; - gluTessVertex( tobj, data, contours[j].p[i] ); - } - } - - gluEndPolygon( tobj ); - glEndList(); - - gluTessCallback( tobj, GLU_TESS_BEGIN, (callback_t) begin_callback ); - gluTessCallback( tobj, GLU_TESS_VERTEX, (callback_t) vertex_callback ); - gluTessCallback( tobj, GLU_TESS_END, (callback_t) end_callback ); - gluTessCallback( tobj, GLU_TESS_EDGE_FLAG, (callback_t) edge_callback ); - - glNewList( list_start + 1, GL_COMPILE ); - gluBeginPolygon( tobj ); - - for ( j = 0 ; j <= contour_cnt ; j++ ) { - point_cnt = contours[j].point_cnt; - gluNextContour( tobj, GLU_UNKNOWN ); - - for ( i = 0 ; i < point_cnt ; i++ ) { - data[0] = (GLdouble)( contours[j].p[i][0] ); - data[1] = (GLdouble)( contours[j].p[i][1] ); - data[2] = 0.0; - gluTessVertex( tobj, data, contours[j].p[i] ); - } - } - - gluEndPolygon( tobj ); - glEndList(); - - gluDeleteTess( tobj ); - - glutMouseFunc( NULL ); - mode = TESSELATED; - } -} - -static void left_down( int x1, int y1 ) -{ - GLfloat P[2]; - GLuint point_cnt; - - /* translate GLUT into GL coordinates */ - - P[0] = x1; - P[1] = height - y1; - - point_cnt = contours[contour_cnt].point_cnt; - - contours[contour_cnt].p[point_cnt][0] = P[0]; - contours[contour_cnt].p[point_cnt][1] = P[1]; - - glBegin( GL_LINES ); - - if ( point_cnt ) { - glVertex2fv( contours[contour_cnt].p[point_cnt-1] ); - glVertex2fv( P ); - } else { - glVertex2fv( P ); - glVertex2fv( P ); - } - - glEnd(); - glFinish(); - - contours[contour_cnt].point_cnt++; -} - -static void middle_down( int x1, int y1 ) -{ - GLuint point_cnt; - (void) x1; - (void) y1; - - point_cnt = contours[contour_cnt].point_cnt; - - if ( point_cnt > 2 ) { - glBegin( GL_LINES ); - - glVertex2fv( contours[contour_cnt].p[0] ); - glVertex2fv( contours[contour_cnt].p[point_cnt-1] ); - - contours[contour_cnt].p[point_cnt][0] = -1; - - glEnd(); - glFinish(); - - contour_cnt++; - contours[contour_cnt].point_cnt = 0; - } -} - -static void mouse_clicked( int button, int state, int x, int y ) -{ - x -= x%10; - y -= y%10; - - switch ( button ) { - case GLUT_LEFT_BUTTON: - if ( state == GLUT_DOWN ) { - left_down( x, y ); - } - break; - case GLUT_MIDDLE_BUTTON: - if ( state == GLUT_DOWN ) { - middle_down( x, y ); - } - break; - } -} - -static void display( void ) -{ - GLuint i,j; - GLsizei ii, jj; - GLuint point_cnt; - - glClear( GL_COLOR_BUFFER_BIT ); - - switch ( mode ) { - case DEFINE: - /* draw grid */ - glColor3f( 0.6, 0.5, 0.5 ); - - glBegin( GL_LINES ); - - for ( ii = 0 ; ii < width ; ii += 10 ) { - for ( jj = 0 ; jj < height ; jj += 10 ) { - glVertex2i( 0, jj ); - glVertex2i( width, jj ); - glVertex2i( ii, height ); - glVertex2i( ii, 0 ); - } - } - - glEnd(); - - glColor3f( 1.0, 1.0, 0.0 ); - - for ( i = 0 ; i <= contour_cnt ; i++ ) { - point_cnt = contours[i].point_cnt; - - glBegin( GL_LINES ); - - switch ( point_cnt ) { - case 0: - break; - case 1: - glVertex2fv( contours[i].p[0] ); - glVertex2fv( contours[i].p[0] ); - break; - case 2: - glVertex2fv( contours[i].p[0] ); - glVertex2fv( contours[i].p[1] ); - break; - default: - --point_cnt; - for ( j = 0 ; j < point_cnt ; j++ ) { - glVertex2fv( contours[i].p[j] ); - glVertex2fv( contours[i].p[j+1] ); - } - if ( contours[i].p[j+1][0] == -1 ) { - glVertex2fv( contours[i].p[0] ); - glVertex2fv( contours[i].p[j] ); - } - break; - } - - glEnd(); - } - - glFinish(); - break; - - case TESSELATED: - /* draw triangles */ - glColor3f( 0.7, 0.7, 0.0 ); - glCallList( list_start ); - - glLineWidth( 2.0 ); - glCallList( list_start + 1 ); - glLineWidth( 1.0 ); - - glFlush(); - break; - } - - glColor3f( 1.0, 1.0, 0.0 ); -} - -static void clear( void ) -{ - contour_cnt = 0; - contours[0].point_cnt = 0; - triangle_cnt = 0; - - glutMouseFunc( mouse_clicked ); - - mode = DEFINE; - - glDeleteLists( list_start, 2 ); - list_start = 0; -} - -static void quit( void ) -{ - exit( 0 ); -} - -static void menu_selected( int entry ) -{ - switch ( entry ) { - case CLEAR: - clear(); - break; - case TESSELATE: - tesse(); - break; - case QUIT: - quit(); - break; - } - - glutPostRedisplay(); -} - -static void key_pressed( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - - switch ( key ) { - case 'c': - case 'C': - clear(); - break; - case 't': - case 'T': - tesse(); - break; - case 27: - case 'q': - case 'Q': - quit(); - break; - } - - glutPostRedisplay(); -} - -static void myinit( void ) -{ - /* clear background to gray */ - glClearColor( 0.4, 0.4, 0.4, 0.0 ); - glShadeModel( GL_FLAT ); - glPolygonMode( GL_FRONT, GL_FILL ); - - menu = glutCreateMenu( menu_selected ); - - glutAddMenuEntry( "clear", CLEAR ); - glutAddMenuEntry( "tesselate", TESSELATE ); - glutAddMenuEntry( "quit", QUIT ); - - glutAttachMenu( GLUT_RIGHT_BUTTON ); - - glutMouseFunc( mouse_clicked ); - glutKeyboardFunc( key_pressed ); - - contour_cnt = 0; - mode = DEFINE; -} - -static void reshape( GLsizei w, GLsizei h ) -{ - glViewport( 0, 0, w, h ); - - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( 0.0, (GLdouble)w, 0.0, (GLdouble)h, -1.0, 1.0 ); - - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - - set_screen_wh( w, h ); -} - -#endif - - -static void usage( void ) -{ - printf( "Use left mouse button to place vertices.\n" ); - printf( "Press middle mouse button when done.\n" ); - printf( "Select tesselate from the pop-up menu.\n" ); -} - - -int main( int argc, char **argv ) -{ - const char *version = (const char *) gluGetString( GLU_VERSION ); - printf( "GLU version string: %s\n", version ); - if ( strstr( version, "1.0" ) || strstr( version, "1.1" ) ) { - fprintf( stderr, "Sorry, this demo reqiures GLU 1.2 or later.\n" ); - exit( 1 ); - } - - usage(); - - glutInit( &argc, argv ); - glutInitDisplayMode( GLUT_SINGLE | GLUT_RGB ); - glutInitWindowPosition(0, 0); - glutInitWindowSize( 400, 400 ); - glutCreateWindow( argv[0] ); - - /* GH: Bit of a hack... - */ -#ifdef GLU_VERSION_1_2 - myinit(); - - glutDisplayFunc( display ); - glutReshapeFunc( reshape ); - - glutMainLoop(); -#endif - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/texcyl.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/texcyl.c deleted file mode 100644 index c04d5004e3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/texcyl.c +++ /dev/null @@ -1,288 +0,0 @@ - -/* - * Textured cylinder demo: lighting, texturing, reflection mapping. - * - * Command line options: - * -info print GL implementation information - * - * - * Brian Paul May 1997 This program is in the public domain. - */ - -#include -#include -#include -#include -#include - -#include "readtex.h" - -#define TEXTURE_FILE "../images/reflect.rgb" - -#define LIT 1 -#define TEXTURED 2 -#define REFLECT 3 -#define ANIMATE 10 -#define POINT_FILTER 20 -#define LINEAR_FILTER 21 -#define QUIT 100 - -static GLuint CylinderObj = 0; -static GLboolean Animate = GL_TRUE; - -static GLfloat Xrot = 0.0, Yrot = 0.0, Zrot = 0.0; -static GLfloat DXrot = 50.0, DYrot = 125.0; - -/* performance info */ -static GLint T0 = 0; -static GLint Frames = 0; - - -static void Idle( void ) -{ - static double t0 = -1.; - double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0; - if (t0 < 0.0) - t0 = t; - dt = t - t0; - t0 = t; - - if (Animate) { - Xrot += DXrot * dt; - Yrot += DYrot * dt; - glutPostRedisplay(); - } -} - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - glScalef(5.0, 5.0, 5.0); - glCallList(CylinderObj); - - glPopMatrix(); - - glutSwapBuffers(); - - if (Animate) { - GLint t = glutGet(GLUT_ELAPSED_TIME); - Frames++; - if (t - T0 >= 5000) { - GLfloat seconds = (t - T0) / 1000.0; - GLfloat fps = Frames / seconds; - printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps); - T0 = t; - Frames = 0; - } - } -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 10.0, 100.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -70.0 ); -} - - -static void SetMode(GLuint m) -{ - /* disable everything */ - glDisable(GL_LIGHTING); - glDisable(GL_TEXTURE_2D); - glDisable(GL_TEXTURE_GEN_S); - glDisable(GL_TEXTURE_GEN_T); - - /* enable what's needed */ - if (m==LIT) { - glEnable(GL_LIGHTING); - } - else if (m==TEXTURED) { - glEnable(GL_TEXTURE_2D); - } - else if (m==REFLECT) { - glEnable(GL_TEXTURE_2D); - glEnable(GL_TEXTURE_GEN_S); - glEnable(GL_TEXTURE_GEN_T); - } -} - - -static void ModeMenu(int entry) -{ - if (entry==ANIMATE) { - Animate = !Animate; - if (Animate) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - } - else if (entry==POINT_FILTER) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } - else if (entry==LINEAR_FILTER) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - } - else if (entry==QUIT) { - exit(0); - } - else { - SetMode(entry); - } - glutPostRedisplay(); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case ' ': - Animate = !Animate; - if (Animate) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - float step = 3.0; - (void) x; - (void) y; - - switch (key) { - case GLUT_KEY_UP: - Xrot += step; - break; - case GLUT_KEY_DOWN: - Xrot -= step; - break; - case GLUT_KEY_LEFT: - Yrot += step; - break; - case GLUT_KEY_RIGHT: - Yrot -= step; - break; - } - glutPostRedisplay(); -} - - -static void Init( int argc, char *argv[] ) -{ - GLUquadricObj *q = gluNewQuadric(); - CylinderObj = glGenLists(1); - glNewList(CylinderObj, GL_COMPILE); - - glTranslatef(0.0, 0.0, -1.0); - - /* cylinder */ - gluQuadricNormals(q, GL_SMOOTH); - gluQuadricTexture(q, GL_TRUE); - gluCylinder(q, 0.6, 0.6, 2.0, 24, 1); - - /* end cap */ - glTranslatef(0.0, 0.0, 2.0); - gluDisk(q, 0.0, 0.6, 24, 1); - - /* other end cap */ - glTranslatef(0.0, 0.0, -2.0); - gluQuadricOrientation(q, GLU_INSIDE); - gluDisk(q, 0.0, 0.6, 24, 1); - - glEndList(); - gluDeleteQuadric(q); - - /* lighting */ - glEnable(GL_LIGHTING); - { - GLfloat gray[4] = {0.2, 0.2, 0.2, 1.0}; - GLfloat white[4] = {1.0, 1.0, 1.0, 1.0}; - GLfloat teal[4] = { 0.0, 1.0, 0.8, 1.0 }; - glMaterialfv(GL_FRONT, GL_DIFFUSE, teal); - glLightfv(GL_LIGHT0, GL_AMBIENT, gray); - glLightfv(GL_LIGHT0, GL_DIFFUSE, white); - glEnable(GL_LIGHT0); - } - - /* fitering = nearest, initially */ - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); - glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); - - glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); - glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); - - if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) { - printf("Error: couldn't load texture image\n"); - exit(1); - } - - glEnable(GL_CULL_FACE); /* don't need Z testing for convex objects */ - - SetMode(LIT); - - if (argc > 1 && strcmp(argv[1], "-info")==0) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowSize( 400, 400 ); - glutInitWindowPosition( 0, 0 ); - - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - - glutCreateWindow(argv[0] ); - - Init(argc, argv); - - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - glutIdleFunc( Idle ); - - glutCreateMenu(ModeMenu); - glutAddMenuEntry("Lit", LIT); - glutAddMenuEntry("Textured", TEXTURED); - glutAddMenuEntry("Reflect", REFLECT); - glutAddMenuEntry("Point Filtered", POINT_FILTER); - glutAddMenuEntry("Linear Filtered", LINEAR_FILTER); - glutAddMenuEntry("Toggle Animation", ANIMATE); - glutAddMenuEntry("Quit", QUIT); - glutAttachMenu(GLUT_RIGHT_BUTTON); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/texdown.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/texdown.c deleted file mode 100644 index 79525a0395..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/texdown.c +++ /dev/null @@ -1,403 +0,0 @@ - -/* - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * texdown - * - * Measure texture download speed. - * Use keyboard to change texture size, format, datatype, scale/bias, - * subimageload, etc. - * - * Brian Paul 28 January 2000 - */ - - -#include -#include -#include -#include - - -static GLsizei MaxSize = 1024; -static GLsizei TexWidth = 256, TexHeight = 256, TexBorder = 0; -static GLboolean ScaleAndBias = GL_FALSE; -static GLboolean SubImage = GL_FALSE; -static GLdouble DownloadRate = 0.0; /* texels/sec */ - -static GLuint Mode = 0; - - -struct FormatRec { - GLenum Format; - GLenum Type; - GLenum IntFormat; - GLint TexelSize; -}; - - -static const struct FormatRec FormatTable[] = { - /* Format Type IntFormat TexelSize */ - { GL_BGRA, GL_UNSIGNED_BYTE, GL_RGBA, 4 }, - { GL_RGB, GL_UNSIGNED_BYTE, GL_RGB, 3 }, - { GL_RGBA, GL_UNSIGNED_BYTE, GL_RGBA, 4 }, - { GL_RGBA, GL_UNSIGNED_BYTE, GL_RGB, 4 }, - { GL_RGB, GL_UNSIGNED_SHORT_5_6_5, GL_RGB, 2 }, - { GL_LUMINANCE, GL_UNSIGNED_BYTE, GL_LUMINANCE, 1 }, - { GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, GL_LUMINANCE_ALPHA, 2 }, - { GL_ALPHA, GL_UNSIGNED_BYTE, GL_ALPHA, 1 }, -}; -static GLint Format; - -#define NUM_FORMATS (sizeof(FormatTable)/sizeof(FormatTable[0])) - -static int -BytesPerTexel(GLint format) -{ - return FormatTable[format].TexelSize; -} - - -static const char * -FormatStr(GLenum format) -{ - switch (format) { - case GL_RGB: - return "GL_RGB"; - case GL_RGBA: - return "GL_RGBA"; - case GL_BGRA: - return "GL_BGRA"; - case GL_LUMINANCE: - return "GL_LUMINANCE"; - case GL_LUMINANCE_ALPHA: - return "GL_LUMINANCE_ALPHA"; - case GL_ALPHA: - return "GL_ALPHA"; - default: - return ""; - } -} - - -static const char * -TypeStr(GLenum type) -{ - switch (type) { - case GL_UNSIGNED_BYTE: - return "GL_UNSIGNED_BYTE"; - case GL_UNSIGNED_SHORT: - return "GL_UNSIGNED_SHORT"; - case GL_UNSIGNED_SHORT_5_6_5: - return "GL_UNSIGNED_SHORT_5_6_5"; - case GL_UNSIGNED_SHORT_5_6_5_REV: - return "GL_UNSIGNED_SHORT_5_6_5_REV"; - default: - return ""; - } -} - - -static void -MeasureDownloadRate(void) -{ - const int w = TexWidth + 2 * TexBorder; - const int h = TexHeight + 2 * TexBorder; - const int bytes = w * h * BytesPerTexel(Format); - GLubyte *texImage, *getImage; - GLdouble t0, t1, time; - int count; - int i; - - texImage = (GLubyte *) malloc(bytes); - getImage = (GLubyte *) malloc(bytes); - if (!texImage || !getImage) { - DownloadRate = 0.0; - return; - } - - for (i = 0; i < bytes; i++) { - texImage[i] = i & 0xff; - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glPixelStorei(GL_PACK_ALIGNMENT, 1); - - if (ScaleAndBias) { - glPixelTransferf(GL_RED_SCALE, 0.5); - glPixelTransferf(GL_GREEN_SCALE, 0.5); - glPixelTransferf(GL_BLUE_SCALE, 0.5); - glPixelTransferf(GL_RED_BIAS, 0.5); - glPixelTransferf(GL_GREEN_BIAS, 0.5); - glPixelTransferf(GL_BLUE_BIAS, 0.5); - } - else { - glPixelTransferf(GL_RED_SCALE, 1.0); - glPixelTransferf(GL_GREEN_SCALE, 1.0); - glPixelTransferf(GL_BLUE_SCALE, 1.0); - glPixelTransferf(GL_RED_BIAS, 0.0); - glPixelTransferf(GL_GREEN_BIAS, 0.0); - glPixelTransferf(GL_BLUE_BIAS, 0.0); - } - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glEnable(GL_TEXTURE_2D); - - count = 0; - t0 = glutGet(GLUT_ELAPSED_TIME) * 0.001; - do { - if (SubImage && count > 0) { - glTexSubImage2D(GL_TEXTURE_2D, 0, -TexBorder, -TexBorder, w, h, - FormatTable[Format].Format, - FormatTable[Format].Type, texImage); - } - else { - glTexImage2D(GL_TEXTURE_2D, 0, - FormatTable[Format].IntFormat, w, h, TexBorder, - FormatTable[Format].Format, - FormatTable[Format].Type, texImage); - } - - /* draw a tiny polygon to force texture into texram */ - glBegin(GL_TRIANGLES); - glTexCoord2f(0, 0); glVertex2f(1, 1); - glTexCoord2f(1, 0); glVertex2f(3, 1); - glTexCoord2f(0.5, 1); glVertex2f(2, 3); - glEnd(); - - t1 = glutGet(GLUT_ELAPSED_TIME) * 0.001; - time = t1 - t0; - count++; - } while (time < 3.0); - - glDisable(GL_TEXTURE_2D); - - printf("w*h=%d count=%d time=%f\n", w*h, count, time); - DownloadRate = w * h * count / time; - -#if 0 - if (!ScaleAndBias) { - /* verify texture readback */ - glGetTexImage(GL_TEXTURE_2D, 0, - FormatTable[Format].Format, - FormatTable[Format].Type, getImage); - for (i = 0; i < w * h; i++) { - if (texImage[i] != getImage[i]) { - printf("[%d] %d != %d\n", i, texImage[i], getImage[i]); - } - } - } -#endif - - free(texImage); - free(getImage); - - { - GLint err = glGetError(); - if (err) - printf("GL error %d\n", err); - } -} - - -static void -PrintString(const char *s) -{ - while (*s) { - glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s); - s++; - } -} - - -static void -Display(void) -{ - const int w = TexWidth + 2 * TexBorder; - const int h = TexHeight + 2 * TexBorder; - char s[1000]; - - glClear(GL_COLOR_BUFFER_BIT); - - glRasterPos2i(10, 80); - sprintf(s, "Texture size[cursor]: %d x %d Border[b]: %d", w, h, TexBorder); - PrintString(s); - - glRasterPos2i(10, 65); - sprintf(s, "Format[f]: %s Type: %s IntFormat: %s", - FormatStr(FormatTable[Format].Format), - TypeStr( FormatTable[Format].Type), - FormatStr(FormatTable[Format].IntFormat)); - PrintString(s); - - glRasterPos2i(10, 50); - sprintf(s, "Pixel Scale&Bias[p]: %s TexSubImage[s]: %s", - ScaleAndBias ? "Yes" : "No", - SubImage ? "Yes" : "No"); - PrintString(s); - - if (Mode == 0) { - glRasterPos2i(200, 10); - sprintf(s, "...Measuring..."); - PrintString(s); - glutSwapBuffers(); - glutPostRedisplay(); - Mode++; - } - else if (Mode == 1) { - MeasureDownloadRate(); - glutPostRedisplay(); - Mode++; - } - else { - /* show results */ - glRasterPos2i(10, 10); - sprintf(s, "Download rate: %g Mtexels/second %g MB/second", - DownloadRate / 1000000.0, - DownloadRate * BytesPerTexel(Format) / 1000000.0); - PrintString(s); - { - GLint r, g, b, a, l, i; - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_RED_SIZE, &r); - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_GREEN_SIZE, &g); - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_BLUE_SIZE, &b); - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_ALPHA_SIZE, &a); - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_LUMINANCE_SIZE, &l); - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_INTENSITY_SIZE, &i); - sprintf(s, "TexelBits: R=%d G=%d B=%d A=%d L=%d I=%d", r, g, b, a, l, i); - glRasterPos2i(10, 25); - PrintString(s); - } - - glutSwapBuffers(); - } -} - - -static void -Reshape(int width, int height) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho(0, width, 0, height, -1, 1); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); -} - - - -static void -Key(unsigned char key, int x, int y) -{ - (void) x; - (void) y; - switch (key) { - case ' ': - Mode = 0; - break; - case 'b': - /* toggle border */ - TexBorder = 1 - TexBorder; - Mode = 0; - break; - case 'f': - /* change format */ - Format = (Format + 1) % NUM_FORMATS; - Mode = 0; - break; - case 'F': - /* change format */ - Format = (Format - 1) % NUM_FORMATS; - Mode = 0; - break; - case 'p': - /* toggle border */ - ScaleAndBias = !ScaleAndBias; - Mode = 0; - break; - case 's': - SubImage = !SubImage; - Mode = 0; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void -SpecialKey(int key, int x, int y) -{ - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - if (TexHeight < MaxSize) - TexHeight *= 2; - break; - case GLUT_KEY_DOWN: - if (TexHeight > 1) - TexHeight /= 2; - break; - case GLUT_KEY_LEFT: - if (TexWidth > 1) - TexWidth /= 2; - break; - case GLUT_KEY_RIGHT: - if (TexWidth < MaxSize) - TexWidth *= 2; - break; - } - Mode = 0; - glutPostRedisplay(); -} - - -static void -Init(void) -{ - printf("GL_VENDOR = %s\n", (const char *) glGetString(GL_VENDOR)); - printf("GL_VERSION = %s\n", (const char *) glGetString(GL_VERSION)); - printf("GL_RENDERER = %s\n", (const char *) glGetString(GL_RENDERER)); -} - - -int -main(int argc, char *argv[]) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 600, 100 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/texenv.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/texenv.c deleted file mode 100644 index 590867b494..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/texenv.c +++ /dev/null @@ -1,815 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/** - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ - -/* - * Demonstrates texture environment modes and internal image formats. - */ - -/* - * Hacked on, updated by Gareth Hughes - */ - -#include -#include -#include -#include - -#undef max -#undef min -#define max( a, b ) ((a) >= (b) ? (a) : (b)) -#define min( a, b ) ((a) <= (b) ? (a) : (b)) - -GLfloat lightCheck[4] = { 0.7, 0.7, 0.7, 1.0 }; -GLfloat darkCheck[4] = { 0.3, 0.3, 0.3, 1.0 }; - -GLfloat labelColor0[4] = { 1.0, 1.0, 1.0, 1.0 }; -GLfloat labelColor1[4] = { 1.0, 1.0, 0.4, 1.0 }; -GLfloat *labelInfoColor = labelColor0; -GLfloat labelLevelColor0[4] = { 0.8, 0.8, 0.1, 1.0 }; -GLfloat labelLevelColor1[4] = { 0.0, 0.0, 0.0, 1.0 }; - -GLboolean doubleBuffered = GL_TRUE; -GLboolean drawBackground = GL_FALSE; -GLboolean drawBlended = GL_TRUE; -GLboolean drawSmooth = GL_FALSE; -GLboolean drawTextured = GL_TRUE; -GLboolean displayLevelInfo = GL_FALSE; - -int textureWidth = 64; -int textureHeight = 64; - -int winWidth = 580, winHeight = 720; - -struct formatInfo { - GLenum baseFormat; - GLenum internalFormat; - char *name; -}; - -#define NUM_LUMINANCE_FORMATS (sizeof(luminanceFormats) / sizeof(luminanceFormats[0])) -struct formatInfo luminanceFormats[] = -{ - { GL_LUMINANCE, GL_LUMINANCE, "LUMINANCE" }, - { GL_LUMINANCE, GL_LUMINANCE4, "LUMINANCE4" }, - { GL_LUMINANCE, GL_LUMINANCE8, "LUMINANCE8" }, - { GL_LUMINANCE, GL_LUMINANCE12, "LUMINANCE12" }, - { GL_LUMINANCE, GL_LUMINANCE16, "LUMINANCE16" }, -}; - -#define NUM_ALPHA_FORMATS (sizeof(alphaFormats) / sizeof(alphaFormats[0])) -struct formatInfo alphaFormats[] = -{ - { GL_ALPHA, GL_ALPHA, "ALPHA" }, - { GL_ALPHA, GL_ALPHA4, "ALPHA4" }, - { GL_ALPHA, GL_ALPHA8, "ALPHA8" }, - { GL_ALPHA, GL_ALPHA12, "ALPHA12" }, - { GL_ALPHA, GL_ALPHA16, "ALPHA16" }, -}; - -#define NUM_INTENSITY_FORMATS (sizeof(intensityFormats) / sizeof(intensityFormats[0])) -struct formatInfo intensityFormats[] = -{ - { GL_INTENSITY, GL_INTENSITY, "INTENSITY" }, - { GL_INTENSITY, GL_INTENSITY4, "INTENSITY4" }, - { GL_INTENSITY, GL_INTENSITY8, "INTENSITY8" }, - { GL_INTENSITY, GL_INTENSITY12, "INTENSITY12" }, - { GL_INTENSITY, GL_INTENSITY16, "INTENSITY16" }, -}; - -#define NUM_LUMINANCE_ALPHA_FORMATS (sizeof(luminanceAlphaFormats) / sizeof(luminanceAlphaFormats[0])) -struct formatInfo luminanceAlphaFormats[] = -{ - { GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, "LUMINANCE_ALPHA" }, - { GL_LUMINANCE_ALPHA, GL_LUMINANCE4_ALPHA4, "LUMINANCE4_ALPHA4" }, - { GL_LUMINANCE_ALPHA, GL_LUMINANCE6_ALPHA2, "LUMINANCE6_ALPHA2" }, - { GL_LUMINANCE_ALPHA, GL_LUMINANCE8_ALPHA8, "LUMINANCE8_ALPHA8" }, - { GL_LUMINANCE_ALPHA, GL_LUMINANCE12_ALPHA4, "LUMINANCE12_ALPHA4" }, - { GL_LUMINANCE_ALPHA, GL_LUMINANCE12_ALPHA12, "LUMINANCE12_ALPHA12" }, - { GL_LUMINANCE_ALPHA, GL_LUMINANCE16_ALPHA16, "LUMINANCE16_ALPHA16" }, -}; - -#define NUM_RGB_FORMATS (sizeof(rgbFormats) / sizeof(rgbFormats[0])) -struct formatInfo rgbFormats[] = -{ - { GL_RGB, GL_RGB, "RGB" }, - { GL_RGB, GL_R3_G3_B2, "R3_G3_B2" }, - { GL_RGB, GL_RGB4, "RGB4" }, - { GL_RGB, GL_RGB5, "RGB5" }, - { GL_RGB, GL_RGB8, "RGB8" }, - { GL_RGB, GL_RGB10, "RGB10" }, - { GL_RGB, GL_RGB12, "RGB12" }, - { GL_RGB, GL_RGB16, "RGB16" }, -}; - -#define NUM_RGBA_FORMATS (sizeof(rgbaFormats) / sizeof(rgbaFormats[0])) -struct formatInfo rgbaFormats[] = -{ - { GL_RGBA, GL_RGBA, "RGBA" }, - { GL_RGBA, GL_RGBA2, "RGBA2" }, - { GL_RGBA, GL_RGBA4, "RGBA4" }, - { GL_RGBA, GL_RGB5_A1, "RGB5_A1" }, - { GL_RGBA, GL_RGBA8, "RGBA8" }, - { GL_RGBA, GL_RGB10_A2, "RGB10_A2" }, - { GL_RGBA, GL_RGBA12, "RGBA12" }, - { GL_RGBA, GL_RGBA16, "RGBA16" }, -}; - -struct baseFormatInfo { - struct formatInfo *format; - int current, number; -}; - -#define NUM_BASE_FORMATS (sizeof(baseFormats) / sizeof(baseFormats[0])) -int baseFormat; -struct baseFormatInfo baseFormats[] = -{ - { luminanceFormats, 0, NUM_LUMINANCE_FORMATS }, - { alphaFormats, 0, NUM_ALPHA_FORMATS }, - { intensityFormats, 0, NUM_INTENSITY_FORMATS }, - { luminanceAlphaFormats, 0, NUM_LUMINANCE_ALPHA_FORMATS }, - { rgbFormats, 0, NUM_RGB_FORMATS }, - { rgbaFormats, 0, NUM_RGBA_FORMATS }, -}; - -#define NUM_ENV_COLORS (sizeof(envColors) / sizeof(envColors[0])) -int envColor = 0; -GLfloat envColors[][4] = -{ - { 0.0, 0.0, 0.0, 1.0 }, - { 1.0, 0.0, 0.0, 1.0 }, - { 0.0, 1.0, 0.0, 1.0 }, - { 0.0, 0.0, 1.0, 1.0 }, - { 1.0, 1.0, 1.0, 1.0 }, -}; - -struct envModeInfo { - GLenum mode; - char *name; -}; - -/* allow for run-time check for GL_EXT_texture_env_add */ -int NUM_ENV_MODES = 5; -struct envModeInfo envModes[] = -{ - { GL_REPLACE, "REPLACE" }, - { GL_MODULATE, "MODULATE" }, - { GL_BLEND, "BLEND" }, - { GL_DECAL, "DECAL" }, -#if GL_EXT_texture_env_add - { GL_ADD, "ADD" }, -#endif -}; - -static void checkErrors( void ) -{ - GLenum error; - - while ( (error = glGetError()) != GL_NO_ERROR ) { - fprintf( stderr, "Error: %s\n", (char *) gluErrorString( error ) ); - } -} - -static void drawString( const char *string, GLfloat x, GLfloat y, - const GLfloat color[4] ) -{ - glColor4fv( color ); - glRasterPos2f( x, y ); - - while ( *string ) { - glutBitmapCharacter( GLUT_BITMAP_TIMES_ROMAN_10, *string ); - string++; - } -} - -static void drawStringOutline( const char *string, GLfloat x, GLfloat y, - const GLfloat color[4], - const GLfloat outline[4] ) -{ - drawString( string, x - 1, y, outline ); - drawString( string, x + 1, y, outline ); - drawString( string, x, y - 1, outline ); - drawString( string, x, y + 1, outline ); - drawString( string, x, y, color ); -} - -static void begin2D( int width, int height ) -{ - glMatrixMode( GL_PROJECTION ); - - glPushMatrix(); - glLoadIdentity(); - - glOrtho( 0, width, 0, height, -1, 1 ); - glMatrixMode( GL_MODELVIEW ); - - glPushMatrix(); - glLoadIdentity(); -} - -static void end2D( void ) -{ - glMatrixMode( GL_PROJECTION ); - glPopMatrix(); - glMatrixMode( GL_MODELVIEW ); - glPopMatrix(); -} - -static void initialize( void ) -{ - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - - glOrtho( -1.5, 1.5, -1.5, 1.5, -1.5, 1.5 ); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - glShadeModel( GL_FLAT ); -} - -/* ARGSUSED1 */ -static void keyboard( unsigned char c, int x, int y ) -{ - switch ( c ) { - case 'c': - envColor++; - envColor = envColor % (int) NUM_ENV_COLORS; - break; - case 'g': - drawBackground = !drawBackground; - break; - case 'b': - drawBlended = !drawBlended; - break; - case 's': - drawSmooth = !drawSmooth; - break; - case 't': - drawTextured = !drawTextured; - break; - case 'i': - displayLevelInfo = !displayLevelInfo; - break; - case 27: /* Escape key should force exit. */ - exit(0); - break; - default: - break; - } - glutPostRedisplay(); -} - -/* ARGSUSED1 */ -static void special( int key, int x, int y ) -{ - switch ( key ) { - case GLUT_KEY_DOWN: - if ( ++baseFormat > NUM_BASE_FORMATS - 1 ) { - baseFormat = 0; - } - break; - case GLUT_KEY_UP: - if ( --baseFormat < 0 ) { - baseFormat = NUM_BASE_FORMATS - 1; - } - break; - case GLUT_KEY_LEFT: - --baseFormats[baseFormat].current; - if ( baseFormats[baseFormat].current < 0 ) { - baseFormats[baseFormat].current = baseFormats[baseFormat].number - 1; - } - break; - case GLUT_KEY_RIGHT: - ++baseFormats[baseFormat].current; - if ( baseFormats[baseFormat].current > baseFormats[baseFormat].number - 1 ) { - baseFormats[baseFormat].current = 0; - } - break; - default: - break; - } - glutPostRedisplay(); -} - -static void -reshape( int w, int h ) -{ - winWidth = w; - winHeight = h; - /* No need to call glViewPort here since "draw" calls it! */ -} - -static void loadTexture( int width, int height, - const struct formatInfo *format ) -{ - int luminanceSize = 0; - int alphaSize = 0; - int rgbSize = 0; - GLenum textureFormat; - GLubyte *texImage, *p; - int elementsPerGroup, elementSize, groupSize, rowSize; - int i, j; - - switch ( format->baseFormat ) { - case GL_LUMINANCE: - luminanceSize = 1; - textureFormat = GL_LUMINANCE; - break; - case GL_INTENSITY: - luminanceSize = 1; - /* Note: format=GL_INTENSITY for glTexImage is not legal */ - textureFormat = GL_LUMINANCE; - break; - case GL_ALPHA: - alphaSize = 1; - textureFormat = GL_ALPHA; - break; - case GL_LUMINANCE_ALPHA: - luminanceSize = 1; - alphaSize = 1; - textureFormat = GL_LUMINANCE_ALPHA; - break; - case GL_RGB: - rgbSize = 3; - textureFormat = GL_RGB; - break; - case GL_RGBA: - rgbSize = 3; - alphaSize = 1; - textureFormat = GL_RGBA; - break; - default: - fprintf(stderr, "bad internal format info\n"); - return; - } - - elementsPerGroup = luminanceSize + alphaSize + rgbSize; - elementSize = sizeof(GLubyte); - groupSize = elementsPerGroup * elementSize; - rowSize = width * groupSize; - - if ( (texImage = (GLubyte *) malloc( height * rowSize ) ) == NULL ) { - fprintf( stderr, "texture malloc failed\n" ); - return; - } - - for ( i = 0 ; i < height ; i++ ) - { - p = texImage + i * rowSize; - - for ( j = 0 ; j < width ; j++ ) - { - if ( luminanceSize > 0 ) - { - /** - ** +-----+-----+ - ** | | | - ** | W | LG | - ** | | | - ** +-----+-----+ - ** | | | - ** | DG | B | - ** | | | - ** +-----+-----+ - **/ - if ( i > height / 2 ) { - if ( j < width / 2 ) { - p[0] = 0xff; - } else { - p[0] = 0xaa; - } - } else { - if ( j < width / 2 ) { - p[0] = 0x55; - } else { - p[0] = 0x00; - } - } - p += elementSize; - } - - if ( rgbSize > 0 ) - { - /** - ** +-----+-----+ - ** | | | - ** | R | G | - ** | | | - ** +-----+-----+ - ** | | | - ** | Y | B | - ** | | | - ** +-----+-----+ - **/ - if ( i > height / 2 ) { - if ( j < width / 2 ) { - p[0] = 0xff; - p[1] = 0x00; - p[2] = 0x00; - } else { - p[0] = 0x00; - p[1] = 0xff; - p[2] = 0x00; - } - } else { - if ( j < width / 2 ) { - p[0] = 0xff; - p[1] = 0xff; - p[2] = 0x00; - } else { - p[0] = 0x00; - p[1] = 0x00; - p[2] = 0xff; - } - } - p += 3 * elementSize; - } - - if ( alphaSize > 0 ) - { - /** - ** +-----------+ - ** | W | - ** | +-----+ | - ** | | | | - ** | | B | | - ** | | | | - ** | +-----+ | - ** | | - ** +-----------+ - **/ - int i2 = i - height / 2; - int j2 = j - width / 2; - int h8 = height / 8; - int w8 = width / 8; - if ( -h8 <= i2 && i2 <= h8 && -w8 <= j2 && j2 <= w8 ) { - p[0] = 0x00; - } else if ( -2 * h8 <= i2 && i2 <= 2 * h8 && -2 * w8 <= j2 && j2 <= 2 * w8 ) { - p[0] = 0x55; - } else if ( -3 * h8 <= i2 && i2 <= 3 * h8 && -3 * w8 <= j2 && j2 <= 3 * w8 ) { - p[0] = 0xaa; - } else { - p[0] = 0xff; - } - p += elementSize; - } - } - } - - glTexImage2D( GL_TEXTURE_2D, 0, - format->internalFormat, width, height, 0, - textureFormat, GL_UNSIGNED_BYTE, texImage ); - - free( texImage ); -} - -static void drawCheck( int w, int h, const GLfloat lightCheck[4], - const GLfloat darkCheck[4] ) -{ - float dw = 2.0 / w; - float dh = 2.0 / h; - int i, j; - - for ( i = 0 ; i < w ; i++ ) { - GLfloat x0 = -1.0 + i * dw; - GLfloat x1 = x0 + dw; - - glBegin( GL_QUAD_STRIP ); - - for ( j = 0 ; j <= h ; j++ ) { - GLfloat y = -1.0 + j * dh; - - if ( (i ^ j) & 1 ) { - glColor4fv( lightCheck ); - } else { - glColor4fv( darkCheck ); - } - - glVertex2f( x0, y ); - glVertex2f( x1, y ); - } - - glEnd(); - } -} - -static const char *lookupFormat( GLint format ) -{ - switch ( format ) { - case GL_RGBA: - return "GL_RGBA"; - case GL_RGB: - return "GL_RGB"; - case GL_ALPHA: - return "GL_ALPHA"; - case GL_LUMINANCE: - return "GL_LUMINANCE"; - case GL_LUMINANCE_ALPHA: - return "GL_LUMINANCE_ALPHA"; - case GL_INTENSITY: - return "GL_INTENSITY"; - case GL_COLOR_INDEX: - return "GL_COLOR_INDEX"; - case GL_BGRA: - return "GL_BGRA"; - case GL_BGR: - return "GL_BGR"; - default: - return "unknown format"; - } -} - -static void drawSample( int x, int y, int w, int h, - const struct formatInfo *format, - const struct envModeInfo *envMode ) -{ - glViewport( x, y, w, h ); - glScissor( x, y, w, h ); - - glClearColor( 0.1, 0.1, 0.1, 1.0 ); - glClear( GL_COLOR_BUFFER_BIT ); - - begin2D( w, h ); - drawString( format->name, 10, h - 15, labelInfoColor ); - drawString( envMode->name, 10, 5, labelInfoColor ); - end2D(); - - glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, envMode->mode ); - glTexEnvfv( GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, envColors[envColor] ); - - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); - - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP ); - - loadTexture( textureWidth, textureHeight, format ); - - if ( drawBackground ) { - drawCheck( 15, 15, lightCheck, darkCheck ); - } - if ( drawBlended ) { - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); - glEnable( GL_BLEND ); - } - if ( drawSmooth ) { - glShadeModel( GL_SMOOTH ); - } - else { - glShadeModel( GL_FLAT ); - glColor4f(1, 1, 1, 1); - } - if ( drawTextured ) { - glEnable( GL_TEXTURE_2D ); - } - - /* - * if (drawSmooth) then draw quad which goes from purple at the - * bottom (100% alpha) to green at the top (50% alpha). - */ - glBegin( GL_QUADS ); - if ( drawSmooth ) glColor4f( 1.0, 0.0, 1.0, 1.0 ); - glTexCoord2f( 0.0, 0.0 ); - glVertex2f( -0.8, -0.8 ); - - if ( drawSmooth ) glColor4f( 1.0, 0.0, 1.0, 1.0 ); - glTexCoord2f( 1.0, 0.0 ); - glVertex2f( 0.8, -0.8 ); - - if ( drawSmooth ) glColor4f( 0.0, 1.0, 0.0, 0.5 ); - glTexCoord2f( 1.0, 1.0 ); - glVertex2f( 0.8, 0.8 ); - - if ( drawSmooth ) glColor4f( 0.0, 1.0, 0.0, 0.5 ); - glTexCoord2f( 0.0, 1.0 ); - glVertex2f( -0.8, 0.8 ); - glEnd(); - - glDisable( GL_BLEND ); - glShadeModel( GL_FLAT ); - glDisable( GL_TEXTURE_2D ); - - if ( envMode->mode == GL_DECAL && - (format->baseFormat == GL_ALPHA || - format->baseFormat == GL_LUMINANCE || - format->baseFormat == GL_LUMINANCE_ALPHA || - format->baseFormat == GL_INTENSITY)) { - /* undefined format/mode combination */ - begin2D( w, h ); - drawStringOutline( "UNDEFINED MODE", 15, h / 2, - labelLevelColor0, labelLevelColor1 ); - end2D(); - } - else if ( displayLevelInfo ) { - GLint width, height, border, format; - GLint redSize, greenSize, blueSize, alphaSize; - GLint luminanceSize, intensitySize; - char buf[255]; - - glGetTexLevelParameteriv( GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width ); - glGetTexLevelParameteriv( GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &height ); - glGetTexLevelParameteriv( GL_TEXTURE_2D, 0, GL_TEXTURE_BORDER, &border ); - glGetTexLevelParameteriv( GL_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &format ); - glGetTexLevelParameteriv( GL_TEXTURE_2D, 0, GL_TEXTURE_RED_SIZE, &redSize ); - glGetTexLevelParameteriv( GL_TEXTURE_2D, 0, GL_TEXTURE_GREEN_SIZE, &greenSize ); - glGetTexLevelParameteriv( GL_TEXTURE_2D, 0, GL_TEXTURE_BLUE_SIZE, &blueSize ); - glGetTexLevelParameteriv( GL_TEXTURE_2D, 0, GL_TEXTURE_ALPHA_SIZE, &alphaSize ); - glGetTexLevelParameteriv( GL_TEXTURE_2D, 0, GL_TEXTURE_LUMINANCE_SIZE, &luminanceSize ); - glGetTexLevelParameteriv( GL_TEXTURE_2D, 0, GL_TEXTURE_INTENSITY_SIZE, &intensitySize ); - - begin2D( w, h ); - sprintf( buf, "dimensions: %d x %d", width, height ); - drawStringOutline( buf, 15, h / 2 + 20, labelLevelColor0, labelLevelColor1 ); - - sprintf( buf, "border: %d", border ); - drawStringOutline( buf, 15, h / 2 + 10, labelLevelColor0, labelLevelColor1 ); - - sprintf( buf, "internal format:" ); - drawStringOutline( buf, 15, h / 2, labelLevelColor0, labelLevelColor1 ); - - sprintf( buf, " %s", lookupFormat( format ) ); - drawStringOutline( buf, 15, h / 2 - 10, labelLevelColor0, labelLevelColor1 ); - - sprintf( buf, "sizes:" ); - drawStringOutline( buf, 15, h / 2 - 20, labelLevelColor0, labelLevelColor1 ); - - sprintf( buf, " %d / %d / %d / %d / %d / %d", - redSize, greenSize, blueSize, alphaSize, - luminanceSize, intensitySize ); - drawStringOutline( buf, 15, h / 2 - 30, labelLevelColor0, labelLevelColor1 ); - - end2D(); - } -} - -static void display( void ) -{ - int numX = NUM_ENV_MODES, numY = NUM_BASE_FORMATS; - float xBase = (float) winWidth * 0.01; - float xOffset = (winWidth - xBase) / numX; - float xSize = max( xOffset - xBase, 1 ); - float yBase = (float) winHeight * 0.01; - float yOffset = (winHeight - yBase) / numY; - float ySize = max( yOffset - yBase, 1 ); - float x, y; - int i, j; - - glViewport( 0, 0, winWidth, winHeight ); - glDisable( GL_SCISSOR_TEST ); - glClearColor( 0.0, 0.0, 0.0, 0.0 ); - glClear( GL_COLOR_BUFFER_BIT ); - glEnable( GL_SCISSOR_TEST ); - - x = xBase; - y = (winHeight - 1) - yOffset; - - for ( i = 0 ; i < NUM_BASE_FORMATS ; i++ ) - { - struct formatInfo *format; - - if ( i == baseFormat ) { - labelInfoColor = labelColor1; - } else { - labelInfoColor = labelColor0; - } - - format = &baseFormats[i].format[baseFormats[i].current]; - - for ( j = 0 ; j < NUM_ENV_MODES ; j++ ) { - struct envModeInfo *envMode; - - envMode = &envModes[j]; - drawSample( x, y, xSize, ySize, format, envMode ); - x += xOffset; - } - - x = xBase; - y -= yOffset; - } - - if ( doubleBuffered ) { - glutSwapBuffers(); - } else { - glFlush(); - } - - checkErrors(); -} - -static void usage( char *name ) -{ - fprintf( stderr, "usage: %s [ options ]\n", name ); - fprintf( stderr, "\n" ); - fprintf( stderr, "options:\n" ); - fprintf( stderr, " -sb single buffered\n" ); - fprintf( stderr, " -db double buffered\n" ); - fprintf( stderr, " -info print OpenGL driver info\n" ); -} - -static void instructions( void ) -{ - fprintf( stderr, "texenv - texture environment and internal format test\n" ); - fprintf( stderr, "\n" ); - fprintf( stderr, " [c] - cycle through background colors\n" ); - fprintf( stderr, " [g] - toggle background\n" ); - fprintf( stderr, " [b] - toggle blend\n" ); - fprintf( stderr, " [s] - toggle smooth shading\n" ); - fprintf( stderr, " [t] - toggle texturing\n" ); - fprintf( stderr, " [i] - toggle information display\n" ); - fprintf( stderr, " up/down - select row\n" ); - fprintf( stderr, " left/right - change row's internal format\n" ); -} - -int main( int argc, char *argv[] ) -{ - GLboolean info = GL_FALSE; - int i; - - glutInit( &argc, argv ); - - for ( i = 1 ; i < argc ; i++ ) { - if ( !strcmp( "-sb", argv[i] ) ) { - doubleBuffered = GL_FALSE; - } else if ( !strcmp( "-db", argv[i] ) ) { - doubleBuffered = GL_TRUE; - } else if ( !strcmp( "-info", argv[i] ) ) { - info = GL_TRUE; - } else { - usage( argv[0] ); - exit( 1 ); - } - } - - if ( doubleBuffered ) { - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - } else { - glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE ); - } - - glutInitWindowSize( winWidth, winHeight ); - glutInitWindowPosition( 0, 0 ); - glutCreateWindow( "Texture Environment Test" ); - - initialize(); - instructions(); - - if ( info ) { - printf( "\n" ); - printf( "GL_RENDERER = %s\n", (char *) glGetString( GL_RENDERER ) ); - printf( "GL_VERSION = %s\n", (char *) glGetString( GL_VERSION ) ); - printf( "GL_VENDOR = %s\n", (char *) glGetString( GL_VENDOR ) ) ; - printf( "GL_EXTENSIONS = %s\n", (char *) glGetString( GL_EXTENSIONS ) ); - } - -#if GL_EXT_texture_env_add - if ( !glutExtensionSupported( "GL_EXT_texture_env_add" ) ) { - fprintf( stderr, "missing extension: GL_EXT_texture_env_add\n" ); - NUM_ENV_MODES--; - } -#endif - - glutDisplayFunc( display ); - glutReshapeFunc( reshape ); - glutKeyboardFunc( keyboard ); - glutSpecialFunc( special ); - glutMainLoop(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/texobj.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/texobj.c deleted file mode 100644 index 40bce6e569..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/texobj.c +++ /dev/null @@ -1,284 +0,0 @@ - -/* - * Example of using the 1.1 texture object functions. - * Also, this demo utilizes Mesa's fast texture map path. - * - * Brian Paul June 1996 This file is in the public domain. - */ - -#include -#include -#include -#include -#include -#include "GL/glut.h" - -static GLuint Window = 0; - -static GLuint TexObj[2]; -static GLfloat Angle = 0.0f; -static GLboolean UseObj = GL_FALSE; - - -#if defined(GL_VERSION_1_1) || defined(GL_VERSION_1_2) -# define TEXTURE_OBJECT 1 -#elif defined(GL_EXT_texture_object) -# define TEXTURE_OBJECT 1 -# define glBindTexture(A,B) glBindTextureEXT(A,B) -# define glGenTextures(A,B) glGenTexturesEXT(A,B) -# define glDeleteTextures(A,B) glDeleteTexturesEXT(A,B) -#endif - - - - -static void draw( void ) -{ - glClear( GL_COLOR_BUFFER_BIT ); - - glColor3f( 1.0, 1.0, 1.0 ); - - /* draw first polygon */ - glPushMatrix(); - glTranslatef( -1.0, 0.0, 0.0 ); - glRotatef( Angle, 0.0, 0.0, 1.0 ); - if (UseObj) { -#ifdef TEXTURE_OBJECT - glBindTexture( GL_TEXTURE_2D, TexObj[0] ); -#endif - } - else { - glCallList( TexObj[0] ); - } - glBegin( GL_POLYGON ); - glTexCoord2f( 0.0, 0.0 ); glVertex2f( -1.0, -1.0 ); - glTexCoord2f( 1.0, 0.0 ); glVertex2f( 1.0, -1.0 ); - glTexCoord2f( 1.0, 1.0 ); glVertex2f( 1.0, 1.0 ); - glTexCoord2f( 0.0, 1.0 ); glVertex2f( -1.0, 1.0 ); - glEnd(); - glPopMatrix(); - - /* draw second polygon */ - glPushMatrix(); - glTranslatef( 1.0, 0.0, 0.0 ); - glRotatef( Angle-90.0, 0.0, 1.0, 0.0 ); - if (UseObj) { -#ifdef TEXTURE_OBJECT - glBindTexture( GL_TEXTURE_2D, TexObj[1] ); -#endif - } - else { - glCallList( TexObj[1] ); - } - glBegin( GL_POLYGON ); - glTexCoord2f( 0.0, 0.0 ); glVertex2f( -1.0, -1.0 ); - glTexCoord2f( 1.0, 0.0 ); glVertex2f( 1.0, -1.0 ); - glTexCoord2f( 1.0, 1.0 ); glVertex2f( 1.0, 1.0 ); - glTexCoord2f( 0.0, 1.0 ); glVertex2f( -1.0, 1.0 ); - glEnd(); - glPopMatrix(); - - glutSwapBuffers(); -} - - - -static void idle( void ) -{ - static double t0 = -1.; - double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0; - if (t0 < 0.0) - t0 = t; - dt = t - t0; - t0 = t; - Angle += 120.0*dt; - glutPostRedisplay(); -} - - - -/* change view Angle, exit upon ESC */ -static void key(unsigned char k, int x, int y) -{ - (void) x; - (void) y; - switch (k) { - case 27: -#ifdef TEXTURE_OBJECT - glDeleteTextures( 2, TexObj ); -#endif - glutDestroyWindow(Window); - exit(0); - } -} - - - -/* new window size or exposure */ -static void reshape( int width, int height ) -{ - glViewport(0, 0, (GLint)width, (GLint)height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - /* glOrtho( -3.0, 3.0, -3.0, 3.0, -10.0, 10.0 );*/ - glFrustum( -2.0, 2.0, -2.0, 2.0, 6.0, 20.0 ); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -8.0 ); -} - - -static void init( void ) -{ - static int width=8, height=8; - static GLubyte tex1[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 1, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 1, 1, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 }; - - static GLubyte tex2[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 2, 0, 0, 0, - 0, 0, 2, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 2, 0, 0, 0, 0, - 0, 0, 2, 2, 2, 2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 }; - - GLubyte tex[64][3]; - GLint i, j; - - - glDisable( GL_DITHER ); - - /* Setup texturing */ - glEnable( GL_TEXTURE_2D ); - glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL ); - glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST ); - - - /* generate texture object IDs */ - if (UseObj) { -#ifdef TEXTURE_OBJECT - glGenTextures( 2, TexObj ); -#endif - } - else { - TexObj[0] = glGenLists(2); - TexObj[1] = TexObj[0]+1; - } - - /* setup first texture object */ - if (UseObj) { -#ifdef TEXTURE_OBJECT - glBindTexture( GL_TEXTURE_2D, TexObj[0] ); - assert(glIsTexture(TexObj[0])); -#endif - } - else { - glNewList( TexObj[0], GL_COMPILE ); - } - /* red on white */ - for (i=0;i -#include -#include -#include -#include - - -static float MinPeriod = 2.0; /* 2 seconds */ -static float Width = 400.0; -static float Height = 400.0; -static int Loops = 1; -static int Size = 50; -static int Texture = 0; - - - -static void Idle( void ) -{ - glutPostRedisplay(); -} - - -static void Display( void ) -{ - float x, y; - float xStep; - float yStep; - double t0, t1; - double triRate; - double pixelRate; - int triCount; - int i; - float red[3] = { 1.0, 0.0, 0.0 }; - float blue[3] = { 0.0, 0.0, 1.0 }; - - xStep = yStep = sqrt( 2.0 * Size ); - - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - triCount = 0; - t0 = glutGet(GLUT_ELAPSED_TIME) * 0.001; - if (Texture) { - float uStep = xStep / Width; - float vStep = yStep / Height; - float u, v; - for (i=0; i -#include -#include -#include - -#ifdef WIN32 -#include -#endif - -#include -#include "readtex.h" -#include "tunneldat.h" - -#ifdef XMESA -#include "GL/xmesa.h" -static int fullscreen = 1; -#endif - -static int WIDTH = 640; -static int HEIGHT = 480; - -static GLint T0 = 0; -static GLint Frames = 0; -static GLint NiceFog = 1; - -#define NUMBLOC 5 - -#ifndef M_PI -#define M_PI 3.1415926535 -#endif - -/* -extern int striplength_skin_13[]; -extern float stripdata_skin_13[]; - -extern int striplength_skin_12[]; -extern float stripdata_skin_12[]; - -extern int striplength_skin_11[]; -extern float stripdata_skin_11[]; - -extern int striplength_skin_9[]; -extern float stripdata_skin_9[]; -*/ - -static int win = 0; - -static float obs[3] = { 1000.0, 0.0, 2.0 }; -static float dir[3]; -static float v = 30.; -static float alpha = 90.0; -static float beta = 90.0; - -static int fog = 1; -static int bfcull = 1; -static int usetex = 1; -static int cstrip = 0; -static int help = 1; -static int joyavailable = 0; -static int joyactive = 0; - -static GLuint t1id, t2id; - -static void -inittextures(void) -{ - glGenTextures(1, &t1id); - glBindTexture(GL_TEXTURE_2D, t1id); - - if (!LoadRGBMipmaps("../images/tile.rgb", GL_RGB)) { - fprintf(stderr, "Error reading a texture.\n"); - exit(-1); - } - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR_MIPMAP_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - glGenTextures(1, &t2id); - glBindTexture(GL_TEXTURE_2D, t2id); - - if (!LoadRGBMipmaps("../images/bw.rgb", GL_RGB)) { - fprintf(stderr, "Error reading a texture.\n"); - exit(-1); - } - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR_MIPMAP_LINEAR); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); -} - -static void -drawobjs(const int *l, const float *f) -{ - int mend, j; - - if (cstrip) { - float r = 0.33, g = 0.33, b = 0.33; - - for (; (*l) != 0;) { - mend = *l++; - - r += 0.33; - if (r > 1.0) { - r = 0.33; - g += 0.33; - if (g > 1.0) { - g = 0.33; - b += 0.33; - if (b > 1.0) - b = 0.33; - } - } - - glColor3f(r, g, b); - glBegin(GL_TRIANGLE_STRIP); - for (j = 0; j < mend; j++) { - f += 4; - glTexCoord2fv(f); - f += 2; - glVertex3fv(f); - f += 3; - } - glEnd(); - } - } - else - for (; (*l) != 0;) { - mend = *l++; - - glBegin(GL_TRIANGLE_STRIP); - for (j = 0; j < mend; j++) { - glColor4fv(f); - f += 4; - glTexCoord2fv(f); - f += 2; - glVertex3fv(f); - f += 3; - } - glEnd(); - } -} - -static void -calcposobs(void) -{ - static double t0 = -1.; - double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0; - if (t0 < 0.0) - t0 = t; - dt = t - t0; - t0 = t; - - dir[0] = sin(alpha * M_PI / 180.0); - dir[1] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0); - dir[2] = cos(beta * M_PI / 180.0); - - if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5) - dir[0] = 0; - if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5) - dir[1] = 0; - if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5) - dir[2] = 0; - - obs[0] += v * dir[0] * dt; - obs[1] += v * dir[1] * dt; - obs[2] += v * dir[2] * dt; -} - -static void -special(int k, int x, int y) -{ - switch (k) { - case GLUT_KEY_LEFT: - alpha -= 2.0; - break; - case GLUT_KEY_RIGHT: - alpha += 2.0; - break; - case GLUT_KEY_DOWN: - beta -= 2.0; - break; - case GLUT_KEY_UP: - beta += 2.0; - break; - } -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: - exit(0); - break; - - case 'a': - v += 5.; - break; - case 'z': - v -= 5.; - break; - -#ifdef XMESA - case ' ': - fullscreen = (!fullscreen); - XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW); - break; -#endif - case 'j': - joyactive = (!joyactive); - break; - case 'h': - help = (!help); - break; - case 'f': - fog = (!fog); - break; - case 't': - usetex = (!usetex); - break; - case 'b': - if (bfcull) { - glDisable(GL_CULL_FACE); - bfcull = 0; - } - else { - glEnable(GL_CULL_FACE); - bfcull = 1; - } - break; - case 'm': - cstrip = (!cstrip); - break; - - case 'd': - fprintf(stderr, "Deleting textures...\n"); - glDeleteTextures(1, &t1id); - glDeleteTextures(1, &t2id); - fprintf(stderr, "Loading textures...\n"); - inittextures(); - fprintf(stderr, "Done.\n"); - break; - case 'n': - NiceFog = !NiceFog; - printf("NiceFog %d\n", NiceFog); - break; - } - glutPostRedisplay(); -} - -static void -reshape(int w, int h) -{ - WIDTH = w; - HEIGHT = h; - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(80.0, w / (float) h, 1.0, 50.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glViewport(0, 0, w, h); -} - -static void -printstring(void *font, char *string) -{ - int len, i; - - len = (int) strlen(string); - for (i = 0; i < len; i++) - glutBitmapCharacter(font, string[i]); -} - -static void -printhelp(void) -{ - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glColor4f(0.0, 0.0, 0.0, 0.5); - glRecti(40, 40, 600, 440); - - glColor3f(1.0, 0.0, 0.0); - glRasterPos2i(300, 420); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Help"); - - glRasterPos2i(60, 390); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "h - Toggle Help"); - glRasterPos2i(60, 360); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "t - Toggle Textures"); - glRasterPos2i(60, 330); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "f - Toggle Fog"); - glRasterPos2i(60, 300); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "m - Toggle strips"); - glRasterPos2i(60, 270); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "b - Toggle Back face culling"); - glRasterPos2i(60, 240); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Arrow Keys - Rotate"); - glRasterPos2i(60, 210); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "a - Increase velocity"); - glRasterPos2i(60, 180); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "z - Decrease velocity"); - - glRasterPos2i(60, 150); - if (joyavailable) - printstring(GLUT_BITMAP_TIMES_ROMAN_24, - "j - Toggle jostick control (Joystick control available)"); - else - printstring(GLUT_BITMAP_TIMES_ROMAN_24, - "(No Joystick control available)"); -} - -static void -dojoy(void) -{ -#ifdef WIN32 - static UINT max[2] = { 0, 0 }; - static UINT min[2] = { 0xffffffff, 0xffffffff }, center[2]; - MMRESULT res; - JOYINFO joy; - - res = joyGetPos(JOYSTICKID1, &joy); - - if (res == JOYERR_NOERROR) { - joyavailable = 1; - - if (max[0] < joy.wXpos) - max[0] = joy.wXpos; - if (min[0] > joy.wXpos) - min[0] = joy.wXpos; - center[0] = (max[0] + min[0]) / 2; - - if (max[1] < joy.wYpos) - max[1] = joy.wYpos; - if (min[1] > joy.wYpos) - min[1] = joy.wYpos; - center[1] = (max[1] + min[1]) / 2; - - if (joyactive) { - if (fabs(center[0] - (float) joy.wXpos) > 0.1 * (max[0] - min[0])) - alpha -= - 2.0 * (center[0] - (float) joy.wXpos) / (max[0] - min[0]); - if (fabs(center[1] - (float) joy.wYpos) > 0.1 * (max[1] - min[1])) - beta += 2.0 * (center[1] - (float) joy.wYpos) / (max[1] - min[1]); - - if (joy.wButtons & JOY_BUTTON1) - v += 0.01; - if (joy.wButtons & JOY_BUTTON2) - v -= 0.01; - } - } - else - joyavailable = 0; -#endif -} - -static void -draw(void) -{ - static char frbuf[80] = ""; - int i; - float base, offset; - - if (NiceFog) - glHint(GL_FOG_HINT, GL_NICEST); - else - glHint(GL_FOG_HINT, GL_DONT_CARE); - - dojoy(); - - glClear(GL_COLOR_BUFFER_BIT); - - if (usetex) - glEnable(GL_TEXTURE_2D); - else - glDisable(GL_TEXTURE_2D); - - if (fog) - glEnable(GL_FOG); - else - glDisable(GL_FOG); - - glShadeModel(GL_SMOOTH); - - glPushMatrix(); - calcposobs(); - gluLookAt(obs[0], obs[1], obs[2], - obs[0] + dir[0], obs[1] + dir[1], obs[2] + dir[2], - 0.0, 0.0, 1.0); - - if (dir[0] > 0) { - offset = 8.0; - base = obs[0] - fmod(obs[0], 8.0); - } - else { - offset = -8.0; - base = obs[0] + (8.0 - fmod(obs[0], 8.0)); - } - - glPushMatrix(); - glTranslatef(base - offset / 2.0, 0.0, 0.0); - for (i = 0; i < NUMBLOC; i++) { - glTranslatef(offset, 0.0, 0.0); - glBindTexture(GL_TEXTURE_2D, t1id); - drawobjs(striplength_skin_11, stripdata_skin_11); - glBindTexture(GL_TEXTURE_2D, t2id); - drawobjs(striplength_skin_12, stripdata_skin_12); - drawobjs(striplength_skin_9, stripdata_skin_9); - drawobjs(striplength_skin_13, stripdata_skin_13); - } - glPopMatrix(); - glPopMatrix(); - - glDisable(GL_TEXTURE_2D); - glDisable(GL_FOG); - glShadeModel(GL_FLAT); - - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); - glOrtho(-0.5, 639.5, -0.5, 479.5, -1.0, 1.0); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - glColor3f(1.0, 0.0, 0.0); - glRasterPos2i(10, 10); - printstring(GLUT_BITMAP_HELVETICA_18, frbuf); - glRasterPos2i(350, 470); - printstring(GLUT_BITMAP_HELVETICA_10, - "Tunnel V1.5 Written by David Bucciarelli (tech.hmw@plus.it)"); - - if (help) - printhelp(); - - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - glMatrixMode(GL_MODELVIEW); - - glutSwapBuffers(); - - Frames++; - { - GLint t = glutGet(GLUT_ELAPSED_TIME); - if (t - T0 >= 2000) { - GLfloat seconds = (t - T0) / 1000.0; - GLfloat fps = Frames / seconds; - sprintf(frbuf, "Frame rate: %f", fps); - T0 = t; - Frames = 0; - } - } -} - -static void -idle(void) -{ - glutPostRedisplay(); -} - - - -int -main(int ac, char **av) -{ - float fogcolor[4] = { 0.7, 0.7, 0.7, 1.0 }; - - fprintf(stderr, - "Tunnel V1.5\nWritten by David Bucciarelli (tech.hmw@plus.it)\n"); - - glutInitWindowPosition(0, 0); - glutInitWindowSize(WIDTH, HEIGHT); - glutInit(&ac, av); - - glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); - - if (!(win = glutCreateWindow("Tunnel"))) { - fprintf(stderr, "Error, couldn't open window\n"); - return -1; - } - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(80.0, WIDTH / (float) HEIGHT, 1.0, 50.0); - - glMatrixMode(GL_MODELVIEW); - - glShadeModel(GL_SMOOTH); - glDisable(GL_DEPTH_TEST); - glEnable(GL_CULL_FACE); - glEnable(GL_TEXTURE_2D); - - glEnable(GL_FOG); - glFogi(GL_FOG_MODE, GL_EXP2); - glFogfv(GL_FOG_COLOR, fogcolor); - - glFogf(GL_FOG_DENSITY, 0.06); - glHint(GL_FOG_HINT, GL_NICEST); - - inittextures(); - - glClearColor(fogcolor[0], fogcolor[1], fogcolor[2], fogcolor[3]); - glClear(GL_COLOR_BUFFER_BIT); - - calcposobs(); - - glutReshapeFunc(reshape); - glutDisplayFunc(draw); - glutKeyboardFunc(key); - glutSpecialFunc(special); - glutIdleFunc(idle); - - glEnable(GL_BLEND); - /*glBlendFunc(GL_SRC_ALPHA_SATURATE,GL_ONE); */ - /*glEnable(GL_POLYGON_SMOOTH); */ - - glutMainLoop(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/tunnel2.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/tunnel2.c deleted file mode 100644 index 75a199af5d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/tunnel2.c +++ /dev/null @@ -1,605 +0,0 @@ -/* - * This program is under the GNU GPL. - * Use at your own risk. - * - * You need TWO Voodoo Graphics boards in order to run - * this demo ! - * - * written by David Bucciarelli (tech.hmw@plus.it) - * Humanware s.r.l. - */ - -#include -#include -#include -#include - -#ifdef WIN32 -#include -#endif - -#include -#include "readtex.h" -#include "tunneldat.h" - -#ifdef FX -#endif - -#ifdef XMESA -#include "GL/xmesa.h" -static int fullscreen = 1; -#endif - -#ifdef FX -GLint fxMesaSelectCurrentBoard(int); -#endif - -static int WIDTHC0 = 640; -static int HEIGHTC0 = 480; - -static int WIDTHC1 = 640; -static int HEIGHTC1 = 480; - -static GLint T0 = 0; -static GLint Frames = 0; - -#define NUMBLOC 5 - -#ifndef M_PI -#define M_PI 3.1415926535 -#endif - -static float obs[3] = { 1000.0, 0.0, 2.0 }; -static float dir[3]; -static float v = 30.; -static float alpha = 90.0; -static float beta = 90.0; - -static int fog = 1; -static int bfcull = 1; -static int usetex = 1; -static int cstrip = 0; -static int help = 1; -static int joyavailable = 0; -static int joyactive = 0; - -static int channel[2]; - -static GLuint t1id, t2id; - -static void -inittextures(void) -{ - glGenTextures(1, &t1id); - glBindTexture(GL_TEXTURE_2D, t1id); - - if (!LoadRGBMipmaps("../images/tile.rgb", GL_RGB)) { - fprintf(stderr, "Error reading a texture.\n"); - exit(-1); - } - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR_MIPMAP_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - glGenTextures(1, &t2id); - glBindTexture(GL_TEXTURE_2D, t2id); - - if (!LoadRGBMipmaps("../images/bw.rgb", GL_RGB)) { - fprintf(stderr, "Error reading a texture.\n"); - exit(-1); - } - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR_MIPMAP_LINEAR); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); -} - -static void -drawobjs(const int *l, const float *f) -{ - int mend, j; - - if (cstrip) { - float r = 0.33, g = 0.33, b = 0.33; - - for (; (*l) != 0;) { - mend = *l++; - - r += 0.33; - if (r > 1.0) { - r = 0.33; - g += 0.33; - if (g > 1.0) { - g = 0.33; - b += 0.33; - if (b > 1.0) - b = 0.33; - } - } - - glColor3f(r, g, b); - glBegin(GL_TRIANGLE_STRIP); - for (j = 0; j < mend; j++) { - f += 4; - glTexCoord2fv(f); - f += 2; - glVertex3fv(f); - f += 3; - } - glEnd(); - } - } - else - for (; (*l) != 0;) { - mend = *l++; - - glBegin(GL_TRIANGLE_STRIP); - for (j = 0; j < mend; j++) { - glColor4fv(f); - f += 4; - glTexCoord2fv(f); - f += 2; - glVertex3fv(f); - f += 3; - } - glEnd(); - } -} - -static void -calcposobs(void) -{ - static double t0 = -1.; - double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0; - if (t0 < 0.0) - t0 = t; - dt = t - t0; - t0 = t; - - dir[0] = sin(alpha * M_PI / 180.0); - dir[1] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0); - dir[2] = cos(beta * M_PI / 180.0); - - if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5) - dir[0] = 0; - if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5) - dir[1] = 0; - if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5) - dir[2] = 0; - - obs[0] += v * dir[0] * dt; - obs[1] += v * dir[1] * dt; - obs[2] += v * dir[2] * dt; -} - -static void -special(int k, int x, int y) -{ - switch (k) { - case GLUT_KEY_LEFT: - alpha -= 2.0; - break; - case GLUT_KEY_RIGHT: - alpha += 2.0; - break; - case GLUT_KEY_DOWN: - beta -= 2.0; - break; - case GLUT_KEY_UP: - beta += 2.0; - break; - } -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: - exit(0); - break; - - case 'a': - v += 5.; - break; - case 'z': - v -= 5.; - break; - -#ifdef XMESA - case ' ': - fullscreen = (!fullscreen); - - glutSetWindow(channel[0]); - XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW); - - glutSetWindow(channel[1]); - XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW); - break; -#endif - - case 'j': - joyactive = (!joyactive); - break; - case 'h': - help = (!help); - break; - case 'f': - fog = (!fog); - break; - case 't': - usetex = (!usetex); - break; - case 'b': - if (bfcull) { - glDisable(GL_CULL_FACE); - bfcull = 0; - } - else { - glEnable(GL_CULL_FACE); - bfcull = 1; - } - break; - case 'm': - cstrip = (!cstrip); - break; - - case 'd': - fprintf(stderr, "Deleting textures...\n"); - glDeleteTextures(1, &t1id); - glDeleteTextures(1, &t2id); - fprintf(stderr, "Loading textures...\n"); - inittextures(); - fprintf(stderr, "Done.\n"); - break; - } -} - -static void -reshapechannel0(int w, int h) -{ - float ratio; - - WIDTHC0 = w; - HEIGHTC0 = h; - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - ratio = 0.5f * w / (float) h; - - glFrustum(-2.0, 0.0, -1.0 * ratio, 1.0 * ratio, 1.0, 60.0); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glViewport(0, 0, w, h); -} - -static void -reshapechannel1(int w, int h) -{ - float ratio; - - WIDTHC1 = w; - HEIGHTC1 = h; - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - ratio = 0.5f * w / (float) h; - - glFrustum(0.0, 2.0, -1.0 * ratio, 1.0 * ratio, 1.0, 60.0); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glViewport(0, 0, w, h); -} - -static void -printstring(void *font, char *string) -{ - int len, i; - - len = (int) strlen(string); - for (i = 0; i < len; i++) - glutBitmapCharacter(font, string[i]); -} - -static void -printhelp(void) -{ - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glColor4f(0.0, 0.0, 0.0, 0.5); - glRecti(40, 40, 600, 440); - - glColor3f(1.0, 0.0, 0.0); - glRasterPos2i(300, 420); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Help"); - - glRasterPos2i(60, 390); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "h - Toggle Help"); - glRasterPos2i(60, 360); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "t - Toggle Textures"); - glRasterPos2i(60, 330); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "f - Toggle Fog"); - glRasterPos2i(60, 300); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "m - Toggle strips"); - glRasterPos2i(60, 270); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "b - Toggle Back face culling"); - glRasterPos2i(60, 240); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Arrow Keys - Rotate"); - glRasterPos2i(60, 210); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "a - Increase velocity"); - glRasterPos2i(60, 180); - printstring(GLUT_BITMAP_TIMES_ROMAN_24, "z - Decrease velocity"); - - glRasterPos2i(60, 150); - if (joyavailable) - printstring(GLUT_BITMAP_TIMES_ROMAN_24, - "j - Toggle jostick control (Joystick control available)"); - else - printstring(GLUT_BITMAP_TIMES_ROMAN_24, - "(No Joystick control available)"); -} - -static void -dojoy(void) -{ -#ifdef WIN32 - static UINT max[2] = { 0, 0 }; - static UINT min[2] = { 0xffffffff, 0xffffffff }, center[2]; - MMRESULT res; - JOYINFO joy; - - res = joyGetPos(JOYSTICKID1, &joy); - - if (res == JOYERR_NOERROR) { - joyavailable = 1; - - if (max[0] < joy.wXpos) - max[0] = joy.wXpos; - if (min[0] > joy.wXpos) - min[0] = joy.wXpos; - center[0] = (max[0] + min[0]) / 2; - - if (max[1] < joy.wYpos) - max[1] = joy.wYpos; - if (min[1] > joy.wYpos) - min[1] = joy.wYpos; - center[1] = (max[1] + min[1]) / 2; - - if (joyactive) { - if (fabs(center[0] - (float) joy.wXpos) > 0.1 * (max[0] - min[0])) - alpha -= - 2.0 * (center[0] - (float) joy.wXpos) / (max[0] - min[0]); - if (fabs(center[1] - (float) joy.wYpos) > 0.1 * (max[1] - min[1])) - beta += 2.0 * (center[1] - (float) joy.wYpos) / (max[1] - min[1]); - - if (joy.wButtons & JOY_BUTTON1) - v += 0.01; - if (joy.wButtons & JOY_BUTTON2) - v -= 0.01; - } - } - else - joyavailable = 0; -#endif -} - -static void -draw(void) -{ - static char frbuf[80] = ""; - int i; - float base, offset; - - dojoy(); - - glClear(GL_COLOR_BUFFER_BIT); - - glClear(GL_COLOR_BUFFER_BIT); - - if (usetex) - glEnable(GL_TEXTURE_2D); - else - glDisable(GL_TEXTURE_2D); - - if (fog) - glEnable(GL_FOG); - else - glDisable(GL_FOG); - - glShadeModel(GL_SMOOTH); - - glPushMatrix(); - calcposobs(); - gluLookAt(obs[0], obs[1], obs[2], - obs[0] + dir[0], obs[1] + dir[1], obs[2] + dir[2], - 0.0, 0.0, 1.0); - - if (dir[0] > 0) { - offset = 8.0; - base = obs[0] - fmod(obs[0], 8.0); - } - else { - offset = -8.0; - base = obs[0] + (8.0 - fmod(obs[0], 8.0)); - } - - glPushMatrix(); - glTranslatef(base - offset / 2.0, 0.0, 0.0); - for (i = 0; i < NUMBLOC; i++) { - glTranslatef(offset, 0.0, 0.0); - glBindTexture(GL_TEXTURE_2D, t1id); - drawobjs(striplength_skin_11, stripdata_skin_11); - glBindTexture(GL_TEXTURE_2D, t2id); - drawobjs(striplength_skin_12, stripdata_skin_12); - drawobjs(striplength_skin_9, stripdata_skin_9); - drawobjs(striplength_skin_13, stripdata_skin_13); - } - glPopMatrix(); - glPopMatrix(); - - glDisable(GL_TEXTURE_2D); - glDisable(GL_FOG); - glShadeModel(GL_FLAT); - - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); - glOrtho(-0.5, 639.5, -0.5, 479.5, -1.0, 1.0); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - glColor3f(1.0, 0.0, 0.0); - glRasterPos2i(10, 10); - printstring(GLUT_BITMAP_HELVETICA_18, frbuf); - glRasterPos2i(350, 470); - printstring(GLUT_BITMAP_HELVETICA_10, - "Tunnel2 V1.0 Written by David Bucciarelli (tech.hmw@plus.it)"); - - if (help) - printhelp(); - - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - glMatrixMode(GL_MODELVIEW); - - Frames++; - { - GLint t = glutGet(GLUT_ELAPSED_TIME); - if (t - T0 >= 2000) { - GLfloat seconds = (t - T0) / 1000.0; - GLfloat fps = Frames / seconds; - sprintf(frbuf, "Frame rate: %f", fps); - T0 = t; - Frames = 0; - } - } -} - -static void -drawchannel0(void) -{ - glutSetWindow(channel[0]); - draw(); - glutSwapBuffers(); -} - -static void -drawchannel1(void) -{ - glutSetWindow(channel[1]); - draw(); - glutSwapBuffers(); -} - -static void -drawall(void) -{ - glutSetWindow(channel[0]); - draw(); - glutSetWindow(channel[1]); - draw(); - - glutSetWindow(channel[0]); - glutSwapBuffers(); - glutSetWindow(channel[1]); - glutSwapBuffers(); -} - -static void -init(void) -{ - float fogcolor[4] = { 0.7, 0.7, 0.7, 1.0 }; - - glShadeModel(GL_SMOOTH); - glDisable(GL_DEPTH_TEST); - glEnable(GL_CULL_FACE); - glEnable(GL_TEXTURE_2D); - - glEnable(GL_FOG); - glFogi(GL_FOG_MODE, GL_EXP2); - glFogfv(GL_FOG_COLOR, fogcolor); - - glFogf(GL_FOG_DENSITY, 0.06); - glHint(GL_FOG_HINT, GL_NICEST); - - glEnable(GL_BLEND); - /* - glBlendFunc(GL_SRC_ALPHA_SATURATE, GL_ONE); - glEnable(GL_POLYGON_SMOOTH); - */ - - glClearColor(fogcolor[0], fogcolor[1], fogcolor[2], fogcolor[3]); - glClear(GL_COLOR_BUFFER_BIT); -} - -int -main(int ac, char **av) -{ - fprintf(stderr, - "Tunnel2 V1.0\nWritten by David Bucciarelli (tech.hmw@plus.it)\n"); - - glutInitWindowPosition(0, 0); - glutInitWindowSize(WIDTHC0, HEIGHTC0); - glutInit(&ac, av); - - glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); - -#ifdef FX - if (fxMesaSelectCurrentBoard(0) < 0) { - fprintf(stderr, "The first Voodoo Graphics board is missing !?!?\n"); - return -1; - } -#endif - if (!(channel[0] = glutCreateWindow("Channel 0"))) { - fprintf(stderr, "Error, couldn't open window\n"); - return -1; - } - - reshapechannel0(WIDTHC0, HEIGHTC0); - init(); - inittextures(); - glutDisplayFunc(drawchannel0); - glutReshapeFunc(reshapechannel0); - glutKeyboardFunc(key); - glutSpecialFunc(special); - -#ifdef FX - if (fxMesaSelectCurrentBoard(1) < 0) { - fprintf(stderr, "The second Voodoo Graphics board is missing !\n"); - exit(-1); - } -#endif - glutInitWindowPosition(WIDTHC0, 0); - glutInitWindowSize(WIDTHC1, HEIGHTC1); - if (!(channel[1] = glutCreateWindow("Channel 1"))) { - fprintf(stderr, "Error, couldn't open window\n"); - exit(-1); - } - - reshapechannel1(WIDTHC1, HEIGHTC1); - init(); - inittextures(); - glutDisplayFunc(drawchannel1); - glutReshapeFunc(reshapechannel1); - glutKeyboardFunc(key); - glutSpecialFunc(special); - - glutIdleFunc(drawall); - - calcposobs(); - - glutMainLoop(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/tunneldat.h b/nx-X11/extras/Mesa_6.4.2/progs/demos/tunneldat.h deleted file mode 100644 index af1e52e1f1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/tunneldat.h +++ /dev/null @@ -1,395 +0,0 @@ -/* Object: skin_13 */ - -#if defined(_MSC_VER) && defined(_WIN32) -#pragma warning( disable : 4305 ) /* 'initializing' : truncation from 'const double' to 'float' */ -#endif - -static const int striplength_skin_13[] = { - 10, 7, 3, 5, 5, 4, 4, 4, 4, 5, 3, 4, 5, 4, 4, 4, 4, 4, 4, 6, - 6, 3, 6, 3, 3, 3, 3, 0 -}; - -static const float stripdata_skin_13[] = { - 0.415686, 0.415686, 0.415686, 1.000000, 0.000000, 1.500000, 2.000000, - 4.000000, 0.000000, 0.341176, 0.341176, 0.341176, 1.000000, -0.500000, - 1.500000, 4.000000, 4.000000, 0.000000, 0.545098, 0.545098, 0.545098, - 1.000000, 0.000000, 1.000000, 2.000000, 4.000000, 2.000000, 0.435294, - 0.435294, 0.435294, 1.000000, -0.500000, 1.000000, 4.000000, 4.000000, - 2.000000, 0.517647, 0.517647, 0.517647, 1.000000, 0.000000, 0.500000, - 2.000000, 4.000000, 4.000000, 0.450980, 0.450980, 0.450980, 1.000000, - -0.500000, 0.500000, 4.000000, 4.000000, 4.000000, 0.427451, 0.427451, - 0.427451, 1.000000, 0.000000, 0.000000, 2.000000, 4.000000, 6.000000, - 0.388235, 0.388235, 0.388235, 1.000000, -0.500000, 0.000000, 4.000000, - 4.000000, 6.000000, 0.356863, 0.356863, 0.356863, 1.000000, 0.000000, - -0.500000, 2.000000, 4.000000, 8.000000, 0.333333, 0.333333, 0.333333, - 1.000000, -0.500000, -0.500000, 4.000000, 4.000000, 8.000000, - 0.435294, 0.435294, 0.435294, 1.000000, 1.500000, 1.000000, -4.000000, - 4.000000, 2.000000, 0.415686, 0.415686, 0.415686, 1.000000, 1.000000, - 1.500000, -2.000000, 4.000000, 0.000000, 0.545098, 0.545098, 0.545098, - 1.000000, 1.000000, 1.000000, -2.000000, 4.000000, 2.000000, 0.450980, - 0.450980, 0.450980, 1.000000, 0.500000, 1.500000, 0.000000, 4.000000, - 0.000000, 0.600000, 0.600000, 0.600000, 1.000000, 0.500000, 1.000000, - 0.000000, 4.000000, 2.000000, 0.415686, 0.415686, 0.415686, 1.000000, - 0.000000, 1.500000, 2.000000, 4.000000, 0.000000, 0.545098, 0.545098, - 0.545098, 1.000000, 0.000000, 1.000000, 2.000000, 4.000000, 2.000000, - 0.435294, 0.435294, 0.435294, 1.000000, 1.500000, 1.000000, -4.000000, - 4.000000, 2.000000, 0.341176, 0.341176, 0.341176, 1.000000, 1.500000, - 1.500000, -4.000000, 4.000000, 0.000000, 0.415686, 0.415686, 0.415686, - 1.000000, 1.000000, 1.500000, -2.000000, 4.000000, 0.000000, - 0.356863, 0.356863, 0.356863, 1.000000, 0.000000, -0.500000, 2.000000, - 4.000000, 8.000000, 0.364706, 0.364706, 0.364706, 1.000000, 0.500000, - -0.500000, 0.000000, 4.000000, 8.000000, 0.427451, 0.427451, 0.427451, - 1.000000, 0.000000, 0.000000, 2.000000, 4.000000, 6.000000, 0.415686, - 0.415686, 0.415686, 1.000000, 0.395020, -0.133318, 0.420032, 4.000000, - 6.533272, 0.423529, 0.423529, 0.423529, 1.000000, 0.388550, -0.103582, - 0.445932, 4.000000, 6.414327, - 0.423529, 0.423529, 0.423529, 1.000000, 0.388550, -0.103582, 0.445932, - 4.000000, 6.414327, 0.427451, 0.427451, 0.427451, 1.000000, 0.383423, - -0.069344, 0.466541, 4.000000, 6.277375, 0.427451, 0.427451, 0.427451, - 1.000000, 0.000000, 0.000000, 2.000000, 4.000000, 6.000000, 0.435294, - 0.435294, 0.435294, 1.000000, 0.380371, -0.034595, 0.478689, 4.000000, - 6.138380, 0.439216, 0.439216, 0.439216, 1.000000, 0.379272, 0.000000, - 0.482673, 4.000000, 6.000000, - 0.407843, 0.407843, 0.407843, 1.000000, 0.414673, -0.191394, 0.341301, - 4.000000, 6.765576, 0.411765, 0.411765, 0.411765, 1.000000, 0.403687, - -0.162957, 0.385368, 4.000000, 6.651829, 0.364706, 0.364706, 0.364706, - 1.000000, 0.500000, -0.500000, 0.000000, 4.000000, 8.000000, 0.415686, - 0.415686, 0.415686, 1.000000, 0.395020, -0.133318, 0.420032, 4.000000, - 6.533272, - 0.400000, 0.400000, 0.400000, 1.000000, 0.438232, -0.232438, 0.247284, - 4.000000, 6.929754, 0.403922, 0.403922, 0.403922, 1.000000, 0.425171, - -0.212276, 0.299425, 4.000000, 6.849104, 0.364706, 0.364706, 0.364706, - 1.000000, 0.500000, -0.500000, 0.000000, 4.000000, 8.000000, 0.407843, - 0.407843, 0.407843, 1.000000, 0.414673, -0.191394, 0.341301, 4.000000, - 6.765576, - 0.396078, 0.396078, 0.396078, 1.000000, 0.467285, -0.260554, 0.130636, - 4.000000, 7.042214, 0.400000, 0.400000, 0.400000, 1.000000, 0.453857, - -0.250068, 0.184711, 4.000000, 7.000273, 0.364706, 0.364706, 0.364706, - 1.000000, 0.500000, -0.500000, 0.000000, 4.000000, 8.000000, 0.400000, - 0.400000, 0.400000, 1.000000, 0.438232, -0.232438, 0.247284, 4.000000, - 6.929754, - 0.396078, 0.396078, 0.396078, 1.000000, 0.500000, -0.270672, 0.000000, - 4.000000, 7.082688, 0.396078, 0.396078, 0.396078, 1.000000, 0.482788, - -0.267902, 0.068730, 4.000000, 7.071609, 0.364706, 0.364706, 0.364706, - 1.000000, 0.500000, -0.500000, 0.000000, 4.000000, 8.000000, 0.396078, - 0.396078, 0.396078, 1.000000, 0.467285, -0.260554, 0.130636, 4.000000, - 7.042214, - 0.439216, 0.439216, 0.439216, 1.000000, 0.379272, 0.000000, 0.482673, - 4.000000, 6.000000, 0.474510, 0.474510, 0.474510, 1.000000, 0.379272, - 0.180448, 0.482673, 4.000000, 5.278208, 0.517647, 0.517647, 0.517647, - 1.000000, 0.000000, 0.500000, 2.000000, 4.000000, 4.000000, 0.513726, - 0.513726, 0.513726, 1.000000, 0.379272, 0.360896, 0.482673, 4.000000, - 4.556417, 0.545098, 0.545098, 0.545098, 1.000000, 0.379272, 0.500000, - 0.482673, 4.000000, 4.000000, - 0.545098, 0.545098, 0.545098, 1.000000, 0.379272, 0.500000, 0.482673, - 4.000000, 4.000000, 0.545098, 0.545098, 0.545098, 1.000000, 0.000000, - 1.000000, 2.000000, 4.000000, 2.000000, 0.517647, 0.517647, 0.517647, - 1.000000, 0.000000, 0.500000, 2.000000, 4.000000, 4.000000, - 0.600000, 0.600000, 0.600000, 1.000000, 0.500000, 1.000000, 0.000000, - 4.000000, 2.000000, 0.545098, 0.545098, 0.545098, 1.000000, 0.000000, - 1.000000, 2.000000, 4.000000, 2.000000, 0.552941, 0.552941, 0.552941, - 1.000000, 0.379272, 0.541344, 0.482673, 4.000000, 3.834625, 0.545098, - 0.545098, 0.545098, 1.000000, 0.379272, 0.500000, 0.482673, 4.000000, - 4.000000, - 0.552941, 0.552941, 0.552941, 1.000000, 0.379272, 0.541344, 0.482673, - 4.000000, 3.834625, 0.556863, 0.556863, 0.556863, 1.000000, 0.459717, - 0.541344, 0.160891, 4.000000, 3.834625, 0.600000, 0.600000, 0.600000, - 1.000000, 0.500000, 1.000000, 0.000000, 4.000000, 2.000000, 0.556863, - 0.556863, 0.556863, 1.000000, 0.500000, 0.541344, 0.000000, 4.000000, - 3.834625, 0.556863, 0.556863, 0.556863, 1.000000, 0.540283, 0.541344, - -0.160891, 4.000000, 3.834625, - 0.396078, 0.396078, 0.396078, 1.000000, 0.517212, -0.267902, -0.068730, - 4.000000, 7.071609, 0.396078, 0.396078, 0.396078, 1.000000, 0.500000, - -0.270672, 0.000000, 4.000000, 7.082688, 0.356863, 0.356863, 0.356863, - 1.000000, 1.000000, -0.500000, -2.000000, 4.000000, 8.000000, 0.364706, - 0.364706, 0.364706, 1.000000, 0.500000, -0.500000, 0.000000, 4.000000, - 8.000000, - 0.400000, 0.400000, 0.400000, 1.000000, 0.546143, -0.250068, -0.184711, - 4.000000, 7.000273, 0.396078, 0.396078, 0.396078, 1.000000, 0.532715, - -0.260554, -0.130636, 4.000000, 7.042214, 0.356863, 0.356863, 0.356863, - 1.000000, 1.000000, -0.500000, -2.000000, 4.000000, 8.000000, 0.396078, - 0.396078, 0.396078, 1.000000, 0.517212, -0.267902, -0.068730, 4.000000, - 7.071609, - 0.403922, 0.403922, 0.403922, 1.000000, 0.574829, -0.212276, -0.299425, - 4.000000, 6.849104, 0.400000, 0.400000, 0.400000, 1.000000, 0.561768, - -0.232438, -0.247284, 4.000000, 6.929754, 0.356863, 0.356863, 0.356863, - 1.000000, 1.000000, -0.500000, -2.000000, 4.000000, 8.000000, 0.400000, - 0.400000, 0.400000, 1.000000, 0.546143, -0.250068, -0.184711, 4.000000, - 7.000273, - 0.411765, 0.411765, 0.411765, 1.000000, 0.596313, -0.162957, -0.385368, - 4.000000, 6.651829, 0.407843, 0.407843, 0.407843, 1.000000, 0.585327, - -0.191394, -0.341301, 4.000000, 6.765576, 0.356863, 0.356863, 0.356863, - 1.000000, 1.000000, -0.500000, -2.000000, 4.000000, 8.000000, 0.403922, - 0.403922, 0.403922, 1.000000, 0.574829, -0.212276, -0.299425, 4.000000, - 6.849104, - 0.423529, 0.423529, 0.423529, 1.000000, 0.611450, -0.103582, -0.445931, - 4.000000, 6.414327, 0.415686, 0.415686, 0.415686, 1.000000, 0.604980, - -0.133318, -0.420033, 4.000000, 6.533272, 0.356863, 0.356863, 0.356863, - 1.000000, 1.000000, -0.500000, -2.000000, 4.000000, 8.000000, 0.411765, - 0.411765, 0.411765, 1.000000, 0.596313, -0.162957, -0.385368, 4.000000, - 6.651829, - 0.435294, 0.435294, 0.435294, 1.000000, 0.619629, -0.034595, -0.478689, - 4.000000, 6.138380, 0.427451, 0.427451, 0.427451, 1.000000, 0.616577, - -0.069344, -0.466541, 4.000000, 6.277375, 0.356863, 0.356863, 0.356863, - 1.000000, 1.000000, -0.500000, -2.000000, 4.000000, 8.000000, 0.423529, - 0.423529, 0.423529, 1.000000, 0.611450, -0.103582, -0.445931, 4.000000, - 6.414327, - 0.513726, 0.513726, 0.513726, 1.000000, 0.620728, 0.360896, -0.482673, - 4.000000, 4.556417, 0.474510, 0.474510, 0.474510, 1.000000, 0.620728, - 0.180448, -0.482673, 4.000000, 5.278208, 0.427451, 0.427451, 0.427451, - 1.000000, 1.000000, 0.000000, -2.000000, 4.000000, 6.000000, 0.439216, - 0.439216, 0.439216, 1.000000, 0.620728, 0.000000, -0.482673, 4.000000, - 6.000000, 0.356863, 0.356863, 0.356863, 1.000000, 1.000000, -0.500000, - -2.000000, 4.000000, 8.000000, 0.435294, 0.435294, 0.435294, 1.000000, - 0.619629, -0.034595, -0.478689, 4.000000, 6.138380, - 0.333333, 0.333333, 0.333333, 1.000000, 1.500000, -0.500000, -4.000000, - 4.000000, 8.000000, 0.388235, 0.388235, 0.388235, 1.000000, 1.500000, - 0.000000, -4.000000, 4.000000, 6.000000, 0.427451, 0.427451, 0.427451, - 1.000000, 1.000000, 0.000000, -2.000000, 4.000000, 6.000000, 0.517647, - 0.517647, 0.517647, 1.000000, 1.000000, 0.500000, -2.000000, 4.000000, - 4.000000, 0.513726, 0.513726, 0.513726, 1.000000, 0.620728, 0.360896, - -0.482673, 4.000000, 4.556417, 0.545098, 0.545098, 0.545098, 1.000000, - 0.620728, 0.500000, -0.482673, 4.000000, 4.000000, - 0.333333, 0.333333, 0.333333, 1.000000, 1.500000, -0.500000, -4.000000, - 4.000000, 8.000000, 0.427451, 0.427451, 0.427451, 1.000000, 1.000000, - 0.000000, -2.000000, 4.000000, 6.000000, 0.356863, 0.356863, 0.356863, - 1.000000, 1.000000, -0.500000, -2.000000, 4.000000, 8.000000, - 0.556863, 0.556863, 0.556863, 1.000000, 0.540283, 0.541344, -0.160891, - 4.000000, 3.834625, 0.552941, 0.552941, 0.552941, 1.000000, 0.620728, - 0.541344, -0.482673, 4.000000, 3.834625, 0.545098, 0.545098, 0.545098, - 1.000000, 1.000000, 1.000000, -2.000000, 4.000000, 2.000000, 0.517647, - 0.517647, 0.517647, 1.000000, 1.000000, 0.500000, -2.000000, 4.000000, - 4.000000, 0.450980, 0.450980, 0.450980, 1.000000, 1.500000, 0.500000, - -4.000000, 4.000000, 4.000000, 0.388235, 0.388235, 0.388235, 1.000000, - 1.500000, 0.000000, -4.000000, 4.000000, 6.000000, - 0.517647, 0.517647, 0.517647, 1.000000, 1.000000, 0.500000, -2.000000, - 4.000000, 4.000000, 0.552941, 0.552941, 0.552941, 1.000000, 0.620728, - 0.541344, -0.482673, 4.000000, 3.834625, 0.545098, 0.545098, 0.545098, - 1.000000, 0.620728, 0.500000, -0.482673, 4.000000, 4.000000, - 0.450980, 0.450980, 0.450980, 1.000000, 1.500000, 0.500000, -4.000000, - 4.000000, 4.000000, 0.435294, 0.435294, 0.435294, 1.000000, 1.500000, - 1.000000, -4.000000, 4.000000, 2.000000, 0.545098, 0.545098, 0.545098, - 1.000000, 1.000000, 1.000000, -2.000000, 4.000000, 2.000000, - 0.439216, 0.439216, 0.439216, 1.000000, 0.379272, 0.000000, 0.482673, - 4.000000, 6.000000, 0.517647, 0.517647, 0.517647, 1.000000, 0.000000, - 0.500000, 2.000000, 4.000000, 4.000000, 0.427451, 0.427451, 0.427451, - 1.000000, 0.000000, 0.000000, 2.000000, 4.000000, 6.000000, - 0.556863, 0.556863, 0.556863, 1.000000, 0.540283, 0.541344, -0.160891, - 4.000000, 3.834625, 0.545098, 0.545098, 0.545098, 1.000000, 1.000000, - 1.000000, -2.000000, 4.000000, 2.000000, 0.600000, 0.600000, 0.600000, - 1.000000, 0.500000, 1.000000, 0.000000, 4.000000, 2.000000 -}; - - -/* Object: skin_12 */ - -static const int striplength_skin_12[] = { - 12, 12, 12, 12, 12, 0 -}; - -static const float stripdata_skin_12[] = { - 0.498039, 0.498039, 0.498039, 1.000000, -0.099976, 1.500000, -2.400000, - -4.000000, -0.000002, 0.337255, 0.337255, 0.337255, 1.000000, -0.500000, - 1.500000, -4.000000, -4.000000, -0.000002, 0.568627, 0.568627, 0.568627, - 1.000000, -0.099976, 1.100000, -2.400000, -4.000000, 1.599999, 0.341176, - 0.341176, 0.341176, 1.000000, -0.500000, 1.100000, -4.000000, -4.000000, - 1.599999, 0.498039, 0.498039, 0.498039, 1.000000, -0.099976, 0.700000, - -2.400000, -4.000000, 3.200000, 0.325490, 0.325490, 0.325490, 1.000000, - -0.500000, 0.700000, -4.000000, -4.000000, 3.199999, 0.352941, 0.352941, - 0.352941, 1.000000, -0.099976, 0.300000, -2.400000, -4.000000, 4.800000, - 0.282353, 0.282353, 0.282353, 1.000000, -0.500000, 0.300000, -4.000000, - -4.000000, 4.800000, 0.282353, 0.282353, 0.282353, 1.000000, -0.099976, - -0.100000, -2.400000, -4.000000, 6.400001, 0.254902, 0.254902, 0.254902, - 1.000000, -0.500000, -0.100000, -4.000000, -4.000000, 6.400000, - 0.239216, 0.239216, 0.239216, 1.000000, -0.099976, -0.500000, -2.400000, - -4.000000, 8.000000, 0.227451, 0.227451, 0.227451, 1.000000, -0.500000, - -0.500000, -4.000000, -4.000000, 8.000000, - 0.239216, 0.239216, 0.239216, 1.000000, 1.099976, -0.500000, 2.400001, - -4.000000, 8.000000, 0.227451, 0.227451, 0.227451, 1.000000, 1.500000, - -0.500000, 4.000002, -4.000000, 8.000000, 0.282353, 0.282353, 0.282353, - 1.000000, 1.099976, -0.100000, 2.400001, -4.000000, 6.400001, 0.254902, - 0.254902, 0.254902, 1.000000, 1.500000, -0.100000, 4.000002, -4.000000, - 6.400001, 0.352941, 0.352941, 0.352941, 1.000000, 1.099976, 0.300000, - 2.400002, -4.000000, 4.800001, 0.282353, 0.282353, 0.282353, 1.000000, - 1.500000, 0.300000, 4.000002, -4.000000, 4.800001, 0.498039, 0.498039, - 0.498039, 1.000000, 1.099976, 0.700000, 2.400002, -4.000000, 3.200000, - 0.321569, 0.321569, 0.321569, 1.000000, 1.500000, 0.700000, 4.000003, - -4.000000, 3.200000, 0.568627, 0.568627, 0.568627, 1.000000, 1.099976, - 1.100000, 2.400002, -4.000000, 1.599999, 0.341176, 0.341176, 0.341176, - 1.000000, 1.500000, 1.100000, 4.000003, -4.000000, 1.599999, 0.494118, - 0.494118, 0.494118, 1.000000, 1.099976, 1.500000, 2.400003, -4.000000, - -0.000002, 0.337255, 0.337255, 0.337255, 1.000000, 1.500000, 1.500000, - 4.000004, -4.000000, -0.000002, - 0.639216, 0.639216, 0.639216, 1.000000, 0.300049, 1.500000, -0.799999, - -4.000000, -0.000002, 0.498039, 0.498039, 0.498039, 1.000000, -0.099976, - 1.500000, -2.400000, -4.000000, -0.000002, 0.858824, 0.858824, 0.858824, - 1.000000, 0.300049, 1.100000, -0.799999, -4.000000, 1.599999, 0.568627, - 0.568627, 0.568627, 1.000000, -0.099976, 1.100000, -2.400000, -4.000000, - 1.599999, 0.686275, 0.686275, 0.686275, 1.000000, 0.300049, 0.700000, - -0.799999, -4.000000, 3.200000, 0.498039, 0.498039, 0.498039, 1.000000, - -0.099976, 0.700000, -2.400000, -4.000000, 3.200000, 0.419608, 0.419608, - 0.419608, 1.000000, 0.300049, 0.300000, -0.800000, -4.000000, 4.800000, - 0.352941, 0.352941, 0.352941, 1.000000, -0.099976, 0.300000, -2.400000, - -4.000000, 4.800000, 0.298039, 0.298039, 0.298039, 1.000000, 0.300049, - -0.100000, -0.800000, -4.000000, 6.400001, 0.282353, 0.282353, 0.282353, - 1.000000, -0.099976, -0.100000, -2.400000, -4.000000, 6.400001, - 0.247059, 0.247059, 0.247059, 1.000000, 0.300049, -0.500000, -0.800000, - -4.000000, 8.000000, 0.239216, 0.239216, 0.239216, 1.000000, -0.099976, - -0.500000, -2.400000, -4.000000, 8.000000, - 0.639216, 0.639216, 0.639216, 1.000000, 0.699951, 1.500000, 0.800002, - -4.000000, -0.000002, 0.639216, 0.639216, 0.639216, 1.000000, 0.300049, - 1.500000, -0.799999, -4.000000, -0.000002, 0.858824, 0.858824, 0.858824, - 1.000000, 0.699951, 1.100000, 0.800001, -4.000000, 1.599999, 0.858824, - 0.858824, 0.858824, 1.000000, 0.300049, 1.100000, -0.799999, -4.000000, - 1.599999, 0.686275, 0.686275, 0.686275, 1.000000, 0.699951, 0.700000, - 0.800001, -4.000000, 3.200000, 0.686275, 0.686275, 0.686275, 1.000000, - 0.300049, 0.700000, -0.799999, -4.000000, 3.200000, 0.419608, 0.419608, - 0.419608, 1.000000, 0.699951, 0.300000, 0.800001, -4.000000, 4.800001, - 0.419608, 0.419608, 0.419608, 1.000000, 0.300049, 0.300000, -0.800000, - -4.000000, 4.800000, 0.298039, 0.298039, 0.298039, 1.000000, 0.699951, - -0.100000, 0.800001, -4.000000, 6.400001, 0.298039, 0.298039, 0.298039, - 1.000000, 0.300049, -0.100000, -0.800000, -4.000000, 6.400001, 0.247059, - 0.247059, 0.247059, 1.000000, 0.699951, -0.500000, 0.800000, -4.000000, - 8.000000, 0.247059, 0.247059, 0.247059, 1.000000, 0.300049, -0.500000, - -0.800000, -4.000000, 8.000000, - 0.494118, 0.494118, 0.494118, 1.000000, 1.099976, 1.500000, 2.400003, - -4.000000, -0.000002, 0.639216, 0.639216, 0.639216, 1.000000, 0.699951, - 1.500000, 0.800002, -4.000000, -0.000002, 0.568627, 0.568627, 0.568627, - 1.000000, 1.099976, 1.100000, 2.400002, -4.000000, 1.599999, 0.858824, - 0.858824, 0.858824, 1.000000, 0.699951, 1.100000, 0.800001, -4.000000, - 1.599999, 0.498039, 0.498039, 0.498039, 1.000000, 1.099976, 0.700000, - 2.400002, -4.000000, 3.200000, 0.686275, 0.686275, 0.686275, 1.000000, - 0.699951, 0.700000, 0.800001, -4.000000, 3.200000, 0.352941, 0.352941, - 0.352941, 1.000000, 1.099976, 0.300000, 2.400002, -4.000000, 4.800001, - 0.419608, 0.419608, 0.419608, 1.000000, 0.699951, 0.300000, 0.800001, - -4.000000, 4.800001, 0.282353, 0.282353, 0.282353, 1.000000, 1.099976, - -0.100000, 2.400001, -4.000000, 6.400001, 0.298039, 0.298039, 0.298039, - 1.000000, 0.699951, -0.100000, 0.800001, -4.000000, 6.400001, 0.239216, - 0.239216, 0.239216, 1.000000, 1.099976, -0.500000, 2.400001, -4.000000, - 8.000000, 0.247059, 0.247059, 0.247059, 1.000000, 0.699951, -0.500000, - 0.800000, -4.000000, 8.000000 -}; - - -/* Object: skin_11 */ - -static const int striplength_skin_11[] = { - 12, 12, 12, 12, 12, 0 -}; - -static const float stripdata_skin_11[] = { - 0.145098, 0.145098, 0.145098, 1.000000, -0.099976, 1.500000, -2.400000, - 4.000002, 0.000000, 0.141176, 0.141176, 0.141176, 1.000000, -0.500000, - 1.500000, -4.000000, 4.000002, 0.000000, 0.176471, 0.176471, 0.176471, - 1.000000, -0.099976, 1.100000, -2.400000, 2.400001, 0.000000, 0.145098, - 0.145098, 0.145098, 1.000000, -0.500000, 1.100000, -4.000000, 2.400001, - 0.000000, 0.341176, 0.341176, 0.341176, 1.000000, -0.099976, 0.700000, - -2.400000, 0.800000, 0.000000, 0.188235, 0.188235, 0.188235, 1.000000, - -0.500000, 0.700000, -4.000000, 0.800000, 0.000000, 0.450980, 0.450980, - 0.450980, 1.000000, -0.099976, 0.300000, -2.400000, -0.800000, 0.000000, - 0.247059, 0.247059, 0.247059, 1.000000, -0.500000, 0.300000, -4.000000, - -0.800000, 0.000000, 0.439216, 0.439216, 0.439216, 1.000000, -0.099976, - -0.100000, -2.400000, -2.400000, 0.000000, 0.270588, 0.270588, 0.270588, - 1.000000, -0.500000, -0.100000, -4.000000, -2.400000, 0.000000, - 0.364706, 0.364706, 0.364706, 1.000000, -0.099976, -0.500000, -2.400000, - -4.000000, 0.000000, 0.258824, 0.258824, 0.258824, 1.000000, -0.500000, - -0.500000, -4.000000, -4.000000, 0.000000, - 0.364706, 0.364706, 0.364706, 1.000000, 1.099976, -0.500000, 2.400001, - -4.000000, 0.000000, 0.258824, 0.258824, 0.258824, 1.000000, 1.500000, - -0.500000, 4.000002, -4.000000, 0.000000, 0.439216, 0.439216, 0.439216, - 1.000000, 1.099976, -0.100000, 2.400001, -2.400001, 0.000000, 0.270588, - 0.270588, 0.270588, 1.000000, 1.500000, -0.100000, 4.000002, -2.400001, - 0.000000, 0.454902, 0.454902, 0.454902, 1.000000, 1.099976, 0.300000, - 2.400002, -0.800000, 0.000000, 0.247059, 0.247059, 0.247059, 1.000000, - 1.500000, 0.300000, 4.000002, -0.800000, 0.000000, 0.341176, 0.341176, - 0.341176, 1.000000, 1.099976, 0.700000, 2.400002, 0.800000, 0.000000, - 0.184314, 0.184314, 0.184314, 1.000000, 1.500000, 0.700000, 4.000003, - 0.800000, 0.000000, 0.176471, 0.176471, 0.176471, 1.000000, 1.099976, - 1.100000, 2.400002, 2.400001, 0.000000, 0.145098, 0.145098, 0.145098, - 1.000000, 1.500000, 1.100000, 4.000003, 2.400001, 0.000000, 0.145098, - 0.145098, 0.145098, 1.000000, 1.099976, 1.500000, 2.400003, 4.000003, - 0.000000, 0.141176, 0.141176, 0.141176, 1.000000, 1.500000, 1.500000, - 4.000004, 4.000002, 0.000000, - 0.145098, 0.145098, 0.145098, 1.000000, 0.300049, 1.500000, -0.799999, - 4.000002, 0.000000, 0.145098, 0.145098, 0.145098, 1.000000, -0.099976, - 1.500000, -2.400000, 4.000002, 0.000000, 0.262745, 0.262745, 0.262745, - 1.000000, 0.300049, 1.100000, -0.799999, 2.400001, 0.000000, 0.176471, - 0.176471, 0.176471, 1.000000, -0.099976, 1.100000, -2.400000, 2.400001, - 0.000000, 0.580392, 0.580392, 0.580392, 1.000000, 0.300049, 0.700000, - -0.799999, 0.800000, 0.000000, 0.341176, 0.341176, 0.341176, 1.000000, - -0.099976, 0.700000, -2.400000, 0.800000, 0.000000, 0.709804, 0.709804, - 0.709804, 1.000000, 0.300049, 0.300000, -0.800000, -0.800000, 0.000000, - 0.450980, 0.450980, 0.450980, 1.000000, -0.099976, 0.300000, -2.400000, - -0.800000, 0.000000, 0.627451, 0.627451, 0.627451, 1.000000, 0.300049, - -0.100000, -0.800000, -2.400001, 0.000000, 0.439216, 0.439216, 0.439216, - 1.000000, -0.099976, -0.100000, -2.400000, -2.400000, 0.000000, - 0.458824, 0.458824, 0.458824, 1.000000, 0.300049, -0.500000, -0.800000, - -4.000000, 0.000000, 0.364706, 0.364706, 0.364706, 1.000000, -0.099976, - -0.500000, -2.400000, -4.000000, 0.000000, - 0.145098, 0.145098, 0.145098, 1.000000, 0.699951, 1.500000, 0.800002, - 4.000002, 0.000000, 0.145098, 0.145098, 0.145098, 1.000000, 0.300049, - 1.500000, -0.799999, 4.000002, 0.000000, 0.262745, 0.262745, 0.262745, - 1.000000, 0.699951, 1.100000, 0.800001, 2.400001, 0.000000, 0.262745, - 0.262745, 0.262745, 1.000000, 0.300049, 1.100000, -0.799999, 2.400001, - 0.000000, 0.580392, 0.580392, 0.580392, 1.000000, 0.699951, 0.700000, - 0.800001, 0.800000, 0.000000, 0.580392, 0.580392, 0.580392, 1.000000, - 0.300049, 0.700000, -0.799999, 0.800000, 0.000000, 0.713726, 0.713726, - 0.713726, 1.000000, 0.699951, 0.300000, 0.800001, -0.800000, 0.000000, - 0.709804, 0.709804, 0.709804, 1.000000, 0.300049, 0.300000, -0.800000, - -0.800000, 0.000000, 0.631373, 0.631373, 0.631373, 1.000000, 0.699951, - -0.100000, 0.800001, -2.400001, 0.000000, 0.627451, 0.627451, 0.627451, - 1.000000, 0.300049, -0.100000, -0.800000, -2.400001, 0.000000, 0.458824, - 0.458824, 0.458824, 1.000000, 0.699951, -0.500000, 0.800000, -4.000000, - 0.000000, 0.458824, 0.458824, 0.458824, 1.000000, 0.300049, -0.500000, - -0.800000, -4.000000, 0.000000, - 0.145098, 0.145098, 0.145098, 1.000000, 1.099976, 1.500000, 2.400003, - 4.000003, 0.000000, 0.145098, 0.145098, 0.145098, 1.000000, 0.699951, - 1.500000, 0.800002, 4.000002, 0.000000, 0.176471, 0.176471, 0.176471, - 1.000000, 1.099976, 1.100000, 2.400002, 2.400001, 0.000000, 0.262745, - 0.262745, 0.262745, 1.000000, 0.699951, 1.100000, 0.800001, 2.400001, - 0.000000, 0.341176, 0.341176, 0.341176, 1.000000, 1.099976, 0.700000, - 2.400002, 0.800000, 0.000000, 0.580392, 0.580392, 0.580392, 1.000000, - 0.699951, 0.700000, 0.800001, 0.800000, 0.000000, 0.454902, 0.454902, - 0.454902, 1.000000, 1.099976, 0.300000, 2.400002, -0.800000, 0.000000, - 0.713726, 0.713726, 0.713726, 1.000000, 0.699951, 0.300000, 0.800001, - -0.800000, 0.000000, 0.439216, 0.439216, 0.439216, 1.000000, 1.099976, - -0.100000, 2.400001, -2.400001, 0.000000, 0.631373, 0.631373, 0.631373, - 1.000000, 0.699951, -0.100000, 0.800001, -2.400001, 0.000000, 0.364706, - 0.364706, 0.364706, 1.000000, 1.099976, -0.500000, 2.400001, -4.000000, - 0.000000, 0.458824, 0.458824, 0.458824, 1.000000, 0.699951, -0.500000, - 0.800000, -4.000000, 0.000000 -}; - - -/* Object: skin_9 */ - -static const int striplength_skin_9[] = { - 18, 0 -}; - -static const float stripdata_skin_9[] = { - 0.384314, 0.384314, 0.384314, 1.000000, -0.500000, 1.500000, -4.000000, - 4.000000, 8.000000, 0.384314, 0.384314, 0.384314, 1.000000, 1.500000, - 1.500000, 4.000000, 4.000000, 8.000000, 0.376471, 0.376471, 0.376471, - 1.000000, -0.500000, 1.250000, -4.000000, 3.695518, 9.530733, 0.403922, - 0.403922, 0.403922, 1.000000, 1.500000, 1.250000, 4.000000, 3.695518, - 9.530733, 0.415686, 0.415686, 0.415686, 1.000000, -0.500000, 1.000000, - -4.000000, 2.828427, 10.828427, 0.431373, 0.431373, 0.431373, 1.000000, - 1.500000, 1.000000, 4.000000, 2.828427, 10.828427, 0.435294, 0.435294, - 0.435294, 1.000000, -0.500000, 0.750000, -4.000000, 1.530734, 11.695518, - 0.443137, 0.443137, 0.443137, 1.000000, 1.500000, 0.750000, 4.000000, - 1.530734, 11.695518, 0.439216, 0.439216, 0.439216, 1.000000, -0.500000, - 0.500000, -4.000000, 0.000000, 12.000000, 0.435294, 0.435294, 0.435294, - 1.000000, 1.500000, 0.500000, 4.000000, 0.000000, 12.000000, 0.427451, - 0.427451, 0.427451, 1.000000, -0.500000, 0.250000, -4.000000, -1.530734, - 11.695518, 0.411765, 0.411765, 0.411765, 1.000000, 1.500000, 0.250000, - 4.000000, -1.530734, 11.695518, 0.396078, 0.396078, 0.396078, 1.000000, - -0.500000, 0.000000, -4.000000, -2.828427, 10.828427, 0.368627, - 0.368627, 0.368627, 1.000000, 1.500000, 0.000000, 4.000000, -2.828427, - 10.828427, 0.341176, 0.341176, 0.341176, 1.000000, -0.500000, -0.250000, - -4.000000, -3.695518, 9.530733, 0.301961, 0.301961, 0.301961, 1.000000, - 1.500000, -0.250000, 4.000000, -3.695518, 9.530733, 0.294118, 0.294118, - 0.294118, 1.000000, -0.500000, -0.500000, -4.000000, -4.000000, - 8.000000, 0.294118, 0.294118, 0.294118, 1.000000, 1.500000, -0.500000, - 4.000000, -4.000000, 8.000000 -}; diff --git a/nx-X11/extras/Mesa_6.4.2/progs/demos/winpos.c b/nx-X11/extras/Mesa_6.4.2/progs/demos/winpos.c deleted file mode 100644 index 2ee1df69fb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/demos/winpos.c +++ /dev/null @@ -1,118 +0,0 @@ - -/* - * Example of how to use the GL_MESA_window_pos extension. - * Brian Paul This file is in the public domain. - */ - -#include -#include -#include -#include -#ifdef _WIN32 -#include -#endif -#define GL_GLEXT_PROTOTYPES -#include "GL/glut.h" - -#include "readtex.h" - -#define IMAGE_FILE "../images/girl.rgb" - - -#ifndef M_PI -# define M_PI 3.14159265 -#endif - - - -static GLubyte *Image; -static int ImgWidth, ImgHeight; -static GLenum ImgFormat; - -typedef void (APIENTRY * PFNWINDOWPOSFUNC)(GLfloat x, GLfloat y); -static PFNWINDOWPOSFUNC WindowPosFunc; - -static void draw( void ) -{ - GLfloat angle; - - glClear( GL_COLOR_BUFFER_BIT ); - - for (angle = -45.0; angle <= 135.0; angle += 10.0) { - GLfloat x = 50.0 + 200.0 * cos( angle * M_PI / 180.0 ); - GLfloat y = 50.0 + 200.0 * sin( angle * M_PI / 180.0 ); - - /* Don't need to worry about the modelview or projection matrices!!! */ - (*WindowPosFunc)( x, y ); - - glDrawPixels( ImgWidth, ImgHeight, ImgFormat, GL_UNSIGNED_BYTE, Image ); - } - glFinish(); -} - - -static void key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - } -} - - -/* new window size or exposure */ -static void reshape( int width, int height ) -{ - glViewport(0, 0, (GLint)width, (GLint)height); -} - - -static void init( void ) -{ -#ifdef GL_ARB_window_pos - if (glutExtensionSupported("GL_ARB_window_pos")) { - printf("Using GL_ARB_window_pos\n"); - WindowPosFunc = &glWindowPos2fARB; - } - else -#elif defined(GL_ARB_window_pos) - if (glutExtensionSupported("GL_MESA_window_pos")) { - printf("Using GL_MESA_window_pos\n"); - WindowPosFunc = &glWindowPos2fMESA; - } - else -#endif - { - printf("Sorry, GL_ARB/MESA_window_pos extension not available.\n"); - exit(1); - } - - Image = LoadRGBImage( IMAGE_FILE, &ImgWidth, &ImgHeight, &ImgFormat ); - if (!Image) { - printf("Couldn't read %s\n", IMAGE_FILE); - exit(0); - } - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); -} - - -int main( int argc, char *argv[] ) -{ - glutInitWindowPosition(0, 0); - glutInitWindowSize(500, 500); - glutInitDisplayMode( GLUT_RGB ); - - if (glutCreateWindow("winpos") <= 0) { - exit(0); - } - - init(); - - glutReshapeFunc( reshape ); - glutKeyboardFunc( key ); - glutDisplayFunc( draw ); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/egl/Makefile b/nx-X11/extras/Mesa_6.4.2/progs/egl/Makefile deleted file mode 100644 index 41cadf97d2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/egl/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# progs/egl/Makefile - -TOP = ../.. -include $(TOP)/configs/current - - -INCLUDE_DIRS = -I$(TOP)/include - -HEADERS = $(TOP)/include/GLES/egl.h - -PROGRAMS = \ - demo1 \ - demo2 \ - demo3 \ - eglinfo \ - eglgears - - -.c.o: - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ - - - -default: $(PROGRAMS) - - -demo1: demo1.o $(LIB_DIR)/libEGL.so - $(CC) $(CFLAGS) demo1.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@ - -demo1.o: demo1.c $(HEADERS) - $(CC) -c $(CFLAGS) -I$(TOP)/include demo1.c - - -demo2: demo2.o $(LIB_DIR)/libEGL.so - $(CC) $(CFLAGS) demo2.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@ - -demo2.o: demo2.c $(HEADERS) - $(CC) -c $(CFLAGS) -I$(TOP)/include demo2.c - - -demo3: demo3.o $(LIB_DIR)/libEGL.so - $(CC) $(CFLAGS) demo3.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@ - -demo3.o: demo3.c $(HEADERS) - $(CC) -c $(CFLAGS) -I$(TOP)/include demo3.c - - -eglinfo: eglinfo.o $(LIB_DIR)/libEGL.so - $(CC) $(CFLAGS) eglinfo.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@ - -eglinfo.o: eglinfo.c $(HEADERS) - $(CC) -c $(CFLAGS) -I$(TOP)/include eglinfo.c - - -eglgears: eglgears.o $(LIB_DIR)/libEGL.so - $(CC) $(CFLAGS) eglgears.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@ - -eglgears.o: eglgears.c $(HEADERS) - $(CC) -c $(CFLAGS) -I$(TOP)/include eglgears.c - - -clean: - rm -f *.o *~ - rm -f *.so - rm -f $(PROGRAMS) diff --git a/nx-X11/extras/Mesa_6.4.2/progs/egl/demo1.c b/nx-X11/extras/Mesa_6.4.2/progs/egl/demo1.c deleted file mode 100644 index 9ef17e38b7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/egl/demo1.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Exercise EGL API functions - */ - -#include -#include -#include -#include -#include - - -/** - * Test EGL_MESA_screen_surface functions - */ -static void -TestScreens(EGLDisplay dpy) -{ -#define MAX 8 - EGLScreenMESA screens[MAX]; - EGLint numScreens; - EGLint i; - - eglGetScreensMESA(dpy, screens, MAX, &numScreens); - printf("Found %d screens\n", numScreens); - for (i = 0; i < numScreens; i++) { - printf(" Screen %d handle: %d\n", i, (int) screens[i]); - } -} - -/** - * Print table of all available configurations. - */ -static void -PrintConfigs(EGLDisplay d) -{ - EGLConfig *configs; - EGLint numConfigs, i; - - eglGetConfigs(d, NULL, 0, &numConfigs); - configs = malloc(sizeof(*configs) *numConfigs); - eglGetConfigs(d, configs, numConfigs, &numConfigs); - - printf("Configurations:\n"); - printf(" bf lv d st colorbuffer dp st supported \n"); - printf(" id sz l b ro r g b a th cl surfaces \n"); - printf("----------------------------------------------\n"); - for (i = 0; i < numConfigs; i++) { - EGLint id, size, level; - EGLint red, green, blue, alpha; - EGLint depth, stencil; - EGLint surfaces; - EGLint doubleBuf = 1, stereo = 0; - char surfString[100] = ""; - - eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &id); - eglGetConfigAttrib(d, configs[i], EGL_BUFFER_SIZE, &size); - eglGetConfigAttrib(d, configs[i], EGL_LEVEL, &level); - - eglGetConfigAttrib(d, configs[i], EGL_RED_SIZE, &red); - eglGetConfigAttrib(d, configs[i], EGL_GREEN_SIZE, &green); - eglGetConfigAttrib(d, configs[i], EGL_BLUE_SIZE, &blue); - eglGetConfigAttrib(d, configs[i], EGL_ALPHA_SIZE, &alpha); - eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &depth); - eglGetConfigAttrib(d, configs[i], EGL_STENCIL_SIZE, &stencil); - eglGetConfigAttrib(d, configs[i], EGL_SURFACE_TYPE, &surfaces); - - if (surfaces & EGL_WINDOW_BIT) - strcat(surfString, "win,"); - if (surfaces & EGL_PBUFFER_BIT) - strcat(surfString, "pb,"); - if (surfaces & EGL_PIXMAP_BIT) - strcat(surfString, "pix,"); - if (strlen(surfString) > 0) - surfString[strlen(surfString) - 1] = 0; - - printf("0x%02x %2d %2d %c %c %2d %2d %2d %2d %2d %2d %-12s\n", - id, size, level, - doubleBuf ? 'y' : '.', - stereo ? 'y' : '.', - red, green, blue, alpha, - depth, stencil, surfString); - } - free(configs); -} - - - -int -main(int argc, char *argv[]) -{ - int maj, min; - EGLContext ctx; - EGLSurface pbuffer; - EGLConfig configs[10]; - EGLBoolean b; - const EGLint pbufAttribs[] = { - EGL_WIDTH, 500, - EGL_HEIGHT, 500, - EGL_NONE - }; - - /* - EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY); - */ - EGLDisplay d = eglGetDisplay("!fb_dri"); - assert(d); - - if (!eglInitialize(d, &maj, &min)) { - printf("demo: eglInitialize failed\n"); - exit(1); - } - - printf("EGL version = %d.%d\n", maj, min); - printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR)); - - PrintConfigs(d); - - ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL); - if (ctx == EGL_NO_CONTEXT) { - printf("failed to create context\n"); - return 0; - } - - pbuffer = eglCreatePbufferSurface(d, configs[0], pbufAttribs); - if (pbuffer == EGL_NO_SURFACE) { - printf("failed to create pbuffer\n"); - return 0; - } - - b = eglMakeCurrent(d, pbuffer, pbuffer, ctx); - if (!b) { - printf("make current failed\n"); - return 0; - } - - b = eglMakeCurrent(d, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - - TestScreens(d); - - eglDestroySurface(d, pbuffer); - eglDestroyContext(d, ctx); - eglTerminate(d); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/egl/demo2.c b/nx-X11/extras/Mesa_6.4.2/progs/egl/demo2.c deleted file mode 100644 index 7abe947b93..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/egl/demo2.c +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Exercise EGL API functions - */ - -#include -#include -#include -#include - -#include - -/*#define FRONTBUFFER*/ - -static void _subset_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) -{ - glBegin( GL_QUADS ); - glVertex2f( x1, y1 ); - glVertex2f( x2, y1 ); - glVertex2f( x2, y2 ); - glVertex2f( x1, y2 ); - glEnd(); -} - - -static void redraw(EGLDisplay dpy, EGLSurface surf, int rot) -{ - printf("Redraw event\n"); - -#ifdef FRONTBUFFER - glDrawBuffer( GL_FRONT ); -#else - glDrawBuffer( GL_BACK ); -#endif - - glClearColor( rand()/(float)RAND_MAX, - rand()/(float)RAND_MAX, - rand()/(float)RAND_MAX, - 1); - - glClear( GL_COLOR_BUFFER_BIT ); - - glColor3f( rand()/(float)RAND_MAX, - rand()/(float)RAND_MAX, - rand()/(float)RAND_MAX ); - glPushMatrix(); - glRotatef(rot, 0, 0, 1); - glScalef(.5, .5, .5); - _subset_Rectf( -1, -1, 1, 1 ); - glPopMatrix(); - -#ifdef FRONTBUFFER - glFlush(); -#else - eglSwapBuffers( dpy, surf ); -#endif - glFinish(); -} - - -/** - * Test EGL_MESA_screen_surface functions - */ -static void -TestScreens(EGLDisplay dpy) -{ -#define MAX 8 - EGLScreenMESA screens[MAX]; - EGLint numScreens; - EGLint i; - - eglGetScreensMESA(dpy, screens, MAX, &numScreens); - printf("Found %d screens\n", numScreens); - for (i = 0; i < numScreens; i++) { - printf(" Screen %d handle: %d\n", i, (int) screens[i]); - } -} - - -int -main(int argc, char *argv[]) -{ - int maj, min; - EGLContext ctx; - EGLSurface pbuffer, screen_surf; - EGLConfig configs[10]; - EGLint numConfigs, i; - EGLBoolean b; - const EGLint pbufAttribs[] = { - EGL_WIDTH, 500, - EGL_HEIGHT, 500, - EGL_NONE - }; - const EGLint screenAttribs[] = { - EGL_WIDTH, 1024, - EGL_HEIGHT, 768, - EGL_NONE - }; - EGLModeMESA mode; - EGLScreenMESA screen; - EGLint count; - - /* - EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY); - */ - EGLDisplay d = eglGetDisplay("!fb_dri"); - assert(d); - - if (!eglInitialize(d, &maj, &min)) { - printf("demo: eglInitialize failed\n"); - exit(1); - } - - printf("EGL version = %d.%d\n", maj, min); - printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR)); - - eglGetConfigs(d, configs, 10, &numConfigs); - printf("Got %d EGL configs:\n", numConfigs); - for (i = 0; i < numConfigs; i++) { - EGLint id, red, depth; - eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &id); - eglGetConfigAttrib(d, configs[i], EGL_RED_SIZE, &red); - eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &depth); - printf("%2d: Red Size = %d Depth Size = %d\n", id, red, depth); - } - - eglGetScreensMESA(d, &screen, 1, &count); - eglGetModesMESA(d, screen, &mode, 1, &count); - - ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL); - if (ctx == EGL_NO_CONTEXT) { - printf("failed to create context\n"); - return 0; - } - - pbuffer = eglCreatePbufferSurface(d, configs[0], pbufAttribs); - if (pbuffer == EGL_NO_SURFACE) { - printf("failed to create pbuffer\n"); - return 0; - } - - b = eglMakeCurrent(d, pbuffer, pbuffer, ctx); - if (!b) { - printf("make current failed\n"); - return 0; - } - - b = eglMakeCurrent(d, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - - screen_surf = eglCreateScreenSurfaceMESA(d, configs[0], screenAttribs); - if (screen_surf == EGL_NO_SURFACE) { - printf("failed to create screen surface\n"); - return 0; - } - - eglShowSurfaceMESA(d, screen, screen_surf, mode); - - b = eglMakeCurrent(d, screen_surf, screen_surf, ctx); - if (!b) { - printf("make current failed\n"); - return 0; - } - - glViewport(0, 0, 1024, 768); - glDrawBuffer( GL_FRONT ); - - glClearColor( 0, - 1.0, - 0, - 1); - - glClear( GL_COLOR_BUFFER_BIT ); - - - TestScreens(d); - - glShadeModel( GL_FLAT ); - - for (i = 0; i < 6; i++) { - redraw(d, screen_surf, i*10 ); - - printf("sleep(1)\n"); - sleep(1); - } - - eglDestroySurface(d, pbuffer); - eglDestroyContext(d, ctx); - eglTerminate(d); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/egl/demo3.c b/nx-X11/extras/Mesa_6.4.2/progs/egl/demo3.c deleted file mode 100644 index 2693c37205..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/egl/demo3.c +++ /dev/null @@ -1,636 +0,0 @@ -/* - * Exercise EGL API functions - */ - -#include -#include -#include -#include -#include - - - -#define PIXEL_CENTER(x) ((long)(x) + 0.5) - -#define GAP 10 -#define ROWS 3 -#define COLS 4 - -#define OPENGL_WIDTH 48 -#define OPENGL_HEIGHT 13 - - -GLenum rgb, doubleBuffer, windType; -GLint windW, windH; - -GLenum mode1, mode2; -GLint boxW, boxH; -GLubyte OpenGL_bits[] = { - 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0xfb, 0xff, 0xff, 0xff, 0x01, - 0x7f, 0xfb, 0xff, 0xff, 0xff, 0x01, - 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x3e, 0x8f, 0xb7, 0xf9, 0xfc, 0x01, - 0x63, 0xdb, 0xb0, 0x8d, 0x0d, 0x00, - 0x63, 0xdb, 0xb7, 0x8d, 0x0d, 0x00, - 0x63, 0xdb, 0xb6, 0x8d, 0x0d, 0x00, - 0x63, 0x8f, 0xf3, 0xcc, 0x0d, 0x00, - 0x63, 0x00, 0x00, 0x0c, 0x4c, 0x0a, - 0x63, 0x00, 0x00, 0x0c, 0x4c, 0x0e, - 0x63, 0x00, 0x00, 0x8c, 0xed, 0x0e, - 0x3e, 0x00, 0x00, 0xf8, 0x0c, 0x00, -}; - - -static void Init(void) -{ - - mode1 = GL_TRUE; - mode2 = GL_TRUE; -} - -static void Reshape(int width, int height) -{ - - windW = (GLint)width; - windH = (GLint)height; -} - -#if 0 -static void RotateColorMask(void) -{ - static GLint rotation = 0; - - rotation = (rotation + 1) & 0x3; - switch (rotation) { - case 0: - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); - glIndexMask( 0xff ); - break; - case 1: - glColorMask(GL_FALSE, GL_TRUE, GL_TRUE, GL_TRUE); - glIndexMask(0xFE); - break; - case 2: - glColorMask(GL_TRUE, GL_FALSE, GL_TRUE, GL_TRUE); - glIndexMask(0xFD); - break; - case 3: - glColorMask(GL_TRUE, GL_TRUE, GL_FALSE, GL_TRUE); - glIndexMask(0xFB); - break; - } -} -#endif - -static void Viewport(GLint row, GLint column) -{ - GLint x, y; - - boxW = (windW - (COLS + 1) * GAP) / COLS; - boxH = (windH - (ROWS + 1) * GAP) / ROWS; - - x = GAP + column * (boxW + GAP); - y = GAP + row * (boxH + GAP); - - glViewport(x, y, boxW, boxH); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-boxW/2, boxW/2, -boxH/2, boxH/2, 0.0, 1.0); - glMatrixMode(GL_MODELVIEW); - - glEnable(GL_SCISSOR_TEST); - glScissor(x, y, boxW, boxH); -} - -enum { - COLOR_BLACK = 0, - COLOR_RED, - COLOR_GREEN, - COLOR_YELLOW, - COLOR_BLUE, - COLOR_MAGENTA, - COLOR_CYAN, - COLOR_WHITE -}; - -static float RGBMap[9][3] = { - {0, 0, 0}, - {1, 0, 0}, - {0, 1, 0}, - {1, 1, 0}, - {0, 0, 1}, - {1, 0, 1}, - {0, 1, 1}, - {1, 1, 1}, - {0.5, 0.5, 0.5} -}; - -static void SetColor(int c) -{ - glColor3fv(RGBMap[c]); -} - -static void Point(void) -{ - GLint i; - - glBegin(GL_POINTS); - SetColor(COLOR_WHITE); - glVertex2i(0, 0); - for (i = 1; i < 8; i++) { - GLint j = i * 2; - SetColor(COLOR_BLACK+i); - glVertex2i(-j, -j); - glVertex2i(-j, 0); - glVertex2i(-j, j); - glVertex2i(0, j); - glVertex2i(j, j); - glVertex2i(j, 0); - glVertex2i(j, -j); - glVertex2i(0, -j); - } - glEnd(); -} - -static void Lines(void) -{ - GLint i; - - glPushMatrix(); - - glTranslatef(-12, 0, 0); - for (i = 1; i < 8; i++) { - SetColor(COLOR_BLACK+i); - glBegin(GL_LINES); - glVertex2i(-boxW/4, -boxH/4); - glVertex2i(boxW/4, boxH/4); - glEnd(); - glTranslatef(4, 0, 0); - } - - glPopMatrix(); - - glBegin(GL_LINES); - glVertex2i(0, 0); - glEnd(); -} - -static void LineStrip(void) -{ - - glBegin(GL_LINE_STRIP); - SetColor(COLOR_RED); - glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(-boxH/4)); - SetColor(COLOR_GREEN); - glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(boxH/4)); - SetColor(COLOR_BLUE); - glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(boxH/4)); - SetColor(COLOR_WHITE); - glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(-boxH/4)); - glEnd(); - - glBegin(GL_LINE_STRIP); - glVertex2i(0, 0); - glEnd(); -} - -static void LineLoop(void) -{ - - glBegin(GL_LINE_LOOP); - SetColor(COLOR_RED); - glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(-boxH/4)); - SetColor(COLOR_GREEN); - glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(boxH/4)); - SetColor(COLOR_BLUE); - glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(boxH/4)); - SetColor(COLOR_WHITE); - glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(-boxH/4)); - glEnd(); - - glEnable(GL_LOGIC_OP); - glLogicOp(GL_XOR); - - glEnable(GL_BLEND); - glBlendFunc(GL_ONE, GL_ONE); - - SetColor(COLOR_MAGENTA); - glBegin(GL_LINE_LOOP); - glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(-boxH/8)); - glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(boxH/8)); - glEnd(); - glBegin(GL_LINE_LOOP); - glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(boxH/8+5)); - glVertex2f(PIXEL_CENTER(boxW/8), PIXEL_CENTER(boxH/8+5)); - glEnd(); - glDisable(GL_LOGIC_OP); - glDisable(GL_BLEND); - - SetColor(COLOR_GREEN); - glBegin(GL_POINTS); - glVertex2i(0, 0); - glEnd(); - - glBegin(GL_LINE_LOOP); - glVertex2i(0, 0); - glEnd(); -} - -static void Bitmap(void) -{ - - glBegin(GL_LINES); - SetColor(COLOR_GREEN); - glVertex2i(-boxW/2, 0); - glVertex2i(boxW/2, 0); - glVertex2i(0, -boxH/2); - glVertex2i(0, boxH/2); - SetColor(COLOR_RED); - glVertex2i(0, -3); - glVertex2i(0, -3+OPENGL_HEIGHT); - SetColor(COLOR_BLUE); - glVertex2i(0, -3); - glVertex2i(OPENGL_WIDTH, -3); - glEnd(); - - SetColor(COLOR_GREEN); - - glPixelStorei(GL_UNPACK_LSB_FIRST, GL_TRUE); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - glRasterPos2i(0, 0); - glBitmap(OPENGL_WIDTH, OPENGL_HEIGHT, 0, 3, 0.0, 0.0, OpenGL_bits); -} - -static void Triangles(void) -{ - - glBegin(GL_TRIANGLES); - SetColor(COLOR_GREEN); - glVertex2i(-boxW/4, -boxH/4); - SetColor(COLOR_RED); - glVertex2i(-boxW/8, -boxH/16); - SetColor(COLOR_BLUE); - glVertex2i(boxW/8, -boxH/16); - - SetColor(COLOR_GREEN); - glVertex2i(-boxW/4, boxH/4); - SetColor(COLOR_RED); - glVertex2i(-boxW/8, boxH/16); - SetColor(COLOR_BLUE); - glVertex2i(boxW/8, boxH/16); - glEnd(); - - glBegin(GL_TRIANGLES); - glVertex2i(0, 0); - glVertex2i(-100, 100); - glEnd(); -} - -static void TriangleStrip(void) -{ - - glBegin(GL_TRIANGLE_STRIP); - SetColor(COLOR_GREEN); - glVertex2i(-boxW/4, -boxH/4); - SetColor(COLOR_RED); - glVertex2i(-boxW/4, boxH/4); - SetColor(COLOR_BLUE); - glVertex2i(0, -boxH/4); - SetColor(COLOR_WHITE); - glVertex2i(0, boxH/4); - SetColor(COLOR_CYAN); - glVertex2i(boxW/4, -boxH/4); - SetColor(COLOR_YELLOW); - glVertex2i(boxW/4, boxH/4); - glEnd(); - - glBegin(GL_TRIANGLE_STRIP); - glVertex2i(0, 0); - glVertex2i(-100, 100); - glEnd(); -} - -static void TriangleFan(void) -{ - GLint vx[8][2]; - GLint x0, y0, x1, y1, x2, y2, x3, y3; - GLint i; - - y0 = -boxH/4; - y1 = y0 + boxH/2/3; - y2 = y1 + boxH/2/3; - y3 = boxH/4; - x0 = -boxW/4; - x1 = x0 + boxW/2/3; - x2 = x1 + boxW/2/3; - x3 = boxW/4; - - vx[0][0] = x0; vx[0][1] = y1; - vx[1][0] = x0; vx[1][1] = y2; - vx[2][0] = x1; vx[2][1] = y3; - vx[3][0] = x2; vx[3][1] = y3; - vx[4][0] = x3; vx[4][1] = y2; - vx[5][0] = x3; vx[5][1] = y1; - vx[6][0] = x2; vx[6][1] = y0; - vx[7][0] = x1; vx[7][1] = y0; - - glBegin(GL_TRIANGLE_FAN); - SetColor(COLOR_WHITE); - glVertex2i(0, 0); - for (i = 0; i < 8; i++) { - SetColor(COLOR_WHITE-i); - glVertex2iv(vx[i]); - } - glEnd(); - - glBegin(GL_TRIANGLE_FAN); - glVertex2i(0, 0); - glVertex2i(-100, 100); - glEnd(); -} - -static void Rect(void) -{ - - SetColor(COLOR_GREEN); - glRecti(-boxW/4, -boxH/4, boxW/4, boxH/4); -} - -static void PolygonFunc(void) -{ - GLint vx[8][2]; - GLint x0, y0, x1, y1, x2, y2, x3, y3; - GLint i; - - y0 = -boxH/4; - y1 = y0 + boxH/2/3; - y2 = y1 + boxH/2/3; - y3 = boxH/4; - x0 = -boxW/4; - x1 = x0 + boxW/2/3; - x2 = x1 + boxW/2/3; - x3 = boxW/4; - - vx[0][0] = x0; vx[0][1] = y1; - vx[1][0] = x0; vx[1][1] = y2; - vx[2][0] = x1; vx[2][1] = y3; - vx[3][0] = x2; vx[3][1] = y3; - vx[4][0] = x3; vx[4][1] = y2; - vx[5][0] = x3; vx[5][1] = y1; - vx[6][0] = x2; vx[6][1] = y0; - vx[7][0] = x1; vx[7][1] = y0; - - glBegin(GL_POLYGON); - for (i = 0; i < 8; i++) { - SetColor(COLOR_WHITE-i); - glVertex2iv(vx[i]); - } - glEnd(); - - glBegin(GL_POLYGON); - glVertex2i(0, 0); - glVertex2i(100, 100); - glEnd(); -} - -static void Quads(void) -{ - - glBegin(GL_QUADS); - SetColor(COLOR_GREEN); - glVertex2i(-boxW/4, -boxH/4); - SetColor(COLOR_RED); - glVertex2i(-boxW/8, -boxH/16); - SetColor(COLOR_BLUE); - glVertex2i(boxW/8, -boxH/16); - SetColor(COLOR_WHITE); - glVertex2i(boxW/4, -boxH/4); - - SetColor(COLOR_GREEN); - glVertex2i(-boxW/4, boxH/4); - SetColor(COLOR_RED); - glVertex2i(-boxW/8, boxH/16); - SetColor(COLOR_BLUE); - glVertex2i(boxW/8, boxH/16); - SetColor(COLOR_WHITE); - glVertex2i(boxW/4, boxH/4); - glEnd(); - - glBegin(GL_QUADS); - glVertex2i(0, 0); - glVertex2i(100, 100); - glVertex2i(-100, 100); - glEnd(); -} - -static void QuadStrip(void) -{ - - glBegin(GL_QUAD_STRIP); - SetColor(COLOR_GREEN); - glVertex2i(-boxW/4, -boxH/4); - SetColor(COLOR_RED); - glVertex2i(-boxW/4, boxH/4); - SetColor(COLOR_BLUE); - glVertex2i(0, -boxH/4); - SetColor(COLOR_WHITE); - glVertex2i(0, boxH/4); - SetColor(COLOR_CYAN); - glVertex2i(boxW/4, -boxH/4); - SetColor(COLOR_YELLOW); - glVertex2i(boxW/4, boxH/4); - glEnd(); - - glBegin(GL_QUAD_STRIP); - glVertex2i(0, 0); - glVertex2i(100, 100); - glVertex2i(-100, 100); - glEnd(); -} - -static void Draw(EGLDisplay dpy, EGLSurface surf) -{ - - glViewport(0, 0, windW, windH); - glDisable(GL_SCISSOR_TEST); - - glPushAttrib(GL_COLOR_BUFFER_BIT); - - glColorMask(1, 1, 1, 1); - glIndexMask(~0); - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - glPopAttrib(); - - if (mode1) { - glShadeModel(GL_SMOOTH); - } else { - glShadeModel(GL_FLAT); - } - - if (mode2) { - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - } else { - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - } - - Viewport(0, 0); Point(); - Viewport(0, 1); Lines(); - Viewport(0, 2); LineStrip(); - Viewport(0, 3); LineLoop(); - - Viewport(1, 0); Bitmap(); - - Viewport(1, 1); TriangleFan(); - Viewport(1, 2); Triangles(); - Viewport(1, 3); TriangleStrip(); - - Viewport(2, 0); Rect(); - Viewport(2, 1); PolygonFunc(); - Viewport(2, 2); Quads(); - Viewport(2, 3); QuadStrip(); - - glFlush(); - - if (doubleBuffer) { - eglSwapBuffers(dpy, surf); - } -} - -static void -write_ppm(const char *filename, const GLubyte *buffer, int width, int height) -{ - const int binary = 0; - FILE *f = fopen( filename, "w" ); - if (f) { - int i, x, y; - const GLubyte *ptr = buffer; - if (binary) { - fprintf(f,"P6\n"); - fprintf(f,"# ppm-file created by osdemo.c\n"); - fprintf(f,"%i %i\n", width,height); - fprintf(f,"255\n"); - fclose(f); - f = fopen( filename, "ab" ); /* reopen in binary append mode */ - for (y=height-1; y>=0; y--) { - for (x=0; x=0; y--) { - for (x=0; xpFB, 1024, 768); - - eglDestroySurface(d, screen_surf); - eglDestroyContext(d, ctx); - eglTerminate(d); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/egl/eglgears.c b/nx-X11/extras/Mesa_6.4.2/progs/egl/eglgears.c deleted file mode 100644 index 0c3da565f5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/egl/eglgears.c +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This is a port of the infamous "glxgears" demo to straight EGL - * Port by Dane Rushton 10 July 2005 - * - * No command line options. - * Program runs for 5 seconds then exits, outputing framerate to console - */ - -#include -#include -#include -#include -#include -#include -#include - - -#define BENCHMARK - -#ifdef BENCHMARK - -/* XXX this probably isn't very portable */ - -#include -#include - -/* return current time (in seconds) */ -static double -current_time(void) -{ - struct timeval tv; -#ifdef __VMS - (void) gettimeofday(&tv, NULL ); -#else - struct timezone tz; - (void) gettimeofday(&tv, &tz); -#endif - return (double) tv.tv_sec + tv.tv_usec / 1000000.0; -} - -#else /*BENCHMARK*/ - -/* dummy */ -static double -current_time(void) -{ - /* update this function for other platforms! */ - static double t = 0.0; - static int warn = 1; - if (warn) { - fprintf(stderr, "Warning: current_time() not implemented!!\n"); - warn = 0; - } - return t += 1.0; -} - -#endif /*BENCHMARK*/ - - -#ifndef M_PI -#define M_PI 3.14159265 -#endif - - -static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0; -static GLint gear1, gear2, gear3; -static GLfloat angle = 0.0; - -//static GLfloat eyesep = 5.0; /* Eye separation. */ -//static GLfloat fix_point = 40.0; /* Fixation point distance. */ -//static GLfloat left, right, asp; /* Stereo frustum params. */ - - -/* - * - * Draw a gear wheel. You'll probably want to call this function when - * building a display list since we do a lot of trig here. - * - * Input: inner_radius - radius of hole at center - * outer_radius - radius at center of teeth - * width - width of gear - * teeth - number of teeth - * tooth_depth - depth of tooth - */ -static void -gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, - GLint teeth, GLfloat tooth_depth) -{ - GLint i; - GLfloat r0, r1, r2; - GLfloat angle, da; - GLfloat u, v, len; - - r0 = inner_radius; - r1 = outer_radius - tooth_depth / 2.0; - r2 = outer_radius + tooth_depth / 2.0; - - da = 2.0 * M_PI / teeth / 4.0; - - glShadeModel(GL_FLAT); - - glNormal3f(0.0, 0.0, 1.0); - - /* draw front face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - if (i < teeth) { - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - } - } - glEnd(); - - /* draw front sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - } - glEnd(); - - glNormal3f(0.0, 0.0, -1.0); - - /* draw back face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - if (i < teeth) { - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - } - } - glEnd(); - - /* draw back sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - -width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - } - glEnd(); - - /* draw outward faces of teeth */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - u = r2 * cos(angle + da) - r1 * cos(angle); - v = r2 * sin(angle + da) - r1 * sin(angle); - len = sqrt(u * u + v * v); - u /= len; - v /= len; - glNormal3f(v, -u, 0.0); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - -width * 0.5); - u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); - v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); - glNormal3f(v, -u, 0.0); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - } - - glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5); - glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5); - - glEnd(); - - glShadeModel(GL_SMOOTH); - - /* draw inside radius cylinder */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glNormal3f(-cos(angle), -sin(angle), 0.0); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - } - glEnd(); -} - - -static void -draw(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - glRotatef(view_rotx, 1.0, 0.0, 0.0); - glRotatef(view_roty, 0.0, 1.0, 0.0); - glRotatef(view_rotz, 0.0, 0.0, 1.0); - - glPushMatrix(); - glTranslatef(-3.0, -2.0, 0.0); - glRotatef(angle, 0.0, 0.0, 1.0); - glCallList(gear1); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(3.1, -2.0, 0.0); - glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0); - glCallList(gear2); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(-3.1, 4.2, 0.0); - glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0); - glCallList(gear3); - glPopMatrix(); - - glPopMatrix(); -} - - -/* new window size or exposure */ -static void -reshape(int width, int height) -{ - glViewport(0, 0, (GLint) width, (GLint) height); - - GLfloat h = (GLfloat) height / (GLfloat) width; - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -40.0); -} - - - -static void -init(void) -{ - static GLfloat pos[4] = { 5.0, 5.0, 10.0, 0.0 }; - static GLfloat red[4] = { 0.8, 0.1, 0.0, 1.0 }; - static GLfloat green[4] = { 0.0, 0.8, 0.2, 1.0 }; - static GLfloat blue[4] = { 0.2, 0.2, 1.0, 1.0 }; - - glLightfv(GL_LIGHT0, GL_POSITION, pos); - glEnable(GL_CULL_FACE); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - /* make the gears */ - gear1 = glGenLists(1); - glNewList(gear1, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); - gear(1.0, 4.0, 1.0, 20, 0.7); - glEndList(); - - gear2 = glGenLists(1); - glNewList(gear2, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); - gear(0.5, 2.0, 2.0, 10, 0.7); - glEndList(); - - gear3 = glGenLists(1); - glNewList(gear3, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); - gear(1.3, 2.0, 0.5, 10, 0.7); - glEndList(); - - glEnable(GL_NORMALIZE); -} - - - - -static void run_gears(EGLDisplay dpy, EGLSurface surf, int ttr) -{ - double st = current_time(); - double ct = st; - int frames = 0; - while (ct - st < ttr) - { - double tt = current_time(); - double dt = tt - ct; - ct = tt; - - /* advance rotation for next frame */ - angle += 70.0 * dt; /* 70 degrees per second */ - if (angle > 3600.0) - angle -= 3600.0; - - draw(); - - // DBR : Swap the Buffers - eglSwapBuffers(dpy, surf); - - - frames++; - } - - GLfloat seconds = ct - st; - GLfloat fps = frames / seconds; - printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds, fps); - -} - - -int -main(int argc, char *argv[]) -{ - int maj, min; - EGLContext ctx; - EGLSurface screen_surf; - EGLConfig configs[10]; - EGLint numConfigs, i; - EGLBoolean b; - - const EGLint screenAttribs[] = { - EGL_WIDTH, 1024, - EGL_HEIGHT, 768, - EGL_NONE - }; - - EGLModeMESA mode; - EGLScreenMESA screen; - EGLint count; - GLboolean printInfo = GL_FALSE; - - for (i = 1; i < argc; i++) - { - if (strcmp(argv[i], "-info") == 0) - { - printInfo = GL_TRUE; - } - else - printf("Warning: unknown parameter: %s\n", argv[i]); - } - - // DBR : Create EGL context/surface etc - EGLDisplay d = eglGetDisplay(":0"); - assert(d); - - if (!eglInitialize(d, &maj, &min)) { - printf("demo: eglInitialize failed\n"); - exit(1); - } - - printf("EGL version = %d.%d\n", maj, min); - printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR)); - - eglGetConfigs(d, configs, 10, &numConfigs); - eglGetScreensMESA(d, &screen, 1, &count); - eglGetModesMESA(d, screen, &mode, 1, &count); - - ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL); - if (ctx == EGL_NO_CONTEXT) { - printf("failed to create context\n"); - return 0; - } - - screen_surf = eglCreateScreenSurfaceMESA(d, configs[0], screenAttribs); - if (screen_surf == EGL_NO_SURFACE) { - printf("failed to create screen surface\n"); - return 0; - } - - eglShowSurfaceMESA(d, screen, screen_surf, mode); - - b = eglMakeCurrent(d, screen_surf, screen_surf, ctx); - if (!b) { - printf("make current failed\n"); - return 0; - } - // DBR - - if (printInfo) - { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } - - init(); // Initialise the GL visual - reshape(1024,768); - - glDrawBuffer( GL_BACK ); - - // DBR : Run the simulation - run_gears(d, screen_surf, 5.0); - - - // DBR : Destroy EGL context/surface etc - eglDestroySurface(d, screen_surf); - eglDestroyContext(d, ctx); - eglTerminate(d); - // DBR - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/egl/eglinfo.c b/nx-X11/extras/Mesa_6.4.2/progs/egl/eglinfo.c deleted file mode 100644 index 4826fd0948..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/egl/eglinfo.c +++ /dev/null @@ -1,162 +0,0 @@ -/* - * eglinfo - like glxinfo but for EGL - * - * Brian Paul - * 11 March 2005 - * - * Copyright (C) 2005 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include -#include -#include -#include -#include - -#define MAX_CONFIGS 1000 -#define MAX_MODES 1000 -#define MAX_SCREENS 10 - - -/** - * Print table of all available configurations. - */ -static void -PrintConfigs(EGLDisplay d) -{ - EGLConfig configs[MAX_CONFIGS]; - EGLint numConfigs, i; - - eglGetConfigs(d, configs, MAX_CONFIGS, &numConfigs); - - printf("Configurations:\n"); - printf(" bf lv d st colorbuffer dp st supported \n"); - printf(" id sz l b ro r g b a th cl surfaces \n"); - printf("----------------------------------------------\n"); - for (i = 0; i < numConfigs; i++) { - EGLint id, size, level; - EGLint red, green, blue, alpha; - EGLint depth, stencil; - EGLint surfaces; - EGLint doubleBuf = 1, stereo = 0; - char surfString[100] = ""; - - eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &id); - eglGetConfigAttrib(d, configs[i], EGL_BUFFER_SIZE, &size); - eglGetConfigAttrib(d, configs[i], EGL_LEVEL, &level); - - eglGetConfigAttrib(d, configs[i], EGL_RED_SIZE, &red); - eglGetConfigAttrib(d, configs[i], EGL_GREEN_SIZE, &green); - eglGetConfigAttrib(d, configs[i], EGL_BLUE_SIZE, &blue); - eglGetConfigAttrib(d, configs[i], EGL_ALPHA_SIZE, &alpha); - eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &depth); - eglGetConfigAttrib(d, configs[i], EGL_STENCIL_SIZE, &stencil); - eglGetConfigAttrib(d, configs[i], EGL_SURFACE_TYPE, &surfaces); - - if (surfaces & EGL_WINDOW_BIT) - strcat(surfString, "win,"); - if (surfaces & EGL_PBUFFER_BIT) - strcat(surfString, "pb,"); - if (surfaces & EGL_PIXMAP_BIT) - strcat(surfString, "pix,"); - if (strlen(surfString) > 0) - surfString[strlen(surfString) - 1] = 0; - - printf("0x%02x %2d %2d %c %c %2d %2d %2d %2d %2d %2d %-12s\n", - id, size, level, - doubleBuf ? 'y' : '.', - stereo ? 'y' : '.', - red, green, blue, alpha, - depth, stencil, surfString); - } -} - - -/** - * Print table of all available configurations. - */ -static void -PrintModes(EGLDisplay d) -{ -#ifdef EGL_MESA_screen_surface - const char *extensions = eglQueryString(d, EGL_EXTENSIONS); - if (strstr(extensions, "EGL_MESA_screen_surface")) { - EGLScreenMESA screens[MAX_SCREENS]; - EGLint numScreens = 1, scrn; - EGLModeMESA modes[MAX_MODES]; - - eglGetScreensMESA(d, screens, MAX_SCREENS, &numScreens); - printf("Number of Screens: %d\n\n", numScreens); - - for (scrn = 0; scrn < numScreens; scrn++) { - EGLint numModes, i; - - eglGetModesMESA(d, screens[scrn], modes, MAX_MODES, &numModes); - - printf("Screen %d Modes:\n", scrn); - printf(" id width height refresh name\n"); - printf("-----------------------------------------\n"); - for (i = 0; i < numModes; i++) { - EGLint id, w, h, r; - const char *str; - eglGetModeAttribMESA(d, modes[i], EGL_MODE_ID_MESA, &id); - eglGetModeAttribMESA(d, modes[i], EGL_WIDTH, &w); - eglGetModeAttribMESA(d, modes[i], EGL_HEIGHT, &h); - eglGetModeAttribMESA(d, modes[i], EGL_REFRESH_RATE_MESA, &r); - str = eglQueryModeStringMESA(d, modes[i]); - printf("0x%02x %5d %5d %.3f %s\n", id, w, h, r / 1000.0, str); - } - } - } -#endif -} - - - -int -main(int argc, char *argv[]) -{ - int maj, min; - /*EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);*/ - EGLDisplay d = eglGetDisplay("!r200_dri"); - - if (!eglInitialize(d, &maj, &min)) { - printf("eglinfo: eglInitialize failed\n"); - exit(1); - } - - printf("EGL API version: %d.%d\n", maj, min); - printf("EGL vendor string: %s\n", eglQueryString(d, EGL_VENDOR)); - printf("EGL version string: %s\n", eglQueryString(d, EGL_VERSION)); - printf("EGL extensions string:\n"); - printf(" %s\n", eglQueryString(d, EGL_EXTENSIONS)); - printf("\n"); - - PrintConfigs(d); - - printf("\n"); - - PrintModes(d); - - eglTerminate(d); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/fbdev/Makefile b/nx-X11/extras/Mesa_6.4.2/progs/fbdev/Makefile deleted file mode 100644 index 0a0c77906f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/fbdev/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# Makefile for miniglx demo programs - -TOP = ../.. - -include $(TOP)/configs/current - - -SOURCES = glfbdevtest.c - -OBJECTS = $(SOURCES:.c=.o) - -PROGS = $(SOURCES:%.c=%) - -INCLUDES = \ - -I. \ - -I$(TOP)/include - - -##### RULES ##### - -.SUFFIXES: -.SUFFIXES: .c - -.c: - $(CC) $(INCLUDES) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@ - -.c.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@ - -.S.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@ - - -##### TARGETS ##### - -default: depend $(PROGS) - -clean: - rm -f $(PROGS) - rm -f *.o - - -depend: $(SOURCES) - touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null - - -# Emacs tags -tags: - etags `find . -name \*.[ch]` `find ../include` - - -include depend diff --git a/nx-X11/extras/Mesa_6.4.2/progs/fbdev/glfbdevtest.c b/nx-X11/extras/Mesa_6.4.2/progs/fbdev/glfbdevtest.c deleted file mode 100644 index a461c55e2f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/fbdev/glfbdevtest.c +++ /dev/null @@ -1,524 +0,0 @@ -/* - * Test the GLFBDev interface. Only tested with radeonfb driver!!!! - * - * Written by Brian Paul - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define DEFAULT_DEPTH 8 - -static struct fb_fix_screeninfo FixedInfo; -static struct fb_var_screeninfo VarInfo, OrigVarInfo; -static int DesiredDepth = 0; -static int OriginalVT = -1; -static int ConsoleFD = -1; -static int FrameBufferFD = -1; -static caddr_t FrameBuffer = (caddr_t) -1; -static caddr_t MMIOAddress = (caddr_t) -1; - - -static void -print_fixed_info(const struct fb_fix_screeninfo *fixed, const char *s) -{ - static const char *visuals[] = { - "MONO01", "MONO10", "TRUECOLOR", "PSEUDOCOLOR", - "DIRECTCOLOR", "STATIC_PSEUDOCOLOR" - }; - - printf("%s info -----------------------\n", s); - printf("id = %16s\n", fixed->id); - printf("smem_start = 0x%lx\n", fixed->smem_start); - printf("smem_len = %d (0x%x)\n", fixed->smem_len, fixed->smem_len); - printf("type = 0x%x\n", fixed->type); - printf("type_aux = 0x%x\n", fixed->type_aux); - printf("visual = 0x%x (%s)\n", fixed->visual, visuals[fixed->visual]); - printf("xpanstep = %d\n", fixed->xpanstep); - printf("ypanstep = %d\n", fixed->ypanstep); - printf("ywrapstep = %d\n", fixed->ywrapstep); - printf("line_length = %d\n", fixed->line_length); - printf("mmio_start = 0x%lx\n", fixed->mmio_start); - printf("mmio_len = %d (0x%x)\n", fixed->mmio_len, fixed->mmio_len); - printf("accel = 0x%x\n", fixed->accel); -} - - -static void -print_var_info(const struct fb_var_screeninfo *var, const char *s) -{ - printf("%s info -----------------------\n", s); - printf("xres = %d\n", var->xres); - printf("yres = %d\n", var->yres); - printf("xres_virtual = %d\n", var->xres_virtual); - printf("yres_virtual = %d\n", var->yres_virtual); - printf("xoffset = %d\n", var->xoffset); - printf("yoffset = %d\n", var->yoffset); - printf("bits_per_pixel = %d\n", var->bits_per_pixel); - printf("grayscale = %d\n", var->grayscale); - - printf("red.offset = %d length = %d msb_right = %d\n", - var->red.offset, var->red.length, var->red.msb_right); - printf("green.offset = %d length = %d msb_right = %d\n", - var->green.offset, var->green.length, var->green.msb_right); - printf("blue.offset = %d length = %d msb_right = %d\n", - var->blue.offset, var->blue.length, var->blue.msb_right); - printf("transp.offset = %d length = %d msb_right = %d\n", - var->transp.offset, var->transp.length, var->transp.msb_right); - - printf("nonstd = %d\n", var->nonstd); - printf("activate = %d\n", var->activate); - printf("height = %d mm\n", var->height); - printf("width = %d mm\n", var->width); - printf("accel_flags = 0x%x\n", var->accel_flags); - printf("pixclock = %d\n", var->pixclock); - printf("left_margin = %d\n", var->left_margin); - printf("right_margin = %d\n", var->right_margin); - printf("upper_margin = %d\n", var->upper_margin); - printf("lower_margin = %d\n", var->lower_margin); - printf("hsync_len = %d\n", var->hsync_len); - printf("vsync_len = %d\n", var->vsync_len); - printf("sync = %d\n", var->sync); - printf("vmode = %d\n", var->vmode); -} - - -static void -signal_handler(int signumber) -{ - signal(signumber, SIG_IGN); /* prevent recursion! */ - fprintf(stderr, "error: got signal %d (exiting)\n", signumber); - exit(1); -} - - -static void -initialize_fbdev( void ) -{ - char ttystr[1000]; - int fd, vtnumber, ttyfd; - int sz; - - (void) sz; - - if (geteuid()) { - fprintf(stderr, "error: you need to be root\n"); - exit(1); - } - -#if 1 - /* open the framebuffer device */ - FrameBufferFD = open("/dev/fb0", O_RDWR); - if (FrameBufferFD < 0) { - fprintf(stderr, "Error opening /dev/fb0: %s\n", strerror(errno)); - exit(1); - } -#endif - - /* open /dev/tty0 and get the vt number */ - if ((fd = open("/dev/tty0", O_WRONLY, 0)) < 0) { - fprintf(stderr, "error opening /dev/tty0\n"); - exit(1); - } - if (ioctl(fd, VT_OPENQRY, &vtnumber) < 0 || vtnumber < 0) { - fprintf(stderr, "error: couldn't get a free vt\n"); - exit(1); - } - close(fd); - - /* open the console tty */ - sprintf(ttystr, "/dev/tty%d", vtnumber); /* /dev/tty1-64 */ - ConsoleFD = open(ttystr, O_RDWR | O_NDELAY, 0); - if (ConsoleFD < 0) { - fprintf(stderr, "error couldn't open console fd\n"); - exit(1); - } - - /* save current vt number */ - { - struct vt_stat vts; - if (ioctl(ConsoleFD, VT_GETSTATE, &vts) == 0) - OriginalVT = vts.v_active; - } - - /* disconnect from controlling tty */ - ttyfd = open("/dev/tty", O_RDWR); - if (ttyfd >= 0) { - ioctl(ttyfd, TIOCNOTTY, 0); - close(ttyfd); - } - - /* some magic to restore the vt when we exit */ - { - struct vt_mode vt; - if (ioctl(ConsoleFD, VT_ACTIVATE, vtnumber) != 0) - printf("ioctl VT_ACTIVATE: %s\n", strerror(errno)); - if (ioctl(ConsoleFD, VT_WAITACTIVE, vtnumber) != 0) - printf("ioctl VT_WAITACTIVE: %s\n", strerror(errno)); - - if (ioctl(ConsoleFD, VT_GETMODE, &vt) < 0) { - fprintf(stderr, "error: ioctl VT_GETMODE: %s\n", strerror(errno)); - exit(1); - } - - vt.mode = VT_PROCESS; - vt.relsig = SIGUSR1; - vt.acqsig = SIGUSR1; - if (ioctl(ConsoleFD, VT_SETMODE, &vt) < 0) { - fprintf(stderr, "error: ioctl(VT_SETMODE) failed: %s\n", - strerror(errno)); - exit(1); - } - } - - /* go into graphics mode */ - if (ioctl(ConsoleFD, KDSETMODE, KD_GRAPHICS) < 0) { - fprintf(stderr, "error: ioctl(KDSETMODE, KD_GRAPHICS) failed: %s\n", - strerror(errno)); - exit(1); - } - - -#if 0 - /* open the framebuffer device */ - FrameBufferFD = open("/dev/fb0", O_RDWR); - if (FrameBufferFD < 0) { - fprintf(stderr, "Error opening /dev/fb0: %s\n", strerror(errno)); - exit(1); - } -#endif - - /* Get the fixed screen info */ - if (ioctl(FrameBufferFD, FBIOGET_FSCREENINFO, &FixedInfo)) { - fprintf(stderr, "error: ioctl(FBIOGET_FSCREENINFO) failed: %s\n", - strerror(errno)); - exit(1); - } - - print_fixed_info(&FixedInfo, "Fixed"); - - - /* get the variable screen info */ - if (ioctl(FrameBufferFD, FBIOGET_VSCREENINFO, &OrigVarInfo)) { - fprintf(stderr, "error: ioctl(FBIOGET_VSCREENINFO) failed: %s\n", - strerror(errno)); - exit(1); - } - - print_var_info(&OrigVarInfo, "Orig Var"); - - /* operate on a copy */ - VarInfo = OrigVarInfo; - - /* set the depth, resolution, etc */ - DesiredDepth = 32; - if (DesiredDepth) - VarInfo.bits_per_pixel = DesiredDepth; - - if (VarInfo.bits_per_pixel == 16) { - VarInfo.red.offset = 11; - VarInfo.green.offset = 5; - VarInfo.blue.offset = 0; - VarInfo.red.length = 5; - VarInfo.green.length = 6; - VarInfo.blue.length = 5; - VarInfo.transp.offset = 0; - VarInfo.transp.length = 0; - } - else if (VarInfo.bits_per_pixel == 32) { - VarInfo.red.offset = 16; - VarInfo.green.offset = 8; - VarInfo.blue.offset = 0; - VarInfo.transp.offset = 24; - VarInfo.red.length = 8; - VarInfo.green.length = 8; - VarInfo.blue.length = 8; - VarInfo.transp.length = 8; - } - /* timing values taken from /etc/fb.modes (1280x1024 @ 75Hz) */ - VarInfo.xres_virtual = VarInfo.xres = 1280; - VarInfo.yres_virtual = VarInfo.yres = 1024; - VarInfo.pixclock = 7408; - VarInfo.left_margin = 248; - VarInfo.right_margin = 16; - VarInfo.upper_margin = 38; - VarInfo.lower_margin = 1; - VarInfo.hsync_len = 144; - VarInfo.vsync_len = 3; - - VarInfo.xoffset = 0; - VarInfo.yoffset = 0; - VarInfo.nonstd = 0; - VarInfo.vmode &= ~FB_VMODE_YWRAP; /* turn off scrolling */ - - /* set new variable screen info */ - if (ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &VarInfo)) { - fprintf(stderr, "ioctl(FBIOPUT_VSCREENINFO failed): %s\n", - strerror(errno)); - exit(1); - } - - print_var_info(&VarInfo, "New Var"); - - if (FixedInfo.visual != FB_VISUAL_TRUECOLOR && - FixedInfo.visual != FB_VISUAL_DIRECTCOLOR) { - fprintf(stderr, "non-TRUE/DIRECT-COLOR visuals (0x%x) not supported by this demo.\n", FixedInfo.visual); - exit(1); - } - - /* initialize colormap */ - if (FixedInfo.visual == FB_VISUAL_DIRECTCOLOR) { - struct fb_cmap cmap; - unsigned short red[256], green[256], blue[256]; - int i; - - /* we're assuming 256 entries here */ - printf("initializing directcolor colormap\n"); - cmap.start = 0; - cmap.len = 256; - cmap.red = red; - cmap.green = green; - cmap.blue = blue; - cmap.transp = NULL; - for (i = 0; i < cmap.len; i++) { - red[i] = green[i] = blue[i] = (i << 8) | i; - } - if (ioctl(FrameBufferFD, FBIOPUTCMAP, (void *) &cmap) < 0) { - fprintf(stderr, "ioctl(FBIOPUTCMAP) failed [%d]\n", i); - } - } - - /* - * fbdev says the frame buffer is at offset zero, and the mmio region - * is immediately after. - */ - - /* mmap the framebuffer into our address space */ - FrameBuffer = (caddr_t) mmap(0, /* start */ - FixedInfo.smem_len, /* bytes */ - PROT_READ | PROT_WRITE, /* prot */ - MAP_SHARED, /* flags */ - FrameBufferFD, /* fd */ - 0 /* offset */); - if (FrameBuffer == (caddr_t) - 1) { - fprintf(stderr, "error: unable to mmap framebuffer: %s\n", - strerror(errno)); - exit(1); - } - printf("FrameBuffer = %p\n", FrameBuffer); - -#if 1 - /* mmap the MMIO region into our address space */ - MMIOAddress = (caddr_t) mmap(0, /* start */ - FixedInfo.mmio_len, /* bytes */ - PROT_READ | PROT_WRITE, /* prot */ - MAP_SHARED, /* flags */ - FrameBufferFD, /* fd */ - FixedInfo.smem_len /* offset */); - if (MMIOAddress == (caddr_t) - 1) { - fprintf(stderr, "error: unable to mmap mmio region: %s\n", - strerror(errno)); - } - printf("MMIOAddress = %p\n", MMIOAddress); - - /* try out some simple MMIO register reads */ - if (1) - { - typedef unsigned int CARD32; - typedef unsigned char CARD8; -#define RADEON_CONFIG_MEMSIZE 0x00f8 -#define RADEON_MEM_SDRAM_MODE_REG 0x0158 -#define MMIO_IN32(base, offset) \ - *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) -#define INREG(addr) MMIO_IN32(MMIOAddress, addr) - int sz, type; - const char *typeStr[] = {"SDR", "DDR", "64-bit SDR"}; - sz = INREG(RADEON_CONFIG_MEMSIZE); - type = INREG(RADEON_MEM_SDRAM_MODE_REG); - printf("RADEON_CONFIG_MEMSIZE = %d (%d MB)\n", sz, sz / 1024 / 1024); - printf("RADEON_MEM_SDRAM_MODE_REG >> 30 = %d (%s)\n", - type >> 30, typeStr[type>>30]); - } -#endif - -} - - -static void -shutdown_fbdev( void ) -{ - struct vt_mode VT; - - printf("cleaning up...\n"); - /* restore original variable screen info */ - if (ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &OrigVarInfo)) { - fprintf(stderr, "ioctl(FBIOPUT_VSCREENINFO failed): %s\n", - strerror(errno)); - exit(1); - } - - munmap(MMIOAddress, FixedInfo.mmio_len); - munmap(FrameBuffer, FixedInfo.smem_len); - close(FrameBufferFD); - - /* restore text mode */ - ioctl(ConsoleFD, KDSETMODE, KD_TEXT); - - /* set vt */ - if (ioctl(ConsoleFD, VT_GETMODE, &VT) != -1) { - VT.mode = VT_AUTO; - ioctl(ConsoleFD, VT_SETMODE, &VT); - } - - /* restore original vt */ - if (OriginalVT >= 0) { - ioctl(ConsoleFD, VT_ACTIVATE, OriginalVT); - OriginalVT = -1; - } - - close(ConsoleFD); -} - - -/* Borrowed from GLUT */ -static void -doughnut(GLfloat r, GLfloat R, GLint nsides, GLint rings) -{ - int i, j; - GLfloat theta, phi, theta1; - GLfloat cosTheta, sinTheta; - GLfloat cosTheta1, sinTheta1; - GLfloat ringDelta, sideDelta; - - ringDelta = 2.0 * M_PI / rings; - sideDelta = 2.0 * M_PI / nsides; - - theta = 0.0; - cosTheta = 1.0; - sinTheta = 0.0; - for (i = rings - 1; i >= 0; i--) { - theta1 = theta + ringDelta; - cosTheta1 = cos(theta1); - sinTheta1 = sin(theta1); - glBegin(GL_QUAD_STRIP); - phi = 0.0; - for (j = nsides; j >= 0; j--) { - GLfloat cosPhi, sinPhi, dist; - - phi += sideDelta; - cosPhi = cos(phi); - sinPhi = sin(phi); - dist = R + r * cosPhi; - - glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi, sinPhi); - glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, r * sinPhi); - glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi); - glVertex3f(cosTheta * dist, -sinTheta * dist, r * sinPhi); - } - glEnd(); - theta = theta1; - cosTheta = cosTheta1; - sinTheta = sinTheta1; - } -} - - -static void -gltest( void ) -{ - static const int attribs[] = { - GLFBDEV_DOUBLE_BUFFER, - GLFBDEV_DEPTH_SIZE, 16, - GLFBDEV_NONE - }; - GLFBDevContextPtr ctx; - GLFBDevBufferPtr buf; - GLFBDevVisualPtr vis; - int bytes, r, g, b, a; - float ang; - - printf("GLFBDEV_VENDOR = %s\n", glFBDevGetString(GLFBDEV_VENDOR)); - printf("GLFBDEV_VERSION = %s\n", glFBDevGetString(GLFBDEV_VERSION)); - - /* framebuffer size */ - bytes = VarInfo.xres_virtual * VarInfo.yres_virtual * VarInfo.bits_per_pixel / 8; - - vis = glFBDevCreateVisual( &FixedInfo, &VarInfo, attribs ); - assert(vis); - - buf = glFBDevCreateBuffer( &FixedInfo, &VarInfo, vis, FrameBuffer, NULL, bytes ); - assert(buf); - - ctx = glFBDevCreateContext( vis, NULL ); - assert(buf); - - b = glFBDevMakeCurrent( ctx, buf, buf ); - assert(b); - - /*printf("GL_EXTENSIONS: %s\n", glGetString(GL_EXTENSIONS));*/ - glGetIntegerv(GL_RED_BITS, &r); - glGetIntegerv(GL_GREEN_BITS, &g); - glGetIntegerv(GL_BLUE_BITS, &b); - glGetIntegerv(GL_ALPHA_BITS, &a); - printf("RED_BITS=%d GREEN_BITS=%d BLUE_BITS=%d ALPHA_BITS=%d\n", - r, g, b, a); - - glClearColor(0.5, 0.5, 1.0, 0); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1, 1, -1, 1, 2, 30); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0, 0, -15); - glViewport(0, 0, VarInfo.xres_virtual, VarInfo.yres_virtual); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - for (ang = 0; ang <= 180; ang += 15) { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glPushMatrix(); - glRotatef(ang, 1, 0, 0); - doughnut(1, 3, 40, 20); - glPopMatrix(); - glFBDevSwapBuffers(buf); - } - - /* clean up */ - b = glFBDevMakeCurrent( NULL, NULL, NULL); - assert(b); - - glFBDevDestroyContext(ctx); - glFBDevDestroyBuffer(buf); - glFBDevDestroyVisual(vis); -} - - -int -main( int argc, char *argv[] ) -{ - signal(SIGUSR1, signal_handler); /* exit if someone tries a vt switch */ - signal(SIGSEGV, signal_handler); /* catch segfaults */ - - initialize_fbdev(); - gltest(); - shutdown_fbdev(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/ggi/asc-view.c b/nx-X11/extras/Mesa_6.4.2/progs/ggi/asc-view.c deleted file mode 100644 index d37fba9d9f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/ggi/asc-view.c +++ /dev/null @@ -1,377 +0,0 @@ -/* - test program for the ggi-mesa driver - - Copyright (C) 1997,1998 Uwe Maurer - uwe_maurer@t-online.de - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include - -ggi_visual_t vis,vis_mem; - -GGIMesaContext ctx; - -int screen_x=GGI_AUTO,screen_y=GGI_AUTO; -ggi_graphtype bpp=GT_AUTO; - -//#define ZBUFFER - -//#define SMOOTH_NORMALS - -void Init() -{ - GLfloat h=(GLfloat)3/4; - GLfloat pos[4]={5,5,-20,0}; - GLfloat specular[4]={.4,.4,.4,1}; - GLfloat diffuse[4]={.3,.3,.3,1}; - GLfloat ambient[4]={.2,.2,.2,1}; - - int err; - - if (ggiInit()<0) - { - printf("ggiInit() failed\n"); - exit(1); - } - ctx=GGIMesaCreateContext(); - if (ctx==NULL) - { - printf("Can't create Context!\n"); - exit(1); - } - - vis=ggiOpen(NULL); - vis_mem=ggiOpen("display-memory",NULL); - if (vis==NULL || vis_mem==NULL) - { - printf("Can't open ggi_visuals!\n"); - exit(1); - } - err=ggiSetGraphMode(vis,screen_x,screen_y,screen_x,screen_y,bpp); - err+=ggiSetGraphMode(vis_mem,screen_x,screen_y,screen_x,screen_y,bpp); - if (err) - { - printf("Can't set %ix%i\n",screen_x,screen_y); - exit(1); - } - - if (GGIMesaSetVisual(ctx,vis_mem,GL_TRUE,GL_FALSE)<0) - { - printf("GGIMesaSetVisual() failed!\n"); - exit(1); - } - - GGIMesaMakeCurrent(ctx); - - glViewport(0,0,screen_x,screen_y); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1,1,-h,h,1,50); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0,0,-9); - glShadeModel(GL_FLAT); - - glFrontFace(GL_CW); - glEnable(GL_CULL_FACE); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - - glLightfv(GL_LIGHT0,GL_POSITION,pos); - - glLightfv(GL_LIGHT0,GL_DIFFUSE,diffuse); - glLightfv(GL_LIGHT0,GL_AMBIENT,ambient); - glLightfv(GL_LIGHT0,GL_SPECULAR,specular); - - #ifdef ZBUFFER - glEnable(GL_DEPTH_TEST); - #endif -} - - -#define MAX_VERTS 1000 -#define MAX_TRIS 2000 -#define MAX_LEN 1024 -#define MAX_F 100000000 - -void LoadAsc(GLuint *list,char *file) -{ - FILE *fp; - - GLfloat p[MAX_VERTS][3]; - GLfloat normal[MAX_VERTS][3]; - float ncount[MAX_VERTS]; - int v[MAX_TRIS][3]; - char line[MAX_LEN]; - char *s; - int i,j; - int verts,faces; - GLuint v0,v1,v2; - GLfloat n[3]; - GLfloat len,k; - GLfloat min[3]={MAX_F,MAX_F,MAX_F}; - GLfloat max[3]={-MAX_F,-MAX_F,-MAX_F}; - char *coord_str[]={"X","Z","Y"}; - - fp=fopen(file,"r"); - if (!fp) - { - printf("Can't open %s!\n",file); - exit(1); - } - - while (strncmp(fgets(line,MAX_LEN,fp),"Tri-mesh",8)) ; - - s=strstr(line,":")+1; - verts=atoi(s); - s=strstr(s,":")+1; - faces=atoi(s); - - if (verts>MAX_VERTS) - { - printf("Too many vertices..\n"); - exit(1); - } - - while (strncmp(fgets(line,MAX_LEN,fp),"Vertex list",11)) ; - - for (i=0;imax[j]) max[j]=k; - if (klen) {len=k;j=i;} - n[i]=(max[i]+min[i])/2; - } - - len/=2; - - for (i=0;iread); - rotate+=10; - frames++; - if (frames==(*maxframes)) break; - - if (ggiKbhit(vis)) - { - *maxframes=frames; - break; - } - } - - gettimeofday(&stop,NULL); - len=(double)(stop.tv_sec-start.tv_sec)+ - (double)(stop.tv_usec-start.tv_usec)/1e6; - return len; -} - -void visible(int vis) -{ - if (vis == GLUT_VISIBLE) - glutIdleFunc(idle); - else - glutIdleFunc(NULL); -} - -int main(int argc, char *argv[]) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); - - glutInitWindowPosition(0, 0); - glutInitWindowSize(300, 300); - glutCreateWindow("asc-view"); - init(); - - glutDisplayFunc(draw); - glutReshapeFunc(reshape); - glutKeyboardFunc(key); - glutSpecialFunc(special); - glutVisibilityFunc(visible); - - glutMainLoop(); -#if 0 - GLuint l; - char *file; - int maxframes=0; - double len; - - Init(); - - file=(argc>1) ? argv[1] : "asc/box.asc"; - if (argc>2) maxframes=atoi(argv[2]); - - if (argc==1) - { - printf("usage: %s filename.asc\n",argv[0]); - } - - LoadAsc(&l,file); - - len=Display(l,&maxframes); - - printf("\ttime: %.3f sec\n",len); - printf("\tframes: %i\n",maxframes); - printf("\tfps: %.3f \n",(double)maxframes/len); - - GGIMesaDestroyContext(ctx); - ggiClose(vis); - ggiClose(vis_mem); - ggiExit(); -#endif - return 0; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/ggi/blah b/nx-X11/extras/Mesa_6.4.2/progs/ggi/blah deleted file mode 100644 index 2c1664d7d0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/ggi/blah +++ /dev/null @@ -1,2 +0,0 @@ -Terminating on signal 11 - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/ggi/blat b/nx-X11/extras/Mesa_6.4.2/progs/ggi/blat deleted file mode 100644 index 7ff64a9d10..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/ggi/blat +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -function foobar() { - echo "foo!" -} - -foobar diff --git a/nx-X11/extras/Mesa_6.4.2/progs/ggi/box.asc b/nx-X11/extras/Mesa_6.4.2/progs/ggi/box.asc deleted file mode 100644 index f8b23fd85a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/ggi/box.asc +++ /dev/null @@ -1,66 +0,0 @@ -Ambient light color: Red=0.039216 Green=0.039216 Blue=0.039216 - -Named object: "Object01" -Tri-mesh, Vertices: 8 Faces: 12 -Vertex list: -Vertex 0: X: -20 Y: -19.999998 Z: 20.000002 -Vertex 1: X: 20 Y: -19.999998 Z: 20.000002 -Vertex 2: X: 20 Y: 20.000002 Z: 19.999998 -Vertex 3: X: -20 Y: 20.000002 Z: 19.999998 -Vertex 4: X: -20 Y: -20.000002 Z: -19.999998 -Vertex 5: X: 20 Y: -20.000002 Z: -19.999998 -Vertex 6: X: 20 Y: 19.999998 Z: -20.000002 -Vertex 7: X: -20 Y: 19.999998 Z: -20.000002 -Face list: -Face 0: A:0 B:1 C:2 AB:1 BC:1 CA:0 -Smoothing: 1 -Face 1: A:0 B:2 C:3 AB:0 BC:1 CA:1 -Smoothing: 1 -Face 2: A:0 B:4 C:5 AB:1 BC:1 CA:0 -Smoothing: 2 -Face 3: A:0 B:5 C:1 AB:0 BC:1 CA:1 -Smoothing: 2 -Face 4: A:1 B:5 C:6 AB:1 BC:1 CA:0 -Smoothing: 3 -Face 5: A:1 B:6 C:2 AB:0 BC:1 CA:1 -Smoothing: 3 -Face 6: A:2 B:6 C:7 AB:1 BC:1 CA:0 -Smoothing: 4 -Face 7: A:2 B:7 C:3 AB:0 BC:1 CA:1 -Smoothing: 4 -Face 8: A:3 B:7 C:4 AB:1 BC:1 CA:0 -Smoothing: 5 -Face 9: A:3 B:4 C:0 AB:0 BC:1 CA:1 -Smoothing: 5 -Face 10: A:4 B:7 C:6 AB:1 BC:1 CA:0 -Smoothing: 6 -Face 11: A:4 B:6 C:5 AB:0 BC:1 CA:1 -Smoothing: 6 - - - - - - - - - - - - - - - - - - - - - - - - - Page 1 - - - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/ggi/cone.asc b/nx-X11/extras/Mesa_6.4.2/progs/ggi/cone.asc deleted file mode 100644 index 5c52285996..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/ggi/cone.asc +++ /dev/null @@ -1,198 +0,0 @@ -Ambient light color: Red=0.039216 Green=0.039216 Blue=0.039216 - -Named object: "Object01" -Tri-mesh, Vertices: 34 Faces: 64 -Vertex list: -Vertex 0: X: 60.167416 Y: -87.419525 Z: -53.3088 -Vertex 1: X: 76.70787 Y: -87.419518 Z: -29.84565 -Vertex 2: X: 83.0103 Y: -87.419518 Z: -1.838764 -Vertex 3: X: 78.115204 Y: -87.419518 Z: 26.448057 -Vertex 4: X: 62.767834 Y: -87.41951 Z: 50.708401 -Vertex 5: X: 39.304672 Y: -87.41951 Z: 67.248848 -Vertex 6: X: 11.297782 Y: -87.41951 Z: 73.551254 -Vertex 7: X: -16.989004 Y: -87.41951 Z: 68.656158 -Vertex 8: X: -41.249344 Y: -87.41951 Z: 53.308777 -Vertex 9: X: -57.789783 Y: -87.419518 Z: 29.845612 -Vertex 10: X: -64.092194 Y: -87.419518 Z: 1.838721 -Vertex 11: X: -59.197079 Y: -87.419518 Z: -26.448097 -Vertex 12: X: -43.849678 Y: -87.419525 Z: -50.708427 -Vertex 13: X: -20.386503 Y: -87.419525 Z: -67.248856 -Vertex 14: X: 7.62039 Y: -87.419525 Z: -73.551239 -Vertex 15: X: 35.907204 Y: -87.419525 Z: -68.656105 -Vertex 16: X: 101.684875 Y: 94.590591 Z: -96.955391 -Vertex 17: X: 131.767838 Y: 94.590591 Z: -54.281792 -Vertex 18: X: 143.230377 Y: 94.590599 Z: -3.344275 -Vertex 19: X: 134.327423 Y: 94.590607 Z: 48.102379 -Vertex 20: X: 106.414383 Y: 94.590607 Z: 92.225876 -Vertex 21: X: 63.740765 Y: 94.590607 Z: 122.3088 -Vertex 22: X: 12.803238 Y: 94.590614 Z: 133.771301 -Vertex 23: X: -38.643349 Y: 94.590607 Z: 124.868355 -Vertex 24: X: -82.766846 Y: 94.590607 Z: 96.955307 -Vertex 25: X: -112.849762 Y: 94.590607 Z: 54.281677 -Vertex 26: X: -124.312256 Y: 94.590599 Z: 3.344152 -Vertex 27: X: -115.409271 Y: 94.590591 Z: -48.102493 -Vertex 28: X: -87.496201 Y: 94.590591 Z: -92.225967 -Vertex 29: X: -44.822552 Y: 94.590591 Z: -122.308861 -Vertex 30: X: 6.114983 Y: 94.590584 Z: -133.771332 -Vertex 31: X: 57.561623 Y: 94.590591 Z: -124.868301 -Vertex 32: X: 9.459057 Y: -87.419518 Z: 0.000008 -Vertex 33: X: 9.459057 Y: 94.590599 Z: -0.000008 -Face list: -Face 0: A:0 B:1 C:32 AB:1 BC:0 CA:0 -Smoothing: 1 -Face 1: A:1 B:2 C:32 AB:1 BC:0 CA:0 -Smoothing: 1 -Face 2: A:2 B:3 C:32 AB:1 BC:0 CA:0 -Smoothing: 1 -Face 3: A:3 B:4 C:32 AB:1 BC:0 CA:0 -Smoothing: 1 -Face 4: A:4 B:5 C:32 AB:1 BC:0 CA:0 -Smoothing: 1 -Face 5: A:5 B:6 C:32 AB:1 BC:0 CA:0 -Smoothing: 1 -Face 6: A:6 B:7 C:32 AB:1 BC:0 CA:0 -Smoothing: 1 -Face 7: A:7 B:8 C:32 AB:1 BC:0 CA:0 -Smoothing: 1 -Face 8: A:8 B:9 C:32 AB:1 BC:0 CA:0 -Smoothing: 1 -Face 9: A:9 B:10 C:32 AB:1 BC:0 CA:0 -Smoothing: 1 -Face 10: A:10 B:11 C:32 AB:1 BC:0 CA:0 - - Page 1 - - - -Smoothing: 1 -Face 11: A:11 B:12 C:32 AB:1 BC:0 CA:0 -Smoothing: 1 -Face 12: A:12 B:13 C:32 AB:1 BC:0 CA:0 -Smoothing: 1 -Face 13: A:13 B:14 C:32 AB:1 BC:0 CA:0 -Smoothing: 1 -Face 14: A:14 B:15 C:32 AB:1 BC:0 CA:0 -Smoothing: 1 -Face 15: A:15 B:0 C:32 AB:1 BC:0 CA:0 -Smoothing: 1 -Face 16: A:0 B:16 C:17 AB:1 BC:1 CA:0 -Smoothing: 2 -Face 17: A:0 B:17 C:1 AB:0 BC:1 CA:1 -Smoothing: 2 -Face 18: A:1 B:17 C:18 AB:1 BC:1 CA:0 -Smoothing: 3 -Face 19: A:1 B:18 C:2 AB:0 BC:1 CA:1 -Smoothing: 3 -Face 20: A:2 B:18 C:19 AB:1 BC:1 CA:0 -Smoothing: 4 -Face 21: A:2 B:19 C:3 AB:0 BC:1 CA:1 -Smoothing: 4 -Face 22: A:3 B:19 C:20 AB:1 BC:1 CA:0 -Smoothing: 5 -Face 23: A:3 B:20 C:4 AB:0 BC:1 CA:1 -Smoothing: 5 -Face 24: A:4 B:20 C:21 AB:1 BC:1 CA:0 -Smoothing: 6 -Face 25: A:4 B:21 C:5 AB:0 BC:1 CA:1 -Smoothing: 6 -Face 26: A:5 B:21 C:22 AB:1 BC:1 CA:0 -Smoothing: 7 -Face 27: A:5 B:22 C:6 AB:0 BC:1 CA:1 -Smoothing: 7 -Face 28: A:6 B:22 C:23 AB:1 BC:1 CA:0 -Smoothing: 8 -Face 29: A:6 B:23 C:7 AB:0 BC:1 CA:1 -Smoothing: 8 -Face 30: A:7 B:23 C:24 AB:1 BC:1 CA:0 -Smoothing: 9 -Face 31: A:7 B:24 C:8 AB:0 BC:1 CA:1 -Smoothing: 9 -Face 32: A:8 B:24 C:25 AB:1 BC:1 CA:0 -Smoothing: 10 -Face 33: A:8 B:25 C:9 AB:0 BC:1 CA:1 -Smoothing: 10 -Face 34: A:9 B:25 C:26 AB:1 BC:1 CA:0 -Smoothing: 11 -Face 35: A:9 B:26 C:10 AB:0 BC:1 CA:1 -Smoothing: 11 -Face 36: A:10 B:26 C:27 AB:1 BC:1 CA:0 -Smoothing: 12 -Face 37: A:10 B:27 C:11 AB:0 BC:1 CA:1 -Smoothing: 12 -Face 38: A:11 B:27 C:28 AB:1 BC:1 CA:0 -Smoothing: 13 -Face 39: A:11 B:28 C:12 AB:0 BC:1 CA:1 -Smoothing: 13 -Face 40: A:12 B:28 C:29 AB:1 BC:1 CA:0 -Smoothing: 14 - - Page 2 - - - -Face 41: A:12 B:29 C:13 AB:0 BC:1 CA:1 -Smoothing: 14 -Face 42: A:13 B:29 C:30 AB:1 BC:1 CA:0 -Smoothing: 15 -Face 43: A:13 B:30 C:14 AB:0 BC:1 CA:1 -Smoothing: 15 -Face 44: A:14 B:30 C:31 AB:1 BC:1 CA:0 -Smoothing: 16 -Face 45: A:14 B:31 C:15 AB:0 BC:1 CA:1 -Smoothing: 16 -Face 46: A:15 B:31 C:16 AB:1 BC:1 CA:0 -Smoothing: 17 -Face 47: A:15 B:16 C:0 AB:0 BC:1 CA:1 -Smoothing: 17 -Face 48: A:16 B:33 C:17 AB:0 BC:0 CA:1 -Smoothing: 18 -Face 49: A:17 B:33 C:18 AB:0 BC:0 CA:1 -Smoothing: 18 -Face 50: A:18 B:33 C:19 AB:0 BC:0 CA:1 -Smoothing: 18 -Face 51: A:19 B:33 C:20 AB:0 BC:0 CA:1 -Smoothing: 18 -Face 52: A:20 B:33 C:21 AB:0 BC:0 CA:1 -Smoothing: 18 -Face 53: A:21 B:33 C:22 AB:0 BC:0 CA:1 -Smoothing: 18 -Face 54: A:22 B:33 C:23 AB:0 BC:0 CA:1 -Smoothing: 18 -Face 55: A:23 B:33 C:24 AB:0 BC:0 CA:1 -Smoothing: 18 -Face 56: A:24 B:33 C:25 AB:0 BC:0 CA:1 -Smoothing: 18 -Face 57: A:25 B:33 C:26 AB:0 BC:0 CA:1 -Smoothing: 18 -Face 58: A:26 B:33 C:27 AB:0 BC:0 CA:1 -Smoothing: 18 -Face 59: A:27 B:33 C:28 AB:0 BC:0 CA:1 -Smoothing: 18 -Face 60: A:28 B:33 C:29 AB:0 BC:0 CA:1 -Smoothing: 18 -Face 61: A:29 B:33 C:30 AB:0 BC:0 CA:1 -Smoothing: 18 -Face 62: A:30 B:33 C:31 AB:0 BC:0 CA:1 -Smoothing: 18 -Face 63: A:31 B:33 C:16 AB:0 BC:0 CA:1 -Smoothing: 18 - - - - - - - - - - - - - - - - - Page 3 - - - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/ggi/gears.c b/nx-X11/extras/Mesa_6.4.2/progs/ggi/gears.c deleted file mode 100644 index ac2e9f2a6e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/ggi/gears.c +++ /dev/null @@ -1,340 +0,0 @@ -/* $Id: gears.c,v 1.3 1999/08/22 08:56:50 jtaylor Exp $ */ - -/* - * 3-D gear wheels. This program is in the public domain. - * - * Brian Paul - */ - -/* Conversion to GLUT by Mark J. Kilgard */ - -#include -#include -#include -#include - -#ifndef M_PI -#define M_PI 3.14159265 -#endif - -static GLint T0 = 0; -static GLint Frames = 0; - - -/** - - Draw a gear wheel. You'll probably want to call this function when - building a display list since we do a lot of trig here. - - Input: inner_radius - radius of hole at center - outer_radius - radius at center of teeth - width - width of gear - teeth - number of teeth - tooth_depth - depth of tooth - - **/ - -static void -gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, - GLint teeth, GLfloat tooth_depth) -{ - GLint i; - GLfloat r0, r1, r2; - GLfloat angle, da; - GLfloat u, v, len; - - r0 = inner_radius; - r1 = outer_radius - tooth_depth / 2.0; - r2 = outer_radius + tooth_depth / 2.0; - - da = 2.0 * M_PI / teeth / 4.0; - - glShadeModel(GL_FLAT); - - glNormal3f(0.0, 0.0, 1.0); - - /* draw front face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - if (i < teeth) { - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); - } - } - glEnd(); - - /* draw front sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); - } - glEnd(); - - glNormal3f(0.0, 0.0, -1.0); - - /* draw back face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - if (i < teeth) { - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - } - } - glEnd(); - - /* draw back sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - } - glEnd(); - - /* draw outward faces of teeth */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - u = r2 * cos(angle + da) - r1 * cos(angle); - v = r2 * sin(angle + da) - r1 * sin(angle); - len = sqrt(u * u + v * v); - u /= len; - v /= len; - glNormal3f(v, -u, 0.0); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5); - u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); - v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); - glNormal3f(v, -u, 0.0); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - } - - glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5); - glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5); - - glEnd(); - - glShadeModel(GL_SMOOTH); - - /* draw inside radius cylinder */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glNormal3f(-cos(angle), -sin(angle), 0.0); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - } - glEnd(); - -} - -static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0; -static GLint gear1, gear2, gear3; -static GLfloat angle = 0.0; - -static void -draw(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - glRotatef(view_rotx, 1.0, 0.0, 0.0); - glRotatef(view_roty, 0.0, 1.0, 0.0); - glRotatef(view_rotz, 0.0, 0.0, 1.0); - - glPushMatrix(); - glTranslatef(-3.0, -2.0, 0.0); - glRotatef(angle, 0.0, 0.0, 1.0); - glCallList(gear1); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(3.1, -2.0, 0.0); - glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0); - glCallList(gear2); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(-3.1, 4.2, 0.0); - glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0); - glCallList(gear3); - glPopMatrix(); - - glPopMatrix(); - - glutSwapBuffers(); - - Frames++; - { - GLint t = glutGet(GLUT_ELAPSED_TIME); - if (t - T0 >= 5000) { - GLfloat seconds = (t - T0) / 1000.0; - GLfloat fps = Frames / seconds; - printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps); - T0 = t; - Frames = 0; - } - } -} - - -static void -idle(void) -{ - angle += 2.0; - glutPostRedisplay(); -} - -/* change view angle, exit upon ESC */ -/* ARGSUSED1 */ -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 'z': - view_rotz += 5.0; - break; - case 'Z': - view_rotz -= 5.0; - break; - case 27: /* Escape */ - exit(0); /* FIXME: Shutdown and free resources cleanly in ggiglut */ - break; - default: - return; - } - glutPostRedisplay(); -} - -/* change view angle */ -/* ARGSUSED1 */ -static void -special(int k, int x, int y) -{ - switch (k) { - case GLUT_KEY_UP: - view_rotx += 5.0; - break; - case GLUT_KEY_DOWN: - view_rotx -= 5.0; - break; - case GLUT_KEY_LEFT: - view_roty += 5.0; - break; - case GLUT_KEY_RIGHT: - view_roty -= 5.0; - break; - default: - return; - } - glutPostRedisplay(); -} - -/* new window size or exposure */ -static void -reshape(int width, int height) -{ - GLfloat h = (GLfloat) height / (GLfloat) width; - - glViewport(0, 0, (GLint) width, (GLint) height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -40.0); -} - -static void -init(void) -{ - static GLfloat pos[4] = - {5.0, 5.0, 10.0, 0.0}; - static GLfloat red[4] = - {0.8, 0.1, 0.0, 1.0}; - static GLfloat green[4] = - {0.0, 0.8, 0.2, 1.0}; - static GLfloat blue[4] = - {0.2, 0.2, 1.0, 1.0}; - - glLightfv(GL_LIGHT0, GL_POSITION, pos); - glEnable(GL_CULL_FACE); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - /* make the gears */ - gear1 = glGenLists(1); - glNewList(gear1, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); - gear(1.0, 4.0, 1.0, 20, 0.7); - glEndList(); - - gear2 = glGenLists(1); - glNewList(gear2, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); - gear(0.5, 2.0, 2.0, 10, 0.7); - glEndList(); - - gear3 = glGenLists(1); - glNewList(gear3, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); - gear(1.3, 2.0, 0.5, 10, 0.7); - glEndList(); - - glEnable(GL_NORMALIZE); -} - -void -visible(int vis) -{ - if (vis == GLUT_VISIBLE) - glutIdleFunc(idle); - else - glutIdleFunc(NULL); -} - -int main(int argc, char *argv[]) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); - -// glutInitWindowPosition(0, 0); -// glutInitWindowSize(300, 300); - glutCreateWindow("Gears"); - init(); - - glutDisplayFunc(draw); - glutReshapeFunc(reshape); - glutKeyboardFunc(key); - glutSpecialFunc(special); - glutVisibilityFunc(visible); - - glutMainLoop(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/ggi/gears2.c b/nx-X11/extras/Mesa_6.4.2/progs/ggi/gears2.c deleted file mode 100644 index 9468c03177..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/ggi/gears2.c +++ /dev/null @@ -1,390 +0,0 @@ -/* gears.c */ - -/* - * 3-D gear wheels. This program is in the public domain. - * - * Brian Paul - * modified by Uwe Maurer (uwe_maurer@t-online.de) - */ - -#include -#include -#include -#include -#include -#ifndef M_PI -# define M_PI 3.14159265 -#endif - - -ggi_visual_t vis; -char text[100]; -int db_flag,vis_x, vis_y, vir_x, vir_y, gt; - -/* - * Draw a gear wheel. You'll probably want to call this function when - * building a display list since we do a lot of trig here. - * - * Input: inner_radius - radius of hole at center - * outer_radius - radius at center of teeth - * width - width of gear - * teeth - number of teeth - * tooth_depth - depth of tooth - */ -static void gear( GLfloat inner_radius, GLfloat outer_radius, GLfloat width, - GLint teeth, GLfloat tooth_depth ) -{ - GLint i; - GLfloat r0, r1, r2; - GLfloat angle, da; - GLfloat u, v, len; - - r0 = inner_radius; - r1 = outer_radius - tooth_depth/2.0; - r2 = outer_radius + tooth_depth/2.0; - - da = 2.0*M_PI / teeth / 4.0; - - glShadeModel( GL_FLAT ); - - glNormal3f( 0.0, 0.0, 1.0 ); - - /* draw front face */ - glBegin( GL_QUAD_STRIP ); - for (i=0;i<=teeth;i++) { - angle = i * 2.0*M_PI / teeth; - glVertex3f( r0*cos(angle), r0*sin(angle), width*0.5 ); - glVertex3f( r1*cos(angle), r1*sin(angle), width*0.5 ); - glVertex3f( r0*cos(angle), r0*sin(angle), width*0.5 ); - glVertex3f( r1*cos(angle+3*da), r1*sin(angle+3*da), width*0.5 ); - } - glEnd(); - - /* draw front sides of teeth */ - glBegin( GL_QUADS ); - da = 2.0*M_PI / teeth / 4.0; - for (i=0;i GGI"); - ggiPuts(vis,0,ggiGetInfo(vis)->mode->visible.y," Mesa -> GGI"); - - ggiPuts(vis,0,16,text); - ggiPuts(vis,0,ggiGetInfo(vis)->mode->visible.y+16,text); -#endif - - if(db_flag) - ggiMesaSwapBuffers(); - - count++; - if (count==limit) { - exit(1); - } - ++n; - /* - if (!(n%10)){ - ggi_color rgb = { 10000, 10000, 10000 }; - ggiSetSimpleMode(vis,vis_x+(n/10),vis_y+(n/10),db_flag?2:1, gt); - glViewport(0, 0,vis_x+(n/10),vis_y+(n/10)); - ggiSetGCForeground(vis, ggiMapColor(vis, &rgb)); - ggiDrawBox(vis, 20, 20, 100, 100); - if(db_flag) - ggiSetWriteFrame(vis, 1); - } - */ -} - -static void idle( void ) -{ - angle += 2.0; - draw(); -} - -/* new window size or exposure */ -static void reshape( int width, int height ) -{ - GLfloat h = (GLfloat) height / (GLfloat) width; - - if(db_flag) - glDrawBuffer(GL_BACK); - else - glDrawBuffer(GL_FRONT); - glViewport(0, 0, (GLint)width, (GLint)height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -h, h, 5.0, 60.0 ); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -40.0 ); - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - -} - - -static void init( void ) -{ - static GLfloat pos[4] = {5.0, 5.0, 10.0, 0.0 }; - static GLfloat red[4] = {0.9, 0.9, 0.9, 1.0 }; - static GLfloat green[4] = {0.0, 0.8, 0.9, 1.0 }; - static GLfloat blue[4] = {0.2, 0.2, 1.0, 1.0 }; - - glLightfv( GL_LIGHT0, GL_POSITION, pos ); - glEnable( GL_CULL_FACE ); - glEnable( GL_LIGHTING ); - glEnable( GL_LIGHT0 ); - glEnable( GL_DEPTH_TEST ); - - /* make the gears */ - gear1 = glGenLists(1); - glNewList(gear1, GL_COMPILE); - glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red ); - glIndexi(1); - gear( 1.0, 4.0, 1.0, 20, 0.7 ); - glEndList(); - - gear2 = glGenLists(1); - glNewList(gear2, GL_COMPILE); - glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green ); - glIndexi(2); - gear( 0.5, 2.0, 2.0, 10, 0.7 ); - glEndList(); - - gear3 = glGenLists(1); - glNewList(gear3, GL_COMPILE); - glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue ); - glIndexi(3); - gear( 1.3, 2.0, 0.5, 10, 0.7 ); - glEndList(); - - glEnable( GL_NORMALIZE ); -} - -static void usage(char *s) -{ - printf("%s visible_x visible_y virtual_x virtual_y bpp db_flag\n",s); - printf("example:\n"); - printf("%s 320 200 320 400 8 1\n",s); - exit(1); -} - -int main( int argc, char *argv[] ) -{ - ggi_mesa_context_t ctx; - ggi_mode mode; - int bpp; - - limit=0; - - if (argc<7) usage(argv[0]); - - vis_x=atoi(argv[1]); - vis_y=atoi(argv[2]); - vir_x=atoi(argv[3]); - vir_y=atoi(argv[4]); - bpp=atoi(argv[5]); - db_flag=atoi(argv[6]); - - switch(bpp) - { - case 4: gt=GT_4BIT;break; - case 8: gt=GT_8BIT;break; - case 15:gt=GT_15BIT;break; - case 16:gt=GT_16BIT;break; - case 24:gt=GT_24BIT;break; - case 32:gt=GT_32BIT;break; - default: - printf("%i Bits per Pixel ???\n",bpp); - exit(1); - } - sprintf(text,"%sx%s %i colors, RGB mode, %s", - argv[1],argv[2],1< /dev/null - - -# Emacs tags -tags: - etags `find . -name \*.[ch]` `find ../include` - - -include depend diff --git a/nx-X11/extras/Mesa_6.4.2/progs/miniglx/glfbdevtest.c b/nx-X11/extras/Mesa_6.4.2/progs/miniglx/glfbdevtest.c deleted file mode 100644 index c82ca6e5f6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/miniglx/glfbdevtest.c +++ /dev/null @@ -1,478 +0,0 @@ -/* $Id: glfbdevtest.c,v 1.1 2003/08/06 17:47:15 keithw Exp $ */ - -/* - * Test the GLFBDev interface. Only tested with radeonfb driver!!!! - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "GL/glfbdev.h" - -#define DEFAULT_DEPTH 8 - -static struct fb_fix_screeninfo FixedInfo; -static struct fb_var_screeninfo VarInfo, OrigVarInfo; -static int DesiredDepth = 0; -static int OriginalVT = -1; -static int ConsoleFD = -1; -static int FrameBufferFD = -1; -static caddr_t FrameBuffer = (caddr_t) -1; -static caddr_t MMIOAddress = (caddr_t) -1; - - -static void -print_fixed_info(const struct fb_fix_screeninfo *fixed, const char *s) -{ - static const char *visuals[] = { - "MONO01", "MONO10", "TRUECOLOR", "PSEUDOCOLOR", - "DIRECTCOLOR", "STATIC_PSEUDOCOLOR" - }; - - printf("%s info -----------------------\n", s); - printf("id = %16s\n", fixed->id); - printf("smem_start = 0x%x\n", fixed->smem_start); - printf("smem_len = %d (0x%x)\n", fixed->smem_len, fixed->smem_len); - printf("type = 0x%x\n", fixed->type); - printf("type_aux = 0x%x\n", fixed->type_aux); - printf("visual = 0x%x (%s)\n", fixed->visual, visuals[fixed->visual]); - printf("xpanstep = %d\n", fixed->xpanstep); - printf("ypanstep = %d\n", fixed->ypanstep); - printf("ywrapstep = %d\n", fixed->ywrapstep); - printf("line_length = %d\n", fixed->line_length); - printf("mmio_start = 0x%x\n", fixed->mmio_start); - printf("mmio_len = %d (0x%x)\n", fixed->mmio_len, fixed->mmio_len); - printf("accel = 0x%x\n", fixed->accel); -} - - -static void -print_var_info(const struct fb_var_screeninfo *var, const char *s) -{ - printf("%s info -----------------------\n", s); - printf("xres = %d\n", var->xres); - printf("yres = %d\n", var->yres); - printf("xres_virtual = %d\n", var->xres_virtual); - printf("yres_virtual = %d\n", var->yres_virtual); - printf("xoffset = %d\n", var->xoffset); - printf("yoffset = %d\n", var->yoffset); - printf("bits_per_pixel = %d\n", var->bits_per_pixel); - printf("grayscale = %d\n", var->grayscale); - - printf("red.offset = %d length = %d msb_right = %d\n", - var->red.offset, var->red.length, var->red.msb_right); - printf("green.offset = %d length = %d msb_right = %d\n", - var->green.offset, var->green.length, var->green.msb_right); - printf("blue.offset = %d length = %d msb_right = %d\n", - var->blue.offset, var->blue.length, var->blue.msb_right); - printf("transp.offset = %d length = %d msb_right = %d\n", - var->transp.offset, var->transp.length, var->transp.msb_right); - - printf("nonstd = %d\n", var->nonstd); - printf("activate = %d\n", var->activate); - printf("height = %d mm\n", var->height); - printf("width = %d mm\n", var->width); - printf("accel_flags = 0x%x\n", var->accel_flags); - printf("pixclock = %d\n", var->pixclock); - printf("left_margin = %d\n", var->left_margin); - printf("right_margin = %d\n", var->right_margin); - printf("upper_margin = %d\n", var->upper_margin); - printf("lower_margin = %d\n", var->lower_margin); - printf("hsync_len = %d\n", var->hsync_len); - printf("vsync_len = %d\n", var->vsync_len); - printf("sync = %d\n", var->sync); - printf("vmode = %d\n", var->vmode); -} - - -static void -signal_handler(int signumber) -{ - signal(signumber, SIG_IGN); /* prevent recursion! */ - fprintf(stderr, "error: got signal %d (exiting)\n", signumber); - exit(1); -} - - -static void -initialize_fbdev( void ) -{ - char ttystr[1000]; - int fd, vtnumber, ttyfd; - int sz; - - if (geteuid()) { - fprintf(stderr, "error: you need to be root\n"); - exit(1); - } - -#if 1 - /* open the framebuffer device */ - FrameBufferFD = open("/dev/fb0", O_RDWR); - if (FrameBufferFD < 0) { - fprintf(stderr, "Error opening /dev/fb0: %s\n", strerror(errno)); - exit(1); - } -#endif - - /* open /dev/tty0 and get the vt number */ - if ((fd = open("/dev/tty0", O_WRONLY, 0)) < 0) { - fprintf(stderr, "error opening /dev/tty0\n"); - exit(1); - } - if (ioctl(fd, VT_OPENQRY, &vtnumber) < 0 || vtnumber < 0) { - fprintf(stderr, "error: couldn't get a free vt\n"); - exit(1); - } - close(fd); - - /* open the console tty */ - sprintf(ttystr, "/dev/tty%d", vtnumber); /* /dev/tty1-64 */ - ConsoleFD = open(ttystr, O_RDWR | O_NDELAY, 0); - if (ConsoleFD < 0) { - fprintf(stderr, "error couldn't open console fd\n"); - exit(1); - } - - /* save current vt number */ - { - struct vt_stat vts; - if (ioctl(ConsoleFD, VT_GETSTATE, &vts) == 0) - OriginalVT = vts.v_active; - } - - /* disconnect from controlling tty */ - ttyfd = open("/dev/tty", O_RDWR); - if (ttyfd >= 0) { - ioctl(ttyfd, TIOCNOTTY, 0); - close(ttyfd); - } - - /* some magic to restore the vt when we exit */ - { - struct vt_mode vt; - if (ioctl(ConsoleFD, VT_ACTIVATE, vtnumber) != 0) - printf("ioctl VT_ACTIVATE: %s\n", strerror(errno)); - if (ioctl(ConsoleFD, VT_WAITACTIVE, vtnumber) != 0) - printf("ioctl VT_WAITACTIVE: %s\n", strerror(errno)); - - if (ioctl(ConsoleFD, VT_GETMODE, &vt) < 0) { - fprintf(stderr, "error: ioctl VT_GETMODE: %s\n", strerror(errno)); - exit(1); - } - - vt.mode = VT_PROCESS; - vt.relsig = SIGUSR1; - vt.acqsig = SIGUSR1; - if (ioctl(ConsoleFD, VT_SETMODE, &vt) < 0) { - fprintf(stderr, "error: ioctl(VT_SETMODE) failed: %s\n", - strerror(errno)); - exit(1); - } - } - - /* go into graphics mode */ - if (ioctl(ConsoleFD, KDSETMODE, KD_GRAPHICS) < 0) { - fprintf(stderr, "error: ioctl(KDSETMODE, KD_GRAPHICS) failed: %s\n", - strerror(errno)); - exit(1); - } - - -#if 0 - /* open the framebuffer device */ - FrameBufferFD = open("/dev/fb0", O_RDWR); - if (FrameBufferFD < 0) { - fprintf(stderr, "Error opening /dev/fb0: %s\n", strerror(errno)); - exit(1); - } -#endif - - /* Get the fixed screen info */ - if (ioctl(FrameBufferFD, FBIOGET_FSCREENINFO, &FixedInfo)) { - fprintf(stderr, "error: ioctl(FBIOGET_FSCREENINFO) failed: %s\n", - strerror(errno)); - exit(1); - } - - print_fixed_info(&FixedInfo, "Fixed"); - - - /* get the variable screen info */ - if (ioctl(FrameBufferFD, FBIOGET_VSCREENINFO, &OrigVarInfo)) { - fprintf(stderr, "error: ioctl(FBIOGET_VSCREENINFO) failed: %s\n", - strerror(errno)); - exit(1); - } - - print_var_info(&OrigVarInfo, "Orig Var"); - - /* operate on a copy */ - VarInfo = OrigVarInfo; - - /* set the depth, resolution, etc */ - DesiredDepth = 32; - if (DesiredDepth) - VarInfo.bits_per_pixel = DesiredDepth; - - if (VarInfo.bits_per_pixel == 16) { - VarInfo.red.offset = 11; - VarInfo.green.offset = 5; - VarInfo.blue.offset = 0; - VarInfo.red.length = 5; - VarInfo.green.length = 6; - VarInfo.blue.length = 5; - VarInfo.transp.offset = 0; - VarInfo.transp.length = 0; - } - else if (VarInfo.bits_per_pixel == 32) { - VarInfo.red.offset = 16; - VarInfo.green.offset = 8; - VarInfo.blue.offset = 0; - VarInfo.transp.offset = 24; - VarInfo.red.length = 8; - VarInfo.green.length = 8; - VarInfo.blue.length = 8; - VarInfo.transp.length = 8; - } - /* timing values taken from /etc/fb.modes (1280x1024 @ 75Hz) */ - VarInfo.xres_virtual = VarInfo.xres = 1280; - VarInfo.yres_virtual = VarInfo.yres = 1024; - VarInfo.pixclock = 7408; - VarInfo.left_margin = 248; - VarInfo.right_margin = 16; - VarInfo.upper_margin = 38; - VarInfo.lower_margin = 1; - VarInfo.hsync_len = 144; - VarInfo.vsync_len = 3; - - VarInfo.xoffset = 0; - VarInfo.yoffset = 0; - VarInfo.nonstd = 0; - VarInfo.vmode &= ~FB_VMODE_YWRAP; /* turn off scrolling */ - - /* set new variable screen info */ - if (ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &VarInfo)) { - fprintf(stderr, "ioctl(FBIOPUT_VSCREENINFO failed): %s\n", - strerror(errno)); - exit(1); - } - - print_var_info(&VarInfo, "New Var"); - - if (FixedInfo.visual != FB_VISUAL_TRUECOLOR && - FixedInfo.visual != FB_VISUAL_DIRECTCOLOR) { - fprintf(stderr, "non-TRUE/DIRECT-COLOR visuals (0x%x) not supported by this demo.\n", FixedInfo.visual); - exit(1); - } - - /* initialize colormap */ - if (FixedInfo.visual == FB_VISUAL_DIRECTCOLOR) { - struct fb_cmap cmap; - unsigned short red[256], green[256], blue[256]; - int i; - - /* we're assuming 256 entries here */ - printf("initializing directcolor colormap\n"); - cmap.start = 0; - cmap.len = 256; - cmap.red = red; - cmap.green = green; - cmap.blue = blue; - cmap.transp = NULL; - for (i = 0; i < cmap.len; i++) { - red[i] = green[i] = blue[i] = (i << 8) | i; - } - if (ioctl(FrameBufferFD, FBIOPUTCMAP, (void *) &cmap) < 0) { - fprintf(stderr, "ioctl(FBIOPUTCMAP) failed [%d]\n", i); - } - } - - /* - * fbdev says the frame buffer is at offset zero, and the mmio region - * is immediately after. - */ - - /* mmap the framebuffer into our address space */ - FrameBuffer = (caddr_t) mmap(0, /* start */ - FixedInfo.smem_len, /* bytes */ - PROT_READ | PROT_WRITE, /* prot */ - MAP_SHARED, /* flags */ - FrameBufferFD, /* fd */ - 0 /* offset */); - if (FrameBuffer == (caddr_t) - 1) { - fprintf(stderr, "error: unable to mmap framebuffer: %s\n", - strerror(errno)); - exit(1); - } - printf("FrameBuffer = %p\n", FrameBuffer); - -#if 1 - /* mmap the MMIO region into our address space */ - MMIOAddress = (caddr_t) mmap(0, /* start */ - FixedInfo.mmio_len, /* bytes */ - PROT_READ | PROT_WRITE, /* prot */ - MAP_SHARED, /* flags */ - FrameBufferFD, /* fd */ - FixedInfo.smem_len /* offset */); - if (MMIOAddress == (caddr_t) - 1) { - fprintf(stderr, "error: unable to mmap mmio region: %s\n", - strerror(errno)); - } - printf("MMIOAddress = %p\n", MMIOAddress); - - /* try out some simple MMIO register reads */ - if (1) - { - typedef unsigned int CARD32; - typedef unsigned char CARD8; -#define RADEON_CONFIG_MEMSIZE 0x00f8 -#define RADEON_MEM_SDRAM_MODE_REG 0x0158 -#define MMIO_IN32(base, offset) \ - *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) -#define INREG(addr) MMIO_IN32(MMIOAddress, addr) - int sz, type; - const char *typeStr[] = {"SDR", "DDR", "64-bit SDR"}; - sz = INREG(RADEON_CONFIG_MEMSIZE); - type = INREG(RADEON_MEM_SDRAM_MODE_REG); - printf("RADEON_CONFIG_MEMSIZE = %d (%d MB)\n", sz, sz / 1024 / 1024); - printf("RADEON_MEM_SDRAM_MODE_REG >> 30 = %d (%s)\n", - type >> 30, typeStr[type>>30]); - } -#endif - -} - - -static void -shutdown_fbdev( void ) -{ - struct vt_mode VT; - - printf("cleaning up...\n"); - /* restore original variable screen info */ - if (ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &OrigVarInfo)) { - fprintf(stderr, "ioctl(FBIOPUT_VSCREENINFO failed): %s\n", - strerror(errno)); - exit(1); - } - - munmap(MMIOAddress, FixedInfo.mmio_len); - munmap(FrameBuffer, FixedInfo.smem_len); - close(FrameBufferFD); - - /* restore text mode */ - ioctl(ConsoleFD, KDSETMODE, KD_TEXT); - - /* set vt */ - if (ioctl(ConsoleFD, VT_GETMODE, &VT) != -1) { - VT.mode = VT_AUTO; - ioctl(ConsoleFD, VT_SETMODE, &VT); - } - - /* restore original vt */ - if (OriginalVT >= 0) { - ioctl(ConsoleFD, VT_ACTIVATE, OriginalVT); - OriginalVT = -1; - } - - close(ConsoleFD); -} - - -static void -gltest( void ) -{ - static const int attribs[] = { - GLFBDEV_DOUBLE_BUFFER, - GLFBDEV_DEPTH_SIZE, 16, - GLFBDEV_NONE - }; - GLFBDevContextPtr ctx; - GLFBDevBufferPtr buf; - GLFBDevVisualPtr vis; - int bytes, r, g, b, a; - float ang; - - printf("GLFBDEV_VENDOR = %s\n", glFBDevGetString(GLFBDEV_VENDOR)); - printf("GLFBDEV_VERSION = %s\n", glFBDevGetString(GLFBDEV_VERSION)); - - /* framebuffer size */ - bytes = VarInfo.xres_virtual * VarInfo.yres_virtual * VarInfo.bits_per_pixel / 8; - - vis = glFBDevCreateVisual( &FixedInfo, &VarInfo, attribs ); - assert(vis); - - buf = glFBDevCreateBuffer( &FixedInfo, &VarInfo, vis, FrameBuffer, NULL, bytes ); - assert(buf); - - ctx = glFBDevCreateContext( vis, NULL ); - assert(buf); - - b = glFBDevMakeCurrent( ctx, buf, buf ); - assert(b); - - /*printf("GL_EXTENSIONS: %s\n", glGetString(GL_EXTENSIONS));*/ - glGetIntegerv(GL_RED_BITS, &r); - glGetIntegerv(GL_GREEN_BITS, &g); - glGetIntegerv(GL_BLUE_BITS, &b); - glGetIntegerv(GL_ALPHA_BITS, &a); - printf("RED_BITS=%d GREEN_BITS=%d BLUE_BITS=%d ALPHA_BITS=%d\n", - r, g, b, a); - - glClearColor(0.5, 0.5, 1.0, 0); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1, 1, -1, 1, 2, 30); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0, 0, -15); - glViewport(0, 0, VarInfo.xres_virtual, VarInfo.yres_virtual); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - for (ang = 0; ang <= 180; ang += 15) { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glPushMatrix(); - glRotatef(ang, 1, 0, 0); - glutSolidTorus(1, 3, 40, 20); - glPopMatrix(); - glFBDevSwapBuffers(buf); - } - - /* clean up */ - b = glFBDevMakeCurrent( NULL, NULL, NULL); - assert(b); - - glFBDevDestroyContext(ctx); - glFBDevDestroyBuffer(buf); - glFBDevDestroyVisual(vis); -} - - -int -main( int argc, char *argv[] ) -{ - signal(SIGUSR1, signal_handler); /* exit if someone tries a vt switch */ - signal(SIGSEGV, signal_handler); /* catch segfaults */ - - initialize_fbdev(); - gltest(); - shutdown_fbdev(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/miniglx/manytex.c b/nx-X11/extras/Mesa_6.4.2/progs/miniglx/manytex.c deleted file mode 100644 index 36fa10d222..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/miniglx/manytex.c +++ /dev/null @@ -1,382 +0,0 @@ -/* $Id: manytex.c,v 1.2 2003/08/23 01:28:59 jonsmirl Exp $ */ - -/* - * test handling of many texture maps - * Also tests texture priority and residency. - * - * Brian Paul - * August 2, 2000 - */ - - -#include -#include -#include -#include -#include -#include - - -static GLint NumTextures = 20; -static GLuint *TextureID = NULL; -static GLint *TextureWidth = NULL, *TextureHeight = NULL; -static GLboolean *TextureResidency = NULL; -static GLint TexWidth = 128, TexHeight = 128; -static GLfloat Zrot = 0; -static GLboolean Anim = GL_TRUE; -static GLint WinWidth = 500, WinHeight = 400; -static GLboolean MipMap = GL_FALSE; -static GLboolean LinearFilter = GL_FALSE; -static GLboolean RandomSize = GL_FALSE; -static GLint Rows, Columns; -static GLint LowPriorityCount = 0; - - -static void Idle( void ) -{ - Zrot += 1.0; - glutPostRedisplay(); -} - - -static void Display( void ) -{ - GLfloat spacing = WinWidth / Columns; - GLfloat size = spacing * 0.4; - GLint i; - - /* test residency */ - if (0) - { - GLboolean b; - GLint i, resident; - b = glAreTexturesResident(NumTextures, TextureID, TextureResidency); - if (b) { - printf("all resident\n"); - } - else { - resident = 0; - for (i = 0; i < NumTextures; i++) { - if (TextureResidency[i]) { - resident++; - } - } - printf("%d of %d texture resident\n", resident, NumTextures); - } - } - - /* render the textured quads */ - glClear( GL_COLOR_BUFFER_BIT ); - for (i = 0; i < NumTextures; i++) { - GLint row = i / Columns; - GLint col = i % Columns; - GLfloat x = col * spacing + spacing * 0.5; - GLfloat y = row * spacing + spacing * 0.5; - - GLfloat maxDim = (TextureWidth[i] > TextureHeight[i]) - ? TextureWidth[i] : TextureHeight[i]; - GLfloat w = TextureWidth[i] / maxDim; - GLfloat h = TextureHeight[i] / maxDim; - - glPushMatrix(); - glTranslatef(x, y, 0.0); - glRotatef(Zrot, 0, 0, 1); - glScalef(size, size, 1); - - glBindTexture(GL_TEXTURE_2D, TextureID[i]); - glBegin(GL_POLYGON); -#if 0 - glTexCoord2f(0, 0); glVertex2f(-1, -1); - glTexCoord2f(1, 0); glVertex2f( 1, -1); - glTexCoord2f(1, 1); glVertex2f( 1, 1); - glTexCoord2f(0, 1); glVertex2f(-1, 1); -#else - glTexCoord2f(0, 0); glVertex2f(-w, -h); - glTexCoord2f(1, 0); glVertex2f( w, -h); - glTexCoord2f(1, 1); glVertex2f( w, h); - glTexCoord2f(0, 1); glVertex2f(-w, h); -#endif - glEnd(); - glPopMatrix(); - } - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - WinWidth = width; - WinHeight = height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho(0, width, 0, height, -1, 1); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); -} - - -/* - * Return a random int in [min, max]. - */ -static int RandomInt(int min, int max) -{ - int i = rand(); - int j = i % (max - min + 1); - return min + j; -} - - - -static void Init( void ) -{ - GLint i; - - if (RandomSize) { - printf("Creating %d %s random-size textures, ", NumTextures, - MipMap ? "Mipmapped" : "non-Mipmapped"); - } - else { - printf("Creating %d %s %d x %d textures, ", NumTextures, - MipMap ? "Mipmapped" : "non-Mipmapped", - TexWidth, TexHeight); - } - - if (LinearFilter) { - printf("bilinear filtering\n"); - } - else { - printf("nearest filtering\n"); - } - - - /* compute number of rows and columns of rects */ - { - GLfloat area = (GLfloat) (WinWidth * WinHeight) / (GLfloat) NumTextures; - GLfloat edgeLen = sqrt(area); - - Columns = WinWidth / edgeLen; - Rows = (NumTextures + Columns - 1) / Columns; - printf("Rows: %d Cols: %d\n", Rows, Columns); - } - - - if (!TextureID) { - TextureID = (GLuint *) malloc(sizeof(GLuint) * NumTextures); - assert(TextureID); - glGenTextures(NumTextures, TextureID); - } - - if (!TextureResidency) { - TextureResidency = (GLboolean *) malloc(sizeof(GLboolean) * NumTextures); - assert(TextureResidency); - } - - if (!TextureWidth) { - TextureWidth = (GLint *) malloc(sizeof(GLint) * NumTextures); - assert(TextureWidth); - } - if (!TextureHeight) { - TextureHeight = (GLint *) malloc(sizeof(GLint) * NumTextures); - assert(TextureHeight); - } - - for (i = 0; i < NumTextures; i++) { - GLubyte color[4]; - GLubyte *texImage; - GLint j, row, col; - - row = i / Columns; - col = i % Columns; - - glBindTexture(GL_TEXTURE_2D, TextureID[i]); - - if (i < LowPriorityCount) - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, 0.5F); - - if (RandomSize) { -#if 0 - int k = (glutGet(GLUT_ELAPSED_TIME) % 7) + 2; - TexWidth = 1 << k; - TexHeight = 1 << k; -#else - TexWidth = 1 << RandomInt(2, 7); - TexHeight = 1 << RandomInt(2, 7); - printf("Random size of %3d: %d x %d\n", i, TexWidth, TexHeight); -#endif - } - - TextureWidth[i] = TexWidth; - TextureHeight[i] = TexHeight; - - texImage = (GLubyte*) malloc(4 * TexWidth * TexHeight * sizeof(GLubyte)); - assert(texImage); - - /* determine texture color */ - color[0] = (GLint) (255.0 * ((float) col / (Columns - 1))); - color[1] = 127; - color[2] = (GLint) (255.0 * ((float) row / (Rows - 1))); - color[3] = 255; - - /* fill in solid-colored teximage */ - for (j = 0; j < TexWidth * TexHeight; j++) { - texImage[j*4+0] = color[0]; - texImage[j*4+1] = color[1]; - texImage[j*4+2] = color[2]; - texImage[j*4+3] = color[3]; - } - - if (MipMap) { - GLint level = 0; - GLint w = TexWidth, h = TexHeight; - while (1) { - glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA, w, h, 0, - GL_RGBA, GL_UNSIGNED_BYTE, texImage); - if (w == 1 && h == 1) - break; - if (w > 1) - w /= 2; - if (h > 1) - h /= 2; - level++; - /*printf("%d: %d x %d\n", level, w, h);*/ - } - if (LinearFilter) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR_MIPMAP_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - } - else { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_NEAREST_MIPMAP_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } - } - else { - /* Set corners to white */ - int k = 0; - texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255; - k = (TexWidth - 1) * 4; - texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255; - k = (TexWidth * TexHeight - TexWidth) * 4; - texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255; - k = (TexWidth * TexHeight - 1) * 4; - texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255; - - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, TexWidth, TexHeight, 0, - GL_RGBA, GL_UNSIGNED_BYTE, texImage); - if (LinearFilter) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - } - else { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } - } - - free(texImage); - } - - glEnable(GL_TEXTURE_2D); -} - - -static void Key( unsigned char key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 's': - Idle(); - break; - case 'z': - Zrot -= step; - break; - case 'Z': - Zrot += step; - break; - case ' ': - Init(); - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -int main( int argc, char *argv[] ) -{ - GLint i; - - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( WinWidth, WinHeight ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - if (Anim) - glutIdleFunc(Idle); - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-n") == 0) { - NumTextures = atoi(argv[i+1]); - if (NumTextures <= 0) { - printf("Error, bad number of textures\n"); - return 1; - } - i++; - } - else if (strcmp(argv[i], "-mipmap") == 0) { - MipMap = GL_TRUE; - } - else if (strcmp(argv[i], "-linear") == 0) { - LinearFilter = GL_TRUE; - } - else if (strcmp(argv[i], "-size") == 0) { - TexWidth = atoi(argv[i+1]); - TexHeight = atoi(argv[i+2]); - assert(TexWidth >= 1); - assert(TexHeight >= 1); - i += 2; - } - else if (strcmp(argv[i], "-randomsize") == 0) { - RandomSize = GL_TRUE; - } - else if (strcmp(argv[i], "-lowpri") == 0) { - LowPriorityCount = atoi(argv[i+1]); - i++; - } - else { - printf("Usage:\n"); - printf(" manytex [options]\n"); - printf("Options:\n"); - printf(" -n \n"); - printf(" -size - specify texture size\n"); - printf(" -randomsize - use random size textures\n"); - printf(" -mipmap - generate mipmaps\n"); - printf(" -linear - use linear filtering instead of nearest\n"); - printf(" -lowpri - Set lower priority on textures\n"); - return 0; - } - } - - Init(); - - glutMainLoop(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/miniglx/miniglxsample.c b/nx-X11/extras/Mesa_6.4.2/progs/miniglx/miniglxsample.c deleted file mode 100644 index d4d6729f93..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/miniglx/miniglxsample.c +++ /dev/null @@ -1,128 +0,0 @@ - -#define USE_MINIGLX 1 /* 1 = use Mini GLX, 0 = use Xlib/GLX */ - -#include -#include -#include -#include - -#if USE_MINIGLX -#include -#else -#include -#include -#endif - -static void _subset_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ) -{ - glBegin( GL_QUADS ); - glVertex2f( x1, y1 ); - glVertex2f( x2, y1 ); - glVertex2f( x2, y2 ); - glVertex2f( x1, y2 ); - glEnd(); -} - - -/* - * Create a simple double-buffered RGBA window. - */ -static Window -MakeWindow(Display * dpy, unsigned int width, unsigned int height) -{ - int visAttributes[] = { - GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - None - }; - XSetWindowAttributes attr; - unsigned long attrMask; - Window root; - Window win; - GLXContext ctx; - XVisualInfo *visinfo; - - root = RootWindow(dpy, 0); - - /* Choose GLX visual / pixel format */ - visinfo = glXChooseVisual(dpy, 0, visAttributes); - if (!visinfo) { - printf("Error: couldn't get an RGB, Double-buffered visual\n"); - exit(1); - } - - /* Create the window */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone); - attrMask = CWBackPixel | CWBorderPixel | CWColormap; - win = XCreateWindow(dpy, root, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, attrMask, &attr); - if (!win) { - printf("Error: XCreateWindow failed\n"); - exit(1); - } - - /* Display the window */ - XMapWindow(dpy, win); - - /* Create GLX rendering context */ - ctx = glXCreateContext(dpy, visinfo, NULL, True); - if (!ctx) { - printf("Error: glXCreateContext failed\n"); - exit(1); - } - - /* Bind the rendering context and window */ - glXMakeCurrent(dpy, win, ctx); - - glViewport(0, 0, width, height); - - return win; -} - - -/* - * Draw a few frames of a rotating square. - */ -static void -DrawFrames(Display * dpy, Window win) -{ - int angle; - glShadeModel(GL_FLAT); - glClearColor(0.5, 0.5, 0.5, 1.0); - for (angle = 0; angle < 360; angle += 10) { - glClear(GL_COLOR_BUFFER_BIT); - glColor3f(1.0, 1.0, 0.0); - glPushMatrix(); - glRotatef(angle, 0, 0, 1); - _subset_Rectf(-0.8, -0.8, 0.8, 0.8); - glPopMatrix(); - glXSwapBuffers(dpy, win); - sleep(1); - } -} - - -int -main(int argc, char *argv[]) -{ - Display *dpy; - Window win; - - dpy = XOpenDisplay(NULL); - if (!dpy) { - printf("Error: XOpenDisplay failed\n"); - return 1; - } - - win = MakeWindow(dpy, 300, 300); - - DrawFrames(dpy, win); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/miniglx/miniglxtest.c b/nx-X11/extras/Mesa_6.4.2/progs/miniglx/miniglxtest.c deleted file mode 100644 index ecc5786b73..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/miniglx/miniglxtest.c +++ /dev/null @@ -1,195 +0,0 @@ -/* $Id: miniglxtest.c,v 1.3 2004/03/25 14:58:39 brianp Exp $ */ - -/* - * Test the mini GLX interface. - */ - - -#include -#include -#include -#include -#define USE_MINI_GLX 1 -#if USE_MINI_GLX -#include -#else -#include -#endif - -#define FRONTBUFFER 1 -#define NR 6 -#define DO_SLEEPS 1 -#define NR_DISPLAYS 2 - -GLXContext ctx; - - -static void _subset_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ) -{ - glBegin( GL_QUADS ); - glVertex2f( x1, y1 ); - glVertex2f( x2, y1 ); - glVertex2f( x2, y2 ); - glVertex2f( x1, y2 ); - glEnd(); -} - - - -static void redraw( Display *dpy, Window w, int rot ) -{ - printf("Redraw event\n"); - -#if FRONTBUFFER - glDrawBuffer( GL_FRONT ); -#else -/* glDrawBuffer( GL_BACK ); */ -#endif - - glClearColor( rand()/(float)RAND_MAX, - rand()/(float)RAND_MAX, - rand()/(float)RAND_MAX, - 1); - - glClear( GL_COLOR_BUFFER_BIT ); - -#if 1 - glColor3f( rand()/(float)RAND_MAX, - rand()/(float)RAND_MAX, - rand()/(float)RAND_MAX ); - glPushMatrix(); - glRotatef(rot, 0, 0, 1); - glScalef(.5, .5, .5); - _subset_Rectf( -1, -1, 1, 1 ); - glPopMatrix(); -#endif - -#if FRONTBUFFER - glFlush(); -#else - glXSwapBuffers( dpy, w ); -#endif - glFinish(); -} - - -static Window make_rgb_db_window( Display *dpy, - unsigned int width, unsigned int height ) -{ - int attrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, -#if !FRONTBUFFER - GLX_DOUBLEBUFFER, -#endif - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - Window win; - XVisualInfo *visinfo; - - scrnum = 0; - root = RootWindow( dpy, scrnum ); - - if (!(visinfo = glXChooseVisual( dpy, scrnum, attrib ))) { - printf("Error: couldn't get an RGB, Double-buffered visual\n"); - exit(1); - } - - if(!(ctx = glXCreateContext( dpy, visinfo, NULL, True ))) { - printf("Error: glXCreateContext failed\n"); - exit(1); - } - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow( dpy, root, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr ); - if (!win) { - printf("Error: XCreateWindow failed\n"); - exit(1); - } - - glXMakeCurrent( dpy, win, ctx ); - - glViewport(0, 0, width, height); - - return win; -} - - -static void event_loop( Display *dpy, Window win ) -{ - int i; - - printf("Hang on... drawing %d frames\n", NR); - for (i = 0; i < NR; i++) { - redraw( dpy, win, i*10 ); - if (DO_SLEEPS) { - printf("sleep(1)\n"); - sleep(1); - } - } -} - - -static int foo( void ) -{ - Display *dpy; - Window win; - - dpy = XOpenDisplay(NULL); - if (!dpy) { - printf("Error: XOpenDisplay failed\n"); - return 1; - } - - win = make_rgb_db_window( dpy, 800, 600); - - srand(getpid()); - - glShadeModel( GL_FLAT ); - glClearColor( 0.5, 0.5, 0.5, 1.0 ); - - XMapWindow( dpy, win ); - - { - XEvent e; - while (1) { - XNextEvent( dpy, &e ); - if (e.type == MapNotify && e.xmap.window == win) { - break; - } - } - } - - event_loop( dpy, win ); - - glXDestroyContext( dpy, ctx ); - XDestroyWindow( dpy, win ); - - XCloseDisplay( dpy ); - - return 0; -} - - -int main() -{ - int i; - for (i = 0 ; i < NR_DISPLAYS ; i++) { - if (foo() != 0) - break; - } - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/miniglx/sample_server.c b/nx-X11/extras/Mesa_6.4.2/progs/miniglx/sample_server.c deleted file mode 100644 index 039c04fa40..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/miniglx/sample_server.c +++ /dev/null @@ -1,112 +0,0 @@ -/* $Id: sample_server.c,v 1.1 2003/08/06 17:47:15 keithw Exp $ */ - -/* - * Sample server that just keeps first available window mapped. - */ - - -#include -#include -#include -#include - -struct client { - struct client *next; - Window windowid; - int mappable; -}; - -struct client *clients = 0, *mapped_client = 0; - - -static struct client *find_client( Window id ) -{ - struct client *c; - - for (c = clients ; c ; c = c->next) - if (c->windowid == id) - return c; - - return 0; -} - -int main( int argc, char *argv[] ) -{ - Display *dpy; - XEvent ev; - - dpy = __miniglx_StartServer(NULL); - if (!dpy) { - fprintf(stderr, "Error: __miniglx_StartServer failed\n"); - return 1; - } - - while (XNextEvent( dpy, &ev )) { - struct client *c; - - switch (ev.type) { - case MapRequest: - fprintf(stderr, "MapRequest\n"); - c = find_client(ev.xmaprequest.window); - if (!c) break; - c->mappable = True; - break; - - case UnmapNotify: - fprintf(stderr, "UnmapNotify\n"); - c = find_client(ev.xunmap.window); - if (!c) break; - c->mappable = False; - if (c == mapped_client) - mapped_client = 0; - break; - - case CreateNotify: - fprintf(stderr, "CreateNotify\n"); - c = malloc(sizeof(*c)); - c->next = clients; - c->windowid = ev.xcreatewindow.window; - c->mappable = False; - clients = c; - break; - - case DestroyNotify: - fprintf(stderr, "DestroyNotify\n"); - c = find_client(ev.xdestroywindow.window); - if (!c) break; - if (c == clients) - clients = c->next; - else { - struct client *t; - for (t = clients ; t->next != c ; t = t->next) - ; - t->next = c->next; - } - - if (c == mapped_client) - mapped_client = 0; - - free(c); - break; - - default: - break; - } - - /* Search for first mappable client if none already mapped. - */ - if (!mapped_client) { - for (c = clients ; c ; c = c->next) { - if (c->mappable) { - XMapWindow( dpy, c->windowid ); - mapped_client = c; - break; - } - } - } - } - - XCloseDisplay( dpy ); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/miniglx/sample_server2.c b/nx-X11/extras/Mesa_6.4.2/progs/miniglx/sample_server2.c deleted file mode 100644 index 58effcf484..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/miniglx/sample_server2.c +++ /dev/null @@ -1,229 +0,0 @@ -/* $Id: sample_server2.c,v 1.2 2003/08/23 01:28:59 jonsmirl Exp $ */ - -/* - * Sample server that just keeps first available window mapped. - * - * It also reads and echos anything that happens on stdin as an - * example of tracking events from sources other than miniglx clients. - * - * It reads & writes without blocking, so that eg. piping a lot of - * text to stdin and then hitting 'ctrl-S' on the output stream won't - * cause it to stop handling miniglx events. - * - * See select_tut in the linux manual pages for a good overview of the - * select(2) system call. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include - -struct client { - struct client *next; - Window windowid; - int mappable; -}; - -struct client *clients = 0, *mapped_client = 0; - -#define BUFSZ 4096 -char rbuf[BUFSZ]; -int rbuf_count; - - -static struct client *find_client( Window id ) -{ - struct client *c; - - for (c = clients ; c ; c = c->next) - if (c->windowid == id) - return c; - - return 0; -} - -int main( int argc, char *argv[] ) -{ - Display *dpy; - XEvent ev; - int autostart = 0; - - if (argc == 2 && strcmp(argv[1], "-autostart") == 0) - autostart = 1; - - dpy = __miniglx_StartServer(NULL); - if (!dpy) { - fprintf(stderr, "Error: __miniglx_StartServer failed\n"); - return 1; - } - - /* How is vt switching communicated through the XNextEvent interface? - */ - while (1) { - int r, n; - struct timeval tv; - fd_set rfds, wfds; - int bored = 0; - - FD_ZERO(&rfds); - FD_ZERO(&wfds); - tv.tv_sec = 1; - tv.tv_usec = 0; - - if (rbuf_count) { - FD_SET( 1, &wfds ); /* notify when we can write out buffer */ - n = 1; - } - else { - FD_SET( 0, &rfds ); /* else notify when new data to read */ - n = 0; - } - - /* __miniglx_Select waits until any of these file groups becomes - * readable/writable/etc (like regular select), until timeout - * expires (like regular select), until a signal is received - * (like regular select) or until an event is available for - * XCheckMaskEvent(). - */ - r = __miniglx_Select( dpy, n+1, &rfds, &wfds, 0, &tv ); - - /* This can happen if select() is interrupted by a signal: - */ - if (r < 0 && errno != EINTR && errno != EAGAIN) { - perror ("select()"); - exit (1); - } - - if (tv.tv_sec == 0 && tv.tv_usec == 0) - bored = 1; - - /* Check and handle events on our local file descriptors - */ - if (FD_ISSET( 0, &rfds )) { - /* Something on stdin */ - assert(rbuf_count == 0); - r = read(0, rbuf, BUFSZ); - if (r < 1) { - perror("read"); - abort(); - } - rbuf_count = r; - } - - if (FD_ISSET( 1, &wfds )) { - /* Can write to stdout */ - assert(rbuf_count > 0); - r = write(1, rbuf, rbuf_count); - if (r < 1) { - perror("write"); - abort(); - } - rbuf_count -= r; - if (rbuf_count) - memmove(rbuf + r, rbuf, rbuf_count); - } - - - /* Check and handle events generated by miniglx: - */ - while (XCheckMaskEvent( dpy, ~0, &ev )) { - struct client *c; - bored = 0; - - fprintf(stderr, "Received event %d\n", ev.type); - - switch (ev.type) { - case CreateNotify: - fprintf(stderr, "CreateNotify -- new client\n"); - c = malloc(sizeof(*c)); - c->next = clients; - c->windowid = ev.xcreatewindow.window; - c->mappable = False; - clients = c; - break; - - case DestroyNotify: - fprintf(stderr, "DestroyNotify\n"); - c = find_client(ev.xdestroywindow.window); - if (!c) break; - if (c == clients) - clients = c->next; - else { - struct client *t; - for (t = clients ; t->next != c ; t = t->next) - ; - t->next = c->next; - } - - if (c == mapped_client) - mapped_client = 0; - - free(c); - break; - - case MapRequest: - fprintf(stderr, "MapRequest\n"); - c = find_client(ev.xmaprequest.window); - if (!c) break; - c->mappable = True; - break; - - case UnmapNotify: - fprintf(stderr, "UnmapNotify\n"); - c = find_client(ev.xunmap.window); - if (!c) break; - c->mappable = False; - if (c == mapped_client) - mapped_client = 0; - break; - - default: - break; - } - } - - - /* Search for first mappable client if none already mapped. - */ - if (!mapped_client) { - struct client *c; - for (c = clients ; c ; c = c->next) { - if (c->mappable) { - XMapWindow( dpy, c->windowid ); - mapped_client = c; - break; - } - } - if (!clients && autostart) { - system("nohup ./texline &"); - system("nohup ./manytex &"); - } - } - else if (bored) { - struct client *c; - /* bored of mapped client now, let's try & find another one */ - for (c = mapped_client->next ; c && !c->mappable ; c = c->next) - ; - if (!c) - for (c = clients ; c && !c->mappable ; c = c->next) - ; - if (c && c != mapped_client) { - XUnmapWindow( dpy, mapped_client->windowid ); - XMapWindow( dpy, c->windowid ); - mapped_client = c; - } - else - fprintf(stderr, "I'm bored!\n"); - } - } - - XCloseDisplay( dpy ); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/miniglx/texline.c b/nx-X11/extras/Mesa_6.4.2/progs/miniglx/texline.c deleted file mode 100644 index d2a97d2876..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/miniglx/texline.c +++ /dev/null @@ -1,268 +0,0 @@ -/* $Id: texline.c,v 1.1 2003/08/06 17:47:15 keithw Exp $ */ - -/* - * Test textured lines. - * - * Brian Paul - * September 2000 - */ - - -#include -#include -#include -#include -#include "../util/readtex.c" /* I know, this is a hack. */ - -#define TEXTURE_FILE "../images/girl.rgb" - -static GLboolean Antialias = GL_FALSE; -static GLboolean Animate = GL_FALSE; -static GLint Texture = 1; -static GLboolean Stipple = GL_FALSE; -static GLfloat LineWidth = 1.0; - -static GLfloat Xrot = -60.0, Yrot = 0.0, Zrot = 0.0; -static GLfloat DYrot = 1.0; -static GLboolean Points = GL_FALSE; -static GLfloat Scale = 1.0; - -static void Idle( void ) -{ - if (Animate) { - Zrot += DYrot; - glutPostRedisplay(); - } -} - - -static void Display( void ) -{ - GLfloat x, y, s, t; - - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - glScalef(Scale, Scale, Scale); - - if (Texture) - glColor3f(1, 1, 1); - - if (Points) { - glBegin(GL_POINTS); - for (t = 0.0; t <= 1.0; t += 0.025) { - for (s = 0.0; s <= 1.0; s += 0.025) { - x = s * 2.0 - 1.0; - y = t * 2.0 - 1.0; - if (!Texture) - glColor3f(1, 0, 1); - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, t, s); - glTexCoord2f(s, t); - glVertex2f(x, y); - } - } - glEnd(); - } - else { - glBegin(GL_LINES); - for (t = 0.0; t <= 1.0; t += 0.025) { - x = t * 2.0 - 1.0; - if (!Texture) - glColor3f(1, 0, 1); - glTexCoord2f(t, 0.0); - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, t); - glVertex2f(x, -1.0); - if (!Texture) - glColor3f(0, 1, 0); - glTexCoord2f(t, 1.0); - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, t); - glVertex2f(x, 1.0); - } - glEnd(); - } - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - GLfloat ar = (float) width / height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -ar, ar, -1.0, 1.0, 10.0, 100.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -12.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 'a': - Antialias = !Antialias; - if (Antialias) { - glEnable(GL_LINE_SMOOTH); - glEnable(GL_POINT_SMOOTH); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - } - else { - glDisable(GL_LINE_SMOOTH); - glDisable(GL_POINT_SMOOTH); - glDisable(GL_BLEND); - } - break; - case 't': - Texture++; - if (Texture > 2) - Texture = 0; - if (Texture == 0) { - glActiveTextureARB(GL_TEXTURE0_ARB); - glDisable(GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE1_ARB); - glDisable(GL_TEXTURE_2D); - } - else if (Texture == 1) { - glActiveTextureARB(GL_TEXTURE0_ARB); - glEnable(GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE1_ARB); - glDisable(GL_TEXTURE_2D); - } - else { - glActiveTextureARB(GL_TEXTURE0_ARB); - glEnable(GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE1_ARB); - glEnable(GL_TEXTURE_2D); - } - break; - case 'w': - LineWidth -= 0.25; - if (LineWidth < 0.25) - LineWidth = 0.25; - glLineWidth(LineWidth); - glPointSize(LineWidth); - break; - case 'W': - LineWidth += 0.25; - if (LineWidth > 8.0) - LineWidth = 8.0; - glLineWidth(LineWidth); - glPointSize(LineWidth); - break; - case 'p': - Points = !Points; - break; - case 's': - Stipple = !Stipple; - if (Stipple) - glEnable(GL_LINE_STIPPLE); - else - glDisable(GL_LINE_STIPPLE); - break; - case ' ': - Animate = !Animate; - if (Animate) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 27: - exit(0); - break; - } - printf("LineWidth, PointSize = %f\n", LineWidth); - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - float step = 3.0; - (void) x; - (void) y; - - switch (key) { - case GLUT_KEY_UP: - Xrot += step; - break; - case GLUT_KEY_DOWN: - Xrot -= step; - break; - case GLUT_KEY_LEFT: - Yrot += step; - break; - case GLUT_KEY_RIGHT: - Yrot -= step; - break; - } - glutPostRedisplay(); -} - - -static void Init( int argc, char *argv[] ) -{ - GLuint u; - for (u = 0; u < 2; u++) { - glActiveTextureARB(GL_TEXTURE0_ARB + u); - glBindTexture(GL_TEXTURE_2D, 10+u); - if (u == 0) - glEnable(GL_TEXTURE_2D); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - if (u == 0) - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - else - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) { - printf("Error: couldn't load texture image\n"); - exit(1); - } - } - - glLineStipple(1, 0xff); - - if (argc > 1 && strcmp(argv[1], "-info")==0) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowSize( 400, 300 ); - - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - - glutCreateWindow(argv[0] ); - - Init(argc, argv); - - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - if (Animate) - glutIdleFunc( Idle ); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/osdemos/Makefile b/nx-X11/extras/Mesa_6.4.2/progs/osdemos/Makefile deleted file mode 100644 index 03ab78ac08..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/osdemos/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# progs/demos/Makefile - -TOP = ../.. -include $(TOP)/configs/current - -INCDIR = $(TOP)/include - -OSMESA_LIBS = -L$(LIB_DIR) -lglut -lOSMesa -lGLU -lGL $(APP_LIB_DEPS) - -OSMESA16_LIBS = -L$(LIB_DIR) -lglut -lOSMesa16 -lGLU -lGL $(APP_LIB_DEPS) - -OSMESA32_LIBS = -L$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS) - -LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(GLU_LIB_NAME) $(LIB_DIR)/$(GLUT_LIB_NAME) - -PROGS = \ - osdemo - - -##### RULES ##### - -.SUFFIXES: -.SUFFIXES: .c - - -# make executable from .c file: -.c: $(LIB_DEP) readtex.o - $(CC) -I$(INCDIR) $(CFLAGS) $< readtex.o $(APP_LIB_DEPS) -o $@ - - -##### TARGETS ##### - -default: readtex.o $(PROGS) - - -readtex.c: $(TOP)/progs/util/readtex.c - cp $< . - -readtex.h: $(TOP)/progs/util/readtex.h - cp $< . - -readtex.o: readtex.c readtex.h - $(CC) -c -I$(INCDIR) $(CFLAGS) readtex.c - - -showbuffer.c: $(TOP)/progs/util/showbuffer.c - cp $< . - -showbuffer.h: $(TOP)/progs/util/showbuffer.h - cp $< . - -showbuffer.o: showbuffer.c showbuffer.h - $(CC) -c -I$(INCDIR) $(CFLAGS) showbuffer.c - - -# special case: need the -lOSMesa library: -osdemo: osdemo.c - $(CC) -I$(INCDIR) $(CFLAGS) osdemo.c $(OSMESA_LIBS) -o $@ - -# another special case: need the -lOSMesa16 library: -osdemo16: osdemo16.c - $(CC) -I$(INCDIR) $(CFLAGS) osdemo16.c $(OSMESA16_LIBS) -o $@ - -# another special case: need the -lOSMesa32 library: -osdemo32: osdemo32.c - $(CC) -I$(INCDIR) $(CFLAGS) osdemo32.c $(OSMESA32_LIBS) -o $@ - - - -clean: - -rm -f $(PROGS) - -rm -f *.o *~ - -rm -f readtex.[ch] showbuffer.[ch] diff --git a/nx-X11/extras/Mesa_6.4.2/progs/osdemos/osdemo.c b/nx-X11/extras/Mesa_6.4.2/progs/osdemos/osdemo.c deleted file mode 100644 index cdb3c72423..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/osdemos/osdemo.c +++ /dev/null @@ -1,322 +0,0 @@ - -/* - * Demo of off-screen Mesa rendering - * - * See Mesa/include/GL/osmesa.h for documentation of the OSMesa functions. - * - * If you want to render BIG images you'll probably have to increase - * MAX_WIDTH and MAX_HEIGHT in src/config.h. - * - * This program is in the public domain. - * - * Brian Paul - * - * PPM output provided by Joerg Schmalzl. - * ASCII PPM output added by Brian Paul. - * - * Usage: osdemo [-perf] [filename] - * - * -perf: Redraws the image 1000 times, displaying the FPS every 5 secs. - * filename: file to store the TGA or PPM output - */ - - -#include -#include -#include -#include "GL/osmesa.h" -#include "GL/glut.h" - - -#define SAVE_TARGA - - -#define WIDTH 400 -#define HEIGHT 400 - -static GLint T0 = 0; -static GLint Frames = 0; -static int perf = 0; - -static void render_image( void ) -{ - GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 }; - GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 }; - GLfloat red_mat[] = { 1.0, 0.2, 0.2, 1.0 }; - GLfloat green_mat[] = { 0.2, 1.0, 0.2, 1.0 }; - GLfloat blue_mat[] = { 0.2, 0.2, 1.0, 1.0 }; - - - glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); - glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); - glLightfv(GL_LIGHT0, GL_POSITION, light_position); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-2.5, 2.5, -2.5, 2.5, -10.0, 10.0); - glMatrixMode(GL_MODELVIEW); - - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(20.0, 1.0, 0.0, 0.0); - - glPushMatrix(); - glTranslatef(-0.75, 0.5, 0.0); - glRotatef(90.0, 1.0, 0.0, 0.0); - glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, red_mat ); - glutSolidTorus(0.275, 0.85, 20, 20); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(-0.75, -0.5, 0.0); - glRotatef(270.0, 1.0, 0.0, 0.0); - glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, green_mat ); - glutSolidCone(1.0, 2.0, 16, 1); - glPopMatrix(); - -#ifdef GL_HP_occlusion_test - if (perf == 0) { - GLboolean bRet; - glDepthMask(GL_FALSE); - glColorMask(GL_FALSE,GL_FALSE,GL_FALSE,GL_FALSE); - glEnable(GL_OCCLUSION_TEST_HP); - glGetBooleanv(GL_OCCLUSION_TEST_RESULT_HP,&bRet); - - glPushMatrix(); - glTranslatef(0.75, 0.0, -1.0); - glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, blue_mat ); - glutSolidSphere(1.0, 20, 20); - glPopMatrix(); - - glGetBooleanv(GL_OCCLUSION_TEST_RESULT_HP,&bRet); - printf("Occlusion test 1 (result should be 1): %d\n",bRet); - - glDepthMask(GL_TRUE); - glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE); - glDisable(GL_OCCLUSION_TEST_HP); - } -#endif - - glPushMatrix(); - glTranslatef(0.75, 0.0, -1.0); - glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, blue_mat ); - glutSolidSphere(1.0, 20, 20); - glPopMatrix(); - -#ifdef GL_HP_occlusion_test - if (perf == 0){ - GLboolean bRet; - - glDepthMask(GL_FALSE); - glColorMask(GL_FALSE,GL_FALSE,GL_FALSE,GL_FALSE); - glEnable(GL_OCCLUSION_TEST_HP); - glGetBooleanv(GL_OCCLUSION_TEST_RESULT_HP,&bRet); - - /* draw a sphere inside the previous sphere */ - glPushMatrix(); - glTranslatef(0.75, 0.0, -1.0); - glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, blue_mat ); - glutSolidSphere(0.5, 20, 20); - glPopMatrix(); - - glGetBooleanv(GL_OCCLUSION_TEST_RESULT_HP,&bRet); - printf("Occlusion test 2 (result should be 0): %d\n",bRet); - - glDepthMask(GL_TRUE); - glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE); - glDisable(GL_OCCLUSION_TEST_HP); - } -#endif - - glPopMatrix(); - - /* This is very important!!! - * Make sure buffered commands are finished!!! - */ - glFinish(); - - Frames++; - if (perf) { - GLint t = glutGet(GLUT_ELAPSED_TIME); - if (t - T0 >= 5000) { - GLfloat seconds = (t - T0) / 1000.0; - GLfloat fps = Frames / seconds; - printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps); - T0 = t; - Frames = 0; - } - } -} - - -#ifdef SAVE_TARGA - -static void -write_targa(const char *filename, const GLubyte *buffer, int width, int height) -{ - FILE *f = fopen( filename, "w" ); - if (f) { - int i, x, y; - const GLubyte *ptr = buffer; - printf ("osdemo, writing tga file \n"); - fputc (0x00, f); /* ID Length, 0 => No ID */ - fputc (0x00, f); /* Color Map Type, 0 => No color map included */ - fputc (0x02, f); /* Image Type, 2 => Uncompressed, True-color Image */ - fputc (0x00, f); /* Next five bytes are about the color map entries */ - fputc (0x00, f); /* 2 bytes Index, 2 bytes length, 1 byte size */ - fputc (0x00, f); - fputc (0x00, f); - fputc (0x00, f); - fputc (0x00, f); /* X-origin of Image */ - fputc (0x00, f); - fputc (0x00, f); /* Y-origin of Image */ - fputc (0x00, f); - fputc (WIDTH & 0xff, f); /* Image Width */ - fputc ((WIDTH>>8) & 0xff, f); - fputc (HEIGHT & 0xff, f); /* Image Height */ - fputc ((HEIGHT>>8) & 0xff, f); - fputc (0x18, f); /* Pixel Depth, 0x18 => 24 Bits */ - fputc (0x20, f); /* Image Descriptor */ - fclose(f); - f = fopen( filename, "ab" ); /* reopen in binary append mode */ - for (y=height-1; y>=0; y--) { - for (x=0; x=0; y--) { - for (x=0; x=0; y--) { - for (x=0; x= 305 - /* specify Z, stencil, accum sizes */ - OSMesaContext ctx = OSMesaCreateContextExt( OSMESA_RGBA, 16, 0, 0, NULL ); -#else - OSMesaContext ctx = OSMesaCreateContext( OSMESA_RGBA, NULL ); -#endif - if (!ctx) { - printf("OSMesaCreateContext failed!\n"); - return 0; - } - - for ( i=1; i -#include -#include "GL/osmesa.h" -#include "GL/glut.h" - - -#define SAVE_TARGA - - -#define WIDTH 400 -#define HEIGHT 400 - - - -static void render_image( void ) -{ - GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 }; - GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 }; - GLfloat red_mat[] = { 1.0, 0.2, 0.2, 1.0 }; - GLfloat green_mat[] = { 0.2, 1.0, 0.2, 0.5 }; - GLfloat blue_mat[] = { 0.2, 0.2, 1.0, 1.0 }; - GLfloat white_mat[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat purple_mat[] = { 1.0, 0.2, 1.0, 1.0 }; - GLUquadricObj *qobj = gluNewQuadric(); - - glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); - glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); - glLightfv(GL_LIGHT0, GL_POSITION, light_position); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-2.5, 2.5, -2.5, 2.5, -10.0, 10.0); - glMatrixMode(GL_MODELVIEW); - - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(20.0, 1.0, 0.0, 0.0); - -#if 0 - glPushMatrix(); - glTranslatef(-0.75, 0.5, 0.0); - glRotatef(90.0, 1.0, 0.0, 0.0); - glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, red_mat ); - glutSolidTorus(0.275, 0.85, 20, 20); - glPopMatrix(); -#endif - - /* red square */ - glPushMatrix(); - glTranslatef(0.0, -0.5, 0.0); - glRotatef(90, 1, 0.5, 0); - glScalef(3, 3, 3); - glDisable(GL_LIGHTING); - glColor4f(1, 0, 0, 0.5); - glBegin(GL_POLYGON); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - glEnable(GL_LIGHTING); - glPopMatrix(); - -#if 0 - /* green square */ - glPushMatrix(); - glTranslatef(0.0, 0.5, 0.1); - glDisable(GL_LIGHTING); - glColor3f(0, 1, 0); - glBegin(GL_POLYGON); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - glEnable(GL_LIGHTING); - glPopMatrix(); - - /* blue square */ - glPushMatrix(); - glTranslatef(0.75, 0.5, 0.3); - glDisable(GL_LIGHTING); - glColor3f(0, 0, 0.5); - glBegin(GL_POLYGON); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - glEnable(GL_LIGHTING); - glPopMatrix(); -#endif - glPushMatrix(); - glTranslatef(-0.75, -0.5, 0.0); - glRotatef(270.0, 1.0, 0.0, 0.0); - glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, green_mat ); - glColor4f(0,1,0,0.5); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - gluCylinder(qobj, 1.0, 0.0, 2.0, 16, 1); - glDisable(GL_BLEND); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(0.75, 1.0, 1.0); - glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, blue_mat ); - gluSphere(qobj, 1.0, 20, 20); - glPopMatrix(); - - glPopMatrix(); - - /* This is very important!!! - * Make sure buffered commands are finished!!! - */ - glFinish(); - - gluDeleteQuadric(qobj); - - { - GLint r, g, b, a; - glGetIntegerv(GL_RED_BITS, &r); - glGetIntegerv(GL_GREEN_BITS, &g); - glGetIntegerv(GL_BLUE_BITS, &b); - glGetIntegerv(GL_ALPHA_BITS, &a); - printf("channel sizes: %d %d %d %d\n", r, g, b, a); - } -} - - - -static void -write_targa(const char *filename, const GLushort *buffer, int width, int height) -{ - FILE *f = fopen( filename, "w" ); - if (f) { - int i, x, y; - const GLushort *ptr = buffer; - printf ("osdemo, writing tga file \n"); - fputc (0x00, f); /* ID Length, 0 => No ID */ - fputc (0x00, f); /* Color Map Type, 0 => No color map included */ - fputc (0x02, f); /* Image Type, 2 => Uncompressed, True-color Image */ - fputc (0x00, f); /* Next five bytes are about the color map entries */ - fputc (0x00, f); /* 2 bytes Index, 2 bytes length, 1 byte size */ - fputc (0x00, f); - fputc (0x00, f); - fputc (0x00, f); - fputc (0x00, f); /* X-origin of Image */ - fputc (0x00, f); - fputc (0x00, f); /* Y-origin of Image */ - fputc (0x00, f); - fputc (WIDTH & 0xff, f); /* Image Width */ - fputc ((WIDTH>>8) & 0xff, f); - fputc (HEIGHT & 0xff, f); /* Image Height */ - fputc ((HEIGHT>>8) & 0xff, f); - fputc (0x18, f); /* Pixel Depth, 0x18 => 24 Bits */ - fputc (0x20, f); /* Image Descriptor */ - fclose(f); - f = fopen( filename, "ab" ); /* reopen in binary append mode */ - for (y=height-1; y>=0; y--) { - for (x=0; x> 8, f); /* write blue */ - fputc(ptr[i+1] >> 8, f); /* write green */ - fputc(ptr[i] >> 8, f); /* write red */ - } - } - } -} - - -static void -write_ppm(const char *filename, const GLushort *buffer, int width, int height) -{ - const int binary = 0; - FILE *f = fopen( filename, "w" ); - if (f) { - int i, x, y; - const GLushort *ptr = buffer; - if (binary) { - fprintf(f,"P6\n"); - fprintf(f,"# ppm-file created by osdemo.c\n"); - fprintf(f,"%i %i\n", width,height); - fprintf(f,"255\n"); - fclose(f); - f = fopen( filename, "ab" ); /* reopen in binary append mode */ - for (y=height-1; y>=0; y--) { - for (x=0; x> 8, f); /* write red */ - fputc(ptr[i+1] >> 8, f); /* write green */ - fputc(ptr[i+2] >> 8, f); /* write blue */ - } - } - } - else { - /*ASCII*/ - int counter = 0; - fprintf(f,"P3\n"); - fprintf(f,"# ascii ppm file created by osdemo.c\n"); - fprintf(f,"%i %i\n", width, height); - fprintf(f,"255\n"); - for (y=height-1; y>=0; y--) { - for (x=0; x> 8, ptr[i+1] >> 8, ptr[i+2] >> 8); - counter++; - if (counter % 5 == 0) - fprintf(f, "\n"); - } - } - } - fclose(f); - } -} - - - -int main( int argc, char *argv[] ) -{ - GLushort *buffer; - - /* Create an RGBA-mode context */ -#if OSMESA_MAJOR_VERSION * 100 + OSMESA_MINOR_VERSION >= 305 - /* specify Z, stencil, accum sizes */ - OSMesaContext ctx = OSMesaCreateContextExt( GL_RGBA, 16, 0, 0, NULL ); -#else - OSMesaContext ctx = OSMesaCreateContext( GL_RGBA, NULL ); -#endif - if (!ctx) { - printf("OSMesaCreateContext failed!\n"); - return 0; - } - - /* Allocate the image buffer */ - buffer = (GLushort *) malloc( WIDTH * HEIGHT * 4 * sizeof(GLushort)); - if (!buffer) { - printf("Alloc image buffer failed!\n"); - return 0; - } - - /* Bind the buffer to the context and make it current */ - if (!OSMesaMakeCurrent( ctx, buffer, GL_UNSIGNED_SHORT, WIDTH, HEIGHT )) { - printf("OSMesaMakeCurrent failed!\n"); - return 0; - } - - render_image(); - - if (argc>1) { -#ifdef SAVE_TARGA - write_targa(argv[1], buffer, WIDTH, HEIGHT); -#else - write_ppm(argv[1], buffer, WIDTH, HEIGHT); -#endif - } - else { - printf("Specify a filename if you want to make an image file\n"); - } - - printf("all done\n"); - - /* free the image buffer */ - free( buffer ); - - /* destroy the context */ - OSMesaDestroyContext( ctx ); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/osdemos/osdemo32.c b/nx-X11/extras/Mesa_6.4.2/progs/osdemos/osdemo32.c deleted file mode 100644 index 7295b46a83..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/osdemos/osdemo32.c +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Demo of off-screen Mesa rendering with 32-bit float color channels. - * This requires the libOSMesa32.so library. - * - * Compile with something like this: - * - * gcc osdemo32.c -I../../include -L../../lib -lglut -lGLU -lOSMesa32 -lm -o osdemo32 - */ - - -#include -#include -#include "GL/osmesa.h" -#include "GL/glut.h" - - -#define SAVE_TARGA - - -#define WIDTH 400 -#define HEIGHT 400 - - - -static void render_image( void ) -{ - GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 }; - GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 }; - GLfloat red_mat[] = { 1.0, 0.2, 0.2, 1.0 }; - GLfloat green_mat[] = { 0.2, 1.0, 0.2, 0.5 }; - GLfloat blue_mat[] = { 0.2, 0.2, 1.0, 1.0 }; - GLfloat white_mat[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat purple_mat[] = { 1.0, 0.2, 1.0, 1.0 }; - GLUquadricObj *qobj = gluNewQuadric(); - - glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); - glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); - glLightfv(GL_LIGHT0, GL_POSITION, light_position); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-2.5, 2.5, -2.5, 2.5, -10.0, 10.0); - glMatrixMode(GL_MODELVIEW); - - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(20.0, 1.0, 0.0, 0.0); - -#if 0 - glPushMatrix(); - glTranslatef(-0.75, 0.5, 0.0); - glRotatef(90.0, 1.0, 0.0, 0.0); - glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, red_mat ); - glutSolidTorus(0.275, 0.85, 20, 20); - glPopMatrix(); -#endif - - /* red square */ - glPushMatrix(); - glTranslatef(0.0, -0.5, 0.0); - glRotatef(90, 1, 0.5, 0); - glScalef(3, 3, 3); - glDisable(GL_LIGHTING); - glColor4f(1, 0, 0, 0.5); - glBegin(GL_POLYGON); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - glEnable(GL_LIGHTING); - glPopMatrix(); - -#if 0 - /* green square */ - glPushMatrix(); - glTranslatef(0.0, 0.5, 0.1); - glDisable(GL_LIGHTING); - glColor3f(0, 1, 0); - glBegin(GL_POLYGON); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - glEnable(GL_LIGHTING); - glPopMatrix(); - - /* blue square */ - glPushMatrix(); - glTranslatef(0.75, 0.5, 0.3); - glDisable(GL_LIGHTING); - glColor3f(0, 0, 0.5); - glBegin(GL_POLYGON); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - glEnable(GL_LIGHTING); - glPopMatrix(); -#endif - glPushMatrix(); - glTranslatef(-0.75, -0.5, 0.0); - glRotatef(270.0, 1.0, 0.0, 0.0); - glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, green_mat ); - glColor4f(0,1,0,0.5); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - gluCylinder(qobj, 1.0, 0.0, 2.0, 16, 1); - glDisable(GL_BLEND); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(0.75, 1.0, 1.0); - glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, blue_mat ); - gluSphere(qobj, 1.0, 20, 20); - glPopMatrix(); - - glPopMatrix(); - - /* This is very important!!! - * Make sure buffered commands are finished!!! - */ - glFinish(); - - gluDeleteQuadric(qobj); - - { - GLint r, g, b, a; - glGetIntegerv(GL_RED_BITS, &r); - glGetIntegerv(GL_GREEN_BITS, &g); - glGetIntegerv(GL_BLUE_BITS, &b); - glGetIntegerv(GL_ALPHA_BITS, &a); - printf("channel sizes: %d %d %d %d\n", r, g, b, a); - } -} - - - -static void -write_targa(const char *filename, const GLfloat *buffer, int width, int height) -{ - FILE *f = fopen( filename, "w" ); - if (f) { - int i, x, y; - const GLfloat *ptr = buffer; - printf ("osdemo, writing tga file \n"); - fputc (0x00, f); /* ID Length, 0 => No ID */ - fputc (0x00, f); /* Color Map Type, 0 => No color map included */ - fputc (0x02, f); /* Image Type, 2 => Uncompressed, True-color Image */ - fputc (0x00, f); /* Next five bytes are about the color map entries */ - fputc (0x00, f); /* 2 bytes Index, 2 bytes length, 1 byte size */ - fputc (0x00, f); - fputc (0x00, f); - fputc (0x00, f); - fputc (0x00, f); /* X-origin of Image */ - fputc (0x00, f); - fputc (0x00, f); /* Y-origin of Image */ - fputc (0x00, f); - fputc (WIDTH & 0xff, f); /* Image Width */ - fputc ((WIDTH>>8) & 0xff, f); - fputc (HEIGHT & 0xff, f); /* Image Height */ - fputc ((HEIGHT>>8) & 0xff, f); - fputc (0x18, f); /* Pixel Depth, 0x18 => 24 Bits */ - fputc (0x20, f); /* Image Descriptor */ - fclose(f); - f = fopen( filename, "ab" ); /* reopen in binary append mode */ - for (y=height-1; y>=0; y--) { - for (x=0; x 255) r = 255; - if (g > 255) g = 255; - if (b > 255) b = 255; - fputc(b, f); /* write blue */ - fputc(g, f); /* write green */ - fputc(r, f); /* write red */ - } - } - } -} - - -static void -write_ppm(const char *filename, const GLfloat *buffer, int width, int height) -{ - const int binary = 0; - FILE *f = fopen( filename, "w" ); - if (f) { - int i, x, y; - const GLfloat *ptr = buffer; - if (binary) { - fprintf(f,"P6\n"); - fprintf(f,"# ppm-file created by osdemo.c\n"); - fprintf(f,"%i %i\n", width,height); - fprintf(f,"255\n"); - fclose(f); - f = fopen( filename, "ab" ); /* reopen in binary append mode */ - for (y=height-1; y>=0; y--) { - for (x=0; x 255) r = 255; - if (g > 255) g = 255; - if (b > 255) b = 255; - fputc(r, f); /* write red */ - fputc(g, f); /* write green */ - fputc(b, f); /* write blue */ - } - } - } - else { - /*ASCII*/ - int counter = 0; - fprintf(f,"P3\n"); - fprintf(f,"# ascii ppm file created by osdemo.c\n"); - fprintf(f,"%i %i\n", width, height); - fprintf(f,"255\n"); - for (y=height-1; y>=0; y--) { - for (x=0; x 255) r = 255; - if (g > 255) g = 255; - if (b > 255) b = 255; - fprintf(f, " %3d %3d %3d", r, g, b); - counter++; - if (counter % 5 == 0) - fprintf(f, "\n"); - } - } - } - fclose(f); - } -} - - - -int main( int argc, char *argv[] ) -{ - GLfloat *buffer; - - /* Create an RGBA-mode context */ -#if OSMESA_MAJOR_VERSION * 100 + OSMESA_MINOR_VERSION >= 305 - /* specify Z, stencil, accum sizes */ - OSMesaContext ctx = OSMesaCreateContextExt( GL_RGBA, 16, 0, 0, NULL ); -#else - OSMesaContext ctx = OSMesaCreateContext( GL_RGBA, NULL ); -#endif - if (!ctx) { - printf("OSMesaCreateContext failed!\n"); - return 0; - } - - /* Allocate the image buffer */ - buffer = (GLfloat *) malloc( WIDTH * HEIGHT * 4 * sizeof(GLfloat)); - if (!buffer) { - printf("Alloc image buffer failed!\n"); - return 0; - } - - /* Bind the buffer to the context and make it current */ - if (!OSMesaMakeCurrent( ctx, buffer, GL_FLOAT, WIDTH, HEIGHT )) { - printf("OSMesaMakeCurrent failed!\n"); - return 0; - } - - render_image(); - - if (argc>1) { -#ifdef SAVE_TARGA - write_targa(argv[1], buffer, WIDTH, HEIGHT); -#else - write_ppm(argv[1], buffer, WIDTH, HEIGHT); -#endif - } - else { - printf("Specify a filename if you want to make an image file\n"); - } - - printf("all done\n"); - - /* free the image buffer */ - free( buffer ); - - /* destroy the context */ - OSMesaDestroyContext( ctx ); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/.cvsignore b/nx-X11/extras/Mesa_6.4.2/progs/redbook/.cvsignore deleted file mode 100644 index 8ed3efe3e2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/.cvsignore +++ /dev/null @@ -1,64 +0,0 @@ -.cvsignore -aaindex -aapoly -aargb -accanti -accpersp -alpha -alpha3D -anti -bezcurve -bezmesh -checker -clip -colormat -cube -depthcue -dof -double -drawf -feedback -fog -fogindex -font -hello -image -light -lines -list -material -mipmap -model -movelight -nurbs -pickdepth -picksquare -plane -planet -polyoff -polys -quadric -robot -sccolorlight -scene -scenebamb -sceneflat -select -smooth -stencil -stroke -surface -teaambient -teapots -tess -tesswind -texbind -texgen -texprox -texsub -texturesurf -torus -trim -unproject -varray -wrap diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/Imakefile b/nx-X11/extras/Mesa_6.4.2/progs/redbook/Imakefile deleted file mode 100644 index ab3b6d7f79..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/Imakefile +++ /dev/null @@ -1,221 +0,0 @@ -LOCAL_LIBRARIES = $(XLIB) $(TOP)\lib\Mesaaux.a $(TOP)\lib\Mesaglu.a $(TOP)\lib\MesaGL.a - -INCLUDES = -I$(TOP)\include - -SRCS = accanti.c \ - accnot.c \ - accpersp.c \ - accum.c \ - aim.c \ - alpha.c \ - alpha3D.c \ - anti.c \ - antiindex.c \ - antipindex.c \ - antipoint.c \ - antipoly.c \ - bezcurve.c \ - bezmesh.c \ - bezsurf.c \ - checker.c \ - checker2.c \ - chess.c \ - clip.c \ - colormat.c \ - cone.c \ - cube.c \ - curve.c \ - depthcue.c \ - disk.c \ - dof.c \ - dofnot.c \ - double.c \ - drawf.c \ - feedback.c \ - fog.c \ - fogindex.c \ - font.c \ - light.c \ - linelist.c \ - lines.c \ - list.c \ - list2.c \ - maplight.c \ - material.c \ - mipmap.c \ - model.c \ - movelight.c \ - nurbs.c \ - pickdepth.c \ - pickline.c \ - picksquare.c \ - plane.c \ - planet.c \ - planetup.c \ - polys.c \ - robot.c \ - sccolorlight.c \ - scene.c \ - scenebamb.c \ - sceneflat.c \ - select.c \ - simple.c \ - smooth.c \ - sphere.c \ - stencil.c \ - stroke.c \ - surface.c \ - tea.c \ - teaambient.c \ - teapots.c \ - texgen.c \ - texturesurf.c \ - trim.c \ - xfont.c - -PROGRAMS = ProgramTargetName(accanti) \ - ProgramTargetName(accnot) \ - ProgramTargetName(accpersp) \ - ProgramTargetName(accum) \ - ProgramTargetName(aim) \ - ProgramTargetName(alpha) \ - ProgramTargetName(alpha3D) \ - ProgramTargetName(anti) \ - ProgramTargetName(antiindex) \ - ProgramTargetName(antipindex) \ - ProgramTargetName(antipoint) \ - ProgramTargetName(antipoly) \ - ProgramTargetName(bezcurve) \ - ProgramTargetName(bezmesh) \ - ProgramTargetName(bezsurf) \ - ProgramTargetName(checker) \ - ProgramTargetName(checker2) \ - ProgramTargetName(chess) \ - ProgramTargetName(clip) \ - ProgramTargetName(colormat) \ - ProgramTargetName(cone) \ - ProgramTargetName(cube) \ - ProgramTargetName(curve) \ - ProgramTargetName(depthcue) \ - ProgramTargetName(disk) \ - ProgramTargetName(dof) \ - ProgramTargetName(dofnot) \ - ProgramTargetName(double) \ - ProgramTargetName(drawf) \ - ProgramTargetName(feedback) \ - ProgramTargetName(fog) \ - ProgramTargetName(fogindex) \ - ProgramTargetName(font) \ - ProgramTargetName(light) \ - ProgramTargetName(linelist) \ - ProgramTargetName(lines) \ - ProgramTargetName(list) \ - ProgramTargetName(list2) \ - ProgramTargetName(maplight) \ - ProgramTargetName(material) \ - ProgramTargetName(mipmap) \ - ProgramTargetName(model) \ - ProgramTargetName(movelight) \ - ProgramTargetName(nurbs) \ - ProgramTargetName(pickdepth) \ - ProgramTargetName(pickline) \ - ProgramTargetName(picksquare) \ - ProgramTargetName(plane) \ - ProgramTargetName(planet) \ - ProgramTargetName(planetup) \ - ProgramTargetName(polys) \ - ProgramTargetName(robot) \ - ProgramTargetName(sccolorlight) \ - ProgramTargetName(scene) \ - ProgramTargetName(scenebamb) \ - ProgramTargetName(sceneflat) \ - ProgramTargetName(select) \ - ProgramTargetName(simple) \ - ProgramTargetName(smooth) \ - ProgramTargetName(sphere) \ - ProgramTargetName(stencil) \ - ProgramTargetName(stroke) \ - ProgramTargetName(surface) \ - ProgramTargetName(tea) \ - ProgramTargetName(teaambient) \ - ProgramTargetName(teapots) \ - ProgramTargetName(texgen) \ - ProgramTargetName(texturesurf) \ - ProgramTargetName(trim) \ - ProgramTargetName(xfont) - -AllTarget($(PROGRAMS)) - -NormalProgramTarget(accanti,accanti.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(accnot,accnot.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(accpersp,accpersp.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(accum,accum.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(aim,aim.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(alpha,alpha.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(alpha3D,alpha3D.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(anti,anti.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(antiindex,antiindex.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(antipindex,antipindex.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(antipoint,antipoint.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(antipoly,antipoly.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(bezcurve,bezcurve.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(bezmesh,bezmesh.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(bezsurf,bezsurf.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(checker,checker.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(checker2,checker2.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(chess,chess.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(clip,clip.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(colormat,colormat.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(cone,cone.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(cube,cube.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(curve,curve.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(depthcue,depthcue.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(disk,disk.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(dof,dof.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(dofnot,dofnot.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(double,double.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(drawf,drawf.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(feedback,feedback.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(fog,fog.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(fogindex,fogindex.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(font,font.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(light,light.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(linelist,linelist.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(lines,lines.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(list,list.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(list2,list2.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(maplight,maplight.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(material,material.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(mipmap,mipmap.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(model,model.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(movelight,movelight.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(nurbs,nurbs.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(pickdepth,pickdepth.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(pickline,pickline.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(picksquare,picksquare.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(plane,plane.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(planet,planet.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(planetup,planetup.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(polys,polys.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(robot,robot.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(sccolorlight,sccolorlight.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(scene,scene.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(scenebamb,scenebamb.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(sceneflat,sceneflat.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(select,select.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(simple,simple.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(smooth,smooth.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(sphere,sphere.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(stencil,stencil.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(stroke,stroke.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(surface,surface.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(tea,tea.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(teaambient,teaambient.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(teapots,teapots.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(texgen,texgen.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(texturesurf,texturesurf.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(trim,trim.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(xfont,xfont.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) - -DependTarget() - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/Makefile b/nx-X11/extras/Mesa_6.4.2/progs/redbook/Makefile deleted file mode 100644 index 4cfbb9aeac..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# progs/redbook/Makefile - -TOP = ../.. -include $(TOP)/configs/current - -INCDIR = $(TOP)/include - -LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(GLU_LIB_NAME) $(LIB_DIR)/$(GLUT_LIB_NAME) - -PROGS = aaindex aapoly aargb accanti accpersp alpha alpha3D anti \ - bezcurve bezmesh checker clip colormat cube depthcue dof \ - double drawf feedback fog fogindex font hello image light \ - lines list material mipmap model movelight nurbs pickdepth \ - picksquare plane planet polyoff polys quadric robot sccolorlight \ - scene scenebamb sceneflat select smooth stencil stroke surface \ - teaambient teapots tess tesswind texbind texgen texprox texsub \ - texturesurf torus trim unproject varray wrap - - - -##### RULES ##### - -.SUFFIXES: -.SUFFIXES: .c - -.c: $(LIB_DEP) - $(CC) -I$(INCDIR) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@ - - - -##### TARGETS ###### - -default: $(PROGS) - - -clean: - -rm -f $(PROGS) - -rm -f *.o *~ - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/Makefile.win b/nx-X11/extras/Mesa_6.4.2/progs/redbook/Makefile.win deleted file mode 100644 index 7e57b8e47f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/Makefile.win +++ /dev/null @@ -1,78 +0,0 @@ -# Makefile for Win32 - -TOP = .. -INCDIR = ..\include -LIBDIR = ..\lib - -!include - -SRCS= \ - aaindex.c \ - aapoly.c \ - aargb.c \ - accanti.c \ - accpersp.c \ - alpha.c \ - alpha3D.c \ - anti.c \ - bezcurve.c \ - bezmesh.c \ - checker.c \ - clip.c \ - colormat.c \ - cube.c \ - depthcue.c \ - dof.c \ - double.c \ - drawf.c \ - feedback.c \ - fog.c \ - fogindex.c \ - font.c \ - hello.c \ - image.c \ - light.c \ - lines.c \ - list.c \ - material.c \ - mipmap.c \ - model.c \ - movelight.c \ - nurbs.c \ - pickdepth.c \ - picksquare.c \ - plane.c \ - planet.c \ - polyoff.c \ - polys.c \ - quadric.c \ - robot.c \ - sccolorlight.c \ - scene.c \ - scenebamb.c \ - sceneflat.c \ - select.c \ - smooth.c \ - stencil.c \ - stroke.c \ - surface.c \ - teaambient.c \ - teapots.c \ - tess.c \ - tesswind.c \ - texbind.c \ - texgen.c \ - texprox.c \ - texsub.c \ - texturesurf.c \ - torus.c \ - trim.c \ - unproject.c \ - varray.c \ - wrap.c - -!include "$(TOP)/mesawin32.mak" - -$(EXES) : $*.obj - @echo $@ - $(link) -out:$@ $* /LIBPATH:$(LIBDIR) $(LIBS) \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/README b/nx-X11/extras/Mesa_6.4.2/progs/redbook/README deleted file mode 100644 index 4c8d5a74c9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/README +++ /dev/null @@ -1,41 +0,0 @@ -/* - * For the software in this directory - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ - -The source code examples in this directory accompany the examples -printed in the _OpenGL Programming Guide_, published by Addison-Wesley; -ISBN 0-201-63274-8. diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/Windows/redbook.dsw b/nx-X11/extras/Mesa_6.4.2/progs/redbook/Windows/redbook.dsw deleted file mode 100644 index 71ba7e89e3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/Windows/redbook.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "teapots"=".\teapots.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/Windows/teapots.dsp b/nx-X11/extras/Mesa_6.4.2/progs/redbook/Windows/teapots.dsp deleted file mode 100644 index 4d39865810..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/Windows/teapots.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="teapots" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=teapots - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "teapots.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "teapots.mak" CFG="teapots - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "teapots - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "teapots - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "teapots - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../teapots.exe" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ELSEIF "$(CFG)" == "teapots - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../teapots.exe" /pdbtype:sept -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy DLLs -PostBuild_Cmds=copy ..\..\..\lib\*.dll .. -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "teapots - Win32 Release" -# Name "teapots - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\teapots.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/aaindex.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/aaindex.c deleted file mode 100644 index 7dbc7b4b9b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/aaindex.c +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * aaindex.c - * This program draws shows how to draw anti-aliased lines in color - * index mode. It draws two diagonal lines to form an X; when 'r' - * is typed in the window, the lines are rotated in opposite - * directions. - */ -#include -#include "stdlib.h" - -#define RAMPSIZE 16 -#define RAMP1START 32 -#define RAMP2START 48 - -static float rotAngle = 0.; - -/* Initialize antialiasing for color index mode, - * including loading a green color ramp starting - * at RAMP1START, and a blue color ramp starting - * at RAMP2START. The ramps must be a multiple of 16. - */ -void init(void) -{ - int i; - - for (i = 0; i < RAMPSIZE; i++) { - GLfloat shade; - shade = (GLfloat) i/(GLfloat) RAMPSIZE; - glutSetColor(RAMP1START+(GLint)i, 0., shade, 0.); - glutSetColor(RAMP2START+(GLint)i, 0., 0., shade); - } - - glEnable (GL_LINE_SMOOTH); - glHint (GL_LINE_SMOOTH_HINT, GL_DONT_CARE); - glLineWidth (1.5); - - glClearIndex ((GLfloat) RAMP1START); -} - -/* Draw 2 diagonal lines to form an X - */ -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT); - - glIndexi(RAMP1START); - glPushMatrix(); - glRotatef(-rotAngle, 0.0, 0.0, 0.1); - glBegin (GL_LINES); - glVertex2f (-0.5, 0.5); - glVertex2f (0.5, -0.5); - glEnd (); - glPopMatrix(); - - glIndexi(RAMP2START); - glPushMatrix(); - glRotatef(rotAngle, 0.0, 0.0, 0.1); - glBegin (GL_LINES); - glVertex2f (0.5, 0.5); - glVertex2f (-0.5, -0.5); - glEnd (); - glPopMatrix(); - - glFlush(); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - gluOrtho2D (-1.0, 1.0, - -1.0*(GLfloat)h/(GLfloat)w, 1.0*(GLfloat)h/(GLfloat)w); - else - gluOrtho2D (-1.0*(GLfloat)w/(GLfloat)h, - 1.0*(GLfloat)w/(GLfloat)h, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 'r': - case 'R': - rotAngle += 20.; - if (rotAngle >= 360.) rotAngle = 0.; - glutPostRedisplay(); - break; - case 27: /* Escape Key */ - exit(0); - break; - default: - break; - } -} - -/* Main Loop - * Open window with initial window size, title bar, - * color index display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_INDEX); - glutInitWindowSize (200, 200); - glutCreateWindow (argv[0]); - init(); - glutReshapeFunc (reshape); - glutKeyboardFunc (keyboard); - glutDisplayFunc (display); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/aapoly.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/aapoly.c deleted file mode 100644 index 757f0f48c4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/aapoly.c +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * aapoly.c - * This program draws filled polygons with antialiased - * edges. The special GL_SRC_ALPHA_SATURATE blending - * function is used. - * Pressing the 't' key turns the antialiasing on and off. - */ -#include -#include -#include -#include - -GLboolean polySmooth = GL_TRUE; - -static void init(void) -{ - glCullFace (GL_BACK); - glEnable (GL_CULL_FACE); - glBlendFunc (GL_SRC_ALPHA_SATURATE, GL_ONE); - glClearColor (0.0, 0.0, 0.0, 0.0); -} - -#define NFACE 6 -#define NVERT 8 -void drawCube(GLdouble x0, GLdouble x1, GLdouble y0, GLdouble y1, - GLdouble z0, GLdouble z1) -{ - static GLfloat v[8][3]; - static GLfloat c[8][4] = { - {0.0, 0.0, 0.0, 1.0}, {1.0, 0.0, 0.0, 1.0}, - {0.0, 1.0, 0.0, 1.0}, {1.0, 1.0, 0.0, 1.0}, - {0.0, 0.0, 1.0, 1.0}, {1.0, 0.0, 1.0, 1.0}, - {0.0, 1.0, 1.0, 1.0}, {1.0, 1.0, 1.0, 1.0} - }; - -/* indices of front, top, left, bottom, right, back faces */ - static GLubyte indices[NFACE][4] = { - {4, 5, 6, 7}, {2, 3, 7, 6}, {0, 4, 7, 3}, - {0, 1, 5, 4}, {1, 5, 6, 2}, {0, 3, 2, 1} - }; - - v[0][0] = v[3][0] = v[4][0] = v[7][0] = x0; - v[1][0] = v[2][0] = v[5][0] = v[6][0] = x1; - v[0][1] = v[1][1] = v[4][1] = v[5][1] = y0; - v[2][1] = v[3][1] = v[6][1] = v[7][1] = y1; - v[0][2] = v[1][2] = v[2][2] = v[3][2] = z0; - v[4][2] = v[5][2] = v[6][2] = v[7][2] = z1; - -#ifdef GL_VERSION_1_1 - glEnableClientState (GL_VERTEX_ARRAY); - glEnableClientState (GL_COLOR_ARRAY); - glVertexPointer (3, GL_FLOAT, 0, v); - glColorPointer (4, GL_FLOAT, 0, c); - glDrawElements (GL_QUADS, NFACE*4, GL_UNSIGNED_BYTE, indices); - glDisableClientState (GL_VERTEX_ARRAY); - glDisableClientState (GL_COLOR_ARRAY); -#else - printf ("If this is GL Version 1.0, "); - printf ("vertex arrays are not supported.\n"); - exit(1); -#endif -} - -/* Note: polygons must be drawn from front to back - * for proper blending. - */ -void display(void) -{ - if (polySmooth) { - glClear (GL_COLOR_BUFFER_BIT); - glEnable (GL_BLEND); - glEnable (GL_POLYGON_SMOOTH); - glDisable (GL_DEPTH_TEST); - } - else { - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glDisable (GL_BLEND); - glDisable (GL_POLYGON_SMOOTH); - glEnable (GL_DEPTH_TEST); - } - - glPushMatrix (); - glTranslatef (0.0, 0.0, -8.0); - glRotatef (30.0, 1.0, 0.0, 0.0); - glRotatef (60.0, 0.0, 1.0, 0.0); - drawCube(-0.5, 0.5, -0.5, 0.5, -0.5, 0.5); - glPopMatrix (); - - glFlush (); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(30.0, (GLfloat) w/(GLfloat) h, 1.0, 20.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 't': - case 'T': - polySmooth = !polySmooth; - glutPostRedisplay(); - break; - case 27: - exit(0); /* Escape key */ - break; - default: - break; - } -} - -/* Main Loop - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB - | GLUT_ALPHA | GLUT_DEPTH); - glutInitWindowSize(200, 200); - glutCreateWindow(argv[0]); - init (); - glutReshapeFunc (reshape); - glutKeyboardFunc (keyboard); - glutDisplayFunc (display); - glutMainLoop(); - return 0; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/aargb.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/aargb.c deleted file mode 100644 index f51984170e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/aargb.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * aargb.c - * This program draws shows how to draw anti-aliased lines. It draws - * two diagonal lines to form an X; when 'r' is typed in the window, - * the lines are rotated in opposite directions. - */ -#include -#include -#include - -static float rotAngle = 0.; - -/* Initialize antialiasing for RGBA mode, including alpha - * blending, hint, and line width. Print out implementation - * specific info on line width granularity and width. - */ -void init(void) -{ - GLfloat values[2]; - glGetFloatv (GL_LINE_WIDTH_GRANULARITY, values); - printf ("GL_LINE_WIDTH_GRANULARITY value is %3.1f\n", values[0]); - - glGetFloatv (GL_LINE_WIDTH_RANGE, values); - printf ("GL_LINE_WIDTH_RANGE values are %3.1f %3.1f\n", - values[0], values[1]); - - glEnable (GL_LINE_SMOOTH); - glEnable (GL_BLEND); - glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glHint (GL_LINE_SMOOTH_HINT, GL_DONT_CARE); - glLineWidth (1.5); - - glClearColor(0.0, 0.0, 0.0, 0.0); -} - -/* Draw 2 diagonal lines to form an X - */ -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT); - - glColor3f (0.0, 1.0, 0.0); - glPushMatrix(); - glRotatef(-rotAngle, 0.0, 0.0, 0.1); - glBegin (GL_LINES); - glVertex2f (-0.5, 0.5); - glVertex2f (0.5, -0.5); - glEnd (); - glPopMatrix(); - - glColor3f (0.0, 0.0, 1.0); - glPushMatrix(); - glRotatef(rotAngle, 0.0, 0.0, 0.1); - glBegin (GL_LINES); - glVertex2f (0.5, 0.5); - glVertex2f (-0.5, -0.5); - glEnd (); - glPopMatrix(); - - glFlush(); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - gluOrtho2D (-1.0, 1.0, - -1.0*(GLfloat)h/(GLfloat)w, 1.0*(GLfloat)h/(GLfloat)w); - else - gluOrtho2D (-1.0*(GLfloat)w/(GLfloat)h, - 1.0*(GLfloat)w/(GLfloat)h, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 'r': - case 'R': - rotAngle += 20.; - if (rotAngle >= 360.) rotAngle = 0.; - glutPostRedisplay(); - break; - case 27: /* Escape Key */ - exit(0); - break; - default: - break; - } -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (200, 200); - glutCreateWindow (argv[0]); - init(); - glutReshapeFunc (reshape); - glutKeyboardFunc (keyboard); - glutDisplayFunc (display); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/accanti.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/accanti.c deleted file mode 100644 index 12ca16f7a5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/accanti.c +++ /dev/null @@ -1,182 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* accanti.c - */ -#include -#include -#include "jitter.h" - -/* Initialize lighting and other values. - */ -void myinit(void) -{ - GLfloat mat_ambient[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_position[] = { 0.0, 0.0, 10.0, 1.0 }; - GLfloat lm_ambient[] = { 0.2, 0.2, 0.2, 1.0 }; - - glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialf(GL_FRONT, GL_SHININESS, 50.0); - glLightfv(GL_LIGHT0, GL_POSITION, light_position); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lm_ambient); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); - glShadeModel (GL_FLAT); - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClearAccum(0.0, 0.0, 0.0, 0.0); -} - -void displayObjects(void) -{ - GLfloat torus_diffuse[] = { 0.7, 0.7, 0.0, 1.0 }; - GLfloat cube_diffuse[] = { 0.0, 0.7, 0.7, 1.0 }; - GLfloat sphere_diffuse[] = { 0.7, 0.0, 0.7, 1.0 }; - GLfloat octa_diffuse[] = { 0.7, 0.4, 0.4, 1.0 }; - - glPushMatrix (); - glRotatef (30.0, 1.0, 0.0, 0.0); - - glPushMatrix (); - glTranslatef (-0.80, 0.35, 0.0); - glRotatef (100.0, 1.0, 0.0, 0.0); - glMaterialfv(GL_FRONT, GL_DIFFUSE, torus_diffuse); - glutSolidTorus (0.275, 0.85, 16, 16); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (-0.75, -0.50, 0.0); - glRotatef (45.0, 0.0, 0.0, 1.0); - glRotatef (45.0, 1.0, 0.0, 0.0); - glMaterialfv(GL_FRONT, GL_DIFFUSE, cube_diffuse); - glutSolidCube (1.5); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (0.75, 0.60, 0.0); - glRotatef (30.0, 1.0, 0.0, 0.0); - glMaterialfv(GL_FRONT, GL_DIFFUSE, sphere_diffuse); - glutSolidSphere (1.0, 16, 16); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (0.70, -0.90, 0.25); - glMaterialfv(GL_FRONT, GL_DIFFUSE, octa_diffuse); - glutSolidOctahedron (); - glPopMatrix (); - - glPopMatrix (); -} - -#define ACSIZE 8 - -void display(void) -{ - GLint viewport[4]; - int jitter; - - glGetIntegerv (GL_VIEWPORT, viewport); - - glClear(GL_ACCUM_BUFFER_BIT); - for (jitter = 0; jitter < ACSIZE; jitter++) { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glPushMatrix (); -/* Note that 4.5 is the distance in world space between - * left and right and bottom and top. - * This formula converts fractional pixel movement to - * world coordinates. - */ - glTranslatef (j8[jitter].x*4.5/viewport[2], - j8[jitter].y*4.5/viewport[3], 0.0); - displayObjects (); - glPopMatrix (); - glAccum(GL_ACCUM, 1.0/ACSIZE); - } - glAccum (GL_RETURN, 1.0); - glFlush(); -} - -void myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho (-2.25, 2.25, -2.25*h/w, 2.25*h/w, -10.0, 10.0); - else - glOrtho (-2.25*w/h, 2.25*w/h, -2.25, 2.25, -10.0, 10.0); - glMatrixMode(GL_MODELVIEW); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB - | GLUT_ACCUM | GLUT_DEPTH); - glutInitWindowSize (250, 250); - glutCreateWindow (argv[0]); - myinit(); - glutReshapeFunc (myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/accpersp.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/accpersp.c deleted file mode 100644 index 46e369ae63..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/accpersp.c +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* accpersp.c - * Use the accumulation buffer to do full-scene antialiasing - * on a scene with perspective projection, using the special - * routines accFrustum() and accPerspective(). - */ -#include -#include -#include -#include "jitter.h" - -#define PI_ 3.14159265358979323846 - -/* accFrustum() - * The first 6 arguments are identical to the glFrustum() call. - * - * pixdx and pixdy are anti-alias jitter in pixels. - * Set both equal to 0.0 for no anti-alias jitter. - * eyedx and eyedy are depth-of field jitter in pixels. - * Set both equal to 0.0 for no depth of field effects. - * - * focus is distance from eye to plane in focus. - * focus must be greater than, but not equal to 0.0. - * - * Note that accFrustum() calls glTranslatef(). You will - * probably want to insure that your ModelView matrix has been - * initialized to identity before calling accFrustum(). - */ -void accFrustum(GLdouble left, GLdouble right, GLdouble bottom, - GLdouble top, GLdouble nnear, GLdouble ffar, GLdouble pixdx, - GLdouble pixdy, GLdouble eyedx, GLdouble eyedy, GLdouble focus) -{ - GLdouble xwsize, ywsize; - GLdouble dx, dy; - GLint viewport[4]; - - glGetIntegerv (GL_VIEWPORT, viewport); - - xwsize = right - left; - ywsize = top - bottom; - - dx = -(pixdx*xwsize/(GLdouble) viewport[2] + eyedx*nnear/focus); - dy = -(pixdy*ywsize/(GLdouble) viewport[3] + eyedy*nnear/focus); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum (left + dx, right + dx, bottom + dy, top + dy, nnear, ffar); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef (-eyedx, -eyedy, 0.0); -} - -/* accPerspective() - * - * The first 4 arguments are identical to the gluPerspective() call. - * pixdx and pixdy are anti-alias jitter in pixels. - * Set both equal to 0.0 for no anti-alias jitter. - * eyedx and eyedy are depth-of field jitter in pixels. - * Set both equal to 0.0 for no depth of field effects. - * - * focus is distance from eye to plane in focus. - * focus must be greater than, but not equal to 0.0. - * - * Note that accPerspective() calls accFrustum(). - */ -void accPerspective(GLdouble fovy, GLdouble aspect, - GLdouble nnear, GLdouble ffar, GLdouble pixdx, GLdouble pixdy, - GLdouble eyedx, GLdouble eyedy, GLdouble focus) -{ - GLdouble fov2,left,right,bottom,top; - - fov2 = ((fovy*PI_) / 180.0) / 2.0; - - top = nnear / (cos(fov2) / sin(fov2)); - bottom = -top; - - right = top * aspect; - left = -right; - - accFrustum (left, right, bottom, top, nnear, ffar, - pixdx, pixdy, eyedx, eyedy, focus); -} - -/* Initialize lighting and other values. - */ -void init(void) -{ - GLfloat mat_ambient[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_position[] = { 0.0, 0.0, 10.0, 1.0 }; - GLfloat lm_ambient[] = { 0.2, 0.2, 0.2, 1.0 }; - - glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialf(GL_FRONT, GL_SHININESS, 50.0); - glLightfv(GL_LIGHT0, GL_POSITION, light_position); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lm_ambient); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - glShadeModel (GL_FLAT); - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClearAccum(0.0, 0.0, 0.0, 0.0); -} - -void displayObjects(void) -{ - GLfloat torus_diffuse[] = { 0.7, 0.7, 0.0, 1.0 }; - GLfloat cube_diffuse[] = { 0.0, 0.7, 0.7, 1.0 }; - GLfloat sphere_diffuse[] = { 0.7, 0.0, 0.7, 1.0 }; - GLfloat octa_diffuse[] = { 0.7, 0.4, 0.4, 1.0 }; - - glPushMatrix (); - glTranslatef (0.0, 0.0, -5.0); - glRotatef (30.0, 1.0, 0.0, 0.0); - - glPushMatrix (); - glTranslatef (-0.80, 0.35, 0.0); - glRotatef (100.0, 1.0, 0.0, 0.0); - glMaterialfv(GL_FRONT, GL_DIFFUSE, torus_diffuse); - glutSolidTorus (0.275, 0.85, 16, 16); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (-0.75, -0.50, 0.0); - glRotatef (45.0, 0.0, 0.0, 1.0); - glRotatef (45.0, 1.0, 0.0, 0.0); - glMaterialfv(GL_FRONT, GL_DIFFUSE, cube_diffuse); - glutSolidCube (1.5); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (0.75, 0.60, 0.0); - glRotatef (30.0, 1.0, 0.0, 0.0); - glMaterialfv(GL_FRONT, GL_DIFFUSE, sphere_diffuse); - glutSolidSphere (1.0, 16, 16); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (0.70, -0.90, 0.25); - glMaterialfv(GL_FRONT, GL_DIFFUSE, octa_diffuse); - glutSolidOctahedron (); - glPopMatrix (); - - glPopMatrix (); -} - -#define ACSIZE 8 - -void display(void) -{ - GLint viewport[4]; - int jitter; - - glGetIntegerv (GL_VIEWPORT, viewport); - - glClear(GL_ACCUM_BUFFER_BIT); - for (jitter = 0; jitter < ACSIZE; jitter++) { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - accPerspective (50.0, - (GLdouble) viewport[2]/(GLdouble) viewport[3], - 1.0, 15.0, j8[jitter].x, j8[jitter].y, 0.0, 0.0, 1.0); - displayObjects (); - glAccum(GL_ACCUM, 1.0/ACSIZE); - } - glAccum (GL_RETURN, 1.0); - glFlush(); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -/* Main Loop - * Be certain you request an accumulation buffer. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB - | GLUT_ACCUM | GLUT_DEPTH); - glutInitWindowSize (250, 250); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init(); - glutReshapeFunc(reshape); - glutDisplayFunc(display); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/alpha.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/alpha.c deleted file mode 100644 index 6eeb45b96f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/alpha.c +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * alpha.c - * This program draws several overlapping filled polygons - * to demonstrate the effect order has on alpha blending results. - * Use the 't' key to toggle the order of drawing polygons. - */ -#include -#include - -static int leftFirst = GL_TRUE; - -/* Initialize alpha blending function. - */ -static void init(void) -{ - glEnable (GL_BLEND); - glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glShadeModel (GL_FLAT); - glClearColor (0.0, 0.0, 0.0, 0.0); -} - -static void drawLeftTriangle(void) -{ - /* draw yellow triangle on LHS of screen */ - - glBegin (GL_TRIANGLES); - glColor4f(1.0, 1.0, 0.0, 0.75); - glVertex3f(0.1, 0.9, 0.0); - glVertex3f(0.1, 0.1, 0.0); - glVertex3f(0.7, 0.5, 0.0); - glEnd(); -} - -static void drawRightTriangle(void) -{ - /* draw cyan triangle on RHS of screen */ - - glBegin (GL_TRIANGLES); - glColor4f(0.0, 1.0, 1.0, 0.75); - glVertex3f(0.9, 0.9, 0.0); - glVertex3f(0.3, 0.5, 0.0); - glVertex3f(0.9, 0.1, 0.0); - glEnd(); -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT); - - if (leftFirst) { - drawLeftTriangle(); - drawRightTriangle(); - } - else { - drawRightTriangle(); - drawLeftTriangle(); - } - - glFlush(); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - gluOrtho2D (0.0, 1.0, 0.0, 1.0*(GLfloat)h/(GLfloat)w); - else - gluOrtho2D (0.0, 1.0*(GLfloat)w/(GLfloat)h, 0.0, 1.0); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 't': - case 'T': - leftFirst = !leftFirst; - glutPostRedisplay(); - break; - case 27: /* Escape key */ - exit(0); - break; - default: - break; - } -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (200, 200); - glutCreateWindow (argv[0]); - init(); - glutReshapeFunc (reshape); - glutKeyboardFunc (keyboard); - glutDisplayFunc (display); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/alpha3D.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/alpha3D.c deleted file mode 100644 index 6169bd162b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/alpha3D.c +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * alpha3D.c - * This program demonstrates how to intermix opaque and - * alpha blended polygons in the same scene, by using - * glDepthMask. Press the 'a' key to animate moving the - * transparent object through the opaque object. Press - * the 'r' key to reset the scene. - */ -#include -#include -#include - -#define MAXZ 8.0 -#define MINZ -8.0 -#define ZINC 4. - -static float solidZ = MAXZ; -static float transparentZ = MINZ; -static GLuint sphereList, cubeList; - -static void init(void) -{ - GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 0.15 }; - GLfloat mat_shininess[] = { 100.0 }; - GLfloat position[] = { 0.5, 0.5, 1.0, 0.0 }; - - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); - glLightfv(GL_LIGHT0, GL_POSITION, position); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - sphereList = glGenLists(1); - glNewList(sphereList, GL_COMPILE); - glutSolidSphere (0.4, 16, 16); - glEndList(); - - cubeList = glGenLists(1); - glNewList(cubeList, GL_COMPILE); - glutSolidCube (0.6); - glEndList(); -} - -void display(void) -{ - GLfloat mat_solid[] = { 0.75, 0.75, 0.0, 1.0 }; - GLfloat mat_zero[] = { 0.0, 0.0, 0.0, 1.0 }; - GLfloat mat_transparent[] = { 0.0, 0.8, 0.8, 0.6 }; - GLfloat mat_emission[] = { 0.0, 0.3, 0.3, 0.6 }; - - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix (); - glTranslatef (-0.15, -0.15, solidZ); - glMaterialfv(GL_FRONT, GL_EMISSION, mat_zero); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_solid); - glCallList (sphereList); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (0.15, 0.15, transparentZ); - glRotatef (15.0, 1.0, 1.0, 0.0); - glRotatef (30.0, 0.0, 1.0, 0.0); - glMaterialfv(GL_FRONT, GL_EMISSION, mat_emission); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_transparent); - glEnable (GL_BLEND); - glDepthMask (GL_FALSE); - glBlendFunc (GL_SRC_ALPHA, GL_ONE); - glCallList (cubeList); - glDepthMask (GL_TRUE); - glDisable (GL_BLEND); - glPopMatrix (); - - glutSwapBuffers(); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, (GLint) w, (GLint) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho (-1.5, 1.5, -1.5*(GLfloat)h/(GLfloat)w, - 1.5*(GLfloat)h/(GLfloat)w, -10.0, 10.0); - else - glOrtho (-1.5*(GLfloat)w/(GLfloat)h, - 1.5*(GLfloat)w/(GLfloat)h, -1.5, 1.5, -10.0, 10.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -void animate(void) -{ - static double t0 = -1.; - if (solidZ <= MINZ || transparentZ >= MAXZ) - { - glutIdleFunc(NULL); - t0 = -1.; - } - else { - double t, dt; - t = glutGet(GLUT_ELAPSED_TIME) / 1000.; - if (t0 < 0.) - t0 = t; - dt = t - t0; - t0 = t; - solidZ -= ZINC*dt; - transparentZ += ZINC*dt; - glutPostRedisplay(); - } -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 'a': - case 'A': - solidZ = MAXZ; - transparentZ = MINZ; - glutIdleFunc(animate); - break; - case 'r': - case 'R': - solidZ = MAXZ; - transparentZ = MINZ; - glutPostRedisplay(); - break; - case 27: - exit(0); - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize(500, 500); - glutCreateWindow(argv[0]); - init(); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutDisplayFunc(display); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/anti.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/anti.c deleted file mode 100644 index 9eab0bc351..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/anti.c +++ /dev/null @@ -1,124 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* - * anti.c - * This program draws antialiased lines in RGBA mode. - */ -#include -#include -#include - -/* Initialize antialiasing for RGBA mode, including alpha - * blending, hint, and line width. Print out implementation - * specific info on line width granularity and width. - */ -void myinit(void) -{ - GLfloat values[2]; - glGetFloatv (GL_LINE_WIDTH_GRANULARITY, values); - printf ("GL_LINE_WIDTH_GRANULARITY value is %3.1f\n", values[0]); - - glGetFloatv (GL_LINE_WIDTH_RANGE, values); - printf ("GL_LINE_WIDTH_RANGE values are %3.1f %3.1f\n", - values[0], values[1]); - - glEnable (GL_LINE_SMOOTH); - glEnable (GL_BLEND); - glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glHint (GL_LINE_SMOOTH_HINT, GL_DONT_CARE); - glLineWidth (1.5); - - glShadeModel(GL_FLAT); - glClearColor(0.0, 0.0, 0.0, 0.0); - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); -} - -/* display() draws an icosahedron with a large alpha value, 1.0. - */ -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glColor4f (1.0, 1.0, 1.0, 1.0); - glutWireIcosahedron(); - glFlush(); -} - -void myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective (45.0, (GLfloat) w/(GLfloat) h, 3.0, 5.0); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity (); - glTranslatef (0.0, 0.0, -4.0); /* move object into view */ -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutCreateWindow (argv[0]); - myinit(); - glutReshapeFunc (myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/bezcurve.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/bezcurve.c deleted file mode 100644 index 5dee440396..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/bezcurve.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* bezcurve.c - * This program uses evaluators to draw a Bezier curve. - */ -#include -#include - -GLfloat ctrlpoints[4][3] = { - { -4.0, -4.0, 0.0}, { -2.0, 4.0, 0.0}, - {2.0, -4.0, 0.0}, {4.0, 4.0, 0.0}}; - -void init(void) -{ - glClearColor(0.0, 0.0, 0.0, 0.0); - glShadeModel(GL_FLAT); - glMap1f(GL_MAP1_VERTEX_3, 0.0, 1.0, 3, 4, &ctrlpoints[0][0]); - glEnable(GL_MAP1_VERTEX_3); -} - -void display(void) -{ - int i; - - glClear(GL_COLOR_BUFFER_BIT); - glColor3f(1.0, 1.0, 1.0); - glBegin(GL_LINE_STRIP); - for (i = 0; i <= 30; i++) - glEvalCoord1f((GLfloat) i/30.0); - glEnd(); - /* The following code displays the control points as dots. */ - glPointSize(5.0); - glColor3f(1.0, 1.0, 0.0); - glBegin(GL_POINTS); - for (i = 0; i < 4; i++) - glVertex3fv(&ctrlpoints[i][0]); - glEnd(); - glFlush(); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho(-5.0, 5.0, -5.0*(GLfloat)h/(GLfloat)w, - 5.0*(GLfloat)h/(GLfloat)w, -5.0, 5.0); - else - glOrtho(-5.0*(GLfloat)w/(GLfloat)h, - 5.0*(GLfloat)w/(GLfloat)h, -5.0, 5.0, -5.0, 5.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (500, 500); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc (keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/bezmesh.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/bezmesh.c deleted file mode 100644 index 55e7e827f2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/bezmesh.c +++ /dev/null @@ -1,162 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/** - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* bezsurf.c - * This program renders a lighted, filled Bezier surface, - * using two-dimensional evaluators. - */ -#include -#include - -GLfloat ctrlpoints[4][4][3] = -{ - { - {-1.5, -1.5, 4.0}, - {-0.5, -1.5, 2.0}, - {0.5, -1.5, -1.0}, - {1.5, -1.5, 2.0}}, - { - {-1.5, -0.5, 1.0}, - {-0.5, -0.5, 3.0}, - {0.5, -0.5, 0.0}, - {1.5, -0.5, -1.0}}, - { - {-1.5, 0.5, 4.0}, - {-0.5, 0.5, 0.0}, - {0.5, 0.5, 3.0}, - {1.5, 0.5, 4.0}}, - { - {-1.5, 1.5, -2.0}, - {-0.5, 1.5, -2.0}, - {0.5, 1.5, 0.0}, - {1.5, 1.5, -1.0}} -}; - -void -initlights(void) -{ - GLfloat ambient[] = - {0.2, 0.2, 0.2, 1.0}; - GLfloat position[] = - {0.0, 0.0, 2.0, 1.0}; - GLfloat mat_diffuse[] = - {0.6, 0.6, 0.6, 1.0}; - GLfloat mat_specular[] = - {1.0, 1.0, 1.0, 1.0}; - GLfloat mat_shininess[] = - {50.0}; - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - - glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); - glLightfv(GL_LIGHT0, GL_POSITION, position); - - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); -} - -void -display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glPushMatrix(); - glRotatef(85.0, 1.0, 1.0, 1.0); - glEvalMesh2(GL_FILL, 0, 20, 0, 20); - glPopMatrix(); - glFlush(); -} - -void -myinit(void) -{ - glClearColor(0.0, 0.0, 0.0, 1.0); - glEnable(GL_DEPTH_TEST); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, - 0, 1, 12, 4, &ctrlpoints[0][0][0]); - glEnable(GL_MAP2_VERTEX_3); - glEnable(GL_AUTO_NORMAL); - glEnable(GL_NORMALIZE); - glMapGrid2f(20, 0.0, 1.0, 20, 0.0, 1.0); - initlights(); /* for lighted version only */ -} - -void -myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho(-4.0, 4.0, -4.0 * (GLfloat) h / (GLfloat) w, - 4.0 * (GLfloat) h / (GLfloat) w, -4.0, 4.0); - else - glOrtho(-4.0 * (GLfloat) w / (GLfloat) h, - 4.0 * (GLfloat) w / (GLfloat) h, -4.0, 4.0, -4.0, 4.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -int -main(int argc, char **argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutCreateWindow(argv[0]); - myinit(); - glutReshapeFunc(myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/checker.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/checker.c deleted file mode 100644 index 06cbae7dd7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/checker.c +++ /dev/null @@ -1,140 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* checker.c - * This program texture maps a checkerboard image onto - * two rectangles. This program clamps the texture, if - * the texture coordinates fall outside 0.0 and 1.0. - */ -#include -#include - -/* Create checkerboard texture */ -#define checkImageWidth 64 -#define checkImageHeight 64 -GLubyte checkImage[checkImageWidth][checkImageHeight][3]; - -void makeCheckImage(void) -{ - int i, j, c; - - for (i = 0; i < checkImageWidth; i++) { - for (j = 0; j < checkImageHeight; j++) { - c = ((((i&0x8)==0)^((j&0x8)==0)))*255; - checkImage[i][j][0] = (GLubyte) c; - checkImage[i][j][1] = (GLubyte) c; - checkImage[i][j][2] = (GLubyte) c; - } - } -} - -void myinit(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_LESS); - - makeCheckImage(); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glTexImage2D(GL_TEXTURE_2D, 0, 3, checkImageWidth, - checkImageHeight, 0, GL_RGB, GL_UNSIGNED_BYTE, - &checkImage[0][0][0]); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); - glEnable(GL_TEXTURE_2D); - glShadeModel(GL_FLAT); -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glBegin(GL_QUADS); - glTexCoord2f(0.0, 0.0); glVertex3f(-2.0, -1.0, 0.0); - glTexCoord2f(0.0, 1.0); glVertex3f(-2.0, 1.0, 0.0); - glTexCoord2f(1.0, 1.0); glVertex3f(0.0, 1.0, 0.0); - glTexCoord2f(1.0, 0.0); glVertex3f(0.0, -1.0, 0.0); - - glTexCoord2f(0.0, 0.0); glVertex3f(1.0, -1.0, 0.0); - glTexCoord2f(0.0, 1.0); glVertex3f(1.0, 1.0, 0.0); - glTexCoord2f(1.0, 1.0); glVertex3f(2.41421, 1.0, -1.41421); - glTexCoord2f(1.0, 0.0); glVertex3f(2.41421, -1.0, -1.41421); - glEnd(); - glutSwapBuffers(); -} - -void myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(60.0, 1.0*(GLfloat)w/(GLfloat)h, 1.0, 30.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -3.6); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -int -main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); - glutCreateWindow("checker"); - myinit(); - glutReshapeFunc (myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/clip.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/clip.c deleted file mode 100644 index 90816f2e27..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/clip.c +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * clip.c - * This program demonstrates arbitrary clipping planes. - */ -#include -#include - -void init(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel (GL_FLAT); -} - -void display(void) -{ - GLdouble eqn[4] = {0.0, 1.0, 0.0, 0.0}; - GLdouble eqn2[4] = {1.0, 0.0, 0.0, 0.0}; - - glClear(GL_COLOR_BUFFER_BIT); - - glColor3f (1.0, 1.0, 1.0); - glPushMatrix(); - glTranslatef (0.0, 0.0, -5.0); - -/* clip lower half -- y < 0 */ - glClipPlane (GL_CLIP_PLANE0, eqn); - glEnable (GL_CLIP_PLANE0); -/* clip left half -- x < 0 */ - glClipPlane (GL_CLIP_PLANE1, eqn2); - glEnable (GL_CLIP_PLANE1); - - glRotatef (90.0, 1.0, 0.0, 0.0); - glutWireSphere(1.0, 20, 16); - glPopMatrix(); - - glFlush (); -} - -void reshape (int w, int h) -{ - glViewport (0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - gluPerspective(60.0, (GLfloat) w/(GLfloat) h, 1.0, 20.0); - glMatrixMode (GL_MODELVIEW); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (500, 500); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/colormat.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/colormat.c deleted file mode 100644 index 9db4491bac..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/colormat.c +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * colormat.c - * After initialization, the program will be in - * ColorMaterial mode. Interaction: pressing the - * mouse buttons will change the diffuse reflection values. - */ -#include -#include - -GLfloat diffuseMaterial[4] = { 0.5, 0.5, 0.5, 1.0 }; - -/* Initialize material property, light source, lighting model, - * and depth buffer. - */ -void init(void) -{ - GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 }; - - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel (GL_SMOOTH); - glEnable(GL_DEPTH_TEST); - glMaterialfv(GL_FRONT, GL_DIFFUSE, diffuseMaterial); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialf(GL_FRONT, GL_SHININESS, 25.0); - glLightfv(GL_LIGHT0, GL_POSITION, light_position); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - - glColorMaterial(GL_FRONT, GL_DIFFUSE); - glEnable(GL_COLOR_MATERIAL); -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glutSolidSphere(1.0, 20, 16); - glFlush (); -} - -void reshape (int w, int h) -{ - glViewport (0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode (GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho (-1.5, 1.5, -1.5*(GLfloat)h/(GLfloat)w, - 1.5*(GLfloat)h/(GLfloat)w, -10.0, 10.0); - else - glOrtho (-1.5*(GLfloat)w/(GLfloat)h, - 1.5*(GLfloat)w/(GLfloat)h, -1.5, 1.5, -10.0, 10.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -/* ARGSUSED2 */ -void mouse(int button, int state, int x, int y) -{ - switch (button) { - case GLUT_LEFT_BUTTON: - if (state == GLUT_DOWN) { - diffuseMaterial[0] += 0.1; - if (diffuseMaterial[0] > 1.0) - diffuseMaterial[0] = 0.0; - glColor4fv(diffuseMaterial); - glutPostRedisplay(); - } - break; - case GLUT_MIDDLE_BUTTON: - if (state == GLUT_DOWN) { - diffuseMaterial[1] += 0.1; - if (diffuseMaterial[1] > 1.0) - diffuseMaterial[1] = 0.0; - glColor4fv(diffuseMaterial); - glutPostRedisplay(); - } - break; - case GLUT_RIGHT_BUTTON: - if (state == GLUT_DOWN) { - diffuseMaterial[2] += 0.1; - if (diffuseMaterial[2] > 1.0) - diffuseMaterial[2] = 0.0; - glColor4fv(diffuseMaterial); - glutPostRedisplay(); - } - break; - default: - break; - } -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize (500, 500); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutMouseFunc(mouse); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/cube.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/cube.c deleted file mode 100644 index 5ecc6280f3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/cube.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * cube.c - * This program demonstrates a single modeling transformation, - * glScalef() and a single viewing transformation, gluLookAt(). - * A wireframe cube is rendered. - */ -#include -#include - -void init(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel (GL_FLAT); -} - -void display(void) -{ - glClear (GL_COLOR_BUFFER_BIT); - glColor3f (1.0, 1.0, 1.0); - glLoadIdentity (); /* clear the matrix */ - /* viewing transformation */ - gluLookAt (0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); - glScalef (1.0, 2.0, 1.0); /* modeling transformation */ - glutWireCube (1.0); - glFlush (); -} - -void reshape (int w, int h) -{ - glViewport (0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - glFrustum (-1.0, 1.0, -1.0, 1.0, 1.5, 20.0); - glMatrixMode (GL_MODELVIEW); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (500, 500); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/depthcue.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/depthcue.c deleted file mode 100644 index a3e5b743aa..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/depthcue.c +++ /dev/null @@ -1,115 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* - * depthcue.c - * This program draws a wireframe model, which uses - * intensity (brightness) to give clues to distance. - * Fog is used to achieve this effect. - */ -#include -#include - -/* Initialize linear fog for depth cueing. - */ -void myinit(void) -{ - GLfloat fogColor[4] = {0.0, 0.0, 0.0, 1.0}; - - glEnable(GL_FOG); - glFogi (GL_FOG_MODE, GL_LINEAR); - glHint (GL_FOG_HINT, GL_NICEST); /* per pixel */ - glFogf (GL_FOG_START, 3.0); - glFogf (GL_FOG_END, 5.0); - glFogfv (GL_FOG_COLOR, fogColor); - glClearColor(0.0, 0.0, 0.0, 1.0); - - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); - glShadeModel(GL_FLAT); -} - -/* display() draws an icosahedron. - */ -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glColor3f (1.0, 1.0, 1.0); - glutWireIcosahedron(); - glFlush(); -} - -void myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective (45.0, (GLfloat) w/(GLfloat) h, 3.0, 5.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity (); - glTranslatef (0.0, 0.0, -4.0); /* move object into view */ -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutCreateWindow(argv[0]); - myinit(); - glutReshapeFunc(myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/dof.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/dof.c deleted file mode 100644 index 6673dc2d54..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/dof.c +++ /dev/null @@ -1,251 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* - * dof.c - * This program demonstrates use of the accumulation buffer to - * create an out-of-focus depth-of-field effect. The teapots - * are drawn several times into the accumulation buffer. The - * viewing volume is jittered, except at the focal point, where - * the viewing volume is at the same position, each time. In - * this case, the gold teapot remains in focus. - */ -#include -#include -#include -#include "jitter.h" - -#define PI_ 3.14159265358979323846 - -/* accFrustum() - * The first 6 arguments are identical to the glFrustum() call. - * - * pixdx and pixdy are anti-alias jitter in pixels. - * Set both equal to 0.0 for no anti-alias jitter. - * eyedx and eyedy are depth-of field jitter in pixels. - * Set both equal to 0.0 for no depth of field effects. - * - * focus is distance from eye to plane in focus. - * focus must be greater than, but not equal to 0.0. - * - * Note that accFrustum() calls glTranslatef(). You will - * probably want to insure that your ModelView matrix has been - * initialized to identity before calling accFrustum(). - */ -void accFrustum(GLdouble left, GLdouble right, GLdouble bottom, - GLdouble top, GLdouble nnear, GLdouble ffar, GLdouble pixdx, - GLdouble pixdy, GLdouble eyedx, GLdouble eyedy, GLdouble focus) -{ - GLdouble xwsize, ywsize; - GLdouble dx, dy; - GLint viewport[4]; - - glGetIntegerv (GL_VIEWPORT, viewport); - - xwsize = right - left; - ywsize = top - bottom; - - dx = -(pixdx*xwsize/(GLdouble) viewport[2] + eyedx*nnear/focus); - dy = -(pixdy*ywsize/(GLdouble) viewport[3] + eyedy*nnear/focus); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum (left + dx, right + dx, bottom + dy, top + dy, nnear, ffar); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef (-eyedx, -eyedy, 0.0); -} - -/* accPerspective() - * - * The first 4 arguments are identical to the gluPerspective() call. - * pixdx and pixdy are anti-alias jitter in pixels. - * Set both equal to 0.0 for no anti-alias jitter. - * eyedx and eyedy are depth-of field jitter in pixels. - * Set both equal to 0.0 for no depth of field effects. - * - * focus is distance from eye to plane in focus. - * focus must be greater than, but not equal to 0.0. - * - * Note that accPerspective() calls accFrustum(). - */ -void accPerspective(GLdouble fovy, GLdouble aspect, - GLdouble nnear, GLdouble ffar, GLdouble pixdx, GLdouble pixdy, - GLdouble eyedx, GLdouble eyedy, GLdouble focus) -{ - GLdouble fov2,left,right,bottom,top; - - fov2 = ((fovy*PI_) / 180.0) / 2.0; - - top = nnear / (cos(fov2) / sin(fov2)); - bottom = -top; - - right = top * aspect; - left = -right; - - accFrustum (left, right, bottom, top, nnear, ffar, - pixdx, pixdy, eyedx, eyedy, focus); -} - -void myinit(void) -{ - GLfloat ambient[] = { 0.0, 0.0, 0.0, 1.0 }; - GLfloat diffuse[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat position[] = { 0.0, 3.0, 3.0, 0.0 }; - - GLfloat lmodel_ambient[] = { 0.2, 0.2, 0.2, 1.0 }; - GLfloat local_view[] = { 0.0 }; - - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_LESS); - - glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse); - glLightfv(GL_LIGHT0, GL_POSITION, position); - - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); - glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, local_view); - - glFrontFace (GL_CW); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_AUTO_NORMAL); - glEnable(GL_NORMALIZE); - - glMatrixMode (GL_MODELVIEW); - glLoadIdentity (); - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClearAccum(0.0, 0.0, 0.0, 0.0); -} - -void renderTeapot (GLfloat x, GLfloat y, GLfloat z, - GLfloat ambr, GLfloat ambg, GLfloat ambb, - GLfloat difr, GLfloat difg, GLfloat difb, - GLfloat specr, GLfloat specg, GLfloat specb, GLfloat shine) -{ - float mat[4]; - - glPushMatrix(); - glTranslatef (x, y, z); - mat[0] = ambr; mat[1] = ambg; mat[2] = ambb; mat[3] = 1.0; - glMaterialfv (GL_FRONT, GL_AMBIENT, mat); - mat[0] = difr; mat[1] = difg; mat[2] = difb; - glMaterialfv (GL_FRONT, GL_DIFFUSE, mat); - mat[0] = specr; mat[1] = specg; mat[2] = specb; - glMaterialfv (GL_FRONT, GL_SPECULAR, mat); - glMaterialf (GL_FRONT, GL_SHININESS, shine*128.0); - glutSolidTeapot(0.5); - glPopMatrix(); -} - -/* display() draws 5 teapots into the accumulation buffer - * several times; each time with a jittered perspective. - * The focal point is at z = 5.0, so the gold teapot will - * stay in focus. The amount of jitter is adjusted by the - * magnitude of the accPerspective() jitter; in this example, 0.33. - * In this example, the teapots are drawn 8 times. See jitter.h - */ -void display(void) -{ - int jitter; - GLint viewport[4]; - - glGetIntegerv (GL_VIEWPORT, viewport); - glClear(GL_ACCUM_BUFFER_BIT); - - for (jitter = 0; jitter < 8; jitter++) { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - accPerspective (45.0, - (GLdouble) viewport[2]/(GLdouble) viewport[3], - 1.0, 15.0, 0.0, 0.0, - 0.33*j8[jitter].x, 0.33*j8[jitter].y, 5.0); -/* ruby, gold, silver, emerald, and cyan teapots */ - renderTeapot (-1.1, -0.5, -4.5, 0.1745, 0.01175, 0.01175, - 0.61424, 0.04136, 0.04136, 0.727811, 0.626959, 0.626959, 0.6); - renderTeapot (-0.5, -0.5, -5.0, 0.24725, 0.1995, 0.0745, - 0.75164, 0.60648, 0.22648, 0.628281, 0.555802, 0.366065, 0.4); - renderTeapot (0.2, -0.5, -5.5, 0.19225, 0.19225, 0.19225, - 0.50754, 0.50754, 0.50754, 0.508273, 0.508273, 0.508273, 0.4); - renderTeapot (1.0, -0.5, -6.0, 0.0215, 0.1745, 0.0215, - 0.07568, 0.61424, 0.07568, 0.633, 0.727811, 0.633, 0.6); - renderTeapot (1.8, -0.5, -6.5, 0.0, 0.1, 0.06, 0.0, 0.50980392, - 0.50980392, 0.50196078, 0.50196078, 0.50196078, .25); - glAccum (GL_ACCUM, 0.125); - } - - glAccum (GL_RETURN, 1.0); - glFlush(); -} - -void myReshape(int w, int h) -{ - glViewport(0, 0, w, h); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, depth buffer, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB - | GLUT_ACCUM | GLUT_DEPTH); - glutCreateWindow (argv[0]); - myinit(); - glutReshapeFunc(myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/double.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/double.c deleted file mode 100644 index 3153c70cc1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/double.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * double.c - * This is a simple double buffered program. - * Pressing the left mouse button rotates the rectangle. - * Pressing the middle mouse button stops the rotation. - */ -#include -#include - -static GLfloat spin = 0.0; -static GLdouble t0 = 0.; - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT); - glPushMatrix(); - glRotatef(spin, 0.0, 0.0, 1.0); - glColor3f(1.0, 1.0, 1.0); - glRectf(-25.0, -25.0, 25.0, 25.0); - glPopMatrix(); - - glutSwapBuffers(); -} - -GLdouble gettime(void) -{ - return (GLdouble)(glutGet(GLUT_ELAPSED_TIME)) / 1000.; -} - -void spinDisplay(void) -{ - GLdouble t, dt; - t = gettime(); - dt = t - t0; - t0 = t; - spin = spin + 120.0*dt; - if (spin > 360.0) - spin = spin - 360.0; - glutPostRedisplay(); -} - -void init(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel (GL_FLAT); -} - -void reshape(int w, int h) -{ - glViewport (0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-50.0, 50.0, -50.0, 50.0, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -/* ARGSUSED2 */ -void mouse(int button, int state, int x, int y) -{ - switch (button) { - case GLUT_LEFT_BUTTON: - if (state == GLUT_DOWN) - { - t0 = gettime(); - glutIdleFunc(spinDisplay); - } - break; - case GLUT_MIDDLE_BUTTON: - if (state == GLUT_DOWN) - glutIdleFunc(NULL); - break; - default: - break; - } -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* - * Request double buffer display mode. - * Register mouse input callback functions - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB); - glutInitWindowSize (250, 250); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutMouseFunc(mouse); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/drawf.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/drawf.c deleted file mode 100644 index 5bcccb6aea..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/drawf.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * drawf.c - * Draws the bitmapped letter F on the screen (several times). - * This demonstrates use of the glBitmap() call. - */ -#include -#include - -GLubyte rasters[24] = { - 0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, - 0xff, 0x00, 0xff, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, - 0xff, 0xc0, 0xff, 0xc0}; - -void init(void) -{ - glPixelStorei (GL_UNPACK_ALIGNMENT, 1); - glClearColor (0.0, 0.0, 0.0, 0.0); -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT); - glColor3f (1.0, 1.0, 1.0); - glRasterPos2i (20, 20); - glBitmap (10, 12, 0.0, 0.0, 11.0, 0.0, rasters); - glBitmap (10, 12, 0.0, 0.0, 11.0, 0.0, rasters); - glBitmap (10, 12, 0.0, 0.0, 11.0, 0.0, rasters); - glFlush(); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho (0, w, 0, h, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - } -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize(100, 100); - glutInitWindowPosition(100, 100); - glutCreateWindow(argv[0]); - init(); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutDisplayFunc(display); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/feedback.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/feedback.c deleted file mode 100644 index cc685d55d3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/feedback.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * feedback.c - * This program demonstrates use of OpenGL feedback. First, - * a lighting environment is set up and a few lines are drawn. - * Then feedback mode is entered, and the same lines are - * drawn. The results in the feedback buffer are printed. - */ -#include -#include -#include - -/* Initialize lighting. - */ -void init(void) -{ - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); -} - -/* Draw a few lines and two points, one of which will - * be clipped. If in feedback mode, a passthrough token - * is issued between the each primitive. - */ -void drawGeometry (GLenum mode) -{ - glBegin (GL_LINE_STRIP); - glNormal3f (0.0, 0.0, 1.0); - glVertex3f (30.0, 30.0, 0.0); - glVertex3f (50.0, 60.0, 0.0); - glVertex3f (70.0, 40.0, 0.0); - glEnd (); - if (mode == GL_FEEDBACK) - glPassThrough (1.0); - glBegin (GL_POINTS); - glVertex3f (-100.0, -100.0, -100.0); /* will be clipped */ - glEnd (); - if (mode == GL_FEEDBACK) - glPassThrough (2.0); - glBegin (GL_POINTS); - glNormal3f (0.0, 0.0, 1.0); - glVertex3f (50.0, 50.0, 0.0); - glEnd (); -} - -/* Write contents of one vertex to stdout. */ -void print3DcolorVertex (GLint size, GLint *count, - GLfloat *buffer) -{ - int i; - - printf (" "); - for (i = 0; i < 7; i++) { - printf ("%4.2f ", buffer[size-(*count)]); - *count = *count - 1; - } - printf ("\n"); -} - -/* Write contents of entire buffer. (Parse tokens!) */ -void printBuffer(GLint size, GLfloat *buffer) -{ - GLint count; - GLfloat token; - - count = size; - while (count) { - token = buffer[size-count]; count--; - if (token == GL_PASS_THROUGH_TOKEN) { - printf ("GL_PASS_THROUGH_TOKEN\n"); - printf (" %4.2f\n", buffer[size-count]); - count--; - } - else if (token == GL_POINT_TOKEN) { - printf ("GL_POINT_TOKEN\n"); - print3DcolorVertex (size, &count, buffer); - } - else if (token == GL_LINE_TOKEN) { - printf ("GL_LINE_TOKEN\n"); - print3DcolorVertex (size, &count, buffer); - print3DcolorVertex (size, &count, buffer); - } - else if (token == GL_LINE_RESET_TOKEN) { - printf ("GL_LINE_RESET_TOKEN\n"); - print3DcolorVertex (size, &count, buffer); - print3DcolorVertex (size, &count, buffer); - } - } -} - -void display(void) -{ - GLfloat feedBuffer[1024]; - GLint size; - - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - glOrtho (0.0, 100.0, 0.0, 100.0, 0.0, 1.0); - - glClearColor (0.0, 0.0, 0.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT); - drawGeometry (GL_RENDER); - - glFeedbackBuffer (1024, GL_3D_COLOR, feedBuffer); - (void) glRenderMode (GL_FEEDBACK); - drawGeometry (GL_FEEDBACK); - - size = glRenderMode (GL_RENDER); - printBuffer (size, feedBuffer); - - glFinish(); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -/* Main Loop */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (100, 100); - glutInitWindowPosition (100, 100); - glutCreateWindow(argv[0]); - init(); - glutDisplayFunc(display); - glutKeyboardFunc (keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/fog.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/fog.c deleted file mode 100644 index 14c7700ecc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/fog.c +++ /dev/null @@ -1,200 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/** - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* - * fog.c - * This program draws 5 red teapots, each at a different - * z distance from the eye, in different types of fog. - * Pressing the left mouse button chooses between 3 types of - * fog: exponential, exponential squared, and linear. - * In this program, there is a fixed density value, as well - * as fixed start and end values for the linear fog. - */ -#include -#include -#include - -GLint fogMode; - -void -selectFog(int mode) -{ - switch(mode) { - case GL_LINEAR: - glFogf(GL_FOG_START, 1.0); - glFogf(GL_FOG_END, 5.0); - /* falls through */ - case GL_EXP2: - case GL_EXP: - glFogi(GL_FOG_MODE, mode); - glutPostRedisplay(); - break; - case 0: - exit(0); - } -} - -/* Initialize z-buffer, projection matrix, light source, - * and lighting model. Do not specify a material property here. - */ -void -myinit(void) -{ - GLfloat position[] = - {0.0, 3.0, 3.0, 0.0}; - GLfloat local_view[] = - {0.0}; - - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_LESS); - - glLightfv(GL_LIGHT0, GL_POSITION, position); - glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, local_view); - - glFrontFace(GL_CW); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_AUTO_NORMAL); - glEnable(GL_NORMALIZE); - glEnable(GL_FOG); - { - GLfloat fogColor[4] = - {0.5, 0.5, 0.5, 1.0}; - - fogMode = GL_EXP; - glFogi(GL_FOG_MODE, fogMode); - glFogfv(GL_FOG_COLOR, fogColor); - glFogf(GL_FOG_DENSITY, 0.35); - glHint(GL_FOG_HINT, GL_DONT_CARE); - glClearColor(0.5, 0.5, 0.5, 1.0); - } -} - -void -renderRedTeapot(GLfloat x, GLfloat y, GLfloat z) -{ - float mat[4]; - - glPushMatrix(); - glTranslatef(x, y, z); - mat[0] = 0.1745; - mat[1] = 0.01175; - mat[2] = 0.01175; - mat[3] = 1.0; - glMaterialfv(GL_FRONT, GL_AMBIENT, mat); - mat[0] = 0.61424; - mat[1] = 0.04136; - mat[2] = 0.04136; - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat); - mat[0] = 0.727811; - mat[1] = 0.626959; - mat[2] = 0.626959; - glMaterialfv(GL_FRONT, GL_SPECULAR, mat); - glMaterialf(GL_FRONT, GL_SHININESS, 0.6 * 128.0); - glutSolidTeapot(1.0); - glPopMatrix(); -} - -/* display() draws 5 teapots at different z positions. - */ -void -display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - renderRedTeapot(-4.0, -0.5, -1.0); - renderRedTeapot(-2.0, -0.5, -2.0); - renderRedTeapot(0.0, -0.5, -3.0); - renderRedTeapot(2.0, -0.5, -4.0); - renderRedTeapot(4.0, -0.5, -5.0); - glFlush(); -} - -void -myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= (h * 3)) - glOrtho(-6.0, 6.0, -2.0 * ((GLfloat) h * 3) / (GLfloat) w, - 2.0 * ((GLfloat) h * 3) / (GLfloat) w, 0.0, 10.0); - else - glOrtho(-6.0 * (GLfloat) w / ((GLfloat) h * 3), - 6.0 * (GLfloat) w / ((GLfloat) h * 3), -2.0, 2.0, 0.0, 10.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, depth buffer, and handle input events. - */ -int -main(int argc, char **argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize(450, 150); - glutCreateWindow(argv[0]); - myinit(); - glutReshapeFunc(myReshape); - glutDisplayFunc(display); - glutCreateMenu(selectFog); - glutAddMenuEntry("Fog EXP", GL_EXP); - glutAddMenuEntry("Fog EXP2", GL_EXP2); - glutAddMenuEntry("Fog LINEAR", GL_LINEAR); - glutAddMenuEntry("Quit", 0); - glutAttachMenu(GLUT_RIGHT_BUTTON); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/fogindex.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/fogindex.c deleted file mode 100644 index b8bb691e28..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/fogindex.c +++ /dev/null @@ -1,152 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* - * fogindex.c - * This program demonstrates fog in color index mode. - * Three cones are drawn at different z values in a linear - * fog. 32 contiguous colors (from 16 to 47) are loaded - * with a color ramp. - */ -#include -#include - -/* Initialize color map and fog. Set screen clear color - * to end of color ramp. - */ -#define NUM_COLORS 32 -#define RAMPSTART 16 - -void -myinit(void) -{ - int i; - - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_LESS); - for (i = 0; i < NUM_COLORS; i++) { - GLfloat shade; - shade = (GLfloat) (NUM_COLORS - i) / (GLfloat) NUM_COLORS; - glutSetColor(16 + i, shade, shade, shade); - } - glEnable(GL_FOG); - - glFogi(GL_FOG_MODE, GL_LINEAR); - glFogi(GL_FOG_INDEX, NUM_COLORS); - glFogf(GL_FOG_START, 0.0); - glFogf(GL_FOG_END, 4.0); - glHint(GL_FOG_HINT, GL_NICEST); - glClearIndex((GLfloat) (NUM_COLORS + RAMPSTART - 1)); -} - -/* display() renders 3 cones at different z positions. - */ -void -display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glPushMatrix(); - glTranslatef(-1.0, -1.0, -1.0); - glRotatef(-90.0, 1.0, 0.0, 0.0); - glIndexi(RAMPSTART); - glutSolidCone(1.0, 2.0, 10, 10); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(0.0, -1.0, -2.25); - glRotatef(-90.0, 1.0, 0.0, 0.0); - glIndexi(RAMPSTART); - glutSolidCone(1.0, 2.0, 10, 10); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(1.0, -1.0, -3.5); - glRotatef(-90.0, 1.0, 0.0, 0.0); - glIndexi(RAMPSTART); - glutSolidCone(1.0, 2.0, 10, 10); - glPopMatrix(); - glFlush(); -} - -void -myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho(-2.0, 2.0, -2.0 * (GLfloat) h / (GLfloat) w, - 2.0 * (GLfloat) h / (GLfloat) w, 0.0, 10.0); - else - glOrtho(-2.0 * (GLfloat) w / (GLfloat) h, - 2.0 * (GLfloat) w / (GLfloat) h, -2.0, 2.0, 0.0, 10.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, depth buffer, and handle input events. - */ -int -main(int argc, char **argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_INDEX | GLUT_DEPTH); - glutCreateWindow(argv[0]); - myinit(); - glutReshapeFunc(myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/font.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/font.c deleted file mode 100644 index 2d92e9b600..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/font.c +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * font.c - * - * Draws some text in a bitmapped font. Uses glBitmap() - * and other pixel routines. Also demonstrates use of - * display lists. - */ -#include -#include -#include - -GLubyte space[] = -{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - -GLubyte letters[][13] = { -{0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0xc3, 0xc3, 0xc3, 0x66, 0x3c, 0x18}, -{0x00, 0x00, 0xfe, 0xc7, 0xc3, 0xc3, 0xc7, 0xfe, 0xc7, 0xc3, 0xc3, 0xc7, 0xfe}, -{0x00, 0x00, 0x7e, 0xe7, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe7, 0x7e}, -{0x00, 0x00, 0xfc, 0xce, 0xc7, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc7, 0xce, 0xfc}, -{0x00, 0x00, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc0, 0xc0, 0xc0, 0xc0, 0xff}, -{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc0, 0xc0, 0xc0, 0xff}, -{0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xcf, 0xc0, 0xc0, 0xc0, 0xc0, 0xe7, 0x7e}, -{0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3}, -{0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e}, -{0x00, 0x00, 0x7c, 0xee, 0xc6, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06}, -{0x00, 0x00, 0xc3, 0xc6, 0xcc, 0xd8, 0xf0, 0xe0, 0xf0, 0xd8, 0xcc, 0xc6, 0xc3}, -{0x00, 0x00, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0}, -{0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xdb, 0xff, 0xff, 0xe7, 0xc3}, -{0x00, 0x00, 0xc7, 0xc7, 0xcf, 0xcf, 0xdf, 0xdb, 0xfb, 0xf3, 0xf3, 0xe3, 0xe3}, -{0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xe7, 0x7e}, -{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc7, 0xc3, 0xc3, 0xc7, 0xfe}, -{0x00, 0x00, 0x3f, 0x6e, 0xdf, 0xdb, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0x66, 0x3c}, -{0x00, 0x00, 0xc3, 0xc6, 0xcc, 0xd8, 0xf0, 0xfe, 0xc7, 0xc3, 0xc3, 0xc7, 0xfe}, -{0x00, 0x00, 0x7e, 0xe7, 0x03, 0x03, 0x07, 0x7e, 0xe0, 0xc0, 0xc0, 0xe7, 0x7e}, -{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff}, -{0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3}, -{0x00, 0x00, 0x18, 0x3c, 0x3c, 0x66, 0x66, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3}, -{0x00, 0x00, 0xc3, 0xe7, 0xff, 0xff, 0xdb, 0xdb, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3}, -{0x00, 0x00, 0xc3, 0x66, 0x66, 0x3c, 0x3c, 0x18, 0x3c, 0x3c, 0x66, 0x66, 0xc3}, -{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x3c, 0x66, 0x66, 0xc3}, -{0x00, 0x00, 0xff, 0xc0, 0xc0, 0x60, 0x30, 0x7e, 0x0c, 0x06, 0x03, 0x03, 0xff} -}; - -GLuint fontOffset; - -void makeRasterFont(void) -{ - GLuint i, j; - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - fontOffset = glGenLists (128); - for (i = 0,j = 'A'; i < 26; i++,j++) { - glNewList(fontOffset + j, GL_COMPILE); - glBitmap(8, 13, 0.0, 2.0, 10.0, 0.0, letters[i]); - glEndList(); - } - glNewList(fontOffset + ' ', GL_COMPILE); - glBitmap(8, 13, 0.0, 2.0, 10.0, 0.0, space); - glEndList(); -} - -void init(void) -{ - glShadeModel (GL_FLAT); - makeRasterFont(); -} - -void printString(char *s) -{ - glPushAttrib (GL_LIST_BIT); - glListBase(fontOffset); - glCallLists((GLsizei) strlen(s), GL_UNSIGNED_BYTE, (GLubyte *) s); - glPopAttrib (); -} - -/* Everything above this line could be in a library - * that defines a font. To make it work, you've got - * to call makeRasterFont() before you start making - * calls to printString(). - */ -void display(void) -{ - GLfloat white[3] = { 1.0, 1.0, 1.0 }; - - glClear(GL_COLOR_BUFFER_BIT); - glColor3fv(white); - - glRasterPos2i(20, 60); - printString("THE QUICK BROWN FOX JUMPS"); - glRasterPos2i(20, 40); - printString("OVER A LAZY DOG"); - glFlush (); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho (0.0, w, 0.0, h, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - } -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize(300, 100); - glutInitWindowPosition (100, 100); - glutCreateWindow(argv[0]); - init(); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutDisplayFunc(display); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/hello.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/hello.c deleted file mode 100644 index fb3dae1325..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/hello.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * hello.c - * This is a simple, introductory OpenGL program. - */ -#include -#include - -void display(void) -{ -/* clear all pixels */ - glClear (GL_COLOR_BUFFER_BIT); - -/* draw white polygon (rectangle) with corners at - * (0.25, 0.25, 0.0) and (0.75, 0.75, 0.0) - */ - glColor3f (1.0, 1.0, 1.0); - glBegin(GL_POLYGON); - glVertex3f (0.25, 0.25, 0.0); - glVertex3f (0.75, 0.25, 0.0); - glVertex3f (0.75, 0.75, 0.0); - glVertex3f (0.25, 0.75, 0.0); - glEnd(); - -/* don't wait! - * start processing buffered OpenGL routines - */ - glFlush (); -} - -void init (void) -{ -/* select clearing color */ - glClearColor (0.0, 0.0, 0.0, 0.0); - -/* initialize viewing values */ - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* - * Declare initial window size, position, and display mode - * (single buffer and RGBA). Open window with "hello" - * in its title bar. Call initialization routines. - * Register callback function to display graphics. - * Enter main loop and process events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (250, 250); - glutInitWindowPosition (100, 100); - glutCreateWindow ("hello"); - init (); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/image.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/image.c deleted file mode 100644 index dc1a7246eb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/image.c +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* image.c - * This program demonstrates drawing pixels and shows the effect - * of glDrawPixels(), glCopyPixels(), and glPixelZoom(). - * Interaction: moving the mouse while pressing the mouse button - * will copy the image in the lower-left corner of the window - * to the mouse position, using the current pixel zoom factors. - * There is no attempt to prevent you from drawing over the original - * image. If you press the 'r' key, the original image and zoom - * factors are reset. If you press the 'z' or 'Z' keys, you change - * the zoom factors. - */ -#include -#include -#include - -/* Create checkerboard image */ -#define checkImageWidth 64 -#define checkImageHeight 64 -GLubyte checkImage[checkImageHeight][checkImageWidth][3]; - -static GLdouble zoomFactor = 1.0; -static GLint height; - -void makeCheckImage(void) -{ - int i, j, c; - - for (i = 0; i < checkImageHeight; i++) { - for (j = 0; j < checkImageWidth; j++) { - c = (((i&0x8)==0)^((j&0x8)==0))*255; - checkImage[i][j][0] = (GLubyte) c; - checkImage[i][j][1] = (GLubyte) c; - checkImage[i][j][2] = (GLubyte) c; - } - } -} - -void init(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel(GL_FLAT); - makeCheckImage(); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT); - glRasterPos2i(0, 0); - glDrawPixels(checkImageWidth, checkImageHeight, GL_RGB, - GL_UNSIGNED_BYTE, checkImage); - glFlush(); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - height = (GLint) h; - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(0.0, (GLdouble) w, 0.0, (GLdouble) h); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -void motion(int x, int y) -{ - static GLint screeny; - - screeny = height - (GLint) y; - glRasterPos2i (x, screeny); - glPixelZoom (zoomFactor, zoomFactor); - glCopyPixels (0, 0, checkImageWidth, checkImageHeight, GL_COLOR); - glPixelZoom (1.0, 1.0); - glFlush (); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 'r': - case 'R': - zoomFactor = 1.0; - glutPostRedisplay(); - printf ("zoomFactor reset to 1.0\n"); - break; - case 'z': - zoomFactor += 0.5; - if (zoomFactor >= 3.0) - zoomFactor = 3.0; - printf ("zoomFactor is now %4.1f\n", zoomFactor); - break; - case 'Z': - zoomFactor -= 0.5; - if (zoomFactor <= 0.5) - zoomFactor = 0.5; - printf ("zoomFactor is now %4.1f\n", zoomFactor); - break; - case 27: - exit(0); - break; - default: - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize(250, 250); - glutInitWindowPosition(100, 100); - glutCreateWindow(argv[0]); - init(); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutMotionFunc(motion); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/jitter.h b/nx-X11/extras/Mesa_6.4.2/progs/redbook/jitter.h deleted file mode 100644 index 1ec08c87fd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/jitter.h +++ /dev/null @@ -1,222 +0,0 @@ -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* -jitter.h - -This file contains jitter point arrays for 2,3,4,8,15,24 and 66 jitters. - -The arrays are named j2, j3, etc. Each element in the array has the form, -for example, j8[0].x and j8[0].y - -Values are floating point in the range -.5 < x < .5, -.5 < y < .5, and -have a gaussian distribution around the origin. - -Use these to do model jittering for scene anti-aliasing and view volume -jittering for depth of field effects. Use in conjunction with the -accwindow() routine. -*/ - -typedef struct -{ - GLfloat x, y; -} jitter_point; - -#define MAX_SAMPLES 66 - - -/* 2 jitter points */ -jitter_point j2[] = -{ - { 0.246490, 0.249999}, - {-0.246490, -0.249999} -}; - - -/* 3 jitter points */ -jitter_point j3[] = -{ - {-0.373411, -0.250550}, - { 0.256263, 0.368119}, - { 0.117148, -0.117570} -}; - - -/* 4 jitter points */ -jitter_point j4[] = -{ - {-0.208147, 0.353730}, - { 0.203849, -0.353780}, - {-0.292626, -0.149945}, - { 0.296924, 0.149994} -}; - - -/* 8 jitter points */ -jitter_point j8[] = -{ - {-0.334818, 0.435331}, - { 0.286438, -0.393495}, - { 0.459462, 0.141540}, - {-0.414498, -0.192829}, - {-0.183790, 0.082102}, - {-0.079263, -0.317383}, - { 0.102254, 0.299133}, - { 0.164216, -0.054399} -}; - - -/* 15 jitter points */ -jitter_point j15[] = -{ - { 0.285561, 0.188437}, - { 0.360176, -0.065688}, - {-0.111751, 0.275019}, - {-0.055918, -0.215197}, - {-0.080231, -0.470965}, - { 0.138721, 0.409168}, - { 0.384120, 0.458500}, - {-0.454968, 0.134088}, - { 0.179271, -0.331196}, - {-0.307049, -0.364927}, - { 0.105354, -0.010099}, - {-0.154180, 0.021794}, - {-0.370135, -0.116425}, - { 0.451636, -0.300013}, - {-0.370610, 0.387504} -}; - - -/* 24 jitter points */ -jitter_point j24[] = -{ - { 0.030245, 0.136384}, - { 0.018865, -0.348867}, - {-0.350114, -0.472309}, - { 0.222181, 0.149524}, - {-0.393670, -0.266873}, - { 0.404568, 0.230436}, - { 0.098381, 0.465337}, - { 0.462671, 0.442116}, - { 0.400373, -0.212720}, - {-0.409988, 0.263345}, - {-0.115878, -0.001981}, - { 0.348425, -0.009237}, - {-0.464016, 0.066467}, - {-0.138674, -0.468006}, - { 0.144932, -0.022780}, - {-0.250195, 0.150161}, - {-0.181400, -0.264219}, - { 0.196097, -0.234139}, - {-0.311082, -0.078815}, - { 0.268379, 0.366778}, - {-0.040601, 0.327109}, - {-0.234392, 0.354659}, - {-0.003102, -0.154402}, - { 0.297997, -0.417965} -}; - - -/* 66 jitter points */ -jitter_point j66[] = -{ - { 0.266377, -0.218171}, - {-0.170919, -0.429368}, - { 0.047356, -0.387135}, - {-0.430063, 0.363413}, - {-0.221638, -0.313768}, - { 0.124758, -0.197109}, - {-0.400021, 0.482195}, - { 0.247882, 0.152010}, - {-0.286709, -0.470214}, - {-0.426790, 0.004977}, - {-0.361249, -0.104549}, - {-0.040643, 0.123453}, - {-0.189296, 0.438963}, - {-0.453521, -0.299889}, - { 0.408216, -0.457699}, - { 0.328973, -0.101914}, - {-0.055540, -0.477952}, - { 0.194421, 0.453510}, - { 0.404051, 0.224974}, - { 0.310136, 0.419700}, - {-0.021743, 0.403898}, - {-0.466210, 0.248839}, - { 0.341369, 0.081490}, - { 0.124156, -0.016859}, - {-0.461321, -0.176661}, - { 0.013210, 0.234401}, - { 0.174258, -0.311854}, - { 0.294061, 0.263364}, - {-0.114836, 0.328189}, - { 0.041206, -0.106205}, - { 0.079227, 0.345021}, - {-0.109319, -0.242380}, - { 0.425005, -0.332397}, - { 0.009146, 0.015098}, - {-0.339084, -0.355707}, - {-0.224596, -0.189548}, - { 0.083475, 0.117028}, - { 0.295962, -0.334699}, - { 0.452998, 0.025397}, - { 0.206511, -0.104668}, - { 0.447544, -0.096004}, - {-0.108006, -0.002471}, - {-0.380810, 0.130036}, - {-0.242440, 0.186934}, - {-0.200363, 0.070863}, - {-0.344844, -0.230814}, - { 0.408660, 0.345826}, - {-0.233016, 0.305203}, - { 0.158475, -0.430762}, - { 0.486972, 0.139163}, - {-0.301610, 0.009319}, - { 0.282245, -0.458671}, - { 0.482046, 0.443890}, - {-0.121527, 0.210223}, - {-0.477606, -0.424878}, - {-0.083941, -0.121440}, - {-0.345773, 0.253779}, - { 0.234646, 0.034549}, - { 0.394102, -0.210901}, - {-0.312571, 0.397656}, - { 0.200906, 0.333293}, - { 0.018703, -0.261792}, - {-0.209349, -0.065383}, - { 0.076248, 0.478538}, - {-0.073036, -0.355064}, - { 0.145087, 0.221726} -}; diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/light.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/light.c deleted file mode 100644 index 0eed85e10c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/light.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * light.c - * This program demonstrates the use of the OpenGL lighting - * model. A sphere is drawn using a grey material characteristic. - * A single light source illuminates the object. - */ -#include -#include - -/* Initialize material property, light source, lighting model, - * and depth buffer. - */ -void init(void) -{ - GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat mat_shininess[] = { 50.0 }; - GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 }; - - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel (GL_SMOOTH); - - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); - glLightfv(GL_LIGHT0, GL_POSITION, light_position); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); -} - -void display(void) -{ - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glutSolidSphere (1.0, 20, 16); - glFlush (); -} - -void reshape (int w, int h) -{ - glViewport (0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode (GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho (-1.5, 1.5, -1.5*(GLfloat)h/(GLfloat)w, - 1.5*(GLfloat)h/(GLfloat)w, -10.0, 10.0); - else - glOrtho (-1.5*(GLfloat)w/(GLfloat)h, - 1.5*(GLfloat)w/(GLfloat)h, -1.5, 1.5, -10.0, 10.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize (500, 500); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/lines.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/lines.c deleted file mode 100644 index b34d4c418c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/lines.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * lines.c - * This program demonstrates geometric primitives and - * their attributes. - */ -#include -#include - -#define drawOneLine(x1,y1,x2,y2) glBegin(GL_LINES); \ - glVertex2f ((x1),(y1)); glVertex2f ((x2),(y2)); glEnd(); - -void init(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel (GL_FLAT); -} - -void display(void) -{ - int i; - - glClear (GL_COLOR_BUFFER_BIT); - -/* select white for all lines */ - glColor3f (1.0, 1.0, 1.0); - -/* in 1st row, 3 lines, each with a different stipple */ - glEnable (GL_LINE_STIPPLE); - - glLineStipple (1, 0x0101); /* dotted */ - drawOneLine (50.0, 125.0, 150.0, 125.0); - glLineStipple (1, 0x00FF); /* dashed */ - drawOneLine (150.0, 125.0, 250.0, 125.0); - glLineStipple (1, 0x1C47); /* dash/dot/dash */ - drawOneLine (250.0, 125.0, 350.0, 125.0); - -/* in 2nd row, 3 wide lines, each with different stipple */ - glLineWidth (5.0); - glLineStipple (1, 0x0101); /* dotted */ - drawOneLine (50.0, 100.0, 150.0, 100.0); - glLineStipple (1, 0x00FF); /* dashed */ - drawOneLine (150.0, 100.0, 250.0, 100.0); - glLineStipple (1, 0x1C47); /* dash/dot/dash */ - drawOneLine (250.0, 100.0, 350.0, 100.0); - glLineWidth (1.0); - -/* in 3rd row, 6 lines, with dash/dot/dash stipple */ -/* as part of a single connected line strip */ - glLineStipple (1, 0x1C47); /* dash/dot/dash */ - glBegin (GL_LINE_STRIP); - for (i = 0; i < 7; i++) - glVertex2f (50.0 + ((GLfloat) i * 50.0), 75.0); - glEnd (); - -/* in 4th row, 6 independent lines with same stipple */ - for (i = 0; i < 6; i++) { - drawOneLine (50.0 + ((GLfloat) i * 50.0), 50.0, - 50.0 + ((GLfloat)(i+1) * 50.0), 50.0); - } - -/* in 5th row, 1 line, with dash/dot/dash stipple */ -/* and a stipple repeat factor of 5 */ - glLineStipple (5, 0x1C47); /* dash/dot/dash */ - drawOneLine (50.0, 25.0, 350.0, 25.0); - - glDisable (GL_LINE_STIPPLE); - glFlush (); -} - -void reshape (int w, int h) -{ - glViewport (0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - gluOrtho2D (0.0, (GLdouble) w, 0.0, (GLdouble) h); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (400, 150); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/list.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/list.c deleted file mode 100644 index 3b4f44bd6d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/list.c +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * list.c - * This program demonstrates how to make and execute a - * display list. Note that attributes, such as current - * color and matrix, are changed. - */ -#include -#include - -GLuint listName; - -static void init (void) -{ - listName = glGenLists (1); - glNewList (listName, GL_COMPILE); - glColor3f (1.0, 0.0, 0.0); /* current color red */ - glBegin (GL_TRIANGLES); - glVertex2f (0.0, 0.0); - glVertex2f (1.0, 0.0); - glVertex2f (0.0, 1.0); - glEnd (); - glTranslatef (1.5, 0.0, 0.0); /* move position */ - glEndList (); - glShadeModel (GL_FLAT); -} - -static void drawLine (void) -{ - glBegin (GL_LINES); - glVertex2f (0.0, 0.5); - glVertex2f (15.0, 0.5); - glEnd (); -} - -void display(void) -{ - GLuint i; - - glClear (GL_COLOR_BUFFER_BIT); - glColor3f (0.0, 1.0, 0.0); /* current color green */ - for (i = 0; i < 10; i++) /* draw 10 triangles */ - glCallList (listName); - drawLine (); /* is this line green? NO! */ - /* where is the line drawn? */ - glFlush (); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - gluOrtho2D (0.0, 2.0, -0.5 * (GLfloat) h/(GLfloat) w, - 1.5 * (GLfloat) h/(GLfloat) w); - else - gluOrtho2D (0.0, 2.0 * (GLfloat) w/(GLfloat) h, -0.5, 1.5); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize(650, 50); - glutCreateWindow(argv[0]); - init (); - glutReshapeFunc (reshape); - glutDisplayFunc (display); - glutKeyboardFunc (keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/material.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/material.c deleted file mode 100644 index f9a4fc5928..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/material.c +++ /dev/null @@ -1,306 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* - * material.c - * This program demonstrates the use of the GL lighting model. - * Several objects are drawn using different material characteristics. - * A single light source illuminates the objects. - */ -#include -#include - -/* Initialize z-buffer, projection matrix, light source, - * and lighting model. Do not specify a material property here. - */ -void myinit(void) -{ - GLfloat ambient[] = { 0.0, 0.0, 0.0, 1.0 }; - GLfloat diffuse[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat position[] = { 0.0, 3.0, 2.0, 0.0 }; - GLfloat lmodel_ambient[] = { 0.4, 0.4, 0.4, 1.0 }; - GLfloat local_view[] = { 0.0 }; - - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_LESS); - - glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse); - glLightfv(GL_LIGHT0, GL_POSITION, position); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); - glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, local_view); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - - glClearColor(0.0, 0.1, 0.1, 0.0); -} - -/* Draw twelve spheres in 3 rows with 4 columns. - * The spheres in the first row have materials with no ambient reflection. - * The second row has materials with significant ambient reflection. - * The third row has materials with colored ambient reflection. - * - * The first column has materials with blue, diffuse reflection only. - * The second column has blue diffuse reflection, as well as specular - * reflection with a low shininess exponent. - * The third column has blue diffuse reflection, as well as specular - * reflection with a high shininess exponent (a more concentrated highlight). - * The fourth column has materials which also include an emissive component. - * - * glTranslatef() is used to move spheres to their appropriate locations. - */ - -void display(void) -{ - GLfloat no_mat[] = { 0.0, 0.0, 0.0, 1.0 }; - GLfloat mat_ambient[] = { 0.7, 0.7, 0.7, 1.0 }; - GLfloat mat_ambient_color[] = { 0.8, 0.8, 0.2, 1.0 }; - GLfloat mat_diffuse[] = { 0.1, 0.5, 0.8, 1.0 }; - GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat no_shininess[] = { 0.0 }; - GLfloat low_shininess[] = { 5.0 }; - GLfloat high_shininess[] = { 100.0 }; - GLfloat mat_emission[] = {0.3, 0.2, 0.2, 0.0}; - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - -/* draw sphere in first row, first column - * diffuse reflection only; no ambient or specular - */ - glPushMatrix(); - glTranslatef (-3.75, 3.0, 0.0); - glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, no_mat); - glMaterialfv(GL_FRONT, GL_SHININESS, no_shininess); - glMaterialfv(GL_FRONT, GL_EMISSION, no_mat); - glutSolidSphere(1.0, 16, 16); - glPopMatrix(); - -/* draw sphere in first row, second column - * diffuse and specular reflection; low shininess; no ambient - */ - glPushMatrix(); - glTranslatef (-1.25, 3.0, 0.0); - glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, low_shininess); - glMaterialfv(GL_FRONT, GL_EMISSION, no_mat); - glutSolidSphere(1.0, 16, 16); - glPopMatrix(); - -/* draw sphere in first row, third column - * diffuse and specular reflection; high shininess; no ambient - */ - glPushMatrix(); - glTranslatef (1.25, 3.0, 0.0); - glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, high_shininess); - glMaterialfv(GL_FRONT, GL_EMISSION, no_mat); - glutSolidSphere(1.0, 16, 16); - glPopMatrix(); - -/* draw sphere in first row, fourth column - * diffuse reflection; emission; no ambient or specular reflection - */ - glPushMatrix(); - glTranslatef (3.75, 3.0, 0.0); - glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, no_mat); - glMaterialfv(GL_FRONT, GL_SHININESS, no_shininess); - glMaterialfv(GL_FRONT, GL_EMISSION, mat_emission); - glutSolidSphere(1.0, 16, 16); - glPopMatrix(); - -/* draw sphere in second row, first column - * ambient and diffuse reflection; no specular - */ - glPushMatrix(); - glTranslatef (-3.75, 0.0, 0.0); - glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, no_mat); - glMaterialfv(GL_FRONT, GL_SHININESS, no_shininess); - glMaterialfv(GL_FRONT, GL_EMISSION, no_mat); - glutSolidSphere(1.0, 16, 16); - glPopMatrix(); - -/* draw sphere in second row, second column - * ambient, diffuse and specular reflection; low shininess - */ - glPushMatrix(); - glTranslatef (-1.25, 0.0, 0.0); - glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, low_shininess); - glMaterialfv(GL_FRONT, GL_EMISSION, no_mat); - glutSolidSphere(1.0, 16, 16); - glPopMatrix(); - -/* draw sphere in second row, third column - * ambient, diffuse and specular reflection; high shininess - */ - glPushMatrix(); - glTranslatef (1.25, 0.0, 0.0); - glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, high_shininess); - glMaterialfv(GL_FRONT, GL_EMISSION, no_mat); - glutSolidSphere(1.0, 16, 16); - glPopMatrix(); - -/* draw sphere in second row, fourth column - * ambient and diffuse reflection; emission; no specular - */ - glPushMatrix(); - glTranslatef (3.75, 0.0, 0.0); - glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, no_mat); - glMaterialfv(GL_FRONT, GL_SHININESS, no_shininess); - glMaterialfv(GL_FRONT, GL_EMISSION, mat_emission); - glutSolidSphere(1.0, 16, 16); - glPopMatrix(); - -/* draw sphere in third row, first column - * colored ambient and diffuse reflection; no specular - */ - glPushMatrix(); - glTranslatef (-3.75, -3.0, 0.0); - glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient_color); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, no_mat); - glMaterialfv(GL_FRONT, GL_SHININESS, no_shininess); - glMaterialfv(GL_FRONT, GL_EMISSION, no_mat); - glutSolidSphere(1.0, 16, 16); - glPopMatrix(); - -/* draw sphere in third row, second column - * colored ambient, diffuse and specular reflection; low shininess - */ - glPushMatrix(); - glTranslatef (-1.25, -3.0, 0.0); - glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient_color); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, low_shininess); - glMaterialfv(GL_FRONT, GL_EMISSION, no_mat); - glutSolidSphere(1.0, 16, 16); - glPopMatrix(); - -/* draw sphere in third row, third column - * colored ambient, diffuse and specular reflection; high shininess - */ - glPushMatrix(); - glTranslatef (1.25, -3.0, 0.0); - glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient_color); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, high_shininess); - glMaterialfv(GL_FRONT, GL_EMISSION, no_mat); - glutSolidSphere(1.0, 16, 16); - glPopMatrix(); - -/* draw sphere in third row, fourth column - * colored ambient and diffuse reflection; emission; no specular - */ - glPushMatrix(); - glTranslatef (3.75, -3.0, 0.0); - glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient_color); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, no_mat); - glMaterialfv(GL_FRONT, GL_SHININESS, no_shininess); - glMaterialfv(GL_FRONT, GL_EMISSION, mat_emission); - glutSolidSphere(1.0, 16, 16); - glPopMatrix(); - - glFlush(); -} - -void myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= (h * 2)) - glOrtho (-6.0, 6.0, -3.0*((GLfloat)h*2)/(GLfloat)w, - 3.0*((GLfloat)h*2)/(GLfloat)w, -10.0, 10.0); - else - glOrtho (-6.0*(GLfloat)w/((GLfloat)h*2), - 6.0*(GLfloat)w/((GLfloat)h*2), -3.0, 3.0, -10.0, 10.0); - glMatrixMode(GL_MODELVIEW); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize (600, 450); - glutCreateWindow(argv[0]); - myinit(); - glutReshapeFunc(myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/mipmap.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/mipmap.c deleted file mode 100644 index d32dd725f4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/mipmap.c +++ /dev/null @@ -1,178 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* mipmap.c - * This program demonstrates using mipmaps for texture maps. - * To overtly show the effect of mipmaps, each mipmap reduction - * level has a solidly colored, contrasting texture image. - * Thus, the quadrilateral which is drawn is drawn with several - * different colors. - */ -#include -#include - -GLubyte mipmapImage32[32][32][3]; -GLubyte mipmapImage16[16][16][3]; -GLubyte mipmapImage8[8][8][3]; -GLubyte mipmapImage4[4][4][3]; -GLubyte mipmapImage2[2][2][3]; -GLubyte mipmapImage1[1][1][3]; - -void makeImages(void) -{ - int i, j; - - for (i = 0; i < 32; i++) { - for (j = 0; j < 32; j++) { - mipmapImage32[i][j][0] = 255; - mipmapImage32[i][j][1] = 255; - mipmapImage32[i][j][2] = 0; - } - } - for (i = 0; i < 16; i++) { - for (j = 0; j < 16; j++) { - mipmapImage16[i][j][0] = 255; - mipmapImage16[i][j][1] = 0; - mipmapImage16[i][j][2] = 255; - } - } - for (i = 0; i < 8; i++) { - for (j = 0; j < 8; j++) { - mipmapImage8[i][j][0] = 255; - mipmapImage8[i][j][1] = 0; - mipmapImage8[i][j][2] = 0; - } - } - for (i = 0; i < 4; i++) { - for (j = 0; j < 4; j++) { - mipmapImage4[i][j][0] = 0; - mipmapImage4[i][j][1] = 255; - mipmapImage4[i][j][2] = 0; - } - } - for (i = 0; i < 2; i++) { - for (j = 0; j < 2; j++) { - mipmapImage2[i][j][0] = 0; - mipmapImage2[i][j][1] = 0; - mipmapImage2[i][j][2] = 255; - } - } - mipmapImage1[0][0][0] = 255; - mipmapImage1[0][0][1] = 255; - mipmapImage1[0][0][2] = 255; -} - -void myinit(void) -{ - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_LESS); - glShadeModel(GL_FLAT); - - glTranslatef(0.0, 0.0, -3.6); - makeImages(); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glTexImage2D(GL_TEXTURE_2D, 0, 3, 32, 32, 0, - GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage32[0][0][0]); - glTexImage2D(GL_TEXTURE_2D, 1, 3, 16, 16, 0, - GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage16[0][0][0]); - glTexImage2D(GL_TEXTURE_2D, 2, 3, 8, 8, 0, - GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage8[0][0][0]); - glTexImage2D(GL_TEXTURE_2D, 3, 3, 4, 4, 0, - GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage4[0][0][0]); - glTexImage2D(GL_TEXTURE_2D, 4, 3, 2, 2, 0, - GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage2[0][0][0]); - glTexImage2D(GL_TEXTURE_2D, 5, 3, 1, 1, 0, - GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage1[0][0][0]); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_NEAREST_MIPMAP_NEAREST); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); - glEnable(GL_TEXTURE_2D); -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glBegin(GL_QUADS); - glTexCoord2f(0.0, 0.0); glVertex3f(-2.0, -1.0, 0.0); - glTexCoord2f(0.0, 8.0); glVertex3f(-2.0, 1.0, 0.0); - glTexCoord2f(8.0, 8.0); glVertex3f(2000.0, 1.0, -6000.0); - glTexCoord2f(8.0, 0.0); glVertex3f(2000.0, -1.0, -6000.0); - glEnd(); - glFlush(); -} - -void myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(60.0, 1.0*(GLfloat)w/(GLfloat)h, 1.0, 30000.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize (500, 500); - glutCreateWindow (argv[0]); - myinit(); - glutReshapeFunc (myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/model.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/model.c deleted file mode 100644 index 8411ef355f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/model.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * model.c - * This program demonstrates modeling transformations - */ -#include -#include - -void init(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel (GL_FLAT); -} - -void draw_triangle(void) -{ - glBegin (GL_LINE_LOOP); - glVertex2f(0.0, 25.0); - glVertex2f(25.0, -25.0); - glVertex2f(-25.0, -25.0); - glEnd(); -} - -void display(void) -{ - glClear (GL_COLOR_BUFFER_BIT); - glColor3f (1.0, 1.0, 1.0); - - glLoadIdentity (); - glColor3f (1.0, 1.0, 1.0); - draw_triangle (); - - glEnable (GL_LINE_STIPPLE); - glLineStipple (1, 0xF0F0); - glLoadIdentity (); - glTranslatef (-20.0, 0.0, 0.0); - draw_triangle (); - - glLineStipple (1, 0xF00F); - glLoadIdentity (); - glScalef (1.5, 0.5, 1.0); - draw_triangle (); - - glLineStipple (1, 0x8888); - glLoadIdentity (); - glRotatef (90.0, 0.0, 0.0, 1.0); - draw_triangle (); - glDisable (GL_LINE_STIPPLE); - - glFlush (); -} - -void reshape (int w, int h) -{ - glViewport (0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - if (w <= h) - glOrtho (-50.0, 50.0, -50.0*(GLfloat)h/(GLfloat)w, - 50.0*(GLfloat)h/(GLfloat)w, -1.0, 1.0); - else - glOrtho (-50.0*(GLfloat)w/(GLfloat)h, - 50.0*(GLfloat)w/(GLfloat)h, -50.0, 50.0, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (500, 500); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc (keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/movelight.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/movelight.c deleted file mode 100644 index a108cad439..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/movelight.c +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * movelight.c - * This program demonstrates when to issue lighting and - * transformation commands to render a model with a light - * which is moved by a modeling transformation (rotate or - * translate). The light position is reset after the modeling - * transformation is called. The eye position does not change. - * - * A sphere is drawn using a grey material characteristic. - * A single light source illuminates the object. - * - * Interaction: pressing the left mouse button alters - * the modeling transformation (x rotation) by 30 degrees. - * The scene is then redrawn with the light in a new position. - */ -#include -#include - -static int spin = 0; - -/* Initialize material property, light source, lighting model, - * and depth buffer. - */ -void init(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel (GL_SMOOTH); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); -} - -/* Here is where the light position is reset after the modeling - * transformation (glRotated) is called. This places the - * light at a new position in world coordinates. The cube - * represents the position of the light. - */ -void display(void) -{ - GLfloat position[] = { 0.0, 0.0, 1.5, 1.0 }; - - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glPushMatrix (); - gluLookAt (0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); - - glPushMatrix (); - glRotated ((GLdouble) spin, 1.0, 0.0, 0.0); - glLightfv (GL_LIGHT0, GL_POSITION, position); - - glTranslated (0.0, 0.0, 1.5); - glDisable (GL_LIGHTING); - glColor3f (0.0, 1.0, 1.0); - glutWireCube (0.1); - glEnable (GL_LIGHTING); - glPopMatrix (); - - glutSolidTorus (0.275, 0.85, 8, 15); - glPopMatrix (); - glFlush (); -} - -void reshape (int w, int h) -{ - glViewport (0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode (GL_PROJECTION); - glLoadIdentity(); - gluPerspective(40.0, (GLfloat) w/(GLfloat) h, 1.0, 20.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -/* ARGSUSED2 */ -void mouse(int button, int state, int x, int y) -{ - switch (button) { - case GLUT_LEFT_BUTTON: - if (state == GLUT_DOWN) { - spin = (spin + 30) % 360; - glutPostRedisplay(); - } - break; - default: - break; - } -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize (500, 500); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutMouseFunc(mouse); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/nurbs.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/nurbs.c deleted file mode 100644 index a7c6f0c696..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/nurbs.c +++ /dev/null @@ -1,190 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* - * nurbs.c - * This program shows a NURBS (Non-uniform rational B-splines) - * surface, shaped like a heart. - */ -#include -#include - -#define S_NUMPOINTS 13 -#define S_ORDER 3 -#define S_NUMKNOTS (S_NUMPOINTS + S_ORDER) -#define T_NUMPOINTS 3 -#define T_ORDER 3 -#define T_NUMKNOTS (T_NUMPOINTS + T_ORDER) -#define SQRT2 1.41421356237309504880 - -/* initialized local data */ - -GLfloat sknots[S_NUMKNOTS] = - {-1.0, -1.0, -1.0, 0.0, 1.0, 2.0, 3.0, 4.0, - 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 9.0, 9.0}; -GLfloat tknots[T_NUMKNOTS] = {1.0, 1.0, 1.0, 2.0, 2.0, 2.0}; - -GLfloat ctlpoints[S_NUMPOINTS][T_NUMPOINTS][4] = { -{ {4.,2.,2.,1.},{4.,1.6,2.5,1.},{4.,2.,3.0,1.} }, -{ {5.,4.,2.,1.},{5.,4.,2.5,1.},{5.,4.,3.0,1.} }, -{ {6.,5.,2.,1.},{6.,5.,2.5,1.},{6.,5.,3.0,1.} }, -{ {SQRT2*6.,SQRT2*6.,SQRT2*2.,SQRT2}, - {SQRT2*6.,SQRT2*6.,SQRT2*2.5,SQRT2}, - {SQRT2*6.,SQRT2*6.,SQRT2*3.0,SQRT2} }, -{ {5.2,6.7,2.,1.},{5.2,6.7,2.5,1.},{5.2,6.7,3.0,1.} }, -{ {SQRT2*4.,SQRT2*6.,SQRT2*2.,SQRT2}, - {SQRT2*4.,SQRT2*6.,SQRT2*2.5,SQRT2}, - {SQRT2*4.,SQRT2*6.,SQRT2*3.0,SQRT2} }, -{ {4.,5.2,2.,1.},{4.,4.6,2.5,1.},{4.,5.2,3.0,1.} }, -{ {SQRT2*4.,SQRT2*6.,SQRT2*2.,SQRT2}, - {SQRT2*4.,SQRT2*6.,SQRT2*2.5,SQRT2}, - {SQRT2*4.,SQRT2*6.,SQRT2*3.0,SQRT2} }, -{ {2.8,6.7,2.,1.},{2.8,6.7,2.5,1.},{2.8,6.7,3.0,1.} }, -{ {SQRT2*2.,SQRT2*6.,SQRT2*2.,SQRT2}, - {SQRT2*2.,SQRT2*6.,SQRT2*2.5,SQRT2}, - {SQRT2*2.,SQRT2*6.,SQRT2*3.0,SQRT2} }, -{ {2.,5.,2.,1.},{2.,5.,2.5,1.},{2.,5.,3.0,1.} }, -{ {3.,4.,2.,1.},{3.,4.,2.5,1.},{3.,4.,3.0,1.} }, -{ {4.,2.,2.,1.},{4.,1.6,2.5,1.},{4.,2.,3.0,1.} } -}; - -GLUnurbsObj *theNurb; - -/* Initialize material property, light source, lighting model, - * and depth buffer. - */ -void myinit(void) -{ - GLfloat mat_ambient[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat mat_diffuse[] = { 1.0, 0.2, 1.0, 1.0 }; - GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat mat_shininess[] = { 50.0 }; - - GLfloat light0_position[] = { 1.0, 0.1, 1.0, 0.0 }; - GLfloat light1_position[] = { -1.0, 0.1, 1.0, 0.0 }; - - GLfloat lmodel_ambient[] = { 0.3, 0.3, 0.3, 1.0 }; - - glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); - glLightfv(GL_LIGHT0, GL_POSITION, light0_position); - glLightfv(GL_LIGHT1, GL_POSITION, light1_position); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_LIGHT1); - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); - glEnable(GL_AUTO_NORMAL); - - theNurb = gluNewNurbsRenderer(); - - gluNurbsProperty(theNurb, GLU_SAMPLING_TOLERANCE, 25.0); - gluNurbsProperty(theNurb, GLU_DISPLAY_MODE, GLU_FILL); -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - glTranslatef (4., 4.5, 2.5); - glRotatef (220.0, 1., 0., 0.); - glRotatef (115.0, 0., 1., 0.); - glTranslatef (-4., -4.5, -2.5); - - gluBeginSurface(theNurb); - gluNurbsSurface(theNurb, - S_NUMKNOTS, sknots, - T_NUMKNOTS, tknots, - 4 * T_NUMPOINTS, - 4, - &ctlpoints[0][0][0], - S_ORDER, T_ORDER, - GL_MAP2_VERTEX_4); - gluEndSurface(theNurb); - - glPopMatrix(); - glFlush(); -} - -void myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1.0, 1.0, -1.5, 0.5, 0.8, 10.0); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - gluLookAt(7.0,4.5,4.0, 4.5,4.5,2.0, 6.0,-3.0,2.0); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutCreateWindow (argv[0]); - myinit(); - glutReshapeFunc (myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/pickdepth.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/pickdepth.c deleted file mode 100644 index ad5bdc8199..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/pickdepth.c +++ /dev/null @@ -1,217 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* - * pickdepth.c - * Picking is demonstrated in this program. In - * rendering mode, three overlapping rectangles are - * drawn. When the left mouse button is pressed, - * selection mode is entered with the picking matrix. - * Rectangles which are drawn under the cursor position - * are "picked." Pay special attention to the depth - * value range, which is returned. - */ -#include -#include -#include - -void -myinit(void) -{ - glClearColor(0.0, 0.0, 0.0, 0.0); - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); - glShadeModel(GL_FLAT); - glDepthRange(0.0, 1.0); /* The default z mapping */ -} - -/* The three rectangles are drawn. In selection mode, - * each rectangle is given the same name. Note that - * each rectangle is drawn with a different z value. - */ -void -drawRects(GLenum mode) -{ - if (mode == GL_SELECT) - glLoadName(1); - glBegin(GL_QUADS); - glColor3f(1.0, 1.0, 0.0); - glVertex3i(2, 0, 0); - glVertex3i(2, 6, 0); - glVertex3i(6, 6, 0); - glVertex3i(6, 0, 0); - glEnd(); - if (mode == GL_SELECT) - glLoadName(2); - glBegin(GL_QUADS); - glColor3f(0.0, 1.0, 1.0); - glVertex3i(3, 2, -1); - glVertex3i(3, 8, -1); - glVertex3i(8, 8, -1); - glVertex3i(8, 2, -1); - glEnd(); - if (mode == GL_SELECT) - glLoadName(3); - glBegin(GL_QUADS); - glColor3f(1.0, 0.0, 1.0); - glVertex3i(0, 2, -2); - glVertex3i(0, 7, -2); - glVertex3i(5, 7, -2); - glVertex3i(5, 2, -2); - glEnd(); -} - -/* processHits() prints out the contents of the - * selection array. - */ -void -processHits(GLint hits, GLuint buffer[]) -{ - GLint i; - GLuint j, names, *ptr; - - printf("hits = %d\n", hits); - ptr = (GLuint *) buffer; - for (i = 0; i < hits; i++) { /* for each hit */ - names = *ptr; - printf(" number of names for hit = %d\n", names); - ptr++; - printf(" z1 is %g;", (float) *ptr/0xffffffff); - ptr++; - printf(" z2 is %g\n", (float) *ptr/0xffffffff); - ptr++; - printf(" the name is "); - for (j = 0; j < names; j++) { /* for each name */ - printf("%d ", *ptr); - ptr++; - } - printf("\n"); - } -} - -/* pickRects() sets up selection mode, name stack, - * and projection matrix for picking. Then the objects - * are drawn. - */ -#define BUFSIZE 512 - -void -pickRects(int button, int state, int x, int y) -{ - GLuint selectBuf[BUFSIZE]; - GLint hits; - GLint viewport[4]; - - if (button != GLUT_LEFT_BUTTON || state != GLUT_DOWN) - return; - - glGetIntegerv(GL_VIEWPORT, viewport); - - glSelectBuffer(BUFSIZE, selectBuf); - (void) glRenderMode(GL_SELECT); - - glInitNames(); - glPushName(-1); - - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); -/* create 5x5 pixel picking region near cursor location */ - gluPickMatrix((GLdouble) x, (GLdouble) (viewport[3] - y), - 5.0, 5.0, viewport); - glOrtho(0.0, 8.0, 0.0, 8.0, -0.5, 2.5); - drawRects(GL_SELECT); - glPopMatrix(); - glFlush(); - - hits = glRenderMode(GL_RENDER); - processHits(hits, selectBuf); -} - -void -display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - drawRects(GL_RENDER); - glutSwapBuffers(); -} - -void -myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(0.0, 8.0, 0.0, 8.0, -0.5, 2.5); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, depth buffer, and handle input events. - */ -int -main(int argc, char **argv) -{ - glutInitWindowSize(200, 200); - glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); - glutInit(&argc, argv); - glutCreateWindow(argv[0]); - myinit(); - glutMouseFunc(pickRects); - glutReshapeFunc(myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/picksquare.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/picksquare.c deleted file mode 100644 index 636edc97b4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/picksquare.c +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * picksquare.c - * Use of multiple names and picking are demonstrated. - * A 3x3 grid of squares is drawn. When the left mouse - * button is pressed, all squares under the cursor position - * have their color changed. - */ -#include -#include -#include - -int board[3][3]; /* amount of color for each square */ - -/* Clear color value for every square on the board */ -void init(void) -{ - int i, j; - for (i = 0; i < 3; i++) - for (j = 0; j < 3; j ++) - board[i][j] = 0; - glClearColor (0.0, 0.0, 0.0, 0.0); -} - -/* The nine squares are drawn. In selection mode, each - * square is given two names: one for the row and the - * other for the column on the grid. The color of each - * square is determined by its position on the grid, and - * the value in the board[][] array. - */ -void drawSquares(GLenum mode) -{ - GLuint i, j; - for (i = 0; i < 3; i++) { - if (mode == GL_SELECT) - glLoadName (i); - for (j = 0; j < 3; j ++) { - if (mode == GL_SELECT) - glPushName (j); - glColor3f ((GLfloat) i/3.0, (GLfloat) j/3.0, - (GLfloat) board[i][j]/3.0); - glRecti (i, j, i+1, j+1); - if (mode == GL_SELECT) - glPopName (); - } - } -} - -/* processHits prints out the contents of the - * selection array. - */ -void processHits (GLint hits, GLuint buffer[]) -{ - GLint i; - GLuint j, ii = 0, jj = 0, names, *ptr; - - printf ("hits = %d\n", hits); - ptr = (GLuint *) buffer; - for (i = 0; i < hits; i++) { /* for each hit */ - names = *ptr; - printf (" number of names for this hit = %d\n", names); ptr++; - printf(" z1 is %g;", (float) *ptr/0x7fffffff); ptr++; - printf(" z2 is %g\n", (float) *ptr/0x7fffffff); ptr++; - printf (" names are "); - for (j = 0; j < names; j++) { /* for each name */ - printf ("%d ", *ptr); - if (j == 0) /* set row and column */ - ii = *ptr; - else if (j == 1) - jj = *ptr; - ptr++; - } - printf ("\n"); - board[ii][jj] = (board[ii][jj] + 1) % 3; - } -} - -/* pickSquares() sets up selection mode, name stack, - * and projection matrix for picking. Then the - * objects are drawn. - */ -#define BUFSIZE 512 - -void pickSquares(int button, int state, int x, int y) -{ - GLuint selectBuf[BUFSIZE]; - GLint hits; - GLint viewport[4]; - - if (button != GLUT_LEFT_BUTTON || state != GLUT_DOWN) - return; - - glGetIntegerv (GL_VIEWPORT, viewport); - - glSelectBuffer (BUFSIZE, selectBuf); - (void) glRenderMode (GL_SELECT); - - glInitNames(); - glPushName(0); - - glMatrixMode (GL_PROJECTION); - glPushMatrix (); - glLoadIdentity (); -/* create 5x5 pixel picking region near cursor location */ - gluPickMatrix ((GLdouble) x, (GLdouble) (viewport[3] - y), - 5.0, 5.0, viewport); - gluOrtho2D (0.0, 3.0, 0.0, 3.0); - drawSquares (GL_SELECT); - - glMatrixMode (GL_PROJECTION); - glPopMatrix (); - glFlush (); - - hits = glRenderMode (GL_RENDER); - processHits (hits, selectBuf); - glutPostRedisplay(); -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT); - drawSquares (GL_RENDER); - glFlush(); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D (0.0, 3.0, 0.0, 3.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -/* Main Loop */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (100, 100); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init (); - glutReshapeFunc (reshape); - glutDisplayFunc(display); - glutMouseFunc (pickSquares); - glutKeyboardFunc (keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/plane.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/plane.c deleted file mode 100644 index dc17f7b238..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/plane.c +++ /dev/null @@ -1,171 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* - * plane.c - * This program demonstrates the use of local versus - * infinite lighting on a flat plane. - */ -#include -#include - -/* Initialize material property, light source, and lighting model. - */ -void myinit(void) -{ - GLfloat mat_ambient[] = { 0.0, 0.0, 0.0, 1.0 }; -/* mat_specular and mat_shininess are NOT default values */ - GLfloat mat_diffuse[] = { 0.4, 0.4, 0.4, 1.0 }; - GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat mat_shininess[] = { 15.0 }; - - GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 }; - GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat lmodel_ambient[] = { 0.2, 0.2, 0.2, 1.0 }; - - glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); - glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); - glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); -} - -void drawPlane(void) -{ - glBegin (GL_QUADS); - glNormal3f (0.0, 0.0, 1.0); - glVertex3f (-1.0, -1.0, 0.0); - glVertex3f (0.0, -1.0, 0.0); - glVertex3f (0.0, 0.0, 0.0); - glVertex3f (-1.0, 0.0, 0.0); - - glNormal3f (0.0, 0.0, 1.0); - glVertex3f (0.0, -1.0, 0.0); - glVertex3f (1.0, -1.0, 0.0); - glVertex3f (1.0, 0.0, 0.0); - glVertex3f (0.0, 0.0, 0.0); - - glNormal3f (0.0, 0.0, 1.0); - glVertex3f (0.0, 0.0, 0.0); - glVertex3f (1.0, 0.0, 0.0); - glVertex3f (1.0, 1.0, 0.0); - glVertex3f (0.0, 1.0, 0.0); - - glNormal3f (0.0, 0.0, 1.0); - glVertex3f (0.0, 0.0, 0.0); - glVertex3f (0.0, 1.0, 0.0); - glVertex3f (-1.0, 1.0, 0.0); - glVertex3f (-1.0, 0.0, 0.0); - glEnd(); -} - -void display (void) -{ - GLfloat infinite_light[] = { 1.0, 1.0, 1.0, 0.0 }; - GLfloat local_light[] = { 1.0, 1.0, 1.0, 1.0 }; - - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix (); - glTranslatef (-1.5, 0.0, 0.0); - glLightfv (GL_LIGHT0, GL_POSITION, infinite_light); - drawPlane (); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (1.5, 0.0, 0.0); - glLightfv (GL_LIGHT0, GL_POSITION, local_light); - drawPlane (); - glPopMatrix (); - glFlush (); -} - -void myReshape(int w, int h) -{ - glViewport (0, 0, w, h); - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - if (w <= h) - glOrtho (-1.5, 1.5, -1.5*(GLdouble)h/(GLdouble)w, - 1.5*(GLdouble)h/(GLdouble)w, -10.0, 10.0); - else - glOrtho (-1.5*(GLdouble)w/(GLdouble)h, - 1.5*(GLdouble)w/(GLdouble)h, -1.5, 1.5, -10.0, 10.0); - glMatrixMode (GL_MODELVIEW); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize (500, 200); - glutCreateWindow (argv[0]); - myinit(); - glutReshapeFunc (myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/planet.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/planet.c deleted file mode 100644 index e13672d3f6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/planet.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * planet.c - * This program shows how to composite modeling transformations - * to draw translated and rotated models. - * Interaction: pressing the d and y keys (day and year) - * alters the rotation of the planet around the sun. - */ -#include -#include - -static int year = 0, day = 0; - -void init(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel (GL_FLAT); -} - -void display(void) -{ - glClear (GL_COLOR_BUFFER_BIT); - glColor3f (1.0, 1.0, 1.0); - - glPushMatrix(); - glutWireSphere(1.0, 20, 16); /* draw sun */ - glRotatef ((GLfloat) year, 0.0, 1.0, 0.0); - glTranslatef (2.0, 0.0, 0.0); - glRotatef ((GLfloat) day, 0.0, 1.0, 0.0); - glutWireSphere(0.2, 10, 8); /* draw smaller planet */ - glPopMatrix(); - glutSwapBuffers(); -} - -void reshape (int w, int h) -{ - glViewport (0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - gluPerspective(60.0, (GLfloat) w/(GLfloat) h, 1.0, 20.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - gluLookAt (0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); -} - -/* ARGSUSED1 */ -void keyboard (unsigned char key, int x, int y) -{ - switch (key) { - case 'd': - day = (day + 10) % 360; - glutPostRedisplay(); - break; - case 'D': - day = (day - 10) % 360; - glutPostRedisplay(); - break; - case 'y': - year = (year + 5) % 360; - glutPostRedisplay(); - break; - case 'Y': - year = (year - 5) % 360; - glutPostRedisplay(); - break; - case 27: - exit(0); - break; - default: - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB); - glutInitWindowSize (500, 500); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/polyoff.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/polyoff.c deleted file mode 100644 index 2017b4d8ee..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/polyoff.c +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * polyoff.c - * This program demonstrates polygon offset to draw a shaded - * polygon and its wireframe counterpart without ugly visual - * artifacts ("stitching"). - */ -#include -#include -#include -#include - -#ifdef GL_VERSION_1_1 -GLuint list; -GLint fill = 1; -GLfloat spinx = 0; -GLfloat spiny = 0; -GLfloat tdist = 0.0; -GLfloat polyfactor = 1.0; -GLfloat polyunits = 1.0; -GLboolean doubleBuffer; - - -/* display() draws two spheres, one with a gray, diffuse material, - * the other sphere with a magenta material with a specular highlight. - */ -void display (void) -{ - GLfloat gray[] = { 0.8, 0.8, 0.8, 1.0 }; - GLfloat black[] = { 0.0, 0.0, 0.0, 1.0 }; - - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glPushMatrix (); - glTranslatef (0.0, 0.0, tdist); - glRotatef ((GLfloat) spinx, 1.0, 0.0, 0.0); - glRotatef ((GLfloat) spiny, 0.0, 1.0, 0.0); - - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray); - glMaterialfv(GL_FRONT, GL_SPECULAR, black); - glMaterialf(GL_FRONT, GL_SHININESS, 0.0); - if (fill) { - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_POLYGON_OFFSET_FILL); - glPolygonOffset(polyfactor, polyunits); - glCallList (list); - glDisable(GL_POLYGON_OFFSET_FILL); - } - - glDisable(GL_LIGHTING); - glDisable(GL_LIGHT0); - glColor3f (1.0, 1.0, 1.0); - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - glPolygonOffset(-polyfactor, -polyunits); - if (!fill) glEnable(GL_POLYGON_OFFSET_LINE); - glCallList (list); - glDisable(GL_POLYGON_OFFSET_LINE); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - - if (!fill) { - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glCallList (list); - } - - glPopMatrix (); - glFlush (); - if (doubleBuffer) glutSwapBuffers(); -} - -/* specify initial properties - * create display list with sphere - * initialize lighting and depth buffer - */ -void gfxinit (void) -{ - GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 }; - GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 }; - - GLfloat global_ambient[] = { 0.2, 0.2, 0.2, 1.0 }; - - glClearColor (0.0, 0.0, 0.0, 1.0); - - list = glGenLists(1); - glNewList (list, GL_COMPILE); - glutSolidSphere(1.0, 20, 12); - glEndList (); - - glEnable(GL_DEPTH_TEST); - - glLightfv (GL_LIGHT0, GL_AMBIENT, light_ambient); - glLightfv (GL_LIGHT0, GL_DIFFUSE, light_diffuse); - glLightfv (GL_LIGHT0, GL_SPECULAR, light_specular); - glLightfv (GL_LIGHT0, GL_POSITION, light_position); - glLightModelfv (GL_LIGHT_MODEL_AMBIENT, global_ambient); -} - -/* call when window is resized */ -void reshape(int width, int height) -{ - glViewport (0, 0, width, height); - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - gluPerspective(45.0, (GLdouble)width/(GLdouble)height, - 1.0, 10.0); - glMatrixMode (GL_MODELVIEW); - glLoadIdentity (); - gluLookAt (0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); -} - -static void Benchmark( float xdiff, float ydiff ) -{ - int startTime, endTime; - int draws; - double seconds, fps; - - printf("Benchmarking...\n"); - - draws = 0; - startTime = glutGet(GLUT_ELAPSED_TIME); - spinx = spiny = 0.0; - do { - spinx += xdiff; - spiny += ydiff; - display(); - draws++; - endTime = glutGet(GLUT_ELAPSED_TIME); - } while (endTime - startTime < 5000); /* 5 seconds */ - - /* Results */ - seconds = (double) (endTime - startTime) / 1000.0; - fps = draws / seconds; - printf("Result: fps: %g\n", fps); -} - - -/* call when mouse button is pressed */ -/* ARGSUSED2 */ -void mouse(int button, int state, int x, int y) { - switch (button) { - case GLUT_LEFT_BUTTON: - switch (state) { - case GLUT_DOWN: - spinx += 5; - glutPostRedisplay(); - break; - default: - break; - } - break; - case GLUT_MIDDLE_BUTTON: - switch (state) { - case GLUT_DOWN: - spiny += 5; - glutPostRedisplay(); - break; - default: - break; - } - break; - case GLUT_RIGHT_BUTTON: - switch (state) { - case GLUT_UP: - exit(0); - break; - default: - break; - } - break; - default: - break; - } -} - -/* ARGSUSED1 */ -void keyboard (unsigned char key, int x, int y) -{ - switch (key) { - case 't': - if (tdist < 4.0) { - tdist = (tdist + 0.5); - glutPostRedisplay(); - } - break; - case 'T': - if (tdist > -5.0) { - tdist = (tdist - 0.5); - glutPostRedisplay(); - } - break; - case 'F': - polyfactor = polyfactor + 0.1; - printf ("polyfactor is %f\n", polyfactor); - glutPostRedisplay(); - break; - case 'f': - polyfactor = polyfactor - 0.1; - printf ("polyfactor is %f\n", polyfactor); - glutPostRedisplay(); - break; - case 'U': - polyunits = polyunits + 1.0; - printf ("polyunits is %f\n", polyunits); - glutPostRedisplay(); - break; - case 'u': - polyunits = polyunits - 1.0; - printf ("polyunits is %f\n", polyunits); - glutPostRedisplay(); - break; - case 'b': - Benchmark(5.0, 0); - break; - case 'B': - Benchmark(0, 5.0); - break; - case ' ': - fill = !fill; - printf ("fill/line: %d\n", fill); - glutPostRedisplay(); - break; - case 27: /* Escape */ - exit(0); - break; - default: - break; - } -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - GLuint type; - glutInit(&argc, argv); - - Args(argc, argv); - - type = GLUT_DEPTH | GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - - glutInitDisplayMode(type); - glutCreateWindow("polyoff"); - glutReshapeFunc(reshape); - glutDisplayFunc(display); - glutMouseFunc(mouse); - glutKeyboardFunc(keyboard); - gfxinit(); - glutMainLoop(); - return 0; -} -#else -int main(int argc, char** argv) -{ - fprintf (stderr, "This program demonstrates a feature which is not in OpenGL Version 1.0.\n"); - fprintf (stderr, "If your implementation of OpenGL Version 1.0 has the right extensions,\n"); - fprintf (stderr, "you may be able to modify this program to make it run.\n"); - return 0; -} -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/polys.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/polys.c deleted file mode 100644 index 409abd1753..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/polys.c +++ /dev/null @@ -1,138 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* - * polys.c - * This program demonstrates polygon stippling. - */ -#include -#include - -void display(void) -{ - GLubyte fly[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x03, 0x80, 0x01, 0xC0, 0x06, 0xC0, 0x03, 0x60, 0x04, 0x60, 0x06, 0x20, -0x04, 0x30, 0x0C, 0x20, 0x04, 0x18, 0x18, 0x20, 0x04, 0x0C, 0x30, 0x20, -0x04, 0x06, 0x60, 0x20, 0x44, 0x03, 0xC0, 0x22, 0x44, 0x01, 0x80, 0x22, -0x44, 0x01, 0x80, 0x22, 0x44, 0x01, 0x80, 0x22, 0x44, 0x01, 0x80, 0x22, -0x44, 0x01, 0x80, 0x22, 0x44, 0x01, 0x80, 0x22, 0x66, 0x01, 0x80, 0x66, -0x33, 0x01, 0x80, 0xCC, 0x19, 0x81, 0x81, 0x98, 0x0C, 0xC1, 0x83, 0x30, -0x07, 0xe1, 0x87, 0xe0, 0x03, 0x3f, 0xfc, 0xc0, 0x03, 0x31, 0x8c, 0xc0, -0x03, 0x33, 0xcc, 0xc0, 0x06, 0x64, 0x26, 0x60, 0x0c, 0xcc, 0x33, 0x30, -0x18, 0xcc, 0x33, 0x18, 0x10, 0xc4, 0x23, 0x08, 0x10, 0x63, 0xC6, 0x08, -0x10, 0x30, 0x0c, 0x08, 0x10, 0x18, 0x18, 0x08, 0x10, 0x00, 0x00, 0x08}; - - GLubyte halftone[] = { -0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, -0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, -0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, -0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, -0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, -0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, -0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, -0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, -0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, -0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, -0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55}; - - glClear (GL_COLOR_BUFFER_BIT); - -/* draw all polygons in white */ - glColor3f (1.0, 1.0, 1.0); - -/* draw one solid, unstippled rectangle, */ -/* then two stippled rectangles */ - glRectf (25.0, 25.0, 125.0, 125.0); - glEnable (GL_POLYGON_STIPPLE); - glPolygonStipple (fly); - glRectf (125.0, 25.0, 225.0, 125.0); - glPolygonStipple (halftone); - glRectf (225.0, 25.0, 325.0, 125.0); - glDisable (GL_POLYGON_STIPPLE); - - glFlush (); -} - -void myinit (void) -{ -/* clear background to black */ - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel (GL_FLAT); -} - -static void reshape(GLsizei w, GLsizei h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(0.0, (GLdouble)w, 0.0, (GLdouble)h, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - break; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (350, 150); - glutCreateWindow (argv[0]); - myinit (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/quadric.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/quadric.c deleted file mode 100644 index 4e46c85f82..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/quadric.c +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * quadric.c - * This program demonstrates the use of some of the gluQuadric* - * routines. Quadric objects are created with some quadric - * properties and the callback routine to handle errors. - * Note that the cylinder has no top or bottom and the circle - * has a hole in it. - */ -#include -#include -#include - -/* Win32 calling conventions. */ -#ifndef CALLBACK -#define CALLBACK -#endif - -GLuint startList; - -void CALLBACK errorCallback(GLenum errorCode) -{ - const GLubyte *estring; - - estring = gluErrorString(errorCode); - fprintf(stderr, "Quadric Error: %s\n", estring); - exit(0); -} - -void init(void) -{ - GLUquadricObj *qobj; - GLfloat mat_ambient[] = { 0.5, 0.5, 0.5, 1.0 }; - GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat mat_shininess[] = { 50.0 }; - GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 }; - GLfloat model_ambient[] = { 0.5, 0.5, 0.5, 1.0 }; - - glClearColor(0.0, 0.0, 0.0, 0.0); - - glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); - glLightfv(GL_LIGHT0, GL_POSITION, light_position); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, model_ambient); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - -/* Create 4 display lists, each with a different quadric object. - * Different drawing styles and surface normal specifications - * are demonstrated. - */ - startList = glGenLists(4); - qobj = gluNewQuadric(); - gluQuadricCallback(qobj, GLU_ERROR, - (GLvoid (CALLBACK*) ()) errorCallback); - - gluQuadricDrawStyle(qobj, GLU_FILL); /* smooth shaded */ - gluQuadricNormals(qobj, GLU_SMOOTH); - glNewList(startList, GL_COMPILE); - gluSphere(qobj, 0.75, 15, 10); - glEndList(); - - gluQuadricDrawStyle(qobj, GLU_FILL); /* flat shaded */ - gluQuadricNormals(qobj, GLU_FLAT); - glNewList(startList+1, GL_COMPILE); - gluCylinder(qobj, 0.5, 0.3, 1.0, 15, 5); - glEndList(); - - gluQuadricDrawStyle(qobj, GLU_LINE); /* all polygons wireframe */ - gluQuadricNormals(qobj, GLU_NONE); - glNewList(startList+2, GL_COMPILE); - gluDisk(qobj, 0.25, 1.0, 20, 4); - glEndList(); - - gluQuadricDrawStyle(qobj, GLU_SILHOUETTE); /* boundary only */ - gluQuadricNormals(qobj, GLU_NONE); - glNewList(startList+3, GL_COMPILE); - gluPartialDisk(qobj, 0.0, 1.0, 20, 4, 0.0, 225.0); - glEndList(); -} - -void display(void) -{ - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glPushMatrix(); - - glEnable(GL_LIGHTING); - glShadeModel (GL_SMOOTH); - glTranslatef(-1.0, -1.0, 0.0); - glCallList(startList); - - glShadeModel (GL_FLAT); - glTranslatef(0.0, 2.0, 0.0); - glPushMatrix(); - glRotatef(300.0, 1.0, 0.0, 0.0); - glCallList(startList+1); - glPopMatrix(); - - glDisable(GL_LIGHTING); - glColor3f(0.0, 1.0, 1.0); - glTranslatef(2.0, -2.0, 0.0); - glCallList(startList+2); - - glColor3f(1.0, 1.0, 0.0); - glTranslatef(0.0, 2.0, 0.0); - glCallList(startList+3); - - glPopMatrix(); - glFlush(); -} - -void reshape (int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho(-2.5, 2.5, -2.5*(GLfloat)h/(GLfloat)w, - 2.5*(GLfloat)h/(GLfloat)w, -10.0, 10.0); - else - glOrtho(-2.5*(GLfloat)w/(GLfloat)h, - 2.5*(GLfloat)w/(GLfloat)h, -2.5, 2.5, -10.0, 10.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize(500, 500); - glutInitWindowPosition(100, 100); - glutCreateWindow(argv[0]); - init(); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/robot.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/robot.c deleted file mode 100644 index 94e20ac71e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/robot.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * robot.c - * This program shows how to composite modeling transformations - * to draw translated and rotated hierarchical models. - * Interaction: pressing the s and e keys (shoulder and elbow) - * alters the rotation of the robot arm. - */ -#include -#include - -static int shoulder = 0, elbow = 0; - -void init(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel (GL_FLAT); -} - -void display(void) -{ - glClear (GL_COLOR_BUFFER_BIT); - glPushMatrix(); - glTranslatef (-1.0, 0.0, 0.0); - glRotatef ((GLfloat) shoulder, 0.0, 0.0, 1.0); - glTranslatef (1.0, 0.0, 0.0); - glPushMatrix(); - glScalef (2.0, 0.4, 1.0); - glutWireCube (1.0); - glPopMatrix(); - - glTranslatef (1.0, 0.0, 0.0); - glRotatef ((GLfloat) elbow, 0.0, 0.0, 1.0); - glTranslatef (1.0, 0.0, 0.0); - glPushMatrix(); - glScalef (2.0, 0.4, 1.0); - glutWireCube (1.0); - glPopMatrix(); - - glPopMatrix(); - glutSwapBuffers(); -} - -void reshape (int w, int h) -{ - glViewport (0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - gluPerspective(65.0, (GLfloat) w/(GLfloat) h, 1.0, 20.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef (0.0, 0.0, -5.0); -} - -/* ARGSUSED1 */ -void keyboard (unsigned char key, int x, int y) -{ - switch (key) { - case 's': - shoulder = (shoulder + 5) % 360; - glutPostRedisplay(); - break; - case 'S': - shoulder = (shoulder - 5) % 360; - glutPostRedisplay(); - break; - case 'e': - elbow = (elbow + 5) % 360; - glutPostRedisplay(); - break; - case 'E': - elbow = (elbow - 5) % 360; - glutPostRedisplay(); - break; - case 27: - exit(0); - break; - default: - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB); - glutInitWindowSize (500, 500); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/sccolorlight.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/sccolorlight.c deleted file mode 100644 index 0ea750e584..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/sccolorlight.c +++ /dev/null @@ -1,141 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* - * sccolorlight.c - * This program demonstrates the use of a colored - * (magenta, in this example) light source. Objects - * are drawn using a grey material characteristic. - * A single light source illuminates the objects. - */ -#include -#include - -/* Initialize material property and light source. - */ -void myinit(void) -{ - GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 }; - GLfloat light_diffuse[] = { 1.0, 0.0, 1.0, 1.0 }; - GLfloat light_specular[] = { 1.0, 0.0, 1.0, 1.0 }; -/* light_position is NOT default value */ - GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 }; - - glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); - glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); - glLightfv(GL_LIGHT0, GL_POSITION, light_position); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glPushMatrix (); - glRotatef (20.0, 1.0, 0.0, 0.0); - - glPushMatrix (); - glTranslatef (-0.75, 0.5, 0.0); - glRotatef (90.0, 1.0, 0.0, 0.0); - glutSolidTorus (0.275, 0.85, 20, 20); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (-0.75, -0.5, 0.0); - glRotatef (270.0, 1.0, 0.0, 0.0); - glutSolidCone (1.0, 2.0, 20, 20); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (0.75, 0.0, -1.0); - glutSolidSphere (1.0, 20, 20); - glPopMatrix (); - - glPopMatrix (); - glFlush(); -} - -void myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho (-2.5, 2.5, -2.5*(GLfloat)h/(GLfloat)w, - 2.5*(GLfloat)h/(GLfloat)w, -10.0, 10.0); - else - glOrtho (-2.5*(GLfloat)w/(GLfloat)h, - 2.5*(GLfloat)w/(GLfloat)h, -2.5, 2.5, -10.0, 10.0); - glMatrixMode(GL_MODELVIEW); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize (500, 500); - glutCreateWindow (argv[0]); - myinit(); - glutReshapeFunc (myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/scene.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/scene.c deleted file mode 100644 index c3abc727b7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/scene.c +++ /dev/null @@ -1,141 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* - * scene.c - * This program demonstrates the use of the GL lighting model. - * Objects are drawn using a grey material characteristic. - * A single light source illuminates the objects. - */ -#include -#include - -/* Initialize material property and light source. - */ -void myinit (void) -{ - GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 }; - GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 }; -/* light_position is NOT default value */ - GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 }; - - glLightfv (GL_LIGHT0, GL_AMBIENT, light_ambient); - glLightfv (GL_LIGHT0, GL_DIFFUSE, light_diffuse); - glLightfv (GL_LIGHT0, GL_SPECULAR, light_specular); - glLightfv (GL_LIGHT0, GL_POSITION, light_position); - - glEnable (GL_LIGHTING); - glEnable (GL_LIGHT0); - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); -} - -void display (void) -{ - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix (); - glRotatef (20.0, 1.0, 0.0, 0.0); - - glPushMatrix (); - glTranslatef (-0.75, 0.5, 0.0); - glRotatef (90.0, 1.0, 0.0, 0.0); - glutSolidTorus (0.275, 0.85, 15, 15); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (-0.75, -0.5, 0.0); - glRotatef (270.0, 1.0, 0.0, 0.0); - glutSolidCone (1.0, 2.0, 15, 15); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (0.75, 0.0, -1.0); - glutSolidSphere (1.0, 15, 15); - glPopMatrix (); - - glPopMatrix (); - glFlush (); -} - -void myReshape(int w, int h) -{ - glViewport (0, 0, w, h); - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - if (w <= h) - glOrtho (-2.5, 2.5, -2.5*(GLfloat)h/(GLfloat)w, - 2.5*(GLfloat)h/(GLfloat)w, -10.0, 10.0); - else - glOrtho (-2.5*(GLfloat)w/(GLfloat)h, - 2.5*(GLfloat)w/(GLfloat)h, -2.5, 2.5, -10.0, 10.0); - glMatrixMode (GL_MODELVIEW); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize (500, 500); - glutCreateWindow (argv[0]); - myinit (); - glutReshapeFunc (myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/scenebamb.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/scenebamb.c deleted file mode 100644 index e7264d2003..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/scenebamb.c +++ /dev/null @@ -1,140 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* - * scenebamb.c - * This program demonstrates use of a blue ambient light - * source. - */ -#include -#include - -/* Initialize light source and lighting. - */ -void myinit(void) -{ - GLfloat light_ambient[] = { 0.0, 0.0, 1.0, 1.0 }; - GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 }; -/* light_position is NOT default value */ - GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 }; - - glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); - glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); - glLightfv(GL_LIGHT0, GL_POSITION, light_position); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix (); - glRotatef (20.0, 1.0, 0.0, 0.0); - - glPushMatrix (); - glTranslatef (-0.75, 0.5, 0.0); - glRotatef (90.0, 1.0, 0.0, 0.0); - glutSolidTorus (0.275, 0.85, 15, 15); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (-0.75, -0.5, 0.0); - glRotatef (270.0, 1.0, 0.0, 0.0); - glutSolidCone (1.0, 2.0, 15, 15); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (0.75, 0.0, -1.0); - glutSolidSphere (1.0, 15, 15); - glPopMatrix (); - - glPopMatrix (); - glFlush(); -} - -void myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho (-2.5, 2.5, -2.5*(GLfloat)h/(GLfloat)w, - 2.5*(GLfloat)h/(GLfloat)w, -10.0, 10.0); - else - glOrtho (-2.5*(GLfloat)w/(GLfloat)h, - 2.5*(GLfloat)w/(GLfloat)h, -2.5, 2.5, -10.0, 10.0); - glMatrixMode(GL_MODELVIEW); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize (500, 500); - glutCreateWindow (argv[0]); - myinit(); - glutReshapeFunc (myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/sceneflat.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/sceneflat.c deleted file mode 100644 index 10891fb997..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/sceneflat.c +++ /dev/null @@ -1,140 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* - * sceneflat.c - * This program draws lighted objects with flat shading. - */ -#include -#include - -/* Initialize light source and shading model (GL_FLAT). - */ -void myinit(void) -{ - GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 }; - GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 }; -/* light_position is NOT default value */ - GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 }; - - glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); - glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); - glLightfv(GL_LIGHT0, GL_POSITION, light_position); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); - glShadeModel (GL_FLAT); -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix (); - glRotatef (20.0, 1.0, 0.0, 0.0); - - glPushMatrix (); - glTranslatef (-0.75, 0.5, 0.0); - glRotatef (90.0, 1.0, 0.0, 0.0); - glutSolidTorus (0.275, 0.85, 15, 15); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (-0.75, -0.5, 0.0); - glRotatef (270.0, 1.0, 0.0, 0.0); - glutSolidCone (1.0, 2.0, 15, 15); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (0.75, 0.0, -1.0); - glutSolidSphere (1.0, 15, 15); - glPopMatrix (); - - glPopMatrix (); - glFlush(); -} - -void myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho (-2.5, 2.5, -2.5*(GLfloat)h/(GLfloat)w, - 2.5*(GLfloat)h/(GLfloat)w, -10.0, 10.0); - else - glOrtho (-2.5*(GLfloat)w/(GLfloat)h, - 2.5*(GLfloat)w/(GLfloat)h, -2.5, 2.5, -10.0, 10.0); - glMatrixMode(GL_MODELVIEW); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize (500, 500); - glutCreateWindow (argv[0]); - myinit(); - glutReshapeFunc (myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/select.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/select.c deleted file mode 100644 index 928373b879..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/select.c +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * select.c - * This is an illustration of the selection mode and - * name stack, which detects whether objects which collide - * with a viewing volume. First, four triangles and a - * rectangular box representing a viewing volume are drawn - * (drawScene routine). The green triangle and yellow - * triangles appear to lie within the viewing volume, but - * the red triangle appears to lie outside it. Then the - * selection mode is entered (selectObjects routine). - * Drawing to the screen ceases. To see if any collisions - * occur, the four triangles are called. In this example, - * the green triangle causes one hit with the name 1, and - * the yellow triangles cause one hit with the name 3. - */ -#include -#include -#include - -/* draw a triangle with vertices at (x1, y1), (x2, y2) - * and (x3, y3) at z units away from the origin. - */ -void drawTriangle (GLfloat x1, GLfloat y1, GLfloat x2, - GLfloat y2, GLfloat x3, GLfloat y3, GLfloat z) -{ - glBegin (GL_TRIANGLES); - glVertex3f (x1, y1, z); - glVertex3f (x2, y2, z); - glVertex3f (x3, y3, z); - glEnd (); -} - -/* draw a rectangular box with these outer x, y, and z values */ -void drawViewVolume (GLfloat x1, GLfloat x2, GLfloat y1, - GLfloat y2, GLfloat z1, GLfloat z2) -{ - glColor3f (1.0, 1.0, 1.0); - glBegin (GL_LINE_LOOP); - glVertex3f (x1, y1, -z1); - glVertex3f (x2, y1, -z1); - glVertex3f (x2, y2, -z1); - glVertex3f (x1, y2, -z1); - glEnd (); - - glBegin (GL_LINE_LOOP); - glVertex3f (x1, y1, -z2); - glVertex3f (x2, y1, -z2); - glVertex3f (x2, y2, -z2); - glVertex3f (x1, y2, -z2); - glEnd (); - - glBegin (GL_LINES); /* 4 lines */ - glVertex3f (x1, y1, -z1); - glVertex3f (x1, y1, -z2); - glVertex3f (x1, y2, -z1); - glVertex3f (x1, y2, -z2); - glVertex3f (x2, y1, -z1); - glVertex3f (x2, y1, -z2); - glVertex3f (x2, y2, -z1); - glVertex3f (x2, y2, -z2); - glEnd (); -} - -/* drawScene draws 4 triangles and a wire frame - * which represents the viewing volume. - */ -void drawScene (void) -{ - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - gluPerspective (40.0, 4.0/3.0, 1.0, 100.0); - - glMatrixMode (GL_MODELVIEW); - glLoadIdentity (); - gluLookAt (7.5, 7.5, 12.5, 2.5, 2.5, -5.0, 0.0, 1.0, 0.0); - glColor3f (0.0, 1.0, 0.0); /* green triangle */ - drawTriangle (2.0, 2.0, 3.0, 2.0, 2.5, 3.0, -5.0); - glColor3f (1.0, 0.0, 0.0); /* red triangle */ - drawTriangle (2.0, 7.0, 3.0, 7.0, 2.5, 8.0, -5.0); - glColor3f (1.0, 1.0, 0.0); /* yellow triangles */ - drawTriangle (2.0, 2.0, 3.0, 2.0, 2.5, 3.0, 0.0); - drawTriangle (2.0, 2.0, 3.0, 2.0, 2.5, 3.0, -10.0); - drawViewVolume (0.0, 5.0, 0.0, 5.0, 0.0, 10.0); -} - -/* processHits prints out the contents of the selection array - */ -void processHits (GLint hits, GLuint buffer[]) -{ - GLint i; - GLuint j, names, *ptr; - - printf ("hits = %d\n", hits); - ptr = (GLuint *) buffer; - for (i = 0; i < hits; i++) { /* for each hit */ - names = *ptr; - printf (" number of names for hit = %d\n", names); ptr++; - printf(" z1 is %g;", (float) *ptr/0x7fffffff); ptr++; - printf(" z2 is %g\n", (float) *ptr/0x7fffffff); ptr++; - printf (" the name is "); - for (j = 0; j < names; j++) { /* for each name */ - printf ("%d ", *ptr); ptr++; - } - printf ("\n"); - } -} - -/* selectObjects "draws" the triangles in selection mode, - * assigning names for the triangles. Note that the third - * and fourth triangles share one name, so that if either - * or both triangles intersects the viewing/clipping volume, - * only one hit will be registered. - */ -#define BUFSIZE 512 - -void selectObjects(void) -{ - GLuint selectBuf[BUFSIZE]; - GLint hits; - - glSelectBuffer (BUFSIZE, selectBuf); - (void) glRenderMode (GL_SELECT); - - glInitNames(); - glPushName(0); - - glPushMatrix (); - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - glOrtho (0.0, 5.0, 0.0, 5.0, 0.0, 10.0); - glMatrixMode (GL_MODELVIEW); - glLoadIdentity (); - glLoadName(1); - drawTriangle (2.0, 2.0, 3.0, 2.0, 2.5, 3.0, -5.0); - glLoadName(2); - drawTriangle (2.0, 7.0, 3.0, 7.0, 2.5, 8.0, -5.0); - glLoadName(3); - drawTriangle (2.0, 2.0, 3.0, 2.0, 2.5, 3.0, 0.0); - drawTriangle (2.0, 2.0, 3.0, 2.0, 2.5, 3.0, -10.0); - glPopMatrix (); - glFlush (); - - hits = glRenderMode (GL_RENDER); - processHits (hits, selectBuf); -} - -void init (void) -{ - glEnable(GL_DEPTH_TEST); - glShadeModel(GL_FLAT); -} - -void display(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - drawScene (); - selectObjects (); - glFlush(); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -/* Main Loop */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize (200, 200); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init(); - glutDisplayFunc(display); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/smooth.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/smooth.c deleted file mode 100644 index 9d22fc9025..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/smooth.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * smooth.c - * This program demonstrates smooth shading. - * A smooth shaded polygon is drawn in a 2-D projection. - */ -#include -#include - -void init(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel (GL_SMOOTH); -} - -void triangle(void) -{ - glBegin (GL_TRIANGLES); - glColor3f (1.0, 0.0, 0.0); - glVertex2f (5.0, 5.0); - glColor3f (0.0, 1.0, 0.0); - glVertex2f (25.0, 5.0); - glColor3f (0.0, 0.0, 1.0); - glVertex2f (5.0, 25.0); - glEnd(); -} - -void display(void) -{ - glClear (GL_COLOR_BUFFER_BIT); - triangle (); - glFlush (); -} - -void reshape (int w, int h) -{ - glViewport (0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - if (w <= h) - gluOrtho2D (0.0, 30.0, 0.0, 30.0 * (GLfloat) h/(GLfloat) w); - else - gluOrtho2D (0.0, 30.0 * (GLfloat) w/(GLfloat) h, 0.0, 30.0); - glMatrixMode(GL_MODELVIEW); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (500, 500); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc (keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/stencil.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/stencil.c deleted file mode 100644 index b33e40a030..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/stencil.c +++ /dev/null @@ -1,193 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* stencil.c - * This program draws two rotated tori in a window. - * A diamond in the center of the window masks out part - * of the scene. Within this mask, a different model - * (a sphere) is drawn in a different color. - */ - -/* - * !!! NOTE !!! - * - * This demo is poorly written. The stencil buffer should be - * redrawn in display(), not in the myReshape() function. - * The reason is if the window gets "damaged" then the stencil buffer - * contents will be in an undefined state (myReshape is not called when - * a window is damaged and needs to be redrawn). If the stencil buffer - * contents are undefined, the results of display() are unpredictable. - * - * -Brian - */ - - -#include -#include - -#define YELLOWMAT 1 -#define BLUEMAT 2 - -void myinit (void) -{ - GLfloat yellow_diffuse[] = { 0.7, 0.7, 0.0, 1.0 }; - GLfloat yellow_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - - GLfloat blue_diffuse[] = { 0.1, 0.1, 0.7, 1.0 }; - GLfloat blue_specular[] = { 0.1, 1.0, 1.0, 1.0 }; - - GLfloat position_one[] = { 1.0, 1.0, 1.0, 0.0 }; - - glNewList(YELLOWMAT, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_DIFFUSE, yellow_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, yellow_specular); - glMaterialf(GL_FRONT, GL_SHININESS, 64.0); - glEndList(); - - glNewList(BLUEMAT, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_DIFFUSE, blue_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, blue_specular); - glMaterialf(GL_FRONT, GL_SHININESS, 45.0); - glEndList(); - - glLightfv(GL_LIGHT0, GL_POSITION, position_one); - - glEnable(GL_LIGHT0); - glEnable(GL_LIGHTING); - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); - - glClearStencil(0x0); - glEnable(GL_STENCIL_TEST); - -} - -/* Draw a sphere in a diamond-shaped section in the - * middle of a window with 2 tori. - */ -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glStencilOp (GL_KEEP, GL_KEEP, GL_KEEP); - -/* draw blue sphere where the stencil is 1 */ - glStencilFunc (GL_EQUAL, 0x1, 0x1); - glCallList (BLUEMAT); - glutSolidSphere (0.5, 15, 15); - -/* draw the tori where the stencil is not 1 */ - glStencilFunc (GL_NOTEQUAL, 0x1, 0x1); - glPushMatrix(); - glRotatef (45.0, 0.0, 0.0, 1.0); - glRotatef (45.0, 0.0, 1.0, 0.0); - glCallList (YELLOWMAT); - glutSolidTorus (0.275, 0.85, 15, 15); - glPushMatrix(); - glRotatef (90.0, 1.0, 0.0, 0.0); - glutSolidTorus (0.275, 0.85, 15, 15); - glPopMatrix(); - glPopMatrix(); - - glFlush(); - glutSwapBuffers(); -} - -/* Whenever the window is reshaped, redefine the - * coordinate system and redraw the stencil area. - */ -void myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - - glClear(GL_STENCIL_BUFFER_BIT); -/* create a diamond shaped stencil area */ - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-3.0, 3.0, -3.0, 3.0, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - glStencilFunc (GL_ALWAYS, 0x1, 0x1); - glStencilOp (GL_REPLACE, GL_REPLACE, GL_REPLACE); - glBegin(GL_QUADS); - glVertex3f (-1.0, 0.0, 0.0); - glVertex3f (0.0, 1.0, 0.0); - glVertex3f (1.0, 0.0, 0.0); - glVertex3f (0.0, -1.0, 0.0); - glEnd(); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(45.0, (GLfloat) w/(GLfloat) h, 3.0, 7.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -5.0); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL); - glutInitWindowSize (400, 400); - glutCreateWindow (argv[0]); - myinit (); - glutReshapeFunc (myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/stroke.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/stroke.c deleted file mode 100644 index 19b0391cba..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/stroke.c +++ /dev/null @@ -1,195 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* - * stroke.c - * This program demonstrates some characters of a - * stroke (vector) font. The characters are represented - * by display lists, which are given numbers which - * correspond to the ASCII values of the characters. - * Use of glCallLists() is demonstrated. - */ -#include -#include -#include - -#define PT 1 -#define STROKE 2 -#define END 3 - -typedef struct charpoint { - GLfloat x, y; - int type; -} CP; - -CP Adata[] = { - { 0, 0, PT}, {0, 9, PT}, {1, 10, PT}, {4, 10, PT}, - {5, 9, PT}, {5, 0, STROKE}, {0, 5, PT}, {5, 5, END} -}; - -CP Edata[] = { - {5, 0, PT}, {0, 0, PT}, {0, 10, PT}, {5, 10, STROKE}, - {0, 5, PT}, {4, 5, END} -}; - -CP Pdata[] = { - {0, 0, PT}, {0, 10, PT}, {4, 10, PT}, {5, 9, PT}, {5, 6, PT}, - {4, 5, PT}, {0, 5, END} -}; - -CP Rdata[] = { - {0, 0, PT}, {0, 10, PT}, {4, 10, PT}, {5, 9, PT}, {5, 6, PT}, - {4, 5, PT}, {0, 5, STROKE}, {3, 5, PT}, {5, 0, END} -}; - -CP Sdata[] = { - {0, 1, PT}, {1, 0, PT}, {4, 0, PT}, {5, 1, PT}, {5, 4, PT}, - {4, 5, PT}, {1, 5, PT}, {0, 6, PT}, {0, 9, PT}, {1, 10, PT}, - {4, 10, PT}, {5, 9, END} -}; - -/* drawLetter() interprets the instructions from the array - * for that letter and renders the letter with line segments. - */ -void drawLetter(CP *l) -{ - glBegin(GL_LINE_STRIP); - for (;;) { - switch (l->type) { - case PT: - glVertex2fv(&l->x); - break; - case STROKE: - glVertex2fv(&l->x); - glEnd(); - glBegin(GL_LINE_STRIP); - break; - case END: - glVertex2fv(&l->x); - glEnd(); - glTranslatef(8.0, 0.0, 0.0); - return; - } - l++; - } -} - -/* Create a display list for each of 6 characters */ -void myinit (void) -{ - GLuint base; - - glShadeModel (GL_FLAT); - - base = glGenLists (128); - glListBase(base); - glNewList(base+'A', GL_COMPILE); drawLetter(Adata); glEndList(); - glNewList(base+'E', GL_COMPILE); drawLetter(Edata); glEndList(); - glNewList(base+'P', GL_COMPILE); drawLetter(Pdata); glEndList(); - glNewList(base+'R', GL_COMPILE); drawLetter(Rdata); glEndList(); - glNewList(base+'S', GL_COMPILE); drawLetter(Sdata); glEndList(); - glNewList(base+' ', GL_COMPILE); glTranslatef(8.0, 0.0, 0.0); glEndList(); -} - -char *test1 = "A SPARE SERAPE APPEARS AS"; -char *test2 = "APES PREPARE RARE PEPPERS"; - -void printStrokedString(char *s) -{ - GLsizei len = (GLsizei) strlen(s); - glCallLists(len, GL_BYTE, (GLbyte *)s); -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT); - glColor3f(1.0, 1.0, 1.0); - glPushMatrix(); - glScalef(2.0, 2.0, 2.0); - glTranslatef(10.0, 30.0, 0.0); - printStrokedString(test1); - glPopMatrix(); - glPushMatrix(); - glScalef(2.0, 2.0, 2.0); - glTranslatef(10.0, 13.0, 0.0); - printStrokedString(test2); - glPopMatrix(); - glFlush(); -} - -static void reshape(GLsizei w, GLsizei h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(0.0, (GLdouble)w, 0.0, (GLdouble)h, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (440, 120); - glutCreateWindow (argv[0]); - myinit (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/surface.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/surface.c deleted file mode 100644 index e33ce14f4f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/surface.c +++ /dev/null @@ -1,232 +0,0 @@ -/* aux2glut conversion Copyright (c) Mark J. Kilgard, 1994, 1995 */ - -/** - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/** - * surface.c - * This program draws a NURBS surface in the shape of a - * symmetrical hill. - */ -#include -#include - -GLfloat ctlpoints[4][4][3]; -int showPoints = 0; - -GLUnurbsObj *theNurb; - -/* - * Initializes the control points of the surface to a small hill. - * The control points range from -3 to +3 in x, y, and z - */ -void init_surface(void) -{ - int u, v; - for (u = 0; u < 4; u++) { - for (v = 0; v < 4; v++) { - ctlpoints[u][v][0] = 2.0*((GLfloat)u - 1.5); - ctlpoints[u][v][1] = 2.0*((GLfloat)v - 1.5); - - if ( (u == 1 || u == 2) && (v == 1 || v == 2)) - ctlpoints[u][v][2] = 7.0; - else - ctlpoints[u][v][2] = -3.0; - } - } -} - -/* Initialize material property and depth buffer. - */ -void myinit(void) -{ - GLfloat mat_diffuse[] = { 0.7, 0.7, 0.7, 1.0 }; - GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat mat_shininess[] = { 100.0 }; - - glClearColor (0.0, 0.0, 0.0, 1.0); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); - glEnable(GL_AUTO_NORMAL); - glEnable(GL_NORMALIZE); - - init_surface(); - - theNurb = gluNewNurbsRenderer(); - gluNurbsProperty(theNurb, GLU_SAMPLING_TOLERANCE, 25.0); - gluNurbsProperty(theNurb, GLU_DISPLAY_MODE, GLU_FILL); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef (0.0, 0.0, -5.0); -} - -void display(void) -{ - GLfloat knots[8] = {0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0}; - int i, j; - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - glRotatef(330.0, 1.,0.,0.); - glScalef (0.25, 0.25, 0.25); - - gluBeginSurface(theNurb); - gluNurbsSurface(theNurb, - 8, knots, - 8, knots, - 4 * 3, - 3, - &ctlpoints[0][0][0], - 4, 4, - GL_MAP2_VERTEX_3); - gluEndSurface(theNurb); - - if(showPoints) { - glPointSize(5.0); - glDisable(GL_LIGHTING); - glColor3f(1.0, 1.0, 0.0); - glBegin(GL_POINTS); - for(i=0;i<4;i++) { - for(j=0;j<4;j++) { - glVertex3f(ctlpoints[i][j][0], ctlpoints[i][j][1], ctlpoints[i][j][2]); - } - } - glEnd(); - glEnable(GL_LIGHTING); - } - - glPopMatrix(); - glutSwapBuffers(); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective (45.0, (GLdouble)w/(GLdouble)h, 3.0, 8.0); - - glMatrixMode(GL_MODELVIEW); -} - -void -menu(int value) -{ - switch (value) { - case 0: - case 1: - showPoints = value; - break; - case 2: - gluNurbsProperty(theNurb, GLU_DISPLAY_MODE, GLU_FILL); - break; - case 3: - gluNurbsProperty(theNurb, GLU_DISPLAY_MODE, GLU_OUTLINE_POLYGON); - break; - } - glutPostRedisplay(); -} - -int down = 0, lastx; - -/* ARGSUSED1 */ -void -motion(int x, int y) -{ - if (down) { - glRotatef(lastx - x, 0, 1, 0); - lastx = x; - glutPostRedisplay(); - } -} - -/* ARGSUSED3 */ -void -mouse(int button, int state, int x, int y) -{ - if (button == GLUT_LEFT_BUTTON) { - if (state == GLUT_DOWN) { - lastx = x; - down = 1; - } else { - down = 0; - } - } -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop */ -int -main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGB); - glutCreateWindow(argv[0]); - myinit(); - glutReshapeFunc(reshape); - glutDisplayFunc(display); - glutCreateMenu(menu); - glutAddMenuEntry("Show control points", 1); - glutAddMenuEntry("Hide control points", 0); - glutAddMenuEntry("Solid", 2); - glutAddMenuEntry("Wireframe", 3); - glutAttachMenu(GLUT_RIGHT_BUTTON); - glutMouseFunc(mouse); - glutMotionFunc(motion); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/teaambient.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/teaambient.c deleted file mode 100644 index 53b5111752..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/teaambient.c +++ /dev/null @@ -1,162 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/** - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/** - * teaambient.c - * This program renders three lighted, shaded teapots, with - * different ambient values. - */ -#include -#include - -/* Initialize light source and lighting model. - */ -void -myinit(void) -{ - GLfloat light_ambient[] = - {0.0, 0.0, 0.0, 1.0}; - GLfloat light_diffuse[] = - {1.0, 1.0, 1.0, 1.0}; - GLfloat light_specular[] = - {1.0, 1.0, 1.0, 1.0}; -/* light_position is NOT default value */ - GLfloat light_position[] = - {1.0, 0.0, 0.0, 0.0}; - GLfloat global_ambient[] = - {0.75, 0.75, 0.75, 1.0}; - - glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); - glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); - glLightfv(GL_LIGHT0, GL_POSITION, light_position); - - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, global_ambient); - - glFrontFace(GL_CW); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_AUTO_NORMAL); - glEnable(GL_NORMALIZE); - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); -} - -void -display(void) -{ - GLfloat low_ambient[] = - {0.1, 0.1, 0.1, 1.0}; - GLfloat more_ambient[] = - {0.4, 0.4, 0.4, 1.0}; - GLfloat most_ambient[] = - {1.0, 1.0, 1.0, 1.0}; - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - /* material has small ambient reflection */ - glMaterialfv(GL_FRONT, GL_AMBIENT, low_ambient); - glMaterialf(GL_FRONT, GL_SHININESS, 40.0); - glPushMatrix(); - glTranslatef(0.0, 2.0, 0.0); - glutSolidTeapot(1.0); - glPopMatrix(); - - /* material has moderate ambient reflection */ - glMaterialfv(GL_FRONT, GL_AMBIENT, more_ambient); - glPushMatrix(); - glTranslatef(0.0, 0.0, 0.0); - glutSolidTeapot(1.0); - glPopMatrix(); - - /* material has large ambient reflection */ - glMaterialfv(GL_FRONT, GL_AMBIENT, most_ambient); - glPushMatrix(); - glTranslatef(0.0, -2.0, 0.0); - glutSolidTeapot(1.0); - glPopMatrix(); - glFlush(); -} - -void -myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho(-4.0, 4.0, -4.0 * (GLfloat) h / (GLfloat) w, - 4.0 * (GLfloat) h / (GLfloat) w, -10.0, 10.0); - else - glOrtho(-4.0 * (GLfloat) w / (GLfloat) h, - 4.0 * (GLfloat) w / (GLfloat) h, -4.0, 4.0, -10.0, 10.0); - glMatrixMode(GL_MODELVIEW); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - */ -int -main(int argc, char **argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize(500, 500); - glutCreateWindow(argv[0]); - myinit(); - glutReshapeFunc(myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/teapots.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/teapots.c deleted file mode 100644 index fb7aed380e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/teapots.c +++ /dev/null @@ -1,220 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/** - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/** - * teapots.c - * This program demonstrates lots of material properties. - * A single light source illuminates the objects. - */ -#include -#include - -/* - * Initialize depth buffer, projection matrix, light source, and lighting - * model. Do not specify a material property here. - */ -void -myinit(void) -{ - GLfloat ambient[] = - {0.0, 0.0, 0.0, 1.0}; - GLfloat diffuse[] = - {1.0, 1.0, 1.0, 1.0}; - GLfloat position[] = - {0.0, 3.0, 3.0, 0.0}; - - GLfloat lmodel_ambient[] = - {0.2, 0.2, 0.2, 1.0}; - GLfloat local_view[] = - {0.0}; - - glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse); - glLightfv(GL_LIGHT0, GL_POSITION, position); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); - glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, local_view); - - glFrontFace(GL_CW); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_AUTO_NORMAL); - glEnable(GL_NORMALIZE); - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_LESS); -} - -/* - * Move object into position. Use 3rd through 12th parameters to specify the - * material property. Draw a teapot. - */ -void -renderTeapot(GLfloat x, GLfloat y, - GLfloat ambr, GLfloat ambg, GLfloat ambb, - GLfloat difr, GLfloat difg, GLfloat difb, - GLfloat specr, GLfloat specg, GLfloat specb, GLfloat shine) -{ - float mat[4]; - - glPushMatrix(); - glTranslatef(x, y, 0.0); - mat[0] = ambr; - mat[1] = ambg; - mat[2] = ambb; - mat[3] = 1.0; - glMaterialfv(GL_FRONT, GL_AMBIENT, mat); - mat[0] = difr; - mat[1] = difg; - mat[2] = difb; - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat); - mat[0] = specr; - mat[1] = specg; - mat[2] = specb; - glMaterialfv(GL_FRONT, GL_SPECULAR, mat); - glMaterialf(GL_FRONT, GL_SHININESS, shine * 128.0); - glutSolidTeapot(1.0); - glPopMatrix(); -} - -/** - * First column: emerald, jade, obsidian, pearl, ruby, turquoise - * 2nd column: brass, bronze, chrome, copper, gold, silver - * 3rd column: black, cyan, green, red, white, yellow plastic - * 4th column: black, cyan, green, red, white, yellow rubber - */ -void -display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - renderTeapot(2.0, 17.0, 0.0215, 0.1745, 0.0215, - 0.07568, 0.61424, 0.07568, 0.633, 0.727811, 0.633, 0.6); - renderTeapot(2.0, 14.0, 0.135, 0.2225, 0.1575, - 0.54, 0.89, 0.63, 0.316228, 0.316228, 0.316228, 0.1); - renderTeapot(2.0, 11.0, 0.05375, 0.05, 0.06625, - 0.18275, 0.17, 0.22525, 0.332741, 0.328634, 0.346435, 0.3); - renderTeapot(2.0, 8.0, 0.25, 0.20725, 0.20725, - 1, 0.829, 0.829, 0.296648, 0.296648, 0.296648, 0.088); - renderTeapot(2.0, 5.0, 0.1745, 0.01175, 0.01175, - 0.61424, 0.04136, 0.04136, 0.727811, 0.626959, 0.626959, 0.6); - renderTeapot(2.0, 2.0, 0.1, 0.18725, 0.1745, - 0.396, 0.74151, 0.69102, 0.297254, 0.30829, 0.306678, 0.1); - renderTeapot(6.0, 17.0, 0.329412, 0.223529, 0.027451, - 0.780392, 0.568627, 0.113725, 0.992157, 0.941176, 0.807843, - 0.21794872); - renderTeapot(6.0, 14.0, 0.2125, 0.1275, 0.054, - 0.714, 0.4284, 0.18144, 0.393548, 0.271906, 0.166721, 0.2); - renderTeapot(6.0, 11.0, 0.25, 0.25, 0.25, - 0.4, 0.4, 0.4, 0.774597, 0.774597, 0.774597, 0.6); - renderTeapot(6.0, 8.0, 0.19125, 0.0735, 0.0225, - 0.7038, 0.27048, 0.0828, 0.256777, 0.137622, 0.086014, 0.1); - renderTeapot(6.0, 5.0, 0.24725, 0.1995, 0.0745, - 0.75164, 0.60648, 0.22648, 0.628281, 0.555802, 0.366065, 0.4); - renderTeapot(6.0, 2.0, 0.19225, 0.19225, 0.19225, - 0.50754, 0.50754, 0.50754, 0.508273, 0.508273, 0.508273, 0.4); - renderTeapot(10.0, 17.0, 0.0, 0.0, 0.0, 0.01, 0.01, 0.01, - 0.50, 0.50, 0.50, .25); - renderTeapot(10.0, 14.0, 0.0, 0.1, 0.06, 0.0, 0.50980392, 0.50980392, - 0.50196078, 0.50196078, 0.50196078, .25); - renderTeapot(10.0, 11.0, 0.0, 0.0, 0.0, - 0.1, 0.35, 0.1, 0.45, 0.55, 0.45, .25); - renderTeapot(10.0, 8.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, - 0.7, 0.6, 0.6, .25); - renderTeapot(10.0, 5.0, 0.0, 0.0, 0.0, 0.55, 0.55, 0.55, - 0.70, 0.70, 0.70, .25); - renderTeapot(10.0, 2.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, - 0.60, 0.60, 0.50, .25); - renderTeapot(14.0, 17.0, 0.02, 0.02, 0.02, 0.01, 0.01, 0.01, - 0.4, 0.4, 0.4, .078125); - renderTeapot(14.0, 14.0, 0.0, 0.05, 0.05, 0.4, 0.5, 0.5, - 0.04, 0.7, 0.7, .078125); - renderTeapot(14.0, 11.0, 0.0, 0.05, 0.0, 0.4, 0.5, 0.4, - 0.04, 0.7, 0.04, .078125); - renderTeapot(14.0, 8.0, 0.05, 0.0, 0.0, 0.5, 0.4, 0.4, - 0.7, 0.04, 0.04, .078125); - renderTeapot(14.0, 5.0, 0.05, 0.05, 0.05, 0.5, 0.5, 0.5, - 0.7, 0.7, 0.7, .078125); - renderTeapot(14.0, 2.0, 0.05, 0.05, 0.0, 0.5, 0.5, 0.4, - 0.7, 0.7, 0.04, .078125); - glFlush(); -} - -void -myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho(0.0, 16.0, 0.0, 18.0 * (GLfloat) h / (GLfloat) w, - -10.0, 10.0); - else - glOrtho(0.0, 16.0 * (GLfloat) w / (GLfloat) h, 0.0, 18.0, - -10.0, 10.0); - glMatrixMode(GL_MODELVIEW); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -/* - * Main Loop Open window with initial window size, title bar, RGBA display - * mode, and handle input events. - */ -int -main(int argc, char **argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutCreateWindow(argv[0]); - myinit(); - glutReshapeFunc(myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/tess.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/tess.c deleted file mode 100644 index 238a469aff..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/tess.c +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * tess.c - * This program demonstrates polygon tessellation. - * Two tesselated objects are drawn. The first is a - * rectangle with a triangular hole. The second is a - * smooth shaded, self-intersecting star. - * - * Note the exterior rectangle is drawn with its vertices - * in counter-clockwise order, but its interior clockwise. - * Note the combineCallback is needed for the self-intersecting - * star. Also note that removing the TessProperty for the - * star will make the interior unshaded (WINDING_ODD). - */ -#include -#include -#include - -#ifdef GLU_VERSION_1_2 - -/* Win32 calling conventions. */ -#ifndef CALLBACK -#define CALLBACK -#endif - -GLuint startList; - -void display (void) { - glClear(GL_COLOR_BUFFER_BIT); - glColor3f(1.0, 1.0, 1.0); - glCallList(startList); - glCallList(startList + 1); - glFlush(); -} - -void CALLBACK beginCallback(GLenum which) -{ - glBegin(which); -} - -void CALLBACK errorCallback(GLenum errorCode) -{ - const GLubyte *estring; - - estring = gluErrorString(errorCode); - fprintf(stderr, "Tessellation Error: %s\n", (char *) estring); - exit(0); -} - -void CALLBACK endCallback(void) -{ - glEnd(); -} - -void CALLBACK vertexCallback(GLvoid *vertex) -{ - const GLdouble *pointer; - - pointer = (GLdouble *) vertex; - glColor3dv(pointer+3); - glVertex3dv(pointer); -} - -/* combineCallback is used to create a new vertex when edges - * intersect. coordinate location is trivial to calculate, - * but weight[4] may be used to average color, normal, or texture - * coordinate data. In this program, color is weighted. - */ -void CALLBACK combineCallback(GLdouble coords[3], - GLdouble *vertex_data[4], - GLfloat weight[4], GLdouble **dataOut ) -{ - GLdouble *vertex; - int i; - - vertex = (GLdouble *) malloc(6 * sizeof(GLdouble)); - - vertex[0] = coords[0]; - vertex[1] = coords[1]; - vertex[2] = coords[2]; - for (i = 3; i < 6; i++) - vertex[i] = weight[0] * vertex_data[0][i] - + weight[1] * vertex_data[1][i] - + weight[2] * vertex_data[2][i] - + weight[3] * vertex_data[3][i]; - *dataOut = vertex; -} - -void init (void) -{ - GLUtesselator *tobj; - GLdouble rect[4][3] = {{50.0, 50.0, 0.0}, - {200.0, 50.0, 0.0}, - {200.0, 200.0, 0.0}, - {50.0, 200.0, 0.0}}; - GLdouble tri[3][3] = {{75.0, 75.0, 0.0}, - {125.0, 175.0, 0.0}, - {175.0, 75.0, 0.0}}; - GLdouble star[5][6] = {{250.0, 50.0, 0.0, 1.0, 0.0, 1.0}, - {325.0, 200.0, 0.0, 1.0, 1.0, 0.0}, - {400.0, 50.0, 0.0, 0.0, 1.0, 1.0}, - {250.0, 150.0, 0.0, 1.0, 0.0, 0.0}, - {400.0, 150.0, 0.0, 0.0, 1.0, 0.0}}; - - glClearColor(0.0, 0.0, 0.0, 0.0); - - startList = glGenLists(2); - - tobj = gluNewTess(); - gluTessCallback(tobj, GLU_TESS_VERTEX, - (GLvoid (CALLBACK*) ()) &glVertex3dv); - gluTessCallback(tobj, GLU_TESS_BEGIN, - (GLvoid (CALLBACK*) ()) &beginCallback); - gluTessCallback(tobj, GLU_TESS_END, - (GLvoid (CALLBACK*) ()) &endCallback); - gluTessCallback(tobj, GLU_TESS_ERROR, - (GLvoid (CALLBACK*) ()) &errorCallback); - - /* rectangle with triangular hole inside */ - glNewList(startList, GL_COMPILE); - glShadeModel(GL_FLAT); - gluTessBeginPolygon(tobj, NULL); - gluTessBeginContour(tobj); - gluTessVertex(tobj, rect[0], rect[0]); - gluTessVertex(tobj, rect[1], rect[1]); - gluTessVertex(tobj, rect[2], rect[2]); - gluTessVertex(tobj, rect[3], rect[3]); - gluTessEndContour(tobj); - gluTessBeginContour(tobj); - gluTessVertex(tobj, tri[0], tri[0]); - gluTessVertex(tobj, tri[1], tri[1]); - gluTessVertex(tobj, tri[2], tri[2]); - gluTessEndContour(tobj); - gluTessEndPolygon(tobj); - glEndList(); - - gluTessCallback(tobj, GLU_TESS_VERTEX, - (GLvoid (CALLBACK*) ()) &vertexCallback); - gluTessCallback(tobj, GLU_TESS_BEGIN, - (GLvoid (CALLBACK*) ()) &beginCallback); - gluTessCallback(tobj, GLU_TESS_END, - (GLvoid (CALLBACK*) ()) &endCallback); - gluTessCallback(tobj, GLU_TESS_ERROR, - (GLvoid (CALLBACK*) ()) &errorCallback); - gluTessCallback(tobj, GLU_TESS_COMBINE, - (GLvoid (CALLBACK*) ()) &combineCallback); - - /* smooth shaded, self-intersecting star */ - glNewList(startList + 1, GL_COMPILE); - glShadeModel(GL_SMOOTH); - gluTessProperty(tobj, GLU_TESS_WINDING_RULE, - GLU_TESS_WINDING_POSITIVE); - gluTessBeginPolygon(tobj, NULL); - gluTessBeginContour(tobj); - gluTessVertex(tobj, star[0], star[0]); - gluTessVertex(tobj, star[1], star[1]); - gluTessVertex(tobj, star[2], star[2]); - gluTessVertex(tobj, star[3], star[3]); - gluTessVertex(tobj, star[4], star[4]); - gluTessEndContour(tobj); - gluTessEndPolygon(tobj); - glEndList(); - gluDeleteTess(tobj); -} - -void reshape (int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(0.0, (GLdouble) w, 0.0, (GLdouble) h); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize(500, 500); - glutCreateWindow(argv[0]); - init(); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} - -#else -int main(int argc, char** argv) -{ - fprintf (stderr, "This program demonstrates the new tesselator API in GLU 1.2.\n"); - fprintf (stderr, "Your GLU library does not support this new interface, sorry.\n"); - return 0; -} -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/tesswind.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/tesswind.c deleted file mode 100644 index 7d00c9f907..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/tesswind.c +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * tesswind.c - * This program demonstrates the winding rule polygon - * tessellation property. Four tessellated objects are drawn, - * each with very different contours. When the w key is pressed, - * the objects are drawn with a different winding rule. - */ -#include -#include -#include - -#ifdef GLU_VERSION_1_2 - -/* Win32 calling conventions. */ -#ifndef CALLBACK -#define CALLBACK -#endif - -GLdouble currentWinding = GLU_TESS_WINDING_ODD; -int currentShape = 0; -GLUtesselator *tobj; -GLuint list; - -/* Make four display lists, - * each with a different tessellated object. - */ -void makeNewLists (void) { - int i; - static GLdouble rects[12][3] = - {{ 50.0, 50.0, 0.0}, {300.0, 50.0, 0.0}, - {300.0, 300.0, 0.0}, { 50.0, 300.0, 0.0}, - {100.0, 100.0, 0.0}, {250.0, 100.0, 0.0}, - {250.0, 250.0, 0.0}, {100.0, 250.0, 0.0}, - {150.0, 150.0, 0.0}, {200.0, 150.0, 0.0}, - {200.0, 200.0, 0.0}, {150.0, 200.0, 0.0}}; - static GLdouble spiral[16][3] = - {{400.0, 250.0, 0.0}, {400.0, 50.0, 0.0}, - { 50.0, 50.0, 0.0}, { 50.0, 400.0, 0.0}, - {350.0, 400.0, 0.0}, {350.0, 100.0, 0.0}, - {100.0, 100.0, 0.0}, {100.0, 350.0, 0.0}, - {300.0, 350.0, 0.0}, {300.0, 150.0, 0.0}, - {150.0, 150.0, 0.0}, {150.0, 300.0, 0.0}, - {250.0, 300.0, 0.0}, {250.0, 200.0, 0.0}, - {200.0, 200.0, 0.0}, {200.0, 250.0, 0.0}}; - static GLdouble quad1[4][3] = - {{ 50.0, 150.0, 0.0}, {350.0, 150.0, 0.0}, - {350.0, 200.0, 0.0}, { 50.0, 200.0, 0.0}}; - static GLdouble quad2[4][3] = - {{100.0, 100.0, 0.0}, {300.0, 100.0, 0.0}, - {300.0, 350.0, 0.0}, {100.0, 350.0, 0.0}}; - static GLdouble tri[3][3] = - {{200.0, 50.0, 0.0}, {250.0, 300.0, 0.0}, - {150.0, 300.0, 0.0}}; - - gluTessProperty(tobj, GLU_TESS_WINDING_RULE, - currentWinding); - - glNewList(list, GL_COMPILE); - gluTessBeginPolygon(tobj, NULL); - gluTessBeginContour(tobj); - for (i = 0; i < 4; i++) - gluTessVertex(tobj, rects[i], rects[i]); - gluTessEndContour(tobj); - gluTessBeginContour(tobj); - for (i = 4; i < 8; i++) - gluTessVertex(tobj, rects[i], rects[i]); - gluTessEndContour(tobj); - gluTessBeginContour(tobj); - for (i = 8; i < 12; i++) - gluTessVertex(tobj, rects[i], rects[i]); - gluTessEndContour(tobj); - gluTessEndPolygon(tobj); - glEndList(); - - glNewList(list+1, GL_COMPILE); - gluTessBeginPolygon(tobj, NULL); - gluTessBeginContour(tobj); - for (i = 0; i < 4; i++) - gluTessVertex(tobj, rects[i], rects[i]); - gluTessEndContour(tobj); - gluTessBeginContour(tobj); - for (i = 7; i >= 4; i--) - gluTessVertex(tobj, rects[i], rects[i]); - gluTessEndContour(tobj); - gluTessBeginContour(tobj); - for (i = 11; i >= 8; i--) - gluTessVertex(tobj, rects[i], rects[i]); - gluTessEndContour(tobj); - gluTessEndPolygon(tobj); - glEndList(); - - glNewList(list+2, GL_COMPILE); - gluTessBeginPolygon(tobj, NULL); - gluTessBeginContour(tobj); - for (i = 0; i < 16; i++) - gluTessVertex(tobj, spiral[i], spiral[i]); - gluTessEndContour(tobj); - gluTessEndPolygon(tobj); - glEndList(); - - glNewList(list+3, GL_COMPILE); - gluTessBeginPolygon(tobj, NULL); - gluTessBeginContour(tobj); - for (i = 0; i < 4; i++) - gluTessVertex(tobj, quad1[i], quad1[i]); - gluTessEndContour(tobj); - gluTessBeginContour(tobj); - for (i = 0; i < 4; i++) - gluTessVertex(tobj, quad2[i], quad2[i]); - gluTessEndContour(tobj); - gluTessBeginContour(tobj); - for (i = 0; i < 3; i++) - gluTessVertex(tobj, tri[i], tri[i]); - gluTessEndContour(tobj); - gluTessEndPolygon(tobj); - glEndList(); -} - -void display (void) { - glClear(GL_COLOR_BUFFER_BIT); - glColor3f(1.0, 1.0, 1.0); - glPushMatrix(); - glCallList(list); - glTranslatef(0.0, 500.0, 0.0); - glCallList(list+1); - glTranslatef(500.0, -500.0, 0.0); - glCallList(list+2); - glTranslatef(0.0, 500.0, 0.0); - glCallList(list+3); - glPopMatrix(); - glFlush(); -} - -void CALLBACK beginCallback(GLenum which) -{ - glBegin(which); -} - -void CALLBACK errorCallback(GLenum errorCode) -{ - const GLubyte *estring; - - estring = gluErrorString(errorCode); - fprintf(stderr, "Tessellation Error: %s\n", (char *) estring); - exit(0); -} - -void CALLBACK endCallback(void) -{ - glEnd(); -} - -/* combineCallback is used to create a new vertex when edges - * intersect. coordinate location is trivial to calculate, - * but weight[4] may be used to average color, normal, or texture - * coordinate data. - */ -/* ARGSUSED */ -void CALLBACK combineCallback(GLdouble coords[3], GLdouble *data[4], - GLfloat weight[4], GLdouble **dataOut ) -{ - GLdouble *vertex; - vertex = (GLdouble *) malloc(3 * sizeof(GLdouble)); - - vertex[0] = coords[0]; - vertex[1] = coords[1]; - vertex[2] = coords[2]; - *dataOut = vertex; -} - -void init(void) -{ - glClearColor(0.0, 0.0, 0.0, 0.0); - glShadeModel(GL_FLAT); - - tobj = gluNewTess(); - gluTessCallback(tobj, GLU_TESS_VERTEX, - (GLvoid (CALLBACK*) ()) &glVertex3dv); - gluTessCallback(tobj, GLU_TESS_BEGIN, - (GLvoid (CALLBACK*) ()) &beginCallback); - gluTessCallback(tobj, GLU_TESS_END, - (GLvoid (CALLBACK*) ()) &endCallback); - gluTessCallback(tobj, GLU_TESS_ERROR, - (GLvoid (CALLBACK*) ()) &errorCallback); - gluTessCallback(tobj, GLU_TESS_COMBINE, - (GLvoid (CALLBACK*) ()) &combineCallback); - - list = glGenLists(4); - makeNewLists(); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - gluOrtho2D(0.0, 1000.0, 0.0, 1000.0 * (GLdouble)h/(GLdouble)w); - else - gluOrtho2D(0.0, 1000.0 * (GLdouble)w/(GLdouble)h, 0.0, 1000.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 'w': - case 'W': - if (currentWinding == GLU_TESS_WINDING_ODD) - currentWinding = GLU_TESS_WINDING_NONZERO; - else if (currentWinding == GLU_TESS_WINDING_NONZERO) - currentWinding = GLU_TESS_WINDING_POSITIVE; - else if (currentWinding == GLU_TESS_WINDING_POSITIVE) - currentWinding = GLU_TESS_WINDING_NEGATIVE; - else if (currentWinding == GLU_TESS_WINDING_NEGATIVE) - currentWinding = GLU_TESS_WINDING_ABS_GEQ_TWO; - else if (currentWinding == GLU_TESS_WINDING_ABS_GEQ_TWO) - currentWinding = GLU_TESS_WINDING_ODD; - makeNewLists(); - glutPostRedisplay(); - break; - case 27: - exit(0); - break; - default: - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize(500, 500); - glutCreateWindow(argv[0]); - init(); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} - -#else -int main(int argc, char** argv) -{ - fprintf (stderr, "This program demonstrates the new tesselator API in GLU 1.2.\n"); - fprintf (stderr, "Your GLU library does not support this new interface, sorry.\n"); - return 0; -} -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/texbind.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/texbind.c deleted file mode 100644 index 6a828ab2bd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/texbind.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* texbind.c - * This program demonstrates using glBindTexture() by - * creating and managing two textures. - */ -#include -#include -#include - -#ifdef GL_VERSION_1_1 -/* Create checkerboard texture */ -#define checkImageWidth 64 -#define checkImageHeight 64 -static GLubyte checkImage[checkImageHeight][checkImageWidth][4]; -static GLubyte otherImage[checkImageHeight][checkImageWidth][4]; - -static GLuint texName[2]; - -void makeCheckImages(void) -{ - int i, j, c; - - for (i = 0; i < checkImageHeight; i++) { - for (j = 0; j < checkImageWidth; j++) { - c = ((((i&0x8)==0)^((j&0x8)==0)))*255; - checkImage[i][j][0] = (GLubyte) c; - checkImage[i][j][1] = (GLubyte) c; - checkImage[i][j][2] = (GLubyte) c; - checkImage[i][j][3] = (GLubyte) 255; - c = ((((i&0x10)==0)^((j&0x10)==0)))*255; - otherImage[i][j][0] = (GLubyte) c; - otherImage[i][j][1] = (GLubyte) 0; - otherImage[i][j][2] = (GLubyte) 0; - otherImage[i][j][3] = (GLubyte) 255; - } - } -} - -void init(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel(GL_FLAT); - glEnable(GL_DEPTH_TEST); - - makeCheckImages(); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - glGenTextures(2, texName); - glBindTexture(GL_TEXTURE_2D, texName[0]); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, - GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_NEAREST); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, checkImageWidth, - checkImageHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, - checkImage); - - glBindTexture(GL_TEXTURE_2D, texName[1]); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, checkImageWidth, - checkImageHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, - otherImage); - glEnable(GL_TEXTURE_2D); -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glBindTexture(GL_TEXTURE_2D, texName[0]); - glBegin(GL_QUADS); - glTexCoord2f(0.0, 0.0); glVertex3f(-2.0, -1.0, 0.0); - glTexCoord2f(0.0, 1.0); glVertex3f(-2.0, 1.0, 0.0); - glTexCoord2f(1.0, 1.0); glVertex3f(0.0, 1.0, 0.0); - glTexCoord2f(1.0, 0.0); glVertex3f(0.0, -1.0, 0.0); - glEnd(); - glBindTexture(GL_TEXTURE_2D, texName[1]); - glBegin(GL_QUADS); - glTexCoord2f(0.0, 0.0); glVertex3f(1.0, -1.0, 0.0); - glTexCoord2f(0.0, 1.0); glVertex3f(1.0, 1.0, 0.0); - glTexCoord2f(1.0, 1.0); glVertex3f(2.41421, 1.0, -1.41421); - glTexCoord2f(1.0, 0.0); glVertex3f(2.41421, -1.0, -1.41421); - glEnd(); - glFlush(); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(60.0, (GLfloat) w/(GLfloat) h, 1.0, 30.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -3.6); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize(250, 250); - glutInitWindowPosition(100, 100); - glutCreateWindow(argv[0]); - init(); - glutReshapeFunc(reshape); - glutDisplayFunc(display); - glutKeyboardFunc (keyboard); - glutMainLoop(); - return 0; -} -#else -int main(int argc, char** argv) -{ - fprintf (stderr, "This program demonstrates a feature which is not in OpenGL Version 1.0.\n"); - fprintf (stderr, "If your implementation of OpenGL Version 1.0 has the right extensions,\n"); - fprintf (stderr, "you may be able to modify this program to make it run.\n"); - return 0; -} -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/texgen.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/texgen.c deleted file mode 100644 index 7c1802a3be..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/texgen.c +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* texgen.c - * This program draws a texture mapped teapot with - * automatically generated texture coordinates. The - * texture is rendered as stripes on the teapot. - * Initially, the object is drawn with texture coordinates - * based upon the object coordinates of the vertex - * and distance from the plane x = 0. Pressing the 'e' - * key changes the coordinate generation to eye coordinates - * of the vertex. Pressing the 'o' key switches it back - * to the object coordinates. Pressing the 's' key - * changes the plane to a slanted one (x + y + z = 0). - * Pressing the 'x' key switches it back to x = 0. - */ - -#include -#include -#include - -#define stripeImageWidth 32 -GLubyte stripeImage[4*stripeImageWidth]; - -#ifdef GL_VERSION_1_1 -static GLuint texName; -#endif - -void makeStripeImage(void) -{ - int j; - - for (j = 0; j < stripeImageWidth; j++) { - stripeImage[4*j] = (GLubyte) ((j<=4) ? 255 : 0); - stripeImage[4*j+1] = (GLubyte) ((j>4) ? 255 : 0); - stripeImage[4*j+2] = (GLubyte) 0; - stripeImage[4*j+3] = (GLubyte) 255; - } -} - -/* planes for texture coordinate generation */ -static GLfloat xequalzero[] = {1.0, 0.0, 0.0, 0.0}; -static GLfloat slanted[] = {1.0, 1.0, 1.0, 0.0}; -static GLfloat *currentCoeff; -static GLenum currentPlane; -static GLint currentGenMode; - -void init(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glEnable(GL_DEPTH_TEST); - glShadeModel(GL_SMOOTH); - - makeStripeImage(); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - -#ifdef GL_VERSION_1_1 - glGenTextures(1, &texName); - glBindTexture(GL_TEXTURE_1D, texName); -#endif - glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); -#ifdef GL_VERSION_1_1 - glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA, stripeImageWidth, 0, - GL_RGBA, GL_UNSIGNED_BYTE, stripeImage); -#else - glTexImage1D(GL_TEXTURE_1D, 0, 4, stripeImageWidth, 0, - GL_RGBA, GL_UNSIGNED_BYTE, stripeImage); -#endif - - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - currentCoeff = xequalzero; - currentGenMode = GL_OBJECT_LINEAR; - currentPlane = GL_OBJECT_PLANE; - glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, currentGenMode); - glTexGenfv(GL_S, currentPlane, currentCoeff); - - glEnable(GL_TEXTURE_GEN_S); - glEnable(GL_TEXTURE_1D); - glEnable(GL_CULL_FACE); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_AUTO_NORMAL); - glEnable(GL_NORMALIZE); - glFrontFace(GL_CW); - glCullFace(GL_BACK); - glMaterialf (GL_FRONT, GL_SHININESS, 64.0); -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix (); - glRotatef(45.0, 0.0, 0.0, 1.0); -#ifdef GL_VERSION_1_1 - glBindTexture(GL_TEXTURE_1D, texName); -#endif - glutSolidTeapot(2.0); - glPopMatrix (); - glFlush(); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho (-3.5, 3.5, -3.5*(GLfloat)h/(GLfloat)w, - 3.5*(GLfloat)h/(GLfloat)w, -3.5, 3.5); - else - glOrtho (-3.5*(GLfloat)w/(GLfloat)h, - 3.5*(GLfloat)w/(GLfloat)h, -3.5, 3.5, -3.5, 3.5); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -/* ARGSUSED1 */ -void keyboard (unsigned char key, int x, int y) -{ - switch (key) { - case 'e': - case 'E': - currentGenMode = GL_EYE_LINEAR; - currentPlane = GL_EYE_PLANE; - glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, currentGenMode); - glTexGenfv(GL_S, currentPlane, currentCoeff); - glutPostRedisplay(); - break; - case 'o': - case 'O': - currentGenMode = GL_OBJECT_LINEAR; - currentPlane = GL_OBJECT_PLANE; - glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, currentGenMode); - glTexGenfv(GL_S, currentPlane, currentCoeff); - glutPostRedisplay(); - break; - case 's': - case 'S': - currentCoeff = slanted; - glTexGenfv(GL_S, currentPlane, currentCoeff); - glutPostRedisplay(); - break; - case 'x': - case 'X': - currentCoeff = xequalzero; - glTexGenfv(GL_S, currentPlane, currentCoeff); - glutPostRedisplay(); - break; - case 27: - exit(0); - break; - default: - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize(256, 256); - glutInitWindowPosition(100, 100); - glutCreateWindow (argv[0]); - init (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/texprox.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/texprox.c deleted file mode 100644 index 6f1e853fac..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/texprox.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * texprox.c - * The brief program illustrates use of texture proxies. - * This program only prints out some messages about whether - * certain size textures are supported and then exits. - */ -#include -#include -#include - -#ifdef GL_VERSION_1_1 - -/* Microsoft OpenGL 1.1's forgets to define - GL_TEXTURE_INTERNAL_FORMAT. */ -#ifndef GL_TEXTURE_INTERNAL_FORMAT -#define GL_TEXTURE_INTERNAL_FORMAT GL_TEXTURE_COMPONENTS -#endif - -void init(void) -{ - GLint proxyComponents; - - putchar('\n'); - - glTexImage2D(GL_PROXY_TEXTURE_2D, 0, GL_RGBA8, - 64, 64, 0, - GL_RGBA, GL_UNSIGNED_BYTE, NULL); - glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, - GL_TEXTURE_INTERNAL_FORMAT, &proxyComponents); - printf ("Proxying 64x64 level 0 RGBA8 texture (level 0)\n"); - if (proxyComponents == GL_RGBA8) - printf ("proxy allocation succeeded\n"); - else - printf ("proxy allocation failed\n"); - putchar('\n'); - - glTexImage2D(GL_PROXY_TEXTURE_2D, 0, GL_RGBA16, - 2048, 2048, 0, - GL_RGBA, GL_UNSIGNED_SHORT, NULL); - glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, - GL_TEXTURE_INTERNAL_FORMAT, &proxyComponents); - printf ("Proxying 2048x2048 level 0 RGBA16 texture (big so unlikely to be supported)\n"); - if (proxyComponents == GL_RGBA16) - printf ("proxy allocation succeeded\n"); - else - printf ("proxy allocation failed\n"); - putchar('\n'); -} - -void display(void) -{ - exit(0); -} - -void reshape (int w, int h) -{ - glViewport (0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (500, 500); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutMainLoop(); - return 0; -} -#else -int main(int argc, char** argv) -{ - fprintf (stderr, "This program demonstrates a feature which is not in OpenGL Version 1.0.\n"); - fprintf (stderr, "If your implementation of OpenGL Version 1.0 has the right extensions,\n"); - fprintf (stderr, "you may be able to modify this program to make it run.\n"); - return 0; -} -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/texsub.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/texsub.c deleted file mode 100644 index 4e829675ab..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/texsub.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* texsub.c - * This program texture maps a checkerboard image onto - * two rectangles. This program clamps the texture, if - * the texture coordinates fall outside 0.0 and 1.0. - * If the s key is pressed, a texture subimage is used to - * alter the original texture. If the r key is pressed, - * the original texture is restored. - */ -#include -#include -#include - -#ifdef GL_VERSION_1_1 -/* Create checkerboard textures */ -#define checkImageWidth 64 -#define checkImageHeight 64 -#define subImageWidth 16 -#define subImageHeight 16 -static GLubyte checkImage[checkImageHeight][checkImageWidth][4]; -static GLubyte subImage[subImageHeight][subImageWidth][4]; - -static GLuint texName; - -void makeCheckImages(void) -{ - int i, j, c; - - for (i = 0; i < checkImageHeight; i++) { - for (j = 0; j < checkImageWidth; j++) { - c = ((((i&0x8)==0)^((j&0x8)==0)))*255; - checkImage[i][j][0] = (GLubyte) c; - checkImage[i][j][1] = (GLubyte) c; - checkImage[i][j][2] = (GLubyte) c; - checkImage[i][j][3] = (GLubyte) 255; - } - } - for (i = 0; i < subImageHeight; i++) { - for (j = 0; j < subImageWidth; j++) { - c = ((((i&0x4)==0)^((j&0x4)==0)))*255; - subImage[i][j][0] = (GLubyte) c; - subImage[i][j][1] = (GLubyte) 0; - subImage[i][j][2] = (GLubyte) 0; - subImage[i][j][3] = (GLubyte) 255; - } - } -} - -void init(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel(GL_FLAT); - glEnable(GL_DEPTH_TEST); - - makeCheckImages(); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - glGenTextures(1, &texName); - glBindTexture(GL_TEXTURE_2D, texName); - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, checkImageWidth, checkImageHeight, - 0, GL_RGBA, GL_UNSIGNED_BYTE, checkImage); -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glEnable(GL_TEXTURE_2D); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); - glBindTexture(GL_TEXTURE_2D, texName); - glBegin(GL_QUADS); - glTexCoord2f(0.0, 0.0); glVertex3f(-2.0, -1.0, 0.0); - glTexCoord2f(0.0, 1.0); glVertex3f(-2.0, 1.0, 0.0); - glTexCoord2f(1.0, 1.0); glVertex3f(0.0, 1.0, 0.0); - glTexCoord2f(1.0, 0.0); glVertex3f(0.0, -1.0, 0.0); - - glTexCoord2f(0.0, 0.0); glVertex3f(1.0, -1.0, 0.0); - glTexCoord2f(0.0, 1.0); glVertex3f(1.0, 1.0, 0.0); - glTexCoord2f(1.0, 1.0); glVertex3f(2.41421, 1.0, -1.41421); - glTexCoord2f(1.0, 0.0); glVertex3f(2.41421, -1.0, -1.41421); - glEnd(); - glFlush(); - glDisable(GL_TEXTURE_2D); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(60.0, (GLfloat) w/(GLfloat) h, 1.0, 30.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -3.6); -} - -/* ARGSUSED1 */ -void keyboard (unsigned char key, int x, int y) -{ - switch (key) { - case 's': - case 'S': - glBindTexture(GL_TEXTURE_2D, texName); - glTexSubImage2D(GL_TEXTURE_2D, 0, 12, 44, subImageWidth, - subImageHeight, GL_RGBA, - GL_UNSIGNED_BYTE, subImage); - glutPostRedisplay(); - break; - case 'r': - case 'R': - glBindTexture(GL_TEXTURE_2D, texName); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, checkImageWidth, - checkImageHeight, 0, GL_RGBA, - GL_UNSIGNED_BYTE, checkImage); - glutPostRedisplay(); - break; - case 27: - exit(0); - break; - default: - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize(250, 250); - glutInitWindowPosition(100, 100); - glutCreateWindow(argv[0]); - init(); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} -#else -int main(int argc, char** argv) -{ - fprintf (stderr, "This program demonstrates a feature which is not in OpenGL Version 1.0.\n"); - fprintf (stderr, "If your implementation of OpenGL Version 1.0 has the right extensions,\n"); - fprintf (stderr, "you may be able to modify this program to make it run.\n"); - return 0; -} -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/texturesurf.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/texturesurf.c deleted file mode 100644 index 0170070eaa..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/texturesurf.c +++ /dev/null @@ -1,155 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* texturesurf.c - * This program uses evaluators to generate a curved - * surface and automatically generated texture coordinates. - */ - -#include -#include -#include - -GLfloat ctrlpoints[4][4][3] = { - {{ -1.5, -1.5, 4.0}, { -0.5, -1.5, 2.0}, - {0.5, -1.5, -1.0}, {1.5, -1.5, 2.0}}, - {{ -1.5, -0.5, 1.0}, { -0.5, -0.5, 3.0}, - {0.5, -0.5, 0.0}, {1.5, -0.5, -1.0}}, - {{ -1.5, 0.5, 4.0}, { -0.5, 0.5, 0.0}, - {0.5, 0.5, 3.0}, {1.5, 0.5, 4.0}}, - {{ -1.5, 1.5, -2.0}, { -0.5, 1.5, -2.0}, - {0.5, 1.5, 0.0}, {1.5, 1.5, -1.0}} -}; - -GLfloat texpts[2][2][2] = {{{0.0, 0.0}, {0.0, 1.0}}, - {{1.0, 0.0}, {1.0, 1.0}}}; - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glColor3f(1.0, 1.0, 1.0); - glEvalMesh2(GL_FILL, 0, 20, 0, 20); - glFlush(); -} - -#define imageWidth 64 -#define imageHeight 64 -GLubyte image[3*imageWidth*imageHeight]; - -void makeImage(void) -{ - int i, j; - float ti, tj; - - for (i = 0; i < imageWidth; i++) { - ti = 2.0*3.14159265*i/imageWidth; - for (j = 0; j < imageHeight; j++) { - tj = 2.0*3.14159265*j/imageHeight; - - image[3*(imageHeight*i+j)] = (GLubyte) 127*(1.0+sin(ti)); - image[3*(imageHeight*i+j)+1] = (GLubyte) 127*(1.0+cos(2*tj)); - image[3*(imageHeight*i+j)+2] = (GLubyte) 127*(1.0+cos(ti+tj)); - } - } -} - -void myinit(void) -{ - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, - 0, 1, 12, 4, &ctrlpoints[0][0][0]); - glMap2f(GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, - 0, 1, 4, 2, &texpts[0][0][0]); - glEnable(GL_MAP2_TEXTURE_COORD_2); - glEnable(GL_MAP2_VERTEX_3); - glMapGrid2f(20, 0.0, 1.0, 20, 0.0, 1.0); - makeImage(); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexImage2D(GL_TEXTURE_2D, 0, 3, imageWidth, imageHeight, 0, - GL_RGB, GL_UNSIGNED_BYTE, image); - glEnable(GL_TEXTURE_2D); - glEnable(GL_DEPTH_TEST); - glEnable(GL_NORMALIZE); - glShadeModel (GL_FLAT); -} - -void myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho(-4.0, 4.0, -4.0*(GLfloat)h/(GLfloat)w, - 4.0*(GLfloat)h/(GLfloat)w, -4.0, 4.0); - else - glOrtho(-4.0*(GLfloat)w/(GLfloat)h, - 4.0*(GLfloat)w/(GLfloat)h, -4.0, 4.0, -4.0, 4.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glRotatef(85.0, 1.0, 1.0, 1.0); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutCreateWindow (argv[0]); - myinit(); - glutReshapeFunc (myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/torus.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/torus.c deleted file mode 100644 index 7ae4d41e26..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/torus.c +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * torus.c - * This program demonstrates the creation of a display list. - */ - -#include -#include -#include -#include - -/* Some files do not define M_PI... */ -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -GLuint theTorus; - -/* Draw a torus */ -static void torus(int numc, int numt) -{ - int i, j, k; - double s, t, x, y, z, twopi; - - twopi = 2 * (double)M_PI; - for (i = 0; i < numc; i++) { - glBegin(GL_QUAD_STRIP); - for (j = 0; j <= numt; j++) { - for (k = 1; k >= 0; k--) { - s = (i + k) % numc + 0.5; - t = j % numt; - - x = (1+.1*cos(s*twopi/numc))*cos(t*twopi/numt); - y = (1+.1*cos(s*twopi/numc))*sin(t*twopi/numt); - z = .1 * sin(s * twopi / numc); - glVertex3f(x, y, z); - } - } - glEnd(); - } -} - -/* Create display list with Torus and initialize state */ -static void init(void) -{ - theTorus = glGenLists (1); - glNewList(theTorus, GL_COMPILE); - torus(8, 25); - glEndList(); - - glShadeModel(GL_FLAT); - glClearColor(0.0, 0.0, 0.0, 0.0); -} - -/* Clear window and draw torus */ -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT); - glColor3f (1.0, 1.0, 1.0); - glCallList(theTorus); - glFlush(); -} - -/* Handle window resize */ -void reshape(int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(30, (GLfloat) w/(GLfloat) h, 1.0, 100.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - gluLookAt(0, 0, 10, 0, 0, 0, 0, 1, 0); -} - -/* Rotate about x-axis when "x" typed; rotate about y-axis - when "y" typed; "i" returns torus to original view */ -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 'x': - case 'X': - glRotatef(30.,1.0,0.0,0.0); - glutPostRedisplay(); - break; - case 'y': - case 'Y': - glRotatef(30.,0.0,1.0,0.0); - glutPostRedisplay(); - break; - case 'i': - case 'I': - glLoadIdentity(); - gluLookAt(0, 0, 10, 0, 0, 0, 0, 1, 0); - glutPostRedisplay(); - break; - case 27: - exit(0); - break; - } -} - -int main(int argc, char **argv) -{ - glutInitWindowSize(200, 200); - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); - glutCreateWindow(argv[0]); - init(); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutDisplayFunc(display); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/trim.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/trim.c deleted file mode 100644 index f17674f684..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/trim.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * trim.c - * This program draws a NURBS surface in the shape of a - * symmetrical hill, using both a NURBS curve and pwl - * (piecewise linear) curve to trim part of the surface. - */ -#include -#include -#include - - -#ifndef CALLBACK -#define CALLBACK -#endif - - -GLfloat ctlpoints[4][4][3]; - -GLUnurbsObj *theNurb; - -/* - * Initializes the control points of the surface to a small hill. - * The control points range from -3 to +3 in x, y, and z - */ -void init_surface(void) -{ - int u, v; - for (u = 0; u < 4; u++) { - for (v = 0; v < 4; v++) { - ctlpoints[u][v][0] = 2.0*((GLfloat)u - 1.5); - ctlpoints[u][v][1] = 2.0*((GLfloat)v - 1.5); - - if ( (u == 1 || u == 2) && (v == 1 || v == 2)) - ctlpoints[u][v][2] = 3.0; - else - ctlpoints[u][v][2] = -3.0; - } - } -} - -void nurbsError(GLenum errorCode) -{ - const GLubyte *estring; - - estring = gluErrorString(errorCode); - fprintf (stderr, "Nurbs Error: %s\n", (char *) estring); - exit (0); -} - -/* Initialize material property and depth buffer. - */ -void init(void) -{ - GLfloat mat_diffuse[] = { 0.7, 0.7, 0.7, 1.0 }; - GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat mat_shininess[] = { 100.0 }; - - glClearColor (0.0, 0.0, 0.0, 0.0); - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - glEnable(GL_AUTO_NORMAL); - glEnable(GL_NORMALIZE); - - init_surface(); - - theNurb = gluNewNurbsRenderer(); - gluNurbsProperty(theNurb, GLU_SAMPLING_TOLERANCE, 25.0); - gluNurbsProperty(theNurb, GLU_DISPLAY_MODE, GLU_FILL); - gluNurbsCallback(theNurb, GLU_ERROR, - (GLvoid (CALLBACK*) ()) nurbsError); -} - -void display(void) -{ - GLfloat knots[8] = {0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0}; - GLfloat edgePt[5][2] = /* counter clockwise */ - {{0.0, 0.0}, {1.0, 0.0}, {1.0, 1.0}, {0.0, 1.0}, {0.0, 0.0}}; - GLfloat curvePt[4][2] = /* clockwise */ - {{0.25, 0.5}, {0.25, 0.75}, {0.75, 0.75}, {0.75, 0.5}}; - GLfloat curveKnots[8] = - {0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0}; - GLfloat pwlPt[4][2] = /* clockwise */ - {{0.75, 0.5}, {0.5, 0.25}, {0.25, 0.5}}; - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glPushMatrix(); - glRotatef(330.0, 1.,0.,0.); - glScalef (0.5, 0.5, 0.5); - - gluBeginSurface(theNurb); - gluNurbsSurface(theNurb, 8, knots, 8, knots, - 4 * 3, 3, &ctlpoints[0][0][0], - 4, 4, GL_MAP2_VERTEX_3); - gluBeginTrim (theNurb); - gluPwlCurve (theNurb, 5, &edgePt[0][0], 2, GLU_MAP1_TRIM_2); - gluEndTrim (theNurb); - gluBeginTrim (theNurb); - gluNurbsCurve (theNurb, 8, curveKnots, 2, - &curvePt[0][0], 4, GLU_MAP1_TRIM_2); - gluPwlCurve (theNurb, 3, &pwlPt[0][0], 2, GLU_MAP1_TRIM_2); - gluEndTrim (theNurb); - gluEndSurface(theNurb); - - glPopMatrix(); - glFlush(); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective (45.0, (GLdouble)w/(GLdouble)h, 3.0, 8.0); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef (0.0, 0.0, -5.0); -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -/* Main Loop - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize (500, 500); - glutInitWindowPosition (100, 100); - glutCreateWindow(argv[0]); - init(); - glutReshapeFunc(reshape); - glutDisplayFunc(display); - glutKeyboardFunc (keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/unproject.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/unproject.c deleted file mode 100644 index 134c361bac..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/unproject.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * unproject.c - * When the left mouse button is pressed, this program - * reads the mouse position and determines two 3D points - * from which it was transformed. Very little is displayed. - */ -#include -#include -#include - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT); - glFlush(); -} - -/* Change these values for a different transformation */ -void reshape(int w, int h) -{ - glViewport (0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective (45.0, (GLfloat) w/(GLfloat) h, 1.0, 100.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -void mouse(int button, int state, int x, int y) -{ - GLint viewport[4]; - GLdouble mvmatrix[16], projmatrix[16]; - GLint realy; /* OpenGL y coordinate position */ - GLdouble wx, wy, wz; /* returned world x, y, z coords */ - - switch (button) { - case GLUT_LEFT_BUTTON: - if (state == GLUT_DOWN) { - glGetIntegerv (GL_VIEWPORT, viewport); - glGetDoublev (GL_MODELVIEW_MATRIX, mvmatrix); - glGetDoublev (GL_PROJECTION_MATRIX, projmatrix); -/* note viewport[3] is height of window in pixels */ - realy = viewport[3] - (GLint) y - 1; - printf ("Coordinates at cursor are (%4d, %4d)\n", x, realy); - gluUnProject ((GLdouble) x, (GLdouble) realy, 0.0, - mvmatrix, projmatrix, viewport, &wx, &wy, &wz); - printf ("World coords at z=0.0 are (%f, %f, %f)\n", - wx, wy, wz); - gluUnProject ((GLdouble) x, (GLdouble) realy, 1.0, - mvmatrix, projmatrix, viewport, &wx, &wy, &wz); - printf ("World coords at z=1.0 are (%f, %f, %f)\n", - wx, wy, wz); - } - break; - case GLUT_RIGHT_BUTTON: - if (state == GLUT_DOWN) - exit(0); - break; - default: - break; - } -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -/* - * Open window, register input callback functions - */ -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (500, 500); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc (keyboard); - glutMouseFunc(mouse); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/varray.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/varray.c deleted file mode 100644 index b22e723e0e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/varray.c +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* - * varray.c - * This program demonstrates vertex arrays. - */ -#include -#include -#include - -#ifdef GL_VERSION_1_1 -#define POINTER 1 -#define INTERLEAVED 2 - -#define DRAWARRAY 1 -#define ARRAYELEMENT 2 -#define DRAWELEMENTS 3 - -int setupMethod = POINTER; -int derefMethod = DRAWARRAY; - -void setupPointers(void) -{ - static GLint vertices[] = {25, 25, - 100, 325, - 175, 25, - 175, 325, - 250, 25, - 325, 325}; - static GLfloat colors[] = {1.0, 0.2, 0.2, - 0.2, 0.2, 1.0, - 0.8, 1.0, 0.2, - 0.75, 0.75, 0.75, - 0.35, 0.35, 0.35, - 0.5, 0.5, 0.5}; - - glEnableClientState (GL_VERTEX_ARRAY); - glEnableClientState (GL_COLOR_ARRAY); - - glVertexPointer (2, GL_INT, 0, vertices); - glColorPointer (3, GL_FLOAT, 0, colors); -} - -void setupInterleave(void) -{ - static GLfloat intertwined[] = - {1.0, 0.2, 1.0, 100.0, 100.0, 0.0, - 1.0, 0.2, 0.2, 0.0, 200.0, 0.0, - 1.0, 1.0, 0.2, 100.0, 300.0, 0.0, - 0.2, 1.0, 0.2, 200.0, 300.0, 0.0, - 0.2, 1.0, 1.0, 300.0, 200.0, 0.0, - 0.2, 0.2, 1.0, 200.0, 100.0, 0.0}; - - glInterleavedArrays (GL_C3F_V3F, 0, intertwined); -} - -void init(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel (GL_SMOOTH); - setupPointers (); -} - -void display(void) -{ - glClear (GL_COLOR_BUFFER_BIT); - - if (derefMethod == DRAWARRAY) - glDrawArrays (GL_TRIANGLES, 0, 6); - else if (derefMethod == ARRAYELEMENT) { - glBegin (GL_TRIANGLES); - glArrayElement (2); - glArrayElement (3); - glArrayElement (5); - glEnd (); - } - else if (derefMethod == DRAWELEMENTS) { - GLuint indices[4] = {0, 1, 3, 4}; - - glDrawElements (GL_POLYGON, 4, GL_UNSIGNED_INT, indices); - } - glFlush (); -} - -void reshape (int w, int h) -{ - glViewport (0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - gluOrtho2D (0.0, (GLdouble) w, 0.0, (GLdouble) h); -} - -/* ARGSUSED2 */ -void mouse (int button, int state, int x, int y) -{ - switch (button) { - case GLUT_LEFT_BUTTON: - if (state == GLUT_DOWN) { - if (setupMethod == POINTER) { - setupMethod = INTERLEAVED; - setupInterleave(); - } - else if (setupMethod == INTERLEAVED) { - setupMethod = POINTER; - setupPointers(); - } - glutPostRedisplay(); - } - break; - case GLUT_MIDDLE_BUTTON: - case GLUT_RIGHT_BUTTON: - if (state == GLUT_DOWN) { - if (derefMethod == DRAWARRAY) - derefMethod = ARRAYELEMENT; - else if (derefMethod == ARRAYELEMENT) - derefMethod = DRAWELEMENTS; - else if (derefMethod == DRAWELEMENTS) - derefMethod = DRAWARRAY; - glutPostRedisplay(); - } - break; - default: - break; - } -} - -/* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(0); - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize (350, 350); - glutInitWindowPosition (100, 100); - glutCreateWindow (argv[0]); - init (); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutMouseFunc(mouse); - glutKeyboardFunc (keyboard); - glutMainLoop(); - return 0; -} -#else -int main(int argc, char** argv) -{ - fprintf (stderr, "This program demonstrates a feature which is not in OpenGL Version 1.0.\n"); - fprintf (stderr, "If your implementation of OpenGL Version 1.0 has the right extensions,\n"); - fprintf (stderr, "you may be able to modify this program to make it run.\n"); - return 0; -} -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/progs/redbook/wrap.c b/nx-X11/extras/Mesa_6.4.2/progs/redbook/wrap.c deleted file mode 100644 index f9a1f162ab..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/redbook/wrap.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 1993-1997, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. - */ - -/* wrap.c - * This program texture maps a checkerboard image onto - * two rectangles. This program demonstrates the wrapping - * modes, if the texture coordinates fall outside 0.0 and 1.0. - * Interaction: Pressing the 's' and 'S' keys switch the - * wrapping between clamping and repeating for the s parameter. - * The 't' and 'T' keys control the wrapping for the t parameter. - * - * If running this program on OpenGL 1.0, texture objects are - * not used. - */ -#include -#include -#include - -/* Create checkerboard texture */ -#define checkImageWidth 64 -#define checkImageHeight 64 -static GLubyte checkImage[checkImageHeight][checkImageWidth][4]; - -#ifdef GL_VERSION_1_1 -static GLuint texName; -#endif - -void makeCheckImage(void) -{ - int i, j, c; - - for (i = 0; i < checkImageHeight; i++) { - for (j = 0; j < checkImageWidth; j++) { - c = (((i&0x8)==0)^((j&0x8)==0))*255; - checkImage[i][j][0] = (GLubyte) c; - checkImage[i][j][1] = (GLubyte) c; - checkImage[i][j][2] = (GLubyte) c; - checkImage[i][j][3] = (GLubyte) 255; - } - } -} - -void init(void) -{ - glClearColor (0.0, 0.0, 0.0, 0.0); - glShadeModel(GL_FLAT); - glEnable(GL_DEPTH_TEST); - - makeCheckImage(); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - -#ifdef GL_VERSION_1_1 - glGenTextures(1, &texName); - glBindTexture(GL_TEXTURE_2D, texName); -#endif - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); -#ifdef GL_VERSION_1_1 - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, checkImageWidth, checkImageHeight, - 0, GL_RGBA, GL_UNSIGNED_BYTE, checkImage); -#else - glTexImage2D(GL_TEXTURE_2D, 0, 4, checkImageWidth, checkImageHeight, - 0, GL_RGBA, GL_UNSIGNED_BYTE, checkImage); -#endif -} - -void display(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glEnable(GL_TEXTURE_2D); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); -#ifdef GL_VERSION_1_1 - glBindTexture(GL_TEXTURE_2D, texName); -#endif - - glBegin(GL_QUADS); - glTexCoord2f(0.0, 0.0); glVertex3f(-2.0, -1.0, 0.0); - glTexCoord2f(0.0, 3.0); glVertex3f(-2.0, 1.0, 0.0); - glTexCoord2f(3.0, 3.0); glVertex3f(0.0, 1.0, 0.0); - glTexCoord2f(3.0, 0.0); glVertex3f(0.0, -1.0, 0.0); - - glTexCoord2f(0.0, 0.0); glVertex3f(1.0, -1.0, 0.0); - glTexCoord2f(0.0, 3.0); glVertex3f(1.0, 1.0, 0.0); - glTexCoord2f(3.0, 3.0); glVertex3f(2.41421, 1.0, -1.41421); - glTexCoord2f(3.0, 0.0); glVertex3f(2.41421, -1.0, -1.41421); - glEnd(); - glFlush(); - glDisable(GL_TEXTURE_2D); -} - -void reshape(int w, int h) -{ - glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(60.0, (GLfloat) w/(GLfloat) h, 1.0, 30.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -3.6); -} - -/* ARGSUSED1 */ -void keyboard (unsigned char key, int x, int y) -{ - switch (key) { - case 's': - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); - glutPostRedisplay(); - break; - case 'S': - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glutPostRedisplay(); - break; - case 't': - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); - glutPostRedisplay(); - break; - case 'T': - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - glutPostRedisplay(); - break; - case 27: - exit(0); - break; - default: - break; - } -} - -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowSize(250, 250); - glutInitWindowPosition(100, 100); - glutCreateWindow(argv[0]); - init(); - glutDisplayFunc(display); - glutReshapeFunc(reshape); - glutKeyboardFunc(keyboard); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/.cvsignore b/nx-X11/extras/Mesa_6.4.2/progs/samples/.cvsignore deleted file mode 100644 index 12b0650567..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/.cvsignore +++ /dev/null @@ -1,45 +0,0 @@ -.cvsignore -accum -bitmap1 -bitmap2 -blendeq -blendxor -copy -cursor -depth -eval -fog -font -line -logo -nurb -oglinfo -olympic -overlay -point -prim -quad -select -shape -sphere -star -stencil -stretch -texture -tri -wave -bugger -pend -lthreads -lxdemo -lxgears -lxheads -lxinfo -lxpixmap -anywin -ffset -bdemo -binfo -incopy -demo -font diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/Imakefile b/nx-X11/extras/Mesa_6.4.2/progs/samples/Imakefile deleted file mode 100644 index 948a978359..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/Imakefile +++ /dev/null @@ -1,101 +0,0 @@ -LOCAL_LIBRARIES = $(XLIB) $(TOP)\lib\glut.a $(TOP)\lib\Mesaglu.a $(TOP)\lib\MesaGL.a - -INCLUDES = -I$(TOP)\include - -SRCS = accum.c \ - bitmap1.c \ - bitmap2.c \ - blendeq.c \ - blendxor.c \ - copy.c \ - cursor.c \ - depth.c \ - eval.c \ - fog.c \ - font.c \ - line.c \ - logo.c \ - nurb.c \ - oglinfo.c \ - olympic.c \ - overlay.c \ - point.c \ - prim.c \ - quad.c \ - select.c \ - shape.c \ - speed.c \ - sphere.c \ - star.c \ - stencil.c \ - stretch.c \ - texture.c \ - tri.c \ - wave.c - -PROGRAMS = ProgramTargetName(accum) \ - ProgramTargetName(bitmap1) \ - ProgramTargetName(bitmap2) \ - ProgramTargetName(blendeq) \ - ProgramTargetName(blendxor) \ - ProgramTargetName(copy) \ - ProgramTargetName(cursor) \ - ProgramTargetName(depth) \ - ProgramTargetName(eval) \ - ProgramTargetName(fog) \ - ProgramTargetName(font) \ - ProgramTargetName(line) \ - ProgramTargetName(logo) \ - ProgramTargetName(nurb) \ - ProgramTargetName(oglinfo) \ - ProgramTargetName(olympic) \ - ProgramTargetName(overlay) \ - ProgramTargetName(point) \ - ProgramTargetName(prim) \ - ProgramTargetName(quad) \ - ProgramTargetName(select) \ - ProgramTargetName(shape) \ - ProgramTargetName(speed) \ - ProgramTargetName(sphere) \ - ProgramTargetName(star) \ - ProgramTargetName(stencil) \ - ProgramTargetName(stretch) \ - ProgramTargetName(texture) \ - ProgramTargetName(tri) \ - ProgramTargetName(wave) - -AllTarget($(PROGRAMS)) - -NormalProgramTarget(accum,accum.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(bitmap1,bitmap1.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(bitmap2,bitmap2.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(blendeq,blendeq.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(blendxor,blendxor.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(copy,copy.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(cursor,cursor.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(depth,depth.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(eval,eval.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(fog,fog.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(font,font.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(line,line.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(logo,logo.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(nurb,nurb.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(oglinfo,oglinfo.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(olympic,olympic.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(overlay,overlay.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(point,point.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(prim,prim.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(quad,quad.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(select,select.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(shape,shape.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(speed,speed.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(sphere,sphere.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(star,star.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(stencil,stencil.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(stretch,stretch.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(texture,texture.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(tri,tri.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) -NormalProgramTarget(wave,wave.o,NullParameter,$(LOCAL_LIBRARIES),NullParameter) - -DependTarget() - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/Makefile b/nx-X11/extras/Mesa_6.4.2/progs/samples/Makefile deleted file mode 100644 index f14b7dfc00..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# progs/samples/Makefile - -TOP = ../.. -include $(TOP)/configs/current - -INCDIR = $(TOP)/include - -LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(GLU_LIB_NAME) $(LIB_DIR)/$(GLUT_LIB_NAME) - -PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth eval fog \ - font line logo nurb olympic overlay point prim quad select \ - shape sphere star stencil stretch texture tri wave - - -##### RULES ##### - -.SUFFIXES: -.SUFFIXES: .c - -.c: $(LIB_DEP) - $(CC) -I$(INCDIR) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@ - - -##### TARGETS ##### - -default: $(PROGS) - - -sphere: sphere.o readtex.o - $(CC) -I$(INCDIR) $(CFLAGS) sphere.o readtex.o $(APP_LIB_DEPS) -o $@ - -sphere.o: sphere.c readtex.h - $(CC) -c -I$(INCDIR) $(CFLAGS) sphere.c - -readtex.c: $(TOP)/progs/util/readtex.c - cp $< . - -readtex.h: $(TOP)/progs/util/readtex.h - cp $< . - -readtex.o: readtex.c readtex.h - $(CC) -c -I$(INCDIR) $(CFLAGS) $< -o $@ - - -clean: - -rm -f $(PROGS) - -rm -f *.o *~ - -rm -f readtex.c readtex.h diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/Makefile.DJ b/nx-X11/extras/Mesa_6.4.2/progs/samples/Makefile.DJ deleted file mode 100644 index cda4e05941..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/Makefile.DJ +++ /dev/null @@ -1,85 +0,0 @@ -# Mesa 3-D graphics library -# Version: 4.0 -# -# Copyright (C) 1999 Brian Paul All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -# DOS/DJGPP samples makefile v1.6 for Mesa -# -# Copyright (C) 2002 - Daniel Borca -# Email : dborca@users.sourceforge.net -# Web : http://www.geocities.com/dborca - - -# -# Available options: -# -# Environment variables: -# GLIDE path to Glide3 SDK; used with FX. -# default = $(TOP)/glide3 -# FX=1 build for 3dfx Glide3. Note that this disables -# compilation of most DMesa code and requires fxMesa. -# As a consequence, you'll need the DJGPP Glide3 -# library to build any application. -# default = no -# DXE=1 use DXE modules (see README.DJ for details). -# default = no -# -# Targets: -# build a specific file -# - - - -.PHONY: all -.SUFFIXES: .c .o .exe -.SECONDARY: ../util/readtex.o ../util/showbuffer.o - -TOP = ../.. -GLIDE ?= $(TOP)/glide3 - -CC = gcc -CFLAGS = -Wall -W -pedantic -CFLAGS += -O2 -ffast-math -CFLAGS += -I$(TOP)/include -I../util -CFLAGS += -DGLUT_IMPORT_LIB -ifeq ($(FX),1) -CFLAGS += -DFX -endif - -LD = gxx -LDFLAGS = -s -L$(TOP)/lib - -ifeq ($(DXE),1) -LDLIBS += -liglut -liglu -ligl -else -LDLIBS = -lglut -lglu -lgl -ifeq ($(FX),1) -LDFLAGS += -L$(GLIDE)/lib -LDLIBS += -lgld3x -endif -endif - -.c.o: - $(CC) -o $@ $(CFLAGS) -c $< -%.exe: ../util/readtex.o ../util/showbuffer.o %.o - $(LD) -o $@ $(LDFLAGS) $^ $(LDLIBS) - -all: - $(error Must specify to build) diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/Makefile.dja b/nx-X11/extras/Mesa_6.4.2/progs/samples/Makefile.dja deleted file mode 100644 index b60a11197b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/Makefile.dja +++ /dev/null @@ -1,25 +0,0 @@ - -# Makefile for sample programs for MS-DOS with DJGPP and ALLEGRO - - - -INCDIR = ../include -LIBDIR = ../lib -include ../common.dja - - _PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth \ - eval fog font line logo nurb oglinfo olympic overlay point \ - prim quad select shape sphere star stencil stretch texture \ - tri wave - - PROGS = $(_PROGS:=.exe) - - -default: $(PROGS) - -clean: - del *. - -realclean: clean - del *.exe - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/Makefile.mgw b/nx-X11/extras/Mesa_6.4.2/progs/samples/Makefile.mgw deleted file mode 100644 index 1193540578..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/Makefile.mgw +++ /dev/null @@ -1,68 +0,0 @@ -# Mesa 3-D graphics library -# Version: 4.0 -# -# Copyright (C) 1999 Brian Paul All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -# MinGW samples makefile v1.2 for Mesa -# -# Copyright (C) 2002 - Daniel Borca -# Email : dborca@users.sourceforge.net -# Web : http://www.geocities.com/dborca - - -# -# Available options: -# -# Environment variables: -# -# Targets: -# build a specific file -# - - - -.PHONY: all -.SUFFIXES: .c .o .exe -.SECONDARY: ../util/readtex.o ../util/showbuffer.o - -TOP = ../.. - -CC = mingw32-gcc -CFLAGS = -Wall -W -pedantic -CFLAGS += -O2 -ffast-math -CFLAGS += -I$(TOP)/include -I../util -ifeq ($(FX),1) -CFLAGS += -DFX -endif -CFLAGS += -DGLUT_DISABLE_ATEXIT_HACK -D_STDCALL_SUPPORTED -CFLAGS += -D_WINDEF_ -D_WINGDI_ - -LD = mingw32-g++ -LDFLAGS = -s -L$(TOP)/lib - -LDLIBS = -lglut32 -lglu32 -lopengl32 - -.c.o: - $(CC) -o $@ $(CFLAGS) -c $< -%.exe: ../util/readtex.o ../util/showbuffer.o %.o - $(LD) -o $@ $(LDFLAGS) $^ $(LDLIBS) - -all: - $(error Must specify to build) diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/Makefile.win b/nx-X11/extras/Mesa_6.4.2/progs/samples/Makefile.win deleted file mode 100644 index e74568f7c9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/Makefile.win +++ /dev/null @@ -1,41 +0,0 @@ - -# Mesa 3-D graphics library -# Version: 3.5 -# Copyright (C) 1995-2001 Brian Paul - -# Makefile for GLUT-based demo programs for Windows - -!include - -##### MACROS ##### - -TOP = .. -INCDIR = ..\include -LIBDIR = ..\lib - -PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth eval fog \ - font line logo nurb oglinfo olympic overlay point prim quad select \ - shape sphere star stencil stretch texture tri wave - -SRCS = \ - accum.c \ - bitmap1.c \ - bitmap2.c \ - blendeq.c \ - blendxor.c \ - copy.c \ - cursor.c depth.c eval.c fog.c \ - font.c line.c logo.c nurb.c olympic.c overlay.c point.c prim.c quad.c select.c \ - shape.c sphere.c star.c stencil.c stretch.c texture.c tri.c wave.c - -!include "../mesawin32.mak" - -##### TARGETS ##### - -clean:: - -clobber:: - -$(EXES) : $*.obj - @echo $@ - $(link) -out:$@ $* /LIBPATH:$(LIBDIR) $(LIBS) diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/README b/nx-X11/extras/Mesa_6.4.2/progs/samples/README deleted file mode 100644 index 853158873c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/README +++ /dev/null @@ -1,520 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -accum - Accumulation test. - - RGBA, SB/DB (SB default). - - cmd line options: - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit - 1 Use filled polygon mode. - 2 Use outlined polygon mode. - -bitmap1 - Bitmap test. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - -bitmap2 - Bitmap test. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - 1 Toggle display list mode. - 2 Toggle color animation mode. - -copy - Pixel copy test. - - RGBA, SB/DB (SB default). - - cmd line options: - -sb Single buffer mode. - -db Double buffer mode. - -dr Direct render mode. - -ir Indirect render mode. - -f RGB image file. - - keys: - ESC Quit. - Z Increase zoom factor. - z Decrease zoom factor. - - mouse input: - Left Copy location. - -cursor - Cursor test. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - SPACE switch cursor color. - -depth - Z buffer test. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - 1 Toggle anti-aliased mode. - 2 Toggle stipple mode. - -eval - Evaluator test. - - RGBA, SB/DB (SB default). - - cmd line options: - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - LEFT Rotate. - RIGHT Rotate. - UP Rotate. - DOWN Rotate. - 1 Toggle dimensions. - 2 Toggle dimensions. - e Use eval mode. - m Use mesh mode. - f Toggle polygon mode. - p Toggle point mode. - c Toggle color mode. - t Toggle texture mode. - l Toggle lighting mode. - -fog - Fog test. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - LEFT Rotate. - RIGHT Rotate. - UP Rotate. - DOWN Rotate. - D Increase fog density. - d Decrease fog density. - -font - font test. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - Left Shift left. - Right Shift right. - Up Shift up. - Down Shift down. - n Shift in. - m Shift out. - q Scale up x. - w Scale down x. - a Scale up y. - s Scale down y. - z Scale up z. - x Scale down z. - e Rotate clockwise x. - r Rotate counter-clockwise x. - d Rotate clockwise y. - f Rotate counter-clockwise y. - c Rotate clockwise z. - v Rotate counter-clockwise z. - -line - Line test. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - W Increase line width. - w Decrease line width. - 1 Toggle stipple mode. - 2 Toggle anti-aliased mode. - -logo - Demo. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - LEFT Rotate. - RIGHT Rotate - UP Move clipping plane. - DOWN Move clipping plane. - Z Translate. - z Translate. - 1 Use GL_POINT polygon mode. - 2 Use GL_LINE polygon mode. - 3 Use GL_FILL polygon mode. - p Toggle polygon fill modes. - 4 Use GL_NICEST for GL_POLYGON_SMOOTH_HINT. - 5 Use anti-aliased polygon mode. - 6 Use aliased polygon mode. - 8 Toggle dither mode. - 9 Toggle stipple polygon mode. - 0 Toggle flat/smooth shading mode. - q Disable cull mode. - w Use front face cull mode. - e Use back face cull mode. - r Use clockwise front face mode. - t Use counter-clockwise front face mode. - y Use MSB first stipple pattern. - u Use LSB first stipple pattern. - a Use brick texture map. - s Use checker texture map. - d Disable texture map. - f Use decal texture environment mode. - g Use modulate texture environment mode. - -nurb - Nurb test. - - RGBA, SB/DB (SB default). - - cmd line options: - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - LEFT Rotate. - RIGHT Rotate. - UP Rotate. - DOWN Rotate. - -olympic - Olymipic rings demo. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - SPACE Restart demo. - -overlay - Overlay plane demo. - - RGBA, SB/DB (SB default). - - cmd line options: - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - SPACE Toggle star weird movement mode. - t Toggle star turbo mode. - -point - Point test. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - LEFT Translate. - RIGHT Translate. - UP Translate. - DOWN Translate. - W Increase point width. - w Decrease point width. - 1 Toggle anti-aliased mode. - -prim - Primitive test. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - 1 Toggle flat/smooth shade mode. - 2 Toggle outlined/filled polygon mode. - 3 Toggle color mask mode. - -quad - Quadric test. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - -dr Direct render mode. - -ir Indirect render mode. - -f texture file. - - keys: - ESC Quit. - LEFT Rotate. - RIGHT Rotate. - UP Rotate. - DOWN Rotate. - X Rotate. - x Rotate. - 1 Use GLU_FILL draw style. - 2 Use GLU_POINT draw style. - 3 Use GLU_LINE draw style. - 4 Use GLU_SILHOUETTE draw style. - 0 Toggle flat/smooth shade mode. - f Cylce through quadrics. - d Toggle orientation. - A Increase number of stacks. - a Decrease number of stacks. - S Increase number of slices. - s Decrease number of slices. - G Increase radius1. - g Decrease radius1. - J Increase radius2. - j Decrease radius2. - H Increase height. - h Decrease height. - K Increase angle1. - k Decrease angle1. - L Increase angle2. - l Decrease angle2. - z Toggle texture mode. - q Disable cull mode. - w Use front face cull mode. - e Use back face cull mode. - r Use clockwise front face mode. - t Use counter-clockwise front face mode. - y Toggle dither mode. - -select - Selection test. - - RGBA, SB. - - cmd line options: - - keys: - ESC Quit. - LEFT Rotate. - RIGHT Rotate. - Z Increase zoom factor. - z Decrease zoom factor. - d Zoom at current mouse location. - f Print feedback information. - l Toggle outlined/filled polygon mode. - - mouse: - Left Recolor selected triangle. - Center Enlarge selected triangle. - Right Delete selected triangle. - -shape - shape test. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - Left Shift left. - Right Shift right. - Up Shift up. - Down Shift down. - n Shift in. - m Shift out. - q Scale up x. - w Scale down x. - a Scale up y. - s Scale down y. - z Scale up z. - x Scale down z. - e Rotate clockwise x. - r Rotate counter-clockwise x. - d Rotate clockwise y. - f Rotate counter-clockwise y. - c Rotate clockwise z. - v Rotate counter-clockwise z. - SPACE switch shapes. - -speed - Speed test. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - a Toggle anti-aliased mode. - d Toggle z buffering mode. - f Toggle fog mode. - F Toggle fog hint mode. - s Toggle flat/smooth shading mode. - t Toggle texturing mode. - -sphere - Spheremap test. - - RGBA, SB/DB (SB default). - - cmd line options: - -sb Single buffer mode. - -db Double buffer mode. - -dr Direct render mode. - -ir Indirect render mode. - -f texture file. - -3 Use RGB components. - -4 Use RGBA components. - - keys: - ESC Quit. - LEFT Rotate about the y axis. - RIGHT Rotate about the y axis. - UP Rotate about the x axis. - DOWN Rotate about the x axis. - a Toggle auto rotate mode. - c toggle between cylinder or cube object. - t Use torus object. - d Use decal texture mode. - m Use modulate texture mode. - l Toggle lighted mode. - f Toggle fog mode. - 0 Use nearest magification filter. - 1 Use linear magification. - 2 Use nearest minification filter. - 3 Use linear minification filter. - 4 Use nearest-mipmap-nearest minification filter. - 5 Use nearest-mipmap-linear minification filter. - 6 Use linear-mipmap-nearest minification filter. - 7 Use linear-mipmap-linear minification filter. - -star - Demo. - - RGBA, SB/DB (SB default). - - cmd line options: - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - SPACE Toggle weird movement mode. - t Toggle turbo mode. - -stencil - Stencil test. - - RGBA, SB. - - cmd line options: - -stretch - Texture test. - - RGBA, SB. - - cmd line options: - -sb Single buffer mode. - -db Double buffer mode. - -dr Direct render mode. - -ir Indirect render mode. - -f texture file. - - keys: - ESC Quit. - SPACE Start animation. - - mouse: - Left Added stretch point. - -texture - Texture test. - - RGBA, SB/DB (SB default). - - cmd line options: - -sb Single buffer mode. - -db Double buffer mode. - -dr Direct render mode. - -ir Indirect render mode. - -f texture file. - - keys: - ESC Quit. - LEFT Rotate. - RIGHT Rotate. - UP Rotate. - DOWN Rotate. - T Translate. - t Translate. - s Toggle sphere map mode. - 0 Use nearest magification filter. - 1 Use linear magification filter. - 2 Use nearest minification filter. - 3 Use linear minification filter. - 4 Use nearest-mipmap-nearest minification filter. - 5 Use nearest-mipmap-linear minification filter. - 6 Use linear-mipmap-nearest minification filter. - 7 Use linear-mipmap-linear minification filter. - -tri - Triangle test. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - - keys: - ESC Quit. - LEFT Translate. - RIGHT Translate. - Z Increase zoom factor. - z Decrease zoom factor. - 1 Use point polygon mode. - 2 Use line polygon mode. - 3 Use filled polygon mode. - 4 Use point primitive. - 5 Use line-loop primitive. - 6 Use polygon primitive. - 7 Toggle cull mode. - 8 Use clockwise/counter-clockwise front face mode. - 9 Toggle front/back face cull mode. - v Toggle show verticies mode. - s Toggle flat/smooth shade mode. - h Toggle hide bottom triangle mode. - o Toggle outline mode. - m Toggle dither mode. - 0 Toggle anti-aliased mode. - -wave - Demo. - - RGBA/CI (RGBA default), SB/DB (SB default). - - cmd line options: - -rgb RGBA mode. - -ci Color index mode. - -sb Single buffer mode. - -db Double buffer mode. - -dr Direct render mode. - -ir Indirect render mode. - -grid Number of grids. - -size Size of grid. - -wave Height of wave (floating point number). - -frames Number of frames. - - keys: - ESC Quit. - c Toggle contouring mode. - s Toggle flat/smooth shade mode. - l Toggle lighting mode. - d Toggle depth checking mode. - SPACE Toggle step/animation mode. - n Single step in step mode. - a Toggle spin mode. diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/accum.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/accum.c deleted file mode 100644 index 24dfc07d2a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/accum.c +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ -#include -#include -#include -#include - - -GLenum doubleBuffer; -GLint thing1, thing2; - - -static void Init(void) -{ - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClearAccum(0.0, 0.0, 0.0, 0.0); - - thing1 = glGenLists(1); - glNewList(thing1, GL_COMPILE); - glColor3f(1.0, 0.0, 0.0); - glRectf(-1.0, -1.0, 1.0, 0.0); - glEndList(); - - thing2 = glGenLists(1); - glNewList(thing2, GL_COMPILE); - glColor3f(0.0, 1.0, 0.0); - glRectf(0.0, -1.0, 1.0, 1.0); - glEndList(); -} - -static void Reshape(int width, int height) -{ - - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -static void Key(unsigned char key, int x, int y) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(1); - case '1': - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - break; - case '2': - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Draw(void) -{ - - glPushMatrix(); - - glScalef(0.8, 0.8, 1.0); - - glClear(GL_COLOR_BUFFER_BIT); - glCallList(thing1); - glAccum(GL_LOAD, 0.5); - - glClear(GL_COLOR_BUFFER_BIT); - glCallList(thing2); - glAccum(GL_ACCUM, 0.5); - - glAccum(GL_RETURN, 1.0); - - glPopMatrix(); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); - glutInitWindowSize( 300, 300); - - type = GLUT_RGB | GLUT_ACCUM; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Accum Test") == GL_FALSE) { - exit(1); - } - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/bitmap1.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/bitmap1.c deleted file mode 100644 index 517d584e21..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/bitmap1.c +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include - - -#define OPENGL_WIDTH 24 -#define OPENGL_HEIGHT 13 - - -GLenum rgb, doubleBuffer, windType; - -float boxA[3] = { - 0, 0, 0 -}; -float boxB[3] = { - -100, 0, 0 -}; -float boxC[3] = { - 100, 0, 0 -}; -float boxD[3] = { - 0, 95, 0 -}; -float boxE[3] = { - 0, -105, 0 -}; -GLubyte OpenGL_bits1[] = { - 0x00, 0x03, 0x00, - 0x7f, 0xfb, 0xff, - 0x7f, 0xfb, 0xff, - 0x00, 0x03, 0x00, - 0x3e, 0x8f, 0xb7, - 0x63, 0xdb, 0xb0, - 0x63, 0xdb, 0xb7, - 0x63, 0xdb, 0xb6, - 0x63, 0x8f, 0xf3, - 0x63, 0x00, 0x00, - 0x63, 0x00, 0x00, - 0x63, 0x00, 0x00, - 0x3e, 0x00, 0x00, -}; -GLubyte OpenGL_bits2[] = { - 0x00, 0x00, 0x00, - 0xff, 0xff, 0x01, - 0xff, 0xff, 0x01, - 0x00, 0x00, 0x00, - 0xf9, 0xfc, 0x01, - 0x8d, 0x0d, 0x00, - 0x8d, 0x0d, 0x00, - 0x8d, 0x0d, 0x00, - 0xcc, 0x0d, 0x00, - 0x0c, 0x4c, 0x0a, - 0x0c, 0x4c, 0x0e, - 0x8c, 0xed, 0x0e, - 0xf8, 0x0c, 0x00, -}; -GLubyte logo_bits[] = { - 0x00, 0x66, 0x66, - 0xff, 0x66, 0x66, - 0x00, 0x00, 0x00, - 0xff, 0x3c, 0x3c, - 0x00, 0x42, 0x40, - 0xff, 0x42, 0x40, - 0x00, 0x41, 0x40, - 0xff, 0x21, 0x20, - 0x00, 0x2f, 0x20, - 0xff, 0x20, 0x20, - 0x00, 0x10, 0x90, - 0xff, 0x10, 0x90, - 0x00, 0x0f, 0x10, - 0xff, 0x00, 0x00, - 0x00, 0x66, 0x66, - 0xff, 0x66, 0x66, -}; - -#include "tkmap.c" - -static void Init(void) -{ - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClearIndex(0.0); -} - -static void Reshape(int width, int height) -{ - - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(-175, 175, -175, 175); - glMatrixMode(GL_MODELVIEW); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - } -} - -static void Draw(void) -{ - float mapI[2], mapIA[2], mapIR[2]; - - glClear(GL_COLOR_BUFFER_BIT); - - mapI[0] = 0.0; - mapI[1] = 1.0; - mapIR[0] = 0.0; - mapIR[1] = 0.0; - mapIA[0] = 1.0; - mapIA[1] = 1.0; - - glPixelMapfv(GL_PIXEL_MAP_I_TO_R, 2, mapIR); - glPixelMapfv(GL_PIXEL_MAP_I_TO_G, 2, mapI); - glPixelMapfv(GL_PIXEL_MAP_I_TO_B, 2, mapI); - glPixelMapfv(GL_PIXEL_MAP_I_TO_A, 2, mapIA); - glPixelTransferi(GL_MAP_COLOR, GL_TRUE); - - SetColor(COLOR_WHITE); - glRasterPos3fv(boxA); - glPixelStorei(GL_UNPACK_ROW_LENGTH, 24); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 8); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 2); - glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glBitmap(16, 12, 8.0, 0.0, 0.0, 0.0, logo_bits); - - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_LSB_FIRST, GL_TRUE); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - SetColor(COLOR_WHITE); - glRasterPos3fv(boxB); - glBitmap(OPENGL_WIDTH, OPENGL_HEIGHT, OPENGL_WIDTH, 0.0, OPENGL_WIDTH, 0.0, - OpenGL_bits1); - glBitmap(OPENGL_WIDTH, OPENGL_HEIGHT, OPENGL_WIDTH, 0.0, OPENGL_WIDTH, 0.0, - OpenGL_bits2); - - SetColor(COLOR_YELLOW); - glRasterPos3fv(boxC); - glBitmap(OPENGL_WIDTH, OPENGL_HEIGHT, OPENGL_WIDTH, 0.0, OPENGL_WIDTH, 0.0, - OpenGL_bits1); - glBitmap(OPENGL_WIDTH, OPENGL_HEIGHT, OPENGL_WIDTH, 0.0, OPENGL_WIDTH, 0.0, - OpenGL_bits2); - - SetColor(COLOR_CYAN); - glRasterPos3fv(boxD); - glBitmap(OPENGL_WIDTH, OPENGL_HEIGHT, OPENGL_WIDTH, 0.0, OPENGL_WIDTH, 0.0, - OpenGL_bits1); - glBitmap(OPENGL_WIDTH, OPENGL_HEIGHT, OPENGL_WIDTH, 0.0, OPENGL_WIDTH, 0.0, - OpenGL_bits2); - - SetColor(COLOR_RED); - glRasterPos3fv(boxE); - glBitmap(OPENGL_WIDTH, OPENGL_HEIGHT, OPENGL_WIDTH, 0.0, OPENGL_WIDTH, 0.0, - OpenGL_bits1); - glBitmap(OPENGL_WIDTH, OPENGL_HEIGHT, OPENGL_WIDTH, 0.0, OPENGL_WIDTH, 0.0, - OpenGL_bits2); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - rgb = GL_TRUE; - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-ci") == 0) { - rgb = GL_FALSE; - } else if (strcmp(argv[i], "-rgb") == 0) { - rgb = GL_TRUE; - } else if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300); - - windType = (rgb) ? GLUT_RGB : GLUT_INDEX; - windType |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(windType); - - if (glutCreateWindow("Bitmap Test") == GL_FALSE) { - exit(1); - } - - InitMap(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/bitmap2.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/bitmap2.c deleted file mode 100644 index 5faac84162..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/bitmap2.c +++ /dev/null @@ -1,787 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ -#include -#include -#include -#include - - -#define EXP_WIDTH 80 -#define EXP_HEIGHT 80 - - -GLenum rgb, doubleBuffer, windType; - -#include "tkmap.c" - -GLenum useLists, abuse; -GLubyte exp_bits[7][800] = { - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x81, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf2, 0x1f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xbe, 0x7c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf6, 0x4f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xde, 0x7d, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xea, 0xef, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x55, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xdd, 0xfd, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xbf, 0xae, 0x22, 0x36, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xdb, 0xf7, 0x3f, 0x1e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x50, 0xbf, 0xbf, 0x85, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xe5, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xee, 0x7e, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x74, 0x4b, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe8, 0x3e, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf8, 0x49, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x54, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x78, 0x91, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x60, 0xf1, 0x53, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x97, 0x5c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x0c, 0x8c, 0x1b, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc4, 0x01, 0x00, 0xc8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x88, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x40, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x00, 0x0c, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x70, 0xe0, 0x0d, 0x00, 0x04, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x72, 0xc8, 0x07, 0x40, 0x08, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x02, 0x78, 0x2f, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x02, 0xb0, 0x0a, 0x20, 0x77, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x13, 0x10, 0x33, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x02, 0x78, 0xbb, 0x81, 0x09, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, 0xdc, 0xe7, 0x00, 0x09, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xac, 0x78, 0x00, 0x31, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x03, 0x74, 0x4b, 0x00, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x02, 0xe8, 0x3e, 0x00, 0x01, 0x10, 0x00, - 0x00, 0x00, 0x80, 0x00, 0xf8, 0x49, 0x80, 0x09, 0x1c, 0x00, - 0x00, 0x00, 0x00, 0x0c, 0x40, 0x07, 0x00, 0x05, 0x1c, 0x00, - 0x00, 0x00, 0x80, 0x09, 0x04, 0x80, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x11, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x1d, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x80, 0xe3, 0x0b, 0x00, 0x22, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x8f, 0x10, 0x00, 0xa0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x4f, 0x20, 0x78, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x80, 0x79, 0x18, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x78, 0x7c, 0x05, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x18, 0xc0, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x84, 0x80, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x60, 0x06, 0x0c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x07, 0x64, 0x3a, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x72, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x3b, 0x00, 0x00, 0xc0, 0x33, 0x00, 0x00, - 0x00, 0x00, 0xa0, 0x1b, 0x00, 0x00, 0x80, 0x42, 0x00, 0x00, - 0x00, 0x00, 0xd0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, - 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x50, 0x02, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, - 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, - 0x00, 0x30, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x00, 0x80, 0x03, 0x03, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, - 0x00, 0xe2, 0x82, 0x03, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, - 0x00, 0x0e, 0x80, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x10, 0x00, - 0x00, 0x0e, 0x80, 0x03, 0xec, 0x10, 0x00, 0x00, 0x60, 0x00, - 0x00, 0x12, 0x00, 0x00, 0x05, 0x93, 0x01, 0x00, 0x20, 0x00, - 0x00, 0x12, 0x00, 0x00, 0x00, 0x5c, 0x0c, 0x00, 0x60, 0x00, - 0x00, 0x30, 0x00, 0xc0, 0x05, 0x81, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x2c, 0x00, 0x00, 0xcc, 0x06, 0x00, 0x00, 0x20, 0x00, - 0x00, 0x30, 0x00, 0x00, 0x28, 0x20, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x30, 0x80, 0x80, 0x22, 0x00, 0x02, 0x00, 0x00, 0x02, - 0x00, 0x20, 0x00, 0x80, 0x02, 0x20, 0x08, 0x00, 0x20, 0x02, - 0x00, 0x38, 0x00, 0x00, 0x00, 0x11, 0x28, 0x00, 0x20, 0x06, - 0x00, 0x20, 0x00, 0x80, 0x0e, 0xc0, 0x21, 0x00, 0x5c, 0x00, - 0x00, 0x24, 0x00, 0x90, 0x40, 0x58, 0x04, 0x00, 0x20, 0x01, - 0x00, 0x24, 0x00, 0x10, 0x22, 0x02, 0x05, 0x00, 0x20, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x28, 0xb6, 0x00, 0x00, 0x20, 0x01, - 0x00, 0x70, 0x00, 0x00, 0x18, 0xc1, 0x00, 0x00, 0xc0, 0x01, - 0x00, 0xc0, 0x00, 0x00, 0x40, 0x83, 0x04, 0x00, 0xc0, 0x01, - 0x00, 0x00, 0x01, 0x80, 0xfc, 0x41, 0x02, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x03, 0x30, 0x00, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x02, 0x00, 0x40, 0x1d, 0x00, 0x00, 0x20, 0x00, - 0x00, 0x30, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x04, 0x00, 0x60, 0x00, 0x00, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, - 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x38, 0x00, 0x81, 0x0f, 0x00, 0x00, 0x2a, 0x00, - 0x00, 0x00, 0xf8, 0x02, 0x80, 0x0f, 0x00, 0x00, 0x10, 0x00, - 0x00, 0x00, 0xf8, 0x02, 0x80, 0x0f, 0x00, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x06, 0xc0, 0x01, 0x00, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x14, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x70, 0x00, 0x00, 0x85, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x00, 0x30, 0x00, 0x20, 0x3c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xe0, 0xe0, 0x80, 0x00, 0x0b, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xe0, 0x79, 0x83, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x19, 0x22, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x28, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x20, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x80, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x03, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x02, 0x90, 0x00, 0x00, 0x00, 0x40, - 0x02, 0x02, 0x00, 0x80, 0x80, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x40, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x20, 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x30, 0x28, 0x90, 0x05, 0x00, 0x00, 0x40, - 0x00, 0x00, 0x00, 0x48, 0x05, 0x00, 0x21, 0x00, 0x00, 0x0c, - 0x00, 0x00, 0x00, 0x84, 0x00, 0x54, 0x05, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x40, 0x05, 0x80, 0x41, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x01, 0x00, 0x00, 0x20, - 0x00, 0x00, 0x00, 0x08, 0x20, 0x20, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x84, 0x82, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x48, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x40, - 0x04, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x21, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x90, 0x40, 0x40, 0x04, 0x00, 0x00, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x41, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x40, 0xa0, 0x00, 0x00, 0x00, 0x50, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x40, - 0x40, 0x00, 0x00, 0x00, 0x40, 0x02, 0x04, 0x00, 0x00, 0x30, - 0x00, 0x00, 0x00, 0x80, 0x84, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc2, 0x20, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x10, 0xc0, 0x05, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x02, 0x00, 0x00, 0x10, - 0x08, 0x00, 0x00, 0x80, 0x00, 0x10, 0x10, 0x00, 0x00, 0x08, - 0x10, 0x02, 0x00, 0x00, 0x21, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x18, 0x08, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x3a, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x40, 0x04, - 0x00, 0x60, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x00, 0xb8, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x08, 0x00, 0x00, - 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x60, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x01, 0x00, 0x01, 0x10, 0x04, 0x00, 0x00, - 0x00, 0x40, 0x00, 0x02, 0x02, 0x90, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1c, 0x20, 0x05, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x20, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xc4, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x06, 0x40, 0x00, 0x00, 0x40, 0x00, 0x02, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, - 0x00, 0x00, 0x42, 0x00, 0x00, 0x04, 0x20, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x20, 0x05, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x81, 0x07, 0x01, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x02, 0x80, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0xc0, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x0d, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, - 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xd0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x10, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, - 0x02, 0x02, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x00, 0x40, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, - 0x00, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x80, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; -GLint exp_lists[7]; - - -static void Init(void) -{ - GLint i; - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClearIndex(0.0); - - glPixelStorei(GL_UNPACK_LSB_FIRST, GL_TRUE); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - for (i = 0; i < 7; i++) { - exp_lists[i] = glGenLists(1); - glNewList(exp_lists[i], GL_COMPILE); - glBitmap(80, 80, 40.0, 40.0, 0.0, 0.0, exp_bits[i]); - glEndList(); - } - - abuse = GL_FALSE; - useLists = GL_TRUE; -} - -static void Reshape(int width, int height) -{ - - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(-175, 175, -175, 175); - glMatrixMode(GL_MODELVIEW); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - case '1': - useLists = !useLists; - break; - case '2': - abuse = !abuse; - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Draw(void) -{ - GLint i, j; - - glClear(GL_COLOR_BUFFER_BIT); - - for (i = 0; i < 7; i++) { - for (j = 0; j < 40; j++) { - switch (j % 7) { - case 0: - SetColor(COLOR_YELLOW); - break; - case 1: - SetColor(COLOR_GREEN); - break; - case 2: - SetColor(COLOR_BLUE); - break; - case 3: - SetColor(COLOR_MAGENTA); - break; - case 4: - SetColor(COLOR_CYAN); - break; - case 5: - SetColor(COLOR_WHITE); - break; - case 6: - SetColor(COLOR_RED); - break; - } - glRasterPos3i((j*3)%5, (j*3)%8, 0); - - if (useLists) { - glCallList(exp_lists[i]); - } else { - glBitmap(80, 80, 40.0, 40.0, 0.0, 0.0, exp_bits[i]); - } - if (!abuse) { - break; - } - } - - if (i == 6) { - break; - } - - for (j = 0; j < 40; j++) { - SetColor(COLOR_BLACK); - glRasterPos3i((j*3)%5, (j*3)%8, 0); - if (useLists) { - glCallList(exp_lists[i]); - } else { - glBitmap(80, 80, 40.0, 40.0, 0.0, 0.0, exp_bits[i]); - } - if (!abuse) { - break; - } - } - } - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - rgb = GL_TRUE; - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-ci") == 0) { - rgb = GL_FALSE; - } else if (strcmp(argv[i], "-rgb") == 0) { - rgb = GL_TRUE; - } else if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300); - - windType = (rgb) ? GLUT_RGB : GLUT_INDEX; - windType |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(windType); - - if (glutCreateWindow("Bitmap Test") == GL_FALSE) { - exit(1); - } - - InitMap(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/blendeq.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/blendeq.c deleted file mode 100644 index f78afd3038..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/blendeq.c +++ /dev/null @@ -1,319 +0,0 @@ -/* -** blendeq.c - Demonstrates the use of the blend_minmax, blend_subtract, -** and blend_logic_op extensions using glBlendEquationEXT. -** -** Over a two-color backround, draw rectangles using twelve blend -** options. The values are read back as UNSIGNED_BYTE and printed -** in hex over each value. These values are useful for logic -** op comparisons when channels are 8 bits deep. -*/ - -#include -#include -#include -#ifdef _WIN32 -#include -#endif -#define GL_GLEXT_PROTOTYPES -#include - -GLenum doubleBuffer; -static int dithering = 0; -int use11ops = 0; -int supportlogops = 0; -static int doPrint = 1; -static int deltaY; -GLint windW, windH; - -static void DrawString(const char *string) -{ - int i; - - for (i = 0; string[i]; i++) - glutBitmapCharacter(GLUT_BITMAP_9_BY_15, string[i]); -} - -static void Init(void) -{ - - glDisable(GL_DITHER); - glShadeModel(GL_FLAT); -} - -static void Reshape(int width, int height) -{ - - windW = (GLint)width; - windH = (GLint)height; - - glViewport(0, 0, (GLint)width, (GLint)height); - deltaY = windH /16; - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(0, windW, 0, windH); - glMatrixMode(GL_MODELVIEW); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - case 'd': - dithering = !dithering; - break; - case 'l': - if (supportlogops == 3) - use11ops = (!use11ops); - if (use11ops) - printf("Using GL 1.1 color logic ops.\n"); - else printf("Using GL_EXT_blend_logic_op.\n"); - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void PrintColorStrings( void ) -{ - GLubyte ubbuf[3]; - int i, xleft, xright; - char colorString[18]; - - xleft = 5 + windW/4; - xright = 5 + windW/2; - - for (i = windH - deltaY + 4; i > 0; i-=deltaY) { - glReadPixels(xleft, i+10, 1, 1, GL_RGB, GL_UNSIGNED_BYTE, ubbuf); - sprintf(colorString, "(0x%x, 0x%x, 0x%x)", - ubbuf[0], ubbuf[1], ubbuf[2]); - glRasterPos2f(xleft, i); - DrawString(colorString); - glReadPixels(xright, i+10, 1, 1, GL_RGB, GL_UNSIGNED_BYTE, ubbuf); - sprintf(colorString, "(0x%x, 0x%x, 0x%x)", - ubbuf[0], ubbuf[1], ubbuf[2]); - glRasterPos2f(xright, i); - DrawString(colorString); - } -} - -static void Draw(void) -{ - int stringOffset = 5, stringx = 8; - int x1, x2, xleft, xright; - int i; - - (dithering) ? glEnable(GL_DITHER) : glDisable(GL_DITHER); - glDisable(GL_BLEND); - if (supportlogops & 2) - glDisable(GL_COLOR_LOGIC_OP); - - glClearColor(0.5, 0.6, 0.1, 1.0); - glClear(GL_COLOR_BUFFER_BIT); - - /* Draw background */ - glColor3f(0.1, 0.1, 1.0); - glRectf(0.0, 0.0, windW/2, windH); - - /* Draw labels */ - glColor3f(0.8, 0.8, 0.0); - i = windH - deltaY + stringOffset; - glRasterPos2f(stringx, i); i -= deltaY; - DrawString("SOURCE"); - glRasterPos2f(stringx, i); i -= deltaY; - DrawString("DEST"); - glRasterPos2f(stringx, i); i -= deltaY; - DrawString("min"); - glRasterPos2f(stringx, i); i -= deltaY; - DrawString("max"); - glRasterPos2f(stringx, i); i -= deltaY; - DrawString("subtract"); - glRasterPos2f(stringx, i); i -= deltaY; - DrawString("reverse_subtract"); - glRasterPos2f(stringx, i); i -= deltaY; - DrawString("clear"); - glRasterPos2f(stringx, i); i -= deltaY; - DrawString("set"); - glRasterPos2f(stringx, i); i -= deltaY; - DrawString("copy"); - glRasterPos2f(stringx, i); i -= deltaY; - DrawString("noop"); - glRasterPos2f(stringx, i); i -= deltaY; - DrawString("and"); - glRasterPos2f(stringx, i); i -= deltaY; - DrawString("invert"); - glRasterPos2f(stringx, i); i -= deltaY; - DrawString("or"); - glRasterPos2f(stringx, i); i -= deltaY; - DrawString("xor"); - - - i = windH - deltaY; - x1 = windW/4; - x2 = 3 * windW/4; - xleft = 5 + windW/4; - xright = 5 + windW/2; - - /* Draw foreground color for comparison */ - glColor3f(0.9, 0.2, 0.8); - glRectf(x1, i, x2, i+deltaY); - - /* Leave one rectangle of background color */ - - /* Begin test cases */ - glEnable(GL_BLEND); - glBlendFunc(GL_ONE, GL_ONE); - - i -= 2*deltaY; - glBlendEquationEXT(GL_MIN_EXT); - glRectf(x1, i, x2, i+deltaY); - - i -= deltaY; - glBlendEquationEXT(GL_MAX_EXT); - glRectf(x1, i, x2, i+deltaY); - - i -= deltaY; - glBlendEquationEXT(GL_FUNC_SUBTRACT_EXT); - glRectf(x1, i, x2, i+deltaY); - - i -= deltaY; - glBlendEquationEXT(GL_FUNC_REVERSE_SUBTRACT_EXT); - glRectf(x1, i, x2, i+deltaY); - - glBlendFunc(GL_ONE, GL_ZERO); - i -= deltaY; - if (!use11ops) - glBlendEquationEXT(GL_LOGIC_OP); - else - glEnable(GL_COLOR_LOGIC_OP); - glLogicOp(GL_CLEAR); - glRectf(x1, i, x2, i+deltaY); - - i -= deltaY; - glLogicOp(GL_SET); - glRectf(x1, i, x2, i+deltaY); - - i -= deltaY; - glLogicOp(GL_COPY); - glRectf(x1, i, x2, i+deltaY); - - i -= deltaY; - glLogicOp(GL_NOOP); - glRectf(x1, i, x2, i+deltaY); - - i -= deltaY; - glLogicOp(GL_AND); - glRectf(x1, i, x2, i+deltaY); - - i -= deltaY; - glLogicOp(GL_INVERT); - glRectf(x1, i, x2, i+deltaY); - - i -= deltaY; - glLogicOp(GL_OR); - glRectf(x1, i, x2, i+deltaY); - - i -= deltaY; - glLogicOp(GL_XOR); - glRectf(x1, i, x2, i+deltaY); - glRectf(x1, i+10, x2, i+5); - - if (doPrint) { - glDisable(GL_BLEND); - if (supportlogops & 2) - glDisable(GL_COLOR_LOGIC_OP); - glColor3f(1.0, 1.0, 1.0); - PrintColorStrings(); - } - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } - -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - GLenum type; - char *s; - char *extName1 = "GL_EXT_blend_logic_op"; - char *extName2 = "GL_EXT_blend_minmax"; - char *extName3 = "GL_EXT_blend_subtract"; - char *version; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 800, 400); - - type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Blend Equation") == GL_FALSE) { - exit(1); - } - - /* Make sure blend_logic_op extension is there. */ - s = (char *) glGetString(GL_EXTENSIONS); - version = (char*) glGetString(GL_VERSION); - if (!s) - exit(1); - if (strstr(s,extName1)) { - supportlogops = 1; - use11ops = 0; - printf("blend_logic_op extension available.\n"); - } - if (strncmp(version,"1.1",3)>=0) { - supportlogops += 2; - use11ops = 1; - printf("1.1 color logic ops available.\n"); - } - if (supportlogops == 0) { - printf("Blend_logic_op extension and GL 1.1 not present.\n"); - exit(1); - } - if (strstr(s,extName2) == 0) { - printf("Blend_minmax extension is not present.\n"); - exit(1); - } - if (strstr(s,extName3) == 0) { - printf("Blend_subtract extension is not present.\n"); - exit(1); - } - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/blendxor.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/blendxor.c deleted file mode 100644 index 5bc4aa9bea..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/blendxor.c +++ /dev/null @@ -1,206 +0,0 @@ -/* -** blendxor.c - Demonstrates the use of the blend_logic_op -** extension to draw hilights. Using XOR to draw the same -** image twice restores the background to its original value. -*/ - -#include -#include -#ifndef _WIN32 -#include -#endif -#include -#ifdef _WIN32 -#include -#endif -#define GL_GLEXT_LEGACY -#define GL_GLEXT_PROTOTYPES -#include -#include - - -GLenum doubleBuffer; -int dithering = 0; -int use11ops = 0; -int supportlogops = 0; -GLint windW, windH; - -static void Init(void) -{ - glDisable(GL_DITHER); - glShadeModel(GL_FLAT); -} - -static void Reshape(int width, int height) -{ - - windW = (GLint)width; - windH = (GLint)height; - - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(0, 400, 0, 400); - glMatrixMode(GL_MODELVIEW); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - case 'd': - dithering = !dithering; - break; - case 'l': - if (supportlogops == 3) - use11ops = (!use11ops); - if (use11ops) - printf("Using GL 1.1 color logic ops.\n"); - else printf("Using GL_EXT_blend_logic_op.\n"); - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Draw(void) -{ - int i; - - glDisable(GL_BLEND); - if (supportlogops & 2) - glDisable(GL_COLOR_LOGIC_OP); - - (dithering) ? glEnable(GL_DITHER) : glDisable(GL_DITHER); - - glClearColor(0.5, 0.6, 0.1, 1.0); - glClear(GL_COLOR_BUFFER_BIT); - - /* Draw background prims */ - glColor3f(0.1, 0.1, 1.0); - glBegin(GL_TRIANGLES); - glVertex2i(5, 5); - glVertex2i(130, 50); - glVertex2i(100, 300); - glEnd(); - glColor3f(0.5, 0.2, 0.9); - glBegin(GL_TRIANGLES); - glVertex2i(200, 100); - glVertex2i(330, 50); - glVertex2i(340, 400); - glEnd(); - - glEnable(GL_BLEND); - if (!use11ops) - glBlendEquationEXT(GL_LOGIC_OP); - else - glEnable(GL_COLOR_LOGIC_OP); - glLogicOp(GL_XOR); - - /* Draw a set of rectangles across the window */ - glColor3f(0.9, 0.2, 0.8); - for(i = 0; i < 400; i+=60) { - glBegin(GL_POLYGON); - glVertex2i(i, 100); - glVertex2i(i+50, 100); - glVertex2i(i+50, 200); - glVertex2i(i, 200); - glEnd(); - } - glFlush(); /* Added by Brian Paul */ -#ifndef _WIN32 - sleep(2); -#endif - - /* Redraw the rectangles, which should erase them */ - for(i = 0; i < 400; i+=60) { - glBegin(GL_POLYGON); - glVertex2i(i, 100); - glVertex2i(i+50, 100); - glVertex2i(i+50, 200); - glVertex2i(i, 200); - glEnd(); - } - glFlush(); - - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - GLenum type; - char *s; - char *extName = "GL_EXT_blend_logic_op"; - char *version; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 400, 400); - - type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Blend XOR") == GL_FALSE) { - exit(1); - } - - /* Make sure blend_logic_op extension is there. */ - s = (char *) glGetString(GL_EXTENSIONS); - version = (char*) glGetString(GL_VERSION); - if (!s) - exit(1); - if (strstr(s,extName)) { - supportlogops = 1; - use11ops = 0; - printf("blend_logic_op extension available.\n"); - } - if (strncmp(version,"1.1",3)>=0) { - supportlogops += 2; - use11ops = 1; - printf("1.1 color logic ops available.\n"); - } - if (supportlogops == 0) { - printf("Blend_logic_op extension and GL 1.1 not present.\n"); - exit(1); - } - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/copy.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/copy.c deleted file mode 100644 index 391c637d6f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/copy.c +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include - - -#include "loadppm.c" - -GLenum doubleBuffer; -GLint windW, windH; - -char *fileName = 0; -PPMImage *image; -float point[3]; -float zoom; -GLint x, y; - -static void Init(void) -{ - - glClearColor(0.0, 0.0, 0.0, 0.0); - - x = 0; - y = windH; - zoom = 1.8; -} - -static void Reshape(int width, int height) -{ - - windW = (GLint)width; - windH = (GLint)height; - - glViewport(0, 0, windW, windH); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(0, windW, 0, windH); - glMatrixMode(GL_MODELVIEW); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - case 'Z': - zoom += 0.2; - break; - case 'z': - zoom -= 0.2; - if (zoom < 0.2) { - zoom = 0.2; - } - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Mouse(int button, int state, int mouseX, int mouseY) -{ - if (state != GLUT_DOWN) - return; - x = (GLint)mouseX; - y = (GLint)mouseY; - - glutPostRedisplay(); -} - -static void Draw(void) -{ - - glClear(GL_COLOR_BUFFER_BIT); - - point[0] = (windW / 2) - (image->sizeX / 2); - point[1] = (windH / 2) - (image->sizeY / 2); - point[2] = 0; - glRasterPos3fv(point); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glPixelZoom(1.0, 1.0); - glDrawPixels(image->sizeX, image->sizeY, GL_RGB, GL_UNSIGNED_BYTE, - image->data); - - point[0] = (float)x; - point[1] = windH - (float)y; - point[2] = 0.0; - glRasterPos3fv(point); - - glPixelZoom(zoom, zoom); - glCopyPixels((windW/2)-(image->sizeX/2), - (windH/2)-(image->sizeY/2), - image->sizeX, image->sizeY, GL_COLOR); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else if (strcmp(argv[i], "-f") == 0) { - if (i+1 >= argc || argv[i+1][0] == '-') { - printf("-f (No file name).\n"); - return GL_FALSE; - } else { - fileName = argv[++i]; - } - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - if (fileName == 0) { - printf("No image file.\n"); - exit(1); - } - - image = LoadPPM(fileName); - - windW = 300; - windH = 300; - glutInitWindowPosition(0, 0); glutInitWindowSize( windW, windH); - - type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Copy Test") == GL_FALSE) { - exit(1); - } - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutMouseFunc(Mouse); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/cursor.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/cursor.c deleted file mode 100644 index de8fc58556..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/cursor.c +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include - - -GLenum rgb, doubleBuffer, windType; -int windX, windY; -int cursor; - - -#include "tkmap.c" - -static void Init(void) -{ - cursor = 0; - glutSetCursor(cursor); - glClearColor(0.0, 0.0, 0.0, 0.0); - glClearIndex(0.0); -} - -static void Reshape(int width, int height) -{ - - windX = width; - windY = height; - glViewport(0, 0, windX, windY); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(0, windX, 0, windY); - glMatrixMode(GL_MODELVIEW); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - case 32: - cursor++; - if (cursor > 19) { - cursor = 0; - } - glutSetCursor(cursor); - } -} - -static void Draw(void) -{ - - glClear(GL_COLOR_BUFFER_BIT); - - glBegin(GL_POLYGON); - SetColor(COLOR_BLACK); - glVertex2i(0, 0); - SetColor(COLOR_RED); - glVertex2i(windX, 0); - SetColor(COLOR_GREEN); - glVertex2i(windX, windY); - SetColor(COLOR_BLUE); - glVertex2i(0, windY); - glEnd(); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - rgb = GL_TRUE; - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-ci") == 0) { - rgb = GL_FALSE; - } else if (strcmp(argv[i], "-rgb") == 0) { - rgb = GL_TRUE; - } else if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - windX = 300; - windY = 300; - glutInitWindowPosition(0, 0); glutInitWindowSize( windX, windY); - - windType = (rgb) ? GLUT_RGB : GLUT_INDEX; - windType |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(windType); - - if (glutCreateWindow("Cursor Test") == GL_FALSE) { - exit(1); - } - - InitMap(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/depth.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/depth.c deleted file mode 100644 index afe2ec17a3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/depth.c +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include - - -#define CI_OFFSET_1 16 -#define CI_OFFSET_2 32 - - -GLenum rgb, doubleBuffer; - -GLenum antiAlias, stipple; -GLubyte stippleBits[32*4] = { - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, -}; - - -#include "tkmap.c" - -static void Init(void) -{ - GLint i; - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClearIndex(0.0); - - if (!rgb) { - for (i = 0; i < 16; i++) { - glutSetColor(i+CI_OFFSET_1, 0.0, 0.0, i/15.0); - glutSetColor(i+CI_OFFSET_2, 0.0, i/15.0, 0.0); - } - } - - glPolygonStipple(stippleBits); - - antiAlias = GL_FALSE; - stipple = GL_FALSE; -} - -static void Reshape(int width, int height) -{ - - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); - glMatrixMode(GL_MODELVIEW); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - case '1': - antiAlias = !antiAlias; - break; - case '2': - stipple = !stipple; - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Draw(void) -{ - GLint ci1, ci2; - - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); - - if (antiAlias) { - ci1 = CI_OFFSET_1; - ci2 = CI_OFFSET_2; - glBlendFunc(GL_SRC_ALPHA, GL_ONE); - glEnable(GL_BLEND); - glEnable(GL_POLYGON_SMOOTH); - glDisable(GL_DEPTH_TEST); - } else { - ci1 = COLOR_BLUE; - ci2 = COLOR_GREEN; - glDisable(GL_BLEND); - glDisable(GL_POLYGON_SMOOTH); - glEnable(GL_DEPTH_TEST); - } - - if (stipple) { - glEnable(GL_POLYGON_STIPPLE); - } else { - glDisable(GL_POLYGON_STIPPLE); - } - - glBegin(GL_TRIANGLES); - (rgb) ? glColor3fv(RGBMap[COLOR_BLUE]) : glIndexi(ci1); - glVertex3f( 0.9, -0.9, -30.0); - glVertex3f( 0.9, 0.9, -30.0); - glVertex3f(-0.9, 0.0, -30.0); - (rgb) ? glColor3fv(RGBMap[COLOR_GREEN]) : glIndexi(ci2); - glVertex3f(-0.9, -0.9, -40.0); - glVertex3f(-0.9, 0.9, -40.0); - glVertex3f( 0.9, 0.0, -25.0); - glEnd(); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - rgb = GL_TRUE; - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-ci") == 0) { - rgb = GL_FALSE; - } else if (strcmp(argv[i], "-rgb") == 0) { - rgb = GL_TRUE; - } else if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300); - - type = GLUT_DEPTH; - type |= (rgb) ? GLUT_RGB : GLUT_INDEX; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Depth Test") == GL_FALSE) { - exit(1); - } - - InitMap(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/eval.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/eval.c deleted file mode 100644 index 3ad9c5468f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/eval.c +++ /dev/null @@ -1,472 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include -#include - - -#define VORDER 10 -#define CORDER 10 -#define TORDER 3 - -#define VMAJOR_ORDER 2 -#define VMINOR_ORDER 3 - -#define CMAJOR_ORDER 2 -#define CMINOR_ORDER 2 - -#define TMAJOR_ORDER 2 -#define TMINOR_ORDER 2 - -#define VDIM 4 -#define CDIM 4 -#define TDIM 2 - -#define ONE_D 1 -#define TWO_D 2 - -#define EVAL 3 -#define MESH 4 - - -GLenum doubleBuffer; - -float rotX = 0.0, rotY = 0.0, translateZ = -1.0; - -GLenum arrayType = ONE_D; -GLenum colorType = GL_FALSE; -GLenum textureType = GL_FALSE; -GLenum polygonFilled = GL_FALSE; -GLenum lighting = GL_FALSE; -GLenum mapPoint = GL_FALSE; -GLenum mapType = EVAL; - -double point1[10*4] = { - -0.5, 0.0, 0.0, 1.0, - -0.4, 0.5, 0.0, 1.0, - -0.3,-0.5, 0.0, 1.0, - -0.2, 0.5, 0.0, 1.0, - -0.1,-0.5, 0.0, 1.0, - 0.0, 0.5, 0.0, 1.0, - 0.1,-0.5, 0.0, 1.0, - 0.2, 0.5, 0.0, 1.0, - 0.3,-0.5, 0.0, 1.0, - 0.4, 0.0, 0.0, 1.0, -}; -double cpoint1[10*4] = { - 0.0, 0.0, 1.0, 1.0, - 0.3, 0.0, 0.7, 1.0, - 0.6, 0.0, 0.3, 1.0, - 1.0, 0.0, 0.0, 1.0, - 1.0, 0.3, 0.0, 1.0, - 1.0, 0.6, 0.0, 1.0, - 1.0, 1.0, 0.0, 1.0, - 1.0, 1.0, 0.5, 1.0, - 1.0, 1.0, 1.0, 1.0, -}; -double tpoint1[11*4] = { - 0.0, 0.0, 0.0, 1.0, - 0.0, 0.1, 0.0, 1.0, - 0.0, 0.2, 0.0, 1.0, - 0.0, 0.3, 0.0, 1.0, - 0.0, 0.4, 0.0, 1.0, - 0.0, 0.5, 0.0, 1.0, - 0.0, 0.6, 0.0, 1.0, - 0.0, 0.7, 0.0, 1.0, - 0.0, 0.8, 0.0, 1.0, - 0.0, 0.9, 0.0, 1.0, -}; -double point2[2*3*4] = { - -0.5, -0.5, 0.5, 1.0, - 0.0, 1.0, 0.5, 1.0, - 0.5, -0.5, 0.5, 1.0, - -0.5, 0.5, -0.5, 1.0, - 0.0, -1.0, -0.5, 1.0, - 0.5, 0.5, -0.5, 1.0, -}; -double cpoint2[2*2*4] = { - 0.0, 0.0, 0.0, 1.0, - 0.0, 0.0, 1.0, 1.0, - 0.0, 1.0, 0.0, 1.0, - 1.0, 1.0, 1.0, 1.0, -}; -double tpoint2[2*2*2] = { - 0.0, 0.0, 0.0, 1.0, - 1.0, 0.0, 1.0, 1.0, -}; -float textureImage[4*2*4] = { - 1.0, 1.0, 1.0, 1.0, - 1.0, 0.0, 0.0, 1.0, - 1.0, 0.0, 0.0, 1.0, - 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, - 1.0, 0.0, 0.0, 1.0, - 1.0, 0.0, 0.0, 1.0, - 1.0, 1.0, 1.0, 1.0, -}; - - -static void Init(void) -{ - static float ambient[] = {0.1, 0.1, 0.1, 1.0}; - static float diffuse[] = {1.0, 1.0, 1.0, 1.0}; - static float position[] = {0.0, 0.0, -150.0, 0.0}; - static float front_mat_diffuse[] = {1.0, 0.2, 1.0, 1.0}; - static float back_mat_diffuse[] = {1.0, 1.0, 0.2, 1.0}; - static float lmodel_ambient[] = {1.0, 1.0, 1.0, 1.0}; - static float lmodel_twoside[] = {GL_TRUE}; - static float decal[] = {GL_DECAL}; - static float repeat[] = {GL_REPEAT}; - static float nr[] = {GL_NEAREST}; - - glFrontFace(GL_CCW); - - glEnable(GL_DEPTH_TEST); - - glMap1d(GL_MAP1_VERTEX_4, 0.0, 1.0, VDIM, VORDER, point1); - glMap1d(GL_MAP1_COLOR_4, 0.0, 1.0, CDIM, CORDER, cpoint1); - - glMap2d(GL_MAP2_VERTEX_4, 0.0, 1.0, VMINOR_ORDER*VDIM, VMAJOR_ORDER, 0.0, - 1.0, VDIM, VMINOR_ORDER, point2); - glMap2d(GL_MAP2_COLOR_4, 0.0, 1.0, CMINOR_ORDER*CDIM, CMAJOR_ORDER, 0.0, - 1.0, CDIM, CMINOR_ORDER, cpoint2); - glMap2d(GL_MAP2_TEXTURE_COORD_2, 0.0, 1.0, TMINOR_ORDER*TDIM, - TMAJOR_ORDER, 0.0, 1.0, TDIM, TMINOR_ORDER, tpoint2); - - glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse); - glLightfv(GL_LIGHT0, GL_POSITION, position); - - glMaterialfv(GL_FRONT, GL_DIFFUSE, front_mat_diffuse); - glMaterialfv(GL_BACK, GL_DIFFUSE, back_mat_diffuse); - - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); - glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside); - - glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, decal); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, repeat); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, repeat); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, nr); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, nr); - glTexImage2D(GL_TEXTURE_2D, 0, 4, 2, 4, 0, GL_RGBA, GL_FLOAT, - (GLvoid *)textureImage); -} - -static void DrawPoints1(void) -{ - GLint i; - - glColor3f(0.0, 1.0, 0.0); - glPointSize(2); - glBegin(GL_POINTS); - for (i = 0; i < VORDER; i++) { - glVertex4dv(&point1[i*4]); - } - glEnd(); -} - -static void DrawPoints2(void) -{ - GLint i, j; - - glColor3f(1.0, 0.0, 1.0); - glPointSize(2); - glBegin(GL_POINTS); - for (i = 0; i < VMAJOR_ORDER; i++) { - for (j = 0; j < VMINOR_ORDER; j++) { - glVertex4dv(&point2[i*4*VMINOR_ORDER+j*4]); - } - } - glEnd(); -} - -static void DrawMapEval1(float du) -{ - float u; - - glColor3f(1.0, 0.0, 0.0); - glBegin(GL_LINE_STRIP); - for (u = 0.0; u < 1.0; u += du) { - glEvalCoord1d(u); - } - glEvalCoord1d(1.0); - glEnd(); -} - -static void DrawMapEval2(float du, float dv) -{ - float u, v, tmp; - - glColor3f(1.0, 0.0, 0.0); - for (v = 0.0; v < 1.0; v += dv) { - glBegin(GL_QUAD_STRIP); - for (u = 0.0; u <= 1.0; u += du) { - glEvalCoord2d(u,v); - tmp = (v + dv < 1.0) ? (v + dv) : 1.0; - glEvalCoord2d(u, tmp); - } - glEvalCoord2d(1.0, v); - glEvalCoord2d(1.0, v+dv); - glEnd(); - } -} - -static void RenderEval(void) -{ - - if (colorType) { - glEnable(GL_MAP1_COLOR_4); - glEnable(GL_MAP2_COLOR_4); - } else { - glDisable(GL_MAP1_COLOR_4); - glDisable(GL_MAP2_COLOR_4); - } - - if (textureType) { - glEnable(GL_TEXTURE_2D); - glEnable(GL_MAP2_TEXTURE_COORD_2); - } else { - glDisable(GL_TEXTURE_2D); - glDisable(GL_MAP2_TEXTURE_COORD_2); - } - - if (polygonFilled) { - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - } else { - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - } - - glShadeModel(GL_SMOOTH); - - switch (mapType) { - case EVAL: - switch (arrayType) { - case ONE_D: - glDisable(GL_MAP2_VERTEX_4); - glEnable(GL_MAP1_VERTEX_4); - DrawPoints1(); - DrawMapEval1(0.1/VORDER); - break; - case TWO_D: - glDisable(GL_MAP1_VERTEX_4); - glEnable(GL_MAP2_VERTEX_4); - DrawPoints2(); - DrawMapEval2(0.1/VMAJOR_ORDER,0.1/VMINOR_ORDER); - break; - default: - break; - } - break; - case MESH: - switch (arrayType) { - case ONE_D: - DrawPoints1(); - glDisable(GL_MAP2_VERTEX_4); - glEnable (GL_MAP1_VERTEX_4); - glColor3f(0.0, 0.0, 1.0); - glMapGrid1d(40, 0.0, 1.0); - if (mapPoint) { - glPointSize(2); - glEvalMesh1(GL_POINT, 0, 40); - } else { - glEvalMesh1(GL_LINE, 0, 40); - } - break; - case TWO_D: - DrawPoints2(); - glDisable(GL_MAP1_VERTEX_4); - glEnable(GL_MAP2_VERTEX_4); - glColor3f(0.0, 0.0, 1.0); - glMapGrid2d(20, 0.0, 1.0, 20, 0.0, 1.0); - if (mapPoint) { - glPointSize(2); - glEvalMesh2(GL_POINT, 0, 20, 0, 20); - } else if (polygonFilled) { - glEvalMesh2(GL_FILL, 0, 20, 0, 20); - } else { - glEvalMesh2(GL_LINE, 0, 20, 0, 20); - } - break; - default: - break; - } - break; - default: - break; - } -} - -static void Reshape(int width, int height) -{ - - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 10.0); - glMatrixMode(GL_MODELVIEW); -} - -static void Key2(int key, int x, int y) -{ - switch (key) { - case GLUT_KEY_LEFT: - rotY -= 30; - break; - case GLUT_KEY_RIGHT: - rotY += 30; - break; - case GLUT_KEY_UP: - rotX -= 30; - break; - case GLUT_KEY_DOWN: - rotX += 30; - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Key(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(1); - case '1': - arrayType = ONE_D; - break; - case '2': - arrayType = TWO_D; - break; - case 'e': - mapType = EVAL; - break; - case 'm': - mapType = MESH; - break; - case 'f': - polygonFilled = !polygonFilled; - break; - case 'p': - mapPoint = !mapPoint; - break; - case 'c': - colorType = !colorType; - break; - case 't': - textureType = !textureType; - break; - case 'l': - lighting =! lighting; - if (lighting) { - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_AUTO_NORMAL); - } else { - glDisable(GL_LIGHTING); - glDisable(GL_LIGHT0); - glDisable(GL_AUTO_NORMAL); - } - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Draw(void) -{ - - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - - glTranslatef(0.0, 0.0 , translateZ); - glRotatef(rotX, 1, 0, 0); - glRotatef(rotY, 0, 1, 0); - RenderEval(); - - glPopMatrix(); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300); - - type = GLUT_RGB | GLUT_DEPTH; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Evaluator Test") == GL_FALSE) { - exit(1); - } - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(Key2); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/fog.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/fog.c deleted file mode 100644 index 3f3ffdbcc7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/fog.c +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include - -GLenum rgb, doubleBuffer; - -#include "tkmap.c" - -double plane[4] = { - 1.0, 0.0, -1.0, 0.0 -}; -float rotX = 5.0, rotY = -5.0, zTranslate = -65.0; -float fogDensity = 0.02; -GLint cubeList = 1; - -float scp[18][3] = { - { - 1.000000, 0.000000, 0.000000 - }, - { - 1.000000, 0.000000, 5.000000 - }, - { - 0.707107, 0.707107, 0.000000 - }, - { - 0.707107, 0.707107, 5.000000 - }, - { - 0.000000, 1.000000, 0.000000 - }, - { - 0.000000, 1.000000, 5.000000 - }, - { - -0.707107, 0.707107, 0.000000 - }, - { - -0.707107, 0.707107, 5.000000 - }, - { - -1.000000, 0.000000, 0.000000 - }, - { - -1.000000, 0.000000, 5.000000 - }, - { - -0.707107, -0.707107, 0.000000 - }, - { - -0.707107, -0.707107, 5.000000 - }, - { - 0.000000, -1.000000, 0.000000 - }, - { - 0.000000, -1.000000, 5.000000 - }, - { - 0.707107, -0.707107, 0.000000 - }, - { - 0.707107, -0.707107, 5.000000 - }, - { - 1.000000, 0.000000, 0.000000 - }, - { - 1.000000, 0.000000, 5.000000 - }, -}; - - -static void Build_lists(void) -{ - - glNewList(cubeList, GL_COMPILE); - glBegin(GL_TRIANGLE_STRIP); - glNormal3fv(scp[0]); glVertex3fv(scp[0]); - glNormal3fv(scp[0]); glVertex3fv(scp[1]); - glNormal3fv(scp[2]); glVertex3fv(scp[2]); - glNormal3fv(scp[2]); glVertex3fv(scp[3]); - glNormal3fv(scp[4]); glVertex3fv(scp[4]); - glNormal3fv(scp[4]); glVertex3fv(scp[5]); - glNormal3fv(scp[6]); glVertex3fv(scp[6]); - glNormal3fv(scp[6]); glVertex3fv(scp[7]); - glNormal3fv(scp[8]); glVertex3fv(scp[8]); - glNormal3fv(scp[8]); glVertex3fv(scp[9]); - glNormal3fv(scp[10]); glVertex3fv(scp[10]); - glNormal3fv(scp[10]); glVertex3fv(scp[11]); - glNormal3fv(scp[12]); glVertex3fv(scp[12]); - glNormal3fv(scp[12]); glVertex3fv(scp[13]); - glNormal3fv(scp[14]); glVertex3fv(scp[14]); - glNormal3fv(scp[14]); glVertex3fv(scp[15]); - glNormal3fv(scp[16]); glVertex3fv(scp[16]); - glNormal3fv(scp[16]); glVertex3fv(scp[17]); - glEnd(); - glEndList(); -} - -static void Init(void) -{ - static float ambient[] = {0.1, 0.1, 0.1, 1.0}; - static float diffuse[] = {1.0, 1.0, 1.0, 1.0}; - static float position[] = {90.0, 90.0, 0.0, 0.0}; - static float front_mat_shininess[] = {30.0}; - static float front_mat_specular[] = {0.0, 0.0, 0.0, 1.0}; - static float front_mat_diffuse[] = {0.0, 1.0, 0.0, 1.0}; - static float back_mat_shininess[] = {50.0}; - static float back_mat_specular[] = {0.0, 0.0, 1.0, 1.0}; - static float back_mat_diffuse[] = {1.0, 0.0, 0.0, 1.0}; - static float lmodel_ambient[] = {0.0, 0.0, 0.0, 1.0}; - static float fog_color[] = {0.8, 0.8, 0.8, 1.0}; - - glFrontFace(GL_CW); - - glEnable(GL_DEPTH_TEST); - - glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse); - glLightfv(GL_LIGHT0, GL_POSITION, position); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); - glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - - glMaterialfv(GL_FRONT, GL_SHININESS, front_mat_shininess); - glMaterialfv(GL_FRONT, GL_SPECULAR, front_mat_specular); - glMaterialfv(GL_FRONT, GL_DIFFUSE, front_mat_diffuse); - glMaterialfv(GL_BACK, GL_SHININESS, back_mat_shininess); - glMaterialfv(GL_BACK, GL_SPECULAR, back_mat_specular); - glMaterialfv(GL_BACK, GL_DIFFUSE, back_mat_diffuse); - - glEnable(GL_FOG); - glFogi(GL_FOG_MODE, GL_EXP); - glFogf(GL_FOG_DENSITY, fogDensity); - if (rgb) { - glFogfv(GL_FOG_COLOR, fog_color); - glClearColor(0.8, 0.8, 0.8, 1.0); - } else { - glFogi(GL_FOG_INDEX, 1<<5); - SetFogRamp(5, 3); - glClearIndex(128); - } - - Build_lists(); -} - -static void Reshape(int width, int height) -{ - - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(45.0, 1.0, 1.0, 200.0); - glMatrixMode(GL_MODELVIEW); -} - -static void Key2(int key, int x, int y) -{ - - switch (key) { - case GLUT_KEY_UP: - rotX -= 5; - break; - case GLUT_KEY_DOWN: - rotX += 5; - break; - case GLUT_KEY_LEFT: - rotY -= 5; - break; - case GLUT_KEY_RIGHT: - rotY += 5; - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - case 'D': - if (rgb) { - fogDensity *= 1.10; - glFogf(GL_FOG_DENSITY, fogDensity); - } - break; - case 'd': - if (rgb) { - fogDensity /= 1.10; - glFogf(GL_FOG_DENSITY, fogDensity); - } - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Draw(void) -{ - - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - - glTranslatef(0, 0, zTranslate); - glRotatef(rotY, 0,1,0); - glRotatef(rotX, 1,0,0); - glScalef(1.0, 1.0, 10.0); - - glCallList(cubeList); - - glPopMatrix(); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - rgb = GL_TRUE; - doubleBuffer = GL_TRUE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-ci") == 0) { - rgb = GL_FALSE; - } else if (strcmp(argv[i], "-rgb") == 0) { - rgb = GL_TRUE; - } else if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300); - - type = GLUT_DEPTH; - type |= (rgb) ? GLUT_RGB : GLUT_INDEX; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Fog Test") == GL_FALSE) { - exit(1); - } - - InitMap(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(Key2); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/font.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/font.c deleted file mode 100644 index a0091a65d7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/font.c +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include - - -#define OPENGL_WIDTH 24 -#define OPENGL_HEIGHT 13 - - -char string[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz"; -GLenum rgb, doubleBuffer, windType; -float angleX = 0.0, angleY = 0.0, angleZ = 0.0; -float scaleX = 1.0, scaleY = 1.0, scaleZ = 1.0; -float shiftX = 0.0, shiftY = 0.0, shiftZ = 0.0; - - -#include "tkmap.c" - - -static void DrawBitmapString(void *font, const char *string) -{ - int i; - - for (i = 0; string[i]; i++) - glutBitmapCharacter(font, string[i]); -} - -static void DrawStrokeString(void *font, const char *string) -{ - int i; - - for (i = 0; string[i]; i++) - glutStrokeCharacter(font, string[i]); -} - -static void Init(void) -{ - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClearIndex(0.0); -} - -static void Reshape(int width, int height) -{ - - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-400.0, 400.0, -200.0, 200.0, -400.0, 400.0); - glMatrixMode(GL_MODELVIEW); -} - -static void Key2(int key, int x, int y) -{ - - switch (key) { - case GLUT_KEY_LEFT: - shiftX -= 20.0; - break; - case GLUT_KEY_RIGHT: - shiftX += 20.0; - break; - case GLUT_KEY_UP: - shiftY += 20.0; - break; - case GLUT_KEY_DOWN: - shiftY -= 20.0; - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - - case 'n': - shiftZ += 20.0; - break; - case 'm': - shiftZ -= 20.0; - break; - - case 'q': - scaleX -= 0.1; - if (scaleX < 0.1) { - scaleX = 0.1; - } - break; - case 'w': - scaleX += 0.1; - break; - case 'a': - scaleY -= 0.1; - if (scaleY < 0.1) { - scaleY = 0.1; - } - break; - case 's': - scaleY += 0.1; - break; - case 'z': - scaleZ -= 0.1; - if (scaleZ < 0.1) { - scaleZ = 0.1; - } - break; - case 'x': - scaleZ += 0.1; - break; - - case 'e': - angleX -= 5.0; - if (angleX < 0.0) { - angleX = 360.0 + angleX; - } - break; - case 'r': - angleX += 5.0; - if (angleX > 360.0) { - angleX = angleX - 360.0; - } - break; - case 'd': - angleY -= 5.0; - if (angleY < 0.0) { - angleY = 360.0 + angleY; - } - break; - case 'f': - angleY += 5.0; - if (angleY > 360.0) { - angleY = angleY - 360.0; - } - break; - case 'c': - angleZ -= 5.0; - if (angleZ < 0.0) { - angleZ = 360.0 + angleZ; - } - break; - case 'v': - angleZ += 5.0; - if (angleZ > 360.0) { - angleZ = angleZ - 360.0; - } - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Draw(void) -{ - - glClear(GL_COLOR_BUFFER_BIT); - - SetColor(COLOR_WHITE); - - glPushMatrix(); - - glTranslatef(shiftX, shiftY, shiftZ); - glRotatef(angleX, 1.0, 0.0, 0.0); - glRotatef(angleY, 0.0, 1.0, 0.0); - glRotatef(angleZ, 0.0, 0.0, 1.0); - glScalef(scaleX, scaleY, scaleZ); - - glPushMatrix(); - glRasterPos2f(-390.5, 0.5); - DrawBitmapString(GLUT_BITMAP_9_BY_15, string); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(-390.5, -30.5, 0.0); - DrawStrokeString(GLUT_STROKE_ROMAN, string); - glPopMatrix(); - - glPopMatrix(); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - rgb = GL_TRUE; - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-ci") == 0) { - rgb = GL_FALSE; - } else if (strcmp(argv[i], "-rgb") == 0) { - rgb = GL_TRUE; - } else if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 800, 400); - - windType = (rgb) ? GLUT_RGB : GLUT_INDEX; - windType |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(windType); - - if (glutCreateWindow("Font Test") == GL_FALSE) { - exit(1); - } - - InitMap(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(Key2); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/line.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/line.c deleted file mode 100644 index 83f70cb3ac..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/line.c +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include - - -#define CI_OFFSET 16 - - -GLenum rgb, doubleBuffer, windType; - -GLenum mode1, mode2; -GLint size; -float pntA[3] = { - -160.0, 0.0, 0.0 -}; -float pntB[3] = { - -130.0, 0.0, 0.0 -}; -float pntC[3] = { - -40.0, -50.0, 0.0 -}; -float pntD[3] = { - 30.0, 60.0, 0.0 -}; - - -#include "tkmap.c" - -static void Init(void) -{ - GLint i; - - glClearColor(0.0, 0.0, 0.0, 0.0); - - glLineStipple(1, 0xF0E0); - glBlendFunc(GL_SRC_ALPHA, GL_ONE); - - if (!rgb) { - for (i = 0; i < 16; i++) { - glutSetColor(i+CI_OFFSET, i/15.0, i/15.0, 0.0); - } - } - - mode1 = GL_FALSE; - mode2 = GL_FALSE; - size = 1; -} - -static void Reshape(int width, int height) -{ - - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(-175, 175, -175, 175); - glMatrixMode(GL_MODELVIEW); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - case '1': - mode1 = !mode1; - break; - case '2': - mode2 = !mode2; - break; - case 'W': - size++; - break; - case 'w': - size--; - if (size < 1) { - size = 1; - } - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Draw(void) -{ - GLint ci, i; - - glClear(GL_COLOR_BUFFER_BIT); - - glLineWidth(size); - - if (mode1) { - glEnable(GL_LINE_STIPPLE); - } else { - glDisable(GL_LINE_STIPPLE); - } - - if (mode2) { - ci = CI_OFFSET; - glEnable(GL_LINE_SMOOTH); - glEnable(GL_BLEND); - } else { - ci = COLOR_YELLOW; - glDisable(GL_LINE_SMOOTH); - glDisable(GL_BLEND); - } - - glPushMatrix(); - - glShadeModel( GL_FLAT ); - - for (i = 0; i < 360; i += 5) { - glRotatef(5.0, 0,0,1); - - (rgb) ? glColor3f(1.0, 1.0, 0.0) : glIndexi(ci); - glBegin(GL_LINE_STRIP); - glVertex3fv(pntA); - glVertex3fv(pntB); - glEnd(); - - glPointSize(1); - - SetColor(COLOR_GREEN); - glBegin(GL_POINTS); - glVertex3fv(pntA); - glVertex3fv(pntB); - glEnd(); - } - - glPopMatrix(); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - rgb = GL_TRUE; - doubleBuffer = GL_TRUE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-ci") == 0) { - rgb = GL_FALSE; - } else if (strcmp(argv[i], "-rgb") == 0) { - rgb = GL_TRUE; - } else if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300); - - windType = (rgb) ? GLUT_RGB : GLUT_INDEX; - windType |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(windType); - - if (glutCreateWindow("Line Test") == GL_FALSE) { - exit(1); - } - - InitMap(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/loadppm.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/loadppm.c deleted file mode 100644 index be056d6294..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/loadppm.c +++ /dev/null @@ -1,72 +0,0 @@ - -typedef struct { - size_t sizeX, sizeY; - GLubyte *data; -} PPMImage; - -static PPMImage *LoadPPM(const char *filename) -{ - char buff[16]; - PPMImage *result; - FILE *fp; - int maxval; - - fp = fopen(filename, "rb"); - if (!fp) - { - fprintf(stderr, "Unable to open file `%s'\n", filename); - exit(1); - } - - if (!fgets(buff, sizeof(buff), fp)) - { - perror(filename); - exit(1); - } - - if (buff[0] != 'P' || buff[1] != '6') - { - fprintf(stderr, "Invalid image format (must be `P6')\n"); - exit(1); - } - - result = (PPMImage *) malloc(sizeof(PPMImage)); - if (!result) - { - fprintf(stderr, "Unable to allocate memory\n"); - exit(1); - } - - if (fscanf(fp, "%lu %lu", &result->sizeX, &result->sizeY) != 2) - { - fprintf(stderr, "Error loading image `%s'\n", filename); - exit(1); - } - - if (fscanf(fp, "%d", &maxval) != 1) - { - fprintf(stderr, "Error loading image `%s'\n", filename); - exit(1); - } - - while (fgetc(fp) != '\n') - ; - - result->data = (GLubyte *) malloc(3 * result->sizeX * result->sizeY); - if (!result) - { - fprintf(stderr, "Unable to allocate memory\n"); - exit(1); - } - - if (fread(result->data, 3 * result->sizeX, result->sizeY, fp) != result->sizeY) - { - fprintf(stderr, "Error loading image `%s'\n", filename); - exit(1); - } - - fclose(fp); - - return result; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/logo.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/logo.c deleted file mode 100644 index ae74af685a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/logo.c +++ /dev/null @@ -1,1635 +0,0 @@ - -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include - - -#define PI 3.141592654 - -#define BLACK 0 -#define GRAY 128 -#define WHITE 255 -#define BL 0x00 -#define WH 0xFF -#define RD 0xA4,0x00,0x00,0xFF -#define WT 0xFF,0xFF,0xFF,0xFF - -#define CHECKIMAGEWIDTH 8 -#define CHECKIMAGEHEIGHT 8 -#define BRICKIMAGEWIDTH 16 -#define BRICKIMAGEHEIGHT 16 - - -GLenum rgb, doubleBuffer; - -#include "tkmap.c" - -float black[3] = {0.0, 0.0, 0.0}; -float white[3] = {1.0, 1.0, 1.0}; -float gray[3] = {0.5, 0.5, 0.5}; -float blue[3] = {0.0, 0.0, 1.0}; -GLint colorIndexes[3] = {0, 200, 255}; - -GLenum polyMode; -GLboolean dithering; -GLboolean shade; -GLboolean doStipple; -GLboolean noDraw = 0; -GLboolean LineSmooth = GL_FALSE; - -double plane[4] = {1.0, 0.0, -1.0, 0.0}; -float xRotation = 30.0, yRotation = 30.0; -float zTranslation = -15.0; - -GLint singleCylinder; -GLint doubleCylinder; -GLint elbow, logo; - -GLubyte checkImage[3*CHECKIMAGEWIDTH*CHECKIMAGEHEIGHT] = { - BL, BL, BL, WH, WH, WH, BL, BL, BL, WH, WH, WH, BL, BL, BL, WH, - WH, WH, BL, BL, BL, WH, WH, WH, WH, WH, WH, BL, BL, BL, WH, WH, - WH, BL, BL, BL, WH, WH, WH, BL, BL, BL, WH, WH, WH, BL, BL, BL, - BL, BL, BL, WH, WH, WH, BL, BL, BL, WH, WH, WH, BL, BL, BL, WH, - WH, WH, BL, BL, BL, WH, WH, WH, WH, WH, WH, BL, BL, BL, WH, WH, - WH, BL, BL, BL, WH, WH, WH, BL, BL, BL, WH, WH, WH, BL, BL, BL, - BL, BL, BL, WH, WH, WH, BL, BL, BL, WH, WH, WH, BL, BL, BL, WH, - WH, WH, BL, BL, BL, WH, WH, WH, WH, WH, WH, BL, BL, BL, WH, WH, - WH, BL, BL, BL, WH, WH, WH, BL, BL, BL, WH, WH, WH, BL, BL, BL, - BL, BL, BL, WH, WH, WH, BL, BL, BL, WH, WH, WH, BL, BL, BL, WH, - WH, WH, BL, BL, BL, WH, WH, WH, WH, WH, WH, BL, BL, BL, WH, WH, - WH, BL, BL, BL, WH, WH, WH, BL, BL, BL, WH, WH, WH, BL, BL, BL, -}; -GLubyte brickImage[4*BRICKIMAGEWIDTH*BRICKIMAGEHEIGHT] = { - RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, - RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, - RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, - RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, - WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, - RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, - RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, - RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, - RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, - WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, - RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, - RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, - RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, - RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, - WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, - RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD -}; - -GLubyte *image = checkImage; -GLint imageHeight = CHECKIMAGEHEIGHT; -GLint imageWidth = CHECKIMAGEWIDTH; - -static float decal[] = { - GL_DECAL, -}; -static float modulate[] = { - GL_MODULATE, -}; -static float repeat[] = { - GL_REPEAT, -}; -static float nearest[] = { - GL_NEAREST, -}; - -GLubyte stipple[4*32] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x0F, 0xF0, 0x00, - 0x00, 0x0F, 0xF0, 0x00, - 0x00, 0x0F, 0xF0, 0x00, - 0x00, 0x0F, 0xF0, 0x00, - 0x00, 0x0F, 0xF0, 0x00, - 0x00, 0x0F, 0xF0, 0x00, - 0x00, 0x0F, 0xF0, 0x00, - 0x00, 0x0F, 0xF0, 0x00, - - 0x00, 0x0F, 0xF0, 0x00, - 0x00, 0x0F, 0xF0, 0x00, - 0x00, 0x0F, 0xF0, 0x00, - 0x00, 0x0F, 0xF0, 0x00, - 0x00, 0x0F, 0xF0, 0x00, - 0x00, 0x0F, 0xF0, 0x00, - 0x00, 0x0F, 0xF0, 0x00, - 0x00, 0x0F, 0xF0, 0x00, - - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -float tscp[18][2] = { - { - 0.0, 0.0 - }, - { - 1.0, 0.0 - }, - { - 0.0, 0.125 - }, - { - 1.0, 0.125 - }, - { - 0.0, 0.250 - }, - { - 1.0, 0.25 - }, - { - 0.0, 0.375 - }, - { - 1.0, 0.375 - }, - { - 0.0, 0.50 - }, - { - 1.0, 0.50 - }, - { - 0.0, 0.625 - }, - { - 1.0, 0.625 - }, - { - 0.0, 0.75 - }, - { - 1.0, 0.75 - }, - { - 0.0, 0.875 - }, - { - 1.0, 0.875 - }, - { - 0.0, 1.0 - }, - { - 1.0, 1.0 - } -}; -float scp[18][3] = { - { - 1.000000, 0.000000, 0.000000 - }, - { - 1.000000, 0.000000, 5.000000 - }, - { - 0.707107, 0.707107, 0.000000 - }, - { - 0.707107, 0.707107, 5.000000 - }, - { - 0.000000, 1.000000, 0.000000 - }, - { - 0.000000, 1.000000, 5.000000 - }, - { - -0.707107, 0.707107, 0.000000 - }, - { - -0.707107, 0.707107, 5.000000 - }, - { - -1.000000, 0.000000, 0.000000 - }, - { - -1.000000, 0.000000, 5.000000 - }, - { - -0.707107, -0.707107, 0.000000 - }, - { - -0.707107, -0.707107, 5.000000 - }, - { - 0.000000, -1.000000, 0.000000 - }, - { - 0.000000, -1.000000, 5.000000 - }, - { - 0.707107, -0.707107, 0.000000 - }, - { - 0.707107, -0.707107, 5.000000 - }, - { - 1.000000, 0.000000, 0.000000 - }, - { - 1.000000, 0.000000, 5.000000 - } -}; -float dcp[18][3] = { - { - 1.000000, 0.000000, 0.000000 - }, - { - 1.000000, 0.000000, 7.000000 - }, - { - 0.707107, 0.707107, 0.000000 - }, - { - 0.707107, 0.707107, 7.000000 - }, - { - 0.000000, 1.000000, 0.000000 - }, - { - 0.000000, 1.000000, 7.000000 - }, - { - -0.707107, 0.707107, 0.000000 - }, - { - -0.707107, 0.707107, 7.000000 - }, - { - -1.000000, 0.000000, 0.000000 - }, - { - -1.000000, 0.000000, 7.000000 - }, - { - -0.707107, -0.707107, 0.000000 - }, - { - -0.707107, -0.707107, 7.000000 - }, - { - 0.000000, -1.000000, 0.000000 - }, - { - 0.000000, -1.000000, 7.000000 - }, - { - 0.707107, -0.707107, 0.000000 - }, - { - 0.707107, -0.707107, 7.000000 - }, - { - 1.000000, 0.000000, 0.000000 - }, - { - 1.000000, 0.000000, 7.000000 - } -}; -float ep[7][9][3] = { - { - { - 1.000000, 0.000000, 0.000000 - }, - { - 0.707107, 0.707107, 0.000000 - }, - { - 0.000000, 1.000000, 0.000000 - }, - { - -0.707107, 0.707107, 0.000000 - }, - { - -1.000000, 0.000000, 0.000000 - }, - { - -0.707107, -0.707107, 0.000000 - }, - { - 0.000000, -1.000000, 0.000000 - }, - { - 0.707107, -0.707107, 0.000000 - }, - { - 1.000000, 0.000000, 0.000000 - } - }, - { - { - 1.000000, 0.034074, 0.258819 - }, - { - 0.707107, 0.717087, 0.075806 - }, - { - 0.000000, 1.000000, 0.000000 - }, - { - -0.707107, 0.717087, 0.075806 - }, - { - -1.000000, 0.034074, 0.258819 - }, - { - -0.707107, -0.648939, 0.441832 - }, - { - 0.000000, -0.931852, 0.517638 - }, - { - 0.707107, -0.648939, 0.441832 - }, - { - 1.000000, 0.034074, 0.258819 - } - }, - { - { - 1.000000, 0.133975, 0.500000 - }, - { - 0.707107, 0.746347, 0.146447 - }, - { - 0.000000, 1.000000, 0.000000 - }, - { - -0.707107, 0.746347, 0.146447 - }, - { - -1.000000, 0.133975, 0.500000 - }, - { - -0.707107, -0.478398, 0.853553 - }, - { - 0.000000, -0.732051, 1.000000 - }, - { - 0.707107, -0.478398, 0.853553 - }, - { - 1.000000, 0.133975, 0.500000 - } - }, - { - { - 1.000000, 0.292893, 0.707107 - }, - { - 0.707107, 0.792893, 0.207107 - }, - { - 0.000000, 1.000000, 0.000000 - }, - { - -0.707107, 0.792893, 0.207107 - }, - { - -1.000000, 0.292893, 0.707107 - }, - { - -0.707107, -0.207107, 1.207107 - }, - { - 0.000000, -0.414214, 1.414214 - }, - { - 0.707107, -0.207107, 1.207107 - }, - { - 1.000000, 0.292893, 0.707107 - } - }, - { - { - 1.000000, 0.500000, 0.866025 - }, - { - 0.707107, 0.853553, 0.253653 - }, - { - 0.000000, 1.000000, 0.000000 - }, - { - -0.707107, 0.853553, 0.253653 - }, - { - -1.000000, 0.500000, 0.866025 - }, - { - -0.707107, 0.146447, 1.478398 - }, - { - 0.000000, 0.000000, 1.732051 - }, - { - 0.707107, 0.146447, 1.478398 - }, - { - 1.000000, 0.500000, 0.866025 - } - }, - { - { - 1.000000, 0.741181, 0.965926 - }, - { - 0.707107, 0.924194, 0.282913 - }, - { - 0.000000, 1.000000, 0.000000 - }, - { - -0.707107, 0.924194, 0.282913 - }, - { - -1.000000, 0.741181, 0.965926 - }, - { - -0.707107, 0.558168, 1.648939 - }, - { - 0.000000, 0.482362, 1.931852 - }, - { - 0.707107, 0.558168, 1.648939 - }, - { - 1.000000, 0.741181, 0.965926 - } - }, - { - { - 1.000000, 1.000000, 1.000000 - }, - { - 0.707107, 1.000000, 0.292893 - }, - { - 0.000000, 1.000000, 0.000000 - }, - { - -0.707107, 1.000000, 0.292893 - }, - { - -1.000000, 1.000000, 1.000000 - }, - { - -0.707107, 1.000000, 1.707107 - }, - { - 0.000000, 1.000000, 2.000000 - }, - { - 0.707107, 1.000000, 1.707107 - }, - { - 1.000000, 1.000000, 1.000000 - } - } -}; -float en[7][9][3] = { - { - { - 1.000000, 0.000000, 0.000000 - }, - { - 0.707107, 0.707107, 0.000000 - }, - { - 0.000000, 1.000000, 0.000000 - }, - { - -0.707107, 0.707107, 0.000000 - }, - { - -1.000000, 0.000000, 0.000000 - }, - { - -0.707107, -0.707107, 0.000000 - }, - { - 0.000000, -1.000000, 0.000000 - }, - { - 0.707107, -0.707107, 0.000000 - }, - { - 1.000000, 0.000000, 0.000000 - } - }, - { - { - 1.000000, 0.000000, 0.000000 - }, - { - 0.707107, 0.683013, -0.183013 - }, - { - 0.000000, 0.965926, -0.258819 - }, - { - -0.707107, 0.683013, -0.183013 - }, - { - -1.000000, 0.000000, 0.000000 - }, - { - -0.707107, -0.683013, 0.183013 - }, - { - 0.000000, -0.965926, 0.258819 - }, - { - 0.707107, -0.683013, 0.183013 - }, - { - 1.000000, 0.000000, 0.000000 - } - }, - { - { - 1.000000, 0.000000, 0.000000 - }, - { - 0.707107, 0.612372, -0.353553 - }, - { - 0.000000, 0.866025, -0.500000 - }, - { - -0.707107, 0.612372, -0.353553 - }, - { - -1.000000, 0.000000, 0.000000 - }, - { - -0.707107, -0.612372, 0.353553 - }, - { - 0.000000, -0.866025, 0.500000 - }, - { - 0.707107, -0.612372, 0.353553 - }, - { - 1.000000, 0.000000, 0.000000 - } - }, - { - { - 1.000000, 0.000000, 0.000000 - }, - { - /* These 3 lines added by BEP */ - 0.707107, 0.500000, -0.500000 - }, - { - 0.000000, 0.707107, -0.707107 - }, - { - -0.707107, 0.500000, -0.500000 - }, - { - -1.000000, 0.000000, 0.000000 - }, - { - -0.707107, -0.500000, 0.500000 - }, - { - 0.000000, -0.707107, 0.707107 - }, - { - 0.707107, -0.500000, 0.500000 - }, - { - 1.000000, 0.000000, 0.000000 - } - }, - { - { - 1.000000, 0.000000, 0.000000 - }, - { - 0.707107, 0.353553, -0.612372 - }, - { - 0.000000, 0.500000, -0.866025 - }, - { - -0.707107, 0.353553, -0.612372 - }, - { - -1.000000, 0.000000, 0.000000 - }, - { - -0.707107, -0.353553, 0.612372 - }, - { - 0.000000, -0.500000, 0.866025 - }, - { - 0.707107, -0.353553, 0.612372 - }, - { - 1.000000, 0.000000, 0.000000 - } - }, - { - { - 1.000000, 0.000000, 0.000000 - }, - { - 0.707107, 0.183013, -0.683013 - }, - { - 0.000000, 0.258819, -0.965926 - }, - { - -0.707107, 0.183013, -0.683013 - }, - { - -1.000000, 0.000000, 0.000000 - }, - { - -0.707107, -0.183013, 0.683013 - }, - { - 0.000000, -0.258819, 0.965926 - }, - { - 0.707107, -0.183013, 0.683013 - }, - { - 1.000000, 0.000000, 0.000000 - } - }, - { - { - 1.000000, 0.000000, 0.000000 - }, - { - 0.707107, 0.000000, -0.707107 - }, - { - 0.000000, 0.000000, -1.000000 - }, - { - -0.707107, 0.000000, -0.707107 - }, - { - -1.000000, 0.000000, 0.000000 - }, - { - -0.707107, 0.000000, 0.707107 - }, - { - 0.000000, 0.000000, 1.000000 - }, - { - 0.707107, 0.000000, 0.707107 - }, - { - 1.000000, 0.000000, 0.000000 - } - } -}; -float tep[7][9][2] = { - { - { - 0, 0.0 - }, - { - 0.125, 0.0 - }, - { - 0.25, 0.0 - }, - { - 0.375, 0.0 - }, - { - 0.5, 0.0 - }, - { - 0.625, 0.0 - }, - { - 0.75, 0.0 - }, - { - 0.875, 0.0 - }, - { - 1.0, 0.0 - } - }, - { - { - 0, 0.16667 - }, - { - 0.125, 0.16667 - }, - { - 0.25, 0.16667 - }, - { - 0.375, 0.16667 - }, - { - 0.5, 0.16667 - }, - { - 0.625, 0.16667 - }, - { - 0.75, 0.16667 - }, - { - 0.875, 0.16667 - }, - { - 1.0, 0.16667 - } - }, - { - { - 0, 0.33333 - }, - { - 0.125, 0.33333 - }, - { - 0.25, 0.33333 - }, - { - 0.375, 0.33333 - }, - { - 0.5, 0.33333 - }, - { - 0.625, 0.33333 - }, - { - 0.75, 0.33333 - }, - { - 0.875, 0.33333 - }, - { - 1.0, 0.33333 - } - }, - { - { - 0, 0.5 - }, - { - 0.125, 0.5 - }, - { - 0.25, 0.5 - }, - { - 0.375, 0.5 - }, - { - 0.5, 0.5 - }, - { - 0.625, 0.5 - }, - { - 0.75, 0.5 - }, - { - 0.875, 0.5 - }, - { - 1.0, 0.5 - } - }, - { - { - 0, 0.6667 - }, - { - 0.125, 0.6667 - }, - { - 0.25, 0.6667 - }, - { - 0.375, 0.6667 - }, - { - 0.5, 0.6667 - }, - { - 0.625, 0.6667 - }, - { - 0.75, 0.6667 - }, - { - 0.875, 0.6667 - }, - { - 1.0, 0.6667 - } - }, - { - { - 0, 0.83333 - }, - { - 0.125, 0.83333 - }, - { - 0.25, 0.83333 - }, - { - 0.375, 0.83333 - }, - { - 0.5, 0.83333 - }, - { - 0.625, 0.83333 - }, - { - 0.75, 0.83333 - }, - { - 0.875, 0.83333 - }, - { - 1.0, 0.83333 - } - }, - { - { - 0, 1.0 - }, - { - 0.125, 1.0 - }, - { - 0.25, 1.0 - }, - { - 0.375, 1.0 - }, - { - 0.5, 1.0 - }, - { - 0.625, 1.0 - }, - { - 0.75, 1.0 - }, - { - 0.875, 1.0 - }, - { - 1.0, 1.0 - } - } -}; - - -static void SetUpAntiAliasedGrayScale(void) -{ - float color; - GLint i, j; - - for (i = 0; i < 16; i++) { - color = (2 * i + 1) / 32.0; - for (j = 0; j < 16; j++) { - glutSetColor(i*16+j, color*j/15.0, color*j/15.0, color*j/15.0); - } - } -} - -static void BendForward(void) -{ - - glTranslatef(0.0, 1.0, 0.0); - glRotatef(90.0, 1, 0, 0); - glTranslatef(0.0, -1.0, 0.0); -} - -static void BendLeft(void) -{ - - glRotatef(-90.0, 0, 0, 1); - glTranslatef(0.0, 1.0, 0.0); - glRotatef(90.0, 1, 0, 0); - glTranslatef(0.0, -1.0, 0.0); -} - -static void BendRight(void) -{ - - glRotatef(90.0, 0, 0, 1); - glTranslatef(0.0, 1.0, 0.0); - glRotatef(90.0, 1, 0, 0); - glTranslatef(0.0, -1.0, 0.0); -} - -static void BuildSingleCylinder(void) -{ - - glNewList(singleCylinder, GL_COMPILE); - - glBegin(GL_TRIANGLE_STRIP); - glNormal3fv(scp[0]); glTexCoord2fv(tscp[0]); glVertex3fv(scp[0]); - glNormal3fv(scp[0]); glTexCoord2fv(tscp[1]); glVertex3fv(scp[1]); - glNormal3fv(scp[2]); glTexCoord2fv(tscp[2]); glVertex3fv(scp[2]); - glNormal3fv(scp[2]); glTexCoord2fv(tscp[3]); glVertex3fv(scp[3]); - glNormal3fv(scp[4]); glTexCoord2fv(tscp[4]); glVertex3fv(scp[4]); - glNormal3fv(scp[4]); glTexCoord2fv(tscp[5]); glVertex3fv(scp[5]); - glNormal3fv(scp[6]); glTexCoord2fv(tscp[6]); glVertex3fv(scp[6]); - glNormal3fv(scp[6]); glTexCoord2fv(tscp[7]); glVertex3fv(scp[7]); - glNormal3fv(scp[8]); glTexCoord2fv(tscp[8]); glVertex3fv(scp[8]); - glNormal3fv(scp[8]); glTexCoord2fv(tscp[9]); glVertex3fv(scp[9]); - glNormal3fv(scp[10]); glTexCoord2fv(tscp[10]); glVertex3fv(scp[10]); - glNormal3fv(scp[10]); glTexCoord2fv(tscp[11]); glVertex3fv(scp[11]); - glNormal3fv(scp[12]); glTexCoord2fv(tscp[12]); glVertex3fv(scp[12]); - glNormal3fv(scp[12]); glTexCoord2fv(tscp[13]); glVertex3fv(scp[13]); - glNormal3fv(scp[14]); glTexCoord2fv(tscp[14]); glVertex3fv(scp[14]); - glNormal3fv(scp[14]); glTexCoord2fv(tscp[15]); glVertex3fv(scp[15]); - glNormal3fv(scp[16]); glTexCoord2fv(tscp[16]); glVertex3fv(scp[16]); - glNormal3fv(scp[16]); glTexCoord2fv(tscp[17]); glVertex3fv(scp[17]); - glEnd(); - - glEndList(); -} - -static void BuildDoubleCylinder(void) -{ - - glNewList(doubleCylinder, GL_COMPILE); - - glBegin(GL_TRIANGLE_STRIP); - glNormal3fv(dcp[0]); glTexCoord2fv(tscp[0]); glVertex3fv(dcp[0]); - glNormal3fv(dcp[0]); glTexCoord2fv(tscp[1]); glVertex3fv(dcp[1]); - glNormal3fv(dcp[2]); glTexCoord2fv(tscp[2]); glVertex3fv(dcp[2]); - glNormal3fv(dcp[2]); glTexCoord2fv(tscp[3]); glVertex3fv(dcp[3]); - glNormal3fv(dcp[4]); glTexCoord2fv(tscp[4]); glVertex3fv(dcp[4]); - glNormal3fv(dcp[4]); glTexCoord2fv(tscp[5]); glVertex3fv(dcp[5]); - glNormal3fv(dcp[6]); glTexCoord2fv(tscp[6]); glVertex3fv(dcp[6]); - glNormal3fv(dcp[6]); glTexCoord2fv(tscp[7]); glVertex3fv(dcp[7]); - glNormal3fv(dcp[8]); glTexCoord2fv(tscp[8]); glVertex3fv(dcp[8]); - glNormal3fv(dcp[8]); glTexCoord2fv(tscp[9]); glVertex3fv(dcp[9]); - glNormal3fv(dcp[10]); glTexCoord2fv(tscp[10]); glVertex3fv(dcp[10]); - glNormal3fv(dcp[10]); glTexCoord2fv(tscp[11]); glVertex3fv(dcp[11]); - glNormal3fv(dcp[12]); glTexCoord2fv(tscp[12]); glVertex3fv(dcp[12]); - glNormal3fv(dcp[12]); glTexCoord2fv(tscp[13]); glVertex3fv(dcp[13]); - glNormal3fv(dcp[14]); glTexCoord2fv(tscp[14]); glVertex3fv(dcp[14]); - glNormal3fv(dcp[14]); glTexCoord2fv(tscp[15]); glVertex3fv(dcp[15]); - glNormal3fv(dcp[16]); glTexCoord2fv(tscp[16]); glVertex3fv(dcp[16]); - glNormal3fv(dcp[16]); glTexCoord2fv(tscp[17]); glVertex3fv(dcp[17]); - glEnd(); - - glEndList(); -} - -static void BuildElbow(void) -{ - - glNewList(elbow, GL_COMPILE); - - glBegin(GL_TRIANGLE_STRIP); - glNormal3fv(en[0][0]); glTexCoord2fv(tep[0][0]); glVertex3fv(ep[0][0]); - glNormal3fv(en[1][0]); glTexCoord2fv(tep[1][0]); glVertex3fv(ep[1][0]); - glNormal3fv(en[0][1]); glTexCoord2fv(tep[0][1]); glVertex3fv(ep[0][1]); - glNormal3fv(en[1][1]); glTexCoord2fv(tep[1][1]); glVertex3fv(ep[1][1]); - glNormal3fv(en[0][2]); glTexCoord2fv(tep[0][2]); glVertex3fv(ep[0][2]); - glNormal3fv(en[1][2]); glTexCoord2fv(tep[1][2]); glVertex3fv(ep[1][2]); - glNormal3fv(en[0][3]); glTexCoord2fv(tep[0][3]); glVertex3fv(ep[0][3]); - glNormal3fv(en[1][3]); glTexCoord2fv(tep[1][3]); glVertex3fv(ep[1][3]); - glNormal3fv(en[0][4]); glTexCoord2fv(tep[0][4]); glVertex3fv(ep[0][4]); - glNormal3fv(en[1][4]); glTexCoord2fv(tep[1][4]); glVertex3fv(ep[1][4]); - glNormal3fv(en[0][5]); glTexCoord2fv(tep[0][5]); glVertex3fv(ep[0][5]); - glNormal3fv(en[1][5]); glTexCoord2fv(tep[1][5]); glVertex3fv(ep[1][5]); - glNormal3fv(en[0][6]); glTexCoord2fv(tep[0][6]); glVertex3fv(ep[0][6]); - glNormal3fv(en[1][6]); glTexCoord2fv(tep[1][6]); glVertex3fv(ep[1][6]); - glNormal3fv(en[0][7]); glTexCoord2fv(tep[0][7]); glVertex3fv(ep[0][7]); - glNormal3fv(en[1][7]); glTexCoord2fv(tep[1][7]); glVertex3fv(ep[1][7]); - glNormal3fv(en[0][8]); glTexCoord2fv(tep[0][8]); glVertex3fv(ep[0][8]); - glNormal3fv(en[1][8]); glTexCoord2fv(tep[1][8]); glVertex3fv(ep[1][8]); - glEnd(); - glBegin(GL_TRIANGLE_STRIP); - glNormal3fv(en[1][0]); glTexCoord2fv(tep[1][0]); glVertex3fv(ep[1][0]); - glNormal3fv(en[2][0]); glTexCoord2fv(tep[2][0]); glVertex3fv(ep[2][0]); - glNormal3fv(en[1][1]); glTexCoord2fv(tep[1][1]); glVertex3fv(ep[1][1]); - glNormal3fv(en[2][1]); glTexCoord2fv(tep[2][1]); glVertex3fv(ep[2][1]); - glNormal3fv(en[1][2]); glTexCoord2fv(tep[1][2]); glVertex3fv(ep[1][2]); - glNormal3fv(en[2][2]); glTexCoord2fv(tep[2][2]); glVertex3fv(ep[2][2]); - glNormal3fv(en[1][3]); glTexCoord2fv(tep[1][3]); glVertex3fv(ep[1][3]); - glNormal3fv(en[2][3]); glTexCoord2fv(tep[2][3]); glVertex3fv(ep[2][3]); - glNormal3fv(en[1][4]); glTexCoord2fv(tep[1][4]); glVertex3fv(ep[1][4]); - glNormal3fv(en[2][4]); glTexCoord2fv(tep[2][4]); glVertex3fv(ep[2][4]); - glNormal3fv(en[1][5]); glTexCoord2fv(tep[1][5]); glVertex3fv(ep[1][5]); - glNormal3fv(en[2][5]); glTexCoord2fv(tep[2][5]); glVertex3fv(ep[2][5]); - glNormal3fv(en[1][6]); glTexCoord2fv(tep[1][6]); glVertex3fv(ep[1][6]); - glNormal3fv(en[2][6]); glTexCoord2fv(tep[2][6]); glVertex3fv(ep[2][6]); - glNormal3fv(en[1][7]); glTexCoord2fv(tep[1][7]); glVertex3fv(ep[1][7]); - glNormal3fv(en[2][7]); glTexCoord2fv(tep[2][7]); glVertex3fv(ep[2][7]); - glNormal3fv(en[1][8]); glTexCoord2fv(tep[1][8]); glVertex3fv(ep[1][8]); - glNormal3fv(en[2][8]); glTexCoord2fv(tep[2][8]); glVertex3fv(ep[2][8]); - glEnd(); - glBegin(GL_TRIANGLE_STRIP); - glNormal3fv(en[2][0]); glTexCoord2fv(tep[2][0]); glVertex3fv(ep[2][0]); - glNormal3fv(en[3][0]); glTexCoord2fv(tep[3][0]); glVertex3fv(ep[3][0]); - glNormal3fv(en[2][1]); glTexCoord2fv(tep[2][1]); glVertex3fv(ep[2][1]); - glNormal3fv(en[3][1]); glTexCoord2fv(tep[3][1]); glVertex3fv(ep[3][1]); - glNormal3fv(en[2][2]); glTexCoord2fv(tep[2][2]); glVertex3fv(ep[2][2]); - glNormal3fv(en[3][2]); glTexCoord2fv(tep[3][2]); glVertex3fv(ep[3][2]); - glNormal3fv(en[2][3]); glTexCoord2fv(tep[2][3]); glVertex3fv(ep[2][3]); - glNormal3fv(en[3][3]); glTexCoord2fv(tep[3][3]); glVertex3fv(ep[3][3]); - glNormal3fv(en[2][4]); glTexCoord2fv(tep[2][4]); glVertex3fv(ep[2][4]); - glNormal3fv(en[3][4]); glTexCoord2fv(tep[3][4]); glVertex3fv(ep[3][4]); - glNormal3fv(en[2][5]); glTexCoord2fv(tep[2][5]); glVertex3fv(ep[2][5]); - glNormal3fv(en[3][5]); glTexCoord2fv(tep[3][5]); glVertex3fv(ep[3][5]); - glNormal3fv(en[2][6]); glTexCoord2fv(tep[2][6]); glVertex3fv(ep[2][6]); - glNormal3fv(en[3][6]); glTexCoord2fv(tep[3][6]); glVertex3fv(ep[3][6]); - glNormal3fv(en[2][7]); glTexCoord2fv(tep[2][7]); glVertex3fv(ep[2][7]); - glNormal3fv(en[3][7]); glTexCoord2fv(tep[3][7]); glVertex3fv(ep[3][7]); - glNormal3fv(en[2][8]); glTexCoord2fv(tep[2][8]); glVertex3fv(ep[2][8]); - glNormal3fv(en[3][8]); glTexCoord2fv(tep[3][8]); glVertex3fv(ep[3][8]); - glEnd(); - glBegin(GL_TRIANGLE_STRIP); - glNormal3fv(en[3][0]); glTexCoord2fv(tep[3][0]); glVertex3fv(ep[3][0]); - glNormal3fv(en[4][0]); glTexCoord2fv(tep[4][0]); glVertex3fv(ep[4][0]); - glNormal3fv(en[3][1]); glTexCoord2fv(tep[3][1]); glVertex3fv(ep[3][1]); - glNormal3fv(en[4][1]); glTexCoord2fv(tep[4][1]); glVertex3fv(ep[4][1]); - glNormal3fv(en[3][2]); glTexCoord2fv(tep[3][2]); glVertex3fv(ep[3][2]); - glNormal3fv(en[4][2]); glTexCoord2fv(tep[4][2]); glVertex3fv(ep[4][2]); - glNormal3fv(en[3][3]); glTexCoord2fv(tep[3][3]); glVertex3fv(ep[3][3]); - glNormal3fv(en[4][3]); glTexCoord2fv(tep[4][3]); glVertex3fv(ep[4][3]); - glNormal3fv(en[3][4]); glTexCoord2fv(tep[3][4]); glVertex3fv(ep[3][4]); - glNormal3fv(en[4][4]); glTexCoord2fv(tep[4][4]); glVertex3fv(ep[4][4]); - glNormal3fv(en[3][5]); glTexCoord2fv(tep[3][5]); glVertex3fv(ep[3][5]); - glNormal3fv(en[4][5]); glTexCoord2fv(tep[4][5]); glVertex3fv(ep[4][5]); - glNormal3fv(en[3][6]); glTexCoord2fv(tep[3][6]); glVertex3fv(ep[3][6]); - glNormal3fv(en[4][6]); glTexCoord2fv(tep[4][6]); glVertex3fv(ep[4][6]); - glNormal3fv(en[3][7]); glTexCoord2fv(tep[3][7]); glVertex3fv(ep[3][7]); - glNormal3fv(en[4][7]); glTexCoord2fv(tep[4][7]); glVertex3fv(ep[4][7]); - glNormal3fv(en[3][8]); glTexCoord2fv(tep[3][8]); glVertex3fv(ep[3][8]); - glNormal3fv(en[4][8]); glTexCoord2fv(tep[4][8]); glVertex3fv(ep[4][8]); - glEnd(); - glBegin(GL_TRIANGLE_STRIP); - glNormal3fv(en[4][0]); glTexCoord2fv(tep[4][0]); glVertex3fv(ep[4][0]); - glNormal3fv(en[5][0]); glTexCoord2fv(tep[5][0]); glVertex3fv(ep[5][0]); - glNormal3fv(en[4][1]); glTexCoord2fv(tep[4][1]); glVertex3fv(ep[4][1]); - glNormal3fv(en[5][1]); glTexCoord2fv(tep[5][1]); glVertex3fv(ep[5][1]); - glNormal3fv(en[4][2]); glTexCoord2fv(tep[4][2]); glVertex3fv(ep[4][2]); - glNormal3fv(en[5][2]); glTexCoord2fv(tep[5][2]); glVertex3fv(ep[5][2]); - glNormal3fv(en[4][3]); glTexCoord2fv(tep[4][3]); glVertex3fv(ep[4][3]); - glNormal3fv(en[5][3]); glTexCoord2fv(tep[5][3]); glVertex3fv(ep[5][3]); - glNormal3fv(en[4][4]); glTexCoord2fv(tep[4][4]); glVertex3fv(ep[4][4]); - glNormal3fv(en[5][4]); glTexCoord2fv(tep[5][4]); glVertex3fv(ep[5][4]); - glNormal3fv(en[4][5]); glTexCoord2fv(tep[4][5]); glVertex3fv(ep[4][5]); - glNormal3fv(en[5][5]); glTexCoord2fv(tep[5][5]); glVertex3fv(ep[5][5]); - glNormal3fv(en[4][6]); glTexCoord2fv(tep[4][6]); glVertex3fv(ep[4][6]); - glNormal3fv(en[5][6]); glTexCoord2fv(tep[5][6]); glVertex3fv(ep[5][6]); - glNormal3fv(en[4][7]); glTexCoord2fv(tep[4][7]); glVertex3fv(ep[4][7]); - glNormal3fv(en[5][7]); glTexCoord2fv(tep[5][7]); glVertex3fv(ep[5][7]); - glNormal3fv(en[4][8]); glTexCoord2fv(tep[4][8]); glVertex3fv(ep[4][8]); - glNormal3fv(en[5][8]); glTexCoord2fv(tep[5][8]); glVertex3fv(ep[5][8]); - glEnd(); - glBegin(GL_TRIANGLE_STRIP); - glNormal3fv(en[5][0]); glTexCoord2fv(tep[5][0]); glVertex3fv(ep[5][0]); - glNormal3fv(en[6][0]); glTexCoord2fv(tep[6][0]); glVertex3fv(ep[6][0]); - glNormal3fv(en[5][1]); glTexCoord2fv(tep[5][1]); glVertex3fv(ep[5][1]); - glNormal3fv(en[6][1]); glTexCoord2fv(tep[6][1]); glVertex3fv(ep[6][1]); - glNormal3fv(en[5][2]); glTexCoord2fv(tep[5][2]); glVertex3fv(ep[5][2]); - glNormal3fv(en[6][2]); glTexCoord2fv(tep[6][2]); glVertex3fv(ep[6][2]); - glNormal3fv(en[5][3]); glTexCoord2fv(tep[5][3]); glVertex3fv(ep[5][3]); - glNormal3fv(en[6][3]); glTexCoord2fv(tep[6][3]); glVertex3fv(ep[6][3]); - glNormal3fv(en[5][4]); glTexCoord2fv(tep[5][4]); glVertex3fv(ep[5][4]); - glNormal3fv(en[6][4]); glTexCoord2fv(tep[6][4]); glVertex3fv(ep[6][4]); - glNormal3fv(en[5][5]); glTexCoord2fv(tep[5][5]); glVertex3fv(ep[5][5]); - glNormal3fv(en[6][5]); glTexCoord2fv(tep[6][5]); glVertex3fv(ep[6][5]); - glNormal3fv(en[5][6]); glTexCoord2fv(tep[5][6]); glVertex3fv(ep[5][6]); - glNormal3fv(en[6][6]); glTexCoord2fv(tep[6][6]); glVertex3fv(ep[6][6]); - glNormal3fv(en[5][7]); glTexCoord2fv(tep[5][7]); glVertex3fv(ep[5][7]); - glNormal3fv(en[6][7]); glTexCoord2fv(tep[6][7]); glVertex3fv(ep[6][7]); - glNormal3fv(en[5][8]); glTexCoord2fv(tep[5][8]); glVertex3fv(ep[5][8]); - glNormal3fv(en[6][8]); glTexCoord2fv(tep[6][8]); glVertex3fv(ep[6][8]); - glEnd(); - - glEndList(); -} - -static void BuildLogo(void) -{ - - glNewList(logo, GL_COMPILE); - - glTranslatef(5.5, -3.5, 4.5); - glTranslatef(0.0, 0.0, -7.0); - glCallList(doubleCylinder); - BendForward(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -7.0); - glCallList(doubleCylinder); - BendForward(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -5.0); - glCallList(singleCylinder); - BendRight(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -7.0); - glCallList(doubleCylinder); - BendForward(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -7.0); - glCallList(doubleCylinder); - BendForward(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -5.0); - glCallList(singleCylinder); - BendLeft(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -7.0); - glCallList(doubleCylinder); - BendForward(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -7.0); - glCallList(doubleCylinder); - BendForward(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -5.0); - glCallList(singleCylinder); - BendRight(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -7.0); - glCallList(doubleCylinder); - BendForward(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -7.0); - glCallList(doubleCylinder); - BendForward(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -5.0); - glCallList(singleCylinder); - BendLeft(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -7.0); - glCallList(doubleCylinder); - BendForward(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -7.0); - glCallList(doubleCylinder); - BendForward(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -5.0); - glCallList(singleCylinder); - BendRight(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -7.0); - glCallList(doubleCylinder); - BendForward(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -7.0); - glCallList(doubleCylinder); - BendForward(); - glCallList(elbow); - glTranslatef(0.0, 0.0, -5.0); - glCallList(singleCylinder); - BendLeft(); - glCallList(elbow); - - glEndList(); -} - -static void BuildLists(void) -{ - - singleCylinder = glGenLists(1); - doubleCylinder = glGenLists(1); - elbow = glGenLists(1); - logo = glGenLists(1); - - BuildSingleCylinder(); - BuildDoubleCylinder(); - BuildElbow(); - BuildLogo(); -} - -static void Init(void) -{ - static float ambient[] = {0.1, 0.1, 0.1, 1.0}; - static float diffuse[] = {0.5, 1.0, 1.0, 1.0}; - static float position[] = {90.0, 90.0, 150.0, 0.0}; - static float front_mat_shininess[] = {30.0}; - static float front_mat_specular[] = {0.2, 0.2, 0.2, 1.0}; - static float front_mat_diffuse[] = {0.5, 0.28, 0.38, 1.0}; - static float back_mat_shininess[] = {50.0}; - static float back_mat_specular[] = {0.5, 0.5, 0.2, 1.0}; - static float back_mat_diffuse[] = {1.0, 1.0, 0.2, 1.0}; - static float lmodel_ambient[] = {1.0, 1.0, 1.0, 1.0}; - static float lmodel_twoside[] = {GL_TRUE}; - - glClearColor(0.0, 0.0, 0.0, 0.0); - - glFrontFace(GL_CW); - - glEnable(GL_DEPTH_TEST); - - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); - glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside); - glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse); - glLightfv(GL_LIGHT0, GL_POSITION, position); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - - glMaterialfv(GL_FRONT, GL_SHININESS, front_mat_shininess); - glMaterialfv(GL_FRONT, GL_SPECULAR, front_mat_specular); - glMaterialfv(GL_FRONT, GL_DIFFUSE, front_mat_diffuse); - glMaterialfv(GL_BACK, GL_SHININESS, back_mat_shininess); - glMaterialfv(GL_BACK, GL_SPECULAR, back_mat_specular); - glMaterialfv(GL_BACK, GL_DIFFUSE, back_mat_diffuse); - - glEnable(GL_CLIP_PLANE0); - - if (rgb) { - glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, decal); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, repeat); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, repeat); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, nearest); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, nearest); - glTexImage2D(GL_TEXTURE_2D, 0, 3, CHECKIMAGEWIDTH, CHECKIMAGEHEIGHT, 0, - GL_RGB, GL_UNSIGNED_BYTE, (GLvoid *)checkImage); - glEnable(GL_TEXTURE_2D); - - glCullFace(GL_BACK); - glEnable(GL_CULL_FACE); - } else { - SetGreyRamp(); - /* commented out by BrianP because it's the wrong way to handle a 4-bit visual! - if (doubleBuffer) { - colorIndexes[1] = 10; - colorIndexes[2] = 15; - } - */ - glMaterialiv(GL_FRONT_AND_BACK, GL_COLOR_INDEXES, colorIndexes); - } - - BuildLists(); - - dithering = GL_TRUE; - shade = GL_TRUE; - doStipple = GL_FALSE; - polyMode = GL_BACK; -} - -static void Reshape(int width, int height) -{ - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(90, 1.0, 1.0, 200.0); - glMatrixMode(GL_MODELVIEW); -} - -static void Key2(int key, int x, int y) -{ - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_LEFT: - yRotation += 0.5; - break; - case GLUT_KEY_RIGHT: - yRotation -= 0.5; - break; - case GLUT_KEY_UP: - plane[3] += 2.0; - break; - case GLUT_KEY_DOWN: - plane[3] -= 2.0; - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Key(unsigned char key, int x, int y) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(1); - - case 'Z': - zTranslation -= 1.0; - break; - case 'z': - zTranslation += 1.0; - break; - - case '1': - glPolygonMode(polyMode, GL_POINT); - break; - case '2': - glPolygonMode(polyMode, GL_LINE); - break; - case '3': - glPolygonMode(polyMode, GL_FILL); - break; - case 'p': - switch (polyMode) { - case GL_BACK: - polyMode = GL_FRONT; - printf("PolygonMode GL_FRONT\n"); - break; - case GL_FRONT: - polyMode = GL_FRONT_AND_BACK; - printf("PolygonMode GL_FRONT_AND_BACK\n"); - break; - case GL_FRONT_AND_BACK: - polyMode = GL_BACK; - printf("PolygonMode GL_BACK\n"); - break; - default: - break; - } - break; - - case '4': - glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST); - break; - case '5': - glEnable(GL_POLYGON_SMOOTH); - if (rgb) { - glBlendFunc(GL_SRC_ALPHA, GL_ONE); - glEnable(GL_BLEND); - glDisable(GL_DEPTH_TEST); - } else { - SetUpAntiAliasedGrayScale(); - } - break; - case '6': - glDisable(GL_POLYGON_SMOOTH); - if (rgb) { - glBlendFunc(GL_ONE, GL_ZERO); - glDisable(GL_BLEND); - glEnable(GL_DEPTH_TEST); - } else { - SetGreyRamp(); - } - break; - - case '8': - dithering = !dithering; - (dithering) ? glEnable(GL_DITHER) : glDisable(GL_DITHER); - break; - - case '9': - doStipple = !doStipple; - if (doStipple) { - glPolygonStipple(stipple); - glEnable(GL_POLYGON_STIPPLE); - } else { - glDisable(GL_POLYGON_STIPPLE); - } - break; - - case '0': - shade = !shade; - (shade) ? glShadeModel(GL_SMOOTH) : glShadeModel(GL_FLAT); - break; - - case 'q': - glDisable(GL_CULL_FACE); - printf("disable culling\n"); - break; - case 'w': - glEnable(GL_CULL_FACE); - glCullFace(GL_FRONT); - printf("enable front face culling\n"); - break; - case 'e': - glEnable(GL_CULL_FACE); - glCullFace(GL_BACK); - printf("enable back face culling\n"); - break; - - case 'r': - glFrontFace(GL_CW); - break; - case 't': - glFrontFace(GL_CCW); - break; - case 'y': - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glPixelStorei(GL_UNPACK_LSB_FIRST, 0); - glPolygonStipple(stipple); - break; - case 'u': - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glPixelStorei(GL_UNPACK_LSB_FIRST, 1); - glPolygonStipple(stipple); - break; - - case 'a': - glEnable(GL_TEXTURE_2D); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, repeat); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, repeat); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, nearest); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, nearest); - glTexImage2D(GL_TEXTURE_2D, 0, 4, BRICKIMAGEWIDTH, - BRICKIMAGEHEIGHT, 0, GL_RGBA, GL_UNSIGNED_BYTE, - (GLvoid *)brickImage); - break; - case 's': - glEnable(GL_TEXTURE_2D); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, repeat); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, repeat); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, nearest); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, nearest); - glTexImage2D(GL_TEXTURE_2D, 0, 3, CHECKIMAGEWIDTH, - CHECKIMAGEHEIGHT, 0, GL_RGB, GL_UNSIGNED_BYTE, - (GLvoid *)checkImage); - break; - case 'd': - glDisable(GL_TEXTURE_2D); - break; - - case 'f': - glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, decal); - break; - case 'g': - glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, modulate); - break; - - case 'n': - /* added by BrianP */ - noDraw = !noDraw; - if (noDraw) { - glDrawBuffer( GL_NONE ); - } - else { - if (doubleBuffer) { - glDrawBuffer( GL_BACK ); - } - else { - glDrawBuffer( GL_FRONT ); - } - } - break; - - case 'l': - /* Line Smooth - added by BrianP */ - LineSmooth = !LineSmooth; - if (LineSmooth) { - glEnable(GL_LINE_SMOOTH); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glEnable(GL_BLEND); - } - else { - glDisable(GL_LINE_SMOOTH); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glDisable(GL_BLEND); - } - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Draw(void) -{ - - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - - glTranslatef(0, 0, zTranslation); - glRotatef(30.0, 1, 0, 0); - glRotatef(yRotation, 0, 1, 0); - glClipPlane(GL_CLIP_PLANE0, plane); - glCallList(logo); - - glPopMatrix(); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - rgb = GL_TRUE; - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-ci") == 0) { - rgb = GL_FALSE; - } else if (strcmp(argv[i], "-rgb") == 0) { - rgb = GL_TRUE; - } else if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - unsigned int type; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300); - - type = GLUT_DEPTH; - type |= (rgb) ? GLUT_RGB : GLUT_INDEX; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Logo Test") == GL_FALSE) { - exit(1); - } - - InitMap(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(Key2); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/nurb.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/nurb.c deleted file mode 100644 index dc8991295e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/nurb.c +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include -#include - - -#ifndef CALLBACK -#define CALLBACK -#endif - - -#define INREAL float - -#define S_NUMPOINTS 13 -#define S_ORDER 3 -#define S_NUMKNOTS (S_NUMPOINTS + S_ORDER) -#define T_NUMPOINTS 3 -#define T_ORDER 3 -#define T_NUMKNOTS (T_NUMPOINTS + T_ORDER) -#define SQRT_TWO 1.41421356237309504880 - - -typedef INREAL Point[4]; - - -GLenum doubleBuffer; - -GLenum expectedError; -GLint rotX = 40, rotY = 40; -INREAL sknots[S_NUMKNOTS] = { - -1.0, -1.0, -1.0, 0.0, 1.0, 2.0, 3.0, 4.0, - 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 9.0, 9.0 -}; -INREAL tknots[T_NUMKNOTS] = { - 1.0, 1.0, 1.0, 2.0, 2.0, 2.0 -}; -Point ctlpoints[S_NUMPOINTS][T_NUMPOINTS] = { - { - { - 4.0, 2.0, 2.0, 1.0 - }, - { - 4.0, 1.6, 2.5, 1.0 - }, - { - 4.0, 2.0, 3.0, 1.0 - } - }, - { - { - 5.0, 4.0, 2.0, 1.0 - }, - { - 5.0, 4.0, 2.5, 1.0 - }, - { - 5.0, 4.0, 3.0, 1.0 - } - }, - { - { - 6.0, 5.0, 2.0, 1.0 - }, - { - 6.0, 5.0, 2.5, 1.0 - }, - { - 6.0, 5.0, 3.0, 1.0 - } - }, - { - { - SQRT_TWO*6.0, SQRT_TWO*6.0, SQRT_TWO*2.0, SQRT_TWO - }, - { - SQRT_TWO*6.0, SQRT_TWO*6.0, SQRT_TWO*2.5, SQRT_TWO - }, - { - SQRT_TWO*6.0, SQRT_TWO*6.0, SQRT_TWO*3.0, SQRT_TWO - } - }, - { - { - 5.2, 6.7, 2.0, 1.0 - }, - { - 5.2, 6.7, 2.5, 1.0 - }, - { - 5.2, 6.7, 3.0, 1.0 - } - }, - { - { - SQRT_TWO*4.0, SQRT_TWO*6.0, SQRT_TWO*2.0, SQRT_TWO - }, - { - SQRT_TWO*4.0, SQRT_TWO*6.0, SQRT_TWO*2.5, SQRT_TWO - }, - { - SQRT_TWO*4.0, SQRT_TWO*6.0, SQRT_TWO*3.0, SQRT_TWO - } - }, - { - { - 4.0, 5.2, 2.0, 1.0 - }, - { - 4.0, 4.6, 2.5, 1.0 - }, - { - 4.0, 5.2, 3.0, 1.0 - } - }, - { - { - SQRT_TWO*4.0, SQRT_TWO*6.0, SQRT_TWO*2.0, SQRT_TWO - }, - { - SQRT_TWO*4.0, SQRT_TWO*6.0, SQRT_TWO*2.5, SQRT_TWO - }, - { - SQRT_TWO*4.0, SQRT_TWO*6.0, SQRT_TWO*3.0, SQRT_TWO - } - }, - { - { - 2.8, 6.7, 2.0, 1.0 - }, - { - 2.8, 6.7, 2.5, 1.0 - }, - { - 2.8, 6.7, 3.0, 1.0 - } - }, - { - { - SQRT_TWO*2.0, SQRT_TWO*6.0, SQRT_TWO*2.0, SQRT_TWO - }, - { - SQRT_TWO*2.0, SQRT_TWO*6.0, SQRT_TWO*2.5, SQRT_TWO - }, - { - SQRT_TWO*2.0, SQRT_TWO*6.0, SQRT_TWO*3.0, SQRT_TWO - } - }, - { - { - 2.0, 5.0, 2.0, 1.0 - }, - { - 2.0, 5.0, 2.5, 1.0 - }, - { - 2.0, 5.0, 3.0, 1.0 - } - }, - { - { - 3.0, 4.0, 2.0, 1.0 - }, - { - 3.0, 4.0, 2.5, 1.0 - }, - { - 3.0, 4.0, 3.0, 1.0 - } - }, - { - { - 4.0, 2.0, 2.0, 1.0 - }, - { - 4.0, 1.6, 2.5, 1.0 - }, - { - 4.0, 2.0, 3.0, 1.0 - } - } -}; -GLUnurbsObj *theNurbs; - - -static void CALLBACK ErrorCallback(GLenum which) -{ - - if (which != expectedError) { - fprintf(stderr, "Unexpected error occured (%d):\n", which); - fprintf(stderr, " %s\n", (char *) gluErrorString(which)); - } -} - -typedef void (GLAPIENTRY *callback_t)(); - -static void Init(void) -{ - - theNurbs = gluNewNurbsRenderer(); - gluNurbsCallback(theNurbs, GLU_ERROR, (callback_t) ErrorCallback); - - gluNurbsProperty(theNurbs, GLU_SAMPLING_TOLERANCE, 15.0); - gluNurbsProperty(theNurbs, GLU_DISPLAY_MODE, GLU_OUTLINE_PATCH); - - expectedError = GLU_INVALID_ENUM; - gluNurbsProperty(theNurbs, ~0, 15.0); - expectedError = GLU_NURBS_ERROR13; - gluEndSurface(theNurbs); - expectedError = 0; - - glColor3f(1.0, 1.0, 1.0); -} - -static void Reshape(int width, int height) -{ - - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-2.0, 2.0, -2.0, 2.0, 0.8, 10.0); - gluLookAt(7.0, 4.5, 4.0, 4.5, 4.5, 2.5, 6.0, -3.0, 2.0); - glMatrixMode(GL_MODELVIEW); -} - -static void Key2(int key, int x, int y) -{ - - switch (key) { - case GLUT_KEY_DOWN: - rotX -= 5; - break; - case GLUT_KEY_UP: - rotX += 5; - break; - case GLUT_KEY_LEFT: - rotY -= 5; - break; - case GLUT_KEY_RIGHT: - rotY += 5; - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - } -} - -static void Draw(void) -{ - - glClear(GL_COLOR_BUFFER_BIT); - - glPushMatrix(); - - glTranslatef(4.0, 4.5, 2.5); - glRotatef(rotY, 1, 0, 0); - glRotatef(rotX, 0, 1, 0); - glTranslatef(-4.0, -4.5, -2.5); - - gluBeginSurface(theNurbs); - gluNurbsSurface(theNurbs, S_NUMKNOTS, sknots, T_NUMKNOTS, tknots, - 4*T_NUMPOINTS, 4, &ctlpoints[0][0][0], S_ORDER, - T_ORDER, GL_MAP2_VERTEX_4); - gluEndSurface(theNurbs); - - glPopMatrix(); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300); - - type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("NURBS Test") == GL_FALSE) { - exit(1); - } - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(Key2); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/oglinfo.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/oglinfo.c deleted file mode 100644 index 4fe51efb3c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/oglinfo.c +++ /dev/null @@ -1,218 +0,0 @@ -/* oglinfo.c */ - -/* This demo modified by BrianP to accomodate Mesa and test - * the GLX 1.1 functions. - */ - - - -#include -#include -#include -#include -#include - -int visual_request0[] = { None }; /* don't need much of a visual */ -int visual_request1[] = { GLX_RGBA, None }; /* in case CI failed */ - -int main(int argc, char **argv) -{ - char *display_name = NULL; - char *string; - Display *dpy; - int screen_num; - int major, minor; - XVisualInfo *vis; - GLXContext ctx; - Window root, win; - Colormap cmap; - XSetWindowAttributes swa; - int dontcare; - - /* parse arguments */ - if(argc > 1) { - if(!strcmp(argv[1],"-display")) - display_name = argv[2]; - else { - fprintf(stderr, "Usage: %s [-display ]\n",argv[0]); - return 0; - } - } - - /* get display */ - if (!(dpy = XOpenDisplay(display_name))) { - fprintf(stderr,"Error: XOpenDisplay() failed.\n"); - return 1; - } - - /* does the server know about OpenGL & GLX? */ -#ifndef MESA - if(!XQueryExtension(dpy, "GLX", &dontcare, &dontcare, &dontcare)) { - fprintf(stderr,"This system doesn't appear to support OpenGL\n"); - return 1; - } -#else - (void) dontcare; -#endif - - /* find the glx version */ - if(glXQueryVersion(dpy, &major, &minor)) - printf("GLX Version: %d.%d\n", major, minor); - else { - fprintf(stderr, "Error: glXQueryVersion() failed.\n"); - return 1; - } - - /* get screen number */ - screen_num = DefaultScreen(dpy); - -/* This #ifdef isn't redundant. It keeps the build from breaking -** if you are building on a machine that has an old (1.0) version -** of glx. -** -** This program could still be *run* on a machine that has an old -** version of glx, even if it was *compiled* on a version that has -** a new version. -** -** If compiled on a system with an old version of glx, then it will -** never recognize glx extensions, since that code would have been -** #ifdef'ed out. -*/ -#ifdef GLX_VERSION_1_1 - - /* - ** This test guarantees that glx, on the display you are inquiring, - ** suppports glXQueryExtensionsString(). - */ - if(minor > 0 || major > 1) - string = (char *) glXQueryExtensionsString(dpy, screen_num); - else - string = ""; - - if(string) - printf("GLX Extensions (client & server): %s\n", - string); - else { - fprintf(stderr, "Error: glXQueryExtensionsString() failed.\n"); - return 1; - } - - if (minor>0 || major>1) { - printf("glXGetClientString(GLX_VENDOR): %s\n", glXGetClientString(dpy,GLX_VENDOR)); - printf("glXGetClientString(GLX_VERSION): %s\n", glXGetClientString(dpy,GLX_VERSION)); - printf("glXGetClientString(GLX_EXTENSIONS): %s\n", glXGetClientString(dpy,GLX_EXTENSIONS)); - printf("glXQueryServerString(GLX_VENDOR): %s\n", glXQueryServerString(dpy,screen_num,GLX_VENDOR)); - printf("glXQueryServerString(GLX_VERSION): %s\n", glXQueryServerString(dpy,screen_num,GLX_VERSION)); - printf("glXQueryServerString(GLX_EXTENSIONS): %s\n", glXQueryServerString(dpy,screen_num,GLX_EXTENSIONS)); - } - - -#endif - - /* get any valid OpenGL visual */ - if (!(vis = glXChooseVisual(dpy, screen_num, visual_request0))) { - if (!(vis = glXChooseVisual(dpy, screen_num, visual_request1))) { - fprintf(stderr,"Error: glXChooseVisual() failed.\n"); - return 1; - } - } - - /* get context */ - ctx = glXCreateContext(dpy,vis,0,GL_TRUE); - - /* root window */ - root = RootWindow(dpy,vis->screen); - - /* get RGBA colormap */ - cmap = XCreateColormap(dpy, root, vis->visual, AllocNone); - - /* get window */ - swa.colormap = cmap; - swa.border_pixel = 0; - swa.event_mask = StructureNotifyMask; - win = XCreateWindow(dpy, root, 0, 0, 1, 1, 0, vis->depth, - InputOutput,vis->visual, - CWBorderPixel|CWColormap|CWEventMask, - &swa); - - glXMakeCurrent(dpy,win,ctx); - - string = (char *) glGetString(GL_VERSION); - if(string) -#ifdef MESA - printf("Mesa Version: %s\n", string); -#else - printf("OpenGL Version: %s\n", string); -#endif - else { - fprintf(stderr, "Error: glGetString(GL_VERSION) failed.\n"); - return 1; - } - - string = (char *) glGetString(GL_EXTENSIONS); - - if(string) -#ifdef MESA - printf("Mesa Extensions: %s\n", string); -#else - printf("OpenGL Extensions: %s\n", string); -#endif - else { - fprintf(stderr, "Error: glGetString(GL_EXTENSIONS) failed.\n"); - return 1; - } - - string = (char *) glGetString(GL_RENDERER); - - if(string) -#ifdef MESA - printf("Mesa Renderer: %s\n", string); -#else - printf("OpenGL renderer: %s\n", string); -#endif - else { - fprintf(stderr, "Error: glGetString(GL_RENDERER) failed.\n"); - return 1; - } - -/* -** This #ifdef prevents a build failure if you compile on an a -** machine with an old GLU library. -** -** If you build on a pre GLU 1.1 machine, you will never be able -** to get glu info, even if you run on a GLU 1.1 or latter machine, -** since the code has been #ifdef'ed out. -*/ -#ifdef GLU_VERSION_1_1 - - /* - ** If the glx version is 1.1 or latter, gluGetString() is guaranteed - ** to exist. - */ - if(minor > 0 || major > 1) - string = (char *) gluGetString(GLU_VERSION); - else - string = "1.0"; - - if(string) - printf("GLU Version: %s\n", string); - else { - fprintf(stderr, "Error: gluGetString(GLU_VERSION) failed.\n"); - return 1; - } - - if(minor > 0 || major > 1) - string = (char *) gluGetString(GLU_EXTENSIONS); - else - string = ""; - - if(string) - printf("GLU Extensions: %s\n", string); - else { - fprintf(stderr, "Error: gluGetString(GLU_EXTENSIONS) failed.\n"); - return 1; - } - -#endif - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/olympic.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/olympic.c deleted file mode 100644 index 5385e48702..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/olympic.c +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * Nov 20, 1995 use stdlib's rand()/srand() instead of random()/srand48(), etc. - */ - -/* - * Modified by Li Wei(liwei@aiar.xjtu.edu.cn) to be able to run in Windows - * 6/13 - * - * Modified by Brian Paul to compile with Windows OR Unix. 7/23/97 - */ - - -#define _HPUX_SOURCE - -#include -#include -#include -#include -#include - -#ifndef RAND_MAX -# define RAND_MAX 32767 -#endif - - -#define XSIZE 100 -#define YSIZE 75 - -#define RINGS 5 -#define BLUERING 0 -#define BLACKRING 1 -#define REDRING 2 -#define YELLOWRING 3 -#define GREENRING 4 - -#define BACKGROUND 8 - - -GLenum rgb, doubleBuffer; - -#include "tkmap.c" - -unsigned char rgb_colors[RINGS][3]; -int mapped_colors[RINGS]; -float dests[RINGS][3]; -float offsets[RINGS][3]; -float angs[RINGS]; -float rotAxis[RINGS][3]; -int iters[RINGS]; -GLuint theTorus; - - -void FillTorus(float rc, int numc, float rt, int numt) -{ - int i, j, k; - double s, t; - double x, y, z; - double pi, twopi; - - pi = 3.14159265358979323846; - twopi = 2 * pi; - - for (i = 0; i < numc; i++) { - glBegin(GL_QUAD_STRIP); - for (j = 0; j <= numt; j++) { - for (k = 1; k >= 0; k--) { - s = (i + k) % numc + 0.5; - t = j % numt; - - x = cos(t*twopi/numt) * cos(s*twopi/numc); - y = sin(t*twopi/numt) * cos(s*twopi/numc); - z = sin(s*twopi/numc); - glNormal3f(x, y, z); - - x = (rt + rc * cos(s*twopi/numc)) * cos(t*twopi/numt); - y = (rt + rc * cos(s*twopi/numc)) * sin(t*twopi/numt); - z = rc * sin(s*twopi/numc); - glVertex3f(x, y, z); - } - } - glEnd(); - } -} - -float Clamp(int iters_left, float t) -{ - if (iters_left < 3) { - return 0.0; - } - return (iters_left-2)*t/iters_left; -} - -void DrawScene(void) -{ - int i, j; - GLboolean goIdle; - static double t0 = -1.; - double t, dt; - t = glutGet(GLUT_ELAPSED_TIME) / 1000.; - if (t0 < 0.) - t0 = t; - dt = t - t0; - - if (dt < 1./30.) - return; - - t0 = t; - - goIdle = GL_TRUE; - for (i = 0; i < RINGS; i++) { - if (iters[i]) { - for (j = 0; j < 3; j++) { - offsets[i][j] = Clamp(iters[i], offsets[i][j]); - } - angs[i] = Clamp(iters[i], angs[i]); - iters[i]--; - goIdle = GL_FALSE; - } - } - if (goIdle) { - glutIdleFunc(NULL); - } - - glPushMatrix(); - - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); - gluLookAt(0,0,10, 0,0,0, 0,1,0); - - for (i = 0; i < RINGS; i++) { - if (rgb) { - glColor3ubv(rgb_colors[i]); - } else { - glIndexi(mapped_colors[i]); - } - glPushMatrix(); - glTranslatef(dests[i][0]+offsets[i][0], dests[i][1]+offsets[i][1], - dests[i][2]+offsets[i][2]); - glRotatef(angs[i], rotAxis[i][0], rotAxis[i][1], rotAxis[i][2]); - glCallList(theTorus); - glPopMatrix(); - } - - glPopMatrix(); - - glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -float MyRand(void) -{ - return 10.0 * ( (float) rand() / (float) RAND_MAX - 0.5 ); -} - -#if !defined(GLUTCALLBACK) -#define GLUTCALLBACK -#endif - -void GLUTCALLBACK glut_post_redisplay_p(void) -{ - glutPostRedisplay(); -} - -void ReInit(void) -{ - int i; - float deviation; - - deviation = MyRand() / 2; - deviation = deviation * deviation; - for (i = 0; i < RINGS; i++) { - offsets[i][0] = MyRand(); - offsets[i][1] = MyRand(); - offsets[i][2] = MyRand(); - angs[i] = 260.0 * MyRand(); - rotAxis[i][0] = MyRand(); - rotAxis[i][1] = MyRand(); - rotAxis[i][2] = MyRand(); - iters[i] = (deviation * MyRand() + 60.0); - } - glutIdleFunc(glut_post_redisplay_p); -} - -void Init(void) -{ - float base, height; - float aspect, x, y; - int i; - - float top_y = 1.0; - float bottom_y = 0.0; - float top_z = 0.15; - float bottom_z = 0.69; - float spacing = 2.5; - static float lmodel_ambient[] = {0.0, 0.0, 0.0, 0.0}; - static float lmodel_twoside[] = {GL_FALSE}; - static float lmodel_local[] = {GL_FALSE}; - static float light0_ambient[] = {0.1, 0.1, 0.1, 1.0}; - static float light0_diffuse[] = {1.0, 1.0, 1.0, 0.0}; - static float light0_position[] = {0.8660254, 0.5, 1, 0}; - static float light0_specular[] = {1.0, 1.0, 1.0, 0.0}; - static float bevel_mat_ambient[] = {0.0, 0.0, 0.0, 1.0}; - static float bevel_mat_shininess[] = {40.0}; - static float bevel_mat_specular[] = {1.0, 1.0, 1.0, 0.0}; - static float bevel_mat_diffuse[] = {1.0, 0.0, 0.0, 0.0}; - - srand( (unsigned int) glutGet(GLUT_ELAPSED_TIME) ); - - ReInit(); - for (i = 0; i < RINGS; i++) { - rgb_colors[i][0] = rgb_colors[i][1] = rgb_colors[i][2] = 0; - } - rgb_colors[BLUERING][2] = 255; - rgb_colors[REDRING][0] = 255; - rgb_colors[GREENRING][1] = 255; - rgb_colors[YELLOWRING][0] = 255; - rgb_colors[YELLOWRING][1] = 255; - mapped_colors[BLUERING] = COLOR_BLUE; - mapped_colors[REDRING] = COLOR_RED; - mapped_colors[GREENRING] = COLOR_GREEN; - mapped_colors[YELLOWRING] = COLOR_YELLOW; - mapped_colors[BLACKRING] = COLOR_BLACK; - - dests[BLUERING][0] = -spacing; - dests[BLUERING][1] = top_y; - dests[BLUERING][2] = top_z; - - dests[BLACKRING][0] = 0.0; - dests[BLACKRING][1] = top_y; - dests[BLACKRING][2] = top_z; - - dests[REDRING][0] = spacing; - dests[REDRING][1] = top_y; - dests[REDRING][2] = top_z; - - dests[YELLOWRING][0] = -spacing / 2.0; - dests[YELLOWRING][1] = bottom_y; - dests[YELLOWRING][2] = bottom_z; - - dests[GREENRING][0] = spacing / 2.0; - dests[GREENRING][1] = bottom_y; - dests[GREENRING][2] = bottom_z; - - base = 2.0; - height = 2.0; - theTorus = glGenLists(1); - glNewList(theTorus, GL_COMPILE); - FillTorus(0.1, 8, 1.0, 25); - glEndList(); - - x = (float)XSIZE; - y = (float)YSIZE; - aspect = x / y; - glEnable(GL_CULL_FACE); - glCullFace(GL_BACK); - glEnable(GL_DEPTH_TEST); - glClearDepth(1.0); - - if (rgb) { - glClearColor(0.5, 0.5, 0.5, 0.0); - glLightfv(GL_LIGHT0, GL_AMBIENT, light0_ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, light0_diffuse); - glLightfv(GL_LIGHT0, GL_SPECULAR, light0_specular); - glLightfv(GL_LIGHT0, GL_POSITION, light0_position); - glEnable(GL_LIGHT0); - - glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, lmodel_local); - glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); - glEnable(GL_LIGHTING); - - glMaterialfv(GL_FRONT, GL_AMBIENT, bevel_mat_ambient); - glMaterialfv(GL_FRONT, GL_SHININESS, bevel_mat_shininess); - glMaterialfv(GL_FRONT, GL_SPECULAR, bevel_mat_specular); - glMaterialfv(GL_FRONT, GL_DIFFUSE, bevel_mat_diffuse); - - glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); - glEnable(GL_COLOR_MATERIAL); - glShadeModel(GL_SMOOTH); - } else { - glClearIndex(BACKGROUND); - glShadeModel(GL_FLAT); - } - - glMatrixMode(GL_PROJECTION); - gluPerspective(45, 1.33, 0.1, 100.0); - glMatrixMode(GL_MODELVIEW); -} - -void Reshape(int width, int height) -{ - - glViewport(0, 0, width, height); -} - -void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - case 32: - ReInit(); - break; - } -} - -GLenum Args(int argc, char **argv) -{ - GLint i; - - rgb = GL_TRUE; - doubleBuffer = GL_TRUE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-ci") == 0) { - rgb = GL_FALSE; - } else if (strcmp(argv[i], "-rgb") == 0) { - rgb = GL_TRUE; - } else if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 400, 300); - - type = GLUT_DEPTH; - type |= (rgb) ? GLUT_RGB : GLUT_INDEX; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Olympic") == GL_FALSE) { - exit(1); - } - - InitMap(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(DrawScene); - glutIdleFunc(glut_post_redisplay_p); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/overlay.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/overlay.c deleted file mode 100644 index 23b5a4793b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/overlay.c +++ /dev/null @@ -1,378 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include -#include -#include - - -#ifndef PI -#define PI 3.141592657 -#endif - - -enum { - NORMAL = 0, - WEIRD = 1 -}; - -enum { - STREAK = 0, - CIRCLE = 1 -}; - -#define MAXSTARS 400 -#define MAXPOS 10000 -#define MAXWARP 10 -#define MAXANGLES 6000 - - -typedef struct _starRec { - GLint type; - float x[2], y[2], z[2]; - float offsetX, offsetY, offsetR, rotation; -} starRec; - - -GLenum doubleBuffer; -GLint windW, windH; - -GLenum flag = NORMAL, overlayInit = GL_FALSE; -GLint starCount = MAXSTARS / 2; -float speed = 1.0; -GLint nitro = 0; -starRec stars[MAXSTARS]; -float sinTable[MAXANGLES]; - - -float Sin(float angle) -{ - - return (sinTable[(GLint)angle]); -} - -float Cos(float angle) -{ - - return (sinTable[((GLint)angle+(MAXANGLES/4))%MAXANGLES]); -} - -void NewStar(GLint n, GLint d) -{ - - if (rand()%4 == 0) { - stars[n].type = CIRCLE; - } else { - stars[n].type = STREAK; - } - stars[n].x[0] = (float)(rand() % MAXPOS - MAXPOS / 2); - stars[n].y[0] = (float)(rand() % MAXPOS - MAXPOS / 2); - stars[n].z[0] = (float)(rand() % MAXPOS + d); - if (rand()%4 == 0 && flag == WEIRD) { - stars[n].offsetX = (float)(rand() % 100 - 100 / 2); - stars[n].offsetY = (float)(rand() % 100 - 100 / 2); - stars[n].offsetR = (float)(rand() % 25 - 25 / 2); - } else { - stars[n].offsetX = 0.0; - stars[n].offsetY = 0.0; - stars[n].offsetR = 0.0; - } -} - -void RotatePoint(float *x, float *y, float rotation) -{ - float tmpX, tmpY; - - tmpX = *x * Cos(rotation) - *y * Sin(rotation); - tmpY = *y * Cos(rotation) + *x * Sin(rotation); - *x = tmpX; - *y = tmpY; -} - -void MoveStars(void) -{ - float offset; - GLint n; - - offset = speed * 60.0; - - for (n = 0; n < starCount; n++) { - stars[n].x[1] = stars[n].x[0]; - stars[n].y[1] = stars[n].y[0]; - stars[n].z[1] = stars[n].z[0]; - stars[n].x[0] += stars[n].offsetX; - stars[n].y[0] += stars[n].offsetY; - stars[n].z[0] -= offset; - stars[n].rotation += stars[n].offsetR; - if (stars[n].rotation > MAXANGLES) { - stars[n].rotation = 0.0; - } - } -} - -GLenum StarPoint(GLint n) -{ - float x0, y0, x1, y1, width; - GLint i; - - x0 = stars[n].x[0] * windW / stars[n].z[0]; - y0 = stars[n].y[0] * windH / stars[n].z[0]; - RotatePoint(&x0, &y0, stars[n].rotation); - x0 += windW / 2.0; - y0 += windH / 2.0; - - if (x0 >= 0.0 && x0 < windW && y0 >= 0.0 && y0 < windH) { - if (stars[n].type == STREAK) { - x1 = stars[n].x[1] * windW / stars[n].z[1]; - y1 = stars[n].y[1] * windH / stars[n].z[1]; - RotatePoint(&x1, &y1, stars[n].rotation); - x1 += windW / 2.0; - y1 += windH / 2.0; - - glLineWidth(MAXPOS/100.0/stars[n].z[0]+1.0); - glColor3f(1.0, (MAXWARP-speed)/MAXWARP, (MAXWARP-speed)/MAXWARP); - if (fabs(x0-x1) < 1.0 && fabs(y0-y1) < 1.0) { - glBegin(GL_POINTS); - glVertex2f(x0, y0); - glEnd(); - } else { - glBegin(GL_LINES); - glVertex2f(x0, y0); - glVertex2f(x1, y1); - glEnd(); - } - } else { - width = MAXPOS / 10.0 / stars[n].z[0] + 1.0; - glColor3f(1.0, 0.0, 0.0); - glBegin(GL_POLYGON); - for (i = 0; i < 8; i++) { - float x = x0 + width * Cos((float)i*MAXANGLES/8.0); - float y = y0 + width * Sin((float)i*MAXANGLES/8.0); - glVertex2f(x, y); - }; - glEnd(); - } - return GL_TRUE; - } else { - return GL_FALSE; - } -} - -void ShowStars(void) -{ - GLint n; - - glClear(GL_COLOR_BUFFER_BIT); - - for (n = 0; n < starCount; n++) { - if (stars[n].z[0] > speed || (stars[n].z[0] > 0.0 && speed < MAXWARP)) { - if (StarPoint(n) == GL_FALSE) { - NewStar(n, MAXPOS); - } - } else { - NewStar(n, MAXPOS); - } - } -} - -static void Init(void) -{ - float angle; - GLint n; - - srand((unsigned int)time(NULL)); - - for (n = 0; n < MAXSTARS; n++) { - NewStar(n, 100); - } - - angle = 0.0; - for (n = 0; n < MAXANGLES ; n++) { - sinTable[n] = sin(angle); - angle += PI / (MAXANGLES / 2.0); - } - - glClearColor(0.0, 0.0, 0.0, 0.0); - - glDisable(GL_DITHER); -} - -void Reshape(int width, int height) -{ - - windW = (GLint)width; - windH = (GLint)height; - - glutUseLayer(GLUT_OVERLAY); - - glViewport(0, 0, windW, windH); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(-0.5, windW+0.5, -0.5, windH+0.5); - glMatrixMode(GL_MODELVIEW); - overlayInit = GL_FALSE; - - glutUseLayer(GLUT_NORMAL); - - glViewport(0, 0, windW, windH); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(-0.5, windW+0.5, -0.5, windH+0.5); - glMatrixMode(GL_MODELVIEW); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - case 32: - flag = (flag == NORMAL) ? WEIRD : NORMAL; - break; - case 't': - nitro = 1; - break; - default: - return; - } -} - -void Idle(void) -{ - - if (overlayInit == GL_FALSE) { - glutUseLayer(GLUT_OVERLAY); - glClear(GL_COLOR_BUFFER_BIT); -/* glColor3f(1.0, 0.0, 0.0);*/ - - glIndexf( 2.0 ); - glBegin(GL_POLYGON); - glVertex2i(windW/4-10, windH/4-10); - glVertex2i(windW/2-10, windH/4-10); - glVertex2i(windW/2-10, windH/2-10); - glVertex2i(windW/4-10, windH/2-10); - glEnd(); - - glIndexf( 0.0 ); - glBegin(GL_POLYGON); - glVertex2i(windW/4, windH/4); - glVertex2i(windW/2, windH/4); - glVertex2i(windW/2, windH/2); - glVertex2i(windW/4, windH/2); - glEnd(); - - glIndexf( 1.0 ); - glBegin(GL_POLYGON); - glVertex2i(windW/4+10, windH/4+10); - glVertex2i(windW/2+10, windH/4+10); - glVertex2i(windW/2+10, windH/2+10); - glVertex2i(windW/4+10, windH/2+10); - glEnd(); - - glutUseLayer(GLUT_NORMAL); - overlayInit = GL_TRUE; - } - - MoveStars(); - ShowStars(); - if (nitro > 0) { - speed = (float)(nitro / 10) + 1.0; - if (speed > MAXWARP) { - speed = MAXWARP; - } - if (++nitro > MAXWARP*10) { - nitro = -nitro; - } - } else if (nitro < 0) { - nitro++; - speed = (float)(-nitro / 10) + 1.0; - if (speed > MAXWARP) { - speed = MAXWARP; - } - } - - glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_TRUE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - if (!glutLayerGet(GLUT_OVERLAY_POSSIBLE)) - { - fprintf(stderr, "Overlay not available\n"); - return(1); - } - - if (Args(argc, argv) == GL_FALSE) { - return(1); - } - - windW = 300; - windH = 300; - glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300); - - type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Overlay Test") == GL_FALSE) { - return(1); - } - - glutEstablishOverlay(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutIdleFunc(Idle); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/point.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/point.c deleted file mode 100644 index 4cb6ad7d51..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/point.c +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include - - -#define CI_RED COLOR_RED -#define CI_ANTI_ALIAS_GREEN 16 -#define CI_ANTI_ALIAS_YELLOW 32 -#define CI_ANTI_ALIAS_RED 48 - - -GLenum rgb, doubleBuffer, windType; -GLint windW, windH; - -#include "tkmap.c" - -GLenum mode; -GLint size; -float point[3] = { - 1.0, 1.0, 0.0 -}; - - -static void Init(void) -{ - GLint i; - - glClearColor(0.0, 0.0, 0.0, 0.0); - - glBlendFunc(GL_SRC_ALPHA, GL_ZERO); - - if (!rgb) { - for (i = 0; i < 16; i++) { - glutSetColor(i+CI_ANTI_ALIAS_RED, i/15.0, 0.0, 0.0); - glutSetColor(i+CI_ANTI_ALIAS_YELLOW, i/15.0, i/15.0, 0.0); - glutSetColor(i+CI_ANTI_ALIAS_GREEN, 0.0, i/15.0, 0.0); - } - } - - mode = GL_FALSE; - size = 1; -} - -static void Reshape(int width, int height) -{ - - windW = (GLint)width; - windH = (GLint)height; - - glViewport(0, 0, width, height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(-windW/2, windW/2, -windH/2, windH/2); - glMatrixMode(GL_MODELVIEW); -} - -static void Key2(int key, int x, int y) -{ - - switch (key) { - case GLUT_KEY_LEFT: - point[0] -= 0.25; - break; - case GLUT_KEY_RIGHT: - point[0] += 0.25; - break; - case GLUT_KEY_UP: - point[1] += 0.25; - break; - case GLUT_KEY_DOWN: - point[1] -= 0.25; - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - case '1': - mode = !mode; - break; - case 'W': - size++; - break; - case 'w': - size--; - if (size < 1) { - size = 1; - } - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Draw(void) -{ - - glClear(GL_COLOR_BUFFER_BIT); - - SetColor(COLOR_YELLOW); - glBegin(GL_LINE_STRIP); - glVertex2f(-windW/2, 0); - glVertex2f(windW/2, 0); - glEnd(); - glBegin(GL_LINE_STRIP); - glVertex2f(0, -windH/2); - glVertex2f(0, windH/2); - glEnd(); - - if (mode) { - glEnable(GL_BLEND); - glEnable(GL_POINT_SMOOTH); - } else { - glDisable(GL_BLEND); - glDisable(GL_POINT_SMOOTH); - } - - glPointSize(size); - if (mode) { - (rgb) ? glColor3f(1.0, 0.0, 0.0) : glIndexf(CI_ANTI_ALIAS_RED); - } else { - (rgb) ? glColor3f(1.0, 0.0, 0.0) : glIndexf(CI_RED); - } - glBegin(GL_POINTS); - glVertex3fv(point); - glEnd(); - - glDisable(GL_POINT_SMOOTH); - glDisable(GL_BLEND); - - glPointSize(1); - SetColor(COLOR_GREEN); - glBegin(GL_POINTS); - glVertex3fv(point); - glEnd(); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - rgb = GL_TRUE; - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-ci") == 0) { - rgb = GL_FALSE; - } else if (strcmp(argv[i], "-rgb") == 0) { - rgb = GL_TRUE; - } else if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - windW = 300; - windH = 300; - glutInitWindowPosition(0, 0); glutInitWindowSize( windW, windH); - - windType = (rgb) ? GLUT_RGB : GLUT_INDEX; - windType |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(windType); - - if (glutCreateWindow("Point Test") == GL_FALSE) { - exit(1); - } - - InitMap(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(Key2); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/prim.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/prim.c deleted file mode 100644 index 388e0153b4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/prim.c +++ /dev/null @@ -1,546 +0,0 @@ -#include -#include -#include -#include - - -#define PIXEL_CENTER(x) ((long)(x) + 0.5) - -#define GAP 10 -#define ROWS 3 -#define COLS 4 - -#define OPENGL_WIDTH 48 -#define OPENGL_HEIGHT 13 - - -GLenum rgb, doubleBuffer, windType; -GLint windW, windH; - -GLenum mode1, mode2; -GLint boxW, boxH; -GLubyte OpenGL_bits[] = { - 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0xfb, 0xff, 0xff, 0xff, 0x01, - 0x7f, 0xfb, 0xff, 0xff, 0xff, 0x01, - 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x3e, 0x8f, 0xb7, 0xf9, 0xfc, 0x01, - 0x63, 0xdb, 0xb0, 0x8d, 0x0d, 0x00, - 0x63, 0xdb, 0xb7, 0x8d, 0x0d, 0x00, - 0x63, 0xdb, 0xb6, 0x8d, 0x0d, 0x00, - 0x63, 0x8f, 0xf3, 0xcc, 0x0d, 0x00, - 0x63, 0x00, 0x00, 0x0c, 0x4c, 0x0a, - 0x63, 0x00, 0x00, 0x0c, 0x4c, 0x0e, - 0x63, 0x00, 0x00, 0x8c, 0xed, 0x0e, - 0x3e, 0x00, 0x00, 0xf8, 0x0c, 0x00, -}; - - -#include "tkmap.c" - -static void Init(void) -{ - - mode1 = GL_TRUE; - mode2 = GL_TRUE; -} - -static void Reshape(int width, int height) -{ - - windW = (GLint)width; - windH = (GLint)height; -} - -static void RotateColorMask(void) -{ - static GLint rotation = 0; - - rotation = (rotation + 1) & 0x3; - switch (rotation) { - case 0: - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); - glIndexMask( 0xff ); - break; - case 1: - glColorMask(GL_FALSE, GL_TRUE, GL_TRUE, GL_TRUE); - glIndexMask(0xFE); - break; - case 2: - glColorMask(GL_TRUE, GL_FALSE, GL_TRUE, GL_TRUE); - glIndexMask(0xFD); - break; - case 3: - glColorMask(GL_TRUE, GL_TRUE, GL_FALSE, GL_TRUE); - glIndexMask(0xFB); - break; - } -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - case '1': - mode1 = !mode1; - break; - case '2': - mode2 = !mode2; - break; - case '3': - RotateColorMask(); - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Viewport(GLint row, GLint column) -{ - GLint x, y; - - boxW = (windW - (COLS + 1) * GAP) / COLS; - boxH = (windH - (ROWS + 1) * GAP) / ROWS; - - x = GAP + column * (boxW + GAP); - y = GAP + row * (boxH + GAP); - - glViewport(x, y, boxW, boxH); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-boxW/2, boxW/2, -boxH/2, boxH/2, 0.0, 1.0); - glMatrixMode(GL_MODELVIEW); - - glEnable(GL_SCISSOR_TEST); - glScissor(x, y, boxW, boxH); -} - -static void Point(void) -{ - GLint i; - - glBegin(GL_POINTS); - SetColor(COLOR_WHITE); - glVertex2i(0, 0); - for (i = 1; i < 8; i++) { - GLint j = i * 2; - SetColor(COLOR_BLACK+i); - glVertex2i(-j, -j); - glVertex2i(-j, 0); - glVertex2i(-j, j); - glVertex2i(0, j); - glVertex2i(j, j); - glVertex2i(j, 0); - glVertex2i(j, -j); - glVertex2i(0, -j); - } - glEnd(); -} - -static void Lines(void) -{ - GLint i; - - glPushMatrix(); - - glTranslatef(-12, 0, 0); - for (i = 1; i < 8; i++) { - SetColor(COLOR_BLACK+i); - glBegin(GL_LINES); - glVertex2i(-boxW/4, -boxH/4); - glVertex2i(boxW/4, boxH/4); - glEnd(); - glTranslatef(4, 0, 0); - } - - glPopMatrix(); - - glBegin(GL_LINES); - glVertex2i(0, 0); - glEnd(); -} - -static void LineStrip(void) -{ - - glBegin(GL_LINE_STRIP); - SetColor(COLOR_RED); - glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(-boxH/4)); - SetColor(COLOR_GREEN); - glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(boxH/4)); - SetColor(COLOR_BLUE); - glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(boxH/4)); - SetColor(COLOR_WHITE); - glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(-boxH/4)); - glEnd(); - - glBegin(GL_LINE_STRIP); - glVertex2i(0, 0); - glEnd(); -} - -static void LineLoop(void) -{ - - glBegin(GL_LINE_LOOP); - SetColor(COLOR_RED); - glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(-boxH/4)); - SetColor(COLOR_GREEN); - glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(boxH/4)); - SetColor(COLOR_BLUE); - glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(boxH/4)); - SetColor(COLOR_WHITE); - glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(-boxH/4)); - glEnd(); - - glEnable(GL_LOGIC_OP); - glLogicOp(GL_XOR); - - glEnable(GL_BLEND); - glBlendFunc(GL_ONE, GL_ONE); - - SetColor(COLOR_MAGENTA); - glBegin(GL_LINE_LOOP); - glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(-boxH/8)); - glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(boxH/8)); - glEnd(); - glBegin(GL_LINE_LOOP); - glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(boxH/8+5)); - glVertex2f(PIXEL_CENTER(boxW/8), PIXEL_CENTER(boxH/8+5)); - glEnd(); - glDisable(GL_LOGIC_OP); - glDisable(GL_BLEND); - - SetColor(COLOR_GREEN); - glBegin(GL_POINTS); - glVertex2i(0, 0); - glEnd(); - - glBegin(GL_LINE_LOOP); - glVertex2i(0, 0); - glEnd(); -} - -static void Bitmap(void) -{ - - glBegin(GL_LINES); - SetColor(COLOR_GREEN); - glVertex2i(-boxW/2, 0); - glVertex2i(boxW/2, 0); - glVertex2i(0, -boxH/2); - glVertex2i(0, boxH/2); - SetColor(COLOR_RED); - glVertex2i(0, -3); - glVertex2i(0, -3+OPENGL_HEIGHT); - SetColor(COLOR_BLUE); - glVertex2i(0, -3); - glVertex2i(OPENGL_WIDTH, -3); - glEnd(); - - SetColor(COLOR_GREEN); - - glPixelStorei(GL_UNPACK_LSB_FIRST, GL_TRUE); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - glRasterPos2i(0, 0); - glBitmap(OPENGL_WIDTH, OPENGL_HEIGHT, 0, 3, 0.0, 0.0, OpenGL_bits); -} - -static void Triangles(void) -{ - - glBegin(GL_TRIANGLES); - SetColor(COLOR_GREEN); - glVertex2i(-boxW/4, -boxH/4); - SetColor(COLOR_RED); - glVertex2i(-boxW/8, -boxH/16); - SetColor(COLOR_BLUE); - glVertex2i(boxW/8, -boxH/16); - - SetColor(COLOR_GREEN); - glVertex2i(-boxW/4, boxH/4); - SetColor(COLOR_RED); - glVertex2i(-boxW/8, boxH/16); - SetColor(COLOR_BLUE); - glVertex2i(boxW/8, boxH/16); - glEnd(); - - glBegin(GL_TRIANGLES); - glVertex2i(0, 0); - glVertex2i(-100, 100); - glEnd(); -} - -static void TriangleStrip(void) -{ - - glBegin(GL_TRIANGLE_STRIP); - SetColor(COLOR_GREEN); - glVertex2i(-boxW/4, -boxH/4); - SetColor(COLOR_RED); - glVertex2i(-boxW/4, boxH/4); - SetColor(COLOR_BLUE); - glVertex2i(0, -boxH/4); - SetColor(COLOR_WHITE); - glVertex2i(0, boxH/4); - SetColor(COLOR_CYAN); - glVertex2i(boxW/4, -boxH/4); - SetColor(COLOR_YELLOW); - glVertex2i(boxW/4, boxH/4); - glEnd(); - - glBegin(GL_TRIANGLE_STRIP); - glVertex2i(0, 0); - glVertex2i(-100, 100); - glEnd(); -} - -static void TriangleFan(void) -{ - GLint vx[8][2]; - GLint x0, y0, x1, y1, x2, y2, x3, y3; - GLint i; - - y0 = -boxH/4; - y1 = y0 + boxH/2/3; - y2 = y1 + boxH/2/3; - y3 = boxH/4; - x0 = -boxW/4; - x1 = x0 + boxW/2/3; - x2 = x1 + boxW/2/3; - x3 = boxW/4; - - vx[0][0] = x0; vx[0][1] = y1; - vx[1][0] = x0; vx[1][1] = y2; - vx[2][0] = x1; vx[2][1] = y3; - vx[3][0] = x2; vx[3][1] = y3; - vx[4][0] = x3; vx[4][1] = y2; - vx[5][0] = x3; vx[5][1] = y1; - vx[6][0] = x2; vx[6][1] = y0; - vx[7][0] = x1; vx[7][1] = y0; - - glBegin(GL_TRIANGLE_FAN); - SetColor(COLOR_WHITE); - glVertex2i(0, 0); - for (i = 0; i < 8; i++) { - SetColor(COLOR_WHITE-i); - glVertex2iv(vx[i]); - } - glEnd(); - - glBegin(GL_TRIANGLE_FAN); - glVertex2i(0, 0); - glVertex2i(-100, 100); - glEnd(); -} - -static void Rect(void) -{ - - SetColor(COLOR_GREEN); - glRecti(-boxW/4, -boxH/4, boxW/4, boxH/4); -} - -static void PolygonFunc(void) -{ - GLint vx[8][2]; - GLint x0, y0, x1, y1, x2, y2, x3, y3; - GLint i; - - y0 = -boxH/4; - y1 = y0 + boxH/2/3; - y2 = y1 + boxH/2/3; - y3 = boxH/4; - x0 = -boxW/4; - x1 = x0 + boxW/2/3; - x2 = x1 + boxW/2/3; - x3 = boxW/4; - - vx[0][0] = x0; vx[0][1] = y1; - vx[1][0] = x0; vx[1][1] = y2; - vx[2][0] = x1; vx[2][1] = y3; - vx[3][0] = x2; vx[3][1] = y3; - vx[4][0] = x3; vx[4][1] = y2; - vx[5][0] = x3; vx[5][1] = y1; - vx[6][0] = x2; vx[6][1] = y0; - vx[7][0] = x1; vx[7][1] = y0; - - glBegin(GL_POLYGON); - for (i = 0; i < 8; i++) { - SetColor(COLOR_WHITE-i); - glVertex2iv(vx[i]); - } - glEnd(); - - glBegin(GL_POLYGON); - glVertex2i(0, 0); - glVertex2i(100, 100); - glEnd(); -} - -static void Quads(void) -{ - - glBegin(GL_QUADS); - SetColor(COLOR_GREEN); - glVertex2i(-boxW/4, -boxH/4); - SetColor(COLOR_RED); - glVertex2i(-boxW/8, -boxH/16); - SetColor(COLOR_BLUE); - glVertex2i(boxW/8, -boxH/16); - SetColor(COLOR_WHITE); - glVertex2i(boxW/4, -boxH/4); - - SetColor(COLOR_GREEN); - glVertex2i(-boxW/4, boxH/4); - SetColor(COLOR_RED); - glVertex2i(-boxW/8, boxH/16); - SetColor(COLOR_BLUE); - glVertex2i(boxW/8, boxH/16); - SetColor(COLOR_WHITE); - glVertex2i(boxW/4, boxH/4); - glEnd(); - - glBegin(GL_QUADS); - glVertex2i(0, 0); - glVertex2i(100, 100); - glVertex2i(-100, 100); - glEnd(); -} - -static void QuadStrip(void) -{ - - glBegin(GL_QUAD_STRIP); - SetColor(COLOR_GREEN); - glVertex2i(-boxW/4, -boxH/4); - SetColor(COLOR_RED); - glVertex2i(-boxW/4, boxH/4); - SetColor(COLOR_BLUE); - glVertex2i(0, -boxH/4); - SetColor(COLOR_WHITE); - glVertex2i(0, boxH/4); - SetColor(COLOR_CYAN); - glVertex2i(boxW/4, -boxH/4); - SetColor(COLOR_YELLOW); - glVertex2i(boxW/4, boxH/4); - glEnd(); - - glBegin(GL_QUAD_STRIP); - glVertex2i(0, 0); - glVertex2i(100, 100); - glVertex2i(-100, 100); - glEnd(); -} - -static void Draw(void) -{ - - glViewport(0, 0, windW, windH); - glDisable(GL_SCISSOR_TEST); - - glPushAttrib(GL_COLOR_BUFFER_BIT); - - glColorMask(1, 1, 1, 1); - glIndexMask(~0); - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - glPopAttrib(); - - if (mode1) { - glShadeModel(GL_SMOOTH); - } else { - glShadeModel(GL_FLAT); - } - - if (mode2) { - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - } else { - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - } - - Viewport(0, 0); Point(); - Viewport(0, 1); Lines(); - Viewport(0, 2); LineStrip(); - Viewport(0, 3); LineLoop(); - - Viewport(1, 0); Bitmap(); - - Viewport(1, 1); TriangleFan(); - Viewport(1, 2); Triangles(); - Viewport(1, 3); TriangleStrip(); - - Viewport(2, 0); Rect(); - Viewport(2, 1); PolygonFunc(); - Viewport(2, 2); Quads(); - Viewport(2, 3); QuadStrip(); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - rgb = GL_TRUE; - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-ci") == 0) { - rgb = GL_FALSE; - } else if (strcmp(argv[i], "-rgb") == 0) { - rgb = GL_TRUE; - } else if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - windW = 600; - windH = 300; - glutInitWindowPosition(0, 0); glutInitWindowSize( windW, windH); - - windType = (rgb) ? GLUT_RGB : GLUT_INDEX; - windType |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(windType); - - if (glutCreateWindow("Primitive Test") == GL_FALSE) { - exit(1); - } - - InitMap(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/quad.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/quad.c deleted file mode 100644 index 193850abc4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/quad.c +++ /dev/null @@ -1,457 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include - - -#ifndef CALLBACK -#define CALLBACK -#endif - - -#define PI 3.141592654 -#define BLACK 0 -#define GRAY 128 -#define WHITE 255 -#define RD 0xA4,0x00,0x00,0xFF -#define WT 0xFF,0xFF,0xFF,0xFF -#define brickImageWidth 16 -#define brickImageHeight 16 - - -#include "loadppm.c" - -GLenum rgb, doubleBuffer; - -#include "tkmap.c" - -float black[3] = { - 0.0, 0.0, 0.0 -}; -float blue[3] = { - 0.0, 0.0, 1.0 -}; -float gray[3] = { - 0.5, 0.5, 0.5 -}; -float white[3] = { - 1.0, 1.0, 1.0 -}; - -GLenum doDither = GL_TRUE; -GLenum shade = GL_TRUE; -GLenum texture = GL_TRUE; - -float xRotation = 30.0, yRotation = 30.0, zRotation = 0.0; -GLint radius1, radius2; -GLdouble angle1, angle2; -GLint slices, stacks; -GLint height; -GLint orientation = GLU_OUTSIDE; -GLint whichQuadric=0; -GLUquadricObj *quadObj; - -GLubyte brickImage[4*brickImageWidth*brickImageHeight] = { - RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, - RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, - RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, - RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, - WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, - RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, - RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, - RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, - RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, - WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, - RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, - RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, - RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, - RD, RD, RD, RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, - WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, WT, - RD, RD, RD, RD, WT, RD, RD, RD, RD, RD, RD, RD, RD, RD, WT, RD -}; -char *texFileName = 0; - - -static void CALLBACK ErrorHandler(GLenum which) -{ - - fprintf(stderr, "Quad Error: %s\n", (char *) gluErrorString(which)); -} - -typedef void (GLAPIENTRY *callback_t)(); - -static void Init(void) -{ - static GLint colorIndexes[3] = {0, 200, 255}; - static float ambient[] = {0.1, 0.1, 0.1, 1.0}; - static float diffuse[] = {0.5, 1.0, 1.0, 1.0}; - static float position[] = {90.0, 90.0, 150.0, 0.0}; - static float front_mat_shininess[] = {30.0}; - static float front_mat_specular[] = {0.2, 0.2, 0.2, 1.0}; - static float front_mat_diffuse[] = {0.5, 0.28, 0.38, 1.0}; - static float back_mat_shininess[] = {50.0}; - static float back_mat_specular[] = {0.5, 0.5, 0.2, 1.0}; - static float back_mat_diffuse[] = {1.0, 1.0, 0.2, 1.0}; - static float lmodel_ambient[] = {1.0, 1.0, 1.0, 1.0}; - static float lmodel_twoside[] = {GL_TRUE}; - static float decal[] = {GL_DECAL}; - static float repeat[] = {GL_REPEAT}; - static float nearest[] = {GL_NEAREST}; - static PPMImage *image; - - if (!rgb) { - SetGreyRamp(); - } - glClearColor(0.0, 0.0, 0.0, 0.0); - - glEnable(GL_DEPTH_TEST); - - glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse); - glLightfv(GL_LIGHT0, GL_POSITION, position); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); - glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - - glMaterialfv(GL_FRONT, GL_SHININESS, front_mat_shininess); - glMaterialfv(GL_FRONT, GL_SPECULAR, front_mat_specular); - glMaterialfv(GL_FRONT, GL_DIFFUSE, front_mat_diffuse); - glMaterialfv(GL_BACK, GL_SHININESS, back_mat_shininess); - glMaterialfv(GL_BACK, GL_SPECULAR, back_mat_specular); - glMaterialfv(GL_BACK, GL_DIFFUSE, back_mat_diffuse); - if (!rgb) { - glMaterialiv( GL_FRONT_AND_BACK, GL_COLOR_INDEXES, colorIndexes); - } - - glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, decal); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, repeat); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, repeat); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, nearest); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, nearest); - if (texFileName) { - image = LoadPPM(texFileName); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - gluBuild2DMipmaps(GL_TEXTURE_2D, 3, image->sizeX, image->sizeY, - GL_RGB, GL_UNSIGNED_BYTE, image->data); - } else { - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glTexImage2D(GL_TEXTURE_2D, 0, 4, brickImageWidth, brickImageHeight, - 0, GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid *)brickImage); - } - - quadObj = gluNewQuadric(); - gluQuadricCallback(quadObj, GLU_ERROR, (callback_t) ErrorHandler); - - radius1 = 10; - radius2 = 5; - angle1 = 90; - angle2 = 180; - slices = 16; - stacks = 10; - height = 20; -} - -static void Reshape(int width, int height) -{ - - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1, 1, -1, 1, 1, 10); - gluLookAt(2, 2, 2, 0, 0, 0, 0, 0, 1); - glMatrixMode(GL_MODELVIEW); -} - -static void Key2(int key, int x, int y) -{ - - switch (key) { - case GLUT_KEY_LEFT: - yRotation += 5; - break; - case GLUT_KEY_RIGHT: - yRotation -= 5; - break; - case GLUT_KEY_UP: - xRotation += 5; - break; - case GLUT_KEY_DOWN: - xRotation -= 5; - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - - case 'X': - zRotation += 5; - break; - case 'x': - zRotation -= 5; - break; - - case '1': - gluQuadricDrawStyle(quadObj, GLU_FILL); - break; - case '2': - gluQuadricDrawStyle(quadObj, GLU_POINT); - break; - case '3': - gluQuadricDrawStyle(quadObj, GLU_LINE); - break; - case '4': - gluQuadricDrawStyle(quadObj, GLU_SILHOUETTE); - break; - - case '0': - shade = !shade; - if (shade) { - glShadeModel(GL_SMOOTH); - gluQuadricNormals(quadObj, GLU_SMOOTH); - } else { - glShadeModel(GL_FLAT); - gluQuadricNormals(quadObj, GLU_FLAT); - } - break; - - case 'A': - stacks++; - break; - case 'a': - stacks--; - break; - - case 'S': - slices++; - break; - case 's': - slices--; - break; - - case 'd': - switch(orientation) { - case GLU_OUTSIDE: - orientation = GLU_INSIDE; - break; - case GLU_INSIDE: - default: - orientation = GLU_OUTSIDE; - break; - } - gluQuadricOrientation(quadObj, orientation); - break; - - case 'f': - whichQuadric = (whichQuadric + 1) % 4; - break; - - case 'G': - radius1 += 1; - break; - case 'g': - radius1 -= 1; - break; - - case 'J': - radius2 += 1; - break; - case 'j': - radius2 -= 1; - break; - - case 'H': - height += 2; - break; - case 'h': - height -= 2; - break; - - case 'K': - angle1 += 5; - break; - case 'k': - angle1 -= 5; - break; - - case 'L': - angle2 += 5; - break; - case 'l': - angle2 -= 5; - break; - - case 'z': - texture = !texture; - if (texture) { - gluQuadricTexture(quadObj, GL_TRUE); - glEnable(GL_TEXTURE_2D); - } else { - gluQuadricTexture(quadObj, GL_FALSE); - glDisable(GL_TEXTURE_2D); - } - break; - - case 'q': - glDisable(GL_CULL_FACE); - break; - case 'w': - glEnable(GL_CULL_FACE); - glCullFace(GL_FRONT); - break; - case 'e': - glEnable(GL_CULL_FACE); - glCullFace(GL_BACK); - break; - - case 'r': - glFrontFace(GL_CW); - break; - case 't': - glFrontFace(GL_CCW); - break; - - case 'y': - doDither = !doDither; - (doDither) ? glEnable(GL_DITHER) : glDisable(GL_DITHER); - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Draw(void) -{ - - glLoadIdentity(); - glRotatef(xRotation, 1, 0, 0); - glRotatef(yRotation, 0, 1, 0); - glRotatef(zRotation, 0, 0, 1); - - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); - - glColor3f(1.0, 1.0, 1.0); - switch (whichQuadric) { - case 0: - glTranslatef(0, 0, -height/20.0); - gluCylinder(quadObj, radius1/10.0, radius2/10.0, height/10.0, - slices, stacks); - break; - case 1: - gluSphere(quadObj, radius1/10.0, slices, stacks); - break; - case 2: - gluPartialDisk(quadObj, radius2/10.0, radius1/10.0, slices, - stacks, angle1, angle2); - break; - case 3: - gluDisk(quadObj, radius2/10.0, radius1/10.0, slices, stacks); - break; - } - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - rgb = GL_TRUE; - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-ci") == 0) { - rgb = GL_FALSE; - } else if (strcmp(argv[i], "-rgb") == 0) { - rgb = GL_TRUE; - } else if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else if (strcmp(argv[i], "-f") == 0) { - if (i+1 >= argc || argv[i+1][0] == '-') { - printf("-f (No file name).\n"); - return GL_FALSE; - } else { - texFileName = argv[++i]; - } - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300); - - type = GLUT_DEPTH; - type |= (rgb) ? GLUT_RGB : GLUT_INDEX; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Quad Test") == GL_FALSE) { - exit(1); - } - - InitMap(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(Key2); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/rgbtoppm.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/rgbtoppm.c deleted file mode 100644 index 116d9a8cfa..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/rgbtoppm.c +++ /dev/null @@ -1,285 +0,0 @@ - -/* texture.c - by David Blythe, SGI */ - -/* texload is a simplistic routine for reading an SGI .rgb image file. */ - -#include -#include -#include - -#include - -typedef struct _ImageRec { - unsigned short imagic; - unsigned short type; - unsigned short dim; - unsigned short xsize, ysize, zsize; - unsigned int min, max; - unsigned int wasteBytes; - char name[80]; - unsigned long colorMap; - FILE *file; - unsigned char *tmp; - unsigned long rleEnd; - unsigned int *rowStart; - int *rowSize; -} ImageRec; - -void -rgbtorgb(unsigned char *r,unsigned char *g,unsigned char *b,unsigned char *l,int n) { - while(n--) { - l[0] = r[0]; - l[1] = g[0]; - l[2] = b[0]; - l += 3; r++; g++; b++; - } -} - -static void -ConvertShort(unsigned short *array, unsigned int length) { - unsigned short b1, b2; - unsigned char *ptr; - - ptr = (unsigned char *)array; - while (length--) { - b1 = *ptr++; - b2 = *ptr++; - *array++ = (b1 << 8) | (b2); - } -} - -static void -ConvertUint(unsigned *array, unsigned int length) { - unsigned int b1, b2, b3, b4; - unsigned char *ptr; - - ptr = (unsigned char *)array; - while (length--) { - b1 = *ptr++; - b2 = *ptr++; - b3 = *ptr++; - b4 = *ptr++; - *array++ = (b1 << 24) | (b2 << 16) | (b3 << 8) | (b4); - } -} - -static ImageRec *ImageOpen(char *fileName) -{ - union { - int testWord; - char testByte[4]; - } endianTest; - ImageRec *image; - int swapFlag; - int x; - - endianTest.testWord = 1; - if (endianTest.testByte[0] == 1) { - swapFlag = 1; - } else { - swapFlag = 0; - } - - image = (ImageRec *)malloc(sizeof(ImageRec)); - if (image == NULL) { - fprintf(stderr, "Out of memory!\n"); - exit(1); - } - if ((image->file = fopen(fileName, "rb")) == NULL) { - return NULL; - } - - fread(image, 1, 12, image->file); - - if (swapFlag) { - ConvertShort(&image->imagic, 6); - } - - image->tmp = (unsigned char *)malloc(image->xsize*256); - if (image->tmp == NULL) { - fprintf(stderr, "\nOut of memory!\n"); - exit(1); - } - - if ((image->type & 0xFF00) == 0x0100) { - x = image->ysize * image->zsize * (int) sizeof(unsigned); - image->rowStart = (unsigned *)malloc(x); - image->rowSize = (int *)malloc(x); - if (image->rowStart == NULL || image->rowSize == NULL) { - fprintf(stderr, "\nOut of memory!\n"); - exit(1); - } - image->rleEnd = 512 + (2 * x); - fseek(image->file, 512, SEEK_SET); - fread(image->rowStart, 1, x, image->file); - fread(image->rowSize, 1, x, image->file); - if (swapFlag) { - ConvertUint(image->rowStart, x/(int) sizeof(unsigned)); - ConvertUint((unsigned *)image->rowSize, x/(int) sizeof(int)); - } - } - return image; -} - -static void -ImageClose(ImageRec *image) { - fclose(image->file); - free(image->tmp); - free(image); -} - -static void -ImageGetRow(ImageRec *image, unsigned char *buf, int y, int z) { - unsigned char *iPtr, *oPtr, pixel; - int count; - - if ((image->type & 0xFF00) == 0x0100) { - fseek(image->file, (long) image->rowStart[y+z*image->ysize], SEEK_SET); - fread(image->tmp, 1, (unsigned int)image->rowSize[y+z*image->ysize], - image->file); - - iPtr = image->tmp; - oPtr = buf; - for (;;) { - pixel = *iPtr++; - count = (int)(pixel & 0x7F); - if (!count) { - return; - } - if (pixel & 0x80) { - while (count--) { - *oPtr++ = *iPtr++; - } - } else { - pixel = *iPtr++; - while (count--) { - *oPtr++ = pixel; - } - } - } - } else { - fseek(image->file, 512+(y*image->xsize)+(z*image->xsize*image->ysize), - SEEK_SET); - fread(buf, 1, image->xsize, image->file); - } -} - -GLubyte * -read_alpha_texture(char *name, int *width, int *height) -{ - unsigned char *base, *lptr; - ImageRec *image; - int y; - - image = ImageOpen(name); - if(!image) { - return NULL; - } - - (*width)=image->xsize; - (*height)=image->ysize; - if (image->zsize != 1) { - ImageClose(image); - return NULL; - } - - base = (unsigned char *)malloc(image->xsize*image->ysize*sizeof(unsigned char)); - lptr = base; - for(y=0; yysize; y++) { - ImageGetRow(image,lptr,y,0); - lptr += image->xsize; - } - ImageClose(image); - - return (unsigned char *) base; -} - -GLubyte * -read_rgb_texture(char *name, int *width, int *height) -{ - unsigned char *base, *ptr; - unsigned char *rbuf, *gbuf, *bbuf, *abuf; - ImageRec *image; - int y; - - image = ImageOpen(name); - - if(!image) - return NULL; - (*width)=image->xsize; - (*height)=image->ysize; - if (image->zsize != 3 && image->zsize != 4) { - ImageClose(image); - return NULL; - } - - base = (unsigned char*)malloc(image->xsize*image->ysize*sizeof(unsigned int)*3); - rbuf = (unsigned char *)malloc(image->xsize*sizeof(unsigned char)); - gbuf = (unsigned char *)malloc(image->xsize*sizeof(unsigned char)); - bbuf = (unsigned char *)malloc(image->xsize*sizeof(unsigned char)); - abuf = (unsigned char *)malloc(image->xsize*sizeof(unsigned char)); - if(!base || !rbuf || !gbuf || !bbuf || !abuf) { - if (base) free(base); - if (rbuf) free(rbuf); - if (gbuf) free(gbuf); - if (bbuf) free(bbuf); - if (abuf) free(abuf); - return NULL; - } - ptr = base; - for(y=0; yysize; y++) { - if(image->zsize == 4) { - ImageGetRow(image,rbuf,y,0); - ImageGetRow(image,gbuf,y,1); - ImageGetRow(image,bbuf,y,2); - ImageGetRow(image,abuf,y,3); /* Discard. */ - rgbtorgb(rbuf,gbuf,bbuf,ptr,image->xsize); - ptr += (image->xsize * 3); - } else { - ImageGetRow(image,rbuf,y,0); - ImageGetRow(image,gbuf,y,1); - ImageGetRow(image,bbuf,y,2); - rgbtorgb(rbuf,gbuf,bbuf,ptr,image->xsize); - ptr += (image->xsize * 3); - } - } - ImageClose(image); - free(rbuf); - free(gbuf); - free(bbuf); - free(abuf); - - return (GLubyte *) base; -} - -int main(int argc, char **argv) -{ - int width, height; - GLubyte *data; - char buff[32]; - int n; - FILE *fo; - - if (argc != 3) - { - fprintf(stderr, "usage: %s \n", argv[0]); - return 1; - } - - data = read_rgb_texture(argv[1], &width, &height); - - n = sprintf(buff, "P6\n%d %d\n255\n", width, height); - - /* [dBorca] avoid LF to CRLF conversion */ - if ((fo = fopen(argv[2], "wb")) == NULL) { - fprintf(stderr, "Cannot open output file!\n"); - exit(1); - } - - fwrite(buff, n, 1, fo); - fwrite(data, width * 3, height, fo); - - fclose(fo); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/select.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/select.c deleted file mode 100644 index 2c8f333bfa..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/select.c +++ /dev/null @@ -1,456 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include -#include -#include - - -#define MAXOBJS 10000 -#define MAXSELECT 100 -#define MAXFEED 300 -#define SOLID 1 -#define LINE 2 -#define POINT 3 - - -GLint windW, windH; - -GLuint selectBuf[MAXSELECT]; -GLfloat feedBuf[MAXFEED]; -GLint vp[4]; -float zRotation = 90.0; -float zoom = 1.0; -GLint objectCount; -GLint numObjects; -struct object { - float v1[2]; - float v2[2]; - float v3[2]; - float color[3]; -} objects[MAXOBJS]; -GLenum linePoly = GL_FALSE; - - -static void InitObjects(GLint num) -{ - GLint i; - float x, y; - - if (num > MAXOBJS) { - num = MAXOBJS; - } - if (num < 1) { - num = 1; - } - objectCount = num; - - srand((unsigned int)time(NULL)); - for (i = 0; i < num; i++) { - x = (rand() % 300) - 150; - y = (rand() % 300) - 150; - - objects[i].v1[0] = x + (rand() % 50) - 25; - objects[i].v2[0] = x + (rand() % 50) - 25; - objects[i].v3[0] = x + (rand() % 50) - 25; - objects[i].v1[1] = y + (rand() % 50) - 25; - objects[i].v2[1] = y + (rand() % 50) - 25; - objects[i].v3[1] = y + (rand() % 50) - 25; - objects[i].color[0] = ((rand() % 100) + 50) / 150.0; - objects[i].color[1] = ((rand() % 100) + 50) / 150.0; - objects[i].color[2] = ((rand() % 100) + 50) / 150.0; - } -} - -static void Init(void) -{ - - numObjects = 10; - InitObjects(numObjects); - glGetIntegerv(GL_VIEWPORT, vp); -} - -static void Reshape(int width, int height) -{ - - windW = (GLint)width; - windH = (GLint)height; -} - -static void Render(GLenum mode) -{ - GLint i; - - for (i = 0; i < objectCount; i++) { - if (mode == GL_SELECT) { - glLoadName(i); - } - glColor3fv(objects[i].color); - glBegin(GL_POLYGON); - glVertex2fv(objects[i].v1); - glVertex2fv(objects[i].v2); - glVertex2fv(objects[i].v3); - glEnd(); - } -} - -static GLint DoSelect(GLint x, GLint y) -{ - GLint hits; - - glSelectBuffer(MAXSELECT, selectBuf); - (void)glRenderMode(GL_SELECT); - glInitNames(); - glPushName(~0); - - glPushMatrix(); - - glViewport(0, 0, windW, windH); - glGetIntegerv(GL_VIEWPORT, vp); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPickMatrix(x, windH-y, 4, 4, vp); - gluOrtho2D(-175, 175, -175, 175); - glMatrixMode(GL_MODELVIEW); - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - glScalef(zoom, zoom, zoom); - glRotatef(zRotation, 0, 0, 1); - - Render(GL_SELECT); - - glPopMatrix(); - - hits = glRenderMode(GL_RENDER); - if (hits <= 0) { - return -1; - } - - return selectBuf[(hits-1)*4+3]; -} - -static void RecolorTri(GLint h) -{ - - objects[h].color[0] = ((rand() % 100) + 50) / 150.0; - objects[h].color[1] = ((rand() % 100) + 50) / 150.0; - objects[h].color[2] = ((rand() % 100) + 50) / 150.0; -} - -static void DeleteTri(GLint h) -{ - - objects[h] = objects[objectCount-1]; - objectCount--; -} - -static void GrowTri(GLint h) -{ - float v[2]; - float *oldV = NULL; - GLint i; - - v[0] = objects[h].v1[0] + objects[h].v2[0] + objects[h].v3[0]; - v[1] = objects[h].v1[1] + objects[h].v2[1] + objects[h].v3[1]; - v[0] /= 3; - v[1] /= 3; - - for (i = 0; i < 3; i++) { - switch (i) { - case 0: - oldV = objects[h].v1; - break; - case 1: - oldV = objects[h].v2; - break; - case 2: - oldV = objects[h].v3; - break; - } - oldV[0] = 1.5 * (oldV[0] - v[0]) + v[0]; - oldV[1] = 1.5 * (oldV[1] - v[1]) + v[1]; - } -} - -static void Mouse(int button, int state, int mouseX, int mouseY) -{ - GLint hit; - - if (state != GLUT_DOWN) - return; - - hit = DoSelect((GLint)mouseX, (GLint)mouseY); - if (hit != -1) { - if (button == GLUT_LEFT_BUTTON) { - RecolorTri(hit); - } - if (button == GLUT_MIDDLE_BUTTON) { - GrowTri(hit); - } - if (button == GLUT_RIGHT_BUTTON) { - DeleteTri(hit); - } - } - - glutPostRedisplay(); -} - -static void Draw(void) -{ - - glPushMatrix(); - - glViewport(0, 0, windW, windH); - glGetIntegerv(GL_VIEWPORT, vp); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(-175, 175, -175, 175); - glMatrixMode(GL_MODELVIEW); - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - glScalef(zoom, zoom, zoom); - glRotatef(zRotation, 0, 0, 1); - - Render(GL_RENDER); - - glPopMatrix(); - - glFlush(); -} - -static void DrawZoom(GLint x, GLint y) -{ - - glPushMatrix(); - - glViewport(0, 0, windW, windH); - glGetIntegerv(GL_VIEWPORT, vp); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPickMatrix(x, windH-y, 4, 4, vp); - gluOrtho2D(-175, 175, -175, 175); - glMatrixMode(GL_MODELVIEW); - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - glScalef(zoom, zoom, zoom); - glRotatef(zRotation, 0, 0, 1); - - Render(GL_RENDER); - - glPopMatrix(); -} - -static void DumpFeedbackVert(GLint *i, GLint n) -{ - GLint index; - - index = *i; - if (index+7 > n) { - *i = n; - printf(" ???\n"); - return; - } - printf(" (%g %g %g), color = (%4.2f %4.2f %4.2f)\n", - feedBuf[index], - feedBuf[index+1], - feedBuf[index+2], - feedBuf[index+3], - feedBuf[index+4], - feedBuf[index+5]); - index += 7; - *i = index; -} - -static void DrawFeedback(GLint n) -{ - GLint i; - GLint verts; - - printf("Feedback results (%d floats):\n", n); - for (i = 0; i < n; i++) { - switch ((GLint)feedBuf[i]) { - case GL_POLYGON_TOKEN: - printf("Polygon"); - i++; - if (i < n) { - verts = (GLint)feedBuf[i]; - i++; - printf(": %d vertices", verts); - } else { - verts = 0; - } - printf("\n"); - while (verts) { - DumpFeedbackVert(&i, n); - verts--; - } - i--; - break; - case GL_LINE_TOKEN: - printf("Line:\n"); - i++; - DumpFeedbackVert(&i, n); - DumpFeedbackVert(&i, n); - i--; - break; - case GL_LINE_RESET_TOKEN: - printf("Line Reset:\n"); - i++; - DumpFeedbackVert(&i, n); - DumpFeedbackVert(&i, n); - i--; - break; - default: - printf("%9.2f\n", feedBuf[i]); - break; - } - } - if (i == MAXFEED) { - printf("...\n"); - } - printf("\n"); -} - -static void DoFeedback(void) -{ - GLint x; - - glFeedbackBuffer(MAXFEED, GL_3D_COLOR, feedBuf); - (void)glRenderMode(GL_FEEDBACK); - - glPushMatrix(); - - glViewport(0, 0, windW, windH); - glGetIntegerv(GL_VIEWPORT, vp); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(-175, 175, -175, 175); - glMatrixMode(GL_MODELVIEW); - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - glScalef(zoom, zoom, zoom); - glRotatef(zRotation, 0, 0, 1); - - Render(GL_FEEDBACK); - - glPopMatrix(); - - x = glRenderMode(GL_RENDER); - if (x == -1) { - x = MAXFEED; - } - - DrawFeedback((GLint)x); -} - -static void Key2(int key, int x, int y) -{ - switch (key) { - case GLUT_KEY_LEFT: - zRotation += 0.5; - break; - case GLUT_KEY_RIGHT: - zRotation -= 0.5; - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Key(unsigned char key, int x, int y) -{ - switch (key) { - case 27: - exit(1); - case 'Z': - zoom /= 0.75; - break; - case 'z': - zoom *= 0.75; - break; - case 'f': - DoFeedback(); - break; - case 'd': - DrawZoom(x, y); - break; - case 'l': - linePoly = !linePoly; - if (linePoly) { - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - } else { - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - } - break; - default: - return; - } - - glutPostRedisplay(); -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - windW = 300; - windH = 300; - glutInitWindowPosition(0, 0); glutInitWindowSize( windW, windH); - - type = GLUT_RGB | GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Select Test") == GL_FALSE) { - exit(1); - } - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(Key2); - glutMouseFunc(Mouse); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/shape.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/shape.c deleted file mode 100644 index d342ee5b07..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/shape.c +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include - - -#define OPENGL_WIDTH 24 -#define OPENGL_HEIGHT 13 - - -GLenum rgb, doubleBuffer, windType; -GLint objectIndex = 0; -GLuint bases[20]; -float angleX = 0.0, angleY = 0.0, angleZ = 0.0; -float scaleX = 1.0, scaleY = 1.0, scaleZ = 1.0; -float shiftX = 0.0, shiftY = 0.0, shiftZ = 0.0; - - -#include "tkmap.c" - -static void Init(void) -{ - - bases[0] = glGenLists(1); - glNewList(bases[0], GL_COMPILE); - glutWireSphere(1.0, 20, 10); - glEndList(); - - bases[1] = glGenLists(1); - glNewList(bases[1], GL_COMPILE); - glutSolidSphere(1.0, 20, 10); - glEndList(); - - bases[2] = glGenLists(1); - glNewList(bases[2], GL_COMPILE); - glutWireCube(1.0); - glEndList(); - - bases[3] = glGenLists(1); - glNewList(bases[3], GL_COMPILE); - glutSolidCube(1.0); - glEndList(); - - bases[4] = glGenLists(1); - glNewList(bases[4], GL_COMPILE); - glutWireTorus(1.0, 1.0, 10, 20); - glEndList(); - - bases[5] = glGenLists(1); - glNewList(bases[5], GL_COMPILE); - glutSolidTorus(1.0, 1.0, 10, 20); - glEndList(); - - bases[6] = glGenLists(1); - glNewList(bases[6], GL_COMPILE); - glutWireIcosahedron(); - glEndList(); - - bases[7] = glGenLists(1); - glNewList(bases[7], GL_COMPILE); - glutSolidIcosahedron(); - glEndList(); - - bases[8] = glGenLists(1); - glNewList(bases[8], GL_COMPILE); - glutWireOctahedron(); - glEndList(); - - bases[9] = glGenLists(1); - glNewList(bases[9], GL_COMPILE); - glutSolidOctahedron(); - glEndList(); - - bases[10] = glGenLists(1); - glNewList(bases[10], GL_COMPILE); - glutWireTetrahedron(); - glEndList(); - - bases[11] = glGenLists(1); - glNewList(bases[11], GL_COMPILE); - glutSolidTetrahedron(); - glEndList(); - - bases[12] = glGenLists(1); - glNewList(bases[12], GL_COMPILE); - glutWireDodecahedron(); - glEndList(); - - bases[13] = glGenLists(1); - glNewList(bases[13], GL_COMPILE); - glutSolidDodecahedron(); - glEndList(); - - bases[14] = glGenLists(1); - glNewList(bases[14], GL_COMPILE); - glutWireCone(5.0, 5.0, 20, 10); - glEndList(); - - bases[15] = glGenLists(1); - glNewList(bases[15], GL_COMPILE); - glutSolidCone(5.0, 5.0, 20, 10); - glEndList(); - - bases[16] = glGenLists(1); - glNewList(bases[16], GL_COMPILE); - glutWireTeapot(1.0); - glEndList(); - - bases[17] = glGenLists(1); - glNewList(bases[17], GL_COMPILE); - glutSolidTeapot(1.0); - glEndList(); - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClearIndex(0.0); -} - -static void Reshape(int width, int height) -{ - - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-400.0, 400.0, -200.0, 200.0, -400.0, 400.0); - glMatrixMode(GL_MODELVIEW); -} - -static void Key2(int key, int x, int y) -{ - - switch (key) { - case GLUT_KEY_LEFT: - shiftX -= 20.0; - break; - case GLUT_KEY_RIGHT: - shiftX += 20.0; - break; - case GLUT_KEY_UP: - shiftY += 20.0; - break; - case GLUT_KEY_DOWN: - shiftY -= 20.0; - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - - case 32: - objectIndex++; - if (objectIndex > 17) { - objectIndex = 0; - } - break; - - case 'n': - shiftZ += 20.0; - break; - case 'm': - shiftZ -= 20.0; - break; - - case 'q': - scaleX -= 0.1; - if (scaleX < 0.1) { - scaleX = 0.1; - } - break; - case 'w': - scaleX += 0.1; - break; - case 'a': - scaleY -= 0.1; - if (scaleY < 0.1) { - scaleY = 0.1; - } - break; - case 's': - scaleY += 0.1; - break; - case 'z': - scaleZ -= 0.1; - if (scaleZ < 0.1) { - scaleZ = 0.1; - } - break; - case 'x': - scaleZ += 0.1; - break; - - case 'e': - angleX -= 5.0; - if (angleX < 0.0) { - angleX = 360.0 + angleX; - } - break; - case 'r': - angleX += 5.0; - if (angleX > 360.0) { - angleX = angleX - 360.0; - } - break; - case 'd': - angleY -= 5.0; - if (angleY < 0.0) { - angleY = 360.0 + angleY; - } - break; - case 'f': - angleY += 5.0; - if (angleY > 360.0) { - angleY = angleY - 360.0; - } - break; - case 'c': - angleZ -= 5.0; - if (angleZ < 0.0) { - angleZ = 360.0 + angleZ; - } - break; - case 'v': - angleZ += 5.0; - if (angleZ > 360.0) { - angleZ = angleZ - 360.0; - } - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Draw(void) -{ - - glClear(GL_COLOR_BUFFER_BIT); - - SetColor(COLOR_WHITE); - - glPushMatrix(); - - glTranslatef(shiftX, shiftY, shiftZ); - glRotatef(angleX, 1.0, 0.0, 0.0); - glRotatef(angleY, 0.0, 1.0, 0.0); - glRotatef(angleZ, 0.0, 0.0, 1.0); - glScalef(scaleX, scaleY, scaleZ); - - glCallList(bases[objectIndex]); - glPopMatrix(); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - rgb = GL_TRUE; - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-ci") == 0) { - rgb = GL_FALSE; - } else if (strcmp(argv[i], "-rgb") == 0) { - rgb = GL_TRUE; - } else if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 400, 400); - - windType = (rgb) ? GLUT_RGB : GLUT_INDEX; - windType |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(windType); - - if (glutCreateWindow("Font Test") == GL_FALSE) { - exit(1); - } - - InitMap(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(Key2); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/sphere.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/sphere.c deleted file mode 100644 index 7d0508dee9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/sphere.c +++ /dev/null @@ -1,1014 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* BEP: renamed "nearest" as "nnearest" to avoid math.h collision on AIX */ - -#include -#include -#include -#include -#include -#include "readtex.h" - - -#ifndef PI -#define PI 3.14159265358979323846 -#endif - - -GLenum doubleBuffer; -int W = 400, H = 400; - -char *imageFileName = "../images/reflect.rgb"; - -float *minFilter, *magFilter, *sWrapMode, *tWrapMode; -float decal[] = {GL_DECAL}; -float modulate[] = {GL_MODULATE}; -float repeat[] = {GL_REPEAT}; -float clamp[] = {GL_CLAMP}; -float nnearest[] = {GL_NEAREST}; -float linear[] = {GL_LINEAR}; -float nearest_mipmap_nearest[] = {GL_NEAREST_MIPMAP_NEAREST}; -float nearest_mipmap_linear[] = {GL_NEAREST_MIPMAP_LINEAR}; -float linear_mipmap_nearest[] = {GL_LINEAR_MIPMAP_NEAREST}; -float linear_mipmap_linear[] = {GL_LINEAR_MIPMAP_LINEAR}; -GLint sphereMap[] = {GL_SPHERE_MAP}; - -float xRotation = 0.0, yRotation = 0.0; -float zTranslate = -3.0; -GLenum autoRotate = GL_TRUE; -GLboolean isLit = GL_TRUE; -GLboolean isFogged = GL_FALSE; -GLboolean doTexture = GL_TRUE; -float *textureEnvironment = modulate; - -int cube, cage, cylinder, torus, genericObject; - -float c[6][4][4][3] = { - { - { - { - 1.0, 1.0, -1.0 - }, - { - 0.0, 1.0, -1.0 - }, - { - 0.0, 0.0, -1.0 - }, - { - 1.0, 0.0, -1.0 - }, - }, - { - { - 0.0, 1.0, -1.0 - }, - { - -1.0, 1.0, -1.0 - }, - { - -1.0, 0.0, -1.0 - }, - { - 0.0, 0.0, -1.0 - }, - }, - { - { - 0.0, 0.0, -1.0 - }, - { - -1.0, 0.0, -1.0 - }, - { - -1.0, -1.0, -1.0 - }, - { - 0.0, -1.0, -1.0 - }, - }, - { - { - 1.0, 0.0, -1.0 - }, - { - 0.0, 0.0, -1.0 - }, - { - 0.0, -1.0, -1.0 - }, - { - 1.0, -1.0, -1.0 - }, - }, - }, - { - { - { - 1.0, 1.0, 1.0 - }, - { - 1.0, 1.0, 0.0 - }, - { - 1.0, 0.0, 0.0 - }, - { - 1.0, 0.0, 1.0 - }, - }, - { - { - 1.0, 1.0, 0.0 - }, - { - 1.0, 1.0, -1.0 - }, - { - 1.0, 0.0, -1.0 - }, - { - 1.0, 0.0, 0.0 - }, - }, - { - { - 1.0, 0.0, -1.0 - }, - { - 1.0, -1.0, -1.0 - }, - { - 1.0, -1.0, 0.0 - }, - { - 1.0, 0.0, 0.0 - }, - }, - { - { - 1.0, 0.0, 0.0 - }, - { - 1.0, -1.0, 0.0 - }, - { - 1.0, -1.0, 1.0 - }, - { - 1.0, 0.0, 1.0 - }, - }, - }, - { - { - { - -1.0, 1.0, 1.0 - }, - { - 0.0, 1.0, 1.0 - }, - { - 0.0, 0.0, 1.0 - }, - { - -1.0, 0.0, 1.0 - }, - }, - { - { - 0.0, 1.0, 1.0 - }, - { - 1.0, 1.0, 1.0 - }, - { - 1.0, 0.0, 1.0 - }, - { - 0.0, 0.0, 1.0 - }, - }, - { - { - 1.0, 0.0, 1.0 - }, - { - 1.0, -1.0, 1.0 - }, - { - 0.0, -1.0, 1.0 - }, - { - 0.0, 0.0, 1.0 - }, - }, - { - { - 0.0, -1.0, 1.0 - }, - { - -1.0, -1.0, 1.0 - }, - { - -1.0, 0.0, 1.0 - }, - { - 0.0, 0.0, 1.0 - }, - }, - }, - { - { - { - -1.0, 1.0, -1.0 - }, - { - -1.0, 1.0, 0.0 - }, - { - -1.0, 0.0, 0.0 - }, - { - -1.0, 0.0, -1.0 - }, - }, - { - { - -1.0, 1.0, 0.0 - }, - { - -1.0, 1.0, 1.0 - }, - { - -1.0, 0.0, 1.0 - }, - { - -1.0, 0.0, 0.0 - }, - }, - { - { - -1.0, 0.0, 1.0 - }, - { - -1.0, -1.0, 1.0 - }, - { - -1.0, -1.0, 0.0 - }, - { - -1.0, 0.0, 0.0 - }, - }, - { - { - -1.0, -1.0, 0.0 - }, - { - -1.0, -1.0, -1.0 - }, - { - -1.0, 0.0, -1.0 - }, - { - -1.0, 0.0, 0.0 - }, - }, - }, - { - { - { - -1.0, 1.0, 1.0 - }, - { - -1.0, 1.0, 0.0 - }, - { - 0.0, 1.0, 0.0 - }, - { - 0.0, 1.0, 1.0 - }, - }, - { - { - -1.0, 1.0, 0.0 - }, - { - -1.0, 1.0, -1.0 - }, - { - 0.0, 1.0, -1.0 - }, - { - 0.0, 1.0, 0.0 - }, - }, - { - { - 0.0, 1.0, -1.0 - }, - { - 1.0, 1.0, -1.0 - }, - { - 1.0, 1.0, 0.0 - }, - { - 0.0, 1.0, 0.0 - }, - }, - { - { - 1.0, 1.0, 0.0 - }, - { - 1.0, 1.0, 1.0 - }, - { - 0.0, 1.0, 1.0 - }, - { - 0.0, 1.0, 0.0 - }, - }, - }, - { - { - { - -1.0, -1.0, -1.0 - }, - { - -1.0, -1.0, 0.0 - }, - { - 0.0, -1.0, 0.0 - }, - { - 0.0, -1.0, -1.0 - }, - }, - { - { - -1.0, -1.0, 0.0 - }, - { - -1.0, -1.0, 1.0 - }, - { - 0.0, -1.0, 1.0 - }, - { - 0.0, -1.0, 0.0 - }, - }, - { - { - 0.0, -1.0, 1.0 - }, - { - 1.0, -1.0, 1.0 - }, - { - 1.0, -1.0, 0.0 - }, - { - 0.0, -1.0, 0.0 - }, - }, - { - { - 1.0, -1.0, 0.0 - }, - { - 1.0, -1.0, -1.0 - }, - { - 0.0, -1.0, -1.0 - }, - { - 0.0, -1.0, 0.0 - }, - }, - } -}; - -float n[6][3] = { - { - 0.0, 0.0, -1.0 - }, - { - 1.0, 0.0, 0.0 - }, - { - 0.0, 0.0, 1.0 - }, - { - -1.0, 0.0, 0.0 - }, - { - 0.0, 1.0, 0.0 - }, - { - 0.0, -1.0, 0.0 - } -}; - -GLfloat identity[16] = { - 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1, -}; - - -void BuildCylinder(int numEdges) -{ - int i, top = 1.0, bottom = -1.0; - float x[100], y[100], angle; - - for (i = 0; i <= numEdges; i++) { - angle = i * 2.0 * PI / numEdges; - x[i] = cos(angle); /* was cosf() */ - y[i] = sin(angle); /* was sinf() */ - } - - glNewList(cylinder, GL_COMPILE); - glBegin(GL_TRIANGLE_STRIP); - for (i = 0; i <= numEdges; i++) { - glNormal3f(x[i], y[i], 0.0); - glVertex3f(x[i], y[i], bottom); - glVertex3f(x[i], y[i], top); - } - glEnd(); - glBegin(GL_TRIANGLE_FAN); - glNormal3f(0.0, 0.0, 1.0); - glVertex3f(0.0, 0.0, top); - for (i = 0; i <= numEdges; i++) { - glVertex3f(x[i], -y[i], top); - } - glEnd(); - glBegin(GL_TRIANGLE_FAN); - glNormal3f(0.0, 0.0, -1.0); - glVertex3f(0.0, 0.0, bottom); - for (i = 0; i <= numEdges; i++) { - glVertex3f(x[i], y[i], bottom); - } - glEnd(); - glEndList(); -} - -void BuildTorus(float rc, int numc, float rt, int numt) -{ - int i, j, k; - double s, t; - double x, y, z; - double pi, twopi; - - pi = 3.14159265358979323846; - twopi = 2.0 * pi; - - glNewList(torus, GL_COMPILE); - for (i = 0; i < numc; i++) { - glBegin(GL_QUAD_STRIP); - for (j = 0; j <= numt; j++) { - for (k = 0; k <= 1; k++) { - s = (i + k) % numc + 0.5; - t = j % numt; - - x = cos(t*twopi/numt) * cos(s*twopi/numc); - y = sin(t*twopi/numt) * cos(s*twopi/numc); - z = sin(s*twopi/numc); - glNormal3f(x, y, z); - - x = (rt + rc * cos(s*twopi/numc)) * cos(t*twopi/numt); - y = (rt + rc * cos(s*twopi/numc)) * sin(t*twopi/numt); - z = rc * sin(s*twopi/numc); - glVertex3f(x, y, z); - } - } - glEnd(); - } - glEndList(); -} - -void BuildCage(void) -{ - int i; - float inc; - float right, left, top, bottom, front, back; - - front = 0.0; - back = -8.0; - - left = -4.0; - bottom = -4.0; - right = 4.0; - top = 4.0; - - inc = 2.0 * 4.0 * 0.1; - - glNewList(cage, GL_COMPILE); - for (i = 0; i < 10; i++) { - - /* - ** Back - */ - glBegin(GL_LINES); - glVertex3f(left+i*inc, top, back); - glVertex3f(left+i*inc, bottom, back); - glEnd(); - glBegin(GL_LINES); - glVertex3f(right, bottom+i*inc, back); - glVertex3f(left, bottom+i*inc, back); - glEnd(); - - /* - ** Front - */ - glBegin(GL_LINES); - glVertex3f(left+i*inc, top, front); - glVertex3f(left+i*inc, bottom, front); - glEnd(); - glBegin(GL_LINES); - glVertex3f(right, bottom+i*inc, front); - glVertex3f(left, bottom+i*inc, front); - glEnd(); - - /* - ** Left - */ - glBegin(GL_LINES); - glVertex3f(left, bottom+i*inc, front); - glVertex3f(left, bottom+i*inc, back); - glEnd(); - glBegin(GL_LINES); - glVertex3f(left, top, back+i*inc); - glVertex3f(left, bottom, back+i*inc); - glEnd(); - - /* - ** Right - */ - glBegin(GL_LINES); - glVertex3f(right, top-i*inc, front); - glVertex3f(right, top-i*inc, back); - glEnd(); - glBegin(GL_LINES); - glVertex3f(right, top, back+i*inc); - glVertex3f(right, bottom, back+i*inc); - glEnd(); - - /* - ** Top - */ - glBegin(GL_LINES); - glVertex3f(left+i*inc, top, front); - glVertex3f(left+i*inc, top, back); - glEnd(); - glBegin(GL_LINES); - glVertex3f(right, top, back+i*inc); - glVertex3f(left, top, back+i*inc); - glEnd(); - - /* - ** Bottom - */ - glBegin(GL_LINES); - glVertex3f(right-i*inc, bottom, front); - glVertex3f(right-i*inc, bottom, back); - glEnd(); - glBegin(GL_LINES); - glVertex3f(right, bottom, back+i*inc); - glVertex3f(left, bottom, back+i*inc); - glEnd(); - } - glEndList(); -} - -void BuildCube(void) -{ - int i, j; - - glNewList(cube, GL_COMPILE); - for (i = 0; i < 6; i++) { - for (j = 0; j < 4; j++) { - glNormal3fv(n[i]); - glBegin(GL_POLYGON); - glVertex3fv(c[i][j][0]); - glVertex3fv(c[i][j][1]); - glVertex3fv(c[i][j][2]); - glVertex3fv(c[i][j][3]); - glEnd(); - } - } - glEndList(); -} - -void BuildLists(void) -{ - - cube = glGenLists(1); - BuildCube(); - - cage = glGenLists(2); - BuildCage(); - - cylinder = glGenLists(3); - BuildCylinder(60); - - torus = glGenLists(4); - BuildTorus(0.65, 20, .85, 65); - - genericObject = torus; -} - -void SetDefaultSettings(void) -{ - - magFilter = nnearest; - minFilter = nnearest; - sWrapMode = repeat; - tWrapMode = repeat; - textureEnvironment = modulate; - autoRotate = GL_TRUE; -} - -unsigned char *AlphaPadImage(int bufSize, unsigned char *inData, int alpha) -{ - unsigned char *outData, *out_ptr, *in_ptr; - int i; - - outData = (unsigned char *) malloc(bufSize * 4); - out_ptr = outData; - in_ptr = inData; - - for (i = 0; i < bufSize; i++) { - *out_ptr++ = *in_ptr++; - *out_ptr++ = *in_ptr++; - *out_ptr++ = *in_ptr++; - *out_ptr++ = alpha; - } - - free (inData); - return outData; -} - -void Init(void) -{ - float ambient[] = {0.0, 0.0, 0.0, 1.0}; - float diffuse[] = {1.0, 1.0, 1.0, 1.0}; - float specular[] = {1.0, 1.0, 1.0, 1.0}; - float position[] = {0.0, 0.0, 4.0, 0.0}; - float fog_color[] = {0.0, 0.0, 0.0, 1.0}; - float mat_ambient[] = {0.0, 0.0, 0.0, 1.0}; - float mat_shininess[] = {90.0}; - float mat_specular[] = {1.0, 1.0, 1.0, 1.0}; - float mat_diffuse[] = {0.8, 0.8, 0.8, 1.0}; - float lmodel_ambient[] = {0.2, 0.2, 0.2, 1.0}; - float lmodel_twoside[] = {GL_TRUE}; - int w, h; - GLenum format; - GLubyte *image; - - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - - SetDefaultSettings(); - - image = LoadRGBImage(imageFileName, &w, &h, &format); - if (!image) { - printf("Error: couldn't load %s\n", imageFileName); - exit(1); - } - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - gluBuild2DMipmaps(GL_TEXTURE_2D, format, w, h, - GL_RGB, GL_UNSIGNED_BYTE, image); - - free(image); - - glFogf(GL_FOG_DENSITY, 0.125); - glFogi(GL_FOG_MODE, GL_LINEAR); - glFogf(GL_FOG_START, 4.0); - glFogf(GL_FOG_END, 8.5); - glFogfv(GL_FOG_COLOR, fog_color); - - glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse); - glLightfv(GL_LIGHT0, GL_SPECULAR, specular); - glLightfv(GL_LIGHT0, GL_POSITION, position); - glEnable(GL_LIGHT0); - - glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess); - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, mat_ambient); - - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); - glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside); - glShadeModel(GL_SMOOTH); - - - glClearColor(0.0, 0.0, 0.0, 0.0); - glEnable(GL_DEPTH_TEST); - - glFrontFace(GL_CW); - glEnable(GL_CULL_FACE); - glCullFace(GL_BACK); - - glTexGeniv(GL_S, GL_TEXTURE_GEN_MODE, sphereMap); - glTexGeniv(GL_T, GL_TEXTURE_GEN_MODE, sphereMap); - glEnable(GL_TEXTURE_GEN_S); - glEnable(GL_TEXTURE_GEN_T); - - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, magFilter); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minFilter); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, sWrapMode); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, tWrapMode); - - glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, textureEnvironment); - - BuildLists(); -} - -void ReInit(void) -{ - if (genericObject == torus) { - glEnable(GL_DEPTH_TEST); - } else { - glDisable(GL_DEPTH_TEST); - } - glEnable(GL_DEPTH_TEST); - -#if 0 - if (isFogged) { - textureEnvironment = modulate; - } -#endif - - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, magFilter); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minFilter); - glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, textureEnvironment); -} - -void Draw(void) -{ - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); - - /* draw cage */ - if (isFogged) - glEnable(GL_FOG); - else - glDisable(GL_FOG); - glColor3f(1, 1, 1); - glDisable(GL_LIGHTING); - glDisable(GL_TEXTURE_2D); - glCallList(cage); - - /* draw object */ - if (isLit) - glEnable(GL_LIGHTING); - else - glColor3f(1.0, 0.5, 0.2); - if (doTexture) - glEnable(GL_TEXTURE_2D); - - glPushMatrix(); - glTranslatef(0.0, 0.0, zTranslate); - glRotatef(xRotation, 1, 0, 0); - glRotatef(yRotation, 0, 1, 0); - glCallList(genericObject); - glPopMatrix(); - - glFlush(); - glutSwapBuffers(); -} - -void Reshape(int width, int height) -{ - W = width; - H = height; - ReInit(); - glViewport( 0, 0, width, height ); /*new*/ - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-0.2, 0.2, -0.2, 0.2, 0.15, 9.0); - glMatrixMode(GL_MODELVIEW); -} - -void Idle(void) -{ - static double t0 = -1.; - double t, dt; - t = glutGet(GLUT_ELAPSED_TIME) / 1000.; - if (t0 < 0.) - t0 = t; - dt = t - t0; - t0 = t; - - xRotation += .75*60.*dt; - yRotation += .375*60.*dt; - glutPostRedisplay(); -} - -void Key2(int key, int x, int y) -{ - - switch (key) { - case GLUT_KEY_LEFT: - yRotation -= 0.5; - autoRotate = GL_FALSE; - ReInit(); - break; - case GLUT_KEY_RIGHT: - yRotation += 0.5; - autoRotate = GL_FALSE; - ReInit(); - break; - case GLUT_KEY_UP: - xRotation -= 0.5; - autoRotate = GL_FALSE; - ReInit(); - break; - case GLUT_KEY_DOWN: - xRotation += 0.5; - autoRotate = GL_FALSE; - ReInit(); - break; - default: - return; - } - glutPostRedisplay(); -} - -void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - /* free(image->data);*/ - exit(1); - - case 'a': - autoRotate = !autoRotate; - if (autoRotate) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - - ReInit(); - break; - case 'o': - if (genericObject == cube) { - genericObject = cylinder; - } - else if (genericObject == cylinder) { - genericObject = torus; - } - else { - genericObject = cube; - } - ReInit(); - break; - case 'd': - textureEnvironment = decal; - ReInit(); - break; - case 'm': - textureEnvironment = modulate; - ReInit(); - break; - case 'l': - isLit = !isLit; - ReInit(); - break; - case 'f': - isFogged = !isFogged; - ReInit(); - break; - case 't': - doTexture = !doTexture; - ReInit(); - break; - case '0': - magFilter = nnearest; - ReInit(); - break; - case '1': - magFilter = linear; - ReInit(); - break; - case '2': - minFilter = nnearest; - ReInit(); - break; - case '3': - minFilter = linear; - ReInit(); - break; - case '4': - minFilter = nearest_mipmap_nearest; - ReInit(); - break; - case '5': - minFilter = nearest_mipmap_linear; - ReInit(); - break; - case '6': - minFilter = linear_mipmap_nearest; - ReInit(); - break; - case '7': - minFilter = linear_mipmap_linear; - ReInit(); - break; - default: - return; - } - glutPostRedisplay(); -} - -GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_TRUE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else if (strcmp(argv[i], "-f") == 0) { - if (i+1 >= argc || argv[i+1][0] == '-') { - printf("-f (No file name).\n"); - return GL_FALSE; - } else { - imageFileName = argv[++i]; - } - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - if (imageFileName == 0) { - printf("No image file.\n"); - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( W, H); - - type = GLUT_RGB | GLUT_DEPTH; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Texture Test") == GL_FALSE) { - exit(1); - } - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(Key2); - glutDisplayFunc(Draw); - glutIdleFunc(Idle); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/star.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/star.c deleted file mode 100644 index 2cf470e2a2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/star.c +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include -#include - - -#ifndef PI -#define PI 3.141592657 -#endif - -enum { - NORMAL = 0, - WEIRD = 1 -}; - -enum { - STREAK = 0, - CIRCLE = 1 -}; - -#define MAXSTARS 400 -#define MAXPOS 10000 -#define MAXWARP 500 -#define MAXANGLES 6000 - - -typedef struct _starRec { - GLint type; - float x[2], y[2], z[2]; - float offsetX, offsetY, offsetR, rotation; -} starRec; - - -GLenum doubleBuffer; -GLint windW, windH; - -GLenum flag = NORMAL; -GLint starCount = MAXSTARS / 2; -float speed = 1.0; -GLint nitro = 0; -starRec stars[MAXSTARS]; -float sinTable[MAXANGLES]; - - -float Sin(float angle) -{ - - return (sinTable[(GLint)angle]); -} - -float Cos(float angle) -{ - - return (sinTable[((GLint)angle+(MAXANGLES/4))%MAXANGLES]); -} - -void NewStar(GLint n, GLint d) -{ - - if (rand()%4 == 0) { - stars[n].type = CIRCLE; - } else { - stars[n].type = STREAK; - } - stars[n].x[0] = (float)(rand() % MAXPOS - MAXPOS / 2); - stars[n].y[0] = (float)(rand() % MAXPOS - MAXPOS / 2); - stars[n].z[0] = (float)(rand() % MAXPOS + d); - if (rand()%4 == 0 && flag == WEIRD) { - stars[n].offsetX = (float)(rand() % 100 - 100 / 2); - stars[n].offsetY = (float)(rand() % 100 - 100 / 2); - stars[n].offsetR = (float)(rand() % 25 - 25 / 2); - } else { - stars[n].offsetX = 0.0; - stars[n].offsetY = 0.0; - stars[n].offsetR = 0.0; - } -} - -void RotatePoint(float *x, float *y, float rotation) -{ - float tmpX, tmpY; - - tmpX = *x * Cos(rotation) - *y * Sin(rotation); - tmpY = *y * Cos(rotation) + *x * Sin(rotation); - *x = tmpX; - *y = tmpY; -} - -void MoveStars(void) -{ - float offset; - GLint n; - static double t0 = -1.; - double t, dt; - t = glutGet(GLUT_ELAPSED_TIME) / 1000.; - if (t0 < 0.) - t0 = t; - dt = 85.*(t - t0); - t0 = t; - - offset = speed * 60.0; - - for (n = 0; n < starCount; n++) { - stars[n].x[1] = stars[n].x[0]; - stars[n].y[1] = stars[n].y[0]; - stars[n].z[1] = stars[n].z[0]; - stars[n].x[0] += stars[n].offsetX*dt; - stars[n].y[0] += stars[n].offsetY*dt; - stars[n].z[0] -= offset*dt; - stars[n].rotation += stars[n].offsetR*dt; - if (stars[n].rotation > MAXANGLES) { - stars[n].rotation = 0.0; - } - else if (stars[n].rotation < 0.0) { - stars[n].rotation += 360.0; - } - } -} - -GLenum StarPoint(GLint n) -{ - float x0, y0, x1, y1, width; - GLint i; - - x0 = stars[n].x[0] * windW / stars[n].z[0]; - y0 = stars[n].y[0] * windH / stars[n].z[0]; - RotatePoint(&x0, &y0, stars[n].rotation); - x0 += windW / 2.0; - y0 += windH / 2.0; - - if (x0 >= 0.0 && x0 < windW && y0 >= 0.0 && y0 < windH) { - if (stars[n].type == STREAK) { - x1 = stars[n].x[1] * windW / stars[n].z[1]; - y1 = stars[n].y[1] * windH / stars[n].z[1]; - RotatePoint(&x1, &y1, stars[n].rotation); - x1 += windW / 2.0; - y1 += windH / 2.0; - - glLineWidth(MAXPOS/100.0/stars[n].z[0]+1.0); - glColor3f(1.0, (MAXWARP-speed)/MAXWARP, (MAXWARP-speed)/MAXWARP); - if (fabs(x0-x1) < 1.0 && fabs(y0-y1) < 1.0) { - glBegin(GL_POINTS); - glVertex2f(x0, y0); - glEnd(); - } else { - glBegin(GL_LINES); - glVertex2f(x0, y0); - glVertex2f(x1, y1); - glEnd(); - } - } else { - width = MAXPOS / 10.0 / stars[n].z[0] + 1.0; - glColor3f(1.0, 0.0, 0.0); - glBegin(GL_POLYGON); - for (i = 0; i < 8; i++) { - float x = x0 + width * Cos((float)i*MAXANGLES/8.0); - float y = y0 + width * Sin((float)i*MAXANGLES/8.0); - glVertex2f(x, y); - }; - glEnd(); - } - return GL_TRUE; - } else { - return GL_FALSE; - } -} - -void ShowStars(void) -{ - GLint n; - - glClear(GL_COLOR_BUFFER_BIT); - - for (n = 0; n < starCount; n++) { - if (stars[n].z[0] > speed || (stars[n].z[0] > 0.0 && speed < MAXWARP)) { - if (StarPoint(n) == GL_FALSE) { - NewStar(n, MAXPOS); - } - } else { - NewStar(n, MAXPOS); - } - } -} - -static void Init(void) -{ - float angle; - GLint n; - - srand((unsigned int) glutGet(GLUT_ELAPSED_TIME) ); - - for (n = 0; n < MAXSTARS; n++) { - NewStar(n, 100); - } - - angle = 0.0; - for (n = 0; n < MAXANGLES ; n++) { - sinTable[n] = sin(angle); - angle += PI / (MAXANGLES / 2.0); - } - - glClearColor(0.0, 0.0, 0.0, 0.0); - - glDisable(GL_DITHER); -} - -void Reshape(int width, int height) -{ - - windW = (GLint)width; - windH = (GLint)height; - - glViewport(0, 0, windW, windH); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(-0.5, windW+0.5, -0.5, windH+0.5); - glMatrixMode(GL_MODELVIEW); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - case 32: - flag = (flag == NORMAL) ? WEIRD : NORMAL; - break; - case 't': - nitro = 1; - break; - default: - return; - } -} - -void Draw(void) -{ - - MoveStars(); - ShowStars(); - if (nitro > 0) { - speed = (float)(nitro / 10) + 1.0; - if (speed > MAXWARP) { - speed = MAXWARP; - } - if (++nitro > MAXWARP*10) { - nitro = -nitro; - } - } else if (nitro < 0) { - nitro++; - speed = (float)(-nitro / 10) + 1.0; - if (speed > MAXWARP) { - speed = MAXWARP; - } - } - - glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_TRUE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } - } - return GL_TRUE; -} - -#if !defined(GLUTCALLBACK) -#define GLUTCALLBACK -#endif - -void GLUTCALLBACK glut_post_redisplay_p(void) -{ - glutPostRedisplay(); -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - windW = 300; - windH = 300; - glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300); - - type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Stars") == GL_FALSE) { - exit(1); - } - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Draw); - glutIdleFunc(glut_post_redisplay_p); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/stencil.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/stencil.c deleted file mode 100644 index e00bbb61b0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/stencil.c +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include -#include - - -static void Init(void) -{ - glShadeModel(GL_FLAT); - glClearColor(0.0, 0.0, 0.0, 0.0); - - glClearStencil(0); - glStencilMask(1); - glEnable(GL_STENCIL_TEST); -} - -static void Reshape(int width, int height) -{ - - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-5.0, 5.0, -5.0, 5.0, -5.0, 5.0); - glMatrixMode(GL_MODELVIEW); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - } -} - -static void Draw(void) -{ - - glClear(GL_COLOR_BUFFER_BIT|GL_STENCIL_BUFFER_BIT); - - glStencilFunc(GL_ALWAYS, 1, 1); - glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - - glColor3ub(200, 0, 0); - glBegin(GL_POLYGON); - glVertex3i(-4, -4, 0); - glVertex3i( 4, -4, 0); - glVertex3i( 0, 4, 0); - glEnd(); - - glStencilFunc(GL_EQUAL, 1, 1); - glStencilOp(GL_INCR, GL_KEEP, GL_DECR); - - glColor3ub(0, 200, 0); - glBegin(GL_POLYGON); - glVertex3i(3, 3, 0); - glVertex3i(-3, 3, 0); - glVertex3i(-3, -3, 0); - glVertex3i(3, -3, 0); - glEnd(); - - glStencilFunc(GL_EQUAL, 1, 1); - glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); - - glColor3ub(0, 0, 200); - glBegin(GL_POLYGON); - glVertex3i(3, 3, 0); - glVertex3i(-3, 3, 0); - glVertex3i(-3, -3, 0); - glVertex3i(3, -3, 0); - glEnd(); - - glFlush(); -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-dr") == 0) { - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300); - - type = GLUT_RGB | GLUT_SINGLE | GLUT_STENCIL; - glutInitDisplayMode(type); - - if (glutCreateWindow("Stencil Test") == GL_FALSE) { - exit(1); - } - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/stretch.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/stretch.c deleted file mode 100644 index 1fd015d794..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/stretch.c +++ /dev/null @@ -1,390 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include -#include - - -#define STEPCOUNT 40 -#define FALSE 0 -#define TRUE 1 -#define MAX(a, b) (((a) > (b)) ? (a) : (b)) -#define MIN(a, b) (((a) < (b)) ? (a) : (b)) - - -enum { - OP_NOOP = 0, - OP_STRETCH, - OP_DRAWPOINT, - OP_DRAWIMAGE -}; - - -typedef struct _cRec { - float x, y; -} cRec; - -typedef struct _vertexRec { - float x, y; - float dX, dY; - float tX, tY; -} vertexRec; - - -#include "loadppm.c" - -GLenum doubleBuffer; -int imageSizeX, imageSizeY; -char *fileName = 0; -PPMImage *image; -cRec cList[50]; -vertexRec vList[5]; -int cCount, cIndex[2], cStep; -GLenum op = OP_NOOP; - - -void DrawImage(void) -{ - - glRasterPos2i(0, 0); - glDrawPixels(image->sizeX, image->sizeY, GL_RGB, GL_UNSIGNED_BYTE, - image->data); - - glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } - - glRasterPos2i(0, 0); - glDrawPixels(image->sizeX, image->sizeY, GL_RGB, GL_UNSIGNED_BYTE, - image->data); -} - -void DrawPoint(void) -{ - int i; - - glColor3f(1.0, 0.0, 1.0); - glPointSize(3.0); - glBegin(GL_POINTS); - for (i = 0; i < cCount; i++) { - glVertex2f(cList[i].x, cList[i].y); - } - glEnd(); - - glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -void InitVList(void) -{ - - vList[0].x = 0.0; - vList[0].y = 0.0; - vList[0].dX = 0.0; - vList[0].dY = 0.0; - vList[0].tX = 0.0; - vList[0].tY = 0.0; - - vList[1].x = (float)imageSizeX; - vList[1].y = 0.0; - vList[1].dX = 0.0; - vList[1].dY = 0.0; - vList[1].tX = 1.0; - vList[1].tY = 0.0; - - vList[2].x = (float)imageSizeX; - vList[2].y = (float)imageSizeY; - vList[2].dX = 0.0; - vList[2].dY = 0.0; - vList[2].tX = 1.0; - vList[2].tY = 1.0; - - vList[3].x = 0.0; - vList[3].y = (float)imageSizeY; - vList[3].dX = 0.0; - vList[3].dY = 0.0; - vList[3].tX = 0.0; - vList[3].tY = 1.0; - - vList[4].x = cList[0].x; - vList[4].y = cList[0].y; - vList[4].dX = (cList[1].x - cList[0].x) / STEPCOUNT; - vList[4].dY = (cList[1].y - cList[0].y) / STEPCOUNT; - vList[4].tX = cList[0].x / (float)imageSizeX; - vList[4].tY = cList[0].y / (float)imageSizeY; -} - -void ScaleImage(int sizeX, int sizeY) -{ - GLubyte *buf; - - buf = (GLubyte *)malloc(3*sizeX*sizeY); - gluScaleImage(GL_RGB, image->sizeX, image->sizeY, GL_UNSIGNED_BYTE, - image->data, sizeX, sizeY, GL_UNSIGNED_BYTE, buf); - free(image->data); - image->data = buf; - image->sizeX = sizeX; - image->sizeY = sizeY; -} - -void SetPoint(int x, int y) -{ - - cList[cCount].x = (float)x; - cList[cCount].y = (float)y; - cCount++; -} - -void Stretch(void) -{ - - glBegin(GL_TRIANGLES); - glTexCoord2f(vList[0].tX, vList[0].tY); - glVertex2f(vList[0].x, vList[0].y); - glTexCoord2f(vList[1].tX, vList[1].tY); - glVertex2f(vList[1].x, vList[1].y); - glTexCoord2f(vList[4].tX, vList[4].tY); - glVertex2f(vList[4].x, vList[4].y); - glEnd(); - - glBegin(GL_TRIANGLES); - glTexCoord2f(vList[1].tX, vList[1].tY); - glVertex2f(vList[1].x, vList[1].y); - glTexCoord2f(vList[2].tX, vList[2].tY); - glVertex2f(vList[2].x, vList[2].y); - glTexCoord2f(vList[4].tX, vList[4].tY); - glVertex2f(vList[4].x, vList[4].y); - glEnd(); - - glBegin(GL_TRIANGLES); - glTexCoord2f(vList[2].tX, vList[2].tY); - glVertex2f(vList[2].x, vList[2].y); - glTexCoord2f(vList[3].tX, vList[3].tY); - glVertex2f(vList[3].x, vList[3].y); - glTexCoord2f(vList[4].tX, vList[4].tY); - glVertex2f(vList[4].x, vList[4].y); - glEnd(); - - glBegin(GL_TRIANGLES); - glTexCoord2f(vList[3].tX, vList[3].tY); - glVertex2f(vList[3].x, vList[3].y); - glTexCoord2f(vList[0].tX, vList[0].tY); - glVertex2f(vList[0].x, vList[0].y); - glTexCoord2f(vList[4].tX, vList[4].tY); - glVertex2f(vList[4].x, vList[4].y); - glEnd(); - - glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } - - if (++cStep < STEPCOUNT) { - vList[4].x += vList[4].dX; - vList[4].y += vList[4].dY; - } else { - cIndex[0] = cIndex[1]; - cIndex[1] = cIndex[1] + 1; - if (cIndex[1] == cCount) { - cIndex[1] = 0; - } - vList[4].dX = (cList[cIndex[1]].x - cList[cIndex[0]].x) / STEPCOUNT; - vList[4].dY = (cList[cIndex[1]].y - cList[cIndex[0]].y) / STEPCOUNT; - cStep = 0; - } -} - -void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - free(image->data); - exit(1); - case 32: - if (cCount > 1) { - InitVList(); - cIndex[0] = 0; - cIndex[1] = 1; - cStep = 0; - glEnable(GL_TEXTURE_2D); - op = OP_STRETCH; - } - break; - default: - return; - } - - glutPostRedisplay(); -} - -void Mouse(int button, int state, int mouseX, int mouseY) -{ - - if (state != GLUT_DOWN) - return; - - if (op == OP_STRETCH) { - glDisable(GL_TEXTURE_2D); - cCount = 0; - op = OP_DRAWIMAGE; - } else { - SetPoint(mouseX, imageSizeY-mouseY); - op = OP_DRAWPOINT; - } - - glutPostRedisplay(); -} - -void Animate(void) -{ - static double t0 = -1.; - double t, dt; - t = glutGet(GLUT_ELAPSED_TIME) / 1000.; - if (t0 < 0.) - t0 = t; - dt = t - t0; - - if (dt < 1./60.) - return; - - t0 = t; - - switch (op) { - case OP_STRETCH: - Stretch(); - break; - case OP_DRAWPOINT: - DrawPoint(); - break; - case OP_DRAWIMAGE: - DrawImage(); - break; - default: - break; - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_TRUE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else if (strcmp(argv[i], "-f") == 0) { - if (i+1 >= argc || argv[i+1][0] == '-') { - printf("-f (No file name).\n"); - return GL_FALSE; - } else { - fileName = argv[++i]; - } - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -#if !defined(GLUTCALLBACK) -#define GLUTCALLBACK -#endif - -void GLUTCALLBACK glut_post_redisplay_p(void) -{ - glutPostRedisplay(); -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - if (fileName == 0) { - printf("No image file.\n"); - exit(1); - } - - image = LoadPPM(fileName); - - /* changed powf and logf to pow and log -Brian */ - imageSizeX = (int)pow(2.0, (float)((int)(log(image->sizeX)/log(2.0)))); - imageSizeY = (int)pow(2.0, (float)((int)(log(image->sizeY)/log(2.0)))); - - glutInitWindowPosition(0, 0); glutInitWindowSize( imageSizeX, imageSizeY); - - type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Stretch") == GL_FALSE) { - exit(1); - } - - glViewport(0, 0, imageSizeX, imageSizeY); - gluOrtho2D(0, imageSizeX, 0, imageSizeY); - glClearColor(0.0, 0.0, 0.0, 0.0); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glPixelStorei(GL_PACK_ALIGNMENT, 1); - - ScaleImage(imageSizeX, imageSizeY); - - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexImage2D(GL_TEXTURE_2D, 0, 3, image->sizeX, image->sizeY, 0, - GL_RGB, GL_UNSIGNED_BYTE, (unsigned char *)image->data); - - cCount = 0; - cIndex[0] = 0; - cIndex[1] = 0; - cStep = 0; - op = OP_DRAWIMAGE; - - glutKeyboardFunc(Key); - glutMouseFunc(Mouse); - glutDisplayFunc(Animate); - glutIdleFunc(glut_post_redisplay_p); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/texture.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/texture.c deleted file mode 100644 index 7ee41eef28..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/texture.c +++ /dev/null @@ -1,474 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include -#include - - -#include "loadppm.c" - -GLenum doubleBuffer; - -char *texFileName = 0; -PPMImage *image; - -float *minFilter, *magFilter, *sWrapMode, *tWrapMode; -float decal[] = {GL_DECAL}; -float modulate[] = {GL_MODULATE}; -float repeat[] = {GL_REPEAT}; -float clamp[] = {GL_CLAMP}; -float nr[] = {GL_NEAREST}; -float ln[] = {GL_LINEAR}; -float nr_mipmap_nr[] = {GL_NEAREST_MIPMAP_NEAREST}; -float nr_mipmap_ln[] = {GL_NEAREST_MIPMAP_LINEAR}; -float ln_mipmap_nr[] = {GL_LINEAR_MIPMAP_NEAREST}; -float ln_mipmap_ln[] = {GL_LINEAR_MIPMAP_LINEAR}; -GLint sphereMap[] = {GL_SPHERE_MAP}; - -GLenum doSphere = GL_FALSE; -float xRotation = 0.0, yRotation = 0.0, zTranslate = -3.125; - -GLint cube; -float c[6][4][3] = { - { - { - 1.0, 1.0, -1.0 - }, - { - -1.0, 1.0, -1.0 - }, - { - -1.0, -1.0, -1.0 - }, - { - 1.0, -1.0, -1.0 - } - }, - { - { - 1.0, 1.0, 1.0 - }, - { - 1.0, 1.0, -1.0 - }, - { - 1.0, -1.0, -1.0 - }, - { - 1.0, -1.0, 1.0 - } - }, - { - { - -1.0, 1.0, 1.0 - }, - { - 1.0, 1.0, 1.0 - }, - { - 1.0, -1.0, 1.0 - }, - { - -1.0, -1.0, 1.0 - } - }, - { - { - -1.0, 1.0, -1.0 - }, - { - -1.0, 1.0, 1.0 - }, - { - -1.0, -1.0, 1.0 - }, - { - -1.0, -1.0, -1.0 - } - }, - { - { - -1.0, 1.0, 1.0 - }, - { - -1.0, 1.0, -1.0 - }, - { - 1.0, 1.0, -1.0 - }, - { - 1.0, 1.0, 1.0 - } - }, - { - { - -1.0, -1.0, -1.0 - }, - { - -1.0, -1.0, 1.0 - }, - { - 1.0, -1.0, 1.0 - }, - { - 1.0, -1.0, -1.0 - } - } -}; -static float n[6][3] = { - { - 0.0, 0.0, -1.0 - }, - { - 1.0, 0.0, 0.0 - }, - { - 0.0, 0.0, 1.0 - }, - { - -1.0, 0.0, 0.0 - }, - { - 0.0, 1.0, 0.0 - }, - { - 0.0, -1.0, 0.0 - } -}; -static float t[6][4][2] = { - { - { - 1.1, 1.1 - }, - { - -0.1, 1.1 - }, - { - -0.1, -0.1 - }, - { - 1.1, -0.1 - } - }, - { - { - 1.1, 1.1 - }, - { - -0.1, 1.1 - }, - { - -0.1, -0.1 - }, - { - 1.1, -0.1 - } - }, - { - { - -0.1, 1.1 - }, - { - 1.1, 1.1 - }, - { - 1.1, -0.1 - }, - { - -0.1, -0.1 - } - }, - { - { - 1.1, 1.1 - }, - { - -0.1, 1.1 - }, - { - -0.1, -0.1 - }, - { - 1.1, -0.1 - } - }, - { - { - 1.1, 1.1 - }, - { - -0.1, 1.1 - }, - { - -0.1, -0.1 - }, - { - 1.1, -0.1 - } - }, - { - { - 1.1, 1.1 - }, - { - -0.1, 1.1 - }, - { - -0.1, -0.1 - }, - { - 1.1, -0.1 - } - }, -}; - -static void BuildCube(void) -{ - GLint i; - - glNewList(cube, GL_COMPILE); - for (i = 0; i < 6; i++) { - glBegin(GL_POLYGON); - glNormal3fv(n[i]); glTexCoord2fv(t[i][0]); glVertex3fv(c[i][0]); - glNormal3fv(n[i]); glTexCoord2fv(t[i][1]); glVertex3fv(c[i][1]); - glNormal3fv(n[i]); glTexCoord2fv(t[i][2]); glVertex3fv(c[i][2]); - glNormal3fv(n[i]); glTexCoord2fv(t[i][3]); glVertex3fv(c[i][3]); - glEnd(); - } - glEndList(); -} - -static void BuildLists(void) -{ - - cube = glGenLists(1); - BuildCube(); -} - -static void Init(void) -{ - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - gluBuild2DMipmaps(GL_TEXTURE_2D, 3, image->sizeX, image->sizeY, - GL_RGB, GL_UNSIGNED_BYTE, image->data); - glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, decal); - glEnable(GL_TEXTURE_2D); - - glFrontFace(GL_CCW); - glCullFace(GL_FRONT); - glEnable(GL_CULL_FACE); - - BuildLists(); - - glClearColor(0.0, 0.0, 0.0, 0.0); - - magFilter = nr; - minFilter = nr; - sWrapMode = repeat; - tWrapMode = repeat; -} - -static void Reshape(int width, int height) -{ - - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(145.0, 1.0, 0.01, 1000); - glMatrixMode(GL_MODELVIEW); -} - -static void Key2(int key, int x, int y) -{ - - switch (key) { - case GLUT_KEY_LEFT: - yRotation -= 0.5; - break; - case GLUT_KEY_RIGHT: - yRotation += 0.5; - break; - case GLUT_KEY_UP: - xRotation -= 0.5; - break; - case GLUT_KEY_DOWN: - xRotation += 0.5; - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - - case 'T': - zTranslate += 0.25; - break; - case 't': - zTranslate -= 0.25; - break; - - case 's': - doSphere = !doSphere; - if (doSphere) { - glTexGeniv(GL_S, GL_TEXTURE_GEN_MODE, sphereMap); - glTexGeniv(GL_T, GL_TEXTURE_GEN_MODE, sphereMap); - glEnable(GL_TEXTURE_GEN_S); - glEnable(GL_TEXTURE_GEN_T); - } else { - glDisable(GL_TEXTURE_GEN_S); - glDisable(GL_TEXTURE_GEN_T); - } - break; - - case '0': - magFilter = nr; - break; - case '1': - magFilter = ln; - break; - case '2': - minFilter = nr; - break; - case '3': - minFilter = ln; - break; - case '4': - minFilter = nr_mipmap_nr; - break; - case '5': - minFilter = nr_mipmap_ln; - break; - case '6': - minFilter = ln_mipmap_nr; - break; - case '7': - minFilter = ln_mipmap_ln; - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Draw(void) -{ - - glClear(GL_COLOR_BUFFER_BIT); - - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, sWrapMode); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, tWrapMode); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, magFilter); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minFilter); - - glPushMatrix(); - - glTranslatef(0.0, 0.0, zTranslate); - glRotatef(xRotation, 1, 0, 0); - glRotatef(yRotation, 0, 1, 0); - glCallList(cube); - - glPopMatrix(); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else if (strcmp(argv[i], "-f") == 0) { - if (i+1 >= argc || argv[i+1][0] == '-') { - printf("-f (No file name).\n"); - return GL_FALSE; - } else { - texFileName = argv[++i]; - } - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - if (texFileName == 0) { - printf("No image file.\n"); - exit(1); - } - - image = LoadPPM(texFileName); - - glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300); - - type = GLUT_RGB; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Texture Test") == GL_FALSE) { - exit(1); - } - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(Key2); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/tkmap.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/tkmap.c deleted file mode 100644 index 3ded79caca..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/tkmap.c +++ /dev/null @@ -1,71 +0,0 @@ - -enum { - COLOR_BLACK = 0, - COLOR_RED, - COLOR_GREEN, - COLOR_YELLOW, - COLOR_BLUE, - COLOR_MAGENTA, - COLOR_CYAN, - COLOR_WHITE -}; - -static float RGBMap[9][3] = { - {0, 0, 0}, - {1, 0, 0}, - {0, 1, 0}, - {1, 1, 0}, - {0, 0, 1}, - {1, 0, 1}, - {0, 1, 1}, - {1, 1, 1}, - {0.5, 0.5, 0.5} -}; - -static void SetColor(int c) -{ - if (glutGet(GLUT_WINDOW_RGBA)) - glColor3fv(RGBMap[c]); - else - glIndexf(c); -} - -static void InitMap(void) -{ - int i; - - if (rgb) - return; - - for (i = 0; i < 9; i++) - glutSetColor(i, RGBMap[i][0], RGBMap[i][1], RGBMap[i][2]); -} - -static void SetFogRamp(int density, int startIndex) -{ - int fogValues, colorValues; - int i, j, k; - float intensity; - - fogValues = 1 << density; - colorValues = 1 << startIndex; - for (i = 0; i < colorValues; i++) { - for (j = 0; j < fogValues; j++) { - k = i * fogValues + j; - intensity = (i * fogValues + j * colorValues) / 255.0; - glutSetColor(k, intensity, intensity, intensity); - } - } -} - -static void SetGreyRamp(void) -{ - int i; - float intensity; - - for (i = 0; i < 255; i++) { - intensity = i / 255.0; - glutSetColor(i, intensity, intensity, intensity); - } -} - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/tri.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/tri.c deleted file mode 100644 index 700325132e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/tri.c +++ /dev/null @@ -1,403 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include - - -#define SOLID 1 -#define LINE 2 -#define POINT 3 - - -GLenum rgb, doubleBuffer, windType; -GLint windW, windH; - -GLenum dithering = GL_TRUE; -GLenum showVerticies = GL_TRUE; -GLenum hideBottomTriangle = GL_FALSE; -GLenum outline = GL_TRUE; -GLenum culling = GL_FALSE; -GLenum winding = GL_FALSE; -GLenum face = GL_FALSE; -GLenum state = SOLID; -GLenum aaMode = GL_FALSE; -GLenum shade = GL_TRUE; - -GLint color1, color2, color3; - -float zRotation = 90.0; -float zoom = 1.0; - -float boxA[3] = {-100, -100, 0}; -float boxB[3] = { 100, -100, 0}; -float boxC[3] = { 100, 100, 0}; -float boxD[3] = {-100, 100, 0}; - -float p0[3] = {-125,-80, 0}; -float p1[3] = {-125, 80, 0}; -float p2[3] = { 172, 0, 0}; - - -#include "tkmap.c" - -static void Init(void) -{ - float r, g, b; - float percent1, percent2; - GLint i, j; - - glClearColor(0.0, 0.0, 0.0, 0.0); - - glLineStipple(1, 0xF0F0); - - glEnable(GL_SCISSOR_TEST); - - if (!rgb) { - for (j = 0; j <= 12; j++) { - if (j <= 6) { - percent1 = j / 6.0; - r = 1.0 - 0.8 * percent1; - g = 0.2 + 0.8 * percent1; - b = 0.2; - } else { - percent1 = (j - 6) / 6.0; - r = 0.2; - g = 1.0 - 0.8 * percent1; - b = 0.2 + 0.8 * percent1; - } - glutSetColor(j+18, r, g, b); - for (i = 0; i < 16; i++) { - percent2 = i / 15.0; - glutSetColor(j*16+1+32, r*percent2, g*percent2, b*percent2); - } - } - color1 = 18; - color2 = 24; - color3 = 30; - } -} - -static void Reshape(int width, int height) -{ - - windW = (GLint)width; - windH = (GLint)height; -} - -static void Key2(int key, int x, int y) -{ - - switch (key) { - case GLUT_KEY_LEFT: - zRotation += 0.5; - break; - case GLUT_KEY_RIGHT: - zRotation -= 0.5; - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - case 'Z': - zoom *= 0.75; - break; - case 'z': - zoom /= 0.75; - if (zoom > 10) { - zoom = 10; - } - break; - case '1': - glPolygonMode(GL_FRONT_AND_BACK, GL_POINT); - break; - case '2': - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - break; - case '3': - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - break; - case '4': - state = POINT; - break; - case '5': - state = LINE; - break; - case '6': - state = SOLID; - break; - case '7': - culling = !culling; - break; - case '8': - winding = !winding; - break; - case '9': - face = !face; - break; - case 'v': - showVerticies = !showVerticies; - break; - case 's': - shade = !shade; - (shade) ? glShadeModel(GL_SMOOTH) : glShadeModel(GL_FLAT); - break; - case 'h': - hideBottomTriangle = !hideBottomTriangle; - break; - case 'o': - outline = !outline; - break; - case 'm': - dithering = !dithering; - break; - case '0': - aaMode = !aaMode; - if (aaMode) { - glEnable(GL_POLYGON_SMOOTH); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE); - if (!rgb) { - color1 = 32; - color2 = 128; - color3 = 224; - } - } else { - glDisable(GL_POLYGON_SMOOTH); - glDisable(GL_BLEND); - if (!rgb) { - color1 = 18; - color2 = 24; - color3 = 30; - } - } - break; - default: - return; - } - - glutPostRedisplay(); -} - -static void BeginPrim(void) -{ - - switch (state) { - case SOLID: - glBegin(GL_POLYGON); - break; - case LINE: - glBegin(GL_LINE_LOOP); - break; - case POINT: - glBegin(GL_POINTS); - break; - default: - break; - } -} - -static void EndPrim(void) -{ - - glEnd(); -} - -static void Draw(void) -{ - float scaleX, scaleY; - - glViewport(0, 0, windW, windH); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(-175, 175, -175, 175); - glMatrixMode(GL_MODELVIEW); - - glScissor(0, 0, windW, windH); - - (culling) ? glEnable(GL_CULL_FACE) : glDisable(GL_CULL_FACE); - (winding) ? glFrontFace(GL_CCW) : glFrontFace(GL_CW); - (face) ? glCullFace(GL_FRONT) : glCullFace(GL_BACK); - - (dithering) ? glEnable(GL_DITHER) : glDisable(GL_DITHER); - - glClear(GL_COLOR_BUFFER_BIT); - - SetColor(COLOR_GREEN); - glBegin(GL_LINE_LOOP); - glVertex3fv(boxA); - glVertex3fv(boxB); - glVertex3fv(boxC); - glVertex3fv(boxD); - glEnd(); - - if (!hideBottomTriangle) { - glPushMatrix(); - - glScalef(zoom, zoom, zoom); - glRotatef(zRotation, 0, 0, 1); - - SetColor(COLOR_BLUE); - BeginPrim(); - glVertex3fv(p0); - glVertex3fv(p1); - glVertex3fv(p2); - EndPrim(); - - if (showVerticies) { - (rgb) ? glColor3fv(RGBMap[COLOR_RED]) : glIndexf(color1); - glRectf(p0[0]-2, p0[1]-2, p0[0]+2, p0[1]+2); - (rgb) ? glColor3fv(RGBMap[COLOR_GREEN]) : glIndexf(color2); - glRectf(p1[0]-2, p1[1]-2, p1[0]+2, p1[1]+2); - (rgb) ? glColor3fv(RGBMap[COLOR_BLUE]) : glIndexf(color3); - glRectf(p2[0]-2, p2[1]-2, p2[0]+2, p2[1]+2); - } - - glPopMatrix(); - } - - scaleX = (float)(windW - 20) / 2 / 175 * (175 - 100) + 10; - scaleY = (float)(windH - 20) / 2 / 175 * (175 - 100) + 10; - - glViewport(scaleX, scaleY, windW-2*scaleX, windH-2*scaleY); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluOrtho2D(-100, 100, -100, 100); - glMatrixMode(GL_MODELVIEW); - - glScissor(scaleX, scaleY, windW-2*scaleX, windH-2*scaleY); - - glPushMatrix(); - - glScalef(zoom, zoom, zoom); - glRotatef(zRotation, 0,0,1); - - glPointSize(10); - glLineWidth(5); - glEnable(GL_POINT_SMOOTH); - glEnable(GL_LINE_STIPPLE); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - SetColor(COLOR_RED); - BeginPrim(); - (rgb) ? glColor3fv(RGBMap[COLOR_RED]) : glIndexf(color1); - glVertex3fv(p0); - (rgb) ? glColor3fv(RGBMap[COLOR_GREEN]) : glIndexf(color2); - glVertex3fv(p1); - (rgb) ? glColor3fv(RGBMap[COLOR_BLUE]) : glIndexf(color3); - glVertex3fv(p2); - EndPrim(); - - glPointSize(1); - glLineWidth(1); - glDisable(GL_POINT_SMOOTH); - glDisable(GL_LINE_STIPPLE); - glBlendFunc(GL_ONE, GL_ZERO); - - if (outline) { - SetColor(COLOR_WHITE); - glBegin(GL_LINE_LOOP); - glVertex3fv(p0); - glVertex3fv(p1); - glVertex3fv(p2); - glEnd(); - } - - glPopMatrix(); - - glFlush(); - - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - rgb = GL_TRUE; - doubleBuffer = GL_FALSE; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-ci") == 0) { - rgb = GL_FALSE; - } else if (strcmp(argv[i], "-rgb") == 0) { - rgb = GL_TRUE; - } else if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - windW = 600; - windH = 300; - glutInitWindowPosition(0, 0); glutInitWindowSize( windW, windH); - - windType = (rgb) ? GLUT_RGB : GLUT_INDEX; - windType |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(windType); - - if (glutCreateWindow("Triangle Test") == GL_FALSE) { - exit(1); - } - - InitMap(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(Key2); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/samples/wave.c b/nx-X11/extras/Mesa_6.4.2/progs/samples/wave.c deleted file mode 100644 index d3c4687459..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/samples/wave.c +++ /dev/null @@ -1,619 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include -#include - -#ifndef PI -#define PI 3.14159265358979323846 -#endif - -#define GETCOORD(frame, x, y) (&(theMesh.coords[frame*theMesh.numCoords+(x)+(y)*(theMesh.widthX+1)])) -#define GETFACET(frame, x, y) (&(theMesh.facets[frame*theMesh.numFacets+(x)+(y)*theMesh.widthX])) - - -GLenum rgb, doubleBuffer; - -#include "tkmap.c" - -GLint colorIndexes1[3]; -GLint colorIndexes2[3]; -GLenum clearMask = GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT; - -GLenum smooth = GL_FALSE; -GLenum lighting = GL_TRUE; -GLenum depth = GL_TRUE; -GLenum stepMode = GL_FALSE; -GLenum spinMode = GL_FALSE; -GLint contouring = 0; - -GLint widthX, widthY; -GLint checkerSize; -float height; - -GLint frames, curFrame = 0, nextFrame = 0; - -struct facet { - float color[3]; - float normal[3]; -}; -struct coord { - float vertex[3]; - float normal[3]; -}; -struct mesh { - GLint widthX, widthY; - GLint numFacets; - GLint numCoords; - GLint frames; - struct coord *coords; - struct facet *facets; -} theMesh; - -GLubyte contourTexture1[] = { - 255, 255, 255, 255, - 255, 255, 255, 255, - 255, 255, 255, 255, - 127, 127, 127, 127, -}; -GLubyte contourTexture2[] = { - 255, 255, 255, 255, - 255, 127, 127, 127, - 255, 127, 127, 127, - 255, 127, 127, 127, -}; - -#if !defined(GLUTCALLBACK) -#define GLUTCALLBACK -#endif - - -void GLUTCALLBACK glut_post_redisplay_p(void) -{ - static double t0 = -1.; - double t, dt; - t = glutGet(GLUT_ELAPSED_TIME) / 1000.; - if (t0 < 0.) - t0 = t; - dt = t - t0; - - if (dt < 1./30.) - return; - - t0 = t; - - glutPostRedisplay(); -} - -static void Animate(void) -{ - struct coord *coord; - struct facet *facet; - float *lastColor; - float *thisColor; - GLint i, j; - - glClear(clearMask); - - if (nextFrame || !stepMode) { - curFrame++; - } - if (curFrame >= theMesh.frames) { - curFrame = 0; - } - - if ((nextFrame || !stepMode) && spinMode) { - glRotatef(5.0, 0.0, 0.0, 1.0); - } - nextFrame = 0; - - for (i = 0; i < theMesh.widthX; i++) { - glBegin(GL_QUAD_STRIP); - lastColor = NULL; - for (j = 0; j < theMesh.widthY; j++) { - facet = GETFACET(curFrame, i, j); - if (!smooth && lighting) { - glNormal3fv(facet->normal); - } - if (lighting) { - if (rgb) { - thisColor = facet->color; - glColor3fv(facet->color); - } else { - thisColor = facet->color; - glMaterialfv(GL_FRONT_AND_BACK, GL_COLOR_INDEXES, - facet->color); - } - } else { - if (rgb) { - thisColor = facet->color; - glColor3fv(facet->color); - } else { - thisColor = facet->color; - glIndexf(facet->color[1]); - } - } - - if (!lastColor || (thisColor[0] != lastColor[0] && smooth)) { - if (lastColor) { - glEnd(); - glBegin(GL_QUAD_STRIP); - } - coord = GETCOORD(curFrame, i, j); - if (smooth && lighting) { - glNormal3fv(coord->normal); - } - glVertex3fv(coord->vertex); - - coord = GETCOORD(curFrame, i+1, j); - if (smooth && lighting) { - glNormal3fv(coord->normal); - } - glVertex3fv(coord->vertex); - } - - coord = GETCOORD(curFrame, i, j+1); - if (smooth && lighting) { - glNormal3fv(coord->normal); - } - glVertex3fv(coord->vertex); - - coord = GETCOORD(curFrame, i+1, j+1); - if (smooth && lighting) { - glNormal3fv(coord->normal); - } - glVertex3fv(coord->vertex); - - lastColor = thisColor; - } - glEnd(); - } - - glFlush(); - if (doubleBuffer) { - glutSwapBuffers(); - } -} - -static void SetColorMap(void) -{ - static float green[3] = {0.2, 1.0, 0.2}; - static float red[3] = {1.0, 0.2, 0.2}; - float *color = 0, percent; - GLint *indexes = 0, entries, i, j; - - entries = glutGet(GLUT_WINDOW_COLORMAP_SIZE); - - colorIndexes1[0] = 1; - colorIndexes1[1] = 1 + (GLint)((entries - 1) * 0.3); - colorIndexes1[2] = (GLint)((entries - 1) * 0.5); - colorIndexes2[0] = 1 + (GLint)((entries - 1) * 0.5); - colorIndexes2[1] = 1 + (GLint)((entries - 1) * 0.8); - colorIndexes2[2] = entries - 1; - - for (i = 0; i < 2; i++) { - switch (i) { - case 0: - color = green; - indexes = colorIndexes1; - break; - case 1: - color = red; - indexes = colorIndexes2; - break; - } - - for (j = indexes[0]; j < indexes[1]; j++) { - percent = 0.2 + 0.8 * (j - indexes[0]) / - (float)(indexes[1] - indexes[0]); - glutSetColor(j, percent*color[0], percent*color[1], - percent*color[2]); - } - for (j=indexes[1]; j<=indexes[2]; j++) { - percent = (j - indexes[1]) / (float)(indexes[2] - indexes[1]); - glutSetColor(j, percent*(1-color[0])+color[0], - percent*(1-color[1])+color[1], - percent*(1-color[2])+color[2]); - } - } -} - -static void InitMesh(void) -{ - struct coord *coord; - struct facet *facet; - float dp1[3], dp2[3]; - float *pt1, *pt2, *pt3; - float angle, d, x, y; - GLint numFacets, numCoords, frameNum, i, j; - - theMesh.widthX = widthX; - theMesh.widthY = widthY; - theMesh.frames = frames; - - numFacets = widthX * widthY; - numCoords = (widthX + 1) * (widthY + 1); - - theMesh.numCoords = numCoords; - theMesh.numFacets = numFacets; - - theMesh.coords = (struct coord *)malloc(frames*numCoords* - sizeof(struct coord)); - theMesh.facets = (struct facet *)malloc(frames*numFacets* - sizeof(struct facet)); - if (theMesh.coords == NULL || theMesh.facets == NULL) { - printf("Out of memory.\n"); - exit(1); - } - - for (frameNum = 0; frameNum < frames; frameNum++) { - for (i = 0; i <= widthX; i++) { - x = i / (float)widthX; - for (j = 0; j <= widthY; j++) { - y = j / (float)widthY; - - d = sqrt(x*x+y*y); - if (d == 0.0) { - d = 0.0001; - } - angle = 2 * PI * d + (2 * PI / frames * frameNum); - - coord = GETCOORD(frameNum, i, j); - - coord->vertex[0] = x - 0.5; - coord->vertex[1] = y - 0.5; - coord->vertex[2] = (height - height * d) * cos(angle); - - coord->normal[0] = -(height / d) * x * ((1 - d) * 2 * PI * - sin(angle) + cos(angle)); - coord->normal[1] = -(height / d) * y * ((1 - d) * 2 * PI * - sin(angle) + cos(angle)); - coord->normal[2] = -1; - - d = 1.0 / sqrt(coord->normal[0]*coord->normal[0]+ - coord->normal[1]*coord->normal[1]+1); - coord->normal[0] *= d; - coord->normal[1] *= d; - coord->normal[2] *= d; - } - } - for (i = 0; i < widthX; i++) { - for (j = 0; j < widthY; j++) { - facet = GETFACET(frameNum, i, j); - if (((i/checkerSize)%2)^(j/checkerSize)%2) { - if (rgb) { - facet->color[0] = 1.0; - facet->color[1] = 0.2; - facet->color[2] = 0.2; - } else { - facet->color[0] = colorIndexes1[0]; - facet->color[1] = colorIndexes1[1]; - facet->color[2] = colorIndexes1[2]; - } - } else { - if (rgb) { - facet->color[0] = 0.2; - facet->color[1] = 1.0; - facet->color[2] = 0.2; - } else { - facet->color[0] = colorIndexes2[0]; - facet->color[1] = colorIndexes2[1]; - facet->color[2] = colorIndexes2[2]; - } - } - pt1 = GETCOORD(frameNum, i, j)->vertex; - pt2 = GETCOORD(frameNum, i, j+1)->vertex; - pt3 = GETCOORD(frameNum, i+1, j+1)->vertex; - - dp1[0] = pt2[0] - pt1[0]; - dp1[1] = pt2[1] - pt1[1]; - dp1[2] = pt2[2] - pt1[2]; - - dp2[0] = pt3[0] - pt2[0]; - dp2[1] = pt3[1] - pt2[1]; - dp2[2] = pt3[2] - pt2[2]; - - facet->normal[0] = dp1[1] * dp2[2] - dp1[2] * dp2[1]; - facet->normal[1] = dp1[2] * dp2[0] - dp1[0] * dp2[2]; - facet->normal[2] = dp1[0] * dp2[1] - dp1[1] * dp2[0]; - - d = 1.0 / sqrt(facet->normal[0]*facet->normal[0]+ - facet->normal[1]*facet->normal[1]+ - facet->normal[2]*facet->normal[2]); - - facet->normal[0] *= d; - facet->normal[1] *= d; - facet->normal[2] *= d; - } - } - } -} - -static void InitMaterials(void) -{ - static float ambient[] = {0.1, 0.1, 0.1, 1.0}; - static float diffuse[] = {0.5, 1.0, 1.0, 1.0}; - static float position[] = {90.0, 90.0, 150.0, 0.0}; - static float front_mat_shininess[] = {60.0}; - static float front_mat_specular[] = {0.2, 0.2, 0.2, 1.0}; - static float front_mat_diffuse[] = {0.5, 0.28, 0.38, 1.0}; - static float back_mat_shininess[] = {60.0}; - static float back_mat_specular[] = {0.5, 0.5, 0.2, 1.0}; - static float back_mat_diffuse[] = {1.0, 1.0, 0.2, 1.0}; - static float lmodel_ambient[] = {1.0, 1.0, 1.0, 1.0}; - static float lmodel_twoside[] = {GL_TRUE}; - - glMatrixMode(GL_PROJECTION); - gluPerspective(90.0, 1.0, 0.5, 10.0); - - glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse); - glLightfv(GL_LIGHT0, GL_POSITION, position); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); - glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - - glMaterialfv(GL_FRONT, GL_SHININESS, front_mat_shininess); - glMaterialfv(GL_FRONT, GL_SPECULAR, front_mat_specular); - glMaterialfv(GL_FRONT, GL_DIFFUSE, front_mat_diffuse); - glMaterialfv(GL_BACK, GL_SHININESS, back_mat_shininess); - glMaterialfv(GL_BACK, GL_SPECULAR, back_mat_specular); - glMaterialfv(GL_BACK, GL_DIFFUSE, back_mat_diffuse); - if (rgb) { - glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); - } - - if (rgb) { - glEnable(GL_COLOR_MATERIAL); - } else { - SetColorMap(); - } -} - -static void InitTexture(void) -{ - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); -} - -static void Init(void) -{ - - glClearColor(0.0, 0.0, 0.0, 0.0); - - glShadeModel(GL_FLAT); - - glFrontFace(GL_CW); - - glEnable(GL_DEPTH_TEST); - - InitMaterials(); - InitTexture(); - InitMesh(); - - glMatrixMode(GL_MODELVIEW); - glTranslatef(0.0, 0.4, -1.8); - glScalef(2.0, 2.0, 2.0); - glRotatef(-35.0, 1.0, 0.0, 0.0); - glRotatef(35.0, 0.0, 0.0, 1.0); -} - -static void Reshape(int width, int height) -{ - - glViewport(0, 0, (GLint)width, (GLint)height); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - case 'c': - contouring++; - if (contouring == 1) { - static GLfloat map[4] = {0, 0, 20, 0}; - - glTexImage2D(GL_TEXTURE_2D, 0, 3, 4, 4, 0, GL_LUMINANCE, - GL_UNSIGNED_BYTE, (GLvoid *)contourTexture1); - glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); - glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); - glTexGenfv(GL_S, GL_OBJECT_PLANE, map); - glTexGenfv(GL_T, GL_OBJECT_PLANE, map); - glEnable(GL_TEXTURE_2D); - glEnable(GL_TEXTURE_GEN_S); - glEnable(GL_TEXTURE_GEN_T); - } else if (contouring == 2) { - static GLfloat map[4] = {0, 0, 20, 0}; - - glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); - glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); - glPushMatrix(); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTexGenfv(GL_S, GL_EYE_PLANE, map); - glTexGenfv(GL_T, GL_EYE_PLANE, map); - glPopMatrix(); - } else { - contouring = 0; - glDisable(GL_TEXTURE_GEN_S); - glDisable(GL_TEXTURE_GEN_T); - glDisable(GL_TEXTURE_2D); - } - break; - case 's': - smooth = !smooth; - if (smooth) { - glShadeModel(GL_SMOOTH); - } else { - glShadeModel(GL_FLAT); - } - break; - case 'l': - lighting = !lighting; - if (lighting) { - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - if (rgb) { - glEnable(GL_COLOR_MATERIAL); - } - } else { - glDisable(GL_LIGHTING); - glDisable(GL_LIGHT0); - if (rgb) { - glDisable(GL_COLOR_MATERIAL); - } - } - break; - case 'd': - depth = !depth; - if (depth) { - glEnable(GL_DEPTH_TEST); - clearMask |= GL_DEPTH_BUFFER_BIT; - } else { - glDisable(GL_DEPTH_TEST); - clearMask &= ~GL_DEPTH_BUFFER_BIT; - } - break; - case 32: - stepMode = !stepMode; - if (stepMode) { - glutIdleFunc(0); - } else { - glutIdleFunc(glut_post_redisplay_p); - } - break; - case 'n': - if (stepMode) { - nextFrame = 1; - } - break; - case 'a': - spinMode = !spinMode; - break; - default: - return; - } - glutPostRedisplay(); -} - -static GLenum Args(int argc, char **argv) -{ - GLint i; - - rgb = GL_TRUE; - doubleBuffer = GL_TRUE; - frames = 10; - widthX = 10; - widthY = 10; - checkerSize = 2; - height = 0.2; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-ci") == 0) { - rgb = GL_FALSE; - } else if (strcmp(argv[i], "-rgb") == 0) { - rgb = GL_TRUE; - } else if (strcmp(argv[i], "-sb") == 0) { - doubleBuffer = GL_FALSE; - } else if (strcmp(argv[i], "-db") == 0) { - doubleBuffer = GL_TRUE; - } else if (strcmp(argv[i], "-grid") == 0) { - if (i+2 >= argc || argv[i+1][0] == '-' || argv[i+2][0] == '-') { - printf("-grid (No numbers).\n"); - return GL_FALSE; - } else { - widthX = atoi(argv[++i]); - widthY = atoi(argv[++i]); - } - } else if (strcmp(argv[i], "-size") == 0) { - if (i+1 >= argc || argv[i+1][0] == '-') { - printf("-checker (No number).\n"); - return GL_FALSE; - } else { - checkerSize = atoi(argv[++i]); - } - } else if (strcmp(argv[i], "-wave") == 0) { - if (i+1 >= argc || argv[i+1][0] == '-') { - printf("-wave (No number).\n"); - return GL_FALSE; - } else { - height = atof(argv[++i]); - } - } else if (strcmp(argv[i], "-frames") == 0) { - if (i+1 >= argc || argv[i+1][0] == '-') { - printf("-frames (No number).\n"); - return GL_FALSE; - } else { - frames = atoi(argv[++i]); - } - } else { - printf("%s (Bad option).\n", argv[i]); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - if (Args(argc, argv) == GL_FALSE) { - exit(1); - } - - glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300); - - type = GLUT_DEPTH; - type |= (rgb) ? GLUT_RGB : GLUT_INDEX; - type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("Wave Demo") == GL_FALSE) { - exit(1); - } - - InitMap(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Animate); - glutIdleFunc(glut_post_redisplay_p); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/.cvsignore b/nx-X11/extras/Mesa_6.4.2/progs/tests/.cvsignore deleted file mode 100644 index d0f2a87a81..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -.cvsignore -getproclist.h diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/Makefile b/nx-X11/extras/Mesa_6.4.2/progs/tests/Makefile deleted file mode 100644 index 768820cf3d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/Makefile +++ /dev/null @@ -1,135 +0,0 @@ -# progs/tests/Makefile - - -# These programs aren't intended to be included with the normal distro. -# They're not too interesting but they're good for testing. - -TOP = ../.. -include $(TOP)/configs/current - - -LIBS = $(APP_LIB_DEPS) - -SOURCES = antialias.c \ - arbfpspec.c \ - arbfptest1.c \ - arbfptexture.c \ - arbfptrig.c \ - arbvptest1.c \ - arbvptest3.c \ - arbvptorus.c \ - arbvpwarpmesh.c \ - blendminmax.c \ - blendsquare.c \ - bufferobj.c \ - bug_3101.c \ - bug_3195.c \ - crossbar.c \ - cva.c \ - dinoshade.c \ - floattex.c \ - fbotest1.c \ - fbotexture.c \ - fogcoord.c \ - fptest1.c \ - fptexture.c \ - getprocaddress.c \ - invert.c \ - manytex.c \ - multipal.c \ - no_s3tc.c \ - packedpixels.c \ - pbo.c \ - projtex.c \ - seccolor.c \ - sharedtex.c \ - stencilwrap.c \ - stencil_wrap.c \ - tex1d.c \ - texline.c \ - texobjshare.c \ - texrect.c \ - texwrap.c \ - vparray.c \ - vptest1.c \ - vptest2.c \ - vptest3.c \ - vptorus.c \ - vpwarpmesh.c \ - yuvrect.c \ - yuvsquare.c \ - zreaddraw.c - -PROGS = $(SOURCES:%.c=%) - -INCLUDES = -I. -I$(TOP)/include - -UTIL_FILES = readtex.h readtex.c - - -##### RULES ##### - -.SUFFIXES: -.SUFFIXES: .c - -.c: - $(CC) $(INCLUDES) $(CFLAGS) $< $(LIBS) -o $@ - -.c.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ - -.S.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ - - -##### TARGETS ##### - -default: $(UTIL_FILES) $(PROGS) - -clean: - rm -f $(PROGS) - rm -f *.o - rm -f getproclist.h - - -# auto code generation -getprocaddress: getprocaddress.c getproclist.h - -getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py - python getprocaddress.py > getproclist.h - - -texrect: texrect.o readtex.o - $(CC) texrect.o readtex.o $(LIBS) -o $@ - -texrect.o: texrect.c readtex.h - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ - -bug_3195: bug_3195.o readtex.o - $(CC) $(CFLAGS) bug_3195.o readtex.o $(LIBS) -o $@ - -bug_3195.o: bug_3195.c readtex.h - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ - -invert: invert.o readtex.o - $(CC) invert.o readtex.o $(LIBS) -o $@ - -invert.o: invert.c readtex.h - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ - -readtex.o: readtex.c - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ - - -readtex.h: $(TOP)/progs/util/readtex.h - ln -s $(TOP)/progs/util/readtex.h . - -readtex.c: $(TOP)/progs/util/readtex.c - ln -s $(TOP)/progs/util/readtex.c . - - - - -# Emacs tags -tags: - etags `find . -name \*.[ch]` `find ../include` diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/Makefile.win b/nx-X11/extras/Mesa_6.4.2/progs/tests/Makefile.win deleted file mode 100644 index 0de6c42e39..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/Makefile.win +++ /dev/null @@ -1,44 +0,0 @@ -# $Id: Makefile.win,v 1.1 2002/01/16 01:03:25 kschultz Exp $ - -# Mesa 3-D graphics library -# Version: 3.5 -# Copyright (C) 1995-2001 Brian Paul - -# Makefile for GLUT-based demo programs for Windows - -!include - -##### MACROS ##### - -TOP = .. -INCDIR = ..\include -LIBDIR = ..\lib - -SRCS = cva.c \ - dinoshade.c \ - fogcoord.c \ - manytex.c \ - multipal.c \ - projtex.c \ - seccolor.c \ -# sharedtex.c \ - texline.c \ - texwrap.c \ - vptest1.c \ - vptest2.c \ - vptest3.c \ - vptorus.c \ - vpwarpmesh.c - -!include "../mesawin32.mak" - -##### TARGETS ##### - -clean:: - -clobber:: - @del readtex.c readtex.h - -$(EXES) :$*.obj - @echo $@ - $(link) -out:$@ $* /LIBPATH:$(LIBDIR) $(LIBS) diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/antialias.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/antialias.c deleted file mode 100644 index 79b5ab75c5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/antialias.c +++ /dev/null @@ -1,229 +0,0 @@ -/* $Id: antialias.c,v 1.2 2003/03/29 16:42:57 brianp Exp $ */ - -/* - * Test multisampling and polygon smoothing. - * - * Brian Paul - * 4 November 2002 - */ - -#include -#include -#include -#include - - -static GLfloat Zrot = 0; -static GLboolean Anim = GL_TRUE; -static GLboolean HaveMultisample = GL_TRUE; - - -static void -PrintString(const char *s) -{ - while (*s) { - glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s); - s++; - } -} - - -static void -Polygon( GLint verts, GLfloat radius, GLfloat z ) -{ - int i; - for (i = 0; i < verts; i++) { - float a = (i * 2.0 * 3.14159) / verts; - float x = radius * cos(a); - float y = radius * sin(a); - glVertex3f(x, y, z); - } -} - - -static void -DrawObject( void ) -{ - glLineWidth(3.0); - glColor3f(1, 1, 1); - glBegin(GL_LINE_LOOP); - Polygon(12, 1.2, 0); - glEnd(); - - glLineWidth(1.0); - glColor3f(1, 1, 1); - glBegin(GL_LINE_LOOP); - Polygon(12, 1.1, 0); - glEnd(); - - glColor3f(1, 0, 0); - glBegin(GL_POLYGON); - Polygon(12, 0.4, 0.3); - glEnd(); - - glColor3f(0, 1, 0); - glBegin(GL_POLYGON); - Polygon(12, 0.6, 0.2); - glEnd(); - - glColor3f(0, 0, 1); - glBegin(GL_POLYGON); - Polygon(12, 0.8, 0.1); - glEnd(); - - glColor3f(1, 1, 1); - glBegin(GL_POLYGON); - Polygon(12, 1.0, 0); - glEnd(); -} - - -static void -Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glColor3f(1, 1, 1); - if (HaveMultisample) { - glRasterPos2f(-3.1, -1.6); - PrintString("MULTISAMPLE"); - } - glRasterPos2f(-0.8, -1.6); - PrintString("No antialiasing"); - glRasterPos2f(1.6, -1.6); - PrintString("GL_POLYGON_SMOOTH"); - - /* multisample */ - if (HaveMultisample) { - glEnable(GL_DEPTH_TEST); - glEnable(GL_MULTISAMPLE_ARB); - glPushMatrix(); - glTranslatef(-2.5, 0, 0); - glPushMatrix(); - glRotatef(Zrot, 0, 0, 1); - DrawObject(); - glPopMatrix(); - glPopMatrix(); - glDisable(GL_MULTISAMPLE_ARB); - glDisable(GL_DEPTH_TEST); - } - - /* non-aa */ - glEnable(GL_DEPTH_TEST); - glPushMatrix(); - glTranslatef(0, 0, 0); - glPushMatrix(); - glRotatef(Zrot, 0, 0, 1); - DrawObject(); - glPopMatrix(); - glPopMatrix(); - glDisable(GL_DEPTH_TEST); - - /* polygon smooth */ - glEnable(GL_POLYGON_SMOOTH); - glEnable(GL_LINE_SMOOTH); - glEnable(GL_BLEND); - glPushMatrix(); - glTranslatef(2.5, 0, 0); - glPushMatrix(); - glRotatef(Zrot, 0, 0, 1); - DrawObject(); - glPopMatrix(); - glPopMatrix(); - glDisable(GL_LINE_SMOOTH); - glDisable(GL_POLYGON_SMOOTH); - glDisable(GL_BLEND); - - glutSwapBuffers(); -} - - -static void -Reshape( int width, int height ) -{ - GLfloat ar = (float) width / (float) height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho(-2.0*ar, 2.0*ar, -2.0, 2.0, -1.0, 1.0); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); -} - - -static void -Idle( void ) -{ - Zrot = 0.01 * glutGet(GLUT_ELAPSED_TIME); - glutPostRedisplay(); -} - - -static void -Key( unsigned char key, int x, int y ) -{ - const GLfloat step = 1.0; - (void) x; - (void) y; - switch (key) { - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 'z': - Zrot = (int) (Zrot - step); - break; - case 'Z': - Zrot = (int) (Zrot + step); - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void -Init( void ) -{ - /* GLUT imposes the four samples/pixel requirement */ - int s; - glGetIntegerv(GL_SAMPLES_ARB, &s); - if (!glutExtensionSupported("GL_ARB_multisample") || s < 1) { - printf("Warning: multisample antialiasing not supported.\n"); - HaveMultisample = GL_FALSE; - } - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_SAMPLES_ARB = %d\n", s); - - glBlendFunc(GL_SRC_ALPHA, GL_ONE); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glBlendFunc(GL_SRC_ALPHA_SATURATE, GL_ONE); - - glGetIntegerv(GL_MULTISAMPLE_ARB, &s); - printf("GL_MULTISAMPLE_ARB = %d\n", s); -} - - -int -main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 600, 300 ); - glutInitDisplayMode( GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE | - GLUT_DEPTH | GLUT_MULTISAMPLE ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - if (Anim) - glutIdleFunc( Idle ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/api_speed.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/api_speed.c deleted file mode 100644 index aed65b35fe..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/api_speed.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2002 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file api_speed.c - * Simple test to measure the overhead of making GL calls. - * - * The main purpose of this test is to measure the difference in calling - * overhead of different dispatch methods. Since it uses asm/timex.h to - * access the Pentium's cycle counters, it will probably only compile on - * Linux (though most architectures have a get_cycles function in timex.h). - * That is why it isn't in the default Makefile. - * - * \author Ian Romanick - */ - -#include -#include -#define GL_GLEXT_PROTOTYPES -#include -#include -#include - -#define inline __inline__ -#include - -static float Width = 400; -static float Height = 400; -static unsigned count = 1000000; - - -static void Idle( void ) -{ - glutPostRedisplay(); -} - -#define DO_FUNC(f,p) \ - do { \ - t0 = get_cycles(); \ - for ( i = 0 ; i < count ; i++ ) { \ - f p ; \ - } \ - t1 = get_cycles(); \ - printf("%u calls to % 20s required %llu cycles.\n", count, # f, t1 - t0); \ - } while( 0 ) - -/** - * Main display function. This is the place to add more API calls. - */ -static void Display( void ) -{ - int i; - const float v[3] = { 1.0, 0.0, 0.0 }; - cycles_t t0; - cycles_t t1; - - glBegin(GL_TRIANGLE_STRIP); - - DO_FUNC( glColor3fv, (v) ); - DO_FUNC( glNormal3fv, (v) ); - DO_FUNC( glTexCoord2fv, (v) ); - DO_FUNC( glTexCoord3fv, (v) ); - DO_FUNC( glMultiTexCoord2fv, (GL_TEXTURE0, v) ); - DO_FUNC( glMultiTexCoord2f, (GL_TEXTURE0, 0.0, 0.0) ); - DO_FUNC( glFogCoordfvEXT, (v) ); - DO_FUNC( glFogCoordfEXT, (0.5) ); - - glEnd(); - - exit(0); -} - - -static void Reshape( int width, int height ) -{ - Width = width; - Height = height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho(0.0, width, 0.0, height, -1.0, 1.0); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowSize( (int) Width, (int) Height ); - glutInitWindowPosition( 0, 0 ); - - glutInitDisplayMode( GLUT_RGB ); - - glutCreateWindow( argv[0] ); - - if ( argc > 1 ) { - count = strtoul( argv[1], NULL, 0 ); - if ( count == 0 ) { - fprintf( stderr, "Usage: %s [iterations]\n", argv[0] ); - exit(1); - } - } - - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - glutIdleFunc( Idle ); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/api_speed.py b/nx-X11/extras/Mesa_6.4.2/progs/tests/api_speed.py deleted file mode 100755 index 0ddaf5836c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/api_speed.py +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/env python2 - -# (C) Copyright IBM Corporation 2004 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - - -# This script is used to run api_speed against several different libGL -# libraries and compare the results. See the show_usage function for more -# details on how to use it. - - -import re, os, sys, getopt - -class results: - def process_file(self, f): - self.cycles = {} - self.iterations = -1 - - for line in f.readlines(): - m = re.match("(\d+) calls to (.{20}) required (\d+) cycles.", line) - - if self.iterations != -1 and int(m.group(1)) != self.iterations: - raise - - # This could be done with lstrip, but the version of - # the Python library on my system doesn't have it. - # The installed version of Python is quite old. :( - - temp = m.group(2) - function_name = None - for i in range(len(temp)): - if temp[i] != ' ': - function_name = temp[i:] - break - - if function_name == None: - raise - - self.cycles[ function_name ] = int(m.group(3)) - self.iterations = int(m.group(1)) - - - def show_results(self): - for name in self.cycles: - print "%s -> %f" % (name, float(self.cycles[name]) / self.iterations) - - - def compare_results(self, other): - for name in self.cycles: - if other.cycles.has_key(name): - a = float(self.cycles[name]) / float(self.iterations) - b = float(other.cycles[name]) / float(other.iterations) - if abs( a ) < 0.000001: - print "a = %f, b = %f" % (a, b) - else: - p = (100.0 * b / a) - 100.0 - print "%- 20s %7.2f - %7.2f = % -6.2f (%+.1f%%)" % (name, a, b, a - b, p) - return - - -def make_execution_string(lib, iterations): - if lib == None: - return "./api_speed %u" % (iterations) - else: - return "LD_PRELOAD=%s ./api_speed %u" % (lib, iterations) - - -def show_usage(): - print """Usage: %s [-i iterations] {library ...} - -The full path to one or more libGL libraries (including the full name of the -library) can be included on the command-line. Each library will be tested, -and the results compared. The first library listed will be used as the -"base line" for all comparisons.""" % (sys.argv[0]) - sys.exit(1) - - -if __name__ == '__main__': - try: - (args, trail) = getopt.getopt(sys.argv[1:], "i:") - except Exception,e: - show_usage() - - iterations = 1000000 - try: - for (arg,val) in args: - if arg == "-i": - iterations = int(val) - except Exception,e: - show_usage() - - - # If no libraries were specifically named, just run the test against - # the default system libGL. - - if len(trail) == 0: - trail.append(None) - - - result_array = [] - names = [] - - for lib in trail: - s = make_execution_string( lib, iterations ) - r = results() - r.process_file( os.popen(s) ) - names.append(lib) - result_array.append(r) - - - # If the test was only run against one library, just show the results - # of the test run. Otherwise, compare each successive run against - # the first run. - - if len( result_array ) == 1: - result_array[0].show_results() - else: - for i in range(1, len( result_array )): - print "%s vs. %s" % (names[0], names[i]) - result_array[0].compare_results( result_array[i] ) - print "" diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbfpspec.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/arbfpspec.c deleted file mode 100644 index 73c55369ec..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbfpspec.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - * To demo that specular color gets lost someplace after vertex - * program completion and fragment program startup - */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -static float Xrot = 0.0, Yrot = 0.0, Zrot = 0.0; -static GLboolean Anim = GL_TRUE; - - -static void Idle( void ) -{ - Xrot += .3; - Yrot += .4; - Zrot += .2; - glutPostRedisplay(); -} - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - glRotatef(Zrot, 0, 0, 1); - glutSolidTorus(0.75, 2.0, 10, 20); - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -2.0, 2.0, -2.0, 2.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -12.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case ' ': - Xrot = Yrot = Zrot = 0; - break; - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 'z': - Zrot -= 5.0; - break; - case 'Z': - Zrot += 5.0; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - Xrot -= step; - break; - case GLUT_KEY_DOWN: - Xrot += step; - break; - case GLUT_KEY_LEFT: - Yrot -= step; - break; - case GLUT_KEY_RIGHT: - Yrot += step; - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - GLint errno; - GLuint prognum, fprognum; - - static const char prog[] = - "!!ARBvp1.0\n" - "DP4 result.position.x, state.matrix.mvp.row[0], vertex.position ;\n" - "DP4 result.position.y, state.matrix.mvp.row[1], vertex.position ;\n" - "DP4 result.position.z, state.matrix.mvp.row[2], vertex.position ;\n" - "DP4 result.position.w, state.matrix.mvp.row[3], vertex.position ;\n" - "MOV result.color.front.primary, {.5, .5, .5, 1};\n" - "MOV result.color.front.secondary, {1, 1, 1, 1};\n" - "END"; - - static const char fprog[] = - "!!ARBfp1.0\n" - "MOV result.color, fragment.color.secondary;\n" - "END"; - - if (!glutExtensionSupported("GL_ARB_vertex_program")) { - printf("Sorry, this program requires GL_ARB_vertex_program"); - exit(1); - } - - if (!glutExtensionSupported("GL_ARB_fragment_program")) { - printf("Sorry, this program requires GL_ARB_fragment_program"); - exit(1); - } - - - - glGenProgramsARB(1, &prognum); - glGenProgramsARB(1, &fprognum); - - glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum); - glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(prog), (const GLubyte *) prog); - - assert(glIsProgramARB(prognum)); - errno = glGetError(); - printf("glGetError = %d\n", errno); - if (errno != GL_NO_ERROR) - { - GLint errorpos; - - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos); - printf("errorpos: %d\n", errorpos); - printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)); - } - - glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, fprognum); - glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(fprog), (const GLubyte *) fprog); - errno = glGetError(); - printf("glGetError = %d\n", errno); - if (errno != GL_NO_ERROR) - { - GLint errorpos; - - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos); - printf("errorpos: %d\n", errorpos); - printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)); - } - - glEnable(GL_VERTEX_PROGRAM_ARB); - glEnable(GL_FRAGMENT_PROGRAM_ARB); - glEnable(GL_DEPTH_TEST); - glClearColor(0.3, 0.3, 0.3, 1); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 250, 250 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - if (Anim) - glutIdleFunc(Idle); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbfptest1.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/arbfptest1.c deleted file mode 100644 index 45d05125b2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbfptest1.c +++ /dev/null @@ -1,210 +0,0 @@ -/* Test GL_ARB_fragment_program */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - - glColor4f(0, 0.5, 0, 1); - glColor4f(0, 1, 0, 1); - glBegin(GL_POLYGON); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 0, 1); - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - -static void load_program(const char *prog, GLuint prognum) -{ - int a; - GLint errorpos, errno; - - glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, prognum); - glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(prog), (const GLubyte *) prog); - - assert(glIsProgramARB(prognum)); - errno = glGetError(); - printf("glGetError = %d\n", errno); - if (errno != GL_NO_ERROR) - { - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos); - printf("errorpos: %d\n", errorpos); - printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)); - - for (a=-10; a<10; a++) - { - if ((errorpos+a < 0) || (errorpos+a >= strlen(prog))) continue; - printf("%c", prog[errorpos+a]); - } - printf("\n"); - exit(1); - } -} - -static void Init( void ) -{ - static const char *prog0 = - "!!ARBfp1.0\n" - "TEMP R0, RC, HC, H0, H1, H2, H3, H30 ;\n" - "MUL result.color, R0, fragment.position; \n" - "ADD result.color, H3, fragment.texcoord; \n" - "ADD_SAT result.color, H3, fragment.texcoord; \n" - "MUL result.color.xy, R0.wzyx, fragment.position; \n" - "MUL result.color, H0, fragment.position; \n" - "MUL result.color, -H0, fragment.position; \n" - "MOV RC, H1; \n" - "MOV HC, H2; \n" - "END \n" - ; - /* masked updates, defines, declarations */ - static const char *prog1 = - "!!ARBfp1.0\n" - "PARAM foo = {1., 2., 3., 4.}; \n" - "PARAM foo2 = 5.; \n" - "PARAM foo3 = {5., 6., 7., 8.}; \n" - "PARAM bar = 3.; \n" - "TEMP R0, R1, RC, EQ, NE, bar2; \n" - "ALIAS bar3 = bar; \n" - "MOV result.color.xy, R0; \n" - "MOV result.color, R0; \n" - "MOV result.color.xyzw, R0; \n" - "MOV result.color.xy, R0; \n" - "MOV RC.x, R1.x; \n" - "KIL NE; \n" - "KIL EQ.xyxy; \n" - "END \n" - ; - - /* texture instructions */ - static const char *prog2 = - "!!ARBfp1.0\n" - "TEMP R0, R1, R2, R3;\n" - "TEX R0, fragment.texcoord, texture[1], 2D; \n" - "TEX R1, fragment.texcoord[1], texture[1], CUBE; \n" - "TEX R2, fragment.texcoord[2], texture[2], 3D; \n" - "TXP R3, fragment.texcoord[3], texture[3], RECT; \n" - "MUL result.color, R0, fragment.color; \n" - "END \n" - ; - - /* test negation, absolute value */ - static const char *prog3 = - "!!ARBfp1.0\n" - "TEMP R0, R1;\n" - "MOV R0, R1; \n" - "MOV R0, -R1; \n" - "MOV result.color, R0; \n" - "END \n" - ; - - /* literal constant sources */ - static const char *prog4 = - "!!ARBfp1.0\n" - "TEMP R0, R1;\n" - "PARAM Pi = 3.14159; \n" - "MOV R0, {1., -2., +3., 4.}; \n" - "MOV R0, 5.; \n" - "MOV R0, -5.; \n" - "MOV R0, 5.; \n" - "MOV R0, Pi; \n" - "MOV result.color, R0; \n" - "END \n" - ; - - /* change the fragment color in a simple way */ - static const char *prog10 = - "!!ARBfp1.0\n" - "PARAM blue = {0., 0., 1., 0.};\n" - "PARAM color = {1., 0., 0., 1.};\n" - "TEMP R0; \n" - "MOV R0, fragment.color; \n" - "#ADD result.color, R0, fragment.color; \n" - "#ADD result.color, blue, fragment.color; \n" - "#ADD result.color, {1., 0., 0., 0.}, fragment.color; \n" - "ADD result.color, color, fragment.color; \n" - "END \n" - ; - - GLuint progs[20]; - - glGenProgramsARB(20, progs); - assert(progs[0]); - assert(progs[1]); - assert(progs[0] != progs[1]); - - - printf("program 0:\n"); - load_program(prog0, progs[0]); - printf("program 1:\n"); - load_program(prog1, progs[1]); - printf("program 2:\n"); - load_program(prog2, progs[2]); - printf("program 3:\n"); - load_program(prog3, progs[3]); - printf("program 4:\n"); - load_program(prog4, progs[4]); - printf("program 10:\n"); - load_program(prog10, progs[5]); - - - glEnable(GL_FRAGMENT_PROGRAM_ARB); - glEnable(GL_ALPHA_TEST); - glAlphaFunc(GL_ALWAYS, 0.0); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 250, 250 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbfptexture.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/arbfptexture.c deleted file mode 100644 index a854908c31..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbfptexture.c +++ /dev/null @@ -1,153 +0,0 @@ -/* GL_ARB_fragment_program texture test */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -#include "readtex.c" - - -#define TEXTURE_FILE "../images/girl.rgb" - -static GLfloat Xrot = 0.0, Yrot = 0.0, Zrot = 0.0; - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - - glBegin(GL_POLYGON); -#define Q 2 - glColor4f(1.0, 1.0, 1.0, 1); glTexCoord4f(0, 0, 0, Q); glVertex2f(-1, -1); - glColor4f(0.2, 0.2, 1.0, 1); glTexCoord4f(1, 0, 0, Q); glVertex2f( 1, -1); - glColor4f(0.2, 1.0, 0.2, 1); glTexCoord4f(1, 1, 0, Q); glVertex2f( 1, 1); - glColor4f(1.0, 0.2, 0.2, 1); glTexCoord4f(0, 1, 0, Q); glVertex2f(-1, 1); - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -8.0 ); -} - - -static void SpecialKey( int key, int x, int y ) -{ - float step = 3.0; - (void) x; - (void) y; - - switch (key) { - case GLUT_KEY_UP: - Xrot += step; - break; - case GLUT_KEY_DOWN: - Xrot -= step; - break; - case GLUT_KEY_LEFT: - Yrot += step; - break; - case GLUT_KEY_RIGHT: - Yrot -= step; - break; - } - glutPostRedisplay(); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - static const char *modulate2D = - "!!ARBfp1.0\n" - "TEMP R0;\n" - "TEX R0, fragment.texcoord[0], texture[0], 2D; \n" - "MUL result.color, R0, fragment.color; \n" - "END" - ; - GLuint modulateProg; - GLuint Texture; - - if (!glutExtensionSupported("GL_ARB_fragment_program")) { - printf("Error: GL_ARB_fragment_program not supported!\n"); - exit(1); - } - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - - /* Setup the fragment program */ - glGenProgramsARB(1, &modulateProg); - glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg); - glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(modulate2D), (const GLubyte *)modulate2D); - - printf("glGetError = 0x%x\n", (int) glGetError()); - printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n", - (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB)); - assert(glIsProgramARB(modulateProg)); - - glEnable(GL_FRAGMENT_PROGRAM_ARB); - - /* Load texture */ - glGenTextures(1, &Texture); - glBindTexture(GL_TEXTURE_2D, Texture); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) { - printf("Error: couldn't load texture image file %s\n", TEXTURE_FILE); - exit(1); - } - /* XXX this enable shouldn't really be needed!!! */ - glEnable(GL_TEXTURE_2D); - - glClearColor(.3, .3, .3, 0); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 250, 250 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbfptrig.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/arbfptrig.c deleted file mode 100644 index 26b68c6b41..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbfptrig.c +++ /dev/null @@ -1,156 +0,0 @@ -/* GL_ARB_fragment_program texture test */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -#include "readtex.c" - - -#define TEXTURE_FILE "../images/girl.rgb" - -static GLfloat Xrot = 0.0, Yrot = 0.0, Zrot = 0.0; - -#define PI 3.141592 - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - - glBegin(GL_POLYGON); - glTexCoord2f(-PI, 0); glVertex2f(-1, -1); - glTexCoord2f(PI, 0); glVertex2f( 1, -1); - glTexCoord2f(PI, 1); glVertex2f( 1, 1); - glTexCoord2f(-PI, 1); glVertex2f(-1, 1); - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -8.0 ); -} - - -static void SpecialKey( int key, int x, int y ) -{ - float step = 3.0; - (void) x; - (void) y; - - switch (key) { - case GLUT_KEY_UP: - Xrot += step; - break; - case GLUT_KEY_DOWN: - Xrot -= step; - break; - case GLUT_KEY_LEFT: - Yrot += step; - break; - case GLUT_KEY_RIGHT: - Yrot -= step; - break; - } - glutPostRedisplay(); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - static const char *modulate2D = - "!!ARBfp1.0\n" - "TEMP R0;\n" - "MOV R0, {0,0,0,1};\n" - "SCS R0, fragment.texcoord[0].x; \n" - "ADD R0, R0, {1.0}.x;\n" - "MUL R0, R0, {0.5}.x;\n" - "MOV result.color, R0; \n" - "END" - ; - GLuint modulateProg; - GLuint Texture; - - if (!glutExtensionSupported("GL_ARB_fragment_program")) { - printf("Error: GL_ARB_fragment_program not supported!\n"); - exit(1); - } - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - - /* Setup the fragment program */ - glGenProgramsARB(1, &modulateProg); - glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg); - glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(modulate2D), (const GLubyte *)modulate2D); - - printf("glGetError = 0x%x\n", (int) glGetError()); - printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n", - (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB)); - assert(glIsProgramARB(modulateProg)); - - glEnable(GL_FRAGMENT_PROGRAM_ARB); - - /* Load texture */ - glGenTextures(1, &Texture); - glBindTexture(GL_TEXTURE_2D, Texture); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) { - printf("Error: couldn't load texture image file %s\n", TEXTURE_FILE); - exit(1); - } - /* XXX this enable shouldn't really be needed!!! */ - glEnable(GL_TEXTURE_2D); - - glClearColor(.3, .3, .3, 0); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 250, 250 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbnpot.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/arbnpot.c deleted file mode 100644 index 8107717e27..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbnpot.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Test NPOT textures with the GL_ARB_texture_non_power_of_two extension. - * Brian Paul - * 2 July 2003 - */ - -#include -#include -#include -#include -#include -#include "../util/readtex.c" - -#define IMAGE_FILE "../images/girl.rgb" - -static GLfloat Zrot = 0; - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Zrot, 0, 0, 1); - glBegin(GL_POLYGON); - glTexCoord2f(0, 0); - glVertex2f(-1, -1); - glTexCoord2f(1, 0); - glVertex2f(1, -1); - glTexCoord2f(1, 1); - glVertex2f(1, 1); - glTexCoord2f(0, 1); - glVertex2f(-1, 1); - glEnd(); - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -7.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 'z': - Zrot -= 1.0; - break; - case 'Z': - Zrot += 1.0; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - GLubyte *image; - int imgWidth, imgHeight, minDim, w; - GLenum imgFormat; - - if (!glutExtensionSupported("GL_ARB_texture_non_power_of_two")) { - printf("Sorry, this program requires GL_ARB_texture_non_power_of_two\n"); - exit(1); - } - -#if 1 - image = LoadRGBImage( IMAGE_FILE, &imgWidth, &imgHeight, &imgFormat ); - if (!image) { - printf("Couldn't read %s\n", IMAGE_FILE); - exit(0); - } -#else - int i, j; - imgFormat = GL_RGB; - imgWidth = 3; - imgHeight = 3; - image = malloc(imgWidth * imgHeight * 3); - for (i = 0; i < imgHeight; i++) { - for (j = 0; j < imgWidth; j++) { - int k = (i * imgWidth + j) * 3; - if ((i + j) & 1) { - image[k+0] = 255; - image[k+1] = 0; - image[k+2] = 0; - } - else { - image[k+0] = 0; - image[k+1] = 255; - image[k+2] = 0; - } - } - } -#endif - - printf("Read %d x %d\n", imgWidth, imgHeight); - - minDim = imgWidth < imgHeight ? imgWidth : imgHeight; - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glTexImage1D(GL_TEXTURE_1D, 0, GL_RGB, imgWidth, 0, - imgFormat, GL_UNSIGNED_BYTE, image); - assert(glGetError() == GL_NO_ERROR); - - glTexImage1D(GL_PROXY_TEXTURE_1D, 0, GL_RGB, imgWidth, 0, - imgFormat, GL_UNSIGNED_BYTE, image); - glGetTexLevelParameteriv(GL_PROXY_TEXTURE_1D, 0, GL_TEXTURE_WIDTH, &w); - assert(w == imgWidth); - - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, imgWidth, imgHeight, 0, - imgFormat, GL_UNSIGNED_BYTE, image); - assert(glGetError() == GL_NO_ERROR); - - glTexImage2D(GL_PROXY_TEXTURE_2D, 0, GL_RGB, imgWidth, imgHeight, 0, - imgFormat, GL_UNSIGNED_BYTE, image); - glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &w); - assert(w == imgWidth); - - glTexImage3D(GL_TEXTURE_3D, 0, GL_RGB, imgWidth, imgHeight, 1, 0, - imgFormat, GL_UNSIGNED_BYTE, image); - assert(glGetError() == GL_NO_ERROR); - - glTexImage3D(GL_PROXY_TEXTURE_3D, 0, GL_RGB, imgWidth, imgHeight, 1, 0, - imgFormat, GL_UNSIGNED_BYTE, image); - glGetTexLevelParameteriv(GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_WIDTH, &w); - assert(w == imgWidth); - - glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_RGB, - minDim, minDim, 0, - imgFormat, GL_UNSIGNED_BYTE, image); - assert(glGetError() == GL_NO_ERROR); - - glTexImage2D(GL_PROXY_TEXTURE_CUBE_MAP, 0, GL_RGB, - minDim, minDim, 0, - imgFormat, GL_UNSIGNED_BYTE, image); - glGetTexLevelParameteriv(GL_PROXY_TEXTURE_CUBE_MAP, 0, GL_TEXTURE_WIDTH, &w); - assert(w == minDim); - - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glEnable(GL_TEXTURE_2D); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 400, 400 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbvptest1.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/arbvptest1.c deleted file mode 100644 index 5c462c42c7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbvptest1.c +++ /dev/null @@ -1,164 +0,0 @@ -/* Test glGenProgramsNV(), glIsProgramNV(), glLoadProgramNV() */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - - glBegin(GL_POLYGON); - glVertexAttrib2fNV(0, -1, -1); - glVertexAttrib2fNV(0, 1, -1); - glVertexAttrib2fNV(0, 0, 1); - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - -static void load_program(const char *prog, GLuint prognum) -{ - int a; - GLint errorpos, errno; - - glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum); - glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(prog), (const GLubyte *) prog); - - assert(glIsProgramARB(prognum)); - errno = glGetError(); - printf("glGetError = %d\n", errno); - if (errno != GL_NO_ERROR) - { - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos); - printf("errorpos: %d\n", errorpos); - printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)); - - for (a=-10; a<10; a++) - { - if ((errorpos+a < 0) || (errorpos+a >= strlen(prog))) continue; - printf("%c", prog[errorpos+a]); - } - printf("\n"); - exit(1); - } -} - -static void Init( void ) -{ - GLuint prognum[4]; - - static const char *prog1 = - "!!ARBvp1.0\n" - "TEMP R0;\n" - "MUL result.color.primary.xyz, R0, program.local[35]; \n" - "END\n"; - static const char *prog2 = - "!!ARBvp1.0\n" - "#\n" - "# c[0-3] = modelview projection (composite) matrix\n" - "# c[32] = normalized light direction in object-space\n" - "# c[35] = yellow diffuse material, (1.0, 1.0, 0.0, 1.0)\n" - "# c[64].x = 0.0\n" - "# c[64].z = 0.125, a scaling factor\n" - "TEMP R0, R1;\n" - "#\n" - "# outputs diffuse illumination for color and perturbed position\n" - "#\n" - "DP3 R0, program.local[32], vertex.normal; # light direction DOT normal\n" - "MUL result.color.primary.xyz, R0, program.local[35]; \n" - "MAX R0, program.local[64].x, R0; \n" - "MUL R0, R0, vertex.normal; \n" - "MUL R0, R0, program.local[64].z; \n" - "ADD R1, vertex.position, -R0; # perturb object space position\n" - "DP4 result.position.x, state.matrix.mvp.row[3], R1; \n" - "DP4 result.position.y, state.matrix.mvp.row[1], R1; \n" - "DP4 result.position.z, state.matrix.mvp.row[2], R1; \n" - "DP4 result.position.w, state.matrix.mvp.row[3], R1; \n" - "END\n"; - static const char *prog3 = - "!!ARBvp1.0\n" - "TEMP R0, R1, R2, R3;\n" - "DP4 result.position.x, state.matrix.mvp.row[0], vertex.position;\n" - "DP4 result.position.y, state.matrix.mvp.row[1], vertex.position;\n" - "DP4 result.position.z, state.matrix.mvp.row[2], vertex.position;\n" - "DP4 result.position.w, state.matrix.mvp.row[3], vertex.position;\n" - "DP3 R0.x, state.matrix.modelview.inverse.row[0], vertex.normal;\n" - "DP3 R0.y, state.matrix.modelview.inverse.row[1], vertex.normal;\n" - "DP3 R0.z, state.matrix.modelview.inverse.row[2], vertex.normal;\n" - "DP3 R1.x, program.env[32], R0; # R1.x = Lpos DOT n'\n" - "DP3 R1.y, program.env[33], R0; # R1.y = hHat DOT n'\n" - "MOV R1.w, program.local[38].x; # R1.w = specular power\n" - "LIT R2, R1; # Compute lighting values\n" - "MAD R3, program.env[35].x, R2.y, program.env[35].y; # diffuse + emissive\n" - "MAD result.color.primary.xyz, program.env[36], R2.z, R3; # + specular\n" - "END\n"; - static const char *prog4 = - "!!ARBvp1.0\n" - "TEMP R2, R3;\n" - "PARAM foo = {0., 0., 0., 1.};\n" - "PARAM blah[] = { program.local[0..8] };\n" - "ADDRESS A0;\n" - "ARL A0.x, foo.x;\n" - "DP4 R2, R3, blah[A0.x].x;\n" - "DP4 R2, R3, blah[A0.x + 5];\n" - "DP4 result.position, R3, blah[A0.x - 4];\n" - "END\n"; - - glGenProgramsNV(4, prognum); - - load_program(prog1, prognum[0]); - load_program(prog2, prognum[1]); - load_program(prog3, prognum[2]); - load_program(prog4, prognum[3]); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 250, 250 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbvptest3.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/arbvptest3.c deleted file mode 100644 index 5f6d4f7e99..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbvptest3.c +++ /dev/null @@ -1,128 +0,0 @@ -/* Test glGenProgramsNV(), glIsProgramNV(), glLoadProgramNV() */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -static float Zrot = 0.0; - - -static void Display( void ) -{ - glClearColor(0.3, 0.3, 0.3, 1); - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glEnable(GL_VERTEX_PROGRAM_NV); - - glLoadIdentity(); - glRotatef(Zrot, 0, 0, 1); - - glPushMatrix(); - - glVertexAttrib3fARB(3, 1, 0.5, 0.25); - glBegin(GL_TRIANGLES); -#if 1 - glVertexAttrib3fARB(3, 1.0, 0.0, 0.0); - glVertexAttrib2fARB(0, -0.5, -0.5); - glVertexAttrib3fARB(3, 0.0, 1.0, 0.0); - glVertexAttrib2fARB(0, 0.5, -0.5); - glVertexAttrib3fARB(3, 0.0, 0.0, 1.0); - glVertexAttrib2fARB(0, 0, 0.5); -#else - glVertex2f( -1, -1); - glVertex2f( 1, -1); - glVertex2f( 0, 1); -#endif - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - /* glFrustum( -2.0, 2.0, -2.0, 2.0, 5.0, 25.0 );*/ - glOrtho(-2.0, 2.0, -2.0, 2.0, -2.0, 2.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - /*glTranslatef( 0.0, 0.0, -15.0 );*/ -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 'z': - Zrot -= 5.0; - break; - case 'Z': - Zrot += 5.0; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - GLint errno; - GLuint prognum; - - static const char *prog1 = - "!!ARBvp1.0\n" - "MOV result.color, vertex.color;\n" - - "DP4 result.position.x, vertex.position, state.matrix.modelview.row[0];\n" - "DP4 result.position.y, vertex.position, state.matrix.modelview.row[1];\n" - "DP4 result.position.z, vertex.position, state.matrix.modelview.row[2];\n" - "DP4 result.position.w, vertex.position, state.matrix.modelview.row[3];\n" - "END\n"; - - glGenProgramsARB(1, &prognum); - - glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum); - glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(prog1), (const GLubyte *) prog1); - - assert(glIsProgramARB(prognum)); - errno = glGetError(); - printf("glGetError = %d\n", errno); - if (errno != GL_NO_ERROR) - { - GLint errorpos; - - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos); - printf("errorpos: %d\n", errorpos); - printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)); - } -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 250, 250 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbvptorus.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/arbvptorus.c deleted file mode 100644 index c1e2d0b76a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbvptorus.c +++ /dev/null @@ -1,191 +0,0 @@ -/* - * A lit, rotating torus via vertex program - */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -static float Xrot = 0.0, Yrot = 0.0, Zrot = 0.0; -static GLboolean Anim = GL_TRUE; - - -static void Idle( void ) -{ - Xrot += .3; - Yrot += .4; - Zrot += .2; - glutPostRedisplay(); -} - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - glRotatef(Zrot, 0, 0, 1); - glutSolidTorus(0.75, 2.0, 10, 20); - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -2.0, 2.0, -2.0, 2.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -12.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case ' ': - Xrot = Yrot = Zrot = 0; - break; - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 'z': - Zrot -= 5.0; - break; - case 'Z': - Zrot += 5.0; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - Xrot -= step; - break; - case GLUT_KEY_DOWN: - Xrot += step; - break; - case GLUT_KEY_LEFT: - Yrot -= step; - break; - case GLUT_KEY_RIGHT: - Yrot += step; - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - GLint errno; - GLuint prognum; - - /* borrowed from an nvidia demo: - * c[0..3] = modelview matrix - * c[4..7] = invtrans modelview matrix - * c[32] = light pos - * c[35] = diffuse color - */ - static const char prog[] = - "!!ARBvp1.0\n" - "TEMP R0, R1; \n" - "#Simple transform and diffuse lighting\n" - "# object x MVP -> clip\n" - "DP4 result.position.x, state.matrix.mvp.row[0], vertex.position ;\n" - "DP4 result.position.y, state.matrix.mvp.row[1], vertex.position ;\n" - "DP4 result.position.z, state.matrix.mvp.row[2], vertex.position ;\n" - "DP4 result.position.w, state.matrix.mvp.row[3], vertex.position ;\n" - - "# normal x MV-1T -> lighting normal\n" - "DP3 R1.x, state.matrix.modelview.invtrans.row[0], vertex.normal ;\n" - "DP3 R1.y, state.matrix.modelview.invtrans.row[1], vertex.normal;\n" - "DP3 R1.z, state.matrix.modelview.invtrans.row[2], vertex.normal;\n" - - "DP3 R0, program.local[32], R1; # L.N\n" -#if 0 - "MUL result.color.xyz, R0, program.local[35] ; # col = L.N * diffuse\n" -#else - "MUL result.color.primary.xyz, R0, program.local[35] ; # col = L.N * diffuse\n" -#endif - "MOV result.texcoord, vertex.texcoord;\n" - "END"; - - if (!glutExtensionSupported("GL_ARB_vertex_program")) { - printf("Sorry, this program requires GL_ARB_vertex_program"); - exit(1); - } - - - glGenProgramsARB(1, &prognum); - - glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum); - glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(prog), (const GLubyte *) prog); - - assert(glIsProgramARB(prognum)); - errno = glGetError(); - printf("glGetError = %d\n", errno); - if (errno != GL_NO_ERROR) - { - GLint errorpos; - - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos); - printf("errorpos: %d\n", errorpos); - printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)); - } - - /* Light position */ - glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 32, 2, 2, 4, 1); - /* Diffuse material color */ - glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 35, 0.25, 0, 0.25, 1); - - glEnable(GL_VERTEX_PROGRAM_ARB); - glEnable(GL_DEPTH_TEST); - glClearColor(0.3, 0.3, 0.3, 1); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 250, 250 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - if (Anim) - glutIdleFunc(Idle); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbvpwarpmesh.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/arbvpwarpmesh.c deleted file mode 100644 index a9e2564bc4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/arbvpwarpmesh.c +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Warp a triangle mesh with a vertex program. - */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -static float Xrot = -60.0, Yrot = 0.0, Zrot = 0.0; -static GLboolean Anim = GL_TRUE; -static GLfloat Phi = 0.0; - - -static void Idle( void ) -{ - Phi += 0.01; - glutPostRedisplay(); -} - - -static void DrawMesh( int rows, int cols ) -{ - static const GLfloat colorA[3] = { 0, 1, 0 }; - static const GLfloat colorB[3] = { 0, 0, 1 }; - const float dx = 2.0 / (cols - 1); - const float dy = 2.0 / (rows - 1); - float x, y; - int i, j; - -#if 1 -#define COLOR3FV(c) glVertexAttrib3fvARB(3, c) -#define VERTEX2F(x, y) glVertexAttrib2fARB(0, x, y) -#else -#define COLOR3FV(c) glColor3fv(c) -#define VERTEX2F(x, y) glVertex2f(x, y) -#endif - - y = -1.0; - for (i = 0; i < rows - 1; i++) { - glBegin(GL_QUAD_STRIP); - x = -1.0; - for (j = 0; j < cols; j++) { - if ((i + j) & 1) - COLOR3FV(colorA); - else - COLOR3FV(colorB); - VERTEX2F(x, y); - VERTEX2F(x, y + dy); - x += dx; - } - glEnd(); - y += dy; - } -} - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - glRotatef(Zrot, 0, 0, 1); - - /* Position the gravity source */ - { - GLfloat x, y, z, r = 0.5; - x = r * cos(Phi); - y = r * sin(Phi); - z = 1.0; - glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 30, x, y, z, 1); - glDisable(GL_VERTEX_PROGRAM_ARB); - glBegin(GL_POINTS); - glColor3f(1,1,1); - glVertex3f(x, y, z); - glEnd(); - } - - glEnable(GL_VERTEX_PROGRAM_ARB); - DrawMesh(8, 8); - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - float ar = (float) width / (float) height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0 * ar, 1.0 * ar, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -12.0 ); - glScalef(2, 2, 2); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 'p': - Phi += 0.2; - break; - case 'z': - Zrot -= 5.0; - break; - case 'Z': - Zrot += 5.0; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - Xrot -= step; - break; - case GLUT_KEY_DOWN: - Xrot += step; - break; - case GLUT_KEY_LEFT: - Yrot -= step; - break; - case GLUT_KEY_RIGHT: - Yrot += step; - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - GLuint prognum; - GLint errno; - - /* - * c[0..3] = modelview matrix - * c[4..7] = inverse modelview matrix - * c[30] = gravity source location - * c[31] = gravity source strength - * c[32] = light pos - * c[35] = diffuse color - */ - static const char prog[] = - "!!ARBvp1.0\n" - "TEMP R1, R2, R3; " - - "# Compute distance from vertex to gravity source\n" - "ADD R1, program.local[30], -vertex.position; # vector from vertex to gravity\n" - "DP3 R2, R1, R1; # dot product\n" - "RSQ R2, R2.x; # square root = distance\n" - "MUL R2, R2, program.local[31].xxxx; # scale by the gravity factor\n" - - "# Displace vertex by gravity factor along R1 vector\n" - "MAD R3, R1, R2, vertex.position;\n" - - "# Continue with typical modelview/projection\n" - "DP4 result.position.x, state.matrix.mvp.row[0], R3 ; # object x MVP -> clip\n" - "DP4 result.position.y, state.matrix.mvp.row[1], R3 ;\n" - "DP4 result.position.z, state.matrix.mvp.row[2], R3 ;\n" - "DP4 result.position.w, state.matrix.mvp.row[3], R3 ;\n" - - "MOV result.color, vertex.color;\n # copy input color to output color\n" - - "END"; - - if (!glutExtensionSupported("GL_ARB_vertex_program")) { - printf("Sorry, this program requires GL_ARB_vertex_program\n"); - exit(1); - } - - glGenProgramsARB(1, &prognum); - glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum); - glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(prog), (const GLubyte *)prog); - errno = glGetError(); - printf("glGetError = %d\n", errno); - - if (errno != GL_NO_ERROR) - { - GLint errorpos; - - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos); - printf("errorpos: %d\n", errorpos); - printf("%s\n", glGetString(GL_PROGRAM_ERROR_STRING_ARB)); - } - - /* Light position */ - glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 32, 2, 2, 4, 1); - /* Diffuse material color */ - glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 35, 0.25, 0, 0.25, 1); - - /* Gravity strength */ - glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 31, .5, 0, 0, 0); - - glEnable(GL_DEPTH_TEST); - glClearColor(0.3, 0.3, 0.3, 1); - glShadeModel(GL_FLAT); - glPointSize(3); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 250, 250 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - if (Anim) - glutIdleFunc(Idle); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/auxbuffer.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/auxbuffer.c deleted file mode 100644 index 70f0b73910..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/auxbuffer.c +++ /dev/null @@ -1,499 +0,0 @@ -/* - * Test AUX buffer rendering - * Use GLX since GLUT doesn't support AUX buffers - */ - - -/* - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This is a port of the infamous "gears" demo to straight GLX (i.e. no GLUT) - * Port by Brian Paul 23 March 2001 - * - * Command line options: - * -info print GL implementation information - * - */ - - -#include -#include -#include -#include -#include -#include -#include -#include - - -static int -current_time(void) -{ - return 0; -} - - - - -#ifndef M_PI -#define M_PI 3.14159265 -#endif - -static int WinWidth = 300, WinHeight = 300; -static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0; -static GLint gear1, gear2, gear3; -static GLfloat angle = 0.0; - - -/* - * - * Draw a gear wheel. You'll probably want to call this function when - * building a display list since we do a lot of trig here. - * - * Input: inner_radius - radius of hole at center - * outer_radius - radius at center of teeth - * width - width of gear - * teeth - number of teeth - * tooth_depth - depth of tooth - */ -static void -gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, - GLint teeth, GLfloat tooth_depth) -{ - GLint i; - GLfloat r0, r1, r2; - GLfloat angle, da; - GLfloat u, v, len; - - r0 = inner_radius; - r1 = outer_radius - tooth_depth / 2.0; - r2 = outer_radius + tooth_depth / 2.0; - - da = 2.0 * M_PI / teeth / 4.0; - - glShadeModel(GL_FLAT); - - glNormal3f(0.0, 0.0, 1.0); - - /* draw front face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - if (i < teeth) { - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - } - } - glEnd(); - - /* draw front sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - } - glEnd(); - - glNormal3f(0.0, 0.0, -1.0); - - /* draw back face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - if (i < teeth) { - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - } - } - glEnd(); - - /* draw back sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - -width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - } - glEnd(); - - /* draw outward faces of teeth */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - u = r2 * cos(angle + da) - r1 * cos(angle); - v = r2 * sin(angle + da) - r1 * sin(angle); - len = sqrt(u * u + v * v); - u /= len; - v /= len; - glNormal3f(v, -u, 0.0); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - -width * 0.5); - u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); - v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); - glNormal3f(v, -u, 0.0); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - } - - glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5); - glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5); - - glEnd(); - - glShadeModel(GL_SMOOTH); - - /* draw inside radius cylinder */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glNormal3f(-cos(angle), -sin(angle), 0.0); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - } - glEnd(); -} - - -static void -draw(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - glRotatef(view_rotx, 1.0, 0.0, 0.0); - glRotatef(view_roty, 0.0, 1.0, 0.0); - glRotatef(view_rotz, 0.0, 0.0, 1.0); - - glPushMatrix(); - glTranslatef(-3.0, -2.0, 0.0); - glRotatef(angle, 0.0, 0.0, 1.0); - glCallList(gear1); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(3.1, -2.0, 0.0); - glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0); - glCallList(gear2); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(-3.1, 4.2, 0.0); - glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0); - glCallList(gear3); - glPopMatrix(); - - glPopMatrix(); -} - - -/* new window size or exposure */ -static void -reshape(int width, int height) -{ - GLfloat h = (GLfloat) height / (GLfloat) width; - - WinWidth = width; - WinHeight = height; - glViewport(0, 0, (GLint) width, (GLint) height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -40.0); -} - - -static void -init(void) -{ - static GLfloat pos[4] = { 5.0, 5.0, 10.0, 0.0 }; - static GLfloat red[4] = { 0.8, 0.1, 0.0, 1.0 }; - static GLfloat green[4] = { 0.0, 0.8, 0.2, 1.0 }; - static GLfloat blue[4] = { 0.2, 0.2, 1.0, 1.0 }; - int i; - - glGetIntegerv(GL_AUX_BUFFERS, &i); - printf("AUX BUFFERS: %d\n", i); - - glLightfv(GL_LIGHT0, GL_POSITION, pos); - glEnable(GL_CULL_FACE); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - /* make the gears */ - gear1 = glGenLists(1); - glNewList(gear1, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); - gear(1.0, 4.0, 1.0, 20, 0.7); - glEndList(); - - gear2 = glGenLists(1); - glNewList(gear2, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); - gear(0.5, 2.0, 2.0, 10, 0.7); - glEndList(); - - gear3 = glGenLists(1); - glNewList(gear3, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); - gear(1.3, 2.0, 0.5, 10, 0.7); - glEndList(); - - glEnable(GL_NORMALIZE); -} - - -/* - * Create an RGB, double-buffered window. - * Return the window and context handles. - */ -static void -make_window( Display *dpy, const char *name, - int x, int y, int width, int height, - Window *winRet, GLXContext *ctxRet) -{ - int attrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - GLX_DEPTH_SIZE, 1, - GLX_AUX_BUFFERS, 1, - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - Window win; - GLXContext ctx; - XVisualInfo *visinfo; - - scrnum = DefaultScreen( dpy ); - root = RootWindow( dpy, scrnum ); - - visinfo = glXChooseVisual( dpy, scrnum, attrib ); - if (!visinfo) { - printf("Error: couldn't get an RGB, Double-buffered visual\n"); - exit(1); - } - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow( dpy, root, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr ); - - /* set hints and properties */ - { - XSizeHints sizehints; - sizehints.x = x; - sizehints.y = y; - sizehints.width = width; - sizehints.height = height; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win, &sizehints); - XSetStandardProperties(dpy, win, name, name, - None, (char **)NULL, 0, &sizehints); - } - - ctx = glXCreateContext( dpy, visinfo, NULL, True ); - if (!ctx) { - printf("Error: glXCreateContext failed\n"); - exit(1); - } - - XFree(visinfo); - - *winRet = win; - *ctxRet = ctx; -} - - -static void -event_loop(Display *dpy, Window win) -{ - while (1) { - while (XPending(dpy) > 0) { - XEvent event; - XNextEvent(dpy, &event); - switch (event.type) { - case Expose: - /* we'll redraw below */ - break; - case ConfigureNotify: - reshape(event.xconfigure.width, event.xconfigure.height); - break; - case KeyPress: - { - char buffer[10]; - int r, code; - code = XLookupKeysym(&event.xkey, 0); - if (code == XK_Left) { - view_roty += 5.0; - } - else if (code == XK_Right) { - view_roty -= 5.0; - } - else if (code == XK_Up) { - view_rotx += 5.0; - } - else if (code == XK_Down) { - view_rotx -= 5.0; - } - else { - r = XLookupString(&event.xkey, buffer, sizeof(buffer), - NULL, NULL); - if (buffer[0] == 27) { - /* escape */ - return; - } - } - } - } - } - - /* next frame */ - angle += 2.0; - - /* draw to aux buffer */ - glDrawBuffer(GL_AUX0); - - draw(); - - /* Copy aux buffer image to back color buffer */ - glReadBuffer(GL_AUX0); - glDrawBuffer(GL_BACK); - glWindowPos2iARB(0, 0); - glDisable(GL_DEPTH_TEST); - glCopyPixels(0, 0, WinWidth, WinHeight, GL_COLOR); - glEnable(GL_DEPTH_TEST); - - glXSwapBuffers(dpy, win); - - /* calc framerate */ - { - static int t0 = -1; - static int frames = 0; - int t = current_time(); - - if (t0 < 0) - t0 = t; - - frames++; - - if (t - t0 >= 5.0) { - GLfloat seconds = t - t0; - GLfloat fps = frames / seconds; - printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds, - fps); - t0 = t; - frames = 0; - } - } - } -} - - -int -main(int argc, char *argv[]) -{ - Display *dpy; - Window win; - GLXContext ctx; - char *dpyName = ":0"; - GLboolean printInfo = GL_FALSE; - int i; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-display") == 0) { - dpyName = argv[i+1]; - i++; - } - else if (strcmp(argv[i], "-info") == 0) { - printInfo = GL_TRUE; - } - } - - dpy = XOpenDisplay(dpyName); - if (!dpy) { - printf("Error: couldn't open display %s\n", dpyName); - return -1; - } - - make_window(dpy, "glxgears", 0, 0, WinWidth, WinHeight, &win, &ctx); - XMapWindow(dpy, win); - glXMakeCurrent(dpy, win, ctx); - - if (printInfo) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } - - init(); - - event_loop(dpy, win); - - glXDestroyContext(dpy, ctx); - XDestroyWindow(dpy, win); - XCloseDisplay(dpy); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/blendminmax.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/blendminmax.c deleted file mode 100644 index 2aab1a39d2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/blendminmax.c +++ /dev/null @@ -1,209 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file blendminmax.c - * - * Simple test of GL_EXT_blend_minmax functionality. Four squares are drawn - * with different blending modes, but all should be rendered with the same - * final color. - * - * \author Ian Romanick - */ - -#include -#include -#include - -static int Width = 400; -static int Height = 200; -static const GLfloat Near = 5.0, Far = 25.0; - - -static void Display( void ) -{ - glClearColor(0.2, 0.2, 0.8, 0); - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - - /* This is the "reference" square. - */ - - glTranslatef(-4.5, 0, 0); - glBlendEquation( GL_FUNC_ADD ); - glBlendFunc( GL_ONE, GL_ZERO ); - glBegin(GL_QUADS); - glColor3f( 0.5, 0.5, 0.5 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - - /* GL_MIN and GL_MAX are supposed to ignore the blend function setting. - * To test that, we set the blend function to GL_ZERO for both color and - * alpha each time GL_MIN or GL_MAX is used. - * - * Apple ships an extension called GL_ATI_blend_weighted_minmax (supported - * on Mac OS X 10.2 and later). I believe the difference with that - * extension is that it uses the blend function. However, I have no idea - * what the enums are for it. The extension is listed at Apple's developer - * site, but there is no documentation. - * - * http://developer.apple.com/opengl/extensions.html - */ - - glTranslatef(3.0, 0, 0); - glBlendEquation( GL_FUNC_ADD ); - glBlendFunc( GL_ONE, GL_ZERO ); - glBegin(GL_QUADS); - glColor3f( 0.5, 0.5, 0.5 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - glBlendEquation( GL_MAX ); - glBlendFunc( GL_ZERO, GL_ZERO ); - glBegin(GL_QUADS); - glColor3f( 0.2, 0.2, 0.2 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - - glTranslatef(3.0, 0, 0); - glBlendEquation( GL_FUNC_ADD ); - glBlendFunc( GL_ONE, GL_ZERO ); - glBegin(GL_QUADS); - glColor3f( 0.5, 0.5, 0.5 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - glBlendEquation( GL_MIN ); - glBlendFunc( GL_ZERO, GL_ZERO ); - glBegin(GL_QUADS); - glColor3f( 0.8, 0.8, 0.8 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - - glTranslatef(3.0, 0, 0); - glBlendEquation( GL_FUNC_ADD ); - glBlendFunc( GL_ONE, GL_ZERO ); - glBegin(GL_QUADS); - glColor3f( 0.8, 0.8, 0.8 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - glBlendEquation( GL_MIN ); - glBlendFunc( GL_ZERO, GL_ZERO ); - glBegin(GL_QUADS); - glColor3f( 0.5, 0.5, 0.5 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - GLfloat ar = (float) width / (float) height; - Width = width; - Height = height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -ar, ar, -1.0, 1.0, Near, Far ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - const char * const ver_string = (const char * const) - glGetString( GL_VERSION ); - - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", ver_string); - - if ( !glutExtensionSupported("GL_ARB_imaging") && !glutExtensionSupported("GL_EXT_blend_minmax")) { - printf("Sorry, this program requires either GL_ARB_imaging or GL_EXT_blend_minmax.\n"); - exit(1); - } - - printf("\nAll 4 squares should be the same color.\n"); - glEnable( GL_BLEND ); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( Width, Height ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow( "GL_EXT_blend_minmax test" ); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/blendsquare.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/blendsquare.c deleted file mode 100644 index 1694866a55..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/blendsquare.c +++ /dev/null @@ -1,178 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file blendsquare.c - * - * Simple test of GL_NV_blend_square functionality. Four squares are drawn - * with different blending modes, but all should be rendered with the same - * final color. - * - * \author Ian Romanick - */ - -#include -#include -#include - -static int Width = 400; -static int Height = 200; -static const GLfloat Near = 5.0, Far = 25.0; - - -static void Display( void ) -{ - glClearColor(0.2, 0.2, 0.8, 0); - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - - glTranslatef(-4.5, 0, 0); - glBlendFunc( GL_ONE, GL_ZERO ); - glBegin(GL_QUADS); - glColor3f( 0.5 * 0.5, 0.5 * 0.5, 0.5 * 0.5 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - - glTranslatef(3.0, 0, 0); - glBlendFunc( GL_ONE, GL_ZERO ); - glBegin(GL_QUADS); - glColor3f( 0.5, 0.5, 0.5 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - glBlendFunc( GL_DST_COLOR, GL_ZERO ); - glBegin(GL_QUADS); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - - glTranslatef(3.0, 0, 0); - glBlendFunc( GL_SRC_COLOR, GL_ZERO ); - glBegin(GL_QUADS); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - - glTranslatef(3.0, 0, 0); - glBlendFunc( GL_ONE, GL_ZERO ); - glBegin(GL_QUADS); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - glBlendFunc( GL_ZERO, GL_DST_COLOR ); - glBegin(GL_QUADS); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - GLfloat ar = (float) width / (float) height; - Width = width; - Height = height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -ar, ar, -1.0, 1.0, Near, Far ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - const char * const ver_string = (const char * const) - glGetString( GL_VERSION ); - const double version = strtod( ver_string, NULL ); - - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", ver_string); - - if ( (version < 1.4) && !glutExtensionSupported("GL_NV_blend_square")) { - printf("Sorry, this program requires either OpenGL 1.4 or GL_NV_blend_square\n"); - exit(1); - } - - printf("\nAll 4 squares should be the same color. The two on the left are drawn\n" - "without NV_blend_square functionality, and the two on the right are drawn\n" - "with NV_blend_square functionality. If the two on the left are dark, but\n" - "the two on the right are not, then NV_blend_square is broken.\n"); - glEnable( GL_BLEND ); - glBlendEquation( GL_FUNC_ADD ); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( Width, Height ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow( "GL_NV_blend_square test" ); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/bufferobj.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/bufferobj.c deleted file mode 100644 index c765d2516b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/bufferobj.c +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Test GL_ARB_vertex_buffer_object - * - * Brian Paul - * 16 Sep 2003 - */ - - -#define GL_GLEXT_PROTOTYPES -#include -#include -#include -#include -#include - -#define NUM_OBJECTS 10 - -struct object -{ - GLuint BufferID; - GLuint ElementsBufferID; - GLuint NumVerts; - GLuint VertexOffset; - GLuint ColorOffset; - GLuint NumElements; -}; - -static struct object Objects[NUM_OBJECTS]; -static GLuint NumObjects; - -static GLfloat Xrot = 0, Yrot = 0, Zrot = 0; -static GLboolean Anim = GL_TRUE; - - -static void CheckError(int line) -{ - GLenum err = glGetError(); - if (err) { - printf("GL Error 0x%x at line %d\n", (int) err, line); - } -} - - -static void DrawObject( const struct object *obj ) -{ - glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->BufferID); - glVertexPointer(3, GL_FLOAT, 0, (void *) obj->VertexOffset); - glEnable(GL_VERTEX_ARRAY); - - /* test push/pop attrib */ - /* XXX this leads to a segfault with NVIDIA's 53.36 driver */ -#if 0 - if (1) - { - glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT); - /*glVertexPointer(3, GL_FLOAT, 0, (void *) (obj->VertexOffset + 10000));*/ - glBindBufferARB(GL_ARRAY_BUFFER_ARB, 999999); - glPopClientAttrib(); - } -#endif - glColorPointer(3, GL_FLOAT, 0, (void *) obj->ColorOffset); - glEnable(GL_COLOR_ARRAY); - - if (obj->NumElements > 0) { - /* indexed arrays */ - glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, obj->ElementsBufferID); - glDrawElements(GL_LINE_LOOP, obj->NumElements, GL_UNSIGNED_INT, NULL); - } - else { - /* non-indexed arrays */ - glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0); - glDrawArrays(GL_LINE_LOOP, 0, obj->NumVerts); - } -} - - -static void Idle( void ) -{ - Zrot = 0.05 * glutGet(GLUT_ELAPSED_TIME); - glutPostRedisplay(); -} - - -static void Display( void ) -{ - int i; - - glClear( GL_COLOR_BUFFER_BIT ); - - for (i = 0; i < NumObjects; i++) { - float x = 5.0 * ((float) i / (NumObjects-1) - 0.5); - glPushMatrix(); - glTranslatef(x, 0, 0); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - glRotatef(Zrot, 0, 0, 1); - - DrawObject(Objects + i); - - glPopMatrix(); - } - - CheckError(__LINE__); - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - float ar = (float) width / (float) height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -ar, ar, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 'z': - Zrot -= step; - break; - case 'Z': - Zrot += step; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - Xrot -= step; - break; - case GLUT_KEY_DOWN: - Xrot += step; - break; - case GLUT_KEY_LEFT: - Yrot -= step; - break; - case GLUT_KEY_RIGHT: - Yrot += step; - break; - } - glutPostRedisplay(); -} - - - -static void MakeObject1(struct object *obj) -{ - GLfloat *v, *c; - void *p; - int i; - GLubyte buffer[500]; - - for (i = 0; i < 500; i++) - buffer[i] = i & 0xff; - - obj->BufferID = 0; - glGenBuffersARB(1, &obj->BufferID); - assert(obj->BufferID != 0); - glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->BufferID); - glBufferDataARB(GL_ARRAY_BUFFER_ARB, 500, buffer, GL_STATIC_DRAW_ARB); - - for (i = 0; i < 500; i++) - buffer[i] = 0; - - glGetBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, 500, buffer); - - for (i = 0; i < 500; i++) - assert(buffer[i] == (i & 0xff)); - - glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_MAPPED_ARB, &i); - assert(!i); - - glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_USAGE_ARB, &i); - - v = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); - - /* do some sanity tests */ - glGetBufferPointervARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_MAP_POINTER_ARB, &p); - assert(p == v); - - glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &i); - assert(i == 500); - - glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_USAGE_ARB, &i); - assert(i == GL_STATIC_DRAW_ARB); - - glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_ACCESS_ARB, &i); - assert(i == GL_WRITE_ONLY_ARB); - - glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_MAPPED_ARB, &i); - assert(i); - - /* Make rectangle */ - v[0] = -1; v[1] = -1; v[2] = 0; - v[3] = 1; v[4] = -1; v[5] = 0; - v[6] = 1; v[7] = 1; v[8] = 0; - v[9] = -1; v[10] = 1; v[11] = 0; - c = v + 12; - c[0] = 1; c[1] = 0; c[2] = 0; - c[3] = 1; c[4] = 0; c[5] = 0; - c[6] = 1; c[7] = 0; c[8] = 1; - c[9] = 1; c[10] = 0; c[11] = 1; - obj->NumVerts = 4; - obj->VertexOffset = 0; - obj->ColorOffset = 3 * sizeof(GLfloat) * obj->NumVerts; - obj->NumElements = 0; - - glUnmapBufferARB(GL_ARRAY_BUFFER_ARB); - - glGetBufferPointervARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_MAP_POINTER_ARB, &p); - assert(!p); - - glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_MAPPED_ARB, &i); - assert(!i); -} - - -static void MakeObject2(struct object *obj) -{ - GLfloat *v, *c; - - glGenBuffersARB(1, &obj->BufferID); - glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->BufferID); - glBufferDataARB(GL_ARRAY_BUFFER_ARB, 1000, NULL, GL_STATIC_DRAW_ARB); - v = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); - - /* Make triangle */ - v[0] = -1; v[1] = -1; v[2] = 0; - v[3] = 1; v[4] = -1; v[5] = 0; - v[6] = 0; v[7] = 1; v[8] = 0; - c = v + 9; - c[0] = 0; c[1] = 1; c[2] = 0; - c[3] = 0; c[4] = 1; c[5] = 0; - c[6] = 1; c[7] = 1; c[8] = 0; - obj->NumVerts = 3; - obj->VertexOffset = 0; - obj->ColorOffset = 3 * sizeof(GLfloat) * obj->NumVerts; - obj->NumElements = 0; - - glUnmapBufferARB(GL_ARRAY_BUFFER_ARB); -} - - -static void MakeObject3(struct object *obj) -{ - GLfloat vertexData[1000]; - GLfloat *v, *c; - GLuint *i; - int bytes; - - /* Make rectangle */ - v = vertexData; - v[0] = -1; v[1] = -0.5; v[2] = 0; - v[3] = 1; v[4] = -0.5; v[5] = 0; - v[6] = 1; v[7] = 0.5; v[8] = 0; - v[9] = -1; v[10] = 0.5; v[11] = 0; - c = vertexData + 12; - c[0] = 0; c[1] = 0; c[2] = 1; - c[3] = 0; c[4] = 0; c[5] = 1; - c[6] = 0; c[7] = 1; c[8] = 1; - c[9] = 0; c[10] = 1; c[11] = 1; - obj->NumVerts = 4; - obj->VertexOffset = 0; - obj->ColorOffset = 3 * sizeof(GLfloat) * obj->NumVerts; - - bytes = obj->NumVerts * (3 + 3) * sizeof(GLfloat); - - /* Don't use glMap/UnmapBuffer for this object */ - glGenBuffersARB(1, &obj->BufferID); - glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->BufferID); - glBufferDataARB(GL_ARRAY_BUFFER_ARB, bytes, vertexData, GL_STATIC_DRAW_ARB); - - /* Setup a buffer of indices to test the ELEMENTS path */ - glGenBuffersARB(1, &obj->ElementsBufferID); - glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, obj->ElementsBufferID); - glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 100, NULL, GL_STATIC_DRAW_ARB); - i = (GLuint *) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_READ_WRITE_ARB); - i[0] = 0; - i[1] = 1; - i[2] = 2; - i[3] = 3; - glUnmapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB); - obj->NumElements = 4; -} - - - -static void Init( void ) -{ - if (!glutExtensionSupported("GL_ARB_vertex_buffer_object")) { - printf("GL_ARB_vertex_buffer_object not found!\n"); - exit(0); - } - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - - /* Test buffer object deletion */ - if (1) { - static GLubyte data[1000]; - GLuint id = 999; - glBindBufferARB(GL_ARRAY_BUFFER_ARB, id); - glBufferDataARB(GL_ARRAY_BUFFER_ARB, 1000, data, GL_STATIC_DRAW_ARB); - glVertexPointer(3, GL_FLOAT, 0, (void *) 0); - glDeleteBuffersARB(1, &id); - assert(!glIsBufferARB(id)); - glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0); - glVertexPointer(3, GL_FLOAT, 0, (void *) 0); - assert(!glIsBufferARB(id)); - } - - MakeObject1(Objects + 0); - MakeObject2(Objects + 1); - MakeObject3(Objects + 2); - NumObjects = 3; -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 600, 300 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - if (Anim) - glutIdleFunc(Idle); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/bug_3101.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/bug_3101.c deleted file mode 100644 index 761dcbb951..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/bug_3101.c +++ /dev/null @@ -1,128 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file bug_3101.c - * - * Simple regression test for bug #3101. Attempt to draw a single square. - * After emiting the first vertex, call \c glEdgeFlag to change the vertex - * format. If the bug still exists, this will cause a segfault. - * - * \author Ian Romanick - */ - -#include -#include -#include - -static int Width = 400; -static int Height = 200; -static const GLfloat Near = 5.0, Far = 25.0; - - -static void Display( void ) -{ - glClearColor(0.2, 0.2, 0.8, 0); - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - - /* This is the "reference" square. - */ - - glTranslatef(-4.5, 0, 0); - glBlendEquation( GL_FUNC_ADD ); - glBlendFunc( GL_ONE, GL_ZERO ); - glBegin(GL_QUADS); - glColor3f( 0.5, 0.5, 0.5 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glEdgeFlag(GL_TRUE); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - GLfloat ar = (float) width / (float) height; - Width = width; - Height = height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -ar, ar, -1.0, 1.0, Near, Far ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - const char * const ver_string = (const char * const) - glGetString( GL_VERSION ); - - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", ver_string); - - printf("\nThis program should draw a single square, but not crash.\n"); - printf("This is a regression test for bug #3101.\n"); - printf("https://bugs.freedesktop.org/show_bug.cgi?id=3101\n"); - glEnable( GL_BLEND ); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( Width, Height ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow( "Bug #3101 Test" ); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/bug_3195.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/bug_3195.c deleted file mode 100644 index 75de58b07c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/bug_3195.c +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright (C) 2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file bug_3195.c - * - * Simple regression test for bug #3195. A bug in the i180 driver caused - * a segfault (inside the driver) when the LOD bias is adjusted and no texture - * is enabled. This test, which is based on progs/demos/lodbias.c, sets up - * all the texturing, disables all textures, adjusts the LOD bias, then - * re-enables \c GL_TEXTURE_2D. - * - * \author Brian Paul - * \author Ian Romanick - */ - -#include -#include -#include -#include -#include -#include - -#include "readtex.h" - -#define TEXTURE_FILE "../images/girl.rgb" - -static GLfloat Xrot = 0, Yrot = -30, Zrot = 0; -static GLint Bias = 0, BiasStepSign = +1; /* ints avoid fp precision problem */ -static GLint BiasMin = -400, BiasMax = 400; - - - -static void -PrintString(const char *s) -{ - while (*s) { - glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s); - s++; - } -} - -static void Idle( void ) -{ - static int lastTime = 0; - int time = glutGet(GLUT_ELAPSED_TIME); - int step; - - if (lastTime == 0) - lastTime = time; - else if (time - lastTime < 10) - return; - - step = (time - lastTime) / 10 * BiasStepSign; - lastTime = time; - - Bias += step; - if (Bias < BiasMin) { - exit(0); - } - else if (Bias > BiasMax) { - Bias = BiasMax; - BiasStepSign = -1; - } - - glutPostRedisplay(); -} - - -static void Display( void ) -{ - char str[100]; - - glClear( GL_COLOR_BUFFER_BIT ); - - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho(-1, 1, -1, 1, -1, 1); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - - glDisable(GL_TEXTURE_2D); - glColor3f(1,1,1); - glRasterPos3f(-0.9, -0.9, 0.0); - sprintf(str, "Texture LOD Bias = %4.1f", Bias * 0.01); - PrintString(str); - - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -8.0 ); - - glPushMatrix(); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - glRotatef(Zrot, 0, 0, 1); - - glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, 0.01 * Bias); - glEnable(GL_TEXTURE_2D); - - glBegin(GL_POLYGON); - glTexCoord2f(0, 0); glVertex2f(-1, -1); - glTexCoord2f(2, 0); glVertex2f( 1, -1); - glTexCoord2f(2, 2); glVertex2f( 1, 1); - glTexCoord2f(0, 2); glVertex2f(-1, 1); - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - Xrot -= step; - break; - case GLUT_KEY_DOWN: - Xrot += step; - break; - case GLUT_KEY_LEFT: - Yrot -= step; - break; - case GLUT_KEY_RIGHT: - Yrot += step; - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - GLfloat maxBias; - const char * const ver_string = (const char * const) - glGetString( GL_VERSION ); - - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", ver_string); - - printf("\nThis program should function nearly identically to Mesa's lodbias demo.\n" - "It should cycle through the complet LOD bias range once and exit. If bug\n" - "#3195 still exists, the demo should crash almost immediatly.\n"); - printf("This is a regression test for bug #3101.\n"); - printf("https://bugs.freedesktop.org/show_bug.cgi?id=3101\n"); - - if (!glutExtensionSupported("GL_EXT_texture_lod_bias")) { - printf("Sorry, GL_EXT_texture_lod_bias not supported by this renderer.\n"); - exit(1); - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - if (glutExtensionSupported("GL_SGIS_generate_mipmap")) { - /* test auto mipmap generation */ - GLint width, height, i; - GLenum format; - GLubyte *image = LoadRGBImage(TEXTURE_FILE, &width, &height, &format); - if (!image) { - printf("Error: could not load texture image %s\n", TEXTURE_FILE); - exit(1); - } - /* resize to 256 x 256 */ - if (width != 256 || height != 256) { - GLubyte *newImage = malloc(256 * 256 * 4); - gluScaleImage(format, width, height, GL_UNSIGNED_BYTE, image, - 256, 256, GL_UNSIGNED_BYTE, newImage); - free(image); - image = newImage; - } - printf("Using GL_SGIS_generate_mipmap\n"); - glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE); - glTexImage2D(GL_TEXTURE_2D, 0, format, 256, 256, 0, - format, GL_UNSIGNED_BYTE, image); - free(image); - - /* make sure mipmap was really generated correctly */ - width = height = 256; - for (i = 0; i < 9; i++) { - GLint w, h; - glGetTexLevelParameteriv(GL_TEXTURE_2D, i, GL_TEXTURE_WIDTH, &w); - glGetTexLevelParameteriv(GL_TEXTURE_2D, i, GL_TEXTURE_HEIGHT, &h); - printf("Level %d size: %d x %d\n", i, w, h); - assert(w == width); - assert(h == height); - width /= 2; - height /= 2; - } - - } - else if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) { - printf("Error: could not load texture image %s\n", TEXTURE_FILE); - exit(1); - } - - /* mipmapping required for this extension */ - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - - glGetFloatv(GL_MAX_TEXTURE_LOD_BIAS_EXT, &maxBias); - printf("LOD bias range: [%g, %g]\n", -maxBias, maxBias); - BiasMin = -100 * maxBias; - BiasMax = 100 * maxBias; - - /* Since we have (about) 8 mipmap levels, no need to bias beyond - * the range [-1, +8]. - */ - if (BiasMin < -100) - BiasMin = -100; - if (BiasMax > 800) - BiasMax = 800; -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 350, 350 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow( "Bug #3195 Test" ); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - glutIdleFunc(Idle); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/crossbar.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/crossbar.c deleted file mode 100644 index 12aabb1c9a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/crossbar.c +++ /dev/null @@ -1,235 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file crossbar.c - * - * Simple test of GL_ARB_texture_env_crossbar functionality. Several squares - * are drawn with different texture combine modes, but all should be rendered - * with the same final color. - * - * \author Ian Romanick - */ - -#include -#include -#include -#include - -static const GLint tests[][8] = { - { 1, GL_REPLACE, GL_PRIMARY_COLOR, GL_PRIMARY_COLOR, - 2, GL_REPLACE, GL_TEXTURE, GL_PRIMARY_COLOR }, - { 3, GL_REPLACE, GL_PRIMARY_COLOR, GL_PRIMARY_COLOR, - 2, GL_SUBTRACT, GL_TEXTURE0, GL_TEXTURE1 }, - { 2, GL_REPLACE, GL_PRIMARY_COLOR, GL_PRIMARY_COLOR, - 2, GL_REPLACE, GL_TEXTURE0, GL_TEXTURE0 }, - { 2, GL_REPLACE, GL_PRIMARY_COLOR, GL_PRIMARY_COLOR, - 1, GL_SUBTRACT, GL_TEXTURE0, GL_TEXTURE1 }, - { 3, GL_ADD, GL_TEXTURE1, GL_TEXTURE1, - 2, GL_MODULATE, GL_TEXTURE1, GL_PREVIOUS }, - { 3, GL_ADD, GL_TEXTURE1, GL_TEXTURE1, - 4, GL_MODULATE, GL_TEXTURE0, GL_PREVIOUS }, -}; - -#define NUM_TESTS (sizeof(tests) / sizeof(tests[0])) - -static int Width = 100 * (NUM_TESTS + 1); -static int Height = 200; -static const GLfloat Near = 5.0, Far = 25.0; - - -static void Display( void ) -{ - unsigned i; - - - glClearColor(0.2, 0.2, 0.8, 0); - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - - /* This is the "reference" square. - */ - - glActiveTexture( GL_TEXTURE0 ); - glDisable( GL_TEXTURE_2D ); - glActiveTexture( GL_TEXTURE1 ); - glDisable( GL_TEXTURE_2D ); - - glTranslatef(-(NUM_TESTS * 1.5), 0, 0); - glBegin(GL_QUADS); - glColor3f( 0.5, 0.5, 0.5 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - for ( i = 0 ; i < NUM_TESTS ; i++ ) { - glActiveTexture( GL_TEXTURE0 ); - glEnable( GL_TEXTURE_2D ); - glBindTexture( GL_TEXTURE_2D, tests[i][0] ); - glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE ); - glTexEnvi( GL_TEXTURE_ENV, GL_COMBINE_RGB, tests[i][1] ); - glTexEnvi( GL_TEXTURE_ENV, GL_SOURCE0_RGB, tests[i][2] ); - glTexEnvi( GL_TEXTURE_ENV, GL_SOURCE1_RGB, tests[i][3] ); - - glActiveTexture( GL_TEXTURE1 ); - glEnable( GL_TEXTURE_2D ); - glBindTexture( GL_TEXTURE_2D, tests[i][4] ); - glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE ); - glTexEnvi( GL_TEXTURE_ENV, GL_COMBINE_RGB, tests[i][5] ); - glTexEnvi( GL_TEXTURE_ENV, GL_SOURCE0_RGB, tests[i][6] ); - glTexEnvi( GL_TEXTURE_ENV, GL_SOURCE1_RGB, tests[i][7] ); - - glCallList(1); - } - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - GLfloat ar = (float) width / (float) height; - Width = width; - Height = height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -ar, ar, -1.0, 1.0, Near, Far ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - const char * const ver_string = (const char * const) - glGetString( GL_VERSION ); - float ver = strtof( ver_string, NULL ); - GLint tex_units; - GLint temp[ 256 ]; - - - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", ver_string); - - if ( (!glutExtensionSupported("GL_ARB_multitexture") - && (ver < 1.3)) - || (!glutExtensionSupported("GL_ARB_texture_env_combine") - && !glutExtensionSupported("GL_EXT_texture_env_combine") - && (ver < 1.3)) - || (!glutExtensionSupported("GL_ARB_texture_env_crossbar") - && !glutExtensionSupported("GL_NV_texture_env_combine4") - && (ver < 1.4)) ) { - printf("\nSorry, this program requires GL_ARB_multitexture and either\n" - "GL_ARB_texture_env_combine or GL_EXT_texture_env_combine (or OpenGL 1.3).\n" - "Either GL_ARB_texture_env_crossbar or GL_NV_texture_env_combine4 (or\n" - "OpenGL 1.4) are also required.\n"); - exit(1); - } - - glGetIntegerv( GL_MAX_TEXTURE_UNITS, & tex_units ); - if ( tex_units < 2 ) { - printf("\nSorry, this program requires at least 2 texture units.\n"); - exit(1); - } - - printf("\nAll %u squares should be the same color.\n", NUM_TESTS + 1); - - (void) memset( temp, 0x00, sizeof( temp ) ); - glBindTexture( GL_TEXTURE_2D, 1 ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); - glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0, - GL_RGBA, GL_UNSIGNED_BYTE, temp ); - - (void) memset( temp, 0x7f, sizeof( temp ) ); - glBindTexture( GL_TEXTURE_2D, 2 ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); - glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0, - GL_RGBA, GL_UNSIGNED_BYTE, temp ); - - (void) memset( temp, 0xff, sizeof( temp ) ); - glBindTexture( GL_TEXTURE_2D, 3 ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); - glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0, - GL_RGBA, GL_UNSIGNED_BYTE, temp ); - - (void) memset( temp, 0x3f, sizeof( temp ) ); - glBindTexture( GL_TEXTURE_2D, 4 ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); - glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0, - GL_RGBA, GL_UNSIGNED_BYTE, temp ); - - - glNewList( 1, GL_COMPILE ); - glTranslatef(3.0, 0, 0); - glBegin(GL_QUADS); - glColor3f( 0.9, 0.0, 0.0 ); - glMultiTexCoord2f( GL_TEXTURE0, 0.5, 0.5 ); - glMultiTexCoord2f( GL_TEXTURE1, 0.5, 0.5 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - glEndList(); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( Width, Height ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow( "GL_ARB_texture_env_crossbar test" ); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/cva.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/cva.c deleted file mode 100644 index 3f7960f53b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/cva.c +++ /dev/null @@ -1,164 +0,0 @@ -/* $Id: cva.c,v 1.7 2003/12/08 09:03:35 joukj Exp $ */ - -/* - * Trivial CVA test, good for testing driver fastpaths (especially - * indexed vertex buffers if they are supported). - * - * Gareth Hughes - * November 2000 - */ - -#include -#include -#include -#ifdef __VMS -# include /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */ -#else -# include /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */ -#endif -#ifdef _WIN32 -#include -#endif -#define GL_GLEXT_LEGACY -#include - - -GLfloat verts[][4] = { - { -0.5, -0.5, -2.0, 0.0 }, - { 0.5, -0.5, -2.0, 0.0 }, - { -0.5, 0.5, -2.0, 0.0 }, - { 0.5, 0.5, -2.0, 0.0 }, -}; - -GLubyte color[][4] = { - { 0xff, 0x00, 0x00, 0x00 }, - { 0x00, 0xff, 0x00, 0x00 }, - { 0x00, 0x00, 0xff, 0x00 }, - { 0xff, 0xff, 0xff, 0x00 }, -}; - -GLuint indices[] = { 0, 1, 2, 3 }; - -GLboolean compiled = GL_TRUE; -GLboolean doubleBuffer = GL_TRUE; - - -void init( void ) -{ - glClearColor( 0.0, 0.0, 0.0, 0.0 ); - glShadeModel( GL_SMOOTH ); - - glFrontFace( GL_CCW ); - glCullFace( GL_BACK ); - glEnable( GL_CULL_FACE ); - - glEnable( GL_DEPTH_TEST ); - - glEnableClientState( GL_VERTEX_ARRAY ); - glEnableClientState( GL_COLOR_ARRAY ); - - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 2.0, 10.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - - glVertexPointer( 3, GL_FLOAT, sizeof(verts[0]), verts ); - glColorPointer( 4, GL_UNSIGNED_BYTE, 0, color ); - -#ifdef GL_EXT_compiled_vertex_array - if ( compiled ) { - glLockArraysEXT( 0, 4 ); - } -#endif -} - -void display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glDrawElements( GL_TRIANGLES, 3, GL_UNSIGNED_INT, indices ); - - glFlush(); - if ( doubleBuffer ) { - glutSwapBuffers(); - } -} - -void keyboard( unsigned char key, int x, int y ) -{ - switch ( key ) { - case 27: - exit( 0 ); - break; - } - - glutPostRedisplay(); -} - -GLboolean args( int argc, char **argv ) -{ - GLint i; - - doubleBuffer = GL_TRUE; - - for ( i = 1 ; i < argc ; i++ ) { - if ( strcmp( argv[i], "-sb" ) == 0 ) { - doubleBuffer = GL_FALSE; - } else if ( strcmp( argv[i], "-db" ) == 0 ) { - doubleBuffer = GL_TRUE; - } else { - fprintf( stderr, "%s (Bad option).\n", argv[i] ); - return GL_FALSE; - } - } - return GL_TRUE; -} - -int main( int argc, char **argv ) -{ - GLenum type; - char *string; - - glutInit( &argc, argv ); - - if ( args( argc, argv ) == GL_FALSE ) { - exit( 1 ); - } - - type = GLUT_RGB | GLUT_DEPTH; - type |= ( doubleBuffer ) ? GLUT_DOUBLE : GLUT_SINGLE; - - glutInitDisplayMode( type ); - glutInitWindowSize( 250, 250 ); - glutInitWindowPosition( 100, 100 ); - glutCreateWindow( "CVA Test" ); - - /* Make sure the server supports GL 1.2 vertex arrays. - */ - string = (char *) glGetString( GL_VERSION ); - - if ( !strstr(string, "1.2") && - !strstr(string, "1.3") && - !strstr(string, "1.4")) { - fprintf( stderr, "This program requires OpenGL 1.2 vertex arrays.\n" ); - exit( -1 ); - } - - /* See if the server supports compiled vertex arrays. - */ - string = (char *) glGetString( GL_EXTENSIONS ); - - if ( !strstr( string, "GL_EXT_compiled_vertex_array" ) ) { - fprintf( stderr, "Compiled vertex arrays not supported by this renderer.\n" ); - compiled = GL_FALSE; - } - - init(); - - glutDisplayFunc( display ); - glutKeyboardFunc( keyboard ); - glutMainLoop(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/debugger.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/debugger.c deleted file mode 100644 index 4c6955bcfc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/debugger.c +++ /dev/null @@ -1,733 +0,0 @@ -/* - * Test the GL_MESA_program_debug extension - */ - - -#include -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - - -/* - * Print the string with line numbers - */ -static void list_program(const GLubyte *string, GLsizei len) -{ - const char *c = (const char *) string; - int i, line = 1, printNumber = 1; - - for (i = 0; i < len; i++) { - if (printNumber) { - printf("%3d ", line); - printNumber = 0; - } - if (*c == '\n') { - line++; - printNumber = 1; - } - putchar(*c); - c++; - } - putchar('\n'); -} - - -/* - * Return the line number and column number that corresponds to the - * given program position. Also return a null-terminated copy of that - * line of the program string. - */ -static const GLubyte * -find_line_column(const GLubyte *string, const GLubyte *pos, - GLint *line, GLint *col) -{ - const GLubyte *lineStart = string; - const GLubyte *p = string; - GLubyte *s; - int len; - - *line = 1; - - while (p != pos) { - if (*p == (GLubyte) '\n') { - (*line)++; - lineStart = p + 1; - } - p++; - } - - *col = (pos - lineStart) + 1; - - /* return copy of this line */ - while (*p != 0 && *p != '\n') - p++; - len = p - lineStart; - s = (GLubyte *) malloc(len + 1); - memcpy(s, lineStart, len); - s[len] = 0; - - return s; -} - - -#define ARB_VERTEX_PROGRAM 1 -#define ARB_FRAGMENT_PROGRAM 2 -#define NV_VERTEX_PROGRAM 3 -#define NV_FRAGMENT_PROGRAM 4 - - -struct breakpoint { - enum {PIXEL, LINE} type; - int x, y; - int line; - GLboolean enabled; -}; - -#define MAX_BREAKPOINTS 100 -static struct breakpoint Breakpoints[MAX_BREAKPOINTS]; -static int NumBreakpoints = 0; - - - -/* - * Interactive debugger - */ -static void Debugger2(GLenum target, GLvoid *data) -{ - static GLuint skipCount = 0; - const GLubyte *ln; - GLint pos, line, column; - GLint id; - int progType; - GLint len; - GLubyte *program; - GLboolean stop; - int i; - - /* Sigh, GL_VERTEX_PROGRAM_ARB == GL_VERTEX_PROGRAM_NV so it's a bit - * hard to distinguish between them. - */ - if (target == GL_FRAGMENT_PROGRAM_ARB) - progType = ARB_FRAGMENT_PROGRAM; - else if (target == GL_FRAGMENT_PROGRAM_NV) - progType = NV_FRAGMENT_PROGRAM; - else - progType = NV_VERTEX_PROGRAM; - - /* Until we hit zero, continue rendering */ - if (skipCount > 0) { - skipCount--; - return; - } - - /* Get id of the program and current position */ - switch (progType) { - case ARB_FRAGMENT_PROGRAM: - glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_BINDING_ARB, &id); - glGetIntegerv(GL_FRAGMENT_PROGRAM_POSITION_MESA, &pos); - break; - case NV_FRAGMENT_PROGRAM: - glGetIntegerv(GL_FRAGMENT_PROGRAM_BINDING_NV, &id); - glGetIntegerv(GL_FRAGMENT_PROGRAM_POSITION_MESA, &pos); - break; - case ARB_VERTEX_PROGRAM: - glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_BINDING_ARB, &id); - glGetIntegerv(GL_VERTEX_PROGRAM_POSITION_MESA, &pos); - break; - case NV_VERTEX_PROGRAM: - glGetIntegerv(GL_VERTEX_PROGRAM_BINDING_NV, &id); - glGetIntegerv(GL_VERTEX_PROGRAM_POSITION_MESA, &pos); - break; - default: - abort(); - } - - /* get program string */ - if (progType == ARB_VERTEX_PROGRAM || - progType == ARB_FRAGMENT_PROGRAM) - glGetProgramivARB(target, GL_PROGRAM_LENGTH_ARB, &len); - else - glGetProgramivNV(id, GL_PROGRAM_LENGTH_NV, &len); - program = malloc(len + 1); - if (progType == ARB_VERTEX_PROGRAM || - progType == ARB_FRAGMENT_PROGRAM) - glGetProgramStringARB(target, GL_PROGRAM_STRING_ARB, program); - else - glGetProgramStringNV(id, GL_PROGRAM_STRING_NV, program); - - - /* Get current line number, column, line string */ - ln = find_line_column(program, program + pos, &line, &column); - - /* test breakpoints */ - if (NumBreakpoints > 0) - stop = GL_FALSE; - else - stop = GL_TRUE; - for (i = 0; i < NumBreakpoints; i++) { - if (Breakpoints[i].enabled) { - switch (Breakpoints[i].type) { - case PIXEL: - if (progType == ARB_FRAGMENT_PROGRAM) { - - } - else if (progType == NV_FRAGMENT_PROGRAM) { - GLfloat pos[4]; - int px, py; - glGetProgramRegisterfvMESA(GL_FRAGMENT_PROGRAM_NV, - 6, (GLubyte *) "f[WPOS]", pos); - px = (int) pos[0]; - py = (int) pos[1]; - printf("%d, %d\n", px, py); - if (px == Breakpoints[i].x && - py == Breakpoints[i].y) { - printf("Break at pixel (%d, %d)\n", px, py); - stop = GL_TRUE; - } - } - break; - case LINE: - if (line == Breakpoints[i].line) { - /* hit a breakpoint! */ - printf("Break at line %d\n", line); - stop = GL_TRUE; - } - break; - } - } - } - if (!stop) { - free(program); - return; - } - - printf("%d: %s\n", line, ln); - - /* get commands from stdin */ - while (1) { - char command[1000], *cmd; - - /* print prompt and get command */ - printf("(%s %d) ", (target == GL_VERTEX_PROGRAM_ARB ? "vert" : "frag"), - line); - fgets(command, 999, stdin); - - /* skip leading whitespace */ - for (cmd = command; cmd[0] == ' '; cmd++) - ; - - if (!cmd[0]) - /* nothing (repeat the previous cmd?) */ - continue; - - switch (cmd[0]) { - case 's': - /* skip N instructions */ - i = atoi(cmd + 2); - skipCount = i; - printf("Skipping %d instructions\n", i); - return; - case 'n': - /* next */ - return; - case 'c': - return; - case 'd': - /* dump machine state */ - if (progType == NV_FRAGMENT_PROGRAM) { - static const char *inRegs[] = { - "f[WPOS]", "f[COL0]", "f[COL1]", "f[FOGC]", - "f[TEX0]", "f[TEX1]", "f[TEX2]", "f[TEX3]", - NULL - }; - static const char *outRegs[] = { - "o[COLR]", "o[COLH]", "o[DEPR]", NULL - }; - GLfloat v[4]; - int i; - printf("Fragment input attributes:\n"); - for (i = 0; inRegs[i]; i++) { - glGetProgramRegisterfvMESA(GL_FRAGMENT_PROGRAM_NV, - strlen(inRegs[i]), - (const GLubyte *) inRegs[i], v); - printf(" %s: %g, %g, %g, %g\n", inRegs[i], - v[0], v[1], v[2], v[3]); - } - printf("Fragment output attributes:\n"); - for (i = 0; outRegs[i]; i++) { - glGetProgramRegisterfvMESA(GL_FRAGMENT_PROGRAM_NV, - strlen(outRegs[i]), - (const GLubyte *) outRegs[i], v); - printf(" %s: %g, %g, %g, %g\n", outRegs[i], - v[0], v[1], v[2], v[3]); - } - printf("Temporaries:\n"); - for (i = 0; i < 4; i++) { - char temp[100]; - GLfloat v[4]; - sprintf(temp, "R%d", i); - glGetProgramRegisterfvMESA(GL_FRAGMENT_PROGRAM_NV, - strlen(temp), - (const GLubyte *) temp, v); - printf(" %s: %g, %g, %g, %g\n", temp, v[0],v[1],v[2],v[3]); - } - } - else if (progType == NV_VERTEX_PROGRAM) { - GLfloat v[4]; - int i; - static const char *inRegs[] = { - "v[OPOS]", "v[WGHT]", "v[NRML]", "v[COL0]", - "v[COL1]", "v[FOGC]", "v[6]", "v[7]", - "v[TEX0]", "v[TEX1]", "v[TEX2]", "v[TEX3]", - "v[TEX4]", "v[TEX5]", "v[TEX6]", "v[TEX7]", - NULL - }; - static const char *outRegs[] = { - "o[HPOS]", "o[COL0]", "o[COL1]", "o[BFC0]", - "o[BFC1]", "o[FOGC]", "o[PSIZ]", - "o[TEX0]", "o[TEX1]", "o[TEX2]", "o[TEX3]", - "o[TEX4]", "o[TEX5]", "o[TEX6]", "o[TEX7]", - NULL - }; - printf("Vertex input attributes:\n"); - for (i = 0; inRegs[i]; i++) { - glGetProgramRegisterfvMESA(GL_VERTEX_PROGRAM_NV, - strlen(inRegs[i]), - (const GLubyte *) inRegs[i], v); - printf(" %s: %g, %g, %g, %g\n", inRegs[i], - v[0], v[1], v[2], v[3]); - } - printf("Vertex output attributes:\n"); - for (i = 0; outRegs[i]; i++) { - glGetProgramRegisterfvMESA(GL_VERTEX_PROGRAM_NV, - strlen(outRegs[i]), - (const GLubyte *) outRegs[i], v); - printf(" %s: %g, %g, %g, %g\n", outRegs[i], - v[0], v[1], v[2], v[3]); - } - printf("Temporaries:\n"); - for (i = 0; i < 4; i++) { - char temp[100]; - GLfloat v[4]; - sprintf(temp, "R%d", i); - glGetProgramRegisterfvMESA(GL_VERTEX_PROGRAM_NV, - strlen(temp), - (const GLubyte *) temp, v); - printf(" %s: %g, %g, %g, %g\n", temp, v[0],v[1],v[2],v[3]); - } - } - break; - case 'l': - /* list */ - list_program(program, len); - break; - case 'p': - /* print */ - { - GLfloat v[4]; - char *c; - cmd++; - while (*cmd == ' ') - cmd++; - c = cmd; - while (*c) { - if (*c == '\n' || *c == '\r') - *c = 0; - else - c++; - } - glGetProgramRegisterfvMESA(target, strlen(cmd), - (const GLubyte *) cmd, v); - if (glGetError() == GL_NO_ERROR) - printf("%s = %g, %g, %g, %g\n", cmd, v[0], v[1], v[2], v[3]); - else - printf("Invalid expression\n"); - } - break; - case 'b': - if (cmd[1] == ' ' && isdigit(cmd[2])) { - char *comma = strchr(cmd, ','); - if (comma) { - /* break at pixel */ - int x = atoi(cmd + 2); - int y = atoi(comma + 1); - if (NumBreakpoints < MAX_BREAKPOINTS) { - Breakpoints[NumBreakpoints].type = PIXEL; - Breakpoints[NumBreakpoints].x = x; - Breakpoints[NumBreakpoints].y = y; - Breakpoints[NumBreakpoints].enabled = GL_TRUE; - NumBreakpoints++; - printf("Breakpoint %d: break at pixel (%d, %d)\n", - NumBreakpoints, x, y); - } - } - else { - /* break at line */ - int l = atoi(cmd + 2); - if (l && NumBreakpoints < MAX_BREAKPOINTS) { - Breakpoints[NumBreakpoints].type = LINE; - Breakpoints[NumBreakpoints].line = l; - Breakpoints[NumBreakpoints].enabled = GL_TRUE; - NumBreakpoints++; - printf("Breakpoint %d: break at line %d\n", - NumBreakpoints, l); - } - } - } - else { - /* list breakpoints */ - printf("Breakpoints:\n"); - for (i = 0; i < NumBreakpoints; i++) { - switch (Breakpoints[i].type) { - case LINE: - printf(" %d: break at line %d\n", - i + 1, Breakpoints[i].line); - break; - case PIXEL: - printf(" %d: break at pixel (%d, %d)\n", - i + 1, Breakpoints[i].x, Breakpoints[i].y); - break; - } - } - } - break; - case 'h': - /* help */ - printf("Debugger commands:\n"); - printf(" b list breakpoints\n"); - printf(" b N break at line N\n"); - printf(" b x,y break at pixel x,y\n"); - printf(" c continue execution\n"); - printf(" d display register values\n"); - printf(" h help\n"); - printf(" l list program\n"); - printf(" n next instruction\n"); - printf(" p V print value V\n"); - printf(" s N skip N instructions\n"); - break; - default: - printf("Unknown command: %c\n", cmd[0]); - } - } -} - - -/* - * Print current line, some registers, and continue. - */ -static void Debugger(GLenum target, GLvoid *data) -{ - GLint pos; - const GLubyte *ln; - GLint line, column; - GLfloat v[4]; - - assert(target == GL_FRAGMENT_PROGRAM_NV); - - glGetIntegerv(GL_FRAGMENT_PROGRAM_POSITION_MESA, &pos); - - ln = find_line_column((const GLubyte *) data, (const GLubyte *) data + pos, - &line, &column); - printf("%d:%d: %s\n", line, column, (char *) ln); - - glGetProgramRegisterfvMESA(GL_FRAGMENT_PROGRAM_NV, - 2, (const GLubyte *) "R0", v); - printf(" R0 = %g, %g, %g, %g\n", v[0], v[1], v[2], v[3]); - glGetProgramRegisterfvMESA(GL_FRAGMENT_PROGRAM_NV, - 7, (const GLubyte *) "f[WPOS]", v); - printf(" o[WPOS] = %g, %g, %g, %g\n", v[0], v[1], v[2], v[3]); - glGetProgramRegisterfvMESA(GL_FRAGMENT_PROGRAM_NV, - 7, (const GLubyte *) "o[COLR]", v); - printf(" o[COLR] = %g, %g, %g, %g\n", v[0], v[1], v[2], v[3]); - - free((void *) ln); -} - - - - -/**********************************************************************/ - -static GLfloat Diffuse[4] = { 0.5, 0.5, 1.0, 1.0 }; -static GLfloat Specular[4] = { 0.8, 0.8, 0.8, 1.0 }; -static GLfloat LightPos[4] = { 0.0, 10.0, 20.0, 1.0 }; -static GLfloat Delta = 1.0; - -static GLuint FragProg; -static GLuint VertProg; -static GLboolean Anim = GL_TRUE; -static GLboolean Wire = GL_FALSE; -static GLboolean PixelLight = GL_TRUE; - -static GLfloat Xrot = 0, Yrot = 0; - - -#define NAMED_PARAMETER4FV(prog, name, v) \ - glProgramNamedParameter4fvNV(prog, strlen(name), (const GLubyte *) name, v) - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - if (PixelLight) { - NAMED_PARAMETER4FV(FragProg, "LightPos", LightPos); - glEnable(GL_FRAGMENT_PROGRAM_NV); - glEnable(GL_VERTEX_PROGRAM_NV); - glDisable(GL_LIGHTING); - } - else { - glLightfv(GL_LIGHT0, GL_POSITION, LightPos); - glDisable(GL_FRAGMENT_PROGRAM_NV); - glDisable(GL_VERTEX_PROGRAM_NV); - glEnable(GL_LIGHTING); - } - - glPushMatrix(); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - -#if 1 - glutSolidSphere(2.0, 10, 5); -#else - { - GLUquadricObj *q = gluNewQuadric(); - gluQuadricNormals(q, GL_SMOOTH); - gluQuadricTexture(q, GL_TRUE); - glRotatef(90, 1, 0, 0); - glTranslatef(0, 0, -1); - gluCylinder(q, 1.0, 1.0, 2.0, 24, 1); - gluDeleteQuadric(q); - } -#endif - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Idle(void) -{ - LightPos[0] += Delta; - if (LightPos[0] > 25.0) - Delta = -1.0; - else if (LightPos[0] <- 25.0) - Delta = 1.0; - glutPostRedisplay(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - /*glOrtho( -2.0, 2.0, -2.0, 2.0, 5.0, 25.0 );*/ - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case ' ': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 'x': - LightPos[0] -= 1.0; - break; - case 'X': - LightPos[0] += 1.0; - break; - case 'w': - Wire = !Wire; - if (Wire) - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - else - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - break; - case 'p': - PixelLight = !PixelLight; - if (PixelLight) { - printf("Per-pixel lighting\n"); - } - else { - printf("Conventional lighting\n"); - } - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - -static void SpecialKey( int key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - Xrot -= step; - break; - case GLUT_KEY_DOWN: - Xrot += step; - break; - case GLUT_KEY_LEFT: - Yrot -= step; - break; - case GLUT_KEY_RIGHT: - Yrot += step; - break; - } - glutPostRedisplay(); -} - - -static void Init( int argc, char *argv[] ) -{ - static const char *fragProgramText = - "!!FP1.0\n" - "DECLARE Diffuse; \n" - "DECLARE Specular; \n" - "DECLARE LightPos; \n" - - "# Compute normalized LightPos, put it in R0\n" - "DP3 R0.x, LightPos, LightPos;\n" - "RSQ R0.y, R0.x;\n" - "MUL R0, LightPos, R0.y;\n" - - "# Compute normalized normal, put it in R1\n" - "DP3 R1, f[TEX0], f[TEX0]; \n" - "RSQ R1.y, R1.x;\n" - "MUL R1, f[TEX0], R1.y;\n" - - "# Compute dot product of light direction and normal vector\n" - "DP3 R2, R0, R1;\n" - - "MUL R3, Diffuse, R2; # diffuse attenuation\n" - - "POW R4, R2.x, {20.0}.x; # specular exponent\n" - - "MUL R5, Specular, R4; # specular attenuation\n" - - "ADD o[COLR], R3, R5; # add diffuse and specular colors\n" - "END \n" - ; - - static const char *vertProgramText = - "!!VP1.0\n" - "# typical modelview/projection transform\n" - "DP4 o[HPOS].x, c[0], v[OPOS] ;\n" - "DP4 o[HPOS].y, c[1], v[OPOS] ;\n" - "DP4 o[HPOS].z, c[2], v[OPOS] ;\n" - "DP4 o[HPOS].w, c[3], v[OPOS] ;\n" - "# transform normal by inv transpose of modelview, put in tex0\n" - "DP4 o[TEX0].x, c[4], v[NRML] ;\n" - "DP4 o[TEX0].y, c[5], v[NRML] ;\n" - "DP4 o[TEX0].z, c[6], v[NRML] ;\n" - "DP4 o[TEX0].w, c[7], v[NRML] ;\n" - "END\n"; - ; - - if (!glutExtensionSupported("GL_NV_vertex_program")) { - printf("Sorry, this demo requires GL_NV_vertex_program\n"); - exit(1); - } - if (!glutExtensionSupported("GL_NV_fragment_program")) { - printf("Sorry, this demo requires GL_NV_fragment_program\n"); - exit(1); - } - - glGenProgramsNV(1, &FragProg); - assert(FragProg > 0); - glGenProgramsNV(1, &VertProg); - assert(VertProg > 0); - - /* - * Fragment program - */ - glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, FragProg, - strlen(fragProgramText), - (const GLubyte *) fragProgramText); - assert(glIsProgramNV(FragProg)); - glBindProgramNV(GL_FRAGMENT_PROGRAM_NV, FragProg); - - NAMED_PARAMETER4FV(FragProg, "Diffuse", Diffuse); - NAMED_PARAMETER4FV(FragProg, "Specular", Specular); - - /* - * Vertex program - */ - glLoadProgramNV(GL_VERTEX_PROGRAM_NV, VertProg, - strlen(vertProgramText), - (const GLubyte *) vertProgramText); - assert(glIsProgramNV(VertProg)); - glBindProgramNV(GL_VERTEX_PROGRAM_NV, VertProg); - glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 0, GL_MODELVIEW_PROJECTION_NV, GL_IDENTITY_NV); - glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 4, GL_MODELVIEW, GL_INVERSE_TRANSPOSE_NV); - - /* - * Misc init - */ - glClearColor(0.3, 0.3, 0.3, 0.0); - glEnable(GL_DEPTH_TEST); - glEnable(GL_LIGHT0); - glEnable(GL_LIGHTING); - glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, Diffuse); - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, Specular); - glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 20.0); - - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("Press p to toggle between per-pixel and per-vertex lighting\n"); - -#ifdef GL_MESA_program_debug - if (argc > 1 && strcmp(argv[1], "fragment") == 0) { - printf(">> Debugging fragment program\n"); - glProgramCallbackMESA(GL_FRAGMENT_PROGRAM_ARB, Debugger2, - (GLvoid *) fragProgramText); - glEnable(GL_FRAGMENT_PROGRAM_CALLBACK_MESA); - } - else { - printf(">> Debugging vertex program\n"); - glProgramCallbackMESA(GL_VERTEX_PROGRAM_ARB, Debugger2, - (GLvoid *) fragProgramText); - glEnable(GL_VERTEX_PROGRAM_CALLBACK_MESA); - } -#endif -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 200, 200 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - if (Anim) - glutIdleFunc(Idle); - Init(argc, argv); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/descrip.mms b/nx-X11/extras/Mesa_6.4.2/progs/tests/descrip.mms deleted file mode 100644 index b0ff2610d1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/descrip.mms +++ /dev/null @@ -1,84 +0,0 @@ -# Makefile for GLUT-based demo programs for VMS -# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl - - -.first - define gl [--.include.gl] - -.include [--]mms-config. - -##### MACROS ##### - -INCDIR = ([--.include],[-.util]) -CFLAGS = /include=$(INCDIR)/prefix=all/name=(as_is,short) - -.ifdef SHARE -GL_LIBS = $(XLIBS) -.else -GL_LIBS = [--.lib]libGLUT/l,libMesaGLU/l,libMesaGL/l,$(XLIBS) -.endif - -LIB_DEP = [--.lib]$(GL_LIB) [--.lib]$(GLU_LIB) [--.lib]$(GLUT_LIB) - -PROGS = cva.exe,\ - dinoshade.exe,\ - fogcoord.exe,\ - manytex.exe,\ - multipal.exe,\ - projtex.exe,\ - seccolor.exe,\ - sharedtex.exe,\ - texline.exe,\ - texwrap.exe,\ - vptest1.exe,\ - vptest2.exe,\ - vptest3.exe,\ - vptorus.exe,\ - vpwarpmesh.exe - -##### RULES ##### -.obj.exe : - cxxlink $(MMS$TARGET_NAME),$(GL_LIBS) - -##### TARGETS ##### -default : - $(MMS)$(MMSQUALIFIERS) $(PROGS) - -clean : - delete *.obj;* - -realclean : - delete $(PROGS) - delete *.obj;* - -cva.exe : cva.obj $(LIB_DEP) -dinoshade.exe : dinoshade.obj $(LIB_DEP) -fogcoord.exe : fogcoord.obj $(LIB_DEP) -manytex.exe : manytex.obj $(LIB_DEP) -multipal.exe : multipal.obj $(LIB_DEP) -projtex.exe : projtex.obj $(LIB_DEP) -seccolor.exe : seccolor.obj $(LIB_DEP) -sharedtex.exe : sharedtex.obj $(LIB_DEP) -texline.exe : texline.obj $(LIB_DEP) -texwrap.exe : texwrap.obj $(LIB_DEP) -vptest1.exe : vptest1.obj $(LIB_DEP) -vptest2.exe : vptest2.obj $(LIB_DEP) -vptest3.exe : vptest3.obj $(LIB_DEP) -vptorus.exe : vptorus.obj $(LIB_DEP) -vpwarpmesh.exe : vpwarpmesh.obj $(LIB_DEP) - -cva.obj : cva.c -dinoshade.obj : dinoshade.c -fogcoord.obj : fogcoord.c -manytex.obj : manytex.c -multipal.obj : multipal.c -projtex.obj : projtex.c -seccolor.obj : seccolor.c -sharedtex.obj : sharedtex.c -texline.obj : texline.c -texwrap.obj : texwrap.c -vptest1.obj : vptest1.c -vptest2.obj : vptest2.c -vptest3.obj : vptest3.c -vptorus.obj : vptorus.c -vpwarpmesh.obj : vpwarpmesh.c diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/dinoshade.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/dinoshade.c deleted file mode 100644 index ed7b879bc7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/dinoshade.c +++ /dev/null @@ -1,914 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -/* Example for PC game developers to show how to *combine* texturing, - reflections, and projected shadows all in real-time with OpenGL. - Robust reflections use stenciling. Robust projected shadows - use both stenciling and polygon offset. PC game programmers - should realize that neither stenciling nor polygon offset are - supported by Direct3D, so these real-time rendering algorithms - are only really viable with OpenGL. - - The program has modes for disabling the stenciling and polygon - offset uses. It is worth running this example with these features - toggled off so you can see the sort of artifacts that result. - - Notice that the floor texturing, reflections, and shadowing - all co-exist properly. */ - -/* When you run this program: Left mouse button controls the - view. Middle mouse button controls light position (left & - right rotates light around dino; up & down moves light - position up and down). Right mouse button pops up menu. */ - -/* Check out the comments in the "redraw" routine to see how the - reflection blending and surface stenciling is done. You can - also see in "redraw" how the projected shadows are rendered, - including the use of stenciling and polygon offset. */ - -/* This program is derived from glutdino.c */ - -/* Compile: cc -o dinoshade dinoshade.c -lglut -lGLU -lGL -lXmu -lXext -lX11 -lm */ - -#include -#include -#include -#include /* for cos(), sin(), and sqrt() */ -#ifdef __VMS -# include /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */ -#else -# include /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */ -#endif -#ifdef _WIN32 -#include -#endif -#define GL_GLEXT_LEGACY -#include /* OpenGL Utility Toolkit header */ - -/* Some files do not define M_PI... */ -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -/* Variable controlling various rendering modes. */ -static int stencilReflection = 1, stencilShadow = 1, offsetShadow = 1; -static int renderShadow = 1, renderDinosaur = 1, renderReflection = 1; -static int linearFiltering = 0, useMipmaps = 0, useTexture = 1; -static int reportSpeed = 0; -static int animation = 1; -static GLboolean lightSwitch = GL_TRUE; -static int directionalLight = 1; -static int forceExtension = 0; - -/* Time varying or user-controled variables. */ -static float jump = 0.0; -static float lightAngle = 0.0, lightHeight = 20; -GLfloat angle = -150; /* in degrees */ -GLfloat angle2 = 30; /* in degrees */ - -int moving, startx, starty; -int lightMoving = 0, lightStartX, lightStartY; - -enum { - MISSING, EXTENSION, ONE_DOT_ONE -}; -int polygonOffsetVersion; - -static GLdouble bodyWidth = 3.0; -/* *INDENT-OFF* */ -static GLfloat body[][2] = { {0, 3}, {1, 1}, {5, 1}, {8, 4}, {10, 4}, {11, 5}, - {11, 11.5}, {13, 12}, {13, 13}, {10, 13.5}, {13, 14}, {13, 15}, {11, 16}, - {8, 16}, {7, 15}, {7, 13}, {8, 12}, {7, 11}, {6, 6}, {4, 3}, {3, 2}, - {1, 2} }; -static GLfloat arm[][2] = { {8, 10}, {9, 9}, {10, 9}, {13, 8}, {14, 9}, {16, 9}, - {15, 9.5}, {16, 10}, {15, 10}, {15.5, 11}, {14.5, 10}, {14, 11}, {14, 10}, - {13, 9}, {11, 11}, {9, 11} }; -static GLfloat leg[][2] = { {8, 6}, {8, 4}, {9, 3}, {9, 2}, {8, 1}, {8, 0.5}, {9, 0}, - {12, 0}, {10, 1}, {10, 2}, {12, 4}, {11, 6}, {10, 7}, {9, 7} }; -static GLfloat eye[][2] = { {8.75, 15}, {9, 14.7}, {9.6, 14.7}, {10.1, 15}, - {9.6, 15.25}, {9, 15.25} }; -static GLfloat lightPosition[4]; -static GLfloat lightColor[] = {0.8, 1.0, 0.8, 1.0}; /* green-tinted */ -static GLfloat skinColor[] = {0.1, 1.0, 0.1, 1.0}, eyeColor[] = {1.0, 0.2, 0.2, 1.0}; -/* *INDENT-ON* */ - -/* Nice floor texture tiling pattern. */ -static char *circles[] = { - "....xxxx........", - "..xxxxxxxx......", - ".xxxxxxxxxx.....", - ".xxx....xxx.....", - "xxx......xxx....", - "xxx......xxx....", - "xxx......xxx....", - "xxx......xxx....", - ".xxx....xxx.....", - ".xxxxxxxxxx.....", - "..xxxxxxxx......", - "....xxxx........", - "................", - "................", - "................", - "................", -}; - -static void -makeFloorTexture(void) -{ - GLubyte floorTexture[16][16][3]; - GLubyte *loc; - int s, t; - - /* Setup RGB image for the texture. */ - loc = (GLubyte*) floorTexture; - for (t = 0; t < 16; t++) { - for (s = 0; s < 16; s++) { - if (circles[t][s] == 'x') { - /* Nice green. */ - loc[0] = 0x1f; - loc[1] = 0x8f; - loc[2] = 0x1f; - } else { - /* Light gray. */ - loc[0] = 0xaa; - loc[1] = 0xaa; - loc[2] = 0xaa; - } - loc += 3; - } - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - if (useMipmaps) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR_MIPMAP_LINEAR); - gluBuild2DMipmaps(GL_TEXTURE_2D, 3, 16, 16, - GL_RGB, GL_UNSIGNED_BYTE, floorTexture); - } else { - if (linearFiltering) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - } else { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - } - glTexImage2D(GL_TEXTURE_2D, 0, 3, 16, 16, 0, - GL_RGB, GL_UNSIGNED_BYTE, floorTexture); - } -} - -enum { - X, Y, Z, W -}; -enum { - A, B, C, D -}; - -/* Create a matrix that will project the desired shadow. */ -void -shadowMatrix(GLfloat shadowMat[4][4], - GLfloat groundplane[4], - GLfloat lightpos[4]) -{ - GLfloat dot; - - /* Find dot product between light position vector and ground plane normal. */ - dot = groundplane[X] * lightpos[X] + - groundplane[Y] * lightpos[Y] + - groundplane[Z] * lightpos[Z] + - groundplane[W] * lightpos[W]; - - shadowMat[0][0] = dot - lightpos[X] * groundplane[X]; - shadowMat[1][0] = 0.f - lightpos[X] * groundplane[Y]; - shadowMat[2][0] = 0.f - lightpos[X] * groundplane[Z]; - shadowMat[3][0] = 0.f - lightpos[X] * groundplane[W]; - - shadowMat[X][1] = 0.f - lightpos[Y] * groundplane[X]; - shadowMat[1][1] = dot - lightpos[Y] * groundplane[Y]; - shadowMat[2][1] = 0.f - lightpos[Y] * groundplane[Z]; - shadowMat[3][1] = 0.f - lightpos[Y] * groundplane[W]; - - shadowMat[X][2] = 0.f - lightpos[Z] * groundplane[X]; - shadowMat[1][2] = 0.f - lightpos[Z] * groundplane[Y]; - shadowMat[2][2] = dot - lightpos[Z] * groundplane[Z]; - shadowMat[3][2] = 0.f - lightpos[Z] * groundplane[W]; - - shadowMat[X][3] = 0.f - lightpos[W] * groundplane[X]; - shadowMat[1][3] = 0.f - lightpos[W] * groundplane[Y]; - shadowMat[2][3] = 0.f - lightpos[W] * groundplane[Z]; - shadowMat[3][3] = dot - lightpos[W] * groundplane[W]; - -} - -/* Find the plane equation given 3 points. */ -void -findPlane(GLfloat plane[4], - GLfloat v0[3], GLfloat v1[3], GLfloat v2[3]) -{ - GLfloat vec0[3], vec1[3]; - - /* Need 2 vectors to find cross product. */ - vec0[X] = v1[X] - v0[X]; - vec0[Y] = v1[Y] - v0[Y]; - vec0[Z] = v1[Z] - v0[Z]; - - vec1[X] = v2[X] - v0[X]; - vec1[Y] = v2[Y] - v0[Y]; - vec1[Z] = v2[Z] - v0[Z]; - - /* find cross product to get A, B, and C of plane equation */ - plane[A] = vec0[Y] * vec1[Z] - vec0[Z] * vec1[Y]; - plane[B] = -(vec0[X] * vec1[Z] - vec0[Z] * vec1[X]); - plane[C] = vec0[X] * vec1[Y] - vec0[Y] * vec1[X]; - - plane[D] = -(plane[A] * v0[X] + plane[B] * v0[Y] + plane[C] * v0[Z]); -} - -void -extrudeSolidFromPolygon(GLfloat data[][2], unsigned int dataSize, - GLdouble thickness, GLuint side, GLuint edge, GLuint whole) -{ - static GLUtriangulatorObj *tobj = NULL; - GLdouble vertex[3], dx, dy, len; - int i; - int count = (int) (dataSize / (2 * sizeof(GLfloat))); - - if (tobj == NULL) { - tobj = gluNewTess(); /* create and initialize a GLU - polygon tesselation object */ - gluTessCallback(tobj, GLU_BEGIN, glBegin); - gluTessCallback(tobj, GLU_VERTEX, glVertex2fv); /* semi-tricky */ - gluTessCallback(tobj, GLU_END, glEnd); - } - glNewList(side, GL_COMPILE); - glShadeModel(GL_SMOOTH); /* smooth minimizes seeing - tessellation */ - gluBeginPolygon(tobj); - for (i = 0; i < count; i++) { - vertex[0] = data[i][0]; - vertex[1] = data[i][1]; - vertex[2] = 0; - gluTessVertex(tobj, vertex, data[i]); - } - gluEndPolygon(tobj); - glEndList(); - glNewList(edge, GL_COMPILE); - glShadeModel(GL_FLAT); /* flat shade keeps angular hands - from being "smoothed" */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= count; i++) { -#if 1 /* weird, but seems to be legal */ - /* mod function handles closing the edge */ - glVertex3f(data[i % count][0], data[i % count][1], 0.0); - glVertex3f(data[i % count][0], data[i % count][1], thickness); - /* Calculate a unit normal by dividing by Euclidean - distance. We * could be lazy and use - glEnable(GL_NORMALIZE) so we could pass in * arbitrary - normals for a very slight performance hit. */ - dx = data[(i + 1) % count][1] - data[i % count][1]; - dy = data[i % count][0] - data[(i + 1) % count][0]; - len = sqrt(dx * dx + dy * dy); - glNormal3f(dx / len, dy / len, 0.0); -#else /* the nice way of doing it */ - /* Calculate a unit normal by dividing by Euclidean - distance. We * could be lazy and use - glEnable(GL_NORMALIZE) so we could pass in * arbitrary - normals for a very slight performance hit. */ - dx = data[i % count][1] - data[(i - 1 + count) % count][1]; - dy = data[(i - 1 + count) % count][0] - data[i % count][0]; - len = sqrt(dx * dx + dy * dy); - glNormal3f(dx / len, dy / len, 0.0); - /* mod function handles closing the edge */ - glVertex3f(data[i % count][0], data[i % count][1], 0.0); - glVertex3f(data[i % count][0], data[i % count][1], thickness); -#endif - } - glEnd(); - glEndList(); - glNewList(whole, GL_COMPILE); - glFrontFace(GL_CW); - glCallList(edge); - glNormal3f(0.0, 0.0, -1.0); /* constant normal for side */ - glCallList(side); - glPushMatrix(); - glTranslatef(0.0, 0.0, thickness); - glFrontFace(GL_CCW); - glNormal3f(0.0, 0.0, 1.0); /* opposite normal for other side */ - glCallList(side); - glPopMatrix(); - glEndList(); -} - -/* Enumerants for refering to display lists. */ -typedef enum { - RESERVED, BODY_SIDE, BODY_EDGE, BODY_WHOLE, ARM_SIDE, ARM_EDGE, ARM_WHOLE, - LEG_SIDE, LEG_EDGE, LEG_WHOLE, EYE_SIDE, EYE_EDGE, EYE_WHOLE -} displayLists; - -static void -makeDinosaur(void) -{ - extrudeSolidFromPolygon(body, sizeof(body), bodyWidth, - BODY_SIDE, BODY_EDGE, BODY_WHOLE); - extrudeSolidFromPolygon(arm, sizeof(arm), bodyWidth / 4, - ARM_SIDE, ARM_EDGE, ARM_WHOLE); - extrudeSolidFromPolygon(leg, sizeof(leg), bodyWidth / 2, - LEG_SIDE, LEG_EDGE, LEG_WHOLE); - extrudeSolidFromPolygon(eye, sizeof(eye), bodyWidth + 0.2, - EYE_SIDE, EYE_EDGE, EYE_WHOLE); -} - -static void -drawDinosaur(void) - -{ - glPushMatrix(); - /* Translate the dinosaur to be at (0,8,0). */ - glTranslatef(-8, 0, -bodyWidth / 2); - glTranslatef(0.0, jump, 0.0); - glMaterialfv(GL_FRONT, GL_DIFFUSE, skinColor); - glCallList(BODY_WHOLE); - glTranslatef(0.0, 0.0, bodyWidth); - glCallList(ARM_WHOLE); - glCallList(LEG_WHOLE); - glTranslatef(0.0, 0.0, -bodyWidth - bodyWidth / 4); - glCallList(ARM_WHOLE); - glTranslatef(0.0, 0.0, -bodyWidth / 4); - glCallList(LEG_WHOLE); - glTranslatef(0.0, 0.0, bodyWidth / 2 - 0.1); - glMaterialfv(GL_FRONT, GL_DIFFUSE, eyeColor); - glCallList(EYE_WHOLE); - glPopMatrix(); -} - -static GLfloat floorVertices[4][3] = { - { -20.0, 0.0, 20.0 }, - { 20.0, 0.0, 20.0 }, - { 20.0, 0.0, -20.0 }, - { -20.0, 0.0, -20.0 }, -}; - -/* Draw a floor (possibly textured). */ -static void -drawFloor(void) -{ - glDisable(GL_LIGHTING); - - if (useTexture) { - glEnable(GL_TEXTURE_2D); - } - - glBegin(GL_QUADS); - glTexCoord2f(0.0, 0.0); - glVertex3fv(floorVertices[0]); - glTexCoord2f(0.0, 16.0); - glVertex3fv(floorVertices[1]); - glTexCoord2f(16.0, 16.0); - glVertex3fv(floorVertices[2]); - glTexCoord2f(16.0, 0.0); - glVertex3fv(floorVertices[3]); - glEnd(); - - if (useTexture) { - glDisable(GL_TEXTURE_2D); - } - - glEnable(GL_LIGHTING); -} - -static GLfloat floorPlane[4]; -static GLfloat floorShadow[4][4]; - -static void -redraw(void) -{ - int start, end; - - if (reportSpeed) { - start = glutGet(GLUT_ELAPSED_TIME); - } - - /* Clear; default stencil clears to zero. */ - if ((stencilReflection && renderReflection) || (stencilShadow && renderShadow)) { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - } else { - /* Avoid clearing stencil when not using it. */ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - } - - /* Reposition the light source. */ - lightPosition[0] = 12*cos(lightAngle); - lightPosition[1] = lightHeight; - lightPosition[2] = 12*sin(lightAngle); - if (directionalLight) { - lightPosition[3] = 0.0; - } else { - lightPosition[3] = 1.0; - } - - shadowMatrix(floorShadow, floorPlane, lightPosition); - - glPushMatrix(); - /* Perform scene rotations based on user mouse input. */ - glRotatef(angle2, 1.0, 0.0, 0.0); - glRotatef(angle, 0.0, 1.0, 0.0); - - /* Tell GL new light source position. */ - glLightfv(GL_LIGHT0, GL_POSITION, lightPosition); - - if (renderReflection) { - if (stencilReflection) { - /* We can eliminate the visual "artifact" of seeing the "flipped" - dinosaur underneath the floor by using stencil. The idea is - draw the floor without color or depth update but so that - a stencil value of one is where the floor will be. Later when - rendering the dinosaur reflection, we will only update pixels - with a stencil value of 1 to make sure the reflection only - lives on the floor, not below the floor. */ - - /* Don't update color or depth. */ - glDisable(GL_DEPTH_TEST); - glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); - - /* Draw 1 into the stencil buffer. */ - glEnable(GL_STENCIL_TEST); - glStencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE); - glStencilFunc(GL_ALWAYS, 1, 0xffffffff); - - /* Now render floor; floor pixels just get their stencil set to 1. */ - drawFloor(); - - /* Re-enable update of color and depth. */ - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); - glEnable(GL_DEPTH_TEST); - - /* Now, only render where stencil is set to 1. */ - glStencilFunc(GL_EQUAL, 1, 0xffffffff); /* draw if ==1 */ - glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); - } - - glPushMatrix(); - - /* The critical reflection step: Reflect dinosaur through the floor - (the Y=0 plane) to make a relection. */ - glScalef(1.0, -1.0, 1.0); - - /* Reflect the light position. */ - glLightfv(GL_LIGHT0, GL_POSITION, lightPosition); - - /* To avoid our normals getting reversed and hence botched lighting - on the reflection, turn on normalize. */ - glEnable(GL_NORMALIZE); - glCullFace(GL_FRONT); - - /* Draw the reflected dinosaur. */ - drawDinosaur(); - - /* Disable noramlize again and re-enable back face culling. */ - glDisable(GL_NORMALIZE); - glCullFace(GL_BACK); - - glPopMatrix(); - - /* Switch back to the unreflected light position. */ - glLightfv(GL_LIGHT0, GL_POSITION, lightPosition); - - if (stencilReflection) { - glDisable(GL_STENCIL_TEST); - } - } - - /* Back face culling will get used to only draw either the top or the - bottom floor. This let's us get a floor with two distinct - appearances. The top floor surface is reflective and kind of red. - The bottom floor surface is not reflective and blue. */ - - /* Draw "bottom" of floor in blue. */ - glFrontFace(GL_CW); /* Switch face orientation. */ - glColor4f(0.1, 0.1, 0.7, 1.0); - drawFloor(); - glFrontFace(GL_CCW); - - if (renderShadow) { - if (stencilShadow) { - /* Draw the floor with stencil value 3. This helps us only - draw the shadow once per floor pixel (and only on the - floor pixels). */ - glEnable(GL_STENCIL_TEST); - glStencilFunc(GL_ALWAYS, 3, 0xffffffff); - glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - } - } - - /* Draw "top" of floor. Use blending to blend in reflection. */ - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glColor4f(0.7, 0.0, 0.0, 0.3); - glColor4f(1.0, 1.0, 1.0, 0.3); - drawFloor(); - glDisable(GL_BLEND); - - if (renderDinosaur) { - /* Draw "actual" dinosaur, not its reflection. */ - drawDinosaur(); - } - - if (renderShadow) { - - /* Render the projected shadow. */ - - if (stencilShadow) { - - /* Now, only render where stencil is set above 2 (ie, 3 where - the top floor is). Update stencil with 2 where the shadow - gets drawn so we don't redraw (and accidently reblend) the - shadow). */ - glStencilFunc(GL_LESS, 2, 0xffffffff); /* draw if ==1 */ - glStencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE); - } - - /* To eliminate depth buffer artifacts, we use polygon offset - to raise the depth of the projected shadow slightly so - that it does not depth buffer alias with the floor. */ - if (offsetShadow) { - switch (polygonOffsetVersion) { - case EXTENSION: -#ifdef GL_EXT_polygon_offset - glEnable(GL_POLYGON_OFFSET_EXT); - break; -#endif -#ifdef GL_VERSION_1_1 - case ONE_DOT_ONE: - glEnable(GL_POLYGON_OFFSET_FILL); - break; -#endif - case MISSING: - /* Oh well. */ - break; - } - } - - /* Render 50% black shadow color on top of whatever the - floor appareance is. */ - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glDisable(GL_LIGHTING); /* Force the 50% black. */ - glColor4f(0.0, 0.0, 0.0, 0.5); - - glPushMatrix(); - /* Project the shadow. */ - glMultMatrixf((GLfloat *) floorShadow); - drawDinosaur(); - glPopMatrix(); - - glDisable(GL_BLEND); - glEnable(GL_LIGHTING); - - if (offsetShadow) { - switch (polygonOffsetVersion) { -#ifdef GL_EXT_polygon_offset - case EXTENSION: - glDisable(GL_POLYGON_OFFSET_EXT); - break; -#endif -#ifdef GL_VERSION_1_1 - case ONE_DOT_ONE: - glDisable(GL_POLYGON_OFFSET_FILL); - break; -#endif - case MISSING: - /* Oh well. */ - break; - } - } - if (stencilShadow) { - glDisable(GL_STENCIL_TEST); - } - } - - glPushMatrix(); - glDisable(GL_LIGHTING); - glColor3f(1.0, 1.0, 0.0); - if (directionalLight) { - /* Draw an arrowhead. */ - glDisable(GL_CULL_FACE); - glTranslatef(lightPosition[0], lightPosition[1], lightPosition[2]); - glRotatef(lightAngle * -180.0 / M_PI, 0, 1, 0); - glRotatef(atan(lightHeight/12) * 180.0 / M_PI, 0, 0, 1); - glBegin(GL_TRIANGLE_FAN); - glVertex3f(0, 0, 0); - glVertex3f(2, 1, 1); - glVertex3f(2, -1, 1); - glVertex3f(2, -1, -1); - glVertex3f(2, 1, -1); - glVertex3f(2, 1, 1); - glEnd(); - /* Draw a white line from light direction. */ - glColor3f(1.0, 1.0, 1.0); - glBegin(GL_LINES); - glVertex3f(0, 0, 0); - glVertex3f(5, 0, 0); - glEnd(); - glEnable(GL_CULL_FACE); - } else { - /* Draw a yellow ball at the light source. */ - glTranslatef(lightPosition[0], lightPosition[1], lightPosition[2]); - glutSolidSphere(1.0, 5, 5); - } - glEnable(GL_LIGHTING); - glPopMatrix(); - - glPopMatrix(); - - if (reportSpeed) { - glFinish(); - end = glutGet(GLUT_ELAPSED_TIME); - printf("Speed %.3g frames/sec (%d ms)\n", 1000.0/(end-start), end-start); - } - - glutSwapBuffers(); -} - -/* ARGSUSED2 */ -static void -mouse(int button, int state, int x, int y) -{ - if (button == GLUT_LEFT_BUTTON) { - if (state == GLUT_DOWN) { - moving = 1; - startx = x; - starty = y; - } - if (state == GLUT_UP) { - moving = 0; - } - } - if (button == GLUT_MIDDLE_BUTTON) { - if (state == GLUT_DOWN) { - lightMoving = 1; - lightStartX = x; - lightStartY = y; - } - if (state == GLUT_UP) { - lightMoving = 0; - } - } -} - -/* ARGSUSED1 */ -static void -motion(int x, int y) -{ - if (moving) { - angle = angle + (x - startx); - angle2 = angle2 + (y - starty); - startx = x; - starty = y; - glutPostRedisplay(); - } - if (lightMoving) { - lightAngle += (x - lightStartX)/40.0; - lightHeight += (lightStartY - y)/20.0; - lightStartX = x; - lightStartY = y; - glutPostRedisplay(); - } -} - -/* Advance time varying state when idle callback registered. */ -static void -idle(void) -{ - static float time = 0.0; - - time = glutGet(GLUT_ELAPSED_TIME) / 500.0; - - jump = 4.0 * fabs(sin(time)*0.5); - if (!lightMoving) { - lightAngle += 0.03; - } - glutPostRedisplay(); -} - -enum { - M_NONE, M_MOTION, M_LIGHT, M_TEXTURE, M_SHADOWS, M_REFLECTION, M_DINOSAUR, - M_STENCIL_REFLECTION, M_STENCIL_SHADOW, M_OFFSET_SHADOW, - M_POSITIONAL, M_DIRECTIONAL, M_PERFORMANCE -}; - -static void -controlLights(int value) -{ - switch (value) { - case M_NONE: - return; - case M_MOTION: - animation = 1 - animation; - if (animation) { - glutIdleFunc(idle); - } else { - glutIdleFunc(NULL); - } - break; - case M_LIGHT: - lightSwitch = !lightSwitch; - if (lightSwitch) { - glEnable(GL_LIGHT0); - } else { - glDisable(GL_LIGHT0); - } - break; - case M_TEXTURE: - useTexture = !useTexture; - break; - case M_SHADOWS: - renderShadow = 1 - renderShadow; - break; - case M_REFLECTION: - renderReflection = 1 - renderReflection; - break; - case M_DINOSAUR: - renderDinosaur = 1 - renderDinosaur; - break; - case M_STENCIL_REFLECTION: - stencilReflection = 1 - stencilReflection; - break; - case M_STENCIL_SHADOW: - stencilShadow = 1 - stencilShadow; - break; - case M_OFFSET_SHADOW: - offsetShadow = 1 - offsetShadow; - break; - case M_POSITIONAL: - directionalLight = 0; - break; - case M_DIRECTIONAL: - directionalLight = 1; - break; - case M_PERFORMANCE: - reportSpeed = 1 - reportSpeed; - break; - } - glutPostRedisplay(); -} - -/* When not visible, stop animating. Restart when visible again. */ -static void -visible(int vis) -{ - if (vis == GLUT_VISIBLE) { - if (animation) - glutIdleFunc(idle); - } else { - if (!animation) - glutIdleFunc(NULL); - } -} - -/* Press any key to redraw; good when motion stopped and - performance reporting on. */ -/* ARGSUSED */ -static void -key(unsigned char c, int x, int y) -{ - if (c == 27) { - exit(0); /* IRIS GLism, Escape quits. */ - } - glutPostRedisplay(); -} - -/* Press any key to redraw; good when motion stopped and - performance reporting on. */ -/* ARGSUSED */ -static void -special(int k, int x, int y) -{ - glutPostRedisplay(); -} - -static int -supportsOneDotOne(void) -{ - const char *version; - int major, minor; - - version = (char *) glGetString(GL_VERSION); - if (sscanf(version, "%d.%d", &major, &minor) == 2) - return major >= 1 && minor >= 1; - return 0; /* OpenGL version string malformed! */ -} - -int -main(int argc, char **argv) -{ - int i; - - glutInit(&argc, argv); - - for (i=1; i=2 rgb double depth"); -#endif - - glutCreateWindow("Shadowy Leapin' Lizards"); - - if (glutGet(GLUT_WINDOW_STENCIL_SIZE) <= 1) { - printf("dinoshade: Sorry, I need at least 2 bits of stencil.\n"); - exit(1); - } - - /* Register GLUT callbacks. */ - glutDisplayFunc(redraw); - glutMouseFunc(mouse); - glutMotionFunc(motion); - glutVisibilityFunc(visible); - glutKeyboardFunc(key); - glutSpecialFunc(special); - - glutCreateMenu(controlLights); - - glutAddMenuEntry("Toggle motion", M_MOTION); - glutAddMenuEntry("-----------------------", M_NONE); - glutAddMenuEntry("Toggle light", M_LIGHT); - glutAddMenuEntry("Toggle texture", M_TEXTURE); - glutAddMenuEntry("Toggle shadows", M_SHADOWS); - glutAddMenuEntry("Toggle reflection", M_REFLECTION); - glutAddMenuEntry("Toggle dinosaur", M_DINOSAUR); - glutAddMenuEntry("-----------------------", M_NONE); - glutAddMenuEntry("Toggle reflection stenciling", M_STENCIL_REFLECTION); - glutAddMenuEntry("Toggle shadow stenciling", M_STENCIL_SHADOW); - glutAddMenuEntry("Toggle shadow offset", M_OFFSET_SHADOW); - glutAddMenuEntry("----------------------", M_NONE); - glutAddMenuEntry("Positional light", M_POSITIONAL); - glutAddMenuEntry("Directional light", M_DIRECTIONAL); - glutAddMenuEntry("-----------------------", M_NONE); - glutAddMenuEntry("Toggle performance", M_PERFORMANCE); - glutAttachMenu(GLUT_RIGHT_BUTTON); - makeDinosaur(); - -#ifdef GL_VERSION_1_1 - if (supportsOneDotOne() && !forceExtension) { - polygonOffsetVersion = ONE_DOT_ONE; - glPolygonOffset(-2.0, -9.0); - } else -#endif - { -#ifdef GL_EXT_polygon_offset - /* check for the polygon offset extension */ - if (glutExtensionSupported("GL_EXT_polygon_offset")) { - polygonOffsetVersion = EXTENSION; - glPolygonOffsetEXT(-2.0, -0.002); - } else -#endif - { - polygonOffsetVersion = MISSING; - printf("\ndinoshine: Missing polygon offset.\n"); - printf(" Expect shadow depth aliasing artifacts.\n\n"); - } - } - - glEnable(GL_CULL_FACE); - glEnable(GL_DEPTH_TEST); - glEnable(GL_TEXTURE_2D); - glLineWidth(3.0); - - glMatrixMode(GL_PROJECTION); - gluPerspective( /* field of view in degree */ 40.0, - /* aspect ratio */ 1.0, - /* Z near */ 20.0, /* Z far */ 100.0); - glMatrixMode(GL_MODELVIEW); - gluLookAt(0.0, 8.0, 60.0, /* eye is at (0,8,60) */ - 0.0, 8.0, 0.0, /* center is at (0,8,0) */ - 0.0, 1.0, 0.); /* up is in postivie Y direction */ - - glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1); - glLightfv(GL_LIGHT0, GL_DIFFUSE, lightColor); - glLightf(GL_LIGHT0, GL_CONSTANT_ATTENUATION, 0.1); - glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 0.05); - glEnable(GL_LIGHT0); - glEnable(GL_LIGHTING); - - makeFloorTexture(); - - /* Setup floor plane for projected shadow calculations. */ - findPlane(floorPlane, floorVertices[1], floorVertices[2], floorVertices[3]); - - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/ext422square.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/ext422square.c deleted file mode 100644 index 6533514d69..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/ext422square.c +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Exercise the EXT_422_pixels extension, a less convenient - * alternative to MESA_ycbcr_texture. Requires ARB_fragment_program - * to perform the final YUV->RGB conversion. - * - * Brian Paul 13 September 2002 - * Keith Whitwell 30 November 2004 - */ - - -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include -#include - -#include "../util/readtex.c" /* I know, this is a hack. */ - -#define TEXTURE_FILE "../images/tile.rgb" - -static GLfloat Xrot = 0, Yrot = 0, Zrot = 0; -static GLint ImgWidth, ImgHeight; -static GLushort *ImageYUV = NULL; -static const GLuint yuvObj = 100; -static const GLuint rgbObj = 101; - -static void Init( int argc, char *argv[] ); - -static void DrawObject(void) -{ - glBegin(GL_QUADS); - - glTexCoord2f(0, 0); - glVertex2f(-1.0, -1.0); - - glTexCoord2f(1, 0); - glVertex2f(1.0, -1.0); - - glTexCoord2f(1, 1); - glVertex2f(1.0, 1.0); - - glTexCoord2f(0, 1); - glVertex2f(-1.0, 1.0); - - glEnd(); -} - -static void Display( void ) -{ - static int firsttime = 1; - - if (firsttime) { - firsttime = 0; - Init( 0, 0 ); /* don't ask */ - } - - glClear( GL_COLOR_BUFFER_BIT ); - glBindTexture(GL_TEXTURE_2D, yuvObj); - - glPushMatrix(); - glEnable(GL_FRAGMENT_PROGRAM_ARB); - glTranslatef( -1.1, 0.0, -15.0 ); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - glBindTexture(GL_TEXTURE_2D, yuvObj); - DrawObject(); - glPopMatrix(); - - glPushMatrix(); - glDisable(GL_FRAGMENT_PROGRAM_ARB); - glTranslatef( 1.1, 0.0, -15.0 ); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - glBindTexture(GL_TEXTURE_2D, rgbObj); - DrawObject(); - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.1, 1.1, -1.1, 1.1, 10.0, 100.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - float step = 3.0; - (void) x; - (void) y; - - switch (key) { - case GLUT_KEY_UP: - Xrot += step; - break; - case GLUT_KEY_DOWN: - Xrot -= step; - break; - case GLUT_KEY_LEFT: - Yrot += step; - break; - case GLUT_KEY_RIGHT: - Yrot -= step; - break; - } - glutPostRedisplay(); -} - - - - -/* #define LINEAR_FILTER */ - -static void Init( int argc, char *argv[] ) -{ - const char *file; - const GLfloat yuvtorgb[16] = { - 1.164, 1.164, 1.164, 0, - 0, -.391, 2.018, 0, - 1.596, -.813, 0.0, 0, - (-.0625*1.164 + -.5*1.596), (-.0625*1.164 + -.5*-.813 + -.5*-.391), (-.0625*1.164 + -.5*2.018), 1 - }; - - if (!glutExtensionSupported("GL_ARB_fragment_program")) { - printf("Error: GL_ARB_fragment_program not supported!\n"); - exit(1); - } - - if (!glutExtensionSupported("GL_EXT_422_pixels")) { - printf("Error: GL_EXT_422_pixels not supported!\n"); - exit(1); - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - file = TEXTURE_FILE; - - /* Load the texture as YCbCr. - */ - glBindTexture(GL_TEXTURE_2D, yuvObj); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - ImageYUV = LoadYUVImage(file, &ImgWidth, &ImgHeight ); - if (!ImageYUV) { - printf("Couldn't read %s\n", TEXTURE_FILE); - exit(0); - } - - glTexImage2D(GL_TEXTURE_2D, 0, - GL_RGB, - ImgWidth, ImgHeight, 0, - GL_422_EXT, - GL_UNSIGNED_BYTE, ImageYUV); - - glEnable(GL_TEXTURE_2D); - - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - - { - static const char *modulateYUV = - "!!ARBfp1.0\n" - "TEMP R0;\n" - "TEX R0, fragment.texcoord[0], texture[0], 2D; \n" - - "ADD R0, R0, {-0.0625, -0.5, -0.5, 0.0}; \n" - "DP3 result.color.x, R0, {1.164, 1.596, 0.0}; \n" - "DP3 result.color.y, R0, {1.164, -0.813, -0.391}; \n" - "DP3 result.color.z, R0, {1.164, 0.0, 2.018}; \n" - "MOV result.color.w, R0.w; \n" - - "END" - ; - - GLuint modulateProg; - - - /* Setup the fragment program */ - glGenProgramsARB(1, &modulateProg); - glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg); - glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(modulateYUV), (const GLubyte *)modulateYUV); - - printf("glGetError = 0x%x\n", (int) glGetError()); - printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n", - (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB)); - assert(glIsProgramARB(modulateProg)); - - } - - /* Now the same, but use a color matrix to do the conversion at - * upload time: - */ - glBindTexture(GL_TEXTURE_2D, rgbObj); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - glMatrixMode( GL_COLOR_MATRIX ); - glLoadMatrixf( yuvtorgb ); - - glTexImage2D(GL_TEXTURE_2D, 0, - GL_RGB, - ImgWidth, ImgHeight, 0, - GL_422_EXT, - GL_UNSIGNED_BYTE, ImageYUV); - - glLoadIdentity(); - glMatrixMode( GL_MODELVIEW ); - - glEnable(GL_TEXTURE_2D); - - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - - - glShadeModel(GL_FLAT); - glClearColor(0.3, 0.3, 0.4, 1.0); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowSize( 300, 300 ); - glutInitWindowPosition( 0, 0 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0] ); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/fbotest1.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/fbotest1.c deleted file mode 100644 index 3faa55eb90..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/fbotest1.c +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Test GL_EXT_framebuffer_object - * - * Brian Paul - * 7 Feb 2005 - */ - - -#define GL_GLEXT_PROTOTYPES -#include -#include -#include -#include -#include - -static int Width = 400, Height = 400; -static GLuint MyFB; - - -static void -CheckError(int line) -{ - GLenum err = glGetError(); - if (err) { - printf("GL Error 0x%x at line %d\n", (int) err, line); - } -} - - -static void -Display( void ) -{ - GLubyte *buffer = malloc(Width * Height * 4); - GLenum status; - - /* draw to user framebuffer */ - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB); - glDrawBuffer(GL_COLOR_ATTACHMENT1_EXT); - glReadBuffer(GL_COLOR_ATTACHMENT1_EXT); - - status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); - if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { - printf("Framebuffer incomplete!!!\n"); - } - - glClearColor(0.5, 0.5, 1.0, 0.0); - glClear( GL_COLOR_BUFFER_BIT ); - - glBegin(GL_POLYGON); - glColor3f(1, 0, 0); - glVertex2f(-1, -1); - glColor3f(0, 1, 0); - glVertex2f(1, -1); - glColor3f(0, 0, 1); - glVertex2f(0, 1); - glEnd(); - - /* read from user framebuffer */ - glReadPixels(0, 0, Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer); - - /* draw to window */ - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); - glWindowPos2iARB(0, 0); - glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer); - - free(buffer); - glutSwapBuffers(); -} - - -static void -Reshape( int width, int height ) -{ -#if 0 - float ar = (float) width / (float) height; -#endif - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); -#if 0 - glFrustum( -ar, ar, -1.0, 1.0, 5.0, 25.0 ); -#else - glOrtho(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); -#endif - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); - Width = width; - Height = height; - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height); -} - - -static void -Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void -Init( void ) -{ - GLuint rb; - GLint i; - - if (!glutExtensionSupported("GL_EXT_framebuffer_object")) { - printf("GL_EXT_framebuffer_object not found!\n"); - /*exit(0);*/ - } - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - - glGenFramebuffersEXT(1, &MyFB); - assert(MyFB); - assert(!glIsFramebufferEXT(MyFB)); - glDeleteFramebuffersEXT(1, &MyFB); - assert(!glIsFramebufferEXT(MyFB)); - /* Note, continue to use MyFB below */ - - glGenRenderbuffersEXT(1, &rb); - assert(rb); - assert(!glIsRenderbufferEXT(rb)); - glDeleteRenderbuffersEXT(1, &rb); - assert(!glIsRenderbufferEXT(rb)); - rb = 42; /* an arbitrary ID */ - - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB); - assert(glIsFramebufferEXT(MyFB)); - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, rb); - assert(glIsRenderbufferEXT(rb)); - - glGetIntegerv(GL_RENDERBUFFER_BINDING_EXT, &i); - assert(i == rb); - - glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &i); - assert(i == MyFB); - - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT1_EXT, - GL_RENDERBUFFER_EXT, rb); - - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height); - - { - GLint r, g, b, a; - glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT, - GL_RENDERBUFFER_RED_SIZE_EXT, &r); - glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT, - GL_RENDERBUFFER_GREEN_SIZE_EXT, &g); - glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT, - GL_RENDERBUFFER_BLUE_SIZE_EXT, &b); - glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT, - GL_RENDERBUFFER_ALPHA_SIZE_EXT, &a); - printf("renderbuffer RGBA sizes = %d %d %d %d\n", r, g, b, a); - - glGetIntegerv(GL_RED_BITS, &r); - glGetIntegerv(GL_GREEN_BITS, &g); - glGetIntegerv(GL_BLUE_BITS, &b); - glGetIntegerv(GL_ALPHA_BITS, &a); - printf("Visual RGBA sizes = %d %d %d %d\n", r, g, b, a); - } - - CheckError(__LINE__); - - /* restore to default */ - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); -} - - -int -main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize(Width, Height); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/fbotexture.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/fbotexture.c deleted file mode 100644 index f348d202f4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/fbotexture.c +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Test GL_EXT_framebuffer_object render-to-texture - * - * Draw a teapot into a texture image with stenciling. - * Then draw a textured quad using that texture. - * - * Brian Paul - * 18 Apr 2005 - */ - - -#define GL_GLEXT_PROTOTYPES -#include -#include -#include -#include -#include - -static int Width = 400, Height = 400; -static int TexWidth = 512, TexHeight = 512; -static GLuint MyFB; -static GLuint TexObj; -static GLuint DepthRB, StencilRB; -static GLboolean Anim = GL_FALSE; -static GLfloat Rot = 0.0; - - -static void -CheckError(int line) -{ - GLenum err = glGetError(); - if (err) { - printf("GL Error 0x%x at line %d\n", (int) err, line); - } -} - - -static void -Idle(void) -{ - Rot = glutGet(GLUT_ELAPSED_TIME) * 0.05; - glutPostRedisplay(); -} - - -static void -RenderTexture(void) -{ - GLint level = 0; - GLenum status; - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -15.0); - - /* draw to texture image */ - glBindTexture(GL_TEXTURE_2D, 0); - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB); - glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, - GL_TEXTURE_2D, TexObj, level); - - status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); - if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { - printf("Framebuffer incomplete!!!\n"); - } - - glViewport(0, 0, TexWidth, TexHeight); - - glClearColor(0.5, 0.5, 1.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - - glEnable(GL_DEPTH_TEST); - glEnable(GL_STENCIL_TEST); - glStencilFunc(GL_NEVER, 1, ~0); - glStencilOp(GL_REPLACE, GL_KEEP, GL_REPLACE); - - /* draw diamond-shaped stencil pattern */ - glColor3f(0, 1, 0); - glBegin(GL_POLYGON); - glVertex2f(-0.2, 0.0); - glVertex2f( 0.0, -0.2); - glVertex2f( 0.2, 0.0); - glVertex2f( 0.0, 0.2); - glEnd(); - - /* draw teapot where stencil != 1 */ - glStencilFunc(GL_NOTEQUAL, 1, ~0); - glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); - -#if 0 - glBegin(GL_POLYGON); - glColor3f(1, 0, 0); - glVertex2f(-1, -1); - glColor3f(0, 1, 0); - glVertex2f(1, -1); - glColor3f(0, 0, 1); - glVertex2f(0, 1); - glEnd(); -#else - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glPushMatrix(); - glRotatef(0.5 * Rot, 1.0, 0.0, 0.0); - glutSolidTeapot(0.5); - glPopMatrix(); - glDisable(GL_LIGHTING); -#endif - glDisable(GL_DEPTH_TEST); - glDisable(GL_STENCIL_TEST); - - /* Bind normal framebuffer */ - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); - - CheckError(__LINE__); -} - - - -static void -Display(void) -{ - float ar = (float) Width / (float) Height; - - RenderTexture(); - - /* draw textured quad in the window */ - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-ar, ar, -1.0, 1.0, 5.0, 25.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -7.0); - - glViewport(0, 0, Width, Height); - - glClearColor(0.25, 0.25, 0.25, 0); - glClear(GL_COLOR_BUFFER_BIT); - - glPushMatrix(); - glRotatef(Rot, 0, 1, 0); - glEnable(GL_TEXTURE_2D); - glBindTexture(GL_TEXTURE_2D, TexObj); - glBegin(GL_POLYGON); - glColor3f(0.25, 0.25, 0.25); - glTexCoord2f(0, 0); - glVertex2f(-1, -1); - glTexCoord2f(1, 0); - glVertex2f(1, -1); - glColor3f(1.0, 1.0, 1.0); - glTexCoord2f(1, 1); - glVertex2f(1, 1); - glTexCoord2f(0, 1); - glVertex2f(-1, 1); - glEnd(); - glPopMatrix(); - glDisable(GL_TEXTURE_2D); - - glutSwapBuffers(); - CheckError(__LINE__); -} - - -static void -Reshape(int width, int height) -{ - glViewport(0, 0, width, height); - Width = width; - Height = height; -} - - -static void -Key(unsigned char key, int x, int y) -{ - (void) x; - (void) y; - switch (key) { - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void -Init(void) -{ - GLint i; - - if (!glutExtensionSupported("GL_EXT_framebuffer_object")) { - printf("GL_EXT_framebuffer_object not found!\n"); - exit(0); - } - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - - /* gen framebuffer id, delete it, do some assertions, just for testing */ - glGenFramebuffersEXT(1, &MyFB); - assert(MyFB); - assert(!glIsFramebufferEXT(MyFB)); - glDeleteFramebuffersEXT(1, &MyFB); - assert(!glIsFramebufferEXT(MyFB)); - /* Note, continue to use MyFB below */ - - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB); - assert(glIsFramebufferEXT(MyFB)); - glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &i); - assert(i == MyFB); - - /* make depth renderbuffer */ - glGenRenderbuffersEXT(1, &DepthRB); - assert(DepthRB); - assert(!glIsRenderbufferEXT(DepthRB)); - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, DepthRB); - assert(glIsRenderbufferEXT(DepthRB)); - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, - TexWidth, TexHeight); - glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT, - GL_RENDERBUFFER_DEPTH_SIZE_EXT, &i); - printf("Depth renderbuffer size = %d bits\n", i); - assert(i > 0); - - /* make stencil renderbuffer */ - glGenRenderbuffersEXT(1, &StencilRB); - assert(StencilRB); - assert(!glIsRenderbufferEXT(StencilRB)); - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, StencilRB); - assert(glIsRenderbufferEXT(StencilRB)); - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_STENCIL_INDEX, - TexWidth, TexHeight); - glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT, - GL_RENDERBUFFER_STENCIL_SIZE_EXT, &i); - printf("Stencil renderbuffer size = %d bits\n", i); - assert(i > 0); - - /* attach DepthRB to MyFB */ - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, - GL_RENDERBUFFER_EXT, DepthRB); - - /* attach StencilRB to MyFB */ - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, - GL_RENDERBUFFER_EXT, StencilRB); - - - /* bind regular framebuffer */ - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); - - /* Make texture object/image */ - glGenTextures(1, &TexObj); - glBindTexture(GL_TEXTURE_2D, TexObj); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, TexWidth, TexHeight, 0, - GL_RGBA, GL_UNSIGNED_BYTE, NULL); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - - CheckError(__LINE__); -} - - -int -main(int argc, char *argv[]) -{ - glutInit(&argc, argv); - glutInitWindowPosition(0, 0); - glutInitWindowSize(Width, Height); - glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); - glutCreateWindow(argv[0]); - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Display); - if (Anim) - glutIdleFunc(Idle); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/floattex.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/floattex.c deleted file mode 100644 index 2345a49b27..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/floattex.c +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Test floating point textures. - * No actual rendering, yet. - */ - - -#include -#include -#include -#include -#include - - -/* XXX - temporary */ -#ifndef GL_ARB_texture_float -#define GL_ARB_texture_float 1 -#define GL_TEXTURE_RED_TYPE_ARB 0x9000 -#define GL_TEXTURE_GREEN_TYPE_ARB 0x9001 -#define GL_TEXTURE_BLUE_TYPE_ARB 0x9002 -#define GL_TEXTURE_ALPHA_TYPE_ARB 0x9003 -#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x9004 -#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x9005 -#define GL_TEXTURE_DEPTH_TYPE_ARB 0x9006 -#define GL_UNSIGNED_NORMALIZED_ARB 0x9007 -#define GL_RGBA32F_ARB 0x8814 -#define GL_RGB32F_ARB 0x8815 -#define GL_ALPHA32F_ARB 0x8816 -#define GL_INTENSITY32F_ARB 0x8817 -#define GL_LUMINANCE32F_ARB 0x8818 -#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 -#define GL_RGBA16F_ARB 0x881A -#define GL_RGB16F_ARB 0x881B -#define GL_ALPHA16F_ARB 0x881C -#define GL_INTENSITY16F_ARB 0x881D -#define GL_LUMINANCE16F_ARB 0x881E -#define GL_LUMINANCE_ALPHA16F_ARB 0x881F -#endif - - -static GLboolean -CheckError( int line ) -{ - GLenum error = glGetError(); - if (error) { - char *err = (char *) gluErrorString( error ); - fprintf( stderr, "GL Error: %s at line %d\n", err, line ); - return GL_TRUE; - } - return GL_FALSE; -} - - -static void -Draw(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - - glutSolidCube(2.0); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void -Reshape(int width, int height) -{ - glViewport(0, 0, width, height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -15.0); -} - - -static void -Key(unsigned char key, int x, int y) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - - -static void -Init(void) -{ - GLfloat tex[16][16][4]; - GLfloat tex2[16][16][4]; - GLint i, j, t; - - if (!glutExtensionSupported("GL_MESAX_texture_float")) { - printf("Sorry, this test requires GL_MESAX_texture_float\n"); - exit(1); - } - - for (i = 0; i < 16; i++) { - for (j = 0; j < 16; j++) { - GLfloat s = i / 15.0; - tex[i][j][0] = s; - tex[i][j][1] = 2.0 * s; - tex[i][j][2] = -3.0 * s; - tex[i][j][3] = 4.0 * s; - } - } - - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F_ARB, 16, 16, 0, GL_RGBA, - GL_FLOAT, tex); - CheckError(__LINE__); - - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_RED_TYPE_ARB, &t); - assert(t == GL_FLOAT); - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_GREEN_TYPE_ARB, &t); - assert(t == GL_FLOAT); - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_BLUE_TYPE_ARB, &t); - assert(t == GL_FLOAT); - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_ALPHA_TYPE_ARB, &t); - assert(t == GL_FLOAT); - - CheckError(__LINE__); - - /* read back the texture and make sure values are correct */ - glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_FLOAT, tex2); - CheckError(__LINE__); - for (i = 0; i < 16; i++) { - for (j = 0; j < 16; j++) { - if (tex[i][j][0] != tex2[i][j][0] || - tex[i][j][1] != tex2[i][j][1] || - tex[i][j][2] != tex2[i][j][2] || - tex[i][j][3] != tex2[i][j][3]) { - printf("tex[%d][%d] %g %g %g %g != tex2[%d][%d] %g %g %g %g\n", - i, j, - tex[i][j][0], tex[i][j][1], tex[i][j][2], tex[i][j][3], - i, j, - tex2[i][j][0], tex2[i][j][1], tex2[i][j][2], tex2[i][j][3]); - } - } - } - - -} - - -int -main(int argc, char *argv[]) -{ - glutInit(&argc, argv); - glutInitWindowPosition(0, 0); - glutInitWindowSize(400, 400); - glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); - glutCreateWindow(argv[0]); - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Draw); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/fogcoord.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/fogcoord.c deleted file mode 100644 index 89355742aa..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/fogcoord.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Exercise GL_EXT_fog_coord - */ - - -#define GL_GLEXT_PROTOTYPES -#include -#include -#include -#include - -static int Width = 600; -static int Height = 200; -static GLfloat Near = 5.0, Far = 25.0; - - -static void Display( void ) -{ - GLfloat t; - - glClearColor(0.2, 0.2, 0.8, 0); - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - for (t = 0.0; t <= 1.0; t += 0.25) { - GLfloat f = Near + t * (Far - Near); - printf("glFogCoord(%4.1f)\n", f); - glFogCoordfEXT(f); - - glPushMatrix(); - glTranslatef(t * 10.0 - 5.0, 0, 0); - glBegin(GL_POLYGON); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - glPopMatrix(); - } - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - GLfloat ar = (float) width / (float) height; - Width = width; - Height = height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -ar, ar, -1.0, 1.0, Near, Far ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - /* setup lighting, etc */ - if (!glutExtensionSupported("GL_EXT_fog_coord")) { - printf("Sorry, this program requires GL_EXT_fog_coord\n"); - exit(1); - } - glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT); - glFogi(GL_FOG_MODE, GL_LINEAR); - glFogf(GL_FOG_START, Near); - glFogf(GL_FOG_END, Far); - glEnable(GL_FOG); - printf("Squares should be colored from white -> gray -> black.\n"); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( Width, Height ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/fptest1.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/fptest1.c deleted file mode 100644 index d0bcdaa226..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/fptest1.c +++ /dev/null @@ -1,220 +0,0 @@ -/* Test GL_NV_fragment_program */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - - glColor4f(0, 0.5, 0, 1); - glColor4f(0, 1, 0, 1); - glBegin(GL_POLYGON); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 0, 1); - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - static const char *prog0 = - "!!FP1.0\n" - "MUL o[COLR], R0, f[WPOS]; \n" - "ADD o[COLH], H3, f[TEX0]; \n" - "ADD_SAT o[COLH], H3, f[TEX0]; \n" - "ADDX o[COLH], H3, f[TEX0]; \n" - "ADDHC o[COLH], H3, f[TEX0]; \n" - "ADDXC o[COLH], H3, f[TEX0]; \n" - "ADDXC_SAT o[COLH], H30, f[TEX0]; \n" - "MUL o[COLR].xy, R0.wzyx, f[WPOS]; \n" - "MUL o[COLR], H0, f[WPOS]; \n" - "MUL o[COLR], -H0, f[WPOS]; \n" - "MOV RC, H1; \n" - "MOV HC, H2; \n" - "END \n" - ; - - /* masked updates, defines, declarations */ - static const char *prog1 = - "!!FP1.0\n" - "DEFINE foo = {1, 2, 3, 4}; \n" - "DEFINE foo2 = 5; \n" - "DECLARE foo3 = {5, 6, 7, 8}; \n" - "DECLARE bar = 3; \n" - "DECLARE bar2; \n" - "DECLARE bar3 = bar; \n" - "#DECLARE bar4 = { a, b, c, d }; \n" - "MOV o[COLR].xy, R0; \n" - "MOV o[COLR] (NE), R0; \n" - "MOV o[COLR] (NE.wzyx), R0; \n" - "MOV o[COLR].xy (NE.wzyx), R0; \n" - "MOV RC.x (EQ), R1.x; \n" - "KIL NE; \n" - "KIL EQ.xyxy; \n" - "END \n" - ; - - /* texture instructions */ - static const char *prog2 = - "!!FP1.0\n" - "TEX R0, f[TEX0], TEX0, 2D; \n" - "TEX R1, f[TEX1], TEX1, CUBE; \n" - "TEX R2, f[TEX2], TEX2, 3D; \n" - "TXP R3, f[TEX3], TEX3, RECT; \n" - "TXD R3, R2, R1, f[TEX3], TEX3, RECT; \n" - "MUL o[COLR], R0, f[COL0]; \n" - "END \n" - ; - - /* test negation, absolute value */ - static const char *prog3 = - "!!FP1.0\n" - "MOV R0, -R1; \n" - "MOV R0, +R1; \n" - "MOV R0, |-R1|; \n" - "MOV R0, |+R1|; \n" - "MOV R0, -|R1|; \n" - "MOV R0, +|R1|; \n" - "MOV R0, -|-R1|; \n" - "MOV R0, -|+R1|; \n" - "MOV o[COLR], R0; \n" - "END \n" - ; - - /* literal constant sources */ - static const char *prog4 = - "!!FP1.0\n" - "DEFINE Pi = 3.14159; \n" - "MOV R0, {1, -2, +3, 4}; \n" - "MOV R0, 5; \n" - "MOV R0, -5; \n" - "MOV R0, +5; \n" - "MOV R0, Pi; \n" - "MOV o[COLR], R0; \n" - "END \n" - ; - - /* change the fragment color in a simple way */ - static const char *prog10 = - "!!FP1.0\n" - "DEFINE blue = {0, 0, 1, 0};\n" - "DECLARE color; \n" - "MOV R0, f[COL0]; \n" - "#ADD o[COLR], R0, f[COL0]; \n" - "#ADD o[COLR], blue, f[COL0]; \n" - "#ADD o[COLR], {1, 0, 0, 0}, f[COL0]; \n" - "ADD o[COLR], color, f[COL0]; \n" - "END \n" - ; - - GLuint progs[20]; - - glGenProgramsNV(20, progs); - assert(progs[0]); - assert(progs[1]); - assert(progs[0] != progs[1]); - -#if 0 - glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[0], - strlen(prog0), - (const GLubyte *) prog0); - assert(glIsProgramNV(progs[0])); -#endif - - glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[1], - strlen(prog1), - (const GLubyte *) prog1); - assert(glIsProgramNV(progs[1])); - - glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[2], - strlen(prog2), - (const GLubyte *) prog2); - assert(glIsProgramNV(progs[2])); - glBindProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[2]); - - glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[3], - strlen(prog3), - (const GLubyte *) prog3); - assert(glIsProgramNV(progs[3])); - glBindProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[3]); - - glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[4], - strlen(prog4), - (const GLubyte *) prog4); - assert(glIsProgramNV(progs[4])); - glBindProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[4]); - - - /* a real program */ - glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[10], - strlen(prog10), - (const GLubyte *) prog10); - assert(glIsProgramNV(progs[10])); - glBindProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[10]); - - glProgramNamedParameter4fNV(progs[10], - strlen("color"), (const GLubyte *) "color", - 1, 0, 0, 1); - - glEnable(GL_FRAGMENT_PROGRAM_NV); - glEnable(GL_ALPHA_TEST); - glAlphaFunc(GL_ALWAYS, 0.0); - - printf("glGetError = %d\n", (int) glGetError()); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 250, 250 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/fptexture.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/fptexture.c deleted file mode 100644 index f57ad62828..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/fptexture.c +++ /dev/null @@ -1,151 +0,0 @@ -/* GL_NV_fragment_program texture test */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -#include "../util/readtex.c" - - -#define TEXTURE_FILE "../images/girl.rgb" - -static GLfloat Xrot = 0.0, Yrot = 0.0, Zrot = 0.0; - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - - glBegin(GL_POLYGON); - glColor4f(1.0, 1.0, 1.0, 1); glTexCoord2f(0, 0); glVertex2f(-1, -1); - glColor4f(0.2, 0.2, 1.0, 1); glTexCoord2f(1, 0); glVertex2f( 1, -1); - glColor4f(0.2, 1.0, 0.2, 1); glTexCoord2f(1, 1); glVertex2f( 1, 1); - glColor4f(1.0, 0.2, 0.2, 1); glTexCoord2f(0, 1); glVertex2f(-1, 1); - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -8.0 ); -} - - -static void SpecialKey( int key, int x, int y ) -{ - float step = 3.0; - (void) x; - (void) y; - - switch (key) { - case GLUT_KEY_UP: - Xrot += step; - break; - case GLUT_KEY_DOWN: - Xrot -= step; - break; - case GLUT_KEY_LEFT: - Yrot += step; - break; - case GLUT_KEY_RIGHT: - Yrot -= step; - break; - } - glutPostRedisplay(); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - static const char *modulate2D = - "!!FP1.0\n" - "TEX R0, f[TEX0], TEX0, 2D; \n" - "MUL o[COLR], R0, f[COL0]; \n" - "END" - ; - GLuint modulateProg; - GLuint Texture; - - if (!glutExtensionSupported("GL_NV_fragment_program")) { - printf("Error: GL_NV_fragment_program not supported!\n"); - exit(1); - } - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - - /* Setup the fragment program */ - glGenProgramsNV(1, &modulateProg); - glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, modulateProg, - strlen(modulate2D), - (const GLubyte *) modulate2D); - printf("glGetError = 0x%x\n", (int) glGetError()); - printf("glError(GL_PROGRAM_ERROR_STRING_NV) = %s\n", - (char *) glGetString(GL_PROGRAM_ERROR_STRING_NV)); - assert(glIsProgramNV(modulateProg)); - - glBindProgramNV(GL_FRAGMENT_PROGRAM_NV, modulateProg); - glEnable(GL_FRAGMENT_PROGRAM_NV); - - /* Load texture */ - glGenTextures(1, &Texture); - glBindTexture(GL_TEXTURE_2D, Texture); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) { - printf("Error: couldn't load texture image file %s\n", TEXTURE_FILE); - exit(1); - } - /* XXX this enable shouldn't really be needed!!! */ - glEnable(GL_TEXTURE_2D); - - glClearColor(.3, .3, .3, 0); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 250, 250 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/getprocaddress.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/getprocaddress.c deleted file mode 100644 index 2480ed44cc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/getprocaddress.c +++ /dev/null @@ -1,438 +0,0 @@ -/* - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Test that glXGetProcAddress works. - */ - -#define GLX_GLXEXT_PROTOTYPES - -#include -#include -#include -#include -#include -#include -#include -#include - - -typedef void (*generic_func)(); - -#define EQUAL(X, Y) (fabs((X) - (Y)) < 0.001) - -static GLboolean -test_ActiveTextureARB(generic_func func) -{ - PFNGLACTIVETEXTUREARBPROC activeTexture = (PFNGLACTIVETEXTUREARBPROC) func; - GLint t; - GLboolean pass; - (*activeTexture)(GL_TEXTURE1_ARB); - glGetIntegerv(GL_ACTIVE_TEXTURE_ARB, &t); - pass = (t == GL_TEXTURE1_ARB); - (*activeTexture)(GL_TEXTURE0_ARB); /* restore default */ - return pass; -} - - -static GLboolean -test_SecondaryColor3fEXT(generic_func func) -{ - PFNGLSECONDARYCOLOR3FEXTPROC secColor3f = (PFNGLSECONDARYCOLOR3FEXTPROC) func; - GLfloat color[4]; - GLboolean pass; - (*secColor3f)(1.0, 1.0, 0.0); - glGetFloatv(GL_CURRENT_SECONDARY_COLOR_EXT, color); - pass = (color[0] == 1.0 && color[1] == 1.0 && color[2] == 0.0); - (*secColor3f)(0.0, 0.0, 0.0); /* restore default */ - return pass; -} - - -static GLboolean -test_ActiveStencilFaceEXT(generic_func func) -{ - PFNGLACTIVESTENCILFACEEXTPROC activeFace = (PFNGLACTIVESTENCILFACEEXTPROC) func; - GLint face; - GLboolean pass; - (*activeFace)(GL_BACK); - glGetIntegerv(GL_ACTIVE_STENCIL_FACE_EXT, &face); - pass = (face == GL_BACK); - (*activeFace)(GL_FRONT); /* restore default */ - return pass; -} - - -static GLboolean -test_VertexAttrib1fvARB(generic_func func) -{ - PFNGLVERTEXATTRIB1FVARBPROC vertexAttrib1fvARB = (PFNGLVERTEXATTRIB1FVARBPROC) func; - PFNGLGETVERTEXATTRIBFVARBPROC getVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvARB"); - - const GLfloat v[1] = {25.0}; - const GLfloat def[1] = {0}; - GLfloat res[4]; - GLboolean pass; - (*vertexAttrib1fvARB)(6, v); - (*getVertexAttribfvARB)(6, GL_CURRENT_VERTEX_ATTRIB_ARB, res); - pass = (res[0] == 25.0 && res[1] == 0.0 && res[2] == 0.0 && res[3] == 1.0); - (*vertexAttrib1fvARB)(6, def); - return pass; -} - -static GLboolean -test_VertexAttrib4NubvARB(generic_func func) -{ - PFNGLVERTEXATTRIB4NUBVARBPROC vertexAttrib4NubvARB = (PFNGLVERTEXATTRIB4NUBVARBPROC) func; - PFNGLGETVERTEXATTRIBFVARBPROC getVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvARB"); - - const GLubyte v[4] = {255, 0, 255, 0}; - const GLubyte def[4] = {0, 0, 0, 255}; - GLfloat res[4]; - GLboolean pass; - (*vertexAttrib4NubvARB)(6, v); - (*getVertexAttribfvARB)(6, GL_CURRENT_VERTEX_ATTRIB_ARB, res); - pass = (res[0] == 1.0 && res[1] == 0.0 && res[2] == 1.0 && res[3] == 0.0); - (*vertexAttrib4NubvARB)(6, def); - return pass; -} - - -static GLboolean -test_VertexAttrib4NuivARB(generic_func func) -{ - PFNGLVERTEXATTRIB4NUIVARBPROC vertexAttrib4NuivARB = (PFNGLVERTEXATTRIB4NUIVARBPROC) func; - PFNGLGETVERTEXATTRIBFVARBPROC getVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvARB"); - - const GLuint v[4] = {0xffffffff, 0, 0xffffffff, 0}; - const GLuint def[4] = {0, 0, 0, 0xffffffff}; - GLfloat res[4]; - GLboolean pass; - (*vertexAttrib4NuivARB)(6, v); - (*getVertexAttribfvARB)(6, GL_CURRENT_VERTEX_ATTRIB_ARB, res); - pass = (EQUAL(res[0], 1.0) && EQUAL(res[1], 0.0) && EQUAL(res[2], 1.0) && EQUAL(res[3], 0.0)); - (*vertexAttrib4NuivARB)(6, def); - return pass; -} - - -static GLboolean -test_VertexAttrib4ivARB(generic_func func) -{ - PFNGLVERTEXATTRIB4IVARBPROC vertexAttrib4ivARB = (PFNGLVERTEXATTRIB4IVARBPROC) func; - PFNGLGETVERTEXATTRIBFVARBPROC getVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvARB"); - - const GLint v[4] = {1, 2, -3, 4}; - const GLint def[4] = {0, 0, 0, 1}; - GLfloat res[4]; - GLboolean pass; - (*vertexAttrib4ivARB)(6, v); - (*getVertexAttribfvARB)(6, GL_CURRENT_VERTEX_ATTRIB_ARB, res); - pass = (EQUAL(res[0], 1.0) && EQUAL(res[1], 2.0) && EQUAL(res[2], -3.0) && EQUAL(res[3], 4.0)); - (*vertexAttrib4ivARB)(6, def); - return pass; -} - - -static GLboolean -test_VertexAttrib4NsvARB(generic_func func) -{ - PFNGLVERTEXATTRIB4NSVARBPROC vertexAttrib4NsvARB = (PFNGLVERTEXATTRIB4NSVARBPROC) func; - PFNGLGETVERTEXATTRIBFVARBPROC getVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvARB"); - - const GLshort v[4] = {0, 32767, 32767, 0}; - const GLshort def[4] = {0, 0, 0, 32767}; - GLfloat res[4]; - GLboolean pass; - (*vertexAttrib4NsvARB)(6, v); - (*getVertexAttribfvARB)(6, GL_CURRENT_VERTEX_ATTRIB_ARB, res); - pass = (EQUAL(res[0], 0.0) && EQUAL(res[1], 1.0) && EQUAL(res[2], 1.0) && EQUAL(res[3], 0.0)); - (*vertexAttrib4NsvARB)(6, def); - return pass; -} - - -static GLboolean -test_VertexAttrib4NusvARB(generic_func func) -{ - PFNGLVERTEXATTRIB4NUSVARBPROC vertexAttrib4NusvARB = (PFNGLVERTEXATTRIB4NUSVARBPROC) func; - PFNGLGETVERTEXATTRIBFVARBPROC getVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvARB"); - - const GLushort v[4] = {0xffff, 0, 0xffff, 0}; - const GLushort def[4] = {0, 0, 0, 0xffff}; - GLfloat res[4]; - GLboolean pass; - (*vertexAttrib4NusvARB)(6, v); - (*getVertexAttribfvARB)(6, GL_CURRENT_VERTEX_ATTRIB_ARB, res); - pass = (EQUAL(res[0], 1.0) && EQUAL(res[1], 0.0) && EQUAL(res[2], 1.0) && EQUAL(res[3], 0.0)); - (*vertexAttrib4NusvARB)(6, def); - return pass; -} - - -static GLboolean -test_VertexAttrib4ubNV(generic_func func) -{ - PFNGLVERTEXATTRIB4UBNVPROC vertexAttrib4ubNV = (PFNGLVERTEXATTRIB4UBNVPROC) func; - PFNGLGETVERTEXATTRIBFVNVPROC getVertexAttribfvNV = (PFNGLGETVERTEXATTRIBFVNVPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvNV"); - - const GLubyte v[4] = {255, 0, 255, 0}; - const GLubyte def[4] = {0, 0, 0, 255}; - GLfloat res[4]; - GLboolean pass; - (*vertexAttrib4ubNV)(6, v[0], v[1], v[2], v[3]); - (*getVertexAttribfvNV)(6, GL_CURRENT_ATTRIB_NV, res); - pass = (res[0] == 1.0 && res[1] == 0.0 && res[2] == 1.0 && res[3] == 0.0); - (*vertexAttrib4ubNV)(6, def[0], def[1], def[2], def[3]); - return pass; -} - - -static GLboolean -test_VertexAttrib2sNV(generic_func func) -{ - PFNGLVERTEXATTRIB2SNVPROC vertexAttrib2sNV = (PFNGLVERTEXATTRIB2SNVPROC) func; - PFNGLGETVERTEXATTRIBFVNVPROC getVertexAttribfvNV = (PFNGLGETVERTEXATTRIBFVNVPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvNV"); - - const GLshort v[2] = {2, -4,}; - const GLshort def[2] = {0, 0}; - GLfloat res[4]; - GLboolean pass; - (*vertexAttrib2sNV)(6, v[0], v[1]); - (*getVertexAttribfvNV)(6, GL_CURRENT_ATTRIB_NV, res); - pass = (EQUAL(res[0], 2) && EQUAL(res[1], -4) && EQUAL(res[2], 0) && res[3] == 1.0); - (*vertexAttrib2sNV)(6, def[0], def[1]); - return pass; -} - - -static GLboolean -test_VertexAttrib3fNV(generic_func func) -{ - PFNGLVERTEXATTRIB3FNVPROC vertexAttrib3fNV = (PFNGLVERTEXATTRIB3FNVPROC) func; - PFNGLGETVERTEXATTRIBFVNVPROC getVertexAttribfvNV = (PFNGLGETVERTEXATTRIBFVNVPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvNV"); - - const GLfloat v[3] = {0.2, 0.4, 0.8}; - const GLfloat def[3] = {0, 0, 0}; - GLfloat res[4]; - GLboolean pass; - (*vertexAttrib3fNV)(6, v[0], v[1], v[2]); - (*getVertexAttribfvNV)(6, GL_CURRENT_ATTRIB_NV, res); - pass = (EQUAL(res[0], 0.2) && EQUAL(res[1], 0.4) && EQUAL(res[2], 0.8) && res[3] == 1.0); - (*vertexAttrib3fNV)(6, def[0], def[1], def[2]); - return pass; -} - - -static GLboolean -test_VertexAttrib4dvNV(generic_func func) -{ - PFNGLVERTEXATTRIB4DVNVPROC vertexAttrib4dvNV = (PFNGLVERTEXATTRIB4DVNVPROC) func; - PFNGLGETVERTEXATTRIBFVNVPROC getVertexAttribfvNV = (PFNGLGETVERTEXATTRIBFVNVPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvNV"); - - const GLdouble v[4] = {0.2, 0.4, 0.8, 1.2}; - const GLdouble def[4] = {0, 0, 0, 1}; - GLfloat res[4]; - GLboolean pass; - (*vertexAttrib4dvNV)(6, v); - (*getVertexAttribfvNV)(6, GL_CURRENT_ATTRIB_NV, res); - pass = (EQUAL(res[0], 0.2) && EQUAL(res[1], 0.4) && EQUAL(res[2], 0.8) && EQUAL(res[3], 1.2)); - (*vertexAttrib4dvNV)(6, def); - return pass; -} - - -/* - * The following header file is auto-generated with Python. The Python - * script looks in this file for functions named "test_*" as seen above. - */ -#include "getproclist.h" - - - -static int -extension_supported(const char *haystack, const char *needle) -{ - if (strstr(haystack, needle)) - return 1; - else - return 0; -} - - -static void -check_functions( const char *extensions ) -{ - struct name_test_pair *entry; - int failures = 0, passes = 0; - int totalFail = 0, totalPass = 0; - int doTests; - - for (entry = functions; entry->name; entry++) { - if (entry->name[0] == '-') { - /* XXX update for OpenGL 2.0 */ - if (entry->name[1] == '1') { - /* check GL version X.Y */ - const char *version = (const char *) glGetString(GL_VERSION); - if (version[0] == entry->name[1] && - version[1] == entry->name[2] && - version[2] >= entry->name[3]) - doTests = 1; - else - doTests = 0; - } - else { - /* check if the named extension is available */ - doTests = extension_supported(extensions, entry->name+1); - } - if (doTests) - printf("Testing %s functions\n", entry->name + 1); - totalFail += failures; - totalPass += passes; - failures = 0; - passes = 0; - } - else if (doTests) { - generic_func funcPtr = (generic_func) glXGetProcAddressARB((const GLubyte *) entry->name); - if (funcPtr) { - if (entry->test) { - GLboolean b; - printf(" Validating %s:", entry->name); - b = (*entry->test)(funcPtr); - if (b) { - printf(" Pass\n"); - passes++; - } - else { - printf(" FAIL!!!\n"); - failures++; - } - } - else { - passes++; - } - } - else { - printf(" glXGetProcAddress(%s) failed!\n", entry->name); - failures++; - } - } - - if (doTests && (!(entry+1)->name || (entry+1)->name[0] == '-')) { - if (failures > 0) { - printf(" %d failed.\n", failures); - } - if (passes > 0) { - printf(" %d passed.\n", passes); - } - } - } - totalFail += failures; - totalPass += passes; - - printf("-----------------------------\n"); - printf("Total: %d pass %d fail\n", totalPass, totalFail); -} - - - -static void -print_screen_info(Display *dpy, int scrnum, Bool allowDirect) -{ - Window win; - int attribSingle[] = { - GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - None }; - int attribDouble[] = { - GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - None }; - - XSetWindowAttributes attr; - unsigned long mask; - Window root; - GLXContext ctx; - XVisualInfo *visinfo; - int width = 100, height = 100; - - root = RootWindow(dpy, scrnum); - - visinfo = glXChooseVisual(dpy, scrnum, attribSingle); - if (!visinfo) { - visinfo = glXChooseVisual(dpy, scrnum, attribDouble); - if (!visinfo) { - fprintf(stderr, "Error: couldn't find RGB GLX visual\n"); - return; - } - } - - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - win = XCreateWindow(dpy, root, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr); - - ctx = glXCreateContext( dpy, visinfo, NULL, allowDirect ); - if (!ctx) { - fprintf(stderr, "Error: glXCreateContext failed\n"); - XDestroyWindow(dpy, win); - return; - } - - if (glXMakeCurrent(dpy, win, ctx)) { - check_functions( (const char *) glGetString(GL_EXTENSIONS) ); - } - else { - fprintf(stderr, "Error: glXMakeCurrent failed\n"); - } - - glXDestroyContext(dpy, ctx); - XDestroyWindow(dpy, win); -} - - -int -main(int argc, char *argv[]) -{ - char *displayName = NULL; - Display *dpy; - - dpy = XOpenDisplay(displayName); - if (!dpy) { - fprintf(stderr, "Error: unable to open display %s\n", displayName); - return -1; - } - - print_screen_info(dpy, 0, GL_TRUE); - - XCloseDisplay(dpy); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/getprocaddress.py b/nx-X11/extras/Mesa_6.4.2/progs/tests/getprocaddress.py deleted file mode 100644 index d16b2d93d0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/getprocaddress.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env python - -# $Id: getprocaddress.py,v 1.7 2005/06/21 23:42:43 idr Exp $ - -# Helper for the getprocaddress.c test. - -import sys, getopt, re -sys.path.append("../../src/mesa/glapi/" ) -import gl_XML -import license - - -def FindTestFunctions(): - """Scan getprocaddress.c for lines that start with "test_" to find - extension function tests. Return a list of names found.""" - functions = [] - f = open("getprocaddress.c") - if not f: - return functions - for line in f.readlines(): - v = re.search("^test_([a-zA-Z0-9]+)", line) - if v: - func = v.group(1) - functions.append(func) - f.close - return functions - - -class PrintExports(gl_XML.gl_print_base): - def __init__(self): - gl_XML.gl_print_base.__init__(self) - - self.name = "getprocaddress.py (from Mesa)" - self.license = license.bsd_license_template % ( \ -"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved. -(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM") - - self.tests = FindTestFunctions() - self.prevCategory = "" - return - - - def printRealHeader(self): - print """ -struct name_test_pair { - const char *name; - GLboolean (*test)(generic_func); -}; - -static struct name_test_pair functions[] = {""" - - def printBody(self, api): - prev_category = None - - - for f in api.functionIterateByOffset(): - [category, num] = api.get_category_for_name( f.name ) - if category != prev_category: - print ' { "-%s", NULL},' % category - prev_category = category - - test = "NULL" - for name in f.entry_points: - if name in self.tests: - test = "test_%s" % name - break - - print ' { "gl%s", %s },' % (f.name, test) - - print '' - print ' { NULL, NULL }' - print '};' - print '' - return - - -if __name__ == '__main__': - file_name = "../../src/mesa/glapi/gl_API.xml" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "f:") - except Exception,e: - show_usage() - - for (arg,val) in args: - if arg == "-f": - file_name = val - - printer = PrintExports() - - api = gl_XML.parse_GL_API( file_name, gl_XML.gl_item_factory() ) - - printer.Print( api ) diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/invert.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/invert.c deleted file mode 100644 index 750592ed79..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/invert.c +++ /dev/null @@ -1,195 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file invert.c - * - * Simple test of GL_MESA_pack_invert functionality. Three squares are - * drawn. The first two should look the same, and the third one should - * look inverted. - * - * \author Ian Romanick - */ - -#include -#include -#include -#include - -#include "readtex.h" - -#define IMAGE_FILE "../images/tree3.rgb" - -static int Width = 420; -static int Height = 150; -static const GLfloat Near = 5.0, Far = 25.0; - -static GLubyte * image = NULL; -static GLubyte * temp_image = NULL; -static GLuint img_width = 0; -static GLuint img_height = 0; -static GLuint img_format = 0; - -PFNGLWINDOWPOS2IPROC win_pos_2i = NULL; - - -static void Display( void ) -{ - GLint err; - - - glClearColor(0.2, 0.2, 0.8, 0); - glClear( GL_COLOR_BUFFER_BIT ); - - - /* This is the "reference" square. - */ - - (*win_pos_2i)( 5, 5 ); - glDrawPixels( img_width, img_height, img_format, GL_UNSIGNED_BYTE, image ); - - glPixelStorei( GL_PACK_INVERT_MESA, GL_FALSE ); - err = glGetError(); - if ( err != GL_NO_ERROR ) { - printf( "Setting PACK_INVERT_MESA to false generated an error (0x%04x).\n", - err ); - } - - glReadPixels( 5, 5, img_width, img_height, img_format, GL_UNSIGNED_BYTE, temp_image ); - (*win_pos_2i)( 5 + 1 * (10 + img_width), 5 ); - glDrawPixels( img_width, img_height, img_format, GL_UNSIGNED_BYTE, temp_image ); - - glPixelStorei( GL_PACK_INVERT_MESA, GL_TRUE ); - err = glGetError(); - if ( err != GL_NO_ERROR ) { - printf( "Setting PACK_INVERT_MESA to true generated an error (0x%04x).\n", - err ); - } - - glReadPixels( 5, 5, img_width, img_height, img_format, GL_UNSIGNED_BYTE, temp_image ); - (*win_pos_2i)( 5 + 2 * (10 + img_width), 5 ); - glDrawPixels( img_width, img_height, img_format, GL_UNSIGNED_BYTE, temp_image ); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - GLfloat ar = (float) width / (float) height; - Width = width; - Height = height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -ar, ar, -1.0, 1.0, Near, Far ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - const char * const ver_string = (const char * const) - glGetString( GL_VERSION ); - const float ver = strtof( ver_string, NULL ); - - - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", ver_string); - - if ( !glutExtensionSupported("GL_MESA_pack_invert") ) { - printf("\nSorry, this program requires GL_MESA_pack_invert.\n"); - exit(1); - } - - if ( ver >= 1.4 ) { - win_pos_2i = (PFNGLWINDOWPOS2IPROC) glutGetProcAddress( "glWindowPos2i" ); - } - else if ( glutExtensionSupported("GL_ARB_window_pos") ) { - win_pos_2i = (PFNGLWINDOWPOS2IPROC) glutGetProcAddress( "glWindowPos2iARB" ); - } - else if ( glutExtensionSupported("GL_MESA_window_pos") ) { - win_pos_2i = (PFNGLWINDOWPOS2IPROC) glutGetProcAddress( "glWindowPos2iMESA" ); - } - - - /* Do this check as a separate if-statement instead of as an else in case - * one of the required extensions is supported but glutGetProcAddress - * returns NULL. - */ - - if ( win_pos_2i == NULL ) { - printf("\nSorry, this program requires either GL 1.4 (or higher),\n" - "GL_ARB_window_pos, or GL_MESA_window_pos.\n"); - exit(1); - } - - printf("\nThe left 2 squares should be the same color, and the right\n" - "square should look upside-down.\n"); - - - image = LoadRGBImage( IMAGE_FILE, & img_width, & img_height, - & img_format ); - if ( image == NULL ) { - printf( "Could not open image file \"%s\".\n", IMAGE_FILE ); - exit(1); - } - - temp_image = malloc( 3 * img_height * img_width ); - if ( temp_image == NULL ) { - printf( "Could not allocate memory for temporary image.\n" ); - exit(1); - } -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( Width, Height ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow( "GL_MESA_pack_invert test" ); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/jkrahntest.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/jkrahntest.c deleted file mode 100644 index 520dbb84e7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/jkrahntest.c +++ /dev/null @@ -1,177 +0,0 @@ -/* $Id: jkrahntest.c,v 1.1 2002/06/16 03:57:48 brianp Exp $ */ - -/* This is a good test for glXSwapBuffers on non-current windows, - * and the glXCopyContext function. Fixed several Mesa/DRI bugs with - * this program on 15 June 2002. - * - * Joe's comments follow: - * - * I have tried some different approaches for being able to - * draw to multiple windows using one context, or a copied - * context. Mesa/indirect rendering works to use one context - * for multiple windows, but crashes with glXCopyContext. - * DRI is badly broken, at least for ATI. - * - * I also noticed that glXMakeCurrent allows a window and context - * from different visuals to be attached (haven't tested recently). - * - * Joe Krahn - */ - -#include -#include -#include -#include -#include -#include -#include -#define M_PI 3.14159 -#define DEGTOR (M_PI/180.0) - -static int AttributeList[] = { GLX_RGBA, GLX_DOUBLEBUFFER, None }; - -int main(int argc, char **argv) -{ - Window win1, win2; - XVisualInfo *vi; - XSetWindowAttributes swa; - Display *dpy; - GLXContext ctx1, ctx2; - float angle; - int test; - - if (argc < 2) { - fprintf(stderr, "This program tests GLX context switching.\n"); - fprintf(stderr, "Usage: cxbug \n"); - fprintf(stderr, "Where n is:\n"); - fprintf(stderr, "\t1) Use two contexts and swap only when the context is current (typical case).\n"); - fprintf(stderr, "\t2) Use two contexts and swap at the same time.\n"); - fprintf(stderr, "\t\t Used to crash Mesa & nVidia, and DRI artifacts. Seems OK now.\n"); - fprintf(stderr, "\t3) Use one context, but only swap when a context is current.\n"); - fprintf(stderr, "\t\t Serious artifacts for DRI at least with ATI.\n"); - fprintf(stderr, "\t4) Use one context, swap both windows at the same time, so the left\n"); - fprintf(stderr, "\t\t window has no context at swap time. Severe artifacts for DRI.\n"); - fprintf(stderr, "\t5) Use two contexts, copying one to the other when switching windows.\n"); - fprintf(stderr, "\t\t DRI gives an error, indirect rendering crashes server.\n"); - - exit(1); - } - test = atoi(argv[1]); - - /* get a connection */ - dpy = XOpenDisplay(NULL); - - /* Get an appropriate visual */ - vi = glXChooseVisual(dpy, DefaultScreen(dpy), AttributeList); - if (vi == 0) { - fprintf(stderr, "No matching visuals found.\n"); - exit(-1); - } - - /* Create two GLX contexts, with list sharing */ - ctx1 = glXCreateContext(dpy, vi, 0, True); - ctx2 = glXCreateContext(dpy, vi, ctx1, True); - - /* create a colormap */ - swa.colormap = XCreateColormap(dpy, RootWindow(dpy, vi->screen), - vi->visual, AllocNone); - swa.border_pixel = 0; - - /* Create two windows */ - win1 = XCreateWindow(dpy, RootWindow(dpy, vi->screen), - 10, 10, 200, 200, - 0, vi->depth, InputOutput, vi->visual, - CWBorderPixel | CWColormap, &swa); - XStoreName(dpy, win1, "Test [L]"); - XMapWindow(dpy, win1); - XMoveWindow(dpy, win1, 10, 10); /* Initial requested x,y may not be honored */ - { - XSizeHints sizehints; - static const char *name = "window"; - sizehints.x = 10; - sizehints.y = 10; - sizehints.width = 200; - sizehints.height = 200; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win1, &sizehints); - XSetStandardProperties(dpy, win1, name, name, - None, (char **)NULL, 0, &sizehints); - } - - - win2 = XCreateWindow(dpy, RootWindow(dpy, vi->screen), - 250, 10, 200, 200, - 0, vi->depth, InputOutput, vi->visual, - CWBorderPixel | CWColormap, &swa); - XStoreName(dpy, win1, "Test [R]"); - XMapWindow(dpy, win2); - XMoveWindow(dpy, win2, 260, 10); - { - XSizeHints sizehints; - static const char *name = "window"; - sizehints.x = 10; - sizehints.y = 10; - sizehints.width = 200; - sizehints.height = 200; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win2, &sizehints); - XSetStandardProperties(dpy, win2, name, name, - None, (char **)NULL, 0, &sizehints); - } - - - /* Now draw some spinning things */ - for (angle = 0; angle < 360*4; angle += 10.0) { - /* Connect the context to window 1 */ - glXMakeCurrent(dpy, win1, ctx1); - - /* Clear and draw in window 1 */ - glDrawBuffer(GL_BACK); - glClearColor(1, 1, 0, 1); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glColor3f(1, 0, 0); - glBegin(GL_TRIANGLES); - glVertex2f(0, 0); - glVertex2f(cos(angle * DEGTOR), sin(angle * DEGTOR)); - glVertex2f(cos((angle + 20.0) * DEGTOR), - sin((angle + 20.0) * DEGTOR)); - glEnd(); - glFlush(); - - if (test == 1 || test == 3 || test == 5) - glXSwapBuffers(dpy, win1); - - if (test == 5) - glXCopyContext(dpy, ctx1, ctx2, GL_ALL_ATTRIB_BITS); - /* Connect the context to window 2 */ - if (test == 3 || test == 4) { - glXMakeCurrent(dpy, win2, ctx1); - } else { - glXMakeCurrent(dpy, win2, ctx2); - } - - /* Clear and draw in window 2 */ - glDrawBuffer(GL_BACK); - glClearColor(0, 0, 1, 1); - glClear(GL_COLOR_BUFFER_BIT); - glColor3f(1, 1, 0); - glBegin(GL_TRIANGLES); - glVertex2f(0, 0); - glVertex2f(cos(angle * DEGTOR), sin(angle * DEGTOR)); - glVertex2f(cos((angle + 20.0) * DEGTOR), - sin((angle + 20.0) * DEGTOR)); - glEnd(); - glFlush(); - - /* Swap buffers */ - if (test == 2 || test == 4) - glXSwapBuffers(dpy, win1); - glXSwapBuffers(dpy, win2); - - /* wait a while */ - glXWaitX(); - usleep(20000); - } - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/manytex.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/manytex.c deleted file mode 100644 index 8add125a69..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/manytex.c +++ /dev/null @@ -1,381 +0,0 @@ -/* $Id: manytex.c,v 1.4 2002/10/18 17:47:36 kschultz Exp $ */ - -/* - * test handling of many texture maps - * Also tests texture priority and residency. - * - * Brian Paul - * August 2, 2000 - */ - - -#include -#include -#include -#include -#include - - -static GLint NumTextures = 20; -static GLuint *TextureID = NULL; -static GLint *TextureWidth = NULL, *TextureHeight = NULL; -static GLboolean *TextureResidency = NULL; -static GLint TexWidth = 128, TexHeight = 128; -static GLfloat Zrot = 0; -static GLboolean Anim = GL_TRUE; -static GLint WinWidth = 500, WinHeight = 400; -static GLboolean MipMap = GL_FALSE; -static GLboolean LinearFilter = GL_FALSE; -static GLboolean RandomSize = GL_FALSE; -static GLint Rows, Columns; -static GLint LowPriorityCount = 0; - - -static void Idle( void ) -{ - Zrot += 1.0; - glutPostRedisplay(); -} - - -static void Display( void ) -{ - GLfloat spacing = WinWidth / Columns; - GLfloat size = spacing * 0.4; - GLint i; - - /* test residency */ - if (0) - { - GLboolean b; - GLint i, resident; - b = glAreTexturesResident(NumTextures, TextureID, TextureResidency); - if (b) { - printf("all resident\n"); - } - else { - resident = 0; - for (i = 0; i < NumTextures; i++) { - if (TextureResidency[i]) { - resident++; - } - } - printf("%d of %d texture resident\n", resident, NumTextures); - } - } - - /* render the textured quads */ - glClear( GL_COLOR_BUFFER_BIT ); - for (i = 0; i < NumTextures; i++) { - GLint row = i / Columns; - GLint col = i % Columns; - GLfloat x = col * spacing + spacing * 0.5; - GLfloat y = row * spacing + spacing * 0.5; - - GLfloat maxDim = (TextureWidth[i] > TextureHeight[i]) - ? TextureWidth[i] : TextureHeight[i]; - GLfloat w = TextureWidth[i] / maxDim; - GLfloat h = TextureHeight[i] / maxDim; - - glPushMatrix(); - glTranslatef(x, y, 0.0); - glRotatef(Zrot, 0, 0, 1); - glScalef(size, size, 1); - - glBindTexture(GL_TEXTURE_2D, TextureID[i]); - glBegin(GL_POLYGON); -#if 0 - glTexCoord2f(0, 0); glVertex2f(-1, -1); - glTexCoord2f(1, 0); glVertex2f( 1, -1); - glTexCoord2f(1, 1); glVertex2f( 1, 1); - glTexCoord2f(0, 1); glVertex2f(-1, 1); -#else - glTexCoord2f(0, 0); glVertex2f(-w, -h); - glTexCoord2f(1, 0); glVertex2f( w, -h); - glTexCoord2f(1, 1); glVertex2f( w, h); - glTexCoord2f(0, 1); glVertex2f(-w, h); -#endif - glEnd(); - glPopMatrix(); - } - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - WinWidth = width; - WinHeight = height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho(0, width, 0, height, -1, 1); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); -} - - -/* - * Return a random int in [min, max]. - */ -static int RandomInt(int min, int max) -{ - int i = rand(); - int j = i % (max - min + 1); - return min + j; -} - - - -static void Init( void ) -{ - GLint i; - - if (RandomSize) { - printf("Creating %d %s random-size textures, ", NumTextures, - MipMap ? "Mipmapped" : "non-Mipmapped"); - } - else { - printf("Creating %d %s %d x %d textures, ", NumTextures, - MipMap ? "Mipmapped" : "non-Mipmapped", - TexWidth, TexHeight); - } - - if (LinearFilter) { - printf("bilinear filtering\n"); - } - else { - printf("nearest filtering\n"); - } - - - /* compute number of rows and columns of rects */ - { - GLfloat area = (GLfloat) (WinWidth * WinHeight) / (GLfloat) NumTextures; - GLfloat edgeLen = sqrt(area); - - Columns = WinWidth / edgeLen; - Rows = (NumTextures + Columns - 1) / Columns; - printf("Rows: %d Cols: %d\n", Rows, Columns); - } - - - if (!TextureID) { - TextureID = (GLuint *) malloc(sizeof(GLuint) * NumTextures); - assert(TextureID); - glGenTextures(NumTextures, TextureID); - } - - if (!TextureResidency) { - TextureResidency = (GLboolean *) malloc(sizeof(GLboolean) * NumTextures); - assert(TextureResidency); - } - - if (!TextureWidth) { - TextureWidth = (GLint *) malloc(sizeof(GLint) * NumTextures); - assert(TextureWidth); - } - if (!TextureHeight) { - TextureHeight = (GLint *) malloc(sizeof(GLint) * NumTextures); - assert(TextureHeight); - } - - for (i = 0; i < NumTextures; i++) { - GLubyte color[4]; - GLubyte *texImage; - GLint j, row, col; - - row = i / Columns; - col = i % Columns; - - glBindTexture(GL_TEXTURE_2D, TextureID[i]); - - if (i < LowPriorityCount) - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, 0.5F); - - if (RandomSize) { -#if 0 - int k = (glutGet(GLUT_ELAPSED_TIME) % 7) + 2; - TexWidth = 1 << k; - TexHeight = 1 << k; -#else - TexWidth = 1 << RandomInt(2, 7); - TexHeight = 1 << RandomInt(2, 7); - printf("Random size of %3d: %d x %d\n", i, TexWidth, TexHeight); -#endif - } - - TextureWidth[i] = TexWidth; - TextureHeight[i] = TexHeight; - - texImage = (GLubyte*) malloc(4 * TexWidth * TexHeight * sizeof(GLubyte)); - assert(texImage); - - /* determine texture color */ - color[0] = (GLint) (255.0 * ((float) col / (Columns - 1))); - color[1] = 127; - color[2] = (GLint) (255.0 * ((float) row / (Rows - 1))); - color[3] = 255; - - /* fill in solid-colored teximage */ - for (j = 0; j < TexWidth * TexHeight; j++) { - texImage[j*4+0] = color[0]; - texImage[j*4+1] = color[1]; - texImage[j*4+2] = color[2]; - texImage[j*4+3] = color[3]; - } - - if (MipMap) { - GLint level = 0; - GLint w = TexWidth, h = TexHeight; - while (1) { - glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA, w, h, 0, - GL_RGBA, GL_UNSIGNED_BYTE, texImage); - if (w == 1 && h == 1) - break; - if (w > 1) - w /= 2; - if (h > 1) - h /= 2; - level++; - /*printf("%d: %d x %d\n", level, w, h);*/ - } - if (LinearFilter) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR_MIPMAP_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - } - else { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_NEAREST_MIPMAP_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } - } - else { - /* Set corners to white */ - int k = 0; - texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255; - k = (TexWidth - 1) * 4; - texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255; - k = (TexWidth * TexHeight - TexWidth) * 4; - texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255; - k = (TexWidth * TexHeight - 1) * 4; - texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255; - - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, TexWidth, TexHeight, 0, - GL_RGBA, GL_UNSIGNED_BYTE, texImage); - if (LinearFilter) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - } - else { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } - } - - free(texImage); - } - - glEnable(GL_TEXTURE_2D); -} - - -static void Key( unsigned char key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 's': - Idle(); - break; - case 'z': - Zrot -= step; - break; - case 'Z': - Zrot += step; - break; - case ' ': - Init(); - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -int main( int argc, char *argv[] ) -{ - GLint i; - - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( WinWidth, WinHeight ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - if (Anim) - glutIdleFunc(Idle); - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-n") == 0) { - NumTextures = atoi(argv[i+1]); - if (NumTextures <= 0) { - printf("Error, bad number of textures\n"); - return 1; - } - i++; - } - else if (strcmp(argv[i], "-mipmap") == 0) { - MipMap = GL_TRUE; - } - else if (strcmp(argv[i], "-linear") == 0) { - LinearFilter = GL_TRUE; - } - else if (strcmp(argv[i], "-size") == 0) { - TexWidth = atoi(argv[i+1]); - TexHeight = atoi(argv[i+2]); - assert(TexWidth >= 1); - assert(TexHeight >= 1); - i += 2; - } - else if (strcmp(argv[i], "-randomsize") == 0) { - RandomSize = GL_TRUE; - } - else if (strcmp(argv[i], "-lowpri") == 0) { - LowPriorityCount = atoi(argv[i+1]); - i++; - } - else { - printf("Usage:\n"); - printf(" manytex [options]\n"); - printf("Options:\n"); - printf(" -n \n"); - printf(" -size - specify texture size\n"); - printf(" -randomsize - use random size textures\n"); - printf(" -mipmap - generate mipmaps\n"); - printf(" -linear - use linear filtering instead of nearest\n"); - printf(" -lowpri - Set lower priority on textures\n"); - return 0; - } - } - - Init(); - - glutMainLoop(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/multipal.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/multipal.c deleted file mode 100644 index c824b38703..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/multipal.c +++ /dev/null @@ -1,377 +0,0 @@ -/* $Id: multipal.c,v 1.6 2003/12/08 09:03:36 joukj Exp $ */ - -/* - * Test multitexture and paletted textures. - */ - -#include -#include -#include -#include -#include -#ifdef __VMS -# include /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */ -#else -# include /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */ -#endif -#ifdef _WIN32 -#include -#endif -#define GL_GLEXT_LEGACY -#include - -#include "../util/readtex.c" /* I know, this is a hack. */ - -#define TEXTURE_1_FILE "../images/tile.rgb" -#define TEXTURE_2_FILE "../images/reflect.rgb" - -#define TEX0 1 -#define TEX1 2 -#define TEXBOTH 3 -#define ANIMATE 10 -#define QUIT 100 - -static GLboolean Animate = GL_TRUE; - -static GLfloat Drift = 0.0; -static GLfloat Xrot = 20.0, Yrot = 30.0, Zrot = 0.0; - - - -static void Idle( void ) -{ - if (Animate) { - Drift += 0.05; - if (Drift >= 1.0) - Drift = 0.0; - -#ifdef GL_ARB_multitexture - glActiveTextureARB(GL_TEXTURE0_ARB); -#endif - glMatrixMode(GL_TEXTURE); - glLoadIdentity(); - glTranslatef(Drift, 0.0, 0.0); - glMatrixMode(GL_MODELVIEW); - -#ifdef GL_ARB_multitexture - glActiveTextureARB(GL_TEXTURE1_ARB); -#endif - glMatrixMode(GL_TEXTURE); - glLoadIdentity(); - glTranslatef(0.0, Drift, 0.0); - glMatrixMode(GL_MODELVIEW); - - glutPostRedisplay(); - } -} - - -static void DrawObject(void) -{ - glBegin(GL_QUADS); - -#ifdef GL_ARB_multitexture - glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.0, 0.0); - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, 0.0); - glVertex2f(-1.0, -1.0); - - glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 2.0, 0.0); - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, 0.0); - glVertex2f(1.0, -1.0); - - glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 2.0, 2.0); - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, 1.0); - glVertex2f(1.0, 1.0); - - glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.0, 2.0); - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, 1.0); - glVertex2f(-1.0, 1.0); -#else - glTexCoord2f(0.0, 0.0); - glVertex2f(-1.0, -1.0); - - glTexCoord2f(1.0, 0.0); - glVertex2f(1.0, -1.0); - - glTexCoord2f(1.0, 1.0); - glVertex2f(1.0, 1.0); - - glTexCoord2f(0.0, 1.0); - glVertex2f(-1.0, 1.0); -#endif - - glEnd(); -} - - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - glScalef(5.0, 5.0, 5.0); - DrawObject(); - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 10.0, 100.0 ); - /*glOrtho( -6.0, 6.0, -6.0, 6.0, 10.0, 100.0 );*/ - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -70.0 ); -} - - -static void ModeMenu(int entry) -{ - GLboolean enable0 = GL_FALSE, enable1 = GL_FALSE; - if (entry==TEX0) { - enable0 = GL_TRUE; - } - else if (entry==TEX1) { - enable1 = GL_TRUE; - } - else if (entry==TEXBOTH) { - enable0 = GL_TRUE; - enable1 = GL_TRUE; - } - else if (entry==ANIMATE) { - Animate = !Animate; - } - else if (entry==QUIT) { - exit(0); - } - - if (entry != ANIMATE) { -#ifdef GL_ARB_multitexture - glActiveTextureARB(GL_TEXTURE0_ARB); -#endif - if (enable0) { - glEnable(GL_TEXTURE_2D); - } - else - glDisable(GL_TEXTURE_2D); - -#ifdef GL_ARB_multitexture - glActiveTextureARB(GL_TEXTURE1_ARB); -#endif - if (enable1) { - glEnable(GL_TEXTURE_2D); - } - else - glDisable(GL_TEXTURE_2D); - } - - glutPostRedisplay(); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - float step = 3.0; - (void) x; - (void) y; - - switch (key) { - case GLUT_KEY_UP: - Xrot += step; - break; - case GLUT_KEY_DOWN: - Xrot -= step; - break; - case GLUT_KEY_LEFT: - Yrot += step; - break; - case GLUT_KEY_RIGHT: - Yrot -= step; - break; - } - glutPostRedisplay(); -} - - -static void load_tex(const char *fname, int channel) -{ - GLubyte *image; - GLenum format; - GLint w, h; - GLubyte *grayImage; - int i; - GLubyte table[256][4]; - - image = LoadRGBImage(fname, &w, &h, &format); - if (!image) - exit(1); - - printf("%s %d x %d\n", fname, w, h); - grayImage = malloc(w * h * 1); - assert(grayImage); - for (i = 0; i < w * h; i++) { - int g = (image[i*3+0] + image[i*3+1] + image[i*3+2]) / 3; - assert(g < 256); - grayImage[i] = g; - } - - glTexImage2D(GL_TEXTURE_2D, 0, GL_COLOR_INDEX, w, h, 0, GL_COLOR_INDEX, - GL_UNSIGNED_BYTE, grayImage); - - for (i = 0; i < 256; i++) { - table[i][0] = channel ? i : 0; - table[i][1] = i; - table[i][2] = channel ? 0 : i; - table[i][3] = 255; - } - - glColorTableEXT(GL_TEXTURE_2D, /* target */ - GL_RGBA, /* internal format */ - 256, /* table size */ - GL_RGBA, /* table format */ - GL_UNSIGNED_BYTE, /* table type */ - table); /* the color table */ - - free(grayImage); - free(image); -} - - - -static void Init( int argc, char *argv[] ) -{ - GLuint texObj[2]; - GLint units; - - if (!glutExtensionSupported("GL_ARB_multitexture")) { - printf("Sorry, GL_ARB_multitexture not supported by this renderer.\n"); - exit(1); - } - if (!glutExtensionSupported("GL_EXT_paletted_texture")) { - printf("Sorry, GL_EXT_paletted_texture not supported by this renderer.\n"); - exit(1); - } - - glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &units); - printf("%d texture units supported\n", units); - - /* allocate two texture objects */ - glGenTextures(2, texObj); - - /* setup texture obj 0 */ - glBindTexture(GL_TEXTURE_2D, texObj[0]); -#ifdef LINEAR_FILTER - /* linear filtering looks much nicer but is much slower for Mesa */ - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -foo -#else - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); -#endif - - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - load_tex(TEXTURE_1_FILE, 0); -#if 0 - if (!LoadRGBMipmaps(TEXTURE_1_FILE, GL_RGB)) { - printf("Error: couldn't load texture image\n"); - exit(1); - } -#endif - - /* setup texture obj 1 */ - glBindTexture(GL_TEXTURE_2D, texObj[1]); -#ifdef LINEAR_FILTER - /* linear filtering looks much nicer but is much slower for Mesa */ - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -foo -#else - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); -#endif - - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - - load_tex(TEXTURE_2_FILE, 1); -#if 0 - if (!LoadRGBMipmaps(TEXTURE_2_FILE, GL_RGB)) { - printf("Error: couldn't load texture image\n"); - exit(1); - } -#endif - - /* now bind the texture objects to the respective texture units */ -#ifdef GL_ARB_multitexture - glActiveTextureARB(GL_TEXTURE0_ARB); - glBindTexture(GL_TEXTURE_2D, texObj[0]); - glActiveTextureARB(GL_TEXTURE1_ARB); - glBindTexture(GL_TEXTURE_2D, texObj[1]); -#endif - - glShadeModel(GL_FLAT); - glClearColor(0.3, 0.3, 0.4, 1.0); - - ModeMenu(TEXBOTH); - - if (argc > 1 && strcmp(argv[1], "-info")==0) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowSize( 300, 300 ); - glutInitWindowPosition( 0, 0 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0] ); - - Init( argc, argv ); - - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - glutIdleFunc( Idle ); - - glutCreateMenu(ModeMenu); - glutAddMenuEntry("Texture 0", TEX0); - glutAddMenuEntry("Texture 1", TEX1); - glutAddMenuEntry("Multi-texture", TEXBOTH); - glutAddMenuEntry("Toggle Animation", ANIMATE); - glutAddMenuEntry("Quit", QUIT); - glutAttachMenu(GLUT_RIGHT_BUTTON); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/multitexarray.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/multitexarray.c deleted file mode 100644 index b4fab004a6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/multitexarray.c +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Test vertex arrays and multitexture. - * Press 'a' to toggle vertex arrays on/off. - * When you run this program you should see a square with four colors: - * - * +------+------+ - * |yellow| pink | - * +------+------+ - * |green | blue | - * +------+------+ - */ - - -#include -#include -#include -#include -#include -#include "GL/glut.h" - -static GLuint Window = 0; - -static GLuint TexObj[2]; -static GLfloat Angle = 0.0f; -static GLboolean UseArrays = 1, Anim = 0; - -static GLfloat VertArray[4][2] = { - {-1.2, -1.2}, {1.2, -1.2}, {1.2, 1.2}, {-1.2, 1.2} -}; - -static GLfloat Tex0Array[4][2] = { - {0, 0}, {1, 0}, {1, 1}, {0, 1} -}; - -static GLfloat Tex1Array[4][2] = { - {0, 0}, {1, 0}, {1, 1}, {0, 1} -}; - - -static void init_arrays(void) -{ - glVertexPointer(2, GL_FLOAT, 0, VertArray); - glEnableClientState(GL_VERTEX_ARRAY); - - glClientActiveTextureARB(GL_TEXTURE0_ARB); - glTexCoordPointer(2, GL_FLOAT, 0, Tex0Array); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - - glClientActiveTextureARB(GL_TEXTURE1_ARB); - glTexCoordPointer(2, GL_FLOAT, 0, Tex1Array); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); -} - - -static void draw( void ) -{ - glClear( GL_COLOR_BUFFER_BIT ); - - glColor3f( 0.0, 0.0, 0.0 ); - - /* draw first polygon */ - glPushMatrix(); - glRotatef( Angle, 0.0, 0.0, 1.0 ); - - if (UseArrays) { - glDrawArrays(GL_POLYGON, 0, 4); - } - else { - glBegin( GL_POLYGON ); - glTexCoord2f( 0.0, 0.0 ); - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, 0.0); - glVertex2f( -1.0, -1.0 ); - - glTexCoord2f( 1.0, 0.0 ); - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, 0.0); - glVertex2f( 1.0, -1.0 ); - - glTexCoord2f( 1.0, 1.0 ); - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, 1.0); - glVertex2f( 1.0, 1.0 ); - - glTexCoord2f( 0.0, 1.0 ); - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, 1.0); - glVertex2f( -1.0, 1.0 ); - glEnd(); - } - - glPopMatrix(); - - glutSwapBuffers(); -} - - - -static void idle( void ) -{ - Angle += 2.0; - glutPostRedisplay(); -} - - - -/* change view Angle, exit upon ESC */ -static void key(unsigned char k, int x, int y) -{ - (void) x; - (void) y; - switch (k) { - case 'a': - UseArrays = !UseArrays; - printf("UseArrays: %d\n", UseArrays); - break; - case ' ': - Anim = !Anim; - if (Anim) - glutIdleFunc(idle); - else - glutIdleFunc(NULL); - break; - case 27: - glDeleteTextures( 2, TexObj ); - glutDestroyWindow(Window); - exit(0); - } - glutPostRedisplay(); -} - - - -/* new window size or exposure */ -static void reshape( int width, int height ) -{ - glViewport(0, 0, (GLint)width, (GLint)height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - /* glOrtho( -3.0, 3.0, -3.0, 3.0, -10.0, 10.0 );*/ - glFrustum( -2.0, 2.0, -2.0, 2.0, 6.0, 20.0 ); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -8.0 ); -} - - -static void init( void ) -{ - static int width=8, height=8; - GLubyte tex[64][3]; - GLint i, j; - - /* generate texture object IDs */ - glGenTextures( 2, TexObj ); - - /* - * setup first texture object - */ - glActiveTextureARB(GL_TEXTURE0_ARB); - glEnable( GL_TEXTURE_2D ); - glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD ); - - glBindTexture( GL_TEXTURE_2D, TexObj[0] ); - assert(glIsTexture(TexObj[0])); - - /* red over black */ - for (i=0;i -#include -#include -#include - - -static GLint Window[2]; - -static GLfloat Xrot = 0, Yrot = 0, Zrot = 0; -static GLboolean Anim = GL_TRUE; - - -static void Idle( void ) -{ - Xrot += 3.0; - Yrot += 4.0; - Zrot += 2.0; - - glutSetWindow(Window[0]); - glutPostRedisplay(); - glutSetWindow(Window[1]); - glutPostRedisplay(); -} - - -static void Display0( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - glPushMatrix(); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - glRotatef(Zrot, 0, 0, 1); - - glColor3f(0, 1, 0); - glutSolidCube(2.0); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Display1( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - glRotatef(Zrot, 0, 0, 1); - - glShadeModel(GL_FLAT); - - glBegin(GL_TRIANGLE_STRIP); - glColor3f(1, 0, 0); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glColor3f(1, 0, 0); - glVertex2f( -1, 1); - glColor3f(0, 0, 1); - glVertex2f( 1, 1); - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 'z': - Zrot -= step; - break; - case 'Z': - Zrot += step; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 400, 400 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - Window[0] = glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display0 ); - glutIdleFunc(Idle); - printf("GL_RENDERER[0] = %s\n", (char *) glGetString(GL_RENDERER)); - - glutInitWindowPosition( 500, 0 ); - glutInitWindowSize( 400, 400 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - Window[1] = glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display1 ); - glutIdleFunc(Idle); - printf("GL_RENDERER[1] = %s\n", (char *) glGetString(GL_RENDERER)); - - glutMainLoop(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/no_s3tc.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/no_s3tc.c deleted file mode 100644 index d3383ff98a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/no_s3tc.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file no_s3tc.c - * Test program to verify the behavior of an OpenGL implementation when - * an application calls \c glCompressedTexImage2D with an unsupported (but - * valid) compression format. The most common example is calling it with - * \c GL_COMPRESSED_RGBA_S3TC_DXT1_EXT when GL_EXT_texture_compression_s3tc - * is not supported. - * - * This tests Mesa bug #1028405. - * - * \author Ian Romanick - */ - -#include -#include -#include -#include -#include - -static unsigned data[16]; - -int -main( int argc, char ** argv ) -{ - float gl_version; - GLenum format; - GLuint size; - GLuint width; - GLenum err; - - - glutInit( & argc, argv ); - glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE ); - - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 300, 300 ); - glutCreateWindow( "No S3TC Test" ); - - gl_version = strtod( (const char *) glGetString( GL_VERSION ), NULL ); - if ( ! glutExtensionSupported( "GL_ARB_texture_compression" ) - && (gl_version < 1.3) ) { - fprintf( stderr, "Either OpenGL 1.3 or GL_ARB_texture_compression " - "must be supported.\n" ); - return( EXIT_SUCCESS ); - } - - - if ( ! glutExtensionSupported( "GL_EXT_texture_compression_s3tc" ) ) { - format = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT; - width = 4; - size = 8; - } - else if ( ! glutExtensionSupported( "GL_3DFX_texture_compression_FXT1" ) ) { - format = GL_COMPRESSED_RGBA_FXT1_3DFX; - width = 8; - size = 16; - } - else { - fprintf( stderr, "Either GL_EXT_texture_compression_s3tc or " - "GL_3DFX_texture_compression_FXT1 must NOT be supported.\n" ); - return( EXIT_SUCCESS ); - } - - glCompressedTexImage2D( GL_TEXTURE_2D, 0, format, width, 4, 0, - size, data ); - err = glGetError(); - if ( err != GL_INVALID_ENUM ) { - fprintf( stderr, "GL error 0x%04x should have been generated, but " - "0x%04x was generated instead.\n", GL_INVALID_ENUM, err ); - } - - return (err == GL_INVALID_ENUM) ? EXIT_SUCCESS : EXIT_FAILURE; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/packedpixels.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/packedpixels.c deleted file mode 100644 index 842cf7f34b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/packedpixels.c +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Test packed pixel formats for textures. - * Brian Paul - * 12 May 2004 - */ - -#include -#include -#include -#include -#include - - -struct pixel_format { - const char *name; - GLenum format; - GLenum type; - GLint bytes; - GLuint redTexel, greenTexel; -}; - -static const struct pixel_format Formats[] = { - - { "GL_RGBA/GL_UNSIGNED_INT_8_8_8_8", - GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, 4, 0xff000000, 0x00ff0000 }, - { "GL_RGBA/GL_UNSIGNED_INT_8_8_8_8_REV", - GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, 4, 0x000000ff, 0x0000ff00 }, - { "GL_RGBA/GL_UNSIGNED_INT_10_10_10_2", - GL_RGBA, GL_UNSIGNED_INT_10_10_10_2, 4, 0xffc00000, 0x3ff000 }, - { "GL_RGBA/GL_UNSIGNED_INT_2_10_10_10_REV", - GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, 4, 0x3ff, 0xffc00 }, - { "GL_RGBA/GL_UNSIGNED_SHORT_4_4_4_4", - GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, 2, 0xf000, 0x0f00 }, - { "GL_RGBA/GL_UNSIGNED_SHORT_4_4_4_4_REV", - GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4_REV, 2, 0x000f, 0x00f0 }, - { "GL_RGBA/GL_UNSIGNED_SHORT_5_5_5_1", - GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, 2, 0xf800, 0x7c0 }, - { "GL_RGBA/GL_UNSIGNED_SHORT_1_5_5_5_REV", - GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV, 2, 0x1f, 0x3e0 }, - - { "GL_BGRA/GL_UNSIGNED_INT_8_8_8_8", - GL_BGRA, GL_UNSIGNED_INT_8_8_8_8, 4, 0x0000ff00, 0x00ff0000 }, - { "GL_BGRA/GL_UNSIGNED_INT_8_8_8_8_REV", - GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, 4, 0x00ff0000, 0x0000ff00 }, - { "GL_BGRA/GL_UNSIGNED_SHORT_4_4_4_4", - GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4, 2, 0x00f0, 0x0f00 }, - { "GL_BGRA/GL_UNSIGNED_SHORT_4_4_4_4_REV", - GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4_REV, 2, 0x0f00, 0x00f0 }, - { "GL_BGRA/GL_UNSIGNED_SHORT_5_5_5_1", - GL_BGRA, GL_UNSIGNED_SHORT_5_5_5_1, 2, 0x3e, 0x7c0 }, - { "GL_BGRA/GL_UNSIGNED_SHORT_1_5_5_5_REV", - GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV, 2, 0x7c00, 0x3e0 }, - - { "GL_ABGR_EXT/GL_UNSIGNED_INT_8_8_8_8", - GL_ABGR_EXT, GL_UNSIGNED_INT_8_8_8_8, 4, 0x000000ff, 0x0000ff00 }, - { "GL_ABGR_EXT/GL_UNSIGNED_INT_8_8_8_8_REV", - GL_ABGR_EXT, GL_UNSIGNED_INT_8_8_8_8_REV, 4, 0xff000000, 0x00ff0000 }, - { "GL_ABGR_EXT/GL_UNSIGNED_SHORT_4_4_4_4", - GL_ABGR_EXT, GL_UNSIGNED_SHORT_4_4_4_4, 2, 0x000f, 0x00f0 }, - { "GL_ABGR_EXT/GL_UNSIGNED_SHORT_4_4_4_4_REV", - GL_ABGR_EXT, GL_UNSIGNED_SHORT_4_4_4_4_REV, 2, 0xf000, 0x0f00 }, - { "GL_ABGR_EXT/GL_UNSIGNED_SHORT_5_5_5_1", - GL_ABGR_EXT, GL_UNSIGNED_SHORT_5_5_5_1, 2, 0x1, 0x3e }, - { "GL_ABGR_EXT/GL_UNSIGNED_SHORT_1_5_5_5_REV", - GL_ABGR_EXT, GL_UNSIGNED_SHORT_1_5_5_5_REV, 2, 0x8000, 0x7c00 }, - - { "GL_RGB/GL_UNSIGNED_SHORT_5_6_5", - GL_RGB, GL_UNSIGNED_SHORT_5_6_5, 2, 0xf800, 0x7e0 }, - { "GL_RGB/GL_UNSIGNED_SHORT_5_6_5_REV", - GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV, 2, 0x1f, 0x7e0 }, - { "GL_RGB/GL_UNSIGNED_BYTE_3_3_2", - GL_RGB, GL_UNSIGNED_BYTE_3_3_2, 1, 0xe0, 0x1c }, - { "GL_RGB/GL_UNSIGNED_BYTE_2_3_3_REV", - GL_RGB, GL_UNSIGNED_BYTE_2_3_3_REV, 1, 0x7, 0x38 }, - - { NULL, 0, 0, 0, 0, 0 } -}; - - -struct name_format { - const char *name; - GLenum format; -}; - -static const struct name_format IntFormats[] = { - { "GL_RGBA", GL_RGBA }, - { "GL_RGBA2", GL_RGBA2 }, - { "GL_RGBA4", GL_RGBA4 }, - { "GL_RGB5_A1", GL_RGB5_A1 }, - { "GL_RGBA8", GL_RGBA8 }, - { "GL_RGBA12", GL_RGBA12 }, - { "GL_RGBA16", GL_RGBA16 }, - { "GL_RGB10_A2", GL_RGB10_A2 }, - - { "GL_RGB", GL_RGB }, - { "GL_R3_G3_B2", GL_R3_G3_B2 }, - { "GL_RGB4", GL_RGB4 }, - { "GL_RGB5", GL_RGB5 }, - { "GL_RGB8", GL_RGB8 }, - { "GL_RGB10", GL_RGB10 }, - { "GL_RGB12", GL_RGB12 }, - { "GL_RGB16", GL_RGB16 }, - -}; - -#define NUM_INT_FORMATS (sizeof(IntFormats) / sizeof(IntFormats[0])) -static GLuint CurFormat = 0; - - -static void -PrintString(const char *s) -{ - while (*s) { - glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s); - s++; - } -} - - -static void -MakeTexture(const struct pixel_format *format, GLenum intFormat, GLboolean swap) -{ - GLubyte texBuffer[1000]; - int i; - - glPixelStorei(GL_UNPACK_SWAP_BYTES, swap); - - if (format->bytes == 1) { - for (i = 0; i < 8; i++) { - texBuffer[i] = format->redTexel; - } - for (i = 8; i < 16; i++) { - texBuffer[i] = format->greenTexel; - } - } - else if (format->bytes == 2) { - GLushort *us = (GLushort *) texBuffer; - for (i = 0; i < 8; i++) { - us[i] = format->redTexel; - } - for (i = 8; i < 16; i++) { - us[i] = format->greenTexel; - } - if (swap) { - for (i = 0; i < 16; i++) - us[i] = (us[i] << 8) | (us[i] >> 8); - } - } - else if (format->bytes == 4) { - GLuint *ui = (GLuint *) texBuffer; - for (i = 0; i < 8; i++) { - ui[i] = format->redTexel; - } - for (i = 8; i < 16; i++) { - ui[i] = format->greenTexel; - } - if (swap) { - for (i = 0; i < 16; i++) { - GLuint b = ui[i]; - ui[i] = (b >> 24) - | ((b >> 8) & 0xff00) - | ((b << 8) & 0xff0000) - | ((b << 24) & 0xff000000); - } - } - } - else { - abort(); - } - glTexImage2D(GL_TEXTURE_2D, 0, intFormat, 4, 4, 0, - format->format, format->type, texBuffer); - - if (glGetError()) { - printf("GL Error for %s\n", format->name); - memset(texBuffer, 255, 1000); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 4, 4, 0, - GL_RGB, GL_UNSIGNED_BYTE, texBuffer); - } -} - - - -static void -Draw(void) -{ - char s[1000]; - int w = 350, h = 20; - int i, swap; - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - for (swap = 0; swap < 2; swap++) { - for (i = 0; Formats[i].name; i++) { - glPushMatrix(); - glTranslatef(swap * (w + 2), i * (h + 2), 0); - - MakeTexture(Formats + i, IntFormats[CurFormat].format, swap); - - glEnable(GL_TEXTURE_2D); - glBegin(GL_POLYGON); - glTexCoord2f(0, 0); glVertex2f(0, 0); - glTexCoord2f(1, 0); glVertex2f(w, 0); - glTexCoord2f(1, 1); glVertex2f(w, h); - glTexCoord2f(0, 1); glVertex2f(0, h); - glEnd(); - - glDisable(GL_TEXTURE_2D); - glColor3f(0, 0, 0); - glRasterPos2i(8, 6); - PrintString(Formats[i].name); - - glPopMatrix(); - } - } - - glPushMatrix(); - glTranslatef(2, i * (h + 2), 0); - glColor3f(1, 1, 1); - glRasterPos2i(8, 6); - PrintString("Normal"); - glRasterPos2i(w + 2, 6); - PrintString("Byte Swapped"); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(2, (i + 1) * (h + 2), 0); - glRasterPos2i(8, 6); - sprintf(s, "Internal Texture Format [f/F]: %s (%d of %d)", - IntFormats[CurFormat].name, CurFormat + 1, NUM_INT_FORMATS); - PrintString(s); - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void -Reshape(int width, int height) -{ - glViewport(0, 0, width, height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(0, width, 0, height, -1, 1); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - - -static void -Key(unsigned char key, int x, int y) -{ - (void) x; - (void) y; - switch (key) { - case 'F': - if (CurFormat == 0) - CurFormat = NUM_INT_FORMATS - 1; - else - CurFormat--; - break; - case 'f': - CurFormat++; - if (CurFormat == NUM_INT_FORMATS) - CurFormat = 0; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void -Init(void) -{ - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); -} - - -int -main(int argc, char *argv[]) -{ - glutInit(&argc, argv); - glutInitWindowPosition(0, 0); - glutInitWindowSize(700, 800); - glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); - glutCreateWindow(argv[0]); - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Draw); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/pbo.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/pbo.c deleted file mode 100644 index a74e8e148b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/pbo.c +++ /dev/null @@ -1,283 +0,0 @@ -/* - * GL_EXT_pixel_buffer_object test - * - * Brian Paul - * 11 March 2004 - */ - -#define GL_GLEXT_PROTOTYPES - -#include -#include -#include -#include -#include - -#include "../util/readtex.c" /* a hack, I know */ - -#define IMAGE_FILE "../images/girl.rgb" - -static int ImgWidth, ImgHeight; -static GLenum ImgFormat; -static GLubyte *Image = NULL; - -static int APosX, APosY; /* simple drawpixels */ -static int BPosX, BPosY; /* read/draw pixels */ -static int CPosX, CPosY; /* copypixels */ - -static GLboolean DrawFront = GL_FALSE; -static GLboolean ScaleAndBias = GL_FALSE; -static GLboolean Benchmark = GL_FALSE; - -static GLuint DrawPBO, TempPBO; - - -static GLenum ReadFormat = GL_RGBA; -static GLenum ReadType = GL_UNSIGNED_BYTE; - - - - -static void -Reset( void ) -{ - APosX = 5; APosY = 20; - BPosX = APosX + ImgWidth + 5; BPosY = 20; - CPosX = BPosX + ImgWidth + 5; CPosY = 20; -} - - -static void -PrintString(const char *s) -{ - while (*s) { - glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s); - s++; - } -} - - -static void -SetupPixelTransfer(GLboolean invert) -{ - if (invert) { - glPixelTransferf(GL_RED_SCALE, -1.0); - glPixelTransferf(GL_RED_BIAS, 1.0); - glPixelTransferf(GL_GREEN_SCALE, -1.0); - glPixelTransferf(GL_GREEN_BIAS, 1.0); - glPixelTransferf(GL_BLUE_SCALE, -1.0); - glPixelTransferf(GL_BLUE_BIAS, 1.0); - } - else { - glPixelTransferf(GL_RED_SCALE, 1.0); - glPixelTransferf(GL_RED_BIAS, 0.0); - glPixelTransferf(GL_GREEN_SCALE, 1.0); - glPixelTransferf(GL_GREEN_BIAS, 0.0); - glPixelTransferf(GL_BLUE_SCALE, 1.0); - glPixelTransferf(GL_BLUE_BIAS, 0.0); - } -} - - -static void -Display( void ) -{ - glClearColor(.3, .3, .3, 1); - glClear( GL_COLOR_BUFFER_BIT ); - - /** Unbind UNPACK pixel buffer before calling glBitmap */ - glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0); - - glRasterPos2i(5, ImgHeight+25); - PrintString("f = toggle front/back s = toggle scale/bias b = benchmark"); - - glRasterPos2i(5, ImgHeight+40); - PrintString("GL_EXT_pixel_buffer_object test"); - - /* draw original image */ - glRasterPos2i(APosX, 5); - PrintString("Original"); - glRasterPos2i(APosX, APosY); - glEnable(GL_DITHER); - SetupPixelTransfer(GL_FALSE); - /*** Draw from the DrawPBO */ - glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, DrawPBO); - glDrawPixels(ImgWidth, ImgHeight, ImgFormat, GL_UNSIGNED_BYTE, 0); - glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0); - - /* do readpixels, drawpixels */ - glRasterPos2i(BPosX, 5); - PrintString("Read/DrawPixels"); - SetupPixelTransfer(ScaleAndBias); - /*** read into the Temp PBO */ - glBindBufferARB(GL_PIXEL_PACK_BUFFER_EXT, TempPBO); - if (Benchmark) { - GLint reads = 0; - GLint endTime; - GLint startTime = glutGet(GLUT_ELAPSED_TIME); - GLdouble seconds, pixelsPerSecond; - printf("Benchmarking...\n"); - do { - glReadPixels(APosX, APosY, ImgWidth, ImgHeight, - ReadFormat, ReadType, 0); - reads++; - endTime = glutGet(GLUT_ELAPSED_TIME); - } while (endTime - startTime < 4000); /* 4 seconds */ - seconds = (double) (endTime - startTime) / 1000.0; - pixelsPerSecond = reads * ImgWidth * ImgHeight / seconds; - printf("Result: %d reads in %f seconds = %f pixels/sec\n", - reads, seconds, pixelsPerSecond); - Benchmark = GL_FALSE; - } - else { - glReadPixels(APosX, APosY, ImgWidth, ImgHeight, - ReadFormat, ReadType, 0); - } - glRasterPos2i(BPosX, BPosY); - glDisable(GL_DITHER); - SetupPixelTransfer(GL_FALSE); - /*** draw from the Temp PBO */ - glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, TempPBO); - glDrawPixels(ImgWidth, ImgHeight, ReadFormat, ReadType, 0); - glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0); - - /* do copypixels */ - glRasterPos2i(CPosX, 5); - PrintString("CopyPixels"); - glRasterPos2i(CPosX, CPosY); - glDisable(GL_DITHER); - SetupPixelTransfer(ScaleAndBias); - glCopyPixels(APosX, APosY, ImgWidth, ImgHeight, GL_COLOR); - - if (!DrawFront) - glutSwapBuffers(); - else - glFinish(); -} - - -static void -Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( 0.0, width, 0.0, height, -1.0, 1.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); -} - - -static void -Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 'b': - Benchmark = GL_TRUE; - break; - case 's': - ScaleAndBias = !ScaleAndBias; - break; - case 'f': - DrawFront = !DrawFront; - if (DrawFront) { - glDrawBuffer(GL_FRONT); - glReadBuffer(GL_FRONT); - } - else { - glDrawBuffer(GL_BACK); - glReadBuffer(GL_BACK); - } - printf("glDrawBuffer(%s)\n", DrawFront ? "GL_FRONT" : "GL_BACK"); - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void -Init( GLboolean ciMode ) -{ - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - - if (!glutExtensionSupported("GL_EXT_pixel_buffer_object")) { - printf("Sorry, this demo requires GL_EXT_pixel_buffer_object\n"); - exit(0); - } - - Image = LoadRGBImage( IMAGE_FILE, &ImgWidth, &ImgHeight, &ImgFormat ); - if (!Image) { - printf("Couldn't read %s\n", IMAGE_FILE); - exit(0); - } - - if (ciMode) { - /* Convert RGB image to grayscale */ - GLubyte *indexImage = (GLubyte *) malloc( ImgWidth * ImgHeight ); - GLint i; - for (i=0; i 1 && strcmp(argv[1], "-ci")==0) { - ciMode = GL_TRUE; - } - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 750, 250 ); - if (ciMode) - glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE ); - else - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0]); - Init(ciMode); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/projtex.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/projtex.c deleted file mode 100644 index e3ef948ab6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/projtex.c +++ /dev/null @@ -1,1028 +0,0 @@ - -/* projtex.c - by David Yu and David Blythe, SGI */ - -/** - ** Demonstrates simple projective texture mapping. - ** - ** Button1 changes view, Button2 moves texture. - ** - ** (See: Segal, Korobkin, van Widenfelt, Foran, and Haeberli - ** "Fast Shadows and Lighting Effects Using Texture Mapping", SIGGRAPH '92) - ** - ** 1994,1995 -- David G Yu - ** - ** cc -o projtex projtex.c texture.c -lglut -lGLU -lGL -lX11 -lm - **/ - -#include -#include -#include -#include -#include -#if 0 -#include "texture.h" -#else -#include "../util/readtex.c" -#endif - - -/* Some files do not define M_PI... */ -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -#define MAX_TEX 4 -int NumTextures = 1; - -int winWidth, winHeight; - -GLboolean redrawContinuously = GL_FALSE; - -float angle, axis[3]; -enum MoveModes { - MoveNone, MoveView, MoveObject, MoveTexture -}; -enum MoveModes mode = MoveNone; - -GLfloat objectXform[4][4]; -GLfloat textureXform[MAX_TEX][4][4]; - -void (*drawObject) (void); -void (*loadTexture) (void); -GLboolean textureEnabled = GL_TRUE; -GLboolean showProjection = GL_TRUE; -GLboolean linearFilter = GL_TRUE; - -char *texFilename[MAX_TEX] = { - "../images/girl.rgb", - "../images/tile.rgb", - "../images/bw.rgb", - "../images/reflect.rgb" -}; - - -GLfloat zoomFactor = 1.0; - -/*****************************************************************/ - - -void ActiveTexture(int i) -{ - glActiveTextureARB(i); -} - - -/* matrix = identity */ -void -matrixIdentity(GLfloat matrix[16]) -{ - matrix[0] = 1.0; - matrix[1] = 0.0; - matrix[2] = 0.0; - matrix[3] = 0.0; - matrix[4] = 0.0; - matrix[5] = 1.0; - matrix[6] = 0.0; - matrix[7] = 0.0; - matrix[8] = 0.0; - matrix[9] = 0.0; - matrix[10] = 1.0; - matrix[11] = 0.0; - matrix[12] = 0.0; - matrix[13] = 0.0; - matrix[14] = 0.0; - matrix[15] = 1.0; -} - -/* matrix2 = transpose(matrix1) */ -void -matrixTranspose(GLfloat matrix2[16], GLfloat matrix1[16]) -{ - matrix2[0] = matrix1[0]; - matrix2[1] = matrix1[4]; - matrix2[2] = matrix1[8]; - matrix2[3] = matrix1[12]; - - matrix2[4] = matrix1[1]; - matrix2[5] = matrix1[5]; - matrix2[6] = matrix1[9]; - matrix2[7] = matrix1[13]; - - matrix2[8] = matrix1[2]; - matrix2[9] = matrix1[6]; - matrix2[10] = matrix1[10]; - matrix2[11] = matrix1[14]; - - matrix2[12] = matrix1[3]; - matrix2[13] = matrix1[7]; - matrix2[14] = matrix1[14]; - matrix2[15] = matrix1[15]; -} - -/*****************************************************************/ - -/* load SGI .rgb image (pad with a border of the specified width and color) */ -#if 0 -static void -imgLoad(char *filenameIn, int borderIn, GLfloat borderColorIn[4], - int *wOut, int *hOut, GLubyte ** imgOut) -{ - int border = borderIn; - int width, height; - int w, h; - GLubyte *image, *img, *p; - int i, j, components; - - image = (GLubyte *) read_texture(filenameIn, &width, &height, &components); - w = width + 2 * border; - h = height + 2 * border; - img = (GLubyte *) calloc(w * h, 4 * sizeof(unsigned char)); - - p = img; - for (j = -border; j < height + border; ++j) { - for (i = -border; i < width + border; ++i) { - if (0 <= j && j <= height - 1 && 0 <= i && i <= width - 1) { - p[0] = image[4 * (j * width + i) + 0]; - p[1] = image[4 * (j * width + i) + 1]; - p[2] = image[4 * (j * width + i) + 2]; - p[3] = 0xff; - } else { - p[0] = borderColorIn[0] * 0xff; - p[1] = borderColorIn[1] * 0xff; - p[2] = borderColorIn[2] * 0xff; - p[3] = borderColorIn[3] * 0xff; - } - p += 4; - } - } - free(image); - *wOut = w; - *hOut = h; - *imgOut = img; -} -#endif - - -/*****************************************************************/ - -/* Load the image file specified on the command line as the current texture */ -void -loadImageTextures(void) -{ - GLfloat borderColor[4] = - {1.0, 1.0, 1.0, 1.0}; - int tex; - - for (tex = 0; tex < NumTextures; tex++) { - GLubyte *image, *texData3, *texData4; - GLint imgWidth, imgHeight; - GLenum imgFormat; - int i, j; - - printf("loading %s\n", texFilename[tex]); - image = LoadRGBImage(texFilename[tex], &imgWidth, &imgHeight, &imgFormat); - if (!image) { - printf("can't find %s\n", texFilename[tex]); - exit(1); - } - assert(imgFormat == GL_RGB); - - /* scale to 256x256 */ - texData3 = malloc(256 * 256 * 4); - texData4 = malloc(256 * 256 * 4); - assert(texData3); - assert(texData4); - gluScaleImage(imgFormat, imgWidth, imgHeight, GL_UNSIGNED_BYTE, image, - 256, 256, GL_UNSIGNED_BYTE, texData3); - - /* convert to rgba */ - for (i = 0; i < 256 * 256; i++) { - texData4[i*4+0] = texData3[i*3+0]; - texData4[i*4+1] = texData3[i*3+1]; - texData4[i*4+2] = texData3[i*3+2]; - texData4[i*4+3] = 128; - } - - /* put transparent border around image */ - for (i = 0; i < 256; i++) { - texData4[i*4+0] = 255; - texData4[i*4+1] = 255; - texData4[i*4+2] = 255; - texData4[i*4+3] = 0; - } - j = 256 * 255 * 4; - for (i = 0; i < 256; i++) { - texData4[j + i*4+0] = 255; - texData4[j + i*4+1] = 255; - texData4[j + i*4+2] = 255; - texData4[j + i*4+3] = 0; - } - for (i = 0; i < 256; i++) { - j = i * 256 * 4; - texData4[j+0] = 255; - texData4[j+1] = 255; - texData4[j+2] = 255; - texData4[j+3] = 0; - } - for (i = 0; i < 256; i++) { - j = i * 256 * 4 + 255 * 4; - texData4[j+0] = 255; - texData4[j+1] = 255; - texData4[j+2] = 255; - texData4[j+3] = 0; - } - - ActiveTexture(GL_TEXTURE0_ARB + tex); - glBindTexture(GL_TEXTURE_2D, tex + 1); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, - GL_RGBA, GL_UNSIGNED_BYTE, texData4); - - if (linearFilter) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - } else { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor); - } -} - -/* Create a simple spotlight pattern and make it the current texture */ -void -loadSpotlightTexture(void) -{ - static int texWidth = 64, texHeight = 64; - static GLubyte *texData; - GLfloat borderColor[4] = - {0.1, 0.1, 0.1, 1.0}; - - if (!texData) { - GLubyte *p; - int i, j; - - texData = (GLubyte *) malloc(texWidth * texHeight * 4 * sizeof(GLubyte)); - - p = texData; - for (j = 0; j < texHeight; ++j) { - float dy = (texHeight * 0.5 - j + 0.5) / (texHeight * 0.5); - - for (i = 0; i < texWidth; ++i) { - float dx = (texWidth * 0.5 - i + 0.5) / (texWidth * 0.5); - float r = cos(M_PI / 2.0 * sqrt(dx * dx + dy * dy)); - float c; - - r = (r < 0) ? 0 : r * r; - c = 0xff * (r + borderColor[0]); - p[0] = (c <= 0xff) ? c : 0xff; - c = 0xff * (r + borderColor[1]); - p[1] = (c <= 0xff) ? c : 0xff; - c = 0xff * (r + borderColor[2]); - p[2] = (c <= 0xff) ? c : 0xff; - c = 0xff * (r + borderColor[3]); - p[3] = (c <= 0xff) ? c : 0xff; - p += 4; - } - } - } - if (linearFilter) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - } else { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor); - gluBuild2DMipmaps(GL_TEXTURE_2D, 4, texWidth, texHeight, - GL_RGBA, GL_UNSIGNED_BYTE, texData); -} - -/*****************************************************************/ - -void -checkErrors(void) -{ - GLenum error; - while ((error = glGetError()) != GL_NO_ERROR) { - fprintf(stderr, "Error: %s\n", (char *) gluErrorString(error)); - } -} - -void -drawCube(void) -{ - glBegin(GL_QUADS); - - glNormal3f(-1.0, 0.0, 0.0); - glColor3f(0.80, 0.50, 0.50); - glVertex3f(-0.5, -0.5, -0.5); - glVertex3f(-0.5, -0.5, 0.5); - glVertex3f(-0.5, 0.5, 0.5); - glVertex3f(-0.5, 0.5, -0.5); - - glNormal3f(1.0, 0.0, 0.0); - glColor3f(0.50, 0.80, 0.50); - glVertex3f(0.5, 0.5, 0.5); - glVertex3f(0.5, -0.5, 0.5); - glVertex3f(0.5, -0.5, -0.5); - glVertex3f(0.5, 0.5, -0.5); - - glNormal3f(0.0, -1.0, 0.0); - glColor3f(0.50, 0.50, 0.80); - glVertex3f(-0.5, -0.5, -0.5); - glVertex3f(0.5, -0.5, -0.5); - glVertex3f(0.5, -0.5, 0.5); - glVertex3f(-0.5, -0.5, 0.5); - - glNormal3f(0.0, 1.0, 0.0); - glColor3f(0.50, 0.80, 0.80); - glVertex3f(0.5, 0.5, 0.5); - glVertex3f(0.5, 0.5, -0.5); - glVertex3f(-0.5, 0.5, -0.5); - glVertex3f(-0.5, 0.5, 0.5); - - glNormal3f(0.0, 0.0, -1.0); - glColor3f(0.80, 0.50, 0.80); - glVertex3f(-0.5, -0.5, -0.5); - glVertex3f(-0.5, 0.5, -0.5); - glVertex3f(0.5, 0.5, -0.5); - glVertex3f(0.5, -0.5, -0.5); - - glNormal3f(0.0, 0.0, 1.0); - glColor3f(1.00, 0.80, 0.50); - glVertex3f(0.5, 0.5, 0.5); - glVertex3f(-0.5, 0.5, 0.5); - glVertex3f(-0.5, -0.5, 0.5); - glVertex3f(0.5, -0.5, 0.5); - glEnd(); -} - -void -drawDodecahedron(void) -{ -#define A (0.5 * 1.61803) /* (sqrt(5) + 1) / 2 */ -#define B (0.5 * 0.61803) /* (sqrt(5) - 1) / 2 */ -#define C (0.5 * 1.0) - GLfloat vertexes[20][3] = - { - {-A, 0.0, B}, - {-A, 0.0, -B}, - {A, 0.0, -B}, - {A, 0.0, B}, - {B, -A, 0.0}, - {-B, -A, 0.0}, - {-B, A, 0.0}, - {B, A, 0.0}, - {0.0, B, -A}, - {0.0, -B, -A}, - {0.0, -B, A}, - {0.0, B, A}, - {-C, -C, C}, - {-C, -C, -C}, - {C, -C, -C}, - {C, -C, C}, - {-C, C, C}, - {-C, C, -C}, - {C, C, -C}, - {C, C, C}, - }; -#undef A -#undef B -#undef C - GLint polygons[12][5] = - { - {0, 12, 10, 11, 16}, - {1, 17, 8, 9, 13}, - {2, 14, 9, 8, 18}, - {3, 19, 11, 10, 15}, - {4, 14, 2, 3, 15}, - {5, 12, 0, 1, 13}, - {6, 17, 1, 0, 16}, - {7, 19, 3, 2, 18}, - {8, 17, 6, 7, 18}, - {9, 14, 4, 5, 13}, - {10, 12, 5, 4, 15}, - {11, 19, 7, 6, 16}, - }; - int i; - - glColor3f(0.75, 0.75, 0.75); - for (i = 0; i < 12; ++i) { - GLfloat *p0, *p1, *p2, d; - GLfloat u[3], v[3], n[3]; - - p0 = &vertexes[polygons[i][0]][0]; - p1 = &vertexes[polygons[i][1]][0]; - p2 = &vertexes[polygons[i][2]][0]; - - u[0] = p2[0] - p1[0]; - u[1] = p2[1] - p1[1]; - u[2] = p2[2] - p1[2]; - - v[0] = p0[0] - p1[0]; - v[1] = p0[1] - p1[1]; - v[2] = p0[2] - p1[2]; - - n[0] = u[1] * v[2] - u[2] * v[1]; - n[1] = u[2] * v[0] - u[0] * v[2]; - n[2] = u[0] * v[1] - u[1] * v[0]; - - d = 1.0 / sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]); - n[0] *= d; - n[1] *= d; - n[2] *= d; - - glBegin(GL_POLYGON); - glNormal3fv(n); - glVertex3fv(p0); - glVertex3fv(p1); - glVertex3fv(p2); - glVertex3fv(vertexes[polygons[i][3]]); - glVertex3fv(vertexes[polygons[i][4]]); - glEnd(); - } -} - -void -drawSphere(void) -{ - int numMajor = 24; - int numMinor = 32; - float radius = 0.8; - double majorStep = (M_PI / numMajor); - double minorStep = (2.0 * M_PI / numMinor); - int i, j; - - glColor3f(0.50, 0.50, 0.50); - for (i = 0; i < numMajor; ++i) { - double a = i * majorStep; - double b = a + majorStep; - double r0 = radius * sin(a); - double r1 = radius * sin(b); - GLfloat z0 = radius * cos(a); - GLfloat z1 = radius * cos(b); - - glBegin(GL_TRIANGLE_STRIP); - for (j = 0; j <= numMinor; ++j) { - double c = j * minorStep; - GLfloat x = cos(c); - GLfloat y = sin(c); - - glNormal3f((x * r0) / radius, (y * r0) / radius, z0 / radius); - glTexCoord2f(j / (GLfloat) numMinor, i / (GLfloat) numMajor); - glVertex3f(x * r0, y * r0, z0); - - glNormal3f((x * r1) / radius, (y * r1) / radius, z1 / radius); - glTexCoord2f(j / (GLfloat) numMinor, (i + 1) / (GLfloat) numMajor); - glVertex3f(x * r1, y * r1, z1); - } - glEnd(); - } -} - -/*****************************************************************/ - -float xmin = -0.035, xmax = 0.035; -float ymin = -0.035, ymax = 0.035; -float nnear = 0.1; -float ffar = 1.9; -float distance = -1.0; - -static void -loadTextureProjection(int texUnit, GLfloat m[16]) -{ - GLfloat mInverse[4][4]; - - /* Should use true inverse, but since m consists only of rotations, we can - just use the transpose. */ - matrixTranspose((GLfloat *) mInverse, m); - - ActiveTexture(GL_TEXTURE0_ARB + texUnit); - glMatrixMode(GL_TEXTURE); - glLoadIdentity(); - glTranslatef(0.5, 0.5, 0.0); - glScalef(0.5, 0.5, 1.0); - glFrustum(xmin, xmax, ymin, ymax, nnear, ffar); - glTranslatef(0.0, 0.0, distance); - glMultMatrixf((GLfloat *) mInverse); - glMatrixMode(GL_MODELVIEW); -} - -static void -drawTextureProjection(void) -{ - float t = ffar / nnear; - GLfloat n[4][3]; - GLfloat f[4][3]; - - n[0][0] = xmin; - n[0][1] = ymin; - n[0][2] = -(nnear + distance); - - n[1][0] = xmax; - n[1][1] = ymin; - n[1][2] = -(nnear + distance); - - n[2][0] = xmax; - n[2][1] = ymax; - n[2][2] = -(nnear + distance); - - n[3][0] = xmin; - n[3][1] = ymax; - n[3][2] = -(nnear + distance); - - f[0][0] = xmin * t; - f[0][1] = ymin * t; - f[0][2] = -(ffar + distance); - - f[1][0] = xmax * t; - f[1][1] = ymin * t; - f[1][2] = -(ffar + distance); - - f[2][0] = xmax * t; - f[2][1] = ymax * t; - f[2][2] = -(ffar + distance); - - f[3][0] = xmin * t; - f[3][1] = ymax * t; - f[3][2] = -(ffar + distance); - - glColor3f(1.0, 1.0, 0.0); - glBegin(GL_LINE_LOOP); - glVertex3fv(n[0]); - glVertex3fv(n[1]); - glVertex3fv(n[2]); - glVertex3fv(n[3]); - glVertex3fv(f[3]); - glVertex3fv(f[2]); - glVertex3fv(f[1]); - glVertex3fv(f[0]); - glVertex3fv(n[0]); - glVertex3fv(n[1]); - glVertex3fv(f[1]); - glVertex3fv(f[0]); - glVertex3fv(f[3]); - glVertex3fv(f[2]); - glVertex3fv(n[2]); - glVertex3fv(n[3]); - glEnd(); -} - -/*****************************************************************/ - -void -initialize(void) -{ - GLfloat light0Pos[4] = - {0.3, 0.3, 0.0, 1.0}; - GLfloat matAmb[4] = - {0.01, 0.01, 0.01, 1.00}; - GLfloat matDiff[4] = - {0.65, 0.65, 0.65, 1.00}; - GLfloat matSpec[4] = - {0.30, 0.30, 0.30, 1.00}; - GLfloat matShine = 10.0; - GLfloat eyePlaneS[] = - {1.0, 0.0, 0.0, 0.0}; - GLfloat eyePlaneT[] = - {0.0, 1.0, 0.0, 0.0}; - GLfloat eyePlaneR[] = - {0.0, 0.0, 1.0, 0.0}; - GLfloat eyePlaneQ[] = - {0.0, 0.0, 0.0, 1.0}; - int i; - - /* Setup Misc. */ - glClearColor(0.41, 0.41, 0.31, 0.0); - - glEnable(GL_DEPTH_TEST); - - /* glLineWidth(2.0);*/ - - glCullFace(GL_FRONT); - glEnable(GL_CULL_FACE); - - glMatrixMode(GL_PROJECTION); - glFrustum(-0.5, 0.5, -0.5, 0.5, 1, 3); - glMatrixMode(GL_MODELVIEW); - glTranslatef(0, 0, -2); - - matrixIdentity((GLfloat *) objectXform); - for (i = 0; i < NumTextures; i++) { - matrixIdentity((GLfloat *) textureXform[i]); - } - - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); - glOrtho(0, 1, 0, 1, -1, 1); - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - glLoadIdentity(); - - glRasterPos2i(0, 0); - - glPopMatrix(); - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - glMatrixMode(GL_MODELVIEW); - - /* Setup Lighting */ - glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, matAmb); - glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, matDiff); - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, matSpec); - glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, matShine); - - glEnable(GL_COLOR_MATERIAL); - - glLightfv(GL_LIGHT0, GL_POSITION, light0Pos); - glEnable(GL_LIGHT0); - - glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); - glEnable(GL_LIGHTING); - - /* Setup Texture */ - - (*loadTexture) (); - - - for (i = 0; i < NumTextures; i++) { - ActiveTexture(GL_TEXTURE0_ARB + i); - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - - glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); - glTexGenfv(GL_S, GL_EYE_PLANE, eyePlaneS); - - glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); - glTexGenfv(GL_T, GL_EYE_PLANE, eyePlaneT); - - glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); - glTexGenfv(GL_R, GL_EYE_PLANE, eyePlaneR); - - glTexGeni(GL_Q, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); - glTexGenfv(GL_Q, GL_EYE_PLANE, eyePlaneQ); - } -} - -void -display(void) -{ - int i; - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - if (textureEnabled) { - if (mode == MoveTexture || mode == MoveView) { - /* Have OpenGL compute the new transformation (simple but slow). */ - for (i = 0; i < NumTextures; i++) { - glPushMatrix(); - glLoadIdentity(); -#if 0 - if (i & 1) - glRotatef(angle, axis[0], axis[1], axis[2]); - else -#endif - glRotatef(angle*(i+1), axis[0], axis[1], axis[2]); - - glMultMatrixf((GLfloat *) textureXform[i]); - glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat *) textureXform[i]); - glPopMatrix(); - } - } - for (i = 0; i < NumTextures; i++) { - loadTextureProjection(i, (GLfloat *) textureXform[i]); - } - - if (showProjection) { - for (i = 0; i < NumTextures; i++) { - ActiveTexture(GL_TEXTURE0_ARB + i); - glPushMatrix(); - glMultMatrixf((GLfloat *) textureXform[i]); - glDisable(GL_LIGHTING); - drawTextureProjection(); - glEnable(GL_LIGHTING); - glPopMatrix(); - } - } - for (i = 0; i < NumTextures; i++) { - ActiveTexture(GL_TEXTURE0_ARB + i); - glEnable(GL_TEXTURE_2D); - glEnable(GL_TEXTURE_GEN_S); - glEnable(GL_TEXTURE_GEN_T); - glEnable(GL_TEXTURE_GEN_R); - glEnable(GL_TEXTURE_GEN_Q); - } - } - if (mode == MoveObject || mode == MoveView) { - /* Have OpenGL compute the new transformation (simple but slow). */ - glPushMatrix(); - glLoadIdentity(); - glRotatef(angle, axis[0], axis[1], axis[2]); - glMultMatrixf((GLfloat *) objectXform); - glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat *) objectXform); - glPopMatrix(); - } - glPushMatrix(); - glMultMatrixf((GLfloat *) objectXform); - (*drawObject) (); - glPopMatrix(); - - for (i = 0; i < NumTextures; i++) { - ActiveTexture(GL_TEXTURE0_ARB + i); - glDisable(GL_TEXTURE_2D); - glDisable(GL_TEXTURE_GEN_S); - glDisable(GL_TEXTURE_GEN_T); - glDisable(GL_TEXTURE_GEN_R); - glDisable(GL_TEXTURE_GEN_Q); - } - - if (zoomFactor > 1.0) { - glDisable(GL_DEPTH_TEST); - glCopyPixels(0, 0, winWidth / zoomFactor, winHeight / zoomFactor, GL_COLOR); - glEnable(GL_DEPTH_TEST); - } - glFlush(); - glutSwapBuffers(); - checkErrors(); -} - -/*****************************************************************/ - -/* simple trackball-like motion control */ -float lastPos[3]; -int lastTime; - -void -ptov(int x, int y, int width, int height, float v[3]) -{ - float d, a; - - /* project x,y onto a hemi-sphere centered within width, height */ - v[0] = (2.0 * x - width) / width; - v[1] = (height - 2.0 * y) / height; - d = sqrt(v[0] * v[0] + v[1] * v[1]); - v[2] = cos((M_PI / 2.0) * ((d < 1.0) ? d : 1.0)); - a = 1.0 / sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); - v[0] *= a; - v[1] *= a; - v[2] *= a; -} - -void -startMotion(int x, int y, int but, int time) -{ - if (but == GLUT_LEFT_BUTTON) { - mode = MoveView; - } else if (but == GLUT_MIDDLE_BUTTON) { - mode = MoveTexture; - } else { - return; - } - - lastTime = time; - ptov(x, y, winWidth, winHeight, lastPos); -} - -void -animate(void) -{ - glutPostRedisplay(); -} - -void -vis(int visible) -{ - if (visible == GLUT_VISIBLE) { - if (redrawContinuously) - glutIdleFunc(animate); - } else { - if (redrawContinuously) - glutIdleFunc(NULL); - } -} - -void -stopMotion(int but, int time) -{ - if ((but == GLUT_LEFT_BUTTON && mode == MoveView) || - (but == GLUT_MIDDLE_BUTTON && mode == MoveTexture)) { - } else { - return; - } - - if (time == lastTime) { - /* redrawContinuously = GL_TRUE;*/ - glutIdleFunc(animate); - } else { - angle = 0.0; - redrawContinuously = GL_FALSE; - glutIdleFunc(0); - } - if (!redrawContinuously) { - mode = MoveNone; - } -} - -void -trackMotion(int x, int y) -{ - float curPos[3], dx, dy, dz; - - ptov(x, y, winWidth, winHeight, curPos); - - dx = curPos[0] - lastPos[0]; - dy = curPos[1] - lastPos[1]; - dz = curPos[2] - lastPos[2]; - angle = 90.0 * sqrt(dx * dx + dy * dy + dz * dz); - - axis[0] = lastPos[1] * curPos[2] - lastPos[2] * curPos[1]; - axis[1] = lastPos[2] * curPos[0] - lastPos[0] * curPos[2]; - axis[2] = lastPos[0] * curPos[1] - lastPos[1] * curPos[0]; - - lastTime = glutGet(GLUT_ELAPSED_TIME); - lastPos[0] = curPos[0]; - lastPos[1] = curPos[1]; - lastPos[2] = curPos[2]; - glutPostRedisplay(); -} - -/*****************************************************************/ - -void -object(void) -{ - static int object; - - object++; - object %= 3; - switch (object) { - case 0: - drawObject = drawCube; - break; - case 1: - drawObject = drawDodecahedron; - break; - case 2: - drawObject = drawSphere; - break; - default: - break; - } -} - -static void -nop(void) -{ -} - -void -texture(void) -{ - static int texture = 0; - - texture++; - texture %= 3; - if (texture == 1 && texFilename == NULL) { - /* Skip file texture if not loaded. */ - texture++; - } - switch (texture) { - case 0: - loadTexture = nop; - textureEnabled = GL_FALSE; - break; - case 1: - loadTexture = loadImageTextures; - (*loadTexture) (); - textureEnabled = GL_TRUE; - break; - case 2: - loadTexture = loadSpotlightTexture; - (*loadTexture) (); - textureEnabled = GL_TRUE; - break; - default: - break; - } -} - -void -help(void) -{ - printf("'h' - help\n"); - printf("'l' - toggle linear/nearest filter\n"); - printf("'s' - toggle projection frustum\n"); - printf("'t' - toggle projected texture\n"); - printf("'o' - toggle object\n"); - printf("'z' - increase zoom factor\n"); - printf("'Z' - decrease zoom factor\n"); - printf("left mouse - move view\n"); - printf("middle mouse - move projection\n"); -} - -/* ARGSUSED1 */ -void -key(unsigned char key, int x, int y) -{ - switch (key) { - case '\033': - exit(0); - break; - case 'l': - linearFilter = !linearFilter; - (*loadTexture) (); - break; - case 's': - showProjection = !showProjection; - break; - case 't': - texture(); - break; - case 'o': - object(); - break; - case 'z': - zoomFactor += 1.0; - glPixelZoom(zoomFactor, zoomFactor); - glViewport(0, 0, winWidth / zoomFactor, winHeight / zoomFactor); - break; - case 'Z': - zoomFactor -= 1.0; - if (zoomFactor < 1.0) - zoomFactor = 1.0; - glPixelZoom(zoomFactor, zoomFactor); - glViewport(0, 0, winWidth / zoomFactor, winHeight / zoomFactor); - break; - case 'h': - help(); - break; - } - glutPostRedisplay(); -} - -void -mouse(int button, int state, int x, int y) -{ - if (state == GLUT_DOWN) - startMotion(x, y, button, glutGet(GLUT_ELAPSED_TIME)); - else if (state == GLUT_UP) - stopMotion(button, glutGet(GLUT_ELAPSED_TIME)); - glutPostRedisplay(); -} - -void -reshape(int w, int h) -{ - winWidth = w; - winHeight = h; - glViewport(0, 0, w / zoomFactor, h / zoomFactor); -} - - -void -menu(int selection) -{ - if (selection == 666) { - exit(0); - } - key((unsigned char) selection, 0, 0); -} - -int -main(int argc, char **argv) -{ - glutInit(&argc, argv); - - if (argc > 1) { - NumTextures = atoi(argv[1]); - } - assert(NumTextures <= MAX_TEX); - - glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE); - (void) glutCreateWindow("projtex"); - - loadTexture = loadImageTextures; - drawObject = drawCube; - initialize(); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutReshapeFunc(reshape); - glutMouseFunc(mouse); - glutMotionFunc(trackMotion); - glutVisibilityFunc(vis); - glutCreateMenu(menu); - glutAddMenuEntry("Toggle showing projection", 's'); - glutAddMenuEntry("Switch texture", 't'); - glutAddMenuEntry("Switch object", 'o'); - glutAddMenuEntry("Toggle filtering", 'l'); - glutAddMenuEntry("Quit", 666); - glutAttachMenu(GLUT_RIGHT_BUTTON); - texture(); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/seccolor.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/seccolor.c deleted file mode 100644 index 77fd40647b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/seccolor.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Exercise GL_EXT_secondary_color - */ - - -#define GL_GLEXT_PROTOTYPES -#include -#include -#include -#include - -static int Width = 600; -static int Height = 200; -static GLfloat Near = 5.0, Far = 25.0; - - -static void Display( void ) -{ - GLfloat t; - - glClearColor(0.2, 0.2, 0.8, 0); - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - for (t = 0.0; t <= 1.0; t += 0.25) { - GLfloat x = t * 10.0 - 5.0; - GLfloat g = t; - - /* top row: untextured */ - glColor3f(1, 0, 0); - glPushMatrix(); - glTranslatef(x, 1.2, 0); -#if defined(GL_EXT_secondary_color) - glSecondaryColor3fEXT(0, g, 0); -#endif - glBegin(GL_POLYGON); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - glPopMatrix(); - - /* bottom row: textured */ - glColor3f(1, 1, 1); - glEnable(GL_TEXTURE_2D); - glPushMatrix(); - glTranslatef(x, -1.2, 0); -#if defined(GL_EXT_secondary_color) - glSecondaryColor3fEXT(0, g, 0); -#endif - glBegin(GL_POLYGON); - glTexCoord2f(0, 0); glVertex2f(-1, -1); - glTexCoord2f(1, 0); glVertex2f( 1, -1); - glTexCoord2f(1, 1); glVertex2f( 1, 1); - glTexCoord2f(0, 1); glVertex2f(-1, 1); - glEnd(); - glPopMatrix(); - glDisable(GL_TEXTURE_2D); - } - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - GLfloat ar = (float) width / (float) height; - Width = width; - Height = height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -ar, ar, -1.0, 1.0, Near, Far ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - GLubyte image[4*4][3]; - GLint i; - if (!glutExtensionSupported("GL_EXT_secondary_color")) { - printf("Sorry, this program requires GL_EXT_secondary_color\n"); - exit(1); - } - - /* setup red texture with one back texel */ - for (i = 0; i < 4*4; i++) { - if (i == 0) { - image[i][0] = 0; - image[i][1] = 0; - image[i][2] = 0; - } - else { - image[i][0] = 255; - image[i][1] = 0; - image[i][2] = 0; - } - } - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 4, 4, 0, - GL_RGB, GL_UNSIGNED_BYTE, image); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - -#if defined(GL_EXT_secondary_color) - glEnable(GL_COLOR_SUM_EXT); -#endif - glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR); - - printf("Squares should be colored from red -> orange -> yellow.\n"); - printf("Top row is untextured.\n"); - printf("Bottom row is textured (red texture with one black texel).\n"); - printf("Rows should be identical, except for lower-left texel.\n"); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( Width, Height ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/sharedtex.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/sharedtex.c deleted file mode 100644 index ebe73f19f4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/sharedtex.c +++ /dev/null @@ -1,438 +0,0 @@ -/* $Id: sharedtex.c,v 1.2 2002/01/16 14:32:46 joukj Exp $ */ - -/* - * Test sharing of display lists and texture objects between GLX contests. - * Brian Paul - * Summer 2000 - * - * - * Copyright (C) 2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include -#include -#include -#include -#include -#include - - -struct window { - char DisplayName[1000]; - Display *Dpy; - Window Win; - GLXContext Context; - float Angle; - int Id; -}; - - -#define MAX_WINDOWS 20 -static struct window Windows[MAX_WINDOWS]; -static int NumWindows = 0; - - -static GLuint Textures[3]; -static GLuint CubeList; - - - -static void -Error(const char *display, const char *msg) -{ - fprintf(stderr, "Error on display %s - %s\n", display, msg); - exit(1); -} - - -static struct window * -AddWindow(const char *displayName, int xpos, int ypos, - const struct window *shareWindow) -{ - Display *dpy; - Window win; - GLXContext ctx; - int attrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - GLX_DEPTH_SIZE, 1, - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - XVisualInfo *visinfo; - int width = 300, height = 300; - - if (NumWindows >= MAX_WINDOWS) - return NULL; - - dpy = XOpenDisplay(displayName); - if (!dpy) { - Error(displayName, "Unable to open display"); - return NULL; - } - - scrnum = DefaultScreen(dpy); - root = RootWindow(dpy, scrnum); - - visinfo = glXChooseVisual(dpy, scrnum, attrib); - if (!visinfo) { - Error(displayName, "Unable to find RGB, double-buffered visual"); - return NULL; - } - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow(dpy, root, xpos, ypos, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr); - if (!win) { - Error(displayName, "Couldn't create window"); - return NULL; - } - - { - XSizeHints sizehints; - sizehints.x = xpos; - sizehints.y = ypos; - sizehints.width = width; - sizehints.height = height; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win, &sizehints); - XSetStandardProperties(dpy, win, displayName, displayName, - None, (char **)NULL, 0, &sizehints); - } - - - ctx = glXCreateContext(dpy, visinfo, - shareWindow ? shareWindow->Context : NULL, - True); - if (!ctx) { - Error(displayName, "Couldn't create GLX context"); - return NULL; - } - - XMapWindow(dpy, win); - - if (!glXMakeCurrent(dpy, win, ctx)) { - Error(displayName, "glXMakeCurrent failed"); - printf("glXMakeCurrent failed in Redraw()\n"); - return NULL; - } - - /* save the info for this window */ - { - static int id = 0; - struct window *h = &Windows[NumWindows]; - strcpy(h->DisplayName, displayName); - h->Dpy = dpy; - h->Win = win; - h->Context = ctx; - h->Angle = 0.0; - h->Id = id++; - NumWindows++; - return &Windows[NumWindows-1]; - } - -} - - -static void -InitGLstuff(struct window *h) -{ - if (!glXMakeCurrent(h->Dpy, h->Win, h->Context)) { - Error(h->DisplayName, "glXMakeCurrent failed in InitGLstuff"); - return; - } - - glGenTextures(3, Textures); - - /* setup first texture object */ - { - GLubyte image[16][16][4]; - GLint i, j; - glBindTexture(GL_TEXTURE_2D, Textures[0]); - - /* red/white checkerboard */ - for (i = 0; i < 16; i++) { - for (j = 0; j < 16; j++) { - if ((i ^ j) & 1) { - image[i][j][0] = 255; - image[i][j][1] = 255; - image[i][j][2] = 255; - image[i][j][3] = 255; - } - else { - image[i][j][0] = 255; - image[i][j][1] = 0; - image[i][j][2] = 0; - image[i][j][3] = 255; - } - } - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0, GL_RGBA, - GL_UNSIGNED_BYTE, image); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } - - /* setup second texture object */ - { - GLubyte image[8][8][3]; - GLint i, j; - glBindTexture(GL_TEXTURE_2D, Textures[1]); - - /* green/yellow checkerboard */ - for (i = 0; i < 8; i++) { - for (j = 0; j < 8; j++) { - if ((i ^ j) & 1) { - image[i][j][0] = 0; - image[i][j][1] = 255; - image[i][j][2] = 0; - } - else { - image[i][j][0] = 255; - image[i][j][1] = 255; - image[i][j][2] = 0; - } - } - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, 2); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 8, 8, 0, GL_RGB, - GL_UNSIGNED_BYTE, image); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } - - /* setup second texture object */ - { - GLubyte image[4][4][3]; - GLint i, j; - glBindTexture(GL_TEXTURE_2D, Textures[2]); - - /* blue/gray checkerboard */ - for (i = 0; i < 4; i++) { - for (j = 0; j < 4; j++) { - if ((i ^ j) & 1) { - image[i][j][0] = 0; - image[i][j][1] = 0; - image[i][j][2] = 255; - } - else { - image[i][j][0] = 200; - image[i][j][1] = 200; - image[i][j][2] = 200; - } - } - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, 2); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 4, 4, 0, GL_RGB, - GL_UNSIGNED_BYTE, image); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } - - /* Now make the cube object display list */ - CubeList = glGenLists(1); - glNewList(CubeList, GL_COMPILE); - { - glBindTexture(GL_TEXTURE_2D, Textures[0]); - glBegin(GL_POLYGON); - glTexCoord2f(0, 0); glVertex3f(-1, -1, -1); - glTexCoord2f(1, 0); glVertex3f(-1, 1, -1); - glTexCoord2f(1, 1); glVertex3f(-1, 1, 1); - glTexCoord2f(0, 1); glVertex3f(-1, -1, 1); - glEnd(); - glBegin(GL_POLYGON); - glTexCoord2f(0, 0); glVertex3f(1, -1, -1); - glTexCoord2f(1, 0); glVertex3f(1, 1, -1); - glTexCoord2f(1, 1); glVertex3f(1, 1, 1); - glTexCoord2f(0, 1); glVertex3f(1, -1, 1); - glEnd(); - - glBindTexture(GL_TEXTURE_2D, Textures[1]); - glBegin(GL_POLYGON); - glTexCoord2f(0, 0); glVertex3f(-1, -1, -1); - glTexCoord2f(1, 0); glVertex3f( 1, -1, -1); - glTexCoord2f(1, 1); glVertex3f( 1, -1, 1); - glTexCoord2f(0, 1); glVertex3f(-1, -1, 1); - glEnd(); - glBegin(GL_POLYGON); - glTexCoord2f(0, 0); glVertex3f(-1, 1, -1); - glTexCoord2f(1, 0); glVertex3f( 1, 1, -1); - glTexCoord2f(1, 1); glVertex3f( 1, 1, 1); - glTexCoord2f(0, 1); glVertex3f(-1, 1, 1); - glEnd(); - - glBindTexture(GL_TEXTURE_2D, Textures[2]); - glBegin(GL_POLYGON); - glTexCoord2f(0, 0); glVertex3f(-1, -1, -1); - glTexCoord2f(1, 0); glVertex3f( 1, -1, -1); - glTexCoord2f(1, 1); glVertex3f( 1, 1, -1); - glTexCoord2f(0, 1); glVertex3f(-1, 1, -1); - glEnd(); - glBegin(GL_POLYGON); - glTexCoord2f(0, 0); glVertex3f(-1, -1, 1); - glTexCoord2f(1, 0); glVertex3f( 1, -1, 1); - glTexCoord2f(1, 1); glVertex3f( 1, 1, 1); - glTexCoord2f(0, 1); glVertex3f(-1, 1, 1); - glEnd(); - } - glEndList(); - - printf("GL_RENDERER: %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION: %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR: %s\n", (char *) glGetString(GL_VENDOR)); -} - - - -static void -Redraw(struct window *h) -{ - if (!glXMakeCurrent(h->Dpy, h->Win, h->Context)) { - Error(h->DisplayName, "glXMakeCurrent failed"); - printf("glXMakeCurrent failed in Redraw()\n"); - return; - } - - h->Angle += 1.0; - - glShadeModel(GL_FLAT); - glClearColor(0.25, 0.25, 0.25, 1.0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glEnable(GL_TEXTURE_2D); - glEnable(GL_DEPTH_TEST); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - - glColor3f(1, 1, 1); - - glPushMatrix(); - if (h->Id == 0) - glRotatef(h->Angle, 0, 1, -1); - else if (h->Id == 1) - glRotatef(-(h->Angle), 0, 1, -1); - else if (h->Id == 2) - glRotatef(h->Angle, 0, 1, 1); - else if (h->Id == 3) - glRotatef(-(h->Angle), 0, 1, 1); - glCallList(CubeList); - glPopMatrix(); - - glXSwapBuffers(h->Dpy, h->Win); -} - - - -static void -Resize(const struct window *h, unsigned int width, unsigned int height) -{ - if (!glXMakeCurrent(h->Dpy, h->Win, h->Context)) { - Error(h->DisplayName, "glXMakeCurrent failed in Resize()"); - return; - } - glViewport(0, 0, width, height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1, 1, -1, 1, 2, 10); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0, 0, -3.5); -} - - - -static void -EventLoop(void) -{ - while (1) { - int i; - for (i = 0; i < NumWindows; i++) { - struct window *h = &Windows[i]; - while (XPending(h->Dpy) > 0) { - XEvent event; - XNextEvent(h->Dpy, &event); - if (event.xany.window == h->Win) { - switch (event.type) { - case Expose: - Redraw(h); - break; - case ConfigureNotify: - Resize(h, event.xconfigure.width, event.xconfigure.height); - break; - case KeyPress: - return; - default: - /*no-op*/ ; - } - } - else { - printf("window mismatch\n"); - } - } - Redraw(h); - } - usleep(1); - } -} - - - -static void -PrintInfo(const struct window *h) -{ - printf("Name: %s\n", h->DisplayName); - printf(" Display: 0x%x\n", h->Dpy); - printf(" Window: 0x%x\n", h->Win); - printf(" Context: 0x%x\n", h->Context); -} - - -int -main(int argc, char *argv[]) -{ - int i; - struct window *h0, *h1, *h2, *h3; - - /* four windows and contexts sharing display lists and texture objects */ - h0 = AddWindow(":0", 10, 10, NULL); - h1 = AddWindow(":0", 330, 10, h0); - h2 = AddWindow(":0", 10, 350, h0); - h3 = AddWindow(":0", 330, 350, h0); - - InitGLstuff(h0); - - EventLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/stencil_wrap.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/stencil_wrap.c deleted file mode 100644 index 88cf3809ca..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/stencil_wrap.c +++ /dev/null @@ -1,257 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file stencil_wrap.c - * - * Simple test of GL_EXT_stencil_wrap functionality. Four squares are drawn - * with different stencil modes, but all should be rendered with the same - * final color. - * - * \author Ian Romanick - */ - -#include -#include -#include - -static int Width = 550; -static int Height = 200; -static const GLfloat Near = 5.0, Far = 25.0; - - -static void Display( void ) -{ - GLint max_stencil; - GLint stencil_bits; - unsigned i; - - - glGetIntegerv( GL_STENCIL_BITS, & stencil_bits ); - max_stencil = (1U << stencil_bits) - 1; - printf( "Stencil bits = %u, maximum stencil value = 0x%08x\n", - stencil_bits, max_stencil ); - - glClearStencil( 0 ); - glClearColor( 0.2, 0.2, 0.8, 0 ); - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT - | GL_STENCIL_BUFFER_BIT ); - - - glPushMatrix(); - - /* This is the "reference" square. - */ - - glDisable(GL_STENCIL_TEST); - glTranslatef(-6.0, 0, 0); - glBegin(GL_QUADS); - glColor3f( 0.5, 0.5, 0.5 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - - glEnable(GL_STENCIL_TEST); - - /* Draw the first two squares using the two non-wrap (i.e., saturate) - * modes. - */ - - glStencilFunc(GL_ALWAYS, 0, ~0); - glStencilOp(GL_KEEP, GL_KEEP, GL_INCR); - - glTranslatef(3.0, 0, 0); - glBegin(GL_QUADS); - glColor3f( 0.9, 0.9, 0.9 ); - - for ( i = 0 ; i < (max_stencil + 5) ; i++ ) { - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - } - glEnd(); - - glStencilFunc(GL_EQUAL, max_stencil, ~0); - glBegin(GL_QUADS); - glColor3f( 0.5, 0.5, 0.5 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - - glStencilFunc(GL_ALWAYS, 0, ~0); - glStencilOp(GL_KEEP, GL_KEEP, GL_DECR); - - glTranslatef(3.0, 0, 0); - glBegin(GL_QUADS); - glColor3f( 0.9, 0.9, 0.9 ); - - for ( i = 0 ; i < (max_stencil + 5) ; i++ ) { - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - } - glEnd(); - - glStencilFunc(GL_EQUAL, 0, ~0); - glBegin(GL_QUADS); - glColor3f( 0.5, 0.5, 0.5 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - - - - /* Draw the last two squares using the two wrap modes. - */ - - glStencilFunc(GL_ALWAYS, 0, ~0); - glStencilOp(GL_KEEP, GL_KEEP, GL_INCR_WRAP); - - glTranslatef(3.0, 0, 0); - glBegin(GL_QUADS); - glColor3f( 0.9, 0.9, 0.9 ); - - for ( i = 0 ; i < (max_stencil + 5) ; i++ ) { - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - } - glEnd(); - - glStencilFunc(GL_EQUAL, 4, ~0); - glBegin(GL_QUADS); - glColor3f( 0.5, 0.5, 0.5 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - - - glStencilFunc(GL_ALWAYS, 0, ~0); - glStencilOp(GL_KEEP, GL_KEEP, GL_DECR_WRAP); - - glTranslatef(3.0, 0, 0); - glBegin(GL_QUADS); - glColor3f( 0.9, 0.9, 0.9 ); - - for ( i = 0 ; i < 5 ; i++ ) { - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - } - glEnd(); - - glStencilFunc(GL_EQUAL, (max_stencil - 4), ~0); - glBegin(GL_QUADS); - glColor3f( 0.5, 0.5, 0.5 ); - glVertex2f(-1, -1); - glVertex2f( 1, -1); - glVertex2f( 1, 1); - glVertex2f(-1, 1); - glEnd(); - - - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - GLfloat ar = (float) width / (float) height; - Width = width; - Height = height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -ar, ar, -1.0, 1.0, Near, Far ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - const char * const ver_string = (const char * const) - glGetString( GL_VERSION ); - - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", ver_string); - - if ( !glutExtensionSupported("GL_EXT_stencil_wrap") - && (atof( ver_string ) < 1.4) ) { - printf("Sorry, this program requires either GL_EXT_stencil_wrap or OpenGL 1.4.\n"); - exit(1); - } - - printf("\nAll 5 squares should be the same color.\n"); - glEnable( GL_BLEND ); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( Width, Height ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL ); - glutCreateWindow( "GL_EXT_stencil_wrap test" ); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/stencilwrap.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/stencilwrap.c deleted file mode 100644 index 753375d0f3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/stencilwrap.c +++ /dev/null @@ -1,281 +0,0 @@ -/* Test GL_EXT_stencil_wrap extension. - * This is by no means complete, just a quick check. - * - * Brian Paul 30 October 2002 - */ - -#include -#include -#include -#include -#include - -GLboolean wrapping; - -static void RunTest(void) -{ - const GLenum prim = GL_QUAD_STRIP; - GLubyte val; - int bits, max, i; - int expected; - GLboolean failed; - - glGetIntegerv(GL_STENCIL_BITS, &bits); - max = (1 << bits) - 1; - - - glEnable(GL_STENCIL_TEST); - glStencilFunc(GL_ALWAYS, 0, ~0); - - /* test GL_KEEP */ - glClearStencil(max); - glClear(GL_STENCIL_BUFFER_BIT); - glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); - failed = GL_FALSE; - printf("Testing GL_KEEP...\n"); - expected = max; - glBegin(prim); - glVertex2f(0, 0); - glVertex2f(10, 0); - glVertex2f(0, 10); - glVertex2f(10, 10); - glEnd(); - glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val); - if (val != expected) { - printf("Failed GL_KEEP test(got %u, expected %u)\n", val, expected); - failed = GL_TRUE; - } - else - printf("OK!\n"); - - /* test GL_ZERO */ - glClearStencil(max); - glClear(GL_STENCIL_BUFFER_BIT); - glStencilOp(GL_KEEP, GL_KEEP, GL_ZERO); - failed = GL_FALSE; - printf("Testing GL_ZERO...\n"); - expected = 0; - glBegin(prim); - glVertex2f(0, 0); - glVertex2f(10, 0); - glVertex2f(0, 10); - glVertex2f(10, 10); - glEnd(); - glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val); - if (val != expected) { - printf("Failed GL_ZERO test(got %u, expected %u)\n", val, expected); - failed = GL_TRUE; - } - else - printf("OK!\n"); - - /* test GL_REPLACE */ - glClearStencil(max); - glClear(GL_STENCIL_BUFFER_BIT); - glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - failed = GL_FALSE; - printf("Testing GL_REPLACE...\n"); - expected = 0; - glBegin(prim); - glVertex2f(0, 0); - glVertex2f(10, 0); - glVertex2f(0, 10); - glVertex2f(10, 10); - glEnd(); - glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val); - if (val != expected) { - printf("Failed GL_REPLACE test(got %u, expected %u)\n", val, expected); - failed = GL_TRUE; - } - else - printf("OK!\n"); - - /* test GL_INCR (saturation) */ - glClearStencil(0); - glClear(GL_STENCIL_BUFFER_BIT); - glStencilOp(GL_KEEP, GL_KEEP, GL_INCR); - failed = GL_FALSE; - printf("Testing GL_INCR...\n"); - for (i = 1; i < max+10; i++) { - expected = (i > max) ? max : i; - glBegin(prim); - glVertex2f(0, 0); glVertex2f(10, 0); - glVertex2f(0, 10); glVertex2f(10, 10); - glEnd(); - - glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val); - if (val != expected) { - printf( "Failed GL_INCR test on iteration #%u " - "(got %u, expected %u)\n", i, val, expected ); - failed = GL_TRUE; - } - } - if ( !failed ) - printf("OK!\n"); - - /* test GL_DECR (saturation) */ - glClearStencil(max); - glClear(GL_STENCIL_BUFFER_BIT); - glStencilOp(GL_KEEP, GL_KEEP, GL_DECR); - failed = GL_FALSE; - printf("Testing GL_DECR...\n"); - for (i = max-1; i > -10; i--) { - expected = (i < 0) ? 0 : i; - glBegin(prim); - glVertex2f(0, 0); glVertex2f(10, 0); - glVertex2f(0, 10); glVertex2f(10, 10); - glEnd(); - glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val); - if (val != expected) { - printf( "Failed GL_DECR test on iteration #%u " - "(got %u, expected %u)\n", max - i, val, expected ); - failed = GL_TRUE; - } - } - if ( !failed ) - printf("OK!\n"); - - /* test GL_INVERT */ - glClearStencil(0); - glClear(GL_STENCIL_BUFFER_BIT); - glStencilOp(GL_KEEP, GL_KEEP, GL_INVERT); - failed = GL_FALSE; - printf("Testing GL_INVERT...\n"); - expected = max; - glBegin(prim); - glVertex2f(0, 0); - glVertex2f(10, 0); - glVertex2f(0, 10); - glVertex2f(10, 10); - glEnd(); - glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val); - if (val != expected) { - printf("Failed GL_INVERT test(got %u, expected %u)\n", val, expected); - failed = GL_TRUE; - } - else - printf("OK!\n"); - - if(wrapping) - { - /* test GL_INCR_WRAP_EXT (wrap around) */ - glClearStencil(0); - glClear(GL_STENCIL_BUFFER_BIT); - glStencilOp(GL_KEEP, GL_KEEP, GL_INCR_WRAP_EXT); - failed = GL_FALSE; - printf("Testing GL_INCR_WRAP_EXT...\n"); - for (i = 1; i < max+10; i++) { - expected = i % (max + 1); - glBegin(prim); - glVertex2f(0, 0); glVertex2f(10, 0); - glVertex2f(0, 10); glVertex2f(10, 10); - glEnd(); - glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val); - if (val != expected) { - printf( "Failed GL_INCR_WRAP test on iteration #%u " - "(got %u, expected %u)\n", i, val, expected ); - failed = GL_TRUE; - } - } - if ( !failed ) - printf("OK!\n"); - - /* test GL_DECR_WRAP_EXT (wrap-around) */ - glClearStencil(max); - glClear(GL_STENCIL_BUFFER_BIT); - glStencilOp(GL_KEEP, GL_KEEP, GL_DECR_WRAP_EXT); - failed = GL_FALSE; - printf("Testing GL_DECR_WRAP_EXT...\n"); - for (i = max-1; i > -10; i--) { - expected = (i < 0) ? max + i + 1: i; - glBegin(prim); - glVertex2f(0, 0); glVertex2f(10, 0); - glVertex2f(0, 10); glVertex2f(10, 10); - glEnd(); - glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val); - if (val != expected) { - printf( "Failed GL_DECR_WRAP test on iteration #%u " - "(got %u, expected %u)\n", max - i, val, expected ); - failed = GL_TRUE; - } - } - if ( !failed ) - printf("OK!\n"); - } - - glDisable(GL_STENCIL_TEST); -} - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - RunTest(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho(0, width, 0, height, -1, 1); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - const char * ver_str; - float version; - - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - - - /* Check for both the extension string and GL version 1.4 on the - * outside chance that some vendor exports version 1.4 but doesn't - * export the extension string. The stencil-wrap modes are a required - * part of GL 1.4. - */ - - ver_str = glGetString( GL_VERSION ); - version = (ver_str == NULL) ? 1.0 : atof( ver_str ); - - wrapping = (glutExtensionSupported("GL_EXT_stencil_wrap") || (version >= 1.4)); - if (!wrapping) - printf("GL_EXT_stencil_wrap not supported. Only testing the rest.\n"); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 400, 400 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_STENCIL ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/tex1d.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/tex1d.c deleted file mode 100644 index 1fab849dd3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/tex1d.c +++ /dev/null @@ -1,139 +0,0 @@ - -/* Exercise 1D textures - */ - -#include -#include -#include -#include -#include -#include "GL/glut.h" - -static GLuint Window = 0; -static GLuint TexObj[2]; -static GLfloat Angle = 0.0f; - - -static void draw( void ) -{ - glClear( GL_COLOR_BUFFER_BIT ); - - glColor3f( 1.0, 1.0, 1.0 ); - - /* draw first polygon */ - glPushMatrix(); - glTranslatef( -1.0, 0.0, 0.0 ); - glRotatef( Angle, 0.0, 0.0, 1.0 ); - glBindTexture( GL_TEXTURE_1D, TexObj[0] ); - glBegin( GL_POLYGON ); - glTexCoord1f( 0.0 ); glVertex2f( -1.0, -1.0 ); - glTexCoord1f( 1.0 ); glVertex2f( 1.0, -1.0 ); - glTexCoord1f( 1.0 ); glVertex2f( 1.0, 1.0 ); - glTexCoord1f( 0.0 ); glVertex2f( -1.0, 1.0 ); - glEnd(); - glPopMatrix(); - - glutSwapBuffers(); -} - - - -static void idle( void ) -{ - Angle += 2.0; - glutPostRedisplay(); -} - - - -/* change view Angle, exit upon ESC */ -static void key(unsigned char k, int x, int y) -{ - (void) x; - (void) y; - switch (k) { - case 27: - exit(0); - } -} - - - -/* new window size or exposure */ -static void reshape( int width, int height ) -{ - glViewport(0, 0, (GLint)width, (GLint)height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - /* glOrtho( -3.0, 3.0, -3.0, 3.0, -10.0, 10.0 );*/ - glFrustum( -2.0, 2.0, -2.0, 2.0, 6.0, 20.0 ); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -8.0 ); -} - - -static void init( void ) -{ - GLubyte tex[256][3]; - GLint i; - - - glDisable( GL_DITHER ); - - /* Setup texturing */ - glEnable( GL_TEXTURE_1D ); - glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL ); - - - /* generate texture object IDs */ - glGenTextures( 2, TexObj ); - - /* setup first texture object */ - glBindTexture( GL_TEXTURE_1D, TexObj[0] ); - - - for (i = 0; i < 256; i++) { - GLfloat f; - - /* map 0..255 to -PI .. PI */ - f = ((i / 255.0) - .5) * (3.141592 * 2); - - f = sin(f); - - /* map -1..1 to 0..255 */ - tex[i][0] = (f+1.0)/2.0 * 255.0; - tex[i][1] = 0; - tex[i][2] = 0; - } - - glTexImage1D( GL_TEXTURE_1D, 0, 3, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, tex ); - glTexParameteri( GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); - glTexParameteri( GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); - glTexParameteri( GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_REPEAT ); - glTexParameteri( GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_REPEAT ); -} - - - -int main( int argc, char *argv[] ) -{ - glutInit(&argc, argv); - glutInitWindowPosition(0, 0); - glutInitWindowSize(300, 300); - glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE ); - - Window = glutCreateWindow("Texture Objects"); - if (!Window) { - exit(1); - } - - init(); - - glutReshapeFunc( reshape ); - glutKeyboardFunc( key ); -/* glutIdleFunc( idle ); */ - glutDisplayFunc( draw ); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/texcmp.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/texcmp.c deleted file mode 100644 index 6e822fb689..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/texcmp.c +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Compressed texture demo. Written by Daniel Borca. - * This program is in the public domain. - */ - -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES 1 -#include - -#include "readtex.c" /* I know, this is a hack. */ -#define TEXTURE_FILE "../images/tree2.rgba" - - -static float Rot = 0.0; -static GLboolean Anim = 1; - -typedef struct { - GLubyte *data; - GLuint size; - GLenum format; - GLuint w, h; - - GLenum TC; - - GLubyte *cData; - GLuint cSize; - GLenum cFormat; -} TEXTURE; - -static TEXTURE *Tx, t1, t2, t3; -static GLboolean fxt1, dxtc, s3tc; - - -static const char *TextureName (GLenum TC) -{ - switch (TC) { - case GL_RGB: - return "RGB"; - case GL_RGBA: - return "RGBA"; - case GL_COMPRESSED_RGB: - return "COMPRESSED_RGB"; - case GL_COMPRESSED_RGBA: - return "COMPRESSED_RGBA"; - case GL_COMPRESSED_RGB_FXT1_3DFX: - return "GL_COMPRESSED_RGB_FXT1_3DFX"; - case GL_COMPRESSED_RGBA_FXT1_3DFX: - return "GL_COMPRESSED_RGBA_FXT1_3DFX"; - case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: - return "GL_COMPRESSED_RGB_S3TC_DXT1_EXT"; - case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: - return "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT"; - case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: - return "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT"; - case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: - return "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT"; - case GL_RGB_S3TC: - return "GL_RGB_S3TC"; - case GL_RGB4_S3TC: - return "GL_RGB4_S3TC"; - case GL_RGBA_S3TC: - return "GL_RGBA_S3TC"; - case GL_RGBA4_S3TC: - return "GL_RGBA4_S3TC"; - case 0: - return "Invalid format"; - default: - return "Unknown format"; - } -} - - -static void -PrintString(const char *s) -{ - while (*s) { - glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s); - s++; - } -} - - -static void Idle( void ) -{ - float t = glutGet(GLUT_ELAPSED_TIME) * 0.001; /* in seconds */ - Rot = t * 360 / 4; /* 1 rotation per 4 seconds */ - glutPostRedisplay(); -} - - -static void Display( void ) -{ - /* draw background gradient */ - glDisable(GL_TEXTURE_2D); - glBegin(GL_POLYGON); - glColor3f(1.0, 0.0, 0.2); glVertex2f(-1.5, -1.0); - glColor3f(1.0, 0.0, 0.2); glVertex2f( 1.5, -1.0); - glColor3f(0.0, 0.0, 1.0); glVertex2f( 1.5, 1.0); - glColor3f(0.0, 0.0, 1.0); glVertex2f(-1.5, 1.0); - glEnd(); - - glPushMatrix(); - glRotatef(Rot, 0, 0, 1); - - glEnable(GL_TEXTURE_2D); - glBegin(GL_POLYGON); - glTexCoord2f(0, 1); glVertex2f(-1, -0.5); - glTexCoord2f(1, 1); glVertex2f( 1, -0.5); - glTexCoord2f(1, 0); glVertex2f( 1, 0.5); - glTexCoord2f(0, 0); glVertex2f(-1, 0.5); - glEnd(); - - glPopMatrix(); - - /* info */ - glColor4f(1, 1, 1, 1); - - glRasterPos3f(-1.2, -0.7, 0); - PrintString("Selected: "); - PrintString(TextureName(Tx->TC)); - if (Tx->cData) { - char tmp[64]; - glRasterPos3f(-1.2, -0.8, 0); - PrintString("Internal: "); - PrintString(TextureName(Tx->cFormat)); - glRasterPos3f(-1.2, -0.9, 0); - PrintString("Size : "); - sprintf(tmp, "%d (%d%% of %d)", Tx->cSize, Tx->cSize * 100 / Tx->size, Tx->size); - PrintString(tmp); - } - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( -1.5, 1.5, -1.0, 1.0, -1.0, 1.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); -} - - -static void ReInit( GLenum TC, TEXTURE *Tx ) -{ - GLint rv; - - if ((Tx->TC == TC) && (Tx->cData != NULL)) { - glCompressedTexImage2DARB(GL_TEXTURE_2D, /* target */ - 0, /* level */ - Tx->cFormat, /* real format */ - Tx->w, /* original width */ - Tx->h, /* original height */ - 0, /* border */ - Tx->cSize, /* compressed size*/ - Tx->cData); /* compressed data*/ - } else { - glTexImage2D(GL_TEXTURE_2D, /* target */ - 0, /* level */ - TC, /* internal format */ - Tx->w, Tx->h, /* width, height */ - 0, /* border */ - Tx->format, /* texture format */ - GL_UNSIGNED_BYTE, /* texture type */ - Tx->data); /* the texture */ - - /* okay, now cache the compressed texture */ - Tx->TC = TC; - if (Tx->cData != NULL) { - free(Tx->cData); - Tx->cData = NULL; - } - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_COMPRESSED_ARB, &rv); - if (rv) { - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, (GLint *)&Tx->cFormat); - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, (GLint *)&Tx->cSize); - if ((Tx->cData = malloc(Tx->cSize)) != NULL) { - glGetCompressedTexImageARB(GL_TEXTURE_2D, 0, Tx->cData); - } - } - } -} - - -static void Init( void ) -{ - /* HEIGHT * WIDTH + 1 (for trailing '\0') */ - static char pattern[8 * 32 + 1] = {"\ - \ - MMM EEEE SSS AAA \ - M M M E S S A A \ - M M M EEEE SS A A \ - M M M E SS AAAAA \ - M M E S S A A \ - M M EEEE SSS A A \ - " - }; - - GLuint i, j; - - GLubyte (*texture1)[8 * 32][4]; - GLubyte (*texture2)[256][256][4]; - - t1.w = 32; - t1.h = 8; - t1.size = t1.w * t1.h * 4; - t1.data = malloc(t1.size); - t1.format = GL_RGBA; - t1.TC = GL_RGBA; - - texture1 = (GLubyte (*)[8 * 32][4])t1.data; - for (i = 0; i < sizeof(pattern) - 1; i++) { - switch (pattern[i]) { - default: - case ' ': - (*texture1)[i][0] = 255; - (*texture1)[i][1] = 255; - (*texture1)[i][2] = 255; - (*texture1)[i][3] = 64; - break; - case 'M': - (*texture1)[i][0] = 255; - (*texture1)[i][1] = 0; - (*texture1)[i][2] = 0; - (*texture1)[i][3] = 255; - break; - case 'E': - (*texture1)[i][0] = 0; - (*texture1)[i][1] = 255; - (*texture1)[i][2] = 0; - (*texture1)[i][3] = 255; - break; - case 'S': - (*texture1)[i][0] = 0; - (*texture1)[i][1] = 0; - (*texture1)[i][2] = 255; - (*texture1)[i][3] = 255; - break; - case 'A': - (*texture1)[i][0] = 255; - (*texture1)[i][1] = 255; - (*texture1)[i][2] = 0; - (*texture1)[i][3] = 255; - break; - } - } - - t2.w = 256; - t2.h = 256; - t2.size = t2.w * t2.h * 4; - t2.data = malloc(t2.size); - t2.format = GL_RGBA; - t2.TC = GL_RGBA; - - texture2 = (GLubyte (*)[256][256][4])t2.data; - for (j = 0; j < t2.h; j++) { - for (i = 0; i < t2.w; i++) { - (*texture2)[j][i][0] = sqrt(i * j * 255 * 255 / (t2.w * t2.h)); - (*texture2)[j][i][1] = 0; - (*texture2)[j][i][2] = 0; - (*texture2)[j][i][3] = 255; - } - } - - t3.data = LoadRGBImage(TEXTURE_FILE, (GLint *)&t3.w, (GLint *)&t3.h, &t3.format); - t3.size = t3.w * t3.h * ((t3.format == GL_RGB) ? 3 : 4); - t3.TC = GL_RGBA; - - ReInit(GL_RGBA, Tx = &t1); - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - glEnable(GL_TEXTURE_2D); - - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - case ' ': - Anim = !Anim; - if (Anim) - glutIdleFunc( Idle ); - else - glutIdleFunc( NULL ); - break; - case 't': - if (Tx == &t1) { - Tx = &t2; - } else if (Tx == &t2) { - Tx = &t3; - } else { - Tx = &t1; - } - ReInit(Tx->TC, Tx); - break; - case '9': - ReInit(GL_RGB, Tx); - break; - case '0': - ReInit(GL_RGBA, Tx); - break; - case '1': - ReInit(GL_COMPRESSED_RGB, Tx); - break; - case '2': - ReInit(GL_COMPRESSED_RGBA, Tx); - break; - case '3': - if (fxt1) ReInit(GL_COMPRESSED_RGB_FXT1_3DFX, Tx); - break; - case '4': - if (fxt1) ReInit(GL_COMPRESSED_RGBA_FXT1_3DFX, Tx); - break; - case '5': - if (dxtc) ReInit(GL_COMPRESSED_RGB_S3TC_DXT1_EXT, Tx); - break; - case '6': - if (dxtc) ReInit(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, Tx); - break; - case '7': - if (dxtc) ReInit(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, Tx); - break; - case '8': - if (dxtc) ReInit(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, Tx); - break; - case 'a': - if (s3tc) ReInit(GL_RGB_S3TC, Tx); - break; - case 's': - if (s3tc) ReInit(GL_RGB4_S3TC, Tx); - break; - case 'd': - if (s3tc) ReInit(GL_RGBA_S3TC, Tx); - break; - case 'f': - if (s3tc) ReInit(GL_RGBA4_S3TC, Tx); - break; - } - glutPostRedisplay(); -} - - -int main( int argc, char *argv[] ) -{ - float gl_version; - GLint num_formats; - GLint i; - GLint formats[64]; - - - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 400, 300 ); - - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - - if (glutCreateWindow(argv[0]) <= 0) { - printf("Couldn't create window\n"); - exit(0); - } - - gl_version = atof( (const char *) glGetString( GL_VERSION ) ); - if ( (gl_version < 1.3) - && !glutExtensionSupported("GL_ARB_texture_compression") ) { - printf("Sorry, GL_ARB_texture_compression not supported\n"); - exit(0); - } - if (glutExtensionSupported("GL_3DFX_texture_compression_FXT1")) { - fxt1 = GL_TRUE; - } - if (glutExtensionSupported("GL_EXT_texture_compression_s3tc")) { - dxtc = GL_TRUE; - } - if (glutExtensionSupported("GL_S3_s3tc")) { - s3tc = GL_TRUE; - } - - glGetIntegerv( GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB, & num_formats ); - - (void) memset( formats, 0, sizeof( formats ) ); - glGetIntegerv( GL_COMPRESSED_TEXTURE_FORMATS_ARB, formats ); - - printf( "The following texture formats are supported:\n" ); - for ( i = 0 ; i < num_formats ; i++ ) { - printf( "\t%s\n", TextureName( formats[i] ) ); - } - - Init(); - - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - if (Anim) - glutIdleFunc( Idle ); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/texgenmix.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/texgenmix.c deleted file mode 100644 index be8f6775c7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/texgenmix.c +++ /dev/null @@ -1,640 +0,0 @@ - -/* - * Demonstrates mixed texgen/non-texgen texture coordinates. - */ - -#include -#include -#include -#include - -#undef max -#undef min -#define max( a, b ) ((a) >= (b) ? (a) : (b)) -#define min( a, b ) ((a) <= (b) ? (a) : (b)) - -GLfloat labelColor0[4] = { 1.0, 1.0, 1.0, 1.0 }; -GLfloat labelColor1[4] = { 1.0, 1.0, 0.4, 1.0 }; -GLfloat *labelInfoColor = labelColor0; - -GLboolean doubleBuffered = GL_TRUE; -GLboolean drawTextured = GL_TRUE; - -int textureWidth = 64; -int textureHeight = 64; - -int winWidth = 580, winHeight = 720; - -const GLfloat texmat_swap_rq[16] = { 1.0, 0.0, 0.0, 0.0, - 0.0, 1.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 1.0, - 0.0, 0.0, 1.0, 0.0}; - -const GLfloat nullPlane[4] = { 0.0, 0.0, 0.0, 0.0 }; -const GLfloat ObjPlaneS1[4] = { 1.0, 0.0, 1.0, 0.0 }; -const GLfloat ObjPlaneS2[4] = { 0.5, 0.0, 0.0, 0.0 }; -const GLfloat ObjPlaneS3[4] = { 1.0, 0.0, 0.0, 0.0 }; -const GLfloat ObjPlaneT[4] = { 0.0, 1.0, 0.0, 0.0 }; -const GLfloat ObjPlaneT2[4] = { 0.0, 0.5, 0.0, 0.0 }; -const GLfloat ObjPlaneT3[4] = { 0.0, 1.0, 0.0, 0.0 }; -const GLfloat ObjPlaneR[4] = { 0.0, 0.0, 1.0, 0.0 }; -const GLfloat ObjPlaneQ[4] = { 0.0, 0.0, 0.0, 0.5 }; - - -static void checkErrors( void ) -{ - GLenum error; - - while ( (error = glGetError()) != GL_NO_ERROR ) { - fprintf( stderr, "Error: %s\n", (char *) gluErrorString( error ) ); - } -} - -static void drawString( const char *string, GLfloat x, GLfloat y, - const GLfloat color[4] ) -{ - glColor4fv( color ); - glRasterPos2f( x, y ); - - while ( *string ) { - glutBitmapCharacter( GLUT_BITMAP_TIMES_ROMAN_10, *string ); - string++; - } -} - -static void begin2D( int width, int height ) -{ - glMatrixMode( GL_PROJECTION ); - - glPushMatrix(); - glLoadIdentity(); - - glOrtho( 0, width, 0, height, -1, 1 ); - glMatrixMode( GL_MODELVIEW ); - - glPushMatrix(); - glLoadIdentity(); -} - -static void end2D( void ) -{ - glMatrixMode( GL_PROJECTION ); - glPopMatrix(); - glMatrixMode( GL_MODELVIEW ); - glPopMatrix(); -} - -static void initialize( void ) -{ - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - - glOrtho( -1.5, 1.5, -1.5, 1.5, -1.5, 1.5 ); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - glShadeModel( GL_FLAT ); -} - -/* ARGSUSED1 */ -static void keyboard( unsigned char c, int x, int y ) -{ - switch ( c ) { - case 't': - drawTextured = !drawTextured; - break; - case 27: /* Escape key should force exit. */ - exit(0); - break; - default: - break; - } - glutPostRedisplay(); -} - -/* ARGSUSED1 */ -static void special( int key, int x, int y ) -{ - switch ( key ) { - case GLUT_KEY_DOWN: - break; - case GLUT_KEY_UP: - break; - case GLUT_KEY_LEFT: - break; - case GLUT_KEY_RIGHT: - break; - default: - break; - } - glutPostRedisplay(); -} - -static void -reshape( int w, int h ) -{ - winWidth = w; - winHeight = h; - /* No need to call glViewPort here since "draw" calls it! */ -} - -static void loadTexture( int width, int height ) -{ - int alphaSize = 1; - int rgbSize = 3; - GLubyte *texImage, *p; - int elementsPerGroup, elementSize, groupSize, rowSize; - int i, j; - - - elementsPerGroup = alphaSize + rgbSize; - elementSize = sizeof(GLubyte); - groupSize = elementsPerGroup * elementSize; - rowSize = width * groupSize; - - if ( (texImage = (GLubyte *) malloc( height * rowSize ) ) == NULL ) { - fprintf( stderr, "texture malloc failed\n" ); - return; - } - - for ( i = 0 ; i < height ; i++ ) - { - p = texImage + i * rowSize; - - for ( j = 0 ; j < width ; j++ ) - { - if ( rgbSize > 0 ) - { - /** - ** +-----+-----+ - ** | | | - ** | R | G | - ** | | | - ** +-----+-----+ - ** | | | - ** | Y | B | - ** | | | - ** +-----+-----+ - **/ - if ( i > height / 2 ) { - if ( j < width / 2 ) { - p[0] = 0xff; - p[1] = 0x00; - p[2] = 0x00; - } else { - p[0] = 0x00; - p[1] = 0xff; - p[2] = 0x00; - } - } else { - if ( j < width / 2 ) { - p[0] = 0xff; - p[1] = 0xff; - p[2] = 0x00; - } else { - p[0] = 0x00; - p[1] = 0x00; - p[2] = 0xff; - } - } - p += 3 * elementSize; - } - - if ( alphaSize > 0 ) - { - /** - ** +-----------+ - ** | W | - ** | +-----+ | - ** | | | | - ** | | B | | - ** | | | | - ** | +-----+ | - ** | | - ** +-----------+ - **/ - int i2 = i - height / 2; - int j2 = j - width / 2; - int h8 = height / 8; - int w8 = width / 8; - if ( -h8 <= i2 && i2 <= h8 && -w8 <= j2 && j2 <= w8 ) { - p[0] = 0x00; - } else if ( -2 * h8 <= i2 && i2 <= 2 * h8 && -2 * w8 <= j2 && j2 <= 2 * w8 ) { - p[0] = 0x55; - } else if ( -3 * h8 <= i2 && i2 <= 3 * h8 && -3 * w8 <= j2 && j2 <= 3 * w8 ) { - p[0] = 0xaa; - } else { - p[0] = 0xff; - } - p += elementSize; - } - } - } - - glTexImage2D( GL_TEXTURE_2D, 0, - GL_RGBA, width, height, 0, - GL_RGBA, GL_UNSIGNED_BYTE, texImage ); - - free( texImage ); -} - - -static void drawSample( int x, int y, int w, int h, - int texgenenabled, int coordnr ) -{ - char buf[255]; - - glViewport( x, y, w, h ); - glScissor( x, y, w, h ); - - glClearColor( 0.1, 0.1, 0.1, 1.0 ); - glClear( GL_COLOR_BUFFER_BIT ); - - begin2D( w, h ); - if (texgenenabled == 2) { - sprintf( buf, "TexCoord%df", coordnr); - drawString( buf, 10, h - 15, labelInfoColor ); - sprintf( buf, "texgen enabled for %s coordinate(s)", coordnr == 2 ? "S" : "S/T"); - drawString( buf, 10, 5, labelInfoColor ); - } - else if (texgenenabled == 0) { - sprintf( buf, "TexCoord%df", coordnr); - drawString( buf, 10, h - 15, labelInfoColor ); - drawString( "no texgen", 10, 5, labelInfoColor ); - } - else if (texgenenabled == 1) { - drawString( "no TexCoord", 10, h - 15, labelInfoColor ); - sprintf( buf, "texgen enabled for %s coordinate(s)", - coordnr == 2 ? "S/T" : (coordnr == 3 ? "S/T/R" : "S/T/R/Q")); - drawString( buf, 10, 5, labelInfoColor ); - } - - end2D(); - - glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE ); - - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); - - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP ); - - loadTexture( textureWidth, textureHeight ); - - if ( drawTextured ) { - glEnable( GL_TEXTURE_2D ); - } - - glDisable( GL_TEXTURE_GEN_S ); - glDisable( GL_TEXTURE_GEN_T ); - glDisable( GL_TEXTURE_GEN_R ); - glDisable( GL_TEXTURE_GEN_Q ); - - glMatrixMode( GL_TEXTURE ); - glLoadIdentity(); - glMatrixMode( GL_MODELVIEW ); - glPushMatrix(); - - switch (coordnr) { - case 2: - switch (texgenenabled) { - case 0: - glBegin( GL_QUADS ); - glTexCoord2f( 0.0, 0.0 ); - glVertex2f( -0.8, -0.8 ); - - glTexCoord2f( 1.0, 0.0 ); - glVertex2f( 0.8, -0.8 ); - - glTexCoord2f( 1.0, 1.0 ); - glVertex2f( 0.8, 0.8 ); - - glTexCoord2f( 0.0, 1.0 ); - glVertex2f( -0.8, 0.8 ); - glEnd(); - break; - case 1: - glTranslatef( -0.8, -0.8, 0.0 ); - glScalef( 1.6, 1.6, 1.0 ); - glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_R, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_Q, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGenfv(GL_S, GL_OBJECT_PLANE, ObjPlaneS3); - glTexGenfv(GL_T, GL_OBJECT_PLANE, ObjPlaneT3); - glTexGenfv(GL_R, GL_OBJECT_PLANE, nullPlane); - glTexGenfv(GL_Q, GL_OBJECT_PLANE, nullPlane); - - glEnable( GL_TEXTURE_GEN_S ); - glEnable( GL_TEXTURE_GEN_T ); - - /* Issue a texcoord here to be sure Q isn't left over from a - * previous sample. - */ - glTexCoord1f( 0.0 ); - glBegin( GL_QUADS ); - glVertex2f( 0.0, 0.0 ); - glVertex2f( 1.0, 0.0 ); - glVertex2f( 1.0, 1.0 ); - glVertex2f( 0.0, 1.0 ); - glEnd(); - break; - case 2: - /* make sure that texgen T and non-texgen S coordinate are wrong */ - glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_R, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_Q, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGenfv(GL_S, GL_OBJECT_PLANE, ObjPlaneS1); - glTexGenfv(GL_T, GL_OBJECT_PLANE, nullPlane); - glTexGenfv(GL_R, GL_OBJECT_PLANE, nullPlane); - glTexGenfv(GL_Q, GL_OBJECT_PLANE, nullPlane); - - glEnable( GL_TEXTURE_GEN_S ); - - glBegin( GL_QUADS ); - /* use z coordinate to get correct texgen values... */ - glTexCoord2f( 0.0, 0.0 ); - glVertex3f( -0.8, -0.8, 0.8 ); - - glTexCoord2f( 0.0, 0.0 ); - glVertex3f( 0.8, -0.8, 0.2 ); - - glTexCoord2f( 0.0, 1.0 ); - glVertex3f( 0.8, 0.8, 0.2 ); - - glTexCoord2f( 0.0, 1.0 ); - glVertex3f( -0.8, 0.8, 0.8 ); - glEnd(); - break; - } - break; - case 3: - glMatrixMode( GL_TEXTURE ); - glLoadMatrixf( texmat_swap_rq ); - glMatrixMode( GL_MODELVIEW ); - glTranslatef( -0.8, -0.8, 0.0 ); - glScalef( 1.6, 1.6, 1.0 ); - switch (texgenenabled) { - case 0: - glBegin( GL_QUADS ); - glTexCoord3f( 0.0, 0.0, 0.5 ); - glVertex2f( 0.0, 0.0 ); - - glTexCoord3f( 0.5, 0.0, 0.5 ); - glVertex2f( 1.0, 0.0 ); - - glTexCoord3f( 0.5, 0.5, 0.5 ); - glVertex2f( 1.0, 1.0 ); - - glTexCoord3f( 0.0, 0.5, 0.5 ); - glVertex2f( 0.0, 1.0 ); - glEnd(); - break; - case 1: - glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_R, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_Q, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGenfv(GL_S, GL_OBJECT_PLANE, ObjPlaneS2); - glTexGenfv(GL_T, GL_OBJECT_PLANE, ObjPlaneT2); - glTexGenfv(GL_R, GL_OBJECT_PLANE, ObjPlaneR); - glTexGenfv(GL_Q, GL_OBJECT_PLANE, nullPlane); - - glEnable( GL_TEXTURE_GEN_S ); - glEnable( GL_TEXTURE_GEN_T ); - glEnable( GL_TEXTURE_GEN_R ); - - glTexCoord1f( 0.0 ); /* to make sure Q is 1.0 */ - glBegin( GL_QUADS ); - glVertex3f( 0.0, 0.0, 0.5 ); - glVertex3f( 1.0, 0.0, 0.5 ); - glVertex3f( 1.0, 1.0, 0.5 ); - glVertex3f( 0.0, 1.0, 0.5 ); - glEnd(); - break; - case 2: - /* make sure that texgen R/Q and non-texgen S/T coordinates are wrong */ - glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_R, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_Q, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGenfv(GL_S, GL_OBJECT_PLANE, ObjPlaneS2); - glTexGenfv(GL_T, GL_OBJECT_PLANE, ObjPlaneT2); - glTexGenfv(GL_R, GL_OBJECT_PLANE, nullPlane); - glTexGenfv(GL_Q, GL_OBJECT_PLANE, nullPlane); - - glEnable( GL_TEXTURE_GEN_S ); - glEnable( GL_TEXTURE_GEN_T ); - - glBegin( GL_QUADS ); - glTexCoord3f( 0.0, 0.0, 0.5 ); - glVertex2f( 0.0, 0.0); - - glTexCoord3f( 0.0, 0.0, 0.5 ); - glVertex2f( 1.0, 0.0); - - glTexCoord3f( 0.0, 0.0, 0.5 ); - glVertex2f( 1.0, 1.0); - - glTexCoord3f( 0.0, 0.0, 0.5 ); - glVertex2f( 0.0, 1.0); - glEnd(); - break; - } - break; - case 4: - switch (texgenenabled) { - case 0: - glBegin( GL_QUADS ); - /* don't need r coordinate but still setting it I'm mean */ - glTexCoord4f( 0.0, 0.0, 0.0, 0.5 ); - glVertex2f( -0.8, -0.8 ); - - glTexCoord4f( 0.5, 0.0, 0.2, 0.5 ); - glVertex2f( 0.8, -0.8 ); - - glTexCoord4f( 0.5, 0.5, 0.5, 0.5 ); - glVertex2f( 0.8, 0.8 ); - - glTexCoord4f( 0.0, 0.5, 0.5, 0.5 ); - glVertex2f( -0.8, 0.8 ); - glEnd(); - break; - case 1: - glTranslatef( -0.8, -0.8, 0.0 ); - glScalef( 1.6, 1.6, 1.0 ); - /* make sure that texgen R/Q and non-texgen S/T coordinates are wrong */ - glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_R, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_Q, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGenfv(GL_S, GL_OBJECT_PLANE, ObjPlaneS2); - glTexGenfv(GL_T, GL_OBJECT_PLANE, ObjPlaneT2); - glTexGenfv(GL_R, GL_OBJECT_PLANE, ObjPlaneR); - glTexGenfv(GL_Q, GL_OBJECT_PLANE, ObjPlaneQ); - - glEnable( GL_TEXTURE_GEN_S ); - glEnable( GL_TEXTURE_GEN_T ); - glEnable( GL_TEXTURE_GEN_R ); - glEnable( GL_TEXTURE_GEN_Q ); - - glBegin( GL_QUADS ); - glVertex2f( 0.0, 0.0 ); - glVertex2f( 1.0, 0.0 ); - glVertex2f( 1.0, 1.0 ); - glVertex2f( 0.0, 1.0 ); - glEnd(); - break; - case 2: - glTranslatef( -0.8, -0.8, 0.0 ); - glScalef( 1.6, 1.6, 1.0 ); - /* make sure that texgen R/Q and non-texgen S/T coordinates are wrong */ - glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_R, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGeni( GL_Q, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR ); - glTexGenfv(GL_S, GL_OBJECT_PLANE, ObjPlaneS2); - glTexGenfv(GL_T, GL_OBJECT_PLANE, ObjPlaneT2); - glTexGenfv(GL_R, GL_OBJECT_PLANE, nullPlane); - glTexGenfv(GL_Q, GL_OBJECT_PLANE, nullPlane); - - glEnable( GL_TEXTURE_GEN_S ); - glEnable( GL_TEXTURE_GEN_T ); - - glBegin( GL_QUADS ); - glTexCoord4f( 0.0, 0.0, 0.0, 0.5 ); - glVertex2f( 0.0, 0.0 ); - - glTexCoord4f( 0.0, 0.0, 0.2, 0.5 ); - glVertex2f( 1.0, 0.0 ); - - glTexCoord4f( 0.0, 0.0, 0.5, 0.5 ); - glVertex2f( 1.0, 1.0 ); - - glTexCoord4f( 0.0, 0.0, 0.75, 0.5 ); - glVertex2f( 0.0, 1.0 ); - glEnd(); - break; - } - break; - } - - glPopMatrix(); - glDisable( GL_TEXTURE_2D ); - -} - -static void display( void ) -{ - int numX = 3, numY = 3; - float xBase = (float) winWidth * 0.01; - float xOffset = (winWidth - xBase) / numX; - float xSize = max( xOffset - xBase, 1 ); - float yBase = (float) winHeight * 0.01; - float yOffset = (winHeight - yBase) / numY; - float ySize = max( yOffset - yBase, 1 ); - float x, y; - int i, j; - - glViewport( 0, 0, winWidth, winHeight ); - glDisable( GL_SCISSOR_TEST ); - glClearColor( 0.0, 0.0, 0.0, 0.0 ); - glClear( GL_COLOR_BUFFER_BIT ); - glEnable( GL_SCISSOR_TEST ); - - x = xBase; - y = (winHeight - 1) - yOffset; - - for ( i = 0 ; i < numY ; i++ ) - { - - labelInfoColor = labelColor1; - - - for ( j = 0 ; j < numX ; j++ ) { - drawSample( x, y, xSize, ySize, i, j+2 ); - x += xOffset; - } - - x = xBase; - y -= yOffset; - } - - if ( doubleBuffered ) { - glutSwapBuffers(); - } else { - glFlush(); - } - - checkErrors(); -} - -static void usage( char *name ) -{ - fprintf( stderr, "usage: %s [ options ]\n", name ); - fprintf( stderr, "\n" ); - fprintf( stderr, "options:\n" ); - fprintf( stderr, " -sb single buffered\n" ); - fprintf( stderr, " -db double buffered\n" ); - fprintf( stderr, " -info print OpenGL driver info\n" ); -} - -static void instructions( void ) -{ - fprintf( stderr, "texgenmix - mixed texgen/non-texgen texture coordinate test\n" ); - fprintf( stderr, "all quads should look the same!\n" ); - fprintf( stderr, "\n" ); - fprintf( stderr, " [t] - toggle texturing\n" ); -} - -int main( int argc, char *argv[] ) -{ - GLboolean info = GL_FALSE; - int i; - - glutInit( &argc, argv ); - - for ( i = 1 ; i < argc ; i++ ) { - if ( !strcmp( "-sb", argv[i] ) ) { - doubleBuffered = GL_FALSE; - } else if ( !strcmp( "-db", argv[i] ) ) { - doubleBuffered = GL_TRUE; - } else if ( !strcmp( "-info", argv[i] ) ) { - info = GL_TRUE; - } else { - usage( argv[0] ); - exit( 1 ); - } - } - - if ( doubleBuffered ) { - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - } else { - glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE ); - } - - glutInitWindowSize( winWidth, winHeight ); - glutInitWindowPosition( 0, 0 ); - glutCreateWindow( "Mixed texgen/non-texgen texture coordinate test" ); - - initialize(); - instructions(); - - if ( info ) { - printf( "\n" ); - printf( "GL_RENDERER = %s\n", (char *) glGetString( GL_RENDERER ) ); - printf( "GL_VERSION = %s\n", (char *) glGetString( GL_VERSION ) ); - printf( "GL_VENDOR = %s\n", (char *) glGetString( GL_VENDOR ) ) ; - printf( "GL_EXTENSIONS = %s\n", (char *) glGetString( GL_EXTENSIONS ) ); - } - - glutDisplayFunc( display ); - glutReshapeFunc( reshape ); - glutKeyboardFunc( keyboard ); - glutSpecialFunc( special ); - glutMainLoop(); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/texline.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/texline.c deleted file mode 100644 index 3d59d9ac26..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/texline.c +++ /dev/null @@ -1,269 +0,0 @@ -/* $Id: texline.c,v 1.5 2004/01/28 10:07:48 keithw Exp $ */ - -/* - * Test textured lines. - * - * Brian Paul - * September 2000 - */ - - -#include -#include -#include -#include -#include "../util/readtex.c" /* I know, this is a hack. */ - -#define TEXTURE_FILE "../images/girl.rgb" - -static GLboolean Antialias = GL_FALSE; -static GLboolean Animate = GL_FALSE; -static GLint Texture = 1; -static GLboolean Stipple = GL_FALSE; -static GLfloat LineWidth = 1.0; - -static GLfloat Xrot = -60.0, Yrot = 0.0, Zrot = 0.0; -static GLfloat DYrot = 1.0; -static GLboolean Points = GL_FALSE; -static GLfloat Scale = 1.0; - -static void Idle( void ) -{ - if (Animate) { - Zrot += DYrot; - glutPostRedisplay(); - } -} - - -static void Display( void ) -{ - GLfloat x, y, s, t; - - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - glScalef(Scale, Scale, Scale); - - if (Texture) - glColor3f(1, 1, 1); - - if (Points) { - glBegin(GL_POINTS); - for (t = 0.0; t <= 1.0; t += 0.025) { - for (s = 0.0; s <= 1.0; s += 0.025) { - x = s * 2.0 - 1.0; - y = t * 2.0 - 1.0; - if (!Texture) - glColor3f(1, 0, 1); - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, t, s); - glTexCoord2f(s, t); - glVertex2f(x, y); - } - } - glEnd(); - } - else { - glBegin(GL_LINES); - for (t = 0.0; t <= 1.0; t += 0.025) { - x = t * 2.0 - 1.0; - if (!Texture) - glColor3f(1, 0, 1); - glTexCoord2f(t, 0.0); - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, t); - glVertex2f(x, -1.0); - if (!Texture) - glColor3f(0, 1, 0); - glTexCoord2f(t, 1.0); - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, t); - glVertex2f(x, 1.0); - } - glEnd(); - } - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - GLfloat ar = (float) width / height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -ar, ar, -1.0, 1.0, 10.0, 100.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -12.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 'a': - Antialias = !Antialias; - if (Antialias) { - glEnable(GL_LINE_SMOOTH); - glEnable(GL_POINT_SMOOTH); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - } - else { - glDisable(GL_LINE_SMOOTH); - glDisable(GL_POINT_SMOOTH); - glDisable(GL_BLEND); - } - break; - case 't': - Texture++; - if (Texture > 2) - Texture = 0; - if (Texture == 0) { - glActiveTextureARB(GL_TEXTURE0_ARB); - glDisable(GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE1_ARB); - glDisable(GL_TEXTURE_2D); - } - else if (Texture == 1) { - glActiveTextureARB(GL_TEXTURE0_ARB); - glEnable(GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE1_ARB); - glDisable(GL_TEXTURE_2D); - } - else { - glActiveTextureARB(GL_TEXTURE0_ARB); - glEnable(GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE1_ARB); - glEnable(GL_TEXTURE_2D); - } - break; - case 'w': - LineWidth -= 0.25; - if (LineWidth < 0.25) - LineWidth = 0.25; - glLineWidth(LineWidth); - glPointSize(LineWidth); - break; - case 'W': - LineWidth += 0.25; - if (LineWidth > 8.0) - LineWidth = 8.0; - glLineWidth(LineWidth); - glPointSize(LineWidth); - break; - case 'p': - Points = !Points; - break; - case 's': - Stipple = !Stipple; - if (Stipple) - glEnable(GL_LINE_STIPPLE); - else - glDisable(GL_LINE_STIPPLE); - break; - case ' ': - Animate = !Animate; - if (Animate) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 27: - exit(0); - break; - } - printf("LineWidth, PointSize = %f\n", LineWidth); - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - float step = 3.0; - (void) x; - (void) y; - - switch (key) { - case GLUT_KEY_UP: - Xrot += step; - break; - case GLUT_KEY_DOWN: - Xrot -= step; - break; - case GLUT_KEY_LEFT: - Yrot += step; - break; - case GLUT_KEY_RIGHT: - Yrot -= step; - break; - } - glutPostRedisplay(); -} - - -static void Init( int argc, char *argv[] ) -{ - GLuint u; - for (u = 0; u < 2; u++) { - glActiveTextureARB(GL_TEXTURE0_ARB + u); - glBindTexture(GL_TEXTURE_2D, 10+u); - if (u == 0) - glEnable(GL_TEXTURE_2D); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - if (u == 0) - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - else - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) { - printf("Error: couldn't load texture image\n"); - exit(1); - } - } - - glLineStipple(1, 0xff); - - if (argc > 1 && strcmp(argv[1], "-info")==0) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition(0, 0); - glutInitWindowSize( 400, 300 ); - - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - - glutCreateWindow(argv[0] ); - - Init(argc, argv); - - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - if (Animate) - glutIdleFunc( Idle ); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/texobjshare.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/texobjshare.c deleted file mode 100644 index 2b31cb6c4d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/texobjshare.c +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Create several OpenGL rendering contexts, sharing textures, display - * lists, etc. Exercise binding, deleting, etc. - * - * Brian Paul - * 21 December 2004 - */ - - -#include -#include -#include -#include -#include -#include -#include -#include - - -/* - * Each display/window/context: - */ -struct context { - char DisplayName[1000]; - Display *Dpy; - Window Win; - GLXContext Context; -}; - - -#define MAX_CONTEXTS 200 -static struct context Contexts[MAX_CONTEXTS]; -static int NumContexts = 0; - - -static void -Error(const char *display, const char *msg) -{ - fprintf(stderr, "Error on display %s - %s\n", display, msg); - exit(1); -} - - -static struct context * -CreateContext(const char *displayName, const char *name) -{ - Display *dpy; - Window win; - GLXContext ctx; - int attrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - XVisualInfo *visinfo; - int width = 90, height = 90; - int xpos = 0, ypos = 0; - - if (NumContexts >= MAX_CONTEXTS) - return NULL; - - dpy = XOpenDisplay(displayName); - if (!dpy) { - Error(displayName, "Unable to open display"); - return NULL; - } - - scrnum = DefaultScreen(dpy); - root = RootWindow(dpy, scrnum); - - visinfo = glXChooseVisual(dpy, scrnum, attrib); - if (!visinfo) { - Error(displayName, "Unable to find RGB, double-buffered visual"); - return NULL; - } - - /* window attributes */ - xpos = (NumContexts % 10) * 100; - ypos = (NumContexts / 10) * 100; - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow(dpy, root, xpos, ypos, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr); - if (!win) { - Error(displayName, "Couldn't create window"); - return NULL; - } - - { - XSizeHints sizehints; - sizehints.x = xpos; - sizehints.y = ypos; - sizehints.width = width; - sizehints.height = height; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win, &sizehints); - XSetStandardProperties(dpy, win, name, name, - None, (char **)NULL, 0, &sizehints); - } - - if (NumContexts == 0) { - ctx = glXCreateContext(dpy, visinfo, NULL, True); - } - else { - /* share textures & dlists with 0th context */ - ctx = glXCreateContext(dpy, visinfo, Contexts[0].Context, True); - } - if (!ctx) { - Error(displayName, "Couldn't create GLX context"); - return NULL; - } - - XMapWindow(dpy, win); - - if (!glXMakeCurrent(dpy, win, ctx)) { - Error(displayName, "glXMakeCurrent failed"); - return NULL; - } - - if (NumContexts == 0) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - } - - /* save the info for this context */ - { - struct context *h = &Contexts[NumContexts]; - strcpy(h->DisplayName, name); - h->Dpy = dpy; - h->Win = win; - h->Context = ctx; - NumContexts++; - return &Contexts[NumContexts-1]; - } -} - - -static void -MakeCurrent(int i) -{ - if (!glXMakeCurrent(Contexts[i].Dpy, Contexts[i].Win, Contexts[i].Context)) { - fprintf(stderr, "glXMakeCurrent failed!\n"); - } -} - - - -static void -DestroyContext(int i) -{ - XDestroyWindow(Contexts[i].Dpy, Contexts[i].Win); - glXDestroyContext(Contexts[i].Dpy, Contexts[i].Context); - XCloseDisplay(Contexts[i].Dpy); -} - - -int -main(int argc, char *argv[]) -{ - char *dpyName = NULL; - int i; - GLuint t; - GLint tb; - - for (i = 0; i < 2; i++) { - CreateContext(dpyName, "context"); - } - - /* Create texture and bind it in context 0 */ - MakeCurrent(0); - glGenTextures(1, &t); - printf("Generated texture ID %u\n", t); - assert(!glIsTexture(t)); - glBindTexture(GL_TEXTURE_2D, t); - assert(glIsTexture(t)); - glGetIntegerv(GL_TEXTURE_BINDING_2D, &tb); - assert(tb == t); - - /* Bind texture in context 1 */ - MakeCurrent(1); - assert(glIsTexture(t)); - glBindTexture(GL_TEXTURE_2D, t); - glGetIntegerv(GL_TEXTURE_BINDING_2D, &tb); - assert(tb == t); - - /* Delete texture from context 0 */ - MakeCurrent(0); - glDeleteTextures(1, &t); - assert(!glIsTexture(t)); - glGetIntegerv(GL_TEXTURE_BINDING_2D, &tb); - printf("After delete, binding = %d\n", tb); - - /* Check texture state from context 1 */ - MakeCurrent(1); - assert(!glIsTexture(t)); - glGetIntegerv(GL_TEXTURE_BINDING_2D, &tb); - printf("In second context, binding = %d\n", tb); - glBindTexture(GL_TEXTURE_2D, 0); - glGetIntegerv(GL_TEXTURE_BINDING_2D, &tb); - assert(tb == 0); - - - for (i = 0; i < NumContexts; i++) { - DestroyContext(i); - } - - printf("Success!\n"); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/texrect.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/texrect.c deleted file mode 100644 index 61c1fdd6b4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/texrect.c +++ /dev/null @@ -1,360 +0,0 @@ -/* $Id: texrect.c,v 1.5 2004/05/06 20:27:32 brianp Exp $ */ - -/* GL_NV_texture_rectangle test - * - * Brian Paul - * 14 June 2002 - */ - - -#define GL_GLEXT_PROTOTYPES -#include -#include -#include -#include -#include -#include "readtex.h" - -#define TEXTURE_0_FILE "../images/girl.rgb" -#define TEXTURE_1_FILE "../images/reflect.rgb" - -#define TEX0 1 -#define TEX7 8 -#define ANIMATE 10 -#define CLAMP 20 -#define CLAMP_TO_EDGE 21 -#define CLAMP_TO_BORDER 22 -#define LINEAR_FILTER 30 -#define NEAREST_FILTER 31 -#define QUIT 100 - -static GLboolean Animate = GL_FALSE; -static GLint NumUnits = 2; -static GLboolean TexEnabled[8]; -static GLint Width[8], Height[8]; /* image sizes */ -static GLenum Format[8]; - -static GLfloat Xrot = 00.0, Yrot = 00.0, Zrot = 0.0; - - -static void Idle( void ) -{ - Zrot = glutGet(GLUT_ELAPSED_TIME) * 0.01; - glutPostRedisplay(); -} - - -static void DrawObject(void) -{ - GLint i; - GLfloat d = 10; /* so we can see how borders are handled */ - - glColor3f(.1, .1, .1); /* modulate this */ - - glPushMatrix(); - - glRotatef(Zrot, 0, 0, 1); - - glBegin(GL_QUADS); - - for (i = 0; i < NumUnits; i++) - glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, -d, -d); - glVertex2f(-1.0, -1.0); - - for (i = 0; i < NumUnits; i++) - glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, Width[i]+d, -d); - glVertex2f(1.0, -1.0); - - for (i = 0; i < NumUnits; i++) - glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, Width[i]+d, Height[i]+d); - glVertex2f(1.0, 1.0); - - for (i = 0; i < NumUnits; i++) - glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, -d, Height[i]+d); - glVertex2f(-1.0, 1.0); - - glEnd(); - glPopMatrix(); -} - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - glScalef(5.0, 5.0, 5.0); - DrawObject(); - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 100.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -35.0 ); -} - - -static void ModeMenu(int entry) -{ - GLint i; - if (entry >= TEX0 && entry < TEX0 + NumUnits) { - /* toggle */ - i = entry - TEX0; - TexEnabled[i] = !TexEnabled[i]; - glActiveTextureARB(GL_TEXTURE0_ARB + i); - if (TexEnabled[i]) { - glEnable(GL_TEXTURE_RECTANGLE_NV); - } - else { - glDisable(GL_TEXTURE_RECTANGLE_NV); - } - printf("Enabled: "); - for (i = 0; i < NumUnits; i++) - printf("%d ", (int) TexEnabled[i]); - printf("\n"); - } - else if (entry==ANIMATE) { - Animate = !Animate; - if (Animate) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - } - else if (entry==CLAMP) { - for (i = 0; i < NumUnits; i++) { - glActiveTextureARB(GL_TEXTURE0_ARB + i); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_S, GL_CLAMP); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_T, GL_CLAMP); - } - } - else if (entry==CLAMP_TO_EDGE) { - for (i = 0; i < NumUnits; i++) { - glActiveTextureARB(GL_TEXTURE0_ARB + i); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - } - } - else if (entry==CLAMP_TO_BORDER) { - for (i = 0; i < NumUnits; i++) { - glActiveTextureARB(GL_TEXTURE0_ARB + i); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); - } - } - else if (entry==NEAREST_FILTER) { - for (i = 0; i < NumUnits; i++) { - glActiveTextureARB(GL_TEXTURE0_ARB + i); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } - } - else if (entry==LINEAR_FILTER) { - for (i = 0; i < NumUnits; i++) { - glActiveTextureARB(GL_TEXTURE0_ARB + i); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - } - } - - else if (entry==QUIT) { - exit(0); - } - - glutPostRedisplay(); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 'z': - Zrot -= 1.0; - break; - case 'Z': - Zrot += 1.0; - break; - case 'a': - Animate = !Animate; - if (Animate) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - float step = 3.0; - (void) x; - (void) y; - - switch (key) { - case GLUT_KEY_UP: - Xrot += step; - break; - case GLUT_KEY_DOWN: - Xrot -= step; - break; - case GLUT_KEY_LEFT: - Yrot += step; - break; - case GLUT_KEY_RIGHT: - Yrot -= step; - break; - } - glutPostRedisplay(); -} - - -static void Init( int argc, char *argv[] ) -{ - const GLenum wrap = GL_CLAMP; - GLuint texObj[8]; - GLint size, i; - - if (!glutExtensionSupported("GL_ARB_multitexture")) { - printf("Sorry, GL_ARB_multitexture needed by this program\n"); - exit(1); - } - - if (!glutExtensionSupported("GL_NV_texture_rectangle")) { - printf("Sorry, GL_NV_texture_rectangle needed by this program\n"); - exit(1); - } - - glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &NumUnits); - printf("%d texture units supported, using 2.\n", NumUnits); - if (NumUnits > 2) - NumUnits = 2; - - glGetIntegerv(GL_MAX_RECTANGLE_TEXTURE_SIZE_NV, &size); - printf("%d x %d max texture rectangle size\n", size, size); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - for (i = 0; i < NumUnits; i++) { - TexEnabled[i] = GL_TRUE; - } - - /* allocate two texture objects */ - glGenTextures(NumUnits, texObj); - - /* setup the texture objects */ - for (i = 0; i < NumUnits; i++) { - - glActiveTextureARB(GL_TEXTURE0_ARB + i); - - glBindTexture(GL_TEXTURE_RECTANGLE_NV, texObj[i]); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, - GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, - GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_S, wrap); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_T, wrap); - - if (i == 0) { - GLubyte *img = LoadRGBImage(TEXTURE_0_FILE, &Width[0], &Height[0], - &Format[0]); - if (!img) { - printf("Error: couldn't load texture image\n"); - exit(1); - } - printf("Texture %d: %s (%d x %d)\n", i, - TEXTURE_0_FILE, Width[0], Height[0]); - glTexImage2D(GL_TEXTURE_RECTANGLE_NV, 0, GL_RGB, - Width[0], Height[0], 0, - Format[0], GL_UNSIGNED_BYTE, img); - } - else { - GLubyte *img = LoadRGBImage(TEXTURE_1_FILE, &Width[1], &Height[1], - &Format[1]); - if (!img) { - printf("Error: couldn't load texture image\n"); - exit(1); - } - printf("Texture %d: %s (%d x %d)\n", i, - TEXTURE_1_FILE, Width[1], Height[1]); - glTexImage2D(GL_TEXTURE_RECTANGLE_NV, 0, GL_RGB, - Width[1], Height[1], 0, - Format[1], GL_UNSIGNED_BYTE, img); - } - - if (i < 1) - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD); - else - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD); - - if (TexEnabled[i]) - glEnable(GL_TEXTURE_RECTANGLE_NV); - } - - glShadeModel(GL_FLAT); - glClearColor(0.3, 0.3, 0.4, 1.0); - - if (argc > 1 && strcmp(argv[1], "-info")==0) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } -} - - -int main( int argc, char *argv[] ) -{ - GLint i; - - glutInit( &argc, argv ); - glutInitWindowSize( 300, 300 ); - glutInitWindowPosition( 0, 0 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0] ); - - Init( argc, argv ); - - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - if (Animate) - glutIdleFunc( Idle ); - - glutCreateMenu(ModeMenu); - - for (i = 0; i < NumUnits; i++) { - char s[100]; - sprintf(s, "Toggle Texture %d", i); - glutAddMenuEntry(s, TEX0 + i); - } - glutAddMenuEntry("Toggle Animation", ANIMATE); - glutAddMenuEntry("GL_CLAMP", CLAMP); - glutAddMenuEntry("GL_CLAMP_TO_EDGE", CLAMP_TO_EDGE); - glutAddMenuEntry("GL_CLAMP_TO_BORDER", CLAMP_TO_BORDER); - glutAddMenuEntry("GL_NEAREST", NEAREST_FILTER); - glutAddMenuEntry("GL_LINEAR", LINEAR_FILTER); - glutAddMenuEntry("Quit", QUIT); - glutAttachMenu(GLUT_RIGHT_BUTTON); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/texwrap.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/texwrap.c deleted file mode 100644 index 35f5050ef7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/texwrap.c +++ /dev/null @@ -1,303 +0,0 @@ -/* $Id: texwrap.c,v 1.7 2003/09/02 19:25:18 idr Exp $ */ - -/* - * Test texture wrap modes. - * Press 'b' to toggle texture image borders. You should see the same - * rendering whether or not you're using borders. - * - * Brian Paul March 2001 - */ - - -#define GL_GLEXT_PROTOTYPES -#include -#include -#include -#include - - -#ifndef GL_CLAMP_TO_BORDER -#define GL_CLAMP_TO_BORDER 0x812D -#endif - -#ifndef GL_MIRRORED_REPEAT -#define GL_MIRRORED_REPEAT 0x8370 -#endif - -#ifndef GL_EXT_texture_mirror_clamp -#define GL_MIRROR_CLAMP_EXT 0x8742 -#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 -#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 -#endif - -#define BORDER_TEXTURE 1 -#define NO_BORDER_TEXTURE 2 - -#define SIZE 8 -static GLubyte BorderImage[SIZE+2][SIZE+2][4]; -static GLubyte NoBorderImage[SIZE][SIZE][4]; -static GLuint Border = 0; - - -#define WRAP_MODE(m) { m , # m, GL_TRUE, 1.0, { NULL, NULL } } -#define WRAP_EXT(m,e1,e2,v) { m , # m, GL_FALSE, v, { e1, e2 } } - -struct wrap_mode { - GLenum mode; - const char * name; - GLboolean supported; - GLfloat version; - const char * extension_names[2]; -}; - -static struct wrap_mode modes[] = { - WRAP_MODE( GL_REPEAT ), - WRAP_MODE( GL_CLAMP ), - WRAP_EXT ( GL_CLAMP_TO_EDGE, "GL_EXT_texture_edge_clamp", - "GL_SGIS_texture_edge_clamp", - 1.2 ), - WRAP_EXT ( GL_CLAMP_TO_BORDER, "GL_ARB_texture_border_clamp", - "GL_SGIS_texture_border_clamp", - 1.3 ), - WRAP_EXT ( GL_MIRRORED_REPEAT, "GL_ARB_texture_mirrored_repeat", - "GL_IBM_texture_mirrored_repeat", - 1.4 ), - WRAP_EXT ( GL_MIRROR_CLAMP_EXT, "GL_ATI_texture_mirror_once", - "GL_EXT_texture_mirror_clamp", - 999.0 ), - WRAP_EXT ( GL_MIRROR_CLAMP_TO_EDGE_EXT, "GL_ATI_texture_mirror_once", - "GL_EXT_texture_mirror_clamp", - 999.0 ), - WRAP_EXT ( GL_MIRROR_CLAMP_TO_BORDER_EXT, "GL_EXT_texture_mirror_clamp", - NULL, - 999.0 ), - { 0 } -}; - -static void -PrintString(const char *s) -{ - while (*s) { - glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s); - s++; - } -} - - -static void Display( void ) -{ - GLenum i, j; - GLint offset; - GLfloat version; - - /* Fill in the extensions that are supported. - */ - - version = atof( (char *) glGetString( GL_VERSION ) ); - for ( i = 0 ; modes[i].mode != 0 ; i++ ) { - if ( ((modes[i].extension_names[0] != NULL) - && glutExtensionSupported(modes[i].extension_names[0])) - || ((modes[i].extension_names[1] != NULL) - && glutExtensionSupported(modes[i].extension_names[1])) ) { - modes[i].supported = GL_TRUE; - } - else if ( !modes[i].supported && (modes[i].version <= version) ) { - fprintf( stderr, "WARNING: OpenGL library meets minimum version\n" - " requirement for %s, but the\n" - " extension string is not advertised.\n" - " (%s%s%s)\n", - modes[i].name, - modes[i].extension_names[0], - (modes[i].extension_names[1] != NULL) - ? " or " : "", - (modes[i].extension_names[1] != NULL) - ? modes[i].extension_names[1] : "" ); - modes[i].supported = GL_TRUE; - } - } - - - glClearColor(0.5, 0.5, 0.5, 1.0); - glClear( GL_COLOR_BUFFER_BIT ); - -#if 0 - /* draw texture as image */ - glDisable(GL_TEXTURE_2D); - glWindowPos2iARB(1, 1); - glDrawPixels(6, 6, GL_RGBA, GL_UNSIGNED_BYTE, (void *) TexImage); -#endif - - glBindTexture(GL_TEXTURE_2D, Border ? BORDER_TEXTURE : NO_BORDER_TEXTURE); - - - /* loop over min/mag filters */ - for (i = 0; i < 2; i++) { - offset = 0; - - if (i) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - } - else { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } - - /* loop over border modes */ - for (j = 0; j < modes[j].mode != 0; j++) { - const GLfloat x0 = 0, y0 = 0, x1 = 140, y1 = 140; - const GLfloat b = 1.2; - const GLfloat s0 = -b, t0 = -b, s1 = 1.0+b, t1 = 1.0+b; - - if ( modes[j].supported != GL_TRUE ) - continue; - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, modes[j].mode); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, modes[j].mode); - - glPushMatrix(); - glTranslatef(offset * 150 + 10, i * 150 + 40, 0); - offset++; - - glEnable(GL_TEXTURE_2D); - glColor3f(1, 1, 1); - glBegin(GL_POLYGON); - glTexCoord2f(s0, t0); glVertex2f(x0, y0); - glTexCoord2f(s1, t0); glVertex2f(x1, y0); - glTexCoord2f(s1, t1); glVertex2f(x1, y1); - glTexCoord2f(s0, t1); glVertex2f(x0, y1); - glEnd(); - - /* draw red outline showing bounds of texture at s=0,1 and t=0,1 */ - glDisable(GL_TEXTURE_2D); - glColor3f(1, 0, 0); - glBegin(GL_LINE_LOOP); - glVertex2f(x0 + b * (x1-x0) / (s1-s0), y0 + b * (y1-y0) / (t1-t0)); - glVertex2f(x1 - b * (x1-x0) / (s1-s0), y0 + b * (y1-y0) / (t1-t0)); - glVertex2f(x1 - b * (x1-x0) / (s1-s0), y1 - b * (y1-y0) / (t1-t0)); - glVertex2f(x0 + b * (x1-x0) / (s1-s0), y1 - b * (y1-y0) / (t1-t0)); - glEnd(); - - glPopMatrix(); - } - } - - glDisable(GL_TEXTURE_2D); - glColor3f(1, 1, 1); - offset = 0; - for (i = 0; i < modes[i].mode != 0; i++) { - if ( modes[i].supported ) { - glWindowPos2iARB( offset * 150 + 10, 5 + ((offset & 1) * 15) ); - PrintString(modes[i].name); - offset++; - } - } - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho(0, width, 0, height, -1, 1); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 'b': - Border = !Border; - printf("Texture Border Size = %d\n", Border); - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - static const GLubyte border[4] = { 0, 255, 0, 255 }; - static const GLfloat borderf[4] = { 0, 1.0, 0, 1.0 }; - GLint i, j; - - for (i = 0; i < SIZE+2; i++) { - for (j = 0; j < SIZE+2; j++) { - if (i == 0 || j == 0 || i == SIZE+1 || j == SIZE+1) { - /* border color */ - BorderImage[i][j][0] = border[0]; - BorderImage[i][j][1] = border[1]; - BorderImage[i][j][2] = border[2]; - BorderImage[i][j][3] = border[3]; - } - else if ((i + j) & 1) { - /* white */ - BorderImage[i][j][0] = 255; - BorderImage[i][j][1] = 255; - BorderImage[i][j][2] = 255; - BorderImage[i][j][3] = 255; - } - else { - /* black */ - BorderImage[i][j][0] = 0; - BorderImage[i][j][1] = 0; - BorderImage[i][j][2] = 0; - BorderImage[i][j][3] = 0; - } - } - } - - glBindTexture(GL_TEXTURE_2D, BORDER_TEXTURE); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, SIZE+2, SIZE+2, 1, - GL_RGBA, GL_UNSIGNED_BYTE, (void *) BorderImage); - - for (i = 0; i < SIZE; i++) { - for (j = 0; j < SIZE; j++) { - if ((i + j) & 1) { - /* white */ - NoBorderImage[i][j][0] = 255; - NoBorderImage[i][j][1] = 255; - NoBorderImage[i][j][2] = 255; - NoBorderImage[i][j][3] = 255; - } - else { - /* black */ - NoBorderImage[i][j][0] = 0; - NoBorderImage[i][j][1] = 0; - NoBorderImage[i][j][2] = 0; - NoBorderImage[i][j][3] = 0; - } - } - } - - glBindTexture(GL_TEXTURE_2D, NO_BORDER_TEXTURE); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, SIZE, SIZE, 0, - GL_RGBA, GL_UNSIGNED_BYTE, (void *) NoBorderImage); - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderf); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 800, 355 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/vparray.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/vparray.c deleted file mode 100644 index 580a670f8e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/vparray.c +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Test vertex arrays with GL_NV_vertex_program - * - * Based on a stripped-down version of the isosurf demo. - * The vertex program is trivial: compute the resulting - * RGB color as a linear function of vertex XYZ. - */ - -#include -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include "GL/glut.h" - -#define MAXVERTS 10000 -static float data[MAXVERTS][6]; -static GLint numverts; - -static GLfloat xrot; -static GLfloat yrot; -static GLboolean useArrays = GL_TRUE; -static GLboolean useProgram = GL_TRUE; -static GLboolean useList = GL_FALSE; - - -static void read_surface( char *filename ) -{ - FILE *f; - - f = fopen(filename,"r"); - if (!f) { - printf("couldn't read %s\n", filename); - exit(1); - } - - numverts = 0; - while (!feof(f) && numverts < MAXVERTS) { - fscanf( f, "%f %f %f %f %f %f", - &data[numverts][0], &data[numverts][1], &data[numverts][2], - &data[numverts][3], &data[numverts][4], &data[numverts][5] ); - numverts++; - } - numverts--; - - printf("%d vertices, %d triangles\n", numverts, numverts-2); - printf("data = %p\n", (void *) data); - fclose(f); -} - - - - -static void Display(void) -{ - if (useProgram) - glEnable(GL_VERTEX_PROGRAM_NV); - else - glDisable(GL_VERTEX_PROGRAM_NV); - - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(xrot, 1, 0, 0); - glRotatef(yrot, 0, 1, 0); - glScalef(2, 2, 2); - if (useArrays) { - if (useProgram) { - glVertexAttribPointerNV( 0, 3, GL_FLOAT, 6 * sizeof(GLfloat), data ); - glEnableClientState( GL_VERTEX_ATTRIB_ARRAY0_NV ); - glVertexAttribPointerNV( 2, 3, GL_FLOAT, 6 * sizeof(GLfloat), ((GLfloat *) data) + 3); - glEnableClientState( GL_VERTEX_ATTRIB_ARRAY2_NV); - } - else { - glVertexPointer( 3, GL_FLOAT, 6 * sizeof(GLfloat), data ); - glEnableClientState( GL_VERTEX_ARRAY ); - glNormalPointer( GL_FLOAT, 6 * sizeof(GLfloat), ((GLfloat *) data) + 3); - glEnableClientState( GL_NORMAL_ARRAY ); - } - - if (useList) { - /* dumb, but a good test */ - glNewList(1,GL_COMPILE); - glDrawArrays(GL_TRIANGLE_STRIP, 0, numverts); - glEndList(); - glCallList(1); - } - else { - glDrawArrays(GL_TRIANGLE_STRIP, 0, numverts); - } - - glDisableClientState( GL_VERTEX_ATTRIB_ARRAY0_NV ); - glDisableClientState( GL_VERTEX_ATTRIB_ARRAY2_NV); - glDisableClientState( GL_VERTEX_ARRAY ); - glDisableClientState( GL_NORMAL_ARRAY ); - } - else { - int i; - glBegin(GL_TRIANGLE_STRIP); - for (i = 0; i < numverts; i++) { - glNormal3fv( data[i] + 3 ); - glVertex3fv( data[i] + 0 ); - } - glEnd(); - } - glPopMatrix(); - - if (glGetError()) - printf("Error!\n"); - - glutSwapBuffers(); -} - - -static void InitMaterials(void) -{ - static float ambient[] = {0.1, 0.1, 0.1, 1.0}; - static float diffuse[] = {0.5, 1.0, 1.0, 1.0}; - static float position0[] = {0.0, 0.0, 20.0, 0.0}; - static float position1[] = {0.0, 0.0, -20.0, 0.0}; - static float front_mat_shininess[] = {60.0}; - static float front_mat_specular[] = {0.2, 0.2, 0.2, 1.0}; - static float front_mat_diffuse[] = {0.5, 0.28, 0.38, 1.0}; - /* - static float back_mat_shininess[] = {60.0}; - static float back_mat_specular[] = {0.5, 0.5, 0.2, 1.0}; - static float back_mat_diffuse[] = {1.0, 1.0, 0.2, 1.0}; - */ - static float lmodel_ambient[] = {1.0, 1.0, 1.0, 1.0}; - static float lmodel_twoside[] = {GL_FALSE}; - - glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse); - glLightfv(GL_LIGHT0, GL_POSITION, position0); - glEnable(GL_LIGHT0); - - glLightfv(GL_LIGHT1, GL_AMBIENT, ambient); - glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse); - glLightfv(GL_LIGHT1, GL_POSITION, position1); - glEnable(GL_LIGHT1); - - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); - glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside); - - glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, front_mat_shininess); - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_mat_specular); - glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, front_mat_diffuse); - glEnable(GL_LIGHTING); -} - - -static void init_program(void) -{ - /* - * c[0..3] = modelview matrix - * c[4..7] = inverse modelview matrix - * c[30] = color scale - * c[31] = color bias - */ - static const char prog[] = - "!!VP1.0\n" - - "# RGB is proportional to XYZ \n" - - "MUL R0, v[OPOS], c[30]; \n" - "ADD o[COL0], R0, c[31]; \n" - - "# Continue with typical modelview/projection\n" - "MOV R3, v[OPOS]; \n" - "DP4 o[HPOS].x, c[0], R3 ; # object x MVP -> clip\n" - "DP4 o[HPOS].y, c[1], R3 ;\n" - "DP4 o[HPOS].z, c[2], R3 ;\n" - "DP4 o[HPOS].w, c[3], R3 ;\n" - - "END"; - - static const GLfloat scale[4] = {2.0, 2.0, 2.0, 0.0}; - static const GLfloat bias[4] = {1.0, 1.0, 1.0, 0.0}; - - if (!glutExtensionSupported("GL_NV_vertex_program")) { - printf("Sorry, this program requires GL_NV_vertex_program"); - exit(1); - } - - glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 1, - strlen(prog), (const GLubyte *) prog); - assert(glIsProgramNV(1)); - glBindProgramNV(GL_VERTEX_PROGRAM_NV, 1); - - /* Load the program registers */ - glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 0, GL_MODELVIEW_PROJECTION_NV, GL_IDENTITY_NV); - glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 4, GL_MODELVIEW, GL_INVERSE_TRANSPOSE_NV); - - glProgramParameter4fvNV(GL_VERTEX_PROGRAM_NV, 30, scale); - glProgramParameter4fvNV(GL_VERTEX_PROGRAM_NV, 31, bias); -} - - -static void init(void) -{ - xrot = 0; - yrot = 0; - glClearColor(0.0, 0.0, 1.0, 0.0); - glEnable( GL_DEPTH_TEST ); - glEnable(GL_NORMALIZE); - InitMaterials(); - read_surface( "../demos/isosurf.dat" ); - init_program(); -} - - -static void Reshape(int width, int height) -{ - glViewport(0, 0, (GLint)width, (GLint)height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5, 25 ); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0, 0, -15); -} - - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - case 'a': - useArrays = !useArrays; - printf("use arrays: %s\n", useArrays ? "yes" : "no"); - break; - case 'l': - useList = !useList; - printf("use list: %s\n", useList ? "yes" : "no"); - break; - case 'p': - useProgram = !useProgram; - printf("use program: %s\n", useProgram ? "yes" : "no"); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_LEFT: - yrot -= 15.0; - break; - case GLUT_KEY_RIGHT: - yrot += 15.0; - break; - case GLUT_KEY_UP: - xrot += 15.0; - break; - case GLUT_KEY_DOWN: - xrot -= 15.0; - break; - default: - return; - } - glutPostRedisplay(); -} - - - -int main(int argc, char **argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_DOUBLE ); - glutInitWindowPosition(0, 0); - glutInitWindowSize(400, 400); - if (glutCreateWindow("Isosurface") <= 0) { - exit(0); - } - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(SpecialKey); - glutDisplayFunc(Display); - - init(); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/vpeval.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/vpeval.c deleted file mode 100644 index 8b6996d3b5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/vpeval.c +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Vertex program evaluators test. - * Based on book/bezmesh.c - * - * Brian Paul - * 22 June 2002 - */ - -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - - -/* - * Transform position by modelview/projection. - * Square incoming color. - */ -static const char prog[] = -"!!VP1.0\n" - -"# Typical modelview/projection\n" -"DP4 o[HPOS].x, c[0], v[OPOS] ; # object x MVP -> clip\n" -"DP4 o[HPOS].y, c[1], v[OPOS] ;\n" -"DP4 o[HPOS].z, c[2], v[OPOS] ;\n" -"DP4 o[HPOS].w, c[3], v[OPOS] ;\n" - -"MOV R0, v[COL0];\n # square the color\n" -"MUL R0, R0, R0;\n" -"MOV o[COL0], R0;\n # store output color\n" - -"END"; - - -static int program = 1; - - -GLfloat ctrlpoints[4][4][4] = -{ - { - {-1.5, -1.5, 4.0, 1.0}, - {-0.5, -1.5, 2.0, 1.0}, - {0.5, -1.5, -1.0, 1.0}, - {1.5, -1.5, 2.0, 1.0}}, - { - {-1.5, -0.5, 1.0, 1.0}, - {-0.5, -0.5, 3.0, 1.0}, - {0.5, -0.5, 0.0, 1.0}, - {1.5, -0.5, -1.0, 1.0}}, - { - {-1.5, 0.5, 4.0, 1.0}, - {-0.5, 0.5, 0.0, 1.0}, - {0.5, 0.5, 3.0, 1.0}, - {1.5, 0.5, 4.0, 1.0}}, - { - {-1.5, 1.5, -2.0, 1.0}, - {-0.5, 1.5, -2.0, 1.0}, - {0.5, 1.5, 0.0, 1.0}, - {1.5, 1.5, -1.0, 1.0}} -}; - -/* - * +-------------+ - * |green |yellow - * | | - * | | - * |black |red - * +-------------+ - */ -GLfloat colorPoints[4][4][4] = -{ - { - {0.0, 0.0, 0.0, 1.0}, - {0.3, 0.0, 0.0, 1.0}, - {0.6, 0.0, 0.0, 1.0}, - {1.0, 0.0, 0.0, 1.0}}, - { - {0.0, 0.3, 0.0, 1.0}, - {0.3, 0.3, 0.0, 1.0}, - {0.6, 0.3, 0.0, 1.0}, - {1.0, 0.3, 0.0, 1.0}}, - { - {0.0, 0.6, 0.0, 1.0}, - {0.3, 0.6, 0.0, 1.0}, - {0.6, 0.6, 0.0, 1.0}, - {1.0, 0.6, 0.0, 1.0}}, - { - {0.0, 1.0, 0.0, 1.0}, - {0.3, 1.0, 0.0, 1.0}, - {0.6, 1.0, 0.0, 1.0}, - {1.0, 1.0, 0.0, 1.0}} -}; - - -void -initlights(void) -{ - GLfloat ambient[] = {0.2, 0.2, 0.2, 1.0}; - GLfloat position[] = {0.0, 0.0, 2.0, 1.0}; - GLfloat mat_diffuse[] = {0.6, 0.6, 0.6, 1.0}; - GLfloat mat_specular[] = {1.0, 1.0, 1.0, 1.0}; - GLfloat mat_shininess[] = {50.0}; - -#if 0 /* no lighting for now */ - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - - glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); - glLightfv(GL_LIGHT0, GL_POSITION, position); - - glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); -#endif -} - -void -display(void) -{ - glClearColor(.3, .3, .3, 0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glPushMatrix(); -#if 1 - glRotatef(85.0, 1.0, 1.0, 1.0); -#endif - glEvalMesh2(GL_FILL, 0, 8, 0, 8); - glPopMatrix(); - glFlush(); -} - -void -myinit(int argc, char *argv[]) -{ - glClearColor(0.0, 0.0, 0.0, 1.0); - glEnable(GL_DEPTH_TEST); - - initlights(); /* for lighted version only */ - - glMapGrid2f(8, 0.0, 1.0, 8, 0.0, 1.0); - - if (argc > 1) - program = 0; - - printf("Using vertex program attribs? %s\n", program ? "yes" : "no"); - - if (!program) { - glMap2f(GL_MAP2_VERTEX_4, - 0.0, 1.0, 4, 4, - 0.0, 1.0, 16, 4, &ctrlpoints[0][0][0]); - glMap2f(GL_MAP2_COLOR_4, - 0.0, 1.0, 4, 4, - 0.0, 1.0, 16, 4, &colorPoints[0][0][0]); - glEnable(GL_MAP2_VERTEX_4); - glEnable(GL_MAP2_COLOR_4); - /* - glEnable(GL_AUTO_NORMAL); - glEnable(GL_NORMALIZE); - */ - } - else { - glMap2f(GL_MAP2_VERTEX_ATTRIB0_4_NV, - 0.0, 1.0, 4, 4, - 0.0, 1.0, 16, 4, &ctrlpoints[0][0][0]); - glMap2f(GL_MAP2_VERTEX_ATTRIB3_4_NV, - 0.0, 1.0, 4, 4, - 0.0, 1.0, 16, 4, &colorPoints[0][0][0]); - glEnable(GL_MAP2_VERTEX_ATTRIB0_4_NV); - glEnable(GL_MAP2_VERTEX_ATTRIB3_4_NV); - - /* - glEnable(GL_AUTO_NORMAL); - glEnable(GL_NORMALIZE); - */ - - /* vertex program init */ - glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 1, - strlen(prog), (const GLubyte *) prog); - assert(glIsProgramNV(1)); - glBindProgramNV(GL_VERTEX_PROGRAM_NV, 1); - - /* track matrices */ - glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 0, GL_MODELVIEW_PROJECTION_NV, GL_IDENTITY_NV); - glEnable(GL_VERTEX_PROGRAM_NV); - } -} - -void -myReshape(int w, int h) -{ - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho(-4.0, 4.0, -4.0 * (GLfloat) h / (GLfloat) w, - 4.0 * (GLfloat) h / (GLfloat) w, -4.0, 4.0); - else - glOrtho(-4.0 * (GLfloat) w / (GLfloat) h, - 4.0 * (GLfloat) w / (GLfloat) h, -4.0, 4.0, -4.0, 4.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -static void -key(unsigned char k, int x, int y) -{ - switch (k) { - case 27: /* Escape */ - exit(0); - break; - default: - return; - } - glutPostRedisplay(); -} - -int -main(int argc, char **argv) -{ - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowPosition(0, 0); - glutCreateWindow(argv[0]); - myinit(argc, argv); - glutReshapeFunc(myReshape); - glutDisplayFunc(display); - glutKeyboardFunc(key); - glutMainLoop(); - return 0; /* ANSI C requires main to return int. */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/vptest1.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/vptest1.c deleted file mode 100644 index 560df2c3fd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/vptest1.c +++ /dev/null @@ -1,170 +0,0 @@ -/* Test glGenProgramsNV(), glIsProgramNV(), glLoadProgramNV() */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - - glBegin(GL_POLYGON); - glVertexAttrib2fNV(0, -1, -1); - glVertexAttrib2fNV(0, 1, -1); - glVertexAttrib2fNV(0, 0, 1); - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - static const char *prog1 = - "!!VP1.0\n" - "MUL o[COL0].xyz, R0, c[35]; \n" - "END\n"; - static const char *prog2 = - "!!VP1.0\n" - "#\n" - "# c[0-3] = modelview projection (composite) matrix\n" - "# c[32] = normalized light direction in object-space\n" - "# c[35] = yellow diffuse material, (1.0, 1.0, 0.0, 1.0)\n" - "# c[64].x = 0.0\n" - "# c[64].z = 0.125, a scaling factor\n" - "#\n" - "# outputs diffuse illumination for color and perturbed position\n" - "#\n" - "DP3 R0, c[32], v[NRML]; # light direction DOT normal\n" - "MUL o[COL0].xyz, R0, c[35]; \n" - "MAX R0, c[64].x, R0; \n" - "MUL R0, R0, v[NRML]; \n" - "MUL R0, R0, c[64].z; \n" - "ADD R1, v[OPOS], -R0; # perturb object space position\n" - "DP4 o[HPOS].x, c[0], R1; \n" - "DP4 o[HPOS].y, c[1], R1; \n" - "DP4 o[HPOS].z, c[2], R1; \n" - "DP4 o[HPOS].w, c[3], R1; \n" - "END\n"; - static const char *prog3 = - "!!VP1.0\n" - "DP4 o[HPOS].x, c[0], v[OPOS];\n" - "DP4 o[HPOS].y, c[1], v[OPOS];\n" - "DP4 o[HPOS].z, c[2], v[OPOS];\n" - "DP4 o[HPOS].w, c[3], v[OPOS];\n" - "DP3 R0.x, c[4], v[NRML];\n" - "DP3 R0.y, c[5], v[NRML]; \n" - "DP3 R0.z, c[6], v[NRML]; # R0 = n' = transformed normal\n" - "DP3 R1.x, c[32], R0; # R1.x = Lpos DOT n'\n" - "DP3 R1.y, c[33], R0; # R1.y = hHat DOT n'\n" - "MOV R1.w, c[38].x; # R1.w = specular power\n" - "LIT R2, R1; # Compute lighting values\n" - "MAD R3, c[35].x, R2.y, c[35].y; # diffuse + emissive\n" - "MAD o[COL0].xyz, c[36], R2.z, R3; # + specular\n" - "END\n"; - static const char *prog4 = - "!!VP1.0\n" - "DP4 R2, R3, c[A0.x];\n" - "DP4 R2, R3, c[A0.x + 5];\n" - "DP4 o[HPOS], R3, c[A0.x - 4];\n" - "END\n"; - static const char *prog5 = - "!!VSP1.0\n" - "DP4 R2, R3, c[A0.x];\n" - "DP4 R2, R3, v[0];\n" - "DP4 c[3], R3, R2;\n" - "END\n"; - - - GLuint progs[5]; - - glGenProgramsNV(2, progs); - assert(progs[0]); - assert(progs[1]); - assert(progs[0] != progs[1]); - - glGenProgramsNV(3, progs + 2); - assert(progs[2]); - assert(progs[3]); - assert(progs[2] != progs[3]); - assert(progs[0] != progs[2]); - - - glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 1, - strlen(prog1), - (const GLubyte *) prog1); - assert(!glIsProgramNV(1)); - - glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 2, - strlen(prog2), - (const GLubyte *) prog2); - assert(glIsProgramNV(2)); - - glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 3, - strlen(prog3), - (const GLubyte *) prog3); - assert(glIsProgramNV(3)); - - glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 4, - strlen(prog4), - (const GLubyte *) prog4); - assert(glIsProgramNV(4)); - - glLoadProgramNV(GL_VERTEX_STATE_PROGRAM_NV, 5, - strlen(prog5), - (const GLubyte *) prog5); - assert(glIsProgramNV(5)); - - printf("glGetError = %d\n", (int) glGetError()); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 250, 250 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/vptest2.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/vptest2.c deleted file mode 100644 index 2158e07f04..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/vptest2.c +++ /dev/null @@ -1,151 +0,0 @@ -/* Test vertex state program execution */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - glPushMatrix(); - glutSolidCube(2.0); - glPopMatrix(); - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Test1( void ) -{ - static const GLfloat p[4] = {9, 8, 7, 6}; - GLfloat q[4]; - /* test addition */ - static const char *prog = - "!!VSP1.0\n" - "MOV R0, c[0];\n" - "MOV R1, c[1];\n" - "ADD c[2], R0, R1;\n" - "END\n"; - - glLoadProgramNV(GL_VERTEX_STATE_PROGRAM_NV, 1, - strlen(prog), - (const GLubyte *) prog); - assert(glIsProgramNV(1)); - - glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 0, 1, 2, 3, 4); - glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 1, 10, 20, 30, 40); - - glExecuteProgramNV(GL_VERTEX_STATE_PROGRAM_NV, 1, p); - - glGetProgramParameterfvNV(GL_VERTEX_PROGRAM_NV, 2, GL_PROGRAM_PARAMETER_NV, q); - printf("Result c[2] = %g %g %g %g (should be 11 22 33 44)\n", - q[0], q[1], q[2], q[3]); -} - - -static void Test2( void ) -{ - static const GLfloat p[4] = {9, 8, 7, 6}; - GLfloat q[4]; - /* test swizzling */ - static const char *prog = - "!!VSP1.0\n" - "MOV R0, c[0].wzyx;\n" - "MOV R1, c[1].wzyx;\n" - "ADD c[2], R0, R1;\n" - "END\n"; - - glLoadProgramNV(GL_VERTEX_STATE_PROGRAM_NV, 1, - strlen(prog), - (const GLubyte *) prog); - assert(glIsProgramNV(1)); - - glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 0, 1, 2, 3, 4); - glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 1, 10, 20, 30, 40); - - glExecuteProgramNV(GL_VERTEX_STATE_PROGRAM_NV, 1, p); - - glGetProgramParameterfvNV(GL_VERTEX_PROGRAM_NV, 2, GL_PROGRAM_PARAMETER_NV, q); - printf("Result c[2] = %g %g %g %g (should be 44 33 22 11)\n", - q[0], q[1], q[2], q[3]); -} - - -static void Test3( void ) -{ - static const GLfloat p[4] = {0, 0, 0, 0}; - GLfloat q[4]; - /* normalize vector */ - static const char *prog = - "!!VSP1.0\n" - "# c[0] = (nx,ny,nz)\n" - "# R0.xyz = normalize(R1)\n" - "# R0.w = 1/sqrt(nx*nx + ny*ny + nz*nz)\n" - "# c[2] = R0\n" - "DP3 R0.w, c[0], c[0];\n" - "RSQ R0.w, R0.w;\n" - "MUL R0.xyz, c[0], R0.w;\n" - "MOV c[2], R0;\n" - "END\n"; - - glLoadProgramNV(GL_VERTEX_STATE_PROGRAM_NV, 1, - strlen(prog), - (const GLubyte *) prog); - assert(glIsProgramNV(1)); - - glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 0, 0, 10, 0, 0); - - glExecuteProgramNV(GL_VERTEX_STATE_PROGRAM_NV, 1, p); - - glGetProgramParameterfvNV(GL_VERTEX_PROGRAM_NV, 2, GL_PROGRAM_PARAMETER_NV, q); - printf("Result c[2] = %g %g %g %g (should be 0, 1, 0, 0.1)\n", - q[0], q[1], q[2], q[3]); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 50, 50 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Test1(); - Test2(); - Test3(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/vptest3.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/vptest3.c deleted file mode 100644 index 2c5c800040..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/vptest3.c +++ /dev/null @@ -1,120 +0,0 @@ -/* Test glGenProgramsNV(), glIsProgramNV(), glLoadProgramNV() */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -static float Zrot = 0.0; - - -static void Display( void ) -{ - glClearColor(0.3, 0.3, 0.3, 1); - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glEnable(GL_VERTEX_PROGRAM_NV); - - glLoadIdentity(); - glRotatef(Zrot, 0, 0, 1); - - glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 0, GL_MODELVIEW, GL_IDENTITY_NV); - glPushMatrix(); - - glVertexAttrib3fNV(3, 1, 0.5, 0.25); - glBegin(GL_TRIANGLES); -#if 1 - glVertexAttrib3fNV(3, 1.0, 0.0, 0.0); - glVertexAttrib2fNV(0, -0.5, -0.5); - glVertexAttrib3fNV(3, 0.0, 1.0, 0.0); - glVertexAttrib2fNV(0, 0.5, -0.5); - glVertexAttrib3fNV(3, 0.0, 0.0, 1.0); - glVertexAttrib2fNV(0, 0, 0.5); -#else - glVertex2f( -1, -1); - glVertex2f( 1, -1); - glVertex2f( 0, 1); -#endif - glEnd(); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - /* glFrustum( -2.0, 2.0, -2.0, 2.0, 5.0, 25.0 );*/ - glOrtho(-2.0, 2.0, -2.0, 2.0, -2.0, 2.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - /*glTranslatef( 0.0, 0.0, -15.0 );*/ -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 'z': - Zrot -= 5.0; - break; - case 'Z': - Zrot += 5.0; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - static const char *prog1 = - "!!VP1.0\n" - "MOV o[COL0], v[COL0];\n" -#if 0 - "MOV o[HPOS], v[OPOS];\n" -#else - "DP4 o[HPOS].x, v[OPOS], c[0];\n" - "DP4 o[HPOS].y, v[OPOS], c[1];\n" - "DP4 o[HPOS].z, v[OPOS], c[2];\n" - "DP4 o[HPOS].w, v[OPOS], c[3];\n" -#endif - "END\n"; - - glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 1, - strlen(prog1), - (const GLubyte *) prog1); - assert(glIsProgramNV(1)); - - glBindProgramNV(GL_VERTEX_PROGRAM_NV, 1); - - printf("glGetError = %d\n", (int) glGetError()); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 250, 250 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutDisplayFunc( Display ); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/vptorus.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/vptorus.c deleted file mode 100644 index 764dea4ec2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/vptorus.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * A lit, rotating torus via vertex program - */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -static float Xrot = 0.0, Yrot = 0.0, Zrot = 0.0; -static GLboolean Anim = GL_TRUE; - - -static void Idle( void ) -{ - Xrot += .3; - Yrot += .4; - Zrot += .2; - glutPostRedisplay(); -} - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - glRotatef(Zrot, 0, 0, 1); - glutSolidTorus(0.75, 2.0, 10, 20); - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -2.0, 2.0, -2.0, 2.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -12.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case ' ': - Xrot = Yrot = Zrot = 0; - break; - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 'z': - Zrot -= 5.0; - break; - case 'Z': - Zrot += 5.0; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - Xrot -= step; - break; - case GLUT_KEY_DOWN: - Xrot += step; - break; - case GLUT_KEY_LEFT: - Yrot -= step; - break; - case GLUT_KEY_RIGHT: - Yrot += step; - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - /* borrowed from an nvidia demo: - * c[0..3] = modelview matrix - * c[4..7] = inverse modelview matrix - * c[32] = light pos - * c[35] = diffuse color - */ - static const char prog[] = - "!!VP1.0\n" - "#Simple transform and diffuse lighting\n" - "\n" - "DP4 o[HPOS].x, c[0], v[OPOS] ; # object x MVP -> clip\n" - "DP4 o[HPOS].y, c[1], v[OPOS] ;\n" - "DP4 o[HPOS].z, c[2], v[OPOS] ;\n" - "DP4 o[HPOS].w, c[3], v[OPOS] ;\n" - - "DP3 R1.x, c[4], v[NRML] ; # normal x MV-1T -> lighting normal\n" - "DP3 R1.y, c[5], v[NRML] ;\n" - "DP3 R1.z, c[6], v[NRML] ;\n" - - "DP3 R0, c[32], R1 ; # L.N\n" - "MUL o[COL0].xyz, R0, c[35] ; # col = L.N * diffuse\n" - "MOV o[TEX0], v[TEX0];\n" - "END"; - - if (!glutExtensionSupported("GL_NV_vertex_program")) { - printf("Sorry, this program requires GL_NV_vertex_program"); - exit(1); - } - - glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 1, - strlen(prog), (const GLubyte *) prog); - assert(glIsProgramNV(1)); - glBindProgramNV(GL_VERTEX_PROGRAM_NV, 1); - - /* Load the program registers */ - glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 0, GL_MODELVIEW_PROJECTION_NV, GL_IDENTITY_NV); - glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 4, GL_MODELVIEW, GL_INVERSE_TRANSPOSE_NV); - - /* Light position */ - glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 32, 2, 2, 4, 1); - /* Diffuse material color */ - glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 35, 0.25, 0, 0.25, 1); - - glEnable(GL_VERTEX_PROGRAM_NV); - glEnable(GL_DEPTH_TEST); - glClearColor(0.3, 0.3, 0.3, 1); - - printf("glGetError = %d\n", (int) glGetError()); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 250, 250 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - if (Anim) - glutIdleFunc(Idle); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/vpwarpmesh.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/vpwarpmesh.c deleted file mode 100644 index 56aa8200ec..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/vpwarpmesh.c +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Warp a triangle mesh with a vertex program. - */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -static float Xrot = -60.0, Yrot = 0.0, Zrot = 0.0; -static GLboolean Anim = GL_TRUE; -static GLfloat Phi = 0.0; - - -static void Idle( void ) -{ - Phi += 0.01; - glutPostRedisplay(); -} - - -static void DrawMesh( int rows, int cols ) -{ - static const GLfloat colorA[3] = { 0, 1, 0 }; - static const GLfloat colorB[3] = { 0, 0, 1 }; - const float dx = 2.0 / (cols - 1); - const float dy = 2.0 / (rows - 1); - float x, y; - int i, j; - -#if 1 -#define COLOR3FV(c) glVertexAttrib3fvNV(3, c) -#define VERTEX2F(x, y) glVertexAttrib2fNV(0, x, y) -#else -#define COLOR3FV(c) glColor3fv(c) -#define VERTEX2F(x, y) glVertex2f(x, y) -#endif - - y = -1.0; - for (i = 0; i < rows - 1; i++) { - glBegin(GL_QUAD_STRIP); - x = -1.0; - for (j = 0; j < cols; j++) { - if ((i + j) & 1) - COLOR3FV(colorA); - else - COLOR3FV(colorB); - VERTEX2F(x, y); - VERTEX2F(x, y + dy); - x += dx; - } - glEnd(); - y += dy; - } -} - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - glRotatef(Zrot, 0, 0, 1); - - /* Position the gravity source */ - { - GLfloat x, y, z, r = 0.5; - x = r * cos(Phi); - y = r * sin(Phi); - z = 1.0; - glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 30, x, y, z, 1); - glDisable(GL_VERTEX_PROGRAM_NV); - glBegin(GL_POINTS); - glColor3f(1,1,1); - glVertex3f(x, y, z); - glEnd(); - } - - glEnable(GL_VERTEX_PROGRAM_NV); - DrawMesh(8, 8); - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - float ar = (float) width / (float) height; - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0 * ar, 1.0 * ar, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -12.0 ); - glScalef(2, 2, 2); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 'p': - Phi += 0.2; - break; - case 'z': - Zrot -= 5.0; - break; - case 'Z': - Zrot += 5.0; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - Xrot -= step; - break; - case GLUT_KEY_DOWN: - Xrot += step; - break; - case GLUT_KEY_LEFT: - Yrot -= step; - break; - case GLUT_KEY_RIGHT: - Yrot += step; - break; - } - glutPostRedisplay(); -} - - -static void Init( void ) -{ - /* - * c[0..3] = modelview matrix - * c[4..7] = inverse modelview matrix - * c[30] = gravity source location - * c[31] = gravity source strength - * c[32] = light pos - * c[35] = diffuse color - */ - static const char prog[] = - "!!VP1.0\n" - - "# Compute distance from vertex to gravity source\n" - "ADD R1, c[30], -v[OPOS]; # vector from vertex to gravity\n" - "DP3 R2, R1, R1; # dot product\n" - "RSQ R2, R2.x; # square root = distance\n" - "MUL R2, R2, c[31].xxxx; # scale by the gravity factor\n" - - "# Displace vertex by gravity factor along R1 vector\n" - "MAD R3, R1, R2, v[OPOS];\n" - - "# Continue with typical modelview/projection\n" - "DP4 o[HPOS].x, c[0], R3 ; # object x MVP -> clip\n" - "DP4 o[HPOS].y, c[1], R3 ;\n" - "DP4 o[HPOS].z, c[2], R3 ;\n" - "DP4 o[HPOS].w, c[3], R3 ;\n" - - "MOV o[COL0], v[COL0];\n # copy input color to output color\n" - - "END"; - - if (!glutExtensionSupported("GL_NV_vertex_program")) { - printf("Sorry, this program requires GL_NV_vertex_program\n"); - exit(1); - } - - glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 1, - strlen(prog), (const GLubyte *) prog); - assert(glIsProgramNV(1)); - glBindProgramNV(GL_VERTEX_PROGRAM_NV, 1); - - /* Load the program registers */ - glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 0, GL_MODELVIEW_PROJECTION_NV, GL_IDENTITY_NV); - glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 4, GL_MODELVIEW, GL_INVERSE_TRANSPOSE_NV); - - /* Light position */ - glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 32, 2, 2, 4, 1); - /* Diffuse material color */ - glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 35, 0.25, 0, 0.25, 1); - - /* Gravity strength */ - glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 31, .5, 0, 0, 0); - - glEnable(GL_DEPTH_TEST); - glClearColor(0.3, 0.3, 0.3, 1); - glShadeModel(GL_FLAT); - glPointSize(3); - printf("glGetError = %d\n", (int) glGetError()); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition( 0, 0 ); - glutInitWindowSize( 250, 250 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); - glutCreateWindow(argv[0]); - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - if (Anim) - glutIdleFunc(Idle); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/yuvrect.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/yuvrect.c deleted file mode 100644 index acef406097..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/yuvrect.c +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Test the GL_NV_texture_rectangle and GL_MESA_ycrcb_texture extensions. - * - * Brian Paul 13 September 2002 - */ - -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -#include "../util/readtex.c" /* I know, this is a hack. */ - -#define TEXTURE_FILE "../images/girl.rgb" - -static GLfloat Xrot = 0, Yrot = 0, Zrot = 0; -static GLint ImgWidth, ImgHeight; -static GLushort *ImageYUV = NULL; - - -static void DrawObject(void) -{ - glBegin(GL_QUADS); - - glTexCoord2f(0, 0); - glVertex2f(-1.0, -1.0); - - glTexCoord2f(ImgWidth, 0); - glVertex2f(1.0, -1.0); - - glTexCoord2f(ImgWidth, ImgHeight); - glVertex2f(1.0, 1.0); - - glTexCoord2f(0, ImgHeight); - glVertex2f(-1.0, 1.0); - - glEnd(); -} - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - DrawObject(); - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 10.0, 100.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - float step = 3.0; - (void) x; - (void) y; - - switch (key) { - case GLUT_KEY_UP: - Xrot += step; - break; - case GLUT_KEY_DOWN: - Xrot -= step; - break; - case GLUT_KEY_LEFT: - Yrot += step; - break; - case GLUT_KEY_RIGHT: - Yrot -= step; - break; - } - glutPostRedisplay(); -} - - - -static void Init( int argc, char *argv[] ) -{ - GLuint texObj = 100; - const char *file; - - if (!glutExtensionSupported("GL_NV_texture_rectangle")) { - printf("Sorry, GL_NV_texture_rectangle is required\n"); - exit(0); - } - - if (!glutExtensionSupported("GL_MESA_ycbcr_texture")) { - printf("Sorry, GL_MESA_ycbcr_texture is required\n"); - exit(0); - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - glBindTexture(GL_TEXTURE_RECTANGLE_NV, texObj); -#ifdef LINEAR_FILTER - /* linear filtering looks much nicer but is much slower for Mesa */ - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -#else - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER, GL_NEAREST); -#endif - - if (argc > 1) - file = argv[1]; - else - file = TEXTURE_FILE; - - ImageYUV = LoadYUVImage(file, &ImgWidth, &ImgHeight); - if (!ImageYUV) { - printf("Couldn't read %s\n", TEXTURE_FILE); - exit(0); - } - - printf("Image: %dx%d\n", ImgWidth, ImgHeight); - - glTexImage2D(GL_TEXTURE_RECTANGLE_NV, 0, - GL_YCBCR_MESA, ImgWidth, ImgHeight, 0, - GL_YCBCR_MESA, GL_UNSIGNED_SHORT_8_8_MESA, ImageYUV); - - assert(glGetError() == GL_NO_ERROR); - glTexSubImage2D(GL_TEXTURE_RECTANGLE_NV, 0, - 0, 0, ImgWidth, ImgHeight, - GL_YCBCR_MESA, GL_UNSIGNED_SHORT_8_8_MESA, ImageYUV); - - assert(glGetError() == GL_NO_ERROR); - - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - - glEnable(GL_TEXTURE_RECTANGLE_NV); - - glShadeModel(GL_FLAT); - glClearColor(0.3, 0.3, 0.4, 1.0); - - if (argc > 1 && strcmp(argv[1], "-info")==0) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowSize( 300, 300 ); - glutInitWindowPosition( 0, 0 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0] ); - - Init( argc, argv ); - - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/yuvsquare.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/yuvsquare.c deleted file mode 100644 index 3601e7a31c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/yuvsquare.c +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Test the GL_NV_texture_rectangle and GL_MESA_ycrcb_texture extensions. - * - * Brian Paul 13 September 2002 - */ - - -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -#include "../util/readtex.c" /* I know, this is a hack. */ - -#define TEXTURE_FILE "../images/tile.rgb" - -static GLfloat Xrot = 0, Yrot = 0, Zrot = 0; -static GLint ImgWidth, ImgHeight; -static GLushort *ImageYUV = NULL; -static GLubyte *ImageRGB = NULL; -static const GLuint yuvObj = 100; -static const GLuint rgbObj = 101; - - -static void DrawObject(void) -{ - glBegin(GL_QUADS); - - glTexCoord2f(0, 0); - glVertex2f(-1.0, -1.0); - - glTexCoord2f(1, 0); - glVertex2f(1.0, -1.0); - - glTexCoord2f(1, 1); - glVertex2f(1.0, 1.0); - - glTexCoord2f(0, 1); - glVertex2f(-1.0, 1.0); - - glEnd(); -} - - -static void Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - glTranslatef( -1.1, 0.0, -15.0 ); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - glBindTexture(GL_TEXTURE_2D, yuvObj); - DrawObject(); - glPopMatrix(); - - glPushMatrix(); - glTranslatef( 1.1, 0.0, -15.0 ); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - glBindTexture(GL_TEXTURE_2D, rgbObj); - DrawObject(); - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.1, 1.1, -1.1, 1.1, 10.0, 100.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - - -static void Key( unsigned char key, int x, int y ) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void SpecialKey( int key, int x, int y ) -{ - float step = 3.0; - (void) x; - (void) y; - - switch (key) { - case GLUT_KEY_UP: - Xrot += step; - break; - case GLUT_KEY_DOWN: - Xrot -= step; - break; - case GLUT_KEY_LEFT: - Yrot += step; - break; - case GLUT_KEY_RIGHT: - Yrot -= step; - break; - } - glutPostRedisplay(); -} - - -#define CLAMP( X, MIN, MAX ) ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) ) - - - -/* #define LINEAR_FILTER */ - -static void Init( int argc, char *argv[] ) -{ - const char *file; - GLenum format; - - if (!glutExtensionSupported("GL_MESA_ycbcr_texture")) { - printf("Sorry, GL_MESA_ycbcr_texture is required\n"); - exit(0); - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - if (argc > 1) - file = argv[1]; - else - file = TEXTURE_FILE; - - /* First load the texture as YCbCr. - */ - - glBindTexture(GL_TEXTURE_2D, yuvObj); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - ImageYUV = LoadYUVImage(file, &ImgWidth, &ImgHeight ); - if (!ImageYUV) { - printf("Couldn't read %s\n", TEXTURE_FILE); - exit(0); - } - - printf("Image: %dx%d\n", ImgWidth, ImgHeight); - - - glTexImage2D(GL_TEXTURE_2D, 0, - GL_YCBCR_MESA, - ImgWidth, ImgHeight, 0, - GL_YCBCR_MESA, - GL_UNSIGNED_SHORT_8_8_MESA, ImageYUV); - - glEnable(GL_TEXTURE_2D); - - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - - - - /* Now load the texture as RGB. - */ - - glBindTexture(GL_TEXTURE_2D, rgbObj); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - ImageRGB = LoadRGBImage(file, &ImgWidth, &ImgHeight, &format ); - if (!ImageRGB) { - printf("Couldn't read %s\n", TEXTURE_FILE); - exit(0); - } - - printf("Image: %dx%d\n", ImgWidth, ImgHeight); - - - glTexImage2D(GL_TEXTURE_2D, 0, - format, - ImgWidth, ImgHeight, 0, - format, - GL_UNSIGNED_BYTE, ImageRGB); - - glEnable(GL_TEXTURE_2D); - - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - - - - glShadeModel(GL_FLAT); - glClearColor(0.3, 0.3, 0.4, 1.0); - - if (argc > 1 && strcmp(argv[1], "-info")==0) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } - - printf( "Both images should appear the same.\n" ); -} - - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowSize( 300, 300 ); - glutInitWindowPosition( 0, 0 ); - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0] ); - - Init( argc, argv ); - - glutReshapeFunc( Reshape ); - glutKeyboardFunc( Key ); - glutSpecialFunc( SpecialKey ); - glutDisplayFunc( Display ); - - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/tests/zreaddraw.c b/nx-X11/extras/Mesa_6.4.2/progs/tests/zreaddraw.c deleted file mode 100644 index e2dacbf7f2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/tests/zreaddraw.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Test glRead/DrawPixels for GL_DEPTH_COMPONENT, with pixelzoom. - * - * Brian Paul - * 23 August 2003 - */ - -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -static GLint WinWidth = 500, WinHeight = 500; - - -static void Display(void) -{ - GLfloat depth[100 * 100]; - GLfloat depth2[400 * 400]; - GLfloat min, max; - int i; - - glClearColor(0.5, 0.5, 0.5, 0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - /* draw a sphere */ - glViewport(0, 0, 100, 100); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-1, 1, -1, 1, -1, 0); /* clip away back half of sphere */ - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glutSolidSphere(1.0, 20, 10); - - /* read the depth image */ - glReadPixels(0, 0, 100, 100, GL_DEPTH_COMPONENT, GL_FLOAT, depth); - min = max = depth[0]; - for (i = 1; i < 100 * 100; i++) { - if (depth[i] < min) - min = depth[i]; - if (depth[i] > max) - max = depth[i]; - } - printf("Depth value range: [%f, %f]\n", min, max); - - /* draw depth image with scaling (into z buffer) */ - glPixelZoom(4.0, 4.0); - glWindowPos2i(100, 0); - glDrawPixels(100, 100, GL_DEPTH_COMPONENT, GL_FLOAT, depth); - - /* read back scaled depth image */ - glReadPixels(100, 0, 400, 400, GL_DEPTH_COMPONENT, GL_FLOAT, depth2); - /* draw as luminance */ - glPixelZoom(1.0, 1.0); - glDrawPixels(400, 400, GL_LUMINANCE, GL_FLOAT, depth2); - - glutSwapBuffers(); -} - - -static void Reshape(int width, int height) -{ - WinWidth = width; - WinHeight = height; - glViewport(0, 0, width, height); -} - - -static void Key(unsigned char key, int x, int y) -{ - (void) x; - (void) y; - switch (key) { - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void Init(void) -{ - const GLfloat blue[4] = {.1, .1, 1.0, 0.0}; - const GLfloat gray[4] = {0.2, 0.2, 0.2, 1.0}; - const GLfloat white[4] = {1.0, 1.0, 1.0, 1.0}; - const GLfloat pos[4] = {0, 0, 10, 0}; - - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - - glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, blue); - glLightfv(GL_LIGHT0, GL_AMBIENT, gray); - glLightfv(GL_LIGHT0, GL_DIFFUSE, white); - glLightfv(GL_LIGHT0, GL_POSITION, pos); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); -} - - -int main(int argc, char *argv[]) -{ - glutInit(&argc, argv); - glutInitWindowPosition(0, 0); - glutInitWindowSize(WinWidth, WinHeight); - glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); - glutCreateWindow(argv[0]); - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Display); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/README b/nx-X11/extras/Mesa_6.4.2/progs/util/README deleted file mode 100644 index ca89d34bd3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/README +++ /dev/null @@ -1,22 +0,0 @@ - -This directory is a collection of function which may be useful to -OpenGL/Mesa programmers. - - -errcheck.c - an OpenGL error check/report function -glutskel.c - handy skeleton for GLUT programs -idproj.c - setup an identity projection -mwmborder.c - remove Motif window decoration/border -winpos.c - set absolute window raster position -readtex.c - load textures/mipmaps from an .rgb file -showbuffer.[ch] - show depth, alpha, or stencil buffer contents -glstate.[ch] - query/print GL state variables, for debugging, etc. -sampleMakefile - example Makefile for making OpenGL/Mesa apps on Unix -dumpsate.c - dump all OpenGL state, from Stephane Rehel -imagesgi.cpp,.h - read SGI image files - - -more to come... - ----------------------------------------------------------------------- -$Id: README,v 1.1 1999/08/19 00:55:42 jtg Exp $ diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/descrip.mms b/nx-X11/extras/Mesa_6.4.2/progs/util/descrip.mms deleted file mode 100644 index 41b1248157..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/descrip.mms +++ /dev/null @@ -1,42 +0,0 @@ -# Makefile for GLUT-based demo programs for VMS -# contributed by Jouk Jansen joukj@crys.chem.uva.nl - - -.first - define gl [--.include.gl] - -.include [--]mms-config. - -##### MACROS ##### - -INCDIR = ([--.include],[-.util]) -CFLAGS = /include=$(INCDIR)/prefix=all/name=(as_is,short) - -.ifdef SHARE -GL_LIBS = $(XLIBS) -LIB_DEP = [--.lib]$(GL_SHAR) [--.lib]$(GLU_SHAR) [--.lib]$(GLUT_SHAR) -.else -GL_LIBS = [--.lib]libGLUT/l,libMesaGLU/l,libMesaGL/l,$(XLIBS) -LIB_DEP = [--.lib]$(GL_LIB) [--.lib]$(GLU_LIB) [--.lib]$(GLUT_LIB) -.endif - - -OBJS =readtex.obj,showbuffer.obj - - -##### RULES ##### -.obj.exe : - cxxlink $(MMS$TARGET_NAME),$(GL_LIBS) - -##### TARGETS ##### -default : - $(MMS)$(MMSQUALIFIERS) $(OBJS) - -clean : - delete *.obj;* - -realclean : - delete *.obj;* - -readtex.obj : readtex.c -showbuffer.obj : showbuffer.c diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/dumpstate.c b/nx-X11/extras/Mesa_6.4.2/progs/util/dumpstate.c deleted file mode 100644 index 4c039a40f9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/dumpstate.c +++ /dev/null @@ -1,1959 +0,0 @@ - -/* - * - * From: Stephane Rehel - * Date: Mon, 31 May 1999 18:40:54 -0400 - * To: Paul Brian - * Subject: OpenGL State Dump Function - * - * Here is a function that dumps the current OpenGL state. I wrote it - * some time ago. - * - * In the attachment: - * + the code itself - * + its output - * - * I think Mesa is wrong on some getBooleanv(). For example, GL_VERTEX_ARRAY - * is queried by IsEnabled() (cf. p. 196 of the spec). But on page 193 - * we can read that all the boolean attribs that can be queried by IsEnabled() - * can also be queried by IsEnabled(). - * - * I had duplicated all the enums (LOCAL_*) so that the code can run on any - * OpenGL version, even if an enum is not recognized. - * - * The code can be shipped in the public domain. - * - * Stephane. - */ - - -/* - * Stephane Rehel - * Creation: February 5 1999 - */ - -#include -#include - -/***************************************************************************/ - -enum { - /* Data types */ - LOCAL_GL_BYTE = 0x1400, - LOCAL_GL_UNSIGNED_BYTE = 0x1401, - LOCAL_GL_SHORT = 0x1402, - LOCAL_GL_UNSIGNED_SHORT = 0x1403, - LOCAL_GL_INT = 0x1404, - LOCAL_GL_UNSIGNED_INT = 0x1405, - LOCAL_GL_FLOAT = 0x1406, - LOCAL_GL_DOUBLE = 0x140A, - LOCAL_GL_2_BYTES = 0x1407, - LOCAL_GL_3_BYTES = 0x1408, - LOCAL_GL_4_BYTES = 0x1409, - - /* Primitives */ - LOCAL_GL_LINES = 0x0001, - LOCAL_GL_POINTS = 0x0000, - LOCAL_GL_LINE_STRIP = 0x0003, - LOCAL_GL_LINE_LOOP = 0x0002, - LOCAL_GL_TRIANGLES = 0x0004, - LOCAL_GL_TRIANGLE_STRIP = 0x0005, - LOCAL_GL_TRIANGLE_FAN = 0x0006, - LOCAL_GL_QUADS = 0x0007, - LOCAL_GL_QUAD_STRIP = 0x0008, - LOCAL_GL_POLYGON = 0x0009, - LOCAL_GL_EDGE_FLAG = 0x0B43, - - /* Vertex Arrays */ - LOCAL_GL_VERTEX_ARRAY = 0x8074, - LOCAL_GL_NORMAL_ARRAY = 0x8075, - LOCAL_GL_COLOR_ARRAY = 0x8076, - LOCAL_GL_INDEX_ARRAY = 0x8077, - LOCAL_GL_TEXTURE_COORD_ARRAY = 0x8078, - LOCAL_GL_EDGE_FLAG_ARRAY = 0x8079, - LOCAL_GL_VERTEX_ARRAY_SIZE = 0x807A, - LOCAL_GL_VERTEX_ARRAY_TYPE = 0x807B, - LOCAL_GL_VERTEX_ARRAY_STRIDE = 0x807C, - LOCAL_GL_NORMAL_ARRAY_TYPE = 0x807E, - LOCAL_GL_NORMAL_ARRAY_STRIDE = 0x807F, - LOCAL_GL_COLOR_ARRAY_SIZE = 0x8081, - LOCAL_GL_COLOR_ARRAY_TYPE = 0x8082, - LOCAL_GL_COLOR_ARRAY_STRIDE = 0x8083, - LOCAL_GL_INDEX_ARRAY_TYPE = 0x8085, - LOCAL_GL_INDEX_ARRAY_STRIDE = 0x8086, - LOCAL_GL_TEXTURE_COORD_ARRAY_SIZE = 0x8088, - LOCAL_GL_TEXTURE_COORD_ARRAY_TYPE = 0x8089, - LOCAL_GL_TEXTURE_COORD_ARRAY_STRIDE = 0x808A, - LOCAL_GL_EDGE_FLAG_ARRAY_STRIDE = 0x808C, - LOCAL_GL_VERTEX_ARRAY_POINTER = 0x808E, - LOCAL_GL_NORMAL_ARRAY_POINTER = 0x808F, - LOCAL_GL_COLOR_ARRAY_POINTER = 0x8090, - LOCAL_GL_INDEX_ARRAY_POINTER = 0x8091, - LOCAL_GL_TEXTURE_COORD_ARRAY_POINTER = 0x8092, - LOCAL_GL_EDGE_FLAG_ARRAY_POINTER = 0x8093, - LOCAL_GL_V2F = 0x2A20, - LOCAL_GL_V3F = 0x2A21, - LOCAL_GL_C4UB_V2F = 0x2A22, - LOCAL_GL_C4UB_V3F = 0x2A23, - LOCAL_GL_C3F_V3F = 0x2A24, - LOCAL_GL_N3F_V3F = 0x2A25, - LOCAL_GL_C4F_N3F_V3F = 0x2A26, - LOCAL_GL_T2F_V3F = 0x2A27, - LOCAL_GL_T4F_V4F = 0x2A28, - LOCAL_GL_T2F_C4UB_V3F = 0x2A29, - LOCAL_GL_T2F_C3F_V3F = 0x2A2A, - LOCAL_GL_T2F_N3F_V3F = 0x2A2B, - LOCAL_GL_T2F_C4F_N3F_V3F = 0x2A2C, - LOCAL_GL_T4F_C4F_N3F_V4F = 0x2A2D, - - /* Matrix Mode */ - LOCAL_GL_MATRIX_MODE = 0x0BA0, - LOCAL_GL_MODELVIEW = 0x1700, - LOCAL_GL_PROJECTION = 0x1701, - LOCAL_GL_TEXTURE = 0x1702, - - /* Points */ - LOCAL_GL_POINT_SMOOTH = 0x0B10, - LOCAL_GL_POINT_SIZE = 0x0B11, - LOCAL_GL_POINT_SIZE_GRANULARITY = 0x0B13, - LOCAL_GL_POINT_SIZE_RANGE = 0x0B12, - - /* Lines */ - LOCAL_GL_LINE_SMOOTH = 0x0B20, - LOCAL_GL_LINE_STIPPLE = 0x0B24, - LOCAL_GL_LINE_STIPPLE_PATTERN = 0x0B25, - LOCAL_GL_LINE_STIPPLE_REPEAT = 0x0B26, - LOCAL_GL_LINE_WIDTH = 0x0B21, - LOCAL_GL_LINE_WIDTH_GRANULARITY = 0x0B23, - LOCAL_GL_LINE_WIDTH_RANGE = 0x0B22, - - /* Polygons */ - LOCAL_GL_POINT = 0x1B00, - LOCAL_GL_LINE = 0x1B01, - LOCAL_GL_FILL = 0x1B02, - LOCAL_GL_CCW = 0x0901, - LOCAL_GL_CW = 0x0900, - LOCAL_GL_FRONT = 0x0404, - LOCAL_GL_BACK = 0x0405, - LOCAL_GL_CULL_FACE = 0x0B44, - LOCAL_GL_CULL_FACE_MODE = 0x0B45, - LOCAL_GL_POLYGON_SMOOTH = 0x0B41, - LOCAL_GL_POLYGON_STIPPLE = 0x0B42, - LOCAL_GL_FRONT_FACE = 0x0B46, - LOCAL_GL_POLYGON_MODE = 0x0B40, - LOCAL_GL_POLYGON_OFFSET_FACTOR = 0x8038, - LOCAL_GL_POLYGON_OFFSET_UNITS = 0x2A00, - LOCAL_GL_POLYGON_OFFSET_POINT = 0x2A01, - LOCAL_GL_POLYGON_OFFSET_LINE = 0x2A02, - LOCAL_GL_POLYGON_OFFSET_FILL = 0x8037, - - /* Display Lists */ - LOCAL_GL_COMPILE = 0x1300, - LOCAL_GL_COMPILE_AND_EXECUTE = 0x1301, - LOCAL_GL_LIST_BASE = 0x0B32, - LOCAL_GL_LIST_INDEX = 0x0B33, - LOCAL_GL_LIST_MODE = 0x0B30, - - /* Depth buffer */ - LOCAL_GL_NEVER = 0x0200, - LOCAL_GL_LESS = 0x0201, - LOCAL_GL_GEQUAL = 0x0206, - LOCAL_GL_LEQUAL = 0x0203, - LOCAL_GL_GREATER = 0x0204, - LOCAL_GL_NOTEQUAL = 0x0205, - LOCAL_GL_EQUAL = 0x0202, - LOCAL_GL_ALWAYS = 0x0207, - LOCAL_GL_DEPTH_TEST = 0x0B71, - LOCAL_GL_DEPTH_BITS = 0x0D56, - LOCAL_GL_DEPTH_CLEAR_VALUE = 0x0B73, - LOCAL_GL_DEPTH_FUNC = 0x0B74, - LOCAL_GL_DEPTH_RANGE = 0x0B70, - LOCAL_GL_DEPTH_WRITEMASK = 0x0B72, - LOCAL_GL_DEPTH_COMPONENT = 0x1902, - - /* Lighting */ - LOCAL_GL_LIGHTING = 0x0B50, - LOCAL_GL_LIGHT0 = 0x4000, - LOCAL_GL_LIGHT1 = 0x4001, - LOCAL_GL_LIGHT2 = 0x4002, - LOCAL_GL_LIGHT3 = 0x4003, - LOCAL_GL_LIGHT4 = 0x4004, - LOCAL_GL_LIGHT5 = 0x4005, - LOCAL_GL_LIGHT6 = 0x4006, - LOCAL_GL_LIGHT7 = 0x4007, - LOCAL_GL_SPOT_EXPONENT = 0x1205, - LOCAL_GL_SPOT_CUTOFF = 0x1206, - LOCAL_GL_CONSTANT_ATTENUATION = 0x1207, - LOCAL_GL_LINEAR_ATTENUATION = 0x1208, - LOCAL_GL_QUADRATIC_ATTENUATION = 0x1209, - LOCAL_GL_AMBIENT = 0x1200, - LOCAL_GL_DIFFUSE = 0x1201, - LOCAL_GL_SPECULAR = 0x1202, - LOCAL_GL_SHININESS = 0x1601, - LOCAL_GL_EMISSION = 0x1600, - LOCAL_GL_POSITION = 0x1203, - LOCAL_GL_SPOT_DIRECTION = 0x1204, - LOCAL_GL_AMBIENT_AND_DIFFUSE = 0x1602, - LOCAL_GL_COLOR_INDEXES = 0x1603, - LOCAL_GL_LIGHT_MODEL_TWO_SIDE = 0x0B52, - LOCAL_GL_LIGHT_MODEL_LOCAL_VIEWER = 0x0B51, - LOCAL_GL_LIGHT_MODEL_AMBIENT = 0x0B53, - LOCAL_GL_FRONT_AND_BACK = 0x0408, - LOCAL_GL_SHADE_MODEL = 0x0B54, - LOCAL_GL_FLAT = 0x1D00, - LOCAL_GL_SMOOTH = 0x1D01, - LOCAL_GL_COLOR_MATERIAL = 0x0B57, - LOCAL_GL_COLOR_MATERIAL_FACE = 0x0B55, - LOCAL_GL_COLOR_MATERIAL_PARAMETER = 0x0B56, - LOCAL_GL_NORMALIZE = 0x0BA1, - - /* User clipping planes */ - LOCAL_GL_CLIP_PLANE0 = 0x3000, - LOCAL_GL_CLIP_PLANE1 = 0x3001, - LOCAL_GL_CLIP_PLANE2 = 0x3002, - LOCAL_GL_CLIP_PLANE3 = 0x3003, - LOCAL_GL_CLIP_PLANE4 = 0x3004, - LOCAL_GL_CLIP_PLANE5 = 0x3005, - - /* Accumulation buffer */ - LOCAL_GL_ACCUM_RED_BITS = 0x0D58, - LOCAL_GL_ACCUM_GREEN_BITS = 0x0D59, - LOCAL_GL_ACCUM_BLUE_BITS = 0x0D5A, - LOCAL_GL_ACCUM_ALPHA_BITS = 0x0D5B, - LOCAL_GL_ACCUM_CLEAR_VALUE = 0x0B80, - LOCAL_GL_ACCUM = 0x0100, - LOCAL_GL_ADD = 0x0104, - LOCAL_GL_LOAD = 0x0101, - LOCAL_GL_MULT = 0x0103, - LOCAL_GL_RETURN = 0x0102, - - /* Alpha testing */ - LOCAL_GL_ALPHA_TEST = 0x0BC0, - LOCAL_GL_ALPHA_TEST_REF = 0x0BC2, - LOCAL_GL_ALPHA_TEST_FUNC = 0x0BC1, - - /* Blending */ - LOCAL_GL_BLEND = 0x0BE2, - LOCAL_GL_BLEND_SRC = 0x0BE1, - LOCAL_GL_BLEND_DST = 0x0BE0, - LOCAL_GL_ZERO = 0, - LOCAL_GL_ONE = 1, - LOCAL_GL_SRC_COLOR = 0x0300, - LOCAL_GL_ONE_MINUS_SRC_COLOR = 0x0301, - LOCAL_GL_DST_COLOR = 0x0306, - LOCAL_GL_ONE_MINUS_DST_COLOR = 0x0307, - LOCAL_GL_SRC_ALPHA = 0x0302, - LOCAL_GL_ONE_MINUS_SRC_ALPHA = 0x0303, - LOCAL_GL_DST_ALPHA = 0x0304, - LOCAL_GL_ONE_MINUS_DST_ALPHA = 0x0305, - LOCAL_GL_SRC_ALPHA_SATURATE = 0x0308, - LOCAL_GL_CONSTANT_COLOR = 0x8001, - LOCAL_GL_ONE_MINUS_CONSTANT_COLOR = 0x8002, - LOCAL_GL_CONSTANT_ALPHA = 0x8003, - LOCAL_GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004, - - /* Render Mode */ - LOCAL_GL_FEEDBACK = 0x1C01, - LOCAL_GL_RENDER = 0x1C00, - LOCAL_GL_SELECT = 0x1C02, - - /* Feedback */ - LOCAL_GL_2D = 0x0600, - LOCAL_GL_3D = 0x0601, - LOCAL_GL_3D_COLOR = 0x0602, - LOCAL_GL_3D_COLOR_TEXTURE = 0x0603, - LOCAL_GL_4D_COLOR_TEXTURE = 0x0604, - LOCAL_GL_POINT_TOKEN = 0x0701, - LOCAL_GL_LINE_TOKEN = 0x0702, - LOCAL_GL_LINE_RESET_TOKEN = 0x0707, - LOCAL_GL_POLYGON_TOKEN = 0x0703, - LOCAL_GL_BITMAP_TOKEN = 0x0704, - LOCAL_GL_DRAW_PIXEL_TOKEN = 0x0705, - LOCAL_GL_COPY_PIXEL_TOKEN = 0x0706, - LOCAL_GL_PASS_THROUGH_TOKEN = 0x0700, - LOCAL_GL_FEEDBACK_BUFFER_POINTER = 0x0DF0, - LOCAL_GL_FEEDBACK_BUFFER_SIZE = 0x0DF1, - LOCAL_GL_FEEDBACK_BUFFER_TYPE = 0x0DF2, - - /* Selection */ - LOCAL_GL_SELECTION_BUFFER_POINTER = 0x0DF3, - LOCAL_GL_SELECTION_BUFFER_SIZE = 0x0DF4, - - /* Fog */ - LOCAL_GL_FOG = 0x0B60, - LOCAL_GL_FOG_MODE = 0x0B65, - LOCAL_GL_FOG_DENSITY = 0x0B62, - LOCAL_GL_FOG_COLOR = 0x0B66, - LOCAL_GL_FOG_INDEX = 0x0B61, - LOCAL_GL_FOG_START = 0x0B63, - LOCAL_GL_FOG_END = 0x0B64, - LOCAL_GL_LINEAR = 0x2601, - LOCAL_GL_EXP = 0x0800, - LOCAL_GL_EXP2 = 0x0801, - - /* Logic Ops */ - LOCAL_GL_LOGIC_OP = 0x0BF1, - LOCAL_GL_INDEX_LOGIC_OP = 0x0BF1, - LOCAL_GL_COLOR_LOGIC_OP = 0x0BF2, - LOCAL_GL_LOGIC_OP_MODE = 0x0BF0, - LOCAL_GL_CLEAR = 0x1500, - LOCAL_GL_SET = 0x150F, - LOCAL_GL_COPY = 0x1503, - LOCAL_GL_COPY_INVERTED = 0x150C, - LOCAL_GL_NOOP = 0x1505, - LOCAL_GL_INVERT = 0x150A, - LOCAL_GL_AND = 0x1501, - LOCAL_GL_NAND = 0x150E, - LOCAL_GL_OR = 0x1507, - LOCAL_GL_NOR = 0x1508, - LOCAL_GL_XOR = 0x1506, - LOCAL_GL_EQUIV = 0x1509, - LOCAL_GL_AND_REVERSE = 0x1502, - LOCAL_GL_AND_INVERTED = 0x1504, - LOCAL_GL_OR_REVERSE = 0x150B, - LOCAL_GL_OR_INVERTED = 0x150D, - - /* Stencil */ - LOCAL_GL_STENCIL_TEST = 0x0B90, - LOCAL_GL_STENCIL_WRITEMASK = 0x0B98, - LOCAL_GL_STENCIL_BITS = 0x0D57, - LOCAL_GL_STENCIL_FUNC = 0x0B92, - LOCAL_GL_STENCIL_VALUE_MASK = 0x0B93, - LOCAL_GL_STENCIL_REF = 0x0B97, - LOCAL_GL_STENCIL_FAIL = 0x0B94, - LOCAL_GL_STENCIL_PASS_DEPTH_PASS = 0x0B96, - LOCAL_GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95, - LOCAL_GL_STENCIL_CLEAR_VALUE = 0x0B91, - LOCAL_GL_STENCIL_INDEX = 0x1901, - LOCAL_GL_KEEP = 0x1E00, - LOCAL_GL_REPLACE = 0x1E01, - LOCAL_GL_INCR = 0x1E02, - LOCAL_GL_DECR = 0x1E03, - - /* Buffers, Pixel Drawing/Reading */ - LOCAL_GL_NONE = 0, - LOCAL_GL_LEFT = 0x0406, - LOCAL_GL_RIGHT = 0x0407, - /*LOCAL_GL_FRONT = 0x0404, */ - /*LOCAL_GL_BACK = 0x0405, */ - /*LOCAL_GL_FRONT_AND_BACK = 0x0408, */ - LOCAL_GL_FRONT_LEFT = 0x0400, - LOCAL_GL_FRONT_RIGHT = 0x0401, - LOCAL_GL_BACK_LEFT = 0x0402, - LOCAL_GL_BACK_RIGHT = 0x0403, - LOCAL_GL_AUX0 = 0x0409, - LOCAL_GL_AUX1 = 0x040A, - LOCAL_GL_AUX2 = 0x040B, - LOCAL_GL_AUX3 = 0x040C, - LOCAL_GL_COLOR_INDEX = 0x1900, - LOCAL_GL_RED = 0x1903, - LOCAL_GL_GREEN = 0x1904, - LOCAL_GL_BLUE = 0x1905, - LOCAL_GL_ALPHA = 0x1906, - LOCAL_GL_LUMINANCE = 0x1909, - LOCAL_GL_LUMINANCE_ALPHA = 0x190A, - LOCAL_GL_ALPHA_BITS = 0x0D55, - LOCAL_GL_RED_BITS = 0x0D52, - LOCAL_GL_GREEN_BITS = 0x0D53, - LOCAL_GL_BLUE_BITS = 0x0D54, - LOCAL_GL_INDEX_BITS = 0x0D51, - LOCAL_GL_SUBPIXEL_BITS = 0x0D50, - LOCAL_GL_AUX_BUFFERS = 0x0C00, - LOCAL_GL_READ_BUFFER = 0x0C02, - LOCAL_GL_DRAW_BUFFER = 0x0C01, - LOCAL_GL_DOUBLEBUFFER = 0x0C32, - LOCAL_GL_STEREO = 0x0C33, - LOCAL_GL_BITMAP = 0x1A00, - LOCAL_GL_COLOR = 0x1800, - LOCAL_GL_DEPTH = 0x1801, - LOCAL_GL_STENCIL = 0x1802, - LOCAL_GL_DITHER = 0x0BD0, - LOCAL_GL_RGB = 0x1907, - LOCAL_GL_RGBA = 0x1908, - - /* Implementation limits */ - LOCAL_GL_MAX_LIST_NESTING = 0x0B31, - LOCAL_GL_MAX_ATTRIB_STACK_DEPTH = 0x0D35, - LOCAL_GL_MAX_MODELVIEW_STACK_DEPTH = 0x0D36, - LOCAL_GL_MAX_NAME_STACK_DEPTH = 0x0D37, - LOCAL_GL_MAX_PROJECTION_STACK_DEPTH = 0x0D38, - LOCAL_GL_MAX_TEXTURE_STACK_DEPTH = 0x0D39, - LOCAL_GL_MAX_EVAL_ORDER = 0x0D30, - LOCAL_GL_MAX_LIGHTS = 0x0D31, - LOCAL_GL_MAX_CLIP_PLANES = 0x0D32, - LOCAL_GL_MAX_TEXTURE_SIZE = 0x0D33, - LOCAL_GL_MAX_PIXEL_MAP_TABLE = 0x0D34, - LOCAL_GL_MAX_VIEWPORT_DIMS = 0x0D3A, - LOCAL_GL_MAX_CLIENT_ATTRIB_STACK_DEPTH= 0x0D3B, - - /* Gets */ - LOCAL_GL_ATTRIB_STACK_DEPTH = 0x0BB0, - LOCAL_GL_CLIENT_ATTRIB_STACK_DEPTH = 0x0BB1, - LOCAL_GL_COLOR_CLEAR_VALUE = 0x0C22, - LOCAL_GL_COLOR_WRITEMASK = 0x0C23, - LOCAL_GL_CURRENT_INDEX = 0x0B01, - LOCAL_GL_CURRENT_COLOR = 0x0B00, - LOCAL_GL_CURRENT_NORMAL = 0x0B02, - LOCAL_GL_CURRENT_RASTER_COLOR = 0x0B04, - LOCAL_GL_CURRENT_RASTER_DISTANCE = 0x0B09, - LOCAL_GL_CURRENT_RASTER_INDEX = 0x0B05, - LOCAL_GL_CURRENT_RASTER_POSITION = 0x0B07, - LOCAL_GL_CURRENT_RASTER_TEXTURE_COORDS = 0x0B06, - LOCAL_GL_CURRENT_RASTER_POSITION_VALID = 0x0B08, - LOCAL_GL_CURRENT_TEXTURE_COORDS = 0x0B03, - LOCAL_GL_INDEX_CLEAR_VALUE = 0x0C20, - LOCAL_GL_INDEX_MODE = 0x0C30, - LOCAL_GL_INDEX_WRITEMASK = 0x0C21, - LOCAL_GL_MODELVIEW_MATRIX = 0x0BA6, - LOCAL_GL_MODELVIEW_STACK_DEPTH = 0x0BA3, - LOCAL_GL_NAME_STACK_DEPTH = 0x0D70, - LOCAL_GL_PROJECTION_MATRIX = 0x0BA7, - LOCAL_GL_PROJECTION_STACK_DEPTH = 0x0BA4, - LOCAL_GL_RENDER_MODE = 0x0C40, - LOCAL_GL_RGBA_MODE = 0x0C31, - LOCAL_GL_TEXTURE_MATRIX = 0x0BA8, - LOCAL_GL_TEXTURE_STACK_DEPTH = 0x0BA5, - LOCAL_GL_VIEWPORT = 0x0BA2, - - - /* Evaluators */ - LOCAL_GL_AUTO_NORMAL = 0x0D80, - LOCAL_GL_MAP1_COLOR_4 = 0x0D90, - LOCAL_GL_MAP1_GRID_DOMAIN = 0x0DD0, - LOCAL_GL_MAP1_GRID_SEGMENTS = 0x0DD1, - LOCAL_GL_MAP1_INDEX = 0x0D91, - LOCAL_GL_MAP1_NORMAL = 0x0D92, - LOCAL_GL_MAP1_TEXTURE_COORD_1 = 0x0D93, - LOCAL_GL_MAP1_TEXTURE_COORD_2 = 0x0D94, - LOCAL_GL_MAP1_TEXTURE_COORD_3 = 0x0D95, - LOCAL_GL_MAP1_TEXTURE_COORD_4 = 0x0D96, - LOCAL_GL_MAP1_VERTEX_3 = 0x0D97, - LOCAL_GL_MAP1_VERTEX_4 = 0x0D98, - LOCAL_GL_MAP2_COLOR_4 = 0x0DB0, - LOCAL_GL_MAP2_GRID_DOMAIN = 0x0DD2, - LOCAL_GL_MAP2_GRID_SEGMENTS = 0x0DD3, - LOCAL_GL_MAP2_INDEX = 0x0DB1, - LOCAL_GL_MAP2_NORMAL = 0x0DB2, - LOCAL_GL_MAP2_TEXTURE_COORD_1 = 0x0DB3, - LOCAL_GL_MAP2_TEXTURE_COORD_2 = 0x0DB4, - LOCAL_GL_MAP2_TEXTURE_COORD_3 = 0x0DB5, - LOCAL_GL_MAP2_TEXTURE_COORD_4 = 0x0DB6, - LOCAL_GL_MAP2_VERTEX_3 = 0x0DB7, - LOCAL_GL_MAP2_VERTEX_4 = 0x0DB8, - LOCAL_GL_COEFF = 0x0A00, - LOCAL_GL_DOMAIN = 0x0A02, - LOCAL_GL_ORDER = 0x0A01, - - /* Hints */ - LOCAL_GL_FOG_HINT = 0x0C54, - LOCAL_GL_LINE_SMOOTH_HINT = 0x0C52, - LOCAL_GL_PERSPECTIVE_CORRECTION_HINT = 0x0C50, - LOCAL_GL_POINT_SMOOTH_HINT = 0x0C51, - LOCAL_GL_POLYGON_SMOOTH_HINT = 0x0C53, - LOCAL_GL_DONT_CARE = 0x1100, - LOCAL_GL_FASTEST = 0x1101, - LOCAL_GL_NICEST = 0x1102, - - /* Scissor box */ - LOCAL_GL_SCISSOR_TEST = 0x0C11, - LOCAL_GL_SCISSOR_BOX = 0x0C10, - - /* Pixel Mode / Transfer */ - LOCAL_GL_MAP_COLOR = 0x0D10, - LOCAL_GL_MAP_STENCIL = 0x0D11, - LOCAL_GL_INDEX_SHIFT = 0x0D12, - LOCAL_GL_INDEX_OFFSET = 0x0D13, - LOCAL_GL_RED_SCALE = 0x0D14, - LOCAL_GL_RED_BIAS = 0x0D15, - LOCAL_GL_GREEN_SCALE = 0x0D18, - LOCAL_GL_GREEN_BIAS = 0x0D19, - LOCAL_GL_BLUE_SCALE = 0x0D1A, - LOCAL_GL_BLUE_BIAS = 0x0D1B, - LOCAL_GL_ALPHA_SCALE = 0x0D1C, - LOCAL_GL_ALPHA_BIAS = 0x0D1D, - LOCAL_GL_DEPTH_SCALE = 0x0D1E, - LOCAL_GL_DEPTH_BIAS = 0x0D1F, - LOCAL_GL_PIXEL_MAP_S_TO_S_SIZE = 0x0CB1, - LOCAL_GL_PIXEL_MAP_I_TO_I_SIZE = 0x0CB0, - LOCAL_GL_PIXEL_MAP_I_TO_R_SIZE = 0x0CB2, - LOCAL_GL_PIXEL_MAP_I_TO_G_SIZE = 0x0CB3, - LOCAL_GL_PIXEL_MAP_I_TO_B_SIZE = 0x0CB4, - LOCAL_GL_PIXEL_MAP_I_TO_A_SIZE = 0x0CB5, - LOCAL_GL_PIXEL_MAP_R_TO_R_SIZE = 0x0CB6, - LOCAL_GL_PIXEL_MAP_G_TO_G_SIZE = 0x0CB7, - LOCAL_GL_PIXEL_MAP_B_TO_B_SIZE = 0x0CB8, - LOCAL_GL_PIXEL_MAP_A_TO_A_SIZE = 0x0CB9, - LOCAL_GL_PIXEL_MAP_S_TO_S = 0x0C71, - LOCAL_GL_PIXEL_MAP_I_TO_I = 0x0C70, - LOCAL_GL_PIXEL_MAP_I_TO_R = 0x0C72, - LOCAL_GL_PIXEL_MAP_I_TO_G = 0x0C73, - LOCAL_GL_PIXEL_MAP_I_TO_B = 0x0C74, - LOCAL_GL_PIXEL_MAP_I_TO_A = 0x0C75, - LOCAL_GL_PIXEL_MAP_R_TO_R = 0x0C76, - LOCAL_GL_PIXEL_MAP_G_TO_G = 0x0C77, - LOCAL_GL_PIXEL_MAP_B_TO_B = 0x0C78, - LOCAL_GL_PIXEL_MAP_A_TO_A = 0x0C79, - LOCAL_GL_PACK_ALIGNMENT = 0x0D05, - LOCAL_GL_PACK_LSB_FIRST = 0x0D01, - LOCAL_GL_PACK_ROW_LENGTH = 0x0D02, - LOCAL_GL_PACK_SKIP_PIXELS = 0x0D04, - LOCAL_GL_PACK_SKIP_ROWS = 0x0D03, - LOCAL_GL_PACK_SWAP_BYTES = 0x0D00, - LOCAL_GL_UNPACK_ALIGNMENT = 0x0CF5, - LOCAL_GL_UNPACK_LSB_FIRST = 0x0CF1, - LOCAL_GL_UNPACK_ROW_LENGTH = 0x0CF2, - LOCAL_GL_UNPACK_SKIP_PIXELS = 0x0CF4, - LOCAL_GL_UNPACK_SKIP_ROWS = 0x0CF3, - LOCAL_GL_UNPACK_SWAP_BYTES = 0x0CF0, - LOCAL_GL_ZOOM_X = 0x0D16, - LOCAL_GL_ZOOM_Y = 0x0D17, - - /* Texture mapping */ - LOCAL_GL_TEXTURE_ENV = 0x2300, - LOCAL_GL_TEXTURE_ENV_MODE = 0x2200, - LOCAL_GL_TEXTURE_1D = 0x0DE0, - LOCAL_GL_TEXTURE_2D = 0x0DE1, - LOCAL_GL_TEXTURE_WRAP_S = 0x2802, - LOCAL_GL_TEXTURE_WRAP_T = 0x2803, - LOCAL_GL_TEXTURE_MAG_FILTER = 0x2800, - LOCAL_GL_TEXTURE_MIN_FILTER = 0x2801, - LOCAL_GL_TEXTURE_ENV_COLOR = 0x2201, - LOCAL_GL_TEXTURE_GEN_S = 0x0C60, - LOCAL_GL_TEXTURE_GEN_T = 0x0C61, - LOCAL_GL_TEXTURE_GEN_MODE = 0x2500, - LOCAL_GL_TEXTURE_BORDER_COLOR = 0x1004, - LOCAL_GL_TEXTURE_WIDTH = 0x1000, - LOCAL_GL_TEXTURE_HEIGHT = 0x1001, - LOCAL_GL_TEXTURE_BORDER = 0x1005, - LOCAL_GL_TEXTURE_COMPONENTS = 0x1003, - LOCAL_GL_TEXTURE_RED_SIZE = 0x805C, - LOCAL_GL_TEXTURE_GREEN_SIZE = 0x805D, - LOCAL_GL_TEXTURE_BLUE_SIZE = 0x805E, - LOCAL_GL_TEXTURE_ALPHA_SIZE = 0x805F, - LOCAL_GL_TEXTURE_LUMINANCE_SIZE = 0x8060, - LOCAL_GL_TEXTURE_INTENSITY_SIZE = 0x8061, - LOCAL_GL_NEAREST_MIPMAP_NEAREST = 0x2700, - LOCAL_GL_NEAREST_MIPMAP_LINEAR = 0x2702, - LOCAL_GL_LINEAR_MIPMAP_NEAREST = 0x2701, - LOCAL_GL_LINEAR_MIPMAP_LINEAR = 0x2703, - LOCAL_GL_OBJECT_LINEAR = 0x2401, - LOCAL_GL_OBJECT_PLANE = 0x2501, - LOCAL_GL_EYE_LINEAR = 0x2400, - LOCAL_GL_EYE_PLANE = 0x2502, - LOCAL_GL_SPHERE_MAP = 0x2402, - LOCAL_GL_DECAL = 0x2101, - LOCAL_GL_MODULATE = 0x2100, - LOCAL_GL_NEAREST = 0x2600, - LOCAL_GL_REPEAT = 0x2901, - LOCAL_GL_CLAMP = 0x2900, - LOCAL_GL_S = 0x2000, - LOCAL_GL_T = 0x2001, - LOCAL_GL_R = 0x2002, - LOCAL_GL_Q = 0x2003, - LOCAL_GL_TEXTURE_GEN_R = 0x0C62, - LOCAL_GL_TEXTURE_GEN_Q = 0x0C63, - - /* GL 1.1 texturing */ - LOCAL_GL_PROXY_TEXTURE_1D = 0x8063, - LOCAL_GL_PROXY_TEXTURE_2D = 0x8064, - LOCAL_GL_TEXTURE_PRIORITY = 0x8066, - LOCAL_GL_TEXTURE_RESIDENT = 0x8067, - LOCAL_GL_TEXTURE_BINDING_1D = 0x8068, - LOCAL_GL_TEXTURE_BINDING_2D = 0x8069, - LOCAL_GL_TEXTURE_INTERNAL_FORMAT = 0x1003, - - /* GL 1.2 texturing */ - LOCAL_GL_PACK_SKIP_IMAGES = 0x806B, - LOCAL_GL_PACK_IMAGE_HEIGHT = 0x806C, - LOCAL_GL_UNPACK_SKIP_IMAGES = 0x806D, - LOCAL_GL_UNPACK_IMAGE_HEIGHT = 0x806E, - LOCAL_GL_TEXTURE_3D = 0x806F, - LOCAL_GL_PROXY_TEXTURE_3D = 0x8070, - LOCAL_GL_TEXTURE_DEPTH = 0x8071, - LOCAL_GL_TEXTURE_WRAP_R = 0x8072, - LOCAL_GL_MAX_3D_TEXTURE_SIZE = 0x8073, - LOCAL_GL_TEXTURE_BINDING_3D = 0x806A, - - /* Internal texture formats (GL 1.1) */ - LOCAL_GL_ALPHA4 = 0x803B, - LOCAL_GL_ALPHA8 = 0x803C, - LOCAL_GL_ALPHA12 = 0x803D, - LOCAL_GL_ALPHA16 = 0x803E, - LOCAL_GL_LUMINANCE4 = 0x803F, - LOCAL_GL_LUMINANCE8 = 0x8040, - LOCAL_GL_LUMINANCE12 = 0x8041, - LOCAL_GL_LUMINANCE16 = 0x8042, - LOCAL_GL_LUMINANCE4_ALPHA4 = 0x8043, - LOCAL_GL_LUMINANCE6_ALPHA2 = 0x8044, - LOCAL_GL_LUMINANCE8_ALPHA8 = 0x8045, - LOCAL_GL_LUMINANCE12_ALPHA4 = 0x8046, - LOCAL_GL_LUMINANCE12_ALPHA12 = 0x8047, - LOCAL_GL_LUMINANCE16_ALPHA16 = 0x8048, - LOCAL_GL_INTENSITY = 0x8049, - LOCAL_GL_INTENSITY4 = 0x804A, - LOCAL_GL_INTENSITY8 = 0x804B, - LOCAL_GL_INTENSITY12 = 0x804C, - LOCAL_GL_INTENSITY16 = 0x804D, - LOCAL_GL_R3_G3_B2 = 0x2A10, - LOCAL_GL_RGB4 = 0x804F, - LOCAL_GL_RGB5 = 0x8050, - LOCAL_GL_RGB8 = 0x8051, - LOCAL_GL_RGB10 = 0x8052, - LOCAL_GL_RGB12 = 0x8053, - LOCAL_GL_RGB16 = 0x8054, - LOCAL_GL_RGBA2 = 0x8055, - LOCAL_GL_RGBA4 = 0x8056, - LOCAL_GL_RGB5_A1 = 0x8057, - LOCAL_GL_RGBA8 = 0x8058, - LOCAL_GL_RGB10_A2 = 0x8059, - LOCAL_GL_RGBA12 = 0x805A, - LOCAL_GL_RGBA16 = 0x805B, - - /* Utility */ - LOCAL_GL_VENDOR = 0x1F00, - LOCAL_GL_RENDERER = 0x1F01, - LOCAL_GL_VERSION = 0x1F02, - LOCAL_GL_EXTENSIONS = 0x1F03, - - /* Errors */ - LOCAL_GL_INVALID_VALUE = 0x0501, - LOCAL_GL_INVALID_ENUM = 0x0500, - LOCAL_GL_INVALID_OPERATION = 0x0502, - LOCAL_GL_STACK_OVERFLOW = 0x0503, - LOCAL_GL_STACK_UNDERFLOW = 0x0504, - LOCAL_GL_OUT_OF_MEMORY = 0x0505, - - /* - * Extensions - */ - - /* LOCAL_GL_EXT_blend_minmax and LOCAL_GL_EXT_blend_color */ - LOCAL_GL_CONSTANT_COLOR_EXT = 0x8001, - LOCAL_GL_ONE_MINUS_CONSTANT_COLOR_EXT = 0x8002, - LOCAL_GL_CONSTANT_ALPHA_EXT = 0x8003, - LOCAL_GL_ONE_MINUS_CONSTANT_ALPHA_EXT = 0x8004, - LOCAL_GL_BLEND_EQUATION_EXT = 0x8009, - LOCAL_GL_MIN_EXT = 0x8007, - LOCAL_GL_MAX_EXT = 0x8008, - LOCAL_GL_FUNC_ADD_EXT = 0x8006, - LOCAL_GL_FUNC_SUBTRACT_EXT = 0x800A, - LOCAL_GL_FUNC_REVERSE_SUBTRACT_EXT = 0x800B, - LOCAL_GL_BLEND_COLOR_EXT = 0x8005, - - /* LOCAL_GL_EXT_polygon_offset */ - LOCAL_GL_POLYGON_OFFSET_EXT = 0x8037, - LOCAL_GL_POLYGON_OFFSET_FACTOR_EXT = 0x8038, - LOCAL_GL_POLYGON_OFFSET_BIAS_EXT = 0x8039, - - /* LOCAL_GL_EXT_vertex_array */ - LOCAL_GL_VERTEX_ARRAY_EXT = 0x8074, - LOCAL_GL_NORMAL_ARRAY_EXT = 0x8075, - LOCAL_GL_COLOR_ARRAY_EXT = 0x8076, - LOCAL_GL_INDEX_ARRAY_EXT = 0x8077, - LOCAL_GL_TEXTURE_COORD_ARRAY_EXT = 0x8078, - LOCAL_GL_EDGE_FLAG_ARRAY_EXT = 0x8079, - LOCAL_GL_VERTEX_ARRAY_SIZE_EXT = 0x807A, - LOCAL_GL_VERTEX_ARRAY_TYPE_EXT = 0x807B, - LOCAL_GL_VERTEX_ARRAY_STRIDE_EXT = 0x807C, - LOCAL_GL_VERTEX_ARRAY_COUNT_EXT = 0x807D, - LOCAL_GL_NORMAL_ARRAY_TYPE_EXT = 0x807E, - LOCAL_GL_NORMAL_ARRAY_STRIDE_EXT = 0x807F, - LOCAL_GL_NORMAL_ARRAY_COUNT_EXT = 0x8080, - LOCAL_GL_COLOR_ARRAY_SIZE_EXT = 0x8081, - LOCAL_GL_COLOR_ARRAY_TYPE_EXT = 0x8082, - LOCAL_GL_COLOR_ARRAY_STRIDE_EXT = 0x8083, - LOCAL_GL_COLOR_ARRAY_COUNT_EXT = 0x8084, - LOCAL_GL_INDEX_ARRAY_TYPE_EXT = 0x8085, - LOCAL_GL_INDEX_ARRAY_STRIDE_EXT = 0x8086, - LOCAL_GL_INDEX_ARRAY_COUNT_EXT = 0x8087, - LOCAL_GL_TEXTURE_COORD_ARRAY_SIZE_EXT = 0x8088, - LOCAL_GL_TEXTURE_COORD_ARRAY_TYPE_EXT = 0x8089, - LOCAL_GL_TEXTURE_COORD_ARRAY_STRIDE_EXT = 0x808A, - LOCAL_GL_TEXTURE_COORD_ARRAY_COUNT_EXT = 0x808B, - LOCAL_GL_EDGE_FLAG_ARRAY_STRIDE_EXT = 0x808C, - LOCAL_GL_EDGE_FLAG_ARRAY_COUNT_EXT = 0x808D, - LOCAL_GL_VERTEX_ARRAY_POINTER_EXT = 0x808E, - LOCAL_GL_NORMAL_ARRAY_POINTER_EXT = 0x808F, - LOCAL_GL_COLOR_ARRAY_POINTER_EXT = 0x8090, - LOCAL_GL_INDEX_ARRAY_POINTER_EXT = 0x8091, - LOCAL_GL_TEXTURE_COORD_ARRAY_POINTER_EXT = 0x8092, - LOCAL_GL_EDGE_FLAG_ARRAY_POINTER_EXT = 0x8093, - - /* LOCAL_GL_EXT_texture_object */ - LOCAL_GL_TEXTURE_PRIORITY_EXT = 0x8066, - LOCAL_GL_TEXTURE_RESIDENT_EXT = 0x8067, - LOCAL_GL_TEXTURE_1D_BINDING_EXT = 0x8068, - LOCAL_GL_TEXTURE_2D_BINDING_EXT = 0x8069, - - /* LOCAL_GL_EXT_texture3D */ - LOCAL_GL_PACK_SKIP_IMAGES_EXT = 0x806B, - LOCAL_GL_PACK_IMAGE_HEIGHT_EXT = 0x806C, - LOCAL_GL_UNPACK_SKIP_IMAGES_EXT = 0x806D, - LOCAL_GL_UNPACK_IMAGE_HEIGHT_EXT = 0x806E, - LOCAL_GL_TEXTURE_3D_EXT = 0x806F, - LOCAL_GL_PROXY_TEXTURE_3D_EXT = 0x8070, - LOCAL_GL_TEXTURE_DEPTH_EXT = 0x8071, - LOCAL_GL_TEXTURE_WRAP_R_EXT = 0x8072, - LOCAL_GL_MAX_3D_TEXTURE_SIZE_EXT = 0x8073, - LOCAL_GL_TEXTURE_3D_BINDING_EXT = 0x806A, - - /* LOCAL_GL_EXT_paletted_texture */ - LOCAL_GL_TABLE_TOO_LARGE_EXT = 0x8031, - LOCAL_GL_COLOR_TABLE_FORMAT_EXT = 0x80D8, - LOCAL_GL_COLOR_TABLE_WIDTH_EXT = 0x80D9, - LOCAL_GL_COLOR_TABLE_RED_SIZE_EXT = 0x80DA, - LOCAL_GL_COLOR_TABLE_GREEN_SIZE_EXT = 0x80DB, - LOCAL_GL_COLOR_TABLE_BLUE_SIZE_EXT = 0x80DC, - LOCAL_GL_COLOR_TABLE_ALPHA_SIZE_EXT = 0x80DD, - LOCAL_GL_COLOR_TABLE_LUMINANCE_SIZE_EXT = 0x80DE, - LOCAL_GL_COLOR_TABLE_INTENSITY_SIZE_EXT = 0x80DF, - LOCAL_GL_TEXTURE_INDEX_SIZE_EXT = 0x80ED, - LOCAL_GL_COLOR_INDEX1_EXT = 0x80E2, - LOCAL_GL_COLOR_INDEX2_EXT = 0x80E3, - LOCAL_GL_COLOR_INDEX4_EXT = 0x80E4, - LOCAL_GL_COLOR_INDEX8_EXT = 0x80E5, - LOCAL_GL_COLOR_INDEX12_EXT = 0x80E6, - LOCAL_GL_COLOR_INDEX16_EXT = 0x80E7, - - /* LOCAL_GL_EXT_shared_texture_palette */ - LOCAL_GL_SHARED_TEXTURE_PALETTE_EXT = 0x81FB, - - /* LOCAL_GL_EXT_point_parameters */ - LOCAL_GL_POINT_SIZE_MIN_EXT = 0x8126, - LOCAL_GL_POINT_SIZE_MAX_EXT = 0x8127, - LOCAL_GL_POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128, - LOCAL_GL_DISTANCE_ATTENUATION_EXT = 0x8129, - - /* LOCAL_GL_EXT_rescale_normal */ - LOCAL_GL_RESCALE_NORMAL_EXT = 0x803A, - - /* LOCAL_GL_EXT_abgr */ - LOCAL_GL_ABGR_EXT = 0x8000, - - /* LOCAL_GL_SGIS_multitexture */ - LOCAL_GL_SELECTED_TEXTURE_SGIS = 0x835C, - LOCAL_GL_SELECTED_TEXTURE_COORD_SET_SGIS = 0x835D, - LOCAL_GL_MAX_TEXTURES_SGIS = 0x835E, - LOCAL_GL_TEXTURE0_SGIS = 0x835F, - LOCAL_GL_TEXTURE1_SGIS = 0x8360, - LOCAL_GL_TEXTURE2_SGIS = 0x8361, - LOCAL_GL_TEXTURE3_SGIS = 0x8362, - LOCAL_GL_TEXTURE_COORD_SET_SOURCE_SGIS = 0x8363, - - /* LOCAL_GL_EXT_multitexture */ - LOCAL_GL_SELECTED_TEXTURE_EXT = 0x83C0, - LOCAL_GL_SELECTED_TEXTURE_COORD_SET_EXT = 0x83C1, - LOCAL_GL_SELECTED_TEXTURE_TRANSFORM_EXT = 0x83C2, - LOCAL_GL_MAX_TEXTURES_EXT = 0x83C3, - LOCAL_GL_MAX_TEXTURE_COORD_SETS_EXT = 0x83C4, - LOCAL_GL_TEXTURE_ENV_COORD_SET_EXT = 0x83C5, - LOCAL_GL_TEXTURE0_EXT = 0x83C6, - LOCAL_GL_TEXTURE1_EXT = 0x83C7, - LOCAL_GL_TEXTURE2_EXT = 0x83C8, - LOCAL_GL_TEXTURE3_EXT = 0x83C9, - - /* LOCAL_GL_SGIS_texture_edge_clamp */ - LOCAL_GL_CLAMP_TO_EDGE_SGIS = 0x812F, - - /* OpenGL 1.2 */ - LOCAL_GL_RESCALE_NORMAL = 0x803A, - LOCAL_GL_CLAMP_TO_EDGE = 0x812F, - LOCAL_GL_MAX_ELEMENTS_VERTICES = 0xF0E8, - LOCAL_GL_MAX_ELEMENTS_INDICES = 0xF0E9, - LOCAL_GL_BGR = 0x80E0, - LOCAL_GL_BGRA = 0x80E1, - LOCAL_GL_UNSIGNED_BYTE_3_3_2 = 0x8032, - LOCAL_GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362, - LOCAL_GL_UNSIGNED_SHORT_5_6_5 = 0x8363, - LOCAL_GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364, - LOCAL_GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033, - LOCAL_GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365, - LOCAL_GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034, - LOCAL_GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366, - LOCAL_GL_UNSIGNED_INT_8_8_8_8 = 0x8035, - LOCAL_GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367, - LOCAL_GL_UNSIGNED_INT_10_10_10_2 = 0x8036, - LOCAL_GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368, - LOCAL_GL_LIGHT_MODEL_COLOR_CONTROL = 0x81F8, - LOCAL_GL_SINGLE_COLOR = 0x81F9, - LOCAL_GL_SEPARATE_SPECULAR_COLOR = 0x81FA, - LOCAL_GL_TEXTURE_MIN_LOD = 0x813A, - LOCAL_GL_TEXTURE_MAX_LOD = 0x813B, - LOCAL_GL_TEXTURE_BASE_LEVEL = 0x813C, - LOCAL_GL_TEXTURE_MAX_LEVEL = 0x813D -}; - -typedef struct { GLenum e; const char* name; } ENUM; -#define EDEF(VAR) { (GLenum)(LOCAL_GL_##VAR), #VAR } - -static ENUM enums[] = - { - EDEF(BYTE), - EDEF(UNSIGNED_BYTE), - EDEF(SHORT), - EDEF(UNSIGNED_SHORT), - EDEF(INT), - EDEF(UNSIGNED_INT), - EDEF(FLOAT), - EDEF(DOUBLE), - EDEF(2_BYTES), - EDEF(3_BYTES), - EDEF(4_BYTES), -/* - EDEF(LINES), - EDEF(POINTS), - EDEF(LINE_STRIP), - EDEF(LINE_LOOP), - EDEF(TRIANGLES), - EDEF(TRIANGLE_STRIP), - EDEF(TRIANGLE_FAN), - EDEF(QUADS), - EDEF(QUAD_STRIP), - EDEF(POLYGON), - EDEF(EDGE_FLAG), -*/ - EDEF(VERTEX_ARRAY), - EDEF(NORMAL_ARRAY), - EDEF(COLOR_ARRAY), - EDEF(INDEX_ARRAY), - EDEF(TEXTURE_COORD_ARRAY), - EDEF(EDGE_FLAG_ARRAY), - EDEF(VERTEX_ARRAY_SIZE), - EDEF(VERTEX_ARRAY_TYPE), - EDEF(VERTEX_ARRAY_STRIDE), - EDEF(NORMAL_ARRAY_TYPE), - EDEF(NORMAL_ARRAY_STRIDE), - EDEF(COLOR_ARRAY_SIZE), - EDEF(COLOR_ARRAY_TYPE), - EDEF(COLOR_ARRAY_STRIDE), - EDEF(INDEX_ARRAY_TYPE), - EDEF(INDEX_ARRAY_STRIDE), - EDEF(TEXTURE_COORD_ARRAY_SIZE), - EDEF(TEXTURE_COORD_ARRAY_TYPE), - EDEF(TEXTURE_COORD_ARRAY_STRIDE), - EDEF(EDGE_FLAG_ARRAY_STRIDE), - EDEF(VERTEX_ARRAY_POINTER), - EDEF(NORMAL_ARRAY_POINTER), - EDEF(COLOR_ARRAY_POINTER), - EDEF(INDEX_ARRAY_POINTER), - EDEF(TEXTURE_COORD_ARRAY_POINTER), - EDEF(EDGE_FLAG_ARRAY_POINTER), - EDEF(V2F), - EDEF(V3F), - EDEF(C4UB_V2F), - EDEF(C4UB_V3F), - EDEF(C3F_V3F), - EDEF(N3F_V3F), - EDEF(C4F_N3F_V3F), - EDEF(T2F_V3F), - EDEF(T4F_V4F), - EDEF(T2F_C4UB_V3F), - EDEF(T2F_C3F_V3F), - EDEF(T2F_N3F_V3F), - EDEF(T2F_C4F_N3F_V3F), - EDEF(T4F_C4F_N3F_V4F), - EDEF(MATRIX_MODE), - EDEF(MODELVIEW), - EDEF(PROJECTION), - EDEF(TEXTURE), - EDEF(POINT_SMOOTH), - EDEF(POINT_SIZE), - EDEF(POINT_SIZE_GRANULARITY), - EDEF(POINT_SIZE_RANGE), - EDEF(LINE_SMOOTH), - EDEF(LINE_STIPPLE), - EDEF(LINE_STIPPLE_PATTERN), - EDEF(LINE_STIPPLE_REPEAT), - EDEF(LINE_WIDTH), - EDEF(LINE_WIDTH_GRANULARITY), - EDEF(LINE_WIDTH_RANGE), - EDEF(POINT), - EDEF(LINE), - EDEF(FILL), - EDEF(CCW), - EDEF(CW), - EDEF(FRONT), - EDEF(BACK), - EDEF(CULL_FACE), - EDEF(CULL_FACE_MODE), - EDEF(POLYGON_SMOOTH), - EDEF(POLYGON_STIPPLE), - EDEF(FRONT_FACE), - EDEF(POLYGON_MODE), - EDEF(POLYGON_OFFSET_FACTOR), - EDEF(POLYGON_OFFSET_UNITS), - EDEF(POLYGON_OFFSET_POINT), - EDEF(POLYGON_OFFSET_LINE), - EDEF(POLYGON_OFFSET_FILL), - EDEF(COMPILE), - EDEF(COMPILE_AND_EXECUTE), - EDEF(LIST_BASE), - EDEF(LIST_INDEX), - EDEF(LIST_MODE), - EDEF(NEVER), - EDEF(LESS), - EDEF(GEQUAL), - EDEF(LEQUAL), - EDEF(GREATER), - EDEF(NOTEQUAL), - EDEF(EQUAL), - EDEF(ALWAYS), - EDEF(DEPTH_TEST), - EDEF(DEPTH_BITS), - EDEF(DEPTH_CLEAR_VALUE), - EDEF(DEPTH_FUNC), - EDEF(DEPTH_RANGE), - EDEF(DEPTH_WRITEMASK), - EDEF(DEPTH_COMPONENT), - EDEF(LIGHTING), - EDEF(LIGHT0), - EDEF(LIGHT1), - EDEF(LIGHT2), - EDEF(LIGHT3), - EDEF(LIGHT4), - EDEF(LIGHT5), - EDEF(LIGHT6), - EDEF(LIGHT7), - EDEF(SPOT_EXPONENT), - EDEF(SPOT_CUTOFF), - EDEF(CONSTANT_ATTENUATION), - EDEF(LINEAR_ATTENUATION), - EDEF(QUADRATIC_ATTENUATION), - EDEF(AMBIENT), - EDEF(DIFFUSE), - EDEF(SPECULAR), - EDEF(SHININESS), - EDEF(EMISSION), - EDEF(POSITION), - EDEF(SPOT_DIRECTION), - EDEF(AMBIENT_AND_DIFFUSE), - EDEF(COLOR_INDEXES), - EDEF(LIGHT_MODEL_TWO_SIDE), - EDEF(LIGHT_MODEL_LOCAL_VIEWER), - EDEF(LIGHT_MODEL_AMBIENT), - EDEF(FRONT_AND_BACK), - EDEF(SHADE_MODEL), - EDEF(FLAT), - EDEF(SMOOTH), - EDEF(COLOR_MATERIAL), - EDEF(COLOR_MATERIAL_FACE), - EDEF(COLOR_MATERIAL_PARAMETER), - EDEF(NORMALIZE), - EDEF(CLIP_PLANE0), - EDEF(CLIP_PLANE1), - EDEF(CLIP_PLANE2), - EDEF(CLIP_PLANE3), - EDEF(CLIP_PLANE4), - EDEF(CLIP_PLANE5), - EDEF(ACCUM_RED_BITS), - EDEF(ACCUM_GREEN_BITS), - EDEF(ACCUM_BLUE_BITS), - EDEF(ACCUM_ALPHA_BITS), - EDEF(ACCUM_CLEAR_VALUE), - EDEF(ACCUM), - EDEF(ADD), - EDEF(LOAD), - EDEF(MULT), - EDEF(RETURN), - EDEF(ALPHA_TEST), - EDEF(ALPHA_TEST_REF), - EDEF(ALPHA_TEST_FUNC), - EDEF(BLEND), - EDEF(BLEND_SRC), - EDEF(BLEND_DST), - EDEF(ZERO), - EDEF(ONE), - EDEF(SRC_COLOR), - EDEF(ONE_MINUS_SRC_COLOR), - EDEF(DST_COLOR), - EDEF(ONE_MINUS_DST_COLOR), - EDEF(SRC_ALPHA), - EDEF(ONE_MINUS_SRC_ALPHA), - EDEF(DST_ALPHA), - EDEF(ONE_MINUS_DST_ALPHA), - EDEF(SRC_ALPHA_SATURATE), - EDEF(CONSTANT_COLOR), - EDEF(ONE_MINUS_CONSTANT_COLOR), - EDEF(CONSTANT_ALPHA), - EDEF(ONE_MINUS_CONSTANT_ALPHA), - EDEF(FEEDBACK), - EDEF(RENDER), - EDEF(SELECT), - EDEF(2D), - EDEF(3D), - EDEF(3D_COLOR), - EDEF(3D_COLOR_TEXTURE), - EDEF(4D_COLOR_TEXTURE), - EDEF(POINT_TOKEN), - EDEF(LINE_TOKEN), - EDEF(LINE_RESET_TOKEN), - EDEF(POLYGON_TOKEN), - EDEF(BITMAP_TOKEN), - EDEF(DRAW_PIXEL_TOKEN), - EDEF(COPY_PIXEL_TOKEN), - EDEF(PASS_THROUGH_TOKEN), - EDEF(FEEDBACK_BUFFER_POINTER), - EDEF(FEEDBACK_BUFFER_SIZE), - EDEF(FEEDBACK_BUFFER_TYPE), - EDEF(SELECTION_BUFFER_POINTER), - EDEF(SELECTION_BUFFER_SIZE), - EDEF(FOG), - EDEF(FOG_MODE), - EDEF(FOG_DENSITY), - EDEF(FOG_COLOR), - EDEF(FOG_INDEX), - EDEF(FOG_START), - EDEF(FOG_END), - EDEF(LINEAR), - EDEF(EXP), - EDEF(EXP2), - EDEF(LOGIC_OP), - EDEF(INDEX_LOGIC_OP), - EDEF(COLOR_LOGIC_OP), - EDEF(LOGIC_OP_MODE), - EDEF(CLEAR), - EDEF(SET), - EDEF(COPY), - EDEF(COPY_INVERTED), - EDEF(NOOP), - EDEF(INVERT), - EDEF(AND), - EDEF(NAND), - EDEF(OR), - EDEF(NOR), - EDEF(XOR), - EDEF(EQUIV), - EDEF(AND_REVERSE), - EDEF(AND_INVERTED), - EDEF(OR_REVERSE), - EDEF(OR_INVERTED), - EDEF(STENCIL_TEST), - EDEF(STENCIL_WRITEMASK), - EDEF(STENCIL_BITS), - EDEF(STENCIL_FUNC), - EDEF(STENCIL_VALUE_MASK), - EDEF(STENCIL_REF), - EDEF(STENCIL_FAIL), - EDEF(STENCIL_PASS_DEPTH_PASS), - EDEF(STENCIL_PASS_DEPTH_FAIL), - EDEF(STENCIL_CLEAR_VALUE), - EDEF(STENCIL_INDEX), - EDEF(KEEP), - EDEF(REPLACE), - EDEF(INCR), - EDEF(DECR), - EDEF(NONE), - EDEF(LEFT), - EDEF(RIGHT), - EDEF(FRONT_LEFT), - EDEF(FRONT_RIGHT), - EDEF(BACK_LEFT), - EDEF(BACK_RIGHT), - EDEF(AUX0), - EDEF(AUX1), - EDEF(AUX2), - EDEF(AUX3), - EDEF(COLOR_INDEX), - EDEF(RED), - EDEF(GREEN), - EDEF(BLUE), - EDEF(ALPHA), - EDEF(LUMINANCE), - EDEF(LUMINANCE_ALPHA), - EDEF(ALPHA_BITS), - EDEF(RED_BITS), - EDEF(GREEN_BITS), - EDEF(BLUE_BITS), - EDEF(INDEX_BITS), - EDEF(SUBPIXEL_BITS), - EDEF(AUX_BUFFERS), - EDEF(READ_BUFFER), - EDEF(DRAW_BUFFER), - EDEF(DOUBLEBUFFER), - EDEF(STEREO), - EDEF(BITMAP), - EDEF(COLOR), - EDEF(DEPTH), - EDEF(STENCIL), - EDEF(DITHER), - EDEF(RGB), - EDEF(RGBA), - EDEF(MAX_LIST_NESTING), - EDEF(MAX_ATTRIB_STACK_DEPTH), - EDEF(MAX_MODELVIEW_STACK_DEPTH), - EDEF(MAX_NAME_STACK_DEPTH), - EDEF(MAX_PROJECTION_STACK_DEPTH), - EDEF(MAX_TEXTURE_STACK_DEPTH), - EDEF(MAX_EVAL_ORDER), - EDEF(MAX_LIGHTS), - EDEF(MAX_CLIP_PLANES), - EDEF(MAX_TEXTURE_SIZE), - EDEF(MAX_PIXEL_MAP_TABLE), - EDEF(MAX_VIEWPORT_DIMS), - EDEF(MAX_CLIENT_ATTRIB_STACK_DEPTH), - EDEF(ATTRIB_STACK_DEPTH), - EDEF(CLIENT_ATTRIB_STACK_DEPTH), - EDEF(COLOR_CLEAR_VALUE), - EDEF(COLOR_WRITEMASK), - EDEF(CURRENT_INDEX), - EDEF(CURRENT_COLOR), - EDEF(CURRENT_NORMAL), - EDEF(CURRENT_RASTER_COLOR), - EDEF(CURRENT_RASTER_DISTANCE), - EDEF(CURRENT_RASTER_INDEX), - EDEF(CURRENT_RASTER_POSITION), - EDEF(CURRENT_RASTER_TEXTURE_COORDS), - EDEF(CURRENT_RASTER_POSITION_VALID), - EDEF(CURRENT_TEXTURE_COORDS), - EDEF(INDEX_CLEAR_VALUE), - EDEF(INDEX_MODE), - EDEF(INDEX_WRITEMASK), - EDEF(MODELVIEW_MATRIX), - EDEF(MODELVIEW_STACK_DEPTH), - EDEF(NAME_STACK_DEPTH), - EDEF(PROJECTION_MATRIX), - EDEF(PROJECTION_STACK_DEPTH), - EDEF(RENDER_MODE), - EDEF(RGBA_MODE), - EDEF(TEXTURE_MATRIX), - EDEF(TEXTURE_STACK_DEPTH), - EDEF(VIEWPORT), - EDEF(AUTO_NORMAL), - EDEF(MAP1_COLOR_4), - EDEF(MAP1_GRID_DOMAIN), - EDEF(MAP1_GRID_SEGMENTS), - EDEF(MAP1_INDEX), - EDEF(MAP1_NORMAL), - EDEF(MAP1_TEXTURE_COORD_1), - EDEF(MAP1_TEXTURE_COORD_2), - EDEF(MAP1_TEXTURE_COORD_3), - EDEF(MAP1_TEXTURE_COORD_4), - EDEF(MAP1_VERTEX_3), - EDEF(MAP1_VERTEX_4), - EDEF(MAP2_COLOR_4), - EDEF(MAP2_GRID_DOMAIN), - EDEF(MAP2_GRID_SEGMENTS), - EDEF(MAP2_INDEX), - EDEF(MAP2_NORMAL), - EDEF(MAP2_TEXTURE_COORD_1), - EDEF(MAP2_TEXTURE_COORD_2), - EDEF(MAP2_TEXTURE_COORD_3), - EDEF(MAP2_TEXTURE_COORD_4), - EDEF(MAP2_VERTEX_3), - EDEF(MAP2_VERTEX_4), - EDEF(COEFF), - EDEF(DOMAIN), - EDEF(ORDER), - EDEF(FOG_HINT), - EDEF(LINE_SMOOTH_HINT), - EDEF(PERSPECTIVE_CORRECTION_HINT), - EDEF(POINT_SMOOTH_HINT), - EDEF(POLYGON_SMOOTH_HINT), - EDEF(DONT_CARE), - EDEF(FASTEST), - EDEF(NICEST), - EDEF(SCISSOR_TEST), - EDEF(SCISSOR_BOX), - EDEF(MAP_COLOR), - EDEF(MAP_STENCIL), - EDEF(INDEX_SHIFT), - EDEF(INDEX_OFFSET), - EDEF(RED_SCALE), - EDEF(RED_BIAS), - EDEF(GREEN_SCALE), - EDEF(GREEN_BIAS), - EDEF(BLUE_SCALE), - EDEF(BLUE_BIAS), - EDEF(ALPHA_SCALE), - EDEF(ALPHA_BIAS), - EDEF(DEPTH_SCALE), - EDEF(DEPTH_BIAS), - EDEF(PIXEL_MAP_S_TO_S_SIZE), - EDEF(PIXEL_MAP_I_TO_I_SIZE), - EDEF(PIXEL_MAP_I_TO_R_SIZE), - EDEF(PIXEL_MAP_I_TO_G_SIZE), - EDEF(PIXEL_MAP_I_TO_B_SIZE), - EDEF(PIXEL_MAP_I_TO_A_SIZE), - EDEF(PIXEL_MAP_R_TO_R_SIZE), - EDEF(PIXEL_MAP_G_TO_G_SIZE), - EDEF(PIXEL_MAP_B_TO_B_SIZE), - EDEF(PIXEL_MAP_A_TO_A_SIZE), - EDEF(PIXEL_MAP_S_TO_S), - EDEF(PIXEL_MAP_I_TO_I), - EDEF(PIXEL_MAP_I_TO_R), - EDEF(PIXEL_MAP_I_TO_G), - EDEF(PIXEL_MAP_I_TO_B), - EDEF(PIXEL_MAP_I_TO_A), - EDEF(PIXEL_MAP_R_TO_R), - EDEF(PIXEL_MAP_G_TO_G), - EDEF(PIXEL_MAP_B_TO_B), - EDEF(PIXEL_MAP_A_TO_A), - EDEF(PACK_ALIGNMENT), - EDEF(PACK_LSB_FIRST), - EDEF(PACK_ROW_LENGTH), - EDEF(PACK_SKIP_PIXELS), - EDEF(PACK_SKIP_ROWS), - EDEF(PACK_SWAP_BYTES), - EDEF(UNPACK_ALIGNMENT), - EDEF(UNPACK_LSB_FIRST), - EDEF(UNPACK_ROW_LENGTH), - EDEF(UNPACK_SKIP_PIXELS), - EDEF(UNPACK_SKIP_ROWS), - EDEF(UNPACK_SWAP_BYTES), - EDEF(ZOOM_X), - EDEF(ZOOM_Y), - EDEF(TEXTURE_ENV), - EDEF(TEXTURE_ENV_MODE), - EDEF(TEXTURE_1D), - EDEF(TEXTURE_2D), - EDEF(TEXTURE_WRAP_S), - EDEF(TEXTURE_WRAP_T), - EDEF(TEXTURE_MAG_FILTER), - EDEF(TEXTURE_MIN_FILTER), - EDEF(TEXTURE_ENV_COLOR), - EDEF(TEXTURE_GEN_S), - EDEF(TEXTURE_GEN_T), - EDEF(TEXTURE_GEN_MODE), - EDEF(TEXTURE_BORDER_COLOR), - EDEF(TEXTURE_WIDTH), - EDEF(TEXTURE_HEIGHT), - EDEF(TEXTURE_BORDER), - EDEF(TEXTURE_COMPONENTS), - EDEF(TEXTURE_RED_SIZE), - EDEF(TEXTURE_GREEN_SIZE), - EDEF(TEXTURE_BLUE_SIZE), - EDEF(TEXTURE_ALPHA_SIZE), - EDEF(TEXTURE_LUMINANCE_SIZE), - EDEF(TEXTURE_INTENSITY_SIZE), - EDEF(NEAREST_MIPMAP_NEAREST), - EDEF(NEAREST_MIPMAP_LINEAR), - EDEF(LINEAR_MIPMAP_NEAREST), - EDEF(LINEAR_MIPMAP_LINEAR), - EDEF(OBJECT_LINEAR), - EDEF(OBJECT_PLANE), - EDEF(EYE_LINEAR), - EDEF(EYE_PLANE), - EDEF(SPHERE_MAP), - EDEF(DECAL), - EDEF(MODULATE), - EDEF(NEAREST), - EDEF(REPEAT), - EDEF(CLAMP), - EDEF(S), - EDEF(T), - EDEF(R), - EDEF(Q), - EDEF(TEXTURE_GEN_R), - EDEF(TEXTURE_GEN_Q), - EDEF(PROXY_TEXTURE_1D), - EDEF(PROXY_TEXTURE_2D), - EDEF(TEXTURE_PRIORITY), - EDEF(TEXTURE_RESIDENT), - EDEF(TEXTURE_BINDING_1D), - EDEF(TEXTURE_BINDING_2D), - EDEF(TEXTURE_INTERNAL_FORMAT), - EDEF(PACK_SKIP_IMAGES), - EDEF(PACK_IMAGE_HEIGHT), - EDEF(UNPACK_SKIP_IMAGES), - EDEF(UNPACK_IMAGE_HEIGHT), - EDEF(TEXTURE_3D), - EDEF(PROXY_TEXTURE_3D), - EDEF(TEXTURE_DEPTH), - EDEF(TEXTURE_WRAP_R), - EDEF(MAX_3D_TEXTURE_SIZE), - EDEF(TEXTURE_BINDING_3D), - EDEF(ALPHA4), - EDEF(ALPHA8), - EDEF(ALPHA12), - EDEF(ALPHA16), - EDEF(LUMINANCE4), - EDEF(LUMINANCE8), - EDEF(LUMINANCE12), - EDEF(LUMINANCE16), - EDEF(LUMINANCE4_ALPHA4), - EDEF(LUMINANCE6_ALPHA2), - EDEF(LUMINANCE8_ALPHA8), - EDEF(LUMINANCE12_ALPHA4), - EDEF(LUMINANCE12_ALPHA12), - EDEF(LUMINANCE16_ALPHA16), - EDEF(INTENSITY), - EDEF(INTENSITY4), - EDEF(INTENSITY8), - EDEF(INTENSITY12), - EDEF(INTENSITY16), - EDEF(R3_G3_B2), - EDEF(RGB4), - EDEF(RGB5), - EDEF(RGB8), - EDEF(RGB10), - EDEF(RGB12), - EDEF(RGB16), - EDEF(RGBA2), - EDEF(RGBA4), - EDEF(RGB5_A1), - EDEF(RGBA8), - EDEF(RGB10_A2), - EDEF(RGBA12), - EDEF(RGBA16), - EDEF(VENDOR), - EDEF(RENDERER), - EDEF(VERSION), - EDEF(EXTENSIONS), - EDEF(INVALID_VALUE), - EDEF(INVALID_ENUM), - EDEF(INVALID_OPERATION), - EDEF(STACK_OVERFLOW), - EDEF(STACK_UNDERFLOW), - EDEF(OUT_OF_MEMORY), - - /* extensions */ - EDEF(CONSTANT_COLOR_EXT), - EDEF(ONE_MINUS_CONSTANT_COLOR_EXT), - EDEF(CONSTANT_ALPHA_EXT), - EDEF(ONE_MINUS_CONSTANT_ALPHA_EXT), - EDEF(BLEND_EQUATION_EXT), - EDEF(MIN_EXT), - EDEF(MAX_EXT), - EDEF(FUNC_ADD_EXT), - EDEF(FUNC_SUBTRACT_EXT), - EDEF(FUNC_REVERSE_SUBTRACT_EXT), - EDEF(BLEND_COLOR_EXT), - EDEF(POLYGON_OFFSET_EXT), - EDEF(POLYGON_OFFSET_FACTOR_EXT), - EDEF(POLYGON_OFFSET_BIAS_EXT), - EDEF(VERTEX_ARRAY_EXT), - EDEF(NORMAL_ARRAY_EXT), - EDEF(COLOR_ARRAY_EXT), - EDEF(INDEX_ARRAY_EXT), - EDEF(TEXTURE_COORD_ARRAY_EXT), - EDEF(EDGE_FLAG_ARRAY_EXT), - EDEF(VERTEX_ARRAY_SIZE_EXT), - EDEF(VERTEX_ARRAY_TYPE_EXT), - EDEF(VERTEX_ARRAY_STRIDE_EXT), - EDEF(VERTEX_ARRAY_COUNT_EXT), - EDEF(NORMAL_ARRAY_TYPE_EXT), - EDEF(NORMAL_ARRAY_STRIDE_EXT), - EDEF(NORMAL_ARRAY_COUNT_EXT), - EDEF(COLOR_ARRAY_SIZE_EXT), - EDEF(COLOR_ARRAY_TYPE_EXT), - EDEF(COLOR_ARRAY_STRIDE_EXT), - EDEF(COLOR_ARRAY_COUNT_EXT), - EDEF(INDEX_ARRAY_TYPE_EXT), - EDEF(INDEX_ARRAY_STRIDE_EXT), - EDEF(INDEX_ARRAY_COUNT_EXT), - EDEF(TEXTURE_COORD_ARRAY_SIZE_EXT), - EDEF(TEXTURE_COORD_ARRAY_TYPE_EXT), - EDEF(TEXTURE_COORD_ARRAY_STRIDE_EXT), - EDEF(TEXTURE_COORD_ARRAY_COUNT_EXT), - EDEF(EDGE_FLAG_ARRAY_STRIDE_EXT), - EDEF(EDGE_FLAG_ARRAY_COUNT_EXT), - EDEF(VERTEX_ARRAY_POINTER_EXT), - EDEF(NORMAL_ARRAY_POINTER_EXT), - EDEF(COLOR_ARRAY_POINTER_EXT), - EDEF(INDEX_ARRAY_POINTER_EXT), - EDEF(TEXTURE_COORD_ARRAY_POINTER_EXT), - EDEF(EDGE_FLAG_ARRAY_POINTER_EXT), - EDEF(TEXTURE_PRIORITY_EXT), - EDEF(TEXTURE_RESIDENT_EXT), - EDEF(TEXTURE_1D_BINDING_EXT), - EDEF(TEXTURE_2D_BINDING_EXT), - EDEF(PACK_SKIP_IMAGES_EXT), - EDEF(PACK_IMAGE_HEIGHT_EXT), - EDEF(UNPACK_SKIP_IMAGES_EXT), - EDEF(UNPACK_IMAGE_HEIGHT_EXT), - EDEF(TEXTURE_3D_EXT), - EDEF(PROXY_TEXTURE_3D_EXT), - EDEF(TEXTURE_DEPTH_EXT), - EDEF(TEXTURE_WRAP_R_EXT), - EDEF(MAX_3D_TEXTURE_SIZE_EXT), - EDEF(TEXTURE_3D_BINDING_EXT), - EDEF(TABLE_TOO_LARGE_EXT), - EDEF(COLOR_TABLE_FORMAT_EXT), - EDEF(COLOR_TABLE_WIDTH_EXT), - EDEF(COLOR_TABLE_RED_SIZE_EXT), - EDEF(COLOR_TABLE_GREEN_SIZE_EXT), - EDEF(COLOR_TABLE_BLUE_SIZE_EXT), - EDEF(COLOR_TABLE_ALPHA_SIZE_EXT), - EDEF(COLOR_TABLE_LUMINANCE_SIZE_EXT), - EDEF(COLOR_TABLE_INTENSITY_SIZE_EXT), - EDEF(TEXTURE_INDEX_SIZE_EXT), - EDEF(COLOR_INDEX1_EXT), - EDEF(COLOR_INDEX2_EXT), - EDEF(COLOR_INDEX4_EXT), - EDEF(COLOR_INDEX8_EXT), - EDEF(COLOR_INDEX12_EXT), - EDEF(COLOR_INDEX16_EXT), - EDEF(SHARED_TEXTURE_PALETTE_EXT), - EDEF(POINT_SIZE_MIN_EXT), - EDEF(POINT_SIZE_MAX_EXT), - EDEF(POINT_FADE_THRESHOLD_SIZE_EXT), - EDEF(DISTANCE_ATTENUATION_EXT), - EDEF(RESCALE_NORMAL_EXT), - EDEF(ABGR_EXT), - EDEF(SELECTED_TEXTURE_SGIS), - EDEF(SELECTED_TEXTURE_COORD_SET_SGIS), - EDEF(MAX_TEXTURES_SGIS), - EDEF(TEXTURE0_SGIS), - EDEF(TEXTURE1_SGIS), - EDEF(TEXTURE2_SGIS), - EDEF(TEXTURE3_SGIS), - EDEF(TEXTURE_COORD_SET_SOURCE_SGIS), - EDEF(SELECTED_TEXTURE_EXT), - EDEF(SELECTED_TEXTURE_COORD_SET_EXT), - EDEF(SELECTED_TEXTURE_TRANSFORM_EXT), - EDEF(MAX_TEXTURES_EXT), - EDEF(MAX_TEXTURE_COORD_SETS_EXT), - EDEF(TEXTURE_ENV_COORD_SET_EXT), - EDEF(TEXTURE0_EXT), - EDEF(TEXTURE1_EXT), - EDEF(TEXTURE2_EXT), - EDEF(TEXTURE3_EXT), - EDEF(CLAMP_TO_EDGE_SGIS), - EDEF(RESCALE_NORMAL), - EDEF(CLAMP_TO_EDGE), - EDEF(MAX_ELEMENTS_VERTICES), - EDEF(MAX_ELEMENTS_INDICES), - EDEF(BGR), - EDEF(BGRA), - EDEF(UNSIGNED_BYTE_3_3_2), - EDEF(UNSIGNED_BYTE_2_3_3_REV), - EDEF(UNSIGNED_SHORT_5_6_5), - EDEF(UNSIGNED_SHORT_5_6_5_REV), - EDEF(UNSIGNED_SHORT_4_4_4_4), - EDEF(UNSIGNED_SHORT_4_4_4_4_REV), - EDEF(UNSIGNED_SHORT_5_5_5_1), - EDEF(UNSIGNED_SHORT_1_5_5_5_REV), - EDEF(UNSIGNED_INT_8_8_8_8), - EDEF(UNSIGNED_INT_8_8_8_8_REV), - EDEF(UNSIGNED_INT_10_10_10_2), - EDEF(UNSIGNED_INT_2_10_10_10_REV), - EDEF(LIGHT_MODEL_COLOR_CONTROL), - EDEF(SINGLE_COLOR), - EDEF(SEPARATE_SPECULAR_COLOR), - EDEF(TEXTURE_MIN_LOD), - EDEF(TEXTURE_MAX_LOD), - EDEF(TEXTURE_BASE_LEVEL), - EDEF(TEXTURE_MAX_LEVEL) -}; - -#undef EDEF - -#define N_ENUMS (sizeof(enums) / sizeof(ENUM)) - -/***************************************************************************/ - -static void print_enum_name( FILE* OUT, GLenum e ) -{ - int i, found= 0; - for( i= 0; i < N_ENUMS; ++i ) - { - if( enums[i].e == e ) - { - if( found ) - fprintf( OUT, "/" ); - found= 1; - fprintf( OUT, "%s", enums[i].name ); - } - } - if( ! found ) - fprintf( OUT, "*UNKNOWN* [%04x]", (int)e ); - fprintf( OUT, "\n" ); -} - -#define BOOL_STRING(b) (b ? "true" : "false") - -#define VAR_ENUM(VAR) \ - { \ - GLint e= 0; \ - glGetIntegerv(GL_##VAR,&e); \ - fprintf( OUT, "%s: ", #VAR ); \ - print_enum_name( OUT, (GLenum) e ); \ - } - -#define VAR_FLOAT4(VAR) \ - { \ - GLfloat f[4]; \ - f[0]= f[1]= f[2]= f[3]= 0.0; \ - glGetFloatv(GL_##VAR,f); \ - fprintf( OUT, "%s: [%f %f %f %f]\n", \ - #VAR, f[0], f[1], f[2], f[3] ); \ - } - -#define VAR_MAT_FLOAT4(VAR) \ - { \ - GLfloat f[4]; \ - f[0]= f[1]= f[2]= f[3]= 0.0; \ - glGetMaterialfv(GL_FRONT,GL_##VAR,f); \ - fprintf( OUT, "FRONT_%s: [%f %f %f %f]\n", \ - #VAR, f[0], f[1], f[2], f[3] ); \ - glGetMaterialfv(GL_BACK,GL_##VAR,f); \ - fprintf( OUT, " BACK_%s: [%f %f %f %f]\n", \ - #VAR, f[0], f[1], f[2], f[3] ); \ - } - -#define VAR_LIGHT_FLOAT4(LIGHT,VAR) \ - { \ - GLfloat f[4]; \ - f[0]= f[1]= f[2]= f[3]= 0.0; \ - glGetLightfv(GL_LIGHT0+LIGHT,GL_##VAR,f); \ - fprintf( OUT, "LIGHT%d.%s: [%f %f %f %f]\n", \ - LIGHT, #VAR, f[0], f[1], f[2], f[3] ); \ - } - -#define VAR_LIGHT_FLOAT3(LIGHT,VAR) \ - { \ - GLfloat f[3]; \ - f[0]= f[1]= f[2]= 0.0; \ - glGetLightfv(GL_LIGHT0+LIGHT,GL_##VAR,f); \ - fprintf( OUT, "LIGHT%d.%s: [%f %f %f]\n", \ - LIGHT, #VAR, f[0], f[1], f[2] ); \ - } - -#define VAR_FLOAT3(VAR) \ - { \ - GLfloat f[3]; \ - f[0]= f[1]= f[2]= 0.0; \ - glGetFloatv(GL_##VAR,f) ; \ - fprintf( OUT, "%s: [%f %f %f]\n", \ - #VAR, f[0], f[1], f[2] ); \ - } -#define VAR_FLOAT2(VAR) \ - { \ - GLfloat f[2]; \ - f[0]= f[1]= 0.0; \ - glGetFloatv(GL_##VAR,f); \ - fprintf( OUT, "%s: [%f %f]\n", \ - #VAR, f[0], f[1] ); \ - } - -#define VAR_COLOR(VAR) VAR_FLOAT4(VAR) -#define VAR_TEXCOORD(VAR) VAR_FLOAT4(VAR) -#define VAR_NORMAL(VAR) VAR_FLOAT3(VAR) - -#define VAR_MAT_COLOR(VAR) VAR_MAT_FLOAT4(VAR) -#define VAR_LIGHT_COLOR(LIGHT,VAR) VAR_LIGHT_FLOAT4(LIGHT,VAR) - -#define VAR_FLOAT(VAR) \ - { \ - GLfloat f= 0.0; \ - glGetFloatv(GL_##VAR,&f); \ - fprintf( OUT, "%s: %f\n", #VAR, f ); \ - } - -#define VAR_MAT_FLOAT(VAR) \ - { \ - GLfloat f= 0.0; \ - glGetMaterialfv(GL_FRONT,GL_##VAR,&f); \ - fprintf( OUT, "FRONT_%s: %f\n", #VAR, f ); \ - glGetMaterialfv(GL_BACK,GL_##VAR,&f); \ - fprintf( OUT, " BACK_%s: %f\n", #VAR, f ); \ - } - -#define VAR_LIGHT_FLOAT(LIGHT,VAR) \ - { \ - GLfloat f= 0.0; \ - glGetLightfv(GL_LIGHT0+LIGHT,GL_##VAR,&f); \ - fprintf( OUT, "LIGHT%d.%s: %f\n", \ - LIGHT, #VAR, f ); \ - } - -#define VAR_INT(VAR) \ - { \ - GLint i= 0; \ - glGetIntegerv(GL_##VAR,&i); \ - fprintf( OUT, "%s: %d\n", #VAR, (int)i ); \ - } -#define VAR_INTEGER(VAR) VAR_INT(VAR) -#define VAR_INDEX(VAR) VAR_INT(VAR) -#define VAR_HEXINT(VAR) \ - { \ - GLint i= 0; \ - glGetIntegerv(GL_##VAR,&i); \ - fprintf( OUT, "%s: 0x%04x\n", #VAR, (int)i ); \ - } -#define VAR_INT4(VAR) \ - { \ - GLint i[4]; \ - i[0]= i[1]= i[2]= i[3]= 0; \ - glGetIntegerv(GL_##VAR,i); \ - fprintf( OUT, "%s: [%d %d %d %d]\n", \ - #VAR, (int)i[0], (int)i[1], (int)i[2], (int)i[3] ); \ - } -#define VAR_BOOL(VAR) \ - { \ - GLboolean b= 0; \ - glGetBooleanv(GL_##VAR,&b); \ - fprintf( OUT, "%s: %s\n", #VAR, BOOL_STRING(b) ); \ - } -#define VAR_BOOL4(VAR) \ - { \ - GLboolean b[4]; \ - b[0]= b[1]= b[2]= b[3]= 0; \ - glGetBooleanv(GL_##VAR,b); \ - fprintf( OUT, "%s: [%s %s %s %s]\n", \ - #VAR, \ - BOOL_STRING(b[0]), \ - BOOL_STRING(b[1]), \ - BOOL_STRING(b[2]), \ - BOOL_STRING(b[3]) ); \ - } -#define VAR_PTR(VAR) \ - { \ - GLvoid* p= 0; \ - glGetPointerv(GL_##VAR,&p); \ - fprintf( OUT, "%s: %p\n", #VAR, p ); \ - } -#define VAR_MATRIX(VAR) \ - { \ - GLfloat m[16]; \ - int i; \ - for( i= 0; i < 16; ++i ) m[i]= 0.0; \ - glGetFloatv(GL_##VAR,m); \ - fprintf( OUT, \ - "%s:\n\t[%+.6f %+.6f %+.6f %+.6f]\n\t[%+.6f %+.6f %+.6f -%+.6f]\n\t[%+.6f %+.6f %+.6f %+.6f]\n\t[%+.6f %+.6f %+.6f %+.6f]\n", \ - #VAR, \ - m[0+0*4], m[0+1*4], m[0+2*4], m[0+3*4], \ - m[1+0*4], m[1+1*4], m[1+2*4], m[1+3*4], \ - m[2+0*4], m[2+1*4], m[2+2*4], m[2+3*4], \ - m[3+0*4], m[3+1*4], m[3+2*4], m[3+3*4] ); \ - } - -/***************************************************************************/ - -/* -#define OUT stderr -*/ -void dump_opengl_state( FILE* OUT ) -{ - int i; - GLint n_lights= 0; - - glGetIntegerv( GL_MAX_LIGHTS, &n_lights ); - - VAR_COLOR(CURRENT_COLOR) - VAR_INDEX(CURRENT_INDEX) - VAR_TEXCOORD(CURRENT_TEXTURE_COORDS) - VAR_NORMAL(CURRENT_NORMAL) - VAR_FLOAT4(CURRENT_RASTER_POSITION) - VAR_FLOAT(CURRENT_RASTER_DISTANCE) - VAR_COLOR(CURRENT_RASTER_COLOR) - VAR_INDEX(CURRENT_RASTER_INDEX) - VAR_TEXCOORD(CURRENT_RASTER_TEXTURE_COORDS) - VAR_BOOL(CURRENT_RASTER_POSITION_VALID) - VAR_BOOL(EDGE_FLAG) - - VAR_BOOL (VERTEX_ARRAY) - VAR_INTEGER(VERTEX_ARRAY_SIZE) - VAR_ENUM (VERTEX_ARRAY_TYPE) - VAR_INTEGER(VERTEX_ARRAY_STRIDE) - VAR_PTR (VERTEX_ARRAY_POINTER) - - VAR_BOOL (NORMAL_ARRAY) - VAR_ENUM (NORMAL_ARRAY_TYPE) - VAR_INTEGER(NORMAL_ARRAY_STRIDE) - VAR_PTR (NORMAL_ARRAY_POINTER) - - VAR_BOOL (COLOR_ARRAY) - VAR_INTEGER(COLOR_ARRAY_SIZE) - VAR_ENUM (COLOR_ARRAY_TYPE) - VAR_INTEGER(COLOR_ARRAY_STRIDE) - VAR_PTR (COLOR_ARRAY_POINTER) - - VAR_BOOL (INDEX_ARRAY) - VAR_ENUM (INDEX_ARRAY_TYPE) - VAR_INTEGER(INDEX_ARRAY_STRIDE) - VAR_PTR (INDEX_ARRAY_POINTER) - - VAR_BOOL (TEXTURE_COORD_ARRAY) - VAR_INTEGER(TEXTURE_COORD_ARRAY_SIZE) - VAR_ENUM (TEXTURE_COORD_ARRAY_TYPE) - VAR_INTEGER(TEXTURE_COORD_ARRAY_STRIDE) - VAR_PTR (TEXTURE_COORD_ARRAY_POINTER) - - VAR_BOOL (EDGE_FLAG_ARRAY) - VAR_INTEGER(EDGE_FLAG_ARRAY_STRIDE) - VAR_PTR (EDGE_FLAG_ARRAY_POINTER) - - VAR_MATRIX(MODELVIEW_MATRIX) - VAR_MATRIX(PROJECTION_MATRIX) - VAR_MATRIX(TEXTURE_MATRIX) - VAR_INT4(VIEWPORT) - VAR_FLOAT2(DEPTH_RANGE) - VAR_INT(MODELVIEW_STACK_DEPTH) - VAR_INT(PROJECTION_STACK_DEPTH) - VAR_INT(TEXTURE_STACK_DEPTH) - VAR_ENUM(MATRIX_MODE) - VAR_BOOL(NORMALIZE) - VAR_BOOL(RESCALE_NORMAL_EXT) - VAR_BOOL(CLIP_PLANE0) - VAR_BOOL(CLIP_PLANE1) - VAR_BOOL(CLIP_PLANE2) - VAR_BOOL(CLIP_PLANE3) - VAR_BOOL(CLIP_PLANE4) - VAR_BOOL(CLIP_PLANE5) - /* + glGetClipPlane() */ - - VAR_COLOR(FOG_COLOR) - VAR_INDEX(FOG_INDEX) - VAR_FLOAT(FOG_DENSITY) - VAR_FLOAT(FOG_START) - VAR_FLOAT(FOG_END) - VAR_ENUM(FOG_MODE) - VAR_BOOL(FOG) - VAR_ENUM(SHADE_MODEL) - - VAR_BOOL(LIGHTING) - VAR_BOOL(COLOR_MATERIAL) - VAR_ENUM(COLOR_MATERIAL_PARAMETER) - VAR_ENUM(COLOR_MATERIAL_FACE) - - VAR_MAT_COLOR(AMBIENT) - VAR_MAT_COLOR(DIFFUSE) - VAR_MAT_COLOR(SPECULAR) - VAR_MAT_COLOR(EMISSION) - VAR_MAT_FLOAT(SHININESS) - - VAR_COLOR(LIGHT_MODEL_AMBIENT) - VAR_BOOL(LIGHT_MODEL_LOCAL_VIEWER) - VAR_BOOL(LIGHT_MODEL_TWO_SIDE) -/* VAR_ENUM(LIGHT_MODEL_COLOR_CONTROL)*/ - - for( i= 0; i < n_lights; ++i ) - { - GLboolean b= 0; - - glGetBooleanv( GL_LIGHT0 + i, &b ); - fprintf( OUT, "LIGHT%d: %s\n", i, BOOL_STRING(b) ); - - if( ! b ) - continue; - - VAR_LIGHT_COLOR(i,AMBIENT) - VAR_LIGHT_COLOR(i,DIFFUSE) - VAR_LIGHT_COLOR(i,SPECULAR) - VAR_LIGHT_FLOAT4(i,POSITION) - VAR_LIGHT_FLOAT(i,CONSTANT_ATTENUATION) - VAR_LIGHT_FLOAT(i,LINEAR_ATTENUATION) - VAR_LIGHT_FLOAT(i,QUADRATIC_ATTENUATION) - VAR_LIGHT_FLOAT3(i,SPOT_DIRECTION) - VAR_LIGHT_FLOAT(i,SPOT_EXPONENT) - VAR_LIGHT_FLOAT(i,SPOT_CUTOFF) - /* COLOR_INDEXES */ - } - - VAR_FLOAT(POINT_SIZE) - VAR_BOOL(POINT_SMOOTH) - VAR_FLOAT(LINE_WIDTH) - VAR_BOOL(LINE_SMOOTH) - VAR_HEXINT(LINE_STIPPLE_PATTERN) - VAR_INT(LINE_STIPPLE_REPEAT) - VAR_BOOL(LINE_STIPPLE) - VAR_BOOL(CULL_FACE) - VAR_ENUM(CULL_FACE_MODE) - VAR_ENUM(FRONT_FACE) - VAR_BOOL(POLYGON_SMOOTH) - VAR_ENUM(POLYGON_MODE) - VAR_FLOAT(POLYGON_OFFSET_FACTOR) - VAR_FLOAT(POLYGON_OFFSET_UNITS) - VAR_BOOL(POLYGON_OFFSET_POINT) - VAR_BOOL(POLYGON_OFFSET_LINE) - VAR_BOOL(POLYGON_OFFSET_FILL) - /* GetPolygonStipple */ - VAR_BOOL(POLYGON_STIPPLE) - - VAR_BOOL(TEXTURE_1D) - VAR_BOOL(TEXTURE_2D) -/* VAR_BOOL(TEXTURE_3D)*/ - - VAR_INT(TEXTURE_BINDING_1D) - VAR_INT(TEXTURE_BINDING_2D) -/* VAR_INT(TEXTURE_BINDING_3D)*/ - - /* GetTexImage() */ - /* GetTexLevelParameter() */ - /* GetTexEnv() */ - - VAR_BOOL(TEXTURE_GEN_S) - VAR_BOOL(TEXTURE_GEN_T) - VAR_BOOL(TEXTURE_GEN_R) - VAR_BOOL(TEXTURE_GEN_Q) - - /* GetTexGen() */ - - VAR_BOOL(SCISSOR_TEST) - VAR_INT4(SCISSOR_BOX) - VAR_BOOL(ALPHA_TEST) - VAR_ENUM(ALPHA_TEST_FUNC) - VAR_FLOAT(ALPHA_TEST_REF) - VAR_BOOL(STENCIL_TEST) - VAR_ENUM(STENCIL_FUNC) - VAR_HEXINT(STENCIL_VALUE_MASK) - VAR_INT(STENCIL_REF) - VAR_ENUM(STENCIL_FAIL) - VAR_ENUM(STENCIL_PASS_DEPTH_FAIL) - VAR_ENUM(STENCIL_PASS_DEPTH_PASS) - VAR_BOOL(DEPTH_TEST) - VAR_ENUM(DEPTH_FUNC) - VAR_BOOL(BLEND) - VAR_ENUM(BLEND_SRC) - VAR_ENUM(BLEND_DST) - - VAR_BOOL(DITHER) - VAR_BOOL(LOGIC_OP) /* INDEX_LOGIC_OP */ - VAR_BOOL(COLOR_LOGIC_OP) - - VAR_ENUM(DRAW_BUFFER) - VAR_INT(INDEX_WRITEMASK) - VAR_BOOL4(COLOR_WRITEMASK) - VAR_BOOL(DEPTH_WRITEMASK) - VAR_HEXINT(STENCIL_WRITEMASK) - VAR_COLOR(COLOR_CLEAR_VALUE) - VAR_INDEX(INDEX_CLEAR_VALUE) - VAR_FLOAT(DEPTH_CLEAR_VALUE) - VAR_INT(STENCIL_CLEAR_VALUE) - VAR_FLOAT(ACCUM_CLEAR_VALUE) - - VAR_BOOL(UNPACK_SWAP_BYTES) - VAR_BOOL(UNPACK_LSB_FIRST) -#ifdef UNPACK_IMAGE_HEIGHT - VAR_INT(UNPACK_IMAGE_HEIGHT) -#endif -#ifdef UNPACK_SKIP_IMAGES - VAR_INT(UNPACK_SKIP_IMAGES) -#endif - VAR_INT(UNPACK_ROW_LENGTH) - VAR_INT(UNPACK_SKIP_ROWS) - VAR_INT(UNPACK_SKIP_PIXELS) - VAR_INT(UNPACK_ALIGNMENT) - - VAR_BOOL(PACK_SWAP_BYTES) - VAR_BOOL(PACK_LSB_FIRST) -#ifdef PACK_IMAGE_HEIGHT - VAR_INT(PACK_IMAGE_HEIGHT) -#endif -#ifdef PACK_SKIP_IMAGES - VAR_INT(PACK_SKIP_IMAGES) -#endif - VAR_INT(PACK_ROW_LENGTH) - VAR_INT(PACK_SKIP_ROWS) - VAR_INT(PACK_SKIP_PIXELS) - VAR_INT(PACK_ALIGNMENT) - - VAR_BOOL(MAP_COLOR) - VAR_BOOL(MAP_STENCIL) - VAR_INT(INDEX_SHIFT) - VAR_INT(INDEX_OFFSET) - VAR_FLOAT(RED_SCALE) - VAR_FLOAT(GREEN_SCALE) - VAR_FLOAT(BLUE_SCALE) - VAR_FLOAT(ALPHA_SCALE) - VAR_FLOAT(DEPTH_SCALE) - VAR_FLOAT(RED_BIAS) - VAR_FLOAT(GREEN_BIAS) - VAR_FLOAT(BLUE_BIAS) - VAR_FLOAT(ALPHA_BIAS) - VAR_FLOAT(DEPTH_BIAS) - - VAR_FLOAT(ZOOM_X) - VAR_FLOAT(ZOOM_Y) - - VAR_ENUM(READ_BUFFER) - - VAR_BOOL(AUTO_NORMAL) - - VAR_ENUM(PERSPECTIVE_CORRECTION_HINT) - VAR_ENUM(POINT_SMOOTH_HINT) - VAR_ENUM(LINE_SMOOTH_HINT) - VAR_ENUM(POLYGON_SMOOTH_HINT) - VAR_ENUM(FOG_HINT) - - VAR_INT(MAX_LIGHTS) - VAR_INT(MAX_CLIP_PLANES) - VAR_INT(MAX_MODELVIEW_STACK_DEPTH) - VAR_INT(MAX_PROJECTION_STACK_DEPTH) - VAR_INT(MAX_TEXTURE_STACK_DEPTH) - VAR_INT(SUBPIXEL_BITS) -#ifdef GL_MAX_3D_TEXTURE_SIZE - VAR_INT(MAX_3D_TEXTURE_SIZE) -#endif - VAR_INT(MAX_TEXTURE_SIZE) - VAR_INT(MAX_PIXEL_MAP_TABLE) - VAR_INT(MAX_NAME_STACK_DEPTH) - VAR_INT(MAX_LIST_NESTING) - VAR_INT(MAX_EVAL_ORDER) - VAR_INT(MAX_VIEWPORT_DIMS) - VAR_INT(MAX_ATTRIB_STACK_DEPTH) - VAR_INT(MAX_CLIENT_ATTRIB_STACK_DEPTH) - VAR_INT(AUX_BUFFERS) - VAR_BOOL(RGBA_MODE) - VAR_BOOL(INDEX_MODE) - VAR_BOOL(DOUBLEBUFFER) - VAR_BOOL(STEREO) -#ifdef GL_ALIASED_POINT_SIZE_RANGE - VAR_FLOAT2(ALIASED_POINT_SIZE_RANGE) -#endif -#ifdef GL_POINT_SIZE_RANGE - VAR_FLOAT2(POINT_SIZE_RANGE) /* SMOOTH_POINT_SIZE_RANGE */ -#endif - VAR_FLOAT(POINT_SIZE_GRANULARITY) /* SMOOTH_POINT_SIZE_GRANULARITY */ -#ifdef GL_ALIASED_LINE_WIDTH_RANGE - VAR_FLOAT2(ALIASED_LINE_WIDTH_RANGE) -#endif - VAR_FLOAT2(LINE_WIDTH_RANGE) /* SMOOTH_LINE_WIDTH_RANGE */ - VAR_FLOAT(LINE_WIDTH_GRANULARITY) /* SMOOTH_LINE_WIDTH_GRANULARITY */ - -#ifdef GL_MAX_ELEMENTS_INDICES - VAR_INT(MAX_ELEMENTS_INDICES) -#endif -#ifdef GL_MAX_ELEMENTS_VERTICES - VAR_INT(MAX_ELEMENTS_VERTICES) -#endif - VAR_INT(RED_BITS) - VAR_INT(GREEN_BITS) - VAR_INT(BLUE_BITS) - VAR_INT(ALPHA_BITS) - VAR_INT(INDEX_BITS) - VAR_INT(DEPTH_BITS) - VAR_INT(STENCIL_BITS) - VAR_INT(ACCUM_RED_BITS) - VAR_INT(ACCUM_GREEN_BITS) - VAR_INT(ACCUM_BLUE_BITS) - VAR_INT(ACCUM_ALPHA_BITS) - - VAR_INT(LIST_BASE) - VAR_INT(LIST_INDEX) - VAR_ENUM(LIST_MODE) - VAR_INT(ATTRIB_STACK_DEPTH) - VAR_INT(CLIENT_ATTRIB_STACK_DEPTH) - VAR_INT(NAME_STACK_DEPTH) - VAR_ENUM(RENDER_MODE) - VAR_PTR(SELECTION_BUFFER_POINTER) - VAR_INT(SELECTION_BUFFER_SIZE) - VAR_PTR(FEEDBACK_BUFFER_POINTER) - VAR_INT(FEEDBACK_BUFFER_SIZE) - VAR_ENUM(FEEDBACK_BUFFER_TYPE) - - /* glGetError() */ -} - -/***************************************************************************/ - -/*#define TEST*/ -#ifdef TEST - -#include - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition(0, 0); - glutInitWindowSize(400, 300); - glutInitDisplayMode(GLUT_RGB); - glutCreateWindow(argv[0]); - dump_opengl_state(stdout); - return 0; -} - -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/errcheck.c b/nx-X11/extras/Mesa_6.4.2/progs/util/errcheck.c deleted file mode 100644 index fe9c2973c3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/errcheck.c +++ /dev/null @@ -1,27 +0,0 @@ -/* errcheck.c */ - - -/* - * Call this function in your rendering loop to check for GL errors - * during development. Remove from release code. - * - * Written by Brian Paul and in the public domain. - */ - - -#include -#include -#incldue - - - -GLboolean CheckError( const char *message ) -{ - GLenum error = glGetError(); - if (error) { - char *err = (char *) gluErrorString( error ); - fprintf( stderr, "GL Error: %s at %s\n", err, message ); - return GL_TRUE; - } - return GL_FALSE; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/glstate.c b/nx-X11/extras/Mesa_6.4.2/progs/util/glstate.c deleted file mode 100644 index 4c5db13ec7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/glstate.c +++ /dev/null @@ -1,504 +0,0 @@ -/* $Id: glstate.c,v 1.1 1999/08/19 00:55:42 jtg Exp $ */ - -/* - * Print GL state information (for debugging) - * Copyright (C) 1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * $Log: glstate.c,v $ - * Revision 1.1 1999/08/19 00:55:42 jtg - * Initial revision - * - * Revision 1.4 1999/06/19 01:36:43 brianp - * more features added - * - * Revision 1.3 1999/02/24 05:16:20 brianp - * added still more records to EnumTable - * - * Revision 1.2 1998/11/24 03:47:54 brianp - * added more records to EnumTable - * - * Revision 1.1 1998/11/24 03:41:16 brianp - * Initial revision - * - */ - - - -#include -#include -#include -#include -#include "glstate.h" - - -#define FLOAT 1 -#define INT 2 -#define DOUBLE 3 -#define BOOLEAN 4 -#define ENUM 5 -#define VOID 6 -#define LAST_TOKEN ~0 - - -struct EnumRecord { - GLenum enumerator; /* GLenum constant */ - const char *string; /* string name */ - int getType; /* INT, FLOAT, DOUBLE, BOOLEAN, ENUM, or VOID */ - int getCount; /* number of values returned by the glGet*v() call */ -}; - - -/* XXX Lots more records to add here! Help, anyone? */ - -static struct EnumRecord EnumTable[] = { - { GL_ACCUM_RED_BITS, "GL_ACCUM_RED_BITS", INT, 1 }, - { GL_ACCUM_GREEN_BITS, "GL_ACCUM_GREEN_BITS", INT, 1 }, - { GL_ACCUM_BLUE_BITS, "GL_ACCUM_BLUE_BITS", INT, 1 }, - { GL_ACCUM_ALPHA_BITS, "GL_ACCUM_ALPHA_BITS", INT, 1 }, - { GL_ACCUM_CLEAR_VALUE, "GL_ACCUM_CLEAR_VALUE", FLOAT, 4 }, - { GL_ALPHA_BIAS, "GL_ALPHA_BIAS", FLOAT, 1 }, - { GL_ALPHA_BITS, "GL_ALPHA_BITS", INT, 1 }, - { GL_ALPHA_SCALE, "GL_ALPHA_SCALE", FLOAT, 1 }, - { GL_ALPHA_TEST, "GL_ALPHA_TEST", BOOLEAN, 1 }, - { GL_ALPHA_TEST_FUNC, "GL_ALPHA_TEST_FUNC", ENUM, 1 }, - { GL_ALWAYS, "GL_ALWAYS", ENUM, 0 }, - { GL_ALPHA_TEST_REF, "GL_ALPHA_TEST_REF", FLOAT, 1 }, - { GL_ATTRIB_STACK_DEPTH, "GL_ATTRIB_STACK_DEPTH", INT, 1 }, - { GL_AUTO_NORMAL, "GL_AUTO_NORMAL", BOOLEAN, 1 }, - { GL_AUX_BUFFERS, "GL_AUX_BUFFERS", INT, 1 }, - { GL_BLEND, "GL_BLEND", BOOLEAN, 1 }, - { GL_BLEND_DST, "GL_BLEND_DST", ENUM, 1 }, - { GL_BLEND_SRC, "GL_BLEND_SRC", ENUM, 1 }, - { GL_BLUE_BIAS, "GL_BLUE_BIAS", FLOAT, 1 }, - { GL_BLUE_BITS, "GL_BLUE_BITS", INT, 1 }, - { GL_BLUE_SCALE, "GL_BLUE_SCALE", FLOAT, 1 }, - - { GL_CLAMP_TO_EDGE, "GL_CLAMP_TO_EDGE", ENUM, 0 }, - { GL_CLEAR, "GL_CLEAR", ENUM, 0 }, - { GL_CLIENT_ATTRIB_STACK_DEPTH, "GL_CLIENT_ATTRIB_STACK_DEPTH", INT, 1 }, - { GL_CLIP_PLANE0, "GL_CLIP_PLANE0", BOOLEAN, 1 }, - { GL_CLIP_PLANE1, "GL_CLIP_PLANE1", BOOLEAN, 1 }, - { GL_CLIP_PLANE2, "GL_CLIP_PLANE2", BOOLEAN, 1 }, - { GL_CLIP_PLANE3, "GL_CLIP_PLANE3", BOOLEAN, 1 }, - { GL_CLIP_PLANE4, "GL_CLIP_PLANE4", BOOLEAN, 1 }, - { GL_CLIP_PLANE5, "GL_CLIP_PLANE5", BOOLEAN, 1 }, - { GL_COEFF, "GL_COEEF", ENUM, 0 }, - { GL_COLOR, "GL_COLOR", ENUM, 0 }, - { GL_COLOR_BUFFER_BIT, "GL_COLOR_BUFFER_BIT", ENUM, 0 }, - { GL_COLOR_CLEAR_VALUE, "GL_COLOR_CLEAR_VALUE", FLOAT, 4 }, - { GL_COLOR_INDEX, "GL_COLOR_INDEX", ENUM, 0 }, - { GL_COLOR_MATERIAL, "GL_COLOR_MATERIAL", BOOLEAN, 1 }, - { GL_COLOR_MATERIAL_FACE, "GL_COLOR_MATERIAL_FACE", ENUM, 1 }, - { GL_COLOR_MATERIAL_PARAMETER, "GL_COLOR_MATERIAL_PARAMETER", ENUM, 1 }, - { GL_COLOR_WRITEMASK, "GL_COLOR_WRITEMASK", BOOLEAN, 4 }, - { GL_COMPILE, "GL_COMPILE", ENUM, 0 }, - { GL_COMPILE_AND_EXECUTE, "GL_COMPILE_AND_EXECUTE", ENUM, 0 }, - { GL_COPY, "GL_COPY", ENUM, 0 }, - { GL_COPY_INVERTED, "GL_COPY_INVERTED", ENUM, 0 }, - { GL_COPY_PIXEL_TOKEN, "GL_COPY_PIXEL_TOKEN", ENUM, 0 }, - { GL_CULL_FACE, "GL_CULL_FACE", BOOLEAN, 1 }, - { GL_CULL_FACE_MODE, "GL_CULL_FACE_MODE", ENUM, 1 }, - { GL_CURRENT_BIT, "GL_CURRENT_BIT", ENUM, 0 }, - { GL_CURRENT_COLOR, "GL_CURRENT_COLOR", FLOAT, 4 }, - { GL_CURRENT_INDEX, "GL_CURRENT_INDEX", INT, 1 }, - { GL_CURRENT_NORMAL, "GL_CURRENT_NORMAL", FLOAT, 3 }, - { GL_CURRENT_RASTER_COLOR, "GL_CURRENT_RASTER_COLOR", FLOAT, 4 }, - { GL_CURRENT_RASTER_DISTANCE, "GL_CURRENT_RASTER_DISTANCE", FLOAT, 1 }, - { GL_CURRENT_RASTER_INDEX, "GL_CURRENT_RASTER_INDEX", INT, 1 }, - { GL_CURRENT_RASTER_POSITION, "GL_CURRENT_RASTER_POSITION", FLOAT, 4 }, - { GL_CURRENT_RASTER_TEXTURE_COORDS, "GL_CURRENT_RASTER_TEXTURE_COORDS", FLOAT, 4 }, - { GL_CURRENT_RASTER_POSITION_VALID, "GL_CURRENT_RASTER_POSITION_VALID", BOOLEAN, 1 }, - { GL_CURRENT_TEXTURE_COORDS, "GL_CURRENT_TEXTURE_COORDS", FLOAT, 4 }, - { GL_CW, "GL_CW", ENUM, 0 }, - { GL_CCW, "GL_CCW", ENUM, 0 }, - - { GL_DECAL, "GL_DECAL", ENUM, 0 }, - { GL_DECR, "GL_DECR", ENUM, 0 }, - { GL_DEPTH, "GL_DEPTH", ENUM, 0 }, - { GL_DEPTH_BIAS, "GL_DEPTH_BIAS", FLOAT, 1 }, - { GL_DEPTH_BITS, "GL_DEPTH_BITS", INT, 1 }, - { GL_DEPTH_BUFFER_BIT, "GL_DEPTH_BUFFER_BIT", ENUM, 0 }, - { GL_DEPTH_CLEAR_VALUE, "GL_DEPTH_CLEAR_VALUE", FLOAT, 1 }, - { GL_DEPTH_COMPONENT, "GL_DEPTH_COMPONENT", ENUM, 0 }, - { GL_DEPTH_FUNC, "GL_DEPTH_FUNC", ENUM, 1 }, - { GL_DEPTH_RANGE, "GL_DEPTH_RANGE", FLOAT, 2 }, - { GL_DEPTH_SCALE, "GL_DEPTH_SCALE", FLOAT, 1 }, - { GL_DEPTH_TEST, "GL_DEPTH_TEST", ENUM, 1 }, - { GL_DEPTH_WRITEMASK, "GL_DEPTH_WRITEMASK", BOOLEAN, 1 }, - { GL_DIFFUSE, "GL_DIFFUSE", ENUM, 0 }, /*XXX*/ - { GL_DITHER, "GL_DITHER", BOOLEAN, 1 }, - { GL_DOMAIN, "GL_DOMAIN", ENUM, 0 }, - { GL_DONT_CARE, "GL_DONT_CARE", ENUM, 0 }, - { GL_DOUBLE, "GL_DOUBLE", ENUM, 0 }, - { GL_DOUBLEBUFFER, "GL_DOUBLEBUFFER", BOOLEAN, 1}, - { GL_DRAW_BUFFER, "GL_DRAW_BUFFER", ENUM, 1 }, - { GL_DRAW_PIXEL_TOKEN, "GL_DRAW_PIXEL_TOKEN", ENUM, 0 }, - { GL_DST_ALPHA, "GL_DST_ALPHA", ENUM, 0 }, - { GL_DST_COLOR, "GL_DST_COLOR", ENUM, 0 }, - - { GL_EDGE_FLAG, "GL_EDGE_FLAG", BOOLEAN, 1 }, - /* XXX GL_EDGE_FLAG_ARRAY_* */ - { GL_EMISSION, "GL_EMISSION", ENUM, 0 }, /* XXX */ - { GL_ENABLE_BIT, "GL_ENABLE_BIT", ENUM, 0 }, - { GL_EQUAL, "GL_EQUAL", ENUM, 0 }, - { GL_EQUIV, "GL_EQUIV", ENUM, 0 }, - { GL_EVAL_BIT, "GL_EVAL_BIT", ENUM, 0 }, - { GL_EXP, "GL_EXP", ENUM, 0 }, - { GL_EXP2, "GL_EXP2", ENUM, 0 }, - { GL_EXTENSIONS, "GL_EXTENSIONS", ENUM, 0 }, - { GL_EYE_LINEAR, "GL_EYE_LINEAR", ENUM, 0 }, - { GL_EYE_PLANE, "GL_EYE_PLANE", ENUM, 0 }, - - { GL_FALSE, "GL_FALSE", ENUM, 0 }, - { GL_FASTEST, "GL_FASTEST", ENUM, 0 }, - { GL_FEEDBACK, "GL_FEEDBACK", ENUM, 0 }, - { GL_FEEDBACK_BUFFER_POINTER, "GL_FEEDBACK_BUFFER_POINTER", VOID, 0 }, - { GL_FEEDBACK_BUFFER_SIZE, "GL_FEEDBACK_BUFFER_SIZE", INT, 1 }, - { GL_FEEDBACK_BUFFER_TYPE, "GL_FEEDBACK_BUFFER_TYPE", INT, 1 }, - { GL_FILL, "GL_FILL", ENUM, 0 }, - { GL_FLAT, "GL_FLAT", ENUM, 0 }, - { GL_FLOAT, "GL_FLOAT", ENUM, 0 }, - { GL_FOG, "GL_FOG", BOOLEAN, 1 }, - { GL_FOG_BIT, "GL_FOG_BIT", ENUM, 0 }, - { GL_FOG_COLOR, "GL_FOG_COLOR", FLOAT, 4 }, - { GL_FOG_DENSITY, "GL_FOG_DENSITY", FLOAT, 1 }, - { GL_FOG_END, "GL_FOG_END", FLOAT, 1 }, - { GL_FOG_HINT, "GL_FOG_HINT", ENUM, 1 }, - { GL_FOG_INDEX, "GL_FOG_INDEX", INT, 1 }, - { GL_FOG_MODE, "GL_FOG_MODE", ENUM, 1 }, - { GL_FOG_START, "GL_FOG_START", FLOAT, 1 }, - { GL_FRONT, "GL_FRONT", ENUM, 0 }, - { GL_FRONT_AND_BACK, "GL_FRONT_AND_BACK", ENUM, 0 }, - { GL_FRONT_FACE, "GL_FRONT_FACE", ENUM, 1 }, - { GL_FRONT_LEFT, "GL_FRONT_LEFT", ENUM, 0 }, - { GL_FRONT_RIGHT, "GL_FRONT_RIGHT", ENUM, 0 }, - - { GL_GEQUAL, "GL_GEQUAL", ENUM, 0 }, - { GL_GREATER, "GL_GREATER", ENUM, 0 }, - { GL_GREEN, "GL_GREEN", ENUM, 0 }, - { GL_GREEN_BIAS, "GL_GREEN_BIAS", FLOAT, 1 }, - { GL_GREEN_BITS, "GL_GREEN_BITS", INT, 1 }, - { GL_GREEN_SCALE, "GL_GREEN_SCALE", FLOAT, 1 }, - - - - { GL_LESS, "GL_LESS", ENUM, 0 }, - { GL_LEQUAL, "GL_LEQUAL", ENUM, 0 }, - { GL_LIGHTING, "GL_LIGHTING", BOOLEAN, 1 }, - { GL_LINE_SMOOTH, "GL_LINE_SMOOTH", BOOLEAN, 1 }, - { GL_LINE_STIPPLE, "GL_LINE_STIPPLE", BOOLEAN, 1 }, - { GL_LINE_STIPPLE_PATTERN, "GL_LINE_STIPPLE_PATTERN", INT, 1 }, - { GL_LINE_STIPPLE_REPEAT, "GL_LINE_STIPPLE_REPEAT", INT, 1 }, - { GL_LINE_WIDTH, "GL_LINE_WIDTH", FLOAT, 1 }, - - { GL_MODELVIEW_MATRIX, "GL_MODELVIEW_MATRIX", DOUBLE, 16 }, - - { GL_NEVER, "GL_NEVER", ENUM, 0 }, - { GL_NOTEQUAL, "GL_NOTEQUAL", ENUM, 0 }, - - { GL_PROJECTION_MATRIX, "GL_PROJECTION_MATRIX", FLOAT, 16 }, - - { GL_PACK_SWAP_BYTES, "GL_PACK_SWAP_BYTES", INT, 1 }, - { GL_PACK_LSB_FIRST, "GL_PACK_LSB_FIRST", INT, 1 }, - { GL_PACK_ROW_LENGTH, "GL_PACK_ROW_LENGTH", INT, 1 }, - { GL_PACK_SKIP_PIXELS, "GL_PACK_SKIP_PIXELS", INT, 1 }, - { GL_PACK_SKIP_ROWS, "GL_PACK_SKIP_ROWS", INT, 1 }, - { GL_PACK_ALIGNMENT, "GL_PACK_ALIGNMENT", INT, 1 }, - - { GL_TRUE, "GL_TRUE", ENUM, 0 }, - - { GL_UNPACK_SWAP_BYTES, "GL_UNPACK_SWAP_BYTES", INT, 1 }, - { GL_UNPACK_LSB_FIRST, "GL_UNPACK_LSB_FIRST", INT, 1 }, - { GL_UNPACK_ROW_LENGTH, "GL_UNPACK_ROW_LENGTH", INT, 1 }, - { GL_UNPACK_SKIP_PIXELS, "GL_UNPACK_SKIP_PIXELS", INT, 1 }, - { GL_UNPACK_SKIP_ROWS, "GL_UNPACK_SKIP_ROWS", INT, 1 }, - { GL_UNPACK_ALIGNMENT, "GL_UNPACK_ALIGNMENT", INT, 1 }, - - { GL_VIEWPORT, "GL_VIEWPORT", INT, 4 }, - - - /* - * Extensions - */ - -#if defined(GL_EXT_blend_minmax) - { GL_BLEND_EQUATION_EXT, "GL_BLEND_EQUATION_EXT", ENUM, 1 }, -#endif -#if defined(GL_EXT_blend_color) - { GL_BLEND_COLOR_EXT, "GL_BLEND_COLOR_EXT", FLOAT, 4 }, -#endif -#if defined(GL_EXT_point_parameters) - { GL_DISTANCE_ATTENUATION_EXT, "GL_DISTANCE_ATTENUATION_EXT", FLOAT, 1 }, -#endif -#if defined(GL_INGR_blend_func_separate) - { GL_BLEND_SRC_RGB_INGR, "GL_BLEND_SRC_RGB_INGR", ENUM, 1 }, - { GL_BLEND_DST_RGB_INGR, "GL_BLEND_DST_RGB_INGR", ENUM, 1 }, - { GL_BLEND_SRC_ALPHA_INGR, "GL_BLEND_SRC_ALPHA_INGR", ENUM, 1 }, - { GL_BLEND_DST_ALPHA_INGR, "GL_BLEND_DST_ALPHA_INGR", ENUM, 1 }, -#endif - - - { LAST_TOKEN, "", 0, 0 } -}; - - -static const struct EnumRecord *FindRecord( GLenum var ) -{ - int i; - for (i = 0; EnumTable[i].enumerator != LAST_TOKEN; i++) { - if (EnumTable[i].enumerator == var) { - return &EnumTable[i]; - } - } - return NULL; -} - - - -/* - * Return the string label for the given enum. - */ -const char *GetEnumString( GLenum var ) -{ - const struct EnumRecord *rec = FindRecord(var); - if (rec) - return rec->string; - else - return NULL; -} - - - -/* - * Print current value of the given state variable. - */ -void PrintState( int indent, GLenum var ) -{ - const struct EnumRecord *rec = FindRecord(var); - - while (indent-- > 0) - putchar(' '); - - if (rec) { - if (rec->getCount <= 0) { - assert(rec->getType == ENUM); - printf("%s is not a state variable\n", rec->string); - } - else { - switch (rec->getType) { - case INT: - { - GLint values[100]; - int i; - glGetIntegerv(rec->enumerator, values); - printf("%s = ", rec->string); - for (i = 0; i < rec->getCount; i++) - printf("%d ", values[i]); - printf("\n"); - } - break; - case FLOAT: - { - GLfloat values[100]; - int i; - glGetFloatv(rec->enumerator, values); - printf("%s = ", rec->string); - for (i = 0; i < rec->getCount; i++) - printf("%f ", values[i]); - printf("\n"); - } - break; - case DOUBLE: - { - GLdouble values[100]; - int i; - glGetDoublev(rec->enumerator, values); - printf("%s = ", rec->string); - for (i = 0; i < rec->getCount; i++) - printf("%f ", (float) values[i]); - printf("\n"); - } - break; - case BOOLEAN: - { - GLboolean values[100]; - int i; - glGetBooleanv(rec->enumerator, values); - printf("%s = ", rec->string); - for (i = 0; i < rec->getCount; i++) - printf("%s ", values[i] ? "GL_TRUE" : "GL_FALSE"); - printf("\n"); - } - break; - case ENUM: - { - GLint values[100]; - int i; - glGetIntegerv(rec->enumerator, values); - printf("%s = ", rec->string); - for (i = 0; i < rec->getCount; i++) { - const char *str = GetEnumString((GLenum) values[i]); - if (str) - printf("%s ", str); - else - printf("??? "); - } - printf("\n"); - } - break; - case VOID: - { - GLvoid *values[100]; - int i; - glGetPointerv(rec->enumerator, values); - printf("%s = ", rec->string); - for (i = 0; i < rec->getCount; i++) { - printf("%p ", values[i]); - } - printf("\n"); - } - break; - default: - printf("fatal error in PrintState()\n"); - abort(); - } - } - } - else { - printf("Unknown GLenum passed to PrintState()\n"); - } -} - - - -/* - * Print all glPixelStore-related state. - * NOTE: Should write similar functions for lighting, texturing, etc. - */ -void PrintPixelStoreState( void ) -{ - const GLenum enums[] = { - GL_PACK_SWAP_BYTES, - GL_PACK_LSB_FIRST, - GL_PACK_ROW_LENGTH, - GL_PACK_SKIP_PIXELS, - GL_PACK_SKIP_ROWS, - GL_PACK_ALIGNMENT, - GL_UNPACK_SWAP_BYTES, - GL_UNPACK_LSB_FIRST, - GL_UNPACK_ROW_LENGTH, - GL_UNPACK_SKIP_PIXELS, - GL_UNPACK_SKIP_ROWS, - GL_UNPACK_ALIGNMENT, - 0 - }; - int i; - printf("Pixel pack/unpack state:\n"); - for (i = 0; enums[i]; i++) { - PrintState(3, enums[i]); - } -} - - - - -/* - * Print all state for the given attribute group. - */ -void PrintAttribState( GLbitfield attrib ) -{ - static const GLenum depth_buffer_enums[] = { - GL_DEPTH_FUNC, - GL_DEPTH_CLEAR_VALUE, - GL_DEPTH_TEST, - GL_DEPTH_WRITEMASK, - 0 - }; - static const GLenum fog_enums[] = { - GL_FOG, - GL_FOG_COLOR, - GL_FOG_DENSITY, - GL_FOG_START, - GL_FOG_END, - GL_FOG_INDEX, - GL_FOG_MODE, - 0 - }; - static const GLenum line_enums[] = { - GL_LINE_SMOOTH, - GL_LINE_STIPPLE, - GL_LINE_STIPPLE_PATTERN, - GL_LINE_STIPPLE_REPEAT, - GL_LINE_WIDTH, - 0 - }; - - const GLenum *enumList = NULL; - - switch (attrib) { - case GL_DEPTH_BUFFER_BIT: - enumList = depth_buffer_enums; - printf("GL_DEPTH_BUFFER_BIT state:\n"); - break; - case GL_FOG_BIT: - enumList = fog_enums; - printf("GL_FOG_BIT state:\n"); - break; - case GL_LINE_BIT: - enumList = line_enums; - printf("GL_LINE_BIT state:\n"); - break; - default: - printf("Bad value in PrintAttribState()\n"); - } - - if (enumList) { - int i; - for (i = 0; enumList[i]; i++) - PrintState(3, enumList[i]); - } -} - - -/*#define TEST*/ -#ifdef TEST - -#include - -int main( int argc, char *argv[] ) -{ - glutInit( &argc, argv ); - glutInitWindowPosition(0, 0); - glutInitWindowSize(400, 300); - glutInitDisplayMode(GLUT_RGB); - glutCreateWindow(argv[0]); - PrintAttribState(GL_DEPTH_BUFFER_BIT); - PrintAttribState(GL_FOG_BIT); - PrintAttribState(GL_LINE_BIT); - PrintState(0, GL_ALPHA_BITS); - PrintState(0, GL_VIEWPORT); - PrintState(0, GL_ALPHA_TEST_FUNC); - PrintState(0, GL_MODELVIEW_MATRIX); - PrintState(0, GL_ALWAYS); - PrintPixelStoreState(); - return 0; -} - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/glstate.h b/nx-X11/extras/Mesa_6.4.2/progs/util/glstate.h deleted file mode 100644 index 1aa4d21d8e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/glstate.h +++ /dev/null @@ -1,53 +0,0 @@ -/* $Id: glstate.h,v 1.1 1999/08/19 00:55:42 jtg Exp $ */ - -/* - * Print GL state information (for debugging) - * Copyright (C) 1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * $Log: glstate.h,v $ - * Revision 1.1 1999/08/19 00:55:42 jtg - * Initial revision - * - * Revision 1.2 1999/06/19 01:36:43 brianp - * more features added - * - * Revision 1.1 1998/11/24 03:41:16 brianp - * Initial revision - * - */ - - -#ifndef GLSTATE_H -#define GLSTATE_H - - -#include - - -extern const char *GetNameString( GLenum var ); - -extern void PrintState( int indent, GLenum var ); - -extern void PrintAttribState( GLbitfield attrib ); - -extern void PrintPixelStoreState( void ); - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/glutskel.c b/nx-X11/extras/Mesa_6.4.2/progs/util/glutskel.c deleted file mode 100644 index b203a507a4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/glutskel.c +++ /dev/null @@ -1,157 +0,0 @@ -/* $Id: glutskel.c,v 1.2 2004/04/22 00:47:28 brianp Exp $ */ - -/* - * A skeleton/template GLUT program - * - * Written by Brian Paul and in the public domain. - */ - - -/* - * $Log: glutskel.c,v $ - * Revision 1.2 2004/04/22 00:47:28 brianp - * minor clean-ups - * - * Revision 1.1.1.1 1999/08/19 00:55:42 jtg - * Imported sources - * - * Revision 1.2 1998/11/07 14:20:14 brianp - * added simple rotation, animation of cube - * - * Revision 1.1 1998/11/07 14:14:37 brianp - * Initial revision - * - */ - - -#include -#include -#include -#include - - -static GLfloat Xrot = 0, Yrot = 0, Zrot = 0; -static GLboolean Anim = GL_FALSE; - - -static void -Idle(void) -{ - Xrot += 3.0; - Yrot += 4.0; - Zrot += 2.0; - glutPostRedisplay(); -} - - -static void -Draw(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - glRotatef(Xrot, 1, 0, 0); - glRotatef(Yrot, 0, 1, 0); - glRotatef(Zrot, 0, 0, 1); - - glutSolidCube(2.0); - - glPopMatrix(); - - glutSwapBuffers(); -} - - -static void -Reshape(int width, int height) -{ - glViewport(0, 0, width, height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -15.0); -} - - -static void -Key(unsigned char key, int x, int y) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case 'a': - Anim = !Anim; - if (Anim) - glutIdleFunc(Idle); - else - glutIdleFunc(NULL); - break; - case 'z': - Zrot -= step; - break; - case 'Z': - Zrot += step; - break; - case 27: - exit(0); - break; - } - glutPostRedisplay(); -} - - -static void -SpecialKey(int key, int x, int y) -{ - const GLfloat step = 3.0; - (void) x; - (void) y; - switch (key) { - case GLUT_KEY_UP: - Xrot -= step; - break; - case GLUT_KEY_DOWN: - Xrot += step; - break; - case GLUT_KEY_LEFT: - Yrot -= step; - break; - case GLUT_KEY_RIGHT: - Yrot += step; - break; - } - glutPostRedisplay(); -} - - -static void -Init(void) -{ - /* setup lighting, etc */ - glEnable(GL_DEPTH_TEST); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); -} - - -int -main(int argc, char *argv[]) -{ - glutInit(&argc, argv); - glutInitWindowPosition(0, 0); - glutInitWindowSize(400, 400); - glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); - glutCreateWindow(argv[0]); - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutSpecialFunc(SpecialKey); - glutDisplayFunc(Draw); - if (Anim) - glutIdleFunc(Idle); - Init(); - glutMainLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/idproj.c b/nx-X11/extras/Mesa_6.4.2/progs/util/idproj.c deleted file mode 100644 index d5ee3409f3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/idproj.c +++ /dev/null @@ -1,26 +0,0 @@ -/* idproj.c */ - - -/* - * Setup an identity projection such that glVertex(x,y) maps to - * window coordinate (x,y). - * - * Written by Brian Paul and in the public domain. - */ - - - - - -void IdentityProjection( GLint x, GLint y, GLsizei width, GLsizei height ) -{ - glViewport( x, y, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( (GLdouble) x, (GLdouble) y, - (GLdouble) width, (GLdouble) height, - -1.0, 1.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); -} - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/imagesgi.cpp b/nx-X11/extras/Mesa_6.4.2/progs/util/imagesgi.cpp deleted file mode 100644 index f5128aabec..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/imagesgi.cpp +++ /dev/null @@ -1,369 +0,0 @@ -/****************************************************************************** -** Filename : imageSgi.cpp -** UNCLASSIFIED -** -** Description : Utility to read SGI image format files. This code was -** originally a SGI image loading utility provided with the -** Mesa 3D library @ http://www.mesa3d.org by Brain Paul. -** This has been extended to read all SGI image formats -** (e.g. INT, INTA, RGB, RGBA). -** -** Revision History: -** Date Name Description -** 06/07/99 BRC Initial Release -** -** Note: -** -** The SGI Image Data (if not RLE) -** -** If the image is stored verbatim (without RLE), then image data directly -** follows the 512 byte header. The data for each scanline of the first -** channel is written first. If the image has more than 1 channel, all -** the data for the first channel is written, followed by the remaining -** channels. If the BPC value is 1, then each scanline is written as XSIZE -** bytes. If the BPC value is 2, then each scanline is written as XSIZE -** shorts. These shorts are stored in the byte order described above. -** -******************************************************************************/ -#define __IMAGESGI_CPP - -#include "imagesgi.h" - -#include -#include -#include -#include -#include - -struct sImageSgiRaw -{ - struct sImageSgiHeader header; - unsigned char *chan0; - unsigned char *chan1; - unsigned char *chan2; - unsigned char *chan3; - unsigned int *rowStart; - int *rowSize; -}; - -// Static routines -static struct sImageSgiRaw *ImageSgiRawOpen(char const * const fileName); -static void ImageSgiRawClose(struct sImageSgiRaw *raw); -static void ImageSgiRawGetRow(struct sImageSgiRaw *raw, unsigned char *buf, - int y, int z); -static void ImageSgiRawGetData(struct sImageSgiRaw *raw, struct sImageSgi -*final); -static void *SwitchEndian16(void *value); -static void *SwitchEndian32(void *value); - -// Static variables -FILE *mFp = NULL; -unsigned char *mChanTmp = NULL; - - -/*****************************************************************************/ -struct sImageSgi *ImageSgiOpen(char const * const fileName) -{ - struct sImageSgiRaw *raw = NULL; - struct sImageSgi *final = NULL; - - raw = ImageSgiRawOpen(fileName); - final = new struct sImageSgi; - - assert(final); - if(final) - { - final->header = raw->header; - final->data = NULL; - ImageSgiRawGetData(raw, final); - ImageSgiRawClose(raw); - } - - return final; -} // ImageSgiRawOpen - - -/*****************************************************************************/ -void ImageSgiClose(struct sImageSgi *image) -{ - - if(image) - { - if(image->data) - delete[] image->data; - image->data = NULL; - delete image; - } - image = NULL; - - return; -} // ImageSgiClose - - -/*****************************************************************************/ -static struct sImageSgiRaw *ImageSgiRawOpen(char const * const fileName) -{ - struct sImageSgiRaw *raw = NULL; - int x; - int i; - bool swapFlag = false; - union - { - int testWord; - char testByte[4]; - } endianTest; - endianTest.testWord = 1; - - // Determine endianess of platform. - if(endianTest.testByte[0] == 1) - swapFlag = true; - else - swapFlag = false; - - raw = new struct sImageSgiRaw; - - assert(raw); - if(raw) - { - raw->chan0 = NULL; - raw->chan1 = NULL; - raw->chan2 = NULL; - raw->chan3 = NULL; - raw->rowStart = NULL; - raw->rowSize = NULL; - mFp = fopen(fileName, "rb"); - assert(mFp); - - fread(&raw->header, sizeof(struct sImageSgiHeader), 1, mFp); - if(swapFlag == true) - { - SwitchEndian16(&raw->header.magic); - SwitchEndian16(&raw->header.type); - SwitchEndian16(&raw->header.dim); - SwitchEndian16(&raw->header.xsize); - SwitchEndian16(&raw->header.ysize); - SwitchEndian16(&raw->header.zsize); - } - - mChanTmp = new unsigned char[raw->header.xsize * raw->header.ysize]; - assert(mChanTmp); - switch(raw->header.zsize) - { - case 4: - raw->chan3 = new unsigned char[raw->header.xsize * -raw->header.ysize]; - assert(raw->chan3); - case 3: - raw->chan2 = new unsigned char[raw->header.xsize * -raw->header.ysize]; - assert(raw->chan2); - case 2: - raw->chan1 = new unsigned char[raw->header.xsize * -raw->header.ysize]; - assert(raw->chan1); - case 1: - raw->chan0 = new unsigned char[raw->header.xsize * -raw->header.ysize]; - assert(raw->chan0); - } - - if(raw->header.type == IMAGE_SGI_TYPE_RLE) - { - x = raw->header.ysize * raw->header.zsize * sizeof(unsigned int); - raw->rowStart = new unsigned int[x]; - raw->rowSize = new int[x]; - - fseek(mFp, sizeof(struct sImageSgiHeader), SEEK_SET); - fread(raw->rowStart, 1, x, mFp); - fread(raw->rowSize, 1, x, mFp); - - if(swapFlag == true) - { - for(i=0; irowStart[i]); - for(i=0; irowSize[i]); - } - - } - - } - - return raw; -} // ImageSgiRawOpen - - -/*****************************************************************************/ -static void ImageSgiRawClose(struct sImageSgiRaw *raw) -{ - - fclose(mFp); - mFp = NULL; - - if(mChanTmp) - delete[] mChanTmp; - mChanTmp = NULL; - - if(raw->chan0) - delete[] raw->chan0; - raw->chan0 = NULL; - - if(raw->chan1) - delete[] raw->chan1; - raw->chan1 = NULL; - - if(raw->chan2) - delete[] raw->chan2; - raw->chan2 = NULL; - - if(raw->chan3) - delete[] raw->chan3; - raw->chan3 = NULL; - - if(raw) - delete raw; - raw = NULL; - - return; -} // ImageSgiRawClose - - -/*****************************************************************************/ -static void ImageSgiRawGetRow(struct sImageSgiRaw *raw, unsigned char *buf, - int y, int z) -{ - unsigned char *iPtr = NULL; - unsigned char *oPtr = NULL; - unsigned char pixel; - int count; - - if((raw->header.type & 0xFF00) == 0x0100) - { - fseek(mFp, raw->rowStart[y+z*raw->header.ysize], SEEK_SET); - fread(mChanTmp, 1, (unsigned int)raw->rowSize[y+z*raw->header.ysize], -mFp); - iPtr = mChanTmp; - oPtr = buf; - while(1) - { - pixel = *iPtr++; - count = (int)(pixel & 0x7F); - if(!count) - { - return; - } - if (pixel & 0x80) - { - while (count--) - { - *oPtr++ = *iPtr++; - } - } - else - { - pixel = *iPtr++; - while (count--) - { - *oPtr++ = pixel; - } - } - } - } - else - { - fseek(mFp, - sizeof(struct sImageSgiHeader)+(y*raw->header.xsize) + - (z*raw->header.xsize*raw->header.ysize), - SEEK_SET); - fread(buf, 1, raw->header.xsize, mFp); - } - - return; -} // ImageSgiRawGetRow - - -/*****************************************************************************/ -static void ImageSgiRawGetData(struct sImageSgiRaw *raw, struct sImageSgi -*final) -{ - unsigned char *ptr = NULL; - int i, j; - - final->data = - new unsigned -char[raw->header.xsize*raw->header.ysize*raw->header.zsize]; - assert(final->data); - - ptr = final->data; - for(i=0; iheader.ysize; i++) - { - switch(raw->header.zsize) - { - case 1: - ImageSgiRawGetRow(raw, raw->chan0, i, 0); - for(j=0; jheader.xsize; j++) - *(ptr++) = raw->chan0[j]; - break; - case 2: - ImageSgiRawGetRow(raw, raw->chan0, i, 0); - ImageSgiRawGetRow(raw, raw->chan1, i, 1); - for(j=0; jheader.xsize; j++) - { - *(ptr++) = raw->chan0[j]; - *(ptr++) = raw->chan1[j]; - } - break; - case 3: - ImageSgiRawGetRow(raw, raw->chan0, i, 0); - ImageSgiRawGetRow(raw, raw->chan1, i, 1); - ImageSgiRawGetRow(raw, raw->chan2, i, 2); - for(j=0; jheader.xsize; j++) - { - *(ptr++) = raw->chan0[j]; - *(ptr++) = raw->chan1[j]; - *(ptr++) = raw->chan2[j]; - } - break; - case 4: - ImageSgiRawGetRow(raw, raw->chan0, i, 0); - ImageSgiRawGetRow(raw, raw->chan1, i, 1); - ImageSgiRawGetRow(raw, raw->chan2, i, 2); - ImageSgiRawGetRow(raw, raw->chan3, i, 3); - for(j=0; jheader.xsize; j++) - { - *(ptr++) = raw->chan0[j]; - *(ptr++) = raw->chan1[j]; - *(ptr++) = raw->chan2[j]; - *(ptr++) = raw->chan3[j]; - } - break; - } - } - - return; -} // ImageSgiRawGetData - - -/*****************************************************************************/ -static void *SwitchEndian16(void *value) -{ - short value16 = *(short *) value; - value16 = ((value16 & 0xff00) >> 8L) + - ((value16 & 0x00ff) << 8L); - *(short *)value = value16; - return value; -} // SwitchEndian16 - - -/*****************************************************************************/ -static void *SwitchEndian32(void *value) -{ - int value32 = *(int *) value; - value32 = ((value32 & 0xff000000) >> 24L) + - ((value32 & 0x00ff0000) >> 8) + - ((value32 & 0x0000ff00) << 8) + - ((value32 & 0x000000ff) << 24L); - *(int *)value = value32; - return value; -} // SwitchEndian32 - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/imagesgi.h b/nx-X11/extras/Mesa_6.4.2/progs/util/imagesgi.h deleted file mode 100644 index e5ecece49d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/imagesgi.h +++ /dev/null @@ -1,55 +0,0 @@ -/****************************************************************************** -** Filename : imageSgi.h -** UNCLASSIFIED -** -** Description : Utility to read SGI image format files. This code was -** originally a SGI image loading utility provided with the -** Mesa 3D library @ http://www.mesa3d.org by Brain Paul. -** This has been extended to read all SGI image formats -** (e.g. INT, INTA, RGB, RGBA). -** -** Revision History: -** Date Name Description -** 06/08/99 BRC Initial Release -** -******************************************************************************/ - -#ifndef __IMAGESGI_H -#define __IMAGESGI_H - -#define IMAGE_SGI_TYPE_VERBATIM 0 -#define IMAGE_SGI_TYPE_RLE 1 - -struct sImageSgiHeader // 512 bytes -{ - short magic; // IRIS image file magic number (474) - char type; // Storage format (e.g. RLE or VERBATIM) - char numBytesPerPixelChannel; // Number of bytes per pixel channel - unsigned short dim; // Number of dimensions (1 to 3) - unsigned short xsize; // Width (in pixels) - unsigned short ysize; // Height (in pixels) - unsigned short zsize; // Number of channels (1 to 4) - int minimumPixelValue; // Minimum pixel value (0 to 255) - int maximumPixelValue; // Maximum pixel value (0 to 255) - char padding1[4]; // (ignored) - char imageName[80]; // Image name - int colormap; // colormap ID (0=normal, 0=dithered, - // 2=screen, 3=colormap) - char padding2[404]; // (ignored) -}; - -struct sImageSgi -{ - struct sImageSgiHeader header; - unsigned char *data; -}; - -#ifndef __IMAGESGI_CPP - -// RGB image load utility -extern struct sImageSgi *ImageSgiOpen(char const * const fileName); -extern void ImageSgiClose(struct sImageSgi *image); - -#endif - -#endif /* __IMAGESGI_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/matrix.c b/nx-X11/extras/Mesa_6.4.2/progs/util/matrix.c deleted file mode 100644 index 8be2c3111f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/matrix.c +++ /dev/null @@ -1,181 +0,0 @@ -/* - * matrix.c - * - * Some useful matrix functions. - * - * Brian Paul - * 10 Feb 2004 - */ - - - -#include -#include -#include - - -/** - * Pretty-print the given matrix. - */ -void -PrintMatrix(const float p[16]) -{ - printf("[ %6.3f %6.3f %6.3f %6.3f ]\n", p[0], p[4], p[8], p[12]); - printf("[ %6.3f %6.3f %6.3f %6.3f ]\n", p[1], p[5], p[9], p[13]); - printf("[ %6.3f %6.3f %6.3f %6.3f ]\n", p[2], p[6], p[10], p[14]); - printf("[ %6.3f %6.3f %6.3f %6.3f ]\n", p[3], p[7], p[11], p[15]); -} - - -/** - * Build a glFrustum matrix. - */ -void -Frustum(float left, float right, float bottom, float top, float nearZ, float farZ, float *m) -{ - float x = (2.0F*nearZ) / (right-left); - float y = (2.0F*nearZ) / (top-bottom); - float a = (right+left) / (right-left); - float b = (top+bottom) / (top-bottom); - float c = -(farZ+nearZ) / ( farZ-nearZ); - float d = -(2.0F*farZ*nearZ) / (farZ-nearZ); - -#define M(row,col) m[col*4+row] - M(0,0) = x; M(0,1) = 0.0F; M(0,2) = a; M(0,3) = 0.0F; - M(1,0) = 0.0F; M(1,1) = y; M(1,2) = b; M(1,3) = 0.0F; - M(2,0) = 0.0F; M(2,1) = 0.0F; M(2,2) = c; M(2,3) = d; - M(3,0) = 0.0F; M(3,1) = 0.0F; M(3,2) = -1.0F; M(3,3) = 0.0F; -#undef M -} - - -/** - * Build a glOrtho marix. - */ -void -Ortho(float left, float right, float bottom, float top, float nearZ, float farZ, float *m) -{ -#define M(row,col) m[col*4+row] - M(0,0) = 2.0F / (right-left); - M(0,1) = 0.0F; - M(0,2) = 0.0F; - M(0,3) = -(right+left) / (right-left); - - M(1,0) = 0.0F; - M(1,1) = 2.0F / (top-bottom); - M(1,2) = 0.0F; - M(1,3) = -(top+bottom) / (top-bottom); - - M(2,0) = 0.0F; - M(2,1) = 0.0F; - M(2,2) = -2.0F / (farZ-nearZ); - M(2,3) = -(farZ+nearZ) / (farZ-nearZ); - - M(3,0) = 0.0F; - M(3,1) = 0.0F; - M(3,2) = 0.0F; - M(3,3) = 1.0F; -#undef M -} - - -/** - * Decompose a projection matrix to determine original glFrustum or - * glOrtho parameters. - */ -void -DecomposeProjection( const float *m, - int *isPerspective, - float *leftOut, float *rightOut, - float *botOut, float *topOut, - float *nearOut, float *farOut) -{ - if (m[15] == 0.0) { - /* perspective */ - float p[16]; - const float x = m[0]; /* 2N / (R-L) */ - const float y = m[5]; /* 2N / (T-B) */ - const float a = m[8]; /* (R+L) / (R-L) */ - const float b = m[9]; /* (T+B) / (T-B) */ - const float c = m[10]; /* -(F+N) / (F-N) */ - const float d = m[14]; /* -2FN / (F-N) */ - - /* These equations found with simple algebra, knowing the arithmetic - * use to set up a typical perspective projection matrix in OpenGL. - */ - const float nearZ = -d / (1.0 - c); - const float farZ = (c - 1.0) * nearZ / (c + 1.0); - const float left = nearZ * (a - 1.0) / x; - const float right = 2.0 * nearZ / x + left; - const float bottom = nearZ * (b - 1.0) / y; - const float top = 2.0 * nearZ / y + bottom; - - *isPerspective = 1; - *leftOut = left; - *rightOut = right; - *botOut = bottom; - *topOut = top; - *nearOut = nearZ; - *farOut = farZ; - } - else { - /* orthographic */ - const float x = m[0]; /* 2 / (R-L) */ - const float y = m[5]; /* 2 / (T-B) */ - const float z = m[10]; /* -2 / (F-N) */ - const float a = m[12]; /* -(R+L) / (R-L) */ - const float b = m[13]; /* -(T+B) / (T-B) */ - const float c = m[14]; /* -(F+N) / (F-N) */ - /* again, simple algebra */ - const float right = -(a - 1.0) / x; - const float left = right - 2.0 / x; - const float top = -(b - 1.0) / y; - const float bottom = top - 2.0 / y; - const float farZ = (c - 1.0) / z; - const float nearZ = farZ + 2.0 / z; - - *isPerspective = 0; - *leftOut = left; - *rightOut = right; - *botOut = bottom; - *topOut = top; - *nearOut = nearZ; - *farOut = farZ; - } -} - - -#if 0 -/* test harness */ -int -main(int argc, char *argv[]) -{ - float m[16], p[16]; - float l, r, b, t, n, f; - int persp; - int i; - -#if 0 - l = -.9; - r = 1.2; - b = -0.5; - t = 1.4; - n = 30; - f = 84; - printf(" Frustum(%f, %f, %f, %f, %f, %f\n",l+1, r+1.2, b+.5, t+.3, n, f); - Frustum(l+1, r+1.2, b+.5, t+.3, n, f, p); - DecomposeProjection(p, &persp, &l, &r, &b, &t, &n, &f); - printf("glFrustum(%f, %f, %f, %f, %f, %f)\n", - l, r, b, t, n, f); - PrintMatrix(p); -#else - printf("Ortho(-1, 1, -1, 1, 10, 84)\n"); - Ortho(-1, 1, -1, 1, 10, 84, m); - PrintMatrix(m); - DecomposeProjection(m, &persp, &l, &r, &b, &t, &n, &f); - printf("Ortho(%f, %f, %f, %f, %f, %f) %d\n", l, r, b, t, n, f, persp); -#endif - - return 0; -} -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/mwmborder.c b/nx-X11/extras/Mesa_6.4.2/progs/util/mwmborder.c deleted file mode 100644 index b61ffb50bc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/mwmborder.c +++ /dev/null @@ -1,91 +0,0 @@ -/* mwmborder.c */ - - -/* - * This function shows how to remove the border, title bar, resize button, - * etc from a Motif window frame from inside an Xlib-based application. - * - * Brian Paul 19 Sep 1995 brianp@ssec.wisc.edu - * - * This code is in the public domain. - */ - - -#include -#include - -#define HAVE_MOTIF -#ifdef HAVE_MOTIF - -#include - -#else - -/* bit definitions for MwmHints.flags */ -#define MWM_HINTS_FUNCTIONS (1L << 0) -#define MWM_HINTS_DECORATIONS (1L << 1) -#define MWM_HINTS_INPUT_MODE (1L << 2) -#define MWM_HINTS_STATUS (1L << 3) - -/* bit definitions for MwmHints.decorations */ -#define MWM_DECOR_ALL (1L << 0) -#define MWM_DECOR_BORDER (1L << 1) -#define MWM_DECOR_RESIZEH (1L << 2) -#define MWM_DECOR_TITLE (1L << 3) -#define MWM_DECOR_MENU (1L << 4) -#define MWM_DECOR_MINIMIZE (1L << 5) -#define MWM_DECOR_MAXIMIZE (1L << 6) - -typedef struct -{ - unsigned long flags; - unsigned long functions; - unsigned long decorations; - long inputMode; - unsigned long status; -} PropMotifWmHints; - -#define PROP_MOTIF_WM_HINTS_ELEMENTS 5 - -#endif - - - -/* - * Specify which Motif window manager border decorations to put on a - * top-level window. For example, you can specify that a window is not - * resizabe, or omit the titlebar, or completely remove all decorations. - * Input: dpy - the X display - * w - the X window - * flags - bitwise-OR of the MWM_DECOR_xxx symbols in X11/Xm/MwmUtil.h - * indicating what decoration elements to enable. Zero would - * be no decoration. - */ -void set_mwm_border( Display *dpy, Window w, unsigned long flags ) -{ - PropMotifWmHints motif_hints; - Atom prop, proptype; - - /* setup the property */ - motif_hints.flags = MWM_HINTS_DECORATIONS; - motif_hints.decorations = flags; - - /* get the atom for the property */ - prop = XInternAtom( dpy, "_MOTIF_WM_HINTS", True ); - if (!prop) { - /* something went wrong! */ - return; - } - - /* not sure this is correct, seems to work, XA_WM_HINTS didn't work */ - proptype = prop; - - XChangeProperty( dpy, w, /* display, window */ - prop, proptype, /* property, type */ - 32, /* format: 32-bit datums */ - PropModeReplace, /* mode */ - (unsigned char *) &motif_hints, /* data */ - PROP_MOTIF_WM_HINTS_ELEMENTS /* nelements */ - ); -} - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/readtex.c b/nx-X11/extras/Mesa_6.4.2/progs/util/readtex.c deleted file mode 100644 index 280d6c811d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/readtex.c +++ /dev/null @@ -1,451 +0,0 @@ -/* readtex.c */ - -/* - * Read an SGI .rgb image file and generate a mipmap texture set. - * Much of this code was borrowed from SGI's tk OpenGL toolkit. - */ - - - -#include -#include -#include -#include -#include -#include "readtex.h" - - -#ifndef SEEK_SET -# define SEEK_SET 0 -#endif - - -/* -** RGB Image Structure -*/ - -typedef struct _TK_RGBImageRec { - GLint sizeX, sizeY; - GLint components; - unsigned char *data; -} TK_RGBImageRec; - - - -/******************************************************************************/ - -typedef struct _rawImageRec { - unsigned short imagic; - unsigned short type; - unsigned short dim; - unsigned short sizeX, sizeY, sizeZ; - unsigned long min, max; - unsigned long wasteBytes; - char name[80]; - unsigned long colorMap; - FILE *file; - unsigned char *tmp, *tmpR, *tmpG, *tmpB, *tmpA; - unsigned long rleEnd; - GLuint *rowStart; - GLint *rowSize; -} rawImageRec; - -/******************************************************************************/ - -static void ConvertShort(unsigned short *array, long length) -{ - unsigned long b1, b2; - unsigned char *ptr; - - ptr = (unsigned char *)array; - while (length--) { - b1 = *ptr++; - b2 = *ptr++; - *array++ = (unsigned short) ((b1 << 8) | (b2)); - } -} - -static void ConvertLong(GLuint *array, long length) -{ - unsigned long b1, b2, b3, b4; - unsigned char *ptr; - - ptr = (unsigned char *)array; - while (length--) { - b1 = *ptr++; - b2 = *ptr++; - b3 = *ptr++; - b4 = *ptr++; - *array++ = (b1 << 24) | (b2 << 16) | (b3 << 8) | (b4); - } -} - -static rawImageRec *RawImageOpen(const char *fileName) -{ - union { - int testWord; - char testByte[4]; - } endianTest; - rawImageRec *raw; - GLenum swapFlag; - int x; - - endianTest.testWord = 1; - if (endianTest.testByte[0] == 1) { - swapFlag = GL_TRUE; - } else { - swapFlag = GL_FALSE; - } - - raw = (rawImageRec *)malloc(sizeof(rawImageRec)); - if (raw == NULL) { - fprintf(stderr, "Out of memory!\n"); - return NULL; - } - if ((raw->file = fopen(fileName, "rb")) == NULL) { - perror(fileName); - return NULL; - } - - fread(raw, 1, 12, raw->file); - - if (swapFlag) { - ConvertShort(&raw->imagic, 6); - } - - raw->tmp = (unsigned char *)malloc(raw->sizeX*256); - raw->tmpR = (unsigned char *)malloc(raw->sizeX*256); - raw->tmpG = (unsigned char *)malloc(raw->sizeX*256); - raw->tmpB = (unsigned char *)malloc(raw->sizeX*256); - if (raw->sizeZ==4) { - raw->tmpA = (unsigned char *)malloc(raw->sizeX*256); - } - if (raw->tmp == NULL || raw->tmpR == NULL || raw->tmpG == NULL || - raw->tmpB == NULL) { - fprintf(stderr, "Out of memory!\n"); - return NULL; - } - - if ((raw->type & 0xFF00) == 0x0100) { - x = raw->sizeY * raw->sizeZ * sizeof(GLuint); - raw->rowStart = (GLuint *)malloc(x); - raw->rowSize = (GLint *)malloc(x); - if (raw->rowStart == NULL || raw->rowSize == NULL) { - fprintf(stderr, "Out of memory!\n"); - return NULL; - } - raw->rleEnd = 512 + (2 * x); - fseek(raw->file, 512, SEEK_SET); - fread(raw->rowStart, 1, x, raw->file); - fread(raw->rowSize, 1, x, raw->file); - if (swapFlag) { - ConvertLong(raw->rowStart, (long) (x/sizeof(GLuint))); - ConvertLong((GLuint *)raw->rowSize, (long) (x/sizeof(GLint))); - } - } - return raw; -} - -static void RawImageClose(rawImageRec *raw) -{ - - fclose(raw->file); - free(raw->tmp); - free(raw->tmpR); - free(raw->tmpG); - free(raw->tmpB); - if (raw->sizeZ>3) { - free(raw->tmpA); - } - free(raw); -} - -static void RawImageGetRow(rawImageRec *raw, unsigned char *buf, int y, int z) -{ - unsigned char *iPtr, *oPtr, pixel; - int count, done = 0; - - if ((raw->type & 0xFF00) == 0x0100) { - fseek(raw->file, (long) raw->rowStart[y+z*raw->sizeY], SEEK_SET); - fread(raw->tmp, 1, (unsigned int)raw->rowSize[y+z*raw->sizeY], - raw->file); - - iPtr = raw->tmp; - oPtr = buf; - while (!done) { - pixel = *iPtr++; - count = (int)(pixel & 0x7F); - if (!count) { - done = 1; - return; - } - if (pixel & 0x80) { - while (count--) { - *oPtr++ = *iPtr++; - } - } else { - pixel = *iPtr++; - while (count--) { - *oPtr++ = pixel; - } - } - } - } else { - fseek(raw->file, 512+(y*raw->sizeX)+(z*raw->sizeX*raw->sizeY), - SEEK_SET); - fread(buf, 1, raw->sizeX, raw->file); - } -} - - -static void RawImageGetData(rawImageRec *raw, TK_RGBImageRec *final) -{ - unsigned char *ptr; - int i, j; - - final->data = (unsigned char *)malloc((raw->sizeX+1)*(raw->sizeY+1)*4); - if (final->data == NULL) { - fprintf(stderr, "Out of memory!\n"); - } - - ptr = final->data; - for (i = 0; i < (int)(raw->sizeY); i++) { - RawImageGetRow(raw, raw->tmpR, i, 0); - RawImageGetRow(raw, raw->tmpG, i, 1); - RawImageGetRow(raw, raw->tmpB, i, 2); - if (raw->sizeZ>3) { - RawImageGetRow(raw, raw->tmpA, i, 3); - } - for (j = 0; j < (int)(raw->sizeX); j++) { - *ptr++ = *(raw->tmpR + j); - *ptr++ = *(raw->tmpG + j); - *ptr++ = *(raw->tmpB + j); - if (raw->sizeZ>3) { - *ptr++ = *(raw->tmpA + j); - } - } - } -} - - -static TK_RGBImageRec *tkRGBImageLoad(const char *fileName) -{ - rawImageRec *raw; - TK_RGBImageRec *final; - - raw = RawImageOpen(fileName); - if (!raw) { - fprintf(stderr, "File not found\n"); - return NULL; - } - final = (TK_RGBImageRec *)malloc(sizeof(TK_RGBImageRec)); - if (final == NULL) { - fprintf(stderr, "Out of memory!\n"); - return NULL; - } - final->sizeX = raw->sizeX; - final->sizeY = raw->sizeY; - final->components = raw->sizeZ; - RawImageGetData(raw, final); - RawImageClose(raw); - return final; -} - - -static void FreeImage( TK_RGBImageRec *image ) -{ - free(image->data); - free(image); -} - - -/* - * Load an SGI .rgb file and generate a set of 2-D mipmaps from it. - * Input: imageFile - name of .rgb to read - * intFormat - internal texture format to use, or number of components - * Return: GL_TRUE if success, GL_FALSE if error. - */ -GLboolean LoadRGBMipmaps( const char *imageFile, GLint intFormat ) -{ - GLint w, h; - return LoadRGBMipmaps2( imageFile, GL_TEXTURE_2D, intFormat, &w, &h ); -} - - - -GLboolean LoadRGBMipmaps2( const char *imageFile, GLenum target, - GLint intFormat, GLint *width, GLint *height ) -{ - GLint error; - GLenum format; - TK_RGBImageRec *image; - - image = tkRGBImageLoad( imageFile ); - if (!image) { - return GL_FALSE; - } - - if (image->components==3) { - format = GL_RGB; - } - else if (image->components==4) { - format = GL_RGBA; - } - else { - /* not implemented */ - fprintf(stderr, - "Error in LoadRGBMipmaps %d-component images not implemented\n", - image->components ); - return GL_FALSE; - } - - error = gluBuild2DMipmaps( target, - intFormat, - image->sizeX, image->sizeY, - format, - GL_UNSIGNED_BYTE, - image->data ); - - *width = image->sizeX; - *height = image->sizeY; - - FreeImage(image); - - return error ? GL_FALSE : GL_TRUE; -} - - - -/* - * Load an SGI .rgb file and return a pointer to the image data. - * Input: imageFile - name of .rgb to read - * Output: width - width of image - * height - height of image - * format - format of image (GL_RGB or GL_RGBA) - * Return: pointer to image data or NULL if error - */ -GLubyte *LoadRGBImage( const char *imageFile, GLint *width, GLint *height, - GLenum *format ) -{ - TK_RGBImageRec *image; - GLint bytes; - GLubyte *buffer; - - image = tkRGBImageLoad( imageFile ); - if (!image) { - return NULL; - } - - if (image->components==3) { - *format = GL_RGB; - } - else if (image->components==4) { - *format = GL_RGBA; - } - else { - /* not implemented */ - fprintf(stderr, - "Error in LoadRGBImage %d-component images not implemented\n", - image->components ); - return NULL; - } - - *width = image->sizeX; - *height = image->sizeY; - - bytes = image->sizeX * image->sizeY * image->components; - buffer = (GLubyte *) malloc(bytes); - if (!buffer) - return NULL; - - memcpy( (void *) buffer, (void *) image->data, bytes ); - - FreeImage(image); - - return buffer; -} - -#define CLAMP( X, MIN, MAX ) ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) ) - - -static void ConvertRGBtoYUV(GLint w, GLint h, GLint texel_bytes, - const GLubyte *src, - GLushort *dest) -{ - GLint i, j; - - for (i = 0; i < h; i++) { - for (j = 0; j < w; j++) { - const GLfloat r = (src[0]) / 255.0; - const GLfloat g = (src[1]) / 255.0; - const GLfloat b = (src[2]) / 255.0; - GLfloat y, cr, cb; - GLint iy, icr, icb; - - y = r * 65.481 + g * 128.553 + b * 24.966 + 16; - cb = r * -37.797 + g * -74.203 + b * 112.0 + 128; - cr = r * 112.0 + g * -93.786 + b * -18.214 + 128; - /*printf("%f %f %f -> %f %f %f\n", r, g, b, y, cb, cr);*/ - iy = (GLint) CLAMP(y, 0, 254); - icb = (GLint) CLAMP(cb, 0, 254); - icr = (GLint) CLAMP(cr, 0, 254); - - if (j & 1) { - /* odd */ - *dest = (iy << 8) | icr; - } - else { - /* even */ - *dest = (iy << 8) | icb; - } - dest++; - src += texel_bytes; - } - } -} - - -/* - * Load an SGI .rgb file and return a pointer to the image data, converted - * to 422 yuv. - * - * Input: imageFile - name of .rgb to read - * Output: width - width of image - * height - height of image - * Return: pointer to image data or NULL if error - */ -GLushort *LoadYUVImage( const char *imageFile, GLint *width, GLint *height ) -{ - TK_RGBImageRec *image; - GLushort *buffer; - - image = tkRGBImageLoad( imageFile ); - if (!image) { - return NULL; - } - - if (image->components != 3 && image->components !=4 ) { - /* not implemented */ - fprintf(stderr, - "Error in LoadYUVImage %d-component images not implemented\n", - image->components ); - return NULL; - } - - *width = image->sizeX; - *height = image->sizeY; - - buffer = (GLushort *) malloc( image->sizeX * image->sizeY * 2 ); - - if (buffer) - ConvertRGBtoYUV( image->sizeX, - image->sizeY, - image->components, - image->data, - buffer ); - - - FreeImage(image); - return buffer; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/readtex.h b/nx-X11/extras/Mesa_6.4.2/progs/util/readtex.h deleted file mode 100644 index 6c9a3828d3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/readtex.h +++ /dev/null @@ -1,26 +0,0 @@ -/* readtex.h */ - -#ifndef READTEX_H -#define READTEX_H - - -#include - - -extern GLboolean -LoadRGBMipmaps( const char *imageFile, GLint intFormat ); - - -extern GLboolean -LoadRGBMipmaps2( const char *imageFile, GLenum target, - GLint intFormat, GLint *width, GLint *height ); - - -extern GLubyte * -LoadRGBImage( const char *imageFile, - GLint *width, GLint *height, GLenum *format ); - -extern GLushort * -LoadYUVImage( const char *imageFile, GLint *width, GLint *height ); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/sampleMakefile b/nx-X11/extras/Mesa_6.4.2/progs/util/sampleMakefile deleted file mode 100644 index ebb57ff3dd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/sampleMakefile +++ /dev/null @@ -1,49 +0,0 @@ -# $Id: sampleMakefile,v 1.1 1999/08/19 00:55:42 jtg Exp $ - -# Sample makefile for compiling OpenGL/Mesa applications on Unix. -# This example assumes Linux with gcc. - -# This makefile is in the public domain - -# $Log: sampleMakefile,v $ -# Revision 1.1 1999/08/19 00:55:42 jtg -# Initial revision -# -# Revision 1.1 1999/02/24 05:20:45 brianp -# Initial revision -# - - -CC = gcc - -CFLAGS = -c -g -ansi -pedantic -Wall - -INCDIRS = -I. -I../include - -LIBDIRS = -L../lib -L/usr/X11/lib - -LIBS = -lglut -lMesaGLU -lMesaGL -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm - -OBJECTS = main.o \ - file1.o \ - file2.o \ - file3.o - - -PROGRAMS = myprogram - - -.c.o: - $(CC) $(CFLAGS) $(INCDIRS) $< -o $@ - - - -default: $(PROGRAMS) - - -dtenvmap: $(OBJECTS) - $(CC) $(OBJECTS) $(LIBDIRS) $(LIBS) -o $@ - - -clean: - rm -f *.o diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/showbuffer.c b/nx-X11/extras/Mesa_6.4.2/progs/util/showbuffer.c deleted file mode 100644 index 17f84dc62b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/showbuffer.c +++ /dev/null @@ -1,192 +0,0 @@ -/* showbuffer.c */ - - -/* - * Copy the depth buffer to the color buffer as a grayscale image. - * Useful for inspecting the depth buffer values. - * - * This program is in the public domain. - * - * Brian Paul November 4, 1998 - */ - - -#include -#include -#include -#include "showbuffer.h" - - - -/* - * Copy the depth buffer values into the current color buffer as a - * grayscale image. - * Input: winWidth, winHeight - size of the window - * zBlack - the Z value which should map to black (usually 1) - * zWhite - the Z value which should map to white (usually 0) - */ -void -ShowDepthBuffer( GLsizei winWidth, GLsizei winHeight, - GLfloat zBlack, GLfloat zWhite ) -{ - GLfloat *depthValues; - - assert(zBlack >= 0.0); - assert(zBlack <= 1.0); - assert(zWhite >= 0.0); - assert(zWhite <= 1.0); - assert(zBlack != zWhite); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glPixelStorei(GL_PACK_ALIGNMENT, 1); - - /* Read depth values */ - depthValues = (GLfloat *) malloc(winWidth * winHeight * sizeof(GLfloat)); - assert(depthValues); - glReadPixels(0, 0, winWidth, winHeight, GL_DEPTH_COMPONENT, - GL_FLOAT, depthValues); - - /* Map Z values from [zBlack, zWhite] to gray levels in [0, 1] */ - /* Not using glPixelTransfer() because it's broke on some systems! */ - if (zBlack != 0.0 || zWhite != 1.0) { - GLfloat scale = 1.0 / (zWhite - zBlack); - GLfloat bias = -zBlack * scale; - int n = winWidth * winHeight; - int i; - for (i = 0; i < n; i++) - depthValues[i] = depthValues[i] * scale + bias; - } - - /* save GL state */ - glPushAttrib(GL_CURRENT_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | - GL_TRANSFORM_BIT | GL_VIEWPORT_BIT); - - /* setup raster pos for glDrawPixels */ - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); - - glOrtho(0.0, (GLdouble) winWidth, 0.0, (GLdouble) winHeight, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - glLoadIdentity(); - - glDisable(GL_STENCIL_TEST); - glDisable(GL_DEPTH_TEST); - glRasterPos2f(0, 0); - - glDrawPixels(winWidth, winHeight, GL_LUMINANCE, GL_FLOAT, depthValues); - - glPopMatrix(); - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - free(depthValues); - - glPopAttrib(); -} - - - - -/* - * Copy the alpha channel values into the current color buffer as a - * grayscale image. - * Input: winWidth, winHeight - size of the window - */ -void -ShowAlphaBuffer( GLsizei winWidth, GLsizei winHeight ) -{ - GLubyte *alphaValues; - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glPixelStorei(GL_PACK_ALIGNMENT, 1); - - /* Read alpha values */ - alphaValues = (GLubyte *) malloc(winWidth * winHeight * sizeof(GLubyte)); - assert(alphaValues); - glReadPixels(0, 0, winWidth, winHeight, GL_ALPHA, GL_UNSIGNED_BYTE, alphaValues); - - /* save GL state */ - glPushAttrib(GL_CURRENT_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL | - GL_TRANSFORM_BIT | GL_VIEWPORT_BIT); - - /* setup raster pos for glDrawPixels */ - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); - - glOrtho(0.0, (GLdouble) winWidth, 0.0, (GLdouble) winHeight, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - glLoadIdentity(); - - glDisable(GL_STENCIL_TEST); - glDisable(GL_DEPTH_TEST); - glRasterPos2f(0, 0); - - glDrawPixels(winWidth, winHeight, GL_LUMINANCE, GL_UNSIGNED_BYTE, alphaValues); - - glPopMatrix(); - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - free(alphaValues); - - glPopAttrib(); -} - - - -/* - * Copy the stencil buffer values into the current color buffer as a - * grayscale image. - * Input: winWidth, winHeight - size of the window - * scale, bias - scale and bias to apply to stencil values for display - */ -void -ShowStencilBuffer( GLsizei winWidth, GLsizei winHeight, - GLfloat scale, GLfloat bias ) -{ - GLubyte *stencilValues; - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glPixelStorei(GL_PACK_ALIGNMENT, 1); - - /* Read stencil values */ - stencilValues = (GLubyte *) malloc(winWidth * winHeight * sizeof(GLubyte)); - assert(stencilValues); - glReadPixels(0, 0, winWidth, winHeight, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, stencilValues); - - /* save GL state */ - glPushAttrib(GL_CURRENT_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | - GL_PIXEL_MODE_BIT | GL_TRANSFORM_BIT | GL_VIEWPORT_BIT); - - /* setup raster pos for glDrawPixels */ - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); - - glOrtho(0.0, (GLdouble) winWidth, 0.0, (GLdouble) winHeight, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - glLoadIdentity(); - - glDisable(GL_STENCIL_TEST); - glDisable(GL_DEPTH_TEST); - glRasterPos2f(0, 0); - - glPixelTransferf(GL_RED_SCALE, scale); - glPixelTransferf(GL_RED_BIAS, bias); - glPixelTransferf(GL_GREEN_SCALE, scale); - glPixelTransferf(GL_GREEN_BIAS, bias); - glPixelTransferf(GL_BLUE_SCALE, scale); - glPixelTransferf(GL_BLUE_BIAS, bias); - - glDrawPixels(winWidth, winHeight, GL_LUMINANCE, GL_UNSIGNED_BYTE, stencilValues); - - glPopMatrix(); - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - free(stencilValues); - - glPopAttrib(); -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/showbuffer.h b/nx-X11/extras/Mesa_6.4.2/progs/util/showbuffer.h deleted file mode 100644 index 63533d8e9b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/showbuffer.h +++ /dev/null @@ -1,36 +0,0 @@ -/* showbuffer. h*/ - -/* - * Copy the depth buffer to the color buffer as a grayscale image. - * Useful for inspecting the depth buffer values. - * - * This program is in the public domain. - * - * Brian Paul November 4, 1998 - */ - - -#ifndef SHOWBUFFER_H -#define SHOWBUFFER_H - - -#include - - - -extern void -ShowDepthBuffer( GLsizei winWidth, GLsizei winHeight, - GLfloat zBlack, GLfloat zWhite ); - - -extern void -ShowAlphaBuffer( GLsizei winWidth, GLsizei winHeight ); - - -extern void -ShowStencilBuffer( GLsizei winWidth, GLsizei winHeight, - GLfloat scale, GLfloat bias ); - - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/winpos.c b/nx-X11/extras/Mesa_6.4.2/progs/util/winpos.c deleted file mode 100644 index 5ad98fd270..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/util/winpos.c +++ /dev/null @@ -1,42 +0,0 @@ -/* winpos.c */ - - -/* - * Set the current raster position to a specific window - * coordinate. Also see the GL_MESA_window_pos extension. - * - * Written by Brian Paul and in the public domain. - */ - - -void WindowPos( GLfloat x, GLfloat y, GLfloat z ) -{ - GLfloat fx, fy; - - /* Push current matrix mode and viewport attributes */ - glPushAttrib( GL_TRANSFORM_BIT | GL_VIEWPORT_BIT ); - - /* Setup projection parameters */ - glMatrixMode( GL_PROJECTION ); - glPushMatrix(); - glLoadIdentity(); - glMatrixMode( GL_MODELVIEW ); - glPushMatrix(); - glLoadIdentity(); - - glDepthRange( z, z ); - glViewport( (int) x - 1, (int) y - 1, 2, 2 ); - - /* set the raster (window) position */ - fx = x - (int) x; - fy = y - (int) y; - glRasterPos3f( fx, fy, 0.0 ); - - /* restore matrices, viewport and matrix mode */ - glPopMatrix(); - glMatrixMode( GL_PROJECTION ); - glPopMatrix(); - - glPopAttrib(); -} - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/Makefile.ugl b/nx-X11/extras/Mesa_6.4.2/progs/windml/Makefile.ugl deleted file mode 100644 index 90b0b29bc8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/Makefile.ugl +++ /dev/null @@ -1,68 +0,0 @@ -# Mesa 3-D graphics library -# Version: 3.5 -# -# Copyright (C) 2001 Wind River Systems, Inc - -# The MIT License -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -# Makefile for UGL/Mesa demos - -DEMO_SOURCES = readtex.c uglaccum.c uglalldemos.c uglbounce.c uglcube.c \ -ugldrawpix.c uglflip.c uglgears.c uglicotorus.c uglline.c uglolympic.c \ -uglpoint.c uglstencil.c uglteapot.c ugltexcube.c ugltexcyl.c -#win2d3d/winRoot.c win2d3d/winBall.c win2d3d/winPuzzle.c win2d3d/winHello.c \ -#win2d3d/winImage.c win2d3d/winGears.c - -DEMO_OBJECTS = $(DEMO_SOURCES:.c=.o) - -SOURCES = $(DEMO_SOURCES) - -include ../rules.windml - -##### TARGETS ##### - -all: depend.$(CPU)$(TOOL) $(DEMO_OBJECTS) - -depend.$(CPU)$(TOOL): -ifeq ($(WIND_HOST_TYPE),x86-win32) - @ $(RM) $@ - @ $(ECHO) Creating depend.$(CPU)$(TOOL) -ifneq ($(SOURCES),) - @ for %f in ($(SOURCES)) do \ - $(CC) -MM $(CFLAGS) %f >>$@ -endif -else -Makefile - @ $(RM) $@ - @ $(ECHO) "Creating depend.$(CPU)$(TOOL)" -ifneq ($(SOURCES),) - @ for FILE in $(filter-out $(NODEPENDOBJS), $(SOURCES)); \ - do \ - $(CC) -MM $(CFLAGS) $$FILE \ - | $(TCL) $(BIN_DIR)/depend.tcl $(TGT_DIR) >>$@; \ - done -endif -endif - -.PHONY = clean - -clean: - $(RM) $(DEMO_OBJECTS) - $(RM) depend.$(CPU)$(TOOL) diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/readtex.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/readtex.c deleted file mode 100644 index 659c49de8d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/readtex.c +++ /dev/null @@ -1,365 +0,0 @@ -/* readtex.c */ - -/* - * Read an SGI .rgb image file and generate a mipmap texture set. - * Much of this code was borrowed from SGI's tk OpenGL toolkit. - */ - -#include -#include -#include -#include -#include -#include "../util/readtex.h" - - -#ifndef SEEK_SET -# define SEEK_SET 0 -#endif - - -/* -** RGB Image Structure -*/ - -typedef struct _TK_RGBImageRec { - GLint sizeX, sizeY; - GLint components; - unsigned char *data; -} TK_RGBImageRec; - - - -/******************************************************************************/ - -typedef struct _rawImageRec { - unsigned short imagic; - unsigned short type; - unsigned short dim; - unsigned short sizeX, sizeY, sizeZ; - unsigned long min, max; - unsigned long wasteBytes; - char name[80]; - unsigned long colorMap; - FILE *file; - unsigned char *tmp, *tmpR, *tmpG, *tmpB, *tmpA; - unsigned long rleEnd; - GLuint *rowStart; - GLint *rowSize; -} rawImageRec; - -/******************************************************************************/ - -static void ConvertShort(unsigned short *array, long length) -{ - unsigned long b1, b2; - unsigned char *ptr; - - ptr = (unsigned char *)array; - while (length--) { - b1 = *ptr++; - b2 = *ptr++; - *array++ = (unsigned short) ((b1 << 8) | (b2)); - } -} - -static void ConvertLong(GLuint *array, long length) -{ - unsigned long b1, b2, b3, b4; - unsigned char *ptr; - - ptr = (unsigned char *)array; - while (length--) { - b1 = *ptr++; - b2 = *ptr++; - b3 = *ptr++; - b4 = *ptr++; - *array++ = (b1 << 24) | (b2 << 16) | (b3 << 8) | (b4); - } -} - -static rawImageRec *RawImageOpen(const char *fileName) -{ - union { - int testWord; - char testByte[4]; - } endianTest; - rawImageRec *raw; - GLenum swapFlag; - int x; - - endianTest.testWord = 1; - if (endianTest.testByte[0] == 1) { - swapFlag = GL_TRUE; - } else { - swapFlag = GL_FALSE; - } - - raw = (rawImageRec *)malloc(sizeof(rawImageRec)); - if (raw == NULL) { - fprintf(stderr, "Out of memory!\n"); - return NULL; - } - if ((raw->file = fopen(fileName, "rb")) == NULL) { - perror(fileName); - return NULL; - } - - fread(raw, 1, 12, raw->file); - - if (swapFlag) { - ConvertShort(&raw->imagic, 6); - } - - raw->tmp = (unsigned char *)malloc(raw->sizeX*256); - raw->tmpR = (unsigned char *)malloc(raw->sizeX*256); - raw->tmpG = (unsigned char *)malloc(raw->sizeX*256); - raw->tmpB = (unsigned char *)malloc(raw->sizeX*256); - if (raw->sizeZ==4) { - raw->tmpA = (unsigned char *)malloc(raw->sizeX*256); - } - if (raw->tmp == NULL || raw->tmpR == NULL || raw->tmpG == NULL || - raw->tmpB == NULL) { - fprintf(stderr, "Out of memory!\n"); - return NULL; - } - - if ((raw->type & 0xFF00) == 0x0100) { - x = raw->sizeY * raw->sizeZ * sizeof(GLuint); - raw->rowStart = (GLuint *)malloc(x); - raw->rowSize = (GLint *)malloc(x); - if (raw->rowStart == NULL || raw->rowSize == NULL) { - fprintf(stderr, "Out of memory!\n"); - return NULL; - } - raw->rleEnd = 512 + (2 * x); - fseek(raw->file, 512, SEEK_SET); - fread(raw->rowStart, 1, x, raw->file); - fread(raw->rowSize, 1, x, raw->file); - if (swapFlag) { - ConvertLong(raw->rowStart, (long) (x/sizeof(GLuint))); - ConvertLong((GLuint *)raw->rowSize, (long) (x/sizeof(GLint))); - } - } - return raw; -} - -static void RawImageClose(rawImageRec *raw) -{ - - fclose(raw->file); - free(raw->tmp); - free(raw->tmpR); - free(raw->tmpG); - free(raw->tmpB); - if (raw->sizeZ>3) { - free(raw->tmpA); - } - free(raw); -} - -static void RawImageGetRow(rawImageRec *raw, unsigned char *buf, int y, int z) -{ - unsigned char *iPtr, *oPtr, pixel; - int count, done = 0; - - if ((raw->type & 0xFF00) == 0x0100) { - fseek(raw->file, (long) raw->rowStart[y+z*raw->sizeY], SEEK_SET); - fread(raw->tmp, 1, (unsigned int)raw->rowSize[y+z*raw->sizeY], - raw->file); - - iPtr = raw->tmp; - oPtr = buf; - while (!done) { - pixel = *iPtr++; - count = (int)(pixel & 0x7F); - if (!count) { - done = 1; - return; - } - if (pixel & 0x80) { - while (count--) { - *oPtr++ = *iPtr++; - } - } else { - pixel = *iPtr++; - while (count--) { - *oPtr++ = pixel; - } - } - } - } else { - fseek(raw->file, 512+(y*raw->sizeX)+(z*raw->sizeX*raw->sizeY), - SEEK_SET); - fread(buf, 1, raw->sizeX, raw->file); - } -} - - -static void RawImageGetData(rawImageRec *raw, TK_RGBImageRec *final) -{ - unsigned char *ptr; - int i, j; - - final->data = (unsigned char *)malloc((raw->sizeX+1)*(raw->sizeY+1)*4); - if (final->data == NULL) { - fprintf(stderr, "Out of memory!\n"); - } - - ptr = final->data; - for (i = 0; i < (int)(raw->sizeY); i++) { - RawImageGetRow(raw, raw->tmpR, i, 0); - RawImageGetRow(raw, raw->tmpG, i, 1); - RawImageGetRow(raw, raw->tmpB, i, 2); - if (raw->sizeZ>3) { - RawImageGetRow(raw, raw->tmpA, i, 3); - } - for (j = 0; j < (int)(raw->sizeX); j++) { - *ptr++ = *(raw->tmpR + j); - *ptr++ = *(raw->tmpG + j); - *ptr++ = *(raw->tmpB + j); - if (raw->sizeZ>3) { - *ptr++ = *(raw->tmpA + j); - } - } - } -} - - -static TK_RGBImageRec *tkRGBImageLoad(const char *fileName) -{ - rawImageRec *raw; - TK_RGBImageRec *final; - - raw = RawImageOpen(fileName); - if (!raw) { - fprintf(stderr, "File not found\n"); - return NULL; - } - final = (TK_RGBImageRec *)malloc(sizeof(TK_RGBImageRec)); - if (final == NULL) { - fprintf(stderr, "Out of memory!\n"); - return NULL; - } - final->sizeX = raw->sizeX; - final->sizeY = raw->sizeY; - final->components = raw->sizeZ; - RawImageGetData(raw, final); - RawImageClose(raw); - return final; -} - - -static void FreeImage( TK_RGBImageRec *image ) -{ - free(image->data); - free(image); -} - - -/* - * Load an SGI .rgb file and generate a set of 2-D mipmaps from it. - * Input: imageFile - name of .rgb to read - * intFormat - internal texture format to use, or number of components - * Return: GL_TRUE if success, GL_FALSE if error. - */ -GLboolean LoadRGBMipmaps( const char *imageFile, GLint intFormat ) -{ - GLint w, h; - return LoadRGBMipmaps2( imageFile, GL_TEXTURE_2D, intFormat, &w, &h ); -} - - - -GLboolean LoadRGBMipmaps2( const char *imageFile, GLenum target, - GLint intFormat, GLint *width, GLint *height ) -{ - GLint error; - GLenum format; - TK_RGBImageRec *image; - - image = tkRGBImageLoad( imageFile ); - if (!image) { - return GL_FALSE; - } - - if (image->components==3) { - format = GL_RGB; - } - else if (image->components==4) { - format = GL_RGBA; - } - else { - /* not implemented */ - fprintf(stderr, - "Error in LoadRGBMipmaps %d-component images not implemented\n", - image->components ); - return GL_FALSE; - } - - error = gluBuild2DMipmaps( target, - intFormat, - image->sizeX, image->sizeY, - format, - GL_UNSIGNED_BYTE, - image->data ); - - *width = image->sizeX; - *height = image->sizeY; - - FreeImage(image); - - return error ? GL_FALSE : GL_TRUE; -} - - - -/* - * Load an SGI .rgb file and return a pointer to the image data. - * Input: imageFile - name of .rgb to read - * Output: width - width of image - * height - height of image - * format - format of image (GL_RGB or GL_RGBA) - * Return: pointer to image data or NULL if error - */ -GLubyte *LoadRGBImage( const char *imageFile, GLint *width, GLint *height, - GLenum *format ) -{ - TK_RGBImageRec *image; - GLint bytes; - GLubyte *buffer; - - image = tkRGBImageLoad( imageFile ); - if (!image) { - return NULL; - } - - if (image->components==3) { - *format = GL_RGB; - } - else if (image->components==4) { - *format = GL_RGBA; - } - else { - /* not implemented */ - fprintf(stderr, - "Error in LoadRGBImage %d-component images not implemented\n", - image->components ); - return NULL; - } - - *width = image->sizeX; - *height = image->sizeY; - - bytes = image->sizeX * image->sizeY * image->components; - buffer = (GLubyte *) malloc(bytes); - if (!buffer) - return NULL; - - memcpy( (void *) buffer, (void *) image->data, bytes ); - - FreeImage(image); - - return buffer; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglaccum.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/uglaccum.c deleted file mode 100644 index fd7cb3125c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglaccum.c +++ /dev/null @@ -1,250 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ - -/* Original name: accanti.c - * - * Conversion to UGL/Mesa by Stephane Raimbault - */ - -#include -#include - -#include -#include -#include - -#include -#include - -#include "../book/jitter.h" - -UGL_LOCAL UGL_EVENT_SERVICE_ID eventServiceId; -UGL_LOCAL UGL_EVENT_Q_ID qId; -UGL_LOCAL UGL_MESA_CONTEXT umc; - -/* Initialize lighting and other values. - */ -UGL_LOCAL void initGL(GLsizei w, GLsizei h) - { - GLfloat mat_ambient[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_position[] = { 0.0, 0.0, 10.0, 1.0 }; - GLfloat lm_ambient[] = { 0.2, 0.2, 0.2, 1.0 }; - - glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); - glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); - glMaterialf(GL_FRONT, GL_SHININESS, 50.0); - glLightfv(GL_LIGHT0, GL_POSITION, light_position); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lm_ambient); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); - glShadeModel (GL_FLAT); - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClearAccum(0.0, 0.0, 0.0, 0.0); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (w <= h) - glOrtho (-2.25, 2.25, -2.25*h/w, 2.25*h/w, -10.0, 10.0); - else - glOrtho (-2.25*w/h, 2.25*w/h, -2.25, 2.25, -10.0, 10.0); - glMatrixMode(GL_MODELVIEW); - } - -UGL_LOCAL void displayObjects(void) - { - GLfloat torus_diffuse[] = { 0.7, 0.7, 0.0, 1.0 }; - GLfloat cube_diffuse[] = { 0.0, 0.7, 0.7, 1.0 }; - GLfloat sphere_diffuse[] = { 0.7, 0.0, 0.7, 1.0 }; - GLfloat octa_diffuse[] = { 0.7, 0.4, 0.4, 1.0 }; - - glPushMatrix (); - glRotatef (30.0, 1.0, 0.0, 0.0); - - glPushMatrix (); - glTranslatef (-0.80, 0.35, 0.0); - glRotatef (100.0, 1.0, 0.0, 0.0); - glMaterialfv(GL_FRONT, GL_DIFFUSE, torus_diffuse); - glutSolidTorus (0.275, 0.85, 16, 16); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (-0.75, -0.50, 0.0); - glRotatef (45.0, 0.0, 0.0, 1.0); - glRotatef (45.0, 1.0, 0.0, 0.0); - glMaterialfv(GL_FRONT, GL_DIFFUSE, cube_diffuse); - glutSolidCube (1.5); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (0.75, 0.60, 0.0); - glRotatef (30.0, 1.0, 0.0, 0.0); - glMaterialfv(GL_FRONT, GL_DIFFUSE, sphere_diffuse); - glutSolidSphere (1.0, 16, 16); - glPopMatrix (); - - glPushMatrix (); - glTranslatef (0.70, -0.90, 0.25); - glMaterialfv(GL_FRONT, GL_DIFFUSE, octa_diffuse); - glutSolidOctahedron (); - glPopMatrix (); - - glPopMatrix (); - } - -#define ACSIZE 8 - -UGL_LOCAL void drawGL(void) - { - GLint viewport[4]; - int jitter; - - glGetIntegerv (GL_VIEWPORT, viewport); - - glClear(GL_ACCUM_BUFFER_BIT); - for (jitter = 0; jitter < ACSIZE; jitter++) - { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glPushMatrix (); -/* Note that 4.5 is the distance in world space between - * left and right and bottom and top. - * This formula converts fractional pixel movement to - * world coordinates. - */ - glTranslatef (j8[jitter].x*4.5/viewport[2], - j8[jitter].y*4.5/viewport[3], 0.0); - displayObjects (); - glPopMatrix (); - glAccum(GL_ACCUM, 1.0/ACSIZE); - } - glAccum (GL_RETURN, 1.0); - glFlush(); - - uglMesaSwapBuffers(); - } - -UGL_LOCAL int getEvent(void) - { - UGL_EVENT event; - UGL_STATUS status; - int retVal = 0; - - status = uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT); - - while (status != UGL_STATUS_Q_EMPTY) - { - UGL_INPUT_EVENT * pInputEvent = (UGL_INPUT_EVENT *)&event; - - if (pInputEvent->modifiers & UGL_KEYBOARD_KEYDOWN) - retVal = 1; - - status = uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT); - } - - return(retVal); - } - -void windMLAccum (UGL_BOOL windMLMode); - -void uglaccum (void) - { - taskSpawn("tAccum", 210, VX_FP_TASK, 100000, - (FUNCPTR)windMLAccum,UGL_FALSE,1,2,3,4,5,6,7,8,9); - } - -void windMLAccum (UGL_BOOL windMLMode) - { - UGL_INPUT_DEVICE_ID keyboardDevId; - GLsizei width, height; - - uglInitialize(); - - uglDriverFind (UGL_KEYBOARD_TYPE, 0, (UGL_UINT32 *)&keyboardDevId); - - uglDriverFind (UGL_EVENT_SERVICE_TYPE, 0, (UGL_UINT32 *)&eventServiceId); - - qId = uglEventQCreate (eventServiceId, 100); - - if (windMLMode) - umc = uglMesaCreateNewContextExt(UGL_MESA_DOUBLE - | UGL_MESA_WINDML_EXCLUSIVE, - 16, - 0, - 8,8,8,0, - NULL); - else - umc = uglMesaCreateNewContextExt(UGL_MESA_DOUBLE, - 16, - 0, - 8,8,8,0, - NULL); - - if (umc == NULL) - { - uglDeinitialize(); - return; - } - - /* Fullscreen */ - - uglMesaMakeCurrentContext(umc, 0, 0, - UGL_MESA_FULLSCREEN_WIDTH, - UGL_MESA_FULLSCREEN_HEIGHT); - - uglMesaGetIntegerv(UGL_MESA_WIDTH, &width); - uglMesaGetIntegerv(UGL_MESA_HEIGHT, &height); - - initGL(width, height); - - drawGL(); - - while (!getEvent()); - - uglEventQDestroy (eventServiceId, qId); - - uglMesaDestroyContext(); - uglDeinitialize(); - - return; - } diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglalldemos.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/uglalldemos.c deleted file mode 100644 index 283e487074..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglalldemos.c +++ /dev/null @@ -1,198 +0,0 @@ - -/* uglalldemos.c - WindML/Mesa example program */ - -/* Copyright (C) 2001 by Wind River Systems, Inc */ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * The MIT License - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* -modification history --------------------- -02a,29aug01,sra WindML mode added -01a,17jul01,sra written -*/ - -/* -DESCRIPTION -Show all the UGL/Mesa demos -*/ - -#include -#include -#include -#include -#include -#include -#include - -#define BLACK 0 -#define RED 1 - -struct _colorStruct - { - UGL_RGB rgbColor; - UGL_COLOR uglColor; - } -colorTable[] = - { - { UGL_MAKE_RGB(0, 0, 0), 0}, - { UGL_MAKE_RGB(255, 0, 0), 0}, - }; - -void windMLPoint (UGL_BOOL windMLMode); -void windMLLine (UGL_BOOL windMLMode); -void windMLFlip (UGL_BOOL windMLMode); -void windMLCube (UGL_BOOL windMLMode); -void windMLBounce (UGL_BOOL windMLMode); -void windMLGears (UGL_BOOL windMLMode); -void windMLIcoTorus (UGL_BOOL windMLMode); -void windMLOlympic (UGL_BOOL windMLMode); -void windMLTexCube (UGL_BOOL windMLMode); -void windMLTexCyl (UGL_BOOL windMLMode); -void windMLTeapot (UGL_BOOL windMLMode); -void windMLStencil (UGL_BOOL windMLMode); -void windMLDrawPix (UGL_BOOL windMLMode); -void windMLAccum (UGL_BOOL windMLMode); -void windMLAllDemos (void); - -void uglalldemos (void) - { - taskSpawn("tAllDemos", 210, VX_FP_TASK, 200000, - (FUNCPTR)windMLAllDemos, 0,1,2,3,4,5,6,7,8,9); - } - -void windMLAllDemos(void) - { - UGL_BOOL windMLFlag = UGL_FALSE; - UGL_FB_INFO fbInfo; - UGL_EVENT event; - UGL_EVENT_SERVICE_ID eventServiceId; - UGL_EVENT_Q_ID qId; - UGL_INPUT_EVENT * pInputEvent; - UGL_INPUT_DEVICE_ID keyboardDevId; - UGL_DEVICE_ID devId; - UGL_GC_ID gc; - UGL_FONT_ID fontId; - UGL_FONT_DEF fontDef; - UGL_FONT_DRIVER_ID fontDrvId; - UGL_ORD textOrigin = UGL_FONT_TEXT_UPPER_LEFT; - int displayHeight, displayWidth; - int textWidth, textHeight; - static UGL_CHAR * message = - "Do you want to use WindML exclusively ? (y/n) "; - - uglInitialize(); - - uglDriverFind (UGL_DISPLAY_TYPE, 0, (UGL_UINT32 *)&devId); - uglDriverFind (UGL_KEYBOARD_TYPE, 0, (UGL_UINT32 *)&keyboardDevId); - uglDriverFind (UGL_EVENT_SERVICE_TYPE, 0, (UGL_UINT32 *)&eventServiceId); - qId = uglEventQCreate (eventServiceId, 100); - - gc = uglGcCreate(devId); - - uglDriverFind (UGL_FONT_ENGINE_TYPE, 0, (UGL_UINT32 *)&fontDrvId); - uglFontDriverInfo(fontDrvId, UGL_FONT_TEXT_ORIGIN, &textOrigin); - - uglFontFindString(fontDrvId, "familyName=Helvetica; pixelSize = 18", - &fontDef); - - if ((fontId = uglFontCreate(fontDrvId, &fontDef)) == UGL_NULL) - { - printf("Font not found. Exiting.\n"); - return; - } - - uglInfo(devId, UGL_FB_INFO_REQ, &fbInfo); - displayWidth = fbInfo.width; - displayHeight = fbInfo.height; - - uglColorAlloc (devId, &colorTable[BLACK].rgbColor, UGL_NULL, - &colorTable[BLACK].uglColor, 1); - uglColorAlloc(devId, &colorTable[RED].rgbColor, UGL_NULL, - &colorTable[RED].uglColor, 1); - - uglBackgroundColorSet(gc, colorTable[BLACK].uglColor); - uglForegroundColorSet(gc, colorTable[RED].uglColor); - uglFontSet(gc, fontId); - uglTextSizeGet(fontId, &textWidth, &textHeight, -1, message); - uglTextDraw(gc, (displayWidth - textWidth) / 2, - (displayHeight - textHeight) / 2 - textHeight, -1, message); -/* flushQ(); - */ - if (uglEventGet (qId, &event, sizeof (event), UGL_WAIT_FOREVER) - != UGL_STATUS_Q_EMPTY) - { - pInputEvent = (UGL_INPUT_EVENT *)&event; - - if (pInputEvent->header.type == UGL_EVENT_TYPE_KEYBOARD && - pInputEvent->modifiers & UGL_KEYBOARD_KEYDOWN) - { - switch(pInputEvent->type.keyboard.key) - { - case 'Y': - case 'y': - windMLFlag = UGL_TRUE; - break; - default: - windMLFlag = UGL_FALSE; - } - } - } - - uglFontDestroy (fontId); - uglGcDestroy (gc); - uglEventQDestroy (eventServiceId, qId); - uglDeinitialize(); - - windMLPoint(windMLFlag); - - windMLLine(windMLFlag); - - windMLFlip(windMLFlag); - - windMLCube(windMLFlag); - - windMLBounce(windMLFlag); - - windMLGears(windMLFlag); - - windMLIcoTorus(windMLFlag); - - windMLOlympic(windMLFlag); - - windMLTexCube(windMLFlag); - - windMLTexCyl(windMLFlag); - - windMLTeapot(windMLFlag); - - windMLStencil(windMLFlag); - - windMLDrawPix(windMLFlag); - - windMLAccum(windMLFlag); - - return; - } diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglbounce.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/uglbounce.c deleted file mode 100644 index 287015a413..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglbounce.c +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Bouncing ball demo. - * - * This program is in the public domain - * - * Brian Paul - * - * Conversion to GLUT by Mark J. Kilgard - * - * Conversion to UGL/Mesa by Stephane Raimbault - */ - -#include -#include -#include - -#include -#include -#include - -#include - -#define COS(X) cos( (X) * 3.14159/180.0 ) -#define SIN(X) sin( (X) * 3.14159/180.0 ) - -#define RED 1 -#define WHITE 2 -#define CYAN 3 - -UGL_LOCAL UGL_EVENT_SERVICE_ID eventServiceId; -UGL_LOCAL UGL_EVENT_Q_ID qId; -UGL_LOCAL UGL_MESA_CONTEXT umc; - -UGL_LOCAL GLuint Ball; -UGL_LOCAL GLfloat Zrot, Zstep; -UGL_LOCAL GLfloat Xpos, Ypos; -UGL_LOCAL GLfloat Xvel, Yvel; -UGL_LOCAL GLfloat Xmin, Xmax; -UGL_LOCAL GLfloat Ymin; -/* UGL_LOCAL GLfloat Ymax = 4.0; */ -UGL_LOCAL GLfloat G; - -UGL_LOCAL GLuint make_ball(void) - { - GLuint list; - GLfloat a, b; - GLfloat da = 18.0, db = 18.0; - GLfloat radius = 1.0; - GLuint color; - GLfloat x, y, z; - - list = glGenLists(1); - - glNewList(list, GL_COMPILE); - - color = 0; - for (a = -90.0; a + da <= 90.0; a += da) - { - glBegin(GL_QUAD_STRIP); - for (b = 0.0; b <= 360.0; b += db) - { - if (color) - { - glIndexi(RED); - glColor3f(1, 0, 0); - } - else - { - glIndexi(WHITE); - glColor3f(1, 1, 1); - } - - x = radius * COS(b) * COS(a); - y = radius * SIN(b) * COS(a); - z = radius * SIN(a); - glVertex3f(x, y, z); - - x = radius * COS(b) * COS(a + da); - y = radius * SIN(b) * COS(a + da); - z = radius * SIN(a + da); - glVertex3f(x, y, z); - - color = 1 - color; - } - glEnd(); - - } - - glEndList(); - - return list; - } - -UGL_LOCAL void initGL(GLsizei width, GLsizei height) - { - float aspect = (float) width / (float) height; - glViewport(0, 0, (GLint) width, (GLint) height); - - uglMesaSetColor(RED, 1.0, 0.0, 0.0); - uglMesaSetColor(WHITE, 1.0, 1.0, 1.0); - uglMesaSetColor(CYAN, 0.0, 1.0, 1.0); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-6.0 * aspect, 6.0 * aspect, -6.0, 6.0, -6.0, 6.0); - glMatrixMode(GL_MODELVIEW); - - } - -UGL_LOCAL void drawGL(void) - { - GLint i; - static float vel0 = -100.0; - - glClear(GL_COLOR_BUFFER_BIT); - - glIndexi(CYAN); - glColor3f(0, 1, 1); - glBegin(GL_LINES); - for (i = -5; i <= 5; i++) - { - glVertex2i(i, -5); - glVertex2i(i, 5); - } - for (i = -5; i <= 5; i++) - { - glVertex2i(-5, i); - glVertex2i(5, i); - } - for (i = -5; i <= 5; i++) - { - glVertex2i(i, -5); - glVertex2f(i * 1.15, -5.9); - } - glVertex2f(-5.3, -5.35); - glVertex2f(5.3, -5.35); - glVertex2f(-5.75, -5.9); - glVertex2f(5.75, -5.9); - glEnd(); - - glPushMatrix(); - glTranslatef(Xpos, Ypos, 0.0); - glScalef(2.0, 2.0, 2.0); - glRotatef(8.0, 0.0, 0.0, 1.0); - glRotatef(90.0, 1.0, 0.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - - glCallList(Ball); - - glPopMatrix(); - - glFlush(); - - uglMesaSwapBuffers(); - - Zrot += Zstep; - - Xpos += Xvel; - if (Xpos >= Xmax) - { - Xpos = Xmax; - Xvel = -Xvel; - Zstep = -Zstep; - } - if (Xpos <= Xmin) - { - Xpos = Xmin; - Xvel = -Xvel; - Zstep = -Zstep; - } - Ypos += Yvel; - Yvel += G; - if (Ypos < Ymin) - { - Ypos = Ymin; - if (vel0 == -100.0) - vel0 = fabs(Yvel); - Yvel = vel0; - } - } - -UGL_LOCAL int getEvent(void) - { - UGL_EVENT event; - UGL_STATUS status; - int retVal = 0; - - status = uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT); - - while (status != UGL_STATUS_Q_EMPTY) - { - UGL_INPUT_EVENT * pInputEvent = (UGL_INPUT_EVENT *)&event; - - if (pInputEvent->modifiers & UGL_KEYBOARD_KEYDOWN) - retVal = 1; - - status = uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT); - } - - return(retVal); - } - -void windMLBounce (UGL_BOOL windMLMode); - -void uglbounce (void) - { - taskSpawn("tBounce", 210, VX_FP_TASK, 100000, (FUNCPTR)windMLBounce, - UGL_FALSE,1,2,3,4,5,6,7,8,9); - } - -void windMLBounce(UGL_BOOL windMLMode) - { - GLsizei width, height; - UGL_INPUT_DEVICE_ID keyboardDevId; - - Zrot = 0.0; - Zstep = 6.0; - Xpos = 0.0; - Ypos = 1.0; - Xvel = 0.2; - Yvel = 0.0; - Xmin = -4.0; - Xmax = 4.0; - Ymin = -3.8; - G = -0.1; - - uglInitialize(); - - uglDriverFind (UGL_KEYBOARD_TYPE, 0, (UGL_UINT32 *)&keyboardDevId); - - uglDriverFind (UGL_EVENT_SERVICE_TYPE, 0, (UGL_UINT32 *)&eventServiceId); - - qId = uglEventQCreate (eventServiceId, 100); - - if (windMLMode) - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE - | UGL_MESA_WINDML_EXCLUSIVE, NULL); - else - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE, NULL); - - if (umc == NULL) - { - uglDeinitialize(); - return; - } - - /* Fullscreen */ - - uglMesaMakeCurrentContext(umc, 0, 0, UGL_MESA_FULLSCREEN_WIDTH, - UGL_MESA_FULLSCREEN_HEIGHT); - - Ball = make_ball(); - glCullFace(GL_BACK); - glEnable(GL_CULL_FACE); - glDisable(GL_DITHER); - glShadeModel(GL_FLAT); - - uglMesaGetIntegerv(UGL_MESA_WIDTH, &width); - uglMesaGetIntegerv(UGL_MESA_HEIGHT, &height); - - initGL(width, height); - - while(!getEvent()) - drawGL(); - - uglEventQDestroy (eventServiceId, qId); - - uglMesaDestroyContext(); - uglDeinitialize (); - - return; - } diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglcube.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/uglcube.c deleted file mode 100644 index e701d8db46..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglcube.c +++ /dev/null @@ -1,257 +0,0 @@ -/* uglcube.c - WindML/Mesa example program */ - -/* Copyright (C) 2001 by Wind River Systems, Inc */ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * The MIT License - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* -DESCRIPTION -Draw a smooth cube. -*/ - -#include -#include - -#include -#include - -#include -#include - -UGL_LOCAL UGL_EVENT_SERVICE_ID eventServiceId; -UGL_LOCAL UGL_EVENT_Q_ID qId; -UGL_LOCAL UGL_MESA_CONTEXT umc; -UGL_LOCAL GLfloat rotx; -UGL_LOCAL GLfloat roty; -UGL_LOCAL GLuint theCube; - -UGL_LOCAL void cube() - { - - /* Front */ - glBegin(GL_QUADS); - glColor3f(0.0f, 0.0f, 1.0f); - glVertex3f(-1.0f, 1.0f, 1.0f); - glColor3f(0.0f, 1.0f, 0.0f); - glVertex3f(1.0f, 1.0f, 1.0f); - glColor3f(1.0f, 0.0f, 0.0f); - glVertex3f(1.0f, -1.0f, 1.0f); - glColor3f(1.0f, 1.0f, 0.0f); - glVertex3f(-1.0f, -1.0f, 1.0f); - glEnd(); - - - /* Back */ - glBegin(GL_QUADS); - glColor3f(0.0f, 0.0f, 1.0f); - glVertex3f(-1.0f, 1.0f, -1.0f); - glColor3f(0.0f, 1.0f, 0.0f); - glVertex3f(1.0f, 1.0f, -1.0f); - glColor3f(1.0f, 0.0f, 0.0f); - glVertex3f(1.0f, -1.0f, -1.0f); - glColor3f(1.0f, 1.0f, 0.0f); - glVertex3f(-1.0f, -1.0f, -1.0f); - glEnd(); - - - /* Right */ - glBegin(GL_QUADS); - glColor3f(0.0f, 1.0f, 0.0f); - glVertex3f(1.0f, 1.0f, 1.0f); - glColor3f(0.0f, 1.0f, 0.0f); - glVertex3f(1.0f, 1.0f, -1.0f); - glColor3f(1.0f, 0.0f, 0.0f); - glVertex3f(1.0f, -1.0f, -1.0f); - glColor3f(1.0f, 0.0f, 0.0f); - glVertex3f(1.0f, -1.0f, 1.0f); - glEnd(); - - /* Left */ - glBegin(GL_QUADS); - glColor3f(0.0f, 0.0f, 1.0f); - glVertex3f(-1.0f, 1.0f, 1.0f); - glColor3f(0.0f, 0.0f, 1.0f); - glVertex3f(-1.0f, 1.0f, -1.0f); - glColor3f(1.0f, 1.0f, 0.0f); - glVertex3f(-1.0f, -1.0f, -1.0f); - glColor3f(1.0f, 1.0f, 0.0f); - glVertex3f(-1.0f, -1.0f, 1.0f); - glEnd(); - - /* Top */ - glBegin(GL_QUADS); - glColor3f(0.0f, 0.0f, 1.0f); - glVertex3f(-1.0f, 1.0f, -1.0f); - glColor3f(0.0f, 1.0f, 0.0f); - glVertex3f(1.0f, 1.0f, -1.0f); - glColor3f(0.0f, 1.0f, 0.0f); - glVertex3f(1.0f, 1.0f, 1.0f); - glColor3f(0.0f, 0.0f, 1.0f); - glVertex3f(-1.0f, 1.0f, 1.0f); - glEnd(); - - - /* Bottom */ - glBegin(GL_QUADS); - glColor3f(1.0f, 1.0f, 0.0f); - glVertex3f(-1.0f, -1.0f, -1.0f); - glColor3f(1.0f, 0.0f, 0.0f); - glVertex3f(1.0f, -1.0f, -1.0f); - glColor3f(1.0f, 0.0f, 0.0f); - glVertex3f(1.0f, -1.0f, 1.0f); - glColor3f(1.0f, 1.0f, 0.0f); - glVertex3f(-1.0f, -1.0f, 1.0f); - glEnd(); - } - -UGL_LOCAL void initGL - ( - int Width, - int Height - ) - { - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); - glShadeModel(GL_SMOOTH); - - theCube = glGenLists(1); - glNewList(theCube, GL_COMPILE); - cube(); - glEndList(); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(45.0f, (GLfloat) Width / (GLfloat) Height, 0.1f, 100.0f); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0f, 0.0f, -6.0f); - } - - -/* The main drawing function. */ - -UGL_LOCAL void drawGL() - { - - /* Clear The Screen And The Depth Buffer */ - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - /* Rotate the cube */ - - glRotatef(rotx, 1.0f, 0.0f, 0.0f); - glRotatef(roty, 0.0f, 1.0f, 0.0f); - - glCallList(theCube); - - glFlush(); - - uglMesaSwapBuffers(); - } - - -/* The function called whenever a key is pressed. */ - -UGL_LOCAL int getEvent(void) - { - UGL_EVENT event; - UGL_STATUS status; - int retVal = 0; - - status = uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT); - - while (status != UGL_STATUS_Q_EMPTY) - { - UGL_INPUT_EVENT * pInputEvent = (UGL_INPUT_EVENT *)&event; - - if (pInputEvent->modifiers & UGL_KEYBOARD_KEYDOWN) - retVal = 1; - - status = uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT); - } - - return(retVal); - } - -void windMLCube (UGL_BOOL windMLMode); - -void uglcube (void) - { - taskSpawn("tCube", 210, VX_FP_TASK, 100000, (FUNCPTR)windMLCube, - UGL_FALSE,1,2,3,4,5,6,7,8,9); - } - -void windMLCube (UGL_BOOL windMLMode) - { - GLsizei width, height; - UGL_INPUT_DEVICE_ID keyboardDevId; - - rotx = 2.5f; - roty = 1.0f; - - uglInitialize(); - - uglDriverFind (UGL_KEYBOARD_TYPE, 0, (UGL_UINT32 *)&keyboardDevId); - - if (uglDriverFind (UGL_EVENT_SERVICE_TYPE, 0, - (UGL_UINT32 *)&eventServiceId) == UGL_STATUS_OK) - { - qId = uglEventQCreate (eventServiceId, 100); - } - else - { - eventServiceId = UGL_NULL; - } - - if (windMLMode) - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE - | UGL_MESA_WINDML_EXCLUSIVE, NULL); - else - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE, NULL); - - /* Fullscreen */ - - uglMesaMakeCurrentContext(umc, 0, 0, UGL_MESA_FULLSCREEN_WIDTH, - UGL_MESA_FULLSCREEN_HEIGHT); - - uglMesaGetIntegerv(UGL_MESA_WIDTH, &width); - uglMesaGetIntegerv(UGL_MESA_HEIGHT, &height); - - /* Initialize our window. */ - - initGL(width, height); - - while (!getEvent()) - drawGL(); - - if (eventServiceId != UGL_NULL) - uglEventQDestroy (eventServiceId, qId); - - uglMesaDestroyContext(); - uglDeinitialize(); - - return; - } diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/ugldrawpix.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/ugldrawpix.c deleted file mode 100644 index b33be2c6ae..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/ugldrawpix.c +++ /dev/null @@ -1,438 +0,0 @@ -/* - * glDrawPixels demo/test/benchmark - * - * Brian Paul September 25, 1997 This file is in the public domain. - * - * Conversion to UGL/Mesa by Stephane Raimbault july, 2001 - */ - -/* - * $Log: ugldrawpix.c,v $ - * Revision 1.2 2001/09/10 19:21:13 brianp - * WindML updates (Stephane Raimbault) - * - * Revision 1.1 2001/08/20 16:07:11 brianp - * WindML driver (Stephane Raimbault) - * - * Revision 1.5 2000/12/24 22:53:54 pesco - * * demos/Makefile.am (INCLUDES): Added -I$(top_srcdir)/util. - * * demos/Makefile.X11, demos/Makefile.BeOS-R4, demos/Makefile.cygnus: - * Essentially the same. - * Program files updated to include "readtex.c", not "../util/readtex.c". - * * demos/reflect.c: Likewise for "showbuffer.c". - * - * - * * Makefile.am (EXTRA_DIST): Added top-level regular files. - * - * * include/GL/Makefile.am (INC_X11): Added glxext.h. - * - * - * * src/GGI/include/ggi/mesa/Makefile.am (EXTRA_HEADERS): Include - * Mesa GGI headers in dist even if HAVE_GGI is not given. - * - * * configure.in: Look for GLUT and demo source dirs in $srcdir. - * - * * src/swrast/Makefile.am (libMesaSwrast_la_SOURCES): Set to *.[ch]. - * More source list updates in various Makefile.am's. - * - * * Makefile.am (dist-hook): Remove CVS directory from distribution. - * (DIST_SUBDIRS): List all possible subdirs here. - * (SUBDIRS): Only list subdirs selected for build again. - * The above two applied to all subdir Makefile.am's also. - * - * Revision 1.4 2000/09/08 21:45:21 brianp - * added dither key option - * - * Revision 1.3 1999/10/28 18:23:29 brianp - * minor changes to Usage() function - * - * Revision 1.2 1999/10/21 22:13:58 brianp - * added f key to toggle front/back drawing - * - * Revision 1.1.1.1 1999/08/19 00:55:40 jtg - * Imported sources - * - * Revision 3.3 1999/03/28 18:18:33 brianp - * minor clean-up - * - * Revision 3.2 1998/11/05 04:34:04 brianp - * moved image files to ../images/ directory - * - * Revision 3.1 1998/02/22 16:43:17 brianp - * added a few casts to silence compiler warnings - * - * Revision 3.0 1998/02/14 18:42:29 brianp - * initial rev - * - */ - - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include "../util/readtex.h" - -#define IMAGE_FILE "Mesa/images/wrs_logo.rgb" - -UGL_LOCAL UGL_EVENT_SERVICE_ID eventServiceId; -UGL_LOCAL UGL_EVENT_Q_ID qId; -UGL_LOCAL volatile UGL_BOOL stopWex; -UGL_LOCAL UGL_MESA_CONTEXT umc; - -UGL_LOCAL int ImgWidth, ImgHeight; -UGL_LOCAL GLenum ImgFormat; -UGL_LOCAL GLubyte *Image; - -UGL_LOCAL int Xpos, Ypos; -UGL_LOCAL int SkipPixels, SkipRows; -UGL_LOCAL int DrawWidth, DrawHeight; -UGL_LOCAL float Xzoom, Yzoom; -UGL_LOCAL GLboolean Scissor; -UGL_LOCAL GLboolean DrawFront; -UGL_LOCAL GLboolean Dither; - -UGL_LOCAL void cleanUp (void); - -UGL_LOCAL void reset(void) - { - Xpos = Ypos = 20; - DrawWidth = ImgWidth; - DrawHeight = ImgHeight; - SkipPixels = SkipRows = 0; - Scissor = GL_FALSE; - Xzoom = Yzoom = 1.0; - } - -UGL_LOCAL void initGL(GLboolean ciMode, GLsizei width, GLsizei height) - { - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - - Image = LoadRGBImage(IMAGE_FILE, &ImgWidth, &ImgHeight, &ImgFormat); - if (!Image) - { - printf("Couldn't read %s\n", IMAGE_FILE); - cleanUp(); - exit(1); - } - - glScissor(width/4, height/4, width/2, height/2); - - if (ciMode) - { - /* Convert RGB image to grayscale */ - GLubyte *indexImage = malloc( ImgWidth * ImgHeight ); - GLint i; - for (i=0; i 0) - DrawWidth--; - break; - case 'W': - DrawWidth++; - break; - case 'h': - if (DrawHeight > 0) - DrawHeight--; - break; - case 'H': - DrawHeight++; - break; - case 'p': - if (SkipPixels > 0) - SkipPixels--; - break; - case 'P': - SkipPixels++; - break; - case 'r': - if (SkipRows > 0) - SkipRows--; - break; - case 'R': - SkipRows++; - break; - case 's': - Scissor = !Scissor; - break; - case 'x': - Xzoom -= 0.1; - break; - case 'X': - Xzoom += 0.1; - break; - case 'y': - Yzoom -= 0.1; - break; - case 'Y': - Yzoom += 0.1; - break; - case 'b': - benchmark(); - break; - case 'f': - DrawFront = !DrawFront; - if (DrawFront) - glDrawBuffer(GL_FRONT); - else - glDrawBuffer(GL_BACK); - printf("glDrawBuffer(%s)\n", DrawFront ? "GL_FRONT" : "GL_BACK"); - break; - case UGL_UNI_UP_ARROW: - Ypos += 1; - break; - case UGL_UNI_DOWN_ARROW: - Ypos -= 1; - break; - case UGL_UNI_LEFT_ARROW: - Xpos -= 1; - break; - case UGL_UNI_RIGHT_ARROW: - Xpos += 1; - break; - case UGL_UNI_ESCAPE: - stopWex = UGL_TRUE; - break; - } - } - -UGL_LOCAL void loopEvent(void) - { - UGL_EVENT event; - UGL_INPUT_EVENT * pInputEvent; - - UGL_FOREVER - { - if (uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT) - != UGL_STATUS_Q_EMPTY) - { - pInputEvent = (UGL_INPUT_EVENT *)&event; - - if (pInputEvent->header.type == UGL_EVENT_TYPE_KEYBOARD && - pInputEvent->modifiers & UGL_KEYBOARD_KEYDOWN) - readKey(pInputEvent->type.keyboard.key); - } - - drawGL(); - if (stopWex) - break; - } - } - -UGL_LOCAL void cleanUp (void) - { - uglEventQDestroy (eventServiceId, qId); - - uglMesaDestroyContext(); - uglDeinitialize (); - } - -void windMLDrawPix (UGL_BOOL windMLMode); - -void ugldrawpix (void) - { - taskSpawn ("tDrawPix", 210, VX_FP_TASK, 100000, (FUNCPTR)windMLDrawPix, - UGL_FALSE,1,2,3,4,5,6,7,8,9); - } - -void windMLDrawPix (UGL_BOOL windMLMode) - { - UGL_INPUT_DEVICE_ID keyboardDevId; - GLuint ciMode; - GLsizei width, height; - - Image = NULL; - Scissor = GL_FALSE; - DrawFront = GL_FALSE; - Dither = GL_TRUE; - - uglInitialize (); - - uglDriverFind (UGL_KEYBOARD_TYPE, 0, - (UGL_UINT32 *)&keyboardDevId); - - uglDriverFind (UGL_EVENT_SERVICE_TYPE, 0, (UGL_UINT32 *)&eventServiceId); - - qId = uglEventQCreate (eventServiceId, 100); - - /* Double buffering */ - if (windMLMode) - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE - | UGL_MESA_WINDML_EXCLUSIVE, NULL); - else - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE, NULL); - - if (umc == NULL) - { - uglDeinitialize (); - return; - } - - uglMesaMakeCurrentContext(umc, 0, 0, UGL_MESA_FULLSCREEN_WIDTH, - UGL_MESA_FULLSCREEN_HEIGHT); - - uglMesaGetIntegerv(UGL_MESA_COLOR_INDEXED, &ciMode); - uglMesaGetIntegerv(UGL_MESA_WIDTH, &width); - uglMesaGetIntegerv(UGL_MESA_HEIGHT, &height); - - initGL(ciMode, width, height); - - echoUse(); - - stopWex = UGL_FALSE; - loopEvent(); - - cleanUp(); - free(Image); - - return; - } diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglflip.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/uglflip.c deleted file mode 100644 index 0ca068f417..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglflip.c +++ /dev/null @@ -1,224 +0,0 @@ - -/* uglflip.c - WindML/Mesa example program */ - -/* Copyright (C) 2001 by Wind River Systems, Inc */ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * The MIT License - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* - * Authors: - * Stephane Raimbault - */ - -/* -DESCRIPTION -Draw a triangle and flip the screen -*/ - -#include -#include - -#include -#include -#include -#include - -#include -#include - -#define BLACK (0) -#define RED (1) -#define GREEN (2) -#define BLUE (3) -#define CI_OFFSET 4 - -UGL_LOCAL GLuint rgb; -UGL_LOCAL UGL_EVENT_SERVICE_ID eventServiceId; -UGL_LOCAL UGL_EVENT_Q_ID qId; -UGL_LOCAL volatile UGL_BOOL stopWex; - -UGL_LOCAL UGL_MESA_CONTEXT umc; - -UGL_LOCAL void initGL (void) - { - uglMesaSetColor(BLACK, 0.0, 0.0, 0.0); - uglMesaSetColor(RED, 1.0, 0.3, 0.3); - uglMesaSetColor(GREEN, 0.3, 1.0, 0.3); - uglMesaSetColor(BLUE, 0.3, 0.3, 1.0); - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClearIndex(BLACK); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glMatrixMode(GL_MODELVIEW); - } - -UGL_LOCAL void drawGL (void) - { - glClear(GL_COLOR_BUFFER_BIT); - - glBegin(GL_TRIANGLES); - (rgb) ? glColor3f(1.0, 0.3, 0.3) : glIndexi(RED); - glVertex2f(0.75, -0.50); - (rgb) ? glColor3f(0.3, 1.0, 0.3) : glIndexi(GREEN); - glVertex2f(0.0, 0.75); - (rgb) ? glColor3f(0.3, 0.3, 1.0) : glIndexi(BLUE); - glVertex2f(-0.75, -0.50); - glEnd(); - - glBegin(GL_LINES); - (rgb) ? glColor3f(1.0, 0.3, 0.3) : glIndexi(RED); - glVertex2f(-1.0, 1.0); - (rgb) ? glColor3f(0.3, 0.3, 1.0) : glIndexi(BLUE); - glVertex2f(1.0, -1.0); - glEnd(); - - glFlush(); - - uglMesaSwapBuffers(); - } - -UGL_LOCAL void echoUse(void) - { - printf("tFlip keys:\n"); - printf(" d Toggle dithering\n"); - printf(" up Reduce the window\n"); - printf(" down Enlarge the window\n"); - printf(" page up Y==0 is the bottom line and increases upward\n"); - printf(" page down Y==0 is the bottom line and increases downward\n"); - printf(" ESC Exit\n"); - } - -UGL_LOCAL void readKey (UGL_WCHAR key) - { - - switch(key) - { - case UGL_UNI_UP_ARROW: - uglMesaResizeWindow(8, 8); - break; - case UGL_UNI_DOWN_ARROW: - glDrawBuffer(GL_FRONT_LEFT); - glClear(GL_COLOR_BUFFER_BIT); - glDrawBuffer(GL_BACK_LEFT); - uglMesaResizeWindow(-8, -8); - break; - case UGL_UNI_PAGE_UP: - uglMesaPixelStore(UGL_MESA_Y_UP, GL_TRUE); - break; - case UGL_UNI_PAGE_DOWN: - uglMesaPixelStore(UGL_MESA_Y_UP, GL_FALSE); - break; - case UGL_UNI_ESCAPE: - stopWex = UGL_TRUE; - break; - case 'd': - if (glIsEnabled(GL_DITHER)) - glDisable(GL_DITHER); - else - glEnable(GL_DITHER); - break; - } - } - -UGL_LOCAL void loopEvent(void) - { - UGL_EVENT event; - UGL_INPUT_EVENT * pInputEvent; - - drawGL(); - - UGL_FOREVER - { - if (uglEventGet (qId, &event, sizeof (event), UGL_WAIT_FOREVER) - != UGL_STATUS_Q_EMPTY) - { - pInputEvent = (UGL_INPUT_EVENT *)&event; - - if (pInputEvent->header.type == UGL_EVENT_TYPE_KEYBOARD && - pInputEvent->modifiers & UGL_KEYBOARD_KEYDOWN) - { - readKey(pInputEvent->type.keyboard.key); - drawGL(); - } - } - - if (stopWex) - break; - } - } - -void windMLFlip (UGL_BOOL windMLMode); - -void uglflip (void) - { - taskSpawn ("tFlip", 210, VX_FP_TASK, 100000, (FUNCPTR)windMLFlip, - UGL_FALSE,1,2,3,4,5,6,7,8,9); - } - -void windMLFlip (UGL_BOOL windMLMode) - { - - UGL_INPUT_DEVICE_ID keyboardDevId; - - uglInitialize(); - - uglDriverFind (UGL_KEYBOARD_TYPE, 0, (UGL_UINT32 *)&keyboardDevId); - - uglDriverFind (UGL_EVENT_SERVICE_TYPE, 0, (UGL_UINT32 *)&eventServiceId); - - qId = uglEventQCreate (eventServiceId, 100); - - if (windMLMode) - umc = uglMesaCreateNewContext(UGL_MESA_SINGLE - | UGL_MESA_WINDML_EXCLUSIVE, NULL); - else - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE_SOFTWARE, NULL); - - if (umc == NULL) - { - uglDeinitialize(); - return; - } - - uglMesaMakeCurrentContext(umc, 0, 0, UGL_MESA_FULLSCREEN_WIDTH, - UGL_MESA_FULLSCREEN_HEIGHT); - - uglMesaGetIntegerv(UGL_MESA_RGB, &rgb); - - initGL(); - - echoUse(); - stopWex = UGL_FALSE; - loopEvent(); - - uglEventQDestroy (eventServiceId, qId); - - uglMesaDestroyContext(); - uglDeinitialize(); - - return; - } diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglgears.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/uglgears.c deleted file mode 100644 index 468fe89980..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglgears.c +++ /dev/null @@ -1,428 +0,0 @@ - -/* uglgears.c - WindML/Mesa example program */ - -/* - * 3-D gear wheels. This program is in the public domain. - * - * Brian Paul - * - * Conversion to GLUT by Mark J. Kilgard - * Conversion to UGL/Mesa from GLUT by Stephane Raimbault - */ - -/* -DESCRIPTION -Spinning gears demo -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -#define COUNT_FRAMES - -UGL_LOCAL UGL_EVENT_SERVICE_ID eventServiceId; -UGL_LOCAL UGL_EVENT_Q_ID qId; -UGL_LOCAL volatile UGL_BOOL stopWex; -UGL_LOCAL UGL_MESA_CONTEXT umc; - -UGL_LOCAL GLfloat view_rotx, view_roty, view_rotz; -UGL_LOCAL GLint gear1, gear2, gear3; -UGL_LOCAL GLfloat angle; - -UGL_LOCAL GLuint limit; -UGL_LOCAL GLuint count; -UGL_LOCAL GLuint tickStart, tickStop, tickBySec; - - -/* -* Draw a gear wheel. You'll probably want to call this function when -* building a display list since we do a lot of trig here. -* -* Input: inner_radius - radius of hole at center -* outer_radius - radius at center of teeth -* width - width of gear -* teeth - number of teeth -* tooth_depth - depth of tooth -*/ - -UGL_LOCAL void gear - ( - GLfloat inner_radius, - GLfloat outer_radius, - GLfloat width, - GLint teeth, - GLfloat tooth_depth - ) - { - GLint i; - GLfloat r0, r1, r2; - GLfloat angle, da; - GLfloat u, v, len; - - r0 = inner_radius; - r1 = outer_radius - tooth_depth/2.0; - r2 = outer_radius + tooth_depth/2.0; - - da = 2.0*M_PI / teeth / 4.0; - - glShadeModel (GL_FLAT); - - glNormal3f (0.0, 0.0, 1.0); - - /* draw front face */ - glBegin (GL_QUAD_STRIP); - for (i=0;i<=teeth;i++) - { - angle = i * 2.0*M_PI / teeth; - glVertex3f (r0*cos (angle), r0*sin (angle), width*0.5); - glVertex3f (r1*cos (angle), r1*sin (angle), width*0.5); - glVertex3f (r0*cos (angle), r0*sin (angle), width*0.5); - glVertex3f (r1*cos (angle+3*da), r1*sin (angle+3*da), width*0.5); - } - glEnd (); - - /* draw front sides of teeth */ - glBegin (GL_QUADS); - da = 2.0*M_PI / teeth / 4.0; - for (i=0; i limit) - { - tickStop = tickGet (); - time = (tickStop-tickStart)/tickBySec; - printf (" %i fps\n", count/time); - tickStart = tickStop; - count = 0; - } - else - count++; -#endif -} - - -UGL_LOCAL void initGL (GLsizei width, GLsizei height) - { - UGL_LOCAL GLfloat pos[4] = {5.0, 5.0, 10.0, 1.0 }; - UGL_LOCAL GLfloat red[4] = {0.8, 0.1, 0.0, 1.0 }; - UGL_LOCAL GLfloat green[4] = {0.0, 0.8, 0.2, 1.0 }; - UGL_LOCAL GLfloat blue[4] = {0.2, 0.2, 1.0, 1.0 }; - - glLightfv (GL_LIGHT0, GL_POSITION, pos); - glEnable (GL_CULL_FACE); - glEnable (GL_LIGHTING); - glEnable (GL_LIGHT0); - glEnable (GL_DEPTH_TEST); - - /* make the gears */ - gear1 = glGenLists (1); - glNewList (gear1, GL_COMPILE); - glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); - gear (1.0, 4.0, 1.0, 20, 0.7); - glEndList (); - - gear2 = glGenLists (1); - glNewList (gear2, GL_COMPILE); - glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); - gear (0.5, 2.0, 2.0, 10, 0.7); - glEndList (); - - gear3 = glGenLists (1); - glNewList (gear3, GL_COMPILE); - glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); - gear (1.3, 2.0, 0.5, 10, 0.7); - glEndList (); - - glEnable (GL_NORMALIZE); - - glViewport (0, 0, width, height); - - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - if (width>height) - { - GLfloat w = (GLfloat) width / (GLfloat) height; - glFrustum (-w, w, -1.0, 1.0, 5.0, 60.0); - } - else - { - GLfloat h = (GLfloat) height / (GLfloat) width; - glFrustum (-1.0, 1.0, -h, h, 5.0, 60.0); - } - - glMatrixMode (GL_MODELVIEW); - glLoadIdentity (); - glTranslatef (0.0, 0.0, -40.0); - -#ifdef COUNT_FRAMES - tickStart = tickGet (); - tickBySec = sysClkRateGet (); -#endif -} - -UGL_LOCAL void echoUse(void) - { - printf("tGears keys:\n"); - printf(" z Counter clockwise rotation (z-axis)\n"); - printf(" Z Clockwise rotation (z-axis)\n"); - printf(" Up Counter clockwise rotation (x-axis)\n"); - printf(" Down Clockwise rotation (x-axis)\n"); - printf(" Left Counter clockwise rotation (y-axis)\n"); - printf(" Right Clockwise rotation (y-axis)\n"); - printf(" ESC Exit\n"); - } - - -UGL_LOCAL void readKey (UGL_WCHAR key) - { - - switch(key) - { - case 'z': - view_rotz += 5.0; - break; - case 'Z': - view_rotz -= 5.0; - break; - case UGL_UNI_UP_ARROW: - view_rotx += 5.0; - break; - case UGL_UNI_DOWN_ARROW: - view_rotx -= 5.0; - break; - case UGL_UNI_LEFT_ARROW: - view_roty += 5.0; - break; - case UGL_UNI_RIGHT_ARROW: - view_roty -= 5.0; - break; - case UGL_UNI_ESCAPE: - stopWex = UGL_TRUE; - break; - } - } - -UGL_LOCAL void loopEvent(void) - { - UGL_EVENT event; - UGL_INPUT_EVENT * pInputEvent; - - UGL_FOREVER - { - if (uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT) - != UGL_STATUS_Q_EMPTY) - { - pInputEvent = (UGL_INPUT_EVENT *)&event; - - if (pInputEvent->header.type == UGL_EVENT_TYPE_KEYBOARD && - pInputEvent->modifiers & UGL_KEYBOARD_KEYDOWN) - readKey(pInputEvent->type.keyboard.key); - } - - drawGL(); - if (stopWex) - break; - } - } - -void windMLGears (UGL_BOOL windMLMode); - -void uglgears (void) - { - taskSpawn ("tGears", 210, VX_FP_TASK, 100000, (FUNCPTR)windMLGears, - UGL_FALSE,1,2,3,4,5,6,7,8,9); - } - -void windMLGears (UGL_BOOL windMLMode) - { - GLsizei width, height; - UGL_INPUT_DEVICE_ID keyboardDevId; - - view_rotx=20.0; - view_roty=30.0; - view_rotz=0.0; - angle = 0.0; - limit = 100; - count = 1; - - uglInitialize (); - - uglDriverFind (UGL_KEYBOARD_TYPE, 0, - (UGL_UINT32 *)&keyboardDevId); - - uglDriverFind (UGL_EVENT_SERVICE_TYPE, 0, (UGL_UINT32 *)&eventServiceId); - - qId = uglEventQCreate (eventServiceId, 100); - - /* Double buffering */ - if (windMLMode) - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE - | UGL_MESA_WINDML_EXCLUSIVE, NULL); - else - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE, NULL); - - if (umc == NULL) - { - uglDeinitialize (); - return; - } - - /* Fullscreen */ - - uglMesaMakeCurrentContext (umc, 0, 0, UGL_MESA_FULLSCREEN_WIDTH, - UGL_MESA_FULLSCREEN_HEIGHT); - - uglMesaGetIntegerv(UGL_MESA_WIDTH, &width); - uglMesaGetIntegerv(UGL_MESA_HEIGHT, &height); - - initGL (width, height); - - echoUse(); - - stopWex = UGL_FALSE; - loopEvent(); - - uglEventQDestroy (eventServiceId, qId); - - uglMesaDestroyContext(); - uglDeinitialize (); - - return; - } diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglicotorus.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/uglicotorus.c deleted file mode 100644 index c09b6d1b52..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglicotorus.c +++ /dev/null @@ -1,315 +0,0 @@ -/* uglicotorus.c - WindML/Mesa example program */ - -/* Copyright (C) 2001 by Wind River Systems, Inc */ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * The MIT License - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* -modification history --------------------- -01a,jun01,sra -*/ - -#include -#include - -#include -#include -#include - -#include -#include - -/* Need GLUT_SHAPES */ - -#include - -UGL_LOCAL UGL_EVENT_SERVICE_ID eventServiceId; -UGL_LOCAL UGL_EVENT_Q_ID qId; -UGL_LOCAL UGL_MESA_CONTEXT umc; -UGL_LOCAL volatile UGL_BOOL stopWex; - -UGL_LOCAL GLfloat angle; -UGL_LOCAL GLboolean chaos_on; -UGL_LOCAL GLboolean color_on; - -UGL_LOCAL GLuint theIco, theTorus, theSphere, theCube; - -UGL_LOCAL void initGL - ( - int w, - int h - ) - { - glViewport(0,0,(GLsizei)w,(GLsizei)h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(60.0,(GLfloat)w/(GLfloat)h,1.0,60.0); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - gluLookAt(0.0,0.0,25.0,0.0,0.0,0.0,0.0,1.0,0.0); - - glClearColor(0.0,0.0,0.0,0.0); - - glEnable(GL_DEPTH_TEST); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - - glEnable(GL_COLOR_MATERIAL); - - theIco = glGenLists(1); - glNewList(theIco, GL_COMPILE); - glutSolidIcosahedron(); - glEndList(); - - theTorus = glGenLists(1); - glNewList(theTorus, GL_COMPILE); - glutSolidTorus(0.2,1.0,10,10); - glEndList(); - - theSphere = glGenLists(1); - glNewList(theSphere, GL_COMPILE); - glutSolidSphere(2.5,20,20); - glEndList(); - - theCube = glGenLists(1); - glNewList(theCube, GL_COMPILE); - glutSolidCube(4.0); - glEndList(); - - } - -UGL_LOCAL void createIcoToruses - ( - int i - ) - { - glPushMatrix(); - glRotatef(angle,1.0,1.0,1.0); - glCallList(theIco); - - switch (i) - { - case 9 : - glColor3f(1.0,0.0,0.0); - break; - case 0 : - glColor3f(1.0,0.1,0.7); - break; - case 1 : - glColor3f(1.0,0.0,1.0); - break; - case 2 : - glColor3f(0.0,0.0,1.0); - break; - case 3 : - glColor3f(0.0,0.5,1.0); - break; - case 4 : - glColor3f(0.0,1.0,0.7); - break; - case 5 : - glColor3f(0.0,1.0,0.0); - break; - case 6 : - glColor3f(0.5,1.0,0.0); - break; - case 7 : - glColor3f(1.0,1.0,0.0); - break; - case 8 : - glColor3f(1.0,0.5,0.0); - break; - } - - glRotatef(angle,1.0,1.0,1.0); - glCallList(theTorus); - glRotatef(-2*angle,1.0,1.0,1.0); - glCallList(theTorus); - glPopMatrix(); - } - -UGL_LOCAL void drawGL (void) - { - int i; - - if (color_on) - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - else - glClear(GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - - if (chaos_on) - glRotatef(angle,1.0,1.0,1.0); - - glPushMatrix(); - glRotatef(angle,1.0,1.0,1.0); - glColor3f(1.0,0.5,0.0); - glCallList(theSphere); - glColor3f(1.0,0.0,0.0); - glCallList(theCube); - glPopMatrix(); - - glRotatef(-angle,0.0,0.0,1.0); - glPushMatrix(); - /* draw ten icosahedrons */ - for (i = 0; i < 10; i++) - { - glPushMatrix(); - glRotatef(36*i,0.0,0.0,1.0); - glTranslatef(10.0,0.0,0.0); - glRotatef(2*angle,0.0,1.0,0.0); - glTranslatef(0.0,0.0,2.0); - - createIcoToruses(i); - glPopMatrix(); - } - glPopMatrix(); - - glPopMatrix(); - - uglMesaSwapBuffers(); - - angle += 1.0; - - } - -UGL_LOCAL void echoUse(void) - { - printf("tIcoTorus keys:\n"); - printf(" c Toggle color buffer clear\n"); - printf(" SPACE Toggle chaos mode\n"); - printf(" ESC Exit\n"); - } - -UGL_LOCAL void readKey (UGL_WCHAR key) - { - - switch(key) - { - case 'c': - color_on = !color_on; - break; - case UGL_UNI_SPACE: - chaos_on = !chaos_on; - break; - case UGL_UNI_ESCAPE: - stopWex = UGL_TRUE; - break; - } - } - -UGL_LOCAL void loopEvent(void) - { - UGL_EVENT event; - UGL_INPUT_EVENT * pInputEvent; - - UGL_FOREVER - { - if (uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT) - != UGL_STATUS_Q_EMPTY) - { - pInputEvent = (UGL_INPUT_EVENT *)&event; - - if (pInputEvent->header.type == UGL_EVENT_TYPE_KEYBOARD && - pInputEvent->modifiers & UGL_KEYBOARD_KEYDOWN) - readKey(pInputEvent->type.keyboard.key); - } - - drawGL(); - if (stopWex) - break; - } - } - -void windMLIcoTorus (UGL_BOOL windMLMode); - -void uglicotorus (void) - { - taskSpawn ("tIcoTorus", 210, VX_FP_TASK, 100000, (FUNCPTR)windMLIcoTorus, - UGL_FALSE,1,2,3,4,5,6,7,8,9); - } - -void windMLIcoTorus (UGL_BOOL windMLMode) - { - GLsizei width, height; - UGL_INPUT_DEVICE_ID keyboardDevId; - - angle = 0.0; - chaos_on = GL_TRUE; - color_on = GL_TRUE; - - uglInitialize (); - - uglDriverFind (UGL_KEYBOARD_TYPE, 0, - (UGL_UINT32 *)&keyboardDevId); - - if (uglDriverFind (UGL_EVENT_SERVICE_TYPE, 0, - (UGL_UINT32 *)&eventServiceId) == UGL_STATUS_OK) - { - qId = uglEventQCreate (eventServiceId, 100); - } - else - { - eventServiceId = UGL_NULL; - } - - /* Double buffering */ - if (windMLMode) - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE - | UGL_MESA_WINDML_EXCLUSIVE, NULL); - else - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE, NULL); - - if (umc == NULL) - { - uglDeinitialize (); - return; - } - - uglMesaMakeCurrentContext (umc, 0, 0, UGL_MESA_FULLSCREEN_WIDTH, - UGL_MESA_FULLSCREEN_HEIGHT); - - uglMesaGetIntegerv(UGL_MESA_WIDTH, &width); - uglMesaGetIntegerv(UGL_MESA_HEIGHT, &height); - - initGL (width, height); - - echoUse(); - - stopWex = UGL_FALSE; - loopEvent(); - - if (eventServiceId != UGL_NULL) - uglEventQDestroy (eventServiceId, qId); - - uglMesaDestroyContext (); - uglDeinitialize (); - - return; - } - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglline.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/uglline.c deleted file mode 100644 index e58f071ea4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglline.c +++ /dev/null @@ -1,274 +0,0 @@ - -/* uglline.c - WindML/Mesa example program */ - -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* -modification history --------------------- -01a,jun01,sra Ported to UGL/Mesa and modifications -*/ - -/* -DESCRIPTION -Draw circular lines -*/ - -#include -#include - -#include -#include -#include -#include - -#include -#include - -#define BLACK (0) -#define YELLOW (1) -#define GREEN (2) -#define BLUE (3) -#define CI_OFFSET 4 - -UGL_LOCAL GLuint rgb; -UGL_LOCAL UGL_EVENT_SERVICE_ID eventServiceId; -UGL_LOCAL UGL_EVENT_Q_ID qId; -UGL_LOCAL volatile UGL_BOOL stopWex; -UGL_LOCAL UGL_MESA_CONTEXT umc; - -UGL_LOCAL GLboolean mode1, mode2; -UGL_LOCAL GLint size; - -UGL_LOCAL GLfloat pntA[3] = { - -10.0, 0.0, 0.0 -}; -UGL_LOCAL GLfloat pntB[3] = { - -5.0, 0.0, 0.0 -}; - -UGL_LOCAL GLint angleA; - -UGL_LOCAL void initGL (void) - { - GLint i; - - uglMesaSetColor(BLACK, 0.0, 0.0, 0.0); - uglMesaSetColor(YELLOW, 1.0, 1.0, 0.0); - uglMesaSetColor(GREEN, 0.0, 1.0, 0.0); - uglMesaSetColor(BLUE, 0.0, 0.0, 1.0); - - for (i = 0; i < 16; i++) - { - uglMesaSetColor(CI_OFFSET+i, i/15.0, i/15.0, 0.0); - } - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClearIndex(BLACK); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-10, 10, -10, 10, -10.0, 10.0); - - glMatrixMode(GL_MODELVIEW); - - glLineStipple(1, 0xF0E0); - glBlendFunc(GL_SRC_ALPHA, GL_ONE); - - mode1 = GL_FALSE; - mode2 = GL_FALSE; - size = 1; - } - -UGL_LOCAL void drawGL (void) - { - - GLint ci, i; - - glClear(GL_COLOR_BUFFER_BIT); - - glLineWidth(size); - - if (mode1) { - glEnable(GL_LINE_STIPPLE); - } else { - glDisable(GL_LINE_STIPPLE); - } - - if (mode2) { - ci = CI_OFFSET; - glEnable(GL_LINE_SMOOTH); - glEnable(GL_BLEND); - } else { - ci = YELLOW; - glDisable(GL_LINE_SMOOTH); - glDisable(GL_BLEND); - } - - glPushMatrix(); - - glRotatef(angleA, 1, 0, 1); - angleA = angleA++ % 360; - - for (i = 0; i < 360; i += 5) { - glRotatef(5.0, 0, 0, 1); - - glColor3f(1.0, 1.0, 0.0); - glBegin(GL_LINE_STRIP); - glVertex3fv(pntA); - glVertex3fv(pntB); - glEnd(); - - glPointSize(1); - - glColor3f(0.0, 1.0, 0.0); - glBegin(GL_POINTS); - glVertex3fv(pntA); - glVertex3fv(pntB); - glEnd(); - } - - glPopMatrix(); - - glFlush(); - - uglMesaSwapBuffers(); - - } - -UGL_LOCAL void echoUse(void) - { - printf("tLine keys:\n"); - printf(" b Blending/antialiasing\n"); - printf(" n Line stipple\n"); - printf(" Up/Down Pixel size\n"); - printf(" ESC Exit\n"); - } - -UGL_LOCAL void readKey (UGL_WCHAR key) - { - switch(key) - { - case 'n': - mode1 = (mode1) ? GL_FALSE: GL_TRUE; - break; - case 'b': - mode2 = (mode2) ? GL_FALSE: GL_TRUE; - break; - case UGL_UNI_DOWN_ARROW: - if(size>0) - size--; - break; - case UGL_UNI_UP_ARROW: - size++; - break; - case UGL_UNI_ESCAPE: - stopWex = UGL_TRUE; - break; - } - } - -UGL_LOCAL void loopEvent(void) - { - UGL_EVENT event; - UGL_INPUT_EVENT * pInputEvent; - - UGL_FOREVER - { - if (uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT) - != UGL_STATUS_Q_EMPTY) - { - pInputEvent = (UGL_INPUT_EVENT *)&event; - - if (pInputEvent->header.type == UGL_EVENT_TYPE_KEYBOARD && - pInputEvent->modifiers & UGL_KEYBOARD_KEYDOWN) - readKey(pInputEvent->type.keyboard.key); - } - - drawGL(); - if (stopWex) - break; - } - } - -void windMLLine (UGL_BOOL windMLMode); - -void uglline (void) - { - taskSpawn("tLine", 210, VX_FP_TASK, 100000, (FUNCPTR)windMLLine, - UGL_FALSE,1,2,3,4,5,6,7,8,9); - } - - -void windMLLine(UGL_BOOL windMLMode) - { - - UGL_INPUT_DEVICE_ID keyboardDevId; - - angleA = 0; - - uglInitialize(); - - uglDriverFind (UGL_KEYBOARD_TYPE, 0, (UGL_UINT32 *)&keyboardDevId); - - uglDriverFind (UGL_EVENT_SERVICE_TYPE, 0, (UGL_UINT32 *)&eventServiceId); - - qId = uglEventQCreate (eventServiceId, 100); - - /* Double buffer */ - - if (windMLMode) - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE - | UGL_MESA_WINDML_EXCLUSIVE, NULL); - else - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE, NULL); - - if (umc == NULL) - { - uglDeinitialize(); - return; - } - - /* Fullscreen */ - - uglMesaMakeCurrentContext(umc, 0, 0, UGL_MESA_FULLSCREEN_WIDTH, - UGL_MESA_FULLSCREEN_HEIGHT); - - uglMesaGetIntegerv(UGL_MESA_RGB, &rgb); - - initGL(); - - echoUse(); - - stopWex = UGL_FALSE; - loopEvent(); - - uglEventQDestroy(eventServiceId, qId); - - uglMesaDestroyContext(); - uglDeinitialize(); - - return; - } diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglolympic.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/uglolympic.c deleted file mode 100644 index 282558dacb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglolympic.c +++ /dev/null @@ -1,479 +0,0 @@ -/* - * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF - * ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * Nov 20, 1995 use stdlib's rand()/srand() instead of random()/srand48(), etc. - */ - -/* - * Modified by Stephane Raimbault to be able to run in VxWorks 07/18/01 - * - * Modified by Li Wei(liwei@aiar.xjtu.edu.cn) to be able to run in Windows - * 6/13 - * - * Modified by Brian Paul to compile with Windows OR Unix. 7/23/97 - */ - - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#ifndef RAND_MAX -# define RAND_MAX 32767 -#endif - -#define XSIZE 100 -#define YSIZE 75 - -#define RINGS 5 -#define BLUERING 0 -#define BLACKRING 1 -#define REDRING 2 -#define YELLOWRING 3 -#define GREENRING 4 - -#define BACKGROUND 8 - -UGL_LOCAL UGL_EVENT_SERVICE_ID eventServiceId; -UGL_LOCAL UGL_EVENT_Q_ID qId; -UGL_LOCAL UGL_MESA_CONTEXT umc; -UGL_LOCAL volatile UGL_BOOL stopWex; - -UGL_LOCAL int rgb; -UGL_LOCAL unsigned char rgb_colors[RINGS][3]; -UGL_LOCAL int mapped_colors[RINGS]; -UGL_LOCAL float dests[RINGS][3]; -UGL_LOCAL float offsets[RINGS][3]; -UGL_LOCAL float angs[RINGS]; -UGL_LOCAL float rotAxis[RINGS][3]; -UGL_LOCAL int iters[RINGS]; -UGL_LOCAL GLuint theTorus; - -enum { - COLOR_BLACK = 0, - COLOR_RED, - COLOR_GREEN, - COLOR_YELLOW, - COLOR_BLUE, - COLOR_MAGENTA, - COLOR_CYAN, - COLOR_WHITE -}; - -/* -UGL_LOCAL float RGBMap[9][3] = { - {0, 0, 0}, - {1, 0, 0}, - {0, 1, 0}, - {1, 1, 0}, - {0, 0, 1}, - {1, 0, 1}, - {0, 1, 1}, - {1, 1, 1}, - {0.5, 0.5, 0.5} -}; - -UGL_LOCAL void SetColor(int c) - { - (rgb) ? glColor3fv(RGBMap[c]): glIndexf(c); - } - -UGL_LOCAL void InitMap(void) - { - int i; - - if (rgb) - return; - - for (i = 0; i < 9; i++) - uglMesaSetColor(i, RGBMap[i][0], RGBMap[i][1], RGBMap[i][2]); - } - -UGL_LOCAL void SetFogRamp(int density, int startIndex) - { - int fogValues, colorValues; - int i, j, k; - float intensity; - - fogValues = 1 << density; - colorValues = 1 << startIndex; - for (i = 0; i < colorValues; i++) - { - for (j = 0; j < fogValues; j++) - { - k = i * fogValues + j; - intensity = (i * fogValues + j * colorValues) / 255.0; - uglMesaSetColor(k, intensity, intensity, intensity); - } - } - } - -UGL_LOCAL void SetGreyRamp(void) - { - int i; - float intensity; - - for (i = 0; i < 255; i++) - { - intensity = i / 255.0; - uglMesaSetColor(i, intensity, intensity, intensity); - } - } -*/ - -UGL_LOCAL void FillTorus(float rc, int numc, float rt, int numt) - { - int i, j, k; - double s, t; - double x, y, z; - double pi, twopi; - - pi = 3.14159265358979323846; - twopi = 2 * pi; - - for (i = 0; i < numc; i++) - { - glBegin(GL_QUAD_STRIP); - for (j = 0; j <= numt; j++) - { - for (k = 1; k >= 0; k--) - { - s = (i + k) % numc + 0.5; - t = j % numt; - - x = cos(t*twopi/numt) * cos(s*twopi/numc); - y = sin(t*twopi/numt) * cos(s*twopi/numc); - z = sin(s*twopi/numc); - glNormal3f(x, y, z); - - x = (rt + rc * cos(s*twopi/numc)) * cos(t*twopi/numt); - y = (rt + rc * cos(s*twopi/numc)) * sin(t*twopi/numt); - z = rc * sin(s*twopi/numc); - glVertex3f(x, y, z); - } - } - glEnd(); - } - } - -UGL_LOCAL float Clamp(int iters_left, float t) - { - if (iters_left < 3) - { - return 0.0; - } - return (iters_left-2)*t/iters_left; - } - -UGL_LOCAL void drawGL(void) - { - int i, j; - - for (i = 0; i < RINGS; i++) - { - if (iters[i]) { - for (j = 0; j < 3; j++) - { - offsets[i][j] = Clamp(iters[i], offsets[i][j]); - } - angs[i] = Clamp(iters[i], angs[i]); - iters[i]--; - } - } - - glPushMatrix(); - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - gluLookAt(0,0,10, 0,0,0, 0,1,0); - - for (i = 0; i < RINGS; i++) - { - if (rgb) - { - glColor3ubv(rgb_colors[i]); - } - else - { - glIndexi(mapped_colors[i]); - } - glPushMatrix(); - glTranslatef(dests[i][0]+offsets[i][0], dests[i][1]+offsets[i][1], - dests[i][2]+offsets[i][2]); - glRotatef(angs[i], rotAxis[i][0], rotAxis[i][1], rotAxis[i][2]); - glCallList(theTorus); - glPopMatrix(); - } - - glPopMatrix(); - - glFlush(); - - uglMesaSwapBuffers(); - } - -UGL_LOCAL float MyRand(void) - { - return 10.0 * ( (float) rand() / (float) RAND_MAX - 0.5 ); - } - -UGL_LOCAL void ReInit(void) - { - int i; - float deviation; - - deviation = MyRand() / 2; - deviation = deviation * deviation; - for (i = 0; i < RINGS; i++) - { - offsets[i][0] = MyRand(); - offsets[i][1] = MyRand(); - offsets[i][2] = MyRand(); - angs[i] = 260.0 * MyRand(); - rotAxis[i][0] = MyRand(); - rotAxis[i][1] = MyRand(); - rotAxis[i][2] = MyRand(); - iters[i] = (deviation * MyRand() + 60.0); - } - } - -UGL_LOCAL void initGL(void) - { - float base, height; - float aspect, x, y; - int i; - - float top_y = 1.0; - float bottom_y = 0.0; - float top_z = 0.15; - float bottom_z = 0.69; - float spacing = 2.5; - static float lmodel_ambient[] = {0.0, 0.0, 0.0, 0.0}; - static float lmodel_twoside[] = {GL_FALSE}; - static float lmodel_local[] = {GL_FALSE}; - static float light0_ambient[] = {0.1, 0.1, 0.1, 1.0}; - static float light0_diffuse[] = {1.0, 1.0, 1.0, 0.0}; - static float light0_position[] = {0.8660254, 0.5, 1, 0}; - static float light0_specular[] = {1.0, 1.0, 1.0, 0.0}; - static float bevel_mat_ambient[] = {0.0, 0.0, 0.0, 1.0}; - static float bevel_mat_shininess[] = {40.0}; - static float bevel_mat_specular[] = {1.0, 1.0, 1.0, 0.0}; - static float bevel_mat_diffuse[] = {1.0, 0.0, 0.0, 0.0}; - - ReInit(); - - for (i = 0; i < RINGS; i++) - { - rgb_colors[i][0] = rgb_colors[i][1] = rgb_colors[i][2] = 0; - } - rgb_colors[BLUERING][2] = 255; - rgb_colors[REDRING][0] = 255; - rgb_colors[GREENRING][1] = 255; - rgb_colors[YELLOWRING][0] = 255; - rgb_colors[YELLOWRING][1] = 255; - mapped_colors[BLUERING] = COLOR_BLUE; - mapped_colors[REDRING] = COLOR_RED; - mapped_colors[GREENRING] = COLOR_GREEN; - mapped_colors[YELLOWRING] = COLOR_YELLOW; - mapped_colors[BLACKRING] = COLOR_BLACK; - - dests[BLUERING][0] = -spacing; - dests[BLUERING][1] = top_y; - dests[BLUERING][2] = top_z; - - dests[BLACKRING][0] = 0.0; - dests[BLACKRING][1] = top_y; - dests[BLACKRING][2] = top_z; - - dests[REDRING][0] = spacing; - dests[REDRING][1] = top_y; - dests[REDRING][2] = top_z; - - dests[YELLOWRING][0] = -spacing / 2.0; - dests[YELLOWRING][1] = bottom_y; - dests[YELLOWRING][2] = bottom_z; - - dests[GREENRING][0] = spacing / 2.0; - dests[GREENRING][1] = bottom_y; - dests[GREENRING][2] = bottom_z; - - base = 2.0; - height = 2.0; - theTorus = glGenLists(1); - glNewList(theTorus, GL_COMPILE); - FillTorus(0.1, 8, 1.0, 25); - glEndList(); - - x = (float)XSIZE; - y = (float)YSIZE; - aspect = x / y; - glEnable(GL_CULL_FACE); - glCullFace(GL_BACK); - glEnable(GL_DEPTH_TEST); - glClearDepth(1.0); - - if (rgb) - { - glClearColor(0.5, 0.5, 0.5, 0.0); - glLightfv(GL_LIGHT0, GL_AMBIENT, light0_ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, light0_diffuse); - glLightfv(GL_LIGHT0, GL_SPECULAR, light0_specular); - glLightfv(GL_LIGHT0, GL_POSITION, light0_position); - glEnable(GL_LIGHT0); - - glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, lmodel_local); - glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); - glEnable(GL_LIGHTING); - - glMaterialfv(GL_FRONT, GL_AMBIENT, bevel_mat_ambient); - glMaterialfv(GL_FRONT, GL_SHININESS, bevel_mat_shininess); - glMaterialfv(GL_FRONT, GL_SPECULAR, bevel_mat_specular); - glMaterialfv(GL_FRONT, GL_DIFFUSE, bevel_mat_diffuse); - - glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); - glEnable(GL_COLOR_MATERIAL); - glShadeModel(GL_SMOOTH); - } - else - { - glClearIndex(BACKGROUND); - glShadeModel(GL_FLAT); - } - - glMatrixMode(GL_PROJECTION); - gluPerspective(45, 1.33, 0.1, 100.0); - glMatrixMode(GL_MODELVIEW); - } - -UGL_LOCAL void echoUse(void) - { - printf("tOlympic keys:\n"); - printf(" SPACE Reinitialize\n"); - printf(" ESC Exit\n"); - } - -UGL_LOCAL void readKey (UGL_WCHAR key) - { - switch(key) - { - case UGL_UNI_SPACE: - ReInit(); - break; - case UGL_UNI_ESCAPE: - stopWex = 1; - break; - } - } - -UGL_LOCAL void loopEvent(void) - { - UGL_EVENT event; - UGL_INPUT_EVENT * pInputEvent; - - UGL_FOREVER - { - if (uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT) - != UGL_STATUS_Q_EMPTY) - { - pInputEvent = (UGL_INPUT_EVENT *)&event; - - if (pInputEvent->header.type == UGL_EVENT_TYPE_KEYBOARD && - pInputEvent->modifiers & UGL_KEYBOARD_KEYDOWN) - readKey(pInputEvent->type.keyboard.key); - } - - drawGL(); - if (stopWex) - break; - } - } - -void windMLOlympic (UGL_BOOL windMLMode); - -void uglolympic (void) - { - taskSpawn("tOlympic", 210, VX_FP_TASK, 100000, (FUNCPTR)windMLOlympic, - 0,1,2,3,4,5,6,7,8,9); - } - -void windMLOlympic(UGL_BOOL windMLMode) - { - UGL_INPUT_DEVICE_ID keyboardDevId; - - uglInitialize(); - - uglDriverFind (UGL_KEYBOARD_TYPE, 0, (UGL_UINT32 *)&keyboardDevId); - - if (uglDriverFind (UGL_EVENT_SERVICE_TYPE, 0, - (UGL_UINT32 *)&eventServiceId) == UGL_STATUS_OK) - { - qId = uglEventQCreate (eventServiceId, 100); - } - else - { - eventServiceId = UGL_NULL; - } - - if (windMLMode) - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE - | UGL_MESA_WINDML_EXCLUSIVE, NULL); - else - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE, NULL); - - if (umc == NULL) - { - uglDeinitialize(); - return; - } - - uglMesaMakeCurrentContext(umc, 0, 0, UGL_MESA_FULLSCREEN_WIDTH, - UGL_MESA_FULLSCREEN_HEIGHT); - - uglMesaGetIntegerv(UGL_MESA_RGB, &rgb); - - initGL(); - - echoUse(); - - stopWex = 0; - loopEvent(); - - if (eventServiceId != UGL_NULL) - uglEventQDestroy (eventServiceId, qId); - - uglMesaDestroyContext(); - uglDeinitialize(); - - return; - } diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglpoint.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/uglpoint.c deleted file mode 100644 index 49c432c3a4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglpoint.c +++ /dev/null @@ -1,277 +0,0 @@ - -/* uglpoint.c - WindML/Mesa example program */ - -/* Copyright (C) 2001 by Wind River Systems, Inc */ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * The MIT License - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* - * Authors: - * Stephane Raimbault - */ - -/* -DESCRIPTION -Draw a single point. -*/ - -#include -#include - -#include -#include -#include - -#include - -#define DOUBLE_BUFFER GL_TRUE - -enum { - BLACK = 0, - RED, - GREEN, - BLUE, - WHITE -}; - -UGL_LOCAL GLuint rgb; -UGL_LOCAL UGL_EVENT_SERVICE_ID eventServiceId; -UGL_LOCAL UGL_EVENT_Q_ID qId; -UGL_LOCAL UGL_MESA_CONTEXT umc; -UGL_LOCAL GLint angleT; - -UGL_LOCAL void initGL (void) - { - /* By passed in RGB mode */ - uglMesaSetColor(BLACK, 0.0, 0.0, 0.0); - uglMesaSetColor(RED, 1.0, 0.0, 0.0); - uglMesaSetColor(GREEN, 0.0, 1.0, 0.0); - uglMesaSetColor(BLUE, 0.0, 0.0, 1.0); - uglMesaSetColor(WHITE, 1.0, 1.0, 1.0); - - glOrtho(0.0, 1.0, 0.0, 1.0, -20.0, 20.0); - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClearIndex(BLACK); - } - -UGL_LOCAL void drawGL (void) - { - GLint i; - GLfloat x, y; - - /* Avoid blinking in single buffer */ - - if (DOUBLE_BUFFER) - glClear(GL_COLOR_BUFFER_BIT); - - /* Random points */ - - glBegin(GL_POINTS); - (rgb) ? glColor3f(1.0, 0.0, 0.0): glIndexi(RED); - - for (i=0; i<150; i++) - { - x = rand() / (RAND_MAX+1.0); - y = rand() / (RAND_MAX+1.0); - glVertex2f(x, y); - } - - (rgb) ? glColor3f(0.0, 1.0, 0.0): glIndexi(GREEN); - - for (i=0; i<150; i++) - { - x = (rand() / (RAND_MAX+1.0)); - y = (rand() / (RAND_MAX+1.0)); - glVertex2f(x, y); - } - - (rgb) ? glColor3f(0.0, 0.0, 1.0): glIndexi(BLUE); - glVertex2f(0.5,0.5); - - for (i=0; i<150; i++) - { - x = rand() / (RAND_MAX+1.0); - y = rand() / (RAND_MAX+1.0); - glVertex2f(x, y); - } - - glEnd(); - - /* Smooth triangle */ - - glPushMatrix(); - glTranslatef(0.5, 0.5, 0); - glRotatef(angleT, 1.0, -1.0, 0.0); - angleT = angleT++ % 360; - glBegin(GL_TRIANGLES); - (rgb) ? glColor3f(1.0, 0.0, 0.0): glIndexi(RED); - glVertex2f(0.75, 0.25); - (rgb) ? glColor3f(0.0, 1.0, 0.0): glIndexi(GREEN); - glVertex2f(0.75, 0.75); - (rgb) ? glColor3f(0.0, 0.0, 1.0): glIndexi(BLUE); - glVertex2f(0.25, 0.75); - glEnd(); - glPopMatrix(); - - /* Flush and swap */ - - glFlush(); - - uglMesaSwapBuffers(); - } - -/************************************************************************ -* -* getEvent -* -* RETURNS: true or false -* -* NOMANUAL -* -*/ - -UGL_LOCAL int getEvent(void) - { - UGL_EVENT event; - UGL_STATUS status; - int retVal = 0; - - status = uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT); - - while (status != UGL_STATUS_Q_EMPTY) - { - UGL_INPUT_EVENT * pInputEvent = (UGL_INPUT_EVENT *)&event; - - if (pInputEvent->modifiers & UGL_KEYBOARD_KEYDOWN) - retVal = 1; - - status = uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT); - } - - return(retVal); - } - -void windMLPoint (UGL_BOOL windMLMode); - -void uglpoint (void) - { - taskSpawn ("tPoint", 210, VX_FP_TASK, 100000, - (FUNCPTR)windMLPoint, UGL_FALSE,1,2,3,4,5,6,7,8,9); - } - -void windMLPoint (UGL_BOOL windMLMode) - { - GLubyte pPixels[4]; - GLsizei width, height; - UGL_INPUT_DEVICE_ID keyboardDevId; - - angleT = 0; - - uglInitialize(); - - uglDriverFind (UGL_KEYBOARD_TYPE, 0, (UGL_UINT32 *)&keyboardDevId); - - if (uglDriverFind (UGL_EVENT_SERVICE_TYPE, 0, - (UGL_UINT32 *)&eventServiceId) == UGL_STATUS_OK) - { - qId = uglEventQCreate (eventServiceId, 100); - } - else - { - eventServiceId = UGL_NULL; - } - - if (DOUBLE_BUFFER) - { - if (windMLMode) - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE - | UGL_MESA_WINDML_EXCLUSIVE, NULL); - else - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE, NULL); - } - else - { - if (windMLMode) - umc = uglMesaCreateNewContext(UGL_MESA_SINGLE - | UGL_MESA_WINDML_EXCLUSIVE, NULL); - else - umc = uglMesaCreateNewContext(UGL_MESA_SINGLE, NULL); - } - - if (umc == NULL) - { - uglDeinitialize(); - return; - } - - /* Fullscreen */ - - uglMesaMakeCurrentContext(umc, 0, 0, UGL_MESA_FULLSCREEN_WIDTH, - UGL_MESA_FULLSCREEN_HEIGHT); - - /* RGB or CI ? */ - - uglMesaGetIntegerv(UGL_MESA_RGB, &rgb); - - initGL(); - - while (!getEvent()) - drawGL(); - - uglMesaGetIntegerv(UGL_MESA_WIDTH, &width); - uglMesaGetIntegerv(UGL_MESA_HEIGHT, &height); - - printf ("glReadPixel return "); - if (rgb) - { - glReadPixels(width/2, height/2, - 1, 1, GL_RGB, - GL_UNSIGNED_BYTE, pPixels); - glFlush(); - printf ("R:%i G:%i B:%i (RGB)", pPixels[0], pPixels[1], pPixels[2]); - } - else - { - glReadPixels(width/2, height/2, - 1, 1, GL_COLOR_INDEX, - GL_UNSIGNED_BYTE, pPixels); - glFlush(); - if (pPixels[0] == BLUE) - printf ("BLUE (CI)"); - else - printf ("%i (CI))", pPixels[0]); - } - - printf(" for %ix%i\n", width/2, height/2); - - if (eventServiceId != UGL_NULL) - uglEventQDestroy (eventServiceId, qId); - - uglMesaDestroyContext(); - uglDeinitialize(); - - return; - } diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglstencil.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/uglstencil.c deleted file mode 100644 index 07e8fc626f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglstencil.c +++ /dev/null @@ -1,242 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -/* stencil.c - * This program draws two rotated tori in a window. - * A diamond in the center of the window masks out part - * of the scene. Within this mask, a different model - * (a sphere) is drawn in a different color. - */ - -/* - * Conversion to UGL/Mesa by Stephane Raimbault, 2001 - */ - -#include -#include - -#include -#include -#include - -#include -#include -#include - -#define YELLOWMAT 1 -#define BLUEMAT 2 - -UGL_LOCAL UGL_EVENT_SERVICE_ID eventServiceId; -UGL_LOCAL UGL_EVENT_Q_ID qId; -UGL_LOCAL UGL_MESA_CONTEXT umc; - -UGL_LOCAL void initGL (GLsizei w, GLsizei h) - { - GLfloat yellow_diffuse[] = { 0.7, 0.7, 0.0, 1.0 }; - GLfloat yellow_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - - GLfloat blue_diffuse[] = { 0.1, 0.1, 0.7, 1.0 }; - GLfloat blue_specular[] = { 0.1, 1.0, 1.0, 1.0 }; - - GLfloat position_one[] = { 1.0, 1.0, 1.0, 0.0 }; - - glNewList(YELLOWMAT, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_DIFFUSE, yellow_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, yellow_specular); - glMaterialf(GL_FRONT, GL_SHININESS, 64.0); - glEndList(); - - glNewList(BLUEMAT, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_DIFFUSE, blue_diffuse); - glMaterialfv(GL_FRONT, GL_SPECULAR, blue_specular); - glMaterialf(GL_FRONT, GL_SHININESS, 45.0); - glEndList(); - - glLightfv(GL_LIGHT0, GL_POSITION, position_one); - - glEnable(GL_LIGHT0); - glEnable(GL_LIGHTING); - glDepthFunc(GL_LESS); - glEnable(GL_DEPTH_TEST); - - glClearStencil(0x0); - glEnable(GL_STENCIL_TEST); - - glClear(GL_STENCIL_BUFFER_BIT); - -/* create a diamond shaped stencil area */ - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-3.0, 3.0, -3.0, 3.0, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - glStencilFunc (GL_ALWAYS, 0x1, 0x1); - glStencilOp (GL_REPLACE, GL_REPLACE, GL_REPLACE); - glBegin(GL_QUADS); - glVertex3f (-1.0, 0.0, 0.0); - glVertex3f (0.0, 1.0, 0.0); - glVertex3f (1.0, 0.0, 0.0); - glVertex3f (0.0, -1.0, 0.0); - glEnd(); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(45.0, (GLfloat) w/(GLfloat) h, 3.0, 7.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -5.0); - } - -/* Draw a sphere in a diamond-shaped section in the - * middle of a window with 2 tori. - */ -UGL_LOCAL void drawGL(void) - { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glStencilOp (GL_KEEP, GL_KEEP, GL_KEEP); - -/* draw blue sphere where the stencil is 1 */ - glStencilFunc (GL_EQUAL, 0x1, 0x1); - glCallList (BLUEMAT); - glutSolidSphere (0.5, 15, 15); - -/* draw the tori where the stencil is not 1 */ - glStencilFunc (GL_NOTEQUAL, 0x1, 0x1); - glPushMatrix(); - glRotatef (45.0, 0.0, 0.0, 1.0); - glRotatef (45.0, 0.0, 1.0, 0.0); - glCallList (YELLOWMAT); - glutSolidTorus (0.275, 0.85, 15, 15); - glPushMatrix(); - glRotatef (90.0, 1.0, 0.0, 0.0); - glutSolidTorus (0.275, 0.85, 15, 15); - glPopMatrix(); - glPopMatrix(); - - glFlush(); - - uglMesaSwapBuffers(); - } - -UGL_LOCAL int getEvent(void) - { - UGL_EVENT event; - UGL_STATUS status; - int retVal = 0; - - status = uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT); - - while (status != UGL_STATUS_Q_EMPTY) - { - UGL_INPUT_EVENT * pInputEvent = (UGL_INPUT_EVENT *)&event; - - if (pInputEvent->modifiers & UGL_KEYBOARD_KEYDOWN) - retVal = 1; - - status = uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT); - } - - return(retVal); - } - -void windMLStencil (UGL_BOOL windMLMode); - -void uglstencil (void) - { - taskSpawn("tStencil", 210, VX_FP_TASK, 100000, - (FUNCPTR)windMLStencil,UGL_FALSE,1,2,3,4,5,6,7,8,9); - } - -void windMLStencil(UGL_BOOL windMLMode) - { - UGL_INPUT_DEVICE_ID keyboardDevId; - GLsizei width, height; - - uglInitialize(); - - uglDriverFind (UGL_KEYBOARD_TYPE, 0, (UGL_UINT32 *)&keyboardDevId); - - uglDriverFind (UGL_EVENT_SERVICE_TYPE, 0, (UGL_UINT32 *)&eventServiceId); - - qId = uglEventQCreate (eventServiceId, 100); - - if (windMLMode) - umc = uglMesaCreateNewContextExt(UGL_MESA_SINGLE - | UGL_MESA_WINDML_EXCLUSIVE, - 16, - 8, - 0,0,0,0, - NULL); - else - umc = uglMesaCreateNewContextExt(UGL_MESA_SINGLE, - 16, - 8, - 0,0,0,0, - NULL); - - if (umc == NULL) - { - uglDeinitialize(); - return; - } - - /* Fullscreen */ - - uglMesaMakeCurrentContext(umc, 0, 0, UGL_MESA_FULLSCREEN_WIDTH, - UGL_MESA_FULLSCREEN_HEIGHT); - - uglMesaGetIntegerv(UGL_MESA_WIDTH, &width); - uglMesaGetIntegerv(UGL_MESA_HEIGHT, &height); - - initGL(width, height); - - drawGL(); - - while (!getEvent()); - - uglEventQDestroy (eventServiceId, qId); - - uglMesaDestroyContext(); - uglDeinitialize(); - - return; - } - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglteapot.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/uglteapot.c deleted file mode 100644 index 651fe0990e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/uglteapot.c +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * The MIT License - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* - * Linux Magazine July 2001 - * Conversion to UGL/Mesa from GLUT by Stephane Raimbault, 2001 - */ - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -/* Need GLUT_SHAPES */ - -#include - -#ifndef PI -#define PI 3.14159265 -#endif - -UGL_LOCAL UGL_EVENT_SERVICE_ID eventServiceId; -UGL_LOCAL UGL_EVENT_Q_ID qId; -UGL_LOCAL UGL_MESA_CONTEXT umc; -UGL_LOCAL volatile UGL_BOOL stopWex; - -UGL_LOCAL GLint angle; -UGL_LOCAL GLfloat Sin[360], Cos[360]; -UGL_LOCAL GLfloat L0pos[]={0.0, 2.0, -1.0}; -UGL_LOCAL GLfloat L0dif[]={0.3, 0.3, 0.8}; -UGL_LOCAL GLfloat L1pos[]={2.0, 2.0, 2.0}; -UGL_LOCAL GLfloat L1dif[]={0.5, 0.5, 0.5}; -UGL_LOCAL GLfloat Mspec[3]; -UGL_LOCAL GLfloat Mshiny; -UGL_LOCAL GLuint theTeapot; - -UGL_LOCAL void calcTableCosSin() -{ - int i; - for(i=0;i<360;i++) { - Cos[i] = cos(((float)i)/180.0*PI); - Sin[i] = sin(((float)i)/180.0*PI); - } -} - -UGL_LOCAL void initGL(void) - { - glClearColor(0.0, 0.0, 0.0, 0.0); - glColor3f(1.0, 0.0, 0.0); - glEnable(GL_DEPTH_TEST); - - glShadeModel(GL_SMOOTH); - glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_LIGHT1); - glLightfv(GL_LIGHT0, GL_DIFFUSE, L0dif); - glLightfv(GL_LIGHT0, GL_SPECULAR, L0dif); - glLightfv(GL_LIGHT1, GL_DIFFUSE, L1dif); - glLightfv(GL_LIGHT1, GL_SPECULAR, L1dif); - - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, Mspec); - glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, Mshiny); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(45.0, 1.0, 0.1, 10.0); - glMatrixMode(GL_MODELVIEW); - - theTeapot = glGenLists(1); - glNewList(theTeapot, GL_COMPILE); - glutSolidTeapot(1.0); - glEndList(); - - } - -UGL_LOCAL void drawGL() - { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glLoadIdentity(); - - gluLookAt(4.5*Cos[angle], 2.0,4.5*Sin[angle],0.0,0.0,0.0,0.0, - 1.0,0.0); - glLightfv(GL_LIGHT0, GL_POSITION, L0pos); - glLightfv(GL_LIGHT1, GL_POSITION, L1pos); - - glCallList(theTeapot); - - glFlush(); - - uglMesaSwapBuffers(); - } - -UGL_LOCAL void echoUse(void) - { - printf("tTeapot keys:\n"); - printf(" Left Counter clockwise rotation (y-axis)\n"); - printf(" Right Clockwise rotation (y-axis)\n"); - printf(" j Enable/disable Light0\n"); - printf(" k Enable/disable Light1\n"); - printf(" m Add specular\n"); - printf(" l Remove specular\n"); - printf(" o Add shininess\n"); - printf(" p Remove shininess\n"); - printf(" ESC Exit\n"); - } - - -UGL_LOCAL void readKey (UGL_WCHAR key) - { - switch(key) - { - case UGL_UNI_RIGHT_ARROW: - angle +=2; - if (angle>= 360) - angle-=360; - break; - case UGL_UNI_LEFT_ARROW: - angle -=2; - if (angle<0) - angle+=360; - break; - case 'j': - glIsEnabled(GL_LIGHT0) ? - glDisable(GL_LIGHT0) : glEnable(GL_LIGHT0); - break; - case 'k': - glIsEnabled(GL_LIGHT1) ? - glDisable(GL_LIGHT1) : glEnable(GL_LIGHT1); - break; - case 'm': - Mspec[0]+=0.1; - if(Mspec[0]>1) - Mspec[0]=1; - Mspec[1]+=0.1; - if(Mspec[1]>1) - Mspec[1]=1; - Mspec[2]+=0.1; - if(Mspec[2]>1) - Mspec[2]=1; - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, Mspec); - break; - case 'l': - Mspec[0]-=0.1; - if(Mspec[0]>1) - Mspec[0]=1; - Mspec[1]-=0.1; - if(Mspec[1]>1) - Mspec[1]=1; - Mspec[2]-=0.1; - if(Mspec[2]>1) - Mspec[2]=1; - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, Mspec); - break; - case 'o': - Mshiny -= 1; - if (Mshiny<0) - Mshiny=0; - glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, Mshiny); - break; - case 'p': - Mshiny += 1; - if (Mshiny>128) - Mshiny=128; - glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, Mshiny); - break; - case UGL_UNI_ESCAPE: - stopWex = UGL_TRUE; - break; - } - } - -UGL_LOCAL void loopEvent(void) - { - UGL_EVENT event; - UGL_INPUT_EVENT * pInputEvent; - - UGL_FOREVER - { - if (uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT) - != UGL_STATUS_Q_EMPTY) - { - pInputEvent = (UGL_INPUT_EVENT *)&event; - - if (pInputEvent->header.type == UGL_EVENT_TYPE_KEYBOARD && - pInputEvent->modifiers & UGL_KEYBOARD_KEYDOWN) - readKey(pInputEvent->type.keyboard.key); - } - - drawGL(); - if (stopWex) - break; - } - } - -void windMLTeapot (UGL_BOOL windMLMode); - -void uglteapot (void) - { - taskSpawn ("tTeapot", 210, VX_FP_TASK, 100000, (FUNCPTR)windMLTeapot, - UGL_FALSE,1,2,3,4,5,6,7,8,9); - } - -void windMLTeapot (UGL_BOOL windMLMode) - { - UGL_INPUT_DEVICE_ID keyboardDevId; - GLsizei displayWidth, displayHeight; - GLsizei x, y, w, h; - - angle = 45; - Mspec[0] = 0.5; - Mspec[1] = 0.5; - Mspec[2] = 0.5; - Mshiny = 50; - - uglInitialize (); - - uglDriverFind (UGL_KEYBOARD_TYPE, 0, - (UGL_UINT32 *)&keyboardDevId); - - uglDriverFind (UGL_EVENT_SERVICE_TYPE, 0, (UGL_UINT32 *)&eventServiceId); - - qId = uglEventQCreate (eventServiceId, 100); - - /* Double buffering */ - if (windMLMode) - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE - | UGL_MESA_WINDML_EXCLUSIVE, NULL); - else - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE, NULL); - - if (umc == NULL) - { - uglDeinitialize (); - return; - } - - uglMesaMakeCurrentContext (umc, 0, 0, 1, 1); - - uglMesaGetIntegerv(UGL_MESA_DISPLAY_WIDTH, &displayWidth); - uglMesaGetIntegerv(UGL_MESA_DISPLAY_HEIGHT, &displayHeight); - - h = (displayHeight*2)/3; - w = h; - x = (displayWidth-w)/2; - y = (displayHeight-h)/2; - - uglMesaMoveToWindow(x, y); - uglMesaResizeToWindow(w, h); - - calcTableCosSin(); - - initGL (); - - echoUse(); - - stopWex = UGL_FALSE; - loopEvent(); - - uglEventQDestroy (eventServiceId, qId); - - uglMesaDestroyContext(); - uglDeinitialize (); - - return; - } diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/ugltexcube.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/ugltexcube.c deleted file mode 100644 index 62b0306e64..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/ugltexcube.c +++ /dev/null @@ -1,379 +0,0 @@ - -/* ugltexcube.c - WindML/Mesa example program */ - -/* Copyright (C) 2001 by Wind River Systems, Inc */ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * The MIT License - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* - * Authors: - * Stephane Raimbault - */ - -/* -DESCRIPTION -Draw a textured cube -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "../util/readtex.h" - -#define IMAGE_FILE "Mesa/images/wrs_logo.rgb" - -UGL_LOCAL UGL_EVENT_SERVICE_ID eventServiceId; -UGL_LOCAL UGL_EVENT_Q_ID qId; -UGL_LOCAL UGL_MESA_CONTEXT umc; - -UGL_LOCAL GLfloat xrot, yrot, zrot; -UGL_LOCAL GLuint texture[1]; -UGL_LOCAL GLuint theTexCube; - -typedef struct { - GLubyte *data; - int width, height; - GLenum format; - } TEX_IMAGE; - -UGL_LOCAL void cleanUp (void); - -UGL_LOCAL void loadGLTexture() - { - TEX_IMAGE * texImage=NULL; - - texImage = (TEX_IMAGE *) malloc(sizeof(TEX_IMAGE)); - - if (texImage == NULL) - { - printf("Error allocating space for image"); - cleanUp(); - exit(1); - } - - texImage->data = LoadRGBImage(IMAGE_FILE, &texImage->width, - &texImage->height, &texImage->format); - if (!texImage->data) - { - printf("Couldn't read %s\n", IMAGE_FILE); - free(texImage); - cleanUp(); - exit(1); - } - - /* Create Texture */ - glGenTextures(1, &texture[0]); - glBindTexture(GL_TEXTURE_2D, texture[0]); - glTexImage2D(GL_TEXTURE_2D, 0, 3, - texImage->width, texImage->height, - 0, GL_RGB, GL_UNSIGNED_BYTE, texImage->data); - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - - free(texImage->data); - free(texImage); - } - -UGL_LOCAL void initGL(int width, int height) - { - - /* Load the texture(s) */ - loadGLTexture(); - - /* Enable texture mapping */ - glEnable(GL_TEXTURE_2D); - - /* Clear the background color to black */ - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - - glEnable(GL_CULL_FACE); - - /* Enables smooth color shading */ - glShadeModel(GL_SMOOTH); - -/* glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); */ -/* glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); */ - - theTexCube = glGenLists(1); - glNewList(theTexCube, GL_COMPILE); - - /* Choose the texture to use */ - glBindTexture(GL_TEXTURE_2D, texture[0]); - - /* Begin drawing a cube */ - glBegin(GL_QUADS); - - /* Front face (note that the texture's corners have to match the - quad's corners) */ - - /* Bottom left of the texture and quad */ - glTexCoord2f(0.0f, 0.0f); - glVertex3f(-1.0f, -1.0f, 1.0f); - - /* Bottom Right Of The Texture and Quad */ - glTexCoord2f(1.0f, 0.0f); - glVertex3f(1.0f, -1.0f, 1.0f); - - /* Top Right Of The Texture and Quad */ - glTexCoord2f(1.0f, 1.0f); - glVertex3f(1.0f, 1.0f, 1.0f); - /* Top Left Of The Texture and Quad */ - glTexCoord2f(0.0f, 1.0f); - glVertex3f(-1.0f, 1.0f, 1.0f); - - /* Back Face */ - - /* Bottom Right Of The Texture and Quad */ - glTexCoord2f(1.0f, 0.0f); - glVertex3f(-1.0f, -1.0f, -1.0f); - - /* Top Right Of The Texture and Quad */ - glTexCoord2f(1.0f, 1.0f); - glVertex3f(-1.0f, 1.0f, -1.0f); - - /* Top Left Of The Texture and Quad */ - glTexCoord2f(0.0f, 1.0f); - glVertex3f(1.0f, 1.0f, -1.0f); - - /* Bottom Left Of The Texture and Quad */ - glTexCoord2f(0.0f, 0.0f); - glVertex3f(1.0f, -1.0f, -1.0f); - - - /* Top Face */ - - /* Top Left Of The Texture and Quad */ - glTexCoord2f(0.0f, 1.0f); - glVertex3f(-1.0f, 1.0f, -1.0f); - - /* Bottom Left Of The Texture and Quad */ - glTexCoord2f(0.0f, 0.0f); - glVertex3f(-1.0f, 1.0f, 1.0f); - - /* Bottom Right Of The Texture and Quad */ - glTexCoord2f(1.0f, 0.0f); - glVertex3f(1.0f, 1.0f, 1.0f); - - /* Top Right Of The Texture and Quad */ - glTexCoord2f(1.0f, 1.0f); - glVertex3f(1.0f, 1.0f, -1.0f); - - /* Bottom Face */ - - /* Top Right Of The Texture and Quad */ - glTexCoord2f(1.0f, 1.0f); - glVertex3f(-1.0f, -1.0f, -1.0f); - - /* Top Left Of The Texture and Quad */ - glTexCoord2f(0.0f, 1.0f); - glVertex3f(1.0f, -1.0f, -1.0f); - - /* Bottom Left Of The Texture and Quad */ - glTexCoord2f(0.0f, 0.0f); - glVertex3f(1.0f, -1.0f, 1.0f); - - /* Bottom Right Of The Texture and Quad */ - glTexCoord2f(1.0f, 0.0f); - glVertex3f(-1.0f, -1.0f, 1.0f); - - - /* Right face */ - /* Bottom Right Of The Texture and Quad */ - glTexCoord2f(1.0f, 0.0f); - glVertex3f(1.0f, -1.0f, -1.0f); - - /* Top Right Of The Texture and Quad */ - glTexCoord2f(1.0f, 1.0f); - glVertex3f(1.0f, 1.0f, -1.0f); - - /* Top Left Of The Texture and Quad */ - glTexCoord2f(0.0f, 1.0f); - glVertex3f(1.0f, 1.0f, 1.0f); - - /* Bottom Left Of The Texture and Quad */ - glTexCoord2f(0.0f, 0.0f); - glVertex3f(1.0f, -1.0f, 1.0f); - - - /* Left Face */ - /* Bottom Left Of The Texture and Quad */ - glTexCoord2f(0.0f, 0.0f); - glVertex3f(-1.0f, -1.0f, -1.0f); - - /* Bottom Right Of The Texture and Quad */ - glTexCoord2f(1.0f, 0.0f); - glVertex3f(-1.0f, -1.0f, 1.0f); - - /* Top Right Of The Texture and Quad */ - glTexCoord2f(1.0f, 1.0f); - glVertex3f(-1.0f, 1.0f, 1.0f); - - /* Top Left Of The Texture and Quad */ - glTexCoord2f(0.0f, 1.0f); - glVertex3f(-1.0f, 1.0f, -1.0f); - - glEnd(); /* done with the polygon */ - glEndList(); - - glDisable(GL_DITHER); - glMatrixMode(GL_PROJECTION); - /* Reset the projection matrix */ - glLoadIdentity(); - /* Calculate the aspect ratio of the window */ - gluPerspective(45.0f, (GLfloat) width / (GLfloat) height, 0.1f, 100.0f); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - } - -UGL_LOCAL void drawGL() - { - glClear(GL_COLOR_BUFFER_BIT); - - /* Reset The View */ - glPushMatrix(); - - /* Move 8 units into the screen */ - glTranslatef(0.0f, 0.0f, -8.0f); - - /* Rotate on the X axis */ - glRotatef(xrot, 1.0f, 0.0f, 0.0f); - - /* Rotate on the Y axis */ - glRotatef(yrot, 0.0f, 1.0f, 0.0f); - - /* Rotate On The Z Axis */ - glRotatef(zrot, 0.0f, 0.0f, 1.0f); - - glCallList(theTexCube); - - glFlush(); - - uglMesaSwapBuffers(); - - glPopMatrix(); - - xrot += 1.6f; - yrot += 1.6f; - zrot += 1.6f; -} - -UGL_LOCAL int getEvent(void) - { - UGL_EVENT event; - UGL_STATUS status; - int retVal = 0; - - status = uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT); - - while (status != UGL_STATUS_Q_EMPTY) - { - UGL_INPUT_EVENT * pInputEvent = (UGL_INPUT_EVENT *)&event; - - if (pInputEvent->modifiers & UGL_KEYBOARD_KEYDOWN) - retVal = 1; - - status = uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT); - } - - return(retVal); - } - -UGL_LOCAL void cleanUp (void) - { - if (eventServiceId != UGL_NULL) - uglEventQDestroy (eventServiceId, qId); - - uglMesaDestroyContext(); - uglDeinitialize(); - } - -void windMLTexCube (UGL_BOOL windMLMode); - -void ugltexcube (void) - { - taskSpawn("tTexCube", 210, VX_FP_TASK, 100000, (FUNCPTR)windMLTexCube, - UGL_FALSE,1,2,3,4,5,6,7,8,9); - } - - -void windMLTexCube(UGL_BOOL windMLMode) - { - GLuint width, height; - UGL_INPUT_DEVICE_ID keyboardDevId; - - uglInitialize(); - - uglDriverFind (UGL_KEYBOARD_TYPE, 0, (UGL_UINT32 *)&keyboardDevId); - - if (uglDriverFind (UGL_EVENT_SERVICE_TYPE, 0, - (UGL_UINT32 *)&eventServiceId) == UGL_STATUS_OK) - { - qId = uglEventQCreate (eventServiceId, 100); - } - else - { - eventServiceId = UGL_NULL; - } - - if (windMLMode) - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE - | UGL_MESA_WINDML_EXCLUSIVE, NULL); - else - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE, NULL); - - if (umc == NULL) - { - uglDeinitialize(); - return; - } - - uglMesaMakeCurrentContext(umc, 0, 0, - UGL_MESA_FULLSCREEN_WIDTH, - UGL_MESA_FULLSCREEN_HEIGHT); - - - uglMesaGetIntegerv(UGL_MESA_WIDTH, &width); - uglMesaGetIntegerv(UGL_MESA_HEIGHT, &height); - - initGL(width, height); - - while(!getEvent()) - drawGL(); - - cleanUp(); - - return; - } - - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/ugltexcyl.c b/nx-X11/extras/Mesa_6.4.2/progs/windml/ugltexcyl.c deleted file mode 100644 index d2fe687b92..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/windml/ugltexcyl.c +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Textured cylinder demo: lighting, texturing, reflection mapping. - * - * Brian Paul May 1997 This program is in the public domain. - * - * Conversion to UGL/Mesa by Stephane Raimbault - */ - -/* - * $Log: ugltexcyl.c,v $ - * Revision 1.2 2001/09/10 19:21:13 brianp - * WindML updates (Stephane Raimbault) - * - * Revision 1.1 2001/08/20 16:07:11 brianp - * WindML driver (Stephane Raimbault) - * - * Revision 1.5 2001/03/27 17:35:26 brianp - * set initial window pos - * - * Revision 1.4 2000/12/24 22:53:54 pesco - * * demos/Makefile.am (INCLUDES): Added -I$(top_srcdir)/util. - * * demos/Makefile.X11, demos/Makefile.BeOS-R4, demos/Makefile.cygnus: - * Essentially the same. - * Program files updated to include "readtex.c", not "../util/readtex.c". - * * demos/reflect.c: Likewise for "showbuffer.c". - * - * - * * Makefile.am (EXTRA_DIST): Added top-level regular files. - * - * * include/GL/Makefile.am (INC_X11): Added glxext.h. - * - * - * * src/GGI/include/ggi/mesa/Makefile.am (EXTRA_HEADERS): Include - * Mesa GGI headers in dist even if HAVE_GGI is not given. - * - * * configure.in: Look for GLUT and demo source dirs in $srcdir. - * - * * src/swrast/Makefile.am (libMesaSwrast_la_SOURCES): Set to *.[ch]. - * More source list updates in various Makefile.am's. - * - * * Makefile.am (dist-hook): Remove CVS directory from distribution. - * (DIST_SUBDIRS): List all possible subdirs here. - * (SUBDIRS): Only list subdirs selected for build again. - * The above two applied to all subdir Makefile.am's also. - * - * Revision 1.3 2000/09/29 23:09:39 brianp - * added fps output - * - * Revision 1.2 1999/10/21 16:39:06 brianp - * added -info command line option - * - * Revision 1.1.1.1 1999/08/19 00:55:40 jtg - * Imported sources - * - * Revision 3.3 1999/03/28 18:24:37 brianp - * minor clean-up - * - * Revision 3.2 1998/11/05 04:34:04 brianp - * moved image files to ../images/ directory - * - * Revision 3.1 1998/06/23 03:16:51 brianp - * added Point/Linear sampling menu items - * - * Revision 3.0 1998/02/14 18:42:29 brianp - * initial rev - * - */ - - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include "../util/readtex.h" - -#define TEXTURE_FILE "Mesa/images/reflect.rgb" - -#define LIT 1 -#define TEXTURED 2 -#define REFLECT 3 -#define ANIMATE 10 -#define POINT_FILTER 20 -#define LINEAR_FILTER 21 -#define QUIT 100 -#define COUNT_FRAMES - -UGL_LOCAL UGL_EVENT_SERVICE_ID eventServiceId; -UGL_LOCAL UGL_EVENT_Q_ID qId; -UGL_LOCAL volatile UGL_BOOL stopWex; -UGL_LOCAL UGL_MESA_CONTEXT umc; - -UGL_LOCAL GLuint CylinderObj; -UGL_LOCAL GLboolean Animate; -UGL_LOCAL GLboolean linearFilter; - -UGL_LOCAL GLfloat Xrot, Yrot, Zrot; -UGL_LOCAL GLfloat DXrot, DYrot; - -UGL_LOCAL GLuint limit; -UGL_LOCAL GLuint count; -UGL_LOCAL GLuint tickStart, tickStop, tickBySec; - -UGL_LOCAL void cleanUp (void); - -UGL_LOCAL void drawGL(void) - { -#ifdef COUNT_FRAMES - int time; -#endif - - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - glScalef(5.0, 5.0, 5.0); - glCallList(CylinderObj); - - glPopMatrix(); - - uglMesaSwapBuffers(); - - if (Animate) - { - Xrot += DXrot; - Yrot += DYrot; - } - -#ifdef COUNT_FRAMES - if (count > limit) - { - tickStop = tickGet (); - time = (tickStop-tickStart)/tickBySec; - printf (" %i fps\n", count/time); - tickStart = tickStop; - count = 0; - } - else - count++; -#endif - - } - -UGL_LOCAL void echoUse(void) - { - printf("Keys:\n"); - printf(" Up/Down Rotate on Y\n"); - printf(" Left/Right Rotate on X\n"); - printf(" a Toggle animation\n"); - printf(" f Toggle point/linear filtered\n"); - printf(" l Lit\n"); - printf(" t Textured\n"); - printf(" r Reflect\n"); - printf(" ESC Exit\n"); - } - -UGL_LOCAL void readKey(UGL_WCHAR key) - { - float step = 3.0; - switch (key) - { - case 'a': - Animate = !Animate; - break; - case 'f': - if(linearFilter) - { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, - GL_NEAREST); - } - else - { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, - GL_LINEAR); - } - linearFilter = !linearFilter; - break; - case 'l': - glEnable(GL_LIGHTING); - glDisable(GL_TEXTURE_2D); - glDisable(GL_TEXTURE_GEN_S); - glDisable(GL_TEXTURE_GEN_T); - break; - case 't': - glDisable(GL_LIGHTING); - glEnable(GL_TEXTURE_2D); - glDisable(GL_TEXTURE_GEN_S); - glDisable(GL_TEXTURE_GEN_T); - break; - case 'r': - glDisable(GL_LIGHTING); - glEnable(GL_TEXTURE_2D); - glEnable(GL_TEXTURE_GEN_S); - glEnable(GL_TEXTURE_GEN_T); - break; - case UGL_UNI_UP_ARROW: - Xrot += step; - break; - case UGL_UNI_DOWN_ARROW: - Xrot -= step; - break; - case UGL_UNI_LEFT_ARROW: - Yrot += step; - break; - case UGL_UNI_RIGHT_ARROW: - Yrot -= step; - break; - case UGL_UNI_ESCAPE: - stopWex = UGL_TRUE; - break; - } - } - -UGL_LOCAL void loopEvent(void) - { - UGL_EVENT event; - UGL_INPUT_EVENT * pInputEvent; - - UGL_FOREVER - { - if (uglEventGet (qId, &event, sizeof (event), UGL_NO_WAIT) - != UGL_STATUS_Q_EMPTY) - { - pInputEvent = (UGL_INPUT_EVENT *)&event; - - if (pInputEvent->header.type == UGL_EVENT_TYPE_KEYBOARD && - pInputEvent->modifiers & UGL_KEYBOARD_KEYDOWN) - readKey(pInputEvent->type.keyboard.key); - } - - drawGL(); - if (stopWex) - break; - } - } - -UGL_LOCAL void initGL(void) - { - GLUquadricObj *q = gluNewQuadric(); - CylinderObj = glGenLists(1); - glNewList(CylinderObj, GL_COMPILE); - - glTranslatef(0.0, 0.0, -1.0); - - /* cylinder */ - gluQuadricNormals(q, GL_SMOOTH); - gluQuadricTexture(q, GL_TRUE); - gluCylinder(q, 0.6, 0.6, 2.0, 24, 1); - - /* end cap */ - glTranslatef(0.0, 0.0, 2.0); - gluDisk(q, 0.0, 0.6, 24, 1); - - /* other end cap */ - glTranslatef(0.0, 0.0, -2.0); - gluQuadricOrientation(q, GLU_INSIDE); - gluDisk(q, 0.0, 0.6, 24, 1); - - glEndList(); - gluDeleteQuadric(q); - - /* lighting */ - glEnable(GL_LIGHTING); - { - GLfloat gray[4] = {0.2, 0.2, 0.2, 1.0}; - GLfloat white[4] = {1.0, 1.0, 1.0, 1.0}; - GLfloat teal[4] = { 0.0, 1.0, 0.8, 1.0 }; - glMaterialfv(GL_FRONT, GL_DIFFUSE, teal); - glLightfv(GL_LIGHT0, GL_AMBIENT, gray); - glLightfv(GL_LIGHT0, GL_DIFFUSE, white); - glEnable(GL_LIGHT0); - } - - /* fitering = nearest, initially */ - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); - glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); - - glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); - glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); - - if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) - { - printf("Error: couldn't load texture image\n"); - cleanUp(); - exit(1); - } - - glEnable(GL_CULL_FACE); /* don't need Z testing for convex objects */ - - glEnable(GL_LIGHTING); - - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 10.0, 100.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -70.0 ); - - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - -#ifdef COUNT_FRAMES - tickStart = tickGet (); - tickBySec = sysClkRateGet (); -#endif - - } - -UGL_LOCAL void cleanUp (void) - { - uglEventQDestroy (eventServiceId, qId); - - uglMesaDestroyContext(); - uglDeinitialize (); - } - -void windMLTexCyl (UGL_BOOL windMLMode); - -void ugltexcyl (void) - { - taskSpawn ("tTexCyl", 210, VX_FP_TASK, 100000, (FUNCPTR)windMLTexCyl, - UGL_FALSE,1,2,3,4,5,6,7,8,9); - } - -void windMLTexCyl (UGL_BOOL windMLMode) - { - UGL_INPUT_DEVICE_ID keyboardDevId; - GLsizei displayWidth, displayHeight; - GLsizei x, y, w, h; - - CylinderObj = 0; - Animate = GL_TRUE; - linearFilter = GL_FALSE; - Xrot = 0.0; - Yrot = 0.0; - Zrot = 0.0; - DXrot = 1.0; - DYrot = 2.5; - limit = 100; - count = 1; - - uglInitialize (); - - uglDriverFind (UGL_KEYBOARD_TYPE, 0, - (UGL_UINT32 *)&keyboardDevId); - - uglDriverFind (UGL_EVENT_SERVICE_TYPE, 0, (UGL_UINT32 *)&eventServiceId); - - qId = uglEventQCreate (eventServiceId, 100); - - /* Double buffering */ - if (windMLMode) - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE - | UGL_MESA_WINDML_EXCLUSIVE, NULL); - else - umc = uglMesaCreateNewContext(UGL_MESA_DOUBLE, NULL); - - if (umc == NULL) - { - uglDeinitialize (); - return; - } - - uglMesaMakeCurrentContext (umc, 0, 0, 1, 1); - - uglMesaGetIntegerv(UGL_MESA_DISPLAY_WIDTH, &displayWidth); - uglMesaGetIntegerv(UGL_MESA_DISPLAY_HEIGHT, &displayHeight); - - h = (displayHeight*3)/4; - w = h; - x = (displayWidth-w)/2; - y = (displayHeight-h)/2; - - uglMesaMoveToWindow(x, y); - uglMesaResizeToWindow(w, h); - - initGL (); - - echoUse(); - - stopWex = UGL_FALSE; - loopEvent(); - - cleanUp(); - - return; - } - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/windml/wrs_logo.bmp b/nx-X11/extras/Mesa_6.4.2/progs/windml/wrs_logo.bmp deleted file mode 100644 index 9a9f04255b..0000000000 Binary files a/nx-X11/extras/Mesa_6.4.2/progs/windml/wrs_logo.bmp and /dev/null differ diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/.cvsignore b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/.cvsignore deleted file mode 100644 index 4adffda2d1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/.cvsignore +++ /dev/null @@ -1,16 +0,0 @@ -glthreads -glxdemo -glxgears -glxheads -glxinfo -glxpixmap -glxpbdemo -glxswapcontrol -manywin -offset -pbinfo -pbdemo -wincopy -xdemo -xfont -xrotfontdemo diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/Makefile b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/Makefile deleted file mode 100644 index 84122d3b20..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/Makefile +++ /dev/null @@ -1,83 +0,0 @@ -# progs/xdemos/Makefile - -TOP = ../.. -include $(TOP)/configs/current - - -INCDIR = $(TOP)/include - -LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(GLU_LIB_NAME) - -PROGS = glthreads \ - glxdemo \ - glxgears \ - glxgears_fbconfig \ - glxcontexts \ - glxheads \ - glxinfo \ - glxpixmap \ - glxpbdemo \ - glxswapcontrol \ - manywin \ - offset \ - overlay \ - pbinfo \ - pbdemo \ - wincopy \ - xdemo \ - xfont \ - xrotfontdemo \ - yuvrect_client - - - -##### RULES ##### - -.SUFFIXES: -.SUFFIXES: .c - -.c: $(LIB_DEP) - $(CC) -I$(INCDIR) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@ - - -##### TARGETS ##### - -default: $(PROGS) - - -clean: - -rm -f $(PROGS) - -rm -f *.o *~ - - -# special cases -pbinfo: pbinfo.o pbutil.o - $(CC) $(CFLAGS) pbinfo.o pbutil.o $(APP_LIB_DEPS) -o $@ - -pbdemo: pbdemo.o pbutil.o - $(CC) $(CFLAGS) pbdemo.o pbutil.o $(APP_LIB_DEPS) -o $@ - -pbinfo.o: pbinfo.c pbutil.h - $(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbinfo.c - -pbdemo.o: pbdemo.c pbutil.h - $(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbdemo.c - -pbutil.o: pbutil.c pbutil.h - $(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbutil.c - -glxgears_fbconfig: glxgears_fbconfig.o pbutil.o - $(CC) $(CFLAGS) glxgears_fbconfig.o pbutil.o $(APP_LIB_DEPS) -o $@ - -glxgears_fbconfig.o: glxgears_fbconfig.c pbutil.h - $(CC) $(CFLAGS) -c -I. -I$(INCDIR) $(CFLAGS) glxgears_fbconfig.c - -xrotfontdemo: xrotfontdemo.o xuserotfont.o - $(CC) $(CFLAGS) xrotfontdemo.o xuserotfont.o $(APP_LIB_DEPS) -o $@ - -xuserotfont.o: xuserotfont.c xuserotfont.h - $(CC) -c -I. -I$(INCDIR) $(CFLAGS) xuserotfont.c - -xrotfontdemo.o: xrotfontdemo.c xuserotfont.h - $(CC) -c -I. -I$(INCDIR) $(CFLAGS) xrotfontdemo.c - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/descrip.mms b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/descrip.mms deleted file mode 100644 index 77aff8b0c4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/descrip.mms +++ /dev/null @@ -1,83 +0,0 @@ -# Makefile for GLUT-based demo programs for VMS -# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl - - -.first - define gl [--.include.gl] - -.include [--]mms-config. - -##### MACROS ##### - -INCDIR = ([--.include],[-.util]) -CFLAGS = /include=$(INCDIR)/prefix=all/name=(as_is,short)/nowarn - -.ifdef SHARE -GL_LIBS = $(XLIBS) -.else -GL_LIBS = [--.lib]libGLUT/l,libMesaGLU/l,libMesaGL/l,$(XLIBS) -.endif - -LIB_DEP = [--.lib]$(GL_LIB) [--.lib]$(GLU_LIB) [--.lib]$(GLUT_LIB) - -PROGS =glthreads.exe,\ - glxdemo.exe,\ - glxgears.exe,\ - glxheads.exe,\ - glxinfo.exe,\ - glxpixmap.exe,\ - manywin.exe,\ - offset.exe,\ - pbinfo.exe,\ - pbdemo.exe,\ - wincopy.exe,\ - xdemo.exe,\ - xfont.exe - -##### RULES ##### -.obj.exe : - cxxlink $(MMS$TARGET_NAME),$(GL_LIBS) - -##### TARGETS ##### -default : - $(MMS)$(MMSQUALIFIERS) $(PROGS) - -clean : - delete *.obj;* - -realclean : - delete $(PROGS) - delete *.obj;* - - -glthreads.exe : glthreads.obj $(LIB_DEP) -glxdemo.exe : glxdemo.obj $(LIB_DEP) -glxgears.exe : glxgears.obj $(LIB_DEP) -glxheads.exe : glxheads.obj $(LIB_DEP) -glxinfo.exe : glxinfo.obj $(LIB_DEP) -glxpixmap.exe : glxpixmap.obj $(LIB_DEP) -manywin.exe : manywin.obj $(LIB_DEP) -offset.exe : offset.obj $(LIB_DEP) -pbinfo.exe : pbinfo.obj pbutil.obj $(LIB_DEP) - cxxlink pbinfo.obj,pbutil.obj,$(GL_LIBS) -pbdemo.exe : pbdemo.obj pbutil.obj $(LIB_DEP) - cxxlink pbdemo.obj,pbutil.obj,$(GL_LIBS) -wincopy.exe : wincopy.obj $(LIB_DEP) -xdemo.exe : xdemo.obj $(LIB_DEP) -xfont.exe :xfont.obj $(LIB_DEP) - - -glthreads.obj : glthreads.c -glxdemo.obj : glxdemo.c -glxgears.obj : glxgears.c -glxheads.obj : glxheads.c -glxinfo.obj : glxinfo.c -glxpixmap.obj : glxpixmap.c -manywin.obj : manywin.c -offset.obj : offset.c -pbinfo.obj : pbinfo.c -pbutil.obj : pbutil.c -pbdemo.obj : pbdemo.c -wincopy.obj : wincopy.c -xdemo.obj : xdemo.c -xfont.obj :xfont.c diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glthreads.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glthreads.c deleted file mode 100644 index e3d71ed0ad..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glthreads.c +++ /dev/null @@ -1,416 +0,0 @@ -/* - * Copyright (C) 2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * This program tests GLX thread safety. - * Command line options: - * -n Number of threads to create (default is 2) - * -display Specify X display (default is :0.0) - * - * Brian Paul 20 July 2000 - */ - - -#if defined(PTHREADS) /* defined by Mesa on Linux and other platforms */ - -#include -#include -#include -#include -#include -#include -#include - - -/* - * Each window/thread/context: - */ -struct winthread { - Display *Dpy; - int Index; - pthread_t Thread; - Window Win; - GLXContext Context; - float Angle; - int WinWidth, WinHeight; - GLboolean NewSize; -}; - - -#define MAX_WINTHREADS 100 -static struct winthread WinThreads[MAX_WINTHREADS]; -static int NumWinThreads = 0; -static volatile GLboolean ExitFlag = GL_FALSE; - - - -static void -Error(const char *msg) -{ - fprintf(stderr, "Error: %s\n", msg); - exit(1); -} - - -/* draw a colored cube */ -static void -draw_object(void) -{ - glPushMatrix(); - glScalef(0.75, 0.75, 0.75); - - glColor3f(1, 0, 0); - glBegin(GL_POLYGON); - glVertex3f(1, -1, -1); - glVertex3f(1, 1, -1); - glVertex3f(1, 1, 1); - glVertex3f(1, -1, 1); - glEnd(); - - glColor3f(0, 1, 1); - glBegin(GL_POLYGON); - glVertex3f(-1, -1, -1); - glVertex3f(-1, 1, -1); - glVertex3f(-1, 1, 1); - glVertex3f(-1, -1, 1); - glEnd(); - - glColor3f(0, 1, 0); - glBegin(GL_POLYGON); - glVertex3f(-1, 1, -1); - glVertex3f( 1, 1, -1); - glVertex3f( 1, 1, 1); - glVertex3f(-1, 1, 1); - glEnd(); - - glColor3f(1, 0, 1); - glBegin(GL_POLYGON); - glVertex3f(-1, -1, -1); - glVertex3f( 1, -1, -1); - glVertex3f( 1, -1, 1); - glVertex3f(-1, -1, 1); - glEnd(); - - glColor3f(0, 0, 1); - glBegin(GL_POLYGON); - glVertex3f(-1, -1, 1); - glVertex3f( 1, -1, 1); - glVertex3f( 1, 1, 1); - glVertex3f(-1, 1, 1); - glEnd(); - - glColor3f(1, 1, 0); - glBegin(GL_POLYGON); - glVertex3f(-1, -1, -1); - glVertex3f( 1, -1, -1); - glVertex3f( 1, 1, -1); - glVertex3f(-1, 1, -1); - glEnd(); - glPopMatrix(); -} - - -/* signal resize of given window */ -static void -resize(struct winthread *wt, int w, int h) -{ - wt->NewSize = GL_TRUE; - wt->WinWidth = w; - wt->WinHeight = h; -} - - -/* - * We have an instance of this for each thread. - */ -static void -draw_loop(struct winthread *wt) -{ - while (!ExitFlag) { - - glXMakeCurrent(wt->Dpy, wt->Win, wt->Context); - - glEnable(GL_DEPTH_TEST); - - if (wt->NewSize) { - GLfloat w = (float) wt->WinWidth / (float) wt->WinHeight; - glViewport(0, 0, wt->WinWidth, wt->WinHeight); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-w, w, -1.0, 1.0, 1.5, 10); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0, 0, -2.5); - wt->NewSize = GL_FALSE; - } - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - glRotatef(wt->Angle, 0, 0, 1); - glRotatef(wt->Angle, 1, 0, 0); - glScalef(0.7, 0.7, 0.7); - draw_object(); - glPopMatrix(); - - glXSwapBuffers(wt->Dpy, wt->Win); - - wt->Angle += 1.0; - } -} - - -/* - * The main process thread runs this loop. - */ -static void -event_loop(Display *dpy) -{ - XEvent event; - int i; - - while (!ExitFlag) { - XNextEvent(dpy, &event); - switch (event.type) { - case ConfigureNotify: - /* Find winthread for this event's window */ - for (i = 0; i < NumWinThreads; i++) { - struct winthread *wt = &WinThreads[i]; - if (event.xconfigure.window == wt->Win) { - resize(wt, event.xconfigure.width, - event.xconfigure.height); - break; - } - } - break; - case KeyPress: - /* tell all threads to exit */ - ExitFlag = GL_TRUE; - /*printf("exit draw_loop %d\n", wt->Index);*/ - return; - default: - /*no-op*/ ; - } - } -} - - -/* - * we'll call this once for each thread, before the threads are created. - */ -static void -create_window(struct winthread *wt) -{ - Window win; - GLXContext ctx; - int attrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DEPTH_SIZE, 1, - GLX_DOUBLEBUFFER, - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - XVisualInfo *visinfo; - int width = 80, height = 80; - int xpos = (wt->Index % 10) * 90; - int ypos = (wt->Index / 10) * 100; - - scrnum = DefaultScreen(wt->Dpy); - root = RootWindow(wt->Dpy, scrnum); - - visinfo = glXChooseVisual(wt->Dpy, scrnum, attrib); - if (!visinfo) { - Error("Unable to find RGB, Z, double-buffered visual"); - } - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap(wt->Dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow(wt->Dpy, root, xpos, ypos, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr); - if (!win) { - Error("Couldn't create window"); - } - - { - XSizeHints sizehints; - sizehints.x = xpos; - sizehints.y = ypos; - sizehints.width = width; - sizehints.height = height; - sizehints.flags = USSize | USPosition; - XSetNormalHints(wt->Dpy, win, &sizehints); - XSetStandardProperties(wt->Dpy, win, "glthreads", "glthreads", - None, (char **)NULL, 0, &sizehints); - } - - - ctx = glXCreateContext(wt->Dpy, visinfo, NULL, True); - if (!ctx) { - Error("Couldn't create GLX context"); - } - - XMapWindow(wt->Dpy, win); - XSync(wt->Dpy, 0); - - /* save the info for this window/context */ - wt->Win = win; - wt->Context = ctx; - wt->Angle = 0.0; - wt->WinWidth = width; - wt->WinHeight = height; - wt->NewSize = GL_TRUE; -} - - -/* - * Called by pthread_create() - */ -static void * -thread_function(void *p) -{ - struct winthread *wt = (struct winthread *) p; - draw_loop(wt); - return NULL; -} - - -/* - * called before exit to wait for all threads to finish - */ -static void -clean_up(void) -{ - int i; - - /* wait for threads to finish */ - for (i = 0; i < NumWinThreads; i++) { - pthread_join(WinThreads[i].Thread, NULL); - } - - for (i = 0; i < NumWinThreads; i++) { - glXDestroyContext(WinThreads[i].Dpy, WinThreads[i].Context); - XDestroyWindow(WinThreads[i].Dpy, WinThreads[i].Win); - } -} - - - -int -main(int argc, char *argv[]) -{ - char *displayName = ":0.0"; - int numThreads = 2; - Display *dpy; - int i; - Status threadStat; - - if (argc == 1) { - printf("threadgl: test of GL thread safety (any key = exit)\n"); - printf("Usage:\n"); - printf(" threadgl [-display dpyName] [-n numthreads]\n"); - } - else { - int i; - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-display") == 0 && i + 1 < argc) { - displayName = argv[i + 1]; - i++; - } - else if (strcmp(argv[i], "-n") == 0 && i + 1 < argc) { - numThreads = atoi(argv[i + 1]); - if (numThreads < 1) - numThreads = 1; - else if (numThreads > MAX_WINTHREADS) - numThreads = MAX_WINTHREADS; - i++; - } - } - } - - /* - * VERY IMPORTANT: call XInitThreads() before any other Xlib functions. - */ - threadStat = XInitThreads(); - if (threadStat) { - printf("XInitThreads() returned %d (success)\n", (int) threadStat); - } - else { - printf("XInitThreads() returned 0 (failure- this program may fail)\n"); - } - - - dpy = XOpenDisplay(displayName); - if (!dpy) { - fprintf(stderr, "Unable to open display %s\n", displayName); - return -1; - } - - NumWinThreads = numThreads; - - /* Create the GLX windows and contexts */ - for (i = 0; i < numThreads; i++) { - WinThreads[i].Dpy = dpy; - WinThreads[i].Index = i; - create_window(&WinThreads[i]); - } - - /* Create the threads */ - for (i = 0; i < numThreads; i++) { - pthread_create(&WinThreads[i].Thread, NULL, thread_function, - (void*) &WinThreads[i]); - printf("Created Thread %d\n", (int) WinThreads[i].Thread); - } - - event_loop(dpy); - - clean_up(); - - XCloseDisplay(dpy); - - return 0; -} - - -#else /* PTHREADS */ - - -#include - -int -main(int argc, char *argv[]) -{ - printf("Sorry, this program wasn't compiled with PTHREADS defined.\n"); - return 0; -} - - -#endif /* PTHREADS */ diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxcontexts.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxcontexts.c deleted file mode 100644 index fbc296ef62..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxcontexts.c +++ /dev/null @@ -1,609 +0,0 @@ -/* - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This is a port of the infamous "gears" demo to straight GLX (i.e. no GLUT) - * Port by Brian Paul 23 March 2001 - * - * Command line options: - * -info print GL implementation information - * -stereo use stereo enabled GLX visual - * - */ - - -#include -#include -#include -#include -#include -#include -#include -#include - - -#define BENCHMARK - -#ifdef BENCHMARK - -/* XXX this probably isn't very portable */ - -#include -#include - -/* return current time (in seconds) */ -static double -current_time(void) -{ - struct timeval tv; -#ifdef __VMS - (void) gettimeofday(&tv, NULL ); -#else - struct timezone tz; - (void) gettimeofday(&tv, &tz); -#endif - return (double) tv.tv_sec + tv.tv_usec / 1000000.0; -} - -#else /*BENCHMARK*/ - -/* dummy */ -static double -current_time(void) -{ - /* update this function for other platforms! */ - static double t = 0.0; - static int warn = 1; - if (warn) { - fprintf(stderr, "Warning: current_time() not implemented!!\n"); - warn = 0; - } - return t += 1.0; -} - -#endif /*BENCHMARK*/ - - - -#ifndef M_PI -#define M_PI 3.14159265 -#endif - - -static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0; -static GLint gear1, gear2, gear3; -static GLfloat angle = 0.0; - -static GLboolean fullscreen = GL_FALSE; /* Create a single fullscreen window */ -static GLboolean stereo = GL_FALSE; /* Enable stereo. */ -static GLfloat eyesep = 5.0; /* Eye separation. */ -static GLfloat fix_point = 40.0; /* Fixation point distance. */ -static GLfloat left, right, asp; /* Stereo frustum params. */ - - XVisualInfo *visinfo; - - -/* - * - * Draw a gear wheel. You'll probably want to call this function when - * building a display list since we do a lot of trig here. - * - * Input: inner_radius - radius of hole at center - * outer_radius - radius at center of teeth - * width - width of gear - * teeth - number of teeth - * tooth_depth - depth of tooth - */ -static void -gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, - GLint teeth, GLfloat tooth_depth) -{ - GLint i; - GLfloat r0, r1, r2; - GLfloat angle, da; - GLfloat u, v, len; - - r0 = inner_radius; - r1 = outer_radius - tooth_depth / 2.0; - r2 = outer_radius + tooth_depth / 2.0; - - da = 2.0 * M_PI / teeth / 4.0; - - glShadeModel(GL_FLAT); - - glNormal3f(0.0, 0.0, 1.0); - - /* draw front face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - if (i < teeth) { - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - } - } - glEnd(); - - /* draw front sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - } - glEnd(); - - glNormal3f(0.0, 0.0, -1.0); - - /* draw back face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - if (i < teeth) { - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - } - } - glEnd(); - - /* draw back sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - -width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - } - glEnd(); - - /* draw outward faces of teeth */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - u = r2 * cos(angle + da) - r1 * cos(angle); - v = r2 * sin(angle + da) - r1 * sin(angle); - len = sqrt(u * u + v * v); - u /= len; - v /= len; - glNormal3f(v, -u, 0.0); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - -width * 0.5); - u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); - v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); - glNormal3f(v, -u, 0.0); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - } - - glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5); - glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5); - - glEnd(); - - glShadeModel(GL_SMOOTH); - - /* draw inside radius cylinder */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glNormal3f(-cos(angle), -sin(angle), 0.0); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - } - glEnd(); -} - - -static void -do_draw(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - glRotatef(view_rotx, 1.0, 0.0, 0.0); - glRotatef(view_roty, 0.0, 1.0, 0.0); - glRotatef(view_rotz, 0.0, 0.0, 1.0); - - glPushMatrix(); - glTranslatef(-3.0, -2.0, 0.0); - glRotatef(angle, 0.0, 0.0, 1.0); - glCallList(gear1); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(3.1, -2.0, 0.0); - glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0); - glCallList(gear2); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(-3.1, 4.2, 0.0); - glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0); - glCallList(gear3); - glPopMatrix(); - - glPopMatrix(); -} - - - -/* new window size or exposure */ -static void -reshape(int width, int height) -{ - glViewport(0, 0, (GLint) width, (GLint) height); - - if (stereo) { - GLfloat w; - - asp = (GLfloat) height / (GLfloat) width; - w = fix_point * (1.0 / 5.0); - - left = -5.0 * ((w - 0.5 * eyesep) / fix_point); - right = 5.0 * ((w + 0.5 * eyesep) / fix_point); - } else { - GLfloat h = (GLfloat) height / (GLfloat) width; - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0); - } - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -40.0); -} - - - -static void -init(void) -{ - static GLfloat pos[4] = { 5.0, 5.0, 10.0, 0.0 }; - static GLfloat red[4] = { 0.8, 0.1, 0.0, 1.0 }; - static GLfloat green[4] = { 0.0, 0.8, 0.2, 1.0 }; - static GLfloat blue[4] = { 0.2, 0.2, 1.0, 1.0 }; - - glLightfv(GL_LIGHT0, GL_POSITION, pos); - glEnable(GL_CULL_FACE); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - /* make the gears */ - gear1 = glGenLists(1); - glNewList(gear1, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); - gear(1.0, 4.0, 1.0, 20, 0.7); - glEndList(); - - gear2 = glGenLists(1); - glNewList(gear2, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); - gear(0.5, 2.0, 2.0, 10, 0.7); - glEndList(); - - gear3 = glGenLists(1); - glNewList(gear3, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); - gear(1.3, 2.0, 0.5, 10, 0.7); - glEndList(); - - glEnable(GL_NORMALIZE); -} - - -static void -draw( Display *dpy, Window win ) -{ - GLXContext ctx; - - ctx = glXCreateContext( dpy, visinfo, NULL, True ); - if (!ctx) { - printf("Error: glXCreateContext failed\n"); - exit(1); - } - - glXMakeCurrent(dpy, win, ctx); - - init(); - - if (stereo) { - /* First left eye. */ - glDrawBuffer(GL_BACK_LEFT); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(left, right, -asp, asp, 5.0, 60.0); - - glMatrixMode(GL_MODELVIEW); - - glPushMatrix(); - glTranslated(+0.5 * eyesep, 0.0, 0.0); - do_draw(); - glPopMatrix(); - - /* Then right eye. */ - glDrawBuffer(GL_BACK_RIGHT); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-right, -left, -asp, asp, 5.0, 60.0); - - glMatrixMode(GL_MODELVIEW); - - glPushMatrix(); - glTranslated(-0.5 * eyesep, 0.0, 0.0); - do_draw(); - glPopMatrix(); - } else - do_draw(); - - glXSwapBuffers(dpy, win); - glXDestroyContext(dpy, ctx); -} - - -/* - * Create an RGB, double-buffered window. - * Return the window and context handles. - */ -static void -make_window( Display *dpy, const char *name, - int x, int y, int width, int height, - Window *winRet) -{ - int attribs[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - GLX_DEPTH_SIZE, 1, - None }; - int stereoAttribs[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - GLX_DEPTH_SIZE, 1, - GLX_STEREO, - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - Window win; - - scrnum = DefaultScreen( dpy ); - root = RootWindow( dpy, scrnum ); - - if (fullscreen) { - x = 0; y = 0; - width = DisplayWidth( dpy, scrnum ); - height = DisplayHeight( dpy, scrnum ); - } - - if (stereo) - visinfo = glXChooseVisual( dpy, scrnum, stereoAttribs ); - else - visinfo = glXChooseVisual( dpy, scrnum, attribs ); - if (!visinfo) { - if (stereo) { - printf("Error: couldn't get an RGB, " - "Double-buffered, Stereo visual\n"); - } else - printf("Error: couldn't get an RGB, Double-buffered visual\n"); - exit(1); - } - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - attr.override_redirect = fullscreen; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask | CWOverrideRedirect; - - win = XCreateWindow( dpy, root, x, y, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr ); - - /* set hints and properties */ - { - XSizeHints sizehints; - sizehints.x = x; - sizehints.y = y; - sizehints.width = width; - sizehints.height = height; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win, &sizehints); - XSetStandardProperties(dpy, win, name, name, - None, (char **)NULL, 0, &sizehints); - } - - *winRet = win; -} - - -static void -event_loop(Display *dpy) -{ - Window win; - make_window(dpy, "glxgears", 0, 0, 300, 300, &win); - XMapWindow(dpy, win); - - - while (1) { - while (XPending(dpy) > 0) { - XEvent event; - XNextEvent(dpy, &event); - switch (event.type) { - case Expose: - /* we'll redraw below */ - break; - case ConfigureNotify: - reshape(event.xconfigure.width, event.xconfigure.height); - break; - case KeyPress: - { - char buffer[10]; - int r, code; - code = XLookupKeysym(&event.xkey, 0); - if (code == XK_Left) { - view_roty += 5.0; - } - else if (code == XK_Right) { - view_roty -= 5.0; - } - else if (code == XK_Up) { - view_rotx += 5.0; - } - else if (code == XK_Down) { - view_rotx -= 5.0; - } - else { - r = XLookupString(&event.xkey, buffer, sizeof(buffer), - NULL, NULL); - if (buffer[0] == 27) { - /* escape */ - return; - } - } - } - } - } - - { - static int frames = 0; - static double tRot0 = -1.0, tRate0 = -1.0; - double dt, t = current_time(); - if (tRot0 < 0.0) - tRot0 = t; - dt = t - tRot0; - tRot0 = t; - - /* advance rotation for next frame */ - angle += 70.0 * dt; /* 70 degrees per second */ - if (angle > 3600.0) - angle -= 3600.0; - - draw( dpy, win ); - - frames++; - - if (tRate0 < 0.0) - tRate0 = t; - - if (t - tRate0 >= 1.0) { - GLfloat seconds = t - tRate0; - GLfloat fps = frames / seconds; - printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds, - fps); - tRate0 = t; - - XDestroyWindow(dpy, win); - make_window(dpy, "glxgears", (int)(fps * 100) % 100, (int)(fps * 100) % 100, 300, 300, &win); - XMapWindow(dpy, win); - - frames = 0; - } - } - } -} - - - -int -main(int argc, char *argv[]) -{ - Display *dpy; - char *dpyName = NULL; - GLboolean printInfo = GL_FALSE; - int i; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-display") == 0) { - dpyName = argv[i+1]; - i++; - } - else if (strcmp(argv[i], "-info") == 0) { - printInfo = GL_TRUE; - } - else if (strcmp(argv[i], "-stereo") == 0) { - stereo = GL_TRUE; - } - else if (strcmp(argv[i], "-fullscreen") == 0) { - fullscreen = GL_TRUE; - } - else - printf("Warrning: unknown parameter: %s\n", argv[i]); - } - - dpy = XOpenDisplay(dpyName); - if (!dpy) { - printf("Error: couldn't open display %s\n", - dpyName ? dpyName : getenv("DISPLAY")); - return -1; - } - - - if (printInfo) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } - - - event_loop(dpy); - - XCloseDisplay(dpy); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxdemo.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxdemo.c deleted file mode 100644 index 37df64ebee..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxdemo.c +++ /dev/null @@ -1,127 +0,0 @@ - - -/* - * A demonstration of using the GLX functions. This program is in the - * public domain. - * - * Brian Paul - */ - -#include -#include -#include -#include - - - -static void redraw( Display *dpy, Window w ) -{ - printf("Redraw event\n"); - - glClear( GL_COLOR_BUFFER_BIT ); - - glColor3f( 1.0, 1.0, 0.0 ); - glRectf( -0.8, -0.8, 0.8, 0.8 ); - - glXSwapBuffers( dpy, w ); -} - - - -static void resize( unsigned int width, unsigned int height ) -{ - printf("Resize event\n"); - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 ); -} - - - -static Window make_rgb_db_window( Display *dpy, - unsigned int width, unsigned int height ) -{ - int attrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - Window win; - GLXContext ctx; - XVisualInfo *visinfo; - - scrnum = DefaultScreen( dpy ); - root = RootWindow( dpy, scrnum ); - - visinfo = glXChooseVisual( dpy, scrnum, attrib ); - if (!visinfo) { - printf("Error: couldn't get an RGB, Double-buffered visual\n"); - exit(1); - } - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow( dpy, root, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr ); - - ctx = glXCreateContext( dpy, visinfo, NULL, True ); - if (!ctx) { - printf("Error: glXCreateContext failed\n"); - exit(1); - } - - glXMakeCurrent( dpy, win, ctx ); - - return win; -} - - -static void event_loop( Display *dpy ) -{ - XEvent event; - - while (1) { - XNextEvent( dpy, &event ); - - switch (event.type) { - case Expose: - redraw( dpy, event.xany.window ); - break; - case ConfigureNotify: - resize( event.xconfigure.width, event.xconfigure.height ); - break; - } - } -} - - - -int main( int argc, char *argv[] ) -{ - Display *dpy; - Window win; - - dpy = XOpenDisplay(NULL); - - win = make_rgb_db_window( dpy, 300, 300 ); - - glShadeModel( GL_FLAT ); - glClearColor( 0.5, 0.5, 0.5, 1.0 ); - - XMapWindow( dpy, win ); - - event_loop( dpy ); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxgears.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxgears.c deleted file mode 100644 index 00b05dc980..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxgears.c +++ /dev/null @@ -1,601 +0,0 @@ -/* - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This is a port of the infamous "gears" demo to straight GLX (i.e. no GLUT) - * Port by Brian Paul 23 March 2001 - * - * Command line options: - * -info print GL implementation information - * -stereo use stereo enabled GLX visual - * - */ - - -#include -#include -#include -#include -#include -#include -#include -#include - - -#define BENCHMARK - -#ifdef BENCHMARK - -/* XXX this probably isn't very portable */ - -#include -#include - -/* return current time (in seconds) */ -static double -current_time(void) -{ - struct timeval tv; -#ifdef __VMS - (void) gettimeofday(&tv, NULL ); -#else - struct timezone tz; - (void) gettimeofday(&tv, &tz); -#endif - return (double) tv.tv_sec + tv.tv_usec / 1000000.0; -} - -#else /*BENCHMARK*/ - -/* dummy */ -static double -current_time(void) -{ - /* update this function for other platforms! */ - static double t = 0.0; - static int warn = 1; - if (warn) { - fprintf(stderr, "Warning: current_time() not implemented!!\n"); - warn = 0; - } - return t += 1.0; -} - -#endif /*BENCHMARK*/ - - - -#ifndef M_PI -#define M_PI 3.14159265 -#endif - - -static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0; -static GLint gear1, gear2, gear3; -static GLfloat angle = 0.0; - -static GLboolean fullscreen = GL_FALSE; /* Create a single fullscreen window */ -static GLboolean stereo = GL_FALSE; /* Enable stereo. */ -static GLfloat eyesep = 5.0; /* Eye separation. */ -static GLfloat fix_point = 40.0; /* Fixation point distance. */ -static GLfloat left, right, asp; /* Stereo frustum params. */ - - -/* - * - * Draw a gear wheel. You'll probably want to call this function when - * building a display list since we do a lot of trig here. - * - * Input: inner_radius - radius of hole at center - * outer_radius - radius at center of teeth - * width - width of gear - * teeth - number of teeth - * tooth_depth - depth of tooth - */ -static void -gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, - GLint teeth, GLfloat tooth_depth) -{ - GLint i; - GLfloat r0, r1, r2; - GLfloat angle, da; - GLfloat u, v, len; - - r0 = inner_radius; - r1 = outer_radius - tooth_depth / 2.0; - r2 = outer_radius + tooth_depth / 2.0; - - da = 2.0 * M_PI / teeth / 4.0; - - glShadeModel(GL_FLAT); - - glNormal3f(0.0, 0.0, 1.0); - - /* draw front face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - if (i < teeth) { - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - } - } - glEnd(); - - /* draw front sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - } - glEnd(); - - glNormal3f(0.0, 0.0, -1.0); - - /* draw back face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - if (i < teeth) { - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - } - } - glEnd(); - - /* draw back sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - -width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - } - glEnd(); - - /* draw outward faces of teeth */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - u = r2 * cos(angle + da) - r1 * cos(angle); - v = r2 * sin(angle + da) - r1 * sin(angle); - len = sqrt(u * u + v * v); - u /= len; - v /= len; - glNormal3f(v, -u, 0.0); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - -width * 0.5); - u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); - v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); - glNormal3f(v, -u, 0.0); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - } - - glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5); - glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5); - - glEnd(); - - glShadeModel(GL_SMOOTH); - - /* draw inside radius cylinder */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glNormal3f(-cos(angle), -sin(angle), 0.0); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - } - glEnd(); -} - - -static void -do_draw(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - glRotatef(view_rotx, 1.0, 0.0, 0.0); - glRotatef(view_roty, 0.0, 1.0, 0.0); - glRotatef(view_rotz, 0.0, 0.0, 1.0); - - glPushMatrix(); - glTranslatef(-3.0, -2.0, 0.0); - glRotatef(angle, 0.0, 0.0, 1.0); - glCallList(gear1); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(3.1, -2.0, 0.0); - glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0); - glCallList(gear2); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(-3.1, 4.2, 0.0); - glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0); - glCallList(gear3); - glPopMatrix(); - - glPopMatrix(); -} - -static void -draw(void) -{ - if (stereo) { - /* First left eye. */ - glDrawBuffer(GL_BACK_LEFT); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(left, right, -asp, asp, 5.0, 60.0); - - glMatrixMode(GL_MODELVIEW); - - glPushMatrix(); - glTranslated(+0.5 * eyesep, 0.0, 0.0); - do_draw(); - glPopMatrix(); - - /* Then right eye. */ - glDrawBuffer(GL_BACK_RIGHT); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-right, -left, -asp, asp, 5.0, 60.0); - - glMatrixMode(GL_MODELVIEW); - - glPushMatrix(); - glTranslated(-0.5 * eyesep, 0.0, 0.0); - do_draw(); - glPopMatrix(); - } else - do_draw(); -} - - -/* new window size or exposure */ -static void -reshape(int width, int height) -{ - glViewport(0, 0, (GLint) width, (GLint) height); - - if (stereo) { - GLfloat w; - - asp = (GLfloat) height / (GLfloat) width; - w = fix_point * (1.0 / 5.0); - - left = -5.0 * ((w - 0.5 * eyesep) / fix_point); - right = 5.0 * ((w + 0.5 * eyesep) / fix_point); - } else { - GLfloat h = (GLfloat) height / (GLfloat) width; - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0); - } - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -40.0); -} - - - -static void -init(void) -{ - static GLfloat pos[4] = { 5.0, 5.0, 10.0, 0.0 }; - static GLfloat red[4] = { 0.8, 0.1, 0.0, 1.0 }; - static GLfloat green[4] = { 0.0, 0.8, 0.2, 1.0 }; - static GLfloat blue[4] = { 0.2, 0.2, 1.0, 1.0 }; - - glLightfv(GL_LIGHT0, GL_POSITION, pos); - glEnable(GL_CULL_FACE); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - /* make the gears */ - gear1 = glGenLists(1); - glNewList(gear1, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); - gear(1.0, 4.0, 1.0, 20, 0.7); - glEndList(); - - gear2 = glGenLists(1); - glNewList(gear2, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); - gear(0.5, 2.0, 2.0, 10, 0.7); - glEndList(); - - gear3 = glGenLists(1); - glNewList(gear3, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); - gear(1.3, 2.0, 0.5, 10, 0.7); - glEndList(); - - glEnable(GL_NORMALIZE); -} - - -/* - * Create an RGB, double-buffered window. - * Return the window and context handles. - */ -static void -make_window( Display *dpy, const char *name, - int x, int y, int width, int height, - Window *winRet, GLXContext *ctxRet) -{ - int attribs[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - GLX_DEPTH_SIZE, 1, - None }; - int stereoAttribs[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - GLX_DEPTH_SIZE, 1, - GLX_STEREO, - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - Window win; - GLXContext ctx; - XVisualInfo *visinfo; - - scrnum = DefaultScreen( dpy ); - root = RootWindow( dpy, scrnum ); - - if (fullscreen) { - x = 0; y = 0; - width = DisplayWidth( dpy, scrnum ); - height = DisplayHeight( dpy, scrnum ); - } - - if (stereo) - visinfo = glXChooseVisual( dpy, scrnum, stereoAttribs ); - else - visinfo = glXChooseVisual( dpy, scrnum, attribs ); - if (!visinfo) { - if (stereo) { - printf("Error: couldn't get an RGB, " - "Double-buffered, Stereo visual\n"); - } else - printf("Error: couldn't get an RGB, Double-buffered visual\n"); - exit(1); - } - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - attr.override_redirect = fullscreen; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask | CWOverrideRedirect; - - win = XCreateWindow( dpy, root, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr ); - - /* set hints and properties */ - { - XSizeHints sizehints; - sizehints.x = x; - sizehints.y = y; - sizehints.width = width; - sizehints.height = height; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win, &sizehints); - XSetStandardProperties(dpy, win, name, name, - None, (char **)NULL, 0, &sizehints); - } - - ctx = glXCreateContext( dpy, visinfo, NULL, True ); - if (!ctx) { - printf("Error: glXCreateContext failed\n"); - exit(1); - } - - XFree(visinfo); - - *winRet = win; - *ctxRet = ctx; -} - - -static void -event_loop(Display *dpy, Window win) -{ - while (1) { - while (XPending(dpy) > 0) { - XEvent event; - XNextEvent(dpy, &event); - switch (event.type) { - case Expose: - /* we'll redraw below */ - break; - case ConfigureNotify: - reshape(event.xconfigure.width, event.xconfigure.height); - break; - case KeyPress: - { - char buffer[10]; - int r, code; - code = XLookupKeysym(&event.xkey, 0); - if (code == XK_Left) { - view_roty += 5.0; - } - else if (code == XK_Right) { - view_roty -= 5.0; - } - else if (code == XK_Up) { - view_rotx += 5.0; - } - else if (code == XK_Down) { - view_rotx -= 5.0; - } - else { - r = XLookupString(&event.xkey, buffer, sizeof(buffer), - NULL, NULL); - if (buffer[0] == 27) { - /* escape */ - return; - } - } - } - } - } - - { - static int frames = 0; - static double tRot0 = -1.0, tRate0 = -1.0; - double dt, t = current_time(); - if (tRot0 < 0.0) - tRot0 = t; - dt = t - tRot0; - tRot0 = t; - - /* advance rotation for next frame */ - angle += 70.0 * dt; /* 70 degrees per second */ - if (angle > 3600.0) - angle -= 3600.0; - - draw(); - glXSwapBuffers(dpy, win); - - frames++; - - if (tRate0 < 0.0) - tRate0 = t; - if (t - tRate0 >= 5.0) { - GLfloat seconds = t - tRate0; - GLfloat fps = frames / seconds; - printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds, - fps); - tRate0 = t; - frames = 0; - } - } - } -} - - -int -main(int argc, char *argv[]) -{ - Display *dpy; - Window win; - GLXContext ctx; - char *dpyName = NULL; - GLboolean printInfo = GL_FALSE; - int i; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-display") == 0) { - dpyName = argv[i+1]; - i++; - } - else if (strcmp(argv[i], "-info") == 0) { - printInfo = GL_TRUE; - } - else if (strcmp(argv[i], "-stereo") == 0) { - stereo = GL_TRUE; - } - else if (strcmp(argv[i], "-fullscreen") == 0) { - fullscreen = GL_TRUE; - } - else - printf("Warrning: unknown parameter: %s\n", argv[i]); - } - - dpy = XOpenDisplay(dpyName); - if (!dpy) { - printf("Error: couldn't open display %s\n", - dpyName ? dpyName : getenv("DISPLAY")); - return -1; - } - - make_window(dpy, "glxgears", 0, 0, 300, 300, &win, &ctx); - XMapWindow(dpy, win); - glXMakeCurrent(dpy, win, ctx); - - if (printInfo) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } - - init(); - - event_loop(dpy, win); - - glDeleteLists(gear1, 1); - glDeleteLists(gear2, 1); - glDeleteLists(gear3, 1); - glXDestroyContext(dpy, ctx); - XDestroyWindow(dpy, win); - XCloseDisplay(dpy); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxgears_fbconfig.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxgears_fbconfig.c deleted file mode 100644 index acbadd21ac..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxgears_fbconfig.c +++ /dev/null @@ -1,602 +0,0 @@ -/* - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file glxgears_fbconfig.c - * Yet-another-version of gears. Originally ported to GLX by Brian Paul on - * 23 March 2001. Modified to use fbconfigs by Ian Romanick on 10 Feb 2004. - * - * Command line options: - * -info print GL implementation information - * - * \author Brian Paul - * \author Ian Romanick - */ - - -#define GLX_GLXEXT_PROTOTYPES - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "pbutil.h" - -/* I had to use the SGIX versions of these because for some reason glxext.h - * doesn't define the core versions if GLX_VERSION_1_3 is defined, and glx.h - * doesn't define them at all. One or both header files is clearly broken. - */ -static PFNGLXCHOOSEFBCONFIGSGIXPROC choose_fbconfig = NULL; -static PFNGLXGETVISUALFROMFBCONFIGSGIXPROC get_visual_from_fbconfig = NULL; -static PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC create_new_context = NULL; - -#define BENCHMARK - -#ifdef BENCHMARK - -/* XXX this probably isn't very portable */ - -#include -#include - -/* return current time (in seconds) */ -static int -current_time(void) -{ - struct timeval tv; -#ifdef __VMS - (void) gettimeofday(&tv, NULL ); -#else - struct timezone tz; - (void) gettimeofday(&tv, &tz); -#endif - return (int) tv.tv_sec; -} - -#else /*BENCHMARK*/ - -/* dummy */ -static int -current_time(void) -{ - return 0; -} - -#endif /*BENCHMARK*/ - - - -#ifndef M_PI -#define M_PI 3.14159265 -#endif - - -static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0; -static GLint gear1, gear2, gear3; -static GLfloat angle = 0.0; - - -/* - * - * Draw a gear wheel. You'll probably want to call this function when - * building a display list since we do a lot of trig here. - * - * Input: inner_radius - radius of hole at center - * outer_radius - radius at center of teeth - * width - width of gear - * teeth - number of teeth - * tooth_depth - depth of tooth - */ -static void -gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, - GLint teeth, GLfloat tooth_depth) -{ - GLint i; - GLfloat r0, r1, r2; - GLfloat angle, da; - GLfloat u, v, len; - - r0 = inner_radius; - r1 = outer_radius - tooth_depth / 2.0; - r2 = outer_radius + tooth_depth / 2.0; - - da = 2.0 * M_PI / teeth / 4.0; - - glShadeModel(GL_FLAT); - - glNormal3f(0.0, 0.0, 1.0); - - /* draw front face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - if (i < teeth) { - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - } - } - glEnd(); - - /* draw front sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - } - glEnd(); - - glNormal3f(0.0, 0.0, -1.0); - - /* draw back face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - if (i < teeth) { - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - } - } - glEnd(); - - /* draw back sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - -width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - } - glEnd(); - - /* draw outward faces of teeth */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - u = r2 * cos(angle + da) - r1 * cos(angle); - v = r2 * sin(angle + da) - r1 * sin(angle); - len = sqrt(u * u + v * v); - u /= len; - v /= len; - glNormal3f(v, -u, 0.0); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - -width * 0.5); - u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); - v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); - glNormal3f(v, -u, 0.0); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - } - - glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5); - glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5); - - glEnd(); - - glShadeModel(GL_SMOOTH); - - /* draw inside radius cylinder */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glNormal3f(-cos(angle), -sin(angle), 0.0); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - } - glEnd(); -} - - -static void -draw(void) -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - glRotatef(view_rotx, 1.0, 0.0, 0.0); - glRotatef(view_roty, 0.0, 1.0, 0.0); - glRotatef(view_rotz, 0.0, 0.0, 1.0); - - glPushMatrix(); - glTranslatef(-3.0, -2.0, 0.0); - glRotatef(angle, 0.0, 0.0, 1.0); - glCallList(gear1); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(3.1, -2.0, 0.0); - glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0); - glCallList(gear2); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(-3.1, 4.2, 0.0); - glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0); - glCallList(gear3); - glPopMatrix(); - - glPopMatrix(); -} - - -/* new window size or exposure */ -static void -reshape(int width, int height) -{ - GLfloat h = (GLfloat) height / (GLfloat) width; - - glViewport(0, 0, (GLint) width, (GLint) height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -40.0); -} - - -static void -init(void) -{ - static GLfloat pos[4] = { 5.0, 5.0, 10.0, 0.0 }; - static GLfloat red[4] = { 0.8, 0.1, 0.0, 1.0 }; - static GLfloat green[4] = { 0.0, 0.8, 0.2, 1.0 }; - static GLfloat blue[4] = { 0.2, 0.2, 1.0, 1.0 }; - - glLightfv(GL_LIGHT0, GL_POSITION, pos); - glEnable(GL_CULL_FACE); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - /* make the gears */ - gear1 = glGenLists(1); - glNewList(gear1, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); - gear(1.0, 4.0, 1.0, 20, 0.7); - glEndList(); - - gear2 = glGenLists(1); - glNewList(gear2, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); - gear(0.5, 2.0, 2.0, 10, 0.7); - glEndList(); - - gear3 = glGenLists(1); - glNewList(gear3, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); - gear(1.3, 2.0, 0.5, 10, 0.7); - glEndList(); - - glEnable(GL_NORMALIZE); -} - - -/** - * Initialize fbconfig related function pointers. - */ -static void -init_fbconfig_functions(Display *dpy, int scrnum) -{ - const char * glx_extensions; - const char * match; - static const char ext_name[] = "GLX_SGIX_fbconfig"; - const size_t len = strlen( ext_name ); - int major; - int minor; - GLboolean ext_version_supported; - GLboolean glx_1_3_supported; - - - /* Determine if GLX 1.3 or greater is supported. - */ - glXQueryVersion(dpy, & major, & minor); - glx_1_3_supported = (major == 1) && (minor >= 3); - - /* Determine if GLX_SGIX_fbconfig is supported. - */ - glx_extensions = glXQueryExtensionsString(dpy, scrnum); - match = strstr( glx_extensions, ext_name ); - - ext_version_supported = (match != NULL) - && ((match[len] == '\0') || (match[len] == ' ')); - - printf( "GLX 1.3 is %ssupported.\n", - (glx_1_3_supported) ? "" : "not " ); - printf( "%s is %ssupported.\n", - ext_name, (ext_version_supported) ? "" : "not " ); - - if ( glx_1_3_supported ) { - choose_fbconfig = (PFNGLXCHOOSEFBCONFIGSGIXPROC) glXGetProcAddressARB( - (GLubyte *) "glXChooseFBConfig"); - get_visual_from_fbconfig = (PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) glXGetProcAddressARB( - (GLubyte *) "glXGetVisualFromFBConfig"); - create_new_context = (PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) glXGetProcAddressARB( - (GLubyte *) "glXCreateNewContext"); - } - else if ( ext_version_supported ) { - choose_fbconfig = (PFNGLXCHOOSEFBCONFIGSGIXPROC) glXGetProcAddressARB( - (GLubyte *) "glXChooseFBConfigSGIX"); - get_visual_from_fbconfig = (PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) glXGetProcAddressARB( - (GLubyte *) "glXGetVisualFromFBConfigSGIX"); - create_new_context = (PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) glXGetProcAddressARB( - (GLubyte *) "glXCreateContextWithConfigSGIX"); - } - else { - printf( "This demo requires either GLX 1.3 or %s be supported.\n", - ext_name ); - exit(1); - } - - if ( choose_fbconfig == NULL ) { - printf( "glXChooseFBConfig not found!\n" ); - exit(1); - } - - if ( get_visual_from_fbconfig == NULL ) { - printf( "glXGetVisualFromFBConfig not found!\n" ); - exit(1); - } - - if ( create_new_context == NULL ) { - printf( "glXCreateNewContext not found!\n" ); - exit(1); - } -} - - -/* - * Create an RGB, double-buffered window. - * Return the window and context handles. - */ -static void -make_window( Display *dpy, const char *name, - int x, int y, int width, int height, - Window *winRet, GLXContext *ctxRet) -{ - int attrib[] = { GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, - GLX_RENDER_TYPE, GLX_RGBA_BIT, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, GL_TRUE, - GLX_DEPTH_SIZE, 1, - None }; - GLXFBConfig * fbconfig; - int num_configs; - int scrnum; - int i; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - Window win; - GLXContext ctx; - XVisualInfo *visinfo; - - scrnum = DefaultScreen( dpy ); - root = RootWindow( dpy, scrnum ); - - init_fbconfig_functions(dpy, scrnum); - fbconfig = (*choose_fbconfig)(dpy, scrnum, attrib, & num_configs); - if (fbconfig == NULL) { - printf("Error: couldn't get an RGB, Double-buffered visual\n"); - exit(1); - } - - printf("\nThe following fbconfigs meet the requirements. The first one " - "will be used.\n\n"); - for ( i = 0 ; i < num_configs ; i++ ) { - PrintFBConfigInfo(dpy, scrnum, fbconfig[i], GL_TRUE); - } - - /* window attributes */ - visinfo = (*get_visual_from_fbconfig)(dpy, fbconfig[0]); - assert(visinfo != NULL); - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow( dpy, root, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr ); - - /* set hints and properties */ - { - XSizeHints sizehints; - sizehints.x = x; - sizehints.y = y; - sizehints.width = width; - sizehints.height = height; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win, &sizehints); - XSetStandardProperties(dpy, win, name, name, - None, (char **)NULL, 0, &sizehints); - } - - ctx = (*create_new_context)(dpy, fbconfig[0], GLX_RGBA_TYPE, NULL, GL_TRUE); - if (!ctx) { - printf("Error: glXCreateNewContext failed\n"); - exit(1); - } - - XFree(fbconfig); - - *winRet = win; - *ctxRet = ctx; -} - - -static void -event_loop(Display *dpy, Window win) -{ - while (1) { - while (XPending(dpy) > 0) { - XEvent event; - XNextEvent(dpy, &event); - switch (event.type) { - case Expose: - /* we'll redraw below */ - break; - case ConfigureNotify: - reshape(event.xconfigure.width, event.xconfigure.height); - break; - case KeyPress: - { - char buffer[10]; - int r, code; - code = XLookupKeysym(&event.xkey, 0); - if (code == XK_Left) { - view_roty += 5.0; - } - else if (code == XK_Right) { - view_roty -= 5.0; - } - else if (code == XK_Up) { - view_rotx += 5.0; - } - else if (code == XK_Down) { - view_rotx -= 5.0; - } - else { - r = XLookupString(&event.xkey, buffer, sizeof(buffer), - NULL, NULL); - if (buffer[0] == 27) { - /* escape */ - return; - } - } - } - } - } - - /* next frame */ - angle += 2.0; - - draw(); - glXSwapBuffers(dpy, win); - - /* calc framerate */ - { - static int t0 = -1; - static int frames = 0; - int t = current_time(); - - if (t0 < 0) - t0 = t; - - frames++; - - if (t - t0 >= 5.0) { - GLfloat seconds = t - t0; - GLfloat fps = frames / seconds; - printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds, - fps); - t0 = t; - frames = 0; - } - } - } -} - - -int -main(int argc, char *argv[]) -{ - Display *dpy; - Window win; - GLXContext ctx; - const char *dpyName = NULL; - GLboolean printInfo = GL_FALSE; - int i; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-display") == 0) { - dpyName = argv[i+1]; - i++; - } - else if (strcmp(argv[i], "-info") == 0) { - printInfo = GL_TRUE; - } - } - - dpy = XOpenDisplay(dpyName); - if (!dpy) { - printf("Error: couldn't open display %s\n", dpyName); - return -1; - } - - make_window(dpy, "glxgears", 0, 0, 300, 300, &win, &ctx); - XMapWindow(dpy, win); - glXMakeCurrent(dpy, win, ctx); - - if (printInfo) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } - - init(); - - event_loop(dpy, win); - - glXDestroyContext(dpy, ctx); - XDestroyWindow(dpy, win); - XCloseDisplay(dpy); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxheads.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxheads.c deleted file mode 100644 index 0145a70e91..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxheads.c +++ /dev/null @@ -1,286 +0,0 @@ - -/* - * Exercise multiple GLX connections on multiple X displays. - * Direct GLX contexts are attempted first, then indirect. - * Each window will display a spinning green triangle. - * - * Copyright (C) 2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include -#include -#include -#include -#include -#include - - - -/* - * Each display/window/context: - */ -struct head { - char DisplayName[1000]; - Display *Dpy; - Window Win; - GLXContext Context; - float Angle; - char Renderer[1000]; - char Vendor[1000]; - char Version[1000]; -}; - - -#define MAX_HEADS 20 -static struct head Heads[MAX_HEADS]; -static int NumHeads = 0; - - -static void -Error(const char *display, const char *msg) -{ - fprintf(stderr, "Error on display %s - %s\n", display, msg); - exit(1); -} - - -static struct head * -AddHead(const char *displayName) -{ - Display *dpy; - Window win; - GLXContext ctx; - int attrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - XVisualInfo *visinfo; - int width = 300, height = 300; - int xpos = 10, ypos = 10; - - if (NumHeads >= MAX_HEADS) - return NULL; - - dpy = XOpenDisplay(displayName); - if (!dpy) { - Error(displayName, "Unable to open display"); - return NULL; - } - - scrnum = DefaultScreen(dpy); - root = RootWindow(dpy, scrnum); - - visinfo = glXChooseVisual(dpy, scrnum, attrib); - if (!visinfo) { - Error(displayName, "Unable to find RGB, double-buffered visual"); - return NULL; - } - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow(dpy, root, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr); - if (!win) { - Error(displayName, "Couldn't create window"); - return NULL; - } - - { - XSizeHints sizehints; - sizehints.x = xpos; - sizehints.y = ypos; - sizehints.width = width; - sizehints.height = height; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win, &sizehints); - XSetStandardProperties(dpy, win, displayName, displayName, - None, (char **)NULL, 0, &sizehints); - } - - - ctx = glXCreateContext(dpy, visinfo, NULL, True); - if (!ctx) { - Error(displayName, "Couldn't create GLX context"); - return NULL; - } - - XMapWindow(dpy, win); - - if (!glXMakeCurrent(dpy, win, ctx)) { - Error(displayName, "glXMakeCurrent failed"); - printf("glXMakeCurrent failed in Redraw()\n"); - return NULL; - } - - /* save the info for this head */ - { - struct head *h = &Heads[NumHeads]; - strcpy(h->DisplayName, displayName); - h->Dpy = dpy; - h->Win = win; - h->Context = ctx; - h->Angle = 0.0; - strcpy(h->Version, (char *) glGetString(GL_VERSION)); - strcpy(h->Vendor, (char *) glGetString(GL_VENDOR)); - strcpy(h->Renderer, (char *) glGetString(GL_RENDERER)); - NumHeads++; - return &Heads[NumHeads-1]; - } - -} - - -static void -Redraw(struct head *h) -{ - if (!glXMakeCurrent(h->Dpy, h->Win, h->Context)) { - Error(h->DisplayName, "glXMakeCurrent failed"); - printf("glXMakeCurrent failed in Redraw()\n"); - return; - } - - h->Angle += 1.0; - - glShadeModel(GL_FLAT); - glClearColor(0.5, 0.5, 0.5, 1.0); - glClear(GL_COLOR_BUFFER_BIT); - - /* draw green triangle */ - glColor3f(0.0, 1.0, 0.0); - glPushMatrix(); - glRotatef(h->Angle, 0, 0, 1); - glBegin(GL_TRIANGLES); - glVertex2f(0, 0.8); - glVertex2f(-0.8, -0.7); - glVertex2f(0.8, -0.7); - glEnd(); - glPopMatrix(); - - glXSwapBuffers(h->Dpy, h->Win); -} - - - -static void -Resize(const struct head *h, unsigned int width, unsigned int height) -{ - if (!glXMakeCurrent(h->Dpy, h->Win, h->Context)) { - Error(h->DisplayName, "glXMakeCurrent failed in Resize()"); - return; - } - glFlush(); - glViewport(0, 0, width, height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); -} - - - -static void -EventLoop(void) -{ - while (1) { - int i; - for (i = 0; i < NumHeads; i++) { - struct head *h = &Heads[i]; - while (XPending(h->Dpy) > 0) { - XEvent event; - XNextEvent(h->Dpy, &event); - if (event.xany.window == h->Win) { - switch (event.type) { - case Expose: - Redraw(h); - break; - case ConfigureNotify: - Resize(h, event.xconfigure.width, event.xconfigure.height); - break; - case KeyPress: - return; - default: - /*no-op*/ ; - } - } - else { - printf("window mismatch\n"); - } - } - Redraw(h); - } - usleep(1); - } -} - - - -static void -PrintInfo(const struct head *h) -{ - printf("Name: %s\n", h->DisplayName); - printf(" Display: %p\n", (void *) h->Dpy); - printf(" Window: 0x%x\n", (int) h->Win); - printf(" Context: 0x%lx\n", (long) h->Context); - printf(" GL_VERSION: %s\n", h->Version); - printf(" GL_VENDOR: %s\n", h->Vendor); - printf(" GL_RENDERER: %s\n", h->Renderer); -} - - -int -main(int argc, char *argv[]) -{ - int i; - if (argc == 1) { - struct head *h; - printf("glxheads: exercise multiple GLX connections (any key = exit)\n"); - printf("Usage:\n"); - printf(" glxheads xdisplayname ...\n"); - printf("Example:\n"); - printf(" glxheads :0 mars:0 venus:1\n"); - h = AddHead(":0"); - if (h) - PrintInfo(h); - } - else { - for (i = 1; i < argc; i++) { - const char *name = argv[i]; - struct head *h = AddHead(name); - if (h) { - PrintInfo(h); - } - } - } - - EventLoop(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxinfo.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxinfo.c deleted file mode 100644 index 957761273c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxinfo.c +++ /dev/null @@ -1,812 +0,0 @@ -/* - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * This program is a work-alike of the IRIX glxinfo program. - * Command line options: - * -t print wide table - * -v print verbose information - * -display DisplayName specify the X display to interogate - * -b only print ID of "best" visual on screen 0 - * -i use indirect rendering connection only - * -l print interesting OpenGL limits (added 5 Sep 2002) - * - * Brian Paul 26 January 2000 - */ - -#define DO_GLU /* may want to remove this for easier XFree86 building? */ - -#include -#include -#include -#ifdef DO_GLU -#include -#endif -#include -#include -#include -#include - - -#ifndef GLX_NONE_EXT -#define GLX_NONE_EXT 0x8000 -#endif - -#ifndef GLX_TRANSPARENT_RGB -#define GLX_TRANSPARENT_RGB 0x8008 -#endif - -typedef enum -{ - Normal, - Wide, - Verbose -} InfoMode; - - -struct visual_attribs -{ - /* X visual attribs */ - int id; - int klass; - int depth; - int redMask, greenMask, blueMask; - int colormapSize; - int bitsPerRGB; - - /* GL visual attribs */ - int supportsGL; - int transparentType; - int transparentRedValue; - int transparentGreenValue; - int transparentBlueValue; - int transparentAlphaValue; - int transparentIndexValue; - int bufferSize; - int level; - int rgba; - int doubleBuffer; - int stereo; - int auxBuffers; - int redSize, greenSize, blueSize, alphaSize; - int depthSize; - int stencilSize; - int accumRedSize, accumGreenSize, accumBlueSize, accumAlphaSize; - int numSamples, numMultisample; - int visualCaveat; -}; - - -/* - * Print a list of extensions, with word-wrapping. - */ -static void -print_extension_list(const char *ext) -{ - const char *indentString = " "; - const int indent = 4; - const int max = 79; - int width, i, j; - - if (!ext || !ext[0]) - return; - - width = indent; - printf(indentString); - i = j = 0; - while (1) { - if (ext[j] == ' ' || ext[j] == 0) { - /* found end of an extension name */ - const int len = j - i; - if (width + len > max) { - /* start a new line */ - printf("\n"); - width = indent; - printf(indentString); - } - /* print the extension name between ext[i] and ext[j] */ - while (i < j) { - printf("%c", ext[i]); - i++; - } - /* either we're all done, or we'll continue with next extension */ - width += len + 1; - if (ext[j] == 0) { - break; - } - else { - i++; - j++; - if (ext[j] == 0) - break; - printf(", "); - width += 2; - } - } - j++; - } - printf("\n"); -} - - -static void -print_display_info(Display *dpy) -{ - printf("name of display: %s\n", DisplayString(dpy)); -} - - -static void -print_limits(void) -{ - struct token_name { - GLuint count; - GLenum token; - const char *name; - }; - static const struct token_name limits[] = { - { 1, GL_MAX_ATTRIB_STACK_DEPTH, "GL_MAX_ATTRIB_STACK_DEPTH" }, - { 1, GL_MAX_CLIENT_ATTRIB_STACK_DEPTH, "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH" }, - { 1, GL_MAX_CLIP_PLANES, "GL_MAX_CLIP_PLANES" }, - { 1, GL_MAX_COLOR_MATRIX_STACK_DEPTH, "GL_MAX_COLOR_MATRIX_STACK_DEPTH" }, - { 1, GL_MAX_ELEMENTS_VERTICES, "GL_MAX_ELEMENTS_VERTICES" }, - { 1, GL_MAX_ELEMENTS_INDICES, "GL_MAX_ELEMENTS_INDICES" }, - { 1, GL_MAX_EVAL_ORDER, "GL_MAX_EVAL_ORDER" }, - { 1, GL_MAX_LIGHTS, "GL_MAX_LIGHTS" }, - { 1, GL_MAX_LIST_NESTING, "GL_MAX_LIST_NESTING" }, - { 1, GL_MAX_MODELVIEW_STACK_DEPTH, "GL_MAX_MODELVIEW_STACK_DEPTH" }, - { 1, GL_MAX_NAME_STACK_DEPTH, "GL_MAX_NAME_STACK_DEPTH" }, - { 1, GL_MAX_PIXEL_MAP_TABLE, "GL_MAX_PIXEL_MAP_TABLE" }, - { 1, GL_MAX_PROJECTION_STACK_DEPTH, "GL_MAX_PROJECTION_STACK_DEPTH" }, - { 1, GL_MAX_TEXTURE_STACK_DEPTH, "GL_MAX_TEXTURE_STACK_DEPTH" }, - { 1, GL_MAX_TEXTURE_SIZE, "GL_MAX_TEXTURE_SIZE" }, - { 1, GL_MAX_3D_TEXTURE_SIZE, "GL_MAX_3D_TEXTURE_SIZE" }, - { 1, GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB, "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB" }, - { 1, GL_MAX_RECTANGLE_TEXTURE_SIZE_NV, "GL_MAX_RECTANGLE_TEXTURE_SIZE_NV" }, - { 1, GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB, "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB" }, - { 1, GL_MAX_TEXTURE_UNITS_ARB, "GL_MAX_TEXTURE_UNITS_ARB" }, - { 1, GL_MAX_TEXTURE_LOD_BIAS_EXT, "GL_MAX_TEXTURE_LOD_BIAS_EXT" }, - { 1, GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT" }, - { 2, GL_MAX_VIEWPORT_DIMS, "GL_MAX_VIEWPORT_DIMS" }, - { 2, GL_ALIASED_LINE_WIDTH_RANGE, "GL_ALIASED_LINE_WIDTH_RANGE" }, - { 2, GL_SMOOTH_LINE_WIDTH_RANGE, "GL_SMOOTH_LINE_WIDTH_RANGE" }, - { 2, GL_ALIASED_POINT_SIZE_RANGE, "GL_ALIASED_POINT_SIZE_RANGE" }, - { 2, GL_SMOOTH_POINT_SIZE_RANGE, "GL_SMOOTH_POINT_SIZE_RANGE" }, - { 0, (GLenum) 0, NULL } - }; - GLint i, max[2]; - printf("OpenGL limits:\n"); - for (i = 0; limits[i].count; i++) { - glGetIntegerv(limits[i].token, max); - if (glGetError() == GL_NONE) { - if (limits[i].count == 1) - printf(" %s = %d\n", limits[i].name, max[0]); - else /* XXX fix if we ever query something with more than 2 values */ - printf(" %s = %d, %d\n", limits[i].name, max[0], max[1]); - } - } - /* these don't fit into the above mechanism, unfortunately */ - glGetConvolutionParameteriv(GL_CONVOLUTION_2D, GL_MAX_CONVOLUTION_WIDTH, max); - glGetConvolutionParameteriv(GL_CONVOLUTION_2D, GL_MAX_CONVOLUTION_HEIGHT, max+1); - if (glGetError() == GL_NONE) { - printf(" GL_MAX_CONVOLUTION_WIDTH/HEIGHT = %d, %d\n", max[0], max[1]); - } - -} - - -static void -print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits) -{ - Window win; - int attribSingle[] = { - GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - None }; - int attribDouble[] = { - GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - None }; - - XSetWindowAttributes attr; - unsigned long mask; - Window root; - GLXContext ctx; - XVisualInfo *visinfo; - int width = 100, height = 100; - - root = RootWindow(dpy, scrnum); - - visinfo = glXChooseVisual(dpy, scrnum, attribSingle); - if (!visinfo) { - visinfo = glXChooseVisual(dpy, scrnum, attribDouble); - if (!visinfo) { - fprintf(stderr, "Error: couldn't find RGB GLX visual\n"); - return; - } - } - - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - win = XCreateWindow(dpy, root, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr); - - ctx = glXCreateContext( dpy, visinfo, NULL, allowDirect ); - if (!ctx) { - fprintf(stderr, "Error: glXCreateContext failed\n"); - XFree(visinfo); - XDestroyWindow(dpy, win); - return; - } - - if (glXMakeCurrent(dpy, win, ctx)) { - const char *serverVendor = glXQueryServerString(dpy, scrnum, GLX_VENDOR); - const char *serverVersion = glXQueryServerString(dpy, scrnum, GLX_VERSION); - const char *serverExtensions = glXQueryServerString(dpy, scrnum, GLX_EXTENSIONS); - const char *clientVendor = glXGetClientString(dpy, GLX_VENDOR); - const char *clientVersion = glXGetClientString(dpy, GLX_VERSION); - const char *clientExtensions = glXGetClientString(dpy, GLX_EXTENSIONS); - const char *glxExtensions = glXQueryExtensionsString(dpy, scrnum); - const char *glVendor = (const char *) glGetString(GL_VENDOR); - const char *glRenderer = (const char *) glGetString(GL_RENDERER); - const char *glVersion = (const char *) glGetString(GL_VERSION); - const char *glExtensions = (const char *) glGetString(GL_EXTENSIONS); - int glxVersionMajor; - int glxVersionMinor; - char *displayName = NULL; - char *colon = NULL, *period = NULL; -#ifdef DO_GLU - const char *gluVersion = (const char *) gluGetString(GLU_VERSION); - const char *gluExtensions = (const char *) gluGetString(GLU_EXTENSIONS); -#endif - - if (! glXQueryVersion( dpy, & glxVersionMajor, & glxVersionMinor )) { - fprintf(stderr, "Error: glXQueryVersion failed\n"); - exit(1); - } - - /* Strip the screen number from the display name, if present. */ - if (!(displayName = (char *) malloc(strlen(DisplayString(dpy)) + 1))) { - fprintf(stderr, "Error: malloc() failed\n"); - exit(1); - } - strcpy(displayName, DisplayString(dpy)); - colon = strrchr(displayName, ':'); - if (colon) { - period = strchr(colon, '.'); - if (period) - *period = '\0'; - } - printf("display: %s screen: %d\n", displayName, scrnum); - free(displayName); - printf("direct rendering: %s\n", glXIsDirect(dpy, ctx) ? "Yes" : "No"); - printf("server glx vendor string: %s\n", serverVendor); - printf("server glx version string: %s\n", serverVersion); - printf("server glx extensions:\n"); - print_extension_list(serverExtensions); - printf("client glx vendor string: %s\n", clientVendor); - printf("client glx version string: %s\n", clientVersion); - printf("client glx extensions:\n"); - print_extension_list(clientExtensions); - printf("GLX version: %u.%u\n", glxVersionMajor, glxVersionMinor); - printf("GLX extensions:\n"); - print_extension_list(glxExtensions); - printf("OpenGL vendor string: %s\n", glVendor); - printf("OpenGL renderer string: %s\n", glRenderer); - printf("OpenGL version string: %s\n", glVersion); - printf("OpenGL extensions:\n"); - print_extension_list(glExtensions); - if (limits) - print_limits(); -#ifdef DO_GLU - printf("glu version: %s\n", gluVersion); - printf("glu extensions:\n"); - print_extension_list(gluExtensions); -#endif - } - else { - fprintf(stderr, "Error: glXMakeCurrent failed\n"); - } - - glXDestroyContext(dpy, ctx); - XFree(visinfo); - XDestroyWindow(dpy, win); -} - - -static const char * -visual_class_name(int cls) -{ - switch (cls) { - case StaticColor: - return "StaticColor"; - case PseudoColor: - return "PseudoColor"; - case StaticGray: - return "StaticGray"; - case GrayScale: - return "GrayScale"; - case TrueColor: - return "TrueColor"; - case DirectColor: - return "DirectColor"; - default: - return ""; - } -} - - -static const char * -visual_class_abbrev(int cls) -{ - switch (cls) { - case StaticColor: - return "sc"; - case PseudoColor: - return "pc"; - case StaticGray: - return "sg"; - case GrayScale: - return "gs"; - case TrueColor: - return "tc"; - case DirectColor: - return "dc"; - default: - return ""; - } -} - - -static void -get_visual_attribs(Display *dpy, XVisualInfo *vInfo, - struct visual_attribs *attribs) -{ - const char *ext = glXQueryExtensionsString(dpy, vInfo->screen); - - memset(attribs, 0, sizeof(struct visual_attribs)); - - attribs->id = vInfo->visualid; -#if defined(__cplusplus) || defined(c_plusplus) - attribs->klass = vInfo->c_class; -#else - attribs->klass = vInfo->class; -#endif - attribs->depth = vInfo->depth; - attribs->redMask = vInfo->red_mask; - attribs->greenMask = vInfo->green_mask; - attribs->blueMask = vInfo->blue_mask; - attribs->colormapSize = vInfo->colormap_size; - attribs->bitsPerRGB = vInfo->bits_per_rgb; - - if (glXGetConfig(dpy, vInfo, GLX_USE_GL, &attribs->supportsGL) != 0) - return; - glXGetConfig(dpy, vInfo, GLX_BUFFER_SIZE, &attribs->bufferSize); - glXGetConfig(dpy, vInfo, GLX_LEVEL, &attribs->level); - glXGetConfig(dpy, vInfo, GLX_RGBA, &attribs->rgba); - glXGetConfig(dpy, vInfo, GLX_DOUBLEBUFFER, &attribs->doubleBuffer); - glXGetConfig(dpy, vInfo, GLX_STEREO, &attribs->stereo); - glXGetConfig(dpy, vInfo, GLX_AUX_BUFFERS, &attribs->auxBuffers); - glXGetConfig(dpy, vInfo, GLX_RED_SIZE, &attribs->redSize); - glXGetConfig(dpy, vInfo, GLX_GREEN_SIZE, &attribs->greenSize); - glXGetConfig(dpy, vInfo, GLX_BLUE_SIZE, &attribs->blueSize); - glXGetConfig(dpy, vInfo, GLX_ALPHA_SIZE, &attribs->alphaSize); - glXGetConfig(dpy, vInfo, GLX_DEPTH_SIZE, &attribs->depthSize); - glXGetConfig(dpy, vInfo, GLX_STENCIL_SIZE, &attribs->stencilSize); - glXGetConfig(dpy, vInfo, GLX_ACCUM_RED_SIZE, &attribs->accumRedSize); - glXGetConfig(dpy, vInfo, GLX_ACCUM_GREEN_SIZE, &attribs->accumGreenSize); - glXGetConfig(dpy, vInfo, GLX_ACCUM_BLUE_SIZE, &attribs->accumBlueSize); - glXGetConfig(dpy, vInfo, GLX_ACCUM_ALPHA_SIZE, &attribs->accumAlphaSize); - - /* get transparent pixel stuff */ - glXGetConfig(dpy, vInfo,GLX_TRANSPARENT_TYPE, &attribs->transparentType); - if (attribs->transparentType == GLX_TRANSPARENT_RGB) { - glXGetConfig(dpy, vInfo, GLX_TRANSPARENT_RED_VALUE, &attribs->transparentRedValue); - glXGetConfig(dpy, vInfo, GLX_TRANSPARENT_GREEN_VALUE, &attribs->transparentGreenValue); - glXGetConfig(dpy, vInfo, GLX_TRANSPARENT_BLUE_VALUE, &attribs->transparentBlueValue); - glXGetConfig(dpy, vInfo, GLX_TRANSPARENT_ALPHA_VALUE, &attribs->transparentAlphaValue); - } - else if (attribs->transparentType == GLX_TRANSPARENT_INDEX) { - glXGetConfig(dpy, vInfo, GLX_TRANSPARENT_INDEX_VALUE, &attribs->transparentIndexValue); - } - - /* multisample attribs */ -#ifdef GLX_ARB_multisample - if (strstr("GLX_ARB_multisample", ext) == 0) { - glXGetConfig(dpy, vInfo, GLX_SAMPLE_BUFFERS_ARB, &attribs->numMultisample); - glXGetConfig(dpy, vInfo, GLX_SAMPLES_ARB, &attribs->numSamples); - } -#endif - else { - attribs->numSamples = 0; - attribs->numMultisample = 0; - } - -#if defined(GLX_EXT_visual_rating) - if (ext && strstr(ext, "GLX_EXT_visual_rating")) { - glXGetConfig(dpy, vInfo, GLX_VISUAL_CAVEAT_EXT, &attribs->visualCaveat); - } - else { - attribs->visualCaveat = GLX_NONE_EXT; - } -#else - attribs->visualCaveat = 0; -#endif -} - - -static void -print_visual_attribs_verbose(const struct visual_attribs *attribs) -{ - printf("Visual ID: %x depth=%d class=%s\n", - attribs->id, attribs->depth, visual_class_name(attribs->klass)); - printf(" bufferSize=%d level=%d renderType=%s doubleBuffer=%d stereo=%d\n", - attribs->bufferSize, attribs->level, attribs->rgba ? "rgba" : "ci", - attribs->doubleBuffer, attribs->stereo); - printf(" rgba: redSize=%d greenSize=%d blueSize=%d alphaSize=%d\n", - attribs->redSize, attribs->greenSize, - attribs->blueSize, attribs->alphaSize); - printf(" auxBuffers=%d depthSize=%d stencilSize=%d\n", - attribs->auxBuffers, attribs->depthSize, attribs->stencilSize); - printf(" accum: redSize=%d greenSize=%d blueSize=%d alphaSize=%d\n", - attribs->accumRedSize, attribs->accumGreenSize, - attribs->accumBlueSize, attribs->accumAlphaSize); - printf(" multiSample=%d multiSampleBuffers=%d\n", - attribs->numSamples, attribs->numMultisample); -#ifdef GLX_EXT_visual_rating - if (attribs->visualCaveat == GLX_NONE_EXT || attribs->visualCaveat == 0) - printf(" visualCaveat=None\n"); - else if (attribs->visualCaveat == GLX_SLOW_VISUAL_EXT) - printf(" visualCaveat=Slow\n"); - else if (attribs->visualCaveat == GLX_NON_CONFORMANT_VISUAL_EXT) - printf(" visualCaveat=Nonconformant\n"); -#endif - if (attribs->transparentType == GLX_NONE) { - printf(" Opaque.\n"); - } - else if (attribs->transparentType == GLX_TRANSPARENT_RGB) { - printf(" Transparent RGB: Red=%d Green=%d Blue=%d Alpha=%d\n",attribs->transparentRedValue,attribs->transparentGreenValue,attribs->transparentBlueValue,attribs->transparentAlphaValue); - } - else if (attribs->transparentType == GLX_TRANSPARENT_INDEX) { - printf(" Transparent index=%d\n",attribs->transparentIndexValue); - } -} - - -static void -print_visual_attribs_short_header(void) -{ - printf(" visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav\n"); - printf(" id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat\n"); - printf("----------------------------------------------------------------------\n"); -} - - -static void -print_visual_attribs_short(const struct visual_attribs *attribs) -{ - char *caveat = NULL; -#ifdef GLX_EXT_visual_rating - if (attribs->visualCaveat == GLX_NONE_EXT || attribs->visualCaveat == 0) - caveat = "None"; - else if (attribs->visualCaveat == GLX_SLOW_VISUAL_EXT) - caveat = "Slow"; - else if (attribs->visualCaveat == GLX_NON_CONFORMANT_VISUAL_EXT) - caveat = "Ncon"; - else - caveat = "None"; -#else - caveat = "None"; -#endif - - printf("0x%2x %2d %2s %2d %2d %2d %1s %2s %2s %2d %2d %2d %2d %2d %2d %2d", - attribs->id, - attribs->depth, - visual_class_abbrev(attribs->klass), - attribs->transparentType != GLX_NONE, - attribs->bufferSize, - attribs->level, - attribs->rgba ? "r" : "c", - attribs->doubleBuffer ? "y" : ".", - attribs->stereo ? "y" : ".", - attribs->redSize, attribs->greenSize, - attribs->blueSize, attribs->alphaSize, - attribs->auxBuffers, - attribs->depthSize, - attribs->stencilSize - ); - - printf(" %2d %2d %2d %2d %2d %1d %s\n", - attribs->accumRedSize, attribs->accumGreenSize, - attribs->accumBlueSize, attribs->accumAlphaSize, - attribs->numSamples, attribs->numMultisample, - caveat - ); -} - - -static void -print_visual_attribs_long_header(void) -{ - printf("Vis Vis Visual Trans buff lev render DB ste r g b a aux dep ste accum buffers MS MS\n"); - printf(" ID Depth Type parent size el type reo sz sz sz sz buf th ncl r g b a num bufs\n"); - printf("----------------------------------------------------------------------------------------------------\n"); -} - - -static void -print_visual_attribs_long(const struct visual_attribs *attribs) -{ - printf("0x%2x %2d %-11s %2d %2d %2d %4s %3d %3d %3d %3d %3d %3d", - attribs->id, - attribs->depth, - visual_class_name(attribs->klass), - attribs->transparentType != GLX_NONE, - attribs->bufferSize, - attribs->level, - attribs->rgba ? "rgba" : "ci ", - attribs->doubleBuffer, - attribs->stereo, - attribs->redSize, attribs->greenSize, - attribs->blueSize, attribs->alphaSize - ); - - printf(" %3d %4d %2d %3d %3d %3d %3d %2d %2d\n", - attribs->auxBuffers, - attribs->depthSize, - attribs->stencilSize, - attribs->accumRedSize, attribs->accumGreenSize, - attribs->accumBlueSize, attribs->accumAlphaSize, - attribs->numSamples, attribs->numMultisample - ); -} - - -static void -print_visual_info(Display *dpy, int scrnum, InfoMode mode) -{ - XVisualInfo theTemplate; - XVisualInfo *visuals; - int numVisuals; - long mask; - int i; - - /* get list of all visuals on this screen */ - theTemplate.screen = scrnum; - mask = VisualScreenMask; - visuals = XGetVisualInfo(dpy, mask, &theTemplate, &numVisuals); - - if (mode == Verbose) { - for (i = 0; i < numVisuals; i++) { - struct visual_attribs attribs; - get_visual_attribs(dpy, &visuals[i], &attribs); - print_visual_attribs_verbose(&attribs); - } - } - else if (mode == Normal) { - print_visual_attribs_short_header(); - for (i = 0; i < numVisuals; i++) { - struct visual_attribs attribs; - get_visual_attribs(dpy, &visuals[i], &attribs); - print_visual_attribs_short(&attribs); - } - } - else if (mode == Wide) { - print_visual_attribs_long_header(); - for (i = 0; i < numVisuals; i++) { - struct visual_attribs attribs; - get_visual_attribs(dpy, &visuals[i], &attribs); - print_visual_attribs_long(&attribs); - } - } - - XFree(visuals); -} - - -/* - * Stand-alone Mesa doesn't really implement the GLX protocol so it - * doesn't really know the GLX attributes associated with an X visual. - * The first time a visual is presented to Mesa's pseudo-GLX it - * attaches ancilliary buffers to it (like depth and stencil). - * But that usually only works if glXChooseVisual is used. - * This function calls glXChooseVisual() to sort of "prime the pump" - * for Mesa's GLX so that the visuals that get reported actually - * reflect what applications will see. - * This has no effect when using true GLX. - */ -static void -mesa_hack(Display *dpy, int scrnum) -{ - static int attribs[] = { - GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DEPTH_SIZE, 1, - GLX_STENCIL_SIZE, 1, - GLX_ACCUM_RED_SIZE, 1, - GLX_ACCUM_GREEN_SIZE, 1, - GLX_ACCUM_BLUE_SIZE, 1, - GLX_ACCUM_ALPHA_SIZE, 1, - GLX_DOUBLEBUFFER, - None - }; - XVisualInfo *visinfo; - - visinfo = glXChooseVisual(dpy, scrnum, attribs); - if (visinfo) - XFree(visinfo); -} - - -/* - * Examine all visuals to find the so-called best one. - * We prefer deepest RGBA buffer with depth, stencil and accum - * that has no caveats. - */ -static int -find_best_visual(Display *dpy, int scrnum) -{ - XVisualInfo theTemplate; - XVisualInfo *visuals; - int numVisuals; - long mask; - int i; - struct visual_attribs bestVis; - - /* get list of all visuals on this screen */ - theTemplate.screen = scrnum; - mask = VisualScreenMask; - visuals = XGetVisualInfo(dpy, mask, &theTemplate, &numVisuals); - - /* init bestVis with first visual info */ - get_visual_attribs(dpy, &visuals[0], &bestVis); - - /* try to find a "better" visual */ - for (i = 1; i < numVisuals; i++) { - struct visual_attribs vis; - - get_visual_attribs(dpy, &visuals[i], &vis); - - /* always skip visuals with caveats */ - if (vis.visualCaveat != GLX_NONE_EXT) - continue; - - /* see if this vis is better than bestVis */ - if ((!bestVis.supportsGL && vis.supportsGL) || - (bestVis.visualCaveat != GLX_NONE_EXT) || - (!bestVis.rgba && vis.rgba) || - (!bestVis.doubleBuffer && vis.doubleBuffer) || - (bestVis.redSize < vis.redSize) || - (bestVis.greenSize < vis.greenSize) || - (bestVis.blueSize < vis.blueSize) || - (bestVis.alphaSize < vis.alphaSize) || - (bestVis.depthSize < vis.depthSize) || - (bestVis.stencilSize < vis.stencilSize) || - (bestVis.accumRedSize < vis.accumRedSize)) { - /* found a better visual */ - bestVis = vis; - } - } - - XFree(visuals); - - return bestVis.id; -} - - -static void -usage(void) -{ - printf("Usage: glxinfo [-v] [-t] [-h] [-i] [-b] [-display ]\n"); - printf("\t-v: Print visuals info in verbose form.\n"); - printf("\t-t: Print verbose table.\n"); - printf("\t-display : Print GLX visuals on specified server.\n"); - printf("\t-h: This information.\n"); - printf("\t-i: Force an indirect rendering context.\n"); - printf("\t-b: Find the 'best' visual and print it's number.\n"); - printf("\t-l: Print interesting OpenGL limits.\n"); -} - - -int -main(int argc, char *argv[]) -{ - char *displayName = NULL; - Display *dpy; - int numScreens, scrnum; - InfoMode mode = Normal; - GLboolean findBest = GL_FALSE; - GLboolean limits = GL_FALSE; - Bool allowDirect = True; - int i; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-display") == 0 && i + 1 < argc) { - displayName = argv[i + 1]; - i++; - } - else if (strcmp(argv[i], "-t") == 0) { - mode = Wide; - } - else if (strcmp(argv[i], "-v") == 0) { - mode = Verbose; - } - else if (strcmp(argv[i], "-b") == 0) { - findBest = GL_TRUE; - } - else if (strcmp(argv[i], "-i") == 0) { - allowDirect = False; - } - else if (strcmp(argv[i], "-l") == 0) { - limits = GL_TRUE; - } - else if (strcmp(argv[i], "-h") == 0) { - usage(); - return 0; - } - else { - printf("Unknown option `%s'\n", argv[i]); - usage(); - return 0; - } - } - - dpy = XOpenDisplay(displayName); - if (!dpy) { - fprintf(stderr, "Error: unable to open display %s\n", displayName); - return -1; - } - - if (findBest) { - int b; - mesa_hack(dpy, 0); - b = find_best_visual(dpy, 0); - printf("%d\n", b); - } - else { - numScreens = ScreenCount(dpy); - print_display_info(dpy); - for (scrnum = 0; scrnum < numScreens; scrnum++) { - mesa_hack(dpy, scrnum); - print_screen_info(dpy, scrnum, allowDirect, limits); - printf("\n"); - print_visual_info(dpy, scrnum, mode); - if (scrnum + 1 < numScreens) - printf("\n\n"); - } - } - - XCloseDisplay(dpy); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxpbdemo.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxpbdemo.c deleted file mode 100644 index 91fd30dcaa..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxpbdemo.c +++ /dev/null @@ -1,430 +0,0 @@ - -/* - * This program demonstrates how to do "off-screen" rendering using - * the GLX pixel buffer extension. - * - * Written by Brian Paul for the "OpenGL and Window System Integration" - * course presented at SIGGRAPH '97. Updated on 5 October 2002. - * - * Updated on 31 January 2004 to use native GLX by - * Andrew P. Lentvorski, Jr. - * - * Usage: - * glxpbdemo width height imgfile - * Where: - * width is the width, in pixels, of the image to generate. - * height is the height, in pixels, of the image to generate. - * imgfile is the name of the PPM image file to write. - * - * - * This demo draws 3-D boxes with random orientation. - * - * On machines such as the SGI Indigo you may have to reconfigure your - * display/X server to enable pbuffers. Look in the /usr/gfx/ucode/MGRAS/vof/ - * directory for display configurations with the _pbuf suffix. Use - * setmon -x to configure your X server and display for pbuffers. - * - * O2 systems seem to support pbuffers well. - * - */ - -#include -#include -#include -#include -#include - -/* Some ugly global vars */ -static GLXFBConfig gFBconfig = 0; -static Display *gDpy = NULL; -static int gScreen = 0; -static GLXPbuffer gPBuffer = 0; -static int gWidth, gHeight; - - -/* - * Test for appropriate version of GLX to run this program - * Input: dpy - the X display - * screen - screen number - * Return: 0 = GLX not available. - * 1 = GLX available. - */ -static int -RuntimeQueryGLXVersion(Display *dpy, int screen) -{ -#if defined(GLX_VERSION_1_3) || defined(GLX_VERSION_1_4) - char *glxversion; - - glxversion = (char *) glXGetClientString(dpy, GLX_VERSION); - if (!(strstr(glxversion, "1.3") || strstr(glxversion, "1.4"))) - return 0; - - glxversion = (char *) glXQueryServerString(dpy, screen, GLX_VERSION); - if (!(strstr(glxversion, "1.3") || strstr(glxversion, "1.4"))) - return 0; - - return 1; -#else - return 0; -#endif -} - - - -/* - * Create the pbuffer and return a GLXPbuffer handle. - */ -static GLXPbuffer -MakePbuffer( Display *dpy, int screen, int width, int height ) -{ - GLXFBConfig *fbConfigs; - GLXFBConfig chosenFBConfig; - GLXPbuffer pBuffer = None; - - int nConfigs; - int fbconfigid; - - int fbAttribs[] = { - GLX_RENDER_TYPE, GLX_RGBA_BIT, - GLX_DEPTH_SIZE, 1, - GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT | GLX_PBUFFER_BIT, - None - }; - - int pbAttribs[] = { - GLX_PBUFFER_WIDTH, 0, - GLX_PBUFFER_HEIGHT, 0, - GLX_LARGEST_PBUFFER, False, - GLX_PRESERVED_CONTENTS, False, - None - }; - - pbAttribs[1] = width; - pbAttribs[3] = height; - - fbConfigs = glXChooseFBConfig(dpy, screen, fbAttribs, &nConfigs); - - if (0 == nConfigs || !fbConfigs) { - printf("Error: glxChooseFBConfig failed\n"); - XCloseDisplay(dpy); - return 0; - } - - chosenFBConfig = fbConfigs[0]; - - glXGetFBConfigAttrib(dpy, chosenFBConfig, GLX_FBCONFIG_ID, &fbconfigid); - printf("Chose 0x%x as fbconfigid\n", fbconfigid); - - /* Create the pbuffer using first fbConfig in the list that works. */ - pBuffer = glXCreatePbuffer(dpy, chosenFBConfig, pbAttribs); - - if (pBuffer) { - gFBconfig = chosenFBConfig; - gWidth = width; - gHeight = height; - } - - XFree(fbConfigs); - - return pBuffer; -} - - - -/* - * Do all the X / GLX setup stuff. - */ -static int -Setup(int width, int height) -{ -#if defined(GLX_VERSION_1_3) || defined(GLX_VERSION_1_4) - GLXContext glCtx; - - /* Open the X display */ - gDpy = XOpenDisplay(NULL); - if (!gDpy) { - printf("Error: couldn't open default X display.\n"); - return 0; - } - - /* Get default screen */ - gScreen = DefaultScreen(gDpy); - - /* Test that GLX is available */ - if (!RuntimeQueryGLXVersion(gDpy, gScreen)) { - printf("Error: GLX 1.3 or 1.4 not available\n"); - XCloseDisplay(gDpy); - return 0; - } - - /* Create Pbuffer */ - gPBuffer = MakePbuffer( gDpy, gScreen, width, height ); - if (gPBuffer==None) { - printf("Error: couldn't create pbuffer\n"); - XCloseDisplay(gDpy); - return 0; - } - - /* Create GLX context */ - glCtx = glXCreateNewContext(gDpy, gFBconfig, GLX_RGBA_TYPE, NULL, True); - if (glCtx) { - if (!glXIsDirect(gDpy, glCtx)) { - printf("Warning: using indirect GLXContext\n"); - } - } - else { - printf("Error: Couldn't create GLXContext\n"); - XCloseDisplay(gDpy); - return 0; - } - - /* Bind context to pbuffer */ - if (!glXMakeCurrent(gDpy, gPBuffer, glCtx)) { - printf("Error: glXMakeCurrent failed\n"); - XCloseDisplay(gDpy); - return 0; - } - - return 1; /* Success!! */ -#else - printf("Error: GLX version 1.3 or 1.4 not available at compile time\n"); - return 0; -#endif -} - - - -/* One-time GL setup */ -static void -InitGL(void) -{ - static GLfloat pos[4] = {0.0, 0.0, 10.0, 0.0}; - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glLightfv(GL_LIGHT0, GL_POSITION, pos); - glEnable(GL_NORMALIZE); - glEnable(GL_DEPTH_TEST); - glEnable(GL_CULL_FACE); - - glViewport(0, 0, gWidth, gHeight); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); - -} - - -/* Return random float in [0,1] */ -static float -Random(void) -{ - int i = rand(); - return (float) (i % 1000) / 1000.0; -} - - -static void -RandomColor(void) -{ - GLfloat c[4]; - c[0] = Random(); - c[1] = Random(); - c[2] = Random(); - c[3] = 1.0; - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, c); -} - - -/* This function borrowed from Mark Kilgard's GLUT */ -static void -drawBox(GLfloat x0, GLfloat x1, GLfloat y0, GLfloat y1, - GLfloat z0, GLfloat z1, GLenum type) -{ - static GLfloat n[6][3] = - { - {-1.0, 0.0, 0.0}, - {0.0, 1.0, 0.0}, - {1.0, 0.0, 0.0}, - {0.0, -1.0, 0.0}, - {0.0, 0.0, 1.0}, - {0.0, 0.0, -1.0} - }; - static GLint faces[6][4] = - { - {0, 1, 2, 3}, - {3, 2, 6, 7}, - {7, 6, 5, 4}, - {4, 5, 1, 0}, - {5, 6, 2, 1}, - {7, 4, 0, 3} - }; - GLfloat v[8][3], tmp; - GLint i; - - if (x0 > x1) { - tmp = x0; - x0 = x1; - x1 = tmp; - } - if (y0 > y1) { - tmp = y0; - y0 = y1; - y1 = tmp; - } - if (z0 > z1) { - tmp = z0; - z0 = z1; - z1 = tmp; - } - v[0][0] = v[1][0] = v[2][0] = v[3][0] = x0; - v[4][0] = v[5][0] = v[6][0] = v[7][0] = x1; - v[0][1] = v[1][1] = v[4][1] = v[5][1] = y0; - v[2][1] = v[3][1] = v[6][1] = v[7][1] = y1; - v[0][2] = v[3][2] = v[4][2] = v[7][2] = z0; - v[1][2] = v[2][2] = v[5][2] = v[6][2] = z1; - - for (i = 0; i < 6; i++) { - glBegin(type); - glNormal3fv(&n[i][0]); - glVertex3fv(&v[faces[i][0]][0]); - glVertex3fv(&v[faces[i][1]][0]); - glVertex3fv(&v[faces[i][2]][0]); - glVertex3fv(&v[faces[i][3]][0]); - glEnd(); - } -} - - - -/* Render a scene */ -static void -Render(void) -{ - int NumBoxes = 100; - int i; - - InitGL(); - glClearColor(0.2, 0.2, 0.9, 0.0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - for (i=0;i -#define GLX_GLXEXT_PROTOTYPES -#include -#include -#include -#include - - -static GLXContext ctx; -static XVisualInfo *visinfo; -static GC gc; - - - -static Window make_rgb_window( Display *dpy, - unsigned int width, unsigned int height ) -{ - const int sbAttrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - None }; - const int dbAttrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - Window win; - - scrnum = DefaultScreen( dpy ); - root = RootWindow( dpy, scrnum ); - - visinfo = glXChooseVisual( dpy, scrnum, (int *) sbAttrib ); - if (!visinfo) { - visinfo = glXChooseVisual( dpy, scrnum, (int *) dbAttrib ); - if (!visinfo) { - printf("Error: couldn't get an RGB visual\n"); - exit(1); - } - } - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - /* TODO: share root colormap if possible */ - attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow( dpy, root, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr ); - - /* make an X GC so we can do XCopyArea later */ - gc = XCreateGC( dpy, win, 0, NULL ); - - /* need indirect context */ - ctx = glXCreateContext( dpy, visinfo, NULL, False ); - if (!ctx) { - printf("Error: glXCreateContext failed\n"); - exit(-1); - } - - printf("Direct rendering: %s\n", glXIsDirect(dpy, ctx) ? "Yes" : "No"); - - return win; -} - - -static GLXPixmap make_pixmap( Display *dpy, Window win, - unsigned int width, unsigned int height, - Pixmap *pixmap) -{ - Pixmap pm; - GLXPixmap glxpm; - XWindowAttributes attr; - - pm = XCreatePixmap( dpy, win, width, height, visinfo->depth ); - if (!pm) { - printf("Error: XCreatePixmap failed\n"); - exit(-1); - } - - XGetWindowAttributes( dpy, win, &attr ); - - /* - * IMPORTANT: - * Use the glXCreateGLXPixmapMESA funtion when using Mesa because - * Mesa needs to know the colormap associated with a pixmap in order - * to render correctly. This is because Mesa allows RGB rendering - * into any kind of visual, not just TrueColor or DirectColor. - */ -#ifdef GLX_MESA_pixmap_colormap - if (strstr(glXQueryExtensionsString(dpy, 0), "GLX_MESA_pixmap_colormap")) { - /* stand-alone Mesa, specify the colormap */ - glxpm = glXCreateGLXPixmapMESA( dpy, visinfo, pm, attr.colormap ); - } - else { - glxpm = glXCreateGLXPixmap( dpy, visinfo, pm ); - } -#else - /* This will work with Mesa too if the visual is TrueColor or DirectColor */ - glxpm = glXCreateGLXPixmap( dpy, visinfo, pm ); -#endif - - if (!glxpm) { - printf("Error: GLXCreateGLXPixmap failed\n"); - exit(-1); - } - - *pixmap = pm; - - return glxpm; -} - - - -static void event_loop( Display *dpy, GLXPixmap pm ) -{ - XEvent event; - - while (1) { - XNextEvent( dpy, &event ); - - switch (event.type) { - case Expose: - printf("Redraw\n"); - /* copy the image from GLXPixmap to window */ - XCopyArea( dpy, pm, event.xany.window, /* src, dest */ - gc, 0, 0, 300, 300, /* gc, src pos, size */ - 0, 0 ); /* dest pos */ - break; - case ConfigureNotify: - /* nothing */ - break; - } - } -} - - - -int main( int argc, char *argv[] ) -{ - Display *dpy; - Window win; - Pixmap pm; - GLXPixmap glxpm; - - dpy = XOpenDisplay(NULL); - - win = make_rgb_window( dpy, 300, 300 ); - glxpm = make_pixmap( dpy, win, 300, 300, &pm ); - - glXMakeCurrent( dpy, glxpm, ctx ); - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - - /* Render an image into the pixmap */ - glShadeModel( GL_FLAT ); - glClearColor( 0.5, 0.5, 0.5, 1.0 ); - glClear( GL_COLOR_BUFFER_BIT ); - glViewport( 0, 0, 300, 300 ); - glOrtho( -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 ); - glColor3f( 0.0, 1.0, 1.0 ); - glRectf( -0.75, -0.75, 0.75, 0.75 ); - glFlush(); - - XMapWindow( dpy, win ); - - event_loop( dpy, pm ); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxswapcontrol.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxswapcontrol.c deleted file mode 100644 index 0ed5ebe472..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/glxswapcontrol.c +++ /dev/null @@ -1,824 +0,0 @@ -/* - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This is a port of the infamous "gears" demo to straight GLX (i.e. no GLUT) - * Port by Brian Paul 23 March 2001 - * - * Modified by Ian Romanick 09 April 2003 to support - * GLX_{MESA,SGI}_swap_control and GLX_OML_sync_control. - * - * Command line options: - * -display Name of the display to use. - * -info print GL implementation information - * -swap N Attempt to set the swap interval to 1/N second - * -forcegetrate Get the display refresh rate even if the required GLX - * extension is not supported. - */ - - -#include -#include -#include -#include -#include -#include -#ifndef __VMS -/*# include */ -#endif -# define GLX_GLXEXT_PROTOTYPES -#include -#include - -#ifndef GLX_MESA_swap_control -typedef GLint ( * PFNGLXSWAPINTERVALMESAPROC) (unsigned interval); -typedef GLint ( * PFNGLXGETSWAPINTERVALMESAPROC) ( void ); -#endif - -#if !defined( GLX_OML_sync_control ) && defined( _STDINT_H ) -#define GLX_OML_sync_control 1 -typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); -#endif - -#ifndef GLX_MESA_swap_frame_usage -#define GLX_MESA_swap_frame_usage 1 -typedef int ( * PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float * usage ); -#endif - -#define BENCHMARK - -PFNGLXGETFRAMEUSAGEMESAPROC get_frame_usage = NULL; - -#ifdef BENCHMARK - -/* XXX this probably isn't very portable */ - -#include -#include - -#define NUL '\0' - -/* return current time (in seconds) */ -static int -current_time(void) -{ - struct timeval tv; -#ifdef __VMS - (void) gettimeofday(&tv, NULL ); -#else - struct timezone tz; - (void) gettimeofday(&tv, &tz); -#endif - return (int) tv.tv_sec; -} - -#else /*BENCHMARK*/ - -/* dummy */ -static int -current_time(void) -{ - return 0; -} - -#endif /*BENCHMARK*/ - - - -#ifndef M_PI -#define M_PI 3.14159265 -#endif - - -static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0; -static GLint gear1, gear2, gear3; -static GLfloat angle = 0.0; - -static GLboolean has_OML_sync_control = GL_FALSE; -static GLboolean has_SGI_swap_control = GL_FALSE; -static GLboolean has_MESA_swap_control = GL_FALSE; -static GLboolean has_MESA_swap_frame_usage = GL_FALSE; - -static char ** extension_table = NULL; -static unsigned num_extensions; - -static GLboolean use_ztrick = GL_FALSE; -static GLfloat aspect; - -/* - * - * Draw a gear wheel. You'll probably want to call this function when - * building a display list since we do a lot of trig here. - * - * Input: inner_radius - radius of hole at center - * outer_radius - radius at center of teeth - * width - width of gear - * teeth - number of teeth - * tooth_depth - depth of tooth - */ -static void -gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, - GLint teeth, GLfloat tooth_depth) -{ - GLint i; - GLfloat r0, r1, r2; - GLfloat angle, da; - GLfloat u, v, len; - - r0 = inner_radius; - r1 = outer_radius - tooth_depth / 2.0; - r2 = outer_radius + tooth_depth / 2.0; - - da = 2.0 * M_PI / teeth / 4.0; - - glShadeModel(GL_FLAT); - - glNormal3f(0.0, 0.0, 1.0); - - /* draw front face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - if (i < teeth) { - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - } - } - glEnd(); - - /* draw front sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - } - glEnd(); - - glNormal3f(0.0, 0.0, -1.0); - - /* draw back face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - if (i < teeth) { - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - } - } - glEnd(); - - /* draw back sides of teeth */ - glBegin(GL_QUADS); - da = 2.0 * M_PI / teeth / 4.0; - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - -width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - } - glEnd(); - - /* draw outward faces of teeth */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i < teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - - glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); - glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); - u = r2 * cos(angle + da) - r1 * cos(angle); - v = r2 * sin(angle + da) - r1 * sin(angle); - len = sqrt(u * u + v * v); - u /= len; - v /= len; - glNormal3f(v, -u, 0.0); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); - glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - width * 0.5); - glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), - -width * 0.5); - u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); - v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); - glNormal3f(v, -u, 0.0); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - width * 0.5); - glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), - -width * 0.5); - glNormal3f(cos(angle), sin(angle), 0.0); - } - - glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5); - glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5); - - glEnd(); - - glShadeModel(GL_SMOOTH); - - /* draw inside radius cylinder */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0 * M_PI / teeth; - glNormal3f(-cos(angle), -sin(angle), 0.0); - glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); - glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); - } - glEnd(); -} - - -static void -draw(void) -{ - if ( use_ztrick ) { - static GLboolean flip = GL_FALSE; - static const GLfloat vert[4][3] = { - { -1, -1, -0.999 }, - { 1, -1, -0.999 }, - { 1, 1, -0.999 }, - { -1, 1, -0.999 } - }; - static const GLfloat col[4][3] = { - { 1.0, 0.6, 0.0 }, - { 1.0, 0.6, 0.0 }, - { 0.0, 0.0, 0.0 }, - { 0.0, 0.0, 0.0 }, - }; - - if ( flip ) { - glDepthRange(0, 0.5); - glDepthFunc(GL_LEQUAL); - } - else { - glDepthRange(1.0, 0.4999); - glDepthFunc(GL_GEQUAL); - } - - flip = !flip; - - /* The famous Quake "Z trick" only works when the whole screen is - * re-drawn each frame. - */ - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-1, 1, -1, 1, -1, 1); - glDisable(GL_LIGHTING); - glShadeModel(GL_SMOOTH); - - glEnable( GL_VERTEX_ARRAY ); - glEnable( GL_COLOR_ARRAY ); - glVertexPointer( 3, GL_FLOAT, 0, vert ); - glColorPointer( 3, GL_FLOAT, 0, col ); - glDrawArrays( GL_POLYGON, 0, 4 ); - glDisable( GL_COLOR_ARRAY ); - glDisable( GL_VERTEX_ARRAY ); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum(-1.0, 1.0, -aspect, aspect, 5.0, 60.0); - - glEnable(GL_LIGHTING); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -40.0); - } - else { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - } - - glPushMatrix(); - glRotatef(view_rotx, 1.0, 0.0, 0.0); - glRotatef(view_roty, 0.0, 1.0, 0.0); - glRotatef(view_rotz, 0.0, 0.0, 1.0); - - glPushMatrix(); - glTranslatef(-3.0, -2.0, 0.0); - glRotatef(angle, 0.0, 0.0, 1.0); - glCallList(gear1); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(3.1, -2.0, 0.0); - glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0); - glCallList(gear2); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(-3.1, 4.2, 0.0); - glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0); - glCallList(gear3); - glPopMatrix(); - - glPopMatrix(); -} - - -/* new window size or exposure */ -static void -reshape(int width, int height) -{ - aspect = (GLfloat) height / (GLfloat) width; - - - glViewport(0, 0, (GLint) width, (GLint) height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - glFrustum(-1.0, 1.0, -aspect, aspect, 5.0, 60.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0, 0.0, -40.0); -} - - -static void -init(void) -{ - static GLfloat pos[4] = { 5.0, 5.0, 10.0, 0.0 }; - static GLfloat red[4] = { 0.8, 0.1, 0.0, 1.0 }; - static GLfloat green[4] = { 0.0, 0.8, 0.2, 1.0 }; - static GLfloat blue[4] = { 0.2, 0.2, 1.0, 1.0 }; - - glLightfv(GL_LIGHT0, GL_POSITION, pos); - glEnable(GL_CULL_FACE); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - /* make the gears */ - gear1 = glGenLists(1); - glNewList(gear1, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); - gear(1.0, 4.0, 1.0, 20, 0.7); - glEndList(); - - gear2 = glGenLists(1); - glNewList(gear2, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); - gear(0.5, 2.0, 2.0, 10, 0.7); - glEndList(); - - gear3 = glGenLists(1); - glNewList(gear3, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); - gear(1.3, 2.0, 0.5, 10, 0.7); - glEndList(); - - glEnable(GL_NORMALIZE); -} - - -/* - * Create an RGB, double-buffered window. - * Return the window and context handles. - */ -static void -make_window( Display *dpy, const char *name, - int x, int y, int width, int height, - Window *winRet, GLXContext *ctxRet) -{ - int attrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - GLX_DEPTH_SIZE, 1, - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - Window win; - GLXContext ctx; - XVisualInfo *visinfo; - - scrnum = DefaultScreen( dpy ); - root = RootWindow( dpy, scrnum ); - - visinfo = glXChooseVisual( dpy, scrnum, attrib ); - if (!visinfo) { - printf("Error: couldn't get an RGB, Double-buffered visual\n"); - exit(1); - } - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow( dpy, root, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr ); - - /* set hints and properties */ - { - XSizeHints sizehints; - sizehints.x = x; - sizehints.y = y; - sizehints.width = width; - sizehints.height = height; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win, &sizehints); - XSetStandardProperties(dpy, win, name, name, - None, (char **)NULL, 0, &sizehints); - } - - ctx = glXCreateContext( dpy, visinfo, NULL, True ); - if (!ctx) { - printf("Error: glXCreateContext failed\n"); - exit(1); - } - - XFree(visinfo); - - *winRet = win; - *ctxRet = ctx; -} - - -static void -event_loop(Display *dpy, Window win) -{ - float frame_usage = 0.0; - - while (1) { - while (XPending(dpy) > 0) { - XEvent event; - XNextEvent(dpy, &event); - switch (event.type) { - case Expose: - /* we'll redraw below */ - break; - case ConfigureNotify: - reshape(event.xconfigure.width, event.xconfigure.height); - break; - case KeyPress: - { - char buffer[10]; - int r, code; - code = XLookupKeysym(&event.xkey, 0); - if (code == XK_Left) { - view_roty += 5.0; - } - else if (code == XK_Right) { - view_roty -= 5.0; - } - else if (code == XK_Up) { - view_rotx += 5.0; - } - else if (code == XK_Down) { - view_rotx -= 5.0; - } - else { - r = XLookupString(&event.xkey, buffer, sizeof(buffer), - NULL, NULL); - if (buffer[0] == 27) { - /* escape */ - return; - } - } - } - } - } - - /* next frame */ - angle += 2.0; - - draw(); - if ( get_frame_usage != NULL ) { - GLfloat temp; - - (*get_frame_usage)( dpy, win, & temp ); - frame_usage += temp; - } - - glXSwapBuffers(dpy, win); - - /* calc framerate */ - { - static int t0 = -1; - static int frames = 0; - int t = current_time(); - - if (t0 < 0) - t0 = t; - - frames++; - - if (t - t0 >= 5.0) { - GLfloat seconds = t - t0; - GLfloat fps = frames / seconds; - if ( get_frame_usage != NULL ) { - printf("%d frames in %3.1f seconds = %6.3f FPS (%3.1f%% usage)\n", - frames, seconds, fps, - (frame_usage * 100.0) / (float) frames ); - } - else { - printf("%d frames in %3.1f seconds = %6.3f FPS\n", - frames, seconds, fps); - } - - t0 = t; - frames = 0; - frame_usage = 0.0; - } - } - } -} - - -/** - * Display the refresh rate of the display using the GLX_OML_sync_control - * extension. - */ - -static void -show_refresh_rate( Display * dpy ) -{ -#if defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) - PFNGLXGETMSCRATEOMLPROC get_msc_rate; - int32_t n; - int32_t d; - - get_msc_rate = (PFNGLXGETMSCRATEOMLPROC) glXGetProcAddressARB( (const GLubyte *) "glXGetMscRateOML" ); - if ( get_msc_rate != NULL ) { - (*get_msc_rate)( dpy, glXGetCurrentDrawable(), &n, &d ); - printf( "refresh rate: %.1fHz\n", (float) n / d ); - return; - } -#endif - printf( "glXGetMscRateOML not supported.\n" ); -} - - -/** - * Fill in the table of extension strings from a supplied extensions string - * (as returned by glXQueryExtensionsString). - * - * \param string String of GLX extensions. - * \sa is_extension_supported - */ - -static void -make_extension_table( const char * string ) -{ - char ** string_tab; - unsigned num_strings; - unsigned base; - unsigned idx; - unsigned i; - - /* Count the number of spaces in the string. That gives a base-line - * figure for the number of extension in the string. - */ - - num_strings = 1; - for ( i = 0 ; string[i] != NUL ; i++ ) { - if ( string[i] == ' ' ) { - num_strings++; - } - } - - string_tab = (char **) malloc( sizeof( char * ) * num_strings ); - if ( string_tab == NULL ) { - return; - } - - base = 0; - idx = 0; - - while ( string[ base ] != NUL ) { - /* Determine the length of the next extension string. - */ - - for ( i = 0 - ; (string[ base + i ] != NUL) && (string[ base + i ] != ' ') - ; i++ ) { - /* empty */ ; - } - - if ( i > 0 ) { - /* If the string was non-zero length, add it to the table. We - * can get zero length strings if there is a space at the end of - * the string or if there are two (or more) spaces next to each - * other in the string. - */ - - string_tab[ idx ] = malloc( sizeof( char ) * (i + 1) ); - if ( string_tab[ idx ] == NULL ) { - return; - } - - (void) memcpy( string_tab[ idx ], & string[ base ], i ); - string_tab[ idx ][i] = NUL; - idx++; - } - - - /* Skip to the start of the next extension string. - */ - - for ( base += i - ; (string[ base ] == ' ') && (string[ base ] != NUL) - ; base++ ) { - /* empty */ ; - } - } - - extension_table = string_tab; - num_extensions = idx; -} - - -/** - * Determine of an extension is supported. The extension string table - * must have already be initialized by calling \c make_extension_table. - * - * \praram ext Extension to be tested. - * \return GL_TRUE of the extension is supported, GL_FALSE otherwise. - * \sa make_extension_table - */ - -static GLboolean -is_extension_supported( const char * ext ) -{ - unsigned i; - - for ( i = 0 ; i < num_extensions ; i++ ) { - if ( strcmp( ext, extension_table[i] ) == 0 ) { - return GL_TRUE; - } - } - - return GL_FALSE; -} - - -int -main(int argc, char *argv[]) -{ - Display *dpy; - Window win; - GLXContext ctx; - char *dpyName = ":0"; - int swap_interval = 1; - GLboolean do_swap_interval = GL_FALSE; - GLboolean force_get_rate = GL_FALSE; - GLboolean printInfo = GL_FALSE; - int i; - PFNGLXSWAPINTERVALMESAPROC set_swap_interval = NULL; - PFNGLXGETSWAPINTERVALMESAPROC get_swap_interval = NULL; - - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-display") == 0 && i + 1 < argc) { - dpyName = argv[i+1]; - i++; - } - else if (strcmp(argv[i], "-info") == 0) { - printInfo = GL_TRUE; - } - else if (strcmp(argv[i], "-swap") == 0 && i + 1 < argc) { - swap_interval = atoi( argv[i+1] ); - do_swap_interval = GL_TRUE; - i++; - } - else if (strcmp(argv[i], "-forcegetrate") == 0) { - /* This option was put in because some DRI drivers don't support the - * full GLX_OML_sync_control extension, but they do support - * glXGetMscRateOML. - */ - force_get_rate = GL_TRUE; - } - else if (strcmp(argv[i], "-ztrick") == 0) { - use_ztrick = GL_TRUE; - } - else if (strcmp(argv[i], "-help") == 0) { - printf("Usage:\n"); - printf(" gears [options]\n"); - printf("Options:\n"); - printf(" -help Print this information\n"); - printf(" -display displayName Specify X display\n"); - printf(" -info Display GL information\n"); - printf(" -swap N Swap no more than once per N vertical refreshes\n"); - printf(" -forcegetrate Try to use glXGetMscRateOML function\n"); - return 0; - } - } - - dpy = XOpenDisplay(dpyName); - if (!dpy) { - printf("Error: couldn't open display %s\n", dpyName); - return -1; - } - - make_window(dpy, "glxgears", 0, 0, 300, 300, &win, &ctx); - XMapWindow(dpy, win); - glXMakeCurrent(dpy, win, ctx); - - make_extension_table( (char *) glXQueryExtensionsString(dpy,DefaultScreen(dpy)) ); - has_OML_sync_control = is_extension_supported( "GLX_OML_sync_control" ); - has_SGI_swap_control = is_extension_supported( "GLX_SGI_swap_control" ); - has_MESA_swap_control = is_extension_supported( "GLX_MESA_swap_control" ); - has_MESA_swap_frame_usage = is_extension_supported( "GLX_MESA_swap_frame_usage" ); - - if ( has_MESA_swap_control ) { - set_swap_interval = (PFNGLXSWAPINTERVALMESAPROC) glXGetProcAddressARB( (const GLubyte *) "glXSwapIntervalMESA" ); - get_swap_interval = (PFNGLXGETSWAPINTERVALMESAPROC) glXGetProcAddressARB( (const GLubyte *) "glXGetSwapIntervalMESA" ); - } - else if ( has_SGI_swap_control ) { - set_swap_interval = (PFNGLXSWAPINTERVALMESAPROC) glXGetProcAddressARB( (const GLubyte *) "glXSwapIntervalSGI" ); - } - - - if ( has_MESA_swap_frame_usage ) { - get_frame_usage = (PFNGLXGETFRAMEUSAGEMESAPROC) glXGetProcAddressARB( (const GLubyte *) "glXGetFrameUsageMESA" ); - } - - - if (printInfo) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - if ( has_OML_sync_control || force_get_rate ) { - show_refresh_rate( dpy ); - } - - if ( get_swap_interval != NULL ) { - printf("Default swap interval = %d\n", (*get_swap_interval)() ); - } - } - - if ( do_swap_interval ) { - if ( set_swap_interval != NULL ) { - if ( ((swap_interval == 0) && !has_MESA_swap_control) - || (swap_interval < 0) ) { - printf( "Swap interval must be non-negative or greater than zero " - "if GLX_MESA_swap_control is not supported.\n" ); - } - else { - (*set_swap_interval)( swap_interval ); - } - - if ( printInfo && (get_swap_interval != NULL) ) { - printf("Current swap interval = %d\n", (*get_swap_interval)() ); - } - } - else { - printf("Unable to set swap-interval. Neither GLX_SGI_swap_control " - "nor GLX_MESA_swap_control are supported.\n" ); - } - } - - init(); - - event_loop(dpy, win); - - glXDestroyContext(dpy, ctx); - XDestroyWindow(dpy, win); - XCloseDisplay(dpy); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/manywin.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/manywin.c deleted file mode 100644 index c9cca75134..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/manywin.c +++ /dev/null @@ -1,393 +0,0 @@ -/* - * Create N GLX windows/contexts and render to them in round-robin order. - * Also, have the contexts share all texture objects. - * Press 'd' to delete a texture, 'u' to unbind it. - * - * Copyright (C) 2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include - - -/* - * Each display/window/context: - */ -struct head { - char DisplayName[1000]; - Display *Dpy; - Window Win; - GLXContext Context; - float Angle; - char Renderer[1000]; - char Vendor[1000]; - char Version[1000]; -}; - - -#define MAX_HEADS 200 -static struct head Heads[MAX_HEADS]; -static int NumHeads = 0; -static GLboolean SwapSeparate = GL_TRUE; -static GLuint TexObj = 0; - - -static void -Error(const char *display, const char *msg) -{ - fprintf(stderr, "Error on display %s - %s\n", display, msg); - exit(1); -} - - -static struct head * -AddHead(const char *displayName, const char *name) -{ - Display *dpy; - Window win; - GLXContext ctx; - int attrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - XVisualInfo *visinfo; - int width = 90, height = 90; - int xpos = 0, ypos = 0; - - if (NumHeads >= MAX_HEADS) - return NULL; - - dpy = XOpenDisplay(displayName); - if (!dpy) { - Error(displayName, "Unable to open display"); - return NULL; - } - - scrnum = DefaultScreen(dpy); - root = RootWindow(dpy, scrnum); - - visinfo = glXChooseVisual(dpy, scrnum, attrib); - if (!visinfo) { - Error(displayName, "Unable to find RGB, double-buffered visual"); - return NULL; - } - - /* window attributes */ - xpos = (NumHeads % 10) * 100; - ypos = (NumHeads / 10) * 100; - printf("%d, %d\n", xpos, ypos); - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow(dpy, root, xpos, ypos, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr); - if (!win) { - Error(displayName, "Couldn't create window"); - return NULL; - } - - { - XSizeHints sizehints; - sizehints.x = xpos; - sizehints.y = ypos; - sizehints.width = width; - sizehints.height = height; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win, &sizehints); - XSetStandardProperties(dpy, win, name, name, - None, (char **)NULL, 0, &sizehints); - } - - if (NumHeads == 0) { - ctx = glXCreateContext(dpy, visinfo, NULL, True); - } - else { - /* share textures & dlists with 0th context */ - printf("sharing\n"); - ctx = glXCreateContext(dpy, visinfo, Heads[0].Context, True); - } - if (!ctx) { - Error(displayName, "Couldn't create GLX context"); - return NULL; - } - - XMapWindow(dpy, win); - - if (!glXMakeCurrent(dpy, win, ctx)) { - Error(displayName, "glXMakeCurrent failed"); - printf("glXMakeCurrent failed in Redraw()\n"); - return NULL; - } - - if (NumHeads == 0) { - /* create texture object now */ - static const GLubyte checker[2][2][4] = { - { {255, 255, 255, 255}, { 0, 0, 0, 255} }, - { { 0, 0, 0, 0}, {255, 255, 255, 255} } - }; - glGenTextures(1, &TexObj); - assert(TexObj); - glBindTexture(GL_TEXTURE_2D, TexObj); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 2, 2, 0, GL_RGB, - GL_UNSIGNED_BYTE, checker); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } - else { - /* bind 0th context's texture in this context too */ - assert(TexObj); - glBindTexture(GL_TEXTURE_2D, TexObj); - } - glEnable(GL_TEXTURE_2D); - - /* save the info for this head */ - { - struct head *h = &Heads[NumHeads]; - strcpy(h->DisplayName, name); - h->Dpy = dpy; - h->Win = win; - h->Context = ctx; - h->Angle = 0.0; - strcpy(h->Version, (char *) glGetString(GL_VERSION)); - strcpy(h->Vendor, (char *) glGetString(GL_VENDOR)); - strcpy(h->Renderer, (char *) glGetString(GL_RENDERER)); - NumHeads++; - return &Heads[NumHeads-1]; - } - -} - - -static void -DestroyHeads(void) -{ - int i; - for (i = 0; i < NumHeads; i++) { - XDestroyWindow(Heads[i].Dpy, Heads[i].Win); - glXDestroyContext(Heads[i].Dpy, Heads[i].Context); - XCloseDisplay(Heads[i].Dpy); - } -} - - -static void -Redraw(struct head *h) -{ - if (!glXMakeCurrent(h->Dpy, h->Win, h->Context)) { - Error(h->DisplayName, "glXMakeCurrent failed"); - printf("glXMakeCurrent failed in Redraw()\n"); - return; - } - - h->Angle += 1.0; - - glShadeModel(GL_FLAT); - glClearColor(0.5, 0.5, 0.5, 1.0); - glClear(GL_COLOR_BUFFER_BIT); - - /* draw green triangle */ - glColor3f(0.0, 1.0, 0.0); - glPushMatrix(); - glRotatef(h->Angle, 0, 0, 1); - glBegin(GL_TRIANGLES); - glTexCoord2f(0.5, 1.0); glVertex2f(0, 0.8); - glTexCoord2f(0.0, 0.0); glVertex2f(-0.8, -0.7); - glTexCoord2f(1.0, 0.0); glVertex2f(0.8, -0.7); - glEnd(); - glPopMatrix(); - - if (!SwapSeparate) - glXSwapBuffers(h->Dpy, h->Win); -} - - -static void -Swap(struct head *h) -{ - glXSwapBuffers(h->Dpy, h->Win); -} - - -static void -Resize(const struct head *h, unsigned int width, unsigned int height) -{ - if (!glXMakeCurrent(h->Dpy, h->Win, h->Context)) { - Error(h->DisplayName, "glXMakeCurrent failed in Resize()"); - return; - } - glFlush(); - glViewport(0, 0, width, height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); -} - - - -static void -EventLoop(void) -{ - while (1) { - int i; - for (i = 0; i < NumHeads; i++) { - struct head *h = &Heads[i]; - while (XPending(h->Dpy) > 0) { - XEvent event; - XNextEvent(h->Dpy, &event); - if (event.xany.window == h->Win) { - switch (event.type) { - case Expose: - Redraw(h); - if (SwapSeparate) - Swap(h); - break; - case ConfigureNotify: - Resize(h, event.xconfigure.width, event.xconfigure.height); - break; - case KeyPress: - { - char buf[100]; - KeySym keySym; - XComposeStatus stat; - XLookupString(&event.xkey, buf, sizeof(buf), &keySym, &stat); - switch (keySym) { - case XK_Escape: - exit(0); - break; - case XK_d: - case XK_D: - printf("Delete Texture in window %d\n", i); - glXMakeCurrent(h->Dpy, h->Win, h->Context); - glDeleteTextures(1, &TexObj); - break; - case XK_u: - case XK_U: - printf("Unbind Texture in window %d\n", i); - glXMakeCurrent(h->Dpy, h->Win, h->Context); - glBindTexture(GL_TEXTURE_2D, 0); - break; - } - } - break; - default: - /*no-op*/ ; - } - } - else { - printf("window mismatch\n"); - } - } - } - - /* redraw all windows */ - for (i = 0; i < NumHeads; i++) { - Redraw(&Heads[i]); - } - /* swapbuffers on all windows, if not already done */ - if (SwapSeparate) { - for (i = 0; i < NumHeads; i++) { - Swap(&Heads[i]); - } - } - usleep(1); - } -} - - - -static void -PrintInfo(const struct head *h) -{ - printf("Name: %s\n", h->DisplayName); - printf(" Display: %p\n", (void *) h->Dpy); - printf(" Window: 0x%x\n", (int) h->Win); - printf(" Context: 0x%lx\n", (long) h->Context); - printf(" GL_VERSION: %s\n", h->Version); - printf(" GL_VENDOR: %s\n", h->Vendor); - printf(" GL_RENDERER: %s\n", h->Renderer); -} - - -int -main(int argc, char *argv[]) -{ - char *dpyName = NULL; - int i; - - if (argc == 1) { - printf("manywin: open N simultaneous glx windows\n"); - printf("Usage:\n"); - printf(" manywin [-s] numWindows\n"); - printf("Options:\n"); - printf(" -s = swap immediately after drawing (see src code)\n"); - printf("Example:\n"); - printf(" manywin 10\n"); - return 0; - } - else { - int n = 3; - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-s") == 0) { - SwapSeparate = GL_FALSE; - } - else if (strcmp(argv[i], "-display") == 0 && i < argc) { - dpyName = argv[i+1]; - i++; - } - else { - n = atoi(argv[i]); - } - } - if (n < 1) - n = 1; - - printf("%d windows\n", n); - for (i = 0; i < n; i++) { - char name[100]; - struct head *h; - sprintf(name, "%d", i); - h = AddHead(dpyName, name); - if (h) { - PrintInfo(h); - } - } - } - - EventLoop(); - DestroyHeads(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/offset.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/offset.c deleted file mode 100644 index 3e92e68daa..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/offset.c +++ /dev/null @@ -1,323 +0,0 @@ -/**************************************************************************** -Copyright 1995 by Silicon Graphics Incorporated, Mountain View, California. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Silicon Graphics not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF -USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -****************************************************************************/ - -/* - * Derived from code written by Kurt Akeley, November 1992 - * - * Uses PolygonOffset to draw hidden-line images. PolygonOffset - * shifts the z values of polygons an amount that is - * proportional to their slope in screen z. This keeps - * the lines, which are drawn without displacement, from - * interacting with their respective polygons, and - * thus eliminates line dropouts. - * - * The left image shows an ordinary antialiased wireframe image. - * The center image shows an antialiased hidden-line image without - * PolygonOffset. - * The right image shows an antialiased hidden-line image using - * PolygonOffset to reduce artifacts. - * - * Drag with a mouse button pressed to rotate the models. - * Press the escape key to exit. - */ - -/* - * Modified for OpenGL 1.1 glPolygonOffset() conventions - */ - - -#include -#include -#include -#include -#include -#include - -#undef GL_EXT_polygon_offset /* use GL 1.1 version instead of extension */ - - -#ifndef EXIT_FAILURE -# define EXIT_FAILURE 1 -#endif -#ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -#endif - -#define MAXQUAD 6 - -typedef float Vertex[3]; - -typedef Vertex Quad[4]; - -/* data to define the six faces of a unit cube */ -Quad quads[MAXQUAD] = { - { {0,0,0}, {1,0,0}, {1,1,0}, {0,1,0} }, - { {0,0,1}, {1,0,1}, {1,1,1}, {0,1,1} }, - { {0,0,0}, {1,0,0}, {1,0,1}, {0,0,1} }, - { {0,1,0}, {1,1,0}, {1,1,1}, {0,1,1} }, - { {0,0,0}, {0,0,1}, {0,1,1}, {0,1,0} }, - { {1,0,0}, {1,0,1}, {1,1,1}, {1,1,0} } -}; - -#define WIREFRAME 0 -#define HIDDEN_LINE 1 - -static void error(const char* prog, const char* msg); -static void cubes(int mx, int my, int mode); -static void fill(Quad quad); -static void outline(Quad quad); -static void draw_hidden(Quad quad, int mode); -static void process_input(Display *dpy, Window win); -static int query_extension(char* extName); - -static int attributeList[] = { GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE, 1, None }; - -static int dimension = 3; - -int main(int argc, char** argv) { - Display *dpy; - XVisualInfo *vi; - XSetWindowAttributes swa; - Window win; - GLXContext cx; - - dpy = XOpenDisplay(0); - if (!dpy) error(argv[0], "can't open display"); - - vi = glXChooseVisual(dpy, DefaultScreen(dpy), attributeList); - if (!vi) error(argv[0], "no suitable visual"); - - cx = glXCreateContext(dpy, vi, 0, GL_TRUE); - - swa.colormap = XCreateColormap(dpy, RootWindow(dpy, vi->screen), - vi->visual, AllocNone); - - swa.border_pixel = 0; - swa.event_mask = ExposureMask | StructureNotifyMask | KeyPressMask | - ButtonPressMask | ButtonMotionMask; - win = XCreateWindow(dpy, RootWindow(dpy, vi->screen), 0, 0, 900, 300, - 0, vi->depth, InputOutput, vi->visual, - CWBorderPixel|CWColormap|CWEventMask, &swa); - XStoreName(dpy, win, "hiddenline"); - XMapWindow(dpy, win); - - glXMakeCurrent(dpy, win, cx); - - /* check for the polygon offset extension */ -#ifndef GL_VERSION_1_1 - if (!query_extension("GL_EXT_polygon_offset")) - error(argv[0], "polygon_offset extension is not available"); -#else - (void) query_extension; -#endif - - /* set up viewing parameters */ - glMatrixMode(GL_PROJECTION); - gluPerspective(20, 1, 0.1, 20); - glMatrixMode(GL_MODELVIEW); - glTranslatef(0, 0, -15); - - /* set other relevant state information */ - glEnable(GL_DEPTH_TEST); - -#ifdef GL_EXT_polygon_offset - printf("using 1.0 offset extension\n"); - glPolygonOffsetEXT( 1.0, 0.00001 ); -#else - printf("using 1.1 offset\n"); - glPolygonOffset( 1.0, 0.5 ); -#endif - - glShadeModel( GL_FLAT ); - glDisable( GL_DITHER ); - - /* process events until the user presses ESC */ - while (1) process_input(dpy, win); - - return 0; -} - -static void -draw_scene(int mx, int my) { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - glTranslatef(-1.7, 0.0, 0.0); - cubes(mx, my, WIREFRAME); - glPopMatrix(); - - glPushMatrix(); - cubes(mx, my, HIDDEN_LINE); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(1.7, 0.0, 0.0); -#ifdef GL_EXT_polygon_offset - glEnable(GL_POLYGON_OFFSET_EXT); -#else - glEnable(GL_POLYGON_OFFSET_FILL); -#endif - cubes(mx, my, HIDDEN_LINE); -#ifdef GL_EXT_polygon_offset - glDisable(GL_POLYGON_OFFSET_EXT); -#else - glDisable(GL_POLYGON_OFFSET_FILL); -#endif - glPopMatrix(); -} - - -static void -cubes(int mx, int my, int mode) { - int x, y, z, i; - - /* track the mouse */ - glRotatef(mx / 2.0, 0, 1, 0); - glRotatef(my / 2.0, 1, 0, 0); - - /* draw the lines as hidden polygons */ - glTranslatef(-0.5, -0.5, -0.5); - glScalef(1.0/dimension, 1.0/dimension, 1.0/dimension); - for (z = 0; z < dimension; z++) { - for (y = 0; y < dimension; y++) { - for (x = 0; x < dimension; x++) { - glPushMatrix(); - glTranslatef(x, y, z); - glScalef(0.8, 0.8, 0.8); - for (i = 0; i < MAXQUAD; i++) - draw_hidden(quads[i], mode); - glPopMatrix(); - } - } - } -} - -static void -fill(Quad quad) { - /* draw a filled polygon */ - glBegin(GL_QUADS); - glVertex3fv(quad[0]); - glVertex3fv(quad[1]); - glVertex3fv(quad[2]); - glVertex3fv(quad[3]); - glEnd(); -} - -static void -outline(Quad quad) { - /* draw an outlined polygon */ - glBegin(GL_LINE_LOOP); - glVertex3fv(quad[0]); - glVertex3fv(quad[1]); - glVertex3fv(quad[2]); - glVertex3fv(quad[3]); - glEnd(); -} - -static void -draw_hidden(Quad quad, int mode) { - if (mode == HIDDEN_LINE) { - glColor3f(0, 0, 0); - fill(quad); - } - - /* draw the outline using white, optionally fill the interior with black */ - glColor3f(1, 1, 1); - outline(quad); -} - -static void -process_input(Display *dpy, Window win) { - XEvent event; - static int prevx, prevy; - static int deltax = 90, deltay = 40; - - do { - char buf[31]; - KeySym keysym; - - XNextEvent(dpy, &event); - switch(event.type) { - case Expose: - break; - case ConfigureNotify: { - /* this approach preserves a 1:1 viewport aspect ratio */ - int vX, vY, vW, vH; - int eW = event.xconfigure.width, eH = event.xconfigure.height; - if (eW >= eH) { - vX = 0; - vY = (eH - eW) >> 1; - vW = vH = eW; - } else { - vX = (eW - eH) >> 1; - vY = 0; - vW = vH = eH; - } - glViewport(vX, vY, vW, vH); - } - break; - case KeyPress: - (void) XLookupString(&event.xkey, buf, sizeof(buf), &keysym, NULL); - switch (keysym) { - case XK_Escape: - exit(EXIT_SUCCESS); - default: - break; - } - case ButtonPress: - prevx = event.xbutton.x; - prevy = event.xbutton.y; - break; - case MotionNotify: - deltax += (event.xbutton.x - prevx); prevx = event.xbutton.x; - deltay += (event.xbutton.y - prevy); prevy = event.xbutton.y; - break; - default: - break; - } - } while (XPending(dpy)); - - draw_scene(deltax, deltay); - glXSwapBuffers(dpy, win); -} - -static void -error(const char *prog, const char *msg) { - fprintf(stderr, "%s: %s\n", prog, msg); - exit(EXIT_FAILURE); -} - -static int -query_extension(char* extName) { - char *p = (char *) glGetString(GL_EXTENSIONS); - char *end = p + strlen(p); - while (p < end) { - int n = strcspn(p, " "); - if ((strlen(extName) == n) && (strncmp(extName, p, n) == 0)) - return GL_TRUE; - p += (n + 1); - } - return GL_FALSE; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/opencloseopen.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/opencloseopen.c deleted file mode 100644 index 2e4de24c71..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/opencloseopen.c +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * (C) Copyright IBM Corporation 2003 - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include -#include -#include -#include -#include - -/** \file opencloseopen.c - * Simple test for Mesa bug #508473. Create a window and rendering context. - * Draw a single frame. Close the window, destroy the context, and close - * the display. Re-open the display, create a new window and context. This - * should work, but, at least as of Mesa 5.1, it segfaults. See the bug - * report for more details. - * - * Most of the code here was lifed from various other Mesa xdemos. - */ - -static void -draw(void) -{ - glViewport(0, 0, 300, 300); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - - glShadeModel(GL_FLAT); - glClearColor(0.5, 0.5, 0.5, 1.0); - glClear(GL_COLOR_BUFFER_BIT); - - /* draw blue quad */ - glLoadIdentity(); - glColor3f(0.3, 0.3, 1.0); - glPushMatrix(); - glRotatef(0, 0, 0, 1); - glBegin(GL_POLYGON); - glVertex2f(-0.5, -0.25); - glVertex2f( 0.5, -0.25); - glVertex2f( 0.5, 0.25); - glVertex2f(-0.5, 0.25); - glEnd(); - glPopMatrix();} - - -/* - * Create an RGB, double-buffered window. - * Return the window and context handles. - */ -static void -make_window( const char * dpyName, const char *name, - int x, int y, int width, int height, - Display **dpyRet, Window *winRet, GLXContext *ctxRet) -{ - int attrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - Window win; - GLXContext ctx; - XVisualInfo *visinfo; - Display *dpy; - - dpy = XOpenDisplay(dpyName); - if (!dpy) { - printf("Error: couldn't open display %s\n", dpyName); - exit(1); - } - - *dpyRet = dpy; - scrnum = DefaultScreen( dpy ); - root = RootWindow( dpy, scrnum ); - - visinfo = glXChooseVisual( dpy, scrnum, attrib ); - if (!visinfo) { - printf("Error: couldn't get an RGB, Double-buffered visual\n"); - exit(1); - } - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow( dpy, root, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr ); - - /* set hints and properties */ - { - XSizeHints sizehints; - sizehints.x = x; - sizehints.y = y; - sizehints.width = width; - sizehints.height = height; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win, &sizehints); - XSetStandardProperties(dpy, win, name, name, - None, (char **)NULL, 0, &sizehints); - } - - ctx = glXCreateContext( dpy, visinfo, NULL, True ); - if (!ctx) { - printf("Error: glXCreateContext failed\n"); - exit(1); - } - - XFree(visinfo); - - *winRet = win; - *ctxRet = ctx; -} - - -static void -destroy_window( Display *dpy, Window win, GLXContext ctx ) -{ - glXMakeCurrent(dpy, None, NULL); - glXDestroyContext(dpy, ctx); - XDestroyWindow(dpy, win); - XCloseDisplay(dpy); -} - - -int -main(int argc, char *argv[]) -{ - Display *dpy; - Window win; - GLXContext ctx; - char *dpyName = ":0"; - int i; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-display") == 0) { - dpyName = argv[i+1]; - i++; - } - } - - printf("If this program segfaults, then Mesa bug #508473 is probably " - "back.\n"); - make_window(dpyName, "Open-close-open", 0, 0, 300, 300, &dpy, &win, &ctx); - XMapWindow(dpy, win); - glXMakeCurrent(dpy, win, ctx); - - draw(); - glXSwapBuffers(dpy, win); - sleep(2); - - destroy_window(dpy, win, ctx); - - make_window(dpyName, "Open-close-open", 0, 0, 300, 300, &dpy, &win, &ctx); - XMapWindow(dpy, win); - glXMakeCurrent(dpy, win, ctx); - destroy_window(dpy, win, ctx); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/overlay.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/overlay.c deleted file mode 100644 index 4c425b64d4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/overlay.c +++ /dev/null @@ -1,245 +0,0 @@ -/* - * GLX overlay test/demo. - * - * Brian Paul - * 18 July 2005 - */ - -#include -#include -#include -#include -#include -#include - -static int WinWidth = 300, WinHeight = 300; -static Window NormalWindow = 0; -static Window OverlayWindow = 0; -static GLXContext NormalContext = 0; -static GLXContext OverlayContext = 0; -static GLboolean RGBOverlay = GL_FALSE; -static GLfloat Angle = 0.0; - - -static void -RedrawNormal(Display *dpy) -{ - glXMakeCurrent(dpy, NormalWindow, NormalContext); - glViewport(0, 0, WinWidth, WinHeight); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glClearColor(0.5, 0.5, 0.5, 1.0); - glClear(GL_COLOR_BUFFER_BIT); - glColor3f(1.0, 1.0, 0.0); - glPushMatrix(); - glRotatef(Angle, 0, 0, 1); - glRectf(-0.8, -0.8, 0.8, 0.8); - glPopMatrix(); - glXSwapBuffers(dpy, NormalWindow); -} - - -static void -RedrawOverlay(Display *dpy) -{ - glXMakeCurrent(dpy, OverlayWindow, OverlayContext); - glViewport(0, 0, WinWidth, WinHeight); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glClear(GL_COLOR_BUFFER_BIT); - if (RGBOverlay) { - glColor3f(0.0, 1.0, 1.0); - } - else { - glIndexi(2); - } - glBegin(GL_LINES); - glVertex2f(-1, -1); - glVertex2f(1, 1); - glVertex2f(1, -1); - glVertex2f(-1, 1); - glEnd(); - glXSwapBuffers(dpy, OverlayWindow); -} - - -static Window -MakeWindow(Display *dpy, XVisualInfo *visinfo, Window parent, - unsigned int width, unsigned int height) -{ - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - Window win; - - scrnum = DefaultScreen(dpy); - root = RootWindow(dpy, scrnum); - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow(dpy, parent, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr); - return win; -} - - -static void -MakeNormalWindow(Display *dpy) -{ - int attrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - None }; - int scrnum; - Window root; - XVisualInfo *visinfo; - - scrnum = DefaultScreen(dpy); - root = RootWindow(dpy, scrnum); - - visinfo = glXChooseVisual(dpy, scrnum, attrib); - if (!visinfo) { - printf("Error: couldn't get an RGB, Double-buffered visual\n"); - exit(1); - } - - NormalWindow = MakeWindow(dpy, visinfo, root, WinWidth, WinHeight); - assert(NormalWindow); - - NormalContext = glXCreateContext(dpy, visinfo, NULL, True); - assert(NormalContext); -} - - -static void -MakeOverlayWindow(Display *dpy) -{ - int rgbAttribs[] = { - GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - GLX_LEVEL, 1, - None - }; - int indexAttribs[] = { - /*GLX_RGBA, leave this out */ - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - GLX_LEVEL, 1, - None - }; - int scrnum; - Window root; - XVisualInfo *visinfo; - - scrnum = DefaultScreen(dpy); - root = RootWindow(dpy, scrnum); - - visinfo = glXChooseVisual(dpy, scrnum, rgbAttribs); - if (visinfo) { - printf("Found RGB overlay visual 0x%x\n", (int) visinfo->visualid); - RGBOverlay = GL_TRUE; - } - else { - visinfo = glXChooseVisual(dpy, scrnum, indexAttribs); - if (visinfo) { - printf("Found Color Index overlay visual 0x%x\n", - (int) visinfo->visualid); - /* XXX setup the colormap entries! */ - } - else { - printf("Error: couldn't get an overlay visual!\n"); - exit(1); - } - } - - OverlayWindow = MakeWindow(dpy, visinfo, NormalWindow, WinWidth, WinHeight); - assert(OverlayWindow); - - OverlayContext = glXCreateContext(dpy, visinfo, NULL, True); - assert(OverlayContext); -} - - -static void -EventLoop(Display *dpy) -{ - XEvent event; - - while (1) { - XNextEvent(dpy, &event); - - switch (event.type) { - case Expose: - RedrawNormal(dpy); - RedrawOverlay(dpy); - break; - case ConfigureNotify: - WinWidth = event.xconfigure.width; - WinHeight = event.xconfigure.height; - if (event.xconfigure.window == NormalWindow) - XResizeWindow(dpy, OverlayWindow, WinWidth, WinHeight); - break; - case KeyPress: - { - char buffer[10]; - int r, code; - code = XLookupKeysym(&event.xkey, 0); - r = XLookupString(&event.xkey, buffer, sizeof(buffer), - NULL, NULL); - if (buffer[0] == 27) { - /* escape */ - return; - } - else if (buffer[0] == ' ') { - Angle += 5.0; - RedrawNormal(dpy); - } - } - break; - default: - ; /* nothing */ - } - } -} - - -int -main(int argc, char *argv[]) -{ - Display *dpy = XOpenDisplay(NULL); - - assert(dpy); - - MakeNormalWindow(dpy); - MakeOverlayWindow(dpy); - - XMapWindow(dpy, NormalWindow); - XMapWindow(dpy, OverlayWindow); - - EventLoop(dpy); - - glXDestroyContext(dpy, OverlayContext); - glXDestroyContext(dpy, NormalContext); - XDestroyWindow(dpy, OverlayWindow); - XDestroyWindow(dpy, NormalWindow); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/pbdemo.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/pbdemo.c deleted file mode 100644 index efdfdfa452..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/pbdemo.c +++ /dev/null @@ -1,478 +0,0 @@ - -/* - * This program demonstrates how to do "off-screen" rendering using - * the GLX pixel buffer extension. - * - * Written by Brian Paul for the "OpenGL and Window System Integration" - * course presented at SIGGRAPH '97. Updated on 5 October 2002. - * - * Usage: - * pbuffers width height imgfile - * Where: - * width is the width, in pixels, of the image to generate. - * height is the height, in pixels, of the image to generate. - * imgfile is the name of the PPM image file to write. - * - * - * This demo draws 3-D boxes with random orientation. A pbuffer with - * a depth (Z) buffer is prefered but if such a pbuffer can't be created - * we use a non-depth-buffered config. - * - * On machines such as the SGI Indigo you may have to reconfigure your - * display/X server to enable pbuffers. Look in the /usr/gfx/ucode/MGRAS/vof/ - * directory for display configurationswith the _pbuf suffix. Use - * setmon -x to configure your X server and display for pbuffers. - * - * O2 systems seem to support pbuffers well. - * - * IR systems (at least 1RM systems) don't have single-buffered, RGBA, - * Z-buffered pbuffer configs. BUT, they DO have DOUBLE-buffered, RGBA, - * Z-buffered pbuffers. Note how we try four different fbconfig attribute - * lists below! - */ - - -#include -#include -#include -#include -#include -#include "pbutil.h" - - -/* Some ugly global vars */ -static Display *gDpy = NULL; -static int gScreen = 0; -static FBCONFIG gFBconfig = 0; -static PBUFFER gPBuffer = 0; -static int gWidth, gHeight; -static GLXContext glCtx; - - - -/* - * Create the pbuffer and return a GLXPbuffer handle. - * - * We loop over a list of fbconfigs trying to create - * a pixel buffer. We return the first pixel buffer which we successfully - * create. - */ -static PBUFFER -MakePbuffer( Display *dpy, int screen, int width, int height ) -{ -#define NUM_FB_CONFIGS 4 - const char fbString[NUM_FB_CONFIGS][100] = { - "Single Buffered, depth buffer", - "Double Buffered, depth buffer", - "Single Buffered, no depth buffer", - "Double Buffered, no depth buffer" - }; - int fbAttribs[NUM_FB_CONFIGS][100] = { - { - /* Single buffered, with depth buffer */ - GLX_RENDER_TYPE, GLX_RGBA_BIT, - GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DEPTH_SIZE, 1, - GLX_DOUBLEBUFFER, 0, - GLX_STENCIL_SIZE, 0, - None - }, - { - /* Double buffered, with depth buffer */ - GLX_RENDER_TYPE, GLX_RGBA_BIT, - GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DEPTH_SIZE, 1, - GLX_DOUBLEBUFFER, 1, - GLX_STENCIL_SIZE, 0, - None - }, - { - /* Single bufferd, without depth buffer */ - GLX_RENDER_TYPE, GLX_RGBA_BIT, - GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DEPTH_SIZE, 0, - GLX_DOUBLEBUFFER, 0, - GLX_STENCIL_SIZE, 0, - None - }, - { - /* Double bufferd, without depth buffer */ - GLX_RENDER_TYPE, GLX_RGBA_BIT, - GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DEPTH_SIZE, 0, - GLX_DOUBLEBUFFER, 1, - GLX_STENCIL_SIZE, 0, - None - } - }; - Bool largest = True; - Bool preserve = False; - FBCONFIG *fbConfigs; - PBUFFER pBuffer = None; - int nConfigs; - int i; - int attempt; - - for (attempt=0; attempt x1) { - tmp = x0; - x0 = x1; - x1 = tmp; - } - if (y0 > y1) { - tmp = y0; - y0 = y1; - y1 = tmp; - } - if (z0 > z1) { - tmp = z0; - z0 = z1; - z1 = tmp; - } - v[0][0] = v[1][0] = v[2][0] = v[3][0] = x0; - v[4][0] = v[5][0] = v[6][0] = v[7][0] = x1; - v[0][1] = v[1][1] = v[4][1] = v[5][1] = y0; - v[2][1] = v[3][1] = v[6][1] = v[7][1] = y1; - v[0][2] = v[3][2] = v[4][2] = v[7][2] = z0; - v[1][2] = v[2][2] = v[5][2] = v[6][2] = z1; - - for (i = 0; i < 6; i++) { - glBegin(type); - glNormal3fv(&n[i][0]); - glVertex3fv(&v[faces[i][0]][0]); - glVertex3fv(&v[faces[i][1]][0]); - glVertex3fv(&v[faces[i][2]][0]); - glVertex3fv(&v[faces[i][3]][0]); - glEnd(); - } -} - - - -/* Render a scene */ -static void -Render(void) -{ - int NumBoxes = 100; - int i; - - glClearColor(0.2, 0.2, 0.9, 0.0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - for (i=0;i -#include -#include -#include "pbutil.h" - - - - -static void -PrintConfigs(Display *dpy, int screen, Bool horizFormat) -{ - FBCONFIG *fbConfigs; - int nConfigs; - int i; - - fbConfigs = GetAllFBConfigs(dpy, screen, &nConfigs); - if (!nConfigs || !fbConfigs) { - printf("Error: glxGetFBConfigs failed\n"); - return; - } - - printf("Number of fbconfigs: %d\n", nConfigs); - - if (horizFormat) { - printf(" ID VisualType Depth Lvl RGB CI DB Stereo R G B A"); - printf(" Z S AR AG AB AA MSbufs MSnum Pbuffer Float\n"); - } - - /* Print config info */ - for (i = 0; i < nConfigs; i++) { - PrintFBConfigInfo(dpy, screen, fbConfigs[i], horizFormat); - } - - /* free the list */ - XFree(fbConfigs); -} - - - -static void -PrintUsage(void) -{ - printf("Options:\n"); - printf(" -display specify X display name\n"); - printf(" -t print in tabular format\n"); - printf(" -v print in verbose format\n"); - printf(" -help print this information\n"); -} - - -int -main(int argc, char *argv[]) -{ - Display *dpy; - int scrn; - char *dpyName = NULL; - Bool horizFormat = True; - int i; - - for (i=1; i -#include -#include "pbutil.h" - - -/** - * Test if we pixel buffers are available for a particular X screen. - * Input: dpy - the X display - * screen - screen number - * Return: 0 = pixel buffers not available. - * 1 = pixel buffers are available via GLX 1.3. - * 2 = pixel buffers are available via GLX_SGIX_fbconfig/pbuffer. - */ -int -QueryPbuffers(Display *dpy, int screen) -{ -#if defined(GLX_VERSION_1_3) - { - /* GLX 1.3 supports pbuffers */ - int glxVersionMajor, glxVersionMinor; - if (!glXQueryVersion(dpy, &glxVersionMajor, &glxVersionMinor)) { - /* GLX not available! */ - return 0; - } - if (glxVersionMajor * 100 + glxVersionMinor >= 103) { - return 1; - } - /* fall-through */ - } -#endif - -#if defined(GLX_SGIX_fbconfig) && defined(GLX_SGIX_pbuffer) - /* Try the SGIX extensions */ - { - char *extensions; - extensions = (char *) glXQueryServerString(dpy, screen, GLX_EXTENSIONS); - if (!extensions || - !strstr(extensions,"GLX_SGIX_fbconfig") || - !strstr(extensions,"GLX_SGIX_pbuffer")) { - return 0; - } - return 2; - } -#endif - - return 0; -} - - - -FBCONFIG * -ChooseFBConfig(Display *dpy, int screen, const int attribs[], int *nConfigs) -{ - int pbSupport = QueryPbuffers(dpy, screen); -#if defined(GLX_VERSION_1_3) - if (pbSupport == 1) { - return glXChooseFBConfig(dpy, screen, attribs, nConfigs); - } -#endif -#if defined(GLX_SGIX_fbconfig) && defined(GLX_SGIX_pbuffer) - if (pbSupport == 2) { - return glXChooseFBConfigSGIX(dpy, screen, (int *) attribs, nConfigs); - } -#endif - return NULL; -} - - -FBCONFIG * -GetAllFBConfigs(Display *dpy, int screen, int *nConfigs) -{ - int pbSupport = QueryPbuffers(dpy, screen); -#if defined(GLX_VERSION_1_3) - if (pbSupport == 1) { - return glXGetFBConfigs(dpy, screen, nConfigs); - } -#endif -#if defined(GLX_SGIX_fbconfig) && defined(GLX_SGIX_pbuffer) - if (pbSupport == 2) { - /* The GLX_SGIX_fbconfig extensions says to pass NULL to get list - * of all available configurations. - */ - return glXChooseFBConfigSGIX(dpy, screen, NULL, nConfigs); - } -#endif - return NULL; -} - - -XVisualInfo * -GetVisualFromFBConfig(Display *dpy, int screen, FBCONFIG config) -{ - int pbSupport = QueryPbuffers(dpy, screen); -#if defined(GLX_VERSION_1_3) - if (pbSupport == 1) { - return glXGetVisualFromFBConfig(dpy, config); - } -#endif -#if defined(GLX_SGIX_fbconfig) && defined(GLX_SGIX_pbuffer) - if (pbSupport == 2) { - return glXGetVisualFromFBConfigSGIX(dpy, config); - } -#endif - return NULL; -} - - -/** - * Either use glXGetFBConfigAttrib() or glXGetFBConfigAttribSGIX() - * to query an fbconfig attribute. - */ -static int -GetFBConfigAttrib(Display *dpy, int screen, -#if defined(GLX_VERSION_1_3) - const GLXFBConfig config, -#elif defined(GLX_SGIX_fbconfig) - const GLXFBConfigSGIX config, -#endif - int attrib - ) -{ - int pbSupport = QueryPbuffers(dpy, screen); - int value = 0; - -#if defined(GLX_VERSION_1_3) - if (pbSupport == 1) { - /* ok */ - if (glXGetFBConfigAttrib(dpy, config, attrib, &value) != 0) { - value = 0; - } - return value; - } - /* fall-through */ -#endif - -#if defined(GLX_SGIX_fbconfig) && defined(GLX_SGIX_pbuffer) - if (pbSupport == 2) { - if (glXGetFBConfigAttribSGIX(dpy, config, attrib, &value) != 0) { - value = 0; - } - return value; - } -#endif - - return value; -} - - - -/** - * Print parameters for a GLXFBConfig to stdout. - * Input: dpy - the X display - * screen - the X screen number - * fbConfig - the fbconfig handle - * horizFormat - if true, print in horizontal format - */ -void -PrintFBConfigInfo(Display *dpy, int screen, FBCONFIG config, Bool horizFormat) -{ - PBUFFER pBuffer; - int width=2, height=2; - int bufferSize, level, doubleBuffer, stereo, auxBuffers; - int redSize, greenSize, blueSize, alphaSize; - int depthSize, stencilSize; - int accumRedSize, accumBlueSize, accumGreenSize, accumAlphaSize; - int sampleBuffers, samples; - int drawableType, renderType, xRenderable, xVisual, id; - int maxWidth, maxHeight, maxPixels; - int optWidth, optHeight; - int floatComponents = 0; - - /* do queries using the GLX 1.3 tokens (same as the SGIX tokens) */ - bufferSize = GetFBConfigAttrib(dpy, screen, config, GLX_BUFFER_SIZE); - level = GetFBConfigAttrib(dpy, screen, config, GLX_LEVEL); - doubleBuffer = GetFBConfigAttrib(dpy, screen, config, GLX_DOUBLEBUFFER); - stereo = GetFBConfigAttrib(dpy, screen, config, GLX_STEREO); - auxBuffers = GetFBConfigAttrib(dpy, screen, config, GLX_AUX_BUFFERS); - redSize = GetFBConfigAttrib(dpy, screen, config, GLX_RED_SIZE); - greenSize = GetFBConfigAttrib(dpy, screen, config, GLX_GREEN_SIZE); - blueSize = GetFBConfigAttrib(dpy, screen, config, GLX_BLUE_SIZE); - alphaSize = GetFBConfigAttrib(dpy, screen, config, GLX_ALPHA_SIZE); - depthSize = GetFBConfigAttrib(dpy, screen, config, GLX_DEPTH_SIZE); - stencilSize = GetFBConfigAttrib(dpy, screen, config, GLX_STENCIL_SIZE); - accumRedSize = GetFBConfigAttrib(dpy, screen, config, GLX_ACCUM_RED_SIZE); - accumGreenSize = GetFBConfigAttrib(dpy, screen, config, GLX_ACCUM_GREEN_SIZE); - accumBlueSize = GetFBConfigAttrib(dpy, screen, config, GLX_ACCUM_BLUE_SIZE); - accumAlphaSize = GetFBConfigAttrib(dpy, screen, config, GLX_ACCUM_ALPHA_SIZE); - sampleBuffers = GetFBConfigAttrib(dpy, screen, config, GLX_SAMPLE_BUFFERS); - samples = GetFBConfigAttrib(dpy, screen, config, GLX_SAMPLES); - drawableType = GetFBConfigAttrib(dpy, screen, config, GLX_DRAWABLE_TYPE); - renderType = GetFBConfigAttrib(dpy, screen, config, GLX_RENDER_TYPE); - xRenderable = GetFBConfigAttrib(dpy, screen, config, GLX_X_RENDERABLE); - xVisual = GetFBConfigAttrib(dpy, screen, config, GLX_X_VISUAL_TYPE); - if (!xRenderable || !(drawableType & GLX_WINDOW_BIT_SGIX)) - xVisual = -1; - - id = GetFBConfigAttrib(dpy, screen, config, GLX_FBCONFIG_ID); - maxWidth = GetFBConfigAttrib(dpy, screen, config, GLX_MAX_PBUFFER_WIDTH); - maxHeight = GetFBConfigAttrib(dpy, screen, config, GLX_MAX_PBUFFER_HEIGHT); - maxPixels = GetFBConfigAttrib(dpy, screen, config, GLX_MAX_PBUFFER_PIXELS); -#if defined(GLX_SGIX_pbuffer) - optWidth = GetFBConfigAttrib(dpy, screen, config, GLX_OPTIMAL_PBUFFER_WIDTH_SGIX); - optHeight = GetFBConfigAttrib(dpy, screen, config, GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX); -#else - optWidth = optHeight = 0; -#endif -#if defined(GLX_NV_float_buffer) - floatComponents = GetFBConfigAttrib(dpy, screen, config, GLX_FLOAT_COMPONENTS_NV); -#endif - - /* See if we can create a pbuffer with this config */ - pBuffer = CreatePbuffer(dpy, screen, config, width, height, False, False); - - if (horizFormat) { - printf("0x%-9x ", id); - if (xVisual==GLX_STATIC_GRAY) printf("StaticGray "); - else if (xVisual==GLX_GRAY_SCALE) printf("GrayScale "); - else if (xVisual==GLX_STATIC_COLOR) printf("StaticColor "); - else if (xVisual==GLX_PSEUDO_COLOR) printf("PseudoColor "); - else if (xVisual==GLX_TRUE_COLOR) printf("TrueColor "); - else if (xVisual==GLX_DIRECT_COLOR) printf("DirectColor "); - else printf(" -none- "); - printf(" %3d %3d %s %s %s %2s ", bufferSize, level, - (renderType & GLX_RGBA_BIT_SGIX) ? "y" : ".", - (renderType & GLX_COLOR_INDEX_BIT_SGIX) ? "y" : ".", - doubleBuffer ? "y" : ".", - stereo ? "y" : "."); - printf("%2d %2d %2d %2d ", redSize, greenSize, blueSize, alphaSize); - printf("%2d %2d ", depthSize, stencilSize); - printf("%2d %2d %2d %2d", accumRedSize, accumGreenSize, accumBlueSize, - accumAlphaSize); - printf(" %2d %2d", sampleBuffers, samples); - printf(" %s %c", pBuffer ? "y" : ".", - ".y"[floatComponents]); - printf("\n"); - } - else { - printf("Id 0x%x\n", id); - printf(" Buffer Size: %d\n", bufferSize); - printf(" Level: %d\n", level); - printf(" Double Buffer: %s\n", doubleBuffer ? "yes" : "no"); - printf(" Stereo: %s\n", stereo ? "yes" : "no"); - printf(" Aux Buffers: %d\n", auxBuffers); - printf(" Red Size: %d\n", redSize); - printf(" Green Size: %d\n", greenSize); - printf(" Blue Size: %d\n", blueSize); - printf(" Alpha Size: %d\n", alphaSize); - printf(" Depth Size: %d\n", depthSize); - printf(" Stencil Size: %d\n", stencilSize); - printf(" Accum Red Size: %d\n", accumRedSize); - printf(" Accum Green Size: %d\n", accumGreenSize); - printf(" Accum Blue Size: %d\n", accumBlueSize); - printf(" Accum Alpha Size: %d\n", accumAlphaSize); - printf(" Sample Buffers: %d\n", sampleBuffers); - printf(" Samples/Pixel: %d\n", samples); - printf(" Drawable Types: "); - if (drawableType & GLX_WINDOW_BIT) printf("Window "); - if (drawableType & GLX_PIXMAP_BIT) printf("Pixmap "); - if (drawableType & GLX_PBUFFER_BIT) printf("PBuffer"); - printf("\n"); - printf(" Render Types: "); - if (renderType & GLX_RGBA_BIT_SGIX) printf("RGBA "); - if (renderType & GLX_COLOR_INDEX_BIT_SGIX) printf("CI "); - printf("\n"); - printf(" X Renderable: %s\n", xRenderable ? "yes" : "no"); - - printf(" Pbuffer: %s\n", pBuffer ? "yes" : "no"); - printf(" Max Pbuffer width: %d\n", maxWidth); - printf(" Max Pbuffer height: %d\n", maxHeight); - printf(" Max Pbuffer pixels: %d\n", maxPixels); - printf(" Optimum Pbuffer width: %d\n", optWidth); - printf(" Optimum Pbuffer height: %d\n", optHeight); - - printf(" Float Components: %s\n", floatComponents ? "yes" : "no"); - } - - if (pBuffer) { - DestroyPbuffer(dpy, screen, pBuffer); - } -} - - - -GLXContext -CreateContext(Display *dpy, int screen, FBCONFIG config) -{ - int pbSupport = QueryPbuffers(dpy, screen); -#if defined(GLX_VERSION_1_3) - if (pbSupport == 1) { - /* GLX 1.3 */ - GLXContext c; - c = glXCreateNewContext(dpy, config, GLX_RGBA_TYPE, NULL, True); - if (!c) { - /* try indirect */ - c = glXCreateNewContext(dpy, config, GLX_RGBA_TYPE, NULL, False); - } - return c; - } -#endif -#if defined(GLX_SGIX_fbconfig) && defined(GLX_SGIX_pbuffer) - if (pbSupport == 2) { - GLXContext c; - c = glXCreateContextWithConfigSGIX(dpy, config, GLX_RGBA_TYPE_SGIX, NULL, True); - if (!c) { - c = glXCreateContextWithConfigSGIX(dpy, config, GLX_RGBA_TYPE_SGIX, NULL, False); - } - return c; - } -#endif - return 0; -} - - -void -DestroyContext(Display *dpy, GLXContext ctx) -{ - glXDestroyContext(dpy, ctx); -} - - -/* This is only used by CreatePbuffer() */ -static int XErrorFlag = 0; -static int HandleXError(Display *dpy, XErrorEvent *event) -{ - XErrorFlag = 1; - return 0; -} - - -/** - * Create a Pbuffer. Use an X error handler to deal with potential - * BadAlloc errors. - * - * Input: dpy - the X display - * fbConfig - an FBConfig as returned by glXChooseFBConfigSGIX(). - * width, height - size of pixel buffer to request, in pixels. - * pbAttribs - list of optional pixel buffer attributes - * Return: a Pbuffer or None. - */ -PBUFFER -CreatePbuffer(Display *dpy, int screen, FBCONFIG config, - int width, int height, Bool largest, Bool preserve) -{ - int (*oldHandler)(Display *, XErrorEvent *); - PBUFFER pBuffer = None; - int pbSupport = QueryPbuffers(dpy, screen); - - /* Catch X protocol errors with our own error handler */ - oldHandler = XSetErrorHandler(HandleXError); - XErrorFlag = 0; - -#if defined(GLX_VERSION_1_3) - if (pbSupport == 1) { - /* GLX 1.3 */ - int attribs[100], i = 0; - attribs[i++] = GLX_PBUFFER_WIDTH; - attribs[i++] = width; - attribs[i++] = GLX_PBUFFER_HEIGHT; - attribs[i++] = height; - attribs[i++] = GLX_PRESERVED_CONTENTS; - attribs[i++] = preserve; - attribs[i++] = GLX_LARGEST_PBUFFER; - attribs[i++] = largest; - attribs[i++] = 0; - pBuffer = glXCreatePbuffer(dpy, config, attribs); - } - else -#endif -#if defined(GLX_SGIX_fbconfig) && defined(GLX_SGIX_pbuffer) - if (pbSupport == 2) { - int attribs[100], i = 0; - attribs[i++] = GLX_PRESERVED_CONTENTS; - attribs[i++] = preserve; - attribs[i++] = GLX_LARGEST_PBUFFER; - attribs[i++] = largest; - attribs[i++] = 0; - pBuffer = glXCreateGLXPbufferSGIX(dpy, config, width, height, attribs); - } - else -#endif - { - pBuffer = None; - } - - /* Restore original X error handler */ - (void) XSetErrorHandler(oldHandler); - - /* Return pbuffer (may be None) */ - if (!XErrorFlag && pBuffer != None) { - /*printf("config %d worked!\n", i);*/ - return pBuffer; - } - else { - return None; - } -} - - -void -DestroyPbuffer(Display *dpy, int screen, PBUFFER pbuffer) -{ - int pbSupport = QueryPbuffers(dpy, screen); -#if defined(GLX_VERSION_1_3) - if (pbSupport == 1) { - glXDestroyPbuffer(dpy, pbuffer); - return; - } -#endif -#if defined(GLX_SGIX_fbconfig) && defined(GLX_SGIX_pbuffer) - if (pbSupport == 2) { - glXDestroyGLXPbufferSGIX(dpy, pbuffer); - return; - } -#endif -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/pbutil.h b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/pbutil.h deleted file mode 100644 index e95b2565a2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/pbutil.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenGL pbuffers utility functions. - * - * Brian Paul - * April 1997 - */ - - -#ifndef PBUTIL_H -#define PBUTIL_H - - -#define GLX_GLXEXT_PROTOTYPES -#include - - -#if defined(GLX_VERSION_1_3) -#define PBUFFER GLXPbuffer -#define FBCONFIG GLXFBConfig -#elif defined(GLX_SGIX_fbconfig) && defined(GLX_SGIX_pbuffer) -#define PBUFFER GLXPbufferSGIX -#define FBCONFIG GLXFBConfigSGIX -#else -#define PBUFFER int -#define FBCONFIG int -#endif - - -extern int -QueryPbuffers(Display *dpy, int screen); - - -extern void -PrintFBConfigInfo(Display *dpy, int screen, FBCONFIG config, Bool horizFormat); - - -extern FBCONFIG * -ChooseFBConfig(Display *dpy, int screen, const int attribs[], int *nConfigs); - - -extern FBCONFIG * -GetAllFBConfigs(Display *dpy, int screen, int *nConfigs); - - -extern XVisualInfo * -GetVisualFromFBConfig(Display *dpy, int screen, FBCONFIG config); - - -extern GLXContext -CreateContext(Display *dpy, int screen, FBCONFIG config); - - -extern void -DestroyContext(Display *dpy, GLXContext ctx); - - -extern PBUFFER -CreatePbuffer(Display *dpy, int screen, FBCONFIG config, - int width, int height, Bool preserve, Bool largest); - - -extern void -DestroyPbuffer(Display *dpy, int screen, PBUFFER pbuffer); - - -#endif /*PBUTIL_H*/ diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/shape.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/shape.c deleted file mode 100644 index dbbc0b4ff7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/shape.c +++ /dev/null @@ -1,394 +0,0 @@ - -/* - * Example of using the X "shape" extension with OpenGL: render a spinning - * cube inside of a non-rectangular window. - * - * Press ESC to exit. Press up/down to change window shape. - * - * To compile add "shape" to the PROGS list in Makefile. - * - * Brian Paul - * June 16, 1997 - * - * This program is in the public domain. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef PI -#define PI 3.1415926 -#endif - - -static int Width=500, Height=500; - -static float Xangle = 0.0, Yangle = 0.0; -static int Redraw = 0; -static int Sides = 5; -static int MinSides = 3; -static int MaxSides = 20; - - -/* return current time (in seconds) */ -static double -current_time(void) -{ - struct timeval tv; -#ifdef __VMS - (void) gettimeofday(&tv, NULL ); -#else - struct timezone tz; - (void) gettimeofday(&tv, &tz); -#endif - return (double) tv.tv_sec + tv.tv_usec / 1000000.0; -} - - -/* - * Draw the OpenGL stuff and do a SwapBuffers. - */ -static void display(Display *dpy, Window win) -{ - float scale = 1.7; - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - - glScalef(scale, scale, scale); - glRotatef(Xangle, 1.0, 0.0, 0.0); - glRotatef(Yangle, 0.0, 1.0, 0.0); - - /* - * wireframe box - */ - glColor3f(1.0, 1.0, 1.0); - glBegin(GL_LINE_LOOP); - glVertex3f(-1.0, -1.0, -1.0); - glVertex3f( 1.0, -1.0, -1.0); - glVertex3f( 1.0, 1.0, -1.0); - glVertex3f(-1.0, 1.0, -1.0); - glEnd(); - - glBegin(GL_LINE_LOOP); - glVertex3f(-1.0, -1.0, 1.0); - glVertex3f( 1.0, -1.0, 1.0); - glVertex3f( 1.0, 1.0, 1.0); - glVertex3f(-1.0, 1.0, 1.0); - glEnd(); - - glBegin(GL_LINES); - glVertex3f(-1.0, -1.0, -1.0); glVertex3f(-1.0, -1.0, 1.0); - glVertex3f( 1.0, -1.0, -1.0); glVertex3f( 1.0, -1.0, 1.0); - glVertex3f( 1.0, 1.0, -1.0); glVertex3f( 1.0, 1.0, 1.0); - glVertex3f(-1.0, 1.0, -1.0); glVertex3f(-1.0, 1.0, 1.0); - glEnd(); - - /* - * Solid box - */ - glPushMatrix(); - glScalef(0.75, 0.75, 0.75); - - glColor3f(1, 0, 0); - glBegin(GL_POLYGON); - glVertex3f(1, -1, -1); - glVertex3f(1, 1, -1); - glVertex3f(1, 1, 1); - glVertex3f(1, -1, 1); - glEnd(); - - glColor3f(0, 1, 1); - glBegin(GL_POLYGON); - glVertex3f(-1, -1, -1); - glVertex3f(-1, 1, -1); - glVertex3f(-1, 1, 1); - glVertex3f(-1, -1, 1); - glEnd(); - - glColor3f(0, 1, 0); - glBegin(GL_POLYGON); - glVertex3f(-1, 1, -1); - glVertex3f( 1, 1, -1); - glVertex3f( 1, 1, 1); - glVertex3f(-1, 1, 1); - glEnd(); - - glColor3f(1, 0, 1); - glBegin(GL_POLYGON); - glVertex3f(-1, -1, -1); - glVertex3f( 1, -1, -1); - glVertex3f( 1, -1, 1); - glVertex3f(-1, -1, 1); - glEnd(); - - glColor3f(0, 0, 1); - glBegin(GL_POLYGON); - glVertex3f(-1, -1, 1); - glVertex3f( 1, -1, 1); - glVertex3f( 1, 1, 1); - glVertex3f(-1, 1, 1); - glEnd(); - - glColor3f(1, 1, 0); - glBegin(GL_POLYGON); - glVertex3f(-1, -1, -1); - glVertex3f( 1, -1, -1); - glVertex3f( 1, 1, -1); - glVertex3f(-1, 1, -1); - glEnd(); - glPopMatrix(); - - - glPopMatrix(); - - glXSwapBuffers(dpy, win); -} - - -/* - * This is called when we have to recompute the window shape bitmask. - * We just generate an n-sided regular polygon here but any other shape - * would be possible. - */ -static void make_shape_mask(Display *dpy, Window win, int width, int height, - int sides) -{ - Pixmap shapeMask; - XGCValues xgcv; - GC gc; - - /* allocate 1-bit deep pixmap and a GC */ - shapeMask = XCreatePixmap(dpy, win, width, height, 1); - gc = XCreateGC(dpy, shapeMask, 0, &xgcv); - - /* clear shapeMask to zeros */ - XSetForeground(dpy, gc, 0); - XFillRectangle(dpy, shapeMask, gc, 0, 0, width, height); - - /* draw mask */ - XSetForeground(dpy, gc, 1); - { - int cx = width / 2; - int cy = height / 2; - float angle = 0.0; - float step = 2.0 * PI / sides; - float radius = width / 2; - int i; - XPoint points[100]; - for (i=0;iMaxSides) Sides = MaxSides; - make_shape_mask(dpy, win, Width, Height, Sides); - break; - case XK_Down: - Sides--; - if (Sidesvisual); - if (!cmap) { - fprintf(stderr, "Couln't create colormap\n"); - return 1; - } - - winAttribs.border_pixel = 0; - winAttribs.colormap = cmap; - winAttribs.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - winAttribsMask = CWBorderPixel | CWColormap | CWEventMask; - win = XCreateWindow(dpy, root, 0, 0, Width, Height, 0, - visInfo->depth, InputOutput, - visInfo->visual, - winAttribsMask, &winAttribs); - - { - XSizeHints sizehints; - /* - sizehints.x = xpos; - sizehints.y = ypos; - sizehints.width = width; - sizehints.height = height; - */ - sizehints.flags = 0; - XSetNormalHints(dpy, win, &sizehints); - XSetStandardProperties(dpy, win, name, name, - None, (char **)NULL, 0, &sizehints); - } - - - XMapWindow(dpy, win); - - glXMakeCurrent(dpy, win, glCtx); - - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("Press ESC to exit.\n"); - printf("Press up/down to change window shape.\n"); - - event_loop(dpy, win); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/vgears.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/vgears.c deleted file mode 100644 index 13d030a8be..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/vgears.c +++ /dev/null @@ -1,282 +0,0 @@ -/* $ID$ */ - -/* - * Spinning gears demo for Linux SVGA/Mesa interface in 32K color mode. - * - * Compile with: gcc vgears.c -I../include -L../lib -lMesaGL -lX11 -lXext - * -lvga -lm -o vgears - * - * This program is in the public domain. - * Brian Paul, January 1996 - */ - - -#include -#include -#include "GL/svgamesa.h" -#include "GL/gl.h" - - -int width = 800, height = 600; - -SVGAMesaContext vmc; - - - -/* - * Draw a gear wheel. You'll probably want to call this function when - * building a display list since we do a lot of trig here. - * - * Input: inner_radius - radius of hole at center - * outer_radius - radius at center of teeth - * width - width of gear - * teeth - number of teeth - * tooth_depth - depth of tooth - */ -static void gear( GLfloat inner_radius, GLfloat outer_radius, GLfloat width, - GLint teeth, GLfloat tooth_depth ) -{ - GLint i; - GLfloat r0, r1, r2; - GLfloat angle, da; - GLfloat u, v, len; - - r0 = inner_radius; - r1 = outer_radius - tooth_depth/2.0; - r2 = outer_radius + tooth_depth/2.0; - - da = 2.0*M_PI / teeth / 4.0; - - glShadeModel( GL_FLAT ); - - glNormal3f( 0.0, 0.0, 1.0 ); - - /* draw front face */ - glBegin( GL_QUAD_STRIP ); - for (i=0;i<=teeth;i++) { - angle = i * 2.0*M_PI / teeth; - glVertex3f( r0*cos(angle), r0*sin(angle), width*0.5 ); - glVertex3f( r1*cos(angle), r1*sin(angle), width*0.5 ); - glVertex3f( r0*cos(angle), r0*sin(angle), width*0.5 ); - glVertex3f( r1*cos(angle+3*da), r1*sin(angle+3*da), width*0.5 ); - } - glEnd(); - - /* draw front sides of teeth */ - glBegin( GL_QUADS ); - da = 2.0*M_PI / teeth / 4.0; - for (i=0;iheight) { - GLfloat w = (GLfloat) width / (GLfloat) height; - glFrustum( -w, w, -1.0, 1.0, 5.0, 60.0 ); - } - else { - GLfloat h = (GLfloat) height / (GLfloat) width; - glFrustum( -1.0, 1.0, -h, h, 5.0, 60.0 ); - } - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -40.0 ); -} - -void setup( void ) -{ - vga_init(); - - vga_setmode(G800x600x32K); -/* gl_setcontextvga(G800x600x32K);*/ - - vmc = SVGAMesaCreateContext(GL_TRUE); - SVGAMesaMakeCurrent( vmc ); -} - - -void end( void ) -{ - SVGAMesaDestroyContext( vmc ); - - vga_setmode( TEXT ); -} - - -int main( int argc, char *argv[] ) -{ - int i; - - setup(); - init(); - for (i=0;i<4;i++) { - draw(); /*SVGAMesaSwapBuffers();*/ - } - end(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/vindex.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/vindex.c deleted file mode 100644 index 991fce2a59..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/vindex.c +++ /dev/null @@ -1,65 +0,0 @@ - -/* - * Test Linux 8-bit SVGA/Mesa color index mode - * - * Compile with: gcc vindex.c -I../include -L../lib -lMesaGL -lX11 -lXext - * -lvga -lm -o vindex - * - * This program is in the public domain. - * Brian Paul, January 1996 - */ - - - -#include -#include "GL/svgamesa.h" -#include "GL/gl.h" - - - -static GLint width = 640, height = 480; - - - -static void display( void ) -{ - int i, j; - int w, h; - - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( 0.0, (GLfloat) width, 0.0, (GLfloat) height, -1.0, 1.0 ); - - glClear( GL_COLOR_BUFFER_BIT ); - - w = width / 16; - h = height / 16; - for (i=0;i<16;i++) { - for (j=0;j<16;j++) { - glIndexi( i*16+j ); - glRecti( i*w, j*h, i*w+w, j*h+h ); - } - } -} - - - -int main( int argc, char *argv[] ) -{ - SVGAMesaContext vmc; - int i; - - vga_init(); - vga_setmode( G640x480x256 ); - - vmc = SVGAMesaCreateContext( GL_FALSE ); - SVGAMesaMakeCurrent( vmc ); - - display(); - sleep(3); - - SVGAMesaDestroyContext( vmc ); - vga_setmode( TEXT ); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/vtest.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/vtest.c deleted file mode 100644 index e322fbc5c8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/vtest.c +++ /dev/null @@ -1,82 +0,0 @@ - -/* - * Test SVGA/Mesa interface in 32K color mode. - * - * Compile with: gcc vtest.c -I../include -L../lib -lMesaGL -lX11 -lXext - * -lvga -lm -o vtest - * - * This program is in the public domain. - * Brian Paul, January 1996 - */ - - - -#include -#include "GL/svgamesa.h" -#include "GL/gl.h" - - -SVGAMesaContext vmc; - - - -void setup( void ) -{ - vga_init(); - - vga_setmode(G800x600x32K); -/* gl_setcontextvga(G800x600x32K);*/ - - vmc = SVGAMesaCreateContext( GL_FALSE ); /* single buffered */ - SVGAMesaMakeCurrent( vmc ); -} - - -void test( void ) -{ - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho( -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 ); - glMatrixMode(GL_MODELVIEW); - - glClear( GL_COLOR_BUFFER_BIT ); - - glBegin( GL_LINES ); - glColor3f( 1.0, 0.0, 0.0 ); - glVertex2f( -0.5, 0.5 ); - glVertex2f( 0.5, 0.5 ); - glColor3f( 0.0, 1.0, 0.0 ); - glVertex2f( -0.5, 0.25 ); - glVertex2f( 0.5, 0.25 ); - glColor3f( 0.0, 0.0, 1.0 ); - glVertex2f( -0.5, 0.0 ); - glVertex2f( 0.5, 0.0 ); - glEnd(); - - glBegin( GL_POLYGON ); - glColor3f( 1.0, 0.0, 0.0 ); - glVertex2f( 0.0, 0.7 ); - glColor3f( 0.0, 1.0, 0.0 ); - glVertex2f( -0.5, -0.5 ); - glColor3f( 0.0, 0.0, 1.0 ); - glVertex2f( 0.5, -0.5 ); - glEnd(); - - sleep(3); -} - -void end( void ) -{ - SVGAMesaDestroyContext( vmc ); - - vga_setmode( TEXT ); -} - - -int main( int argc, char *argv[] ) -{ - setup(); - test(); - end(); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/wincopy.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/wincopy.c deleted file mode 100644 index 3ec67dc672..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/wincopy.c +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.1 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * This program opens two GLX windows, renders into one and uses - * glCopyPixels to copy the image from the first window into the - * second by means of the GLX 1.3 function glxMakeContextCurrent(). - * This function works just like the glXMakeCurrentReadSGI() function - * in the GLX_SGI_make_current_read extension. - */ - - -#define GLX_GLXEXT_PROTOTYPES -#include -#include -#include -#include -#include -#include -#include - - -#ifdef GLX_VERSION_1_3 - - -static Display *Dpy; -static int ScrNum; -static GLXContext Context; -static Window Win[2]; /* Win[0] = source, Win[1] = dest */ -static GLint Width[2], Height[2]; - -static GLfloat Angle = 0.0; - -static GLboolean DrawFront = GL_FALSE; - -PFNGLXMAKECURRENTREADSGIPROC make_context_current = NULL; - -static Window -CreateWindow(Display *dpy, int scrnum, XVisualInfo *visinfo, - int xpos, int ypos, int width, int height, - const char *name) -{ - Window win; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - - root = RootWindow(dpy, scrnum); - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow(dpy, root, xpos, ypos, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr); - if (win) { - XSizeHints sizehints; - sizehints.x = xpos; - sizehints.y = ypos; - sizehints.width = width; - sizehints.height = height; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win, &sizehints); - XSetStandardProperties(dpy, win, name, name, - None, (char **)NULL, 0, &sizehints); - - XMapWindow(dpy, win); - } - return win; -} - - -static void -Redraw(void) -{ - /* make the first window the current one */ - if (! (*make_context_current)(Dpy, Win[0], Win[0], Context)) { - printf("glXMakeContextCurrent failed in Redraw()\n"); - return; - } - - Angle += 1.0; - - if (DrawFront) { - glDrawBuffer(GL_FRONT); - glReadBuffer(GL_FRONT); - } - else { - glDrawBuffer(GL_BACK); - glReadBuffer(GL_BACK); - } - - glViewport(0, 0, Width[0], Height[0]); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - - glShadeModel(GL_FLAT); - glClearColor(0.5, 0.5, 0.5, 1.0); - glClear(GL_COLOR_BUFFER_BIT); - - /* draw blue quad */ - glColor3f(0.3, 0.3, 1.0); - glPushMatrix(); - glRotatef(Angle, 0, 0, 1); - glBegin(GL_POLYGON); - glVertex2f(-0.5, -0.25); - glVertex2f( 0.5, -0.25); - glVertex2f( 0.5, 0.25); - glVertex2f(-0.5, 0.25); - glEnd(); - glPopMatrix(); - - if (DrawFront) - glFinish(); - else - glXSwapBuffers(Dpy, Win[0]); - - - /* copy image from window 0 to window 1 */ - if (!(*make_context_current)(Dpy, Win[1], Win[0], Context)) { - printf("glXMakeContextCurrent failed in Redraw()\n"); - return; - } - - /* raster pos setup */ - glViewport(0, 0, Width[1], Height[1]); - glPushMatrix(); - glLoadIdentity(); - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); - glOrtho(-1, 1, -1, 1, -1, 1); - glRasterPos2f(-1, -1); - - /* copy the image between windows */ - glCopyPixels(0, 0, Width[0], Height[0], GL_COLOR); - - glPopMatrix(); - glMatrixMode(GL_MODELVIEW); - glPopMatrix(); - - if (DrawFront) - glFinish(); - else - glXSwapBuffers(Dpy, Win[1]); -} - - - -static void -Resize(Window win, unsigned int width, unsigned int height) -{ - int i; - if (win == Win[0]) { - i = 0; - } - else { - i = 1; - } - Width[i] = width; - Height[i] = height; - if (!glXMakeCurrent(Dpy, Win[i], Context)) { - printf("glXMakeCurrent failed in Resize()\n"); - return; - } -} - - - -static void -EventLoop(void) -{ - XEvent event; - while (1) { - if (XPending(Dpy) > 0) { - XNextEvent( Dpy, &event ); - switch (event.type) { - case Expose: - Redraw(); - break; - case ConfigureNotify: - Resize(event.xany.window, event.xconfigure.width, event.xconfigure.height); - break; - case KeyPress: - { - char buf[100]; - KeySym keySym; - XComposeStatus stat; - XLookupString(&event.xkey, buf, sizeof(buf), &keySym, &stat); - if (keySym == XK_Escape) { - /* exit */ - return; - } - else if (buf[0] == 'f') { - DrawFront = !DrawFront; - printf("Drawing to %s buffer\n", - DrawFront ? "GL_FRONT" : "GL_BACK"); - } - } - break; - default: - /*no-op*/ ; - } - } - else { - /* animate */ - Redraw(); - } - } -} - - -static void -Init(void) -{ - XVisualInfo *visinfo; - int attrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - None }; - int major, minor; - - Dpy = XOpenDisplay(NULL); - if (!Dpy) { - printf("Couldn't open default display!\n"); - exit(1); - } - - ScrNum = DefaultScreen(Dpy); - - glXQueryVersion(Dpy, &major, &minor); - - if (major * 100 + minor >= 103) { - make_context_current = (PFNGLXMAKECURRENTREADSGIPROC) - glXGetProcAddressARB( (GLubyte *) "glXMakeContextCurrent" ); - } - else { - const char * const glxExtensions = glXQueryExtensionsString(Dpy, ScrNum); - const char * ext = strstr( glxExtensions, "GLX_SGI_make_current_read" ); - const size_t len = strlen( "GLX_SGI_make_current_read" ); - - if ( (ext != NULL) - && ((ext[len] == ' ') || (ext[len] == '\0')) ) { - make_context_current = (PFNGLXMAKECURRENTREADSGIPROC) - glXGetProcAddressARB( (GLubyte *) "glXMakeCurrentReadSGI" ); - } - } - - if (make_context_current == NULL) { - fprintf(stderr, "Sorry, this program requires either GLX 1.3 " - "or GLX_SGI_make_current_read.\n"); - exit(1); - } - - visinfo = glXChooseVisual(Dpy, ScrNum, attrib); - if (!visinfo) { - printf("Unable to find RGB, double-buffered visual\n"); - exit(1); - } - - Context = glXCreateContext(Dpy, visinfo, NULL, True); - if (!Context) { - printf("Couldn't create GLX context\n"); - exit(1); - } - - - Win[0] = CreateWindow(Dpy, ScrNum, visinfo, - 0, 0, 300, 300, "source window"); - - Win[1] = CreateWindow(Dpy, ScrNum, visinfo, - 350, 0, 300, 300, "dest window"); - - printf("Press Esc to exit\n"); - printf("Press 'f' to toggle front/back buffer drawing\n"); -} - - -int -main(int argc, char *argv[]) -{ - Init(); - EventLoop(); - return 0; -} - - -#else - - -int -main(int argc, char *argv[]) -{ - printf("This program requires GLX 1.3!\n"); - return 0; -} - - -#endif /* GLX_VERSION_1_3 */ diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/xdemo.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/xdemo.c deleted file mode 100644 index 52039cb642..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/xdemo.c +++ /dev/null @@ -1,334 +0,0 @@ - -/* - * Very simple demo of how to use the Mesa/X11 interface instead of the - * glx, tk or aux toolkits. I highly recommend using the GLX interface - * instead of the X/Mesa interface, however. - * - * This program is in the public domain. - * - * Brian Paul - */ - -#include -#include -#include -#include -#include -#include "GL/xmesa.h" -#include "GL/gl.h" - - - -static GLint Black, Red, Green, Blue; - - - -static void make_window( char *title, int color_flag ) -{ - int x = 10, y = 10, width = 400, height = 300; - Display *dpy; - int scr; - Window root, win; - Colormap cmap; - XColor xcolor; - int attr_flags; - XVisualInfo *visinfo; - XSetWindowAttributes attr; - XTextProperty tp; - XSizeHints sh; - XEvent e; - XMesaContext context; - XMesaVisual visual; - XMesaBuffer buffer; - - - /* - * Do the usual X things to make a window. - */ - - dpy = XOpenDisplay(NULL); - if (!dpy) { - printf("Couldn't open default display!\n"); - exit(1); - } - - scr = DefaultScreen(dpy); - root = RootWindow(dpy, scr); - - /* alloc visinfo struct */ - visinfo = (XVisualInfo *) malloc( sizeof(XVisualInfo) ); - - /* Get a visual and colormap */ - if (color_flag) { - /* Open TrueColor window */ - -/* - if (!XMatchVisualInfo( dpy, scr, 24, TrueColor, visinfo )) { - printf("Couldn't get 24-bit TrueColor visual!\n"); - exit(1); - } -*/ - if (!XMatchVisualInfo( dpy, scr, 8, PseudoColor, visinfo )) { - printf("Couldn't get 8-bit PseudoColor visual!\n"); - exit(1); - } - - cmap = XCreateColormap( dpy, root, visinfo->visual, AllocNone ); - Black = Red = Green = Blue = 0; - } - else { - /* Open color index window */ - - if (!XMatchVisualInfo( dpy, scr, 8, PseudoColor, visinfo )) { - printf("Couldn't get 8-bit PseudoColor visual\n"); - exit(1); - } - - cmap = XCreateColormap( dpy, root, visinfo->visual, AllocNone ); - - /* Allocate colors */ - xcolor.red = 0x0; - xcolor.green = 0x0; - xcolor.blue = 0x0; - xcolor.flags = DoRed | DoGreen | DoBlue; - if (!XAllocColor( dpy, cmap, &xcolor )) { - printf("Couldn't allocate black!\n"); - exit(1); - } - Black = xcolor.pixel; - - xcolor.red = 0xffff; - xcolor.green = 0x0; - xcolor.blue = 0x0; - xcolor.flags = DoRed | DoGreen | DoBlue; - if (!XAllocColor( dpy, cmap, &xcolor )) { - printf("Couldn't allocate red!\n"); - exit(1); - } - Red = xcolor.pixel; - - xcolor.red = 0x0; - xcolor.green = 0xffff; - xcolor.blue = 0x0; - xcolor.flags = DoRed | DoGreen | DoBlue; - if (!XAllocColor( dpy, cmap, &xcolor )) { - printf("Couldn't allocate green!\n"); - exit(1); - } - Green = xcolor.pixel; - - xcolor.red = 0x0; - xcolor.green = 0x0; - xcolor.blue = 0xffff; - xcolor.flags = DoRed | DoGreen | DoBlue; - if (!XAllocColor( dpy, cmap, &xcolor )) { - printf("Couldn't allocate blue!\n"); - exit(1); - } - Blue = xcolor.pixel; - } - - /* set window attributes */ - attr.colormap = cmap; - attr.event_mask = ExposureMask | StructureNotifyMask; - attr.border_pixel = BlackPixel( dpy, scr ); - attr.background_pixel = BlackPixel( dpy, scr ); - attr_flags = CWColormap | CWEventMask | CWBorderPixel | CWBackPixel; - - /* Create the window */ - win = XCreateWindow( dpy, root, x,y, width, height, 0, - visinfo->depth, InputOutput, - visinfo->visual, - attr_flags, &attr); - if (!win) { - printf("Couldn't open window!\n"); - exit(1); - } - - XStringListToTextProperty(&title, 1, &tp); - sh.flags = USPosition | USSize; - XSetWMProperties(dpy, win, &tp, &tp, 0, 0, &sh, 0, 0); - XMapWindow(dpy, win); - while (1) { - XNextEvent( dpy, &e ); - if (e.type == MapNotify && e.xmap.window == win) { - break; - } - } - - - /* - * Now do the special Mesa/Xlib stuff! - */ - - visual = XMesaCreateVisual( dpy, visinfo, - (GLboolean) color_flag, - GL_FALSE, /* alpha_flag */ - GL_FALSE, /* db_flag */ - GL_FALSE, /* stereo flag */ - GL_FALSE, /* ximage_flag */ - 0, /* depth size */ - 0, /* stencil size */ - 0,0,0,0, /* accum_size */ - 0, /* num samples */ - 0, /* level */ - 0 /* caveat */ - ); - if (!visual) { - printf("Couldn't create Mesa/X visual!\n"); - exit(1); - } - - /* Create a Mesa rendering context */ - context = XMesaCreateContext( visual, - NULL /* share_list */ - ); - if (!context) { - printf("Couldn't create Mesa/X context!\n"); - exit(1); - } - - buffer = XMesaCreateWindowBuffer( visual, win ); - if (!buffer) { - printf("Couldn't create Mesa/X buffer!\n"); - exit(1); - } - - - XMesaMakeCurrent( context, buffer ); - - /* Ready to render! */ -} - - - -static void draw_cube( void ) -{ - /* X faces */ - glIndexi( Red ); - glColor3f( 1.0, 0.0, 0.0 ); - glBegin( GL_POLYGON ); - glVertex3f( 1.0, 1.0, 1.0 ); - glVertex3f( 1.0, -1.0, 1.0 ); - glVertex3f( 1.0, -1.0, -1.0 ); - glVertex3f( 1.0, 1.0, -1.0 ); - glEnd(); - - glBegin( GL_POLYGON ); - glVertex3f( -1.0, 1.0, 1.0 ); - glVertex3f( -1.0, 1.0, -1.0 ); - glVertex3f( -1.0, -1.0, -1.0 ); - glVertex3f( -1.0, -1.0, 1.0 ); - glEnd(); - - /* Y faces */ - glIndexi( Green ); - glColor3f( 0.0, 1.0, 0.0 ); - glBegin( GL_POLYGON ); - glVertex3f( 1.0, 1.0, 1.0 ); - glVertex3f( 1.0, 1.0, -1.0 ); - glVertex3f( -1.0, 1.0, -1.0 ); - glVertex3f( -1.0, 1.0, 1.0 ); - glEnd(); - - glBegin( GL_POLYGON ); - glVertex3f( 1.0, -1.0, 1.0 ); - glVertex3f( -1.0, -1.0, 1.0 ); - glVertex3f( -1.0, -1.0, -1.0 ); - glVertex3f( 1.0, -1.0, -1.0 ); - glEnd(); - - /* Z faces */ - glIndexi( Blue ); - glColor3f( 0.0, 0.0, 1.0 ); - glBegin( GL_POLYGON ); - glVertex3f( 1.0, 1.0, 1.0 ); - glVertex3f( -1.0, 1.0, 1.0 ); - glVertex3f( -1.0, -1.0, 1.0 ); - glVertex3f( 1.0, -1.0, 1.0 ); - glEnd(); - - glBegin( GL_POLYGON ); - glVertex3f( 1.0, 1.0, -1.0 ); - glVertex3f( 1.0,-1.0, -1.0 ); - glVertex3f( -1.0,-1.0, -1.0 ); - glVertex3f( -1.0, 1.0, -1.0 ); - glEnd(); -} - - - - -static void display_loop( void ) -{ - GLfloat xrot, yrot, zrot; - - xrot = yrot = zrot = 0.0; - - glClearColor( 0.0, 0.0, 0.0, 0.0 ); - glClearIndex( Black ); - - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 1.0, 10.0 ); - glTranslatef( 0.0, 0.0, -5.0 ); - - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - - glCullFace( GL_BACK ); - glEnable( GL_CULL_FACE ); - - glShadeModel( GL_FLAT ); - - while (1) { - glClear( GL_COLOR_BUFFER_BIT ); - glPushMatrix(); - glRotatef( xrot, 1.0, 0.0, 0.0 ); - glRotatef( yrot, 0.0, 1.0, 0.0 ); - glRotatef( zrot, 0.0, 0.0, 1.0 ); - - draw_cube(); - - glPopMatrix(); - glFinish(); - - xrot += 10.0; - yrot += 7.0; - zrot -= 3.0; - } - -} - - - - -int main( int argc, char *argv[] ) -{ - int mode = 0; - - if (argc >= 2) - { - if (strcmp(argv[1],"-ci")==0) - mode = 0; - else if (strcmp(argv[1],"-rgb")==0) - mode = 1; - else - { - printf("Bad flag: %s\n", argv[1]); - printf("Specify -ci for 8-bit color index or -rgb for RGB mode\n"); - exit(1); - } - } - else - { - printf("Specify -ci for 8-bit color index or -rgb for RGB mode\n"); - printf("Defaulting to 8-bit color index\n"); - } - - make_window( argv[0], mode ); - - display_loop(); - return 0; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/xfont.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/xfont.c deleted file mode 100644 index 2585aa6447..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/xfont.c +++ /dev/null @@ -1,206 +0,0 @@ - -/* - * Mesa 3-D graphics library - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * Example of using glXUseXFont(). - * 5 November 1999 - * Brian Paul - */ - - -#include -#include -#include -#include -#include - - -static const char *ProgramName = "xfont"; - -static const char *FontName = "fixed"; - -static GLuint FontBase = 0; - - - -static void redraw( Display *dpy, Window w ) -{ - static const char *text = "This is glXUseXFont()"; - - glClear( GL_COLOR_BUFFER_BIT ); - - /* triangle */ - glColor3f( 0.2, 0.2, 1.0 ); - glBegin(GL_TRIANGLES); - glVertex2f( 0, 0.8 ); - glVertex2f( -0.8, -0.7 ); - glVertex2f( 0.8, -0.7 ); - glEnd(); - - /* text */ - glColor3f( 1, 1, 1 ); - glRasterPos2f(-0.8, 0); - glListBase(FontBase); - glCallLists(strlen(text), GL_UNSIGNED_BYTE, (GLubyte *) text); - - glXSwapBuffers( dpy, w ); -} - - - -static void resize( unsigned int width, unsigned int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 ); -} - - - -static void setup_font( Display *dpy ) -{ - XFontStruct *fontInfo; - Font id; - unsigned int first, last; - - fontInfo = XLoadQueryFont(dpy, FontName); - if (!fontInfo) { - printf("Error: font %s not found\n", FontName); - exit(0); - } - - id = fontInfo->fid; - first = fontInfo->min_char_or_byte2; - last = fontInfo->max_char_or_byte2; - - FontBase = glGenLists((GLuint) last + 1); - if (!FontBase) { - printf("Error: unable to allocate display lists\n"); - exit(0); - } - glXUseXFont(id, first, last - first + 1, FontBase + first); -} - -static Window make_rgb_db_window( Display *dpy, int xpos, int ypos, - unsigned int width, unsigned int height ) -{ - int attrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - Window win; - GLXContext ctx; - XVisualInfo *visinfo; - - scrnum = DefaultScreen( dpy ); - root = RootWindow( dpy, scrnum ); - - visinfo = glXChooseVisual( dpy, scrnum, attrib ); - if (!visinfo) { - printf("Error: couldn't get an RGB, Double-buffered visual\n"); - exit(1); - } - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow( dpy, root, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr ); - - { - XSizeHints sizehints; - sizehints.x = xpos; - sizehints.y = ypos; - sizehints.width = width; - sizehints.height = height; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win, &sizehints); - XSetStandardProperties(dpy, win, ProgramName, ProgramName, - None, (char **)NULL, 0, &sizehints); - } - - - ctx = glXCreateContext( dpy, visinfo, NULL, True ); - - glXMakeCurrent( dpy, win, ctx ); - - return win; -} - - -static void event_loop( Display *dpy ) -{ - XEvent event; - - while (1) { - XNextEvent( dpy, &event ); - - switch (event.type) { - case Expose: - redraw( dpy, event.xany.window ); - break; - case ConfigureNotify: - resize( event.xconfigure.width, event.xconfigure.height ); - break; - case KeyPress: - exit(0); - default: - ; /* no-op */ - } - } -} - - - -int main( int argc, char *argv[] ) -{ - Display *dpy; - Window win; - - dpy = XOpenDisplay(NULL); - - win = make_rgb_db_window( dpy, 0, 0, 300, 300 ); - setup_font( dpy ); - - glShadeModel( GL_FLAT ); - glClearColor( 0.5, 0.5, 1.0, 1.0 ); - - XMapWindow( dpy, win ); - - event_loop( dpy ); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/xrotfontdemo.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/xrotfontdemo.c deleted file mode 100644 index 58cd0286cc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/xrotfontdemo.c +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Mesa 3-D graphics library - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * Example of using glXUseRotatedXFontMESA(). - * 24 Jan 2004 - * Brian Paul - */ - - -#include -#include -#include -#include -#include -#include "xuserotfont.h" - - -static const char *ProgramName = "xfont"; - -static const char *FontName = "fixed"; - -static GLuint FontBase[4]; - - -static void redraw( Display *dpy, Window w ) -{ - static const char *text = " Rotated bitmap text"; - int i; - - glClear( GL_COLOR_BUFFER_BIT ); - - /* triangle */ - glColor3f( 0.2, 0.2, 1.0 ); - glBegin(GL_TRIANGLES); - glVertex2f( -0.8, 0.7 ); - glVertex2f( -0.8, -0.7 ); - glVertex2f( 0.8, 0.0 ); - glEnd(); - - /* marker */ - glColor3f( 0, 1, 0 ); - glBegin(GL_POINTS); - glVertex2f(0, 0); - glEnd(); - - /* text */ - glColor3f( 1, 1, 1 ); - - for (i = 0; i < 4; i++) { - glRasterPos2f(0, 0); - glListBase(FontBase[i]); - glCallLists(strlen(text), GL_UNSIGNED_BYTE, (GLubyte *) text); - } - - glXSwapBuffers( dpy, w ); -} - - - -static void resize( unsigned int width, unsigned int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 ); -} - - - -static void setup_font( Display *dpy ) -{ - XFontStruct *fontInfo; - Font id; - unsigned int first, last; - int i; - - fontInfo = XLoadQueryFont(dpy, FontName); - if (!fontInfo) { - printf("Error: font %s not found\n", FontName); - exit(0); - } - - id = fontInfo->fid; - first = fontInfo->min_char_or_byte2; - last = fontInfo->max_char_or_byte2; - - for (i = 0; i < 4; i++) { - FontBase[i] = glGenLists((GLuint) last + 1); - if (!FontBase[i]) { - printf("Error: unable to allocate display lists\n"); - exit(0); - } - glXUseRotatedXFontMESA(id, first, last - first + 1, FontBase[i] + first, - i * 90); - } -} - - -static Window make_rgb_db_window( Display *dpy, int xpos, int ypos, - unsigned int width, unsigned int height ) -{ - int attrib[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - Window win; - GLXContext ctx; - XVisualInfo *visinfo; - - scrnum = DefaultScreen( dpy ); - root = RootWindow( dpy, scrnum ); - - visinfo = glXChooseVisual( dpy, scrnum, attrib ); - if (!visinfo) { - printf("Error: couldn't get an RGB, Double-buffered visual\n"); - exit(1); - } - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow( dpy, root, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr ); - - { - XSizeHints sizehints; - sizehints.x = xpos; - sizehints.y = ypos; - sizehints.width = width; - sizehints.height = height; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win, &sizehints); - XSetStandardProperties(dpy, win, ProgramName, ProgramName, - None, (char **)NULL, 0, &sizehints); - } - - - ctx = glXCreateContext( dpy, visinfo, NULL, True ); - - glXMakeCurrent( dpy, win, ctx ); - - return win; -} - - -static void event_loop( Display *dpy ) -{ - XEvent event; - - while (1) { - XNextEvent( dpy, &event ); - - switch (event.type) { - case Expose: - redraw( dpy, event.xany.window ); - break; - case ConfigureNotify: - resize( event.xconfigure.width, event.xconfigure.height ); - break; - case KeyPress: - exit(0); - default: - ; /* no-op */ - } - } -} - - - -int main( int argc, char *argv[] ) -{ - Display *dpy; - Window win; - - dpy = XOpenDisplay(NULL); - - win = make_rgb_db_window( dpy, 0, 0, 300, 300 ); - setup_font( dpy ); - - glShadeModel( GL_FLAT ); - glClearColor( 0.5, 0.5, 1.0, 1.0 ); - - XMapWindow( dpy, win ); - - event_loop( dpy ); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/xuserotfont.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/xuserotfont.c deleted file mode 100644 index adb849511d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/xuserotfont.c +++ /dev/null @@ -1,399 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.1 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* \file xuserotfont.c - * - * A function like glXUseXFont() but takes a 0, 90, 180 or 270 degree - * rotation angle for rotated text display. - * - * Based on Mesa's glXUseXFont implementation written by Thorsten Ohl. - */ - -#include -#include -#include -#include -#include "xuserotfont.h" - - -/** - * Generate OpenGL-compatible bitmap by drawing an X character glyph - * to an off-screen pixmap, then getting the image and testing pixels. - * \param width bitmap width in pixels - * \param height bitmap height in pixels - */ -static void -fill_bitmap(Display *dpy, Pixmap pixmap, GC gc, - unsigned int bitmapWidth, unsigned int bitmapHeight, - unsigned int charWidth, unsigned int charHeight, - int xPos, int yPos, unsigned int c, GLubyte * bitmap, - int rotation) -{ - const int bytesPerRow = (bitmapWidth + 7) / 8; - XImage *image; - XChar2b char2b; - - /* clear pixmap to 0 */ - XSetForeground(dpy, gc, 0); - XFillRectangle(dpy, pixmap, gc, 0, 0, charWidth, charHeight); - - /* The glyph is drawn snug up against the left/top edges of the pixmap */ - XSetForeground(dpy, gc, 1); - char2b.byte1 = (c >> 8) & 0xff; - char2b.byte2 = (c & 0xff); - XDrawString16(dpy, pixmap, gc, xPos, yPos, &char2b, 1); - - /* initialize GL bitmap */ - memset(bitmap, 0, bytesPerRow * bitmapHeight); - - image = XGetImage(dpy, pixmap, 0, 0, charWidth, charHeight, 1, XYPixmap); - if (image) { - /* Set appropriate bits in the GL bitmap. - * Note: X11 and OpenGL are upside down wrt each other). - */ - unsigned int x, y; - if (rotation == 0) { - for (y = 0; y < charHeight; y++) { - for (x = 0; x < charWidth; x++) { - if (XGetPixel(image, x, y)) { - int y2 = bitmapHeight - y - 1; - bitmap[bytesPerRow * y2 + x / 8] |= (1 << (7 - (x % 8))); - } - } - } - } - else if (rotation == 90) { - for (y = 0; y < charHeight; y++) { - for (x = 0; x < charWidth; x++) { - if (XGetPixel(image, x, y)) { - int x2 = y; - int y2 = x; - bitmap[bytesPerRow * y2 + x2 / 8] |= (1 << (7 - (x2 % 8))); - } - } - } - } - else if (rotation == 180) { - for (y = 0; y < charHeight; y++) { - for (x = 0; x < charWidth; x++) { - if (XGetPixel(image, x, y)) { - int x2 = charWidth - x - 1; - bitmap[bytesPerRow * y + x2 / 8] |= (1 << (7 - (x2 % 8))); - } - } - } - } - else { - assert(rotation == 270); - for (y = 0; y < charHeight; y++) { - for (x = 0; x < charWidth; x++) { - if (XGetPixel(image, x, y)) { - int x2 = charHeight - y - 1; - int y2 = charWidth - x - 1; - bitmap[bytesPerRow * y2 + x2 / 8] |= (1 << (7 - (x2 % 8))); - } - } - } - } - XDestroyImage(image); - } -} - - -/* - * Determine if a given glyph is valid and return the - * corresponding XCharStruct. - */ -static const XCharStruct * -isvalid(const XFontStruct * fs, unsigned int which) -{ - unsigned int rows, pages; - unsigned int byte1 = 0, byte2 = 0; - int i, valid = 1; - - rows = fs->max_byte1 - fs->min_byte1 + 1; - pages = fs->max_char_or_byte2 - fs->min_char_or_byte2 + 1; - - if (rows == 1) { - /* "linear" fonts */ - if ((fs->min_char_or_byte2 > which) || (fs->max_char_or_byte2 < which)) - valid = 0; - } - else { - /* "matrix" fonts */ - byte2 = which & 0xff; - byte1 = which >> 8; - if ((fs->min_char_or_byte2 > byte2) || - (fs->max_char_or_byte2 < byte2) || - (fs->min_byte1 > byte1) || (fs->max_byte1 < byte1)) - valid = 0; - } - - if (valid) { - if (fs->per_char) { - if (rows == 1) { - /* "linear" fonts */ - return fs->per_char + (which - fs->min_char_or_byte2); - } - else { - /* "matrix" fonts */ - i = ((byte1 - fs->min_byte1) * pages) + - (byte2 - fs->min_char_or_byte2); - return fs->per_char + i; - } - } - else { - return &fs->min_bounds; - } - } - return NULL; -} - - -void -glXUseRotatedXFontMESA(Font font, int first, int count, int listbase, - int rotation) -{ - Display *dpy; - Window win; - Pixmap pixmap; - GC gc; - XFontStruct *fs; - GLint swapbytes, lsbfirst, rowlength; - GLint skiprows, skippixels, alignment; - unsigned int maxCharWidth, maxCharHeight; - GLubyte *bm; - int i; - - if (rotation != 0 && - rotation != 90 && - rotation != 180 && - rotation != 270) - return; - - dpy = glXGetCurrentDisplay(); - if (!dpy) - return; /* I guess glXMakeCurrent wasn't called */ - win = RootWindow(dpy, DefaultScreen(dpy)); - - fs = XQueryFont(dpy, font); - if (!fs) { - /* - _mesa_error(NULL, GL_INVALID_VALUE, - "Couldn't get font structure information"); - */ - return; - } - - /* Allocate a GL bitmap that can fit any character */ - maxCharWidth = fs->max_bounds.rbearing - fs->min_bounds.lbearing; - maxCharHeight = fs->max_bounds.ascent + fs->max_bounds.descent; - /* use max, in case we're rotating */ - if (rotation == 90 || rotation == 270) { - /* swap width/height */ - bm = (GLubyte *) malloc((maxCharHeight + 7) / 8 * maxCharWidth); - } - else { - /* normal or upside down */ - bm = (GLubyte *) malloc((maxCharWidth + 7) / 8 * maxCharHeight); - } - if (!bm) { - XFreeFontInfo(NULL, fs, 1); - /* - _mesa_error(NULL, GL_OUT_OF_MEMORY, - "Couldn't allocate bitmap in glXUseXFont()"); - */ - return; - } - -#if 0 - /* get the page info */ - pages = fs->max_char_or_byte2 - fs->min_char_or_byte2 + 1; - firstchar = (fs->min_byte1 << 8) + fs->min_char_or_byte2; - lastchar = (fs->max_byte1 << 8) + fs->max_char_or_byte2; - rows = fs->max_byte1 - fs->min_byte1 + 1; - unsigned int first_char, last_char, pages, rows; -#endif - - /* Save the current packing mode for bitmaps. */ - glGetIntegerv(GL_UNPACK_SWAP_BYTES, &swapbytes); - glGetIntegerv(GL_UNPACK_LSB_FIRST, &lsbfirst); - glGetIntegerv(GL_UNPACK_ROW_LENGTH, &rowlength); - glGetIntegerv(GL_UNPACK_SKIP_ROWS, &skiprows); - glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &skippixels); - glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment); - - /* Enforce a standard packing mode which is compatible with - fill_bitmap() from above. This is actually the default mode, - except for the (non)alignment. */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); - glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE); - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - /* Create pixmap and GC */ - pixmap = XCreatePixmap(dpy, win, maxCharWidth, maxCharHeight, 1); - { - XGCValues values; - unsigned long valuemask; - values.foreground = BlackPixel(dpy, DefaultScreen(dpy)); - values.background = WhitePixel(dpy, DefaultScreen(dpy)); - values.font = fs->fid; - valuemask = GCForeground | GCBackground | GCFont; - gc = XCreateGC(dpy, pixmap, valuemask, &values); - } - -#ifdef DEBUG_XROT - if (debug_xfonts) - dump_font_struct(fs); -#endif - - for (i = 0; i < count; i++) { - const unsigned int c = first + i; - const int list = listbase + i; - unsigned int charWidth, charHeight; - unsigned int bitmapWidth = 0, bitmapHeight = 0; - GLfloat xOrig, yOrig, xStep, yStep, dtemp; - const XCharStruct *ch; - int xPos, yPos; - int valid; - - /* check on index validity and get the bounds */ - ch = isvalid(fs, c); - if (!ch) { - ch = &fs->max_bounds; - valid = 0; - } - else { - valid = 1; - } - -#ifdef DEBUG_XROT - if (debug_xfonts) { - char s[7]; - sprintf(s, isprint(c) ? "%c> " : "\\%03o> ", c); - dump_char_struct(ch, s); - } -#endif - - /* glBitmap()' parameters: - straight from the glXUseXFont(3) manpage. */ - charWidth = ch->rbearing - ch->lbearing; - charHeight = ch->ascent + ch->descent; - xOrig = -ch->lbearing; - yOrig = ch->descent; - xStep = ch->width; - yStep = 0; - - /* X11's starting point. */ - xPos = -ch->lbearing; - yPos = ch->ascent; - - /* Apply rotation */ - switch (rotation) { - case 0: - /* nothing */ - bitmapWidth = charWidth; - bitmapHeight = charHeight; - break; - case 90: - /* xStep, yStep */ - dtemp = xStep; - xStep = -yStep; - yStep = dtemp; - /* xOrig, yOrig */ - yOrig = xOrig; - xOrig = charHeight - (charHeight - yPos); - /* width, height */ - bitmapWidth = charHeight; - bitmapHeight = charWidth; - break; - case 180: - /* xStep, yStep */ - xStep = -xStep; - yStep = -yStep; - /* xOrig, yOrig */ - xOrig = charWidth - xOrig - 1; - yOrig = charHeight - yOrig - 1; - bitmapWidth = charWidth; - bitmapHeight = charHeight; - break; - case 270: - /* xStep, yStep */ - dtemp = xStep; - xStep = yStep; - yStep = -dtemp; - /* xOrig, yOrig */ - dtemp = yOrig; - yOrig = charWidth - xOrig; - xOrig = dtemp; - /* width, height */ - bitmapWidth = charHeight; - bitmapHeight = charWidth; - break; - default: - /* should never get here */ - ; - } - - glNewList(list, GL_COMPILE); - if (valid && bitmapWidth > 0 && bitmapHeight > 0) { - - fill_bitmap(dpy, pixmap, gc, bitmapWidth, bitmapHeight, - charWidth, charHeight, - xPos, yPos, c, bm, rotation); - - glBitmap(bitmapWidth, bitmapHeight, xOrig, yOrig, xStep, yStep, bm); - -#ifdef DEBUG_XROT - if (debug_xfonts) { - printf("width/height = %u/%u\n", bitmapWidth, bitmapHeight); - dump_bitmap(bitmapWidth, bitmapHeight, bm); - } -#endif - } - else { - glBitmap(0, 0, 0.0, 0.0, xStep, yStep, NULL); - } - glEndList(); - } - - free(bm); - XFreeFontInfo(NULL, fs, 1); - XFreePixmap(dpy, pixmap); - XFreeGC(dpy, gc); - - /* Restore saved packing modes. */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, swapbytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, lsbfirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, rowlength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, skiprows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, skippixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, alignment); -} - - diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/xuserotfont.h b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/xuserotfont.h deleted file mode 100644 index ea49203b7b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/xuserotfont.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef XUSEROTFONT_H -#define XUSEROTFONT_H - -#include - - -extern void -glXUseRotatedXFontMESA(Font font, int first, int count, int listbase, - int rotation); - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/yuvrect_client.c b/nx-X11/extras/Mesa_6.4.2/progs/xdemos/yuvrect_client.c deleted file mode 100644 index 48f82cb759..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/progs/xdemos/yuvrect_client.c +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Test the GL_NV_texture_rectangle and GL_MESA_ycrcb_texture extensions and GLX_MESA_allocate-memory - * - * Dave Airlie - Feb 2005 - */ - -#include -#include -#include -#include -#include -#include -#include -#define GL_GLEXT_PROTOTYPES -#include - -#include "../util/readtex.c" /* I know, this is a hack. */ - -#define TEXTURE_FILE "../images/girl2.rgb" - -static GLfloat Xrot = 0, Yrot = 0, Zrot = 0; -static GLint ImgWidth, ImgHeight; -static GLushort *ImageYUV = NULL; -static void *glx_memory; - -static void DrawObject(void) -{ - glBegin(GL_QUADS); - - glTexCoord2f(0, 0); - glVertex2f(-1.0, -1.0); - - glTexCoord2f(ImgWidth, 0); - glVertex2f(1.0, -1.0); - - glTexCoord2f(ImgWidth, ImgHeight); - glVertex2f(1.0, 1.0); - - glTexCoord2f(0, ImgHeight); - glVertex2f(-1.0, 1.0); - - glEnd(); -} - - -static void scr_Display( void ) -{ - glClear( GL_COLOR_BUFFER_BIT ); - - glPushMatrix(); - glRotatef(Xrot, 1.0, 0.0, 0.0); - glRotatef(Yrot, 0.0, 1.0, 0.0); - glRotatef(Zrot, 0.0, 0.0, 1.0); - DrawObject(); - glPopMatrix(); - -} - - -static void Reshape( int width, int height ) -{ - glViewport( 0, 0, width, height ); - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 10.0, 100.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0, 0.0, -15.0 ); -} - -static int queryClient(Display *dpy, int screen) -{ -#ifdef GLX_MESA_allocate_memory - char *extensions; - - extensions = (char *)glXQueryExtensionsString(dpy, screen); - if (!extensions || !strstr(extensions,"GLX_MESA_allocate_memory")) { - return 0; - } - - return 1; -#else - return 0; -#endif -} - -static int -query_extension(char* extName) { - char *p = (char *) glGetString(GL_EXTENSIONS); - char *end = p + strlen(p); - while (p < end) { - int n = strcspn(p, " "); - if ((strlen(extName) == n) && (strncmp(extName, p, n) == 0)) - return GL_TRUE; - p += (n + 1); - } - return GL_FALSE; -} - -static void Init( int argc, char *argv[] , Display *dpy, int screen, Window win) -{ - GLuint texObj = 100; - const char *file; - void *glx_memory; - - if (!query_extension("GL_NV_texture_rectangle")) { - printf("Sorry, GL_NV_texture_rectangle is required\n"); - exit(0); - } - - if (!query_extension("GL_MESA_ycbcr_texture")) { - printf("Sorry, GL_MESA_ycbcr_texture is required\n"); - exit(0); - } - - if (!queryClient(dpy, screen)) { - printf("Sorry, GLX_MESA_allocate_memory is required\n"); - exit(0); - } - - glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, 1); - glBindTexture(GL_TEXTURE_RECTANGLE_NV, texObj); -#ifdef LINEAR_FILTER - /* linear filtering looks much nicer but is much slower for Mesa */ - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -#else - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER, GL_NEAREST); -#endif - - if (argc > 1) - file = argv[1]; - else - file = TEXTURE_FILE; - - ImageYUV = LoadYUVImage(file, &ImgWidth, &ImgHeight); - if (!ImageYUV) { - printf("Couldn't read %s\n", TEXTURE_FILE); - exit(0); - } - - glx_memory = glXAllocateMemoryMESA(dpy, screen, ImgWidth * ImgHeight * 2, 0, 0 ,0); - if (!glx_memory) - { - fprintf(stderr,"Failed to allocate MESA memory\n"); - exit(-1); - } - - memcpy(glx_memory, ImageYUV, ImgWidth * ImgHeight * 2); - - printf("Image: %dx%d\n", ImgWidth, ImgHeight); - - glTexImage2D(GL_TEXTURE_RECTANGLE_NV, 0, - GL_YCBCR_MESA, ImgWidth, ImgHeight, 0, - GL_YCBCR_MESA, GL_UNSIGNED_SHORT_8_8_APPLE, glx_memory); - - assert(glGetError() == GL_NO_ERROR); - - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - - glEnable(GL_TEXTURE_RECTANGLE_NV); - - glShadeModel(GL_FLAT); - glClearColor(0.3, 0.3, 0.4, 1.0); - -} - -/* - * Create an RGB, double-buffered window. - * Return the window and context handles. - */ -static void -make_window( Display *dpy, const char *name, - int x, int y, int width, int height, - Window *winRet, GLXContext *ctxRet) -{ - int attribs[] = { GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, - GLX_DEPTH_SIZE, 1, - None }; - int scrnum; - XSetWindowAttributes attr; - unsigned long mask; - Window root; - Window win; - GLXContext ctx; - XVisualInfo *visinfo; - - scrnum = DefaultScreen( dpy ); - root = RootWindow( dpy, scrnum ); - - visinfo = glXChooseVisual( dpy, scrnum, attribs ); - if (!visinfo) { - printf("Error: couldn't get an RGB, Double-buffered visual\n"); - exit(1); - } - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; - attr.override_redirect = 0; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask | CWOverrideRedirect; - - win = XCreateWindow( dpy, root, 0, 0, width, height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr ); - - /* set hints and properties */ - { - XSizeHints sizehints; - sizehints.x = x; - sizehints.y = y; - sizehints.width = width; - sizehints.height = height; - sizehints.flags = USSize | USPosition; - XSetNormalHints(dpy, win, &sizehints); - XSetStandardProperties(dpy, win, name, name, - None, (char **)NULL, 0, &sizehints); - } - - ctx = glXCreateContext( dpy, visinfo, NULL, True ); - if (!ctx) { - printf("Error: glXCreateContext failed\n"); - exit(1); - } - - XFree(visinfo); - - *winRet = win; - *ctxRet = ctx; -} - - -static void -event_loop(Display *dpy, Window win) -{ - while (1) { - while (XPending(dpy) > 0) { - XEvent event; - XNextEvent(dpy, &event); - switch (event.type) { - case Expose: - /* we'll redraw below */ - break; - case ConfigureNotify: - Reshape(event.xconfigure.width, event.xconfigure.height); - break; - case KeyPress: - { - char buffer[10]; - int r, code; - code = XLookupKeysym(&event.xkey, 0); - r = XLookupString(&event.xkey, buffer, sizeof(buffer), - NULL, NULL); - if (buffer[0] == 27) { - /* escape */ - return; - - } - } - } - } - - } -} - - -int -main(int argc, char *argv[]) -{ - Display *dpy; - Window win; - GLXContext ctx; - char *dpyName = NULL; - GLboolean printInfo = GL_FALSE; - int i; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-display") == 0) { - dpyName = argv[i+1]; - i++; - } - else if (strcmp(argv[i], "-info") == 0) { - printInfo = GL_TRUE; - } - else - printf("Warrning: unknown parameter: %s\n", argv[i]); - } - - dpy = XOpenDisplay(dpyName); - if (!dpy) { - printf("Error: couldn't open display %s\n", - dpyName ? dpyName : getenv("DISPLAY")); - return -1; - } - - make_window(dpy, "yuvrect_client", 0, 0, 300, 300, &win, &ctx); - XMapWindow(dpy, win); - glXMakeCurrent(dpy, win, ctx); - - if (printInfo) { - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); - printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); - printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); - } - - Init(argc, argv, dpy, DefaultScreen(dpy), win); - - scr_Display(); - glXSwapBuffers(dpy, win); - event_loop(dpy, win); - - glXFreeMemoryMESA(dpy, DefaultScreen(dpy), glx_memory); - glXDestroyContext(dpy, ctx); - XDestroyWindow(dpy, win); - XCloseDisplay(dpy); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/Makefile b/nx-X11/extras/Mesa_6.4.2/src/Makefile deleted file mode 100644 index ffe2dbc6a2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# src/Makefile - -TOP = .. - -include $(TOP)/configs/current - -SUBDIRS = $(SRC_DIRS) - - -default: message $(LIB_DIR) subdirs - - -message: - @echo "Making sources for" $(CONFIG_NAME) - - -subdirs: - @for dir in $(SUBDIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir ; $(MAKE)) || exit 1 ; \ - fi \ - done - - -$(LIB_DIR): - -mkdir $(LIB_DIR) - - -clean: - @for dir in $(SUBDIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir ; $(MAKE) clean) ; \ - fi \ - done diff --git a/nx-X11/extras/Mesa_6.4.2/src/descrip.mms b/nx-X11/extras/Mesa_6.4.2/src/descrip.mms deleted file mode 100644 index 71b8ea16ac..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/descrip.mms +++ /dev/null @@ -1,43 +0,0 @@ -# Makefile for Mesa for VMS -# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl - -.include [-]mms-config. - -all : - set default [.mesa] - $(MMS)$(MMSQUALIFIERS) - set default [-] -.ifdef SHARE - $(MMS)$(MMSQUALIFIERS) [-.lib]$(GL_SHAR) -.endif - set default [.glu] - $(MMS)$(MMSQUALIFIERS) - set default [-.glut.glx] - $(MMS)$(MMSQUALIFIERS) - set default [--] - -[-.lib]$(GL_SHAR) : [-.lib]$(GL_LIB) - @ WRITE_ SYS$OUTPUT " generating libmesa.opt" - @ library/extract=* [-.lib]$(GL_LIB) - @ OPEN_/WRITE FILE libmesa.opt - @ WRITE_ FILE "!" - @ WRITE_ FILE "! libmesa.opt generated by DESCRIP.$(MMS_EXT)" - @ WRITE_ FILE "!" - @ WRITE_ FILE "IDENTIFICATION=""mesa5.1""" - @ WRITE_ FILE "GSMATCH=LEQUAL,5,1 - @ WRITE_ FILE "libmesagl.obj" - @ write_ file "sys$share:decw$xextlibshr/share" - @ write_ file "sys$share:decw$xlibshr/share" - @ write_ file "sys$share:pthread$rtl/share" - @ CLOSE_ FILE - @ $(MMS)$(MMSQUALIFIERS)/ignore=warning mesa_vms - @ WRITE_ SYS$OUTPUT " linking ..." - @ LINK_/NODEB/SHARE=[-.lib]$(GL_SHAR)/MAP=libmesa.map/FULL libmesa.opt/opt,\ - mesa_vms.opt/opt - @ delete libmesagl.obj;* - -mesa_vms : - @ WRITE_ SYS$OUTPUT " generating libmesa.map ..." - @ LINK_/NODEB/NOSHARE/NOEXE/MAP=libmesa.map/FULL libmesa.opt/OPT - @ WRITE_ SYS$OUTPUT " analyzing libmesa.map ..." - @ @[-.vms]analyze_map.com libmesa.map mesa_vms.opt diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/Makefile b/nx-X11/extras/Mesa_6.4.2/src/egl/Makefile deleted file mode 100644 index 931e9d0cb8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# src/egl/Makefile - -TOP = ../.. - -SUBDIRS = main drivers/demo drivers/dri - - -default: subdirs - - -subdirs: - @for dir in $(SUBDIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir ; $(MAKE)) || exit 1 ; \ - fi \ - done - - -clean: - @for dir in $(SUBDIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir ; $(MAKE) clean) ; \ - fi \ - done diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/drivers/demo/Makefile b/nx-X11/extras/Mesa_6.4.2/src/egl/drivers/demo/Makefile deleted file mode 100644 index fd587b79e2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/drivers/demo/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# src/egl/drivers/demo/Makefile - -TOP = ../../../.. -include $(TOP)/configs/current - - -INCLUDE_DIRS = -I$(TOP)/include -I$(TOP)/src/egl/main - - -SOURCES = demo.c - -OBJECTS = $(SOURCES:.c=.o) - - -.c.o: - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ - - - -default: $(LIB_DIR)/demodriver.so - - -$(LIB_DIR)/demodriver.so: $(OBJECTS) - $(TOP)/bin/mklib -o demodriver.so -noprefix \ - -install $(LIB_DIR) $(OBJECTS) - - - -clean: - rm -f *.o - rm -f *.so diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/drivers/demo/demo.c b/nx-X11/extras/Mesa_6.4.2/src/egl/drivers/demo/demo.c deleted file mode 100644 index 4c08ac569f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/drivers/demo/demo.c +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Sample driver: Demo - */ - -#include -#include -#include -#include "eglconfig.h" -#include "eglcontext.h" -#include "egldisplay.h" -#include "egldriver.h" -#include "eglglobals.h" -#include "eglmode.h" -#include "eglscreen.h" -#include "eglsurface.h" - - -/** - * Demo driver-specific driver class derived from _EGLDriver - */ -typedef struct demo_driver -{ - _EGLDriver Base; /* base class/object */ - GLuint DemoStuff; -} DemoDriver; - -#define DEMO_DRIVER(D) ((DemoDriver *) (D)) - - -/** - * Demo driver-specific surface class derived from _EGLSurface - */ -typedef struct demo_surface -{ - _EGLSurface Base; /* base class/object */ - GLuint DemoStuff; -} DemoSurface; - - -/** - * Demo driver-specific context class derived from _EGLContext - */ -typedef struct demo_context -{ - _EGLContext Base; /* base class/object */ - GLuint DemoStuff; -} DemoContext; - - - -static EGLBoolean -demoInitialize(_EGLDriver *drv, EGLDisplay dpy, EGLint *major, EGLint *minor) -{ - _EGLDisplay *disp = _eglLookupDisplay(dpy); - _EGLScreen *scrn; - EGLint i; - - /* Create a screen */ - scrn = calloc(1, sizeof(*scrn)); - _eglAddScreen(disp, scrn); - - /* Create the screen's modes - silly example */ - _eglAddMode(scrn, 1600, 1200, 72 * 1000, "1600x1200-72"); - _eglAddMode(scrn, 1280, 1024, 72 * 1000, "1280x1024-70"); - _eglAddMode(scrn, 1280, 1024, 70 * 1000, "1280x1024-70"); - _eglAddMode(scrn, 1024, 768, 72 * 1000, "1024x768-72"); - - /* Create the display's visual configs - silly example */ - for (i = 0; i < 4; i++) { - _EGLConfig config; - _eglInitConfig(&config, i + 1); - _eglSetConfigAttrib(&config, EGL_RED_SIZE, 8); - _eglSetConfigAttrib(&config, EGL_GREEN_SIZE, 8); - _eglSetConfigAttrib(&config, EGL_BLUE_SIZE, 8); - _eglSetConfigAttrib(&config, EGL_ALPHA_SIZE, 8); - _eglSetConfigAttrib(&config, EGL_BUFFER_SIZE, 32); - if (i & 1) { - _eglSetConfigAttrib(&config, EGL_DEPTH_SIZE, 32); - } - if (i & 2) { - _eglSetConfigAttrib(&config, EGL_STENCIL_SIZE, 8); - } - _eglSetConfigAttrib(&config, EGL_SURFACE_TYPE, - (EGL_WINDOW_BIT | EGL_PIXMAP_BIT | EGL_PBUFFER_BIT)); - _eglAddConfig(disp, &config); - } - - drv->Initialized = EGL_TRUE; - - *major = 1; - *minor = 0; - - return EGL_TRUE; -} - - -static EGLBoolean -demoTerminate(_EGLDriver *drv, EGLDisplay dpy) -{ - /*DemoDriver *demo = DEMO_DRIVER(dpy);*/ - free(drv); - return EGL_TRUE; -} - - -static DemoContext * -LookupDemoContext(EGLContext ctx) -{ - _EGLContext *c = _eglLookupContext(ctx); - return (DemoContext *) c; -} - - -static DemoSurface * -LookupDemoSurface(EGLSurface surf) -{ - _EGLSurface *s = _eglLookupSurface(surf); - return (DemoSurface *) s; -} - - - -static EGLContext -demoCreateContext(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list) -{ - _EGLConfig *conf; - DemoContext *c; - _EGLDisplay *disp = _eglLookupDisplay(dpy); - int i; - - conf = _eglLookupConfig(drv, dpy, config); - if (!conf) { - _eglError(EGL_BAD_CONFIG, "eglCreateContext"); - return EGL_NO_CONTEXT; - } - - for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) { - switch (attrib_list[i]) { - /* no attribs defined for now */ - default: - _eglError(EGL_BAD_ATTRIBUTE, "eglCreateContext"); - return EGL_NO_CONTEXT; - } - } - - c = (DemoContext *) calloc(1, sizeof(DemoContext)); - if (!c) - return EGL_NO_CONTEXT; - - _eglInitContext(&c->Base); - c->Base.Display = disp; - c->Base.Config = conf; - c->Base.DrawSurface = EGL_NO_SURFACE; - c->Base.ReadSurface = EGL_NO_SURFACE; - c->DemoStuff = 1; - printf("demoCreateContext\n"); - - /* generate handle and insert into hash table */ - _eglSaveContext(&c->Base); - assert(c->Base.Handle); - - return c->Base.Handle; -} - - -static EGLSurface -demoCreateWindowSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list) -{ - int i; - for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) { - switch (attrib_list[i]) { - /* no attribs at this time */ - default: - _eglError(EGL_BAD_ATTRIBUTE, "eglCreateWindowSurface"); - return EGL_NO_SURFACE; - } - } - printf("eglCreateWindowSurface()\n"); - /* XXX unfinished */ - - return EGL_NO_SURFACE; -} - - -static EGLSurface -demoCreatePixmapSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list) -{ - _EGLConfig *conf; - EGLint i; - - conf = _eglLookupConfig(drv, dpy, config); - if (!conf) { - _eglError(EGL_BAD_CONFIG, "eglCreatePixmapSurface"); - return EGL_NO_SURFACE; - } - - for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) { - switch (attrib_list[i]) { - /* no attribs at this time */ - default: - _eglError(EGL_BAD_ATTRIBUTE, "eglCreatePixmapSurface"); - return EGL_NO_SURFACE; - } - } - - if (conf->Attrib[EGL_SURFACE_TYPE - FIRST_ATTRIB] == 0) { - _eglError(EGL_BAD_MATCH, "eglCreatePixmapSurface"); - return EGL_NO_SURFACE; - } - - printf("eglCreatePixmapSurface()\n"); - return EGL_NO_SURFACE; -} - - -static EGLSurface -demoCreatePbufferSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, - const EGLint *attrib_list) -{ - DemoSurface *surf = (DemoSurface *) calloc(1, sizeof(DemoSurface)); - if (!surf) - return EGL_NO_SURFACE; - - if (_eglInitPbufferSurface(&surf->Base, drv, dpy, config, attrib_list) - == EGL_NO_SURFACE) { - free(surf); - return EGL_NO_SURFACE; - } - - /* a real driver would allocate the pbuffer memory here */ - - return surf->Base.Handle; -} - - -static EGLBoolean -demoDestroySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface) -{ - DemoSurface *fs = LookupDemoSurface(surface); - _eglRemoveSurface(&fs->Base); - if (fs->Base.IsBound) { - fs->Base.DeletePending = EGL_TRUE; - } - else { - free(fs); - } - return EGL_TRUE; -} - - -static EGLBoolean -demoDestroyContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext context) -{ - DemoContext *fc = LookupDemoContext(context); - _eglRemoveContext(&fc->Base); - if (fc->Base.IsBound) { - fc->Base.DeletePending = EGL_TRUE; - } - else { - free(fc); - } - return EGL_TRUE; -} - - -static EGLBoolean -demoMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext context) -{ - /*DemoDriver *demo = DEMO_DRIVER(dpy);*/ - DemoSurface *readSurf = LookupDemoSurface(read); - DemoSurface *drawSurf = LookupDemoSurface(draw); - DemoContext *ctx = LookupDemoContext(context); - EGLBoolean b; - - b = _eglMakeCurrent(drv, dpy, draw, read, context); - if (!b) - return EGL_FALSE; - - /* XXX this is where we'd do the hardware context switch */ - (void) drawSurf; - (void) readSurf; - (void) ctx; - - printf("eglMakeCurrent()\n"); - return EGL_TRUE; -} - - -/** - * The bootstrap function. Return a new DemoDriver object and - * plug in API functions. - */ -_EGLDriver * -_eglMain(_EGLDisplay *dpy) -{ - DemoDriver *demo; - - demo = (DemoDriver *) calloc(1, sizeof(DemoDriver)); - if (!demo) { - return NULL; - } - - /* First fill in the dispatch table with defaults */ - _eglInitDriverFallbacks(&demo->Base); - /* then plug in our Demo-specific functions */ - demo->Base.Initialize = demoInitialize; - demo->Base.Terminate = demoTerminate; - demo->Base.CreateContext = demoCreateContext; - demo->Base.MakeCurrent = demoMakeCurrent; - demo->Base.CreateWindowSurface = demoCreateWindowSurface; - demo->Base.CreatePixmapSurface = demoCreatePixmapSurface; - demo->Base.CreatePbufferSurface = demoCreatePbufferSurface; - demo->Base.DestroySurface = demoDestroySurface; - demo->Base.DestroyContext = demoDestroyContext; - - /* enable supported extensions */ - demo->Base.MESA_screen_surface = EGL_TRUE; - demo->Base.MESA_copy_context = EGL_TRUE; - - return &demo->Base; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/drivers/dri/Makefile b/nx-X11/extras/Mesa_6.4.2/src/egl/drivers/dri/Makefile deleted file mode 100644 index 6b50959a5a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/drivers/dri/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# src/egl/drivers/dri/Makefile - -TOP = ../../../.. -include $(TOP)/configs/current - - -### Include directories -INCLUDE_DIRS = \ - -I. \ - -I$(DRM_SOURCE_PATH)/shared-core \ - -I$(DRM_SOURCE_PATH)/libdrm \ - -I$(TOP)/include \ - -I$(TOP)/include/GL/internal \ - -I$(TOP)/src/mesa \ - -I$(TOP)/src/mesa/main \ - -I$(TOP)/src/mesa/glapi \ - -I$(TOP)/src/mesa/math \ - -I$(TOP)/src/mesa/transform \ - -I$(TOP)/src/mesa/shader \ - -I$(TOP)/src/mesa/swrast \ - -I$(TOP)/src/mesa/swrast_setup \ - -I$(TOP)/src/egl/main \ - -I$(TOP)/src/mesa/drivers/dri/common - - -HEADERS = egldri.h - -SOURCES = egldri.c \ - $(DRM_SOURCE_PATH)/libdrm/xf86drm.c \ - $(DRM_SOURCE_PATH)/libdrm/xf86drmHash.c \ - $(DRM_SOURCE_PATH)/libdrm/xf86drmRandom.c - -OBJECTS = $(SOURCES:.c=.o) - - -.c.o: - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ - - - -default: depend library Makefile - - -# EGLdri Library -library: $(LIB_DIR)/libEGLdri.so - -$(LIB_DIR)/libEGLdri.so: $(OBJECTS) - $(TOP)/bin/mklib -o EGLdri -major 1 -minor 0 \ - -install $(LIB_DIR) -ldl $(OBJECTS) - - -clean: - rm -f *.o - rm -f *.so - -depend: $(SOURCES) $(HEADERS) - @ echo "running $(MKDEP)" - @ touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \ - $(SOURCES) $(HEADERS) > /dev/null - -include depend -# DO NOT DELETE - diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/drivers/dri/egldri.c b/nx-X11/extras/Mesa_6.4.2/src/egl/drivers/dri/egldri.c deleted file mode 100644 index 2d45127769..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/drivers/dri/egldri.c +++ /dev/null @@ -1,1001 +0,0 @@ -/* - * Generic EGL driver for DRI - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "egldriver.h" -#include "egldisplay.h" -#include "eglcontext.h" -#include "eglconfig.h" -#include "eglsurface.h" -#include "eglscreen.h" -#include "eglglobals.h" -#include "eglmode.h" - -#include "egldri.h" - -const char *sysfs = "/sys/class"; -#define None 0 -static const int empty_attribute_list[1] = { None }; - -/** - * The bootstrap function. Return a new driDriver object and - * plug in API functions. - */ -_EGLDriver * -_eglMain(_EGLDisplay *dpy) -{ - int length; - char path[NAME_MAX]; - struct dirent *dirent; - FILE *file; - DIR *dir; - _EGLDriver *driver = NULL;; - - snprintf(path, sizeof(path), "%s/drm", sysfs); - if (!(dir = opendir(path))) { - printf("EGL - %s DRM devices not found.", path); - return EGL_FALSE; - } - while ((dirent = readdir(dir))) { - - if (strncmp(&dirent->d_name[0], "card", 4) != 0) - continue; - if (strcmp(&dirent->d_name[4], &dpy->Name[1]) != 0) - continue; - - snprintf(path, sizeof(path), "%s/drm/card%s/dri_library_name", sysfs, &dpy->Name[1]); - file = fopen(path, "r"); - fgets(path, sizeof(path), file); - fclose(file); - - if ((length = strlen(path)) > 0) - path[length - 1] = '\0'; /* remove the trailing newline from sysfs */ - strncat(path, "_dri", sizeof(path)); - - driver = _eglOpenDriver(dpy, path); - - break; - } - closedir(dir); - - return driver; -} - - -static EGLContext -_eglDRICreateContext(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list) -{ - _EGLConfig *conf; - driContext *c; - driDisplay *disp = Lookup_driDisplay(dpy); - driContext *share = Lookup_driContext(share_list); - void *sharePriv; - __GLcontextModes mode; - int i; - - conf = _eglLookupConfig(drv, dpy, config); - if (!conf) { - _eglError(EGL_BAD_CONFIG, "eglCreateContext"); - return EGL_NO_CONTEXT; - } - - for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) { - switch (attrib_list[i]) { - /* no attribs defined for now */ - default: - _eglError(EGL_BAD_ATTRIBUTE, "eglCreateContext"); - return EGL_NO_CONTEXT; - } - } - - c = (driContext *) calloc(1, sizeof(*c)); - if (!c) - return EGL_NO_CONTEXT; - - _eglInitContext(&c->Base); - c->Base.Display = &disp->Base; - c->Base.Config = conf; - c->Base.DrawSurface = EGL_NO_SURFACE; - c->Base.ReadSurface = EGL_NO_SURFACE; - - _eglConfigToContextModesRec(conf, &mode); - - if (share) - sharePriv = share->driContext.private; - else - sharePriv = NULL; - - c->driContext.private = disp->driScreen.createNewContext(disp, &mode, - GLX_WINDOW_BIT, sharePriv, &c->driContext); - - if (!c->driContext.private) { - free(c); - return EGL_FALSE; - } - - /* generate handle and insert into hash table */ - _eglSaveContext(&c->Base); - assert(c->Base.Handle); - - return c->Base.Handle; -} - - -static EGLBoolean -_eglDRIMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext context) -{ - driDisplay *disp = Lookup_driDisplay(dpy); - driContext *ctx = Lookup_driContext(context); - EGLBoolean b; - - b = _eglMakeCurrent(drv, dpy, draw, read, context); - if (!b) - return EGL_FALSE; - - if (ctx) { - ctx->driContext.bindContext(disp, 0, read, draw, &ctx->driContext); - } else { -// _mesa_make_current( NULL, NULL, NULL ); - } - return EGL_TRUE; -} - - -static EGLSurface -_eglDRICreateWindowSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list) -{ - int i; - for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) { - switch (attrib_list[i]) { - /* no attribs at this time */ - default: - _eglError(EGL_BAD_ATTRIBUTE, "eglCreateWindowSurface"); - return EGL_NO_SURFACE; - } - } - printf("eglCreateWindowSurface()\n"); - /* XXX unfinished */ - - return EGL_NO_SURFACE; -} - - -static EGLSurface -_eglDRICreatePixmapSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list) -{ - _EGLConfig *conf; - EGLint i; - - conf = _eglLookupConfig(drv, dpy, config); - if (!conf) { - _eglError(EGL_BAD_CONFIG, "eglCreatePixmapSurface"); - return EGL_NO_SURFACE; - } - - for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) { - switch (attrib_list[i]) { - /* no attribs at this time */ - default: - _eglError(EGL_BAD_ATTRIBUTE, "eglCreatePixmapSurface"); - return EGL_NO_SURFACE; - } - } - - if (conf->Attrib[EGL_SURFACE_TYPE - FIRST_ATTRIB] == 0) { - _eglError(EGL_BAD_MATCH, "eglCreatePixmapSurface"); - return EGL_NO_SURFACE; - } - - printf("eglCreatePixmapSurface()\n"); - return EGL_NO_SURFACE; -} - - -static EGLSurface -_eglDRICreatePbufferSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) -{ - driSurface *surf; - - surf = (driSurface *) calloc(1, sizeof(*surf)); - if (!surf) { - return EGL_NO_SURFACE; - } - - if (_eglInitPbufferSurface(&surf->Base, drv, dpy, config, attrib_list) == EGL_NO_SURFACE) { - free(surf); - return EGL_NO_SURFACE; - } - - /* create software-based pbuffer */ - { -// GLcontext *ctx = NULL; /* this _should_ be OK */ - GLvisual vis; - _EGLConfig *conf = _eglLookupConfig(drv, dpy, config); - assert(conf); /* bad config should be caught earlier */ - _eglConfigToContextModesRec(conf, &vis); - -#if 0 - surf->mesa_framebuffer = _mesa_create_framebuffer(&vis); - _mesa_add_soft_renderbuffers(surf->mesa_framebuffer, - GL_TRUE, /* color bufs */ - vis.haveDepthBuffer, - vis.haveStencilBuffer, - vis.haveAccumBuffer, - GL_FALSE, /* alpha */ - GL_FALSE /* aux */ ); - - /* set pbuffer/framebuffer size */ - _mesa_resize_framebuffer(ctx, surf->mesa_framebuffer, - surf->Base.Width, surf->Base.Height); -#endif - } - - return surf->Base.Handle; -} - - -static EGLBoolean -_eglDRIDestroySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface) -{ - driDisplay *disp = Lookup_driDisplay(dpy); - driSurface *fs = Lookup_driSurface(surface); - _eglRemoveSurface(&fs->Base); - - fs->drawable.destroyDrawable(disp, fs->drawable.private); - - if (fs->Base.IsBound) { - fs->Base.DeletePending = EGL_TRUE; - } - else { - free(fs); - } - return EGL_TRUE; -} - - -static EGLBoolean -_eglDRIDestroyContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext context) -{ - driDisplay *disp = Lookup_driDisplay(dpy); - driContext *fc = Lookup_driContext(context); - - _eglRemoveContext(&fc->Base); - - fc->driContext.destroyContext(disp, 0, fc->driContext.private); - - if (fc->Base.IsBound) { - fc->Base.DeletePending = EGL_TRUE; - } else { - free(fc); - } - return EGL_TRUE; -} - - -/** - * Create a drawing surface which can be directly displayed on a screen. - */ -static EGLSurface -_eglDRICreateScreenSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLConfig cfg, - const EGLint *attrib_list) -{ - _EGLConfig *config = _eglLookupConfig(drv, dpy, cfg); - driDisplay *disp = Lookup_driDisplay(dpy); - driSurface *surface; - EGLSurface surf; - GLvisual vis; - - surface = (driSurface *) malloc(sizeof(*surface)); - if (!surface) { - return EGL_NO_SURFACE; - } - - /* init base class, error check, etc. */ - surf = _eglInitScreenSurface(&surface->Base, drv, dpy, cfg, attrib_list); - if (surf == EGL_NO_SURFACE) { - free(surface); - return EGL_NO_SURFACE; - } - - /* convert EGLConfig to GLvisual */ - _eglConfigToContextModesRec(config, &vis); - - /* Create a new drawable */ - if (!disp->driScreen.createNewDrawable(disp, &vis, surf, &surface->drawable, - GLX_WINDOW_BIT, empty_attribute_list)) { - free(surface); - _eglRemoveSurface(&surface->Base); - return EGL_NO_SURFACE; - } - return surf; -} - - -/** - * Show the given surface on the named screen. - * If surface is EGL_NO_SURFACE, disable the screen's output. - */ -EGLBoolean -_eglDRIShowSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, - EGLSurface surface, EGLModeMESA m) -{ - driDisplay *display = Lookup_driDisplay(dpy); - driScreen *scrn = Lookup_driScreen(dpy, screen); - driSurface *surf = Lookup_driSurface(surface); - FILE *file; - char buffer[NAME_MAX]; - _EGLMode *mode = _eglLookupMode(dpy, m); - int width, height, temp; - - _eglQuerySurface(drv, dpy, surface, EGL_WIDTH, &width); - _eglQuerySurface(drv, dpy, surface, EGL_HEIGHT, &height); - - if (!_eglShowSurfaceMESA(drv, dpy, screen, surface, m)) - return EGL_FALSE; - - snprintf(buffer, sizeof(buffer), "%s/graphics/%s/blank", sysfs, scrn->fb); - - file = fopen(buffer, "r+"); - if (!file) { -err: - printf("kernel patch?? chown all fb sysfs attrib to allow write - %s\n", buffer); - _eglError(EGL_BAD_SURFACE, "eglShowSurfaceMESA"); - return EGL_FALSE; - } - snprintf(buffer, sizeof(buffer), "%d", (m == EGL_NO_MODE_MESA ? VESA_POWERDOWN : VESA_VSYNC_SUSPEND)); - fputs(buffer, file); - fclose(file); - - if (m == EGL_NO_MODE_MESA) - return EGL_TRUE; - - snprintf(buffer, sizeof(buffer), "%s/graphics/%s/mode", sysfs, scrn->fb); - - file = fopen(buffer, "r+"); - if (!file) - goto err; - fputs(mode->Name, file); - fclose(file); - - snprintf(buffer, sizeof(buffer), "%s/graphics/%s/bits_per_pixel", sysfs, scrn->fb); - - file = fopen(buffer, "r+"); - if (!file) - goto err; - display->bpp = GET_CONFIG_ATTRIB(surf->Base.Config, EGL_BUFFER_SIZE); - display->cpp = display->bpp / 8; - snprintf(buffer, sizeof(buffer), "%d", display->bpp); - fputs(buffer, file); - fclose(file); - - snprintf(buffer, sizeof(buffer), "%s/graphics/%s/blank", sysfs, scrn->fb); - - file = fopen(buffer, "r+"); - if (!file) - goto err; - - snprintf(buffer, sizeof(buffer), "%d", VESA_NO_BLANKING); - fputs(buffer, file); - fclose(file); - - snprintf(buffer, sizeof(buffer), "%s/graphics/%s/virtual_size", sysfs, scrn->fb); - file = fopen(buffer, "r+"); - snprintf(buffer, sizeof(buffer), "%d,%d", width, height); - fputs(buffer, file); - rewind(file); - fgets(buffer, sizeof(buffer), file); - sscanf(buffer, "%d,%d", &display->virtualWidth, &display->virtualHeight); - fclose(file); - - temp = display->virtualWidth; - switch (display->bpp / 8) { - case 1: temp = (display->virtualWidth + 127) & ~127; break; - case 2: temp = (display->virtualWidth + 31) & ~31; break; - case 3: - case 4: temp = (display->virtualWidth + 15) & ~15; break; - } - display->virtualWidth = temp; - - if ((width != display->virtualWidth) || (height != display->virtualHeight)) - goto err; - - return EGL_TRUE; -} - - -/* If the backbuffer is on a videocard, this is extraordinarily slow! - */ -static EGLBoolean -_eglDRISwapBuffers(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw) -{ - driSurface *drawable = Lookup_driSurface(draw); - - if (!_eglSwapBuffers(drv, dpy, draw)) - return EGL_FALSE; - - drawable->drawable.swapBuffers(NULL, drawable->drawable.private); - - return EGL_TRUE; -} - - -EGLBoolean -_eglDRIGetDisplayInfo( driDisplay *dpy) { - char path[ NAME_MAX ]; - FILE *file; - int rc, mtrr; - unsigned int i; - drmMapType type; - drmMapFlags flags; - drm_handle_t handle, offset; - drmSize size; - drmSetVersion sv; - drm_magic_t magic; - - snprintf( path, sizeof( path ), "%s/graphics/fb%d/device/device", sysfs, dpy->minor ); - file = fopen( path, "r" ); - fgets( path, sizeof( path ), file ); - sscanf( path, "%x", &dpy->chipset ); - fclose( file ); - - sprintf(path, DRM_DEV_NAME, DRM_DIR_NAME, dpy->minor); - if ( ( dpy->drmFD = open(path, O_RDWR, 0) ) < 0 ) { - fprintf( stderr, "[drm] drmOpen failed\n" ); - return EGL_FALSE; - } - - /* Set the interface version, asking for 1.2 */ - sv.drm_di_major = 1; - sv.drm_di_minor = 2; - sv.drm_dd_major = -1; - if ((rc = drmSetInterfaceVersion(dpy->drmFD, &sv))) - return EGL_FALSE; - - /* self authorize */ - if (drmGetMagic(dpy->drmFD, &magic)) - return EGL_FALSE; - if (drmAuthMagic(dpy->drmFD, magic)) - return EGL_FALSE; - - for ( i = 0;; i++ ) { - if ( ( rc = drmGetMap( dpy->drmFD, i, &offset, &size, &type, &flags, &handle, &mtrr ) ) != 0 ) - break; - if ( type == DRM_FRAME_BUFFER ) { - if ( ( rc = drmMap( dpy->drmFD, offset, size, ( drmAddressPtr ) & dpy->pFB ) ) < 0 ) - return EGL_FALSE; - dpy->fbSize = size; - break; - } - } - if ( !dpy->pFB ) - return EGL_FALSE; - - dpy->SAREASize = SAREA_MAX; - - for ( i = 0;; i++ ) { - if ( drmGetMap( dpy->drmFD, i, &offset, &size, &type, &flags, &handle, &mtrr ) != 0 ) - break; - if ( type == DRM_SHM ) { - if ( drmMap( dpy->drmFD, offset, size, ( drmAddressPtr ) ( &dpy->pSAREA ) ) < 0 ) { - fprintf( stderr, "[drm] drmMap failed\n" ); - return 0; - } - break; - } - } - if ( !dpy->pSAREA ) - return 0; - - memset( dpy->pSAREA, 0, dpy->SAREASize ); - fprintf( stderr, "[drm] mapped SAREA 0x%08lx to %p, size %d\n", - offset, dpy->pSAREA, dpy->SAREASize ); - return EGL_TRUE; -} - - - /* Return the DRI per screen structure */ -static __DRIscreen *__eglFindDRIScreen(__DRInativeDisplay *ndpy, int scrn) -{ - driDisplay *disp = (driDisplay *)ndpy; - return &disp->driScreen; -} - -static GLboolean __eglCreateContextWithConfig(__DRInativeDisplay* ndpy, int screen, int configID, void* context, drm_context_t * hHWContext) -{ - __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; - - pDRIScreen = __eglFindDRIScreen(ndpy, screen); - if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { - return GL_FALSE; - } - psp = (__DRIscreenPrivate *) pDRIScreen->private; - if (psp->fd) { - if (drmCreateContext(psp->fd, hHWContext)) { - fprintf(stderr, ">>> drmCreateContext failed\n"); - return GL_FALSE; - } - *(void**)context = (void*) *hHWContext; - } -#if 0 - __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; - - pDRIScreen = __glXFindDRIScreen(dpy, screen); - if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { - return GL_FALSE; - } - - psp = (__DRIscreenPrivate *) pDRIScreen->private; - - if (psp->fd) { - if (drmCreateContext(psp->fd, hHWContext)) { - fprintf(stderr, ">>> drmCreateContext failed\n"); - return GL_FALSE; - } - *(void**)contextID = (void*) *hHWContext; - } -#endif - return GL_TRUE; -} - -static GLboolean __eglDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid context ) -{ - __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; - - pDRIScreen = __eglFindDRIScreen(ndpy, screen); - if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { - return GL_FALSE; - } - psp = (__DRIscreenPrivate *) pDRIScreen->private; - if (psp->fd) - drmDestroyContext(psp->fd, context); - - return GL_TRUE; -} - -static GLboolean __eglCreateDrawable( __DRInativeDisplay * ndpy, int screen, __DRIid drawable, drm_drawable_t * hHWDrawable ) -{ - __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; - - pDRIScreen = __eglFindDRIScreen(ndpy, screen); - if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { - return GL_FALSE; - } - psp = (__DRIscreenPrivate *) pDRIScreen->private; - if (psp->fd) { - if (drmCreateDrawable(psp->fd, hHWDrawable)) { - fprintf(stderr, ">>> drmCreateDrawable failed\n"); - return GL_FALSE; - } - } - return GL_TRUE; -} - -static GLboolean __eglDestroyDrawable( __DRInativeDisplay * ndpy, int screen, __DRIid drawable ) -{ - __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; - - pDRIScreen = __eglFindDRIScreen(ndpy, screen); - if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { - return GL_FALSE; - } - psp = (__DRIscreenPrivate *) pDRIScreen->private; - if (psp->fd) - drmDestroyDrawable(psp->fd, drawable); - - return GL_TRUE; -} - -static GLboolean __eglGetDrawableInfo(__DRInativeDisplay * ndpy, int screen, __DRIid drawable, - unsigned int* index, unsigned int* stamp, - int* X, int* Y, int* W, int* H, - int* numClipRects, drm_clip_rect_t ** pClipRects, - int* backX, int* backY, - int* numBackClipRects, drm_clip_rect_t ** pBackClipRects ) -{ - driSurface *surf = Lookup_driSurface(drawable); - - *X = 0; - *Y = 0; - *W = surf->Base.Width; - *H = surf->Base.Height; - - *numClipRects = 1; - *pClipRects = malloc(sizeof(**pClipRects)); - **pClipRects = (drm_clip_rect_t){0, 0, surf->Base.Width, surf->Base.Height}; - -#if 0 - GLXDrawable drawable = (GLXDrawable) draw; - drm_clip_rect_t * cliprect; - Display* display = (Display*)dpy; - __DRIcontextPrivate *pcp = (__DRIcontextPrivate *)CurrentContext->driContext.private; - if (drawable == 0) { - return GL_FALSE; - } - - cliprect = (drm_clip_rect_t*) _mesa_malloc(sizeof(drm_clip_rect_t)); - cliprect->x1 = drawable->x; - cliprect->y1 = drawable->y; - cliprect->x2 = drawable->x + drawable->w; - cliprect->y2 = drawable->y + drawable->h; - - /* the drawable index is by client id */ - *index = display->clientID; - - *stamp = pcp->driScreenPriv->pSAREA->drawableTable[display->clientID].stamp; - *x = drawable->x; - *y = drawable->y; - *width = drawable->w; - *height = drawable->h; - *numClipRects = 1; - *pClipRects = cliprect; - - *backX = drawable->x; - *backY = drawable->y; - *numBackClipRects = 0; - *pBackClipRects = 0; -#endif - return GL_TRUE; -} - -/** - * Implement \c __DRIinterfaceMethods::getProcAddress. - */ -static __DRIfuncPtr get_proc_address( const char * proc_name ) -{ -#if 0 - if (strcmp( proc_name, "glxEnableExtension" ) == 0) { - return (__DRIfuncPtr) __glXScrEnableExtension; - } -#endif - return NULL; -} - - -/** - * Destroy a linked list of \c __GLcontextModes structures created by - * \c _gl_context_modes_create. - * - * \param modes Linked list of structures to be destroyed. All structres - * in the list will be freed. - */ -void -__egl_context_modes_destroy( __GLcontextModes * modes ) -{ - while ( modes != NULL ) { - __GLcontextModes * const next = modes->next; - - free( modes ); - modes = next; - } -} - - -/** - * Allocate a linked list of \c __GLcontextModes structures. The fields of - * each structure will be initialized to "reasonable" default values. In - * most cases this is the default value defined by table 3.4 of the GLX - * 1.3 specification. This means that most values are either initialized to - * zero or \c GLX_DONT_CARE (which is -1). As support for additional - * extensions is added, the new values will be initialized to appropriate - * values from the extension specification. - * - * \param count Number of structures to allocate. - * \param minimum_size Minimum size of a structure to allocate. This allows - * for differences in the version of the - * \c __GLcontextModes stucture used in libGL and in a - * DRI-based driver. - * \returns A pointer to the first element in a linked list of \c count - * stuctures on success, or \c NULL on failure. - * - * \warning Use of \c minimum_size does \b not guarantee binary compatibility. - * The fundamental assumption is that if the \c minimum_size - * specified by the driver and the size of the \c __GLcontextModes - * structure in libGL is the same, then the meaning of each byte in - * the structure is the same in both places. \b Be \b careful! - * Basically this means that fields have to be added in libGL and - * then propagated to drivers. Drivers should \b never arbitrarilly - * extend the \c __GLcontextModes data-structure. - */ -__GLcontextModes * -__egl_context_modes_create( unsigned count, size_t minimum_size ) -{ - const size_t size = (minimum_size > sizeof( __GLcontextModes )) - ? minimum_size : sizeof( __GLcontextModes ); - __GLcontextModes * base = NULL; - __GLcontextModes ** next; - unsigned i; - - next = & base; - for ( i = 0 ; i < count ; i++ ) { - *next = (__GLcontextModes *) malloc( size ); - if ( *next == NULL ) { - __egl_context_modes_destroy( base ); - base = NULL; - break; - } - - (void) memset( *next, 0, size ); - (*next)->visualID = GLX_DONT_CARE; - (*next)->visualType = GLX_DONT_CARE; - (*next)->visualRating = GLX_NONE; - (*next)->transparentPixel = GLX_NONE; - (*next)->transparentRed = GLX_DONT_CARE; - (*next)->transparentGreen = GLX_DONT_CARE; - (*next)->transparentBlue = GLX_DONT_CARE; - (*next)->transparentAlpha = GLX_DONT_CARE; - (*next)->transparentIndex = GLX_DONT_CARE; - (*next)->xRenderable = GLX_DONT_CARE; - (*next)->fbconfigID = GLX_DONT_CARE; - (*next)->swapMethod = GLX_SWAP_UNDEFINED_OML; - - next = & ((*next)->next); - } - - return base; -} - - -GLboolean __eglWindowExists(__DRInativeDisplay *dpy, __DRIid draw) -{ - return EGL_TRUE; -} - - -/** - * Get the unadjusted system time (UST). Currently, the UST is measured in - * microseconds since Epoc. The actual resolution of the UST may vary from - * system to system, and the units may vary from release to release. - * Drivers should not call this function directly. They should instead use - * \c glXGetProcAddress to obtain a pointer to the function. - * - * \param ust Location to store the 64-bit UST - * \returns Zero on success or a negative errno value on failure. - * - * \sa glXGetProcAddress, PFNGLXGETUSTPROC - * - * \since Internal API version 20030317. - */ -int __eglGetUST( int64_t * ust ) -{ - struct timeval tv; - - if ( ust == NULL ) { - return -EFAULT; - } - - if ( gettimeofday( & tv, NULL ) == 0 ) { - ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec; - return 0; - } else { - return -errno; - } -} - -/** - * Determine the refresh rate of the specified drawable and display. - * - * \param dpy Display whose refresh rate is to be determined. - * \param drawable Drawable whose refresh rate is to be determined. - * \param numerator Numerator of the refresh rate. - * \param demoninator Denominator of the refresh rate. - * \return If the refresh rate for the specified display and drawable could - * be calculated, True is returned. Otherwise False is returned. - * - * \note This function is implemented entirely client-side. A lot of other - * functionality is required to export GLX_OML_sync_control, so on - * XFree86 this function can be called for direct-rendering contexts - * when GLX_OML_sync_control appears in the client extension string. - */ -GLboolean __eglGetMSCRate(__DRInativeDisplay * dpy, __DRIid drawable, int32_t * numerator, int32_t * denominator) -{ - return EGL_TRUE; -} - -/** - * Table of functions exported by the loader to the driver. - */ -static const __DRIinterfaceMethods interface_methods = { - get_proc_address, - - __egl_context_modes_create, - __egl_context_modes_destroy, - - __eglFindDRIScreen, - __eglWindowExists, - - __eglCreateContextWithConfig, - __eglDestroyContext, - - __eglCreateDrawable, - __eglDestroyDrawable, - __eglGetDrawableInfo, - - __eglGetUST, - __eglGetMSCRate, -}; - - -int __glXGetInternalVersion(void) -{ - return 20050725; -} - -static const char createNewScreenName[] = "__driCreateNewScreen_20050727"; - -EGLBoolean -_eglDRICreateDisplay( driDisplay *dpy, __DRIframebuffer *framebuffer) { - PFNCREATENEWSCREENFUNC createNewScreen; - int api_ver = __glXGetInternalVersion(); - __DRIversion ddx_version; - __DRIversion dri_version; - __DRIversion drm_version; - drmVersionPtr version; - - version = drmGetVersion( dpy->drmFD ); - if ( version ) { - drm_version.major = version->version_major; - drm_version.minor = version->version_minor; - drm_version.patch = version->version_patchlevel; - drmFreeVersion( version ); - } else { - drm_version.major = -1; - drm_version.minor = -1; - drm_version.patch = -1; - } - - /* - * Get device name (like "tdfx") and the ddx version numbers. - * We'll check the version in each DRI driver's "createScreen" - * function. - */ - ddx_version.major = 4; - ddx_version.minor = 0; - ddx_version.patch = 0; - - /* - * Get the DRI X extension version. - */ - dri_version.major = 4; - dri_version.minor = 0; - dri_version.patch = 0; - - createNewScreen = ( PFNCREATENEWSCREENFUNC ) dlsym( dpy->Base.Driver->LibHandle, createNewScreenName ); - if ( !createNewScreen ) { - fprintf( stderr, "Couldn't find %s in CallCreateNewScreen\n", createNewScreenName ); - return EGL_FALSE; - } - - dpy->driScreen.private = createNewScreen( dpy, 0, &dpy->driScreen, NULL, - &ddx_version, &dri_version, - &drm_version, framebuffer, - dpy->pSAREA, dpy->drmFD, - api_ver, - & interface_methods, - ( __GLcontextModes ** ) & dpy->driver_modes ); - if (!dpy->driScreen.private) - return EGL_FALSE; - - DRM_UNLOCK( dpy->drmFD, dpy->pSAREA, dpy->serverContext ); - - return EGL_TRUE; -} - - -EGLBoolean -_eglDRICreateScreen( driDisplay *dpy) { - char c, *buffer, path[ NAME_MAX ]; - unsigned int i, x, y, r; - int fd; - FILE *file; - driScreen *s; - _EGLScreen *scrn; - - /* Create a screen */ - if ( !( s = ( driScreen * ) calloc( 1, sizeof( *s ) ) ) ) - return EGL_FALSE; - - snprintf( s->fb, NAME_MAX, "fb%d", dpy->minor ); - scrn = &s->Base; - _eglInitScreen( scrn ); - _eglAddScreen( &dpy->Base, scrn ); - - snprintf( path, sizeof( path ), "%s/graphics/%s/modes", sysfs, s->fb ); - file = fopen( path, "r" ); - while ( fgets( path, sizeof( path ), file ) ) { - path[ strlen( path ) - 1 ] = '\0'; /* strip off \n from sysfs */ - sscanf( path, "%c:%ux%u-%u", &c, &x, &y, &r ); - _eglAddMode( scrn, x, y, r * 1000, path ); - } - fclose( file ); - - /* cmap attribute uses 256 lines of 16 bytes */ - if ( !( buffer = malloc( 256 * 16 ) ) ) - return EGL_FALSE; - - /* cmap attribute uses 256 lines of 16 bytes */ - for ( i = 0; i < 256; i++ ) - sprintf( &buffer[ i * 16 ], "%02x%c%4x%4x%4x\n", - i, ' ', 256 * i, 256 * i, 256 * i ); - - snprintf( path, sizeof( path ), "%s/graphics/%s/color_map", sysfs, s->fb ); - if ( !( fd = open( path, O_RDWR ) ) ) - return EGL_FALSE; - write( fd, buffer, 256 * 16 ); - close( fd ); - - free( buffer ); - - return EGL_TRUE; -} - -EGLBoolean -_eglDRIInitialize(_EGLDriver *drv, EGLDisplay dpy, EGLint *major, EGLint *minor) -{ - _EGLDisplay *disp = _eglLookupDisplay(dpy); - driDisplay *display; - - /* Switch display structure to one with our private fields */ - display = calloc(1, sizeof(*display)); - display->Base = *disp; - _eglHashInsert(_eglGlobal.Displays, disp->Handle, display); - free(disp); - - *major = 1; - *minor = 0; - - sscanf(&disp->Name[1], "%d", &display->minor); - - drv->Initialized = EGL_TRUE; - return EGL_TRUE; -} - - -static EGLBoolean -_eglDRITerminate(_EGLDriver *drv, EGLDisplay dpy) -{ - driDisplay *display = Lookup_driDisplay(dpy); - _eglCleanupDisplay(&display->Base); - free(display); - free(drv); - return EGL_TRUE; -} - - -void -_eglDRIInitDriverFallbacks(_EGLDriver *drv) -{ - _eglInitDriverFallbacks(drv); - - drv->Initialize = _eglDRIInitialize; - drv->Terminate = _eglDRITerminate; - drv->CreateContext = _eglDRICreateContext; - drv->MakeCurrent = _eglDRIMakeCurrent; - drv->CreateWindowSurface = _eglDRICreateWindowSurface; - drv->CreatePixmapSurface = _eglDRICreatePixmapSurface; - drv->CreatePbufferSurface = _eglDRICreatePbufferSurface; - drv->DestroySurface = _eglDRIDestroySurface; - drv->DestroyContext = _eglDRIDestroyContext; - drv->CreateScreenSurfaceMESA = _eglDRICreateScreenSurfaceMESA; - drv->ShowSurfaceMESA = _eglDRIShowSurfaceMESA; - drv->SwapBuffers = _eglDRISwapBuffers; - - /* enable supported extensions */ - drv->MESA_screen_surface = EGL_TRUE; - drv->MESA_copy_context = EGL_TRUE; - -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/drivers/dri/egldri.h b/nx-X11/extras/Mesa_6.4.2/src/egl/drivers/dri/egldri.h deleted file mode 100644 index 4573c50ea6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/drivers/dri/egldri.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef EGLDRI_INCLUDED -#define EGLDRI_INCLUDED - -#include "egldisplay.h" -#include "eglscreen.h" -#include "eglsurface.h" -#include "eglcontext.h" -#include "mtypes.h" -#include "dri_util.h" -#include "drm_sarea.h" - -/** - * dri display-specific driver class derived from _EGLDisplay - */ -typedef struct dri_display -{ - _EGLDisplay Base; /* base class/object */ - void *pFB; - int drmFD; /**< \brief DRM device file descriptor */ - int minor; - unsigned long hFrameBuffer; - - int virtualWidth; - int virtualHeight; - int fbSize; - int bpp; - int cpp; - int isPCI; - int SAREASize; - drm_sarea_t *pSAREA; - unsigned int serverContext; /**< \brief DRM context only active on server */ - unsigned long FBStart; /**< \brief physical address of the framebuffer */ - void *driverClientMsg; - int driverClientMsgSize; - int chipset; - void *driverPrivate; - drm_magic_t magic; - - __GLcontextModes *driver_modes; - __DRIscreen driScreen; - -} driDisplay; - -/** - * dri driver-specific screen class derived from _EGLScreen - */ -typedef struct dri_screen -{ - _EGLScreen Base; - char fb[NAME_MAX]; -} driScreen; - - -/** - * dri driver-specific surface class derived from _EGLSurface - */ -typedef struct dri_surface -{ - _EGLSurface Base; /* base class/object */ - __DRIdrawable drawable; -} driSurface; - - -/** - * dri driver-specific context class derived from _EGLContext - */ -typedef struct dri_context -{ - _EGLContext Base; /* base class/object */ - __DRIcontext driContext; /**< \brief context dependent methods */ -} driContext; - - - -static inline driDisplay * -Lookup_driDisplay(EGLDisplay dpy) -{ - _EGLDisplay *d = _eglLookupDisplay(dpy); - return (driDisplay *) d; -} - - -static inline driScreen * -Lookup_driScreen(EGLDisplay dpy, EGLScreenMESA screen) -{ - _EGLScreen *s = _eglLookupScreen(dpy, screen); - return (driScreen *) s; -} - - -static inline driContext * -Lookup_driContext(EGLContext ctx) -{ - _EGLContext *c = _eglLookupContext(ctx); - return (driContext *) c; -} - - -static inline driSurface * -Lookup_driSurface(EGLSurface surf) -{ - _EGLSurface *s = _eglLookupSurface(surf); - return (driSurface *) s; -} - -extern void _eglDRIInitDriverFallbacks(_EGLDriver *drv); -extern EGLBoolean _eglDRIShowSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, EGLSurface surface, EGLModeMESA m); -extern EGLBoolean _eglDRIInitialize(_EGLDriver *drv, EGLDisplay dpy, EGLint *major, EGLint *minor); -extern EGLBoolean _eglDRIGetDisplayInfo(driDisplay *dpy); -extern EGLBoolean _eglDRICreateDisplay(driDisplay *dpy, __DRIframebuffer *framebuffer); -extern EGLBoolean _eglDRICreateScreen(driDisplay *dpy); - -#endif /* EGLDRI_INCLUDED */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/Makefile b/nx-X11/extras/Mesa_6.4.2/src/egl/main/Makefile deleted file mode 100644 index 4bb1ffc9e8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# src/egl/main/Makefile - -TOP = ../../.. -include $(TOP)/configs/current - - -INCLUDE_DIRS = -I$(TOP)/include -I$(TOP)/src/mesa/glapi - -HEADERS = \ - eglconfig.h \ - eglcontext.h \ - egldisplay.h \ - egldriver.h \ - eglglobals.h \ - eglhash.h \ - eglmode.h \ - eglscreen.h \ - eglsurface.h - -SOURCES = \ - eglapi.c \ - eglconfig.c \ - eglcontext.c \ - egldisplay.c \ - egldriver.c \ - eglglobals.c \ - eglhash.c \ - eglmode.c \ - eglscreen.c \ - eglsurface.c - -OBJECTS = $(SOURCES:.c=.o) - - -.c.o: - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ - - - -default: depend library - - -# EGL Library -library: $(LIB_DIR)/libEGL.so - -$(LIB_DIR)/libEGL.so: $(OBJECTS) - $(TOP)/bin/mklib -o EGL -major 1 -minor 0 \ - -install $(LIB_DIR) -ldl $(OBJECTS) - - - -clean: - rm -f *.o *.so* - rm -f core.* - - -depend: $(SOURCES) $(HEADERS) - @ echo "running $(MKDEP)" - @ touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \ - $(SOURCES) $(HEADERS) > /dev/null - -include depend -# DO NOT DELETE diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglapi.c b/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglapi.c deleted file mode 100644 index 87160c7f48..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglapi.c +++ /dev/null @@ -1,497 +0,0 @@ -/** - * Public EGL API entrypoints - * - * Generally, we use the EGLDisplay parameter as a key to lookup the - * appropriate device driver handle, then jump though the driver's - * dispatch table to handle the function. - * - * That allows us the option of supporting multiple, simultaneous, - * heterogeneous hardware devices in the future. - * - * The EGLDisplay, EGLConfig, EGLContext and EGLSurface types are - * opaque handles implemented with 32-bit unsigned integers. - * It's up to the driver function or fallback function to look up the - * handle and get an object. - * By using opaque handles, we leave open the possibility of having - * indirect rendering in the future, like GLX. - * - * - * Notes on naming conventions: - * - * eglFooBar - public EGL function - * EGL_FOO_BAR - public EGL token - * EGLDatatype - public EGL datatype - * - * _eglFooBar - private EGL function - * _EGLDatatype - private EGL datatype, typedef'd struct - * _egl_struct - private EGL struct, non-typedef'd - * - */ - - - -#include -#include -/**#include "glapi.h"**/ -#include "eglcontext.h" -#include "egldisplay.h" -#include "egltypedefs.h" -#include "eglglobals.h" -#include "egldriver.h" -#include "eglsurface.h" - - - -/** - * NOTE: displayName is treated as a string in _eglChooseDriver()!!! - * This will probably change! - * See _eglChooseDriver() for details! - */ -EGLDisplay APIENTRY -eglGetDisplay(NativeDisplayType displayName) -{ - _EGLDisplay *dpy; - _eglInitGlobals(); - dpy = _eglNewDisplay(displayName); - if (dpy) - return dpy->Handle; - else - return EGL_NO_DISPLAY; -} - - -EGLBoolean APIENTRY -eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) -{ - if (dpy) { - _EGLDriver *drv = _eglChooseDriver(dpy); - if (drv) - return drv->Initialize(drv, dpy, major, minor); - } - return EGL_FALSE; -} - - -EGLBoolean APIENTRY -eglTerminate(EGLDisplay dpy) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - if (drv) - return _eglCloseDriver(drv, dpy); - else - return EGL_FALSE; -} - - -const char * APIENTRY -eglQueryString(EGLDisplay dpy, EGLint name) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - if (drv) - return drv->QueryString(drv, dpy, name); - else - return NULL; -} - - -EGLBoolean APIENTRY -eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - /* XXX check drv for null in remaining functions */ - return drv->GetConfigs(drv, dpy, configs, config_size, num_config); -} - - -EGLBoolean APIENTRY -eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->ChooseConfig(drv, dpy, attrib_list, configs, config_size, num_config); -} - - -EGLBoolean APIENTRY -eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->GetConfigAttrib(drv, dpy, config, attribute, value); -} - - -EGLContext APIENTRY -eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->CreateContext(drv, dpy, config, share_list, attrib_list); -} - - -EGLBoolean APIENTRY -eglDestroyContext(EGLDisplay dpy, EGLContext ctx) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->DestroyContext(drv, dpy, ctx); -} - - -EGLBoolean APIENTRY -eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->MakeCurrent(drv, dpy, draw, read, ctx); -} - - -EGLBoolean APIENTRY -eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->QueryContext(drv, dpy, ctx, attribute, value); -} - - -EGLSurface APIENTRY -eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->CreateWindowSurface(drv, dpy, config, window, attrib_list); -} - - -EGLSurface APIENTRY -eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->CreatePixmapSurface(drv, dpy, config, pixmap, attrib_list); -} - - -EGLSurface APIENTRY -eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->CreatePbufferSurface(drv, dpy, config, attrib_list); -} - - -EGLBoolean APIENTRY -eglDestroySurface(EGLDisplay dpy, EGLSurface surface) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->DestroySurface(drv, dpy, surface); -} - - -EGLBoolean APIENTRY -eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->QuerySurface(drv, dpy, surface, attribute, value); -} - - -EGLBoolean APIENTRY -eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->SurfaceAttrib(drv, dpy, surface, attribute, value); -} - - -EGLBoolean APIENTRY -eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->BindTexImage(drv, dpy, surface, buffer); -} - - -EGLBoolean APIENTRY -eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->ReleaseTexImage(drv, dpy, surface, buffer); -} - - -EGLBoolean APIENTRY -eglSwapInterval(EGLDisplay dpy, EGLint interval) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->SwapInterval(drv, dpy, interval); -} - - -EGLBoolean APIENTRY -eglSwapBuffers(EGLDisplay dpy, EGLSurface draw) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->SwapBuffers(drv, dpy, draw); -} - - -EGLBoolean APIENTRY -eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, NativePixmapType target) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->CopyBuffers(drv, dpy, surface, target); -} - - -EGLBoolean APIENTRY -eglWaitGL(void) -{ - EGLDisplay dpy = eglGetCurrentDisplay(); - if (dpy != EGL_NO_DISPLAY) { - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->WaitGL(drv, dpy); - } - else - return EGL_FALSE; -} - - -EGLBoolean APIENTRY -eglWaitNative(EGLint engine) -{ - EGLDisplay dpy = eglGetCurrentDisplay(); - if (dpy != EGL_NO_DISPLAY) { - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->WaitNative(drv, dpy, engine); - } - else - return EGL_FALSE; -} - - -EGLDisplay APIENTRY -eglGetCurrentDisplay(void) -{ - _EGLDisplay *dpy = _eglGetCurrentDisplay(); - if (dpy) - return dpy->Handle; - else - return EGL_NO_DISPLAY; -} - - -EGLContext APIENTRY -eglGetCurrentContext(void) -{ - _EGLContext *ctx = _eglGetCurrentContext(); - if (ctx) - return ctx->Handle; - else - return EGL_NO_CONTEXT; -} - - -EGLSurface APIENTRY -eglGetCurrentSurface(EGLint readdraw) -{ - _EGLSurface *s = _eglGetCurrentSurface(readdraw); - if (s) - return s->Handle; - else - return EGL_NO_SURFACE; -} - - -EGLint APIENTRY -eglGetError(void) -{ - EGLint e = _eglGlobal.LastError; - _eglGlobal.LastError = EGL_SUCCESS; - return e; -} - - -void (* APIENTRY eglGetProcAddress(const char *procname))() -{ - typedef void (*genericFunc)(); - struct name_function { - const char *name; - _EGLProc function; - }; - static struct name_function egl_functions[] = { - /* alphabetical order */ - { "eglBindTexImage", (_EGLProc) eglBindTexImage }, - { "eglChooseConfig", (_EGLProc) eglChooseConfig }, - { "eglCopyBuffers", (_EGLProc) eglCopyBuffers }, - { "eglCreateContext", (_EGLProc) eglCreateContext }, - { "eglCreatePbufferSurface", (_EGLProc) eglCreatePbufferSurface }, - { "eglCreatePixmapSurface", (_EGLProc) eglCreatePixmapSurface }, - { "eglCreateWindowSurface", (_EGLProc) eglCreateWindowSurface }, - { "eglDestroyContext", (_EGLProc) eglDestroyContext }, - { "eglDestroySurface", (_EGLProc) eglDestroySurface }, - { "eglGetConfigAttrib", (_EGLProc) eglGetConfigAttrib }, - { "eglGetConfigs", (_EGLProc) eglGetConfigs }, - { "eglGetCurrentContext", (_EGLProc) eglGetCurrentContext }, - { "eglGetCurrentDisplay", (_EGLProc) eglGetCurrentDisplay }, - { "eglGetCurrentSurface", (_EGLProc) eglGetCurrentSurface }, - { "eglGetDisplay", (_EGLProc) eglGetDisplay }, - { "eglGetError", (_EGLProc) eglGetError }, - { "eglGetProcAddress", (_EGLProc) eglGetProcAddress }, - { "eglInitialize", (_EGLProc) eglInitialize }, - { "eglMakeCurrent", (_EGLProc) eglMakeCurrent }, - { "eglQueryContext", (_EGLProc) eglQueryContext }, - { "eglQueryString", (_EGLProc) eglQueryString }, - { "eglQuerySurface", (_EGLProc) eglQuerySurface }, - { "eglReleaseTexImage", (_EGLProc) eglReleaseTexImage }, - { "eglSurfaceAttrib", (_EGLProc) eglSurfaceAttrib }, - { "eglSwapBuffers", (_EGLProc) eglSwapBuffers }, - { "eglSwapInterval", (_EGLProc) eglSwapInterval }, - { "eglTerminate", (_EGLProc) eglTerminate }, - { "eglWaitGL", (_EGLProc) eglWaitGL }, - { "eglWaitNative", (_EGLProc) eglWaitNative }, - /* Extensions */ - { "eglChooseModeMESA", (_EGLProc) eglChooseModeMESA }, - { "eglGetModesMESA", (_EGLProc) eglGetModesMESA }, - { "eglGetModeAttribMESA", (_EGLProc) eglGetModeAttribMESA }, - { "eglCopyContextMESA", (_EGLProc) eglCopyContextMESA }, - { "eglGetScreensMESA", (_EGLProc) eglGetScreensMESA }, - { "eglCreateScreenSurfaceMESA", (_EGLProc) eglCreateScreenSurfaceMESA }, - { "eglShowSurfaceMESA", (_EGLProc) eglShowSurfaceMESA }, - { "eglScreenPositionMESA", (_EGLProc) eglScreenPositionMESA }, - { "eglQueryScreenMESA", (_EGLProc) eglQueryScreenMESA }, - { "eglQueryScreenSurfaceMESA", (_EGLProc) eglQueryScreenSurfaceMESA }, - { "eglQueryScreenModeMESA", (_EGLProc) eglQueryScreenModeMESA }, - { "eglQueryModeStringMESA", (_EGLProc) eglQueryModeStringMESA }, - { NULL, NULL } - }; - EGLint i; - for (i = 0; egl_functions[i].name; i++) { - if (strcmp(egl_functions[i].name, procname) == 0) { - return (genericFunc) egl_functions[i].function; - } - } -#if 0 - /* XXX enable this code someday */ - return (genericFunc) _glapi_get_proc_address(procname); -#else - return NULL; -#endif -} - - -/* - * EGL_MESA_screen extension - */ - -EGLBoolean APIENTRY -eglChooseModeMESA(EGLDisplay dpy, EGLScreenMESA screen, - const EGLint *attrib_list, EGLModeMESA *modes, - EGLint modes_size, EGLint *num_modes) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - if (drv) - return drv->ChooseModeMESA(drv, dpy, screen, attrib_list, modes, modes_size, num_modes); - else - return EGL_FALSE; -} - - -EGLBoolean APIENTRY -eglGetModesMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint mode_size, EGLint *num_mode) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - if (drv) - return drv->GetModesMESA(drv, dpy, screen, modes, mode_size, num_mode); - else - return EGL_FALSE; -} - - -EGLBoolean APIENTRY -eglGetModeAttribMESA(EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - if (drv) - return drv->GetModeAttribMESA(drv, dpy, mode, attribute, value); - else - return EGL_FALSE; -} - - -EGLBoolean APIENTRY -eglCopyContextMESA(EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - if (drv) - return drv->CopyContextMESA(drv, dpy, source, dest, mask); - else - return EGL_FALSE; -} - - -EGLBoolean -eglGetScreensMESA(EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - if (drv) - return drv->GetScreensMESA(drv, dpy, screens, max_screens, num_screens); - else - return EGL_FALSE; -} - - -EGLSurface -eglCreateScreenSurfaceMESA(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->CreateScreenSurfaceMESA(drv, dpy, config, attrib_list); -} - - -EGLBoolean -eglShowSurfaceMESA(EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->ShowSurfaceMESA(drv, dpy, screen, surface, mode); -} - - -EGLBoolean -eglScreenPositionMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->ScreenPositionMESA(drv, dpy, screen, x, y); -} - - -EGLBoolean -eglQueryScreenMESA( EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->QueryScreenMESA(drv, dpy, screen, attribute, value); -} - - -EGLBoolean -eglQueryScreenSurfaceMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->QueryScreenSurfaceMESA(drv, dpy, screen, surface); -} - - -EGLBoolean -eglQueryScreenModeMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->QueryScreenModeMESA(drv, dpy, screen, mode); -} - - -const char * -eglQueryModeStringMESA(EGLDisplay dpy, EGLModeMESA mode) -{ - _EGLDriver *drv = _eglLookupDriver(dpy); - return drv->QueryModeStringMESA(drv, dpy, mode); -} - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglconfig.c b/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglconfig.c deleted file mode 100644 index 9f3d3ad278..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglconfig.c +++ /dev/null @@ -1,577 +0,0 @@ -/** - * EGL Configuration (pixel format) functions. - */ - - -#include -#include -#include -#include -#include "eglconfig.h" -#include "egldisplay.h" -#include "egldriver.h" -#include "eglglobals.h" - - -#define MIN2(A, B) (((A) < (B)) ? (A) : (B)) - - -/** - * Convert an _EGLConfig to a __GLcontextModes object. - * NOTE: This routine may be incomplete - we're only making sure that - * the fields needed by Mesa (for _mesa_create_context/framebuffer) are - * set correctly. - */ -void -_eglConfigToContextModesRec(const _EGLConfig *config, __GLcontextModes *mode) -{ - memset(mode, 0, sizeof(*mode)); - - mode->rgbMode = GL_TRUE; /* no color index */ - mode->colorIndexMode = GL_FALSE; - mode->doubleBufferMode = GL_TRUE; /* always DB for now */ - mode->stereoMode = GL_FALSE; - - mode->redBits = GET_CONFIG_ATTRIB(config, EGL_RED_SIZE); - mode->greenBits = GET_CONFIG_ATTRIB(config, EGL_GREEN_SIZE); - mode->blueBits = GET_CONFIG_ATTRIB(config, EGL_BLUE_SIZE); - mode->alphaBits = GET_CONFIG_ATTRIB(config, EGL_ALPHA_SIZE); - mode->rgbBits = GET_CONFIG_ATTRIB(config, EGL_BUFFER_SIZE); - - /* no rgba masks - fix? */ - - mode->depthBits = GET_CONFIG_ATTRIB(config, EGL_DEPTH_SIZE); - mode->haveDepthBuffer = mode->depthBits > 0; - - mode->stencilBits = GET_CONFIG_ATTRIB(config, EGL_STENCIL_SIZE); - mode->haveStencilBuffer = mode->stencilBits > 0; - - /* no accum */ - - mode->level = GET_CONFIG_ATTRIB(config, EGL_LEVEL); - mode->samples = GET_CONFIG_ATTRIB(config, EGL_SAMPLES); - mode->sampleBuffers = GET_CONFIG_ATTRIB(config, EGL_SAMPLE_BUFFERS); - - /* surface type - not really needed */ - mode->visualType = GLX_TRUE_COLOR; - mode->renderType = GLX_RGBA_BIT; -} - - -void -_eglSetConfigAttrib(_EGLConfig *config, EGLint attr, EGLint val) -{ - assert(attr >= FIRST_ATTRIB); - assert(attr < FIRST_ATTRIB + MAX_ATTRIBS); - config->Attrib[attr - FIRST_ATTRIB] = val; -} - - -/** - * Init the given _EGLconfig to default values. - * \param id the configuration's ID. - */ -void -_eglInitConfig(_EGLConfig *config, EGLint id) -{ - memset(config, 0, sizeof(*config)); - config->Handle = id; - _eglSetConfigAttrib(config, EGL_CONFIG_ID, id); - _eglSetConfigAttrib(config, EGL_BIND_TO_TEXTURE_RGB, EGL_DONT_CARE); - _eglSetConfigAttrib(config, EGL_BIND_TO_TEXTURE_RGBA, EGL_DONT_CARE); - _eglSetConfigAttrib(config, EGL_CONFIG_CAVEAT, EGL_DONT_CARE); - _eglSetConfigAttrib(config, EGL_NATIVE_RENDERABLE, EGL_DONT_CARE); - _eglSetConfigAttrib(config, EGL_NATIVE_VISUAL_TYPE, EGL_DONT_CARE); - _eglSetConfigAttrib(config, EGL_MIN_SWAP_INTERVAL, EGL_DONT_CARE); - _eglSetConfigAttrib(config, EGL_MAX_SWAP_INTERVAL, EGL_DONT_CARE); - _eglSetConfigAttrib(config, EGL_SURFACE_TYPE, - EGL_SCREEN_BIT_MESA | EGL_PBUFFER_BIT | - EGL_PIXMAP_BIT | EGL_WINDOW_BIT); - _eglSetConfigAttrib(config, EGL_TRANSPARENT_TYPE, EGL_NONE); - _eglSetConfigAttrib(config, EGL_TRANSPARENT_RED_VALUE, EGL_DONT_CARE); - _eglSetConfigAttrib(config, EGL_TRANSPARENT_GREEN_VALUE, EGL_DONT_CARE); - _eglSetConfigAttrib(config, EGL_TRANSPARENT_BLUE_VALUE, EGL_DONT_CARE); -} - - -/** - * Given an EGLConfig handle, return the corresponding _EGLConfig object. - */ -_EGLConfig * -_eglLookupConfig(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config) -{ - EGLint i; - _EGLDisplay *disp = _eglLookupDisplay(dpy); - for (i = 0; i < disp->NumConfigs; i++) { - if (disp->Configs[i].Handle == config) { - return disp->Configs + i; - } - } - return NULL; -} - - -/** - * Add the given _EGLConifg to the given display. - */ -_EGLConfig * -_eglAddConfig(_EGLDisplay *display, const _EGLConfig *config) -{ - _EGLConfig *newConfigs; - EGLint n; - - n = display->NumConfigs; - - newConfigs = (_EGLConfig *) realloc(display->Configs, - (n + 1) * sizeof(_EGLConfig)); - if (newConfigs) { - display->Configs = newConfigs; - display->Configs[n] = *config; /* copy struct */ - display->Configs[n].Handle = n; - display->NumConfigs++; - return display->Configs + n; - } - else { - return NULL; - } -} - - -/** - * Parse the attrib_list to fill in the fields of the given _egl_config - * Return EGL_FALSE if any errors, EGL_TRUE otherwise. - */ -EGLBoolean -_eglParseConfigAttribs(_EGLConfig *config, const EGLint *attrib_list) -{ - EGLint i; - - /* XXX set all config attribs to EGL_DONT_CARE */ - - for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) { - EGLint k = attrib_list[i] - FIRST_ATTRIB; - if (k >= 0 && k < MAX_ATTRIBS) { - config->Attrib[k] = attrib_list[++i]; - } - else { - _eglError(EGL_BAD_ATTRIBUTE, "eglChooseConfig"); - return EGL_FALSE; - } - } - return EGL_TRUE; -} - - -#define EXACT 1 -#define ATLEAST 2 -#define MASK 3 -#define SMALLER 4 -#define SPECIAL 5 -#define NONE 6 - -struct sort_info { - EGLint Attribute; - EGLint MatchCriteria; - EGLint SortOrder; -}; - -/* This encodes the info from Table 3.5 of the EGL spec, ordered by - * Sort Priority. - */ -static struct sort_info SortInfo[] = { - { EGL_CONFIG_CAVEAT, EXACT, SPECIAL }, - { EGL_RED_SIZE, ATLEAST, SPECIAL }, - { EGL_GREEN_SIZE, ATLEAST, SPECIAL }, - { EGL_BLUE_SIZE, ATLEAST, SPECIAL }, - { EGL_ALPHA_SIZE, ATLEAST, SPECIAL }, - { EGL_BUFFER_SIZE, ATLEAST, SMALLER }, - { EGL_SAMPLE_BUFFERS, ATLEAST, SMALLER }, - { EGL_SAMPLES, ATLEAST, SMALLER }, - { EGL_DEPTH_SIZE, ATLEAST, SMALLER }, - { EGL_STENCIL_SIZE, ATLEAST, SMALLER }, - { EGL_NATIVE_VISUAL_TYPE, EXACT, SPECIAL }, - { EGL_CONFIG_ID, EXACT, SMALLER }, - { EGL_BIND_TO_TEXTURE_RGB, EXACT, NONE }, - { EGL_BIND_TO_TEXTURE_RGBA, EXACT, NONE }, - { EGL_LEVEL, EXACT, NONE }, - { EGL_NATIVE_RENDERABLE, EXACT, NONE }, - { EGL_MAX_SWAP_INTERVAL, EXACT, NONE }, - { EGL_MIN_SWAP_INTERVAL, EXACT, NONE }, - { EGL_SURFACE_TYPE, MASK, NONE }, - { EGL_TRANSPARENT_TYPE, EXACT, NONE }, - { EGL_TRANSPARENT_RED_VALUE, EXACT, NONE }, - { EGL_TRANSPARENT_GREEN_VALUE, EXACT, NONE }, - { EGL_TRANSPARENT_BLUE_VALUE, EXACT, NONE }, - { 0, 0, 0 } -}; - - -/** - * Return EGL_TRUE if the attributes of c meet or exceed the minimums - * specified by min. - */ -EGLBoolean -_eglConfigQualifies(const _EGLConfig *c, const _EGLConfig *min) -{ - EGLint i; - for (i = 0; SortInfo[i].Attribute != 0; i++) { - const EGLint mv = GET_CONFIG_ATTRIB(min, SortInfo[i].Attribute); - if (mv != EGL_DONT_CARE) { - const EGLint cv = GET_CONFIG_ATTRIB(c, SortInfo[i].Attribute); - if (SortInfo[i].MatchCriteria == EXACT) { - if (cv != mv) { - return EGL_FALSE; - } - } - else if (SortInfo[i].MatchCriteria == ATLEAST) { - if (cv < mv) { - return EGL_FALSE; - } - } - else { - assert(SortInfo[i].MatchCriteria == MASK); - if ((mv & cv) != mv) { - return EGL_FALSE; - } - } - } - } - return EGL_TRUE; -} - - -/** - * Compare configs 'a' and 'b' and return -1 if a belongs before b, - * 1 if a belongs after b, or 0 if they're equal. - */ -EGLint -_eglCompareConfigs(const _EGLConfig *a, const _EGLConfig *b) -{ - EGLint i; - for (i = 0; SortInfo[i].Attribute != 0; i++) { - const EGLint av = GET_CONFIG_ATTRIB(a, SortInfo[i].Attribute); - const EGLint bv = GET_CONFIG_ATTRIB(b, SortInfo[i].Attribute); - if (SortInfo[i].SortOrder == SMALLER) { - if (av < bv) - return -1; - else if (av > bv) - return 1; - /* else, continue examining attribute values */ - } - else if (SortInfo[i].SortOrder == SPECIAL) { - if (SortInfo[i].Attribute == EGL_CONFIG_CAVEAT) { - /* values are EGL_NONE, SLOW_CONFIG, or NON_CONFORMANT_CONFIG */ - if (av < bv) - return -1; - else if (av > bv) - return 1; - } - else if (SortInfo[i].Attribute == EGL_RED_SIZE || - SortInfo[i].Attribute == EGL_GREEN_SIZE || - SortInfo[i].Attribute == EGL_BLUE_SIZE || - SortInfo[i].Attribute == EGL_ALPHA_SIZE) { - if (av > bv) - return -1; - else if (av < bv) - return 1; - } - else { - assert(SortInfo[i].Attribute == EGL_NATIVE_VISUAL_TYPE); - if (av < bv) - return -1; - else if (av > bv) - return 1; - } - } - else { - assert(SortInfo[i].SortOrder == NONE); - /* continue examining attribute values */ - } - } - return 0; -} - - -/** - * Typical fallback routine for eglChooseConfig - */ -EGLBoolean -_eglChooseConfig(_EGLDriver *drv, EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config) -{ - _EGLDisplay *disp = _eglLookupDisplay(dpy); - _EGLConfig criteria; - EGLint i; - - /* parse the attrib_list to initialize criteria */ - if (!_eglParseConfigAttribs(&criteria, attrib_list)) { - return EGL_FALSE; - } - - *num_config = 0; - for (i = 0; i < disp->NumConfigs; i++) { - const _EGLConfig *conf = disp->Configs + i; - if (_eglConfigQualifies(conf, &criteria)) { - if (*num_config < config_size) { - /* save */ - configs[*num_config] = conf->Handle; - (*num_config)++; - } - else { - break; - } - } - } - - /* XXX sort the list here */ - - return EGL_TRUE; -} - - -/** - * Fallback for eglGetConfigAttrib. - */ -EGLBoolean -_eglGetConfigAttrib(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value) -{ - const _EGLConfig *conf = _eglLookupConfig(drv, dpy, config); - const EGLint k = attribute - FIRST_ATTRIB; - if (k >= 0 && k < MAX_ATTRIBS) { - *value = conf->Attrib[k]; - return EGL_TRUE; - } - else { - _eglError(EGL_BAD_ATTRIBUTE, "eglGetConfigAttrib"); - return EGL_FALSE; - } -} - - -/** - * Fallback for eglGetConfigs. - */ -EGLBoolean -_eglGetConfigs(_EGLDriver *drv, EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config) -{ - _EGLDisplay *disp = _eglLookupDisplay(dpy); - - if (!drv->Initialized) { - _eglError(EGL_NOT_INITIALIZED, "eglGetConfigs"); - return EGL_FALSE; - } - - if (configs) { - EGLint i; - *num_config = MIN2(disp->NumConfigs, config_size); - for (i = 0; i < *num_config; i++) { - configs[i] = disp->Configs[i].Handle; - } - } else - *num_config = disp->NumConfigs; - - return EGL_TRUE; -} - - -/** - * Creates a set of \c __GLcontextModes that a driver will expose. - * - * A set of \c __GLcontextModes will be created based on the supplied - * parameters. The number of modes processed will be 2 * - * \c num_depth_stencil_bits * \c num_db_modes. - * - * For the most part, data is just copied from \c depth_bits, \c stencil_bits, - * \c db_modes, and \c visType into each \c __GLcontextModes element. - * However, the meanings of \c fb_format and \c fb_type require further - * explanation. The \c fb_format specifies which color components are in - * each pixel and what the default order is. For example, \c GL_RGB specifies - * that red, green, blue are available and red is in the "most significant" - * position and blue is in the "least significant". The \c fb_type specifies - * the bit sizes of each component and the actual ordering. For example, if - * \c GL_UNSIGNED_SHORT_5_6_5_REV is specified with \c GL_RGB, bits [15:11] - * are the blue value, bits [10:5] are the green value, and bits [4:0] are - * the red value. - * - * One sublte issue is the combination of \c GL_RGB or \c GL_BGR and either - * of the \c GL_UNSIGNED_INT_8_8_8_8 modes. The resulting mask values in the - * \c __GLcontextModes structure is \b identical to the \c GL_RGBA or - * \c GL_BGRA case, except the \c alphaMask is zero. This means that, as - * far as this routine is concerned, \c GL_RGB with \c GL_UNSIGNED_INT_8_8_8_8 - * still uses 32-bits. - * - * If in doubt, look at the tables used in the function. - * - * \param ptr_to_modes Pointer to a pointer to a linked list of - * \c __GLcontextModes. Upon completion, a pointer to - * the next element to be process will be stored here. - * If the function fails and returns \c GL_FALSE, this - * value will be unmodified, but some elements in the - * linked list may be modified. - * \param fb_format Format of the framebuffer. Currently only \c GL_RGB, - * \c GL_RGBA, \c GL_BGR, and \c GL_BGRA are supported. - * \param fb_type Type of the pixels in the framebuffer. Currently only - * \c GL_UNSIGNED_SHORT_5_6_5, - * \c GL_UNSIGNED_SHORT_5_6_5_REV, - * \c GL_UNSIGNED_INT_8_8_8_8, and - * \c GL_UNSIGNED_INT_8_8_8_8_REV are supported. - * \param depth_bits Array of depth buffer sizes to be exposed. - * \param stencil_bits Array of stencil buffer sizes to be exposed. - * \param num_depth_stencil_bits Number of entries in both \c depth_bits and - * \c stencil_bits. - * \param db_modes Array of buffer swap modes. If an element has a - * value of \c GLX_NONE, then it represents a - * single-buffered mode. Other valid values are - * \c GLX_SWAP_EXCHANGE_OML, \c GLX_SWAP_COPY_OML, and - * \c GLX_SWAP_UNDEFINED_OML. See the - * GLX_OML_swap_method extension spec for more details. - * \param num_db_modes Number of entries in \c db_modes. - * \param visType GLX visual type. Usually either \c GLX_TRUE_COLOR or - * \c GLX_DIRECT_COLOR. - * - * \returns - * \c GL_TRUE on success or \c GL_FALSE on failure. Currently the only - * cause of failure is a bad parameter (i.e., unsupported \c fb_format or - * \c fb_type). - * - * \todo - * There is currently no way to support packed RGB modes (i.e., modes with - * exactly 3 bytes per pixel) or floating-point modes. This could probably - * be done by creating some new, private enums with clever names likes - * \c GL_UNSIGNED_3BYTE_8_8_8, \c GL_4FLOAT_32_32_32_32, - * \c GL_4HALF_16_16_16_16, etc. We can cross that bridge when we come to it. - */ -GLboolean -_eglFillInConfigs(_EGLConfig * configs, - GLenum fb_format, GLenum fb_type, - const u_int8_t * depth_bits, const u_int8_t * stencil_bits, - unsigned num_depth_stencil_bits, - const GLenum * db_modes, unsigned num_db_modes, - int visType) { - static const u_int8_t bits_table[3][4] = { - /* R G B A */ - { 5, 6, 5, 0 }, /* Any GL_UNSIGNED_SHORT_5_6_5 */ - { 8, 8, 8, 0 }, /* Any RGB with any GL_UNSIGNED_INT_8_8_8_8 */ - { 8, 8, 8, 8 } /* Any RGBA with any GL_UNSIGNED_INT_8_8_8_8 */ - }; - - /* The following arrays are all indexed by the fb_type masked with 0x07. - * Given the four supported fb_type values, this results in valid array - * indices of 3, 4, 5, and 7. - */ - static const u_int32_t masks_table_rgb[8][4] = { - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x0000F800, 0x000007E0, 0x0000001F, 0x00000000}, /* 5_6_5 */ - {0x0000001F, 0x000007E0, 0x0000F800, 0x00000000}, /* 5_6_5_REV */ - {0xFF000000, 0x00FF0000, 0x0000FF00, 0x00000000}, /* 8_8_8_8 */ - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x000000FF, 0x0000FF00, 0x00FF0000, 0x00000000} /* 8_8_8_8_REV */ - }; - - static const u_int32_t masks_table_rgba[8][4] = { - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x0000F800, 0x000007E0, 0x0000001F, 0x00000000}, /* 5_6_5 */ - {0x0000001F, 0x000007E0, 0x0000F800, 0x00000000}, /* 5_6_5_REV */ - {0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF}, /* 8_8_8_8 */ - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000}, /* 8_8_8_8_REV */ - }; - - static const u_int32_t masks_table_bgr[8][4] = { - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x0000001F, 0x000007E0, 0x0000F800, 0x00000000}, /* 5_6_5 */ - {0x0000F800, 0x000007E0, 0x0000001F, 0x00000000}, /* 5_6_5_REV */ - {0x0000FF00, 0x00FF0000, 0xFF000000, 0x00000000}, /* 8_8_8_8 */ - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000}, /* 8_8_8_8_REV */ - }; - - static const u_int32_t masks_table_bgra[8][4] = { - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x0000001F, 0x000007E0, 0x0000F800, 0x00000000}, /* 5_6_5 */ - {0x0000F800, 0x000007E0, 0x0000001F, 0x00000000}, /* 5_6_5_REV */ - {0x0000FF00, 0x00FF0000, 0xFF000000, 0x000000FF}, /* 8_8_8_8 */ - {0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000}, /* 8_8_8_8_REV */ - }; - - static const u_int8_t bytes_per_pixel[8] = { - 0, 0, 0, 2, 2, 4, 0, 4 - }; - - const u_int8_t * bits; - const u_int32_t * masks; - const int index = fb_type & 0x07; - _EGLConfig *config; - unsigned i; - unsigned j; - unsigned k; - - if ( bytes_per_pixel[index] == 0 ) { - fprintf(stderr, "[%s:%u] Framebuffer type 0x%04x has 0 bytes per pixel.\n", - __FUNCTION__, __LINE__, fb_type); - return GL_FALSE; - } - - /* Valid types are GL_UNSIGNED_SHORT_5_6_5 and GL_UNSIGNED_INT_8_8_8_8 and - * the _REV versions. - * - * Valid formats are GL_RGBA, GL_RGB, and GL_BGRA. - */ - switch ( fb_format ) { - case GL_RGB: - bits = (bytes_per_pixel[index] == 2) ? bits_table[0] : bits_table[1]; - masks = masks_table_rgb[index]; - break; - - case GL_RGBA: - bits = (bytes_per_pixel[index] == 2) ? bits_table[0] : bits_table[2]; - masks = masks_table_rgba[index]; - break; - - case GL_BGR: - bits = (bytes_per_pixel[index] == 2) ? bits_table[0] : bits_table[1]; - masks = masks_table_bgr[index]; - break; - - case GL_BGRA: - bits = (bytes_per_pixel[index] == 2) ? bits_table[0] : bits_table[2]; - masks = masks_table_bgra[index]; - break; - - default: - fprintf(stderr, "[%s:%u] Framebuffer format 0x%04x is not GL_RGB, GL_RGBA, GL_BGR, or GL_BGRA.\n", - __FUNCTION__, __LINE__, fb_format); - return GL_FALSE; - } - - config = configs; - for (k = 0; k < num_depth_stencil_bits; k++) { - for (i = 0; i < num_db_modes; i++) { - for (j = 0; j < 2; j++) { - _eglSetConfigAttrib(config, EGL_RED_SIZE, bits[0]); - _eglSetConfigAttrib(config, EGL_GREEN_SIZE, bits[1]); - _eglSetConfigAttrib(config, EGL_BLUE_SIZE, bits[2]); - _eglSetConfigAttrib(config, EGL_ALPHA_SIZE, bits[3]); - _eglSetConfigAttrib(config, EGL_BUFFER_SIZE, - bits[0] + bits[1] + bits[2] + bits[3]); - - _eglSetConfigAttrib(config, EGL_STENCIL_SIZE, stencil_bits[k]); - _eglSetConfigAttrib(config, EGL_DEPTH_SIZE, depth_bits[i]); - - _eglSetConfigAttrib(config, EGL_SURFACE_TYPE, EGL_SCREEN_BIT_MESA | - EGL_PBUFFER_BIT | EGL_PIXMAP_BIT | EGL_WINDOW_BIT); - - config++; - } - } - } - return GL_TRUE; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglconfig.h b/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglconfig.h deleted file mode 100644 index 65ce0f3ed7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglconfig.h +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef EGLCONFIG_INCLUDED -#define EGLCONFIG_INCLUDED - - -#include "egltypedefs.h" -#include "GL/internal/glcore.h" - - -#define MAX_ATTRIBS 100 -#define FIRST_ATTRIB EGL_BUFFER_SIZE - - -struct _egl_config -{ - EGLConfig Handle; /* the public/opaque handle which names this config */ - EGLint Attrib[MAX_ATTRIBS]; -}; - - -#define SET_CONFIG_ATTRIB(CONF, ATTR, VAL) ((CONF)->Attrib[(ATTR) - FIRST_ATTRIB] = VAL) -#define GET_CONFIG_ATTRIB(CONF, ATTR) ((CONF)->Attrib[(ATTR) - FIRST_ATTRIB]) - - -extern void -_eglInitConfig(_EGLConfig *config, EGLint id); - - -extern _EGLConfig * -_eglLookupConfig(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config); - - -extern _EGLConfig * -_eglAddConfig(_EGLDisplay *display, const _EGLConfig *config); - - -extern EGLBoolean -_eglParseConfigAttribs(_EGLConfig *config, const EGLint *attrib_list); - - -extern EGLBoolean -_eglConfigQualifies(const _EGLConfig *c, const _EGLConfig *min); - - -extern EGLint -_eglCompareConfigs(const _EGLConfig *a, const _EGLConfig *b); - - -extern EGLBoolean -_eglChooseConfig(_EGLDriver *drv, EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); - - -extern EGLBoolean -_eglGetConfigAttrib(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); - - -extern EGLBoolean -_eglGetConfigs(_EGLDriver *drv, EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config); - - -extern void -_eglSetConfigAttrib(_EGLConfig *config, EGLint attr, EGLint val); - -extern GLboolean -_eglFillInConfigs( _EGLConfig *configs, - GLenum fb_format, GLenum fb_type, - const u_int8_t * depth_bits, const u_int8_t * stencil_bits, - unsigned num_depth_stencil_bits, - const GLenum * db_modes, unsigned num_db_modes, - int visType ); - -extern void -_eglConfigToContextModesRec(const _EGLConfig *config, __GLcontextModes *mode); - - -#endif /* EGLCONFIG_INCLUDED */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglcontext.c b/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglcontext.c deleted file mode 100644 index 283dd3f1a5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglcontext.c +++ /dev/null @@ -1,240 +0,0 @@ -#include -#include -#include -#include "eglconfig.h" -#include "eglcontext.h" -#include "egldriver.h" -#include "eglglobals.h" -#include "eglhash.h" -#include "eglsurface.h" - - -/** - * Initialize the given _EGLContext object to defaults. - */ -void -_eglInitContext(_EGLContext *ctx) -{ - /* just init to zero for now */ - memset(ctx, 0, sizeof(_EGLContext)); -} - - -/* - * Assign an EGLContext handle to the _EGLContext object then put it into - * the hash table. - */ -void -_eglSaveContext(_EGLContext *ctx) -{ - assert(ctx); - ctx->Handle = _eglHashGenKey(_eglGlobal.Contexts); - _eglHashInsert(_eglGlobal.Contexts, ctx->Handle, ctx); -} - - -/** - * Remove the given _EGLContext object from the hash table. - */ -void -_eglRemoveContext(_EGLContext *ctx) -{ - _eglHashRemove(_eglGlobal.Contexts, ctx->Handle); -} - - -/** - * Return the _EGLContext object that corresponds to the given - * EGLContext handle. - */ -_EGLContext * -_eglLookupContext(EGLContext ctx) -{ - _EGLContext *c = (_EGLContext *) _eglHashLookup(_eglGlobal.Contexts, ctx); - return c; -} - - -/** - * Return the currently bound _EGLContext object, or NULL. - */ -_EGLContext * -_eglGetCurrentContext(void) -{ - /* XXX this should be per-thread someday */ - return _eglGlobal.CurrentContext; -} - - -/** - * Just a placeholder/demo function. Real driver will never use this! - */ -EGLContext -_eglCreateContext(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list) -{ - _EGLConfig *conf = _eglLookupConfig(drv, dpy, config); - if (!conf) { - _eglError(EGL_BAD_CONFIG, "eglCreateContext"); - return EGL_NO_CONTEXT; - } - - if (share_list != EGL_NO_CONTEXT) { - _EGLContext *shareCtx = _eglLookupContext(share_list); - if (!shareCtx) { - _eglError(EGL_BAD_CONTEXT, "eglCreateContext(share_list)"); - return EGL_NO_CONTEXT; - } - } - - return EGL_NO_CONTEXT; -} - - -/** - * Default fallback routine - drivers should usually override this. - */ -EGLBoolean -_eglDestroyContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext ctx) -{ - _EGLContext *context = _eglLookupContext(ctx); - if (context) { - _eglHashRemove(_eglGlobal.Contexts, ctx); - if (context->IsBound) { - context->DeletePending = EGL_TRUE; - } - else { - free(context); - } - return EGL_TRUE; - } - else { - _eglError(EGL_BAD_CONTEXT, "eglDestroyContext"); - return EGL_TRUE; - } -} - - -EGLBoolean -_eglQueryContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value) -{ - _EGLContext *c = _eglLookupContext(ctx); - - (void) drv; - (void) dpy; - - if (!c) { - _eglError(EGL_BAD_CONTEXT, "eglQueryContext"); - return EGL_FALSE; - } - - switch (attribute) { - case EGL_CONFIG_ID: - *value = GET_CONFIG_ATTRIB(c->Config, EGL_CONFIG_ID); - return EGL_TRUE; - default: - _eglError(EGL_BAD_ATTRIBUTE, "eglQueryContext"); - return EGL_FALSE; - } -} - - -/** - * Drivers will typically call this to do the error checking and - * update the various IsBound and DeletePending flags. - * Then, the driver will do its device-dependent Make-Current stuff. - */ -EGLBoolean -_eglMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface d, EGLSurface r, EGLContext context) -{ - _EGLContext *ctx = _eglLookupContext(context); - _EGLSurface *draw = _eglLookupSurface(d); - _EGLSurface *read = _eglLookupSurface(r); - - _EGLContext *oldContext = _eglGetCurrentContext(); - _EGLSurface *oldDrawSurface = _eglGetCurrentSurface(EGL_DRAW); - _EGLSurface *oldReadSurface = _eglGetCurrentSurface(EGL_READ); - - /* error checking */ - if (ctx) { - if (draw == NULL || read == NULL) { - _eglError(EGL_BAD_MATCH, "eglMakeCurrent"); - return EGL_FALSE; - } - if (draw->Config != ctx->Config) { - _eglError(EGL_BAD_MATCH, "eglMakeCurrent"); - return EGL_FALSE; - } - if (read->Config != ctx->Config) { - _eglError(EGL_BAD_MATCH, "eglMakeCurrent"); - return EGL_FALSE; - } - } - - /* - * check if the old context or surfaces need to be deleted - */ - if (oldDrawSurface != NULL) { - oldDrawSurface->IsBound = EGL_FALSE; - if (oldDrawSurface->DeletePending) { - /* make sure we don't try to rebind a deleted surface */ - if (draw == oldDrawSurface || draw == oldReadSurface) { - draw = NULL; - } - /* really delete surface now */ - drv->DestroySurface(drv, dpy, oldDrawSurface->Handle); - } - } - if (oldReadSurface != NULL && oldReadSurface != oldDrawSurface) { - oldReadSurface->IsBound = EGL_FALSE; - if (oldReadSurface->DeletePending) { - /* make sure we don't try to rebind a deleted surface */ - if (read == oldDrawSurface || read == oldReadSurface) { - read = NULL; - } - /* really delete surface now */ - drv->DestroySurface(drv, dpy, oldReadSurface->Handle); - } - } - if (oldContext != NULL) { - oldContext->IsBound = EGL_FALSE; - if (oldContext->DeletePending) { - /* make sure we don't try to rebind a deleted context */ - if (ctx == oldContext) { - ctx = NULL; - } - /* really delete context now */ - drv->DestroyContext(drv, dpy, oldContext->Handle); - } - } - - if (ctx) { - /* check read/draw again, in case we deleted them above */ - if (draw == NULL || read == NULL) { - _eglError(EGL_BAD_MATCH, "eglMakeCurrent"); - return EGL_FALSE; - } - ctx->DrawSurface = draw; - ctx->ReadSurface = read; - ctx->IsBound = EGL_TRUE; - draw->IsBound = EGL_TRUE; - read->IsBound = EGL_TRUE; - } - - _eglGlobal.CurrentContext = ctx; - - return EGL_TRUE; -} - - -/** - * This is defined by the EGL_MESA_copy_context extension. - */ -EGLBoolean -_eglCopyContextMESA(_EGLDriver *drv, EGLDisplay dpy, EGLContext source, - EGLContext dest, EGLint mask) -{ - /* This function will always have to be overridden/implemented in the - * device driver. If the driver is based on Mesa, use _mesa_copy_context(). - */ - return EGL_FALSE; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglcontext.h b/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglcontext.h deleted file mode 100644 index d74d6e3253..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglcontext.h +++ /dev/null @@ -1,67 +0,0 @@ - -#ifndef EGLCONTEXT_INCLUDED -#define EGLCONTEXT_INCLUDED - - -#include "egltypedefs.h" - - -/** - * "Base" class for device driver contexts. - */ -struct _egl_context -{ - EGLContext Handle; /* The public/opaque handle which names this object */ - - _EGLDisplay *Display; /* who do I belong to? */ - - _EGLConfig *Config; - - _EGLSurface *DrawSurface; - _EGLSurface *ReadSurface; - - EGLBoolean IsBound; - EGLBoolean DeletePending; -}; - - -extern void -_eglInitContext(_EGLContext *ctx); - - -extern void -_eglSaveContext(_EGLContext *ctx); - - -extern void -_eglRemoveContext(_EGLContext *ctx); - - -extern _EGLContext * -_eglLookupContext(EGLContext ctx); - - -extern _EGLContext * -_eglGetCurrentContext(void); - - -extern EGLContext -_eglCreateContext(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list); - - -extern EGLBoolean -_eglDestroyContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext ctx); - - -extern EGLBoolean -_eglQueryContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value); - - -extern EGLBoolean -_eglMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); - - -extern EGLBoolean -_eglCopyContextMESA(_EGLDriver *drv, EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask); - -#endif /* EGLCONTEXT_INCLUDED */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/egldisplay.c b/nx-X11/extras/Mesa_6.4.2/src/egl/main/egldisplay.c deleted file mode 100644 index 669a4d5084..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/egldisplay.c +++ /dev/null @@ -1,71 +0,0 @@ -#include -#include -#include "eglcontext.h" -#include "egldisplay.h" -#include "eglglobals.h" -#include "eglhash.h" - - -static char * -my_strdup(const char *s) -{ - int l = strlen(s); - char *s2 = malloc(l + 1); - strcpy(s2, s); - return s2; -} - - -/** - * We're assuming that the NativeDisplayType parameter is actually - * a string. - * Return a new _EGLDisplay object for the given displayName - */ -_EGLDisplay * -_eglNewDisplay(NativeDisplayType displayName) -{ - _EGLDisplay *dpy = (_EGLDisplay *) malloc(sizeof(_EGLDisplay)); - if (dpy) { - dpy->Handle = _eglHashGenKey(_eglGlobal.Displays); - _eglHashInsert(_eglGlobal.Displays, dpy->Handle, dpy); - if (displayName) - dpy->Name = my_strdup(displayName); - else - dpy->Name = NULL; - dpy->Driver = NULL; /* this gets set later */ - } - return dpy; -} - - -/** - * Return the _EGLDisplay object that corresponds to the given public/ - * opaque display handle. - */ -_EGLDisplay * -_eglLookupDisplay(EGLDisplay dpy) -{ - _EGLDisplay *d = (_EGLDisplay *) _eglHashLookup(_eglGlobal.Displays, dpy); - return d; -} - - -_EGLDisplay * -_eglGetCurrentDisplay(void) -{ - _EGLContext *ctx = _eglGetCurrentContext(); - if (ctx) - return ctx->Display; - else - return NULL; -} - - -void -_eglCleanupDisplay(_EGLDisplay *disp) -{ - /* XXX incomplete */ - free(disp->Configs); - free(disp->Name); - /* driver deletes _EGLDisplay */ -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/egldisplay.h b/nx-X11/extras/Mesa_6.4.2/src/egl/main/egldisplay.h deleted file mode 100644 index 1a03fdd4ad..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/egldisplay.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef EGLDISPLAY_INCLUDED -#define EGLDISPLAY_INCLUDED - - -#include "egltypedefs.h" - - -struct _egl_display -{ - EGLDisplay Handle; - - char *Name; - _EGLDriver *Driver; - - EGLint NumScreens; - _EGLScreen **Screens; /* array [NumScreens] */ - - EGLint NumConfigs; - _EGLConfig *Configs; /* array [NumConfigs] */ -}; - - -extern _EGLDisplay * -_eglNewDisplay(NativeDisplayType displayName); - - -extern _EGLDisplay * -_eglLookupDisplay(EGLDisplay dpy); - - -extern _EGLDisplay * -_eglGetCurrentDisplay(void); - - -extern void -_eglCleanupDisplay(_EGLDisplay *disp); - - -extern EGLBoolean -_eglQueryDisplayMESA(_EGLDriver *drv, EGLDisplay dpy, EGLint attrib, EGLint *value); - - - -#endif /* EGLDISPLAY_INCLUDED */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/egldriver.c b/nx-X11/extras/Mesa_6.4.2/src/egl/main/egldriver.c deleted file mode 100644 index 6e8c9b3b4c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/egldriver.c +++ /dev/null @@ -1,251 +0,0 @@ -#include -#include -#include -#include -#include "eglconfig.h" -#include "eglcontext.h" -#include "egldisplay.h" -#include "egldriver.h" -#include "eglglobals.h" -#include "eglmode.h" -#include "eglscreen.h" -#include "eglsurface.h" - - -const char *DefaultDriverName = "demodriver"; - - -/** - * Choose and open/init the hardware driver for the given EGLDisplay. - * Previously, the EGLDisplay was created with _eglNewDisplay() where - * we recorded the user's NativeDisplayType parameter. - * - * Now we'll use the NativeDisplayType value. - * - * Currently, the native display value is treated as a string. - * If the first character is ':' we interpret it as a screen or card index - * number (i.e. ":0" or ":1", etc) - * Else if the first character is '!' we interpret it as specific driver name - * (i.e. "!r200" or "!i830". - */ -_EGLDriver * -_eglChooseDriver(EGLDisplay display) -{ - _EGLDisplay *dpy = _eglLookupDisplay(display); - _EGLDriver *drv; - const char *driverName = DefaultDriverName; - const char *name; - - assert(dpy); - - name = dpy->Name; - if (!name) { - /* use default */ - } - else if (name[0] == ':' && (name[1] >= '0' && name[1] <= '9') && !name[2]) { - printf("EGL: Use driver for screen: %s\n", name); - /* XXX probe hardware here to determine which driver to open */ - driverName = "libEGLdri"; - } - else if (name[0] == '!') { - /* use specified driver name */ - driverName = name + 1; - printf("EGL: Use driver named %s\n", driverName); - } - else { - /* Maybe display was returned by XOpenDisplay? */ - printf("EGL: can't parse display pointer\n"); - } - - drv = _eglOpenDriver(dpy, driverName); - dpy->Driver = drv; - - return drv; -} - - -/** - * Open/load the named driver and call its bootstrap function: _eglMain(). - * \return new _EGLDriver object. - */ -_EGLDriver * -_eglOpenDriver(_EGLDisplay *dpy, const char *driverName) -{ - _EGLDriver *drv; - _EGLMain_t mainFunc; - void *lib; - char driverFilename[1000]; - - /* XXX also prepend a directory path??? */ - sprintf(driverFilename, "%s.so", driverName); - - lib = dlopen(driverFilename, RTLD_NOW); - if (!lib) { - fprintf(stderr, "EGLdebug: Error opening %s: %s\n", driverFilename, dlerror()); - return NULL; - } - - mainFunc = (_EGLMain_t) dlsym(lib, "_eglMain"); - if (!mainFunc) { - fprintf(stderr, "_eglMain not found in %s", (char *) driverFilename); - dlclose(lib); - return NULL; - } - - drv = mainFunc(dpy); - if (!drv) { - dlclose(lib); - return NULL; - } - /* with a recurvise open you want the inner most handle */ - if (!drv->LibHandle) - drv->LibHandle = lib; - else - dlclose(lib); - - drv->Display = dpy; - return drv; -} - - -EGLBoolean -_eglCloseDriver(_EGLDriver *drv, EGLDisplay dpy) -{ - void *handle = drv->LibHandle; - EGLBoolean b; - fprintf(stderr, "EGL debug: Closing driver\n"); - - /* - * XXX check for currently bound context/surfaces and delete them? - */ - - b = drv->Terminate(drv, dpy); - dlclose(handle); - return b; -} - - -/** - * Given a display handle, return the _EGLDriver for that display. - */ -_EGLDriver * -_eglLookupDriver(EGLDisplay dpy) -{ - _EGLDisplay *d = _eglLookupDisplay(dpy); - if (d) - return d->Driver; - else - return NULL; -} - - -/** - * Plug all the available fallback routines into the given driver's - * dispatch table. - */ -void -_eglInitDriverFallbacks(_EGLDriver *drv) -{ - /* If a pointer is set to NULL, then the device driver _really_ has - * to implement it. - */ - drv->Initialize = NULL; - drv->Terminate = NULL; - - drv->GetConfigs = _eglGetConfigs; - drv->ChooseConfig = _eglChooseConfig; - drv->GetConfigAttrib = _eglGetConfigAttrib; - - drv->CreateContext = _eglCreateContext; - drv->DestroyContext = _eglDestroyContext; - drv->MakeCurrent = _eglMakeCurrent; - drv->QueryContext = _eglQueryContext; - - drv->CreateWindowSurface = _eglCreateWindowSurface; - drv->CreatePixmapSurface = _eglCreatePixmapSurface; - drv->CreatePbufferSurface = _eglCreatePbufferSurface; - drv->DestroySurface = _eglDestroySurface; - drv->QuerySurface = _eglQuerySurface; - drv->SurfaceAttrib = _eglSurfaceAttrib; - drv->BindTexImage = _eglBindTexImage; - drv->ReleaseTexImage = _eglReleaseTexImage; - drv->SwapInterval = _eglSwapInterval; - drv->SwapBuffers = _eglSwapBuffers; - drv->CopyBuffers = _eglCopyBuffers; - - drv->QueryString = _eglQueryString; - drv->WaitGL = _eglWaitGL; - drv->WaitNative = _eglWaitNative; - - /* EGL_MESA_screen */ - drv->ChooseModeMESA = _eglChooseModeMESA; - drv->GetModesMESA = _eglGetModesMESA; - drv->GetModeAttribMESA = _eglGetModeAttribMESA; - drv->GetScreensMESA = _eglGetScreensMESA; - drv->CreateScreenSurfaceMESA = _eglCreateScreenSurfaceMESA; - drv->ShowSurfaceMESA = _eglShowSurfaceMESA; - drv->ScreenPositionMESA = _eglScreenPositionMESA; - drv->QueryScreenMESA = _eglQueryScreenMESA; - drv->QueryScreenSurfaceMESA = _eglQueryScreenSurfaceMESA; - drv->QueryScreenModeMESA = _eglQueryScreenModeMESA; - drv->QueryModeStringMESA = _eglQueryModeStringMESA; -} - - -/** - * Examine the individual extension enable/disable flags and recompute - * the driver's Extensions string. - */ -static void -UpdateExtensionsString(_EGLDriver *drv) -{ - drv->Extensions[0] = 0; - - if (drv->MESA_screen_surface) - strcat(drv->Extensions, "EGL_MESA_screen_surface "); - if (drv->MESA_copy_context) - strcat(drv->Extensions, "EGL_MESA_copy_context "); - assert(strlen(drv->Extensions) < MAX_EXTENSIONS_LEN); -} - - - -const char * -_eglQueryString(_EGLDriver *drv, EGLDisplay dpy, EGLint name) -{ - (void) drv; - (void) dpy; - switch (name) { - case EGL_VENDOR: - return "Mesa Project"; - case EGL_VERSION: - return "1.0"; - case EGL_EXTENSIONS: - UpdateExtensionsString(drv); - return drv->Extensions; - default: - _eglError(EGL_BAD_PARAMETER, "eglQueryString"); - return NULL; - } -} - - -EGLBoolean -_eglWaitGL(_EGLDriver *drv, EGLDisplay dpy) -{ - /* just a placeholder */ - (void) drv; - (void) dpy; - return EGL_TRUE; -} - - -EGLBoolean -_eglWaitNative(_EGLDriver *drv, EGLDisplay dpy, EGLint engine) -{ - /* just a placeholder */ - (void) drv; - (void) dpy; - (void) engine; - return EGL_TRUE; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/egldriver.h b/nx-X11/extras/Mesa_6.4.2/src/egl/main/egldriver.h deleted file mode 100644 index 7ab62f1827..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/egldriver.h +++ /dev/null @@ -1,164 +0,0 @@ -#ifndef EGLDRIVER_INCLUDED -#define EGLDRIVER_INCLUDED - - -#include "egltypedefs.h" - -/* should probably use a dynamic-lengh string, but this will do */ -#define MAX_EXTENSIONS_LEN 1000 - - -/* driver funcs */ -typedef EGLBoolean (*Initialize_t)(_EGLDriver *, EGLDisplay dpy, EGLint *major, EGLint *minor); -typedef EGLBoolean (*Terminate_t)(_EGLDriver *, EGLDisplay dpy); - -/* config funcs */ -typedef EGLBoolean (*GetConfigs_t)(_EGLDriver *drv, EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config); -typedef EGLBoolean (*ChooseConfig_t)(_EGLDriver *drv, EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); -typedef EGLBoolean (*GetConfigAttrib_t)(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); - -/* context funcs */ -typedef EGLContext (*CreateContext_t)(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list); -typedef EGLBoolean (*DestroyContext_t)(_EGLDriver *drv, EGLDisplay dpy, EGLContext ctx); -typedef EGLBoolean (*MakeCurrent_t)(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); -typedef EGLBoolean (*QueryContext_t)(_EGLDriver *drv, EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value); - -/* surface funcs */ -typedef EGLSurface (*CreateWindowSurface_t)(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list); -typedef EGLSurface (*CreatePixmapSurface_t)(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list); -typedef EGLSurface (*CreatePbufferSurface_t)(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); -typedef EGLBoolean (*DestroySurface_t)(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface); -typedef EGLBoolean (*QuerySurface_t)(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value); -typedef EGLBoolean (*SurfaceAttrib_t)(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); -typedef EGLBoolean (*BindTexImage_t)(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, EGLint buffer); -typedef EGLBoolean (*ReleaseTexImage_t)(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, EGLint buffer); -typedef EGLBoolean (*SwapInterval_t)(_EGLDriver *drv, EGLDisplay dpy, EGLint interval); -typedef EGLBoolean (*SwapBuffers_t)(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw); -typedef EGLBoolean (*CopyBuffers_t)(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, NativePixmapType target); - -/* misc funcs */ -typedef const char *(*QueryString_t)(_EGLDriver *drv, EGLDisplay dpy, EGLint name); -typedef EGLBoolean (*WaitGL_t)(_EGLDriver *drv, EGLDisplay dpy); -typedef EGLBoolean (*WaitNative_t)(_EGLDriver *drv, EGLDisplay dpy, EGLint engine); - - -/* EGL_MESA_screen extension */ -typedef EGLBoolean (*ChooseModeMESA_t)(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); -typedef EGLBoolean (*GetModesMESA_t)(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint mode_size, EGLint *num_mode); -typedef EGLBoolean (*GetModeAttribMESA_t)(_EGLDriver *drv, EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value); -typedef EGLBoolean (*CopyContextMESA_t)(_EGLDriver *drv, EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask); -typedef EGLBoolean (*GetScreensMESA_t)(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens); -typedef EGLSurface (*CreateScreenSurfaceMESA_t)(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); -typedef EGLBoolean (*ShowSurfaceMESA_t)(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, EGLSurface surface, EGLModeMESA mode); -typedef EGLBoolean (*ScreenPositionMESA_t)(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y); -typedef EGLBoolean (*QueryScreenMESA_t)(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value); -typedef EGLBoolean (*QueryScreenSurfaceMESA_t)(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface); -typedef EGLBoolean (*QueryScreenModeMESA_t)(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode); -typedef const char * (*QueryModeStringMESA_t)(_EGLDriver *drv, EGLDisplay dpy, EGLModeMESA mode); - - -/** - * Base class for device drivers. - */ -struct _egl_driver -{ - EGLBoolean Initialized; /* set by driver after initialized */ - - void *LibHandle; /* dlopen handle */ - - _EGLDisplay *Display; - - int ABIversion; - int APImajor, APIminor; /* returned through eglInitialize */ - - /* - * The API dispatcher jumps through these functions - */ - Initialize_t Initialize; - Terminate_t Terminate; - - GetConfigs_t GetConfigs; - ChooseConfig_t ChooseConfig; - GetConfigAttrib_t GetConfigAttrib; - - CreateContext_t CreateContext; - DestroyContext_t DestroyContext; - MakeCurrent_t MakeCurrent; - QueryContext_t QueryContext; - - CreateWindowSurface_t CreateWindowSurface; - CreatePixmapSurface_t CreatePixmapSurface; - CreatePbufferSurface_t CreatePbufferSurface; - DestroySurface_t DestroySurface; - QuerySurface_t QuerySurface; - SurfaceAttrib_t SurfaceAttrib; - BindTexImage_t BindTexImage; - ReleaseTexImage_t ReleaseTexImage; - SwapInterval_t SwapInterval; - SwapBuffers_t SwapBuffers; - CopyBuffers_t CopyBuffers; - - QueryString_t QueryString; - WaitGL_t WaitGL; - WaitNative_t WaitNative; - - /* EGL_MESA_screen extension */ - ChooseModeMESA_t ChooseModeMESA; - GetModesMESA_t GetModesMESA; - GetModeAttribMESA_t GetModeAttribMESA; - CopyContextMESA_t CopyContextMESA; - GetScreensMESA_t GetScreensMESA; - CreateScreenSurfaceMESA_t CreateScreenSurfaceMESA; - ShowSurfaceMESA_t ShowSurfaceMESA; - ScreenPositionMESA_t ScreenPositionMESA; - QueryScreenMESA_t QueryScreenMESA; - QueryScreenSurfaceMESA_t QueryScreenSurfaceMESA; - QueryScreenModeMESA_t QueryScreenModeMESA; - QueryModeStringMESA_t QueryModeStringMESA; - - /* Extension enable flags */ - EGLBoolean MESA_screen_surface; - EGLBoolean MESA_copy_context; - - /* Extensions string */ - char Extensions[MAX_EXTENSIONS_LEN]; -}; - - -extern _EGLDriver *_eglMain(_EGLDisplay *dpy); - - -extern _EGLDriver * -_eglChooseDriver(EGLDisplay dpy); - - -extern _EGLDriver * -_eglOpenDriver(_EGLDisplay *dpy, const char *driverName); - - -extern EGLBoolean -_eglCloseDriver(_EGLDriver *drv, EGLDisplay dpy); - - -extern _EGLDriver * -_eglLookupDriver(EGLDisplay d); - - -extern void -_eglInitDriverFallbacks(_EGLDriver *drv); - - -extern const char * -_eglQueryString(_EGLDriver *drv, EGLDisplay dpy, EGLint name); - - -extern EGLBoolean -_eglWaitGL(_EGLDriver *drv, EGLDisplay dpy); - - -extern EGLBoolean -_eglWaitNative(_EGLDriver *drv, EGLDisplay dpy, EGLint engine); - - - -#endif /* EGLDRIVER_INCLUDED */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglglobals.c b/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglglobals.c deleted file mode 100644 index 6265b07529..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglglobals.c +++ /dev/null @@ -1,65 +0,0 @@ -#include -#include "eglglobals.h" - - -struct _egl_global _eglGlobal = { EGL_FALSE }; - - -/** - * Init the fields in the _eglGlobal struct - * May be safely called more than once. - */ -void -_eglInitGlobals(void) -{ - if (!_eglGlobal.Initialized) { - _eglGlobal.Displays = _eglNewHashTable(); - _eglGlobal.Contexts = _eglNewHashTable(); - _eglGlobal.Surfaces = _eglNewHashTable(); - _eglGlobal.FreeScreenHandle = 1; - _eglGlobal.CurrentContext = EGL_NO_CONTEXT; - _eglGlobal.LastError = EGL_SUCCESS; - _eglGlobal.Initialized = EGL_TRUE; - } -} - - -/** - * Should call this via an atexit handler. - */ -void -_eglDestroyGlobals(void) -{ - /* XXX TODO walk over table entries, deleting each */ - _eglDeleteHashTable(_eglGlobal.Displays); - _eglDeleteHashTable(_eglGlobal.Contexts); - _eglDeleteHashTable(_eglGlobal.Surfaces); -} - - - -/** - * Record EGL error code. - */ -void -_eglError(EGLint errCode, const char *msg) -{ - if (_eglGlobal.LastError == EGL_SUCCESS) { - _eglGlobal.LastError = errCode; - /* XXX temporary */ - fprintf(stderr, "EGL Error 0x%x in %s\n", errCode, msg); - } -} - - -/** - * Return a new screen handle/ID. - * NOTE: we never reuse these! - */ -EGLScreenMESA -_eglAllocScreenHandle(void) -{ - EGLScreenMESA s = _eglGlobal.FreeScreenHandle; - _eglGlobal.FreeScreenHandle++; - return s; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglglobals.h b/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglglobals.h deleted file mode 100644 index 1a6f12d174..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglglobals.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef EGLGLOBALS_INCLUDED -#define EGLGLOBALS_INCLUDED - -#include "egltypedefs.h" -#include "eglhash.h" - - -struct _egl_global -{ - EGLBoolean Initialized; - - _EGLHashtable *Displays; - _EGLHashtable *Contexts; - _EGLHashtable *Surfaces; - - EGLScreenMESA FreeScreenHandle; - - EGLint LastError; - - /* XXX this should be per-thread someday */ - _EGLContext *CurrentContext; -}; - - -extern struct _egl_global _eglGlobal; - - -extern void -_eglInitGlobals(void); - - -extern void -_eglDestroyGlobals(void); - - -extern void -_eglError(EGLint errCode, const char *msg); - - -extern EGLScreenMESA -_eglAllocScreenHandle(void); - - -#endif /* EGLGLOBALS_INCLUDED */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglhash.c b/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglhash.c deleted file mode 100644 index 8e3da2e906..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglhash.c +++ /dev/null @@ -1,347 +0,0 @@ -/** - * \file hash.c - * Generic hash table. - * - * This code taken from Mesa and adapted. - */ - -#include -#include -#include -#include "eglhash.h" - - -#define TABLE_SIZE 1023 /**< Size of lookup table/array */ - -#define HASH_FUNC(K) ((K) % TABLE_SIZE) - - -/* - * Unfinished mutex stuff - */ - -typedef int _EGLMutex; - -static void -_eglInitMutex(_EGLMutex m) -{ -} - -static void -_eglDestroyMutex(_EGLMutex m) -{ -} - -static void -_eglLockMutex(_EGLMutex m) -{ -} - -static void -_eglUnlockMutex(_EGLMutex m) -{ -} - - - -typedef struct _egl_hashentry _EGLHashentry; - -struct _egl_hashentry -{ - EGLuint Key; /**< the entry's key */ - void *Data; /**< the entry's data */ - _EGLHashentry *Next; /**< pointer to next entry */ -}; - - -struct _egl_hashtable -{ - _EGLHashentry *Table[TABLE_SIZE]; /**< the lookup table */ - EGLuint MaxKey; /**< highest key inserted so far */ - _EGLMutex Mutex; /**< mutual exclusion lock */ -}; - - -/** - * Create a new hash table. - * - * \return pointer to a new, empty hash table. - */ -_EGLHashtable * -_eglNewHashTable(void) -{ - _EGLHashtable *table = (_EGLHashtable *) calloc(1, sizeof(_EGLHashtable)); - if (table) { - _eglInitMutex(table->Mutex); - table->MaxKey = 1; - } - return table; -} - - - -/** - * Delete a hash table. - * Frees each entry on the hash table and then the hash table structure itself. - * Note that the caller should have already traversed the table and deleted - * the objects in the table (i.e. We don't free the entries' data pointer). - * - * \param table the hash table to delete. - */ -void -_eglDeleteHashTable(_EGLHashtable *table) -{ - EGLuint i; - assert(table); - for (i = 0; i < TABLE_SIZE; i++) { - _EGLHashentry *entry = table->Table[i]; - while (entry) { - _EGLHashentry *next = entry->Next; - free(entry); - entry = next; - } - } - _eglDestroyMutex(table->Mutex); - free(table); -} - - - -/** - * Lookup an entry in the hash table. - * - * \param table the hash table. - * \param key the key. - * - * \return pointer to user's data or NULL if key not in table - */ -void * -_eglHashLookup(const _EGLHashtable *table, EGLuint key) -{ - EGLuint pos; - const _EGLHashentry *entry; - - assert(table); - - if (!key) - return NULL; - - pos = HASH_FUNC(key); - entry = table->Table[pos]; - while (entry) { - if (entry->Key == key) { - return entry->Data; - } - entry = entry->Next; - } - return NULL; -} - - - -/** - * Insert a key/pointer pair into the hash table. - * If an entry with this key already exists we'll replace the existing entry. - * - * \param table the hash table. - * \param key the key (not zero). - * \param data pointer to user data. - */ -void -_eglHashInsert(_EGLHashtable *table, EGLuint key, void *data) -{ - /* search for existing entry with this key */ - EGLuint pos; - _EGLHashentry *entry; - - assert(table); - assert(key); - - _eglLockMutex(table->Mutex); - - if (key > table->MaxKey) - table->MaxKey = key; - - pos = HASH_FUNC(key); - entry = table->Table[pos]; - while (entry) { - if (entry->Key == key) { - /* replace entry's data */ - entry->Data = data; - _eglUnlockMutex(table->Mutex); - return; - } - entry = entry->Next; - } - - /* alloc and insert new table entry */ - entry = (_EGLHashentry *) malloc(sizeof(_EGLHashentry)); - entry->Key = key; - entry->Data = data; - entry->Next = table->Table[pos]; - table->Table[pos] = entry; - - _eglUnlockMutex(table->Mutex); -} - - - -/** - * Remove an entry from the hash table. - * - * \param table the hash table. - * \param key key of entry to remove. - * - * While holding the hash table's lock, searches the entry with the matching - * key and unlinks it. - */ -void -_eglHashRemove(_EGLHashtable *table, EGLuint key) -{ - EGLuint pos; - _EGLHashentry *entry, *prev; - - assert(table); - assert(key); - - _eglLockMutex(table->Mutex); - - pos = HASH_FUNC(key); - prev = NULL; - entry = table->Table[pos]; - while (entry) { - if (entry->Key == key) { - /* found it! */ - if (prev) { - prev->Next = entry->Next; - } - else { - table->Table[pos] = entry->Next; - } - free(entry); - _eglUnlockMutex(table->Mutex); - return; - } - prev = entry; - entry = entry->Next; - } - - _eglUnlockMutex(table->Mutex); -} - - - -/** - * Get the key of the "first" entry in the hash table. - * - * This is used in the course of deleting all display lists when - * a context is destroyed. - * - * \param table the hash table - * - * \return key for the "first" entry in the hash table. - * - * While holding the lock, walks through all table positions until finding - * the first entry of the first non-empty one. - */ -EGLuint -_eglHashFirstEntry(_EGLHashtable *table) -{ - EGLuint pos; - assert(table); - _eglLockMutex(table->Mutex); - for (pos = 0; pos < TABLE_SIZE; pos++) { - if (table->Table[pos]) { - _eglUnlockMutex(table->Mutex); - return table->Table[pos]->Key; - } - } - _eglUnlockMutex(table->Mutex); - return 0; -} - - -/** - * Given a hash table key, return the next key. This is used to walk - * over all entries in the table. Note that the keys returned during - * walking won't be in any particular order. - * \return next hash key or 0 if end of table. - */ -EGLuint -_eglHashNextEntry(const _EGLHashtable *table, EGLuint key) -{ - const _EGLHashentry *entry; - EGLuint pos; - - assert(table); - assert(key); - - /* Find the entry with given key */ - pos = HASH_FUNC(key); - entry = table->Table[pos]; - while (entry) { - if (entry->Key == key) { - break; - } - entry = entry->Next; - } - - if (!entry) { - /* the key was not found, we can't find next entry */ - return 0; - } - - if (entry->Next) { - /* return next in linked list */ - return entry->Next->Key; - } - else { - /* look for next non-empty table slot */ - pos++; - while (pos < TABLE_SIZE) { - if (table->Table[pos]) { - return table->Table[pos]->Key; - } - pos++; - } - return 0; - } -} - - -/** - * Dump contents of hash table for debugging. - * - * \param table the hash table. - */ -void -_eglHashPrint(const _EGLHashtable *table) -{ - EGLuint i; - assert(table); - for (i = 0; i < TABLE_SIZE; i++) { - const _EGLHashentry *entry = table->Table[i]; - while (entry) { - printf("%u %p\n", entry->Key, entry->Data); - entry = entry->Next; - } - } -} - - - -/** - * Return a new, unused hash key. - */ -EGLuint -_eglHashGenKey(_EGLHashtable *table) -{ - EGLuint k; - - _eglLockMutex(table->Mutex); - k = table->MaxKey; - table->MaxKey++; - _eglUnlockMutex(table->Mutex); - return k; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglhash.h b/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglhash.h deleted file mode 100644 index 1d6db9598c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglhash.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - * \file eglhash.h - * Generic hash table. - */ - - -#ifndef EGLHASH_INCLUDED -#define EGLHASH_INCLUDED - - -/* XXX move this? */ -typedef unsigned int EGLuint; - - -typedef struct _egl_hashtable _EGLHashtable; - - -extern _EGLHashtable *_eglNewHashTable(void); - -extern void _eglDeleteHashTable(_EGLHashtable *table); - -extern void *_eglHashLookup(const _EGLHashtable *table, EGLuint key); - -extern void _eglHashInsert(_EGLHashtable *table, EGLuint key, void *data); - -extern void _eglHashRemove(_EGLHashtable *table, EGLuint key); - -extern EGLuint _eglHashFirstEntry(_EGLHashtable *table); - -extern EGLuint _eglHashNextEntry(const _EGLHashtable *table, EGLuint key); - -extern void _eglHashPrint(const _EGLHashtable *table); - -extern EGLuint _eglHashGenKey(_EGLHashtable *table); - -extern void _egltest_hash_functions(void); - - -#endif /* EGLHASH_INCLUDED */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglmode.c b/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglmode.c deleted file mode 100644 index f2b17a6d27..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglmode.c +++ /dev/null @@ -1,199 +0,0 @@ -#include -#include -#include - -#include "egldisplay.h" -#include "egldriver.h" -#include "eglmode.h" -#include "eglglobals.h" -#include "eglscreen.h" - - -#define MIN2(A, B) (((A) < (B)) ? (A) : (B)) - - -static char * -my_strdup(const char *s) -{ - int l = strlen(s); - char *s2 = malloc(l + 1); - strcpy(s2, s); - return s2; -} - - -/** - * Given an EGLModeMESA handle, return the corresponding _EGLMode object - * or null if non-existant. - */ -_EGLMode * -_eglLookupMode(EGLDisplay dpy, EGLModeMESA mode) -{ - const _EGLDisplay *disp = _eglLookupDisplay(dpy); - EGLint scrnum; - - /* loop over all screens on the display */ - for (scrnum = 0; scrnum < disp->NumScreens; scrnum++) { - const _EGLScreen *scrn = disp->Screens[scrnum]; - EGLint i; - /* search list of modes for handle */ - for (i = 0; i < scrn->NumModes; i++) { - if (scrn->Modes[i].Handle == mode) { - return scrn->Modes + i; - } - } - } - - return NULL; -} - - -/** - * Add a new mode with the given attributes (width, height, depth, refreshRate) - * to the given screen. - * Assign a new mode ID/handle to the mode as well. - * \return pointer to the new _EGLMode - */ -_EGLMode * -_eglAddMode(_EGLScreen *screen, EGLint width, EGLint height, - EGLint refreshRate, const char *name) -{ - EGLint n; - _EGLMode *newModes; - - assert(screen); - assert(width > 0); - assert(height > 0); - assert(refreshRate > 0); - - n = screen->NumModes; - newModes = (_EGLMode *) realloc(screen->Modes, (n+1) * sizeof(_EGLMode)); - if (newModes) { - screen->Modes = newModes; - screen->Modes[n].Handle = n + 1; - screen->Modes[n].Width = width; - screen->Modes[n].Height = height; - screen->Modes[n].RefreshRate = refreshRate; - screen->Modes[n].Stereo = EGL_FALSE; - screen->Modes[n].Name = my_strdup(name); - screen->NumModes++; - return screen->Modes + n; - } - else { - return NULL; - } -} - - - -/** - * Search for the EGLMode that best matches the given attribute list. - */ -EGLBoolean -_eglChooseModeMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, - const EGLint *attrib_list, EGLModeMESA *modes, - EGLint modes_size, EGLint *num_modes) -{ - EGLint i; - - /* XXX incomplete */ - - for (i = 0; attrib_list[i] != EGL_NONE; i++) { - switch (attrib_list[i]) { - case EGL_WIDTH: - i++; - break; - case EGL_HEIGHT: - i++; - break; - case EGL_REFRESH_RATE_MESA: - i++; - break; -#if 0 - case EGL_STEREO_MESA: - i++; - break; -#endif - default: - _eglError(EGL_BAD_ATTRIBUTE, "eglChooseMode"); - return EGL_FALSE; - } - } - - return EGL_TRUE; -} - - - -/** - * Return all possible modes for the given screen - */ -EGLBoolean -_eglGetModesMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, - EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes) -{ - _EGLScreen *scrn = _eglLookupScreen(dpy, screen); - EGLint i; - - if (!scrn) { - _eglError(EGL_BAD_SCREEN_MESA, "eglGetModes"); - return EGL_FALSE; - } - - *num_modes = MIN2(modes_size, scrn->NumModes); - for (i = 0; i < *num_modes; i++) { - modes[i] = scrn->Modes[i].Handle; - } - - return EGL_TRUE; -} - - -/** - * Query an attribute of a mode. - */ -EGLBoolean -_eglGetModeAttribMESA(_EGLDriver *drv, EGLDisplay dpy, - EGLModeMESA mode, EGLint attribute, EGLint *value) -{ - _EGLMode *m = _eglLookupMode(dpy, mode); - - switch (attribute) { - case EGL_MODE_ID_MESA: - *value = m->Handle; - break; - case EGL_WIDTH: - *value = m->Width; - break; - case EGL_HEIGHT: - *value = m->Height; - break; -#if 0 - case EGL_DEPTH_MESA: - *value = m->Depth; - break; -#endif - case EGL_REFRESH_RATE_MESA: - *value = m->RefreshRate; - break; -#if 0 - case EGL_STEREO_MESA: - *value = m->Stereo; - break; -#endif - default: - _eglError(EGL_BAD_ATTRIBUTE, "eglGetModeAttrib"); - return EGL_FALSE; - } - return EGL_TRUE; -} - - -const char * -_eglQueryModeStringMESA(_EGLDriver *drv, EGLDisplay dpy, EGLModeMESA mode) -{ - _EGLMode *m = _eglLookupMode(dpy, mode); - return m->Name; -} - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglmode.h b/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglmode.h deleted file mode 100644 index ed2f022d05..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglmode.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef EGLMODE_INCLUDED -#define EGLMODE_INCLUDED - -#include "egltypedefs.h" - - -/** - * Data structure which corresponds to an EGLModeMESA. - */ -struct _egl_mode -{ - EGLModeMESA Handle; /* the public/opaque handle which names this mode */ - EGLint Width, Height; /* size in pixels */ - EGLint RefreshRate; /* rate * 1000.0 */ - EGLBoolean Stereo; - const char *Name; - - /* Other possible attributes */ - /* interlaced */ - /* external sync */ -}; - - -extern _EGLMode * -_eglLookupMode(EGLDisplay dpy, EGLModeMESA mode); - - -extern _EGLMode * -_eglAddMode(_EGLScreen *screen, EGLint width, EGLint height, - EGLint refreshRate, const char *name); - - -extern EGLBoolean -_eglChooseModeMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, - const EGLint *attrib_list, EGLModeMESA *modes, - EGLint modes_size, EGLint *num_modes); - - -extern EGLBoolean -_eglGetModesMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, - EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); - - -extern EGLBoolean -_eglGetModeAttribMESA(_EGLDriver *drv, EGLDisplay dpy, EGLModeMESA mode, - EGLint attribute, EGLint *value); - - -extern const char * -_eglQueryModeStringMESA(_EGLDriver *drv, EGLDisplay dpy, EGLModeMESA mode); - - -#endif /* EGLMODE_INCLUDED */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglscreen.c b/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglscreen.c deleted file mode 100644 index e213e9a847..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglscreen.c +++ /dev/null @@ -1,334 +0,0 @@ -/* - * Ideas for screen management extension to EGL. - * - * Each EGLDisplay has one or more screens (CRTs, Flat Panels, etc). - * The screens' handles can be obtained with eglGetScreensMESA(). - * - * A new kind of EGLSurface is possible- one which can be directly scanned - * out on a screen. Such a surface is created with eglCreateScreenSurface(). - * - * To actually display a screen surface on a screen, the eglShowSurface() - * function is called. - */ - -#include -#include -#include - -#include "egldisplay.h" -#include "eglglobals.h" -#include "eglmode.h" -#include "eglconfig.h" -#include "eglsurface.h" -#include "eglscreen.h" - - -/** - * Initialize an _EGLScreen object to default values. - */ -void -_eglInitScreen(_EGLScreen *screen) -{ - /* just init to zero for now */ - memset(screen, 0, sizeof(_EGLScreen)); -} - - -/** - * Given a public screen handle, return the internal _EGLScreen object. - */ -_EGLScreen * -_eglLookupScreen(EGLDisplay dpy, EGLScreenMESA screen) -{ - EGLint i; - _EGLDisplay *display = _eglLookupDisplay(dpy); - - if (!display) - return NULL; - - for (i = 0; i < display->NumScreens; i++) { - if (display->Screens[i]->Handle == screen) - return display->Screens[i]; - } - return NULL; -} - - -/** - * Add the given _EGLScreen to the display's list of screens. - */ -void -_eglAddScreen(_EGLDisplay *display, _EGLScreen *screen) -{ - EGLint n; - - assert(display); - assert(screen); - - screen->Handle = _eglAllocScreenHandle(); - n = display->NumScreens; - display->Screens = realloc(display->Screens, (n+1) * sizeof(_EGLScreen *)); - display->Screens[n] = screen; - display->NumScreens++; -} - - - -EGLBoolean -_eglGetScreensMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA *screens, - EGLint max_screens, EGLint *num_screens) -{ - _EGLDisplay *display = _eglLookupDisplay(dpy); - EGLint n; - - if (!display) { - _eglError(EGL_BAD_DISPLAY, "eglGetScreensMESA"); - return EGL_FALSE; - } - - if (display->NumScreens > max_screens) { - n = max_screens; - } - else { - n = display->NumScreens; - } - - if (screens) { - EGLint i; - for (i = 0; i < n; i++) - screens[i] = display->Screens[i]->Handle; - } - if (num_screens) - *num_screens = n; - - return EGL_TRUE; -} - - -/** - * Initialize the given _EGLSurface object. Do error checking. - * Assign it an EGLSurface handle and insert into hash table. - * \return EGLSurface handle or EGL_NO_SURFACE if error. - */ -EGLSurface -_eglInitScreenSurface(_EGLSurface *surf, _EGLDriver *drv, EGLDisplay dpy, - EGLConfig config, const EGLint *attrib_list) -{ - EGLint width = 0, height = 0; - EGLint i; - - for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) { - switch (attrib_list[i]) { - case EGL_WIDTH: - width = attrib_list[++i]; - break; - case EGL_HEIGHT: - height = attrib_list[++i]; - break; - default: - _eglError(EGL_BAD_ATTRIBUTE, "eglCreateScreenSurfaceMESA"); - return EGL_NO_SURFACE; - } - } - - if (width <= 0 || height <= 0) { - _eglError(EGL_BAD_ATTRIBUTE, - "eglCreateScreenSurfaceMESA(width or height)"); - return EGL_NO_SURFACE; - } - - _eglInitSurface(surf); - surf->Width = width; - surf->Height = height; - surf->Type = EGL_SCREEN_BIT_MESA; - surf->Config = _eglLookupConfig(drv, dpy, config); - - /* insert into hash table */ - _eglSaveSurface(surf); - assert(surf->Handle); - - return surf->Handle; -} - - -/** - * Create a drawing surface which can be directly displayed on a screen. - */ -EGLSurface -_eglCreateScreenSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, - const EGLint *attrib_list) -{ - _EGLSurface *surf; - EGLSurface surface; - - surf = (_EGLSurface *) malloc(sizeof(_EGLSurface)); - surface = _eglInitScreenSurface(surf, drv, dpy, config, attrib_list); - if (surface == EGL_NO_SURFACE) - free(surf); - - return surface; -} - - -/** - * Show the given surface on the named screen. - * If surface is EGL_NO_SURFACE, disable the screen's output. - * - * This is just a placeholder function; drivers will always override - * this with code that _really_ shows the surface. - */ -EGLBoolean -_eglShowSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, - EGLSurface surface, EGLModeMESA m) -{ - _EGLScreen *scrn = _eglLookupScreen(dpy, screen); - _EGLMode *mode = _eglLookupMode(dpy, m); - - if (!scrn) { - _eglError(EGL_BAD_SCREEN_MESA, "eglShowSurfaceMESA"); - return EGL_FALSE; - } - if (!mode && (m != EGL_NO_MODE_MESA )) { - _eglError(EGL_BAD_MODE_MESA, "eglShowSurfaceMESA"); - return EGL_FALSE; - } - - if (surface == EGL_NO_SURFACE) { - scrn->CurrentSurface = NULL; - } else { - _EGLSurface *surf = _eglLookupSurface(surface); - if (!surf || surf->Type != EGL_SCREEN_BIT_MESA) { - _eglError(EGL_BAD_SURFACE, "eglShowSurfaceMESA"); - return EGL_FALSE; - } - if (surf->Width < mode->Width || surf->Height < mode->Height) { - _eglError(EGL_BAD_SURFACE, - "eglShowSurfaceMESA(surface smaller than screen size)"); - return EGL_FALSE; - } - - scrn->CurrentSurface = surf; - scrn->CurrentMode = mode; - } - return EGL_TRUE; -} - - -/** - * Set a screen's current display mode. - * Note: mode = EGL_NO_MODE is valid (turns off the screen) - * - * This is just a placeholder function; drivers will always override - * this with code that _really_ sets the mode. - */ -EGLBoolean -_eglScreenModeMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, - EGLModeMESA mode) -{ - _EGLScreen *scrn = _eglLookupScreen(dpy, screen); - - if (!scrn) { - _eglError(EGL_BAD_SCREEN_MESA, "eglScreenModeMESA"); - return EGL_FALSE; - } - - scrn->CurrentMode = _eglLookupMode(dpy, mode); - - return EGL_TRUE; -} - - -/** - * Set a screen's surface origin. - */ -EGLBoolean -_eglScreenPositionMESA(_EGLDriver *drv, EGLDisplay dpy, - EGLScreenMESA screen, EGLint x, EGLint y) -{ - _EGLScreen *scrn = _eglLookupScreen(dpy, screen); - if (!scrn) { - _eglError(EGL_BAD_SCREEN_MESA, "eglScreenPositionMESA"); - return EGL_FALSE; - } - - scrn->OriginX = x; - scrn->OriginY = y; - - return EGL_TRUE; -} - - -/** - * Query a screen's current surface. - */ -EGLBoolean -_eglQueryScreenSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, - EGLScreenMESA screen, EGLSurface *surface) -{ - const _EGLScreen *scrn = _eglLookupScreen(dpy, screen); - if (scrn->CurrentSurface) - *surface = scrn->CurrentSurface->Handle; - else - *surface = EGL_NO_SURFACE; - return EGL_TRUE; -} - - -/** - * Query a screen's current mode. - */ -EGLBoolean -_eglQueryScreenModeMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, - EGLModeMESA *mode) -{ - const _EGLScreen *scrn = _eglLookupScreen(dpy, screen); - if (scrn->CurrentMode) - *mode = scrn->CurrentMode->Handle; - else - *mode = EGL_NO_MODE_MESA; - return EGL_TRUE; -} - - -EGLBoolean -_eglQueryScreenMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, - EGLint attribute, EGLint *value) -{ - const _EGLScreen *scrn = _eglLookupScreen(dpy, screen); - - if (!scrn) { - _eglError(EGL_BAD_SCREEN_MESA, "eglQueryScreenMESA"); - return EGL_FALSE; - } - - switch (attribute) { - case EGL_SCREEN_POSITION_MESA: - value[0] = scrn->OriginX; - value[1] = scrn->OriginY; - break; - default: - _eglError(EGL_BAD_ATTRIBUTE, "eglQueryScreenMESA"); - return EGL_FALSE; - } - - return EGL_TRUE; -} - - -void -_eglDestroyScreenModes(_EGLScreen *scrn) -{ - free(scrn->Modes); -} - - -/** - * Default fallback routine - drivers should usually override this. - */ -void -_eglDestroyScreen(_EGLScreen *scrn) -{ - _eglDestroyScreenModes(scrn); - free(scrn); -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglscreen.h b/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglscreen.h deleted file mode 100644 index afc52a5ecb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglscreen.h +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef EGLSCREEN_INCLUDED -#define EGLSCREEN_INCLUDED - - -/* NOTE: there is no public EGLScreen type, we refers to screens with - * an integer. - */ - -struct _egl_screen -{ - EGLScreenMESA Handle; /* The public/opaque handle which names this object */ - - _EGLMode *CurrentMode; - _EGLSurface *CurrentSurface; - EGLint OriginX, OriginY; - - EGLint NumModes; - _EGLMode *Modes; /* array [NumModes] */ -}; - - -extern void -_eglInitScreen(_EGLScreen *screen); - - -extern _EGLScreen * -_eglLookupScreen(EGLDisplay dpy, EGLScreenMESA screen); - - -extern void -_eglAddScreen(_EGLDisplay *display, _EGLScreen *screen); - - -extern EGLBoolean -_eglGetScreensMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens); - - -extern EGLSurface -_eglInitScreenSurface(_EGLSurface *surf, _EGLDriver *drv, EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); - - -extern EGLSurface -_eglCreateScreenSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); - - -extern EGLBoolean -_eglShowSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, EGLSurface surface, EGLModeMESA mode); - - -extern EGLBoolean -_eglScreenModeMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA mode); - - -extern EGLBoolean -_eglScreenPositionMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y); - - -extern EGLBoolean -_eglQueryDisplayMESA(_EGLDriver *drv, EGLDisplay dpy, EGLint attribute, EGLint *value); - - -extern EGLBoolean -_eglQueryScreenSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, - EGLScreenMESA screen, EGLSurface *surface); - - -extern EGLBoolean -_eglQueryScreenModeMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode); - - -extern EGLBoolean -_eglQueryScreenMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value); - - -extern void -_eglDestroyScreenModes(_EGLScreen *scrn); - - -extern void -_eglDestroyScreen(_EGLScreen *scrn); - - -#endif /* EGLSCREEN_INCLUDED */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglsurface.c b/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglsurface.c deleted file mode 100644 index 94b86fa982..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglsurface.c +++ /dev/null @@ -1,323 +0,0 @@ -/** - * Surface-related functions. - * - * See the eglcontext.c file for comments that also apply here. - */ - - -#include -#include -#include -#include "eglcontext.h" -#include "eglconfig.h" -#include "eglsurface.h" -#include "eglglobals.h" -#include "eglhash.h" - - -void -_eglInitSurface(_EGLSurface *surf) -{ - /* XXX fix this up */ - memset(surf, 0, sizeof(_EGLSurface)); -} - - -void -_eglSaveSurface(_EGLSurface *surf) -{ - assert(surf); - surf->Handle = _eglHashGenKey(_eglGlobal.Contexts); - _eglHashInsert(_eglGlobal.Surfaces, surf->Handle, surf); -} - - -void -_eglRemoveSurface(_EGLSurface *surf) -{ - _eglHashRemove(_eglGlobal.Surfaces, surf->Handle); -} - - -_EGLSurface * -_eglLookupSurface(EGLSurface surf) -{ - _EGLSurface *c = (_EGLSurface *) _eglHashLookup(_eglGlobal.Surfaces, surf); - return c; -} - - -_EGLSurface * -_eglGetCurrentSurface(EGLint readdraw) -{ - _EGLContext *ctx = _eglGetCurrentContext(); - if (ctx) { - switch (readdraw) { - case EGL_DRAW: - return ctx->DrawSurface; - case EGL_READ: - return ctx->ReadSurface; - default: - return NULL; - } - } - return NULL; -} - - -EGLBoolean -_eglSwapBuffers(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw) -{ - /* Basically just do error checking */ - _EGLContext *context = _eglGetCurrentContext(); - _EGLSurface *surface = _eglLookupSurface(draw); - if (context && context->DrawSurface != surface) { - _eglError(EGL_BAD_SURFACE, "eglSwapBuffers"); - return EGL_FALSE; - } - if (surface == NULL) { - _eglError(EGL_BAD_SURFACE, "eglSwapBuffers"); - return EGL_FALSE; - } - return EGL_TRUE; -} - - -EGLBoolean -_eglCopyBuffers(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, NativePixmapType target) -{ - /* XXX unfinished */ - return EGL_FALSE; -} - - -EGLBoolean -_eglQuerySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surf, EGLint attribute, EGLint *value) -{ - _EGLSurface *surface = _eglLookupSurface(surf); - if (surface == NULL) { - _eglError(EGL_BAD_SURFACE, "eglQuerySurface"); - return EGL_FALSE; - } - switch (attribute) { - case EGL_WIDTH: - *value = surface->Width; - return EGL_TRUE; - case EGL_HEIGHT: - *value = surface->Height; - return EGL_TRUE; - case EGL_CONFIG_ID: - *value = GET_CONFIG_ATTRIB(surface->Config, EGL_CONFIG_ID); - return EGL_TRUE; - case EGL_TEXTURE_FORMAT: - /* texture attributes: only for pbuffers, no error otherwise */ - if (surface->Type == EGL_PBUFFER_BIT) - *value = surface->TextureFormat; - return EGL_TRUE; - case EGL_TEXTURE_TARGET: - if (surface->Type == EGL_PBUFFER_BIT) - *value = surface->TextureTarget; - return EGL_TRUE; - case EGL_MIPMAP_TEXTURE: - if (surface->Type == EGL_PBUFFER_BIT) - *value = surface->MipmapTexture; - return EGL_TRUE; - case EGL_MIPMAP_LEVEL: - if (surface->Type == EGL_PBUFFER_BIT) - *value = surface->MipmapLevel; - return EGL_TRUE; - case EGL_SURFACE_TYPE: - *value = surface->Type; - return EGL_TRUE; - default: - _eglError(EGL_BAD_ATTRIBUTE, "eglQuerySurface"); - return EGL_FALSE; - } -} - - -/** - * Default fallback routine - drivers should usually override this. - */ -EGLSurface -_eglCreateWindowSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list) -{ - /* nothing - just a placeholder */ - return EGL_NO_SURFACE; -} - - -/** - * Default fallback routine - drivers should usually override this. - */ -EGLSurface -_eglCreatePixmapSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list) -{ - /* nothing - just a placeholder */ - return EGL_NO_SURFACE; -} - - -/** - * Default fallback routine - drivers should usually override this. - */ -EGLSurface -_eglCreatePbufferSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) -{ - /* nothing - just a placeholder */ - return EGL_NO_SURFACE; -} - - -/** - * Default fallback routine - drivers should usually override this. - */ -EGLBoolean -_eglDestroySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface) -{ - _EGLSurface *surf = _eglLookupSurface(surface); - if (surf) { - _eglHashRemove(_eglGlobal.Surfaces, surface); - if (surf->IsBound) { - surf->DeletePending = EGL_TRUE; - } - else { - free(surf); - } - return EGL_TRUE; - } - else { - _eglError(EGL_BAD_SURFACE, "eglDestroySurface"); - return EGL_FALSE; - } -} - - -/** - * Default fallback routine - drivers might override this. - */ -EGLBoolean -_eglSurfaceAttrib(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surf, EGLint attribute, EGLint value) -{ - _EGLSurface *surface = _eglLookupSurface(surf); - - if (surface == NULL) { - _eglError(EGL_BAD_SURFACE, "eglSurfaceAttrib"); - return EGL_FALSE; - } - - switch (attribute) { - case EGL_MIPMAP_LEVEL: - surface->MipmapLevel = value; - break; - default: - _eglError(EGL_BAD_ATTRIBUTE, "eglSurfaceAttrib"); - return EGL_FALSE; - } - return EGL_TRUE; -} - - -EGLBoolean -_eglBindTexImage(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, EGLint buffer) -{ - /* XXX unfinished */ - return EGL_FALSE; -} - - -EGLBoolean -_eglReleaseTexImage(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, EGLint buffer) -{ - /* XXX unfinished */ - return EGL_FALSE; -} - - -EGLBoolean -_eglSwapInterval(_EGLDriver *drv, EGLDisplay dpy, EGLint interval) -{ - _EGLSurface *surf = _eglGetCurrentSurface(EGL_DRAW); - if (surf == NULL) { - _eglError(EGL_BAD_SURFACE, "eglSwapInterval"); - return EGL_FALSE; - } - surf->SwapInterval = interval; - return EGL_TRUE; -} - - - -/** - ** EGL Surface Utility Functions. This could be handy for device drivers. - **/ - - -/** - * Initialize the fields of the given _EGLSurface object from the other - * parameters. Do error checking too. Allocate EGLSurface handle and - * insert into hash table. - * \return EGLSurface handle or EGL_NO_SURFACE if any error - */ -EGLSurface -_eglInitPbufferSurface(_EGLSurface *surface, _EGLDriver *drv, EGLDisplay dpy, - EGLConfig config, const EGLint *attrib_list) -{ - _EGLConfig *conf; - EGLint width = 0, height = 0, largest = 0; - EGLint texFormat = 0, texTarget = 0, mipmapTex = 0; - EGLint i; - - conf = _eglLookupConfig(drv, dpy, config); - if (!conf) { - _eglError(EGL_BAD_CONFIG, "eglCreatePbufferSurface"); - return EGL_NO_SURFACE; - } - - for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) { - switch (attrib_list[i]) { - case EGL_WIDTH: - width = attrib_list[++i]; - break; - case EGL_HEIGHT: - height = attrib_list[++i]; - break; - case EGL_LARGEST_PBUFFER: - largest = attrib_list[++i]; - break; - case EGL_TEXTURE_FORMAT: - texFormat = attrib_list[++i]; - break; - case EGL_TEXTURE_TARGET: - texTarget = attrib_list[++i]; - break; - case EGL_MIPMAP_TEXTURE: - mipmapTex = attrib_list[++i]; - break; - default: - _eglError(EGL_BAD_ATTRIBUTE, "eglCreatePbufferSurface"); - return EGL_NO_SURFACE; - } - } - - if (width <= 0 || height <= 0) { - _eglError(EGL_BAD_ATTRIBUTE, "eglCreatePbufferSurface(width or height)"); - return EGL_NO_SURFACE; - } - - surface->Config = conf; - surface->Type = EGL_PBUFFER_BIT; - surface->Width = width; - surface->Height = height; - surface->TextureFormat = texFormat; - surface->TextureTarget = texTarget; - surface->MipmapTexture = mipmapTex; - surface->MipmapLevel = 0; - surface->SwapInterval = 0; - - /* insert into hash table */ - _eglSaveSurface(surface); - assert(surface->Handle); - - return surface->Handle; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglsurface.h b/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglsurface.h deleted file mode 100644 index 4853edfcd1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/eglsurface.h +++ /dev/null @@ -1,100 +0,0 @@ -#ifndef EGLSURFACE_INCLUDED -#define EGLSURFACE_INCLUDED - - -#include "egltypedefs.h" - - -/** - * "Base" class for device driver surfaces. - */ -struct _egl_surface -{ - EGLSurface Handle; /* The public/opaque handle which names this object */ - _EGLConfig *Config; - - /* May need reference counting here */ - EGLBoolean IsBound; - EGLBoolean DeletePending; - - EGLint Type; /* one of EGL_WINDOW_BIT, EGL_PIXMAP_BIT or EGL_PBUFFER_BIT */ - EGLint Width, Height; - EGLint TextureFormat, TextureTarget; - EGLint MipmapTexture, MipmapLevel; - EGLint SwapInterval; - - /* If type == EGL_SCREEN_BIT: */ - EGLint VisibleRefCount; /* number of screens I'm displayed on */ -}; - - -extern void -_eglInitSurface(_EGLSurface *surf); - - -extern void -_eglSaveSurface(_EGLSurface *surf); - - -extern void -_eglRemoveSurface(_EGLSurface *surf); - - -extern _EGLSurface * -_eglLookupSurface(EGLSurface surf); - - -extern _EGLSurface * -_eglGetCurrentSurface(EGLint readdraw); - - -extern EGLBoolean -_eglSwapBuffers(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw); - - -extern EGLBoolean -_eglCopyBuffers(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, NativePixmapType target); - - -extern EGLBoolean -_eglQuerySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value); - - -extern EGLSurface -_eglCreateWindowSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list); - - -extern EGLSurface -_eglCreatePixmapSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list); - - -extern EGLSurface -_eglCreatePbufferSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); - - -extern EGLBoolean -_eglDestroySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface); - - -extern EGLBoolean -_eglSurfaceAttrib(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); - - -extern EGLBoolean -_eglBindTexImage(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, EGLint buffer); - - -extern EGLBoolean -_eglReleaseTexImage(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, EGLint buffer); - - -extern EGLBoolean -_eglSwapInterval(_EGLDriver *drv, EGLDisplay dpy, EGLint interval); - - - -extern EGLSurface -_eglInitPbufferSurface(_EGLSurface *surface, _EGLDriver *drv, EGLDisplay dpy, - EGLConfig config, const EGLint *attrib_list); - -#endif /* EGLSURFACE_INCLUDED */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/egl/main/egltypedefs.h b/nx-X11/extras/Mesa_6.4.2/src/egl/main/egltypedefs.h deleted file mode 100644 index a66fbed737..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/egl/main/egltypedefs.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef EGLTYPEDEFS_INCLUDED -#define EGLTYPEDEFS_INCLUDED - - -#include - - -typedef struct _egl_config _EGLConfig; - -typedef struct _egl_context _EGLContext; - -typedef struct _egl_display _EGLDisplay; - -typedef struct _egl_driver _EGLDriver; - -typedef struct _egl_mode _EGLMode; - -typedef struct _egl_screen _EGLScreen; - -typedef struct _egl_surface _EGLSurface; - - -typedef void (*_EGLProc)(); - -typedef _EGLDriver *(*_EGLMain_t)(_EGLDisplay *dpy); - - -#endif /* EGLTYPEDEFS_INCLUDED */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/Makefile b/nx-X11/extras/Mesa_6.4.2/src/glu/Makefile deleted file mode 100644 index 915b95081a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# src/glu/Makefile - -TOP = ../.. - -include $(TOP)/configs/current - - -SUBDIRS = $(GLU_DIRS) - - -default: $(TOP)/configs/current - @for dir in $(SUBDIRS) ; do \ - (cd $$dir ; $(MAKE)) ; \ - done - - -clean: - @for dir in $(SUBDIRS) ; do \ - (cd $$dir ; $(MAKE) clean) ; \ - done diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/descrip.mms b/nx-X11/extras/Mesa_6.4.2/src/glu/descrip.mms deleted file mode 100644 index 6d5cd858da..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/descrip.mms +++ /dev/null @@ -1,9 +0,0 @@ -# Makefile for Mesa for VMS -# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl - -all : -# PIPE is avalailable on VMS7.0 and higher. For lower versions split the -#command in two conditional command. JJ - if f$search("SYS$SYSTEM:CXX$COMPILER.EXE") .nes. "" then pipe set default [.sgi] ; $(MMS)$(MMSQUALIFIERS) - if f$search("SYS$SYSTEM:CXX$COMPILER.EXE") .eqs. "" then pipe set default [.mesa] ; $(MMS)$(MMSQUALIFIERS) - set default [-] diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/Makefile b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/Makefile deleted file mode 100644 index 69a4ea88cf..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# src/glu/mesa/Makefile - -TOP = ../../.. - -include $(TOP)/configs/current - -GLU_MAJOR = 1 -GLU_MINOR = 1 -GLU_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY) - -C_SOURCES = \ - glu.c \ - mipmap.c \ - nurbs.c \ - nurbscrv.c \ - nurbssrf.c \ - nurbsutl.c \ - polytest.c \ - project.c \ - quadric.c \ - tess.c \ - tesselat.c - -OBJECTS = $(C_SOURCES:.c=.o) - -INCLUDES = -I. -I- -I$(TOP)/include - -##### RULES ##### - -.c.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@ - -##### TARGETS ##### - -default: - @if [ "${CONFIG_NAME}" = "beos" ] ; then \ - echo "$(GLU_LIB_NAME) not build under BeOS, but integrated into ${GL_LIB_NAME}." ; \ - exit 0 ; \ - else \ - $(MAKE) "${LIB_DIR}/${GLU_LIB_NAME}" ; \ - fi - -$(LIB_DIR): - -mkdir $(LIB_DIR) - -# Make the library: -$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS) - @ $(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CC)' \ - -major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \ - $(MKLIB_OPTIONS) -install $(LIB_DIR) \ - $(GLU_LIB_DEPS) $(OBJECTS) - -clean: - -rm -f *.o */*.o */*/*.o - -rm -f *.lo */*.lo */*/*.lo - -rm -f *.la */*.la */*/*.la diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/Makefile.DJ b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/Makefile.DJ deleted file mode 100644 index 92bcdaae94..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/Makefile.DJ +++ /dev/null @@ -1,100 +0,0 @@ -# Mesa 3-D graphics library -# Version: 4.0 -# -# Copyright (C) 1999 Brian Paul All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -# DOS/DJGPP glu makefile v1.5 for Mesa -# -# Copyright (C) 2002 - Daniel Borca -# Email : dborca@users.sourceforge.net -# Web : http://www.geocities.com/dborca - - -# -# Available options: -# -# Environment variables: -# CFLAGS -# -# Targets: -# all: build GLU -# clean: remove object files -# - - - -.PHONY: all clean - -TOP = ../../.. -LIBDIR = $(TOP)/lib -GLU_LIB = libglu.a -GLU_DXE = glu.dxe -GLU_IMP = libiglu.a - -export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR);$(GLIDE)/lib - -CC = gcc -CFLAGS += -I$(TOP)/include - -AR = ar -ARFLAGS = crus - -HAVEDXE3 = $(wildcard $(DJDIR)/bin/dxe3gen.exe) - -ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) -UNLINK = del $(subst /,\,$(1)) -else -UNLINK = $(RM) $(1) -endif - -CORE_SOURCES = \ - glu.c \ - mipmap.c \ - nurbs.c \ - nurbscrv.c \ - nurbssrf.c \ - nurbsutl.c \ - polytest.c \ - project.c \ - quadric.c \ - tess.c \ - tesselat.c - -SOURCES = $(CORE_SOURCES) - -OBJECTS = $(SOURCES:.c=.o) - -.c.o: - $(CC) -o $@ $(CFLAGS) -c $< - -all: $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLU_DXE) $(LIBDIR)/$(GLU_IMP) - -$(LIBDIR)/$(GLU_LIB): $(OBJECTS) - $(AR) $(ARFLAGS) $@ $^ - -$(LIBDIR)/$(GLU_DXE) $(LIBDIR)/$(GLU_IMP): $(OBJECTS) -ifeq ($(HAVEDXE3),) - $(warning Missing DXE3 package... Skipping $(GLU_DXE)) -else - -dxe3gen -o $(LIBDIR)/$(GLU_DXE) -Y $(LIBDIR)/$(GLU_IMP) -D "MesaGLU DJGPP" -E _glu -P gl.dxe -U $^ -endif - -clean: - -$(call UNLINK,*.o) diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/Makefile.m32 b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/Makefile.m32 deleted file mode 100644 index 3e217ef5d5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/Makefile.m32 +++ /dev/null @@ -1,63 +0,0 @@ -# Makefile for GLU for GCC-2.95.2/Mingw32 contributed by -# Paul Garceau - -# Mesa 3-D graphics library -# Version: 3.3 -# Copyright (C) 1995-1999 Brian Paul -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this library; if not, write to the Free -# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - -MESA_MAJOR=3 -MESA_MINOR=3 -MESA_TINY=0 -VERSION=$(MESA_MAJOR).$(MESA_MINOR) - -CFLAGS = -I. -DWIN32 -D__WIN32__ -D_WINDOWS \ - -O2 -funroll-loops \ - -fexpensive-optimizations -fomit-frame-pointer -ffast-math \ - -malign-loops=2 -malign-jumps=2 -malign-functions=2 \ - -mwindows -CC = gcc -MAKELIB = ar ru -GLU_LIB = libGLU.a - - -##### MACROS ##### - -VPATH = RCS - -INCDIR = ../include -LIBDIR = ../lib - -SOURCES = glu.c mipmap.c nurbs.c nurbscrv.c nurbssrf.c nurbsutl.c \ - polytest.c project.c quadric.c tess.c tesselat.c - -OBJECTS = $(SOURCES:.c=.o) - - - -##### RULES ##### - -.c.o: - $(CC) -c -I$(INCDIR) $(CFLAGS) $< - - - -##### TARGETS ##### - -# Make the library: -$(LIBDIR)/$(GLU_LIB): $(OBJECTS) - $(MAKELIB) $(GLU_LIB) $(MAJOR) $(MINOR) $(TINY) $(OBJECTS) \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/Makefile.ugl b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/Makefile.ugl deleted file mode 100644 index fc189bd804..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/Makefile.ugl +++ /dev/null @@ -1,96 +0,0 @@ -# Mesa 3-D graphics library -# Version: 3.5 -# -# Copyright (C) 2001 Wind River Systems, Inc - -# The MIT License -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -# Makefile for GLU library - -##### MACROS ##### -GLU_MAJOR = 1 -GLU_MINOR = 3 -GLU_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY) - -##### RULES ##### - -include ../rules.windml - -GLU_SOURCES = \ - glu.c \ - mipmap.c \ - nurbs.c \ - nurbscrv.c \ - nurbssrf.c \ - nurbsutl.c \ - polytest.c \ - project.c \ - quadric.c \ - tess.c \ - tesselat.c \ - ../src/windml/tornado/torMesaGLUInit.c - -GLU_OBJECTS = $(GLU_SOURCES:.c=.o) -GLU_OBJNAME = $(MESA_LIBDIR)/objMesaGLU.o - -SOURCES = $(GLU_SOURCES) - -##### TARGETS ##### - -all: depend.$(CPU)$(TOOL) $(GLU_OBJNAME) - -# Make the GLU library -$(GLU_OBJNAME): $(GLU_OBJECTS) -# $(LD) -r $(GLU_OBJECTS) -o $(MESA_OBJNAME) - $(LD) -r $(GLU_OBJECTS) -o $(GLU_OBJNAME) -# $(AR) rus $(MESA_LIBNAME) $(GLU_OBJNAME) -# $(AR) rus $(VX_LIBNAME) $(GLU_OBJNAME) - -depend.$(CPU)$(TOOL): -ifeq ($(WIND_HOST_TYPE),x86-win32) - @ $(RM) $@ - @ $(ECHO) Creating depend.$(CPU)$(TOOL) -ifneq ($(SOURCES),) - @ for %f in ($(SOURCES)) do \ - $(CC) -MM $(CFLAGS) %f >>$@ -endif -else -Makefile - @ $(RM) $@ - @ $(ECHO) "Creating depend.$(CPU)$(TOOL)" -ifneq ($(SOURCES),) - @ for FILE in $(filter-out $(NODEPENDOBJS), $(SOURCES)); \ - do \ - $(CC) -MM $(CFLAGS) $$FILE \ - | $(TCL) $(BIN_DIR)/depend.tcl $(TGT_DIR) >>$@; \ - done -endif -endif - -.PHONY = clean - -clean: -# $(AR) d $(MESA_LIBNAME) $(GLU_OBJNAME) -# $(AR) d $(VX_LIBNAME) $(GLU_OBJNAME) - $(RM) $(GLU_OBJNAME) - $(RM) $(GLU_OBJECTS) - $(RM) depend.$(CPU)$(TOOL) - -include depend.$(CPU)$(TOOL) diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/MesaGLU.def b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/MesaGLU.def deleted file mode 100644 index 0cdd7bb787..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/MesaGLU.def +++ /dev/null @@ -1,62 +0,0 @@ -LIBRARY GLU32 -DESCRIPTION 'GLU for Windows Mesa' -EXETYPE WINDOWS -CODE MOVEABLE DISCARDABLE -DATA MOVEABLE SINGLE -HEAPSIZE 256000 - -STACKSIZE 4096 - -EXPORTS - gluLookAt - gluOrtho2D - gluPerspective - gluPickMatrix - gluProject - gluUnProject - gluErrorString - gluScaleImage - gluBuild1DMipmaps - gluBuild2DMipmaps - gluNewQuadric - gluDeleteQuadric - gluQuadricDrawStyle - gluQuadricOrientation - gluQuadricNormals - gluQuadricTexture - gluQuadricCallback - gluCylinder - gluSphere - gluDisk - gluPartialDisk - gluNewNurbsRenderer - gluDeleteNurbsRenderer - gluLoadSamplingMatrices - gluNurbsProperty - gluGetNurbsProperty - gluBeginCurve - gluEndCurve - gluNurbsCurve - gluBeginSurface - gluEndSurface - gluNurbsSurface - gluBeginTrim - gluEndTrim - gluPwlCurve - gluNurbsCallback - gluNewTess - gluDeleteTess -; gluTessBeginPolygon -; gluTessBeginContour - gluTessVertex -; gluTessEndContour -; gluTessEndPolygon -; gluTessProperty -; gluTessNormal - gluTessCallback -; gluGetTessProperty - gluBeginPolygon - gluNextContour - gluEndPolygon - gluGetString - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/README1 b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/README1 deleted file mode 100644 index 75968572ff..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/README1 +++ /dev/null @@ -1,195 +0,0 @@ - -Notes on the GLU polygon tesselation facility implemented by Bogdan Sikorski... - - - -The tesselation module is provided under the same terms as the Mesa -package. - -This is the first release of polygon tesselation code for Mesa. -It was written during my very little free time, so lets name it: -"its not perfect". If someone hates pointers, don't look at the code. -I preffer dynamic allocation versus static. But _all_ ideas, suggestions, -bug reports and fixes are welcome (if You want, also flames). I am aware -that many things could have been written using better techniques, but time -that I could devote to this library was very limited. It is not well commented, -excuse me. Also I am thinking of continuing working on this code to improve, -fix and polish it. And make it as compliant as possible to the OpenGL, so -software ports from OpenGL to Mesa will work correctly. If You know of any -differences in behaviour, expected input/output between Mesa tesselation library -and OpenGL, please send me a note. I explain later on why I am not -confident with this code. - -I tried to be fully compliant with the OpenGL routines. By "tried" I mean that -up to my knowledge it behaves as OpenGL tesselation routines. Just recently -I began to experiment with OpenGL (actually only Mesa), and also have -no access to any machine providing official implementation of OpenGL, -nor access to books (particulary Addison-Wesley publications). Thus my -knowledge on how the original tesselation code works, what kind of data -it expects etc. is based _only_ on the publicly available documentation -provided by SGI. Namely: - -* "The OpenGL Graphics System Utility Library" by K.P.Smith - (Silicon Graphics, 1992) -* "The OpenGL Graphics Interface" by M.Segal and K.Akeley - (Silicon Graphics, 19??) -* "OpenGL and X, Part 1: Introduction" by M.J.Kilgard - (Silicon Graphics, 1994) -* "OpenGL and X, Part 2: Using OpenGL with Xlib" by M.J.Kilgard - (Silicon Graphics, 1994) -* "OpenGL Graphics with the X Window System" by P.Karlton - (Silicon Graphics, 1993) -* Online Docs - Appendix C of OpenGL Programming Guide, Polygon Tesselation - (partial text cut and sent by e-mail) - - -The tesselation routines use slightly different prototypes than the ones -specified in the mentioned above publications. The _only_ differences are -the enumeration types which are not GLenum, but are GLUenum. So the -implemented routines have following prototypes: - -GLUtringulatorObj *gluNewTess(void); - -void gluTessCallback(GLUtriangulatorObj *,GLUenum,void (*)()); - ^^^^^^^ -void gluBeginPolygon(GLUtriangulatorObj *); - -void gluTessVertex(GLUtriangulatorObj *,GLdouble [3],void *); - -void gluNextContour(GLUtriangulatorObj *,GLUenum); - ^^^^^^^ -void gluEndPolygon(GLUtriangulatorObj *); - -const GLubyte *gluErrorString(GLUenum); - ^^^^^^^ - prototypes for callback functions: - -void (GLUenum); - ^^^^^^^ -void (GLboolean); -void (void *); -void (void); -void (GLUenum); - ^^^^^^^ - -The begin callback will be called only with GLU_TRIANGLES. No support -for traingle fans or strips yet. - -In case of errors an internal error variable is set to the appropiate -error enum values (GLU_TESS_ERROR?). Initially it is set to GLU_NO_ERROR. -The OpenGL library provides 8 error conditions, the tesselation code -of Mesa provides 9. They are: - -GLU_TESS_ERROR1: missing gluEndPolygon /* same as OpenGL */ -GLU_TESS_ERROR2: missing gluBeginPolygon /* same as OpenGL */ -GLU_TESS_ERROR3: misoriented contour /* not used in Mesa - in OpenGL is bad orientation or intersecting edges */ -GLU_TESS_ERROR4: vertex/edge intersection /* same as OpenGL */ -GLU_TESS_ERROR5: misoriented or self-intersecting loops /* same as OpenGL */ -GLU_TESS_ERROR6: coincident vertices /* same as OpenGL */ -GLU_TESS_ERROR7: colinear vertices /* OpenGL's illegal data */ -GLU_TESS_ERROR8: intersecting edges /* same as OpenGL */ -GLU_TESS_ERROR9: not coplanar contours /* new for Mesa */ - -The Mesa tesselation code ignores all data and calls after detecting an error -codition. This means that a _new_ tesselation object must be used for further -triangulations. Maybe this is too restrictive, and will be lifted in -future versions. - -The tesselation code completely ignores the type parameter passed in -gluNextContour. It also doesn't check if the passed parameter is a legal -enum value - ignores silently (maybe at least this should be checked). -The reason I chose this behaviour is based on what I read in the -beforementioned documents. I cite: - -".... -void gluNextContour(GLUtriangulatorObj *tessobj, GLenum type); - -Marks the beginning of the next contour when multiple contours make up the -boundary of the polygon to be tessellated. type can be GLU_EXTERIOR, -GLU_INTERIOR, GLU_CCW, GLU_CW, or GLU_UNKNOWN. These serve only as -to the tessellation. If you get them right, the tessellation might -go faster. If you get them wrong, they're ignored, and the tesselation still -works. -....." - -I hope You agree with me that my decision was correct. Mesa tesselation -_always_ checks by itself the interrelations between contours. Just as if -all contours were specified with the type GLU_UNKNOWN. - -One of OpenGL's policy is not to check all error conditions - rely sometimes -that the user "got things right". This is justified, since exhausting -error checking is timeconsuming, and would significantly slow down -a correct application. The Mesa tesselation code assumes only _one_ condition -when triangulating - all vertices in a contour are planar. This is _not_ -checked for correctness. Trying to tesselate such objects will lead to -unpredictable output. - -And now we arrive to the moment where I would like to list the required -(but checked for) conditions for triangulation, as well as summarize the -library: - -* all contours in a single tesselation cycle _must_ be coplanar - if not - an error is raised (and if provided a call to the error callback - is made) -* the contours can be passed in _any_ order, exteriors and holes can be - intermixed within a tesselation cycle and the correct hierarchy - will be determined by the library; thus specifying first holes then - exteriors, then holes within holes form a valid input. -* a hole within a hole is consider to be a yet another exterior contour -* multiple exterior contours (polygons) can be tesselated in one cycle; - _but_ this significantly degrades performance since many tests will be - performed for every contour pair; if You want triangulation to be fast - tesselate a single polygon (with possible holes) one at a time. -* orientation of exterior contours is arbitray, but if it has holes, - all interior holes of this particular exterior contour _must_ have an - opposite orientation. -* the output triangles have the same orientation as the exterior contour - that forms them -* each triangle is "enclosed" within the begin and end callbacks; - this is not efficent, but was made on purpose; so if triangulation - results in 2 triangles the following callbacks will be made in such - order: - (GLU_TRAINGLES) - (...) /* 3 vertices of first triangle */ - (...) - (...) - () - (GLU_TRAINGLES) - (...) /* 3 vertices of second triangle */ - (...) - (...) - () - Of course only when begin, vertex, and end callback were provided, - otherwise no output is done (actually tesselation does not take place). -* You will notice that some output traingles are very "thin"; there - exist possible several ways to traingulate a polygon, but "smart" code - avoiding such cases would require time to write, and will impact on - execution speed. -* like OpenGL, no new vertices are introduced during triangulation -* if the edgeflag callback is provided it will be called whenever - the just-about-to be output vertex begins a different type of edge - than the previous vertices; always before the first output a call - is made with GL_TRUE, to allow synchronization. -* all intermediate computations are done using GLdouble type, and comparisons - are biased with a precision value (EPSILON defined in tess.h) -* the point_in_poly function is my adaptation of code from the - comp.graphics.alg newsgroup FAQ (originally written by Mr. Wm. Randolph - Franklin, modified by Scott Anguish). -* the edge_edge_intersect test is also an adopted code from comp.graphics.alg - newsgroup FAQ -* the general idea for traingulation used in this library is described in - the book "Computational Geometry in C" by Joseph O'Rourke. - - -Excuse my English, its not my mother tongue. I should be available for some -time uner the following e-mail address. But For how long I am not certain. -Once I am settled in my new place, I'll post on the Mesa mailing list -my new address. - -(PS: today is my last day of work here, I'm changing my job). - -Bogdan. ( bogdan@dia.unisa.it ) - -Apr 28, 1995. - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/README2 b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/README2 deleted file mode 100644 index 3c9959179b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/README2 +++ /dev/null @@ -1,43 +0,0 @@ -The current NURBS implementation has no trimming facilities yet. - -The code is not well commented. - -1) Normal calculus fails for special cases of NURBS (independent - of the NURBS modules) - Those cases arise when for u or v, some control points - for a fixed value of that parameter form the same point. - Imagine a Bezier patch degenerated into a "triangle". - - v ^ 0,1,2 order=3 - | * - | - | 3* 4* 5* - | - | 6* 7* 8* - | - | - +------------------------> u - - The calculus of du derivative at triple point (0,1 and 2) will fail. - As a result, the normal vector will be 0. - The eval2.c code has to be changed to handle the above situation. - -2) Adjacent NURBS surfaces ("sharing" the same control points along - the "joining" edge) will be sampled with the same factor. - This prevents the formation of "cracks". - When the control polygon of the "shared" edge is not the same, - cracks might appear. - -The sampling tolerance is sometimes not respected! -A NURBS object is broken into Bezier curves/surfaces. If one of such -Bezier objects has a local high curvature with other portions of it -relatively flat then the high curvature part will be sampled more dense that -its flatter regions. -The flat regions might be tesselated into quads having sides of length -greater than the current sampling tolernace setting. -I believe such behaviour is acceptable, though not along the concept of -sampling tolerance. - -February 20, 1996. - -Bogdan. diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/all.h b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/all.h deleted file mode 100644 index 874c935925..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/all.h +++ /dev/null @@ -1,54 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * This file includes all .h files needed for the GLU source code for - * the purpose of precompiled headers. - * - * If the preprocessor symbol PCH is defined at compile time then each - * of the .c files will #include "all.h" only, instead of a bunch of - * individual .h files. - */ - - -#ifndef GLU_ALL_H -#define GLU_ALL_H - - -#ifndef PC_HEADER -This is an error. all.h should be included only if PCH is defined. -#endif - - -#include -#include -#include -#include -#include -#include "GL/gl.h" -#include "GL/glu.h" -#include "gluP.h" -#include "nurbs.h" -#include "tess.h" - - -#endif /*GLU_ALL_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/descrip.mms b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/descrip.mms deleted file mode 100644 index 16a1e61536..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/descrip.mms +++ /dev/null @@ -1,61 +0,0 @@ -# Makefile for GLU for VMS -# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl - -.first - define gl [-.include.gl] - -.include [-]mms-config. - -##### MACROS ##### - -VPATH = RCS - -INCDIR = $disk2:[-.include] -LIBDIR = [-.lib] -CFLAGS = /include=$(INCDIR)/define=(FBIND=1)/name=(as_is,short) - -SOURCES = glu.c mipmap.c nurbs.c nurbscrv.c nurbssrf.c nurbsutl.c \ - polytest.c project.c quadric.c tess.c tesselat.c - -OBJECTS =glu.obj,mipmap.obj,nurbs.obj,nurbscrv.obj,nurbssrf.obj,nurbsutl.obj,\ - polytest.obj,project.obj,quadric.obj,tess.obj,tesselat.obj - - -##### RULES ##### - -VERSION=MesaGlu V3.2 - -##### TARGETS ##### - -# Make the library: -$(LIBDIR)$(GLU_LIB) : $(OBJECTS) -.ifdef SHARE - @ WRITE_ SYS$OUTPUT " generating mesagl1.opt" - @ OPEN_/WRITE FILE mesagl1.opt - @ WRITE_ FILE "!" - @ WRITE_ FILE "! mesagl1.opt generated by DESCRIP.$(MMS_EXT)" - @ WRITE_ FILE "!" - @ WRITE_ FILE "IDENTIFICATION=""$(VERSION)""" - @ WRITE_ FILE "GSMATCH=LEQUAL,3,2 - @ WRITE_ FILE "$(OBJECTS)" - @ WRITE_ FILE "[-.lib]libmesagl.exe/SHARE" - @ WRITE_ FILE "SYS$SHARE:DECW$XEXTLIBSHR/SHARE" - @ WRITE_ FILE "SYS$SHARE:DECW$XLIBSHR/SHARE" - @ CLOSE_ FILE - @ WRITE_ SYS$OUTPUT " generating mesagl.map ..." - @ LINK_/NODEB/NOSHARE/NOEXE/MAP=mesagl.map/FULL mesagl1.opt/OPT - @ WRITE_ SYS$OUTPUT " analyzing mesagl.map ..." - @ @[-.vms]ANALYZE_MAP.COM mesagl.map mesagl.opt - @ WRITE_ SYS$OUTPUT " linking $(GLU_LIB) ..." - @ LINK_/noinform/NODEB/SHARE=$(GLU_LIB)/MAP=mesagl.map/FULL mesagl1.opt/opt,mesagl.opt/opt -.else - @ $(MAKELIB) $(GLU_LIB) $(OBJECTS) -.endif - @ rename $(GLU_LIB)* $(LIBDIR) - -clean : - delete *.obj;* - purge - -include mms_depend. - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/glu.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/glu.c deleted file mode 100644 index f9e33980a4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/glu.c +++ /dev/null @@ -1,416 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * Copyright (C) 1995-2001 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include -#include -#include -#include "gluP.h" -#endif - - -/* - * Miscellaneous utility functions - */ - - -#ifndef M_PI -#define M_PI 3.1415926536 -#endif -#define EPS 0.00001 - -#ifndef GLU_INCOMPATIBLE_GL_VERSION -#define GLU_INCOMPATIBLE_GL_VERSION 100903 -#endif - - -void GLAPIENTRY -gluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez, - GLdouble centerx, GLdouble centery, GLdouble centerz, - GLdouble upx, GLdouble upy, GLdouble upz) -{ - GLdouble m[16]; - GLdouble x[3], y[3], z[3]; - GLdouble mag; - - /* Make rotation matrix */ - - /* Z vector */ - z[0] = eyex - centerx; - z[1] = eyey - centery; - z[2] = eyez - centerz; - mag = sqrt(z[0] * z[0] + z[1] * z[1] + z[2] * z[2]); - if (mag) { /* mpichler, 19950515 */ - z[0] /= mag; - z[1] /= mag; - z[2] /= mag; - } - - /* Y vector */ - y[0] = upx; - y[1] = upy; - y[2] = upz; - - /* X vector = Y cross Z */ - x[0] = y[1] * z[2] - y[2] * z[1]; - x[1] = -y[0] * z[2] + y[2] * z[0]; - x[2] = y[0] * z[1] - y[1] * z[0]; - - /* Recompute Y = Z cross X */ - y[0] = z[1] * x[2] - z[2] * x[1]; - y[1] = -z[0] * x[2] + z[2] * x[0]; - y[2] = z[0] * x[1] - z[1] * x[0]; - - /* mpichler, 19950515 */ - /* cross product gives area of parallelogram, which is < 1.0 for - * non-perpendicular unit-length vectors; so normalize x, y here - */ - - mag = sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]); - if (mag) { - x[0] /= mag; - x[1] /= mag; - x[2] /= mag; - } - - mag = sqrt(y[0] * y[0] + y[1] * y[1] + y[2] * y[2]); - if (mag) { - y[0] /= mag; - y[1] /= mag; - y[2] /= mag; - } - -#define M(row,col) m[col*4+row] - M(0, 0) = x[0]; - M(0, 1) = x[1]; - M(0, 2) = x[2]; - M(0, 3) = 0.0; - M(1, 0) = y[0]; - M(1, 1) = y[1]; - M(1, 2) = y[2]; - M(1, 3) = 0.0; - M(2, 0) = z[0]; - M(2, 1) = z[1]; - M(2, 2) = z[2]; - M(2, 3) = 0.0; - M(3, 0) = 0.0; - M(3, 1) = 0.0; - M(3, 2) = 0.0; - M(3, 3) = 1.0; -#undef M - glMultMatrixd(m); - - /* Translate Eye to Origin */ - glTranslated(-eyex, -eyey, -eyez); - -} - - - -void GLAPIENTRY -gluOrtho2D(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top) -{ - glOrtho(left, right, bottom, top, -1.0, 1.0); -} - - - -static void -frustum(GLdouble left, GLdouble right, - GLdouble bottom, GLdouble top, - GLdouble nearval, GLdouble farval) -{ - GLdouble x, y, a, b, c, d; - GLdouble m[16]; - - x = (2.0 * nearval) / (right - left); - y = (2.0 * nearval) / (top - bottom); - a = (right + left) / (right - left); - b = (top + bottom) / (top - bottom); - c = -(farval + nearval) / ( farval - nearval); - d = -(2.0 * farval * nearval) / (farval - nearval); - -#define M(row,col) m[col*4+row] - M(0,0) = x; M(0,1) = 0.0F; M(0,2) = a; M(0,3) = 0.0F; - M(1,0) = 0.0F; M(1,1) = y; M(1,2) = b; M(1,3) = 0.0F; - M(2,0) = 0.0F; M(2,1) = 0.0F; M(2,2) = c; M(2,3) = d; - M(3,0) = 0.0F; M(3,1) = 0.0F; M(3,2) = -1.0F; M(3,3) = 0.0F; -#undef M - - glMultMatrixd(m); -} - - -void GLAPIENTRY -gluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar) -{ - GLdouble xmin, xmax, ymin, ymax; - - ymax = zNear * tan(fovy * M_PI / 360.0); - ymin = -ymax; - xmin = ymin * aspect; - xmax = ymax * aspect; - - /* don't call glFrustum() because of error semantics (covglu) */ - frustum(xmin, xmax, ymin, ymax, zNear, zFar); -} - - - -void GLAPIENTRY -gluPickMatrix(GLdouble x, GLdouble y, - GLdouble width, GLdouble height, GLint viewport[4]) -{ - GLfloat m[16]; - GLfloat sx, sy; - GLfloat tx, ty; - - sx = viewport[2] / width; - sy = viewport[3] / height; - tx = (viewport[2] + 2.0 * (viewport[0] - x)) / width; - ty = (viewport[3] + 2.0 * (viewport[1] - y)) / height; - -#define M(row,col) m[col*4+row] - M(0, 0) = sx; - M(0, 1) = 0.0; - M(0, 2) = 0.0; - M(0, 3) = tx; - M(1, 0) = 0.0; - M(1, 1) = sy; - M(1, 2) = 0.0; - M(1, 3) = ty; - M(2, 0) = 0.0; - M(2, 1) = 0.0; - M(2, 2) = 1.0; - M(2, 3) = 0.0; - M(3, 0) = 0.0; - M(3, 1) = 0.0; - M(3, 2) = 0.0; - M(3, 3) = 1.0; -#undef M - - glMultMatrixf(m); -} - - - -const GLubyte *GLAPIENTRY -gluErrorString(GLenum errorCode) -{ - static char *tess_error[] = { - "missing gluBeginPolygon", - "missing gluBeginContour", - "missing gluEndPolygon", - "missing gluEndContour", - "misoriented or self-intersecting loops", - "coincident vertices", - "colinear vertices", - "FIST recovery process fatal error" - }; - static char *nurbs_error[] = { - "spline order un-supported", - "too few knots", - "valid knot range is empty", - "decreasing knot sequence knot", - "knot multiplicity greater than order of spline", - "endcurve() must follow bgncurve()", - "bgncurve() must precede endcurve()", - "missing or extra geometric data", - "can't draw pwlcurves", - "missing bgncurve()", - "missing bgnsurface()", - "endtrim() must precede endsurface()", - "bgnsurface() must precede endsurface()", - "curve of improper type passed as trim curve", - "bgnsurface() must precede bgntrim()", - "endtrim() must follow bgntrim()", - "bgntrim() must precede endtrim()", - "invalid or missing trim curve", - "bgntrim() must precede pwlcurve()", - "pwlcurve referenced twice", - "pwlcurve and nurbscurve mixed", - "improper usage of trim data type", - "nurbscurve referenced twice", - "nurbscurve and pwlcurve mixed", - "nurbssurface referenced twice", - "invalid property", - "endsurface() must follow bgnsurface()", - "misoriented trim curves", - "intersecting trim curves", - "UNUSED", - "unconnected trim curves", - "unknown knot error", - "negative vertex count encountered", - "negative byte-stride encountered", - "unknown type descriptor", - "null control array or knot vector", - "duplicate point on pwlcurve" - }; - - /* GL Errors */ - if (errorCode == GL_NO_ERROR) { - return (GLubyte *) "no error"; - } - else if (errorCode == GL_INVALID_VALUE) { - return (GLubyte *) "invalid value"; - } - else if (errorCode == GL_INVALID_ENUM) { - return (GLubyte *) "invalid enum"; - } - else if (errorCode == GL_INVALID_OPERATION) { - return (GLubyte *) "invalid operation"; - } - else if (errorCode == GL_STACK_OVERFLOW) { - return (GLubyte *) "stack overflow"; - } - else if (errorCode == GL_STACK_UNDERFLOW) { - return (GLubyte *) "stack underflow"; - } - else if (errorCode == GL_OUT_OF_MEMORY) { - return (GLubyte *) "out of memory"; - } - /* GLU Errors */ - else if (errorCode == GLU_NO_ERROR) { - return (GLubyte *) "no error"; - } - else if (errorCode == GLU_INVALID_ENUM) { - return (GLubyte *) "invalid enum"; - } - else if (errorCode == GLU_INVALID_VALUE) { - return (GLubyte *) "invalid value"; - } - else if (errorCode == GLU_OUT_OF_MEMORY) { - return (GLubyte *) "out of memory"; - } - else if (errorCode == GLU_INCOMPATIBLE_GL_VERSION) { - return (GLubyte *) "incompatible GL version"; - } - else if (errorCode >= GLU_TESS_ERROR1 && errorCode <= GLU_TESS_ERROR8) { - return (GLubyte *) tess_error[errorCode - GLU_TESS_ERROR1]; - } - else if (errorCode >= GLU_NURBS_ERROR1 && errorCode <= GLU_NURBS_ERROR37) { - return (GLubyte *) nurbs_error[errorCode - GLU_NURBS_ERROR1]; - } - else { - return NULL; - } -} - - - -/* - * New in GLU 1.1 - */ - -const GLubyte *GLAPIENTRY -gluGetString(GLenum name) -{ - static char *extensions = "GL_EXT_abgr"; - static char *version = "1.1 Mesa 3.5"; - - switch (name) { - case GLU_EXTENSIONS: - return (GLubyte *) extensions; - case GLU_VERSION: - return (GLubyte *) version; - default: - return NULL; - } -} - - - -#if 0 /* gluGetProcAddressEXT not finalized yet! */ - -#ifdef __cplusplus - /* for BeOS R4.5 */ -void GLAPIENTRY(*gluGetProcAddressEXT(const GLubyte * procName)) (...) -#else -void (GLAPIENTRY * gluGetProcAddressEXT(const GLubyte * procName)) () -#endif -{ - struct proc - { - const char *name; - void *address; - }; - static struct proc procTable[] = { - {"gluGetProcAddressEXT", (void *) gluGetProcAddressEXT}, /* me! */ - - /* new 1.1 functions */ - {"gluGetString", (void *) gluGetString}, - - /* new 1.2 functions */ - {"gluTessBeginPolygon", (void *) gluTessBeginPolygon}, - {"gluTessBeginContour", (void *) gluTessBeginContour}, - {"gluTessEndContour", (void *) gluTessEndContour}, - {"gluTessEndPolygon", (void *) gluTessEndPolygon}, - {"gluGetTessProperty", (void *) gluGetTessProperty}, - - /* new 1.3 functions */ - - {NULL, NULL} - }; - GLuint i; - - for (i = 0; procTable[i].address; i++) { - if (strcmp((const char *) procName, procTable[i].name) == 0) - return (void (GLAPIENTRY *) ()) procTable[i].address; - } - - return NULL; -} - -#endif - - - -/* - * New in GLU 1.3 - */ -#ifdef GLU_VERSION_1_3 -GLboolean GLAPIENTRY -gluCheckExtension(const GLubyte *extName, const GLubyte * extString) -{ - assert(extName); - assert(extString); - { - const int len = strlen((const char *) extName); - const char *start = (const char *) extString; - - while (1) { - const char *c = strstr(start, (const char *) extName); - if (!c) - return GL_FALSE; - - if ((c == start || c[-1] == ' ') && (c[len] == ' ' || c[len] == 0)) - return GL_TRUE; - - start = c + len; - } - } -} -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/gluP.h b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/gluP.h deleted file mode 100644 index dc1b05b6a1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/gluP.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.3 - * Copyright (C) 1995-2004 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * This file allows the GLU code to be compiled either with the Mesa - * headers or with the real OpenGL headers. - */ - - -#ifndef GLUP_H -#define GLUP_H - - -#include -#include -#include - - -#if defined(_WIN32) && !defined(__WIN32__) -# define __WIN32__ -#endif - -#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN__)) -# pragma warning( disable : 4068 ) /* unknown pragma */ -# pragma warning( disable : 4710 ) /* function 'foo' not inlined */ -# pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */ -# pragma warning( disable : 4127 ) /* conditional expression is constant */ -# if defined(MESA_MINWARN) -# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */ -# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */ -# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */ -# pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */ -# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */ -# endif -# define GLCALLBACK __stdcall -# if defined(__CYGWIN__) -# define GLCALLBACKPCAST * -# else -# define GLCALLBACKPCAST __stdcall * -# endif -#else -/* non-Windows compilation */ -# define GLCALLBACK -# define GLCALLBACKPCAST * -#endif /* WIN32 / CYGWIN bracket */ - -/* compatability guard so we don't need to change client code */ - -#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP) -# define CALLBACK GLCALLBACK -#endif - - - -#ifndef GLU_TESS_ERROR9 - /* If we're using the real OpenGL header files... */ -# define GLU_TESS_ERROR9 100159 -#endif - - -#define GLU_NO_ERROR GL_NO_ERROR - - -/* for Sun: */ -#ifdef SUNOS4 -#define MEMCPY( DST, SRC, BYTES) \ - memcpy( (char *) (DST), (char *) (SRC), (int) (BYTES) ) -#else -#define MEMCPY( DST, SRC, BYTES) \ - memcpy( (void *) (DST), (void *) (SRC), (size_t) (BYTES) ) -#endif - - -#ifndef NULL -# define NULL 0 -#endif - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/mipmap.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/mipmap.c deleted file mode 100644 index d85ce9b9b0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/mipmap.c +++ /dev/null @@ -1,824 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.4 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include -#include -#include "gluP.h" -#endif - - -/* - * Compute ceiling of integer quotient of A divided by B: - */ -#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 ) - - - -#ifdef EPSILON -#undef EPSILON -#endif -#define EPSILON 0.001 - - -/* To work around optimizer bug in MSVC4.1 */ -#if defined(__WIN32__) && !defined(OPENSTEP) -void -dummy(GLuint j, GLuint k) -{ -} -#else -#define dummy(J, K) -#endif - - -GLint GLAPIENTRY -gluScaleImage(GLenum format, - GLsizei widthin, GLsizei heightin, - GLenum typein, const void *datain, - GLsizei widthout, GLsizei heightout, - GLenum typeout, void *dataout) -{ - GLint components, i, j, k; - GLfloat *tempin, *tempout; - GLfloat sx, sy; - GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels; - GLint packrowlength, packalignment, packskiprows, packskippixels; - GLint sizein, sizeout; - GLint rowstride, rowlen; - - - /* Determine number of components per pixel */ - switch (format) { - case GL_COLOR_INDEX: - case GL_STENCIL_INDEX: - case GL_DEPTH_COMPONENT: - case GL_RED: - case GL_GREEN: - case GL_BLUE: - case GL_ALPHA: - case GL_LUMINANCE: - components = 1; - break; - case GL_LUMINANCE_ALPHA: - components = 2; - break; - case GL_RGB: - case GL_BGR: - components = 3; - break; - case GL_RGBA: - case GL_BGRA: -#ifdef GL_EXT_abgr - case GL_ABGR_EXT: -#endif - components = 4; - break; - default: - return GLU_INVALID_ENUM; - } - - /* Determine bytes per input datum */ - switch (typein) { - case GL_UNSIGNED_BYTE: - sizein = sizeof(GLubyte); - break; - case GL_BYTE: - sizein = sizeof(GLbyte); - break; - case GL_UNSIGNED_SHORT: - sizein = sizeof(GLushort); - break; - case GL_SHORT: - sizein = sizeof(GLshort); - break; - case GL_UNSIGNED_INT: - sizein = sizeof(GLuint); - break; - case GL_INT: - sizein = sizeof(GLint); - break; - case GL_FLOAT: - sizein = sizeof(GLfloat); - break; - case GL_BITMAP: - /* not implemented yet */ - default: - return GL_INVALID_ENUM; - } - - /* Determine bytes per output datum */ - switch (typeout) { - case GL_UNSIGNED_BYTE: - sizeout = sizeof(GLubyte); - break; - case GL_BYTE: - sizeout = sizeof(GLbyte); - break; - case GL_UNSIGNED_SHORT: - sizeout = sizeof(GLushort); - break; - case GL_SHORT: - sizeout = sizeof(GLshort); - break; - case GL_UNSIGNED_INT: - sizeout = sizeof(GLuint); - break; - case GL_INT: - sizeout = sizeof(GLint); - break; - case GL_FLOAT: - sizeout = sizeof(GLfloat); - break; - case GL_BITMAP: - /* not implemented yet */ - default: - return GL_INVALID_ENUM; - } - - /* Get glPixelStore state */ - glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength); - glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment); - glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows); - glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels); - glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength); - glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment); - glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows); - glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels); - - /* Allocate storage for intermediate images */ - tempin = (GLfloat *) malloc(widthin * heightin - * components * sizeof(GLfloat)); - if (!tempin) { - return GLU_OUT_OF_MEMORY; - } - tempout = (GLfloat *) malloc(widthout * heightout - * components * sizeof(GLfloat)); - if (!tempout) { - free(tempin); - return GLU_OUT_OF_MEMORY; - } - - - /* - * Unpack the pixel data and convert to floating point - */ - - if (unpackrowlength > 0) { - rowlen = unpackrowlength; - } - else { - rowlen = widthin; - } - if (sizein >= unpackalignment) { - rowstride = components * rowlen; - } - else { - rowstride = unpackalignment / sizein - * CEILING(components * rowlen * sizein, unpackalignment); - } - - switch (typein) { - case GL_UNSIGNED_BYTE: - k = 0; - for (i = 0; i < heightin; i++) { - GLubyte *ubptr = (GLubyte *) datain - + i * rowstride - + unpackskiprows * rowstride + unpackskippixels * components; - for (j = 0; j < widthin * components; j++) { - dummy(j, k); - tempin[k++] = (GLfloat) * ubptr++; - } - } - break; - case GL_BYTE: - k = 0; - for (i = 0; i < heightin; i++) { - GLbyte *bptr = (GLbyte *) datain - + i * rowstride - + unpackskiprows * rowstride + unpackskippixels * components; - for (j = 0; j < widthin * components; j++) { - dummy(j, k); - tempin[k++] = (GLfloat) * bptr++; - } - } - break; - case GL_UNSIGNED_SHORT: - k = 0; - for (i = 0; i < heightin; i++) { - GLushort *usptr = (GLushort *) datain - + i * rowstride - + unpackskiprows * rowstride + unpackskippixels * components; - for (j = 0; j < widthin * components; j++) { - dummy(j, k); - tempin[k++] = (GLfloat) * usptr++; - } - } - break; - case GL_SHORT: - k = 0; - for (i = 0; i < heightin; i++) { - GLshort *sptr = (GLshort *) datain - + i * rowstride - + unpackskiprows * rowstride + unpackskippixels * components; - for (j = 0; j < widthin * components; j++) { - dummy(j, k); - tempin[k++] = (GLfloat) * sptr++; - } - } - break; - case GL_UNSIGNED_INT: - k = 0; - for (i = 0; i < heightin; i++) { - GLuint *uiptr = (GLuint *) datain - + i * rowstride - + unpackskiprows * rowstride + unpackskippixels * components; - for (j = 0; j < widthin * components; j++) { - dummy(j, k); - tempin[k++] = (GLfloat) * uiptr++; - } - } - break; - case GL_INT: - k = 0; - for (i = 0; i < heightin; i++) { - GLint *iptr = (GLint *) datain - + i * rowstride - + unpackskiprows * rowstride + unpackskippixels * components; - for (j = 0; j < widthin * components; j++) { - dummy(j, k); - tempin[k++] = (GLfloat) * iptr++; - } - } - break; - case GL_FLOAT: - k = 0; - for (i = 0; i < heightin; i++) { - GLfloat *fptr = (GLfloat *) datain - + i * rowstride - + unpackskiprows * rowstride + unpackskippixels * components; - for (j = 0; j < widthin * components; j++) { - dummy(j, k); - tempin[k++] = *fptr++; - } - } - break; - default: - return GLU_INVALID_ENUM; - } - - - /* - * Scale the image! - */ - - if (widthout > 1) - sx = (GLfloat) (widthin - 1) / (GLfloat) (widthout - 1); - else - sx = (GLfloat) (widthin - 1); - if (heightout > 1) - sy = (GLfloat) (heightin - 1) / (GLfloat) (heightout - 1); - else - sy = (GLfloat) (heightin - 1); - -/*#define POINT_SAMPLE*/ -#ifdef POINT_SAMPLE - for (i = 0; i < heightout; i++) { - GLint ii = i * sy; - for (j = 0; j < widthout; j++) { - GLint jj = j * sx; - - GLfloat *src = tempin + (ii * widthin + jj) * components; - GLfloat *dst = tempout + (i * widthout + j) * components; - - for (k = 0; k < components; k++) { - *dst++ = *src++; - } - } - } -#else - if (sx < 1.0 && sy < 1.0) { - /* magnify both width and height: use weighted sample of 4 pixels */ - GLint i0, i1, j0, j1; - GLfloat alpha, beta; - GLfloat *src00, *src01, *src10, *src11; - GLfloat s1, s2; - GLfloat *dst; - - for (i = 0; i < heightout; i++) { - i0 = i * sy; - i1 = i0 + 1; - if (i1 >= heightin) - i1 = heightin - 1; -/* i1 = (i+1) * sy - EPSILON;*/ - alpha = i * sy - i0; - for (j = 0; j < widthout; j++) { - j0 = j * sx; - j1 = j0 + 1; - if (j1 >= widthin) - j1 = widthin - 1; -/* j1 = (j+1) * sx - EPSILON; */ - beta = j * sx - j0; - - /* compute weighted average of pixels in rect (i0,j0)-(i1,j1) */ - src00 = tempin + (i0 * widthin + j0) * components; - src01 = tempin + (i0 * widthin + j1) * components; - src10 = tempin + (i1 * widthin + j0) * components; - src11 = tempin + (i1 * widthin + j1) * components; - - dst = tempout + (i * widthout + j) * components; - - for (k = 0; k < components; k++) { - s1 = *src00++ * (1.0 - beta) + *src01++ * beta; - s2 = *src10++ * (1.0 - beta) + *src11++ * beta; - *dst++ = s1 * (1.0 - alpha) + s2 * alpha; - } - } - } - } - else { - /* shrink width and/or height: use an unweighted box filter */ - GLint i0, i1; - GLint j0, j1; - GLint ii, jj; - GLfloat sum, *dst; - - for (i = 0; i < heightout; i++) { - i0 = i * sy; - i1 = i0 + 1; - if (i1 >= heightin) - i1 = heightin - 1; -/* i1 = (i+1) * sy - EPSILON; */ - for (j = 0; j < widthout; j++) { - j0 = j * sx; - j1 = j0 + 1; - if (j1 >= widthin) - j1 = widthin - 1; -/* j1 = (j+1) * sx - EPSILON; */ - - dst = tempout + (i * widthout + j) * components; - - /* compute average of pixels in the rectangle (i0,j0)-(i1,j1) */ - for (k = 0; k < components; k++) { - sum = 0.0; - for (ii = i0; ii <= i1; ii++) { - for (jj = j0; jj <= j1; jj++) { - sum += *(tempin + (ii * widthin + jj) * components + k); - } - } - sum /= (j1 - j0 + 1) * (i1 - i0 + 1); - *dst++ = sum; - } - } - } - } -#endif - - - /* - * Return output image - */ - - if (packrowlength > 0) { - rowlen = packrowlength; - } - else { - rowlen = widthout; - } - if (sizeout >= packalignment) { - rowstride = components * rowlen; - } - else { - rowstride = packalignment / sizeout - * CEILING(components * rowlen * sizeout, packalignment); - } - - switch (typeout) { - case GL_UNSIGNED_BYTE: - k = 0; - for (i = 0; i < heightout; i++) { - GLubyte *ubptr = (GLubyte *) dataout - + i * rowstride - + packskiprows * rowstride + packskippixels * components; - for (j = 0; j < widthout * components; j++) { - dummy(j, k + i); - *ubptr++ = (GLubyte) tempout[k++]; - } - } - break; - case GL_BYTE: - k = 0; - for (i = 0; i < heightout; i++) { - GLbyte *bptr = (GLbyte *) dataout - + i * rowstride - + packskiprows * rowstride + packskippixels * components; - for (j = 0; j < widthout * components; j++) { - dummy(j, k + i); - *bptr++ = (GLbyte) tempout[k++]; - } - } - break; - case GL_UNSIGNED_SHORT: - k = 0; - for (i = 0; i < heightout; i++) { - GLushort *usptr = (GLushort *) dataout - + i * rowstride - + packskiprows * rowstride + packskippixels * components; - for (j = 0; j < widthout * components; j++) { - dummy(j, k + i); - *usptr++ = (GLushort) tempout[k++]; - } - } - break; - case GL_SHORT: - k = 0; - for (i = 0; i < heightout; i++) { - GLshort *sptr = (GLshort *) dataout - + i * rowstride - + packskiprows * rowstride + packskippixels * components; - for (j = 0; j < widthout * components; j++) { - dummy(j, k + i); - *sptr++ = (GLshort) tempout[k++]; - } - } - break; - case GL_UNSIGNED_INT: - k = 0; - for (i = 0; i < heightout; i++) { - GLuint *uiptr = (GLuint *) dataout - + i * rowstride - + packskiprows * rowstride + packskippixels * components; - for (j = 0; j < widthout * components; j++) { - dummy(j, k + i); - *uiptr++ = (GLuint) tempout[k++]; - } - } - break; - case GL_INT: - k = 0; - for (i = 0; i < heightout; i++) { - GLint *iptr = (GLint *) dataout - + i * rowstride - + packskiprows * rowstride + packskippixels * components; - for (j = 0; j < widthout * components; j++) { - dummy(j, k + i); - *iptr++ = (GLint) tempout[k++]; - } - } - break; - case GL_FLOAT: - k = 0; - for (i = 0; i < heightout; i++) { - GLfloat *fptr = (GLfloat *) dataout - + i * rowstride - + packskiprows * rowstride + packskippixels * components; - for (j = 0; j < widthout * components; j++) { - dummy(j, k + i); - *fptr++ = tempout[k++]; - } - } - break; - default: - return GLU_INVALID_ENUM; - } - - - /* free temporary image storage */ - free(tempin); - free(tempout); - - return 0; -} - - - -/* - * Return the largest k such that 2^k <= n. - */ -static GLint -ilog2(GLint n) -{ - GLint k; - - if (n <= 0) - return 0; - for (k = 0; n >>= 1; k++); - return k; -} - - - -/* - * Find the value nearest to n which is also a power of two. - */ -static GLint -round2(GLint n) -{ - GLint m; - - for (m = 1; m < n; m *= 2); - - /* m>=n */ - if (m - n <= n - m / 2) { - return m; - } - else { - return m / 2; - } -} - - -/* - * Given an pixel format and datatype, return the number of bytes to - * store one pixel. - */ -static GLint -bytes_per_pixel(GLenum format, GLenum type) -{ - GLint n, m; - - switch (format) { - case GL_COLOR_INDEX: - case GL_STENCIL_INDEX: - case GL_DEPTH_COMPONENT: - case GL_RED: - case GL_GREEN: - case GL_BLUE: - case GL_ALPHA: - case GL_LUMINANCE: - n = 1; - break; - case GL_LUMINANCE_ALPHA: - n = 2; - break; - case GL_RGB: - case GL_BGR: - n = 3; - break; - case GL_RGBA: - case GL_BGRA: -#ifdef GL_EXT_abgr - case GL_ABGR_EXT: -#endif - n = 4; - break; - default: - n = 0; - } - - switch (type) { - case GL_UNSIGNED_BYTE: - m = sizeof(GLubyte); - break; - case GL_BYTE: - m = sizeof(GLbyte); - break; - case GL_BITMAP: - m = 1; - break; - case GL_UNSIGNED_SHORT: - m = sizeof(GLushort); - break; - case GL_SHORT: - m = sizeof(GLshort); - break; - case GL_UNSIGNED_INT: - m = sizeof(GLuint); - break; - case GL_INT: - m = sizeof(GLint); - break; - case GL_FLOAT: - m = sizeof(GLfloat); - break; - default: - m = 0; - } - - return n * m; -} - - - -/* - * WARNING: This function isn't finished and has never been tested!!!! - */ -GLint GLAPIENTRY -gluBuild1DMipmaps(GLenum target, GLint components, - GLsizei width, GLenum format, GLenum type, const void *data) -{ - GLubyte *texture; - GLint levels, max_levels; - GLint new_width, max_width; - GLint i, j, k, l; - - if (width < 1) - return GLU_INVALID_VALUE; - - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_width); - max_levels = ilog2(max_width) + 1; - - /* Compute how many mipmap images to make */ - levels = ilog2(width) + 1; - if (levels > max_levels) { - levels = max_levels; - } - - new_width = 1 << (levels - 1); - - texture = (GLubyte *) malloc(new_width * components); - if (!texture) { - return GLU_OUT_OF_MEMORY; - } - - if (width != new_width) { - /* initial rescaling */ - switch (type) { - case GL_UNSIGNED_BYTE: - { - GLubyte *ub_data = (GLubyte *) data; - for (i = 0; i < new_width; i++) { - j = i * width / new_width; - for (k = 0; k < components; k++) { - texture[i * components + k] = ub_data[j * components + k]; - } - } - } - break; - default: - /* Not implemented */ - return GLU_ERROR; - } - } - - /* generate and load mipmap images */ - for (l = 0; l < levels; l++) { - glTexImage1D(GL_TEXTURE_1D, l, components, new_width, 0, - format, GL_UNSIGNED_BYTE, texture); - - /* Scale image down to 1/2 size */ - new_width = new_width / 2; - for (i = 0; i < new_width; i++) { - for (k = 0; k < components; k++) { - GLint sample1, sample2; - sample1 = (GLint) texture[i * 2 * components + k]; - sample2 = (GLint) texture[(i * 2 + 1) * components + k]; - texture[i * components + k] = (GLubyte) ((sample1 + sample2) / 2); - } - } - } - - free(texture); - - return 0; -} - - - -GLint GLAPIENTRY -gluBuild2DMipmaps(GLenum target, GLint components, - GLsizei width, GLsizei height, GLenum format, - GLenum type, const void *data) -{ - GLint w, h, maxsize; - void *image, *newimage; - GLint neww, newh, level, bpp; - int error; - GLboolean done; - GLint retval = 0; - GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels; - GLint packrowlength, packalignment, packskiprows, packskippixels; - - if (width < 1 || height < 1) - return GLU_INVALID_VALUE; - - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize); - - w = round2(width); - if (w > maxsize) { - w = maxsize; - } - h = round2(height); - if (h > maxsize) { - h = maxsize; - } - - bpp = bytes_per_pixel(format, type); - if (bpp == 0) { - /* probably a bad format or type enum */ - return GLU_INVALID_ENUM; - } - - /* Get current glPixelStore values */ - glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength); - glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment); - glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows); - glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels); - glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength); - glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment); - glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows); - glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels); - - /* set pixel packing */ - glPixelStorei(GL_PACK_ROW_LENGTH, 0); - glPixelStorei(GL_PACK_ALIGNMENT, 1); - glPixelStorei(GL_PACK_SKIP_ROWS, 0); - glPixelStorei(GL_PACK_SKIP_PIXELS, 0); - - done = GL_FALSE; - - if (w != width || h != height) { - /* must rescale image to get "top" mipmap texture image */ - image = malloc((w + 4) * h * bpp); - if (!image) { - return GLU_OUT_OF_MEMORY; - } - error = gluScaleImage(format, width, height, type, data, - w, h, type, image); - if (error) { - retval = error; - done = GL_TRUE; - } - } - else { - image = (void *) data; - } - - level = 0; - while (!done) { - if (image != data) { - /* set pixel unpacking */ - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - } - - glTexImage2D(target, level, components, w, h, 0, format, type, image); - - if (w == 1 && h == 1) - break; - - neww = (w < 2) ? 1 : w / 2; - newh = (h < 2) ? 1 : h / 2; - newimage = malloc((neww + 4) * newh * bpp); - if (!newimage) { - return GLU_OUT_OF_MEMORY; - } - - error = gluScaleImage(format, w, h, type, image, - neww, newh, type, newimage); - if (error) { - retval = error; - done = GL_TRUE; - } - - if (image != data) { - free(image); - } - image = newimage; - - w = neww; - h = newh; - level++; - } - - if (image != data) { - free(image); - } - - /* Restore original glPixelStore state */ - glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackrowlength); - glPixelStorei(GL_UNPACK_ALIGNMENT, unpackalignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackskiprows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackskippixels); - glPixelStorei(GL_PACK_ROW_LENGTH, packrowlength); - glPixelStorei(GL_PACK_ALIGNMENT, packalignment); - glPixelStorei(GL_PACK_SKIP_ROWS, packskiprows); - glPixelStorei(GL_PACK_SKIP_PIXELS, packskippixels); - - return retval; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/mms_depend b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/mms_depend deleted file mode 100644 index ed59ca9de8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/mms_depend +++ /dev/null @@ -1,15 +0,0 @@ -# DO NOT DELETE THIS LINE -- make depend depends on it. - -glu.obj : gluP.h [-.include.gl]gl.h [-.include.gl]glu.h -mipmap.obj : gluP.h [-.include.gl]gl.h [-.include.gl]glu.h -nurbs.obj : gluP.h [-.include.gl]gl.h [-.include.gl]glu.h nurbs.h -nurbscrv.obj : nurbs.h gluP.h [-.include.gl]gl.h [-.include.gl]glu.h -nurbssrf.obj : gluP.h [-.include.gl]gl.h [-.include.gl]glu.h nurbs.h -nurbsutl.obj : gluP.h [-.include.gl]gl.h [-.include.gl]glu.h nurbs.h -project.obj : gluP.h [-.include.gl]gl.h [-.include.gl]glu.h -quadric.obj : gluP.h [-.include.gl]gl.h [-.include.gl]glu.h -tess.obj : gluP.h [-.include.gl]gl.h [-.include.gl]glu.h tess.h -tess_fist.obj : gluP.h [-.include.gl]gl.h [-.include.gl]glu.h tess.h -tess_hash.obj : gluP.h [-.include.gl]gl.h [-.include.gl]glu.h tess.h -tess_heap.obj : gluP.h [-.include.gl]gl.h [-.include.gl]glu.h tess.h -tess_clip.obj : gluP.h [-.include.gl]gl.h [-.include.gl]glu.h tess.h diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/nurbs.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/nurbs.c deleted file mode 100644 index 3f102b4e45..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/nurbs.c +++ /dev/null @@ -1,628 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * NURBS implementation written by Bogdan Sikorski (bogdan@cira.it) - * See README2 for more info. - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include "gluP.h" -#include "nurbs.h" -#endif - - -void -call_user_error(GLUnurbsObj * nobj, GLenum error) -{ - nobj->error = error; - if (nobj->error_callback != NULL) { - (*(nobj->error_callback)) (error); - } - else { - printf("NURBS error %d %s\n", error, (char *) gluErrorString(error)); - } -} - - - -GLUnurbsObj *GLAPIENTRY -gluNewNurbsRenderer(void) -{ - GLUnurbsObj *n; - GLfloat tmp_viewport[4]; - GLint i, j; - - n = (GLUnurbsObj *) malloc(sizeof(GLUnurbsObj)); - if (n) { - /* init */ - n->culling = GL_FALSE; - n->nurbs_type = GLU_NURBS_NONE; - n->error = GLU_NO_ERROR; - n->error_callback = NULL; - n->auto_load_matrix = GL_TRUE; - n->sampling_tolerance = 50.0; - n->parametric_tolerance = 0.5; - n->u_step = n->v_step = 100; - n->sampling_method = GLU_PATH_LENGTH; - n->display_mode = GLU_FILL; - /* in case the user doesn't supply the sampling matrices */ - /* set projection and modelview to identity */ - for (i = 0; i < 4; i++) - for (j = 0; j < 4; j++) - if (i == j) { - n->sampling_matrices.model[i * 4 + j] = 1.0; - n->sampling_matrices.proj[i * 4 + j] = 1.0; - } - else { - n->sampling_matrices.model[i * 4 + j] = 0.0; - n->sampling_matrices.proj[i * 4 + j] = 0.0; - } - /* and set the viewport sampling matrix to current ciewport */ - glGetFloatv(GL_VIEWPORT, tmp_viewport); - for (i = 0; i < 4; i++) - n->sampling_matrices.viewport[i] = tmp_viewport[i]; - n->trim = NULL; - } - return n; -} - - - -void GLAPIENTRY -gluDeleteNurbsRenderer(GLUnurbsObj * nobj) -{ - if (nobj) { - free(nobj); - } -} - - - -void GLAPIENTRY -gluLoadSamplingMatrices(GLUnurbsObj * nobj, - const GLfloat modelMatrix[16], - const GLfloat projMatrix[16], const GLint viewport[4]) -{ - GLint i; - - for (i = 0; i < 16; i++) { - nobj->sampling_matrices.model[i] = modelMatrix[i]; - nobj->sampling_matrices.proj[i] = projMatrix[i]; - } - for (i = 0; i < 4; i++) - nobj->sampling_matrices.viewport[i] = viewport[i]; -} - - -void GLAPIENTRY -gluNurbsProperty(GLUnurbsObj * nobj, GLenum property, GLfloat value) -{ - GLenum val; - - switch (property) { - case GLU_SAMPLING_TOLERANCE: - if (value <= 0.0) { - call_user_error(nobj, GLU_INVALID_VALUE); - return; - } - nobj->sampling_tolerance = value; - break; - case GLU_PARAMETRIC_TOLERANCE: - if (value <= 0.0) { - call_user_error(nobj, GLU_INVALID_VALUE); - return; - } - nobj->parametric_tolerance = value; - break; - case GLU_U_STEP: - if (value <= 0.0) { - call_user_error(nobj, GLU_INVALID_VALUE); - return; - } - nobj->u_step = (GLint) value; - break; - case GLU_V_STEP: - if (value <= 0.0) { - call_user_error(nobj, GLU_INVALID_VALUE); - return; - } - nobj->v_step = (GLint) value; - break; - case GLU_SAMPLING_METHOD: - val = (GLenum) value; - if (val != GLU_PATH_LENGTH && val != GLU_PARAMETRIC_ERROR - && val != GLU_DOMAIN_DISTANCE) { - call_user_error(nobj, GLU_INVALID_ENUM); - return; - } - nobj->sampling_method = val; - break; - case GLU_DISPLAY_MODE: - val = (GLenum) value; - if (val != GLU_FILL && val != GLU_OUTLINE_POLYGON - && val != GLU_OUTLINE_PATCH) { - call_user_error(nobj, GLU_INVALID_ENUM); - return; - } - if (nobj->nurbs_type == GLU_NURBS_CURVE) { - call_user_error(nobj, GLU_NURBS_ERROR26); - return; - } - nobj->display_mode = val; - if (val == GLU_OUTLINE_PATCH) - fprintf(stderr, - "NURBS, for the moment, can display only in POLYGON mode\n"); - break; - case GLU_CULLING: - val = (GLenum) value; - if (val != GL_TRUE && val != GL_FALSE) { - call_user_error(nobj, GLU_INVALID_ENUM); - return; - } - nobj->culling = (GLboolean) value; - break; - case GLU_AUTO_LOAD_MATRIX: - val = (GLenum) value; - if (val != GL_TRUE && val != GL_FALSE) { - call_user_error(nobj, GLU_INVALID_ENUM); - return; - } - nobj->auto_load_matrix = (GLboolean) value; - break; - default: - call_user_error(nobj, GLU_NURBS_ERROR26); - } -} - - -void GLAPIENTRY -gluGetNurbsProperty(GLUnurbsObj * nobj, GLenum property, GLfloat * value) -{ - switch (property) { - case GLU_SAMPLING_TOLERANCE: - *value = nobj->sampling_tolerance; - break; - case GLU_DISPLAY_MODE: - *value = (GLfloat) (GLint) nobj->display_mode; - break; - case GLU_CULLING: - *value = nobj->culling ? 1.0 : 0.0; - break; - case GLU_AUTO_LOAD_MATRIX: - *value = nobj->auto_load_matrix ? 1.0 : 0.0; - break; - default: - call_user_error(nobj, GLU_INVALID_ENUM); - } -} - - - -void GLAPIENTRY -gluBeginCurve(GLUnurbsObj * nobj) -{ - if (nobj->nurbs_type == GLU_NURBS_CURVE) { - call_user_error(nobj, GLU_NURBS_ERROR6); - return; - } - nobj->nurbs_type = GLU_NURBS_CURVE; - nobj->curve.geom.type = GLU_INVALID_ENUM; - nobj->curve.color.type = GLU_INVALID_ENUM; - nobj->curve.texture.type = GLU_INVALID_ENUM; - nobj->curve.normal.type = GLU_INVALID_ENUM; -} - - -void GLAPIENTRY -gluEndCurve(GLUnurbsObj * nobj) -{ - if (nobj->nurbs_type == GLU_NURBS_NONE) { - call_user_error(nobj, GLU_NURBS_ERROR7); - return; - } - if (nobj->curve.geom.type == GLU_INVALID_ENUM) { - call_user_error(nobj, GLU_NURBS_ERROR8); - nobj->nurbs_type = GLU_NURBS_NONE; - return; - } - glPushAttrib((GLbitfield) (GL_EVAL_BIT | GL_ENABLE_BIT)); - glDisable(GL_MAP1_VERTEX_3); - glDisable(GL_MAP1_VERTEX_4); - glDisable(GL_MAP1_INDEX); - glDisable(GL_MAP1_COLOR_4); - glDisable(GL_MAP1_NORMAL); - glDisable(GL_MAP1_TEXTURE_COORD_1); - glDisable(GL_MAP1_TEXTURE_COORD_2); - glDisable(GL_MAP1_TEXTURE_COORD_3); - glDisable(GL_MAP1_TEXTURE_COORD_4); - glDisable(GL_MAP2_VERTEX_3); - glDisable(GL_MAP2_VERTEX_4); - glDisable(GL_MAP2_INDEX); - glDisable(GL_MAP2_COLOR_4); - glDisable(GL_MAP2_NORMAL); - glDisable(GL_MAP2_TEXTURE_COORD_1); - glDisable(GL_MAP2_TEXTURE_COORD_2); - glDisable(GL_MAP2_TEXTURE_COORD_3); - glDisable(GL_MAP2_TEXTURE_COORD_4); - do_nurbs_curve(nobj); - glPopAttrib(); - nobj->nurbs_type = GLU_NURBS_NONE; -} - - -void GLAPIENTRY -gluNurbsCurve(GLUnurbsObj * nobj, GLint nknots, GLfloat * knot, - GLint stride, GLfloat * ctlarray, GLint order, GLenum type) -{ - if (nobj->nurbs_type == GLU_NURBS_TRIM) { -#if 0 -/* TODO: NOT IMPLEMENTED YET */ - nurbs_trim *ptr1; - trim_list *ptr2; - - if (type != GLU_MAP1_TRIM_2 && type != GLU_MAP1_TRIM_3) { - call_user_error(nobj, GLU_NURBS_ERROR14); - return; - } - for (ptr1 = nobj->trim; ptr1->next; ptr1 = ptr1->next); - if (ptr1->trim_loop) { - for (ptr2 = ptr1->trim_loop; ptr2->next; ptr2 = ptr2->next); - if ((ptr2->next = (trim_list *) malloc(sizeof(trim_list))) == NULL) { - call_user_error(nobj, GLU_OUT_OF_MEMORY); - return; - } - ptr2 = ptr2->next; - } - else { - if ((ptr2 = (trim_list *) malloc(sizeof(trim_list))) == NULL) { - call_user_error(nobj, GLU_OUT_OF_MEMORY); - return; - } - ptr1->trim_loop = ptr2; - } - ptr2->trim_type = GLU_TRIM_NURBS; - ptr2->curve.nurbs_curve.knot_count = nknots; - ptr2->curve.nurbs_curve.knot = knot; - ptr2->curve.nurbs_curve.stride = stride; - ptr2->curve.nurbs_curve.ctrlarray = ctlarray; - ptr2->curve.nurbs_curve.order = order; - ptr2->curve.nurbs_curve.dim = (type == GLU_MAP1_TRIM_2 ? 2 : 3); - ptr2->curve.nurbs_curve.type = type; - ptr2->next = NULL; -#endif - } - else { - if (type == GLU_MAP1_TRIM_2 || type == GLU_MAP1_TRIM_3) { - call_user_error(nobj, GLU_NURBS_ERROR22); - return; - } - if (nobj->nurbs_type != GLU_NURBS_CURVE) { - call_user_error(nobj, GLU_NURBS_ERROR10); - return; - } - switch (type) { - case GL_MAP1_VERTEX_3: - case GL_MAP1_VERTEX_4: - if (nobj->curve.geom.type != GLU_INVALID_ENUM) { - call_user_error(nobj, GLU_NURBS_ERROR8); - return; - } - nobj->curve.geom.type = type; - nobj->curve.geom.knot_count = nknots; - nobj->curve.geom.knot = knot; - nobj->curve.geom.stride = stride; - nobj->curve.geom.ctrlarray = ctlarray; - nobj->curve.geom.order = order; - break; - case GL_MAP1_INDEX: - case GL_MAP1_COLOR_4: - nobj->curve.color.type = type; - nobj->curve.color.knot_count = nknots; - nobj->curve.color.knot = knot; - nobj->curve.color.stride = stride; - nobj->curve.color.ctrlarray = ctlarray; - nobj->curve.color.order = order; - break; - case GL_MAP1_NORMAL: - nobj->curve.normal.type = type; - nobj->curve.normal.knot_count = nknots; - nobj->curve.normal.knot = knot; - nobj->curve.normal.stride = stride; - nobj->curve.normal.ctrlarray = ctlarray; - nobj->curve.normal.order = order; - break; - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_TEXTURE_COORD_4: - nobj->curve.texture.type = type; - nobj->curve.texture.knot_count = nknots; - nobj->curve.texture.knot = knot; - nobj->curve.texture.stride = stride; - nobj->curve.texture.ctrlarray = ctlarray; - nobj->curve.texture.order = order; - break; - default: - call_user_error(nobj, GLU_INVALID_ENUM); - } - } -} - - -void GLAPIENTRY -gluBeginSurface(GLUnurbsObj * nobj) -{ - switch (nobj->nurbs_type) { - case GLU_NURBS_NONE: - nobj->nurbs_type = GLU_NURBS_SURFACE; - nobj->surface.geom.type = GLU_INVALID_ENUM; - nobj->surface.color.type = GLU_INVALID_ENUM; - nobj->surface.texture.type = GLU_INVALID_ENUM; - nobj->surface.normal.type = GLU_INVALID_ENUM; - break; - case GLU_NURBS_TRIM: - call_user_error(nobj, GLU_NURBS_ERROR16); - break; - case GLU_NURBS_SURFACE: - case GLU_NURBS_NO_TRIM: - case GLU_NURBS_TRIM_DONE: - call_user_error(nobj, GLU_NURBS_ERROR27); - break; - case GLU_NURBS_CURVE: - call_user_error(nobj, GLU_NURBS_ERROR6); - break; - } -} - - -void GLAPIENTRY -gluEndSurface(GLUnurbsObj * nobj) -{ - switch (nobj->nurbs_type) { - case GLU_NURBS_NONE: - call_user_error(nobj, GLU_NURBS_ERROR13); - break; - case GLU_NURBS_TRIM: - call_user_error(nobj, GLU_NURBS_ERROR12); - break; - case GLU_NURBS_TRIM_DONE: -/* if(nobj->trim->trim_loop==NULL) - { - call_user_error(nobj,GLU_NURBS_ERROR18); - return; - }*/ - /* no break - fallthrough */ - case GLU_NURBS_NO_TRIM: - glPushAttrib((GLbitfield) - (GL_EVAL_BIT | GL_ENABLE_BIT | GL_POLYGON_BIT)); - glDisable(GL_MAP2_VERTEX_3); - glDisable(GL_MAP2_VERTEX_4); - glDisable(GL_MAP2_INDEX); - glDisable(GL_MAP2_COLOR_4); - glDisable(GL_MAP2_NORMAL); - glDisable(GL_MAP2_TEXTURE_COORD_1); - glDisable(GL_MAP2_TEXTURE_COORD_2); - glDisable(GL_MAP2_TEXTURE_COORD_3); - glDisable(GL_MAP2_TEXTURE_COORD_4); -/* glDisable(GL_MAP1_VERTEX_3); - glDisable(GL_MAP1_VERTEX_4); - glDisable(GL_MAP1_INDEX); - glDisable(GL_MAP1_COLOR_4); - glDisable(GL_MAP1_NORMAL); - glDisable(GL_MAP1_TEXTURE_COORD_1); - glDisable(GL_MAP1_TEXTURE_COORD_2); - glDisable(GL_MAP1_TEXTURE_COORD_3); - glDisable(GL_MAP1_TEXTURE_COORD_4);*/ - do_nurbs_surface(nobj); - glPopAttrib(); - break; - default: - call_user_error(nobj, GLU_NURBS_ERROR8); - } - nobj->nurbs_type = GLU_NURBS_NONE; -} - - -void GLAPIENTRY -gluNurbsSurface(GLUnurbsObj * nobj, - GLint sknot_count, GLfloat * sknot, - GLint tknot_count, GLfloat * tknot, - GLint s_stride, GLint t_stride, - GLfloat * ctrlarray, GLint sorder, GLint torder, GLenum type) -{ - if (nobj->nurbs_type == GLU_NURBS_NO_TRIM - || nobj->nurbs_type == GLU_NURBS_TRIM - || nobj->nurbs_type == GLU_NURBS_TRIM_DONE) { - if (type == GL_MAP2_VERTEX_3 || type == GL_MAP2_VERTEX_4) { - call_user_error(nobj, GLU_NURBS_ERROR8); - return; - } - } - else if (nobj->nurbs_type != GLU_NURBS_SURFACE) { - call_user_error(nobj, GLU_NURBS_ERROR11); - return; - } - switch (type) { - case GL_MAP2_VERTEX_3: - case GL_MAP2_VERTEX_4: - nobj->surface.geom.sknot_count = sknot_count; - nobj->surface.geom.sknot = sknot; - nobj->surface.geom.tknot_count = tknot_count; - nobj->surface.geom.tknot = tknot; - nobj->surface.geom.s_stride = s_stride; - nobj->surface.geom.t_stride = t_stride; - nobj->surface.geom.ctrlarray = ctrlarray; - nobj->surface.geom.sorder = sorder; - nobj->surface.geom.torder = torder; - nobj->surface.geom.type = type; - nobj->nurbs_type = GLU_NURBS_NO_TRIM; - break; - case GL_MAP2_INDEX: - case GL_MAP2_COLOR_4: - nobj->surface.color.sknot_count = sknot_count; - nobj->surface.color.sknot = sknot; - nobj->surface.color.tknot_count = tknot_count; - nobj->surface.color.tknot = tknot; - nobj->surface.color.s_stride = s_stride; - nobj->surface.color.t_stride = t_stride; - nobj->surface.color.ctrlarray = ctrlarray; - nobj->surface.color.sorder = sorder; - nobj->surface.color.torder = torder; - nobj->surface.color.type = type; - break; - case GL_MAP2_NORMAL: - nobj->surface.normal.sknot_count = sknot_count; - nobj->surface.normal.sknot = sknot; - nobj->surface.normal.tknot_count = tknot_count; - nobj->surface.normal.tknot = tknot; - nobj->surface.normal.s_stride = s_stride; - nobj->surface.normal.t_stride = t_stride; - nobj->surface.normal.ctrlarray = ctrlarray; - nobj->surface.normal.sorder = sorder; - nobj->surface.normal.torder = torder; - nobj->surface.normal.type = type; - break; - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_TEXTURE_COORD_4: - nobj->surface.texture.sknot_count = sknot_count; - nobj->surface.texture.sknot = sknot; - nobj->surface.texture.tknot_count = tknot_count; - nobj->surface.texture.tknot = tknot; - nobj->surface.texture.s_stride = s_stride; - nobj->surface.texture.t_stride = t_stride; - nobj->surface.texture.ctrlarray = ctrlarray; - nobj->surface.texture.sorder = sorder; - nobj->surface.texture.torder = torder; - nobj->surface.texture.type = type; - break; - default: - call_user_error(nobj, GLU_INVALID_ENUM); - } -} - - -void GLAPIENTRY -gluNurbsCallback(GLUnurbsObj * nobj, GLenum which, void (GLCALLBACK * fn) ()) -{ - nobj->error_callback = (void (GLCALLBACKPCAST) (GLenum)) fn; - - if (which != GLU_ERROR) - call_user_error(nobj, GLU_INVALID_ENUM); -} - -void GLAPIENTRY -gluBeginTrim(GLUnurbsObj * nobj) -{ -#if 0 - nurbs_trim *ptr; -#endif - - if (nobj->nurbs_type != GLU_NURBS_TRIM_DONE) - if (nobj->nurbs_type != GLU_NURBS_NO_TRIM) { - call_user_error(nobj, GLU_NURBS_ERROR15); - return; - } - nobj->nurbs_type = GLU_NURBS_TRIM; - fprintf(stderr, "NURBS - trimming not supported yet\n"); -#if 0 - if ((ptr = (nurbs_trim *) malloc(sizeof(nurbs_trim))) == NULL) { - call_user_error(nobj, GLU_OUT_OF_MEMORY); - return; - } - if (nobj->trim) { - nurbs_trim *tmp_ptr; - - for (tmp_ptr = nobj->trim; tmp_ptr->next; tmp_ptr = tmp_ptr->next); - tmp_ptr->next = ptr; - } - else - nobj->trim = ptr; - ptr->trim_loop = NULL; - ptr->segments = NULL; - ptr->next = NULL; -#endif -} - -void GLAPIENTRY -gluPwlCurve(GLUnurbsObj * nobj, GLint count, GLfloat * array, GLint stride, - GLenum type) -{ -#if 0 - nurbs_trim *ptr1; - trim_list *ptr2; -#endif - if (nobj->nurbs_type == GLU_NURBS_CURVE) { - call_user_error(nobj, GLU_NURBS_ERROR9); - return; - } - if (nobj->nurbs_type == GLU_NURBS_NONE) { - call_user_error(nobj, GLU_NURBS_ERROR19); - return; - } - if (type != GLU_MAP1_TRIM_2 && type != GLU_MAP1_TRIM_3) { - call_user_error(nobj, GLU_NURBS_ERROR14); - return; - } -#if 0 - for (ptr1 = nobj->trim; ptr1->next; ptr1 = ptr1->next); - if (ptr1->trim_loop) { - for (ptr2 = ptr1->trim_loop; ptr2->next; ptr2 = ptr2->next); - if ((ptr2->next = (trim_list *) malloc(sizeof(trim_list))) == NULL) { - call_user_error(nobj, GLU_OUT_OF_MEMORY); - return; - } - ptr2 = ptr2->next; - } - else { - if ((ptr2 = (trim_list *) malloc(sizeof(trim_list))) == NULL) { - call_user_error(nobj, GLU_OUT_OF_MEMORY); - return; - } - ptr1->trim_loop = ptr2; - } - ptr2->trim_type = GLU_TRIM_PWL; - ptr2->curve.pwl_curve.pt_count = count; - ptr2->curve.pwl_curve.ctrlarray = array; - ptr2->curve.pwl_curve.stride = stride; - ptr2->curve.pwl_curve.dim = (type == GLU_MAP1_TRIM_2 ? 2 : 3); - ptr2->curve.pwl_curve.type = type; - ptr2->next = NULL; -#endif -} - -void GLAPIENTRY -gluEndTrim(GLUnurbsObj * nobj) -{ - if (nobj->nurbs_type != GLU_NURBS_TRIM) { - call_user_error(nobj, GLU_NURBS_ERROR17); - return; - } - nobj->nurbs_type = GLU_NURBS_TRIM_DONE; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/nurbs.h b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/nurbs.h deleted file mode 100644 index 3642e213a8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/nurbs.h +++ /dev/null @@ -1,252 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * NURBS implementation written by Bogdan Sikorski (bogdan@cira.it) - * See README2 for more info. - */ - - -#ifndef NURBS_H -#define NURBS_H - - -#define EPSILON 1e-06 /* epsilon for double precision compares */ - -typedef enum -{ - GLU_NURBS_CURVE, GLU_NURBS_SURFACE, GLU_NURBS_TRIM, GLU_NURBS_NO_TRIM, - GLU_NURBS_TRIM_DONE, GLU_NURBS_NONE -} -GLU_nurbs_enum; - -typedef enum -{ - GLU_TRIM_NURBS, GLU_TRIM_PWL -} -GLU_trim_enum; - -typedef struct -{ - GLint sknot_count; - GLfloat *sknot; - GLint tknot_count; - GLfloat *tknot; - GLint s_stride; - GLint t_stride; - GLfloat *ctrlarray; - GLint sorder; - GLint torder; - GLint dim; - GLenum type; -} -surface_attribs; - -typedef struct -{ - surface_attribs geom; - surface_attribs color; - surface_attribs texture; - surface_attribs normal; -} -nurbs_surface; - -typedef struct -{ - GLint knot_count; - GLfloat *knot; - GLint stride; - GLfloat *ctrlarray; - GLint order; - GLint dim; - GLenum type; -} -curve_attribs; - -typedef struct -{ - GLint pt_count; - GLfloat *ctrlarray; - GLint stride; - GLint dim; - GLenum type; -} -pwl_curve_attribs; - -typedef struct -{ - curve_attribs geom; - curve_attribs color; - curve_attribs texture; - curve_attribs normal; -} -nurbs_curve; - -typedef struct trim_list_str -{ - GLU_trim_enum trim_type; - union - { - pwl_curve_attribs pwl_curve; - curve_attribs nurbs_curve; - } - curve; - struct trim_list_str *next; -} -trim_list; - -typedef struct seg_trim_str -{ - GLfloat *points; - GLint pt_cnt, seg_array_len; - struct seg_trim_str *next; -} -trim_segments; - -typedef struct nurbs_trim_str -{ - trim_list *trim_loop; - trim_segments *segments; - struct nurbs_trim_str *next; -} -nurbs_trim; - -typedef struct -{ - GLfloat model[16], proj[16], viewport[4]; -} -culling_and_sampling_str; - -struct GLUnurbs -{ - GLboolean culling; - GLenum error; - void (GLCALLBACK * error_callback) (GLenum err); - GLenum display_mode; - GLU_nurbs_enum nurbs_type; - GLboolean auto_load_matrix; - culling_and_sampling_str sampling_matrices; - GLenum sampling_method; - GLfloat sampling_tolerance; - GLfloat parametric_tolerance; - GLint u_step, v_step; - nurbs_surface surface; - nurbs_curve curve; - nurbs_trim *trim; -}; - -typedef struct -{ - GLfloat *knot; - GLint nknots; - GLfloat *unified_knot; - GLint unified_nknots; - GLint order; - GLint t_min, t_max; - GLint delta_nknots; - GLboolean open_at_begin, open_at_end; - GLfloat *new_knot; - GLfloat *alpha; -} -knot_str_type; - -typedef struct -{ - GLfloat *geom_ctrl; - GLint geom_s_stride, geom_t_stride; - GLfloat **geom_offsets; - GLint geom_s_pt_cnt, geom_t_pt_cnt; - GLfloat *color_ctrl; - GLint color_s_stride, color_t_stride; - GLfloat **color_offsets; - GLint color_s_pt_cnt, color_t_pt_cnt; - GLfloat *normal_ctrl; - GLint normal_s_stride, normal_t_stride; - GLfloat **normal_offsets; - GLint normal_s_pt_cnt, normal_t_pt_cnt; - GLfloat *texture_ctrl; - GLint texture_s_stride, texture_t_stride; - GLfloat **texture_offsets; - GLint texture_s_pt_cnt, texture_t_pt_cnt; - GLint s_bezier_cnt, t_bezier_cnt; -} -new_ctrl_type; - -extern void call_user_error(GLUnurbsObj * nobj, GLenum error); - -extern GLenum test_knot(GLint nknots, GLfloat * knot, GLint order); - -extern GLenum explode_knot(knot_str_type * the_knot); - -extern GLenum calc_alphas(knot_str_type * the_knot); - -extern GLenum calc_new_ctrl_pts(GLfloat * ctrl, GLint stride, - knot_str_type * the_knot, GLint dim, - GLfloat ** new_ctrl, GLint * ncontrol); - -extern GLenum glu_do_sampling_crv(GLUnurbsObj * nobj, GLfloat * new_ctrl, - GLint n_ctrl, GLint order, GLint dim, - GLint ** factors); - -extern GLenum glu_do_sampling_3D(GLUnurbsObj * nobj, new_ctrl_type * new_ctrl, - int **sfactors, GLint ** tfactors); - -extern GLenum glu_do_sampling_uv(GLUnurbsObj * nobj, new_ctrl_type * new_ctrl, - int **sfactors, GLint ** tfactors); - -extern GLenum glu_do_sampling_param_3D(GLUnurbsObj * nobj, - new_ctrl_type * new_ctrl, - int **sfactors, GLint ** tfactors); - -extern GLboolean fine_culling_test_2D(GLUnurbsObj * nobj, GLfloat * ctrl, - GLint n_ctrl, GLint stride, GLint dim); - -extern GLboolean fine_culling_test_3D(GLUnurbsObj * nobj, GLfloat * ctrl, - GLint s_n_ctrl, GLint t_n_ctrl, - GLint s_stride, GLint t_stride, - GLint dim); - -extern void do_nurbs_curve(GLUnurbsObj * nobj); - -extern void do_nurbs_surface(GLUnurbsObj * nobj); - -extern GLenum patch_trimming(GLUnurbsObj * nobj, new_ctrl_type * new_ctrl, - GLint * sfactors, GLint * tfactors); - -extern void collect_unified_knot(knot_str_type * dest, knot_str_type * src, - GLfloat maximal_min_knot, - GLfloat minimal_max_knot); - -extern GLenum select_knot_working_range(GLUnurbsObj * nobj, - knot_str_type * geom_knot, - knot_str_type * color_knot, - knot_str_type * normal_knot, - knot_str_type * texture_knot); - -extern void free_unified_knots(knot_str_type * geom_knot, - knot_str_type * color_knot, - knot_str_type * normal_knot, - knot_str_type * texture_knot); - - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/nurbscrv.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/nurbscrv.c deleted file mode 100644 index 4483e1f776..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/nurbscrv.c +++ /dev/null @@ -1,444 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * NURBS implementation written by Bogdan Sikorski (bogdan@cira.it) - * See README2 for more info. - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include "gluP.h" -#include "nurbs.h" -#endif - - -static int -get_curve_dim(GLenum type) -{ - switch (type) { - case GL_MAP1_VERTEX_3: - return 3; - case GL_MAP1_VERTEX_4: - return 4; - case GL_MAP1_INDEX: - return 1; - case GL_MAP1_COLOR_4: - return 4; - case GL_MAP1_NORMAL: - return 3; - case GL_MAP1_TEXTURE_COORD_1: - return 1; - case GL_MAP1_TEXTURE_COORD_2: - return 2; - case GL_MAP1_TEXTURE_COORD_3: - return 3; - case GL_MAP1_TEXTURE_COORD_4: - return 4; - default: - abort(); /* TODO: is this OK? */ - } - return 0; /*never get here */ -} - -static GLenum -test_nurbs_curve(GLUnurbsObj * nobj, curve_attribs * attribs) -{ - GLenum err; - GLint tmp_int; - - if (attribs->order < 0) { - call_user_error(nobj, GLU_INVALID_VALUE); - return GLU_ERROR; - } - glGetIntegerv(GL_MAX_EVAL_ORDER, &tmp_int); - if (attribs->order > tmp_int || attribs->order < 2) { - call_user_error(nobj, GLU_NURBS_ERROR1); - return GLU_ERROR; - } - if (attribs->knot_count < attribs->order + 2) { - call_user_error(nobj, GLU_NURBS_ERROR2); - return GLU_ERROR; - } - if (attribs->stride < 0) { - call_user_error(nobj, GLU_NURBS_ERROR34); - return GLU_ERROR; - } - if (attribs->knot == NULL || attribs->ctrlarray == NULL) { - call_user_error(nobj, GLU_NURBS_ERROR36); - return GLU_ERROR; - } - if ((err = test_knot(attribs->knot_count, attribs->knot, attribs->order)) - != GLU_NO_ERROR) { - call_user_error(nobj, err); - return GLU_ERROR; - } - return GLU_NO_ERROR; -} - -static GLenum -test_nurbs_curves(GLUnurbsObj * nobj) -{ - /* test the geometric data */ - if (test_nurbs_curve(nobj, &(nobj->curve.geom)) != GLU_NO_ERROR) - return GLU_ERROR; - /* now test the attributive data */ - /* color */ - if (nobj->curve.color.type != GLU_INVALID_ENUM) - if (test_nurbs_curve(nobj, &(nobj->curve.color)) != GLU_NO_ERROR) - return GLU_ERROR; - /* normal */ - if (nobj->curve.normal.type != GLU_INVALID_ENUM) - if (test_nurbs_curve(nobj, &(nobj->curve.normal)) != GLU_NO_ERROR) - return GLU_ERROR; - /* texture */ - if (nobj->curve.texture.type != GLU_INVALID_ENUM) - if (test_nurbs_curve(nobj, &(nobj->curve.texture)) != GLU_NO_ERROR) - return GLU_ERROR; - return GLU_NO_ERROR; -} - -/* prepare the knot information structures */ -static GLenum -fill_knot_structures(GLUnurbsObj * nobj, knot_str_type * geom_knot, - knot_str_type * color_knot, knot_str_type * normal_knot, - knot_str_type * texture_knot) -{ - GLint order; - GLfloat *knot; - GLint nknots; - GLint t_min, t_max; - - geom_knot->unified_knot = NULL; - knot = geom_knot->knot = nobj->curve.geom.knot; - nknots = geom_knot->nknots = nobj->curve.geom.knot_count; - order = geom_knot->order = nobj->curve.geom.order; - geom_knot->delta_nknots = 0; - t_min = geom_knot->t_min = order - 1; - t_max = geom_knot->t_max = nknots - order; - if (fabs(knot[t_min] - knot[t_max]) < EPSILON) { - call_user_error(nobj, GLU_NURBS_ERROR3); - return GLU_ERROR; - } - if (fabs(knot[0] - knot[t_min]) < EPSILON) { - /* knot open at beggining */ - geom_knot->open_at_begin = GL_TRUE; - } - else - geom_knot->open_at_begin = GL_FALSE; - if (fabs(knot[t_max] - knot[nknots - 1]) < EPSILON) { - /* knot open at end */ - geom_knot->open_at_end = GL_TRUE; - } - else - geom_knot->open_at_end = GL_FALSE; - if (nobj->curve.color.type != GLU_INVALID_ENUM) { - color_knot->unified_knot = (GLfloat *) 1; - knot = color_knot->knot = nobj->curve.color.knot; - nknots = color_knot->nknots = nobj->curve.color.knot_count; - order = color_knot->order = nobj->curve.color.order; - color_knot->delta_nknots = 0; - t_min = color_knot->t_min = order - 1; - t_max = color_knot->t_max = nknots - order; - if (fabs(knot[t_min] - knot[t_max]) < EPSILON) { - call_user_error(nobj, GLU_NURBS_ERROR3); - return GLU_ERROR; - } - if (fabs(knot[0] - knot[t_min]) < EPSILON) { - /* knot open at beggining */ - color_knot->open_at_begin = GL_TRUE; - } - else - color_knot->open_at_begin = GL_FALSE; - if (fabs(knot[t_max] - knot[nknots - 1]) < EPSILON) { - /* knot open at end */ - color_knot->open_at_end = GL_TRUE; - } - else - color_knot->open_at_end = GL_FALSE; - } - else - color_knot->unified_knot = NULL; - if (nobj->curve.normal.type != GLU_INVALID_ENUM) { - normal_knot->unified_knot = (GLfloat *) 1; - knot = normal_knot->knot = nobj->curve.normal.knot; - nknots = normal_knot->nknots = nobj->curve.normal.knot_count; - order = normal_knot->order = nobj->curve.normal.order; - normal_knot->delta_nknots = 0; - t_min = normal_knot->t_min = order - 1; - t_max = normal_knot->t_max = nknots - order; - if (fabs(knot[t_min] - knot[t_max]) < EPSILON) { - call_user_error(nobj, GLU_NURBS_ERROR3); - return GLU_ERROR; - } - if (fabs(knot[0] - knot[t_min]) < EPSILON) { - /* knot open at beggining */ - normal_knot->open_at_begin = GL_TRUE; - } - else - normal_knot->open_at_begin = GL_FALSE; - if (fabs(knot[t_max] - knot[nknots - 1]) < EPSILON) { - /* knot open at end */ - normal_knot->open_at_end = GL_TRUE; - } - else - normal_knot->open_at_end = GL_FALSE; - } - else - normal_knot->unified_knot = NULL; - if (nobj->curve.texture.type != GLU_INVALID_ENUM) { - texture_knot->unified_knot = (GLfloat *) 1; - knot = texture_knot->knot = nobj->curve.texture.knot; - nknots = texture_knot->nknots = nobj->curve.texture.knot_count; - order = texture_knot->order = nobj->curve.texture.order; - texture_knot->delta_nknots = 0; - t_min = texture_knot->t_min = order - 1; - t_max = texture_knot->t_max = nknots - order; - if (fabs(knot[t_min] - knot[t_max]) < EPSILON) { - call_user_error(nobj, GLU_NURBS_ERROR3); - return GLU_ERROR; - } - if (fabs(knot[0] - knot[t_min]) < EPSILON) { - /* knot open at beggining */ - texture_knot->open_at_begin = GL_TRUE; - } - else - texture_knot->open_at_begin = GL_FALSE; - if (fabs(knot[t_max] - knot[nknots - 1]) < EPSILON) { - /* knot open at end */ - texture_knot->open_at_end = GL_TRUE; - } - else - texture_knot->open_at_end = GL_FALSE; - } - else - texture_knot->unified_knot = NULL; - return GLU_NO_ERROR; -} - -/* covert the NURBS curve into a series of adjacent Bezier curves */ -static GLenum -convert_curve(knot_str_type * the_knot, curve_attribs * attrib, - GLfloat ** new_ctrl, GLint * ncontrol) -{ - GLenum err; - - if ((err = explode_knot(the_knot)) != GLU_NO_ERROR) { - if (the_knot->unified_knot) { - free(the_knot->unified_knot); - the_knot->unified_knot = NULL; - } - return err; - } - if (the_knot->unified_knot) { - free(the_knot->unified_knot); - the_knot->unified_knot = NULL; - } - if ((err = calc_alphas(the_knot)) != GLU_NO_ERROR) { - free(the_knot->new_knot); - return err; - } - free(the_knot->new_knot); - if ((err = calc_new_ctrl_pts(attrib->ctrlarray, attrib->stride, the_knot, - attrib->dim, new_ctrl, ncontrol)) - != GLU_NO_ERROR) { - free(the_knot->alpha); - return err; - } - free(the_knot->alpha); - return GLU_NO_ERROR; -} - -/* covert curves - geometry and possible attribute ones into equivalent */ -/* sequence of adjacent Bezier curves */ -static GLenum -convert_curves(GLUnurbsObj * nobj, GLfloat ** new_geom_ctrl, - GLint * ncontrol, GLfloat ** new_color_ctrl, - GLfloat ** new_normal_ctrl, GLfloat ** new_texture_ctrl) -{ - knot_str_type geom_knot, color_knot, normal_knot, texture_knot; - GLint junk; - GLenum err; - - *new_color_ctrl = *new_normal_ctrl = *new_texture_ctrl = NULL; - - if (fill_knot_structures(nobj, &geom_knot, &color_knot, &normal_knot, - &texture_knot) != GLU_NO_ERROR) - return GLU_ERROR; - - /* unify knots - all knots should have the same number of working */ - /* ranges */ - if ( - (err = - select_knot_working_range(nobj, &geom_knot, &color_knot, &normal_knot, - &texture_knot)) != GLU_NO_ERROR) { - return err; - } - /* convert the geometry curve */ - nobj->curve.geom.dim = get_curve_dim(nobj->curve.geom.type); - if ((err = convert_curve(&geom_knot, &(nobj->curve.geom), new_geom_ctrl, - ncontrol)) != GLU_NO_ERROR) { - free_unified_knots(&geom_knot, &color_knot, &normal_knot, - &texture_knot); - call_user_error(nobj, err); - return err; - } - /* if additional attributive curves are given convert them as well */ - if (color_knot.unified_knot) { - nobj->curve.color.dim = get_curve_dim(nobj->curve.color.type); - if ((err = convert_curve(&color_knot, &(nobj->curve.color), - new_color_ctrl, &junk)) != GLU_NO_ERROR) { - free_unified_knots(&geom_knot, &color_knot, &normal_knot, - &texture_knot); - free(*new_geom_ctrl); - call_user_error(nobj, err); - return err; - } - } - if (normal_knot.unified_knot) { - nobj->curve.normal.dim = get_curve_dim(nobj->curve.normal.type); - if ((err = convert_curve(&normal_knot, &(nobj->curve.normal), - new_normal_ctrl, &junk)) != GLU_NO_ERROR) { - free_unified_knots(&geom_knot, &color_knot, &normal_knot, - &texture_knot); - free(*new_geom_ctrl); - if (*new_color_ctrl) - free(*new_color_ctrl); - call_user_error(nobj, err); - return err; - } - } - if (texture_knot.unified_knot) { - nobj->curve.texture.dim = get_curve_dim(nobj->curve.texture.type); - if ((err = convert_curve(&texture_knot, &(nobj->curve.texture), - new_texture_ctrl, &junk)) != GLU_NO_ERROR) { - free_unified_knots(&geom_knot, &color_knot, &normal_knot, - &texture_knot); - free(*new_geom_ctrl); - if (*new_color_ctrl) - free(*new_color_ctrl); - if (*new_normal_ctrl) - free(*new_normal_ctrl); - call_user_error(nobj, err); - return err; - } - } - return GLU_NO_ERROR; -} - -/* main NURBS curve procedure */ -void -do_nurbs_curve(GLUnurbsObj * nobj) -{ - GLint geom_order, color_order = 0, normal_order = 0, texture_order = 0; - GLenum geom_type; - GLint n_ctrl; - GLfloat *new_geom_ctrl, *new_color_ctrl, *new_normal_ctrl, - *new_texture_ctrl; - GLfloat *geom_ctrl = 0, *color_ctrl = 0, *normal_ctrl = 0, *texture_ctrl = 0; - GLint *factors; - GLint i, j; - GLint geom_dim, color_dim = 0, normal_dim = 0, texture_dim = 0; - - /* test the user supplied data */ - if (test_nurbs_curves(nobj) != GLU_NO_ERROR) - return; - - if (convert_curves(nobj, &new_geom_ctrl, &n_ctrl, &new_color_ctrl, - &new_normal_ctrl, &new_texture_ctrl) != GLU_NO_ERROR) - return; - - geom_order = nobj->curve.geom.order; - geom_type = nobj->curve.geom.type; - geom_dim = nobj->curve.geom.dim; - - if (glu_do_sampling_crv(nobj, new_geom_ctrl, n_ctrl, geom_order, geom_dim, - &factors) != GLU_NO_ERROR) { - free(new_geom_ctrl); - if (new_color_ctrl) - free(new_color_ctrl); - if (new_normal_ctrl) - free(new_normal_ctrl); - if (new_texture_ctrl) - free(new_texture_ctrl); - return; - } - glEnable(geom_type); - if (new_color_ctrl) { - glEnable(nobj->curve.color.type); - color_dim = nobj->curve.color.dim; - color_ctrl = new_color_ctrl; - color_order = nobj->curve.color.order; - } - if (new_normal_ctrl) { - glEnable(nobj->curve.normal.type); - normal_dim = nobj->curve.normal.dim; - normal_ctrl = new_normal_ctrl; - normal_order = nobj->curve.normal.order; - } - if (new_texture_ctrl) { - glEnable(nobj->curve.texture.type); - texture_dim = nobj->curve.texture.dim; - texture_ctrl = new_texture_ctrl; - texture_order = nobj->curve.texture.order; - } - for (i = 0, j = 0, geom_ctrl = new_geom_ctrl; - i < n_ctrl; i += geom_order, j++, geom_ctrl += geom_order * geom_dim) { - if (fine_culling_test_2D - (nobj, geom_ctrl, geom_order, geom_dim, geom_dim)) { - color_ctrl += color_order * color_dim; - normal_ctrl += normal_order * normal_dim; - texture_ctrl += texture_order * texture_dim; - continue; - } - glMap1f(geom_type, 0.0, 1.0, geom_dim, geom_order, geom_ctrl); - if (new_color_ctrl) { - glMap1f(nobj->curve.color.type, 0.0, 1.0, color_dim, - color_order, color_ctrl); - color_ctrl += color_order * color_dim; - } - if (new_normal_ctrl) { - glMap1f(nobj->curve.normal.type, 0.0, 1.0, normal_dim, - normal_order, normal_ctrl); - normal_ctrl += normal_order * normal_dim; - } - if (new_texture_ctrl) { - glMap1f(nobj->curve.texture.type, 0.0, 1.0, texture_dim, - texture_order, texture_ctrl); - texture_ctrl += texture_order * texture_dim; - } - glMapGrid1f(factors[j], 0.0, 1.0); - glEvalMesh1(GL_LINE, 0, factors[j]); - } - free(new_geom_ctrl); - free(factors); - if (new_color_ctrl) - free(new_color_ctrl); - if (new_normal_ctrl) - free(new_normal_ctrl); - if (new_texture_ctrl) - free(new_texture_ctrl); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/nurbssrf.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/nurbssrf.c deleted file mode 100644 index d39fa47d18..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/nurbssrf.c +++ /dev/null @@ -1,1317 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * NURBS implementation written by Bogdan Sikorski (bogdan@cira.it) - * See README2 for more info. - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include -#include "gluP.h" -#include "nurbs.h" -#endif - - -static int -get_surface_dim(GLenum type) -{ - switch (type) { - case GL_MAP2_VERTEX_3: - return 3; - case GL_MAP2_VERTEX_4: - return 4; - case GL_MAP2_INDEX: - return 1; - case GL_MAP2_COLOR_4: - return 4; - case GL_MAP2_NORMAL: - return 3; - case GL_MAP2_TEXTURE_COORD_1: - return 1; - case GL_MAP2_TEXTURE_COORD_2: - return 2; - case GL_MAP2_TEXTURE_COORD_3: - return 3; - case GL_MAP2_TEXTURE_COORD_4: - return 4; - default: - abort(); /* TODO: is this OK? */ - } - return 0; /*never get here */ -} - -static GLenum -test_nurbs_surface(GLUnurbsObj * nobj, surface_attribs * attrib) -{ - GLenum err; - GLint tmp_int; - - if (attrib->sorder < 0 || attrib->torder < 0) { - call_user_error(nobj, GLU_INVALID_VALUE); - return GLU_ERROR; - } - glGetIntegerv(GL_MAX_EVAL_ORDER, &tmp_int); - if (attrib->sorder > tmp_int || attrib->sorder < 2) { - call_user_error(nobj, GLU_NURBS_ERROR1); - return GLU_ERROR; - } - if (attrib->torder > tmp_int || attrib->torder < 2) { - call_user_error(nobj, GLU_NURBS_ERROR1); - return GLU_ERROR; - } - if (attrib->sknot_count < attrib->sorder + 2) { - call_user_error(nobj, GLU_NURBS_ERROR2); - return GLU_ERROR; - } - if (attrib->tknot_count < attrib->torder + 2) { - call_user_error(nobj, GLU_NURBS_ERROR2); - return GLU_ERROR; - } - if (attrib->s_stride < 0 || attrib->t_stride < 0) { - call_user_error(nobj, GLU_NURBS_ERROR34); - return GLU_ERROR; - } - if (attrib->sknot == NULL || attrib->tknot == NULL - || attrib->ctrlarray == NULL) { - call_user_error(nobj, GLU_NURBS_ERROR36); - return GLU_ERROR; - } - if ((err = test_knot(attrib->tknot_count, attrib->tknot, attrib->torder)) - != GLU_NO_ERROR) { - call_user_error(nobj, err); - return GLU_ERROR; - } - if ((err = test_knot(attrib->sknot_count, attrib->sknot, attrib->sorder)) - != GLU_NO_ERROR) { - call_user_error(nobj, err); - return GLU_ERROR; - } - return GLU_NO_ERROR; -} - -static GLenum -test_nurbs_surfaces(GLUnurbsObj * nobj) -{ - /* test the geometric data */ - if (test_nurbs_surface(nobj, &(nobj->surface.geom)) != GLU_NO_ERROR) - return GLU_ERROR; - /* now test the attributive data */ - /* color */ - if (nobj->surface.color.type != GLU_INVALID_ENUM) - if (test_nurbs_surface(nobj, &(nobj->surface.color)) != GLU_NO_ERROR) - return GLU_ERROR; - /* normal */ - if (nobj->surface.normal.type != GLU_INVALID_ENUM) - if (test_nurbs_surface(nobj, &(nobj->surface.normal)) != GLU_NO_ERROR) - return GLU_ERROR; - /* texture */ - if (nobj->surface.texture.type != GLU_INVALID_ENUM) - if (test_nurbs_surface(nobj, &(nobj->surface.texture)) != GLU_NO_ERROR) - return GLU_ERROR; - return GLU_NO_ERROR; -} - -static GLenum -convert_surf(knot_str_type * s_knot, knot_str_type * t_knot, - surface_attribs * attrib, GLfloat ** new_ctrl, - GLint * s_n_ctrl, GLint * t_n_ctrl) -{ - GLfloat **tmp_ctrl; - GLfloat *ctrl_offset; - GLint tmp_n_control; - GLint i, j, t_cnt, s_cnt; - GLint tmp_stride; - GLint dim; - GLenum err; - - /* valid range is empty? */ - if ((s_knot->unified_knot != NULL && s_knot->unified_nknots == 0) || - (t_knot->unified_knot != NULL && t_knot->unified_nknots == 0)) { - if (s_knot->unified_knot) { - free(s_knot->unified_knot); - s_knot->unified_knot = NULL; - } - if (t_knot->unified_knot) { - free(t_knot->unified_knot); - t_knot->unified_knot = NULL; - } - *s_n_ctrl = 0; - *t_n_ctrl = 0; - return GLU_NO_ERROR; - } - t_cnt = attrib->tknot_count - attrib->torder; - s_cnt = attrib->sknot_count - attrib->sorder; - if ((tmp_ctrl = (GLfloat **) malloc(sizeof(GLfloat *) * t_cnt)) == NULL) - return GLU_OUT_OF_MEMORY; - if ((err = explode_knot(s_knot)) != GLU_NO_ERROR) { - free(tmp_ctrl); - if (s_knot->unified_knot) { - free(s_knot->unified_knot); - s_knot->unified_knot = NULL; - } - return err; - } - if (s_knot->unified_knot) { - free(s_knot->unified_knot); - s_knot->unified_knot = NULL; - } - if ((err = calc_alphas(s_knot)) != GLU_NO_ERROR) { - free(tmp_ctrl); - free(s_knot->new_knot); - return err; - } - free(s_knot->new_knot); - ctrl_offset = attrib->ctrlarray; - dim = attrib->dim; - for (i = 0; i < t_cnt; i++) { - if ((err = calc_new_ctrl_pts(ctrl_offset, attrib->s_stride, s_knot, - dim, &(tmp_ctrl[i]), - &tmp_n_control)) != GLU_NO_ERROR) { - for (--i; i <= 0; i--) - free(tmp_ctrl[i]); - free(tmp_ctrl); - free(s_knot->alpha); - return err; - } - ctrl_offset += attrib->t_stride; - } - free(s_knot->alpha); - tmp_stride = dim * tmp_n_control; - if ((*new_ctrl = (GLfloat *) malloc(sizeof(GLfloat) * tmp_stride * t_cnt)) - == NULL) { - for (i = 0; i < t_cnt; i++) - free(tmp_ctrl[i]); - free(tmp_ctrl); - return GLU_OUT_OF_MEMORY; - } - for (i = 0; i < tmp_n_control; i++) - for (j = 0; j < t_cnt; j++) - MEMCPY(*new_ctrl + j * dim + i * dim * t_cnt, tmp_ctrl[j] + dim * i, - sizeof(GLfloat) * dim); - for (i = 0; i < t_cnt; i++) - free(tmp_ctrl[i]); - free(tmp_ctrl); - *s_n_ctrl = tmp_n_control; - - if ((tmp_ctrl = (GLfloat **) malloc(sizeof(GLfloat *) * (*s_n_ctrl))) == - NULL) { - return GLU_OUT_OF_MEMORY; - } - if ((err = explode_knot(t_knot)) != GLU_NO_ERROR) { - free(tmp_ctrl); - if (t_knot->unified_knot) { - free(t_knot->unified_knot); - t_knot->unified_knot = NULL; - } - return err; - } - if (t_knot->unified_knot) { - free(t_knot->unified_knot); - t_knot->unified_knot = NULL; - } - if ((err = calc_alphas(t_knot)) != GLU_NO_ERROR) { - free(tmp_ctrl); - free(t_knot->new_knot); - return err; - } - free(t_knot->new_knot); - ctrl_offset = *new_ctrl; - for (i = 0; i < (*s_n_ctrl); i++) { - if ((err = calc_new_ctrl_pts(ctrl_offset, dim, t_knot, - dim, &(tmp_ctrl[i]), - &tmp_n_control)) != GLU_NO_ERROR) { - for (--i; i <= 0; i--) - free(tmp_ctrl[i]); - free(tmp_ctrl); - free(t_knot->alpha); - return err; - } - ctrl_offset += dim * t_cnt; - } - free(t_knot->alpha); - free(*new_ctrl); - tmp_stride = dim * tmp_n_control; - if ( - (*new_ctrl = - (GLfloat *) malloc(sizeof(GLfloat) * tmp_stride * (*s_n_ctrl))) == - NULL) { - for (i = 0; i < (*s_n_ctrl); i++) - free(tmp_ctrl[i]); - free(tmp_ctrl); - return GLU_OUT_OF_MEMORY; - } - for (i = 0; i < (*s_n_ctrl); i++) { - MEMCPY(*new_ctrl + i * tmp_stride, tmp_ctrl[i], - sizeof(GLfloat) * tmp_stride); - free(tmp_ctrl[i]); - } - free(tmp_ctrl); - *t_n_ctrl = tmp_n_control; - return GLU_NO_ERROR; -} - -/* prepare the knot information structures */ -static GLenum -fill_knot_structures(GLUnurbsObj * nobj, - knot_str_type * geom_s_knot, knot_str_type * geom_t_knot, - knot_str_type * color_s_knot, - knot_str_type * color_t_knot, - knot_str_type * normal_s_knot, - knot_str_type * normal_t_knot, - knot_str_type * texture_s_knot, - knot_str_type * texture_t_knot) -{ - GLint order; - GLfloat *knot; - GLint nknots; - GLint t_min, t_max; - - geom_s_knot->unified_knot = NULL; - knot = geom_s_knot->knot = nobj->surface.geom.sknot; - nknots = geom_s_knot->nknots = nobj->surface.geom.sknot_count; - order = geom_s_knot->order = nobj->surface.geom.sorder; - geom_s_knot->delta_nknots = 0; - t_min = geom_s_knot->t_min = order - 1; - t_max = geom_s_knot->t_max = nknots - order; - if (fabs(knot[t_min] - knot[t_max]) < EPSILON) { - call_user_error(nobj, GLU_NURBS_ERROR3); - return GLU_ERROR; - } - if (fabs(knot[0] - knot[t_min]) < EPSILON) { - /* knot open at beggining */ - geom_s_knot->open_at_begin = GL_TRUE; - } - else - geom_s_knot->open_at_begin = GL_FALSE; - if (fabs(knot[t_max] - knot[nknots - 1]) < EPSILON) { - /* knot open at end */ - geom_s_knot->open_at_end = GL_TRUE; - } - else - geom_s_knot->open_at_end = GL_FALSE; - geom_t_knot->unified_knot = NULL; - knot = geom_t_knot->knot = nobj->surface.geom.tknot; - nknots = geom_t_knot->nknots = nobj->surface.geom.tknot_count; - order = geom_t_knot->order = nobj->surface.geom.torder; - geom_t_knot->delta_nknots = 0; - t_min = geom_t_knot->t_min = order - 1; - t_max = geom_t_knot->t_max = nknots - order; - if (fabs(knot[t_min] - knot[t_max]) < EPSILON) { - call_user_error(nobj, GLU_NURBS_ERROR3); - return GLU_ERROR; - } - if (fabs(knot[0] - knot[t_min]) < EPSILON) { - /* knot open at beggining */ - geom_t_knot->open_at_begin = GL_TRUE; - } - else - geom_t_knot->open_at_begin = GL_FALSE; - if (fabs(knot[t_max] - knot[nknots - 1]) < EPSILON) { - /* knot open at end */ - geom_t_knot->open_at_end = GL_TRUE; - } - else - geom_t_knot->open_at_end = GL_FALSE; - - if (nobj->surface.color.type != GLU_INVALID_ENUM) { - color_s_knot->unified_knot = (GLfloat *) 1; - knot = color_s_knot->knot = nobj->surface.color.sknot; - nknots = color_s_knot->nknots = nobj->surface.color.sknot_count; - order = color_s_knot->order = nobj->surface.color.sorder; - color_s_knot->delta_nknots = 0; - t_min = color_s_knot->t_min = order - 1; - t_max = color_s_knot->t_max = nknots - order; - if (fabs(knot[t_min] - knot[t_max]) < EPSILON) { - call_user_error(nobj, GLU_NURBS_ERROR3); - return GLU_ERROR; - } - if (fabs(knot[0] - knot[t_min]) < EPSILON) { - /* knot open at beggining */ - color_s_knot->open_at_begin = GL_TRUE; - } - else - color_s_knot->open_at_begin = GL_FALSE; - if (fabs(knot[t_max] - knot[nknots - 1]) < EPSILON) { - /* knot open at end */ - color_s_knot->open_at_end = GL_TRUE; - } - else - color_s_knot->open_at_end = GL_FALSE; - color_t_knot->unified_knot = (GLfloat *) 1; - knot = color_t_knot->knot = nobj->surface.color.tknot; - nknots = color_t_knot->nknots = nobj->surface.color.tknot_count; - order = color_t_knot->order = nobj->surface.color.torder; - color_t_knot->delta_nknots = 0; - t_min = color_t_knot->t_min = order - 1; - t_max = color_t_knot->t_max = nknots - order; - if (fabs(knot[t_min] - knot[t_max]) < EPSILON) { - call_user_error(nobj, GLU_NURBS_ERROR3); - return GLU_ERROR; - } - if (fabs(knot[0] - knot[t_min]) < EPSILON) { - /* knot open at beggining */ - color_t_knot->open_at_begin = GL_TRUE; - } - else - color_t_knot->open_at_begin = GL_FALSE; - if (fabs(knot[t_max] - knot[nknots - 1]) < EPSILON) { - /* knot open at end */ - color_t_knot->open_at_end = GL_TRUE; - } - else - color_t_knot->open_at_end = GL_FALSE; - } - else { - color_s_knot->unified_knot = NULL; - color_t_knot->unified_knot = NULL; - } - - if (nobj->surface.normal.type != GLU_INVALID_ENUM) { - normal_s_knot->unified_knot = (GLfloat *) 1; - knot = normal_s_knot->knot = nobj->surface.normal.sknot; - nknots = normal_s_knot->nknots = nobj->surface.normal.sknot_count; - order = normal_s_knot->order = nobj->surface.normal.sorder; - normal_s_knot->delta_nknots = 0; - t_min = normal_s_knot->t_min = order - 1; - t_max = normal_s_knot->t_max = nknots - order; - if (fabs(knot[t_min] - knot[t_max]) < EPSILON) { - call_user_error(nobj, GLU_NURBS_ERROR3); - return GLU_ERROR; - } - if (fabs(knot[0] - knot[t_min]) < EPSILON) { - /* knot open at beggining */ - normal_s_knot->open_at_begin = GL_TRUE; - } - else - normal_s_knot->open_at_begin = GL_FALSE; - if (fabs(knot[t_max] - knot[nknots - 1]) < EPSILON) { - /* knot open at end */ - normal_s_knot->open_at_end = GL_TRUE; - } - else - normal_s_knot->open_at_end = GL_FALSE; - normal_t_knot->unified_knot = (GLfloat *) 1; - knot = normal_t_knot->knot = nobj->surface.normal.tknot; - nknots = normal_t_knot->nknots = nobj->surface.normal.tknot_count; - order = normal_t_knot->order = nobj->surface.normal.torder; - normal_t_knot->delta_nknots = 0; - t_min = normal_t_knot->t_min = order - 1; - t_max = normal_t_knot->t_max = nknots - order; - if (fabs(knot[t_min] - knot[t_max]) < EPSILON) { - call_user_error(nobj, GLU_NURBS_ERROR3); - return GLU_ERROR; - } - if (fabs(knot[0] - knot[t_min]) < EPSILON) { - /* knot open at beggining */ - normal_t_knot->open_at_begin = GL_TRUE; - } - else - normal_t_knot->open_at_begin = GL_FALSE; - if (fabs(knot[t_max] - knot[nknots - 1]) < EPSILON) { - /* knot open at end */ - normal_t_knot->open_at_end = GL_TRUE; - } - else - normal_t_knot->open_at_end = GL_FALSE; - } - else { - normal_s_knot->unified_knot = NULL; - normal_t_knot->unified_knot = NULL; - } - - if (nobj->surface.texture.type != GLU_INVALID_ENUM) { - texture_s_knot->unified_knot = (GLfloat *) 1; - knot = texture_s_knot->knot = nobj->surface.texture.sknot; - nknots = texture_s_knot->nknots = nobj->surface.texture.sknot_count; - order = texture_s_knot->order = nobj->surface.texture.sorder; - texture_s_knot->delta_nknots = 0; - t_min = texture_s_knot->t_min = order - 1; - t_max = texture_s_knot->t_max = nknots - order; - if (fabs(knot[t_min] - knot[t_max]) < EPSILON) { - call_user_error(nobj, GLU_NURBS_ERROR3); - return GLU_ERROR; - } - if (fabs(knot[0] - knot[t_min]) < EPSILON) { - /* knot open at beggining */ - texture_s_knot->open_at_begin = GL_TRUE; - } - else - texture_s_knot->open_at_begin = GL_FALSE; - if (fabs(knot[t_max] - knot[nknots - 1]) < EPSILON) { - /* knot open at end */ - texture_s_knot->open_at_end = GL_TRUE; - } - else - texture_s_knot->open_at_end = GL_FALSE; - texture_t_knot->unified_knot = (GLfloat *) 1; - knot = texture_t_knot->knot = nobj->surface.texture.tknot; - nknots = texture_t_knot->nknots = nobj->surface.texture.tknot_count; - order = texture_t_knot->order = nobj->surface.texture.torder; - texture_t_knot->delta_nknots = 0; - t_min = texture_t_knot->t_min = order - 1; - t_max = texture_t_knot->t_max = nknots - order; - if (fabs(knot[t_min] - knot[t_max]) < EPSILON) { - call_user_error(nobj, GLU_NURBS_ERROR3); - return GLU_ERROR; - } - if (fabs(knot[0] - knot[t_min]) < EPSILON) { - /* knot open at beggining */ - texture_t_knot->open_at_begin = GL_TRUE; - } - else - texture_t_knot->open_at_begin = GL_FALSE; - if (fabs(knot[t_max] - knot[nknots - 1]) < EPSILON) { - /* knot open at end */ - texture_t_knot->open_at_end = GL_TRUE; - } - else - texture_t_knot->open_at_end = GL_FALSE; - } - else { - texture_s_knot->unified_knot = NULL; - texture_t_knot->unified_knot = NULL; - } - return GLU_NO_ERROR; -} - - -static void -free_new_ctrl(new_ctrl_type * p) -{ - if (p->geom_ctrl) - free(p->geom_ctrl); - if (p->geom_offsets) - free(p->geom_offsets); - if (p->color_ctrl) { - free(p->color_ctrl); - if (p->color_offsets) - free(p->color_offsets); - } - if (p->normal_ctrl) { - free(p->normal_ctrl); - if (p->normal_offsets) - free(p->normal_offsets); - } - if (p->texture_ctrl) { - free(p->texture_ctrl); - if (p->texture_offsets) - free(p->texture_offsets); - } -} - -/* convert surfaces - geometry and possible attribute ones into equivalent */ -/* sequence of adjacent Bezier patches */ -static GLenum -convert_surfs(GLUnurbsObj * nobj, new_ctrl_type * new_ctrl) -{ - knot_str_type geom_s_knot, color_s_knot, normal_s_knot, texture_s_knot; - knot_str_type geom_t_knot, color_t_knot, normal_t_knot, texture_t_knot; - GLenum err; - - if ((err = fill_knot_structures(nobj, &geom_s_knot, &geom_t_knot, - &color_s_knot, &color_t_knot, - &normal_s_knot, &normal_t_knot, - &texture_s_knot, - &texture_t_knot)) != GLU_NO_ERROR) { - return err; - } - /* unify knots - all knots should have the same working range */ - if ((err = select_knot_working_range(nobj, &geom_s_knot, &color_s_knot, - &normal_s_knot, - &texture_s_knot)) != GLU_NO_ERROR) { - call_user_error(nobj, err); - return err; - } - if ((err = select_knot_working_range(nobj, &geom_t_knot, &color_t_knot, - &normal_t_knot, - &texture_t_knot)) != GLU_NO_ERROR) { - free_unified_knots(&geom_s_knot, &color_s_knot, &normal_s_knot, - &texture_s_knot); - call_user_error(nobj, err); - return err; - } - - /* convert the geometry surface */ - nobj->surface.geom.dim = get_surface_dim(nobj->surface.geom.type); - if ((err = convert_surf(&geom_s_knot, &geom_t_knot, &(nobj->surface.geom), - &(new_ctrl->geom_ctrl), &(new_ctrl->geom_s_pt_cnt), - &(new_ctrl->geom_t_pt_cnt))) != GLU_NO_ERROR) { - free_unified_knots(&geom_s_knot, &color_s_knot, &normal_s_knot, - &texture_s_knot); - free_unified_knots(&geom_t_knot, &color_t_knot, &normal_t_knot, - &texture_t_knot); - call_user_error(nobj, err); - return err; - } - /* if additional attributive surfaces are given convert them as well */ - if (color_s_knot.unified_knot) { - nobj->surface.color.dim = get_surface_dim(nobj->surface.color.type); - if ( - (err = - convert_surf(&color_s_knot, &color_t_knot, &(nobj->surface.color), - &(new_ctrl->color_ctrl), &(new_ctrl->color_s_pt_cnt), - &(new_ctrl->color_t_pt_cnt))) != GLU_NO_ERROR) { - free_unified_knots(&color_s_knot, &color_s_knot, &normal_s_knot, - &texture_s_knot); - free_unified_knots(&color_t_knot, &color_t_knot, &normal_t_knot, - &texture_t_knot); - free_new_ctrl(new_ctrl); - call_user_error(nobj, err); - return err; - } - } - if (normal_s_knot.unified_knot) { - nobj->surface.normal.dim = get_surface_dim(nobj->surface.normal.type); - if ((err = convert_surf(&normal_s_knot, &normal_t_knot, - &(nobj->surface.normal), - &(new_ctrl->normal_ctrl), - &(new_ctrl->normal_s_pt_cnt), - &(new_ctrl->normal_t_pt_cnt))) != - GLU_NO_ERROR) { - free_unified_knots(&normal_s_knot, &normal_s_knot, &normal_s_knot, - &texture_s_knot); - free_unified_knots(&normal_t_knot, &normal_t_knot, &normal_t_knot, - &texture_t_knot); - free_new_ctrl(new_ctrl); - call_user_error(nobj, err); - return err; - } - } - if (texture_s_knot.unified_knot) { - nobj->surface.texture.dim = get_surface_dim(nobj->surface.texture.type); - if ((err = convert_surf(&texture_s_knot, &texture_t_knot, - &(nobj->surface.texture), - &(new_ctrl->texture_ctrl), - &(new_ctrl->texture_s_pt_cnt), - &(new_ctrl->texture_t_pt_cnt))) != - GLU_NO_ERROR) { - free_unified_knots(&texture_s_knot, &texture_s_knot, &texture_s_knot, - &texture_s_knot); - free_unified_knots(&texture_t_knot, &texture_t_knot, &texture_t_knot, - &texture_t_knot); - free_new_ctrl(new_ctrl); - call_user_error(nobj, err); - return err; - } - } - return GLU_NO_ERROR; -} - -/* tesselate the "boundary" Bezier edge strips */ -static void -tesselate_strip_t_line(GLint top_start, GLint top_end, GLint top_z, - GLint bottom_start, GLint bottom_end, GLint bottom_z, - GLint bottom_domain) -{ - GLint top_cnt, bottom_cnt, tri_cnt, k; - GLint direction; - - top_cnt = top_end - top_start; - direction = (top_cnt >= 0 ? 1 : -1); - bottom_cnt = bottom_end - bottom_start; - glBegin(GL_LINES); - while (top_cnt) { - if (bottom_cnt) - tri_cnt = top_cnt / bottom_cnt; - else - tri_cnt = abs(top_cnt); - for (k = 0; k <= tri_cnt; k++, top_start += direction) { - glEvalCoord2f((GLfloat) bottom_z / bottom_domain, - (GLfloat) bottom_start / bottom_domain); - glEvalPoint2(top_z, top_start); - } - if (bottom_cnt) { - glEvalCoord2f((GLfloat) bottom_z / bottom_domain, - (GLfloat) bottom_start / bottom_domain); - bottom_start += direction; - top_start -= direction; - glEvalCoord2f((GLfloat) bottom_z / bottom_domain, - (GLfloat) bottom_start / bottom_domain); - glEvalCoord2f((GLfloat) bottom_z / bottom_domain, - (GLfloat) bottom_start / bottom_domain); - glEvalPoint2(top_z, top_start); - } - top_cnt -= direction * tri_cnt; - bottom_cnt -= direction; - } - glEnd(); -} - - -static void -tesselate_strip_t_fill(GLint top_start, GLint top_end, GLint top_z, - GLint bottom_start, GLint bottom_end, GLint bottom_z, - GLint bottom_domain) -{ - GLint top_cnt, bottom_cnt, tri_cnt, k; - GLint direction; - - top_cnt = top_end - top_start; - direction = (top_cnt >= 0 ? 1 : -1); - bottom_cnt = bottom_end - bottom_start; - while (top_cnt) { - if (bottom_cnt) - tri_cnt = top_cnt / bottom_cnt; - else - tri_cnt = abs(top_cnt); - glBegin(GL_TRIANGLE_FAN); - glEvalCoord2f((GLfloat) bottom_z / bottom_domain, - (GLfloat) bottom_start / bottom_domain); - for (k = 0; k <= tri_cnt; k++, top_start += direction) - glEvalPoint2(top_z, top_start); - if (bottom_cnt) { - bottom_start += direction; - top_start -= direction; - glEvalCoord2f((GLfloat) bottom_z / bottom_domain, - (GLfloat) bottom_start / bottom_domain); - } - glEnd(); - top_cnt -= direction * tri_cnt; - bottom_cnt -= direction; - } -} - - -static void -tesselate_strip_t(GLenum display_mode, GLint top_start, GLint top_end, - GLint top_z, GLint bottom_start, GLint bottom_end, - GLint bottom_z, GLint bottom_domain) -{ - if (display_mode == GL_FILL) - tesselate_strip_t_fill(top_start, top_end, top_z, bottom_start, - bottom_end, bottom_z, bottom_domain); - else - tesselate_strip_t_line(top_start, top_end, top_z, bottom_start, - bottom_end, bottom_z, bottom_domain); -} - - -static void -tesselate_strip_s_fill(GLint top_start, GLint top_end, GLint top_z, - GLint bottom_start, GLint bottom_end, GLint bottom_z, - GLfloat bottom_domain) -{ - GLint top_cnt, bottom_cnt, tri_cnt, k; - GLint direction; - - top_cnt = top_end - top_start; - direction = (top_cnt >= 0 ? 1 : -1); - bottom_cnt = bottom_end - bottom_start; - while (top_cnt) { - if (bottom_cnt) - tri_cnt = top_cnt / bottom_cnt; - else - tri_cnt = abs(top_cnt); - glBegin(GL_TRIANGLE_FAN); - glEvalCoord2f((GLfloat) bottom_start / bottom_domain, - (GLfloat) bottom_z / bottom_domain); - for (k = 0; k <= tri_cnt; k++, top_start += direction) - glEvalPoint2(top_start, top_z); - if (bottom_cnt) { - bottom_start += direction; - top_start -= direction; - glEvalCoord2f((GLfloat) bottom_start / bottom_domain, - (GLfloat) bottom_z / bottom_domain); - } - glEnd(); - top_cnt -= direction * tri_cnt; - bottom_cnt -= direction; - } -} - - -static void -tesselate_strip_s_line(GLint top_start, GLint top_end, GLint top_z, - GLint bottom_start, GLint bottom_end, GLint bottom_z, - GLfloat bottom_domain) -{ - GLint top_cnt, bottom_cnt, tri_cnt, k; - GLint direction; - - top_cnt = top_end - top_start; - direction = (top_cnt >= 0 ? 1 : -1); - bottom_cnt = bottom_end - bottom_start; - glBegin(GL_LINES); - while (top_cnt) { - if (bottom_cnt) - tri_cnt = top_cnt / bottom_cnt; - else - tri_cnt = abs(top_cnt); - for (k = 0; k <= tri_cnt; k++, top_start += direction) { - glEvalCoord2f((GLfloat) bottom_start / bottom_domain, - (GLfloat) bottom_z / bottom_domain); - glEvalPoint2(top_start, top_z); - } - if (bottom_cnt) { - glEvalCoord2f((GLfloat) bottom_start / bottom_domain, - (GLfloat) bottom_z / bottom_domain); - bottom_start += direction; - top_start -= direction; - glEvalCoord2f((GLfloat) bottom_start / bottom_domain, - (GLfloat) bottom_z / bottom_domain); - glEvalPoint2(top_start, top_z); - glEvalCoord2f((GLfloat) bottom_start / bottom_domain, - (GLfloat) bottom_z / bottom_domain); - } - top_cnt -= direction * tri_cnt; - bottom_cnt -= direction; - } - glEnd(); -} - - -static void -tesselate_strip_s(GLenum display_mode, GLint top_start, GLint top_end, - GLint top_z, GLint bottom_start, GLint bottom_end, - GLint bottom_z, GLfloat bottom_domain) -{ - if (display_mode == GL_FILL) - tesselate_strip_s_fill(top_start, top_end, top_z, bottom_start, - bottom_end, bottom_z, bottom_domain); - else - tesselate_strip_s_line(top_start, top_end, top_z, bottom_start, - bottom_end, bottom_z, bottom_domain); -} - -static void -tesselate_bottom_left_corner(GLenum display_mode, GLfloat s_1, GLfloat t_1) -{ - if (display_mode == GL_FILL) { - glBegin(GL_TRIANGLE_FAN); - glEvalPoint2(1, 1); - glEvalCoord2f(s_1, 0.0); - glEvalCoord2f(0.0, 0.0); - glEvalCoord2f(0.0, t_1); - } - else { - glBegin(GL_LINES); - glEvalCoord2f(0.0, 0.0); - glEvalCoord2f(0.0, t_1); - glEvalCoord2f(0.0, 0.0); - glEvalPoint2(1, 1); - glEvalCoord2f(0.0, 0.0); - glEvalCoord2f(s_1, 0.0); - } - glEnd(); -} - -static void -tesselate_bottom_right_corner(GLenum display_mode, GLint v_top, - GLint v_bottom, GLfloat s_1, GLfloat t_1) -{ - if (display_mode == GL_FILL) { - glBegin(GL_TRIANGLE_FAN); - glEvalPoint2(1, v_top); - glEvalCoord2f(0.0, v_bottom * t_1); - glEvalCoord2f(0.0, (v_bottom + 1) * t_1); - glEvalCoord2f(s_1, (v_bottom + 1) * t_1); - } - else { - glBegin(GL_LINES); - glEvalCoord2f(0.0, (v_bottom + 1) * t_1); - glEvalPoint2(1, v_top); - glEvalCoord2f(0.0, (v_bottom + 1) * t_1); - glEvalCoord2f(0.0, v_bottom * t_1); - glEvalCoord2f(0.0, (v_bottom + 1) * t_1); - glEvalCoord2f(s_1, (v_bottom + 1) * t_1); - } - glEnd(); -} - -static void -tesselate_top_left_corner(GLenum display_mode, GLint u_right, GLint u_left, - GLfloat s_1, GLfloat t_1) -{ - if (display_mode == GL_FILL) { - glBegin(GL_TRIANGLE_FAN); - glEvalPoint2(u_right, 1); - glEvalCoord2f((u_left + 1) * s_1, t_1); - glEvalCoord2f((u_left + 1) * s_1, 0.0); - glEvalCoord2f(u_left * s_1, 0.0); - } - else { - glBegin(GL_LINES); - glEvalCoord2f((u_left + 1) * s_1, 0.0); - glEvalPoint2(u_right, 1); - glEvalCoord2f((u_left + 1) * s_1, 0.0); - glEvalCoord2f(u_left * s_1, 0.0); - glEvalCoord2f((u_left + 1) * s_1, 0.0); - glEvalCoord2f((u_left + 1) * s_1, t_1); - } - glEnd(); -} - -static void -tesselate_top_right_corner(GLenum display_mode, GLint u_left, GLint v_bottom, - GLint u_right, GLint v_top, GLfloat s_1, - GLfloat t_1) -{ - if (display_mode == GL_FILL) { - glBegin(GL_TRIANGLE_FAN); - glEvalPoint2(u_left, v_bottom); - glEvalCoord2f((u_right - 1) * s_1, v_top * t_1); - glEvalCoord2f(u_right * s_1, v_top * t_1); - glEvalCoord2f(u_right * s_1, (v_top - 1) * t_1); - } - else { - glBegin(GL_LINES); - glEvalCoord2f(u_right * s_1, v_top * t_1); - glEvalPoint2(u_left, v_bottom); - glEvalCoord2f(u_right * s_1, v_top * t_1); - glEvalCoord2f(u_right * s_1, (v_top - 1) * t_1); - glEvalCoord2f(u_right * s_1, v_top * t_1); - glEvalCoord2f((u_right - 1) * s_1, v_top * t_1); - } - glEnd(); -} - -/* do mesh mapping of Bezier */ -static void -nurbs_map_bezier(GLenum display_mode, GLint * sfactors, GLint * tfactors, - GLint s_bezier_cnt, GLint t_bezier_cnt, GLint s, GLint t) -{ - GLint top, bottom, right, left; - - - if (s == 0) { - top = *(tfactors + t * 3); - bottom = *(tfactors + t * 3 + 1); - } - else if (s == s_bezier_cnt - 1) { - top = *(tfactors + t * 3 + 2); - bottom = *(tfactors + t * 3); - } - else { - top = bottom = *(tfactors + t * 3); - } - if (t == 0) { - left = *(sfactors + s * 3 + 1); - right = *(sfactors + s * 3); - } - else if (t == t_bezier_cnt - 1) { - left = *(sfactors + s * 3); - right = *(sfactors + s * 3 + 2); - } - else { - left = right = *(sfactors + s * 3); - } - - if (top > bottom) { - if (left < right) { - glMapGrid2f(right, 0.0, 1.0, top, 0.0, 1.0); - glEvalMesh2(display_mode, 1, right, 1, top); - tesselate_strip_s(display_mode, 1, right, 1, 1, left, 0, - (GLfloat) left); - tesselate_bottom_left_corner(display_mode, (GLfloat) (1.0 / left), - (GLfloat) (1.0 / bottom)); -/* tesselate_strip_t(display_mode,1,top,1,1,bottom,0,(GLfloat)bottom);*/ - tesselate_strip_t(display_mode, top, 1, 1, bottom, 1, 0, - (GLfloat) bottom); - } - else if (left == right) { - glMapGrid2f(right, 0.0, 1.0, top, 0.0, 1.0); - glEvalMesh2(display_mode, 1, right, 0, top); -/* tesselate_strip_t(display_mode,0,top,1,0,bottom,0,(GLfloat)bottom);*/ - tesselate_strip_t(display_mode, top, 0, 1, bottom, 0, 0, - (GLfloat) bottom); - } - else { - glMapGrid2f(left, 0.0, 1.0, top, 0.0, 1.0); - glEvalMesh2(display_mode, 1, left, 0, top - 1); -/* tesselate_strip_t(display_mode,0,top-1,1,0,bottom-1,0, - (GLfloat)bottom);*/ - tesselate_strip_t(display_mode, top - 1, 0, 1, bottom - 1, 0, 0, - (GLfloat) bottom); - tesselate_bottom_right_corner(display_mode, top - 1, bottom - 1, - (GLfloat) (1.0 / right), - (GLfloat) (1.0 / bottom)); -/* tesselate_strip_s(display_mode,1,left,top-1,1,right,right, - (GLfloat)right);*/ - tesselate_strip_s(display_mode, left, 1, top - 1, right, 1, right, - (GLfloat) right); - } - } - else if (top == bottom) { - if (left < right) { - glMapGrid2f(right, 0.0, 1.0, top, 0.0, 1.0); - glEvalMesh2(display_mode, 0, right, 1, top); - tesselate_strip_s(display_mode, 0, right, 1, 0, left, 0, - (GLfloat) left); - } - else if (left == right) { - glMapGrid2f(right, 0.0, 1.0, top, 0.0, 1.0); - glEvalMesh2(display_mode, 0, right, 0, top); - } - else { - glMapGrid2f(left, 0.0, 1.0, top, 0.0, 1.0); - glEvalMesh2(display_mode, 0, left, 0, top - 1); -/* tesselate_strip_s(display_mode,0,left,top-1,0,right,right, - (GLfloat)right);*/ - tesselate_strip_s(display_mode, left, 0, top - 1, right, 0, right, - (GLfloat) right); - } - } - else { - if (left < right) { - glMapGrid2f(right, 0.0, 1.0, bottom, 0.0, 1.0); - glEvalMesh2(display_mode, 0, right - 1, 1, bottom); - tesselate_strip_s(display_mode, 0, right - 1, 1, 0, left - 1, 0, - (GLfloat) left); - tesselate_top_left_corner(display_mode, right - 1, left - 1, - (GLfloat) (1.0 / left), - (GLfloat) (1.0 / top)); - tesselate_strip_t(display_mode, 1, bottom, right - 1, 1, top, top, - (GLfloat) top); - } - else if (left == right) { - glMapGrid2f(right, 0.0, 1.0, bottom, 0.0, 1.0); - glEvalMesh2(display_mode, 0, right - 1, 0, bottom); - tesselate_strip_t(display_mode, 0, bottom, right - 1, 0, top, top, - (GLfloat) top); - } - else { - glMapGrid2f(left, 0.0, 1.0, bottom, 0.0, 1.0); - glEvalMesh2(display_mode, 0, left - 1, 0, bottom - 1); - tesselate_strip_t(display_mode, 0, bottom - 1, left - 1, 0, top - 1, - top, (GLfloat) top); - tesselate_top_right_corner(display_mode, left - 1, bottom - 1, right, - top, (GLfloat) (1.0 / right), - (GLfloat) (1.0 / top)); -/* tesselate_strip_s(display_mode,0,left-1,bottom-1,0,right-1,right, - (GLfloat)right);*/ - tesselate_strip_s(display_mode, left - 1, 0, bottom - 1, right - 1, - 0, right, (GLfloat) right); - } - } -} - -/* draw NURBS surface in OUTLINE POLYGON mode */ -static void -draw_polygon_mode(GLenum display_mode, GLUnurbsObj * nobj, - new_ctrl_type * new_ctrl, GLint * sfactors, - GLint * tfactors) -{ - GLsizei offset; - GLint t_bezier_cnt, s_bezier_cnt; - GLboolean do_color, do_normal, do_texture; - GLint i, j; - - t_bezier_cnt = new_ctrl->t_bezier_cnt; - s_bezier_cnt = new_ctrl->s_bezier_cnt; - glEnable(nobj->surface.geom.type); - if (new_ctrl->color_ctrl) { - glEnable(nobj->surface.color.type); - do_color = GL_TRUE; - } - else - do_color = GL_FALSE; - if (new_ctrl->normal_ctrl) { - glEnable(nobj->surface.normal.type); - do_normal = GL_TRUE; - } - else - do_normal = GL_FALSE; - if (new_ctrl->texture_ctrl) { - glEnable(nobj->surface.texture.type); - do_texture = GL_TRUE; - } - else - do_texture = GL_FALSE; - for (j = 0; j < s_bezier_cnt; j++) { - for (i = 0; i < t_bezier_cnt; i++) { - offset = j * t_bezier_cnt + i; - if (fine_culling_test_3D(nobj, *(new_ctrl->geom_offsets + offset), - nobj->surface.geom.sorder, - nobj->surface.geom.torder, - new_ctrl->geom_s_stride, - new_ctrl->geom_t_stride, - nobj->surface.geom.dim)) continue; - glMap2f(nobj->surface.geom.type, 0.0, 1.0, new_ctrl->geom_s_stride, - nobj->surface.geom.sorder, 0.0, 1.0, new_ctrl->geom_t_stride, - nobj->surface.geom.torder, - *(new_ctrl->geom_offsets + offset)); - if (do_color) { - glMap2f(nobj->surface.color.type, 0.0, 1.0, - new_ctrl->color_s_stride, nobj->surface.color.sorder, - 0.0, 1.0, new_ctrl->color_t_stride, - nobj->surface.color.torder, - *(new_ctrl->color_offsets + offset)); - } - if (do_normal) { - glMap2f(nobj->surface.normal.type, 0.0, 1.0, - new_ctrl->normal_s_stride, nobj->surface.normal.sorder, - 0.0, 1.0, new_ctrl->normal_t_stride, - nobj->surface.normal.torder, - *(new_ctrl->normal_offsets + offset)); - } - if (do_texture) { - glMap2f(nobj->surface.texture.type, 0.0, 1.0, - new_ctrl->texture_s_stride, nobj->surface.texture.sorder, - 0.0, 1.0, new_ctrl->texture_t_stride, - nobj->surface.texture.torder, - *(new_ctrl->texture_offsets + offset)); - } -/* glMapGrid2f(sfactors[j*3+0],0.0,1.0,tfactors[i*3+0],0.0,1.0); - glEvalMesh2(display_mode,0,sfactors[j*3+0],0,tfactors[i*3+0]);*/ - nurbs_map_bezier(display_mode, sfactors, tfactors, s_bezier_cnt, - t_bezier_cnt, j, i); - } - } -} - - - -/* draw NURBS surface in OUTLINE POLYGON mode */ -#if 0 -static void -draw_patch_mode(GLenum display_mode, GLUnurbsObj * nobj, - new_ctrl_type * new_ctrl, GLint * sfactors, GLint * tfactors) -{ - GLsizei offset; - GLint t_bezier_cnt, s_bezier_cnt; - GLboolean do_color, do_normal, do_texture; - GLint i, j; - - t_bezier_cnt = new_ctrl->t_bezier_cnt; - s_bezier_cnt = new_ctrl->s_bezier_cnt; - glEnable(nobj->surface.geom.type); - if (new_ctrl->color_ctrl) { - glEnable(nobj->surface.color.type); - do_color = GL_TRUE; - } - else - do_color = GL_FALSE; - if (new_ctrl->normal_ctrl) { - glEnable(nobj->surface.normal.type); - do_normal = GL_TRUE; - } - else - do_normal = GL_FALSE; - if (new_ctrl->texture_ctrl) { - glEnable(nobj->surface.texture.type); - do_texture = GL_TRUE; - } - else - do_texture = GL_FALSE; - for (j = 0; j < s_bezier_cnt; j++) { - for (i = 0; i < t_bezier_cnt; i++) { - offset = j * t_bezier_cnt + i; - if (fine_culling_test_3D(nobj, *(new_ctrl->geom_offsets + offset), - nobj->surface.geom.sorder, - nobj->surface.geom.torder, - new_ctrl->geom_s_stride, - new_ctrl->geom_t_stride, - nobj->surface.geom.dim)) continue; - glMap2f(nobj->surface.geom.type, 0.0, 1.0, new_ctrl->geom_s_stride, - nobj->surface.geom.sorder, 0.0, 1.0, new_ctrl->geom_t_stride, - nobj->surface.geom.torder, - *(new_ctrl->geom_offsets + offset)); - if (do_color) { - glMap2f(nobj->surface.color.type, 0.0, 1.0, - new_ctrl->color_s_stride, nobj->surface.color.sorder, - 0.0, 1.0, new_ctrl->color_t_stride, - nobj->surface.color.torder, - *(new_ctrl->color_offsets + offset)); - } - if (do_normal) { - glMap2f(nobj->surface.normal.type, 0.0, 1.0, - new_ctrl->normal_s_stride, nobj->surface.normal.sorder, - 0.0, 1.0, new_ctrl->normal_t_stride, - nobj->surface.normal.torder, - *(new_ctrl->normal_offsets + offset)); - } - if (do_texture) { - glMap2f(nobj->surface.texture.type, 0.0, 1.0, - new_ctrl->texture_s_stride, nobj->surface.texture.sorder, - 0.0, 1.0, new_ctrl->texture_t_stride, - nobj->surface.texture.torder, - *(new_ctrl->texture_offsets + offset)); - } - nurbs_map_bezier(display_mode, sfactors, tfactors, s_bezier_cnt, - t_bezier_cnt, i, j); -/* glMapGrid2f(sfactors[j],0.0,1.0,tfactors[i],0.0,1.0); - glEvalMesh2(display_mode,0,sfactors[j],0,tfactors[i]);*/ - } - } -} -#endif - - - -static void -init_new_ctrl(new_ctrl_type * p) -{ - p->geom_ctrl = p->color_ctrl = p->normal_ctrl = p->texture_ctrl = NULL; - p->geom_offsets = p->color_offsets = p->normal_offsets = - p->texture_offsets = NULL; - p->s_bezier_cnt = p->t_bezier_cnt = 0; -} - - -static GLenum -augment_new_ctrl(GLUnurbsObj * nobj, new_ctrl_type * p) -{ - GLsizei offset_size; - GLint i, j; - - p->s_bezier_cnt = (p->geom_s_pt_cnt) / (nobj->surface.geom.sorder); - p->t_bezier_cnt = (p->geom_t_pt_cnt) / (nobj->surface.geom.torder); - offset_size = (p->s_bezier_cnt) * (p->t_bezier_cnt); - p->geom_t_stride = nobj->surface.geom.dim; - p->geom_s_stride = (p->geom_t_pt_cnt) * (nobj->surface.geom.dim); - p->color_t_stride = nobj->surface.color.dim; - p->color_s_stride = (p->color_t_pt_cnt) * (nobj->surface.color.dim); - p->normal_t_stride = nobj->surface.normal.dim; - p->normal_s_stride = (p->normal_t_pt_cnt) * (nobj->surface.normal.dim); - p->texture_t_stride = nobj->surface.texture.dim; - p->texture_s_stride = (p->texture_t_pt_cnt) * (nobj->surface.texture.dim); - if ( - (p->geom_offsets = - (GLfloat **) malloc(sizeof(GLfloat *) * offset_size)) == NULL) { - call_user_error(nobj, GLU_OUT_OF_MEMORY); - return GLU_ERROR; - } - if (p->color_ctrl) - if ( - (p->color_offsets = - (GLfloat **) malloc(sizeof(GLfloat *) * offset_size)) == NULL) { - free_new_ctrl(p); - call_user_error(nobj, GLU_OUT_OF_MEMORY); - return GLU_ERROR; - } - if (p->normal_ctrl) - if ( - (p->normal_offsets = - (GLfloat **) malloc(sizeof(GLfloat *) * offset_size)) == NULL) { - free_new_ctrl(p); - call_user_error(nobj, GLU_OUT_OF_MEMORY); - return GLU_ERROR; - } - if (p->texture_ctrl) - if ( - (p->texture_offsets = - (GLfloat **) malloc(sizeof(GLfloat *) * offset_size)) == NULL) { - free_new_ctrl(p); - call_user_error(nobj, GLU_OUT_OF_MEMORY); - return GLU_ERROR; - } - for (i = 0; i < p->s_bezier_cnt; i++) - for (j = 0; j < p->t_bezier_cnt; j++) - *(p->geom_offsets + i * (p->t_bezier_cnt) + j) = - p->geom_ctrl + i * (nobj->surface.geom.sorder) * - (nobj->surface.geom.dim) * (p->geom_t_pt_cnt) + - j * (nobj->surface.geom.dim) * (nobj->surface.geom.torder); - if (p->color_ctrl) - for (i = 0; i < p->s_bezier_cnt; i++) - for (j = 0; j < p->t_bezier_cnt; j++) - *(p->color_offsets + i * (p->t_bezier_cnt) + j) = - p->color_ctrl + i * (nobj->surface.color.sorder) * - (nobj->surface.color.dim) * (p->color_t_pt_cnt) + - j * (nobj->surface.color.dim) * (nobj->surface.color.torder); - if (p->normal_ctrl) - for (i = 0; i < p->s_bezier_cnt; i++) - for (j = 0; j < p->t_bezier_cnt; j++) - *(p->normal_offsets + i * (p->t_bezier_cnt) + j) = - p->normal_ctrl + i * (nobj->surface.normal.sorder) * - (nobj->surface.normal.dim) * (p->normal_t_pt_cnt) + - j * (nobj->surface.normal.dim) * (nobj->surface.normal.torder); - if (p->texture_ctrl) - for (i = 0; i < p->s_bezier_cnt; i++) - for (j = 0; j < p->t_bezier_cnt; j++) - *(p->texture_offsets + i * (p->t_bezier_cnt) + j) = - p->texture_ctrl + i * (nobj->surface.texture.sorder) * - (nobj->surface.texture.dim) * (p->texture_t_pt_cnt) + - j * (nobj->surface.texture.dim) * - (nobj->surface.texture.torder); - return GLU_NO_ERROR; -} - -/* main NURBS surface procedure */ -void -do_nurbs_surface(GLUnurbsObj * nobj) -{ - GLint *sfactors, *tfactors; - new_ctrl_type new_ctrl; - - /* test user supplied data */ - if (test_nurbs_surfaces(nobj) != GLU_NO_ERROR) - return; - - init_new_ctrl(&new_ctrl); - - if (convert_surfs(nobj, &new_ctrl) != GLU_NO_ERROR) - return; - if (augment_new_ctrl(nobj, &new_ctrl) != GLU_NO_ERROR) - return; - switch (nobj->sampling_method) { - case GLU_PATH_LENGTH: - if (glu_do_sampling_3D(nobj, &new_ctrl, &sfactors, &tfactors) != - GLU_NO_ERROR) { - free_new_ctrl(&new_ctrl); - return; - } - break; - case GLU_DOMAIN_DISTANCE: - if (glu_do_sampling_uv(nobj, &new_ctrl, &sfactors, &tfactors) != - GLU_NO_ERROR) { - free_new_ctrl(&new_ctrl); - return; - } - break; - case GLU_PARAMETRIC_ERROR: - if (glu_do_sampling_param_3D(nobj, &new_ctrl, &sfactors, &tfactors) != - GLU_NO_ERROR) { - free_new_ctrl(&new_ctrl); - return; - } - break; - default: - abort(); - } - glFrontFace(GL_CW); - switch (nobj->display_mode) { - case GLU_FILL: -/* if(polygon_trimming(nobj,&new_ctrl,sfactors,tfactors)==GLU_NO_ERROR)*/ - draw_polygon_mode(GL_FILL, nobj, &new_ctrl, sfactors, tfactors); - break; - case GLU_OUTLINE_POLYGON: - /* TODO - missing trimming handeling */ -/* just for now - no OUTLINE_PATCH mode - draw_patch_mode(GL_LINE,nobj,&new_ctrl,sfactors,tfactors); - break; */ - case GLU_OUTLINE_PATCH: -/* if(polygon_trimming(nobj,&new_ctrl,sfactors,tfactors)==GLU_NO_ERROR)*/ - draw_polygon_mode(GL_LINE, nobj, &new_ctrl, sfactors, tfactors); - break; - default: - abort(); /* TODO: is this OK? */ - } - free(sfactors); - free(tfactors); - free_new_ctrl(&new_ctrl); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/nurbsutl.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/nurbsutl.c deleted file mode 100644 index b46348a50b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/nurbsutl.c +++ /dev/null @@ -1,1309 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * NURBS implementation written by Bogdan Sikorski (bogdan@cira.it) - * See README2 for more info. - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include "gluP.h" -#include "nurbs.h" -#endif - - -GLenum test_knot(GLint nknots, GLfloat * knot, GLint order) -{ - GLsizei i; - GLint knot_mult; - GLfloat tmp_knot; - - tmp_knot = knot[0]; - knot_mult = 1; - for (i = 1; i < nknots; i++) { - if (knot[i] < tmp_knot) - return GLU_NURBS_ERROR4; - if (fabs(tmp_knot - knot[i]) > EPSILON) { - if (knot_mult > order) - return GLU_NURBS_ERROR5; - knot_mult = 1; - tmp_knot = knot[i]; - } - else - ++knot_mult; - } - return GLU_NO_ERROR; -} - -static int -/* qsort function */ -#if defined(WIN32) && !defined(OPENSTEP) - __cdecl -#endif -knot_sort(const void *a, const void *b) -{ - GLfloat x, y; - - x = *((GLfloat *) a); - y = *((GLfloat *) b); - if (fabs(x - y) < EPSILON) - return 0; - if (x > y) - return 1; - return -1; -} - -/* insert into dest knot all values within the valid range from src knot */ -/* that do not appear in dest */ -void -collect_unified_knot(knot_str_type * dest, knot_str_type * src, - GLfloat maximal_min_knot, GLfloat minimal_max_knot) -{ - GLfloat *src_knot, *dest_knot; - GLint src_t_min, src_t_max, dest_t_min, dest_t_max; - GLint src_nknots, dest_nknots; - GLint i, j, k, new_cnt; - GLboolean not_found_flag; - - src_knot = src->unified_knot; - dest_knot = dest->unified_knot; - src_t_min = src->t_min; - src_t_max = src->t_max; - dest_t_min = dest->t_min; - dest_t_max = dest->t_max; - src_nknots = src->unified_nknots; - dest_nknots = dest->unified_nknots; - - k = new_cnt = dest_nknots; - for (i = src_t_min; i <= src_t_max; i++) - if (src_knot[i] - maximal_min_knot > -EPSILON && - src_knot[i] - minimal_max_knot < EPSILON) { - not_found_flag = GL_TRUE; - for (j = dest_t_min; j <= dest_t_max; j++) - if (fabs(dest_knot[j] - src_knot[i]) < EPSILON) { - not_found_flag = GL_FALSE; - break; - } - if (not_found_flag) { - /* knot from src is not in dest - add this knot to dest */ - dest_knot[k++] = src_knot[i]; - ++new_cnt; - ++(dest->t_max); /* the valid range widens */ - ++(dest->delta_nknots); /* increment the extra knot value counter */ - } - } - dest->unified_nknots = new_cnt; - qsort((void *) dest_knot, (size_t) new_cnt, (size_t) sizeof(GLfloat), - &knot_sort); -} - -/* basing on the new common knot range for all attributes set */ -/* t_min and t_max values for each knot - they will be used later on */ -/* by explode_knot() and calc_new_ctrl_pts */ -static void -set_new_t_min_t_max(knot_str_type * geom_knot, knot_str_type * color_knot, - knot_str_type * normal_knot, knot_str_type * texture_knot, - GLfloat maximal_min_knot, GLfloat minimal_max_knot) -{ - GLuint t_min = 0, t_max = 0, cnt = 0; - - if (minimal_max_knot - maximal_min_knot < EPSILON) { - /* knot common range empty */ - geom_knot->t_min = geom_knot->t_max = 0; - color_knot->t_min = color_knot->t_max = 0; - normal_knot->t_min = normal_knot->t_max = 0; - texture_knot->t_min = texture_knot->t_max = 0; - } - else { - if (geom_knot->unified_knot != NULL) { - cnt = geom_knot->unified_nknots; - for (t_min = 0; t_min < cnt; t_min++) - if (fabs((geom_knot->unified_knot)[t_min] - maximal_min_knot) < - EPSILON) break; - for (t_max = cnt - 1; t_max; t_max--) - if (fabs((geom_knot->unified_knot)[t_max] - minimal_max_knot) < - EPSILON) break; - } - else if (geom_knot->nknots) { - cnt = geom_knot->nknots; - for (t_min = 0; t_min < cnt; t_min++) - if (fabs((geom_knot->knot)[t_min] - maximal_min_knot) < EPSILON) - break; - for (t_max = cnt - 1; t_max; t_max--) - if (fabs((geom_knot->knot)[t_max] - minimal_max_knot) < EPSILON) - break; - } - geom_knot->t_min = t_min; - geom_knot->t_max = t_max; - if (color_knot->unified_knot != NULL) { - cnt = color_knot->unified_nknots; - for (t_min = 0; t_min < cnt; t_min++) - if (fabs((color_knot->unified_knot)[t_min] - maximal_min_knot) < - EPSILON) break; - for (t_max = cnt - 1; t_max; t_max--) - if (fabs((color_knot->unified_knot)[t_max] - minimal_max_knot) < - EPSILON) break; - color_knot->t_min = t_min; - color_knot->t_max = t_max; - } - if (normal_knot->unified_knot != NULL) { - cnt = normal_knot->unified_nknots; - for (t_min = 0; t_min < cnt; t_min++) - if (fabs((normal_knot->unified_knot)[t_min] - maximal_min_knot) < - EPSILON) break; - for (t_max = cnt - 1; t_max; t_max--) - if (fabs((normal_knot->unified_knot)[t_max] - minimal_max_knot) < - EPSILON) break; - normal_knot->t_min = t_min; - normal_knot->t_max = t_max; - } - if (texture_knot->unified_knot != NULL) { - cnt = texture_knot->unified_nknots; - for (t_min = 0; t_min < cnt; t_min++) - if (fabs((texture_knot->unified_knot)[t_min] - maximal_min_knot) - < EPSILON) - break; - for (t_max = cnt - 1; t_max; t_max--) - if (fabs((texture_knot->unified_knot)[t_max] - minimal_max_knot) - < EPSILON) - break; - texture_knot->t_min = t_min; - texture_knot->t_max = t_max; - } - } -} - -/* modify all knot valid ranges in such a way that all have the same */ -/* range, common to all knots */ -/* do this by knot insertion */ -GLenum -select_knot_working_range(GLUnurbsObj * nobj, knot_str_type * geom_knot, - knot_str_type * color_knot, - knot_str_type * normal_knot, - knot_str_type * texture_knot) -{ - GLint max_nknots; - GLfloat maximal_min_knot, minimal_max_knot; - GLint i; - - /* find the maximum modified knot length */ - max_nknots = geom_knot->nknots; - if (color_knot->unified_knot) - max_nknots += color_knot->nknots; - if (normal_knot->unified_knot) - max_nknots += normal_knot->nknots; - if (texture_knot->unified_knot) - max_nknots += texture_knot->nknots; - maximal_min_knot = (geom_knot->knot)[geom_knot->t_min]; - minimal_max_knot = (geom_knot->knot)[geom_knot->t_max]; - /* any attirb data ? */ - if (max_nknots != geom_knot->nknots) { - /* allocate space for the unified knots */ - if ((geom_knot->unified_knot = - (GLfloat *) malloc(sizeof(GLfloat) * max_nknots)) == NULL) { - call_user_error(nobj, GLU_OUT_OF_MEMORY); - return GLU_ERROR; - } - /* copy the original knot to the unified one */ - geom_knot->unified_nknots = geom_knot->nknots; - for (i = 0; i < geom_knot->nknots; i++) - (geom_knot->unified_knot)[i] = (geom_knot->knot)[i]; - if (color_knot->unified_knot) { - if ((color_knot->knot)[color_knot->t_min] - maximal_min_knot > - EPSILON) - maximal_min_knot = (color_knot->knot)[color_knot->t_min]; - if (minimal_max_knot - (color_knot->knot)[color_knot->t_max] > - EPSILON) - minimal_max_knot = (color_knot->knot)[color_knot->t_max]; - if ((color_knot->unified_knot = - (GLfloat *) malloc(sizeof(GLfloat) * max_nknots)) == NULL) { - free(geom_knot->unified_knot); - call_user_error(nobj, GLU_OUT_OF_MEMORY); - return GLU_ERROR; - } - /* copy the original knot to the unified one */ - color_knot->unified_nknots = color_knot->nknots; - for (i = 0; i < color_knot->nknots; i++) - (color_knot->unified_knot)[i] = (color_knot->knot)[i]; - } - if (normal_knot->unified_knot) { - if ((normal_knot->knot)[normal_knot->t_min] - maximal_min_knot > - EPSILON) - maximal_min_knot = (normal_knot->knot)[normal_knot->t_min]; - if (minimal_max_knot - (normal_knot->knot)[normal_knot->t_max] > - EPSILON) - minimal_max_knot = (normal_knot->knot)[normal_knot->t_max]; - if ((normal_knot->unified_knot = - (GLfloat *) malloc(sizeof(GLfloat) * max_nknots)) == NULL) { - free(geom_knot->unified_knot); - free(color_knot->unified_knot); - call_user_error(nobj, GLU_OUT_OF_MEMORY); - return GLU_ERROR; - } - /* copy the original knot to the unified one */ - normal_knot->unified_nknots = normal_knot->nknots; - for (i = 0; i < normal_knot->nknots; i++) - (normal_knot->unified_knot)[i] = (normal_knot->knot)[i]; - } - if (texture_knot->unified_knot) { - if ((texture_knot->knot)[texture_knot->t_min] - maximal_min_knot > - EPSILON) - maximal_min_knot = (texture_knot->knot)[texture_knot->t_min]; - if (minimal_max_knot - (texture_knot->knot)[texture_knot->t_max] > - EPSILON) - minimal_max_knot = (texture_knot->knot)[texture_knot->t_max]; - if ((texture_knot->unified_knot = - (GLfloat *) malloc(sizeof(GLfloat) * max_nknots)) == NULL) { - free(geom_knot->unified_knot); - free(color_knot->unified_knot); - free(normal_knot->unified_knot); - call_user_error(nobj, GLU_OUT_OF_MEMORY); - return GLU_ERROR; - } - /* copy the original knot to the unified one */ - texture_knot->unified_nknots = texture_knot->nknots; - for (i = 0; i < texture_knot->nknots; i++) - (texture_knot->unified_knot)[i] = (texture_knot->knot)[i]; - } - /* work on the geometry knot with all additional knot values */ - /* appearing in attirbutive knots */ - if (minimal_max_knot - maximal_min_knot < EPSILON) { - /* empty working range */ - geom_knot->unified_nknots = 0; - color_knot->unified_nknots = 0; - normal_knot->unified_nknots = 0; - texture_knot->unified_nknots = 0; - } - else { - if (color_knot->unified_knot) - collect_unified_knot(geom_knot, color_knot, maximal_min_knot, - minimal_max_knot); - if (normal_knot->unified_knot) - collect_unified_knot(geom_knot, normal_knot, maximal_min_knot, - minimal_max_knot); - if (texture_knot->unified_knot) - collect_unified_knot(geom_knot, texture_knot, maximal_min_knot, - minimal_max_knot); - /* since we have now built the "unified" geometry knot */ - /* add same knot values to all attributive knots */ - if (color_knot->unified_knot) - collect_unified_knot(color_knot, geom_knot, maximal_min_knot, - minimal_max_knot); - if (normal_knot->unified_knot) - collect_unified_knot(normal_knot, geom_knot, maximal_min_knot, - minimal_max_knot); - if (texture_knot->unified_knot) - collect_unified_knot(texture_knot, geom_knot, maximal_min_knot, - minimal_max_knot); - } - } - set_new_t_min_t_max(geom_knot, color_knot, normal_knot, texture_knot, - maximal_min_knot, minimal_max_knot); - return GLU_NO_ERROR; -} - -void -free_unified_knots(knot_str_type * geom_knot, knot_str_type * color_knot, - knot_str_type * normal_knot, knot_str_type * texture_knot) -{ - if (geom_knot->unified_knot) - free(geom_knot->unified_knot); - if (color_knot->unified_knot) - free(color_knot->unified_knot); - if (normal_knot->unified_knot) - free(normal_knot->unified_knot); - if (texture_knot->unified_knot) - free(texture_knot->unified_knot); -} - -GLenum explode_knot(knot_str_type * the_knot) -{ - GLfloat *knot, *new_knot; - GLint nknots, n_new_knots = 0; - GLint t_min, t_max; - GLint ord; - GLsizei i, j, k; - GLfloat tmp_float; - - if (the_knot->unified_knot) { - knot = the_knot->unified_knot; - nknots = the_knot->unified_nknots; - } - else { - knot = the_knot->knot; - nknots = the_knot->nknots; - } - ord = the_knot->order; - t_min = the_knot->t_min; - t_max = the_knot->t_max; - - for (i = t_min; i <= t_max;) { - tmp_float = knot[i]; - for (j = 0; j < ord && (i + j) <= t_max; j++) - if (fabs(tmp_float - knot[i + j]) > EPSILON) - break; - n_new_knots += ord - j; - i += j; - } - /* alloc space for new_knot */ - if ( - (new_knot = - (GLfloat *) malloc(sizeof(GLfloat) * (nknots + n_new_knots + 1))) == NULL) { - return GLU_OUT_OF_MEMORY; - } - /* fill in new knot */ - for (j = 0; j < t_min; j++) - new_knot[j] = knot[j]; - for (i = j; i <= t_max; i++) { - tmp_float = knot[i]; - for (k = 0; k < ord; k++) { - new_knot[j++] = knot[i]; - if (tmp_float == knot[i + 1]) - i++; - } - } - for (i = t_max + 1; i < (int) nknots; i++) - new_knot[j++] = knot[i]; - /* fill in the knot structure */ - the_knot->new_knot = new_knot; - the_knot->delta_nknots += n_new_knots; - the_knot->t_max += n_new_knots; - return GLU_NO_ERROR; -} - -GLenum calc_alphas(knot_str_type * the_knot) -{ - GLfloat tmp_float; - int i, j, k, m, n; - int order; - GLfloat *alpha, *alpha_new, *tmp_alpha; - GLfloat denom; - GLfloat *knot, *new_knot; - - - knot = the_knot->knot; - order = the_knot->order; - new_knot = the_knot->new_knot; - n = the_knot->nknots - the_knot->order; - m = n + the_knot->delta_nknots; - if ((alpha = (GLfloat *) malloc(sizeof(GLfloat) * n * m)) == NULL) { - return GLU_OUT_OF_MEMORY; - } - if ((alpha_new = (GLfloat *) malloc(sizeof(GLfloat) * n * m)) == NULL) { - free(alpha); - return GLU_OUT_OF_MEMORY; - } - for (j = 0; j < m; j++) { - for (i = 0; i < n; i++) { - if ((knot[i] <= new_knot[j]) && (new_knot[j] < knot[i + 1])) - tmp_float = 1.0; - else - tmp_float = 0.0; - alpha[i + j * n] = tmp_float; - } - } - for (k = 1; k < order; k++) { - for (j = 0; j < m; j++) - for (i = 0; i < n; i++) { - denom = knot[i + k] - knot[i]; - if (fabs(denom) < EPSILON) - tmp_float = 0.0; - else - tmp_float = (new_knot[j + k] - knot[i]) / denom * - alpha[i + j * n]; - denom = knot[i + k + 1] - knot[i + 1]; - if (fabs(denom) > EPSILON) - tmp_float += (knot[i + k + 1] - new_knot[j + k]) / denom * - alpha[(i + 1) + j * n]; - alpha_new[i + j * n] = tmp_float; - } - tmp_alpha = alpha_new; - alpha_new = alpha; - alpha = tmp_alpha; - } - the_knot->alpha = alpha; - free(alpha_new); - return GLU_NO_ERROR; -} - -GLenum -calc_new_ctrl_pts(GLfloat * ctrl, GLint stride, knot_str_type * the_knot, - GLint dim, GLfloat ** new_ctrl, GLint * ncontrol) -{ - GLsizei i, j, k, l, m, n; - GLsizei index1, index2; - GLfloat *alpha; - GLfloat *new_knot; - - new_knot = the_knot->new_knot; - n = the_knot->nknots - the_knot->order; - alpha = the_knot->alpha; - - m = the_knot->t_max + 1 - the_knot->t_min - the_knot->order; - k = the_knot->t_min; - /* allocate space for new control points */ - if ((*new_ctrl = (GLfloat *) malloc(sizeof(GLfloat) * dim * m)) == NULL) { - return GLU_OUT_OF_MEMORY; - } - for (j = 0; j < m; j++) { - for (l = 0; l < dim; l++) - (*new_ctrl)[j * dim + l] = 0.0; - for (i = 0; i < n; i++) { - index1 = i + (j + k) * n; - index2 = i * stride; - for (l = 0; l < dim; l++) - (*new_ctrl)[j * dim + l] += alpha[index1] * ctrl[index2 + l]; - } - } - *ncontrol = (GLint) m; - return GLU_NO_ERROR; -} - -static GLint -calc_factor(GLfloat * pts, GLint order, GLint indx, GLint stride, - GLfloat tolerance, GLint dim) -{ - GLdouble model[16], proj[16]; - GLint viewport[4]; - GLdouble x, y, z, w, winx1, winy1, winz, winx2, winy2; - GLint i; - GLdouble len, dx, dy; - - glGetDoublev(GL_MODELVIEW_MATRIX, model); - glGetDoublev(GL_PROJECTION_MATRIX, proj); - glGetIntegerv(GL_VIEWPORT, viewport); - if (dim == 4) { - w = (GLdouble) pts[indx + 3]; - x = (GLdouble) pts[indx] / w; - y = (GLdouble) pts[indx + 1] / w; - z = (GLdouble) pts[indx + 2] / w; - gluProject(x, y, z, model, proj, viewport, &winx1, &winy1, &winz); - len = 0.0; - for (i = 1; i < order; i++) { - w = (GLdouble) pts[indx + i * stride + 3]; - x = (GLdouble) pts[indx + i * stride] / w; - y = (GLdouble) pts[indx + i * stride + 1] / w; - z = (GLdouble) pts[indx + i * stride + 2] / w; - if (gluProject - (x, y, z, model, proj, viewport, &winx2, &winy2, &winz)) { - dx = winx2 - winx1; - dy = winy2 - winy1; - len += sqrt(dx * dx + dy * dy); - } - winx1 = winx2; - winy1 = winy2; - } - } - else { - x = (GLdouble) pts[indx]; - y = (GLdouble) pts[indx + 1]; - if (dim == 2) - z = 0.0; - else - z = (GLdouble) pts[indx + 2]; - gluProject(x, y, z, model, proj, viewport, &winx1, &winy1, &winz); - len = 0.0; - for (i = 1; i < order; i++) { - x = (GLdouble) pts[indx + i * stride]; - y = (GLdouble) pts[indx + i * stride + 1]; - if (dim == 2) - z = 0.0; - else - z = (GLdouble) pts[indx + i * stride + 2]; - if (gluProject - (x, y, z, model, proj, viewport, &winx2, &winy2, &winz)) { - dx = winx2 - winx1; - dy = winy2 - winy1; - len += sqrt(dx * dx + dy * dy); - } - winx1 = winx2; - winy1 = winy2; - } - } - len /= tolerance; - return ((GLint) len + 1); -} - -/* we can't use the Mesa evaluators - no way to get the point coords */ -/* so we use our own Bezier point calculus routines */ -/* because I'm lazy, I reuse the ones from eval.c */ - -static void -bezier_curve(GLfloat * cp, GLfloat * out, GLfloat t, - GLuint dim, GLuint order, GLint offset) -{ - GLfloat s, powert; - GLuint i, k, bincoeff; - - if (order >= 2) { - bincoeff = order - 1; - s = 1.0 - t; - - for (k = 0; k < dim; k++) - out[k] = s * cp[k] + bincoeff * t * cp[offset + k]; - - for (i = 2, cp += 2 * offset, powert = t * t; i < order; - i++, powert *= t, cp += offset) { - bincoeff *= order - i; - bincoeff /= i; - - for (k = 0; k < dim; k++) - out[k] = s * out[k] + bincoeff * powert * cp[k]; - } - } - else { /* order=1 -> constant curve */ - - for (k = 0; k < dim; k++) - out[k] = cp[k]; - } -} - -static GLint -calc_parametric_factor(GLfloat * pts, GLint order, GLint indx, GLint stride, - GLfloat tolerance, GLint dim) -{ - GLdouble model[16], proj[16]; - GLint viewport[4]; - GLdouble x, y, z, w, x1, y1, z1, x2, y2, z2, x3, y3, z3; - GLint i; - GLint P; - GLfloat bez_pt[4]; - GLdouble len = 0.0, tmp, z_med; - - P = 2 * (order + 2); - glGetDoublev(GL_MODELVIEW_MATRIX, model); - glGetDoublev(GL_PROJECTION_MATRIX, proj); - glGetIntegerv(GL_VIEWPORT, viewport); - z_med = (viewport[2] + viewport[3]) * 0.5; - switch (dim) { - case 4: - for (i = 1; i < P; i++) { - bezier_curve(pts + indx, bez_pt, (GLfloat) i / (GLfloat) P, 4, - order, stride); - w = (GLdouble) bez_pt[3]; - x = (GLdouble) bez_pt[0] / w; - y = (GLdouble) bez_pt[1] / w; - z = (GLdouble) bez_pt[2] / w; - gluProject(x, y, z, model, proj, viewport, &x3, &y3, &z3); - z3 *= z_med; - bezier_curve(pts + indx, bez_pt, (GLfloat) (i - 1) / (GLfloat) P, 4, - order, stride); - w = (GLdouble) bez_pt[3]; - x = (GLdouble) bez_pt[0] / w; - y = (GLdouble) bez_pt[1] / w; - z = (GLdouble) bez_pt[2] / w; - gluProject(x, y, z, model, proj, viewport, &x1, &y1, &z1); - z1 *= z_med; - bezier_curve(pts + indx, bez_pt, (GLfloat) (i + 1) / (GLfloat) P, 4, - order, stride); - w = (GLdouble) bez_pt[3]; - x = (GLdouble) bez_pt[0] / w; - y = (GLdouble) bez_pt[1] / w; - z = (GLdouble) bez_pt[2] / w; - gluProject(x, y, z, model, proj, viewport, &x2, &y2, &z2); - z2 *= z_med; - /* calc distance between point (x3,y3,z3) and line segment */ - /* */ - x = x2 - x1; - y = y2 - y1; - z = z2 - z1; - tmp = sqrt(x * x + y * y + z * z); - x /= tmp; - y /= tmp; - z /= tmp; - tmp = x3 * x + y3 * y + z3 * z - x1 * x - y1 * y - z1 * z; - x = x1 + x * tmp - x3; - y = y1 + y * tmp - y3; - z = z1 + z * tmp - z3; - tmp = sqrt(x * x + y * y + z * z); - if (tmp > len) - len = tmp; - } - break; - case 3: - for (i = 1; i < P; i++) { - bezier_curve(pts + indx, bez_pt, (GLfloat) i / (GLfloat) P, 3, - order, stride); - x = (GLdouble) bez_pt[0]; - y = (GLdouble) bez_pt[1]; - z = (GLdouble) bez_pt[2]; - gluProject(x, y, z, model, proj, viewport, &x3, &y3, &z3); - z3 *= z_med; - bezier_curve(pts + indx, bez_pt, (GLfloat) (i - 1) / (GLfloat) P, 3, - order, stride); - x = (GLdouble) bez_pt[0]; - y = (GLdouble) bez_pt[1]; - z = (GLdouble) bez_pt[2]; - gluProject(x, y, z, model, proj, viewport, &x1, &y1, &z1); - z1 *= z_med; - bezier_curve(pts + indx, bez_pt, (GLfloat) (i + 1) / (GLfloat) P, 3, - order, stride); - x = (GLdouble) bez_pt[0]; - y = (GLdouble) bez_pt[1]; - z = (GLdouble) bez_pt[2]; - gluProject(x, y, z, model, proj, viewport, &x2, &y2, &z2); - z2 *= z_med; - /* calc distance between point (x3,y3,z3) and line segment */ - /* */ - x = x2 - x1; - y = y2 - y1; - z = z2 - z1; - tmp = sqrt(x * x + y * y + z * z); - x /= tmp; - y /= tmp; - z /= tmp; - tmp = x3 * x + y3 * y + z3 * z - x1 * x - y1 * y - z1 * z; - x = x1 + x * tmp - x3; - y = y1 + y * tmp - y3; - z = z1 + z * tmp - z3; - tmp = sqrt(x * x + y * y + z * z); - if (tmp > len) - len = tmp; - } - break; - case 2: - for (i = 1; i < P; i++) { - bezier_curve(pts + indx, bez_pt, (GLfloat) i / (GLfloat) P, 2, - order, stride); - x = (GLdouble) bez_pt[0]; - y = (GLdouble) bez_pt[1]; - z = 0.0; - gluProject(x, y, z, model, proj, viewport, &x3, &y3, &z3); - z3 *= z_med; - bezier_curve(pts + indx, bez_pt, (GLfloat) (i - 1) / (GLfloat) P, 2, - order, stride); - x = (GLdouble) bez_pt[0]; - y = (GLdouble) bez_pt[1]; - z = 0.0; - gluProject(x, y, z, model, proj, viewport, &x1, &y1, &z1); - z1 *= z_med; - bezier_curve(pts + indx, bez_pt, (GLfloat) (i + 1) / (GLfloat) P, 2, - order, stride); - x = (GLdouble) bez_pt[0]; - y = (GLdouble) bez_pt[1]; - z = 0.0; - gluProject(x, y, z, model, proj, viewport, &x2, &y2, &z2); - z2 *= z_med; - /* calc distance between point (x3,y3,z3) and line segment */ - /* */ - x = x2 - x1; - y = y2 - y1; - z = z2 - z1; - tmp = sqrt(x * x + y * y + z * z); - x /= tmp; - y /= tmp; - z /= tmp; - tmp = x3 * x + y3 * y + z3 * z - x1 * x - y1 * y - z1 * z; - x = x1 + x * tmp - x3; - y = y1 + y * tmp - y3; - z = z1 + z * tmp - z3; - tmp = sqrt(x * x + y * y + z * z); - if (tmp > len) - len = tmp; - } - break; - - } - if (len < tolerance) - return (order); - else - return (GLint) (sqrt(len / tolerance) * (order + 2) + 1); -} - -static GLenum -calc_sampling_3D(new_ctrl_type * new_ctrl, GLfloat tolerance, GLint dim, - GLint uorder, GLint vorder, GLint ** ufactors, - GLint ** vfactors) -{ - GLfloat *ctrl; - GLint tmp_factor1, tmp_factor2; - GLint ufactor_cnt, vfactor_cnt; - GLint offset1, offset2, offset3; - GLint i, j; - - ufactor_cnt = new_ctrl->s_bezier_cnt; - vfactor_cnt = new_ctrl->t_bezier_cnt; - if ((*ufactors = (GLint *) malloc(sizeof(GLint) * ufactor_cnt * 3)) - == NULL) { - return GLU_OUT_OF_MEMORY; - } - if ((*vfactors = (GLint *) malloc(sizeof(GLint) * vfactor_cnt * 3)) - == NULL) { - free(*ufactors); - return GLU_OUT_OF_MEMORY; - } - ctrl = new_ctrl->geom_ctrl; - offset1 = new_ctrl->geom_t_stride * vorder; - offset2 = new_ctrl->geom_s_stride * uorder; - for (j = 0; j < vfactor_cnt; j++) { - *(*vfactors + j * 3 + 1) = tmp_factor1 = calc_factor(ctrl, vorder, - j * offset1, dim, - tolerance, dim); - /* loop ufactor_cnt-1 times */ - for (i = 1; i < ufactor_cnt; i++) { - tmp_factor2 = calc_factor(ctrl, vorder, - j * offset1 + i * offset2, dim, tolerance, - dim); - if (tmp_factor2 > tmp_factor1) - tmp_factor1 = tmp_factor2; - } - /* last time for the opposite edge */ - *(*vfactors + j * 3 + 2) = tmp_factor2 = calc_factor(ctrl, vorder, - j * offset1 + - i * offset2 - - new_ctrl-> - geom_s_stride, dim, - tolerance, dim); - if (tmp_factor2 > tmp_factor1) - *(*vfactors + j * 3) = tmp_factor2; - else - *(*vfactors + j * 3) = tmp_factor1; - } - offset3 = new_ctrl->geom_s_stride; - offset2 = new_ctrl->geom_s_stride * uorder; - for (j = 0; j < ufactor_cnt; j++) { - *(*ufactors + j * 3 + 1) = tmp_factor1 = calc_factor(ctrl, uorder, - j * offset2, - offset3, tolerance, - dim); - /* loop vfactor_cnt-1 times */ - for (i = 1; i < vfactor_cnt; i++) { - tmp_factor2 = calc_factor(ctrl, uorder, - j * offset2 + i * offset1, offset3, - tolerance, dim); - if (tmp_factor2 > tmp_factor1) - tmp_factor1 = tmp_factor2; - } - /* last time for the opposite edge */ - *(*ufactors + j * 3 + 2) = tmp_factor2 = calc_factor(ctrl, uorder, - j * offset2 + - i * offset1 - - new_ctrl-> - geom_t_stride, - offset3, tolerance, - dim); - if (tmp_factor2 > tmp_factor1) - *(*ufactors + j * 3) = tmp_factor2; - else - *(*ufactors + j * 3) = tmp_factor1; - } - return GL_NO_ERROR; -} - -static GLenum -calc_sampling_param_3D(new_ctrl_type * new_ctrl, GLfloat tolerance, GLint dim, - GLint uorder, GLint vorder, GLint ** ufactors, - GLint ** vfactors) -{ - GLfloat *ctrl; - GLint tmp_factor1, tmp_factor2; - GLint ufactor_cnt, vfactor_cnt; - GLint offset1, offset2, offset3; - GLint i, j; - - ufactor_cnt = new_ctrl->s_bezier_cnt; - vfactor_cnt = new_ctrl->t_bezier_cnt; - if ((*ufactors = (GLint *) malloc(sizeof(GLint) * ufactor_cnt * 3)) - == NULL) { - return GLU_OUT_OF_MEMORY; - } - if ((*vfactors = (GLint *) malloc(sizeof(GLint) * vfactor_cnt * 3)) - == NULL) { - free(*ufactors); - return GLU_OUT_OF_MEMORY; - } - ctrl = new_ctrl->geom_ctrl; - offset1 = new_ctrl->geom_t_stride * vorder; - offset2 = new_ctrl->geom_s_stride * uorder; - for (j = 0; j < vfactor_cnt; j++) { - *(*vfactors + j * 3 + 1) = tmp_factor1 = - calc_parametric_factor(ctrl, vorder, j * offset1, dim, tolerance, - dim); - /* loop ufactor_cnt-1 times */ - for (i = 1; i < ufactor_cnt; i++) { - tmp_factor2 = calc_parametric_factor(ctrl, vorder, - j * offset1 + i * offset2, dim, - tolerance, dim); - if (tmp_factor2 > tmp_factor1) - tmp_factor1 = tmp_factor2; - } - /* last time for the opposite edge */ - *(*vfactors + j * 3 + 2) = tmp_factor2 = - calc_parametric_factor(ctrl, vorder, - j * offset1 + i * offset2 - - new_ctrl->geom_s_stride, dim, tolerance, dim); - if (tmp_factor2 > tmp_factor1) - *(*vfactors + j * 3) = tmp_factor2; - else - *(*vfactors + j * 3) = tmp_factor1; - } - offset3 = new_ctrl->geom_s_stride; - offset2 = new_ctrl->geom_s_stride * uorder; - for (j = 0; j < ufactor_cnt; j++) { - *(*ufactors + j * 3 + 1) = tmp_factor1 = - calc_parametric_factor(ctrl, uorder, j * offset2, offset3, tolerance, - dim); - /* loop vfactor_cnt-1 times */ - for (i = 1; i < vfactor_cnt; i++) { - tmp_factor2 = calc_parametric_factor(ctrl, uorder, - j * offset2 + i * offset1, - offset3, tolerance, dim); - if (tmp_factor2 > tmp_factor1) - tmp_factor1 = tmp_factor2; - } - /* last time for the opposite edge */ - *(*ufactors + j * 3 + 2) = tmp_factor2 = - calc_parametric_factor(ctrl, uorder, - j * offset2 + i * offset1 - - new_ctrl->geom_t_stride, offset3, tolerance, - dim); - if (tmp_factor2 > tmp_factor1) - *(*ufactors + j * 3) = tmp_factor2; - else - *(*ufactors + j * 3) = tmp_factor1; - } - return GL_NO_ERROR; -} - -static GLenum -calc_sampling_2D(GLfloat * ctrl, GLint cnt, GLint order, - GLfloat tolerance, GLint dim, GLint ** factors) -{ - GLint factor_cnt; - GLint tmp_factor; - GLint offset; - GLint i; - - factor_cnt = cnt / order; - if ((*factors = (GLint *) malloc(sizeof(GLint) * factor_cnt)) == NULL) { - return GLU_OUT_OF_MEMORY; - } - offset = order * dim; - for (i = 0; i < factor_cnt; i++) { - tmp_factor = calc_factor(ctrl, order, i * offset, dim, tolerance, dim); - if (tmp_factor == 0) - (*factors)[i] = 1; - else - (*factors)[i] = tmp_factor; - } - return GL_NO_ERROR; -} - -static void -set_sampling_and_culling(GLUnurbsObj * nobj) -{ - if (nobj->auto_load_matrix == GL_FALSE) { - GLint i; - GLfloat m[4]; - - glPushAttrib((GLbitfield) (GL_VIEWPORT_BIT | GL_TRANSFORM_BIT)); - for (i = 0; i < 4; i++) - m[i] = nobj->sampling_matrices.viewport[i]; - glViewport(m[0], m[1], m[2], m[3]); - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glLoadMatrixf(nobj->sampling_matrices.proj); - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - glLoadMatrixf(nobj->sampling_matrices.model); - } -} - -static void -revert_sampling_and_culling(GLUnurbsObj * nobj) -{ - if (nobj->auto_load_matrix == GL_FALSE) { - glMatrixMode(GL_MODELVIEW); - glPopMatrix(); - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - glPopAttrib(); - } -} - -GLenum -glu_do_sampling_3D(GLUnurbsObj * nobj, new_ctrl_type * new_ctrl, - GLint ** sfactors, GLint ** tfactors) -{ - GLint dim; - GLenum err; - - *sfactors = NULL; - *tfactors = NULL; - dim = nobj->surface.geom.dim; - set_sampling_and_culling(nobj); - if ((err = calc_sampling_3D(new_ctrl, nobj->sampling_tolerance, dim, - nobj->surface.geom.sorder, - nobj->surface.geom.torder, sfactors, - tfactors)) == GLU_ERROR) { - revert_sampling_and_culling(nobj); - call_user_error(nobj, err); - return GLU_ERROR; - } - revert_sampling_and_culling(nobj); - return GLU_NO_ERROR; -} - -GLenum -glu_do_sampling_uv(GLUnurbsObj * nobj, new_ctrl_type * new_ctrl, - GLint ** sfactors, GLint ** tfactors) -{ - GLint s_cnt, t_cnt, i; - GLint u_steps, v_steps; - - s_cnt = new_ctrl->s_bezier_cnt; - t_cnt = new_ctrl->t_bezier_cnt; - *sfactors = NULL; - *tfactors = NULL; - if ((*sfactors = (GLint *) malloc(sizeof(GLint) * s_cnt * 3)) - == NULL) { - return GLU_OUT_OF_MEMORY; - } - if ((*tfactors = (GLint *) malloc(sizeof(GLint) * t_cnt * 3)) - == NULL) { - free(*sfactors); - return GLU_OUT_OF_MEMORY; - } - u_steps = nobj->u_step; - v_steps = nobj->v_step; - for (i = 0; i < s_cnt; i++) { - *(*sfactors + i * 3) = u_steps; - *(*sfactors + i * 3 + 1) = u_steps; - *(*sfactors + i * 3 + 2) = u_steps; - } - for (i = 0; i < t_cnt; i++) { - *(*tfactors + i * 3) = v_steps; - *(*tfactors + i * 3 + 1) = v_steps; - *(*tfactors + i * 3 + 2) = v_steps; - } - return GLU_NO_ERROR; -} - - -GLenum -glu_do_sampling_param_3D(GLUnurbsObj * nobj, new_ctrl_type * new_ctrl, - GLint ** sfactors, GLint ** tfactors) -{ - GLint dim; - GLenum err; - - *sfactors = NULL; - *tfactors = NULL; - dim = nobj->surface.geom.dim; - set_sampling_and_culling(nobj); - if ( - (err = - calc_sampling_param_3D(new_ctrl, nobj->parametric_tolerance, dim, - nobj->surface.geom.sorder, - nobj->surface.geom.torder, sfactors, - tfactors)) == GLU_ERROR) { - revert_sampling_and_culling(nobj); - call_user_error(nobj, err); - return GLU_ERROR; - } - revert_sampling_and_culling(nobj); - return GLU_NO_ERROR; -} - - -static GLenum -glu_do_sampling_2D(GLUnurbsObj * nobj, GLfloat * ctrl, GLint cnt, GLint order, - GLint dim, GLint ** factors) -{ - GLenum err; - - set_sampling_and_culling(nobj); - err = calc_sampling_2D(ctrl, cnt, order, nobj->sampling_tolerance, dim, - factors); - revert_sampling_and_culling(nobj); - return err; -} - - -static GLenum -glu_do_sampling_u(GLUnurbsObj * nobj, GLfloat * ctrl, GLint cnt, GLint order, - GLint dim, GLint ** factors) -{ - GLint i; - GLint u_steps; - - cnt /= order; - if ((*factors = (GLint *) malloc(sizeof(GLint) * cnt)) - == NULL) { - return GLU_OUT_OF_MEMORY; - } - u_steps = nobj->u_step; - for (i = 0; i < cnt; i++) - (*factors)[i] = u_steps; - return GLU_NO_ERROR; -} - - -static GLenum -glu_do_sampling_param_2D(GLUnurbsObj * nobj, GLfloat * ctrl, GLint cnt, - GLint order, GLint dim, GLint ** factors) -{ - GLint i; - GLint u_steps; - GLfloat tolerance; - - set_sampling_and_culling(nobj); - tolerance = nobj->parametric_tolerance; - cnt /= order; - if ((*factors = (GLint *) malloc(sizeof(GLint) * cnt)) - == NULL) { - revert_sampling_and_culling(nobj); - return GLU_OUT_OF_MEMORY; - } - u_steps = nobj->u_step; - for (i = 0; i < cnt; i++) { - (*factors)[i] = calc_parametric_factor(ctrl, order, 0, - dim, tolerance, dim); - - } - revert_sampling_and_culling(nobj); - return GLU_NO_ERROR; -} - -GLenum -glu_do_sampling_crv(GLUnurbsObj * nobj, GLfloat * ctrl, GLint cnt, - GLint order, GLint dim, GLint ** factors) -{ - GLenum err; - - *factors = NULL; - switch (nobj->sampling_method) { - case GLU_PATH_LENGTH: - if ((err = glu_do_sampling_2D(nobj, ctrl, cnt, order, dim, factors)) != - GLU_NO_ERROR) { - call_user_error(nobj, err); - return GLU_ERROR; - } - break; - case GLU_DOMAIN_DISTANCE: - if ((err = glu_do_sampling_u(nobj, ctrl, cnt, order, dim, factors)) != - GLU_NO_ERROR) { - call_user_error(nobj, err); - return GLU_ERROR; - } - break; - case GLU_PARAMETRIC_ERROR: - if ( - (err = - glu_do_sampling_param_2D(nobj, ctrl, cnt, order, dim, - factors)) != GLU_NO_ERROR) { - call_user_error(nobj, err); - return GLU_ERROR; - } - break; - default: - abort(); - } - - return GLU_NO_ERROR; -} - -/* TODO - i don't like this culling - this one just tests if at least one */ -/* ctrl point lies within the viewport . Also the point_in_viewport() */ -/* should be included in the fnctions for efficiency reasons */ - -static GLboolean -point_in_viewport(GLfloat * pt, GLint dim) -{ - GLdouble model[16], proj[16]; - GLint viewport[4]; - GLdouble x, y, z, w, winx, winy, winz; - - glGetDoublev(GL_MODELVIEW_MATRIX, model); - glGetDoublev(GL_PROJECTION_MATRIX, proj); - glGetIntegerv(GL_VIEWPORT, viewport); - if (dim == 3) { - x = (GLdouble) pt[0]; - y = (GLdouble) pt[1]; - z = (GLdouble) pt[2]; - gluProject(x, y, z, model, proj, viewport, &winx, &winy, &winz); - } - else { - w = (GLdouble) pt[3]; - x = (GLdouble) pt[0] / w; - y = (GLdouble) pt[1] / w; - z = (GLdouble) pt[2] / w; - gluProject(x, y, z, model, proj, viewport, &winx, &winy, &winz); - } - if ((GLint) winx >= viewport[0] && (GLint) winx < viewport[2] && - (GLint) winy >= viewport[1] && (GLint) winy < viewport[3]) - return GL_TRUE; - return GL_FALSE; -} - -GLboolean -fine_culling_test_3D(GLUnurbsObj * nobj, GLfloat * pts, GLint s_cnt, - GLint t_cnt, GLint s_stride, GLint t_stride, GLint dim) -{ - GLint i, j; - - if (nobj->culling == GL_FALSE) - return GL_FALSE; - set_sampling_and_culling(nobj); - - if (dim == 3) { - for (i = 0; i < s_cnt; i++) - for (j = 0; j < t_cnt; j++) - if (point_in_viewport(pts + i * s_stride + j * t_stride, dim)) { - revert_sampling_and_culling(nobj); - return GL_FALSE; - } - } - else { - for (i = 0; i < s_cnt; i++) - for (j = 0; j < t_cnt; j++) - if (point_in_viewport(pts + i * s_stride + j * t_stride, dim)) { - revert_sampling_and_culling(nobj); - return GL_FALSE; - } - } - revert_sampling_and_culling(nobj); - return GL_TRUE; -} - -/*GLboolean -fine_culling_test_3D(GLUnurbsObj *nobj,GLfloat *pts,GLint s_cnt,GLint t_cnt, - GLint s_stride,GLint t_stride, GLint dim) -{ - GLint visible_cnt; - GLfloat feedback_buffer[5]; - GLsizei buffer_size; - GLint i,j; - - if(nobj->culling==GL_FALSE) - return GL_FALSE; - buffer_size=5; - set_sampling_and_culling(nobj); - - glFeedbackBuffer(buffer_size,GL_2D,feedback_buffer); - glRenderMode(GL_FEEDBACK); - if(dim==3) - { - for(i=0;iculling == GL_FALSE) - return GL_FALSE; - set_sampling_and_culling(nobj); - - if (dim == 3) { - for (i = 0; i < cnt; i++) - if (point_in_viewport(pts + i * stride, dim)) { - revert_sampling_and_culling(nobj); - return GL_FALSE; - } - } - else { - for (i = 0; i < cnt; i++) - if (point_in_viewport(pts + i * stride, dim)) { - revert_sampling_and_culling(nobj); - return GL_FALSE; - } - } - revert_sampling_and_culling(nobj); - return GL_TRUE; -} - -/*GLboolean -fine_culling_test_2D(GLUnurbsObj *nobj,GLfloat *pts,GLint cnt, - GLint stride, GLint dim) -{ - GLint visible_cnt; - GLfloat feedback_buffer[5]; - GLsizei buffer_size; - GLint i; - - if(nobj->culling==GL_FALSE) - return GL_FALSE; - buffer_size=5; - set_sampling_and_culling(nobj); - - glFeedbackBuffer(buffer_size,GL_2D,feedback_buffer); - glRenderMode(GL_FEEDBACK); - glBegin(GL_LINE_LOOP); - if(dim==3) - { - for(i=0;i -#include -#include "gluP.h" -#include "tess.h" -#endif - - - -static GLenum store_polygon_as_contour(GLUtriangulatorObj *); -static void free_current_polygon(tess_polygon *); -static void prepare_projection_info(GLUtriangulatorObj *); -static GLdouble twice_the_polygon_area(tess_vertex *, tess_vertex *); -static GLenum verify_edge_vertex_intersections(GLUtriangulatorObj *); -void tess_find_contour_hierarchies(GLUtriangulatorObj *); -static GLenum test_for_overlapping_contours(GLUtriangulatorObj *); -static GLenum contours_overlap(tess_contour *, tess_polygon *); -static GLenum is_contour_contained_in(tess_contour *, tess_contour *); -static void add_new_exterior(GLUtriangulatorObj *, tess_contour *); -static void add_new_interior(GLUtriangulatorObj *, tess_contour *, - tess_contour *); -static void add_interior_with_hierarchy_check(GLUtriangulatorObj *, - tess_contour *, tess_contour *); -static void reverse_hierarchy_and_add_exterior(GLUtriangulatorObj *, - tess_contour *, - tess_contour *); -static GLboolean point_in_polygon(tess_contour *, GLdouble, GLdouble); -static void shift_interior_to_exterior(GLUtriangulatorObj *, tess_contour *); -static void add_exterior_with_check(GLUtriangulatorObj *, tess_contour *, - tess_contour *); -static GLenum cut_out_hole(GLUtriangulatorObj *, tess_contour *, - tess_contour *); -static GLenum merge_hole_with_contour(GLUtriangulatorObj *, - tess_contour *, tess_contour *, - tess_vertex *, tess_vertex *); - -static GLenum -find_normal(GLUtriangulatorObj * tobj) -{ - tess_polygon *polygon = tobj->current_polygon; - tess_vertex *va, *vb, *vc; - GLdouble A, B, C; - GLdouble A0, A1, A2, B0, B1, B2; - - va = polygon->vertices; - vb = va->next; - A0 = vb->location[0] - va->location[0]; - A1 = vb->location[1] - va->location[1]; - A2 = vb->location[2] - va->location[2]; - for (vc = vb->next; vc != va; vc = vc->next) { - B0 = vc->location[0] - va->location[0]; - B1 = vc->location[1] - va->location[1]; - B2 = vc->location[2] - va->location[2]; - A = A1 * B2 - A2 * B1; - B = A2 * B0 - A0 * B2; - C = A0 * B1 - A1 * B0; - if (fabs(A) > EPSILON || fabs(B) > EPSILON || fabs(C) > EPSILON) { - polygon->A = A; - polygon->B = B; - polygon->C = C; - polygon->D = - -A * va->location[0] - B * va->location[1] - C * va->location[2]; - return GLU_NO_ERROR; - } - } - tess_call_user_error(tobj, GLU_TESS_ERROR7); - return GLU_ERROR; -} - -void -tess_test_polygon(GLUtriangulatorObj * tobj) -{ - tess_polygon *polygon = tobj->current_polygon; - - /* any vertices defined? */ - if (polygon->vertex_cnt < 3) { - free_current_polygon(polygon); - return; - } - /* wrap pointers */ - polygon->last_vertex->next = polygon->vertices; - polygon->vertices->previous = polygon->last_vertex; - /* determine the normal */ - if (find_normal(tobj) == GLU_ERROR) - return; - /* compare the normals of previously defined contours and this one */ - /* first contour define ? */ - if (tobj->contours == NULL) { - tobj->A = polygon->A; - tobj->B = polygon->B; - tobj->C = polygon->C; - tobj->D = polygon->D; - /* determine the best projection to use */ - if (fabs(polygon->A) > fabs(polygon->B)) - if (fabs(polygon->A) > fabs(polygon->C)) - tobj->projection = OYZ; - else - tobj->projection = OXY; - else if (fabs(polygon->B) > fabs(polygon->C)) - tobj->projection = OXZ; - else - tobj->projection = OXY; - } - else { - GLdouble a[3], b[3]; - tess_vertex *vertex = polygon->vertices; - - a[0] = tobj->A; - a[1] = tobj->B; - a[2] = tobj->C; - b[0] = polygon->A; - b[1] = polygon->B; - b[2] = polygon->C; - - /* compare the normals */ - if (fabs(a[1] * b[2] - a[2] * b[1]) > EPSILON || - fabs(a[2] * b[0] - a[0] * b[2]) > EPSILON || - fabs(a[0] * b[1] - a[1] * b[0]) > EPSILON) { - /* not coplanar */ - tess_call_user_error(tobj, GLU_TESS_ERROR9); - return; - } - /* the normals are parallel - test for plane equation */ - if (fabs(a[0] * vertex->location[0] + a[1] * vertex->location[1] + - a[2] * vertex->location[2] + tobj->D) > EPSILON) { - /* not the same plane */ - tess_call_user_error(tobj, GLU_TESS_ERROR9); - return; - } - } - prepare_projection_info(tobj); - if (verify_edge_vertex_intersections(tobj) == GLU_ERROR) - return; - if (test_for_overlapping_contours(tobj) == GLU_ERROR) - return; - if (store_polygon_as_contour(tobj) == GLU_ERROR) - return; -} - -static GLenum -test_for_overlapping_contours(GLUtriangulatorObj * tobj) -{ - tess_contour *contour; - tess_polygon *polygon; - - polygon = tobj->current_polygon; - for (contour = tobj->contours; contour != NULL; contour = contour->next) - if (contours_overlap(contour, polygon) != GLU_NO_ERROR) { - tess_call_user_error(tobj, GLU_TESS_ERROR5); - return GLU_ERROR; - } - return GLU_NO_ERROR; -} - -static GLenum -store_polygon_as_contour(GLUtriangulatorObj * tobj) -{ - tess_polygon *polygon = tobj->current_polygon; - tess_contour *contour = tobj->contours; - - /* the first contour defined */ - if (contour == NULL) { - if ((contour = (tess_contour *) malloc(sizeof(tess_contour))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - free_current_polygon(polygon); - return GLU_ERROR; - } - tobj->contours = tobj->last_contour = contour; - contour->next = contour->previous = NULL; - } - else { - if ((contour = (tess_contour *) malloc(sizeof(tess_contour))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - free_current_polygon(polygon); - return GLU_ERROR; - } - contour->previous = tobj->last_contour; - tobj->last_contour->next = contour; - tobj->last_contour = contour; - contour->next = NULL; - } - /* mark all vertices in new contour as not special */ - /* and all are boundary edges */ - { - tess_vertex *vertex; - GLuint vertex_cnt, i; - - for (vertex = polygon->vertices, i = 0, vertex_cnt = - polygon->vertex_cnt; i < vertex_cnt; vertex = vertex->next, i++) { - vertex->shadow_vertex = NULL; - vertex->edge_flag = GL_TRUE; - } - } - contour->vertex_cnt = polygon->vertex_cnt; - contour->area = polygon->area; - contour->orientation = polygon->orientation; - contour->type = GLU_UNKNOWN; - contour->vertices = polygon->vertices; - contour->last_vertex = polygon->last_vertex; - polygon->vertices = polygon->last_vertex = NULL; - polygon->vertex_cnt = 0; - ++(tobj->contour_cnt); - return GLU_NO_ERROR; -} - -static void -free_current_polygon(tess_polygon * polygon) -{ - tess_vertex *vertex, *vertex_tmp; - GLuint i; - - /* free current_polygon structures */ - for (vertex = polygon->vertices, i = 0; i < polygon->vertex_cnt; i++) { - vertex_tmp = vertex->next; - free(vertex); - vertex = vertex_tmp; - } - polygon->vertices = polygon->last_vertex = NULL; - polygon->vertex_cnt = 0; -} - -static void -prepare_projection_info(GLUtriangulatorObj * tobj) -{ - tess_polygon *polygon = tobj->current_polygon; - tess_vertex *vertex, *last_vertex_ptr; - GLdouble area; - - last_vertex_ptr = polygon->last_vertex; - switch (tobj->projection) { - case OXY: - for (vertex = polygon->vertices; vertex != last_vertex_ptr; - vertex = vertex->next) { - vertex->x = vertex->location[0]; - vertex->y = vertex->location[1]; - } - last_vertex_ptr->x = last_vertex_ptr->location[0]; - last_vertex_ptr->y = last_vertex_ptr->location[1]; - break; - case OXZ: - for (vertex = polygon->vertices; vertex != last_vertex_ptr; - vertex = vertex->next) { - vertex->x = vertex->location[0]; - vertex->y = vertex->location[2]; - } - last_vertex_ptr->x = last_vertex_ptr->location[0]; - last_vertex_ptr->y = last_vertex_ptr->location[2]; - break; - case OYZ: - for (vertex = polygon->vertices; vertex != last_vertex_ptr; - vertex = vertex->next) { - vertex->x = vertex->location[1]; - vertex->y = vertex->location[2]; - } - last_vertex_ptr->x = last_vertex_ptr->location[1]; - last_vertex_ptr->y = last_vertex_ptr->location[2]; - break; - } - area = twice_the_polygon_area(polygon->vertices, polygon->last_vertex); - if (area >= 0.0) { - polygon->orientation = GLU_CCW; - polygon->area = area; - } - else { - polygon->orientation = GLU_CW; - polygon->area = -area; - } -} - -static GLdouble -twice_the_polygon_area(tess_vertex * vertex, tess_vertex * last_vertex) -{ - tess_vertex *next; - GLdouble area, x, y; - - area = 0.0; - x = vertex->x; - y = vertex->y; - vertex = vertex->next; - for (; vertex != last_vertex; vertex = vertex->next) { - next = vertex->next; - area += - (vertex->x - x) * (next->y - y) - (vertex->y - y) * (next->x - x); - } - return area; -} - -/* test if edges ab and cd intersect */ -/* if not return GLU_NO_ERROR, else if cross return GLU_TESS_ERROR8, */ -/* else if adjacent return GLU_TESS_ERROR4 */ -static GLenum -edge_edge_intersect(tess_vertex * a, - tess_vertex * b, tess_vertex * c, tess_vertex * d) -{ - GLdouble denom, r, s; - GLdouble xba, ydc, yba, xdc, yac, xac; - - xba = b->x - a->x; - yba = b->y - a->y; - xdc = d->x - c->x; - ydc = d->y - c->y; - xac = a->x - c->x; - yac = a->y - c->y; - denom = xba * ydc - yba * xdc; - r = yac * xdc - xac * ydc; - /* parallel? */ - if (fabs(denom) < EPSILON) { - if (fabs(r) < EPSILON) { - /* colinear */ - if (fabs(xba) < EPSILON) { - /* compare the Y coordinate */ - if (yba > 0.0) { - if ( - (fabs(a->y - c->y) < EPSILON - && fabs(c->y - b->y) < EPSILON) - || (fabs(a->y - d->y) < EPSILON - && fabs(d->y - b->y) < - EPSILON)) return GLU_TESS_ERROR4; - - } - else { - if ( - (fabs(b->y - c->y) < EPSILON - && fabs(c->y - a->y) < EPSILON) - || (fabs(b->y - d->y) < EPSILON - && fabs(d->y - a->y) < - EPSILON)) return GLU_TESS_ERROR4; - } - } - else { - /* compare the X coordinate */ - if (xba > 0.0) { - if ( - (fabs(a->x - c->x) < EPSILON - && fabs(c->x - b->x) < EPSILON) - || (fabs(a->x - d->x) < EPSILON - && fabs(d->x - b->x) < - EPSILON)) return GLU_TESS_ERROR4; - } - else { - if ( - (fabs(b->x - c->x) < EPSILON - && fabs(c->x - a->x) < EPSILON) - || (fabs(b->x - d->x) < EPSILON - && fabs(d->x - a->x) < - EPSILON)) return GLU_TESS_ERROR4; - } - } - } - return GLU_NO_ERROR; - } - r /= denom; - s = (yac * xba - xac * yba) / denom; - /* test if one vertex lies on other edge */ - if (((fabs(r) < EPSILON || (r < 1.0 + EPSILON && r > 1.0 - EPSILON)) && - s > -EPSILON && s < 1.0 + EPSILON) || - ((fabs(s) < EPSILON || (s < 1.0 + EPSILON && s > 1.0 - EPSILON)) && - r > -EPSILON && r < 1.0 + EPSILON)) { - return GLU_TESS_ERROR4; - } - /* test for crossing */ - if (r > -EPSILON && r < 1.0 + EPSILON && s > -EPSILON && s < 1.0 + EPSILON) { - return GLU_TESS_ERROR8; - } - return GLU_NO_ERROR; -} - -static GLenum -verify_edge_vertex_intersections(GLUtriangulatorObj * tobj) -{ - tess_polygon *polygon = tobj->current_polygon; - tess_vertex *vertex1, *last_vertex, *vertex2; - GLenum test; - - last_vertex = polygon->last_vertex; - vertex1 = last_vertex; - for (vertex2 = vertex1->next->next; - vertex2->next != last_vertex; vertex2 = vertex2->next) { - test = edge_edge_intersect(vertex1, vertex1->next, vertex2, - vertex2->next); - if (test != GLU_NO_ERROR) { - tess_call_user_error(tobj, test); - return GLU_ERROR; - } - } - for (vertex1 = polygon->vertices; - vertex1->next->next != last_vertex; vertex1 = vertex1->next) { - for (vertex2 = vertex1->next->next; - vertex2 != last_vertex; vertex2 = vertex2->next) { - test = edge_edge_intersect(vertex1, vertex1->next, vertex2, - vertex2->next); - if (test != GLU_NO_ERROR) { - tess_call_user_error(tobj, test); - return GLU_ERROR; - } - } - } - return GLU_NO_ERROR; -} - -static int -#ifdef WIN32 - __cdecl -#endif -area_compare(const void *a, const void *b) -{ - GLdouble area1, area2; - - area1 = (*((tess_contour **) a))->area; - area2 = (*((tess_contour **) b))->area; - if (area1 < area2) - return 1; - if (area1 > area2) - return -1; - return 0; -} - -void -tess_find_contour_hierarchies(GLUtriangulatorObj * tobj) -{ - tess_contour **contours; /* dinamic array of pointers */ - tess_contour *tmp_contour_ptr = tobj->contours; - GLuint cnt, i; - GLenum result; - GLboolean hierarchy_changed; - - /* any contours? */ - if (tobj->contour_cnt < 2) { - tobj->contours->type = GLU_EXTERIOR; - return; - } - if ((contours = (tess_contour **) - malloc(sizeof(tess_contour *) * (tobj->contour_cnt))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - return; - } - for (tmp_contour_ptr = tobj->contours, cnt = 0; - tmp_contour_ptr != NULL; tmp_contour_ptr = tmp_contour_ptr->next) - contours[cnt++] = tmp_contour_ptr; - /* now sort the contours in decreasing area size order */ - qsort((void *) contours, (size_t) cnt, (size_t) sizeof(tess_contour *), - area_compare); - /* we leave just the first contour - remove others from list */ - tobj->contours = contours[0]; - tobj->contours->next = tobj->contours->previous = NULL; - tobj->last_contour = tobj->contours; - tobj->contour_cnt = 1; - /* first contour is the one with greatest area */ - /* must be EXTERIOR */ - tobj->contours->type = GLU_EXTERIOR; - tmp_contour_ptr = tobj->contours; - /* now we play! */ - for (i = 1; i < cnt; i++) { - hierarchy_changed = GL_FALSE; - for (tmp_contour_ptr = tobj->contours; - tmp_contour_ptr != NULL; tmp_contour_ptr = tmp_contour_ptr->next) { - if (tmp_contour_ptr->type == GLU_EXTERIOR) { - /* check if contour completely contained in EXTERIOR */ - result = is_contour_contained_in(tmp_contour_ptr, contours[i]); - switch (result) { - case GLU_INTERIOR: - /* now we have to check if contour is inside interiors */ - /* or not */ - /* any interiors? */ - if (tmp_contour_ptr->next != NULL && - tmp_contour_ptr->next->type == GLU_INTERIOR) { - /* for all interior, check if inside any of them */ - /* if not inside any of interiors, its another */ - /* interior */ - /* or it may contain some interiors, then change */ - /* the contained interiors to exterior ones */ - add_interior_with_hierarchy_check(tobj, - tmp_contour_ptr, - contours[i]); - } - else { - /* not in interior, add as new interior contour */ - add_new_interior(tobj, tmp_contour_ptr, contours[i]); - } - hierarchy_changed = GL_TRUE; - break; - case GLU_EXTERIOR: - /* ooops, the marked as EXTERIOR (contours[i]) is */ - /* actually an interior of tmp_contour_ptr */ - /* reverse the local hierarchy */ - reverse_hierarchy_and_add_exterior(tobj, tmp_contour_ptr, - contours[i]); - hierarchy_changed = GL_TRUE; - break; - case GLU_NO_ERROR: - break; - default: - abort(); - } - } - if (hierarchy_changed) - break; /* break from for loop */ - } - if (hierarchy_changed == GL_FALSE) { - /* disjoint with all contours, add to contour list */ - add_new_exterior(tobj, contours[i]); - } - } - free(contours); -} - -/* returns GLU_INTERIOR if inner is completey enclosed within outer */ -/* returns GLU_EXTERIOR if outer is completely enclosed within inner */ -/* returns GLU_NO_ERROR if contours are disjoint */ -static GLenum -is_contour_contained_in(tess_contour * outer, tess_contour * inner) -{ - GLenum relation_flag; - - /* set relation_flag to relation of containment of first inner vertex */ - /* regarding outer contour */ - if (point_in_polygon(outer, inner->vertices->x, inner->vertices->y)) - relation_flag = GLU_INTERIOR; - else - relation_flag = GLU_EXTERIOR; - if (relation_flag == GLU_INTERIOR) - return GLU_INTERIOR; - if (point_in_polygon(inner, outer->vertices->x, outer->vertices->y)) - return GLU_EXTERIOR; - return GLU_NO_ERROR; -} - -static GLboolean -point_in_polygon(tess_contour * contour, GLdouble x, GLdouble y) -{ - tess_vertex *v1, *v2; - GLuint i, vertex_cnt; - GLdouble xp1, yp1, xp2, yp2; - GLboolean tst; - - tst = GL_FALSE; - v1 = contour->vertices; - v2 = contour->vertices->previous; - for (i = 0, vertex_cnt = contour->vertex_cnt; i < vertex_cnt; i++) { - xp1 = v1->x; - yp1 = v1->y; - xp2 = v2->x; - yp2 = v2->y; - if ((((yp1 <= y) && (y < yp2)) || ((yp2 <= y) && (y < yp1))) && - (x < (xp2 - xp1) * (y - yp1) / (yp2 - yp1) + xp1)) - tst = (tst == GL_FALSE ? GL_TRUE : GL_FALSE); - v2 = v1; - v1 = v1->next; - } - return tst; -} - -static GLenum -contours_overlap(tess_contour * contour, tess_polygon * polygon) -{ - tess_vertex *vertex1, *vertex2; - GLuint vertex1_cnt, vertex2_cnt, i, j; - GLenum test; - - vertex1 = contour->vertices; - vertex2 = polygon->vertices; - vertex1_cnt = contour->vertex_cnt; - vertex2_cnt = polygon->vertex_cnt; - for (i = 0; i < vertex1_cnt; vertex1 = vertex1->next, i++) { - for (j = 0; j < vertex2_cnt; vertex2 = vertex2->next, j++) - if ((test = edge_edge_intersect(vertex1, vertex1->next, vertex2, - vertex2->next)) != GLU_NO_ERROR) - return test; - } - return GLU_NO_ERROR; -} - -static void -add_new_exterior(GLUtriangulatorObj * tobj, tess_contour * contour) -{ - contour->type = GLU_EXTERIOR; - contour->next = NULL; - contour->previous = tobj->last_contour; - tobj->last_contour->next = contour; - tobj->last_contour = contour; -} - -static void -add_new_interior(GLUtriangulatorObj * tobj, - tess_contour * outer, tess_contour * contour) -{ - contour->type = GLU_INTERIOR; - contour->next = outer->next; - contour->previous = outer; - if (outer->next != NULL) - outer->next->previous = contour; - outer->next = contour; - if (tobj->last_contour == outer) - tobj->last_contour = contour; -} - -static void -add_interior_with_hierarchy_check(GLUtriangulatorObj * tobj, - tess_contour * outer, - tess_contour * contour) -{ - tess_contour *ptr; - - /* for all interiors of outer check if they are interior of contour */ - /* if so, change that interior to exterior and move it of of the */ - /* interior sequence */ - if (outer->next != NULL && outer->next->type == GLU_INTERIOR) { - GLenum test; - - for (ptr = outer->next; ptr != NULL && ptr->type == GLU_INTERIOR; - ptr = ptr->next) { - test = is_contour_contained_in(ptr, contour); - switch (test) { - case GLU_INTERIOR: - /* contour is contained in one of the interiors */ - /* check if possibly contained in other exteriors */ - /* move ptr to first EXTERIOR */ - for (; ptr != NULL && ptr->type == GLU_INTERIOR; ptr = ptr->next); - if (ptr == NULL) - /* another exterior */ - add_new_exterior(tobj, contour); - else - add_exterior_with_check(tobj, ptr, contour); - return; - case GLU_EXTERIOR: - /* one of the interiors is contained in the contour */ - /* change it to EXTERIOR, and shift it away from the */ - /* interior sequence */ - shift_interior_to_exterior(tobj, ptr); - break; - case GLU_NO_ERROR: - /* disjoint */ - break; - default: - abort(); - } - } - } - /* add contour to the interior sequence */ - add_new_interior(tobj, outer, contour); -} - -static void -reverse_hierarchy_and_add_exterior(GLUtriangulatorObj * tobj, - tess_contour * outer, - tess_contour * contour) -{ - tess_contour *ptr; - - /* reverse INTERIORS to EXTERIORS */ - /* any INTERIORS? */ - if (outer->next != NULL && outer->next->type == GLU_INTERIOR) - for (ptr = outer->next; ptr != NULL && ptr->type == GLU_INTERIOR; - ptr = ptr->next) ptr->type = GLU_EXTERIOR; - /* the outer now becomes inner */ - outer->type = GLU_INTERIOR; - /* contour is the EXTERIOR */ - contour->next = outer; - if (tobj->contours == outer) { - /* first contour beeing reversed */ - contour->previous = NULL; - tobj->contours = contour; - } - else { - outer->previous->next = contour; - contour->previous = outer->previous; - } - outer->previous = contour; -} - -static void -shift_interior_to_exterior(GLUtriangulatorObj * tobj, tess_contour * contour) -{ - contour->previous->next = contour->next; - if (contour->next != NULL) - contour->next->previous = contour->previous; - else - tobj->last_contour = contour->previous; -} - -static void -add_exterior_with_check(GLUtriangulatorObj * tobj, - tess_contour * outer, tess_contour * contour) -{ - GLenum test; - - /* this contour might be interior to further exteriors - check */ - /* if not, just add as a new exterior */ - for (; outer != NULL && outer->type == GLU_EXTERIOR; outer = outer->next) { - test = is_contour_contained_in(outer, contour); - switch (test) { - case GLU_INTERIOR: - /* now we have to check if contour is inside interiors */ - /* or not */ - /* any interiors? */ - if (outer->next != NULL && outer->next->type == GLU_INTERIOR) { - /* for all interior, check if inside any of them */ - /* if not inside any of interiors, its another */ - /* interior */ - /* or it may contain some interiors, then change */ - /* the contained interiors to exterior ones */ - add_interior_with_hierarchy_check(tobj, outer, contour); - } - else { - /* not in interior, add as new interior contour */ - add_new_interior(tobj, outer, contour); - } - return; - case GLU_NO_ERROR: - /* disjoint */ - break; - default: - abort(); - } - } - /* add contour to the exterior sequence */ - add_new_exterior(tobj, contour); -} - -void -tess_handle_holes(GLUtriangulatorObj * tobj) -{ - tess_contour *contour, *hole; - GLenum exterior_orientation; - - /* verify hole orientation */ - for (contour = tobj->contours; contour != NULL;) { - exterior_orientation = contour->orientation; - for (contour = contour->next; - contour != NULL && contour->type == GLU_INTERIOR; - contour = contour->next) { - if (contour->orientation == exterior_orientation) { - tess_call_user_error(tobj, GLU_TESS_ERROR5); - return; - } - } - } - /* now cut-out holes */ - for (contour = tobj->contours; contour != NULL;) { - hole = contour->next; - while (hole != NULL && hole->type == GLU_INTERIOR) { - if (cut_out_hole(tobj, contour, hole) == GLU_ERROR) - return; - hole = contour->next; - } - contour = contour->next; - } -} - -static GLenum -cut_out_hole(GLUtriangulatorObj * tobj, - tess_contour * contour, tess_contour * hole) -{ - tess_contour *tmp_hole; - tess_vertex *v1, *v2, *tmp_vertex; - GLuint vertex1_cnt, vertex2_cnt, tmp_vertex_cnt; - GLuint i, j, k; - GLenum test = 0; - - /* find an edge connecting contour and hole not intersecting any other */ - /* edge belonging to either the contour or any of the other holes */ - for (v1 = contour->vertices, vertex1_cnt = contour->vertex_cnt, i = 0; - i < vertex1_cnt; i++, v1 = v1->next) { - for (v2 = hole->vertices, vertex2_cnt = hole->vertex_cnt, j = 0; - j < vertex2_cnt; j++, v2 = v2->next) { - /* does edge (v1,v2) intersect any edge of contour */ - for (tmp_vertex = contour->vertices, tmp_vertex_cnt = - contour->vertex_cnt, k = 0; k < tmp_vertex_cnt; - tmp_vertex = tmp_vertex->next, k++) { - /* skip edge tests for edges directly connected */ - if (v1 == tmp_vertex || v1 == tmp_vertex->next) - continue; - test = edge_edge_intersect(v1, v2, tmp_vertex, tmp_vertex->next); - if (test != GLU_NO_ERROR) - break; - } - if (test == GLU_NO_ERROR) { - /* does edge (v1,v2) intersect any edge of hole */ - for (tmp_vertex = hole->vertices, - tmp_vertex_cnt = hole->vertex_cnt, k = 0; - k < tmp_vertex_cnt; tmp_vertex = tmp_vertex->next, k++) { - /* skip edge tests for edges directly connected */ - if (v2 == tmp_vertex || v2 == tmp_vertex->next) - continue; - test = - edge_edge_intersect(v1, v2, tmp_vertex, tmp_vertex->next); - if (test != GLU_NO_ERROR) - break; - } - if (test == GLU_NO_ERROR) { - /* does edge (v1,v2) intersect any other hole? */ - for (tmp_hole = hole->next; - tmp_hole != NULL && tmp_hole->type == GLU_INTERIOR; - tmp_hole = tmp_hole->next) { - /* does edge (v1,v2) intersect any edge of hole */ - for (tmp_vertex = tmp_hole->vertices, - tmp_vertex_cnt = tmp_hole->vertex_cnt, k = 0; - k < tmp_vertex_cnt; tmp_vertex = tmp_vertex->next, k++) { - test = edge_edge_intersect(v1, v2, tmp_vertex, - tmp_vertex->next); - if (test != GLU_NO_ERROR) - break; - } - if (test != GLU_NO_ERROR) - break; - } - } - } - if (test == GLU_NO_ERROR) { - /* edge (v1,v2) is good for eliminating the hole */ - if (merge_hole_with_contour(tobj, contour, hole, v1, v2) - == GLU_NO_ERROR) - return GLU_NO_ERROR; - else - return GLU_ERROR; - } - } - } - /* other holes are blocking all possible connections of hole */ - /* with contour, we shift this hole as the last hole and retry */ - for (tmp_hole = hole; - tmp_hole != NULL && tmp_hole->type == GLU_INTERIOR; - tmp_hole = tmp_hole->next); - contour->next = hole->next; - hole->next->previous = contour; - if (tmp_hole == NULL) { - /* last EXTERIOR contour, shift hole as last contour */ - hole->next = NULL; - hole->previous = tobj->last_contour; - tobj->last_contour->next = hole; - tobj->last_contour = hole; - } - else { - tmp_hole->previous->next = hole; - hole->previous = tmp_hole->previous; - tmp_hole->previous = hole; - hole->next = tmp_hole; - } - hole = contour->next; - /* try once again - recurse */ - return cut_out_hole(tobj, contour, hole); -} - -static GLenum -merge_hole_with_contour(GLUtriangulatorObj * tobj, - tess_contour * contour, - tess_contour * hole, - tess_vertex * v1, tess_vertex * v2) -{ - tess_vertex *v1_new, *v2_new; - - /* make copies of v1 and v2, place them respectively after their originals */ - if ((v1_new = (tess_vertex *) malloc(sizeof(tess_vertex))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - return GLU_ERROR; - } - if ((v2_new = (tess_vertex *) malloc(sizeof(tess_vertex))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - return GLU_ERROR; - } - v1_new->edge_flag = GL_TRUE; - v1_new->data = v1->data; - v1_new->location[0] = v1->location[0]; - v1_new->location[1] = v1->location[1]; - v1_new->location[2] = v1->location[2]; - v1_new->x = v1->x; - v1_new->y = v1->y; - v1_new->shadow_vertex = v1; - v1->shadow_vertex = v1_new; - v1_new->next = v1->next; - v1_new->previous = v1; - v1->next->previous = v1_new; - v1->next = v1_new; - v2_new->edge_flag = GL_TRUE; - v2_new->data = v2->data; - v2_new->location[0] = v2->location[0]; - v2_new->location[1] = v2->location[1]; - v2_new->location[2] = v2->location[2]; - v2_new->x = v2->x; - v2_new->y = v2->y; - v2_new->shadow_vertex = v2; - v2->shadow_vertex = v2_new; - v2_new->next = v2->next; - v2_new->previous = v2; - v2->next->previous = v2_new; - v2->next = v2_new; - /* link together the two lists */ - v1->next = v2_new; - v2_new->previous = v1; - v2->next = v1_new; - v1_new->previous = v2; - /* update the vertex count of the contour */ - contour->vertex_cnt += hole->vertex_cnt + 2; - /* remove the INTERIOR contour */ - contour->next = hole->next; - if (hole->next != NULL) - hole->next->previous = contour; - free(hole); - /* update tobj structure */ - --(tobj->contour_cnt); - if (contour->last_vertex == v1) - contour->last_vertex = v1_new; - /* mark two vertices with edge_flag */ - v2->edge_flag = GL_FALSE; - v1->edge_flag = GL_FALSE; - return GLU_NO_ERROR; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/project.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/project.c deleted file mode 100644 index 6fa03267e5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/project.c +++ /dev/null @@ -1,401 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include -#include "gluP.h" -#endif - - -/* - * This code was contributed by Marc Buffat (buffat@mecaflu.ec-lyon.fr). - * Thanks Marc!!! - */ - - - -/* implementation de gluProject et gluUnproject */ -/* M. Buffat 17/2/95 */ - - - -/* - * Transform a point (column vector) by a 4x4 matrix. I.e. out = m * in - * Input: m - the 4x4 matrix - * in - the 4x1 vector - * Output: out - the resulting 4x1 vector. - */ -static void -transform_point(GLdouble out[4], const GLdouble m[16], const GLdouble in[4]) -{ -#define M(row,col) m[col*4+row] - out[0] = - M(0, 0) * in[0] + M(0, 1) * in[1] + M(0, 2) * in[2] + M(0, 3) * in[3]; - out[1] = - M(1, 0) * in[0] + M(1, 1) * in[1] + M(1, 2) * in[2] + M(1, 3) * in[3]; - out[2] = - M(2, 0) * in[0] + M(2, 1) * in[1] + M(2, 2) * in[2] + M(2, 3) * in[3]; - out[3] = - M(3, 0) * in[0] + M(3, 1) * in[1] + M(3, 2) * in[2] + M(3, 3) * in[3]; -#undef M -} - - - - -/* - * Perform a 4x4 matrix multiplication (product = a x b). - * Input: a, b - matrices to multiply - * Output: product - product of a and b - */ -static void -matmul(GLdouble * product, const GLdouble * a, const GLdouble * b) -{ - /* This matmul was contributed by Thomas Malik */ - GLdouble temp[16]; - GLint i; - -#define A(row,col) a[(col<<2)+row] -#define B(row,col) b[(col<<2)+row] -#define T(row,col) temp[(col<<2)+row] - - /* i-te Zeile */ - for (i = 0; i < 4; i++) { - T(i, 0) = - A(i, 0) * B(0, 0) + A(i, 1) * B(1, 0) + A(i, 2) * B(2, 0) + A(i, - 3) * - B(3, 0); - T(i, 1) = - A(i, 0) * B(0, 1) + A(i, 1) * B(1, 1) + A(i, 2) * B(2, 1) + A(i, - 3) * - B(3, 1); - T(i, 2) = - A(i, 0) * B(0, 2) + A(i, 1) * B(1, 2) + A(i, 2) * B(2, 2) + A(i, - 3) * - B(3, 2); - T(i, 3) = - A(i, 0) * B(0, 3) + A(i, 1) * B(1, 3) + A(i, 2) * B(2, 3) + A(i, - 3) * - B(3, 3); - } - -#undef A -#undef B -#undef T - MEMCPY(product, temp, 16 * sizeof(GLdouble)); -} - - - -/* - * Compute inverse of 4x4 transformation matrix. - * Code contributed by Jacques Leroy jle@star.be - * Return GL_TRUE for success, GL_FALSE for failure (singular matrix) - */ -static GLboolean -invert_matrix(const GLdouble * m, GLdouble * out) -{ -/* NB. OpenGL Matrices are COLUMN major. */ -#define SWAP_ROWS(a, b) { GLdouble *_tmp = a; (a)=(b); (b)=_tmp; } -#define MAT(m,r,c) (m)[(c)*4+(r)] - - GLdouble wtmp[4][8]; - GLdouble m0, m1, m2, m3, s; - GLdouble *r0, *r1, *r2, *r3; - - r0 = wtmp[0], r1 = wtmp[1], r2 = wtmp[2], r3 = wtmp[3]; - - r0[0] = MAT(m, 0, 0), r0[1] = MAT(m, 0, 1), - r0[2] = MAT(m, 0, 2), r0[3] = MAT(m, 0, 3), - r0[4] = 1.0, r0[5] = r0[6] = r0[7] = 0.0, - r1[0] = MAT(m, 1, 0), r1[1] = MAT(m, 1, 1), - r1[2] = MAT(m, 1, 2), r1[3] = MAT(m, 1, 3), - r1[5] = 1.0, r1[4] = r1[6] = r1[7] = 0.0, - r2[0] = MAT(m, 2, 0), r2[1] = MAT(m, 2, 1), - r2[2] = MAT(m, 2, 2), r2[3] = MAT(m, 2, 3), - r2[6] = 1.0, r2[4] = r2[5] = r2[7] = 0.0, - r3[0] = MAT(m, 3, 0), r3[1] = MAT(m, 3, 1), - r3[2] = MAT(m, 3, 2), r3[3] = MAT(m, 3, 3), - r3[7] = 1.0, r3[4] = r3[5] = r3[6] = 0.0; - - /* choose pivot - or die */ - if (fabs(r3[0]) > fabs(r2[0])) - SWAP_ROWS(r3, r2); - if (fabs(r2[0]) > fabs(r1[0])) - SWAP_ROWS(r2, r1); - if (fabs(r1[0]) > fabs(r0[0])) - SWAP_ROWS(r1, r0); - if (0.0 == r0[0]) - return GL_FALSE; - - /* eliminate first variable */ - m1 = r1[0] / r0[0]; - m2 = r2[0] / r0[0]; - m3 = r3[0] / r0[0]; - s = r0[1]; - r1[1] -= m1 * s; - r2[1] -= m2 * s; - r3[1] -= m3 * s; - s = r0[2]; - r1[2] -= m1 * s; - r2[2] -= m2 * s; - r3[2] -= m3 * s; - s = r0[3]; - r1[3] -= m1 * s; - r2[3] -= m2 * s; - r3[3] -= m3 * s; - s = r0[4]; - if (s != 0.0) { - r1[4] -= m1 * s; - r2[4] -= m2 * s; - r3[4] -= m3 * s; - } - s = r0[5]; - if (s != 0.0) { - r1[5] -= m1 * s; - r2[5] -= m2 * s; - r3[5] -= m3 * s; - } - s = r0[6]; - if (s != 0.0) { - r1[6] -= m1 * s; - r2[6] -= m2 * s; - r3[6] -= m3 * s; - } - s = r0[7]; - if (s != 0.0) { - r1[7] -= m1 * s; - r2[7] -= m2 * s; - r3[7] -= m3 * s; - } - - /* choose pivot - or die */ - if (fabs(r3[1]) > fabs(r2[1])) - SWAP_ROWS(r3, r2); - if (fabs(r2[1]) > fabs(r1[1])) - SWAP_ROWS(r2, r1); - if (0.0 == r1[1]) - return GL_FALSE; - - /* eliminate second variable */ - m2 = r2[1] / r1[1]; - m3 = r3[1] / r1[1]; - r2[2] -= m2 * r1[2]; - r3[2] -= m3 * r1[2]; - r2[3] -= m2 * r1[3]; - r3[3] -= m3 * r1[3]; - s = r1[4]; - if (0.0 != s) { - r2[4] -= m2 * s; - r3[4] -= m3 * s; - } - s = r1[5]; - if (0.0 != s) { - r2[5] -= m2 * s; - r3[5] -= m3 * s; - } - s = r1[6]; - if (0.0 != s) { - r2[6] -= m2 * s; - r3[6] -= m3 * s; - } - s = r1[7]; - if (0.0 != s) { - r2[7] -= m2 * s; - r3[7] -= m3 * s; - } - - /* choose pivot - or die */ - if (fabs(r3[2]) > fabs(r2[2])) - SWAP_ROWS(r3, r2); - if (0.0 == r2[2]) - return GL_FALSE; - - /* eliminate third variable */ - m3 = r3[2] / r2[2]; - r3[3] -= m3 * r2[3], r3[4] -= m3 * r2[4], - r3[5] -= m3 * r2[5], r3[6] -= m3 * r2[6], r3[7] -= m3 * r2[7]; - - /* last check */ - if (0.0 == r3[3]) - return GL_FALSE; - - s = 1.0 / r3[3]; /* now back substitute row 3 */ - r3[4] *= s; - r3[5] *= s; - r3[6] *= s; - r3[7] *= s; - - m2 = r2[3]; /* now back substitute row 2 */ - s = 1.0 / r2[2]; - r2[4] = s * (r2[4] - r3[4] * m2), r2[5] = s * (r2[5] - r3[5] * m2), - r2[6] = s * (r2[6] - r3[6] * m2), r2[7] = s * (r2[7] - r3[7] * m2); - m1 = r1[3]; - r1[4] -= r3[4] * m1, r1[5] -= r3[5] * m1, - r1[6] -= r3[6] * m1, r1[7] -= r3[7] * m1; - m0 = r0[3]; - r0[4] -= r3[4] * m0, r0[5] -= r3[5] * m0, - r0[6] -= r3[6] * m0, r0[7] -= r3[7] * m0; - - m1 = r1[2]; /* now back substitute row 1 */ - s = 1.0 / r1[1]; - r1[4] = s * (r1[4] - r2[4] * m1), r1[5] = s * (r1[5] - r2[5] * m1), - r1[6] = s * (r1[6] - r2[6] * m1), r1[7] = s * (r1[7] - r2[7] * m1); - m0 = r0[2]; - r0[4] -= r2[4] * m0, r0[5] -= r2[5] * m0, - r0[6] -= r2[6] * m0, r0[7] -= r2[7] * m0; - - m0 = r0[1]; /* now back substitute row 0 */ - s = 1.0 / r0[0]; - r0[4] = s * (r0[4] - r1[4] * m0), r0[5] = s * (r0[5] - r1[5] * m0), - r0[6] = s * (r0[6] - r1[6] * m0), r0[7] = s * (r0[7] - r1[7] * m0); - - MAT(out, 0, 0) = r0[4]; - MAT(out, 0, 1) = r0[5], MAT(out, 0, 2) = r0[6]; - MAT(out, 0, 3) = r0[7], MAT(out, 1, 0) = r1[4]; - MAT(out, 1, 1) = r1[5], MAT(out, 1, 2) = r1[6]; - MAT(out, 1, 3) = r1[7], MAT(out, 2, 0) = r2[4]; - MAT(out, 2, 1) = r2[5], MAT(out, 2, 2) = r2[6]; - MAT(out, 2, 3) = r2[7], MAT(out, 3, 0) = r3[4]; - MAT(out, 3, 1) = r3[5], MAT(out, 3, 2) = r3[6]; - MAT(out, 3, 3) = r3[7]; - - return GL_TRUE; - -#undef MAT -#undef SWAP_ROWS -} - - - -/* projection du point (objx,objy,obz) sur l'ecran (winx,winy,winz) */ -GLint GLAPIENTRY -gluProject(GLdouble objx, GLdouble objy, GLdouble objz, - const GLdouble model[16], const GLdouble proj[16], - const GLint viewport[4], - GLdouble * winx, GLdouble * winy, GLdouble * winz) -{ - /* matrice de transformation */ - GLdouble in[4], out[4]; - - /* initilise la matrice et le vecteur a transformer */ - in[0] = objx; - in[1] = objy; - in[2] = objz; - in[3] = 1.0; - transform_point(out, model, in); - transform_point(in, proj, out); - - /* d'ou le resultat normalise entre -1 et 1 */ - if (in[3] == 0.0) - return GL_FALSE; - - in[0] /= in[3]; - in[1] /= in[3]; - in[2] /= in[3]; - - /* en coordonnees ecran */ - *winx = viewport[0] + (1 + in[0]) * viewport[2] / 2; - *winy = viewport[1] + (1 + in[1]) * viewport[3] / 2; - /* entre 0 et 1 suivant z */ - *winz = (1 + in[2]) / 2; - return GL_TRUE; -} - - - -/* transformation du point ecran (winx,winy,winz) en point objet */ -GLint GLAPIENTRY -gluUnProject(GLdouble winx, GLdouble winy, GLdouble winz, - const GLdouble model[16], const GLdouble proj[16], - const GLint viewport[4], - GLdouble * objx, GLdouble * objy, GLdouble * objz) -{ - /* matrice de transformation */ - GLdouble m[16], A[16]; - GLdouble in[4], out[4]; - - /* transformation coordonnees normalisees entre -1 et 1 */ - in[0] = (winx - viewport[0]) * 2 / viewport[2] - 1.0; - in[1] = (winy - viewport[1]) * 2 / viewport[3] - 1.0; - in[2] = 2 * winz - 1.0; - in[3] = 1.0; - - /* calcul transformation inverse */ - matmul(A, proj, model); - invert_matrix(A, m); - - /* d'ou les coordonnees objets */ - transform_point(out, m, in); - if (out[3] == 0.0) - return GL_FALSE; - *objx = out[0] / out[3]; - *objy = out[1] / out[3]; - *objz = out[2] / out[3]; - return GL_TRUE; -} - - -/* - * New in GLU 1.3 - * This is like gluUnProject but also takes near and far DepthRange values. - */ -#ifdef GLU_VERSION_1_3 -GLint GLAPIENTRY -gluUnProject4(GLdouble winx, GLdouble winy, GLdouble winz, GLdouble clipw, - const GLdouble modelMatrix[16], - const GLdouble projMatrix[16], - const GLint viewport[4], - GLclampd nearZ, GLclampd farZ, - GLdouble * objx, GLdouble * objy, GLdouble * objz, - GLdouble * objw) -{ - /* matrice de transformation */ - GLdouble m[16], A[16]; - GLdouble in[4], out[4]; - GLdouble z = nearZ + winz * (farZ - nearZ); - - /* transformation coordonnees normalisees entre -1 et 1 */ - in[0] = (winx - viewport[0]) * 2 / viewport[2] - 1.0; - in[1] = (winy - viewport[1]) * 2 / viewport[3] - 1.0; - in[2] = 2.0 * z - 1.0; - in[3] = clipw; - - /* calcul transformation inverse */ - matmul(A, projMatrix, modelMatrix); - invert_matrix(A, m); - - /* d'ou les coordonnees objets */ - transform_point(out, m, in); - if (out[3] == 0.0) - return GL_FALSE; - *objx = out[0] / out[3]; - *objy = out[1] / out[3]; - *objz = out[2] / out[3]; - *objw = out[3]; - return GL_TRUE; -} -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/quadric.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/quadric.c deleted file mode 100644 index 0f6889b284..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/quadric.c +++ /dev/null @@ -1,819 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1999-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* TODO: - * texture coordinate support - * flip normals according to orientation - * there's still some inside/outside orientation bugs in possibly all - * but the sphere function - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include -#include "gluP.h" -#endif - - - -#ifndef M_PI -# define M_PI (3.1415926) -#endif - - -/* - * Convert degrees to radians: - */ -#define DEG_TO_RAD(A) ((A)*(M_PI/180.0)) - - -/* - * Sin and Cos for degree angles: - */ -#define SIND( A ) sin( (A)*(M_PI/180.0) ) -#define COSD( A) cos( (A)*(M_PI/180.0) ) - - -/* - * Texture coordinates if texture flag is set - */ -#define TXTR_COORD(x,y) if (qobj->TextureFlag) glTexCoord2f(x,y); - - - -struct GLUquadric -{ - GLenum DrawStyle; /* GLU_FILL, LINE, SILHOUETTE, or POINT */ - GLenum Orientation; /* GLU_INSIDE or GLU_OUTSIDE */ - GLboolean TextureFlag; /* Generate texture coords? */ - GLenum Normals; /* GLU_NONE, GLU_FLAT, or GLU_SMOOTH */ - void (GLCALLBACK * ErrorFunc) (GLenum err); /* Error handler callback function */ -}; - - - -/* - * Process a GLU error. - */ -static void -quadric_error(GLUquadricObj * qobj, GLenum error, const char *msg) -{ - /* Call the error call back function if any */ - if (qobj->ErrorFunc) { - (*qobj->ErrorFunc) (error); - } - /* Print a message to stdout if MESA_DEBUG variable is defined */ - if (getenv("MESA_DEBUG")) { - fprintf(stderr, "GLUError: %s: %s\n", (char *) gluErrorString(error), - msg); - } -} - - - - -GLUquadricObj *GLAPIENTRY -gluNewQuadric(void) -{ - GLUquadricObj *q; - - q = (GLUquadricObj *) malloc(sizeof(struct GLUquadric)); - if (q) { - q->DrawStyle = GLU_FILL; - q->Orientation = GLU_OUTSIDE; - q->TextureFlag = GL_FALSE; - q->Normals = GLU_SMOOTH; - q->ErrorFunc = NULL; - } - return q; -} - - - -void GLAPIENTRY -gluDeleteQuadric(GLUquadricObj * state) -{ - if (state) { - free((void *) state); - } -} - - - -/* - * Set the drawing style to be GLU_FILL, GLU_LINE, GLU_SILHOUETTE, - * or GLU_POINT. - */ -void GLAPIENTRY -gluQuadricDrawStyle(GLUquadricObj * quadObject, GLenum drawStyle) -{ - if (quadObject && (drawStyle == GLU_FILL || drawStyle == GLU_LINE - || drawStyle == GLU_SILHOUETTE - || drawStyle == GLU_POINT)) { - quadObject->DrawStyle = drawStyle; - } - else { - quadric_error(quadObject, GLU_INVALID_ENUM, "qluQuadricDrawStyle"); - } -} - - - -/* - * Set the orientation to GLU_INSIDE or GLU_OUTSIDE. - */ -void GLAPIENTRY -gluQuadricOrientation(GLUquadricObj * quadObject, GLenum orientation) -{ - if (quadObject - && (orientation == GLU_INSIDE || orientation == GLU_OUTSIDE)) { - quadObject->Orientation = orientation; - } - else { - quadric_error(quadObject, GLU_INVALID_ENUM, "qluQuadricOrientation"); - } -} - - - -/* - * Set the error handler callback function. - */ -void GLAPIENTRY -gluQuadricCallback(GLUquadricObj * qobj, - GLenum which, void (GLCALLBACK * fn) ()) -{ - /* - * UGH, this is a mess! I thought ANSI was a standard. - */ - if (qobj && which == GLU_ERROR) { -#ifdef __CYGWIN32__ - qobj->ErrorFunc = (void (GLCALLBACKPCAST) (GLenum)) fn; -#elif defined(OPENSTEP) - qobj->ErrorFunc = (void (*)(GLenum)) fn; -#elif defined(_WIN32) - qobj->ErrorFunc = (void (GLCALLBACK *) (int)) fn; -#elif defined(__STORM__) - qobj->ErrorFunc = (void (GLCALLBACK *) (GLenum)) fn; -#elif defined(__BEOS__) - qobj->ErrorFunc = (void (*)(GLenum)) fn; -#else - qobj->ErrorFunc = (void (GLCALLBACK *) ()) fn; -#endif - } -} - - -void GLAPIENTRY -gluQuadricNormals(GLUquadricObj * quadObject, GLenum normals) -{ - if (quadObject - && (normals == GLU_NONE || normals == GLU_FLAT - || normals == GLU_SMOOTH)) { - quadObject->Normals = normals; - } -} - - -void GLAPIENTRY -gluQuadricTexture(GLUquadricObj * quadObject, GLboolean textureCoords) -{ - if (quadObject) { - quadObject->TextureFlag = textureCoords; - } -} - - - - -/* - * Call glNormal3f after scaling normal to unit length. - */ -static void -normal3f(GLfloat x, GLfloat y, GLfloat z) -{ - GLdouble mag; - - mag = sqrt(x * x + y * y + z * z); - if (mag > 0.00001F) { - x /= mag; - y /= mag; - z /= mag; - } - glNormal3f(x, y, z); -} - - - -void GLAPIENTRY -gluCylinder(GLUquadricObj * qobj, - GLdouble baseRadius, GLdouble topRadius, - GLdouble height, GLint slices, GLint stacks) -{ - GLdouble da, r, dr, dz; - GLfloat x, y, z, nz, nsign; - GLint i, j; - - if (qobj->Orientation == GLU_INSIDE) { - nsign = -1.0; - } - else { - nsign = 1.0; - } - - da = 2.0 * M_PI / slices; - dr = (topRadius - baseRadius) / stacks; - dz = height / stacks; - nz = (baseRadius - topRadius) / height; /* Z component of normal vectors */ - - if (qobj->DrawStyle == GLU_POINT) { - glBegin(GL_POINTS); - for (i = 0; i < slices; i++) { - x = cos(i * da); - y = sin(i * da); - normal3f(x * nsign, y * nsign, nz * nsign); - - z = 0.0; - r = baseRadius; - for (j = 0; j <= stacks; j++) { - glVertex3f(x * r, y * r, z); - z += dz; - r += dr; - } - } - glEnd(); - } - else if (qobj->DrawStyle == GLU_LINE || qobj->DrawStyle == GLU_SILHOUETTE) { - /* Draw rings */ - if (qobj->DrawStyle == GLU_LINE) { - z = 0.0; - r = baseRadius; - for (j = 0; j <= stacks; j++) { - glBegin(GL_LINE_LOOP); - for (i = 0; i < slices; i++) { - x = cos(i * da); - y = sin(i * da); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f(x * r, y * r, z); - } - glEnd(); - z += dz; - r += dr; - } - } - else { - /* draw one ring at each end */ - if (baseRadius != 0.0) { - glBegin(GL_LINE_LOOP); - for (i = 0; i < slices; i++) { - x = cos(i * da); - y = sin(i * da); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f(x * baseRadius, y * baseRadius, 0.0); - } - glEnd(); - glBegin(GL_LINE_LOOP); - for (i = 0; i < slices; i++) { - x = cos(i * da); - y = sin(i * da); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f(x * topRadius, y * topRadius, height); - } - glEnd(); - } - } - /* draw length lines */ - glBegin(GL_LINES); - for (i = 0; i < slices; i++) { - x = cos(i * da); - y = sin(i * da); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f(x * baseRadius, y * baseRadius, 0.0); - glVertex3f(x * topRadius, y * topRadius, height); - } - glEnd(); - } - else if (qobj->DrawStyle == GLU_FILL) { - GLfloat ds = 1.0 / slices; - GLfloat dt = 1.0 / stacks; - GLfloat t = 0.0; - z = 0.0; - r = baseRadius; - for (j = 0; j < stacks; j++) { - GLfloat s = 0.0; - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= slices; i++) { - GLfloat x, y; - if (i == slices) { - x = sin(0.0); - y = cos(0.0); - } - else { - x = sin(i * da); - y = cos(i * da); - } - if (nsign == 1.0) { - normal3f(x * nsign, y * nsign, nz * nsign); - TXTR_COORD(s, t); - glVertex3f(x * r, y * r, z); - normal3f(x * nsign, y * nsign, nz * nsign); - TXTR_COORD(s, t + dt); - glVertex3f(x * (r + dr), y * (r + dr), z + dz); - } - else { - normal3f(x * nsign, y * nsign, nz * nsign); - TXTR_COORD(s, t); - glVertex3f(x * r, y * r, z); - normal3f(x * nsign, y * nsign, nz * nsign); - TXTR_COORD(s, t + dt); - glVertex3f(x * (r + dr), y * (r + dr), z + dz); - } - s += ds; - } /* for slices */ - glEnd(); - r += dr; - t += dt; - z += dz; - } /* for stacks */ - } -} - - - - - -void GLAPIENTRY -gluSphere(GLUquadricObj * qobj, GLdouble radius, GLint slices, GLint stacks) -{ - GLfloat rho, drho, theta, dtheta; - GLfloat x, y, z; - GLfloat s, t, ds, dt; - GLint i, j, imin, imax; - GLboolean normals; - GLfloat nsign; - - if (qobj->Normals == GLU_NONE) { - normals = GL_FALSE; - } - else { - normals = GL_TRUE; - } - if (qobj->Orientation == GLU_INSIDE) { - nsign = -1.0; - } - else { - nsign = 1.0; - } - - drho = M_PI / (GLfloat) stacks; - dtheta = 2.0 * M_PI / (GLfloat) slices; - - /* texturing: s goes from 0.0/0.25/0.5/0.75/1.0 at +y/+x/-y/-x/+y axis */ - /* t goes from -1.0/+1.0 at z = -radius/+radius (linear along longitudes) */ - /* cannot use triangle fan on texturing (s coord. at top/bottom tip varies) */ - - if (qobj->DrawStyle == GLU_FILL) { - if (!qobj->TextureFlag) { - /* draw +Z end as a triangle fan */ - glBegin(GL_TRIANGLE_FAN); - glNormal3f(0.0, 0.0, 1.0); - glVertex3f(0.0, 0.0, nsign * radius); - for (j = 0; j <= slices; j++) { - theta = (j == slices) ? 0.0 : j * dtheta; - x = -sin(theta) * sin(drho); - y = cos(theta) * sin(drho); - z = nsign * cos(drho); - if (normals) - glNormal3f(x * nsign, y * nsign, z * nsign); - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - - ds = 1.0 / slices; - dt = 1.0 / stacks; - t = 1.0; /* because loop now runs from 0 */ - if (qobj->TextureFlag) { - imin = 0; - imax = stacks; - } - else { - imin = 1; - imax = stacks - 1; - } - - /* draw intermediate stacks as quad strips */ - for (i = imin; i < imax; i++) { - rho = i * drho; - glBegin(GL_QUAD_STRIP); - s = 0.0; - for (j = 0; j <= slices; j++) { - theta = (j == slices) ? 0.0 : j * dtheta; - x = -sin(theta) * sin(rho); - y = cos(theta) * sin(rho); - z = nsign * cos(rho); - if (normals) - glNormal3f(x * nsign, y * nsign, z * nsign); - TXTR_COORD(s, t); - glVertex3f(x * radius, y * radius, z * radius); - x = -sin(theta) * sin(rho + drho); - y = cos(theta) * sin(rho + drho); - z = nsign * cos(rho + drho); - if (normals) - glNormal3f(x * nsign, y * nsign, z * nsign); - TXTR_COORD(s, t - dt); - s += ds; - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - t -= dt; - } - - if (!qobj->TextureFlag) { - /* draw -Z end as a triangle fan */ - glBegin(GL_TRIANGLE_FAN); - glNormal3f(0.0, 0.0, -1.0); - glVertex3f(0.0, 0.0, -radius * nsign); - rho = M_PI - drho; - s = 1.0; - t = dt; - for (j = slices; j >= 0; j--) { - theta = (j == slices) ? 0.0 : j * dtheta; - x = -sin(theta) * sin(rho); - y = cos(theta) * sin(rho); - z = nsign * cos(rho); - if (normals) - glNormal3f(x * nsign, y * nsign, z * nsign); - s -= ds; - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - } - else if (qobj->DrawStyle == GLU_LINE || qobj->DrawStyle == GLU_SILHOUETTE) { - /* draw stack lines */ - for (i = 1; i < stacks; i++) { /* stack line at i==stacks-1 was missing here */ - rho = i * drho; - glBegin(GL_LINE_LOOP); - for (j = 0; j < slices; j++) { - theta = j * dtheta; - x = cos(theta) * sin(rho); - y = sin(theta) * sin(rho); - z = cos(rho); - if (normals) - glNormal3f(x * nsign, y * nsign, z * nsign); - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - /* draw slice lines */ - for (j = 0; j < slices; j++) { - theta = j * dtheta; - glBegin(GL_LINE_STRIP); - for (i = 0; i <= stacks; i++) { - rho = i * drho; - x = cos(theta) * sin(rho); - y = sin(theta) * sin(rho); - z = cos(rho); - if (normals) - glNormal3f(x * nsign, y * nsign, z * nsign); - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - } - else if (qobj->DrawStyle == GLU_POINT) { - /* top and bottom-most points */ - glBegin(GL_POINTS); - if (normals) - glNormal3f(0.0, 0.0, nsign); - glVertex3d(0.0, 0.0, radius); - if (normals) - glNormal3f(0.0, 0.0, -nsign); - glVertex3d(0.0, 0.0, -radius); - - /* loop over stacks */ - for (i = 1; i < stacks - 1; i++) { - rho = i * drho; - for (j = 0; j < slices; j++) { - theta = j * dtheta; - x = cos(theta) * sin(rho); - y = sin(theta) * sin(rho); - z = cos(rho); - if (normals) - glNormal3f(x * nsign, y * nsign, z * nsign); - glVertex3f(x * radius, y * radius, z * radius); - } - } - glEnd(); - } - -} - - - -void GLAPIENTRY -gluDisk(GLUquadricObj * qobj, - GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops) -{ - GLfloat da, dr; -#if 0 - GLdouble a, da; - GLfloat r, dr; - GLfloat x, y; - GLfloat r1, r2, dtc; - GLint s, l; -#endif - - /* Normal vectors */ - if (qobj->Normals != GLU_NONE) { - if (qobj->Orientation == GLU_OUTSIDE) { - glNormal3f(0.0, 0.0, +1.0); - } - else { - glNormal3f(0.0, 0.0, -1.0); - } - } - - da = 2.0 * M_PI / slices; - dr = (outerRadius - innerRadius) / (GLfloat) loops; - - switch (qobj->DrawStyle) { - case GLU_FILL: - { - /* texture of a gluDisk is a cut out of the texture unit square - * x, y in [-outerRadius, +outerRadius]; s, t in [0, 1] - * (linear mapping) - */ - GLfloat dtc = 2.0f * outerRadius; - GLfloat sa, ca; - GLfloat r1 = innerRadius; - GLint l; - for (l = 0; l < loops; l++) { - GLfloat r2 = r1 + dr; - if (qobj->Orientation == GLU_OUTSIDE) { - GLint s; - glBegin(GL_QUAD_STRIP); - for (s = 0; s <= slices; s++) { - GLfloat a; - if (s == slices) - a = 0.0; - else - a = s * da; - sa = sin(a); - ca = cos(a); - TXTR_COORD(0.5 + sa * r2 / dtc, 0.5 + ca * r2 / dtc); - glVertex2f(r2 * sa, r2 * ca); - TXTR_COORD(0.5 + sa * r1 / dtc, 0.5 + ca * r1 / dtc); - glVertex2f(r1 * sa, r1 * ca); - } - glEnd(); - } - else { - GLint s; - glBegin(GL_QUAD_STRIP); - for (s = slices; s >= 0; s--) { - GLfloat a; - if (s == slices) - a = 0.0; - else - a = s * da; - sa = sin(a); - ca = cos(a); - TXTR_COORD(0.5 - sa * r2 / dtc, 0.5 + ca * r2 / dtc); - glVertex2f(r2 * sa, r2 * ca); - TXTR_COORD(0.5 - sa * r1 / dtc, 0.5 + ca * r1 / dtc); - glVertex2f(r1 * sa, r1 * ca); - } - glEnd(); - } - r1 = r2; - } - break; - } - case GLU_LINE: - { - GLint l, s; - /* draw loops */ - for (l = 0; l <= loops; l++) { - GLfloat r = innerRadius + l * dr; - glBegin(GL_LINE_LOOP); - for (s = 0; s < slices; s++) { - GLfloat a = s * da; - glVertex2f(r * sin(a), r * cos(a)); - } - glEnd(); - } - /* draw spokes */ - for (s = 0; s < slices; s++) { - GLfloat a = s * da; - GLfloat x = sin(a); - GLfloat y = cos(a); - glBegin(GL_LINE_STRIP); - for (l = 0; l <= loops; l++) { - GLfloat r = innerRadius + l * dr; - glVertex2f(r * x, r * y); - } - glEnd(); - } - break; - } - case GLU_POINT: - { - GLint s; - glBegin(GL_POINTS); - for (s = 0; s < slices; s++) { - GLfloat a = s * da; - GLfloat x = sin(a); - GLfloat y = cos(a); - GLint l; - for (l = 0; l <= loops; l++) { - GLfloat r = innerRadius * l * dr; - glVertex2f(r * x, r * y); - } - } - glEnd(); - break; - } - case GLU_SILHOUETTE: - { - if (innerRadius != 0.0) { - GLfloat a; - glBegin(GL_LINE_LOOP); - for (a = 0.0; a < 2.0 * M_PI; a += da) { - GLfloat x = innerRadius * sin(a); - GLfloat y = innerRadius * cos(a); - glVertex2f(x, y); - } - glEnd(); - } - { - GLfloat a; - glBegin(GL_LINE_LOOP); - for (a = 0; a < 2.0 * M_PI; a += da) { - GLfloat x = outerRadius * sin(a); - GLfloat y = outerRadius * cos(a); - glVertex2f(x, y); - } - glEnd(); - } - break; - } - default: - abort(); - } -} - - - -void GLAPIENTRY -gluPartialDisk(GLUquadricObj * qobj, GLdouble innerRadius, - GLdouble outerRadius, GLint slices, GLint loops, - GLdouble startAngle, GLdouble sweepAngle) -{ - if (qobj->Normals != GLU_NONE) { - if (qobj->Orientation == GLU_OUTSIDE) { - glNormal3f(0.0, 0.0, +1.0); - } - else { - glNormal3f(0.0, 0.0, -1.0); - } - } - - if (qobj->DrawStyle == GLU_POINT) { - GLint loop, slice; - GLdouble radius, delta_radius; - GLdouble angle, delta_angle; - delta_radius = (outerRadius - innerRadius) / (loops - 1); - delta_angle = DEG_TO_RAD((sweepAngle) / (slices - 1)); - glBegin(GL_POINTS); - radius = innerRadius; - for (loop = 0; loop < loops; loop++) { - angle = DEG_TO_RAD(startAngle); - for (slice = 0; slice < slices; slice++) { - glVertex2d(radius * sin(angle), radius * cos(angle)); - angle += delta_angle; - } - radius += delta_radius; - } - glEnd(); - } - else if (qobj->DrawStyle == GLU_LINE) { - GLint loop, slice; - GLdouble radius, delta_radius; - GLdouble angle, delta_angle; - delta_radius = (outerRadius - innerRadius) / loops; - delta_angle = DEG_TO_RAD(sweepAngle / slices); - /* draw rings */ - radius = innerRadius; - for (loop = 0; loop < loops; loop++) { - angle = DEG_TO_RAD(startAngle); - glBegin(GL_LINE_STRIP); - for (slice = 0; slice <= slices; slice++) { - glVertex2d(radius * sin(angle), radius * cos(angle)); - angle += delta_angle; - } - glEnd(); - radius += delta_radius; - } - /* draw spokes */ - angle = DEG_TO_RAD(startAngle); - for (slice = 0; slice <= slices; slice++) { - radius = innerRadius; - glBegin(GL_LINE_STRIP); - for (loop = 0; loop < loops; loop++) { - glVertex2d(radius * sin(angle), radius * cos(angle)); - radius += delta_radius; - } - glEnd(); - angle += delta_angle; - } - } - else if (qobj->DrawStyle == GLU_SILHOUETTE) { - GLint slice; - GLdouble angle, delta_angle; - delta_angle = DEG_TO_RAD(sweepAngle / slices); - /* draw outer ring */ - glBegin(GL_LINE_STRIP); - angle = DEG_TO_RAD(startAngle); - for (slice = 0; slice <= slices; slice++) { - glVertex2d(outerRadius * sin(angle), outerRadius * cos(angle)); - angle += delta_angle; - } - glEnd(); - /* draw inner ring */ - if (innerRadius > 0.0) { - glBegin(GL_LINE_STRIP); - angle = DEG_TO_RAD(startAngle); - for (slice = 0; slice < slices; slice++) { - glVertex2d(innerRadius * sin(angle), innerRadius * cos(angle)); - angle += delta_angle; - } - glEnd(); - } - /* draw spokes */ - if (sweepAngle < 360.0) { - GLdouble stopAngle = startAngle + sweepAngle; - glBegin(GL_LINES); - glVertex2d(innerRadius * SIND(startAngle), - innerRadius * COSD(startAngle)); - glVertex2d(outerRadius * SIND(startAngle), - outerRadius * COSD(startAngle)); - glVertex2d(innerRadius * SIND(stopAngle), - innerRadius * COSD(stopAngle)); - glVertex2d(outerRadius * SIND(stopAngle), - outerRadius * COSD(stopAngle)); - glEnd(); - } - } - else if (qobj->DrawStyle == GLU_FILL) { - GLint loop, slice; - GLdouble radius, delta_radius; - GLdouble angle, delta_angle; - delta_radius = (outerRadius - innerRadius) / loops; - delta_angle = DEG_TO_RAD(sweepAngle / slices); - radius = innerRadius; - for (loop = 0; loop < loops; loop++) { - glBegin(GL_QUAD_STRIP); - angle = DEG_TO_RAD(startAngle); - for (slice = 0; slice <= slices; slice++) { - if (qobj->Orientation == GLU_OUTSIDE) { - glVertex2d((radius + delta_radius) * sin(angle), - (radius + delta_radius) * cos(angle)); - glVertex2d(radius * sin(angle), radius * cos(angle)); - } - else { - glVertex2d(radius * sin(angle), radius * cos(angle)); - glVertex2d((radius + delta_radius) * sin(angle), - (radius + delta_radius) * cos(angle)); - } - angle += delta_angle; - } - glEnd(); - radius += delta_radius; - } - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/tess.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/tess.c deleted file mode 100644 index 341d29bae3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/tess.c +++ /dev/null @@ -1,327 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * This file is part of the polygon tesselation code contributed by - * Bogdan Sikorski - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include "tess.h" -#endif - - -/* - * This is ugly, but seems the easiest way to do things to make the - * code work under YellowBox for Windows - */ -#if defined(OPENSTEP) && defined(CALLBACK) -#undef CALLBACK -#define CALLBACK -#endif - - -static void delete_contours(GLUtriangulatorObj *); - -#ifdef __CYGWIN32__ -#define _CALLBACK -#else -#define _CALLBACK GLCALLBACK -#endif - - -static void -init_callbacks(tess_callbacks * callbacks) -{ - callbacks->begin = (void (_CALLBACK *) (GLenum)) 0; - callbacks->edgeFlag = (void (_CALLBACK *) (GLboolean)) 0; - callbacks->vertex = (void (_CALLBACK *) (void *)) 0; - callbacks->end = (void (_CALLBACK *) (void)) 0; - callbacks->error = (void (_CALLBACK *) (GLenum)) 0; -} - -void -tess_call_user_error(GLUtriangulatorObj * tobj, GLenum gluerr) -{ - if (tobj->error == GLU_NO_ERROR) - tobj->error = gluerr; - if (tobj->callbacks.error != NULL) - (tobj->callbacks.error) (gluerr); -} - -GLUtriangulatorObj *GLAPIENTRY -gluNewTess(void) -{ - GLUtriangulatorObj *tobj; - - if ((tobj = (GLUtriangulatorObj *) - malloc(sizeof(struct GLUtesselator))) == NULL) - return NULL; - tobj->contours = tobj->last_contour = NULL; - init_callbacks(&tobj->callbacks); - tobj->error = GLU_NO_ERROR; - tobj->current_polygon = NULL; - tobj->contour_cnt = 0; - return tobj; -} - - -void GLAPIENTRY -gluTessCallback(GLUtriangulatorObj * tobj, GLenum which, - void (GLCALLBACK * fn) ()) -{ - switch (which) { - case GLU_BEGIN: - tobj->callbacks.begin = (void (_CALLBACK *) (GLenum)) fn; - break; - case GLU_EDGE_FLAG: - tobj->callbacks.edgeFlag = (void (_CALLBACK *) (GLboolean)) fn; - break; - case GLU_VERTEX: - tobj->callbacks.vertex = (void (_CALLBACK *) (void *)) fn; - break; - case GLU_END: - tobj->callbacks.end = (void (_CALLBACK *) (void)) fn; - break; - case GLU_ERROR: - tobj->callbacks.error = (void (_CALLBACK *) (GLenum)) fn; - break; - default: - tobj->error = GLU_INVALID_ENUM; - break; - } -} - - - -void GLAPIENTRY -gluDeleteTess(GLUtriangulatorObj * tobj) -{ - if (tobj->error == GLU_NO_ERROR && tobj->contour_cnt) - /* was gluEndPolygon called? */ - tess_call_user_error(tobj, GLU_TESS_ERROR1); - /* delete all internal structures */ - delete_contours(tobj); - free(tobj); -} - - -void GLAPIENTRY -gluBeginPolygon(GLUtriangulatorObj * tobj) -{ -/* - if(tobj->error!=GLU_NO_ERROR) - return; -*/ - tobj->error = GLU_NO_ERROR; - if (tobj->current_polygon != NULL) { - /* gluEndPolygon was not called */ - tess_call_user_error(tobj, GLU_TESS_ERROR1); - /* delete all internal structures */ - delete_contours(tobj); - } - else { - if ((tobj->current_polygon = - (tess_polygon *) malloc(sizeof(tess_polygon))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - return; - } - tobj->current_polygon->vertex_cnt = 0; - tobj->current_polygon->vertices = - tobj->current_polygon->last_vertex = NULL; - } -} - - -void GLAPIENTRY -gluEndPolygon(GLUtriangulatorObj * tobj) -{ - /*tess_contour *contour_ptr; */ - - /* there was an error */ - if (tobj->error != GLU_NO_ERROR) - goto end; - - /* check if gluBeginPolygon was called */ - if (tobj->current_polygon == NULL) { - tess_call_user_error(tobj, GLU_TESS_ERROR2); - return; - } - tess_test_polygon(tobj); - /* there was an error */ - if (tobj->error != GLU_NO_ERROR) - goto end; - - /* any real contours? */ - if (tobj->contour_cnt == 0) { - /* delete all internal structures */ - delete_contours(tobj); - return; - } - tess_find_contour_hierarchies(tobj); - /* there was an error */ - if (tobj->error != GLU_NO_ERROR) - goto end; - - tess_handle_holes(tobj); - /* there was an error */ - if (tobj->error != GLU_NO_ERROR) - goto end; - - /* if no callbacks, nothing to do */ - if (tobj->callbacks.begin != NULL && tobj->callbacks.vertex != NULL && - tobj->callbacks.end != NULL) { - if (tobj->callbacks.edgeFlag == NULL) - tess_tesselate(tobj); - else - tess_tesselate_with_edge_flag(tobj); - } - - end: - /* delete all internal structures */ - delete_contours(tobj); -} - - -void GLAPIENTRY -gluNextContour(GLUtriangulatorObj * tobj, GLenum type) -{ - if (tobj->error != GLU_NO_ERROR) - return; - if (tobj->current_polygon == NULL) { - tess_call_user_error(tobj, GLU_TESS_ERROR2); - return; - } - /* first contour? */ - if (tobj->current_polygon->vertex_cnt) - tess_test_polygon(tobj); -} - - -void GLAPIENTRY -gluTessVertex(GLUtriangulatorObj * tobj, GLdouble v[3], void *data) -{ - tess_polygon *polygon = tobj->current_polygon; - tess_vertex *last_vertex_ptr; - - if (tobj->error != GLU_NO_ERROR) - return; - if (polygon == NULL) { - tess_call_user_error(tobj, GLU_TESS_ERROR2); - return; - } - last_vertex_ptr = polygon->last_vertex; - if (last_vertex_ptr == NULL) { - if ((last_vertex_ptr = (tess_vertex *) - malloc(sizeof(tess_vertex))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - return; - } - polygon->vertices = last_vertex_ptr; - polygon->last_vertex = last_vertex_ptr; - last_vertex_ptr->data = data; - last_vertex_ptr->location[0] = v[0]; - last_vertex_ptr->location[1] = v[1]; - last_vertex_ptr->location[2] = v[2]; - last_vertex_ptr->next = NULL; - last_vertex_ptr->previous = NULL; - ++(polygon->vertex_cnt); - } - else { - tess_vertex *vertex_ptr; - - /* same point twice? */ - if (fabs(last_vertex_ptr->location[0] - v[0]) < EPSILON && - fabs(last_vertex_ptr->location[1] - v[1]) < EPSILON && - fabs(last_vertex_ptr->location[2] - v[2]) < EPSILON) { - tess_call_user_error(tobj, GLU_TESS_ERROR6); - return; - } - if ((vertex_ptr = (tess_vertex *) - malloc(sizeof(tess_vertex))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - return; - } - vertex_ptr->data = data; - vertex_ptr->location[0] = v[0]; - vertex_ptr->location[1] = v[1]; - vertex_ptr->location[2] = v[2]; - vertex_ptr->next = NULL; - vertex_ptr->previous = last_vertex_ptr; - ++(polygon->vertex_cnt); - last_vertex_ptr->next = vertex_ptr; - polygon->last_vertex = vertex_ptr; - } -} - - -static void -delete_contours(GLUtriangulatorObj * tobj) -{ - tess_polygon *polygon = tobj->current_polygon; - tess_contour *contour, *contour_tmp; - tess_vertex *vertex, *vertex_tmp; - - /* remove current_polygon list - if exists due to detected error */ - if (polygon != NULL) { - if (polygon->vertices) { - for (vertex = polygon->vertices; vertex != polygon->last_vertex;) { - vertex_tmp = vertex->next; - free(vertex); - vertex = vertex_tmp; - } - free(vertex); - } - free(polygon); - tobj->current_polygon = NULL; - } - /* remove all contour data */ - for (contour = tobj->contours; contour != NULL;) { - for (vertex = contour->vertices; vertex != contour->last_vertex;) { - vertex_tmp = vertex->next; - free(vertex); - vertex = vertex_tmp; - } - free(vertex); - contour_tmp = contour->next; - free(contour); - contour = contour_tmp; - } - tobj->contours = tobj->last_contour = NULL; - tobj->contour_cnt = 0; -} - - -void GLAPIENTRY -gluTessNormal(GLUtesselator *tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ) -{ - /* dummy function */ - (void) tess; - (void) valueX; - (void) valueY; - (void) valueZ; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/tess.h b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/tess.h deleted file mode 100644 index 4e51dddd37..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/tess.h +++ /dev/null @@ -1,107 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * This file is part of the polygon tesselation code contributed by - * Bogdan Sikorski - */ - - -#ifndef TESS_H -#define TESS_H - - -#include "gluP.h" - -#define EPSILON 1e-06 /* epsilon for double precision compares */ - -typedef enum -{ - OXY, - OYZ, - OXZ -} -projection_type; - -typedef struct callbacks_str -{ - void (GLCALLBACK * begin) (GLenum mode); - void (GLCALLBACK * edgeFlag) (GLboolean flag); - void (GLCALLBACK * vertex) (GLvoid * v); - void (GLCALLBACK * end) (void); - void (GLCALLBACK * error) (GLenum err); -} -tess_callbacks; - -typedef struct vertex_str -{ - void *data; - GLdouble location[3]; - GLdouble x, y; - GLboolean edge_flag; - struct vertex_str *shadow_vertex; - struct vertex_str *next, *previous; -} -tess_vertex; - -typedef struct contour_str -{ - GLenum type; - GLuint vertex_cnt; - GLdouble area; - GLenum orientation; - struct vertex_str *vertices, *last_vertex; - struct contour_str *next, *previous; -} -tess_contour; - -typedef struct polygon_str -{ - GLuint vertex_cnt; - GLdouble A, B, C, D; - GLdouble area; - GLenum orientation; - struct vertex_str *vertices, *last_vertex; -} -tess_polygon; - -struct GLUtesselator -{ - tess_contour *contours, *last_contour; - GLuint contour_cnt; - tess_callbacks callbacks; - tess_polygon *current_polygon; - GLenum error; - GLdouble A, B, C, D; - projection_type projection; -}; - - -extern void tess_call_user_error(GLUtriangulatorObj *, GLenum); -extern void tess_test_polygon(GLUtriangulatorObj *); -extern void tess_find_contour_hierarchies(GLUtriangulatorObj *); -extern void tess_handle_holes(GLUtriangulatorObj *); -extern void tess_tesselate(GLUtriangulatorObj *); -extern void tess_tesselate_with_edge_flag(GLUtriangulatorObj *); - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/tesselat.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/tesselat.c deleted file mode 100644 index 47d230073f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mesa/tesselat.c +++ /dev/null @@ -1,406 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * This file is part of the polygon tesselation code contributed by - * Bogdan Sikorski - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include "tess.h" -#endif - - - -static GLboolean edge_flag; - -static void emit_triangle(GLUtriangulatorObj *, tess_vertex *, - tess_vertex *, tess_vertex *); - -static void emit_triangle_with_edge_flag(GLUtriangulatorObj *, - tess_vertex *, GLboolean, - tess_vertex *, GLboolean, - tess_vertex *, GLboolean); - -static GLdouble -twice_the_triangle_area(tess_vertex * va, tess_vertex * vb, tess_vertex * vc) -{ - return (vb->x - va->x) * (vc->y - va->y) - (vb->y - va->y) * (vc->x - - va->x); -} - -static GLboolean -left(GLdouble A, GLdouble B, GLdouble C, GLdouble x, GLdouble y) -{ - if (A * x + B * y + C > -EPSILON) - return GL_TRUE; - else - return GL_FALSE; -} - -static GLboolean -right(GLdouble A, GLdouble B, GLdouble C, GLdouble x, GLdouble y) -{ - if (A * x + B * y + C < EPSILON) - return GL_TRUE; - else - return GL_FALSE; -} - -static GLint -convex_ccw(tess_vertex * va, - tess_vertex * vb, tess_vertex * vc, GLUtriangulatorObj * tobj) -{ - GLdouble d; - - d = twice_the_triangle_area(va, vb, vc); - - if (d > EPSILON) { - return 1; - } - else if (d < -EPSILON) { - return 0; - } - else { - return -1; - } -} - -static GLint -convex_cw(tess_vertex * va, - tess_vertex * vb, tess_vertex * vc, GLUtriangulatorObj * tobj) -{ - GLdouble d; - - d = twice_the_triangle_area(va, vb, vc); - - if (d < -EPSILON) { - return 1; - } - else if (d > EPSILON) { - return 0; - } - else { - return -1; - } -} - -static GLboolean -diagonal_ccw(tess_vertex * va, - tess_vertex * vb, - GLUtriangulatorObj * tobj, tess_contour * contour) -{ - tess_vertex *vc = va->next, *vertex, *shadow_vertex; - struct - { - GLdouble A, B, C; - } - ac, cb, ba; - GLdouble x, y; - - GLint res = convex_ccw(va, vc, vb, tobj); - if (res == 0) - return GL_FALSE; - if (res == -1) - return GL_TRUE; - - ba.A = vb->y - va->y; - ba.B = va->x - vb->x; - ba.C = -ba.A * va->x - ba.B * va->y; - ac.A = va->y - vc->y; - ac.B = vc->x - va->x; - ac.C = -ac.A * vc->x - ac.B * vc->y; - cb.A = vc->y - vb->y; - cb.B = vb->x - vc->x; - cb.C = -cb.A * vb->x - cb.B * vb->y; - for (vertex = vb->next; vertex != va; vertex = vertex->next) { - shadow_vertex = vertex->shadow_vertex; - if (shadow_vertex != NULL && - (shadow_vertex == va || shadow_vertex == vb || shadow_vertex == vc)) - continue; - x = vertex->x; - y = vertex->y; - if (left(ba.A, ba.B, ba.C, x, y) && - left(ac.A, ac.B, ac.C, x, y) && left(cb.A, cb.B, cb.C, x, y)) - return GL_FALSE; - } - return GL_TRUE; -} - -static GLboolean -diagonal_cw(tess_vertex * va, - tess_vertex * vb, - GLUtriangulatorObj * tobj, tess_contour * contour) -{ - tess_vertex *vc = va->next, *vertex, *shadow_vertex; - struct - { - GLdouble A, B, C; - } - ac, cb, ba; - GLdouble x, y; - - GLint res = convex_cw(va, vc, vb, tobj); - if (res == 0) - return GL_FALSE; - if (res == -1) - return GL_TRUE; - - ba.A = vb->y - va->y; - ba.B = va->x - vb->x; - ba.C = -ba.A * va->x - ba.B * va->y; - ac.A = va->y - vc->y; - ac.B = vc->x - va->x; - ac.C = -ac.A * vc->x - ac.B * vc->y; - cb.A = vc->y - vb->y; - cb.B = vb->x - vc->x; - cb.C = -cb.A * vb->x - cb.B * vb->y; - for (vertex = vb->next; vertex != va; vertex = vertex->next) { - shadow_vertex = vertex->shadow_vertex; - if (shadow_vertex != NULL && - (shadow_vertex == va || shadow_vertex == vb || shadow_vertex == vc)) - continue; - x = vertex->x; - y = vertex->y; - if (right(ba.A, ba.B, ba.C, x, y) && - right(ac.A, ac.B, ac.C, x, y) && right(cb.A, cb.B, cb.C, x, y)) - return GL_FALSE; - } - return GL_TRUE; -} - -static void -clip_ear(GLUtriangulatorObj * tobj, tess_vertex * v, tess_contour * contour) -{ - emit_triangle(tobj, v->previous, v, v->next); - /* the first in the list */ - if (contour->vertices == v) { - contour->vertices = v->next; - contour->last_vertex->next = v->next; - v->next->previous = contour->last_vertex; - } - else - /* the last ? */ - if (contour->last_vertex == v) { - contour->vertices->previous = v->previous; - v->previous->next = v->next; - contour->last_vertex = v->previous; - } - else { - v->next->previous = v->previous; - v->previous->next = v->next; - } - free(v); - --(contour->vertex_cnt); -} - -static void -clip_ear_with_edge_flag(GLUtriangulatorObj * tobj, - tess_vertex * v, tess_contour * contour) -{ - emit_triangle_with_edge_flag(tobj, v->previous, v->previous->edge_flag, - v, v->edge_flag, v->next, GL_FALSE); - v->previous->edge_flag = GL_FALSE; - /* the first in the list */ - if (contour->vertices == v) { - contour->vertices = v->next; - contour->last_vertex->next = v->next; - v->next->previous = contour->last_vertex; - } - else - /* the last ? */ - if (contour->last_vertex == v) { - contour->vertices->previous = v->previous; - v->previous->next = v->next; - contour->last_vertex = v->previous; - } - else { - v->next->previous = v->previous; - v->previous->next = v->next; - } - free(v); - --(contour->vertex_cnt); -} - -static void -triangulate_ccw(GLUtriangulatorObj * tobj, tess_contour * contour) -{ - tess_vertex *vertex; - GLuint vertex_cnt = contour->vertex_cnt; - - while (vertex_cnt > 3) { - vertex = contour->vertices; - while (diagonal_ccw(vertex, vertex->next->next, tobj, contour) == - GL_FALSE && tobj->error == GLU_NO_ERROR) - vertex = vertex->next; - if (tobj->error != GLU_NO_ERROR) - return; - clip_ear(tobj, vertex->next, contour); - --vertex_cnt; - } -} - -static void -triangulate_cw(GLUtriangulatorObj * tobj, tess_contour * contour) -{ - tess_vertex *vertex; - GLuint vertex_cnt = contour->vertex_cnt; - - while (vertex_cnt > 3) { - vertex = contour->vertices; - while (diagonal_cw(vertex, vertex->next->next, tobj, contour) == - GL_FALSE && tobj->error == GLU_NO_ERROR) - vertex = vertex->next; - if (tobj->error != GLU_NO_ERROR) - return; - clip_ear(tobj, vertex->next, contour); - --vertex_cnt; - } -} - -static void -triangulate_ccw_with_edge_flag(GLUtriangulatorObj * tobj, - tess_contour * contour) -{ - tess_vertex *vertex; - GLuint vertex_cnt = contour->vertex_cnt; - - while (vertex_cnt > 3) { - vertex = contour->vertices; - while (diagonal_ccw(vertex, vertex->next->next, tobj, contour) == - GL_FALSE && tobj->error == GLU_NO_ERROR) - vertex = vertex->next; - if (tobj->error != GLU_NO_ERROR) - return; - clip_ear_with_edge_flag(tobj, vertex->next, contour); - --vertex_cnt; - } -} - -static void -triangulate_cw_with_edge_flag(GLUtriangulatorObj * tobj, - tess_contour * contour) -{ - tess_vertex *vertex; - GLuint vertex_cnt = contour->vertex_cnt; - - while (vertex_cnt > 3) { - vertex = contour->vertices; - while (diagonal_cw(vertex, vertex->next->next, tobj, contour) == - GL_FALSE && tobj->error == GLU_NO_ERROR) - vertex = vertex->next; - if (tobj->error != GLU_NO_ERROR) - return; - clip_ear_with_edge_flag(tobj, vertex->next, contour); - --vertex_cnt; - } -} - -void -tess_tesselate(GLUtriangulatorObj * tobj) -{ - tess_contour *contour; - - for (contour = tobj->contours; contour != NULL; contour = contour->next) { - if (contour->orientation == GLU_CCW) { - triangulate_ccw(tobj, contour); - } - else { - triangulate_cw(tobj, contour); - } - if (tobj->error != GLU_NO_ERROR) - return; - - /* emit the last triangle */ - emit_triangle(tobj, contour->vertices, contour->vertices->next, - contour->vertices->next->next); - } -} - -void -tess_tesselate_with_edge_flag(GLUtriangulatorObj * tobj) -{ - tess_contour *contour; - - edge_flag = GL_TRUE; - /* first callback with edgeFlag set to GL_TRUE */ - (tobj->callbacks.edgeFlag) (GL_TRUE); - - for (contour = tobj->contours; contour != NULL; contour = contour->next) { - if (contour->orientation == GLU_CCW) - triangulate_ccw_with_edge_flag(tobj, contour); - else - triangulate_cw_with_edge_flag(tobj, contour); - if (tobj->error != GLU_NO_ERROR) - return; - /* emit the last triangle */ - emit_triangle_with_edge_flag(tobj, contour->vertices, - contour->vertices->edge_flag, - contour->vertices->next, - contour->vertices->next->edge_flag, - contour->vertices->next->next, - contour->vertices->next->next->edge_flag); - } -} - -static void -emit_triangle(GLUtriangulatorObj * tobj, - tess_vertex * v1, tess_vertex * v2, tess_vertex * v3) -{ - (tobj->callbacks.begin) (GL_TRIANGLES); - (tobj->callbacks.vertex) (v1->data); - (tobj->callbacks.vertex) (v2->data); - (tobj->callbacks.vertex) (v3->data); - (tobj->callbacks.end) (); -} - -static void -emit_triangle_with_edge_flag(GLUtriangulatorObj * tobj, - tess_vertex * v1, - GLboolean edge_flag1, - tess_vertex * v2, - GLboolean edge_flag2, - tess_vertex * v3, GLboolean edge_flag3) -{ - (tobj->callbacks.begin) (GL_TRIANGLES); - if (edge_flag1 != edge_flag) { - edge_flag = (edge_flag == GL_TRUE ? GL_FALSE : GL_TRUE); - (tobj->callbacks.edgeFlag) (edge_flag); - } - (tobj->callbacks.vertex) (v1->data); - if (edge_flag2 != edge_flag) { - edge_flag = (edge_flag == GL_TRUE ? GL_FALSE : GL_TRUE); - (tobj->callbacks.edgeFlag) (edge_flag); - } - (tobj->callbacks.vertex) (v2->data); - if (edge_flag3 != edge_flag) { - edge_flag = (edge_flag == GL_TRUE ? GL_FALSE : GL_TRUE); - (tobj->callbacks.edgeFlag) (edge_flag); - } - (tobj->callbacks.vertex) (v3->data); - (tobj->callbacks.end) (); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/all.h b/nx-X11/extras/Mesa_6.4.2/src/glu/mini/all.h deleted file mode 100644 index d626bee937..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/all.h +++ /dev/null @@ -1,55 +0,0 @@ -/* $Id: all.h,v 1.2 2003/08/22 20:11:43 brianp Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * This file includes all .h files needed for the GLU source code for - * the purpose of precompiled headers. - * - * If the preprocessor symbol PCH is defined at compile time then each - * of the .c files will #include "all.h" only, instead of a bunch of - * individual .h files. - */ - - -#ifndef GLU_ALL_H -#define GLU_ALL_H - - -#ifndef PC_HEADER -This is an error. all.h should be included only if PCH is defined. -#endif - - -#include -#include -#include -#include -#include -#include "GL/gl.h" -#include "GL/glu.h" -#include "gluP.h" -#include "nurbs.h" -#include "tess.h" - - -#endif /*GLU_ALL_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/glu.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mini/glu.c deleted file mode 100644 index 5c7722c5f0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/glu.c +++ /dev/null @@ -1,417 +0,0 @@ -/* $Id: glu.c,v 1.2 2003/08/22 20:11:43 brianp Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * Copyright (C) 1995-2001 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include -#include -#include -#include "gluP.h" -#endif - - -/* - * Miscellaneous utility functions - */ - - -#ifndef M_PI -#define M_PI 3.1415926536 -#endif -#define EPS 0.00001 - -#ifndef GLU_INCOMPATIBLE_GL_VERSION -#define GLU_INCOMPATIBLE_GL_VERSION 100903 -#endif - - -void GLAPIENTRY -gluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez, - GLdouble centerx, GLdouble centery, GLdouble centerz, - GLdouble upx, GLdouble upy, GLdouble upz) -{ - GLfloat m[16]; - GLfloat x[3], y[3], z[3]; - GLfloat mag; - - /* Make rotation matrix */ - - /* Z vector */ - z[0] = eyex - centerx; - z[1] = eyey - centery; - z[2] = eyez - centerz; - mag = sqrt(z[0] * z[0] + z[1] * z[1] + z[2] * z[2]); - if (mag) { /* mpichler, 19950515 */ - z[0] /= mag; - z[1] /= mag; - z[2] /= mag; - } - - /* Y vector */ - y[0] = upx; - y[1] = upy; - y[2] = upz; - - /* X vector = Y cross Z */ - x[0] = y[1] * z[2] - y[2] * z[1]; - x[1] = -y[0] * z[2] + y[2] * z[0]; - x[2] = y[0] * z[1] - y[1] * z[0]; - - /* Recompute Y = Z cross X */ - y[0] = z[1] * x[2] - z[2] * x[1]; - y[1] = -z[0] * x[2] + z[2] * x[0]; - y[2] = z[0] * x[1] - z[1] * x[0]; - - /* mpichler, 19950515 */ - /* cross product gives area of parallelogram, which is < 1.0 for - * non-perpendicular unit-length vectors; so normalize x, y here - */ - - mag = sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]); - if (mag) { - x[0] /= mag; - x[1] /= mag; - x[2] /= mag; - } - - mag = sqrt(y[0] * y[0] + y[1] * y[1] + y[2] * y[2]); - if (mag) { - y[0] /= mag; - y[1] /= mag; - y[2] /= mag; - } - -#define M(row,col) m[col*4+row] - M(0, 0) = x[0]; - M(0, 1) = x[1]; - M(0, 2) = x[2]; - M(0, 3) = 0.0; - M(1, 0) = y[0]; - M(1, 1) = y[1]; - M(1, 2) = y[2]; - M(1, 3) = 0.0; - M(2, 0) = z[0]; - M(2, 1) = z[1]; - M(2, 2) = z[2]; - M(2, 3) = 0.0; - M(3, 0) = 0.0; - M(3, 1) = 0.0; - M(3, 2) = 0.0; - M(3, 3) = 1.0; -#undef M - glMultMatrixf(m); - - /* Translate Eye to Origin */ - glTranslatef(-eyex, -eyey, -eyez); - -} - - - -void GLAPIENTRY -gluOrtho2D(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top) -{ - glOrtho(left, right, bottom, top, -1.0, 1.0); -} - - - -static void -frustum(GLfloat left, GLfloat right, - GLfloat bottom, GLfloat top, - GLfloat nearval, GLfloat farval) -{ - GLfloat x, y, a, b, c, d; - GLfloat m[16]; - - x = (2.0 * nearval) / (right - left); - y = (2.0 * nearval) / (top - bottom); - a = (right + left) / (right - left); - b = (top + bottom) / (top - bottom); - c = -(farval + nearval) / ( farval - nearval); - d = -(2.0 * farval * nearval) / (farval - nearval); - -#define M(row,col) m[col*4+row] - M(0,0) = x; M(0,1) = 0.0F; M(0,2) = a; M(0,3) = 0.0F; - M(1,0) = 0.0F; M(1,1) = y; M(1,2) = b; M(1,3) = 0.0F; - M(2,0) = 0.0F; M(2,1) = 0.0F; M(2,2) = c; M(2,3) = d; - M(3,0) = 0.0F; M(3,1) = 0.0F; M(3,2) = -1.0F; M(3,3) = 0.0F; -#undef M - - glMultMatrixf(m); -} - - -void GLAPIENTRY -gluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar) -{ - GLfloat xmin, xmax, ymin, ymax; - - ymax = zNear * tan(fovy * M_PI / 360.0); - ymin = -ymax; - xmin = ymin * aspect; - xmax = ymax * aspect; - - /* don't call glFrustum() because of error semantics (covglu) */ - frustum(xmin, xmax, ymin, ymax, zNear, zFar); -} - - - -void GLAPIENTRY -gluPickMatrix(GLdouble x, GLdouble y, - GLdouble width, GLdouble height, GLint viewport[4]) -{ - GLfloat m[16]; - GLfloat sx, sy; - GLfloat tx, ty; - - sx = viewport[2] / width; - sy = viewport[3] / height; - tx = (viewport[2] + 2.0 * (viewport[0] - x)) / width; - ty = (viewport[3] + 2.0 * (viewport[1] - y)) / height; - -#define M(row,col) m[col*4+row] - M(0, 0) = sx; - M(0, 1) = 0.0; - M(0, 2) = 0.0; - M(0, 3) = tx; - M(1, 0) = 0.0; - M(1, 1) = sy; - M(1, 2) = 0.0; - M(1, 3) = ty; - M(2, 0) = 0.0; - M(2, 1) = 0.0; - M(2, 2) = 1.0; - M(2, 3) = 0.0; - M(3, 0) = 0.0; - M(3, 1) = 0.0; - M(3, 2) = 0.0; - M(3, 3) = 1.0; -#undef M - - glMultMatrixf(m); -} - - - -const GLubyte *GLAPIENTRY -gluErrorString(GLenum errorCode) -{ - static char *tess_error[] = { - "missing gluBeginPolygon", - "missing gluBeginContour", - "missing gluEndPolygon", - "missing gluEndContour", - "misoriented or self-intersecting loops", - "coincident vertices", - "colinear vertices", - "FIST recovery process fatal error" - }; - static char *nurbs_error[] = { - "spline order un-supported", - "too few knots", - "valid knot range is empty", - "decreasing knot sequence knot", - "knot multiplicity greater than order of spline", - "endcurve() must follow bgncurve()", - "bgncurve() must precede endcurve()", - "missing or extra geometric data", - "can't draw pwlcurves", - "missing bgncurve()", - "missing bgnsurface()", - "endtrim() must precede endsurface()", - "bgnsurface() must precede endsurface()", - "curve of improper type passed as trim curve", - "bgnsurface() must precede bgntrim()", - "endtrim() must follow bgntrim()", - "bgntrim() must precede endtrim()", - "invalid or missing trim curve", - "bgntrim() must precede pwlcurve()", - "pwlcurve referenced twice", - "pwlcurve and nurbscurve mixed", - "improper usage of trim data type", - "nurbscurve referenced twice", - "nurbscurve and pwlcurve mixed", - "nurbssurface referenced twice", - "invalid property", - "endsurface() must follow bgnsurface()", - "misoriented trim curves", - "intersecting trim curves", - "UNUSED", - "unconnected trim curves", - "unknown knot error", - "negative vertex count encountered", - "negative byte-stride encountered", - "unknown type descriptor", - "null control array or knot vector", - "duplicate point on pwlcurve" - }; - - /* GL Errors */ - if (errorCode == GL_NO_ERROR) { - return (GLubyte *) "no error"; - } - else if (errorCode == GL_INVALID_VALUE) { - return (GLubyte *) "invalid value"; - } - else if (errorCode == GL_INVALID_ENUM) { - return (GLubyte *) "invalid enum"; - } - else if (errorCode == GL_INVALID_OPERATION) { - return (GLubyte *) "invalid operation"; - } - else if (errorCode == GL_STACK_OVERFLOW) { - return (GLubyte *) "stack overflow"; - } - else if (errorCode == GL_STACK_UNDERFLOW) { - return (GLubyte *) "stack underflow"; - } - else if (errorCode == GL_OUT_OF_MEMORY) { - return (GLubyte *) "out of memory"; - } - /* GLU Errors */ - else if (errorCode == GLU_NO_ERROR) { - return (GLubyte *) "no error"; - } - else if (errorCode == GLU_INVALID_ENUM) { - return (GLubyte *) "invalid enum"; - } - else if (errorCode == GLU_INVALID_VALUE) { - return (GLubyte *) "invalid value"; - } - else if (errorCode == GLU_OUT_OF_MEMORY) { - return (GLubyte *) "out of memory"; - } - else if (errorCode == GLU_INCOMPATIBLE_GL_VERSION) { - return (GLubyte *) "incompatible GL version"; - } - else if (errorCode >= GLU_TESS_ERROR1 && errorCode <= GLU_TESS_ERROR8) { - return (GLubyte *) tess_error[errorCode - GLU_TESS_ERROR1]; - } - else if (errorCode >= GLU_NURBS_ERROR1 && errorCode <= GLU_NURBS_ERROR37) { - return (GLubyte *) nurbs_error[errorCode - GLU_NURBS_ERROR1]; - } - else { - return NULL; - } -} - - - -/* - * New in GLU 1.1 - */ - -const GLubyte *GLAPIENTRY -gluGetString(GLenum name) -{ - static char *extensions = "GL_EXT_abgr"; - static char *version = "1.1 Mesa 3.5"; - - switch (name) { - case GLU_EXTENSIONS: - return (GLubyte *) extensions; - case GLU_VERSION: - return (GLubyte *) version; - default: - return NULL; - } -} - - - -#if 0 /* gluGetProcAddressEXT not finalized yet! */ - -#ifdef __cplusplus - /* for BeOS R4.5 */ -void GLAPIENTRY(*gluGetProcAddressEXT(const GLubyte * procName)) (...) -#else -void (GLAPIENTRY * gluGetProcAddressEXT(const GLubyte * procName)) () -#endif -{ - struct proc - { - const char *name; - void *address; - }; - static struct proc procTable[] = { - {"gluGetProcAddressEXT", (void *) gluGetProcAddressEXT}, /* me! */ - - /* new 1.1 functions */ - {"gluGetString", (void *) gluGetString}, - - /* new 1.2 functions */ - {"gluTessBeginPolygon", (void *) gluTessBeginPolygon}, - {"gluTessBeginContour", (void *) gluTessBeginContour}, - {"gluTessEndContour", (void *) gluTessEndContour}, - {"gluTessEndPolygon", (void *) gluTessEndPolygon}, - {"gluGetTessProperty", (void *) gluGetTessProperty}, - - /* new 1.3 functions */ - - {NULL, NULL} - }; - GLuint i; - - for (i = 0; procTable[i].address; i++) { - if (strcmp((const char *) procName, procTable[i].name) == 0) - return (void (GLAPIENTRY *) ()) procTable[i].address; - } - - return NULL; -} - -#endif - - - -/* - * New in GLU 1.3 - */ -#ifdef GLU_VERSION_1_3 -GLboolean GLAPIENTRY -gluCheckExtension(const GLubyte *extName, const GLubyte * extString) -{ - assert(extName); - assert(extString); - { - const int len = strlen((const char *) extName); - const char *start = (const char *) extString; - - while (1) { - const char *c = strstr(start, (const char *) extName); - if (!c) - return GL_FALSE; - - if ((c == start || c[-1] == ' ') && (c[len] == ' ' || c[len] == 0)) - return GL_TRUE; - - start = c + len; - } - } -} -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/gluP.h b/nx-X11/extras/Mesa_6.4.2/src/glu/mini/gluP.h deleted file mode 100644 index 85fbc33c62..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/gluP.h +++ /dev/null @@ -1,142 +0,0 @@ -/* $Id: gluP.h,v 1.2 2003/08/22 20:11:43 brianp Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * This file allows the GLU code to be compiled either with the Mesa - * headers or with the real OpenGL headers. - */ - - -#ifndef GLUP_H -#define GLUP_H - - -#include -#include -#include - - -#if defined(_WIN32) && !defined(__WIN32__) -# define __WIN32__ -#endif - -#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN__)) -# pragma warning( disable : 4068 ) /* unknown pragma */ -# pragma warning( disable : 4710 ) /* function 'foo' not inlined */ -# pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */ -# pragma warning( disable : 4127 ) /* conditional expression is constant */ -# if defined(MESA_MINWARN) -# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */ -# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */ -# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */ -# pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */ -# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */ -# endif -# if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ -# define GLAPI __declspec(dllexport) -# define WGLAPI __declspec(dllexport) -# elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ -# define GLAPI __declspec(dllimport) -# define WGLAPI __declspec(dllimport) -# else /* for use with static link lib build of Win32 edition only */ -# define GLAPI extern -# define WGLAPI __declspec(dllimport) -# endif /* _STATIC_MESA support */ -# define GLAPIENTRY __stdcall -# define GLAPIENTRYP __stdcall * -# define GLCALLBACK __stdcall -# define GLCALLBACKP __stdcall * -# if defined(__CYGWIN__) -# define GLCALLBACKPCAST * -# else -# define GLCALLBACKPCAST __stdcall * -# endif -# define GLWINAPI __stdcall -# define GLWINAPIV __cdecl -#else -/* non-Windows compilation */ -# define GLAPI extern -# define GLAPIENTRY -# define GLAPIENTRYP * -# define GLCALLBACK -# define GLCALLBACKP * -# define GLCALLBACKPCAST * -# define GLWINAPI -# define GLWINAPIV -#endif /* WIN32 / CYGWIN bracket */ - -/* compatibility guard so we don't need to change client code */ - -#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP) -# define CALLBACK GLCALLBACK -typedef int (GLAPIENTRY *PROC)(); -typedef void *HGLRC; -typedef void *HDC; -typedef unsigned long COLORREF; -#endif - -#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) -# define WGL_FONT_LINES 0 -# define WGL_FONT_POLYGONS 1 -#ifndef _GNU_H_WINDOWS32_FUNCTIONS -# ifdef UNICODE -# define wglUseFontBitmaps wglUseFontBitmapsW -# define wglUseFontOutlines wglUseFontOutlinesW -# else -# define wglUseFontBitmaps wglUseFontBitmapsA -# define wglUseFontOutlines wglUseFontOutlinesA -# endif /* !UNICODE */ -#endif /* _GNU_H_WINDOWS32_FUNCTIONS */ -typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR; -typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT; -typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR; -#include -#endif - - - -#ifndef GLU_TESS_ERROR9 - /* If we're using the real OpenGL header files... */ -# define GLU_TESS_ERROR9 100159 -#endif - - -#define GLU_NO_ERROR GL_NO_ERROR - - -/* for Sun: */ -#ifdef SUNOS4 -#define MEMCPY( DST, SRC, BYTES) \ - memcpy( (char *) (DST), (char *) (SRC), (int) (BYTES) ) -#else -#define MEMCPY( DST, SRC, BYTES) \ - memcpy( (void *) (DST), (void *) (SRC), (size_t) (BYTES) ) -#endif - - -#ifndef NULL -# define NULL 0 -#endif - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/mipmap.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mini/mipmap.c deleted file mode 100644 index 97297729e7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/mipmap.c +++ /dev/null @@ -1,764 +0,0 @@ -/* $Id: mipmap.c,v 1.2 2003/08/22 20:11:43 brianp Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 3.4 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include -#include -#include "gluP.h" -#endif - - -/* - * Compute ceiling of integer quotient of A divided by B: - */ -#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 ) - - - -#ifdef EPSILON -#undef EPSILON -#endif -#define EPSILON 0.001 - - -/* To work around optimizer bug in MSVC4.1 */ -#if defined(__WIN32__) && !defined(OPENSTEP) -void -dummy(GLuint j, GLuint k) -{ -} -#else -#define dummy(J, K) -#endif - - -GLint GLAPIENTRY -gluScaleImage(GLenum format, - GLsizei widthin, GLsizei heightin, - GLenum typein, const void *datain, - GLsizei widthout, GLsizei heightout, - GLenum typeout, void *dataout) -{ - GLint components, i, j, k; - GLfloat *tempin, *tempout, f; - GLfloat sx, sy; - GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels; - GLint packrowlength, packalignment, packskiprows, packskippixels; - GLint sizein, sizeout; - GLint rowstride, rowlen; - - - /* Determine number of components per pixel */ - switch (format) { - case GL_COLOR_INDEX: - case GL_STENCIL_INDEX: - case GL_DEPTH_COMPONENT: - case GL_RED: - case GL_GREEN: - case GL_BLUE: - case GL_ALPHA: - case GL_LUMINANCE: - components = 1; - break; - case GL_LUMINANCE_ALPHA: - components = 2; - break; - case GL_RGB: - case GL_BGR: - components = 3; - break; - case GL_RGBA: - case GL_BGRA: -#ifdef GL_EXT_abgr - case GL_ABGR_EXT: -#endif - components = 4; - break; - default: - return GLU_INVALID_ENUM; - } - - /* Determine bytes per input datum */ - switch (typein) { - case GL_UNSIGNED_BYTE: - sizein = sizeof(GLubyte); - break; - case GL_BYTE: - sizein = sizeof(GLbyte); - break; - case GL_UNSIGNED_SHORT: - sizein = sizeof(GLushort); - break; - case GL_SHORT: - sizein = sizeof(GLshort); - break; - case GL_UNSIGNED_INT: - sizein = sizeof(GLuint); - break; - case GL_INT: - sizein = sizeof(GLint); - break; - case GL_FLOAT: - sizein = sizeof(GLfloat); - break; - case GL_BITMAP: - /* not implemented yet */ - default: - return GL_INVALID_ENUM; - } - - /* Determine bytes per output datum */ - switch (typeout) { - case GL_UNSIGNED_BYTE: - sizeout = sizeof(GLubyte); - break; - case GL_BYTE: - sizeout = sizeof(GLbyte); - break; - case GL_UNSIGNED_SHORT: - sizeout = sizeof(GLushort); - break; - case GL_SHORT: - sizeout = sizeof(GLshort); - break; - case GL_UNSIGNED_INT: - sizeout = sizeof(GLuint); - break; - case GL_INT: - sizeout = sizeof(GLint); - break; - case GL_FLOAT: - sizeout = sizeof(GLfloat); - break; - case GL_BITMAP: - /* not implemented yet */ - default: - return GL_INVALID_ENUM; - } - - /* Get glPixelStore state */ - glGetFloatv(GL_UNPACK_ROW_LENGTH, &f); unpackrowlength = (int)f; - glGetFloatv(GL_UNPACK_ALIGNMENT, &f); unpackalignment = (int)f; - glGetFloatv(GL_UNPACK_SKIP_ROWS, &f); unpackskiprows = (int)f; - glGetFloatv(GL_UNPACK_SKIP_PIXELS, &f); unpackskippixels = (int)f; - glGetFloatv(GL_PACK_ROW_LENGTH, &f); packrowlength = (int)f; - glGetFloatv(GL_PACK_ALIGNMENT, &f); packalignment = (int)f; - glGetFloatv(GL_PACK_SKIP_ROWS, &f); packskiprows = (int)f; - glGetFloatv(GL_PACK_SKIP_PIXELS, &f); packskippixels = (int)f; - - /* Allocate storage for intermediate images */ - tempin = (GLfloat *) malloc(widthin * heightin - * components * sizeof(GLfloat)); - if (!tempin) { - return GLU_OUT_OF_MEMORY; - } - tempout = (GLfloat *) malloc(widthout * heightout - * components * sizeof(GLfloat)); - if (!tempout) { - free(tempin); - return GLU_OUT_OF_MEMORY; - } - - - /* - * Unpack the pixel data and convert to floating point - */ - - if (unpackrowlength > 0) { - rowlen = unpackrowlength; - } - else { - rowlen = widthin; - } - if (sizein >= unpackalignment) { - rowstride = components * rowlen; - } - else { - rowstride = unpackalignment / sizein - * CEILING(components * rowlen * sizein, unpackalignment); - } - - switch (typein) { - case GL_UNSIGNED_BYTE: - k = 0; - for (i = 0; i < heightin; i++) { - GLubyte *ubptr = (GLubyte *) datain - + i * rowstride - + unpackskiprows * rowstride + unpackskippixels * components; - for (j = 0; j < widthin * components; j++) { - dummy(j, k); - tempin[k++] = (GLfloat) * ubptr++; - } - } - break; - case GL_BYTE: - k = 0; - for (i = 0; i < heightin; i++) { - GLbyte *bptr = (GLbyte *) datain - + i * rowstride - + unpackskiprows * rowstride + unpackskippixels * components; - for (j = 0; j < widthin * components; j++) { - dummy(j, k); - tempin[k++] = (GLfloat) * bptr++; - } - } - break; - case GL_UNSIGNED_SHORT: - k = 0; - for (i = 0; i < heightin; i++) { - GLushort *usptr = (GLushort *) datain - + i * rowstride - + unpackskiprows * rowstride + unpackskippixels * components; - for (j = 0; j < widthin * components; j++) { - dummy(j, k); - tempin[k++] = (GLfloat) * usptr++; - } - } - break; - case GL_SHORT: - k = 0; - for (i = 0; i < heightin; i++) { - GLshort *sptr = (GLshort *) datain - + i * rowstride - + unpackskiprows * rowstride + unpackskippixels * components; - for (j = 0; j < widthin * components; j++) { - dummy(j, k); - tempin[k++] = (GLfloat) * sptr++; - } - } - break; - case GL_UNSIGNED_INT: - k = 0; - for (i = 0; i < heightin; i++) { - GLuint *uiptr = (GLuint *) datain - + i * rowstride - + unpackskiprows * rowstride + unpackskippixels * components; - for (j = 0; j < widthin * components; j++) { - dummy(j, k); - tempin[k++] = (GLfloat) * uiptr++; - } - } - break; - case GL_INT: - k = 0; - for (i = 0; i < heightin; i++) { - GLint *iptr = (GLint *) datain - + i * rowstride - + unpackskiprows * rowstride + unpackskippixels * components; - for (j = 0; j < widthin * components; j++) { - dummy(j, k); - tempin[k++] = (GLfloat) * iptr++; - } - } - break; - case GL_FLOAT: - k = 0; - for (i = 0; i < heightin; i++) { - GLfloat *fptr = (GLfloat *) datain - + i * rowstride - + unpackskiprows * rowstride + unpackskippixels * components; - for (j = 0; j < widthin * components; j++) { - dummy(j, k); - tempin[k++] = *fptr++; - } - } - break; - default: - return GLU_INVALID_ENUM; - } - - - /* - * Scale the image! - */ - - if (widthout > 1) - sx = (GLfloat) (widthin - 1) / (GLfloat) (widthout - 1); - else - sx = (GLfloat) (widthin - 1); - if (heightout > 1) - sy = (GLfloat) (heightin - 1) / (GLfloat) (heightout - 1); - else - sy = (GLfloat) (heightin - 1); - -/*#define POINT_SAMPLE*/ -#ifdef POINT_SAMPLE - for (i = 0; i < heightout; i++) { - GLint ii = i * sy; - for (j = 0; j < widthout; j++) { - GLint jj = j * sx; - - GLfloat *src = tempin + (ii * widthin + jj) * components; - GLfloat *dst = tempout + (i * widthout + j) * components; - - for (k = 0; k < components; k++) { - *dst++ = *src++; - } - } - } -#else - if (sx < 1.0 && sy < 1.0) { - /* magnify both width and height: use weighted sample of 4 pixels */ - GLint i0, i1, j0, j1; - GLfloat alpha, beta; - GLfloat *src00, *src01, *src10, *src11; - GLfloat s1, s2; - GLfloat *dst; - - for (i = 0; i < heightout; i++) { - i0 = i * sy; - i1 = i0 + 1; - if (i1 >= heightin) - i1 = heightin - 1; -/* i1 = (i+1) * sy - EPSILON;*/ - alpha = i * sy - i0; - for (j = 0; j < widthout; j++) { - j0 = j * sx; - j1 = j0 + 1; - if (j1 >= widthin) - j1 = widthin - 1; -/* j1 = (j+1) * sx - EPSILON; */ - beta = j * sx - j0; - - /* compute weighted average of pixels in rect (i0,j0)-(i1,j1) */ - src00 = tempin + (i0 * widthin + j0) * components; - src01 = tempin + (i0 * widthin + j1) * components; - src10 = tempin + (i1 * widthin + j0) * components; - src11 = tempin + (i1 * widthin + j1) * components; - - dst = tempout + (i * widthout + j) * components; - - for (k = 0; k < components; k++) { - s1 = *src00++ * (1.0 - beta) + *src01++ * beta; - s2 = *src10++ * (1.0 - beta) + *src11++ * beta; - *dst++ = s1 * (1.0 - alpha) + s2 * alpha; - } - } - } - } - else { - /* shrink width and/or height: use an unweighted box filter */ - GLint i0, i1; - GLint j0, j1; - GLint ii, jj; - GLfloat sum, *dst; - - for (i = 0; i < heightout; i++) { - i0 = i * sy; - i1 = i0 + 1; - if (i1 >= heightin) - i1 = heightin - 1; -/* i1 = (i+1) * sy - EPSILON; */ - for (j = 0; j < widthout; j++) { - j0 = j * sx; - j1 = j0 + 1; - if (j1 >= widthin) - j1 = widthin - 1; -/* j1 = (j+1) * sx - EPSILON; */ - - dst = tempout + (i * widthout + j) * components; - - /* compute average of pixels in the rectangle (i0,j0)-(i1,j1) */ - for (k = 0; k < components; k++) { - sum = 0.0; - for (ii = i0; ii <= i1; ii++) { - for (jj = j0; jj <= j1; jj++) { - sum += *(tempin + (ii * widthin + jj) * components + k); - } - } - sum /= (j1 - j0 + 1) * (i1 - i0 + 1); - *dst++ = sum; - } - } - } - } -#endif - - - /* - * Return output image - */ - - if (packrowlength > 0) { - rowlen = packrowlength; - } - else { - rowlen = widthout; - } - if (sizeout >= packalignment) { - rowstride = components * rowlen; - } - else { - rowstride = packalignment / sizeout - * CEILING(components * rowlen * sizeout, packalignment); - } - - switch (typeout) { - case GL_UNSIGNED_BYTE: - k = 0; - for (i = 0; i < heightout; i++) { - GLubyte *ubptr = (GLubyte *) dataout - + i * rowstride - + packskiprows * rowstride + packskippixels * components; - for (j = 0; j < widthout * components; j++) { - dummy(j, k + i); - *ubptr++ = (GLubyte) tempout[k++]; - } - } - break; - case GL_BYTE: - k = 0; - for (i = 0; i < heightout; i++) { - GLbyte *bptr = (GLbyte *) dataout - + i * rowstride - + packskiprows * rowstride + packskippixels * components; - for (j = 0; j < widthout * components; j++) { - dummy(j, k + i); - *bptr++ = (GLbyte) tempout[k++]; - } - } - break; - case GL_UNSIGNED_SHORT: - k = 0; - for (i = 0; i < heightout; i++) { - GLushort *usptr = (GLushort *) dataout - + i * rowstride - + packskiprows * rowstride + packskippixels * components; - for (j = 0; j < widthout * components; j++) { - dummy(j, k + i); - *usptr++ = (GLushort) tempout[k++]; - } - } - break; - case GL_SHORT: - k = 0; - for (i = 0; i < heightout; i++) { - GLshort *sptr = (GLshort *) dataout - + i * rowstride - + packskiprows * rowstride + packskippixels * components; - for (j = 0; j < widthout * components; j++) { - dummy(j, k + i); - *sptr++ = (GLshort) tempout[k++]; - } - } - break; - case GL_UNSIGNED_INT: - k = 0; - for (i = 0; i < heightout; i++) { - GLuint *uiptr = (GLuint *) dataout - + i * rowstride - + packskiprows * rowstride + packskippixels * components; - for (j = 0; j < widthout * components; j++) { - dummy(j, k + i); - *uiptr++ = (GLuint) tempout[k++]; - } - } - break; - case GL_INT: - k = 0; - for (i = 0; i < heightout; i++) { - GLint *iptr = (GLint *) dataout - + i * rowstride - + packskiprows * rowstride + packskippixels * components; - for (j = 0; j < widthout * components; j++) { - dummy(j, k + i); - *iptr++ = (GLint) tempout[k++]; - } - } - break; - case GL_FLOAT: - k = 0; - for (i = 0; i < heightout; i++) { - GLfloat *fptr = (GLfloat *) dataout - + i * rowstride - + packskiprows * rowstride + packskippixels * components; - for (j = 0; j < widthout * components; j++) { - dummy(j, k + i); - *fptr++ = tempout[k++]; - } - } - break; - default: - return GLU_INVALID_ENUM; - } - - - /* free temporary image storage */ - free(tempin); - free(tempout); - - return 0; -} - - - -/* - * Return the largest k such that 2^k <= n. - */ -static GLint -ilog2(GLint n) -{ - GLint k; - - if (n <= 0) - return 0; - for (k = 0; n >>= 1; k++); - return k; -} - - - -/* - * Find the value nearest to n which is also a power of two. - */ -static GLint -round2(GLint n) -{ - GLint m; - - for (m = 1; m < n; m *= 2); - - /* m>=n */ - if (m - n <= n - m / 2) { - return m; - } - else { - return m / 2; - } -} - - -/* - * Given an pixel format and data type, return the number of bytes to - * store one pixel. - */ -static GLint -bytes_per_pixel(GLenum format, GLenum type) -{ - GLint n, m; - - switch (format) { - case GL_COLOR_INDEX: - case GL_STENCIL_INDEX: - case GL_DEPTH_COMPONENT: - case GL_RED: - case GL_GREEN: - case GL_BLUE: - case GL_ALPHA: - case GL_LUMINANCE: - n = 1; - break; - case GL_LUMINANCE_ALPHA: - n = 2; - break; - case GL_RGB: - case GL_BGR: - n = 3; - break; - case GL_RGBA: - case GL_BGRA: -#ifdef GL_EXT_abgr - case GL_ABGR_EXT: -#endif - n = 4; - break; - default: - n = 0; - } - - switch (type) { - case GL_UNSIGNED_BYTE: - m = sizeof(GLubyte); - break; - case GL_BYTE: - m = sizeof(GLbyte); - break; - case GL_BITMAP: - m = 1; - break; - case GL_UNSIGNED_SHORT: - m = sizeof(GLushort); - break; - case GL_SHORT: - m = sizeof(GLshort); - break; - case GL_UNSIGNED_INT: - m = sizeof(GLuint); - break; - case GL_INT: - m = sizeof(GLint); - break; - case GL_FLOAT: - m = sizeof(GLfloat); - break; - default: - m = 0; - } - - return n * m; -} - - - -/* - * WARNING: This function isn't finished and has never been tested!!!! - */ -GLint GLAPIENTRY -gluBuild1DMipmaps(GLenum target, GLint components, - GLsizei width, GLenum format, GLenum type, const void *data) -{ - return 0; -} - - - -GLint GLAPIENTRY -gluBuild2DMipmaps(GLenum target, GLint components, - GLsizei width, GLsizei height, GLenum format, - GLenum type, const void *data) -{ - GLint w, h; - GLint maxsize; - void *image, *newimage; - GLint neww, newh, level, bpp; - int error; - GLboolean done; - GLint retval = 0; - GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels; - GLint packrowlength, packalignment, packskiprows, packskippixels; - GLfloat f; - - if (width < 1 || height < 1) - return GLU_INVALID_VALUE; - - glGetFloatv(GL_MAX_TEXTURE_SIZE, &f); maxsize = (int)f; - - w = round2(width); - if (w > maxsize) { - w = maxsize; - } - h = round2(height); - if (h > maxsize) { - h = maxsize; - } - - bpp = bytes_per_pixel(format, type); - if (bpp == 0) { - /* probably a bad format or type enum */ - return GLU_INVALID_ENUM; - } - - /* Get current glPixelStore values */ - glGetFloatv(GL_UNPACK_ROW_LENGTH, &f); unpackrowlength = (int)f; - glGetFloatv(GL_UNPACK_ALIGNMENT, &f); unpackalignment = (int)f; - glGetFloatv(GL_UNPACK_SKIP_ROWS, &f); unpackskiprows = (int)f; - glGetFloatv(GL_UNPACK_SKIP_PIXELS, &f); unpackskippixels = (int)f; - glGetFloatv(GL_PACK_ROW_LENGTH, &f); packrowlength = (int)f; - glGetFloatv(GL_PACK_ALIGNMENT, &f); packalignment = (int)f; - glGetFloatv(GL_PACK_SKIP_ROWS, &f); packskiprows = (int)f; - glGetFloatv(GL_PACK_SKIP_PIXELS, &f); packskippixels = (int)f; - - /* set pixel packing */ - glPixelStorei(GL_PACK_ROW_LENGTH, 0); - glPixelStorei(GL_PACK_ALIGNMENT, 1); - glPixelStorei(GL_PACK_SKIP_ROWS, 0); - glPixelStorei(GL_PACK_SKIP_PIXELS, 0); - - done = GL_FALSE; - - if (w != width || h != height) { - /* must rescale image to get "top" mipmap texture image */ - image = malloc((w + 4) * h * bpp); - if (!image) { - return GLU_OUT_OF_MEMORY; - } - error = gluScaleImage(format, width, height, type, data, - w, h, type, image); - if (error) { - retval = error; - done = GL_TRUE; - } - } - else { - image = (void *) data; - } - - level = 0; - while (!done) { - if (image != data) { - /* set pixel unpacking */ - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - } - - glTexImage2D(target, level, components, w, h, 0, format, type, image); - - if (w == 1 && h == 1) - break; - - neww = (w < 2) ? 1 : w / 2; - newh = (h < 2) ? 1 : h / 2; - newimage = malloc((neww + 4) * newh * bpp); - if (!newimage) { - return GLU_OUT_OF_MEMORY; - } - - error = gluScaleImage(format, w, h, type, image, - neww, newh, type, newimage); - if (error) { - retval = error; - done = GL_TRUE; - } - - if (image != data) { - free(image); - } - image = newimage; - - w = neww; - h = newh; - level++; - } - - if (image != data) { - free(image); - } - - /* Restore original glPixelStore state */ - glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackrowlength); - glPixelStorei(GL_UNPACK_ALIGNMENT, unpackalignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackskiprows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackskippixels); - glPixelStorei(GL_PACK_ROW_LENGTH, packrowlength); - glPixelStorei(GL_PACK_ALIGNMENT, packalignment); - glPixelStorei(GL_PACK_SKIP_ROWS, packskiprows); - glPixelStorei(GL_PACK_SKIP_PIXELS, packskippixels); - - return retval; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/nurbs.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mini/nurbs.c deleted file mode 100644 index 93c0dd3ce2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/nurbs.c +++ /dev/null @@ -1,158 +0,0 @@ -/* $Id: nurbs.c,v 1.2 2003/08/22 20:11:43 brianp Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * NURBS implementation written by Bogdan Sikorski (bogdan@cira.it) - * See README2 for more info. - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include "gluP.h" -#include "nurbs.h" -#endif - - -void -call_user_error(GLUnurbsObj * nobj, GLenum error) -{ - nobj->error = error; - if (nobj->error_callback != NULL) { - (*(nobj->error_callback)) (error); - } - else { - printf("NURBS error %d %s\n", error, (char *) gluErrorString(error)); - } -} - - - -GLUnurbsObj *GLAPIENTRY -gluNewNurbsRenderer(void) -{ - GLUnurbsObj *n; - GLfloat tmp_viewport[4]; - GLint i, j; - - n = (GLUnurbsObj *) malloc(sizeof(GLUnurbsObj)); - return n; -} - - - -void GLAPIENTRY -gluDeleteNurbsRenderer(GLUnurbsObj * nobj) -{ - if (nobj) { - free(nobj); - } -} - - - -void GLAPIENTRY -gluLoadSamplingMatrices(GLUnurbsObj * nobj, - const GLfloat modelMatrix[16], - const GLfloat projMatrix[16], const GLint viewport[4]) -{ -} - - -void GLAPIENTRY -gluNurbsProperty(GLUnurbsObj * nobj, GLenum property, GLfloat value) -{ -} - - -void GLAPIENTRY -gluGetNurbsProperty(GLUnurbsObj * nobj, GLenum property, GLfloat * value) -{ -} - - - -void GLAPIENTRY -gluBeginCurve(GLUnurbsObj * nobj) -{ -} - - -void GLAPIENTRY -gluEndCurve(GLUnurbsObj * nobj) -{ -} - - -void GLAPIENTRY -gluNurbsCurve(GLUnurbsObj * nobj, GLint nknots, GLfloat * knot, - GLint stride, GLfloat * ctlarray, GLint order, GLenum type) -{ -} - - -void GLAPIENTRY -gluBeginSurface(GLUnurbsObj * nobj) -{ -} - - -void GLAPIENTRY -gluEndSurface(GLUnurbsObj * nobj) -{ -} - - -void GLAPIENTRY -gluNurbsSurface(GLUnurbsObj * nobj, - GLint sknot_count, GLfloat * sknot, - GLint tknot_count, GLfloat * tknot, - GLint s_stride, GLint t_stride, - GLfloat * ctrlarray, GLint sorder, GLint torder, GLenum type) -{ -} - - -void GLAPIENTRY -gluNurbsCallback(GLUnurbsObj * nobj, GLenum which, void (GLCALLBACK * fn) ()) -{ -} - -void GLAPIENTRY -gluBeginTrim(GLUnurbsObj * nobj) -{ -} - -void GLAPIENTRY -gluPwlCurve(GLUnurbsObj * nobj, GLint count, GLfloat * array, GLint stride, - GLenum type) -{ -} - -void GLAPIENTRY -gluEndTrim(GLUnurbsObj * nobj) -{ -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/nurbs.h b/nx-X11/extras/Mesa_6.4.2/src/glu/mini/nurbs.h deleted file mode 100644 index c9c9c094f1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/nurbs.h +++ /dev/null @@ -1,253 +0,0 @@ -/* $Id: nurbs.h,v 1.2 2003/08/22 20:11:43 brianp Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * NURBS implementation written by Bogdan Sikorski (bogdan@cira.it) - * See README2 for more info. - */ - - -#ifndef NURBS_H -#define NURBS_H - - -#define EPSILON 1e-06 /* epsilon for double precision compares */ - -typedef enum -{ - GLU_NURBS_CURVE, GLU_NURBS_SURFACE, GLU_NURBS_TRIM, GLU_NURBS_NO_TRIM, - GLU_NURBS_TRIM_DONE, GLU_NURBS_NONE -} -GLU_nurbs_enum; - -typedef enum -{ - GLU_TRIM_NURBS, GLU_TRIM_PWL -} -GLU_trim_enum; - -typedef struct -{ - GLint sknot_count; - GLfloat *sknot; - GLint tknot_count; - GLfloat *tknot; - GLint s_stride; - GLint t_stride; - GLfloat *ctrlarray; - GLint sorder; - GLint torder; - GLint dim; - GLenum type; -} -surface_attribs; - -typedef struct -{ - surface_attribs geom; - surface_attribs color; - surface_attribs texture; - surface_attribs normal; -} -nurbs_surface; - -typedef struct -{ - GLint knot_count; - GLfloat *knot; - GLint stride; - GLfloat *ctrlarray; - GLint order; - GLint dim; - GLenum type; -} -curve_attribs; - -typedef struct -{ - GLint pt_count; - GLfloat *ctrlarray; - GLint stride; - GLint dim; - GLenum type; -} -pwl_curve_attribs; - -typedef struct -{ - curve_attribs geom; - curve_attribs color; - curve_attribs texture; - curve_attribs normal; -} -nurbs_curve; - -typedef struct trim_list_str -{ - GLU_trim_enum trim_type; - union - { - pwl_curve_attribs pwl_curve; - curve_attribs nurbs_curve; - } - curve; - struct trim_list_str *next; -} -trim_list; - -typedef struct seg_trim_str -{ - GLfloat *points; - GLint pt_cnt, seg_array_len; - struct seg_trim_str *next; -} -trim_segments; - -typedef struct nurbs_trim_str -{ - trim_list *trim_loop; - trim_segments *segments; - struct nurbs_trim_str *next; -} -nurbs_trim; - -typedef struct -{ - GLfloat model[16], proj[16], viewport[4]; -} -culling_and_sampling_str; - -struct GLUnurbs -{ - GLboolean culling; - GLenum error; - void (GLCALLBACK * error_callback) (GLenum err); - GLenum display_mode; - GLU_nurbs_enum nurbs_type; - GLboolean auto_load_matrix; - culling_and_sampling_str sampling_matrices; - GLenum sampling_method; - GLfloat sampling_tolerance; - GLfloat parametric_tolerance; - GLint u_step, v_step; - nurbs_surface surface; - nurbs_curve curve; - nurbs_trim *trim; -}; - -typedef struct -{ - GLfloat *knot; - GLint nknots; - GLfloat *unified_knot; - GLint unified_nknots; - GLint order; - GLint t_min, t_max; - GLint delta_nknots; - GLboolean open_at_begin, open_at_end; - GLfloat *new_knot; - GLfloat *alpha; -} -knot_str_type; - -typedef struct -{ - GLfloat *geom_ctrl; - GLint geom_s_stride, geom_t_stride; - GLfloat **geom_offsets; - GLint geom_s_pt_cnt, geom_t_pt_cnt; - GLfloat *color_ctrl; - GLint color_s_stride, color_t_stride; - GLfloat **color_offsets; - GLint color_s_pt_cnt, color_t_pt_cnt; - GLfloat *normal_ctrl; - GLint normal_s_stride, normal_t_stride; - GLfloat **normal_offsets; - GLint normal_s_pt_cnt, normal_t_pt_cnt; - GLfloat *texture_ctrl; - GLint texture_s_stride, texture_t_stride; - GLfloat **texture_offsets; - GLint texture_s_pt_cnt, texture_t_pt_cnt; - GLint s_bezier_cnt, t_bezier_cnt; -} -new_ctrl_type; - -extern void call_user_error(GLUnurbsObj * nobj, GLenum error); - -extern GLenum test_knot(GLint nknots, GLfloat * knot, GLint order); - -extern GLenum explode_knot(knot_str_type * the_knot); - -extern GLenum calc_alphas(knot_str_type * the_knot); - -extern GLenum calc_new_ctrl_pts(GLfloat * ctrl, GLint stride, - knot_str_type * the_knot, GLint dim, - GLfloat ** new_ctrl, GLint * ncontrol); - -extern GLenum glu_do_sampling_crv(GLUnurbsObj * nobj, GLfloat * new_ctrl, - GLint n_ctrl, GLint order, GLint dim, - GLint ** factors); - -extern GLenum glu_do_sampling_3D(GLUnurbsObj * nobj, new_ctrl_type * new_ctrl, - int **sfactors, GLint ** tfactors); - -extern GLenum glu_do_sampling_uv(GLUnurbsObj * nobj, new_ctrl_type * new_ctrl, - int **sfactors, GLint ** tfactors); - -extern GLenum glu_do_sampling_param_3D(GLUnurbsObj * nobj, - new_ctrl_type * new_ctrl, - int **sfactors, GLint ** tfactors); - -extern GLboolean fine_culling_test_2D(GLUnurbsObj * nobj, GLfloat * ctrl, - GLint n_ctrl, GLint stride, GLint dim); - -extern GLboolean fine_culling_test_3D(GLUnurbsObj * nobj, GLfloat * ctrl, - GLint s_n_ctrl, GLint t_n_ctrl, - GLint s_stride, GLint t_stride, - GLint dim); - -extern void do_nurbs_curve(GLUnurbsObj * nobj); - -extern void do_nurbs_surface(GLUnurbsObj * nobj); - -extern GLenum patch_trimming(GLUnurbsObj * nobj, new_ctrl_type * new_ctrl, - GLint * sfactors, GLint * tfactors); - -extern void collect_unified_knot(knot_str_type * dest, knot_str_type * src, - GLfloat maximal_min_knot, - GLfloat minimal_max_knot); - -extern GLenum select_knot_working_range(GLUnurbsObj * nobj, - knot_str_type * geom_knot, - knot_str_type * color_knot, - knot_str_type * normal_knot, - knot_str_type * texture_knot); - -extern void free_unified_knots(knot_str_type * geom_knot, - knot_str_type * color_knot, - knot_str_type * normal_knot, - knot_str_type * texture_knot); - - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/nurbscrv.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mini/nurbscrv.c deleted file mode 100644 index 62d91b46d3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/nurbscrv.c +++ /dev/null @@ -1,133 +0,0 @@ -/* $Id: nurbscrv.c,v 1.2 2003/08/22 20:11:43 brianp Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * NURBS implementation written by Bogdan Sikorski (bogdan@cira.it) - * See README2 for more info. - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include "gluP.h" -#include "nurbs.h" -#endif - - - -/* main NURBS curve procedure */ -void -do_nurbs_curve(GLUnurbsObj * nobj) -{ - GLint geom_order, color_order = 0, normal_order = 0, texture_order = 0; - GLenum geom_type; - GLint n_ctrl; - GLfloat *new_geom_ctrl, *new_color_ctrl, *new_normal_ctrl, - *new_texture_ctrl; - GLfloat *geom_ctrl = 0, *color_ctrl = 0, *normal_ctrl = 0, *texture_ctrl = 0; - GLint *factors; - GLint i, j; - GLint geom_dim, color_dim = 0, normal_dim = 0, texture_dim = 0; - - /* test the user supplied data */ - if (test_nurbs_curves(nobj) != GLU_NO_ERROR) - return; - - if (convert_curves(nobj, &new_geom_ctrl, &n_ctrl, &new_color_ctrl, - &new_normal_ctrl, &new_texture_ctrl) != GLU_NO_ERROR) - return; - - geom_order = nobj->curve.geom.order; - geom_type = nobj->curve.geom.type; - geom_dim = nobj->curve.geom.dim; - - if (glu_do_sampling_crv(nobj, new_geom_ctrl, n_ctrl, geom_order, geom_dim, - &factors) != GLU_NO_ERROR) { - free(new_geom_ctrl); - if (new_color_ctrl) - free(new_color_ctrl); - if (new_normal_ctrl) - free(new_normal_ctrl); - if (new_texture_ctrl) - free(new_texture_ctrl); - return; - } - glEnable(geom_type); - if (new_color_ctrl) { - glEnable(nobj->curve.color.type); - color_dim = nobj->curve.color.dim; - color_ctrl = new_color_ctrl; - color_order = nobj->curve.color.order; - } - if (new_normal_ctrl) { - glEnable(nobj->curve.normal.type); - normal_dim = nobj->curve.normal.dim; - normal_ctrl = new_normal_ctrl; - normal_order = nobj->curve.normal.order; - } - if (new_texture_ctrl) { - glEnable(nobj->curve.texture.type); - texture_dim = nobj->curve.texture.dim; - texture_ctrl = new_texture_ctrl; - texture_order = nobj->curve.texture.order; - } - for (i = 0, j = 0, geom_ctrl = new_geom_ctrl; - i < n_ctrl; i += geom_order, j++, geom_ctrl += geom_order * geom_dim) { - if (fine_culling_test_2D - (nobj, geom_ctrl, geom_order, geom_dim, geom_dim)) { - color_ctrl += color_order * color_dim; - normal_ctrl += normal_order * normal_dim; - texture_ctrl += texture_order * texture_dim; - continue; - } - glMap1f(geom_type, 0.0, 1.0, geom_dim, geom_order, geom_ctrl); - if (new_color_ctrl) { - glMap1f(nobj->curve.color.type, 0.0, 1.0, color_dim, - color_order, color_ctrl); - color_ctrl += color_order * color_dim; - } - if (new_normal_ctrl) { - glMap1f(nobj->curve.normal.type, 0.0, 1.0, normal_dim, - normal_order, normal_ctrl); - normal_ctrl += normal_order * normal_dim; - } - if (new_texture_ctrl) { - glMap1f(nobj->curve.texture.type, 0.0, 1.0, texture_dim, - texture_order, texture_ctrl); - texture_ctrl += texture_order * texture_dim; - } - glMapGrid1f(factors[j], 0.0, 1.0); - glEvalMesh1(GL_LINE, 0, factors[j]); - } - free(new_geom_ctrl); - free(factors); - if (new_color_ctrl) - free(new_color_ctrl); - if (new_normal_ctrl) - free(new_normal_ctrl); - if (new_texture_ctrl) - free(new_texture_ctrl); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/polytest.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mini/polytest.c deleted file mode 100644 index 52f272a3cb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/polytest.c +++ /dev/null @@ -1,938 +0,0 @@ -/* $Id: polytest.c,v 1.2 2003/08/22 20:11:43 brianp Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * This file is part of the polygon tesselation code contributed by - * Bogdan Sikorski - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include "gluP.h" -#include "tess.h" -#endif - - - -static GLenum store_polygon_as_contour(GLUtriangulatorObj *); -static void free_current_polygon(tess_polygon *); -static void prepare_projection_info(GLUtriangulatorObj *); -static GLdouble twice_the_polygon_area(tess_vertex *, tess_vertex *); -static GLenum verify_edge_vertex_intersections(GLUtriangulatorObj *); -void tess_find_contour_hierarchies(GLUtriangulatorObj *); -static GLenum test_for_overlapping_contours(GLUtriangulatorObj *); -static GLenum contours_overlap(tess_contour *, tess_polygon *); -static GLenum is_contour_contained_in(tess_contour *, tess_contour *); -static void add_new_exterior(GLUtriangulatorObj *, tess_contour *); -static void add_new_interior(GLUtriangulatorObj *, tess_contour *, - tess_contour *); -static void add_interior_with_hierarchy_check(GLUtriangulatorObj *, - tess_contour *, tess_contour *); -static void reverse_hierarchy_and_add_exterior(GLUtriangulatorObj *, - tess_contour *, - tess_contour *); -static GLboolean point_in_polygon(tess_contour *, GLdouble, GLdouble); -static void shift_interior_to_exterior(GLUtriangulatorObj *, tess_contour *); -static void add_exterior_with_check(GLUtriangulatorObj *, tess_contour *, - tess_contour *); -static GLenum cut_out_hole(GLUtriangulatorObj *, tess_contour *, - tess_contour *); -static GLenum merge_hole_with_contour(GLUtriangulatorObj *, - tess_contour *, tess_contour *, - tess_vertex *, tess_vertex *); - -static GLenum -find_normal(GLUtriangulatorObj * tobj) -{ - tess_polygon *polygon = tobj->current_polygon; - tess_vertex *va, *vb, *vc; - GLdouble A, B, C; - GLdouble A0, A1, A2, B0, B1, B2; - - va = polygon->vertices; - vb = va->next; - A0 = vb->location[0] - va->location[0]; - A1 = vb->location[1] - va->location[1]; - A2 = vb->location[2] - va->location[2]; - for (vc = vb->next; vc != va; vc = vc->next) { - B0 = vc->location[0] - va->location[0]; - B1 = vc->location[1] - va->location[1]; - B2 = vc->location[2] - va->location[2]; - A = A1 * B2 - A2 * B1; - B = A2 * B0 - A0 * B2; - C = A0 * B1 - A1 * B0; - if (fabs(A) > EPSILON || fabs(B) > EPSILON || fabs(C) > EPSILON) { - polygon->A = A; - polygon->B = B; - polygon->C = C; - polygon->D = - -A * va->location[0] - B * va->location[1] - C * va->location[2]; - return GLU_NO_ERROR; - } - } - tess_call_user_error(tobj, GLU_TESS_ERROR7); - return GLU_ERROR; -} - -void -tess_test_polygon(GLUtriangulatorObj * tobj) -{ - tess_polygon *polygon = tobj->current_polygon; - - /* any vertices defined? */ - if (polygon->vertex_cnt < 3) { - free_current_polygon(polygon); - return; - } - /* wrap pointers */ - polygon->last_vertex->next = polygon->vertices; - polygon->vertices->previous = polygon->last_vertex; - /* determine the normal */ - if (find_normal(tobj) == GLU_ERROR) - return; - /* compare the normals of previously defined contours and this one */ - /* first contour define ? */ - if (tobj->contours == NULL) { - tobj->A = polygon->A; - tobj->B = polygon->B; - tobj->C = polygon->C; - tobj->D = polygon->D; - /* determine the best projection to use */ - if (fabs(polygon->A) > fabs(polygon->B)) - if (fabs(polygon->A) > fabs(polygon->C)) - tobj->projection = OYZ; - else - tobj->projection = OXY; - else if (fabs(polygon->B) > fabs(polygon->C)) - tobj->projection = OXZ; - else - tobj->projection = OXY; - } - else { - GLdouble a[3], b[3]; - tess_vertex *vertex = polygon->vertices; - - a[0] = tobj->A; - a[1] = tobj->B; - a[2] = tobj->C; - b[0] = polygon->A; - b[1] = polygon->B; - b[2] = polygon->C; - - /* compare the normals */ - if (fabs(a[1] * b[2] - a[2] * b[1]) > EPSILON || - fabs(a[2] * b[0] - a[0] * b[2]) > EPSILON || - fabs(a[0] * b[1] - a[1] * b[0]) > EPSILON) { - /* not coplanar */ - tess_call_user_error(tobj, GLU_TESS_ERROR9); - return; - } - /* the normals are parallel - test for plane equation */ - if (fabs(a[0] * vertex->location[0] + a[1] * vertex->location[1] + - a[2] * vertex->location[2] + tobj->D) > EPSILON) { - /* not the same plane */ - tess_call_user_error(tobj, GLU_TESS_ERROR9); - return; - } - } - prepare_projection_info(tobj); - if (verify_edge_vertex_intersections(tobj) == GLU_ERROR) - return; - if (test_for_overlapping_contours(tobj) == GLU_ERROR) - return; - if (store_polygon_as_contour(tobj) == GLU_ERROR) - return; -} - -static GLenum -test_for_overlapping_contours(GLUtriangulatorObj * tobj) -{ - tess_contour *contour; - tess_polygon *polygon; - - polygon = tobj->current_polygon; - for (contour = tobj->contours; contour != NULL; contour = contour->next) - if (contours_overlap(contour, polygon) != GLU_NO_ERROR) { - tess_call_user_error(tobj, GLU_TESS_ERROR5); - return GLU_ERROR; - } - return GLU_NO_ERROR; -} - -static GLenum -store_polygon_as_contour(GLUtriangulatorObj * tobj) -{ - tess_polygon *polygon = tobj->current_polygon; - tess_contour *contour = tobj->contours; - - /* the first contour defined */ - if (contour == NULL) { - if ((contour = (tess_contour *) malloc(sizeof(tess_contour))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - free_current_polygon(polygon); - return GLU_ERROR; - } - tobj->contours = tobj->last_contour = contour; - contour->next = contour->previous = NULL; - } - else { - if ((contour = (tess_contour *) malloc(sizeof(tess_contour))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - free_current_polygon(polygon); - return GLU_ERROR; - } - contour->previous = tobj->last_contour; - tobj->last_contour->next = contour; - tobj->last_contour = contour; - contour->next = NULL; - } - /* mark all vertices in new contour as not special */ - /* and all are boundary edges */ - { - tess_vertex *vertex; - GLuint vertex_cnt, i; - - for (vertex = polygon->vertices, i = 0, vertex_cnt = - polygon->vertex_cnt; i < vertex_cnt; vertex = vertex->next, i++) { - vertex->shadow_vertex = NULL; - vertex->edge_flag = GL_TRUE; - } - } - contour->vertex_cnt = polygon->vertex_cnt; - contour->area = polygon->area; - contour->orientation = polygon->orientation; - contour->type = GLU_UNKNOWN; - contour->vertices = polygon->vertices; - contour->last_vertex = polygon->last_vertex; - polygon->vertices = polygon->last_vertex = NULL; - polygon->vertex_cnt = 0; - ++(tobj->contour_cnt); - return GLU_NO_ERROR; -} - -static void -free_current_polygon(tess_polygon * polygon) -{ - tess_vertex *vertex, *vertex_tmp; - GLuint i; - - /* free current_polygon structures */ - for (vertex = polygon->vertices, i = 0; i < polygon->vertex_cnt; i++) { - vertex_tmp = vertex->next; - free(vertex); - vertex = vertex_tmp; - } - polygon->vertices = polygon->last_vertex = NULL; - polygon->vertex_cnt = 0; -} - -static void -prepare_projection_info(GLUtriangulatorObj * tobj) -{ - tess_polygon *polygon = tobj->current_polygon; - tess_vertex *vertex, *last_vertex_ptr; - GLdouble area; - - last_vertex_ptr = polygon->last_vertex; - switch (tobj->projection) { - case OXY: - for (vertex = polygon->vertices; vertex != last_vertex_ptr; - vertex = vertex->next) { - vertex->x = vertex->location[0]; - vertex->y = vertex->location[1]; - } - last_vertex_ptr->x = last_vertex_ptr->location[0]; - last_vertex_ptr->y = last_vertex_ptr->location[1]; - break; - case OXZ: - for (vertex = polygon->vertices; vertex != last_vertex_ptr; - vertex = vertex->next) { - vertex->x = vertex->location[0]; - vertex->y = vertex->location[2]; - } - last_vertex_ptr->x = last_vertex_ptr->location[0]; - last_vertex_ptr->y = last_vertex_ptr->location[2]; - break; - case OYZ: - for (vertex = polygon->vertices; vertex != last_vertex_ptr; - vertex = vertex->next) { - vertex->x = vertex->location[1]; - vertex->y = vertex->location[2]; - } - last_vertex_ptr->x = last_vertex_ptr->location[1]; - last_vertex_ptr->y = last_vertex_ptr->location[2]; - break; - } - area = twice_the_polygon_area(polygon->vertices, polygon->last_vertex); - if (area >= 0.0) { - polygon->orientation = GLU_CCW; - polygon->area = area; - } - else { - polygon->orientation = GLU_CW; - polygon->area = -area; - } -} - -static GLdouble -twice_the_polygon_area(tess_vertex * vertex, tess_vertex * last_vertex) -{ - tess_vertex *next; - GLdouble area, x, y; - - area = 0.0; - x = vertex->x; - y = vertex->y; - vertex = vertex->next; - for (; vertex != last_vertex; vertex = vertex->next) { - next = vertex->next; - area += - (vertex->x - x) * (next->y - y) - (vertex->y - y) * (next->x - x); - } - return area; -} - -/* test if edges ab and cd intersect */ -/* if not return GLU_NO_ERROR, else if cross return GLU_TESS_ERROR8, */ -/* else if adjacent return GLU_TESS_ERROR4 */ -static GLenum -edge_edge_intersect(tess_vertex * a, - tess_vertex * b, tess_vertex * c, tess_vertex * d) -{ - GLdouble denom, r, s; - GLdouble xba, ydc, yba, xdc, yac, xac; - - xba = b->x - a->x; - yba = b->y - a->y; - xdc = d->x - c->x; - ydc = d->y - c->y; - xac = a->x - c->x; - yac = a->y - c->y; - denom = xba * ydc - yba * xdc; - r = yac * xdc - xac * ydc; - /* parallel? */ - if (fabs(denom) < EPSILON) { - if (fabs(r) < EPSILON) { - /* colinear */ - if (fabs(xba) < EPSILON) { - /* compare the Y coordinate */ - if (yba > 0.0) { - if ( - (fabs(a->y - c->y) < EPSILON - && fabs(c->y - b->y) < EPSILON) - || (fabs(a->y - d->y) < EPSILON - && fabs(d->y - b->y) < - EPSILON)) return GLU_TESS_ERROR4; - - } - else { - if ( - (fabs(b->y - c->y) < EPSILON - && fabs(c->y - a->y) < EPSILON) - || (fabs(b->y - d->y) < EPSILON - && fabs(d->y - a->y) < - EPSILON)) return GLU_TESS_ERROR4; - } - } - else { - /* compare the X coordinate */ - if (xba > 0.0) { - if ( - (fabs(a->x - c->x) < EPSILON - && fabs(c->x - b->x) < EPSILON) - || (fabs(a->x - d->x) < EPSILON - && fabs(d->x - b->x) < - EPSILON)) return GLU_TESS_ERROR4; - } - else { - if ( - (fabs(b->x - c->x) < EPSILON - && fabs(c->x - a->x) < EPSILON) - || (fabs(b->x - d->x) < EPSILON - && fabs(d->x - a->x) < - EPSILON)) return GLU_TESS_ERROR4; - } - } - } - return GLU_NO_ERROR; - } - r /= denom; - s = (yac * xba - xac * yba) / denom; - /* test if one vertex lies on other edge */ - if (((fabs(r) < EPSILON || (r < 1.0 + EPSILON && r > 1.0 - EPSILON)) && - s > -EPSILON && s < 1.0 + EPSILON) || - ((fabs(s) < EPSILON || (s < 1.0 + EPSILON && s > 1.0 - EPSILON)) && - r > -EPSILON && r < 1.0 + EPSILON)) { - return GLU_TESS_ERROR4; - } - /* test for crossing */ - if (r > -EPSILON && r < 1.0 + EPSILON && s > -EPSILON && s < 1.0 + EPSILON) { - return GLU_TESS_ERROR8; - } - return GLU_NO_ERROR; -} - -static GLenum -verify_edge_vertex_intersections(GLUtriangulatorObj * tobj) -{ - tess_polygon *polygon = tobj->current_polygon; - tess_vertex *vertex1, *last_vertex, *vertex2; - GLenum test; - - last_vertex = polygon->last_vertex; - vertex1 = last_vertex; - for (vertex2 = vertex1->next->next; - vertex2->next != last_vertex; vertex2 = vertex2->next) { - test = edge_edge_intersect(vertex1, vertex1->next, vertex2, - vertex2->next); - if (test != GLU_NO_ERROR) { - tess_call_user_error(tobj, test); - return GLU_ERROR; - } - } - for (vertex1 = polygon->vertices; - vertex1->next->next != last_vertex; vertex1 = vertex1->next) { - for (vertex2 = vertex1->next->next; - vertex2 != last_vertex; vertex2 = vertex2->next) { - test = edge_edge_intersect(vertex1, vertex1->next, vertex2, - vertex2->next); - if (test != GLU_NO_ERROR) { - tess_call_user_error(tobj, test); - return GLU_ERROR; - } - } - } - return GLU_NO_ERROR; -} - -static int -#ifdef WIN32 - __cdecl -#endif -area_compare(const void *a, const void *b) -{ - GLdouble area1, area2; - - area1 = (*((tess_contour **) a))->area; - area2 = (*((tess_contour **) b))->area; - if (area1 < area2) - return 1; - if (area1 > area2) - return -1; - return 0; -} - -void -tess_find_contour_hierarchies(GLUtriangulatorObj * tobj) -{ - tess_contour **contours; /* dinamic array of pointers */ - tess_contour *tmp_contour_ptr = tobj->contours; - GLuint cnt, i; - GLenum result; - GLboolean hierarchy_changed; - - /* any contours? */ - if (tobj->contour_cnt < 2) { - tobj->contours->type = GLU_EXTERIOR; - return; - } - if ((contours = (tess_contour **) - malloc(sizeof(tess_contour *) * (tobj->contour_cnt))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - return; - } - for (tmp_contour_ptr = tobj->contours, cnt = 0; - tmp_contour_ptr != NULL; tmp_contour_ptr = tmp_contour_ptr->next) - contours[cnt++] = tmp_contour_ptr; - /* now sort the contours in decreasing area size order */ - qsort((void *) contours, (size_t) cnt, (size_t) sizeof(tess_contour *), - area_compare); - /* we leave just the first contour - remove others from list */ - tobj->contours = contours[0]; - tobj->contours->next = tobj->contours->previous = NULL; - tobj->last_contour = tobj->contours; - tobj->contour_cnt = 1; - /* first contour is the one with greatest area */ - /* must be EXTERIOR */ - tobj->contours->type = GLU_EXTERIOR; - tmp_contour_ptr = tobj->contours; - /* now we play! */ - for (i = 1; i < cnt; i++) { - hierarchy_changed = GL_FALSE; - for (tmp_contour_ptr = tobj->contours; - tmp_contour_ptr != NULL; tmp_contour_ptr = tmp_contour_ptr->next) { - if (tmp_contour_ptr->type == GLU_EXTERIOR) { - /* check if contour completely contained in EXTERIOR */ - result = is_contour_contained_in(tmp_contour_ptr, contours[i]); - switch (result) { - case GLU_INTERIOR: - /* now we have to check if contour is inside interiors */ - /* or not */ - /* any interiors? */ - if (tmp_contour_ptr->next != NULL && - tmp_contour_ptr->next->type == GLU_INTERIOR) { - /* for all interior, check if inside any of them */ - /* if not inside any of interiors, its another */ - /* interior */ - /* or it may contain some interiors, then change */ - /* the contained interiors to exterior ones */ - add_interior_with_hierarchy_check(tobj, - tmp_contour_ptr, - contours[i]); - } - else { - /* not in interior, add as new interior contour */ - add_new_interior(tobj, tmp_contour_ptr, contours[i]); - } - hierarchy_changed = GL_TRUE; - break; - case GLU_EXTERIOR: - /* ooops, the marked as EXTERIOR (contours[i]) is */ - /* actually an interior of tmp_contour_ptr */ - /* reverse the local hierarchy */ - reverse_hierarchy_and_add_exterior(tobj, tmp_contour_ptr, - contours[i]); - hierarchy_changed = GL_TRUE; - break; - case GLU_NO_ERROR: - break; - default: - abort(); - } - } - if (hierarchy_changed) - break; /* break from for loop */ - } - if (hierarchy_changed == GL_FALSE) { - /* disjoint with all contours, add to contour list */ - add_new_exterior(tobj, contours[i]); - } - } - free(contours); -} - -/* returns GLU_INTERIOR if inner is completey enclosed within outer */ -/* returns GLU_EXTERIOR if outer is completely enclosed within inner */ -/* returns GLU_NO_ERROR if contours are disjoint */ -static GLenum -is_contour_contained_in(tess_contour * outer, tess_contour * inner) -{ - GLenum relation_flag; - - /* set relation_flag to relation of containment of first inner vertex */ - /* regarding outer contour */ - if (point_in_polygon(outer, inner->vertices->x, inner->vertices->y)) - relation_flag = GLU_INTERIOR; - else - relation_flag = GLU_EXTERIOR; - if (relation_flag == GLU_INTERIOR) - return GLU_INTERIOR; - if (point_in_polygon(inner, outer->vertices->x, outer->vertices->y)) - return GLU_EXTERIOR; - return GLU_NO_ERROR; -} - -static GLboolean -point_in_polygon(tess_contour * contour, GLdouble x, GLdouble y) -{ - tess_vertex *v1, *v2; - GLuint i, vertex_cnt; - GLdouble xp1, yp1, xp2, yp2; - GLboolean tst; - - tst = GL_FALSE; - v1 = contour->vertices; - v2 = contour->vertices->previous; - for (i = 0, vertex_cnt = contour->vertex_cnt; i < vertex_cnt; i++) { - xp1 = v1->x; - yp1 = v1->y; - xp2 = v2->x; - yp2 = v2->y; - if ((((yp1 <= y) && (y < yp2)) || ((yp2 <= y) && (y < yp1))) && - (x < (xp2 - xp1) * (y - yp1) / (yp2 - yp1) + xp1)) - tst = (tst == GL_FALSE ? GL_TRUE : GL_FALSE); - v2 = v1; - v1 = v1->next; - } - return tst; -} - -static GLenum -contours_overlap(tess_contour * contour, tess_polygon * polygon) -{ - tess_vertex *vertex1, *vertex2; - GLuint vertex1_cnt, vertex2_cnt, i, j; - GLenum test; - - vertex1 = contour->vertices; - vertex2 = polygon->vertices; - vertex1_cnt = contour->vertex_cnt; - vertex2_cnt = polygon->vertex_cnt; - for (i = 0; i < vertex1_cnt; vertex1 = vertex1->next, i++) { - for (j = 0; j < vertex2_cnt; vertex2 = vertex2->next, j++) - if ((test = edge_edge_intersect(vertex1, vertex1->next, vertex2, - vertex2->next)) != GLU_NO_ERROR) - return test; - } - return GLU_NO_ERROR; -} - -static void -add_new_exterior(GLUtriangulatorObj * tobj, tess_contour * contour) -{ - contour->type = GLU_EXTERIOR; - contour->next = NULL; - contour->previous = tobj->last_contour; - tobj->last_contour->next = contour; - tobj->last_contour = contour; -} - -static void -add_new_interior(GLUtriangulatorObj * tobj, - tess_contour * outer, tess_contour * contour) -{ - contour->type = GLU_INTERIOR; - contour->next = outer->next; - contour->previous = outer; - if (outer->next != NULL) - outer->next->previous = contour; - outer->next = contour; - if (tobj->last_contour == outer) - tobj->last_contour = contour; -} - -static void -add_interior_with_hierarchy_check(GLUtriangulatorObj * tobj, - tess_contour * outer, - tess_contour * contour) -{ - tess_contour *ptr; - - /* for all interiors of outer check if they are interior of contour */ - /* if so, change that interior to exterior and move it of of the */ - /* interior sequence */ - if (outer->next != NULL && outer->next->type == GLU_INTERIOR) { - GLenum test; - - for (ptr = outer->next; ptr != NULL && ptr->type == GLU_INTERIOR; - ptr = ptr->next) { - test = is_contour_contained_in(ptr, contour); - switch (test) { - case GLU_INTERIOR: - /* contour is contained in one of the interiors */ - /* check if possibly contained in other exteriors */ - /* move ptr to first EXTERIOR */ - for (; ptr != NULL && ptr->type == GLU_INTERIOR; ptr = ptr->next); - if (ptr == NULL) - /* another exterior */ - add_new_exterior(tobj, contour); - else - add_exterior_with_check(tobj, ptr, contour); - return; - case GLU_EXTERIOR: - /* one of the interiors is contained in the contour */ - /* change it to EXTERIOR, and shift it away from the */ - /* interior sequence */ - shift_interior_to_exterior(tobj, ptr); - break; - case GLU_NO_ERROR: - /* disjoint */ - break; - default: - abort(); - } - } - } - /* add contour to the interior sequence */ - add_new_interior(tobj, outer, contour); -} - -static void -reverse_hierarchy_and_add_exterior(GLUtriangulatorObj * tobj, - tess_contour * outer, - tess_contour * contour) -{ - tess_contour *ptr; - - /* reverse INTERIORS to EXTERIORS */ - /* any INTERIORS? */ - if (outer->next != NULL && outer->next->type == GLU_INTERIOR) - for (ptr = outer->next; ptr != NULL && ptr->type == GLU_INTERIOR; - ptr = ptr->next) ptr->type = GLU_EXTERIOR; - /* the outer now becomes inner */ - outer->type = GLU_INTERIOR; - /* contour is the EXTERIOR */ - contour->next = outer; - if (tobj->contours == outer) { - /* first contour beeing reversed */ - contour->previous = NULL; - tobj->contours = contour; - } - else { - outer->previous->next = contour; - contour->previous = outer->previous; - } - outer->previous = contour; -} - -static void -shift_interior_to_exterior(GLUtriangulatorObj * tobj, tess_contour * contour) -{ - contour->previous->next = contour->next; - if (contour->next != NULL) - contour->next->previous = contour->previous; - else - tobj->last_contour = contour->previous; -} - -static void -add_exterior_with_check(GLUtriangulatorObj * tobj, - tess_contour * outer, tess_contour * contour) -{ - GLenum test; - - /* this contour might be interior to further exteriors - check */ - /* if not, just add as a new exterior */ - for (; outer != NULL && outer->type == GLU_EXTERIOR; outer = outer->next) { - test = is_contour_contained_in(outer, contour); - switch (test) { - case GLU_INTERIOR: - /* now we have to check if contour is inside interiors */ - /* or not */ - /* any interiors? */ - if (outer->next != NULL && outer->next->type == GLU_INTERIOR) { - /* for all interior, check if inside any of them */ - /* if not inside any of interiors, its another */ - /* interior */ - /* or it may contain some interiors, then change */ - /* the contained interiors to exterior ones */ - add_interior_with_hierarchy_check(tobj, outer, contour); - } - else { - /* not in interior, add as new interior contour */ - add_new_interior(tobj, outer, contour); - } - return; - case GLU_NO_ERROR: - /* disjoint */ - break; - default: - abort(); - } - } - /* add contour to the exterior sequence */ - add_new_exterior(tobj, contour); -} - -void -tess_handle_holes(GLUtriangulatorObj * tobj) -{ - tess_contour *contour, *hole; - GLenum exterior_orientation; - - /* verify hole orientation */ - for (contour = tobj->contours; contour != NULL;) { - exterior_orientation = contour->orientation; - for (contour = contour->next; - contour != NULL && contour->type == GLU_INTERIOR; - contour = contour->next) { - if (contour->orientation == exterior_orientation) { - tess_call_user_error(tobj, GLU_TESS_ERROR5); - return; - } - } - } - /* now cut-out holes */ - for (contour = tobj->contours; contour != NULL;) { - hole = contour->next; - while (hole != NULL && hole->type == GLU_INTERIOR) { - if (cut_out_hole(tobj, contour, hole) == GLU_ERROR) - return; - hole = contour->next; - } - contour = contour->next; - } -} - -static GLenum -cut_out_hole(GLUtriangulatorObj * tobj, - tess_contour * contour, tess_contour * hole) -{ - tess_contour *tmp_hole; - tess_vertex *v1, *v2, *tmp_vertex; - GLuint vertex1_cnt, vertex2_cnt, tmp_vertex_cnt; - GLuint i, j, k; - GLenum test = 0; - - /* find an edge connecting contour and hole not intersecting any other */ - /* edge belonging to either the contour or any of the other holes */ - for (v1 = contour->vertices, vertex1_cnt = contour->vertex_cnt, i = 0; - i < vertex1_cnt; i++, v1 = v1->next) { - for (v2 = hole->vertices, vertex2_cnt = hole->vertex_cnt, j = 0; - j < vertex2_cnt; j++, v2 = v2->next) { - /* does edge (v1,v2) intersect any edge of contour */ - for (tmp_vertex = contour->vertices, tmp_vertex_cnt = - contour->vertex_cnt, k = 0; k < tmp_vertex_cnt; - tmp_vertex = tmp_vertex->next, k++) { - /* skip edge tests for edges directly connected */ - if (v1 == tmp_vertex || v1 == tmp_vertex->next) - continue; - test = edge_edge_intersect(v1, v2, tmp_vertex, tmp_vertex->next); - if (test != GLU_NO_ERROR) - break; - } - if (test == GLU_NO_ERROR) { - /* does edge (v1,v2) intersect any edge of hole */ - for (tmp_vertex = hole->vertices, - tmp_vertex_cnt = hole->vertex_cnt, k = 0; - k < tmp_vertex_cnt; tmp_vertex = tmp_vertex->next, k++) { - /* skip edge tests for edges directly connected */ - if (v2 == tmp_vertex || v2 == tmp_vertex->next) - continue; - test = - edge_edge_intersect(v1, v2, tmp_vertex, tmp_vertex->next); - if (test != GLU_NO_ERROR) - break; - } - if (test == GLU_NO_ERROR) { - /* does edge (v1,v2) intersect any other hole? */ - for (tmp_hole = hole->next; - tmp_hole != NULL && tmp_hole->type == GLU_INTERIOR; - tmp_hole = tmp_hole->next) { - /* does edge (v1,v2) intersect any edge of hole */ - for (tmp_vertex = tmp_hole->vertices, - tmp_vertex_cnt = tmp_hole->vertex_cnt, k = 0; - k < tmp_vertex_cnt; tmp_vertex = tmp_vertex->next, k++) { - test = edge_edge_intersect(v1, v2, tmp_vertex, - tmp_vertex->next); - if (test != GLU_NO_ERROR) - break; - } - if (test != GLU_NO_ERROR) - break; - } - } - } - if (test == GLU_NO_ERROR) { - /* edge (v1,v2) is good for eliminating the hole */ - if (merge_hole_with_contour(tobj, contour, hole, v1, v2) - == GLU_NO_ERROR) - return GLU_NO_ERROR; - else - return GLU_ERROR; - } - } - } - /* other holes are blocking all possible connections of hole */ - /* with contour, we shift this hole as the last hole and retry */ - for (tmp_hole = hole; - tmp_hole != NULL && tmp_hole->type == GLU_INTERIOR; - tmp_hole = tmp_hole->next); - contour->next = hole->next; - hole->next->previous = contour; - if (tmp_hole == NULL) { - /* last EXTERIOR contour, shift hole as last contour */ - hole->next = NULL; - hole->previous = tobj->last_contour; - tobj->last_contour->next = hole; - tobj->last_contour = hole; - } - else { - tmp_hole->previous->next = hole; - hole->previous = tmp_hole->previous; - tmp_hole->previous = hole; - hole->next = tmp_hole; - } - hole = contour->next; - /* try once again - recurse */ - return cut_out_hole(tobj, contour, hole); -} - -static GLenum -merge_hole_with_contour(GLUtriangulatorObj * tobj, - tess_contour * contour, - tess_contour * hole, - tess_vertex * v1, tess_vertex * v2) -{ - tess_vertex *v1_new, *v2_new; - - /* make copies of v1 and v2, place them respectively after their originals */ - if ((v1_new = (tess_vertex *) malloc(sizeof(tess_vertex))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - return GLU_ERROR; - } - if ((v2_new = (tess_vertex *) malloc(sizeof(tess_vertex))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - return GLU_ERROR; - } - v1_new->edge_flag = GL_TRUE; - v1_new->data = v1->data; - v1_new->location[0] = v1->location[0]; - v1_new->location[1] = v1->location[1]; - v1_new->location[2] = v1->location[2]; - v1_new->x = v1->x; - v1_new->y = v1->y; - v1_new->shadow_vertex = v1; - v1->shadow_vertex = v1_new; - v1_new->next = v1->next; - v1_new->previous = v1; - v1->next->previous = v1_new; - v1->next = v1_new; - v2_new->edge_flag = GL_TRUE; - v2_new->data = v2->data; - v2_new->location[0] = v2->location[0]; - v2_new->location[1] = v2->location[1]; - v2_new->location[2] = v2->location[2]; - v2_new->x = v2->x; - v2_new->y = v2->y; - v2_new->shadow_vertex = v2; - v2->shadow_vertex = v2_new; - v2_new->next = v2->next; - v2_new->previous = v2; - v2->next->previous = v2_new; - v2->next = v2_new; - /* link together the two lists */ - v1->next = v2_new; - v2_new->previous = v1; - v2->next = v1_new; - v1_new->previous = v2; - /* update the vertex count of the contour */ - contour->vertex_cnt += hole->vertex_cnt + 2; - /* remove the INTERIOR contour */ - contour->next = hole->next; - if (hole->next != NULL) - hole->next->previous = contour; - free(hole); - /* update tobj structure */ - --(tobj->contour_cnt); - if (contour->last_vertex == v1) - contour->last_vertex = v1_new; - /* mark two vertices with edge_flag */ - v2->edge_flag = GL_FALSE; - v1->edge_flag = GL_FALSE; - return GLU_NO_ERROR; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/project.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mini/project.c deleted file mode 100644 index a2747de55f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/project.c +++ /dev/null @@ -1,402 +0,0 @@ -/* $Id: project.c,v 1.2 2003/08/22 20:11:43 brianp Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include -#include "gluP.h" -#endif - - -/* - * This code was contributed by Marc Buffat (buffat@mecaflu.ec-lyon.fr). - * Thanks Marc!!! - */ - - - -/* implementation de gluProject et gluUnproject */ -/* M. Buffat 17/2/95 */ - - - -/* - * Transform a point (column vector) by a 4x4 matrix. I.e. out = m * in - * Input: m - the 4x4 matrix - * in - the 4x1 vector - * Output: out - the resulting 4x1 vector. - */ -static void -transform_point(GLdouble out[4], const GLdouble m[16], const GLdouble in[4]) -{ -#define M(row,col) m[col*4+row] - out[0] = - M(0, 0) * in[0] + M(0, 1) * in[1] + M(0, 2) * in[2] + M(0, 3) * in[3]; - out[1] = - M(1, 0) * in[0] + M(1, 1) * in[1] + M(1, 2) * in[2] + M(1, 3) * in[3]; - out[2] = - M(2, 0) * in[0] + M(2, 1) * in[1] + M(2, 2) * in[2] + M(2, 3) * in[3]; - out[3] = - M(3, 0) * in[0] + M(3, 1) * in[1] + M(3, 2) * in[2] + M(3, 3) * in[3]; -#undef M -} - - - - -/* - * Perform a 4x4 matrix multiplication (product = a x b). - * Input: a, b - matrices to multiply - * Output: product - product of a and b - */ -static void -matmul(GLdouble * product, const GLdouble * a, const GLdouble * b) -{ - /* This matmul was contributed by Thomas Malik */ - GLdouble temp[16]; - GLint i; - -#define A(row,col) a[(col<<2)+row] -#define B(row,col) b[(col<<2)+row] -#define T(row,col) temp[(col<<2)+row] - - /* i-te Zeile */ - for (i = 0; i < 4; i++) { - T(i, 0) = - A(i, 0) * B(0, 0) + A(i, 1) * B(1, 0) + A(i, 2) * B(2, 0) + A(i, - 3) * - B(3, 0); - T(i, 1) = - A(i, 0) * B(0, 1) + A(i, 1) * B(1, 1) + A(i, 2) * B(2, 1) + A(i, - 3) * - B(3, 1); - T(i, 2) = - A(i, 0) * B(0, 2) + A(i, 1) * B(1, 2) + A(i, 2) * B(2, 2) + A(i, - 3) * - B(3, 2); - T(i, 3) = - A(i, 0) * B(0, 3) + A(i, 1) * B(1, 3) + A(i, 2) * B(2, 3) + A(i, - 3) * - B(3, 3); - } - -#undef A -#undef B -#undef T - MEMCPY(product, temp, 16 * sizeof(GLdouble)); -} - - - -/* - * Compute inverse of 4x4 transformation matrix. - * Code contributed by Jacques Leroy jle@star.be - * Return GL_TRUE for success, GL_FALSE for failure (singular matrix) - */ -static GLboolean -invert_matrix(const GLdouble * m, GLdouble * out) -{ -/* NB. OpenGL Matrices are COLUMN major. */ -#define SWAP_ROWS(a, b) { GLdouble *_tmp = a; (a)=(b); (b)=_tmp; } -#define MAT(m,r,c) (m)[(c)*4+(r)] - - GLdouble wtmp[4][8]; - GLdouble m0, m1, m2, m3, s; - GLdouble *r0, *r1, *r2, *r3; - - r0 = wtmp[0], r1 = wtmp[1], r2 = wtmp[2], r3 = wtmp[3]; - - r0[0] = MAT(m, 0, 0), r0[1] = MAT(m, 0, 1), - r0[2] = MAT(m, 0, 2), r0[3] = MAT(m, 0, 3), - r0[4] = 1.0, r0[5] = r0[6] = r0[7] = 0.0, - r1[0] = MAT(m, 1, 0), r1[1] = MAT(m, 1, 1), - r1[2] = MAT(m, 1, 2), r1[3] = MAT(m, 1, 3), - r1[5] = 1.0, r1[4] = r1[6] = r1[7] = 0.0, - r2[0] = MAT(m, 2, 0), r2[1] = MAT(m, 2, 1), - r2[2] = MAT(m, 2, 2), r2[3] = MAT(m, 2, 3), - r2[6] = 1.0, r2[4] = r2[5] = r2[7] = 0.0, - r3[0] = MAT(m, 3, 0), r3[1] = MAT(m, 3, 1), - r3[2] = MAT(m, 3, 2), r3[3] = MAT(m, 3, 3), - r3[7] = 1.0, r3[4] = r3[5] = r3[6] = 0.0; - - /* choose pivot - or die */ - if (fabs(r3[0]) > fabs(r2[0])) - SWAP_ROWS(r3, r2); - if (fabs(r2[0]) > fabs(r1[0])) - SWAP_ROWS(r2, r1); - if (fabs(r1[0]) > fabs(r0[0])) - SWAP_ROWS(r1, r0); - if (0.0 == r0[0]) - return GL_FALSE; - - /* eliminate first variable */ - m1 = r1[0] / r0[0]; - m2 = r2[0] / r0[0]; - m3 = r3[0] / r0[0]; - s = r0[1]; - r1[1] -= m1 * s; - r2[1] -= m2 * s; - r3[1] -= m3 * s; - s = r0[2]; - r1[2] -= m1 * s; - r2[2] -= m2 * s; - r3[2] -= m3 * s; - s = r0[3]; - r1[3] -= m1 * s; - r2[3] -= m2 * s; - r3[3] -= m3 * s; - s = r0[4]; - if (s != 0.0) { - r1[4] -= m1 * s; - r2[4] -= m2 * s; - r3[4] -= m3 * s; - } - s = r0[5]; - if (s != 0.0) { - r1[5] -= m1 * s; - r2[5] -= m2 * s; - r3[5] -= m3 * s; - } - s = r0[6]; - if (s != 0.0) { - r1[6] -= m1 * s; - r2[6] -= m2 * s; - r3[6] -= m3 * s; - } - s = r0[7]; - if (s != 0.0) { - r1[7] -= m1 * s; - r2[7] -= m2 * s; - r3[7] -= m3 * s; - } - - /* choose pivot - or die */ - if (fabs(r3[1]) > fabs(r2[1])) - SWAP_ROWS(r3, r2); - if (fabs(r2[1]) > fabs(r1[1])) - SWAP_ROWS(r2, r1); - if (0.0 == r1[1]) - return GL_FALSE; - - /* eliminate second variable */ - m2 = r2[1] / r1[1]; - m3 = r3[1] / r1[1]; - r2[2] -= m2 * r1[2]; - r3[2] -= m3 * r1[2]; - r2[3] -= m2 * r1[3]; - r3[3] -= m3 * r1[3]; - s = r1[4]; - if (0.0 != s) { - r2[4] -= m2 * s; - r3[4] -= m3 * s; - } - s = r1[5]; - if (0.0 != s) { - r2[5] -= m2 * s; - r3[5] -= m3 * s; - } - s = r1[6]; - if (0.0 != s) { - r2[6] -= m2 * s; - r3[6] -= m3 * s; - } - s = r1[7]; - if (0.0 != s) { - r2[7] -= m2 * s; - r3[7] -= m3 * s; - } - - /* choose pivot - or die */ - if (fabs(r3[2]) > fabs(r2[2])) - SWAP_ROWS(r3, r2); - if (0.0 == r2[2]) - return GL_FALSE; - - /* eliminate third variable */ - m3 = r3[2] / r2[2]; - r3[3] -= m3 * r2[3], r3[4] -= m3 * r2[4], - r3[5] -= m3 * r2[5], r3[6] -= m3 * r2[6], r3[7] -= m3 * r2[7]; - - /* last check */ - if (0.0 == r3[3]) - return GL_FALSE; - - s = 1.0 / r3[3]; /* now back substitute row 3 */ - r3[4] *= s; - r3[5] *= s; - r3[6] *= s; - r3[7] *= s; - - m2 = r2[3]; /* now back substitute row 2 */ - s = 1.0 / r2[2]; - r2[4] = s * (r2[4] - r3[4] * m2), r2[5] = s * (r2[5] - r3[5] * m2), - r2[6] = s * (r2[6] - r3[6] * m2), r2[7] = s * (r2[7] - r3[7] * m2); - m1 = r1[3]; - r1[4] -= r3[4] * m1, r1[5] -= r3[5] * m1, - r1[6] -= r3[6] * m1, r1[7] -= r3[7] * m1; - m0 = r0[3]; - r0[4] -= r3[4] * m0, r0[5] -= r3[5] * m0, - r0[6] -= r3[6] * m0, r0[7] -= r3[7] * m0; - - m1 = r1[2]; /* now back substitute row 1 */ - s = 1.0 / r1[1]; - r1[4] = s * (r1[4] - r2[4] * m1), r1[5] = s * (r1[5] - r2[5] * m1), - r1[6] = s * (r1[6] - r2[6] * m1), r1[7] = s * (r1[7] - r2[7] * m1); - m0 = r0[2]; - r0[4] -= r2[4] * m0, r0[5] -= r2[5] * m0, - r0[6] -= r2[6] * m0, r0[7] -= r2[7] * m0; - - m0 = r0[1]; /* now back substitute row 0 */ - s = 1.0 / r0[0]; - r0[4] = s * (r0[4] - r1[4] * m0), r0[5] = s * (r0[5] - r1[5] * m0), - r0[6] = s * (r0[6] - r1[6] * m0), r0[7] = s * (r0[7] - r1[7] * m0); - - MAT(out, 0, 0) = r0[4]; - MAT(out, 0, 1) = r0[5], MAT(out, 0, 2) = r0[6]; - MAT(out, 0, 3) = r0[7], MAT(out, 1, 0) = r1[4]; - MAT(out, 1, 1) = r1[5], MAT(out, 1, 2) = r1[6]; - MAT(out, 1, 3) = r1[7], MAT(out, 2, 0) = r2[4]; - MAT(out, 2, 1) = r2[5], MAT(out, 2, 2) = r2[6]; - MAT(out, 2, 3) = r2[7], MAT(out, 3, 0) = r3[4]; - MAT(out, 3, 1) = r3[5], MAT(out, 3, 2) = r3[6]; - MAT(out, 3, 3) = r3[7]; - - return GL_TRUE; - -#undef MAT -#undef SWAP_ROWS -} - - - -/* projection du point (objx,objy,obz) sur l'ecran (winx,winy,winz) */ -GLint GLAPIENTRY -gluProject(GLdouble objx, GLdouble objy, GLdouble objz, - const GLdouble model[16], const GLdouble proj[16], - const GLint viewport[4], - GLdouble * winx, GLdouble * winy, GLdouble * winz) -{ - /* matrice de transformation */ - GLdouble in[4], out[4]; - - /* initilise la matrice et le vecteur a transformer */ - in[0] = objx; - in[1] = objy; - in[2] = objz; - in[3] = 1.0; - transform_point(out, model, in); - transform_point(in, proj, out); - - /* d'ou le resultat normalise entre -1 et 1 */ - if (in[3] == 0.0) - return GL_FALSE; - - in[0] /= in[3]; - in[1] /= in[3]; - in[2] /= in[3]; - - /* en coordonnees ecran */ - *winx = viewport[0] + (1 + in[0]) * viewport[2] / 2; - *winy = viewport[1] + (1 + in[1]) * viewport[3] / 2; - /* entre 0 et 1 suivant z */ - *winz = (1 + in[2]) / 2; - return GL_TRUE; -} - - - -/* transformation du point ecran (winx,winy,winz) en point objet */ -GLint GLAPIENTRY -gluUnProject(GLdouble winx, GLdouble winy, GLdouble winz, - const GLdouble model[16], const GLdouble proj[16], - const GLint viewport[4], - GLdouble * objx, GLdouble * objy, GLdouble * objz) -{ - /* matrice de transformation */ - GLdouble m[16], A[16]; - GLdouble in[4], out[4]; - - /* transformation coordonnees normalisees entre -1 et 1 */ - in[0] = (winx - viewport[0]) * 2 / viewport[2] - 1.0; - in[1] = (winy - viewport[1]) * 2 / viewport[3] - 1.0; - in[2] = 2 * winz - 1.0; - in[3] = 1.0; - - /* calcul transformation inverse */ - matmul(A, proj, model); - invert_matrix(A, m); - - /* d'ou les coordonnees objets */ - transform_point(out, m, in); - if (out[3] == 0.0) - return GL_FALSE; - *objx = out[0] / out[3]; - *objy = out[1] / out[3]; - *objz = out[2] / out[3]; - return GL_TRUE; -} - - -/* - * New in GLU 1.3 - * This is like gluUnProject but also takes near and far DepthRange values. - */ -#ifdef GLU_VERSION_1_3 -GLint GLAPIENTRY -gluUnProject4(GLdouble winx, GLdouble winy, GLdouble winz, GLdouble clipw, - const GLdouble modelMatrix[16], - const GLdouble projMatrix[16], - const GLint viewport[4], - GLclampd nearZ, GLclampd farZ, - GLdouble * objx, GLdouble * objy, GLdouble * objz, - GLdouble * objw) -{ - /* matrice de transformation */ - GLdouble m[16], A[16]; - GLdouble in[4], out[4]; - GLdouble z = nearZ + winz * (farZ - nearZ); - - /* transformation coordonnees normalisees entre -1 et 1 */ - in[0] = (winx - viewport[0]) * 2 / viewport[2] - 1.0; - in[1] = (winy - viewport[1]) * 2 / viewport[3] - 1.0; - in[2] = 2.0 * z - 1.0; - in[3] = clipw; - - /* calcul transformation inverse */ - matmul(A, projMatrix, modelMatrix); - invert_matrix(A, m); - - /* d'ou les coordonnees objets */ - transform_point(out, m, in); - if (out[3] == 0.0) - return GL_FALSE; - *objx = out[0] / out[3]; - *objy = out[1] / out[3]; - *objz = out[2] / out[3]; - *objw = out[3]; - return GL_TRUE; -} -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/quadric.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mini/quadric.c deleted file mode 100644 index 015552e123..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/quadric.c +++ /dev/null @@ -1,774 +0,0 @@ -/* $Id: quadric.c,v 1.2 2003/08/22 20:11:43 brianp Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1999-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* TODO: - * texture coordinate support - * flip normals according to orientation - * there's still some inside/outside orientation bugs in possibly all - * but the sphere function - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include -#include "gluP.h" -#endif - - - -#ifndef M_PI -# define M_PI (3.1415926) -#endif - - -/* - * Convert degrees to radians: - */ -#define DEG_TO_RAD(A) ((A)*(M_PI/180.0)) - - -/* - * Sin and Cos for degree angles: - */ -#define SIND( A ) sin( (A)*(M_PI/180.0) ) -#define COSD( A) cos( (A)*(M_PI/180.0) ) - - -/* - * Texture coordinates if texture flag is set - */ -#define TXTR_COORD(x,y) if (qobj->TextureFlag) glTexCoord2f(x,y); - - - -struct GLUquadric -{ - GLenum DrawStyle; /* GLU_FILL, LINE, SILHOUETTE, or POINT */ - GLenum Orientation; /* GLU_INSIDE or GLU_OUTSIDE */ - GLboolean TextureFlag; /* Generate texture coords? */ - GLenum Normals; /* GLU_NONE, GLU_FLAT, or GLU_SMOOTH */ - void (GLCALLBACK * ErrorFunc) (GLenum err); /* Error handler callback function */ -}; - - - -/* - * Process a GLU error. - */ -static void -quadric_error(GLUquadricObj * qobj, GLenum error, const char *msg) -{ - /* Call the error call back function if any */ - if (qobj->ErrorFunc) { - (*qobj->ErrorFunc) (error); - } - /* Print a message to stdout if MESA_DEBUG variable is defined */ - if (getenv("MESA_DEBUG")) { - fprintf(stderr, "GLUError: %s: %s\n", (char *) gluErrorString(error), - msg); - } -} - - - - -GLUquadricObj *GLAPIENTRY -gluNewQuadric(void) -{ - GLUquadricObj *q; - - q = (GLUquadricObj *) malloc(sizeof(struct GLUquadric)); - if (q) { - q->DrawStyle = GLU_FILL; - q->Orientation = GLU_OUTSIDE; - q->TextureFlag = GL_FALSE; - q->Normals = GLU_SMOOTH; - q->ErrorFunc = NULL; - } - return q; -} - - - -void GLAPIENTRY -gluDeleteQuadric(GLUquadricObj * state) -{ - if (state) { - free((void *) state); - } -} - - - -/* - * Set the drawing style to be GLU_FILL, GLU_LINE, GLU_SILHOUETTE, - * or GLU_POINT. - */ -void GLAPIENTRY -gluQuadricDrawStyle(GLUquadricObj * quadObject, GLenum drawStyle) -{ - if (quadObject && (drawStyle == GLU_FILL || drawStyle == GLU_LINE - || drawStyle == GLU_SILHOUETTE - || drawStyle == GLU_POINT)) { - quadObject->DrawStyle = drawStyle; - } - else { - quadric_error(quadObject, GLU_INVALID_ENUM, "qluQuadricDrawStyle"); - } -} - - - -/* - * Set the orientation to GLU_INSIDE or GLU_OUTSIDE. - */ -void GLAPIENTRY -gluQuadricOrientation(GLUquadricObj * quadObject, GLenum orientation) -{ - if (quadObject - && (orientation == GLU_INSIDE || orientation == GLU_OUTSIDE)) { - quadObject->Orientation = orientation; - } - else { - quadric_error(quadObject, GLU_INVALID_ENUM, "qluQuadricOrientation"); - } -} - - - -/* - * Set the error handler callback function. - */ -void GLAPIENTRY -gluQuadricCallback(GLUquadricObj * qobj, - GLenum which, void (GLCALLBACK * fn) ()) -{ - /* - * UGH, this is a mess! I thought ANSI was a standard. - */ - if (qobj && which == GLU_ERROR) { -#ifdef __CYGWIN32__ - qobj->ErrorFunc = (void (GLCALLBACKPCAST) (GLenum)) fn; -#elif defined(OPENSTEP) - qobj->ErrorFunc = (void (*)(GLenum)) fn; -#elif defined(_WIN32) - qobj->ErrorFunc = (void (GLCALLBACK *) (int)) fn; -#elif defined(__STORM__) - qobj->ErrorFunc = (void (GLCALLBACK *) (GLenum)) fn; -#elif defined(__BEOS__) - qobj->ErrorFunc = (void (*)(GLenum)) fn; -#else - qobj->ErrorFunc = (void (GLCALLBACK *) ()) fn; -#endif - } -} - - -void GLAPIENTRY -gluQuadricNormals(GLUquadricObj * quadObject, GLenum normals) -{ - if (quadObject - && (normals == GLU_NONE || normals == GLU_FLAT - || normals == GLU_SMOOTH)) { - quadObject->Normals = normals; - } -} - - -void GLAPIENTRY -gluQuadricTexture(GLUquadricObj * quadObject, GLboolean textureCoords) -{ - if (quadObject) { - quadObject->TextureFlag = textureCoords; - } -} - - - - -/* - * Call glNormal3f after scaling normal to unit length. - */ -static void -normal3f(GLfloat x, GLfloat y, GLfloat z) -{ -} - - - -void GLAPIENTRY -gluCylinder(GLUquadricObj * qobj, - GLdouble baseRadius, GLdouble topRadius, - GLdouble height, GLint slices, GLint stacks) -{ - GLdouble da, r, dr, dz; - GLfloat x, y, z, nz, nsign; - GLint i, j; - - if (qobj->Orientation == GLU_INSIDE) { - nsign = -1.0; - } - else { - nsign = 1.0; - } - - da = 2.0 * M_PI / slices; - dr = (topRadius - baseRadius) / stacks; - dz = height / stacks; - nz = (baseRadius - topRadius) / height; /* Z component of normal vectors */ - - if (qobj->DrawStyle == GLU_POINT) { - glBegin(GL_POINTS); - for (i = 0; i < slices; i++) { - x = cos(i * da); - y = sin(i * da); - normal3f(x * nsign, y * nsign, nz * nsign); - - z = 0.0; - r = baseRadius; - for (j = 0; j <= stacks; j++) { - glVertex3f(x * r, y * r, z); - z += dz; - r += dr; - } - } - glEnd(); - } - else if (qobj->DrawStyle == GLU_LINE || qobj->DrawStyle == GLU_SILHOUETTE) { - /* Draw rings */ - if (qobj->DrawStyle == GLU_LINE) { - z = 0.0; - r = baseRadius; - for (j = 0; j <= stacks; j++) { - glBegin(GL_LINE_LOOP); - for (i = 0; i < slices; i++) { - x = cos(i * da); - y = sin(i * da); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f(x * r, y * r, z); - } - glEnd(); - z += dz; - r += dr; - } - } - else { - /* draw one ring at each end */ - if (baseRadius != 0.0) { - glBegin(GL_LINE_LOOP); - for (i = 0; i < slices; i++) { - x = cos(i * da); - y = sin(i * da); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f(x * baseRadius, y * baseRadius, 0.0); - } - glEnd(); - glBegin(GL_LINE_LOOP); - for (i = 0; i < slices; i++) { - x = cos(i * da); - y = sin(i * da); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f(x * topRadius, y * topRadius, height); - } - glEnd(); - } - } - /* draw length lines */ - glBegin(GL_LINES); - for (i = 0; i < slices; i++) { - x = cos(i * da); - y = sin(i * da); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f(x * baseRadius, y * baseRadius, 0.0); - glVertex3f(x * topRadius, y * topRadius, height); - } - glEnd(); - } - else if (qobj->DrawStyle == GLU_FILL) { - GLfloat ds = 1.0 / slices; - GLfloat dt = 1.0 / stacks; - GLfloat t = 0.0; - z = 0.0; - r = baseRadius; - for (j = 0; j < stacks; j++) { - GLfloat s = 0.0; - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= slices; i++) { - GLfloat x, y; - if (i == slices) { - x = sin(0.0); - y = cos(0.0); - } - else { - x = sin(i * da); - y = cos(i * da); - } - if (nsign == 1.0) { - normal3f(x * nsign, y * nsign, nz * nsign); - TXTR_COORD(s, t); - glVertex3f(x * r, y * r, z); - normal3f(x * nsign, y * nsign, nz * nsign); - TXTR_COORD(s, t + dt); - glVertex3f(x * (r + dr), y * (r + dr), z + dz); - } - else { - normal3f(x * nsign, y * nsign, nz * nsign); - TXTR_COORD(s, t); - glVertex3f(x * r, y * r, z); - normal3f(x * nsign, y * nsign, nz * nsign); - TXTR_COORD(s, t + dt); - glVertex3f(x * (r + dr), y * (r + dr), z + dz); - } - s += ds; - } /* for slices */ - glEnd(); - r += dr; - t += dt; - z += dz; - } /* for stacks */ - } -} - - - - - -void GLAPIENTRY -gluSphere(GLUquadricObj * qobj, GLdouble radius, GLint slices, GLint stacks) -{ - GLfloat rho, drho, theta, dtheta; - GLfloat x, y, z; - GLfloat s, t, ds, dt; - GLint i, j, imin, imax; - GLboolean normals; - GLfloat nsign; - - if (qobj->Normals == GLU_NONE) { - normals = GL_FALSE; - } - else { - normals = GL_TRUE; - } - if (qobj->Orientation == GLU_INSIDE) { - nsign = -1.0; - } - else { - nsign = 1.0; - } - - drho = M_PI / (GLfloat) stacks; - dtheta = 2.0 * M_PI / (GLfloat) slices; - - /* texturing: s goes from 0.0/0.25/0.5/0.75/1.0 at +y/+x/-y/-x/+y axis */ - /* t goes from -1.0/+1.0 at z = -radius/+radius (linear along longitudes) */ - /* cannot use triangle fan on texturing (s coord. at top/bottom tip varies) */ - - if (qobj->DrawStyle == GLU_FILL) { - if (!qobj->TextureFlag) { - /* draw +Z end as a triangle fan */ - glBegin(GL_TRIANGLE_FAN); -/* glNormal3f(0.0, 0.0, 1.0); */ - glVertex3f(0.0, 0.0, nsign * radius); - for (j = 0; j <= slices; j++) { - theta = (j == slices) ? 0.0 : j * dtheta; - x = -sin(theta) * sin(drho); - y = cos(theta) * sin(drho); - z = nsign * cos(drho); - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - - ds = 1.0 / slices; - dt = 1.0 / stacks; - t = 1.0; /* because loop now runs from 0 */ - if (qobj->TextureFlag) { - imin = 0; - imax = stacks; - } - else { - imin = 1; - imax = stacks - 1; - } - - /* draw intermediate stacks as quad strips */ - for (i = imin; i < imax; i++) { - rho = i * drho; - glBegin(GL_QUAD_STRIP); - s = 0.0; - for (j = 0; j <= slices; j++) { - theta = (j == slices) ? 0.0 : j * dtheta; - x = -sin(theta) * sin(rho); - y = cos(theta) * sin(rho); - z = nsign * cos(rho); - TXTR_COORD(s, t); - glVertex3f(x * radius, y * radius, z * radius); - x = -sin(theta) * sin(rho + drho); - y = cos(theta) * sin(rho + drho); - z = nsign * cos(rho + drho); - TXTR_COORD(s, t - dt); - s += ds; - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - t -= dt; - } - - if (!qobj->TextureFlag) { - /* draw -Z end as a triangle fan */ - glBegin(GL_TRIANGLE_FAN); - glVertex3f(0.0, 0.0, -radius * nsign); - rho = M_PI - drho; - s = 1.0; - t = dt; - for (j = slices; j >= 0; j--) { - theta = (j == slices) ? 0.0 : j * dtheta; - x = -sin(theta) * sin(rho); - y = cos(theta) * sin(rho); - z = nsign * cos(rho); - s -= ds; - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - } - else if (qobj->DrawStyle == GLU_LINE || qobj->DrawStyle == GLU_SILHOUETTE) { - /* draw stack lines */ - for (i = 1; i < stacks; i++) { /* stack line at i==stacks-1 was missing here */ - rho = i * drho; - glBegin(GL_LINE_LOOP); - for (j = 0; j < slices; j++) { - theta = j * dtheta; - x = cos(theta) * sin(rho); - y = sin(theta) * sin(rho); - z = cos(rho); - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - /* draw slice lines */ - for (j = 0; j < slices; j++) { - theta = j * dtheta; - glBegin(GL_LINE_STRIP); - for (i = 0; i <= stacks; i++) { - rho = i * drho; - x = cos(theta) * sin(rho); - y = sin(theta) * sin(rho); - z = cos(rho); - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - } - else if (qobj->DrawStyle == GLU_POINT) { - /* top and bottom-most points */ - glBegin(GL_POINTS); - glVertex3f(0.0, 0.0, radius); - glVertex3f(0.0, 0.0, -radius); - - /* loop over stacks */ - for (i = 1; i < stacks - 1; i++) { - rho = i * drho; - for (j = 0; j < slices; j++) { - theta = j * dtheta; - x = cos(theta) * sin(rho); - y = sin(theta) * sin(rho); - z = cos(rho); - glVertex3f(x * radius, y * radius, z * radius); - } - } - glEnd(); - } - -} - - - -void GLAPIENTRY -gluDisk(GLUquadricObj * qobj, - GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops) -{ - GLfloat da, dr; -#if 0 - GLdouble a, da; - GLfloat r, dr; - GLfloat x, y; - GLfloat r1, r2, dtc; - GLint s, l; -#endif - - - da = 2.0 * M_PI / slices; - dr = (outerRadius - innerRadius) / (GLfloat) loops; - - switch (qobj->DrawStyle) { - case GLU_FILL: - { - /* texture of a gluDisk is a cut out of the texture unit square - * x, y in [-outerRadius, +outerRadius]; s, t in [0, 1] - * (linear mapping) - */ - GLfloat dtc = 2.0f * outerRadius; - GLfloat sa, ca; - GLfloat r1 = innerRadius; - GLint l; - for (l = 0; l < loops; l++) { - GLfloat r2 = r1 + dr; - if (qobj->Orientation == GLU_OUTSIDE) { - GLint s; - glBegin(GL_QUAD_STRIP); - for (s = 0; s <= slices; s++) { - GLfloat a; - if (s == slices) - a = 0.0; - else - a = s * da; - sa = sin(a); - ca = cos(a); - TXTR_COORD(0.5 + sa * r2 / dtc, 0.5 + ca * r2 / dtc); - glVertex2f(r2 * sa, r2 * ca); - TXTR_COORD(0.5 + sa * r1 / dtc, 0.5 + ca * r1 / dtc); - glVertex2f(r1 * sa, r1 * ca); - } - glEnd(); - } - else { - GLint s; - glBegin(GL_QUAD_STRIP); - for (s = slices; s >= 0; s--) { - GLfloat a; - if (s == slices) - a = 0.0; - else - a = s * da; - sa = sin(a); - ca = cos(a); - TXTR_COORD(0.5 - sa * r2 / dtc, 0.5 + ca * r2 / dtc); - glVertex2f(r2 * sa, r2 * ca); - TXTR_COORD(0.5 - sa * r1 / dtc, 0.5 + ca * r1 / dtc); - glVertex2f(r1 * sa, r1 * ca); - } - glEnd(); - } - r1 = r2; - } - break; - } - case GLU_LINE: - { - GLint l, s; - /* draw loops */ - for (l = 0; l <= loops; l++) { - GLfloat r = innerRadius + l * dr; - glBegin(GL_LINE_LOOP); - for (s = 0; s < slices; s++) { - GLfloat a = s * da; - glVertex2f(r * sin(a), r * cos(a)); - } - glEnd(); - } - /* draw spokes */ - for (s = 0; s < slices; s++) { - GLfloat a = s * da; - GLfloat x = sin(a); - GLfloat y = cos(a); - glBegin(GL_LINE_STRIP); - for (l = 0; l <= loops; l++) { - GLfloat r = innerRadius + l * dr; - glVertex2f(r * x, r * y); - } - glEnd(); - } - break; - } - case GLU_POINT: - { - GLint s; - glBegin(GL_POINTS); - for (s = 0; s < slices; s++) { - GLfloat a = s * da; - GLfloat x = sin(a); - GLfloat y = cos(a); - GLint l; - for (l = 0; l <= loops; l++) { - GLfloat r = innerRadius * l * dr; - glVertex2f(r * x, r * y); - } - } - glEnd(); - break; - } - case GLU_SILHOUETTE: - { - if (innerRadius != 0.0) { - GLfloat a; - glBegin(GL_LINE_LOOP); - for (a = 0.0; a < 2.0 * M_PI; a += da) { - GLfloat x = innerRadius * sin(a); - GLfloat y = innerRadius * cos(a); - glVertex2f(x, y); - } - glEnd(); - } - { - GLfloat a; - glBegin(GL_LINE_LOOP); - for (a = 0; a < 2.0 * M_PI; a += da) { - GLfloat x = outerRadius * sin(a); - GLfloat y = outerRadius * cos(a); - glVertex2f(x, y); - } - glEnd(); - } - break; - } - default: - abort(); - } -} - - - -void GLAPIENTRY -gluPartialDisk(GLUquadricObj * qobj, GLdouble innerRadius, - GLdouble outerRadius, GLint slices, GLint loops, - GLdouble startAngle, GLdouble sweepAngle) -{ - if (qobj->DrawStyle == GLU_POINT) { - GLint loop, slice; - GLdouble radius, delta_radius; - GLdouble angle, delta_angle; - delta_radius = (outerRadius - innerRadius) / (loops - 1); - delta_angle = DEG_TO_RAD((sweepAngle) / (slices - 1)); - glBegin(GL_POINTS); - radius = innerRadius; - for (loop = 0; loop < loops; loop++) { - angle = DEG_TO_RAD(startAngle); - for (slice = 0; slice < slices; slice++) { - glVertex2f(radius * sin(angle), radius * cos(angle)); - angle += delta_angle; - } - radius += delta_radius; - } - glEnd(); - } - else if (qobj->DrawStyle == GLU_LINE) { - GLint loop, slice; - GLdouble radius, delta_radius; - GLdouble angle, delta_angle; - delta_radius = (outerRadius - innerRadius) / loops; - delta_angle = DEG_TO_RAD(sweepAngle / slices); - /* draw rings */ - radius = innerRadius; - for (loop = 0; loop < loops; loop++) { - angle = DEG_TO_RAD(startAngle); - glBegin(GL_LINE_STRIP); - for (slice = 0; slice <= slices; slice++) { - glVertex2f(radius * sin(angle), radius * cos(angle)); - angle += delta_angle; - } - glEnd(); - radius += delta_radius; - } - /* draw spokes */ - angle = DEG_TO_RAD(startAngle); - for (slice = 0; slice <= slices; slice++) { - radius = innerRadius; - glBegin(GL_LINE_STRIP); - for (loop = 0; loop < loops; loop++) { - glVertex2f(radius * sin(angle), radius * cos(angle)); - radius += delta_radius; - } - glEnd(); - angle += delta_angle; - } - } - else if (qobj->DrawStyle == GLU_SILHOUETTE) { - GLint slice; - GLdouble angle, delta_angle; - delta_angle = DEG_TO_RAD(sweepAngle / slices); - /* draw outer ring */ - glBegin(GL_LINE_STRIP); - angle = DEG_TO_RAD(startAngle); - for (slice = 0; slice <= slices; slice++) { - glVertex2f(outerRadius * sin(angle), outerRadius * cos(angle)); - angle += delta_angle; - } - glEnd(); - /* draw inner ring */ - if (innerRadius > 0.0) { - glBegin(GL_LINE_STRIP); - angle = DEG_TO_RAD(startAngle); - for (slice = 0; slice < slices; slice++) { - glVertex2f(innerRadius * sin(angle), innerRadius * cos(angle)); - angle += delta_angle; - } - glEnd(); - } - /* draw spokes */ - if (sweepAngle < 360.0) { - GLdouble stopAngle = startAngle + sweepAngle; - glBegin(GL_LINES); - glVertex2f(innerRadius * SIND(startAngle), - innerRadius * COSD(startAngle)); - glVertex2f(outerRadius * SIND(startAngle), - outerRadius * COSD(startAngle)); - glVertex2f(innerRadius * SIND(stopAngle), - innerRadius * COSD(stopAngle)); - glVertex2f(outerRadius * SIND(stopAngle), - outerRadius * COSD(stopAngle)); - glEnd(); - } - } - else if (qobj->DrawStyle == GLU_FILL) { - GLint loop, slice; - GLdouble radius, delta_radius; - GLdouble angle, delta_angle; - delta_radius = (outerRadius - innerRadius) / loops; - delta_angle = DEG_TO_RAD(sweepAngle / slices); - radius = innerRadius; - for (loop = 0; loop < loops; loop++) { - glBegin(GL_QUAD_STRIP); - angle = DEG_TO_RAD(startAngle); - for (slice = 0; slice <= slices; slice++) { - if (qobj->Orientation == GLU_OUTSIDE) { - glVertex2f((radius + delta_radius) * sin(angle), - (radius + delta_radius) * cos(angle)); - glVertex2f(radius * sin(angle), radius * cos(angle)); - } - else { - glVertex2f(radius * sin(angle), radius * cos(angle)); - glVertex2f((radius + delta_radius) * sin(angle), - (radius + delta_radius) * cos(angle)); - } - angle += delta_angle; - } - glEnd(); - radius += delta_radius; - } - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/tess.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mini/tess.c deleted file mode 100644 index 1a384239be..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/tess.c +++ /dev/null @@ -1,328 +0,0 @@ -/* $Id: tess.c,v 1.2 2003/08/22 20:11:43 brianp Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * This file is part of the polygon tesselation code contributed by - * Bogdan Sikorski - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include "tess.h" -#endif - - -/* - * This is ugly, but seems the easiest way to do things to make the - * code work under YellowBox for Windows - */ -#if defined(OPENSTEP) && defined(CALLBACK) -#undef CALLBACK -#define CALLBACK -#endif - - -static void delete_contours(GLUtriangulatorObj *); - -#ifdef __CYGWIN32__ -#define _CALLBACK -#else -#define _CALLBACK GLCALLBACK -#endif - - -static void -init_callbacks(tess_callbacks * callbacks) -{ - callbacks->begin = (void (_CALLBACK *) (GLenum)) 0; - callbacks->edgeFlag = (void (_CALLBACK *) (GLboolean)) 0; - callbacks->vertex = (void (_CALLBACK *) (void *)) 0; - callbacks->end = (void (_CALLBACK *) (void)) 0; - callbacks->error = (void (_CALLBACK *) (GLenum)) 0; -} - -void -tess_call_user_error(GLUtriangulatorObj * tobj, GLenum gluerr) -{ - if (tobj->error == GLU_NO_ERROR) - tobj->error = gluerr; - if (tobj->callbacks.error != NULL) - (tobj->callbacks.error) (gluerr); -} - -GLUtriangulatorObj *GLAPIENTRY -gluNewTess(void) -{ - GLUtriangulatorObj *tobj; - - if ((tobj = (GLUtriangulatorObj *) - malloc(sizeof(struct GLUtesselator))) == NULL) - return NULL; - tobj->contours = tobj->last_contour = NULL; - init_callbacks(&tobj->callbacks); - tobj->error = GLU_NO_ERROR; - tobj->current_polygon = NULL; - tobj->contour_cnt = 0; - return tobj; -} - - -void GLAPIENTRY -gluTessCallback(GLUtriangulatorObj * tobj, GLenum which, - void (GLCALLBACK * fn) ()) -{ - switch (which) { - case GLU_BEGIN: - tobj->callbacks.begin = (void (_CALLBACK *) (GLenum)) fn; - break; - case GLU_EDGE_FLAG: - tobj->callbacks.edgeFlag = (void (_CALLBACK *) (GLboolean)) fn; - break; - case GLU_VERTEX: - tobj->callbacks.vertex = (void (_CALLBACK *) (void *)) fn; - break; - case GLU_END: - tobj->callbacks.end = (void (_CALLBACK *) (void)) fn; - break; - case GLU_ERROR: - tobj->callbacks.error = (void (_CALLBACK *) (GLenum)) fn; - break; - default: - tobj->error = GLU_INVALID_ENUM; - break; - } -} - - - -void GLAPIENTRY -gluDeleteTess(GLUtriangulatorObj * tobj) -{ - if (tobj->error == GLU_NO_ERROR && tobj->contour_cnt) - /* was gluEndPolygon called? */ - tess_call_user_error(tobj, GLU_TESS_ERROR1); - /* delete all internal structures */ - delete_contours(tobj); - free(tobj); -} - - -void GLAPIENTRY -gluBeginPolygon(GLUtriangulatorObj * tobj) -{ -/* - if(tobj->error!=GLU_NO_ERROR) - return; -*/ - tobj->error = GLU_NO_ERROR; - if (tobj->current_polygon != NULL) { - /* gluEndPolygon was not called */ - tess_call_user_error(tobj, GLU_TESS_ERROR1); - /* delete all internal structures */ - delete_contours(tobj); - } - else { - if ((tobj->current_polygon = - (tess_polygon *) malloc(sizeof(tess_polygon))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - return; - } - tobj->current_polygon->vertex_cnt = 0; - tobj->current_polygon->vertices = - tobj->current_polygon->last_vertex = NULL; - } -} - - -void GLAPIENTRY -gluEndPolygon(GLUtriangulatorObj * tobj) -{ - /*tess_contour *contour_ptr; */ - - /* there was an error */ - if (tobj->error != GLU_NO_ERROR) - goto end; - - /* check if gluBeginPolygon was called */ - if (tobj->current_polygon == NULL) { - tess_call_user_error(tobj, GLU_TESS_ERROR2); - return; - } - tess_test_polygon(tobj); - /* there was an error */ - if (tobj->error != GLU_NO_ERROR) - goto end; - - /* any real contours? */ - if (tobj->contour_cnt == 0) { - /* delete all internal structures */ - delete_contours(tobj); - return; - } - tess_find_contour_hierarchies(tobj); - /* there was an error */ - if (tobj->error != GLU_NO_ERROR) - goto end; - - tess_handle_holes(tobj); - /* there was an error */ - if (tobj->error != GLU_NO_ERROR) - goto end; - - /* if no callbacks, nothing to do */ - if (tobj->callbacks.begin != NULL && tobj->callbacks.vertex != NULL && - tobj->callbacks.end != NULL) { - if (tobj->callbacks.edgeFlag == NULL) - tess_tesselate(tobj); - else - tess_tesselate_with_edge_flag(tobj); - } - - end: - /* delete all internal structures */ - delete_contours(tobj); -} - - -void GLAPIENTRY -gluNextContour(GLUtriangulatorObj * tobj, GLenum type) -{ - if (tobj->error != GLU_NO_ERROR) - return; - if (tobj->current_polygon == NULL) { - tess_call_user_error(tobj, GLU_TESS_ERROR2); - return; - } - /* first contour? */ - if (tobj->current_polygon->vertex_cnt) - tess_test_polygon(tobj); -} - - -void GLAPIENTRY -gluTessVertex(GLUtriangulatorObj * tobj, GLdouble v[3], void *data) -{ - tess_polygon *polygon = tobj->current_polygon; - tess_vertex *last_vertex_ptr; - - if (tobj->error != GLU_NO_ERROR) - return; - if (polygon == NULL) { - tess_call_user_error(tobj, GLU_TESS_ERROR2); - return; - } - last_vertex_ptr = polygon->last_vertex; - if (last_vertex_ptr == NULL) { - if ((last_vertex_ptr = (tess_vertex *) - malloc(sizeof(tess_vertex))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - return; - } - polygon->vertices = last_vertex_ptr; - polygon->last_vertex = last_vertex_ptr; - last_vertex_ptr->data = data; - last_vertex_ptr->location[0] = v[0]; - last_vertex_ptr->location[1] = v[1]; - last_vertex_ptr->location[2] = v[2]; - last_vertex_ptr->next = NULL; - last_vertex_ptr->previous = NULL; - ++(polygon->vertex_cnt); - } - else { - tess_vertex *vertex_ptr; - - /* same point twice? */ - if (fabs(last_vertex_ptr->location[0] - v[0]) < EPSILON && - fabs(last_vertex_ptr->location[1] - v[1]) < EPSILON && - fabs(last_vertex_ptr->location[2] - v[2]) < EPSILON) { - tess_call_user_error(tobj, GLU_TESS_ERROR6); - return; - } - if ((vertex_ptr = (tess_vertex *) - malloc(sizeof(tess_vertex))) == NULL) { - tess_call_user_error(tobj, GLU_OUT_OF_MEMORY); - return; - } - vertex_ptr->data = data; - vertex_ptr->location[0] = v[0]; - vertex_ptr->location[1] = v[1]; - vertex_ptr->location[2] = v[2]; - vertex_ptr->next = NULL; - vertex_ptr->previous = last_vertex_ptr; - ++(polygon->vertex_cnt); - last_vertex_ptr->next = vertex_ptr; - polygon->last_vertex = vertex_ptr; - } -} - - -static void -delete_contours(GLUtriangulatorObj * tobj) -{ - tess_polygon *polygon = tobj->current_polygon; - tess_contour *contour, *contour_tmp; - tess_vertex *vertex, *vertex_tmp; - - /* remove current_polygon list - if exists due to detected error */ - if (polygon != NULL) { - if (polygon->vertices) { - for (vertex = polygon->vertices; vertex != polygon->last_vertex;) { - vertex_tmp = vertex->next; - free(vertex); - vertex = vertex_tmp; - } - free(vertex); - } - free(polygon); - tobj->current_polygon = NULL; - } - /* remove all contour data */ - for (contour = tobj->contours; contour != NULL;) { - for (vertex = contour->vertices; vertex != contour->last_vertex;) { - vertex_tmp = vertex->next; - free(vertex); - vertex = vertex_tmp; - } - free(vertex); - contour_tmp = contour->next; - free(contour); - contour = contour_tmp; - } - tobj->contours = tobj->last_contour = NULL; - tobj->contour_cnt = 0; -} - - -void GLAPIENTRY -gluTessNormal(GLUtesselator *tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ) -{ - /* dummy function */ - (void) tess; - (void) valueX; - (void) valueY; - (void) valueZ; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/tess.h b/nx-X11/extras/Mesa_6.4.2/src/glu/mini/tess.h deleted file mode 100644 index 908e20972c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/tess.h +++ /dev/null @@ -1,108 +0,0 @@ -/* $Id: tess.h,v 1.2 2003/08/22 20:11:43 brianp Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * This file is part of the polygon tesselation code contributed by - * Bogdan Sikorski - */ - - -#ifndef TESS_H -#define TESS_H - - -#include "gluP.h" - -#define EPSILON 1e-06 /* epsilon for double precision compares */ - -typedef enum -{ - OXY, - OYZ, - OXZ -} -projection_type; - -typedef struct callbacks_str -{ - void (GLCALLBACK * begin) (GLenum mode); - void (GLCALLBACK * edgeFlag) (GLboolean flag); - void (GLCALLBACK * vertex) (GLvoid * v); - void (GLCALLBACK * end) (void); - void (GLCALLBACK * error) (GLenum err); -} -tess_callbacks; - -typedef struct vertex_str -{ - void *data; - GLdouble location[3]; - GLdouble x, y; - GLboolean edge_flag; - struct vertex_str *shadow_vertex; - struct vertex_str *next, *previous; -} -tess_vertex; - -typedef struct contour_str -{ - GLenum type; - GLuint vertex_cnt; - GLdouble area; - GLenum orientation; - struct vertex_str *vertices, *last_vertex; - struct contour_str *next, *previous; -} -tess_contour; - -typedef struct polygon_str -{ - GLuint vertex_cnt; - GLdouble A, B, C, D; - GLdouble area; - GLenum orientation; - struct vertex_str *vertices, *last_vertex; -} -tess_polygon; - -struct GLUtesselator -{ - tess_contour *contours, *last_contour; - GLuint contour_cnt; - tess_callbacks callbacks; - tess_polygon *current_polygon; - GLenum error; - GLdouble A, B, C, D; - projection_type projection; -}; - - -extern void tess_call_user_error(GLUtriangulatorObj *, GLenum); -extern void tess_test_polygon(GLUtriangulatorObj *); -extern void tess_find_contour_hierarchies(GLUtriangulatorObj *); -extern void tess_handle_holes(GLUtriangulatorObj *); -extern void tess_tesselate(GLUtriangulatorObj *); -extern void tess_tesselate_with_edge_flag(GLUtriangulatorObj *); - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/tesselat.c b/nx-X11/extras/Mesa_6.4.2/src/glu/mini/tesselat.c deleted file mode 100644 index a1102e6e5a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/mini/tesselat.c +++ /dev/null @@ -1,407 +0,0 @@ -/* $Id: tesselat.c,v 1.2 2003/08/22 20:11:43 brianp Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 3.3 - * Copyright (C) 1995-2000 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * This file is part of the polygon tesselation code contributed by - * Bogdan Sikorski - */ - - -#ifdef PC_HEADER -#include "all.h" -#else -#include -#include -#include "tess.h" -#endif - - - -static GLboolean edge_flag; - -static void emit_triangle(GLUtriangulatorObj *, tess_vertex *, - tess_vertex *, tess_vertex *); - -static void emit_triangle_with_edge_flag(GLUtriangulatorObj *, - tess_vertex *, GLboolean, - tess_vertex *, GLboolean, - tess_vertex *, GLboolean); - -static GLdouble -twice_the_triangle_area(tess_vertex * va, tess_vertex * vb, tess_vertex * vc) -{ - return (vb->x - va->x) * (vc->y - va->y) - (vb->y - va->y) * (vc->x - - va->x); -} - -static GLboolean -left(GLdouble A, GLdouble B, GLdouble C, GLdouble x, GLdouble y) -{ - if (A * x + B * y + C > -EPSILON) - return GL_TRUE; - else - return GL_FALSE; -} - -static GLboolean -right(GLdouble A, GLdouble B, GLdouble C, GLdouble x, GLdouble y) -{ - if (A * x + B * y + C < EPSILON) - return GL_TRUE; - else - return GL_FALSE; -} - -static GLint -convex_ccw(tess_vertex * va, - tess_vertex * vb, tess_vertex * vc, GLUtriangulatorObj * tobj) -{ - GLdouble d; - - d = twice_the_triangle_area(va, vb, vc); - - if (d > EPSILON) { - return 1; - } - else if (d < -EPSILON) { - return 0; - } - else { - return -1; - } -} - -static GLint -convex_cw(tess_vertex * va, - tess_vertex * vb, tess_vertex * vc, GLUtriangulatorObj * tobj) -{ - GLdouble d; - - d = twice_the_triangle_area(va, vb, vc); - - if (d < -EPSILON) { - return 1; - } - else if (d > EPSILON) { - return 0; - } - else { - return -1; - } -} - -static GLboolean -diagonal_ccw(tess_vertex * va, - tess_vertex * vb, - GLUtriangulatorObj * tobj, tess_contour * contour) -{ - tess_vertex *vc = va->next, *vertex, *shadow_vertex; - struct - { - GLdouble A, B, C; - } - ac, cb, ba; - GLdouble x, y; - - GLint res = convex_ccw(va, vc, vb, tobj); - if (res == 0) - return GL_FALSE; - if (res == -1) - return GL_TRUE; - - ba.A = vb->y - va->y; - ba.B = va->x - vb->x; - ba.C = -ba.A * va->x - ba.B * va->y; - ac.A = va->y - vc->y; - ac.B = vc->x - va->x; - ac.C = -ac.A * vc->x - ac.B * vc->y; - cb.A = vc->y - vb->y; - cb.B = vb->x - vc->x; - cb.C = -cb.A * vb->x - cb.B * vb->y; - for (vertex = vb->next; vertex != va; vertex = vertex->next) { - shadow_vertex = vertex->shadow_vertex; - if (shadow_vertex != NULL && - (shadow_vertex == va || shadow_vertex == vb || shadow_vertex == vc)) - continue; - x = vertex->x; - y = vertex->y; - if (left(ba.A, ba.B, ba.C, x, y) && - left(ac.A, ac.B, ac.C, x, y) && left(cb.A, cb.B, cb.C, x, y)) - return GL_FALSE; - } - return GL_TRUE; -} - -static GLboolean -diagonal_cw(tess_vertex * va, - tess_vertex * vb, - GLUtriangulatorObj * tobj, tess_contour * contour) -{ - tess_vertex *vc = va->next, *vertex, *shadow_vertex; - struct - { - GLdouble A, B, C; - } - ac, cb, ba; - GLdouble x, y; - - GLint res = convex_cw(va, vc, vb, tobj); - if (res == 0) - return GL_FALSE; - if (res == -1) - return GL_TRUE; - - ba.A = vb->y - va->y; - ba.B = va->x - vb->x; - ba.C = -ba.A * va->x - ba.B * va->y; - ac.A = va->y - vc->y; - ac.B = vc->x - va->x; - ac.C = -ac.A * vc->x - ac.B * vc->y; - cb.A = vc->y - vb->y; - cb.B = vb->x - vc->x; - cb.C = -cb.A * vb->x - cb.B * vb->y; - for (vertex = vb->next; vertex != va; vertex = vertex->next) { - shadow_vertex = vertex->shadow_vertex; - if (shadow_vertex != NULL && - (shadow_vertex == va || shadow_vertex == vb || shadow_vertex == vc)) - continue; - x = vertex->x; - y = vertex->y; - if (right(ba.A, ba.B, ba.C, x, y) && - right(ac.A, ac.B, ac.C, x, y) && right(cb.A, cb.B, cb.C, x, y)) - return GL_FALSE; - } - return GL_TRUE; -} - -static void -clip_ear(GLUtriangulatorObj * tobj, tess_vertex * v, tess_contour * contour) -{ - emit_triangle(tobj, v->previous, v, v->next); - /* the first in the list */ - if (contour->vertices == v) { - contour->vertices = v->next; - contour->last_vertex->next = v->next; - v->next->previous = contour->last_vertex; - } - else - /* the last ? */ - if (contour->last_vertex == v) { - contour->vertices->previous = v->previous; - v->previous->next = v->next; - contour->last_vertex = v->previous; - } - else { - v->next->previous = v->previous; - v->previous->next = v->next; - } - free(v); - --(contour->vertex_cnt); -} - -static void -clip_ear_with_edge_flag(GLUtriangulatorObj * tobj, - tess_vertex * v, tess_contour * contour) -{ - emit_triangle_with_edge_flag(tobj, v->previous, v->previous->edge_flag, - v, v->edge_flag, v->next, GL_FALSE); - v->previous->edge_flag = GL_FALSE; - /* the first in the list */ - if (contour->vertices == v) { - contour->vertices = v->next; - contour->last_vertex->next = v->next; - v->next->previous = contour->last_vertex; - } - else - /* the last ? */ - if (contour->last_vertex == v) { - contour->vertices->previous = v->previous; - v->previous->next = v->next; - contour->last_vertex = v->previous; - } - else { - v->next->previous = v->previous; - v->previous->next = v->next; - } - free(v); - --(contour->vertex_cnt); -} - -static void -triangulate_ccw(GLUtriangulatorObj * tobj, tess_contour * contour) -{ - tess_vertex *vertex; - GLuint vertex_cnt = contour->vertex_cnt; - - while (vertex_cnt > 3) { - vertex = contour->vertices; - while (diagonal_ccw(vertex, vertex->next->next, tobj, contour) == - GL_FALSE && tobj->error == GLU_NO_ERROR) - vertex = vertex->next; - if (tobj->error != GLU_NO_ERROR) - return; - clip_ear(tobj, vertex->next, contour); - --vertex_cnt; - } -} - -static void -triangulate_cw(GLUtriangulatorObj * tobj, tess_contour * contour) -{ - tess_vertex *vertex; - GLuint vertex_cnt = contour->vertex_cnt; - - while (vertex_cnt > 3) { - vertex = contour->vertices; - while (diagonal_cw(vertex, vertex->next->next, tobj, contour) == - GL_FALSE && tobj->error == GLU_NO_ERROR) - vertex = vertex->next; - if (tobj->error != GLU_NO_ERROR) - return; - clip_ear(tobj, vertex->next, contour); - --vertex_cnt; - } -} - -static void -triangulate_ccw_with_edge_flag(GLUtriangulatorObj * tobj, - tess_contour * contour) -{ - tess_vertex *vertex; - GLuint vertex_cnt = contour->vertex_cnt; - - while (vertex_cnt > 3) { - vertex = contour->vertices; - while (diagonal_ccw(vertex, vertex->next->next, tobj, contour) == - GL_FALSE && tobj->error == GLU_NO_ERROR) - vertex = vertex->next; - if (tobj->error != GLU_NO_ERROR) - return; - clip_ear_with_edge_flag(tobj, vertex->next, contour); - --vertex_cnt; - } -} - -static void -triangulate_cw_with_edge_flag(GLUtriangulatorObj * tobj, - tess_contour * contour) -{ - tess_vertex *vertex; - GLuint vertex_cnt = contour->vertex_cnt; - - while (vertex_cnt > 3) { - vertex = contour->vertices; - while (diagonal_cw(vertex, vertex->next->next, tobj, contour) == - GL_FALSE && tobj->error == GLU_NO_ERROR) - vertex = vertex->next; - if (tobj->error != GLU_NO_ERROR) - return; - clip_ear_with_edge_flag(tobj, vertex->next, contour); - --vertex_cnt; - } -} - -void -tess_tesselate(GLUtriangulatorObj * tobj) -{ - tess_contour *contour; - - for (contour = tobj->contours; contour != NULL; contour = contour->next) { - if (contour->orientation == GLU_CCW) { - triangulate_ccw(tobj, contour); - } - else { - triangulate_cw(tobj, contour); - } - if (tobj->error != GLU_NO_ERROR) - return; - - /* emit the last triangle */ - emit_triangle(tobj, contour->vertices, contour->vertices->next, - contour->vertices->next->next); - } -} - -void -tess_tesselate_with_edge_flag(GLUtriangulatorObj * tobj) -{ - tess_contour *contour; - - edge_flag = GL_TRUE; - /* first callback with edgeFlag set to GL_TRUE */ - (tobj->callbacks.edgeFlag) (GL_TRUE); - - for (contour = tobj->contours; contour != NULL; contour = contour->next) { - if (contour->orientation == GLU_CCW) - triangulate_ccw_with_edge_flag(tobj, contour); - else - triangulate_cw_with_edge_flag(tobj, contour); - if (tobj->error != GLU_NO_ERROR) - return; - /* emit the last triangle */ - emit_triangle_with_edge_flag(tobj, contour->vertices, - contour->vertices->edge_flag, - contour->vertices->next, - contour->vertices->next->edge_flag, - contour->vertices->next->next, - contour->vertices->next->next->edge_flag); - } -} - -static void -emit_triangle(GLUtriangulatorObj * tobj, - tess_vertex * v1, tess_vertex * v2, tess_vertex * v3) -{ - (tobj->callbacks.begin) (GL_TRIANGLES); - (tobj->callbacks.vertex) (v1->data); - (tobj->callbacks.vertex) (v2->data); - (tobj->callbacks.vertex) (v3->data); - (tobj->callbacks.end) (); -} - -static void -emit_triangle_with_edge_flag(GLUtriangulatorObj * tobj, - tess_vertex * v1, - GLboolean edge_flag1, - tess_vertex * v2, - GLboolean edge_flag2, - tess_vertex * v3, GLboolean edge_flag3) -{ - (tobj->callbacks.begin) (GL_TRIANGLES); - if (edge_flag1 != edge_flag) { - edge_flag = (edge_flag == GL_TRUE ? GL_FALSE : GL_TRUE); - (tobj->callbacks.edgeFlag) (edge_flag); - } - (tobj->callbacks.vertex) (v1->data); - if (edge_flag2 != edge_flag) { - edge_flag = (edge_flag == GL_TRUE ? GL_FALSE : GL_TRUE); - (tobj->callbacks.edgeFlag) (edge_flag); - } - (tobj->callbacks.vertex) (v2->data); - if (edge_flag3 != edge_flag) { - edge_flag = (edge_flag == GL_TRUE ? GL_FALSE : GL_TRUE); - (tobj->callbacks.edgeFlag) (edge_flag); - } - (tobj->callbacks.vertex) (v3->data); - (tobj->callbacks.end) (); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/Makefile b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/Makefile deleted file mode 100644 index 46dafe999e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/Makefile +++ /dev/null @@ -1,148 +0,0 @@ -# src/glu/sgi/Makefile - -.SUFFIXES : .cc - -TOP = ../../.. - -include $(TOP)/configs/current - -GLU_MAJOR = 1 -GLU_MINOR = 3 -GLU_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY) - -INCDIRS = -I$(TOP)/include -Iinclude -Iinternals -Ilibnurbs/internals -Ilibnurbs/interface -Ilibnurbs/nurbtess - -C_SOURCES = \ - libutil/error.c \ - libutil/glue.c \ - libutil/mipmap.c \ - libutil/project.c \ - libutil/quad.c \ - libutil/registry.c \ - libtess/dict.c \ - libtess/geom.c \ - libtess/memalloc.c \ - libtess/mesh.c \ - libtess/normal.c \ - libtess/priorityq.c \ - libtess/render.c \ - libtess/sweep.c \ - libtess/tess.c \ - libtess/tessmono.c - -CC_SOURCES = \ - libnurbs/interface/bezierEval.cc \ - libnurbs/interface/bezierPatch.cc \ - libnurbs/interface/bezierPatchMesh.cc \ - libnurbs/interface/glcurveval.cc \ - libnurbs/interface/glinterface.cc \ - libnurbs/interface/glrenderer.cc \ - libnurbs/interface/glsurfeval.cc \ - libnurbs/interface/incurveeval.cc \ - libnurbs/interface/insurfeval.cc \ - libnurbs/internals/arc.cc \ - libnurbs/internals/arcsorter.cc \ - libnurbs/internals/arctess.cc \ - libnurbs/internals/backend.cc \ - libnurbs/internals/basiccrveval.cc \ - libnurbs/internals/basicsurfeval.cc \ - libnurbs/internals/bin.cc \ - libnurbs/internals/bufpool.cc \ - libnurbs/internals/cachingeval.cc \ - libnurbs/internals/ccw.cc \ - libnurbs/internals/coveandtiler.cc \ - libnurbs/internals/curve.cc \ - libnurbs/internals/curvelist.cc \ - libnurbs/internals/curvesub.cc \ - libnurbs/internals/dataTransform.cc \ - libnurbs/internals/displaylist.cc \ - libnurbs/internals/flist.cc \ - libnurbs/internals/flistsorter.cc \ - libnurbs/internals/hull.cc \ - libnurbs/internals/intersect.cc \ - libnurbs/internals/knotvector.cc \ - libnurbs/internals/mapdesc.cc \ - libnurbs/internals/mapdescv.cc \ - libnurbs/internals/maplist.cc \ - libnurbs/internals/mesher.cc \ - libnurbs/internals/monoTriangulationBackend.cc \ - libnurbs/internals/monotonizer.cc \ - libnurbs/internals/mycode.cc \ - libnurbs/internals/nurbsinterfac.cc \ - libnurbs/internals/nurbstess.cc \ - libnurbs/internals/patch.cc \ - libnurbs/internals/patchlist.cc \ - libnurbs/internals/quilt.cc \ - libnurbs/internals/reader.cc \ - libnurbs/internals/renderhints.cc \ - libnurbs/internals/slicer.cc \ - libnurbs/internals/sorter.cc \ - libnurbs/internals/splitarcs.cc \ - libnurbs/internals/subdivider.cc \ - libnurbs/internals/tobezier.cc \ - libnurbs/internals/trimline.cc \ - libnurbs/internals/trimregion.cc \ - libnurbs/internals/trimvertpool.cc \ - libnurbs/internals/uarray.cc \ - libnurbs/internals/varray.cc \ - libnurbs/nurbtess/directedLine.cc \ - libnurbs/nurbtess/gridWrap.cc \ - libnurbs/nurbtess/monoChain.cc \ - libnurbs/nurbtess/monoPolyPart.cc \ - libnurbs/nurbtess/monoTriangulation.cc \ - libnurbs/nurbtess/partitionX.cc \ - libnurbs/nurbtess/partitionY.cc \ - libnurbs/nurbtess/polyDBG.cc \ - libnurbs/nurbtess/polyUtil.cc \ - libnurbs/nurbtess/primitiveStream.cc \ - libnurbs/nurbtess/quicksort.cc \ - libnurbs/nurbtess/rectBlock.cc \ - libnurbs/nurbtess/sampleComp.cc \ - libnurbs/nurbtess/sampleCompBot.cc \ - libnurbs/nurbtess/sampleCompRight.cc \ - libnurbs/nurbtess/sampleCompTop.cc \ - libnurbs/nurbtess/sampleMonoPoly.cc \ - libnurbs/nurbtess/sampledLine.cc \ - libnurbs/nurbtess/searchTree.cc - -SOURCES = $(C_SOURCES) $(CC_SOURCES) - -C_OBJECTS = $(C_SOURCES:.c=.o) -CC_OBJECTS = $(CC_SOURCES:.cc=.o) -OBJECTS = $(C_OBJECTS) $(CC_OBJECTS) - - -##### RULES ##### - -.c.o: - $(CC) -c $(INCDIRS) $(CFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@ - -.cc.o: - $(CXX) -c $(INCDIRS) $(CXXFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@ - - -##### TARGETS ##### - -default: - @if [ "${CONFIG_NAME}" = "beos" ] ; then \ - echo "$(GLU_LIB_NAME) not build under BeOS, but integrated into ${GL_LIB_NAME}." ; \ - exit 0 ; \ - else \ - $(MAKE) "${LIB_DIR}/${GLU_LIB_NAME}" ; \ - fi - -$(LIB_DIR): - -mkdir $(LIB_DIR) - -# Make the library: -$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS) - $(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CXX)' \ - -major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \ - -cplusplus $(MKLIB_OPTIONS) -install $(LIB_DIR) \ - $(GLU_LIB_DEPS) $(OBJECTS) - - -clean: - -rm -f *.o */*.o */*/*.o - -rm -f *.lo */*.lo */*/*.lo - -rm -f *.la */*.la */*/*.la diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/Makefile.DJ b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/Makefile.DJ deleted file mode 100644 index b5df3e846a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/Makefile.DJ +++ /dev/null @@ -1,188 +0,0 @@ -# Mesa 3-D graphics library -# Version: 4.0 -# -# Copyright (C) 1999 Brian Paul All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -# DOS/DJGPP glu makefile v1.5 for Mesa -# -# Copyright (C) 2002 - Daniel Borca -# Email : dborca@users.sourceforge.net -# Web : http://www.geocities.com/dborca - - -# -# Available options: -# -# Environment variables: -# CFLAGS -# -# Targets: -# all: build GLU -# clean: remove object files -# - - - -.PHONY: all clean - -TOP = ../../.. -LIBDIR = $(TOP)/lib -GLU_LIB = libglu.a -GLU_DXE = glu.dxe -GLU_IMP = libiglu.a - -export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR);$(GLIDE)/lib - -CC = gcc -CFLAGS += -DNDEBUG -DLIBRARYBUILD -I$(TOP)/include -Iinclude -CXX = gpp -CXXFLAGS = $(CFLAGS) -Ilibnurbs/internals -Ilibnurbs/interface -Ilibnurbs/nurbtess - -AR = ar -ARFLAGS = crus - -HAVEDXE3 = $(wildcard $(DJDIR)/bin/dxe3gen.exe) - -ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) -UNLINK = del $(subst /,\,$(1)) -else -UNLINK = $(RM) $(1) -endif - -C_SOURCES = \ - libutil/error.c \ - libutil/glue.c \ - libutil/mipmap.c \ - libutil/project.c \ - libutil/quad.c \ - libutil/registry.c \ - libtess/dict.c \ - libtess/geom.c \ - libtess/memalloc.c \ - libtess/mesh.c \ - libtess/normal.c \ - libtess/priorityq.c \ - libtess/render.c \ - libtess/sweep.c \ - libtess/tess.c \ - libtess/tessmono.c - -CC_SOURCES = \ - libnurbs/interface/bezierEval.cc \ - libnurbs/interface/bezierPatch.cc \ - libnurbs/interface/bezierPatchMesh.cc \ - libnurbs/interface/glcurveval.cc \ - libnurbs/interface/glinterface.cc \ - libnurbs/interface/glrenderer.cc \ - libnurbs/interface/glsurfeval.cc \ - libnurbs/interface/incurveeval.cc \ - libnurbs/interface/insurfeval.cc \ - libnurbs/internals/arc.cc \ - libnurbs/internals/arcsorter.cc \ - libnurbs/internals/arctess.cc \ - libnurbs/internals/backend.cc \ - libnurbs/internals/basiccrveval.cc \ - libnurbs/internals/basicsurfeval.cc \ - libnurbs/internals/bin.cc \ - libnurbs/internals/bufpool.cc \ - libnurbs/internals/cachingeval.cc \ - libnurbs/internals/ccw.cc \ - libnurbs/internals/coveandtiler.cc \ - libnurbs/internals/curve.cc \ - libnurbs/internals/curvelist.cc \ - libnurbs/internals/curvesub.cc \ - libnurbs/internals/dataTransform.cc \ - libnurbs/internals/displaylist.cc \ - libnurbs/internals/flist.cc \ - libnurbs/internals/flistsorter.cc \ - libnurbs/internals/hull.cc \ - libnurbs/internals/intersect.cc \ - libnurbs/internals/knotvector.cc \ - libnurbs/internals/mapdesc.cc \ - libnurbs/internals/mapdescv.cc \ - libnurbs/internals/maplist.cc \ - libnurbs/internals/mesher.cc \ - libnurbs/internals/monoTriangulationBackend.cc \ - libnurbs/internals/monotonizer.cc \ - libnurbs/internals/mycode.cc \ - libnurbs/internals/nurbsinterfac.cc \ - libnurbs/internals/nurbstess.cc \ - libnurbs/internals/patch.cc \ - libnurbs/internals/patchlist.cc \ - libnurbs/internals/quilt.cc \ - libnurbs/internals/reader.cc \ - libnurbs/internals/renderhints.cc \ - libnurbs/internals/slicer.cc \ - libnurbs/internals/sorter.cc \ - libnurbs/internals/splitarcs.cc \ - libnurbs/internals/subdivider.cc \ - libnurbs/internals/tobezier.cc \ - libnurbs/internals/trimline.cc \ - libnurbs/internals/trimregion.cc \ - libnurbs/internals/trimvertpool.cc \ - libnurbs/internals/uarray.cc \ - libnurbs/internals/varray.cc \ - libnurbs/nurbtess/directedLine.cc \ - libnurbs/nurbtess/gridWrap.cc \ - libnurbs/nurbtess/monoChain.cc \ - libnurbs/nurbtess/monoPolyPart.cc \ - libnurbs/nurbtess/monoTriangulation.cc \ - libnurbs/nurbtess/partitionX.cc \ - libnurbs/nurbtess/partitionY.cc \ - libnurbs/nurbtess/polyDBG.cc \ - libnurbs/nurbtess/polyUtil.cc \ - libnurbs/nurbtess/primitiveStream.cc \ - libnurbs/nurbtess/quicksort.cc \ - libnurbs/nurbtess/rectBlock.cc \ - libnurbs/nurbtess/sampleComp.cc \ - libnurbs/nurbtess/sampleCompBot.cc \ - libnurbs/nurbtess/sampleCompRight.cc \ - libnurbs/nurbtess/sampleCompTop.cc \ - libnurbs/nurbtess/sampleMonoPoly.cc \ - libnurbs/nurbtess/sampledLine.cc \ - libnurbs/nurbtess/searchTree.cc - -SOURCES = $(C_SOURCES) $(CC_SOURCES) - -OBJECTS = $(addsuffix .o,$(basename $(SOURCES))) - -.c.o: - $(CC) -o $@ $(CFLAGS) -c $< -.cc.o: - $(CXX) -o $@ $(CXXFLAGS) -c $< - -all: $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLU_DXE) $(LIBDIR)/$(GLU_IMP) - -$(LIBDIR)/$(GLU_LIB): $(OBJECTS) - $(AR) $(ARFLAGS) $@ $^ - -$(LIBDIR)/$(GLU_DXE) $(LIBDIR)/$(GLU_IMP): $(OBJECTS) -ifeq ($(HAVEDXE3),) - $(warning Missing DXE3 package... Skipping $(GLU_DXE)) -else - -dxe3gen -o $(LIBDIR)/$(GLU_DXE) -Y $(LIBDIR)/$(GLU_IMP) -D "MesaGLU/SGI DJGPP" -E _glu -P gl.dxe -U $^ -endif - -clean: - -$(call UNLINK,libutil/*.o) - -$(call UNLINK,libtess/*.o) - -$(call UNLINK,libnurbs/interface/*.o) - -$(call UNLINK,libnurbs/internals/*.o) - -$(call UNLINK,libnurbs/nurbtess/*.o) diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/Makefile.win b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/Makefile.win deleted file mode 100644 index 9321732ef0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/Makefile.win +++ /dev/null @@ -1,149 +0,0 @@ -# Makefile for Win32 - -!include - -.SUFFIXES : .cc - -TOP = .. - -GLU_SRCS_CC = \ - libnurbs\interface\bezierEval.cc \ - libnurbs\interface\bezierPatch.cc \ - libnurbs\interface\bezierPatchMesh.cc \ - libnurbs\interface\glcurveval.cc \ - libnurbs\interface\glinterface.cc \ - libnurbs\interface\glrenderer.cc \ - libnurbs\interface\glsurfeval.cc \ - libnurbs\interface\incurveeval.cc \ - libnurbs\interface\insurfeval.cc \ - libnurbs\internals\arc.cc \ - libnurbs\internals\arcsorter.cc \ - libnurbs\internals\arctess.cc \ - libnurbs\internals\backend.cc \ - libnurbs\internals\basiccrveval.cc \ - libnurbs\internals\basicsurfeval.cc \ - libnurbs\internals\bin.cc \ - libnurbs\internals\bufpool.cc \ - libnurbs\internals\cachingeval.cc \ - libnurbs\internals\ccw.cc \ - libnurbs\internals\coveandtiler.cc \ - libnurbs\internals\curve.cc \ - libnurbs\internals\curvelist.cc \ - libnurbs\internals\curvesub.cc \ - libnurbs\internals\dataTransform.cc \ - libnurbs\internals\displaylist.cc \ - libnurbs\internals\flist.cc \ - libnurbs\internals\flistsorter.cc \ - libnurbs\internals\hull.cc \ - libnurbs\internals\intersect.cc \ - libnurbs\internals\knotvector.cc \ - libnurbs\internals\mapdesc.cc \ - libnurbs\internals\mapdescv.cc \ - libnurbs\internals\maplist.cc \ - libnurbs\internals\mesher.cc \ - libnurbs\internals\monoTriangulationBackend.cc \ - libnurbs\internals\monotonizer.cc \ - libnurbs\internals\mycode.cc \ - libnurbs\internals\nurbsinterfac.cc \ - libnurbs\internals\nurbstess.cc \ - libnurbs\internals\patch.cc \ - libnurbs\internals\patchlist.cc \ - libnurbs\internals\quilt.cc \ - libnurbs\internals\reader.cc \ - libnurbs\internals\renderhints.cc \ - libnurbs\internals\slicer.cc \ - libnurbs\internals\sorter.cc \ - libnurbs\internals\splitarcs.cc \ - libnurbs\internals\subdivider.cc \ - libnurbs\internals\tobezier.cc \ - libnurbs\internals\trimline.cc \ - libnurbs\internals\trimregion.cc \ - libnurbs\internals\trimvertpool.cc \ - libnurbs\internals\uarray.cc \ - libnurbs\internals\varray.cc \ - libnurbs\nurbtess\directedLine.cc \ - libnurbs\nurbtess\gridWrap.cc \ - libnurbs\nurbtess\monoChain.cc \ - libnurbs\nurbtess\monoPolyPart.cc \ - libnurbs\nurbtess\monoTriangulation.cc \ - libnurbs\nurbtess\partitionX.cc \ - libnurbs\nurbtess\partitionY.cc \ - libnurbs\nurbtess\polyDBG.cc \ - libnurbs\nurbtess\polyUtil.cc \ - libnurbs\nurbtess\primitiveStream.cc \ - libnurbs\nurbtess\quicksort.cc \ - libnurbs\nurbtess\rectBlock.cc \ - libnurbs\nurbtess\sampleComp.cc \ - libnurbs\nurbtess\sampleCompBot.cc \ - libnurbs\nurbtess\sampleCompRight.cc \ - libnurbs\nurbtess\sampleCompTop.cc \ - libnurbs\nurbtess\sampleMonoPoly.cc \ - libnurbs\nurbtess\sampledLine.cc \ - libnurbs\nurbtess\searchTree.cc - -GLU_SRCS = \ - libtess\dict.c \ - libtess\geom.c \ - libtess\memalloc.c \ - libtess\mesh.c \ - libtess\normal.c \ - libtess\priorityq.c \ - libtess\render.c \ - libtess\sweep.c \ - libtess\tess.c \ - libtess\tessmono.c \ - libutil\error.c \ - libutil\glue.c \ - libutil\mipmap.c \ - libutil\project.c \ - libutil\quad.c \ - libutil\registry.c - -SRCS = $(GLU_SRCS) - -all : gludll - -!include "$(TOP)/mesawin32.mak" - -gludll : $(GLUDLL) - -CFLAGS = $(cvarsdll) $(CFLAGS) -D_OPENGL32_ -Iinclude -DBUILD_GL32 -DLIBRARYBUILD -LFLAGS = $(dlllflags) $(lcommon) $(LFLAGS) - -LIBS = ../lib/$(MESALIB) winmm.lib $(guilibsdll) - -OBJS = $(GLU_SRCS_CC:.cc=.obj) $(GLU_SRCS:.c=.obj) -NURBSINC = -Ilibnurbs\interface -Ilibnurbs\internals -Ilibnurbs\nurbtess -CFLAGS = $(CFLAGS) $(NURBSINC) - -$(GLUDLL): $(OBJS) glu.def - $(link) $(LFLAGS) -out:$(GLUDLL) -def:glu.def $(OBJS) $(LIBS) - @echo "copying Mesa GLU dynamic link library to library directory..." - -copy $(GLUDLL) $(TOP)\lib - @echo "copying Mesa GLU import library to library directory..." - -copy $(GLULIB) $(TOP)\lib - -install : $(GLUDLL) $(GLULIB) - @echo "copying Mesa GLU dynamic link library to system directory..." - -copy $(GLUDLL) $(DLLINSTALL) - @echo "copying Mesa GLU header files to include directory..." - -copy ..\..\include\GL\glu.h $(INCLUDEINSTALL) - @echo "copying Mesa GLU import library to system library directory..." - -copy $(GLULIB) $(LIBINSTALL) - -clean :: - @del /f libtess\*.obj libutil\*.obj - @del /f libnurbs\interface\*.obj libnurbs\internals\*.obj - @del /f libnurbs\nurbtess\*.obj - -# override default inference rule with one that writes the object to -# the same subdir as the c file. - -.c.obj : - $(cc) $(CFLAGS) -I. $< /Fo$*.obj - -# /TP is needed for C++ files because MS compiler -# does not recognize .cc as a C++ file. - -.cc.obj : - $(cc) $(CFLAGS) -I. $< /TP /Fo$*.obj diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/descrip.mms b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/descrip.mms deleted file mode 100644 index 1f795d8480..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/descrip.mms +++ /dev/null @@ -1,451 +0,0 @@ -# Makefile for GLU for VMS -# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl - -.first - define gl [---.include.gl] - -.include [---]mms-config. - -##### MACROS ##### - -VPATH = RCS - -INCDIR =([-.include],[.include],[.internals],[.libnurbs.internals],\ - [.libnurbs.interface],[.libnurbs.nurbtess]) -LIBDIR = [---.lib] -CFLAGS = /include=$(INCDIR)/name=(as_is,short) - -LU_OBJECTS=\ - [.libutil]error.obj, \ - [.libutil]glue.obj, \ - [.libutil]mipmap.obj,\ - [.libutil]project.obj,\ - [.libutil]quad.obj, \ - [.libutil]registry.obj - -LT_OBJECTS=[.libtess]dict.obj, \ - [.libtess]geom.obj, \ - [.libtess]memalloc.obj,\ - [.libtess]mesh.obj, \ - [.libtess]normal.obj,\ - [.libtess]priorityq.obj,\ - [.libtess]render.obj,\ - [.libtess]sweep.obj, \ - [.libtess]tess.obj, \ - [.libtess]tessmono.obj - -LI_OBJECTS=[.libnurbs.interface]bezierEval.obj, \ - [.libnurbs.interface]bezierPatch.obj, \ - [.libnurbs.interface]bezierPatchMesh.obj, \ - [.libnurbs.interface]glcurveval.obj, \ - [.libnurbs.interface]glinterface.obj - -LI_OBJECTS1=[.libnurbs.interface]glrenderer.obj, \ - [.libnurbs.interface]glsurfeval.obj, \ - [.libnurbs.interface]incurveeval.obj, \ - [.libnurbs.interface]insurfeval.obj - -LI2_OBJECTS=[.libnurbs.internals]arc.obj, \ - [.libnurbs.internals]arcsorter.obj, \ - [.libnurbs.internals]arctess.obj, \ - [.libnurbs.internals]backend.obj, \ - [.libnurbs.internals]basiccrveval.obj, \ - [.libnurbs.internals]basicsurfeval.obj - -LI2_OBJECTS1=[.libnurbs.internals]bin.obj, \ - [.libnurbs.internals]bufpool.obj, \ - [.libnurbs.internals]cachingeval.obj, \ - [.libnurbs.internals]ccw.obj, \ - [.libnurbs.internals]coveandtiler.obj, \ - [.libnurbs.internals]curve.obj, \ - [.libnurbs.internals]curvelist.obj - -LI2_OBJECTS2=[.libnurbs.internals]curvesub.obj, \ - [.libnurbs.internals]dataTransform.obj, \ - [.libnurbs.internals]displaylist.obj, \ - [.libnurbs.internals]flist.obj, \ - [.libnurbs.internals]flistsorter.obj - -LI2_OBJECTS3=[.libnurbs.internals]hull.obj, \ - [.libnurbs.internals]intersect.obj, \ - [.libnurbs.internals]knotvector.obj, \ - [.libnurbs.internals]mapdesc.obj - -LI2_OBJECTS4=[.libnurbs.internals]mapdescv.obj, \ - [.libnurbs.internals]maplist.obj, \ - [.libnurbs.internals]mesher.obj, \ - [.libnurbs.internals]monoTriangulationBackend.obj,\ - [.libnurbs.internals]monotonizer.obj - -LI2_OBJECTS5=[.libnurbs.internals]mycode.obj, \ - [.libnurbs.internals]nurbsinterfac.obj, \ - [.libnurbs.internals]nurbstess.obj, \ - [.libnurbs.internals]patch.obj - -LI2_OBJECTS6=[.libnurbs.internals]patchlist.obj, \ - [.libnurbs.internals]quilt.obj, \ - [.libnurbs.internals]reader.obj, \ - [.libnurbs.internals]renderhints.obj, \ - [.libnurbs.internals]slicer.obj - -LI2_OBJECTS7=[.libnurbs.internals]sorter.obj, \ - [.libnurbs.internals]splitarcs.obj, \ - [.libnurbs.internals]subdivider.obj, \ - [.libnurbs.internals]tobezier.obj - -LI2_OBJECTS8=[.libnurbs.internals]trimline.obj, \ - [.libnurbs.internals]trimregion.obj, \ - [.libnurbs.internals]trimvertpool.obj, \ - [.libnurbs.internals]uarray.obj, \ - [.libnurbs.internals]varray.obj - -LN_OBJECTS=[.libnurbs.nurbtess]directedLine.obj, \ - [.libnurbs.nurbtess]gridWrap.obj, \ - [.libnurbs.nurbtess]monoChain.obj, \ - [.libnurbs.nurbtess]monoPolyPart.obj, \ - [.libnurbs.nurbtess]monoTriangulation.obj - -LN_OBJECTS1=[.libnurbs.nurbtess]partitionX.obj, \ - [.libnurbs.nurbtess]partitionY.obj, \ - [.libnurbs.nurbtess]polyDBG.obj - -LN_OBJECTS2=[.libnurbs.nurbtess]polyUtil.obj, \ - [.libnurbs.nurbtess]primitiveStream.obj, \ - [.libnurbs.nurbtess]quicksort.obj, \ - [.libnurbs.nurbtess]rectBlock.obj - -LN_OBJECTS3=[.libnurbs.nurbtess]sampleComp.obj, \ - [.libnurbs.nurbtess]sampleCompBot.obj, \ - [.libnurbs.nurbtess]sampleCompRight.obj - -LN_OBJECTS4=[.libnurbs.nurbtess]sampleCompTop.obj, \ - [.libnurbs.nurbtess]sampleMonoPoly.obj,\ - [.libnurbs.nurbtess]sampledLine.obj, \ - [.libnurbs.nurbtess]searchTree.obj - -##### RULES ##### - -VERSION=MesaGlu V3.5 - -##### TARGETS ##### - -# Make the library: -$(LIBDIR)$(GLU_LIB) : $(LU_OBJECTS) $(LT_OBJECTS) $(LI_OBJECTS) $(LI_OBJECTS1)\ - $(LI2_OBJECTS) $(LI2_OBJECTS1) $(LI2_OBJECTS2)\ - $(LI2_OBJECTS3) $(LI2_OBJECTS4) $(LI2_OBJECTS5)\ - $(LI2_OBJECTS6) $(LI2_OBJECTS7) $(LI2_OBJECTS8)\ - $(LN_OBJECTS) $(LN_OBJECTS1) $(LN_OBJECTS2)\ - $(LN_OBJECTS3) $(LN_OBJECTS4) - @ $(MAKELIB) $(GLU_LIB) $(LU_OBJECTS),$(LT_OBJECTS),$(LI_OBJECTS),\ - $(LI2_OBJECTS),$(LN_OBJECTS) - @ rename $(GLU_LIB)* $(LIBDIR) -.ifdef SHARE - @ WRITE_ SYS$OUTPUT " generating mesagl1.opt" - @ OPEN_/WRITE FILE mesagl1.opt - @ WRITE_ FILE "!" - @ WRITE_ FILE "! mesagl1.opt generated by DESCRIP.$(MMS_EXT)" - @ WRITE_ FILE "!" - @ WRITE_ FILE "IDENTIFICATION=""$(VERSION)""" - @ WRITE_ FILE "GSMATCH=LEQUAL,3,5 - @ WRITE_ FILE "$(LU_OBJECTS)" - @ WRITE_ FILE "$(LT_OBJECTS)" - @ WRITE_ FILE "$(LI_OBJECTS)" - @ WRITE_ FILE "$(LI_OBJECTS1)" - @ WRITE_ FILE "$(LI2_OBJECTS)" - @ WRITE_ FILE "$(LI2_OBJECTS1)" - @ WRITE_ FILE "$(LI2_OBJECTS2)" - @ WRITE_ FILE "$(LI2_OBJECTS3)" - @ WRITE_ FILE "$(LI2_OBJECTS4)" - @ WRITE_ FILE "$(LI2_OBJECTS5)" - @ WRITE_ FILE "$(LI2_OBJECTS6)" - @ WRITE_ FILE "$(LI2_OBJECTS7)" - @ WRITE_ FILE "$(LI2_OBJECTS8)" - @ WRITE_ FILE "$(LN_OBJECTS)" - @ WRITE_ FILE "$(LN_OBJECTS1)" - @ WRITE_ FILE "$(LN_OBJECTS2)" - @ WRITE_ FILE "$(LN_OBJECTS3)" - @ WRITE_ FILE "$(LN_OBJECTS4)" - @ WRITE_ FILE "[---.lib]libmesagl.exe/SHARE" - @ WRITE_ FILE "SYS$SHARE:DECW$XEXTLIBSHR/SHARE" - @ WRITE_ FILE "SYS$SHARE:DECW$XLIBSHR/SHARE" - @ CLOSE_ FILE -# @ WRITE_ SYS$OUTPUT " generating mesagl.map ..." -# @ CXXLINK_/NODEB/NOSHARE/NOEXE/MAP=mesagl.map/FULL mesagl1.opt/OPT -# @ WRITE_ SYS$OUTPUT " analyzing mesagl.map ..." -# @ @[-.vms]ANALYZE_MAP.COM mesagl.map mesagl.opt - @ WRITE_ SYS$OUTPUT " linking $(GLU_SHAR) ..." -# @ CXXLINK_/noinform/NODEB/SHARE=$(GLU_SHAR)/MAP=mesagl.map/FULL mesagl1.opt/opt,mesagl.opt/opt - @ CXXLINK_/noinform/NODEB/SHARE=$(GLU_SHAR)/MAP=mesagl.map/FULL mesagl1.opt/opt,mesaglu.opt/opt - @ rename $(GLU_SHAR)* $(LIBDIR) -.endif - -clean : - delete [...]*.obj;* - purge - -[.libutil]error.obj : [.libutil]error.c - $(CC) $(CFLAGS) /obj=[.libutil]error.obj [.libutil]error.c - -[.libutil]glue.obj : [.libutil]glue.c - $(CC) $(CFLAGS) /obj=[.libutil]glue.obj [.libutil]glue.c - -[.libutil]mipmap.obj : [.libutil]mipmap.c - $(CC) $(CFLAGS) /obj=[.libutil]mipmap.obj [.libutil]mipmap.c - -[.libutil]project.obj : [.libutil]project.c - $(CC) $(CFLAGS) /obj=[.libutil]project.obj [.libutil]project.c - -[.libutil]quad.obj : [.libutil]quad.c - $(CC) $(CFLAGS) /obj=[.libutil]quad.obj [.libutil]quad.c - -[.libutil]registry.obj : [.libutil]registry.c - $(CC) $(CFLAGS) /obj=[.libutil]registry.obj [.libutil]registry.c - -[.libtess]dict.obj : [.libtess]dict.c - $(CC) $(CFLAGS) /obj=[.libtess]dict.obj [.libtess]dict.c - -[.libtess]geom.obj : [.libtess]geom.c - $(CC) $(CFLAGS) /obj=[.libtess]geom.obj [.libtess]geom.c - -[.libtess]memalloc.obj : [.libtess]memalloc.c - $(CC) $(CFLAGS) /obj=[.libtess]memalloc.obj [.libtess]memalloc.c - -[.libtess]mesh.obj : [.libtess]mesh.c - $(CC) $(CFLAGS) /obj=[.libtess]mesh.obj [.libtess]mesh.c - -[.libtess]normal.obj : [.libtess]normal.c - $(CC) $(CFLAGS) /obj=[.libtess]normal.obj [.libtess]normal.c - -[.libtess]priorityq.obj : [.libtess]priorityq.c - $(CC) $(CFLAGS) /obj=[.libtess]priorityq.obj [.libtess]priorityq.c - -[.libtess]render.obj : [.libtess]render.c - $(CC) $(CFLAGS) /obj=[.libtess]render.obj [.libtess]render.c - -[.libtess]sweep.obj : [.libtess]sweep.c - $(CC) $(CFLAGS) /obj=[.libtess]sweep.obj [.libtess]sweep.c - -[.libtess]tess.obj : [.libtess]tess.c - $(CC) $(CFLAGS) /obj=[.libtess]tess.obj [.libtess]tess.c - -[.libtess]tessmono.obj : [.libtess]tessmono.c - $(CC) $(CFLAGS) /obj=[.libtess]tessmono.obj [.libtess]tessmono.c - -[.libnurbs.interface]bezierEval.obj : [.libnurbs.interface]bezierEval.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.interface]bezierEval.obj [.libnurbs.interface]bezierEval.cc - -[.libnurbs.interface]bezierPatch.obj : [.libnurbs.interface]bezierPatch.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.interface]bezierPatch.obj [.libnurbs.interface]bezierPatch.cc - -[.libnurbs.interface]bezierPatchMesh.obj : [.libnurbs.interface]bezierPatchMesh.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.interface]bezierPatchMesh.obj [.libnurbs.interface]bezierPatchMesh.cc - -[.libnurbs.interface]glcurveval.obj : [.libnurbs.interface]glcurveval.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.interface]glcurveval.obj [.libnurbs.interface]glcurveval.cc - -[.libnurbs.interface]glinterface.obj : [.libnurbs.interface]glinterface.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.interface]glinterface.obj [.libnurbs.interface]glinterface.cc - -[.libnurbs.interface]glrenderer.obj : [.libnurbs.interface]glrenderer.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.interface]glrenderer.obj [.libnurbs.interface]glrenderer.cc - -[.libnurbs.interface]glsurfeval.obj : [.libnurbs.interface]glsurfeval.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.interface]glsurfeval.obj [.libnurbs.interface]glsurfeval.cc - -[.libnurbs.interface]incurveeval.obj : [.libnurbs.interface]incurveeval.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.interface]incurveeval.obj [.libnurbs.interface]incurveeval.cc - -[.libnurbs.interface]insurfeval.obj : [.libnurbs.interface]insurfeval.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.interface]insurfeval.obj [.libnurbs.interface]insurfeval.cc - -[.libnurbs.internals]arc.obj : [.libnurbs.internals]arc.cc - $(CXX) $(CFLAGS)/list/show=all /obj=[.libnurbs.internals]arc.obj [.libnurbs.internals]arc.cc - -[.libnurbs.internals]arcsorter.obj : [.libnurbs.internals]arcsorter.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]arcsorter.obj [.libnurbs.internals]arcsorter.cc - -[.libnurbs.internals]arctess.obj : [.libnurbs.internals]arctess.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]arctess.obj [.libnurbs.internals]arctess.cc - -[.libnurbs.internals]backend.obj : [.libnurbs.internals]backend.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]backend.obj [.libnurbs.internals]backend.cc - -[.libnurbs.internals]basiccrveval.obj : [.libnurbs.internals]basiccrveval.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]basiccrveval.obj [.libnurbs.internals]basiccrveval.cc - -[.libnurbs.internals]basicsurfeval.obj : [.libnurbs.internals]basicsurfeval.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]basicsurfeval.obj [.libnurbs.internals]basicsurfeval.cc - -[.libnurbs.internals]bin.obj : [.libnurbs.internals]bin.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]bin.obj [.libnurbs.internals]bin.cc - -[.libnurbs.internals]bufpool.obj : [.libnurbs.internals]bufpool.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]bufpool.obj [.libnurbs.internals]bufpool.cc - -[.libnurbs.internals]cachingeval.obj : [.libnurbs.internals]cachingeval.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]cachingeval.obj [.libnurbs.internals]cachingeval.cc - -[.libnurbs.internals]ccw.obj : [.libnurbs.internals]ccw.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]ccw.obj [.libnurbs.internals]ccw.cc - -[.libnurbs.internals]coveandtiler.obj : [.libnurbs.internals]coveandtiler.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]coveandtiler.obj [.libnurbs.internals]coveandtiler.cc - -[.libnurbs.internals]curve.obj : [.libnurbs.internals]curve.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]curve.obj [.libnurbs.internals]curve.cc - -[.libnurbs.internals]curvelist.obj : [.libnurbs.internals]curvelist.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]curvelist.obj [.libnurbs.internals]curvelist.cc - -[.libnurbs.internals]curvesub.obj : [.libnurbs.internals]curvesub.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]curvesub.obj [.libnurbs.internals]curvesub.cc - -[.libnurbs.internals]dataTransform.obj : [.libnurbs.internals]dataTransform.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]dataTransform.obj [.libnurbs.internals]dataTransform.cc - -[.libnurbs.internals]displaylist.obj : [.libnurbs.internals]displaylist.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]displaylist.obj [.libnurbs.internals]displaylist.cc - -[.libnurbs.internals]flist.obj : [.libnurbs.internals]flist.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]flist.obj [.libnurbs.internals]flist.cc - -[.libnurbs.internals]flistsorter.obj : [.libnurbs.internals]flistsorter.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]flistsorter.obj [.libnurbs.internals]flistsorter.cc - -[.libnurbs.internals]hull.obj : [.libnurbs.internals]hull.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]hull.obj [.libnurbs.internals]hull.cc - -[.libnurbs.internals]intersect.obj : [.libnurbs.internals]intersect.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]intersect.obj [.libnurbs.internals]intersect.cc - -[.libnurbs.internals]knotvector.obj : [.libnurbs.internals]knotvector.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]knotvector.obj [.libnurbs.internals]knotvector.cc - -[.libnurbs.internals]mapdesc.obj : [.libnurbs.internals]mapdesc.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]mapdesc.obj [.libnurbs.internals]mapdesc.cc - -[.libnurbs.internals]mapdescv.obj : [.libnurbs.internals]mapdescv.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]mapdescv.obj [.libnurbs.internals]mapdescv.cc - -[.libnurbs.internals]maplist.obj : [.libnurbs.internals]maplist.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]maplist.obj [.libnurbs.internals]maplist.cc - -[.libnurbs.internals]mesher.obj : [.libnurbs.internals]mesher.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]mesher.obj [.libnurbs.internals]mesher.cc - -[.libnurbs.internals]monoTriangulationBackend.obj : [.libnurbs.internals]monoTriangulationBackend.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]monoTriangulationBackend.obj [.libnurbs.internals]monoTriangulationBackend.cc - -[.libnurbs.internals]monotonizer.obj : [.libnurbs.internals]monotonizer.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]monotonizer.obj [.libnurbs.internals]monotonizer.cc - -[.libnurbs.internals]mycode.obj : [.libnurbs.internals]mycode.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]mycode.obj [.libnurbs.internals]mycode.cc - -[.libnurbs.internals]nurbsinterfac.obj : [.libnurbs.internals]nurbsinterfac.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]nurbsinterfac.obj [.libnurbs.internals]nurbsinterfac.cc - -[.libnurbs.internals]nurbstess.obj : [.libnurbs.internals]nurbstess.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]nurbstess.obj [.libnurbs.internals]nurbstess.cc - -[.libnurbs.internals]patch.obj : [.libnurbs.internals]patch.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]patch.obj [.libnurbs.internals]patch.cc - -[.libnurbs.internals]patchlist.obj : [.libnurbs.internals]patchlist.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]patchlist.obj [.libnurbs.internals]patchlist.cc - -[.libnurbs.internals]quilt.obj : [.libnurbs.internals]quilt.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]quilt.obj [.libnurbs.internals]quilt.cc - -[.libnurbs.internals]reader.obj : [.libnurbs.internals]reader.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]reader.obj [.libnurbs.internals]reader.cc - -[.libnurbs.internals]renderhints.obj : [.libnurbs.internals]renderhints.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]renderhints.obj [.libnurbs.internals]renderhints.cc - -[.libnurbs.internals]slicer.obj : [.libnurbs.internals]slicer.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]slicer.obj [.libnurbs.internals]slicer.cc - -[.libnurbs.internals]sorter.obj : [.libnurbs.internals]sorter.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]sorter.obj [.libnurbs.internals]sorter.cc - -[.libnurbs.internals]splitarcs.obj : [.libnurbs.internals]splitarcs.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]splitarcs.obj [.libnurbs.internals]splitarcs.cc - -[.libnurbs.internals]subdivider.obj : [.libnurbs.internals]subdivider.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]subdivider.obj [.libnurbs.internals]subdivider.cc - -[.libnurbs.internals]tobezier.obj : [.libnurbs.internals]tobezier.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]tobezier.obj [.libnurbs.internals]tobezier.cc - -[.libnurbs.internals]trimline.obj : [.libnurbs.internals]trimline.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]trimline.obj [.libnurbs.internals]trimline.cc - -[.libnurbs.internals]trimregion.obj : [.libnurbs.internals]trimregion.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]trimregion.obj [.libnurbs.internals]trimregion.cc - -[.libnurbs.internals]trimvertpool.obj : [.libnurbs.internals]trimvertpool.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]trimvertpool.obj [.libnurbs.internals]trimvertpool.cc - -[.libnurbs.internals]uarray.obj : [.libnurbs.internals]uarray.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]uarray.obj [.libnurbs.internals]uarray.cc - -[.libnurbs.internals]varray.obj : [.libnurbs.internals]varray.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.internals]varray.obj [.libnurbs.internals]varray.cc - -[.libnurbs.nurbtess]directedLine.obj : [.libnurbs.nurbtess]directedLine.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]directedLine.obj [.libnurbs.nurbtess]directedLine.cc - -[.libnurbs.nurbtess]gridWrap.obj : [.libnurbs.nurbtess]gridWrap.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]gridWrap.obj [.libnurbs.nurbtess]gridWrap.cc - -[.libnurbs.nurbtess]monoChain.obj : [.libnurbs.nurbtess]monoChain.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]monoChain.obj [.libnurbs.nurbtess]monoChain.cc - -[.libnurbs.nurbtess]monoPolyPart.obj : [.libnurbs.nurbtess]monoPolyPart.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]monoPolyPart.obj [.libnurbs.nurbtess]monoPolyPart.cc - -[.libnurbs.nurbtess]monoTriangulation.obj : [.libnurbs.nurbtess]monoTriangulation.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]monoTriangulation.obj [.libnurbs.nurbtess]monoTriangulation.cc - -[.libnurbs.nurbtess]partitionX.obj : [.libnurbs.nurbtess]partitionX.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]partitionX.obj [.libnurbs.nurbtess]partitionX.cc - -[.libnurbs.nurbtess]partitionY.obj : [.libnurbs.nurbtess]partitionY.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]partitionY.obj [.libnurbs.nurbtess]partitionY.cc - -[.libnurbs.nurbtess]polyDBG.obj : [.libnurbs.nurbtess]polyDBG.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]polyDBG.obj [.libnurbs.nurbtess]polyDBG.cc - -[.libnurbs.nurbtess]polyUtil.obj : [.libnurbs.nurbtess]polyUtil.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]polyUtil.obj [.libnurbs.nurbtess]polyUtil.cc - -[.libnurbs.nurbtess]primitiveStream.obj : [.libnurbs.nurbtess]primitiveStream.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]primitiveStream.obj [.libnurbs.nurbtess]primitiveStream.cc - -[.libnurbs.nurbtess]quicksort.obj : [.libnurbs.nurbtess]quicksort.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]quicksort.obj [.libnurbs.nurbtess]quicksort.cc - -[.libnurbs.nurbtess]rectBlock.obj : [.libnurbs.nurbtess]rectBlock.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]rectBlock.obj [.libnurbs.nurbtess]rectBlock.cc - -[.libnurbs.nurbtess]sampleComp.obj : [.libnurbs.nurbtess]sampleComp.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]sampleComp.obj [.libnurbs.nurbtess]sampleComp.cc - -[.libnurbs.nurbtess]sampleCompBot.obj : [.libnurbs.nurbtess]sampleCompBot.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]sampleCompBot.obj [.libnurbs.nurbtess]sampleCompBot.cc - -[.libnurbs.nurbtess]sampleCompRight.obj : [.libnurbs.nurbtess]sampleCompRight.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]sampleCompRight.obj [.libnurbs.nurbtess]sampleCompRight.cc - -[.libnurbs.nurbtess]sampleCompTop.obj : [.libnurbs.nurbtess]sampleCompTop.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]sampleCompTop.obj [.libnurbs.nurbtess]sampleCompTop.cc - -[.libnurbs.nurbtess]sampleMonoPoly.obj : [.libnurbs.nurbtess]sampleMonoPoly.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]sampleMonoPoly.obj [.libnurbs.nurbtess]sampleMonoPoly.cc - -[.libnurbs.nurbtess]sampledLine.obj : [.libnurbs.nurbtess]sampledLine.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]sampledLine.obj [.libnurbs.nurbtess]sampledLine.cc - -[.libnurbs.nurbtess]searchTree.obj : [.libnurbs.nurbtess]searchTree.cc - $(CXX) $(CFLAGS) /obj=[.libnurbs.nurbtess]searchTree.obj [.libnurbs.nurbtess]searchTree.cc diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/dummy.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/dummy.cc deleted file mode 100644 index fac5a63b76..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/dummy.cc +++ /dev/null @@ -1,5 +0,0 @@ -/* $Id: dummy.cc,v 1.1 2001/03/18 13:06:19 pesco Exp $ */ -/* - * This file contains nothing. It's just there so there's at least a single - * source file for libGLU.la in this directory. - */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/glu.def b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/glu.def deleted file mode 100644 index ffec651a0a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/glu.def +++ /dev/null @@ -1,88 +0,0 @@ -DESCRIPTION 'Mesa GLU (OpenGL work-alike) for Win32' -VERSION 5.1 -; -; Module definition file for GLU (GLU32.DLL) -; -; Note: The GLU functions use the STDCALL -; function calling convention. Microsoft's -; GLU32 uses this convention and so must the -; Mesa GLU32 so that the Mesa DLL can be used -; as a drop-in replacement. -; -; The linker exports STDCALL entry points with -; 'decorated' names; e.g., _glBegin@0, where the -; trailing number is the number of bytes of -; parameter data pushed onto the stack. The -; callee is responsible for popping this data -; off the stack, usually via a RETF n instruction. -; -; However, the Microsoft GLU32.DLL does not export -; the decorated names, even though the calling convention -; is STDCALL. So, this module definition file is -; needed to force the Mesa GLU32.DLL to export the -; symbols in the same manner as the Microsoft DLL. -; Were it not for this problem, this file would not -; be needed (for the glu* functions) since the entry -; points are compiled with dllexport declspec. -; - -EXPORTS - gluBeginCurve - gluBeginPolygon - gluBeginSurface - gluBeginTrim - gluBuild1DMipmapLevels - gluBuild1DMipmaps - gluBuild2DMipmapLevels - gluBuild2DMipmaps - gluBuild3DMipmapLevels - gluBuild3DMipmaps - gluCheckExtension - gluCylinder - gluDeleteNurbsRenderer - gluDeleteQuadric - gluDeleteTess - gluDisk - gluEndCurve - gluEndPolygon - gluEndSurface - gluEndTrim - gluErrorString - gluGetNurbsProperty - gluGetString - gluGetTessProperty - gluLoadSamplingMatrices - gluLookAt - gluNewNurbsRenderer - gluNewQuadric - gluNewTess - gluNextContour - gluNurbsCallback - gluNurbsCallbackData - gluNurbsCallbackDataEXT - gluNurbsCurve - gluNurbsProperty - gluNurbsSurface - gluOrtho2D - gluPartialDisk - gluPerspective - gluPickMatrix - gluProject - gluPwlCurve - gluQuadricCallback - gluQuadricDrawStyle - gluQuadricNormals - gluQuadricOrientation - gluQuadricTexture - gluScaleImage - gluSphere - gluTessBeginContour - gluTessBeginPolygon - gluTessCallback - gluTessEndContour - gluTessEndPolygon - gluTessNormal - gluTessProperty - gluTessVertex - gluUnProject - gluUnProject4 diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/include/gluos.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/include/gluos.h deleted file mode 100644 index 8eaa7a153b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/include/gluos.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -** gluos.h - operating system dependencies for GLU -** -*/ -#ifdef __VMS -#ifdef __cplusplus -#pragma message disable nocordel -#pragma message disable codeunreachable -#pragma message disable codcauunr -#endif -#endif - -#ifdef __WATCOMC__ -/* Disable *lots* of warnings to get a clean build. I can't be bothered fixing the - * code at the moment, as it is pretty ugly. - */ -#pragma warning 7 10 -#pragma warning 13 10 -#pragma warning 14 10 -#pragma warning 367 10 -#pragma warning 379 10 -#pragma warning 726 10 -#pragma warning 836 10 -#endif - -#ifdef BUILD_FOR_SNAP - -#include -#include -#include - -#elif defined(_WIN32) - -#include /* For _MAX_PATH definition */ -#include -#include - -#define WIN32_LEAN_AND_MEAN -#define NOGDI -#define NOIME -#define NOMINMAX - -#define _WIN32_WINNT 0x0400 -#ifndef STRICT - #define STRICT 1 -#endif - -#include - -/* Disable warnings */ -#pragma warning(disable : 4101) -#pragma warning(disable : 4244) -#pragma warning(disable : 4761) - -#if defined(_MSC_VER) && _MSC_VER >= 1200 && _MSC_VER < 1300 -#pragma comment(linker, "/OPT:NOWIN98") -#endif - -#elif defined(__OS2__) - -#include -#include -#include -#define WINGDIAPI - -#else - -/* Disable Microsoft-specific keywords */ -#define GLAPIENTRY -#define WINGDIAPI - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierEval.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierEval.cc deleted file mode 100644 index b414f535f9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierEval.cc +++ /dev/null @@ -1,260 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -*/ - -#include -#include -#include -#include -#include "bezierEval.h" - -#ifdef __WATCOMC__ -#pragma warning 14 10 -#endif - -#define TOLERANCE 0.0001 - -#ifndef MAX_ORDER -#define MAX_ORDER 16 -#endif - -#ifndef MAX_DIMENSION -#define MAX_DIMENSION 4 -#endif - -static void normalize(float vec[3]); -static void crossProduct(float x[3], float y[3], float ret[3]); -#if 0 // UNUSED -static void bezierCurveEvalfast(float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retpoint[]); -#endif - -static float binomialCoefficients[8][8] = { - {1,0,0,0,0,0,0,0}, - {1,1,0,0,0,0,0,0}, - {1,2,1,0,0,0,0,0}, - {1,3,3,1,0,0,0,0}, - {1,4,6,4,1,0,0,0}, - {1,5,10,10,5,1,0,0}, - {1,6,15,20,15,6,1,0}, - {1,7,21,35,35,21,7,1} -}; - -void bezierCurveEval(float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retpoint[]) -{ - float uprime = (u-u0)/(u1-u0); - float *ctlptr = ctlpoints; - float oneMinusX = 1.0f-uprime; - float XPower = 1.0f; - - int i,k; - for(k=0; k=1. - */ -void bezierCurveEvalfast(float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retpoint[]) -{ - float uprime = (u-u0)/(u1-u0); - float buf[MAX_ORDER][MAX_ORDER][MAX_DIMENSION]; - float* ctlptr = ctlpoints; - int r, i,j; - for(i=0; i=1. - */ -void bezierCurveEvalDer(float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retDer[]) -{ - int i,k; - float width = u1-u0; - float *ctlptr = ctlpoints; - - float buf[MAX_ORDER][MAX_DIMENSION]; - if(order == 1){ - for(k=0; k=3 && dimension <=4); - bezierSurfEvalDerGen(1,0, u0, u1, uorder, v0, v1, vorder, dimension, ctlpoints, ustride, vstride, u, v, partialU); - bezierSurfEvalDerGen(0,1, u0, u1, uorder, v0, v1, vorder, dimension, ctlpoints, ustride, vstride, u, v, partialV); - - if(dimension == 3){/*inhomogeneous*/ - crossProduct(partialU, partialV, retNormal); - - normalize(retNormal); - - return; - } - else { /*homogeneous*/ - float val[4]; /*the point coordinates (without derivative)*/ - float newPartialU[MAX_DIMENSION]; - float newPartialV[MAX_DIMENSION]; - int i; - bezierSurfEvalDerGen(0,0, u0, u1, uorder, v0, v1, vorder, dimension, ctlpoints, ustride, vstride, u, v, val); - - for(i=0; i<=2; i++){ - newPartialU[i] = partialU[i] * val[3] - val[i] * partialU[3]; - newPartialV[i] = partialV[i] * val[3] - val[i] * partialV[3]; - } - crossProduct(newPartialU, newPartialV, retNormal); - normalize(retNormal); - } -} - -/*if size is 0, then nothing is done*/ -static void normalize(float vec[3]) -{ - float size = (float)sqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]); - - if(size < TOLERANCE) - { -#ifdef DEBUG - fprintf(stderr, "Warning: in oglBSpline.c normal is 0\n"); -#endif - return; - } - else { - vec[0] = vec[0]/size; - vec[1] = vec[1]/size; - vec[2] = vec[2]/size; - } -} - - -static void crossProduct(float x[3], float y[3], float ret[3]) -{ - ret[0] = x[1]*y[2] - y[1]*x[2]; - ret[1] = x[2]*y[0] - y[2]*x[0]; - ret[2] = x[0]*y[1] - y[0]*x[1]; - -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierEval.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierEval.h deleted file mode 100644 index 1a9f3c78e7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierEval.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/bezierEval.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ -*/ - -#ifndef _BEZIEREVAL_H -#define _BEZIEREVAL_H - -void bezierCurveEval(float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retpoint[]); -void bezierCurveEvalDer(float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retDer[]); -void bezierCurveEvalDerGen(int der, float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retDer[]); - - -void bezierSurfEvalDerGen(int uder, int vder, float u0, float u1, int uorder, float v0, float v1, int vorder, int dimension, float *ctlpoints, int ustride, int vstride, float u, float v, float ret[]); - -void bezierSurfEval(float u0, float u1, int uorder, float v0, float v1, int vorder, int dimension, float *ctlpoints, int ustride, int vstride, float u, float v, float ret[]); - -void bezierSurfEvalNormal(float u0, float u1, int uorder, float v0, float v1, int vorder, int dimension, float *ctlpoints, int ustride, int vstride, float u, float v, float retNormal[]); - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierPatch.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierPatch.cc deleted file mode 100644 index 836ae94e0a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierPatch.cc +++ /dev/null @@ -1,205 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/bezierPatch.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include -#include -#include /*for drawing bzier patch*/ -#include "bezierPatch.h" -#include "bezierEval.h" - -/* - *allocate an instance of bezierPatch. The control points are unknown. But - *the space of this array is allocated with size of - * uorder*vorder*dimension - * - */ -bezierPatch* bezierPatchMake(float umin, float vmin, float umax, float vmax, int uorder, int vorder, int dimension) -{ - bezierPatch* ret = (bezierPatch*) malloc(sizeof(bezierPatch)); - assert(ret); - ret->umin = umin; - ret->vmin = vmin; - ret->umax = umax; - ret->vmax = vmax; - ret->uorder = uorder; - ret->vorder = vorder; - ret->dimension = dimension; - ret->ctlpoints = (float*) malloc(sizeof(float) * dimension * uorder * vorder); - assert(ret->ctlpoints); - - ret->next = NULL; - - return ret; -} - -bezierPatch* bezierPatchMake2(float umin, float vmin, float umax, float vmax, int uorder, int vorder, int dimension, int ustride, int vstride, float* ctlpoints) -{ - bezierPatch* ret = (bezierPatch*) malloc(sizeof(bezierPatch)); - assert(ret); - ret->umin = umin; - ret->vmin = vmin; - ret->umax = umax; - ret->vmax = vmax; - ret->uorder = uorder; - ret->vorder = vorder; - ret->dimension = dimension; - ret->ctlpoints = (float*) malloc(sizeof(float) * dimension * uorder * vorder); - assert(ret->ctlpoints); - - /*copy the control points there*/ - int the_ustride = vorder * dimension; - int the_vstride = dimension; - for(int i=0; ictlpoints[i * the_ustride + j*the_vstride+k] = ctlpoints[i*ustride+j*vstride+k]; - - ret->next = NULL; - - return ret; -} - -/* - *deallocate the space as allocated by Make - */ -void bezierPatchDelete(bezierPatch *b) -{ - free(b->ctlpoints); - free(b); -} - -/*delete the whole linked list - */ -void bezierPatchDeleteList(bezierPatch *b) -{ - bezierPatch *temp; - for(temp = b; temp != NULL; temp = temp->next) - bezierPatchDelete(temp); -} - -bezierPatch* bezierPatchInsert(bezierPatch *list, bezierPatch *b) -{ - b->next = list; - return b; -} - -/*print the data stored in this patch*/ -void bezierPatchPrint(bezierPatch *b) -{ - printf("bezierPatch:\n"); - printf("umin,umax=(%f,%f), (vmin, vmax)=(%f,%f)\n", b->umin, b->umax, b->vmin, b->vmax); - printf("uorder=%i, vorder=%i\n", b->uorder, b->vorder); - printf("idmension = %i\n", b->dimension); -} - -/*print the whole list*/ -void bezierPatchPrintList(bezierPatch *list) -{ - bezierPatch* temp; - for(temp=list; temp != NULL; temp = temp->next) - bezierPatchPrint(temp); -} - -void bezierPatchEval(bezierPatch *b, float u, float v, float ret[]) -{ - if( u >= b->umin && u<= b->umax - && v >= b->vmin && v<= b->vmax) - { - - bezierSurfEval(b->umin, b->umax, b->uorder, b->vmin, b->vmax, b->vorder, b->dimension, b->ctlpoints, b->dimension * b->vorder, b->dimension, u, v, ret); - - } - else if(b->next != NULL) - bezierPatchEval(b->next, u,v, ret); - else - bezierSurfEval(b->umin, b->umax, b->uorder, b->vmin, b->vmax, b->vorder, b->dimension, b->ctlpoints, b->dimension * b->vorder, b->dimension, u, v, ret); -} - -/*the returned normal is normlized - */ -void bezierPatchEvalNormal(bezierPatch *b, float u, float v, float ret[]) -{ - bezierSurfEvalNormal(b->umin, b->umax, b->uorder, b->vmin, b->vmax, b->vorder, b->dimension, b->ctlpoints, b->dimension * b->vorder, b->dimension, u, v, ret); - - if( u >= b->umin && u<= b->umax - && v >= b->vmin && v<= b->vmax) - { - bezierSurfEvalNormal(b->umin, b->umax, b->uorder, b->vmin, b->vmax, b->vorder, b->dimension, b->ctlpoints, b->dimension * b->vorder, b->dimension, u, v, ret); - } - else if(b->next != NULL) - bezierPatchEvalNormal(b->next, u,v, ret); - else - bezierSurfEvalNormal(b->umin, b->umax, b->uorder, b->vmin, b->vmax, b->vorder, b->dimension, b->ctlpoints, b->dimension * b->vorder, b->dimension, u, v, ret); - -} - -void bezierPatchDraw(bezierPatch *bpatch, int u_reso, int v_reso) -{ - if(bpatch->dimension == 3) - glMap2f(GL_MAP2_VERTEX_3, bpatch->umin, bpatch->umax, 3*bpatch->vorder, bpatch->uorder, bpatch->vmin, bpatch->vmax,3, bpatch->vorder, (GLfloat*) bpatch->ctlpoints); - else - glMap2f(GL_MAP2_VERTEX_4, bpatch->umin, bpatch->umax, 4*bpatch->vorder, bpatch->uorder, bpatch->vmin, bpatch->vmax,3, bpatch->vorder, (GLfloat*) bpatch->ctlpoints); - - glMapGrid2f(u_reso, bpatch->umin, bpatch->umax, - v_reso, bpatch->vmin, bpatch->vmax); - glEvalMesh2(GL_LINE, 0, u_reso, 0, v_reso); -} - -void bezierPatchListDraw(bezierPatch *list, int u_reso, int v_reso) -{ - bezierPatch *temp; -glEnable(GL_LIGHTING); -glEnable(GL_LIGHT0); -glEnable(GL_MAP2_VERTEX_3); -glEnable(GL_AUTO_NORMAL); -glEnable(GL_NORMALIZE); -glColor3f(1,0,0); -#ifdef DEBUG -printf("mapmap\n"); -#endif - - - for(temp = list; temp != NULL; temp = temp->next) - bezierPatchDraw(temp, u_reso, v_reso); -} - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierPatch.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierPatch.h deleted file mode 100644 index 31c97ba08f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierPatch.h +++ /dev/null @@ -1,111 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/bezierPatch.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ -*/ - -#ifndef _BEZIERPATCH_H -#define _BEZIERPATCH_H - -typedef struct bezierPatch{ - float umin, vmin, umax, vmax; - int uorder; /*order= degree + 1*/ - int vorder; - - /* - *the control points are stored in a one dimensional array. - *the surface is defined as: - * s(u,v) = sum_{i,j} P(i,j) * B_i(u) * B_j(v). - *where P(i,j) are the control points, B_i(.) are Bezier - *basis functions. - *Each control point can have dimension 3 or 4: (x,y,z,w). - *The components of P(i,j) are stored in a one dimensional - *array: - * ctlpoints[] - *in the order of: - * P[0,0], P[0,1], ..., P[0,vorder-1], - * P[1,0], P[1,1], ..., P[1,vorder-1], - * ... - * P[uorder-1,0], P[uorder-1,1], ..., P[uorder-1,vorder-1]. - */ - int dimension; - float* ctlpoints; - - /* - *in case we have to manage multiple bezierPatches. - */ - struct bezierPatch *next; - -} bezierPatch; - -#ifdef __cplusplus -extern "C" { -#endif - -bezierPatch* bezierPatchMake(float umin, float vmin, float umax, float vmax, int urder, int vorder, int dimension); - -bezierPatch* bezierPatchMake2(float umin, float vmin, float umax, float vmax, int urder, int vorder, int dimension, int ustride, int vstride, float *ctlpoints); - - -bezierPatch* bezierPatchInsert(bezierPatch *list, bezierPatch *b); - -void bezierPatchDelete(bezierPatch *b); - -void bezierPatchDeleteList(bezierPatch *b); - -void bezierPatchPrint(bezierPatch *b); - -void bezierPatchPrintList(bezierPatch *list); - -void bezierPatchEval(bezierPatch *b, float u, float v, float ret[]); - -void bezierPatchEvalNormal(bezierPatch *b, float u, float v, float retNormal[]); - -void bezierPatchEval(bezierPatch *b, float u, float v, float ret[]); - -void bezierPatchEvalNormal(bezierPatch *b, float u, float v, float ret[]); - - -void bezierPatchDraw(bezierPatch *bpatch, int u_reso, int v_reso); - -void bezierPatchListDraw(bezierPatch *list, int u_reso, int v_reso); - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierPatchMesh.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierPatchMesh.cc deleted file mode 100644 index 9ff416ad6e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierPatchMesh.cc +++ /dev/null @@ -1,613 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/bezierPatchMesh.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include -#include -#include -#include "bezierEval.h" -#include "bezierPatchMesh.h" - -static int isDegenerate(float A[2], float B[2], float C[2]); - -void drawStrips(float *vertex_array, float *normal_array, int *length_array, GLenum *type_array, int num_strips) -{ - int i,j,k; - k=0; - /*k is the index of the first component of the current vertex*/ - for(i=0; inext) - { - bezierPatchMeshDelDeg(temp); - } -} - -void bezierPatchMeshListDelete(bezierPatchMesh *list) -{ - if(list == NULL) return; - bezierPatchMeshListDelete(list->next); - bezierPatchMeshDelete(list); -} - - - - -bezierPatchMesh* bezierPatchMeshListReverse(bezierPatchMesh* list) -{ - bezierPatchMesh* ret=NULL; - bezierPatchMesh* temp; - bezierPatchMesh* nextone; - for(temp = list; temp != NULL; temp = nextone) - { - nextone = temp->next; - ret=bezierPatchMeshListInsert(ret, temp); - } - return ret; -} - -/*maptype is either GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4 - */ -bezierPatchMesh *bezierPatchMeshMake(int maptype, float umin, float umax, int ustride, int uorder, float vmin, float vmax, int vstride, int vorder, float *ctlpoints, int size_UVarray, int size_length_array) -{ - int i,j,k; - int dimension; - int the_ustride; - int the_vstride; - - bezierPatchMesh *ret = (bezierPatchMesh*) malloc(sizeof(bezierPatchMesh)); - assert(ret); - - ret->bpatch = NULL; - ret->bpatch_normal = NULL; - ret->bpatch_color = NULL; - ret->bpatch_texcoord = NULL; - - if(maptype == GL_MAP2_VERTEX_3) dimension = 3; - else if (maptype==GL_MAP2_VERTEX_4) dimension = 4; - else { - fprintf(stderr, "error in inMap2f, maptype=%i is wrong, maptype,map is invalid\n", maptype); - return NULL; - } - - ret->bpatch = bezierPatchMake(umin, vmin, umax, vmax, uorder, vorder, dimension); - /*copy the control points there*/ - the_ustride = vorder * dimension; - the_vstride = dimension; - for(i=0; ibpatch->ctlpoints[i * the_ustride + j*the_vstride+k] = ctlpoints[i*ustride+j*vstride+k]; - - - ret->size_UVarray = size_UVarray; - ret->size_length_array = size_length_array; - ret->UVarray = (float*) malloc(sizeof(float) * size_UVarray); - assert(ret->UVarray); - ret->length_array = (int *)malloc(sizeof(int) * size_length_array); - assert(ret->length_array); - ret->type_array = (GLenum *)malloc(sizeof(GLenum) * size_length_array); - assert(ret->type_array); - - ret->index_UVarray = 0; - ret->index_length_array = 0; - - ret->vertex_array = NULL; - ret->normal_array = NULL; - ret->color_array = NULL; - ret->texcoord_array = NULL; - - ret->next = NULL; - return ret; -} - -bezierPatchMesh *bezierPatchMeshMake2(int size_UVarray, int size_length_array) -{ - bezierPatchMesh *ret = (bezierPatchMesh*) malloc(sizeof(bezierPatchMesh)); - assert(ret); - - ret->bpatch = NULL; - ret->bpatch_normal = NULL; - ret->bpatch_color = NULL; - ret->bpatch_texcoord = NULL; - - ret->size_UVarray = size_UVarray; - ret->size_length_array = size_length_array; - ret->UVarray = (float*) malloc(sizeof(float) * size_UVarray); - assert(ret->UVarray); - ret->length_array = (int *)malloc(sizeof(int) * size_length_array); - assert(ret->length_array); - ret->type_array = (GLenum *)malloc(sizeof(GLenum) * size_length_array); - assert(ret->type_array); - - ret->index_UVarray = 0; - ret->index_length_array = 0; - - ret->vertex_array = NULL; - ret->normal_array = NULL; - ret->color_array = NULL; - ret->texcoord_array = NULL; - - ret->next = NULL; - return ret; -} - -void bezierPatchMeshPutPatch(bezierPatchMesh *bpm, int maptype, float umin, float umax, int ustride, int uorder, float vmin, float vmax, int vstride, int vorder, float *ctlpoints) -{ - switch(maptype){ - case GL_MAP2_VERTEX_3: - bpm->bpatch = bezierPatchMake2(umin, vmin, umax, vmax, uorder, vorder, 3, ustride, vstride, ctlpoints); - break; - case GL_MAP2_VERTEX_4: - bpm->bpatch = bezierPatchMake2(umin, vmin, umax, vmax, uorder, vorder, 4,ustride, vstride, ctlpoints ); - break; - case GL_MAP2_NORMAL: - bpm->bpatch_normal = bezierPatchMake2(umin, vmin, umax, vmax, uorder, vorder, 3, ustride, vstride, ctlpoints); - break; - case GL_MAP2_INDEX: - bpm->bpatch_color = bezierPatchMake2(umin, vmin, umax, vmax, uorder, vorder, 1, ustride, vstride, ctlpoints); - break; - case GL_MAP2_COLOR_4: - bpm->bpatch_color = bezierPatchMake2(umin, vmin, umax, vmax, uorder, vorder, 4, ustride, vstride, ctlpoints); - break; - case GL_MAP2_TEXTURE_COORD_1: - bpm->bpatch_texcoord = bezierPatchMake2(umin, vmin, umax, vmax, uorder, vorder, 1, ustride, vstride, ctlpoints); - break; - case GL_MAP2_TEXTURE_COORD_2: - bpm->bpatch_texcoord = bezierPatchMake2(umin, vmin, umax, vmax, uorder, vorder, 2, ustride, vstride, ctlpoints); - break; - case GL_MAP2_TEXTURE_COORD_3: - bpm->bpatch_texcoord = bezierPatchMake2(umin, vmin, umax, vmax, uorder, vorder, 3, ustride, vstride, ctlpoints); - break; - case GL_MAP2_TEXTURE_COORD_4: - bpm->bpatch_texcoord = bezierPatchMake2(umin, vmin, umax, vmax, uorder, vorder, 4, ustride, vstride, ctlpoints); - break; - default: - fprintf(stderr, "error in bezierPatchMeshPutPatch, maptype=%i is wrong, maptype,map is invalid\n", maptype); - } -} - - -/*delete everything including the arrays. So if you want to output the - *pointers of the arrays, you should not use this function to deallocate space. - *you should dealocate manually - */ -void bezierPatchMeshDelete(bezierPatchMesh *bpm) -{ - if(bpm->bpatch != NULL) - bezierPatchDelete(bpm->bpatch); - if(bpm->bpatch_normal != NULL) - bezierPatchDelete(bpm->bpatch_normal); - if(bpm->bpatch_color != NULL) - bezierPatchDelete(bpm->bpatch_color); - if(bpm->bpatch_texcoord != NULL) - bezierPatchDelete(bpm->bpatch_texcoord); - - free(bpm->UVarray); - free(bpm->length_array); - free(bpm->vertex_array); - free(bpm->normal_array); - free(bpm->type_array); - free(bpm); -} - -/*begin a strip - *type is the primitive type: - */ -void bezierPatchMeshBeginStrip(bezierPatchMesh *bpm, GLenum type) -{ - bpm->counter = 0; - bpm->type = type; -} - -/*signal the end of the current strip*/ -void bezierPatchMeshEndStrip(bezierPatchMesh *bpm) -{ - int i; - - /*if there are no vertices in this strip, then nothing needs to be done*/ - if(bpm->counter == 0) return; - - /*if the length_array is full, it should be expanded*/ - if(bpm->index_length_array >= bpm->size_length_array) - { - int *temp = (int*) malloc(sizeof(int) * (bpm->size_length_array*2 + 1)); - assert(temp); - GLenum *temp_type = (GLenum*) malloc(sizeof(GLenum) * (bpm->size_length_array*2 + 1)); - assert(temp_type); - /*update the size*/ - bpm->size_length_array = bpm->size_length_array*2 + 1; - - /*copy*/ - for(i=0; iindex_length_array; i++) - { - temp[i] = bpm->length_array[i]; - temp_type[i] = bpm->type_array[i]; - } - - /*deallocate old array*/ - free(bpm->length_array); - free(bpm->type_array); - - /*point to the new array which is twice as bigger*/ - bpm->length_array = temp; - bpm->type_array = temp_type; - } - bpm->type_array[bpm->index_length_array] = bpm->type; - bpm->length_array[bpm->index_length_array++] = bpm->counter; - -} - -/*insert (u,v) */ -void bezierPatchMeshInsertUV(bezierPatchMesh *bpm, float u, float v) -{ - int i; - /*if the UVarray is full, it should be expanded*/ - if(bpm->index_UVarray+1 >= bpm->size_UVarray) - { - float *temp = (float*) malloc(sizeof(float) * (bpm->size_UVarray * 2 + 2)); - assert(temp); - - /*update the size*/ - bpm->size_UVarray = bpm->size_UVarray*2 + 2; - - /*copy*/ - for(i=0; iindex_UVarray; i++) - { - temp[i] = bpm->UVarray[i]; - } - - /*deallocate old array*/ - free(bpm->UVarray); - - /*pointing to the new arrays*/ - bpm->UVarray = temp; - } - /*insert the new UV*/ - bpm->UVarray[bpm->index_UVarray] = u; - bpm->index_UVarray++; - bpm->UVarray[bpm->index_UVarray] = v; - bpm->index_UVarray++; - - /*update counter: one more vertex*/ - bpm->counter++; - - -} - -void bezierPatchMeshPrint(bezierPatchMesh *bpm) -{ - int i; - printf("the bezier patch is\n"); - bezierPatchPrint(bpm->bpatch); - printf("index_length_array= %i\n", bpm->index_length_array); - printf("size_length_array =%i\n", bpm->size_length_array); - printf("index_UVarray =%i\n", bpm->index_UVarray); - printf("size_UVarray =%i\n", bpm->size_UVarray); - printf("UVarray is\n"); - for(i=0; iindex_UVarray; i++) - printf("%f ", bpm->UVarray[i]); - - printf("length_array is\n"); - for(i=0; iindex_length_array; i++) - printf("%i ", bpm->length_array[i]); - printf("\n"); - -} - -/*insert a new patch in front of the current linked list and return the new list*/ -bezierPatchMesh* bezierPatchMeshListInsert(bezierPatchMesh* list, bezierPatchMesh* bpm) -{ - bpm->next=list; - return bpm; -} - -/*print all the patches*/ -void bezierPatchMeshListPrint(bezierPatchMesh* list) -{ - bezierPatchMesh *temp; - for(temp = list; temp != NULL; temp = temp->next) - { - bezierPatchMeshPrint(temp); - } -} - -int bezierPatchMeshListTotalStrips(bezierPatchMesh* list) -{ - int sum=0; - bezierPatchMesh *temp; - for(temp=list; temp != NULL; temp = temp->next) - { - sum += temp->index_length_array; - } - return sum; -} - -int bezierPatchMeshListTotalVert(bezierPatchMesh* list) -{ - int sum=0; - bezierPatchMesh *temp; - for(temp=list; temp != NULL; temp = temp->next) - { - sum += temp->index_UVarray; - } - return sum/2; -} - -int bezierPatchMeshListNumTriangles(bezierPatchMesh* list) -{ - int sum=0; - bezierPatchMesh* temp; - for(temp=list; temp != NULL; temp = temp->next) - { - sum += bezierPatchMeshNumTriangles(temp); - } - return sum; -} - -int bezierPatchMeshNumTriangles(bezierPatchMesh* bpm) -{ - int i; - int sum=0; - for(i=0; iindex_length_array; i++) - { - switch(bpm->type_array[i]) - { - case GL_TRIANGLES: - sum += bpm->length_array[i]/3; - break; - case GL_TRIANGLE_FAN: - if(bpm->length_array[i] > 2) - sum += bpm->length_array[i]-2; - break; - case GL_TRIANGLE_STRIP: - if(bpm->length_array[i] > 2) - sum += bpm->length_array[i]-2; - break; - case GL_QUAD_STRIP: - if(bpm->length_array[i]>2) - sum += (bpm->length_array[i]-2); - break; - default: - fprintf(stderr,"error in bezierPatchMeshListNumTriangles, type invalid\n"); - } - } - return sum; -} - -/*delete degenerate triangles*/ -void bezierPatchMeshDelDeg(bezierPatchMesh* bpm) -{ - if(bpm == NULL) return; - int i,j,k; - int *new_length_array; - GLenum *new_type_array; - int index_new_length_array; - float *new_UVarray; - int index_new_UVarray; - - new_length_array = (int*)malloc(sizeof(int) * bpm->index_length_array); - assert(new_length_array); - new_type_array = (GLenum*)malloc(sizeof(GLenum) * bpm->index_length_array); - assert(new_length_array); - new_UVarray = (float*) malloc(sizeof(float) * bpm->index_UVarray); - assert(new_UVarray); - - index_new_length_array = 0; - index_new_UVarray=0; - k=0; - for(i=0; iindex_length_array; i++){ - - /*(if not degenerate, we have to copy*/ - if( (bpm->length_array[i] != 3) || (!isDegenerate(bpm->UVarray+k, bpm->UVarray+k+2, bpm->UVarray+k+4))) - { - for(j=0; j<2* bpm->length_array[i]; j++) - new_UVarray[index_new_UVarray++] = bpm->UVarray[k++]; - - new_length_array[index_new_length_array] = bpm->length_array[i]; - new_type_array[index_new_length_array] = bpm->type_array[i]; - index_new_length_array++; - } - else - { - k += 6; - } - } - free(bpm->UVarray); - free(bpm->length_array); - free(bpm->type_array); - bpm->UVarray=new_UVarray; - bpm->length_array=new_length_array; - bpm->type_array=new_type_array; - bpm->index_UVarray = index_new_UVarray; - bpm->index_length_array = index_new_length_array; - -} - -/*(u,v) to XYZ - *the xyz and normals are stored in vertex_array, - *and normal_array. the spaces of both are allocated here - */ -void bezierPatchMeshEval(bezierPatchMesh* bpm) -{ - int i,j,k,l; - float u,v; - float u0 = bpm->bpatch->umin; - float u1 = bpm->bpatch->umax; - int uorder = bpm->bpatch->uorder; - float v0 = bpm->bpatch->vmin; - float v1 = bpm->bpatch->vmax; - int vorder = bpm->bpatch->vorder; - int dimension = bpm->bpatch->dimension; - int ustride = dimension * vorder; - int vstride = dimension; - float *ctlpoints = bpm->bpatch->ctlpoints; - - bpm->vertex_array = (float*) malloc(sizeof(float)* (bpm->index_UVarray/2) * 3); - assert(bpm->vertex_array); - bpm->normal_array = (float*) malloc(sizeof(float)* (bpm->index_UVarray/2) * 3); - assert(bpm->normal_array); - - k=0; - l=0; - for(i=0; iindex_length_array; i++) - { - for(j=0; jlength_array[i]; j++) - { - u = bpm->UVarray[k]; - v = bpm->UVarray[k+1]; - bezierSurfEval(u0,u1,uorder, v0, v1, vorder, dimension, ctlpoints, ustride, vstride, u,v, bpm->vertex_array+l); - bezierSurfEvalNormal(u0,u1,uorder, v0, v1, vorder, dimension, ctlpoints, ustride, vstride, u,v, bpm->normal_array+l); - k += 2; - l += 3; - } - } -} - -void bezierPatchMeshListEval(bezierPatchMesh* list) -{ - bezierPatchMesh* temp; - for(temp = list; temp != NULL; temp = temp->next) - { - bezierPatchMeshEval(temp); - } -} - -void bezierPatchMeshDraw(bezierPatchMesh* bpm) -{ - int i,j,k; - k=0; - /*k is the index of the first component of the current vertex*/ - for(i=0; iindex_length_array; i++) - { - glBegin(bpm->type_array[i]); - for(j=0; jlength_array[i]; j++) - { - glNormal3fv(bpm->normal_array+k); - glVertex3fv(bpm->vertex_array+k); - k+= 3; - } - glEnd(); - } -} - -void bezierPatchMeshListDraw(bezierPatchMesh* list) -{ - bezierPatchMesh* temp; - for(temp = list; temp != NULL; temp = temp->next) - { - bezierPatchMeshDraw(temp); - } -} - -void bezierPatchMeshListCollect(bezierPatchMesh* list, float **vertex_array, float **normal_array, int **length_array, GLenum **type_array, int *num_strips) -{ - int i,j,k,l; - bezierPatchMesh *temp; - int total_num_vertices = bezierPatchMeshListTotalVert(list); - (*vertex_array) = (float *) malloc(sizeof(float) * total_num_vertices*3); - assert(*vertex_array); - (*normal_array) = (float *) malloc(sizeof(float) * total_num_vertices*3); - assert(*normal_array); - - *num_strips = bezierPatchMeshListTotalStrips(list); - - *length_array = (int*) malloc(sizeof(int) * (*num_strips)); - assert(*length_array); - - *type_array = (GLenum*) malloc(sizeof(GLenum) * (*num_strips)); - assert(*type_array); - - k=0; - l=0; - for(temp = list; temp != NULL; temp = temp->next) - { - int x=0; - for(i=0; iindex_length_array; i++) - { - for(j=0; jlength_array[i]; j++) - { - (*vertex_array)[k] = temp->vertex_array[x]; - (*vertex_array)[k+1] = temp->vertex_array[x+1]; - (*vertex_array)[k+2] = temp->vertex_array[x+2]; - - (*normal_array)[k] = temp->normal_array[x]; - (*normal_array)[k+1] = temp->normal_array[x+1]; - (*normal_array)[k+2] = temp->normal_array[x+2]; - - x += 3; - k += 3; - } - (*type_array)[l] = temp->type_array[i]; - (*length_array)[l++] = temp->length_array[i]; - } - } -} - - - -static int isDegenerate(float A[2], float B[2], float C[2]) -{ - if( (A[0] == B[0] && A[1]==B[1]) || - (A[0] == C[0] && A[1]==C[1]) || - (B[0] == C[0] && B[1]==C[1]) - ) - return 1; - else - return 0; -} - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h deleted file mode 100644 index 74cf098858..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h +++ /dev/null @@ -1,127 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ -*/ - -#ifndef _BEZIERPATCHMESH_H -#define _BEZIERPATCHMESH_H - -#include "bezierPatch.h" - -typedef struct bezierPatchMesh{ - bezierPatch *bpatch; /*vertex*/ - bezierPatch *bpatch_normal; - bezierPatch *bpatch_texcoord; /*s,t,r,q*/ - bezierPatch *bpatch_color; /*RGBA*/ - - float *UVarray; /*all UV components of all vertices of all strips*/ - int *length_array; /*[i] is the number of vertices in the ith strip*/ - GLenum *type_array; /*[i] is the type of the ith primitive*/ - - /*to support dynamic insertion*/ - int size_UVarray; - int index_UVarray; - int size_length_array; - int index_length_array; - - int counter; /*track the current strip size*/ - GLenum type; /*track the current type: 0: GL_TRIANGLES, 1: GL_TRIANGLE_STRIP*/ - - /*we eventually want to evaluate from (u,v) to (x,y,z) and draw them*/ - float *vertex_array; /*each vertex contains three components*/ - float *normal_array; /*each normal contains three components*/ - float *color_array; - float *texcoord_array; - - /*in case we need a linked list*/ - struct bezierPatchMesh *next; -} bezierPatchMesh; - -#ifdef __cplusplus -extern "C" { -#endif - - - -bezierPatchMesh *bezierPatchMeshMake(int maptype, float umin, float umax, int ustride, int uorder, float vmin, float vmax, int vstride, int vorder, float *ctlpoints, int size_UVarray, int size_length_array); - -/*initilize patches to be null*/ -bezierPatchMesh *bezierPatchMeshMake2(int size_UVarray, int size_length_array); - -void bezierPatchMeshPutPatch(bezierPatchMesh *bpm, int maptype, float umin, float umax, int ustride, int uorder, float vmin, float vmax, int vstride, int vorder, float *ctlpoints); - -void bezierPatchMeshDelete(bezierPatchMesh *bpm); - -void bezierPatchMeshBeginStrip(bezierPatchMesh *bpm, GLenum type); - -void bezierPatchMeshEndStrip(bezierPatchMesh *bpm); - -void bezierPatchMeshInsertUV(bezierPatchMesh *bpm, float u, float v); - -void bezierPatchMeshPrint(bezierPatchMesh *bpm); - -bezierPatchMesh* bezierPatchMeshListInsert(bezierPatchMesh* list, bezierPatchMesh* bpm); - -void bezierPatchMeshListPrint(bezierPatchMesh* list); - -int bezierPatchMeshListTotalStrips(bezierPatchMesh* list); - -int bezierPatchMeshListTotalVert(bezierPatchMesh* list); -int bezierPatchMeshNumTriangles(bezierPatchMesh* bpm); -int bezierPatchMeshListNumTriangles(bezierPatchMesh* list); - -void bezierPatchMeshDelDeg(bezierPatchMesh* bpm); - - -void bezierPatchMeshEval(bezierPatchMesh* bpm); - -void bezierPatchMeshDraw(bezierPatchMesh* bpm); - -void bezierPatchMeshListDraw(bezierPatchMesh* list); -void bezierPatchMeshListEval(bezierPatchMesh* list); -void bezierPatchMeshListCollect(bezierPatchMesh* list, float **vertex_array, float **normal_array, int **length_array, GLenum **type_array, int *num_strips); - -void bezierPatchMeshListDelDeg(bezierPatchMesh* list); -void bezierPatchMeshListDelete(bezierPatchMesh *list); -bezierPatchMesh* bezierPatchMeshListReverse(bezierPatchMesh* list); -void drawStrips(float *vertex_array, float *normal_array, int *length_array, GLenum *type_array, int num_strips); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glcurveval.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glcurveval.cc deleted file mode 100644 index 4713dc4672..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glcurveval.cc +++ /dev/null @@ -1,403 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * glcurveval.c++ - * - * $Date: 2004/05/12 15:29:36 $ $Revision: 1.6 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glcurveval.cc,v 1.6 2004/05/12 15:29:36 brianp Exp $ - */ - -/* Polynomial Evaluator Interface */ - -#include "gluos.h" -#include "glimports.h" -#include "glrenderer.h" -#include "glcurveval.h" -#include "nurbsconsts.h" - -OpenGLCurveEvaluator::OpenGLCurveEvaluator(void) -{ - //no default callback functions - beginCallBackN = NULL; - endCallBackN = NULL; - vertexCallBackN = NULL; - normalCallBackN = NULL; - colorCallBackN = NULL; - texcoordCallBackN = NULL; - beginCallBackData = NULL; - endCallBackData = NULL; - vertexCallBackData = NULL; - normalCallBackData = NULL; - colorCallBackData = NULL; - texcoordCallBackData = NULL; - - userData = NULL; - - vertex_flag = 0; - normal_flag = 0; - color_flag = 0; - texcoord_flag = 0; - - em_vertex.uprime = -1.0; - em_normal.uprime = -1.0; - em_color.uprime = -1.0; - em_texcoord.uprime = -1.0; -} - -OpenGLCurveEvaluator::~OpenGLCurveEvaluator(void) -{ -} - -/* added nonsense to avoid the warning messages at compile time */ -void -OpenGLCurveEvaluator::addMap(CurveMap *m) -{ - m = m; -} - -void -OpenGLCurveEvaluator::range1f(long type, REAL *from, REAL *to) -{ - type = type; - from = from; - to = to; -} - -void -OpenGLCurveEvaluator::domain1f(REAL ulo, REAL uhi) -{ - ulo = ulo; - uhi = uhi; -} - -void -OpenGLCurveEvaluator::bgnline(void) -{ - if(output_triangles) - beginCallBack(GL_LINE_STRIP, userData); - else - glBegin((GLenum) GL_LINE_STRIP); -} - -void -OpenGLCurveEvaluator::endline(void) -{ - if(output_triangles) - endCallBack(userData); - else - glEnd(); -} - -/*--------------------------------------------------------------------------- - * disable - turn off a curve map - *--------------------------------------------------------------------------- - */ -void -OpenGLCurveEvaluator::disable(long type) -{ - glDisable((GLenum) type); -} - -/*--------------------------------------------------------------------------- - * enable - turn on a curve map - *--------------------------------------------------------------------------- - */ -void -OpenGLCurveEvaluator::enable(long type) -{ - glEnable((GLenum) type); -} - -/*------------------------------------------------------------------------- - * mapgrid1f - define a lattice of points with origin and offset - *------------------------------------------------------------------------- - */ -void -OpenGLCurveEvaluator::mapgrid1f(long nu, REAL u0, REAL u1) -{ - if(output_triangles) - { - global_grid_u0 = u0; - global_grid_u1 = u1; - global_grid_nu = (int) nu; - } - else - glMapGrid1f((GLint) nu, (GLfloat) u0, (GLfloat) u1); -} - -/*------------------------------------------------------------------------- - * bgnmap1 - preamble to curve definition and evaluations - *------------------------------------------------------------------------- - */ -void -OpenGLCurveEvaluator::bgnmap1f(long) -{ - if(output_triangles) - { - //initialized so that no maps are set initially - vertex_flag = 0; - normal_flag = 0; - color_flag = 0; - texcoord_flag = 0; - //no need to worry about gl states when doing callback - } - else - glPushAttrib((GLbitfield) GL_EVAL_BIT); -} - -/*------------------------------------------------------------------------- - * endmap1 - postamble to a curve map - *------------------------------------------------------------------------- - */ -void -OpenGLCurveEvaluator::endmap1f(void) -{ - if(output_triangles) - { - - } - else - glPopAttrib(); -} - -/*------------------------------------------------------------------------- - * map1f - pass a desription of a curve map - *------------------------------------------------------------------------- - */ -void -OpenGLCurveEvaluator::map1f( - long type, /* map type */ - REAL ulo, /* lower parametric bound */ - REAL uhi, /* upper parametric bound */ - long stride, /* distance to next point in REALS */ - long order, /* parametric order */ - REAL *pts /* control points */ -) -{ - if(output_triangles) - { - int dimension = 0; - int which = 0; - switch(type){ - case GL_MAP1_VERTEX_3: - which = 0; - dimension = 3; - break; - case GL_MAP1_VERTEX_4: - which=0; - dimension = 4; - break; - case GL_MAP1_INDEX: - which=2; - dimension = 1; - break; - case GL_MAP1_COLOR_4: - which=2; - dimension = 4; - break; - case GL_MAP1_NORMAL: - which=1; - dimension = 3; - break; - case GL_MAP1_TEXTURE_COORD_1: - which=3; - dimension = 1; - break; - case GL_MAP1_TEXTURE_COORD_2: - which=3; - dimension = 2; - break; - - case GL_MAP1_TEXTURE_COORD_3: - which=3; - dimension = 3; - break; - case GL_MAP1_TEXTURE_COORD_4: - which=3; - dimension = 4; - break; - } - inMap1f(which, dimension, ulo, uhi, stride, order, pts); - } - else - glMap1f((GLenum) type, (GLfloat) ulo, (GLfloat) uhi, (GLint) stride, - (GLint) order, (const GLfloat *) pts); -} - -/*------------------------------------------------------------------------- - * mapmesh1f - evaluate a mesh of points on lattice - *------------------------------------------------------------------------- - */ -void OpenGLCurveEvaluator::mapmesh1f(long style, long from, long to) -{ - if(output_triangles) - { - inMapMesh1f((int) from, (int) to); - } - else - { - switch(style) { - default: - case N_MESHFILL: - case N_MESHLINE: - glEvalMesh1((GLenum) GL_LINE, (GLint) from, (GLint) to); - break; - case N_MESHPOINT: - glEvalMesh1((GLenum) GL_POINT, (GLint) from, (GLint) to); - break; - } - } -} - -/*------------------------------------------------------------------------- - * evalpoint1i - evaluate a point on a curve - *------------------------------------------------------------------------- - */ -void OpenGLCurveEvaluator::evalpoint1i(long i) -{ - glEvalPoint1((GLint) i); -} - -/*------------------------------------------------------------------------- - * evalcoord1f - evaluate a point on a curve - *------------------------------------------------------------------------- - */ -void OpenGLCurveEvaluator::evalcoord1f(long, REAL u) -{ - glEvalCoord1f((GLfloat) u); -} - -void -#ifdef _WIN32 -OpenGLCurveEvaluator::putCallBack(GLenum which, void (GLAPIENTRY *fn)()) -#else -OpenGLCurveEvaluator::putCallBack(GLenum which, _GLUfuncptr fn) -#endif -{ - switch(which) - { - case GLU_NURBS_BEGIN: - beginCallBackN = (void (GLAPIENTRY *) (GLenum)) fn; - break; - case GLU_NURBS_END: - endCallBackN = (void (GLAPIENTRY *) (void)) fn; - break; - case GLU_NURBS_VERTEX: - vertexCallBackN = (void (GLAPIENTRY *) (const GLfloat*)) fn; - break; - case GLU_NURBS_NORMAL: - normalCallBackN = (void (GLAPIENTRY *) (const GLfloat*)) fn; - break; - case GLU_NURBS_COLOR: - colorCallBackN = (void (GLAPIENTRY *) (const GLfloat*)) fn; - break; - case GLU_NURBS_TEXTURE_COORD: - texcoordCallBackN = (void (GLAPIENTRY *) (const GLfloat*)) fn; - break; - case GLU_NURBS_BEGIN_DATA: - beginCallBackData = (void (GLAPIENTRY *) (GLenum, void*)) fn; - break; - case GLU_NURBS_END_DATA: - endCallBackData = (void (GLAPIENTRY *) (void*)) fn; - break; - case GLU_NURBS_VERTEX_DATA: - vertexCallBackData = (void (GLAPIENTRY *) (const GLfloat*, void*)) fn; - break; - case GLU_NURBS_NORMAL_DATA: - normalCallBackData = (void (GLAPIENTRY *) (const GLfloat*, void*)) fn; - break; - case GLU_NURBS_COLOR_DATA: - colorCallBackData = (void (GLAPIENTRY *) (const GLfloat*, void*)) fn; - break; - case GLU_NURBS_TEXTURE_COORD_DATA: - texcoordCallBackData = (void (GLAPIENTRY *) (const GLfloat*, void*)) fn; - break; - } -} - -void -OpenGLCurveEvaluator::beginCallBack(GLenum which, void *data) -{ - if(beginCallBackData) - beginCallBackData(which, data); - else if(beginCallBackN) - beginCallBackN(which); -} - -void -OpenGLCurveEvaluator::endCallBack(void *data) -{ - if(endCallBackData) - endCallBackData(data); - else if(endCallBackN) - endCallBackN(); -} - -void -OpenGLCurveEvaluator::vertexCallBack(const GLfloat *vert, void* data) -{ - if(vertexCallBackData) - vertexCallBackData(vert, data); - else if(vertexCallBackN) - vertexCallBackN(vert); -} - - -void -OpenGLCurveEvaluator::normalCallBack(const GLfloat *normal, void* data) -{ - if(normalCallBackData) - normalCallBackData(normal, data); - else if(normalCallBackN) - normalCallBackN(normal); -} - -void -OpenGLCurveEvaluator::colorCallBack(const GLfloat *color, void* data) -{ - if(colorCallBackData) - colorCallBackData(color, data); - else if(colorCallBackN) - colorCallBackN(color); -} - -void -OpenGLCurveEvaluator::texcoordCallBack(const GLfloat *texcoord, void* data) -{ - if(texcoordCallBackData) - texcoordCallBackData(texcoord, data); - else if(texcoordCallBackN) - texcoordCallBackN(texcoord); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glcurveval.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glcurveval.h deleted file mode 100644 index 4b44f6e847..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glcurveval.h +++ /dev/null @@ -1,161 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * glcurveval.h - * - */ - -#ifndef __gluglcurveval_h_ -#define __gluglcurveval_h_ - -#include "gluos.h" -#include -#include -#include "basiccrveval.h" - -class CurveMap; - -/*for internal evaluator callback stuff*/ -#ifndef IN_MAX_BEZIER_ORDER -#define IN_MAX_BEZIER_ORDER 40 /*XXX should be bigger than machine order*/ -#endif - -#ifndef IN_MAX_DIMENSION -#define IN_MAX_DIMENSION 4 -#endif - -typedef struct curveEvalMachine{ - REAL uprime; //cached previously evaluated uprime - int k; //the dimension - REAL u1; - REAL u2; - int ustride; - int uorder; - REAL ctlpoints[IN_MAX_BEZIER_ORDER*IN_MAX_DIMENSION]; - REAL ucoeff[IN_MAX_BEZIER_ORDER];//cache the polynomial values -} curveEvalMachine; - -class OpenGLCurveEvaluator : public BasicCurveEvaluator { -public: - OpenGLCurveEvaluator(void); - virtual ~OpenGLCurveEvaluator(void); - void range1f(long, REAL *, REAL *); - void domain1f(REAL, REAL); - void addMap(CurveMap *); - - void enable(long); - void disable(long); - void bgnmap1f(long); - void map1f(long, REAL, REAL, long, long, REAL *); - void mapgrid1f(long, REAL, REAL); - void mapmesh1f(long, long, long); - void evalpoint1i(long); - void evalcoord1f(long, REAL); - void endmap1f(void); - - void bgnline(void); - void endline(void); - - void put_vertices_call_back(int flag) - { - output_triangles = flag; - } -#ifdef _WIN32 - void putCallBack(GLenum which, void (APIENTRY *fn)() ); -#else - void putCallBack(GLenum which, _GLUfuncptr fn ); -#endif - void set_callback_userData(void *data) - { - userData = data; - } - -/*------------------begin for curveEvalMachine------------*/ -curveEvalMachine em_vertex; -curveEvalMachine em_normal; -curveEvalMachine em_color; -curveEvalMachine em_texcoord; -int vertex_flag; //whether there is a vertex map or not -int normal_flag; //whether there is a normal map or not -int color_flag; //whether there is a color map or not -int texcoord_flag; //whether there is a texture map or not - -REAL global_grid_u0; -REAL global_grid_u1; -int global_grid_nu; - -void inMap1f(int which, //0: vert, 1: norm, 2: color, 3: tex - int dimension, - REAL ulower, - REAL uupper, - int ustride, - int uorder, - REAL *ctlpoints); - -void inPreEvaluate(int order, REAL vprime, REAL *coeff); -void inDoDomain1(curveEvalMachine *em, REAL u, REAL *retPoint); -void inDoEvalCoord1(REAL u); -void inMapMesh1f(int umin, int umax); - -void (GLAPIENTRY *beginCallBackN) (GLenum type); -void (GLAPIENTRY *endCallBackN) (void); -void (GLAPIENTRY *vertexCallBackN) (const GLfloat *vert); -void (GLAPIENTRY *normalCallBackN) (const GLfloat *normal); -void (GLAPIENTRY *colorCallBackN) (const GLfloat *color); -void (GLAPIENTRY *texcoordCallBackN) (const GLfloat *texcoord); - -void (GLAPIENTRY *beginCallBackData) (GLenum type, void* data); -void (GLAPIENTRY *endCallBackData) (void* data); -void (GLAPIENTRY *vertexCallBackData) (const GLfloat *vert, void* data); -void (GLAPIENTRY *normalCallBackData) (const GLfloat *normal, void* data); -void (GLAPIENTRY *colorCallBackData) (const GLfloat *color, void* data); -void (GLAPIENTRY *texcoordCallBackData) (const GLfloat *texcoord, void* data); - -void* userData; //the opaque pointer for Data callback functions -void beginCallBack(GLenum type, void* data); -void endCallBack(void* data); -void vertexCallBack(const GLfloat *vert, void *data); -void normalCallBack(const GLfloat *normal, void* data); -void colorCallBack(const GLfloat *color, void* data); -void texcoordCallBack(const GLfloat *texcoord, void* data); - - -/*------------------end for curveEvalMachine------------*/ - -private: - int output_triangles; //true 1; false 0 -}; - -#endif /* __gluglcurveval_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glimports.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glimports.h deleted file mode 100644 index 9a9d3e32c9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glimports.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * glimports.h - * - * $Date: 2001/03/19 17:52:02 $ $Revision: 1.3 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glimports.h,v 1.3 2001/03/19 17:52:02 pesco Exp $ - */ - -#ifndef __gluimports_h_ -#define __gluimports_h_ - -#include "mystdlib.h" -#include "mystdio.h" - -#endif /* __gluimports_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glinterface.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glinterface.cc deleted file mode 100644 index dfd16d1722..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glinterface.cc +++ /dev/null @@ -1,471 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/07/16 15:46:42 $ $Revision: 1.2 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glinterface.cc,v 1.2 2001/07/16 15:46:42 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include -#include -#include "glimports.h" -#include "glrenderer.h" -#include "nurbsconsts.h" - -//#define DOWN_LOAD_NURBS -#ifdef DOWN_LOAD_NURBS - -#include "oglTrimNurbs.h" -static int surfcount = 0; -static oglTrimNurbs* otn = NULL; -nurbSurf* tempNurb = NULL; -oglTrimLoops* tempTrim = NULL; -#endif - - -//for LOD -extern "C" {void glu_LOD_eval_list(GLUnurbs *nurb, int level);} - -void glu_LOD_eval_list(GLUnurbs *nurb, int level) -{ - nurb->LOD_eval_list(level); -} - -GLUnurbs * GLAPIENTRY -gluNewNurbsRenderer(void) -{ - GLUnurbs *t; - - t = new GLUnurbs(); - return t; -} - -void GLAPIENTRY -gluDeleteNurbsRenderer(GLUnurbs *r) -{ - delete r; -} - -extern "C" -void GLAPIENTRY - -gluDeleteNurbsTessellatorEXT(GLUnurbsObj *r) -{ - delete r; -} - -void GLAPIENTRY -gluBeginSurface(GLUnurbs *r) -{ -#ifdef DOWN_LOAD_NURBS -surfcount++; -tempTrim = OTL_make(10,10); -#endif - r->bgnsurface(0); -} - -void GLAPIENTRY -gluBeginCurve(GLUnurbs *r) -{ - r->bgncurve(0); -} - -void GLAPIENTRY -gluEndCurve(GLUnurbs *r) -{ - r->endcurve(); -} - -void GLAPIENTRY -gluEndSurface(GLUnurbs *r) -{ -#ifdef DOWN_LOAD_NURBS -if(surfcount == 1) - otn = OTN_make(1); -OTN_insert(otn, tempNurb, tempTrim); -if(surfcount >= 1) -{ -#ifdef DEBUG -printf("write file\n"); -#endif -OTN_write(otn, "out.otn"); - -} -#endif - - r->endsurface(); -} - -void GLAPIENTRY -gluBeginTrim(GLUnurbs *r) -{ -#ifdef DOWN_LOAD_NURBS -OTL_bgnTrim(tempTrim); -#endif - - r->bgntrim(); -} - -void GLAPIENTRY -gluEndTrim(GLUnurbs *r) -{ -#ifdef DOWN_LOAD_NURBS -OTL_endTrim(tempTrim); -#endif - r->endtrim(); -} - -void GLAPIENTRY -gluPwlCurve(GLUnurbs *r, GLint count, INREAL array[], - GLint stride, GLenum type) -{ -#ifdef DOWN_LOAD_NURBS -OTL_pwlCurve(tempTrim, count, array, stride, type); -#endif - - int realType; - switch(type) { - case GLU_MAP1_TRIM_2: - realType = N_P2D; - break; - case GLU_MAP1_TRIM_3: - realType = N_P2DR; - break; - default: - realType = type; - break; - } - r->pwlcurve(count, array, sizeof(INREAL) * stride, realType); -} - -void GLAPIENTRY -gluNurbsCurve(GLUnurbs *r, GLint nknots, INREAL knot[], GLint stride, - INREAL ctlarray[], GLint order, GLenum type) -{ -#ifdef DOWN_LOAD_NURBS -OTL_nurbsCurve(tempTrim, nknots, knot, stride, ctlarray, order, type); -#endif - - int realType; - - switch(type) { - case GLU_MAP1_TRIM_2: - realType = N_P2D; - break; - case GLU_MAP1_TRIM_3: - realType = N_P2DR; - break; - default: - realType = type; - break; - } - - r->nurbscurve(nknots, knot, sizeof(INREAL) * stride, ctlarray, order, - realType); -} - -void GLAPIENTRY -gluNurbsSurface(GLUnurbs *r, GLint sknot_count, GLfloat *sknot, - GLint tknot_count, GLfloat *tknot, - GLint s_stride, GLint t_stride, - GLfloat *ctlarray, GLint sorder, GLint torder, - GLenum type) -{ -#ifdef DOWN_LOAD_NURBS - { - int dimension; - switch(type){ - case GL_MAP2_VERTEX_3: - dimension = 3; - break; - case GL_MAP2_VERTEX_4: - dimension = 4; - break; - default: - fprintf(stderr, "error in glinterface.c++, type no implemented\n"); - exit(1); - } -tempNurb = nurbSurfMake(sknot_count, sknot, - tknot_count, tknot, - sorder, torder, - dimension, - ctlarray, - s_stride, t_stride); - - } -#endif - - r->nurbssurface(sknot_count, sknot, tknot_count, tknot, - sizeof(INREAL) * s_stride, sizeof(INREAL) * t_stride, - ctlarray, sorder, torder, type); -} - -void GLAPIENTRY -gluLoadSamplingMatrices(GLUnurbs *r, const GLfloat modelMatrix[16], - const GLfloat projMatrix[16], - const GLint viewport[4]) -{ - r->useGLMatrices(modelMatrix, projMatrix, viewport); -} - -void GLAPIENTRY -gluNurbsProperty(GLUnurbs *r, GLenum property, GLfloat value) -{ - GLfloat nurbsValue; - - switch (property) { - case GLU_AUTO_LOAD_MATRIX: - r->setautoloadmode(value); - return; - - case GLU_CULLING: - if (value != 0.0) { - nurbsValue = N_CULLINGON; - } else { - nurbsValue = N_NOCULLING; - } - r->setnurbsproperty(GL_MAP2_VERTEX_3, N_CULLING, nurbsValue); - r->setnurbsproperty(GL_MAP2_VERTEX_4, N_CULLING, nurbsValue); - r->setnurbsproperty(GL_MAP1_VERTEX_3, N_CULLING, nurbsValue); - r->setnurbsproperty(GL_MAP1_VERTEX_4, N_CULLING, nurbsValue); - return; - - case GLU_SAMPLING_METHOD: - if (value == GLU_PATH_LENGTH) { - nurbsValue = N_PATHLENGTH; - } else if (value == GLU_PARAMETRIC_ERROR) { - nurbsValue = N_PARAMETRICDISTANCE; - } else if (value == GLU_DOMAIN_DISTANCE) { - nurbsValue = N_DOMAINDISTANCE; - r->set_is_domain_distance_sampling(1); //optimzing untrimmed case - - } else if (value == GLU_OBJECT_PARAMETRIC_ERROR) { - nurbsValue = N_OBJECTSPACE_PARA; - r->setautoloadmode( 0.0 ); - r->setSamplingMatrixIdentity(); - } else if (value == GLU_OBJECT_PATH_LENGTH) { - nurbsValue = N_OBJECTSPACE_PATH; - r->setautoloadmode( 0.0 ); - r->setSamplingMatrixIdentity(); - } else { - r->postError(GLU_INVALID_VALUE); - return; - } - - r->setnurbsproperty(GL_MAP2_VERTEX_3, N_SAMPLINGMETHOD, nurbsValue); - r->setnurbsproperty(GL_MAP2_VERTEX_4, N_SAMPLINGMETHOD, nurbsValue); - r->setnurbsproperty(GL_MAP1_VERTEX_3, N_SAMPLINGMETHOD, nurbsValue); - r->setnurbsproperty(GL_MAP1_VERTEX_4, N_SAMPLINGMETHOD, nurbsValue); - return; - - case GLU_SAMPLING_TOLERANCE: - r->setnurbsproperty(GL_MAP2_VERTEX_3, N_PIXEL_TOLERANCE, value); - r->setnurbsproperty(GL_MAP2_VERTEX_4, N_PIXEL_TOLERANCE, value); - r->setnurbsproperty(GL_MAP1_VERTEX_3, N_PIXEL_TOLERANCE, value); - r->setnurbsproperty(GL_MAP1_VERTEX_4, N_PIXEL_TOLERANCE, value); - return; - - case GLU_PARAMETRIC_TOLERANCE: - r->setnurbsproperty(GL_MAP2_VERTEX_3, N_ERROR_TOLERANCE, value); - r->setnurbsproperty(GL_MAP2_VERTEX_4, N_ERROR_TOLERANCE, value); - r->setnurbsproperty(GL_MAP1_VERTEX_3, N_ERROR_TOLERANCE, value); - r->setnurbsproperty(GL_MAP1_VERTEX_4, N_ERROR_TOLERANCE, value); - return; - - - case GLU_DISPLAY_MODE: - - if (value == GLU_FILL) { - nurbsValue = N_FILL; - } else if (value == GLU_OUTLINE_POLYGON) { - nurbsValue = N_OUTLINE_POLY; - } else if (value == GLU_OUTLINE_PATCH) { - nurbsValue = N_OUTLINE_PATCH; - } else { - r->postError(GLU_INVALID_VALUE); - return; - } - r->setnurbsproperty(N_DISPLAY, nurbsValue); - - break; - - case GLU_U_STEP: - r->setnurbsproperty(GL_MAP1_VERTEX_3, N_S_STEPS, value); - r->setnurbsproperty(GL_MAP1_VERTEX_4, N_S_STEPS, value); - r->setnurbsproperty(GL_MAP2_VERTEX_3, N_S_STEPS, value); - r->setnurbsproperty(GL_MAP2_VERTEX_4, N_S_STEPS, value); - - //added for optimizing untrimmed case - r->set_domain_distance_u_rate(value); - break; - - case GLU_V_STEP: - r->setnurbsproperty(GL_MAP1_VERTEX_3, N_T_STEPS, value); - r->setnurbsproperty(GL_MAP1_VERTEX_4, N_T_STEPS, value); - r->setnurbsproperty(GL_MAP2_VERTEX_3, N_T_STEPS, value); - r->setnurbsproperty(GL_MAP2_VERTEX_4, N_T_STEPS, value); - - //added for optimizing untrimmed case - r->set_domain_distance_v_rate(value); - break; - - case GLU_NURBS_MODE: - if(value == GLU_NURBS_RENDERER) - r->put_callbackFlag(0); - else if(value == GLU_NURBS_TESSELLATOR) - r->put_callbackFlag(1); - else - r->postError(GLU_INVALID_ENUM); - break; - - default: - r->postError(GLU_INVALID_ENUM); - return; - } -} - -void GLAPIENTRY -gluGetNurbsProperty(GLUnurbs *r, GLenum property, GLfloat *value) -{ - GLfloat nurbsValue; - - switch(property) { - case GLU_AUTO_LOAD_MATRIX: - if (r->getautoloadmode()) { - *value = GL_TRUE; - } else { - *value = GL_FALSE; - } - break; - case GLU_CULLING: - r->getnurbsproperty(GL_MAP2_VERTEX_3, N_CULLING, &nurbsValue); - if (nurbsValue == N_CULLINGON) { - *value = GL_TRUE; - } else { - *value = GL_FALSE; - } - break; - case GLU_SAMPLING_METHOD: - r->getnurbsproperty(GL_MAP2_VERTEX_3, N_SAMPLINGMETHOD, value); - if(*value == N_PATHLENGTH) - *value = GLU_PATH_LENGTH; - else if(*value == N_PARAMETRICDISTANCE) - *value = GLU_PARAMETRIC_ERROR; - else if(*value == N_DOMAINDISTANCE) - *value = GLU_DOMAIN_DISTANCE; - else if(*value == N_OBJECTSPACE_PATH) - *value = GLU_OBJECT_PATH_LENGTH; - else if(*value == N_OBJECTSPACE_PARA) - *value = GLU_OBJECT_PARAMETRIC_ERROR; - break; - case GLU_SAMPLING_TOLERANCE: - r->getnurbsproperty(GL_MAP2_VERTEX_3, N_PIXEL_TOLERANCE, value); - break; - case GLU_PARAMETRIC_TOLERANCE: - r->getnurbsproperty(GL_MAP2_VERTEX_3, N_ERROR_TOLERANCE, value); - break; - - case GLU_U_STEP: - r->getnurbsproperty(GL_MAP2_VERTEX_3, N_S_STEPS, value); - break; - case GLU_V_STEP: - r->getnurbsproperty(GL_MAP2_VERTEX_3, N_T_STEPS, value); - break; - case GLU_DISPLAY_MODE: - r->getnurbsproperty(N_DISPLAY, &nurbsValue); - if (nurbsValue == N_FILL) { - *value = GLU_FILL; - } else if (nurbsValue == N_OUTLINE_POLY) { - *value = GLU_OUTLINE_POLYGON; - } else { - *value = GLU_OUTLINE_PATCH; - } - break; - - case GLU_NURBS_MODE: - if(r->is_callback()) - *value = GLU_NURBS_TESSELLATOR; - else - *value = GLU_NURBS_RENDERER; - break; - - default: - r->postError(GLU_INVALID_ENUM); - return; - } -} - -extern "C" void GLAPIENTRY -gluNurbsCallback(GLUnurbs *r, GLenum which, _GLUfuncptr fn ) -{ - switch (which) { - case GLU_NURBS_BEGIN: - case GLU_NURBS_END: - case GLU_NURBS_VERTEX: - case GLU_NURBS_NORMAL: - case GLU_NURBS_TEXTURE_COORD: - case GLU_NURBS_COLOR: - case GLU_NURBS_BEGIN_DATA: - case GLU_NURBS_END_DATA: - case GLU_NURBS_VERTEX_DATA: - case GLU_NURBS_NORMAL_DATA: - case GLU_NURBS_TEXTURE_COORD_DATA: - case GLU_NURBS_COLOR_DATA: - r->putSurfCallBack(which, fn); - break; - - case GLU_NURBS_ERROR: - r->errorCallback = (void (APIENTRY *)( GLenum e )) fn; - break; - default: - r->postError(GLU_INVALID_ENUM); - return; - } -} - -extern "C" -void GLAPIENTRY -gluNurbsCallbackDataEXT(GLUnurbs* r, void* userData) -{ - r->setNurbsCallbackData(userData); -} - -extern "C" -void GLAPIENTRY -gluNurbsCallbackData(GLUnurbs* r, void* userData) -{ - gluNurbsCallbackDataEXT(r,userData); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glrenderer.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glrenderer.cc deleted file mode 100644 index 17123fbc61..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glrenderer.cc +++ /dev/null @@ -1,301 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -*/ - -#include "gluos.h" -#include "glimports.h" -#include "glrenderer.h" - -GLUnurbs::GLUnurbs() - : NurbsTessellator(curveEvaluator, surfaceEvaluator) -{ - redefineMaps(); - defineMap(GL_MAP2_NORMAL, 0, 3); - defineMap(GL_MAP1_NORMAL, 0, 3); - defineMap(GL_MAP2_TEXTURE_COORD_1, 0, 1); - defineMap(GL_MAP1_TEXTURE_COORD_1, 0, 1); - defineMap(GL_MAP2_TEXTURE_COORD_2, 0, 2); - defineMap(GL_MAP1_TEXTURE_COORD_2, 0, 2); - defineMap(GL_MAP2_TEXTURE_COORD_3, 0, 3); - defineMap(GL_MAP1_TEXTURE_COORD_3, 0, 3); - defineMap(GL_MAP2_TEXTURE_COORD_4, 1, 4); - defineMap(GL_MAP1_TEXTURE_COORD_4, 1, 4); - defineMap(GL_MAP2_VERTEX_4, 1, 4); - defineMap(GL_MAP1_VERTEX_4, 1, 4); - defineMap(GL_MAP2_VERTEX_3, 0, 3); - defineMap(GL_MAP1_VERTEX_3, 0, 3); - defineMap(GL_MAP2_COLOR_4, 0, 4); - defineMap(GL_MAP1_COLOR_4, 0, 4); - defineMap(GL_MAP2_INDEX, 0, 1); - defineMap(GL_MAP1_INDEX, 0, 1); - - setnurbsproperty(GL_MAP1_VERTEX_3, N_SAMPLINGMETHOD, (float) N_PATHLENGTH); - setnurbsproperty(GL_MAP1_VERTEX_4, N_SAMPLINGMETHOD, (float) N_PATHLENGTH); - setnurbsproperty(GL_MAP2_VERTEX_3, N_SAMPLINGMETHOD, (float) N_PATHLENGTH); - setnurbsproperty(GL_MAP2_VERTEX_4, N_SAMPLINGMETHOD, (float) N_PATHLENGTH); - - setnurbsproperty(GL_MAP1_VERTEX_3, N_PIXEL_TOLERANCE, (float) 50.0); - setnurbsproperty(GL_MAP1_VERTEX_4, N_PIXEL_TOLERANCE, (float) 50.0); - setnurbsproperty(GL_MAP2_VERTEX_3, N_PIXEL_TOLERANCE, (float) 50.0); - setnurbsproperty(GL_MAP2_VERTEX_4, N_PIXEL_TOLERANCE, (float) 50.0); - - setnurbsproperty(GL_MAP1_VERTEX_3, N_ERROR_TOLERANCE, (float) 0.50); - setnurbsproperty(GL_MAP1_VERTEX_4, N_ERROR_TOLERANCE, (float) 0.50); - setnurbsproperty(GL_MAP2_VERTEX_3, N_ERROR_TOLERANCE, (float) 0.50); - setnurbsproperty(GL_MAP2_VERTEX_4, N_ERROR_TOLERANCE, (float) 0.50); - - setnurbsproperty(GL_MAP1_VERTEX_3, N_S_STEPS, (float) 100.0); - setnurbsproperty(GL_MAP1_VERTEX_4, N_S_STEPS, (float) 100.0); - setnurbsproperty(GL_MAP2_VERTEX_3, N_S_STEPS, (float) 100.0); - setnurbsproperty(GL_MAP2_VERTEX_4, N_S_STEPS, (float) 100.0); - - //added for optimizing untrimmed case - set_domain_distance_u_rate(100.0); - - setnurbsproperty(GL_MAP1_VERTEX_3, N_T_STEPS, (float) 100.0); - setnurbsproperty(GL_MAP1_VERTEX_4, N_T_STEPS, (float) 100.0); - setnurbsproperty(GL_MAP2_VERTEX_3, N_T_STEPS, (float) 100.0); - setnurbsproperty(GL_MAP2_VERTEX_4, N_T_STEPS, (float) 100.0); - - //added for optimizing untrimmed case - set_domain_distance_v_rate(100.0); - set_is_domain_distance_sampling(0); //since the default is path_length - - //default autoloadmode is true - autoloadmode = 1; - - //default callbackFlag is 0 - callbackFlag = 0; - - errorCallback = NULL; -} - -void -GLUnurbs::bgnrender(void) -{ - if (autoloadmode) { - loadGLMatrices(); - } -} - -void -GLUnurbs::endrender(void) -{ -} - -void -GLUnurbs::errorHandler(int i) -{ - int gluError; - - gluError = i + (GLU_NURBS_ERROR1 - 1); - postError( gluError ); -} - -void -GLUnurbs::loadGLMatrices(void) -{ - GLfloat vmat[4][4]; - GLint viewport[4]; - - grabGLMatrix((GLfloat (*)[4]) vmat); - loadCullingMatrix((GLfloat (*)[4]) vmat); - ::glGetIntegerv((GLenum) GL_VIEWPORT, (GLint *) viewport); - loadSamplingMatrix((const GLfloat (*)[4]) vmat, (const GLint *) viewport); -} - -void -GLUnurbs::useGLMatrices(const GLfloat modelMatrix[16], - const GLfloat projMatrix[16], - const GLint viewport[4]) -{ - GLfloat vmat[4][4]; - - multmatrix4d(vmat, (const GLfloat (*)[4]) modelMatrix, - (const GLfloat (*)[4]) projMatrix); - loadCullingMatrix((GLfloat (*)[4]) vmat); - loadSamplingMatrix((const GLfloat (*)[4]) vmat, (const GLint *) viewport); -} - -/*-------------------------------------------------------------------------- - * grabGLMatrix - *-------------------------------------------------------------------------- - */ - -void -GLUnurbs::grabGLMatrix(GLfloat vmat[4][4]) -{ - GLfloat m1[4][4], m2[4][4]; - - ::glGetFloatv((GLenum) GL_MODELVIEW_MATRIX, (GLfloat *) &(m1[0][0])); - ::glGetFloatv((GLenum) GL_PROJECTION_MATRIX, (GLfloat *) &(m2[0][0])); - multmatrix4d((GLfloat (*)[4]) vmat, - (const GLfloat (*)[4]) m1, (const GLfloat (*)[4]) m2); -} - -//for object space tesselation: view independent -void -GLUnurbs::setSamplingMatrixIdentity( void ) -{ - INREAL smat[4][4] = { - {1,0,0,0}, - {0,1,0,0}, - {0,0,1,0}, - {0,0,0,1} - }; - const long rstride = sizeof(smat[0]) / sizeof(smat[0][0]); - const long cstride = 1; - - setnurbsproperty(GL_MAP1_VERTEX_3, N_SAMPLINGMATRIX, &smat[0][0], rstride, - cstride); - setnurbsproperty(GL_MAP1_VERTEX_4, N_SAMPLINGMATRIX, &smat[0][0], rstride, - cstride); - setnurbsproperty(GL_MAP2_VERTEX_3, N_SAMPLINGMATRIX, &smat[0][0], rstride, - cstride); - setnurbsproperty(GL_MAP2_VERTEX_4, N_SAMPLINGMATRIX, &smat[0][0], rstride, - cstride); -} - - -void -GLUnurbs::loadSamplingMatrix(const GLfloat vmat[4][4], - const GLint viewport[4]) -{ - - /* rescale the mapping to correspond to pixels in x/y */ - REAL xsize = 0.5 * (REAL) (viewport[2]); - REAL ysize = 0.5 * (REAL) (viewport[3]); - - INREAL smat[4][4]; - smat[0][0] = vmat[0][0] * xsize; - smat[1][0] = vmat[1][0] * xsize; - smat[2][0] = vmat[2][0] * xsize; - smat[3][0] = vmat[3][0] * xsize; - - smat[0][1] = vmat[0][1] * ysize; - smat[1][1] = vmat[1][1] * ysize; - smat[2][1] = vmat[2][1] * ysize; - smat[3][1] = vmat[3][1] * ysize; - - smat[0][2] = 0.0; - smat[1][2] = 0.0; - smat[2][2] = 0.0; - smat[3][2] = 0.0; - - smat[0][3] = vmat[0][3]; - smat[1][3] = vmat[1][3]; - smat[2][3] = vmat[2][3]; - smat[3][3] = vmat[3][3]; - - const long rstride = sizeof(smat[0]) / sizeof(smat[0][0]); - const long cstride = 1; - - setnurbsproperty(GL_MAP1_VERTEX_3, N_SAMPLINGMATRIX, &smat[0][0], rstride, - cstride); - setnurbsproperty(GL_MAP1_VERTEX_4, N_SAMPLINGMATRIX, &smat[0][0], rstride, - cstride); - setnurbsproperty(GL_MAP2_VERTEX_3, N_SAMPLINGMATRIX, &smat[0][0], rstride, - cstride); - setnurbsproperty(GL_MAP2_VERTEX_4, N_SAMPLINGMATRIX, &smat[0][0], rstride, - cstride); -} - -void -GLUnurbs::loadCullingMatrix(GLfloat vmat[4][4]) -{ - INREAL cmat[4][4]; - - cmat[0][0] = vmat[0][0]; - cmat[0][1] = vmat[0][1]; - cmat[0][2] = vmat[0][2]; - cmat[0][3] = vmat[0][3]; - - cmat[1][0] = vmat[1][0]; - cmat[1][1] = vmat[1][1]; - cmat[1][2] = vmat[1][2]; - cmat[1][3] = vmat[1][3]; - - cmat[2][0] = vmat[2][0]; - cmat[2][1] = vmat[2][1]; - cmat[2][2] = vmat[2][2]; - cmat[2][3] = vmat[2][3]; - - cmat[3][0] = vmat[3][0]; - cmat[3][1] = vmat[3][1]; - cmat[3][2] = vmat[3][2]; - cmat[3][3] = vmat[3][3]; - - const long rstride = sizeof(cmat[0]) / sizeof(cmat[0][0]); - const long cstride = 1; - - setnurbsproperty(GL_MAP2_VERTEX_3, N_CULLINGMATRIX, &cmat[0][0], rstride, - cstride); - setnurbsproperty(GL_MAP2_VERTEX_4, N_CULLINGMATRIX, &cmat[0][0], rstride, - cstride); - //added for curves by zl - setnurbsproperty(GL_MAP1_VERTEX_3, N_CULLINGMATRIX, &cmat[0][0], rstride, - cstride); - setnurbsproperty(GL_MAP1_VERTEX_4, N_CULLINGMATRIX, &cmat[0][0], rstride, - cstride); -} - -/*--------------------------------------------------------------------- - * A = B * MAT ; transform a 4d vector through a 4x4 matrix - *--------------------------------------------------------------------- - */ -void -GLUnurbs::transform4d(GLfloat A[4], GLfloat B[4], GLfloat mat[4][4]) -{ - - A[0] = B[0]*mat[0][0] + B[1]*mat[1][0] + B[2]*mat[2][0] + B[3]*mat[3][0]; - A[1] = B[0]*mat[0][1] + B[1]*mat[1][1] + B[2]*mat[2][1] + B[3]*mat[3][1]; - A[2] = B[0]*mat[0][2] + B[1]*mat[1][2] + B[2]*mat[2][2] + B[3]*mat[3][2]; - A[3] = B[0]*mat[0][3] + B[1]*mat[1][3] + B[2]*mat[2][3] + B[3]*mat[3][3]; -} - -/*--------------------------------------------------------------------- - * new = [left][right] ; multiply two matrices together - *--------------------------------------------------------------------- - */ -void -GLUnurbs::multmatrix4d (GLfloat n[4][4], const GLfloat left[4][4], - const GLfloat right[4][4]) -{ - transform4d ((GLfloat *) n[0],(GLfloat *) left[0],(GLfloat (*)[4]) right); - transform4d ((GLfloat *) n[1],(GLfloat *) left[1],(GLfloat (*)[4]) right); - transform4d ((GLfloat *) n[2],(GLfloat *) left[2],(GLfloat (*)[4]) right); - transform4d ((GLfloat *) n[3],(GLfloat *) left[3],(GLfloat (*)[4]) right); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glrenderer.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glrenderer.h deleted file mode 100644 index 30f07632a4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glrenderer.h +++ /dev/null @@ -1,152 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * glrenderer.h - * - * $Date: 2004/02/26 14:58:11 $ $Revision: 1.4 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glrenderer.h,v 1.4 2004/02/26 14:58:11 brianp Exp $ - */ - -#ifndef __gluglrenderer_h_ -#define __gluglrenderer_h_ - -#include -#include -#include "nurbstess.h" -#include "glsurfeval.h" -#include "glcurveval.h" - -extern "C" { - typedef void (APIENTRY *errorCallbackType)( GLenum ); -} - -class GLUnurbs : public NurbsTessellator { - -public: - GLUnurbs( void ); - void loadGLMatrices( void ); - void useGLMatrices( const GLfloat modelMatrix[16], - const GLfloat projMatrix[16], - const GLint viewport[4] ); - void setSamplingMatrixIdentity( void ); - - void errorHandler( int ); - void bgnrender( void ); - void endrender( void ); - void setautoloadmode( INREAL value ) - { - - if (value) autoloadmode = GL_TRUE; - else autoloadmode = GL_FALSE; - - } - GLboolean getautoloadmode( void ) { return autoloadmode; } - - errorCallbackType errorCallback; - void postError( int which ) - { if (errorCallback) (errorCallback)( (GLenum)which ); } -#ifdef _WIN32 - void putSurfCallBack(GLenum which, void (GLAPIENTRY *fn)() ) -#else - void putSurfCallBack(GLenum which, _GLUfuncptr fn ) -#endif - { - curveEvaluator.putCallBack(which, fn); - surfaceEvaluator.putCallBack(which, fn); - } - - int get_vertices_call_back() - { - return surfaceEvaluator.get_vertices_call_back(); - } - - void put_vertices_call_back(int flag) - { - surfaceEvaluator.put_vertices_call_back(flag); - } - - int get_callback_auto_normal() - { - return surfaceEvaluator.get_callback_auto_normal(); - } - - void put_callback_auto_normal(int flag) - { - surfaceEvaluator.put_callback_auto_normal(flag); - } - - void setNurbsCallbackData(void* userData) - { - curveEvaluator.set_callback_userData(userData); - surfaceEvaluator.set_callback_userData(userData); - } - - - //for LOD - void LOD_eval_list(int level) - { - surfaceEvaluator.LOD_eval_list(level); - } - - //NEWCALLBACK - int is_callback() - { - return callbackFlag; - } - void put_callbackFlag(int flag) - { - callbackFlag = flag; - surfaceEvaluator.put_vertices_call_back(flag); - curveEvaluator.put_vertices_call_back(flag); - } - -private: - GLboolean autoloadmode; - OpenGLSurfaceEvaluator surfaceEvaluator; - OpenGLCurveEvaluator curveEvaluator; - - void loadSamplingMatrix( const GLfloat vmat[4][4], - const GLint viewport[4] ); - void loadCullingMatrix( GLfloat vmat[4][4] ); - static void grabGLMatrix( GLfloat vmat[4][4] ); - static void transform4d( GLfloat A[4], GLfloat B[4], - GLfloat mat[4][4] ); - static void multmatrix4d( GLfloat n[4][4], const GLfloat left[4][4], - const GLfloat right[4][4] ); - - int callbackFlag; -}; - -#endif /* __gluglrenderer_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glsurfeval.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glsurfeval.cc deleted file mode 100644 index cb2cf8ee0b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glsurfeval.cc +++ /dev/null @@ -1,1290 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * glsurfeval.c++ - * - */ - -/* Polynomial Evaluator Interface */ -#include "gluos.h" -#include -#include "glimports.h" -#include "glrenderer.h" -#include "glsurfeval.h" -#include "nurbsconsts.h" -#include "bezierPatchMesh.h" - - -//extern int surfcount; -//int surfcount=0; - -/*#define USE_INTERNAL_EVAL*/ //use internal evaluator - -/*whether do evaluation or not*/ -/*#define NO_EVALUATION*/ - -//#define USE_LOD //for LOD test, have to turn on USE_LOD in insurfeval.c++ too - -/*for statistics*/ -//#define STATISTICS -#ifdef STATISTICS -static int STAT_num_of_triangles=0; -static int STAT_num_of_eval_vertices=0; -static int STAT_num_of_quad_strips=0; -#endif - -/*for output triangles*/ -/*#define OUTPUT_TRIANGLES*/ - - -/*#define FOR_CHRIS*/ -#ifdef FOR_CHRIS -extern "C" { void evalUStripExt(int n_upper, REAL v_upper, REAL* upper_val, - int n_lower, REAL v_lower, REAL* lower_val);} - -extern "C" { void evalVStripExt(int n_left, REAL u_left, REAL* left_val, - int n_right, REAL u_right, REAL* right_val); - } -#endif - - -/**************begin for LOD_eval_list***********/ -void OpenGLSurfaceEvaluator::LOD_eval_list(int level) -{ - if(level == 0) - LOD_eval_level = 1; - else if(level == 1) - LOD_eval_level = 2; - else if(level == 2) - LOD_eval_level = 4; - else - LOD_eval_level = 8; - - inBPMListEvalEM(global_bpm); -} - - -OpenGLSurfaceEvaluator::OpenGLSurfaceEvaluator() -{ - int i; - - for (i=0; i= n_upper) /*case1: no more in upper*/ - { - if(j= n_lower) /*case2: no more in lower*/ - { - if(i=i; k--) /*reverse order for two-side lighting*/ - { - coord2f(upper_val[k], v_upper); -// glNormal3fv(upperNormal[k]); -// glVertex3fv(upperXYZ[k]); - } - - endtfan(); - } - break; /*exit the main loop*/ - } - else /* case3: neither is empty, plus the leftMostV, there is at least one triangle to output*/ - { - if(upper_val[i] <= lower_val[j]) - { - bgntfan(); - coord2f(lower_val[j], v_lower); -// glNormal3fv(lowerNormal[j]); -// glVertex3fv(lowerXYZ[j]); - - /*find the last k>=i such that - *upperverts[k][0] <= lowerverts[j][0] - */ - k=i; - - while(k lower_val[j]) - break; - k++; - - } - k--; - - - for(l=k; l>=i; l--)/*the reverse is for two-side lighting*/ - { - coord2f(upper_val[l], v_upper); -// glNormal3fv(upperNormal[l]); -// glVertex3fv(upperXYZ[l]); - - } - coord2f(leftMostV[0], leftMostV[1]); -// glNormal3fv(leftMostNormal); -// glVertex3fv(leftMostXYZ); - - endtfan(); - - /*update i and leftMostV for next loop - */ - i = k+1; - - leftMostV[0] = upper_val[k]; - leftMostV[1] = v_upper; -// leftMostNormal = upperNormal[k]; -// leftMostXYZ = upperXYZ[k]; - } - else /*upperVerts[i][0] > lowerVerts[j][0]*/ - { - bgntfan(); - coord2f(upper_val[i], v_upper); -// glNormal3fv(upperNormal[i]); -// glVertex3fv(upperXYZ[i]); - - coord2f(leftMostV[0], leftMostV[1]); -// glNormal3fv(leftMostNormal); -// glVertex3fv(leftMostXYZ); - - - /*find the last k>=j such that - *lowerverts[k][0] < upperverts[i][0] - */ - k=j; - while(k< n_lower) - { - if(lower_val[k] >= upper_val[i]) - break; - coord2f(lower_val[k], v_lower); -// glNormal3fv(lowerNormal[k]); -// glVertex3fv(lowerXYZ[k]); - - k++; - } - endtfan(); - - /*update j and leftMostV for next loop - */ - j=k; - leftMostV[0] = lower_val[j-1]; - leftMostV[1] = v_lower; - -// leftMostNormal = lowerNormal[j-1]; -// leftMostXYZ = lowerXYZ[j-1]; - } - } - } - //clean up -// free(upperXYZ); -// free(lowerXYZ); -// free(upperNormal); -// free(lowerNormal); -#endif - -} - - -void -OpenGLSurfaceEvaluator::evalVStrip(int n_left, REAL u_left, REAL* left_val, int n_right, REAL u_right, REAL* right_val) -{ -#ifdef USE_INTERNAL_EVAL - inEvalVStrip(n_left, u_left, left_val, - n_right, u_right, right_val); -#else - -#ifdef FOR_CHRIS - evalVStripExt(n_left, u_left, left_val, - n_right, u_right, right_val); - return; - -#endif - - int i,j,k,l; - REAL botMostV[2]; - /* - *the algorithm works by scanning from bot to top. - *botMostV: the bot most of the remaining verteces (on both left and right). - * it could an element of leftVerts or rightVerts. - *i: leftVerts[i] is the first vertex to the top of botMostV on left line - *j: rightVerts[j] is the first vertex to the top of botMostV on rightline - */ - - /*initialize i,j,and botMostV - */ - if(left_val[0] <= right_val[0]) - { - i=1; - j=0; - - botMostV[0] = u_left; - botMostV[1] = left_val[0]; - } - else - { - i=0; - j=1; - - botMostV[0] = u_right; - botMostV[1] = right_val[0]; - } - - /*the main loop. - *the invariance is that: - *at the beginning of each loop, the meaning of i,j,and botMostV are - *maintained - */ - while(1) - { - if(i >= n_left) /*case1: no more in left*/ - { - if(j= n_right) /*case2: no more in right*/ - { - if(i=i; k--) /*reverse order for two-side lighting*/ - { - coord2f(u_left, left_val[k]); -// glNormal3fv(leftNormal[k]); -// glVertex3fv(leftXYZ[k]); - } - - endtfan(); - } - break; /*exit the main loop*/ - } - else /* case3: neither is empty, plus the botMostV, there is at least one triangle to output*/ - { - if(left_val[i] <= right_val[j]) - { - bgntfan(); - coord2f(u_right, right_val[j]); -// glNormal3fv(rightNormal[j]); -// glVertex3fv(rightXYZ[j]); - - /*find the last k>=i such that - *leftverts[k][0] <= rightverts[j][0] - */ - k=i; - - while(k right_val[j]) - break; - k++; - - } - k--; - - - for(l=k; l>=i; l--)/*the reverse is for two-side lighting*/ - { - coord2f(u_left, left_val[l]); -// glNormal3fv(leftNormal[l]); -// glVertex3fv(leftXYZ[l]); - - } - coord2f(botMostV[0], botMostV[1]); -// glNormal3fv(botMostNormal); -// glVertex3fv(botMostXYZ); - - endtfan(); - - /*update i and botMostV for next loop - */ - i = k+1; - - botMostV[0] = u_left; - botMostV[1] = left_val[k]; -// botMostNormal = leftNormal[k]; -// botMostXYZ = leftXYZ[k]; - } - else /*left_val[i] > right_val[j])*/ - { - bgntfan(); - coord2f(u_left, left_val[i]); -// glNormal3fv(leftNormal[i]); -// glVertex3fv(leftXYZ[i]); - - coord2f(botMostV[0], botMostV[1]); -// glNormal3fv(botMostNormal); -// glVertex3fv(botMostXYZ); - - - /*find the last k>=j such that - *rightverts[k][0] < leftverts[i][0] - */ - k=j; - while(k< n_right) - { - if(right_val[k] >= left_val[i]) - break; - coord2f(u_right, right_val[k]); -// glNormal3fv(rightNormal[k]); -// glVertex3fv(rightXYZ[k]); - - k++; - } - endtfan(); - - /*update j and botMostV for next loop - */ - j=k; - botMostV[0] = u_right; - botMostV[1] = right_val[j-1]; - -// botMostNormal = rightNormal[j-1]; -// botMostXYZ = rightXYZ[j-1]; - } - } - } - //clean up -// free(leftXYZ); -// free(leftNormal); -// free(rightXYZ); -// free(rightNormal); -#endif -} - - -void -OpenGLSurfaceEvaluator::bgnqstrip(void) -{ - if(output_triangles) - bezierPatchMeshBeginStrip(global_bpm, GL_QUAD_STRIP); - else - glBegin((GLenum) GL_QUAD_STRIP); - -#ifdef STATISTICS - STAT_num_of_quad_strips++; -#endif -} - -void -OpenGLSurfaceEvaluator::endqstrip(void) -{ - if(output_triangles) - bezierPatchMeshEndStrip(global_bpm); - else - glEnd(); - -} - -/*------------------------------------------------------------------------- - * bgnmap2f - preamble to surface definition and evaluations - *------------------------------------------------------------------------- - */ -void -OpenGLSurfaceEvaluator::bgnmap2f(long) -{ - if(output_triangles) - { - /*deallocate the space which may has been - *allocated by global_bpm previously - */ - if(global_bpm != NULL) { - bezierPatchMeshListDelete(global_bpm); - global_bpm = NULL; - } - - - /* - auto_normal_flag = 1; //always output normal in callback mode. - //we could have used the following code, - //but Inspector doesn't have gl context - //before it calls tessellator. - //this way is temporary. - */ - //NEWCALLBACK - //if one of the two normal callback functions are set, - //then set - if(normalCallBackN != NULL || - normalCallBackData != NULL) - auto_normal_flag = 1; - else - auto_normal_flag = 0; - - //initialize so that no maps initially - vertex_flag = 0; - normal_flag = 0; - color_flag = 0; - texcoord_flag = 0; - - /* - if(glIsEnabled(GL_AUTO_NORMAL) == GL_TRUE) - auto_normal_flag = 1; - else if (callback_auto_normal == 1) - auto_normal_flag = 1; - else - auto_normal_flag = 0; - */ - - //NEWCALLBACK: no need to worry about gl states when gling clalback - } - else - { - glPushAttrib((GLbitfield) GL_EVAL_BIT); - - /*to avoid side effect, we restor the opengl state for GL_POLYGON_MODE - */ - glGetIntegerv(GL_POLYGON_MODE, gl_polygon_mode); - } - -} - -/*------------------------------------------------------------------------- - * endmap2f - postamble to a map - *------------------------------------------------------------------------- - */ -void -OpenGLSurfaceEvaluator::endmap2f(void) -{ - - if(output_triangles) - { - //bezierPatchMeshListDelDeg(global_bpm); - - // bezierPatchMeshListEval(global_bpm); - - //surfcount++; - //printf("surfcount=%i\n", surfcount); - //if(surfcount == 8) exit(0); - - inBPMListEvalEM(global_bpm); - - - -/* - global_bpm = bezierPatchMeshListReverse(global_bpm); - { - float *vertex_array; - float *normal_array; - int *length_array; - int *type_array; - int num_strips; - bezierPatchMeshListCollect(global_bpm, &vertex_array, &normal_array, &length_array, &type_array, &num_strips); - drawStrips(vertex_array, normal_array, length_array, type_array, num_strips); - free(vertex_array); - free(normal_array); - free(length_array); - free(type_array); - } -*/ - - //bezierPatchMeshListPrint(global_bpm); - //bezierPatchMeshListDraw(global_bpm); - -// printf("num triangles=%i\n", bezierPatchMeshListNumTriangles(global_bpm)); - -#ifdef USE_LOD -#else - bezierPatchMeshListDelete(global_bpm); - global_bpm = NULL; -#endif - - } -else - { -#ifndef USE_LOD -glPopAttrib(); -#endif - -#ifdef STATISTICS - fprintf(stderr, "num_vertices=%i,num_triangles=%i,num_quads_strips=%i\n", STAT_num_of_eval_vertices,STAT_num_of_triangles,STAT_num_of_quad_strips); -#endif - - /*to restore the gl_polygon_mode - */ -#ifndef USE_LOD - glPolygonMode( GL_FRONT, (GLenum) gl_polygon_mode[0]); - glPolygonMode( GL_BACK, (GLenum) gl_polygon_mode[1]); -#endif -} - -} - -/*------------------------------------------------------------------------- - * map2f - pass a desription of a surface map - *------------------------------------------------------------------------- - */ -void -OpenGLSurfaceEvaluator::map2f( - long _type, - REAL _ulower, /* u lower domain coord */ - REAL _uupper, /* u upper domain coord */ - long _ustride, /* interpoint distance */ - long _uorder, /* parametric order */ - REAL _vlower, /* v lower domain coord */ - REAL _vupper, /* v upper domain coord */ - long _vstride, /* interpoint distance */ - long _vorder, /* parametric order */ - REAL *pts) /* control points */ -{ -#ifdef USE_INTERNAL_EVAL - inMap2f((int) _type, (REAL) _ulower, (REAL) _uupper, - (int) _ustride, (int) _uorder, (REAL) _vlower, - (REAL) _vupper, (int) _vstride, (int) _vorder, - (REAL *) pts); -#else - - - - if(output_triangles) - { - if(global_bpm == NULL) - global_bpm = bezierPatchMeshMake2(10,10); - if( - (global_bpm->bpatch == NULL && - (_type == GL_MAP2_VERTEX_3 || _type == GL_MAP2_VERTEX_4)) - || - (global_bpm->bpatch_normal == NULL && - (_type == GL_MAP2_NORMAL)) - || - (global_bpm->bpatch_color == NULL && - (_type == GL_MAP2_INDEX || _type == GL_MAP2_COLOR_4)) - || - (global_bpm->bpatch_texcoord == NULL && - (_type == GL_MAP2_TEXTURE_COORD_1 || - _type == GL_MAP2_TEXTURE_COORD_2 || - _type == GL_MAP2_TEXTURE_COORD_3 || - _type == GL_MAP2_TEXTURE_COORD_4 ) - )) - { - bezierPatchMeshPutPatch(global_bpm, (int) _type, _ulower, _uupper,(int) _ustride,(int) _uorder,_vlower, _vupper, (int) _vstride, (int) _vorder, pts); - } - else /*new surface patch (with multiple maps) starts*/ - { - bezierPatchMesh *temp = bezierPatchMeshMake2(10,10); - bezierPatchMeshPutPatch(temp, (int) _type, _ulower, _uupper,(int) _ustride,(int) _uorder,_vlower, _vupper, (int) _vstride, (int) _vorder, pts); - global_bpm = bezierPatchMeshListInsert(global_bpm, temp); - - /* - global_bpm = bezierPatchMeshListInsert(global_bpm, - bezierPatchMeshMake( - (int) _type, _ulower, _uupper,(int) _ustride, (int) _uorder, _vlower, _vupper, (int) _vstride, (int) _vorder, pts, 10, 10)); - */ - } - } - else /*not output triangles*/ - { - glMap2f((GLenum) _type, (GLfloat) _ulower, (GLfloat) _uupper, - (GLint) _ustride, (GLint) _uorder, (GLfloat) _vlower, - (GLfloat) _vupper, (GLint) _vstride, (GLint) _vorder, - (const GLfloat *) pts); - } - -#endif -} - - -/*------------------------------------------------------------------------- - * mapmesh2f - evaluate a mesh of points on lattice - *------------------------------------------------------------------------- - */ -void -OpenGLSurfaceEvaluator::mapmesh2f(long style, long umin, long umax, long vmin, long vmax) -{ -#ifdef NO_EVALUATION -return; -#endif - -#ifdef USE_INTERNAL_EVAL - inEvalMesh2((int)umin, (int)vmin, (int)umax, (int)vmax); -#else - - - -if(output_triangles) -{ -#ifdef USE_LOD - bezierPatchMeshBeginStrip(global_bpm, GL_POLYGON); - bezierPatchMeshInsertUV(global_bpm, global_grid_u0, global_grid_v0); - bezierPatchMeshInsertUV(global_bpm, global_grid_u1, global_grid_v1); - bezierPatchMeshInsertUV(global_bpm, (REAL)global_grid_nu, (REAL)global_grid_nv); - bezierPatchMeshInsertUV(global_bpm, (REAL)umin, (REAL)vmin); - bezierPatchMeshInsertUV(global_bpm, (REAL)umax, (REAL)vmax); - bezierPatchMeshEndStrip(global_bpm); - -#else - - REAL du, dv; - long i,j; - if(global_grid_nu == 0 || global_grid_nv == 0) - return; /*no points need to be output*/ - du = (global_grid_u1 - global_grid_u0) / (REAL)global_grid_nu; - dv = (global_grid_v1 - global_grid_v0) / (REAL)global_grid_nv; - - if(global_grid_nu >= global_grid_nv){ - - for(i=umin; i=vmin; j--){ - REAL v1 = (j == global_grid_nv)? global_grid_v1: (global_grid_v0 +j*dv); - - coord2f(u1, v1); - coord2f(u2, v1); - } - endqstrip(); - } - } - else{ - - for(i=vmin; i=umin; j--){ - REAL u1 = (j == global_grid_nu)? global_grid_u1: (global_grid_u0 +j*du); - coord2f(u1, v2); - coord2f(u1, v1); - } - endqstrip(); - } - } -#endif -} -else -{ - switch(style) { - default: - case N_MESHFILL: - glEvalMesh2((GLenum) GL_FILL, (GLint) umin, (GLint) umax, - (GLint) vmin, (GLint) vmax); - break; - case N_MESHLINE: - glEvalMesh2((GLenum) GL_LINE, (GLint) umin, (GLint) umax, - (GLint) vmin, (GLint) vmax); - break; - case N_MESHPOINT: - glEvalMesh2((GLenum) GL_POINT, (GLint) umin, (GLint) umax, - (GLint) vmin, (GLint) vmax); - break; - } - } - -#endif - -#ifdef STATISTICS - STAT_num_of_quad_strips += (umax-umin)*(vmax-vmin); -#endif -} - -/*------------------------------------------------------------------------- - * evalcoord2f - evaluate a point on a surface - *------------------------------------------------------------------------- - */ -void -OpenGLSurfaceEvaluator::evalcoord2f(long, REAL u, REAL v) -{ - - -#ifdef NO_EVALUATION -return; -#endif - - - newtmeshvert(u, v); -} - -/*------------------------------------------------------------------------- - * evalpoint2i - evaluate a grid point - *------------------------------------------------------------------------- - */ -void -OpenGLSurfaceEvaluator::evalpoint2i(long u, long v) -{ -#ifdef NO_EVALUATION -return; -#endif - - newtmeshvert(u, v); -} - -void -OpenGLSurfaceEvaluator::point2i( long u, long v ) -{ -#ifdef NO_EVALUATION -return; -#else - -#ifdef USE_INTERNAL_EVAL - inEvalPoint2( (int)u, (int)v); -#else - - -if(output_triangles) -{ - - REAL du, dv; - REAL fu,fv; - du = (global_grid_u1 - global_grid_u0) / (REAL)global_grid_nu; - dv = (global_grid_v1 - global_grid_v0) / (REAL)global_grid_nv; - fu = (u==global_grid_nu)? global_grid_u1:(global_grid_u0 + u*du); - fv = (v == global_grid_nv)? global_grid_v1: (global_grid_v0 +v*dv); - coord2f(fu,fv); -} -else - glEvalPoint2((GLint) u, (GLint) v); - - -#endif - -#ifdef STATISTICS - STAT_num_of_eval_vertices++; -#endif - -#endif - -} - -void -OpenGLSurfaceEvaluator::coord2f( REAL u, REAL v ) -{ -#ifdef NO_EVALUATION -return; -#else - -#ifdef USE_INTERNAL_EVAL - inEvalCoord2f( u, v); -#else - - -if(output_triangles) - bezierPatchMeshInsertUV(global_bpm, u,v); -else - glEvalCoord2f((GLfloat) u, (GLfloat) v); - - -#endif - - -#ifdef STATISTICS - STAT_num_of_eval_vertices++; -#endif - -#endif -} - -void -OpenGLSurfaceEvaluator::newtmeshvert( long u, long v ) -{ -#ifdef NO_EVALUATION -return; -#else - - if (tmeshing) { - - if (vcount == 2) { - vertexCache[0]->invoke(this); - vertexCache[1]->invoke(this); - point2i( u, v); - - } else { - vcount++; - } - - vertexCache[which]->saveEvalPoint(u, v); - which = 1 - which; - } else { - point2i( u, v); - } -#endif -} - -void -OpenGLSurfaceEvaluator::newtmeshvert( REAL u, REAL v ) -{ -#ifdef NO_EVALUATION -return; -#else - if (tmeshing) { - - - if (vcount == 2) { - vertexCache[0]->invoke(this); - vertexCache[1]->invoke(this); - coord2f(u,v); - - } else { - vcount++; - } - - vertexCache[which]->saveEvalCoord(u, v); - which = 1 - which; - } else { - - coord2f( u, v); - } -#endif - -} - -void -OpenGLSurfaceEvaluator::putCallBack(GLenum which, _GLUfuncptr fn ) -{ - switch(which) - { - case GLU_NURBS_BEGIN: - beginCallBackN = (void (GLAPIENTRY *) (GLenum)) fn; - break; - case GLU_NURBS_END: - endCallBackN = (void (GLAPIENTRY *) (void)) fn; - break; - case GLU_NURBS_VERTEX: - vertexCallBackN = (void (GLAPIENTRY *) (const GLfloat*)) fn; - break; - case GLU_NURBS_NORMAL: - normalCallBackN = (void (GLAPIENTRY *) (const GLfloat*)) fn; - break; - case GLU_NURBS_COLOR: - colorCallBackN = (void (GLAPIENTRY *) (const GLfloat*)) fn; - break; - case GLU_NURBS_TEXTURE_COORD: - texcoordCallBackN = (void (GLAPIENTRY *) (const GLfloat*)) fn; - break; - case GLU_NURBS_BEGIN_DATA: - beginCallBackData = (void (GLAPIENTRY *) (GLenum, void*)) fn; - break; - case GLU_NURBS_END_DATA: - endCallBackData = (void (GLAPIENTRY *) (void*)) fn; - break; - case GLU_NURBS_VERTEX_DATA: - vertexCallBackData = (void (GLAPIENTRY *) (const GLfloat*, void*)) fn; - break; - case GLU_NURBS_NORMAL_DATA: - normalCallBackData = (void (GLAPIENTRY *) (const GLfloat*, void*)) fn; - break; - case GLU_NURBS_COLOR_DATA: - colorCallBackData = (void (GLAPIENTRY *) (const GLfloat*, void*)) fn; - break; - case GLU_NURBS_TEXTURE_COORD_DATA: - texcoordCallBackData = (void (GLAPIENTRY *) (const GLfloat*, void*)) fn; - break; - - } -} - - -void -OpenGLSurfaceEvaluator::beginCallBack(GLenum which, void *data) -{ - if(beginCallBackData) - beginCallBackData(which, data); - else if(beginCallBackN) - beginCallBackN(which); -} - -void -OpenGLSurfaceEvaluator::endCallBack(void *data) -{ - if(endCallBackData) - endCallBackData(data); - else if(endCallBackN) - endCallBackN(); -} - -void -OpenGLSurfaceEvaluator::vertexCallBack(const GLfloat *vert, void* data) -{ - if(vertexCallBackData) - vertexCallBackData(vert, data); - else if(vertexCallBackN) - vertexCallBackN(vert); -} - - -void -OpenGLSurfaceEvaluator::normalCallBack(const GLfloat *normal, void* data) -{ - if(normalCallBackData) - normalCallBackData(normal, data); - else if(normalCallBackN) - normalCallBackN(normal); -} - -void -OpenGLSurfaceEvaluator::colorCallBack(const GLfloat *color, void* data) -{ - if(colorCallBackData) - colorCallBackData(color, data); - else if(colorCallBackN) - colorCallBackN(color); -} - -void -OpenGLSurfaceEvaluator::texcoordCallBack(const GLfloat *texcoord, void* data) -{ - if(texcoordCallBackData) - texcoordCallBackData(texcoord, data); - else if(texcoordCallBackN) - texcoordCallBackN(texcoord); -} - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glsurfeval.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glsurfeval.h deleted file mode 100644 index c34a58cb9b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/glsurfeval.h +++ /dev/null @@ -1,408 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * glsurfeval.h - * - */ - -#ifndef __gluglsurfeval_h_ -#define __gluglsurfeval_h_ - -#include "basicsurfeval.h" -#include "bezierPatchMesh.h" //in case output triangles -#include -#include - -class SurfaceMap; -class OpenGLSurfaceEvaluator; -class StoredVertex; - -#define TYPECOORD 1 -#define TYPEPOINT 2 - -/* Cache up to 3 vertices from tmeshes */ -#define VERTEX_CACHE_SIZE 3 - -/*for internal evaluator callback stuff*/ -#ifndef IN_MAX_BEZIER_ORDER -#define IN_MAX_BEZIER_ORDER 40 /*XXX should be bigger than machine order*/ -#endif - -#ifndef IN_MAX_DIMENSION -#define IN_MAX_DIMENSION 4 -#endif - -typedef struct surfEvalMachine{ - REAL uprime;//cached previusly evaluated uprime. - REAL vprime; - int k; /*the dimension*/ - REAL u1; - REAL u2; - int ustride; - int uorder; - REAL v1; - REAL v2; - int vstride; - int vorder; - REAL ctlPoints[IN_MAX_BEZIER_ORDER*IN_MAX_BEZIER_ORDER*IN_MAX_DIMENSION]; - REAL ucoeff[IN_MAX_BEZIER_ORDER]; /*cache the polynomial values*/ - REAL vcoeff[IN_MAX_BEZIER_ORDER]; - REAL ucoeffDeriv[IN_MAX_BEZIER_ORDER]; /*cache the polynomial derivatives*/ - REAL vcoeffDeriv[IN_MAX_BEZIER_ORDER]; -} surfEvalMachine; - - - -class StoredVertex { -public: - StoredVertex() { type = 0; } - ~StoredVertex(void) {} - void saveEvalCoord(REAL x, REAL y) - {coord[0] = x; coord[1] = y; type = TYPECOORD; } - void saveEvalPoint(long x, long y) - {point[0] = x; point[1] = y; type = TYPEPOINT; } - void invoke(OpenGLSurfaceEvaluator *eval); - -private: - int type; - REAL coord[2]; - long point[2]; -}; - -class OpenGLSurfaceEvaluator : public BasicSurfaceEvaluator { -public: - OpenGLSurfaceEvaluator(); - virtual ~OpenGLSurfaceEvaluator( void ); - void polymode( long style ); - void range2f( long, REAL *, REAL * ); - void domain2f( REAL, REAL, REAL, REAL ); - void addMap( SurfaceMap * ) { } - - void enable( long ); - void disable( long ); - void bgnmap2f( long ); - void map2f( long, REAL, REAL, long, long, - REAL, REAL, long, long, REAL * ); - void mapgrid2f( long, REAL, REAL, long, REAL, REAL ); - void mapmesh2f( long, long, long, long, long ); - void evalcoord2f( long, REAL, REAL ); - void evalpoint2i( long, long ); - void endmap2f( void ); - - void bgnline( void ); - void endline( void ); - void bgnclosedline( void ); - void endclosedline( void ); - void bgntmesh( void ); - void swaptmesh( void ); - void endtmesh( void ); - void bgnqstrip( void ); - void endqstrip( void ); - - void bgntfan( void ); - void endtfan( void ); - void evalUStrip(int n_upper, REAL v_upper, REAL* upper_val, - int n_lower, REAL v_lower, REAL* lower_val); - void evalVStrip(int n_left, REAL u_left, REAL* left_val, - int n_right, REAL u_right, REAL* right_val); - - void coord2f( REAL, REAL ); - void point2i( long, long ); - - void newtmeshvert( REAL, REAL ); - void newtmeshvert( long, long ); - -#ifdef _WIN32 - void putCallBack(GLenum which, void (APIENTRY *fn)() ); -#else - void putCallBack(GLenum which, _GLUfuncptr fn ); -#endif - - int get_vertices_call_back() - { - return output_triangles; - } - void put_vertices_call_back(int flag) - { - output_triangles = flag; - } - - void put_callback_auto_normal(int flag) - { - callback_auto_normal = flag; - } - - int get_callback_auto_normal() - { - return callback_auto_normal; - } - - void set_callback_userData(void* data) - { - userData = data; - } - - /**************begin for LOD_eval_list***********/ - void LOD_eval_list(int level); - - - - -private: - StoredVertex *vertexCache[VERTEX_CACHE_SIZE]; - int tmeshing; - int which; - int vcount; - - GLint gl_polygon_mode[2];/*to save and restore so that - *no side effect - */ - bezierPatchMesh *global_bpm; //for output triangles - int output_triangles; //true 1 or false 0 - - - - void (GLAPIENTRY *beginCallBackN) (GLenum type); - void (GLAPIENTRY *endCallBackN) (void); - void (GLAPIENTRY *vertexCallBackN) (const GLfloat *vert); - void (GLAPIENTRY *normalCallBackN) (const GLfloat *normal); - void (GLAPIENTRY *colorCallBackN) (const GLfloat *color); - void (GLAPIENTRY *texcoordCallBackN) (const GLfloat *texcoord); - - void (GLAPIENTRY *beginCallBackData) (GLenum type, void* data); - void (GLAPIENTRY *endCallBackData) (void* data); - void (GLAPIENTRY *vertexCallBackData) (const GLfloat *vert, void* data); - void (GLAPIENTRY *normalCallBackData) (const GLfloat *normal, void* data); - void (GLAPIENTRY *colorCallBackData) (const GLfloat *color, void* data); - void (GLAPIENTRY *texcoordCallBackData) (const GLfloat *texcoord, void* data); - - void beginCallBack (GLenum type, void* data); - void endCallBack (void* data); - void vertexCallBack (const GLfloat *vert, void* data); - void normalCallBack (const GLfloat *normal, void* data); - void colorCallBack (const GLfloat *color, void* data); - void texcoordCallBack (const GLfloat *texcoord, void* data); - - - void* userData; //the opaque pointer for Data callback functions. - - /*LOD evaluation*/ - void LOD_triangle(REAL A[2], REAL B[2], REAL C[2], - int level); - void LOD_eval(int num_vert, REAL* verts, int type, int level); - - int LOD_eval_level; //set by LOD_eval_list() - - /*************begin for internal evaluators*****************/ - - /*the following global variables are only defined in this file. - *They are used to cache the precomputed Bezier polynomial values. - *These calues may be used consecutively in which case we don't have - *recompute these values again. - */ - int global_uorder; /*store the uorder in the previous evaluation*/ - int global_vorder; /*store the vorder in the previous evaluation*/ - REAL global_uprime; - REAL global_vprime; - REAL global_vprime_BV; - REAL global_uprime_BU; - int global_uorder_BV; /*store the uorder in the previous evaluation*/ - int global_vorder_BV; /*store the vorder in the previous evaluation*/ - int global_uorder_BU; /*store the uorder in the previous evaluation*/ - int global_vorder_BU; /*store the vorder in the previous evaluation*/ - - REAL global_ucoeff[IN_MAX_BEZIER_ORDER]; /*cache the polynomial values*/ - REAL global_vcoeff[IN_MAX_BEZIER_ORDER]; - REAL global_ucoeffDeriv[IN_MAX_BEZIER_ORDER]; /*cache the polynomial derivatives*/ - REAL global_vcoeffDeriv[IN_MAX_BEZIER_ORDER]; - - REAL global_BV[IN_MAX_BEZIER_ORDER][IN_MAX_DIMENSION]; - REAL global_PBV[IN_MAX_BEZIER_ORDER][IN_MAX_DIMENSION]; - REAL global_BU[IN_MAX_BEZIER_ORDER][IN_MAX_DIMENSION]; - REAL global_PBU[IN_MAX_BEZIER_ORDER][IN_MAX_DIMENSION]; - REAL* global_baseData; - - int global_ev_k; /*the dimension*/ - REAL global_ev_u1; - REAL global_ev_u2; - int global_ev_ustride; - int global_ev_uorder; - REAL global_ev_v1; - REAL global_ev_v2; - int global_ev_vstride; - int global_ev_vorder; - REAL global_ev_ctlPoints[IN_MAX_BEZIER_ORDER*IN_MAX_BEZIER_ORDER*IN_MAX_DIMENSION]; - - REAL global_grid_u0; - REAL global_grid_u1; - int global_grid_nu; - REAL global_grid_v0; - REAL global_grid_v1; - int global_grid_nv; - -/*functions*/ - void inDoDomain2WithDerivs(int k, REAL u, REAL v, - REAL u1, REAL u2, int uorder, - REAL v1, REAL v2, int vorder, - REAL *baseData, - REAL *retPoint, REAL *retdu, REAL *retdv); - void inPreEvaluate(int order, REAL vprime, REAL *coeff); - void inPreEvaluateWithDeriv(int order, REAL vprime, REAL *coeff, REAL *coeffDeriv); - void inComputeFirstPartials(REAL *p, REAL *pu, REAL *pv); - void inComputeNormal2(REAL *pu, REAL *pv, REAL *n); - void inDoEvalCoord2(REAL u, REAL v, - REAL *retPoint, REAL *retNormal); - void inDoEvalCoord2NOGE(REAL u, REAL v, - REAL *retPoint, REAL *retNormal); - void inMap2f(int k, - REAL ulower, - REAL uupper, - int ustride, - int uorder, - REAL vlower, - REAL vupper, - int vstride, - int vorder, - REAL *ctlPoints); - - void inMapGrid2f(int nu, REAL u0, REAL u1, - int nv, REAL v0, REAL v1); - - void inEvalMesh2(int lowU, int lowV, int highU, int highV); - void inEvalPoint2(int i, int j); - void inEvalCoord2f(REAL u, REAL v); - -void inEvalULine(int n_points, REAL v, REAL* u_vals, - int stride, REAL ret_points[][3], REAL ret_normals[][3]); - -void inEvalVLine(int n_points, REAL u, REAL* v_vals, - int stride, REAL ret_points[][3], REAL ret_normals[][3]); - -void inEvalUStrip(int n_upper, REAL v_upper, REAL* upper_val, - int n_lower, REAL v_lower, REAL* lower_val - ); -void inEvalVStrip(int n_left, REAL u_left, REAL* left_val, int n_right, REAL u_right, REAL* right_val); - -void inPreEvaluateBV(int k, int uorder, int vorder, REAL vprime, REAL *baseData); -void inPreEvaluateBU(int k, int uorder, int vorder, REAL uprime, REAL *baseData); -void inPreEvaluateBV_intfac(REAL v ) - { - inPreEvaluateBV(global_ev_k, global_ev_uorder, global_ev_vorder, (v-global_ev_v1)/(global_ev_v2-global_ev_v1), global_ev_ctlPoints); - } - -void inPreEvaluateBU_intfac(REAL u) - { - inPreEvaluateBU(global_ev_k, global_ev_uorder, global_ev_vorder, (u-global_ev_u1)/(global_ev_u2-global_ev_u1), global_ev_ctlPoints); - } - -void inDoDomain2WithDerivsBV(int k, REAL u, REAL v, - REAL u1, REAL u2, int uorder, - REAL v1, REAL v2, int vorder, - REAL *baseData, - REAL *retPoint, REAL* retdu, REAL *retdv); - -void inDoDomain2WithDerivsBU(int k, REAL u, REAL v, - REAL u1, REAL u2, int uorder, - REAL v1, REAL v2, int vorder, - REAL *baseData, - REAL *retPoint, REAL* retdu, REAL *retdv); - - -void inDoEvalCoord2NOGE_BV(REAL u, REAL v, - REAL *retPoint, REAL *retNormal); - -void inDoEvalCoord2NOGE_BU(REAL u, REAL v, - REAL *retPoint, REAL *retNormal); - -void inBPMEval(bezierPatchMesh* bpm); -void inBPMListEval(bezierPatchMesh* list); - -/*-------------begin for surfEvalMachine -------------*/ -surfEvalMachine em_vertex; -surfEvalMachine em_normal; -surfEvalMachine em_color; -surfEvalMachine em_texcoord; - -int auto_normal_flag; //whether to output normla or not in callback - //determined by GL_AUTO_NORMAL and callback_auto_normal -int callback_auto_normal; //GLU_CALLBACK_AUTO_NORMAL_EXT -int vertex_flag; -int normal_flag; -int color_flag; -int texcoord_flag; - -void inMap2fEM(int which, //0:vert,1:norm,2:color,3:tex - int dimension, - REAL ulower, - REAL uupper, - int ustride, - int uorder, - REAL vlower, - REAL vupper, - int vstride, - int vorder, - REAL *ctlPoints); - -void inDoDomain2WithDerivsEM(surfEvalMachine *em, REAL u, REAL v, - REAL *retPoint, REAL *retdu, REAL *retdv); -void inDoDomain2EM(surfEvalMachine *em, REAL u, REAL v, - REAL *retPoint); - void inDoEvalCoord2EM(REAL u, REAL v); - -void inBPMEvalEM(bezierPatchMesh* bpm); -void inBPMListEvalEM(bezierPatchMesh* list); - -/*-------------end for surfEvalMachine -------------*/ - - - /*************end for internal evaluators*****************/ - -}; - -inline void StoredVertex::invoke(OpenGLSurfaceEvaluator *eval) -{ - switch(type) { - case TYPECOORD: - eval->coord2f(coord[0], coord[1]); - break; - case TYPEPOINT: - eval->point2i(point[0], point[1]); - break; - default: - break; - } -} - -#endif /* __gluglsurfeval_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/incurveeval.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/incurveeval.cc deleted file mode 100644 index 336cca0508..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/incurveeval.cc +++ /dev/null @@ -1,208 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/incurveeval.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $ -*/ - -#include -#include - -#include "glcurveval.h" - - -/* - *compute the Bezier polynomials C[n,j](v) for all j at v with - *return values stored in coeff[], where - * C[n,j](v) = (n,j) * v^j * (1-v)^(n-j), - * j=0,1,2,...,n. - *order : n+1 - *vprime: v - *coeff : coeff[j]=C[n,j](v), this array store the returned values. - *The algorithm is a recursive scheme: - * C[0,0]=1; - * C[n,j](v) = (1-v)*C[n-1,j](v) + v*C[n-1,j-1](v), n>=1 - *This code is copied from opengl/soft/so_eval.c:PreEvaluate - */ -void OpenGLCurveEvaluator::inPreEvaluate(int order, REAL vprime, REAL *coeff) -{ - int i, j; - REAL oldval, temp; - REAL oneMinusvprime; - - /* - * Minor optimization - * Compute orders 1 and 2 outright, and set coeff[0], coeff[1] to - * their i==1 loop values to avoid the initialization and the i==1 loop. - */ - if (order == 1) { - coeff[0] = 1.0; - return; - } - - oneMinusvprime = 1-vprime; - coeff[0] = oneMinusvprime; - coeff[1] = vprime; - if (order == 2) return; - - for (i = 2; i < order; i++) { - oldval = coeff[0] * vprime; - coeff[0] = oneMinusvprime * coeff[0]; - for (j = 1; j < i; j++) { - temp = oldval; - oldval = coeff[j] * vprime; - coeff[j] = temp + oneMinusvprime * coeff[j]; - } - coeff[j] = oldval; - } -} - -void OpenGLCurveEvaluator::inMap1f(int which, //0: vert, 1: norm, 2: color, 3: tex - int k, //dimension - REAL ulower, - REAL uupper, - int ustride, - int uorder, - REAL *ctlpoints) -{ - int i,x; - curveEvalMachine *temp_em; - switch(which){ - case 0: //vertex - vertex_flag = 1; - temp_em = &em_vertex; - break; - case 1: //normal - normal_flag = 1; - temp_em = &em_normal; - break; - case 2: //color - color_flag = 1; - temp_em = &em_color; - break; - default: - texcoord_flag = 1; - temp_em = &em_texcoord; - break; - } - - REAL *data = temp_em->ctlpoints; - temp_em->uprime = -1; //initialized - temp_em->k = k; - temp_em->u1 = ulower; - temp_em->u2 = uupper; - temp_em->ustride = ustride; - temp_em->uorder = uorder; - /*copy the control points*/ - for(i=0; iu2 == em->u1) - return; - the_uprime = (u-em->u1) / (em->u2-em->u1); - /*use already cached values if possible*/ - if(em->uprime != the_uprime){ - inPreEvaluate(em->uorder, the_uprime, em->ucoeff); - em->uprime = the_uprime; - } - - for(j=0; jk; j++){ - data = em->ctlpoints+j; - retPoint[j] = 0.0; - for(row=0; rowuorder; row++) - { - retPoint[j] += em->ucoeff[row] * (*data); - data += em->k; - } - } -} - -void OpenGLCurveEvaluator::inDoEvalCoord1(REAL u) -{ - REAL temp_vertex[4]; - REAL temp_normal[3]; - REAL temp_color[4]; - REAL temp_texcoord[4]; - if(texcoord_flag) //there is a texture map - { - inDoDomain1(&em_texcoord, u, temp_texcoord); - texcoordCallBack(temp_texcoord, userData); - } -#ifdef DEBUG -printf("color_flag = %i\n", color_flag); -#endif - if(color_flag) //there is a color map - { - inDoDomain1(&em_color, u, temp_color); - colorCallBack(temp_color, userData); - } - if(normal_flag) //there is a normal map - { - inDoDomain1(&em_normal, u, temp_normal); - normalCallBack(temp_normal, userData); - } - if(vertex_flag) - { - inDoDomain1(&em_vertex, u, temp_vertex); - vertexCallBack(temp_vertex, userData); - } -} - -void OpenGLCurveEvaluator::inMapMesh1f(int umin, int umax) -{ - REAL du, u; - int i; - if(global_grid_nu == 0) - return; //no points to output - du = (global_grid_u1 - global_grid_u0) / (REAL) global_grid_nu; - bgnline(); - for(i=umin; i<= umax; i++){ - u = (i==global_grid_nu)? global_grid_u1: global_grid_u0 + i*du; - inDoEvalCoord1(u); - } - endline(); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/insurfeval.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/insurfeval.cc deleted file mode 100644 index b314699c7a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/insurfeval.cc +++ /dev/null @@ -1,2066 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2004/05/12 15:29:36 $ $Revision: 1.3 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/insurfeval.cc,v 1.3 2004/05/12 15:29:36 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include -#include -#include -#include - -#include "glsurfeval.h" - -//extern int surfcount; - -//#define CRACK_TEST - -#define AVOID_ZERO_NORMAL - -#ifdef AVOID_ZERO_NORMAL -#define myabs(x) ((x>0)? x: (-x)) -#define MYZERO 0.000001 -#define MYDELTA 0.001 -#endif - -//#define USE_LOD -#ifdef USE_LOD -//#define LOD_EVAL_COORD(u,v) inDoEvalCoord2EM(u,v) -#define LOD_EVAL_COORD(u,v) glEvalCoord2f(u,v) - -static void LOD_interpolate(REAL A[2], REAL B[2], REAL C[2], int j, int k, int pow2_level, - REAL& u, REAL& v) -{ - REAL a,a1,b,b1; - - a = ((REAL) j) / ((REAL) pow2_level); - a1 = 1-a; - - if(j != 0) - { - b = ((REAL) k) / ((REAL)j); - b1 = 1-b; - } - REAL x,y,z; - x = a1; - if(j==0) - { - y=0; z=0; - } - else{ - y = b1*a; - z = b *a; - } - - u = x*A[0] + y*B[0] + z*C[0]; - v = x*A[1] + y*B[1] + z*C[1]; -} - -void OpenGLSurfaceEvaluator::LOD_triangle(REAL A[2], REAL B[2], REAL C[2], - int level) -{ - int k,j; - int pow2_level; - /*compute 2^level*/ - pow2_level = 1; - - for(j=0; jnext) - { - inBPMEval(temp); - } -} - -void OpenGLSurfaceEvaluator::inBPMEval(bezierPatchMesh* bpm) -{ - int i,j,k,l; - float u,v; - - int ustride = bpm->bpatch->dimension * bpm->bpatch->vorder; - int vstride = bpm->bpatch->dimension; - inMap2f( - (bpm->bpatch->dimension == 3)? GL_MAP2_VERTEX_3 : GL_MAP2_VERTEX_4, - bpm->bpatch->umin, - bpm->bpatch->umax, - ustride, - bpm->bpatch->uorder, - bpm->bpatch->vmin, - bpm->bpatch->vmax, - vstride, - bpm->bpatch->vorder, - bpm->bpatch->ctlpoints); - - bpm->vertex_array = (float*) malloc(sizeof(float)* (bpm->index_UVarray/2) * 3+1); /*in case the origional dimenion is 4, then we need 4 space to pass to evaluator.*/ - assert(bpm->vertex_array); - bpm->normal_array = (float*) malloc(sizeof(float)* (bpm->index_UVarray/2) * 3); - assert(bpm->normal_array); -#ifdef CRACK_TEST -if( global_ev_u1 ==2 && global_ev_u2 == 3 - && global_ev_v1 ==2 && global_ev_v2 == 3) -{ -REAL vertex[4]; -REAL normal[4]; -#ifdef DEBUG -printf("***number 1\n"); -#endif - -beginCallBack(GL_QUAD_STRIP, NULL); -inEvalCoord2f(3.0, 3.0); -inEvalCoord2f(2.0, 3.0); -inEvalCoord2f(3.0, 2.7); -inEvalCoord2f(2.0, 2.7); -inEvalCoord2f(3.0, 2.0); -inEvalCoord2f(2.0, 2.0); -endCallBack(NULL); - - -beginCallBack(GL_TRIANGLE_STRIP, NULL); -inEvalCoord2f(2.0, 3.0); -inEvalCoord2f(2.0, 2.0); -inEvalCoord2f(2.0, 2.7); -endCallBack(NULL); - -} - -/* -if( global_ev_u1 ==2 && global_ev_u2 == 3 - && global_ev_v1 ==1 && global_ev_v2 == 2) -{ -#ifdef DEBUG -printf("***number 2\n"); -#endif -beginCallBack(GL_QUAD_STRIP); -inEvalCoord2f(2.0, 2.0); -inEvalCoord2f(2.0, 1.0); -inEvalCoord2f(3.0, 2.0); -inEvalCoord2f(3.0, 1.0); -endCallBack(); -} -*/ -if( global_ev_u1 ==1 && global_ev_u2 == 2 - && global_ev_v1 ==2 && global_ev_v2 == 3) -{ -#ifdef DEBUG -printf("***number 3\n"); -#endif -beginCallBack(GL_QUAD_STRIP, NULL); -inEvalCoord2f(2.0, 3.0); -inEvalCoord2f(1.0, 3.0); -inEvalCoord2f(2.0, 2.3); -inEvalCoord2f(1.0, 2.3); -inEvalCoord2f(2.0, 2.0); -inEvalCoord2f(1.0, 2.0); -endCallBack(NULL); - -beginCallBack(GL_TRIANGLE_STRIP, NULL); -inEvalCoord2f(2.0, 2.3); -inEvalCoord2f(2.0, 2.0); -inEvalCoord2f(2.0, 3.0); -endCallBack(NULL); - -} -return; -#endif - - k=0; - l=0; - - for(i=0; iindex_length_array; i++) - { - beginCallBack(bpm->type_array[i], userData); - for(j=0; jlength_array[i]; j++) - { - u = bpm->UVarray[k]; - v = bpm->UVarray[k+1]; - inDoEvalCoord2NOGE(u,v, - bpm->vertex_array+l, - bpm->normal_array+l); - - normalCallBack(bpm->normal_array+l, userData); - vertexCallBack(bpm->vertex_array+l, userData); - - k += 2; - l += 3; - } - endCallBack(userData); - } -} - -void OpenGLSurfaceEvaluator::inEvalPoint2(int i, int j) -{ - REAL du, dv; - REAL point[4]; - REAL normal[3]; - REAL u,v; - du = (global_grid_u1 - global_grid_u0) / (REAL)global_grid_nu; - dv = (global_grid_v1 - global_grid_v0) / (REAL)global_grid_nv; - u = (i==global_grid_nu)? global_grid_u1:(global_grid_u0 + i*du); - v = (j == global_grid_nv)? global_grid_v1: (global_grid_v0 +j*dv); - inDoEvalCoord2(u,v,point,normal); -} - -void OpenGLSurfaceEvaluator::inEvalCoord2f(REAL u, REAL v) -{ - - REAL point[4]; - REAL normal[3]; - inDoEvalCoord2(u,v,point, normal); -} - - - -/*define a grid. store the values into the global variabls: - * global_grid_* - *These values will be used later by evaluating functions - */ -void OpenGLSurfaceEvaluator::inMapGrid2f(int nu, REAL u0, REAL u1, - int nv, REAL v0, REAL v1) -{ - global_grid_u0 = u0; - global_grid_u1 = u1; - global_grid_nu = nu; - global_grid_v0 = v0; - global_grid_v1 = v1; - global_grid_nv = nv; -} - -void OpenGLSurfaceEvaluator::inEvalMesh2(int lowU, int lowV, int highU, int highV) -{ - REAL du, dv; - int i,j; - REAL point[4]; - REAL normal[3]; - if(global_grid_nu == 0 || global_grid_nv == 0) - return; /*no points need to be output*/ - du = (global_grid_u1 - global_grid_u0) / (REAL)global_grid_nu; - dv = (global_grid_v1 - global_grid_v0) / (REAL)global_grid_nv; - - if(global_grid_nu >= global_grid_nv){ - for(i=lowU; i=lowV; j--){ - REAL v1 = (j == global_grid_nv)? global_grid_v1: (global_grid_v0 +j*dv); - - inDoEvalCoord2(u1, v1, point, normal); - inDoEvalCoord2(u2, v1, point, normal); - } - endqstrip(); - } - } - - else{ - for(i=lowV; i=lowU; j--){ - REAL u1 = (j == global_grid_nu)? global_grid_u1: (global_grid_u0 +j*du); - inDoEvalCoord2(u1, v2, point, normal); - inDoEvalCoord2(u1, v1, point, normal); - } - endqstrip(); - } - } - -} - -void OpenGLSurfaceEvaluator::inMap2f(int k, - REAL ulower, - REAL uupper, - int ustride, - int uorder, - REAL vlower, - REAL vupper, - int vstride, - int vorder, - REAL *ctlPoints) -{ - int i,j,x; - REAL *data = global_ev_ctlPoints; - - - - if(k == GL_MAP2_VERTEX_3) k=3; - else if (k==GL_MAP2_VERTEX_4) k =4; - else { - printf("error in inMap2f, maptype=%i is wrong, k,map is not updated\n", k); - return; - } - - global_ev_k = k; - global_ev_u1 = ulower; - global_ev_u2 = uupper; - global_ev_ustride = ustride; - global_ev_uorder = uorder; - global_ev_v1 = vlower; - global_ev_v2 = vupper; - global_ev_vstride = vstride; - global_ev_vorder = vorder; - - /*copy the contrl points from ctlPoints to global_ev_ctlPoints*/ - for (i=0; i 0.0) { - n[0] /= mag; - n[1] /= mag; - n[2] /= mag; - } -} - - - -/*Compute point and normal - *see the head of inDoDomain2WithDerivs - *for the meaning of the arguments - */ -void OpenGLSurfaceEvaluator::inDoEvalCoord2(REAL u, REAL v, - REAL *retPoint, REAL *retNormal) -{ - - REAL du[4]; - REAL dv[4]; - - - assert(global_ev_k>=3 && global_ev_k <= 4); - /*compute homegeneous point and partial derivatives*/ - inDoDomain2WithDerivs(global_ev_k, u, v, global_ev_u1, global_ev_u2, global_ev_uorder, global_ev_v1, global_ev_v2, global_ev_vorder, global_ev_ctlPoints, retPoint, du, dv); - -#ifdef AVOID_ZERO_NORMAL - - if(myabs(dv[0]) <= MYZERO && myabs(dv[1]) <= MYZERO && myabs(dv[2]) <= MYZERO) - { - - REAL tempdu[4]; - REAL tempdata[4]; - REAL u1 = global_ev_u1; - REAL u2 = global_ev_u2; - if(u-MYDELTA*(u2-u1) < u1) - u = u+ MYDELTA*(u2-u1); - else - u = u-MYDELTA*(u2-u1); - inDoDomain2WithDerivs(global_ev_k, u,v,global_ev_u1, global_ev_u2, global_ev_uorder, global_ev_v1, global_ev_v2, global_ev_vorder, global_ev_ctlPoints, tempdata, tempdu, dv); - } - if(myabs(du[0]) <= MYZERO && myabs(du[1]) <= MYZERO && myabs(du[2]) <= MYZERO) - { - REAL tempdv[4]; - REAL tempdata[4]; - REAL v1 = global_ev_v1; - REAL v2 = global_ev_v2; - if(v-MYDELTA*(v2-v1) < v1) - v = v+ MYDELTA*(v2-v1); - else - v = v-MYDELTA*(v2-v1); - inDoDomain2WithDerivs(global_ev_k, u,v,global_ev_u1, global_ev_u2, global_ev_uorder, global_ev_v1, global_ev_v2, global_ev_vorder, global_ev_ctlPoints, tempdata, du, tempdv); - } -#endif - - - /*compute normal*/ - switch(global_ev_k){ - case 3: - inComputeNormal2(du, dv, retNormal); - - break; - case 4: - inComputeFirstPartials(retPoint, du, dv); - inComputeNormal2(du, dv, retNormal); - /*transform the homegeneous coordinate of retPoint into inhomogenous one*/ - retPoint[0] /= retPoint[3]; - retPoint[1] /= retPoint[3]; - retPoint[2] /= retPoint[3]; - break; - } - /*output this vertex*/ -/* inMeshStreamInsert(global_ms, retPoint, retNormal);*/ - - - - glNormal3fv(retNormal); - glVertex3fv(retPoint); - - - - - #ifdef DEBUG - printf("vertex(%f,%f,%f)\n", retPoint[0],retPoint[1],retPoint[2]); - #endif - - - -} - -/*Compute point and normal - *see the head of inDoDomain2WithDerivs - *for the meaning of the arguments - */ -void OpenGLSurfaceEvaluator::inDoEvalCoord2NOGE_BU(REAL u, REAL v, - REAL *retPoint, REAL *retNormal) -{ - - REAL du[4]; - REAL dv[4]; - - - assert(global_ev_k>=3 && global_ev_k <= 4); - /*compute homegeneous point and partial derivatives*/ -// inPreEvaluateBU(global_ev_k, global_ev_uorder, global_ev_vorder, (u-global_ev_u1)/(global_ev_u2-global_ev_u1), global_ev_ctlPoints); - inDoDomain2WithDerivsBU(global_ev_k, u, v, global_ev_u1, global_ev_u2, global_ev_uorder, global_ev_v1, global_ev_v2, global_ev_vorder, global_ev_ctlPoints, retPoint, du, dv); - - -#ifdef AVOID_ZERO_NORMAL - - if(myabs(dv[0]) <= MYZERO && myabs(dv[1]) <= MYZERO && myabs(dv[2]) <= MYZERO) - { - - REAL tempdu[4]; - REAL tempdata[4]; - REAL u1 = global_ev_u1; - REAL u2 = global_ev_u2; - if(u-MYDELTA*(u2-u1) < u1) - u = u+ MYDELTA*(u2-u1); - else - u = u-MYDELTA*(u2-u1); - inDoDomain2WithDerivs(global_ev_k, u,v,global_ev_u1, global_ev_u2, global_ev_uorder, global_ev_v1, global_ev_v2, global_ev_vorder, global_ev_ctlPoints, tempdata, tempdu, dv); - } - if(myabs(du[0]) <= MYZERO && myabs(du[1]) <= MYZERO && myabs(du[2]) <= MYZERO) - { - REAL tempdv[4]; - REAL tempdata[4]; - REAL v1 = global_ev_v1; - REAL v2 = global_ev_v2; - if(v-MYDELTA*(v2-v1) < v1) - v = v+ MYDELTA*(v2-v1); - else - v = v-MYDELTA*(v2-v1); - inDoDomain2WithDerivs(global_ev_k, u,v,global_ev_u1, global_ev_u2, global_ev_uorder, global_ev_v1, global_ev_v2, global_ev_vorder, global_ev_ctlPoints, tempdata, du, tempdv); - } -#endif - - /*compute normal*/ - switch(global_ev_k){ - case 3: - inComputeNormal2(du, dv, retNormal); - break; - case 4: - inComputeFirstPartials(retPoint, du, dv); - inComputeNormal2(du, dv, retNormal); - /*transform the homegeneous coordinate of retPoint into inhomogenous one*/ - retPoint[0] /= retPoint[3]; - retPoint[1] /= retPoint[3]; - retPoint[2] /= retPoint[3]; - break; - } -} - -/*Compute point and normal - *see the head of inDoDomain2WithDerivs - *for the meaning of the arguments - */ -void OpenGLSurfaceEvaluator::inDoEvalCoord2NOGE_BV(REAL u, REAL v, - REAL *retPoint, REAL *retNormal) -{ - - REAL du[4]; - REAL dv[4]; - - - assert(global_ev_k>=3 && global_ev_k <= 4); - /*compute homegeneous point and partial derivatives*/ -// inPreEvaluateBV(global_ev_k, global_ev_uorder, global_ev_vorder, (v-global_ev_v1)/(global_ev_v2-global_ev_v1), global_ev_ctlPoints); - - inDoDomain2WithDerivsBV(global_ev_k, u, v, global_ev_u1, global_ev_u2, global_ev_uorder, global_ev_v1, global_ev_v2, global_ev_vorder, global_ev_ctlPoints, retPoint, du, dv); - - -#ifdef AVOID_ZERO_NORMAL - - if(myabs(dv[0]) <= MYZERO && myabs(dv[1]) <= MYZERO && myabs(dv[2]) <= MYZERO) - { - - REAL tempdu[4]; - REAL tempdata[4]; - REAL u1 = global_ev_u1; - REAL u2 = global_ev_u2; - if(u-MYDELTA*(u2-u1) < u1) - u = u+ MYDELTA*(u2-u1); - else - u = u-MYDELTA*(u2-u1); - inDoDomain2WithDerivs(global_ev_k, u,v,global_ev_u1, global_ev_u2, global_ev_uorder, global_ev_v1, global_ev_v2, global_ev_vorder, global_ev_ctlPoints, tempdata, tempdu, dv); - } - if(myabs(du[0]) <= MYZERO && myabs(du[1]) <= MYZERO && myabs(du[2]) <= MYZERO) - { - REAL tempdv[4]; - REAL tempdata[4]; - REAL v1 = global_ev_v1; - REAL v2 = global_ev_v2; - if(v-MYDELTA*(v2-v1) < v1) - v = v+ MYDELTA*(v2-v1); - else - v = v-MYDELTA*(v2-v1); - inDoDomain2WithDerivs(global_ev_k, u,v,global_ev_u1, global_ev_u2, global_ev_uorder, global_ev_v1, global_ev_v2, global_ev_vorder, global_ev_ctlPoints, tempdata, du, tempdv); - } -#endif - - /*compute normal*/ - switch(global_ev_k){ - case 3: - inComputeNormal2(du, dv, retNormal); - break; - case 4: - inComputeFirstPartials(retPoint, du, dv); - inComputeNormal2(du, dv, retNormal); - /*transform the homegeneous coordinate of retPoint into inhomogenous one*/ - retPoint[0] /= retPoint[3]; - retPoint[1] /= retPoint[3]; - retPoint[2] /= retPoint[3]; - break; - } -} - - -/*Compute point and normal - *see the head of inDoDomain2WithDerivs - *for the meaning of the arguments - */ -void OpenGLSurfaceEvaluator::inDoEvalCoord2NOGE(REAL u, REAL v, - REAL *retPoint, REAL *retNormal) -{ - - REAL du[4]; - REAL dv[4]; - - - assert(global_ev_k>=3 && global_ev_k <= 4); - /*compute homegeneous point and partial derivatives*/ - inDoDomain2WithDerivs(global_ev_k, u, v, global_ev_u1, global_ev_u2, global_ev_uorder, global_ev_v1, global_ev_v2, global_ev_vorder, global_ev_ctlPoints, retPoint, du, dv); - - -#ifdef AVOID_ZERO_NORMAL - - if(myabs(dv[0]) <= MYZERO && myabs(dv[1]) <= MYZERO && myabs(dv[2]) <= MYZERO) - { - - REAL tempdu[4]; - REAL tempdata[4]; - REAL u1 = global_ev_u1; - REAL u2 = global_ev_u2; - if(u-MYDELTA*(u2-u1) < u1) - u = u+ MYDELTA*(u2-u1); - else - u = u-MYDELTA*(u2-u1); - inDoDomain2WithDerivs(global_ev_k, u,v,global_ev_u1, global_ev_u2, global_ev_uorder, global_ev_v1, global_ev_v2, global_ev_vorder, global_ev_ctlPoints, tempdata, tempdu, dv); - } - if(myabs(du[0]) <= MYZERO && myabs(du[1]) <= MYZERO && myabs(du[2]) <= MYZERO) - { - REAL tempdv[4]; - REAL tempdata[4]; - REAL v1 = global_ev_v1; - REAL v2 = global_ev_v2; - if(v-MYDELTA*(v2-v1) < v1) - v = v+ MYDELTA*(v2-v1); - else - v = v-MYDELTA*(v2-v1); - inDoDomain2WithDerivs(global_ev_k, u,v,global_ev_u1, global_ev_u2, global_ev_uorder, global_ev_v1, global_ev_v2, global_ev_vorder, global_ev_ctlPoints, tempdata, du, tempdv); - } -#endif - - /*compute normal*/ - switch(global_ev_k){ - case 3: - inComputeNormal2(du, dv, retNormal); - break; - case 4: - inComputeFirstPartials(retPoint, du, dv); - inComputeNormal2(du, dv, retNormal); - /*transform the homegeneous coordinate of retPoint into inhomogenous one*/ - retPoint[0] /= retPoint[3]; - retPoint[1] /= retPoint[3]; - retPoint[2] /= retPoint[3]; - break; - } -// glNormal3fv(retNormal); -// glVertex3fv(retPoint); -} - -void OpenGLSurfaceEvaluator::inPreEvaluateBV(int k, int uorder, int vorder, REAL vprime, REAL *baseData) -{ - int j,row,col; - REAL p, pdv; - REAL *data; - - if(global_vprime != vprime || global_vorder != vorder) { - inPreEvaluateWithDeriv(vorder, vprime, global_vcoeff, global_vcoeffDeriv); - global_vprime = vprime; - global_vorder = vorder; - } - - for(j=0; j=1 - *This code is copied from opengl/soft/so_eval.c:PreEvaluate - */ -void OpenGLSurfaceEvaluator::inPreEvaluate(int order, REAL vprime, REAL *coeff) -{ - int i, j; - REAL oldval, temp; - REAL oneMinusvprime; - - /* - * Minor optimization - * Compute orders 1 and 2 outright, and set coeff[0], coeff[1] to - * their i==1 loop values to avoid the initialization and the i==1 loop. - */ - if (order == 1) { - coeff[0] = 1.0; - return; - } - - oneMinusvprime = 1-vprime; - coeff[0] = oneMinusvprime; - coeff[1] = vprime; - if (order == 2) return; - - for (i = 2; i < order; i++) { - oldval = coeff[0] * vprime; - coeff[0] = oneMinusvprime * coeff[0]; - for (j = 1; j < i; j++) { - temp = oldval; - oldval = coeff[j] * vprime; - coeff[j] = temp + oneMinusvprime * coeff[j]; - } - coeff[j] = oldval; - } -} - -/* - *compute the Bezier polynomials C[n,j](v) and derivatives for all j at v with - *return values stored in coeff[] and coeffDeriv[]. - *see the head of function inPreEvaluate for the definition of C[n,j](v) - *and how to compute the values. - *The algorithm to compute the derivative is: - * dC[0,0](v) = 0. - * dC[n,j](v) = n*(dC[n-1,j-1](v) - dC[n-1,j](v)). - * - *This code is copied from opengl/soft/so_eval.c:PreEvaluateWidthDeriv - */ -void OpenGLSurfaceEvaluator::inPreEvaluateWithDeriv(int order, REAL vprime, - REAL *coeff, REAL *coeffDeriv) -{ - int i, j; - REAL oldval, temp; - REAL oneMinusvprime; - - oneMinusvprime = 1-vprime; - /* - * Minor optimization - * Compute orders 1 and 2 outright, and set coeff[0], coeff[1] to - * their i==1 loop values to avoid the initialization and the i==1 loop. - */ - if (order == 1) { - coeff[0] = 1.0; - coeffDeriv[0] = 0.0; - return; - } else if (order == 2) { - coeffDeriv[0] = -1.0; - coeffDeriv[1] = 1.0; - coeff[0] = oneMinusvprime; - coeff[1] = vprime; - return; - } - coeff[0] = oneMinusvprime; - coeff[1] = vprime; - for (i = 2; i < order - 1; i++) { - oldval = coeff[0] * vprime; - coeff[0] = oneMinusvprime * coeff[0]; - for (j = 1; j < i; j++) { - temp = oldval; - oldval = coeff[j] * vprime; - coeff[j] = temp + oneMinusvprime * coeff[j]; - } - coeff[j] = oldval; - } - coeffDeriv[0] = -coeff[0]; - /* - ** Minor optimization: - ** Would make this a "for (j=1; j=1 - *n_lower >=1 - */ -void OpenGLSurfaceEvaluator::inEvalUStrip(int n_upper, REAL v_upper, REAL* upper_val, int n_lower, REAL v_lower, REAL* lower_val) -{ - int i,j,k,l; - REAL leftMostV[2]; - typedef REAL REAL3[3]; - - REAL3* upperXYZ = (REAL3*) malloc(sizeof(REAL3)*n_upper); - assert(upperXYZ); - REAL3* upperNormal = (REAL3*) malloc(sizeof(REAL3) * n_upper); - assert(upperNormal); - REAL3* lowerXYZ = (REAL3*) malloc(sizeof(REAL3)*n_lower); - assert(lowerXYZ); - REAL3* lowerNormal = (REAL3*) malloc(sizeof(REAL3) * n_lower); - assert(lowerNormal); - - inEvalULine(n_upper, v_upper, upper_val, 1, upperXYZ, upperNormal); - inEvalULine(n_lower, v_lower, lower_val, 1, lowerXYZ, lowerNormal); - - - - REAL* leftMostXYZ; - REAL* leftMostNormal; - - /* - *the algorithm works by scanning from left to right. - *leftMostV: the left most of the remaining verteces (on both upper and lower). - * it could an element of upperVerts or lowerVerts. - *i: upperVerts[i] is the first vertex to the right of leftMostV on upper line *j: lowerVerts[j] is the first vertex to the right of leftMostV on lower line */ - - /*initialize i,j,and leftMostV - */ - if(upper_val[0] <= lower_val[0]) - { - i=1; - j=0; - - leftMostV[0] = upper_val[0]; - leftMostV[1] = v_upper; - leftMostXYZ = upperXYZ[0]; - leftMostNormal = upperNormal[0]; - } - else - { - i=0; - j=1; - - leftMostV[0] = lower_val[0]; - leftMostV[1] = v_lower; - - leftMostXYZ = lowerXYZ[0]; - leftMostNormal = lowerNormal[0]; - } - - /*the main loop. - *the invariance is that: - *at the beginning of each loop, the meaning of i,j,and leftMostV are - *maintained - */ - while(1) - { - if(i >= n_upper) /*case1: no more in upper*/ - { - if(j= n_lower) /*case2: no more in lower*/ - { - if(i=i; k--) /*reverse order for two-side lighting*/ - { - glNormal3fv(upperNormal[k]); - glVertex3fv(upperXYZ[k]); - } - - endtfan(); - } - break; /*exit the main loop*/ - } - else /* case3: neither is empty, plus the leftMostV, there is at least one triangle to output*/ - { - if(upper_val[i] <= lower_val[j]) - { - bgntfan(); - - glNormal3fv(lowerNormal[j]); - glVertex3fv(lowerXYZ[j]); - - /*find the last k>=i such that - *upperverts[k][0] <= lowerverts[j][0] - */ - k=i; - - while(k lower_val[j]) - break; - k++; - - } - k--; - - - for(l=k; l>=i; l--)/*the reverse is for two-side lighting*/ - { - glNormal3fv(upperNormal[l]); - glVertex3fv(upperXYZ[l]); - - } - glNormal3fv(leftMostNormal); - glVertex3fv(leftMostXYZ); - - endtfan(); - - /*update i and leftMostV for next loop - */ - i = k+1; - - leftMostV[0] = upper_val[k]; - leftMostV[1] = v_upper; - leftMostNormal = upperNormal[k]; - leftMostXYZ = upperXYZ[k]; - } - else /*upperVerts[i][0] > lowerVerts[j][0]*/ - { - bgntfan(); - glNormal3fv(upperNormal[i]); - glVertex3fv(upperXYZ[i]); - - glNormal3fv(leftMostNormal); - glVertex3fv(leftMostXYZ); - - - /*find the last k>=j such that - *lowerverts[k][0] < upperverts[i][0] - */ - k=j; - while(k< n_lower) - { - if(lower_val[k] >= upper_val[i]) - break; - glNormal3fv(lowerNormal[k]); - glVertex3fv(lowerXYZ[k]); - - k++; - } - endtfan(); - - /*update j and leftMostV for next loop - */ - j=k; - leftMostV[0] = lower_val[j-1]; - leftMostV[1] = v_lower; - - leftMostNormal = lowerNormal[j-1]; - leftMostXYZ = lowerXYZ[j-1]; - } - } - } - //clean up - free(upperXYZ); - free(lowerXYZ); - free(upperNormal); - free(lowerNormal); -} - -/*triangulate a strip bounded by two lines which are parallel to V-axis - *leftVerts: the verteces on the left line - *rightVertx: the verteces on the right line - *n_left >=1 - *n_right >=1 - */ -void OpenGLSurfaceEvaluator::inEvalVStrip(int n_left, REAL u_left, REAL* left_val, int n_right, REAL u_right, REAL* right_val) -{ - int i,j,k,l; - REAL botMostV[2]; - typedef REAL REAL3[3]; - - REAL3* leftXYZ = (REAL3*) malloc(sizeof(REAL3)*n_left); - assert(leftXYZ); - REAL3* leftNormal = (REAL3*) malloc(sizeof(REAL3) * n_left); - assert(leftNormal); - REAL3* rightXYZ = (REAL3*) malloc(sizeof(REAL3)*n_right); - assert(rightXYZ); - REAL3* rightNormal = (REAL3*) malloc(sizeof(REAL3) * n_right); - assert(rightNormal); - - inEvalVLine(n_left, u_left, left_val, 1, leftXYZ, leftNormal); - inEvalVLine(n_right, u_right, right_val, 1, rightXYZ, rightNormal); - - - - REAL* botMostXYZ; - REAL* botMostNormal; - - /* - *the algorithm works by scanning from bot to top. - *botMostV: the bot most of the remaining verteces (on both left and right). - * it could an element of leftVerts or rightVerts. - *i: leftVerts[i] is the first vertex to the top of botMostV on left line - *j: rightVerts[j] is the first vertex to the top of botMostV on rightline */ - - /*initialize i,j,and botMostV - */ - if(left_val[0] <= right_val[0]) - { - i=1; - j=0; - - botMostV[0] = u_left; - botMostV[1] = left_val[0]; - botMostXYZ = leftXYZ[0]; - botMostNormal = leftNormal[0]; - } - else - { - i=0; - j=1; - - botMostV[0] = u_right; - botMostV[1] = right_val[0]; - - botMostXYZ = rightXYZ[0]; - botMostNormal = rightNormal[0]; - } - - /*the main loop. - *the invariance is that: - *at the beginning of each loop, the meaning of i,j,and botMostV are - *maintained - */ - while(1) - { - if(i >= n_left) /*case1: no more in left*/ - { - if(j= n_right) /*case2: no more in right*/ - { - if(i=i; k--) /*reverse order for two-side lighting*/ - { - glNormal3fv(leftNormal[k]); - glVertex3fv(leftXYZ[k]); - } - - endtfan(); - } - break; /*exit the main loop*/ - } - else /* case3: neither is empty, plus the botMostV, there is at least one triangle to output*/ - { - if(left_val[i] <= right_val[j]) - { - bgntfan(); - - glNormal3fv(rightNormal[j]); - glVertex3fv(rightXYZ[j]); - - /*find the last k>=i such that - *leftverts[k][0] <= rightverts[j][0] - */ - k=i; - - while(k right_val[j]) - break; - k++; - - } - k--; - - - for(l=k; l>=i; l--)/*the reverse is for two-side lighting*/ - { - glNormal3fv(leftNormal[l]); - glVertex3fv(leftXYZ[l]); - - } - glNormal3fv(botMostNormal); - glVertex3fv(botMostXYZ); - - endtfan(); - - /*update i and botMostV for next loop - */ - i = k+1; - - botMostV[0] = u_left; - botMostV[1] = left_val[k]; - botMostNormal = leftNormal[k]; - botMostXYZ = leftXYZ[k]; - } - else /*left_val[i] > right_val[j])*/ - { - bgntfan(); - glNormal3fv(leftNormal[i]); - glVertex3fv(leftXYZ[i]); - - glNormal3fv(botMostNormal); - glVertex3fv(botMostXYZ); - - - /*find the last k>=j such that - *rightverts[k][0] < leftverts[i][0] - */ - k=j; - while(k< n_right) - { - if(right_val[k] >= left_val[i]) - break; - glNormal3fv(rightNormal[k]); - glVertex3fv(rightXYZ[k]); - - k++; - } - endtfan(); - - /*update j and botMostV for next loop - */ - j=k; - botMostV[0] = u_right; - botMostV[1] = right_val[j-1]; - - botMostNormal = rightNormal[j-1]; - botMostXYZ = rightXYZ[j-1]; - } - } - } - //clean up - free(leftXYZ); - free(leftXYZ); - free(rightNormal); - free(rightNormal); -} - -/*-----------------------begin evalMachine-------------------*/ -void OpenGLSurfaceEvaluator::inMap2fEM(int which, int k, - REAL ulower, - REAL uupper, - int ustride, - int uorder, - REAL vlower, - REAL vupper, - int vstride, - int vorder, - REAL *ctlPoints) -{ - int i,j,x; - surfEvalMachine *temp_em; - switch(which){ - case 0: //vertex - vertex_flag = 1; - temp_em = &em_vertex; - break; - case 1: //normal - normal_flag = 1; - temp_em = &em_normal; - break; - case 2: //color - color_flag = 1; - temp_em = &em_color; - break; - default: - texcoord_flag = 1; - temp_em = &em_texcoord; - break; - } - - REAL *data = temp_em->ctlPoints; - - temp_em->uprime = -1;//initilized - temp_em->vprime = -1; - - temp_em->k = k; - temp_em->u1 = ulower; - temp_em->u2 = uupper; - temp_em->ustride = ustride; - temp_em->uorder = uorder; - temp_em->v1 = vlower; - temp_em->v2 = vupper; - temp_em->vstride = vstride; - temp_em->vorder = vorder; - - /*copy the contrl points from ctlPoints to global_ev_ctlPoints*/ - for (i=0; iu2 == em->u1) || (em->v2 == em->v1)) - return; - the_uprime = (u - em->u1) / (em->u2 - em->u1); - the_vprime = (v - em->v1) / (em->v2 - em->v1); - - /* Compute coefficients for values and derivs */ - - /* Use already cached values if possible */ - if(em->uprime != the_uprime) { - inPreEvaluateWithDeriv(em->uorder, the_uprime, em->ucoeff, em->ucoeffDeriv); - em->uprime = the_uprime; - } - if (em->vprime != the_vprime) { - inPreEvaluateWithDeriv(em->vorder, the_vprime, em->vcoeff, em->vcoeffDeriv); - em->vprime = the_vprime; - } - - for (j = 0; j < em->k; j++) { - data=em->ctlPoints+j; - retPoint[j] = retdu[j] = retdv[j] = 0.0; - for (row = 0; row < em->uorder; row++) { - /* - ** Minor optimization. - ** The col == 0 part of the loop is extracted so we don't - ** have to initialize p and pdv to 0. - */ - p = em->vcoeff[0] * (*data); - pdv = em->vcoeffDeriv[0] * (*data); - data += em->k; - for (col = 1; col < em->vorder; col++) { - /* Incrementally build up p, pdv value */ - p += em->vcoeff[col] * (*data); - pdv += em->vcoeffDeriv[col] * (*data); - data += em->k; - } - /* Use p, pdv value to incrementally add up r, du, dv */ - retPoint[j] += em->ucoeff[row] * p; - retdu[j] += em->ucoeffDeriv[row] * p; - retdv[j] += em->ucoeff[row] * pdv; - } - } -} - -void OpenGLSurfaceEvaluator::inDoDomain2EM(surfEvalMachine *em, REAL u, REAL v, - REAL *retPoint) -{ - int j, row, col; - REAL the_uprime; - REAL the_vprime; - REAL p; - REAL *data; - - if((em->u2 == em->u1) || (em->v2 == em->v1)) - return; - the_uprime = (u - em->u1) / (em->u2 - em->u1); - the_vprime = (v - em->v1) / (em->v2 - em->v1); - - /* Compute coefficients for values and derivs */ - - /* Use already cached values if possible */ - if(em->uprime != the_uprime) { - inPreEvaluate(em->uorder, the_uprime, em->ucoeff); - em->uprime = the_uprime; - } - if (em->vprime != the_vprime) { - inPreEvaluate(em->vorder, the_vprime, em->vcoeff); - em->vprime = the_vprime; - } - - for (j = 0; j < em->k; j++) { - data=em->ctlPoints+j; - retPoint[j] = 0.0; - for (row = 0; row < em->uorder; row++) { - /* - ** Minor optimization. - ** The col == 0 part of the loop is extracted so we don't - ** have to initialize p and pdv to 0. - */ - p = em->vcoeff[0] * (*data); - data += em->k; - for (col = 1; col < em->vorder; col++) { - /* Incrementally build up p, pdv value */ - p += em->vcoeff[col] * (*data); - data += em->k; - } - /* Use p, pdv value to incrementally add up r, du, dv */ - retPoint[j] += em->ucoeff[row] * p; - } - } -} - - -void OpenGLSurfaceEvaluator::inDoEvalCoord2EM(REAL u, REAL v) -{ - REAL temp_vertex[5]; - REAL temp_normal[3]; - REAL temp_color[4]; - REAL temp_texcoord[4]; - - if(texcoord_flag) - { - inDoDomain2EM(&em_texcoord, u,v, temp_texcoord); - texcoordCallBack(temp_texcoord, userData); - } - if(color_flag) - { - inDoDomain2EM(&em_color, u,v, temp_color); - colorCallBack(temp_color, userData); - } - - if(normal_flag) //there is a normla map - { - inDoDomain2EM(&em_normal, u,v, temp_normal); - normalCallBack(temp_normal, userData); - - if(vertex_flag) - { - inDoDomain2EM(&em_vertex, u,v,temp_vertex); - if(em_vertex.k == 4) - { - temp_vertex[0] /= temp_vertex[3]; - temp_vertex[1] /= temp_vertex[3]; - temp_vertex[2] /= temp_vertex[3]; - } - temp_vertex[3]=u; - temp_vertex[4]=v; - vertexCallBack(temp_vertex, userData); - } - } - else if(auto_normal_flag) //no normal map but there is a normal callbackfunctin - { - REAL du[4]; - REAL dv[4]; - - /*compute homegeneous point and partial derivatives*/ - inDoDomain2WithDerivsEM(&em_vertex, u,v,temp_vertex,du,dv); - - if(em_vertex.k ==4) - inComputeFirstPartials(temp_vertex, du, dv); - -#ifdef AVOID_ZERO_NORMAL - if(myabs(dv[0]) <= MYZERO && myabs(dv[1]) <= MYZERO && myabs(dv[2]) <= MYZERO) - { - - REAL tempdu[4]; - REAL tempdata[4]; - REAL u1 = em_vertex.u1; - REAL u2 = em_vertex.u2; - if(u-MYDELTA*(u2-u1) < u1) - u = u+ MYDELTA*(u2-u1); - else - u = u-MYDELTA*(u2-u1); - inDoDomain2WithDerivsEM(&em_vertex,u,v, tempdata, tempdu, dv); - - if(em_vertex.k ==4) - inComputeFirstPartials(temp_vertex, du, dv); - } - else if(myabs(du[0]) <= MYZERO && myabs(du[1]) <= MYZERO && myabs(du[2]) <= MYZERO) - { - REAL tempdv[4]; - REAL tempdata[4]; - REAL v1 = em_vertex.v1; - REAL v2 = em_vertex.v2; - if(v-MYDELTA*(v2-v1) < v1) - v = v+ MYDELTA*(v2-v1); - else - v = v-MYDELTA*(v2-v1); - inDoDomain2WithDerivsEM(&em_vertex,u,v, tempdata, du, tempdv); - - if(em_vertex.k ==4) - inComputeFirstPartials(temp_vertex, du, dv); - } -#endif - - /*compute normal*/ - switch(em_vertex.k){ - case 3: - - inComputeNormal2(du, dv, temp_normal); - break; - case 4: - -// inComputeFirstPartials(temp_vertex, du, dv); - inComputeNormal2(du, dv, temp_normal); - - /*transform the homegeneous coordinate of retPoint into inhomogenous one*/ - temp_vertex[0] /= temp_vertex[3]; - temp_vertex[1] /= temp_vertex[3]; - temp_vertex[2] /= temp_vertex[3]; - break; - } - normalCallBack(temp_normal, userData); - temp_vertex[3] = u; - temp_vertex[4] = v; - vertexCallBack(temp_vertex, userData); - - }/*end if auto_normal*/ - else //no normal map, and no normal callback function - { - if(vertex_flag) - { - inDoDomain2EM(&em_vertex, u,v,temp_vertex); - if(em_vertex.k == 4) - { - temp_vertex[0] /= temp_vertex[3]; - temp_vertex[1] /= temp_vertex[3]; - temp_vertex[2] /= temp_vertex[3]; - } - temp_vertex[3] = u; - temp_vertex[4] = v; - vertexCallBack(temp_vertex, userData); - } - } -} - - -void OpenGLSurfaceEvaluator::inBPMEvalEM(bezierPatchMesh* bpm) -{ - int i,j,k; - float u,v; - - int ustride; - int vstride; - -#ifdef USE_LOD - if(bpm->bpatch != NULL) - { - bezierPatch* p=bpm->bpatch; - ustride = p->dimension * p->vorder; - vstride = p->dimension; - - glMap2f( (p->dimension == 3)? GL_MAP2_VERTEX_3 : GL_MAP2_VERTEX_4, - p->umin, - p->umax, - ustride, - p->uorder, - p->vmin, - p->vmax, - vstride, - p->vorder, - p->ctlpoints); - - -/* - inMap2fEM(0, p->dimension, - p->umin, - p->umax, - ustride, - p->uorder, - p->vmin, - p->vmax, - vstride, - p->vorder, - p->ctlpoints); -*/ - } -#else - - if(bpm->bpatch != NULL){ - bezierPatch* p = bpm->bpatch; - ustride = p->dimension * p->vorder; - vstride = p->dimension; - inMap2fEM(0, p->dimension, - p->umin, - p->umax, - ustride, - p->uorder, - p->vmin, - p->vmax, - vstride, - p->vorder, - p->ctlpoints); - } - if(bpm->bpatch_normal != NULL){ - bezierPatch* p = bpm->bpatch_normal; - ustride = p->dimension * p->vorder; - vstride = p->dimension; - inMap2fEM(1, p->dimension, - p->umin, - p->umax, - ustride, - p->uorder, - p->vmin, - p->vmax, - vstride, - p->vorder, - p->ctlpoints); - } - if(bpm->bpatch_color != NULL){ - bezierPatch* p = bpm->bpatch_color; - ustride = p->dimension * p->vorder; - vstride = p->dimension; - inMap2fEM(2, p->dimension, - p->umin, - p->umax, - ustride, - p->uorder, - p->vmin, - p->vmax, - vstride, - p->vorder, - p->ctlpoints); - } - if(bpm->bpatch_texcoord != NULL){ - bezierPatch* p = bpm->bpatch_texcoord; - ustride = p->dimension * p->vorder; - vstride = p->dimension; - inMap2fEM(3, p->dimension, - p->umin, - p->umax, - ustride, - p->uorder, - p->vmin, - p->vmax, - vstride, - p->vorder, - p->ctlpoints); - } -#endif - - - k=0; - for(i=0; iindex_length_array; i++) - { -#ifdef USE_LOD - if(bpm->type_array[i] == GL_POLYGON) //a mesh - { - GLfloat *temp = bpm->UVarray+k; - GLfloat u0 = temp[0]; - GLfloat v0 = temp[1]; - GLfloat u1 = temp[2]; - GLfloat v1 = temp[3]; - GLint nu = (GLint) ( temp[4]); - GLint nv = (GLint) ( temp[5]); - GLint umin = (GLint) ( temp[6]); - GLint vmin = (GLint) ( temp[7]); - GLint umax = (GLint) ( temp[8]); - GLint vmax = (GLint) ( temp[9]); - - glMapGrid2f(LOD_eval_level*nu, u0, u1, LOD_eval_level*nv, v0, v1); - glEvalMesh2(GL_FILL, LOD_eval_level*umin, LOD_eval_level*umax, LOD_eval_level*vmin, LOD_eval_level*vmax); - } - else - { - LOD_eval(bpm->length_array[i], bpm->UVarray+k, bpm->type_array[i], - 0 - ); - } - k+= 2*bpm->length_array[i]; - -#else //undef USE_LOD - -#ifdef CRACK_TEST -if( bpm->bpatch->umin == 2 && bpm->bpatch->umax == 3 - && bpm->bpatch->vmin ==2 && bpm->bpatch->vmax == 3) -{ -REAL vertex[4]; -REAL normal[4]; -#ifdef DEBUG -printf("***number ****1\n"); -#endif - -beginCallBack(GL_QUAD_STRIP, NULL); -inDoEvalCoord2EM(3.0, 3.0); -inDoEvalCoord2EM(2.0, 3.0); -inDoEvalCoord2EM(3.0, 2.7); -inDoEvalCoord2EM(2.0, 2.7); -inDoEvalCoord2EM(3.0, 2.0); -inDoEvalCoord2EM(2.0, 2.0); -endCallBack(NULL); - -beginCallBack(GL_TRIANGLE_STRIP, NULL); -inDoEvalCoord2EM(2.0, 3.0); -inDoEvalCoord2EM(2.0, 2.0); -inDoEvalCoord2EM(2.0, 2.7); -endCallBack(NULL); - -} -if( bpm->bpatch->umin == 1 && bpm->bpatch->umax == 2 - && bpm->bpatch->vmin ==2 && bpm->bpatch->vmax == 3) -{ -#ifdef DEBUG -printf("***number 3\n"); -#endif -beginCallBack(GL_QUAD_STRIP, NULL); -inDoEvalCoord2EM(2.0, 3.0); -inDoEvalCoord2EM(1.0, 3.0); -inDoEvalCoord2EM(2.0, 2.3); -inDoEvalCoord2EM(1.0, 2.3); -inDoEvalCoord2EM(2.0, 2.0); -inDoEvalCoord2EM(1.0, 2.0); -endCallBack(NULL); - -beginCallBack(GL_TRIANGLE_STRIP, NULL); -inDoEvalCoord2EM(2.0, 2.3); -inDoEvalCoord2EM(2.0, 2.0); -inDoEvalCoord2EM(2.0, 3.0); -endCallBack(NULL); - -} -return; -#endif //CRACK_TEST - - beginCallBack(bpm->type_array[i], userData); - - for(j=0; jlength_array[i]; j++) - { - u = bpm->UVarray[k]; - v = bpm->UVarray[k+1]; -#ifdef USE_LOD - LOD_EVAL_COORD(u,v); -// glEvalCoord2f(u,v); -#else - -#ifdef GENERIC_TEST - float temp_normal[3]; - float temp_vertex[3]; - if(temp_signal == 0) - { - gTessVertexSphere(u,v, temp_normal, temp_vertex); -//printf("normal=(%f,%f,%f)\n", temp_normal[0], temp_normal[1], temp_normal[2])//printf("veretx=(%f,%f,%f)\n", temp_vertex[0], temp_vertex[1], temp_vertex[2]); - normalCallBack(temp_normal, userData); - vertexCallBack(temp_vertex, userData); - } - else if(temp_signal == 1) - { - gTessVertexCyl(u,v, temp_normal, temp_vertex); -//printf("normal=(%f,%f,%f)\n", temp_normal[0], temp_normal[1], temp_normal[2])//printf("veretx=(%f,%f,%f)\n", temp_vertex[0], temp_vertex[1], temp_vertex[2]); - normalCallBack(temp_normal, userData); - vertexCallBack(temp_vertex, userData); - } - else -#endif //GENERIC_TEST - - inDoEvalCoord2EM(u,v); - -#endif //USE_LOD - - k += 2; - } - endCallBack(userData); - -#endif //USE_LOD - } -} - -void OpenGLSurfaceEvaluator::inBPMListEvalEM(bezierPatchMesh* list) -{ - bezierPatchMesh* temp; - for(temp = list; temp != NULL; temp = temp->next) - { - inBPMEvalEM(temp); - } -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/mystdio.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/mystdio.h deleted file mode 100644 index 39d309c24d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/mystdio.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * mystdio.h - * - * $Date: 2001/03/19 17:52:02 $ $Revision: 1.3 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/mystdio.h,v 1.3 2001/03/19 17:52:02 pesco Exp $ - */ - -#ifndef __glumystdio_h_ -#define __glumystdio_h_ - -#ifdef STANDALONE -inline void dprintf( char *, ... ) { } -#endif - -#ifdef LIBRARYBUILD -#ifndef NDEBUG -#include -#define dprintf printf -#else -inline void dprintf( char *, ... ) { } -#endif -#endif - -#ifdef GLBUILD -inline void dprintf( char *, ... ) { } -#endif - -#ifndef NULL -#define NULL 0 -#endif - -#endif /* __glumystdio_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/mystdlib.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/mystdlib.h deleted file mode 100644 index 0ebbc1299f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/interface/mystdlib.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * mystdlib.h - * - * $Date: 2001/03/19 17:52:02 $ $Revision: 1.3 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/mystdlib.h,v 1.3 2001/03/19 17:52:02 pesco Exp $ - */ - -#ifndef __glumystdlib_h_ -#define __glumystdlib_h_ - -#ifdef STANDALONE -typedef unsigned int size_t; -extern "C" void abort( void ); -extern "C" void * malloc( size_t ); -extern "C" void free( void * ); -#endif - -#ifdef LIBRARYBUILD -#include -#endif - -#ifdef GLBUILD -typedef unsigned int size_t; -extern "C" void abort( void ); -extern "C" void * malloc( size_t ); -extern "C" void free( void * ); -#endif - -#endif /* __glumystdlib_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arc.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arc.cc deleted file mode 100644 index f795e00cd7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arc.cc +++ /dev/null @@ -1,347 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * arc.c++ - * - */ - -#include -#include "glimports.h" -#include "mystdio.h" -#include "myassert.h" -#include "arc.h" -#include "bin.h" -#include "bezierarc.h" -#include "pwlarc.h" -#include "simplemath.h" - -/* local preprocessor definitions */ -#define ZERO 0.00001/*0.000001*/ - -const int Arc::bezier_tag = (1<<13); -const int Arc::arc_tag = (1<<3); -const int Arc::tail_tag = (1<<6); - -/*-------------------------------------------------------------------------- - * makeSide - attach a pwl arc to an arc and mark it as a border arc - *-------------------------------------------------------------------------- - */ - -void -Arc::makeSide( PwlArc *pwl, arc_side side ) -{ - assert( pwl != 0); - assert( pwlArc == 0 ); - assert( pwl->npts > 0 ); - assert( pwl->pts != 0); - pwlArc = pwl; - clearbezier(); - setside( side ); -} - - -/*-------------------------------------------------------------------------- - * numpts - count number of points on arc loop - *-------------------------------------------------------------------------- - */ - -int -Arc::numpts( void ) -{ - Arc_ptr jarc = this; - int npts = 0; - do { - npts += jarc->pwlArc->npts; - jarc = jarc->next; - } while( jarc != this ); - return npts; -} - -/*-------------------------------------------------------------------------- - * markverts - mark each point with id of arc - *-------------------------------------------------------------------------- - */ - -void -Arc::markverts( void ) -{ - Arc_ptr jarc = this; - - do { - TrimVertex *p = jarc->pwlArc->pts; - for( int i=0; ipwlArc->npts; i++ ) - p[i].nuid = jarc->nuid; - jarc = jarc->next; - } while( jarc != this ); -} - -/*-------------------------------------------------------------------------- - * getextrema - find axis extrema on arc loop - *-------------------------------------------------------------------------- - */ - -void -Arc::getextrema( Arc_ptr extrema[4] ) -{ - REAL leftpt, botpt, rightpt, toppt; - - extrema[0] = extrema[1] = extrema[2] = extrema[3] = this; - - leftpt = rightpt = this->tail()[0]; - botpt = toppt = this->tail()[1]; - - for( Arc_ptr jarc = this->next; jarc != this; jarc = jarc->next ) { - if ( jarc->tail()[0] < leftpt || - (jarc->tail()[0] <= leftpt && jarc->rhead()[0]<=leftpt)) { - leftpt = jarc->pwlArc->pts->param[0]; - extrema[1] = jarc; - } - if ( jarc->tail()[0] > rightpt || - (jarc->tail()[0] >= rightpt && jarc->rhead()[0] >= rightpt)) { - rightpt = jarc->pwlArc->pts->param[0]; - extrema[3] = jarc; - } - if ( jarc->tail()[1] < botpt || - (jarc->tail()[1] <= botpt && jarc->rhead()[1] <= botpt )) { - botpt = jarc->pwlArc->pts->param[1]; - extrema[2] = jarc; - } - if ( jarc->tail()[1] > toppt || - (jarc->tail()[1] >= toppt && jarc->rhead()[1] >= toppt)) { - toppt = jarc->pwlArc->pts->param[1]; - extrema[0] = jarc; - } - } -} - - -/*------------------------------------------------------------------------- - * show - print to the stdout the vertices of a pwl arc - *------------------------------------------------------------------------- - */ - -void -Arc::show() -{ -#ifndef NDEBUG - dprintf( "\tPWLARC NP: %d FL: 1\n", pwlArc->npts ); - for( int i = 0; i < pwlArc->npts; i++ ) { - dprintf( "\t\tVERTEX %f %f\n", pwlArc->pts[i].param[0], - pwlArc->pts[i].param[1] ); - } -#endif -} - -/*------------------------------------------------------------------------- - * print - print out the vertices of all pwl arcs on a loop - *------------------------------------------------------------------------- - */ - -void -Arc::print( void ) -{ - Arc_ptr jarc = this; - -#ifndef NDEBUG - dprintf( "BGNTRIM\n" ); -#endif - do { - jarc->show( ); - jarc = jarc->next; - } while (jarc != this); -#ifndef NDEBUG - dprintf("ENDTRIM\n" ); -#endif -} - -/*------------------------------------------------------------------------- - * isDisconnected - check if tail of arc and head of prev meet - *------------------------------------------------------------------------- - */ - -int -Arc::isDisconnected( void ) -{ - if( pwlArc == 0 ) return 0; - if( prev->pwlArc == 0 ) return 0; - - REAL *p0 = tail(); - REAL *p1 = prev->rhead(); - - if( ((p0[0] - p1[0]) > ZERO) || ((p1[0] - p0[0]) > ZERO) || - ((p0[1] - p1[1]) > ZERO) || ((p1[1] - p0[1]) > ZERO) ) { -#ifndef NDEBUG - dprintf( "x coord = %f %f %f\n", p0[0], p1[0], p0[0] - p1[0] ); - dprintf( "y coord = %f %f %f\n", p0[1], p1[1], p0[1] - p1[1] ); -#endif - return 1; - } else { - /* average two points together */ - p0[0] = p1[0] = (p1[0] + p0[0]) * 0.5; - p0[1] = p1[1] = (p1[1] + p0[1]) * 0.5; - return 0; - } -} - -/*------------------------------------------------------------------------- - * neq_vert - assert that two 2D vertices are not equal - *------------------------------------------------------------------------- - */ - -inline static int -neq_vert( REAL *v1, REAL *v2 ) -{ - return ((v1[0] != v2[0]) || (v1[1] != v2[1] )) ? 1 : 0; -} - -/*------------------------------------------------------------------------- - * check - verify consistency of a loop, including - * 1) if pwl, no two consecutive vertices are identical - * 2) the circular link pointers are valid - * 3) the geometric info at the head and tail are consistent - *------------------------------------------------------------------------- - */ - -int -Arc::check( void ) -{ - if( this == 0 ) return 1; - Arc_ptr jarc = this; - do { - assert( (jarc->pwlArc != 0) || (jarc->bezierArc != 0) ); - - if (jarc->prev == 0 || jarc->next == 0) { -#ifndef NDEBUG - dprintf( "checkjarc:null next/prev pointer\n"); - jarc->print( ); -#endif - return 0; - } - - if (jarc->next->prev != jarc) { -#ifndef NDEBUG - dprintf( "checkjarc: pointer linkage screwed up\n"); - jarc->print( ); -#endif - return 0; - } - - if( jarc->pwlArc ) { -#ifndef NDEBUG - assert( jarc->pwlArc->npts >= 1 ); - assert( jarc->pwlArc->npts < 100000 ); -/* - for( int i=0; i < jarc->pwlArc->npts-1; i++ ) - assert( neq_vert( jarc->pwlArc->pts[i].param, - jarc->pwlArc->pts[i+1].param) ); -*/ -#endif - if( jarc->prev->pwlArc ) { - if( jarc->tail()[1] != jarc->prev->rhead()[1] ) { -#ifndef NDEBUG - dprintf( "checkjarc: geometric linkage screwed up 1\n"); - jarc->prev->show(); - jarc->show(); -#endif - return 0; - } - if( jarc->tail()[0] != jarc->prev->rhead()[0] ) { - -#ifndef NDEBUG - dprintf( "checkjarc: geometric linkage screwed up 2\n"); - jarc->prev->show(); - jarc->show(); -#endif - return 0; - } - } - if( jarc->next->pwlArc ) { - if( jarc->next->tail()[0] != jarc->rhead()[0] ) { -#ifndef NDEBUG - dprintf( "checkjarc: geometric linkage screwed up 3\n"); - jarc->show(); - jarc->next->show(); -#endif - return 0; - } - if( jarc->next->tail()[1] != jarc->rhead()[1] ) { -#ifndef NDEBUG - dprintf( "checkjarc: geometric linkage screwed up 4\n"); - jarc->show(); - jarc->next->show(); -#endif - return 0; - } - } - if( jarc->isbezier() ) { - assert( jarc->pwlArc->npts == 2 ); - assert( (jarc->pwlArc->pts[0].param[0] == \ - jarc->pwlArc->pts[1].param[0]) ||\ - (jarc->pwlArc->pts[0].param[1] == \ - jarc->pwlArc->pts[1].param[1]) ); - } - } - jarc = jarc->next; - } while (jarc != this); - return 1; -} - - -#define TOL 0.00001 - -inline long tooclose( REAL x, REAL y ) -{ - return (glu_abs(x-y) < TOL) ? 1 : 0; -} - - -/*-------------------------------------------------------------------------- - * append - append a jordan arc to a circularly linked list - *-------------------------------------------------------------------------- - */ - -Arc_ptr -Arc::append( Arc_ptr jarc ) -{ - if( jarc != 0 ) { - next = jarc->next; - prev = jarc; - next->prev = prev->next = this; - } else { - next = prev = this; - } - return this; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arc.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arc.h deleted file mode 100644 index b700a1e826..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arc.h +++ /dev/null @@ -1,139 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * arc.h - * - * $Date: 2001/08/07 17:34:11 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/arc.h,v 1.2 2001/08/07 17:34:11 brianp Exp $ - */ - -#ifndef __gluarc_h_ -#define __gluarc_h_ - -#include "myassert.h" -#include "bufpool.h" -#include "mystdio.h" -#include "types.h" -#include "pwlarc.h" -#include "trimvertex.h" - -class Bin; -class Arc; -struct BezierArc; - -typedef class Arc *Arc_ptr; - -enum arc_side { arc_none = 0, arc_right, arc_top, arc_left, arc_bottom }; - - -class Arc: public PooledObj { /* an arc, in two list, the trim list and bin */ - -public: - static const int bezier_tag; - static const int arc_tag; - static const int tail_tag; - Arc_ptr prev; /* trim list pointer */ - Arc_ptr next; /* trim list pointer */ - Arc_ptr link; /* bin pointers */ - BezierArc * bezierArc; /* associated bezier arc */ - PwlArc * pwlArc; /* associated pwl arc */ - long type; /* curve type */ - long nuid; - - inline Arc( Arc *, PwlArc * ); - inline Arc( arc_side, long ); - - Arc_ptr append( Arc_ptr ); - int check( void ); - int isMonotone( void ); - int isDisconnected( void ); - int numpts( void ); - void markverts( void ); - void getextrema( Arc_ptr[4] ); - void print( void ); - void show( void ); - void makeSide( PwlArc *, arc_side ); - inline int isTessellated() { return pwlArc ? 1 : 0; } - inline long isbezier() { return type & bezier_tag; } - inline void setbezier() { type |= bezier_tag; } - inline void clearbezier() { type &= ~bezier_tag; } - inline long npts() { return pwlArc->npts; } - inline TrimVertex * pts() { return pwlArc->pts; } - inline REAL * tail() { return pwlArc->pts[0].param; } - inline REAL * head() { return next->pwlArc->pts[0].param; } - inline REAL * rhead() { return pwlArc->pts[pwlArc->npts-1].param; } - inline long ismarked() { return type & arc_tag; } - inline void setmark() { type |= arc_tag; } - inline void clearmark() { type &= (~arc_tag); } - inline void clearside() { type &= ~(0x7 << 8); } - inline void setside( arc_side s ) { clearside(); type |= (((long)s)<<8); } - inline arc_side getside() { return (arc_side) ((type>>8) & 0x7); } - inline int getitail() { return type & tail_tag; } - inline void setitail() { type |= tail_tag; } - inline void clearitail() { type &= (~tail_tag); } -}; - -/*-------------------------------------------------------------------------- - * Arc - initialize a new Arc with the same type and uid of - * a given Arc and a given pwl arc - *-------------------------------------------------------------------------- - */ - -inline -Arc::Arc( Arc *j, PwlArc *p ) -{ - bezierArc = NULL; - pwlArc = p; - type = j->type; - nuid = j->nuid; -} - -/*-------------------------------------------------------------------------- - * Arc - initialize a new Arc with the same type and uid of - * a given Arc and a given pwl arc - *-------------------------------------------------------------------------- - */ - -inline -Arc::Arc( arc_side side, long _nuid ) -{ - bezierArc = NULL; - pwlArc = NULL; - type = 0; - setside( side ); - nuid = _nuid; -} - -#endif /* __gluarc_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arcsorter.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arcsorter.cc deleted file mode 100644 index 0737569a0d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arcsorter.cc +++ /dev/null @@ -1,174 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * arcsorter.c++ - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/arcsorter.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#ifndef __gluarcsorter_c_ -#define __gluarcsorter_c_ - -#include "glimports.h" -#include "arc.h" -#include "arcsorter.h" -#include "subdivider.h" - -ArcSorter::ArcSorter(Subdivider &s) : Sorter( sizeof( Arc ** ) ), subdivider(s) -{ -} - -int -ArcSorter::qscmp( char *, char * ) -{ - dprintf( "ArcSorter::qscmp: pure virtual called\n" ); - return 0; -} - -void -ArcSorter::qsort( Arc **a, int n ) -{ - Sorter::qsort( (void *) a, n ); -} - -void -ArcSorter::qsexc( char *i, char *j )// i<-j, j<-i -{ - Arc **jarc1 = (Arc **) i; - Arc **jarc2 = (Arc **) j; - Arc *tmp = *jarc1; - *jarc1 = *jarc2; - *jarc2 = tmp; -} - -void -ArcSorter::qstexc( char *i, char *j, char *k )// i<-k, k<-j, j<-i -{ - Arc **jarc1 = (Arc **) i; - Arc **jarc2 = (Arc **) j; - Arc **jarc3 = (Arc **) k; - Arc *tmp = *jarc1; - *jarc1 = *jarc3; - *jarc3 = *jarc2; - *jarc2 = tmp; -} - - -ArcSdirSorter::ArcSdirSorter( Subdivider &s ) : ArcSorter(s) -{ -} - -int -ArcSdirSorter::qscmp( char *i, char *j ) -{ - Arc *jarc1 = *(Arc **) i; - Arc *jarc2 = *(Arc **) j; - - int v1 = (jarc1->getitail() ? 0 : (jarc1->pwlArc->npts - 1)); - int v2 = (jarc2->getitail() ? 0 : (jarc2->pwlArc->npts - 1)); - - REAL diff = jarc1->pwlArc->pts[v1].param[1] - - jarc2->pwlArc->pts[v2].param[1]; - - if( diff < 0.0) - return -1; - else if( diff > 0.0) - return 1; - else { - if( v1 == 0 ) { - if( jarc2->tail()[0] < jarc1->tail()[0] ) { - return subdivider.ccwTurn_sl( jarc2, jarc1 ) ? 1 : -1; - } else { - return subdivider.ccwTurn_sr( jarc2, jarc1 ) ? -1 : 1; - } - } else { - if( jarc2->head()[0] < jarc1->head()[0] ) { - return subdivider.ccwTurn_sl( jarc1, jarc2 ) ? -1 : 1; - } else { - return subdivider.ccwTurn_sr( jarc1, jarc2 ) ? 1 : -1; - } - } - } -} - -ArcTdirSorter::ArcTdirSorter( Subdivider &s ) : ArcSorter(s) -{ -} - -/*---------------------------------------------------------------------------- - * ArcTdirSorter::qscmp - - * compare two axis monotone arcs that are incident - * to the line T == compare_value. Determine which of the - * two intersects that line with a LESSER S value. If - * jarc1 does, return 1. If jarc2 does, return -1. - *---------------------------------------------------------------------------- - */ -int -ArcTdirSorter::qscmp( char *i, char *j ) -{ - Arc *jarc1 = *(Arc **) i; - Arc *jarc2 = *(Arc **) j; - - int v1 = (jarc1->getitail() ? 0 : (jarc1->pwlArc->npts - 1)); - int v2 = (jarc2->getitail() ? 0 : (jarc2->pwlArc->npts - 1)); - - REAL diff = jarc1->pwlArc->pts[v1].param[0] - - jarc2->pwlArc->pts[v2].param[0]; - - if( diff < 0.0) - return 1; - else if( diff > 0.0) - return -1; - else { - if( v1 == 0 ) { - if (jarc2->tail()[1] < jarc1->tail()[1]) { - return subdivider.ccwTurn_tl( jarc2, jarc1 ) ? 1 : -1; - } else { - return subdivider.ccwTurn_tr( jarc2, jarc1 ) ? -1 : 1; - } - } else { - if( jarc2->head()[1] < jarc1->head()[1] ) { - return subdivider.ccwTurn_tl( jarc1, jarc2 ) ? -1 : 1; - } else { - return subdivider.ccwTurn_tr( jarc1, jarc2 ) ? 1 : -1; - } - } - } -} - - - -#endif /* __gluarcsorter_c_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arcsorter.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arcsorter.h deleted file mode 100644 index 989f80a43c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arcsorter.h +++ /dev/null @@ -1,79 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * arcsorter.h - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/arcsorter.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#ifndef __gluarcsorter_h_ -#define __gluarcsorter_h_ - -#include "sorter.h" -#include "arcsorter.h" - -class Arc; -class Subdivider; - -class ArcSorter : private Sorter { -public: - ArcSorter(Subdivider &); - void qsort( Arc **a, int n ); -protected: - virtual int qscmp( char *, char * ); - Subdivider& subdivider; -private: - void qsexc( char *i, char *j ); // i<-j, j<-i - void qstexc( char *i, char *j, char *k ); // i<-k, k<-j, j<-i -}; - - -class ArcSdirSorter : public ArcSorter { -public: - ArcSdirSorter( Subdivider & ); -private: - int qscmp( char *, char * ); -}; - - -class ArcTdirSorter : public ArcSorter { -public: - ArcTdirSorter( Subdivider & ); -private: - int qscmp( char *, char * ); -}; - -#endif /* __gluarcsorter_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arctess.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arctess.cc deleted file mode 100644 index e633626de0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arctess.cc +++ /dev/null @@ -1,611 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * arctessellator.c++ - * - */ - -#include "glimports.h" -#include "mystdio.h" -#include "myassert.h" -#include "arctess.h" -#include "bufpool.h" -#include "simplemath.h" -#include "bezierarc.h" -#include "trimvertex.h" -#include "trimvertpool.h" - -#define NOELIMINATION - -#define steps_function(large, small, rate) (max(1, 1+ (int) ((large-small)/rate))); - -/*----------------------------------------------------------------------------- - * ArcTessellator - construct an ArcTessellator - *----------------------------------------------------------------------------- - */ - -ArcTessellator::ArcTessellator( TrimVertexPool& t, Pool& p ) - : pwlarcpool(p), trimvertexpool(t) -{ -} - -/*----------------------------------------------------------------------------- - * ~ArcTessellator - destroy an ArcTessellator - *----------------------------------------------------------------------------- - */ - -ArcTessellator::~ArcTessellator( void ) -{ -} - -/*----------------------------------------------------------------------------- - * bezier - construct a bezier arc and attach it to an Arc - *----------------------------------------------------------------------------- - */ - -void -ArcTessellator::bezier( Arc *arc, REAL s1, REAL s2, REAL t1, REAL t2 ) -{ - assert( arc != 0 ); - assert( ! arc->isTessellated() ); - -#ifndef NDEBUG - switch( arc->getside() ) { - case arc_left: - assert( s1 == s2 ); - assert( t2 < t1 ); - break; - case arc_right: - assert( s1 == s2 ); - assert( t1 < t2 ); - break; - case arc_top: - assert( t1 == t2 ); - assert( s2 < s1 ); - break; - case arc_bottom: - assert( t1 == t2 ); - assert( s1 < s2 ); - break; - case arc_none: - (void) abort(); - break; - } -#endif - - TrimVertex *p = trimvertexpool.get(2); - arc->pwlArc = new(pwlarcpool) PwlArc( 2, p ); - p[0].param[0] = s1; - p[0].param[1] = t1; - p[1].param[0] = s2; - p[1].param[1] = t2; - assert( (s1 == s2) || (t1 == t2) ); - arc->setbezier(); -} - - -/*----------------------------------------------------------------------------- - * pwl_left - construct a left boundary pwl arc and attach it to an arc - *----------------------------------------------------------------------------- - */ - -void -ArcTessellator::pwl_left( Arc *arc, REAL s, REAL t1, REAL t2, REAL rate ) -{ - assert( t2 < t1 ); - -/* if(rate <= 0.06) rate = 0.06;*/ -/* int nsteps = 1 + (int) ((t1 - t2) / rate ); */ - int nsteps = steps_function(t1, t2, rate); - - - REAL stepsize = (t1 - t2) / (REAL) nsteps; - - TrimVertex *newvert = trimvertexpool.get( nsteps+1 ); - int i; - for( i = nsteps; i > 0; i-- ) { - newvert[i].param[0] = s; - newvert[i].param[1] = t2; - t2 += stepsize; - } - newvert[i].param[0] = s; - newvert[i].param[1] = t1; - - arc->makeSide( new(pwlarcpool) PwlArc( nsteps+1, newvert ), arc_left ); -} - -/*----------------------------------------------------------------------------- - * pwl_right - construct a right boundary pwl arc and attach it to an arc - *----------------------------------------------------------------------------- - */ - -void -ArcTessellator::pwl_right( Arc *arc, REAL s, REAL t1, REAL t2, REAL rate ) -{ - assert( t1 < t2 ); - -/* if(rate <= 0.06) rate = 0.06;*/ - -/* int nsteps = 1 + (int) ((t2 - t1) / rate ); */ - int nsteps = steps_function(t2,t1,rate); - REAL stepsize = (t2 - t1) / (REAL) nsteps; - - TrimVertex *newvert = trimvertexpool.get( nsteps+1 ); - int i; - for( i = 0; i < nsteps; i++ ) { - newvert[i].param[0] = s; - newvert[i].param[1] = t1; - t1 += stepsize; - } - newvert[i].param[0] = s; - newvert[i].param[1] = t2; - - arc->makeSide( new(pwlarcpool) PwlArc( nsteps+1, newvert ), arc_right ); -} - - -/*----------------------------------------------------------------------------- - * pwl_top - construct a top boundary pwl arc and attach it to an arc - *----------------------------------------------------------------------------- - */ - -void -ArcTessellator::pwl_top( Arc *arc, REAL t, REAL s1, REAL s2, REAL rate ) -{ - assert( s2 < s1 ); - -/* if(rate <= 0.06) rate = 0.06;*/ - -/* int nsteps = 1 + (int) ((s1 - s2) / rate ); */ - int nsteps = steps_function(s1,s2,rate); - REAL stepsize = (s1 - s2) / (REAL) nsteps; - - TrimVertex *newvert = trimvertexpool.get( nsteps+1 ); - int i; - for( i = nsteps; i > 0; i-- ) { - newvert[i].param[0] = s2; - newvert[i].param[1] = t; - s2 += stepsize; - } - newvert[i].param[0] = s1; - newvert[i].param[1] = t; - - arc->makeSide( new(pwlarcpool) PwlArc( nsteps+1, newvert ), arc_top ); -} - -/*----------------------------------------------------------------------------- - * pwl_bottom - construct a bottom boundary pwl arc and attach it to an arc - *----------------------------------------------------------------------------- - */ - -void -ArcTessellator::pwl_bottom( Arc *arc, REAL t, REAL s1, REAL s2, REAL rate ) -{ - assert( s1 < s2 ); - -/* if(rate <= 0.06) rate = 0.06;*/ - -/* int nsteps = 1 + (int) ((s2 - s1) / rate ); */ - int nsteps = steps_function(s2,s1,rate); - REAL stepsize = (s2 - s1) / (REAL) nsteps; - - TrimVertex *newvert = trimvertexpool.get( nsteps+1 ); - int i; - for( i = 0; i < nsteps; i++ ) { - newvert[i].param[0] = s1; - newvert[i].param[1] = t; - s1 += stepsize; - } - newvert[i].param[0] = s2; - newvert[i].param[1] = t; - - arc->makeSide( new(pwlarcpool) PwlArc( nsteps+1, newvert ), arc_bottom ); -} - -/*----------------------------------------------------------------------------- - * pwl - construct a pwl arc and attach it to an arc - *----------------------------------------------------------------------------- - */ - -void -ArcTessellator::pwl( Arc *arc, REAL s1, REAL s2, REAL t1, REAL t2, REAL rate ) -{ - -/* if(rate <= 0.06) rate = 0.06;*/ - - int snsteps = 1 + (int) (glu_abs(s2 - s1) / rate ); - int tnsteps = 1 + (int) (glu_abs(t2 - t1) / rate ); - int nsteps = max(1,max( snsteps, tnsteps )); - - REAL sstepsize = (s2 - s1) / (REAL) nsteps; - REAL tstepsize = (t2 - t1) / (REAL) nsteps; - TrimVertex *newvert = trimvertexpool.get( nsteps+1 ); - long i; - for( i = 0; i < nsteps; i++ ) { - newvert[i].param[0] = s1; - newvert[i].param[1] = t1; - s1 += sstepsize; - t1 += tstepsize; - } - newvert[i].param[0] = s2; - newvert[i].param[1] = t2; - - /* arc->makeSide( new(pwlarcpool) PwlArc( nsteps+1, newvert ), arc_bottom ); */ - arc->pwlArc = new(pwlarcpool) PwlArc( nsteps+1, newvert ); - - arc->clearbezier(); - arc->clearside( ); -} - - -/*----------------------------------------------------------------------------- - * tessellateLinear - constuct a linear pwl arc and attach it to an Arc - *----------------------------------------------------------------------------- - */ - -void -ArcTessellator::tessellateLinear( Arc *arc, REAL geo_stepsize, REAL arc_stepsize, int isrational ) -{ - assert( arc->pwlArc == NULL ); - REAL s1, s2, t1, t2; - - //we don't need to scale by arc_stepsize if the trim curve - //is piecewise linear. Reason: In pwl_right, pwl_left, pwl_top, pwl_left, - //and pwl, the nsteps is computed by deltaU (or V) /stepsize. - //The quantity deltaU/arc_stepsize doesn't have any meaning. And - //it causes problems: see bug 517641 - REAL stepsize = geo_stepsize; /* * arc_stepsize*/; - - BezierArc *b = arc->bezierArc; - - if( isrational ) { - s1 = b->cpts[0] / b->cpts[2]; - t1 = b->cpts[1] / b->cpts[2]; - s2 = b->cpts[b->stride+0] / b->cpts[b->stride+2]; - t2 = b->cpts[b->stride+1] / b->cpts[b->stride+2]; - } else { - s1 = b->cpts[0]; - t1 = b->cpts[1]; - s2 = b->cpts[b->stride+0]; - t2 = b->cpts[b->stride+1]; - } - if( s1 == s2 ) - if( t1 < t2 ) - pwl_right( arc, s1, t1, t2, stepsize ); - else - pwl_left( arc, s1, t1, t2, stepsize ); - else if( t1 == t2 ) - if( s1 < s2 ) - pwl_bottom( arc, t1, s1, s2, stepsize ); - else - pwl_top( arc, t1, s1, s2, stepsize ); - else - pwl( arc, s1, s2, t1, t2, stepsize ); -} - -/*----------------------------------------------------------------------------- - * tessellateNonlinear - constuct a nonlinear pwl arc and attach it to an Arc - *----------------------------------------------------------------------------- - */ - -void -ArcTessellator::tessellateNonlinear( Arc *arc, REAL geo_stepsize, REAL arc_stepsize, int isrational ) -{ - assert( arc->pwlArc == NULL ); - - REAL stepsize = geo_stepsize * arc_stepsize; - - BezierArc *bezierArc = arc->bezierArc; - - REAL size; //bounding box size of the curve in UV - { - int i,j; - REAL min_u, min_v, max_u,max_v; - min_u = max_u = bezierArc->cpts[0]; - min_v = max_v = bezierArc->cpts[1]; - for(i=1, j=2; iorder; i++, j+= bezierArc->stride) - { - if(bezierArc->cpts[j] < min_u) - min_u = bezierArc->cpts[j]; - if(bezierArc->cpts[j] > max_u) - max_u = bezierArc->cpts[j]; - if(bezierArc->cpts[j+1] < min_v) - min_v = bezierArc->cpts[j+1]; - if(bezierArc->cpts[j+1] > max_v) - max_v = bezierArc->cpts[j+1]; - } - - size = max_u - min_u; - if(size < max_v - min_v) - size = max_v - min_v; - } - - /*int nsteps = 1 + (int) (1.0/stepsize);*/ - - int nsteps = (int) (size/stepsize); - if(nsteps <=0) - nsteps=1; - - TrimVertex *vert = trimvertexpool.get( nsteps+1 ); - REAL dp = 1.0/nsteps; - - - arc->pwlArc = new(pwlarcpool) PwlArc(); - arc->pwlArc->pts = vert; - - if( isrational ) { - REAL pow_u[MAXORDER], pow_v[MAXORDER], pow_w[MAXORDER]; - trim_power_coeffs( bezierArc, pow_u, 0 ); - trim_power_coeffs( bezierArc, pow_v, 1 ); - trim_power_coeffs( bezierArc, pow_w, 2 ); - - /* compute first point exactly */ - REAL *b = bezierArc->cpts; - vert->param[0] = b[0]/b[2]; - vert->param[1] = b[1]/b[2]; - - /* strength reduction on p = dp * step would introduce error */ - int step; -#ifndef NOELIMINATION - int ocanremove = 0; -#endif - register long order = bezierArc->order; - for( step=1, ++vert; stepparam[0] = u/w; - vert->param[1] = v/w; -#ifndef NOELIMINATION - REAL ds = glu_abs(vert[0].param[0] - vert[-1].param[0]); - REAL dt = glu_abs(vert[0].param[1] - vert[-1].param[1]); - int canremove = (dsstride; - vert->param[0] = b[0]/b[2]; - vert->param[1] = b[1]/b[2]; - - } else { - REAL pow_u[MAXORDER], pow_v[MAXORDER]; - trim_power_coeffs( bezierArc, pow_u, 0 ); - trim_power_coeffs( bezierArc, pow_v, 1 ); - - /* compute first point exactly */ - REAL *b = bezierArc->cpts; - vert->param[0] = b[0]; - vert->param[1] = b[1]; - - /* strength reduction on p = dp * step would introduce error */ - int step; -#ifndef NOELIMINATION - int ocanremove = 0; -#endif - register long order = bezierArc->order; - for( step=1, ++vert; steporder; i++ ) { - u = u * p + pow_u[i]; - v = v * p + pow_v[i]; - } - vert->param[0] = u; - vert->param[1] = v; -#ifndef NOELIMINATION - REAL ds = glu_abs(vert[0].param[0] - vert[-1].param[0]); - REAL dt = glu_abs(vert[0].param[1] - vert[-1].param[1]); - int canremove = (dsstride; - vert->param[0] = b[0]; - vert->param[1] = b[1]; - } - arc->pwlArc->npts = vert - arc->pwlArc->pts + 1; -/* - for( TrimVertex *vt=pwlArc->pts; vt != vert-1; vt++ ) { - if( tooclose( vt[0].param[0], vt[1].param[0] ) ) - vt[1].param[0] = vt[0].param[0]; - if( tooclose( vt[0].param[1], vt[1].param[1] ) ) - vt[1].param[1] = vt[0].param[1]; - } -*/ -} - -const REAL ArcTessellator::gl_Bernstein[][MAXORDER][MAXORDER] = { - { - {1, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 } - }, - { - {-1, 1, 0, 0, 0, 0, 0, 0 }, - {1, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 } - }, - { - {1, -2, 1, 0, 0, 0, 0, 0 }, - {-2, 2, 0, 0, 0, 0, 0, 0 }, - {1, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 } - }, - { - {-1, 3, -3, 1, 0, 0, 0, 0 }, - {3, -6, 3, 0, 0, 0, 0, 0 }, - {-3, 3, 0, 0, 0, 0, 0, 0 }, - {1, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 } - }, - { - {1, -4, 6, -4, 1, 0, 0, 0 }, - {-4, 12, -12, 4, 0, 0, 0, 0 }, - {6, -12, 6, 0, 0, 0, 0, 0 }, - {-4, 4, 0, 0, 0, 0, 0, 0 }, - {1, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 } - }, - { - {-1, 5, -10, 10, -5, 1, 0, 0 }, - {5, -20, 30, -20, 5, 0, 0, 0 }, - {-10, 30, -30, 10, 0, 0, 0, 0 }, - {10, -20, 10, 0, 0, 0, 0, 0 }, - {-5, 5, 0, 0, 0, 0, 0, 0 }, - {1, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 } - }, - { - {1, -6, 15, -20, 15, -6, 1, 0 }, - {-6, 30, -60, 60, -30, 6, 0, 0 }, - {15, -60, 90, -60, 15, 0, 0, 0 }, - {-20, 60, -60, 20, 0, 0, 0, 0 }, - {15, -30, 15, 0, 0, 0, 0, 0 }, - {-6, 6, 0, 0, 0, 0, 0, 0 }, - {1, 0, 0, 0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0, 0, 0, 0 } - }, - { - {-1, 7, -21, 35, -35, 21, -7, 1 }, - {7, -42, 105, -140, 105, -42, 7, 0 }, - {-21, 105, -210, 210, -105, 21, 0, 0 }, - {35, -140, 210, -140, 35, 0, 0, 0 }, - {-35, 105, -105, 35, 0, 0, 0, 0 }, - {21, -42, 21, 0, 0, 0, 0, 0 }, - {-7, 7, 0, 0, 0, 0, 0, 0 }, - {1, 0, 0, 0, 0, 0, 0, 0 } - }}; - - -/*----------------------------------------------------------------------------- - * trim_power_coeffs - compute power basis coefficients from bezier coeffients - *----------------------------------------------------------------------------- - */ -void -ArcTessellator::trim_power_coeffs( BezierArc *bez_arc, REAL *p, int coord ) -{ - register int stride = bez_arc->stride; - register int order = bez_arc->order; - register REAL *base = bez_arc->cpts + coord; - - REAL const (*mat)[MAXORDER][MAXORDER] = &gl_Bernstein[order-1]; - REAL const (*lrow)[MAXORDER] = &(*mat)[order]; - - /* WIN32 didn't like the following line within the for-loop */ - REAL const (*row)[MAXORDER] = &(*mat)[0]; - for( ; row != lrow; row++ ) { - register REAL s = 0.0; - register REAL *point = base; - register REAL const *mlast = *row + order; - for( REAL const *m = *row; m != mlast; m++, point += stride ) - s += *(m) * (*point); - *(p++) = s; - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arctess.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arctess.h deleted file mode 100644 index fc42ea5eb7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/arctess.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * arctess.h - * - * $Date: 2001/08/07 17:34:11 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/arctess.h,v 1.2 2001/08/07 17:34:11 brianp Exp $ - */ - -#ifndef __gluarctess_h_ -#define __gluarctess_h_ - -#include "defines.h" -#include "types.h" -#include "arc.h" - -struct BezierArc; -class Pool; -class TrimVertexPool; - -class ArcTessellator { -public: - ArcTessellator( TrimVertexPool&, Pool& ); - ~ArcTessellator( void ); - void bezier( Arc_ptr, REAL, REAL, REAL, REAL ); - void pwl( Arc_ptr, REAL, REAL, REAL, REAL, REAL ); - void pwl_left( Arc_ptr, REAL, REAL, REAL, REAL ); - void pwl_right( Arc_ptr, REAL, REAL, REAL, REAL ); - void pwl_top( Arc_ptr, REAL, REAL, REAL, REAL ); - void pwl_bottom( Arc_ptr, REAL, REAL, REAL, REAL ); - void tessellateLinear( Arc_ptr, REAL, REAL, int ); - void tessellateNonlinear( Arc_ptr, REAL, REAL, int ); -private: - static const REAL gl_Bernstein[][MAXORDER][MAXORDER]; - Pool& pwlarcpool; - TrimVertexPool& trimvertexpool; - static void trim_power_coeffs( BezierArc *, REAL[MAXORDER], int ); -}; - -#endif /* __gluarctess_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/backend.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/backend.cc deleted file mode 100644 index 97775a9768..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/backend.cc +++ /dev/null @@ -1,591 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * backend.c++ - * - * $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/backend.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $ - */ - -/* Bezier surface backend - - interprets display mode (wireframe,shaded,...) -*/ -#include -#include "glimports.h" -#include "mystdio.h" -#include "backend.h" -#include "basiccrveval.h" -#include "basicsurfeval.h" -#include "nurbsconsts.h" - -#define NOWIREFRAME - - -/*------------------------------------------------------------------------- - * bgnsurf - preamble to surface definition and evaluations - *------------------------------------------------------------------------- - */ -void -Backend::bgnsurf( int wiretris, int wirequads, long nuid ) -{ -/*#ifndef NOWIREFRAME*/ //need this for old version - wireframetris = wiretris; - wireframequads = wirequads; -/*#endif*/ - - /*in the spec, GLU_DISPLAY_MODE is either - * GLU_FILL - * GLU_OUTLINE_POLY - * GLU_OUTLINE_PATCH. - *In fact, GLU_FLL is has the same effect as - * set GL_FRONT_AND_BACK to be GL_FILL - * and GLU_OUTLINE_POLY is the same as set - * GL_FRONT_AND_BACK to be GL_LINE - *It is more efficient to do this once at the beginning of - *each surface than to do it for each primitive. - * The internal has more options: outline_triangle and outline_quad - *can be seperated. But since this is not in spec, and more importantly, - *this is not so useful, so we don't need to keep this option. - */ - - surfaceEvaluator.bgnmap2f( nuid ); - - if(wiretris) - surfaceEvaluator.polymode(N_MESHLINE); - else - surfaceEvaluator.polymode(N_MESHFILL); -} - -void -Backend::patch( REAL ulo, REAL uhi, REAL vlo, REAL vhi ) -{ - surfaceEvaluator.domain2f( ulo, uhi, vlo, vhi ); -} - -void -Backend::surfbbox( long type, REAL *from, REAL *to ) -{ - surfaceEvaluator.range2f( type, from, to ); -} - -/*------------------------------------------------------------------------- - * surfpts - pass a desription of a surface map - *------------------------------------------------------------------------- - */ -void -Backend::surfpts( - long type, /* geometry, color, texture, normal */ - REAL *pts, /* control points */ - long ustride, /* distance to next point in u direction */ - long vstride, /* distance to next point in v direction */ - int uorder, /* u parametric order */ - int vorder, /* v parametric order */ - REAL ulo, /* u lower bound */ - REAL uhi, /* u upper bound */ - REAL vlo, /* v lower bound */ - REAL vhi ) /* v upper bound */ -{ - surfaceEvaluator.map2f( type,ulo,uhi,ustride,uorder,vlo,vhi,vstride,vorder,pts ); - surfaceEvaluator.enable( type ); -} - -/*------------------------------------------------------------------------- - * surfgrid - define a lattice of points with origin and offset - *------------------------------------------------------------------------- - */ -void -Backend::surfgrid( REAL u0, REAL u1, long nu, REAL v0, REAL v1, long nv ) -{ - surfaceEvaluator.mapgrid2f( nu, u0, u1, nv, v0, v1 ); -} - -/*------------------------------------------------------------------------- - * surfmesh - evaluate a mesh of points on lattice - *------------------------------------------------------------------------- - */ -void -Backend::surfmesh( long u, long v, long n, long m ) -{ -#ifndef NOWIREFRAME - if( wireframequads ) { - long v0, v1; - long u0f = u, u1f = u+n; - long v0f = v, v1f = v+m; - long parity = (u & 1); - - for( v0 = v0f, v1 = v0f++ ; v0isGridVert() ) { - tmeshvert( v->g ); - } else { - tmeshvert( v->t ); - } -} - -void -Backend::tmeshvertNOGE(TrimVertex *t) -{ -// surfaceEvaluator.inDoEvalCoord2NOGE( t->param[0], t->param[1], temp, ttt); -#ifdef USE_OPTTT - surfaceEvaluator.inDoEvalCoord2NOGE( t->param[0], t->param[1], t->cache_point, t->cache_normal); -#endif -} - -//opt for a line with the same u. -void -Backend::tmeshvertNOGE_BU(TrimVertex *t) -{ -#ifdef USE_OPTTT - surfaceEvaluator.inDoEvalCoord2NOGE_BU( t->param[0], t->param[1], t->cache_point, t->cache_normal); -#endif -} - -//opt for a line with the same v. -void -Backend::tmeshvertNOGE_BV(TrimVertex *t) -{ -#ifdef USE_OPTTT - surfaceEvaluator.inDoEvalCoord2NOGE_BV( t->param[0], t->param[1], t->cache_point, t->cache_normal); -#endif -} - -void -Backend::preEvaluateBU(REAL u) -{ - surfaceEvaluator.inPreEvaluateBU_intfac(u); -} - -void -Backend::preEvaluateBV(REAL v) -{ - surfaceEvaluator.inPreEvaluateBV_intfac(v); -} - - -/*------------------------------------------------------------------------- - * tmeshvert - evaluate a point on a triangle mesh - *------------------------------------------------------------------------- - */ -void -Backend::tmeshvert( TrimVertex *t ) -{ - -#ifndef NOWIREFRAME - const long nuid = t->nuid; -#endif - const REAL u = t->param[0]; - const REAL v = t->param[1]; - -#ifndef NOWIREFRAME - npts++; - if( wireframetris ) { - if( npts >= 3 ) { - surfaceEvaluator.bgnclosedline(); - if( mesh[0][2] == 0 ) - surfaceEvaluator.evalcoord2f( mesh[0][3], mesh[0][0], mesh[0][1] ); - else - surfaceEvaluator.evalpoint2i( (long) mesh[0][0], (long) mesh[0][1] ); - if( mesh[1][2] == 0 ) - surfaceEvaluator.evalcoord2f( mesh[1][3], mesh[1][0], mesh[1][1] ); - else - surfaceEvaluator.evalpoint2i( (long) mesh[1][0], (long) mesh[1][1] ); - surfaceEvaluator.evalcoord2f( nuid, u, v ); - surfaceEvaluator.endclosedline(); - } - mesh[meshindex][0] = u; - mesh[meshindex][1] = v; - mesh[meshindex][2] = 0; - mesh[meshindex][3] = nuid; - meshindex = (meshindex+1) % 2; - } else { - surfaceEvaluator.evalcoord2f( nuid, u, v ); - } -#else - - surfaceEvaluator.evalcoord2f( 0, u, v ); -//for uninitial memory read surfaceEvaluator.evalcoord2f( nuid, u, v ); -#endif -} - -//the same as tmeshvert(trimvertex), for efficiency purpose -void -Backend::tmeshvert( REAL u, REAL v ) -{ -#ifndef NOWIREFRAME - const long nuid = 0; - - npts++; - if( wireframetris ) { - if( npts >= 3 ) { - surfaceEvaluator.bgnclosedline(); - if( mesh[0][2] == 0 ) - surfaceEvaluator.evalcoord2f( mesh[0][3], mesh[0][0], mesh[0][1] ); - else - surfaceEvaluator.evalpoint2i( (long) mesh[0][0], (long) mesh[0][1] ); - if( mesh[1][2] == 0 ) - surfaceEvaluator.evalcoord2f( mesh[1][3], mesh[1][0], mesh[1][1] ); - else - surfaceEvaluator.evalpoint2i( (long) mesh[1][0], (long) mesh[1][1] ); - surfaceEvaluator.evalcoord2f( nuid, u, v ); - surfaceEvaluator.endclosedline(); - } - mesh[meshindex][0] = u; - mesh[meshindex][1] = v; - mesh[meshindex][2] = 0; - mesh[meshindex][3] = nuid; - meshindex = (meshindex+1) % 2; - } else { - surfaceEvaluator.evalcoord2f( nuid, u, v ); - } -#else - - surfaceEvaluator.evalcoord2f( 0, u, v ); -#endif -} - -/*------------------------------------------------------------------------- - * tmeshvert - evaluate a grid point of a triangle mesh - *------------------------------------------------------------------------- - */ -void -Backend::tmeshvert( GridVertex *g ) -{ - const long u = g->gparam[0]; - const long v = g->gparam[1]; - -#ifndef NOWIREFRAME - npts++; - if( wireframetris ) { - if( npts >= 3 ) { - surfaceEvaluator.bgnclosedline(); - if( mesh[0][2] == 0 ) - surfaceEvaluator.evalcoord2f( (long) mesh[0][3], mesh[0][0], mesh[0][1] ); - else - surfaceEvaluator.evalpoint2i( (long) mesh[0][0], (long) mesh[0][1] ); - if( mesh[1][2] == 0 ) - surfaceEvaluator.evalcoord2f( (long) mesh[1][3], mesh[1][0], mesh[1][1] ); - else - surfaceEvaluator.evalpoint2i( (long) mesh[1][0], (long) mesh[1][1] ); - surfaceEvaluator.evalpoint2i( u, v ); - surfaceEvaluator.endclosedline(); - } - mesh[meshindex][0] = u; - mesh[meshindex][1] = v; - mesh[meshindex][2] = 1; - meshindex = (meshindex+1) % 2; - } else { - surfaceEvaluator.evalpoint2i( u, v ); - } -#else - surfaceEvaluator.evalpoint2i( u, v ); -#endif -} - -/*------------------------------------------------------------------------- - * swaptmesh - perform a swap of the triangle mesh pointers - *------------------------------------------------------------------------- - */ -void -Backend::swaptmesh( void ) -{ -#ifndef NOWIREFRAME - if( wireframetris ) { - meshindex = 1 - meshindex; - } else { - surfaceEvaluator.swaptmesh(); - } -#else - surfaceEvaluator.swaptmesh(); -#endif -} - -/*------------------------------------------------------------------------- - * endtmesh - postamble to triangle mesh - *------------------------------------------------------------------------- - */ -void -Backend::endtmesh( void ) -{ -#ifndef NOWIREFRAME - if( ! wireframetris ) - surfaceEvaluator.endtmesh(); -#else - surfaceEvaluator.endtmesh(); -/* surfaceEvaluator.polymode( N_MESHFILL );*/ -#endif -} - - -/*------------------------------------------------------------------------- - * bgnoutline - preamble to outlined rendering - *------------------------------------------------------------------------- - */ -void -Backend::bgnoutline( void ) -{ - surfaceEvaluator.bgnline(); -} - -/*------------------------------------------------------------------------- - * linevert - evaluate a point on an outlined contour - *------------------------------------------------------------------------- - */ -void -Backend::linevert( TrimVertex *t ) -{ - surfaceEvaluator.evalcoord2f( t->nuid, t->param[0], t->param[1] ); -} - -/*------------------------------------------------------------------------- - * linevert - evaluate a grid point of an outlined contour - *------------------------------------------------------------------------- - */ -void -Backend::linevert( GridVertex *g ) -{ - surfaceEvaluator.evalpoint2i( g->gparam[0], g->gparam[1] ); -} - -/*------------------------------------------------------------------------- - * endoutline - postamble to outlined rendering - *------------------------------------------------------------------------- - */ -void -Backend::endoutline( void ) -{ - surfaceEvaluator.endline(); -} - -/*------------------------------------------------------------------------- - * triangle - output a triangle - *------------------------------------------------------------------------- - */ -void -Backend::triangle( TrimVertex *a, TrimVertex *b, TrimVertex *c ) -{ -/* bgntmesh( "spittriangle" );*/ - bgntfan(); - tmeshvert( a ); - tmeshvert( b ); - tmeshvert( c ); - endtfan(); -/* endtmesh();*/ -} - -void -Backend::bgncurv( void ) -{ - curveEvaluator.bgnmap1f( 0 ); -} - -void -Backend::segment( REAL ulo, REAL uhi ) -{ - curveEvaluator.domain1f( ulo, uhi ); -} - -void -Backend::curvpts( - long type, /* geometry, color, texture, normal */ - REAL *pts, /* control points */ - long stride, /* distance to next point */ - int order, /* parametric order */ - REAL ulo, /* lower parametric bound */ - REAL uhi ) /* upper parametric bound */ - -{ - curveEvaluator.map1f( type, ulo, uhi, stride, order, pts ); - curveEvaluator.enable( type ); -} - -void -Backend::curvgrid( REAL u0, REAL u1, long nu ) -{ - curveEvaluator.mapgrid1f( nu, u0, u1 ); -} - -void -Backend::curvmesh( long from, long n ) -{ - curveEvaluator.mapmesh1f( N_MESHFILL, from, from+n ); -} - -void -Backend::curvpt(REAL u) -{ - curveEvaluator.evalcoord1f( 0, u ); -} - -void -Backend::bgnline( void ) -{ - curveEvaluator.bgnline(); -} - -void -Backend::endline( void ) -{ - curveEvaluator.endline(); -} - -void -Backend::endcurv( void ) -{ - curveEvaluator.endmap1f(); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/backend.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/backend.h deleted file mode 100644 index c1f00b1a01..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/backend.h +++ /dev/null @@ -1,119 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * backend.h - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/backend.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#ifndef __glubackend_h_ -#define __glubackend_h_ - -#include "trimvertex.h" -#include "gridvertex.h" -#include "gridtrimvertex.h" - -class BasicCurveEvaluator; -class BasicSurfaceEvaluator; - -class Backend { -private: - BasicCurveEvaluator& curveEvaluator; - BasicSurfaceEvaluator& surfaceEvaluator; -public: - Backend( BasicCurveEvaluator &c, BasicSurfaceEvaluator& e ) - : curveEvaluator(c), surfaceEvaluator(e) {} - - /* surface backend routines */ - void bgnsurf( int, int, long ); - void patch( REAL, REAL, REAL, REAL ); - void surfpts( long, REAL *, long, long, int, int, - REAL, REAL, REAL, REAL ); - void surfbbox( long, REAL *, REAL * ); - void surfgrid( REAL, REAL, long, REAL, REAL, long ); - void surfmesh( long, long, long, long ); - void bgntmesh( char * ); - void endtmesh( void ); - void swaptmesh( void ); - void tmeshvert( GridTrimVertex * ); - void tmeshvert( TrimVertex * ); - void tmeshvert( GridVertex * ); - void tmeshvert( REAL u, REAL v ); - void linevert( TrimVertex * ); - void linevert( GridVertex * ); - void bgnoutline( void ); - void endoutline( void ); - void endsurf( void ); - void triangle( TrimVertex*, TrimVertex*, TrimVertex* ); - - void bgntfan(); - void endtfan(); - void bgnqstrip(); - void endqstrip(); - void evalUStrip(int n_upper, REAL v_upper, REAL* upper_val, - int n_lower, REAL v_lower, REAL* lower_val - ); - void evalVStrip(int n_left, REAL u_left, REAL* left_val, - int n_right, REAL v_right, REAL* right_val - ); - void tmeshvertNOGE(TrimVertex *t); - void tmeshvertNOGE_BU(TrimVertex *t); - void tmeshvertNOGE_BV(TrimVertex *t); - void preEvaluateBU(REAL u); - void preEvaluateBV(REAL v); - - - /* curve backend routines */ - void bgncurv( void ); - void segment( REAL, REAL ); - void curvpts( long, REAL *, long, int, REAL, REAL ); - void curvgrid( REAL, REAL, long ); - void curvmesh( long, long ); - void curvpt( REAL ); - void bgnline( void ); - void endline( void ); - void endcurv( void ); -private: -#ifndef NOWIREFRAME - int wireframetris; - int wireframequads; - int npts; - REAL mesh[3][4]; - int meshindex; -#endif -}; - -#endif /* __glubackend_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/basiccrveval.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/basiccrveval.cc deleted file mode 100644 index c7e4282360..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/basiccrveval.cc +++ /dev/null @@ -1,138 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * basiccrveval.c++ - * - */ - -#include "mystdio.h" -#include "types.h" -#include "basiccrveval.h" - -void -BasicCurveEvaluator::domain1f( REAL, REAL ) -{ -#ifndef NDEBUG - dprintf( "domain1f\n" ); -#endif -} - -void -BasicCurveEvaluator::range1f( long , REAL *, REAL * ) -{ -#ifndef NDEBUG - dprintf( "range1f\n" ); -#endif -} - -void -BasicCurveEvaluator::enable( long ) -{ -#ifndef NDEBUG - dprintf( "enable\n" ); -#endif -} - -void -BasicCurveEvaluator::disable( long ) -{ -#ifndef NDEBUG - dprintf( "disable\n" ); -#endif -} - -void -BasicCurveEvaluator::bgnmap1f( long ) -{ -#ifndef NDEBUG - dprintf( "bgnmap1f\n" ); -#endif -} - -void -BasicCurveEvaluator::map1f( long, REAL, REAL, long, long, REAL * ) -{ -#ifndef NDEBUG - dprintf( "map1f\n" ); -#endif -} - -void -BasicCurveEvaluator::mapgrid1f( long, REAL, REAL ) -{ -#ifndef NDEBUG - dprintf( "mapgrid1f\n" ); -#endif -} - -void -BasicCurveEvaluator::mapmesh1f( long, long, long ) -{ -#ifndef NDEBUG - dprintf( "mapmesh1f\n" ); -#endif -} - -void -BasicCurveEvaluator::evalcoord1f( long, REAL ) -{ -#ifndef NDEBUG - dprintf( "evalcoord1f\n" ); -#endif -} - -void -BasicCurveEvaluator::endmap1f( void ) -{ -#ifndef NDEBUG - dprintf( "endmap1f\n" ); -#endif -} - -void -BasicCurveEvaluator::bgnline( void ) -{ -#ifndef NDEBUG - dprintf( "bgnline\n" ); -#endif -} - -void -BasicCurveEvaluator::endline( void ) -{ -#ifndef NDEBUG - dprintf( "endline\n" ); -#endif -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/basiccrveval.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/basiccrveval.h deleted file mode 100644 index 517b267e52..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/basiccrveval.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * basiccurveeval.h - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/basiccrveval.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#ifndef __glubasiccrveval_h_ -#define __glubasiccrveval_h_ - -#include "types.h" -#include "displaymode.h" -#include "cachingeval.h" - -class BasicCurveEvaluator : public CachingEvaluator { -public: - virtual void domain1f( REAL, REAL ); - virtual void range1f( long, REAL *, REAL * ); - - virtual void enable( long ); - virtual void disable( long ); - virtual void bgnmap1f( long ); - virtual void map1f( long, REAL, REAL, long, long, REAL * ); - virtual void mapgrid1f( long, REAL, REAL ); - virtual void mapmesh1f( long, long, long ); - virtual void evalcoord1f( long, REAL ); - virtual void endmap1f( void ); - - virtual void bgnline( void ); - virtual void endline( void ); -}; - -#endif /* __glubasiccrveval_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/basicsurfeval.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/basicsurfeval.cc deleted file mode 100644 index ff212bf0b4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/basicsurfeval.cc +++ /dev/null @@ -1,232 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * basicsurfaceevaluator.c++ - * - */ - -#include "mystdio.h" -#include "types.h" -#include "basicsurfeval.h" - -#ifdef __WATCOMC__ -#pragma warning 726 10 -#endif - -void -BasicSurfaceEvaluator::domain2f( REAL, REAL, REAL, REAL ) -{ -#ifndef NDEBUG - dprintf( "domain2f\n" ); -#endif -} - -void -BasicSurfaceEvaluator::polymode( long ) -{ -#ifndef NDEBUG - dprintf( "polymode\n" ); -#endif -} - -void -BasicSurfaceEvaluator::range2f( long type, REAL *from, REAL *to ) -{ -#ifndef NDEBUG - dprintf( "range2f type %ld, from (%g,%g), to (%g,%g)\n", - type, from[0], from[1], to[0], to[1] ); -#endif -} - -void -BasicSurfaceEvaluator::enable( long ) -{ -#ifndef NDEBUG - dprintf( "enable\n" ); -#endif -} - -void -BasicSurfaceEvaluator::disable( long ) -{ -#ifndef NDEBUG - dprintf( "disable\n" ); -#endif -} - -void -BasicSurfaceEvaluator::bgnmap2f( long ) -{ -#ifndef NDEBUG - dprintf( "bgnmap2f\n" ); -#endif -} - -void -BasicSurfaceEvaluator::endmap2f( void ) -{ -#ifndef NDEBUG - dprintf( "endmap2f\n" ); -#endif -} - -void -BasicSurfaceEvaluator::map2f( long, REAL, REAL, long, long, - REAL, REAL, long, long, - REAL * ) -{ -#ifndef NDEBUG - dprintf( "map2f\n" ); -#endif -} - -void -BasicSurfaceEvaluator::mapgrid2f( long, REAL, REAL, long, REAL, REAL ) -{ -#ifndef NDEBUG - dprintf( "mapgrid2f\n" ); -#endif -} - -void -BasicSurfaceEvaluator::mapmesh2f( long, long, long, long, long ) -{ -#ifndef NDEBUG - dprintf( "mapmesh2f\n" ); -#endif -} - -void -BasicSurfaceEvaluator::evalcoord2f( long, REAL, REAL ) -{ -#ifndef NDEBUG - dprintf( "evalcoord2f\n" ); -#endif -} - -void -BasicSurfaceEvaluator::evalpoint2i( long, long ) -{ -#ifndef NDEBUG - dprintf( "evalpoint2i\n" ); -#endif -} - -void -BasicSurfaceEvaluator::bgnline( void ) -{ -#ifndef NDEBUG - dprintf( "bgnline\n" ); -#endif -} - -void -BasicSurfaceEvaluator::endline( void ) -{ -#ifndef NDEBUG - dprintf( "endline\n" ); -#endif -} - -void -BasicSurfaceEvaluator::bgnclosedline( void ) -{ -#ifndef NDEBUG - dprintf( "bgnclosedline\n" ); -#endif -} - -void -BasicSurfaceEvaluator::endclosedline( void ) -{ -#ifndef NDEBUG - dprintf( "endclosedline\n" ); -#endif -} - -void -BasicSurfaceEvaluator::bgntfan( void ) -{ -#ifndef NDEBUG - dprintf( "bgntfan\n" ); -#endif -} - -void -BasicSurfaceEvaluator::endtfan( void ) -{ -} - - -void -BasicSurfaceEvaluator::bgntmesh( void ) -{ -#ifndef NDEBUG - dprintf( "bgntmesh\n" ); -#endif -} - -void -BasicSurfaceEvaluator::swaptmesh( void ) -{ -#ifndef NDEBUG - dprintf( "swaptmesh\n" ); -#endif -} - -void -BasicSurfaceEvaluator::endtmesh( void ) -{ -#ifndef NDEBUG - dprintf( "endtmesh\n" ); -#endif -} - -void -BasicSurfaceEvaluator::bgnqstrip( void ) -{ -#ifndef NDEBUG - dprintf( "bgnqstrip\n" ); -#endif -} - -void -BasicSurfaceEvaluator::endqstrip( void ) -{ -#ifndef NDEBUG - dprintf( "endqstrip\n" ); -#endif -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/basicsurfeval.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/basicsurfeval.h deleted file mode 100644 index 26009f0f30..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/basicsurfeval.h +++ /dev/null @@ -1,95 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * basicsurfeval.h - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/basicsurfeval.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#ifndef __glubasicsurfeval_h_ -#define __glubasicsurfeval_h_ - -#include "types.h" -#include "displaymode.h" -#include "cachingeval.h" - -class BasicSurfaceEvaluator : public CachingEvaluator { -public: - virtual void range2f( long, REAL *, REAL * ); - virtual void domain2f( REAL, REAL, REAL, REAL ); - - virtual void enable( long ); - virtual void disable( long ); - virtual void bgnmap2f( long ); - virtual void map2f( long, REAL, REAL, long, long, - REAL, REAL, long, long, - REAL * ); - virtual void mapgrid2f( long, REAL, REAL, long, REAL, REAL ); - virtual void mapmesh2f( long, long, long, long, long ); - virtual void evalcoord2f( long, REAL, REAL ); - virtual void evalpoint2i( long, long ); - virtual void endmap2f( void ); - - virtual void polymode( long ); - virtual void bgnline( void ); - virtual void endline( void ); - virtual void bgnclosedline( void ); - virtual void endclosedline( void ); - virtual void bgntmesh( void ); - virtual void swaptmesh( void ); - virtual void endtmesh( void ); - virtual void bgnqstrip( void ); - virtual void endqstrip( void ); - - virtual void bgntfan( void ); - virtual void endtfan( void ); - - virtual void evalUStrip(int n_upper, REAL v_upper, REAL* upper_val, - int n_lower, REAL v_lower, REAL* lower_val - ) = 0; - - virtual void evalVStrip(int n_left, REAL u_left, REAL* left_val, - int n_right, REAL u_right, REAL* right_val - ) = 0; - virtual void inDoEvalCoord2NOGE(REAL u, REAL v, REAL* ret_point, REAL* ret_normal) = 0; - virtual void inDoEvalCoord2NOGE_BU(REAL u, REAL v, REAL* ret_point, REAL* ret_normal) = 0; - virtual void inDoEvalCoord2NOGE_BV(REAL u, REAL v, REAL* ret_point, REAL* ret_normal) = 0; - virtual void inPreEvaluateBV_intfac(REAL v ) = 0; - virtual void inPreEvaluateBU_intfac(REAL u ) = 0; - -}; - -#endif /* __glubasicsurfeval_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/bezierarc.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/bezierarc.h deleted file mode 100644 index 64dd31d87d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/bezierarc.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * bezierarc.h - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/bezierarc.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#ifndef __glubezierarc_h -#define __glubezierarc_h - -#include "myassert.h" - -class Mapdesc; - -struct BezierArc : public PooledObj { /* a bezier arc */ - REAL * cpts; /* control points of arc */ - int order; /* order of arc */ - int stride; /* REAL distance between points */ - long type; /* curve type */ - Mapdesc * mapdesc; -}; - -#endif /* __glubezierarc_h */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/bin.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/bin.cc deleted file mode 100644 index 5efda2dd38..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/bin.cc +++ /dev/null @@ -1,168 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * bin.c++ - * - * $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/bin.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $ - */ - -#include "glimports.h" -#include "mystdio.h" -#include "myassert.h" -#include "bin.h" - -/*---------------------------------------------------------------------------- - * Constructor and destructor - *---------------------------------------------------------------------------- - */ -Bin::Bin() -{ - head = NULL; -} - -Bin::~Bin() -{ - assert( head == NULL); -} - -/*---------------------------------------------------------------------------- - * remove_this_arc - remove given Arc_ptr from bin - *---------------------------------------------------------------------------- - */ - -void -Bin::remove_this_arc( Arc_ptr arc ) -{ - Arc_ptr *j; - for( j = &(head); (*j != 0) && (*j != arc); j = &((*j)->link) ); - - if( *j != 0 ) { - if( *j == current ) - current = (*j)->link; - *j = (*j)->link; - } -} - -/*---------------------------------------------------------------------------- - * numarcs - count number of arcs in bin - *---------------------------------------------------------------------------- - */ - -int -Bin::numarcs() -{ - long count = 0; - for( Arc_ptr jarc = firstarc(); jarc; jarc = nextarc() ) - count++; - return count; -} - -/*---------------------------------------------------------------------------- - * adopt - place an orphaned arcs into their new parents bin - *---------------------------------------------------------------------------- - */ - -void -Bin::adopt() -{ - markall(); - - Arc_ptr orphan; - while( (orphan = removearc()) != NULL ) { - for( Arc_ptr parent = orphan->next; parent != orphan; parent = parent->next ) { - if (! parent->ismarked() ) { - orphan->link = parent->link; - parent->link = orphan; - orphan->clearmark(); - break; - } - } - } -} - - -/*---------------------------------------------------------------------------- - * show - print out descriptions of the arcs in the bin - *---------------------------------------------------------------------------- - */ - -void -Bin::show( char *name ) -{ -#ifndef NDEBUG - dprintf( "%s\n", name ); - for( Arc_ptr jarc = firstarc(); jarc; jarc = nextarc() ) - jarc->show( ); -#endif -} - - - -/*---------------------------------------------------------------------------- - * markall - mark all arcs with an identifying tag - *---------------------------------------------------------------------------- - */ - -void -Bin::markall() -{ - for( Arc_ptr jarc=firstarc(); jarc; jarc=nextarc() ) - jarc->setmark(); -} - -/*---------------------------------------------------------------------------- - * listBezier - print out all arcs that are untessellated border arcs - *---------------------------------------------------------------------------- - */ - -void -Bin::listBezier( void ) -{ - for( Arc_ptr jarc=firstarc(); jarc; jarc=nextarc() ) { - if( jarc->isbezier( ) ) { - assert( jarc->pwlArc->npts == 2 ); -#ifndef NDEBUG - TrimVertex *pts = jarc->pwlArc->pts; - REAL s1 = pts[0].param[0]; - REAL t1 = pts[0].param[1]; - REAL s2 = pts[1].param[0]; - REAL t2 = pts[1].param[1]; - dprintf( "arc (%g,%g) (%g,%g)\n", s1, t1, s2, t2 ); -#endif - } - } -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/bin.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/bin.h deleted file mode 100644 index 17d146fdf1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/bin.h +++ /dev/null @@ -1,127 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * bin.h - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/bin.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#ifndef __glubin_h_ -#define __glubin_h_ - -#include "myassert.h" -#include "arc.h" -#include "defines.h" - -class Bin -{ /* a linked list of jordan arcs */ -private: - Arc_ptr head;/*first arc on list */ - Arc_ptr current; /* current arc on list */ -public: - Bin(); - ~Bin(); - inline Arc_ptr firstarc( void ); - inline Arc_ptr nextarc( void ); - inline Arc_ptr removearc( void ); - inline int isnonempty( void ) { return (head ? 1 : 0); } - inline void addarc( Arc_ptr ); - void remove_this_arc( Arc_ptr ); - int numarcs( void ); - void adopt( void ); - void markall( void ); - void show( char * ); - void listBezier( void ); -}; - -/*---------------------------------------------------------------------------- - * Bin::addarc - add an Arc_ptr to head of linked list of Arc_ptr - *---------------------------------------------------------------------------- - */ - -inline void -Bin::addarc( Arc_ptr jarc ) -{ - jarc->link = head; - head = jarc; -} - -/*---------------------------------------------------------------------------- - * Bin::removearc - remove first Arc_ptr from bin - *---------------------------------------------------------------------------- - */ - -inline Arc_ptr -Bin::removearc( void ) -{ - Arc_ptr jarc = head; - - if( jarc ) head = jarc->link; - return jarc; -} - - -/*---------------------------------------------------------------------------- - * BinIter::nextarc - return current arc in bin and advance pointer to next arc - *---------------------------------------------------------------------------- - */ - -inline Arc_ptr -Bin::nextarc( void ) -{ - Arc_ptr jarc = current; - -#ifdef DEBUG - assert( jarc->check() != 0 ); -#endif - - if( jarc ) current = jarc->link; - return jarc; -} - -/*---------------------------------------------------------------------------- - * BinIter::firstarc - set current arc to first arc of bin advance to next arc - *---------------------------------------------------------------------------- - */ - -inline Arc_ptr -Bin::firstarc( void ) -{ - current = head; - return nextarc( ); -} - -#endif /* __glubin_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/bufpool.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/bufpool.cc deleted file mode 100644 index d8d9c23db3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/bufpool.cc +++ /dev/null @@ -1,112 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * bufpool.c++ - * - * $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/bufpool.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "bufpool.h" - - -/*----------------------------------------------------------------------------- - * Pool - allocate a new pool of buffers - *----------------------------------------------------------------------------- - */ -Pool::Pool( int _buffersize, int initpoolsize, char *n ) -{ - if((unsigned)_buffersize < sizeof(Buffer)) - buffersize = sizeof(Buffer); - else - buffersize = _buffersize; - initsize = initpoolsize * buffersize; - nextsize = initsize; - name = n; - magic = is_allocated; - nextblock = 0; - curblock = 0; - freelist = 0; - nextfree = 0; -} - -/*----------------------------------------------------------------------------- - * ~Pool - free a pool of buffers and the pool itself - *----------------------------------------------------------------------------- - */ - -Pool::~Pool( void ) -{ - assert( (this != 0) && (magic == is_allocated) ); - - while( nextblock ) { - delete [] blocklist[--nextblock]; - blocklist[nextblock] = 0; - } - magic = is_free; -} - - -void Pool::grow( void ) -{ - assert( (this != 0) && (magic == is_allocated) ); - curblock = new char[nextsize]; - blocklist[nextblock++] = curblock; - nextfree = nextsize; - nextsize *= 2; -} - -/*----------------------------------------------------------------------------- - * Pool::clear - free buffers associated with pool but keep pool - *----------------------------------------------------------------------------- - */ - -void -Pool::clear( void ) -{ - assert( (this != 0) && (magic == is_allocated) ); - - while( nextblock ) { - delete [] blocklist[--nextblock]; - blocklist[nextblock] = 0; - } - curblock = 0; - freelist = 0; - nextfree = 0; - if( nextsize > initsize ) - nextsize /= 2; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/bufpool.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/bufpool.h deleted file mode 100644 index 90c775e4b7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/bufpool.h +++ /dev/null @@ -1,146 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * bufpool.h - * - * $Date: 2001/03/22 11:38:36 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/bufpool.h,v 1.2 2001/03/22 11:38:36 joukj Exp $ - */ - -#ifndef __glubufpool_h_ -#define __glubufpool_h_ - -#include "gluos.h" -#include "myassert.h" -#include "mystdlib.h" - -#define NBLOCKS 32 - -class Buffer { - friend class Pool; - Buffer * next; /* next buffer on free list */ -}; - -class Pool { -public: - Pool( int, int, char * ); - ~Pool( void ); - inline void* new_buffer( void ); - inline void free_buffer( void * ); - void clear( void ); - -private: - void grow( void ); - -protected: - Buffer *freelist; /* linked list of free buffers */ - char *blocklist[NBLOCKS]; /* blocks of malloced memory */ - int nextblock; /* next free block index */ - char *curblock; /* last malloced block */ - int buffersize; /* bytes per buffer */ - int nextsize; /* size of next block of memory */ - int nextfree; /* byte offset past next free buffer */ - int initsize; - enum Magic { is_allocated = 0xf3a1, is_free = 0xf1a2 }; - char *name; /* name of the pool */ - Magic magic; /* marker for valid pool */ -}; - -/*----------------------------------------------------------------------------- - * Pool::free_buffer - return a buffer to a pool - *----------------------------------------------------------------------------- - */ - -inline void -Pool::free_buffer( void *b ) -{ - assert( (this != 0) && (magic == is_allocated) ); - - /* add buffer to singly connected free list */ - - ((Buffer *) b)->next = freelist; - freelist = (Buffer *) b; -} - - -/*----------------------------------------------------------------------------- - * Pool::new_buffer - allocate a buffer from a pool - *----------------------------------------------------------------------------- - */ - -inline void * -Pool::new_buffer( void ) -{ - void *buffer; - - assert( (this != 0) && (magic == is_allocated) ); - - /* find free buffer */ - - if( freelist ) { - buffer = (void *) freelist; - freelist = freelist->next; - } else { - if( ! nextfree ) - grow( ); - nextfree -= buffersize;; - buffer = (void *) (curblock + nextfree); - } - return buffer; -} - -class PooledObj { -public: - inline void * operator new( size_t, Pool & ); - inline void * operator new( size_t, void *); - inline void * operator new( size_t s) - { return ::new char[s]; } - inline void operator delete( void * ) { assert( 0 ); } - inline void deleteMe( Pool & ); -}; - -inline void * -PooledObj::operator new( size_t, Pool& pool ) -{ - return pool.new_buffer(); -} - -inline void -PooledObj::deleteMe( Pool& pool ) -{ - pool.free_buffer( (void *) this ); -} - -#endif /* __glubufpool_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/cachingeval.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/cachingeval.cc deleted file mode 100644 index 7245ee3a18..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/cachingeval.cc +++ /dev/null @@ -1,80 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * cachingeval.c++ - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/cachingeval.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#include "cachingeval.h" - -int -CachingEvaluator::canRecord( void ) -{ - return 0; -} - -int -CachingEvaluator::canPlayAndRecord( void ) -{ - return 0; -} - -int -CachingEvaluator::createHandle( int ) -{ - return 0; -} - -void -CachingEvaluator::beginOutput( ServiceMode, int ) -{ -} - -void -CachingEvaluator::endOutput( void ) -{ -} - -void -CachingEvaluator::discardRecording( int ) -{ -} - -void -CachingEvaluator::playRecording( int ) -{ -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/cachingeval.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/cachingeval.h deleted file mode 100644 index 13d5b2f44e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/cachingeval.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * cachingeval.h - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/cachingeval.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#ifndef __glucachingval_h_ -#define __glucachingval_h_ - -class CachingEvaluator { -public: - enum ServiceMode { play, record, playAndRecord }; - virtual int canRecord( void ); - virtual int canPlayAndRecord( void ); - virtual int createHandle( int handle ); - virtual void beginOutput( ServiceMode, int handle ); - virtual void endOutput( void ); - virtual void discardRecording( int handle ); - virtual void playRecording( int handle ); -}; -#endif /* __glucachingval_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/ccw.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/ccw.cc deleted file mode 100644 index 4cd92e8780..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/ccw.cc +++ /dev/null @@ -1,567 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * ccw.c++ - * - * $Date: 2002/11/01 23:35:07 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/ccw.cc,v 1.2 2002/11/01 23:35:07 brianp Exp $ - */ - -#include "glimports.h" -#include "mystdio.h" -#include "myassert.h" -#include "subdivider.h" -#include "types.h" -#include "arc.h" -#include "trimvertex.h" -#include "simplemath.h" - -inline int -Subdivider::bbox( TrimVertex *a, TrimVertex *b, TrimVertex *c, int p ) -{ - return bbox( a->param[p], b->param[p], c->param[p], - a->param[1-p], b->param[1-p], c->param[1-p] ); -} - -int -Subdivider::ccwTurn_sr( Arc_ptr j1, Arc_ptr j2 ) // dir = 1 -{ - register TrimVertex *v1 = &j1->pwlArc->pts[j1->pwlArc->npts-1]; - register TrimVertex *v1last = &j1->pwlArc->pts[0]; - register TrimVertex *v2 = &j2->pwlArc->pts[0]; - register TrimVertex *v2last = &j2->pwlArc->pts[j2->pwlArc->npts-1]; - register TrimVertex *v1next = v1-1; - register TrimVertex *v2next = v2+1; - int sgn; - - assert( v1 != v1last ); - assert( v2 != v2last ); - -#ifndef NDEBUG - dprintf( "arc_ccw_turn, p = %d\n", 0 ); -#endif - - // the arcs lie on the line (0 == v1->param[0]) - if( v1->param[0] == v1next->param[0] && v2->param[0] == v2next->param[0] ) - return 0; - - if( v2next->param[0] < v2->param[0] || v1next->param[0] < v1->param[0] ) - ::mylongjmp( jumpbuffer, 28 ); - - if( v1->param[1] < v2->param[1] ) - return 0; - else if( v1->param[1] > v2->param[1] ) - return 1; - - while( 1 ) { - if( v1next->param[0] < v2next->param[0] ) { -#ifndef NDEBUG - dprintf( "case a\n" ); -#endif - assert( v1->param[0] <= v1next->param[0] ); - assert( v2->param[0] <= v1next->param[0] ); - switch( bbox( v2, v2next, v1next, 1 ) ) { - case -1: - return 0; - case 0: - sgn = ccw( v1next, v2, v2next ); - if( sgn != -1 ) { - return sgn; - } else { -#ifdef DEBUG - dprintf( "decr\n" ); -#endif - v1 = v1next--; - if( v1 == v1last ) { -#ifdef DEBUG - dprintf( "no good results\n" ); -#endif - return 0; // ill-conditioned, guess answer - } - } - break; - case 1: - return 1; - } - } else if( v1next->param[0] > v2next->param[0] ) { -#ifndef NDEBUG - dprintf( "case b\n" ); -#endif - assert( v1->param[0] <= v2next->param[0] ); - assert( v2->param[0] <= v2next->param[0] ); - switch( bbox( v1, v1next, v2next, 1 ) ) { - case -1: - return 1; - case 0: - sgn = ccw( v1next, v1, v2next ); - if( sgn != -1 ) { - return sgn; - } else { -#ifdef DEBUG - dprintf( "incr\n" ); -#endif - v2 = v2next++; - if( v2 == v2last ) { -#ifdef DEBUG - dprintf( "no good results\n" ); -#endif - return 0; // ill-conditioned, guess answer - } - } - break; - case 1: - return 0; - } - } else { -#ifndef NDEBUG - dprintf( "case ab\n" ); -#endif - if( v1next->param[1] < v2next->param[1] ) - return 0; - else if( v1next->param[1] > v2next->param[1] ) - return 1; - else { -#ifdef DEBUG - dprintf( "incr\n" ); -#endif - v2 = v2next++; - if( v2 == v2last ) { -#ifdef DEBUG - dprintf( "no good results\n" ); -#endif - return 0; // ill-conditioned, guess answer - } - } - } - } -} - -int -Subdivider::ccwTurn_sl( Arc_ptr j1, Arc_ptr j2 ) // dir = 0 -{ - register TrimVertex *v1 = &j1->pwlArc->pts[j1->pwlArc->npts-1]; - register TrimVertex *v1last = &j1->pwlArc->pts[0]; - register TrimVertex *v2 = &j2->pwlArc->pts[0]; - register TrimVertex *v2last = &j2->pwlArc->pts[j2->pwlArc->npts-1]; - register TrimVertex *v1next = v1-1; - register TrimVertex *v2next = v2+1; - int sgn; - - assert( v1 != v1last ); - assert( v2 != v2last ); - -#ifndef NDEBUG - dprintf( "arc_ccw_turn, p = %d\n", 0 ); -#endif - - // the arcs lie on the line (0 == v1->param[0]) - if( v1->param[0] == v1next->param[0] && v2->param[0] == v2next->param[0] ) - return 0; - - if( v2next->param[0] > v2->param[0] || v1next->param[0] > v1->param[0] ) - ::mylongjmp( jumpbuffer, 28 ); - - if( v1->param[1] < v2->param[1] ) - return 1; - else if( v1->param[1] > v2->param[1] ) - return 0; - - while( 1 ) { - if( v1next->param[0] > v2next->param[0] ) { -#ifndef NDEBUG - dprintf( "case c\n" ); -#endif - assert( v1->param[0] >= v1next->param[0] ); - assert( v2->param[0] >= v1next->param[0] ); - switch( bbox( v2next, v2, v1next, 1 ) ) { - case -1: - return 1; - case 0: - sgn = ccw( v1next, v2, v2next ); - if( sgn != -1 ) - return sgn; - else { - v1 = v1next--; -#ifdef DEBUG - dprintf( "decr\n" ); -#endif - if( v1 == v1last ) { -#ifdef DEBUG - dprintf( "no good results\n" ); -#endif - return 0; // ill-conditioned, guess answer - } - } - break; - case 1: - return 0; - } - } else if( v1next->param[0] < v2next->param[0] ) { -#ifndef NDEBUG - dprintf( "case d\n" ); -#endif - assert( v1->param[0] >= v2next->param[0] ); - assert( v2->param[0] >= v2next->param[0] ); - switch( bbox( v1next, v1, v2next, 1 ) ) { - case -1: - return 0; - case 0: - sgn = ccw( v1next, v1, v2next ); - if( sgn != -1 ) - return sgn; - else { - v2 = v2next++; -#ifdef DEBUG - dprintf( "incr\n" ); -#endif - if( v2 == v2last ) { -#ifdef DEBUG - dprintf( "no good results\n" ); -#endif - return 0; // ill-conditioned, guess answer - } - } - break; - case 1: - return 1; - } - } else { -#ifdef DEBUG - dprintf( "case cd\n" ); -#endif - if( v1next->param[1] < v2next->param[1] ) - return 1; - else if( v1next->param[1] > v2next->param[1] ) - return 0; - else { - v2 = v2next++; -#ifdef DEBUG - dprintf( "incr\n" ); -#endif - if( v2 == v2last ) { -#ifdef DEBUG - dprintf( "no good results\n" ); -#endif - return 0; // ill-conditioned, guess answer - } - } - } - } -} - -int -Subdivider::ccwTurn_tr( Arc_ptr j1, Arc_ptr j2 ) // dir = 1 -{ - register TrimVertex *v1 = &j1->pwlArc->pts[j1->pwlArc->npts-1]; - register TrimVertex *v1last = &j1->pwlArc->pts[0]; - register TrimVertex *v2 = &j2->pwlArc->pts[0]; - register TrimVertex *v2last = &j2->pwlArc->pts[j2->pwlArc->npts-1]; - register TrimVertex *v1next = v1-1; - register TrimVertex *v2next = v2+1; - int sgn; - - assert( v1 != v1last ); - assert( v2 != v2last ); - -#ifndef NDEBUG - dprintf( "arc_ccw_turn, p = %d\n", 1 ); -#endif - - // the arcs lie on the line (1 == v1->param[1]) - if( v1->param[1] == v1next->param[1] && v2->param[1] == v2next->param[1] ) - return 0; - - if( v2next->param[1] < v2->param[1] || v1next->param[1] < v1->param[1] ) - ::mylongjmp( jumpbuffer, 28 ); - - if( v1->param[0] < v2->param[0] ) - return 1; - else if( v1->param[0] > v2->param[0] ) - return 0; - - while( 1 ) { - if( v1next->param[1] < v2next->param[1] ) { -#ifndef NDEBUG - dprintf( "case a\n" ); -#endif - assert( v1->param[1] <= v1next->param[1] ); - assert( v2->param[1] <= v1next->param[1] ); - switch( bbox( v2, v2next, v1next, 0 ) ) { - case -1: - return 1; - case 0: - sgn = ccw( v1next, v2, v2next ); - if( sgn != -1 ) { - return sgn; - } else { -#ifdef DEBUG - dprintf( "decr\n" ); -#endif - v1 = v1next--; - if( v1 == v1last ) { -#ifdef DEBUG - dprintf( "no good results\n" ); -#endif - return 0; // ill-conditioned, guess answer - } - } - break; - case 1: - return 0; - } - } else if( v1next->param[1] > v2next->param[1] ) { -#ifndef NDEBUG - dprintf( "case b\n" ); -#endif - assert( v1->param[1] <= v2next->param[1] ); - assert( v2->param[1] <= v2next->param[1] ); - switch( bbox( v1, v1next, v2next, 0 ) ) { - case -1: - return 0; - case 0: - sgn = ccw( v1next, v1, v2next ); - if( sgn != -1 ) { - return sgn; - } else { -#ifdef DEBUG - dprintf( "incr\n" ); -#endif - v2 = v2next++; - if( v2 == v2last ) { -#ifdef DEBUG - dprintf( "no good results\n" ); -#endif - return 0; // ill-conditioned, guess answer - } - } - break; - case 1: - return 1; - } - } else { -#ifdef DEBUG - dprintf( "case ab\n" ); -#endif - if( v1next->param[0] < v2next->param[0] ) - return 1; - else if( v1next->param[0] > v2next->param[0] ) - return 0; - else { -#ifdef DEBUG - dprintf( "incr\n" ); -#endif - v2 = v2next++; - if( v2 == v2last ) { -#ifdef DEBUG - dprintf( "no good results\n" ); -#endif - return 0; // ill-conditioned, guess answer - } - } - } - } -} - -int -Subdivider::ccwTurn_tl( Arc_ptr j1, Arc_ptr j2 ) -{ - register TrimVertex *v1 = &j1->pwlArc->pts[j1->pwlArc->npts-1]; - register TrimVertex *v1last = &j1->pwlArc->pts[0]; - register TrimVertex *v2 = &j2->pwlArc->pts[0]; - register TrimVertex *v2last = &j2->pwlArc->pts[j2->pwlArc->npts-1]; - register TrimVertex *v1next = v1-1; - register TrimVertex *v2next = v2+1; - int sgn; - - assert( v1 != v1last ); - assert( v2 != v2last ); - -#ifndef NDEBUG - dprintf( "arc_ccw_turn, p = %d\n", 1 ); -#endif - - // the arcs lie on the line (1 == v1->param[1]) - if( v1->param[1] == v1next->param[1] && v2->param[1] == v2next->param[1] ) - return 0; - - if( v2next->param[1] > v2->param[1] || v1next->param[1] > v1->param[1] ) - ::mylongjmp( jumpbuffer, 28 ); - - if( v1->param[0] < v2->param[0] ) - return 0; - else if( v1->param[0] > v2->param[0] ) - return 1; - - while( 1 ) { - if( v1next->param[1] > v2next->param[1] ) { -#ifndef NDEBUG - dprintf( "case c\n" ); -#endif - assert( v1->param[1] >= v1next->param[1] ); - assert( v2->param[1] >= v1next->param[1] ); - switch( bbox( v2next, v2, v1next, 0 ) ) { - case -1: - return 0; - case 0: - sgn = ccw( v1next, v2, v2next ); - if( sgn != -1 ) - return sgn; - else { - v1 = v1next--; -#ifdef DEBUG - dprintf( "decr\n" ); -#endif - if( v1 == v1last ) { -#ifdef DEBUG - dprintf( "no good results\n" ); -#endif - return 0; // ill-conditioned, guess answer - } - } - break; - case 1: - return 1; - } - } else if( v1next->param[1] < v2next->param[1] ) { -#ifndef NDEBUG - dprintf( "case d\n" ); - assert( v1->param[1] >= v2next->param[1] ); - assert( v2->param[1] >= v2next->param[1] ); -#endif - switch( bbox( v1next, v1, v2next, 0 ) ) { - case -1: - return 1; - case 0: - sgn = ccw( v1next, v1, v2next ); - if( sgn != -1 ) - return sgn; - else { - v2 = v2next++; -#ifdef DEBUG - dprintf( "incr\n" ); -#endif - if( v2 == v2last ) { -#ifdef DEBUG - dprintf( "no good results\n" ); -#endif - return 0; // ill-conditioned, guess answer - } - } - break; - case 1: - return 0; - } - } else { -#ifdef DEBUG - dprintf( "case cd\n" ); -#endif - if( v1next->param[0] < v2next->param[0] ) - return 0; - else if( v1next->param[0] > v2next->param[0] ) - return 1; - else { - v2 = v2next++; -#ifdef DEBUG - dprintf( "incr\n" ); -#endif - if( v2 == v2last ) { -#ifdef DEBUG - dprintf( "no good results\n" ); -#endif - return 0; // ill-conditioned, guess answer - } - } - } - } -} - - -#ifndef NDEBUG -int -Subdivider::bbox( register REAL sa, register REAL sb, register REAL sc, - register REAL ta, register REAL tb, register REAL tc ) -#else -int -Subdivider::bbox( register REAL sa, register REAL sb, register REAL sc, - register REAL , register REAL , register REAL ) -#endif -{ -#ifndef NDEBUG - assert( tc >= ta ); - assert( tc <= tb ); -#endif - - if( sa < sb ) { - if( sc <= sa ) { - return -1; - } else if( sb <= sc ) { - return 1; - } else { - return 0; - } - } else if( sa > sb ) { - if( sc >= sa ) { - return 1; - } else if( sb >= sc ) { - return -1; - } else { - return 0; - } - } else { - if( sc > sa ) { - return 1; - } else if( sb > sc ) { - return -1; - } else { - return 0; - } - } -} - -/*---------------------------------------------------------------------------- - * ccw - determine how three points are oriented by computing their - * determinant. - * Return 1 if the vertices are ccw oriented, - * 0 if they are cw oriented, or - * -1 if the computation is ill-conditioned. - *---------------------------------------------------------------------------- - */ -int -Subdivider::ccw( TrimVertex *a, TrimVertex *b, TrimVertex *c ) -{ - REAL d = det3( a, b, c ); - if( glu_abs(d) < 0.0001 ) return -1; - return (d < 0.0) ? 0 : 1; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/coveandtiler.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/coveandtiler.cc deleted file mode 100644 index ca5bf36b36..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/coveandtiler.cc +++ /dev/null @@ -1,440 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * coveandtiler.c++ - * - */ - -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "coveandtiler.h" -#include "gridvertex.h" -#include "gridtrimvertex.h" -#include "uarray.h" -#include "backend.h" - - -const int CoveAndTiler::MAXSTRIPSIZE = 1000; - -CoveAndTiler::CoveAndTiler( Backend& b ) - : backend( b ) -{ } - -CoveAndTiler::~CoveAndTiler( void ) -{ } - -inline void -CoveAndTiler::output( GridVertex &gv ) -{ - backend.tmeshvert( &gv ); -} - -inline void -CoveAndTiler::output( TrimVertex *tv ) -{ - backend.tmeshvert( tv ); -} - -inline void -CoveAndTiler::output( GridTrimVertex& g ) -{ - backend.tmeshvert( &g ); -} - -void -CoveAndTiler::coveAndTile( void ) -{ - long ustart = (top.ustart >= bot.ustart) ? top.ustart : bot.ustart; - long uend = (top.uend <= bot.uend) ? top.uend : bot.uend; - if( ustart <= uend ) { - tile( bot.vindex, ustart, uend ); - if( top.ustart >= bot.ustart ) - coveUpperLeft(); - else - coveLowerLeft(); - - if( top.uend <= bot.uend ) - coveUpperRight(); - else - coveLowerRight(); - } else { - TrimVertex blv, tlv, *bl, *tl; - GridTrimVertex bllv, tllv; - TrimVertex *lf = left.first(); - TrimVertex *ll = left.last(); - if( lf->param[0] >= ll->param[0] ) { - blv.param[0] = lf->param[0]; - blv.param[1] = ll->param[1]; - blv.nuid = 0; // XXX - assert( blv.param[1] == bot.vval ); - bl = &blv; - tl = lf; - tllv.set( lf ); - if( ll->param[0] > uarray.uarray[top.ustart-1] ) { - bllv.set( ll ); - assert( ll->param[0] <= uarray.uarray[bot.ustart] ); - } else { - bllv.set( top.ustart-1, bot.vindex ); - } - coveUpperLeftNoGrid( bl ); - } else { - tlv.param[0] = ll->param[0]; - tlv.param[1] = lf->param[1]; - tlv.nuid = 0; // XXX - assert( tlv.param[1] == top.vval ); - tl = &tlv; - bl = ll; - bllv.set( ll ); - if( lf->param[0] > uarray.uarray[bot.ustart-1] ) { - assert( lf->param[0] <= uarray.uarray[bot.ustart] ); - tllv.set( lf ); - } else { - tllv.set( bot.ustart-1, top.vindex ); - } - coveLowerLeftNoGrid( tl ); - } - - TrimVertex brv, trv, *br, *tr; - GridTrimVertex brrv, trrv; - TrimVertex *rf = right.first(); - TrimVertex *rl = right.last(); - - if( rf->param[0] <= rl->param[0] ) { - brv.param[0] = rf->param[0]; - brv.param[1] = rl->param[1]; - brv.nuid = 0; // XXX - assert( brv.param[1] == bot.vval ); - br = &brv; - tr = rf; - trrv.set( rf ); - if( rl->param[0] < uarray.uarray[top.uend+1] ) { - assert( rl->param[0] >= uarray.uarray[top.uend] ); - brrv.set( rl ); - } else { - brrv.set( top.uend+1, bot.vindex ); - } - coveUpperRightNoGrid( br ); - } else { - trv.param[0] = rl->param[0]; - trv.param[1] = rf->param[1]; - trv.nuid = 0; // XXX - assert( trv.param[1] == top.vval ); - tr = &trv; - br = rl; - brrv.set( rl ); - if( rf->param[0] < uarray.uarray[bot.uend+1] ) { - assert( rf->param[0] >= uarray.uarray[bot.uend] ); - trrv.set( rf ); - } else { - trrv.set( bot.uend+1, top.vindex ); - } - coveLowerRightNoGrid( tr ); - } - - backend.bgntmesh( "doit" ); - output(trrv); - output(tllv); - output( tr ); - output( tl ); - output( br ); - output( bl ); - output(brrv); - output(bllv); - backend.endtmesh(); - } -} - -void -CoveAndTiler::tile( long vindex, long ustart, long uend ) -{ - long numsteps = uend - ustart; - - if( numsteps == 0 ) return; - - if( numsteps > MAXSTRIPSIZE ) { - long umid = ustart + (uend - ustart) / 2; - tile( vindex, ustart, umid ); - tile( vindex, umid, uend ); - } else { - backend.surfmesh( ustart, vindex-1, numsteps, 1 ); - } -} - -void -CoveAndTiler::coveUpperRight( void ) -{ - GridVertex tgv( top.uend, top.vindex ); - GridVertex gv( top.uend, bot.vindex ); - - right.first(); - backend.bgntmesh( "coveUpperRight" ); - output( right.next() ); - output( tgv ); - backend.swaptmesh(); - output( gv ); - coveUR(); - backend.endtmesh(); -} - -void -CoveAndTiler::coveUpperRightNoGrid( TrimVertex* br ) -{ - backend.bgntmesh( "coveUpperRight" ); - output( right.first() ); - output( right.next() ); - backend.swaptmesh(); - output( br ); - coveUR(); - backend.endtmesh(); -} - -void -CoveAndTiler::coveUR( ) -{ - GridVertex gv( top.uend, bot.vindex ); - TrimVertex *vert = right.next(); - if( vert == NULL ) return; - - assert( vert->param[0] >= uarray.uarray[gv.gparam[0]] ); - - if( gv.nextu() >= bot.uend ) { - for( ; vert; vert = right.next() ) { - output( vert ); - backend.swaptmesh(); - } - } else while( 1 ) { - if( vert->param[0] < uarray.uarray[gv.gparam[0]] ) { - output( vert ); - backend.swaptmesh(); - vert = right.next(); - if( vert == NULL ) break; - } else { - backend.swaptmesh(); - output( gv ); - if( gv.nextu() == bot.uend ) { - for( ; vert; vert = right.next() ) { - output( vert ); - backend.swaptmesh(); - } - break; - } - } - } -} - -void -CoveAndTiler::coveUpperLeft( void ) -{ - GridVertex tgv( top.ustart, top.vindex ); - GridVertex gv( top.ustart, bot.vindex ); - - left.first(); - backend.bgntmesh( "coveUpperLeft" ); - output( tgv ); - output( left.next() ); - output( gv ); - backend.swaptmesh(); - coveUL(); - backend.endtmesh(); -} - -void -CoveAndTiler::coveUpperLeftNoGrid( TrimVertex* bl ) -{ - backend.bgntmesh( "coveUpperLeftNoGrid" ); - output( left.first() ); - output( left.next() ); - output( bl ); - backend.swaptmesh(); - coveUL(); - backend.endtmesh(); -} - -void -CoveAndTiler::coveUL() -{ - GridVertex gv( top.ustart, bot.vindex ); - TrimVertex *vert = left.next(); - if( vert == NULL ) return; - assert( vert->param[0] <= uarray.uarray[gv.gparam[0]] ); - - if( gv.prevu() <= bot.ustart ) { - for( ; vert; vert = left.next() ) { - backend.swaptmesh(); - output( vert ); - } - } else while( 1 ) { - if( vert->param[0] > uarray.uarray[gv.gparam[0]] ) { - backend.swaptmesh(); - output( vert ); - vert = left.next(); - if( vert == NULL ) break; - } else { - output( gv ); - backend.swaptmesh(); - if( gv.prevu() == bot.ustart ) { - for( ; vert; vert = left.next() ) { - backend.swaptmesh(); - output( vert ); - } - break; - } - } - } -} - -void -CoveAndTiler::coveLowerLeft( void ) -{ - GridVertex bgv( bot.ustart, bot.vindex ); - GridVertex gv( bot.ustart, top.vindex ); - - left.last(); - backend.bgntmesh( "coveLowerLeft" ); - output( left.prev() ); - output( bgv ); - backend.swaptmesh(); - output( gv ); - coveLL(); - backend.endtmesh(); -} - -void -CoveAndTiler::coveLowerLeftNoGrid( TrimVertex* tl ) -{ - backend.bgntmesh( "coveLowerLeft" ); - output( left.last() ); - output( left.prev() ); - backend.swaptmesh(); - output( tl ); - coveLL( ); - backend.endtmesh(); -} - -void -CoveAndTiler::coveLL() -{ - GridVertex gv( bot.ustart, top.vindex ); - TrimVertex *vert = left.prev(); - if( vert == NULL ) return; - assert( vert->param[0] <= uarray.uarray[gv.gparam[0]] ); - - if( gv.prevu() <= top.ustart ) { - for( ; vert; vert = left.prev() ) { - output( vert ); - backend.swaptmesh(); - } - } else while( 1 ) { - if( vert->param[0] > uarray.uarray[gv.gparam[0]] ){ - output( vert ); - backend.swaptmesh(); - vert = left.prev(); - if( vert == NULL ) break; - } else { - backend.swaptmesh(); - output( gv ); - if( gv.prevu() == top.ustart ) { - for( ; vert; vert = left.prev() ) { - output( vert ); - backend.swaptmesh(); - } - break; - } - } - } -} - -void -CoveAndTiler::coveLowerRight( void ) -{ - GridVertex bgv( bot.uend, bot.vindex ); - GridVertex gv( bot.uend, top.vindex ); - - right.last(); - backend.bgntmesh( "coveLowerRight" ); - output( bgv ); - output( right.prev() ); - output( gv ); - backend.swaptmesh(); - coveLR(); - backend.endtmesh( ); -} - -void -CoveAndTiler::coveLowerRightNoGrid( TrimVertex* tr ) -{ - backend.bgntmesh( "coveLowerRIght" ); - output( right.last() ); - output( right.prev() ); - output( tr ); - backend.swaptmesh(); - coveLR(); - backend.endtmesh(); -} - -void -CoveAndTiler::coveLR( ) -{ - GridVertex gv( bot.uend, top.vindex ); - TrimVertex *vert = right.prev(); - if( vert == NULL ) return; - assert( vert->param[0] >= uarray.uarray[gv.gparam[0]] ); - - if( gv.nextu() >= top.uend ) { - for( ; vert; vert = right.prev() ) { - backend.swaptmesh(); - output( vert ); - } - } else while( 1 ) { - if( vert->param[0] < uarray.uarray[gv.gparam[0]] ) { - backend.swaptmesh(); - output( vert ); - vert = right.prev(); - if( vert == NULL ) break; - } else { - output( gv ); - backend.swaptmesh(); - if( gv.nextu() == top.uend ) { - for( ; vert; vert = right.prev() ) { - backend.swaptmesh(); - output( vert ); - } - break; - } - } - } -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/coveandtiler.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/coveandtiler.h deleted file mode 100644 index 4f4077e208..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/coveandtiler.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * coveandtiler.h - * - * $Date: 2001/07/16 15:46:42 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/coveandtiler.h,v 1.2 2001/07/16 15:46:42 brianp Exp $ - */ - -#ifndef __glucoveandtiler_h -#define __glucoveandtiler_h - -#include "trimregion.h" -#include "trimvertex.h" -#include "gridvertex.h" - -class Backend; -class GridTrimVertex; - -class CoveAndTiler : virtual public TrimRegion { -public: - CoveAndTiler( Backend& ); - ~CoveAndTiler( void ); - void coveAndTile( void ); -private: - Backend& backend; - static const int MAXSTRIPSIZE; - void tile( long, long, long ); - void coveLowerLeft( void ); - void coveLowerRight( void ); - void coveUpperLeft( void ); - void coveUpperRight( void ); - void coveUpperLeftNoGrid( TrimVertex * ); - void coveUpperRightNoGrid( TrimVertex * ); - void coveLowerLeftNoGrid( TrimVertex * ); - void coveLowerRightNoGrid( TrimVertex * ); - void coveLL( void ); - void coveLR( void ); - void coveUL( void ); - void coveUR( void ); - inline void output( GridTrimVertex& ); - inline void output( GridVertex& ); - inline void output( TrimVertex* ); -}; - -#endif /* __glucoveandtiler_h */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/curve.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/curve.cc deleted file mode 100644 index 5517afa2db..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/curve.cc +++ /dev/null @@ -1,200 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * curve.c++ - * - * $Date: 2004/05/12 15:29:36 $ $Revision: 1.3 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/curve.cc,v 1.3 2004/05/12 15:29:36 brianp Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "mymath.h" -#include "curve.h" -#include "mapdesc.h" -#include "types.h" -#include "quilt.h" -#include "nurbsconsts.h" - -/*-------------------------------------------------------------------------- - * Curve::Curve - copy curve from quilt and transform control points - *-------------------------------------------------------------------------- - */ - -Curve::Curve( Quilt_ptr geo, REAL pta, REAL ptb, Curve *c ) -{ - mapdesc = geo->mapdesc; - next = c; - needsSampling = mapdesc->isRangeSampling() ? 1 : 0; - cullval = mapdesc->isCulling() ? CULL_ACCEPT : CULL_TRIVIAL_ACCEPT; - order = geo->qspec[0].order; - stride = MAXCOORDS; - - REAL *ps = geo->cpts; - Quiltspec_ptr qs = geo->qspec; - ps += qs->offset; - ps += qs->index * qs->order * qs->stride; - - if( needsSampling ) - mapdesc->xformSampling( ps, qs->order, qs->stride, spts, stride ); - - if( cullval == CULL_ACCEPT ) - mapdesc->xformCulling( ps, qs->order, qs->stride, cpts, stride ); - - /* set untrimmed curve range */ - range[0] = qs->breakpoints[qs->index]; - range[1] = qs->breakpoints[qs->index+1]; - range[2] = range[1] - range[0]; - - if( range[0] != pta ) { - Curve lower( *this, pta, 0 ); - lower.next = next; - *this = lower; - } - if( range[1] != ptb ) { - Curve lower( *this, ptb, 0 ); - } -} - -/*-------------------------------------------------------------------------- - * Curve::Curve - subdivide a curve along an isoparametric line - *-------------------------------------------------------------------------- - */ - -Curve::Curve( Curve& upper, REAL value, Curve *c ) -{ - Curve &lower = *this; - - lower.next = c; - lower.mapdesc = upper.mapdesc; - lower.needsSampling = upper.needsSampling; - lower.order = upper.order; - lower.stride = upper.stride; - lower.cullval = upper.cullval; - - REAL d = (value - upper.range[0]) / upper.range[2]; - - if( needsSampling ) - mapdesc->subdivide( upper.spts, lower.spts, d, upper.stride, upper.order ); - - if( cullval == CULL_ACCEPT ) - mapdesc->subdivide( upper.cpts, lower.cpts, d, upper.stride, upper.order ); - - lower.range[0] = upper.range[0]; - lower.range[1] = value; - lower.range[2] = value - upper.range[0]; - upper.range[0] = value; - upper.range[2] = upper.range[1] - value; -} - - -/*-------------------------------------------------------------------------- - * Curve::clamp - clamp the sampling rate to a given maximum - *-------------------------------------------------------------------------- - */ - -void -Curve::clamp( void ) -{ - if( stepsize < minstepsize ) - stepsize = mapdesc->clampfactor * minstepsize; -} - -void -Curve::setstepsize( REAL max ) -{ - stepsize = ( max >= 1.0 ) ? (range[2] / max) : range[2]; - minstepsize = stepsize; -} - -void -Curve::getstepsize( void ) -{ - minstepsize= 0; - - if( mapdesc->isConstantSampling() ) { - // fixed number of samples per patch in each direction - // maxrate is number of s samples per patch - setstepsize( mapdesc->maxrate ); - } else if( mapdesc->isDomainSampling() ) { - // maxrate is number of s samples per unit s length of domain - setstepsize( mapdesc->maxrate * range[2] ); - } else { - // upper bound on path length between sample points - - assert( order <= MAXORDER ); - - /* points have been transformed, therefore they are homogeneous */ - REAL tmp[MAXORDER][MAXCOORDS]; - const int tstride = sizeof(tmp[0]) / sizeof(REAL); - int val = mapdesc->project( spts, stride, &tmp[0][0], tstride, order ); - - if( val == 0 ) { - // control points cross infinity, therefore derivatives are undefined - setstepsize( mapdesc->maxrate ); - } else { - REAL t = mapdesc->getProperty( N_PIXEL_TOLERANCE ); - if( mapdesc->isParametricDistanceSampling() ) { - REAL d = mapdesc->calcPartialVelocity( &tmp[0][0], tstride, order, 2, range[2] ); - stepsize = (d > 0.0) ? sqrtf( 8.0 * t / d ) : range[2]; - minstepsize = ( mapdesc->maxrate > 0.0 ) ? (range[2] / mapdesc->maxrate) : 0.0; - } else if( mapdesc->isPathLengthSampling() ) { - // t is upper bound on path (arc) length - REAL d = mapdesc->calcPartialVelocity( &tmp[0][0], tstride, order, 1, range[2] ); - stepsize = ( d > 0.0 ) ? (t / d) : range[2]; - minstepsize = ( mapdesc->maxrate > 0.0 ) ? (range[2] / mapdesc->maxrate) : 0.0; - } else { - // control points cross infinity, therefore partials are undefined - setstepsize( mapdesc->maxrate ); - } - } - } -} - -int -Curve::needsSamplingSubdivision( void ) -{ - return ( stepsize < minstepsize ) ? 1 : 0; -} - -int -Curve::cullCheck( void ) -{ - if( cullval == CULL_ACCEPT ) - cullval = mapdesc->cullCheck( cpts, order, stride ); - return cullval; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/curve.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/curve.h deleted file mode 100644 index 7b7bd3dc89..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/curve.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * curve.h - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/curve.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#ifndef __glucurve_h_ -#define __glucurve_h_ - -#include "types.h" -#include "defines.h" - -class Mapdesc; -class Quilt; - - -class Curve { -public: -friend class Curvelist; - Curve( Quilt *, REAL, REAL, Curve * ); - Curve( Curve&, REAL, Curve * ); - Curve * next; -private: - Mapdesc * mapdesc; - int stride; - int order; - int cullval; - int needsSampling; - REAL cpts[MAXORDER*MAXCOORDS]; - REAL spts[MAXORDER*MAXCOORDS]; - REAL stepsize; - REAL minstepsize; - REAL range[3]; - - void clamp( void ); - void setstepsize( REAL ); - void getstepsize( void ); - int cullCheck( void ); - int needsSamplingSubdivision( void ); -}; -#endif /* __glucurve_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/curvelist.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/curvelist.cc deleted file mode 100644 index e763c62945..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/curvelist.cc +++ /dev/null @@ -1,112 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * curvelist.c++ - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/curvelist.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "quilt.h" -#include "curvelist.h" -#include "curve.h" -#include "nurbsconsts.h" -#include "types.h" - -Curvelist::Curvelist( Quilt *quilts, REAL pta, REAL ptb ) -{ - curve = 0; - for( Quilt *q = quilts; q; q = q->next ) - curve = new Curve( q, pta, ptb, curve ); - range[0] = pta; - range[1] = ptb; - range[2] = ptb - pta; -} - -Curvelist::Curvelist( Curvelist &upper, REAL value ) -{ - Curvelist &lower = *this; - curve = 0; - for( Curve *c = upper.curve; c; c = c->next ) - curve = new Curve( *c, value, curve ); - - lower.range[0] = upper.range[0]; - lower.range[1] = value; - lower.range[2] = value - upper.range[0]; - upper.range[0] = value; - upper.range[2] = upper.range[1] - value; -} - -Curvelist::~Curvelist() -{ - while( curve ) { - Curve *c = curve; - curve = curve->next; - delete c; - } -} - -int -Curvelist::cullCheck( void ) -{ - for( Curve *c = curve; c; c = c->next ) - if( c->cullCheck() == CULL_TRIVIAL_REJECT ) - return CULL_TRIVIAL_REJECT; - return CULL_ACCEPT; -} - -void -Curvelist::getstepsize( void ) -{ - stepsize = range[2]; - Curve *c; - for( c = curve; c; c = c->next ) { - c->getstepsize(); - c->clamp(); - stepsize = ((c->stepsize < stepsize) ? c->stepsize : stepsize); - if( c->needsSamplingSubdivision() ) break; - } - needsSubdivision = ( c ) ? 1 : 0; -} - -int -Curvelist::needsSamplingSubdivision( void ) -{ - return needsSubdivision; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/curvelist.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/curvelist.h deleted file mode 100644 index d285fb5b98..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/curvelist.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * curvelist.h - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/curvelist.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#ifndef __glucurvelist_h_ -#define __glucurvelist_h_ - -#include "types.h" -#include "defines.h" - -class Mapdesc; -class Quilt; -class Curve; - -class Curvelist -{ -friend class Subdivider; -public: - Curvelist( Quilt *, REAL, REAL ); - Curvelist( Curvelist &, REAL ); - ~Curvelist( void ); - int cullCheck( void ); - void getstepsize( void ); - int needsSamplingSubdivision(); -private: - Curve *curve; - float range[3]; - int needsSubdivision; - float stepsize; -}; -#endif /* __glucurvelist_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/curvesub.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/curvesub.cc deleted file mode 100644 index 11b15e4174..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/curvesub.cc +++ /dev/null @@ -1,105 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * curvesub.c++ - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/curvesub.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "subdivider.h" -#include "renderhints.h" -#include "backend.h" -#include "quilt.h" -#include "curvelist.h" -#include "curve.h" -#include "nurbsconsts.h" - -/*-------------------------------------------------------------------------- - * drawCurves - main curve rendering entry point - *-------------------------------------------------------------------------- - */ - -void -Subdivider::drawCurves( void ) -{ - REAL from[1], to[1]; - Flist bpts; - qlist->getRange( from, to, bpts ); - - renderhints.init( ); - - backend.bgncurv(); - for( int i=bpts.start; idownloadAll( &pta, &ptb, backend ); - - Curvelist curvelist( qlist, pta, ptb ); - samplingSplit( curvelist, renderhints.maxsubdivisions ); - } - backend.endcurv(); -} - - -/*-------------------------------------------------------------------------- - * samplingSplit - recursively subdivide patch, cull check each subpatch - *-------------------------------------------------------------------------- - */ - -void -Subdivider::samplingSplit( Curvelist& curvelist, int subdivisions ) -{ - if( curvelist.cullCheck() == CULL_TRIVIAL_REJECT ) return; - - curvelist.getstepsize(); - - if( curvelist.needsSamplingSubdivision() && (subdivisions > 0) ) { - REAL mid = ( curvelist.range[0] + curvelist.range[1] ) * 0.5; - Curvelist lowerlist( curvelist, mid ); - samplingSplit( lowerlist, subdivisions-1 ); // lower - samplingSplit( curvelist, subdivisions-1 ); // upper - } else { - long nu = 1 + ((long) (curvelist.range[2] / curvelist.stepsize)); - backend.curvgrid( curvelist.range[0], curvelist.range[1], nu ); - backend.curvmesh( 0, nu ); - } -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/dataTransform.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/dataTransform.cc deleted file mode 100644 index 5d5205fee6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/dataTransform.cc +++ /dev/null @@ -1,211 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2005/10/28 13:09:08 $ $Revision: 1.1.30.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/dataTransform.cc,v 1.1.30.1 2005/10/28 13:09:08 brianp Exp $ -*/ - -#include -#include -#include "glimports.h" -#include "myassert.h" -#include "nurbsconsts.h" -#include "trimvertex.h" -#include "dataTransform.h" - -extern directedLine* arcLoopToDLineLoop(Arc_ptr loop); - -#if 0 // UNUSED -static directedLine* copy_loop(Arc_ptr loop, Real2* vertArray, int& index, directedLine dline_buf[], sampledLine sline_buf[], int& index_dline) -{ - directedLine *ret; - int old_index = index; - int i = index; - int j; - for(j=0; jpwlArc->npts-1; j++, i++) - { - vertArray[i][0] = loop->pwlArc->pts[j].param[0]; - vertArray[i][1] = loop->pwlArc->pts[j].param[1]; - } - loop->clearmark(); - - for(Arc_ptr jarc = loop->next; jarc != loop; jarc=jarc->next) - { - for(j=0; jpwlArc->npts-1; j++, i++) - { - vertArray[i][0] = jarc->pwlArc->pts[j].param[0]; - vertArray[i][1] = jarc->pwlArc->pts[j].param[1]; - } - jarc->clearmark(); - } - //copy the first vertex again - vertArray[i][0] = loop->pwlArc->pts[0].param[0]; - vertArray[i][1] = loop->pwlArc->pts[0].param[1]; - i++; - index=i; - - directedLine* dline; - sampledLine* sline; - sline = &sline_buf[index_dline]; - dline = &dline_buf[index_dline]; - sline->init(2, &vertArray[old_index]); - dline->init(INCREASING, sline); - ret = dline; - index_dline++; - - for(i=old_index+1; i<= index-2; i++) - { - sline = &sline_buf[index_dline]; - dline = &dline_buf[index_dline]; - sline->init(2, &vertArray[i]); - dline->init(INCREASING, sline); - ret->insert(dline); - index_dline++; - } - return ret; -} -#endif - -#if 0 // UNUSED -static int num_edges(Bin& bin) -{ - int sum=0; - for(Arc_ptr jarc = bin.firstarc(); jarc; jarc=bin.nextarc()) - sum += jarc->pwlArc->npts-1; - return sum; -} -#endif - -/* -directedLine* bin_to_DLineLoops(Bin& bin) -{ - directedLine *ret=NULL; - directedLine *temp; - - int numedges = num_edges(bin); - directedLine* dline_buf = new directedLine[numedges]; //not work for N32? - sampledLine* sline_buf=new sampledLine[numedges]; - - Real2* vertArray = new Real2[numedges*2]; - int index = 0; - int index_dline = 0; - bin.markall(); - - for(Arc_ptr jarc = bin.firstarc(); jarc; jarc=bin.nextarc()) - { - if(jarc->ismarked()) - { - assert(jarc->check() != 0); - Arc_ptr jarchead = jarc; - do { - jarc->clearmark(); - jarc = jarc->next; - } while(jarc != jarchead); - temp=copy_loop(jarchead, vertArray, index, dline_buf, sline_buf, index_dline); - ret = temp->insertPolygon(ret); - } - } - - return ret; -} -*/ - - -directedLine* bin_to_DLineLoops(Bin& bin) -{ - directedLine *ret=NULL; - directedLine *temp; - bin.markall(); - for(Arc_ptr jarc=bin.firstarc(); jarc; jarc=bin.nextarc()){ - if(jarc->ismarked()) { - assert(jarc->check() != 0); - Arc_ptr jarchead = jarc; - do { - jarc->clearmark(); - jarc = jarc->next; - } while(jarc != jarchead); - temp = arcLoopToDLineLoop(jarc); - ret = temp->insertPolygon(ret); - } - } - return ret; -} - -directedLine* o_pwlcurve_to_DLines(directedLine* original, O_pwlcurve* pwl) -{ - directedLine* ret = original; - for(Int i=0; inpts-1; i++) - { - sampledLine* sline = new sampledLine(2); - sline->setPoint(0, pwl->pts[i].param); - sline->setPoint(1, pwl->pts[i+1].param); - directedLine* dline = new directedLine(INCREASING, sline); - if(ret == NULL) - ret = dline; - else - ret->insert(dline); - } - return ret; -} - -directedLine* o_curve_to_DLineLoop(O_curve* cur) -{ - directedLine *ret; - if(cur == NULL) - return NULL; - assert(cur->curvetype == ct_pwlcurve); - ret = o_pwlcurve_to_DLines(NULL, cur->curve.o_pwlcurve); - for(O_curve* temp = cur->next; temp != NULL; temp = temp->next) - { - assert(temp->curvetype == ct_pwlcurve); - ret = o_pwlcurve_to_DLines(ret, temp->curve.o_pwlcurve); - } - return ret; -} - -directedLine* o_trim_to_DLineLoops(O_trim* trim) -{ - O_trim* temp; - directedLine *ret; - if(trim == NULL) - return NULL; - ret = o_curve_to_DLineLoop(trim->o_curve); - - for(temp=trim->next; temp != NULL; temp = temp->next) - { - ret = ret->insertPolygon(o_curve_to_DLineLoop(temp->o_curve)); - } - return ret; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/dataTransform.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/dataTransform.h deleted file mode 100644 index 1032896f13..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/dataTransform.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/dataTransform.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ -*/ - -#ifndef _DATA_TRANSFORM_H -#define _DATA_TRANSFORM_H - -#include "reader.h" -#include "directedLine.h" -#include "bin.h" -directedLine* bin_to_DLineLoops(Bin& bin); - -/*transform the pwlcurve into a number of directedline lines - *insert these directedlines into orignal which is supposed to be - *the part of the trimming loop obtained so far. - *return the updated trimkming loop. - */ -directedLine* o_pwlcurve_to_DLines(directedLine* original, O_pwlcurve* pwl); - -/*transform a trim loop (curve) into a directedLine loop - */ -directedLine* o_curve_to_DLineLoop(O_curve* curve); - -/*transform a list of trim loops (trim) into - *a list of polygons represented as directedLine*. - */ -directedLine* o_trim_to_DLineLoops(O_trim* trim); - - -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/defines.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/defines.h deleted file mode 100644 index 77b6088acc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/defines.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * defines.h - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/defines.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#ifndef __gludefines_h_ -#define __gludefines_h_ - -/* culling constants */ -#define CULL_TRIVIAL_REJECT 0 -#define CULL_TRIVIAL_ACCEPT 1 -#define CULL_ACCEPT 2 - -/* maximum order of a B-Spline */ -#define MAXORDER 24 - -/* maximum dimension of any B-spline range space */ -#define MAXCOORDS 5 - -#endif /* __gludefines_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/displaylist.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/displaylist.cc deleted file mode 100644 index 4b39a8991d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/displaylist.cc +++ /dev/null @@ -1,84 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * displaylist.c++ - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/displaylist.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#include "glimports.h" -#include "mystdio.h" -#include "nurbstess.h" -#include "displaylist.h" - - -DisplayList::DisplayList( NurbsTessellator *_nt ) : - dlnodePool( sizeof( Dlnode ), 1, "dlnodepool" ) -{ - lastNode = &nodes; - nt = _nt; -} - -DisplayList::~DisplayList( void ) -{ - for( Dlnode *nextNode; nodes; nodes = nextNode ) { - nextNode = nodes->next; - if( nodes->cleanup != 0 ) (nt->*nodes->cleanup)( nodes->arg ); - //nodes->deleteMe(dlnodePool); - } -} - -void -DisplayList::play( void ) -{ - for( Dlnode *node = nodes; node; node = node->next ) - if( node->work != 0 ) (nt->*node->work)( node->arg ); -} - -void -DisplayList::endList( void ) -{ - *lastNode = 0; -} - -void -DisplayList::append( PFVS work, void *arg, PFVS cleanup ) -{ - Dlnode *node = new(dlnodePool) Dlnode( work, arg, cleanup ); - *lastNode = node; - lastNode = &(node->next); -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/displaylist.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/displaylist.h deleted file mode 100644 index 13cadaeae8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/displaylist.h +++ /dev/null @@ -1,84 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * displaylist.h - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/displaylist.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#ifndef __gludisplaylist_h_ -#define __gludisplaylist_h_ - -#include "glimports.h" -#include "mysetjmp.h" -#include "mystdio.h" -#include "bufpool.h" - -class NurbsTessellator; - -typedef void (NurbsTessellator::*PFVS)( void * ); - -struct Dlnode : public PooledObj { - Dlnode( PFVS, void *, PFVS ); - PFVS work; - void * arg; - PFVS cleanup; - Dlnode * next; -}; - -inline -Dlnode::Dlnode( PFVS _work, void *_arg, PFVS _cleanup ) -{ - work = _work; - arg = _arg; - cleanup = _cleanup; -} - -class DisplayList { -public: - DisplayList( NurbsTessellator * ); - ~DisplayList( void ); - void play( void ); - void append( PFVS work, void *arg, PFVS cleanup ); - void endList( void ); -private: - Dlnode *nodes; - Pool dlnodePool; - Dlnode **lastNode; - NurbsTessellator *nt; -}; - -#endif /* __gludisplaylist_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/displaymode.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/displaymode.h deleted file mode 100644 index 791434e6d2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/displaymode.h +++ /dev/null @@ -1,47 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/displaymode.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ -*/ - -#ifndef __gludisplaymode_h_ -#define __gludisplaymode_h_ - -#define N_MESHFILL 0 -#define N_MESHLINE 1 -#define N_MESHPOINT 2 - -#endif /* __gludisplaymode_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/flist.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/flist.cc deleted file mode 100644 index 21414fd736..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/flist.cc +++ /dev/null @@ -1,120 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * flist.c++ - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/flist.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "flist.h" - -/*---------------------------------------------------------------------------- - * Flist::Flist - initialize a REAL number array - *---------------------------------------------------------------------------- - */ -Flist::Flist( void ) -{ - npts = 0; - pts = 0; - start = end = 0; -} - -/*---------------------------------------------------------------------------- - * Flist::~Flist - free a REAL number array - *---------------------------------------------------------------------------- - */ -Flist::~Flist( void ) -{ - if( npts ) delete[] pts; -} - -void -Flist::add( REAL x ) -{ - pts[end++] = x; - assert( end <= npts ); -} - -/*---------------------------------------------------------------------------- - * Flist::filter - remove duplicate numbers from array - *---------------------------------------------------------------------------- - */ -void Flist::filter( void ) -{ - sorter.qsort( pts, end ); - start = 0; - - int j = 0; - for( int i = 1; i < end; i++ ) { - if( pts[i] == pts[i-j-1] ) - j++; - pts[i-j] = pts[i]; - } - end -= j; -} - -/*---------------------------------------------------------------------------- - * Flist::grow - ensure that array is large enough - *---------------------------------------------------------------------------- - */ -void Flist::grow( int maxpts ) -{ - if( npts < maxpts ) { - if( npts ) delete[] pts; - npts = 2 * maxpts; - pts = new REAL[npts]; - assert( pts != 0 ); - } - start = end = 0; -} - -/*---------------------------------------------------------------------------- - * Flist::taper - ignore head and tail of array - *---------------------------------------------------------------------------- - */ -void Flist::taper( REAL from, REAL to ) -{ - while( pts[start] != from ) - start++; - - while( pts[end-1] != to ) - end--; -} - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/flist.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/flist.h deleted file mode 100644 index 8450caad45..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/flist.h +++ /dev/null @@ -1,65 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * flist.h - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/flist.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#ifndef __gluflist_h_ -#define __gluflist_h_ - -#include "types.h" -#include "flistsorter.h" - -class Flist { -public: - REAL * pts; /* head of array */ - int npts; /* number of points in array */ - int start; /* first important point index */ - int end; /* last important point index */ - - Flist( void ); - ~Flist( void ); - void add( REAL x ); - void filter( void ); - void grow( int); - void taper( REAL , REAL ); -protected: - FlistSorter sorter; -}; - -#endif /* __gluflist_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/flistsorter.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/flistsorter.cc deleted file mode 100644 index 730613224c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/flistsorter.cc +++ /dev/null @@ -1,83 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * flistsorter.c++ - * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/flistsorter.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ - */ - -#include "glimports.h" -#include "flistsorter.h" - -FlistSorter::FlistSorter( void ) : Sorter( sizeof( REAL ) ) -{ -} - -void -FlistSorter::qsort( REAL *p, int n ) -{ - Sorter::qsort( (char *)p, n ); -} - -int -FlistSorter::qscmp( char *i, char *j ) -{ - REAL f0 = *(REAL *)i; - REAL f1 = *(REAL *)j; - return (f0 < f1) ? -1 : 1; -} - -void -FlistSorter::qsexc( char *i, char *j ) -{ - REAL *f0 = (REAL *)i; - REAL *f1 = (REAL *)j; - REAL tmp = *f0; - *f0 = *f1; - *f1 = tmp; -} - -void -FlistSorter::qstexc( char *i, char *j, char *k ) -{ - REAL *f0 = (REAL *)i; - REAL *f1 = (REAL *)j; - REAL *f2 = (REAL *)k; - REAL tmp = *f0; - *f0 = *f2; - *f2 = *f1; - *f1 = tmp; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/flistsorter.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/flistsorter.h deleted file mode 100644 index e8d373620a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/flistsorter.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * flistsorter.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/flistsorter.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __gluflistsorter_h_ -#define __gluflistsorter_h_ - -#include "sorter.h" -#include "types.h" - -class FlistSorter : public Sorter { -public: - FlistSorter(void); - void qsort( REAL *a, int n ); - -protected: - virtual int qscmp( char *, char * ); - virtual void qsexc( char *i, char *j ); // i<-j, j<-i - virtual void qstexc( char *i, char *j, char *k ); // i<-k, k<-j, j<-i -}; -#endif /* __gluflistsorter_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/gridline.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/gridline.h deleted file mode 100644 index 32b70bbb29..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/gridline.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * gridline.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/gridline.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glugridline_h_ -#define __glugridline_h_ - -struct Gridline { - long v; - REAL vval; - long vindex; - long ustart; - long uend; - }; -#endif /* __glugridline_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/gridtrimvertex.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/gridtrimvertex.h deleted file mode 100644 index 70a7029c54..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/gridtrimvertex.h +++ /dev/null @@ -1,95 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * gridtrimvertex.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/gridtrimvertex.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glugridtrimvertex_h_ -#define __glugridtrimvertex_h_ - -#include "mystdlib.h" -#include "bufpool.h" -#include "trimvertex.h" -#include "gridvertex.h" - -class GridTrimVertex : public PooledObj -{ -private: - TrimVertex dummyt; - GridVertex dummyg; -public: - GridTrimVertex() { g = 0; t = 0; } - TrimVertex *t; - GridVertex *g; - - inline void set( long, long ); - inline void set( REAL, REAL ); - inline void set( TrimVertex * ); - inline void clear( void ) { t = 0; g = 0; }; - inline int isGridVert() { return g ? 1 : 0 ; } - inline int isTrimVert() { return t ? 1 : 0 ; } - inline void output(); -}; - -inline void -GridTrimVertex::set( long x, long y ) -{ - g = &dummyg; - dummyg.gparam[0] = x; - dummyg.gparam[1] = y; -} - -inline void -GridTrimVertex::set( REAL x, REAL y ) -{ - g = 0; - t = &dummyt; - dummyt.param[0] = x; - dummyt.param[1] = y; - dummyt.nuid = 0; -} - -inline void -GridTrimVertex::set( TrimVertex *v ) -{ - g = 0; - t = v; -} - -typedef GridTrimVertex *GridTrimVertex_p; -#endif /* __glugridtrimvertex_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/gridvertex.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/gridvertex.h deleted file mode 100644 index 2eac57386a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/gridvertex.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * gridvertex.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/gridvertex.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glugridvertex_h_ -#define __glugridvertex_h_ - -struct GridVertex { - long gparam[2]; - GridVertex( void ) {} - GridVertex( long u, long v ) { gparam[0] = u, gparam[1] = v; } - void set( long u, long v ) { gparam[0] = u, gparam[1] = v; } - long nextu() { return gparam[0]++; } - long prevu() { return gparam[0]--; } -}; - -#endif /* __glugridvertex_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/hull.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/hull.cc deleted file mode 100644 index 75f7c160d6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/hull.cc +++ /dev/null @@ -1,167 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * hull.c++ - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/hull.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "hull.h" -#include "gridvertex.h" -#include "gridtrimvertex.h" -#include "gridline.h" -#include "trimline.h" -#include "uarray.h" -#include "trimregion.h" - -Hull::Hull( void ) -{} - -Hull::~Hull( void ) -{} - -/*---------------------------------------------------------------------- - * Hull:init - this routine does the initialization needed before any - * calls to nextupper or nextlower can be made. - *---------------------------------------------------------------------- - */ -void -Hull::init( void ) -{ - TrimVertex *lfirst = left.first(); - TrimVertex *llast = left.last(); - if( lfirst->param[0] <= llast->param[0] ) { - fakeleft.init( left.first() ); - upper.left = &fakeleft; - lower.left = &left; - } else { - fakeleft.init( left.last() ); - lower.left = &fakeleft; - upper.left = &left; - } - upper.left->last(); - lower.left->first(); - - if( top.ustart <= top.uend ) { - upper.line = ⊤ - upper.index = top.ustart; - } else - upper.line = 0; - - if( bot.ustart <= bot.uend ) { - lower.line = ⊥ - lower.index = bot.ustart; - } else - lower.line = 0; - - TrimVertex *rfirst = right.first(); - TrimVertex *rlast = right.last(); - if( rfirst->param[0] <= rlast->param[0] ) { - fakeright.init( right.last() ); - lower.right = &fakeright; - upper.right = &right; - } else { - fakeright.init( right.first() ); - upper.right = &fakeright; - lower.right = &right; - } - upper.right->first(); - lower.right->last(); -} - -/*---------------------------------------------------------------------- - * nextupper - find next vertex on upper hull of trim region. - * - if vertex is on trim curve, set vtop point to - * that vertex. if vertex is on grid, set vtop to - * point to temporary area and stuff coordinants into - * temporary vertex. Also, place grid coords in temporary - * grid vertex. - *---------------------------------------------------------------------- - */ -GridTrimVertex * -Hull::nextupper( GridTrimVertex *gv ) -{ - if( upper.left ) { - gv->set( upper.left->prev() ); - if( gv->isTrimVert() ) return gv; - upper.left = 0; - } - - if( upper.line ) { - assert( upper.index <= upper.line->uend ); - gv->set( uarray.uarray[upper.index], upper.line->vval ); - gv->set( upper.index, upper.line->vindex ); - if( upper.index++ == upper.line->uend ) upper.line = 0; - return gv; - } - - if( upper.right ) { - gv->set( upper.right->next() ); - if( gv->isTrimVert() ) return gv; - upper.right = 0; - } - - return 0; -} - -GridTrimVertex * -Hull::nextlower( register GridTrimVertex *gv ) -{ - if( lower.left ) { - gv->set( lower.left->next() ); - if( gv->isTrimVert() ) return gv; - lower.left = 0; - } - - if( lower.line ) { - gv->set( uarray.uarray[lower.index], lower.line->vval ); - gv->set( lower.index, lower.line->vindex ); - if( lower.index++ == lower.line->uend ) lower.line = 0; - return gv; - } - - if( lower.right ) { - gv->set( lower.right->prev() ); - if( gv->isTrimVert() ) return gv; - lower.right = 0; - } - - return 0; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/hull.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/hull.h deleted file mode 100644 index 34f1593a3e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/hull.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * hull.h - * - * $Date: 2001/08/07 17:34:11 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/hull.h,v 1.2 2001/08/07 17:34:11 brianp Exp $ - */ - -#ifndef __gluhull_h_ -#define __gluhull_h_ - -#include "trimline.h" -#include "trimregion.h" -#include "trimvertex.h" -#include "gridtrimvertex.h" - -struct Gridline; -class Uarray; - -class Hull : virtual public TrimRegion { -public: - Hull( void ); - ~Hull( void ); - void init( void ); - GridTrimVertex * nextlower( GridTrimVertex * ); - GridTrimVertex * nextupper( GridTrimVertex * ); -private: - struct Side { - Trimline *left; - Gridline *line; - Trimline *right; - long index; - }; - - Side lower; - Side upper; - Trimline fakeleft; - Trimline fakeright; -}; - - -#endif /* __gluhull_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/intersect.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/intersect.cc deleted file mode 100644 index 2a23cfa6bc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/intersect.cc +++ /dev/null @@ -1,667 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * intersect.c++ - * - * $Date: 2005/10/28 13:09:08 $ $Revision: 1.2.8.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/intersect.cc,v 1.2.8.1 2005/10/28 13:09:08 brianp Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "subdivider.h" -#include "arc.h" -#include "bin.h" -#include "backend.h" -#include "trimvertpool.h" - -/*#define NOTDEF*/ - -enum i_result { INTERSECT_VERTEX, INTERSECT_EDGE }; - -/* local functions */ -#ifndef NDEBUG // for asserts only -static int arc_classify( Arc_ptr, int, REAL ); -#endif -static enum i_result pwlarc_intersect( PwlArc *, int, REAL, int, int[3] ); - - -void -Subdivider::partition( Bin & bin, Bin & left, Bin & intersections, - Bin & right, Bin & unknown, int param, REAL value ) -{ - Bin headonleft, headonright, tailonleft, tailonright; - - for( Arc_ptr jarc = bin.removearc(); jarc; jarc = bin.removearc() ) { - - REAL tdiff = jarc->tail()[param] - value; - REAL hdiff = jarc->head()[param] - value; - - if( tdiff > 0.0 ) { - if( hdiff > 0.0 ) { - right.addarc( jarc ); - } else if( hdiff == 0.0 ) { - tailonright.addarc( jarc ); - } else { - Arc_ptr jtemp; - switch( arc_split(jarc, param, value, 0) ) { - case 2: - tailonright.addarc( jarc ); - headonleft.addarc( jarc->next ); - break; - case 31: - assert( jarc->head()[param] > value ); - right.addarc( jarc ); - tailonright.addarc( jtemp = jarc->next ); - headonleft.addarc( jtemp->next ); - break; - case 32: - assert( jarc->head()[param] <= value ); - tailonright .addarc( jarc ); - headonleft.addarc( jtemp = jarc->next ); - left.addarc( jtemp->next ); - break; - case 4: - right.addarc( jarc ); - tailonright.addarc( jtemp = jarc->next ); - headonleft.addarc( jtemp = jtemp->next ); - left.addarc( jtemp->next ); - } - } - } else if( tdiff == 0.0 ) { - if( hdiff > 0.0 ) { - headonright.addarc( jarc ); - } else if( hdiff == 0.0 ) { - unknown.addarc( jarc ); - } else { - headonleft.addarc( jarc ); - } - } else { - if( hdiff > 0.0 ) { - Arc_ptr jtemp; - switch( arc_split(jarc, param, value, 1) ) { - case 2: - tailonleft.addarc( jarc ); - headonright.addarc( jarc->next ); - break; - case 31: - assert( jarc->head()[param] < value ); - left.addarc( jarc ); - tailonleft.addarc( jtemp = jarc->next ); - headonright.addarc( jtemp->next ); - break; - case 32: - assert( jarc->head()[param] >= value ); - tailonleft.addarc( jarc ); - headonright.addarc( jtemp = jarc->next ); - right.addarc( jtemp->next ); - break; - case 4: - left.addarc( jarc ); - tailonleft.addarc( jtemp = jarc->next ); - headonright.addarc( jtemp = jtemp->next ); - right.addarc( jtemp->next ); - } - } else if( hdiff == 0.0 ) { - tailonleft.addarc( jarc ); - } else { - left.addarc( jarc ); - } - } - } - if( param == 0 ) { - classify_headonleft_s( headonleft, intersections, left, value ); - classify_tailonleft_s( tailonleft, intersections, left, value ); - classify_headonright_s( headonright, intersections, right, value ); - classify_tailonright_s( tailonright, intersections, right, value ); - } else { - classify_headonleft_t( headonleft, intersections, left, value ); - classify_tailonleft_t( tailonleft, intersections, left, value ); - classify_headonright_t( headonright, intersections, right, value ); - classify_tailonright_t( tailonright, intersections, right, value ); - } -} - -inline static void -vert_interp( TrimVertex *n, TrimVertex *l, TrimVertex *r, int p, REAL val ) -{ - assert( val > l->param[p]); - assert( val < r->param[p]); - - n->nuid = l->nuid; - - n->param[p] = val; - if( l->param[1-p] != r->param[1-p] ) { - REAL ratio = (val - l->param[p]) / (r->param[p] - l->param[p]); - n->param[1-p] = l->param[1-p] + - ratio * (r->param[1-p] - l->param[1-p]); - } else { - n->param[1-p] = l->param[1-p]; - } -} - -int -Subdivider::arc_split( Arc_ptr jarc, int param, REAL value, int dir ) -{ - int maxvertex = jarc->pwlArc->npts; - Arc_ptr jarc1; - TrimVertex* v = jarc->pwlArc->pts; - - int loc[3]; - switch( pwlarc_intersect( jarc->pwlArc, param, value, dir, loc ) ) { - - // When the parameter value lands on a vertex, life is sweet - case INTERSECT_VERTEX: { - jarc1 = new(arcpool) Arc( jarc, new( pwlarcpool) PwlArc( maxvertex-loc[1], &v[loc[1]] ) ); - jarc->pwlArc->npts = loc[1] + 1; - jarc1->next = jarc->next; - jarc1->next->prev = jarc1; - jarc->next = jarc1; - jarc1->prev = jarc; - assert(jarc->check() != 0); - return 2; - } - - // When the parameter value intersects an edge, we have to - // interpolate a new vertex. There are special cases - // if the new vertex is adjacent to one or both of the - // endpoints of the arc. - case INTERSECT_EDGE: { - int i, j; - if( dir == 0 ) { - i = loc[0]; - j = loc[2]; - } else { - i = loc[2]; - j = loc[0]; - } - -#ifndef NOTDEF - // The split is between vertices at index j and i, in that - // order (j < i) - - // JEB: This code is my idea of how to do the split without - // increasing the number of links. I'm doing this so that - // the is_rect routine can recognize rectangles created by - // subdivision. In exchange for simplifying the curve list, - // however, it costs in allocated space and vertex copies. - - TrimVertex *newjunk = trimvertexpool.get(maxvertex -i+1 /*-j*/); - int k; - for(k=0; knuid; - } - - TrimVertex *vcopy = trimvertexpool.get(maxvertex); - for(k=0; kpwlArc->pts=vcopy; - - v[i].nuid = jarc->nuid; - v[j].nuid = jarc->nuid; - vert_interp( &newjunk[0], &v[loc[0]], &v[loc[2]], param, value ); - - if( showingDegenerate() ) - backend.triangle( &v[i], &newjunk[0], &v[j] ); - - vcopy[j+1].param[0]=newjunk[0].param[0]; - vcopy[j+1].param[1]=newjunk[0].param[1]; - - - jarc1 = new(arcpool) Arc( jarc, - new(pwlarcpool) PwlArc(maxvertex-i+1 , newjunk ) ); - - jarc->pwlArc->npts = j+2; - jarc1->next = jarc->next; - jarc1->next->prev = jarc1; - jarc->next = jarc1; - jarc1->prev = jarc; - assert(jarc->check() != 0); - - return 2; -#endif //not NOTDEF - // JEB: This is the original version: -#ifdef NOTDEF - Arc_ptr jarc2, jarc3; - - TrimVertex *newjunk = trimvertexpool.get(3); - v[i].nuid = jarc->nuid; - v[j].nuid = jarc->nuid; - newjunk[0] = v[j]; - newjunk[2] = v[i]; - vert_interp( &newjunk[1], &v[loc[0]], &v[loc[2]], param, value ); - - if( showingDegenerate() ) - backend.triangle( &newjunk[2], &newjunk[1], &newjunk[0] ); - - // New vertex adjacent to both endpoints - if (maxvertex == 2) { - jarc1 = new(arcpool) Arc( jarc, new(pwlarcpool) PwlArc( 2, newjunk+1 ) ); - jarc->pwlArc->npts = 2; - jarc->pwlArc->pts = newjunk; - jarc1->next = jarc->next; - jarc1->next->prev = jarc1; - jarc->next = jarc1; - jarc1->prev = jarc; - assert(jarc->check() != 0); - - return 2; - - // New vertex adjacent to ending point of arc - } else if (maxvertex - j == 2) { - jarc1 = new(arcpool) Arc( jarc, new(pwlarcpool) PwlArc( 2, newjunk ) ); - jarc2 = new(arcpool) Arc( jarc, new(pwlarcpool) PwlArc( 2, newjunk+1 ) ); - jarc->pwlArc->npts = maxvertex-1; - jarc2->next = jarc->next; - jarc2->next->prev = jarc2; - jarc->next = jarc1; - jarc1->prev = jarc; - jarc1->next = jarc2; - jarc2->prev = jarc1; - assert(jarc->check() != 0); - return 31; - - // New vertex adjacent to starting point of arc - } else if (i == 1) { - jarc1 = new(arcpool) Arc( jarc, new(pwlarcpool) PwlArc( 2, newjunk+1 ) ); - jarc2 = new(arcpool) Arc( jarc, - new(pwlarcpool) PwlArc( maxvertex-1, &jarc->pwlArc->pts[1] ) ); - jarc->pwlArc->npts = 2; - jarc->pwlArc->pts = newjunk; - jarc2->next = jarc->next; - jarc2->next->prev = jarc2; - jarc->next = jarc1; - jarc1->prev = jarc; - jarc1->next = jarc2; - jarc2->prev = jarc1; - assert(jarc->check() != 0); - return 32; - - // It's somewhere in the middle - } else { - jarc1 = new(arcpool) Arc( jarc, new(pwlarcpool) PwlArc( 2, newjunk ) ); - jarc2 = new(arcpool) Arc( jarc, new(pwlarcpool) PwlArc( 2, newjunk+1 ) ); - jarc3 = new(arcpool) Arc( jarc, new(pwlarcpool) PwlArc( maxvertex-i, v+i ) ); - jarc->pwlArc->npts = j + 1; - jarc3->next = jarc->next; - jarc3->next->prev = jarc3; - jarc->next = jarc1; - jarc1->prev = jarc; - jarc1->next = jarc2; - jarc2->prev = jarc1; - jarc2->next = jarc3; - jarc3->prev = jarc2; - assert(jarc->check() != 0); - return 4; - } -#endif // NOTDEF - } - default: - return -1; //picked -1 since it's not used - } -} - -/*---------------------------------------------------------------------------- - * pwlarc_intersect - find intersection of pwlArc and isoparametric line - *---------------------------------------------------------------------------- - */ - -static enum i_result -pwlarc_intersect( - PwlArc *pwlArc, - int param, - REAL value, - int dir, - int loc[3] ) -{ - assert( pwlArc->npts > 0 ); - - if( dir ) { - TrimVertex *v = pwlArc->pts; - int imin = 0; - int imax = pwlArc->npts - 1; - assert( value > v[imin].param[param] ); - assert( value < v[imax].param[param] ); - while( (imax - imin) > 1 ) { - int imid = (imax + imin)/2; - if( v[imid].param[param] > value ) - imax = imid; - else if( v[imid].param[param] < value ) - imin = imid; - else { - loc[1] = imid; - return INTERSECT_VERTEX; - } - } - loc[0] = imin; - loc[2] = imax; - return INTERSECT_EDGE; - } else { - TrimVertex *v = pwlArc->pts; - int imax = 0; - int imin = pwlArc->npts - 1; - assert( value > v[imin].param[param] ); - assert( value < v[imax].param[param] ); - while( (imin - imax) > 1 ) { - int imid = (imax + imin)/2; - if( v[imid].param[param] > value ) - imax = imid; - else if( v[imid].param[param] < value ) - imin = imid; - else { - loc[1] = imid; - return INTERSECT_VERTEX; - } - } - loc[0] = imin; - loc[2] = imax; - return INTERSECT_EDGE; - } -} - -/*---------------------------------------------------------------------------- - * arc_classify - determine which side of a line a jarc lies - *---------------------------------------------------------------------------- - */ - -#ifndef NDEBUG // for asserts only -static int -arc_classify( Arc_ptr jarc, int param, REAL value ) -{ - REAL tdiff, hdiff; - if( param == 0 ) { - tdiff = jarc->tail()[0] - value; - hdiff = jarc->head()[0] - value; - } else { - tdiff = jarc->tail()[1] - value; - hdiff = jarc->head()[1] - value; - } - - if( tdiff > 0.0 ) { - if( hdiff > 0.0 ) { - return 0x11; - } else if( hdiff == 0.0 ) { - return 0x12; - } else { - return 0x10; - } - } else if( tdiff == 0.0 ) { - if( hdiff > 0.0 ) { - return 0x21; - } else if( hdiff == 0.0 ) { - return 0x22; - } else { - return 0x20; - } - } else { - if( hdiff > 0.0 ) { - return 0x01; - } else if( hdiff == 0.0 ) { - return 0x02; - } else { - return 0; - } - } -} -#endif - -void -Subdivider::classify_tailonleft_s( Bin& bin, Bin& in, Bin& out, REAL val ) -{ - /* tail at left, head on line */ - Arc_ptr j; - - while( (j = bin.removearc()) != NULL ) { - assert( arc_classify( j, 0, val ) == 0x02 ); - j->clearitail(); - - REAL diff = j->next->head()[0] - val; - if( diff > 0.0 ) { - in.addarc( j ); - } else if( diff < 0.0 ) { - if( ccwTurn_sl( j, j->next ) ) - out.addarc( j ); - else - in.addarc( j ); - } else { - if( j->next->tail()[1] > j->next->head()[1] ) - in.addarc(j); - else - out.addarc(j); - } - } -} - -void -Subdivider::classify_tailonleft_t( Bin& bin, Bin& in, Bin& out, REAL val ) -{ - /* tail at left, head on line */ - Arc_ptr j; - - while( (j = bin.removearc()) != NULL ) { - assert( arc_classify( j, 1, val ) == 0x02 ); - j->clearitail(); - - REAL diff = j->next->head()[1] - val; - if( diff > 0.0 ) { - in.addarc( j ); - } else if( diff < 0.0 ) { - if( ccwTurn_tl( j, j->next ) ) - out.addarc( j ); - else - in.addarc( j ); - } else { - if (j->next->tail()[0] > j->next->head()[0] ) - out.addarc( j ); - else - in.addarc( j ); - } - } -} - -void -Subdivider::classify_headonleft_s( Bin& bin, Bin& in, Bin& out, REAL val ) -{ - /* tail on line, head at left */ - Arc_ptr j; - - while( (j = bin.removearc()) != NULL ) { - assert( arc_classify( j, 0, val ) == 0x20 ); - - j->setitail(); - - REAL diff = j->prev->tail()[0] - val; - if( diff > 0.0 ) { - out.addarc( j ); - } else if( diff < 0.0 ) { - if( ccwTurn_sl( j->prev, j ) ) - out.addarc( j ); - else - in.addarc( j ); - } else { - if( j->prev->tail()[1] > j->prev->head()[1] ) - in.addarc( j ); - else - out.addarc( j ); - } - } -} - -void -Subdivider::classify_headonleft_t( Bin& bin, Bin& in, Bin& out, REAL val ) -{ - /* tail on line, head at left */ - Arc_ptr j; - - while( (j = bin.removearc()) != NULL ) { - assert( arc_classify( j, 1, val ) == 0x20 ); - j->setitail(); - - REAL diff = j->prev->tail()[1] - val; - if( diff > 0.0 ) { - out.addarc( j ); - } else if( diff < 0.0 ) { - if( ccwTurn_tl( j->prev, j ) ) - out.addarc( j ); - else - in.addarc( j ); - } else { - if( j->prev->tail()[0] > j->prev->head()[0] ) - out.addarc( j ); - else - in.addarc( j ); - } - } -} - - -void -Subdivider::classify_tailonright_s( Bin& bin, Bin& in, Bin& out, REAL val ) -{ - /* tail at right, head on line */ - Arc_ptr j; - - while( (j = bin.removearc()) != NULL ) { - assert( arc_classify( j, 0, val ) == 0x12); - - j->clearitail(); - - REAL diff = j->next->head()[0] - val; - if( diff > 0.0 ) { - if( ccwTurn_sr( j, j->next ) ) - out.addarc( j ); - else - in.addarc( j ); - } else if( diff < 0.0 ) { - in.addarc( j ); - } else { - if( j->next->tail()[1] > j->next->head()[1] ) - out.addarc( j ); - else - in.addarc( j ); - } - } -} - -void -Subdivider::classify_tailonright_t( Bin& bin, Bin& in, Bin& out, REAL val ) -{ - /* tail at right, head on line */ - Arc_ptr j; - - while( (j = bin.removearc()) != NULL ) { - assert( arc_classify( j, 1, val ) == 0x12); - - j->clearitail(); - - REAL diff = j->next->head()[1] - val; - if( diff > 0.0 ) { - if( ccwTurn_tr( j, j->next ) ) - out.addarc( j ); - else - in.addarc( j ); - } else if( diff < 0.0 ) { - in.addarc( j ); - } else { - if( j->next->tail()[0] > j->next->head()[0] ) - in.addarc( j ); - else - out.addarc( j ); - } - } -} - -void -Subdivider::classify_headonright_s( Bin& bin, Bin& in, Bin& out, REAL val ) -{ - /* tail on line, head at right */ - Arc_ptr j; - - while( (j = bin.removearc()) != NULL ) { - assert( arc_classify( j, 0, val ) == 0x21 ); - - j->setitail(); - - REAL diff = j->prev->tail()[0] - val; - if( diff > 0.0 ) { - if( ccwTurn_sr( j->prev, j ) ) - out.addarc( j ); - else - in.addarc( j ); - } else if( diff < 0.0 ) { - out.addarc( j ); - } else { - if( j->prev->tail()[1] > j->prev->head()[1] ) - out.addarc( j ); - else - in.addarc( j ); - } - } -} - -void -Subdivider::classify_headonright_t( Bin& bin, Bin& in, Bin& out, REAL val ) -{ - /* tail on line, head at right */ - Arc_ptr j; - - while( (j = bin.removearc()) != NULL ) { - assert( arc_classify( j, 1, val ) == 0x21 ); - - j->setitail(); - - REAL diff = j->prev->tail()[1] - val; - if( diff > 0.0 ) { - if( ccwTurn_tr( j->prev, j ) ) - out.addarc( j ); - else - in.addarc( j ); - } else if( diff < 0.0 ) { - out.addarc( j ); - } else { - if( j->prev->tail()[0] > j->prev->head()[0] ) - in.addarc( j ); - else - out.addarc( j ); - } - } -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/jarcloc.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/jarcloc.h deleted file mode 100644 index 785234f6c0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/jarcloc.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * jarcloc.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/jarcloc.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glujarcloc_h_ -#define __glujarcloc_h_ - -#include "arc.h" - -class Jarcloc { -private: - Arc_ptr arc; - TrimVertex *p; - TrimVertex *plast; -public: - inline void init( Arc_ptr a, long first, long last ) { arc = a; p=&a->pwlArc->pts[first]; plast = &a->pwlArc->pts[last]; } - inline TrimVertex * getnextpt( void ); - inline TrimVertex * getprevpt( void ); - inline void reverse(); -}; - -inline void -Jarcloc::reverse() -{ - if( plast == &arc->pwlArc->pts[0] ) - plast = &arc->pwlArc->pts[arc->pwlArc->npts - 1]; - else - plast = &arc->pwlArc->pts[0]; -} - -inline TrimVertex * -Jarcloc::getnextpt() -{ - assert( p <= plast ); - if( p == plast ) { - arc = arc->next; - p = &arc->pwlArc->pts[0]; - plast = &arc->pwlArc->pts[arc->pwlArc->npts - 1]; - assert( p < plast ); - } - return p++; -} - -inline TrimVertex * -Jarcloc::getprevpt() -{ - assert( p >= plast ); - if( p == plast ) { - arc = arc->prev; - p = &arc->pwlArc->pts[arc->pwlArc->npts - 1]; - plast = &arc->pwlArc->pts[0]; - assert( p > plast ); - } - return p--; -} -#endif /* __glujarcloc_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/knotvector.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/knotvector.cc deleted file mode 100644 index 50556f622d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/knotvector.cc +++ /dev/null @@ -1,139 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * knotvector.c++ - * - */ - -#include "glimports.h" -#include "mystdio.h" -#include "myassert.h" -#include "knotvector.h" -#include "defines.h" - -#ifdef __WATCOMC__ -#pragma warning 726 10 -#endif - -void Knotvector::init( long _knotcount, long _stride, long _order, INREAL *_knotlist ) -{ - knotcount = _knotcount; - stride = _stride; - order = _order; - knotlist = new Knot[_knotcount]; - assert( knotlist != 0 ); - - for( int i = 0; i != _knotcount; i++ ) - knotlist[i] = (Knot) _knotlist[i]; -} - -Knotvector::Knotvector( void ) -{ - knotlist = 0; -} - -Knotvector::~Knotvector( void ) -{ - if( knotlist ) delete[] knotlist; -} - -int Knotvector::validate( void ) -{ - /* kindex is used as an array index so subtract one first, - * this propagates throughout the code so study carefully */ - long kindex = knotcount-1; - - if( order < 1 || order > MAXORDER ) { - // spline order un-supported - return( 1 ); - } - - if( knotcount < (2 * order) ) { - // too few knots - return( 2 ); - } - - if( identical( knotlist[kindex-(order-1)], knotlist[order-1]) ) { - // valid knot range is empty - return( 3 ); - } - - for( long i = 0; i < kindex; i++) - if( knotlist[i] > knotlist[i+1] ) { - // decreasing knot sequence - return( 4 ); - } - - /* check for valid multiplicity */ - - /* kindex is currently the index of the last knot. - * In the next loop it is decremented to ignore the last knot - * and the loop stops when kindex is 2 so as to ignore the first - * knot as well. These knots are not used in computing - * knot multiplicities. - */ - - long multi = 1; - for( ; kindex >= 1; kindex-- ) { - if( knotlist[kindex] - knotlist[kindex-1] < TOLERANCE ) { - multi++; - continue; - } - if ( multi > order ) { - // knot multiplicity greater than order of spline - return( 5 ); - } - multi = 1; - } - - if ( multi > order ) { - // knot multiplicity greater than order of spline - return( 5 ); - } - - return 0; -} - -void Knotvector::show( char *msg ) -{ -#ifndef NDEBUG - dprintf( "%s\n", msg ); - dprintf( "order = %ld, count = %ld\n", order, knotcount ); - - for( int i=0; i -#include "glimports.h" -#include "mystdio.h" -#include "myassert.h" -#include "mystring.h" -#include "mymath.h" -#include "backend.h" -#include "nurbsconsts.h" -#include "mapdesc.h" - -Mapdesc::Mapdesc( long _type, int _israt, int _ncoords, Backend& b ) - : backend( b ) -{ - type = _type; - isrational = _israt; - ncoords = _ncoords; - hcoords = _ncoords + (_israt ? 0 : 1 ); - inhcoords = _ncoords - (_israt ? 1 : 0 ); - mask = ((1<<(inhcoords*2))-1); - next = 0; - - assert( hcoords <= MAXCOORDS ); - assert( inhcoords >= 1 ); - - pixel_tolerance = 1.0; - error_tolerance = 1.0; - bbox_subdividing = N_NOBBOXSUBDIVISION; - culling_method = N_NOCULLING; - sampling_method = N_NOSAMPLING; - clampfactor = N_NOCLAMPING; - minsavings = N_NOSAVINGSSUBDIVISION; - s_steps = 0.0; - t_steps = 0.0; - maxrate = ( s_steps < 0.0 ) ? 0.0 : s_steps; - maxsrate = ( s_steps < 0.0 ) ? 0.0 : s_steps; - maxtrate = ( t_steps < 0.0 ) ? 0.0 : t_steps; - identify( bmat ); - identify( cmat ); - identify( smat ); - for( int i = 0; i != inhcoords; i++ ) - bboxsize[i] = 1.0; -} - -void -Mapdesc::setBboxsize( INREAL *mat ) -{ - for( int i = 0; i != inhcoords; i++ ) - bboxsize[i] = (REAL) mat[i]; -} - -void -Mapdesc::identify( REAL dest[MAXCOORDS][MAXCOORDS] ) -{ - memset( dest, 0, sizeof( dest ) ); - for( int i=0; i != hcoords; i++ ) - dest[i][i] = 1.0; -} - -void -Mapdesc::surfbbox( REAL bb[2][MAXCOORDS] ) -{ - backend.surfbbox( type, bb[0], bb[1] ); -} - -void -Mapdesc::copy( REAL dest[MAXCOORDS][MAXCOORDS], long n, INREAL *src, - long rstride, long cstride ) -{ - assert( n >= 0 ); - for( int i=0; i != n; i++ ) - for( int j=0; j != n; j++ ) - dest[i][j] = src[i*rstride + j*cstride]; -} - -/*-------------------------------------------------------------------------- - * copyPt - copy a homogeneous point - *-------------------------------------------------------------------------- - */ -void -Mapdesc::copyPt( REAL *d, REAL *s ) -{ - assert( hcoords > 0 ); - switch( hcoords ) { - case 4: - d[3] = s[3]; - d[2] = s[2]; - d[1] = s[1]; - d[0] = s[0]; - break; - case 3: - d[2] = s[2]; - d[1] = s[1]; - d[0] = s[0]; - break; - case 2: - d[1] = s[1]; - d[0] = s[0]; - break; - case 1: - d[0] = s[0]; - break; - case 5: - d[4] = s[4]; - d[3] = s[3]; - d[2] = s[2]; - d[1] = s[1]; - d[0] = s[0]; - break; - default: - memcpy( d, s, hcoords * sizeof( REAL ) ); - break; - } -} - -/*-------------------------------------------------------------------------- - * sumPt - compute affine combination of two homogeneous points - *-------------------------------------------------------------------------- - */ -void -Mapdesc::sumPt( REAL *dst, REAL *src1, REAL *src2, register REAL alpha, register REAL beta ) -{ - assert( hcoords > 0 ); - switch( hcoords ) { - case 4: - dst[3] = src1[3] * alpha + src2[3] * beta; - dst[2] = src1[2] * alpha + src2[2] * beta; - dst[1] = src1[1] * alpha + src2[1] * beta; - dst[0] = src1[0] * alpha + src2[0] * beta; - break; - case 3: - dst[2] = src1[2] * alpha + src2[2] * beta; - dst[1] = src1[1] * alpha + src2[1] * beta; - dst[0] = src1[0] * alpha + src2[0] * beta; - break; - case 2: - dst[1] = src1[1] * alpha + src2[1] * beta; - dst[0] = src1[0] * alpha + src2[0] * beta; - break; - case 1: - dst[0] = src1[0] * alpha + src2[0] * beta; - break; - case 5: - dst[4] = src1[4] * alpha + src2[4] * beta; - dst[3] = src1[3] * alpha + src2[3] * beta; - dst[2] = src1[2] * alpha + src2[2] * beta; - dst[1] = src1[1] * alpha + src2[1] * beta; - dst[0] = src1[0] * alpha + src2[0] * beta; - break; - default: { - for( int i = 0; i != hcoords; i++ ) - dst[i] = src1[i] * alpha + src2[i] * beta; - } - break; - } -} - -/*-------------------------------------------------------------------------- - * clipbits - compute bit-vector indicating point/window position - * of a (transformed) homogeneous point - *-------------------------------------------------------------------------- - */ -unsigned int -Mapdesc::clipbits( REAL *p ) -{ - assert( inhcoords >= 0 ); - assert( inhcoords <= 3 ); - - register int nc = inhcoords; - register REAL pw = p[nc]; - register REAL nw = -pw; - register unsigned int bits = 0; - - if( pw == 0.0 ) return mask; - - if( pw > 0.0 ) { - switch( nc ) { - case 3: - if( p[2] <= pw ) bits |= (1<<5); - if( p[2] >= nw ) bits |= (1<<4); - if( p[1] <= pw ) bits |= (1<<3); - if( p[1] >= nw ) bits |= (1<<2); - if( p[0] <= pw ) bits |= (1<<1); - if( p[0] >= nw ) bits |= (1<<0); - return bits; - case 2: - if( p[1] <= pw ) bits |= (1<<3); - if( p[1] >= nw ) bits |= (1<<2); - if( p[0] <= pw ) bits |= (1<<1); - if( p[0] >= nw ) bits |= (1<<0); - return bits; - case 1: - if( p[0] <= pw ) bits |= (1<<1); - if( p[0] >= nw ) bits |= (1<<0); - return bits; - default: { - int bit = 1; - for( int i=0; i= nw ) bits |= bit; - bit <<= 1; - if( p[i] <= pw ) bits |= bit; - bit <<= 1; - } - abort(); - break; - } - } - } else { - switch( nc ) { - case 3: - if( p[2] <= nw ) bits |= (1<<5); - if( p[2] >= pw ) bits |= (1<<4); - if( p[1] <= nw ) bits |= (1<<3); - if( p[1] >= pw ) bits |= (1<<2); - if( p[0] <= nw ) bits |= (1<<1); - if( p[0] >= pw ) bits |= (1<<0); - return bits; - case 2: - if( p[1] <= nw ) bits |= (1<<3); - if( p[1] >= pw ) bits |= (1<<2); - if( p[0] <= nw ) bits |= (1<<1); - if( p[0] >= pw ) bits |= (1<<0); - return bits; - case 1: - if( p[0] <= nw ) bits |= (1<<1); - if( p[0] >= pw ) bits |= (1<<0); - return bits; - default: { - int bit = 1; - for( int i=0; i= pw ) bits |= bit; - bit <<= 1; - if( p[i] <= nw ) bits |= bit; - bit <<= 1; - } - abort(); - break; - } - } - } - return bits; -} - -/*-------------------------------------------------------------------------- - * xformRational - transform a homogeneous point - *-------------------------------------------------------------------------- - */ -void -Mapdesc::xformRational( Maxmatrix mat, REAL *d, REAL *s ) -{ - assert( hcoords >= 0 ); - - if( hcoords == 3 ) { - REAL x = s[0]; - REAL y = s[1]; - REAL z = s[2]; - d[0] = x*mat[0][0]+y*mat[1][0]+z*mat[2][0]; - d[1] = x*mat[0][1]+y*mat[1][1]+z*mat[2][1]; - d[2] = x*mat[0][2]+y*mat[1][2]+z*mat[2][2]; - } else if( hcoords == 4 ) { - REAL x = s[0]; - REAL y = s[1]; - REAL z = s[2]; - REAL w = s[3]; - d[0] = x*mat[0][0]+y*mat[1][0]+z*mat[2][0]+w*mat[3][0]; - d[1] = x*mat[0][1]+y*mat[1][1]+z*mat[2][1]+w*mat[3][1]; - d[2] = x*mat[0][2]+y*mat[1][2]+z*mat[2][2]+w*mat[3][2]; - d[3] = x*mat[0][3]+y*mat[1][3]+z*mat[2][3]+w*mat[3][3]; - } else { - for( int i=0; i != hcoords; i++ ) { - d[i] = 0; - for( int j = 0; j != hcoords; j++ ) - d[i] += s[j] * mat[j][i]; - } - } -} - -/*-------------------------------------------------------------------------- - * xformNonrational - transform a inhomogeneous point to a homogeneous point - *-------------------------------------------------------------------------- - */ -void -Mapdesc::xformNonrational( Maxmatrix mat, REAL *d, REAL *s ) -{ - if( inhcoords == 2 ) { - REAL x = s[0]; - REAL y = s[1]; - d[0] = x*mat[0][0]+y*mat[1][0]+mat[2][0]; - d[1] = x*mat[0][1]+y*mat[1][1]+mat[2][1]; - d[2] = x*mat[0][2]+y*mat[1][2]+mat[2][2]; - } else if( inhcoords == 3 ) { - REAL x = s[0]; - REAL y = s[1]; - REAL z = s[2]; - d[0] = x*mat[0][0]+y*mat[1][0]+z*mat[2][0]+mat[3][0]; - d[1] = x*mat[0][1]+y*mat[1][1]+z*mat[2][1]+mat[3][1]; - d[2] = x*mat[0][2]+y*mat[1][2]+z*mat[2][2]+mat[3][2]; - d[3] = x*mat[0][3]+y*mat[1][3]+z*mat[2][3]+mat[3][3]; - } else { - assert( inhcoords >= 0 ); - for( int i=0; i != hcoords; i++ ) { - d[i] = mat[inhcoords][i]; - for( int j = 0; j < inhcoords; j++ ) - d[i] += s[j] * mat[j][i]; - } - } -} - -/*-------------------------------------------------------------------------- - * xformAndCullCheck - transform a set of points that may be EITHER - * homogeneous or inhomogeneous depending on the map description and - * check if they are either completely inside, completely outside, - * or intersecting the viewing frustrum. - *-------------------------------------------------------------------------- - */ -int -Mapdesc::xformAndCullCheck( - REAL *pts, int uorder, int ustride, int vorder, int vstride ) -{ - assert( uorder > 0 ); - assert( vorder > 0 ); - - unsigned int inbits = mask; - unsigned int outbits = 0; - - REAL *p = pts; - for( REAL *pend = p + uorder * ustride; p != pend; p += ustride ) { - REAL *q = p; - for( REAL *qend = q + vorder * vstride; q != qend; q += vstride ) { - REAL cpts[MAXCOORDS]; - xformCulling( cpts, q ); - unsigned int bits = clipbits( cpts ); - outbits |= bits; - inbits &= bits; - if( ( outbits == (unsigned int)mask ) && ( inbits != (unsigned int)mask ) ) return CULL_ACCEPT; - } - } - - if( outbits != (unsigned int)mask ) { - return CULL_TRIVIAL_REJECT; - } else if( inbits == (unsigned int)mask ) { - return CULL_TRIVIAL_ACCEPT; - } else { - return CULL_ACCEPT; - } -} - -/*-------------------------------------------------------------------------- - * cullCheck - check if a set of homogeneous transformed points are - * either completely inside, completely outside, - * or intersecting the viewing frustrum. - *-------------------------------------------------------------------------- - */ -int -Mapdesc::cullCheck( REAL *pts, int uorder, int ustride, int vorder, int vstride ) -{ - unsigned int inbits = mask; - unsigned int outbits = 0; - - REAL *p = pts; - for( REAL *pend = p + uorder * ustride; p != pend; p += ustride ) { - REAL *q = p; - for( REAL *qend = q + vorder * vstride; q != qend; q += vstride ) { - unsigned int bits = clipbits( q ); - outbits |= bits; - inbits &= bits; - if( ( outbits == (unsigned int)mask ) && ( inbits != (unsigned int)mask ) ) return CULL_ACCEPT; - } - } - - if( outbits != (unsigned int)mask ) { - return CULL_TRIVIAL_REJECT; - } else if( inbits == (unsigned int)mask ) { - return CULL_TRIVIAL_ACCEPT; - } else { - return CULL_ACCEPT; - } -} - -/*-------------------------------------------------------------------------- - * cullCheck - check if a set of homogeneous transformed points are - * either completely inside, completely outside, - * or intersecting the viewing frustrum. - *-------------------------------------------------------------------------- - */ -int -Mapdesc::cullCheck( REAL *pts, int order, int stride ) -{ - unsigned int inbits = mask; - unsigned int outbits = 0; - - REAL *p = pts; - for( REAL *pend = p + order * stride; p != pend; p += stride ) { - unsigned int bits = clipbits( p ); - outbits |= bits; - inbits &= bits; - if( ( outbits == (unsigned int)mask ) && ( inbits != (unsigned int)mask ) ) return CULL_ACCEPT; - } - - if( outbits != (unsigned int)mask ) { - return CULL_TRIVIAL_REJECT; - } else if( inbits == (unsigned int)mask ) { - return CULL_TRIVIAL_ACCEPT; - } else { - return CULL_ACCEPT; - } -} - -/*-------------------------------------------------------------------------- - * xformSampling - transform a set of points that may be EITHER - * homogeneous or inhomogeneous depending on the map description - * into sampling space - *-------------------------------------------------------------------------- - */ -void -Mapdesc::xformSampling( REAL *pts, int order, int stride, REAL *sp, int outstride ) -{ - xformMat( smat, pts, order, stride, sp, outstride ); -} - -void -Mapdesc::xformBounding( REAL *pts, int order, int stride, REAL *sp, int outstride ) -{ - xformMat( bmat, pts, order, stride, sp, outstride ); -} - -/*-------------------------------------------------------------------------- - * xformCulling - transform a set of points that may be EITHER - * homogeneous or inhomogeneous depending on the map description - * into culling space - *-------------------------------------------------------------------------- - */ -void -Mapdesc::xformCulling( REAL *pts, int order, int stride, REAL *cp, int outstride ) -{ - xformMat( cmat, pts, order, stride, cp, outstride ); -} - -/*-------------------------------------------------------------------------- - * xformCulling - transform a set of points that may be EITHER - * homogeneous or inhomogeneous depending on the map description - * into culling space - *-------------------------------------------------------------------------- - */ -void -Mapdesc::xformCulling( REAL *pts, - int uorder, int ustride, - int vorder, int vstride, - REAL *cp, int outustride, int outvstride ) -{ - xformMat( cmat, pts, uorder, ustride, vorder, vstride, cp, outustride, outvstride ); -} - -/*-------------------------------------------------------------------------- - * xformSampling - transform a set of points that may be EITHER - * homogeneous or inhomogeneous depending on the map description - * into sampling space - *-------------------------------------------------------------------------- - */ -void -Mapdesc::xformSampling( REAL *pts, - int uorder, int ustride, - int vorder, int vstride, - REAL *sp, int outustride, int outvstride ) -{ - xformMat( smat, pts, uorder, ustride, vorder, vstride, sp, outustride, outvstride ); -} - -void -Mapdesc::xformBounding( REAL *pts, - int uorder, int ustride, - int vorder, int vstride, - REAL *sp, int outustride, int outvstride ) -{ - xformMat( bmat, pts, uorder, ustride, vorder, vstride, sp, outustride, outvstride ); -} - -void -Mapdesc::xformMat( - Maxmatrix mat, - REAL * pts, - int order, - int stride, - REAL * cp, - int outstride ) -{ - if( isrational ) { - REAL *pend = pts + order * stride; - for( REAL *p = pts ; p != pend; p += stride ) { - xformRational( mat, cp, p ); - cp += outstride; - } - } else { - REAL *pend = pts + order * stride; - for( REAL *p = pts ; p != pend; p += stride ) { - xformNonrational( mat, cp, p ); - cp += outstride; - } - } -} - -void -Mapdesc::xformMat( Maxmatrix mat, REAL *pts, - int uorder, int ustride, - int vorder, int vstride, - REAL *cp, int outustride, int outvstride ) -{ - if( isrational ) { - REAL *pend = pts + uorder * ustride; - for( REAL *p = pts ; p != pend; p += ustride ) { - REAL *cpts2 = cp; - REAL *qend = p + vorder * vstride; - for( REAL *q = p; q != qend; q += vstride ) { - xformRational( mat, cpts2, q ); - cpts2 += outvstride; - } - cp += outustride; - } - } else { - REAL *pend = pts + uorder * ustride; - for( REAL *p = pts ; p != pend; p += ustride ) { - REAL *cpts2 = cp; - REAL *qend = p + vorder * vstride; - for( REAL *q = p; q != qend; q += vstride ) { - xformNonrational( mat, cpts2, q ); - cpts2 += outvstride; - } - cp += outustride; - } - } -} - -/*-------------------------------------------------------------------------- - * subdivide - subdivide a curve along an isoparametric line - *-------------------------------------------------------------------------- - */ - -void -Mapdesc::subdivide( REAL *src, REAL *dst, REAL v, int stride, int order ) -{ - REAL mv = 1.0 - v; - - for( REAL *send=src+stride*order; src!=send; send-=stride, dst+=stride ) { - copyPt( dst, src ); - REAL *qpnt = src + stride; - for( REAL *qp=src; qpnt!=send; qp=qpnt, qpnt+=stride ) - sumPt( qp, qp, qpnt, mv, v ); - } -} - -/*-------------------------------------------------------------------------- - * subdivide - subdivide a patch along an isoparametric line - *-------------------------------------------------------------------------- - */ - -void -Mapdesc::subdivide( REAL *src, REAL *dst, REAL v, - int so, int ss, int to, int ts ) -{ - REAL mv = 1.0 - v; - - for( REAL *slast = src+ss*so; src != slast; src += ss, dst += ss ) { - REAL *sp = src; - REAL *dp = dst; - for( REAL *send = src+ts*to; sp != send; send -= ts, dp += ts ) { - copyPt( dp, sp ); - REAL *qp = sp; - for( REAL *qpnt = sp+ts; qpnt != send; qp = qpnt, qpnt += ts ) - sumPt( qp, qp, qpnt, mv, v ); - } - } -} - - -#define sign(x) ((x > 0) ? 1 : ((x < 0.0) ? -1 : 0)) - -/*-------------------------------------------------------------------------- - * project - project a set of homogeneous coordinates into inhomogeneous ones - *-------------------------------------------------------------------------- - */ -int -Mapdesc::project( REAL *src, int rstride, int cstride, - REAL *dest, int trstride, int tcstride, - int nrows, int ncols ) -{ - int s = sign( src[inhcoords] ); - REAL *rlast = src + nrows * rstride; - REAL *trptr = dest; - for( REAL *rptr=src; rptr != rlast; rptr+=rstride, trptr+=trstride ) { - REAL *clast = rptr + ncols * cstride; - REAL *tcptr = trptr; - for( REAL *cptr = rptr; cptr != clast; cptr+=cstride, tcptr+=tcstride ) { - REAL *coordlast = cptr + inhcoords; - if( sign( *coordlast ) != s ) return 0; - REAL *tcoord = tcptr; - for( REAL *coord = cptr; coord != coordlast; coord++, tcoord++ ) { - *tcoord = *coord / *coordlast; - } - } - } - return 1; -} - -/*-------------------------------------------------------------------------- - * project - project a set of homogeneous coordinates into inhomogeneous ones - *-------------------------------------------------------------------------- - */ -int -Mapdesc::project( REAL *src, int stride, REAL *dest, int tstride, int ncols ) -{ - int s = sign( src[inhcoords] ); - - REAL *clast = src + ncols * stride; - for( REAL *cptr = src, *tcptr = dest; cptr != clast; cptr+=stride, tcptr+=tstride ) { - REAL *coordlast = cptr + inhcoords; - if( sign( *coordlast ) != s ) return 0; - for( REAL *coord = cptr, *tcoord = tcptr; coord != coordlast; coord++, tcoord++ ) - *tcoord = *coord / *coordlast; - } - - return 1; -} - -int -Mapdesc::bboxTooBig( - REAL *p, - int rstride, - int cstride, - int nrows, - int ncols, - REAL bb[2][MAXCOORDS] ) -{ - REAL bbpts[MAXORDER][MAXORDER][MAXCOORDS]; - const int trstride = sizeof(bbpts[0]) / sizeof(REAL); - const int tcstride = sizeof(bbpts[0][0]) / sizeof(REAL); - - // points have been transformed, therefore they are homogeneous - // project points - int val = project( p, rstride, cstride, - &bbpts[0][0][0], trstride, tcstride, nrows, ncols ); - if( val == 0 ) return -1; - - // compute bounding box - bbox( bb, &bbpts[0][0][0], trstride, tcstride, nrows, ncols ); - - // find out if bounding box can't fit in unit cube - if( bbox_subdividing == N_BBOXROUND ) { - for( int k=0; k != inhcoords; k++ ) - if( ceilf(bb[1][k]) - floorf(bb[0][k]) > bboxsize[k] ) return 1; - } else { - for( int k=0; k != inhcoords; k++ ) - if( bb[1][k] - bb[0][k] > bboxsize[k] ) return 1; - } - return 0; -} - -void -Mapdesc::bbox( - REAL bb[2][MAXCOORDS], - REAL *p, - int rstride, - int cstride, - int nrows, - int ncols ) -{ - int k; - for( k=0; k != inhcoords; k++ ) - bb[0][k] = bb[1][k] = p[k]; - - for( int i=0; i != nrows; i++ ) - for( int j=0; j != ncols; j++ ) - for( k=0; k != inhcoords; k++ ) { - REAL x = p[i*rstride + j*cstride + k]; - if( x < bb[0][k] ) bb[0][k] = x; - else if( x > bb[1][k] ) bb[1][k] = x; - } -} - -/*-------------------------------------------------------------------------- - * calcVelocityRational - calculate upper bound on first partial derivative - * of a homogeneous set of points and bounds on each row of points. - *-------------------------------------------------------------------------- - */ -REAL -Mapdesc::calcVelocityRational( REAL *p, int stride, int ncols ) -{ - REAL tmp[MAXORDER][MAXCOORDS]; - - assert( ncols <= MAXORDER ); - - const int tstride = sizeof(tmp[0]) / sizeof(REAL); - - if( project( p, stride, &tmp[0][0], tstride, ncols ) ) { - return calcPartialVelocity( &tmp[0][0], tstride, ncols, 1, 1.0 ); - } else { /* XXX */ - return calcPartialVelocity( &tmp[0][0], tstride, ncols, 1, 1.0 ); - } -} - -/*-------------------------------------------------------------------------- - * calcVelocityNonrational - calculate upper bound on first partial - * derivative of a inhomogeneous set of points. - *-------------------------------------------------------------------------- - */ -REAL -Mapdesc::calcVelocityNonrational( REAL *pts, int stride, int ncols ) -{ - return calcPartialVelocity( pts, stride, ncols, 1, 1.0 ); -} - -int -Mapdesc::isProperty( long property ) -{ - switch ( property ) { - case N_PIXEL_TOLERANCE: - case N_ERROR_TOLERANCE: - case N_CULLING: - case N_BBOX_SUBDIVIDING: - case N_S_STEPS: - case N_T_STEPS: - case N_SAMPLINGMETHOD: - case N_CLAMPFACTOR: - case N_MINSAVINGS: - return 1; - default: - return 0; - } -} - -REAL -Mapdesc::getProperty( long property ) -{ - switch ( property ) { - case N_PIXEL_TOLERANCE: - return pixel_tolerance; - case N_ERROR_TOLERANCE: - return error_tolerance; - case N_CULLING: - return culling_method; - case N_BBOX_SUBDIVIDING: - return bbox_subdividing; - case N_S_STEPS: - return s_steps; - case N_T_STEPS: - return t_steps; - case N_SAMPLINGMETHOD: - return sampling_method; - case N_CLAMPFACTOR: - return clampfactor; - case N_MINSAVINGS: - return minsavings; - default: - abort(); - return -1; //not necessary, needed to shut up compiler - } -} - -void -Mapdesc::setProperty( long property, REAL value ) -{ - - switch ( property ) { - case N_PIXEL_TOLERANCE: - pixel_tolerance = value; - break; - case N_ERROR_TOLERANCE: - error_tolerance = value; - break; - case N_CULLING: - culling_method = value; - break; - case N_BBOX_SUBDIVIDING: - if( value <= 0.0 ) value = N_NOBBOXSUBDIVISION; - bbox_subdividing = value; - break; - case N_S_STEPS: - if( value < 0.0 ) value = 0.0; - s_steps = value; - maxrate = ( value < 0.0 ) ? 0.0 : value; - maxsrate = ( value < 0.0 ) ? 0.0 : value; - break; - case N_T_STEPS: - if( value < 0.0 ) value = 0.0; - t_steps = value; - maxtrate = ( value < 0.0 ) ? 0.0 : value; - break; - case N_SAMPLINGMETHOD: - sampling_method = value; - break; - case N_CLAMPFACTOR: - if( value <= 0.0 ) value = N_NOCLAMPING; - clampfactor = value; - break; - case N_MINSAVINGS: - if( value <= 0.0 ) value = N_NOSAVINGSSUBDIVISION; - minsavings = value; - break; - default: - abort(); - break; - } -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mapdesc.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mapdesc.h deleted file mode 100644 index 3c4ef6ff6c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mapdesc.h +++ /dev/null @@ -1,277 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * mapdesc.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mapdesc.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glumapdesc_h_ -#define __glumapdesc_h_ - -#include "mystdio.h" -#include "types.h" -#include "defines.h" -#include "bufpool.h" -#include "nurbsconsts.h" - -typedef REAL Maxmatrix[MAXCOORDS][MAXCOORDS]; - -class Backend; - -class Mapdesc : public PooledObj { - friend class Maplist; - -public: - Mapdesc( long, int, int, Backend & ); - int isProperty( long ); - REAL getProperty( long ); - void setProperty( long, REAL ); - int isConstantSampling( void ); - int isDomainSampling( void ); - int isRangeSampling( void ); - int isSampling( void ); - int isParametricDistanceSampling( void ); - int isObjectSpaceParaSampling( void ); - int isObjectSpacePathSampling( void ); - int isSurfaceAreaSampling( void ); - int isPathLengthSampling( void ); - int isCulling( void ); - int isBboxSubdividing( void ); - long getType( void ); - - /* curve routines */ - void subdivide( REAL *, REAL *, REAL, int, int ); - int cullCheck( REAL *, int, int ); - void xformBounding( REAL *, int, int, REAL *, int ); - void xformCulling( REAL *, int, int, REAL *, int ); - void xformSampling( REAL *, int, int, REAL *, int ); - void xformMat( Maxmatrix, REAL *, int, int, REAL *, int ); - REAL calcPartialVelocity ( REAL *, int, int, int, REAL ); - int project( REAL *, int, REAL *, int, int ); - REAL calcVelocityRational( REAL *, int, int ); - REAL calcVelocityNonrational( REAL *, int, int ); - - /* surface routines */ - void subdivide( REAL *, REAL *, REAL, int, int, int, int ); - int cullCheck( REAL *, int, int, int, int ); - void xformBounding( REAL *, int, int, int, int, REAL *, int, int ); - void xformCulling( REAL *, int, int, int, int, REAL *, int, int ); - void xformSampling( REAL *, int, int, int, int, REAL *, int, int ); - void xformMat( Maxmatrix, REAL *, int, int, int, int, REAL *, int, int ); - REAL calcPartialVelocity ( REAL *, REAL *, int, int, int, int, int, int, REAL, REAL, int ); - int project( REAL *, int, int, REAL *, int, int, int, int); - void surfbbox( REAL bb[2][MAXCOORDS] ); - - int bboxTooBig( REAL *, int, int, int, int, REAL [2][MAXCOORDS] ); - int xformAndCullCheck( REAL *, int, int, int, int ); - - void identify( REAL[MAXCOORDS][MAXCOORDS] ); - void setBboxsize( INREAL *); - inline void setBmat( INREAL*, long, long ); - inline void setCmat( INREAL*, long, long ); - inline void setSmat( INREAL*, long, long ); - inline int isRational( void ); - inline int getNcoords( void ); - - REAL pixel_tolerance; /* pathlength sampling tolerance */ - REAL error_tolerance; /* parametric error sampling tolerance*/ - REAL object_space_error_tolerance; /* object space tess*/ - REAL clampfactor; - REAL minsavings; - REAL maxrate; - REAL maxsrate; - REAL maxtrate; - REAL bboxsize[MAXCOORDS]; - -private: - long type; - int isrational; - int ncoords; - int hcoords; - int inhcoords; - int mask; - Maxmatrix bmat; - Maxmatrix cmat; - Maxmatrix smat; - REAL s_steps; /* max samples in s direction */ - REAL t_steps; /* max samples in t direction */ - REAL sampling_method; - REAL culling_method; /* check for culling */ - REAL bbox_subdividing; - Mapdesc * next; - Backend & backend; - - void bbox( REAL [2][MAXCOORDS], REAL *, int, int, int, int ); - REAL maxDifference( int, REAL *, int ); - static void copy( Maxmatrix, long, INREAL *, long, long ); - - /* individual control point routines */ - static void transform4d( float[4], float[4], float[4][4] ); - static void multmatrix4d ( float[4][4], const float[4][4], - const float[4][4] ); - void copyPt( REAL *, REAL * ); - void sumPt( REAL *, REAL *, REAL *, REAL, REAL ); - void xformSampling( REAL *, REAL * ); - void xformCulling( REAL *, REAL * ); - void xformRational( Maxmatrix, REAL *, REAL * ); - void xformNonrational( Maxmatrix, REAL *, REAL * ); - unsigned int clipbits( REAL * ); -}; - -inline void -Mapdesc::setBmat( INREAL *mat, long rstride, long cstride ) -{ - copy( bmat, hcoords, mat, rstride, cstride ); -} - -inline void -Mapdesc::setCmat( INREAL *mat, long rstride, long cstride ) -{ - copy( cmat, hcoords, mat, rstride, cstride ); -} - -inline void -Mapdesc::setSmat( INREAL *mat, long rstride, long cstride ) -{ - copy( smat, hcoords, mat, rstride, cstride ); -} - -inline long -Mapdesc::getType( void ) -{ - return type; -} - -inline void -Mapdesc::xformCulling( REAL *d, REAL *s ) -{ - if( isrational ) - xformRational( cmat, d, s ); - else - xformNonrational( cmat, d, s ); -} - -inline void -Mapdesc::xformSampling( REAL *d, REAL *s ) -{ - if( isrational ) - xformRational( smat, d, s ); - else - xformNonrational( smat, d, s ); -} - -inline int -Mapdesc::isRational( void ) -{ - return isrational ? 1 : 0; -} - -inline int -Mapdesc::getNcoords( void ) -{ - return ncoords; -} - -inline int -Mapdesc::isConstantSampling( void ) -{ - return ((sampling_method == N_FIXEDRATE) ? 1 : 0); -} - -inline int -Mapdesc::isDomainSampling( void ) -{ - return ((sampling_method == N_DOMAINDISTANCE) ? 1 : 0); -} - -inline int -Mapdesc::isParametricDistanceSampling( void ) -{ - return ((sampling_method == N_PARAMETRICDISTANCE) ? 1 : 0); -} - -inline int -Mapdesc::isObjectSpaceParaSampling( void ) -{ - return ((sampling_method == N_OBJECTSPACE_PARA) ? 1 : 0); -} - -inline int -Mapdesc::isObjectSpacePathSampling( void ) -{ - return ((sampling_method == N_OBJECTSPACE_PATH) ? 1 : 0); -} - -inline int -Mapdesc::isSurfaceAreaSampling( void ) -{ - return ((sampling_method == N_SURFACEAREA) ? 1 : 0); -} - -inline int -Mapdesc::isPathLengthSampling( void ) -{ - return ((sampling_method == N_PATHLENGTH) ? 1 : 0); -} - -inline int -Mapdesc::isRangeSampling( void ) -{ - return ( isParametricDistanceSampling() || isPathLengthSampling() || - isSurfaceAreaSampling() || - isObjectSpaceParaSampling() || - isObjectSpacePathSampling()); -} - -inline int -Mapdesc::isSampling( void ) -{ - return isRangeSampling() || isConstantSampling() || isDomainSampling(); -} - -inline int -Mapdesc::isCulling( void ) -{ - return ((culling_method != N_NOCULLING) ? 1 : 0); -} - -inline int -Mapdesc::isBboxSubdividing( void ) -{ - return ((bbox_subdividing != N_NOBBOXSUBDIVISION) ? 1 : 0); -} -#endif /* __glumapdesc_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mapdescv.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mapdescv.cc deleted file mode 100644 index 6e4bb40c90..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mapdescv.cc +++ /dev/null @@ -1,245 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * mapdescv.c++ - * - * $Date: 2004/05/12 15:29:36 $ $Revision: 1.3 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mapdescv.cc,v 1.3 2004/05/12 15:29:36 brianp Exp $ - */ - -#include "glimports.h" -#include "mystdio.h" -#include "myassert.h" -#include "mystring.h" -#include "mymath.h" -#include "nurbsconsts.h" -#include "mapdesc.h" - -/*-------------------------------------------------------------------------- - * calcPartialVelocity - calculate maximum magnitude of a given partial - * derivative - *-------------------------------------------------------------------------- - */ -REAL -Mapdesc::calcPartialVelocity ( - REAL *p, - int stride, - int ncols, - int partial, - REAL range ) -{ - REAL tmp[MAXORDER][MAXCOORDS]; - REAL mag[MAXORDER]; - - assert( ncols <= MAXORDER ); - - int j, k, t; - // copy inhomogeneous control points into temporary array - for( j=0; j != ncols; j++ ) - for( k=0; k != inhcoords; k++ ) - tmp[j][k] = p[j*stride + k]; - - for( t=0; t != partial; t++ ) - for( j=0; j != ncols-t-1; j++ ) - for( k=0; k != inhcoords; k++ ) - tmp[j][k] = tmp[j+1][k] - tmp[j][k]; - - // compute magnitude and store in mag array - for( j=0; j != ncols-partial; j++ ) { - mag[j] = 0.0; - for( k=0; k != inhcoords; k++ ) - mag[j] += tmp[j][k] * tmp[j][k]; - } - - // compute scale factor - REAL fac = 1; - REAL invt = 1.0 / range; - for( t = ncols-1; t != ncols-1-partial; t-- ) - fac *= t * invt; - - // compute max magnitude of all entries in array - REAL max = 0.0; - for( j=0; j != ncols-partial; j++ ) - if( mag[j] > max ) max = mag[j]; - max = fac * sqrtf( (float) max ); - - return max; -} - -/*-------------------------------------------------------------------------- - * calcPartialVelocity - calculate maximum magnitude of a given partial - * derivative - *-------------------------------------------------------------------------- - */ -REAL -Mapdesc::calcPartialVelocity ( - REAL *dist, - REAL *p, - int rstride, - int cstride, - int nrows, - int ncols, - int spartial, - int tpartial, - REAL srange, - REAL trange, - int side ) -{ - REAL tmp[MAXORDER][MAXORDER][MAXCOORDS]; - REAL mag[MAXORDER][MAXORDER]; - - assert( nrows <= MAXORDER ); - assert( ncols <= MAXORDER ); - - REAL *tp = &tmp[0][0][0]; - REAL *mp = &mag[0][0]; - const int istride = sizeof( tmp[0]) / sizeof( tmp[0][0][0] ); - const int jstride = sizeof( tmp[0][0]) / sizeof( tmp[0][0][0] ); - /* - const int kstride = sizeof( tmp[0][0][0]) / sizeof( tmp[0][0][0] ); - */ - const int mistride = sizeof( mag[0]) / sizeof( mag[0][0] ); - const int mjstride = sizeof( mag[0][0]) / sizeof( mag[0][0] ); - const int idist = nrows * istride; - const int jdist = ncols * jstride; - /* - const int kdist = inhcoords * kstride; - */ - const int id = idist - spartial * istride; - const int jd = jdist - tpartial * jstride; - - { - // copy control points - REAL *ti = tp; - REAL *qi = p; - REAL *til = tp + idist; - for( ; ti != til; ) { - REAL *tj = ti; - REAL *qj = qi; - REAL *tjl = ti + jdist; - for( ; tj != tjl; ) { - for( int k=0; k != inhcoords; k++ ) { - tj[k] = qj[k]; - } - tj += jstride; - qj += cstride; - } - ti += istride; - qi += rstride; - } - } - - { - // compute (s)-partial derivative control points - REAL *til = tp + idist - istride; - const REAL *till = til - ( spartial * istride ); - for( ; til != till; til -= istride ) - for( REAL *ti = tp; ti != til; ti += istride ) - for( REAL *tj = ti, *tjl = tj + jdist; tj != tjl; tj += jstride ) - for( int k=0; k != inhcoords; k++ ) - tj[k] = tj[k+istride] - tj[k]; - } - - { - // compute (s,t)-partial derivative control points - REAL *tjl = tp + jdist - jstride; - const REAL *tjll = tjl - ( tpartial * jstride ); - for( ; tjl != tjll; tjl -= jstride ) - for( REAL *tj = tp; tj != tjl; tj += jstride ) - for( REAL *ti = tj, *til = ti + id; ti != til; ti += istride ) - for( int k=0; k != inhcoords; k++ ) - ti[k] = ti[k+jstride] - ti[k]; - - } - - REAL max = 0.0; - { - // compute magnitude and store in mag array - memset( (void *) mp, 0, sizeof( mag ) ); - for( REAL *ti = tp, *mi = mp, *til = tp + id; ti != til; ti += istride, mi += mistride ) - for( REAL *tj = ti, *mj = mi, *tjl = ti + jd; tj != tjl; tj += jstride, mj += mjstride ) { - for( int k=0; k != inhcoords; k++ ) - *mj += tj[k] * tj[k]; - if( *mj > max ) max = *mj; - } - - } - - int i, j; - - // compute scale factor - REAL fac = 1.0; - { - REAL invs = 1.0 / srange; - REAL invt = 1.0 / trange; - for( int s = nrows-1, slast = s-spartial; s != slast; s-- ) - fac *= s * invs; - for( int t = ncols-1, tlast = t-tpartial; t != tlast; t-- ) - fac *= t * invt; - } - - if( side == 0 ) { - // compute max magnitude of first and last column - dist[0] = 0.0; - dist[1] = 0.0; - for( i=0; i != nrows-spartial; i++ ) { - j = 0; - if( mag[i][j] > dist[0] ) dist[0] = mag[i][j]; - - j = ncols-tpartial-1; - if( mag[i][j] > dist[1] ) dist[1] = mag[i][j]; - } - dist[0] = fac * sqrtf( dist[0] ); - dist[1] = fac * sqrtf( dist[1] ); - } else if( side == 1 ) { - // compute max magnitude of first and last row - dist[0] = 0.0; - dist[1] = 0.0; - for( j=0; j != ncols-tpartial; j++ ) { - i = 0; - if( mag[i][j] > dist[0] ) dist[0] = mag[i][j]; - - i = nrows-spartial-1; - if( mag[i][j] > dist[1] ) dist[1] = mag[i][j]; - } - dist[0] = fac * sqrtf( dist[0] ); - dist[1] = fac * sqrtf( dist[1] ); - } - - max = fac * sqrtf( (float) max ); - - return max; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/maplist.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/maplist.cc deleted file mode 100644 index 550aba08af..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/maplist.cc +++ /dev/null @@ -1,119 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * maplist.c++ - * - * $Date: 2005/10/28 13:09:08 $ $Revision: 1.1.30.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/maplist.cc,v 1.1.30.1 2005/10/28 13:09:08 brianp Exp $ - */ - -#include "glimports.h" -#include "mystdio.h" -#include "myassert.h" -#include "mymath.h" -#include "nurbsconsts.h" -#include "maplist.h" -#include "mapdesc.h" -#include "backend.h" - -Maplist::Maplist( Backend& b ) - : mapdescPool( sizeof( Mapdesc ), 10, "mapdesc pool" ), - backend( b ) -{ - maps = 0; lastmap = &maps; -} - -void -Maplist::initialize( void ) -{ - freeMaps(); - define( N_P2D, 0, 2 ); - define( N_P2DR, 1, 3 ); -} - -void -Maplist::add( long type, int israt, int ncoords ) -{ - *lastmap = new(mapdescPool) Mapdesc( type, israt, ncoords, backend ); - lastmap = &((*lastmap)->next); -} - -void -Maplist::define( long type, int israt, int ncoords ) -{ -#ifndef NDEBUG // to avoid warning - Mapdesc *m = locate( type ); - assert( m == NULL || ( m->isrational == israt && m->ncoords == ncoords ) ); -#endif - add( type, israt, ncoords ); -} - -void -Maplist::remove( Mapdesc *m ) -{ - for( Mapdesc **curmap = &maps; *curmap; curmap = &((*curmap)->next) ) { - if( *curmap == m ) { - *curmap = m->next; - m->deleteMe( mapdescPool ); - return; - } - } - abort(); -} - -void -Maplist::freeMaps( void ) -{ - mapdescPool.clear(); - maps = 0; - lastmap = &maps; -} - -Mapdesc * -Maplist::find( long type ) -{ - Mapdesc *val = locate( type ); - assert( val != 0 ); - return val; -} - -Mapdesc * -Maplist::locate( long type ) -{ - Mapdesc *m; - for( m = maps; m; m = m->next ) - if( m->getType() == type ) break; - return m; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/maplist.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/maplist.h deleted file mode 100644 index ca92def8ca..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/maplist.h +++ /dev/null @@ -1,87 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * maplist.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/maplist.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glumaplist_h_ -#define __glumaplist_h_ - -#include "types.h" -#include "defines.h" -#include "bufpool.h" - -class Backend; -class Mapdesc; - -class Maplist { -public: - Maplist( Backend & ); - void define( long, int, int ); - inline void undefine( long ); - inline int isMap( long ); - - void initialize( void ); - Mapdesc * find( long ); - Mapdesc * locate( long ); - -private: - Pool mapdescPool; - Mapdesc * maps; - Mapdesc ** lastmap; - Backend & backend; - - void add( long, int, int ); - void remove( Mapdesc * ); - void freeMaps( void ); -}; - -inline int -Maplist::isMap( long type ) -{ - return (locate( type ) ? 1 : 0); -} - -inline void -Maplist::undefine( long type ) -{ - Mapdesc *m = locate( type ); - assert( m != 0 ); - remove( m ); -} -#endif /* __glumaplist_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mesher.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mesher.cc deleted file mode 100644 index 1178eeb516..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mesher.cc +++ /dev/null @@ -1,488 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * mesher.c++ - * - * $Date: 2001/11/29 16:16:55 $ $Revision: 1.3 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mesher.cc,v 1.3 2001/11/29 16:16:55 kschultz Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "gridvertex.h" -#include "gridtrimvertex.h" -#include "jarcloc.h" -#include "gridline.h" -#include "trimline.h" -#include "uarray.h" -#include "backend.h" -#include "mesher.h" - - -const float Mesher::ZERO = 0.0; - -Mesher::Mesher( Backend& b ) - : backend( b ), - p( sizeof( GridTrimVertex ), 100, "GridTrimVertexPool" ) -{ - stacksize = 0; - vdata = 0; - lastedge = 0; //needed to prevent purify UMR -} - -Mesher::~Mesher( void ) -{ - if( vdata ) delete[] vdata; -} - -void -Mesher::init( unsigned int npts ) -{ - p.clear(); - if( stacksize < npts ) { - stacksize = 2 * npts; - if( vdata ) delete[] vdata; - vdata = new GridTrimVertex_p[stacksize]; - } -} - -inline void -Mesher::push( GridTrimVertex *gt ) -{ - assert( itop+1 != (int)stacksize ); - vdata[++itop] = gt; -} - -inline void -Mesher::pop( long ) -{ -} - -inline void -Mesher::openMesh() -{ - backend.bgntmesh( "addedge" ); -} - -inline void -Mesher::closeMesh() -{ - backend.endtmesh(); -} - -inline void -Mesher::swapMesh() -{ - backend.swaptmesh(); -} - -inline void -Mesher::clearStack() -{ - itop = -1; - last[0] = 0; -} - -void -Mesher::finishLower( GridTrimVertex *gtlower ) -{ - for( push(gtlower); - nextlower( gtlower=new(p) GridTrimVertex ); - push(gtlower) ) - addLower(); - addLast(); -} - -void -Mesher::finishUpper( GridTrimVertex *gtupper ) -{ - for( push(gtupper); - nextupper( gtupper=new(p) GridTrimVertex ); - push(gtupper) ) - addUpper(); - addLast(); -} - -void -Mesher::mesh( void ) -{ - GridTrimVertex *gtlower, *gtupper; - - Hull::init( ); - nextupper( gtupper = new(p) GridTrimVertex ); - nextlower( gtlower = new(p) GridTrimVertex ); - - clearStack(); - openMesh(); - push(gtupper); - - nextupper( gtupper = new(p) GridTrimVertex ); - nextlower( gtlower ); - - assert( gtupper->t && gtlower->t ); - - if( gtupper->t->param[0] < gtlower->t->param[0] ) { - push(gtupper); - lastedge = 1; - if( nextupper( gtupper=new(p) GridTrimVertex ) == 0 ) { - finishLower(gtlower); - return; - } - } else if( gtupper->t->param[0] > gtlower->t->param[0] ) { - push(gtlower); - lastedge = 0; - if( nextlower( gtlower=new(p) GridTrimVertex ) == 0 ) { - finishUpper(gtupper); - return; - } - } else { - if( lastedge == 0 ) { - push(gtupper); - lastedge = 1; - if( nextupper(gtupper=new(p) GridTrimVertex) == 0 ) { - finishLower(gtlower); - return; - } - } else { - push(gtlower); - lastedge = 0; - if( nextlower( gtlower=new(p) GridTrimVertex ) == 0 ) { - finishUpper(gtupper); - return; - } - } - } - - while ( 1 ) { - if( gtupper->t->param[0] < gtlower->t->param[0] ) { - push(gtupper); - addUpper(); - if( nextupper( gtupper=new(p) GridTrimVertex ) == 0 ) { - finishLower(gtlower); - return; - } - } else if( gtupper->t->param[0] > gtlower->t->param[0] ) { - push(gtlower); - addLower(); - if( nextlower( gtlower=new(p) GridTrimVertex ) == 0 ) { - finishUpper(gtupper); - return; - } - } else { - if( lastedge == 0 ) { - push(gtupper); - addUpper(); - if( nextupper( gtupper=new(p) GridTrimVertex ) == 0 ) { - finishLower(gtlower); - return; - } - } else { - push(gtlower); - addLower(); - if( nextlower( gtlower=new(p) GridTrimVertex ) == 0 ) { - finishUpper(gtupper); - return; - } - } - } - } -} - -inline int -Mesher::isCcw( int ilast ) -{ - REAL area = det3( vdata[ilast]->t, vdata[itop-1]->t, vdata[itop-2]->t ); - return (area < ZERO) ? 0 : 1; -} - -inline int -Mesher::isCw( int ilast ) -{ - REAL area = det3( vdata[ilast]->t, vdata[itop-1]->t, vdata[itop-2]->t ); - return (area > -ZERO) ? 0 : 1; -} - -inline int -Mesher::equal( int x, int y ) -{ - return( last[0] == vdata[x] && last[1] == vdata[y] ); -} - -inline void -Mesher::copy( int x, int y ) -{ - last[0] = vdata[x]; last[1] = vdata[y]; -} - -inline void -Mesher::move( int x, int y ) -{ - vdata[x] = vdata[y]; -} - -inline void -Mesher::output( int x ) -{ - backend.tmeshvert( vdata[x] ); -} - -/*--------------------------------------------------------------------------- - * addedge - addedge an edge to the triangulation - * - * This code has been re-written to generate large triangle meshes - * from a monotone polygon. Although smaller triangle meshes - * could be generated faster and with less code, larger meshes - * actually give better SYSTEM performance. This is because - * vertices are processed in the backend slower than they are - * generated by this code and any decrease in the number of vertices - * results in a decrease in the time spent in the backend. - *--------------------------------------------------------------------------- - */ - -void -Mesher::addLast( ) -{ - register int ilast = itop; - - if( lastedge == 0 ) { - if( equal( 0, 1 ) ) { - output( ilast ); - swapMesh(); - for( register int i = 2; i < ilast; i++ ) { - swapMesh(); - output( i ); - } - copy( ilast, ilast-1 ); - } else if( equal( ilast-2, ilast-1) ) { - swapMesh(); - output( ilast ); - for( register int i = ilast-3; i >= 0; i-- ) { - output( i ); - swapMesh(); - } - copy( 0, ilast ); - } else { - closeMesh(); openMesh(); - output( ilast ); - output( 0 ); - for( register int i = 1; i < ilast; i++ ) { - swapMesh(); - output( i ); - } - copy( ilast, ilast-1 ); - } - } else { - if( equal( 1, 0) ) { - swapMesh(); - output( ilast ); - for( register int i = 2; i < ilast; i++ ) { - output( i ); - swapMesh(); - } - copy( ilast-1, ilast ); - } else if( equal( ilast-1, ilast-2) ) { - output( ilast ); - swapMesh(); - for( register int i = ilast-3; i >= 0; i-- ) { - swapMesh(); - output( i ); - } - copy( ilast, 0 ); - } else { - closeMesh(); openMesh(); - output( 0 ); - output( ilast ); - for( register int i = 1; i < ilast; i++ ) { - output( i ); - swapMesh(); - } - copy( ilast-1, ilast ); - } - } - closeMesh(); - //for( register long k=0; k<=ilast; k++ ) pop( k ); -} - -void -Mesher::addUpper( ) -{ - register int ilast = itop; - - if( lastedge == 0 ) { - if( equal( 0, 1 ) ) { - output( ilast ); - swapMesh(); - for( register int i = 2; i < ilast; i++ ) { - swapMesh(); - output( i ); - } - copy( ilast, ilast-1 ); - } else if( equal( ilast-2, ilast-1) ) { - swapMesh(); - output( ilast ); - for( register int i = ilast-3; i >= 0; i-- ) { - output( i ); - swapMesh(); - } - copy( 0, ilast ); - } else { - closeMesh(); openMesh(); - output( ilast ); - output( 0 ); - for( register int i = 1; i < ilast; i++ ) { - swapMesh(); - output( i ); - } - copy( ilast, ilast-1 ); - } - lastedge = 1; - //for( register long k=0; k 1) && isCcw( ilast ) ); - - if( equal( ilast-1, ilast-2 ) ) { - output( ilast ); - swapMesh(); - for( register int i=ilast-3; i>=itop-1; i-- ) { - swapMesh(); - output( i ); - } - copy( ilast, itop-1 ); - } else if( equal( itop, itop-1 ) ) { - swapMesh(); - output( ilast ); - for( register int i = itop+1; i < ilast; i++ ) { - output( i ); - swapMesh(); - } - copy( ilast-1, ilast ); - } else { - closeMesh(); openMesh(); - output( ilast ); - output( ilast-1 ); - for( register int i=ilast-2; i>=itop-1; i-- ) { - swapMesh(); - output( i ); - } - copy( ilast, itop-1 ); - } - //for( register int k=itop; k= 0; i-- ) { - swapMesh(); - output( i ); - } - copy( ilast, 0 ); - } else { - closeMesh(); openMesh(); - output( 0 ); - output( ilast ); - for( register int i = 1; i < ilast; i++ ) { - output( i ); - swapMesh(); - } - copy( ilast-1, ilast ); - } - - lastedge = 0; - //for( register long k=0; k 1) && isCw( ilast ) ); - - if( equal( ilast-2, ilast-1) ) { - swapMesh(); - output( ilast ); - for( register int i=ilast-3; i>=itop-1; i--) { - output( i ); - swapMesh( ); - } - copy( itop-1, ilast ); - } else if( equal( itop-1, itop) ) { - output( ilast ); - swapMesh(); - for( register int i=itop+1; i=itop-1; i-- ) { - output( i ); - swapMesh( ); - } - copy( itop-1, ilast ); - } - //for( register int k=itop; kbgntfan(); - - /* - trimVert.param[0]=v[0]; - trimVert.param[1]=v[1]; - backend->tmeshvert(&trimVert); - */ - backend->tmeshvert(v[0], v[1]); - - if(isIncreasing) { - for(i=0; itmeshvert(&trimVert); - */ - backend->tmeshvert(queue[i][0], queue[i][1]); - } - } - else { - for(i=index_queue-1; i>=0; i--) - { - /* - trimVert.param[0]=queue[i][0]; - trimVert.param[1]=queue[i][1]; - backend->tmeshvert(&trimVert); - */ - backend->tmeshvert(queue[i][0], queue[i][1]); - } - } - backend->endtfan(); -} - -void reflexChain::processNewVertex(Real v[2], Backend* backend) -{ - Int i,j,k; - Int isReflex; - /*TrimVertex trimVert;*/ - /*if there are at most one vertex in the queue, then simply insert - */ - if(index_queue <=1){ - insert(v); - return; - } - - /*there are at least two vertices in the queue*/ - j=index_queue-1; - - for(i=j; i>=1; i--) { - if(isIncreasing) { - isReflex = (area(queue[i-1], queue[i], v) <= 0.0); - } - else /*decreasing*/{ - isReflex = (area(v, queue[i], queue[i-1]) <= 0.0); - } - if(isReflex) { - break; - } - } - - /* - *if ibgntfan(); - /* - trimVert.param[0]=v[0]; - trimVert.param[1]=v[1]; - backend->tmeshvert(& trimVert); - */ - backend->tmeshvert(v[0], v[1]); - - if(isIncreasing) { - for(k=i; k<=j; k++) - { - /* - trimVert.param[0]=queue[k][0]; - trimVert.param[1]=queue[k][1]; - backend->tmeshvert(& trimVert); - */ - backend->tmeshvert(queue[k][0], queue[k][1]); - } - } - else { - for(k=j; k>=i; k--) - { - /* - trimVert.param[0]=queue[k][0]; - trimVert.param[1]=queue[k][1]; - backend->tmeshvert(& trimVert); - */ - backend->tmeshvert(queue[k][0], queue[k][1]); - } - } - - backend->endtfan(); - } - - /*delete vertices i+1--j from the queue*/ - index_queue = i+1; - /*finally insert v at the end of the queue*/ - insert(v); - -} - - -void monoTriangulationRec(Real* topVertex, Real* botVertex, - vertexArray* inc_chain, Int inc_current, - vertexArray* dec_chain, Int dec_current, - Backend* backend) -{ - assert( inc_chain != NULL && dec_chain != NULL); - assert( ! (inc_current>=inc_chain->getNumElements() && - dec_current>=dec_chain->getNumElements())); - Int inc_nVertices; - Int dec_nVertices; - Real** inc_array ; - Real** dec_array ; - Int i; - assert( ! ( (inc_chain==NULL) && (dec_chain==NULL))); - - if(inc_current>=inc_chain->getNumElements()) /*no more vertices on inc_chain*/ - { - - dec_array = dec_chain->getArray(); - dec_nVertices = dec_chain->getNumElements(); - reflexChain rChain(20,0); - /*put the top vertex into the reflex chain*/ - rChain.processNewVertex(topVertex, backend); - /*process all the vertices on the dec_chain*/ - for(i=dec_current; i= dec_chain->getNumElements()) /*no more vertices on dec_chain*/ - { - inc_array = inc_chain->getArray(); - inc_nVertices= inc_chain->getNumElements(); - reflexChain rChain(20,1); - /*put the top vertex into the reflex chain*/ - rChain.processNewVertex(topVertex, backend); - /*process all the vertices on the inc_chain*/ - for(i=inc_current; i getArray(); - dec_array = dec_chain -> getArray(); - inc_nVertices= inc_chain->getNumElements(); - dec_nVertices= dec_chain->getNumElements(); - /*if top of inc_chain is 'lower' than top of dec_chain, process all the - *vertices on the dec_chain which are higher than top of inc_chain - */ - if(compV2InY(inc_array[inc_current], dec_array[dec_current]) <= 0) - { - - reflexChain rChain(20, 0); - rChain.processNewVertex(topVertex, backend); - for(i=dec_current; i 0*/ - { - - reflexChain rChain(20, 1); - rChain.processNewVertex(topVertex, backend); - for(i=inc_current; i0) - rChain.processNewVertex(inc_array[i], backend); - else - break; - } - rChain.outputFan(dec_array[dec_current], backend); - monoTriangulationRec(inc_array[i-1], botVertex, - inc_chain, i, - dec_chain, dec_current, - backend); - } - }/*end case neither is empty*/ -} - - -void monoTriangulationFunBackend(Arc_ptr loop, Int (*compFun)(Real*, Real*), Backend* backend) -{ - Int i; - /*find the top vertex, bottom vertex, inccreasing chain, and decreasing chain, - *then call monoTriangulationRec - */ - Arc_ptr tempV; - Arc_ptr topV; - Arc_ptr botV; - topV = botV = loop; - for(tempV = loop->next; tempV != loop; tempV = tempV->next) - { - if(compFun(topV->tail(), tempV->tail())<0) { - topV = tempV; - } - if(compFun(botV->tail(), tempV->tail())>0) { - botV = tempV; - } - } - - /*creat increase and decrease chains*/ - vertexArray inc_chain(20); /*this is a dynamic array*/ - for(i=1; i<=topV->pwlArc->npts-2; i++) { /*the first vertex is the top vertex which doesn't belong to inc_chain*/ - inc_chain.appendVertex(topV->pwlArc->pts[i].param); - } - for(tempV = topV->next; tempV != botV; tempV = tempV->next) - { - for(i=0; i<=tempV->pwlArc->npts-2; i++){ - inc_chain.appendVertex(tempV->pwlArc->pts[i].param); - } - } - - vertexArray dec_chain(20); - for(tempV = topV->prev; tempV != botV; tempV = tempV->prev) - { - for(i=tempV->pwlArc->npts-2; i>=0; i--){ - dec_chain.appendVertex(tempV->pwlArc->pts[i].param); - } - } - for(i=botV->pwlArc->npts-2; i>=1; i--){ - dec_chain.appendVertex(tempV->pwlArc->pts[i].param); - } - - monoTriangulationRecFunBackend(topV->tail(), botV->tail(), &inc_chain, 0, &dec_chain, 0, compFun, backend); - -} - -/*if compFun == compV2InY, top to bottom: V-monotone - *if compFun == compV2InX, right to left: U-monotone - */ -void monoTriangulationRecFunBackend(Real* topVertex, Real* botVertex, - vertexArray* inc_chain, Int inc_current, - vertexArray* dec_chain, Int dec_current, - Int (*compFun)(Real*, Real*), - Backend* backend) -{ - assert( inc_chain != NULL && dec_chain != NULL); - assert( ! (inc_current>=inc_chain->getNumElements() && - dec_current>=dec_chain->getNumElements())); - Int inc_nVertices; - Int dec_nVertices; - Real** inc_array ; - Real** dec_array ; - Int i; - assert( ! ( (inc_chain==NULL) && (dec_chain==NULL))); - - if(inc_current>=inc_chain->getNumElements()) /*no more vertices on inc_chain*/ - { - - dec_array = dec_chain->getArray(); - dec_nVertices = dec_chain->getNumElements(); - reflexChain rChain(20,0); - /*put the top vertex into the reflex chain*/ - rChain.processNewVertex(topVertex, backend); - /*process all the vertices on the dec_chain*/ - for(i=dec_current; i= dec_chain->getNumElements()) /*no more vertices on dec_chain*/ - { - inc_array = inc_chain->getArray(); - inc_nVertices= inc_chain->getNumElements(); - reflexChain rChain(20,1); - /*put the top vertex into the reflex chain*/ - rChain.processNewVertex(topVertex, backend); - /*process all the vertices on the inc_chain*/ - for(i=inc_current; i getArray(); - dec_array = dec_chain -> getArray(); - inc_nVertices= inc_chain->getNumElements(); - dec_nVertices= dec_chain->getNumElements(); - /*if top of inc_chain is 'lower' than top of dec_chain, process all the - *vertices on the dec_chain which are higher than top of inc_chain - */ - if(compFun(inc_array[inc_current], dec_array[dec_current]) <= 0) - { - - reflexChain rChain(20, 0); - rChain.processNewVertex(topVertex, backend); - for(i=dec_current; i 0*/ - { - - reflexChain rChain(20, 1); - rChain.processNewVertex(topVertex, backend); - for(i=inc_current; i0) - rChain.processNewVertex(inc_array[i], backend); - else - break; - } - rChain.outputFan(dec_array[dec_current], backend); - monoTriangulationRecFunBackend(inc_array[i-1], botVertex, - inc_chain, i, - dec_chain, dec_current, - compFun, - backend); - } - }/*end case neither is empty*/ -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/monotonizer.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/monotonizer.cc deleted file mode 100644 index 7b6685dd06..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/monotonizer.cc +++ /dev/null @@ -1,262 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * monotonizer.c++ - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/monotonizer.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#include "glimports.h" -#include "mystdio.h" -#include "myassert.h" -#include "arc.h" -#include "arctess.h" -#include "bezierarc.h" -#include "bin.h" -#include "mapdesc.h" -#include "nurbsconsts.h" -#include "subdivider.h" - -/*----------------------------------------------------------------------------- - * Subdivider::decompose - break all curves into monotone arcs - *----------------------------------------------------------------------------- - */ -int -Subdivider::decompose( Bin& bin, REAL geo_stepsize ) -{ - Arc_ptr jarc; - for( jarc=bin.firstarc(); jarc; jarc=bin.nextarc() ) { - if( ! jarc->isTessellated() ) { - /* points have not been transformed, therefore they may be either - homogeneous or inhomogeneous */ - tessellate( jarc, geo_stepsize ); - if( jarc->isDisconnected() || jarc->next->isDisconnected() ) - return 1; - } - } - - for( jarc=bin.firstarc(); jarc; jarc=bin.nextarc() ) { - monotonize( jarc, bin ); - } - -#ifndef NDEBUG - for( jarc=bin.firstarc(); jarc; jarc=bin.nextarc() ) { - assert( isMonotone( jarc ) != 0 ); - } -#endif - - return 0; -} - -void -Subdivider::tessellate( Arc_ptr jarc, REAL geo_stepsize ) -{ - BezierArc *b = jarc->bezierArc; - Mapdesc *mapdesc = b->mapdesc; - - if( mapdesc->isRational() ) { - REAL max = mapdesc->calcVelocityRational( b->cpts, b->stride, b->order ); - REAL arc_stepsize = (max > 1.0) ? (1.0/max) : 1.0; - if( jarc->bezierArc->order != 2 ) - arctessellator.tessellateNonlinear( jarc, geo_stepsize, arc_stepsize, 1 ); - else { - arctessellator.tessellateLinear( jarc, geo_stepsize, arc_stepsize, 1 ); - } - } else { - REAL max = mapdesc->calcVelocityNonrational( b->cpts, b->stride, b->order ); - REAL arc_stepsize = (max > 1.0) ? (1.0/max) : 1.0; - if( jarc->bezierArc->order != 2 ) - arctessellator.tessellateNonlinear( jarc, geo_stepsize, arc_stepsize, 0 ); - else { - arctessellator.tessellateLinear( jarc, geo_stepsize, arc_stepsize, 0 ); - } - } -} - -/*------------------------------------------------------------------------- - * Subdivider::monotonize - break up a jordan arc into s,t-monotone - * components. This code will remove degenerate segments, including - * arcs of only a single point. - *------------------------------------------------------------------------- - */ -void -Subdivider::monotonize( Arc_ptr jarc, Bin& bin ) -{ - TrimVertex *firstvert = jarc->pwlArc->pts; - TrimVertex *lastvert = firstvert + (jarc->pwlArc->npts - 1); - long uid = jarc->nuid; - arc_side side = jarc->getside(); - dir sdir = none; - dir tdir = none; - int degenerate = 1; - - int nudegenerate; - int change; - - TrimVertex *vert; - for( vert = firstvert; vert != lastvert; vert++ ) { - - nudegenerate = 1; - change = 0; - - /* check change relative to s axis, clear degenerate bit if needed */ - REAL sdiff = vert[1].param[0] - vert[0].param[0]; - if( sdiff == 0 ) { - if( sdir != same ) { - sdir = same; - change = 1; - } - } else if( sdiff < 0.0 ) { - if( sdir != down ) { - sdir = down; - change = 1; - } - nudegenerate = 0; - } else { - if( sdir != up ) { - sdir = up; - change = 1; - } - nudegenerate = 0; - } - - /* check change relative to t axis, clear degenerate bit if needed */ - REAL tdiff = vert[1].param[1] - vert[0].param[1]; - if( tdiff == 0 ) { - if( tdir != same ) { - tdir = same; - change = 1; - } - } else if( tdiff < 0.0 ) { - if( tdir != down ) { - tdir = down; - change = 1; - } - nudegenerate = 0; - } else { - if( tdir != up ) { - tdir = up; - change = 1; - } - nudegenerate = 0; - } - - if( change ) { - if( ! degenerate ) { - /* make last segment into separate pwl curve */ - jarc->pwlArc->npts = vert - firstvert + 1; - jarc = (new(arcpool) Arc( side, uid ))->append( jarc ); - jarc->pwlArc = new(pwlarcpool) PwlArc(); - bin.addarc( jarc ); - } - firstvert = jarc->pwlArc->pts = vert; - degenerate = nudegenerate; - } - } - jarc->pwlArc->npts = vert - firstvert + 1; - - if( degenerate ) { - /* remove jarc from circularly linked list */ - jarc->prev->next = jarc->next; - jarc->next->prev = jarc->prev; - - assert( jarc->prev->check( ) != 0 ); - assert( jarc->next->check( ) != 0 ); - - /* remove jarc from bin */ - bin.remove_this_arc( jarc ); - - jarc->pwlArc->deleteMe( pwlarcpool ); jarc->pwlArc = 0; - jarc->deleteMe( arcpool ); - } -} - -/*------------------------------------------------------------------------- - * Subdivider::isMonotone - return true if arc is monotone AND non-degenerate - *------------------------------------------------------------------------- - */ -int -Subdivider::isMonotone( Arc_ptr jarc ) -{ - TrimVertex *firstvert = jarc->pwlArc->pts; - TrimVertex *lastvert = firstvert + (jarc->pwlArc->npts - 1); - - if( firstvert == lastvert ) return 1; - - TrimVertex *vert = firstvert; - enum dir sdir; - enum dir tdir; - - REAL diff = vert[1].param[0] - vert[0].param[0]; - if( diff == 0.0 ) - sdir = same; - else if( diff < 0.0 ) - sdir = down; - else - sdir = up; - - diff = vert[1].param[1] - vert[0].param[1]; - if( diff == 0.0 ) - tdir = same; - else if( diff < 0.0 ) - tdir = down; - else - tdir = up; - - if( (sdir == same) && (tdir == same) ) return 0; - - for( ++vert ; vert != lastvert; vert++ ) { - diff = vert[1].param[0] - vert[0].param[0]; - if( diff == 0.0 ) { - if( sdir != same ) return 0; - } else if( diff < 0.0 ) { - if( sdir != down ) return 0; - } else { - if( sdir != up ) return 0; - } - - diff = vert[1].param[1] - vert[0].param[1]; - if( diff == 0.0 ) { - if( tdir != same ) return 0; - } else if( diff < 0.0 ) { - if( tdir != down ) return 0; - } else { - if( tdir != up ) return 0; - } - } - return 1; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/monotonizer.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/monotonizer.h deleted file mode 100644 index 5ff766a497..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/monotonizer.h +++ /dev/null @@ -1,47 +0,0 @@ -/************************************************************************** - * * - * Copyright (C) 1999, Silicon Graphics, Inc. * - * * - * These coded instructions, statements, and computer programs contain * - * unpublished proprietary information of Silicon Graphics, Inc., and * - * are protected by Federal copyright law. They may not be disclosed * - * to third parties or copied or duplicated in any form, in whole or * - * in part, without the prior written consent of Silicon Graphics, Inc. * - * * - **************************************************************************/ - -/* - * monotonizer.h - * - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/monotonizer.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glumonotonizer_h_ -#define __glumonotonizer_h_ - -#include "mysetjmp.h" -#include "types.h" - -class Arc; -class ArcTessellator; -class Pool; -class Bin; -class PwlArcPool; -class Mapdesc; - -class Monotonizer { - ArcTessellator& arctessellator; - Pool& arcpool; - Pool& pwlarcpool; - jmp_buf& nurbsJmpBuf; - - enum dir { down, same, up, none }; - void tessellate( Arc *, REAL ); - void monotonize( Arc *, Bin & ); - int isMonotone( Arc * ); -public: - Monotonizer( ArcTessellator& at, Pool& ap, Pool& p, jmp_buf& j ) - : arctessellator(at), arcpool(ap), pwlarcpool(p), nurbsJmpBuf(j) {} - int decompose( Bin &, REAL ); -}; -#endif /* __glumonotonizer_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/myassert.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/myassert.h deleted file mode 100644 index e222c7e43e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/myassert.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * myassert.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/myassert.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glumyassert_h_ -#define __glumyassert_h_ - -#ifdef STANDALONE -#define assert(EX) ((void)0) -#endif - -#ifdef LIBRARYBUILD -#include -#endif - -#ifdef GLBUILD -#define assert(EX) ((void)0) -#endif - -#endif /* __glumyassert_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mycode.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mycode.cc deleted file mode 100644 index c49f64fa21..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mycode.cc +++ /dev/null @@ -1,69 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mycode.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include "mymath.h" - -#ifdef NEEDCEILF - -float ceilf( float x ) -{ - if( x < 0 ) { - float nx = -x; - int ix = (int) nx; - return (float) -ix; - } else { - int ix = (int) x; - if( x == (float) ix ) return x; - return (float) (ix+1); - } -} - -float floorf( float x ) -{ - if( x < 0 ) { - float nx = -x; - int ix = (int) nx; - if( nx == (float) ix ) return x; - return (float) -(ix+1); - } else { - int ix = (int) x; - return (float) ix; - } -} -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mymath.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mymath.h deleted file mode 100644 index 73078251dd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mymath.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * mymath.h - * - */ - -#ifndef __glumymath_h_ -#define __glumymath_h_ - -#ifdef GLBUILD -#define sqrtf gl_fsqrt -#endif - -#if defined(GLBUILD) || defined(STANDALONE) -#define M_SQRT2 1.41421356237309504880 -#define ceilf myceilf -#define floorf myfloorf -#define sqrtf sqrt -extern "C" double sqrt(double); -extern "C" float ceilf(float); -extern "C" float floorf(float); -#define NEEDCEILF -#endif - -#ifdef LIBRARYBUILD -#include -#endif - -#if !defined sqrtf -# define sqrtf(x) ((float)sqrt(x)) -#endif -#if !defined ceilf -# define ceilf(x) ((float)ceil(x)) -#endif -#if !defined floorf -# define floorf(x) ((float)floor(x)) -#endif - -#endif /* __glumymath_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mysetjmp.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mysetjmp.h deleted file mode 100644 index bfb9cea98b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mysetjmp.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * mysetjmp.h - * - */ - -#ifndef __glumysetjmp_h_ -#define __glumysetjmp_h_ - -#ifdef STANDALONE -struct JumpBuffer; -extern "C" JumpBuffer *newJumpbuffer( void ); -extern "C" void deleteJumpbuffer(JumpBuffer *); -extern "C" void mylongjmp( JumpBuffer *, int ); -extern "C" int mysetjmp( JumpBuffer * ); -#endif - -#ifdef GLBUILD -#define setjmp gl_setjmp -#define longjmp gl_longjmp -#endif - -#if defined(LIBRARYBUILD) || defined(GLBUILD) -#include -#include - -struct JumpBuffer { - jmp_buf buf; -}; - -inline JumpBuffer * -newJumpbuffer( void ) -{ - return (JumpBuffer *) malloc( sizeof( JumpBuffer ) ); -} - -inline void -deleteJumpbuffer(JumpBuffer *jb) -{ - free( (void *) jb); -} - -inline void -mylongjmp( JumpBuffer *j, int code ) -{ - ::longjmp( j->buf, code ); -} - -inline int -mysetjmp( JumpBuffer *j ) -{ - return setjmp( j->buf ); -} -#endif - -#endif /* __glumysetjmp_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mystring.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mystring.h deleted file mode 100644 index 8b9032bf23..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/mystring.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * mystring.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mystring.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glumystring_h_ -#define __glumystring_h_ - -#ifdef STANDALONE -typedef unsigned int size_t; -extern "C" void * memcpy(void *, const void *, size_t); -extern "C" void * memset(void *, int, size_t); -#endif - -#ifdef GLBUILD -#define memcpy(a,b,c) bcopy(b,a,c) -#define memset(a,b,c) bzero(a,c) -extern "C" void bcopy(const void *, void *, int); -extern "C" void bzero(void *, int); -#endif - -#ifdef LIBRARYBUILD -#include -#endif - -#endif /* __glumystring_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/nurbsconsts.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/nurbsconsts.h deleted file mode 100644 index 7b9dcc39cd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/nurbsconsts.h +++ /dev/null @@ -1,126 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * nurbsconsts.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/nurbsconsts.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glunurbsconsts_h_ -#define __glunurbsconsts_h_ - -/* NURBS Properties - one set per map, - each takes a single INREAL arg */ -#define N_SAMPLING_TOLERANCE 1 -#define N_S_RATE 6 -#define N_T_RATE 7 -#define N_CLAMPFACTOR 13 -#define N_NOCLAMPING 0.0 -#define N_MINSAVINGS 14 -#define N_NOSAVINGSSUBDIVISION 0.0 - -/* NURBS Properties - one set per map, - each takes an enumerated value */ -#define N_CULLING 2 -#define N_NOCULLING 0.0 -#define N_CULLINGON 1.0 -#define N_SAMPLINGMETHOD 10 -#define N_NOSAMPLING 0.0 -#define N_FIXEDRATE 3.0 -#define N_DOMAINDISTANCE 2.0 -#define N_PARAMETRICDISTANCE 5.0 -#define N_PATHLENGTH 6.0 -#define N_SURFACEAREA 7.0 -#define N_OBJECTSPACE_PARA 8.0 -#define N_OBJECTSPACE_PATH 9.0 -#define N_BBOX_SUBDIVIDING 17 -#define N_NOBBOXSUBDIVISION 0.0 -#define N_BBOXTIGHT 1.0 -#define N_BBOXROUND 2.0 - -/* NURBS Rendering Properties - one set per renderer - each takes an enumerated value */ -#define N_DISPLAY 3 -#define N_FILL 1.0 -#define N_OUTLINE_POLY 2.0 -#define N_OUTLINE_TRI 3.0 -#define N_OUTLINE_QUAD 4.0 -#define N_OUTLINE_PATCH 5.0 -#define N_OUTLINE_PARAM 6.0 -#define N_OUTLINE_PARAM_S 7.0 -#define N_OUTLINE_PARAM_ST 8.0 -#define N_OUTLINE_SUBDIV 9.0 -#define N_OUTLINE_SUBDIV_S 10.0 -#define N_OUTLINE_SUBDIV_ST 11.0 -#define N_ISOLINE_S 12.0 -#define N_ERRORCHECKING 4 -#define N_NOMSG 0.0 -#define N_MSG 1.0 - -/* GL 4.0 propeties not defined above */ -#ifndef N_PIXEL_TOLERANCE -#define N_PIXEL_TOLERANCE N_SAMPLING_TOLERANCE -#define N_ERROR_TOLERANCE 20 -#define N_SUBDIVISIONS 5 -#define N_TILES 8 -#define N_TMP1 9 -#define N_TMP2 N_SAMPLINGMETHOD -#define N_TMP3 11 -#define N_TMP4 12 -#define N_TMP5 N_CLAMPFACTOR -#define N_TMP6 N_MINSAVINGS -#define N_S_STEPS N_S_RATE -#define N_T_STEPS N_T_RATE -#endif - -/* NURBS Rendering Properties - one set per map, - each takes an INREAL matrix argument */ -#define N_CULLINGMATRIX 1 -#define N_SAMPLINGMATRIX 2 -#define N_BBOXMATRIX 3 - - -/* NURBS Rendering Properties - one set per map, - each takes an INREAL vector argument */ -#define N_BBOXSIZE 4 - -/* type argument for trimming curves */ -#ifndef N_P2D -#define N_P2D 0x8 -#define N_P2DR 0xd -#endif - -#endif /* __glunurbsconsts_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/nurbsinterfac.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/nurbsinterfac.cc deleted file mode 100644 index 1a68ca51d9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/nurbsinterfac.cc +++ /dev/null @@ -1,537 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * nurbsinterfac.c++ - * - */ - -#include "glimports.h" -#include "mystdio.h" -#include "nurbsconsts.h" -#include "nurbstess.h" -#include "bufpool.h" -#include "quilt.h" -#include "displaylist.h" -#include "knotvector.h" -#include "mapdesc.h" - -#define THREAD( work, arg, cleanup ) \ - if( dl ) {\ - arg->save = 1;\ - dl->append( (PFVS)&NurbsTessellator::work, (void *) arg, (PFVS)&NurbsTessellator::cleanup );\ - } else {\ - arg->save = 0;\ - work( arg );\ - } - -#define THREAD2( work ) \ - if( dl ) {\ - dl->append( (PFVS)&NurbsTessellator::work, 0, 0 );\ - } else {\ - work( );\ - } - -NurbsTessellator::NurbsTessellator( BasicCurveEvaluator &c, BasicSurfaceEvaluator& e) - : maplist( backend ), - backend( c, e ), - subdivider( renderhints, backend ), - o_pwlcurvePool( sizeof( O_pwlcurve ), 32, "o_pwlcurvePool" ), - o_nurbscurvePool( sizeof( O_nurbscurve ), 32, "o_nurbscurvePool"), - o_curvePool( sizeof( O_curve ), 32, "o_curvePool" ), - o_trimPool( sizeof( O_trim ), 32, "o_trimPool" ), - o_surfacePool( sizeof( O_surface ), 1, "o_surfacePool" ), - o_nurbssurfacePool( sizeof( O_nurbssurface ), 4, "o_nurbssurfacePool" ), - propertyPool( sizeof( Property ), 32, "propertyPool" ), - quiltPool( sizeof( Quilt ), 32, "quiltPool" ) -{ - dl = 0; - inSurface = 0; - inCurve = 0; - inTrim = 0; - playBack = 0; - jumpbuffer = newJumpbuffer(); - subdivider.setJumpbuffer( jumpbuffer ); -} - -NurbsTessellator::~NurbsTessellator( void ) -{ - if( inTrim ) { - do_nurbserror( 12 ); - endtrim(); - } - - if( inSurface ) { - *nextNurbssurface = 0; - do_freeall(); - } - - if (jumpbuffer) { - deleteJumpbuffer(jumpbuffer); - jumpbuffer= 0; - } -} - -/*----------------------------------------------------------------------------- - * bgnsurface - allocate and initialize an o_surface structure - * - * Client: GL user - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::bgnsurface( long nuid ) -{ - O_surface *o_surface = new(o_surfacePool) O_surface; - o_surface->nuid = nuid; - THREAD( do_bgnsurface, o_surface, do_freebgnsurface ); -} - -/*----------------------------------------------------------------------------- - * bgncurve - allocate an initialize an o_curve structure - * - * Client: GL user - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::bgncurve( long nuid ) -{ - O_curve *o_curve = new(o_curvePool) O_curve; - o_curve->nuid = nuid; - THREAD( do_bgncurve, o_curve, do_freebgncurve ); -} -/*----------------------------------------------------------------------------- - * endcurve - - * - * Client: - *----------------------------------------------------------------------------- - */ - -void -NurbsTessellator::endcurve( void ) -{ - THREAD2( do_endcurve ); -} - -/*----------------------------------------------------------------------------- - * endsurface - user level end of surface call - * - * Client: GL user - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::endsurface( void ) -{ - THREAD2( do_endsurface ); -} - - -/*----------------------------------------------------------------------------- - * bgntrim - allocate and initialize a new trim loop structure (o_trim ) - * - * Client: GL user - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::bgntrim( void ) -{ - O_trim *o_trim = new(o_trimPool) O_trim; - THREAD( do_bgntrim, o_trim, do_freebgntrim ); -} - -/*----------------------------------------------------------------------------- - * endtrim - - * - * Client: GL user - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::endtrim( void ) -{ - THREAD2( do_endtrim ); -} - - -/*----------------------------------------------------------------------------- - * pwlcurve - - * - * count - number of points on curve - * array - array of points on curve - * byte_stride - distance between points in bytes - * type - valid data flag - * - * Client: Gl user - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::pwlcurve( long count, INREAL array[], long byte_stride, long type ) -{ - Mapdesc *mapdesc = maplist.locate( type ); - - if( mapdesc == 0 ) { - do_nurbserror( 35 ); - isDataValid = 0; - return; - } - - if ( (type != N_P2D) && (type != N_P2DR) ) { - do_nurbserror( 22 ); - isDataValid = 0; - return; - } - if( count < 0 ) { - do_nurbserror( 33 ); - isDataValid = 0; - return; - } - if( byte_stride < 0 ) { - do_nurbserror( 34 ); - isDataValid = 0; - return; - } - -#ifdef NOTDEF - if( mapdesc->isRational() ) { - INREAL *p = array; - INREAL x = p[0]; INREAL y = p[1]; INREAL w = p[2]; - p = (INREAL *) (((char *) p) + byte_stride); - for( long i = 1; i != count; i++ ) { - if( p[0] == x && p[1] == y && p[2] == w ) break; - x = p[0]; y = p[1]; w = p[2]; - p = (INREAL *) (((char *) p) + byte_stride); - } - if( i != count ) { - do_nurbserror( 37 ); - dprintf( "point %d (%f,%f)\n", i, x, y ); - isDataValid = 0; - return; - } - } else { - INREAL *p = array; - INREAL x = p[0]; INREAL y = p[1]; - p = (INREAL *) (((char *) p) + byte_stride); - for( long i = 1; i != count; i++ ) { - if( p[0] == x && p[1] == y ) break; - x = p[0]; y = p[1]; - p = (INREAL *) (((char *) p) + byte_stride); - } - if( i != count ) { - do_nurbserror( 37 ); - dprintf( "point %d (%f,%f)\n", i, x, y ); - isDataValid = 0; - return; - } - } -#endif - - O_pwlcurve *o_pwlcurve = new(o_pwlcurvePool) O_pwlcurve( type, count, array, byte_stride, extTrimVertexPool.get((int)count) ); - THREAD( do_pwlcurve, o_pwlcurve, do_freepwlcurve ); -} - - -/*----------------------------------------------------------------------------- - * nurbscurve - - * - * Client: GL user - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::nurbscurve( - long nknots, /* number of p knots */ - INREAL knot[], /* nondecreasing knot values in p */ - long byte_stride, /* distance in bytes between control points */ - INREAL ctlarray[], /* pointer to first control point */ - long order, /* order of spline */ - long type ) /* description of range space */ -{ - - Mapdesc *mapdesc = maplist.locate( type ); - - if( mapdesc == 0 ) { - do_nurbserror( 35 ); - isDataValid = 0; - return; - } - - if( ctlarray == 0 ) { - do_nurbserror( 36 ); - isDataValid = 0; - return; - } - - if( byte_stride < 0 ) { - do_nurbserror( 34 ); - isDataValid = 0; - return; - } - - Knotvector knots; - - knots.init( nknots, byte_stride, order, knot ); - if( do_check_knots( &knots, "curve" ) ) return; - - O_nurbscurve *o_nurbscurve = new(o_nurbscurvePool) O_nurbscurve(type); - o_nurbscurve->bezier_curves = new(quiltPool) Quilt(mapdesc); - o_nurbscurve->bezier_curves->toBezier( knots,ctlarray, mapdesc->getNcoords() ); - - THREAD( do_nurbscurve, o_nurbscurve, do_freenurbscurve ); -} - - -/*----------------------------------------------------------------------------- - * nurbssurface - - * - * Client: User routine - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::nurbssurface( - long sknot_count, /* number of s knots */ - INREAL sknot[], /* nondecreasing knot values in s */ - long tknot_count, /* number of t knots */ - INREAL tknot[], /* nondecreasing knot values in t */ - long s_byte_stride, /* s step size in memory bytes */ - long t_byte_stride, /* t step size in memory bytes */ - INREAL ctlarray[], /* pointer to first control point */ - long sorder, /* order of the spline in s parameter */ - long torder, /* order of the spline in t parameter */ - long type) /* description of range space */ -{ - Mapdesc *mapdesc = maplist.locate( type ); - - if( mapdesc == 0 ) { - do_nurbserror( 35 ); - isDataValid = 0; - return; - } - - if( s_byte_stride < 0 ) { - do_nurbserror( 34 ); - isDataValid = 0; - return; - } - - if( t_byte_stride < 0 ) { - do_nurbserror( 34 ); - isDataValid = 0; - return; - } - - Knotvector sknotvector, tknotvector; - - sknotvector.init( sknot_count, s_byte_stride, sorder, sknot ); - if( do_check_knots( &sknotvector, "surface" ) ) return; - - tknotvector.init( tknot_count, t_byte_stride, torder, tknot ); - if( do_check_knots( &tknotvector, "surface" ) ) return; - - O_nurbssurface *o_nurbssurface = new(o_nurbssurfacePool) O_nurbssurface(type); - o_nurbssurface->bezier_patches = new(quiltPool) Quilt(mapdesc); - - o_nurbssurface->bezier_patches->toBezier( sknotvector, tknotvector, - ctlarray, mapdesc->getNcoords() ); - THREAD( do_nurbssurface, o_nurbssurface, do_freenurbssurface ); -} - - -/*----------------------------------------------------------------------------- - * setnurbsproperty - - * - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::setnurbsproperty( long tag, INREAL value ) -{ - if( ! renderhints.isProperty( tag ) ) { - do_nurbserror( 26 ); - } else { - Property *prop = new(propertyPool) Property( tag, value ); - THREAD( do_setnurbsproperty, prop, do_freenurbsproperty ); - } -} - -/*----------------------------------------------------------------------------- - * setnurbsproperty - - * - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::setnurbsproperty( long type, long tag, INREAL value ) -{ - Mapdesc *mapdesc = maplist.locate( type ); - - if( mapdesc == 0 ) { - do_nurbserror( 35 ); - return; - } - - if( ! mapdesc->isProperty( tag ) ) { - do_nurbserror( 26 ); - return; - } - - Property *prop = new(propertyPool) Property( type, tag, value ); - THREAD( do_setnurbsproperty2, prop, do_freenurbsproperty ); -} - - -/*----------------------------------------------------------------------------- - * getnurbsproperty - - * - *----------------------------------------------------------------------------- - */ - -void -NurbsTessellator::getnurbsproperty( long tag, INREAL *value ) -{ - if( renderhints.isProperty( tag ) ) { - *value = renderhints.getProperty( tag ); - } else { - do_nurbserror( 26 ); - } -} - -/*----------------------------------------------------------------------------- - * getnurbsproperty - - * - *----------------------------------------------------------------------------- - */ - -void -NurbsTessellator::getnurbsproperty( long type, long tag, INREAL *value ) -{ - Mapdesc *mapdesc = maplist.locate( type ); - - if( mapdesc == 0 ) - do_nurbserror( 35 ); - - if( mapdesc->isProperty( tag ) ) { - *value = mapdesc->getProperty( tag ); - } else { - do_nurbserror( 26 ); - } -} - -/*-------------------------------------------------------------------------- - * setnurbsproperty - accept a user supplied matrix as culling or sampling mat - *-------------------------------------------------------------------------- - */ - -void -NurbsTessellator::setnurbsproperty( long type, long purpose, INREAL *mat ) -{ - // XXX - cannot be put in display list - Mapdesc *mapdesc = maplist.locate( type ); - - if( mapdesc == 0 ) { - do_nurbserror( 35 ); - isDataValid = 0; - } else if( purpose == N_BBOXSIZE ) { - mapdesc->setBboxsize( mat ); - } else { -#ifndef NDEBUG - dprintf( "ERRORRORRORR!!!\n"); -#endif - } -} - -/*-------------------------------------------------------------------------- - * setnurbsproperty - accept a user supplied matrix as culling or sampling mat - *-------------------------------------------------------------------------- - */ - -void -NurbsTessellator::setnurbsproperty( long type, long purpose, INREAL *mat, - long rstride, long cstride ) -{ - // XXX - cannot be put in display list - Mapdesc *mapdesc = maplist.locate( type ); - - if( mapdesc == 0 ) { - do_nurbserror( 35 ); - isDataValid = 0; - } else if( purpose == N_CULLINGMATRIX ) { - mapdesc->setCmat( mat, rstride, cstride ); - } else if( purpose == N_SAMPLINGMATRIX ) { - mapdesc->setSmat( mat, rstride, cstride ); - } else if( purpose == N_BBOXMATRIX ) { - mapdesc->setBmat( mat, rstride, cstride ); - } else { -#ifndef NDEBUG - dprintf( "ERRORRORRORR!!!\n"); -#endif - } -} - -void -NurbsTessellator::redefineMaps( void ) -{ - maplist.initialize(); -} - -void -NurbsTessellator::defineMap( long type, long rational, long ncoords ) -{ - maplist.define( type, (int) rational, (int) ncoords ); -} - -void -NurbsTessellator::discardRecording( void *_dl ) -{ - delete (DisplayList *) _dl; -} - -void * -NurbsTessellator::beginRecording( void ) -{ - dl = new DisplayList( this ); - return (void *) dl; -} - -void -NurbsTessellator::endRecording( void ) -{ - dl->endList(); - dl = 0; -} - -void -NurbsTessellator::playRecording( void *_dl ) -{ - playBack = 1; - bgnrender(); - ((DisplayList *)_dl)->play(); - endrender(); - playBack = 0; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/nurbstess.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/nurbstess.cc deleted file mode 100644 index 83c67fe834..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/nurbstess.cc +++ /dev/null @@ -1,693 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * nurbstess.c++ - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/nurbstess.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "mysetjmp.h" -#include "mystdio.h" -#include "nurbsconsts.h" -#include "nurbstess.h" -#include "bufpool.h" -#include "quilt.h" -#include "knotvector.h" -#include "mapdesc.h" -#include "maplist.h" - -void -NurbsTessellator::set_domain_distance_u_rate(REAL u_rate) -{ - subdivider.set_domain_distance_u_rate(u_rate); -} - -void -NurbsTessellator::set_domain_distance_v_rate(REAL v_rate) -{ - subdivider.set_domain_distance_v_rate(v_rate); -} - -void -NurbsTessellator::set_is_domain_distance_sampling(int flag) -{ - subdivider.set_is_domain_distance_sampling(flag); -} - -void -NurbsTessellator::resetObjects( void ) -{ - subdivider.clear(); -} - -void -NurbsTessellator::makeobj( int ) -{ -#ifndef NDEBUG - dprintf( "makeobj\n" ); -#endif -} - -void -NurbsTessellator::closeobj( void ) -{ -#ifndef NDEBUG - dprintf( "closeobj\n" ); -#endif -} - -void -NurbsTessellator::bgnrender( void ) -{ -#ifndef NDEBUG - dprintf( "bgnrender\n" ); -#endif -} - -void -NurbsTessellator::endrender( void ) -{ -#ifndef NDEBUG - dprintf( "endrender\n" ); -#endif -} - -/*----------------------------------------------------------------------------- - * do_freebgnsurface - free o_surface structure - * - * Client: do_freeall(), bgnsurface() - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::do_freebgnsurface( O_surface *o_surface ) -{ - o_surface->deleteMe( o_surfacePool ); -} - - -/*----------------------------------------------------------------------------- - * do_bgnsurface - begin the display of a surface - * - * Client: bgnsurface() - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::do_bgnsurface( O_surface *o_surface ) -{ - if( inSurface ) { - do_nurbserror( 27 ); - endsurface(); - } - inSurface = 1; - - if( ! playBack ) bgnrender(); - - isTrimModified = 0; - isSurfaceModified = 0; - isDataValid = 1; - numTrims = 0; - currentSurface = o_surface; - nextTrim = &( currentSurface->o_trim ); - nextNurbssurface = &( currentSurface->o_nurbssurface ); -} - -/*----------------------------------------------------------------------------- - * do_bgncurve - begin the display of a curve - * - * Client: bgncurve() - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::do_bgncurve( O_curve *o_curve ) -{ - if ( inCurve ) { - do_nurbserror( 6 ); - endcurve(); - } - - inCurve = 1; - currentCurve = o_curve; - currentCurve->curvetype = ct_none; - - if( inTrim ) { - if( *nextCurve != o_curve ) { - isCurveModified = 1; - *nextCurve = o_curve; - } - } else { - if( ! playBack ) bgnrender(); - isDataValid = 1; - } - nextCurve = &(o_curve->next); - nextPwlcurve = &(o_curve->curve.o_pwlcurve); - nextNurbscurve = &(o_curve->curve.o_nurbscurve); -} - -/*----------------------------------------------------------------------------- - * do_endcurve - - * - * Client: endcurve() - *----------------------------------------------------------------------------- - */ - -void -NurbsTessellator::do_endcurve( void ) -{ - if( ! inCurve ) { - do_nurbserror( 7 ); - return; - } - inCurve = 0; - - *nextCurve = 0; - if (currentCurve->curvetype == ct_nurbscurve) - *nextNurbscurve = 0; - else - *nextPwlcurve = 0; - - if ( ! inTrim ) { - if( ! isDataValid ) { - do_freecurveall( currentCurve ); - return; - } - - int errval; - errval = ::mysetjmp( jumpbuffer ); - if( errval == 0 ) { - if( currentCurve->curvetype == ct_nurbscurve ) { - subdivider.beginQuilts(); - for( O_nurbscurve *n = currentCurve->curve.o_nurbscurve; n != 0; n = n->next ) - subdivider.addQuilt( n->bezier_curves ); - subdivider.endQuilts(); - subdivider.drawCurves(); - if( ! playBack ) endrender(); - } else { - /* XXX */ - if( ! playBack ) endrender(); - /*do_draw_pwlcurve( currentCurve->curve.o_pwlcurve ) */; - do_nurbserror( 9 ); - } - } else { - if( ! playBack ) endrender(); - do_nurbserror( errval ); - } - do_freecurveall( currentCurve ); - resetObjects(); - } -} - -/*----------------------------------------------------------------------------- - * do_endsurface - mark end of surface, display surface, free immediate data - * - * Client: - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::do_endsurface( void ) -{ - if( inTrim ) { - do_nurbserror( 12 ); - endtrim(); - } - - if( ! inSurface ) { - do_nurbserror( 13 ); - return; - } - inSurface = 0; - - *nextNurbssurface = 0; - - if( ! isDataValid ) { - do_freeall( ); - return; - } - - if( *nextTrim != 0 ) { - isTrimModified = 1; - *nextTrim = 0; - } - - int errval; - - errval = ::mysetjmp( jumpbuffer ); - if( errval == 0 ) { - if( numTrims > 0 ) { - - subdivider.beginTrims(); - for( O_trim *trim = currentSurface->o_trim; trim; trim = trim->next ) { - subdivider.beginLoop(); - for( O_curve *curve = trim->o_curve; curve; curve = curve->next ) { - curve->used = 0; - assert( curve->curvetype != ct_none ); - if (curve->curvetype == ct_pwlcurve) { - O_pwlcurve *c = curve->curve.o_pwlcurve; - subdivider.addArc( c->npts, c->pts, curve->nuid ); - } else { - Quilt *quilt = curve->curve.o_nurbscurve->bezier_curves; - Quiltspec *qspec = quilt->qspec; - REAL *cpts = quilt->cpts + qspec->offset; - REAL *cptsend = cpts + (qspec->width * qspec->order * qspec->stride); - for( ; cpts != cptsend; cpts += qspec->order*qspec->stride ) - subdivider.addArc( cpts, quilt, curve->nuid ); - } - } - subdivider.endLoop(); - } - subdivider.endTrims(); - } - - subdivider.beginQuilts(); - for( O_nurbssurface *n = currentSurface->o_nurbssurface; n; n = n->next ) - subdivider.addQuilt( n->bezier_patches ); - subdivider.endQuilts(); - subdivider.drawSurfaces( currentSurface->nuid ); - if( ! playBack ) endrender(); - } else { - if( ! playBack ) endrender(); - do_nurbserror( errval ); - } - - do_freeall( ); - resetObjects(); -} - -/*----------------------------------------------------------------------------- - * do_freeall - free all data allocated in immediate mode - * - * Client: - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::do_freeall( void ) -{ - for( O_trim *o_trim = currentSurface->o_trim; o_trim; ) { - O_trim *next_o_trim = o_trim->next; - for( O_curve *curve = o_trim->o_curve; curve; ) { - O_curve *next_o_curve = curve->next; - do_freecurveall( curve ); - curve = next_o_curve; - } - if( o_trim->save == 0 ) do_freebgntrim( o_trim ); - o_trim = next_o_trim; - } - - O_nurbssurface *nurbss, *next_nurbss; - for( nurbss= currentSurface->o_nurbssurface; nurbss; nurbss = next_nurbss) { - next_nurbss = nurbss->next; - if( nurbss->save == 0 ) - do_freenurbssurface( nurbss ); - else - nurbss->used = 0; - } - - if( currentSurface->save == 0 ) do_freebgnsurface( currentSurface ); -} - -void -NurbsTessellator::do_freecurveall( O_curve *curve ) -{ - assert( curve->curvetype != ct_none ); - - if( curve->curvetype == ct_nurbscurve ) { - O_nurbscurve *ncurve, *next_ncurve; - for( ncurve=curve->curve.o_nurbscurve; ncurve; ncurve=next_ncurve ) { - next_ncurve = ncurve->next; - if( ncurve->save == 0 ) - do_freenurbscurve( ncurve ); - else - ncurve->used = 0; - } - } else { - O_pwlcurve *pcurve, *next_pcurve; - for( pcurve=curve->curve.o_pwlcurve; pcurve; pcurve=next_pcurve ) { - next_pcurve = pcurve->next; - if( pcurve->save == 0 ) - do_freepwlcurve( pcurve ); - else - pcurve->used = 0; - } - } - if( curve->save == 0 ) - do_freebgncurve( curve ); -} - - -/*----------------------------------------------------------------------------- - * do_freebgntrim - free the space allocated for a trim loop - * - * Client: - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::do_freebgntrim( O_trim *o_trim ) -{ - o_trim->deleteMe( o_trimPool ); -} - - -/*----------------------------------------------------------------------------- - * do_bgntrim - link in a trim loop to the current trimmed surface description - * - * Client: bgntrim() - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::do_bgntrim( O_trim *o_trim ) -{ - - if( ! inSurface ) { - do_nurbserror( 15 ); - bgnsurface( 0 ); - inSurface = 2; - } - - if( inTrim ) { - do_nurbserror( 16 ); - endtrim(); - } - inTrim = 1; - - if( *nextTrim != o_trim ) { - isTrimModified = 1; - *nextTrim = o_trim; - } - - currentTrim = o_trim; - nextTrim = &(o_trim->next); - nextCurve = &(o_trim->o_curve); -} - - -/*----------------------------------------------------------------------------- - * do_endtrim - mark the end of the current trim loop - * - * Client: endtrim() - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::do_endtrim( void ) -{ - if( ! inTrim ) { - do_nurbserror( 17 ); - return; - } - inTrim = 0; - - if( currentTrim->o_curve == 0 ) { - do_nurbserror( 18 ); - isDataValid = 0; - } - - numTrims++; - - if( *nextCurve != 0 ) { - isTrimModified = 1; - *nextCurve = 0; - } -} - -/*----------------------------------------------------------------------------- - * do_freepwlcurve - - * - * Client: - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::do_freepwlcurve( O_pwlcurve *o_pwlcurve ) -{ - o_pwlcurve->deleteMe( o_pwlcurvePool ); -} - -void -NurbsTessellator::do_freebgncurve( O_curve *o_curve ) -{ - o_curve->deleteMe( o_curvePool ); -} - -/*----------------------------------------------------------------------------- - * do_pwlcurve - link in pwl trim loop to the current surface description - * - * Client: pwlcurve() - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::do_pwlcurve( O_pwlcurve *o_pwlcurve ) -{ - if( ! inTrim ) { - do_nurbserror( 19 ); - if( o_pwlcurve->save == 0 ) - do_freepwlcurve(o_pwlcurve ); - return; - } - - if( ! inCurve ) { - bgncurve( 0 ); - inCurve = 2; - } - - if( o_pwlcurve->used ) { - do_nurbserror( 20 ); - isDataValid = 0; - return; - } else - o_pwlcurve->used = 1; - - if( currentCurve->curvetype == ct_none ) { - currentCurve->curvetype = ct_pwlcurve; - } else if( currentCurve->curvetype != ct_pwlcurve ) { - do_nurbserror( 21 ); - isDataValid = 0; - return; - } - - if( *nextPwlcurve != o_pwlcurve ) { - isCurveModified = 1; - *nextPwlcurve = o_pwlcurve; - } - nextPwlcurve = &(o_pwlcurve->next); - - if( o_pwlcurve->owner != currentCurve ) { - isCurveModified = 1; - o_pwlcurve->owner = currentCurve; - } - - if( (inCurve == 2) ) - endcurve(); -} - - -/*----------------------------------------------------------------------------- - * do_freenurbscurve - - * - * Client: - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::do_freenurbscurve( O_nurbscurve *o_nurbscurve ) -{ - o_nurbscurve->bezier_curves->deleteMe( quiltPool ); - o_nurbscurve->deleteMe( o_nurbscurvePool ); -} - - -/*----------------------------------------------------------------------------- - * do_nurbscurve - - * - * Client: nurbscurve() - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::do_nurbscurve( O_nurbscurve *o_nurbscurve ) -{ - if ( ! inCurve ) { - bgncurve( 0 ); - inCurve = 2; - } - - if( o_nurbscurve->used ) { - /* error - curve was already called in current surface */ - do_nurbserror( 23 ); - isDataValid = 0; - return; - } else - o_nurbscurve->used = 1; - - if( currentCurve->curvetype == ct_none ) { - currentCurve->curvetype = ct_nurbscurve; - } else if( currentCurve->curvetype != ct_nurbscurve ) { - do_nurbserror( 24 ); - isDataValid = 0; - return; - } - - if( *nextNurbscurve != o_nurbscurve ) { - isCurveModified = 1; - *nextNurbscurve = o_nurbscurve; - } - - nextNurbscurve = &(o_nurbscurve->next); - - if( o_nurbscurve->owner != currentCurve ) { - isCurveModified = 1; - o_nurbscurve->owner = currentCurve; - } - - if( o_nurbscurve->owner == 0 ) - isCurveModified = 1; - - if( inCurve == 2 ) - endcurve(); -} - - -/*----------------------------------------------------------------------------- - * do_freenurbssurface - - * - * Client: - *----------------------------------------------------------------------------- - */ - -void -NurbsTessellator::do_freenurbssurface( O_nurbssurface *o_nurbssurface ) -{ - o_nurbssurface->bezier_patches->deleteMe( quiltPool ); - o_nurbssurface->deleteMe( o_nurbssurfacePool ); -} - -/*----------------------------------------------------------------------------- - * do_nurbssurface - - * - * Client: nurbssurface() - *----------------------------------------------------------------------------- - */ -void -NurbsTessellator::do_nurbssurface( O_nurbssurface *o_nurbssurface ) -{ - if( ! inSurface ) { - bgnsurface( 0 ); - inSurface = 2; - } - - if( o_nurbssurface->used ) { - /* error - surface was already called in current block */ - do_nurbserror( 25 ); - isDataValid = 0; - return; - } else - o_nurbssurface->used = 1; - - if( *nextNurbssurface != o_nurbssurface ) { - isSurfaceModified = 1; - *nextNurbssurface = o_nurbssurface; - } - - if( o_nurbssurface->owner != currentSurface ) { - isSurfaceModified = 1; - o_nurbssurface->owner = currentSurface; - } - nextNurbssurface = &(o_nurbssurface->next); - - if( inSurface == 2 ) - endsurface(); -} - - -/*----------------------------------------------------------------------------- - * do_freenurbsproperty - * - *----------------------------------------------------------------------------- - */ - -void -NurbsTessellator::do_freenurbsproperty( Property *prop ) -{ - prop->deleteMe( propertyPool ); -} - - -/*----------------------------------------------------------------------------- - * do_setnurbsproperty - - * - *----------------------------------------------------------------------------- - */ - -void -NurbsTessellator::do_setnurbsproperty( Property *prop ) -{ - renderhints.setProperty( prop->tag, prop->value ); - if( prop->save == 0 ) - do_freenurbsproperty( prop ); -} - -void -NurbsTessellator::do_setnurbsproperty2( Property *prop ) -{ - Mapdesc *mapdesc = maplist.find( prop->type ); - - mapdesc->setProperty( prop->tag, prop->value ); - if( prop->save == 0 ) - do_freenurbsproperty( prop ); -} - -void -NurbsTessellator::errorHandler( int ) -{ -} - -void -NurbsTessellator::do_nurbserror( int msg ) -{ - errorHandler( msg ); -} - -int -NurbsTessellator::do_check_knots( Knotvector *knots, char *msg ) -{ - int status = knots->validate(); - if( status ) { - do_nurbserror( status ); - if( renderhints.errorchecking != N_NOMSG ) knots->show( msg ); - } - return status; -} - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/nurbstess.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/nurbstess.h deleted file mode 100644 index 3577088a9c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/nurbstess.h +++ /dev/null @@ -1,176 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * nurbstess.h - * - */ - -#ifndef __glunurbstess_h_ -#define __glunurbstess_h_ - -#include "mysetjmp.h" -#include "subdivider.h" -#include "renderhints.h" -#include "backend.h" -#include "maplist.h" -#include "reader.h" -#include "nurbsconsts.h" - -struct Knotvector; -class Quilt; -class DisplayList; -class BasicCurveEvaluator; -class BasicSurfaceEvaluator; - -class NurbsTessellator { -public: - NurbsTessellator( BasicCurveEvaluator &c, - BasicSurfaceEvaluator &e ); - virtual ~NurbsTessellator( void ); - - void getnurbsproperty( long, INREAL * ); - void getnurbsproperty( long, long, INREAL * ); - void setnurbsproperty( long, INREAL ); - void setnurbsproperty( long, long, INREAL ); - void setnurbsproperty( long, long, INREAL * ); - void setnurbsproperty( long, long, INREAL *, long, long ); - - // called before a tessellation begins/ends - virtual void bgnrender( void ); - virtual void endrender( void ); - - // called to make a display list of the output vertices - virtual void makeobj( int n ); - virtual void closeobj( void ); - - // called when a error occurs - virtual void errorHandler( int ); - - void bgnsurface( long ); - void endsurface( void ); - void bgntrim( void ); - void endtrim( void ); - void bgncurve( long ); - void endcurve( void ); - void pwlcurve( long, INREAL[], long, long ); - void nurbscurve( long, INREAL[], long, INREAL[], long, long ); - void nurbssurface( long, INREAL[], long, INREAL[], long, long, - INREAL[], long, long, long ); - - void defineMap( long, long, long ); - void redefineMaps( void ); - - // recording of input description - void discardRecording( void * ); - void * beginRecording( void ); - void endRecording( void ); - void playRecording( void * ); - - //for optimizing untrimmed nurbs in the case of domain distance sampling - void set_domain_distance_u_rate(REAL u_rate); - void set_domain_distance_v_rate(REAL v_rate); - void set_is_domain_distance_sampling(int flag); - - -protected: - Renderhints renderhints; - Maplist maplist; - Backend backend; - -private: - - void resetObjects( void ); - int do_check_knots( Knotvector *, char * ); - void do_nurbserror( int ); - void do_bgncurve( O_curve * ); - void do_endcurve( void ); - void do_freeall( void ); - void do_freecurveall( O_curve * ); - void do_freebgntrim( O_trim * ); - void do_freebgncurve( O_curve * ); - void do_freepwlcurve( O_pwlcurve * ); - void do_freenurbscurve( O_nurbscurve * ); - void do_freenurbssurface( O_nurbssurface * ); - void do_freebgnsurface( O_surface * ); - void do_bgnsurface( O_surface * ); - void do_endsurface( void ); - void do_bgntrim( O_trim * ); - void do_endtrim( void ); - void do_pwlcurve( O_pwlcurve * ); - void do_nurbscurve( O_nurbscurve * ); - void do_nurbssurface( O_nurbssurface * ); - void do_freenurbsproperty( Property * ); - void do_setnurbsproperty( Property * ); - void do_setnurbsproperty2( Property * ); - - Subdivider subdivider; - JumpBuffer* jumpbuffer; - Pool o_pwlcurvePool; - Pool o_nurbscurvePool; - Pool o_curvePool; - Pool o_trimPool; - Pool o_surfacePool; - Pool o_nurbssurfacePool; - Pool propertyPool; -public: - Pool quiltPool; -private: - TrimVertexPool extTrimVertexPool; - - int inSurface; /* bgnsurface seen */ - int inCurve; /* bgncurve seen */ - int inTrim; /* bgntrim seen */ - int isCurveModified; /* curve changed */ - int isTrimModified; /* trim curves changed */ - int isSurfaceModified; /* surface changed */ - int isDataValid; /* all data is good */ - int numTrims; /* valid trim regions */ - int playBack; - - O_trim** nextTrim; /* place to link o_trim */ - O_curve** nextCurve; /* place to link o_curve */ - O_nurbscurve** nextNurbscurve; /* place to link o_nurbscurve */ - O_pwlcurve** nextPwlcurve; /* place to link o_pwlcurve */ - O_nurbssurface** nextNurbssurface; /* place to link o_nurbssurface */ - - O_surface* currentSurface; - O_trim* currentTrim; - O_curve* currentCurve; - - DisplayList *dl; - -}; - -#endif /* __glunurbstess_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/patch.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/patch.cc deleted file mode 100644 index dca20a85f2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/patch.cc +++ /dev/null @@ -1,506 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * patch.c++ - * - * $Date: 2002/11/01 23:35:07 $ $Revision: 1.3 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/patch.cc,v 1.3 2002/11/01 23:35:07 brianp Exp $ - */ - -#include -#include "glimports.h" -#include "mystdio.h" -#include "myassert.h" -#include "mymath.h" -#include "mystring.h" -#include "patch.h" -#include "mapdesc.h" -#include "quilt.h" -#include "nurbsconsts.h" -#include "simplemath.h" //for glu_abs function in ::singleStep(); - - -/*-------------------------------------------------------------------------- - * Patch - copy patch from quilt and transform control points - *-------------------------------------------------------------------------- - */ - -Patch::Patch( Quilt_ptr geo, REAL *pta, REAL *ptb, Patch *n ) -{ -/* pspec[i].range is uninit here */ - mapdesc = geo->mapdesc; - cullval = mapdesc->isCulling() ? CULL_ACCEPT : CULL_TRIVIAL_ACCEPT; - notInBbox = mapdesc->isBboxSubdividing() ? 1 : 0; - needsSampling = mapdesc->isRangeSampling() ? 1 : 0; - pspec[0].order = geo->qspec[0].order; - pspec[1].order = geo->qspec[1].order; - pspec[0].stride = pspec[1].order * MAXCOORDS; - pspec[1].stride = MAXCOORDS; - - /* transform control points to sampling and culling spaces */ - REAL *ps = geo->cpts; - geo->select( pta, ptb ); - ps += geo->qspec[0].offset; - ps += geo->qspec[1].offset; - ps += geo->qspec[0].index * geo->qspec[0].order * geo->qspec[0].stride; - ps += geo->qspec[1].index * geo->qspec[1].order * geo->qspec[1].stride; - - if( needsSampling ) { - mapdesc->xformSampling( ps, geo->qspec[0].order, geo->qspec[0].stride, - geo->qspec[1].order, geo->qspec[1].stride, - spts, pspec[0].stride, pspec[1].stride ); - } - - if( cullval == CULL_ACCEPT ) { - mapdesc->xformCulling( ps, geo->qspec[0].order, geo->qspec[0].stride, - geo->qspec[1].order, geo->qspec[1].stride, - cpts, pspec[0].stride, pspec[1].stride ); - } - - if( notInBbox ) { - mapdesc->xformBounding( ps, geo->qspec[0].order, geo->qspec[0].stride, - geo->qspec[1].order, geo->qspec[1].stride, - bpts, pspec[0].stride, pspec[1].stride ); - } - - /* set scale range */ - pspec[0].range[0] = geo->qspec[0].breakpoints[geo->qspec[0].index]; - pspec[0].range[1] = geo->qspec[0].breakpoints[geo->qspec[0].index+1]; - pspec[0].range[2] = pspec[0].range[1] - pspec[0].range[0]; - - pspec[1].range[0] = geo->qspec[1].breakpoints[geo->qspec[1].index]; - pspec[1].range[1] = geo->qspec[1].breakpoints[geo->qspec[1].index+1]; - pspec[1].range[2] = pspec[1].range[1] - pspec[1].range[0]; - - // may need to subdivide to match range of sub-patch - if( pspec[0].range[0] != pta[0] ) { - assert( pspec[0].range[0] < pta[0] ); - Patch lower( *this, 0, pta[0], 0 ); - *this = lower; - } - - if( pspec[0].range[1] != ptb[0] ) { - assert( pspec[0].range[1] > ptb[0] ); - Patch upper( *this, 0, ptb[0], 0 ); - } - - if( pspec[1].range[0] != pta[1] ) { - assert( pspec[1].range[0] < pta[1] ); - Patch lower( *this, 1, pta[1], 0 ); - *this = lower; - } - - if( pspec[1].range[1] != ptb[1] ) { - assert( pspec[1].range[1] > ptb[1] ); - Patch upper( *this, 1, ptb[1], 0 ); - } - checkBboxConstraint(); - next = n; -} - -/*-------------------------------------------------------------------------- - * Patch - subdivide a patch along an isoparametric line - *-------------------------------------------------------------------------- - */ - -Patch::Patch( Patch& upper, int param, REAL value, Patch *n ) -{ - Patch& lower = *this; - - lower.cullval = upper.cullval; - lower.mapdesc = upper.mapdesc; - lower.notInBbox = upper.notInBbox; - lower.needsSampling = upper.needsSampling; - lower.pspec[0].order = upper.pspec[0].order; - lower.pspec[1].order = upper.pspec[1].order; - lower.pspec[0].stride = upper.pspec[0].stride; - lower.pspec[1].stride = upper.pspec[1].stride; - lower.next = n; - - /* reset scale range */ - switch( param ) { - case 0: { - REAL d = (value-upper.pspec[0].range[0]) / upper.pspec[0].range[2]; - if( needsSampling ) - mapdesc->subdivide( upper.spts, lower.spts, d, pspec[1].order, - pspec[1].stride, pspec[0].order, pspec[0].stride ); - - if( cullval == CULL_ACCEPT ) - mapdesc->subdivide( upper.cpts, lower.cpts, d, pspec[1].order, - pspec[1].stride, pspec[0].order, pspec[0].stride ); - - if( notInBbox ) - mapdesc->subdivide( upper.bpts, lower.bpts, d, pspec[1].order, - pspec[1].stride, pspec[0].order, pspec[0].stride ); - - lower.pspec[0].range[0] = upper.pspec[0].range[0]; - lower.pspec[0].range[1] = value; - lower.pspec[0].range[2] = value - upper.pspec[0].range[0]; - upper.pspec[0].range[0] = value; - upper.pspec[0].range[2] = upper.pspec[0].range[1] - value; - - lower.pspec[1].range[0] = upper.pspec[1].range[0]; - lower.pspec[1].range[1] = upper.pspec[1].range[1]; - lower.pspec[1].range[2] = upper.pspec[1].range[2]; - break; - } - case 1: { - REAL d = (value-upper.pspec[1].range[0]) / upper.pspec[1].range[2]; - if( needsSampling ) - mapdesc->subdivide( upper.spts, lower.spts, d, pspec[0].order, - pspec[0].stride, pspec[1].order, pspec[1].stride ); - if( cullval == CULL_ACCEPT ) - mapdesc->subdivide( upper.cpts, lower.cpts, d, pspec[0].order, - pspec[0].stride, pspec[1].order, pspec[1].stride ); - if( notInBbox ) - mapdesc->subdivide( upper.bpts, lower.bpts, d, pspec[0].order, - pspec[0].stride, pspec[1].order, pspec[1].stride ); - lower.pspec[0].range[0] = upper.pspec[0].range[0]; - lower.pspec[0].range[1] = upper.pspec[0].range[1]; - lower.pspec[0].range[2] = upper.pspec[0].range[2]; - - lower.pspec[1].range[0] = upper.pspec[1].range[0]; - lower.pspec[1].range[1] = value; - lower.pspec[1].range[2] = value - upper.pspec[1].range[0]; - upper.pspec[1].range[0] = value; - upper.pspec[1].range[2] = upper.pspec[1].range[1] - value; - break; - } - } - - // inherit bounding box - if( mapdesc->isBboxSubdividing() && ! notInBbox ) - memcpy( lower.bb, upper.bb, sizeof( bb ) ); - - lower.checkBboxConstraint(); - upper.checkBboxConstraint(); -} - -/*-------------------------------------------------------------------------- - * clamp - clamp the sampling rate to a given maximum - *-------------------------------------------------------------------------- - */ - -void -Patch::clamp( void ) -{ - if( mapdesc->clampfactor != N_NOCLAMPING ) { - pspec[0].clamp( mapdesc->clampfactor ); - pspec[1].clamp( mapdesc->clampfactor ); - } -} - -void -Patchspec::clamp( REAL clampfactor ) -{ - if( sidestep[0] < minstepsize ) - sidestep[0] = clampfactor * minstepsize; - if( sidestep[1] < minstepsize ) - sidestep[1] = clampfactor * minstepsize; - if( stepsize < minstepsize ) - stepsize = clampfactor * minstepsize; -} - -void -Patch::checkBboxConstraint( void ) -{ - if( notInBbox && - mapdesc->bboxTooBig( bpts, pspec[0].stride, pspec[1].stride, - pspec[0].order, pspec[1].order, bb ) != 1 ) { - notInBbox = 0; - } -} - -void -Patch::bbox( void ) -{ - if( mapdesc->isBboxSubdividing() ) - mapdesc->surfbbox( bb ); -} - -/*-------------------------------------------------------------------------- - * getstepsize - compute the sampling density across the patch - * and determine if patch needs to be subdivided - *-------------------------------------------------------------------------- - */ - -void -Patch::getstepsize( void ) -{ - pspec[0].minstepsize = pspec[1].minstepsize = 0; - pspec[0].needsSubdivision = pspec[1].needsSubdivision = 0; - - if( mapdesc->isConstantSampling() ) { - // fixed number of samples per patch in each direction - // maxsrate is number of s samples per patch - // maxtrate is number of t samples per patch - pspec[0].getstepsize( mapdesc->maxsrate ); - pspec[1].getstepsize( mapdesc->maxtrate ); - - } else if( mapdesc->isDomainSampling() ) { - // maxsrate is number of s samples per unit s length of domain - // maxtrate is number of t samples per unit t length of domain - pspec[0].getstepsize( mapdesc->maxsrate * pspec[0].range[2] ); - pspec[1].getstepsize( mapdesc->maxtrate * pspec[1].range[2] ); - - } else if( ! needsSampling ) { - pspec[0].singleStep(); - pspec[1].singleStep(); - } else { - // upper bound on path length between sample points - REAL tmp[MAXORDER][MAXORDER][MAXCOORDS]; - const int trstride = sizeof(tmp[0]) / sizeof(REAL); - const int tcstride = sizeof(tmp[0][0]) / sizeof(REAL); - - assert( pspec[0].order <= MAXORDER ); - - /* points have been transformed, therefore they are homogeneous */ - - int val = mapdesc->project( spts, pspec[0].stride, pspec[1].stride, - &tmp[0][0][0], trstride, tcstride, - pspec[0].order, pspec[1].order ); - if( val == 0 ) { - // control points cross infinity, therefore partials are undefined - pspec[0].getstepsize( mapdesc->maxsrate ); - pspec[1].getstepsize( mapdesc->maxtrate ); - } else { - REAL t1 = mapdesc->getProperty( N_PIXEL_TOLERANCE ); -// REAL t2 = mapdesc->getProperty( N_ERROR_TOLERANCE ); - pspec[0].minstepsize = ( mapdesc->maxsrate > 0.0 ) ? - (pspec[0].range[2] / mapdesc->maxsrate) : 0.0; - pspec[1].minstepsize = ( mapdesc->maxtrate > 0.0 ) ? - (pspec[1].range[2] / mapdesc->maxtrate) : 0.0; - if( mapdesc->isParametricDistanceSampling() || - mapdesc->isObjectSpaceParaSampling() ) { - - REAL t2; - t2 = mapdesc->getProperty( N_ERROR_TOLERANCE ); - - // t2 is upper bound on the distance between surface and tessellant - REAL ssv[2], ttv[2]; - REAL ss = mapdesc->calcPartialVelocity( ssv, &tmp[0][0][0], trstride, tcstride, pspec[0].order, pspec[1].order, 2, 0, pspec[0].range[2], pspec[1].range[2], 0 ); - REAL st = mapdesc->calcPartialVelocity( 0, &tmp[0][0][0], trstride, tcstride, pspec[0].order, pspec[1].order, 1, 1, pspec[0].range[2], pspec[1].range[2], -1 ); - REAL tt = mapdesc->calcPartialVelocity( ttv, &tmp[0][0][0], trstride, tcstride, pspec[0].order, pspec[1].order, 0, 2, pspec[0].range[2], pspec[1].range[2], 1 ); - //make sure that ss st and tt are nonnegative: - if(ss <0) ss = -ss; - if(st <0) st = -st; - if(tt <0) tt = -tt; - - if( ss != 0.0 && tt != 0.0 ) { - /* printf( "ssv[0] %g ssv[1] %g ttv[0] %g ttv[1] %g\n", - ssv[0], ssv[1], ttv[0], ttv[1] ); */ - REAL ttq = sqrtf( (float) ss ); - REAL ssq = sqrtf( (float) tt ); - REAL ds = sqrtf( 4 * t2 * ttq / ( ss * ttq + st * ssq ) ); - REAL dt = sqrtf( 4 * t2 * ssq / ( tt * ssq + st * ttq ) ); - pspec[0].stepsize = ( ds < pspec[0].range[2] ) ? ds : pspec[0].range[2]; - REAL scutoff = 2.0 * t2 / ( pspec[0].range[2] * pspec[0].range[2]); - pspec[0].sidestep[0] = (ssv[0] > scutoff) ? sqrtf( 2.0 * t2 / ssv[0] ) : pspec[0].range[2]; - pspec[0].sidestep[1] = (ssv[1] > scutoff) ? sqrtf( 2.0 * t2 / ssv[1] ) : pspec[0].range[2]; - - pspec[1].stepsize = ( dt < pspec[1].range[2] ) ? dt : pspec[1].range[2]; - REAL tcutoff = 2.0 * t2 / ( pspec[1].range[2] * pspec[1].range[2]); - pspec[1].sidestep[0] = (ttv[0] > tcutoff) ? sqrtf( 2.0 * t2 / ttv[0] ) : pspec[1].range[2]; - pspec[1].sidestep[1] = (ttv[1] > tcutoff) ? sqrtf( 2.0 * t2 / ttv[1] ) : pspec[1].range[2]; - } else if( ss != 0.0 ) { - REAL x = pspec[1].range[2] * st; - REAL ds = ( sqrtf( x * x + 8.0 * t2 * ss ) - x ) / ss; - pspec[0].stepsize = ( ds < pspec[0].range[2] ) ? ds : pspec[0].range[2]; - REAL scutoff = 2.0 * t2 / ( pspec[0].range[2] * pspec[0].range[2]); - pspec[0].sidestep[0] = (ssv[0] > scutoff) ? sqrtf( 2.0 * t2 / ssv[0] ) : pspec[0].range[2]; - pspec[0].sidestep[1] = (ssv[1] > scutoff) ? sqrtf( 2.0 * t2 / ssv[1] ) : pspec[0].range[2]; - pspec[1].singleStep(); - } else if( tt != 0.0 ) { - REAL x = pspec[0].range[2] * st; - REAL dt = ( sqrtf( x * x + 8.0 * t2 * tt ) - x ) / tt; - pspec[0].singleStep(); - REAL tcutoff = 2.0 * t2 / ( pspec[1].range[2] * pspec[1].range[2]); - pspec[1].stepsize = ( dt < pspec[1].range[2] ) ? dt : pspec[1].range[2]; - pspec[1].sidestep[0] = (ttv[0] > tcutoff) ? sqrtf( 2.0 * t2 / ttv[0] ) : pspec[1].range[2]; - pspec[1].sidestep[1] = (ttv[1] > tcutoff) ? sqrtf( 2.0 * t2 / ttv[1] ) : pspec[1].range[2]; - } else { - if( 4.0 * t2 > st * pspec[0].range[2] * pspec[1].range[2] ) { - pspec[0].singleStep(); - pspec[1].singleStep(); - } else { - REAL area = 4.0 * t2 / st; - REAL ds = sqrtf( area * pspec[0].range[2] / pspec[1].range[2] ); - REAL dt = sqrtf( area * pspec[1].range[2] / pspec[0].range[2] ); - pspec[0].stepsize = ( ds < pspec[0].range[2] ) ? ds : pspec[0].range[2]; - pspec[0].sidestep[0] = pspec[0].range[2]; - pspec[0].sidestep[1] = pspec[0].range[2]; - - pspec[1].stepsize = ( dt < pspec[1].range[2] ) ? dt : pspec[1].range[2]; - pspec[1].sidestep[0] = pspec[1].range[2]; - pspec[1].sidestep[1] = pspec[1].range[2]; - } - } - } else if( mapdesc->isPathLengthSampling() || - mapdesc->isObjectSpacePathSampling()) { - // t1 is upper bound on path length - REAL msv[2], mtv[2]; - REAL ms = mapdesc->calcPartialVelocity( msv, &tmp[0][0][0], trstride, tcstride, pspec[0].order, pspec[1].order, 1, 0, pspec[0].range[2], pspec[1].range[2], 0 ); - REAL mt = mapdesc->calcPartialVelocity( mtv, &tmp[0][0][0], trstride, tcstride, pspec[0].order, pspec[1].order, 0, 1, pspec[0].range[2], pspec[1].range[2], 1 ); - REAL side_scale = 1.0; - - if( ms != 0.0 ) { - if( mt != 0.0 ) { -/* REAL d = t1 / ( ms * ms + mt * mt );*/ -/* REAL ds = mt * d;*/ - REAL ds = t1 / (2.0*ms); -/* REAL dt = ms * d;*/ - REAL dt = t1 / (2.0*mt); - pspec[0].stepsize = ( ds < pspec[0].range[2] ) ? ds : pspec[0].range[2]; - pspec[0].sidestep[0] = ( msv[0] * pspec[0].range[2] > t1 ) ? (side_scale* t1 / msv[0]) : pspec[0].range[2]; - pspec[0].sidestep[1] = ( msv[1] * pspec[0].range[2] > t1 ) ? (side_scale* t1 / msv[1]) : pspec[0].range[2]; - - pspec[1].stepsize = ( dt < pspec[1].range[2] ) ? dt : pspec[1].range[2]; - pspec[1].sidestep[0] = ( mtv[0] * pspec[1].range[2] > t1 ) ? (side_scale*t1 / mtv[0]) : pspec[1].range[2]; - pspec[1].sidestep[1] = ( mtv[1] * pspec[1].range[2] > t1 ) ? (side_scale*t1 / mtv[1]) : pspec[1].range[2]; - } else { - pspec[0].stepsize = ( t1 < ms * pspec[0].range[2] ) ? (t1 / ms) : pspec[0].range[2]; - pspec[0].sidestep[0] = ( msv[0] * pspec[0].range[2] > t1 ) ? (t1 / msv[0]) : pspec[0].range[2]; - pspec[0].sidestep[1] = ( msv[1] * pspec[0].range[2] > t1 ) ? (t1 / msv[1]) : pspec[0].range[2]; - - pspec[1].singleStep(); - } - } else { - if( mt != 0.0 ) { - pspec[0].singleStep(); - - pspec[1].stepsize = ( t1 < mt * pspec[1].range[2] ) ? (t1 / mt) : pspec[1].range[2]; - pspec[1].sidestep[0] = ( mtv[0] * pspec[1].range[2] > t1 ) ? (t1 / mtv[0]) : pspec[1].range[2]; - pspec[1].sidestep[1] = ( mtv[1] * pspec[1].range[2] > t1 ) ? (t1 / mtv[1]) : pspec[1].range[2]; - } else { - pspec[0].singleStep(); - pspec[1].singleStep(); - } - } - } else if( mapdesc->isSurfaceAreaSampling() ) { - // t is the square root of area -/* - REAL msv[2], mtv[2]; - REAL ms = mapdesc->calcPartialVelocity( msv, &tmp[0][0][0], trstride, tcstride, pspec[0].order, pspec[1].order, 1, 0, pspec[0].range[2], pspec[1].range[2], 0 ); - REAL mt = mapdesc->calcPartialVelocity( mtv, &tmp[0][0][0], trstride, tcstride, pspec[0].order, pspec[1].order, 0, 1, pspec[0].range[2], pspec[1].range[2], 1 ); - if( ms != 0.0 && mt != 0.0 ) { - REAL d = 1.0 / (ms * mt); - t *= M_SQRT2; - REAL ds = t * sqrtf( d * pspec[0].range[2] / pspec[1].range[2] ); - REAL dt = t * sqrtf( d * pspec[1].range[2] / pspec[0].range[2] ); - pspec[0].stepsize = ( ds < pspec[0].range[2] ) ? ds : pspec[0].range[2]; - pspec[0].sidestep[0] = ( msv[0] * pspec[0].range[2] > t ) ? (t / msv[0]) : pspec[0].range[2]; - pspec[0].sidestep[1] = ( msv[1] * pspec[0].range[2] > t ) ? (t / msv[1]) : pspec[0].range[2]; - - pspec[1].stepsize = ( dt < pspec[1].range[2] ) ? dt : pspec[1].range[2]; - pspec[1].sidestep[0] = ( mtv[0] * pspec[1].range[2] > t ) ? (t / mtv[0]) : pspec[1].range[2]; - pspec[1].sidestep[1] = ( mtv[1] * pspec[1].range[2] > t ) ? (t / mtv[1]) : pspec[1].range[2]; - } else { - pspec[0].singleStep(); - pspec[1].singleStep(); - } -*/ - } else { - pspec[0].singleStep(); - pspec[1].singleStep(); - } - } - } - -#ifdef DEBUG - dprintf( "sidesteps %g %g %g %g, stepsize %g %g\n", - pspec[0].sidestep[0], pspec[0].sidestep[1], - pspec[1].sidestep[0], pspec[1].sidestep[1], - pspec[0].stepsize, pspec[1].stepsize ); -#endif - - if( mapdesc->minsavings != N_NOSAVINGSSUBDIVISION ) { - REAL savings = 1./(pspec[0].stepsize * pspec[1].stepsize) ; - savings-= (2./( pspec[0].sidestep[0] + pspec[0].sidestep[1] )) * - (2./( pspec[1].sidestep[0] + pspec[1].sidestep[1] )); - - savings *= pspec[0].range[2] * pspec[1].range[2]; - if( savings > mapdesc->minsavings ) { - pspec[0].needsSubdivision = pspec[1].needsSubdivision = 1; - } - } - - if( pspec[0].stepsize < pspec[0].minstepsize ) pspec[0].needsSubdivision = 1; - if( pspec[1].stepsize < pspec[1].minstepsize ) pspec[1].needsSubdivision = 1; - needsSampling = (needsSampling ? needsSamplingSubdivision() : 0); -} - -void -Patchspec::singleStep() -{ - stepsize = sidestep[0] = sidestep[1] = glu_abs(range[2]); -} - -void -Patchspec::getstepsize( REAL max ) // max is number of samples for entire patch -{ - stepsize = ( max >= 1.0 ) ? range[2] / max : range[2]; - if (stepsize < 0.0) { - stepsize = -stepsize; - } - sidestep[0] = sidestep[1] = minstepsize = stepsize; -} - -int -Patch::needsSamplingSubdivision( void ) -{ - return (pspec[0].needsSubdivision || pspec[1].needsSubdivision) ? 1 : 0; -} - -int -Patch::needsNonSamplingSubdivision( void ) -{ - return notInBbox; -} - -int -Patch::needsSubdivision( int param ) -{ - return pspec[param].needsSubdivision; -} - -int -Patch::cullCheck( void ) -{ - if( cullval == CULL_ACCEPT ) - cullval = mapdesc->cullCheck( cpts, pspec[0].order, pspec[0].stride, - pspec[1].order, pspec[1].stride ); - return cullval; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/patch.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/patch.h deleted file mode 100644 index a214b571f9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/patch.h +++ /dev/null @@ -1,100 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * patch.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/patch.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glupatch_h_ -#define __glupatch_h_ - -#include "types.h" -#include "defines.h" - -class Quilt; -class Mapdesc; - - -struct Pspec { - REAL range[3]; - REAL sidestep[2]; - REAL stepsize; - REAL minstepsize; - int needsSubdivision; -}; - -struct Patchspec : public Pspec { - int order; - int stride; - void clamp( REAL ); - void getstepsize( REAL ); - void singleStep( void ); -}; - -class Patch { -public: -friend class Subdivider; -friend class Quilt; -friend class Patchlist; - Patch( Quilt *, REAL*, REAL *, Patch * ); - Patch( Patch &, int, REAL, Patch * ); - void bbox( void ); - void clamp( void ); - void getstepsize( void ); - int cullCheck( void ); - int needsSubdivision( int ); - int needsSamplingSubdivision( void ); - int needsNonSamplingSubdivision( void ); - - int get_uorder() {return pspec[0].order;} - int get_vorder() {return pspec[1].order;} - -private: - - Mapdesc* mapdesc; - Patch* next; - int cullval; - int notInBbox; - int needsSampling; - REAL cpts[MAXORDER*MAXORDER*MAXCOORDS]; //culling pts - REAL spts[MAXORDER*MAXORDER*MAXCOORDS]; //sampling pts - REAL bpts[MAXORDER*MAXORDER*MAXCOORDS]; //bbox pts - Patchspec pspec[2]; - void checkBboxConstraint( void ); - REAL bb[2][MAXCOORDS]; -}; -#endif /* __glupatch_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/patchlist.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/patchlist.cc deleted file mode 100644 index a640893f1b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/patchlist.cc +++ /dev/null @@ -1,172 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * patchlist.c++ - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/patchlist.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#include -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "quilt.h" -#include "patchlist.h" -#include "patch.h" -#include "nurbsconsts.h" - -Patchlist::Patchlist( Quilt *quilts, REAL *pta, REAL *ptb ) -{ - patch = 0; - for( Quilt *q = quilts; q; q = q->next ) - patch = new Patch( q, pta, ptb, patch ); - pspec[0].range[0] = pta[0]; - pspec[0].range[1] = ptb[0]; - pspec[0].range[2] = ptb[0] - pta[0]; - - pspec[1].range[0] = pta[1]; - pspec[1].range[1] = ptb[1]; - pspec[1].range[2] = ptb[1] - pta[1]; -} - -Patchlist::Patchlist( Patchlist &upper, int param, REAL value) -{ - Patchlist &lower = *this; - patch = 0; - for( Patch *p = upper.patch; p; p = p->next ) - patch = new Patch( *p, param, value, patch ); - - if( param == 0 ) { - lower.pspec[0].range[0] = upper.pspec[0].range[0]; - lower.pspec[0].range[1] = value; - lower.pspec[0].range[2] = value - upper.pspec[0].range[0]; - upper.pspec[0].range[0] = value; - upper.pspec[0].range[2] = upper.pspec[0].range[1] - value; - lower.pspec[1] = upper.pspec[1]; - } else { - lower.pspec[0] = upper.pspec[0]; - lower.pspec[1].range[0] = upper.pspec[1].range[0]; - lower.pspec[1].range[1] = value; - lower.pspec[1].range[2] = value - upper.pspec[1].range[0]; - upper.pspec[1].range[0] = value; - upper.pspec[1].range[2] = upper.pspec[1].range[1] - value; - } -} - -Patchlist::~Patchlist() -{ - while( patch ) { - Patch *p = patch; - patch = patch->next; - delete p; - } -} - -int -Patchlist::cullCheck( void ) -{ - for( Patch *p = patch; p; p = p->next ) - if( p->cullCheck() == CULL_TRIVIAL_REJECT ) - return CULL_TRIVIAL_REJECT; - return CULL_ACCEPT; -} - -void -Patchlist::getRanges(REAL ranges[4]) -{ - ranges[0] = pspec[0].range[0]; - ranges[1] = pspec[0].range[1]; - ranges[2] = pspec[1].range[0]; - ranges[3] = pspec[1].range[1]; -} - -void -Patchlist::getstepsize( void ) -{ - pspec[0].stepsize = pspec[0].range[2]; - pspec[0].sidestep[0] = pspec[0].range[2]; - pspec[0].sidestep[1] = pspec[0].range[2]; - - pspec[1].stepsize = pspec[1].range[2]; - pspec[1].sidestep[0] = pspec[1].range[2]; - pspec[1].sidestep[1] = pspec[1].range[2]; - - for( Patch *p = patch; p; p = p->next ) { - p->getstepsize(); - p->clamp(); - pspec[0].stepsize = ((p->pspec[0].stepsize < pspec[0].stepsize) ? p->pspec[0].stepsize : pspec[0].stepsize); - pspec[0].sidestep[0] = ((p->pspec[0].sidestep[0] < pspec[0].sidestep[0]) ? p->pspec[0].sidestep[0] : pspec[0].sidestep[0]); - pspec[0].sidestep[1] = ((p->pspec[0].sidestep[1] < pspec[0].sidestep[1]) ? p->pspec[0].sidestep[1] : pspec[0].sidestep[1]); - pspec[1].stepsize = ((p->pspec[1].stepsize < pspec[1].stepsize) ? p->pspec[1].stepsize : pspec[1].stepsize); - pspec[1].sidestep[0] = ((p->pspec[1].sidestep[0] < pspec[1].sidestep[0]) ? p->pspec[1].sidestep[0] : pspec[1].sidestep[0]); - pspec[1].sidestep[1] = ((p->pspec[1].sidestep[1] < pspec[1].sidestep[1]) ? p->pspec[1].sidestep[1] : pspec[1].sidestep[1]); - } -} - -void -Patchlist::bbox( void ) -{ - for( Patch *p = patch; p; p = p->next ) - p->bbox(); -} - -int -Patchlist::needsNonSamplingSubdivision( void ) -{ - notInBbox = 0; - for( Patch *p = patch; p; p = p->next ) - notInBbox |= p->needsNonSamplingSubdivision(); - return notInBbox; -} - -int -Patchlist::needsSamplingSubdivision( void ) -{ - pspec[0].needsSubdivision = 0; - pspec[1].needsSubdivision = 0; - - for( Patch *p = patch; p; p = p->next ) { - pspec[0].needsSubdivision |= p->pspec[0].needsSubdivision; - pspec[1].needsSubdivision |= p->pspec[0].needsSubdivision; - } - return (pspec[0].needsSubdivision || pspec[1].needsSubdivision) ? 1 : 0; -} - -int -Patchlist::needsSubdivision( int param ) -{ - return pspec[param].needsSubdivision; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/patchlist.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/patchlist.h deleted file mode 100644 index 9fb3795c09..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/patchlist.h +++ /dev/null @@ -1,98 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * patchlist.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/patchlist.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glupatchlist_h_ -#define __glupatchlist_h_ - -#include "types.h" -#include "defines.h" -#include "patch.h" - -class Quilt; - -class Patchlist { -friend class Subdivider; -public: - Patchlist( Quilt *, REAL *, REAL * ); - Patchlist( Patchlist &, int , REAL ); - ~Patchlist(); - void bbox(); - int cullCheck( void ); - void getstepsize( void ); - int needsNonSamplingSubdivision( void ); - int needsSamplingSubdivision( void ); - int needsSubdivision( int ); - REAL getStepsize( int ); - void getRanges(REAL ranges[4]); - - int get_uorder(); - int get_vorder(); -private: - Patch *patch; - int notInBbox; - int needsSampling; - Pspec pspec[2]; -}; - -inline REAL -Patchlist::getStepsize( int param ) -{ - return pspec[param].stepsize; -} - -inline int -Patchlist::get_uorder() -{ - return patch->get_uorder(); - -} - -inline int - Patchlist::get_vorder() -{ - return patch->get_vorder(); -} - - - - - -#endif /* __glupatchlist_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/pwlarc.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/pwlarc.h deleted file mode 100644 index 83b7c3f813..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/pwlarc.h +++ /dev/null @@ -1,84 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * pwlarc.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/pwlarc.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glupwlarc_h_ -#define __glupwlarc_h_ - -#include "myassert.h" -#include "nurbsconsts.h" - -class TrimVertex; - -class PwlArc : public PooledObj { /* a piecewise-linear arc */ -public: - TrimVertex * pts; /* sample points */ - int npts; /* number of sample points */ - long type; /* curve type */ - inline PwlArc( void ); - inline PwlArc( int, TrimVertex * ); - inline PwlArc( int, TrimVertex *, long ); -}; - -inline -PwlArc::PwlArc( void ) -{ - type = N_P2D; - pts = 0; - npts = -1; -} - -inline -PwlArc::PwlArc( int _npts, TrimVertex *_pts ) -{ - pts = _pts; - npts = _npts; - type = N_P2D; -} - -inline -PwlArc::PwlArc( int _npts, TrimVertex *_pts, long _type ) -{ - pts = _pts; - npts = _npts; - type = _type; -} - -#endif /* __glupwlarc_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/quilt.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/quilt.cc deleted file mode 100644 index 17d3c99142..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/quilt.cc +++ /dev/null @@ -1,278 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * quilt.c++ - * - * $Date: 2002/11/01 23:35:07 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/quilt.cc,v 1.2 2002/11/01 23:35:07 brianp Exp $ - */ - -#include "glimports.h" -#include "mystdio.h" -#include "myassert.h" -#include "quilt.h" -#include "backend.h" -#include "mapdesc.h" -#include "flist.h" -#include "knotvector.h" -#include "patchlist.h" -#include "math.h" //fglu_abs() -#include "simplemath.h" //min() - -/* local preprocessor definitions */ -#define DEF_PATCH_STEPSIZE .4 -#define fsizeof(x) (sizeof(x)/sizeof(REAL)) - - -Quilt::Quilt( Mapdesc *_mapdesc ) -{ - mapdesc = _mapdesc; -} - -void -Quilt::deleteMe( Pool& p ) -{ - for( Quiltspec *q=qspec; q != eqspec; q++ ) { -#if 1 - if( q->breakpoints) delete[] q->breakpoints; q->breakpoints = 0; -#else - if( q->breakpoints) { - delete[] q->breakpoints; - q->breakpoints = 0; -printf("in here\n"); - } -#endif - } - if( cpts ) delete[] cpts; - cpts = 0; - PooledObj::deleteMe( p ); -} - -void -Quilt::show( void ) -{ -#ifndef NDEBUG - int nc = mapdesc->getNcoords(); - REAL *ps = cpts; - ps += qspec[0].offset; - ps += qspec[1].offset; - for( int i=0; i!= qspec[0].order * qspec[0].width; i++ ) { - for( int j = 0; j!= qspec[1].order * qspec[1].width; j++ ) { - for( int k=0; k < nc; k++ ) - dprintf( "%g ", ps[i*qspec[0].stride + j*qspec[1].stride + k] ); - dprintf( "\n" ); - } - dprintf( "\n" ); - } - dprintf( "\n" ); -#endif -} - -/*-------------------------------------------------------------------------- - * Quilt::select - find which map in each quilt contains the points - * pta and ptb with pta[i] < ptb[i] - *-------------------------------------------------------------------------- - */ - -void -Quilt::select( REAL *pta, REAL *ptb ) -{ - int dim = eqspec - qspec; - int i, j; - for( i=0; i=0; j-- ) - if( (qspec[i].breakpoints[j] <= pta[i] ) && - (ptb[i] <= qspec[i].breakpoints[j+1] ) ) - break; - assert( j != -1 ); - qspec[i].index = j; - } -} - -void -Quilt::download( Backend &backend ) -{ - if( getDimension() == 2 ) { - REAL *ps = cpts; - ps += qspec[0].offset; - ps += qspec[1].offset; - ps += qspec[0].index * qspec[0].order * qspec[0].stride; - ps += qspec[1].index * qspec[1].order * qspec[1].stride; - backend.surfpts( mapdesc->getType(), ps, - qspec[0].stride, - qspec[1].stride, - qspec[0].order, - qspec[1].order, - qspec[0].breakpoints[qspec[0].index], - qspec[0].breakpoints[qspec[0].index+1], - qspec[1].breakpoints[qspec[1].index], - qspec[1].breakpoints[qspec[1].index+1] ); - } else { - REAL *ps = cpts; - ps += qspec[0].offset; - ps += qspec[0].index * qspec[0].order * qspec[0].stride; - backend.curvpts( mapdesc->getType(), ps, - qspec[0].stride, - qspec[0].order, - qspec[0].breakpoints[qspec[0].index], - qspec[0].breakpoints[qspec[0].index+1] ); - } -} - -/*-------------------------------------------------------------------------- - * Quilt::downloadAll - download each map that contains the current patch - *-------------------------------------------------------------------------- - */ - -void -Quilt::downloadAll( REAL *pta, REAL *ptb, Backend &backend ) -{ - for( Quilt *m = this; m; m=m->next ) { - m->select( pta, ptb ); - m->download( backend ); - } -} - -/*-------------------------------------------------------------------------- - * Quilt::isCulled - determine if an entire quilt is trivially rejected. - *-------------------------------------------------------------------------- - */ - -int -Quilt::isCulled( void ) -{ - if( mapdesc->isCulling() ) - return mapdesc->xformAndCullCheck( cpts + qspec[0].offset + qspec[1].offset, - qspec[0].order * qspec[0].width, qspec[0].stride, - qspec[1].order * qspec[1].width, qspec[1].stride ); - else - return CULL_ACCEPT; -} - -/*--------------------------------------------------------------------------- - * Quilt::getRange - retrieve the valid paramater range of a set of quilts - *--------------------------------------------------------------------------- - */ -void -Quilt::getRange( REAL *from, REAL *to, Flist& slist, Flist &tlist ) -{ - getRange( from, to, 0, slist ); - getRange( from, to, 1, tlist ); -} - -/*--------------------------------------------------------------------------- - * Quilt::getRange - retrieve the valid paramater range of a set of quilts - *--------------------------------------------------------------------------- - */ -void -Quilt::getRange( REAL *from, REAL *to, int i, Flist &list ) -{ - Quilt *maps = this; - from[i] = maps->qspec[i].breakpoints[0]; - to[i] = maps->qspec[i].breakpoints[maps->qspec[i].width]; - int maxpts = 0; - Quilt_ptr m; - for( m=maps; m; m=m->next ) { - if( m->qspec[i].breakpoints[0] > from[i] ) - from[i] = m->qspec[i].breakpoints[0]; - if( m->qspec[i].breakpoints[m->qspec[i].width] < to[i] ) - to[i] = m->qspec[i].breakpoints[m->qspec[i].width]; - maxpts += m->qspec[i].width + 1; - } - - list.grow( maxpts ); - - for( m=maps; m; m=m->next ) - for( int j=0; j<=m->qspec[i].width; j++ ) { - list.add( m->qspec[i].breakpoints[j] ); - } - - list.filter( ); - list.taper( from[i], to[i] ); -} - -void -Quilt::getRange( REAL *from, REAL *to, Flist& slist ) -{ - getRange( from, to, 0, slist ); -} - -void -Quilt::findRates( Flist& slist, Flist& tlist, REAL rate[2] ) -{ - findSampleRates( slist, tlist ); - rate[0] = qspec[0].step_size; - rate[1] = qspec[1].step_size; - - for( Quilt *q = next; q; q = q->next ) { - q->findSampleRates( slist, tlist ); - if( q->qspec[0].step_size < rate[0] ) - rate[0] = q->qspec[0].step_size; - if( q->qspec[1].step_size < rate[1] ) - rate[1] = q->qspec[1].step_size; - } -} - -void -Quilt::findSampleRates( Flist& slist, Flist& tlist ) -{ - qspec[0].step_size = DEF_PATCH_STEPSIZE * - (qspec[0].breakpoints[qspec[0].width] - qspec[0].breakpoints[0]); - qspec[1].step_size = DEF_PATCH_STEPSIZE * - (qspec[1].breakpoints[qspec[1].width] - qspec[1].breakpoints[0]); - - for( int i = slist.start; i < slist.end-1; i++ ) { - for( int j = tlist.start; j < tlist.end-1; j++ ) { - - REAL pta[2], ptb[2]; - pta[0] = slist.pts[i]; - ptb[0] = slist.pts[i+1]; - pta[1] = tlist.pts[j]; - ptb[1] = tlist.pts[j+1]; - Patchlist patchlist( this, pta, ptb ); - patchlist.getstepsize(); - - { - float edge_len_s = min(glu_abs(ptb[0]-pta[0]),1.0); - float edge_len_t = min(glu_abs(ptb[1]-pta[1]),1.0); - - if( patchlist.getStepsize(0)/edge_len_s < qspec[0].step_size ) - qspec[0].step_size = patchlist.getStepsize(0)/edge_len_s; - if( patchlist.getStepsize(1)/edge_len_t < qspec[1].step_size ) - qspec[1].step_size = patchlist.getStepsize(1)/edge_len_t; - } - } - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/quilt.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/quilt.h deleted file mode 100644 index 336c2574d2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/quilt.h +++ /dev/null @@ -1,98 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * quilt.h - * - * $Date: 2001/08/07 17:34:11 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/quilt.h,v 1.2 2001/08/07 17:34:11 brianp Exp $ - */ - -#ifndef __gluquilt_h_ -#define __gluquilt_h_ - -#include "defines.h" -#include "bufpool.h" -#include "types.h" - -class Backend; -class Mapdesc; -class Flist; -struct Knotvector; - -/* constants for memory allocation of NURBS to Bezier conversion */ -#define MAXDIM 2 - -struct Quiltspec { /* a specification for a dimension of a quilt */ - int stride; /* words between points */ - int width; /* number of segments */ - int offset; /* words to first point */ - int order; /* order */ - int index; /* current segment number */ - int bdry[2]; /* boundary edge flag */ - REAL step_size; - Knot * breakpoints; -}; - -typedef Quiltspec *Quiltspec_ptr; - -class Quilt : public PooledObj { /* an array of bezier patches */ -public: - Quilt( Mapdesc * ); - Mapdesc * mapdesc; /* map descriptor */ - REAL * cpts; /* control points */ - Quiltspec qspec[MAXDIM]; /* the dimensional data */ - Quiltspec_ptr eqspec; /* qspec trailer */ - Quilt *next; /* next quilt in linked list */ - -public: - void deleteMe( Pool& ); - void toBezier( Knotvector &, INREAL *, long ); - void toBezier( Knotvector &, Knotvector &, INREAL *, long ); - void select( REAL *, REAL * ); - int getDimension( void ) { return eqspec - qspec; } - void download( Backend & ); - void downloadAll( REAL *, REAL *, Backend & ); - int isCulled( void ); - void getRange( REAL *, REAL *, Flist&, Flist & ); - void getRange( REAL *, REAL *, int, Flist & ); - void getRange( REAL *, REAL *, Flist& ); - void findRates( Flist& slist, Flist& tlist, REAL[2] ); - void findSampleRates( Flist& slist, Flist& tlist ); - void show(); -}; - -typedef class Quilt *Quilt_ptr; - -#endif /* __gluquilt_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/reader.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/reader.cc deleted file mode 100644 index 271a32fbc1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/reader.cc +++ /dev/null @@ -1,148 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * reader.c++ - * - * $Date: 2002/11/01 23:35:07 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/reader.cc,v 1.2 2002/11/01 23:35:07 brianp Exp $ - */ - -#include -#include "glimports.h" -#include "nurbsconsts.h" -#include "reader.h" -#include "trimvertex.h" -#include "simplemath.h" - -//when read a pwlCurve, if two consecutive points are the same, then -//eliminate one of them. This makes the tessellator more robust. The spec -//assumes the application makes sure there are no redundant points. -//but in Inspector, the trim curves seem to have redundant points a lot. -//I guess other similar users may have the same problem. - -#define ELIMINATE_REDUNDANT_POINTS - -#ifdef ELIMINATE_REDUNDANT_POINTS -#define equal(x,y) ( glu_abs(x-y) <= 0.00001) -#endif - -#ifdef ELIMINATE_REDUNDANT_POINTS -O_pwlcurve::O_pwlcurve( long _type, long count, INREAL *array, long byte_stride, TrimVertex *trimpts ) -{ - next = 0; - used = 0; - owner = 0; - pts = trimpts; - npts = (int) count; - int i; - - /* copy user data into internal trimming data structures */ - switch( _type ) { - case N_P2D: { - TrimVertex *v = pts; - TrimVertex *prev = NULL; - int num = 0; - int doit; - for(i=0; iparam[0], array[0]) && equal(prev->param[1], array[1])) - { - doit = 0; - } - } - - if(doit) - { - v->param[0] = (REAL) array[0]; - v->param[1] = (REAL) array[1]; - prev = v; - v++; - num++; - } - array = (INREAL *) (((char *) array) + byte_stride); - } - npts = num; - break; - } - case N_P2DR: { - TrimVertex *v = pts; - for( TrimVertex *lastv = v + count; v != lastv; v++ ) { - v->param[0] = (REAL) array[0] / (REAL) array[2]; - v->param[1] = (REAL) array[1] / (REAL) array[2]; - array = (INREAL *) (((char *) array) + byte_stride); - } - break; - } - } -} -#else -O_pwlcurve::O_pwlcurve( long _type, long count, INREAL *array, long byte_stride, TrimVertex *trimpts ) -{ - next = 0; - used = 0; - owner = 0; - pts = trimpts; - npts = (int) count; - - /* copy user data into internal trimming data structures */ - switch( _type ) { - case N_P2D: { - TrimVertex *v = pts; - for( TrimVertex *lastv = v + count; v != lastv; v++ ) { - v->param[0] = (REAL) array[0]; - v->param[1] = (REAL) array[1]; - array = (INREAL *) (((char *) array) + byte_stride); - } - break; - } - case N_P2DR: { - TrimVertex *v = pts; - for( TrimVertex *lastv = v + count; v != lastv; v++ ) { - v->param[0] = (REAL) array[0] / (REAL) array[2]; - v->param[1] = (REAL) array[1] / (REAL) array[2]; - array = (INREAL *) (((char *) array) + byte_stride); - } - break; - } - } -} -#endif - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/reader.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/reader.h deleted file mode 100644 index ac86f8a29f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/reader.h +++ /dev/null @@ -1,138 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * reader.h - * - * $Date: 2001/08/07 17:34:11 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/reader.h,v 1.2 2001/08/07 17:34:11 brianp Exp $ - */ - -#ifndef __glureader_h_ -#define __glureader_h_ - -#include "bufpool.h" -#include "types.h" - -enum Curvetype { ct_nurbscurve, ct_pwlcurve, ct_none }; - -struct Property; -struct O_surface; -struct O_nurbssurface; -struct O_trim; -class O_pwlcurve; -struct O_nurbscurve; -struct O_curve; -class Quilt; -class TrimVertex; - - -struct O_curve : public PooledObj { - union { - O_nurbscurve *o_nurbscurve; - O_pwlcurve *o_pwlcurve; - } curve; - Curvetype curvetype; /* arc type: pwl or nurbs */ - O_curve * next; /* next arc in loop */ - O_surface * owner; /* owning surface */ - int used; /* curve called in cur surf */ - int save; /* 1 if in display list */ - long nuid; - O_curve() { next = 0; used = 0; owner = 0; - curve.o_pwlcurve = 0; } - }; - -struct O_nurbscurve : public PooledObj { - Quilt *bezier_curves; /* array of bezier curves */ - long type; /* range descriptor */ - REAL tesselation; /* tesselation tolerance */ - int method; /* tesselation method */ - O_nurbscurve * next; /* next curve in list */ - int used; /* curve called in cur surf */ - int save; /* 1 if in display list */ - O_curve * owner; /* owning curve */ - O_nurbscurve( long _type ) - { type = _type; owner = 0; next = 0; used = 0; } - }; - -class O_pwlcurve : public PooledObj { -public: - TrimVertex *pts; /* array of trim vertices */ - int npts; /* number of trim vertices */ - O_pwlcurve * next; /* next curve in list */ - int used; /* curve called in cur surf */ - int save; /* 1 if in display list */ - O_curve * owner; /* owning curve */ - O_pwlcurve( long, long, INREAL *, long, TrimVertex * ); - }; - -struct O_trim : public PooledObj { - O_curve *o_curve; /* closed trim loop */ - O_trim * next; /* next loop along trim */ - int save; /* 1 if in display list */ - O_trim() { next = 0; o_curve = 0; } - }; - -struct O_nurbssurface : public PooledObj { - Quilt * bezier_patches;/* array of bezier patches */ - long type; /* range descriptor */ - O_surface * owner; /* owning surface */ - O_nurbssurface * next; /* next surface in chain */ - int save; /* 1 if in display list */ - int used; /* 1 if prev called in block */ - O_nurbssurface( long _type ) - { type = _type; owner = 0; next = 0; used = 0; } - }; - -struct O_surface : public PooledObj { - O_nurbssurface * o_nurbssurface; /* linked list of surfaces */ - O_trim * o_trim; /* list of trim loops */ - int save; /* 1 if in display list */ - long nuid; - O_surface() { o_trim = 0; o_nurbssurface = 0; } - }; - -struct Property : public PooledObj { - long type; - long tag; - REAL value; - int save; /* 1 if in display list */ - Property( long _type, long _tag, INREAL _value ) - { type = _type; tag = _tag; value = (REAL) _value; } - Property( long _tag, INREAL _value ) - { type = 0; tag = _tag; value = (REAL) _value; } - }; - -class NurbsTessellator; -#endif /* __glureader_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/renderhints.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/renderhints.cc deleted file mode 100644 index 6a9d37e013..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/renderhints.cc +++ /dev/null @@ -1,135 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * renderhints.c++ - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/renderhints.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#include "glimports.h" -#include "mystdio.h" -#include "renderhints.h" -#include "defines.h" -#include "nurbsconsts.h" - - -/*-------------------------------------------------------------------------- - * Renderhints::Renderhints - set all window specific options - *-------------------------------------------------------------------------- - */ -Renderhints::Renderhints() -{ - display_method = N_FILL; - errorchecking = N_MSG; - subdivisions = 6.0; - tmp1 = 0.0; -} - -void -Renderhints::init( void ) -{ - maxsubdivisions = (int) subdivisions; - if( maxsubdivisions < 0 ) maxsubdivisions = 0; - - - if( display_method == N_FILL ) { - wiretris = 0; - wirequads = 0; - } else if( display_method == N_OUTLINE_TRI ) { - wiretris = 1; - wirequads = 0; - } else if( display_method == N_OUTLINE_QUAD ) { - wiretris = 0; - wirequads = 1; - } else { - wiretris = 1; - wirequads = 1; - } -} - -int -Renderhints::isProperty( long property ) -{ - switch ( property ) { - case N_DISPLAY: - case N_ERRORCHECKING: - case N_SUBDIVISIONS: - case N_TMP1: - return 1; - default: - return 0; - } -} - -REAL -Renderhints::getProperty( long property ) -{ - switch ( property ) { - case N_DISPLAY: - return display_method; - case N_ERRORCHECKING: - return errorchecking; - case N_SUBDIVISIONS: - return subdivisions; - case N_TMP1: - return tmp1; - default: - abort(); - return -1; //not necessary, needed to shut up compiler - } -} - -void -Renderhints::setProperty( long property, REAL value ) -{ - switch ( property ) { - case N_DISPLAY: - display_method = value; - break; - case N_ERRORCHECKING: - errorchecking = value; - break; - case N_SUBDIVISIONS: - subdivisions = value; - break; - case N_TMP1: /* unused */ - tmp1 = value; - break; - default: - abort(); - break; - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/renderhints.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/renderhints.h deleted file mode 100644 index efa959e3ab..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/renderhints.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * renderhints.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/renderhints.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glurenderhints_h_ -#define __glurenderhints_h_ - -#include "types.h" - -class Renderhints { -public: - Renderhints( void ); - void init( void ); - int isProperty( long ); - REAL getProperty( long ); - void setProperty( long, REAL ); - - REAL display_method; /* display mode */ - REAL errorchecking; /* activate error checking */ - REAL subdivisions; /* maximum number of subdivisions per patch */ - REAL tmp1; /* unused */ - - int displaydomain; - int maxsubdivisions; - int wiretris; - int wirequads; -}; - -#endif /* __glurenderhints_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/simplemath.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/simplemath.h deleted file mode 100644 index f2efee35f1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/simplemath.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * simplemath.h - * - * $Date: 2002/11/01 23:35:07 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/simplemath.h,v 1.2 2002/11/01 23:35:07 brianp Exp $ - */ - -#ifndef __glusimplemath_h_ -#define __glusimplemath_h_ - -/* simple inline routines */ - -inline int -max( int x, int y ) { return ( x < y ) ? y : x; } - -inline REAL -min( REAL x, REAL y ) { return ( x > y ) ? y : x; } - -inline REAL -glu_abs( REAL x ) { return ( x < 0.0 ) ? -x : x; } - -#endif /* __glusimplemath_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/slicer.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/slicer.cc deleted file mode 100644 index 6c2dcfb502..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/slicer.cc +++ /dev/null @@ -1,1302 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * slicer.c++ - * - * $Date: 2005/10/28 13:09:08 $ $Revision: 1.4.26.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/slicer.cc,v 1.4.26.1 2005/10/28 13:09:08 brianp Exp $ - */ - -#include -#include -#include -#include "glimports.h" -#include "mystdio.h" -#include "myassert.h" -#include "bufpool.h" -#include "slicer.h" -#include "backend.h" -#include "arc.h" -#include "gridtrimvertex.h" -#include "simplemath.h" -#include "trimvertex.h" -#include "varray.h" - -#include "polyUtil.h" //for area() - -//static int count=0; - -/*USE_OPTTT is initiated in trimvertex.h*/ - -#ifdef USE_OPTTT - #include -#endif - -//#define USE_READ_FLAG //whether to use new or old tesselator - //if defined, it reads "flagFile", - // if the number is 1, then use new tess - // otherwise, use the old tess. - //if not defined, then use new tess. -#ifdef USE_READ_FLAG -static Int read_flag(char* name); -Int newtess_flag = read_flag("flagFile"); -#endif - -//#define COUNT_TRIANGLES -#ifdef COUNT_TRIANGLES -Int num_triangles = 0; -Int num_quads = 0; -#endif - -#define max(a,b) ((a>b)? a:b) -#define ZERO 0.00001 /*determing whether a loop is a rectngle or not*/ -#define equalRect(a,b) ((glu_abs(a-b) <= ZERO)? 1:0) //only used in tessellating a rectangle - -#if 0 // UNUSED -static Int is_Convex(Arc_ptr loop) -{ - if(area(loop->tail(), loop->head(), loop->next->head()) <0 ) - return 0; - for(Arc_ptr jarc = loop->next; jarc != loop; jarc = jarc->next) - { - if(area(jarc->tail(), jarc->head(), jarc->next->head()) < 0) - return 0; - } - return 1; -} -#endif - -/******triangulate a monotone polygon**************/ -#include "monoTriangulation.h" -#if 0 // UNUSED -static int is_U_monotone(Arc_ptr loop) -{ - int n_changes=0; - int prev_sign; - int cur_sign; - Arc_ptr temp; - - cur_sign = compV2InX(loop->head(), loop->tail()); - - n_changes = (compV2InX(loop->prev->head(), loop->prev->tail()) - != cur_sign); - - for(temp=loop->next; temp != loop; temp = temp->next) - { - prev_sign = cur_sign; - cur_sign = compV2InX(temp->head(), temp->tail()); - if(cur_sign != prev_sign) - { -#ifdef DEBUG - printf("***change signe\n"); -#endif - n_changes++; - } - } - if(n_changes == 2) return 1; - else - return 0; -} -#endif - -inline int compInY(REAL a[2], REAL b[2]) -{ - if(a[1] < b[1]) - return -1; - else if (a[1] > b[1]) - return 1; - else if(a[0] > b[0]) - return 1; - else return -1; -} - -void monoTriangulationLoop(Arc_ptr loop, Backend& backend, primStream* pStream) -{ - int i; - //find the top, bottom, increasing and decreasing chain - //then call monoTrianulation - Arc_ptr jarc, temp; - Arc_ptr top; - Arc_ptr bot; - top = bot = loop; - if(compInY(loop->tail(), loop->prev->tail()) < 0) - { - //first find bot - for(temp = loop->next; temp != loop; temp = temp->next) - { - if(compInY(temp->tail(), temp->prev->tail()) > 0) - break; - } - bot = temp->prev; - //then find top - for(temp=loop->prev; temp != loop; temp = temp->prev) - { - if(compInY(temp->tail(), temp->prev->tail()) > 0) - break; - } - top = temp; - } - else //loop > loop->prev - { - for(temp=loop->next; temp != loop; temp = temp->next) - { - if(compInY(temp->tail(), temp->prev->tail()) < 0) - break; - } - top = temp->prev; - for(temp=loop->prev; temp != loop; temp = temp->prev) - { - if(compInY(temp->tail(), temp->prev->tail()) < 0) - break; - } - bot = temp; - } - //creat increase and decrease chains - vertexArray inc_chain(50); //this is a dynamci array - for(i=1; i<=top->pwlArc->npts-2; i++) - { - //the first vertex is the top which doesn't below to inc_chain - inc_chain.appendVertex(top->pwlArc->pts[i].param); - } - for(jarc=top->next; jarc != bot; jarc = jarc->next) - { - for(i=0; i<=jarc->pwlArc->npts-2; i++) - { - inc_chain.appendVertex(jarc->pwlArc->pts[i].param); - } - - } - vertexArray dec_chain(50); - for(jarc = top->prev; jarc != bot; jarc = jarc->prev) - { - for(i=jarc->pwlArc->npts-2; i>=0; i--) - { - dec_chain.appendVertex(jarc->pwlArc->pts[i].param); - } - } - for(i=bot->pwlArc->npts-2; i>=1; i--) - { - dec_chain.appendVertex(jarc->pwlArc->pts[i].param); - } - - monoTriangulationRec(top->tail(), bot->tail(), &inc_chain, 0, - &dec_chain, 0, &backend); - -} - -/********tesselate a rectanlge (OPTIMIZATION**************/ -static void triangulateRectGen(Arc_ptr loop, int n_ulines, int n_vlines, Backend& backend); - -static Int is_rect(Arc_ptr loop) -{ - Int nlines =1; - for(Arc_ptr jarc = loop->next; jarc != loop; jarc = jarc->next) - { - nlines++; - if(nlines == 5) - break; - } - if(nlines != 4) - return 0; - - -/* -printf("here1\n"); -printf("loop->tail=(%f,%f)\n", loop->tail()[0], loop->tail()[1]); -printf("loop->head=(%f,%f)\n", loop->head()[0], loop->head()[1]); -printf("loop->next->tail=(%f,%f)\n", loop->next->tail()[0], loop->next->tail()[1]); -printf("loop->next->head=(%f,%f)\n", loop->next->head()[0], loop->next->head()[1]); -if(fglu_abs(loop->tail()[0] - loop->head()[0])<0.000001) - printf("equal 1\n"); -if(loop->next->tail()[1] == loop->next->head()[1]) - printf("equal 2\n"); -*/ - - if( (glu_abs(loop->tail()[0] - loop->head()[0])<=ZERO) && - (glu_abs(loop->next->tail()[1] - loop->next->head()[1])<=ZERO) && - (glu_abs(loop->prev->tail()[1] - loop->prev->head()[1])<=ZERO) && - (glu_abs(loop->prev->prev->tail()[0] - loop->prev->prev->head()[0])<=ZERO) - ) - return 1; - else if - ( (glu_abs(loop->tail()[1] - loop->head()[1]) <= ZERO) && - (glu_abs(loop->next->tail()[0] - loop->next->head()[0]) <= ZERO) && - (glu_abs(loop->prev->tail()[0] - loop->prev->head()[0]) <= ZERO) && - (glu_abs(loop->prev->prev->tail()[1] - loop->prev->prev->head()[1]) <= ZERO) - ) - return 1; - else - return 0; -} - - -//a line with the same u for opt -#ifdef USE_OPTTT -static void evalLineNOGE_BU(TrimVertex *verts, int n, Backend& backend) -{ - int i; - backend.preEvaluateBU(verts[0].param[0]); - for(i=0; itail()[1] == loop->head()[1]) - { - if(loop->tail()[1] > loop->prev->prev->tail()[1]) - { - - top = loop; - } - else{ - - top = loop->prev->prev; - } - } - else - { - if(loop->tail()[0] > loop->prev->prev->tail()[0]) - { - //loop is the right arc - - top = loop->next; - } - else - { - - top = loop->prev; - } - } - left = top->next; - bot = left->next; - right= bot->next; - - //if u, v are both nonlinear, then if the - //boundary is tessellated dense, we also - //sample the inside to get a better tesslletant. - if( (!ulinear) && (!vlinear)) - { - int nu = top->pwlArc->npts; - if(nu < bot->pwlArc->npts) - nu = bot->pwlArc->npts; - int nv = left->pwlArc->npts; - if(nv < right->pwlArc->npts) - nv = right->pwlArc->npts; -/* - if(nu > 2 && nv > 2) - { - triangulateRectGen(top, nu-2, nv-2, backend); - return; - } -*/ - } - - if(TB_or_LR == 1) - triangulateRectAux(top->pwlArc, bot->pwlArc, left->pwlArc, right->pwlArc, backend); - else if(TB_or_LR == -1) - triangulateRectAux(left->pwlArc, right->pwlArc, bot->pwlArc, top->pwlArc, backend); - else - { - Int maxPointsTB = top->pwlArc->npts + bot->pwlArc->npts; - Int maxPointsLR = left->pwlArc->npts + right->pwlArc->npts; - - if(maxPointsTB < maxPointsLR) - triangulateRectAux(left->pwlArc, right->pwlArc, bot->pwlArc, top->pwlArc, backend); - else - triangulateRectAux(top->pwlArc, bot->pwlArc, left->pwlArc, right->pwlArc, backend); - } -} - -static void triangulateRectAux(PwlArc* top, PwlArc* bot, PwlArc* left, PwlArc* right, Backend& backend) -{ //if(maxPointsTB >= maxPointsLR) - { - - Int d, topd_left, topd_right, botd_left, botd_right, i,j; - d = left->npts /2; - -#ifdef USE_OPTTT - evalLineNOGE(top->pts, top->npts, backend); - evalLineNOGE(bot->pts, bot->npts, backend); - evalLineNOGE(left->pts, left->npts, backend); - evalLineNOGE(right->pts, right->npts, backend); -#endif - - if(top->npts == 2) { - backend.bgntfan(); - OPT_OUTVERT(top->pts[0], backend);//the root - for(i=0; inpts; i++){ - OPT_OUTVERT(left->pts[i], backend); - } - for(i=1; i<= bot->npts-2; i++){ - OPT_OUTVERT(bot->pts[i], backend); - } - backend.endtfan(); - - backend.bgntfan(); - OPT_OUTVERT(bot->pts[bot->npts-2], backend); - for(i=0; inpts; i++){ - OPT_OUTVERT(right->pts[i], backend); - } - backend.endtfan(); - } - else if(bot->npts == 2) { - backend.bgntfan(); - OPT_OUTVERT(bot->pts[0], backend);//the root - for(i=0; inpts; i++){ - OPT_OUTVERT(right->pts[i], backend); - } - for(i=1; i<= top->npts-2; i++){ - OPT_OUTVERT(top->pts[i], backend); - } - backend.endtfan(); - - backend.bgntfan(); - OPT_OUTVERT(top->pts[top->npts-2], backend); - for(i=0; inpts; i++){ - OPT_OUTVERT(left->pts[i], backend); - } - backend.endtfan(); - } - else { //both top and bot have >=3 points - - backend.bgntfan(); - - OPT_OUTVERT(top->pts[top->npts-2], backend); - - for(i=0; i<=d; i++) - { - OPT_OUTVERT(left->pts[i], backend); - } - backend.endtfan(); - - backend.bgntfan(); - - OPT_OUTVERT(bot->pts[1], backend); - - OPT_OUTVERT(top->pts[top->npts-2], backend); - - for(i=d; i< left->npts; i++) - { - OPT_OUTVERT(left->pts[i], backend); - } - backend.endtfan(); - - d = right->npts/2; - //output only when dnpts-1 and - // - if(dnpts-1) - { - backend.bgntfan(); - // backend.tmeshvert(& top->pts[1]); - OPT_OUTVERT(top->pts[1], backend); - for(i=d; i< right->npts; i++) - { - // backend.tmeshvert(& right->pts[i]); - - OPT_OUTVERT(right->pts[i], backend); - - } - backend.endtfan(); - } - - backend.bgntfan(); - // backend.tmeshvert(& bot->pts[bot->npts-2]); - OPT_OUTVERT( bot->pts[bot->npts-2], backend); - for(i=0; i<=d; i++) - { - // backend.tmeshvert(& right->pts[i]); - OPT_OUTVERT(right->pts[i], backend); - - } - - // backend.tmeshvert(& top->pts[1]); - OPT_OUTVERT(top->pts[1], backend); - - backend.endtfan(); - - - topd_left = top->npts-2; - topd_right = 1; //topd_left>= topd_right - - botd_left = 1; - botd_right = bot->npts-2; //botd_left<= bot_dright - - - if(top->npts < bot->npts) - { - int delta=bot->npts - top->npts; - int u = delta/2; - botd_left = 1+ u; - botd_right = bot->npts-2-( delta-u); - - if(botd_left >1) - { - backend.bgntfan(); - // backend.tmeshvert(& top->pts[top->npts-2]); - OPT_OUTVERT(top->pts[top->npts-2], backend); - for(i=1; i<= botd_left; i++) - { - // backend.tmeshvert(& bot->pts[i]); - OPT_OUTVERT(bot->pts[i] , backend); - } - backend.endtfan(); - } - if(botd_right < bot->npts-2) - { - backend.bgntfan(); - OPT_OUTVERT(top->pts[1], backend); - for(i=botd_right; i<= bot->npts-2; i++) - OPT_OUTVERT(bot->pts[i], backend); - backend.endtfan(); - } - } - else if(top->npts> bot->npts) - { - int delta=top->npts-bot->npts; - int u = delta/2; - topd_left = top->npts-2 - u; - topd_right = 1+delta-u; - - if(topd_left < top->npts-2) - { - backend.bgntfan(); - // backend.tmeshvert(& bot->pts[1]); - OPT_OUTVERT(bot->pts[1], backend); - for(i=topd_left; i<= top->npts-2; i++) - { - // backend.tmeshvert(& top->pts[i]); - OPT_OUTVERT(top->pts[i], backend); - } - backend.endtfan(); - } - if(topd_right > 1) - { - backend.bgntfan(); - OPT_OUTVERT(bot->pts[bot->npts-2], backend); - for(i=1; i<= topd_right; i++) - OPT_OUTVERT(top->pts[i], backend); - backend.endtfan(); - } - } - - if(topd_left <= topd_right) - return; - - backend.bgnqstrip(); - for(j=botd_left, i=topd_left; i>=topd_right; i--,j++) - { - // backend.tmeshvert(& top->pts[i]); - // backend.tmeshvert(& bot->pts[j]); - OPT_OUTVERT(top->pts[i], backend); - OPT_OUTVERT(bot->pts[j], backend); - } - backend.endqstrip(); - - } - } -} - - -static void triangulateRectCenter(int n_ulines, REAL* u_val, - int n_vlines, REAL* v_val, - Backend& backend) -{ - - // XXX this code was patched by Diego Santa Cruz - // to fix a problem in which glMapGrid2f() was called with bad parameters. - // This has beens submitted to SGI but not integrated as of May 1, 2001. - if(n_ulines>1 && n_vlines>1) { - backend.surfgrid(u_val[0], u_val[n_ulines-1], n_ulines-1, - v_val[n_vlines-1], v_val[0], n_vlines-1); - backend.surfmesh(0,0,n_ulines-1,n_vlines-1); - } - - return; - - /* - for(i=0; ipwlArc->npts); - assert(upper_val); - if(dir) - { - for(k=0,i=arc->pwlArc->npts-1; i>=0; i--,k++) - { - upper_val[k] = arc->pwlArc->pts[i].param[0]; - } - backend.evalUStrip(arc->pwlArc->npts, arc->pwlArc->pts[0].param[1], - upper_val, - n_ulines, v, u_val); - } - else - { - for(k=0,i=0; ipwlArc->npts; i++,k++) - { - upper_val[k] = arc->pwlArc->pts[i].param[0]; - - } - - backend.evalUStrip( - n_ulines, v, u_val, - arc->pwlArc->npts, arc->pwlArc->pts[0].param[1], upper_val - ); - } - - free(upper_val); - return; - } - else //is_v - { - int i,k; - REAL* left_val = (REAL*) malloc(sizeof(REAL) * arc->pwlArc->npts); - assert(left_val); - if(dir) - { - for(k=0,i=arc->pwlArc->npts-1; i>=0; i--,k++) - { - left_val[k] = arc->pwlArc->pts[i].param[1]; - } - backend.evalVStrip(arc->pwlArc->npts, arc->pwlArc->pts[0].param[0], - left_val, - n_ulines, v, u_val); - } - else - { - for(k=0,i=0; ipwlArc->npts; i++,k++) - { - left_val[k] = arc->pwlArc->pts[i].param[1]; - } - backend.evalVStrip( - n_ulines, v, u_val, - arc->pwlArc->npts, arc->pwlArc->pts[0].param[0], left_val - ); - } - free(left_val); - return; - } - - //the following is a different version of the above code. If you comment - //the above code, the following code will still work. The reason to leave - //the folliwng code here is purely for testing purpose. - /* - int i,j; - PwlArc* parc = arc->pwlArc; - int d1 = parc->npts-1; - int d2 = 0; - TrimVertex trimVert; - trimVert.nuid = 0;//???? - REAL* temp_u_val = u_val; - if(dir ==0) //have to reverse u_val - { - temp_u_val = (REAL*) malloc(sizeof(REAL) * n_ulines); - assert(temp_u_val); - for(i=0; inpts > n_ulines) - { - d1 = n_ulines-1; - - backend.bgntfan(); - if(is_u){ - trimVert.param[0] = u_val[0]; - trimVert.param[1] = v; - } - else - { - trimVert.param[1] = u_val[0]; - trimVert.param[0] = v; - } - - backend.tmeshvert(& trimVert); - for(i=d1; i< parc->npts; i++) - backend.tmeshvert(& parc->pts[i]); - backend.endtfan(); - - - } - else if(parc->npts < n_ulines) - { - d2 = n_ulines-parc->npts; - - - backend.bgntfan(); - backend.tmeshvert(& parc->pts[parc->npts-1]); - for(i=0; i<= d2; i++) - { - if(is_u){ - trimVert.param[0] = u_val[i]; - trimVert.param[1] = v; - } - else - { - trimVert.param[1] = u_val[i]; - trimVert.param[0] = v; - } - backend.tmeshvert(&trimVert); - } - backend.endtfan(); - - } - if(d1>0){ - - - backend.bgnqstrip(); - for(i=d1, j=d2; i>=0; i--, j++) - { - backend.tmeshvert(& parc->pts[i]); - - if(is_u){ - trimVert.param[0] = u_val[j]; - trimVert.param[1] = v; - } - else{ - trimVert.param[1] = u_val[j]; - trimVert.param[0] = v; - } - backend.tmeshvert(&trimVert); - - - - } - backend.endqstrip(); - - - } - if(dir == 0) //temp_u_val was mallocated - free(temp_u_val); - */ -} - -//n_ulines is the number of ulines inside, and n_vlines is the number of vlines -//inside, different from meanings elsewhere!!! -static void triangulateRectGen(Arc_ptr loop, int n_ulines, int n_vlines, Backend& backend) -{ - - int i; - //we know the loop is a rectangle, but not sure which is top - Arc_ptr top, bot, left, right; - - if(equalRect(loop->tail()[1] , loop->head()[1])) - { - - if(loop->tail()[1] > loop->prev->prev->tail()[1]) - { - - top = loop; - } - else{ - - top = loop->prev->prev; - } - } - else - { - if(loop->tail()[0] > loop->prev->prev->tail()[0]) - { - //loop is the right arc - - top = loop->next; - } - else - { - - top = loop->prev; - } - } - - left = top->next; - bot = left->next; - right= bot->next; - -#ifdef COUNT_TRIANGLES - num_triangles += loop->pwlArc->npts + - left->pwlArc->npts + - bot->pwlArc->npts + - right->pwlArc->npts - + 2*n_ulines + 2*n_vlines - -8; - num_quads += (n_ulines-1)*(n_vlines-1); -#endif -/* - backend.surfgrid(left->tail()[0], right->tail()[0], n_ulines+1, - top->tail()[1], bot->tail()[1], n_vlines+1); -// if(n_ulines>1 && n_vlines>1) - backend.surfmesh(0,0,n_ulines+1,n_vlines+1); -return; -*/ - REAL* u_val=(REAL*) malloc(sizeof(REAL)*n_ulines); - assert(u_val); - REAL* v_val=(REAL*)malloc(sizeof(REAL) * n_vlines); - assert(v_val); - REAL u_stepsize = (right->tail()[0] - left->tail()[0])/( (REAL) n_ulines+1); - REAL v_stepsize = (top->tail()[1] - bot->tail()[1])/( (REAL) n_vlines+1); - Real temp=left->tail()[0]+u_stepsize; - for(i=0; itail()[1] + v_stepsize; - for(i=0; ipwlArc->npts); - for(i=0; ipwlArc->npts; i++) - { - vert[0] = arc->pwlArc->pts[i].param[0]; - vert[1] = arc->pwlArc->pts[i].param[1]; - sline->setPoint(i, vert); - } - ret = new directedLine(INCREASING, sline); - return ret; -} - -/*an pwlArc may not be a straight line*/ -directedLine* arcToMultDLines(directedLine* original, Arc_ptr arc) -{ - directedLine* ret = original; - int is_linear = 0; - if(arc->pwlArc->npts == 2 ) - is_linear = 1; - else if(area(arc->pwlArc->pts[0].param, arc->pwlArc->pts[1].param, arc->pwlArc->pts[arc->pwlArc->npts-1].param) == 0.0) - is_linear = 1; - - if(is_linear) - { - directedLine *dline = arcToDLine(arc); - if(ret == NULL) - ret = dline; - else - ret->insert(dline); - return ret; - } - else /*not linear*/ - { - for(Int i=0; ipwlArc->npts-1; i++) - { - Real vert[2][2]; - vert[0][0] = arc->pwlArc->pts[i].param[0]; - vert[0][1] = arc->pwlArc->pts[i].param[1]; - vert[1][0] = arc->pwlArc->pts[i+1].param[0]; - vert[1][1] = arc->pwlArc->pts[i+1].param[1]; - - sampledLine *sline = new sampledLine(2, vert); - directedLine *dline = new directedLine(INCREASING, sline); - if(ret == NULL) - ret = dline; - else - ret->insert(dline); - } - return ret; - } -} - - - -directedLine* arcLoopToDLineLoop(Arc_ptr loop) -{ - directedLine* ret; - - if(loop == NULL) - return NULL; - ret = arcToMultDLines(NULL, loop); -//ret->printSingle(); - for(Arc_ptr temp = loop->next; temp != loop; temp = temp->next){ - ret = arcToMultDLines(ret, temp); -//ret->printSingle(); - } - - return ret; -} - -/* -void Slicer::evalRBArray(rectBlockArray* rbArray, gridWrap* grid) -{ - TrimVertex *trimVert = (TrimVertex*)malloc(sizeof(TrimVertex)); - trimVert -> nuid = 0;//???? - - Real* u_values = grid->get_u_values(); - Real* v_values = grid->get_v_values(); - - Int i,j,k,l; - - for(l=0; lget_n_elements(); l++) - { - rectBlock* block = rbArray->get_element(l); - for(k=0, i=block->get_upGridLineIndex(); i>block->get_lowGridLineIndex(); i--, k++) - { - - backend.bgnqstrip(); - for(j=block->get_leftIndices()[k+1]; j<= block->get_rightIndices()[k+1]; j++) - { - trimVert->param[0] = u_values[j]; - trimVert->param[1] = v_values[i]; - backend.tmeshvert(trimVert); - - trimVert->param[1] = v_values[i-1]; - backend.tmeshvert(trimVert); - - } - backend.endqstrip(); - - } - } - - free(trimVert); -} -*/ - -void Slicer::evalRBArray(rectBlockArray* rbArray, gridWrap* grid) -{ - Int i,j,k; - - Int n_vlines=grid->get_n_vlines(); - //the reason to switch the position of v_max and v_min is because of the - //the orientation problem. glEvalMesh generates quad_strip clockwise, but - //we need counter-clockwise. - backend.surfgrid(grid->get_u_min(), grid->get_u_max(), grid->get_n_ulines()-1, - grid->get_v_max(), grid->get_v_min(), n_vlines-1); - - - for(j=0; jget_n_elements(); j++) - { - rectBlock* block = rbArray->get_element(j); - Int low = block->get_lowGridLineIndex(); - Int high = block->get_upGridLineIndex(); - - for(k=0, i=high; i>low; i--, k++) - { - backend.surfmesh(block->get_leftIndices()[k+1], n_vlines-1-i, block->get_rightIndices()[k+1]-block->get_leftIndices()[k+1], 1); - } - } -} - - -void Slicer::evalStream(primStream* pStream) -{ - Int i,j,k; - k=0; -/* TrimVertex X;*/ - TrimVertex *trimVert =/*&X*/ (TrimVertex*)malloc(sizeof(TrimVertex)); - trimVert -> nuid = 0;//??? - Real* vertices = pStream->get_vertices(); //for efficiency - for(i=0; iget_n_prims(); i++) - { - - //ith primitive has #vertices = lengths[i], type=types[i] - switch(pStream->get_type(i)){ - case PRIMITIVE_STREAM_FAN: - - backend.bgntfan(); - - for(j=0; jget_length(i); j++) - { - trimVert->param[0] = vertices[k]; - trimVert->param[1] = vertices[k+1]; - backend.tmeshvert(trimVert); - -// backend.tmeshvert(vertices[k], vertices[k+1]); - k += 2; - } - backend.endtfan(); - break; - - default: - fprintf(stderr, "evalStream: not implemented yet\n"); - exit(1); - - } - } - free(trimVert); -} - - - - -void Slicer::slice_new(Arc_ptr loop) -{ -//count++; -//if(count == 78) count=1; -//printf("count=%i\n", count); -//if( ! (4<= count && count <=4)) return; - - - Int num_ulines; - Int num_vlines; - Real uMin, uMax, vMin, vMax; - Real mydu, mydv; - uMin = uMax = loop->tail()[0]; - vMin = vMax = loop->tail()[1]; - mydu = (du>0)? du: -du; - mydv = (dv>0)? dv: -dv; - - for(Arc_ptr jarc=loop->next; jarc != loop; jarc = jarc->next) - { - - if(jarc->tail()[0] < uMin) - uMin = jarc->tail()[0]; - if(jarc->tail()[0] > uMax) - uMax = jarc->tail()[0]; - if(jarc->tail()[1] < vMin) - vMin = jarc->tail()[1]; - if(jarc->tail()[1] > vMax) - vMax = jarc->tail()[1]; - } - - if (uMax == uMin) - return; // prevent divide-by-zero. Jon Perry. 17 June 2002 - - if(mydu > uMax - uMin) - num_ulines = 2; - else - { - num_ulines = 3 + (Int) ((uMax-uMin)/mydu); - } - if(mydv>=vMax-vMin) - num_vlines = 2; - else - { - num_vlines = 2+(Int)((vMax-vMin)/mydv); - } - - Int isRect = is_rect(loop); - - if(isRect && (num_ulines<=2 || num_vlines<=2)) - { - if(vlinear) - triangulateRect(loop, backend, 1, ulinear, vlinear); - else if(ulinear) - triangulateRect(loop, backend, -1, ulinear, vlinear); - else - triangulateRect(loop, backend, 0, ulinear, vlinear); - } - - else if(isRect) - { - triangulateRectGen(loop, num_ulines-2, num_vlines-2, backend); - } - else if( (num_ulines<=2 || num_vlines <=2) && ulinear) - { - monoTriangulationFunBackend(loop, compV2InY, &backend); - } - else if( (!ulinear) && (!vlinear) && (num_ulines == 2) && (num_vlines > 2)) - { - monoTriangulationFunBackend(loop, compV2InY, &backend); - } - else - { - directedLine* poly = arcLoopToDLineLoop(loop); - - gridWrap grid(num_ulines, num_vlines, uMin, uMax, vMin, vMax); - primStream pStream(20, 20); - rectBlockArray rbArray(20); - - sampleMonoPoly(poly, &grid, ulinear, vlinear, &pStream, &rbArray); - - evalStream(&pStream); - - evalRBArray(&rbArray, &grid); - -#ifdef COUNT_TRIANGLES - num_triangles += pStream.num_triangles(); - num_quads += rbArray.num_quads(); -#endif - poly->deleteSinglePolygonWithSline(); - } - -#ifdef COUNT_TRIANGLES - printf("num_triangles=%i\n", num_triangles); - printf("num_quads = %i\n", num_quads); -#endif -} - -void Slicer::slice(Arc_ptr loop) -{ -#ifdef USE_READ_FLAG - if(read_flag("flagFile")) - slice_new(loop); - else - slice_old(loop); - -#else - slice_new(loop); -#endif - -} - - - -Slicer::Slicer( Backend &b ) - : CoveAndTiler( b ), Mesher( b ), backend( b ) -{ - ulinear = 0; - vlinear = 0; -} - -Slicer::~Slicer() -{ -} - -void -Slicer::setisolines( int x ) -{ - isolines = x; -} - -void -Slicer::setstriptessellation( REAL x, REAL y ) -{ - assert(x > 0 && y > 0); - du = x; - dv = y; - setDu( du ); -} - -void -Slicer::slice_old( Arc_ptr loop ) -{ - loop->markverts(); - - Arc_ptr extrema[4]; - loop->getextrema( extrema ); - - unsigned int npts = loop->numpts(); - TrimRegion::init( npts, extrema[0] ); - - Mesher::init( npts ); - - long ulines = uarray.init( du, extrema[1], extrema[3] ); -//printf("ulines = %i\n", ulines); - Varray varray; - long vlines = varray.init( dv, extrema[0], extrema[2] ); -//printf("vlines = %i\n", vlines); - long botv = 0; - long topv; - TrimRegion::init( varray.varray[botv] ); - getGridExtent( &extrema[0]->pwlArc->pts[0], &extrema[0]->pwlArc->pts[0] ); - - for( long quad=0; quadmarkverts(); - - if( jarc->pwlArc->npts >= 2 ) { - backend.bgnoutline(); - for( int j = jarc->pwlArc->npts-1; j >= 0; j-- ) - backend.linevert( &(jarc->pwlArc->pts[j]) ); - backend.endoutline(); - } -} - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/slicer.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/slicer.h deleted file mode 100644 index 6027eaa1c0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/slicer.h +++ /dev/null @@ -1,90 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * slicer.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/slicer.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __gluslicer_h_ -#define __gluslicer_h_ - -#include "trimregion.h" -#include "mesher.h" -#include "coveandtiler.h" -#include "primitiveStream.h" -#include "rectBlock.h" - -class Backend; -class Arc; -class TrimVertex; - -class Slicer : public CoveAndTiler, public Mesher { -public: - Slicer( Backend & ); - ~Slicer( void ); - void slice( Arc_ptr ); - void slice_old( Arc_ptr); - void slice_new( Arc_ptr ); - void evalStream(primStream* ); - void evalRBArray(rectBlockArray* rbArray, gridWrap* grid); - - void outline( Arc_ptr ); - void setstriptessellation( REAL, REAL ); - void setisolines( int ); - - void set_ulinear(int ulinear_flag) - { - ulinear = ulinear_flag; - } - void set_vlinear(int vlinear_flag) - { - vlinear = vlinear_flag; - } -private: - Backend& backend; - REAL oneOverDu; - REAL du, dv; - int isolines; - - void outline( void ); - void initGridlines( void ); - void advanceGridlines( long ); - - int ulinear; //indicate whether uorder is 2 or not - int vlinear; //indicate whether vorder is 2 or not -}; -#endif /* __gluslicer_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/sorter.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/sorter.cc deleted file mode 100644 index 876b34bf7d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/sorter.cc +++ /dev/null @@ -1,141 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * sorter.c++ - * - * $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/sorter.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $ - */ - -#include "glimports.h" -#include "sorter.h" -#include "mystdio.h" - -Sorter::Sorter( int _es ) -{ - es = _es; -} - -void -Sorter::qsort( void *a, int n ) -{ - qs1( (char *)a, ((char *)a)+n*es); -} - -int -Sorter::qscmp( char *, char * ) -{ - dprintf( "Sorter::qscmp: pure virtual called\n" ); - return 0; -} - - -void -Sorter::qsexc( char *, char * ) -{ - dprintf( "Sorter::qsexc: pure virtual called\n" ); -} - - -void -Sorter::qstexc( char *, char *, char * ) -{ - dprintf( "Sorter::qstexc: pure virtual called\n" ); -} - -void -Sorter::qs1( char *a, char *l ) -{ - char *i, *j; - char *lp, *hp; - int c; - unsigned int n; - -start: - if((n=l-a) <= (unsigned int)es) - return; - n = es * (n / (2*es)); - hp = lp = a+n; - i = a; - j = l-es; - while(1) { - if(i < lp) { - if((c = qscmp(i, lp)) == 0) { - qsexc(i, lp -= es); - continue; - } - if(c < 0) { - i += es; - continue; - } - } - -loop: - if(j > hp) { - if((c = qscmp(hp, j)) == 0) { - qsexc(hp += es, j); - goto loop; - } - if(c > 0) { - if(i == lp) { - qstexc(i, hp += es, j); - i = lp += es; - goto loop; - } - qsexc(i, j); - j -= es; - i += es; - continue; - } - j -= es; - goto loop; - } - - if(i == lp) { - if(lp-a >= l-hp) { - qs1(hp+es, l); - l = lp; - } else { - qs1(a, lp); - a = hp+es; - } - goto start; - } - - qstexc(j, lp -= es, i); - j = hp -= es; - } -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/sorter.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/sorter.h deleted file mode 100644 index 4cfeb1192d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/sorter.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/sorter.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef __glusorter_h_ -#define __glusorter_h_ - -class Sorter { -public: - Sorter( int es ); - void qsort( void *a, int n ); - -protected: - virtual int qscmp( char *, char * ); - virtual void qsexc( char *i, char *j ); // i<-j, j<-i - virtual void qstexc( char *i, char *j, char *k ); // i<-k, k<-j, j<-i - -private: - void qs1( char *, char * ); - int es; -}; -#endif /* __glusorter_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/splitarcs.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/splitarcs.cc deleted file mode 100644 index d28f755af5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/splitarcs.cc +++ /dev/null @@ -1,295 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * splitarcs.c++ - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/splitarcs.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "mysetjmp.h" -#include "mystdio.h" -#include "subdivider.h" -#include "arcsorter.h" -#include "arc.h" -#include "bin.h" - -/* local preprocessor definitions */ -#define MAXARCS 10 - -/*---------------------------------------------------------------------------- - * Subdivider::split - split trim regions in source bin by line (param == value). - *---------------------------------------------------------------------------- - */ - -void -Subdivider::split( Bin& bin, Bin& left, Bin& right, int param, REAL value ) -{ - Bin intersections, unknown; - - partition( bin, left, intersections, right, unknown, param, value ); - - int count = intersections.numarcs(); - if( count % 2 ) { -#ifndef NDEBUG - left.show( "left" ); - intersections.show( "intersections" ); - right.show( "right" ); -#endif - ::mylongjmp( jumpbuffer, 29 ); - } - - Arc_ptr arclist[MAXARCS], *list; - if( count >= MAXARCS ) { - list = new Arc_ptr[count]; - } else { - list = arclist; - } - - Arc_ptr jarc, *last, *lptr; - for( last = list; (jarc=intersections.removearc()) != NULL; last++ ) - *last = jarc; - - if( param == 0 ) { /* sort into increasing t order */ - ArcSdirSorter sorter(*this); - sorter.qsort( list, count ); - - //::qsort ((void *)list, count, sizeof(Arc_ptr), (cmpfunc)compare_s); - for( lptr=list; lptrhead()[0] <= value) && ((*lptr)->tail()[0] <= value) ) - left.addarc( *lptr ); - else - right.addarc( *lptr ); - } - } else { /* sort into decreasing s order */ - ArcTdirSorter sorter(*this); - sorter.qsort( list, count ); - //::qsort ((void *)list, count, sizeof(Arc_ptr), (cmpfunc)compare_t); - for( lptr=list; lptrhead()[1] <= value) && ((*lptr)->tail()[1] <= value) ) - left.addarc( *lptr ); - else - right.addarc( *lptr ); - } - } - - if( list != arclist ) delete[] list; - unknown.adopt(); -} - - -void -Subdivider::check_s( Arc_ptr jarc1, Arc_ptr jarc2 ) -{ - assert( jarc1->check( ) != 0 ); - assert( jarc2->check( ) != 0 ); - assert( jarc1->next->check( ) != 0 ); - assert( jarc2->next->check( ) != 0 ); - assert( jarc1 != jarc2 ); - - /* XXX - if these assertions fail, it is due to user error or - undersampling */ - if( ! ( jarc1->tail()[0] < (jarc1)->head()[0] ) ) { -#ifndef NDEBUG - dprintf( "s difference %f\n", (jarc1)->tail()[0] - (jarc1)->head()[0] ); -#endif - ::mylongjmp( jumpbuffer, 28 ); - } - - if( ! ( jarc2->tail()[0] > (jarc2)->head()[0] ) ) { -#ifndef NDEBUG - dprintf( "s difference %f\n", (jarc2)->tail()[0] - (jarc2)->head()[0] ); -#endif - ::mylongjmp( jumpbuffer, 28 ); - } -} - -inline void -Subdivider::link( Arc_ptr jarc1, Arc_ptr jarc2, Arc_ptr up, Arc_ptr down ) -{ - up->nuid = down->nuid = 0; // XXX - - up->next = jarc2; - down->next = jarc1; - up->prev = jarc1->prev; - down->prev = jarc2->prev; - - down->next->prev = down; - up->next->prev = up; - down->prev->next = down; - up->prev->next = up; -} - -inline void -Subdivider::simple_link( Arc_ptr jarc1, Arc_ptr jarc2 ) -{ - Arc_ptr tmp = jarc2->prev; - jarc2->prev = jarc1->prev; - jarc1->prev = tmp; - jarc2->prev->next = jarc2; - jarc1->prev->next = jarc1; -} - - -/*---------------------------------------------------------------------------- - * join - add a pair of oppositely directed jordan arcs between two arcs - *---------------------------------------------------------------------------- - */ - -void -Subdivider::join_s( Bin& left, Bin& right, Arc_ptr jarc1, Arc_ptr jarc2 ) -{ - assert( jarc1->check( ) != 0); - assert( jarc2->check( ) != 0); - assert( jarc1 != jarc2 ); - - if( ! jarc1->getitail() ) - jarc1 = jarc1->next; - - if( ! jarc2->getitail() ) - jarc2 = jarc2->next; - - REAL s = jarc1->tail()[0]; - REAL t1 = jarc1->tail()[1]; - REAL t2 = jarc2->tail()[1]; - - if( t1 == t2 ) { - simple_link( jarc1, jarc2 ); - } else { - Arc_ptr newright = new(arcpool) Arc( arc_right, 0 ); - Arc_ptr newleft = new(arcpool) Arc( arc_left, 0 ); - assert( t1 < t2 ); - if( isBezierArcType() ) { - arctessellator.bezier( newright, s, s, t1, t2 ); - arctessellator.bezier( newleft, s, s, t2, t1 ); - } else { - arctessellator.pwl_right( newright, s, t1, t2, stepsizes[0] ); - arctessellator.pwl_left( newleft, s, t2, t1, stepsizes[2] ); - } - link( jarc1, jarc2, newright, newleft ); - left.addarc( newright ); - right.addarc( newleft ); - } - - assert( jarc1->check( ) != 0 ); - assert( jarc2->check( ) != 0 ); - assert( jarc1->next->check( ) != 0); - assert( jarc2->next->check( ) != 0); -} - -void -Subdivider::check_t( Arc_ptr jarc1, Arc_ptr jarc2 ) -{ - assert( jarc1->check( ) != 0 ); - assert( jarc2->check( ) != 0 ); - assert( jarc1->next->check( ) != 0 ); - assert( jarc2->next->check( ) != 0 ); - assert( jarc1 != jarc2 ); - - /* XXX - if these assertions fail, it is due to user error or - undersampling */ - if( ! ( jarc1->tail()[1] < (jarc1)->head()[1] ) ) { -#ifndef NDEBUG - dprintf( "t difference %f\n", jarc1->tail()[1] - (jarc1)->head()[1] ); -#endif - ::mylongjmp( jumpbuffer, 28 ); - } - - if( ! ( jarc2->tail()[1] > (jarc2)->head()[1] ) ) { -#ifndef NDEBUG - dprintf( "t difference %f\n", jarc2->tail()[1] - (jarc2)->head()[1] ); -#endif - ::mylongjmp( jumpbuffer, 28 ); - } -} - -/*---------------------------------------------------------------------------- - * join_t - add a pair of oppositely directed jordan arcs between two arcs - *---------------------------------------------------------------------------- - */ - -void -Subdivider::join_t( Bin& bottom, Bin& top, Arc_ptr jarc1, Arc_ptr jarc2 ) -{ - assert( jarc1->check( ) != 0 ); - assert( jarc2->check( ) != 0 ); - assert( jarc1->next->check( ) != 0 ); - assert( jarc2->next->check( ) != 0 ); - assert( jarc1 != jarc2 ); - - if( ! jarc1->getitail() ) - jarc1 = jarc1->next; - - if( ! jarc2->getitail() ) - jarc2 = jarc2->next; - - REAL s1 = jarc1->tail()[0]; - REAL s2 = jarc2->tail()[0]; - REAL t = jarc1->tail()[1]; - - if( s1 == s2 ) { - simple_link( jarc1, jarc2 ); - } else { - Arc_ptr newtop = new(arcpool) Arc( arc_top, 0 ); - Arc_ptr newbot = new(arcpool) Arc( arc_bottom, 0 ); - assert( s1 > s2 ); - if( isBezierArcType() ) { - arctessellator.bezier( newtop, s1, s2, t, t ); - arctessellator.bezier( newbot, s2, s1, t, t ); - } else { - arctessellator.pwl_top( newtop, t, s1, s2, stepsizes[1] ); - arctessellator.pwl_bottom( newbot, t, s2, s1, stepsizes[3] ); - } - link( jarc1, jarc2, newtop, newbot ); - bottom.addarc( newtop ); - top.addarc( newbot ); - } - - assert( jarc1->check( ) != 0 ); - assert( jarc2->check( ) != 0 ); - assert( jarc1->next->check( ) != 0 ); - assert( jarc2->next->check( ) != 0 ); -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/subdivider.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/subdivider.cc deleted file mode 100644 index cc0b514706..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/subdivider.cc +++ /dev/null @@ -1,910 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * subdivider.cxx - * - */ - -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "subdivider.h" -#include "arc.h" -#include "bezierarc.h" -#include "bin.h" -#include "renderhints.h" -#include "backend.h" -#include "mapdesc.h" -#include "quilt.h" -#include "patchlist.h" -#include "patch.h" -#include "nurbsconsts.h" -#include "trimvertpool.h" -#include "simplemath.h" - -#include "polyUtil.h" //for function area() - -//#define PARTITION_TEST -#ifdef PARTITION_TEST -#include "partitionY.h" -#include "monoTriangulation.h" -#include "dataTransform.h" -#include "monoChain.h" - -#endif - - -#define OPTIMIZE_UNTRIMED_CASE - - -Bin* -Subdivider::makePatchBoundary( const REAL *from, const REAL *to ) -{ - Bin* ret = new Bin(); - REAL smin = from[0]; - REAL smax = to[0]; - REAL tmin = from[1]; - REAL tmax = to[1]; - - pjarc = 0; - - Arc_ptr jarc = new(arcpool) Arc( arc_bottom, 0 ); - arctessellator.bezier( jarc, smin, smax, tmin, tmin ); - ret->addarc( jarc ); - pjarc = jarc->append( pjarc ); - - jarc = new(arcpool) Arc( arc_right, 0 ); - arctessellator.bezier( jarc, smax, smax, tmin, tmax ); - ret->addarc( jarc ); - pjarc = jarc->append( pjarc ); - - jarc = new(arcpool) Arc( arc_top, 0 ); - arctessellator.bezier( jarc, smax, smin, tmax, tmax ); - ret->addarc( jarc ); - pjarc = jarc->append( pjarc ); - - jarc = new(arcpool) Arc( arc_left, 0 ); - arctessellator.bezier( jarc, smin, smin, tmax, tmin ); - ret->addarc( jarc ); - jarc->append( pjarc ); - - assert( jarc->check() != 0 ); - return ret; -} - -/*--------------------------------------------------------------------------- - * Subdivider - construct a subdivider - *--------------------------------------------------------------------------- - */ - -Subdivider::Subdivider( Renderhints& r, Backend& b ) - : slicer( b ), - arctessellator( trimvertexpool, pwlarcpool ), - arcpool( sizeof( Arc), 1, "arcpool" ), - bezierarcpool( sizeof( BezierArc ), 1, "Bezarcpool" ), - pwlarcpool( sizeof( PwlArc ), 1, "Pwlarcpool" ), - renderhints( r ), - backend( b ) -{ -} - -void -Subdivider::setJumpbuffer( JumpBuffer *j ) -{ - jumpbuffer = j; -} - -/*--------------------------------------------------------------------------- - * clear - reset all state after possible error condition - *--------------------------------------------------------------------------- - */ - -void -Subdivider::clear( void ) -{ - trimvertexpool.clear(); - arcpool.clear(); - pwlarcpool.clear(); - bezierarcpool.clear(); -} - -/*--------------------------------------------------------------------------- - * ~Subdivider - destroy a subdivider - *--------------------------------------------------------------------------- - */ - -Subdivider::~Subdivider( void ) -{ -} - -/*--------------------------------------------------------------------------- - * addArc - add a bezier arc to a trim loop and to a bin - *--------------------------------------------------------------------------- - */ -void -Subdivider::addArc( REAL *cpts, Quilt *quilt, long _nuid ) -{ - BezierArc *bezierArc = new(bezierarcpool) BezierArc; - Arc *jarc = new(arcpool) Arc( arc_none, _nuid ); - jarc->pwlArc = 0; - jarc->bezierArc = bezierArc; - bezierArc->order = quilt->qspec->order; - bezierArc->stride = quilt->qspec->stride; - bezierArc->mapdesc = quilt->mapdesc; - bezierArc->cpts = cpts; - initialbin.addarc( jarc ); - pjarc = jarc->append( pjarc ); -} - -/*--------------------------------------------------------------------------- - * addArc - add a pwl arc to a trim loop and to a bin - *--------------------------------------------------------------------------- - */ - -void -Subdivider::addArc( int npts, TrimVertex *pts, long _nuid ) -{ - Arc *jarc = new(arcpool) Arc( arc_none, _nuid ); - jarc->pwlArc = new(pwlarcpool) PwlArc( npts, pts ); - initialbin.addarc( jarc ); - pjarc = jarc->append( pjarc ); -} - -void -Subdivider::beginQuilts( void ) -{ - qlist = 0; -} - -void -Subdivider::addQuilt( Quilt *quilt ) -{ - quilt->next = qlist; - qlist = quilt; -} - -/*--------------------------------------------------------------------------- - * drawSurfaces - main entry point for surface tessellation - *--------------------------------------------------------------------------- - */ - -void -Subdivider::drawSurfaces( long nuid ) -{ - renderhints.init( ); - - if (qlist == NULL) - { - //initialbin could be nonempty due to some errors - freejarcs(initialbin); - return; - } - - for( Quilt *q = qlist; q; q = q->next ) { - if( q->isCulled( ) == CULL_TRIVIAL_REJECT ) { - freejarcs( initialbin ); - return; - } - } - - - REAL from[2], to[2]; - qlist->getRange( from, to, spbrkpts, tpbrkpts ); -#ifdef OPTIMIZE_UNTRIMED_CASE - //perform optimization only when the samplng method is - //DOMAIN_DISTANCE and the display methdo is either - //fill or outline_polygon. - int optimize = (is_domain_distance_sampling && (renderhints.display_method != N_OUTLINE_PATCH)); -#endif - - if( ! initialbin.isnonempty() ) { -#ifdef OPTIMIZE_UNTRIMED_CASE - if(! optimize ) - { - - makeBorderTrim( from, to ); - } -#else - makeBorderTrim( from, to ); -#endif - } else { - REAL rate[2]; - qlist->findRates( spbrkpts, tpbrkpts, rate ); - - if( decompose( initialbin, min(rate[0], rate[1]) ) ) - mylongjmp( jumpbuffer, 31 ); - } - - backend.bgnsurf( renderhints.wiretris, renderhints.wirequads, nuid ); - -#ifdef PARTITION_TEST - if( initialbin.isnonempty() && spbrkpts.end-2 == spbrkpts.start && - tpbrkpts.end-2 == tpbrkpts.start) -{ - for(int i=spbrkpts.start; idownloadAll(pta, ptb, backend); - - directedLine *poly; - - { - - poly = bin_to_DLineLoops(initialbin); - - poly=poly->deleteDegenerateLinesAllPolygons(); - - sampledLine* retSampledLines; -//printf("before MC_partition\n"); - poly = MC_partitionY(poly, &retSampledLines); -//printf("after MC_partition\n"); - - } - - - { - primStream pStream(5000,5000); - directedLine* temp; - - for(temp=poly; temp != NULL; temp=temp->getNextPolygon()) - - monoTriangulation(temp, &pStream); - - slicer.evalStream(&pStream); - - } - //need to clean up space - } - } - freejarcs( initialbin ); - backend.endsurf(); - return; - - /* - printf("num_polygons=%i\n", poly->numPolygons()); - printf("num_edges=%i\n", poly->numEdgesAllPolygons()); - poly->writeAllPolygons("zloutputFile"); - return; - { - primStream pStream(20,20); - for(directedLine* tempD = poly; tempD != NULL; tempD = tempD->getNextPolygon()) - monoTriangulation(tempD, &pStream); - } - return; - */ -} -#endif //PARTITION_TEST - - -#ifdef OPTIMIZE_UNTRIMED_CASE - if( (!initialbin.isnonempty()) && optimize ) - { - int i,j; - int num_u_steps; - int num_v_steps; - for(i=spbrkpts.start; idownloadAll(pta, ptb, backend); - - num_u_steps = (int) (domain_distance_u_rate * (ptb[0]-pta[0])); - num_v_steps = (int) (domain_distance_v_rate * (ptb[1]-pta[1])); - - if(num_u_steps <= 0) num_u_steps = 1; - if(num_v_steps <= 0) num_v_steps = 1; - - backend.surfgrid(pta[0], ptb[0], num_u_steps, - ptb[1], pta[1], num_v_steps); - backend.surfmesh(0,0,num_u_steps,num_v_steps); - - - - continue; - /* the following is left for reference purpose, don't delete - { - Bin* tempSource; - Patchlist patchlist(qlist, pta, ptb); - patchlist.getstepsize(); - - tempSource=makePatchBoundary(pta, ptb); - - tessellation(*tempSource, patchlist); - - render(*tempSource); - delete tempSource; - } - */ - } - } - } - else - subdivideInS( initialbin ); -#else - - subdivideInS( initialbin ); -#endif - - backend.endsurf(); - -} - -void -Subdivider::subdivideInS( Bin& source ) -{ - if( renderhints.display_method == N_OUTLINE_PARAM ) { - outline( source ); - freejarcs( source ); - } else { - setArcTypeBezier(); - setNonDegenerate(); - splitInS( source, spbrkpts.start, spbrkpts.end ); - } -} - - -/*--------------------------------------------------------------------------- - * splitInS - split a patch and a bin by an isoparametric line - *--------------------------------------------------------------------------- - */ - -void -Subdivider::splitInS( Bin& source, int start, int end ) -{ - if( source.isnonempty() ) { - if( start != end ) { - int i = start + (end - start) / 2; - Bin left, right; - split( source, left, right, 0, spbrkpts.pts[i] ); - splitInS( left, start, i ); - splitInS( right, i+1, end ); - } else { - if( start == spbrkpts.start || start == spbrkpts.end ) { - freejarcs( source ); - } else if( renderhints.display_method == N_OUTLINE_PARAM_S ) { - outline( source ); - freejarcs( source ); - } else { - setArcTypeBezier(); - setNonDegenerate(); - s_index = start; - splitInT( source, tpbrkpts.start, tpbrkpts.end ); - } - } - } -} - -/*--------------------------------------------------------------------------- - * splitInT - split a patch and a bin by an isoparametric line - *--------------------------------------------------------------------------- - */ - -void -Subdivider::splitInT( Bin& source, int start, int end ) -{ - if( source.isnonempty() ) { - if( start != end ) { - int i = start + (end - start) / 2; - Bin left, right; - split( source, left, right, 1, tpbrkpts.pts[i] ); - splitInT( left, start, i ); - splitInT( right, i+1, end ); - } else { - if( start == tpbrkpts.start || start == tpbrkpts.end ) { - freejarcs( source ); - } else if( renderhints.display_method == N_OUTLINE_PARAM_ST ) { - outline( source ); - freejarcs( source ); - } else { - t_index = start; - setArcTypeBezier(); - setDegenerate(); - - REAL pta[2], ptb[2]; - pta[0] = spbrkpts.pts[s_index-1]; - pta[1] = tpbrkpts.pts[t_index-1]; - - ptb[0] = spbrkpts.pts[s_index]; - ptb[1] = tpbrkpts.pts[t_index]; - qlist->downloadAll( pta, ptb, backend ); - - Patchlist patchlist( qlist, pta, ptb ); -/* -printf("-------samplingSplit-----\n"); -source.show("samplingSplit source"); -*/ - samplingSplit( source, patchlist, renderhints.maxsubdivisions, 0 ); - setNonDegenerate(); - setArcTypeBezier(); - } - } - } -} - -/*-------------------------------------------------------------------------- - * samplingSplit - recursively subdivide patch, cull check each subpatch - *-------------------------------------------------------------------------- - */ - -void -Subdivider::samplingSplit( - Bin& source, - Patchlist& patchlist, - int subdivisions, - int param ) -{ - if( ! source.isnonempty() ) return; - - if( patchlist.cullCheck() == CULL_TRIVIAL_REJECT ) { - freejarcs( source ); - return; - } - - patchlist.getstepsize(); - - if( renderhints.display_method == N_OUTLINE_PATCH ) { - tessellation( source, patchlist ); - outline( source ); - freejarcs( source ); - return; - } - - //patchlist.clamp(); - - tessellation( source, patchlist ); - - if( patchlist.needsSamplingSubdivision() && (subdivisions > 0) ) { - if( ! patchlist.needsSubdivision( 0 ) ) - param = 1; - else if( ! patchlist.needsSubdivision( 1 ) ) - param = 0; - else - param = 1 - param; - - Bin left, right; - REAL mid = ( patchlist.pspec[param].range[0] + - patchlist.pspec[param].range[1] ) * 0.5; - split( source, left, right, param, mid ); - Patchlist subpatchlist( patchlist, param, mid ); - samplingSplit( left, subpatchlist, subdivisions-1, param ); - samplingSplit( right, patchlist, subdivisions-1, param ); - } else { - setArcTypePwl(); - setDegenerate(); - nonSamplingSplit( source, patchlist, subdivisions, param ); - setDegenerate(); - setArcTypeBezier(); - } -} - -void -Subdivider::nonSamplingSplit( - Bin& source, - Patchlist& patchlist, - int subdivisions, - int param ) -{ - if( patchlist.needsNonSamplingSubdivision() && (subdivisions > 0) ) { - param = 1 - param; - - Bin left, right; - REAL mid = ( patchlist.pspec[param].range[0] + - patchlist.pspec[param].range[1] ) * 0.5; - split( source, left, right, param, mid ); - Patchlist subpatchlist( patchlist, param, mid ); - if( left.isnonempty() ) - if( subpatchlist.cullCheck() == CULL_TRIVIAL_REJECT ) - freejarcs( left ); - else - nonSamplingSplit( left, subpatchlist, subdivisions-1, param ); - if( right.isnonempty() ) - if( patchlist.cullCheck() == CULL_TRIVIAL_REJECT ) - freejarcs( right ); - else - nonSamplingSplit( right, patchlist, subdivisions-1, param ); - - } else { - // make bbox calls - patchlist.bbox(); - backend.patch( patchlist.pspec[0].range[0], patchlist.pspec[0].range[1], - patchlist.pspec[1].range[0], patchlist.pspec[1].range[1] ); - - if( renderhints.display_method == N_OUTLINE_SUBDIV ) { - outline( source ); - freejarcs( source ); - } else { - setArcTypePwl(); - setDegenerate(); - findIrregularS( source ); - monosplitInS( source, smbrkpts.start, smbrkpts.end ); - } - } -} - -/*-------------------------------------------------------------------------- - * tessellation - set tessellation of interior and boundary of patch - *-------------------------------------------------------------------------- - */ - -void -Subdivider::tessellation( Bin& bin, Patchlist &patchlist ) -{ - // tessellate unsampled trim curves - tessellate( bin, patchlist.pspec[1].sidestep[1], patchlist.pspec[0].sidestep[1], - patchlist.pspec[1].sidestep[0], patchlist.pspec[0].sidestep[0] ); - - // set interior sampling rates - slicer.setstriptessellation( patchlist.pspec[0].stepsize, patchlist.pspec[1].stepsize ); - - //added by zl: set the order which will be used in slicer.c++ - slicer.set_ulinear( (patchlist.get_uorder() == 2)); - slicer.set_vlinear( (patchlist.get_vorder() == 2)); - - // set boundary sampling rates - stepsizes[0] = patchlist.pspec[1].stepsize; - stepsizes[1] = patchlist.pspec[0].stepsize; - stepsizes[2] = patchlist.pspec[1].stepsize; - stepsizes[3] = patchlist.pspec[0].stepsize; -} - -/*--------------------------------------------------------------------------- - * monosplitInS - split a patch and a bin by an isoparametric line - *--------------------------------------------------------------------------- - */ - -void -Subdivider::monosplitInS( Bin& source, int start, int end ) -{ - if( source.isnonempty() ) { - if( start != end ) { - int i = start + (end - start) / 2; - Bin left, right; - split( source, left, right, 0, smbrkpts.pts[i] ); - monosplitInS( left, start, i ); - monosplitInS( right, i+1, end ); - } else { - if( renderhints.display_method == N_OUTLINE_SUBDIV_S ) { - outline( source ); - freejarcs( source ); - } else { - setArcTypePwl(); - setDegenerate(); - findIrregularT( source ); - monosplitInT( source, tmbrkpts.start, tmbrkpts.end ); - } - } - } -} - -/*--------------------------------------------------------------------------- - * monosplitInT - split a patch and a bin by an isoparametric line - *--------------------------------------------------------------------------- - */ - -void -Subdivider::monosplitInT( Bin& source, int start, int end ) -{ - if( source.isnonempty() ) { - if( start != end ) { - int i = start + (end - start) / 2; - Bin left, right; - split( source, left, right, 1, tmbrkpts.pts[i] ); - monosplitInT( left, start, i ); - monosplitInT( right, i+1, end ); - } else { - if( renderhints.display_method == N_OUTLINE_SUBDIV_ST ) { - outline( source ); - freejarcs( source ); - } else { -/* -printf("*******render\n"); -source.show("source\n"); -*/ - render( source ); - freejarcs( source ); - } - } - } -} - - -/*---------------------------------------------------------------------------- - * findIrregularS - determine points of non-monotonicity is s direction - *---------------------------------------------------------------------------- - */ - -void -Subdivider::findIrregularS( Bin& bin ) -{ - assert( bin.firstarc()->check() != 0 ); - - smbrkpts.grow( bin.numarcs() ); - - for( Arc_ptr jarc=bin.firstarc(); jarc; jarc=bin.nextarc() ) { - REAL *a = jarc->prev->tail(); - REAL *b = jarc->tail(); - REAL *c = jarc->head(); - - if( b[1] == a[1] && b[1] == c[1] ) continue; - - //corrected code - if((b[1]<=a[1] && b[1] <= c[1]) || - (b[1]>=a[1] && b[1] >= c[1])) - { - //each arc (jarc, jarc->prev, jarc->next) is a - //monotone arc consisting of multiple line segements. - //it may happen that jarc->prev and jarc->next are the same, - //that is, jarc->prev and jarc form a closed loop. - //In such case, a and c will be the same. - if(a[0]==c[0] && a[1] == c[1]) - { - if(jarc->pwlArc->npts >2) - { - c = jarc->pwlArc->pts[jarc->pwlArc->npts-2].param; - } - else - { - assert(jarc->prev->pwlArc->npts>2); - a = jarc->prev->pwlArc->pts[jarc->prev->pwlArc->npts-2].param; - } - - } - if(area(a,b,c) < 0) - { - smbrkpts.add(b[0]); - } - - } - - /* old code, - if( b[1] <= a[1] && b[1] <= c[1] ) { - if( ! ccwTurn_tr( jarc->prev, jarc ) ) - smbrkpts.add( b[0] ); - } else if( b[1] >= a[1] && b[1] >= c[1] ) { - if( ! ccwTurn_tl( jarc->prev, jarc ) ) - smbrkpts.add( b[0] ); - } - */ - - } - - smbrkpts.filter(); -} - -/*---------------------------------------------------------------------------- - * findIrregularT - determine points of non-monotonicity in t direction - * where one arc is parallel to the s axis. - *---------------------------------------------------------------------------- - */ - -void -Subdivider::findIrregularT( Bin& bin ) -{ - assert( bin.firstarc()->check() != 0 ); - - tmbrkpts.grow( bin.numarcs() ); - - for( Arc_ptr jarc=bin.firstarc(); jarc; jarc=bin.nextarc() ) { - REAL *a = jarc->prev->tail(); - REAL *b = jarc->tail(); - REAL *c = jarc->head(); - - if( b[0] == a[0] && b[0] == c[0] ) continue; - - if( b[0] <= a[0] && b[0] <= c[0] ) { - if( a[1] != b[1] && b[1] != c[1] ) continue; - if( ! ccwTurn_sr( jarc->prev, jarc ) ) - tmbrkpts.add( b[1] ); - } else if ( b[0] >= a[0] && b[0] >= c[0] ) { - if( a[1] != b[1] && b[1] != c[1] ) continue; - if( ! ccwTurn_sl( jarc->prev, jarc ) ) - tmbrkpts.add( b[1] ); - } - } - tmbrkpts.filter( ); -} - -/*----------------------------------------------------------------------------- - * makeBorderTrim - if no user input trimming data then create - * a trimming curve around the boundaries of the Quilt. The curve consists of - * four Jordan arcs, one for each side of the Quilt, connected, of course, - * head to tail. - *----------------------------------------------------------------------------- - */ - -void -Subdivider::makeBorderTrim( const REAL *from, const REAL *to ) -{ - REAL smin = from[0]; - REAL smax = to[0]; - REAL tmin = from[1]; - REAL tmax = to[1]; - - pjarc = 0; - - Arc_ptr jarc = new(arcpool) Arc( arc_bottom, 0 ); - arctessellator.bezier( jarc, smin, smax, tmin, tmin ); - initialbin.addarc( jarc ); - pjarc = jarc->append( pjarc ); - - jarc = new(arcpool) Arc( arc_right, 0 ); - arctessellator.bezier( jarc, smax, smax, tmin, tmax ); - initialbin.addarc( jarc ); - pjarc = jarc->append( pjarc ); - - jarc = new(arcpool) Arc( arc_top, 0 ); - arctessellator.bezier( jarc, smax, smin, tmax, tmax ); - initialbin.addarc( jarc ); - pjarc = jarc->append( pjarc ); - - jarc = new(arcpool) Arc( arc_left, 0 ); - arctessellator.bezier( jarc, smin, smin, tmax, tmin ); - initialbin.addarc( jarc ); - jarc->append( pjarc ); - - assert( jarc->check() != 0 ); -} - -/*---------------------------------------------------------------------------- - * render - renders all monotone regions in a bin and frees the bin - *---------------------------------------------------------------------------- - */ - -void -Subdivider::render( Bin& bin ) -{ - bin.markall(); - -#ifdef N_ISOLINE_S - slicer.setisolines( ( renderhints.display_method == N_ISOLINE_S ) ? 1 : 0 ); -#else - slicer.setisolines( 0 ); -#endif - - for( Arc_ptr jarc=bin.firstarc(); jarc; jarc=bin.nextarc() ) { - if( jarc->ismarked() ) { - assert( jarc->check( ) != 0 ); - Arc_ptr jarchead = jarc; - do { - jarc->clearmark(); - jarc = jarc->next; - } while (jarc != jarchead); - slicer.slice( jarc ); - } - } -} - -/*--------------------------------------------------------------------------- - * outline - render the trimmed patch by outlining the boundary - *--------------------------------------------------------------------------- - */ - -void -Subdivider::outline( Bin& bin ) -{ - bin.markall(); - for( Arc_ptr jarc=bin.firstarc(); jarc; jarc=bin.nextarc() ) { - if( jarc->ismarked() ) { - assert( jarc->check( ) != 0 ); - Arc_ptr jarchead = jarc; - do { - slicer.outline( jarc ); - jarc->clearmark(); - jarc = jarc->prev; - } while (jarc != jarchead); - } - } -} - -/*--------------------------------------------------------------------------- - * freejarcs - free all arcs in a bin - *--------------------------------------------------------------------------- - */ - -void -Subdivider::freejarcs( Bin& bin ) -{ - bin.adopt(); /* XXX - should not be necessary */ - - Arc_ptr jarc; - while( (jarc = bin.removearc()) != NULL ) { - if( jarc->pwlArc ) jarc->pwlArc->deleteMe( pwlarcpool ); jarc->pwlArc = 0; - if( jarc->bezierArc) jarc->bezierArc->deleteMe( bezierarcpool ); jarc->bezierArc = 0; - jarc->deleteMe( arcpool ); - } -} - -/*---------------------------------------------------------------------------- - * tessellate - tessellate all Bezier arcs in a bin - * 1) only accepts linear Bezier arcs as input - * 2) the Bezier arcs are stored in the pwlArc structure - * 3) only vertical or horizontal lines work - * -- should - * 1) represent Bezier arcs in BezierArc structure - * (this requires a multitude of changes to the code) - * 2) accept high degree Bezier arcs (hard) - * 3) map the curve onto the surface to determine tessellation - * 4) work for curves of arbitrary geometry - *---------------------------------------------------------------------------- - */ - - -void -Subdivider::tessellate( Bin& bin, REAL rrate, REAL trate, REAL lrate, REAL brate ) -{ - for( Arc_ptr jarc=bin.firstarc(); jarc; jarc=bin.nextarc() ) { - if( jarc->isbezier( ) ) { - assert( jarc->pwlArc->npts == 2 ); - TrimVertex *pts = jarc->pwlArc->pts; - REAL s1 = pts[0].param[0]; - REAL t1 = pts[0].param[1]; - REAL s2 = pts[1].param[0]; - REAL t2 = pts[1].param[1]; - - jarc->pwlArc->deleteMe( pwlarcpool ); jarc->pwlArc = 0; - - switch( jarc->getside() ) { - case arc_left: - assert( s1 == s2 ); - arctessellator.pwl_left( jarc, s1, t1, t2, lrate ); - break; - case arc_right: - assert( s1 == s2 ); - arctessellator.pwl_right( jarc, s1, t1, t2, rrate ); - break; - case arc_top: - assert( t1 == t2 ); - arctessellator.pwl_top( jarc, t1, s1, s2, trate ); - break; - case arc_bottom: - assert( t1 == t2 ); - arctessellator.pwl_bottom( jarc, t1, s1, s2, brate ); - break; - case arc_none: - (void) abort(); - break; - } - assert( ! jarc->isbezier() ); - assert( jarc->check() != 0 ); - } - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/subdivider.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/subdivider.h deleted file mode 100644 index 48aff36b44..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/subdivider.h +++ /dev/null @@ -1,206 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * subdivider.h - * - * $Date: 2001/08/07 17:34:11 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/subdivider.h,v 1.2 2001/08/07 17:34:11 brianp Exp $ - */ - -#ifndef __glusubdivider_h_ -#define __glusubdivider_h_ - -#include "mysetjmp.h" -#include "bin.h" -#include "flist.h" -#include "slicer.h" -#include "arctess.h" -#include "trimvertex.h" -#include "trimvertpool.h" - -class Arc; -class Pool; -class Renderhints; -class Quilt; -class Patchlist; -class Curvelist; -struct JumpBuffer; - -class Subdivider { -public: - Subdivider( Renderhints&, Backend& ); - ~Subdivider( void ); - void clear( void ); - - void beginTrims( void ) {} - void beginLoop( void ); - void addArc( REAL *, Quilt *, long ); - void addArc( int, TrimVertex *, long ); - void endLoop( void ) {} - void endTrims( void ) {} - - void beginQuilts( void ); - void addQuilt( Quilt * ); - void endQuilts( void ) {} - - void drawCurves( void ); - void drawSurfaces( long ); - - int ccwTurn_sl( Arc_ptr, Arc_ptr ); - int ccwTurn_sr( Arc_ptr , Arc_ptr ); - int ccwTurn_tl( Arc_ptr , Arc_ptr ); - int ccwTurn_tr( Arc_ptr , Arc_ptr ); - - void setJumpbuffer( JumpBuffer * ); - - void set_domain_distance_u_rate(REAL u_rate) - { - domain_distance_u_rate = u_rate; - } - void set_domain_distance_v_rate(REAL v_rate) - { - domain_distance_v_rate = v_rate; - } - void set_is_domain_distance_sampling(int flag) - { - is_domain_distance_sampling = flag; - } - -private: - void classify_headonleft_s( Bin &, Bin &, Bin &, REAL ); - void classify_tailonleft_s( Bin &, Bin &, Bin &, REAL ); - void classify_headonright_s( Bin &, Bin &, Bin &, REAL ); - void classify_tailonright_s( Bin &, Bin &, Bin &, REAL ); - void classify_headonleft_t( Bin &, Bin &, Bin &, REAL ); - void classify_tailonleft_t( Bin &, Bin &, Bin &, REAL ); - void classify_headonright_t( Bin &, Bin &, Bin &, REAL ); - void classify_tailonright_t( Bin &, Bin &, Bin &, REAL ); - - enum dir { down, same, up, none }; - void tessellate( Arc_ptr, REAL ); - void monotonize( Arc_ptr , Bin & ); - int isMonotone( Arc_ptr ); - int decompose( Bin &, REAL ); - - - Slicer slicer; - ArcTessellator arctessellator; - Pool arcpool; - Pool bezierarcpool; - Pool pwlarcpool; - TrimVertexPool trimvertexpool; - - JumpBuffer* jumpbuffer; - Renderhints& renderhints; - Backend& backend; - - Bin initialbin; - Arc_ptr pjarc; - int s_index; - int t_index; - Quilt * qlist; - Flist spbrkpts; - Flist tpbrkpts; - Flist smbrkpts; - Flist tmbrkpts; - REAL stepsizes[4]; - int showDegenerate; - int isArcTypeBezier; - - void samplingSplit( Curvelist&, int ); - - void subdivideInS( Bin& ); - void splitInS( Bin&, int, int ); - void splitInT( Bin&, int, int ); - void samplingSplit( Bin&, Patchlist&, int, int ); - void nonSamplingSplit( Bin&, Patchlist&, int, int ); - void tessellation( Bin&, Patchlist& ); - void monosplitInS( Bin&, int, int ); - void monosplitInT( Bin&, int, int ); - - void outline( Bin & ); - void freejarcs( Bin & ); - void render( Bin & ); - void split( Bin &, Bin &, Bin &, int, REAL ); - void tessellate( Bin &, REAL, REAL, REAL, REAL ); - - inline void setDegenerate( void ) { showDegenerate = 1; } - inline void setNonDegenerate( void ) { showDegenerate = 0; } - inline int showingDegenerate( void ) { return showDegenerate; } - inline void setArcTypeBezier( void ) { isArcTypeBezier = 1; } - inline void setArcTypePwl( void ) { isArcTypeBezier = 0; } - inline int isBezierArcType( void ) { return isArcTypeBezier; } - - void makeBorderTrim( const REAL *, const REAL * ); - void split( Bin &, int, const REAL *, int, int ); - void partition( Bin &, Bin &, Bin &, Bin &, Bin &, int, REAL ); - void findIrregularS( Bin & ); - void findIrregularT( Bin & ); - - - inline int bbox( TrimVertex *, TrimVertex *, TrimVertex *, int ); - static int bbox( REAL, REAL, REAL, REAL, REAL, REAL ); - static int ccw( TrimVertex *, TrimVertex *, TrimVertex * ); - void join_s( Bin &, Bin &, Arc_ptr, Arc_ptr ); - void join_t( Bin &, Bin &, Arc_ptr , Arc_ptr ); - int arc_split( Arc_ptr , int, REAL, int ); - void check_s( Arc_ptr , Arc_ptr ); - void check_t( Arc_ptr , Arc_ptr ); - inline void link( Arc_ptr , Arc_ptr , Arc_ptr , Arc_ptr ); - inline void simple_link( Arc_ptr , Arc_ptr ); - - Bin* makePatchBoundary( const REAL *from, const REAL *to ); - - /*in domain distance method, the tessellation is controled by two numbers: - *GLU_U_STEP: number of u-segments per unit u length of domain - *GLU_V_STEP: number of v-segments per unit v length of domain - *These two numbers are normally stored in mapdesc->maxs(t)rate. - *I (ZL) put these two numbers here so that I can optimize the untrimmed - *case in the case of domain distance sampling. - *These two numbers are set by set_domain_distance_u_rate() and ..._v_..(). - */ - REAL domain_distance_u_rate; - REAL domain_distance_v_rate; - int is_domain_distance_sampling; -}; - -inline void -Subdivider::beginLoop( void ) -{ - pjarc = 0; -} - - -#endif /* __glusubdivider_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/tobezier.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/tobezier.cc deleted file mode 100644 index 4f1c02df59..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/tobezier.cc +++ /dev/null @@ -1,689 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * tobezier.c++ - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/tobezier.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "mystring.h" -#include "quilt.h" -#include "knotvector.h" - -/* local type definitions */ -struct Breakpt { /* breakpoints */ - Knot value; /* value */ - int multi; /* multiplicity */ - int def; /* deficit */ -}; - -struct Knotspec { /* knotvector format */ - long order; /* order of spline */ - Knot_ptr inkbegin; /* input knot sequence */ - Knot_ptr inkend; /* location after last knot */ - Knot_ptr outkbegin; /* in-process knot subsequence */ - Knot_ptr outkend; /* location after last knot */ - Knot_ptr kleft; /* */ - Knot_ptr kright; /* */ - Knot_ptr kfirst; /* */ - Knot_ptr klast; /* */ - Knot_ptr sbegin; /* conversion factor values */ - Breakpt * bbegin; /* in-process breakpoints */ - Breakpt * bend; /* last breakpoint */ - int ncoords; /* coordinates per control point */ - int prestride; /* stride between input points */ - int poststride; /* stride between output points */ - int preoffset; /* scaled point offset */ - int postoffset; /* scaled point offset */ - int prewidth; /* width of dimension */ - int postwidth; /* width of dimension */ - int istransformed; /* was dimension transformed */ - Knotspec * next; /* next knotspec */ - Knotspec * kspectotrans; /* knotspec in transformation direction */ - - Knotspec( void ); - ~Knotspec( void ); - void factors( void ); - void insert( REAL * ); - void preselect(); - void select( void ); - void copy( INREAL *, REAL * ); - void breakpoints( void ); - void knots( void ); - void transform( REAL * ); - void showpts( REAL * ); - - void pt_io_copy( REAL *, INREAL * ); - void pt_oo_copy( REAL *, REAL * ); - void pt_oo_sum( REAL*, REAL*, REAL*, Knot, Knot ); -}; - -struct Splinespec { /* a non-uniform tensor element */ - Splinespec( int ); - ~Splinespec(void); - Knotspec *kspec; /* format of each param. dir. */ - int dim; /* domain dimension */ - REAL * outcpts; /* Bezier control points */ - - void kspecinit( Knotvector & ); - void kspecinit( Knotvector &, Knotvector & ); - void select( void ); - void layout( long ); - void setupquilt( Quilt_ptr ); - void copy( INREAL * ); - void transform( void ); -}; - -/*----------------------------------------------------------------------------- - * Quilt::toBezier - convert from NURBS to rational Bezier - *----------------------------------------------------------------------------- - */ - -void -Quilt::toBezier( - Knotvector& knotvector, /* a knot vector */ - INREAL *ctlpts, /* input contol points */ - long ncoords ) /* number of coordinates per control point */ -{ - Splinespec spline( 1 ); - spline.kspecinit( knotvector ); - spline.select(); - spline.layout( ncoords ); - spline.setupquilt( this ); - spline.copy( ctlpts ); - spline.transform(); -} - -void -Quilt::toBezier( - Knotvector& sknotvector, /* a knot vector */ - Knotvector& tknotvector, /* a knot vector */ - INREAL *ctlpts, /* input contol points */ - long ncoords ) /* number of coordinates per control point */ -{ - Splinespec spline( 2 ); - spline.kspecinit( sknotvector, tknotvector ); - spline.select(); - spline.layout( ncoords ); - spline.setupquilt( this ); - spline.copy( ctlpts ); - spline.transform(); -} -Splinespec::Splinespec( int dimen ) -{ - dim = dimen; -} - -Splinespec::~Splinespec( void ) -{ - /* Note: do NOT delete 'outcpts' here since its address (not contents) - * is copied in 'cpts' in this file in function Splinespec::setupquilt(). - * This block of memory will eventually be deleted in file quilt.c++ in - * function Quilt::deleteMe() through 'cpts' so do NOT delete it here! - */ - Knotspec *ktrav= kspec; //start at beginning of list - while (ktrav != 0) { //any items to delete? - Knotspec *deleteThis= ktrav; //remember to delete this - ktrav= ktrav->next; //go to next item if any - delete deleteThis; //delete it - } -} /* ~Splinespec() */ - -/*----------------------------------------------------------------------------- - * Splinespec::kspecinit - initialize Splinespec structure - * - * Client: Quilt::toBezier - *----------------------------------------------------------------------------- - */ - -void -Splinespec::kspecinit( Knotvector& knotvector ) -{ - kspec = new Knotspec; - kspec->inkbegin = knotvector.knotlist; - kspec->inkend = knotvector.knotlist + knotvector.knotcount; - kspec->prestride = (int) knotvector.stride; - kspec->order = knotvector.order; - kspec->next = NULL; -} - -void -Splinespec::kspecinit( Knotvector& sknotvector, Knotvector& tknotvector ) -{ - kspec = new Knotspec; - Knotspec *tkspec = new Knotspec; - - kspec->inkbegin = sknotvector.knotlist; - kspec->inkend = sknotvector.knotlist + sknotvector.knotcount; - kspec->prestride = (int) sknotvector.stride; - kspec->order = sknotvector.order; - kspec->next = tkspec; - - tkspec->inkbegin = tknotvector.knotlist; - tkspec->inkend = tknotvector.knotlist + tknotvector.knotcount; - tkspec->prestride = (int) tknotvector.stride; - tkspec->order = tknotvector.order; - tkspec->next = NULL; -} - - -/*----------------------------------------------------------------------------- - * Splinespec::select - select the subsegments to copy - * - * Client: gl_quilt_to_bezier - *----------------------------------------------------------------------------- - */ - -void -Splinespec::select( ) -{ - for( Knotspec *knotspec = kspec; knotspec; knotspec = knotspec->next ) { - knotspec->preselect(); - knotspec->select(); - } -} - -/*----------------------------------------------------------------------------- - * Splinespec::layout - - * - * Client: gl_quilt_to_bezier - *----------------------------------------------------------------------------- - */ - -void -Splinespec::layout( long ncoords ) -{ - - long stride = ncoords; - for( Knotspec *knotspec = kspec; knotspec; knotspec=knotspec->next ) { - knotspec->poststride = (int) stride; - stride *= ((knotspec->bend-knotspec->bbegin)*knotspec->order + knotspec->postoffset); - knotspec->preoffset *= knotspec->prestride; - knotspec->prewidth *= knotspec->poststride; - knotspec->postwidth *= knotspec->poststride; - knotspec->postoffset *= knotspec->poststride; - knotspec->ncoords = (int) ncoords; - } - outcpts = new REAL[stride]; - assert( outcpts != 0 ); -} - -/*----------------------------------------------------------------------------- - * Splinespec::copy - copy the control points of current subobject - * - * Client: gl_quilt_to_bezier - *----------------------------------------------------------------------------- - */ - -void -Splinespec::copy( INREAL *incpts ) -{ - kspec->copy( incpts, outcpts ); -} - -/*----------------------------------------------------------------------------- - * Splinespec::setupquilt - assign all quilt variables from knotspec - * - * Client: gl_quilt_to_bezier - *----------------------------------------------------------------------------- - */ - -void -Splinespec::setupquilt( Quilt_ptr quilt ) -{ - Quiltspec_ptr qspec = quilt->qspec; - quilt->eqspec = qspec + dim; - for( Knotspec *knotspec = kspec; knotspec; knotspec=knotspec->next, qspec++ ) { - qspec->stride = knotspec->poststride; - qspec->width = knotspec->bend - knotspec->bbegin; - qspec->order = (int) knotspec->order; - qspec->offset = knotspec->postoffset; - qspec->index = 0; - qspec->bdry[0] = (knotspec->kleft == knotspec->kfirst) ? 1 : 0; - qspec->bdry[1] = (knotspec->kright == knotspec->klast) ? 1 : 0; - qspec->breakpoints = new Knot[qspec->width+1]; - Knot_ptr k = qspec->breakpoints; - for( Breakpt *bk = knotspec->bbegin; bk <= knotspec->bend; bk++ ) - *(k++) = bk->value; - } - quilt->cpts = outcpts; - quilt->next = 0; -} - -/*----------------------------------------------------------------------------- - * Splinespec::transform - convert a spline to Bezier format - * - * Client: gl_quilt_to_bezier - *----------------------------------------------------------------------------- - */ - -void -Splinespec::transform( void ) -{ - Knotspec *knotspec; - for( knotspec = kspec; knotspec; knotspec=knotspec->next ) - knotspec->istransformed = 0; - - for( knotspec = kspec; knotspec; knotspec=knotspec->next ) { - for( Knotspec *kspec2 = kspec; kspec2; kspec2=kspec2->next ) - kspec2->kspectotrans = knotspec; - kspec->transform( outcpts ); - knotspec->istransformed = 1; - } -} - - -/*----------------------------------------------------------------------------- - * Knotspec::Knotspec - constuct a knot spec - *----------------------------------------------------------------------------- - */ - -Knotspec::Knotspec( void ) -{ - bbegin = 0; - sbegin = 0; - outkbegin = 0; -} - -/*----------------------------------------------------------------------------- - * Knotspec::copy - copy the control points along minor direction - * - * Client: Splinespec::copy - *----------------------------------------------------------------------------- - */ - -void -Knotspec::copy( INREAL *inpt, REAL *outpt ) -{ - inpt = (INREAL *) (((char *) inpt) + preoffset); - - if( next ) { - for( REAL *lpt=outpt+prewidth; outpt != lpt; outpt += poststride ) { - next->copy( inpt, outpt ); - inpt = (INREAL *) (((char *) inpt) + prestride); - } - } else { - for( REAL *lpt=outpt+prewidth; outpt != lpt; outpt += poststride ) { - pt_io_copy( outpt, inpt ); - inpt = (INREAL *) (((char *) inpt) + prestride); - } - } -} - -/*----------------------------------------------------------------------------- - * Knotspec::showpts - print out points before transformation - * - * Client: Knotspec::select - *----------------------------------------------------------------------------- - */ -void -Knotspec::showpts( REAL *outpt ) -{ - if( next ) { - for( REAL *lpt=outpt+prewidth; outpt != lpt; outpt += poststride ) - next->showpts( outpt ); - } else { - for( REAL *lpt=outpt+prewidth; outpt != lpt; outpt += poststride ) - dprintf( "show %g %g %g\n", outpt[0], outpt[1], outpt[2] ); - } -} - -/*----------------------------------------------------------------------------- - * Knotspec::factors - precompute scale factors - * - overwrites knot vector, actual new knot vector is NOT produced - * - * Client: Knotspec::select - *----------------------------------------------------------------------------- - */ - -void -Knotspec::factors( void ) -{ - Knot *mid = (outkend - 1) - order + bend->multi; - Knot_ptr fptr = sbegin; - - for( Breakpt *bpt = bend; bpt >= bbegin; bpt-- ) { - mid -= bpt->multi; // last knot less than knot to insert - int def = bpt->def - 1; // number of knots to insert - if( def <= 0 ) continue; - Knot kv = bpt->value; // knot to insert - - Knot *kf = (mid-def) + (order-1); - for( Knot *kl = kf + def; kl != kf; kl-- ) { - Knot *kh, *kt; - for( kt=kl, kh=mid; kt != kf; kh--, kt-- ) - *(fptr++) = (kv - *kh) / (*kt - *kh); - *kl = kv; - } - } -} - -/*----------------------------------------------------------------------------- - * Knotspec::insert - convert subobject in direction of kspec into Bezier - * - * Client: Knotspec::transform - *----------------------------------------------------------------------------- - */ - -void -Knotspec::insert( REAL *p ) -{ - Knot_ptr fptr = sbegin; - REAL *srcpt = p + prewidth - poststride; - REAL *dstpt = p + postwidth + postoffset - poststride; - Breakpt *bpt = bend; - - for( REAL *pend = srcpt - poststride*bpt->def; srcpt != pend; pend +=poststride ) { - REAL *p1 = srcpt; - for( REAL *p2 = srcpt-poststride; p2 != pend; p1 = p2, p2 -= poststride ) { - pt_oo_sum( p1, p1, p2, *fptr, 1.0-*fptr ); - fptr++; - } - } - - for( --bpt; bpt >= bbegin; bpt-- ) { - - for( int multi = bpt->multi; multi > 0; multi-- ) { - pt_oo_copy( dstpt, srcpt ); - dstpt -= poststride; - srcpt -= poststride; - } - - for( REAL *pend = srcpt - poststride*bpt->def; srcpt != pend; pend +=poststride, dstpt-=poststride ) { - pt_oo_copy( dstpt, srcpt ); - REAL *p1 = srcpt; - - for( REAL *p2 = srcpt-poststride; p2 != pend; p1=p2, p2 -= poststride ) { - pt_oo_sum( p1, p1, p2, *fptr, 1.0-*fptr ); - fptr++; - } - } - } -} - -/*----------------------------------------------------------------------------- - * Knotspec::preselect - initialize kspec for processing - * - * Client: Splinespec::select - *----------------------------------------------------------------------------- - */ - -void -Knotspec::preselect( void ) -{ - Knot kval; - - /* position klast after last knot of "last" breakpoint */ - for( klast = inkend - order, kval = *klast; klast != inkend; klast++ ) - if( ! identical( *klast, kval ) ) break; - - /* position kfirst after last knot of "first" breakpoint */ - for( kfirst = inkbegin+order-1, kval= *kfirst; kfirst != inkend; kfirst++ ) - if( ! identical( *kfirst, kval ) ) break; - - /* compute multiplicity of first breakpoint */ - Knot_ptr k; - for( k = kfirst - 1; k >= inkbegin; k-- ) - if( ! identical( kval, *k ) ) break; - k++; - - /* allocate space for breakpoints - - use worst case estimate on number of breakpoints */ - - bbegin = new Breakpt[(klast - kfirst)+1]; - /* record multiplicity and value of first breakpoint */ - bbegin->multi = kfirst - k; - bbegin->value = kval; - bend = bbegin; - - kleft = kright = kfirst; -} - - -/*----------------------------------------------------------------------------- - * Knotspec::select - Knotspec::select segments and precompute scale factors - * - * Client: Splinespec::select - *----------------------------------------------------------------------------- - */ - -void -Knotspec::select( void ) -{ - breakpoints(); - knots(); - factors(); - - preoffset = kleft - (inkbegin + order); - postwidth = (int)((bend - bbegin) * order); - prewidth = (int)((outkend - outkbegin) - order); - postoffset = (bbegin->def > 1) ? (bbegin->def-1) : 0; -} - -/*----------------------------------------------------------------------------- - * Knotspec::breakpoints - compute breakpoints for knotspec - * - * Client: Knotspec::select - *----------------------------------------------------------------------------- - */ - -void -Knotspec::breakpoints( void ) -{ - Breakpt *ubpt = bbegin; - Breakpt *ubend = bend; - long nfactors = 0; - - ubpt->value = ubend->value; - ubpt->multi = ubend->multi; - - kleft = kright; - - for( ; kright != klast; kright++ ) { - if ( identical(*kright,ubpt->value) ) { - (ubpt->multi)++; - } else { - ubpt->def = (int) (order - ubpt->multi); - nfactors += (ubpt->def * (ubpt->def - 1)) / 2; - (++ubpt)->value = *kright; - ubpt->multi = 1; - } - } - ubpt->def = (int) (order - ubpt->multi); - nfactors += (ubpt->def * (ubpt->def - 1)) / 2; - - bend = ubpt; - - if( nfactors ) { - sbegin = new Knot[nfactors]; - } else { - sbegin = NULL; - } -} - - -/*----------------------------------------------------------------------------- - * Knotspec::knots - copy relevant subsequence of knots into temporary area - * - * Client: Knotspec::select - *----------------------------------------------------------------------------- - */ - -void -Knotspec::knots( void ) -{ - Knot_ptr inkpt = kleft - order; - Knot_ptr inkend = kright + bend->def; - - /* allocate space for knots and factors */ - outkbegin = new Knot[inkend-inkpt]; - Knot_ptr outkpt; - for( outkpt = outkbegin; inkpt != inkend; inkpt++, outkpt++ ) - *outkpt = *inkpt; - - outkend = outkpt; -} - - -/*----------------------------------------------------------------------------- - * Knotspec::transform - convert a spline along a given direction - * - * Client: Splienspec::transform - *----------------------------------------------------------------------------- - */ - -void -Knotspec::transform( REAL *p ) -{ - if( next ) { - if( this == kspectotrans ) { - next->transform( p ); - } else { - if( istransformed ) { - p += postoffset; - for( REAL *pend = p + postwidth; p != pend; p += poststride ) - next->transform( p ); - } else { - REAL *pend = p + prewidth; - for( ; p != pend; p += poststride ) - next->transform( p ); - } - } - } else { - if( this == kspectotrans ) { - insert( p ); - } else { - if( istransformed ) { - p += postoffset; - for( REAL *pend = p + postwidth; p != pend; p += poststride ) - kspectotrans->insert( p ); - } else { - REAL *pend = p + prewidth; - for( ; p != pend; p += poststride ) - kspectotrans->insert( p ); - } - } - } -} - -/*----------------------------------------------------------------------------- - * Knotspec::~Knotspec - free space alocated for knotspec - *----------------------------------------------------------------------------- - */ - -Knotspec::~Knotspec( void ) -{ - if( bbegin ) delete[] bbegin; - if( sbegin ) delete[] sbegin; - if( outkbegin ) delete[] outkbegin; -} - - -/*----------------------------------------------------------------------------- - * pt_io_copy - make internal copy of input cntrl pt. of x coords - *----------------------------------------------------------------------------- - */ - -void -Knotspec::pt_io_copy( REAL *topt, INREAL *frompt ) -{ - switch( ncoords ) { - case 4: - topt[3] = (REAL) frompt[3]; - case 3: - topt[2] = (REAL) frompt[2]; - case 2: - topt[1] = (REAL) frompt[1]; - case 1: - topt[0] = (REAL) frompt[0]; - break; - default: { - for( int i = 0; i < ncoords; i++ ) - *topt++ = (REAL) *frompt++; - } - } -} - -/*----------------------------------------------------------------------------- - * pt_oo_copy - make internal copy of internal cntrl pt. of x coords - *----------------------------------------------------------------------------- - */ - -void -Knotspec::pt_oo_copy( REAL *topt, REAL *frompt ) -{ - switch( ncoords ) { - case 4: - topt[3] = frompt[3]; - case 3: - topt[2] = frompt[2]; - case 2: - topt[1] = frompt[1]; - case 1: - topt[0] = frompt[0]; - break; - default: - memcpy( topt, frompt, ncoords * sizeof( REAL ) ); - } -} - -/*----------------------------------------------------------------------------- - * pt_oo_sum - compute affine combination of internal cntrl pts - *----------------------------------------------------------------------------- - */ - -void -Knotspec::pt_oo_sum( REAL *x, REAL *y, REAL *z, Knot a, Knot b ) -{ - switch( ncoords ) { - case 4: - x[3] = a * y[3] + b * z[3]; - case 3: - x[2] = a * y[2] + b * z[2]; - case 2: - x[1] = a * y[1] + b * z[1]; - case 1: - x[0] = a * y[0] + b * z[0]; - break; - default: { - for( int i = 0; i < ncoords; i++ ) - *x++ = a * *y++ + b * *z++; - } - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimline.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimline.cc deleted file mode 100644 index caa25b9729..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimline.cc +++ /dev/null @@ -1,225 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * trimline.c++ - * - * $Date: 2005/10/28 13:09:08 $ $Revision: 1.1.30.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/trimline.cc,v 1.1.30.1 2005/10/28 13:09:08 brianp Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "trimline.h" -#include "backend.h" - -Trimline::Trimline() -{ - size = 0; pts = 0; numverts = 0; - tinterp = &t; binterp = &b; -} - -Trimline::~Trimline() -{ - if( pts ) delete[] pts; -} - -void -Trimline::init( TrimVertex *v ) -{ - reset(); - grow(1); - append(v); -} - -inline void -Trimline::grow( long npts ) -{ - if( size < npts ) { - size = 2 * npts; - if( pts ) delete[] pts; - pts = new TrimVertex_p[size]; - } -} - -inline void -Trimline::append( TrimVertex *v ) -{ - assert( numverts != size ); - pts[numverts++] = v; -} - -void -Trimline::init( long npts, Arc_ptr jarc, long last ) -{ - jarcl.init( jarc, 0, last ); - grow( npts + 2 ); -} - -inline void -Trimline::swap() -{ - TrimVertex *tmp=tinterp; - tinterp=binterp; - binterp=tmp; -} - -void -Trimline::getNextPt() -{ - *binterp = *jarcl.getnextpt(); -} - -void -Trimline::getPrevPt() -{ - *binterp = *jarcl.getprevpt(); -} - -/*---------------------------------------------------------------------- - * getNextPts - make arrays of pointers to trim points on left and right - * hulls of trim strip. - *---------------------------------------------------------------------- - */ -void -Trimline::getNextPts( REAL vval, Backend& backend ) -{ - reset(); swap(); append( tinterp ); - assert( tinterp->param[1] >= vval ); - - register TrimVertex *p; - for( p=jarcl.getnextpt() ; p->param[1] >= vval; p=jarcl.getnextpt() ) { - append( p ); - } - - /* compute and copy pointer to final point on left hull */ - if( interpvert( last(), p, binterp, vval ) ) { - binterp->nuid = p->nuid; - backend.triangle( p, binterp, last() ); - append( binterp ); - } - jarcl.reverse(); - (void) jarcl.getprevpt(); /* reset jarcl to proper position */ - jarcl.reverse(); -} - -void -Trimline::getPrevPts( REAL vval, Backend& backend ) -{ - reset(); swap(); append( tinterp ); - assert( tinterp->param[1] >= vval ); - - register TrimVertex *q; - for( q=jarcl.getprevpt(); q->param[1] >= vval; q=jarcl.getprevpt() ) { - append( q ); - } - - /* compute and copy pointer to final point on right hull */ - if( interpvert( q, last(), binterp, vval ) ) { - binterp->nuid = q->nuid; - backend.triangle( last(), binterp, q ); - append( binterp ); - } - jarcl.reverse(); - (void) jarcl.getnextpt(); /* reset jarcl to proper position */ - jarcl.reverse(); -} - -void -Trimline::getNextPts( Arc_ptr botarc ) -{ - reset(); swap(); append( tinterp ); - -#ifndef NDEBUG - PwlArc *lastpwl = botarc->prev->pwlArc; - TrimVertex *lastpt1 = &lastpwl->pts[lastpwl->npts-1]; -#endif - TrimVertex *lastpt2 = botarc->pwlArc->pts; - register TrimVertex *p = jarcl.getnextpt(); - for( append( p ); p != lastpt2; append( p ) ) { - assert( p != lastpt1 ); - p = jarcl.getnextpt(); - } -} - -void -Trimline::getPrevPts( Arc_ptr botarc ) -{ - reset(); swap(); append( tinterp ); - - PwlArc *lastpwl = botarc->prev->pwlArc; - TrimVertex *lastpt1 = &lastpwl->pts[lastpwl->npts-1]; -#ifndef NDEBUG - TrimVertex *lastpt2 = botarc->pwlArc->pts; -#endif - - register TrimVertex *q = jarcl.getprevpt(); - for( append( q ); q != lastpt1; append( q ) ) { - assert( q != lastpt2 ); - q = jarcl.getprevpt(); - } -} - - -long -Trimline::interpvert( TrimVertex *a, TrimVertex *b, TrimVertex *c, REAL vval ) -{ - REAL denom = a->param[1] - b->param[1]; - - if(denom != 0) { - if( vval == a->param[1] ) { - c->param[0] = a->param[0]; - c->param[1] = a->param[1]; - c->nuid = a->nuid; - return 0; - } else if( vval == b->param[1] ) { - c->param[0] = b->param[0]; - c->param[1] = b->param[1]; - c->nuid = b->nuid; - return 0; - } else { - REAL r = (a->param[1] - vval)/denom; - c->param[0] = a->param[0] - r * (a->param[0] - b->param[0]); - c->param[1] = vval; - return 1; - } - } else { - c->param[0] = a->param[0]; - c->param[1] = a->param[1]; - c->nuid = a->nuid; - return 0; - } -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimline.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimline.h deleted file mode 100644 index d28574d3e5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimline.h +++ /dev/null @@ -1,109 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * trimline.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/trimline.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glutrimline_h_ -#define __glutrimline_h_ - -class Arc; -class Backend; - -#include "trimvertex.h" -#include "jarcloc.h" - - -class Trimline { -private: - TrimVertex** pts; - long numverts; - long i; - long size; - Jarcloc jarcl; - TrimVertex t, b; - TrimVertex *tinterp, *binterp; - void reset( void ) { numverts = 0; } - inline void grow( long ); - inline void swap( void ); - inline void append( TrimVertex * ); - static long interpvert( TrimVertex *, TrimVertex *, TrimVertex *, REAL ); - - - -public: - Trimline(); - ~Trimline(); - void init( TrimVertex * ); - void init( long, Arc_ptr, long ); - void getNextPt( void ); - void getPrevPt( void ); - void getNextPts( REAL, Backend & ); - void getPrevPts( REAL, Backend & ); - void getNextPts( Arc_ptr ); - void getPrevPts( Arc_ptr ); - inline TrimVertex * next( void ); - inline TrimVertex * prev( void ); - inline TrimVertex * first( void ); - inline TrimVertex * last( void ); -}; - -inline TrimVertex * -Trimline::next( void ) -{ - if( i < numverts) return pts[i++]; else return 0; -} - -inline TrimVertex * -Trimline::prev( void ) -{ - if( i >= 0 ) return pts[i--]; else return 0; -} - -inline TrimVertex * -Trimline::first( void ) -{ - i = 0; return pts[i]; -} - -inline TrimVertex * -Trimline::last( void ) -{ - i = numverts; return pts[--i]; -} -#endif /* __glutrimline_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimregion.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimregion.cc deleted file mode 100644 index 64b4ffc10e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimregion.cc +++ /dev/null @@ -1,116 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * trimregion.c++ - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/trimregion.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "trimregion.h" -#include "backend.h" - -TrimRegion::TrimRegion( void ) -{ -} - -void -TrimRegion::setDu( REAL du ) -{ - oneOverDu = 1.0/du; -} - -void -TrimRegion::init( long npts, Arc_ptr extrema ) -{ - left.init( npts, extrema, extrema->pwlArc->npts - 1 ); - left.getNextPt(); - - right.init( npts, extrema, 0 ); - right.getPrevPt(); -} - -void -TrimRegion::getPts( Arc_ptr extrema ) -{ - left.getNextPts( extrema ); - right.getPrevPts( extrema ); -} - -void -TrimRegion::getPts( Backend &backend ) -{ - left.getNextPts( bot.vval, backend ); - right.getPrevPts( bot.vval, backend ); -} - -void -TrimRegion::getGridExtent( void ) -{ - getGridExtent( left.last(), right.last() ); -} - -void -TrimRegion::getGridExtent( TrimVertex *l, TrimVertex *r ) -{ - bot.ustart = (long) ((l->param[0] - uarray.uarray[0])*oneOverDu); - if( l->param[0] >= uarray.uarray[bot.ustart] ) bot.ustart++; -// if( l->param[0] > uarray.uarray[bot.ustart] ) bot.ustart++; - assert( l->param[0] <= uarray.uarray[bot.ustart] ); - assert( l->param[0] >= uarray.uarray[bot.ustart-1] ); - - bot.uend = (long) ((r->param[0] - uarray.uarray[0])*oneOverDu); - if( uarray.uarray[bot.uend] >= r->param[0] ) bot.uend--; -// if( uarray.uarray[bot.uend] > r->param[0] ) bot.uend--; - assert( r->param[0] >= uarray.uarray[bot.uend] ); - assert( r->param[0] <= uarray.uarray[bot.uend+1] ); -} - -int -TrimRegion::canTile( void ) -{ - TrimVertex *lf = left.first(); - TrimVertex *ll = left.last(); - TrimVertex *l = ( ll->param[0] > lf->param[0] ) ? ll : lf; - - TrimVertex *rf = right.first(); - TrimVertex *rl = right.last(); - TrimVertex *r = ( rl->param[0] < rf->param[0] ) ? rl : rf; - return (l->param[0] <= r->param[0]) ? 1 : 0; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimregion.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimregion.h deleted file mode 100644 index 263b8d4719..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimregion.h +++ /dev/null @@ -1,90 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * trimregion.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/trimregion.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glutrimregion_h_ -#define __glutrimregion_h_ - -#include "trimline.h" -#include "gridline.h" -#include "uarray.h" - -class Arc; -class Backend; - -class TrimRegion { -public: - TrimRegion(); - Trimline left; - Trimline right; - Gridline top; - Gridline bot; - Uarray uarray; - - void init( REAL ); - void advance( REAL, REAL, REAL ); - void setDu( REAL ); - void init( long, Arc_ptr ); - void getPts( Arc_ptr ); - void getPts( Backend & ); - void getGridExtent( TrimVertex *, TrimVertex * ); - void getGridExtent( void ); - int canTile( void ); -private: - REAL oneOverDu; -}; - -inline void -TrimRegion::init( REAL vval ) -{ - bot.vval = vval; -} - -inline void -TrimRegion::advance( REAL topVindex, REAL botVindex, REAL botVval ) -{ - top.vindex = (long) topVindex; - bot.vindex = (long) botVindex; - top.vval = bot.vval; - bot.vval = botVval; - top.ustart = bot.ustart; - top.uend = bot.uend; -} -#endif /* __glutrimregion_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimvertex.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimvertex.h deleted file mode 100644 index 8ded26a648..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimvertex.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * trimvertex.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/trimvertex.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glutrimvertex_h_ -#define __glutrimvertex_h_ - -#include "types.h" - -/*#define USE_OPTTT*/ - -class TrimVertex { /* a vertex on a trim curve */ -public: - REAL param[2]; /* parametric space coords */ -#ifdef USE_OPTTT - REAL cache_point[4]; //only when USE_OPTTT is on in slicer.c++ - REAL cache_normal[3]; -#endif - long nuid; -}; - -typedef class TrimVertex *TrimVertex_p; - -inline REAL -det3( TrimVertex *a, TrimVertex *b, TrimVertex *c ) -{ - return a->param[0] * (b->param[1]-c->param[1]) + - b->param[0] * (c->param[1]-a->param[1]) + - c->param[0] * (a->param[1]-b->param[1]); -} - -#endif /* __glutrimvertex_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimvertpool.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimvertpool.cc deleted file mode 100644 index 7c12ab3999..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimvertpool.cc +++ /dev/null @@ -1,121 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * trimvertexpool.c++ - * - * $Date: 2003/05/08 15:47:00 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/trimvertpool.cc,v 1.2 2003/05/08 15:47:00 brianp Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "mystring.h" -#include "trimvertex.h" -#include "trimvertpool.h" -#include "bufpool.h" - -/*---------------------------------------------------------------------------- - * TrimVertexPool::TrimVertexPool - *---------------------------------------------------------------------------- - */ -TrimVertexPool::TrimVertexPool( void ) - : pool( sizeof(TrimVertex)*3, 32, "Threevertspool" ) -{ - // initialize array of pointers to vertex lists - nextvlistslot = 0; - vlistsize = INIT_VERTLISTSIZE; - vlist = new TrimVertex_p[vlistsize]; -} - -/*---------------------------------------------------------------------------- - * TrimVertexPool::~TrimVertexPool - *---------------------------------------------------------------------------- - */ -TrimVertexPool::~TrimVertexPool( void ) -{ - // free all arrays of TrimVertices vertices - while( nextvlistslot ) { - delete [] vlist[--nextvlistslot]; - } - - // reallocate space for array of pointers to vertex lists - if( vlist ) delete[] vlist; -} - -/*---------------------------------------------------------------------------- - * TrimVertexPool::clear - *---------------------------------------------------------------------------- - */ -void -TrimVertexPool::clear( void ) -{ - // reinitialize pool of 3 vertex arrays - pool.clear(); - - // free all arrays of TrimVertices vertices - while( nextvlistslot ) { - delete [] vlist[--nextvlistslot]; - vlist[nextvlistslot] = 0; - } - - // reallocate space for array of pointers to vertex lists - if( vlist ) delete[] vlist; - vlist = new TrimVertex_p[vlistsize]; -} - - -/*---------------------------------------------------------------------------- - * TrimVertexPool::get - allocate a vertex list - *---------------------------------------------------------------------------- - */ -TrimVertex * -TrimVertexPool::get( int n ) -{ - TrimVertex *v; - if( n == 3 ) { - v = (TrimVertex *) pool.new_buffer(); - } else { - if( nextvlistslot == vlistsize ) { - vlistsize *= 2; - TrimVertex_p *nvlist = new TrimVertex_p[vlistsize]; - memcpy( nvlist, vlist, nextvlistslot * sizeof(TrimVertex_p) ); - if( vlist ) delete[] vlist; - vlist = nvlist; - } - v = vlist[nextvlistslot++] = new TrimVertex[n]; - } - return v; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimvertpool.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimvertpool.h deleted file mode 100644 index deb8d4c534..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/trimvertpool.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * trimvertexpool.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/trimvertpool.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glutrimvertpool_h_ -#define __glutrimvertpool_h_ - -#include "bufpool.h" - -class TrimVertex; - -#define INIT_VERTLISTSIZE 200 - -class TrimVertexPool { -public: - TrimVertexPool( void ); - ~TrimVertexPool( void ); - void clear( void ); - TrimVertex * get( int ); -private: - Pool pool; - TrimVertex ** vlist; - int nextvlistslot; - int vlistsize; -}; -#endif /* __glutrimvertpool_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/types.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/types.h deleted file mode 100644 index d8e7751d0b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/types.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * types.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/types.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __glutypes_h_ -#define __glutypes_h_ - -//typedef double INREAL; -#define INREAL float -typedef float REAL; -typedef void (*Pfvv)( void ); -typedef void (*Pfvf)( float * ); -typedef int (*cmpfunc)(const void *, const void *); -typedef REAL Knot, *Knot_ptr;/* knot values */ - -#endif /* __glutypes_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/uarray.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/uarray.cc deleted file mode 100644 index 0cc3c8d273..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/uarray.cc +++ /dev/null @@ -1,74 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * uarray.c++ - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/uarray.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "uarray.h" -#include "arc.h" - -Uarray::Uarray( void ) -{ - uarray = 0; - size = 0; -} - -Uarray::~Uarray( void ) -{ - if( uarray ) delete[] uarray; -} - -long -Uarray::init( REAL delta, Arc_ptr lo, Arc_ptr hi ) -{ - ulines = (long) ((hi->tail()[0] - lo->tail()[0])/delta) + 3; - if( size < ulines ) { - size = ulines * 2; - if( uarray ) delete[] uarray; - uarray = new REAL[size]; - assert( uarray != 0); - } - uarray[0] = lo->tail()[0] - delta/2.0; - for( long i = 1 ; i != ulines; i++ ) - uarray[i] = uarray[0] + i*delta; - return ulines; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/uarray.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/uarray.h deleted file mode 100644 index e7a7e00d10..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/uarray.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * uarray.h - * - * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/uarray.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef __gluuarray_h_ -#define __gluuarray_h_ - -#include "types.h" - -class Arc; -typedef class Arc *Arc_ptr; - -class Uarray { -private: - long size; - long ulines; -public: - Uarray(); - ~Uarray(); - long init( REAL, Arc_ptr, Arc_ptr ); - REAL * uarray; -}; - -#endif /* __gluuarray_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/varray.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/varray.cc deleted file mode 100644 index 969bba080e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/internals/varray.cc +++ /dev/null @@ -1,146 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * varray.c++ - * - * $Date: 2002/11/01 23:35:07 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/varray.cc,v 1.2 2002/11/01 23:35:07 brianp Exp $ - */ - -#include "glimports.h" -#include "myassert.h" -#include "mystdio.h" -#include "varray.h" -#include "arc.h" -#include "simplemath.h" // glu_abs() - -#define TINY 0.0001 -inline long sgn( REAL x ) -{ - return (x < -TINY) ? -1 : ((x > TINY) ? 1 : 0 ); -} - - -Varray::Varray( void ) -{ - varray = 0; - size = 0; -} - -Varray::~Varray( void ) -{ - if( varray ) delete[] varray; -} - -inline void -Varray::update( Arc_ptr arc, long dir[2], REAL val ) -{ - register long ds = sgn(arc->tail()[0] - arc->prev->tail()[0]); - register long dt = sgn(arc->tail()[1] - arc->prev->tail()[1]); - - if( dir[0] != ds || dir[1] != dt ) { - dir[0] = ds; - dir[1] = dt; - append( val ); - } -} - -void -Varray::grow( long guess ) -{ - if( size < guess ) { - size = guess * 2; - if( varray ) delete[] varray; - varray = new REAL[size]; - assert( varray != 0 ); - } -} - -long -Varray::init( REAL delta, Arc_ptr toparc, Arc_ptr botarc ) -{ - Arc_ptr left = toparc->next; - Arc_ptr right = toparc; - long ldir[2], rdir[2]; - - ldir[0] = sgn( left->tail()[0] - left->prev->tail()[0] ); - ldir[1] = sgn( left->tail()[1] - left->prev->tail()[1] ); - rdir[0] = sgn( right->tail()[0] - right->prev->tail()[0] ); - rdir[1] = sgn( right->tail()[1] - right->prev->tail()[1] ); - - vval[0] = toparc->tail()[1]; - numquads = 0; - - while( 1 ) { - switch( sgn( left->tail()[1] - right->prev->tail()[1] ) ) { - case 1: - left = left->next; - update( left, ldir, left->prev->tail()[1] ); - break; - case -1: - right = right->prev; - update( right, rdir, right->tail()[1] ); - break; - case 0: - if( glu_abs(left->tail()[1] - botarc->tail()[1]) < TINY) goto end; - if( glu_abs(left->tail()[0]-right->prev->tail()[0]) < TINY && - glu_abs(left->tail()[1]-right->prev->tail()[1]) < TINY) goto end; - left = left->next; - break; - } - } - -end: - append( botarc->tail()[1] ); - - grow( ((long) ((vval[0] - vval[numquads])/delta)) + numquads + 2 ); - - long i, index = 0; - for( i=0; i delta ) { - long steps = ((long) (dist/delta)) +1; - float deltav = - dist / (REAL) steps; - for( long j=1; j -#include -#include -#include "glimports.h" -#include "zlassert.h" - -#include "quicksort.h" -#include "directedLine.h" -#include "polyDBG.h" - -#ifdef __WATCOMC__ -#pragma warning 726 10 -#endif - -//we must return the newLine -directedLine* directedLine::deleteChain(directedLine* begin, directedLine* end) -{ - if(begin->head()[0] == end->tail()[0] && - begin->head()[1] == end->tail()[1] - ) - { - directedLine *ret = begin->prev; - begin->prev->next = end->next; - end->next->prev = begin->prev; - delete begin->sline; - delete end->sline; - delete begin; - delete end; - - return ret; - } - - directedLine* newLine; - sampledLine* sline = new sampledLine(begin->head(), end->tail()); - newLine = new directedLine(INCREASING, sline); - directedLine *p = begin->prev; - directedLine *n = end->next; - p->next = newLine; - n->prev = newLine; - newLine->prev = p; - newLine->next = n; - - delete begin->sline; - delete end->sline; - delete begin; - delete end; - return newLine; -} - - -void directedLine::deleteSingleLine(directedLine* dline) -{ - //make sure that dline->prev->tail is the same as - //dline->next->head. This is for numerical erros. - //for example, if we delete a line which is almost degeneate - //within (epsilon), then we want to make that the polygon after deletion - //is still a valid polygon - - dline->next->head()[0] = dline->prev->tail()[0]; - dline->next->head()[1] = dline->prev->tail()[1]; - - dline->prev->next = dline->next; - dline->next->prev = dline->prev; - - delete dline; - -} - -static Int myequal(Real a[2], Real b[2]) -{ - /* - if(a[0]==b[0] && a[1] == b[1]) - return 1; - else - return 0; - */ - - - if(fabs(a[0]-b[0]) < 0.00001 && - fabs(a[1]-b[1]) < 0.00001) - return 1; - else - return 0; - -} - -directedLine* directedLine::deleteDegenerateLines() -{ - //if there is only one edge or two edges, don't do anything - if(this->next == this) - return this; - if(this->next == this->prev) - return this; - - //find a nondegenerate line - directedLine* temp; - directedLine* first = NULL; - if(! myequal(head(), tail())) - /* - if(head()[0] != tail()[0] || - head()[1] != tail()[1]) - */ - first = this; - else - { - for(temp = this->next; temp != this; temp = temp->next) - { - /* - if(temp->head()[0] != temp->tail()[0] || - temp->head()[1] != temp->tail()[1]) - */ - if(! myequal(temp->head(), temp->tail())) - { - first = temp; - break; - } - - } - } - - //if there are no non-degenerate lines, then we simply return NULL. - if(first == NULL) - { - deleteSinglePolygonWithSline(); - return NULL; - } - - directedLine* tempNext = NULL; - for(temp =first->next; temp != first; temp = tempNext) - { - tempNext = temp->getNext(); -/* - if(temp->head()[0] == temp->tail()[0] && - temp->head()[1] == temp->tail()[1]) -*/ - - if(myequal(temp->head(), temp->tail())) - deleteSingleLine(temp); - } - return first; -} - -directedLine* directedLine::deleteDegenerateLinesAllPolygons() -{ - directedLine* temp; - directedLine *tempNext = NULL; - directedLine* ret= NULL; - directedLine* retEnd = NULL; - for(temp=this; temp != NULL; temp = tempNext) - { - tempNext = temp->nextPolygon; - temp->nextPolygon = NULL; - if(ret == NULL) - { - ret = retEnd = temp->deleteDegenerateLines(); - - } - else - { - directedLine *newPolygon = temp->deleteDegenerateLines(); - if(newPolygon != NULL) - { - retEnd->nextPolygon = temp->deleteDegenerateLines(); - retEnd = retEnd->nextPolygon; - } - } - } - return ret; -} - -directedLine* directedLine::cutIntersectionAllPoly(int &cutOccur) -{ - directedLine* temp; - directedLine *tempNext = NULL; - directedLine* ret= NULL; - directedLine* retEnd = NULL; - cutOccur = 0; - for(temp=this; temp != NULL; temp = tempNext) - { - int eachCutOccur=0; - tempNext = temp->nextPolygon; - temp->nextPolygon = NULL; - if(ret == NULL) - { - - ret = retEnd = DBG_cutIntersectionPoly(temp, eachCutOccur); - if(eachCutOccur) - cutOccur = 1; - } - else - { - - retEnd->nextPolygon = DBG_cutIntersectionPoly(temp, eachCutOccur); - retEnd = retEnd->nextPolygon; - if(eachCutOccur) - cutOccur = 1; - } - } - return ret; -} - - -void directedLine::deleteSinglePolygonWithSline() -{ - directedLine *temp, *tempNext; - prev->next = NULL; - for(temp=this; temp != NULL; temp = tempNext) - { - tempNext = temp->next; - delete temp->sline; - delete temp; - } -} - -void directedLine::deletePolygonListWithSline() -{ - directedLine *temp, *tempNext; - for(temp=this; temp != NULL; temp=tempNext) - { - tempNext = temp->nextPolygon; - temp->deleteSinglePolygonWithSline(); - } -} - -void directedLine::deleteSinglePolygon() -{ - directedLine *temp, *tempNext; - prev->next = NULL; - for(temp=this; temp != NULL; temp = tempNext) - { - tempNext = temp->next; - delete temp; - } -} - -void directedLine::deletePolygonList() -{ - directedLine *temp, *tempNext; - for(temp=this; temp != NULL; temp=tempNext) - { - tempNext = temp->nextPolygon; - temp->deleteSinglePolygon(); - } -} - - -/*a loop by itself*/ -directedLine::directedLine(short dir, sampledLine* sl) -{ - direction = dir; - sline = sl; - next = this; - prev = this; - nextPolygon = NULL; -// prevPolygon = NULL; - rootBit = 0;/*important to initilzae to 0 meaning not root yet*/ - - rootLink = NULL; - -} - -void directedLine::init(short dir, sampledLine* sl) -{ - direction = dir; - sline = sl; -} - -directedLine::directedLine() -{ - next = this; - prev = this; - nextPolygon = NULL; - rootBit = 0;/*important to initilzae to 0 meaning not root yet*/ - rootLink = NULL; -} - -directedLine::~directedLine() -{ -} - -Real* directedLine::head() -{ - - return (direction==INCREASING)? (sline->get_points())[0] : (sline->get_points())[sline->get_npoints()-1]; -} - -/*inline*/ Real* directedLine::getVertex(Int i) -{ - return (direction==INCREASING)? (sline->get_points())[i] : (sline->get_points())[sline->get_npoints() - 1 -i]; -} - -Real* directedLine::tail() -{ - return (direction==DECREASING)? (sline->get_points())[0] : (sline->get_points())[sline->get_npoints()-1]; -} - - /*insert a new line between prev and this*/ -void directedLine::insert(directedLine* nl) -{ - nl->next = this; - nl->prev = prev; - prev->next = nl; - prev = nl; - nl->rootLink = this; /*assuming that 'this' is the root!!!*/ -} - -Int directedLine::numEdges() -{ - Int ret=0; - directedLine* temp; - if(next == this) return 1; - - ret = 1; - for(temp = next; temp != this; temp = temp->next) - ret++; - return ret; -} - -Int directedLine::numEdgesAllPolygons() -{ - Int ret=0; - directedLine* temp; - for(temp=this; temp!= NULL; temp=temp->nextPolygon) - { - ret += temp->numEdges(); - } - return ret; -} - -/*return 1 if the double linked list forms a polygon. - */ -short directedLine::isPolygon() -{ - directedLine* temp; - - /*a polygon contains at least 3 edges*/ - if(numEdges() <=2) return 0; - - /*check this edge*/ - if(! isConnected()) return 0; - - /*check all other edges*/ - for(temp=next; temp != this; temp = temp->next){ - if(!isConnected()) return 0; - } - return 1; -} - -/*check if the head of this edge is connected to - *the tail of the prev - */ -short directedLine::isConnected() -{ - if( (head()[0] == prev->tail()[0]) && (head()[1] == prev->tail()[1])) - return 1; - else - return 0; -} - -Int compV2InY(Real A[2], Real B[2]) -{ - if(A[1] < B[1]) return -1; - if(A[1] == B[1] && A[0] < B[0]) return -1; - if(A[1] == B[1] && A[0] == B[0]) return 0; - return 1; -} - -Int compV2InX(Real A[2], Real B[2]) -{ - if(A[0] < B[0]) return -1; - if(A[0] == B[0] && A[1] < B[1]) return -1; - if(A[0] == B[0] && A[1] == B[1]) return 0; - return 1; -} - -/*compare two vertices NOT lines! - *A vertex is the head of a directed line. - *(x_1, y_1) <= (x_2, y_2) if - *either y_1 < y_2 - *or y_1 == y_2 && x_1 < x_2. - *return -1 if this->head() <= nl->head(), - *return 1 otherwise - */ -Int directedLine::compInY(directedLine* nl) -{ - if(head()[1] < nl->head()[1]) return -1; - if(head()[1] == nl->head()[1] && head()[0] < nl->head()[0]) return -1; - return 1; -} - -/*compare two vertices NOT lines! - *A vertex is the head of a directed line. - *(x_1, y_1) <= (x_2, y_2) if - *either x_1 < x_2 - *or x_1 == x_2 && y_1 < y_2. - *return -1 if this->head() <= nl->head(), - *return 1 otherwise - */ -Int directedLine::compInX(directedLine* nl) -{ - if(head()[0] < nl->head()[0]) return -1; - if(head()[0] == nl->head()[0] && head()[1] < nl->head()[1]) return -1; - return 1; -} - -/*used by sort precedures - */ -static Int compInY2(directedLine* v1, directedLine* v2) -{ - return v1->compInY(v2); -} -#ifdef NOT_USED -static Int compInX(directedLine* v1, directedLine* v2) -{ - return v1->compInX(v2); -} -#endif - -/*sort all the vertices NOT the lines! - *a vertex is the head of a directed line - */ -directedLine** directedLine::sortAllPolygons() -{ - Int total_num_edges = 0; - directedLine** array = toArrayAllPolygons(total_num_edges); - quicksort( (void**)array, 0, total_num_edges-1, (Int (*)(void *, void *)) compInY2); - - return array; -} - -void directedLine::printSingle() -{ - if(direction == INCREASING) - printf("direction is INCREASING\n"); - else - printf("direction is DECREASING\n"); - printf("head=%f,%f)\n", head()[0], head()[1]); - sline->print(); -} - -/*print one polygon*/ -void directedLine::printList() -{ - directedLine* temp; - printSingle(); - for(temp = next; temp!=this; temp=temp->next) - temp->printSingle(); -} - -/*print all the polygons*/ -void directedLine::printAllPolygons() -{ - directedLine *temp; - for(temp = this; temp!=NULL; temp = temp->nextPolygon) - { - printf("polygon:\n"); - temp->printList(); - } -} - -/*insert this polygon into the head of the old polygon List*/ -directedLine* directedLine::insertPolygon(directedLine* oldList) -{ - /*this polygon is a root*/ - setRootBit(); - if(oldList == NULL) return this; - nextPolygon = oldList; -/* oldList->prevPolygon = this;*/ - return this; -} - -/*cutoff means delete. but we don't deallocate any space, - *so we use cutoff instead of delete - */ -directedLine* directedLine::cutoffPolygon(directedLine *p) -{ - directedLine* temp; - directedLine* prev_polygon = NULL; - if(p == NULL) return this; - - for(temp=this; temp != p; temp = temp->nextPolygon) - { - if(temp == NULL) - { - fprintf(stderr, "in cutoffPolygon, not found\n"); - exit(1); - } - prev_polygon = temp; - } - -/* prev_polygon = p->prevPolygon;*/ - - p->resetRootBit(); - if(prev_polygon == NULL) /*this is the one to cutoff*/ - return nextPolygon; - else { - prev_polygon->nextPolygon = p->nextPolygon; - return this; - } -} - -Int directedLine::numPolygons() -{ - if(nextPolygon == NULL) return 1; - else return 1+nextPolygon->numPolygons(); -} - - -/*let array[index ...] denote - *all the edges in this polygon - *return the next available index of array. - */ -Int directedLine::toArraySinglePolygon(directedLine** array, Int index) -{ - directedLine *temp; - array[index++] = this; - for(temp = next; temp != this; temp = temp->next) - { - array[index++] = temp; - } - return index; -} - -/*the space is allocated. The caller is responsible for - *deallocate the space. - *total_num_edges is set to be the total number of edges of all polygons - */ -directedLine** directedLine::toArrayAllPolygons(Int& total_num_edges) -{ - total_num_edges=numEdgesAllPolygons(); - directedLine** ret = (directedLine**) malloc(sizeof(directedLine*) * total_num_edges); - assert(ret); - - directedLine *temp; - Int index = 0; - for(temp=this; temp != NULL; temp=temp->nextPolygon) { - index = temp->toArraySinglePolygon(ret, index); - } - return ret; -} - -/*assume the polygon is a simple polygon, return - *the area enclosed by it. - *if thee order is counterclock wise, the area is positive. - */ -Real directedLine::polyArea() -{ - directedLine* temp; - Real ret=0.0; - Real x1,y1,x2,y2; - x1 = this->head()[0]; - y1 = this->head()[1]; - x2 = this->next->head()[0]; - y2 = this->next->head()[1]; - ret = -(x2*y1-x1*y2); - for(temp=this->next; temp!=this; temp = temp->next) - { - x1 = temp->head()[0]; - y1 = temp->head()[1]; - x2 = temp->next->head()[0]; - y2 = temp->next->head()[1]; - ret += -( x2*y1-x1*y2); - } - return Real(0.5)*ret; -} - -/*******************split or combine polygons begin********************/ -/*conect a diagonal of a single simple polygon or two simple polygons. - *If the two vertices v1 (head) and v2 (head) are in the same simple polygon, - *then we actually split the simple polygon into two polygons. - *If instead two vertices velong to two difference polygons, - *then we combine the two polygons into one polygon. - *It is upto the caller to decide whether this is a split or a - *combination. - * - *Case Split: - *split a single simple polygon into two simple polygons by - *connecting a diagonal (two vertices). - *v1, v2: the two vertices are the head() of the two directedLines. - * this routine generates one new sampledLine which is returned in - *generatedLine, - *and it generates two directedLines returned in ret_p1 and ret_p2. - *ret_p1 and ret_p2 are used as the entry to the two new polygons. - *Notice the caller should not deallocate the space of v2 and v2 after - *calling this function, since all of the edges are connected to - *ret_p1 or ret_p2. - * - *combine: - *combine two simpolygons into one by connecting one diagonal. - *the returned polygon is returned in ret_p1. - */ -/*ARGSUSED*/ -void directedLine::connectDiagonal(directedLine* v1, directedLine* v2, - directedLine** ret_p1, - directedLine** ret_p2, - sampledLine** generatedLine, - directedLine* polygonList ) -{ - sampledLine *nsline = new sampledLine(2); - - - - nsline->setPoint(0, v1->head()); - nsline->setPoint(1, v2->head()); - - - - /*the increasing line is from v1 head to v2 head*/ - directedLine* newLineInc = new directedLine(INCREASING, nsline); - - - - directedLine* newLineDec = new directedLine(DECREASING, nsline); - - - directedLine* v1Prev = v1->prev; - directedLine* v2Prev = v2->prev; - - v1 ->prev = newLineDec; - v2Prev ->next = newLineDec; - newLineDec->next = v1; - newLineDec->prev = v2Prev; - - v2 ->prev = newLineInc; - v1Prev ->next = newLineInc; - newLineInc->next = v2; - newLineInc->prev = v1Prev; - - *ret_p1 = newLineDec; - *ret_p2 = newLineInc; - *generatedLine = nsline; -} - -//see the function connectDiangle -/*ARGSUSED*/ -void directedLine::connectDiagonal_2slines(directedLine* v1, directedLine* v2, - directedLine** ret_p1, - directedLine** ret_p2, - directedLine* polygonList ) -{ - sampledLine *nsline = new sampledLine(2); - sampledLine *nsline2 = new sampledLine(2); - - nsline->setPoint(0, v1->head()); - nsline->setPoint(1, v2->head()); - nsline2->setPoint(0, v1->head()); - nsline2->setPoint(1, v2->head()); - - /*the increasing line is from v1 head to v2 head*/ - directedLine* newLineInc = new directedLine(INCREASING, nsline); - - directedLine* newLineDec = new directedLine(DECREASING, nsline2); - - directedLine* v1Prev = v1->prev; - directedLine* v2Prev = v2->prev; - - v1 ->prev = newLineDec; - v2Prev ->next = newLineDec; - newLineDec->next = v1; - newLineDec->prev = v2Prev; - - v2 ->prev = newLineInc; - v1Prev ->next = newLineInc; - newLineInc->next = v2; - newLineInc->prev = v1Prev; - - *ret_p1 = newLineDec; - *ret_p2 = newLineInc; - -} - -Int directedLine::samePolygon(directedLine* v1, directedLine* v2) -{ - if(v1 == v2) return 1; - directedLine *temp; - for(temp = v1->next; temp != v1; temp = temp->next) - { - if(temp == v2) return 1; - } - return 0; -} - -directedLine* directedLine::findRoot() -{ - if(rootBit) return this; - directedLine* temp; - for(temp = next; temp != this; temp = temp->next) - if(temp -> rootBit ) return temp; - return NULL; /*should not happen*/ -} - -directedLine* directedLine::rootLinkFindRoot() -{ - directedLine* tempRoot; - directedLine* tempLink; - tempRoot = this; - tempLink = rootLink; - while(tempLink != NULL){ - tempRoot = tempLink; - tempLink = tempRoot->rootLink; - } - return tempRoot; -} - -/*******************split or combine polygons end********************/ - -/*****************IO stuff begin*******************/ - -/*format: - *#polygons - * #vertices - * vertices - * #vertices - * vertices - *... - */ -void directedLine::writeAllPolygons(char* filename) -{ - FILE* fp = fopen(filename, "w"); - assert(fp); - Int nPolygons = numPolygons(); - directedLine *root; - fprintf(fp, "%i\n", nPolygons); - for(root = this; root != NULL; root = root->nextPolygon) - { - directedLine *temp; - Int npoints=0; - npoints = root->get_npoints()-1; - for(temp = root->next; temp != root; temp=temp->next) - npoints += temp->get_npoints()-1; - fprintf(fp, "%i\n", npoints/*root->numEdges()*/); - - - for(Int i=0; iget_npoints()-1; i++){ - fprintf(fp, "%f ", root->getVertex(i)[0]); - fprintf(fp, "%f ", root->getVertex(i)[1]); - } - - for(temp=root->next; temp != root; temp = temp->next) - { - for(Int i=0; iget_npoints()-1; i++){ - - fprintf(fp, "%f ", temp->getVertex(i)[0]); - fprintf(fp, "%f ", temp->getVertex(i)[1]); - } - fprintf(fp,"\n"); - } - fprintf(fp, "\n"); - } - fclose(fp); -} - -directedLine* readAllPolygons(char* filename) -{ - Int i,j; - FILE* fp = fopen(filename, "r"); - assert(fp); - Int nPolygons; - fscanf(fp, "%i", &nPolygons); - directedLine *ret = NULL; - - for(i=0; irootLinkSet(NULL); - - directedLine *dLine; - for(j=2; jrootLinkSet(thisPoly); - thisPoly->insert(dLine); - } - - VV[0][0]=vert[1][0]; - VV[0][1]=vert[1][1]; - sLine = new sampledLine(2,VV); - dLine = new directedLine(INCREASING, sLine); -dLine->rootLinkSet(thisPoly); - thisPoly->insert(dLine); - - ret = thisPoly->insertPolygon(ret); - } - fclose(fp); - return ret; -} - - - - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/directedLine.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/directedLine.h deleted file mode 100644 index 009295e61e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/directedLine.h +++ /dev/null @@ -1,178 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/directedLine.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef _DIRECTEDLINE_H -#define _DIRECTEDLINE_H - -#include "definitions.h" -#include "sampledLine.h" - -enum {INCREASING, DECREASING}; - -class directedLine { - short direction; /*INCREASING or DECREASING*/ - sampledLine* sline; - directedLine* next; /*double linked list*/ - directedLine* prev; /*double linked list*/ - - /*in case we need a list of polygons each - *consisting of a double linked list - */ - directedLine* nextPolygon; - - /*optimization make cutoff polygon faster*/ -/* directedLine* prevPolygon;*/ - - Int rootBit; /*1 if this is a root of the polygon, set by setRootBit*/ - /*and reset by resetRootBit()*/ - - directedLine* rootLink; /*fast root-finding*/ - - - -public: - directedLine(short dir, sampledLine* sl); - directedLine(); - ~directedLine(); - - void init(short dir, sampledLine* sl); - - Real* head(); /*points[0] if INCREASING, points[n-1] otherwise*/ - Real* tail(); /*points[n-1] if INCREASING, points[0] otherwise*/ - Real* getVertex(Int i); /*points[i] if INCREASING, points[n-1-i] otherwise*/ - Int get_npoints() {return sline->get_npoints();} - directedLine* getPrev() {return prev;} - directedLine* getNext() {return next;} - directedLine* getNextPolygon() {return nextPolygon;} - sampledLine* getSampledLine() {return sline;} - - short getDirection(){return direction;} - void putDirection(short dir) {direction = dir;} - void putPrev(directedLine *p) {prev = p;} - void putNext(directedLine *p) {next = p;} - - /*insert a new line between prev and this*/ - void insert(directedLine* nl); - - /*delete all the polygons following the link: nextPolygon. - *notice that sampledLine is not deleted. The caller is - *responsible for that - */ - void deletePolygonList(); - void deleteSinglePolygon(); - - void deleteSinglePolygonWithSline(); //also delete sanmpled line - void deletePolygonListWithSline(); //also delete sanmpled line - - void deleteSingleLine(directedLine* dline); - directedLine* deleteDegenerateLines(); - directedLine* deleteDegenerateLinesAllPolygons(); - directedLine* cutIntersectionAllPoly(int& cutOccur); - - /*check to see if the list forms a closed polygon - *return 1 if yes - */ - short isPolygon(); - - Int compInY(directedLine* nl); - Int compInX(directedLine* nl); - - /*return an array of pointers. - *the - */ - directedLine** sortAllPolygons(); - - Int numEdges(); - Int numEdgesAllPolygons(); - Int numPolygons(); - - /*check if the head of this edge is connected to - *the tail of the prev - */ - short isConnected(); - - Real polyArea(); - - void printSingle(); - void printList(); - void printAllPolygons(); - void writeAllPolygons(char* filename); - - - /*insert a polygon: using nextPolygon*/ - directedLine* insertPolygon(directedLine* newpolygon); - directedLine* cutoffPolygon(directedLine *p); - - Int toArraySinglePolygon(directedLine** array, Int index); - directedLine** toArrayAllPolygons(Int& total_num_edges); - - void connectDiagonal(directedLine* v1, directedLine* v2, - directedLine** ret_p1, - directedLine** ret_p2, - sampledLine** generatedLine, directedLine* list); - - /*generate two slines - */ - void connectDiagonal_2slines(directedLine* v1, directedLine* v2, - directedLine** ret_p1, - directedLine** ret_p2, - directedLine* list); - - Int samePolygon(directedLine* v1, directedLine* v2); - void setRootBit() {rootBit = 1;} - void resetRootBit() {rootBit = 0;} - directedLine* findRoot(); - - void rootLinkSet(directedLine* r) {rootLink = r;} - directedLine* rootLinkFindRoot(); - - //the chain from begin to end is deleted (the space is deallocated) - //and a new edge(which connectes the head of begin and the tail of end) - // is inserted. The new polygon is returned. - //notice that "this" is arbitrary - directedLine* deleteChain(directedLine* begin, directedLine* end); -}; - -directedLine* readAllPolygons(char* filename); - -extern Int compV2InY(Real A[2], Real B[2]); -extern Int compV2InX(Real A[2], Real B[2]); - -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/glimports.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/glimports.h deleted file mode 100644 index cb370218c0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/glimports.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * glimports.h - * - * $Date: 2001/03/19 17:52:03 $ $Revision: 1.3 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/glimports.h,v 1.3 2001/03/19 17:52:03 pesco Exp $ - */ - -#ifndef __gluimports_h_ -#define __gluimports_h_ - -#include "mystdlib.h" -#include "mystdio.h" - -#endif /* __gluimports_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/gridWrap.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/gridWrap.cc deleted file mode 100644 index 6df10c4385..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/gridWrap.cc +++ /dev/null @@ -1,295 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/gridWrap.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include -#include -#include "zlassert.h" -#include "gridWrap.h" - - -/*******************grid structure****************************/ -void gridWrap::print() -{ - printf("n_ulines = %i\n", n_ulines); - printf("n_vlines = %i\n", n_vlines); - printf("u_min=%f, umax=%f, vmin=%f, vmax=%f\n", u_min, u_max, v_min, v_max); -} - -gridWrap::gridWrap(Int nUlines, Real* uvals, - Int nVlines, Real* vvals) -{ - assert(nUlines>=2); - assert(nVlines>=2); - - is_uniform = 0; - n_ulines = nUlines; - n_vlines = nVlines; - u_min = uvals[0]; - u_max = uvals[nUlines-1]; - v_min = vvals[0]; - v_max = vvals[nVlines-1]; - u_values = (Real*) malloc(sizeof(Real) * n_ulines); - assert(u_values); - v_values = (Real*) malloc(sizeof(Real) * n_vlines); - assert(v_values); - - Int i; - for(i=0; i=2); - assert(nVlines>=2); - Real du = (uMax-uMin)/(nUlines-1); - Real dv = (vMax-vMin)/(nVlines-1); - - float tempu=uMin; - u_values[0] = tempu; - for(i=1; i= uright) - return; //no triangles to output. - - pStream->begin(); - pStream->insert(vert); - - assert(vert[1] != v_values[v]); //don't output degenerate triangles - - if(vert[1] > v_values[v]) //vertex is above this grid line: notice the orientation - { - for(i=uleft; i<=uright; i++) - pStream->insert(u_values[i], v_values[v]); - } - else //vertex is below the grid line - { - for(i=uright; i>= uleft; i--) - pStream->insert(u_values[i], v_values[v]); - } - - pStream->end(PRIMITIVE_STREAM_FAN); -} - - - -/*each chain stores a number of consecutive - *V-lines within a grid. - *There is one grid vertex on each V-line. - * The total number of V-lines is: - * nVlines. - * with respect to the grid, the index of the first V-line is - * firstVlineIndex. - * So with respect to the grid, the index of the ith V-line is - * firstVlineIndex-i. - * the grid-index of the uline at the ith vline (recall that each vline has one grid point) - * is ulineIndices[i]. The u_value is cached in ulineValues[i], that is, - * ulineValues[i] = grid->get_u_value(ulineIndices[i]) - */ -gridBoundaryChain::gridBoundaryChain( - gridWrap* gr, - Int first_vline_index, - Int n_vlines, - Int* uline_indices, - Int* inner_indices - ) -: grid(gr), firstVlineIndex(first_vline_index), nVlines(n_vlines) -{ - ulineIndices = (Int*) malloc(sizeof(Int) * n_vlines); - assert(ulineIndices); - - innerIndices = (Int*) malloc(sizeof(Int) * n_vlines); - assert(innerIndices); - - vertices = (Real2*) malloc(sizeof(Real2) * n_vlines); - assert(vertices); - - - - Int i; - for(i=0; iget_u_value(ulineIndices[i]); - vertices[i][1] = gr->get_v_value(first_vline_index-i); - } -} - -void gridBoundaryChain::draw() -{ - Int i; - glBegin(GL_LINE_STRIP); - for(i=0; iget_u_value(innerIndices[i]), get_v_value(i-1) ); - glVertex2f(grid->get_u_value(innerIndices[i]), get_v_value(i) ); - glEnd(); - } -} - -Int gridBoundaryChain::lookfor(Real v, Int i1, Int i2) -{ - Int mid; - while(i1 < i2-1) - { - mid = (i1+i2)/2; - if(v > vertices[mid][1]) - { - i2 = mid; - } - else - i1 = mid; - } - return i1; -} - -/*output the fan of the right end between grid line i-1 and grid line i*/ -void gridBoundaryChain::rightEndFan(Int i, primStream* pStream) -{ - Int j; - if(getUlineIndex(i) > getUlineIndex(i-1)) - { - pStream->begin(); - pStream->insert(get_vertex(i-1)); - for(j=getUlineIndex(i-1); j<= getUlineIndex(i); j++) - pStream->insert(grid->get_u_value(j), get_v_value(i)); - pStream->end(PRIMITIVE_STREAM_FAN); - } - else if(getUlineIndex(i) < getUlineIndex(i-1)) - { - pStream->begin(); - pStream->insert(get_vertex(i)); - for(j=getUlineIndex(i-1); j>= getUlineIndex(i); j--) - pStream->insert(grid->get_u_value(j), get_v_value(i-1)); - pStream->end(PRIMITIVE_STREAM_FAN); - } - //otherside, the two are equal, so there is no fan to output -} - - -/*output the fan of the left end between grid line i-1 and grid line i*/ -void gridBoundaryChain::leftEndFan(Int i, primStream* pStream) -{ - Int j; - if(getUlineIndex(i) < getUlineIndex(i-1)) - { - pStream->begin(); - pStream->insert(get_vertex(i-1)); - for(j=getUlineIndex(i); j<= getUlineIndex(i-1); j++) - pStream->insert(grid->get_u_value(j), get_v_value(i)); - pStream->end(PRIMITIVE_STREAM_FAN); - } - else if(getUlineIndex(i) > getUlineIndex(i-1)) - { - pStream->begin(); - pStream->insert(get_vertex(i)); - for(j=getUlineIndex(i); j>= getUlineIndex(i-1); j--) - pStream->insert(grid->get_u_value(j), get_v_value(i-1)); - pStream->end(PRIMITIVE_STREAM_FAN); - } - /*otherwisem, the two are equal, so there is no fan to outout*/ -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/gridWrap.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/gridWrap.h deleted file mode 100644 index 1c8237fe27..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/gridWrap.h +++ /dev/null @@ -1,144 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/gridWrap.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef _GRIDWRAP_H -#define _GRIDWRAP_H - -#include -#include "definitions.h" - -#include "primitiveStream.h" -#include "zlassert.h" - -class gridWrap{ - Int n_ulines; - Int n_vlines; - Real u_min, u_max; - Real v_min, v_max; - - /*cache the coordinate values for efficiency. - *these are redundant information when - *the grid is uniform. - */ - Real* u_values; /*size is n_ulines*/ - Real* v_values; /*size is n_vlines*/ - - Int is_uniform; - -public: - //uniform grid constructor - gridWrap(Int nUlines, Int nVlines, - Real uMin, Real uMax, - Real vMin, Real vMax - ); - - //nonuniform grid constructor. - gridWrap(Int nUlines, Real *uvals, - Int nVlines, Real *vvlas - ); - ~gridWrap(); - - void print(); - Int get_n_ulines() {return n_ulines;} - Int get_n_vlines() {return n_vlines;} - Real get_u_min() {return u_min;} - Real get_u_max() {return u_max;} - Real get_v_min() {return v_min;} - Real get_v_max() {return v_max;} - - Real get_u_value(Int i) - { - assert(i=n_ulines){printf("ERROR, n_ulines=%i,i=%i\n",n_ulines,i);exit(0);}*/ - return u_values[i];} - Real get_v_value(Int j) {return v_values[j];} - - Real* get_u_values() {return u_values;} - Real* get_v_values() {return v_values;} - - void outputFanWithPoint(Int v, Int uleft, Int uright, - Real vert[2], primStream* pStream); - - void draw(); - - Int isUniform() {return is_uniform;} -}; - -class gridBoundaryChain{ - gridWrap* grid; - Int firstVlineIndex; - Int nVlines; - Int* ulineIndices; /*each v line has a boundary*/ - Int* innerIndices; /*the segment of the vertical gridline from */ - /*(innerIndices[i], i) to (innerIndices[i+1], i-1) */ - /*is inside the polygon: i=1,...,nVlines-1*/ - - Real2* vertices; /*one grid point at each grid V-line, cached for efficiency*/ - -public: - gridBoundaryChain(gridWrap* gr, Int first_vline_index, Int n_vlines, Int* uline_indices, Int* inner_indices); - - ~gridBoundaryChain() - { - free(innerIndices); - free(ulineIndices); - free(vertices); - } - - /*i indexes the vlines in this chain. - */ - Int getVlineIndex(Int i) {return firstVlineIndex-i;} - Int getUlineIndex(Int i) {return ulineIndices[i];} - Real get_u_value(Int i) {return vertices[i][0];} - Real get_v_value(Int i) {return vertices[i][1];} - Int get_nVlines() {return nVlines;} - Int getInnerIndex(Int i) {return innerIndices[i];} - Real getInner_u_value(Int i) {return grid->get_u_value(innerIndices[i]);} - - Real* get_vertex(Int i) {return vertices[i];} - gridWrap* getGrid() {return grid;} - void leftEndFan(Int i, primStream* pStream); - void rightEndFan(Int i, primStream* pStream); - - Int lookfor(Real v, Int i1, Int i2); //find i in [i1,i2] so that vertices[i][1]>= v > vertices[i+1][1] - void draw(); - void drawInner(); -}; - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/monoChain.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/monoChain.cc deleted file mode 100644 index ae6a7c18d5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/monoChain.cc +++ /dev/null @@ -1,936 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2005/10/28 13:09:08 $ $Revision: 1.2.8.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoChain.cc,v 1.2.8.1 2005/10/28 13:09:08 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include -#include - -#include "glimports.h" -#include "zlassert.h" - -#include "monoChain.h" -#include "quicksort.h" -#include "searchTree.h" -#include "polyUtil.h" - -#ifndef max -#define max(a,b) ((a>b)? a:b) -#endif -#ifndef min -#define min(a,b) ((a>b)? b:a) -#endif - -extern Int isCusp(directedLine *v); -extern Int deleteRepeatDiagonals(Int num_diagonals, directedLine** diagonal_vertices, directedLine** new_vertices); - -//for debug purpose only -#if 0 // UNUSED -static void drawDiagonals(Int num_diagonals, directedLine** diagonal_vertices) -{ - Int i; - for(i=0; ihead()); - glVertex2fv(diagonal_vertices[2*i+1]->head()); - glEnd(); - } -} -#endif - -/*given (x_1, y_1) and (x_2, y_2), and y - *return x such that (x,y) is on the line - */ -inline Real intersectHoriz(Real x1, Real y1, Real x2, Real y2, Real y) -{ - return ((y2==y1)? (x1+x2)*0.5 : x1 + ((y-y1)/(y2-y1)) * (x2-x1)); -} - -//compare the heads of the two chains -static int compChainHeadInY(monoChain* mc1, monoChain* mc2) -{ - return compV2InY(mc1->getHead()->head(), mc2->getHead()->head()); -} - -monoChain::monoChain(directedLine* cHead, directedLine* cTail) -{ - chainHead = cHead; - chainTail = cTail; - next = this; - prev = this; - - nextPolygon = NULL; - - //compute bounding box - directedLine* temp; - minX = maxX = chainTail->head()[0]; - minY = maxY = chainTail->head()[1]; - - for(temp=chainHead; temp!=cTail; temp = temp->getNext()) - { - if(temp->head()[0] < minX) - minX = temp->head()[0]; - if(temp->head()[0] > maxX) - maxX = temp->head()[0]; - - if(temp->head()[1] < minY) - minY = temp->head()[1]; - if(temp->head()[1] > maxY) - maxY = temp->head()[1]; - } - - //check whether the chain is increasing or decreasing - if(chainHead->compInY(chainTail) <0) - isIncrease = 1; - else - isIncrease = 0; - - //initilize currrent, this is used for accelerating search - if(isIncrease) - current = chainHead; - else - current = chainTail; - - isKey = 0; -} - -//insert a new line between prev and this -void monoChain::insert(monoChain* nc) -{ - nc->next = this; - nc->prev = prev; - prev->next = nc; - prev = nc; -} - -void monoChain::deleteLoop() -{ - monoChain *temp, *tempNext; - prev->next = NULL; - for(temp=this; temp != NULL; temp = tempNext) - { - tempNext = temp->next; - delete temp; - } -} - -void monoChain::deleteLoopList() -{ - monoChain *temp, *tempNext; - for(temp=this; temp != NULL; temp = tempNext) - { - tempNext = temp->nextPolygon; - temp->deleteLoop(); - } -} - -Int monoChain::toArraySingleLoop(monoChain** array, Int index) -{ - monoChain *temp; - array[index++] = this; - for(temp = next; temp != this; temp = temp->next) - { - array[index++] = temp; - } - return index; -} - -monoChain** monoChain::toArrayAllLoops(Int& num_chains) -{ - num_chains = numChainsAllLoops(); - monoChain **ret = (monoChain**) malloc(sizeof(monoChain*) * num_chains); - assert(ret); - monoChain *temp; - Int index = 0; - for(temp = this; temp != NULL; temp=temp->nextPolygon){ - index = temp->toArraySingleLoop(ret, index); - } - return ret; -} - -Int monoChain::numChainsSingleLoop() -{ - Int ret=0; - monoChain* temp; - if(next == this) return 1; - ret = 1; - for(temp=next; temp != this; temp = temp->next) - ret++; - return ret; -} - -Int monoChain::numChainsAllLoops() -{ - Int ret=0; - monoChain *temp; - for(temp =this; temp != NULL; temp = temp->nextPolygon) - ret += temp->numChainsSingleLoop(); - return ret; -} - -//update 'current' -Real monoChain::chainIntersectHoriz(Real y) -{ - directedLine* temp; - if(isIncrease) - { - for(temp= current; temp != chainTail; temp = temp->getNext()) - { - if(temp->head()[1] > y) - break; - } - current = temp->getPrev(); - } - else - { - for(temp = current; temp != chainHead; temp = temp->getPrev()) - { - if(temp->head()[1] > y) - break; - } - current = temp->getNext(); - } - return intersectHoriz(current->head()[0], current->head()[1], current->tail()[0], current->tail()[1], y); -} - -monoChain* directedLineLoopToMonoChainLoop(directedLine* loop) -{ - directedLine *temp; - monoChain *ret=NULL; - - //find the first cusp - directedLine *prevCusp=NULL; - directedLine *firstCusp; - - if(isCusp(loop)) - prevCusp = loop; - else - { - for(temp = loop->getNext(); temp != loop; temp = temp->getNext()) - if(isCusp(temp)) - break; - prevCusp = temp; - } - firstCusp = prevCusp; -//printf("first cusp is (%f,%f), (%f,%f), (%f,%f)\n", prevCusp->getPrev()->head()[0], prevCusp->getPrev()->head()[1], prevCusp->head()[0], prevCusp->head()[1], prevCusp->tail()[0], prevCusp->tail()[1]); - - for(temp = prevCusp->getNext(); temp != loop; temp = temp->getNext()) - { - if(isCusp(temp)) - { -//printf("the cusp is (%f,%f), (%f,%f), (%f,%f)\n", temp->getPrev()->head()[0], temp->getPrev()->head()[1], temp->head()[0], temp->head()[1], temp->tail()[0], temp->tail()[1]); - if(ret == NULL) - { - ret = new monoChain(prevCusp, temp); - } - else - ret->insert(new monoChain(prevCusp, temp)); - prevCusp = temp; - } - } - ret->insert(new monoChain(prevCusp, firstCusp)); - - return ret; -} - -monoChain* directedLineLoopListToMonoChainLoopList(directedLine* list) -{ - directedLine* temp; - monoChain* mc; - monoChain* mcEnd; - mc = directedLineLoopToMonoChainLoop(list); - mcEnd = mc; - for(temp = list->getNextPolygon(); temp != NULL; temp = temp->getNextPolygon()) - { - monoChain *newLoop = directedLineLoopToMonoChainLoop(temp); - mcEnd->setNextPolygon(newLoop); - mcEnd = newLoop; - } - return mc; -} - -/*compare two edges of a polygon. - *edge A < edge B if there is a horizontal line so that the intersection - *with A is to the left of the intersection with B. - *This function is used in sweepY for the dynamic search tree insertion to - *order the edges. - * Implementation: (x_1,y_1) and (x_2, y_2) - */ -static Int compEdges(directedLine *e1, directedLine *e2) -{ - Real* head1 = e1->head(); - Real* tail1 = e1->tail(); - Real* head2 = e2->head(); - Real* tail2 = e2->tail(); -/* - Real h10 = head1[0]; - Real h11 = head1[1]; - Real t10 = tail1[0]; - Real t11 = tail1[1]; - Real h20 = head2[0]; - Real h21 = head2[1]; - Real t20 = tail2[0]; - Real t21 = tail2[1]; -*/ - Real e1_Ymax, e1_Ymin, e2_Ymax, e2_Ymin; -/* - if(h11>t11) { - e1_Ymax= h11; - e1_Ymin= t11; - } - else{ - e1_Ymax = t11; - e1_Ymin = h11; - } - - if(h21>t21) { - e2_Ymax= h21; - e2_Ymin= t21; - } - else{ - e2_Ymax = t21; - e2_Ymin = h21; - } -*/ - - if(head1[1]>tail1[1]) { - e1_Ymax= head1[1]; - e1_Ymin= tail1[1]; - } - else{ - e1_Ymax = tail1[1]; - e1_Ymin = head1[1]; - } - - if(head2[1]>tail2[1]) { - e2_Ymax= head2[1]; - e2_Ymin= tail2[1]; - } - else{ - e2_Ymax = tail2[1]; - e2_Ymin = head2[1]; - } - - - /*Real e1_Ymax = max(head1[1], tail1[1]);*/ /*max(e1->head()[1], e1->tail()[1]);*/ - /*Real e1_Ymin = min(head1[1], tail1[1]);*/ /*min(e1->head()[1], e1->tail()[1]);*/ - /*Real e2_Ymax = max(head2[1], tail2[1]);*/ /*max(e2->head()[1], e2->tail()[1]);*/ - /*Real e2_Ymin = min(head2[1], tail2[1]);*/ /*min(e2->head()[1], e2->tail()[1]);*/ - - Real Ymax = min(e1_Ymax, e2_Ymax); - Real Ymin = max(e1_Ymin, e2_Ymin); - - Real y = 0.5*(Ymax + Ymin); - -/* Real x1 = intersectHoriz(e1->head()[0], e1->head()[1], e1->tail()[0], e1->tail()[1], y); - Real x2 = intersectHoriz(e2->head()[0], e2->head()[1], e2->tail()[0], e2->tail()[1], y); -*/ -/* - Real x1 = intersectHoriz(h10, h11, t10, t11, y); - Real x2 = intersectHoriz(h20, h21, t20, t21, y); -*/ - Real x1 = intersectHoriz(head1[0], head1[1], tail1[0], tail1[1], y); - Real x2 = intersectHoriz(head2[0], head2[1], tail2[0], tail2[1], y); - - if(x1<= x2) return -1; - else return 1; -} - -Int compChains(monoChain* mc1, monoChain* mc2) -{ - Real y; - assert(mc1->isKey || mc2->isKey); - if(mc1->isKey) - y = mc1->keyY; - else - y = mc2->keyY; - directedLine *d1 = mc1->find(y); - directedLine *d2 = mc2->find(y); - mc2->find(y); -// Real x1 = mc1->chainIntersectHoriz(y); -// Real x2 = mc2->chainIntersectHoriz(y); - return compEdges(d1, d2); -} - -//this function modifies current for efficiency -directedLine* monoChain::find(Real y) -{ - directedLine *ret; - directedLine *temp; - assert(current->head()[1] <= y); - if(isIncrease) - { - assert(chainTail->head()[1] >=y); - for(temp=current; temp!=chainTail; temp = temp->getNext()) - { - if(temp->head()[1] > y) - break; - } - current = temp->getPrev(); - ret = current; - } - else - { - for(temp=current; temp != chainHead; temp = temp->getPrev()) - { - if(temp->head()[1] > y) - break; - } - current = temp->getNext(); - ret = temp; - } - return ret; -} - -void monoChain::printOneChain() -{ - directedLine* temp; - for(temp = chainHead; temp != chainTail; temp = temp->getNext()) - { - printf("(%f,%f) ", temp->head()[0], temp->head()[1]); - } - printf("(%f,%f) \n", chainTail->head()[0], chainTail->head()[1]); -} - -void monoChain::printChainLoop() -{ - monoChain* temp; - this->printOneChain(); - for(temp = next; temp != this; temp = temp->next) - { - temp->printOneChain(); - } - printf("\n"); -} - -void monoChain::printAllLoops() -{ - monoChain* temp; - for(temp=this; temp != NULL; temp = temp->nextPolygon) - temp->printChainLoop(); -} - -//return 1 if error occures -Int MC_sweepY(Int nVertices, monoChain** sortedVertices, sweepRange** ret_ranges) -{ - Int i; - Real keyY; - Int errOccur=0; -//printf("enter MC_sweepY\n"); -//printf("nVertices=%i\n", nVertices); - /*for each vertex in the sorted list, update the binary search tree. - *and store the range information for each vertex. - */ - treeNode* searchTree = NULL; -//printf("nVertices=%i\n", nVertices); - for(i=0; igetHead()->head()[1]; //the sweep line - directedLine *dline = vert->getHead(); - directedLine *dlinePrev = dline->getPrev(); - if(isBelow(dline, dline) && isBelow(dline, dlinePrev)) - { -//printf("case 1\n"); - //thisisKey = 1; - vert->keyY = keyY; - treeNode* thisNode = TreeNodeFind(searchTree, vert, (Int (*) (void *, void *))compChains); - vert->isKey = 0; - - vert->getPrev()->isKey = 1; - vert->getPrev()->keyY = keyY; - treeNode* prevNode = TreeNodeFind(searchTree, vert->getPrev(), (Int (*) (void *, void *))compChains); - vert->getPrev()->isKey = 0; - - if(cuspType(dline) == 1)//interior cusp - { - - treeNode* leftEdge = TreeNodePredecessor(prevNode); - treeNode* rightEdge = TreeNodeSuccessor(thisNode); - if(leftEdge == NULL || rightEdge == NULL) - { - errOccur = 1; - goto JUMP_HERE; - } - - directedLine* leftEdgeDline = ((monoChain* ) leftEdge->key)->find(keyY); - - - - directedLine* rightEdgeDline = ((monoChain* ) rightEdge->key)->find(keyY); - - ret_ranges[i] = sweepRangeMake(leftEdgeDline, 1, rightEdgeDline, 1); - } - else /*exterior cusp*/ - { - ret_ranges[i] = sweepRangeMake( dline, 1, dlinePrev, 1); - } - - searchTree = TreeNodeDeleteSingleNode(searchTree, thisNode); - searchTree = TreeNodeDeleteSingleNode(searchTree, prevNode); - - } - else if(isAbove(dline, dline) && isAbove(dline, dlinePrev)) - { -//printf("case 2\n"); - //insert both edges - treeNode* thisNode = TreeNodeMake(vert); - treeNode* prevNode = TreeNodeMake(vert->getPrev()); - - vert->isKey = 1; - vert->keyY = keyY; - searchTree = TreeNodeInsert(searchTree, thisNode, (Int (*) (void *, void *))compChains); - vert->isKey = 0; - - vert->getPrev()->isKey = 1; - vert->getPrev()->keyY = keyY; - searchTree = TreeNodeInsert(searchTree, prevNode, (Int (*) (void *, void *))compChains); - vert->getPrev()->isKey = 0; - - if(cuspType(dline) == 1) //interior cusp - { -//printf("cuspType is 1\n"); - treeNode* leftEdge = TreeNodePredecessor(thisNode); - treeNode* rightEdge = TreeNodeSuccessor(prevNode); - if(leftEdge == NULL || rightEdge == NULL) - { - errOccur = 1; - goto JUMP_HERE; - } -//printf("leftEdge is %i, rightEdge is %i\n", leftEdge, rightEdge); - directedLine* leftEdgeDline = ((monoChain*) leftEdge->key)->find(keyY); - directedLine* rightEdgeDline = ((monoChain*) rightEdge->key)->find(keyY); - ret_ranges[i] = sweepRangeMake( leftEdgeDline, 1, rightEdgeDline, 1); - } - else //exterior cusp - { -//printf("cuspType is not 1\n"); - ret_ranges[i] = sweepRangeMake(dlinePrev, 1, dline, 1); - } - } - else - { -//printf("%i,%i\n", isAbove(dline, dline), isAbove(dline, dlinePrev)); - errOccur = 1; - goto JUMP_HERE; - - fprintf(stderr, "error in MC_sweepY\n"); - exit(1); - } - } - - JUMP_HERE: - //finally clean up space: delete the search tree - TreeNodeDeleteWholeTree(searchTree); - return errOccur; -} - -void MC_findDiagonals(Int total_num_edges, monoChain** sortedVertices, - sweepRange** ranges, Int& num_diagonals, - directedLine** diagonal_vertices) -{ - Int i,j,k; - k=0; - //reset 'current' of all the monoChains - for(i=0; iresetCurrent(); - - for(i=0; igetHead(); - directedLine* thisEdge = vert; - directedLine* prevEdge = vert->getPrev(); - if(isBelow(vert, thisEdge) && isBelow(vert, prevEdge) && compEdges(prevEdge, thisEdge)<0) - { - //this is an upward interior cusp - diagonal_vertices[k++] = vert; - - directedLine* leftEdge = ranges[i]->left; - directedLine* rightEdge = ranges[i]->right; - - directedLine* leftVert = leftEdge; - directedLine* rightVert = rightEdge->getNext(); - assert(leftVert->head()[1] >= vert->head()[1]); - assert(rightVert->head()[1] >= vert->head()[1]); - directedLine* minVert = (leftVert->head()[1] <= rightVert->head()[1])?leftVert:rightVert; - Int found = 0; - for(j=i+1; jgetHead()->head()[1] > minVert->head()[1]) - break; - - if(sweepRangeEqual(ranges[i], ranges[j])) - { - found = 1; - break; - } - } - - if(found) - diagonal_vertices[k++] = sortedVertices[j]->getHead(); - else - diagonal_vertices[k++] = minVert; - } - else if(isAbove(vert, thisEdge) && isAbove(vert, prevEdge) && compEdges(prevEdge, thisEdge)>0) - { - //downward interior cusp - diagonal_vertices[k++] = vert; - directedLine* leftEdge = ranges[i]->left; - directedLine* rightEdge = ranges[i]->right; - directedLine* leftVert = leftEdge->getNext(); - directedLine* rightVert = rightEdge; - assert(leftVert->head()[1] <= vert->head()[1]); - assert(rightVert->head()[1] <= vert->head()[1]); - directedLine* maxVert = (leftVert->head()[1] > rightVert->head()[1])? leftVert:rightVert; - Int found=0; - for(j=i-1; j>=0; j--) - { - if(sortedVertices[j]->getHead()->head()[1] < maxVert->head()[1]) - break; - if(sweepRangeEqual(ranges[i], ranges[j])) - { - found = 1; - break; - } - } - if(found) - diagonal_vertices[k++] = sortedVertices[j]->getHead(); - else - diagonal_vertices[k++] = maxVert; - } - } - num_diagonals = k/2; -} - - - - -directedLine* MC_partitionY(directedLine *polygons, sampledLine **retSampledLines) -{ -//printf("enter mc_partitionY\n"); - Int total_num_chains = 0; - monoChain* loopList = directedLineLoopListToMonoChainLoopList(polygons); - monoChain** array = loopList->toArrayAllLoops(total_num_chains); - - if(total_num_chains<=2) //there is just one single monotone polygon - { - loopList->deleteLoopList(); - free(array); - *retSampledLines = NULL; - return polygons; - } - -//loopList->printAllLoops(); -//printf("total_num_chains=%i\n", total_num_chains); - quicksort( (void**)array, 0, total_num_chains-1, (Int (*)(void*, void*))compChainHeadInY); -//printf("after quicksort\n"); - - sweepRange** ranges = (sweepRange**)malloc(sizeof(sweepRange*) * (total_num_chains)); - assert(ranges); - - if(MC_sweepY(total_num_chains, array, ranges)) - { - loopList->deleteLoopList(); - free(array); - *retSampledLines = NULL; - return NULL; - } -//printf("after MC_sweepY\n"); - - - Int num_diagonals; - /*number diagonals is < total_num_edges*total_num_edges*/ - directedLine** diagonal_vertices = (directedLine**) malloc(sizeof(directedLine*) * total_num_chains*2/*total_num_edges*/); - assert(diagonal_vertices); - -//printf("before call MC_findDiagonales\n"); - - MC_findDiagonals(total_num_chains, array, ranges, num_diagonals, diagonal_vertices); -//printf("after call MC_findDia, num_diagnla=%i\n", num_diagonals); - - directedLine* ret_polygons = polygons; - sampledLine* newSampledLines = NULL; - Int i,k; - - num_diagonals=deleteRepeatDiagonals(num_diagonals, diagonal_vertices, diagonal_vertices); - - - -//drawDiagonals(num_diagonals, diagonal_vertices); -//printf("diagoanls are \n"); -//for(i=0; ihead()[0], diagonal_vertices[2*i]->head()[1]); -// printf("**(%f,%f)\n", diagonal_vertices[2*i+1]->head()[0], diagonal_vertices[2*i+1]->head()[1]); -// } - - Int *removedDiagonals=(Int*)malloc(sizeof(Int) * num_diagonals); - for(i=0; ifindRoot(); - directedLine *root2 = v2->findRoot(); - assert(root1); - assert(root2); -*/ - -directedLine* root1 = v1->rootLinkFindRoot(); -directedLine* root2 = v2->rootLinkFindRoot(); - - if(root1 != root2) - { - - removedDiagonals[i] = 1; - sampledLine* generatedLine; - - - - v1->connectDiagonal(v1,v2, &ret_p1, &ret_p2, &generatedLine, ret_polygons); - - - - newSampledLines = generatedLine->insert(newSampledLines); -/* - ret_polygons = ret_polygons->cutoffPolygon(root1); - - ret_polygons = ret_polygons->cutoffPolygon(root2); - ret_polygons = ret_p1->insertPolygon(ret_polygons); -root1->rootLinkSet(ret_p1); -root2->rootLinkSet(ret_p1); -ret_p1->rootLinkSet(NULL); -ret_p2->rootLinkSet(ret_p1); -*/ - ret_polygons = ret_polygons->cutoffPolygon(root2); - - - -root2->rootLinkSet(root1); -ret_p1->rootLinkSet(root1); -ret_p2->rootLinkSet(root1); - - /*now that we have connected the diagonal v1 and v2, - *we have to check those unprocessed diagonals which - *have v1 or v2 as an end point. Notice that the head of v1 - *has the same coodinates as the head of v2->prev, and the head of - *v2 has the same coordinate as the head of v1->prev. - *Suppose these is a diagonal (v1, x). If (v1,x) is still a valid - *diagonal, then x should be on the left hand side of the directed line: *v1->prev->head -- v1->head -- v1->tail. Otherwise, (v1,x) should be - *replaced by (v2->prev, x), that is, x is on the left of - * v2->prev->prev->head, v2->prev->head, v2->prev->tail. - */ - Int ii, kk; - for(ii=0, kk=0; iiprev->head:v1->head:v1->tail*/ - if(! pointLeft2Lines(v1->getPrev()->head(), - v1->head(), v1->tail(), d2->head())) - { -/* - assert(pointLeft2Lines(v2->getPrev()->getPrev()->head(), - v2->getPrev()->head(), - v2->getPrev()->tail(), d2->head())); -*/ - diagonal_vertices[kk] = v2->getPrev(); - } - } - if(d1 == v2) { - /*check if d2 is to left of v2->prev->head:v2->head:v2->tail*/ - if(! pointLeft2Lines(v2->getPrev()->head(), - v2->head(), v2->tail(), d2->head())) - { -/* - assert(pointLeft2Lines(v1->getPrev()->getPrev()->head(), - v1->getPrev()->head(), - v1->getPrev()->tail(), d2->head())); -*/ - diagonal_vertices[kk] = v1->getPrev(); - } - } - /*check d2 and replace diagonal_vertices[k+1] if necessary*/ - if(d2 == v1) { - /*check if d1 is to left of v1->prev->head:v1->head:v1->tail*/ - if(! pointLeft2Lines(v1->getPrev()->head(), - v1->head(), v1->tail(), d1->head())) - { -/* assert(pointLeft2Lines(v2->getPrev()->getPrev()->head(), - v2->getPrev()->head(), - v2->getPrev()->tail(), d1->head())); -*/ - diagonal_vertices[kk+1] = v2->getPrev(); - } - } - if(d2 == v2) { - /*check if d1 is to left of v2->prev->head:v2->head:v2->tail*/ - if(! pointLeft2Lines(v2->getPrev()->head(), - v2->head(), v2->tail(), d1->head())) - { -/* assert(pointLeft2Lines(v1->getPrev()->getPrev()->head(), - v1->getPrev()->head(), - v1->getPrev()->tail(), d1->head())); -*/ - diagonal_vertices[kk+1] = v1->getPrev(); - } - } - } -}/*end if (root1 not equal to root 2)*/ -} - - /*second pass, now all diagoals should belong to the same polygon*/ -//printf("second pass: \n"); - -// for(i=0; ifindRoot(); -/* - directedLine *root2 = v2->findRoot(); - - - - assert(root1); - assert(root2); - assert(root1 == root2); - */ - sampledLine* generatedLine; - - - - v1->connectDiagonal(v1,v2, &ret_p1, &ret_p2, &generatedLine, ret_polygons); - newSampledLines = generatedLine->insert(newSampledLines); - - ret_polygons = ret_polygons->cutoffPolygon(root1); - - ret_polygons = ret_p1->insertPolygon(ret_polygons); - - ret_polygons = ret_p2->insertPolygon(ret_polygons); - - - - for(Int j=i+1; jsamePolygon(temp1, temp2)) - { - /*if temp1 and temp2 are in different polygons, - *then one of them must be v1 or v2. - */ - - - - assert(temp1==v1 || temp1 == v2 || temp2==v1 || temp2 ==v2); - if(temp1==v1) - { - diagonal_vertices[2*j] = v2->getPrev(); - } - if(temp2==v1) - { - diagonal_vertices[2*j+1] = v2->getPrev(); - } - if(temp1==v2) - { - diagonal_vertices[2*j] = v1->getPrev(); - } - if(temp2==v2) - { - diagonal_vertices[2*j+1] = v1->getPrev(); - } - } - } - } - - } - - - //clean up - loopList->deleteLoopList(); - free(array); - free(ranges); - free(diagonal_vertices); - free(removedDiagonals); - - *retSampledLines = newSampledLines; - return ret_polygons; -} - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/monoChain.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/monoChain.h deleted file mode 100644 index e25b18028c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/monoChain.h +++ /dev/null @@ -1,110 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoChain.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef _MONO_CHAIN_H -#define _MONO_CHAIN_H - -#include "directedLine.h" -#include "partitionY.h" - -class monoChain; - -class monoChain{ - directedLine* chainHead; - directedLine* chainTail; - monoChain* next; - monoChain* prev; - monoChain* nextPolygon; //a list of polygons - - //cached informatin - //bounding box - Real minX, maxX, minY, maxY; - Int isIncrease; - - //for efficiently comparing two chains - - directedLine* current; - -public: - monoChain(directedLine* cHead, directedLine* cTail); - ~monoChain() {} - - inline void setNext(monoChain* n) {next = n;} - inline void setPrev(monoChain* p) {prev = p;} - inline void setNextPolygon(monoChain* np) {nextPolygon = np;} - inline monoChain* getNext() {return next;} - inline monoChain* getPrev() {return prev;} - inline directedLine* getHead() {return chainHead;} - inline directedLine* getTail() {return chainTail;} - - inline void resetCurrent() { current = ((isIncrease==1)? chainHead:chainTail);} - - void deleteLoop(); - void deleteLoopList(); - - //insert a new chain between prev and this - void insert(monoChain* nc); - - Int numChainsSingleLoop(); - Int numChainsAllLoops(); - monoChain** toArrayAllLoops(Int& num_chains); - Int toArraySingleLoop(monoChain** array, Int index); - - Int isKey; - Real keyY; //the current horizotal line - Real chainIntersectHoriz(Real y); //updates current incrementally for efficiency - directedLine* find(Real y);//find dline so that y intersects dline. - - void printOneChain(); - void printChainLoop(); - void printAllLoops(); - -}; - -monoChain* directedLineLoopToMonoChainLoop(directedLine* loop); -monoChain* directedLineLoopListToMonoChainLoopList(directedLine* list); -Int MC_sweepY(Int nVertices, monoChain** sortedVertices, sweepRange** ret_ranges); - -void MC_findDiagonals(Int total_num_edges, monoChain** sortedVertices, - sweepRange** ranges, Int& num_diagonals, - directedLine** diagonal_vertices); - -directedLine* MC_partitionY(directedLine *polygons, sampledLine **retSampledLines); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.cc deleted file mode 100644 index 6405d277fe..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.cc +++ /dev/null @@ -1,300 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* - *monoPolyPart.C - * - *To partition a v-monotone polygon into some uv-monotone polygons. - *The algorithm is different from the general monotone partition algorithm. - *while the general monotone partition algorithm works for this special case, - *but it is more expensive (O(nlogn)). The algorithm implemented here takes - *advantage of the fact that the input is a v-monotone polygon and it is - *conceptually simpler and computationally cheaper (a linear time algorithm). - *The algorithm is described in Zicheng Liu's paper - * "Quality-Oriented Linear Time Tessellation". - */ - -#include -#include -#include "directedLine.h" -#include "monoPolyPart.h" - -/*a vertex is u_maximal if both of its two neightbors are to the left of this - *vertex - */ -static Int is_u_maximal(directedLine* v) -{ - if (compV2InX(v->getPrev()->head(), v->head()) == -1 && - compV2InX(v->getNext()->head(), v->head()) == -1) - return 1; - else - return 0; -} - -/*a vertex is u_minimal if both of its two neightbors are to the right of this - *vertex - */ -static Int is_u_minimal(directedLine* v) -{ - if (compV2InX(v->getPrev()->head(), v->head()) == 1 && - compV2InX(v->getNext()->head(), v->head()) == 1) - return 1; - else - return 0; -} - -/*poly: a v-monotone polygon - *return: a linked list of uv-monotone polygons. - */ -directedLine* monoPolyPart(directedLine* polygon) -{ - //handle special cases: - if(polygon == NULL) - return NULL; - if(polygon->getPrev() == polygon) - return polygon; - if(polygon->getPrev() == polygon->getNext()) - return polygon; - if(polygon->getPrev()->getPrev() == polygon->getNext()) - return polygon; - - //find the top and bottom vertexes - directedLine *tempV, *topV, *botV; - topV = botV = polygon; - for(tempV = polygon->getNext(); tempV != polygon; tempV = tempV->getNext()) - { - if(compV2InY(topV->head(), tempV->head())<0) { - topV = tempV; - } - if(compV2InY(botV->head(), tempV->head())>0) { - botV = tempV; - } - } - - //initilization - directedLine *A, *B, *C, *D, *G, *H; - //find A:the first u_maximal vertex on the left chain - //and C: the left most vertex between top and A - A = NULL; - C = topV; - for(tempV=topV->getNext(); tempV != botV; tempV = tempV->getNext()) - { - if(tempV->head()[0] < C->head()[0]) - C = tempV; - - if(is_u_maximal(tempV)) - { - A = tempV; - break; - } - } - if(A == NULL) - { - A = botV; - if(A->head()[0] < C->head()[0]) - C = A; - } - - //find B: the first u_minimal vertex on the right chain - //and D: the right most vertex between top and B - B = NULL; - D = topV; - for(tempV=topV->getPrev(); tempV != botV; tempV = tempV->getPrev()) - { - if(tempV->head()[0] > D->head()[0]) - D = tempV; - if(is_u_minimal(tempV)) - { - B = tempV; - break; - } - } - if(B == NULL) - { - B = botV; - if(B->head()[0] > D->head()[0]) - D = B; - } - - //error checking XXX - if(C->head()[0] >= D->head()[0]) - return polygon; - - //find G on the left chain that is right above B - for(tempV=topV; compV2InY(tempV->head(), B->head()) == 1; tempV=tempV->getNext()); - G = tempV->getPrev(); - //find H on the right chain that is right above A - for(tempV=topV; compV2InY(tempV->head(), A->head()) == 1; tempV = tempV->getPrev()); - H = tempV->getNext(); - - //Main Loop - directedLine* ret = NULL; - directedLine* currentPolygon = polygon; - while(1) - { - //if both B and D are equal to botV, then this polygon is already - //u-monotone - if(A == botV && B == botV) - { - ret = currentPolygon->insertPolygon(ret); - return ret; - } - else //not u-monotone - { - directedLine *ret_p1, *ret_p2; - if(compV2InY(A->head(),B->head()) == 1) //A is above B - { - directedLine* E = NULL; - for(tempV = C; tempV != D; tempV = tempV->getPrev()) - { - if(tempV->head()[0] >= A->head()[0]) - { - E = tempV; - break; - } - } - - if(E == NULL) - E = D; - if(E->head()[0]> H->head()[0]) - E = H; - //connect AE and output polygon ECA - polygon->connectDiagonal_2slines(A, E, - &ret_p1, - &ret_p2, - NULL); - ret = ret_p2->insertPolygon(ret); - currentPolygon = ret_p1; - - if(E == D) - D = ret_p1; - if(E == H) - H = ret_p1; - if(G->head()[1] >= A->head()[1]) - G = A; - //update A to be the next u-maxiaml vertex on left chain - //and C the leftmost vertex between the old A and the new A - C = A; - for(tempV = A->getNext(); tempV != botV; tempV = tempV->getNext()) - { - - if(tempV->head()[0] < C->head()[0]) - C = tempV; - if(is_u_maximal(tempV)) - { - A = tempV; - break; - } - } - - if(tempV == botV) - { - A = botV; - if(botV->head()[0] < C->head()[0]) - C = botV; - } - //update H - - if(A == botV) - H = botV; - else - { - for(tempV = H; compV2InY(tempV->head(), A->head()) == 1; tempV = tempV->getPrev()); - H = tempV->getNext(); - } - - } - else //A is below B - { - - directedLine* F = NULL; - for(tempV = D; tempV != C; tempV = tempV->getNext()) - { - if(tempV->head()[0] <= B->head()[0]) - { - F = tempV; - break; - } - } - if(F == NULL) - F = C; - if(F->head()[0] < G->head()[0]) - F = G; - - //connect FB - polygon->connectDiagonal_2slines(F, B, - &ret_p1, - &ret_p2, - NULL); - ret = ret_p2->insertPolygon(ret); - currentPolygon = ret_p1; - B = ret_p1; - if(H ->head()[1] >= B->head()[1]) - H = ret_p1; - - //update B to be the next u-minimal vertex on right chain - //and D the rightmost vertex between the old B and the new B - D = B; - for(tempV = B->getPrev(); tempV != botV; tempV = tempV->getPrev()) - { - if(tempV->head()[0] > D->head()[0]) - D = tempV; - if(is_u_minimal(tempV)) - { - B = tempV; - break; - } - } - if(tempV == botV) - { - B = botV; - if(botV->head()[0] > D->head()[0]) - D = botV; - } - //update G - if(B == botV) - G = botV; - else - { - for(tempV = G; compV2InY(tempV->head(), B->head()) == 1; tempV = tempV->getNext()); - G = tempV->getPrev(); - } - } //end of A is below B - } //end not u-monotone - } //end of main loop -} - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h deleted file mode 100644 index b760862dcb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h +++ /dev/null @@ -1,47 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* - *monoPolyPart.h - */ - -#ifndef _MONO_POLY_PART_H -#define _MONO_POLY_PART_H - -class directedLine; - -directedLine* monoPolyPart(directedLine* polygon); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc deleted file mode 100644 index 5f3185594d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc +++ /dev/null @@ -1,1482 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2005/10/28 13:09:09 $ $Revision: 1.3.8.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc,v 1.3.8.1 2005/10/28 13:09:09 brianp Exp $ -*/ - -#include -#include -#include "gluos.h" -#include "glimports.h" -#include "zlassert.h" - -#include "monoTriangulation.h" -#include "polyUtil.h" /*for area*/ -#include "partitionX.h" -#include "monoPolyPart.h" - - - -extern directedLine* polygonConvert(directedLine* polygon); - -/*poly is NOT deleted - */ -void monoTriangulationOpt(directedLine* poly, primStream* pStream) -{ - Int n_cusps; - Int n_edges = poly->numEdges(); - directedLine** cusps = (directedLine**) malloc(sizeof(directedLine*)*n_edges); - assert(cusps); - findInteriorCuspsX(poly, n_cusps, cusps); - if(n_cusps ==0) //u monotine - { - monoTriangulationFun(poly, compV2InX, pStream); - } - else if(n_cusps == 1) // one interior cusp - { - directedLine* new_polygon = polygonConvert(cusps[0]); - directedLine* other = findDiagonal_singleCuspX(new_polygon); - // should NOT be null unless there are self-intersecting - //trim curves. In that case, we don't want to core dump, instead, - //we triangulate anyway, and print out error message. - if(other == NULL) - { - monoTriangulationFun(poly, compV2InX, pStream); - } - else - { - directedLine* ret_p1; - directedLine* ret_p2; - - new_polygon->connectDiagonal_2slines(new_polygon, other, - &ret_p1, - &ret_p2, - new_polygon); - - monoTriangulationFun(ret_p1, compV2InX, pStream); - monoTriangulationFun(ret_p2, compV2InX, pStream); - - ret_p1->deleteSinglePolygonWithSline(); - ret_p2->deleteSinglePolygonWithSline(); - } - } - else - { - //we need a general partitionX funtion (supposed to be in partitionX.C, - //not implemented yet. XXX - monoTriangulationFun(poly, compV2InY, pStream); - } - - free(cusps); -} - -void monoTriangulationRecOpt(Real* topVertex, Real* botVertex, - vertexArray* left_chain, Int left_current, - vertexArray* right_chain, Int right_current, - primStream* pStream) -{ - Int i,j; - Int n_left = left_chain->getNumElements(); - Int n_right = right_chain->getNumElements(); - if(left_current>= n_left-1 || - right_current>= n_right-1) - { - monoTriangulationRec(topVertex, botVertex, left_chain, left_current, - right_chain, right_current, pStream); - return; - } - //now both left and right have at least two vertices each. - Real left_v = left_chain->getVertex(left_current)[1]; - Real right_v = right_chain->getVertex(right_current)[1]; - - if(left_v <= right_v) //first left vertex is below right - { - //find the last vertex of right which is above or equal to left - for(j=right_current; j<=n_right-1; j++) - { - if(right_chain->getVertex(j)[1] < left_v) - break; - } - monoTriangulationRecGen(topVertex, left_chain->getVertex(left_current), - left_chain, left_current, left_current, - right_chain, right_current, j-1, - pStream); - monoTriangulationRecOpt(right_chain->getVertex(j-1), - botVertex, - left_chain, left_current, - right_chain, j, - pStream); - } - else //first right vertex is strictly below left - { - //find the last vertex of left which is strictly above right - for(i=left_current; i<=n_left-1; i++) - { - if(left_chain->getVertex(i)[1] <= right_v) - break; - } - monoTriangulationRecGen(topVertex, right_chain->getVertex(right_current), - left_chain, left_current, i-1, - right_chain, right_current, right_current, - pStream); - monoTriangulationRecOpt(left_chain->getVertex(i-1), - botVertex, - left_chain, i, - right_chain, right_current, - pStream); - } -} - - -void monoTriangulationRecGenTBOpt(Real* topVertex, Real* botVertex, - vertexArray* inc_chain, Int inc_current, Int inc_end, - vertexArray* dec_chain, Int dec_current, Int dec_end, - primStream* pStream) -{ - pStream->triangle(topVertex, inc_chain->getVertex(inc_current), dec_chain->getVertex(dec_current)); - -/*printf("**(%f,%f)\n", inc_chain->getArray()[0][0],inc_chain->getArray()[0][1]);*/ - triangulateXYMonoTB(inc_end-inc_current+1, inc_chain->getArray()+inc_current, dec_end-dec_current+1, dec_chain->getArray()+dec_current, pStream); - - pStream->triangle(botVertex, dec_chain->getVertex(dec_end), inc_chain->getVertex(inc_end)); -} - - -/*n_left>=1 - *n_right>=1 - *the strip is going top to bottom. compared to the funtion - * triangulateXYmono() - */ -void triangulateXYMonoTB(Int n_left, Real** leftVerts, - Int n_right, Real** rightVerts, - primStream* pStream) -{ - - - Int i,j,k,l; - Real* topMostV; - - assert(n_left>=1 && n_right>=1); - if(leftVerts[0][1] >= rightVerts[0][1]) - { - i=1; - j=0; - topMostV = leftVerts[0]; - } - else - { - i=0; - j=1; - topMostV = rightVerts[0]; - } - - while(1) - { - if(i >= n_left) /*case1: no more in left*/ - { - - if(jbegin(); - pStream->insert(topMostV); - for(k=n_right-1; k>=j; k--) - pStream->insert(rightVerts[j]); - - pStream->end(PRIMITIVE_STREAM_FAN); - - } - - break; - } - else if(j>= n_right) /*case2: no more in right*/ - { - - if(ibegin(); - pStream->insert(topMostV); - - for(k=i; kinsert(leftVerts[k]); - - pStream->end(PRIMITIVE_STREAM_FAN); - } - - break; - } - else /* case3: neither is empty, plus the topMostV, there is at least one triangle to output*/ - { - - if(leftVerts[i][1] >= rightVerts[j][1]) - { - pStream->begin(); - pStream->insert(rightVerts[j]); /*the origin of this fan*/ - - pStream->insert(topMostV); - - /*find the last k>=i such that - *leftverts[k][1] >= rightverts[j][1] - */ - k=i; - while(kinsert(leftVerts[l]); - } - - pStream->end(PRIMITIVE_STREAM_FAN); - //update i for next loop - i = k+1; - topMostV = leftVerts[k]; - - } - else /*leftVerts[i][1] < rightVerts[j][1]*/ - { - pStream->begin(); - pStream->insert(leftVerts[i]);/*the origion of this fan*/ - - /*find the last k>=j such that - *rightverts[k][1] > leftverts[i][1]*/ - k=j; - while(k< n_right) - { - if(rightVerts[k][1] <= leftVerts[i][1]) - break; - k++; - } - k--; - - for(l=k; l>= j; l--) - pStream->insert(rightVerts[l]); - - pStream->insert(topMostV); - pStream->end(PRIMITIVE_STREAM_FAN); - j=k+1; - topMostV = rightVerts[j-1]; - } - } - } -} - -static int chainConvex(vertexArray* inc_chain, Int inc_current, Int inc_end) -{ - Int i; - //if there are no more than 2 vertices, return 1 - if(inc_current >= inc_end-1) return 1; - for(i=inc_current; i<= inc_end-2; i++) - { - if(area(inc_chain->getVertex(i), inc_chain->getVertex(i+1), inc_chain->getVertex(i+2)) <0) - return 0; - } - return 1; -} - -static int chainConcave(vertexArray* dec_chain, Int dec_current, Int dec_end) -{ - Int i; - //if there are no more than 2 vertices, return 1 - if(dec_current >= dec_end -1) return 1; - for(i=dec_current; i<=dec_end-2; i++) - { - if(area(dec_chain->getVertex(i), dec_chain->getVertex(i+1), dec_chain->getVertex(i+2)) >0) - return 0; - } - return 1; -} - -void monoTriangulationRecGenInU(Real* topVertex, Real* botVertex, - vertexArray* inc_chain, Int inc_current, Int inc_end, - vertexArray* dec_chain, Int dec_current, Int dec_end, - primStream* pStream) -{ - -} - -void monoTriangulationRecGenOpt(Real* topVertex, Real* botVertex, - vertexArray* inc_chain, Int inc_current, Int inc_end, - vertexArray* dec_chain, Int dec_current, Int dec_end, - primStream* pStream) -{ - Int i; - //copy this to a polygon: directedLine Lioop - sampledLine* sline; - directedLine* dline; - directedLine* poly; - - if(inc_current <= inc_end) //at least one vertex in inc_chain - { - sline = new sampledLine(topVertex, inc_chain->getVertex(inc_current)); - poly = new directedLine(INCREASING, sline); - for(i=inc_current; i<=inc_end-1; i++) - { - sline = new sampledLine(inc_chain->getVertex(i), inc_chain->getVertex(i+1)); - dline = new directedLine(INCREASING, sline); - poly->insert(dline); - } - sline = new sampledLine(inc_chain->getVertex(inc_end), botVertex); - dline = new directedLine(INCREASING, sline); - poly->insert(dline); - } - else //inc_chian is empty - { - sline = new sampledLine(topVertex, botVertex); - dline = new directedLine(INCREASING, sline); - poly = dline; - } - - assert(poly != NULL); - - if(dec_current <= dec_end) //at least on vertex in dec_Chain - { - sline = new sampledLine(botVertex, dec_chain->getVertex(dec_end)); - dline = new directedLine(INCREASING, sline); - poly->insert(dline); - for(i=dec_end; i>dec_current; i--) - { - sline = new sampledLine(dec_chain->getVertex(i), dec_chain->getVertex(i-1)); - dline = new directedLine(INCREASING, sline); - poly->insert(dline); - } - sline = new sampledLine(dec_chain->getVertex(dec_current), topVertex); - dline = new directedLine(INCREASING, sline); - poly->insert(dline); - } - else //dec_chain is empty - { - sline = new sampledLine(botVertex, topVertex); - dline = new directedLine(INCREASING, sline); - poly->insert(dline); - } - - { - Int n_cusps; - Int n_edges = poly->numEdges(); - directedLine** cusps = (directedLine**) malloc(sizeof(directedLine*)*n_edges); - assert(cusps); - findInteriorCuspsX(poly, n_cusps, cusps); - - if(n_cusps ==0) //u monotine - { - monoTriangulationFun(poly, compV2InX, pStream); - } - else if(n_cusps == 1) // one interior cusp - { - directedLine* new_polygon = polygonConvert(cusps[0]); - directedLine* other = findDiagonal_singleCuspX(new_polygon); - // should NOT be null unless there are self-intersecting - //trim curves. In that case, we don't want to core dump, instead, - //we triangulate anyway, and print out error message. - if(other == NULL) - { - monoTriangulationFun(poly, compV2InX, pStream); - } - else - { - directedLine* ret_p1; - directedLine* ret_p2; - - new_polygon->connectDiagonal_2slines(new_polygon, other, - &ret_p1, - &ret_p2, - new_polygon); - - monoTriangulationFun(ret_p1, compV2InX, pStream); - monoTriangulationFun(ret_p2, compV2InX, pStream); - - ret_p1->deleteSinglePolygonWithSline(); - ret_p2->deleteSinglePolygonWithSline(); - } - } - else - { - //we need a general partitionX funtion (supposed to be in partitionX.C, - //not implemented yet. XXX - //monoTriangulationFun(poly, compV2InY, pStream); - - directedLine* new_polygon = polygonConvert(poly); - directedLine* list = monoPolyPart(new_polygon); - for(directedLine* temp = list; temp != NULL; temp = temp->getNextPolygon()) - { - monoTriangulationFun(temp, compV2InX, pStream); - } - //clean up - list->deletePolygonListWithSline(); - - } - - free(cusps); - /* - if(numInteriorCuspsX(poly) == 0) //is u monotone - monoTriangulationFun(poly, compV2InX, pStream); - else //it is not u motone - monoTriangulationFun(poly, compV2InY, pStream); - */ - //clean up space - poly->deleteSinglePolygonWithSline(); - return; - } - - //apparently the following code is not reachable, - //it is for test purpose - if(inc_current > inc_end || dec_current>dec_end) - { - monoTriangulationRecGen(topVertex, botVertex, inc_chain, inc_current, inc_end, - dec_chain, dec_current, dec_end, - pStream); - return; - } - - - if( - area(dec_chain->getVertex(dec_current), - topVertex, - inc_chain->getVertex(inc_current)) >=0 - && chainConvex(inc_chain, inc_current, inc_end) - && chainConcave(dec_chain, dec_current, dec_end) - && area(inc_chain->getVertex(inc_end), botVertex, dec_chain->getVertex(dec_end)) >=0 - ) - { - monoTriangulationRecFunGen(topVertex, botVertex, - inc_chain, inc_current, inc_end, - dec_chain, dec_current, dec_end, - compV2InX, pStream); - } - else - { - monoTriangulationRecGen(topVertex, botVertex, inc_chain, inc_current, inc_end, - dec_chain, dec_current, dec_end, - pStream); - } -} - -/*if inc_current>inc_end, then inc_chain has no points to be considered - *same for dec_chain - */ -void monoTriangulationRecGen(Real* topVertex, Real* botVertex, - vertexArray* inc_chain, Int inc_current, Int inc_end, - vertexArray* dec_chain, Int dec_current, Int dec_end, - primStream* pStream) -{ - Real** inc_array ; - Real** dec_array ; - Int i; - - if(inc_current > inc_end && dec_current>dec_end) - return; - else if(inc_current>inc_end) /*no more vertices on inc_chain*/ - { - dec_array = dec_chain->getArray(); - reflexChain rChain(100,0); - /*put the top vertex into the reflex chain*/ - rChain.processNewVertex(topVertex, pStream); - /*process all the vertices on the dec_chain*/ - for(i=dec_current; i<=dec_end; i++){ - rChain.processNewVertex(dec_array[i], pStream); - } - /*process the bottom vertex*/ - rChain.processNewVertex(botVertex, pStream); - } - else if(dec_current> dec_end) /*no more vertices on dec_chain*/ - { - inc_array = inc_chain->getArray(); - - reflexChain rChain(100,1); - /*put the top vertex into the reflex chain*/ - rChain.processNewVertex(topVertex, pStream); - /*process all the vertices on the inc_chain*/ - for(i=inc_current; i<=inc_end; i++){ - rChain.processNewVertex(inc_array[i], pStream); - } - /*process the bottom vertex*/ - rChain.processNewVertex(botVertex, pStream); - } - else /*neither chain is empty*/ - { - inc_array = inc_chain -> getArray(); - dec_array = dec_chain -> getArray(); - - /*if top of inc_chain is 'lower' than top of dec_chain, process all the - *vertices on the dec_chain which are higher than top of inc_chain - */ - if(compV2InY(inc_array[inc_current], dec_array[dec_current]) <= 0) - { - - reflexChain rChain(100, 0); - rChain.processNewVertex(topVertex, pStream); - for(i=dec_current; i<=dec_end; i++) - { - if(compV2InY(inc_array[inc_current], dec_array[i]) <= 0) - rChain.processNewVertex(dec_array[i], pStream); - else - break; - } - rChain.outputFan(inc_array[inc_current], pStream); - monoTriangulationRecGen(dec_array[i-1], botVertex, - inc_chain, inc_current, inc_end, - dec_chain, i, dec_end, - pStream); - } - else /*compV2InY(inc_array[inc_current], dec_array[dec_current]) > 0*/ - { - - reflexChain rChain(100, 1); - rChain.processNewVertex(topVertex, pStream); - for(i=inc_current; i<=inc_end; i++) - { - if(compV2InY(inc_array[i], dec_array[dec_current]) >0) - rChain.processNewVertex(inc_array[i], pStream); - else - break; - } - rChain.outputFan(dec_array[dec_current], pStream); - monoTriangulationRecGen(inc_array[i-1], botVertex, - inc_chain, i, inc_end, - dec_chain, dec_current,dec_end, - pStream); - } - }/*end case neither is empty*/ -} - -void monoTriangulationFun(directedLine* monoPolygon, Int (*compFun)(Real*, Real*), primStream* pStream) -{ - Int i; - /*find the top vertex, bottom vertex, inccreasing chain, and decreasing chain, - *then call monoTriangulationRec - */ - directedLine* tempV; - directedLine* topV; - directedLine* botV; - topV = botV = monoPolygon; - for(tempV = monoPolygon->getNext(); tempV != monoPolygon; tempV = tempV->getNext()) - { - if(compFun(topV->head(), tempV->head())<0) { - topV = tempV; - } - if(compFun(botV->head(), tempV->head())>0) { - botV = tempV; - } - } - - /*creat increase and decrease chains*/ - vertexArray inc_chain(20); /*this is a dynamic array*/ - for(i=1; i<=topV->get_npoints()-2; i++) { /*the first vertex is the top vertex which doesn't belong to inc_chain*/ - inc_chain.appendVertex(topV->getVertex(i)); - } - for(tempV = topV->getNext(); tempV != botV; tempV = tempV->getNext()) - { - for(i=0; i<=tempV->get_npoints()-2; i++){ - inc_chain.appendVertex(tempV->getVertex(i)); - } - } - - vertexArray dec_chain(20); - for(tempV = topV->getPrev(); tempV != botV; tempV = tempV->getPrev()) - { - for(i=tempV->get_npoints()-2; i>=0; i--){ - dec_chain.appendVertex(tempV->getVertex(i)); - } - } - for(i=botV->get_npoints()-2; i>=1; i--){ - dec_chain.appendVertex(tempV->getVertex(i)); - } - - monoTriangulationRecFun(topV->head(), botV->head(), &inc_chain, 0, &dec_chain, 0, compFun, pStream); - -} - -void monoTriangulation(directedLine* monoPolygon, primStream* pStream) -{ - Int i; - /*find the top vertex, bottom vertex, inccreasing chain, and decreasing chain, - *then call monoTriangulationRec - */ - directedLine* tempV; - directedLine* topV; - directedLine* botV; - topV = botV = monoPolygon; - for(tempV = monoPolygon->getNext(); tempV != monoPolygon; tempV = tempV->getNext()) - { - if(compV2InY(topV->head(), tempV->head())<0) { - topV = tempV; - } - if(compV2InY(botV->head(), tempV->head())>0) { - botV = tempV; - } - } - /*creat increase and decrease chains*/ - vertexArray inc_chain(20); /*this is a dynamic array*/ - for(i=1; i<=topV->get_npoints()-2; i++) { /*the first vertex is the top vertex which doesn't belong to inc_chain*/ - inc_chain.appendVertex(topV->getVertex(i)); - } - for(tempV = topV->getNext(); tempV != botV; tempV = tempV->getNext()) - { - for(i=0; i<=tempV->get_npoints()-2; i++){ - inc_chain.appendVertex(tempV->getVertex(i)); - } - } - - vertexArray dec_chain(20); - for(tempV = topV->getPrev(); tempV != botV; tempV = tempV->getPrev()) - { - for(i=tempV->get_npoints()-2; i>=0; i--){ - dec_chain.appendVertex(tempV->getVertex(i)); - } - } - for(i=botV->get_npoints()-2; i>=1; i--){ - dec_chain.appendVertex(tempV->getVertex(i)); - } - - monoTriangulationRec(topV->head(), botV->head(), &inc_chain, 0, &dec_chain, 0, pStream); - -} - -/*the chain could be increasing or decreasing, although we use the - * name inc_chain. - *the argument is_increase_chain indicates whether this chain - *is increasing (left chain in V-monotone case) or decreaing (right chain - *in V-monotone case). - */ -void monoTriangulation2(Real* topVertex, Real* botVertex, - vertexArray* inc_chain, Int inc_smallIndex, - Int inc_largeIndex, - Int is_increase_chain, - primStream* pStream) -{ - assert( inc_chain != NULL); - Real** inc_array ; - - if(inc_smallIndex > inc_largeIndex) - return; //no triangles - if(inc_smallIndex == inc_largeIndex) - { - if(is_increase_chain) - pStream->triangle(inc_chain->getVertex(inc_smallIndex), botVertex, topVertex); - else - pStream->triangle(inc_chain->getVertex(inc_smallIndex), topVertex, botVertex); - return; - } - Int i; - - if(is_increase_chain && botVertex[1] == inc_chain->getVertex(inc_largeIndex)[1]) - { - pStream->triangle(botVertex, inc_chain->getVertex(inc_largeIndex-1), - inc_chain->getVertex(inc_largeIndex)); - monoTriangulation2(topVertex, botVertex, inc_chain, inc_smallIndex, - inc_largeIndex-1, - is_increase_chain, - pStream); - return; - } - else if( (!is_increase_chain) && topVertex[1] == inc_chain->getVertex(inc_smallIndex)[1]) - { - pStream->triangle(topVertex, inc_chain->getVertex(inc_smallIndex+1), - inc_chain->getVertex(inc_smallIndex)); - monoTriangulation2(topVertex, botVertex, inc_chain, inc_smallIndex+1, - inc_largeIndex, is_increase_chain, pStream); - return ; - } - - inc_array = inc_chain->getArray(); - - reflexChain rChain(20,is_increase_chain); /*1 means the chain is increasing*/ - - rChain.processNewVertex(topVertex, pStream); - - for(i=inc_smallIndex; i<=inc_largeIndex; i++){ - rChain.processNewVertex(inc_array[i], pStream); - } - rChain.processNewVertex(botVertex, pStream); - -} - -/*if compFun == compV2InY, top to bottom: V-monotone - *if compFun == compV2InX, right to left: U-monotone - */ -void monoTriangulationRecFunGen(Real* topVertex, Real* botVertex, - vertexArray* inc_chain, Int inc_current, Int inc_end, - vertexArray* dec_chain, Int dec_current, Int dec_end, - Int (*compFun)(Real*, Real*), - primStream* pStream) -{ - assert( inc_chain != NULL && dec_chain != NULL); - assert( ! (inc_current> inc_end && - dec_current> dec_end)); - /* - Int inc_nVertices; - Int dec_nVertices; - */ - Real** inc_array ; - Real** dec_array ; - Int i; - assert( ! ( (inc_chain==NULL) && (dec_chain==NULL))); - - if(inc_current> inc_end) /*no more vertices on inc_chain*/ - { - - dec_array = dec_chain->getArray(); - reflexChain rChain(20,0); - /*put the top vertex into the reflex chain*/ - rChain.processNewVertex(topVertex, pStream); - /*process all the vertices on the dec_chain*/ - for(i=dec_current; i<=dec_end; i++){ - rChain.processNewVertex(dec_array[i], pStream); - } - /*process the bottom vertex*/ - rChain.processNewVertex(botVertex, pStream); - - } - else if(dec_current> dec_end) /*no more vertices on dec_chain*/ - { - inc_array = inc_chain->getArray(); - reflexChain rChain(20,1); - /*put the top vertex into the reflex chain*/ - rChain.processNewVertex(topVertex, pStream); - /*process all the vertices on the inc_chain*/ - for(i=inc_current; i<=inc_end; i++){ - rChain.processNewVertex(inc_array[i], pStream); - } - /*process the bottom vertex*/ - rChain.processNewVertex(botVertex, pStream); - } - else /*neither chain is empty*/ - { - inc_array = inc_chain -> getArray(); - dec_array = dec_chain -> getArray(); - - /*if top of inc_chain is 'lower' than top of dec_chain, process all the - *vertices on the dec_chain which are higher than top of inc_chain - */ - if(compFun(inc_array[inc_current], dec_array[dec_current]) <= 0) - { - - reflexChain rChain(20, 0); - rChain.processNewVertex(topVertex, pStream); - for(i=dec_current; i<=dec_end; i++) - { - if(compFun(inc_array[inc_current], dec_array[i]) <= 0) - rChain.processNewVertex(dec_array[i], pStream); - else - break; - } - rChain.outputFan(inc_array[inc_current], pStream); - monoTriangulationRecFunGen(dec_array[i-1], botVertex, - inc_chain, inc_current, inc_end, - dec_chain, i, dec_end, - compFun, - pStream); - } - else /*compFun(inc_array[inc_current], dec_array[dec_current]) > 0*/ - { - - reflexChain rChain(20, 1); - rChain.processNewVertex(topVertex, pStream); - for(i=inc_current; i<=inc_end; i++) - { - if(compFun(inc_array[i], dec_array[dec_current]) >0) - rChain.processNewVertex(inc_array[i], pStream); - else - break; - } - rChain.outputFan(dec_array[dec_current], pStream); - monoTriangulationRecFunGen(inc_array[i-1], botVertex, - inc_chain, i,inc_end, - dec_chain, dec_current,dec_end, - compFun, - pStream); - } - }/*end case neither is empty*/ -} - -/*if compFun == compV2InY, top to bottom: V-monotone - *if compFun == compV2InX, right to left: U-monotone - */ -void monoTriangulationRecFun(Real* topVertex, Real* botVertex, - vertexArray* inc_chain, Int inc_current, - vertexArray* dec_chain, Int dec_current, - Int (*compFun)(Real*, Real*), - primStream* pStream) -{ - assert( inc_chain != NULL && dec_chain != NULL); - assert( ! (inc_current>=inc_chain->getNumElements() && - dec_current>=dec_chain->getNumElements())); - Int inc_nVertices; - Int dec_nVertices; - Real** inc_array ; - Real** dec_array ; - Int i; - assert( ! ( (inc_chain==NULL) && (dec_chain==NULL))); - - if(inc_current>=inc_chain->getNumElements()) /*no more vertices on inc_chain*/ - { - - dec_array = dec_chain->getArray(); - dec_nVertices = dec_chain->getNumElements(); - reflexChain rChain(20,0); - /*put the top vertex into the reflex chain*/ - rChain.processNewVertex(topVertex, pStream); - /*process all the vertices on the dec_chain*/ - for(i=dec_current; i= dec_chain->getNumElements()) /*no more vertices on dec_chain*/ - { - inc_array = inc_chain->getArray(); - inc_nVertices= inc_chain->getNumElements(); - reflexChain rChain(20,1); - /*put the top vertex into the reflex chain*/ - rChain.processNewVertex(topVertex, pStream); - /*process all the vertices on the inc_chain*/ - for(i=inc_current; i getArray(); - dec_array = dec_chain -> getArray(); - inc_nVertices= inc_chain->getNumElements(); - dec_nVertices= dec_chain->getNumElements(); - /*if top of inc_chain is 'lower' than top of dec_chain, process all the - *vertices on the dec_chain which are higher than top of inc_chain - */ - if(compFun(inc_array[inc_current], dec_array[dec_current]) <= 0) - { - - reflexChain rChain(20, 0); - rChain.processNewVertex(topVertex, pStream); - for(i=dec_current; i 0*/ - { - - reflexChain rChain(20, 1); - rChain.processNewVertex(topVertex, pStream); - for(i=inc_current; i0) - rChain.processNewVertex(inc_array[i], pStream); - else - break; - } - rChain.outputFan(dec_array[dec_current], pStream); - monoTriangulationRecFun(inc_array[i-1], botVertex, - inc_chain, i, - dec_chain, dec_current, - compFun, - pStream); - } - }/*end case neither is empty*/ -} - - -void monoTriangulationRec(Real* topVertex, Real* botVertex, - vertexArray* inc_chain, Int inc_current, - vertexArray* dec_chain, Int dec_current, - primStream* pStream) -{ - assert( inc_chain != NULL && dec_chain != NULL); - assert( ! (inc_current>=inc_chain->getNumElements() && - dec_current>=dec_chain->getNumElements())); - Int inc_nVertices; - Int dec_nVertices; - Real** inc_array ; - Real** dec_array ; - Int i; - assert( ! ( (inc_chain==NULL) && (dec_chain==NULL))); - - if(inc_current>=inc_chain->getNumElements()) /*no more vertices on inc_chain*/ - { - - dec_array = dec_chain->getArray(); - dec_nVertices = dec_chain->getNumElements(); - reflexChain rChain(20,0); - /*put the top vertex into the reflex chain*/ - rChain.processNewVertex(topVertex, pStream); - /*process all the vertices on the dec_chain*/ - for(i=dec_current; i= dec_chain->getNumElements()) /*no more vertices on dec_chain*/ - { - inc_array = inc_chain->getArray(); - inc_nVertices= inc_chain->getNumElements(); - reflexChain rChain(20,1); - /*put the top vertex into the reflex chain*/ - rChain.processNewVertex(topVertex, pStream); - /*process all the vertices on the inc_chain*/ - for(i=inc_current; i getArray(); - dec_array = dec_chain -> getArray(); - inc_nVertices= inc_chain->getNumElements(); - dec_nVertices= dec_chain->getNumElements(); - /*if top of inc_chain is 'lower' than top of dec_chain, process all the - *vertices on the dec_chain which are higher than top of inc_chain - */ - if(compV2InY(inc_array[inc_current], dec_array[dec_current]) <= 0) - { - - reflexChain rChain(20, 0); - rChain.processNewVertex(topVertex, pStream); - for(i=dec_current; i 0*/ - { - - reflexChain rChain(20, 1); - rChain.processNewVertex(topVertex, pStream); - for(i=inc_current; i0) - rChain.processNewVertex(inc_array[i], pStream); - else - break; - } - rChain.outputFan(dec_array[dec_current], pStream); - monoTriangulationRec(inc_array[i-1], botVertex, - inc_chain, i, - dec_chain, dec_current, - pStream); - } - }/*end case neither is empty*/ -} - - - -/* the name here assumes that the polygon is Y-monotone, but - *this function also works for X-monotone polygons. - * a monotne polygon consists of two extrem verteices: topVertex and botVertex, and - *two monotone chains: inc_chain, and dec_chain. The edges of the increasing chain (inc_chain) - *is ordered by following pointer: next, while the edges of the decreasing chain (dec_chain) - *is ordered by following pointer: prev - * inc_index index the vertex which is the toppest of the inc_chain which we are handling currently. - * dec_index index the vertex which is the toppest of the dec_chain which we are handling currently. - */ -void monoTriangulationRec(directedLine* inc_chain, Int inc_index, - directedLine* dec_chain, Int dec_index, - directedLine* topVertex, Int top_index, - directedLine* botVertex, - primStream* pStream) -{ - Int i; - directedLine *temp, *oldtemp = NULL; - Int tempIndex, oldtempIndex = 0; - - assert(inc_chain != NULL && dec_chain != NULL); - - if(inc_chain == botVertex) { - reflexChain rChain(20, 0); - rChain.processNewVertex(topVertex->getVertex(top_index), pStream); - for(i=dec_index; i< dec_chain->get_npoints(); i++){ - rChain.processNewVertex(dec_chain->getVertex(i), pStream); - } - for(temp = dec_chain->getPrev(); temp != botVertex; temp = temp->getPrev()) - { - for(i=0; iget_npoints(); i++){ - rChain.processNewVertex(temp->getVertex(i), pStream); - } - } - } - else if(dec_chain==botVertex) { - reflexChain rChain(20, 1); - rChain.processNewVertex(topVertex->getVertex(top_index), pStream); - for(i=inc_index; i< inc_chain->get_npoints(); i++){ - rChain.processNewVertex(inc_chain->getVertex(i), pStream); - } - for(temp = inc_chain->getPrev(); temp != botVertex; temp = temp->getNext()) - { - for(i=0; iget_npoints(); i++){ - rChain.processNewVertex(temp->getVertex(i), pStream); - } - } - } - else /*neither reached the bottom*/{ - if(compV2InY(inc_chain->getVertex(inc_index), dec_chain->getVertex(dec_index)) <=0) { - reflexChain rChain(20, 0); - rChain.processNewVertex(topVertex -> getVertex(top_index), pStream); - temp = dec_chain; - tempIndex = dec_index; - while( compV2InY(inc_chain->getVertex(inc_index), temp->getVertex(tempIndex))<=0) { - oldtemp = temp; - oldtempIndex = tempIndex; - rChain.processNewVertex(temp->getVertex(tempIndex), pStream); - - if(tempIndex == temp->get_npoints()-1){ - tempIndex = 0; - temp = temp->getPrev(); - } - else{ - tempIndex++; - } - } - rChain.outputFan(inc_chain->getVertex(inc_index), pStream); - monoTriangulationRec(inc_chain, inc_index, temp, tempIndex, oldtemp, oldtempIndex, botVertex, pStream); - } - else /* >0*/ { - reflexChain rChain(20, 1); - rChain.processNewVertex(topVertex -> getVertex(top_index), pStream); - temp = inc_chain; - tempIndex = inc_index; - while( compV2InY(temp->getVertex(tempIndex), dec_chain->getVertex(dec_index))>0){ - oldtemp = temp; - oldtempIndex = tempIndex; - rChain.processNewVertex(temp->getVertex(tempIndex), pStream); - - if(tempIndex == temp->get_npoints()-1){ - tempIndex = 0; - temp = temp->getNext(); - } - else{ - tempIndex++; - } - } - rChain.outputFan(dec_chain->getVertex(dec_index), pStream); - monoTriangulationRec(temp, tempIndex, dec_chain, dec_index, oldtemp, oldtempIndex, botVertex, pStream); - } - } /*end case neither reached the bottom*/ -} - -/***************************vertexArray begin here**********************************/ -vertexArray::vertexArray(Real2* vertices, Int nVertices) -{ - Int i; - size = index = nVertices; - array = (Real**) malloc(sizeof(Real*) * nVertices); - assert(array); - for(i=0; i= size){ - Real** temp = (Real**) malloc(sizeof(Real*) * (2*size +1)); - assert(temp); - for(i=0; i= v - * and array[i+1][1] v - *if sartIndex>endIndex, then return endIndex+1. - *otherwise, startIndex<=endIndex, it is assumed that - * 0<=startIndex<=endIndex endIndex) - return endIndex+1; - else if(array[endIndex][1] > v) - return endIndex+1; - else //now array[endIndex][1] <= v - { - for(i=endIndex-1; i>=startIndex; i--) - { - if(array[i][1] > v) - break; - } - return i+1; - } -} - -/*find the first i<=endIndex such that array[i-1][1] >= v - * and array[i][1] < v - *if sartIndex>endIndex, then return endIndex+1. - *otherwise, startIndex<=endIndex, it is assumed that - * 0<=startIndex<=endIndex endIndex) - return endIndex+1; - else if(array[endIndex][1] >= v) - return endIndex+1; - else //now array[endIndex][1] < v - { - for(i=endIndex-1; i>=startIndex; i--) - { - if(array[i][1] >= v) - break; - } - return i+1; - } -} - -/*find the first i>startIndex such that array[i-1][1] > v - * and array[i][1] >=v - *if sartIndex>endIndex, then return startIndex-1. - *otherwise, startIndex<=endIndex, it is assumed that - * 0<=startIndex<=endIndex endIndex) - return startIndex-1; - else if(array[startIndex][1] < v) - return startIndex-1; - else //now array[startIndex][1] >= v - { - - for(i=startIndex; i<=endIndex; i++) - { - if(array[i][1] <= v) - break; - } - if(i>endIndex) // v is strictly below all - return endIndex; - else if(array[i][1] == v) - return i; - else - return i-1; - } - -} - - -/*find the first i>=startIndex such that array[i][1] >= v - * and array[i+1][1] endIndex, then return startIndex-1. - *otherwise, startIndex<=endIndex, it is assumed that - * 0<=startIndex<=endIndex endIndex) - return startIndex-1; - else if(array[startIndex][1] < v) - return startIndex-1; - else //now array[startIndex][1] >= v - { - for(i=startIndex+1; i<=endIndex; i++) - { - if(array[i][1] < v) - break; - } - return i-1; - } -} - -Int vertexArray::findDecreaseChainFromEnd(Int begin, Int end) -{ - Int i = end; - Real prevU = array[i][0]; - Real thisU; - for(i=end-1; i>=begin; i--){ - thisU = array[i][0]; - if(thisU < prevU) - prevU = thisU; - else - break; - } - return i; -} - -//if(V(start) == v, return start, other wise return the -//last i so that V(i)==v -Int vertexArray::skipEqualityFromStart(Real v, Int start, Int end) -{ - Int i; - if(array[start][1] != v) - return start; - //now array[start][1] == v - for(i=start+1; i<= end; i++) - if(array[i][1] != v) - break; - return i-1; -} - - -/***************************vertexArray end****************************************/ - - - -/***************************relfex chain stuff begin here*****************************/ - -reflexChain::reflexChain(Int size, Int is_increasing) -{ - queue = (Real2*) malloc(sizeof(Real2) * size); - assert(queue); - index_queue = 0; - size_queue = size; - isIncreasing = is_increasing; -} - -reflexChain::~reflexChain() -{ - free(queue); -} - -/*put (u,v) at the end of the queue - *pay attention to space - */ -void reflexChain::insert(Real u, Real v) -{ - Int i; - if(index_queue >= size_queue) { - Real2 *temp = (Real2*) malloc(sizeof(Real2) * (2*size_queue+1)); - assert(temp); - - /*copy*/ - for(i=0; ibegin(); - pStream->insert(v); - if(isIncreasing) { - for(i=0; iinsert(queue[i]); - } - else { - for(i=index_queue-1; i>=0; i--) - pStream->insert(queue[i]); - } - pStream->end(PRIMITIVE_STREAM_FAN); -} - -void reflexChain::processNewVertex(Real v[2], primStream* pStream) -{ - Int i,j,k; - Int isReflex; - /*if there are at most one vertex in the queue, then simply insert - */ - if(index_queue <=1){ - insert(v); - return; - } - - /*there are at least two vertices in the queue*/ - j=index_queue-1; - - for(i=j; i>=1; i--) { - if(isIncreasing) { - isReflex = (area(queue[i-1], queue[i], v) <= 0.0); - } - else /*decreasing*/{ - isReflex = (area(v, queue[i], queue[i-1]) <= 0.0); - } - if(isReflex) { - break; - } - } - - /* - *if ibegin(); - pStream->insert(v); - if(isIncreasing) { - for(k=i; k<=j; k++) - pStream->insert(queue[k]); - } - else { - for(k=j; k>=i; k--) - pStream->insert(queue[k]); - } - - pStream->end(PRIMITIVE_STREAM_FAN); - } - - /*delete vertices i+1--j from the queue*/ - index_queue = i+1; - /*finally insert v at the end of the queue*/ - insert(v); - -} - -void reflexChain::print() -{ - Int i; - printf("reflex chain: isIncreasing=%i\n", isIncreasing); - for(i=0; i -#define dprintf printf -#else -inline void dprintf( char *, ... ) { } -#endif -#endif - -#ifdef GLBUILD -inline void dprintf( char *, ... ) { } -#endif - -#ifndef NULL -#define NULL 0 -#endif - -#endif /* __glumystdio_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/mystdlib.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/mystdlib.h deleted file mode 100644 index d28e70bd51..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/mystdlib.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -/* - * mystdlib.h - * - * $Date: 2001/03/19 17:52:03 $ $Revision: 1.3 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/mystdlib.h,v 1.3 2001/03/19 17:52:03 pesco Exp $ - */ - -#ifndef __glumystdlib_h_ -#define __glumystdlib_h_ - -#ifdef STANDALONE -typedef unsigned int size_t; -extern "C" void abort( void ); -extern "C" void * malloc( size_t ); -extern "C" void free( void * ); -#endif - -#ifdef LIBRARYBUILD -#include -#endif - -#ifdef GLBUILD -typedef unsigned int size_t; -extern "C" void abort( void ); -extern "C" void * malloc( size_t ); -extern "C" void free( void * ); -#endif - -#endif /* __glumystdlib_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/partitionX.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/partitionX.cc deleted file mode 100644 index bfe77123c4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/partitionX.cc +++ /dev/null @@ -1,164 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/partitionX.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include -#include - -#include "partitionX.h" - -#define CONCAVITY_ZERO 1.0e-6 //this number is used to test whether a vertex is concave (refelx) - //or not. The test needs to compute the area of the three adjacent - //vertices to see if the are is positive or negative. - -Int isCuspX(directedLine *v) -{ - //if v->prev <= v && v->next <= v - //|| v->prev >= v && v->next >= v - Real* T = v->head(); - Real* P = v->getPrev()->head(); - Real* N = v->getNext()->head(); - if( - (compV2InX(T,P) != -1 && - compV2InX(T,N) != -1 - ) || - (compV2InX(T,P) != 1 && - compV2InX(T,N) != 1 - ) - ) - return 1; - else - return 0; -} - -Int isReflexX(directedLine* v) -{ - Real* A = v->getPrev()->head(); - Real* B = v->head(); - Real* C = v->tail(); - Real Bx,By, Cx, Cy; - //scale them in case they are too small - Bx = 10*(B[0] - A[0]); - By = 10*(B[1] - A[1]); - Cx = 10*(C[0] - A[0]); - Cy = 10*(C[1] - A[1]); - - if(Bx*Cy - Cx*By < -CONCAVITY_ZERO) return 1; - else return 0; -} - - -/*return - *0: not-cusp - *1: interior cusp - *2: exterior cusp - */ -Int cuspTypeX(directedLine *v) -{ - if(! isCuspX(v)) return 0; - else - { -//printf("isCusp,%f,%f\n", v->head()[0], v->head()[1]); - if(isReflexX(v)) - { -// printf("isReflex\n"); - return 1; - } - else - { -// printf("not isReflex\n"); - return 2; - } - } -} - -Int numInteriorCuspsX(directedLine *polygon) -{ - directedLine *temp; - int ret = 0; - if(cuspTypeX(polygon) == 1) - ret++; - for(temp = polygon->getNext(); temp != polygon; temp = temp->getNext()) - if(cuspTypeX(temp) == 1) - ret++; - return ret; -} - - -void findInteriorCuspsX(directedLine *polygon, Int& ret_n_interior_cusps, - directedLine** ret_interior_cusps) -{ - directedLine *temp; - ret_n_interior_cusps = 0; - if(cuspTypeX(polygon) == 1) - { - ret_interior_cusps[ret_n_interior_cusps++] = polygon; - } - for(temp = polygon->getNext(); temp != polygon; temp = temp->getNext()) - if(cuspTypeX(temp) == 1) - { - ret_interior_cusps[ret_n_interior_cusps++] = temp; - } -} - -directedLine* findDiagonal_singleCuspX(directedLine* cusp) -{ - directedLine* temp; - Int is_minimal = ((compV2InX(cusp->head(), cusp->tail()) == -1)? 1:0); - - if(is_minimal) - for(temp = cusp->getNext(); temp != cusp; temp = temp->getNext()) - { - if(compV2InX(cusp->head(), temp->head()) == 1) - { - return temp; - } - } - else //is maxmal - for(temp = cusp->getNext(); temp != cusp; temp = temp->getNext()) - { - if(compV2InX(cusp->head(), temp->head()) == -1) - { - return temp; - } - } - return NULL; -} - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/partitionX.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/partitionX.h deleted file mode 100644 index cd18f0eb02..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/partitionX.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/partitionX.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef _PARTITIONX_H -#define _PARTITIONX_H - -#include "directedLine.h" - -Int isCuspX(directedLine *v); -Int isReflexX(directedLine *v); -Int cuspTypeX(directedLine *v); - -//assuming the array of ret_interior_cusps has been allocated -void findInteriorCuspsX(directedLine* polygon, Int& ret_n_interior_cusps, - directedLine** ret_interior_cusps); - -Int numInteriorCuspsX(directedLine* polygon); - -/*a single polygon with a single cusp - *return the diagonal vertex corresponding to this cusp - */ -directedLine* findDiagonal_singleCuspX(directedLine* cusp); - -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/partitionY.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/partitionY.cc deleted file mode 100644 index 216ac07e06..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/partitionY.cc +++ /dev/null @@ -1,838 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/partitionY.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $ -*/ - -#include -#include -#include - -#include "zlassert.h" -#include "partitionY.h" -#include "searchTree.h" -#include "quicksort.h" -#include "polyUtil.h" - - -#define max(a,b) ((a>b)? a:b) -#define min(a,b) ((a>b)? b:a) - - -/*retrurn - *-1: if A < B (YaB - */ -static Int compVertInY(Real A[2], Real B[2]) -{ - if( (A[1] < B[1]) || (A[1]==B[1] && A[0]head(); - if( compVertInY(e->head(), vert) != 1 - && compVertInY(e->tail(), vert) != 1 - ) - return 1; - else - return 0; -} - -/*v is a vertex: the head of en edge, - *e is an edge, - *return 1 if e is below v: assume v1 and v2 are the two endpoints of e: - * v1>= v, v2>=v. - */ -Int isAbove(directedLine *v, directedLine *e) -{ - Real* vert = v->head(); - if( compVertInY(e->head(), vert) != -1 - && compVertInY(e->tail(), vert) != -1 - ) - return 1; - else - return 0; -} - -Int isCusp(directedLine *v) -{ - Real *A=v->getPrev()->head(); - Real *B=v->head(); - Real *C=v->tail(); - if(A[1] < B[1] && B[1] < C[1]) - return 0; - else if(A[1] > B[1] && B[1] > C[1]) - return 0; - else if(A[1] < B[1] && C[1] < B[1]) - return 1; - else if(A[1] > B[1] && C[1] > B[1]) - return 1; - - if(isAbove(v, v) && isAbove(v, v->getPrev()) || - isBelow(v, v) && isBelow(v, v->getPrev())) - return 1; - else - return 0; -} - -/*crossproduct is strictly less than 0*/ -Int isReflex(directedLine *v) -{ - Real* A = v->getPrev()->head(); - Real* B = v->head(); - Real* C = v->tail(); - Real Bx,By, Cx, Cy; - Bx = B[0] - A[0]; - By = B[1] - A[1]; - Cx = C[0] - A[0]; - Cy = C[1] - A[1]; - - if(Bx*Cy - Cx*By < 0) return 1; - else return 0; -} - - /*return - *0: not-cusp - *1: interior cusp - *2: exterior cusp - */ -Int cuspType(directedLine *v) -{ - if(! isCusp(v)) return 0; - else if(isReflex(v)) return 1; - else - return 2; -} - -sweepRange* sweepRangeMake(directedLine* left, Int leftType, - directedLine* right, Int rightType) -{ - sweepRange* ret = (sweepRange*)malloc(sizeof(sweepRange)); - assert(ret); - ret->left = left; - ret->leftType = leftType; - ret->right = right; - ret->rightType = rightType; - return ret; -} - -void sweepRangeDelete(sweepRange* range) -{ - free(range); -} - -Int sweepRangeEqual(sweepRange* src1, sweepRange* src2) -{ - Int leftEqual; - Int rightEqual; - - - /*The case when both are vertices should not happen*/ - assert(! (src1->leftType == 0 && src2->leftType == 0)); - if(src1->leftType == 0 && src2->leftType == 1){ - if(src1->left == src2->left || - src1->left->getPrev() == src2->left - ) - leftEqual = 1; - else - leftEqual = 0; - } - else if(src1->leftType == 1 && src2->leftType == 1){ - if(src1->left == src2->left) - leftEqual = 1; - else - leftEqual = 0; - } - else /*src1->leftType == 1 && src2->leftType == 0*/{ - if(src1->left == src2->left || - src1->left == src2->left->getPrev() - ) - leftEqual = 1; - else - leftEqual = 0; - } - - /*the same thing for right*/ - /*The case when both are vertices should not happen*/ - assert(! (src1->rightType == 0 && src2->rightType == 0)); - if(src1->rightType == 0 && src2->rightType == 1){ - if(src1->right == src2->right || - src1->right->getPrev() == src2->right - ) - rightEqual = 1; - else - rightEqual = 0; - } - else if(src1->rightType == 1 && src2->rightType == 1){ - if(src1->right == src2->right) - rightEqual = 1; - else - rightEqual = 0; - } - else /*src1->rightType == 1 && src2->rightType == 0*/{ - if(src1->right == src2->right || - src1->right == src2->right->getPrev() - ) - rightEqual = 1; - else - rightEqual = 0; - } - - return (leftEqual == 1 || rightEqual == 1); -} - -/*given (x_1, y_1) and (x_2, y_2), and y - *return x such that (x,y) is on the line - */ -inline/*static*/ Real intersectHoriz(Real x1, Real y1, Real x2, Real y2, Real y) -{ - return ((y2==y1)? (x1+x2)*Real(0.5) : x1 + ((y-y1)/(y2-y1)) * (x2-x1)); -/* - if(y2 == y1) return (x1+x2)*0.5; - else return x1 + ((y-y1)/(y2-y1)) * (x2-x1); -*/ -} - -/*compare two edges of a polygon. - *edge A < edge B if there is a horizontal line so that the intersection - *with A is to the left of the intersection with B. - *This function is used in sweepY for the dynamic search tree insertion to - *order the edges. - * Implementation: (x_1,y_1) and (x_2, y_2) - */ -static Int compEdges(directedLine *e1, directedLine *e2) -{ - Real* head1 = e1->head(); - Real* tail1 = e1->tail(); - Real* head2 = e2->head(); - Real* tail2 = e2->tail(); -/* - Real h10 = head1[0]; - Real h11 = head1[1]; - Real t10 = tail1[0]; - Real t11 = tail1[1]; - Real h20 = head2[0]; - Real h21 = head2[1]; - Real t20 = tail2[0]; - Real t21 = tail2[1]; -*/ - Real e1_Ymax, e1_Ymin, e2_Ymax, e2_Ymin; -/* - if(h11>t11) { - e1_Ymax= h11; - e1_Ymin= t11; - } - else{ - e1_Ymax = t11; - e1_Ymin = h11; - } - - if(h21>t21) { - e2_Ymax= h21; - e2_Ymin= t21; - } - else{ - e2_Ymax = t21; - e2_Ymin = h21; - } -*/ - - if(head1[1]>tail1[1]) { - e1_Ymax= head1[1]; - e1_Ymin= tail1[1]; - } - else{ - e1_Ymax = tail1[1]; - e1_Ymin = head1[1]; - } - - if(head2[1]>tail2[1]) { - e2_Ymax= head2[1]; - e2_Ymin= tail2[1]; - } - else{ - e2_Ymax = tail2[1]; - e2_Ymin = head2[1]; - } - - - /*Real e1_Ymax = max(head1[1], tail1[1]);*/ /*max(e1->head()[1], e1->tail()[1]);*/ - /*Real e1_Ymin = min(head1[1], tail1[1]);*/ /*min(e1->head()[1], e1->tail()[1]);*/ - /*Real e2_Ymax = max(head2[1], tail2[1]);*/ /*max(e2->head()[1], e2->tail()[1]);*/ - /*Real e2_Ymin = min(head2[1], tail2[1]);*/ /*min(e2->head()[1], e2->tail()[1]);*/ - - Real Ymax = min(e1_Ymax, e2_Ymax); - Real Ymin = max(e1_Ymin, e2_Ymin); - - Real y = Real(0.5)*(Ymax + Ymin); - -/* Real x1 = intersectHoriz(e1->head()[0], e1->head()[1], e1->tail()[0], e1->tail()[1], y); - Real x2 = intersectHoriz(e2->head()[0], e2->head()[1], e2->tail()[0], e2->tail()[1], y); -*/ -/* - Real x1 = intersectHoriz(h10, h11, t10, t11, y); - Real x2 = intersectHoriz(h20, h21, t20, t21, y); -*/ - Real x1 = intersectHoriz(head1[0], head1[1], tail1[0], tail1[1], y); - Real x2 = intersectHoriz(head2[0], head2[1], tail2[0], tail2[1], y); - - if(x1<= x2) return -1; - else return 1; -} - -/*used by sort precedures - */ -static Int compInY(directedLine* v1, directedLine* v2) -{ - return v1->compInY(v2); -} - -void findDiagonals(Int total_num_edges, directedLine** sortedVertices, sweepRange** ranges, Int& num_diagonals, directedLine** diagonal_vertices) -{ - Int i,j,k; - - k=0; - - for(i=0; igetPrev(); -/* -printf("find i=%i\n", i); -printf("the vertex is\n"); -vert->printSingle(); -*/ - if(isBelow(vert, thisEdge) && isBelow(vert, prevEdge) && compEdges(prevEdge, thisEdge)<0) - { - /*this is an upward interior cusp*/ - diagonal_vertices[k++] = vert; - - for(j=i+1; j0) - { - /*this is an downward interior cusp*/ - diagonal_vertices[k++] = vert; - for(j=i-1; j>=0; j--) - if(sweepRangeEqual(ranges[i], ranges[j])) - { - diagonal_vertices[k++] = sortedVertices[j]; - break; - } -/* printf("j=%i\n", j);*/ - assert(j>=0); - - - - } - } - num_diagonals = k/2; -} - -/*get rid of repeated diagonlas so that each diagonal appears only once in the array - */ -Int deleteRepeatDiagonals(Int num_diagonals, directedLine** diagonal_vertices, directedLine** new_vertices) -{ - Int i,k; - Int j,l; - Int index; - index=0; - for(i=0,k=0; itoArrayAllPolygons(total_num_edges); - quicksort( (void**)array, 0, total_num_edges-1, (Int (*)(void*, void*)) compInY); - sweepRange** ranges = (sweepRange**) malloc(sizeof(sweepRange*) * total_num_edges); - assert(ranges); - - sweepY(total_num_edges, array, ranges); - - directedLine** diagonal_vertices = (directedLine**) malloc(sizeof(directedLine*) * total_num_edges); - assert(diagonal_vertices); - findDiagonals(total_num_edges, array, ranges, num_diagonals, diagonal_vertices); - - num_diagonals=deleteRepeatDiagonals(num_diagonals, diagonal_vertices, diagonal_vertices); - return diagonal_vertices; - -} - - -/*partition into Y-monotone polygons*/ -directedLine* partitionY(directedLine *polygons, sampledLine **retSampledLines) -{ - Int total_num_edges = 0; - directedLine** array = polygons->toArrayAllPolygons(total_num_edges); - - quicksort( (void**)array, 0, total_num_edges-1, (Int (*)(void*, void*)) compInY); - - sweepRange** ranges = (sweepRange**) malloc(sizeof(sweepRange*) * (total_num_edges)); - assert(ranges); - - - - sweepY(total_num_edges, array, ranges); - - - - /*the diagonal vertices are stored as: - *v0-v1: 1st diagonal - *v2-v3: 2nd diagonal - *v5-v5: 3rd diagonal - *... - */ - - - Int num_diagonals; - /*number diagonals is < total_num_edges*total_num_edges*/ - directedLine** diagonal_vertices = (directedLine**) malloc(sizeof(directedLine*) * total_num_edges*2/*total_num_edges*/); - assert(diagonal_vertices); - - - - findDiagonals(total_num_edges, array, ranges, num_diagonals, diagonal_vertices); - - - - directedLine* ret_polygons = polygons; - sampledLine* newSampledLines = NULL; - Int i,k; - -num_diagonals=deleteRepeatDiagonals(num_diagonals, diagonal_vertices, diagonal_vertices); - - - - Int *removedDiagonals=(Int*)malloc(sizeof(Int) * num_diagonals); - for(i=0; ifindRoot(); - directedLine *root2 = v2->findRoot(); - assert(root1); - assert(root2); -*/ - -directedLine* root1 = v1->rootLinkFindRoot(); -directedLine* root2 = v2->rootLinkFindRoot(); - - if(root1 != root2) - { - - removedDiagonals[i] = 1; - sampledLine* generatedLine; - - - - v1->connectDiagonal(v1,v2, &ret_p1, &ret_p2, &generatedLine, ret_polygons); - - - - newSampledLines = generatedLine->insert(newSampledLines); -/* - ret_polygons = ret_polygons->cutoffPolygon(root1); - - ret_polygons = ret_polygons->cutoffPolygon(root2); - ret_polygons = ret_p1->insertPolygon(ret_polygons); -root1->rootLinkSet(ret_p1); -root2->rootLinkSet(ret_p1); -ret_p1->rootLinkSet(NULL); -ret_p2->rootLinkSet(ret_p1); -*/ - ret_polygons = ret_polygons->cutoffPolygon(root2); - - - -root2->rootLinkSet(root1); -ret_p1->rootLinkSet(root1); -ret_p2->rootLinkSet(root1); - - /*now that we have connected the diagonal v1 and v2, - *we have to check those unprocessed diagonals which - *have v1 or v2 as an end point. Notice that the head of v1 - *has the same coodinates as the head of v2->prev, and the head of - *v2 has the same coordinate as the head of v1->prev. - *Suppose these is a diagonal (v1, x). If (v1,x) is still a valid - *diagonal, then x should be on the left hand side of the directed line: *v1->prev->head -- v1->head -- v1->tail. Otherwise, (v1,x) should be - *replaced by (v2->prev, x), that is, x is on the left of - * v2->prev->prev->head, v2->prev->head, v2->prev->tail. - */ - Int ii, kk; - for(ii=0, kk=0; iiprev->head:v1->head:v1->tail*/ - if(! pointLeft2Lines(v1->getPrev()->head(), - v1->head(), v1->tail(), d2->head())) - { -/* - assert(pointLeft2Lines(v2->getPrev()->getPrev()->head(), - v2->getPrev()->head(), - v2->getPrev()->tail(), d2->head())); -*/ - diagonal_vertices[kk] = v2->getPrev(); - } - } - if(d1 == v2) { - /*check if d2 is to left of v2->prev->head:v2->head:v2->tail*/ - if(! pointLeft2Lines(v2->getPrev()->head(), - v2->head(), v2->tail(), d2->head())) - { -/* - assert(pointLeft2Lines(v1->getPrev()->getPrev()->head(), - v1->getPrev()->head(), - v1->getPrev()->tail(), d2->head())); -*/ - diagonal_vertices[kk] = v1->getPrev(); - } - } - /*check d2 and replace diagonal_vertices[k+1] if necessary*/ - if(d2 == v1) { - /*check if d1 is to left of v1->prev->head:v1->head:v1->tail*/ - if(! pointLeft2Lines(v1->getPrev()->head(), - v1->head(), v1->tail(), d1->head())) - { -/* assert(pointLeft2Lines(v2->getPrev()->getPrev()->head(), - v2->getPrev()->head(), - v2->getPrev()->tail(), d1->head())); -*/ - diagonal_vertices[kk+1] = v2->getPrev(); - } - } - if(d2 == v2) { - /*check if d1 is to left of v2->prev->head:v2->head:v2->tail*/ - if(! pointLeft2Lines(v2->getPrev()->head(), - v2->head(), v2->tail(), d1->head())) - { -/* assert(pointLeft2Lines(v1->getPrev()->getPrev()->head(), - v1->getPrev()->head(), - v1->getPrev()->tail(), d1->head())); -*/ - diagonal_vertices[kk+1] = v1->getPrev(); - } - } - } -}/*end if (root1 not equal to root 2)*/ -} - - /*second pass, now all diagoals should belong to the same polygon*/ - - - - for(i=0,k=0; ifindRoot(); -/* - directedLine *root2 = v2->findRoot(); - - - - assert(root1); - assert(root2); - assert(root1 == root2); - */ - sampledLine* generatedLine; - - - - v1->connectDiagonal(v1,v2, &ret_p1, &ret_p2, &generatedLine, ret_polygons); - newSampledLines = generatedLine->insert(newSampledLines); - - ret_polygons = ret_polygons->cutoffPolygon(root1); - - ret_polygons = ret_p1->insertPolygon(ret_polygons); - - ret_polygons = ret_p2->insertPolygon(ret_polygons); - - - - for(Int j=i+1; jsamePolygon(temp1, temp2)) - { - /*if temp1 and temp2 are in different polygons, - *then one of them must be v1 or v2. - */ - - - - assert(temp1==v1 || temp1 == v2 || temp2==v1 || temp2 ==v2); - if(temp1==v1) - { - diagonal_vertices[2*j] = v2->getPrev(); - } - if(temp2==v1) - { - diagonal_vertices[2*j+1] = v2->getPrev(); - } - if(temp1==v2) - { - diagonal_vertices[2*j] = v1->getPrev(); - } - if(temp2==v2) - { - diagonal_vertices[2*j+1] = v1->getPrev(); - } - } - } - } - - } - - /*clean up spaces*/ - free(array); - free(ranges); - free(diagonal_vertices); - free(removedDiagonals); - - *retSampledLines = newSampledLines; - return ret_polygons; -} - -/*given a set of simple polygons where the interior - *is decided by left-hand principle, - *return a range (sight) for each vertex. This is called - *Trapezoidalization. - */ -void sweepY(Int nVertices, directedLine** sortedVertices, sweepRange** ret_ranges) -{ - Int i; - /*for each vertex in the sorted list, update the binary search tree. - *and store the range information for each vertex. - */ - treeNode* searchTree = NULL; - for(i=0; igetPrev(); - - if(isBelow(vert, thisEdge) && isAbove(vert, prevEdge)) - { - - /*case 1: this < v < prev - *the polygon is going down at v, the interior is to - *the right hand side. - * find the edge to the right of thisEdge for right range. - * delete thisEdge - * insert prevEdge - */ - treeNode* thisNode = TreeNodeFind(searchTree, thisEdge, ( Int (*) (void *, void *))compEdges); - assert(thisNode); - - treeNode* succ = TreeNodeSuccessor(thisNode); - assert(succ); - searchTree = TreeNodeDeleteSingleNode(searchTree, thisNode); - searchTree = TreeNodeInsert(searchTree, TreeNodeMake(prevEdge), ( Int (*) (void *, void *))compEdges); - - - ret_ranges[i] = sweepRangeMake(vert, 0, (directedLine*) (succ->key), 1); - - } - else if(isAbove(vert, thisEdge) && isBelow(vert, prevEdge)) - { - - /*case 2: this > v > prev - *the polygon is going up at v, the interior is to - *the left hand side. - * find the edge to the left of thisEdge for left range. - * delete prevEdge - * insert thisEdge - */ - treeNode* prevNode = TreeNodeFind(searchTree, prevEdge, ( Int (*) (void *, void *))compEdges); - assert(prevNode); - treeNode* pred = TreeNodePredecessor(prevNode); - searchTree = TreeNodeDeleteSingleNode(searchTree, prevNode); - searchTree = TreeNodeInsert(searchTree, TreeNodeMake(thisEdge), ( Int (*) (void *, void *))compEdges); - ret_ranges[i] = sweepRangeMake((directedLine*)(pred->key), 1, vert, 0); - } - else if(isAbove(vert, thisEdge) && isAbove(vert, prevEdge)) - { - - /*case 3: insert both edges*/ - treeNode* thisNode = TreeNodeMake(thisEdge); - treeNode* prevNode = TreeNodeMake(prevEdge); - searchTree = TreeNodeInsert(searchTree, thisNode, ( Int (*) (void *, void *))compEdges); - searchTree = TreeNodeInsert(searchTree, prevNode, ( Int (*) (void *, void *))compEdges); - if(compEdges(thisEdge, prevEdge)<0) /*interior cusp*/ - { - - treeNode* leftEdge = TreeNodePredecessor(thisNode); - treeNode* rightEdge = TreeNodeSuccessor(prevNode); - ret_ranges[i] = sweepRangeMake( (directedLine*) leftEdge->key, 1, - (directedLine*) rightEdge->key, 1 - ); - } - else /*exterior cusp*/ - { - - ret_ranges[i] = sweepRangeMake( prevEdge, 1, thisEdge, 1); - } - } - else if(isBelow(vert, thisEdge) && isBelow(vert, prevEdge)) - { - - /*case 4: delete both edges*/ - treeNode* thisNode = TreeNodeFind(searchTree, thisEdge, ( Int (*) (void *, void *))compEdges); - treeNode* prevNode = TreeNodeFind(searchTree, prevEdge, ( Int (*) (void *, void *))compEdges); - if(compEdges(thisEdge, prevEdge)>0) /*interior cusp*/ - { - treeNode* leftEdge = TreeNodePredecessor(prevNode); - treeNode* rightEdge = TreeNodeSuccessor(thisNode); - ret_ranges[i] = sweepRangeMake( (directedLine*) leftEdge->key, 1, - (directedLine*) rightEdge->key, 1 - ); - } - else /*exterior cusp*/ - { - ret_ranges[i] = sweepRangeMake( thisEdge, 1, prevEdge, 1); - } - searchTree = TreeNodeDeleteSingleNode(searchTree, thisNode); - searchTree = TreeNodeDeleteSingleNode(searchTree, prevNode); - } - else - { - fprintf(stderr,"error in partitionY.C, invalid case\n"); - printf("vert is\n"); - vert->printSingle(); - printf("thisEdge is\n"); - thisEdge->printSingle(); - printf("prevEdge is\n"); - prevEdge->printSingle(); - - exit(1); - } - } - - /*finaly clean up space: delete the search tree*/ - TreeNodeDeleteWholeTree(searchTree); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/partitionY.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/partitionY.h deleted file mode 100644 index b810693a5c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/partitionY.h +++ /dev/null @@ -1,104 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* - *partitionY.h: - *partition a polygon into a Y-monotone polygon: - * A polygon is Y-monotone if the boundary can be split into two polygon chains - *A and B such that each chain is Y-monotonic that is the intersection of any - *horizontal line intersects each chain has at most one connected componenets - * (empty, single point or a single line). - * - * A vertex is a cusp if both its ajacent vertices are either at or above v, - *or both at or below v. In addition, at least one of the ajacent verteces is - *strictly below or above v. - * A vertex is a relex vertex if the internals angle is strictly greater than - *180. In other words, if the the signed area is negative: - *(x1, y1), (x2, y2), (x3, y3) are the three vertices along a polygon, the - *order is such that left hand side is inside the polygon. Then (x2,y2) is - *reflex if: - * (x2-x1, y2-y1) cross (x3-x1, y3-y1) <0. - *A vertex is an interior cusp if it is a cusp and a reflex. - *A vertex is an exterior cusp if it is a cusp but not a reflex. - * - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/partitionY.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ - */ - -#ifndef _PARTITIONY_H -#define _PARTITIONY_H - -#include "directedLine.h" - -/*whether an edge is below a vertex*/ -Int isBelow(directedLine *v, directedLine *e); - -/*whether an edge is above a vertex*/ -Int isAbove(directedLine *v, directedLine *e); - -/*not-cusp, - *inerior cusp - *exterior cusp - */ -Int cuspType(directedLine *v); - -/*used in trapezoidalization*/ -typedef struct sweepRange{ - directedLine *left; - Int leftType; /*either a vertex (leftType=0) or an edge (leftType =1) */ - directedLine *right; - Int rightType; /*either a vertex (rightType=0) or an edge (rightType =1) */ -} sweepRange; - -sweepRange* sweepRangeMake(directedLine* left, Int leftType, - directedLine* right, Int rightType); - -void sweepRangeDelete(sweepRange* range); -Int sweepRangeEqual(sweepRange* sr1, sweepRange* sr2); - -/*given a set of simple polygons where the interior - *is decided by left-hand principle, - *return a range (sight) for each vertex. This is called - *Trapezoidalization. - */ -void sweepY(Int nVertices, directedLine **sortedVerteces, sweepRange** ret_ranges); - - -directedLine* partitionY(directedLine *polygons, sampledLine **retSampledLines); - -void findDiagonals(Int total_num_edges, directedLine** sortedVertices, sweepRange** ranges, Int& num_diagonals, directedLine** diagonal_vertices); - -directedLine** DBGfindDiagonals(directedLine *polygons, Int& num_diagonals); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/polyDBG.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/polyDBG.cc deleted file mode 100644 index 4d04df73f6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/polyDBG.cc +++ /dev/null @@ -1,734 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -*/ - -#include -#include -#include -#include "zlassert.h" -#include "polyDBG.h" - -#ifdef __WATCOMC__ -#pragma warning 14 10 -#pragma warning 391 10 -#pragma warning 726 10 -#endif - -static Real area(Real A[2], Real B[2], Real C[2]) -{ - Real Bx, By, Cx, Cy; - Bx = B[0] - A[0]; - By = B[1] - A[1]; - Cx = C[0] - A[0]; - Cy = C[1] - A[1]; - return Bx*Cy - Cx*By; -} - -Int DBG_isConvex(directedLine *poly) -{ - directedLine* temp; - if(area(poly->head(), poly->tail(), poly->getNext()->tail()) < 0.00000) - return 0; - for(temp = poly->getNext(); temp != poly; temp = temp->getNext()) - { - if(area(temp->head(), temp->tail(), temp->getNext()->tail()) < 0.00000) - return 0; - } - return 1; -} - -Int DBG_is_U_monotone(directedLine* poly) -{ - Int n_changes = 0; - Int prev_sign; - Int cur_sign; - directedLine* temp; - cur_sign = compV2InX(poly->tail(), poly->head()); - - n_changes = (compV2InX(poly->getPrev()->tail(), poly->getPrev()->head()) - != cur_sign); - - for(temp = poly->getNext(); temp != poly; temp = temp->getNext()) - { - prev_sign = cur_sign; - cur_sign = compV2InX(temp->tail(), temp->head()); - - if(cur_sign != prev_sign) - n_changes++; - } - - if(n_changes ==2) return 1; - else return 0; -} - -/*if u-monotone, and there is a long horizontal edge*/ -Int DBG_is_U_direction(directedLine* poly) -{ -/* - if(! DBG_is_U_monotone(poly)) - return 0; -*/ - Int V_count = 0; - Int U_count = 0; - directedLine* temp; - if( fabs(poly->head()[0] - poly->tail()[0]) <= fabs(poly->head()[1]-poly->tail()[1])) - V_count += poly->get_npoints(); - else - U_count += poly->get_npoints(); - /* - else if(poly->head()[1] == poly->tail()[1]) - U_count += poly->get_npoints(); - */ - for(temp = poly->getNext(); temp != poly; temp = temp->getNext()) - { - if( fabs(temp->head()[0] - temp->tail()[0]) <= fabs(temp->head()[1]-temp->tail()[1])) - V_count += temp->get_npoints(); - else - U_count += temp->get_npoints(); - /* - if(temp->head()[0] == temp->tail()[0]) - V_count += temp->get_npoints(); - else if(temp->head()[1] == temp->tail()[1]) - U_count += temp->get_npoints(); - */ - } - - if(U_count > V_count) return 1; - else return 0; -} - -/*given two line segments, determine whether - *they intersect each other or not. - *return 1 if they do, - *return 0 otherwise - */ -Int DBG_edgesIntersect(directedLine* l1, directedLine* l2) -{ - if(l1->getNext() == l2) - { - if(area(l1->head(), l1->tail(), l2->tail()) == 0) //colinear - { - if( (l1->tail()[0] - l1->head()[0])*(l2->tail()[0]-l2->head()[0]) + - (l1->tail()[1] - l1->head()[1])*(l2->tail()[1]-l2->head()[1]) >=0) - return 0; //not intersect - else - return 1; - } - //else we use the normal code - } - else if(l1->getPrev() == l2) - { - if(area(l2->head(), l2->tail(), l1->tail()) == 0) //colinear - { - if( (l2->tail()[0] - l2->head()[0])*(l1->tail()[0]-l1->head()[0]) + - (l2->tail()[1] - l2->head()[1])*(l1->tail()[1]-l1->head()[1]) >=0) - return 0; //not intersect - else - return 1; - } - //else we use the normal code - } - else //the two edges are not connected - { - if((l1->head()[0] == l2->head()[0] && - l1->head()[1] == l2->head()[1]) || - (l1->tail()[0] == l2->tail()[0] && - l1->tail()[1] == l2->tail()[1])) - return 1; - - } - - - if( - ( - area(l1->head(), l1->tail(), l2->head()) - * - area(l1->head(), l1->tail(), l2->tail()) - < 0 - ) - && - ( - area(l2->head(), l2->tail(), l1->head()) - *area(l2->head(), l2->tail(), l1->tail()) - < 0 - ) - ) - return 1; - else - return 0; -} - -/*whether AB and CD intersect - *return 1 if they do - *retur 0 otheriwse - */ -Int DBG_edgesIntersectGen(Real A[2], Real B[2], Real C[2], Real D[2]) -{ - if( - ( - area(A, B, C) * area(A,B,D) <0 - ) - && - ( - area(C,D,A) * area(C,D,B) < 0 - ) - ) - return 1; - else - return 0; -} - -/*determien whether (A,B) interesect chain[start] to [end] - */ -Int DBG_intersectChain(vertexArray* chain, Int start, Int end, Real A[2], Real B[2]) -{ - Int i; - for(i=start; i<=end-2; i++) - if(DBG_edgesIntersectGen(chain->getVertex(i), chain->getVertex(i+1), A, B)) - return 1; - - return 0; -} - -/*determine whether a polygon intersect itself or not - *return 1 is it does, - * 0 otherwise - */ -Int DBG_polygonSelfIntersect(directedLine* poly) -{ - directedLine* temp1; - directedLine* temp2; - temp1=poly; - for(temp2=temp1->getNext(); temp2 != temp1; temp2=temp2->getNext()) - { - if(DBG_edgesIntersect(temp1, temp2)) - { - return 1; - } - - } - - for(temp1=poly->getNext(); temp1 != poly; temp1 = temp1->getNext()) - for(temp2=temp1->getNext(); temp2 != temp1; temp2=temp2->getNext()) - { - if(DBG_edgesIntersect(temp1, temp2)) - { - return 1; - } - } - return 0; -} - -/*check whether a line segment intersects a polygon - */ -Int DBG_edgeIntersectPoly(directedLine* edge, directedLine* poly) -{ - directedLine* temp; - if(DBG_edgesIntersect(edge, poly)) - return 1; - for(temp=poly->getNext(); temp != poly; temp=temp->getNext()) - if(DBG_edgesIntersect(edge, temp)) - return 1; - return 0; -} - -/*check whether two polygons intersect - */ -Int DBG_polygonsIntersect(directedLine* p1, directedLine* p2) -{ - directedLine* temp; - if(DBG_edgeIntersectPoly(p1, p2)) - return 1; - for(temp=p1->getNext(); temp!= p1; temp = temp->getNext()) - if(DBG_edgeIntersectPoly(temp, p2)) - return 1; - return 0; -} - -/*check whether there are polygons intersecting each other in - *a list of polygons - */ -Int DBG_polygonListIntersect(directedLine* pList) -{ - directedLine *temp; - for(temp=pList; temp != NULL; temp = temp->getNextPolygon()) - if(DBG_polygonSelfIntersect(temp)) - return 1; - directedLine* temp2; - for(temp=pList; temp!=NULL; temp=temp->getNextPolygon()) - { - for(temp2=temp->getNextPolygon(); temp2 != NULL; temp2=temp2->getNextPolygon()) - if(DBG_polygonsIntersect(temp, temp2)) - return 1; - } - - return 0; -} - - -Int DBG_isCounterclockwise(directedLine* poly) -{ - return (poly->polyArea() > 0); -} - -/*ray: v0 with direction (dx,dy). - *edge: v1-v2. - * the extra point v10[2] is given for the information at - *v1. Basically this edge is connectd to edge - * v10-v1. If v1 is on the ray, - * then we need v10 to determine whether this ray intersects - * the edge or not (that is, return 1 or return 0). - * If v1 is on the ray, then if v2 and v10 are on the same side of the ray, - * we return 0, otherwise return 1. - *For v2, if v2 is on the ray, we always return 0. - *Notice that v1 and v2 are not symmetric. So the edge is directed!!! - * The purpose for this convention is such that: a point is inside a polygon - * if and only if it intersets with odd number of edges. - */ -Int DBG_rayIntersectEdge(Real v0[2], Real dx, Real dy, Real v10[2], Real v1[2], Real v2[2]) -{ -/* -if( (v1[1] >= v0[1] && v2[1]<= v0[1] ) - ||(v2[1] >= v0[1] && v1[1]<= v0[1] ) - ) - printf("rayIntersectEdge, *********\n"); -*/ - - Real denom = (v2[0]-v1[0])*(-dy) - (v2[1]-v1[1]) * (-dx); - Real nomRay = (v2[0]-v1[0]) * (v0[1] - v1[1]) - (v2[1]-v1[1])*(v0[0]-v1[0]); - Real nomEdge = (v0[0]-v1[0]) * (-dy) - (v0[1]-v1[1])*(-dx); - - - /*if the ray is parallel to the edge, return 0: not intersect*/ - if(denom == 0.0) - return 0; - - /*if v0 is on the edge, return 0: not intersect*/ - if(nomRay == 0.0) - return 0; - - /*if v1 is on the positive ray, and the neighbor of v1 crosses the ray - *return 1: intersect - */ - if(nomEdge == 0) - { /*v1 is on the positive or negative ray*/ - -/* - printf("v1 is on the ray\n"); -*/ - - if(dx*(v1[0]-v0[0])>=0 && dy*(v1[1]-v0[1])>=0) /*v1 on positive ray*/ - { - if(area(v0, v1, v10) * area(v0, v1, v2) >0) - return 0; - else - return 1; - } - else /*v1 on negative ray*/ - return 0; - } - - /*if v2 is on the ray, always return 0: not intersect*/ - if(nomEdge == denom) { -/* printf("v2 is on the ray\n");*/ - return 0; - } - - /*finally */ - if(denom*nomRay>0 && denom*nomEdge>0 && nomEdge/denom <=1.0) - return 1; - return 0; -} - - -/*return the number of intersections*/ -Int DBG_rayIntersectPoly(Real v0[2], Real dx, Real dy, directedLine* poly) -{ - directedLine* temp; - Int count=0; - if(DBG_rayIntersectEdge(v0, dx, dy, poly->getPrev()->head(), poly->head(), poly->tail())) - count++; - - for(temp=poly->getNext(); temp != poly; temp = temp->getNext()) - if(DBG_rayIntersectEdge(v0, dx, dy, temp->getPrev()->head(), temp->head(), temp->tail())) - count++; -/*printf("ray intersect poly: count=%i\n", count);*/ - return count; -} - -Int DBG_pointInsidePoly(Real v[2], directedLine* poly) -{ -/* -printf("enter pointInsidePoly , v=(%f,%f)\n", v[0], v[1]); -printf("the polygon is\n"); -poly->printList(); -*/ - /*for debug purpose*/ - assert( (DBG_rayIntersectPoly(v,1,0,poly) % 2 ) - == (DBG_rayIntersectPoly(v,1,Real(0.1234), poly) % 2 ) - ); - if(DBG_rayIntersectPoly(v, 1, 0, poly) % 2 == 1) - return 1; - else - return 0; -} - -/*return the number of polygons which contain thie polygon - * as a subset - */ -Int DBG_enclosingPolygons(directedLine* poly, directedLine* list) -{ - directedLine* temp; - Int count=0; -/* -printf("%i\n", DBG_pointInsidePoly(poly->head(), - list->getNextPolygon() - ->getNextPolygon() - ->getNextPolygon() - ->getNextPolygon() -)); -*/ - - for(temp = list; temp != NULL; temp = temp->getNextPolygon()) - { - if(poly != temp) - if(DBG_pointInsidePoly(poly->head(), temp)) - count++; -/* printf("count=%i\n", count);*/ - } - return count; -} - -void DBG_reverse(directedLine* poly) -{ - if(poly->getDirection() == INCREASING) - poly->putDirection(DECREASING); - else - poly->putDirection(INCREASING); - - directedLine* oldNext = poly->getNext(); - poly->putNext(poly->getPrev()); - poly->putPrev(oldNext); - - directedLine* temp; - for(temp=oldNext; temp!=poly; temp = oldNext) - { - if(temp->getDirection() == INCREASING) - temp->putDirection(DECREASING); - else - temp->putDirection(INCREASING); - - oldNext = temp->getNext(); - temp->putNext(temp->getPrev()); - temp->putPrev(oldNext); - } - printf("reverse done\n"); -} - -Int DBG_checkConnectivity(directedLine *polygon) -{ - if(polygon == NULL) return 1; - directedLine* temp; - if(polygon->head()[0] != polygon->getPrev()->tail()[0] || - polygon->head()[1] != polygon->getPrev()->tail()[1]) - return 0; - for(temp=polygon->getNext(); temp != polygon; temp=temp->getNext()) - { - if(temp->head()[0] != temp->getPrev()->tail()[0] || - temp->head()[1] != temp->getPrev()->tail()[1]) - return 0; - } - return 1; -} - -/*print out error message. - *If it cannot modify the polygon list to make it satify the - *requirements, return 1. - *otherwise modify the polygon list, and return 0 - */ -Int DBG_check(directedLine *polyList) -{ - directedLine* temp; - if(polyList == NULL) return 0; - - /*if there are intersections, print out error message - */ - if(DBG_polygonListIntersect(polyList)) - { - fprintf(stderr, "DBG_check: there are self intersections, don't know to modify the polygons\n"); - return 1; - } - - /*check the connectivity of each polygon*/ - for(temp = polyList; temp!= NULL; temp = temp ->getNextPolygon()) - { - if(! DBG_checkConnectivity(temp)) - { - fprintf(stderr, "DBG_check, polygon not connected\n"); - return 1; - } - } - - /*check the orientation of each polygon*/ - for(temp = polyList; temp!= NULL; temp = temp ->getNextPolygon()) - { - - - Int correctDir; - - if( DBG_enclosingPolygons(temp, polyList) % 2 == 0) - correctDir = 1; /*counterclockwise*/ - else - correctDir = 0; /*clockwise*/ - - Int actualDir = DBG_isCounterclockwise(temp); - - if(correctDir != actualDir) - { - fprintf(stderr, "DBG_check: polygon with incorrect orientations. reversed\n"); - - DBG_reverse(temp); - } - - } - return 0; -} - -/**************handle self intersections*****************/ -//determine whether e interects [begin, end] or not -static directedLine* DBG_edgeIntersectChainD(directedLine *e, - directedLine *begin, directedLine *end) -{ - directedLine *temp; - for(temp=begin; temp != end; temp = temp->getNext()) - { - if(DBG_edgesIntersect(e, temp)) - return temp; - } - if(DBG_edgesIntersect(e, end)) - return end; - return NULL; -} - -//given a polygon, cut the edges off and finally obtain a -//a polygon without intersections. The cut-off edges are -//dealloated. The new polygon is returned. -directedLine* DBG_cutIntersectionPoly(directedLine *polygon, int& cutOccur) -{ - directedLine *begin, *end, *next; - begin = polygon; - end = polygon; - cutOccur = 0; - while( (next = end->getNext()) != begin) - { - directedLine *interc = NULL; - if( (interc = DBG_edgeIntersectChainD(next, begin, end))) - { - int fixed = 0; - if(DBG_edgesIntersect(next, interc->getNext())) - { - //trying to fix it - Real buf[2]; - int i; - Int n=5; - buf[0] = interc->tail()[0]; - buf[1] = interc->tail()[1]; - - for(i=1; ihead()[0] + r * interc->tail()[0]; - Real v = (1-r) * interc->head()[1] + r * interc->tail()[1]; - interc->tail()[0] = interc->getNext()->head()[0] = u; - interc->tail()[1] = interc->getNext()->head()[1] = v; - if( (! DBG_edgesIntersect(next, interc)) && - (! DBG_edgesIntersect(next, interc->getNext()))) - break; //we fixed it - } - if(i==n) // we didn't fix it - { - fixed = 0; - //back to original - interc->tail()[0] = interc->getNext()->head()[0] = buf[0]; - interc->tail()[1] = interc->getNext()->head()[1] = buf[1]; - } - else - { - fixed = 1; - } - } - if(fixed == 0) - { - cutOccur = 1; - begin->deleteSingleLine(next); - - if(begin != end) - { - if(DBG_polygonSelfIntersect(begin)) - { - directedLine* newEnd = end->getPrev(); - begin->deleteSingleLine(end); - end = newEnd; - } - } - } - else - { - end = end->getNext(); - } - } - else - { - end = end->getNext(); - } - } - return begin; -} - -//given a polygon, cut the edges off and finally obtain a -//a polygon without intersections. The cut-off edges are -//dealloated. The new polygon is returned. -#if 0 // UNUSED -static directedLine* DBG_cutIntersectionPoly_notwork(directedLine *polygon) -{ - directedLine *crt;//current polygon - directedLine *begin; - directedLine *end; - directedLine *temp; - crt = polygon; - int find=0; - while(1) - { -//printf("loop\n"); - //if there are less than 3 edges, we should stop - if(crt->getPrev()->getPrev() == crt) - return NULL; - - if(DBG_edgesIntersect(crt, crt->getNext()) || - (crt->head()[0] == crt->getNext()->tail()[0] && - crt->head()[1] == crt->getNext()->tail()[1]) - ) - { - find = 1; - crt=crt->deleteChain(crt, crt->getNext()); - } - else - { - //now we know crt and crt->getNext do not intersect - begin = crt; - end = crt->getNext(); -//printf("begin=(%f,%f)\n", begin->head()[0], begin->head()[1]); -//printf("end=(%f,%f)\n", end->head()[0], end->head()[1]); - for(temp=end->getNext(); temp!=begin; temp= temp->getNext()) - { -//printf("temp=(%f,%f)\n", temp->head()[0], temp->head()[1]); - directedLine *intersect = DBG_edgeIntersectChainD(temp, begin, end); - if(intersect != NULL) - { - crt = crt->deleteChain(intersect, temp); - find=1; - break; //the for loop - } - else - { - end = temp; - } - } - } - if(find == 0) - return crt; - else - find = 0; //go to next loop -} -} -#endif - -directedLine* DBG_cutIntersectionAllPoly(directedLine* list) -{ - directedLine* temp; - directedLine* tempNext=NULL; - directedLine* ret = NULL; - int cutOccur=0; - for(temp=list; temp != NULL; temp = tempNext) - { - directedLine *left; - tempNext = temp->getNextPolygon(); - - left = DBG_cutIntersectionPoly(temp, cutOccur); - if(left != NULL) - ret=left->insertPolygon(ret); - } - return ret; -} - -sampledLine* DBG_collectSampledLinesAllPoly(directedLine *polygonList) -{ - directedLine *temp; - sampledLine* tempHead = NULL; - sampledLine* tempTail = NULL; - sampledLine* cHead = NULL; - sampledLine* cTail = NULL; - - if(polygonList == NULL) - return NULL; - - DBG_collectSampledLinesPoly(polygonList, cHead, cTail); - - assert(cHead); - assert(cTail); - for(temp = polygonList->getNextPolygon(); temp != NULL; temp = temp->getNextPolygon()) - { - DBG_collectSampledLinesPoly(temp, tempHead, tempTail); - cTail->insert(tempHead); - cTail = tempTail; - } - return cHead; -} - -void DBG_collectSampledLinesPoly(directedLine *polygon, sampledLine*& retHead, sampledLine*& retTail) -{ - directedLine *temp; - retHead = NULL; - retTail = NULL; - if(polygon == NULL) - return; - - retHead = retTail = polygon->getSampledLine(); - for(temp = polygon->getNext(); temp != polygon; temp=temp->getNext()) - { - retHead = temp->getSampledLine()->insert(retHead); - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/polyDBG.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/polyDBG.h deleted file mode 100644 index a5125a50d1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/polyDBG.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/polyDBG.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef _POLYDBG_H -#define _POLYDBG_H - -#include "definitions.h" -#include "directedLine.h" -#include "monoTriangulation.h" - -Int DBG_edgesIntersectGen(Real A[2], Real B[2], Real C[2], Real D[2]); -Int DBG_intersectChain(vertexArray* chain, Int start, Int end, Real A[2], Real B[2]); - - -Int DBG_edgesIntersect(directedLine* l1, directedLine* l2); -Int DBG_polygonSelfIntersect(directedLine* poly); -Int DBG_edgeIntersectPoly(directedLine* edge, directedLine* poly); -Int DBG_polygonsIntersect(directedLine* p1, directedLine* p2); -Int DBG_polygonListIntersect(directedLine* pList); - -Int DBG_isCounterclockwise(directedLine* poly); -Int DBG_rayIntersectEdge(Real v0[2], Real dx, Real dy, Real v10[2], Real v1[2], Real v2[2]); -Int DBG_pointInsidePoly(Real v[2], directedLine* poly); -Int DBG_enclosingPolygons(directedLine* poly, directedLine* list); -void DBG_reverse(directedLine* poly); -Int DBG_check(directedLine *polyList); - -Int DBG_isConvex(directedLine *poly); -Int DBG_is_U_direction(directedLine *poly); -Int DBG_is_U_monotone(directedLine* poly); - -directedLine* DBG_cutIntersectionAllPoly(directedLine* list); -directedLine* DBG_cutIntersectionPoly(directedLine *polygon, int& cutOccur); - -sampledLine* DBG_collectSampledLinesAllPoly(directedLine *polygonList); - -void DBG_collectSampledLinesPoly(directedLine *polygon, sampledLine*& retHead, sampledLine*& retTail); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/polyUtil.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/polyUtil.cc deleted file mode 100644 index 1a17bcc78a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/polyUtil.cc +++ /dev/null @@ -1,92 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/polyUtil.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include -#include - -#include "polyUtil.h" - -Real area(Real A[2], Real B[2], Real C[2]) -{ - Real Bx, By, Cx, Cy; - Bx = B[0] - A[0]; - By = B[1] - A[1]; - Cx = C[0] - A[0]; - Cy = C[1] - A[1]; - return Bx*Cy - Cx*By; - -/* return (B[0]-A[0])*(C[1]-A[1]) - (C[0]-A[0])*(B[1]-A[1]);*/ -} - -/*given a directed line A->B, and a point P, - *determine whether P is to the left of AB. - *the line A->B (imagine it has beedn extended both - *end to the infinity) divides the plan into two - *half planes. When we walk from A to B, one - *half is to the left and the other half is to the right. - *return 1 if P is to the left. - *if P is on AB, 0 is returned. - */ -Int pointLeftLine(Real A[2], Real B[2], Real P[2]) -{ - if(area(A, B, P) >0) return 1; - else return 0; -} - -/*given two directed line: A -> B -> C, and another point P. - *determine whether P is to the left hand side of A->B->C. - *Think of BA and BC extended as two rays. So that the plane is - * divided into two parts. One part is to the left we walk from A - *to B and to C, the other part is to the right. - * In order for P to be the left, P must be either to the left - *of - */ -Int pointLeft2Lines(Real A[2], Real B[2], Real C[2], Real P[2]) -{ - Int C_left_AB = (area(A, B, C)>0); - Int P_left_AB = (area(A, B, P)>0); - Int P_left_BC = (area(B, C, P)>0); - - if(C_left_AB) - { - return (P_left_AB && P_left_BC); - } - else - return (P_left_AB || P_left_BC); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/polyUtil.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/polyUtil.h deleted file mode 100644 index 19c76d37d3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/polyUtil.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/polyUtil.h,v 1.2 2001/11/29 16:16:55 kschultz Exp $ -*/ - -#ifndef _POLYUTIL_H -#define _POLYUTIL_H - -#include "definitions.h" -#ifdef __cplusplus -extern "C" { -#endif -Real area(Real A[2], Real B[2], Real C[2]); - -Int pointLeftLine(Real A[2], Real B[2], Real P[2]); -Int pointLeft2Lines(Real A[2], Real B[2], Real C[2], Real P[2]); -#ifdef __cplusplus -} -#endif -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/primitiveStream.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/primitiveStream.cc deleted file mode 100644 index 2d54b155ee..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/primitiveStream.cc +++ /dev/null @@ -1,192 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/primitiveStream.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include -#include -#include - -#include "primitiveStream.h" - -Int primStream::num_triangles() -{ - Int i; - Int ret=0; - for(i=0; i= size_vertices) { - Real* temp = (Real*) malloc (sizeof(Real) * (2*size_vertices + 2)); - assert(temp); - - /*copy*/ - for(Int i=0; i= size_lengths){ - Int* temp = (Int*) malloc(sizeof(Int) * (2*size_lengths + 2)); - assert(temp); - Int* tempTypes = (Int*) malloc(sizeof(Int) * (2*size_lengths + 2)); - assert(tempTypes); - - /*copy*/ - for(i=0; i - */ - -#ifndef _PRIMITIVE_STREAM_H -#define _PRIMITIVE_STREAM_H - -enum {PRIMITIVE_STREAM_FAN, PRIMITIVE_STREAM_STRIP}; - -#include "definitions.h" - -class primStream { - Int *lengths; /*length[i]=number of vertices of ith primitive*/ - Int *types; /*each primive has a type: FAN or STREAM*/ - Real *vertices; /*the size >= 2 * num_vertices, each vertex (u,v)*/ - - /*the following size information are used for dynamic arrays*/ - Int index_lengths; /*the current available entry*/ - Int size_lengths; /*the allocated size of the array: lengths*/ - Int index_vertices; - Int size_vertices; - - /*the vertex is inserted one by one. counter is used to - *count the number of vertices which have been inserted so far in - *the current primitive - */ - Int counter; - -public: - primStream(Int sizeLengths, Int sizeVertices); - ~primStream(); - - Int get_n_prims() //num of primitives - { - return index_lengths; - } - Int get_type(Int i) //the type of ith primitive - { - return types[i]; - } - Int get_length(Int i) //the length of the ith primitive - { - return lengths[i]; - } - Real* get_vertices() {return vertices;} - - /*the begining of inserting a new primitive. - *reset counter to be 0. - */ - void begin(); - void insert(Real u, Real v); - void insert(Real v[2]) {insert(v[0], v[1]);} - void end(Int type); - - Int num_triangles(); - - void triangle(Real A[2], Real B[2], Real C[2]) - { - begin(); - insert(A); - insert(B); - insert(C); - end(PRIMITIVE_STREAM_FAN); - } - void print(); - void draw(); /*using GL to draw the primitives*/ -}; - - - - - - - - -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/quicksort.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/quicksort.cc deleted file mode 100644 index f411aaa82a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/quicksort.cc +++ /dev/null @@ -1,79 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2002/04/17 19:30:41 $ $Revision: 1.2 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/quicksort.cc,v 1.2 2002/04/17 19:30:41 brianp Exp $ -*/ - -#include -#include - - -static void swap(void *v[], int i, int j) -{ - void *temp; - temp = v[i]; - v[i] = v[j]; - v[j] = temp; -} - -/*as an example to use this function to - *sort integers, you need to supply the function - *int comp(int *i1, int *i2) - *{ - * if( *i1 < * i2) return -1; - * else return 1; - *} - *and an array of pointers to integers: - * int *v[100] (allocate space for where each v[i] points to). - *then you can call: - * quicksort( (void**)v, left, right, (int (*)(void *, void *))comp) - */ -void quicksort(void *v[], int left, int right, - int (*comp) (void *, void *)) -{ - int i, last; - if(left >= right) /*do nothing if array contains */ - return; /*fewer than two elements*/ - - swap(v, left, (left+right)/2); - last = left; - for(i=left+1; i<=right; i++) - if((*comp)(v[i], v[left])<0) - swap(v, ++last, i); - swap(v, left, last); - quicksort(v, left, last-1, comp); - quicksort(v, last+1, right, comp); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/quicksort.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/quicksort.h deleted file mode 100644 index af245615b3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/quicksort.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/quicksort.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef _QUICKSORT_H -#define _QUICKSORT_H - -#include -#include - -void quicksort(void *v[], int left, int right, - int (*comp) (void *, void *)); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/rectBlock.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/rectBlock.cc deleted file mode 100644 index 932683ccac..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/rectBlock.cc +++ /dev/null @@ -1,198 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/rectBlock.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include -#include "glimports.h" -#include "zlassert.h" -#include - -#include "rectBlock.h" - -rectBlock::rectBlock(gridBoundaryChain* left, gridBoundaryChain* right, Int beginVline, Int endVline) -{ - Int i; - - - upGridLineIndex = left->getVlineIndex(beginVline); - - lowGridLineIndex = left->getVlineIndex(endVline); - - Int n = upGridLineIndex-lowGridLineIndex+1; //number of grid lines - leftIndices = (Int*) malloc(sizeof(Int) * n); - assert(leftIndices); - rightIndices = (Int*) malloc(sizeof(Int) * n); - assert(rightIndices); - for(i=0; igetInnerIndex(i+beginVline); - rightIndices[i] = right->getInnerIndex(i+beginVline); - } -} - - -rectBlock::~rectBlock() -{ - free(leftIndices); - free(rightIndices); -} - -void rectBlock::print() -{ - Int i; - printf("block:\n"); - for(i=upGridLineIndex; i >= lowGridLineIndex; i--) - { - printf("gridline %i, (%i,%i)\n", i, leftIndices[upGridLineIndex-i], rightIndices[upGridLineIndex-i]); - } -} - - - -void rectBlock::draw(Real* u_values, Real* v_values) -{ - Int i,j,k; - //upgrid line to bot grid line -#ifdef DEBUG -printf("upGridLineIndex=%i, lowGridLineIndex=%i\n", upGridLineIndex, lowGridLineIndex); -#endif - for(k=0, i=upGridLineIndex; i > lowGridLineIndex; i--, k++) - { - glBegin(GL_QUAD_STRIP); - - for(j=leftIndices[k+1]; j<= rightIndices[k+1]; j++) - { - glVertex2f(u_values[j], v_values[i]); - glVertex2f(u_values[j], v_values[i-1]); - } - glEnd(); - } -} - - -Int rectBlock::num_quads() -{ - Int ret=0; - Int k,i; - for(k=0, i=upGridLineIndex; i>lowGridLineIndex; i--, k++) - { - ret += (rightIndices[k+1]-leftIndices[k+1]); - } - return ret; -} - -Int rectBlockArray::num_quads() -{ - Int ret=0; - for(Int i=0; inum_quads(); - return ret; -} - -rectBlockArray::rectBlockArray(Int s) -{ - Int i; - n_elements = 0; - size = s; - array = (rectBlock**) malloc(sizeof(rectBlock*) * s); - assert(array); -//initialization - for(i=0; iprint(); -} - -void rectBlockArray::draw(Real* u_values, Real* v_values) -{ - Int i; - for(i=0; idraw(u_values, v_values); -} - - - - - - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/rectBlock.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/rectBlock.h deleted file mode 100644 index d98b5a03e1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/rectBlock.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/rectBlock.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef _RECTBLOCK_H -#define _RECTBLOCK_H - -#include "definitions.h" -#include "gridWrap.h" - -class rectBlock{ - Int upGridLineIndex; - Int lowGridLineIndex; - Int* leftIndices; //up to bottome - Int* rightIndices; //up to bottom -public: - //the arrays are copies. - rectBlock(gridBoundaryChain* left, gridBoundaryChain* right, Int beginVline, Int endVline); - ~rectBlock(); //free the two arrays - - Int get_upGridLineIndex() {return upGridLineIndex;} - Int get_lowGridLineIndex() {return lowGridLineIndex;} - Int* get_leftIndices() {return leftIndices;} - Int* get_rightIndices() {return rightIndices;} - - Int num_quads(); - - void print(); - void draw(Real* u_values, Real* v_values); -}; - - -class rectBlockArray{ - rectBlock** array; - Int n_elements; - Int size; -public: - rectBlockArray(Int s); - ~rectBlockArray();//delete avarything including the blocks - - Int get_n_elements() {return n_elements;} - rectBlock* get_element(Int i) {return array[i];} - void insert(rectBlock* newBlock); //only take the pointer, not ther cotent - - Int num_quads(); - - void print(); - void draw(Real* u_values, Real* v_values); -}; - - - -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc deleted file mode 100644 index 80c022c835..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc +++ /dev/null @@ -1,373 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2005/10/28 13:09:09 $ $Revision: 1.1.30.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc,v 1.1.30.1 2005/10/28 13:09:09 brianp Exp $ -*/ - -#include -#include -#include "glimports.h" -#include "sampleComp.h" -#include "sampleCompTop.h" -#include "sampleCompBot.h" -#include "sampleCompRight.h" - - - -#define max(a,b) ((a>b)? a:b) -#define min(a,b) ((a>b)? b:a) - -void sampleConnectedComp(Real* topVertex, Real* botVertex, - vertexArray* leftChain, - Int leftStartIndex, Int leftEndIndex, - vertexArray* rightChain, - Int rightStartIndex, Int rightEndIndex, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridIndex1, Int gridIndex2, - Int up_leftCornerWhere, - Int up_leftCornerIndex, - Int up_rightCornerWhere, - Int up_rightCornerIndex, - Int down_leftCornerWhere, - Int down_leftCornerIndex, - Int down_rightCornerWhere, - Int down_rightCornerIndex, - primStream* pStream, - rectBlockArray* rbArray - ) -{ - - sampleCompLeft(topVertex, botVertex, - leftChain, - leftStartIndex, leftEndIndex, - rightChain, - rightStartIndex, rightEndIndex, - leftGridChain, - gridIndex1, - gridIndex2, - up_leftCornerWhere, - up_leftCornerIndex, - down_leftCornerWhere, - down_leftCornerIndex, - pStream); - - - sampleCompRight(topVertex, botVertex, - leftChain, - leftStartIndex, leftEndIndex, - rightChain, - rightStartIndex, - rightEndIndex, - rightGridChain, - gridIndex1, gridIndex2, - up_rightCornerWhere, - up_rightCornerIndex, - down_rightCornerWhere, - down_rightCornerIndex, - pStream); - - - sampleCompTop(topVertex, - leftChain, - leftStartIndex, - rightChain, - rightStartIndex, - leftGridChain, - rightGridChain, - gridIndex1, - up_leftCornerWhere, - up_leftCornerIndex, - up_rightCornerWhere, - up_rightCornerIndex, - pStream); - - sampleCompBot(botVertex, - leftChain, - leftEndIndex, - rightChain, - rightEndIndex, - leftGridChain, - rightGridChain, - gridIndex2, - down_leftCornerWhere, - down_leftCornerIndex, - down_rightCornerWhere, - down_rightCornerIndex, - pStream); - - - //the center - - rbArray->insert(new rectBlock(leftGridChain, rightGridChain, gridIndex1, gridIndex2)); - - -} - -/*notice that we need rightChain because the - *corners could be on the rightChain. - *here comp means component. - */ -void sampleCompLeft(Real* topVertex, Real* botVertex, - vertexArray* leftChain, - Int leftStartIndex, Int leftEndIndex, - vertexArray* rightChain, - Int rightStartIndex, Int rightEndIndex, - gridBoundaryChain* leftGridChain, - Int gridIndex1, Int gridIndex2, - Int up_leftCornerWhere, - Int up_leftCornerIndex, - Int down_leftCornerWhere, - Int down_leftCornerIndex, - primStream* pStream) -{ - /*find out whether there is a trim vertex which is - *inbetween the top and bot grid lines or not. - */ - Int midIndex1; - Int midIndex2; - Int gridMidIndex1 = 0, gridMidIndex2 = 0; - //midIndex1: array[i] <= v, array[i-1] > v - //midIndex2: array[i] >= v, array[i+1] < v - // v(gridMidIndex1) >= v(midindex1) > v(gridMidIndex1+1) - // v(gridMidIndex2-1) >= v(midIndex2) > v(gridMidIndex2) ?? - midIndex1 = leftChain->findIndexBelowGen( - leftGridChain->get_v_value(gridIndex1), - leftStartIndex, - leftEndIndex); - - midIndex2 = -1; /*initilization*/ - if(midIndex1<= leftEndIndex && gridIndex1getVertex(midIndex1)[1] >= leftGridChain->get_v_value(gridIndex2)) - { - midIndex2 = leftChain->findIndexAboveGen( - leftGridChain->get_v_value(gridIndex2), - midIndex1, //midIndex1 <= midIndex2. - leftEndIndex); - gridMidIndex1 = leftGridChain->lookfor(leftChain->getVertex(midIndex1)[1], - gridIndex1, gridIndex2); - gridMidIndex2 = 1+leftGridChain->lookfor(leftChain->getVertex(midIndex2)[1], - gridMidIndex1, gridIndex2); - } - - - /*to interprete the corner information*/ - Real* cornerTop; - Real* cornerBot; - Int cornerLeftStart; - Int cornerLeftEnd; - Int cornerRightUpEnd; - Int cornerRightDownStart; - if(up_leftCornerWhere == 0) /*left corner is on left chain*/ - { - cornerTop = leftChain->getVertex(up_leftCornerIndex); - cornerLeftStart = up_leftCornerIndex+1; - cornerRightUpEnd = -1; /*no right*/ - } - else if(up_leftCornerWhere == 1) /*left corner is on top*/ - { - cornerTop = topVertex; - cornerLeftStart = leftStartIndex; - cornerRightUpEnd = -1; /*no right*/ - } - else /*left corner is on right chain*/ - { - cornerTop = topVertex; - cornerLeftStart = leftStartIndex; - cornerRightUpEnd = up_leftCornerIndex; - } - - if(down_leftCornerWhere == 0) /*left corner is on left chain*/ - { - cornerBot = leftChain->getVertex(down_leftCornerIndex); - cornerLeftEnd = down_leftCornerIndex-1; - cornerRightDownStart = rightEndIndex+1; /*no right*/ - } - else if(down_leftCornerWhere == 1) /*left corner is on bot*/ - { - cornerBot = botVertex; - cornerLeftEnd = leftEndIndex; - cornerRightDownStart = rightEndIndex+1; /*no right*/ - } - else /*left corner is on the right chian*/ - { - cornerBot = botVertex; - cornerLeftEnd = leftEndIndex; - cornerRightDownStart = down_leftCornerIndex; - } - - - - - /*sample*/ - if(midIndex2 >= 0) /*there is a trim point inbewteen grid lines*/ - { - - sampleLeftSingleTrimEdgeRegionGen(cornerTop, leftChain->getVertex(midIndex1), - leftChain, - cornerLeftStart, - midIndex1-1, - leftGridChain, - gridIndex1, - gridMidIndex1, - rightChain, - rightStartIndex, - cornerRightUpEnd, - 0, //no right down section - -1, - pStream); - - sampleLeftSingleTrimEdgeRegionGen(leftChain->getVertex(midIndex2), - cornerBot, - leftChain, - midIndex2+1, - cornerLeftEnd, - leftGridChain, - gridMidIndex2, - gridIndex2, - rightChain, - 0, //no right up section - -1, - cornerRightDownStart, - rightEndIndex, - pStream); - - - sampleLeftStripRecF(leftChain, - midIndex1, - midIndex2, - leftGridChain, - gridMidIndex1, - gridMidIndex2, - pStream); - } - else - { - sampleLeftSingleTrimEdgeRegionGen(cornerTop, cornerBot, - leftChain, - cornerLeftStart, - cornerLeftEnd, - leftGridChain, - gridIndex1, - gridIndex2, - rightChain, - rightStartIndex, - cornerRightUpEnd, - cornerRightDownStart, - rightEndIndex, - pStream); - } -} - -void sampleLeftSingleTrimEdgeRegionGen(Real topVert[2], Real botVert[2], - vertexArray* leftChain, - Int leftStart, - Int leftEnd, - gridBoundaryChain* gridChain, - Int gridBeginIndex, - Int gridEndIndex, - vertexArray* rightChain, - Int rightUpBegin, - Int rightUpEnd, - Int rightDownBegin, - Int rightDownEnd, - primStream* pStream) -{ - Int i,j,k; - - /*creat an array to store all the up and down secments of the right chain, - *and the left end grid points - * - *although vertex array is a dynamic array, but to gain efficiency, - *it is better to initiliza the exact array size - */ - vertexArray vArray(gridEndIndex-gridBeginIndex+1 + - max(0,rightUpEnd - rightUpBegin+1)+ - max(0,rightDownEnd - rightDownBegin+1)); - - /*append the vertices on the up section of thr right chain*/ - for(i=rightUpBegin; i<= rightUpEnd; i++) - vArray.appendVertex(rightChain->getVertex(i)); - - /*append the vertices of the left extremal grid points, - *and at the same time, perform triangulation for the stair cases - */ - vArray.appendVertex(gridChain->get_vertex(gridBeginIndex)); - - for(k=1, i=gridBeginIndex+1; i<=gridEndIndex; i++, k++) - { - vArray.appendVertex(gridChain->get_vertex(i)); - - /*output the fan of the grid points of the (i)th and (i-1)th grid line. - */ - if(gridChain->getUlineIndex(i) < gridChain->getUlineIndex(i-1)) - { - pStream->begin(); - pStream->insert(gridChain->get_vertex(i-1)); - for(j=gridChain->getUlineIndex(i); j<= gridChain->getUlineIndex(i-1); j++) - pStream->insert(gridChain->getGrid()->get_u_value(j), gridChain->get_v_value(i)); - pStream->end(PRIMITIVE_STREAM_FAN); - } - else if(gridChain->getUlineIndex(i) > gridChain->getUlineIndex(i-1)) - { - pStream->begin(); - pStream->insert(gridChain->get_vertex(i)); - for(j=gridChain->getUlineIndex(i); j>= gridChain->getUlineIndex(i-1); j--) - pStream->insert(gridChain->getGrid()->get_u_value(j), gridChain->get_v_value(i-1)); - pStream->end(PRIMITIVE_STREAM_FAN); - } - /*otherwisem, the two are equal, so there is no fan to outout*/ - } - - /*then append all the vertices on the down section of the right chain*/ - for(i=rightDownBegin; i<= rightDownEnd; i++) - vArray.appendVertex(rightChain->getVertex(i)); - - monoTriangulationRecGen(topVert, botVert, - leftChain, leftStart, leftEnd, - &vArray, 0, vArray.getNumElements()-1, - pStream); - -} - - - - - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleComp.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleComp.h deleted file mode 100644 index 8bdc4c41eb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleComp.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleComp.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef _SAMPLECOMP_H -#define _SAMPLECOMP_H - -#include "sampleMonoPoly.h" -#include "rectBlock.h" - -void sampleConnectedComp(Real* topVertex, Real* botVertex, - vertexArray* leftChain, - Int leftStartIndex, Int botLeftIndex, - vertexArray* rightChain, - Int rightStartIndex, Int botRightIndex, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridIndex1, Int gridIndex2, - Int up_leftCornerWhere, - Int up_leftCornerIndex, - Int up_rightCornerWhere, - Int up_rightCornerIndex, - Int down_leftCornerWhere, - Int down_leftCornerIndex, - Int down_rightCornerWhere, - Int down_rightCornerIndex, - primStream* pStream, - rectBlockArray* rbArray - ); - -void sampleCompLeft(Real* topVertex, Real* botVertex, - vertexArray* leftChain, - Int leftStartIndex, Int leftEndIndex, - vertexArray* rightChain, - Int rightStartIndex, Int rightEndIndex, - gridBoundaryChain* leftGridChain, - Int gridIndex1, Int gridIndex2, - Int up_leftCornerWhere, - Int up_leftCornerIndex, - Int down_leftCornerWhere, - Int down_leftCornerIndex, - primStream* pStream); - -void sampleLeftSingleTrimEdgeRegionGen(Real topVert[2], Real botVert[2], - vertexArray* leftChain, - Int leftStart, - Int leftEnd, - gridBoundaryChain* gridChain, - Int gridBegindex, - Int gridEndIndex, - vertexArray* rightChain, - Int rightUpBegin, - Int rightUpEnd, - Int rightDownBegin, - Int rightDownEnd, - primStream* pStream); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc deleted file mode 100644 index b66647aa99..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc +++ /dev/null @@ -1,846 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $ -*/ - -#include -#include -#include "zlassert.h" -#include "sampleCompBot.h" -#include "sampleCompRight.h" - -#define max(a,b) ((a>b)? a:b) - -//return: index_mono, index_pass -//from [pass, mono] is strictly U-monotone -//from [corner, pass] is = u -//if everybost is getVertex(i)[0] >= u) - break; - ret_index_pass = i; - if(ret_index_pass <= leftEnd) - { - for(i=ret_index_pass; i< leftEnd; i++) - { - if(leftChain->getVertex(i+1)[0] <= leftChain->getVertex(i)[0]) - break; - } - ret_index_mono = i; - } - -} - -void findBotRightSegment(vertexArray* rightChain, - Int rightEnd, - Int rightCorner, - Real u, - Int& ret_index_mono, - Int& ret_index_pass) -{ - Int i; - assert(rightCorner <= rightEnd); - for(i=rightCorner; i<= rightEnd; i++) - if(rightChain->getVertex(i)[0] <= u) - break; - - - - ret_index_pass = i; - - if(ret_index_pass <= rightEnd) - { - for(i=ret_index_pass; i< rightEnd; i++) - { - if(rightChain->getVertex(i+1)[0] >= rightChain->getVertex(i)[0]) - break; - } - ret_index_mono = i; - } -} - - -void sampleBotRightWithGridLinePost(Real* botVertex, - vertexArray* rightChain, - Int rightEnd, - Int segIndexMono, - Int segIndexPass, - Int rightCorner, - gridWrap* grid, - Int gridV, - Int leftU, - Int rightU, - primStream* pStream) -{ - //the possible section which is to the right of rightU - if(segIndexPass > rightCorner) //from corner to pass-1 is > u. - { - Real *tempBot; - if(segIndexPass <= rightEnd) //there is a point to the left of u - tempBot = rightChain->getVertex(segIndexPass); - else //nothing is to the left of u. - tempBot = botVertex; - Real tempTop[2]; - tempTop[0] = grid->get_u_value(rightU); - tempTop[1] = grid->get_v_value(gridV); - - monoTriangulation2(tempTop, tempBot, - rightChain, - rightCorner, - segIndexPass-1, - 0, // a decrease chain - pStream); - } - - //the possible section which is strictly Umonotone - if(segIndexPass <= rightEnd) //segIndex pass and mono exist - { - //if there are grid points which are to the left of botVertex - //then we should use botVertex to form a fan with these points to - //optimize the triangulation - int do_optimize = 1; - if(botVertex[0] <= grid->get_u_value(leftU)) - do_optimize = 0; - else - { - //we also have to make sure that botVertex is the left most vertex on the chain - int i; - for(i=segIndexMono; i<=rightEnd; i++) - if(rightChain->getVertex(i)[0] <= botVertex[0]) - { - do_optimize = 0; - break; - } - } - - if(do_optimize) - { - //find midU so that grid->get_u_value(midU) <= botVertex[0] - //and grid->get_u_value(midU) > botVertex[0] - int midU = leftU; - while(grid->get_u_value(midU) <= botVertex[0]) - { - midU++; - if(midU > rightU) - break; - } - midU--; - - grid->outputFanWithPoint(gridV, leftU, midU, botVertex, pStream); - stripOfFanRight(rightChain, segIndexMono, segIndexPass, grid, gridV, midU, rightU, pStream, 1); - Real tempTop[2]; - tempTop[0] = grid->get_u_value(midU); - tempTop[1] = grid->get_v_value(gridV); - monoTriangulation2(tempTop, botVertex, rightChain, segIndexMono, rightEnd, 0, pStream); - } - else //not optimize - { - stripOfFanRight(rightChain, segIndexMono, segIndexPass, grid, gridV, leftU, rightU, pStream, 1); - Real tempTop[2]; - tempTop[0] = grid->get_u_value(leftU); - tempTop[1] = grid->get_v_value(gridV); - monoTriangulation2(tempTop, botVertex, rightChain, segIndexMono, rightEnd, 0, pStream); - } - } - else //the botVertex forms a fan witht eh grid points - grid->outputFanWithPoint(gridV, leftU, rightU, botVertex, pStream); -} - -void sampleBotRightWithGridLine(Real* botVertex, - vertexArray* rightChain, - Int rightEnd, - Int rightCorner, - gridWrap* grid, - Int gridV, - Int leftU, - Int rightU, - primStream* pStream) -{ - //if right chaain is empty, then there is only one bot vertex with - //one grid line - if(rightEndoutputFanWithPoint(gridV, leftU, rightU, botVertex, pStream); - return; - } - - Int segIndexMono, segIndexPass; - findBotRightSegment(rightChain, - rightEnd, - rightCorner, - grid->get_u_value(rightU), - segIndexMono, - segIndexPass); - - sampleBotRightWithGridLinePost(botVertex, - rightChain, - rightEnd, - segIndexMono, - segIndexPass, - rightCorner, - grid, - gridV, - leftU, - rightU, - pStream); -} - - -void sampleBotLeftWithGridLinePost(Real* botVertex, - vertexArray* leftChain, - Int leftEnd, - Int segIndexMono, - Int segIndexPass, - Int leftCorner, - gridWrap* grid, - Int gridV, - Int leftU, - Int rightU, - primStream* pStream) -{ - - //the possible section which is to the left of leftU - if(segIndexPass > leftCorner) //at least leftCorner is to the left of leftU - { - Real *tempBot; - if(segIndexPass <= leftEnd) //from corner to pass-1 is getVertex(segIndexPass); - else //nothing is to the rigth of u - tempBot = botVertex; - Real tempTop[2]; - tempTop[0] = grid->get_u_value(leftU); - tempTop[1] = grid->get_v_value(gridV); - monoTriangulation2(tempTop, tempBot, leftChain, leftCorner, segIndexPass-1, - 1, //a increase chain, - pStream); - } - //the possible section which is strictly Umonotone - if(segIndexPass <= leftEnd) //segIndexpass and mono exist - { - stripOfFanLeft(leftChain, segIndexMono, segIndexPass, grid, gridV, leftU, rightU, pStream, 1); - Real tempTop[2]; - tempTop[0] = grid->get_u_value(rightU); - tempTop[1] = grid->get_v_value(gridV); - - monoTriangulation2(tempTop, botVertex, leftChain, segIndexMono, leftEnd, - 1, //increase chain - pStream); - } - else //the botVertex forms a fan with the grid points - { - grid->outputFanWithPoint(gridV, leftU, rightU, botVertex, pStream); - } - -} - -void sampleBotLeftWithGridLine(Real* botVertex, - vertexArray* leftChain, - Int leftEnd, - Int leftCorner, - gridWrap* grid, - Int gridV, - Int leftU, - Int rightU, - primStream* pStream) -{ - - //if leftChain is empty, then there is only one botVertex with one grid line - if(leftEnd< leftCorner){ - grid->outputFanWithPoint(gridV, leftU, rightU, botVertex, pStream); - return; - } - - Int segIndexPass, segIndexMono; - findBotLeftSegment(leftChain, leftEnd, leftCorner, grid->get_u_value(leftU), segIndexMono, segIndexPass); - - sampleBotLeftWithGridLinePost(botVertex, - leftChain, - leftEnd, - segIndexMono, - segIndexPass, - leftCorner, - grid, - gridV, - leftU, rightU, pStream); -} - -//return 1 if separator exists, 0 otherwise -Int findBotSeparator(vertexArray* leftChain, - Int leftEnd, - Int leftCorner, - vertexArray* rightChain, - Int rightEnd, - Int rightCorner, - Int& ret_sep_left, - Int& ret_sep_right) -{ - Int oldLeftI, oldRightI, newLeftI, newRightI; - Int i,j,k; - Real leftMax /*= leftChain->getVertex(leftCorner)[0]*/; - Real rightMin /*= rightChain->getVertex(rightCorner)[0]*/; - if(leftChain->getVertex(leftCorner)[1] < rightChain->getVertex(rightCorner)[1])//leftlower - { - oldLeftI = leftCorner-1; - oldRightI = rightCorner; - leftMax = leftChain->getVertex(leftCorner)[0] - Real(1.0) ; //initilize to be left of leftCorner - rightMin = rightChain->getVertex(rightCorner)[0]; - } - else //rightlower - { - oldLeftI = leftCorner; - oldRightI = rightCorner-1; - leftMax = leftChain->getVertex(leftCorner)[0]; - rightMin = rightChain->getVertex(rightCorner)[0] + Real(1.0); - } - - //i: the current working leftChain Index - //j: the curent working right chian index - //if(left(i) is lower than right(j), then the two chains above right(j) are separated. - //else the two chains below left(i) are separated. - i = leftCorner; - j = rightCorner; - while(1) - { - newLeftI = oldLeftI; - newRightI = oldRightI; - if(i> leftEnd) //left chain is doen , go through remaining right chain - { - for(k=j+1; k<= rightEnd; k++) - { - if(rightChain->getVertex(k)[0] > leftMax) //no conflict - { - //update oldRightI if necessary - if(rightChain->getVertex(k)[0] < rightMin) - { - rightMin = rightChain->getVertex(k)[0]; - oldRightI = k; - } - } - else //there is a conflict - break; //the for-loop, above right(k+1) is separated: oldLeftI, oldRightI - } - break; //the while loop - } - else if(j > rightEnd) //right Chain is doen - { - for(k=i+1; k<= leftEnd; k++) - { - if(leftChain->getVertex(k)[0] < rightMin) //no conflict - { - //update oldLeftI if necessary - if(leftChain->getVertex(k)[0] > leftMax) - { - leftMax = leftChain->getVertex(k)[0]; - oldLeftI = k; - } - } - else //there is a conflict - break; //the for-loop, above left(k+1) is separated: oldLeftI, oldRightI - } - break; //the while loop - } - else if(leftChain->getVertex(i)[1] < rightChain->getVertex(j)[1]) //left lower - { - - if(leftChain->getVertex(i)[0] > leftMax) //update leftMax amd newLeftI - { - leftMax = leftChain->getVertex(i)[0]; - newLeftI = i; - } - for(k=j+1; k<= rightEnd; k++) //update rightMin and newRightI; - { - if(rightChain->getVertex(k)[1] < leftChain->getVertex(i)[1]) //right gets lower - break; - if(rightChain->getVertex(k)[0] < rightMin) - { - rightMin = rightChain->getVertex(k)[0]; - newRightI = k; - } - } - j = k; //next working j, since j will he lower than i in next loop - if(leftMax >= rightMin) //there is a conflict - break; - else //still no conflict - { - oldLeftI = newLeftI; - oldRightI = newRightI; - - } - } - else //right lower - { - if(rightChain->getVertex(j)[0] < rightMin) - { - rightMin = rightChain->getVertex(j)[0]; - newRightI = j; - } - for(k=i+1; k<= leftEnd; k++) - { - if(leftChain->getVertex(k)[1] < rightChain->getVertex(j)[1]) - break; - if(leftChain->getVertex(k)[0] > leftMax) - { - leftMax = leftChain->getVertex(k)[0]; - newLeftI = k; - } - } - i=k; //nexct working i, since i will be lower than j next loop - if(leftMax >= rightMin) //there is conflict - break; - else //still no conflict - { - oldLeftI = newLeftI; - oldRightI = newRightI; - } - } - }//end of while loop - //now oldLeftI and oldRight I are the desired separator index notice that they are not - //necessarily valid - if(oldLeftI < leftCorner || oldRightI < rightCorner) - return 0; //no separator - else - { - ret_sep_left = oldLeftI; - ret_sep_right = oldRightI; - return 1; - } -} - -void sampleCompBot(Real* botVertex, - vertexArray* leftChain, - Int leftEnd, - vertexArray* rightChain, - Int rightEnd, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridIndex, - Int down_leftCornerWhere, - Int down_leftCornerIndex, - Int down_rightCornerWhere, - Int down_rightCornerIndex, - primStream* pStream) -{ - - if(down_leftCornerWhere == 1 && down_rightCornerWhere == 1) //the bot is botVertex with possible grid points - { - - leftGridChain->getGrid()->outputFanWithPoint(leftGridChain->getVlineIndex(gridIndex), - leftGridChain->getUlineIndex(gridIndex), - rightGridChain->getUlineIndex(gridIndex), - botVertex, - pStream); - return; - } - else if(down_leftCornerWhere != 0) - { - - Real* tempBot; - Int tempRightEnd; - if(down_leftCornerWhere == 1){ - tempRightEnd = rightEnd; - tempBot = botVertex; - } - else - { - tempRightEnd = down_leftCornerIndex-1; - tempBot = rightChain->getVertex(down_leftCornerIndex); - } - - sampleBotRightWithGridLine(tempBot, - rightChain, - tempRightEnd, - down_rightCornerIndex, - rightGridChain->getGrid(), - leftGridChain->getVlineIndex(gridIndex), - leftGridChain->getUlineIndex(gridIndex), - rightGridChain->getUlineIndex(gridIndex), - pStream); - } - else if(down_rightCornerWhere != 2) - { - - Real* tempBot; - Int tempLeftEnd; - if(down_rightCornerWhere == 1){ - tempLeftEnd = leftEnd; - tempBot = botVertex; - } - else //right corner is on left chain - { - tempLeftEnd = down_rightCornerIndex-1; - tempBot = leftChain->getVertex(down_rightCornerIndex); - } - - - sampleBotLeftWithGridLine(tempBot, leftChain, tempLeftEnd, down_leftCornerIndex, - leftGridChain->getGrid(), - leftGridChain->getVlineIndex(gridIndex), - leftGridChain->getUlineIndex(gridIndex), - rightGridChain->getUlineIndex(gridIndex), - pStream); - - } - else //down_leftCornereWhere == 0, down_rightCornerwhere == 2 - { - sampleCompBotSimple(botVertex, - leftChain, - leftEnd, - rightChain, - rightEnd, - leftGridChain, - rightGridChain, - gridIndex, - down_leftCornerWhere, - down_leftCornerIndex, - down_rightCornerWhere, - down_rightCornerIndex, - pStream); - - return; - -#ifdef NOT_REACHABLE - //the following code is trying to do some optimization, but not quite working. so it is not reachable, but leave it here for reference - Int sep_left, sep_right; - if(findBotSeparator(leftChain, leftEnd, down_leftCornerIndex, - rightChain, rightEnd, down_rightCornerIndex, - sep_left, sep_right) - )//separator exiosts - { - - if(leftChain->getVertex(sep_left)[0] >= leftGridChain->get_u_value(gridIndex) && - rightChain->getVertex(sep_right)[0] <= rightGridChain->get_u_value(gridIndex)) - { - Int gridSep; - Int segLeftMono, segLeftPass, segRightMono, segRightPass; - findBotLeftSegment(leftChain, - sep_left, - down_leftCornerIndex, - leftGridChain->get_u_value(gridIndex), - segLeftMono, - segLeftPass); - findBotRightSegment(rightChain, - sep_right, - down_rightCornerIndex, - rightGridChain->get_u_value(gridIndex), - segRightMono, - segRightPass); - if(leftChain->getVertex(segLeftMono)[1] <= rightChain->getVertex(segRightMono)[1]) - { - gridSep = rightGridChain->getUlineIndex(gridIndex); - while(leftGridChain->getGrid()->get_u_value(gridSep) > leftChain->getVertex(segLeftMono)[0]) - gridSep--; - } - else - { - gridSep = leftGridChain->getUlineIndex(gridIndex); - while(leftGridChain->getGrid()->get_u_value(gridSep) < rightChain->getVertex(segRightMono)[0]) - gridSep++; - } - - sampleBotLeftWithGridLinePost(leftChain->getVertex(segLeftMono), - leftChain, - segLeftMono-1, - segLeftMono-1, - segLeftPass, - down_leftCornerIndex, - leftGridChain->getGrid(), - leftGridChain->getVlineIndex(gridIndex), - leftGridChain->getUlineIndex(gridIndex), - gridSep, - pStream); - sampleBotRightWithGridLinePost(rightChain->getVertex(segRightMono), - rightChain, - segRightMono-1, - segRightMono-1, - segRightPass, - down_rightCornerIndex, - rightGridChain->getGrid(), - rightGridChain->getVlineIndex(gridIndex), - gridSep, - rightGridChain->getUlineIndex(gridIndex), - pStream); - Real tempTop[2]; - tempTop[0] = leftGridChain->getGrid()->get_u_value(gridSep); - tempTop[1] = leftGridChain->get_v_value(gridIndex); - monoTriangulationRecGen(tempTop, botVertex, - leftChain, segLeftMono, leftEnd, - rightChain, segRightMono, rightEnd, - pStream); - }//end if both sides have vertices inside the gridboundary points - else if(leftChain->getVertex(sep_left)[0] >= leftGridChain->get_u_value(gridIndex)) //left n right out - - { - Int segLeftMono, segLeftPass; - findBotLeftSegment(leftChain, - sep_left, - down_leftCornerIndex, - leftGridChain->get_u_value(gridIndex), - segLeftMono, - segLeftPass); - assert(segLeftPass <= sep_left); //make sure there is a point to the right of u. - monoTriangulation2(leftGridChain->get_vertex(gridIndex), - leftChain->getVertex(segLeftPass), - leftChain, - down_leftCornerIndex, - segLeftPass-1, - 1, //a increase chain - pStream); - stripOfFanLeft(leftChain, segLeftMono, segLeftPass, - leftGridChain->getGrid(), - leftGridChain->getVlineIndex(gridIndex), - leftGridChain->getUlineIndex(gridIndex), - rightGridChain->getUlineIndex(gridIndex), - pStream,1 ); -/* - sampleBotLeftWithGridLinePost(leftChain->getVertex(segLeftMono), - leftChain, - segLeftMono-1, - segLeftMono-1, - segLeftPass, - down_leftCornerIndex, - leftGridChain->getGrid(), - leftGridChain->getVlineIndex(gridIndex), - leftGridChain->getUlineIndex(gridIndex), - rightGridChain->getUlineIndex(gridIndex), - pStream); -*/ - - monoTriangulationRecGen(rightGridChain->get_vertex(gridIndex), - botVertex, - leftChain, segLeftMono, leftEnd, - rightChain, down_rightCornerIndex, rightEnd, - pStream); - }//end left in right out - else if(rightChain->getVertex(sep_right)[0] <= rightGridChain->get_u_value(gridIndex))//left out right in - { - Int segRightMono, segRightPass; - findBotRightSegment(rightChain, sep_right, down_rightCornerIndex, - rightGridChain->get_u_value(gridIndex), - segRightMono, - segRightPass); - - assert(segRightPass <= sep_right); //make sure there is a point to the left of u. - monoTriangulation2(rightGridChain->get_vertex(gridIndex), - rightChain->getVertex(segRightPass), - rightChain, - down_rightCornerIndex, - segRightPass-1, - 0, // a decrease chain - pStream); - - stripOfFanRight(rightChain, segRightMono, segRightPass, - rightGridChain->getGrid(), - rightGridChain->getVlineIndex(gridIndex), - leftGridChain->getUlineIndex(gridIndex), - rightGridChain->getUlineIndex(gridIndex), - pStream, 1); - - - monoTriangulationRecGen(leftGridChain->get_vertex(gridIndex), - botVertex, - leftChain, down_leftCornerIndex, leftEnd, - rightChain, segRightMono, rightEnd, - pStream); - - }//end left out right in - else //left out, right out - { - sampleCompBotSimple(botVertex, - leftChain, - leftEnd, - rightChain, - rightEnd, - leftGridChain, - rightGridChain, - gridIndex, - down_leftCornerWhere, - down_leftCornerIndex, - down_rightCornerWhere, - down_rightCornerIndex, - pStream); - - }//end leftout right out - }//end if separator exists - else //no separator - { - - sampleCompBotSimple(botVertex, - leftChain, - leftEnd, - rightChain, - rightEnd, - leftGridChain, - rightGridChain, - gridIndex, - down_leftCornerWhere, - down_leftCornerIndex, - down_rightCornerWhere, - down_rightCornerIndex, - pStream); - } -#endif - }//end id 0 2 -}//end if the functin - - -void sampleCompBotSimple(Real* botVertex, - vertexArray* leftChain, - Int leftEnd, - vertexArray* rightChain, - Int rightEnd, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridIndex, - Int down_leftCornerWhere, - Int down_leftCornerIndex, - Int down_rightCornerWhere, - Int down_rightCornerIndex, - primStream* pStream) -{ - //the plan is to use monotriangulation algorithm. - Int i,k; - Real* ActualTop; - Real* ActualBot; - Int ActualLeftStart, ActualLeftEnd; - Int ActualRightStart, ActualRightEnd; - - //creat an array to store the points on the grid line - gridWrap* grid = leftGridChain->getGrid(); - Int gridV = leftGridChain->getVlineIndex(gridIndex); - Int gridLeftU = leftGridChain->getUlineIndex(gridIndex); - Int gridRightU = rightGridChain->getUlineIndex(gridIndex); - Real2* gridPoints = (Real2*) malloc(sizeof(Real2) * (gridRightU - gridLeftU +1)); - assert(gridPoints); - - for(k=0, i=gridRightU; i>= gridLeftU; i--, k++) - { - gridPoints[k][0] = grid->get_u_value(i); - gridPoints[k][1] = grid->get_v_value(gridV); - } - - if(down_rightCornerWhere != 0) //rightCorner is not on lef - ActualLeftEnd = leftEnd; - else - ActualLeftEnd = down_rightCornerIndex-1; //down_rightCornerIndex will be th actualBot - - if(down_leftCornerWhere != 0) //left corner is not on let chian - ActualLeftStart = leftEnd+1; //meaning that there is no actual left section - else - ActualLeftStart = down_leftCornerIndex; - - vertexArray ActualLeftChain(max(0, ActualLeftEnd - ActualLeftStart +1) + gridRightU - gridLeftU +1); - - for(i=0; igetVertex(i)); - - //determine ActualRightStart - if(down_rightCornerWhere != 2) //right is not on right - ActualRightStart = rightEnd +1; //meaning no section on right - else - ActualRightStart = down_rightCornerIndex; - - //determine actualrightEnd - if(down_leftCornerWhere != 2) //left is not on right - { - - ActualRightEnd = rightEnd; - } - else //left corner is on right - { - ActualRightEnd = down_leftCornerIndex-1; //down_leftCornerIndex will be the bot - - } - - //actual bot - if(down_rightCornerWhere == 2) - { - if(down_leftCornerWhere == 2) - ActualBot = rightChain->getVertex(down_leftCornerIndex); - else - ActualBot = botVertex; - } - else if(down_rightCornerWhere == 1) //right corner bot - ActualBot = botVertex; - else //down_rightCornerWhere == 0 - ActualBot = leftChain->getVertex(down_rightCornerIndex); - - ActualTop = gridPoints[0]; -/* -printf("in bot simple, actual leftChain is \n"); -ActualLeftChain.print(); -printf("Actual Top = %f,%f\n", ActualTop[0],ActualTop[1]); -printf("Actual Bot = %f,%f\n", ActualBot[0],ActualBot[1]); -printf("Actual right start = %i, end=%i\n",ActualRightStart, ActualRightEnd); -*/ - if(rightChain->getVertex(ActualRightStart)[1] == ActualTop[1]) - monoTriangulationRecGenOpt(rightChain->getVertex(ActualRightStart), - ActualBot, - &ActualLeftChain, - 0, - ActualLeftChain.getNumElements()-1, - rightChain, - ActualRightStart+1, - ActualRightEnd, - pStream); - else - monoTriangulationRecGenOpt(ActualTop, ActualBot, - &ActualLeftChain, - 1, //the first one is the top vertex - ActualLeftChain.getNumElements()-1, - rightChain, - ActualRightStart, - ActualRightEnd, - pStream); - free(gridPoints); -} - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h deleted file mode 100644 index f48dceaea6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h +++ /dev/null @@ -1,145 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef _SAMPLECOMPBOT_H -#define _SAMPLECOMPBOT_H - -#include "sampleMonoPoly.h" - -void findBotLeftSegment(vertexArray* leftChain, - Int leftEnd, - Int leftCorner, - Real u, - Int& ret_index_mono, - Int& ret_index_pass); - -void findBotRightSegment(vertexArray* rightChain, - Int rightEnd, - Int rightCorner, - Real u, - Int& ret_index_mono, - Int& ret_index_pass); - - -void sampleBotRightWithGridLinePost(Real* botVertex, - vertexArray* rightChain, - Int rightEnd, - Int segIndexMono, - Int segIndexPass, - Int rightCorner, - gridWrap* grid, - Int gridV, - Int leftU, - Int rightU, - primStream* pStream); - - -void sampleBotRightWithGridLine(Real* botVertex, - vertexArray* rightChain, - Int rightEnd, - Int rightCorner, - gridWrap* grid, - Int gridV, - Int leftU, - Int rightU, - primStream* pStream); - - -void sampleBotLeftWithGridLinePost(Real* botVertex, - vertexArray* leftChain, - Int leftEnd, - Int segIndexMono, - Int segIndexPass, - Int leftCorner, - gridWrap* grid, - Int gridV, - Int leftU, - Int rightU, - primStream* pStream); - - -void sampleBotLeftWithGridLine(Real* botVertex, - vertexArray* leftChain, - Int leftEnd, - Int leftCorner, - gridWrap* grid, - Int gridV, - Int leftU, - Int rightU, - primStream* pStream); - - -Int findBotSeparator(vertexArray* leftChain, - Int leftEnd, - Int leftCorner, - vertexArray* rightChain, - Int rightEnd, - Int rightCorner, - Int& ret_sep_left, - Int& ret_sep_right); - -void sampleCompBot(Real* botVertex, - vertexArray* leftChain, - Int leftEnd, - vertexArray* rightChain, - Int rightEnd, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridIndex, - Int down_leftCornerWhere, - Int down_leftCornerIndex, - Int down_rightCornerWhere, - Int down_rightCornerIndex, - primStream* pStream); - -void sampleCompBotSimple(Real* botVertex, - vertexArray* leftChain, - Int leftEnd, - vertexArray* rightChain, - Int rightEnd, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridIndex, - Int down_leftCornerWhere, - Int down_leftCornerIndex, - Int down_rightCornerWhere, - Int down_rightCornerIndex, - primStream* pStream); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc deleted file mode 100644 index de231393e7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc +++ /dev/null @@ -1,646 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2005/10/28 13:09:09 $ $Revision: 1.2.30.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc,v 1.2.30.1 2005/10/28 13:09:09 brianp Exp $ -*/ - -#include -#include -#include "gluos.h" -#include "glimports.h" -#include "zlassert.h" -#include "sampleCompRight.h" - -#define max(a,b) ((a>b)? a:b) -#define min(a,b) ((a>b)? b:a) - - - -#ifdef NOT_TAKEOUT - -/*notice that we need leftChain because the - *corners could be on the leftChain. - */ -void sampleCompRight(Real* topVertex, Real* botVertex, - vertexArray* leftChain, - Int leftStartIndex, Int leftEndIndex, - vertexArray* rightChain, - Int rightStartIndex, Int rightEndIndex, - gridBoundaryChain* rightGridChain, - Int gridIndex1, Int gridIndex2, - Int up_rightCornerWhere, - Int up_rightCornerIndex, - Int down_rightCornerWhere, - Int down_rightCornerIndex, - primStream* pStream) -{ - /*find out whether there is a trim vertex which is - *inbetween the top and bot grid lines or not. - */ - Int midIndex1; - Int midIndex2; - Int gridMidIndex1, gridMidIndex2 = 0; - //midIndex1: array[i] <= v, array[i+1] > v - //midIndex2: array[i] >= v, array[i+1] < v - midIndex1 = rightChain->findIndexBelowGen(rightGridChain->get_v_value(gridIndex1), - rightStartIndex, - rightEndIndex); - midIndex2 = -1; //initilization - if(midIndex1 <= rightEndIndex && gridIndex1 < gridIndex2) - if(rightChain->getVertex(midIndex1)[1] >= rightGridChain->get_v_value(gridIndex2)) - { - //midIndex2 must exist: - midIndex2 = rightChain->findIndexAboveGen(rightGridChain->get_v_value(gridIndex2), - midIndex1, //midIndex1<=midIndex2 - rightEndIndex); - //find gridMidIndex1 so that either it=gridIndex1 when the gridline is - // at the same height as trim vertex midIndex1, or it is the last one - //which is strictly above midIndex1. - { - Real temp = rightChain->getVertex(midIndex1)[1]; - if(rightGridChain->get_v_value(gridIndex1) == temp) - gridMidIndex1 = gridIndex1; - else - { - gridMidIndex1 = gridIndex1; - while(rightGridChain->get_v_value(gridMidIndex1) > temp) - gridMidIndex1++; - gridMidIndex1--; - } - }//end of find gridMindIndex1 - //find gridMidIndex2 so that it is the (first one below or equal - //midIndex) last one above or equal midIndex2 - { - Real temp = rightChain->getVertex(midIndex2)[1]; - for(gridMidIndex2 = gridMidIndex1+1; gridMidIndex2 <= gridIndex2; gridMidIndex2++) - if(rightGridChain->get_v_value(gridMidIndex2) <= temp) - break; - - assert(gridMidIndex2 <= gridIndex2); - }//end of find gridMidIndex2 - } - - - - //to interprete the corner information - Real* cornerTop; - Real* cornerBot; - Int cornerRightStart; - Int cornerRightEnd; - Int cornerLeftUpEnd; - Int cornerLeftDownStart; - if(up_rightCornerWhere == 2) //right corner is on right chain - { - cornerTop = rightChain->getVertex(up_rightCornerIndex); - cornerRightStart = up_rightCornerIndex+1; - cornerLeftUpEnd = -1; //no left - } - else if(up_rightCornerWhere == 1) //right corner is on top - { - cornerTop = topVertex; - cornerRightStart = rightStartIndex; - cornerLeftUpEnd = -1; //no left - } - else //right corner is on left chain - { - cornerTop = topVertex; - cornerRightStart = rightStartIndex; - cornerLeftUpEnd = up_rightCornerIndex; - } - - if(down_rightCornerWhere == 2) //right corner is on right chan - { - cornerBot = rightChain->getVertex(down_rightCornerIndex); - cornerRightEnd = down_rightCornerIndex-1; - cornerLeftDownStart = leftEndIndex+1; //no left - } - else if (down_rightCornerWhere == 1) //right corner is at bot - { - cornerBot = botVertex; - cornerRightEnd = rightEndIndex; - cornerLeftDownStart = leftEndIndex+1; //no left - } - else //right corner is on the left chain - { - cornerBot = botVertex; - cornerRightEnd = rightEndIndex; - cornerLeftDownStart = down_rightCornerIndex; - } - - //sample - if(midIndex2 >= 0) //there is a trm point between grid lines - { - - sampleRightSingleTrimEdgeRegionGen(cornerTop, rightChain->getVertex(midIndex1), - rightChain, - cornerRightStart, - midIndex1-1, - rightGridChain, - gridIndex1, - gridMidIndex1, - leftChain, - leftStartIndex, - cornerLeftUpEnd, - 0, //no left down section, - -1, - pStream); - - sampleRightSingleTrimEdgeRegionGen(rightChain->getVertex(midIndex2), - cornerBot, - rightChain, - midIndex2+1, - cornerRightEnd, - rightGridChain, - gridMidIndex2, - gridIndex2, - leftChain, - 0, //no left up section - -1, - cornerLeftDownStart, - leftEndIndex, - pStream); - - sampleRightStripRecF(rightChain, - midIndex1, - midIndex2, - rightGridChain, - gridMidIndex1, - gridMidIndex2, - pStream); - - } - else - { - sampleRightSingleTrimEdgeRegionGen(cornerTop, cornerBot, - rightChain, - cornerRightStart, - cornerRightEnd, - rightGridChain, - gridIndex1, - gridIndex2, - leftChain, - leftStartIndex, - cornerLeftUpEnd, - cornerLeftDownStart, - leftEndIndex, - pStream); - } -} - -void sampleRightSingleTrimEdgeRegionGen(Real topVertex[2], Real botVertex[2], - vertexArray* rightChain, - Int rightStart, - Int rightEnd, - gridBoundaryChain* gridChain, - Int gridBeginIndex, - Int gridEndIndex, - vertexArray* leftChain, - Int leftUpBegin, - Int leftUpEnd, - Int leftDownBegin, - Int leftDownEnd, - primStream* pStream) -{ - Int i,k; - /*creat an array to store all the up and down secments of the left chain, - *and the right end grid points - * - *although vertex array is a dynamic array, but to gain efficiency, - *it is better to initiliza the exact array size - */ - vertexArray vArray(gridEndIndex-gridBeginIndex+1 + - max(0,leftUpEnd - leftUpBegin+1)+ - max(0,leftDownEnd - leftDownBegin+1)); - //append the vertices on the up section of the left chain - for(i=leftUpBegin; i<= leftUpEnd; i++) - vArray.appendVertex(leftChain->getVertex(i)); - - //append the vertices of the right extremal grid points, - //and at the same time, perform triangulation for the stair cases - vArray.appendVertex(gridChain->get_vertex(gridBeginIndex)); - - for(k=1, i=gridBeginIndex+1; i<= gridEndIndex; i++, k++) - { - vArray.appendVertex(gridChain->get_vertex(i)); - - //output the fan of the grid points of the (i)th and (i-1)th grid line. - gridChain->rightEndFan(i, pStream); - } - - //append all the vertices on the down section of the left chain - for(i=leftDownBegin; i<= leftDownEnd; i++) - vArray.appendVertex(leftChain->getVertex(i)); - monoTriangulationRecGen(topVertex, botVertex, - &vArray, 0, vArray.getNumElements()-1, - rightChain, rightStart, rightEnd, - pStream); -} - -void sampleRightSingleTrimEdgeRegion(Real upperVert[2], Real lowerVert[2], - gridBoundaryChain* gridChain, - Int beginIndex, - Int endIndex, - primStream* pStream) -{ - Int i,k; - vertexArray vArray(endIndex-beginIndex+1); - vArray.appendVertex(gridChain->get_vertex(beginIndex)); - for(k=1, i=beginIndex+1; i<= endIndex; i++, k++) - { - vArray.appendVertex(gridChain->get_vertex(i)); - //output the fan of the grid points of the (i)_th and i-1th gridLine - gridChain->rightEndFan(i, pStream); - } - monoTriangulation2(upperVert, lowerVert, &vArray, 0, endIndex-beginIndex, - 1, //increase chain (to the left) - pStream); -} - - -/*the gridlines from rightGridChainStartIndex to - *rightGridChainEndIndex are assumed to form a - *connected componenet - *the trm vertex of topRightIndex is assumed to be below - *or equal the first gridLine, and the trm vertex of - *botRightIndex is assumed to be above or equal the last gridline - **there could be multipe trm vertices equal to the last gridline, but - **only one could be equal to top gridline. shape: ____| (recall that - **for left chain recF, we allow shape: |---- - *if botRightIndex= topRightIndex, there is at least one triangles to - *output - */ -void sampleRightStripRecF(vertexArray* rightChain, - Int topRightIndex, - Int botRightIndex, - gridBoundaryChain* rightGridChain, - Int rightGridChainStartIndex, - Int rightGridChainEndIndex, - primStream* pStream - ) -{ - - //sstop conditionL: if topRightIndex > botRightIndex, then stop - if(topRightIndex > botRightIndex) - return; - - //if there is only one grid line, return - if(rightGridChainStartIndex >= rightGridChainEndIndex) - return; - - - assert(rightChain->getVertex(topRightIndex)[1] <= rightGridChain->get_v_value(rightGridChainStartIndex) && - rightChain->getVertex(botRightIndex)[1] >= rightGridChain->get_v_value(rightGridChainEndIndex)); - - //firstfind the first trim vertex which is strictly below the second top - //grid line: index1. - Real secondGridChainV = rightGridChain->get_v_value(rightGridChainStartIndex+1); - Int index1 = topRightIndex; - while(rightChain->getVertex(index1)[1] >= secondGridChainV){ - index1++; - if(index1 > botRightIndex) - break; - } - //now rightChain->getVertex(index1-1)[1] >= secondGridChainV and - //rightChain->getVertex(index1)[1] < secondGridChainV and - //we should include index1-1 to perform a gridStep - index1--; - - //now we have rightChain->getVertex(index1)[1] >= secondGridChainV, and - //rightChain->getVertex(index1+1)[1] < secondGridChainV - sampleRightOneGridStep(rightChain, topRightIndex, index1, rightGridChain, rightGridChainStartIndex, pStream); - - //if rightChain->getVertex(index1)[1] ==secondGridChainV then we can - //recurvesively to the rest - if(rightChain->getVertex(index1)[1] == secondGridChainV) - { - - - sampleRightStripRecF(rightChain, index1, botRightIndex, rightGridChain, rightGridChainStartIndex+1, rightGridChainEndIndex, pStream); - } - else if(index1 < botRightIndex) - { - //otherwise, we have rightChain->getVertex(index1)[1] > secondV - //let the next trim vertex be nextTrimVertex, (which should be strictly - //below the second grid line). Find the last grid line index2 which is STRICTLY ABOVE - //nextTrimVertex. - //sample one trm edge region. - Real *uppervert, *lowervert; - uppervert = rightChain->getVertex(index1); - lowervert = rightChain->getVertex(index1+1); //okay since index1get_v_value(index2) > lowervert[1]) - { - index2++; - if(index2 > rightGridChainEndIndex) - break; - } - index2--; - - sampleRightSingleTrimEdgeRegion(uppervert, lowervert, rightGridChain, rightGridChainStartIndex+1, index2, pStream); - - //recursion - sampleRightStripRecF(rightChain, index1+1, botRightIndex, rightGridChain, index2, rightGridChainEndIndex, pStream); - } -} - -//the degenerate case of sampleRightOneGridStep -void sampleRightOneGridStepNoMiddle(vertexArray* rightChain, - Int beginRightIndex, - Int endRightIndex, - gridBoundaryChain* rightGridChain, - Int rightGridChainStartIndex, - primStream* pStream) -{ - /*since there is no middle, there is at most one point which is on the - *second grid line, there could be multiple points on the first (top) - *grid line. - */ - rightGridChain->rightEndFan(rightGridChainStartIndex+1, pStream); - monoTriangulation2(rightGridChain->get_vertex(rightGridChainStartIndex), - rightGridChain->get_vertex(rightGridChainStartIndex+1), - rightChain, - beginRightIndex, - endRightIndex, - 0, //decrease chain - pStream); -} - -//sampling the right area in between two grid lines -//shape: _________| -void sampleRightOneGridStep(vertexArray* rightChain, - Int beginRightIndex, - Int endRightIndex, - gridBoundaryChain* rightGridChain, - Int rightGridChainStartIndex, - primStream* pStream) -{ - if(checkMiddle(rightChain, beginRightIndex, endRightIndex, - rightGridChain->get_v_value(rightGridChainStartIndex), - rightGridChain->get_v_value(rightGridChainStartIndex+1))<0) - { - sampleRightOneGridStepNoMiddle(rightChain, beginRightIndex, endRightIndex, rightGridChain, rightGridChainStartIndex, pStream); - return; - } - - //copy into a polygn - { - directedLine* poly = NULL; - sampledLine* sline; - directedLine* dline; - gridWrap* grid = rightGridChain->getGrid(); - float vert1[2]; - float vert2[2]; - Int i; - - Int innerInd = rightGridChain->getInnerIndex(rightGridChainStartIndex+1); - Int upperInd = rightGridChain->getUlineIndex(rightGridChainStartIndex); - Int lowerInd = rightGridChain->getUlineIndex(rightGridChainStartIndex+1); - Real upperV = rightGridChain->get_v_value(rightGridChainStartIndex); - Real lowerV = rightGridChain->get_v_value(rightGridChainStartIndex+1); - - //the upper gridline - vert1[1]=vert2[1]=upperV; - for(i=upperInd; - i>innerInd; - i--) - { - vert1[0]=grid->get_u_value(i); - vert2[0]=grid->get_u_value(i-1); - sline = new sampledLine(vert1, vert2); - dline = new directedLine(INCREASING, sline); - if(poly == NULL) - poly = dline; - else - poly->insert(dline); - } - - //the vertical grid line segment - vert1[0]=vert2[0] = grid->get_u_value(innerInd); - vert1[1]=upperV; - vert2[1]=lowerV; - sline=new sampledLine(vert1, vert2); - dline=new directedLine(INCREASING, sline); - if(poly == NULL) - poly = dline; - else - poly->insert(dline); - - //the lower grid line - vert1[1]=vert2[1]=lowerV; - for(i=innerInd; iget_u_value(i); - vert2[0] = grid->get_u_value(i+1); - sline = new sampledLine(vert1, vert2); - dline = new directedLine(INCREASING, sline); - poly->insert(dline); - } - - //the edge connecting lower grid to right chain - vert1[0]=grid->get_u_value(lowerInd); - sline = new sampledLine(vert1, rightChain->getVertex(endRightIndex)); - dline = new directedLine(INCREASING, sline); - poly->insert(dline); - - - //the right Chain - for(i=endRightIndex; i>beginRightIndex; i--) - { - sline = new sampledLine(rightChain->getVertex(i), rightChain->getVertex(i-1)); - dline = new directedLine(INCREASING, sline); - poly->insert(dline); - } - - //the edge connecting right chain with upper grid - vert2[1]=upperV; - vert2[0]=grid->get_u_value(upperInd); - sline = new sampledLine(rightChain->getVertex(beginRightIndex), vert2); - dline = new directedLine(INCREASING, sline); - poly->insert(dline); - monoTriangulationOpt(poly, pStream); - //clean up - poly->deleteSinglePolygonWithSline(); - - return; - } - - //this following code cannot be reached, but leave it for debuggig purpose. - Int i; - //find the maximal U-monotone chain of beginRightIndex, beginRightIndex+1,... - i=beginRightIndex; - Real prevU = rightChain->getVertex(i)[0]; - for(i=beginRightIndex+1; i<= endRightIndex; i++){ - Real thisU = rightChain->getVertex(i)[0]; - if(thisU < prevU) - prevU = thisU; - else - break; - } - //from beginRightIndex to i-1 is strictly U-monotne - //if(i-1==beginRightIndex and the vertex of rightchain is on the first - //gridline, then we should use 2 vertices on the right chain. Of we only - //use one (begin), we would output degenrate triangles. - if(i-1 == beginRightIndex && rightChain->getVertex(beginRightIndex)[1] == rightGridChain->get_v_value(rightGridChainStartIndex)) - i++; - - Int j = endRightIndex -1; - if(rightGridChain->getInnerIndex(rightGridChainStartIndex+1) < rightGridChain->getUlineIndex(rightGridChainStartIndex+1)) - { - j = rightChain->findDecreaseChainFromEnd(i-1/*beginRightIndex*/, endRightIndex); - Int temp = endRightIndex; - //now from j+1 to end is strictly U-monotone. - //if j+1 is on the last grid line, then we wat to skip to the vertex - //whcih is strictly above the second grid line. This vertex must exist - //since there is a middle vertex - if(j+1 == endRightIndex) - { - while(rightChain->getVertex(j+1)[1] == rightGridChain->get_v_value(rightGridChainStartIndex+1)) - j--; - - monoTriangulation2(rightChain->getVertex(j+1), - rightGridChain->get_vertex(rightGridChainStartIndex+1), - rightChain, - j+2, - endRightIndex, - 0, //a decrease chain - pStream); - - temp = j+1; - } - - stripOfFanRight(rightChain, temp, j+1, rightGridChain->getGrid(), - rightGridChain->getVlineIndex(rightGridChainStartIndex+1), - rightGridChain->getInnerIndex(rightGridChainStartIndex+1), - rightGridChain->getUlineIndex(rightGridChainStartIndex+1), - pStream, - 0 //the grid line is below the trim line - ); - - } - - - stripOfFanRight(rightChain, i-1, beginRightIndex, rightGridChain->getGrid(), - rightGridChain->getVlineIndex(rightGridChainStartIndex), - rightGridChain->getInnerIndex(rightGridChainStartIndex+1), - rightGridChain->getUlineIndex(rightGridChainStartIndex), - pStream, - 1 //the grid line is above the trm lines - ); - - //monotone triangulate the remaining rightchain together with the - //two vertices on the two grid v-lines - Real vert[2][2]; - vert[0][0] = vert[1][0] = rightGridChain->getInner_u_value(rightGridChainStartIndex+1); - vert[0][1] = rightGridChain->get_v_value(rightGridChainStartIndex); - vert[1][1] = rightGridChain->get_v_value(rightGridChainStartIndex+1); - - monoTriangulation2(&vert[0][0], - &vert[1][0], - rightChain, - i-1, - j+1, - 0, ///a decreae chain - pStream); -} - -#endif - -void stripOfFanRight(vertexArray* rightChain, - Int largeIndex, - Int smallIndex, - gridWrap* grid, - Int vlineIndex, - Int ulineSmallIndex, - Int ulineLargeIndex, - primStream* pStream, - Int gridLineUp /*1 if the grid line is above the trim lines*/ - ) -{ - assert(largeIndex >= smallIndex); - - Real grid_v_value; - grid_v_value = grid->get_v_value(vlineIndex); - - Real2* trimVerts=(Real2*) malloc(sizeof(Real2)* (largeIndex-smallIndex+1)); - assert(trimVerts); - - - Real2* gridVerts=(Real2*) malloc(sizeof(Real2)* (ulineLargeIndex-ulineSmallIndex+1)); - assert(gridVerts); - - Int k,i; - if(! gridLineUp) /*trim line is above grid line, so trim vertices are going right when index increases*/ - for(k=0, i=smallIndex; i<=largeIndex; i++, k++) - { - trimVerts[k][0] = rightChain->getVertex(i)[0]; - trimVerts[k][1] = rightChain->getVertex(i)[1]; - } - else - for(k=0, i=largeIndex; i>=smallIndex; i--, k++) - { - trimVerts[k][0] = rightChain->getVertex(i)[0]; - trimVerts[k][1] = rightChain->getVertex(i)[1]; - } - - for(k=0, i=ulineSmallIndex; i<= ulineLargeIndex; i++, k++) - { - gridVerts[k][0] = grid->get_u_value(i); - gridVerts[k][1] = grid_v_value; - } - - if(gridLineUp) - triangulateXYMono( - ulineLargeIndex-ulineSmallIndex+1, gridVerts, - largeIndex-smallIndex+1, trimVerts, - pStream); - else - triangulateXYMono(largeIndex-smallIndex+1, trimVerts, - ulineLargeIndex-ulineSmallIndex+1, gridVerts, - pStream); - free(trimVerts); - free(gridVerts); -} - - - - - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h deleted file mode 100644 index 747e35e6ad..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h +++ /dev/null @@ -1,124 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef _SAMPLECOMPRIGHT_H -#define _SAMPLECOMPRIGHT_H - -#define NOT_TAKEOUT - -#include "sampleMonoPoly.h" -void stripOfFanRight(vertexArray* rightChain, - Int largeIndex, - Int smallIndex, - gridWrap* grid, - Int vlineIndex, - Int ulineSmallIndex, - Int ulineLargeIndex, - primStream* pStream, - Int gridLineUp /*1 if grid line is above the trim lines */ - ); - -#ifdef NOT_TAKEOUT -void sampleRightStripRecF(vertexArray* rightChain, - Int topRightIndex, - Int botRightIndex, - gridBoundaryChain* rightGridChain, - Int rightGridChainStartIndex, - Int rightGridChainEndIndex, - primStream* pStream - ); -//the degenerate case of sampleRightOneGridStep -void sampleRightOneGridStepNoMiddle(vertexArray* rightChain, - Int beginRightIndex, - Int endRightIndex, - gridBoundaryChain* rightGridChain, - Int rightGridChainStartIndex, - primStream* pStream); -//sampling the right area in between two grid lines -//shape: _________| -void sampleRightOneGridStep(vertexArray* rightChain, - Int beginRightIndex, - Int endRightIndex, - gridBoundaryChain* rightGridChain, - Int rightGridChainStartIndex, - primStream* pStream); -void sampleRightSingleTrimEdgeRegion(Real upperVert[2], Real lowerVert[2], - gridBoundaryChain* gridChain, - Int beginIndex, - Int endIndex, - primStream* pStream); -//the degenerate case of sampleRightOneGridStep -void sampleRightOneGridStepNoMiddle(vertexArray* rightChain, - Int beginRightIndex, - Int endRightIndex, - gridBoundaryChain* rightGridChain, - Int rightGridChainStartIndex, - primStream* pStream); - -void sampleCompRight(Real* topVertex, Real* botVertex, - vertexArray* leftChain, - Int leftStartIndex, Int leftEndIndex, - vertexArray* rightChain, - Int rightStartIndex, Int rightEndIndex, - gridBoundaryChain* rightGridChain, - Int gridIndex1, Int gridIndex2, - Int up_leftCornerWhere, - Int up_leftCornerIndex, - Int down_leftCornerWhere, - Int down_leftCornerIndex, - primStream* pStream); - -void sampleRightSingleTrimEdgeRegionGen(Real topVert[2], Real botVert[2], - vertexArray* rightChain, - Int rightStart, - Int rightEnd, - gridBoundaryChain* gridChain, - Int gridBegindex, - Int gridEndIndex, - vertexArray* leftChain, - Int leftUpBegin, - Int leftUpEnd, - Int leftDownBegin, - Int leftDownEnd, - primStream* pStream); -#endif - -#endif - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc deleted file mode 100644 index 0d012d47ce..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc +++ /dev/null @@ -1,1032 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $ -*/ - -#include -#include -#include -#include "zlassert.h" -#include "sampleCompTop.h" -#include "sampleCompRight.h" - -#define max(a,b) ((a>b)? a:b) - -//return : index_small, and index_large, -//from [small, large] is strictly U-monotne, -//from [large+1, end] is = u -//if eveybody is = leftStart; i--) - { - if(leftChain->getVertex(i)[0] >= u) - break; - } - ret_index_large = i; - if(ret_index_large >= leftStart) - { - for(i=ret_index_large; i>leftStart; i--) - { - if(leftChain->getVertex(i-1)[0] <= leftChain->getVertex(i)[0]) - break; - } - ret_index_small = i; - } -} - -void findTopRightSegment(vertexArray* rightChain, - Int rightStart, - Int rightEnd, - Real u, - Int& ret_index_small, - Int& ret_index_large) -{ - Int i; - assert(rightStart<=rightEnd); - for(i=rightEnd; i>=rightStart; i--) - { - if(rightChain->getVertex(i)[0] <= u) - break; - } - ret_index_large = i; - if(ret_index_large >= rightStart) - { - for(i=ret_index_large; i>rightStart;i--) - { - if(rightChain->getVertex(i-1)[0] >= rightChain->getVertex(i)[0]) - break; - } - ret_index_small = i; - } -} - - -void sampleTopRightWithGridLinePost(Real* topVertex, - vertexArray* rightChain, - Int rightStart, - Int segIndexSmall, - Int segIndexLarge, - Int rightEnd, - gridWrap* grid, - Int gridV, - Int leftU, - Int rightU, - primStream* pStream) -{ - //the possible section which is to the right of rightU - if(segIndexLarge < rightEnd) - { - Real *tempTop; - if(segIndexLarge >= rightStart) - tempTop = rightChain->getVertex(segIndexLarge); - else - tempTop = topVertex; - Real tempBot[2]; - tempBot[0] = grid->get_u_value(rightU); - tempBot[1] = grid->get_v_value(gridV); -monoTriangulationRecGenOpt(tempTop, tempBot, - NULL, 1,0, - rightChain, segIndexLarge+1, rightEnd, - pStream); -/* - monoTriangulation2(tempTop, tempBot, - rightChain, - segIndexLarge+1, - rightEnd, - 0, //a decrease chian - pStream); -*/ - - } - - //the possible section which is strictly Umonotone - if(segIndexLarge >= rightStart) - { - stripOfFanRight(rightChain, segIndexLarge, segIndexSmall, grid, gridV, leftU, rightU, pStream, 0); - Real tempBot[2]; - tempBot[0] = grid->get_u_value(leftU); - tempBot[1] = grid->get_v_value(gridV); - monoTriangulation2(topVertex, tempBot, rightChain, rightStart, segIndexSmall, 0, pStream); - } - else //the topVertex forms a fan with the grid points - grid->outputFanWithPoint(gridV, leftU, rightU, topVertex, pStream); -} - -void sampleTopRightWithGridLine(Real* topVertex, - vertexArray* rightChain, - Int rightStart, - Int rightEnd, - gridWrap* grid, - Int gridV, - Int leftU, - Int rightU, - primStream* pStream - ) -{ - //if right chian is empty, then there is only one topVertex with one grid line - if(rightEnd < rightStart){ - grid->outputFanWithPoint(gridV, leftU, rightU, topVertex, pStream); - return; - } - - Int segIndexSmall, segIndexLarge; - findTopRightSegment(rightChain, - rightStart, - rightEnd, - grid->get_u_value(rightU), - segIndexSmall, - segIndexLarge - ); - sampleTopRightWithGridLinePost(topVertex, rightChain, - rightStart, - segIndexSmall, - segIndexLarge, - rightEnd, - grid, - gridV, - leftU, - rightU, - pStream); -} - - -void sampleTopLeftWithGridLinePost(Real* topVertex, - vertexArray* leftChain, - Int leftStart, - Int segIndexSmall, - Int segIndexLarge, - Int leftEnd, - gridWrap* grid, - Int gridV, - Int leftU, - Int rightU, - primStream* pStream) -{ - //the possible section which is to the left of leftU - - if(segIndexLarge < leftEnd) - { - Real *tempTop; - if(segIndexLarge >= leftStart) - tempTop = leftChain->getVertex(segIndexLarge); - else - tempTop = topVertex; - Real tempBot[2]; - tempBot[0] = grid->get_u_value(leftU); - tempBot[1] = grid->get_v_value(gridV); - - monoTriangulation2(tempTop, tempBot, - leftChain, - segIndexLarge+1, - leftEnd, - 1, //a increase chian - pStream); - } - - //the possible section which is strictly Umonotone - if(segIndexLarge >= leftStart) - { - //if there are grid points which are to the right of topV, - //then we should use topVertex to form a fan with these points to - //optimize the triangualtion - int do_optimize=1; - if(topVertex[0] >= grid->get_u_value(rightU)) - do_optimize = 0; - else - { - //we also have to make sure that topVertex are the right most vertex - //on the chain. - int i; - for(i=leftStart; i<=segIndexSmall; i++) - if(leftChain->getVertex(i)[0] >= topVertex[0]) - { - do_optimize = 0; - break; - } - } - - if(do_optimize) - { - //find midU so that grid->get_u_value(midU) >= topVertex[0] - //and grid->get_u_value(midU-1) < topVertex[0] - int midU=rightU; - while(grid->get_u_value(midU) >= topVertex[0]) - { - midU--; - if(midU < leftU) - break; - } - midU++; - - grid->outputFanWithPoint(gridV, midU, rightU, topVertex, pStream); - stripOfFanLeft(leftChain, segIndexLarge, segIndexSmall, grid, gridV, leftU, midU, pStream, 0); - Real tempBot[2]; - tempBot[0] = grid->get_u_value(midU); - tempBot[1] = grid->get_v_value(gridV); - monoTriangulation2(topVertex, tempBot, leftChain, leftStart, segIndexSmall, 1, pStream); - } - else //not optimize - { - - stripOfFanLeft(leftChain, segIndexLarge, segIndexSmall, grid, gridV, leftU, rightU, pStream, 0); - Real tempBot[2]; - tempBot[0] = grid->get_u_value(rightU); - tempBot[1] = grid->get_v_value(gridV); - monoTriangulation2(topVertex, tempBot, leftChain, leftStart, segIndexSmall, 1, pStream); - } - } - else //the topVertex forms a fan with the grid points - grid->outputFanWithPoint(gridV, leftU, rightU, topVertex, pStream); -} - - -void sampleTopLeftWithGridLine(Real* topVertex, - vertexArray* leftChain, - Int leftStart, - Int leftEnd, - gridWrap* grid, - Int gridV, - Int leftU, - Int rightU, - primStream* pStream - ) -{ - Int segIndexSmall, segIndexLarge; - //if left chain is empty, then there is only one top vertex with one grid - // line - if(leftEnd < leftStart) { - grid->outputFanWithPoint(gridV, leftU, rightU, topVertex, pStream); - return; - } - findTopLeftSegment(leftChain, - leftStart, - leftEnd, - grid->get_u_value(leftU), - segIndexSmall, - segIndexLarge - ); - sampleTopLeftWithGridLinePost(topVertex, - leftChain, - leftStart, - segIndexSmall, - segIndexLarge, - leftEnd, - grid, - gridV, - leftU, - rightU, - pStream); -} - - -//return 1 if saprator exits, 0 otherwise -Int findTopSeparator(vertexArray* leftChain, - Int leftStartIndex, - Int leftEndIndex, - vertexArray* rightChain, - Int rightStartIndex, - Int rightEndIndex, - Int& ret_sep_left, - Int& ret_sep_right) -{ - - Int oldLeftI, oldRightI, newLeftI, newRightI; - Int i,j,k; - Real leftMax /*= leftChain->getVertex(leftEndIndex)[0]*/; - Real rightMin /*= rightChain->getVertex(rightEndIndex)[0]*/; - if(leftChain->getVertex(leftEndIndex)[1] > rightChain->getVertex(rightEndIndex)[1]) //left higher - { - oldLeftI = leftEndIndex+1; - oldRightI = rightEndIndex; - leftMax = leftChain->getVertex(leftEndIndex)[0] - Real(1.0); //initilza to left of leftU - rightMin = rightChain->getVertex(rightEndIndex)[0]; - } - else - { - oldLeftI = leftEndIndex; - oldRightI = rightEndIndex+1; - leftMax = leftChain->getVertex(leftEndIndex)[0]; - rightMin = rightChain->getVertex(rightEndIndex)[0] + Real(1.0); - } - - //i: the current working leftChain index, - //j: the current working rightChain index, - //if left(i) is higher than right(j), then the two chains beloew right(j) are separated. - //else the two chains below left(i) are separeated. - i=leftEndIndex; - j=rightEndIndex; - while(1) - { - newLeftI = oldLeftI; - newRightI = oldRightI; - - if(i= rightStartIndex; k--) - { - if(rightChain->getVertex(k)[0] > leftMax) //no conflict - { - //update oldRightI if necessary - if(rightChain->getVertex(k)[0] < rightMin) - { - rightMin = rightChain->getVertex(k)[0]; - oldRightI = k; - } - } - else //there is a conflict - break; //the for-loop. below right(k-1) is seperated: oldLeftI, oldRightI. - } - break; //the while loop - } - else if(j= leftStartIndex; k--) - { - if(leftChain->getVertex(k)[0] < rightMin) //no conflict - { - //update oldLeftI if necessary - if(leftChain->getVertex(k)[0] > leftMax) - { - leftMax = leftChain->getVertex(k)[0]; - oldLeftI = k; - } - } - else //there is a conflict - break; //the for loop - } - break; //the while loop - } - else if(leftChain->getVertex(i)[1] > rightChain->getVertex(j)[1]) //left hgiher - { - if(leftChain->getVertex(i)[0] > leftMax) //update leftMax and newLeftI. - { - leftMax = leftChain->getVertex(i)[0]; - newLeftI = i; - } - for(k=j-1; k>= rightStartIndex; k--) //update rightMin and newRightI. - { - if(rightChain->getVertex(k)[1] > leftChain->getVertex(i)[1]) - break; - if(rightChain->getVertex(k)[0] < rightMin) - { - rightMin = rightChain->getVertex(k)[0]; - newRightI = k; - } - } - j = k; //next working j, since j will be higher than i in next loop - if(leftMax >= rightMin) //there is a conflict - break; - else //still no conflict - { - oldLeftI = newLeftI; - oldRightI = newRightI; - } - } - else //right higher - { - if(rightChain->getVertex(j)[0] < rightMin) - { - rightMin = rightChain->getVertex(j)[0]; - newRightI = j; - } - for(k=i-1; k>= leftStartIndex; k--) - { - if(leftChain->getVertex(k)[1] > rightChain->getVertex(j)[1]) - break; - if(leftChain->getVertex(k)[0] > leftMax) - { - leftMax = leftChain->getVertex(k)[0]; - newLeftI = k; - } - } - i = k; //next working i, since i will be higher than j next loop - - if(leftMax >= rightMin) //there is a conflict - break; - else //still no conflict - { - oldLeftI = newLeftI; - oldRightI = newRightI; - } - } - }//end of while loop - //now oldLeftI and oldRightI are the desired separeator index, notice that there are not necessarily valid - if(oldLeftI > leftEndIndex || oldRightI > rightEndIndex) - return 0; - else - { - ret_sep_left = oldLeftI; - ret_sep_right = oldRightI; - return 1; - } -} - - -void sampleCompTop(Real* topVertex, - vertexArray* leftChain, - Int leftStartIndex, - vertexArray* rightChain, - Int rightStartIndex, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridIndex1, - Int up_leftCornerWhere, - Int up_leftCornerIndex, - Int up_rightCornerWhere, - Int up_rightCornerIndex, - primStream* pStream) -{ - if(up_leftCornerWhere == 1 && up_rightCornerWhere == 1) //the top is topVertex with possible grid points - { - leftGridChain->getGrid()->outputFanWithPoint(leftGridChain->getVlineIndex(gridIndex1), - leftGridChain->getUlineIndex(gridIndex1), - rightGridChain->getUlineIndex(gridIndex1), - topVertex, - pStream); - return; - } - - else if(up_leftCornerWhere != 0) - { - Real* tempTop; - Int tempRightStart; - if(up_leftCornerWhere == 1){ - tempRightStart = rightStartIndex; - tempTop = topVertex; - } - else - { - tempRightStart = up_leftCornerIndex+1; - tempTop = rightChain->getVertex(up_leftCornerIndex); - } - sampleTopRightWithGridLine(tempTop, rightChain, tempRightStart, up_rightCornerIndex, - rightGridChain->getGrid(), - leftGridChain->getVlineIndex(gridIndex1), - leftGridChain->getUlineIndex(gridIndex1), - rightGridChain->getUlineIndex(gridIndex1), - pStream); - } - else if(up_rightCornerWhere != 2) - { - Real* tempTop; - Int tempLeftStart; - if(up_rightCornerWhere == 1) - { - tempLeftStart = leftStartIndex; - tempTop = topVertex; - } - else //0 - { - tempLeftStart = up_rightCornerIndex+1; - tempTop = leftChain->getVertex(up_rightCornerIndex); - } -/* - sampleTopLeftWithGridLine(tempTop, leftChain, tempLeftStart, up_leftCornerIndex, - leftGridChain->getGrid(), - leftGridChain->getVlineIndex(gridIndex1), - leftGridChain->getUlineIndex(gridIndex1), - rightGridChain->getUlineIndex(gridIndex1), - pStream); -*/ - sampleCompTopSimple(topVertex, - leftChain, - leftStartIndex, - rightChain, - rightStartIndex, - leftGridChain, - rightGridChain, - gridIndex1, - up_leftCornerWhere, - up_leftCornerIndex, - up_rightCornerWhere, - up_rightCornerIndex, - pStream); - } - else //up_leftCornerWhere == 0, up_rightCornerWhere == 2. - { - sampleCompTopSimple(topVertex, - leftChain, - leftStartIndex, - rightChain, - rightStartIndex, - leftGridChain, - rightGridChain, - gridIndex1, - up_leftCornerWhere, - up_leftCornerIndex, - up_rightCornerWhere, - up_rightCornerIndex, - pStream); - return; -#ifdef NOT_REACHABLE //code is not reachable, for test purpose only - //the following code is trying to do some optimization, but not quite working, also see sampleCompBot.C: - Int sep_left, sep_right; - if(findTopSeparator(leftChain, - leftStartIndex, - up_leftCornerIndex, - rightChain, - rightStartIndex, - up_rightCornerIndex, - sep_left, - sep_right) - ) //separator exists - { - - if( leftChain->getVertex(sep_left)[0] >= leftGridChain->get_u_value(gridIndex1) && - rightChain->getVertex(sep_right)[0] <= rightGridChain->get_u_value(gridIndex1)) - { - Int gridSep; - Int segLeftSmall, segLeftLarge, segRightSmall, segRightLarge; - Int valid=1; //whether the gridStep is valid or not. - findTopLeftSegment(leftChain, - sep_left, - up_leftCornerIndex, - leftGridChain->get_u_value(gridIndex1), - segLeftSmall, - segLeftLarge); - findTopRightSegment(rightChain, - sep_right, - up_rightCornerIndex, - rightGridChain->get_u_value(gridIndex1), - segRightSmall, - segRightLarge); - if(leftChain->getVertex(segLeftSmall)[1] >= rightChain->getVertex(segRightSmall)[1]) - { - gridSep = rightGridChain->getUlineIndex(gridIndex1); - while(leftGridChain->getGrid()->get_u_value(gridSep) > leftChain->getVertex(segLeftSmall)[0]) - gridSep--; - if(segLeftSmallgetGrid()->get_u_value(gridSep) < leftChain->getVertex(segLeftSmall+1)[0]) - { - valid = 0; - } - } - else - { - gridSep = leftGridChain->getUlineIndex(gridIndex1); - while(leftGridChain->getGrid()->get_u_value(gridSep) < rightChain->getVertex(segRightSmall)[0]) - gridSep++; - if(segRightSmallgetGrid()->get_u_value(gridSep) > rightChain->getVertex(segRightSmall+1)[0]) - { - valid = 0; - } - } - - if(! valid) - { - sampleCompTopSimple(topVertex, - leftChain, - leftStartIndex, - rightChain, - rightStartIndex, - leftGridChain, - rightGridChain, - gridIndex1, - up_leftCornerWhere, - up_leftCornerIndex, - up_rightCornerWhere, - up_rightCornerIndex, - pStream); - } - else - { - sampleTopLeftWithGridLinePost(leftChain->getVertex(segLeftSmall), - leftChain, - segLeftSmall+1, - segLeftSmall+1, - segLeftLarge, - up_leftCornerIndex, - leftGridChain->getGrid(), - leftGridChain->getVlineIndex(gridIndex1), - leftGridChain->getUlineIndex(gridIndex1), - gridSep, - pStream); - sampleTopRightWithGridLinePost(rightChain->getVertex(segRightSmall), - rightChain, - segRightSmall+1, - segRightSmall+1, - segRightLarge, - up_rightCornerIndex, - leftGridChain->getGrid(), - leftGridChain->getVlineIndex(gridIndex1), - gridSep, - rightGridChain->getUlineIndex(gridIndex1), - pStream); - Real tempBot[2]; - tempBot[0] = leftGridChain->getGrid()->get_u_value(gridSep); - tempBot[1] = leftGridChain->get_v_value(gridIndex1); - monoTriangulationRecGen(topVertex, tempBot, - leftChain, leftStartIndex, segLeftSmall, - rightChain, rightStartIndex, segRightSmall, - pStream); - } - }//end if both sides have vetices inside the gridboundary points - else if(leftChain->getVertex(sep_left)[0] >= leftGridChain->get_u_value(gridIndex1)) //left is in, right is nout - { - - Int segLeftSmall, segLeftLarge; - findTopLeftSegment(leftChain, - sep_left, - up_leftCornerIndex, - leftGridChain->get_u_value(gridIndex1), - segLeftSmall, - segLeftLarge); - assert(segLeftLarge >= sep_left); - monoTriangulation2(leftChain->getVertex(segLeftLarge), - leftGridChain->get_vertex(gridIndex1), - leftChain, - segLeftLarge+1, - up_leftCornerIndex, - 1, //a increase chain, - pStream); - - stripOfFanLeft(leftChain, segLeftLarge, segLeftSmall, - leftGridChain->getGrid(), - leftGridChain->getVlineIndex(gridIndex1), - leftGridChain->getUlineIndex(gridIndex1), - rightGridChain->getUlineIndex(gridIndex1), - pStream, 0); - - - monoTriangulationRecGen(topVertex, rightGridChain->get_vertex(gridIndex1), - leftChain, leftStartIndex, segLeftSmall, - rightChain, rightStartIndex, up_rightCornerIndex, - pStream); - }//end left in right out - else if(rightChain->getVertex(sep_right)[0] <= rightGridChain->get_u_value(gridIndex1)) - { - Int segRightSmall, segRightLarge; - findTopRightSegment(rightChain, - sep_right, - up_rightCornerIndex, - rightGridChain->get_u_value(gridIndex1), - segRightSmall, - segRightLarge); - assert(segRightLarge>=sep_right); - monoTriangulation2(rightChain->getVertex(segRightLarge), - rightGridChain->get_vertex(gridIndex1), - rightChain, - segRightLarge+1, - up_rightCornerIndex, - 0, //a decrease chain - pStream); - stripOfFanRight(rightChain, segRightLarge, segRightSmall, - rightGridChain->getGrid(), - rightGridChain->getVlineIndex(gridIndex1), - leftGridChain->getUlineIndex(gridIndex1), - rightGridChain->getUlineIndex(gridIndex1), - pStream, 0); - - - monoTriangulationRecGen(topVertex, leftGridChain->get_vertex(gridIndex1), - leftChain, leftStartIndex, up_leftCornerIndex, - rightChain, rightStartIndex,segRightSmall, - pStream); - - }//end left out rigth in - else //left out , right out - { - - sampleCompTopSimple(topVertex, - leftChain, - leftStartIndex, - rightChain, - rightStartIndex, - leftGridChain, - rightGridChain, - gridIndex1, - up_leftCornerWhere, - up_leftCornerIndex, - up_rightCornerWhere, - up_rightCornerIndex, - pStream); - }//end leftout, right out - }//end if separator exixts. - else //no separator - { - - sampleCompTopSimple(topVertex, - leftChain, - leftStartIndex, - rightChain, - rightStartIndex, - leftGridChain, - rightGridChain, - gridIndex1, - up_leftCornerWhere, - up_leftCornerIndex, - up_rightCornerWhere, - up_rightCornerIndex, - pStream); - } -#endif - }//end if 0,2 -}//end if the function - - -static void sampleCompTopSimpleOpt(gridWrap* grid, - Int gridV, - Real* topVertex, Real* botVertex, - vertexArray* inc_chain, Int inc_current, Int inc_end, - vertexArray* dec_chain, Int dec_current, Int dec_end, - primStream* pStream) -{ - if(gridV <= 0 || dec_endget_v_value(gridV+1) >= topVertex[1]) - { - monoTriangulationRecGenOpt(topVertex, botVertex, - inc_chain, inc_current, inc_end, - dec_chain, dec_current, dec_end, - pStream); - return; - } - Int i,j,k; - Real currentV = grid->get_v_value(gridV+1); - if(inc_chain->getVertex(inc_end)[1] <= currentV && - dec_chain->getVertex(dec_end)[1] < currentV) - { - //find i bottom up so that inc_chain[i]<= curentV and inc_chain[i-1] > currentV, - //find j botom up so that dec_chain[j] < currentV and dec_chain[j-1] >= currentV - for(i=inc_end; i >= inc_current; i--) - { - if(inc_chain->getVertex(i)[1] > currentV) - break; - } - i++; - for(j=dec_end; j >= dec_current; j--) - { - if(dec_chain->getVertex(j)[1] >= currentV) - break; - } - j++; - if(inc_chain->getVertex(i)[1] <= dec_chain->getVertex(j)[1]) - { - //find the k so that dec_chain[k][1] < inc_chain[i][1] - for(k=j; k<=dec_end; k++) - { - if(dec_chain->getVertex(k)[1] < inc_chain->getVertex(i)[1]) - break; - } - //we know that dec_chain[j][1] >= inc_chian[i][1] - //we know that dec_chain[k-1][1]>=inc_chain[i][1] - //we know that dec_chian[k][1] < inc_chain[i][1] - //find l in [j, k-1] so that dec_chain[l][0] 0 is closest to - // inc_chain[i] - int l; - Real tempI = Real(j); - Real tempMin = (Real)fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(j)[0]); - for(l=j+1; l<= k-1; l++) - { - if(fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(l)[0]) - <= tempMin) - { - tempMin = (Real)fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(l)[0]); - tempI = (Real)l; - } - } - //inc_chain[i] and dec_chain[tempI] are connected. - monoTriangulationRecGenOpt(dec_chain->getVertex((int)tempI), - botVertex, - inc_chain, i, inc_end, - dec_chain, (int)(tempI+1), dec_end, - pStream); - //recursively do the rest - sampleCompTopSimpleOpt(grid, - gridV+1, - topVertex, inc_chain->getVertex(i), - inc_chain, inc_current, i-1, - dec_chain, dec_current, (int)tempI, - pStream); - } - else - { - //find the k so that inc_chain[k][1] <= dec_chain[j][1] - for(k=i; k<=inc_end; k++) - { - if(inc_chain->getVertex(k)[1] <= dec_chain->getVertex(j)[1]) - break; - } - //we know that inc_chain[i] > dec_chain[j] - //we know that inc_chain[k-1][1] > dec_chain[j][1] - //we know that inc_chain[k][1] <= dec_chain[j][1] - //so we find l between [i,k-1] so that - //inc_chain[l][0] is the closet to dec_chain[j][0] - int tempI = i; - int l; - Real tempMin = (Real)fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(j)[0]); - for(l=i+1; l<=k-1; l++) - { - if(fabs(inc_chain->getVertex(l)[0] - dec_chain->getVertex(j)[0]) <= tempMin) - { - tempMin = (Real)fabs(inc_chain->getVertex(l)[0] - dec_chain->getVertex(j)[0]); - tempI = l; - } - } - - //inc_chain[tempI] and dec_chain[j] are connected - - monoTriangulationRecGenOpt(inc_chain->getVertex(tempI), - botVertex, - inc_chain, tempI+1, inc_end, - dec_chain, j, dec_end, - pStream); - - //recurvesily do the rest - sampleCompTopSimpleOpt(grid, gridV+1, - topVertex, dec_chain->getVertex(j), - inc_chain, inc_current, tempI, - dec_chain, dec_current, j-1, - pStream); - } - } - else //go to the next higher gridV - { - sampleCompTopSimpleOpt(grid, - gridV+1, - topVertex, botVertex, - inc_chain, inc_current, inc_end, - dec_chain, dec_current, dec_end, - pStream); - } -} - -void sampleCompTopSimple(Real* topVertex, - vertexArray* leftChain, - Int leftStartIndex, - vertexArray* rightChain, - Int rightStartIndex, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridIndex1, - Int up_leftCornerWhere, - Int up_leftCornerIndex, - Int up_rightCornerWhere, - Int up_rightCornerIndex, - primStream* pStream) -{ - //the plan is to use monotriangulation algortihm. - Int i,k; - Real* ActualTop; - Real* ActualBot; - Int ActualLeftStart, ActualLeftEnd; - Int ActualRightStart, ActualRightEnd; - - //creat an array to store the points on the grid line - gridWrap* grid = leftGridChain->getGrid(); - Int gridV = leftGridChain->getVlineIndex(gridIndex1); - Int gridLeftU = leftGridChain->getUlineIndex(gridIndex1); - Int gridRightU = rightGridChain->getUlineIndex(gridIndex1); - - Real2* gridPoints = (Real2*) malloc(sizeof(Real2) * (gridRightU - gridLeftU +1)); - assert(gridPoints); - - for(k=0, i=gridRightU; i>= gridLeftU; i--, k++) - { - gridPoints[k][0] = grid->get_u_value(i); - gridPoints[k][1] = grid->get_v_value(gridV); - } - - if(up_leftCornerWhere != 2) - ActualRightStart = rightStartIndex; - else - ActualRightStart = up_leftCornerIndex+1; //up_leftCornerIndex will be the ActualTop - - if(up_rightCornerWhere != 2) //right corner is not on right chain - ActualRightEnd = rightStartIndex-1; //meaning that there is no actual rigth section - else - ActualRightEnd = up_rightCornerIndex; - - vertexArray ActualRightChain(max(0, ActualRightEnd-ActualRightStart+1) + gridRightU-gridLeftU+1); - - for(i=ActualRightStart; i<= ActualRightEnd; i++) - ActualRightChain.appendVertex(rightChain->getVertex(i)); - for(i=0; igetVertex(up_rightCornerIndex); - else - ActualTop = topVertex; - } - else if(up_leftCornerWhere == 1) - ActualTop = topVertex; - else //up_leftCornerWhere == 2 - ActualTop = rightChain->getVertex(up_leftCornerIndex); - - ActualBot = gridPoints[gridRightU - gridLeftU]; - - - - - if(leftChain->getVertex(ActualLeftEnd)[1] == ActualBot[1]) - { -/* - monoTriangulationRecGenOpt(ActualTop, leftChain->getVertex(ActualLeftEnd), - leftChain, - ActualLeftStart, ActualLeftEnd-1, - &ActualRightChain, - 0, - ActualRightChain.getNumElements()-1, - pStream); -*/ - - sampleCompTopSimpleOpt(grid, gridV, - ActualTop, leftChain->getVertex(ActualLeftEnd), - leftChain, - ActualLeftStart, ActualLeftEnd-1, - &ActualRightChain, - 0, - ActualRightChain.getNumElements()-1, - pStream); - - } - else - { -/* - monoTriangulationRecGenOpt(ActualTop, ActualBot, leftChain, - ActualLeftStart, ActualLeftEnd, - &ActualRightChain, - 0, ActualRightChain.getNumElements()-2, //the last is the bot. - pStream); -*/ - - sampleCompTopSimpleOpt(grid, gridV, - ActualTop, ActualBot, leftChain, - ActualLeftStart, ActualLeftEnd, - &ActualRightChain, - 0, ActualRightChain.getNumElements()-2, //the last is the bot. - pStream); - - - } - - free(gridPoints); - -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.h deleted file mode 100644 index 6875ad57e2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef _SAMPLECOMPTOP_H -#define _SAMPLECOMPTOP_H - -#include "sampleMonoPoly.h" - -void sampleCompTop(Real* topVertex, - vertexArray* leftChain, - Int leftStartIndex, - vertexArray* rightChain, - Int rightStartIndex, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridIndex1, - Int up_leftCornerWhere, - Int up_leftCornerIndex, - Int up_rightCornerWhere, - Int up_rightCornerIndex, - primStream* pStream); - -void sampleCompTopSimple(Real* topVertex, - vertexArray* leftChain, - Int leftStartIndex, - vertexArray* rightChain, - Int rightStartIndex, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridIndex1, - Int up_leftCornerWhere, - Int up_leftCornerIndex, - Int up_rightCornerWhere, - Int up_rightCornerIndex, - primStream* pStream); - -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc deleted file mode 100644 index 49ab68f701..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc +++ /dev/null @@ -1,2429 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2005/10/28 13:09:09 $ $Revision: 1.4.8.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc,v 1.4.8.1 2005/10/28 13:09:09 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include -#include - -#ifndef max -#define max(a,b) ((a>b)? a:b) -#endif -#ifndef min -#define min(a,b) ((a>b)? b:a) -#endif - -#include - -#include "glimports.h" -#include "zlassert.h" -#include "sampleMonoPoly.h" -#include "sampleComp.h" -#include "polyDBG.h" -#include "partitionX.h" - - -#define ZERO 0.00001 - -//#define MYDEBUG - -//#define SHORTEN_GRID_LINE -//see work/newtess/internal/test/problems - - -/*split a polygon so that each vertex correcpond to one edge - *the head of the first edge of the returned plygon must be the head of the first - *edge of the origianl polygon. This is crucial for the code in sampleMonoPoly function - */ - directedLine* polygonConvert(directedLine* polygon) -{ - int i; - directedLine* ret; - sampledLine* sline; - sline = new sampledLine(2); - sline->setPoint(0, polygon->getVertex(0)); - sline->setPoint(1, polygon->getVertex(1)); - ret=new directedLine(INCREASING, sline); - for(i=1; i<= polygon->get_npoints()-2; i++) - { - sline = new sampledLine(2); - sline->setPoint(0, polygon->getVertex(i)); - sline->setPoint(1, polygon->getVertex(i+1)); - ret->insert(new directedLine(INCREASING, sline)); - } - - for(directedLine *temp = polygon->getNext(); temp != polygon; temp = temp->getNext()) - { - for(i=0; i<= temp->get_npoints()-2; i++) - { - sline = new sampledLine(2); - sline->setPoint(0, temp->getVertex(i)); - sline->setPoint(1, temp->getVertex(i+1)); - ret->insert(new directedLine(INCREASING, sline)); - } - } - return ret; -} - -void triangulateConvexPolyVertical(directedLine* topV, directedLine* botV, primStream *pStream) -{ - Int i,j; - Int n_leftVerts; - Int n_rightVerts; - Real** leftVerts; - Real** rightVerts; - directedLine* tempV; - n_leftVerts = 0; - for(tempV = topV; tempV != botV; tempV = tempV->getNext()) - { - n_leftVerts += tempV->get_npoints(); - } - n_rightVerts=0; - for(tempV = botV; tempV != topV; tempV = tempV->getNext()) - { - n_rightVerts += tempV->get_npoints(); - } - - Real2* temp_leftVerts = (Real2 *) malloc(sizeof(Real2) * n_leftVerts); - assert(temp_leftVerts); - Real2* temp_rightVerts = (Real2 *) malloc(sizeof(Real2) * n_rightVerts); - assert(temp_rightVerts); - - leftVerts = (Real**) malloc(sizeof(Real2*) * n_leftVerts); - assert(leftVerts); - rightVerts = (Real**) malloc(sizeof(Real2*) * n_rightVerts); - assert(rightVerts); - for(i=0; igetNext()) - { - for(j=1; jget_npoints(); j++) - { - leftVerts[i][0] = tempV->getVertex(j)[0]; - leftVerts[i][1] = tempV->getVertex(j)[1]; - i++; - } - } - n_leftVerts = i; - i=0; - for(tempV = topV->getPrev(); tempV != botV->getPrev(); tempV = tempV->getPrev()) - { - for(j=tempV->get_npoints()-1; j>=1; j--) - { - rightVerts[i][0] = tempV->getVertex(j)[0]; - rightVerts[i][1] = tempV->getVertex(j)[1]; - i++; - } - } - n_rightVerts = i; - triangulateXYMonoTB(n_leftVerts, leftVerts, n_rightVerts, rightVerts, pStream); - free(leftVerts); - free(rightVerts); - free(temp_leftVerts); - free(temp_rightVerts); -} - -void triangulateConvexPolyHoriz(directedLine* leftV, directedLine* rightV, primStream *pStream) -{ - Int i,j; - Int n_lowerVerts; - Int n_upperVerts; - Real2 *lowerVerts; - Real2 *upperVerts; - directedLine* tempV; - n_lowerVerts=0; - for(tempV = leftV; tempV != rightV; tempV = tempV->getNext()) - { - n_lowerVerts += tempV->get_npoints(); - } - n_upperVerts=0; - for(tempV = rightV; tempV != leftV; tempV = tempV->getNext()) - { - n_upperVerts += tempV->get_npoints(); - } - lowerVerts = (Real2 *) malloc(sizeof(Real2) * n_lowerVerts); - assert(n_lowerVerts); - upperVerts = (Real2 *) malloc(sizeof(Real2) * n_upperVerts); - assert(n_upperVerts); - i=0; - for(tempV = leftV; tempV != rightV; tempV = tempV->getNext()) - { - for(j=0; jget_npoints(); j++) - { - lowerVerts[i][0] = tempV->getVertex(j)[0]; - lowerVerts[i][1] = tempV->getVertex(j)[1]; - i++; - } - } - i=0; - for(tempV = leftV->getPrev(); tempV != rightV->getPrev(); tempV = tempV->getPrev()) - { - for(j=tempV->get_npoints()-1; j>=0; j--) - { - upperVerts[i][0] = tempV->getVertex(j)[0]; - upperVerts[i][1] = tempV->getVertex(j)[1]; - i++; - } - } - triangulateXYMono(n_upperVerts, upperVerts, n_lowerVerts, lowerVerts, pStream); - free(lowerVerts); - free(upperVerts); -} -void triangulateConvexPoly(directedLine* polygon, Int ulinear, Int vlinear, primStream* pStream) -{ - /*find left, right, top , bot - */ - directedLine* tempV; - directedLine* topV; - directedLine* botV; - directedLine* leftV; - directedLine* rightV; - topV = botV = polygon; - - for(tempV = polygon->getNext(); tempV != polygon; tempV = tempV->getNext()) - { - if(compV2InY(topV->head(), tempV->head())<0) { - - topV = tempV; - } - if(compV2InY(botV->head(), tempV->head())>0) { - - botV = tempV; - } - } - //find leftV - for(tempV = topV; tempV != botV; tempV = tempV->getNext()) - { - if(tempV->tail()[0] >= tempV->head()[0]) - break; - } - leftV = tempV; - //find rightV - for(tempV = botV; tempV != topV; tempV = tempV->getNext()) - { - if(tempV->tail()[0] <= tempV->head()[0]) - break; - } - rightV = tempV; - if(vlinear) - { - triangulateConvexPolyHoriz( leftV, rightV, pStream); - } - else if(ulinear) - { - triangulateConvexPolyVertical(topV, botV, pStream); - } - else - { - if(DBG_is_U_direction(polygon)) - { - triangulateConvexPolyHoriz( leftV, rightV, pStream); - } - else - triangulateConvexPolyVertical(topV, botV, pStream); - } -} - -/*for debug purpose*/ -void drawCorners( - Real* topV, Real* botV, - vertexArray* leftChain, - vertexArray* rightChain, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridIndex1, - Int gridIndex2, - Int leftCornerWhere, - Int leftCornerIndex, - Int rightCornerWhere, - Int rightCornerIndex, - Int bot_leftCornerWhere, - Int bot_leftCornerIndex, - Int bot_rightCornerWhere, - Int bot_rightCornerIndex) -{ - Real* leftCornerV; - Real* rightCornerV; - Real* bot_leftCornerV; - Real* bot_rightCornerV; - - if(leftCornerWhere == 1) - leftCornerV = topV; - else if(leftCornerWhere == 0) - leftCornerV = leftChain->getVertex(leftCornerIndex); - else - leftCornerV = rightChain->getVertex(leftCornerIndex); - - if(rightCornerWhere == 1) - rightCornerV = topV; - else if(rightCornerWhere == 0) - rightCornerV = leftChain->getVertex(rightCornerIndex); - else - rightCornerV = rightChain->getVertex(rightCornerIndex); - - if(bot_leftCornerWhere == 1) - bot_leftCornerV = botV; - else if(bot_leftCornerWhere == 0) - bot_leftCornerV = leftChain->getVertex(bot_leftCornerIndex); - else - bot_leftCornerV = rightChain->getVertex(bot_leftCornerIndex); - - if(bot_rightCornerWhere == 1) - bot_rightCornerV = botV; - else if(bot_rightCornerWhere == 0) - bot_rightCornerV = leftChain->getVertex(bot_rightCornerIndex); - else - bot_rightCornerV = rightChain->getVertex(bot_rightCornerIndex); - - Real topGridV = leftGridChain->get_v_value(gridIndex1); - Real topGridU1 = leftGridChain->get_u_value(gridIndex1); - Real topGridU2 = rightGridChain->get_u_value(gridIndex1); - Real botGridV = leftGridChain->get_v_value(gridIndex2); - Real botGridU1 = leftGridChain->get_u_value(gridIndex2); - Real botGridU2 = rightGridChain->get_u_value(gridIndex2); - - glBegin(GL_LINE_STRIP); - glVertex2fv(leftCornerV); - glVertex2f(topGridU1, topGridV); - glEnd(); - - glBegin(GL_LINE_STRIP); - glVertex2fv(rightCornerV); - glVertex2f(topGridU2, topGridV); - glEnd(); - - glBegin(GL_LINE_STRIP); - glVertex2fv(bot_leftCornerV); - glVertex2f(botGridU1, botGridV); - glEnd(); - - glBegin(GL_LINE_STRIP); - glVertex2fv(bot_rightCornerV); - glVertex2f(botGridU2, botGridV); - glEnd(); - - -} - -void toVertexArrays(directedLine* topV, directedLine* botV, vertexArray& leftChain, vertexArray& rightChain) -{ - Int i; - directedLine* tempV; - for(i=1; i<=topV->get_npoints()-2; i++) { /*the first vertex is the top vertex which doesn't belong to inc_chain*/ - leftChain.appendVertex(topV->getVertex(i)); - } - for(tempV = topV->getNext(); tempV != botV; tempV = tempV->getNext()) - { - for(i=0; i<=tempV->get_npoints()-2; i++){ - leftChain.appendVertex(tempV->getVertex(i)); - } - } - - for(tempV = topV->getPrev(); tempV != botV; tempV = tempV->getPrev()) - { - for(i=tempV->get_npoints()-2; i>=0; i--){ - rightChain.appendVertex(tempV->getVertex(i)); - } - } - for(i=botV->get_npoints()-2; i>=1; i--){ - rightChain.appendVertex(tempV->getVertex(i)); - } -} - - -void findTopAndBot(directedLine* polygon, directedLine*& topV, directedLine*& botV) -{ - assert(polygon); - directedLine* tempV; - topV = botV = polygon; - for(tempV = polygon->getNext(); tempV != polygon; tempV = tempV->getNext()) - { - if(compV2InY(topV->head(), tempV->head())<0) { - topV = tempV; - } - if(compV2InY(botV->head(), tempV->head())>0) { - botV = tempV; - } - } -} - -void findGridChains(directedLine* topV, directedLine* botV, - gridWrap* grid, - gridBoundaryChain*& leftGridChain, - gridBoundaryChain*& rightGridChain) -{ - /*find the first(top) and the last (bottom) grid line which intersect the - *this polygon - */ - Int firstGridIndex; /*the index in the grid*/ - Int lastGridIndex; - - firstGridIndex = (Int) ((topV->head()[1] - grid->get_v_min()) / (grid->get_v_max() - grid->get_v_min()) * (grid->get_n_vlines()-1)); - - if(botV->head()[1] < grid->get_v_min()) - lastGridIndex = 0; - else - lastGridIndex = (Int) ((botV->head()[1] - grid->get_v_min()) / (grid->get_v_max() - grid->get_v_min()) * (grid->get_n_vlines()-1)) + 1; - - /*find the interval inside the polygon for each gridline*/ - Int *leftGridIndices = (Int*) malloc(sizeof(Int) * (firstGridIndex - lastGridIndex +1)); - assert(leftGridIndices); - Int *rightGridIndices = (Int*) malloc(sizeof(Int) * (firstGridIndex - lastGridIndex +1)); - assert(rightGridIndices); - Int *leftGridInnerIndices = (Int*) malloc(sizeof(Int) * (firstGridIndex - lastGridIndex +1)); - assert(leftGridInnerIndices); - Int *rightGridInnerIndices = (Int*) malloc(sizeof(Int) * (firstGridIndex - lastGridIndex +1)); - assert(rightGridInnerIndices); - - findLeftGridIndices(topV, firstGridIndex, lastGridIndex, grid, leftGridIndices, leftGridInnerIndices); - - findRightGridIndices(topV, firstGridIndex, lastGridIndex, grid, rightGridIndices, rightGridInnerIndices); - - leftGridChain = new gridBoundaryChain(grid, firstGridIndex, firstGridIndex-lastGridIndex+1, leftGridIndices, leftGridInnerIndices); - - rightGridChain = new gridBoundaryChain(grid, firstGridIndex, firstGridIndex-lastGridIndex+1, rightGridIndices, rightGridInnerIndices); - - free(leftGridIndices); - free(rightGridIndices); - free(leftGridInnerIndices); - free(rightGridInnerIndices); -} - -void findDownCorners(Real *botVertex, - vertexArray *leftChain, Int leftChainStartIndex, Int leftChainEndIndex, - vertexArray *rightChain, Int rightChainStartIndex, Int rightChainEndIndex, - Real v, - Real uleft, - Real uright, - Int& ret_leftCornerWhere, /*0: left chain, 1: topvertex, 2: rightchain*/ - Int& ret_leftCornerIndex, /*useful when ret_leftCornerWhere == 0 or 2*/ - Int& ret_rightCornerWhere, /*0: left chain, 1: topvertex, 2: rightchain*/ - Int& ret_rightCornerIndex /*useful when ret_leftCornerWhere == 0 or 2*/ - ) -{ -#ifdef MYDEBUG -printf("*************enter find donw corner\n"); -printf("finddownCorner: v=%f, uleft=%f, uright=%f\n", v, uleft, uright); -printf("(%i,%i,%i,%i)\n", leftChainStartIndex, leftChainEndIndex,rightChainStartIndex, rightChainEndIndex); -printf("left chain is\n"); -leftChain->print(); -printf("right chain is\n"); -rightChain->print(); -#endif - - assert(v > botVertex[1]); - Real leftGridPoint[2]; - leftGridPoint[0] = uleft; - leftGridPoint[1] = v; - Real rightGridPoint[2]; - rightGridPoint[0] = uright; - rightGridPoint[1] = v; - - Int i; - Int index1, index2; - - index1 = leftChain->findIndexBelowGen(v, leftChainStartIndex, leftChainEndIndex); - index2 = rightChain->findIndexBelowGen(v, rightChainStartIndex, rightChainEndIndex); - - if(index2 <= rightChainEndIndex) //index2 was found above - index2 = rightChain->skipEqualityFromStart(v, index2, rightChainEndIndex); - - if(index1>leftChainEndIndex && index2 > rightChainEndIndex) /*no point below v on left chain or right chain*/ - { - - /*the botVertex is the only vertex below v*/ - ret_leftCornerWhere = 1; - ret_rightCornerWhere = 1; - } - else if(index1>leftChainEndIndex ) /*index2 <= rightChainEndIndex*/ - { - - ret_rightCornerWhere = 2; /*on right chain*/ - ret_rightCornerIndex = index2; - - - Real tempMin = rightChain->getVertex(index2)[0]; - Int tempI = index2; - for(i=index2+1; i<= rightChainEndIndex; i++) - if(rightChain->getVertex(i)[0] < tempMin) - { - tempI = i; - tempMin = rightChain->getVertex(i)[0]; - } - - - //we consider whether we can use botVertex as left corner. First check - //if (leftGirdPoint, botVertex) interesects right chian or not. - if(DBG_intersectChain(rightChain, rightChainStartIndex,rightChainEndIndex, - leftGridPoint, botVertex)) - { - ret_leftCornerWhere = 2;//right - ret_leftCornerIndex = index2; //should use tempI??? - } - else if(botVertex[0] < tempMin) - ret_leftCornerWhere = 1; //bot - else - { - ret_leftCornerWhere = 2; //right - ret_leftCornerIndex = tempI; - } - } - else if(index2> rightChainEndIndex) /*index1<=leftChainEndIndex*/ - { - ret_leftCornerWhere = 0; /*left chain*/ - ret_leftCornerIndex = index1; - - /*find the vertex on the left chain with the maximum u, - *either this vertex or the botvertex can be used as the right corner - */ - - Int tempI; - //skip those points which are equal to v. (avoid degeneratcy) - for(tempI = index1; tempI <= leftChainEndIndex; tempI++) - if(leftChain->getVertex(tempI)[1] < v) - break; - if(tempI > leftChainEndIndex) - ret_rightCornerWhere = 1; - else - { - Real tempMax = leftChain->getVertex(tempI)[0]; - for(i=tempI; i<= leftChainEndIndex; i++) - if(leftChain->getVertex(i)[0] > tempMax) - { - tempI = i; - tempMax = leftChain->getVertex(i)[0]; - } - - - - //we consider whether we can use botVertex as a corner. So first we check - //whether (rightGridPoint, botVertex) interescts the left chain or not. - if(DBG_intersectChain(leftChain, leftChainStartIndex,leftChainEndIndex, - rightGridPoint, botVertex)) - { - ret_rightCornerWhere = 0; - ret_rightCornerIndex = index1; //should use tempI??? - } - else if(botVertex[0] > tempMax) - { - - ret_rightCornerWhere = 1; - } - else - { - ret_rightCornerWhere = 0; - ret_rightCornerIndex = tempI; - } - } - - } - else /*index1<=leftChainEndIndex and index2 <=rightChainEndIndex*/ - { - if(leftChain->getVertex(index1)[1] >= rightChain->getVertex(index2)[1]) /*left point above right point*/ - { - ret_leftCornerWhere = 0; /*on left chain*/ - ret_leftCornerIndex = index1; - - Real tempMax; - Int tempI; - - tempI = index1; - tempMax = leftChain->getVertex(index1)[0]; - - /*find the maximum u for all the points on the left above the right point index2*/ - for(i=index1+1; i<= leftChainEndIndex; i++) - { - if(leftChain->getVertex(i)[1] < rightChain->getVertex(index2)[1]) - break; - - if(leftChain->getVertex(i)[0]>tempMax) - { - tempI = i; - tempMax = leftChain->getVertex(i)[0]; - } - } - //we consider if we can use rightChain(index2) as right corner - //we check if (rightChain(index2), rightGidPoint) intersecs left chain or not. - if(DBG_intersectChain(leftChain, leftChainStartIndex,leftChainEndIndex, rightGridPoint, rightChain->getVertex(index2))) - { - ret_rightCornerWhere = 0; - ret_rightCornerIndex = index1; //should use tempI??? - } - else if(tempMax >= rightChain->getVertex(index2)[0] || - tempMax >= uright - ) - { - - ret_rightCornerWhere = 0; /*on left Chain*/ - ret_rightCornerIndex = tempI; - } - else - { - ret_rightCornerWhere = 2; /*on right chain*/ - ret_rightCornerIndex = index2; - } - } - else /*left below right*/ - { - ret_rightCornerWhere = 2; /*on the right*/ - ret_rightCornerIndex = index2; - - Real tempMin; - Int tempI; - - tempI = index2; - tempMin = rightChain->getVertex(index2)[0]; - - /*find the minimum u for all the points on the right above the left poitn index1*/ - for(i=index2+1; i<= rightChainEndIndex; i++) - { - if( rightChain->getVertex(i)[1] < leftChain->getVertex(index1)[1]) - break; - if(rightChain->getVertex(i)[0] < tempMin) - { - tempI = i; - tempMin = rightChain->getVertex(i)[0]; - } - } - - //we consider if we can use leftchain(index1) as left corner. - //we check if (leftChain(index1) intersects right chian or not - if(DBG_intersectChain(rightChain, rightChainStartIndex, rightChainEndIndex, leftGridPoint, leftChain->getVertex(index1))) - { - ret_leftCornerWhere = 2; - ret_leftCornerIndex = index2; //should use tempI??? - } - else if(tempMin <= leftChain->getVertex(index1)[0] || - tempMin <= uleft) - { - ret_leftCornerWhere = 2; /* on right chain*/ - ret_leftCornerIndex = tempI; - } - else - { - ret_leftCornerWhere = 0; /*on left chain*/ - ret_leftCornerIndex = index1; - } - } - } - -} - - -void findUpCorners(Real *topVertex, - vertexArray *leftChain, Int leftChainStartIndex, Int leftChainEndIndex, - vertexArray *rightChain, Int rightChainStartIndex, Int rightChainEndIndex, - Real v, - Real uleft, - Real uright, - Int& ret_leftCornerWhere, /*0: left chain, 1: topvertex, 2: rightchain*/ - Int& ret_leftCornerIndex, /*useful when ret_leftCornerWhere == 0 or 2*/ - Int& ret_rightCornerWhere, /*0: left chain, 1: topvertex, 2: rightchain*/ - Int& ret_rightCornerIndex /*useful when ret_leftCornerWhere == 0 or 2*/ - ) -{ -#ifdef MYDEBUG -printf("***********enter findUpCorners\n"); -#endif - - assert(v < topVertex[1]); - Real leftGridPoint[2]; - leftGridPoint[0] = uleft; - leftGridPoint[1] = v; - Real rightGridPoint[2]; - rightGridPoint[0] = uright; - rightGridPoint[1] = v; - - Int i; - Int index1, index2; - - index1 = leftChain->findIndexFirstAboveEqualGen(v, leftChainStartIndex, leftChainEndIndex); - - - index2 = rightChain->findIndexFirstAboveEqualGen(v, rightChainStartIndex, rightChainEndIndex); - - if(index2>= leftChainStartIndex) //index2 was found above - index2 = rightChain->skipEqualityFromStart(v, index2, rightChainEndIndex); - - if(index1= rightChainStartIndex*/ - { - ret_rightCornerWhere = 2; /*on right chain*/ - ret_rightCornerIndex = index2; - - //find the minimum u on right top, either that, or top, or right[index2] is the left corner - Real tempMin = rightChain->getVertex(index2)[0]; - Int tempI = index2; - for(i=index2-1; i>=rightChainStartIndex; i--) - if(rightChain->getVertex(i)[0] < tempMin) - { - tempMin = rightChain->getVertex(i)[0]; - tempI = i; - } - //chech whether (leftGridPoint, top) intersects rightchai, - //if yes, use right corner as left corner - //if not, use top or right[tempI] as left corner - if(DBG_intersectChain(rightChain, rightChainStartIndex, rightChainEndIndex, - leftGridPoint, topVertex)) - { - ret_leftCornerWhere = 2; //rightChain - ret_leftCornerIndex = index2; - } - else if(topVertex[0] < tempMin) - ret_leftCornerWhere = 1; /*topvertex*/ - else - { - ret_leftCornerWhere = 2; //right chain - ret_leftCornerIndex = tempI; - } - - } - else if(index2< rightChainStartIndex) /*index1>=leftChainStartIndex*/ - { - ret_leftCornerWhere = 0; /*left chain*/ - ret_leftCornerIndex = index1; - - //find the maximum u on the left top section. either that or topvertex, or left[index1] is the right corner - Real tempMax = leftChain->getVertex(index1)[0]; - Int tempI = index1; - - for(i=index1-1; i>=leftChainStartIndex; i--){ - - if(leftChain->getVertex(i)[0] > tempMax) - { - - tempMax = leftChain->getVertex(i)[0]; - tempI = i; - } - } - //check whether (rightGridPoint, top) intersects leftChain or not - //if yes, we use leftCorner as the right corner - //if not, we use either top or left[tempI] as the right corner - if(DBG_intersectChain(leftChain, leftChainStartIndex,leftChainEndIndex, - rightGridPoint, topVertex)) - { - ret_rightCornerWhere = 0; //left chan - ret_rightCornerIndex = index1; - } - else if(topVertex[0] > tempMax) - ret_rightCornerWhere = 1;//topVertex - else - { - ret_rightCornerWhere = 0;//left chain - ret_rightCornerIndex = tempI; - } - } - else /*index1>=leftChainStartIndex and index2 >=rightChainStartIndex*/ - { - if(leftChain->getVertex(index1)[1] <= rightChain->getVertex(index2)[1]) /*left point below right point*/ - { - ret_leftCornerWhere = 0; /*on left chain*/ - ret_leftCornerIndex = index1; - - Real tempMax; - Int tempI; - - tempI = index1; - tempMax = leftChain->getVertex(index1)[0]; - - /*find the maximum u for all the points on the left below the right point index2*/ - for(i=index1-1; i>= leftChainStartIndex; i--) - { - if(leftChain->getVertex(i)[1] > rightChain->getVertex(index2)[1]) - break; - - if(leftChain->getVertex(i)[0]>tempMax) - { - tempI = i; - tempMax = leftChain->getVertex(i)[0]; - } - } - //chek whether (rightChain(index2), rightGridPoint) intersects leftchian or not - if(DBG_intersectChain(leftChain, leftChainStartIndex, leftChainEndIndex, rightGridPoint, rightChain->getVertex(index2))) - { - ret_rightCornerWhere = 0; - ret_rightCornerIndex = index1; - } - else if(tempMax >= rightChain->getVertex(index2)[0] || - tempMax >= uright) - { - ret_rightCornerWhere = 0; /*on left Chain*/ - ret_rightCornerIndex = tempI; - } - else - { - ret_rightCornerWhere = 2; /*on right chain*/ - ret_rightCornerIndex = index2; - } - } - else /*left above right*/ - { - ret_rightCornerWhere = 2; /*on the right*/ - ret_rightCornerIndex = index2; - - Real tempMin; - Int tempI; - - tempI = index2; - tempMin = rightChain->getVertex(index2)[0]; - - /*find the minimum u for all the points on the right below the left poitn index1*/ - for(i=index2-1; i>= rightChainStartIndex; i--) - { - if( rightChain->getVertex(i)[1] > leftChain->getVertex(index1)[1]) - break; - if(rightChain->getVertex(i)[0] < tempMin) - { - tempI = i; - tempMin = rightChain->getVertex(i)[0]; - } - } - //check whether (leftGRidPoint,left(index1)) interesect right chain - if(DBG_intersectChain(rightChain, rightChainStartIndex, rightChainEndIndex, - leftGridPoint, leftChain->getVertex(index1))) - { - ret_leftCornerWhere = 2; //right - ret_leftCornerIndex = index2; - } - else if(tempMin <= leftChain->getVertex(index1)[0] || - tempMin <= uleft) - { - ret_leftCornerWhere = 2; /* on right chain*/ - ret_leftCornerIndex = tempI; - } - else - { - ret_leftCornerWhere = 0; /*on left chain*/ - ret_leftCornerIndex = index1; - } - } - } -#ifdef MYDEBUG -printf("***********leave findUpCorners\n"); -#endif -} - -//return 1 if neck exists, 0 othewise -Int findNeckF(vertexArray *leftChain, Int botLeftIndex, - vertexArray *rightChain, Int botRightIndex, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridStartIndex, - Int& neckLeft, - Int& neckRight) -{ -/* -printf("enter findNeckF, botleft, botright=%i,%i,gstartindex=%i\n",botLeftIndex,botRightIndex,gridStartIndex); -printf("leftChain is\n"); -leftChain->print(); -printf("rightChain is\n"); -rightChain->print(); -*/ - - Int lowerGridIndex; //the grid below leftChain and rightChian vertices - Int i; - Int n_vlines = leftGridChain->get_nVlines(); - Real v; - if(botLeftIndex >= leftChain->getNumElements() || - botRightIndex >= rightChain->getNumElements()) - return 0; //no neck exists - - v=min(leftChain->getVertex(botLeftIndex)[1], rightChain->getVertex(botRightIndex)[1]); - - - - - for(i=gridStartIndex; iget_v_value(i) <= v && - leftGridChain->getUlineIndex(i)<= rightGridChain->getUlineIndex(i)) - break; - - lowerGridIndex = i; - - if(lowerGridIndex == n_vlines) //the two trm vertex are higher than all gridlines - return 0; - else - { - Int botLeft2, botRight2; -/* -printf("leftGridChain->get_v_)value=%f\n",leftGridChain->get_v_value(lowerGridIndex), botLeftIndex); -printf("leftChain->get_vertex(0)=(%f,%f)\n", leftChain->getVertex(0)[0],leftChain->getVertex(0)[1]); -printf("leftChain->get_vertex(1)=(%f,%f)\n", leftChain->getVertex(1)[0],leftChain->getVertex(1)[1]); -printf("leftChain->get_vertex(2)=(%f,%f)\n", leftChain->getVertex(2)[0],leftChain->getVertex(2)[1]); -*/ - botLeft2 = leftChain->findIndexFirstAboveEqualGen(leftGridChain->get_v_value(lowerGridIndex), botLeftIndex, leftChain->getNumElements()-1) -1 ; - -/* -printf("botLeft2=%i\n", botLeft2); -printf("leftChain->getNumElements=%i\n", leftChain->getNumElements()); -*/ - - botRight2 = rightChain->findIndexFirstAboveEqualGen(leftGridChain->get_v_value(lowerGridIndex), botRightIndex, rightChain->getNumElements()-1) -1; - if(botRight2 < botRightIndex) botRight2=botRightIndex; - - if(botLeft2 < botLeftIndex) botLeft2 = botLeftIndex; - - assert(botLeft2 >= botLeftIndex); - assert(botRight2 >= botRightIndex); - //find nectLeft so that it is th erightmost vertex on letChain - - Int tempI = botLeftIndex; - Real temp = leftChain->getVertex(tempI)[0]; - for(i=botLeftIndex+1; i<= botLeft2; i++) - if(leftChain->getVertex(i)[0] > temp) - { - temp = leftChain->getVertex(i)[0]; - tempI = i; - } - neckLeft = tempI; - - tempI = botRightIndex; - temp = rightChain->getVertex(tempI)[0]; - for(i=botRightIndex+1; i<= botRight2; i++) - if(rightChain->getVertex(i)[0] < temp) - { - temp = rightChain->getVertex(i)[0]; - tempI = i; - } - neckRight = tempI; - return 1; - } -} - - - -/*find i>=botLeftIndex,j>=botRightIndex so that - *(leftChain[i], rightChain[j]) is a neck. - */ -void findNeck(vertexArray *leftChain, Int botLeftIndex, - vertexArray *rightChain, Int botRightIndex, - Int& leftLastIndex, /*left point of the neck*/ - Int& rightLastIndex /*right point of the neck*/ - ) -{ - assert(botLeftIndex < leftChain->getNumElements() && - botRightIndex < rightChain->getNumElements()); - - /*now the neck exists for sure*/ - - if(leftChain->getVertex(botLeftIndex)[1] <= rightChain->getVertex(botRightIndex)[1]) //left below right - { - - leftLastIndex = botLeftIndex; - - /*find i so that rightChain[i][1] >= leftchainbotverte[1], and i+1< - */ - rightLastIndex=rightChain->findIndexAboveGen(leftChain->getVertex(botLeftIndex)[1], botRightIndex+1, rightChain->getNumElements()-1); - } - else //left above right - { - - rightLastIndex = botRightIndex; - - leftLastIndex = leftChain->findIndexAboveGen(rightChain->getVertex(botRightIndex)[1], - botLeftIndex+1, - leftChain->getNumElements()-1); - } -} - - - -void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid, Int* ret_indices, Int* ret_innerIndices) -{ - - Int i,k,isHoriz = 0; - Int n_ulines = grid->get_n_ulines(); - Real uMin = grid->get_u_min(); - Real uMax = grid->get_u_max(); - /* - Real vMin = grid->get_v_min(); - Real vMax = grid->get_v_max(); - */ - Real slop = 0.0, uinterc; - -#ifdef SHORTEN_GRID_LINE - //uintercBuf stores all the interction u value for each grid line - //notice that lastGridIndex<= firstGridIndex - Real *uintercBuf = (Real *) malloc (sizeof(Real) * (firstGridIndex-lastGridIndex+1)); - assert(uintercBuf); -#endif - - /*initialization to make vtail bigger than grid->...*/ - directedLine* dLine = topEdge; - Real vtail = grid->get_v_value(firstGridIndex) + 1.0; - Real tempMaxU = grid->get_u_min(); - - - /*for each grid line*/ - for(k=0, i=firstGridIndex; i>=lastGridIndex; i--, k++) - { - - Real grid_v_value = grid->get_v_value(i); - - /*check whether this grid line is below the current trim edge.*/ - if(vtail > grid_v_value) - { - /*since the grid line is below the trim edge, we - *find the trim edge which will contain the trim line - */ - while( (vtail=dLine->tail()[1]) > grid_v_value){ - - tempMaxU = max(tempMaxU, dLine->tail()[0]); - dLine = dLine -> getNext(); - } - - if( fabs(dLine->head()[1] - vtail) < ZERO) - isHoriz = 1; - else - { - isHoriz = 0; - slop = (dLine->head()[0] - dLine->tail()[0]) / (dLine->head()[1]-vtail); - } - } - - if(isHoriz) - { - uinterc = max(dLine->head()[0], dLine->tail()[0]); - } - else - { - uinterc = slop * (grid_v_value - vtail) + dLine->tail()[0]; - } - - tempMaxU = max(tempMaxU, uinterc); - - if(uinterc < uMin && uinterc >= uMin - ZERO) - uinterc = uMin; - if(uinterc > uMax && uinterc <= uMax + ZERO) - uinterc = uMax; - -#ifdef SHORTEN_GRID_LINE - uintercBuf[k] = uinterc; -#endif - - assert(uinterc >= uMin && uinterc <= uMax); - if(uinterc == uMax) - ret_indices[k] = n_ulines-1; - else - ret_indices[k] = (Int)(((uinterc-uMin)/(uMax - uMin)) * (n_ulines-1)) + 1; - if(ret_indices[k] >= n_ulines) - ret_indices[k] = n_ulines-1; - - - ret_innerIndices[k] = (Int)(((tempMaxU-uMin)/(uMax - uMin)) * (n_ulines-1)) + 1; - - /*reinitialize tempMaxU for next grdiLine*/ - tempMaxU = uinterc; - } -#ifdef SHORTEN_GRID_LINE - //for each grid line, compare the left grid point with the - //intersection point. If the two points are too close, then - //we should move the grid point one grid to the right - //and accordingly we should update the inner index. - for(k=0, i=firstGridIndex; i>=lastGridIndex; i--, k++) - { - //check gridLine i - //check ret_indices[k] - Real a = grid->get_u_value(ret_indices[k]-1); - Real b = grid->get_u_value(ret_indices[k]); - assert(uintercBuf[k] >= a && uintercBuf < b); - if( (b-uintercBuf[k]) <= 0.2 * (b-a)) //interc is very close to b - { - ret_indices[k]++; - } - - //check ret_innerIndices[k] - if(k>0) - { - if(ret_innerIndices[k] < ret_indices[k-1]) - ret_innerIndices[k] = ret_indices[k-1]; - if(ret_innerIndices[k] < ret_indices[k]) - ret_innerIndices[k] = ret_indices[k]; - } - } - //clean up - free(uintercBuf); -#endif -} - -void findRightGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid, Int* ret_indices, Int* ret_innerIndices) -{ - - Int i,k; - Int n_ulines = grid->get_n_ulines(); - Real uMin = grid->get_u_min(); - Real uMax = grid->get_u_max(); - /* - Real vMin = grid->get_v_min(); - Real vMax = grid->get_v_max(); - */ - Real slop = 0.0, uinterc; - -#ifdef SHORTEN_GRID_LINE - //uintercBuf stores all the interction u value for each grid line - //notice that firstGridIndex >= lastGridIndex - Real *uintercBuf = (Real *) malloc (sizeof(Real) * (firstGridIndex-lastGridIndex+1)); - assert(uintercBuf); -#endif - - /*initialization to make vhead bigger than grid->v_value...*/ - directedLine* dLine = topEdge->getPrev(); - Real vhead = dLine->tail()[1]; - Real tempMinU = grid->get_u_max(); - - /*for each grid line*/ - for(k=0, i=firstGridIndex; i>=lastGridIndex; i--, k++) - { - - Real grid_v_value = grid->get_v_value(i); - - - /*check whether this grid line is below the current trim edge.*/ - if(vhead >= grid_v_value) - { - /*since the grid line is below the tail of the trim edge, we - *find the trim edge which will contain the trim line - */ - while( (vhead=dLine->head()[1]) > grid_v_value){ - tempMinU = min(tempMinU, dLine->head()[0]); - dLine = dLine -> getPrev(); - } - - /*skip the equality in the case of degenerat case: horizontal */ - while(dLine->head()[1] == grid_v_value) - dLine = dLine->getPrev(); - - assert( dLine->tail()[1] != dLine->head()[1]); - slop = (dLine->tail()[0] - dLine->head()[0]) / (dLine->tail()[1]-dLine->head()[1]); - /* - if(dLine->tail()[1] == vhead) - isHoriz = 1; - else - { - isHoriz = 0; - slop = (dLine->tail()[0] - dLine->head()[0]) / (dLine->tail()[1]-vhead); - } - */ - } - uinterc = slop * (grid_v_value - dLine->head()[1]) + dLine->head()[0]; - - //in case unterc is outside of the grid due to floating point - if(uinterc < uMin) - uinterc = uMin; - else if(uinterc > uMax) - uinterc = uMax; - -#ifdef SHORTEN_GRID_LINE - uintercBuf[k] = uinterc; -#endif - - tempMinU = min(tempMinU, uinterc); - - assert(uinterc >= uMin && uinterc <= uMax); - - if(uinterc == uMin) - ret_indices[k] = 0; - else - ret_indices[k] = (int)ceil((((uinterc-uMin)/(uMax - uMin)) * (n_ulines-1))) -1; -/* -if(ret_indices[k] >= grid->get_n_ulines()) - { - printf("ERROR3\n"); - exit(0); -} -if(ret_indices[k] < 0) - { - printf("ERROR4\n"); - exit(0); -} -*/ - ret_innerIndices[k] = (int)ceil ((((tempMinU-uMin)/(uMax - uMin)) * (n_ulines-1))) -1; - - tempMinU = uinterc; - } -#ifdef SHORTEN_GRID_LINE - //for each grid line, compare the left grid point with the - //intersection point. If the two points are too close, then - //we should move the grid point one grid to the right - //and accordingly we should update the inner index. - for(k=0, i=firstGridIndex; i>=lastGridIndex; i--, k++) - { - //check gridLine i - //check ret_indices[k] - Real a = grid->get_u_value(ret_indices[k]); - Real b = grid->get_u_value(ret_indices[k]+1); - assert(uintercBuf[k] > a && uintercBuf <= b); - if( (uintercBuf[k]-a) <= 0.2 * (b-a)) //interc is very close to a - { - ret_indices[k]--; - } - - //check ret_innerIndices[k] - if(k>0) - { - if(ret_innerIndices[k] > ret_indices[k-1]) - ret_innerIndices[k] = ret_indices[k-1]; - if(ret_innerIndices[k] > ret_indices[k]) - ret_innerIndices[k] = ret_indices[k]; - } - } - //clean up - free(uintercBuf); -#endif -} - - -void sampleMonoPoly(directedLine* polygon, gridWrap* grid, Int ulinear, Int vlinear, primStream* pStream, rectBlockArray* rbArray) -{ -/* -{ -grid->print(); -polygon->writeAllPolygons("zloutputFile"); -exit(0); -} -*/ - -if(grid->get_n_ulines() == 2 || - grid->get_n_vlines() == 2) -{ - if(ulinear && grid->get_n_ulines() == 2) - { - monoTriangulationFun(polygon, compV2InY, pStream); - return; - } - else if(DBG_isConvex(polygon) && polygon->numEdges() >=4) - { - triangulateConvexPoly(polygon, ulinear, vlinear, pStream); - return; - } - else if(vlinear || DBG_is_U_direction(polygon)) - { - Int n_cusps;//num interior cusps - Int n_edges = polygon->numEdges(); - directedLine** cusps = (directedLine**) malloc(sizeof(directedLine*) * n_edges); - assert(cusps); - findInteriorCuspsX(polygon, n_cusps, cusps); - - if(n_cusps == 0) //u_monotone - { - - monoTriangulationFun(polygon, compV2InX, pStream); - - free(cusps); - return; - } - else if(n_cusps == 1) //one interior cusp - { - - directedLine* new_polygon = polygonConvert(cusps[0]); - - directedLine* other = findDiagonal_singleCuspX( new_polygon); - - - - // should NOT be null unless there are self-intersecting - //trim curves. In that case, we don't want to core dump, instead, - //we triangulate anyway, and print out error message. - if(other == NULL) - { - monoTriangulationFun(polygon, compV2InX, pStream); - free(cusps); - return; - } - - directedLine* ret_p1; - directedLine* ret_p2; - - new_polygon->connectDiagonal_2slines(new_polygon, other, - &ret_p1, - &ret_p2, - new_polygon); - - monoTriangulationFun(ret_p1, compV2InX, pStream); - monoTriangulationFun(ret_p2, compV2InX, pStream); - - ret_p1->deleteSinglePolygonWithSline(); - ret_p2->deleteSinglePolygonWithSline(); - - free(cusps); - return; - } - free(cusps); - } -} - - /*find the top and bottom of the polygon. It is supposed to be - *a V-monotone polygon - */ - - directedLine* tempV; - directedLine* topV; - directedLine* botV; - topV = botV = polygon; - - for(tempV = polygon->getNext(); tempV != polygon; tempV = tempV->getNext()) - { - if(compV2InY(topV->head(), tempV->head())<0) { - - topV = tempV; - } - if(compV2InY(botV->head(), tempV->head())>0) { - - botV = tempV; - } - } - - /*find the first(top) and the last (bottom) grid line which intersect the - *this polygon - */ - Int firstGridIndex; /*the index in the grid*/ - Int lastGridIndex; - firstGridIndex = (Int) ((topV->head()[1] - grid->get_v_min()) / (grid->get_v_max() - grid->get_v_min()) * (grid->get_n_vlines()-1)); - lastGridIndex = (Int) ((botV->head()[1] - grid->get_v_min()) / (grid->get_v_max() - grid->get_v_min()) * (grid->get_n_vlines()-1)) + 1; - - - /*find the interval inside the polygon for each gridline*/ - Int *leftGridIndices = (Int*) malloc(sizeof(Int) * (firstGridIndex - lastGridIndex +1)); - assert(leftGridIndices); - Int *rightGridIndices = (Int*) malloc(sizeof(Int) * (firstGridIndex - lastGridIndex +1)); - assert(rightGridIndices); - Int *leftGridInnerIndices = (Int*) malloc(sizeof(Int) * (firstGridIndex - lastGridIndex +1)); - assert(leftGridInnerIndices); - Int *rightGridInnerIndices = (Int*) malloc(sizeof(Int) * (firstGridIndex - lastGridIndex +1)); - assert(rightGridInnerIndices); - - findLeftGridIndices(topV, firstGridIndex, lastGridIndex, grid, leftGridIndices, leftGridInnerIndices); - - findRightGridIndices(topV, firstGridIndex, lastGridIndex, grid, rightGridIndices, rightGridInnerIndices); - - gridBoundaryChain leftGridChain(grid, firstGridIndex, firstGridIndex-lastGridIndex+1, leftGridIndices, leftGridInnerIndices); - - gridBoundaryChain rightGridChain(grid, firstGridIndex, firstGridIndex-lastGridIndex+1, rightGridIndices, rightGridInnerIndices); - - - -// leftGridChain.draw(); -// leftGridChain.drawInner(); -// rightGridChain.draw(); -// rightGridChain.drawInner(); - /*(1) determine the grid boundaries (left and right). - *(2) process polygon into two monotone chaines: use vertexArray - *(3) call sampleMonoPolyRec - */ - - /*copy the two chains into vertexArray datastructure*/ - Int i; - vertexArray leftChain(20); /*this is a dynamic array*/ - for(i=1; i<=topV->get_npoints()-2; i++) { /*the first vertex is the top vertex which doesn't belong to inc_chain*/ - leftChain.appendVertex(topV->getVertex(i)); - } - for(tempV = topV->getNext(); tempV != botV; tempV = tempV->getNext()) - { - for(i=0; i<=tempV->get_npoints()-2; i++){ - leftChain.appendVertex(tempV->getVertex(i)); - } - } - - vertexArray rightChain(20); - for(tempV = topV->getPrev(); tempV != botV; tempV = tempV->getPrev()) - { - for(i=tempV->get_npoints()-2; i>=0; i--){ - rightChain.appendVertex(tempV->getVertex(i)); - } - } - for(i=botV->get_npoints()-2; i>=1; i--){ - rightChain.appendVertex(tempV->getVertex(i)); - } - - sampleMonoPolyRec(topV->head(), - botV->head(), - &leftChain, - 0, - &rightChain, - 0, - &leftGridChain, - &rightGridChain, - 0, - pStream, - rbArray); - - - /*cleanup space*/ - free(leftGridIndices); - free(rightGridIndices); - free(leftGridInnerIndices); - free(rightGridInnerIndices); -} - -void sampleMonoPolyRec( - Real* topVertex, - Real* botVertex, - vertexArray* leftChain, - Int leftStartIndex, - vertexArray* rightChain, - Int rightStartIndex, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridStartIndex, - primStream* pStream, - rectBlockArray* rbArray) -{ - - /*find the first connected component, and the four corners. - */ - Int index1, index2; /*the first and last grid line of the first connected component*/ - - if(topVertex[1] <= botVertex[1]) - return; - - /*find i so that the grid line is below the top vertex*/ - Int i=gridStartIndex; - while (i < leftGridChain->get_nVlines()) - { - if(leftGridChain->get_v_value(i) < topVertex[1]) - break; - i++; - } - - /*find the first connected component starting with i*/ - /*find index1 so that left_uline_index <= right_uline_index, that is, this - *grid line contains at least one inner grid point - */ - index1=i; - int num_skipped_grid_lines=0; - while(index1 < leftGridChain->get_nVlines()) - { - if(leftGridChain->getUlineIndex(index1) <= rightGridChain->getUlineIndex(index1)) - break; - num_skipped_grid_lines++; - index1++; - } - - - - if(index1 >= leftGridChain->get_nVlines()) /*no grid line exists which has inner point*/ - { - /*stop recursion, ...*/ - /*monotone triangulate it...*/ -// printf("no grid line exists\n"); -/* - monoTriangulationRecOpt(topVertex, botVertex, leftChain, leftStartIndex, - rightChain, rightStartIndex, pStream); -*/ - -if(num_skipped_grid_lines <2) - { - monoTriangulationRecGenOpt(topVertex, botVertex, leftChain, leftStartIndex, - leftChain->getNumElements()-1, - rightChain, rightStartIndex, - rightChain->getNumElements()-1, - pStream); - } -else - { - //the optimum way to triangulate is top-down since this polygon - //is narrow-long. - monoTriangulationRec(topVertex, botVertex, leftChain, leftStartIndex, - rightChain, rightStartIndex, pStream); - } - -/* - monoTriangulationRec(topVertex, botVertex, leftChain, leftStartIndex, - rightChain, rightStartIndex, pStream); -*/ - -/* monoTriangulationRecGenTBOpt(topVertex, botVertex, - leftChain, leftStartIndex, leftChain->getNumElements()-1, - rightChain, rightStartIndex, rightChain->getNumElements()-1, - pStream);*/ - - - - } - else - { - - /*find index2 so that left_inner_index <= right_inner_index holds until index2*/ - index2=index1+1; - if(index2 < leftGridChain->get_nVlines()) - while(leftGridChain->getInnerIndex(index2) <= rightGridChain->getInnerIndex(index2)) - { - index2++; - if(index2 >= leftGridChain->get_nVlines()) - break; - } - - index2--; - - - - /*the neck*/ - Int neckLeftIndex; - Int neckRightIndex; - - /*the four corners*/ - Int up_leftCornerWhere; - Int up_leftCornerIndex; - Int up_rightCornerWhere; - Int up_rightCornerIndex; - Int down_leftCornerWhere; - Int down_leftCornerIndex; - Int down_rightCornerWhere; - Int down_rightCornerIndex; - - Real* tempBotVertex; /*the bottom vertex for this component*/ - Real* nextTopVertex=NULL; /*for the recursion*/ - Int nextLeftStartIndex=0; - Int nextRightStartIndex=0; - - /*find the points below the grid line index2 on both chains*/ - Int botLeftIndex = leftChain->findIndexStrictBelowGen( - leftGridChain->get_v_value(index2), - leftStartIndex, - leftChain->getNumElements()-1); - Int botRightIndex = rightChain->findIndexStrictBelowGen( - rightGridChain->get_v_value(index2), - rightStartIndex, - rightChain->getNumElements()-1); - /*if either botLeftIndex>= numelements, - * or botRightIndex >= numelemnet, - *then there is no neck exists. the bottom vertex is botVertex, - */ - if(! findNeckF(leftChain, botLeftIndex, rightChain, botRightIndex, - leftGridChain, rightGridChain, index2, neckLeftIndex, neckRightIndex)) - /* - if(botLeftIndex == leftChain->getNumElements() || - botRightIndex == rightChain->getNumElements()) - */ - { -#ifdef MYDEBUG - printf("neck NOT exists, botRightIndex=%i\n", botRightIndex); -#endif - - tempBotVertex = botVertex; - nextTopVertex = botVertex; - botLeftIndex = leftChain->getNumElements()-1; - botRightIndex = rightChain->getNumElements()-1; - } - else /*neck exists*/ - { -#ifdef MYDEBUG - printf("neck exists\n"); -#endif - - /* - findNeck(leftChain, botLeftIndex, - rightChain, botRightIndex, - neckLeftIndex, - neckRightIndex); - */ -#ifdef MYDEBUG -printf("neck is found, neckLeftIndex=%i, neckRightIndex=%i\n", neckLeftIndex, neckRightIndex); -glBegin(GL_LINES); -glVertex2fv(leftChain->getVertex(neckLeftIndex)); -glVertex2fv(rightChain->getVertex(neckRightIndex)); -glEnd(); -#endif - - if(leftChain->getVertex(neckLeftIndex)[1] <= rightChain->getVertex(neckRightIndex)[1]) - { - tempBotVertex = leftChain->getVertex(neckLeftIndex); - botLeftIndex = neckLeftIndex-1; - botRightIndex = neckRightIndex; - nextTopVertex = rightChain->getVertex(neckRightIndex); - nextLeftStartIndex = neckLeftIndex; - nextRightStartIndex = neckRightIndex+1; - } - else - { - tempBotVertex = rightChain->getVertex(neckRightIndex); - botLeftIndex = neckLeftIndex; - botRightIndex = neckRightIndex-1; - nextTopVertex = leftChain->getVertex(neckLeftIndex); - nextLeftStartIndex = neckLeftIndex+1; - nextRightStartIndex = neckRightIndex; - } - } - - findUpCorners(topVertex, - leftChain, - leftStartIndex, botLeftIndex, - rightChain, - rightStartIndex, botRightIndex, - leftGridChain->get_v_value(index1), - leftGridChain->get_u_value(index1), - rightGridChain->get_u_value(index1), - up_leftCornerWhere, - up_leftCornerIndex, - up_rightCornerWhere, - up_rightCornerIndex); - - findDownCorners(tempBotVertex, - leftChain, - leftStartIndex, botLeftIndex, - rightChain, - rightStartIndex, botRightIndex, - leftGridChain->get_v_value(index2), - leftGridChain->get_u_value(index2), - rightGridChain->get_u_value(index2), - down_leftCornerWhere, - down_leftCornerIndex, - down_rightCornerWhere, - down_rightCornerIndex); -#ifdef MYDEBUG - printf("find corners done, down_leftwhere=%i, down_righwhere=%i,\n",down_leftCornerWhere, down_rightCornerWhere ); - printf("find corners done, up_leftwhere=%i, up_righwhere=%i,\n",up_leftCornerWhere, up_rightCornerWhere ); - printf("find corners done, up_leftindex=%i, up_righindex=%i,\n",up_leftCornerIndex, up_rightCornerIndex ); - printf("find corners done, down_leftindex=%i, down_righindex=%i,\n",down_leftCornerIndex, down_rightCornerIndex ); -#endif - -/* - drawCorners(topVertex, - tempBotVertex, - leftChain, - rightChain, - leftGridChain, - rightGridChain, - index1, - index2, - up_leftCornerWhere, - up_leftCornerIndex, - up_rightCornerWhere, - up_rightCornerIndex, - down_leftCornerWhere, - down_leftCornerIndex, - down_rightCornerWhere, - down_rightCornerIndex); -*/ - - - sampleConnectedComp(topVertex, tempBotVertex, - leftChain, - leftStartIndex, botLeftIndex, - rightChain, - rightStartIndex, botRightIndex, - leftGridChain, - rightGridChain, - index1, index2, - up_leftCornerWhere, - up_leftCornerIndex, - up_rightCornerWhere, - up_rightCornerIndex, - down_leftCornerWhere, - down_leftCornerIndex, - down_rightCornerWhere, - down_rightCornerIndex, - pStream, - rbArray - ); - - /*recursion*/ - - sampleMonoPolyRec( - nextTopVertex, - botVertex, - leftChain, - nextLeftStartIndex, - rightChain, - nextRightStartIndex, - leftGridChain, - rightGridChain, - index2+1, - pStream, rbArray); - - - } - -} - -void sampleLeftStrip(vertexArray* leftChain, - Int topLeftIndex, - Int botLeftIndex, - gridBoundaryChain* leftGridChain, - Int leftGridChainStartIndex, - Int leftGridChainEndIndex, - primStream* pStream - ) -{ - assert(leftChain->getVertex(topLeftIndex)[1] > leftGridChain->get_v_value(leftGridChainStartIndex)); - assert(leftChain->getVertex(topLeftIndex+1)[1] <= leftGridChain->get_v_value(leftGridChainStartIndex)); - assert(leftChain->getVertex(botLeftIndex)[1] <= leftGridChain->get_v_value(leftGridChainEndIndex)); - assert(leftChain->getVertex(botLeftIndex-1)[1] > leftGridChain->get_v_value(leftGridChainEndIndex)); - - /* - *(1)find the last grid line which doesn'; pass below - * this first edge, sample this region: one trim edge and - * possily multiple grid lines. - */ - Real *upperVert, *lowerVert; /*the end points of the first trim edge*/ - upperVert = leftChain->getVertex(topLeftIndex); - lowerVert = leftChain->getVertex(topLeftIndex+1); - - Int index = leftGridChainStartIndex; - while(leftGridChain->get_v_value(index) >= lowerVert[1]){ - index++; - if(index > leftGridChainEndIndex) - break; - } - index--; - - sampleLeftSingleTrimEdgeRegion(upperVert, lowerVert, - leftGridChain, - leftGridChainStartIndex, - index, - pStream); - sampleLeftStripRec(leftChain, topLeftIndex+1, botLeftIndex, - leftGridChain, index, leftGridChainEndIndex, - pStream); - -} - -void sampleLeftStripRec(vertexArray* leftChain, - Int topLeftIndex, - Int botLeftIndex, - gridBoundaryChain* leftGridChain, - Int leftGridChainStartIndex, - Int leftGridChainEndIndex, - primStream* pStream - ) -{ - /*now top left trim vertex is below the top grid line. - */ - /*stop condition: if topLeftIndex >= botLeftIndex, then stop. - */ - if(topLeftIndex >= botLeftIndex) - return; - - /*find the last trim vertex which is above the second top grid line: - * index1. - *and sampleLeftOneGridStep(leftchain, topLeftIndex, index1, leftGridChain, - * leftGridChainStartIndex). - * index1 could be equal to topLeftIndex. - */ - Real secondGridChainV = leftGridChain->get_v_value(leftGridChainStartIndex+1); - assert(leftGridChainStartIndex < leftGridChainEndIndex); - Int index1 = topLeftIndex; - while(leftChain->getVertex(index1)[1] > secondGridChainV) - index1++; - index1--; - - sampleLeftOneGridStep(leftChain, topLeftIndex, index1, leftGridChain, leftGridChainStartIndex, pStream); - - - /* - * Let the next trim vertex be nextTrimVertIndex (which should be - * below the second grid line). - * Find the last grid line index2 which is above nextTrimVert. - * sampleLeftSingleTrimEdgeRegion(uppervert[2], lowervert[2], - * leftGridChain, leftGridChainStartIndex+1, index2). - */ - Real *uppervert, *lowervert; - uppervert = leftChain->getVertex(index1); - lowervert = leftChain->getVertex(index1+1); - Int index2 = leftGridChainStartIndex+1; - - while(leftGridChain->get_v_value(index2) >= lowervert[1]) - { - index2++; - if(index2 > leftGridChainEndIndex) - break; - } - index2--; - sampleLeftSingleTrimEdgeRegion(uppervert, lowervert, leftGridChain, leftGridChainStartIndex+1, index2, pStream); - - /* sampleLeftStripRec(leftChain, - nextTrimVertIndex, - botLeftIndex, - leftGridChain, - index2, - leftGridChainEndIndex - ) - * - */ - sampleLeftStripRec(leftChain, index1+1, botLeftIndex, leftGridChain, index2, leftGridChainEndIndex, pStream); - -} - - -/***************begin RecF***********************/ -/* the gridlines from leftGridChainStartIndex to - * leftGridChainEndIndex are assumed to form a - * connected component. - * the trim vertex of topLeftIndex is assumed to - * be below the first gridline, and the tim vertex - * of botLeftIndex is assumed to be above the last - * grid line. - * If botLeftIndex < topLeftIndex, then no connected componeent exists, and this funcion returns without - * outputing any triangles. - * Otherwise botLeftIndex >= topLeftIndex, there is at least one triangle to output. - */ -void sampleLeftStripRecF(vertexArray* leftChain, - Int topLeftIndex, - Int botLeftIndex, - gridBoundaryChain* leftGridChain, - Int leftGridChainStartIndex, - Int leftGridChainEndIndex, - primStream* pStream - ) -{ - /*now top left trim vertex is below the top grid line. - */ - /*stop condition: if topLeftIndex > botLeftIndex, then stop. - */ - if(topLeftIndex > botLeftIndex) - return; - - /*if there is only one grid Line, return.*/ - - if(leftGridChainStartIndex>=leftGridChainEndIndex) - return; - - - assert(leftChain->getVertex(topLeftIndex)[1] <= leftGridChain->get_v_value(leftGridChainStartIndex) && - leftChain->getVertex(botLeftIndex)[1] >= leftGridChain->get_v_value(leftGridChainEndIndex)); - - /*firs find the first trim vertex which is below or equal to the second top grid line: - * index1. - */ - Real secondGridChainV = leftGridChain->get_v_value(leftGridChainStartIndex+1); - - - Int index1 = topLeftIndex; - - while(leftChain->getVertex(index1)[1] > secondGridChainV){ - index1++; - if(index1>botLeftIndex) - break; - } - - /*now leftChain->getVertex(index-1)[1] > secondGridChainV and - * leftChain->getVertex(index)[1] <= secondGridChainV - *If equality holds, then we should include the vertex index1, otherwise we include only index1-1, to - *perform sampleOneGridStep. - */ - if(index1>botLeftIndex) - index1--; - else if(leftChain->getVertex(index1)[1] < secondGridChainV) - index1--; - - /*now we have leftChain->getVertex(index1)[1] >= secondGridChainV, and - * leftChain->getVertex(index1+1)[1] <= secondGridChainV - */ - - - sampleLeftOneGridStep(leftChain, topLeftIndex, index1, leftGridChain, leftGridChainStartIndex, pStream); - - - /*if leftChain->getVertex(index1)[1] == secondGridChainV, then we can recursively do the rest. - */ - if(leftChain->getVertex(index1)[1] == secondGridChainV) - { - - sampleLeftStripRecF(leftChain, index1, botLeftIndex,leftGridChain, leftGridChainStartIndex+1, leftGridChainEndIndex, pStream); - } - else if(index1 < botLeftIndex) - { - - /* Otherwise, we have leftChain->getVertex(index1)[1] > secondGridChainV, - * let the next trim vertex be nextTrimVertIndex (which should be strictly - * below the second grid line). - * Find the last grid line index2 which is above nextTrimVert. - * sampleLeftSingleTrimEdgeRegion(uppervert[2], lowervert[2], - * leftGridChain, leftGridChainStartIndex+1, index2). - */ - Real *uppervert, *lowervert; - uppervert = leftChain->getVertex(index1); - lowervert = leftChain->getVertex(index1+1); //okay since index1get_v_value(index2) >= lowervert[1]) - { - index2++; - if(index2 > leftGridChainEndIndex) - break; - } - index2--; - - - sampleLeftSingleTrimEdgeRegion(uppervert, lowervert, leftGridChain, leftGridChainStartIndex+1, index2, pStream); - - /*recursion*/ - - sampleLeftStripRecF(leftChain, index1+1, botLeftIndex, leftGridChain, index2, leftGridChainEndIndex, pStream); - } - -} - -/***************End RecF***********************/ - -/*sample the left area in between one trim edge and multiple grid lines. - * all the grid lines should be in between the two end poins of the - *trim edge. - */ -void sampleLeftSingleTrimEdgeRegion(Real upperVert[2], Real lowerVert[2], - gridBoundaryChain* gridChain, - Int beginIndex, - Int endIndex, - primStream* pStream) -{ - Int i,j,k; - - vertexArray vArray(endIndex-beginIndex+1); - vArray.appendVertex(gridChain->get_vertex(beginIndex)); - - for(k=1, i=beginIndex+1; i<=endIndex; i++, k++) - { - vArray.appendVertex(gridChain->get_vertex(i)); - - /*output the fan of the grid points of the (i)th and (i-1)th grid line. - */ - if(gridChain->getUlineIndex(i) < gridChain->getUlineIndex(i-1)) - { - pStream->begin(); - pStream->insert(gridChain->get_vertex(i-1)); - for(j=gridChain->getUlineIndex(i); j<= gridChain->getUlineIndex(i-1); j++) - pStream->insert(gridChain->getGrid()->get_u_value(j), gridChain->get_v_value(i)); - pStream->end(PRIMITIVE_STREAM_FAN); - } - else if(gridChain->getUlineIndex(i) > gridChain->getUlineIndex(i-1)) - { - pStream->begin(); - pStream->insert(gridChain->get_vertex(i)); - for(j=gridChain->getUlineIndex(i); j>= gridChain->getUlineIndex(i-1); j--) - pStream->insert(gridChain->getGrid()->get_u_value(j), gridChain->get_v_value(i-1)); - pStream->end(PRIMITIVE_STREAM_FAN); - } - /*otherwisem, the two are equal, so there is no fan to outout*/ - } - - monoTriangulation2(upperVert, lowerVert, &vArray, 0, endIndex-beginIndex, - 0, /*decreasing chain*/ - pStream); -} - -/*return i, such that from begin to i-1 the chain is strictly u-monotone. - */ -Int findIncreaseChainFromBegin(vertexArray* chain, Int begin ,Int end) -{ - Int i=begin; - Real prevU = chain->getVertex(i)[0]; - Real thisU; - for(i=begin+1; i<=end; i++){ - thisU = chain->getVertex(i)[0]; - - if(prevU < thisU){ - prevU = thisU; - } - else - break; - } - return i; -} - -/*check whether there is a vertex whose v value is strictly - *inbetween vup vbelow - *if no middle exists return -1, else return the idnex. - */ -Int checkMiddle(vertexArray* chain, Int begin, Int end, - Real vup, Real vbelow) -{ - Int i; - for(i=begin; i<=end; i++) - { - if(chain->getVertex(i)[1] < vup && chain->getVertex(i)[1]>vbelow) - return i; - } - return -1; -} - -/*the degenerat case of sampleLeftOneGridStep*/ -void sampleLeftOneGridStepNoMiddle(vertexArray* leftChain, - Int beginLeftIndex, - Int endLeftIndex, - gridBoundaryChain* leftGridChain, - Int leftGridChainStartIndex, - primStream* pStream) -{ - /*since there is no middle, there is at most one point which is on the - *second grid line, there could be multiple points on the first (top) - *grid line. - */ - - leftGridChain->leftEndFan(leftGridChainStartIndex+1, pStream); - - monoTriangulation2(leftGridChain->get_vertex(leftGridChainStartIndex), - leftGridChain->get_vertex(leftGridChainStartIndex+1), - leftChain, - beginLeftIndex, - endLeftIndex, - 1, //is increase chain. - pStream); -} - - - -/*sampling the left area in between two grid lines. - */ -void sampleLeftOneGridStep(vertexArray* leftChain, - Int beginLeftIndex, - Int endLeftIndex, - gridBoundaryChain* leftGridChain, - Int leftGridChainStartIndex, - primStream* pStream - ) -{ - if(checkMiddle(leftChain, beginLeftIndex, endLeftIndex, - leftGridChain->get_v_value(leftGridChainStartIndex), - leftGridChain->get_v_value(leftGridChainStartIndex+1))<0) - - { - - sampleLeftOneGridStepNoMiddle(leftChain, beginLeftIndex, endLeftIndex, leftGridChain, leftGridChainStartIndex, pStream); - return; - } - - //copy into a polygon - { - directedLine* poly = NULL; - sampledLine* sline; - directedLine* dline; - gridWrap* grid = leftGridChain->getGrid(); - Real vert1[2]; - Real vert2[2]; - Int i; - - Int innerInd = leftGridChain->getInnerIndex(leftGridChainStartIndex+1); - Int upperInd = leftGridChain->getUlineIndex(leftGridChainStartIndex); - Int lowerInd = leftGridChain->getUlineIndex(leftGridChainStartIndex+1); - Real upperV = leftGridChain->get_v_value(leftGridChainStartIndex); - Real lowerV = leftGridChain->get_v_value(leftGridChainStartIndex+1); - - //the upper gridline - vert1[1] = vert2[1] = upperV; - for(i=innerInd; i>upperInd; i--) - { - vert1[0]=grid->get_u_value(i); - vert2[0]=grid->get_u_value(i-1); - sline = new sampledLine(vert1, vert2); - dline = new directedLine(INCREASING, sline); - if(poly == NULL) - poly = dline; - else - poly->insert(dline); - } - - //the edge connecting upper grid with left chain - vert1[0] = grid->get_u_value(upperInd); - vert1[1] = upperV; - sline = new sampledLine(vert1, leftChain->getVertex(beginLeftIndex)); - dline = new directedLine(INCREASING, sline); - if(poly == NULL) - poly = dline; - else - poly->insert(dline); - - //the left chain - for(i=beginLeftIndex; igetVertex(i), leftChain->getVertex(i+1)); - dline = new directedLine(INCREASING, sline); - poly->insert(dline); - } - - //the edge connecting left chain with lower gridline - vert2[0] = grid->get_u_value(lowerInd); - vert2[1] = lowerV; - sline = new sampledLine(leftChain->getVertex(endLeftIndex), vert2); - dline = new directedLine(INCREASING, sline); - poly->insert(dline); - - //the lower grid line - vert1[1] = vert2[1] = lowerV; - for(i=lowerInd; iget_u_value(i); - vert2[0] = grid->get_u_value(i+1); - sline = new sampledLine(vert1, vert2); - dline = new directedLine(INCREASING, sline); - poly->insert(dline); - } - - //the vertical grid line segement - vert1[0]=vert2[0] = grid->get_u_value(innerInd); - vert2[1]=upperV; - vert1[1]=lowerV; - sline=new sampledLine(vert1, vert2); - dline=new directedLine(INCREASING, sline); - poly->insert(dline); - monoTriangulationOpt(poly, pStream); - //cleanup - poly->deleteSinglePolygonWithSline(); - return; - } - - - - - - Int i; - if(1/*leftGridChain->getUlineIndex(leftGridChainStartIndex) >= - leftGridChain->getUlineIndex(leftGridChainStartIndex+1)*/ - ) /*the second grid line is beyond the first one to the left*/ - { - /*find the maximal U-monotone chain - * of endLeftIndex, endLeftIndex-1, ..., - */ - i=endLeftIndex; - Real prevU = leftChain->getVertex(i)[0]; - for(i=endLeftIndex-1; i>=beginLeftIndex; i--){ - Real thisU = leftChain->getVertex(i)[0]; - if( prevU < thisU){ - prevU = thisU; - } - else - break; - } - /*from endLeftIndex to i+1 is strictly U- monotone */ - /*if i+1==endLeftIndex and the vertex and leftchain is on the second gridline, then - *we should use 2 vertices on the leftchain. If we only use one (endLeftIndex), then we - *we would output degenerate triangles - */ - if(i+1 == endLeftIndex && leftChain->getVertex(endLeftIndex)[1] == leftGridChain->get_v_value(1+leftGridChainStartIndex)) - i--; - - Int j = beginLeftIndex/*endLeftIndex*/+1; - - - if(leftGridChain->getInnerIndex(leftGridChainStartIndex+1) > leftGridChain->getUlineIndex(leftGridChainStartIndex)) - { - j = findIncreaseChainFromBegin(leftChain, beginLeftIndex, i+1/*endLeftIndex*/); - - Int temp = beginLeftIndex; - /*now from begin to j-1 is strictly u-monotone*/ - /*if j-1 is on the first grid line, then we want to skip to the vertex which is strictly - *below the grid line. This vertexmust exist since there is a 'corner turn' inbetween the two grid lines - */ - if(j-1 == beginLeftIndex) - { - while(leftChain->getVertex(j-1)[1] == leftGridChain->get_v_value(leftGridChainStartIndex)) - j++; - - Real vert[2]; - vert[0] = leftGridChain->get_u_value(leftGridChainStartIndex); - vert[1] = leftGridChain->get_v_value(leftGridChainStartIndex); - - monoTriangulation2( - vert/*leftChain->getVertex(beginLeftIndex)*/, - leftChain->getVertex(j-1), - leftChain, - beginLeftIndex, - j-2, - 1, - pStream //increase chain - ); - - temp = j-1; - } - - stripOfFanLeft(leftChain, j-1, temp/*beginLeftIndex*/, leftGridChain->getGrid(), - leftGridChain->getVlineIndex(leftGridChainStartIndex), - leftGridChain->getUlineIndex(leftGridChainStartIndex), - leftGridChain->getInnerIndex(leftGridChainStartIndex+1), - pStream, - 1 /*the grid line is above the trim line*/ - ); - } - - stripOfFanLeft(leftChain, endLeftIndex, i+1, leftGridChain->getGrid(), - leftGridChain->getVlineIndex(leftGridChainStartIndex+1), - leftGridChain->getUlineIndex(leftGridChainStartIndex+1), - leftGridChain->getInnerIndex(leftGridChainStartIndex+1), - pStream, - 0 /*the grid line is below the trim lines*/ - ); - - /*monotone triangulate the remaining left chain togther with the - *two vertices on the two grid v-lines. - */ - Real vert[2][2]; - vert[0][0]=vert[1][0] = leftGridChain->getInner_u_value(leftGridChainStartIndex+1); - vert[0][1] = leftGridChain->get_v_value(leftGridChainStartIndex); - vert[1][1] = leftGridChain->get_v_value(leftGridChainStartIndex+1); - -// vertexArray right(vert, 2); - - monoTriangulation2( - &vert[0][0], /*top vertex */ - &vert[1][0], /*bottom vertex*/ - leftChain, - /*beginLeftIndex*/j-1, - i+1, - 1, /*an increasing chain*/ - pStream); - } - else /*the second one is shorter than the first one to the left*/ - { - /*find the maximal U-monotone chain of beginLeftIndex, beginLeftIndex+1,..., - */ - i=beginLeftIndex; - Real prevU = leftChain->getVertex(i)[0]; - for(i=beginLeftIndex+1; i<=endLeftIndex; i++){ - Real thisU = leftChain->getVertex(i)[0]; - - if(prevU < thisU){ - prevU = thisU; - } - else - break; - } - /*from beginLeftIndex to i-1 is strictly U-monotone*/ - - - stripOfFanLeft(leftChain, i-1, beginLeftIndex, leftGridChain->getGrid(), - leftGridChain->getVlineIndex(leftGridChainStartIndex), - leftGridChain->getUlineIndex(leftGridChainStartIndex), - leftGridChain->getUlineIndex(leftGridChainStartIndex+1), - pStream, - 1 /*the grid line is above the trim lines*/ - ); - /*monotone triangulate the remaining left chain together with the - *two vertices on the two grid v-lines. - */ - Real vert[2][2]; - vert[0][0]=vert[1][0] = leftGridChain->get_u_value(leftGridChainStartIndex+1); - vert[0][1] = leftGridChain->get_v_value(leftGridChainStartIndex); - vert[1][1] = leftGridChain->get_v_value(leftGridChainStartIndex+1); - - vertexArray right(vert, 2); - - monoTriangulation2( - &vert[0][0], //top vertex - &vert[1][0], //bottom vertex - leftChain, - i-1, - endLeftIndex, - 1, /*an increase chain*/ - pStream); - - } -} - -/*n_upper>=1 - *n_lower>=1 - */ -void triangulateXYMono(Int n_upper, Real upperVerts[][2], - Int n_lower, Real lowerVerts[][2], - primStream* pStream) -{ - Int i,j,k,l; - Real* leftMostV; - - assert(n_upper>=1 && n_lower>=1); - if(upperVerts[0][0] <= lowerVerts[0][0]) - { - i=1; - j=0; - leftMostV = upperVerts[0]; - } - else - { - i=0; - j=1; - leftMostV = lowerVerts[0]; - } - - while(1) - { - if(i >= n_upper) /*case1: no more in upper*/ - { - - if(jbegin(); - pStream->insert(leftMostV); - while(jinsert(lowerVerts[j]); - j++; - } - pStream->end(PRIMITIVE_STREAM_FAN); - } - - break; - } - else if(j>= n_lower) /*case2: no more in lower*/ - { - - if(ibegin(); - pStream->insert(leftMostV); - - for(k=n_upper-1; k>=i; k--) - pStream->insert(upperVerts[k]); - - pStream->end(PRIMITIVE_STREAM_FAN); - } - - break; - } - else /* case3: neither is empty, plus the leftMostV, there is at least one triangle to output*/ - { - - if(upperVerts[i][0] <= lowerVerts[j][0]) - { - pStream->begin(); - pStream->insert(lowerVerts[j]); /*the origin of this fan*/ - - /*find the last k>=i such that - *upperverts[k][0] <= lowerverts[j][0] - */ - k=i; - while(k lowerVerts[j][0]) - break; - k++; - } - k--; - for(l=k; l>=i; l--)/*the reverse is for two-face lighting*/ - { - pStream->insert(upperVerts[l]); - } - pStream->insert(leftMostV); - - pStream->end(PRIMITIVE_STREAM_FAN); - //update i for next loop - i = k+1; - leftMostV = upperVerts[k]; - - } - else /*upperVerts[i][0] > lowerVerts[j][0]*/ - { - pStream->begin(); - pStream->insert(upperVerts[i]);/*the origion of this fan*/ - pStream->insert(leftMostV); - /*find the last k>=j such that - *lowerverts[k][0] < upperverts[i][0]*/ - k=j; - while(k< n_lower) - { - if(lowerVerts[k][0] >= upperVerts[i][0]) - break; - pStream->insert(lowerVerts[k]); - k++; - } - pStream->end(PRIMITIVE_STREAM_FAN); - j=k; - leftMostV = lowerVerts[j-1]; - } - } - } -} - - -void stripOfFanLeft(vertexArray* leftChain, - Int largeIndex, - Int smallIndex, - gridWrap* grid, - Int vlineIndex, - Int ulineSmallIndex, - Int ulineLargeIndex, - primStream* pStream, - Int gridLineUp /*1 if the grid line is above the trim lines*/ - ) -{ - assert(largeIndex >= smallIndex); - - Real grid_v_value; - grid_v_value = grid->get_v_value(vlineIndex); - - Real2* trimVerts=(Real2*) malloc(sizeof(Real2)* (largeIndex-smallIndex+1)); - assert(trimVerts); - - - Real2* gridVerts=(Real2*) malloc(sizeof(Real2)* (ulineLargeIndex-ulineSmallIndex+1)); - assert(gridVerts); - - Int k,i; - if(gridLineUp) /*trim line is below grid line, so trim vertices are going right when index increases*/ - for(k=0, i=smallIndex; i<=largeIndex; i++, k++) - { - trimVerts[k][0] = leftChain->getVertex(i)[0]; - trimVerts[k][1] = leftChain->getVertex(i)[1]; - } - else - for(k=0, i=largeIndex; i>=smallIndex; i--, k++) - { - trimVerts[k][0] = leftChain->getVertex(i)[0]; - trimVerts[k][1] = leftChain->getVertex(i)[1]; - } - - for(k=0, i=ulineSmallIndex; i<= ulineLargeIndex; i++, k++) - { - gridVerts[k][0] = grid->get_u_value(i); - gridVerts[k][1] = grid_v_value; - } - - if(gridLineUp) - triangulateXYMono( - ulineLargeIndex-ulineSmallIndex+1, gridVerts, - largeIndex-smallIndex+1, trimVerts, - pStream); - else - triangulateXYMono(largeIndex-smallIndex+1, trimVerts, - ulineLargeIndex-ulineSmallIndex+1, gridVerts, - pStream); - free(trimVerts); - free(gridVerts); -} - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h deleted file mode 100644 index 3bfa0d4393..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h +++ /dev/null @@ -1,191 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef _SAMPLEMONOPOLY_H -#define _SAMPLEMONOPOLY_H - -#include "monoTriangulation.h" -#include "gridWrap.h" -#include "rectBlock.h" - - -void triangulateXYMono(Int n_upper, Real upperVerts[][2], - Int n_lower, Real lowerVerts[][2], - primStream* pStream); - -void stripOfFanLeft(vertexArray* leftChain, - Int largeIndex, - Int smallIndex, - gridWrap* grid, - Int vlineIndex, - Int ulineSmallIndex, - Int ulineLargeIndex, - primStream* pStream, - Int gridLineUp - ); -void sampleLeftOneGridStep(vertexArray* leftChain, - Int beginLeftIndex, - Int endLeftIndex, - gridBoundaryChain* leftGridChain, - Int leftGridChainStartIndex, - primStream* pStream - ); - -void sampleLeftSingleTrimEdgeRegion(Real upperVert[2], Real lowerVert[2], - gridBoundaryChain* gridChain, - Int beginIndex, - Int endIndex, - primStream* pStream); - -void sampleLeftStripRec(vertexArray* leftChain, - Int topLeftIndex, - Int botLeftIndex, - gridBoundaryChain* leftGridChain, - Int leftGridChainStartIndex, - Int leftGridChainEndIndex, - primStream* pStream - ); - -void sampleLeftStrip(vertexArray* leftChain, - Int topLeftIndex, - Int botLeftIndex, - gridBoundaryChain* leftGridChain, - Int leftGridChainStartIndex, - Int leftGridChainEndIndex, - primStream* pStream - ); - -void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid, Int* ret_indices, Int* ret_inner); - -void findRightGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid, Int* ret_indices, Int* ret_inner); - -void sampleMonoPoly(directedLine* polygon, gridWrap* grid, Int ulinear, Int vlinear, primStream *pStream, rectBlockArray* rbArray); - -void sampleMonoPolyRec( - Real* topVertex, - Real* botVertex, - vertexArray* leftChain, - Int leftStartIndex, - vertexArray* rightChain, - Int rightStartIndex, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridStartIndex, - primStream* pStream, - rectBlockArray* rbArray - ); - -void sampleLeftStripRecF(vertexArray* leftChain, - Int topLeftIndex, - Int botLeftIndex, - gridBoundaryChain* leftGridChain, - Int leftGridChainStartIndex, - Int leftGridChainEndIndex, - primStream* pStream - ); - -void findUpCorners(Real *topVertex, - vertexArray *leftChain, - Int leftChainStartIndex, Int leftChainEndIndex, - vertexArray *rightChain, - Int rightChainStartIndex, Int rightChainEndIndex, - Real v, - Real uleft, - Real uright, - Int& ret_leftCornerWhere, - Int& ret_leftCornerIndex, - Int& ret_rightCornerWhere, - Int& ret_rightCornerIndex - ); -void findDownCorners(Real *botVertex, - vertexArray *leftChain, Int leftChainStartIndex, Int leftChainEndIndex, - vertexArray *rightChain, Int rightChainStartIndex, Int rightChainEndIndex, - Real v, - Real uleft, - Real uright, - Int& ret_leftCornerWhere, - Int& ret_leftCornerIndex, - Int& ret_rightCornerWhere, - Int& ret_rightCornerIndex - ); -void findNeck(vertexArray *leftChain, Int botLeftIndex, - vertexArray *rightChain, Int botRightIndex, - Int& leftLastIndex, /*left point of the neck*/ - Int& rightLastIndex /*right point of the neck*/ - ); - -Int findNeckF(vertexArray *leftChain, Int botLeftIndex, - vertexArray *rightChain, Int botRightIndex, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridStartIndex, - Int& neckLeft, - Int& neckRight); - -void findTopAndBot(directedLine* polygon, - directedLine*& topV, - directedLine*& botV); -void findGridChains(directedLine* top, directedLine* bot, - gridWrap* grid, - gridBoundaryChain*& leftGridChain, - gridBoundaryChain*& rightGridChain); -void toVertexArrays(directedLine* topV, directedLine* botV, vertexArray& leftChain, vertexArray& rightChain); - -void drawCorners( - Real* topV, Real* botV, - vertexArray* leftChain, - vertexArray* rightChain, - gridBoundaryChain* leftGridChain, - gridBoundaryChain* rightGridChain, - Int gridIndex1, - Int gridIndex2, - Int leftCornerWhere, - Int leftCornerIndex, - Int rightCornerWhere, - Int rightCornerIndex, - Int bot_leftCornerWhere, - Int bot_leftCornerIndex, - Int bot_rightCornerWhere, - Int bot_rightCornerIndex); - -Int checkMiddle(vertexArray* chain, Int begin, Int end, - Real vup, Real vbelow); - -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc deleted file mode 100644 index 15332eb41c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc +++ /dev/null @@ -1,181 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $ -*/ - -#include -#include -#include //for fabs() -#include "glimports.h" -#include "zlassert.h" -#include "sampledLine.h" - -void sampledLine::setPoint(Int i, Real p[2]) -{ - points[i][0]=p[0]; - points[i][1]=p[1]; -} - - -/*insert this single line in front of the oldList*/ -sampledLine* sampledLine::insert(sampledLine *oldList) -{ - next = oldList; - return this; -} - -void sampledLine::deleteList() -{ - sampledLine *temp, *tempNext; - for(temp = this; temp != NULL; temp = tempNext) - { - tempNext = temp->next; - delete temp; - } -} - - -/*space of points[][2] is allocated*/ -sampledLine::sampledLine(Int n_points) -{ - npoints = n_points; - points = (Real2*) malloc(sizeof(Real2) * n_points); - assert(points); - next = NULL; -} - -/*space of points[][2] is allocated and - *points are copied - */ -sampledLine::sampledLine(Int n_points, Real2 pts[]) -{ - int i; - npoints = n_points; - points = (Real2*) malloc(sizeof(Real2) * n_points); - assert(points); - for(i=0; i nv) n = nu; - else - n = nv; - if(n<1) - n = 1; - //du dv could be negative - Real du = (points[npoints-1][0] - points[0][0])/n; - Real dv = (points[npoints-1][1] - points[0][1])/n; - Real2 *temp = (Real2*) malloc(sizeof(Real2) * (n+1)); - assert(temp); - - Real u,v; - for(i=0, u=points[0][0], v=points[0][1]; inext) - { - temp->tessellate(u_reso, v_reso); - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampledLine.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampledLine.h deleted file mode 100644 index 8925197ab3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/sampledLine.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampledLine.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef _SAMPLEDLINE_H -#define _SAMPLEDLINE_H - -#include "definitions.h" - -class sampledLine{ - Int npoints; - Real2 *points; - -public: - sampledLine(Int n_points); - sampledLine(Int n_points, Real pts[][2]); - sampledLine(Real pt1[2], Real pt2[2]); - sampledLine(); //special, careful about memory - ~sampledLine(); - - void init(Int n_points, Real2 *pts);//special, careful about memory - - void setPoint(Int i, Real p[2]) ; - - sampledLine* insert(sampledLine *nline); - void deleteList(); - - Int get_npoints() {return npoints;} - Real2* get_points() {return points;} - - //u_reso is number of segments (may not be integer) per unit u - void tessellate(Real u_reso, Real v_reso);//n segments - void tessellateAll(Real u_reso, Real v_reso); - - void print(); - - sampledLine* next; -}; - - - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/searchTree.cc b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/searchTree.cc deleted file mode 100644 index 45c2412b48..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/searchTree.cc +++ /dev/null @@ -1,284 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/searchTree.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include -#include -#include "zlassert.h" - -#include "searchTree.h" - -#define max(a,b) ((a>b)? a:b) - -treeNode* TreeNodeMake(void *key) -{ - treeNode *ret = (treeNode*) malloc(sizeof(treeNode)); - assert(ret); - ret->key = key; - ret->parent = NULL; - ret->left = NULL; - ret->right = NULL; - return ret; -} - -void TreeNodeDeleteSingleNode(treeNode* node) -{ - free(node); -} - -void TreeNodeDeleteWholeTree(treeNode* node) -{ - if(node == NULL) return; - TreeNodeDeleteWholeTree(node->left); - TreeNodeDeleteWholeTree(node->right); - TreeNodeDeleteSingleNode(node); -} - -void TreeNodePrint(treeNode* node, - void (*keyPrint) (void*)) -{ - if(node ==NULL) return; - TreeNodePrint(node->left, keyPrint); - keyPrint(node->key); - TreeNodePrint(node->right, keyPrint); -} - -int TreeNodeDepth(treeNode* root) -{ - if(root == NULL) return 0; - else{ - int leftdepth = TreeNodeDepth(root->left); - int rightdepth = TreeNodeDepth(root->right); - return 1 + max(leftdepth, rightdepth); - } -} - -/*return the node with the key. - *NULL is returned if not found - */ -treeNode* TreeNodeFind(treeNode* tree, void* key, - int (*compkey) (void*, void*)) -{ - if(tree == NULL) - return NULL; - if(key == tree->key) - return tree; - else if(compkey(key, tree->key) < 0) - return TreeNodeFind(tree->left, key, compkey); - else - return TreeNodeFind(tree->right, key, compkey); -} - - -treeNode* TreeNodeInsert(treeNode* root, treeNode* newnode, - int (*compkey) (void *, void *)) -{ - treeNode *y = NULL; - treeNode *x = root; - /*going down the tree from the root. - *x traces the path, y is the parent of x. - */ - while (x != NULL){ - y = x; - if(compkey(newnode->key,x->key) < 0) /*if newnode < x*/ - x = x->left; - else - x = x->right; - } - - /*now y has the property that - * if newnode < y, then y->left is NULL - * if newnode > y, then y->right is NULL. - *So we want to isnert newnode to be the child of y - */ - newnode->parent = y; - if(y == NULL) - return newnode; - else if( compkey(newnode->key, y->key) <0) - { - y->left = newnode; - } - else - { - y->right = newnode; - } - - return root; -} - -treeNode* TreeNodeDeleteSingleNode(treeNode* tree, treeNode* node) -{ - treeNode* y; - treeNode* x; - treeNode* ret; - if(node==NULL) return tree; - - if(node->left == NULL || node->right == NULL) { - - y = node; - if(y->left != NULL) - x = y->left; - else - x = y->right; - - if( x != NULL) - x->parent = y->parent; - - if(y->parent == NULL) /*y is the root which has at most one child x*/ - ret = x; - else /*y is not the root*/ - { - if(y == y->parent->left) - y->parent->left = x; - else - y->parent->right = x; - ret = tree; - } - } - else { /*node has two children*/ - - y = TreeNodeSuccessor(node); - assert(y->left == NULL); - - if(y == node->right) /*y is the right child if node*/ - { - y->parent = node->parent; - y->left = node->left; - node->left->parent = y; - - } - else /*y != node->right*/ - { - x = y->right; - if(x!= NULL) - x->parent = y->parent; - - assert(y->parent != NULL); - if(y == y->parent->left) - y->parent->left = x; - else - y->parent->right = x; - /*move y to the position of node*/ - y->parent = node->parent; - y->left = node->left; - y->right = node->right; - node->left->parent = y; - node->right->parent = y; - } - if(node->parent != NULL) { - if(node->parent->left == node) - node->parent->left = y; - else - node->parent->right = y; - ret = tree; /*the root if the tree doesn't change*/ - } - else /*node->parent is NULL: node is the root*/ - ret = y; - } - - /*finally free the node, and return the new root*/ - TreeNodeDeleteSingleNode(node); - return ret; -} - - -/*the minimum node in the tree rooted by node - */ -treeNode* TreeNodeMinimum(treeNode* node) -{ - treeNode* temp = node; - if(temp == NULL) return NULL; - while(temp->left != NULL) { - temp = temp->left; - } - return temp; -} - -/*the maximum node in the tree rooted by node - */ -treeNode* TreeNodeMaximum(treeNode* node) -{ - treeNode* temp = node; - if(temp == NULL) return NULL; - while(temp->right != NULL) { - temp = temp->right; - } - return temp; -} - -/*return the first node (in sorted order) which is to the right of this node - */ -treeNode* TreeNodeSuccessor(treeNode* node) -{ - if(node == NULL) return NULL; - if(node->right != NULL) - return TreeNodeMinimum(node->right); - else{ /*node->right is NULL*/ - - /*find the first right-ancestor*/ - treeNode *y = node->parent; - treeNode* x = node; - while(y != NULL && x == y->right) /*if y is a left parent of x*/ - { - - x = y; - y = y->parent; - } - return y; - } -} - -/*return the first node (in sorted order) which is to the left of this node - */ -treeNode* TreeNodePredecessor(treeNode* node) -{ - if(node == NULL) return NULL; - if(node->left != NULL) - return TreeNodeMaximum(node->left); - else{ /*node->left is NULL*/ - /*find the first left-ancestor*/ - treeNode *y = node->parent; - treeNode *x = node; - while(y != NULL && x == y->left) /*if y is a right parent of x*/ - { - x = y; - y = y->parent; - } - return y; - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/searchTree.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/searchTree.h deleted file mode 100644 index 4272248528..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/searchTree.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/searchTree.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef _SEARCHTREE_H -#define _SEARCHTREE_H - -typedef struct treeNode{ - void *key; - struct treeNode* parent; - struct treeNode* left; /*children*/ - struct treeNode* right; -} treeNode; - -treeNode* TreeNodeMake(void *key); -void TreeNodeDeleteSingleNode(treeNode* node); -void TreeNodeDeleteWholeTree(treeNode* node); -void TreeNodePrint(treeNode* node, - void (*keyPrint) (void*)); -int TreeNodeDepth(treeNode* root); -treeNode* TreeNodeMinimum(treeNode* node); -treeNode* TreeNodeMaximum(treeNode* node); -treeNode* TreeNodePredecessor(treeNode* node); -treeNode* TreeNodeSuccessor(treeNode* node); -treeNode* TreeNodeFind(treeNode* tree, void* key, - int (*compkey) (void*, void*)); - -treeNode* TreeNodeInsert(treeNode* root, treeNode* newnode, - int (*comp) (void *, void *)); -treeNode* TreeNodeDeleteSingleNode(treeNode* tree, treeNode* node); - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/zlassert.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/zlassert.h deleted file mode 100644 index 6a3720853b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libnurbs/nurbtess/zlassert.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -*/ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/zlassert.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -/*XXXblythe this file should be deleted*/ -#include diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/README b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/README deleted file mode 100644 index 7c314b74a0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/README +++ /dev/null @@ -1,447 +0,0 @@ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/README,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -General Polygon Tesselation ---------------------------- - - This note describes a tesselator for polygons consisting of one or - more closed contours. It is backward-compatible with the current - OpenGL Utilities tesselator, and is intended to replace it. Here is - a summary of the major differences: - - - input contours can be intersecting, self-intersecting, or degenerate. - - - supports a choice of several winding rules for determining which parts - of the polygon are on the "interior". This makes it possible to do - CSG operations on polygons. - - - boundary extraction: instead of tesselating the polygon, returns a - set of closed contours which separate the interior from the exterior. - - - returns the output as a small number of triangle fans and strips, - rather than a list of independent triangles (when possible). - - - output is available as an explicit mesh (a quad-edge structure), - in addition to the normal callback interface. - - - the algorithm used is extremely robust. - - -The interface -------------- - - The tesselator state is maintained in a "tesselator object". - These are allocated and destroyed using - - GLUtesselator *gluNewTess( void ); - void gluDeleteTess( GLUtesselator *tess ); - - Several tesselator objects may be used simultaneously. - - Inputs - ------ - - The input contours are specified with the following routines: - - void gluTessBeginPolygon( GLUtesselator *tess ); - void gluTessBeginContour( GLUtesselator *tess ); - void gluTessVertex( GLUtesselator *tess, GLUcoord coords[3], void *data ); - void gluTessEndContour( GLUtesselator *tess ); - void gluTessEndPolygon( GLUtesselator *tess ); - - Within each BeginPolygon/EndPolygon pair, there can be zero or more - calls to BeginContour/EndContour. Within each contour, there are zero - or more calls to gluTessVertex(). The vertices specify a closed - contour (the last vertex of each contour is automatically linked to - the first). - - "coords" give the coordinates of the vertex in 3-space. For useful - results, all vertices should lie in some plane, since the vertices - are projected onto a plane before tesselation. "data" is a pointer - to a user-defined vertex structure, which typically contains other - information such as color, texture coordinates, normal, etc. It is - used to refer to the vertex during rendering. - - The library can be compiled in single- or double-precision; the type - GLUcoord represents either "float" or "double" accordingly. The GLU - version will be available in double-precision only. Compile with - GLU_TESS_API_FLOAT defined to get the single-precision version. - - When EndPolygon is called, the tesselation algorithm determines - which regions are interior to the given contours, according to one - of several "winding rules" described below. The interior regions - are then tesselated, and the output is provided as callbacks. - - - Rendering Callbacks - ------------------- - - Callbacks are specified by the client using - - void gluTessCallback( GLUtesselator *tess, GLenum which, void (*fn)()); - - If "fn" is NULL, any previously defined callback is discarded. - - The callbacks used to provide output are: /* which == */ - - void begin( GLenum type ); /* GLU_TESS_BEGIN */ - void edgeFlag( GLboolean flag ); /* GLU_TESS_EDGE_FLAG */ - void vertex( void *data ); /* GLU_TESS_VERTEX */ - void end( void ); /* GLU_TESS_END */ - - Any of the callbacks may be left undefined; if so, the corresponding - information will not be supplied during rendering. - - The "begin" callback indicates the start of a primitive; type is one - of GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, or GL_TRIANGLES (but see the - notes on "boundary extraction" below). - - It is followed by any number of "vertex" callbacks, which supply the - vertices in the same order as expected by the corresponding glBegin() - call. After the last vertex of a given primitive, there is a callback - to "end". - - If the "edgeFlag" callback is provided, no triangle fans or strips - will be used. When edgeFlag is called, if "flag" is GL_TRUE then each - vertex which follows begins an edge which lies on the polygon boundary - (ie. an edge which separates an interior region from an exterior one). - If "flag" is GL_FALSE, each vertex which follows begins an edge which lies - in the polygon interior. "edgeFlag" will be called before the first - call to "vertex". - - Other Callbacks - --------------- - - void mesh( GLUmesh *mesh ); /* GLU_TESS_MESH */ - - - Returns an explicit mesh, represented using the quad-edge structure - (Guibas/Stolfi '85). Other implementations of this interface might - use a different mesh structure, so this is available only only as an - SGI extension. When the mesh is no longer needed, it should be freed - using - - void gluDeleteMesh( GLUmesh *mesh ); - - There is a brief description of this data structure in the include - file "mesh.h". For the full details, see L. Guibas and J. Stolfi, - Primitives for the manipulation of general subdivisions and the - computation of Voronoi diagrams, ACM Transactions on Graphics, - 4(2):74-123, April 1985. For an introduction, see the course notes - for CS348a, "Mathematical Foundations of Computer Graphics", - available at the Stanford bookstore (and taught during the fall - quarter). - - void error( GLenum errno ); /* GLU_TESS_ERROR */ - - - errno is one of GLU_TESS_MISSING_BEGIN_POLYGON, - GLU_TESS_MISSING_END_POLYGON, - GLU_TESS_MISSING_BEGIN_CONTOUR, - GLU_TESS_MISSING_END_CONTOUR, - GLU_TESS_COORD_TOO_LARGE, - GLU_TESS_NEED_COMBINE_CALLBACK - - The first four are obvious. The interface recovers from these - errors by inserting the missing call(s). - - GLU_TESS_COORD_TOO_LARGE says that some vertex coordinate exceeded - the predefined constant GLU_TESS_MAX_COORD in absolute value, and - that the value has been clamped. (Coordinate values must be small - enough so that two can be multiplied together without overflow.) - - GLU_TESS_NEED_COMBINE_CALLBACK says that the algorithm detected an - intersection between two edges in the input data, and the "combine" - callback (below) was not provided. No output will be generated. - - - void combine( GLUcoord coords[3], void *data[4], /* GLU_TESS_COMBINE */ - GLUcoord weight[4], void **outData ); - - - When the algorithm detects an intersection, or wishes to merge - features, it needs to create a new vertex. The vertex is defined - as a linear combination of up to 4 existing vertices, referenced - by data[0..3]. The coefficients of the linear combination are - given by weight[0..3]; these weights always sum to 1.0. All vertex - pointers are valid even when some of the weights are zero. - "coords" gives the location of the new vertex. - - The user must allocate another vertex, interpolate parameters - using "data" and "weights", and return the new vertex pointer in - "outData". This handle is supplied during rendering callbacks. - For example, if the polygon lies in an arbitrary plane in 3-space, - and we associate a color with each vertex, the combine callback might - look like this: - - void myCombine( GLUcoord coords[3], VERTEX *d[4], - GLUcoord w[4], VERTEX **dataOut ) - { - VERTEX *new = new_vertex(); - - new->x = coords[0]; - new->y = coords[1]; - new->z = coords[2]; - new->r = w[0]*d[0]->r + w[1]*d[1]->r + w[2]*d[2]->r + w[3]*d[3]->r; - new->g = w[0]*d[0]->g + w[1]*d[1]->g + w[2]*d[2]->g + w[3]*d[3]->g; - new->b = w[0]*d[0]->b + w[1]*d[1]->b + w[2]*d[2]->b + w[3]*d[3]->b; - new->a = w[0]*d[0]->a + w[1]*d[1]->a + w[2]*d[2]->a + w[3]*d[3]->a; - *dataOut = new; - } - - If the algorithm detects an intersection, then the "combine" callback - must be defined, and must write a non-NULL pointer into "dataOut". - Otherwise the GLU_TESS_NEED_COMBINE_CALLBACK error occurs, and no - output is generated. This is the only error that can occur during - tesselation and rendering. - - - Control over Tesselation - ------------------------ - - void gluTessProperty( GLUtesselator *tess, GLenum which, GLUcoord value ); - - Properties defined: - - - GLU_TESS_WINDING_RULE. Possible values: - - GLU_TESS_WINDING_ODD - GLU_TESS_WINDING_NONZERO - GLU_TESS_WINDING_POSITIVE - GLU_TESS_WINDING_NEGATIVE - GLU_TESS_WINDING_ABS_GEQ_TWO - - The input contours parition the plane into regions. A winding - rule determines which of these regions are inside the polygon. - - For a single contour C, the winding number of a point x is simply - the signed number of revolutions we make around x as we travel - once around C (where CCW is positive). When there are several - contours, the individual winding numbers are summed. This - procedure associates a signed integer value with each point x in - the plane. Note that the winding number is the same for all - points in a single region. - - The winding rule classifies a region as "inside" if its winding - number belongs to the chosen category (odd, nonzero, positive, - negative, or absolute value of at least two). The current GLU - tesselator implements the "odd" rule. The "nonzero" rule is another - common way to define the interior. The other three rules are - useful for polygon CSG operations (see below). - - - GLU_TESS_BOUNDARY_ONLY. Values: TRUE (non-zero) or FALSE (zero). - - If TRUE, returns a set of closed contours which separate the - polygon interior and exterior (rather than a tesselation). - Exterior contours are oriented CCW with respect to the normal, - interior contours are oriented CW. The GLU_TESS_BEGIN callback - uses the type GL_LINE_LOOP for each contour. - - - GLU_TESS_TOLERANCE. Value: a real number between 0.0 and 1.0. - - This specifies a tolerance for merging features to reduce the size - of the output. For example, two vertices which are very close to - each other might be replaced by a single vertex. The tolerance - is multiplied by the largest coordinate magnitude of any input vertex; - this specifies the maximum distance that any feature can move as the - result of a single merge operation. If a single feature takes part - in several merge operations, the total distance moved could be larger. - - Feature merging is completely optional; the tolerance is only a hint. - The implementation is free to merge in some cases and not in others, - or to never merge features at all. The default tolerance is zero. - - The current implementation merges vertices only if they are exactly - coincident, regardless of the current tolerance. A vertex is - spliced into an edge only if the implementation is unable to - distinguish which side of the edge the vertex lies on. - Two edges are merged only when both endpoints are identical. - - - void gluTessNormal( GLUtesselator *tess, - GLUcoord x, GLUcoord y, GLUcoord z ) - - - Lets the user supply the polygon normal, if known. All input data - is projected into a plane perpendicular to the normal before - tesselation. All output triangles are oriented CCW with - respect to the normal (CW orientation can be obtained by - reversing the sign of the supplied normal). For example, if - you know that all polygons lie in the x-y plane, call - "gluTessNormal(tess, 0.0, 0.0, 1.0)" before rendering any polygons. - - - If the supplied normal is (0,0,0) (the default value), the - normal is determined as follows. The direction of the normal, - up to its sign, is found by fitting a plane to the vertices, - without regard to how the vertices are connected. It is - expected that the input data lies approximately in plane; - otherwise projection perpendicular to the computed normal may - substantially change the geometry. The sign of the normal is - chosen so that the sum of the signed areas of all input contours - is non-negative (where a CCW contour has positive area). - - - The supplied normal persists until it is changed by another - call to gluTessNormal. - - - Backward compatibility with the GLU tesselator - ---------------------------------------------- - - The preferred interface is the one described above. The following - routines are obsolete, and are provided only for backward compatibility: - - typedef GLUtesselator GLUtriangulatorObj; /* obsolete name */ - - void gluBeginPolygon( GLUtesselator *tess ); - void gluNextContour( GLUtesselator *tess, GLenum type ); - void gluEndPolygon( GLUtesselator *tess ); - - "type" is one of GLU_EXTERIOR, GLU_INTERIOR, GLU_CCW, GLU_CW, or - GLU_UNKNOWN. It is ignored by the current GLU tesselator. - - GLU_BEGIN, GLU_VERTEX, GLU_END, GLU_ERROR, and GLU_EDGE_FLAG are defined - as synonyms for GLU_TESS_BEGIN, GLU_TESS_VERTEX, GLU_TESS_END, - GLU_TESS_ERROR, and GLU_TESS_EDGE_FLAG. - - -Polygon CSG operations ----------------------- - - The features of the tesselator make it easy to find the union, difference, - or intersection of several polygons. - - First, assume that each polygon is defined so that the winding number - is 0 for each exterior region, and 1 for each interior region. Under - this model, CCW contours define the outer boundary of the polygon, and - CW contours define holes. Contours may be nested, but a nested - contour must be oriented oppositely from the contour that contains it. - - If the original polygons do not satisfy this description, they can be - converted to this form by first running the tesselator with the - GLU_TESS_BOUNDARY_ONLY property turned on. This returns a list of - contours satisfying the restriction above. By allocating two - tesselator objects, the callbacks from one tesselator can be fed - directly to the input of another. - - Given two or more polygons of the form above, CSG operations can be - implemented as follows: - - Union - Draw all the input contours as a single polygon. The winding number - of each resulting region is the number of original polygons - which cover it. The union can be extracted using the - GLU_TESS_WINDING_NONZERO or GLU_TESS_WINDING_POSITIVE winding rules. - Note that with the nonzero rule, we would get the same result if - all contour orientations were reversed. - - Intersection (two polygons at a time only) - Draw a single polygon using the contours from both input polygons. - Extract the result using GLU_TESS_WINDING_ABS_GEQ_TWO. (Since this - winding rule looks at the absolute value, reversing all contour - orientations does not change the result.) - - Difference - - Suppose we want to compute A \ (B union C union D). Draw a single - polygon consisting of the unmodified contours from A, followed by - the contours of B,C,D with the vertex order reversed (this changes - the winding number of the interior regions to -1). To extract the - result, use the GLU_TESS_WINDING_POSITIVE rule. - - If B,C,D are the result of a GLU_TESS_BOUNDARY_ONLY call, an - alternative to reversing the vertex order is to reverse the sign of - the supplied normal. For example in the x-y plane, call - gluTessNormal( tess, 0.0, 0.0, -1.0 ). - - -Performance ------------ - - The tesselator is not intended for immediate-mode rendering; when - possible the output should be cached in a user structure or display - list. General polygon tesselation is an inherently difficult problem, - especially given the goal of extreme robustness. - - The implementation makes an effort to output a small number of fans - and strips; this should improve the rendering performance when the - output is used in a display list. - - Single-contour input polygons are first tested to see whether they can - be rendered as a triangle fan with respect to the first vertex (to - avoid running the full decomposition algorithm on convex polygons). - Non-convex polygons may be rendered by this "fast path" as well, if - the algorithm gets lucky in its choice of a starting vertex. - - For best performance follow these guidelines: - - - supply the polygon normal, if available, using gluTessNormal(). - This represents about 10% of the computation time. For example, - if all polygons lie in the x-y plane, use gluTessNormal(tess,0,0,1). - - - render many polygons using the same tesselator object, rather than - allocating a new tesselator for each one. (In a multi-threaded, - multi-processor environment you may get better performance using - several tesselators.) - - -Comparison with the GLU tesselator ----------------------------------- - - On polygons which make it through the "fast path", the tesselator is - 3 to 5 times faster than the GLU tesselator. - - On polygons which don't make it through the fast path (but which don't - have self-intersections or degeneracies), it is about 2 times slower. - - On polygons with self-intersections or degeneraces, there is nothing - to compare against. - - The new tesselator generates many more fans and strips, reducing the - number of vertices that need to be sent to the hardware. - - Key to the statistics: - - vert number of input vertices on all contours - cntr number of input contours - tri number of triangles in all output primitives - strip number of triangle strips - fan number of triangle fans - ind number of independent triangles - ms number of milliseconds for tesselation - (on a 150MHz R4400 Indy) - - Convex polygon examples: - -New: 3 vert, 1 cntr, 1 tri, 0 strip, 0 fan, 1 ind, 0.0459 ms -Old: 3 vert, 1 cntr, 1 tri, 0 strip, 0 fan, 1 ind, 0.149 ms -New: 4 vert, 1 cntr, 2 tri, 0 strip, 1 fan, 0 ind, 0.0459 ms -Old: 4 vert, 1 cntr, 2 tri, 0 strip, 0 fan, 2 ind, 0.161 ms -New: 36 vert, 1 cntr, 34 tri, 0 strip, 1 fan, 0 ind, 0.153 ms -Old: 36 vert, 1 cntr, 34 tri, 0 strip, 0 fan, 34 ind, 0.621 ms - - Concave single-contour polygons: - -New: 5 vert, 1 cntr, 3 tri, 0 strip, 1 fan, 0 ind, 0.052 ms -Old: 5 vert, 1 cntr, 3 tri, 0 strip, 0 fan, 3 ind, 0.252 ms -New: 19 vert, 1 cntr, 17 tri, 2 strip, 2 fan, 1 ind, 0.911 ms -Old: 19 vert, 1 cntr, 17 tri, 0 strip, 0 fan, 17 ind, 0.529 ms -New: 151 vert, 1 cntr, 149 tri, 13 strip, 18 fan, 3 ind, 6.82 ms -Old: 151 vert, 1 cntr, 149 tri, 0 strip, 3 fan, 143 ind, 2.7 ms -New: 574 vert, 1 cntr, 572 tri, 59 strip, 54 fan, 11 ind, 26.6 ms -Old: 574 vert, 1 cntr, 572 tri, 0 strip, 31 fan, 499 ind, 12.4 ms - - Multiple contours, but no intersections: - -New: 7 vert, 2 cntr, 7 tri, 1 strip, 0 fan, 0 ind, 0.527 ms -Old: 7 vert, 2 cntr, 7 tri, 0 strip, 0 fan, 7 ind, 0.274 ms -New: 81 vert, 6 cntr, 89 tri, 9 strip, 7 fan, 6 ind, 3.88 ms -Old: 81 vert, 6 cntr, 89 tri, 0 strip, 13 fan, 61 ind, 2.2 ms -New: 391 vert, 19 cntr, 413 tri, 37 strip, 32 fan, 26 ind, 20.2 ms -Old: 391 vert, 19 cntr, 413 tri, 0 strip, 25 fan, 363 ind, 8.68 ms - - Self-intersecting and degenerate examples: - -Bowtie: 4 vert, 1 cntr, 2 tri, 0 strip, 0 fan, 2 ind, 0.483 ms -Star: 5 vert, 1 cntr, 5 tri, 0 strip, 0 fan, 5 ind, 0.91 ms -Random: 24 vert, 7 cntr, 46 tri, 2 strip, 12 fan, 7 ind, 5.32 ms -Font: 333 vert, 2 cntr, 331 tri, 32 strip, 16 fan, 3 ind, 14.1 ms -: 167 vert, 35 cntr, 254 tri, 8 strip, 56 fan, 52 ind, 46.3 ms -: 78 vert, 1 cntr, 2675 tri, 148 strip, 207 fan, 180 ind, 243 ms -: 12480 vert, 2 cntr, 12478 tri, 736 strip,1275 fan, 5 ind, 1010 ms diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/alg-outline b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/alg-outline deleted file mode 100644 index f51d68ce3b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/alg-outline +++ /dev/null @@ -1,229 +0,0 @@ -/* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/alg-outline,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -This is only a very brief overview. There is quite a bit of -additional documentation in the source code itself. - - -Goals of robust tesselation ---------------------------- - -The tesselation algorithm is fundamentally a 2D algorithm. We -initially project all data into a plane; our goal is to robustly -tesselate the projected data. The same topological tesselation is -then applied to the input data. - -Topologically, the output should always be a tesselation. If the -input is even slightly non-planar, then some triangles will -necessarily be back-facing when viewed from some angles, but the goal -is to minimize this effect. - -The algorithm needs some capability of cleaning up the input data as -well as the numerical errors in its own calculations. One way to do -this is to specify a tolerance as defined above, and clean up the -input and output during the line sweep process. At the very least, -the algorithm must handle coincident vertices, vertices incident to an -edge, and coincident edges. - - -Phases of the algorithm ------------------------ - -1. Find the polygon normal N. -2. Project the vertex data onto a plane. It does not need to be - perpendicular to the normal, eg. we can project onto the plane - perpendicular to the coordinate axis whose dot product with N - is largest. -3. Using a line-sweep algorithm, partition the plane into x-monotone - regions. Any vertical line intersects an x-monotone region in - at most one interval. -4. Triangulate the x-monotone regions. -5. Group the triangles into strips and fans. - - -Finding the normal vector -------------------------- - -A common way to find a polygon normal is to compute the signed area -when the polygon is projected along the three coordinate axes. We -can't do this, since contours can have zero area without being -degenerate (eg. a bowtie). - -We fit a plane to the vertex data, ignoring how they are connected -into contours. Ideally this would be a least-squares fit; however for -our purpose the accuracy of the normal is not important. Instead we -find three vertices which are widely separated, and compute the normal -to the triangle they form. The vertices are chosen so that the -triangle has an area at least 1/sqrt(3) times the largest area of any -triangle formed using the input vertices. - -The contours do affect the orientation of the normal; after computing -the normal, we check that the sum of the signed contour areas is -non-negative, and reverse the normal if necessary. - - -Projecting the vertices ------------------------ - -We project the vertices onto a plane perpendicular to one of the three -coordinate axes. This helps numerical accuracy by removing a -transformation step between the original input data and the data -processed by the algorithm. The projection also compresses the input -data; the 2D distance between vertices after projection may be smaller -than the original 2D distance. However by choosing the coordinate -axis whose dot product with the normal is greatest, the compression -factor is at most 1/sqrt(3). - -Even though the *accuracy* of the normal is not that important (since -we are projecting perpendicular to a coordinate axis anyway), the -*robustness* of the computation is important. For example, if there -are many vertices which lie almost along a line, and one vertex V -which is well-separated from the line, then our normal computation -should involve V otherwise the results will be garbage. - -The advantage of projecting perpendicular to the polygon normal is -that computed intersection points will be as close as possible to -their ideal locations. To get this behavior, define TRUE_PROJECT. - - -The Line Sweep --------------- - -There are three data structures: the mesh, the event queue, and the -edge dictionary. - -The mesh is a "quad-edge" data structure which records the topology of -the current decomposition; for details see the include file "mesh.h". - -The event queue simply holds all vertices (both original and computed -ones), organized so that we can quickly extract the vertex with the -minimum x-coord (and among those, the one with the minimum y-coord). - -The edge dictionary describes the current intersection of the sweep -line with the regions of the polygon. This is just an ordering of the -edges which intersect the sweep line, sorted by their current order of -intersection. For each pair of edges, we store some information about -the monotone region between them -- these are call "active regions" -(since they are crossed by the current sweep line). - -The basic algorithm is to sweep from left to right, processing each -vertex. The processed portion of the mesh (left of the sweep line) is -a planar decomposition. As we cross each vertex, we update the mesh -and the edge dictionary, then we check any newly adjacent pairs of -edges to see if they intersect. - -A vertex can have any number of edges. Vertices with many edges can -be created as vertices are merged and intersection points are -computed. For unprocessed vertices (right of the sweep line), these -edges are in no particular order around the vertex; for processed -vertices, the topological ordering should match the geometric ordering. - -The vertex processing happens in two phases: first we process are the -left-going edges (all these edges are currently in the edge -dictionary). This involves: - - - deleting the left-going edges from the dictionary; - - relinking the mesh if necessary, so that the order of these edges around - the event vertex matches the order in the dictionary; - - marking any terminated regions (regions which lie between two left-going - edges) as either "inside" or "outside" according to their winding number. - -When there are no left-going edges, and the event vertex is in an -"interior" region, we need to add an edge (to split the region into -monotone pieces). To do this we simply join the event vertex to the -rightmost left endpoint of the upper or lower edge of the containing -region. - -Then we process the right-going edges. This involves: - - - inserting the edges in the edge dictionary; - - computing the winding number of any newly created active regions. - We can compute this incrementally using the winding of each edge - that we cross as we walk through the dictionary. - - relinking the mesh if necessary, so that the order of these edges around - the event vertex matches the order in the dictionary; - - checking any newly adjacent edges for intersection and/or merging. - -If there are no right-going edges, again we need to add one to split -the containing region into monotone pieces. In our case it is most -convenient to add an edge to the leftmost right endpoint of either -containing edge; however we may need to change this later (see the -code for details). - - -Invariants ----------- - -These are the most important invariants maintained during the sweep. -We define a function VertLeq(v1,v2) which defines the order in which -vertices cross the sweep line, and a function EdgeLeq(e1,e2; loc) -which says whether e1 is below e2 at the sweep event location "loc". -This function is defined only at sweep event locations which lie -between the rightmost left endpoint of {e1,e2}, and the leftmost right -endpoint of {e1,e2}. - -Invariants for the Edge Dictionary. - - - Each pair of adjacent edges e2=Succ(e1) satisfies EdgeLeq(e1,e2) - at any valid location of the sweep event. - - If EdgeLeq(e2,e1) as well (at any valid sweep event), then e1 and e2 - share a common endpoint. - - For each e in the dictionary, e->Dst has been processed but not e->Org. - - Each edge e satisfies VertLeq(e->Dst,event) && VertLeq(event,e->Org) - where "event" is the current sweep line event. - - No edge e has zero length. - - No two edges have identical left and right endpoints. - -Invariants for the Mesh (the processed portion). - - - The portion of the mesh left of the sweep line is a planar graph, - ie. there is *some* way to embed it in the plane. - - No processed edge has zero length. - - No two processed vertices have identical coordinates. - - Each "inside" region is monotone, ie. can be broken into two chains - of monotonically increasing vertices according to VertLeq(v1,v2) - - a non-invariant: these chains may intersect (slightly) due to - numerical errors, but this does not affect the algorithm's operation. - -Invariants for the Sweep. - - - If a vertex has any left-going edges, then these must be in the edge - dictionary at the time the vertex is processed. - - If an edge is marked "fixUpperEdge" (it is a temporary edge introduced - by ConnectRightVertex), then it is the only right-going edge from - its associated vertex. (This says that these edges exist only - when it is necessary.) - - -Robustness ----------- - -The key to the robustness of the algorithm is maintaining the -invariants above, especially the correct ordering of the edge -dictionary. We achieve this by: - - 1. Writing the numerical computations for maximum precision rather - than maximum speed. - - 2. Making no assumptions at all about the results of the edge - intersection calculations -- for sufficiently degenerate inputs, - the computed location is not much better than a random number. - - 3. When numerical errors violate the invariants, restore them - by making *topological* changes when necessary (ie. relinking - the mesh structure). - - -Triangulation and Grouping --------------------------- - -We finish the line sweep before doing any triangulation. This is -because even after a monotone region is complete, there can be further -changes to its vertex data because of further vertex merging. - -After triangulating all monotone regions, we want to group the -triangles into fans and strips. We do this using a greedy approach. -The triangulation itself is not optimized to reduce the number of -primitives; we just try to get a reasonable decomposition of the -computed triangulation. diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/dict-list.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/dict-list.h deleted file mode 100644 index f5b82116d8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/dict-list.h +++ /dev/null @@ -1,107 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/dict-list.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef __dict_list_h_ -#define __dict_list_h_ - -/* Use #define's so that another heap implementation can use this one */ - -#define DictKey DictListKey -#define Dict DictList -#define DictNode DictListNode - -#define dictNewDict(frame,leq) __gl_dictListNewDict(frame,leq) -#define dictDeleteDict(dict) __gl_dictListDeleteDict(dict) - -#define dictSearch(dict,key) __gl_dictListSearch(dict,key) -#define dictInsert(dict,key) __gl_dictListInsert(dict,key) -#define dictInsertBefore(dict,node,key) __gl_dictListInsertBefore(dict,node,key) -#define dictDelete(dict,node) __gl_dictListDelete(dict,node) - -#define dictKey(n) __gl_dictListKey(n) -#define dictSucc(n) __gl_dictListSucc(n) -#define dictPred(n) __gl_dictListPred(n) -#define dictMin(d) __gl_dictListMin(d) -#define dictMax(d) __gl_dictListMax(d) - - - -typedef void *DictKey; -typedef struct Dict Dict; -typedef struct DictNode DictNode; - -Dict *dictNewDict( - void *frame, - int (*leq)(void *frame, DictKey key1, DictKey key2) ); - -void dictDeleteDict( Dict *dict ); - -/* Search returns the node with the smallest key greater than or equal - * to the given key. If there is no such key, returns a node whose - * key is NULL. Similarly, Succ(Max(d)) has a NULL key, etc. - */ -DictNode *dictSearch( Dict *dict, DictKey key ); -DictNode *dictInsertBefore( Dict *dict, DictNode *node, DictKey key ); -void dictDelete( Dict *dict, DictNode *node ); - -#define __gl_dictListKey(n) ((n)->key) -#define __gl_dictListSucc(n) ((n)->next) -#define __gl_dictListPred(n) ((n)->prev) -#define __gl_dictListMin(d) ((d)->head.next) -#define __gl_dictListMax(d) ((d)->head.prev) -#define __gl_dictListInsert(d,k) (dictInsertBefore((d),&(d)->head,(k))) - - -/*** Private data structures ***/ - -struct DictNode { - DictKey key; - DictNode *next; - DictNode *prev; -}; - -struct Dict { - DictNode head; - void *frame; - int (*leq)(void *frame, DictKey key1, DictKey key2); -}; - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/dict.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/dict.c deleted file mode 100644 index fac8032ff3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/dict.c +++ /dev/null @@ -1,117 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/dict.c,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include -#include "dict-list.h" -#include "memalloc.h" - -/* really __gl_dictListNewDict */ -Dict *dictNewDict( void *frame, - int (*leq)(void *frame, DictKey key1, DictKey key2) ) -{ - Dict *dict = (Dict *) memAlloc( sizeof( Dict )); - DictNode *head; - - if (dict == NULL) return NULL; - - head = &dict->head; - - head->key = NULL; - head->next = head; - head->prev = head; - - dict->frame = frame; - dict->leq = leq; - - return dict; -} - -/* really __gl_dictListDeleteDict */ -void dictDeleteDict( Dict *dict ) -{ - DictNode *node; - - for( node = dict->head.next; node != &dict->head; node = node->next ) { - memFree( node ); - } - memFree( dict ); -} - -/* really __gl_dictListInsertBefore */ -DictNode *dictInsertBefore( Dict *dict, DictNode *node, DictKey key ) -{ - DictNode *newNode; - - do { - node = node->prev; - } while( node->key != NULL && ! (*dict->leq)(dict->frame, node->key, key)); - - newNode = (DictNode *) memAlloc( sizeof( DictNode )); - if (newNode == NULL) return NULL; - - newNode->key = key; - newNode->next = node->next; - node->next->prev = newNode; - newNode->prev = node; - node->next = newNode; - - return newNode; -} - -/* really __gl_dictListDelete */ -void dictDelete( Dict *dict, DictNode *node ) /*ARGSUSED*/ -{ - node->next->prev = node->prev; - node->prev->next = node->next; - memFree( node ); -} - -/* really __gl_dictListSearch */ -DictNode *dictSearch( Dict *dict, DictKey key ) -{ - DictNode *node = &dict->head; - - do { - node = node->next; - } while( node->key != NULL && ! (*dict->leq)(dict->frame, key, node->key)); - - return node; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/dict.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/dict.h deleted file mode 100644 index ea3b4064ff..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/dict.h +++ /dev/null @@ -1,107 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/dict.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef __dict_list_h_ -#define __dict_list_h_ - -/* Use #define's so that another heap implementation can use this one */ - -#define DictKey DictListKey -#define Dict DictList -#define DictNode DictListNode - -#define dictNewDict(frame,leq) __gl_dictListNewDict(frame,leq) -#define dictDeleteDict(dict) __gl_dictListDeleteDict(dict) - -#define dictSearch(dict,key) __gl_dictListSearch(dict,key) -#define dictInsert(dict,key) __gl_dictListInsert(dict,key) -#define dictInsertBefore(dict,node,key) __gl_dictListInsertBefore(dict,node,key) -#define dictDelete(dict,node) __gl_dictListDelete(dict,node) - -#define dictKey(n) __gl_dictListKey(n) -#define dictSucc(n) __gl_dictListSucc(n) -#define dictPred(n) __gl_dictListPred(n) -#define dictMin(d) __gl_dictListMin(d) -#define dictMax(d) __gl_dictListMax(d) - - - -typedef void *DictKey; -typedef struct Dict Dict; -typedef struct DictNode DictNode; - -Dict *dictNewDict( - void *frame, - int (*leq)(void *frame, DictKey key1, DictKey key2) ); - -void dictDeleteDict( Dict *dict ); - -/* Search returns the node with the smallest key greater than or equal - * to the given key. If there is no such key, returns a node whose - * key is NULL. Similarly, Succ(Max(d)) has a NULL key, etc. - */ -DictNode *dictSearch( Dict *dict, DictKey key ); -DictNode *dictInsertBefore( Dict *dict, DictNode *node, DictKey key ); -void dictDelete( Dict *dict, DictNode *node ); - -#define __gl_dictListKey(n) ((n)->key) -#define __gl_dictListSucc(n) ((n)->next) -#define __gl_dictListPred(n) ((n)->prev) -#define __gl_dictListMin(d) ((d)->head.next) -#define __gl_dictListMax(d) ((d)->head.prev) -#define __gl_dictListInsert(d,k) (dictInsertBefore((d),&(d)->head,(k))) - - -/*** Private data structures ***/ - -struct DictNode { - DictKey key; - DictNode *next; - DictNode *prev; -}; - -struct Dict { - DictNode head; - void *frame; - int (*leq)(void *frame, DictKey key1, DictKey key2); -}; - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/geom.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/geom.c deleted file mode 100644 index d009e143ad..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/geom.c +++ /dev/null @@ -1,271 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/geom.c,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include "mesh.h" -#include "geom.h" - -int __gl_vertLeq( GLUvertex *u, GLUvertex *v ) -{ - /* Returns TRUE if u is lexicographically <= v. */ - - return VertLeq( u, v ); -} - -GLdouble __gl_edgeEval( GLUvertex *u, GLUvertex *v, GLUvertex *w ) -{ - /* Given three vertices u,v,w such that VertLeq(u,v) && VertLeq(v,w), - * evaluates the t-coord of the edge uw at the s-coord of the vertex v. - * Returns v->t - (uw)(v->s), ie. the signed distance from uw to v. - * If uw is vertical (and thus passes thru v), the result is zero. - * - * The calculation is extremely accurate and stable, even when v - * is very close to u or w. In particular if we set v->t = 0 and - * let r be the negated result (this evaluates (uw)(v->s)), then - * r is guaranteed to satisfy MIN(u->t,w->t) <= r <= MAX(u->t,w->t). - */ - GLdouble gapL, gapR; - - assert( VertLeq( u, v ) && VertLeq( v, w )); - - gapL = v->s - u->s; - gapR = w->s - v->s; - - if( gapL + gapR > 0 ) { - if( gapL < gapR ) { - return (v->t - u->t) + (u->t - w->t) * (gapL / (gapL + gapR)); - } else { - return (v->t - w->t) + (w->t - u->t) * (gapR / (gapL + gapR)); - } - } - /* vertical line */ - return 0; -} - -GLdouble __gl_edgeSign( GLUvertex *u, GLUvertex *v, GLUvertex *w ) -{ - /* Returns a number whose sign matches EdgeEval(u,v,w) but which - * is cheaper to evaluate. Returns > 0, == 0 , or < 0 - * as v is above, on, or below the edge uw. - */ - GLdouble gapL, gapR; - - assert( VertLeq( u, v ) && VertLeq( v, w )); - - gapL = v->s - u->s; - gapR = w->s - v->s; - - if( gapL + gapR > 0 ) { - return (v->t - w->t) * gapL + (v->t - u->t) * gapR; - } - /* vertical line */ - return 0; -} - - -/*********************************************************************** - * Define versions of EdgeSign, EdgeEval with s and t transposed. - */ - -GLdouble __gl_transEval( GLUvertex *u, GLUvertex *v, GLUvertex *w ) -{ - /* Given three vertices u,v,w such that TransLeq(u,v) && TransLeq(v,w), - * evaluates the t-coord of the edge uw at the s-coord of the vertex v. - * Returns v->s - (uw)(v->t), ie. the signed distance from uw to v. - * If uw is vertical (and thus passes thru v), the result is zero. - * - * The calculation is extremely accurate and stable, even when v - * is very close to u or w. In particular if we set v->s = 0 and - * let r be the negated result (this evaluates (uw)(v->t)), then - * r is guaranteed to satisfy MIN(u->s,w->s) <= r <= MAX(u->s,w->s). - */ - GLdouble gapL, gapR; - - assert( TransLeq( u, v ) && TransLeq( v, w )); - - gapL = v->t - u->t; - gapR = w->t - v->t; - - if( gapL + gapR > 0 ) { - if( gapL < gapR ) { - return (v->s - u->s) + (u->s - w->s) * (gapL / (gapL + gapR)); - } else { - return (v->s - w->s) + (w->s - u->s) * (gapR / (gapL + gapR)); - } - } - /* vertical line */ - return 0; -} - -GLdouble __gl_transSign( GLUvertex *u, GLUvertex *v, GLUvertex *w ) -{ - /* Returns a number whose sign matches TransEval(u,v,w) but which - * is cheaper to evaluate. Returns > 0, == 0 , or < 0 - * as v is above, on, or below the edge uw. - */ - GLdouble gapL, gapR; - - assert( TransLeq( u, v ) && TransLeq( v, w )); - - gapL = v->t - u->t; - gapR = w->t - v->t; - - if( gapL + gapR > 0 ) { - return (v->s - w->s) * gapL + (v->s - u->s) * gapR; - } - /* vertical line */ - return 0; -} - - -int __gl_vertCCW( GLUvertex *u, GLUvertex *v, GLUvertex *w ) -{ - /* For almost-degenerate situations, the results are not reliable. - * Unless the floating-point arithmetic can be performed without - * rounding errors, *any* implementation will give incorrect results - * on some degenerate inputs, so the client must have some way to - * handle this situation. - */ - return (u->s*(v->t - w->t) + v->s*(w->t - u->t) + w->s*(u->t - v->t)) >= 0; -} - -/* Given parameters a,x,b,y returns the value (b*x+a*y)/(a+b), - * or (x+y)/2 if a==b==0. It requires that a,b >= 0, and enforces - * this in the rare case that one argument is slightly negative. - * The implementation is extremely stable numerically. - * In particular it guarantees that the result r satisfies - * MIN(x,y) <= r <= MAX(x,y), and the results are very accurate - * even when a and b differ greatly in magnitude. - */ -#define RealInterpolate(a,x,b,y) \ - (a = (a < 0) ? 0 : a, b = (b < 0) ? 0 : b, \ - ((a <= b) ? ((b == 0) ? ((x+y) / 2) \ - : (x + (y-x) * (a/(a+b)))) \ - : (y + (x-y) * (b/(a+b))))) - -#ifndef FOR_TRITE_TEST_PROGRAM -#define Interpolate(a,x,b,y) RealInterpolate(a,x,b,y) -#else - -/* Claim: the ONLY property the sweep algorithm relies on is that - * MIN(x,y) <= r <= MAX(x,y). This is a nasty way to test that. - */ -#include -extern int RandomInterpolate; - -GLdouble Interpolate( GLdouble a, GLdouble x, GLdouble b, GLdouble y) -{ -printf("*********************%d\n",RandomInterpolate); - if( RandomInterpolate ) { - a = 1.2 * drand48() - 0.1; - a = (a < 0) ? 0 : ((a > 1) ? 1 : a); - b = 1.0 - a; - } - return RealInterpolate(a,x,b,y); -} - -#endif - -#define Swap(a,b) if (1) { GLUvertex *t = a; a = b; b = t; } else - -void __gl_edgeIntersect( GLUvertex *o1, GLUvertex *d1, - GLUvertex *o2, GLUvertex *d2, - GLUvertex *v ) -/* Given edges (o1,d1) and (o2,d2), compute their point of intersection. - * The computed point is guaranteed to lie in the intersection of the - * bounding rectangles defined by each edge. - */ -{ - GLdouble z1, z2; - - /* This is certainly not the most efficient way to find the intersection - * of two line segments, but it is very numerically stable. - * - * Strategy: find the two middle vertices in the VertLeq ordering, - * and interpolate the intersection s-value from these. Then repeat - * using the TransLeq ordering to find the intersection t-value. - */ - - if( ! VertLeq( o1, d1 )) { Swap( o1, d1 ); } - if( ! VertLeq( o2, d2 )) { Swap( o2, d2 ); } - if( ! VertLeq( o1, o2 )) { Swap( o1, o2 ); Swap( d1, d2 ); } - - if( ! VertLeq( o2, d1 )) { - /* Technically, no intersection -- do our best */ - v->s = (o2->s + d1->s) / 2; - } else if( VertLeq( d1, d2 )) { - /* Interpolate between o2 and d1 */ - z1 = EdgeEval( o1, o2, d1 ); - z2 = EdgeEval( o2, d1, d2 ); - if( z1+z2 < 0 ) { z1 = -z1; z2 = -z2; } - v->s = Interpolate( z1, o2->s, z2, d1->s ); - } else { - /* Interpolate between o2 and d2 */ - z1 = EdgeSign( o1, o2, d1 ); - z2 = -EdgeSign( o1, d2, d1 ); - if( z1+z2 < 0 ) { z1 = -z1; z2 = -z2; } - v->s = Interpolate( z1, o2->s, z2, d2->s ); - } - - /* Now repeat the process for t */ - - if( ! TransLeq( o1, d1 )) { Swap( o1, d1 ); } - if( ! TransLeq( o2, d2 )) { Swap( o2, d2 ); } - if( ! TransLeq( o1, o2 )) { Swap( o1, o2 ); Swap( d1, d2 ); } - - if( ! TransLeq( o2, d1 )) { - /* Technically, no intersection -- do our best */ - v->t = (o2->t + d1->t) / 2; - } else if( TransLeq( d1, d2 )) { - /* Interpolate between o2 and d1 */ - z1 = TransEval( o1, o2, d1 ); - z2 = TransEval( o2, d1, d2 ); - if( z1+z2 < 0 ) { z1 = -z1; z2 = -z2; } - v->t = Interpolate( z1, o2->t, z2, d1->t ); - } else { - /* Interpolate between o2 and d2 */ - z1 = TransSign( o1, o2, d1 ); - z2 = -TransSign( o1, d2, d1 ); - if( z1+z2 < 0 ) { z1 = -z1; z2 = -z2; } - v->t = Interpolate( z1, o2->t, z2, d2->t ); - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/geom.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/geom.h deleted file mode 100644 index 7e1e86528a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/geom.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -*/ - -#ifndef __geom_h_ -#define __geom_h_ - -#include "mesh.h" - -#ifdef NO_BRANCH_CONDITIONS -/* MIPS architecture has special instructions to evaluate boolean - * conditions -- more efficient than branching, IF you can get the - * compiler to generate the right instructions (SGI compiler doesn't) - */ -#define VertEq(u,v) (((u)->s == (v)->s) & ((u)->t == (v)->t)) -#define VertLeq(u,v) (((u)->s < (v)->s) | \ - ((u)->s == (v)->s & (u)->t <= (v)->t)) -#else -#define VertEq(u,v) ((u)->s == (v)->s && (u)->t == (v)->t) -#define VertLeq(u,v) (((u)->s < (v)->s) || \ - ((u)->s == (v)->s && (u)->t <= (v)->t)) -#endif - -#define EdgeEval(u,v,w) __gl_edgeEval(u,v,w) -#define EdgeSign(u,v,w) __gl_edgeSign(u,v,w) - -/* Versions of VertLeq, EdgeSign, EdgeEval with s and t transposed. */ - -#define TransLeq(u,v) (((u)->t < (v)->t) || \ - ((u)->t == (v)->t && (u)->s <= (v)->s)) -#define TransEval(u,v,w) __gl_transEval(u,v,w) -#define TransSign(u,v,w) __gl_transSign(u,v,w) - - -#define EdgeGoesLeft(e) VertLeq( (e)->Dst, (e)->Org ) -#define EdgeGoesRight(e) VertLeq( (e)->Org, (e)->Dst ) - -#undef ABS -#define ABS(x) ((x) < 0 ? -(x) : (x)) -#define VertL1dist(u,v) (ABS(u->s - v->s) + ABS(u->t - v->t)) - -#define VertCCW(u,v,w) __gl_vertCCW(u,v,w) - -int __gl_vertLeq( GLUvertex *u, GLUvertex *v ); -GLdouble __gl_edgeEval( GLUvertex *u, GLUvertex *v, GLUvertex *w ); -GLdouble __gl_edgeSign( GLUvertex *u, GLUvertex *v, GLUvertex *w ); -GLdouble __gl_transEval( GLUvertex *u, GLUvertex *v, GLUvertex *w ); -GLdouble __gl_transSign( GLUvertex *u, GLUvertex *v, GLUvertex *w ); -int __gl_vertCCW( GLUvertex *u, GLUvertex *v, GLUvertex *w ); -void __gl_edgeIntersect( GLUvertex *o1, GLUvertex *d1, - GLUvertex *o2, GLUvertex *d2, - GLUvertex *v ); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/memalloc.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/memalloc.c deleted file mode 100644 index 61fd59aaed..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/memalloc.c +++ /dev/null @@ -1,62 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/memalloc.c,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include "memalloc.h" -#include "string.h" - -int __gl_memInit( size_t maxFast ) -{ -#ifndef NO_MALLOPT -/* mallopt( M_MXFAST, maxFast );*/ -#ifdef MEMORY_DEBUG - mallopt( M_DEBUG, 1 ); -#endif -#endif - return 1; -} - -#ifdef MEMORY_DEBUG -void *__gl_memAlloc( size_t n ) -{ - return memset( malloc( n ), 0xa5, n ); -} -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/memalloc.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/memalloc.h deleted file mode 100644 index 97f223759d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/memalloc.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2003/07/24 22:41:17 $ $Revision: 1.4 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/memalloc.h,v 1.4 2003/07/24 22:41:17 brianp Exp $ -*/ - -#ifndef __memalloc_simple_h_ -#define __memalloc_simple_h_ - -#include - -#define memRealloc realloc -#define memFree free - -#define memInit __gl_memInit -/*extern void __gl_memInit( size_t );*/ -extern int __gl_memInit( size_t ); - -#ifndef MEMORY_DEBUG -#define memAlloc malloc -#else -#define memAlloc __gl_memAlloc -extern void * __gl_memAlloc( size_t ); -#endif - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/mesh.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/mesh.c deleted file mode 100644 index 045954db91..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/mesh.c +++ /dev/null @@ -1,796 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/mesh.c,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include -#include "mesh.h" -#include "memalloc.h" - -#define TRUE 1 -#define FALSE 0 - -static GLUvertex *allocVertex() -{ - return (GLUvertex *)memAlloc( sizeof( GLUvertex )); -} - -static GLUface *allocFace() -{ - return (GLUface *)memAlloc( sizeof( GLUface )); -} - -/************************ Utility Routines ************************/ - -/* Allocate and free half-edges in pairs for efficiency. - * The *only* place that should use this fact is allocation/free. - */ -typedef struct { GLUhalfEdge e, eSym; } EdgePair; - -/* MakeEdge creates a new pair of half-edges which form their own loop. - * No vertex or face structures are allocated, but these must be assigned - * before the current edge operation is completed. - */ -static GLUhalfEdge *MakeEdge( GLUhalfEdge *eNext ) -{ - GLUhalfEdge *e; - GLUhalfEdge *eSym; - GLUhalfEdge *ePrev; - EdgePair *pair = (EdgePair *)memAlloc( sizeof( EdgePair )); - if (pair == NULL) return NULL; - - e = &pair->e; - eSym = &pair->eSym; - - /* Make sure eNext points to the first edge of the edge pair */ - if( eNext->Sym < eNext ) { eNext = eNext->Sym; } - - /* Insert in circular doubly-linked list before eNext. - * Note that the prev pointer is stored in Sym->next. - */ - ePrev = eNext->Sym->next; - eSym->next = ePrev; - ePrev->Sym->next = e; - e->next = eNext; - eNext->Sym->next = eSym; - - e->Sym = eSym; - e->Onext = e; - e->Lnext = eSym; - e->Org = NULL; - e->Lface = NULL; - e->winding = 0; - e->activeRegion = NULL; - - eSym->Sym = e; - eSym->Onext = eSym; - eSym->Lnext = e; - eSym->Org = NULL; - eSym->Lface = NULL; - eSym->winding = 0; - eSym->activeRegion = NULL; - - return e; -} - -/* Splice( a, b ) is best described by the Guibas/Stolfi paper or the - * CS348a notes (see mesh.h). Basically it modifies the mesh so that - * a->Onext and b->Onext are exchanged. This can have various effects - * depending on whether a and b belong to different face or vertex rings. - * For more explanation see __gl_meshSplice() below. - */ -static void Splice( GLUhalfEdge *a, GLUhalfEdge *b ) -{ - GLUhalfEdge *aOnext = a->Onext; - GLUhalfEdge *bOnext = b->Onext; - - aOnext->Sym->Lnext = b; - bOnext->Sym->Lnext = a; - a->Onext = bOnext; - b->Onext = aOnext; -} - -/* MakeVertex( newVertex, eOrig, vNext ) attaches a new vertex and makes it the - * origin of all edges in the vertex loop to which eOrig belongs. "vNext" gives - * a place to insert the new vertex in the global vertex list. We insert - * the new vertex *before* vNext so that algorithms which walk the vertex - * list will not see the newly created vertices. - */ -static void MakeVertex( GLUvertex *newVertex, - GLUhalfEdge *eOrig, GLUvertex *vNext ) -{ - GLUhalfEdge *e; - GLUvertex *vPrev; - GLUvertex *vNew = newVertex; - - assert(vNew != NULL); - - /* insert in circular doubly-linked list before vNext */ - vPrev = vNext->prev; - vNew->prev = vPrev; - vPrev->next = vNew; - vNew->next = vNext; - vNext->prev = vNew; - - vNew->anEdge = eOrig; - vNew->data = NULL; - /* leave coords, s, t undefined */ - - /* fix other edges on this vertex loop */ - e = eOrig; - do { - e->Org = vNew; - e = e->Onext; - } while( e != eOrig ); -} - -/* MakeFace( newFace, eOrig, fNext ) attaches a new face and makes it the left - * face of all edges in the face loop to which eOrig belongs. "fNext" gives - * a place to insert the new face in the global face list. We insert - * the new face *before* fNext so that algorithms which walk the face - * list will not see the newly created faces. - */ -static void MakeFace( GLUface *newFace, GLUhalfEdge *eOrig, GLUface *fNext ) -{ - GLUhalfEdge *e; - GLUface *fPrev; - GLUface *fNew = newFace; - - assert(fNew != NULL); - - /* insert in circular doubly-linked list before fNext */ - fPrev = fNext->prev; - fNew->prev = fPrev; - fPrev->next = fNew; - fNew->next = fNext; - fNext->prev = fNew; - - fNew->anEdge = eOrig; - fNew->data = NULL; - fNew->trail = NULL; - fNew->marked = FALSE; - - /* The new face is marked "inside" if the old one was. This is a - * convenience for the common case where a face has been split in two. - */ - fNew->inside = fNext->inside; - - /* fix other edges on this face loop */ - e = eOrig; - do { - e->Lface = fNew; - e = e->Lnext; - } while( e != eOrig ); -} - -/* KillEdge( eDel ) destroys an edge (the half-edges eDel and eDel->Sym), - * and removes from the global edge list. - */ -static void KillEdge( GLUhalfEdge *eDel ) -{ - GLUhalfEdge *ePrev, *eNext; - - /* Half-edges are allocated in pairs, see EdgePair above */ - if( eDel->Sym < eDel ) { eDel = eDel->Sym; } - - /* delete from circular doubly-linked list */ - eNext = eDel->next; - ePrev = eDel->Sym->next; - eNext->Sym->next = ePrev; - ePrev->Sym->next = eNext; - - memFree( eDel ); -} - - -/* KillVertex( vDel ) destroys a vertex and removes it from the global - * vertex list. It updates the vertex loop to point to a given new vertex. - */ -static void KillVertex( GLUvertex *vDel, GLUvertex *newOrg ) -{ - GLUhalfEdge *e, *eStart = vDel->anEdge; - GLUvertex *vPrev, *vNext; - - /* change the origin of all affected edges */ - e = eStart; - do { - e->Org = newOrg; - e = e->Onext; - } while( e != eStart ); - - /* delete from circular doubly-linked list */ - vPrev = vDel->prev; - vNext = vDel->next; - vNext->prev = vPrev; - vPrev->next = vNext; - - memFree( vDel ); -} - -/* KillFace( fDel ) destroys a face and removes it from the global face - * list. It updates the face loop to point to a given new face. - */ -static void KillFace( GLUface *fDel, GLUface *newLface ) -{ - GLUhalfEdge *e, *eStart = fDel->anEdge; - GLUface *fPrev, *fNext; - - /* change the left face of all affected edges */ - e = eStart; - do { - e->Lface = newLface; - e = e->Lnext; - } while( e != eStart ); - - /* delete from circular doubly-linked list */ - fPrev = fDel->prev; - fNext = fDel->next; - fNext->prev = fPrev; - fPrev->next = fNext; - - memFree( fDel ); -} - - -/****************** Basic Edge Operations **********************/ - -/* __gl_meshMakeEdge creates one edge, two vertices, and a loop (face). - * The loop consists of the two new half-edges. - */ -GLUhalfEdge *__gl_meshMakeEdge( GLUmesh *mesh ) -{ - GLUvertex *newVertex1= allocVertex(); - GLUvertex *newVertex2= allocVertex(); - GLUface *newFace= allocFace(); - GLUhalfEdge *e; - - /* if any one is null then all get freed */ - if (newVertex1 == NULL || newVertex2 == NULL || newFace == NULL) { - if (newVertex1 != NULL) memFree(newVertex1); - if (newVertex2 != NULL) memFree(newVertex2); - if (newFace != NULL) memFree(newFace); - return NULL; - } - - e = MakeEdge( &mesh->eHead ); - if (e == NULL) return NULL; - - MakeVertex( newVertex1, e, &mesh->vHead ); - MakeVertex( newVertex2, e->Sym, &mesh->vHead ); - MakeFace( newFace, e, &mesh->fHead ); - return e; -} - - -/* __gl_meshSplice( eOrg, eDst ) is the basic operation for changing the - * mesh connectivity and topology. It changes the mesh so that - * eOrg->Onext <- OLD( eDst->Onext ) - * eDst->Onext <- OLD( eOrg->Onext ) - * where OLD(...) means the value before the meshSplice operation. - * - * This can have two effects on the vertex structure: - * - if eOrg->Org != eDst->Org, the two vertices are merged together - * - if eOrg->Org == eDst->Org, the origin is split into two vertices - * In both cases, eDst->Org is changed and eOrg->Org is untouched. - * - * Similarly (and independently) for the face structure, - * - if eOrg->Lface == eDst->Lface, one loop is split into two - * - if eOrg->Lface != eDst->Lface, two distinct loops are joined into one - * In both cases, eDst->Lface is changed and eOrg->Lface is unaffected. - * - * Some special cases: - * If eDst == eOrg, the operation has no effect. - * If eDst == eOrg->Lnext, the new face will have a single edge. - * If eDst == eOrg->Lprev, the old face will have a single edge. - * If eDst == eOrg->Onext, the new vertex will have a single edge. - * If eDst == eOrg->Oprev, the old vertex will have a single edge. - */ -int __gl_meshSplice( GLUhalfEdge *eOrg, GLUhalfEdge *eDst ) -{ - int joiningLoops = FALSE; - int joiningVertices = FALSE; - - if( eOrg == eDst ) return 1; - - if( eDst->Org != eOrg->Org ) { - /* We are merging two disjoint vertices -- destroy eDst->Org */ - joiningVertices = TRUE; - KillVertex( eDst->Org, eOrg->Org ); - } - if( eDst->Lface != eOrg->Lface ) { - /* We are connecting two disjoint loops -- destroy eDst->Lface */ - joiningLoops = TRUE; - KillFace( eDst->Lface, eOrg->Lface ); - } - - /* Change the edge structure */ - Splice( eDst, eOrg ); - - if( ! joiningVertices ) { - GLUvertex *newVertex= allocVertex(); - if (newVertex == NULL) return 0; - - /* We split one vertex into two -- the new vertex is eDst->Org. - * Make sure the old vertex points to a valid half-edge. - */ - MakeVertex( newVertex, eDst, eOrg->Org ); - eOrg->Org->anEdge = eOrg; - } - if( ! joiningLoops ) { - GLUface *newFace= allocFace(); - if (newFace == NULL) return 0; - - /* We split one loop into two -- the new loop is eDst->Lface. - * Make sure the old face points to a valid half-edge. - */ - MakeFace( newFace, eDst, eOrg->Lface ); - eOrg->Lface->anEdge = eOrg; - } - - return 1; -} - - -/* __gl_meshDelete( eDel ) removes the edge eDel. There are several cases: - * if (eDel->Lface != eDel->Rface), we join two loops into one; the loop - * eDel->Lface is deleted. Otherwise, we are splitting one loop into two; - * the newly created loop will contain eDel->Dst. If the deletion of eDel - * would create isolated vertices, those are deleted as well. - * - * This function could be implemented as two calls to __gl_meshSplice - * plus a few calls to memFree, but this would allocate and delete - * unnecessary vertices and faces. - */ -int __gl_meshDelete( GLUhalfEdge *eDel ) -{ - GLUhalfEdge *eDelSym = eDel->Sym; - int joiningLoops = FALSE; - - /* First step: disconnect the origin vertex eDel->Org. We make all - * changes to get a consistent mesh in this "intermediate" state. - */ - if( eDel->Lface != eDel->Rface ) { - /* We are joining two loops into one -- remove the left face */ - joiningLoops = TRUE; - KillFace( eDel->Lface, eDel->Rface ); - } - - if( eDel->Onext == eDel ) { - KillVertex( eDel->Org, NULL ); - } else { - /* Make sure that eDel->Org and eDel->Rface point to valid half-edges */ - eDel->Rface->anEdge = eDel->Oprev; - eDel->Org->anEdge = eDel->Onext; - - Splice( eDel, eDel->Oprev ); - if( ! joiningLoops ) { - GLUface *newFace= allocFace(); - if (newFace == NULL) return 0; - - /* We are splitting one loop into two -- create a new loop for eDel. */ - MakeFace( newFace, eDel, eDel->Lface ); - } - } - - /* Claim: the mesh is now in a consistent state, except that eDel->Org - * may have been deleted. Now we disconnect eDel->Dst. - */ - if( eDelSym->Onext == eDelSym ) { - KillVertex( eDelSym->Org, NULL ); - KillFace( eDelSym->Lface, NULL ); - } else { - /* Make sure that eDel->Dst and eDel->Lface point to valid half-edges */ - eDel->Lface->anEdge = eDelSym->Oprev; - eDelSym->Org->anEdge = eDelSym->Onext; - Splice( eDelSym, eDelSym->Oprev ); - } - - /* Any isolated vertices or faces have already been freed. */ - KillEdge( eDel ); - - return 1; -} - - -/******************** Other Edge Operations **********************/ - -/* All these routines can be implemented with the basic edge - * operations above. They are provided for convenience and efficiency. - */ - - -/* __gl_meshAddEdgeVertex( eOrg ) creates a new edge eNew such that - * eNew == eOrg->Lnext, and eNew->Dst is a newly created vertex. - * eOrg and eNew will have the same left face. - */ -GLUhalfEdge *__gl_meshAddEdgeVertex( GLUhalfEdge *eOrg ) -{ - GLUhalfEdge *eNewSym; - GLUhalfEdge *eNew = MakeEdge( eOrg ); - if (eNew == NULL) return NULL; - - eNewSym = eNew->Sym; - - /* Connect the new edge appropriately */ - Splice( eNew, eOrg->Lnext ); - - /* Set the vertex and face information */ - eNew->Org = eOrg->Dst; - { - GLUvertex *newVertex= allocVertex(); - if (newVertex == NULL) return NULL; - - MakeVertex( newVertex, eNewSym, eNew->Org ); - } - eNew->Lface = eNewSym->Lface = eOrg->Lface; - - return eNew; -} - - -/* __gl_meshSplitEdge( eOrg ) splits eOrg into two edges eOrg and eNew, - * such that eNew == eOrg->Lnext. The new vertex is eOrg->Dst == eNew->Org. - * eOrg and eNew will have the same left face. - */ -GLUhalfEdge *__gl_meshSplitEdge( GLUhalfEdge *eOrg ) -{ - GLUhalfEdge *eNew; - GLUhalfEdge *tempHalfEdge= __gl_meshAddEdgeVertex( eOrg ); - if (tempHalfEdge == NULL) return NULL; - - eNew = tempHalfEdge->Sym; - - /* Disconnect eOrg from eOrg->Dst and connect it to eNew->Org */ - Splice( eOrg->Sym, eOrg->Sym->Oprev ); - Splice( eOrg->Sym, eNew ); - - /* Set the vertex and face information */ - eOrg->Dst = eNew->Org; - eNew->Dst->anEdge = eNew->Sym; /* may have pointed to eOrg->Sym */ - eNew->Rface = eOrg->Rface; - eNew->winding = eOrg->winding; /* copy old winding information */ - eNew->Sym->winding = eOrg->Sym->winding; - - return eNew; -} - - -/* __gl_meshConnect( eOrg, eDst ) creates a new edge from eOrg->Dst - * to eDst->Org, and returns the corresponding half-edge eNew. - * If eOrg->Lface == eDst->Lface, this splits one loop into two, - * and the newly created loop is eNew->Lface. Otherwise, two disjoint - * loops are merged into one, and the loop eDst->Lface is destroyed. - * - * If (eOrg == eDst), the new face will have only two edges. - * If (eOrg->Lnext == eDst), the old face is reduced to a single edge. - * If (eOrg->Lnext->Lnext == eDst), the old face is reduced to two edges. - */ -GLUhalfEdge *__gl_meshConnect( GLUhalfEdge *eOrg, GLUhalfEdge *eDst ) -{ - GLUhalfEdge *eNewSym; - int joiningLoops = FALSE; - GLUhalfEdge *eNew = MakeEdge( eOrg ); - if (eNew == NULL) return NULL; - - eNewSym = eNew->Sym; - - if( eDst->Lface != eOrg->Lface ) { - /* We are connecting two disjoint loops -- destroy eDst->Lface */ - joiningLoops = TRUE; - KillFace( eDst->Lface, eOrg->Lface ); - } - - /* Connect the new edge appropriately */ - Splice( eNew, eOrg->Lnext ); - Splice( eNewSym, eDst ); - - /* Set the vertex and face information */ - eNew->Org = eOrg->Dst; - eNewSym->Org = eDst->Org; - eNew->Lface = eNewSym->Lface = eOrg->Lface; - - /* Make sure the old face points to a valid half-edge */ - eOrg->Lface->anEdge = eNewSym; - - if( ! joiningLoops ) { - GLUface *newFace= allocFace(); - if (newFace == NULL) return NULL; - - /* We split one loop into two -- the new loop is eNew->Lface */ - MakeFace( newFace, eNew, eOrg->Lface ); - } - return eNew; -} - - -/******************** Other Operations **********************/ - -/* __gl_meshZapFace( fZap ) destroys a face and removes it from the - * global face list. All edges of fZap will have a NULL pointer as their - * left face. Any edges which also have a NULL pointer as their right face - * are deleted entirely (along with any isolated vertices this produces). - * An entire mesh can be deleted by zapping its faces, one at a time, - * in any order. Zapped faces cannot be used in further mesh operations! - */ -void __gl_meshZapFace( GLUface *fZap ) -{ - GLUhalfEdge *eStart = fZap->anEdge; - GLUhalfEdge *e, *eNext, *eSym; - GLUface *fPrev, *fNext; - - /* walk around face, deleting edges whose right face is also NULL */ - eNext = eStart->Lnext; - do { - e = eNext; - eNext = e->Lnext; - - e->Lface = NULL; - if( e->Rface == NULL ) { - /* delete the edge -- see __gl_MeshDelete above */ - - if( e->Onext == e ) { - KillVertex( e->Org, NULL ); - } else { - /* Make sure that e->Org points to a valid half-edge */ - e->Org->anEdge = e->Onext; - Splice( e, e->Oprev ); - } - eSym = e->Sym; - if( eSym->Onext == eSym ) { - KillVertex( eSym->Org, NULL ); - } else { - /* Make sure that eSym->Org points to a valid half-edge */ - eSym->Org->anEdge = eSym->Onext; - Splice( eSym, eSym->Oprev ); - } - KillEdge( e ); - } - } while( e != eStart ); - - /* delete from circular doubly-linked list */ - fPrev = fZap->prev; - fNext = fZap->next; - fNext->prev = fPrev; - fPrev->next = fNext; - - memFree( fZap ); -} - - -/* __gl_meshNewMesh() creates a new mesh with no edges, no vertices, - * and no loops (what we usually call a "face"). - */ -GLUmesh *__gl_meshNewMesh( void ) -{ - GLUvertex *v; - GLUface *f; - GLUhalfEdge *e; - GLUhalfEdge *eSym; - GLUmesh *mesh = (GLUmesh *)memAlloc( sizeof( GLUmesh )); - if (mesh == NULL) { - return NULL; - } - - v = &mesh->vHead; - f = &mesh->fHead; - e = &mesh->eHead; - eSym = &mesh->eHeadSym; - - v->next = v->prev = v; - v->anEdge = NULL; - v->data = NULL; - - f->next = f->prev = f; - f->anEdge = NULL; - f->data = NULL; - f->trail = NULL; - f->marked = FALSE; - f->inside = FALSE; - - e->next = e; - e->Sym = eSym; - e->Onext = NULL; - e->Lnext = NULL; - e->Org = NULL; - e->Lface = NULL; - e->winding = 0; - e->activeRegion = NULL; - - eSym->next = eSym; - eSym->Sym = e; - eSym->Onext = NULL; - eSym->Lnext = NULL; - eSym->Org = NULL; - eSym->Lface = NULL; - eSym->winding = 0; - eSym->activeRegion = NULL; - - return mesh; -} - - -/* __gl_meshUnion( mesh1, mesh2 ) forms the union of all structures in - * both meshes, and returns the new mesh (the old meshes are destroyed). - */ -GLUmesh *__gl_meshUnion( GLUmesh *mesh1, GLUmesh *mesh2 ) -{ - GLUface *f1 = &mesh1->fHead; - GLUvertex *v1 = &mesh1->vHead; - GLUhalfEdge *e1 = &mesh1->eHead; - GLUface *f2 = &mesh2->fHead; - GLUvertex *v2 = &mesh2->vHead; - GLUhalfEdge *e2 = &mesh2->eHead; - - /* Add the faces, vertices, and edges of mesh2 to those of mesh1 */ - if( f2->next != f2 ) { - f1->prev->next = f2->next; - f2->next->prev = f1->prev; - f2->prev->next = f1; - f1->prev = f2->prev; - } - - if( v2->next != v2 ) { - v1->prev->next = v2->next; - v2->next->prev = v1->prev; - v2->prev->next = v1; - v1->prev = v2->prev; - } - - if( e2->next != e2 ) { - e1->Sym->next->Sym->next = e2->next; - e2->next->Sym->next = e1->Sym->next; - e2->Sym->next->Sym->next = e1; - e1->Sym->next = e2->Sym->next; - } - - memFree( mesh2 ); - return mesh1; -} - - -#ifdef DELETE_BY_ZAPPING - -/* __gl_meshDeleteMesh( mesh ) will free all storage for any valid mesh. - */ -void __gl_meshDeleteMesh( GLUmesh *mesh ) -{ - GLUface *fHead = &mesh->fHead; - - while( fHead->next != fHead ) { - __gl_meshZapFace( fHead->next ); - } - assert( mesh->vHead.next == &mesh->vHead ); - - memFree( mesh ); -} - -#else - -/* __gl_meshDeleteMesh( mesh ) will free all storage for any valid mesh. - */ -void __gl_meshDeleteMesh( GLUmesh *mesh ) -{ - GLUface *f, *fNext; - GLUvertex *v, *vNext; - GLUhalfEdge *e, *eNext; - - for( f = mesh->fHead.next; f != &mesh->fHead; f = fNext ) { - fNext = f->next; - memFree( f ); - } - - for( v = mesh->vHead.next; v != &mesh->vHead; v = vNext ) { - vNext = v->next; - memFree( v ); - } - - for( e = mesh->eHead.next; e != &mesh->eHead; e = eNext ) { - /* One call frees both e and e->Sym (see EdgePair above) */ - eNext = e->next; - memFree( e ); - } - - memFree( mesh ); -} - -#endif - -#ifndef NDEBUG - -/* __gl_meshCheckMesh( mesh ) checks a mesh for self-consistency. - */ -void __gl_meshCheckMesh( GLUmesh *mesh ) -{ - GLUface *fHead = &mesh->fHead; - GLUvertex *vHead = &mesh->vHead; - GLUhalfEdge *eHead = &mesh->eHead; - GLUface *f, *fPrev; - GLUvertex *v, *vPrev; - GLUhalfEdge *e, *ePrev; - - fPrev = fHead; - for( fPrev = fHead ; (f = fPrev->next) != fHead; fPrev = f) { - assert( f->prev == fPrev ); - e = f->anEdge; - do { - assert( e->Sym != e ); - assert( e->Sym->Sym == e ); - assert( e->Lnext->Onext->Sym == e ); - assert( e->Onext->Sym->Lnext == e ); - assert( e->Lface == f ); - e = e->Lnext; - } while( e != f->anEdge ); - } - assert( f->prev == fPrev && f->anEdge == NULL && f->data == NULL ); - - vPrev = vHead; - for( vPrev = vHead ; (v = vPrev->next) != vHead; vPrev = v) { - assert( v->prev == vPrev ); - e = v->anEdge; - do { - assert( e->Sym != e ); - assert( e->Sym->Sym == e ); - assert( e->Lnext->Onext->Sym == e ); - assert( e->Onext->Sym->Lnext == e ); - assert( e->Org == v ); - e = e->Onext; - } while( e != v->anEdge ); - } - assert( v->prev == vPrev && v->anEdge == NULL && v->data == NULL ); - - ePrev = eHead; - for( ePrev = eHead ; (e = ePrev->next) != eHead; ePrev = e) { - assert( e->Sym->next == ePrev->Sym ); - assert( e->Sym != e ); - assert( e->Sym->Sym == e ); - assert( e->Org != NULL ); - assert( e->Dst != NULL ); - assert( e->Lnext->Onext->Sym == e ); - assert( e->Onext->Sym->Lnext == e ); - } - assert( e->Sym->next == ePrev->Sym - && e->Sym == &mesh->eHeadSym - && e->Sym->Sym == e - && e->Org == NULL && e->Dst == NULL - && e->Lface == NULL && e->Rface == NULL ); -} - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/mesh.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/mesh.h deleted file mode 100644 index 6224df415b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/mesh.h +++ /dev/null @@ -1,273 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/mesh.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef __mesh_h_ -#define __mesh_h_ - -#include - -typedef struct GLUmesh GLUmesh; - -typedef struct GLUvertex GLUvertex; -typedef struct GLUface GLUface; -typedef struct GLUhalfEdge GLUhalfEdge; - -typedef struct ActiveRegion ActiveRegion; /* Internal data */ - -/* The mesh structure is similar in spirit, notation, and operations - * to the "quad-edge" structure (see L. Guibas and J. Stolfi, Primitives - * for the manipulation of general subdivisions and the computation of - * Voronoi diagrams, ACM Transactions on Graphics, 4(2):74-123, April 1985). - * For a simplified description, see the course notes for CS348a, - * "Mathematical Foundations of Computer Graphics", available at the - * Stanford bookstore (and taught during the fall quarter). - * The implementation also borrows a tiny subset of the graph-based approach - * use in Mantyla's Geometric Work Bench (see M. Mantyla, An Introduction - * to Sold Modeling, Computer Science Press, Rockville, Maryland, 1988). - * - * The fundamental data structure is the "half-edge". Two half-edges - * go together to make an edge, but they point in opposite directions. - * Each half-edge has a pointer to its mate (the "symmetric" half-edge Sym), - * its origin vertex (Org), the face on its left side (Lface), and the - * adjacent half-edges in the CCW direction around the origin vertex - * (Onext) and around the left face (Lnext). There is also a "next" - * pointer for the global edge list (see below). - * - * The notation used for mesh navigation: - * Sym = the mate of a half-edge (same edge, but opposite direction) - * Onext = edge CCW around origin vertex (keep same origin) - * Dnext = edge CCW around destination vertex (keep same dest) - * Lnext = edge CCW around left face (dest becomes new origin) - * Rnext = edge CCW around right face (origin becomes new dest) - * - * "prev" means to substitute CW for CCW in the definitions above. - * - * The mesh keeps global lists of all vertices, faces, and edges, - * stored as doubly-linked circular lists with a dummy header node. - * The mesh stores pointers to these dummy headers (vHead, fHead, eHead). - * - * The circular edge list is special; since half-edges always occur - * in pairs (e and e->Sym), each half-edge stores a pointer in only - * one direction. Starting at eHead and following the e->next pointers - * will visit each *edge* once (ie. e or e->Sym, but not both). - * e->Sym stores a pointer in the opposite direction, thus it is - * always true that e->Sym->next->Sym->next == e. - * - * Each vertex has a pointer to next and previous vertices in the - * circular list, and a pointer to a half-edge with this vertex as - * the origin (NULL if this is the dummy header). There is also a - * field "data" for client data. - * - * Each face has a pointer to the next and previous faces in the - * circular list, and a pointer to a half-edge with this face as - * the left face (NULL if this is the dummy header). There is also - * a field "data" for client data. - * - * Note that what we call a "face" is really a loop; faces may consist - * of more than one loop (ie. not simply connected), but there is no - * record of this in the data structure. The mesh may consist of - * several disconnected regions, so it may not be possible to visit - * the entire mesh by starting at a half-edge and traversing the edge - * structure. - * - * The mesh does NOT support isolated vertices; a vertex is deleted along - * with its last edge. Similarly when two faces are merged, one of the - * faces is deleted (see __gl_meshDelete below). For mesh operations, - * all face (loop) and vertex pointers must not be NULL. However, once - * mesh manipulation is finished, __gl_MeshZapFace can be used to delete - * faces of the mesh, one at a time. All external faces can be "zapped" - * before the mesh is returned to the client; then a NULL face indicates - * a region which is not part of the output polygon. - */ - -struct GLUvertex { - GLUvertex *next; /* next vertex (never NULL) */ - GLUvertex *prev; /* previous vertex (never NULL) */ - GLUhalfEdge *anEdge; /* a half-edge with this origin */ - void *data; /* client's data */ - - /* Internal data (keep hidden) */ - GLdouble coords[3]; /* vertex location in 3D */ - GLdouble s, t; /* projection onto the sweep plane */ - long pqHandle; /* to allow deletion from priority queue */ -}; - -struct GLUface { - GLUface *next; /* next face (never NULL) */ - GLUface *prev; /* previous face (never NULL) */ - GLUhalfEdge *anEdge; /* a half edge with this left face */ - void *data; /* room for client's data */ - - /* Internal data (keep hidden) */ - GLUface *trail; /* "stack" for conversion to strips */ - GLboolean marked; /* flag for conversion to strips */ - GLboolean inside; /* this face is in the polygon interior */ -}; - -struct GLUhalfEdge { - GLUhalfEdge *next; /* doubly-linked list (prev==Sym->next) */ - GLUhalfEdge *Sym; /* same edge, opposite direction */ - GLUhalfEdge *Onext; /* next edge CCW around origin */ - GLUhalfEdge *Lnext; /* next edge CCW around left face */ - GLUvertex *Org; /* origin vertex (Overtex too long) */ - GLUface *Lface; /* left face */ - - /* Internal data (keep hidden) */ - ActiveRegion *activeRegion; /* a region with this upper edge (sweep.c) */ - int winding; /* change in winding number when crossing - from the right face to the left face */ -}; - -#define Rface Sym->Lface -#define Dst Sym->Org - -#define Oprev Sym->Lnext -#define Lprev Onext->Sym -#define Dprev Lnext->Sym -#define Rprev Sym->Onext -#define Dnext Rprev->Sym /* 3 pointers */ -#define Rnext Oprev->Sym /* 3 pointers */ - - -struct GLUmesh { - GLUvertex vHead; /* dummy header for vertex list */ - GLUface fHead; /* dummy header for face list */ - GLUhalfEdge eHead; /* dummy header for edge list */ - GLUhalfEdge eHeadSym; /* and its symmetric counterpart */ -}; - -/* The mesh operations below have three motivations: completeness, - * convenience, and efficiency. The basic mesh operations are MakeEdge, - * Splice, and Delete. All the other edge operations can be implemented - * in terms of these. The other operations are provided for convenience - * and/or efficiency. - * - * When a face is split or a vertex is added, they are inserted into the - * global list *before* the existing vertex or face (ie. e->Org or e->Lface). - * This makes it easier to process all vertices or faces in the global lists - * without worrying about processing the same data twice. As a convenience, - * when a face is split, the "inside" flag is copied from the old face. - * Other internal data (v->data, v->activeRegion, f->data, f->marked, - * f->trail, e->winding) is set to zero. - * - * ********************** Basic Edge Operations ************************** - * - * __gl_meshMakeEdge( mesh ) creates one edge, two vertices, and a loop. - * The loop (face) consists of the two new half-edges. - * - * __gl_meshSplice( eOrg, eDst ) is the basic operation for changing the - * mesh connectivity and topology. It changes the mesh so that - * eOrg->Onext <- OLD( eDst->Onext ) - * eDst->Onext <- OLD( eOrg->Onext ) - * where OLD(...) means the value before the meshSplice operation. - * - * This can have two effects on the vertex structure: - * - if eOrg->Org != eDst->Org, the two vertices are merged together - * - if eOrg->Org == eDst->Org, the origin is split into two vertices - * In both cases, eDst->Org is changed and eOrg->Org is untouched. - * - * Similarly (and independently) for the face structure, - * - if eOrg->Lface == eDst->Lface, one loop is split into two - * - if eOrg->Lface != eDst->Lface, two distinct loops are joined into one - * In both cases, eDst->Lface is changed and eOrg->Lface is unaffected. - * - * __gl_meshDelete( eDel ) removes the edge eDel. There are several cases: - * if (eDel->Lface != eDel->Rface), we join two loops into one; the loop - * eDel->Lface is deleted. Otherwise, we are splitting one loop into two; - * the newly created loop will contain eDel->Dst. If the deletion of eDel - * would create isolated vertices, those are deleted as well. - * - * ********************** Other Edge Operations ************************** - * - * __gl_meshAddEdgeVertex( eOrg ) creates a new edge eNew such that - * eNew == eOrg->Lnext, and eNew->Dst is a newly created vertex. - * eOrg and eNew will have the same left face. - * - * __gl_meshSplitEdge( eOrg ) splits eOrg into two edges eOrg and eNew, - * such that eNew == eOrg->Lnext. The new vertex is eOrg->Dst == eNew->Org. - * eOrg and eNew will have the same left face. - * - * __gl_meshConnect( eOrg, eDst ) creates a new edge from eOrg->Dst - * to eDst->Org, and returns the corresponding half-edge eNew. - * If eOrg->Lface == eDst->Lface, this splits one loop into two, - * and the newly created loop is eNew->Lface. Otherwise, two disjoint - * loops are merged into one, and the loop eDst->Lface is destroyed. - * - * ************************ Other Operations ***************************** - * - * __gl_meshNewMesh() creates a new mesh with no edges, no vertices, - * and no loops (what we usually call a "face"). - * - * __gl_meshUnion( mesh1, mesh2 ) forms the union of all structures in - * both meshes, and returns the new mesh (the old meshes are destroyed). - * - * __gl_meshDeleteMesh( mesh ) will free all storage for any valid mesh. - * - * __gl_meshZapFace( fZap ) destroys a face and removes it from the - * global face list. All edges of fZap will have a NULL pointer as their - * left face. Any edges which also have a NULL pointer as their right face - * are deleted entirely (along with any isolated vertices this produces). - * An entire mesh can be deleted by zapping its faces, one at a time, - * in any order. Zapped faces cannot be used in further mesh operations! - * - * __gl_meshCheckMesh( mesh ) checks a mesh for self-consistency. - */ - -GLUhalfEdge *__gl_meshMakeEdge( GLUmesh *mesh ); -int __gl_meshSplice( GLUhalfEdge *eOrg, GLUhalfEdge *eDst ); -int __gl_meshDelete( GLUhalfEdge *eDel ); - -GLUhalfEdge *__gl_meshAddEdgeVertex( GLUhalfEdge *eOrg ); -GLUhalfEdge *__gl_meshSplitEdge( GLUhalfEdge *eOrg ); -GLUhalfEdge *__gl_meshConnect( GLUhalfEdge *eOrg, GLUhalfEdge *eDst ); - -GLUmesh *__gl_meshNewMesh( void ); -GLUmesh *__gl_meshUnion( GLUmesh *mesh1, GLUmesh *mesh2 ); -void __gl_meshDeleteMesh( GLUmesh *mesh ); -void __gl_meshZapFace( GLUface *fZap ); - -#ifdef NDEBUG -#define __gl_meshCheckMesh( mesh ) -#else -void __gl_meshCheckMesh( GLUmesh *mesh ); -#endif - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/normal.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/normal.c deleted file mode 100644 index f69544618c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/normal.c +++ /dev/null @@ -1,258 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -*/ - -#include "gluos.h" -#include "mesh.h" -#include "tess.h" -#include "normal.h" -#include -#include - -#define TRUE 1 -#define FALSE 0 - -#define Dot(u,v) (u[0]*v[0] + u[1]*v[1] + u[2]*v[2]) - -#if 0 -static void Normalize( GLdouble v[3] ) -{ - GLdouble len = v[0]*v[0] + v[1]*v[1] + v[2]*v[2]; - - assert( len > 0 ); - len = sqrt( len ); - v[0] /= len; - v[1] /= len; - v[2] /= len; -} -#endif - -#undef ABS -#define ABS(x) ((x) < 0 ? -(x) : (x)) - -static int LongAxis( GLdouble v[3] ) -{ - int i = 0; - - if( ABS(v[1]) > ABS(v[0]) ) { i = 1; } - if( ABS(v[2]) > ABS(v[i]) ) { i = 2; } - return i; -} - -static void ComputeNormal( GLUtesselator *tess, GLdouble norm[3] ) -{ - GLUvertex *v, *v1, *v2; - GLdouble c, tLen2, maxLen2; - GLdouble maxVal[3], minVal[3], d1[3], d2[3], tNorm[3]; - GLUvertex *maxVert[3], *minVert[3]; - GLUvertex *vHead = &tess->mesh->vHead; - int i; - - maxVal[0] = maxVal[1] = maxVal[2] = -2 * GLU_TESS_MAX_COORD; - minVal[0] = minVal[1] = minVal[2] = 2 * GLU_TESS_MAX_COORD; - - for( v = vHead->next; v != vHead; v = v->next ) { - for( i = 0; i < 3; ++i ) { - c = v->coords[i]; - if( c < minVal[i] ) { minVal[i] = c; minVert[i] = v; } - if( c > maxVal[i] ) { maxVal[i] = c; maxVert[i] = v; } - } - } - - /* Find two vertices separated by at least 1/sqrt(3) of the maximum - * distance between any two vertices - */ - i = 0; - if( maxVal[1] - minVal[1] > maxVal[0] - minVal[0] ) { i = 1; } - if( maxVal[2] - minVal[2] > maxVal[i] - minVal[i] ) { i = 2; } - if( minVal[i] >= maxVal[i] ) { - /* All vertices are the same -- normal doesn't matter */ - norm[0] = 0; norm[1] = 0; norm[2] = 1; - return; - } - - /* Look for a third vertex which forms the triangle with maximum area - * (Length of normal == twice the triangle area) - */ - maxLen2 = 0; - v1 = minVert[i]; - v2 = maxVert[i]; - d1[0] = v1->coords[0] - v2->coords[0]; - d1[1] = v1->coords[1] - v2->coords[1]; - d1[2] = v1->coords[2] - v2->coords[2]; - for( v = vHead->next; v != vHead; v = v->next ) { - d2[0] = v->coords[0] - v2->coords[0]; - d2[1] = v->coords[1] - v2->coords[1]; - d2[2] = v->coords[2] - v2->coords[2]; - tNorm[0] = d1[1]*d2[2] - d1[2]*d2[1]; - tNorm[1] = d1[2]*d2[0] - d1[0]*d2[2]; - tNorm[2] = d1[0]*d2[1] - d1[1]*d2[0]; - tLen2 = tNorm[0]*tNorm[0] + tNorm[1]*tNorm[1] + tNorm[2]*tNorm[2]; - if( tLen2 > maxLen2 ) { - maxLen2 = tLen2; - norm[0] = tNorm[0]; - norm[1] = tNorm[1]; - norm[2] = tNorm[2]; - } - } - - if( maxLen2 <= 0 ) { - /* All points lie on a single line -- any decent normal will do */ - norm[0] = norm[1] = norm[2] = 0; - norm[LongAxis(d1)] = 1; - } -} - - -static void CheckOrientation( GLUtesselator *tess ) -{ - GLdouble area; - GLUface *f, *fHead = &tess->mesh->fHead; - GLUvertex *v, *vHead = &tess->mesh->vHead; - GLUhalfEdge *e; - - /* When we compute the normal automatically, we choose the orientation - * so that the the sum of the signed areas of all contours is non-negative. - */ - area = 0; - for( f = fHead->next; f != fHead; f = f->next ) { - e = f->anEdge; - if( e->winding <= 0 ) continue; - do { - area += (e->Org->s - e->Dst->s) * (e->Org->t + e->Dst->t); - e = e->Lnext; - } while( e != f->anEdge ); - } - if( area < 0 ) { - /* Reverse the orientation by flipping all the t-coordinates */ - for( v = vHead->next; v != vHead; v = v->next ) { - v->t = - v->t; - } - tess->tUnit[0] = - tess->tUnit[0]; - tess->tUnit[1] = - tess->tUnit[1]; - tess->tUnit[2] = - tess->tUnit[2]; - } -} - -#ifdef FOR_TRITE_TEST_PROGRAM -#include -extern int RandomSweep; -#define S_UNIT_X (RandomSweep ? (2*drand48()-1) : 1.0) -#define S_UNIT_Y (RandomSweep ? (2*drand48()-1) : 0.0) -#else -#if defined(SLANTED_SWEEP) -/* The "feature merging" is not intended to be complete. There are - * special cases where edges are nearly parallel to the sweep line - * which are not implemented. The algorithm should still behave - * robustly (ie. produce a reasonable tesselation) in the presence - * of such edges, however it may miss features which could have been - * merged. We could minimize this effect by choosing the sweep line - * direction to be something unusual (ie. not parallel to one of the - * coordinate axes). - */ -#define S_UNIT_X 0.50941539564955385 /* Pre-normalized */ -#define S_UNIT_Y 0.86052074622010633 -#else -#define S_UNIT_X 1.0 -#define S_UNIT_Y 0.0 -#endif -#endif - -/* Determine the polygon normal and project vertices onto the plane - * of the polygon. - */ -void __gl_projectPolygon( GLUtesselator *tess ) -{ - GLUvertex *v, *vHead = &tess->mesh->vHead; - GLdouble norm[3]; - GLdouble *sUnit, *tUnit; - int i, computedNormal = FALSE; - - norm[0] = tess->normal[0]; - norm[1] = tess->normal[1]; - norm[2] = tess->normal[2]; - if( norm[0] == 0 && norm[1] == 0 && norm[2] == 0 ) { - ComputeNormal( tess, norm ); - computedNormal = TRUE; - } - sUnit = tess->sUnit; - tUnit = tess->tUnit; - i = LongAxis( norm ); - -#if defined(FOR_TRITE_TEST_PROGRAM) || defined(TRUE_PROJECT) - /* Choose the initial sUnit vector to be approximately perpendicular - * to the normal. - */ - Normalize( norm ); - - sUnit[i] = 0; - sUnit[(i+1)%3] = S_UNIT_X; - sUnit[(i+2)%3] = S_UNIT_Y; - - /* Now make it exactly perpendicular */ - w = Dot( sUnit, norm ); - sUnit[0] -= w * norm[0]; - sUnit[1] -= w * norm[1]; - sUnit[2] -= w * norm[2]; - Normalize( sUnit ); - - /* Choose tUnit so that (sUnit,tUnit,norm) form a right-handed frame */ - tUnit[0] = norm[1]*sUnit[2] - norm[2]*sUnit[1]; - tUnit[1] = norm[2]*sUnit[0] - norm[0]*sUnit[2]; - tUnit[2] = norm[0]*sUnit[1] - norm[1]*sUnit[0]; - Normalize( tUnit ); -#else - /* Project perpendicular to a coordinate axis -- better numerically */ - sUnit[i] = 0; - sUnit[(i+1)%3] = S_UNIT_X; - sUnit[(i+2)%3] = S_UNIT_Y; - - tUnit[i] = 0; - tUnit[(i+1)%3] = (norm[i] > 0) ? -S_UNIT_Y : S_UNIT_Y; - tUnit[(i+2)%3] = (norm[i] > 0) ? S_UNIT_X : -S_UNIT_X; -#endif - - /* Project the vertices onto the sweep plane */ - for( v = vHead->next; v != vHead; v = v->next ) { - v->s = Dot( v->coords, sUnit ); - v->t = Dot( v->coords, tUnit ); - } - if( computedNormal ) { - CheckOrientation( tess ); - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/normal.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/normal.h deleted file mode 100644 index c8e334f45f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/normal.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/normal.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef __normal_h_ -#define __normal_h_ - -#include "tess.h" - -/* __gl_projectPolygon( tess ) determines the polygon normal - * and project vertices onto the plane of the polygon. - */ -void __gl_projectPolygon( GLUtesselator *tess ); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/priorityq-heap.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/priorityq-heap.c deleted file mode 100644 index 6b77155e1e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/priorityq-heap.c +++ /dev/null @@ -1,259 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/priorityq-heap.c,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include -#include -#include "priorityq-heap.h" -#include "memalloc.h" - -#define INIT_SIZE 32 - -#define TRUE 1 -#define FALSE 0 - -#ifdef FOR_TRITE_TEST_PROGRAM -#define LEQ(x,y) (*pq->leq)(x,y) -#else -/* Violates modularity, but a little faster */ -#include "geom.h" -#define LEQ(x,y) VertLeq((GLUvertex *)x, (GLUvertex *)y) -#endif - -/* really __gl_pqHeapNewPriorityQ */ -PriorityQ *pqNewPriorityQ( int (*leq)(PQkey key1, PQkey key2) ) -{ - PriorityQ *pq = (PriorityQ *)memAlloc( sizeof( PriorityQ )); - if (pq == NULL) return NULL; - - pq->size = 0; - pq->max = INIT_SIZE; - pq->nodes = (PQnode *)memAlloc( (INIT_SIZE + 1) * sizeof(pq->nodes[0]) ); - if (pq->nodes == NULL) { - memFree(pq); - return NULL; - } - - pq->handles = (PQhandleElem *)memAlloc( (INIT_SIZE + 1) * sizeof(pq->handles[0]) ); - if (pq->handles == NULL) { - memFree(pq->nodes); - memFree(pq); - return NULL; - } - - pq->initialized = FALSE; - pq->freeList = 0; - pq->leq = leq; - - pq->nodes[1].handle = 1; /* so that Minimum() returns NULL */ - pq->handles[1].key = NULL; - return pq; -} - -/* really __gl_pqHeapDeletePriorityQ */ -void pqDeletePriorityQ( PriorityQ *pq ) -{ - memFree( pq->handles ); - memFree( pq->nodes ); - memFree( pq ); -} - - -static void FloatDown( PriorityQ *pq, long curr ) -{ - PQnode *n = pq->nodes; - PQhandleElem *h = pq->handles; - PQhandle hCurr, hChild; - long child; - - hCurr = n[curr].handle; - for( ;; ) { - child = curr << 1; - if( child < pq->size && LEQ( h[n[child+1].handle].key, - h[n[child].handle].key )) { - ++child; - } - - assert(child <= pq->max); - - hChild = n[child].handle; - if( child > pq->size || LEQ( h[hCurr].key, h[hChild].key )) { - n[curr].handle = hCurr; - h[hCurr].node = curr; - break; - } - n[curr].handle = hChild; - h[hChild].node = curr; - curr = child; - } -} - - -static void FloatUp( PriorityQ *pq, long curr ) -{ - PQnode *n = pq->nodes; - PQhandleElem *h = pq->handles; - PQhandle hCurr, hParent; - long parent; - - hCurr = n[curr].handle; - for( ;; ) { - parent = curr >> 1; - hParent = n[parent].handle; - if( parent == 0 || LEQ( h[hParent].key, h[hCurr].key )) { - n[curr].handle = hCurr; - h[hCurr].node = curr; - break; - } - n[curr].handle = hParent; - h[hParent].node = curr; - curr = parent; - } -} - -/* really __gl_pqHeapInit */ -void pqInit( PriorityQ *pq ) -{ - long i; - - /* This method of building a heap is O(n), rather than O(n lg n). */ - - for( i = pq->size; i >= 1; --i ) { - FloatDown( pq, i ); - } - pq->initialized = TRUE; -} - -/* really __gl_pqHeapInsert */ -/* returns LONG_MAX iff out of memory */ -PQhandle pqInsert( PriorityQ *pq, PQkey keyNew ) -{ - long curr; - PQhandle free; - - curr = ++ pq->size; - if( (curr*2) > pq->max ) { - PQnode *saveNodes= pq->nodes; - PQhandleElem *saveHandles= pq->handles; - - /* If the heap overflows, double its size. */ - pq->max <<= 1; - pq->nodes = (PQnode *)memRealloc( pq->nodes, - (size_t) - ((pq->max + 1) * sizeof( pq->nodes[0] ))); - if (pq->nodes == NULL) { - pq->nodes = saveNodes; /* restore ptr to free upon return */ - return LONG_MAX; - } - pq->handles = (PQhandleElem *)memRealloc( pq->handles, - (size_t) - ((pq->max + 1) * - sizeof( pq->handles[0] ))); - if (pq->handles == NULL) { - pq->handles = saveHandles; /* restore ptr to free upon return */ - return LONG_MAX; - } - } - - if( pq->freeList == 0 ) { - free = curr; - } else { - free = pq->freeList; - pq->freeList = pq->handles[free].node; - } - - pq->nodes[curr].handle = free; - pq->handles[free].node = curr; - pq->handles[free].key = keyNew; - - if( pq->initialized ) { - FloatUp( pq, curr ); - } - assert(free != LONG_MAX); - return free; -} - -/* really __gl_pqHeapExtractMin */ -PQkey pqExtractMin( PriorityQ *pq ) -{ - PQnode *n = pq->nodes; - PQhandleElem *h = pq->handles; - PQhandle hMin = n[1].handle; - PQkey min = h[hMin].key; - - if( pq->size > 0 ) { - n[1].handle = n[pq->size].handle; - h[n[1].handle].node = 1; - - h[hMin].key = NULL; - h[hMin].node = pq->freeList; - pq->freeList = hMin; - - if( -- pq->size > 0 ) { - FloatDown( pq, 1 ); - } - } - return min; -} - -/* really __gl_pqHeapDelete */ -void pqDelete( PriorityQ *pq, PQhandle hCurr ) -{ - PQnode *n = pq->nodes; - PQhandleElem *h = pq->handles; - long curr; - - assert( hCurr >= 1 && hCurr <= pq->max && h[hCurr].key != NULL ); - - curr = h[hCurr].node; - n[curr].handle = n[pq->size].handle; - h[n[curr].handle].node = curr; - - if( curr <= -- pq->size ) { - if( curr <= 1 || LEQ( h[n[curr>>1].handle].key, h[n[curr].handle].key )) { - FloatDown( pq, curr ); - } else { - FloatUp( pq, curr ); - } - } - h[hCurr].key = NULL; - h[hCurr].node = pq->freeList; - pq->freeList = hCurr; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/priorityq-heap.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/priorityq-heap.h deleted file mode 100644 index 39c33c3921..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/priorityq-heap.h +++ /dev/null @@ -1,114 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/priorityq-heap.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef __priorityq_heap_h_ -#define __priorityq_heap_h_ - -/* Use #define's so that another heap implementation can use this one */ - -#define PQkey PQHeapKey -#define PQhandle PQHeapHandle -#define PriorityQ PriorityQHeap - -#define pqNewPriorityQ(leq) __gl_pqHeapNewPriorityQ(leq) -#define pqDeletePriorityQ(pq) __gl_pqHeapDeletePriorityQ(pq) - -/* The basic operations are insertion of a new key (pqInsert), - * and examination/extraction of a key whose value is minimum - * (pqMinimum/pqExtractMin). Deletion is also allowed (pqDelete); - * for this purpose pqInsert returns a "handle" which is supplied - * as the argument. - * - * An initial heap may be created efficiently by calling pqInsert - * repeatedly, then calling pqInit. In any case pqInit must be called - * before any operations other than pqInsert are used. - * - * If the heap is empty, pqMinimum/pqExtractMin will return a NULL key. - * This may also be tested with pqIsEmpty. - */ -#define pqInit(pq) __gl_pqHeapInit(pq) -#define pqInsert(pq,key) __gl_pqHeapInsert(pq,key) -#define pqMinimum(pq) __gl_pqHeapMinimum(pq) -#define pqExtractMin(pq) __gl_pqHeapExtractMin(pq) -#define pqDelete(pq,handle) __gl_pqHeapDelete(pq,handle) -#define pqIsEmpty(pq) __gl_pqHeapIsEmpty(pq) - - -/* Since we support deletion the data structure is a little more - * complicated than an ordinary heap. "nodes" is the heap itself; - * active nodes are stored in the range 1..pq->size. When the - * heap exceeds its allocated size (pq->max), its size doubles. - * The children of node i are nodes 2i and 2i+1. - * - * Each node stores an index into an array "handles". Each handle - * stores a key, plus a pointer back to the node which currently - * represents that key (ie. nodes[handles[i].node].handle == i). - */ - -typedef void *PQkey; -typedef long PQhandle; -typedef struct PriorityQ PriorityQ; - -typedef struct { PQhandle handle; } PQnode; -typedef struct { PQkey key; PQhandle node; } PQhandleElem; - -struct PriorityQ { - PQnode *nodes; - PQhandleElem *handles; - long size, max; - PQhandle freeList; - int initialized; - int (*leq)(PQkey key1, PQkey key2); -}; - -PriorityQ *pqNewPriorityQ( int (*leq)(PQkey key1, PQkey key2) ); -void pqDeletePriorityQ( PriorityQ *pq ); - -void pqInit( PriorityQ *pq ); -PQhandle pqInsert( PriorityQ *pq, PQkey key ); -PQkey pqExtractMin( PriorityQ *pq ); -void pqDelete( PriorityQ *pq, PQhandle handle ); - - -#define __gl_pqHeapMinimum(pq) ((pq)->handles[(pq)->nodes[1].handle].key) -#define __gl_pqHeapIsEmpty(pq) ((pq)->size == 0) - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/priorityq-sort.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/priorityq-sort.h deleted file mode 100644 index 2439238793..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/priorityq-sort.h +++ /dev/null @@ -1,124 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/priorityq-sort.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef __priorityq_sort_h_ -#define __priorityq_sort_h_ - -#include "priorityq-heap.h" - -#undef PQkey -#undef PQhandle -#undef PriorityQ -#undef pqNewPriorityQ -#undef pqDeletePriorityQ -#undef pqInit -#undef pqInsert -#undef pqMinimum -#undef pqExtractMin -#undef pqDelete -#undef pqIsEmpty - -/* Use #define's so that another heap implementation can use this one */ - -#define PQkey PQSortKey -#define PQhandle PQSortHandle -#define PriorityQ PriorityQSort - -#define pqNewPriorityQ(leq) __gl_pqSortNewPriorityQ(leq) -#define pqDeletePriorityQ(pq) __gl_pqSortDeletePriorityQ(pq) - -/* The basic operations are insertion of a new key (pqInsert), - * and examination/extraction of a key whose value is minimum - * (pqMinimum/pqExtractMin). Deletion is also allowed (pqDelete); - * for this purpose pqInsert returns a "handle" which is supplied - * as the argument. - * - * An initial heap may be created efficiently by calling pqInsert - * repeatedly, then calling pqInit. In any case pqInit must be called - * before any operations other than pqInsert are used. - * - * If the heap is empty, pqMinimum/pqExtractMin will return a NULL key. - * This may also be tested with pqIsEmpty. - */ -#define pqInit(pq) __gl_pqSortInit(pq) -#define pqInsert(pq,key) __gl_pqSortInsert(pq,key) -#define pqMinimum(pq) __gl_pqSortMinimum(pq) -#define pqExtractMin(pq) __gl_pqSortExtractMin(pq) -#define pqDelete(pq,handle) __gl_pqSortDelete(pq,handle) -#define pqIsEmpty(pq) __gl_pqSortIsEmpty(pq) - - -/* Since we support deletion the data structure is a little more - * complicated than an ordinary heap. "nodes" is the heap itself; - * active nodes are stored in the range 1..pq->size. When the - * heap exceeds its allocated size (pq->max), its size doubles. - * The children of node i are nodes 2i and 2i+1. - * - * Each node stores an index into an array "handles". Each handle - * stores a key, plus a pointer back to the node which currently - * represents that key (ie. nodes[handles[i].node].handle == i). - */ - -typedef PQHeapKey PQkey; -typedef PQHeapHandle PQhandle; -typedef struct PriorityQ PriorityQ; - -struct PriorityQ { - PriorityQHeap *heap; - PQkey *keys; - PQkey **order; - PQhandle size, max; - int initialized; - int (*leq)(PQkey key1, PQkey key2); -}; - -PriorityQ *pqNewPriorityQ( int (*leq)(PQkey key1, PQkey key2) ); -void pqDeletePriorityQ( PriorityQ *pq ); - -int pqInit( PriorityQ *pq ); -PQhandle pqInsert( PriorityQ *pq, PQkey key ); -PQkey pqExtractMin( PriorityQ *pq ); -void pqDelete( PriorityQ *pq, PQhandle handle ); - -PQkey pqMinimum( PriorityQ *pq ); -int pqIsEmpty( PriorityQ *pq ); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/priorityq.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/priorityq.c deleted file mode 100644 index fffa1d5255..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/priorityq.c +++ /dev/null @@ -1,267 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/priorityq.c,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include -#include /* LONG_MAX */ -#include "memalloc.h" - -/* Include all the code for the regular heap-based queue here. */ - -#include "priorityq-heap.c" - -/* Now redefine all the function names to map to their "Sort" versions. */ - -#include "priorityq-sort.h" - -/* really __gl_pqSortNewPriorityQ */ -PriorityQ *pqNewPriorityQ( int (*leq)(PQkey key1, PQkey key2) ) -{ - PriorityQ *pq = (PriorityQ *)memAlloc( sizeof( PriorityQ )); - if (pq == NULL) return NULL; - - pq->heap = __gl_pqHeapNewPriorityQ( leq ); - if (pq->heap == NULL) { - memFree(pq); - return NULL; - } - - pq->keys = (PQHeapKey *)memAlloc( INIT_SIZE * sizeof(pq->keys[0]) ); - if (pq->keys == NULL) { - __gl_pqHeapDeletePriorityQ(pq->heap); - memFree(pq); - return NULL; - } - - pq->size = 0; - pq->max = INIT_SIZE; - pq->initialized = FALSE; - pq->leq = leq; - return pq; -} - -/* really __gl_pqSortDeletePriorityQ */ -void pqDeletePriorityQ( PriorityQ *pq ) -{ - assert(pq != NULL); - if (pq->heap != NULL) __gl_pqHeapDeletePriorityQ( pq->heap ); - if (pq->order != NULL) memFree( pq->order ); - if (pq->keys != NULL) memFree( pq->keys ); - memFree( pq ); -} - - -#define LT(x,y) (! LEQ(y,x)) -#define GT(x,y) (! LEQ(x,y)) -#define Swap(a,b) if(1){PQkey *tmp = *a; *a = *b; *b = tmp;}else - -/* really __gl_pqSortInit */ -int pqInit( PriorityQ *pq ) -{ - PQkey **p, **r, **i, **j, *piv; - struct { PQkey **p, **r; } Stack[50], *top = Stack; - unsigned long seed = 2016473283; - - /* Create an array of indirect pointers to the keys, so that we - * the handles we have returned are still valid. - */ -/* - pq->order = (PQHeapKey **)memAlloc( (size_t) - (pq->size * sizeof(pq->order[0])) ); -*/ - pq->order = (PQHeapKey **)memAlloc( (size_t) - ((pq->size+1) * sizeof(pq->order[0])) ); -/* the previous line is a patch to compensate for the fact that IBM */ -/* machines return a null on a malloc of zero bytes (unlike SGI), */ -/* so we have to put in this defense to guard against a memory */ -/* fault four lines down. from fossum@austin.ibm.com. */ - if (pq->order == NULL) return 0; - - p = pq->order; - r = p + pq->size - 1; - for( piv = pq->keys, i = p; i <= r; ++piv, ++i ) { - *i = piv; - } - - /* Sort the indirect pointers in descending order, - * using randomized Quicksort - */ - top->p = p; top->r = r; ++top; - while( --top >= Stack ) { - p = top->p; - r = top->r; - while( r > p + 10 ) { - seed = seed * 1539415821 + 1; - i = p + seed % (r - p + 1); - piv = *i; - *i = *p; - *p = piv; - i = p - 1; - j = r + 1; - do { - do { ++i; } while( GT( **i, *piv )); - do { --j; } while( LT( **j, *piv )); - Swap( i, j ); - } while( i < j ); - Swap( i, j ); /* Undo last swap */ - if( i - p < r - j ) { - top->p = j+1; top->r = r; ++top; - r = i-1; - } else { - top->p = p; top->r = i-1; ++top; - p = j+1; - } - } - /* Insertion sort small lists */ - for( i = p+1; i <= r; ++i ) { - piv = *i; - for( j = i; j > p && LT( **(j-1), *piv ); --j ) { - *j = *(j-1); - } - *j = piv; - } - } - pq->max = pq->size; - pq->initialized = TRUE; - __gl_pqHeapInit( pq->heap ); /* always succeeds */ - -#ifndef NDEBUG - p = pq->order; - r = p + pq->size - 1; - for( i = p; i < r; ++i ) { - assert( LEQ( **(i+1), **i )); - } -#endif - - return 1; -} - -/* really __gl_pqSortInsert */ -/* returns LONG_MAX iff out of memory */ -PQhandle pqInsert( PriorityQ *pq, PQkey keyNew ) -{ - long curr; - - if( pq->initialized ) { - return __gl_pqHeapInsert( pq->heap, keyNew ); - } - curr = pq->size; - if( ++ pq->size >= pq->max ) { - PQkey *saveKey= pq->keys; - - /* If the heap overflows, double its size. */ - pq->max <<= 1; - pq->keys = (PQHeapKey *)memRealloc( pq->keys, - (size_t) - (pq->max * sizeof( pq->keys[0] ))); - if (pq->keys == NULL) { - pq->keys = saveKey; /* restore ptr to free upon return */ - return LONG_MAX; - } - } - assert(curr != LONG_MAX); - pq->keys[curr] = keyNew; - - /* Negative handles index the sorted array. */ - return -(curr+1); -} - -/* really __gl_pqSortExtractMin */ -PQkey pqExtractMin( PriorityQ *pq ) -{ - PQkey sortMin, heapMin; - - if( pq->size == 0 ) { - return __gl_pqHeapExtractMin( pq->heap ); - } - sortMin = *(pq->order[pq->size-1]); - if( ! __gl_pqHeapIsEmpty( pq->heap )) { - heapMin = __gl_pqHeapMinimum( pq->heap ); - if( LEQ( heapMin, sortMin )) { - return __gl_pqHeapExtractMin( pq->heap ); - } - } - do { - -- pq->size; - } while( pq->size > 0 && *(pq->order[pq->size-1]) == NULL ); - return sortMin; -} - -/* really __gl_pqSortMinimum */ -PQkey pqMinimum( PriorityQ *pq ) -{ - PQkey sortMin, heapMin; - - if( pq->size == 0 ) { - return __gl_pqHeapMinimum( pq->heap ); - } - sortMin = *(pq->order[pq->size-1]); - if( ! __gl_pqHeapIsEmpty( pq->heap )) { - heapMin = __gl_pqHeapMinimum( pq->heap ); - if( LEQ( heapMin, sortMin )) { - return heapMin; - } - } - return sortMin; -} - -/* really __gl_pqSortIsEmpty */ -int pqIsEmpty( PriorityQ *pq ) -{ - return (pq->size == 0) && __gl_pqHeapIsEmpty( pq->heap ); -} - -/* really __gl_pqSortDelete */ -void pqDelete( PriorityQ *pq, PQhandle curr ) -{ - if( curr >= 0 ) { - __gl_pqHeapDelete( pq->heap, curr ); - return; - } - curr = -(curr+1); - assert( curr < pq->max && pq->keys[curr] != NULL ); - - pq->keys[curr] = NULL; - while( pq->size > 0 && *(pq->order[pq->size-1]) == NULL ) { - -- pq->size; - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/priorityq.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/priorityq.h deleted file mode 100644 index 97ed707578..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/priorityq.h +++ /dev/null @@ -1,124 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/priorityq.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef __priorityq_sort_h_ -#define __priorityq_sort_h_ - -#include "priorityq-heap.h" - -#undef PQkey -#undef PQhandle -#undef PriorityQ -#undef pqNewPriorityQ -#undef pqDeletePriorityQ -#undef pqInit -#undef pqInsert -#undef pqMinimum -#undef pqExtractMin -#undef pqDelete -#undef pqIsEmpty - -/* Use #define's so that another heap implementation can use this one */ - -#define PQkey PQSortKey -#define PQhandle PQSortHandle -#define PriorityQ PriorityQSort - -#define pqNewPriorityQ(leq) __gl_pqSortNewPriorityQ(leq) -#define pqDeletePriorityQ(pq) __gl_pqSortDeletePriorityQ(pq) - -/* The basic operations are insertion of a new key (pqInsert), - * and examination/extraction of a key whose value is minimum - * (pqMinimum/pqExtractMin). Deletion is also allowed (pqDelete); - * for this purpose pqInsert returns a "handle" which is supplied - * as the argument. - * - * An initial heap may be created efficiently by calling pqInsert - * repeatedly, then calling pqInit. In any case pqInit must be called - * before any operations other than pqInsert are used. - * - * If the heap is empty, pqMinimum/pqExtractMin will return a NULL key. - * This may also be tested with pqIsEmpty. - */ -#define pqInit(pq) __gl_pqSortInit(pq) -#define pqInsert(pq,key) __gl_pqSortInsert(pq,key) -#define pqMinimum(pq) __gl_pqSortMinimum(pq) -#define pqExtractMin(pq) __gl_pqSortExtractMin(pq) -#define pqDelete(pq,handle) __gl_pqSortDelete(pq,handle) -#define pqIsEmpty(pq) __gl_pqSortIsEmpty(pq) - - -/* Since we support deletion the data structure is a little more - * complicated than an ordinary heap. "nodes" is the heap itself; - * active nodes are stored in the range 1..pq->size. When the - * heap exceeds its allocated size (pq->max), its size doubles. - * The children of node i are nodes 2i and 2i+1. - * - * Each node stores an index into an array "handles". Each handle - * stores a key, plus a pointer back to the node which currently - * represents that key (ie. nodes[handles[i].node].handle == i). - */ - -typedef PQHeapKey PQkey; -typedef PQHeapHandle PQhandle; -typedef struct PriorityQ PriorityQ; - -struct PriorityQ { - PriorityQHeap *heap; - PQkey *keys; - PQkey **order; - PQhandle size, max; - int initialized; - int (*leq)(PQkey key1, PQkey key2); -}; - -PriorityQ *pqNewPriorityQ( int (*leq)(PQkey key1, PQkey key2) ); -void pqDeletePriorityQ( PriorityQ *pq ); - -int pqInit( PriorityQ *pq ); -PQhandle pqInsert( PriorityQ *pq, PQkey key ); -PQkey pqExtractMin( PriorityQ *pq ); -void pqDelete( PriorityQ *pq, PQhandle handle ); - -PQkey pqMinimum( PriorityQ *pq ); -int pqIsEmpty( PriorityQ *pq ); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/render.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/render.c deleted file mode 100644 index 97751dc810..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/render.c +++ /dev/null @@ -1,505 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/render.c,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include -#include "mesh.h" -#include "tess.h" -#include "render.h" - -#define TRUE 1 -#define FALSE 0 - -/* This structure remembers the information we need about a primitive - * to be able to render it later, once we have determined which - * primitive is able to use the most triangles. - */ -struct FaceCount { - long size; /* number of triangles used */ - GLUhalfEdge *eStart; /* edge where this primitive starts */ - void (*render)(GLUtesselator *, GLUhalfEdge *, long); - /* routine to render this primitive */ -}; - -static struct FaceCount MaximumFan( GLUhalfEdge *eOrig ); -static struct FaceCount MaximumStrip( GLUhalfEdge *eOrig ); - -static void RenderFan( GLUtesselator *tess, GLUhalfEdge *eStart, long size ); -static void RenderStrip( GLUtesselator *tess, GLUhalfEdge *eStart, long size ); -static void RenderTriangle( GLUtesselator *tess, GLUhalfEdge *eStart, - long size ); - -static void RenderMaximumFaceGroup( GLUtesselator *tess, GLUface *fOrig ); -static void RenderLonelyTriangles( GLUtesselator *tess, GLUface *head ); - - - -/************************ Strips and Fans decomposition ******************/ - -/* __gl_renderMesh( tess, mesh ) takes a mesh and breaks it into triangle - * fans, strips, and separate triangles. A substantial effort is made - * to use as few rendering primitives as possible (ie. to make the fans - * and strips as large as possible). - * - * The rendering output is provided as callbacks (see the api). - */ -void __gl_renderMesh( GLUtesselator *tess, GLUmesh *mesh ) -{ - GLUface *f; - - /* Make a list of separate triangles so we can render them all at once */ - tess->lonelyTriList = NULL; - - for( f = mesh->fHead.next; f != &mesh->fHead; f = f->next ) { - f->marked = FALSE; - } - for( f = mesh->fHead.next; f != &mesh->fHead; f = f->next ) { - - /* We examine all faces in an arbitrary order. Whenever we find - * an unprocessed face F, we output a group of faces including F - * whose size is maximum. - */ - if( f->inside && ! f->marked ) { - RenderMaximumFaceGroup( tess, f ); - assert( f->marked ); - } - } - if( tess->lonelyTriList != NULL ) { - RenderLonelyTriangles( tess, tess->lonelyTriList ); - tess->lonelyTriList = NULL; - } -} - - -static void RenderMaximumFaceGroup( GLUtesselator *tess, GLUface *fOrig ) -{ - /* We want to find the largest triangle fan or strip of unmarked faces - * which includes the given face fOrig. There are 3 possible fans - * passing through fOrig (one centered at each vertex), and 3 possible - * strips (one for each CCW permutation of the vertices). Our strategy - * is to try all of these, and take the primitive which uses the most - * triangles (a greedy approach). - */ - GLUhalfEdge *e = fOrig->anEdge; - struct FaceCount max, newFace; - - max.size = 1; - max.eStart = e; - max.render = &RenderTriangle; - - if( ! tess->flagBoundary ) { - newFace = MaximumFan( e ); if( newFace.size > max.size ) { max = newFace; } - newFace = MaximumFan( e->Lnext ); if( newFace.size > max.size ) { max = newFace; } - newFace = MaximumFan( e->Lprev ); if( newFace.size > max.size ) { max = newFace; } - - newFace = MaximumStrip( e ); if( newFace.size > max.size ) { max = newFace; } - newFace = MaximumStrip( e->Lnext ); if( newFace.size > max.size ) { max = newFace; } - newFace = MaximumStrip( e->Lprev ); if( newFace.size > max.size ) { max = newFace; } - } - (*(max.render))( tess, max.eStart, max.size ); -} - - -/* Macros which keep track of faces we have marked temporarily, and allow - * us to backtrack when necessary. With triangle fans, this is not - * really necessary, since the only awkward case is a loop of triangles - * around a single origin vertex. However with strips the situation is - * more complicated, and we need a general tracking method like the - * one here. - */ -#define Marked(f) (! (f)->inside || (f)->marked) - -#define AddToTrail(f,t) ((f)->trail = (t), (t) = (f), (f)->marked = TRUE) - -#define FreeTrail(t) if( 1 ) { \ - while( (t) != NULL ) { \ - (t)->marked = FALSE; t = (t)->trail; \ - } \ - } else /* absorb trailing semicolon */ - - - -static struct FaceCount MaximumFan( GLUhalfEdge *eOrig ) -{ - /* eOrig->Lface is the face we want to render. We want to find the size - * of a maximal fan around eOrig->Org. To do this we just walk around - * the origin vertex as far as possible in both directions. - */ - struct FaceCount newFace = { 0, NULL, &RenderFan }; - GLUface *trail = NULL; - GLUhalfEdge *e; - - for( e = eOrig; ! Marked( e->Lface ); e = e->Onext ) { - AddToTrail( e->Lface, trail ); - ++newFace.size; - } - for( e = eOrig; ! Marked( e->Rface ); e = e->Oprev ) { - AddToTrail( e->Rface, trail ); - ++newFace.size; - } - newFace.eStart = e; - /*LINTED*/ - FreeTrail( trail ); - return newFace; -} - - -#define IsEven(n) (((n) & 1) == 0) - -static struct FaceCount MaximumStrip( GLUhalfEdge *eOrig ) -{ - /* Here we are looking for a maximal strip that contains the vertices - * eOrig->Org, eOrig->Dst, eOrig->Lnext->Dst (in that order or the - * reverse, such that all triangles are oriented CCW). - * - * Again we walk forward and backward as far as possible. However for - * strips there is a twist: to get CCW orientations, there must be - * an *even* number of triangles in the strip on one side of eOrig. - * We walk the strip starting on a side with an even number of triangles; - * if both side have an odd number, we are forced to shorten one side. - */ - struct FaceCount newFace = { 0, NULL, &RenderStrip }; - long headSize = 0, tailSize = 0; - GLUface *trail = NULL; - GLUhalfEdge *e, *eTail, *eHead; - - for( e = eOrig; ! Marked( e->Lface ); ++tailSize, e = e->Onext ) { - AddToTrail( e->Lface, trail ); - ++tailSize; - e = e->Dprev; - if( Marked( e->Lface )) break; - AddToTrail( e->Lface, trail ); - } - eTail = e; - - for( e = eOrig; ! Marked( e->Rface ); ++headSize, e = e->Dnext ) { - AddToTrail( e->Rface, trail ); - ++headSize; - e = e->Oprev; - if( Marked( e->Rface )) break; - AddToTrail( e->Rface, trail ); - } - eHead = e; - - newFace.size = tailSize + headSize; - if( IsEven( tailSize )) { - newFace.eStart = eTail->Sym; - } else if( IsEven( headSize )) { - newFace.eStart = eHead; - } else { - /* Both sides have odd length, we must shorten one of them. In fact, - * we must start from eHead to guarantee inclusion of eOrig->Lface. - */ - --newFace.size; - newFace.eStart = eHead->Onext; - } - /*LINTED*/ - FreeTrail( trail ); - return newFace; -} - - -static void RenderTriangle( GLUtesselator *tess, GLUhalfEdge *e, long size ) -{ - /* Just add the triangle to a triangle list, so we can render all - * the separate triangles at once. - */ - assert( size == 1 ); - AddToTrail( e->Lface, tess->lonelyTriList ); -} - - -static void RenderLonelyTriangles( GLUtesselator *tess, GLUface *f ) -{ - /* Now we render all the separate triangles which could not be - * grouped into a triangle fan or strip. - */ - GLUhalfEdge *e; - int newState; - int edgeState = -1; /* force edge state output for first vertex */ - - CALL_BEGIN_OR_BEGIN_DATA( GL_TRIANGLES ); - - for( ; f != NULL; f = f->trail ) { - /* Loop once for each edge (there will always be 3 edges) */ - - e = f->anEdge; - do { - if( tess->flagBoundary ) { - /* Set the "edge state" to TRUE just before we output the - * first vertex of each edge on the polygon boundary. - */ - newState = ! e->Rface->inside; - if( edgeState != newState ) { - edgeState = newState; - CALL_EDGE_FLAG_OR_EDGE_FLAG_DATA( edgeState ); - } - } - CALL_VERTEX_OR_VERTEX_DATA( e->Org->data ); - - e = e->Lnext; - } while( e != f->anEdge ); - } - CALL_END_OR_END_DATA(); -} - - -static void RenderFan( GLUtesselator *tess, GLUhalfEdge *e, long size ) -{ - /* Render as many CCW triangles as possible in a fan starting from - * edge "e". The fan *should* contain exactly "size" triangles - * (otherwise we've goofed up somewhere). - */ - CALL_BEGIN_OR_BEGIN_DATA( GL_TRIANGLE_FAN ); - CALL_VERTEX_OR_VERTEX_DATA( e->Org->data ); - CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data ); - - while( ! Marked( e->Lface )) { - e->Lface->marked = TRUE; - --size; - e = e->Onext; - CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data ); - } - - assert( size == 0 ); - CALL_END_OR_END_DATA(); -} - - -static void RenderStrip( GLUtesselator *tess, GLUhalfEdge *e, long size ) -{ - /* Render as many CCW triangles as possible in a strip starting from - * edge "e". The strip *should* contain exactly "size" triangles - * (otherwise we've goofed up somewhere). - */ - CALL_BEGIN_OR_BEGIN_DATA( GL_TRIANGLE_STRIP ); - CALL_VERTEX_OR_VERTEX_DATA( e->Org->data ); - CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data ); - - while( ! Marked( e->Lface )) { - e->Lface->marked = TRUE; - --size; - e = e->Dprev; - CALL_VERTEX_OR_VERTEX_DATA( e->Org->data ); - if( Marked( e->Lface )) break; - - e->Lface->marked = TRUE; - --size; - e = e->Onext; - CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data ); - } - - assert( size == 0 ); - CALL_END_OR_END_DATA(); -} - - -/************************ Boundary contour decomposition ******************/ - -/* __gl_renderBoundary( tess, mesh ) takes a mesh, and outputs one - * contour for each face marked "inside". The rendering output is - * provided as callbacks (see the api). - */ -void __gl_renderBoundary( GLUtesselator *tess, GLUmesh *mesh ) -{ - GLUface *f; - GLUhalfEdge *e; - - for( f = mesh->fHead.next; f != &mesh->fHead; f = f->next ) { - if( f->inside ) { - CALL_BEGIN_OR_BEGIN_DATA( GL_LINE_LOOP ); - e = f->anEdge; - do { - CALL_VERTEX_OR_VERTEX_DATA( e->Org->data ); - e = e->Lnext; - } while( e != f->anEdge ); - CALL_END_OR_END_DATA(); - } - } -} - - -/************************ Quick-and-dirty decomposition ******************/ - -#define SIGN_INCONSISTENT 2 - -static int ComputeNormal( GLUtesselator *tess, GLdouble norm[3], int check ) -/* - * If check==FALSE, we compute the polygon normal and place it in norm[]. - * If check==TRUE, we check that each triangle in the fan from v0 has a - * consistent orientation with respect to norm[]. If triangles are - * consistently oriented CCW, return 1; if CW, return -1; if all triangles - * are degenerate return 0; otherwise (no consistent orientation) return - * SIGN_INCONSISTENT. - */ -{ - CachedVertex *v0 = tess->cache; - CachedVertex *vn = v0 + tess->cacheCount; - CachedVertex *vc; - GLdouble dot, xc, yc, zc, xp, yp, zp, n[3]; - int sign = 0; - - /* Find the polygon normal. It is important to get a reasonable - * normal even when the polygon is self-intersecting (eg. a bowtie). - * Otherwise, the computed normal could be very tiny, but perpendicular - * to the true plane of the polygon due to numerical noise. Then all - * the triangles would appear to be degenerate and we would incorrectly - * decompose the polygon as a fan (or simply not render it at all). - * - * We use a sum-of-triangles normal algorithm rather than the more - * efficient sum-of-trapezoids method (used in CheckOrientation() - * in normal.c). This lets us explicitly reverse the signed area - * of some triangles to get a reasonable normal in the self-intersecting - * case. - */ - if( ! check ) { - norm[0] = norm[1] = norm[2] = 0.0; - } - - vc = v0 + 1; - xc = vc->coords[0] - v0->coords[0]; - yc = vc->coords[1] - v0->coords[1]; - zc = vc->coords[2] - v0->coords[2]; - while( ++vc < vn ) { - xp = xc; yp = yc; zp = zc; - xc = vc->coords[0] - v0->coords[0]; - yc = vc->coords[1] - v0->coords[1]; - zc = vc->coords[2] - v0->coords[2]; - - /* Compute (vp - v0) cross (vc - v0) */ - n[0] = yp*zc - zp*yc; - n[1] = zp*xc - xp*zc; - n[2] = xp*yc - yp*xc; - - dot = n[0]*norm[0] + n[1]*norm[1] + n[2]*norm[2]; - if( ! check ) { - /* Reverse the contribution of back-facing triangles to get - * a reasonable normal for self-intersecting polygons (see above) - */ - if( dot >= 0 ) { - norm[0] += n[0]; norm[1] += n[1]; norm[2] += n[2]; - } else { - norm[0] -= n[0]; norm[1] -= n[1]; norm[2] -= n[2]; - } - } else if( dot != 0 ) { - /* Check the new orientation for consistency with previous triangles */ - if( dot > 0 ) { - if( sign < 0 ) return SIGN_INCONSISTENT; - sign = 1; - } else { - if( sign > 0 ) return SIGN_INCONSISTENT; - sign = -1; - } - } - } - return sign; -} - -/* __gl_renderCache( tess ) takes a single contour and tries to render it - * as a triangle fan. This handles convex polygons, as well as some - * non-convex polygons if we get lucky. - * - * Returns TRUE if the polygon was successfully rendered. The rendering - * output is provided as callbacks (see the api). - */ -GLboolean __gl_renderCache( GLUtesselator *tess ) -{ - CachedVertex *v0 = tess->cache; - CachedVertex *vn = v0 + tess->cacheCount; - CachedVertex *vc; - GLdouble norm[3]; - int sign; - - if( tess->cacheCount < 3 ) { - /* Degenerate contour -- no output */ - return TRUE; - } - - norm[0] = tess->normal[0]; - norm[1] = tess->normal[1]; - norm[2] = tess->normal[2]; - if( norm[0] == 0 && norm[1] == 0 && norm[2] == 0 ) { - ComputeNormal( tess, norm, FALSE ); - } - - sign = ComputeNormal( tess, norm, TRUE ); - if( sign == SIGN_INCONSISTENT ) { - /* Fan triangles did not have a consistent orientation */ - return FALSE; - } - if( sign == 0 ) { - /* All triangles were degenerate */ - return TRUE; - } - - /* Make sure we do the right thing for each winding rule */ - switch( tess->windingRule ) { - case GLU_TESS_WINDING_ODD: - case GLU_TESS_WINDING_NONZERO: - break; - case GLU_TESS_WINDING_POSITIVE: - if( sign < 0 ) return TRUE; - break; - case GLU_TESS_WINDING_NEGATIVE: - if( sign > 0 ) return TRUE; - break; - case GLU_TESS_WINDING_ABS_GEQ_TWO: - return TRUE; - } - - CALL_BEGIN_OR_BEGIN_DATA( tess->boundaryOnly ? GL_LINE_LOOP - : (tess->cacheCount > 3) ? GL_TRIANGLE_FAN - : GL_TRIANGLES ); - - CALL_VERTEX_OR_VERTEX_DATA( v0->data ); - if( sign > 0 ) { - for( vc = v0+1; vc < vn; ++vc ) { - CALL_VERTEX_OR_VERTEX_DATA( vc->data ); - } - } else { - for( vc = vn-1; vc > v0; --vc ) { - CALL_VERTEX_OR_VERTEX_DATA( vc->data ); - } - } - CALL_END_OR_END_DATA(); - return TRUE; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/render.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/render.h deleted file mode 100644 index 956569bb77..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/render.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/render.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef __render_h_ -#define __render_h_ - -#include "mesh.h" - -/* __gl_renderMesh( tess, mesh ) takes a mesh and breaks it into triangle - * fans, strips, and separate triangles. A substantial effort is made - * to use as few rendering primitives as possible (ie. to make the fans - * and strips as large as possible). - * - * The rendering output is provided as callbacks (see the api). - */ -void __gl_renderMesh( GLUtesselator *tess, GLUmesh *mesh ); -void __gl_renderBoundary( GLUtesselator *tess, GLUmesh *mesh ); - -GLboolean __gl_renderCache( GLUtesselator *tess ); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/sweep.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/sweep.c deleted file mode 100644 index 1cfd7788f7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/sweep.c +++ /dev/null @@ -1,1362 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -*/ - -#include "gluos.h" -#include -#include -#include /* longjmp */ -#include /* LONG_MAX */ - -#include "mesh.h" -#include "geom.h" -#include "tess.h" -#include "dict.h" -#include "priorityq.h" -#include "memalloc.h" -#include "sweep.h" - -#define TRUE 1 -#define FALSE 0 - -#ifdef FOR_TRITE_TEST_PROGRAM -extern void DebugEvent( GLUtesselator *tess ); -#else -#define DebugEvent( tess ) -#endif - -/* - * Invariants for the Edge Dictionary. - * - each pair of adjacent edges e2=Succ(e1) satisfies EdgeLeq(e1,e2) - * at any valid location of the sweep event - * - if EdgeLeq(e2,e1) as well (at any valid sweep event), then e1 and e2 - * share a common endpoint - * - for each e, e->Dst has been processed, but not e->Org - * - each edge e satisfies VertLeq(e->Dst,event) && VertLeq(event,e->Org) - * where "event" is the current sweep line event. - * - no edge e has zero length - * - * Invariants for the Mesh (the processed portion). - * - the portion of the mesh left of the sweep line is a planar graph, - * ie. there is *some* way to embed it in the plane - * - no processed edge has zero length - * - no two processed vertices have identical coordinates - * - each "inside" region is monotone, ie. can be broken into two chains - * of monotonically increasing vertices according to VertLeq(v1,v2) - * - a non-invariant: these chains may intersect (very slightly) - * - * Invariants for the Sweep. - * - if none of the edges incident to the event vertex have an activeRegion - * (ie. none of these edges are in the edge dictionary), then the vertex - * has only right-going edges. - * - if an edge is marked "fixUpperEdge" (it is a temporary edge introduced - * by ConnectRightVertex), then it is the only right-going edge from - * its associated vertex. (This says that these edges exist only - * when it is necessary.) - */ - -#undef MAX -#undef MIN -#define MAX(x,y) ((x) >= (y) ? (x) : (y)) -#define MIN(x,y) ((x) <= (y) ? (x) : (y)) - -/* When we merge two edges into one, we need to compute the combined - * winding of the new edge. - */ -#define AddWinding(eDst,eSrc) (eDst->winding += eSrc->winding, \ - eDst->Sym->winding += eSrc->Sym->winding) - -static void SweepEvent( GLUtesselator *tess, GLUvertex *vEvent ); -static void WalkDirtyRegions( GLUtesselator *tess, ActiveRegion *regUp ); -static int CheckForRightSplice( GLUtesselator *tess, ActiveRegion *regUp ); - -static int EdgeLeq( GLUtesselator *tess, ActiveRegion *reg1, - ActiveRegion *reg2 ) -/* - * Both edges must be directed from right to left (this is the canonical - * direction for the upper edge of each region). - * - * The strategy is to evaluate a "t" value for each edge at the - * current sweep line position, given by tess->event. The calculations - * are designed to be very stable, but of course they are not perfect. - * - * Special case: if both edge destinations are at the sweep event, - * we sort the edges by slope (they would otherwise compare equally). - */ -{ - GLUvertex *event = tess->event; - GLUhalfEdge *e1, *e2; - GLdouble t1, t2; - - e1 = reg1->eUp; - e2 = reg2->eUp; - - if( e1->Dst == event ) { - if( e2->Dst == event ) { - /* Two edges right of the sweep line which meet at the sweep event. - * Sort them by slope. - */ - if( VertLeq( e1->Org, e2->Org )) { - return EdgeSign( e2->Dst, e1->Org, e2->Org ) <= 0; - } - return EdgeSign( e1->Dst, e2->Org, e1->Org ) >= 0; - } - return EdgeSign( e2->Dst, event, e2->Org ) <= 0; - } - if( e2->Dst == event ) { - return EdgeSign( e1->Dst, event, e1->Org ) >= 0; - } - - /* General case - compute signed distance *from* e1, e2 to event */ - t1 = EdgeEval( e1->Dst, event, e1->Org ); - t2 = EdgeEval( e2->Dst, event, e2->Org ); - return (t1 >= t2); -} - - -static void DeleteRegion( GLUtesselator *tess, ActiveRegion *reg ) -{ - if( reg->fixUpperEdge ) { - /* It was created with zero winding number, so it better be - * deleted with zero winding number (ie. it better not get merged - * with a real edge). - */ - assert( reg->eUp->winding == 0 ); - } - reg->eUp->activeRegion = NULL; - dictDelete( tess->dict, reg->nodeUp ); /* __gl_dictListDelete */ - memFree( reg ); -} - - -static int FixUpperEdge( ActiveRegion *reg, GLUhalfEdge *newEdge ) -/* - * Replace an upper edge which needs fixing (see ConnectRightVertex). - */ -{ - assert( reg->fixUpperEdge ); - if ( !__gl_meshDelete( reg->eUp ) ) return 0; - reg->fixUpperEdge = FALSE; - reg->eUp = newEdge; - newEdge->activeRegion = reg; - - return 1; -} - -static ActiveRegion *TopLeftRegion( ActiveRegion *reg ) -{ - GLUvertex *org = reg->eUp->Org; - GLUhalfEdge *e; - - /* Find the region above the uppermost edge with the same origin */ - do { - reg = RegionAbove( reg ); - } while( reg->eUp->Org == org ); - - /* If the edge above was a temporary edge introduced by ConnectRightVertex, - * now is the time to fix it. - */ - if( reg->fixUpperEdge ) { - e = __gl_meshConnect( RegionBelow(reg)->eUp->Sym, reg->eUp->Lnext ); - if (e == NULL) return NULL; - if ( !FixUpperEdge( reg, e ) ) return NULL; - reg = RegionAbove( reg ); - } - return reg; -} - -static ActiveRegion *TopRightRegion( ActiveRegion *reg ) -{ - GLUvertex *dst = reg->eUp->Dst; - - /* Find the region above the uppermost edge with the same destination */ - do { - reg = RegionAbove( reg ); - } while( reg->eUp->Dst == dst ); - return reg; -} - -static ActiveRegion *AddRegionBelow( GLUtesselator *tess, - ActiveRegion *regAbove, - GLUhalfEdge *eNewUp ) -/* - * Add a new active region to the sweep line, *somewhere* below "regAbove" - * (according to where the new edge belongs in the sweep-line dictionary). - * The upper edge of the new region will be "eNewUp". - * Winding number and "inside" flag are not updated. - */ -{ - ActiveRegion *regNew = (ActiveRegion *)memAlloc( sizeof( ActiveRegion )); - if (regNew == NULL) longjmp(tess->env,1); - - regNew->eUp = eNewUp; - /* __gl_dictListInsertBefore */ - regNew->nodeUp = dictInsertBefore( tess->dict, regAbove->nodeUp, regNew ); - if (regNew->nodeUp == NULL) longjmp(tess->env,1); - regNew->fixUpperEdge = FALSE; - regNew->sentinel = FALSE; - regNew->dirty = FALSE; - - eNewUp->activeRegion = regNew; - return regNew; -} - -static GLboolean IsWindingInside( GLUtesselator *tess, int n ) -{ - switch( tess->windingRule ) { - case GLU_TESS_WINDING_ODD: - return (n & 1); - case GLU_TESS_WINDING_NONZERO: - return (n != 0); - case GLU_TESS_WINDING_POSITIVE: - return (n > 0); - case GLU_TESS_WINDING_NEGATIVE: - return (n < 0); - case GLU_TESS_WINDING_ABS_GEQ_TWO: - return (n >= 2) || (n <= -2); - } - /*LINTED*/ - assert( FALSE ); - /*NOTREACHED*/ - return GL_FALSE; /* avoid compiler complaints */ -} - - -static void ComputeWinding( GLUtesselator *tess, ActiveRegion *reg ) -{ - reg->windingNumber = RegionAbove(reg)->windingNumber + reg->eUp->winding; - reg->inside = IsWindingInside( tess, reg->windingNumber ); -} - - -static void FinishRegion( GLUtesselator *tess, ActiveRegion *reg ) -/* - * Delete a region from the sweep line. This happens when the upper - * and lower chains of a region meet (at a vertex on the sweep line). - * The "inside" flag is copied to the appropriate mesh face (we could - * not do this before -- since the structure of the mesh is always - * changing, this face may not have even existed until now). - */ -{ - GLUhalfEdge *e = reg->eUp; - GLUface *f = e->Lface; - - f->inside = reg->inside; - f->anEdge = e; /* optimization for __gl_meshTessellateMonoRegion() */ - DeleteRegion( tess, reg ); -} - - -static GLUhalfEdge *FinishLeftRegions( GLUtesselator *tess, - ActiveRegion *regFirst, ActiveRegion *regLast ) -/* - * We are given a vertex with one or more left-going edges. All affected - * edges should be in the edge dictionary. Starting at regFirst->eUp, - * we walk down deleting all regions where both edges have the same - * origin vOrg. At the same time we copy the "inside" flag from the - * active region to the face, since at this point each face will belong - * to at most one region (this was not necessarily true until this point - * in the sweep). The walk stops at the region above regLast; if regLast - * is NULL we walk as far as possible. At the same time we relink the - * mesh if necessary, so that the ordering of edges around vOrg is the - * same as in the dictionary. - */ -{ - ActiveRegion *reg, *regPrev; - GLUhalfEdge *e, *ePrev; - - regPrev = regFirst; - ePrev = regFirst->eUp; - while( regPrev != regLast ) { - regPrev->fixUpperEdge = FALSE; /* placement was OK */ - reg = RegionBelow( regPrev ); - e = reg->eUp; - if( e->Org != ePrev->Org ) { - if( ! reg->fixUpperEdge ) { - /* Remove the last left-going edge. Even though there are no further - * edges in the dictionary with this origin, there may be further - * such edges in the mesh (if we are adding left edges to a vertex - * that has already been processed). Thus it is important to call - * FinishRegion rather than just DeleteRegion. - */ - FinishRegion( tess, regPrev ); - break; - } - /* If the edge below was a temporary edge introduced by - * ConnectRightVertex, now is the time to fix it. - */ - e = __gl_meshConnect( ePrev->Lprev, e->Sym ); - if (e == NULL) longjmp(tess->env,1); - if ( !FixUpperEdge( reg, e ) ) longjmp(tess->env,1); - } - - /* Relink edges so that ePrev->Onext == e */ - if( ePrev->Onext != e ) { - if ( !__gl_meshSplice( e->Oprev, e ) ) longjmp(tess->env,1); - if ( !__gl_meshSplice( ePrev, e ) ) longjmp(tess->env,1); - } - FinishRegion( tess, regPrev ); /* may change reg->eUp */ - ePrev = reg->eUp; - regPrev = reg; - } - return ePrev; -} - - -static void AddRightEdges( GLUtesselator *tess, ActiveRegion *regUp, - GLUhalfEdge *eFirst, GLUhalfEdge *eLast, GLUhalfEdge *eTopLeft, - GLboolean cleanUp ) -/* - * Purpose: insert right-going edges into the edge dictionary, and update - * winding numbers and mesh connectivity appropriately. All right-going - * edges share a common origin vOrg. Edges are inserted CCW starting at - * eFirst; the last edge inserted is eLast->Oprev. If vOrg has any - * left-going edges already processed, then eTopLeft must be the edge - * such that an imaginary upward vertical segment from vOrg would be - * contained between eTopLeft->Oprev and eTopLeft; otherwise eTopLeft - * should be NULL. - */ -{ - ActiveRegion *reg, *regPrev; - GLUhalfEdge *e, *ePrev; - int firstTime = TRUE; - - /* Insert the new right-going edges in the dictionary */ - e = eFirst; - do { - assert( VertLeq( e->Org, e->Dst )); - AddRegionBelow( tess, regUp, e->Sym ); - e = e->Onext; - } while ( e != eLast ); - - /* Walk *all* right-going edges from e->Org, in the dictionary order, - * updating the winding numbers of each region, and re-linking the mesh - * edges to match the dictionary ordering (if necessary). - */ - if( eTopLeft == NULL ) { - eTopLeft = RegionBelow( regUp )->eUp->Rprev; - } - regPrev = regUp; - ePrev = eTopLeft; - for( ;; ) { - reg = RegionBelow( regPrev ); - e = reg->eUp->Sym; - if( e->Org != ePrev->Org ) break; - - if( e->Onext != ePrev ) { - /* Unlink e from its current position, and relink below ePrev */ - if ( !__gl_meshSplice( e->Oprev, e ) ) longjmp(tess->env,1); - if ( !__gl_meshSplice( ePrev->Oprev, e ) ) longjmp(tess->env,1); - } - /* Compute the winding number and "inside" flag for the new regions */ - reg->windingNumber = regPrev->windingNumber - e->winding; - reg->inside = IsWindingInside( tess, reg->windingNumber ); - - /* Check for two outgoing edges with same slope -- process these - * before any intersection tests (see example in __gl_computeInterior). - */ - regPrev->dirty = TRUE; - if( ! firstTime && CheckForRightSplice( tess, regPrev )) { - AddWinding( e, ePrev ); - DeleteRegion( tess, regPrev ); - if ( !__gl_meshDelete( ePrev ) ) longjmp(tess->env,1); - } - firstTime = FALSE; - regPrev = reg; - ePrev = e; - } - regPrev->dirty = TRUE; - assert( regPrev->windingNumber - e->winding == reg->windingNumber ); - - if( cleanUp ) { - /* Check for intersections between newly adjacent edges. */ - WalkDirtyRegions( tess, regPrev ); - } -} - - -static void CallCombine( GLUtesselator *tess, GLUvertex *isect, - void *data[4], GLfloat weights[4], int needed ) -{ - GLdouble coords[3]; - - /* Copy coord data in case the callback changes it. */ - coords[0] = isect->coords[0]; - coords[1] = isect->coords[1]; - coords[2] = isect->coords[2]; - - isect->data = NULL; - CALL_COMBINE_OR_COMBINE_DATA( coords, data, weights, &isect->data ); - if( isect->data == NULL ) { - if( ! needed ) { - isect->data = data[0]; - } else if( ! tess->fatalError ) { - /* The only way fatal error is when two edges are found to intersect, - * but the user has not provided the callback necessary to handle - * generated intersection points. - */ - CALL_ERROR_OR_ERROR_DATA( GLU_TESS_NEED_COMBINE_CALLBACK ); - tess->fatalError = TRUE; - } - } -} - -static void SpliceMergeVertices( GLUtesselator *tess, GLUhalfEdge *e1, - GLUhalfEdge *e2 ) -/* - * Two vertices with idential coordinates are combined into one. - * e1->Org is kept, while e2->Org is discarded. - */ -{ - void *data[4] = { NULL, NULL, NULL, NULL }; - GLfloat weights[4] = { 0.5, 0.5, 0.0, 0.0 }; - - data[0] = e1->Org->data; - data[1] = e2->Org->data; - CallCombine( tess, e1->Org, data, weights, FALSE ); - if ( !__gl_meshSplice( e1, e2 ) ) longjmp(tess->env,1); -} - -static void VertexWeights( GLUvertex *isect, GLUvertex *org, GLUvertex *dst, - GLfloat *weights ) -/* - * Find some weights which describe how the intersection vertex is - * a linear combination of "org" and "dest". Each of the two edges - * which generated "isect" is allocated 50% of the weight; each edge - * splits the weight between its org and dst according to the - * relative distance to "isect". - */ -{ - GLdouble t1 = VertL1dist( org, isect ); - GLdouble t2 = VertL1dist( dst, isect ); - - weights[0] = 0.5 * t2 / (t1 + t2); - weights[1] = 0.5 * t1 / (t1 + t2); - isect->coords[0] += weights[0]*org->coords[0] + weights[1]*dst->coords[0]; - isect->coords[1] += weights[0]*org->coords[1] + weights[1]*dst->coords[1]; - isect->coords[2] += weights[0]*org->coords[2] + weights[1]*dst->coords[2]; -} - - -static void GetIntersectData( GLUtesselator *tess, GLUvertex *isect, - GLUvertex *orgUp, GLUvertex *dstUp, - GLUvertex *orgLo, GLUvertex *dstLo ) -/* - * We've computed a new intersection point, now we need a "data" pointer - * from the user so that we can refer to this new vertex in the - * rendering callbacks. - */ -{ - void *data[4]; - GLfloat weights[4]; - - data[0] = orgUp->data; - data[1] = dstUp->data; - data[2] = orgLo->data; - data[3] = dstLo->data; - - isect->coords[0] = isect->coords[1] = isect->coords[2] = 0; - VertexWeights( isect, orgUp, dstUp, &weights[0] ); - VertexWeights( isect, orgLo, dstLo, &weights[2] ); - - CallCombine( tess, isect, data, weights, TRUE ); -} - -static int CheckForRightSplice( GLUtesselator *tess, ActiveRegion *regUp ) -/* - * Check the upper and lower edge of "regUp", to make sure that the - * eUp->Org is above eLo, or eLo->Org is below eUp (depending on which - * origin is leftmost). - * - * The main purpose is to splice right-going edges with the same - * dest vertex and nearly identical slopes (ie. we can't distinguish - * the slopes numerically). However the splicing can also help us - * to recover from numerical errors. For example, suppose at one - * point we checked eUp and eLo, and decided that eUp->Org is barely - * above eLo. Then later, we split eLo into two edges (eg. from - * a splice operation like this one). This can change the result of - * our test so that now eUp->Org is incident to eLo, or barely below it. - * We must correct this condition to maintain the dictionary invariants. - * - * One possibility is to check these edges for intersection again - * (ie. CheckForIntersect). This is what we do if possible. However - * CheckForIntersect requires that tess->event lies between eUp and eLo, - * so that it has something to fall back on when the intersection - * calculation gives us an unusable answer. So, for those cases where - * we can't check for intersection, this routine fixes the problem - * by just splicing the offending vertex into the other edge. - * This is a guaranteed solution, no matter how degenerate things get. - * Basically this is a combinatorial solution to a numerical problem. - */ -{ - ActiveRegion *regLo = RegionBelow(regUp); - GLUhalfEdge *eUp = regUp->eUp; - GLUhalfEdge *eLo = regLo->eUp; - - if( VertLeq( eUp->Org, eLo->Org )) { - if( EdgeSign( eLo->Dst, eUp->Org, eLo->Org ) > 0 ) return FALSE; - - /* eUp->Org appears to be below eLo */ - if( ! VertEq( eUp->Org, eLo->Org )) { - /* Splice eUp->Org into eLo */ - if ( __gl_meshSplitEdge( eLo->Sym ) == NULL) longjmp(tess->env,1); - if ( !__gl_meshSplice( eUp, eLo->Oprev ) ) longjmp(tess->env,1); - regUp->dirty = regLo->dirty = TRUE; - - } else if( eUp->Org != eLo->Org ) { - /* merge the two vertices, discarding eUp->Org */ - pqDelete( tess->pq, eUp->Org->pqHandle ); /* __gl_pqSortDelete */ - SpliceMergeVertices( tess, eLo->Oprev, eUp ); - } - } else { - if( EdgeSign( eUp->Dst, eLo->Org, eUp->Org ) < 0 ) return FALSE; - - /* eLo->Org appears to be above eUp, so splice eLo->Org into eUp */ - RegionAbove(regUp)->dirty = regUp->dirty = TRUE; - if (__gl_meshSplitEdge( eUp->Sym ) == NULL) longjmp(tess->env,1); - if ( !__gl_meshSplice( eLo->Oprev, eUp ) ) longjmp(tess->env,1); - } - return TRUE; -} - -static int CheckForLeftSplice( GLUtesselator *tess, ActiveRegion *regUp ) -/* - * Check the upper and lower edge of "regUp", to make sure that the - * eUp->Dst is above eLo, or eLo->Dst is below eUp (depending on which - * destination is rightmost). - * - * Theoretically, this should always be true. However, splitting an edge - * into two pieces can change the results of previous tests. For example, - * suppose at one point we checked eUp and eLo, and decided that eUp->Dst - * is barely above eLo. Then later, we split eLo into two edges (eg. from - * a splice operation like this one). This can change the result of - * the test so that now eUp->Dst is incident to eLo, or barely below it. - * We must correct this condition to maintain the dictionary invariants - * (otherwise new edges might get inserted in the wrong place in the - * dictionary, and bad stuff will happen). - * - * We fix the problem by just splicing the offending vertex into the - * other edge. - */ -{ - ActiveRegion *regLo = RegionBelow(regUp); - GLUhalfEdge *eUp = regUp->eUp; - GLUhalfEdge *eLo = regLo->eUp; - GLUhalfEdge *e; - - assert( ! VertEq( eUp->Dst, eLo->Dst )); - - if( VertLeq( eUp->Dst, eLo->Dst )) { - if( EdgeSign( eUp->Dst, eLo->Dst, eUp->Org ) < 0 ) return FALSE; - - /* eLo->Dst is above eUp, so splice eLo->Dst into eUp */ - RegionAbove(regUp)->dirty = regUp->dirty = TRUE; - e = __gl_meshSplitEdge( eUp ); - if (e == NULL) longjmp(tess->env,1); - if ( !__gl_meshSplice( eLo->Sym, e ) ) longjmp(tess->env,1); - e->Lface->inside = regUp->inside; - } else { - if( EdgeSign( eLo->Dst, eUp->Dst, eLo->Org ) > 0 ) return FALSE; - - /* eUp->Dst is below eLo, so splice eUp->Dst into eLo */ - regUp->dirty = regLo->dirty = TRUE; - e = __gl_meshSplitEdge( eLo ); - if (e == NULL) longjmp(tess->env,1); - if ( !__gl_meshSplice( eUp->Lnext, eLo->Sym ) ) longjmp(tess->env,1); - e->Rface->inside = regUp->inside; - } - return TRUE; -} - - -static int CheckForIntersect( GLUtesselator *tess, ActiveRegion *regUp ) -/* - * Check the upper and lower edges of the given region to see if - * they intersect. If so, create the intersection and add it - * to the data structures. - * - * Returns TRUE if adding the new intersection resulted in a recursive - * call to AddRightEdges(); in this case all "dirty" regions have been - * checked for intersections, and possibly regUp has been deleted. - */ -{ - ActiveRegion *regLo = RegionBelow(regUp); - GLUhalfEdge *eUp = regUp->eUp; - GLUhalfEdge *eLo = regLo->eUp; - GLUvertex *orgUp = eUp->Org; - GLUvertex *orgLo = eLo->Org; - GLUvertex *dstUp = eUp->Dst; - GLUvertex *dstLo = eLo->Dst; - GLdouble tMinUp, tMaxLo; - GLUvertex isect, *orgMin; - GLUhalfEdge *e; - - assert( ! VertEq( dstLo, dstUp )); - assert( EdgeSign( dstUp, tess->event, orgUp ) <= 0 ); - assert( EdgeSign( dstLo, tess->event, orgLo ) >= 0 ); - assert( orgUp != tess->event && orgLo != tess->event ); - assert( ! regUp->fixUpperEdge && ! regLo->fixUpperEdge ); - - if( orgUp == orgLo ) return FALSE; /* right endpoints are the same */ - - tMinUp = MIN( orgUp->t, dstUp->t ); - tMaxLo = MAX( orgLo->t, dstLo->t ); - if( tMinUp > tMaxLo ) return FALSE; /* t ranges do not overlap */ - - if( VertLeq( orgUp, orgLo )) { - if( EdgeSign( dstLo, orgUp, orgLo ) > 0 ) return FALSE; - } else { - if( EdgeSign( dstUp, orgLo, orgUp ) < 0 ) return FALSE; - } - - /* At this point the edges intersect, at least marginally */ - DebugEvent( tess ); - - __gl_edgeIntersect( dstUp, orgUp, dstLo, orgLo, &isect ); - /* The following properties are guaranteed: */ - assert( MIN( orgUp->t, dstUp->t ) <= isect.t ); - assert( isect.t <= MAX( orgLo->t, dstLo->t )); - assert( MIN( dstLo->s, dstUp->s ) <= isect.s ); - assert( isect.s <= MAX( orgLo->s, orgUp->s )); - - if( VertLeq( &isect, tess->event )) { - /* The intersection point lies slightly to the left of the sweep line, - * so move it until it''s slightly to the right of the sweep line. - * (If we had perfect numerical precision, this would never happen - * in the first place). The easiest and safest thing to do is - * replace the intersection by tess->event. - */ - isect.s = tess->event->s; - isect.t = tess->event->t; - } - /* Similarly, if the computed intersection lies to the right of the - * rightmost origin (which should rarely happen), it can cause - * unbelievable inefficiency on sufficiently degenerate inputs. - * (If you have the test program, try running test54.d with the - * "X zoom" option turned on). - */ - orgMin = VertLeq( orgUp, orgLo ) ? orgUp : orgLo; - if( VertLeq( orgMin, &isect )) { - isect.s = orgMin->s; - isect.t = orgMin->t; - } - - if( VertEq( &isect, orgUp ) || VertEq( &isect, orgLo )) { - /* Easy case -- intersection at one of the right endpoints */ - (void) CheckForRightSplice( tess, regUp ); - return FALSE; - } - - if( (! VertEq( dstUp, tess->event ) - && EdgeSign( dstUp, tess->event, &isect ) >= 0) - || (! VertEq( dstLo, tess->event ) - && EdgeSign( dstLo, tess->event, &isect ) <= 0 )) - { - /* Very unusual -- the new upper or lower edge would pass on the - * wrong side of the sweep event, or through it. This can happen - * due to very small numerical errors in the intersection calculation. - */ - if( dstLo == tess->event ) { - /* Splice dstLo into eUp, and process the new region(s) */ - if (__gl_meshSplitEdge( eUp->Sym ) == NULL) longjmp(tess->env,1); - if ( !__gl_meshSplice( eLo->Sym, eUp ) ) longjmp(tess->env,1); - regUp = TopLeftRegion( regUp ); - if (regUp == NULL) longjmp(tess->env,1); - eUp = RegionBelow(regUp)->eUp; - FinishLeftRegions( tess, RegionBelow(regUp), regLo ); - AddRightEdges( tess, regUp, eUp->Oprev, eUp, eUp, TRUE ); - return TRUE; - } - if( dstUp == tess->event ) { - /* Splice dstUp into eLo, and process the new region(s) */ - if (__gl_meshSplitEdge( eLo->Sym ) == NULL) longjmp(tess->env,1); - if ( !__gl_meshSplice( eUp->Lnext, eLo->Oprev ) ) longjmp(tess->env,1); - regLo = regUp; - regUp = TopRightRegion( regUp ); - e = RegionBelow(regUp)->eUp->Rprev; - regLo->eUp = eLo->Oprev; - eLo = FinishLeftRegions( tess, regLo, NULL ); - AddRightEdges( tess, regUp, eLo->Onext, eUp->Rprev, e, TRUE ); - return TRUE; - } - /* Special case: called from ConnectRightVertex. If either - * edge passes on the wrong side of tess->event, split it - * (and wait for ConnectRightVertex to splice it appropriately). - */ - if( EdgeSign( dstUp, tess->event, &isect ) >= 0 ) { - RegionAbove(regUp)->dirty = regUp->dirty = TRUE; - if (__gl_meshSplitEdge( eUp->Sym ) == NULL) longjmp(tess->env,1); - eUp->Org->s = tess->event->s; - eUp->Org->t = tess->event->t; - } - if( EdgeSign( dstLo, tess->event, &isect ) <= 0 ) { - regUp->dirty = regLo->dirty = TRUE; - if (__gl_meshSplitEdge( eLo->Sym ) == NULL) longjmp(tess->env,1); - eLo->Org->s = tess->event->s; - eLo->Org->t = tess->event->t; - } - /* leave the rest for ConnectRightVertex */ - return FALSE; - } - - /* General case -- split both edges, splice into new vertex. - * When we do the splice operation, the order of the arguments is - * arbitrary as far as correctness goes. However, when the operation - * creates a new face, the work done is proportional to the size of - * the new face. We expect the faces in the processed part of - * the mesh (ie. eUp->Lface) to be smaller than the faces in the - * unprocessed original contours (which will be eLo->Oprev->Lface). - */ - if (__gl_meshSplitEdge( eUp->Sym ) == NULL) longjmp(tess->env,1); - if (__gl_meshSplitEdge( eLo->Sym ) == NULL) longjmp(tess->env,1); - if ( !__gl_meshSplice( eLo->Oprev, eUp ) ) longjmp(tess->env,1); - eUp->Org->s = isect.s; - eUp->Org->t = isect.t; - eUp->Org->pqHandle = pqInsert( tess->pq, eUp->Org ); /* __gl_pqSortInsert */ - if (eUp->Org->pqHandle == LONG_MAX) { - pqDeletePriorityQ(tess->pq); /* __gl_pqSortDeletePriorityQ */ - tess->pq = NULL; - longjmp(tess->env,1); - } - GetIntersectData( tess, eUp->Org, orgUp, dstUp, orgLo, dstLo ); - RegionAbove(regUp)->dirty = regUp->dirty = regLo->dirty = TRUE; - return FALSE; -} - -static void WalkDirtyRegions( GLUtesselator *tess, ActiveRegion *regUp ) -/* - * When the upper or lower edge of any region changes, the region is - * marked "dirty". This routine walks through all the dirty regions - * and makes sure that the dictionary invariants are satisfied - * (see the comments at the beginning of this file). Of course - * new dirty regions can be created as we make changes to restore - * the invariants. - */ -{ - ActiveRegion *regLo = RegionBelow(regUp); - GLUhalfEdge *eUp, *eLo; - - for( ;; ) { - /* Find the lowest dirty region (we walk from the bottom up). */ - while( regLo->dirty ) { - regUp = regLo; - regLo = RegionBelow(regLo); - } - if( ! regUp->dirty ) { - regLo = regUp; - regUp = RegionAbove( regUp ); - if( regUp == NULL || ! regUp->dirty ) { - /* We've walked all the dirty regions */ - return; - } - } - regUp->dirty = FALSE; - eUp = regUp->eUp; - eLo = regLo->eUp; - - if( eUp->Dst != eLo->Dst ) { - /* Check that the edge ordering is obeyed at the Dst vertices. */ - if( CheckForLeftSplice( tess, regUp )) { - - /* If the upper or lower edge was marked fixUpperEdge, then - * we no longer need it (since these edges are needed only for - * vertices which otherwise have no right-going edges). - */ - if( regLo->fixUpperEdge ) { - DeleteRegion( tess, regLo ); - if ( !__gl_meshDelete( eLo ) ) longjmp(tess->env,1); - regLo = RegionBelow( regUp ); - eLo = regLo->eUp; - } else if( regUp->fixUpperEdge ) { - DeleteRegion( tess, regUp ); - if ( !__gl_meshDelete( eUp ) ) longjmp(tess->env,1); - regUp = RegionAbove( regLo ); - eUp = regUp->eUp; - } - } - } - if( eUp->Org != eLo->Org ) { - if( eUp->Dst != eLo->Dst - && ! regUp->fixUpperEdge && ! regLo->fixUpperEdge - && (eUp->Dst == tess->event || eLo->Dst == tess->event) ) - { - /* When all else fails in CheckForIntersect(), it uses tess->event - * as the intersection location. To make this possible, it requires - * that tess->event lie between the upper and lower edges, and also - * that neither of these is marked fixUpperEdge (since in the worst - * case it might splice one of these edges into tess->event, and - * violate the invariant that fixable edges are the only right-going - * edge from their associated vertex). - */ - if( CheckForIntersect( tess, regUp )) { - /* WalkDirtyRegions() was called recursively; we're done */ - return; - } - } else { - /* Even though we can't use CheckForIntersect(), the Org vertices - * may violate the dictionary edge ordering. Check and correct this. - */ - (void) CheckForRightSplice( tess, regUp ); - } - } - if( eUp->Org == eLo->Org && eUp->Dst == eLo->Dst ) { - /* A degenerate loop consisting of only two edges -- delete it. */ - AddWinding( eLo, eUp ); - DeleteRegion( tess, regUp ); - if ( !__gl_meshDelete( eUp ) ) longjmp(tess->env,1); - regUp = RegionAbove( regLo ); - } - } -} - - -static void ConnectRightVertex( GLUtesselator *tess, ActiveRegion *regUp, - GLUhalfEdge *eBottomLeft ) -/* - * Purpose: connect a "right" vertex vEvent (one where all edges go left) - * to the unprocessed portion of the mesh. Since there are no right-going - * edges, two regions (one above vEvent and one below) are being merged - * into one. "regUp" is the upper of these two regions. - * - * There are two reasons for doing this (adding a right-going edge): - * - if the two regions being merged are "inside", we must add an edge - * to keep them separated (the combined region would not be monotone). - * - in any case, we must leave some record of vEvent in the dictionary, - * so that we can merge vEvent with features that we have not seen yet. - * For example, maybe there is a vertical edge which passes just to - * the right of vEvent; we would like to splice vEvent into this edge. - * - * However, we don't want to connect vEvent to just any vertex. We don''t - * want the new edge to cross any other edges; otherwise we will create - * intersection vertices even when the input data had no self-intersections. - * (This is a bad thing; if the user's input data has no intersections, - * we don't want to generate any false intersections ourselves.) - * - * Our eventual goal is to connect vEvent to the leftmost unprocessed - * vertex of the combined region (the union of regUp and regLo). - * But because of unseen vertices with all right-going edges, and also - * new vertices which may be created by edge intersections, we don''t - * know where that leftmost unprocessed vertex is. In the meantime, we - * connect vEvent to the closest vertex of either chain, and mark the region - * as "fixUpperEdge". This flag says to delete and reconnect this edge - * to the next processed vertex on the boundary of the combined region. - * Quite possibly the vertex we connected to will turn out to be the - * closest one, in which case we won''t need to make any changes. - */ -{ - GLUhalfEdge *eNew; - GLUhalfEdge *eTopLeft = eBottomLeft->Onext; - ActiveRegion *regLo = RegionBelow(regUp); - GLUhalfEdge *eUp = regUp->eUp; - GLUhalfEdge *eLo = regLo->eUp; - int degenerate = FALSE; - - if( eUp->Dst != eLo->Dst ) { - (void) CheckForIntersect( tess, regUp ); - } - - /* Possible new degeneracies: upper or lower edge of regUp may pass - * through vEvent, or may coincide with new intersection vertex - */ - if( VertEq( eUp->Org, tess->event )) { - if ( !__gl_meshSplice( eTopLeft->Oprev, eUp ) ) longjmp(tess->env,1); - regUp = TopLeftRegion( regUp ); - if (regUp == NULL) longjmp(tess->env,1); - eTopLeft = RegionBelow( regUp )->eUp; - FinishLeftRegions( tess, RegionBelow(regUp), regLo ); - degenerate = TRUE; - } - if( VertEq( eLo->Org, tess->event )) { - if ( !__gl_meshSplice( eBottomLeft, eLo->Oprev ) ) longjmp(tess->env,1); - eBottomLeft = FinishLeftRegions( tess, regLo, NULL ); - degenerate = TRUE; - } - if( degenerate ) { - AddRightEdges( tess, regUp, eBottomLeft->Onext, eTopLeft, eTopLeft, TRUE ); - return; - } - - /* Non-degenerate situation -- need to add a temporary, fixable edge. - * Connect to the closer of eLo->Org, eUp->Org. - */ - if( VertLeq( eLo->Org, eUp->Org )) { - eNew = eLo->Oprev; - } else { - eNew = eUp; - } - eNew = __gl_meshConnect( eBottomLeft->Lprev, eNew ); - if (eNew == NULL) longjmp(tess->env,1); - - /* Prevent cleanup, otherwise eNew might disappear before we've even - * had a chance to mark it as a temporary edge. - */ - AddRightEdges( tess, regUp, eNew, eNew->Onext, eNew->Onext, FALSE ); - eNew->Sym->activeRegion->fixUpperEdge = TRUE; - WalkDirtyRegions( tess, regUp ); -} - -/* Because vertices at exactly the same location are merged together - * before we process the sweep event, some degenerate cases can't occur. - * However if someone eventually makes the modifications required to - * merge features which are close together, the cases below marked - * TOLERANCE_NONZERO will be useful. They were debugged before the - * code to merge identical vertices in the main loop was added. - */ -#define TOLERANCE_NONZERO FALSE - -static void ConnectLeftDegenerate( GLUtesselator *tess, - ActiveRegion *regUp, GLUvertex *vEvent ) -/* - * The event vertex lies exacty on an already-processed edge or vertex. - * Adding the new vertex involves splicing it into the already-processed - * part of the mesh. - */ -{ - GLUhalfEdge *e, *eTopLeft, *eTopRight, *eLast; - ActiveRegion *reg; - - e = regUp->eUp; - if( VertEq( e->Org, vEvent )) { - /* e->Org is an unprocessed vertex - just combine them, and wait - * for e->Org to be pulled from the queue - */ - assert( TOLERANCE_NONZERO ); - SpliceMergeVertices( tess, e, vEvent->anEdge ); - return; - } - - if( ! VertEq( e->Dst, vEvent )) { - /* General case -- splice vEvent into edge e which passes through it */ - if (__gl_meshSplitEdge( e->Sym ) == NULL) longjmp(tess->env,1); - if( regUp->fixUpperEdge ) { - /* This edge was fixable -- delete unused portion of original edge */ - if ( !__gl_meshDelete( e->Onext ) ) longjmp(tess->env,1); - regUp->fixUpperEdge = FALSE; - } - if ( !__gl_meshSplice( vEvent->anEdge, e ) ) longjmp(tess->env,1); - SweepEvent( tess, vEvent ); /* recurse */ - return; - } - - /* vEvent coincides with e->Dst, which has already been processed. - * Splice in the additional right-going edges. - */ - assert( TOLERANCE_NONZERO ); - regUp = TopRightRegion( regUp ); - reg = RegionBelow( regUp ); - eTopRight = reg->eUp->Sym; - eTopLeft = eLast = eTopRight->Onext; - if( reg->fixUpperEdge ) { - /* Here e->Dst has only a single fixable edge going right. - * We can delete it since now we have some real right-going edges. - */ - assert( eTopLeft != eTopRight ); /* there are some left edges too */ - DeleteRegion( tess, reg ); - if ( !__gl_meshDelete( eTopRight ) ) longjmp(tess->env,1); - eTopRight = eTopLeft->Oprev; - } - if ( !__gl_meshSplice( vEvent->anEdge, eTopRight ) ) longjmp(tess->env,1); - if( ! EdgeGoesLeft( eTopLeft )) { - /* e->Dst had no left-going edges -- indicate this to AddRightEdges() */ - eTopLeft = NULL; - } - AddRightEdges( tess, regUp, eTopRight->Onext, eLast, eTopLeft, TRUE ); -} - - -static void ConnectLeftVertex( GLUtesselator *tess, GLUvertex *vEvent ) -/* - * Purpose: connect a "left" vertex (one where both edges go right) - * to the processed portion of the mesh. Let R be the active region - * containing vEvent, and let U and L be the upper and lower edge - * chains of R. There are two possibilities: - * - * - the normal case: split R into two regions, by connecting vEvent to - * the rightmost vertex of U or L lying to the left of the sweep line - * - * - the degenerate case: if vEvent is close enough to U or L, we - * merge vEvent into that edge chain. The subcases are: - * - merging with the rightmost vertex of U or L - * - merging with the active edge of U or L - * - merging with an already-processed portion of U or L - */ -{ - ActiveRegion *regUp, *regLo, *reg; - GLUhalfEdge *eUp, *eLo, *eNew; - ActiveRegion tmp; - - /* assert( vEvent->anEdge->Onext->Onext == vEvent->anEdge ); */ - - /* Get a pointer to the active region containing vEvent */ - tmp.eUp = vEvent->anEdge->Sym; - /* __GL_DICTLISTKEY */ /* __gl_dictListSearch */ - regUp = (ActiveRegion *)dictKey( dictSearch( tess->dict, &tmp )); - regLo = RegionBelow( regUp ); - eUp = regUp->eUp; - eLo = regLo->eUp; - - /* Try merging with U or L first */ - if( EdgeSign( eUp->Dst, vEvent, eUp->Org ) == 0 ) { - ConnectLeftDegenerate( tess, regUp, vEvent ); - return; - } - - /* Connect vEvent to rightmost processed vertex of either chain. - * e->Dst is the vertex that we will connect to vEvent. - */ - reg = VertLeq( eLo->Dst, eUp->Dst ) ? regUp : regLo; - - if( regUp->inside || reg->fixUpperEdge) { - if( reg == regUp ) { - eNew = __gl_meshConnect( vEvent->anEdge->Sym, eUp->Lnext ); - if (eNew == NULL) longjmp(tess->env,1); - } else { - GLUhalfEdge *tempHalfEdge= __gl_meshConnect( eLo->Dnext, vEvent->anEdge); - if (tempHalfEdge == NULL) longjmp(tess->env,1); - - eNew = tempHalfEdge->Sym; - } - if( reg->fixUpperEdge ) { - if ( !FixUpperEdge( reg, eNew ) ) longjmp(tess->env,1); - } else { - ComputeWinding( tess, AddRegionBelow( tess, regUp, eNew )); - } - SweepEvent( tess, vEvent ); - } else { - /* The new vertex is in a region which does not belong to the polygon. - * We don''t need to connect this vertex to the rest of the mesh. - */ - AddRightEdges( tess, regUp, vEvent->anEdge, vEvent->anEdge, NULL, TRUE ); - } -} - - -static void SweepEvent( GLUtesselator *tess, GLUvertex *vEvent ) -/* - * Does everything necessary when the sweep line crosses a vertex. - * Updates the mesh and the edge dictionary. - */ -{ - ActiveRegion *regUp, *reg; - GLUhalfEdge *e, *eTopLeft, *eBottomLeft; - - tess->event = vEvent; /* for access in EdgeLeq() */ - DebugEvent( tess ); - - /* Check if this vertex is the right endpoint of an edge that is - * already in the dictionary. In this case we don't need to waste - * time searching for the location to insert new edges. - */ - e = vEvent->anEdge; - while( e->activeRegion == NULL ) { - e = e->Onext; - if( e == vEvent->anEdge ) { - /* All edges go right -- not incident to any processed edges */ - ConnectLeftVertex( tess, vEvent ); - return; - } - } - - /* Processing consists of two phases: first we "finish" all the - * active regions where both the upper and lower edges terminate - * at vEvent (ie. vEvent is closing off these regions). - * We mark these faces "inside" or "outside" the polygon according - * to their winding number, and delete the edges from the dictionary. - * This takes care of all the left-going edges from vEvent. - */ - regUp = TopLeftRegion( e->activeRegion ); - if (regUp == NULL) longjmp(tess->env,1); - reg = RegionBelow( regUp ); - eTopLeft = reg->eUp; - eBottomLeft = FinishLeftRegions( tess, reg, NULL ); - - /* Next we process all the right-going edges from vEvent. This - * involves adding the edges to the dictionary, and creating the - * associated "active regions" which record information about the - * regions between adjacent dictionary edges. - */ - if( eBottomLeft->Onext == eTopLeft ) { - /* No right-going edges -- add a temporary "fixable" edge */ - ConnectRightVertex( tess, regUp, eBottomLeft ); - } else { - AddRightEdges( tess, regUp, eBottomLeft->Onext, eTopLeft, eTopLeft, TRUE ); - } -} - - -/* Make the sentinel coordinates big enough that they will never be - * merged with real input features. (Even with the largest possible - * input contour and the maximum tolerance of 1.0, no merging will be - * done with coordinates larger than 3 * GLU_TESS_MAX_COORD). - */ -#define SENTINEL_COORD (4 * GLU_TESS_MAX_COORD) - -static void AddSentinel( GLUtesselator *tess, GLdouble t ) -/* - * We add two sentinel edges above and below all other edges, - * to avoid special cases at the top and bottom. - */ -{ - GLUhalfEdge *e; - ActiveRegion *reg = (ActiveRegion *)memAlloc( sizeof( ActiveRegion )); - if (reg == NULL) longjmp(tess->env,1); - - e = __gl_meshMakeEdge( tess->mesh ); - if (e == NULL) longjmp(tess->env,1); - - e->Org->s = SENTINEL_COORD; - e->Org->t = t; - e->Dst->s = -SENTINEL_COORD; - e->Dst->t = t; - tess->event = e->Dst; /* initialize it */ - - reg->eUp = e; - reg->windingNumber = 0; - reg->inside = FALSE; - reg->fixUpperEdge = FALSE; - reg->sentinel = TRUE; - reg->dirty = FALSE; - reg->nodeUp = dictInsert( tess->dict, reg ); /* __gl_dictListInsertBefore */ - if (reg->nodeUp == NULL) longjmp(tess->env,1); -} - - -static void InitEdgeDict( GLUtesselator *tess ) -/* - * We maintain an ordering of edge intersections with the sweep line. - * This order is maintained in a dynamic dictionary. - */ -{ - /* __gl_dictListNewDict */ - tess->dict = dictNewDict( tess, (int (*)(void *, DictKey, DictKey)) EdgeLeq ); - if (tess->dict == NULL) longjmp(tess->env,1); - - AddSentinel( tess, -SENTINEL_COORD ); - AddSentinel( tess, SENTINEL_COORD ); -} - - -static void DoneEdgeDict( GLUtesselator *tess ) -{ - ActiveRegion *reg; -#ifndef NDEBUG - int fixedEdges = 0; -#endif - - /* __GL_DICTLISTKEY */ /* __GL_DICTLISTMIN */ - while( (reg = (ActiveRegion *)dictKey( dictMin( tess->dict ))) != NULL ) { - /* - * At the end of all processing, the dictionary should contain - * only the two sentinel edges, plus at most one "fixable" edge - * created by ConnectRightVertex(). - */ - if( ! reg->sentinel ) { - assert( reg->fixUpperEdge ); - assert( ++fixedEdges == 1 ); - } - assert( reg->windingNumber == 0 ); - DeleteRegion( tess, reg ); -/* __gl_meshDelete( reg->eUp );*/ - } - dictDeleteDict( tess->dict ); /* __gl_dictListDeleteDict */ -} - - -static void RemoveDegenerateEdges( GLUtesselator *tess ) -/* - * Remove zero-length edges, and contours with fewer than 3 vertices. - */ -{ - GLUhalfEdge *e, *eNext, *eLnext; - GLUhalfEdge *eHead = &tess->mesh->eHead; - - /*LINTED*/ - for( e = eHead->next; e != eHead; e = eNext ) { - eNext = e->next; - eLnext = e->Lnext; - - if( VertEq( e->Org, e->Dst ) && e->Lnext->Lnext != e ) { - /* Zero-length edge, contour has at least 3 edges */ - - SpliceMergeVertices( tess, eLnext, e ); /* deletes e->Org */ - if ( !__gl_meshDelete( e ) ) longjmp(tess->env,1); /* e is a self-loop */ - e = eLnext; - eLnext = e->Lnext; - } - if( eLnext->Lnext == e ) { - /* Degenerate contour (one or two edges) */ - - if( eLnext != e ) { - if( eLnext == eNext || eLnext == eNext->Sym ) { eNext = eNext->next; } - if ( !__gl_meshDelete( eLnext ) ) longjmp(tess->env,1); - } - if( e == eNext || e == eNext->Sym ) { eNext = eNext->next; } - if ( !__gl_meshDelete( e ) ) longjmp(tess->env,1); - } - } -} - -static int InitPriorityQ( GLUtesselator *tess ) -/* - * Insert all vertices into the priority queue which determines the - * order in which vertices cross the sweep line. - */ -{ - PriorityQ *pq; - GLUvertex *v, *vHead; - - /* __gl_pqSortNewPriorityQ */ - pq = tess->pq = pqNewPriorityQ( (int (*)(PQkey, PQkey)) __gl_vertLeq ); - if (pq == NULL) return 0; - - vHead = &tess->mesh->vHead; - for( v = vHead->next; v != vHead; v = v->next ) { - v->pqHandle = pqInsert( pq, v ); /* __gl_pqSortInsert */ - if (v->pqHandle == LONG_MAX) break; - } - if (v != vHead || !pqInit( pq ) ) { /* __gl_pqSortInit */ - pqDeletePriorityQ(tess->pq); /* __gl_pqSortDeletePriorityQ */ - tess->pq = NULL; - return 0; - } - - return 1; -} - - -static void DonePriorityQ( GLUtesselator *tess ) -{ - pqDeletePriorityQ( tess->pq ); /* __gl_pqSortDeletePriorityQ */ -} - - -static int RemoveDegenerateFaces( GLUmesh *mesh ) -/* - * Delete any degenerate faces with only two edges. WalkDirtyRegions() - * will catch almost all of these, but it won't catch degenerate faces - * produced by splice operations on already-processed edges. - * The two places this can happen are in FinishLeftRegions(), when - * we splice in a "temporary" edge produced by ConnectRightVertex(), - * and in CheckForLeftSplice(), where we splice already-processed - * edges to ensure that our dictionary invariants are not violated - * by numerical errors. - * - * In both these cases it is *very* dangerous to delete the offending - * edge at the time, since one of the routines further up the stack - * will sometimes be keeping a pointer to that edge. - */ -{ - GLUface *f, *fNext; - GLUhalfEdge *e; - - /*LINTED*/ - for( f = mesh->fHead.next; f != &mesh->fHead; f = fNext ) { - fNext = f->next; - e = f->anEdge; - assert( e->Lnext != e ); - - if( e->Lnext->Lnext == e ) { - /* A face with only two edges */ - AddWinding( e->Onext, e ); - if ( !__gl_meshDelete( e ) ) return 0; - } - } - return 1; -} - -int __gl_computeInterior( GLUtesselator *tess ) -/* - * __gl_computeInterior( tess ) computes the planar arrangement specified - * by the given contours, and further subdivides this arrangement - * into regions. Each region is marked "inside" if it belongs - * to the polygon, according to the rule given by tess->windingRule. - * Each interior region is guaranteed be monotone. - */ -{ - GLUvertex *v, *vNext; - - tess->fatalError = FALSE; - - /* Each vertex defines an event for our sweep line. Start by inserting - * all the vertices in a priority queue. Events are processed in - * lexicographic order, ie. - * - * e1 < e2 iff e1.x < e2.x || (e1.x == e2.x && e1.y < e2.y) - */ - RemoveDegenerateEdges( tess ); - if ( !InitPriorityQ( tess ) ) return 0; /* if error */ - InitEdgeDict( tess ); - - /* __gl_pqSortExtractMin */ - while( (v = (GLUvertex *)pqExtractMin( tess->pq )) != NULL ) { - for( ;; ) { - vNext = (GLUvertex *)pqMinimum( tess->pq ); /* __gl_pqSortMinimum */ - if( vNext == NULL || ! VertEq( vNext, v )) break; - - /* Merge together all vertices at exactly the same location. - * This is more efficient than processing them one at a time, - * simplifies the code (see ConnectLeftDegenerate), and is also - * important for correct handling of certain degenerate cases. - * For example, suppose there are two identical edges A and B - * that belong to different contours (so without this code they would - * be processed by separate sweep events). Suppose another edge C - * crosses A and B from above. When A is processed, we split it - * at its intersection point with C. However this also splits C, - * so when we insert B we may compute a slightly different - * intersection point. This might leave two edges with a small - * gap between them. This kind of error is especially obvious - * when using boundary extraction (GLU_TESS_BOUNDARY_ONLY). - */ - vNext = (GLUvertex *)pqExtractMin( tess->pq ); /* __gl_pqSortExtractMin*/ - SpliceMergeVertices( tess, v->anEdge, vNext->anEdge ); - } - SweepEvent( tess, v ); - } - - /* Set tess->event for debugging purposes */ - /* __GL_DICTLISTKEY */ /* __GL_DICTLISTMIN */ - tess->event = ((ActiveRegion *) dictKey( dictMin( tess->dict )))->eUp->Org; - DebugEvent( tess ); - DoneEdgeDict( tess ); - DonePriorityQ( tess ); - - if ( !RemoveDegenerateFaces( tess->mesh ) ) return 0; - __gl_meshCheckMesh( tess->mesh ); - - return 1; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/sweep.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/sweep.h deleted file mode 100644 index 2223f52f59..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/sweep.h +++ /dev/null @@ -1,84 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/sweep.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef __sweep_h_ -#define __sweep_h_ - -#include "mesh.h" - -/* __gl_computeInterior( tess ) computes the planar arrangement specified - * by the given contours, and further subdivides this arrangement - * into regions. Each region is marked "inside" if it belongs - * to the polygon, according to the rule given by tess->windingRule. - * Each interior region is guaranteed be monotone. - */ -int __gl_computeInterior( GLUtesselator *tess ); - - -/* The following is here *only* for access by debugging routines */ - -#include "dict.h" - -/* For each pair of adjacent edges crossing the sweep line, there is - * an ActiveRegion to represent the region between them. The active - * regions are kept in sorted order in a dynamic dictionary. As the - * sweep line crosses each vertex, we update the affected regions. - */ - -struct ActiveRegion { - GLUhalfEdge *eUp; /* upper edge, directed right to left */ - DictNode *nodeUp; /* dictionary node corresponding to eUp */ - int windingNumber; /* used to determine which regions are - * inside the polygon */ - GLboolean inside; /* is this region inside the polygon? */ - GLboolean sentinel; /* marks fake edges at t = +/-infinity */ - GLboolean dirty; /* marks regions where the upper or lower - * edge has changed, but we haven't checked - * whether they intersect yet */ - GLboolean fixUpperEdge; /* marks temporary edges introduced when - * we process a "right vertex" (one without - * any edges leaving to the right) */ -}; - -#define RegionBelow(r) ((ActiveRegion *) dictKey(dictPred((r)->nodeUp))) -#define RegionAbove(r) ((ActiveRegion *) dictKey(dictSucc((r)->nodeUp))) - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/tess.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/tess.c deleted file mode 100644 index 0489350a02..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/tess.c +++ /dev/null @@ -1,633 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -*/ - -#include "gluos.h" -#include -#include -#include -#include "memalloc.h" -#include "tess.h" -#include "mesh.h" -#include "normal.h" -#include "sweep.h" -#include "tessmono.h" -#include "render.h" - -#define GLU_TESS_DEFAULT_TOLERANCE 0.0 -#define GLU_TESS_MESH 100112 /* void (*)(GLUmesh *mesh) */ - -#define TRUE 1 -#define FALSE 0 - -/*ARGSUSED*/ static void GLAPIENTRY noBegin( GLenum type ) {} -/*ARGSUSED*/ static void GLAPIENTRY noEdgeFlag( GLboolean boundaryEdge ) {} -/*ARGSUSED*/ static void GLAPIENTRY noVertex( void *data ) {} -/*ARGSUSED*/ static void GLAPIENTRY noEnd( void ) {} -/*ARGSUSED*/ static void GLAPIENTRY noError( GLenum errnum ) {} -/*ARGSUSED*/ static void GLAPIENTRY noCombine( GLdouble coords[3], void *data[4], - GLfloat weight[4], void **dataOut ) {} -/*ARGSUSED*/ static void GLAPIENTRY noMesh( GLUmesh *mesh ) {} - - -/*ARGSUSED*/ void GLAPIENTRY __gl_noBeginData( GLenum type, - void *polygonData ) {} -/*ARGSUSED*/ void GLAPIENTRY __gl_noEdgeFlagData( GLboolean boundaryEdge, - void *polygonData ) {} -/*ARGSUSED*/ void GLAPIENTRY __gl_noVertexData( void *data, - void *polygonData ) {} -/*ARGSUSED*/ void GLAPIENTRY __gl_noEndData( void *polygonData ) {} -/*ARGSUSED*/ void GLAPIENTRY __gl_noErrorData( GLenum errnum, - void *polygonData ) {} -/*ARGSUSED*/ void GLAPIENTRY __gl_noCombineData( GLdouble coords[3], - void *data[4], - GLfloat weight[4], - void **outData, - void *polygonData ) {} - -/* Half-edges are allocated in pairs (see mesh.c) */ -typedef struct { GLUhalfEdge e, eSym; } EdgePair; - -#undef MAX -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#define MAX_FAST_ALLOC (MAX(sizeof(EdgePair), \ - MAX(sizeof(GLUvertex),sizeof(GLUface)))) - - -GLUtesselator * GLAPIENTRY -gluNewTess( void ) -{ - GLUtesselator *tess; - - /* Only initialize fields which can be changed by the api. Other fields - * are initialized where they are used. - */ - - if (memInit( MAX_FAST_ALLOC ) == 0) { - return 0; /* out of memory */ - } - tess = (GLUtesselator *)memAlloc( sizeof( GLUtesselator )); - if (tess == NULL) { - return 0; /* out of memory */ - } - - tess->state = T_DORMANT; - - tess->normal[0] = 0; - tess->normal[1] = 0; - tess->normal[2] = 0; - - tess->relTolerance = GLU_TESS_DEFAULT_TOLERANCE; - tess->windingRule = GLU_TESS_WINDING_ODD; - tess->flagBoundary = FALSE; - tess->boundaryOnly = FALSE; - - tess->callBegin = &noBegin; - tess->callEdgeFlag = &noEdgeFlag; - tess->callVertex = &noVertex; - tess->callEnd = &noEnd; - - tess->callError = &noError; - tess->callCombine = &noCombine; - tess->callMesh = &noMesh; - - tess->callBeginData= &__gl_noBeginData; - tess->callEdgeFlagData= &__gl_noEdgeFlagData; - tess->callVertexData= &__gl_noVertexData; - tess->callEndData= &__gl_noEndData; - tess->callErrorData= &__gl_noErrorData; - tess->callCombineData= &__gl_noCombineData; - - tess->polygonData= NULL; - - return tess; -} - -static void MakeDormant( GLUtesselator *tess ) -{ - /* Return the tessellator to its original dormant state. */ - - if( tess->mesh != NULL ) { - __gl_meshDeleteMesh( tess->mesh ); - } - tess->state = T_DORMANT; - tess->lastEdge = NULL; - tess->mesh = NULL; -} - -#define RequireState( tess, s ) if( tess->state != s ) GotoState(tess,s) - -static void GotoState( GLUtesselator *tess, enum TessState newState ) -{ - while( tess->state != newState ) { - /* We change the current state one level at a time, to get to - * the desired state. - */ - if( tess->state < newState ) { - switch( tess->state ) { - case T_DORMANT: - CALL_ERROR_OR_ERROR_DATA( GLU_TESS_MISSING_BEGIN_POLYGON ); - gluTessBeginPolygon( tess, NULL ); - break; - case T_IN_POLYGON: - CALL_ERROR_OR_ERROR_DATA( GLU_TESS_MISSING_BEGIN_CONTOUR ); - gluTessBeginContour( tess ); - break; - default: - ; - } - } else { - switch( tess->state ) { - case T_IN_CONTOUR: - CALL_ERROR_OR_ERROR_DATA( GLU_TESS_MISSING_END_CONTOUR ); - gluTessEndContour( tess ); - break; - case T_IN_POLYGON: - CALL_ERROR_OR_ERROR_DATA( GLU_TESS_MISSING_END_POLYGON ); - /* gluTessEndPolygon( tess ) is too much work! */ - MakeDormant( tess ); - break; - default: - ; - } - } - } -} - - -void GLAPIENTRY -gluDeleteTess( GLUtesselator *tess ) -{ - RequireState( tess, T_DORMANT ); - memFree( tess ); -} - - -void GLAPIENTRY -gluTessProperty( GLUtesselator *tess, GLenum which, GLdouble value ) -{ - GLenum windingRule; - - switch( which ) { - case GLU_TESS_TOLERANCE: - if( value < 0.0 || value > 1.0 ) break; - tess->relTolerance = value; - return; - - case GLU_TESS_WINDING_RULE: - windingRule = (GLenum) value; - if( windingRule != value ) break; /* not an integer */ - - switch( windingRule ) { - case GLU_TESS_WINDING_ODD: - case GLU_TESS_WINDING_NONZERO: - case GLU_TESS_WINDING_POSITIVE: - case GLU_TESS_WINDING_NEGATIVE: - case GLU_TESS_WINDING_ABS_GEQ_TWO: - tess->windingRule = windingRule; - return; - default: - break; - } - - case GLU_TESS_BOUNDARY_ONLY: - tess->boundaryOnly = (value != 0); - return; - - default: - CALL_ERROR_OR_ERROR_DATA( GLU_INVALID_ENUM ); - return; - } - CALL_ERROR_OR_ERROR_DATA( GLU_INVALID_VALUE ); -} - -/* Returns tessellator property */ -void GLAPIENTRY -gluGetTessProperty( GLUtesselator *tess, GLenum which, GLdouble *value ) -{ - switch (which) { - case GLU_TESS_TOLERANCE: - /* tolerance should be in range [0..1] */ - assert(0.0 <= tess->relTolerance && tess->relTolerance <= 1.0); - *value= tess->relTolerance; - break; - case GLU_TESS_WINDING_RULE: - assert(tess->windingRule == GLU_TESS_WINDING_ODD || - tess->windingRule == GLU_TESS_WINDING_NONZERO || - tess->windingRule == GLU_TESS_WINDING_POSITIVE || - tess->windingRule == GLU_TESS_WINDING_NEGATIVE || - tess->windingRule == GLU_TESS_WINDING_ABS_GEQ_TWO); - *value= tess->windingRule; - break; - case GLU_TESS_BOUNDARY_ONLY: - assert(tess->boundaryOnly == TRUE || tess->boundaryOnly == FALSE); - *value= tess->boundaryOnly; - break; - default: - *value= 0.0; - CALL_ERROR_OR_ERROR_DATA( GLU_INVALID_ENUM ); - break; - } -} /* gluGetTessProperty() */ - -void GLAPIENTRY -gluTessNormal( GLUtesselator *tess, GLdouble x, GLdouble y, GLdouble z ) -{ - tess->normal[0] = x; - tess->normal[1] = y; - tess->normal[2] = z; -} - -void GLAPIENTRY -gluTessCallback( GLUtesselator *tess, GLenum which, _GLUfuncptr fn) -{ - switch( which ) { - case GLU_TESS_BEGIN: - tess->callBegin = (fn == NULL) ? &noBegin : (void (GLAPIENTRY *)(GLenum)) fn; - return; - case GLU_TESS_BEGIN_DATA: - tess->callBeginData = (fn == NULL) ? - &__gl_noBeginData : (void (GLAPIENTRY *)(GLenum, void *)) fn; - return; - case GLU_TESS_EDGE_FLAG: - tess->callEdgeFlag = (fn == NULL) ? &noEdgeFlag : - (void (GLAPIENTRY *)(GLboolean)) fn; - /* If the client wants boundary edges to be flagged, - * we render everything as separate triangles (no strips or fans). - */ - tess->flagBoundary = (fn != NULL); - return; - case GLU_TESS_EDGE_FLAG_DATA: - tess->callEdgeFlagData= (fn == NULL) ? - &__gl_noEdgeFlagData : (void (GLAPIENTRY *)(GLboolean, void *)) fn; - /* If the client wants boundary edges to be flagged, - * we render everything as separate triangles (no strips or fans). - */ - tess->flagBoundary = (fn != NULL); - return; - case GLU_TESS_VERTEX: - tess->callVertex = (fn == NULL) ? &noVertex : - (void (GLAPIENTRY *)(void *)) fn; - return; - case GLU_TESS_VERTEX_DATA: - tess->callVertexData = (fn == NULL) ? - &__gl_noVertexData : (void (GLAPIENTRY *)(void *, void *)) fn; - return; - case GLU_TESS_END: - tess->callEnd = (fn == NULL) ? &noEnd : (void (GLAPIENTRY *)(void)) fn; - return; - case GLU_TESS_END_DATA: - tess->callEndData = (fn == NULL) ? &__gl_noEndData : - (void (GLAPIENTRY *)(void *)) fn; - return; - case GLU_TESS_ERROR: - tess->callError = (fn == NULL) ? &noError : (void (GLAPIENTRY *)(GLenum)) fn; - return; - case GLU_TESS_ERROR_DATA: - tess->callErrorData = (fn == NULL) ? - &__gl_noErrorData : (void (GLAPIENTRY *)(GLenum, void *)) fn; - return; - case GLU_TESS_COMBINE: - tess->callCombine = (fn == NULL) ? &noCombine : - (void (GLAPIENTRY *)(GLdouble [3],void *[4], GLfloat [4], void ** )) fn; - return; - case GLU_TESS_COMBINE_DATA: - tess->callCombineData = (fn == NULL) ? &__gl_noCombineData : - (void (GLAPIENTRY *)(GLdouble [3], - void *[4], - GLfloat [4], - void **, - void *)) fn; - return; - case GLU_TESS_MESH: - tess->callMesh = (fn == NULL) ? &noMesh : (void (GLAPIENTRY *)(GLUmesh *)) fn; - return; - default: - CALL_ERROR_OR_ERROR_DATA( GLU_INVALID_ENUM ); - return; - } -} - -static int AddVertex( GLUtesselator *tess, GLdouble coords[3], void *data ) -{ - GLUhalfEdge *e; - - e = tess->lastEdge; - if( e == NULL ) { - /* Make a self-loop (one vertex, one edge). */ - - e = __gl_meshMakeEdge( tess->mesh ); - if (e == NULL) return 0; - if ( !__gl_meshSplice( e, e->Sym ) ) return 0; - } else { - /* Create a new vertex and edge which immediately follow e - * in the ordering around the left face. - */ - if (__gl_meshSplitEdge( e ) == NULL) return 0; - e = e->Lnext; - } - - /* The new vertex is now e->Org. */ - e->Org->data = data; - e->Org->coords[0] = coords[0]; - e->Org->coords[1] = coords[1]; - e->Org->coords[2] = coords[2]; - - /* The winding of an edge says how the winding number changes as we - * cross from the edge''s right face to its left face. We add the - * vertices in such an order that a CCW contour will add +1 to - * the winding number of the region inside the contour. - */ - e->winding = 1; - e->Sym->winding = -1; - - tess->lastEdge = e; - - return 1; -} - - -static void CacheVertex( GLUtesselator *tess, GLdouble coords[3], void *data ) -{ - CachedVertex *v = &tess->cache[tess->cacheCount]; - - v->data = data; - v->coords[0] = coords[0]; - v->coords[1] = coords[1]; - v->coords[2] = coords[2]; - ++tess->cacheCount; -} - - -static int EmptyCache( GLUtesselator *tess ) -{ - CachedVertex *v = tess->cache; - CachedVertex *vLast; - - tess->mesh = __gl_meshNewMesh(); - if (tess->mesh == NULL) return 0; - - for( vLast = v + tess->cacheCount; v < vLast; ++v ) { - if ( !AddVertex( tess, v->coords, v->data ) ) return 0; - } - tess->cacheCount = 0; - tess->emptyCache = FALSE; - - return 1; -} - - -void GLAPIENTRY -gluTessVertex( GLUtesselator *tess, GLdouble coords[3], void *data ) -{ - int i, tooLarge = FALSE; - GLdouble x, clamped[3]; - - RequireState( tess, T_IN_CONTOUR ); - - if( tess->emptyCache ) { - if ( !EmptyCache( tess ) ) { - CALL_ERROR_OR_ERROR_DATA( GLU_OUT_OF_MEMORY ); - return; - } - tess->lastEdge = NULL; - } - for( i = 0; i < 3; ++i ) { - x = coords[i]; - if( x < - GLU_TESS_MAX_COORD ) { - x = - GLU_TESS_MAX_COORD; - tooLarge = TRUE; - } - if( x > GLU_TESS_MAX_COORD ) { - x = GLU_TESS_MAX_COORD; - tooLarge = TRUE; - } - clamped[i] = x; - } - if( tooLarge ) { - CALL_ERROR_OR_ERROR_DATA( GLU_TESS_COORD_TOO_LARGE ); - } - - if( tess->mesh == NULL ) { - if( tess->cacheCount < TESS_MAX_CACHE ) { - CacheVertex( tess, clamped, data ); - return; - } - if ( !EmptyCache( tess ) ) { - CALL_ERROR_OR_ERROR_DATA( GLU_OUT_OF_MEMORY ); - return; - } - } - if ( !AddVertex( tess, clamped, data ) ) { - CALL_ERROR_OR_ERROR_DATA( GLU_OUT_OF_MEMORY ); - } -} - - -void GLAPIENTRY -gluTessBeginPolygon( GLUtesselator *tess, void *data ) -{ - RequireState( tess, T_DORMANT ); - - tess->state = T_IN_POLYGON; - tess->cacheCount = 0; - tess->emptyCache = FALSE; - tess->mesh = NULL; - - tess->polygonData= data; -} - - -void GLAPIENTRY -gluTessBeginContour( GLUtesselator *tess ) -{ - RequireState( tess, T_IN_POLYGON ); - - tess->state = T_IN_CONTOUR; - tess->lastEdge = NULL; - if( tess->cacheCount > 0 ) { - /* Just set a flag so we don't get confused by empty contours - * -- these can be generated accidentally with the obsolete - * NextContour() interface. - */ - tess->emptyCache = TRUE; - } -} - - -void GLAPIENTRY -gluTessEndContour( GLUtesselator *tess ) -{ - RequireState( tess, T_IN_CONTOUR ); - tess->state = T_IN_POLYGON; -} - -void GLAPIENTRY -gluTessEndPolygon( GLUtesselator *tess ) -{ - GLUmesh *mesh; - - if (setjmp(tess->env) != 0) { - /* come back here if out of memory */ - CALL_ERROR_OR_ERROR_DATA( GLU_OUT_OF_MEMORY ); - return; - } - - RequireState( tess, T_IN_POLYGON ); - tess->state = T_DORMANT; - - if( tess->mesh == NULL ) { - if( ! tess->flagBoundary && tess->callMesh == &noMesh ) { - - /* Try some special code to make the easy cases go quickly - * (eg. convex polygons). This code does NOT handle multiple contours, - * intersections, edge flags, and of course it does not generate - * an explicit mesh either. - */ - if( __gl_renderCache( tess )) { - tess->polygonData= NULL; - return; - } - } - if ( !EmptyCache( tess ) ) longjmp(tess->env,1); /* could've used a label*/ - } - - /* Determine the polygon normal and project vertices onto the plane - * of the polygon. - */ - __gl_projectPolygon( tess ); - - /* __gl_computeInterior( tess ) computes the planar arrangement specified - * by the given contours, and further subdivides this arrangement - * into regions. Each region is marked "inside" if it belongs - * to the polygon, according to the rule given by tess->windingRule. - * Each interior region is guaranteed be monotone. - */ - if ( !__gl_computeInterior( tess ) ) { - longjmp(tess->env,1); /* could've used a label */ - } - - mesh = tess->mesh; - if( ! tess->fatalError ) { - int rc = 1; - - /* If the user wants only the boundary contours, we throw away all edges - * except those which separate the interior from the exterior. - * Otherwise we tessellate all the regions marked "inside". - */ - if( tess->boundaryOnly ) { - rc = __gl_meshSetWindingNumber( mesh, 1, TRUE ); - } else { - rc = __gl_meshTessellateInterior( mesh ); - } - if (rc == 0) longjmp(tess->env,1); /* could've used a label */ - - __gl_meshCheckMesh( mesh ); - - if( tess->callBegin != &noBegin || tess->callEnd != &noEnd - || tess->callVertex != &noVertex || tess->callEdgeFlag != &noEdgeFlag - || tess->callBeginData != &__gl_noBeginData - || tess->callEndData != &__gl_noEndData - || tess->callVertexData != &__gl_noVertexData - || tess->callEdgeFlagData != &__gl_noEdgeFlagData ) - { - if( tess->boundaryOnly ) { - __gl_renderBoundary( tess, mesh ); /* output boundary contours */ - } else { - __gl_renderMesh( tess, mesh ); /* output strips and fans */ - } - } - if( tess->callMesh != &noMesh ) { - - /* Throw away the exterior faces, so that all faces are interior. - * This way the user doesn't have to check the "inside" flag, - * and we don't need to even reveal its existence. It also leaves - * the freedom for an implementation to not generate the exterior - * faces in the first place. - */ - __gl_meshDiscardExterior( mesh ); - (*tess->callMesh)( mesh ); /* user wants the mesh itself */ - tess->mesh = NULL; - tess->polygonData= NULL; - return; - } - } - __gl_meshDeleteMesh( mesh ); - tess->polygonData= NULL; - tess->mesh = NULL; -} - - -/*XXXblythe unused function*/ -#if 0 -void GLAPIENTRY -gluDeleteMesh( GLUmesh *mesh ) -{ - __gl_meshDeleteMesh( mesh ); -} -#endif - - - -/*******************************************************/ - -/* Obsolete calls -- for backward compatibility */ - -void GLAPIENTRY -gluBeginPolygon( GLUtesselator *tess ) -{ - gluTessBeginPolygon( tess, NULL ); - gluTessBeginContour( tess ); -} - - -/*ARGSUSED*/ -void GLAPIENTRY -gluNextContour( GLUtesselator *tess, GLenum type ) -{ - gluTessEndContour( tess ); - gluTessBeginContour( tess ); -} - - -void GLAPIENTRY -gluEndPolygon( GLUtesselator *tess ) -{ - gluTessEndContour( tess ); - gluTessEndPolygon( tess ); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/tess.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/tess.h deleted file mode 100644 index 2ba00b6ddb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/tess.h +++ /dev/null @@ -1,172 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/tess.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef __tess_h_ -#define __tess_h_ - -#include -#include -#include "mesh.h" -#include "dict.h" -#include "priorityq.h" - -/* The begin/end calls must be properly nested. We keep track of - * the current state to enforce the ordering. - */ -enum TessState { T_DORMANT, T_IN_POLYGON, T_IN_CONTOUR }; - -/* We cache vertex data for single-contour polygons so that we can - * try a quick-and-dirty decomposition first. - */ -#define TESS_MAX_CACHE 100 - -typedef struct CachedVertex { - GLdouble coords[3]; - void *data; -} CachedVertex; - -struct GLUtesselator { - - /*** state needed for collecting the input data ***/ - - enum TessState state; /* what begin/end calls have we seen? */ - - GLUhalfEdge *lastEdge; /* lastEdge->Org is the most recent vertex */ - GLUmesh *mesh; /* stores the input contours, and eventually - the tessellation itself */ - - void (GLAPIENTRY *callError)( GLenum errnum ); - - /*** state needed for projecting onto the sweep plane ***/ - - GLdouble normal[3]; /* user-specified normal (if provided) */ - GLdouble sUnit[3]; /* unit vector in s-direction (debugging) */ - GLdouble tUnit[3]; /* unit vector in t-direction (debugging) */ - - /*** state needed for the line sweep ***/ - - GLdouble relTolerance; /* tolerance for merging features */ - GLenum windingRule; /* rule for determining polygon interior */ - GLboolean fatalError; /* fatal error: needed combine callback */ - - Dict *dict; /* edge dictionary for sweep line */ - PriorityQ *pq; /* priority queue of vertex events */ - GLUvertex *event; /* current sweep event being processed */ - - void (GLAPIENTRY *callCombine)( GLdouble coords[3], void *data[4], - GLfloat weight[4], void **outData ); - - /*** state needed for rendering callbacks (see render.c) ***/ - - GLboolean flagBoundary; /* mark boundary edges (use EdgeFlag) */ - GLboolean boundaryOnly; /* Extract contours, not triangles */ - GLUface *lonelyTriList; - /* list of triangles which could not be rendered as strips or fans */ - - void (GLAPIENTRY *callBegin)( GLenum type ); - void (GLAPIENTRY *callEdgeFlag)( GLboolean boundaryEdge ); - void (GLAPIENTRY *callVertex)( void *data ); - void (GLAPIENTRY *callEnd)( void ); - void (GLAPIENTRY *callMesh)( GLUmesh *mesh ); - - - /*** state needed to cache single-contour polygons for renderCache() */ - - GLboolean emptyCache; /* empty cache on next vertex() call */ - int cacheCount; /* number of cached vertices */ - CachedVertex cache[TESS_MAX_CACHE]; /* the vertex data */ - - /*** rendering callbacks that also pass polygon data ***/ - void (GLAPIENTRY *callBeginData)( GLenum type, void *polygonData ); - void (GLAPIENTRY *callEdgeFlagData)( GLboolean boundaryEdge, - void *polygonData ); - void (GLAPIENTRY *callVertexData)( void *data, void *polygonData ); - void (GLAPIENTRY *callEndData)( void *polygonData ); - void (GLAPIENTRY *callErrorData)( GLenum errnum, void *polygonData ); - void (GLAPIENTRY *callCombineData)( GLdouble coords[3], void *data[4], - GLfloat weight[4], void **outData, - void *polygonData ); - - jmp_buf env; /* place to jump to when memAllocs fail */ - - void *polygonData; /* client data for current polygon */ -}; - -void GLAPIENTRY __gl_noBeginData( GLenum type, void *polygonData ); -void GLAPIENTRY __gl_noEdgeFlagData( GLboolean boundaryEdge, void *polygonData ); -void GLAPIENTRY __gl_noVertexData( void *data, void *polygonData ); -void GLAPIENTRY __gl_noEndData( void *polygonData ); -void GLAPIENTRY __gl_noErrorData( GLenum errnum, void *polygonData ); -void GLAPIENTRY __gl_noCombineData( GLdouble coords[3], void *data[4], - GLfloat weight[4], void **outData, - void *polygonData ); - -#define CALL_BEGIN_OR_BEGIN_DATA(a) \ - if (tess->callBeginData != &__gl_noBeginData) \ - (*tess->callBeginData)((a),tess->polygonData); \ - else (*tess->callBegin)((a)); - -#define CALL_VERTEX_OR_VERTEX_DATA(a) \ - if (tess->callVertexData != &__gl_noVertexData) \ - (*tess->callVertexData)((a),tess->polygonData); \ - else (*tess->callVertex)((a)); - -#define CALL_EDGE_FLAG_OR_EDGE_FLAG_DATA(a) \ - if (tess->callEdgeFlagData != &__gl_noEdgeFlagData) \ - (*tess->callEdgeFlagData)((a),tess->polygonData); \ - else (*tess->callEdgeFlag)((a)); - -#define CALL_END_OR_END_DATA() \ - if (tess->callEndData != &__gl_noEndData) \ - (*tess->callEndData)(tess->polygonData); \ - else (*tess->callEnd)(); - -#define CALL_COMBINE_OR_COMBINE_DATA(a,b,c,d) \ - if (tess->callCombineData != &__gl_noCombineData) \ - (*tess->callCombineData)((a),(b),(c),(d),tess->polygonData); \ - else (*tess->callCombine)((a),(b),(c),(d)); - -#define CALL_ERROR_OR_ERROR_DATA(a) \ - if (tess->callErrorData != &__gl_noErrorData) \ - (*tess->callErrorData)((a),tess->polygonData); \ - else (*tess->callError)((a)); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/tessmono.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/tessmono.c deleted file mode 100644 index 77fe0ac619..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/tessmono.c +++ /dev/null @@ -1,208 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/tessmono.c,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include "geom.h" -#include "mesh.h" -#include "tessmono.h" -#include - -#define AddWinding(eDst,eSrc) (eDst->winding += eSrc->winding, \ - eDst->Sym->winding += eSrc->Sym->winding) - -/* __gl_meshTessellateMonoRegion( face ) tessellates a monotone region - * (what else would it do??) The region must consist of a single - * loop of half-edges (see mesh.h) oriented CCW. "Monotone" in this - * case means that any vertical line intersects the interior of the - * region in a single interval. - * - * Tessellation consists of adding interior edges (actually pairs of - * half-edges), to split the region into non-overlapping triangles. - * - * The basic idea is explained in Preparata and Shamos (which I don''t - * have handy right now), although their implementation is more - * complicated than this one. The are two edge chains, an upper chain - * and a lower chain. We process all vertices from both chains in order, - * from right to left. - * - * The algorithm ensures that the following invariant holds after each - * vertex is processed: the untessellated region consists of two - * chains, where one chain (say the upper) is a single edge, and - * the other chain is concave. The left vertex of the single edge - * is always to the left of all vertices in the concave chain. - * - * Each step consists of adding the rightmost unprocessed vertex to one - * of the two chains, and forming a fan of triangles from the rightmost - * of two chain endpoints. Determining whether we can add each triangle - * to the fan is a simple orientation test. By making the fan as large - * as possible, we restore the invariant (check it yourself). - */ -int __gl_meshTessellateMonoRegion( GLUface *face ) -{ - GLUhalfEdge *up, *lo; - - /* All edges are oriented CCW around the boundary of the region. - * First, find the half-edge whose origin vertex is rightmost. - * Since the sweep goes from left to right, face->anEdge should - * be close to the edge we want. - */ - up = face->anEdge; - assert( up->Lnext != up && up->Lnext->Lnext != up ); - - for( ; VertLeq( up->Dst, up->Org ); up = up->Lprev ) - ; - for( ; VertLeq( up->Org, up->Dst ); up = up->Lnext ) - ; - lo = up->Lprev; - - while( up->Lnext != lo ) { - if( VertLeq( up->Dst, lo->Org )) { - /* up->Dst is on the left. It is safe to form triangles from lo->Org. - * The EdgeGoesLeft test guarantees progress even when some triangles - * are CW, given that the upper and lower chains are truly monotone. - */ - while( lo->Lnext != up && (EdgeGoesLeft( lo->Lnext ) - || EdgeSign( lo->Org, lo->Dst, lo->Lnext->Dst ) <= 0 )) { - GLUhalfEdge *tempHalfEdge= __gl_meshConnect( lo->Lnext, lo ); - if (tempHalfEdge == NULL) return 0; - lo = tempHalfEdge->Sym; - } - lo = lo->Lprev; - } else { - /* lo->Org is on the left. We can make CCW triangles from up->Dst. */ - while( lo->Lnext != up && (EdgeGoesRight( up->Lprev ) - || EdgeSign( up->Dst, up->Org, up->Lprev->Org ) >= 0 )) { - GLUhalfEdge *tempHalfEdge= __gl_meshConnect( up, up->Lprev ); - if (tempHalfEdge == NULL) return 0; - up = tempHalfEdge->Sym; - } - up = up->Lnext; - } - } - - /* Now lo->Org == up->Dst == the leftmost vertex. The remaining region - * can be tessellated in a fan from this leftmost vertex. - */ - assert( lo->Lnext != up ); - while( lo->Lnext->Lnext != up ) { - GLUhalfEdge *tempHalfEdge= __gl_meshConnect( lo->Lnext, lo ); - if (tempHalfEdge == NULL) return 0; - lo = tempHalfEdge->Sym; - } - - return 1; -} - - -/* __gl_meshTessellateInterior( mesh ) tessellates each region of - * the mesh which is marked "inside" the polygon. Each such region - * must be monotone. - */ -int __gl_meshTessellateInterior( GLUmesh *mesh ) -{ - GLUface *f, *next; - - /*LINTED*/ - for( f = mesh->fHead.next; f != &mesh->fHead; f = next ) { - /* Make sure we don''t try to tessellate the new triangles. */ - next = f->next; - if( f->inside ) { - if ( !__gl_meshTessellateMonoRegion( f ) ) return 0; - } - } - - return 1; -} - - -/* __gl_meshDiscardExterior( mesh ) zaps (ie. sets to NULL) all faces - * which are not marked "inside" the polygon. Since further mesh operations - * on NULL faces are not allowed, the main purpose is to clean up the - * mesh so that exterior loops are not represented in the data structure. - */ -void __gl_meshDiscardExterior( GLUmesh *mesh ) -{ - GLUface *f, *next; - - /*LINTED*/ - for( f = mesh->fHead.next; f != &mesh->fHead; f = next ) { - /* Since f will be destroyed, save its next pointer. */ - next = f->next; - if( ! f->inside ) { - __gl_meshZapFace( f ); - } - } -} - -#define MARKED_FOR_DELETION 0x7fffffff - -/* __gl_meshSetWindingNumber( mesh, value, keepOnlyBoundary ) resets the - * winding numbers on all edges so that regions marked "inside" the - * polygon have a winding number of "value", and regions outside - * have a winding number of 0. - * - * If keepOnlyBoundary is TRUE, it also deletes all edges which do not - * separate an interior region from an exterior one. - */ -int __gl_meshSetWindingNumber( GLUmesh *mesh, int value, - GLboolean keepOnlyBoundary ) -{ - GLUhalfEdge *e, *eNext; - - for( e = mesh->eHead.next; e != &mesh->eHead; e = eNext ) { - eNext = e->next; - if( e->Rface->inside != e->Lface->inside ) { - - /* This is a boundary edge (one side is interior, one is exterior). */ - e->winding = (e->Lface->inside) ? value : -value; - } else { - - /* Both regions are interior, or both are exterior. */ - if( ! keepOnlyBoundary ) { - e->winding = 0; - } else { - if ( !__gl_meshDelete( e ) ) return 0; - } - } - } - return 1; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/tessmono.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/tessmono.h deleted file mode 100644 index 01f244f6ec..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libtess/tessmono.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ -/* -** Author: Eric Veach, July 1994. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/tessmono.h,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#ifndef __tessmono_h_ -#define __tessmono_h_ - -/* __gl_meshTessellateMonoRegion( face ) tessellates a monotone region - * (what else would it do??) The region must consist of a single - * loop of half-edges (see mesh.h) oriented CCW. "Monotone" in this - * case means that any vertical line intersects the interior of the - * region in a single interval. - * - * Tessellation consists of adding interior edges (actually pairs of - * half-edges), to split the region into non-overlapping triangles. - * - * __gl_meshTessellateInterior( mesh ) tessellates each region of - * the mesh which is marked "inside" the polygon. Each such region - * must be monotone. - * - * __gl_meshDiscardExterior( mesh ) zaps (ie. sets to NULL) all faces - * which are not marked "inside" the polygon. Since further mesh operations - * on NULL faces are not allowed, the main purpose is to clean up the - * mesh so that exterior loops are not represented in the data structure. - * - * __gl_meshSetWindingNumber( mesh, value, keepOnlyBoundary ) resets the - * winding numbers on all edges so that regions marked "inside" the - * polygon have a winding number of "value", and regions outside - * have a winding number of 0. - * - * If keepOnlyBoundary is TRUE, it also deletes all edges which do not - * separate an interior region from an exterior one. - */ - -int __gl_meshTessellateMonoRegion( GLUface *face ); -int __gl_meshTessellateInterior( GLUmesh *mesh ); -void __gl_meshDiscardExterior( GLUmesh *mesh ); -int __gl_meshSetWindingNumber( GLUmesh *mesh, int value, - GLboolean keepOnlyBoundary ); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/error.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/error.c deleted file mode 100644 index ba58e05145..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/error.c +++ /dev/null @@ -1,92 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2005/10/05 02:08:30 $ $Revision: 1.1.30.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/error.c,v 1.1.30.1 2005/10/05 02:08:30 brianp Exp $ -*/ - -#include "gluos.h" -#include "gluint.h" -#include -#include -#include - -static const char *glErrorStrings[GL_OUT_OF_MEMORY - GL_INVALID_ENUM + 1] = { - "invalid enumerant", - "invalid value", - "invalid operation", - "stack overflow", - "stack underflow", - "out of memory", -}; - -static const char *gluErrorStrings[GLU_INVALID_OPERATION - GLU_INVALID_ENUM + 1] = { - "invalid enumerant", - "invalid value", - "out of memory", - "", /* never used but need placeholder */ - "invalid operation", -}; - -#define NERRORS (sizeof(errorStrings)/sizeof(errorStrings[0])) - -const GLubyte* GLAPIENTRY -gluErrorString(GLenum errorCode) -{ - if (errorCode == 0) { - return (const unsigned char *) "no error"; - } - if ((errorCode >= GL_INVALID_ENUM) && (errorCode <= GL_OUT_OF_MEMORY)) { - return (const unsigned char *) glErrorStrings[errorCode - GL_INVALID_ENUM]; - } - if (errorCode == GL_TABLE_TOO_LARGE) { - return (const unsigned char *) "table too large"; - } - if ((errorCode >= GLU_INVALID_ENUM) && (errorCode <= GLU_INVALID_OPERATION)) { - return (const unsigned char *) gluErrorStrings[errorCode - GLU_INVALID_ENUM]; - } - if ((errorCode >= GLU_NURBS_ERROR1) && (errorCode <= GLU_NURBS_ERROR37)) { - return (const unsigned char *) __gluNURBSErrorString(errorCode - (GLU_NURBS_ERROR1 - 1)); - } - if ((errorCode >= GLU_TESS_ERROR1) && (errorCode <= GLU_TESS_ERROR8)) { - return (const unsigned char *) __gluTessErrorString(errorCode - (GLU_TESS_ERROR1 - 1)); - } -#ifdef GL_EXT_framebuffer_object - if (errorCode == GL_INVALID_FRAMEBUFFER_OPERATION_EXT) { - return (const unsigned char *) "invalid framebuffer operation"; - } -#endif - - return 0; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/glue.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/glue.c deleted file mode 100644 index a0471bbe2e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/glue.c +++ /dev/null @@ -1,100 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/09/24 09:40:40 $ $Revision: 1.3 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/glue.c,v 1.3 2001/09/24 09:40:40 joukj Exp $ -*/ - -#include -#include "gluint.h" - -static unsigned char *__gluNurbsErrors[] = { - (unsigned char*) " ", - (unsigned char*) "spline order un-supported", - (unsigned char*) "too few knots", - (unsigned char*) "valid knot range is empty", - (unsigned char*) "decreasing knot sequence knot", - (unsigned char*) "knot multiplicity greater than order of spline", - (unsigned char*) "gluEndCurve() must follow gluBeginCurve()", - (unsigned char*) "gluBeginCurve() must precede gluEndCurve()", - (unsigned char*) "missing or extra geometric data", - (unsigned char*) "can't draw piecewise linear trimming curves", - (unsigned char*) "missing or extra domain data", - (unsigned char*) "missing or extra domain data", - (unsigned char*) "gluEndTrim() must precede gluEndSurface()", - (unsigned char*) "gluBeginSurface() must precede gluEndSurface()", - (unsigned char*) "curve of improper type passed as trim curve", - (unsigned char*) "gluBeginSurface() must precede gluBeginTrim()", - (unsigned char*) "gluEndTrim() must follow gluBeginTrim()", - (unsigned char*) "gluBeginTrim() must precede gluEndTrim()", - (unsigned char*) "invalid or missing trim curve", - (unsigned char*) "gluBeginTrim() must precede gluPwlCurve()", - (unsigned char*) "piecewise linear trimming curve referenced twice", - (unsigned char*) "piecewise linear trimming curve and nurbs curve mixed", - (unsigned char*) "improper usage of trim data type", - (unsigned char*) "nurbs curve referenced twice", - (unsigned char*) "nurbs curve and piecewise linear trimming curve mixed", - (unsigned char*) "nurbs surface referenced twice", - (unsigned char*) "invalid property", - (unsigned char*) "gluEndSurface() must follow gluBeginSurface()", - (unsigned char*) "intersecting or misoriented trim curves", - (unsigned char*) "intersecting trim curves", - (unsigned char*) "UNUSED", - (unsigned char*) "unconnected trim curves", - (unsigned char*) "unknown knot error", - (unsigned char*) "negative vertex count encountered", - (unsigned char*) "negative byte-stride encounteed", - (unsigned char*) "unknown type descriptor", - (unsigned char*) "null control point reference", - (unsigned char*) "duplicate point on piecewise linear trimming curve", -}; - -const unsigned char *__gluNURBSErrorString( int errnum ) -{ - return __gluNurbsErrors[errnum]; -} - -static unsigned char *__gluTessErrors[] = { - (unsigned char*) " ", - (unsigned char*) "gluTessBeginPolygon() must precede a gluTessEndPolygon()", - (unsigned char*) "gluTessBeginContour() must precede a gluTessEndContour()", - (unsigned char*) "gluTessEndPolygon() must follow a gluTessBeginPolygon()", - (unsigned char*) "gluTessEndContour() must follow a gluTessBeginContour()", - (unsigned char*) "a coordinate is too large", - (unsigned char*) "need combine callback", -}; - -const unsigned char *__gluTessErrorString( int errnum ) -{ - return __gluTessErrors[errnum]; -} /* __glTessErrorString() */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/gluint.h b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/gluint.h deleted file mode 100644 index f08401df7a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/gluint.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/09/20 21:50:53 $ $Revision: 1.2 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/gluint.h,v 1.2 2001/09/20 21:50:53 kschultz Exp $ -*/ - -#ifndef __gluint_h__ -#define __gluint_h__ - -extern const unsigned char *__gluNURBSErrorString( int errnum ); - -extern const unsigned char *__gluTessErrorString( int errnum ); - -#ifdef _EXTENSIONS_ -#define COS cosf -#define SIN sinf -#define SQRT sqrtf -#else -#define COS cos -#define SIN sin -#define SQRT sqrt -#endif - -#endif /* __gluint_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/mipmap.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/mipmap.c deleted file mode 100644 index ea17438dd6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/mipmap.c +++ /dev/null @@ -1,8902 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#include "gluos.h" -#include -#include -#include -#include -#include -#include /* UINT_MAX */ -#include -#include "gluint.h" - -typedef union { - unsigned char ub[4]; - unsigned short us[2]; - unsigned int ui; - char b[4]; - short s[2]; - int i; - float f; -} Type_Widget; - -/* Pixel storage modes */ -typedef struct { - GLint pack_alignment; - GLint pack_row_length; - GLint pack_skip_rows; - GLint pack_skip_pixels; - GLint pack_lsb_first; - GLint pack_swap_bytes; - GLint pack_skip_images; - GLint pack_image_height; - - GLint unpack_alignment; - GLint unpack_row_length; - GLint unpack_skip_rows; - GLint unpack_skip_pixels; - GLint unpack_lsb_first; - GLint unpack_swap_bytes; - GLint unpack_skip_images; - GLint unpack_image_height; -} PixelStorageModes; - -static int gluBuild1DMipmapLevelsCore(GLenum, GLint, - GLsizei, - GLsizei, - GLenum, GLenum, GLint, GLint, GLint, - const void *); -static int gluBuild2DMipmapLevelsCore(GLenum, GLint, - GLsizei, GLsizei, - GLsizei, GLsizei, - GLenum, GLenum, GLint, GLint, GLint, - const void *); -static int gluBuild3DMipmapLevelsCore(GLenum, GLint, - GLsizei, GLsizei, GLsizei, - GLsizei, GLsizei, GLsizei, - GLenum, GLenum, GLint, GLint, GLint, - const void *); - -/* - * internal function declarations - */ -static GLfloat bytes_per_element(GLenum type); -static GLint elements_per_group(GLenum format, GLenum type); -static GLint is_index(GLenum format); -static GLint image_size(GLint width, GLint height, GLenum format, GLenum type); -static void fill_image(const PixelStorageModes *, - GLint width, GLint height, GLenum format, - GLenum type, GLboolean index_format, - const void *userdata, GLushort *newimage); -static void empty_image(const PixelStorageModes *, - GLint width, GLint height, GLenum format, - GLenum type, GLboolean index_format, - const GLushort *oldimage, void *userdata); -static void scale_internal(GLint components, GLint widthin, GLint heightin, - const GLushort *datain, - GLint widthout, GLint heightout, - GLushort *dataout); - -static void scale_internal_ubyte(GLint components, GLint widthin, - GLint heightin, const GLubyte *datain, - GLint widthout, GLint heightout, - GLubyte *dataout, GLint element_size, - GLint ysize, GLint group_size); -static void scale_internal_byte(GLint components, GLint widthin, - GLint heightin, const GLbyte *datain, - GLint widthout, GLint heightout, - GLbyte *dataout, GLint element_size, - GLint ysize, GLint group_size); -static void scale_internal_ushort(GLint components, GLint widthin, - GLint heightin, const GLushort *datain, - GLint widthout, GLint heightout, - GLushort *dataout, GLint element_size, - GLint ysize, GLint group_size, - GLint myswap_bytes); -static void scale_internal_short(GLint components, GLint widthin, - GLint heightin, const GLshort *datain, - GLint widthout, GLint heightout, - GLshort *dataout, GLint element_size, - GLint ysize, GLint group_size, - GLint myswap_bytes); -static void scale_internal_uint(GLint components, GLint widthin, - GLint heightin, const GLuint *datain, - GLint widthout, GLint heightout, - GLuint *dataout, GLint element_size, - GLint ysize, GLint group_size, - GLint myswap_bytes); -static void scale_internal_int(GLint components, GLint widthin, - GLint heightin, const GLint *datain, - GLint widthout, GLint heightout, - GLint *dataout, GLint element_size, - GLint ysize, GLint group_size, - GLint myswap_bytes); -static void scale_internal_float(GLint components, GLint widthin, - GLint heightin, const GLfloat *datain, - GLint widthout, GLint heightout, - GLfloat *dataout, GLint element_size, - GLint ysize, GLint group_size, - GLint myswap_bytes); - -static int checkMipmapArgs(GLenum, GLenum, GLenum); -static GLboolean legalFormat(GLenum); -static GLboolean legalType(GLenum); -static GLboolean isTypePackedPixel(GLenum); -static GLboolean isLegalFormatForPackedPixelType(GLenum, GLenum); -static GLboolean isLegalLevels(GLint, GLint, GLint, GLint); -static void closestFit(GLenum, GLint, GLint, GLint, GLenum, GLenum, - GLint *, GLint *); - -/* all extract/shove routines must return double to handle unsigned ints */ -static GLdouble extractUbyte(int, const void *); -static void shoveUbyte(GLdouble, int, void *); -static GLdouble extractSbyte(int, const void *); -static void shoveSbyte(GLdouble, int, void *); -static GLdouble extractUshort(int, const void *); -static void shoveUshort(GLdouble, int, void *); -static GLdouble extractSshort(int, const void *); -static void shoveSshort(GLdouble, int, void *); -static GLdouble extractUint(int, const void *); -static void shoveUint(GLdouble, int, void *); -static GLdouble extractSint(int, const void *); -static void shoveSint(GLdouble, int, void *); -static GLdouble extractFloat(int, const void *); -static void shoveFloat(GLdouble, int, void *); -static void halveImageSlice(int, GLdouble (*)(int, const void *), - void (*)(GLdouble, int, void *), - GLint, GLint, GLint, - const void *, void *, - GLint, GLint, GLint, GLint, GLint); -static void halveImage3D(int, GLdouble (*)(int, const void *), - void (*)(GLdouble, int, void *), - GLint, GLint, GLint, - const void *, void *, - GLint, GLint, GLint, GLint, GLint); - -/* packedpixel type scale routines */ -static void extract332(int,const void *, GLfloat []); -static void shove332(const GLfloat [],int ,void *); -static void extract233rev(int,const void *, GLfloat []); -static void shove233rev(const GLfloat [],int ,void *); -static void extract565(int,const void *, GLfloat []); -static void shove565(const GLfloat [],int ,void *); -static void extract565rev(int,const void *, GLfloat []); -static void shove565rev(const GLfloat [],int ,void *); -static void extract4444(int,const void *, GLfloat []); -static void shove4444(const GLfloat [],int ,void *); -static void extract4444rev(int,const void *, GLfloat []); -static void shove4444rev(const GLfloat [],int ,void *); -static void extract5551(int,const void *, GLfloat []); -static void shove5551(const GLfloat [],int ,void *); -static void extract1555rev(int,const void *, GLfloat []); -static void shove1555rev(const GLfloat [],int ,void *); -static void extract8888(int,const void *, GLfloat []); -static void shove8888(const GLfloat [],int ,void *); -static void extract8888rev(int,const void *, GLfloat []); -static void shove8888rev(const GLfloat [],int ,void *); -static void extract1010102(int,const void *, GLfloat []); -static void shove1010102(const GLfloat [],int ,void *); -static void extract2101010rev(int,const void *, GLfloat []); -static void shove2101010rev(const GLfloat [],int ,void *); -static void scaleInternalPackedPixel(int, - void (*)(int, const void *,GLfloat []), - void (*)(const GLfloat [],int, void *), - GLint,GLint, const void *, - GLint,GLint,void *,GLint,GLint,GLint); -static void halveImagePackedPixel(int, - void (*)(int, const void *,GLfloat []), - void (*)(const GLfloat [],int, void *), - GLint, GLint, const void *, - void *, GLint, GLint, GLint); -static void halve1DimagePackedPixel(int, - void (*)(int, const void *,GLfloat []), - void (*)(const GLfloat [],int, void *), - GLint, GLint, const void *, - void *, GLint, GLint, GLint); - -static void halve1Dimage_ubyte(GLint, GLuint, GLuint,const GLubyte *, - GLubyte *, GLint, GLint, GLint); -static void halve1Dimage_byte(GLint, GLuint, GLuint,const GLbyte *, GLbyte *, - GLint, GLint, GLint); -static void halve1Dimage_ushort(GLint, GLuint, GLuint, const GLushort *, - GLushort *, GLint, GLint, GLint, GLint); -static void halve1Dimage_short(GLint, GLuint, GLuint,const GLshort *, GLshort *, - GLint, GLint, GLint, GLint); -static void halve1Dimage_uint(GLint, GLuint, GLuint, const GLuint *, GLuint *, - GLint, GLint, GLint, GLint); -static void halve1Dimage_int(GLint, GLuint, GLuint, const GLint *, GLint *, - GLint, GLint, GLint, GLint); -static void halve1Dimage_float(GLint, GLuint, GLuint, const GLfloat *, GLfloat *, - GLint, GLint, GLint, GLint); - -static GLint imageSize3D(GLint, GLint, GLint, GLenum,GLenum); -static void fillImage3D(const PixelStorageModes *, GLint, GLint, GLint,GLenum, - GLenum, GLboolean, const void *, GLushort *); -static void emptyImage3D(const PixelStorageModes *, - GLint, GLint, GLint, GLenum, - GLenum, GLboolean, - const GLushort *, void *); -static void scaleInternal3D(GLint, GLint, GLint, GLint, const GLushort *, - GLint, GLint, GLint, GLushort *); - -static void retrieveStoreModes(PixelStorageModes *psm) -{ - glGetIntegerv(GL_UNPACK_ALIGNMENT, &psm->unpack_alignment); - glGetIntegerv(GL_UNPACK_ROW_LENGTH, &psm->unpack_row_length); - glGetIntegerv(GL_UNPACK_SKIP_ROWS, &psm->unpack_skip_rows); - glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &psm->unpack_skip_pixels); - glGetIntegerv(GL_UNPACK_LSB_FIRST, &psm->unpack_lsb_first); - glGetIntegerv(GL_UNPACK_SWAP_BYTES, &psm->unpack_swap_bytes); - - glGetIntegerv(GL_PACK_ALIGNMENT, &psm->pack_alignment); - glGetIntegerv(GL_PACK_ROW_LENGTH, &psm->pack_row_length); - glGetIntegerv(GL_PACK_SKIP_ROWS, &psm->pack_skip_rows); - glGetIntegerv(GL_PACK_SKIP_PIXELS, &psm->pack_skip_pixels); - glGetIntegerv(GL_PACK_LSB_FIRST, &psm->pack_lsb_first); - glGetIntegerv(GL_PACK_SWAP_BYTES, &psm->pack_swap_bytes); -} - -static void retrieveStoreModes3D(PixelStorageModes *psm) -{ - glGetIntegerv(GL_UNPACK_ALIGNMENT, &psm->unpack_alignment); - glGetIntegerv(GL_UNPACK_ROW_LENGTH, &psm->unpack_row_length); - glGetIntegerv(GL_UNPACK_SKIP_ROWS, &psm->unpack_skip_rows); - glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &psm->unpack_skip_pixels); - glGetIntegerv(GL_UNPACK_LSB_FIRST, &psm->unpack_lsb_first); - glGetIntegerv(GL_UNPACK_SWAP_BYTES, &psm->unpack_swap_bytes); - glGetIntegerv(GL_UNPACK_SKIP_IMAGES, &psm->unpack_skip_images); - glGetIntegerv(GL_UNPACK_IMAGE_HEIGHT, &psm->unpack_image_height); - - glGetIntegerv(GL_PACK_ALIGNMENT, &psm->pack_alignment); - glGetIntegerv(GL_PACK_ROW_LENGTH, &psm->pack_row_length); - glGetIntegerv(GL_PACK_SKIP_ROWS, &psm->pack_skip_rows); - glGetIntegerv(GL_PACK_SKIP_PIXELS, &psm->pack_skip_pixels); - glGetIntegerv(GL_PACK_LSB_FIRST, &psm->pack_lsb_first); - glGetIntegerv(GL_PACK_SWAP_BYTES, &psm->pack_swap_bytes); - glGetIntegerv(GL_PACK_SKIP_IMAGES, &psm->pack_skip_images); - glGetIntegerv(GL_PACK_IMAGE_HEIGHT, &psm->pack_image_height); -} - -static int computeLog(GLuint value) -{ - int i; - - i = 0; - - /* Error! */ - if (value == 0) return -1; - - for (;;) { - if (value & 1) { - /* Error ! */ - if (value != 1) return -1; - return i; - } - value = value >> 1; - i++; - } -} - -/* -** Compute the nearest power of 2 number. This algorithm is a little -** strange, but it works quite well. -*/ -static int nearestPower(GLuint value) -{ - int i; - - i = 1; - - /* Error! */ - if (value == 0) return -1; - - for (;;) { - if (value == 1) { - return i; - } else if (value == 3) { - return i*4; - } - value = value >> 1; - i *= 2; - } -} - -#define __GLU_SWAP_2_BYTES(s)\ -(GLushort)(((GLushort)((const GLubyte*)(s))[1])<<8 | ((const GLubyte*)(s))[0]) - -#define __GLU_SWAP_4_BYTES(s)\ -(GLuint)(((GLuint)((const GLubyte*)(s))[3])<<24 | \ - ((GLuint)((const GLubyte*)(s))[2])<<16 | \ - ((GLuint)((const GLubyte*)(s))[1])<<8 | ((const GLubyte*)(s))[0]) - -static void halveImage(GLint components, GLuint width, GLuint height, - const GLushort *datain, GLushort *dataout) -{ - int i, j, k; - int newwidth, newheight; - int delta; - GLushort *s; - const GLushort *t; - - newwidth = width / 2; - newheight = height / 2; - delta = width * components; - s = dataout; - t = datain; - - /* Piece o' cake! */ - for (i = 0; i < newheight; i++) { - for (j = 0; j < newwidth; j++) { - for (k = 0; k < components; k++) { - s[0] = (t[0] + t[components] + t[delta] + - t[delta+components] + 2) / 4; - s++; t++; - } - t += components; - } - t += delta; - } -} - -static void halveImage_ubyte(GLint components, GLuint width, GLuint height, - const GLubyte *datain, GLubyte *dataout, - GLint element_size, GLint ysize, GLint group_size) -{ - int i, j, k; - int newwidth, newheight; - GLubyte *s; - const char *t; - - /* handle case where there is only 1 column/row */ - if (width == 1 || height == 1) { - assert( !(width == 1 && height == 1) ); /* can't be 1x1 */ - halve1Dimage_ubyte(components,width,height,datain,dataout, - element_size,ysize,group_size); - return; - } - - newwidth = width / 2; - newheight = height / 2; - s = dataout; - t = (const char *)datain; - - /* Piece o' cake! */ - for (i = 0; i < newheight; i++) { - for (j = 0; j < newwidth; j++) { - for (k = 0; k < components; k++) { - s[0] = (*(const GLubyte*)t + - *(const GLubyte*)(t+group_size) + - *(const GLubyte*)(t+ysize) + - *(const GLubyte*)(t+ysize+group_size) + 2) / 4; - s++; t += element_size; - } - t += group_size; - } - t += ysize; - } -} - -/* */ -static void halve1Dimage_ubyte(GLint components, GLuint width, GLuint height, - const GLubyte *dataIn, GLubyte *dataOut, - GLint element_size, GLint ysize, - GLint group_size) -{ - GLint halfWidth= width / 2; - GLint halfHeight= height / 2; - const char *src= (const char *) dataIn; - GLubyte *dest= dataOut; - int jj; - - assert(width == 1 || height == 1); /* must be 1D */ - assert(width != height); /* can't be square */ - - if (height == 1) { /* 1 row */ - assert(width != 1); /* widthxheight can't be 1x1 */ - halfHeight= 1; - - for (jj= 0; jj< halfWidth; jj++) { - int kk; - for (kk= 0; kk< components; kk++) { - *dest= (*(const GLubyte*)src + - *(const GLubyte*)(src+group_size)) / 2; - - src+= element_size; - dest++; - } - src+= group_size; /* skip to next 2 */ - } - { - int padBytes= ysize - (width*group_size); - src+= padBytes; /* for assertion only */ - } - } - else if (width == 1) { /* 1 column */ - int padBytes= ysize - (width * group_size); - assert(height != 1); /* widthxheight can't be 1x1 */ - halfWidth= 1; - /* one vertical column with possible pad bytes per row */ - /* average two at a time */ - - for (jj= 0; jj< halfHeight; jj++) { - int kk; - for (kk= 0; kk< components; kk++) { - *dest= (*(const GLubyte*)src + *(const GLubyte*)(src+ysize)) / 2; - - src+= element_size; - dest++; - } - src+= padBytes; /* add pad bytes, if any, to get to end to row */ - src+= ysize; - } - } - - assert(src == &((const char *)dataIn)[ysize*height]); - assert((char *)dest == &((char *)dataOut) - [components * element_size * halfWidth * halfHeight]); -} /* halve1Dimage_ubyte() */ - -static void halveImage_byte(GLint components, GLuint width, GLuint height, - const GLbyte *datain, GLbyte *dataout, - GLint element_size, - GLint ysize, GLint group_size) -{ - int i, j, k; - int newwidth, newheight; - GLbyte *s; - const char *t; - - /* handle case where there is only 1 column/row */ - if (width == 1 || height == 1) { - assert( !(width == 1 && height == 1) ); /* can't be 1x1 */ - halve1Dimage_byte(components,width,height,datain,dataout, - element_size,ysize,group_size); - return; - } - - newwidth = width / 2; - newheight = height / 2; - s = dataout; - t = (const char *)datain; - - /* Piece o' cake! */ - for (i = 0; i < newheight; i++) { - for (j = 0; j < newwidth; j++) { - for (k = 0; k < components; k++) { - s[0] = (*(const GLbyte*)t + - *(const GLbyte*)(t+group_size) + - *(const GLbyte*)(t+ysize) + - *(const GLbyte*)(t+ysize+group_size) + 2) / 4; - s++; t += element_size; - } - t += group_size; - } - t += ysize; - } -} - -static void halve1Dimage_byte(GLint components, GLuint width, GLuint height, - const GLbyte *dataIn, GLbyte *dataOut, - GLint element_size,GLint ysize, GLint group_size) -{ - GLint halfWidth= width / 2; - GLint halfHeight= height / 2; - const char *src= (const char *) dataIn; - GLbyte *dest= dataOut; - int jj; - - assert(width == 1 || height == 1); /* must be 1D */ - assert(width != height); /* can't be square */ - - if (height == 1) { /* 1 row */ - assert(width != 1); /* widthxheight can't be 1x1 */ - halfHeight= 1; - - for (jj= 0; jj< halfWidth; jj++) { - int kk; - for (kk= 0; kk< components; kk++) { - *dest= (*(const GLbyte*)src + *(const GLbyte*)(src+group_size)) / 2; - - src+= element_size; - dest++; - } - src+= group_size; /* skip to next 2 */ - } - { - int padBytes= ysize - (width*group_size); - src+= padBytes; /* for assertion only */ - } - } - else if (width == 1) { /* 1 column */ - int padBytes= ysize - (width * group_size); - assert(height != 1); /* widthxheight can't be 1x1 */ - halfWidth= 1; - /* one vertical column with possible pad bytes per row */ - /* average two at a time */ - - for (jj= 0; jj< halfHeight; jj++) { - int kk; - for (kk= 0; kk< components; kk++) { - *dest= (*(const GLbyte*)src + *(const GLbyte*)(src+ysize)) / 2; - - src+= element_size; - dest++; - } - src+= padBytes; /* add pad bytes, if any, to get to end to row */ - src+= ysize; - } - - assert(src == &((const char *)dataIn)[ysize*height]); - } - - assert((char *)dest == &((char *)dataOut) - [components * element_size * halfWidth * halfHeight]); -} /* halve1Dimage_byte() */ - -static void halveImage_ushort(GLint components, GLuint width, GLuint height, - const GLushort *datain, GLushort *dataout, - GLint element_size, GLint ysize, GLint group_size, - GLint myswap_bytes) -{ - int i, j, k; - int newwidth, newheight; - GLushort *s; - const char *t; - - /* handle case where there is only 1 column/row */ - if (width == 1 || height == 1) { - assert( !(width == 1 && height == 1) ); /* can't be 1x1 */ - halve1Dimage_ushort(components,width,height,datain,dataout, - element_size,ysize,group_size, myswap_bytes); - return; - } - - newwidth = width / 2; - newheight = height / 2; - s = dataout; - t = (const char *)datain; - - /* Piece o' cake! */ - if (!myswap_bytes) - for (i = 0; i < newheight; i++) { - for (j = 0; j < newwidth; j++) { - for (k = 0; k < components; k++) { - s[0] = (*(const GLushort*)t + - *(const GLushort*)(t+group_size) + - *(const GLushort*)(t+ysize) + - *(const GLushort*)(t+ysize+group_size) + 2) / 4; - s++; t += element_size; - } - t += group_size; - } - t += ysize; - } - else - for (i = 0; i < newheight; i++) { - for (j = 0; j < newwidth; j++) { - for (k = 0; k < components; k++) { - s[0] = (__GLU_SWAP_2_BYTES(t) + - __GLU_SWAP_2_BYTES(t+group_size) + - __GLU_SWAP_2_BYTES(t+ysize) + - __GLU_SWAP_2_BYTES(t+ysize+group_size)+ 2)/4; - s++; t += element_size; - } - t += group_size; - } - t += ysize; - } -} - -static void halve1Dimage_ushort(GLint components, GLuint width, GLuint height, - const GLushort *dataIn, GLushort *dataOut, - GLint element_size, GLint ysize, - GLint group_size, GLint myswap_bytes) -{ - GLint halfWidth= width / 2; - GLint halfHeight= height / 2; - const char *src= (const char *) dataIn; - GLushort *dest= dataOut; - int jj; - - assert(width == 1 || height == 1); /* must be 1D */ - assert(width != height); /* can't be square */ - - if (height == 1) { /* 1 row */ - assert(width != 1); /* widthxheight can't be 1x1 */ - halfHeight= 1; - - for (jj= 0; jj< halfWidth; jj++) { - int kk; - for (kk= 0; kk< components; kk++) { -#define BOX2 2 - GLushort ushort[BOX2]; - if (myswap_bytes) { - ushort[0]= __GLU_SWAP_2_BYTES(src); - ushort[1]= __GLU_SWAP_2_BYTES(src+group_size); - } - else { - ushort[0]= *(const GLushort*)src; - ushort[1]= *(const GLushort*)(src+group_size); - } - - *dest= (ushort[0] + ushort[1]) / 2; - src+= element_size; - dest++; - } - src+= group_size; /* skip to next 2 */ - } - { - int padBytes= ysize - (width*group_size); - src+= padBytes; /* for assertion only */ - } - } - else if (width == 1) { /* 1 column */ - int padBytes= ysize - (width * group_size); - assert(height != 1); /* widthxheight can't be 1x1 */ - halfWidth= 1; - /* one vertical column with possible pad bytes per row */ - /* average two at a time */ - - for (jj= 0; jj< halfHeight; jj++) { - int kk; - for (kk= 0; kk< components; kk++) { -#define BOX2 2 - GLushort ushort[BOX2]; - if (myswap_bytes) { - ushort[0]= __GLU_SWAP_2_BYTES(src); - ushort[1]= __GLU_SWAP_2_BYTES(src+ysize); - } - else { - ushort[0]= *(const GLushort*)src; - ushort[1]= *(const GLushort*)(src+ysize); - } - *dest= (ushort[0] + ushort[1]) / 2; - - src+= element_size; - dest++; - } - src+= padBytes; /* add pad bytes, if any, to get to end to row */ - src+= ysize; - } - - assert(src == &((const char *)dataIn)[ysize*height]); - } - - assert((char *)dest == &((char *)dataOut) - [components * element_size * halfWidth * halfHeight]); - -} /* halve1Dimage_ushort() */ - - -static void halveImage_short(GLint components, GLuint width, GLuint height, - const GLshort *datain, GLshort *dataout, - GLint element_size, GLint ysize, GLint group_size, - GLint myswap_bytes) -{ - int i, j, k; - int newwidth, newheight; - GLshort *s; - const char *t; - - /* handle case where there is only 1 column/row */ - if (width == 1 || height == 1) { - assert( !(width == 1 && height == 1) ); /* can't be 1x1 */ - halve1Dimage_short(components,width,height,datain,dataout, - element_size,ysize,group_size, myswap_bytes); - return; - } - - newwidth = width / 2; - newheight = height / 2; - s = dataout; - t = (const char *)datain; - - /* Piece o' cake! */ - if (!myswap_bytes) - for (i = 0; i < newheight; i++) { - for (j = 0; j < newwidth; j++) { - for (k = 0; k < components; k++) { - s[0] = (*(const GLshort*)t + - *(const GLshort*)(t+group_size) + - *(const GLshort*)(t+ysize) + - *(const GLshort*)(t+ysize+group_size) + 2) / 4; - s++; t += element_size; - } - t += group_size; - } - t += ysize; - } - else - for (i = 0; i < newheight; i++) { - for (j = 0; j < newwidth; j++) { - for (k = 0; k < components; k++) { - GLushort b; - GLint buf; - b = __GLU_SWAP_2_BYTES(t); - buf = *(const GLshort*)&b; - b = __GLU_SWAP_2_BYTES(t+group_size); - buf += *(const GLshort*)&b; - b = __GLU_SWAP_2_BYTES(t+ysize); - buf += *(const GLshort*)&b; - b = __GLU_SWAP_2_BYTES(t+ysize+group_size); - buf += *(const GLshort*)&b; - s[0] = (GLshort)((buf+2)/4); - s++; t += element_size; - } - t += group_size; - } - t += ysize; - } -} - -static void halve1Dimage_short(GLint components, GLuint width, GLuint height, - const GLshort *dataIn, GLshort *dataOut, - GLint element_size, GLint ysize, - GLint group_size, GLint myswap_bytes) -{ - GLint halfWidth= width / 2; - GLint halfHeight= height / 2; - const char *src= (const char *) dataIn; - GLshort *dest= dataOut; - int jj; - - assert(width == 1 || height == 1); /* must be 1D */ - assert(width != height); /* can't be square */ - - if (height == 1) { /* 1 row */ - assert(width != 1); /* widthxheight can't be 1x1 */ - halfHeight= 1; - - for (jj= 0; jj< halfWidth; jj++) { - int kk; - for (kk= 0; kk< components; kk++) { -#define BOX2 2 - GLshort sshort[BOX2]; - if (myswap_bytes) { - sshort[0]= __GLU_SWAP_2_BYTES(src); - sshort[1]= __GLU_SWAP_2_BYTES(src+group_size); - } - else { - sshort[0]= *(const GLshort*)src; - sshort[1]= *(const GLshort*)(src+group_size); - } - - *dest= (sshort[0] + sshort[1]) / 2; - src+= element_size; - dest++; - } - src+= group_size; /* skip to next 2 */ - } - { - int padBytes= ysize - (width*group_size); - src+= padBytes; /* for assertion only */ - } - } - else if (width == 1) { /* 1 column */ - int padBytes= ysize - (width * group_size); - assert(height != 1); /* widthxheight can't be 1x1 */ - halfWidth= 1; - /* one vertical column with possible pad bytes per row */ - /* average two at a time */ - - for (jj= 0; jj< halfHeight; jj++) { - int kk; - for (kk= 0; kk< components; kk++) { -#define BOX2 2 - GLshort sshort[BOX2]; - if (myswap_bytes) { - sshort[0]= __GLU_SWAP_2_BYTES(src); - sshort[1]= __GLU_SWAP_2_BYTES(src+ysize); - } - else { - sshort[0]= *(const GLshort*)src; - sshort[1]= *(const GLshort*)(src+ysize); - } - *dest= (sshort[0] + sshort[1]) / 2; - - src+= element_size; - dest++; - } - src+= padBytes; /* add pad bytes, if any, to get to end to row */ - src+= ysize; - } - - assert(src == &((const char *)dataIn)[ysize*height]); - } - - assert((char *)dest == &((char *)dataOut) - [components * element_size * halfWidth * halfHeight]); - -} /* halve1Dimage_short() */ - - -static void halveImage_uint(GLint components, GLuint width, GLuint height, - const GLuint *datain, GLuint *dataout, - GLint element_size, GLint ysize, GLint group_size, - GLint myswap_bytes) -{ - int i, j, k; - int newwidth, newheight; - GLuint *s; - const char *t; - - /* handle case where there is only 1 column/row */ - if (width == 1 || height == 1) { - assert( !(width == 1 && height == 1) ); /* can't be 1x1 */ - halve1Dimage_uint(components,width,height,datain,dataout, - element_size,ysize,group_size, myswap_bytes); - return; - } - - newwidth = width / 2; - newheight = height / 2; - s = dataout; - t = (const char *)datain; - - /* Piece o' cake! */ - if (!myswap_bytes) - for (i = 0; i < newheight; i++) { - for (j = 0; j < newwidth; j++) { - for (k = 0; k < components; k++) { - /* need to cast to double to hold large unsigned ints */ - s[0] = ((double)*(const GLuint*)t + - (double)*(const GLuint*)(t+group_size) + - (double)*(const GLuint*)(t+ysize) + - (double)*(const GLuint*)(t+ysize+group_size))/4 + 0.5; - s++; t += element_size; - - } - t += group_size; - } - t += ysize; - } - else - for (i = 0; i < newheight; i++) { - for (j = 0; j < newwidth; j++) { - for (k = 0; k < components; k++) { - /* need to cast to double to hold large unsigned ints */ - GLdouble buf; - buf = (GLdouble)__GLU_SWAP_4_BYTES(t) + - (GLdouble)__GLU_SWAP_4_BYTES(t+group_size) + - (GLdouble)__GLU_SWAP_4_BYTES(t+ysize) + - (GLdouble)__GLU_SWAP_4_BYTES(t+ysize+group_size); - s[0] = (GLuint)(buf/4 + 0.5); - - s++; t += element_size; - } - t += group_size; - } - t += ysize; - } -} - -/* */ -static void halve1Dimage_uint(GLint components, GLuint width, GLuint height, - const GLuint *dataIn, GLuint *dataOut, - GLint element_size, GLint ysize, - GLint group_size, GLint myswap_bytes) -{ - GLint halfWidth= width / 2; - GLint halfHeight= height / 2; - const char *src= (const char *) dataIn; - GLuint *dest= dataOut; - int jj; - - assert(width == 1 || height == 1); /* must be 1D */ - assert(width != height); /* can't be square */ - - if (height == 1) { /* 1 row */ - assert(width != 1); /* widthxheight can't be 1x1 */ - halfHeight= 1; - - for (jj= 0; jj< halfWidth; jj++) { - int kk; - for (kk= 0; kk< components; kk++) { -#define BOX2 2 - GLuint uint[BOX2]; - if (myswap_bytes) { - uint[0]= __GLU_SWAP_4_BYTES(src); - uint[1]= __GLU_SWAP_4_BYTES(src+group_size); - } - else { - uint[0]= *(const GLuint*)src; - uint[1]= *(const GLuint*)(src+group_size); - } - *dest= ((double)uint[0]+(double)uint[1])/2.0; - - src+= element_size; - dest++; - } - src+= group_size; /* skip to next 2 */ - } - { - int padBytes= ysize - (width*group_size); - src+= padBytes; /* for assertion only */ - } - } - else if (width == 1) { /* 1 column */ - int padBytes= ysize - (width * group_size); - assert(height != 1); /* widthxheight can't be 1x1 */ - halfWidth= 1; - /* one vertical column with possible pad bytes per row */ - /* average two at a time */ - - for (jj= 0; jj< halfHeight; jj++) { - int kk; - for (kk= 0; kk< components; kk++) { -#define BOX2 2 - GLuint uint[BOX2]; - if (myswap_bytes) { - uint[0]= __GLU_SWAP_4_BYTES(src); - uint[1]= __GLU_SWAP_4_BYTES(src+ysize); - } - else { - uint[0]= *(const GLuint*)src; - uint[1]= *(const GLuint*)(src+ysize); - } - *dest= ((double)uint[0]+(double)uint[1])/2.0; - - src+= element_size; - dest++; - } - src+= padBytes; /* add pad bytes, if any, to get to end to row */ - src+= ysize; - } - - assert(src == &((const char *)dataIn)[ysize*height]); - } - - assert((char *)dest == &((char *)dataOut) - [components * element_size * halfWidth * halfHeight]); - -} /* halve1Dimage_uint() */ - -static void halveImage_int(GLint components, GLuint width, GLuint height, - const GLint *datain, GLint *dataout, GLint element_size, - GLint ysize, GLint group_size, GLint myswap_bytes) -{ - int i, j, k; - int newwidth, newheight; - GLint *s; - const char *t; - - /* handle case where there is only 1 column/row */ - if (width == 1 || height == 1) { - assert( !(width == 1 && height == 1) ); /* can't be 1x1 */ - halve1Dimage_int(components,width,height,datain,dataout, - element_size,ysize,group_size, myswap_bytes); - return; - } - - newwidth = width / 2; - newheight = height / 2; - s = dataout; - t = (const char *)datain; - - /* Piece o' cake! */ - if (!myswap_bytes) - for (i = 0; i < newheight; i++) { - for (j = 0; j < newwidth; j++) { - for (k = 0; k < components; k++) { - s[0] = ((float)*(const GLint*)t + - (float)*(const GLint*)(t+group_size) + - (float)*(const GLint*)(t+ysize) + - (float)*(const GLint*)(t+ysize+group_size))/4 + 0.5; - s++; t += element_size; - } - t += group_size; - } - t += ysize; - } - else - for (i = 0; i < newheight; i++) { - for (j = 0; j < newwidth; j++) { - for (k = 0; k < components; k++) { - GLuint b; - GLfloat buf; - b = __GLU_SWAP_4_BYTES(t); - buf = *(GLint*)&b; - b = __GLU_SWAP_4_BYTES(t+group_size); - buf += *(GLint*)&b; - b = __GLU_SWAP_4_BYTES(t+ysize); - buf += *(GLint*)&b; - b = __GLU_SWAP_4_BYTES(t+ysize+group_size); - buf += *(GLint*)&b; - s[0] = (GLint)(buf/4 + 0.5); - - s++; t += element_size; - } - t += group_size; - } - t += ysize; - } -} - -/* */ -static void halve1Dimage_int(GLint components, GLuint width, GLuint height, - const GLint *dataIn, GLint *dataOut, - GLint element_size, GLint ysize, - GLint group_size, GLint myswap_bytes) -{ - GLint halfWidth= width / 2; - GLint halfHeight= height / 2; - const char *src= (const char *) dataIn; - GLint *dest= dataOut; - int jj; - - assert(width == 1 || height == 1); /* must be 1D */ - assert(width != height); /* can't be square */ - - if (height == 1) { /* 1 row */ - assert(width != 1); /* widthxheight can't be 1x1 */ - halfHeight= 1; - - for (jj= 0; jj< halfWidth; jj++) { - int kk; - for (kk= 0; kk< components; kk++) { -#define BOX2 2 - GLuint uint[BOX2]; - if (myswap_bytes) { - uint[0]= __GLU_SWAP_4_BYTES(src); - uint[1]= __GLU_SWAP_4_BYTES(src+group_size); - } - else { - uint[0]= *(const GLuint*)src; - uint[1]= *(const GLuint*)(src+group_size); - } - *dest= ((float)uint[0]+(float)uint[1])/2.0; - - src+= element_size; - dest++; - } - src+= group_size; /* skip to next 2 */ - } - { - int padBytes= ysize - (width*group_size); - src+= padBytes; /* for assertion only */ - } - } - else if (width == 1) { /* 1 column */ - int padBytes= ysize - (width * group_size); - assert(height != 1); /* widthxheight can't be 1x1 */ - halfWidth= 1; - /* one vertical column with possible pad bytes per row */ - /* average two at a time */ - - for (jj= 0; jj< halfHeight; jj++) { - int kk; - for (kk= 0; kk< components; kk++) { -#define BOX2 2 - GLuint uint[BOX2]; - if (myswap_bytes) { - uint[0]= __GLU_SWAP_4_BYTES(src); - uint[1]= __GLU_SWAP_4_BYTES(src+ysize); - } - else { - uint[0]= *(const GLuint*)src; - uint[1]= *(const GLuint*)(src+ysize); - } - *dest= ((float)uint[0]+(float)uint[1])/2.0; - - src+= element_size; - dest++; - } - src+= padBytes; /* add pad bytes, if any, to get to end to row */ - src+= ysize; - } - - assert(src == &((const char *)dataIn)[ysize*height]); - } - - assert((char *)dest == &((char *)dataOut) - [components * element_size * halfWidth * halfHeight]); - -} /* halve1Dimage_int() */ - - -static void halveImage_float(GLint components, GLuint width, GLuint height, - const GLfloat *datain, GLfloat *dataout, - GLint element_size, GLint ysize, GLint group_size, - GLint myswap_bytes) -{ - int i, j, k; - int newwidth, newheight; - GLfloat *s; - const char *t; - - /* handle case where there is only 1 column/row */ - if (width == 1 || height == 1) { - assert( !(width == 1 && height == 1) ); /* can't be 1x1 */ - halve1Dimage_float(components,width,height,datain,dataout, - element_size,ysize,group_size, myswap_bytes); - return; - } - - newwidth = width / 2; - newheight = height / 2; - s = dataout; - t = (const char *)datain; - - /* Piece o' cake! */ - if (!myswap_bytes) - for (i = 0; i < newheight; i++) { - for (j = 0; j < newwidth; j++) { - for (k = 0; k < components; k++) { - s[0] = (*(const GLfloat*)t + - *(const GLfloat*)(t+group_size) + - *(const GLfloat*)(t+ysize) + - *(const GLfloat*)(t+ysize+group_size)) / 4; - s++; t += element_size; - } - t += group_size; - } - t += ysize; - } - else - for (i = 0; i < newheight; i++) { - for (j = 0; j < newwidth; j++) { - for (k = 0; k < components; k++) { - union { GLuint b; GLfloat f; } swapbuf; - swapbuf.b = __GLU_SWAP_4_BYTES(t); - s[0] = swapbuf.f; - swapbuf.b = __GLU_SWAP_4_BYTES(t+group_size); - s[0] += swapbuf.f; - swapbuf.b = __GLU_SWAP_4_BYTES(t+ysize); - s[0] += swapbuf.f; - swapbuf.b = __GLU_SWAP_4_BYTES(t+ysize+group_size); - s[0] += swapbuf.f; - s[0] /= 4; - s++; t += element_size; - } - t += group_size; - } - t += ysize; - } -} - -/* */ -static void halve1Dimage_float(GLint components, GLuint width, GLuint height, - const GLfloat *dataIn, GLfloat *dataOut, - GLint element_size, GLint ysize, - GLint group_size, GLint myswap_bytes) -{ - GLint halfWidth= width / 2; - GLint halfHeight= height / 2; - const char *src= (const char *) dataIn; - GLfloat *dest= dataOut; - int jj; - - assert(width == 1 || height == 1); /* must be 1D */ - assert(width != height); /* can't be square */ - - if (height == 1) { /* 1 row */ - assert(width != 1); /* widthxheight can't be 1x1 */ - halfHeight= 1; - - for (jj= 0; jj< halfWidth; jj++) { - int kk; - for (kk= 0; kk< components; kk++) { -#define BOX2 2 - GLfloat sfloat[BOX2]; - if (myswap_bytes) { - sfloat[0]= __GLU_SWAP_4_BYTES(src); - sfloat[1]= __GLU_SWAP_4_BYTES(src+group_size); - } - else { - sfloat[0]= *(const GLfloat*)src; - sfloat[1]= *(const GLfloat*)(src+group_size); - } - - *dest= (sfloat[0] + sfloat[1]) / 2.0; - src+= element_size; - dest++; - } - src+= group_size; /* skip to next 2 */ - } - { - int padBytes= ysize - (width*group_size); - src+= padBytes; /* for assertion only */ - } - } - else if (width == 1) { /* 1 column */ - int padBytes= ysize - (width * group_size); - assert(height != 1); /* widthxheight can't be 1x1 */ - halfWidth= 1; - /* one vertical column with possible pad bytes per row */ - /* average two at a time */ - - for (jj= 0; jj< halfHeight; jj++) { - int kk; - for (kk= 0; kk< components; kk++) { -#define BOX2 2 - GLfloat sfloat[BOX2]; - if (myswap_bytes) { - sfloat[0]= __GLU_SWAP_4_BYTES(src); - sfloat[1]= __GLU_SWAP_4_BYTES(src+ysize); - } - else { - sfloat[0]= *(const GLfloat*)src; - sfloat[1]= *(const GLfloat*)(src+ysize); - } - *dest= (sfloat[0] + sfloat[1]) / 2.0; - - src+= element_size; - dest++; - } - src+= padBytes; /* add pad bytes, if any, to get to end to row */ - src+= ysize; /* skip to odd row */ - } - } - - assert(src == &((const char *)dataIn)[ysize*height]); - assert((char *)dest == &((char *)dataOut) - [components * element_size * halfWidth * halfHeight]); -} /* halve1Dimage_float() */ - -static void scale_internal(GLint components, GLint widthin, GLint heightin, - const GLushort *datain, - GLint widthout, GLint heightout, - GLushort *dataout) -{ - float x, lowx, highx, convx, halfconvx; - float y, lowy, highy, convy, halfconvy; - float xpercent,ypercent; - float percent; - /* Max components in a format is 4, so... */ - float totals[4]; - float area; - int i,j,k,yint,xint,xindex,yindex; - int temp; - - if (widthin == widthout*2 && heightin == heightout*2) { - halveImage(components, widthin, heightin, datain, dataout); - return; - } - convy = (float) heightin/heightout; - convx = (float) widthin/widthout; - halfconvx = convx/2; - halfconvy = convy/2; - for (i = 0; i < heightout; i++) { - y = convy * (i+0.5); - if (heightin > heightout) { - highy = y + halfconvy; - lowy = y - halfconvy; - } else { - highy = y + 0.5; - lowy = y - 0.5; - } - for (j = 0; j < widthout; j++) { - x = convx * (j+0.5); - if (widthin > widthout) { - highx = x + halfconvx; - lowx = x - halfconvx; - } else { - highx = x + 0.5; - lowx = x - 0.5; - } - - /* - ** Ok, now apply box filter to box that goes from (lowx, lowy) - ** to (highx, highy) on input data into this pixel on output - ** data. - */ - totals[0] = totals[1] = totals[2] = totals[3] = 0.0; - area = 0.0; - - y = lowy; - yint = floor(y); - while (y < highy) { - yindex = (yint + heightin) % heightin; - if (highy < yint+1) { - ypercent = highy - y; - } else { - ypercent = yint+1 - y; - } - - x = lowx; - xint = floor(x); - - while (x < highx) { - xindex = (xint + widthin) % widthin; - if (highx < xint+1) { - xpercent = highx - x; - } else { - xpercent = xint+1 - x; - } - - percent = xpercent * ypercent; - area += percent; - temp = (xindex + (yindex * widthin)) * components; - for (k = 0; k < components; k++) { - totals[k] += datain[temp + k] * percent; - } - - xint++; - x = xint; - } - yint++; - y = yint; - } - - temp = (j + (i * widthout)) * components; - for (k = 0; k < components; k++) { - /* totals[] should be rounded in the case of enlarging an RGB - * ramp when the type is 332 or 4444 - */ - dataout[temp + k] = (totals[k]+0.5)/area; - } - } - } -} - -static void scale_internal_ubyte(GLint components, GLint widthin, - GLint heightin, const GLubyte *datain, - GLint widthout, GLint heightout, - GLubyte *dataout, GLint element_size, - GLint ysize, GLint group_size) -{ - float convx; - float convy; - float percent; - /* Max components in a format is 4, so... */ - float totals[4]; - float area; - int i,j,k,xindex; - - const char *temp, *temp0; - const char *temp_index; - int outindex; - - int lowx_int, highx_int, lowy_int, highy_int; - float x_percent, y_percent; - float lowx_float, highx_float, lowy_float, highy_float; - float convy_float, convx_float; - int convy_int, convx_int; - int l, m; - const char *left, *right; - - if (widthin == widthout*2 && heightin == heightout*2) { - halveImage_ubyte(components, widthin, heightin, - (const GLubyte *)datain, (GLubyte *)dataout, - element_size, ysize, group_size); - return; - } - convy = (float) heightin/heightout; - convx = (float) widthin/widthout; - convy_int = floor(convy); - convy_float = convy - convy_int; - convx_int = floor(convx); - convx_float = convx - convx_int; - - area = convx * convy; - - lowy_int = 0; - lowy_float = 0; - highy_int = convy_int; - highy_float = convy_float; - - for (i = 0; i < heightout; i++) { - /* Clamp here to be sure we don't read beyond input buffer. */ - if (highy_int >= heightin) - highy_int = heightin - 1; - lowx_int = 0; - lowx_float = 0; - highx_int = convx_int; - highx_float = convx_float; - - for (j = 0; j < widthout; j++) { - - /* - ** Ok, now apply box filter to box that goes from (lowx, lowy) - ** to (highx, highy) on input data into this pixel on output - ** data. - */ - totals[0] = totals[1] = totals[2] = totals[3] = 0.0; - - /* calculate the value for pixels in the 1st row */ - xindex = lowx_int*group_size; - if((highy_int>lowy_int) && (highx_int>lowx_int)) { - - y_percent = 1-lowy_float; - temp = (const char *)datain + xindex + lowy_int * ysize; - percent = y_percent * (1-lowx_float); - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLubyte)(*(temp_index)) * percent; - } - left = temp; - for(l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLubyte)(*(temp_index)) * y_percent; - } - } - temp += group_size; - right = temp; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLubyte)(*(temp_index)) * percent; - } - - /* calculate the value for pixels in the last row */ - y_percent = highy_float; - percent = y_percent * (1-lowx_float); - temp = (const char *)datain + xindex + highy_int * ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLubyte)(*(temp_index)) * percent; - } - for(l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLubyte)(*(temp_index)) * y_percent; - } - } - temp += group_size; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLubyte)(*(temp_index)) * percent; - } - - - /* calculate the value for pixels in the 1st and last column */ - for(m = lowy_int+1; m < highy_int; m++) { - left += ysize; - right += ysize; - for (k = 0; k < components; - k++, left += element_size, right += element_size) { - totals[k] += (GLubyte)(*(left))*(1-lowx_float) - +(GLubyte)(*(right))*highx_float; - } - } - } else if (highy_int > lowy_int) { - x_percent = highx_float - lowx_float; - percent = (1-lowy_float)*x_percent; - temp = (const char *)datain + xindex + lowy_int*ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLubyte)(*(temp_index)) * percent; - } - for(m = lowy_int+1; m < highy_int; m++) { - temp += ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLubyte)(*(temp_index)) * x_percent; - } - } - percent = x_percent * highy_float; - temp += ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLubyte)(*(temp_index)) * percent; - } - } else if (highx_int > lowx_int) { - y_percent = highy_float - lowy_float; - percent = (1-lowx_float)*y_percent; - temp = (const char *)datain + xindex + lowy_int*ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLubyte)(*(temp_index)) * percent; - } - for (l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLubyte)(*(temp_index)) * y_percent; - } - } - temp += group_size; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLubyte)(*(temp_index)) * percent; - } - } else { - percent = (highy_float-lowy_float)*(highx_float-lowx_float); - temp = (const char *)datain + xindex + lowy_int * ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLubyte)(*(temp_index)) * percent; - } - } - - - - /* this is for the pixels in the body */ - temp0 = (const char *)datain + xindex + group_size + - (lowy_int+1)*ysize; - for (m = lowy_int+1; m < highy_int; m++) { - temp = temp0; - for(l = lowx_int+1; l < highx_int; l++) { - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLubyte)(*(temp_index)); - } - temp += group_size; - } - temp0 += ysize; - } - - outindex = (j + (i * widthout)) * components; - for (k = 0; k < components; k++) { - dataout[outindex + k] = totals[k]/area; - /*printf("totals[%d] = %f\n", k, totals[k]);*/ - } - lowx_int = highx_int; - lowx_float = highx_float; - highx_int += convx_int; - highx_float += convx_float; - if(highx_float > 1) { - highx_float -= 1.0; - highx_int++; - } - } - lowy_int = highy_int; - lowy_float = highy_float; - highy_int += convy_int; - highy_float += convy_float; - if(highy_float > 1) { - highy_float -= 1.0; - highy_int++; - } - } -} - -static void scale_internal_byte(GLint components, GLint widthin, - GLint heightin, const GLbyte *datain, - GLint widthout, GLint heightout, - GLbyte *dataout, GLint element_size, - GLint ysize, GLint group_size) -{ - float convx; - float convy; - float percent; - /* Max components in a format is 4, so... */ - float totals[4]; - float area; - int i,j,k,xindex; - - const char *temp, *temp0; - const char *temp_index; - int outindex; - - int lowx_int, highx_int, lowy_int, highy_int; - float x_percent, y_percent; - float lowx_float, highx_float, lowy_float, highy_float; - float convy_float, convx_float; - int convy_int, convx_int; - int l, m; - const char *left, *right; - - if (widthin == widthout*2 && heightin == heightout*2) { - halveImage_byte(components, widthin, heightin, - (const GLbyte *)datain, (GLbyte *)dataout, - element_size, ysize, group_size); - return; - } - convy = (float) heightin/heightout; - convx = (float) widthin/widthout; - convy_int = floor(convy); - convy_float = convy - convy_int; - convx_int = floor(convx); - convx_float = convx - convx_int; - - area = convx * convy; - - lowy_int = 0; - lowy_float = 0; - highy_int = convy_int; - highy_float = convy_float; - - for (i = 0; i < heightout; i++) { - /* Clamp here to be sure we don't read beyond input buffer. */ - if (highy_int >= heightin) - highy_int = heightin - 1; - lowx_int = 0; - lowx_float = 0; - highx_int = convx_int; - highx_float = convx_float; - - for (j = 0; j < widthout; j++) { - - /* - ** Ok, now apply box filter to box that goes from (lowx, lowy) - ** to (highx, highy) on input data into this pixel on output - ** data. - */ - totals[0] = totals[1] = totals[2] = totals[3] = 0.0; - - /* calculate the value for pixels in the 1st row */ - xindex = lowx_int*group_size; - if((highy_int>lowy_int) && (highx_int>lowx_int)) { - - y_percent = 1-lowy_float; - temp = (const char *)datain + xindex + lowy_int * ysize; - percent = y_percent * (1-lowx_float); - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLbyte)(*(temp_index)) * percent; - } - left = temp; - for(l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLbyte)(*(temp_index)) * y_percent; - } - } - temp += group_size; - right = temp; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLbyte)(*(temp_index)) * percent; - } - - /* calculate the value for pixels in the last row */ - y_percent = highy_float; - percent = y_percent * (1-lowx_float); - temp = (const char *)datain + xindex + highy_int * ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLbyte)(*(temp_index)) * percent; - } - for(l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLbyte)(*(temp_index)) * y_percent; - } - } - temp += group_size; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLbyte)(*(temp_index)) * percent; - } - - - /* calculate the value for pixels in the 1st and last column */ - for(m = lowy_int+1; m < highy_int; m++) { - left += ysize; - right += ysize; - for (k = 0; k < components; - k++, left += element_size, right += element_size) { - totals[k] += (GLbyte)(*(left))*(1-lowx_float) - +(GLbyte)(*(right))*highx_float; - } - } - } else if (highy_int > lowy_int) { - x_percent = highx_float - lowx_float; - percent = (1-lowy_float)*x_percent; - temp = (const char *)datain + xindex + lowy_int*ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLbyte)(*(temp_index)) * percent; - } - for(m = lowy_int+1; m < highy_int; m++) { - temp += ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLbyte)(*(temp_index)) * x_percent; - } - } - percent = x_percent * highy_float; - temp += ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLbyte)(*(temp_index)) * percent; - } - } else if (highx_int > lowx_int) { - y_percent = highy_float - lowy_float; - percent = (1-lowx_float)*y_percent; - temp = (const char *)datain + xindex + lowy_int*ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLbyte)(*(temp_index)) * percent; - } - for (l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLbyte)(*(temp_index)) * y_percent; - } - } - temp += group_size; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLbyte)(*(temp_index)) * percent; - } - } else { - percent = (highy_float-lowy_float)*(highx_float-lowx_float); - temp = (const char *)datain + xindex + lowy_int * ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLbyte)(*(temp_index)) * percent; - } - } - - - - /* this is for the pixels in the body */ - temp0 = (const char *)datain + xindex + group_size + - (lowy_int+1)*ysize; - for (m = lowy_int+1; m < highy_int; m++) { - temp = temp0; - for(l = lowx_int+1; l < highx_int; l++) { - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - totals[k] += (GLbyte)(*(temp_index)); - } - temp += group_size; - } - temp0 += ysize; - } - - outindex = (j + (i * widthout)) * components; - for (k = 0; k < components; k++) { - dataout[outindex + k] = totals[k]/area; - /*printf("totals[%d] = %f\n", k, totals[k]);*/ - } - lowx_int = highx_int; - lowx_float = highx_float; - highx_int += convx_int; - highx_float += convx_float; - if(highx_float > 1) { - highx_float -= 1.0; - highx_int++; - } - } - lowy_int = highy_int; - lowy_float = highy_float; - highy_int += convy_int; - highy_float += convy_float; - if(highy_float > 1) { - highy_float -= 1.0; - highy_int++; - } - } -} - -static void scale_internal_ushort(GLint components, GLint widthin, - GLint heightin, const GLushort *datain, - GLint widthout, GLint heightout, - GLushort *dataout, GLint element_size, - GLint ysize, GLint group_size, - GLint myswap_bytes) -{ - float convx; - float convy; - float percent; - /* Max components in a format is 4, so... */ - float totals[4]; - float area; - int i,j,k,xindex; - - const char *temp, *temp0; - const char *temp_index; - int outindex; - - int lowx_int, highx_int, lowy_int, highy_int; - float x_percent, y_percent; - float lowx_float, highx_float, lowy_float, highy_float; - float convy_float, convx_float; - int convy_int, convx_int; - int l, m; - const char *left, *right; - - if (widthin == widthout*2 && heightin == heightout*2) { - halveImage_ushort(components, widthin, heightin, - (const GLushort *)datain, (GLushort *)dataout, - element_size, ysize, group_size, myswap_bytes); - return; - } - convy = (float) heightin/heightout; - convx = (float) widthin/widthout; - convy_int = floor(convy); - convy_float = convy - convy_int; - convx_int = floor(convx); - convx_float = convx - convx_int; - - area = convx * convy; - - lowy_int = 0; - lowy_float = 0; - highy_int = convy_int; - highy_float = convy_float; - - for (i = 0; i < heightout; i++) { - /* Clamp here to be sure we don't read beyond input buffer. */ - if (highy_int >= heightin) - highy_int = heightin - 1; - lowx_int = 0; - lowx_float = 0; - highx_int = convx_int; - highx_float = convx_float; - - for (j = 0; j < widthout; j++) { - /* - ** Ok, now apply box filter to box that goes from (lowx, lowy) - ** to (highx, highy) on input data into this pixel on output - ** data. - */ - totals[0] = totals[1] = totals[2] = totals[3] = 0.0; - - /* calculate the value for pixels in the 1st row */ - xindex = lowx_int*group_size; - if((highy_int>lowy_int) && (highx_int>lowx_int)) { - - y_percent = 1-lowy_float; - temp = (const char *)datain + xindex + lowy_int * ysize; - percent = y_percent * (1-lowx_float); - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } - left = temp; - for(l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += - __GLU_SWAP_2_BYTES(temp_index) * y_percent; - } else { - totals[k] += *(const GLushort*)temp_index * y_percent; - } - } - } - temp += group_size; - right = temp; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } - - /* calculate the value for pixels in the last row */ - y_percent = highy_float; - percent = y_percent * (1-lowx_float); - temp = (const char *)datain + xindex + highy_int * ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } - for(l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += - __GLU_SWAP_2_BYTES(temp_index) * y_percent; - } else { - totals[k] += *(const GLushort*)temp_index * y_percent; - } - } - } - temp += group_size; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } - - /* calculate the value for pixels in the 1st and last column */ - for(m = lowy_int+1; m < highy_int; m++) { - left += ysize; - right += ysize; - for (k = 0; k < components; - k++, left += element_size, right += element_size) { - if (myswap_bytes) { - totals[k] += - __GLU_SWAP_2_BYTES(left) * (1-lowx_float) + - __GLU_SWAP_2_BYTES(right) * highx_float; - } else { - totals[k] += *(const GLushort*)left * (1-lowx_float) - + *(const GLushort*)right * highx_float; - } - } - } - } else if (highy_int > lowy_int) { - x_percent = highx_float - lowx_float; - percent = (1-lowy_float)*x_percent; - temp = (const char *)datain + xindex + lowy_int*ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } - for(m = lowy_int+1; m < highy_int; m++) { - temp += ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += - __GLU_SWAP_2_BYTES(temp_index) * x_percent; - } else { - totals[k] += *(const GLushort*)temp_index * x_percent; - } - } - } - percent = x_percent * highy_float; - temp += ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } - } else if (highx_int > lowx_int) { - y_percent = highy_float - lowy_float; - percent = (1-lowx_float)*y_percent; - temp = (const char *)datain + xindex + lowy_int*ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } - for (l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += - __GLU_SWAP_2_BYTES(temp_index) * y_percent; - } else { - totals[k] += *(const GLushort*)temp_index * y_percent; - } - } - } - temp += group_size; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } - } else { - percent = (highy_float-lowy_float)*(highx_float-lowx_float); - temp = (const char *)datain + xindex + lowy_int * ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } - } - - /* this is for the pixels in the body */ - temp0 = (const char *)datain + xindex + group_size + - (lowy_int+1)*ysize; - for (m = lowy_int+1; m < highy_int; m++) { - temp = temp0; - for(l = lowx_int+1; l < highx_int; l++) { - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index); - } else { - totals[k] += *(const GLushort*)temp_index; - } - } - temp += group_size; - } - temp0 += ysize; - } - - outindex = (j + (i * widthout)) * components; - for (k = 0; k < components; k++) { - dataout[outindex + k] = totals[k]/area; - /*printf("totals[%d] = %f\n", k, totals[k]);*/ - } - lowx_int = highx_int; - lowx_float = highx_float; - highx_int += convx_int; - highx_float += convx_float; - if(highx_float > 1) { - highx_float -= 1.0; - highx_int++; - } - } - lowy_int = highy_int; - lowy_float = highy_float; - highy_int += convy_int; - highy_float += convy_float; - if(highy_float > 1) { - highy_float -= 1.0; - highy_int++; - } - } -} - -static void scale_internal_short(GLint components, GLint widthin, - GLint heightin, const GLshort *datain, - GLint widthout, GLint heightout, - GLshort *dataout, GLint element_size, - GLint ysize, GLint group_size, - GLint myswap_bytes) -{ - float convx; - float convy; - float percent; - /* Max components in a format is 4, so... */ - float totals[4]; - float area; - int i,j,k,xindex; - - const char *temp, *temp0; - const char *temp_index; - int outindex; - - int lowx_int, highx_int, lowy_int, highy_int; - float x_percent, y_percent; - float lowx_float, highx_float, lowy_float, highy_float; - float convy_float, convx_float; - int convy_int, convx_int; - int l, m; - const char *left, *right; - - GLushort swapbuf; /* unsigned buffer */ - - if (widthin == widthout*2 && heightin == heightout*2) { - halveImage_short(components, widthin, heightin, - (const GLshort *)datain, (GLshort *)dataout, - element_size, ysize, group_size, myswap_bytes); - return; - } - convy = (float) heightin/heightout; - convx = (float) widthin/widthout; - convy_int = floor(convy); - convy_float = convy - convy_int; - convx_int = floor(convx); - convx_float = convx - convx_int; - - area = convx * convy; - - lowy_int = 0; - lowy_float = 0; - highy_int = convy_int; - highy_float = convy_float; - - for (i = 0; i < heightout; i++) { - /* Clamp here to be sure we don't read beyond input buffer. */ - if (highy_int >= heightin) - highy_int = heightin - 1; - lowx_int = 0; - lowx_float = 0; - highx_int = convx_int; - highx_float = convx_float; - - for (j = 0; j < widthout; j++) { - /* - ** Ok, now apply box filter to box that goes from (lowx, lowy) - ** to (highx, highy) on input data into this pixel on output - ** data. - */ - totals[0] = totals[1] = totals[2] = totals[3] = 0.0; - - /* calculate the value for pixels in the 1st row */ - xindex = lowx_int*group_size; - if((highy_int>lowy_int) && (highx_int>lowx_int)) { - - y_percent = 1-lowy_float; - temp = (const char *)datain + xindex + lowy_int * ysize; - percent = y_percent * (1-lowx_float); - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_2_BYTES(temp_index); - totals[k] += *(const GLshort*)&swapbuf * percent; - } else { - totals[k] += *(const GLshort*)temp_index * percent; - } - } - left = temp; - for(l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_2_BYTES(temp_index); - totals[k] += *(const GLshort*)&swapbuf * y_percent; - } else { - totals[k] += *(const GLshort*)temp_index * y_percent; - } - } - } - temp += group_size; - right = temp; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_2_BYTES(temp_index); - totals[k] += *(const GLshort*)&swapbuf * percent; - } else { - totals[k] += *(const GLshort*)temp_index * percent; - } - } - - /* calculate the value for pixels in the last row */ - y_percent = highy_float; - percent = y_percent * (1-lowx_float); - temp = (const char *)datain + xindex + highy_int * ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_2_BYTES(temp_index); - totals[k] += *(const GLshort*)&swapbuf * percent; - } else { - totals[k] += *(const GLshort*)temp_index * percent; - } - } - for(l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_2_BYTES(temp_index); - totals[k] += *(const GLshort*)&swapbuf * y_percent; - } else { - totals[k] += *(const GLshort*)temp_index * y_percent; - } - } - } - temp += group_size; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_2_BYTES(temp_index); - totals[k] += *(const GLshort*)&swapbuf * percent; - } else { - totals[k] += *(const GLshort*)temp_index * percent; - } - } - - /* calculate the value for pixels in the 1st and last column */ - for(m = lowy_int+1; m < highy_int; m++) { - left += ysize; - right += ysize; - for (k = 0; k < components; - k++, left += element_size, right += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_2_BYTES(left); - totals[k] += *(const GLshort*)&swapbuf * (1-lowx_float); - swapbuf = __GLU_SWAP_2_BYTES(right); - totals[k] += *(const GLshort*)&swapbuf * highx_float; - } else { - totals[k] += *(const GLshort*)left * (1-lowx_float) - + *(const GLshort*)right * highx_float; - } - } - } - } else if (highy_int > lowy_int) { - x_percent = highx_float - lowx_float; - percent = (1-lowy_float)*x_percent; - temp = (const char *)datain + xindex + lowy_int*ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_2_BYTES(temp_index); - totals[k] += *(const GLshort*)&swapbuf * percent; - } else { - totals[k] += *(const GLshort*)temp_index * percent; - } - } - for(m = lowy_int+1; m < highy_int; m++) { - temp += ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_2_BYTES(temp_index); - totals[k] += *(const GLshort*)&swapbuf * x_percent; - } else { - totals[k] += *(const GLshort*)temp_index * x_percent; - } - } - } - percent = x_percent * highy_float; - temp += ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_2_BYTES(temp_index); - totals[k] += *(const GLshort*)&swapbuf * percent; - } else { - totals[k] += *(const GLshort*)temp_index * percent; - } - } - } else if (highx_int > lowx_int) { - y_percent = highy_float - lowy_float; - percent = (1-lowx_float)*y_percent; - - temp = (const char *)datain + xindex + lowy_int*ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_2_BYTES(temp_index); - totals[k] += *(const GLshort*)&swapbuf * percent; - } else { - totals[k] += *(const GLshort*)temp_index * percent; - } - } - for (l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_2_BYTES(temp_index); - totals[k] += *(const GLshort*)&swapbuf * y_percent; - } else { - totals[k] += *(const GLshort*)temp_index * y_percent; - } - } - } - temp += group_size; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_2_BYTES(temp_index); - totals[k] += *(const GLshort*)&swapbuf * percent; - } else { - totals[k] += *(const GLshort*)temp_index * percent; - } - } - } else { - percent = (highy_float-lowy_float)*(highx_float-lowx_float); - temp = (const char *)datain + xindex + lowy_int * ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_2_BYTES(temp_index); - totals[k] += *(const GLshort*)&swapbuf * percent; - } else { - totals[k] += *(const GLshort*)temp_index * percent; - } - } - } - - /* this is for the pixels in the body */ - temp0 = (const char *)datain + xindex + group_size + - (lowy_int+1)*ysize; - for (m = lowy_int+1; m < highy_int; m++) { - temp = temp0; - for(l = lowx_int+1; l < highx_int; l++) { - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_2_BYTES(temp_index); - totals[k] += *(const GLshort*)&swapbuf; - } else { - totals[k] += *(const GLshort*)temp_index; - } - } - temp += group_size; - } - temp0 += ysize; - } - - outindex = (j + (i * widthout)) * components; - for (k = 0; k < components; k++) { - dataout[outindex + k] = totals[k]/area; - /*printf("totals[%d] = %f\n", k, totals[k]);*/ - } - lowx_int = highx_int; - lowx_float = highx_float; - highx_int += convx_int; - highx_float += convx_float; - if(highx_float > 1) { - highx_float -= 1.0; - highx_int++; - } - } - lowy_int = highy_int; - lowy_float = highy_float; - highy_int += convy_int; - highy_float += convy_float; - if(highy_float > 1) { - highy_float -= 1.0; - highy_int++; - } - } -} - -static void scale_internal_uint(GLint components, GLint widthin, - GLint heightin, const GLuint *datain, - GLint widthout, GLint heightout, - GLuint *dataout, GLint element_size, - GLint ysize, GLint group_size, - GLint myswap_bytes) -{ - float convx; - float convy; - float percent; - /* Max components in a format is 4, so... */ - float totals[4]; - float area; - int i,j,k,xindex; - - const char *temp, *temp0; - const char *temp_index; - int outindex; - - int lowx_int, highx_int, lowy_int, highy_int; - float x_percent, y_percent; - float lowx_float, highx_float, lowy_float, highy_float; - float convy_float, convx_float; - int convy_int, convx_int; - int l, m; - const char *left, *right; - - if (widthin == widthout*2 && heightin == heightout*2) { - halveImage_uint(components, widthin, heightin, - (const GLuint *)datain, (GLuint *)dataout, - element_size, ysize, group_size, myswap_bytes); - return; - } - convy = (float) heightin/heightout; - convx = (float) widthin/widthout; - convy_int = floor(convy); - convy_float = convy - convy_int; - convx_int = floor(convx); - convx_float = convx - convx_int; - - area = convx * convy; - - lowy_int = 0; - lowy_float = 0; - highy_int = convy_int; - highy_float = convy_float; - - for (i = 0; i < heightout; i++) { - /* Clamp here to be sure we don't read beyond input buffer. */ - if (highy_int >= heightin) - highy_int = heightin - 1; - lowx_int = 0; - lowx_float = 0; - highx_int = convx_int; - highx_float = convx_float; - - for (j = 0; j < widthout; j++) { - /* - ** Ok, now apply box filter to box that goes from (lowx, lowy) - ** to (highx, highy) on input data into this pixel on output - ** data. - */ - totals[0] = totals[1] = totals[2] = totals[3] = 0.0; - - /* calculate the value for pixels in the 1st row */ - xindex = lowx_int*group_size; - if((highy_int>lowy_int) && (highx_int>lowx_int)) { - - y_percent = 1-lowy_float; - temp = (const char *)datain + xindex + lowy_int * ysize; - percent = y_percent * (1-lowx_float); - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_4_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLuint*)temp_index * percent; - } - } - left = temp; - for(l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += - __GLU_SWAP_4_BYTES(temp_index) * y_percent; - } else { - totals[k] += *(const GLuint*)temp_index * y_percent; - } - } - } - temp += group_size; - right = temp; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_4_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLuint*)temp_index * percent; - } - } - - /* calculate the value for pixels in the last row */ - y_percent = highy_float; - percent = y_percent * (1-lowx_float); - temp = (const char *)datain + xindex + highy_int * ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_4_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLuint*)temp_index * percent; - } - } - for(l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += - __GLU_SWAP_4_BYTES(temp_index) * y_percent; - } else { - totals[k] += *(const GLuint*)temp_index * y_percent; - } - } - } - temp += group_size; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_4_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLuint*)temp_index * percent; - } - } - - /* calculate the value for pixels in the 1st and last column */ - for(m = lowy_int+1; m < highy_int; m++) { - left += ysize; - right += ysize; - for (k = 0; k < components; - k++, left += element_size, right += element_size) { - if (myswap_bytes) { - totals[k] += - __GLU_SWAP_4_BYTES(left) * (1-lowx_float) - + __GLU_SWAP_4_BYTES(right) * highx_float; - } else { - totals[k] += *(const GLuint*)left * (1-lowx_float) - + *(const GLuint*)right * highx_float; - } - } - } - } else if (highy_int > lowy_int) { - x_percent = highx_float - lowx_float; - percent = (1-lowy_float)*x_percent; - temp = (const char *)datain + xindex + lowy_int*ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_4_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLuint*)temp_index * percent; - } - } - for(m = lowy_int+1; m < highy_int; m++) { - temp += ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += - __GLU_SWAP_4_BYTES(temp_index) * x_percent; - } else { - totals[k] += *(const GLuint*)temp_index * x_percent; - } - } - } - percent = x_percent * highy_float; - temp += ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_4_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLuint*)temp_index * percent; - } - } - } else if (highx_int > lowx_int) { - y_percent = highy_float - lowy_float; - percent = (1-lowx_float)*y_percent; - - temp = (const char *)datain + xindex + lowy_int*ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_4_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLuint*)temp_index * percent; - } - } - for (l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += - __GLU_SWAP_4_BYTES(temp_index) * y_percent; - } else { - totals[k] += *(const GLuint*)temp_index * y_percent; - } - } - } - temp += group_size; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_4_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLuint*)temp_index * percent; - } - } - } else { - percent = (highy_float-lowy_float)*(highx_float-lowx_float); - temp = (const char *)datain + xindex + lowy_int * ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_4_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLuint*)temp_index * percent; - } - } - } - - /* this is for the pixels in the body */ - temp0 = (const char *)datain + xindex + group_size + - (lowy_int+1)*ysize; - for (m = lowy_int+1; m < highy_int; m++) { - temp = temp0; - for(l = lowx_int+1; l < highx_int; l++) { - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_4_BYTES(temp_index); - } else { - totals[k] += *(const GLuint*)temp_index; - } - } - temp += group_size; - } - temp0 += ysize; - } - - outindex = (j + (i * widthout)) * components; - for (k = 0; k < components; k++) { - /* clamp at UINT_MAX */ - float value= totals[k]/area; - if (value >= (float) UINT_MAX) { /* need '=' */ - dataout[outindex + k] = UINT_MAX; - } - else dataout[outindex + k] = value; - } - lowx_int = highx_int; - lowx_float = highx_float; - highx_int += convx_int; - highx_float += convx_float; - if(highx_float > 1) { - highx_float -= 1.0; - highx_int++; - } - } - lowy_int = highy_int; - lowy_float = highy_float; - highy_int += convy_int; - highy_float += convy_float; - if(highy_float > 1) { - highy_float -= 1.0; - highy_int++; - } - } -} - - - -static void scale_internal_int(GLint components, GLint widthin, - GLint heightin, const GLint *datain, - GLint widthout, GLint heightout, - GLint *dataout, GLint element_size, - GLint ysize, GLint group_size, - GLint myswap_bytes) -{ - float convx; - float convy; - float percent; - /* Max components in a format is 4, so... */ - float totals[4]; - float area; - int i,j,k,xindex; - - const char *temp, *temp0; - const char *temp_index; - int outindex; - - int lowx_int, highx_int, lowy_int, highy_int; - float x_percent, y_percent; - float lowx_float, highx_float, lowy_float, highy_float; - float convy_float, convx_float; - int convy_int, convx_int; - int l, m; - const char *left, *right; - - GLuint swapbuf; /* unsigned buffer */ - - if (widthin == widthout*2 && heightin == heightout*2) { - halveImage_int(components, widthin, heightin, - (const GLint *)datain, (GLint *)dataout, - element_size, ysize, group_size, myswap_bytes); - return; - } - convy = (float) heightin/heightout; - convx = (float) widthin/widthout; - convy_int = floor(convy); - convy_float = convy - convy_int; - convx_int = floor(convx); - convx_float = convx - convx_int; - - area = convx * convy; - - lowy_int = 0; - lowy_float = 0; - highy_int = convy_int; - highy_float = convy_float; - - for (i = 0; i < heightout; i++) { - /* Clamp here to be sure we don't read beyond input buffer. */ - if (highy_int >= heightin) - highy_int = heightin - 1; - lowx_int = 0; - lowx_float = 0; - highx_int = convx_int; - highx_float = convx_float; - - for (j = 0; j < widthout; j++) { - /* - ** Ok, now apply box filter to box that goes from (lowx, lowy) - ** to (highx, highy) on input data into this pixel on output - ** data. - */ - totals[0] = totals[1] = totals[2] = totals[3] = 0.0; - - /* calculate the value for pixels in the 1st row */ - xindex = lowx_int*group_size; - if((highy_int>lowy_int) && (highx_int>lowx_int)) { - - y_percent = 1-lowy_float; - temp = (const char *)datain + xindex + lowy_int * ysize; - percent = y_percent * (1-lowx_float); - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += *(const GLint*)&swapbuf * percent; - } else { - totals[k] += *(const GLint*)temp_index * percent; - } - } - left = temp; - for(l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += *(const GLint*)&swapbuf * y_percent; - } else { - totals[k] += *(const GLint*)temp_index * y_percent; - } - } - } - temp += group_size; - right = temp; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += *(const GLint*)&swapbuf * percent; - } else { - totals[k] += *(const GLint*)temp_index * percent; - } - } - - /* calculate the value for pixels in the last row */ - y_percent = highy_float; - percent = y_percent * (1-lowx_float); - temp = (const char *)datain + xindex + highy_int * ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += *(const GLint*)&swapbuf * percent; - } else { - totals[k] += *(const GLint*)temp_index * percent; - } - } - for(l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += *(const GLint*)&swapbuf * y_percent; - } else { - totals[k] += *(const GLint*)temp_index * y_percent; - } - } - } - temp += group_size; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += *(const GLint*)&swapbuf * percent; - } else { - totals[k] += *(const GLint*)temp_index * percent; - } - } - - /* calculate the value for pixels in the 1st and last column */ - for(m = lowy_int+1; m < highy_int; m++) { - left += ysize; - right += ysize; - for (k = 0; k < components; - k++, left += element_size, right += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_4_BYTES(left); - totals[k] += *(const GLint*)&swapbuf * (1-lowx_float); - swapbuf = __GLU_SWAP_4_BYTES(right); - totals[k] += *(const GLint*)&swapbuf * highx_float; - } else { - totals[k] += *(const GLint*)left * (1-lowx_float) - + *(const GLint*)right * highx_float; - } - } - } - } else if (highy_int > lowy_int) { - x_percent = highx_float - lowx_float; - percent = (1-lowy_float)*x_percent; - temp = (const char *)datain + xindex + lowy_int*ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += *(const GLint*)&swapbuf * percent; - } else { - totals[k] += *(const GLint*)temp_index * percent; - } - } - for(m = lowy_int+1; m < highy_int; m++) { - temp += ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += *(const GLint*)&swapbuf * x_percent; - } else { - totals[k] += *(const GLint*)temp_index * x_percent; - } - } - } - percent = x_percent * highy_float; - temp += ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += *(const GLint*)&swapbuf * percent; - } else { - totals[k] += *(const GLint*)temp_index * percent; - } - } - } else if (highx_int > lowx_int) { - y_percent = highy_float - lowy_float; - percent = (1-lowx_float)*y_percent; - - temp = (const char *)datain + xindex + lowy_int*ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += *(const GLint*)&swapbuf * percent; - } else { - totals[k] += *(const GLint*)temp_index * percent; - } - } - for (l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += *(const GLint*)&swapbuf * y_percent; - } else { - totals[k] += *(const GLint*)temp_index * y_percent; - } - } - } - temp += group_size; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += *(const GLint*)&swapbuf * percent; - } else { - totals[k] += *(const GLint*)temp_index * percent; - } - } - } else { - percent = (highy_float-lowy_float)*(highx_float-lowx_float); - temp = (const char *)datain + xindex + lowy_int * ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += *(const GLint*)&swapbuf * percent; - } else { - totals[k] += *(const GLint*)temp_index * percent; - } - } - } - - /* this is for the pixels in the body */ - temp0 = (const char *)datain + xindex + group_size + - (lowy_int+1)*ysize; - for (m = lowy_int+1; m < highy_int; m++) { - temp = temp0; - for(l = lowx_int+1; l < highx_int; l++) { - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += *(const GLint*)&swapbuf; - } else { - totals[k] += *(const GLint*)temp_index; - } - } - temp += group_size; - } - temp0 += ysize; - } - - outindex = (j + (i * widthout)) * components; - for (k = 0; k < components; k++) { - dataout[outindex + k] = totals[k]/area; - /*printf("totals[%d] = %f\n", k, totals[k]);*/ - } - lowx_int = highx_int; - lowx_float = highx_float; - highx_int += convx_int; - highx_float += convx_float; - if(highx_float > 1) { - highx_float -= 1.0; - highx_int++; - } - } - lowy_int = highy_int; - lowy_float = highy_float; - highy_int += convy_int; - highy_float += convy_float; - if(highy_float > 1) { - highy_float -= 1.0; - highy_int++; - } - } -} - - - -static void scale_internal_float(GLint components, GLint widthin, - GLint heightin, const GLfloat *datain, - GLint widthout, GLint heightout, - GLfloat *dataout, GLint element_size, - GLint ysize, GLint group_size, - GLint myswap_bytes) -{ - float convx; - float convy; - float percent; - /* Max components in a format is 4, so... */ - float totals[4]; - float area; - int i,j,k,xindex; - - const char *temp, *temp0; - const char *temp_index; - int outindex; - - int lowx_int, highx_int, lowy_int, highy_int; - float x_percent, y_percent; - float lowx_float, highx_float, lowy_float, highy_float; - float convy_float, convx_float; - int convy_int, convx_int; - int l, m; - const char *left, *right; - - union { GLuint b; GLfloat f; } swapbuf; - - if (widthin == widthout*2 && heightin == heightout*2) { - halveImage_float(components, widthin, heightin, - (const GLfloat *)datain, (GLfloat *)dataout, - element_size, ysize, group_size, myswap_bytes); - return; - } - convy = (float) heightin/heightout; - convx = (float) widthin/widthout; - convy_int = floor(convy); - convy_float = convy - convy_int; - convx_int = floor(convx); - convx_float = convx - convx_int; - - area = convx * convy; - - lowy_int = 0; - lowy_float = 0; - highy_int = convy_int; - highy_float = convy_float; - - for (i = 0; i < heightout; i++) { - /* Clamp here to be sure we don't read beyond input buffer. */ - if (highy_int >= heightin) - highy_int = heightin - 1; - lowx_int = 0; - lowx_float = 0; - highx_int = convx_int; - highx_float = convx_float; - - for (j = 0; j < widthout; j++) { - /* - ** Ok, now apply box filter to box that goes from (lowx, lowy) - ** to (highx, highy) on input data into this pixel on output - ** data. - */ - totals[0] = totals[1] = totals[2] = totals[3] = 0.0; - - /* calculate the value for pixels in the 1st row */ - xindex = lowx_int*group_size; - if((highy_int>lowy_int) && (highx_int>lowx_int)) { - - y_percent = 1-lowy_float; - temp = (const char *)datain + xindex + lowy_int * ysize; - percent = y_percent * (1-lowx_float); - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf.b = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += swapbuf.f * percent; - } else { - totals[k] += *(const GLfloat*)temp_index * percent; - } - } - left = temp; - for(l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf.b = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += swapbuf.f * y_percent; - } else { - totals[k] += *(const GLfloat*)temp_index * y_percent; - } - } - } - temp += group_size; - right = temp; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf.b = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += swapbuf.f * percent; - } else { - totals[k] += *(const GLfloat*)temp_index * percent; - } - } - - /* calculate the value for pixels in the last row */ - y_percent = highy_float; - percent = y_percent * (1-lowx_float); - temp = (const char *)datain + xindex + highy_int * ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf.b = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += swapbuf.f * percent; - } else { - totals[k] += *(const GLfloat*)temp_index * percent; - } - } - for(l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf.b = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += swapbuf.f * y_percent; - } else { - totals[k] += *(const GLfloat*)temp_index * y_percent; - } - } - } - temp += group_size; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf.b = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += swapbuf.f * percent; - } else { - totals[k] += *(const GLfloat*)temp_index * percent; - } - } - - /* calculate the value for pixels in the 1st and last column */ - for(m = lowy_int+1; m < highy_int; m++) { - left += ysize; - right += ysize; - for (k = 0; k < components; - k++, left += element_size, right += element_size) { - if (myswap_bytes) { - swapbuf.b = __GLU_SWAP_4_BYTES(left); - totals[k] += swapbuf.f * (1-lowx_float); - swapbuf.b = __GLU_SWAP_4_BYTES(right); - totals[k] += swapbuf.f * highx_float; - } else { - totals[k] += *(const GLfloat*)left * (1-lowx_float) - + *(const GLfloat*)right * highx_float; - } - } - } - } else if (highy_int > lowy_int) { - x_percent = highx_float - lowx_float; - percent = (1-lowy_float)*x_percent; - temp = (const char *)datain + xindex + lowy_int*ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf.b = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += swapbuf.f * percent; - } else { - totals[k] += *(const GLfloat*)temp_index * percent; - } - } - for(m = lowy_int+1; m < highy_int; m++) { - temp += ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf.b = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += swapbuf.f * x_percent; - } else { - totals[k] += *(const GLfloat*)temp_index * x_percent; - } - } - } - percent = x_percent * highy_float; - temp += ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf.b = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += swapbuf.f * percent; - } else { - totals[k] += *(const GLfloat*)temp_index * percent; - } - } - } else if (highx_int > lowx_int) { - y_percent = highy_float - lowy_float; - percent = (1-lowx_float)*y_percent; - - temp = (const char *)datain + xindex + lowy_int*ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf.b = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += swapbuf.f * percent; - } else { - totals[k] += *(const GLfloat*)temp_index * percent; - } - } - for (l = lowx_int+1; l < highx_int; l++) { - temp += group_size; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf.b = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += swapbuf.f * y_percent; - } else { - totals[k] += *(const GLfloat*)temp_index * y_percent; - } - } - } - temp += group_size; - percent = y_percent * highx_float; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf.b = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += swapbuf.f * percent; - } else { - totals[k] += *(const GLfloat*)temp_index * percent; - } - } - } else { - percent = (highy_float-lowy_float)*(highx_float-lowx_float); - temp = (const char *)datain + xindex + lowy_int * ysize; - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf.b = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += swapbuf.f * percent; - } else { - totals[k] += *(const GLfloat*)temp_index * percent; - } - } - } - - /* this is for the pixels in the body */ - temp0 = (const char *)datain + xindex + group_size + - (lowy_int+1)*ysize; - for (m = lowy_int+1; m < highy_int; m++) { - temp = temp0; - for(l = lowx_int+1; l < highx_int; l++) { - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - swapbuf.b = __GLU_SWAP_4_BYTES(temp_index); - totals[k] += swapbuf.f; - } else { - totals[k] += *(const GLfloat*)temp_index; - } - } - temp += group_size; - } - temp0 += ysize; - } - - outindex = (j + (i * widthout)) * components; - for (k = 0; k < components; k++) { - dataout[outindex + k] = totals[k]/area; - /*printf("totals[%d] = %f\n", k, totals[k]);*/ - } - lowx_int = highx_int; - lowx_float = highx_float; - highx_int += convx_int; - highx_float += convx_float; - if(highx_float > 1) { - highx_float -= 1.0; - highx_int++; - } - } - lowy_int = highy_int; - lowy_float = highy_float; - highy_int += convy_int; - highy_float += convy_float; - if(highy_float > 1) { - highy_float -= 1.0; - highy_int++; - } - } -} - -static int checkMipmapArgs(GLenum internalFormat, GLenum format, GLenum type) -{ - if (!legalFormat(format) || !legalType(type)) { - return GLU_INVALID_ENUM; - } - if (format == GL_STENCIL_INDEX) { - return GLU_INVALID_ENUM; - } - - if (!isLegalFormatForPackedPixelType(format, type)) { - return GLU_INVALID_OPERATION; - } - - return 0; -} /* checkMipmapArgs() */ - -static GLboolean legalFormat(GLenum format) -{ - switch(format) { - case GL_COLOR_INDEX: - case GL_STENCIL_INDEX: - case GL_DEPTH_COMPONENT: - case GL_RED: - case GL_GREEN: - case GL_BLUE: - case GL_ALPHA: - case GL_RGB: - case GL_RGBA: - case GL_LUMINANCE: - case GL_LUMINANCE_ALPHA: - case GL_BGR: - case GL_BGRA: - return GL_TRUE; - default: - return GL_FALSE; - } -} - - -static GLboolean legalType(GLenum type) -{ - switch(type) { - case GL_BITMAP: - case GL_BYTE: - case GL_UNSIGNED_BYTE: - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - return GL_TRUE; - default: - return GL_FALSE; - } -} - -/* */ -static GLboolean isTypePackedPixel(GLenum type) -{ - assert(legalType(type)); - - if (type == GL_UNSIGNED_BYTE_3_3_2 || - type == GL_UNSIGNED_BYTE_2_3_3_REV || - type == GL_UNSIGNED_SHORT_5_6_5 || - type == GL_UNSIGNED_SHORT_5_6_5_REV || - type == GL_UNSIGNED_SHORT_4_4_4_4 || - type == GL_UNSIGNED_SHORT_4_4_4_4_REV || - type == GL_UNSIGNED_SHORT_5_5_5_1 || - type == GL_UNSIGNED_SHORT_1_5_5_5_REV || - type == GL_UNSIGNED_INT_8_8_8_8 || - type == GL_UNSIGNED_INT_8_8_8_8_REV || - type == GL_UNSIGNED_INT_10_10_10_2 || - type == GL_UNSIGNED_INT_2_10_10_10_REV) { - return 1; - } - else return 0; -} /* isTypePackedPixel() */ - -/* Determines if the packed pixel type is compatible with the format */ -static GLboolean isLegalFormatForPackedPixelType(GLenum format, GLenum type) -{ - /* if not a packed pixel type then return true */ - if (!isTypePackedPixel(type)) { - return GL_TRUE; - } - - /* 3_3_2/2_3_3_REV & 5_6_5/5_6_5_REV are only compatible with RGB */ - if ((type == GL_UNSIGNED_BYTE_3_3_2 || type == GL_UNSIGNED_BYTE_2_3_3_REV|| - type == GL_UNSIGNED_SHORT_5_6_5|| type == GL_UNSIGNED_SHORT_5_6_5_REV) - && format != GL_RGB) - return GL_FALSE; - - /* 4_4_4_4/4_4_4_4_REV & 5_5_5_1/1_5_5_5_REV & 8_8_8_8/8_8_8_8_REV & - * 10_10_10_2/2_10_10_10_REV are only compatible with RGBA, BGRA & ABGR_EXT. - */ - if ((type == GL_UNSIGNED_SHORT_4_4_4_4 || - type == GL_UNSIGNED_SHORT_4_4_4_4_REV || - type == GL_UNSIGNED_SHORT_5_5_5_1 || - type == GL_UNSIGNED_SHORT_1_5_5_5_REV || - type == GL_UNSIGNED_INT_8_8_8_8 || - type == GL_UNSIGNED_INT_8_8_8_8_REV || - type == GL_UNSIGNED_INT_10_10_10_2 || - type == GL_UNSIGNED_INT_2_10_10_10_REV) && - (format != GL_RGBA && - format != GL_BGRA)) { - return GL_FALSE; - } - - return GL_TRUE; -} /* isLegalFormatForPackedPixelType() */ - -static GLboolean isLegalLevels(GLint userLevel,GLint baseLevel,GLint maxLevel, - GLint totalLevels) -{ - if (baseLevel < 0 || baseLevel < userLevel || maxLevel < baseLevel || - totalLevels < maxLevel) - return GL_FALSE; - else return GL_TRUE; -} /* isLegalLevels() */ - -/* Given user requested texture size, determine if it fits. If it - * doesn't then halve both sides and make the determination again - * until it does fit (for IR only). - * Note that proxy textures are not implemented in RE* even though - * they advertise the texture extension. - * Note that proxy textures are implemented but not according to spec in - * IMPACT*. - */ -static void closestFit(GLenum target, GLint width, GLint height, - GLint internalFormat, GLenum format, GLenum type, - GLint *newWidth, GLint *newHeight) -{ - /* Use proxy textures if OpenGL version is >= 1.1 */ - if ( (strtod((const char *)glGetString(GL_VERSION),NULL) >= 1.1) - ) { - GLint widthPowerOf2= nearestPower(width); - GLint heightPowerOf2= nearestPower(height); - GLint proxyWidth; - - do { - /* compute level 1 width & height, clamping each at 1 */ - GLint widthAtLevelOne= (widthPowerOf2 > 1) ? - widthPowerOf2 >> 1 : - widthPowerOf2; - GLint heightAtLevelOne= (heightPowerOf2 > 1) ? - heightPowerOf2 >> 1 : - heightPowerOf2; - GLenum proxyTarget; - assert(widthAtLevelOne > 0); assert(heightAtLevelOne > 0); - - /* does width x height at level 1 & all their mipmaps fit? */ - if (target == GL_TEXTURE_2D || target == GL_PROXY_TEXTURE_2D) { - proxyTarget = GL_PROXY_TEXTURE_2D; - glTexImage2D(proxyTarget, 1, /* must be non-zero */ - internalFormat, - widthAtLevelOne,heightAtLevelOne,0,format,type,NULL); - } else -#if defined(GL_ARB_texture_cube_map) - if ((target == GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB) || - (target == GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB) || - (target == GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB) || - (target == GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB) || - (target == GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB) || - (target == GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB)) { - proxyTarget = GL_PROXY_TEXTURE_CUBE_MAP_ARB; - glTexImage2D(proxyTarget, 1, /* must be non-zero */ - internalFormat, - widthAtLevelOne,heightAtLevelOne,0,format,type,NULL); - } else -#endif /* GL_ARB_texture_cube_map */ - { - assert(target == GL_TEXTURE_1D || target == GL_PROXY_TEXTURE_1D); - proxyTarget = GL_PROXY_TEXTURE_1D; - glTexImage1D(proxyTarget, 1, /* must be non-zero */ - internalFormat,widthAtLevelOne,0,format,type,NULL); - } - glGetTexLevelParameteriv(proxyTarget, 1,GL_TEXTURE_WIDTH,&proxyWidth); - /* does it fit??? */ - if (proxyWidth == 0) { /* nope, so try again with these sizes */ - if (widthPowerOf2 == 1 && heightPowerOf2 == 1) { - /* An 1x1 texture couldn't fit for some reason, so - * break out. This should never happen. But things - * happen. The disadvantage with this if-statement is - * that we will never be aware of when this happens - * since it will silently branch out. - */ - goto noProxyTextures; - } - widthPowerOf2= widthAtLevelOne; - heightPowerOf2= heightAtLevelOne; - } - /* else it does fit */ - } while (proxyWidth == 0); - /* loop must terminate! */ - - /* return the width & height at level 0 that fits */ - *newWidth= widthPowerOf2; - *newHeight= heightPowerOf2; -/*printf("Proxy Textures\n");*/ - } /* if gluCheckExtension() */ - else { /* no texture extension, so do this instead */ - GLint maxsize; - -noProxyTextures: - - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize); - /* clamp user's texture sizes to maximum sizes, if necessary */ - *newWidth = nearestPower(width); - if (*newWidth > maxsize) *newWidth = maxsize; - *newHeight = nearestPower(height); - if (*newHeight > maxsize) *newHeight = maxsize; -/*printf("NO proxy textures\n");*/ - } -} /* closestFit() */ - -GLint GLAPIENTRY -gluScaleImage(GLenum format, GLsizei widthin, GLsizei heightin, - GLenum typein, const void *datain, - GLsizei widthout, GLsizei heightout, GLenum typeout, - void *dataout) -{ - int components; - GLushort *beforeImage; - GLushort *afterImage; - PixelStorageModes psm; - - if (widthin == 0 || heightin == 0 || widthout == 0 || heightout == 0) { - return 0; - } - if (widthin < 0 || heightin < 0 || widthout < 0 || heightout < 0) { - return GLU_INVALID_VALUE; - } - if (!legalFormat(format) || !legalType(typein) || !legalType(typeout)) { - return GLU_INVALID_ENUM; - } - if (!isLegalFormatForPackedPixelType(format, typein)) { - return GLU_INVALID_OPERATION; - } - if (!isLegalFormatForPackedPixelType(format, typeout)) { - return GLU_INVALID_OPERATION; - } - beforeImage = - malloc(image_size(widthin, heightin, format, GL_UNSIGNED_SHORT)); - afterImage = - malloc(image_size(widthout, heightout, format, GL_UNSIGNED_SHORT)); - if (beforeImage == NULL || afterImage == NULL) { - return GLU_OUT_OF_MEMORY; - } - - retrieveStoreModes(&psm); - fill_image(&psm,widthin, heightin, format, typein, is_index(format), - datain, beforeImage); - components = elements_per_group(format, 0); - scale_internal(components, widthin, heightin, beforeImage, - widthout, heightout, afterImage); - empty_image(&psm,widthout, heightout, format, typeout, - is_index(format), afterImage, dataout); - free((GLbyte *) beforeImage); - free((GLbyte *) afterImage); - - return 0; -} - -int gluBuild1DMipmapLevelsCore(GLenum target, GLint internalFormat, - GLsizei width, - GLsizei widthPowerOf2, - GLenum format, GLenum type, - GLint userLevel, GLint baseLevel,GLint maxLevel, - const void *data) -{ - GLint newwidth; - GLint level, levels; - GLushort *newImage; - GLint newImage_width; - GLushort *otherImage; - GLushort *imageTemp; - GLint memreq; - GLint cmpts; - PixelStorageModes psm; - - assert(checkMipmapArgs(internalFormat,format,type) == 0); - assert(width >= 1); - - otherImage = NULL; - - newwidth= widthPowerOf2; - levels = computeLog(newwidth); - - levels+= userLevel; - - retrieveStoreModes(&psm); - newImage = (GLushort *) - malloc(image_size(width, 1, format, GL_UNSIGNED_SHORT)); - newImage_width = width; - if (newImage == NULL) { - return GLU_OUT_OF_MEMORY; - } - fill_image(&psm,width, 1, format, type, is_index(format), - data, newImage); - cmpts = elements_per_group(format,type); - glPixelStorei(GL_UNPACK_ALIGNMENT, 2); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - /* - ** If swap_bytes was set, swapping occurred in fill_image. - */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); - - for (level = userLevel; level <= levels; level++) { - if (newImage_width == newwidth) { - /* Use newImage for this level */ - if (baseLevel <= level && level <= maxLevel) { - glTexImage1D(target, level, internalFormat, newImage_width, - 0, format, GL_UNSIGNED_SHORT, (void *) newImage); - } - } else { - if (otherImage == NULL) { - memreq = image_size(newwidth, 1, format, GL_UNSIGNED_SHORT); - otherImage = (GLushort *) malloc(memreq); - if (otherImage == NULL) { - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS,psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - return GLU_OUT_OF_MEMORY; - } - } - scale_internal(cmpts, newImage_width, 1, newImage, - newwidth, 1, otherImage); - /* Swap newImage and otherImage */ - imageTemp = otherImage; - otherImage = newImage; - newImage = imageTemp; - - newImage_width = newwidth; - if (baseLevel <= level && level <= maxLevel) { - glTexImage1D(target, level, internalFormat, newImage_width, - 0, format, GL_UNSIGNED_SHORT, (void *) newImage); - } - } - if (newwidth > 1) newwidth /= 2; - } - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - - free((GLbyte *) newImage); - if (otherImage) { - free((GLbyte *) otherImage); - } - return 0; -} - -GLint GLAPIENTRY -gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, - GLsizei width, - GLenum format, GLenum type, - GLint userLevel, GLint baseLevel, GLint maxLevel, - const void *data) -{ - int levels; - - int rc= checkMipmapArgs(internalFormat,format,type); - if (rc != 0) return rc; - - if (width < 1) { - return GLU_INVALID_VALUE; - } - - levels = computeLog(width); - - levels+= userLevel; - if (!isLegalLevels(userLevel,baseLevel,maxLevel,levels)) - return GLU_INVALID_VALUE; - - return gluBuild1DMipmapLevelsCore(target, internalFormat, - width, - width,format, type, - userLevel, baseLevel, maxLevel, - data); -} /* gluBuild1DMipmapLevels() */ - -GLint GLAPIENTRY -gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, - GLenum format, GLenum type, - const void *data) -{ - GLint widthPowerOf2; - int levels; - GLint dummy; - - int rc= checkMipmapArgs(internalFormat,format,type); - if (rc != 0) return rc; - - if (width < 1) { - return GLU_INVALID_VALUE; - } - - closestFit(target,width,1,internalFormat,format,type,&widthPowerOf2,&dummy); - levels = computeLog(widthPowerOf2); - - return gluBuild1DMipmapLevelsCore(target,internalFormat, - width, - widthPowerOf2, - format,type,0,0,levels,data); -} - -static int bitmapBuild2DMipmaps(GLenum target, GLint internalFormat, - GLint width, GLint height, GLenum format, - GLenum type, const void *data) -{ - GLint newwidth, newheight; - GLint level, levels; - GLushort *newImage; - GLint newImage_width; - GLint newImage_height; - GLushort *otherImage; - GLushort *imageTemp; - GLint memreq; - GLint cmpts; - PixelStorageModes psm; - - retrieveStoreModes(&psm); - -#if 0 - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize); - newwidth = nearestPower(width); - if (newwidth > maxsize) newwidth = maxsize; - newheight = nearestPower(height); - if (newheight > maxsize) newheight = maxsize; -#else - closestFit(target,width,height,internalFormat,format,type, - &newwidth,&newheight); -#endif - levels = computeLog(newwidth); - level = computeLog(newheight); - if (level > levels) levels=level; - - otherImage = NULL; - newImage = (GLushort *) - malloc(image_size(width, height, format, GL_UNSIGNED_SHORT)); - newImage_width = width; - newImage_height = height; - if (newImage == NULL) { - return GLU_OUT_OF_MEMORY; - } - - fill_image(&psm,width, height, format, type, is_index(format), - data, newImage); - - cmpts = elements_per_group(format,type); - glPixelStorei(GL_UNPACK_ALIGNMENT, 2); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - /* - ** If swap_bytes was set, swapping occurred in fill_image. - */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); - - for (level = 0; level <= levels; level++) { - if (newImage_width == newwidth && newImage_height == newheight) { /* Use newImage for this level */ - glTexImage2D(target, level, internalFormat, newImage_width, - newImage_height, 0, format, GL_UNSIGNED_SHORT, - (void *) newImage); - } else { - if (otherImage == NULL) { - memreq = - image_size(newwidth, newheight, format, GL_UNSIGNED_SHORT); - otherImage = (GLushort *) malloc(memreq); - if (otherImage == NULL) { - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS,psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - return GLU_OUT_OF_MEMORY; - } - } - scale_internal(cmpts, newImage_width, newImage_height, newImage, - newwidth, newheight, otherImage); - /* Swap newImage and otherImage */ - imageTemp = otherImage; - otherImage = newImage; - newImage = imageTemp; - - newImage_width = newwidth; - newImage_height = newheight; - glTexImage2D(target, level, internalFormat, newImage_width, - newImage_height, 0, format, GL_UNSIGNED_SHORT, - (void *) newImage); - } - if (newwidth > 1) newwidth /= 2; - if (newheight > 1) newheight /= 2; - } - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - - free((GLbyte *) newImage); - if (otherImage) { - free((GLbyte *) otherImage); - } - return 0; -} - -/* To make swapping images less error prone */ -#define __GLU_INIT_SWAP_IMAGE void *tmpImage -#define __GLU_SWAP_IMAGE(a,b) tmpImage = a; a = b; b = tmpImage; - -static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat, - GLsizei width, GLsizei height, - GLsizei widthPowerOf2, - GLsizei heightPowerOf2, - GLenum format, GLenum type, - GLint userLevel, - GLint baseLevel,GLint maxLevel, - const void *data) -{ - GLint newwidth, newheight; - GLint level, levels; - const void *usersImage; /* passed from user. Don't touch! */ - void *srcImage, *dstImage; /* scratch area to build mipmapped images */ - __GLU_INIT_SWAP_IMAGE; - GLint memreq; - GLint cmpts; - - GLint myswap_bytes, groups_per_line, element_size, group_size; - GLint rowsize, padding; - PixelStorageModes psm; - - assert(checkMipmapArgs(internalFormat,format,type) == 0); - assert(width >= 1 && height >= 1); - - if(type == GL_BITMAP) { - return bitmapBuild2DMipmaps(target, internalFormat, width, height, - format, type, data); - } - - srcImage = dstImage = NULL; - - newwidth= widthPowerOf2; - newheight= heightPowerOf2; - levels = computeLog(newwidth); - level = computeLog(newheight); - if (level > levels) levels=level; - - levels+= userLevel; - - retrieveStoreModes(&psm); - myswap_bytes = psm.unpack_swap_bytes; - cmpts = elements_per_group(format,type); - if (psm.unpack_row_length > 0) { - groups_per_line = psm.unpack_row_length; - } else { - groups_per_line = width; - } - - element_size = bytes_per_element(type); - group_size = element_size * cmpts; - if (element_size == 1) myswap_bytes = 0; - - rowsize = groups_per_line * group_size; - padding = (rowsize % psm.unpack_alignment); - if (padding) { - rowsize += psm.unpack_alignment - padding; - } - usersImage = (const GLubyte *) data + psm.unpack_skip_rows * rowsize + - psm.unpack_skip_pixels * group_size; - - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - - level = userLevel; - - /* already power-of-two square */ - if (width == newwidth && height == newheight) { - /* Use usersImage for level userLevel */ - if (baseLevel <= level && level <= maxLevel) { - glTexImage2D(target, level, internalFormat, width, - height, 0, format, type, - usersImage); - } - if(levels == 0) { /* we're done. clean up and return */ - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - return 0; - } - { - int nextWidth= newwidth/2; - int nextHeight= newheight/2; - - /* clamp to 1 */ - if (nextWidth < 1) nextWidth= 1; - if (nextHeight < 1) nextHeight= 1; - memreq = image_size(nextWidth, nextHeight, format, type); - } - - switch(type) { - case GL_UNSIGNED_BYTE: - dstImage = (GLubyte *)malloc(memreq); - break; - case GL_BYTE: - dstImage = (GLbyte *)malloc(memreq); - break; - case GL_UNSIGNED_SHORT: - dstImage = (GLushort *)malloc(memreq); - break; - case GL_SHORT: - dstImage = (GLshort *)malloc(memreq); - break; - case GL_UNSIGNED_INT: - dstImage = (GLuint *)malloc(memreq); - break; - case GL_INT: - dstImage = (GLint *)malloc(memreq); - break; - case GL_FLOAT: - dstImage = (GLfloat *)malloc(memreq); - break; - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - dstImage = (GLubyte *)malloc(memreq); - break; - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - dstImage = (GLushort *)malloc(memreq); - break; - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - dstImage = (GLuint *)malloc(memreq); - break; - default: - return GLU_INVALID_ENUM; - } - if (dstImage == NULL) { - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - return GLU_OUT_OF_MEMORY; - } - else - switch(type) { - case GL_UNSIGNED_BYTE: - halveImage_ubyte(cmpts, width, height, - (const GLubyte *)usersImage, (GLubyte *)dstImage, - element_size, rowsize, group_size); - break; - case GL_BYTE: - halveImage_byte(cmpts, width, height, - (const GLbyte *)usersImage, (GLbyte *)dstImage, - element_size, rowsize, group_size); - break; - case GL_UNSIGNED_SHORT: - halveImage_ushort(cmpts, width, height, - (const GLushort *)usersImage, (GLushort *)dstImage, - element_size, rowsize, group_size, myswap_bytes); - break; - case GL_SHORT: - halveImage_short(cmpts, width, height, - (const GLshort *)usersImage, (GLshort *)dstImage, - element_size, rowsize, group_size, myswap_bytes); - break; - case GL_UNSIGNED_INT: - halveImage_uint(cmpts, width, height, - (const GLuint *)usersImage, (GLuint *)dstImage, - element_size, rowsize, group_size, myswap_bytes); - break; - case GL_INT: - halveImage_int(cmpts, width, height, - (const GLint *)usersImage, (GLint *)dstImage, - element_size, rowsize, group_size, myswap_bytes); - break; - case GL_FLOAT: - halveImage_float(cmpts, width, height, - (const GLfloat *)usersImage, (GLfloat *)dstImage, - element_size, rowsize, group_size, myswap_bytes); - break; - case GL_UNSIGNED_BYTE_3_3_2: - assert(format == GL_RGB); - halveImagePackedPixel(3,extract332,shove332, - width,height,usersImage,dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_BYTE_2_3_3_REV: - assert(format == GL_RGB); - halveImagePackedPixel(3,extract233rev,shove233rev, - width,height,usersImage,dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_SHORT_5_6_5: - halveImagePackedPixel(3,extract565,shove565, - width,height,usersImage,dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_SHORT_5_6_5_REV: - halveImagePackedPixel(3,extract565rev,shove565rev, - width,height,usersImage,dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_SHORT_4_4_4_4: - halveImagePackedPixel(4,extract4444,shove4444, - width,height,usersImage,dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - halveImagePackedPixel(4,extract4444rev,shove4444rev, - width,height,usersImage,dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_SHORT_5_5_5_1: - halveImagePackedPixel(4,extract5551,shove5551, - width,height,usersImage,dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - halveImagePackedPixel(4,extract1555rev,shove1555rev, - width,height,usersImage,dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_INT_8_8_8_8: - halveImagePackedPixel(4,extract8888,shove8888, - width,height,usersImage,dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_INT_8_8_8_8_REV: - halveImagePackedPixel(4,extract8888rev,shove8888rev, - width,height,usersImage,dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_INT_10_10_10_2: - halveImagePackedPixel(4,extract1010102,shove1010102, - width,height,usersImage,dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_INT_2_10_10_10_REV: - halveImagePackedPixel(4,extract2101010rev,shove2101010rev, - width,height,usersImage,dstImage, - element_size,rowsize,myswap_bytes); - break; - default: - assert(0); - break; - } - newwidth = width/2; - newheight = height/2; - /* clamp to 1 */ - if (newwidth < 1) newwidth= 1; - if (newheight < 1) newheight= 1; - - myswap_bytes = 0; - rowsize = newwidth * group_size; - memreq = image_size(newwidth, newheight, format, type); - /* Swap srcImage and dstImage */ - __GLU_SWAP_IMAGE(srcImage,dstImage); - switch(type) { - case GL_UNSIGNED_BYTE: - dstImage = (GLubyte *)malloc(memreq); - break; - case GL_BYTE: - dstImage = (GLbyte *)malloc(memreq); - break; - case GL_UNSIGNED_SHORT: - dstImage = (GLushort *)malloc(memreq); - break; - case GL_SHORT: - dstImage = (GLshort *)malloc(memreq); - break; - case GL_UNSIGNED_INT: - dstImage = (GLuint *)malloc(memreq); - break; - case GL_INT: - dstImage = (GLint *)malloc(memreq); - break; - case GL_FLOAT: - dstImage = (GLfloat *)malloc(memreq); - break; - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - dstImage = (GLubyte *)malloc(memreq); - break; - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - dstImage = (GLushort *)malloc(memreq); - break; - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - dstImage = (GLuint *)malloc(memreq); - break; - default: - return GLU_INVALID_ENUM; - } - if (dstImage == NULL) { - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - return GLU_OUT_OF_MEMORY; - } - /* level userLevel+1 is in srcImage; level userLevel already saved */ - level = userLevel+1; - } else { /* user's image is *not* nice power-of-2 sized square */ - memreq = image_size(newwidth, newheight, format, type); - switch(type) { - case GL_UNSIGNED_BYTE: - dstImage = (GLubyte *)malloc(memreq); - break; - case GL_BYTE: - dstImage = (GLbyte *)malloc(memreq); - break; - case GL_UNSIGNED_SHORT: - dstImage = (GLushort *)malloc(memreq); - break; - case GL_SHORT: - dstImage = (GLshort *)malloc(memreq); - break; - case GL_UNSIGNED_INT: - dstImage = (GLuint *)malloc(memreq); - break; - case GL_INT: - dstImage = (GLint *)malloc(memreq); - break; - case GL_FLOAT: - dstImage = (GLfloat *)malloc(memreq); - break; - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - dstImage = (GLubyte *)malloc(memreq); - break; - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - dstImage = (GLushort *)malloc(memreq); - break; - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - dstImage = (GLuint *)malloc(memreq); - break; - default: - return GLU_INVALID_ENUM; - } - - if (dstImage == NULL) { - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - return GLU_OUT_OF_MEMORY; - } - - switch(type) { - case GL_UNSIGNED_BYTE: - scale_internal_ubyte(cmpts, width, height, - (const GLubyte *)usersImage, newwidth, newheight, - (GLubyte *)dstImage, element_size, - rowsize, group_size); - break; - case GL_BYTE: - scale_internal_byte(cmpts, width, height, - (const GLbyte *)usersImage, newwidth, newheight, - (GLbyte *)dstImage, element_size, - rowsize, group_size); - break; - case GL_UNSIGNED_SHORT: - scale_internal_ushort(cmpts, width, height, - (const GLushort *)usersImage, newwidth, newheight, - (GLushort *)dstImage, element_size, - rowsize, group_size, myswap_bytes); - break; - case GL_SHORT: - scale_internal_short(cmpts, width, height, - (const GLshort *)usersImage, newwidth, newheight, - (GLshort *)dstImage, element_size, - rowsize, group_size, myswap_bytes); - break; - case GL_UNSIGNED_INT: - scale_internal_uint(cmpts, width, height, - (const GLuint *)usersImage, newwidth, newheight, - (GLuint *)dstImage, element_size, - rowsize, group_size, myswap_bytes); - break; - case GL_INT: - scale_internal_int(cmpts, width, height, - (const GLint *)usersImage, newwidth, newheight, - (GLint *)dstImage, element_size, - rowsize, group_size, myswap_bytes); - break; - case GL_FLOAT: - scale_internal_float(cmpts, width, height, - (const GLfloat *)usersImage, newwidth, newheight, - (GLfloat *)dstImage, element_size, - rowsize, group_size, myswap_bytes); - break; - case GL_UNSIGNED_BYTE_3_3_2: - scaleInternalPackedPixel(3,extract332,shove332, - width, height,usersImage, - newwidth,newheight,(void *)dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_BYTE_2_3_3_REV: - scaleInternalPackedPixel(3,extract233rev,shove233rev, - width, height,usersImage, - newwidth,newheight,(void *)dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_SHORT_5_6_5: - scaleInternalPackedPixel(3,extract565,shove565, - width, height,usersImage, - newwidth,newheight,(void *)dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_SHORT_5_6_5_REV: - scaleInternalPackedPixel(3,extract565rev,shove565rev, - width, height,usersImage, - newwidth,newheight,(void *)dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_SHORT_4_4_4_4: - scaleInternalPackedPixel(4,extract4444,shove4444, - width, height,usersImage, - newwidth,newheight,(void *)dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - scaleInternalPackedPixel(4,extract4444rev,shove4444rev, - width, height,usersImage, - newwidth,newheight,(void *)dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_SHORT_5_5_5_1: - scaleInternalPackedPixel(4,extract5551,shove5551, - width, height,usersImage, - newwidth,newheight,(void *)dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - scaleInternalPackedPixel(4,extract1555rev,shove1555rev, - width, height,usersImage, - newwidth,newheight,(void *)dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_INT_8_8_8_8: - scaleInternalPackedPixel(4,extract8888,shove8888, - width, height,usersImage, - newwidth,newheight,(void *)dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_INT_8_8_8_8_REV: - scaleInternalPackedPixel(4,extract8888rev,shove8888rev, - width, height,usersImage, - newwidth,newheight,(void *)dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_INT_10_10_10_2: - scaleInternalPackedPixel(4,extract1010102,shove1010102, - width, height,usersImage, - newwidth,newheight,(void *)dstImage, - element_size,rowsize,myswap_bytes); - break; - case GL_UNSIGNED_INT_2_10_10_10_REV: - scaleInternalPackedPixel(4,extract2101010rev,shove2101010rev, - width, height,usersImage, - newwidth,newheight,(void *)dstImage, - element_size,rowsize,myswap_bytes); - break; - default: - assert(0); - break; - } - myswap_bytes = 0; - rowsize = newwidth * group_size; - /* Swap dstImage and srcImage */ - __GLU_SWAP_IMAGE(srcImage,dstImage); - - if(levels != 0) { /* use as little memory as possible */ - { - int nextWidth= newwidth/2; - int nextHeight= newheight/2; - if (nextWidth < 1) nextWidth= 1; - if (nextHeight < 1) nextHeight= 1; - - memreq = image_size(nextWidth, nextHeight, format, type); - } - - switch(type) { - case GL_UNSIGNED_BYTE: - dstImage = (GLubyte *)malloc(memreq); - break; - case GL_BYTE: - dstImage = (GLbyte *)malloc(memreq); - break; - case GL_UNSIGNED_SHORT: - dstImage = (GLushort *)malloc(memreq); - break; - case GL_SHORT: - dstImage = (GLshort *)malloc(memreq); - break; - case GL_UNSIGNED_INT: - dstImage = (GLuint *)malloc(memreq); - break; - case GL_INT: - dstImage = (GLint *)malloc(memreq); - break; - case GL_FLOAT: - dstImage = (GLfloat *)malloc(memreq); - break; - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - dstImage = (GLubyte *)malloc(memreq); - break; - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - dstImage = (GLushort *)malloc(memreq); - break; - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - dstImage = (GLuint *)malloc(memreq); - break; - default: - return GLU_INVALID_ENUM; - } - if (dstImage == NULL) { - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - return GLU_OUT_OF_MEMORY; - } - } - /* level userLevel is in srcImage; nothing saved yet */ - level = userLevel; - } - - glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); - if (baseLevel <= level && level <= maxLevel) { - glTexImage2D(target, level, internalFormat, newwidth, newheight, 0, - format, type, (void *)srcImage); - } - - level++; /* update current level for the loop */ - for (; level <= levels; level++) { - switch(type) { - case GL_UNSIGNED_BYTE: - halveImage_ubyte(cmpts, newwidth, newheight, - (GLubyte *)srcImage, (GLubyte *)dstImage, element_size, - rowsize, group_size); - break; - case GL_BYTE: - halveImage_byte(cmpts, newwidth, newheight, - (GLbyte *)srcImage, (GLbyte *)dstImage, element_size, - rowsize, group_size); - break; - case GL_UNSIGNED_SHORT: - halveImage_ushort(cmpts, newwidth, newheight, - (GLushort *)srcImage, (GLushort *)dstImage, element_size, - rowsize, group_size, myswap_bytes); - break; - case GL_SHORT: - halveImage_short(cmpts, newwidth, newheight, - (GLshort *)srcImage, (GLshort *)dstImage, element_size, - rowsize, group_size, myswap_bytes); - break; - case GL_UNSIGNED_INT: - halveImage_uint(cmpts, newwidth, newheight, - (GLuint *)srcImage, (GLuint *)dstImage, element_size, - rowsize, group_size, myswap_bytes); - break; - case GL_INT: - halveImage_int(cmpts, newwidth, newheight, - (GLint *)srcImage, (GLint *)dstImage, element_size, - rowsize, group_size, myswap_bytes); - break; - case GL_FLOAT: - halveImage_float(cmpts, newwidth, newheight, - (GLfloat *)srcImage, (GLfloat *)dstImage, element_size, - rowsize, group_size, myswap_bytes); - break; - case GL_UNSIGNED_BYTE_3_3_2: - halveImagePackedPixel(3,extract332,shove332, - newwidth,newheight, - srcImage,dstImage,element_size,rowsize, - myswap_bytes); - break; - case GL_UNSIGNED_BYTE_2_3_3_REV: - halveImagePackedPixel(3,extract233rev,shove233rev, - newwidth,newheight, - srcImage,dstImage,element_size,rowsize, - myswap_bytes); - break; - case GL_UNSIGNED_SHORT_5_6_5: - halveImagePackedPixel(3,extract565,shove565, - newwidth,newheight, - srcImage,dstImage,element_size,rowsize, - myswap_bytes); - break; - case GL_UNSIGNED_SHORT_5_6_5_REV: - halveImagePackedPixel(3,extract565rev,shove565rev, - newwidth,newheight, - srcImage,dstImage,element_size,rowsize, - myswap_bytes); - break; - case GL_UNSIGNED_SHORT_4_4_4_4: - halveImagePackedPixel(4,extract4444,shove4444, - newwidth,newheight, - srcImage,dstImage,element_size,rowsize, - myswap_bytes); - break; - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - halveImagePackedPixel(4,extract4444rev,shove4444rev, - newwidth,newheight, - srcImage,dstImage,element_size,rowsize, - myswap_bytes); - break; - case GL_UNSIGNED_SHORT_5_5_5_1: - halveImagePackedPixel(4,extract5551,shove5551, - newwidth,newheight, - srcImage,dstImage,element_size,rowsize, - myswap_bytes); - break; - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - halveImagePackedPixel(4,extract1555rev,shove1555rev, - newwidth,newheight, - srcImage,dstImage,element_size,rowsize, - myswap_bytes); - break; - case GL_UNSIGNED_INT_8_8_8_8: - halveImagePackedPixel(4,extract8888,shove8888, - newwidth,newheight, - srcImage,dstImage,element_size,rowsize, - myswap_bytes); - break; - case GL_UNSIGNED_INT_8_8_8_8_REV: - halveImagePackedPixel(4,extract8888rev,shove8888rev, - newwidth,newheight, - srcImage,dstImage,element_size,rowsize, - myswap_bytes); - break; - case GL_UNSIGNED_INT_10_10_10_2: - halveImagePackedPixel(4,extract1010102,shove1010102, - newwidth,newheight, - srcImage,dstImage,element_size,rowsize, - myswap_bytes); - break; - case GL_UNSIGNED_INT_2_10_10_10_REV: - halveImagePackedPixel(4,extract2101010rev,shove2101010rev, - newwidth,newheight, - srcImage,dstImage,element_size,rowsize, - myswap_bytes); - break; - default: - assert(0); - break; - } - - __GLU_SWAP_IMAGE(srcImage,dstImage); - - if (newwidth > 1) { newwidth /= 2; rowsize /= 2;} - if (newheight > 1) newheight /= 2; - { - /* compute amount to pad per row, if any */ - int rowPad= rowsize % psm.unpack_alignment; - - /* should row be padded? */ - if (rowPad == 0) { /* nope, row should not be padded */ - /* call tex image with srcImage untouched since it's not padded */ - if (baseLevel <= level && level <= maxLevel) { - glTexImage2D(target, level, internalFormat, newwidth, newheight, 0, - format, type, (void *) srcImage); - } - } - else { /* yes, row should be padded */ - /* compute length of new row in bytes, including padding */ - int newRowLength= rowsize + psm.unpack_alignment - rowPad; - int ii; unsigned char *dstTrav, *srcTrav; /* indices for copying */ - - /* allocate new image for mipmap of size newRowLength x newheight */ - void *newMipmapImage= malloc((size_t) (newRowLength*newheight)); - if (newMipmapImage == NULL) { - /* out of memory so return */ - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - return GLU_OUT_OF_MEMORY; - } - - /* copy image from srcImage into newMipmapImage by rows */ - for (ii= 0, - dstTrav= (unsigned char *) newMipmapImage, - srcTrav= (unsigned char *) srcImage; - ii< newheight; - ii++, - dstTrav+= newRowLength, /* make sure the correct distance... */ - srcTrav+= rowsize) { /* ...is skipped */ - memcpy(dstTrav,srcTrav,rowsize); - /* note that the pad bytes are not visited and will contain - * garbage, which is ok. - */ - } - - /* ...and use this new image for mipmapping instead */ - if (baseLevel <= level && level <= maxLevel) { - glTexImage2D(target, level, internalFormat, newwidth, newheight, 0, - format, type, newMipmapImage); - } - free(newMipmapImage); /* don't forget to free it! */ - } /* else */ - } - } /* for level */ - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - - free(srcImage); /*if you get to here, a srcImage has always been malloc'ed*/ - if (dstImage) { /* if it's non-rectangular and only 1 level */ - free(dstImage); - } - return 0; -} /* gluBuild2DMipmapLevelsCore() */ - -GLint GLAPIENTRY -gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - GLint userLevel, GLint baseLevel, GLint maxLevel, - const void *data) -{ - int level, levels; - - int rc= checkMipmapArgs(internalFormat,format,type); - if (rc != 0) return rc; - - if (width < 1 || height < 1) { - return GLU_INVALID_VALUE; - } - - levels = computeLog(width); - level = computeLog(height); - if (level > levels) levels=level; - - levels+= userLevel; - if (!isLegalLevels(userLevel,baseLevel,maxLevel,levels)) - return GLU_INVALID_VALUE; - - return gluBuild2DMipmapLevelsCore(target, internalFormat, - width, height, - width, height, - format, type, - userLevel, baseLevel, maxLevel, - data); -} /* gluBuild2DMipmapLevels() */ - -GLint GLAPIENTRY -gluBuild2DMipmaps(GLenum target, GLint internalFormat, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const void *data) -{ - GLint widthPowerOf2, heightPowerOf2; - int level, levels; - - int rc= checkMipmapArgs(internalFormat,format,type); - if (rc != 0) return rc; - - if (width < 1 || height < 1) { - return GLU_INVALID_VALUE; - } - - closestFit(target,width,height,internalFormat,format,type, - &widthPowerOf2,&heightPowerOf2); - - levels = computeLog(widthPowerOf2); - level = computeLog(heightPowerOf2); - if (level > levels) levels=level; - - return gluBuild2DMipmapLevelsCore(target,internalFormat, - width, height, - widthPowerOf2,heightPowerOf2, - format,type, - 0,0,levels,data); -} /* gluBuild2DMipmaps() */ - -#if 0 -/* -** This routine is for the limited case in which -** type == GL_UNSIGNED_BYTE && format != index && -** unpack_alignment = 1 && unpack_swap_bytes == false -** -** so all of the work data can be kept as ubytes instead of shorts. -*/ -static int fastBuild2DMipmaps(const PixelStorageModes *psm, - GLenum target, GLint components, GLint width, - GLint height, GLenum format, - GLenum type, void *data) -{ - GLint newwidth, newheight; - GLint level, levels; - GLubyte *newImage; - GLint newImage_width; - GLint newImage_height; - GLubyte *otherImage; - GLubyte *imageTemp; - GLint memreq; - GLint cmpts; - - -#if 0 - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize); - newwidth = nearestPower(width); - if (newwidth > maxsize) newwidth = maxsize; - newheight = nearestPower(height); - if (newheight > maxsize) newheight = maxsize; -#else - closestFit(target,width,height,components,format,type, - &newwidth,&newheight); -#endif - levels = computeLog(newwidth); - level = computeLog(newheight); - if (level > levels) levels=level; - - cmpts = elements_per_group(format,type); - - otherImage = NULL; - /** - ** No need to copy the user data if its in the packed correctly. - ** Make sure that later routines don't change that data. - */ - if (psm->unpack_skip_rows == 0 && psm->unpack_skip_pixels == 0) { - newImage = (GLubyte *)data; - newImage_width = width; - newImage_height = height; - } else { - GLint rowsize; - GLint groups_per_line; - GLint elements_per_line; - const GLubyte *start; - const GLubyte *iter; - GLubyte *iter2; - GLint i, j; - - newImage = (GLubyte *) - malloc(image_size(width, height, format, GL_UNSIGNED_BYTE)); - newImage_width = width; - newImage_height = height; - if (newImage == NULL) { - return GLU_OUT_OF_MEMORY; - } - - /* - ** Abbreviated version of fill_image for this restricted case. - */ - if (psm->unpack_row_length > 0) { - groups_per_line = psm->unpack_row_length; - } else { - groups_per_line = width; - } - rowsize = groups_per_line * cmpts; - elements_per_line = width * cmpts; - start = (const GLubyte *) data + psm->unpack_skip_rows * rowsize + - psm->unpack_skip_pixels * cmpts; - iter2 = newImage; - - for (i = 0; i < height; i++) { - iter = start; - for (j = 0; j < elements_per_line; j++) { - *iter2 = *iter; - iter++; - iter2++; - } - start += rowsize; - } - } - - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); - - for (level = 0; level <= levels; level++) { - if (newImage_width == newwidth && newImage_height == newheight) { - /* Use newImage for this level */ - glTexImage2D(target, level, components, newImage_width, - newImage_height, 0, format, GL_UNSIGNED_BYTE, - (void *) newImage); - } else { - if (otherImage == NULL) { - memreq = - image_size(newwidth, newheight, format, GL_UNSIGNED_BYTE); - otherImage = (GLubyte *) malloc(memreq); - if (otherImage == NULL) { - glPixelStorei(GL_UNPACK_ALIGNMENT, psm->unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm->unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm->unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH,psm->unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES,psm->unpack_swap_bytes); - return GLU_OUT_OF_MEMORY; - } - } -/* - scale_internal_ubyte(cmpts, newImage_width, newImage_height, - newImage, newwidth, newheight, otherImage); -*/ - /* Swap newImage and otherImage */ - imageTemp = otherImage; - otherImage = newImage; - newImage = imageTemp; - - newImage_width = newwidth; - newImage_height = newheight; - glTexImage2D(target, level, components, newImage_width, - newImage_height, 0, format, GL_UNSIGNED_BYTE, - (void *) newImage); - } - if (newwidth > 1) newwidth /= 2; - if (newheight > 1) newheight /= 2; - } - glPixelStorei(GL_UNPACK_ALIGNMENT, psm->unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm->unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm->unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm->unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm->unpack_swap_bytes); - - if (newImage != (const GLubyte *)data) { - free((GLbyte *) newImage); - } - if (otherImage && otherImage != (const GLubyte *)data) { - free((GLbyte *) otherImage); - } - return 0; -} -#endif - -/* - * Utility Routines - */ -static GLint elements_per_group(GLenum format, GLenum type) -{ - /* - * Return the number of elements per group of a specified format - */ - - /* If the type is packedpixels then answer is 1 (ignore format) */ - if (type == GL_UNSIGNED_BYTE_3_3_2 || - type == GL_UNSIGNED_BYTE_2_3_3_REV || - type == GL_UNSIGNED_SHORT_5_6_5 || - type == GL_UNSIGNED_SHORT_5_6_5_REV || - type == GL_UNSIGNED_SHORT_4_4_4_4 || - type == GL_UNSIGNED_SHORT_4_4_4_4_REV || - type == GL_UNSIGNED_SHORT_5_5_5_1 || - type == GL_UNSIGNED_SHORT_1_5_5_5_REV || - type == GL_UNSIGNED_INT_8_8_8_8 || - type == GL_UNSIGNED_INT_8_8_8_8_REV || - type == GL_UNSIGNED_INT_10_10_10_2 || - type == GL_UNSIGNED_INT_2_10_10_10_REV) { - return 1; - } - - /* Types are not packed pixels, so get elements per group */ - switch(format) { - case GL_RGB: - case GL_BGR: - return 3; - case GL_LUMINANCE_ALPHA: - return 2; - case GL_RGBA: - case GL_BGRA: - return 4; - default: - return 1; - } -} - -static GLfloat bytes_per_element(GLenum type) -{ - /* - * Return the number of bytes per element, based on the element type - */ - switch(type) { - case GL_BITMAP: - return 1.0 / 8.0; - case GL_UNSIGNED_SHORT: - return(sizeof(GLushort)); - case GL_SHORT: - return(sizeof(GLshort)); - case GL_UNSIGNED_BYTE: - return(sizeof(GLubyte)); - case GL_BYTE: - return(sizeof(GLbyte)); - case GL_INT: - return(sizeof(GLint)); - case GL_UNSIGNED_INT: - return(sizeof(GLuint)); - case GL_FLOAT: - return(sizeof(GLfloat)); - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - return(sizeof(GLubyte)); - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - return(sizeof(GLushort)); - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - return(sizeof(GLuint)); - default: - return 4; - } -} - -static GLint is_index(GLenum format) -{ - return format == GL_COLOR_INDEX || format == GL_STENCIL_INDEX; -} - -/* -** Compute memory required for internal packed array of data of given type -** and format. -*/ -static GLint image_size(GLint width, GLint height, GLenum format, GLenum type) -{ - int bytes_per_row; - int components; - -assert(width > 0); -assert(height > 0); - components = elements_per_group(format,type); - if (type == GL_BITMAP) { - bytes_per_row = (width + 7) / 8; - } else { - bytes_per_row = bytes_per_element(type) * width; - } - return bytes_per_row * height * components; -} - -/* -** Extract array from user's data applying all pixel store modes. -** The internal format used is an array of unsigned shorts. -*/ -static void fill_image(const PixelStorageModes *psm, - GLint width, GLint height, GLenum format, - GLenum type, GLboolean index_format, - const void *userdata, GLushort *newimage) -{ - GLint components; - GLint element_size; - GLint rowsize; - GLint padding; - GLint groups_per_line; - GLint group_size; - GLint elements_per_line; - const GLubyte *start; - const GLubyte *iter; - GLushort *iter2; - GLint i, j, k; - GLint myswap_bytes; - - myswap_bytes = psm->unpack_swap_bytes; - components = elements_per_group(format,type); - if (psm->unpack_row_length > 0) { - groups_per_line = psm->unpack_row_length; - } else { - groups_per_line = width; - } - - /* All formats except GL_BITMAP fall out trivially */ - if (type == GL_BITMAP) { - GLint bit_offset; - GLint current_bit; - - rowsize = (groups_per_line * components + 7) / 8; - padding = (rowsize % psm->unpack_alignment); - if (padding) { - rowsize += psm->unpack_alignment - padding; - } - start = (const GLubyte *) userdata + psm->unpack_skip_rows * rowsize + - (psm->unpack_skip_pixels * components / 8); - elements_per_line = width * components; - iter2 = newimage; - for (i = 0; i < height; i++) { - iter = start; - bit_offset = (psm->unpack_skip_pixels * components) % 8; - for (j = 0; j < elements_per_line; j++) { - /* Retrieve bit */ - if (psm->unpack_lsb_first) { - current_bit = iter[0] & (1 << bit_offset); - } else { - current_bit = iter[0] & (1 << (7 - bit_offset)); - } - if (current_bit) { - if (index_format) { - *iter2 = 1; - } else { - *iter2 = 65535; - } - } else { - *iter2 = 0; - } - bit_offset++; - if (bit_offset == 8) { - bit_offset = 0; - iter++; - } - iter2++; - } - start += rowsize; - } - } else { - element_size = bytes_per_element(type); - group_size = element_size * components; - if (element_size == 1) myswap_bytes = 0; - - rowsize = groups_per_line * group_size; - padding = (rowsize % psm->unpack_alignment); - if (padding) { - rowsize += psm->unpack_alignment - padding; - } - start = (const GLubyte *) userdata + psm->unpack_skip_rows * rowsize + - psm->unpack_skip_pixels * group_size; - elements_per_line = width * components; - - iter2 = newimage; - for (i = 0; i < height; i++) { - iter = start; - for (j = 0; j < elements_per_line; j++) { - Type_Widget widget; - float extractComponents[4]; - - switch(type) { - case GL_UNSIGNED_BYTE_3_3_2: - extract332(0,iter,extractComponents); - for (k = 0; k < 3; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_BYTE_2_3_3_REV: - extract233rev(0,iter,extractComponents); - for (k = 0; k < 3; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_BYTE: - if (index_format) { - *iter2++ = *iter; - } else { - *iter2++ = (*iter) * 257; - } - break; - case GL_BYTE: - if (index_format) { - *iter2++ = *((const GLbyte *) iter); - } else { - /* rough approx */ - *iter2++ = (*((const GLbyte *) iter)) * 516; - } - break; - case GL_UNSIGNED_SHORT_5_6_5: - extract565(myswap_bytes,iter,extractComponents); - for (k = 0; k < 3; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_SHORT_5_6_5_REV: - extract565rev(myswap_bytes,iter,extractComponents); - for (k = 0; k < 3; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_SHORT_4_4_4_4: - extract4444(myswap_bytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - extract4444rev(myswap_bytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_SHORT_5_5_5_1: - extract5551(myswap_bytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - extract1555rev(myswap_bytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_SHORT: - case GL_SHORT: - if (myswap_bytes) { - widget.ub[0] = iter[1]; - widget.ub[1] = iter[0]; - } else { - widget.ub[0] = iter[0]; - widget.ub[1] = iter[1]; - } - if (type == GL_SHORT) { - if (index_format) { - *iter2++ = widget.s[0]; - } else { - /* rough approx */ - *iter2++ = widget.s[0]*2; - } - } else { - *iter2++ = widget.us[0]; - } - break; - case GL_UNSIGNED_INT_8_8_8_8: - extract8888(myswap_bytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_INT_8_8_8_8_REV: - extract8888rev(myswap_bytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_INT_10_10_10_2: - extract1010102(myswap_bytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_INT_2_10_10_10_REV: - extract2101010rev(myswap_bytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - if (myswap_bytes) { - widget.ub[0] = iter[3]; - widget.ub[1] = iter[2]; - widget.ub[2] = iter[1]; - widget.ub[3] = iter[0]; - } else { - widget.ub[0] = iter[0]; - widget.ub[1] = iter[1]; - widget.ub[2] = iter[2]; - widget.ub[3] = iter[3]; - } - if (type == GL_FLOAT) { - if (index_format) { - *iter2++ = widget.f; - } else { - *iter2++ = 65535 * widget.f; - } - } else if (type == GL_UNSIGNED_INT) { - if (index_format) { - *iter2++ = widget.ui; - } else { - *iter2++ = widget.ui >> 16; - } - } else { - if (index_format) { - *iter2++ = widget.i; - } else { - *iter2++ = widget.i >> 15; - } - } - break; - } - iter += element_size; - } /* for j */ - start += rowsize; -#if 1 - /* want 'iter' pointing at start, not within, row for assertion - * purposes - */ - iter= start; -#endif - } /* for i */ - - /* iterators should be one byte past end */ - if (!isTypePackedPixel(type)) { - assert(iter2 == &newimage[width*height*components]); - } - else { - assert(iter2 == &newimage[width*height* - elements_per_group(format,0)]); - } - assert( iter == &((const GLubyte *)userdata)[rowsize*height + - psm->unpack_skip_rows * rowsize + - psm->unpack_skip_pixels * group_size] ); - - } /* else */ -} /* fill_image() */ - -/* -** Insert array into user's data applying all pixel store modes. -** The internal format is an array of unsigned shorts. -** empty_image() because it is the opposite of fill_image(). -*/ -static void empty_image(const PixelStorageModes *psm, - GLint width, GLint height, GLenum format, - GLenum type, GLboolean index_format, - const GLushort *oldimage, void *userdata) -{ - GLint components; - GLint element_size; - GLint rowsize; - GLint padding; - GLint groups_per_line; - GLint group_size; - GLint elements_per_line; - GLubyte *start; - GLubyte *iter; - const GLushort *iter2; - GLint i, j, k; - GLint myswap_bytes; - - myswap_bytes = psm->pack_swap_bytes; - components = elements_per_group(format,type); - if (psm->pack_row_length > 0) { - groups_per_line = psm->pack_row_length; - } else { - groups_per_line = width; - } - - /* All formats except GL_BITMAP fall out trivially */ - if (type == GL_BITMAP) { - GLint bit_offset; - GLint current_bit; - - rowsize = (groups_per_line * components + 7) / 8; - padding = (rowsize % psm->pack_alignment); - if (padding) { - rowsize += psm->pack_alignment - padding; - } - start = (GLubyte *) userdata + psm->pack_skip_rows * rowsize + - (psm->pack_skip_pixels * components / 8); - elements_per_line = width * components; - iter2 = oldimage; - for (i = 0; i < height; i++) { - iter = start; - bit_offset = (psm->pack_skip_pixels * components) % 8; - for (j = 0; j < elements_per_line; j++) { - if (index_format) { - current_bit = iter2[0] & 1; - } else { - if (iter2[0] > 32767) { - current_bit = 1; - } else { - current_bit = 0; - } - } - - if (current_bit) { - if (psm->pack_lsb_first) { - *iter |= (1 << bit_offset); - } else { - *iter |= (1 << (7 - bit_offset)); - } - } else { - if (psm->pack_lsb_first) { - *iter &= ~(1 << bit_offset); - } else { - *iter &= ~(1 << (7 - bit_offset)); - } - } - - bit_offset++; - if (bit_offset == 8) { - bit_offset = 0; - iter++; - } - iter2++; - } - start += rowsize; - } - } else { - float shoveComponents[4]; - - element_size = bytes_per_element(type); - group_size = element_size * components; - if (element_size == 1) myswap_bytes = 0; - - rowsize = groups_per_line * group_size; - padding = (rowsize % psm->pack_alignment); - if (padding) { - rowsize += psm->pack_alignment - padding; - } - start = (GLubyte *) userdata + psm->pack_skip_rows * rowsize + - psm->pack_skip_pixels * group_size; - elements_per_line = width * components; - - iter2 = oldimage; - for (i = 0; i < height; i++) { - iter = start; - for (j = 0; j < elements_per_line; j++) { - Type_Widget widget; - - switch(type) { - case GL_UNSIGNED_BYTE_3_3_2: - for (k = 0; k < 3; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove332(shoveComponents,0,(void *)iter); - break; - case GL_UNSIGNED_BYTE_2_3_3_REV: - for (k = 0; k < 3; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove233rev(shoveComponents,0,(void *)iter); - break; - case GL_UNSIGNED_BYTE: - if (index_format) { - *iter = *iter2++; - } else { - *iter = *iter2++ >> 8; - } - break; - case GL_BYTE: - if (index_format) { - *((GLbyte *) iter) = *iter2++; - } else { - *((GLbyte *) iter) = *iter2++ >> 9; - } - break; - case GL_UNSIGNED_SHORT_5_6_5: - for (k = 0; k < 3; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove565(shoveComponents,0,(void *)&widget.us[0]); - if (myswap_bytes) { - iter[0] = widget.ub[1]; - iter[1] = widget.ub[0]; - } - else { - *(GLushort *)iter = widget.us[0]; - } - break; - case GL_UNSIGNED_SHORT_5_6_5_REV: - for (k = 0; k < 3; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove565rev(shoveComponents,0,(void *)&widget.us[0]); - if (myswap_bytes) { - iter[0] = widget.ub[1]; - iter[1] = widget.ub[0]; - } - else { - *(GLushort *)iter = widget.us[0]; - } - break; - case GL_UNSIGNED_SHORT_4_4_4_4: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove4444(shoveComponents,0,(void *)&widget.us[0]); - if (myswap_bytes) { - iter[0] = widget.ub[1]; - iter[1] = widget.ub[0]; - } else { - *(GLushort *)iter = widget.us[0]; - } - break; - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove4444rev(shoveComponents,0,(void *)&widget.us[0]); - if (myswap_bytes) { - iter[0] = widget.ub[1]; - iter[1] = widget.ub[0]; - } else { - *(GLushort *)iter = widget.us[0]; - } - break; - case GL_UNSIGNED_SHORT_5_5_5_1: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove5551(shoveComponents,0,(void *)&widget.us[0]); - if (myswap_bytes) { - iter[0] = widget.ub[1]; - iter[1] = widget.ub[0]; - } else { - *(GLushort *)iter = widget.us[0]; - } - break; - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove1555rev(shoveComponents,0,(void *)&widget.us[0]); - if (myswap_bytes) { - iter[0] = widget.ub[1]; - iter[1] = widget.ub[0]; - } else { - *(GLushort *)iter = widget.us[0]; - } - break; - case GL_UNSIGNED_SHORT: - case GL_SHORT: - if (type == GL_SHORT) { - if (index_format) { - widget.s[0] = *iter2++; - } else { - widget.s[0] = *iter2++ >> 1; - } - } else { - widget.us[0] = *iter2++; - } - if (myswap_bytes) { - iter[0] = widget.ub[1]; - iter[1] = widget.ub[0]; - } else { - iter[0] = widget.ub[0]; - iter[1] = widget.ub[1]; - } - break; - case GL_UNSIGNED_INT_8_8_8_8: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove8888(shoveComponents,0,(void *)&widget.ui); - if (myswap_bytes) { - iter[3] = widget.ub[0]; - iter[2] = widget.ub[1]; - iter[1] = widget.ub[2]; - iter[0] = widget.ub[3]; - } else { - *(GLuint *)iter= widget.ui; - } - - break; - case GL_UNSIGNED_INT_8_8_8_8_REV: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove8888rev(shoveComponents,0,(void *)&widget.ui); - if (myswap_bytes) { - iter[3] = widget.ub[0]; - iter[2] = widget.ub[1]; - iter[1] = widget.ub[2]; - iter[0] = widget.ub[3]; - } else { - *(GLuint *)iter= widget.ui; - } - break; - case GL_UNSIGNED_INT_10_10_10_2: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove1010102(shoveComponents,0,(void *)&widget.ui); - if (myswap_bytes) { - iter[3] = widget.ub[0]; - iter[2] = widget.ub[1]; - iter[1] = widget.ub[2]; - iter[0] = widget.ub[3]; - } else { - *(GLuint *)iter= widget.ui; - } - break; - case GL_UNSIGNED_INT_2_10_10_10_REV: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove2101010rev(shoveComponents,0,(void *)&widget.ui); - if (myswap_bytes) { - iter[3] = widget.ub[0]; - iter[2] = widget.ub[1]; - iter[1] = widget.ub[2]; - iter[0] = widget.ub[3]; - } else { - *(GLuint *)iter= widget.ui; - } - break; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - if (type == GL_FLOAT) { - if (index_format) { - widget.f = *iter2++; - } else { - widget.f = *iter2++ / (float) 65535.0; - } - } else if (type == GL_UNSIGNED_INT) { - if (index_format) { - widget.ui = *iter2++; - } else { - widget.ui = (unsigned int) *iter2++ * 65537; - } - } else { - if (index_format) { - widget.i = *iter2++; - } else { - widget.i = ((unsigned int) *iter2++ * 65537)/2; - } - } - if (myswap_bytes) { - iter[3] = widget.ub[0]; - iter[2] = widget.ub[1]; - iter[1] = widget.ub[2]; - iter[0] = widget.ub[3]; - } else { - iter[0] = widget.ub[0]; - iter[1] = widget.ub[1]; - iter[2] = widget.ub[2]; - iter[3] = widget.ub[3]; - } - break; - } - iter += element_size; - } /* for j */ - start += rowsize; -#if 1 - /* want 'iter' pointing at start, not within, row for assertion - * purposes - */ - iter= start; -#endif - } /* for i */ - - /* iterators should be one byte past end */ - if (!isTypePackedPixel(type)) { - assert(iter2 == &oldimage[width*height*components]); - } - else { - assert(iter2 == &oldimage[width*height* - elements_per_group(format,0)]); - } - assert( iter == &((GLubyte *)userdata)[rowsize*height + - psm->pack_skip_rows * rowsize + - psm->pack_skip_pixels * group_size] ); - - } /* else */ -} /* empty_image() */ - -/*-------------------------------------------------------------------------- - * Decimation of packed pixel types - *-------------------------------------------------------------------------- - */ -static void extract332(int isSwap, - const void *packedPixel, GLfloat extractComponents[]) -{ - GLubyte ubyte= *(const GLubyte *)packedPixel; - - isSwap= isSwap; /* turn off warnings */ - - /* 11100000 == 0xe0 */ - /* 00011100 == 0x1c */ - /* 00000011 == 0x03 */ - - extractComponents[0]= (float)((ubyte & 0xe0) >> 5) / 7.0; - extractComponents[1]= (float)((ubyte & 0x1c) >> 2) / 7.0; /* 7 = 2^3-1 */ - extractComponents[2]= (float)((ubyte & 0x03) ) / 3.0; /* 3 = 2^2-1 */ -} /* extract332() */ - -static void shove332(const GLfloat shoveComponents[], - int index, void *packedPixel) -{ - /* 11100000 == 0xe0 */ - /* 00011100 == 0x1c */ - /* 00000011 == 0x03 */ - - assert(0.0 <= shoveComponents[0] && shoveComponents[0] <= 1.0); - assert(0.0 <= shoveComponents[1] && shoveComponents[1] <= 1.0); - assert(0.0 <= shoveComponents[2] && shoveComponents[2] <= 1.0); - - /* due to limited precision, need to round before shoving */ - ((GLubyte *)packedPixel)[index] = - ((GLubyte)((shoveComponents[0] * 7)+0.5) << 5) & 0xe0; - ((GLubyte *)packedPixel)[index] |= - ((GLubyte)((shoveComponents[1] * 7)+0.5) << 2) & 0x1c; - ((GLubyte *)packedPixel)[index] |= - ((GLubyte)((shoveComponents[2] * 3)+0.5) ) & 0x03; -} /* shove332() */ - -static void extract233rev(int isSwap, - const void *packedPixel, GLfloat extractComponents[]) -{ - GLubyte ubyte= *(const GLubyte *)packedPixel; - - isSwap= isSwap; /* turn off warnings */ - - /* 0000,0111 == 0x07 */ - /* 0011,1000 == 0x38 */ - /* 1100,0000 == 0xC0 */ - - extractComponents[0]= (float)((ubyte & 0x07) ) / 7.0; - extractComponents[1]= (float)((ubyte & 0x38) >> 3) / 7.0; - extractComponents[2]= (float)((ubyte & 0xC0) >> 6) / 3.0; -} /* extract233rev() */ - -static void shove233rev(const GLfloat shoveComponents[], - int index, void *packedPixel) -{ - /* 0000,0111 == 0x07 */ - /* 0011,1000 == 0x38 */ - /* 1100,0000 == 0xC0 */ - - assert(0.0 <= shoveComponents[0] && shoveComponents[0] <= 1.0); - assert(0.0 <= shoveComponents[1] && shoveComponents[1] <= 1.0); - assert(0.0 <= shoveComponents[2] && shoveComponents[2] <= 1.0); - - /* due to limited precision, need to round before shoving */ - ((GLubyte *)packedPixel)[index] = - ((GLubyte)((shoveComponents[0] * 7.0)+0.5) ) & 0x07; - ((GLubyte *)packedPixel)[index]|= - ((GLubyte)((shoveComponents[1] * 7.0)+0.5) << 3) & 0x38; - ((GLubyte *)packedPixel)[index]|= - ((GLubyte)((shoveComponents[2] * 3.0)+0.5) << 6) & 0xC0; -} /* shove233rev() */ - -static void extract565(int isSwap, - const void *packedPixel, GLfloat extractComponents[]) -{ - GLushort ushort= *(const GLushort *)packedPixel; - - if (isSwap) { - ushort= __GLU_SWAP_2_BYTES(packedPixel); - } - else { - ushort= *(const GLushort *)packedPixel; - } - - /* 11111000,00000000 == 0xf800 */ - /* 00000111,11100000 == 0x07e0 */ - /* 00000000,00011111 == 0x001f */ - - extractComponents[0]=(float)((ushort & 0xf800) >> 11) / 31.0;/* 31 = 2^5-1*/ - extractComponents[1]=(float)((ushort & 0x07e0) >> 5) / 63.0;/* 63 = 2^6-1*/ - extractComponents[2]=(float)((ushort & 0x001f) ) / 31.0; -} /* extract565() */ - -static void shove565(const GLfloat shoveComponents[], - int index,void *packedPixel) -{ - /* 11111000,00000000 == 0xf800 */ - /* 00000111,11100000 == 0x07e0 */ - /* 00000000,00011111 == 0x001f */ - - assert(0.0 <= shoveComponents[0] && shoveComponents[0] <= 1.0); - assert(0.0 <= shoveComponents[1] && shoveComponents[1] <= 1.0); - assert(0.0 <= shoveComponents[2] && shoveComponents[2] <= 1.0); - - /* due to limited precision, need to round before shoving */ - ((GLushort *)packedPixel)[index] = - ((GLushort)((shoveComponents[0] * 31)+0.5) << 11) & 0xf800; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[1] * 63)+0.5) << 5) & 0x07e0; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[2] * 31)+0.5) ) & 0x001f; -} /* shove565() */ - -static void extract565rev(int isSwap, - const void *packedPixel, GLfloat extractComponents[]) -{ - GLushort ushort= *(const GLushort *)packedPixel; - - if (isSwap) { - ushort= __GLU_SWAP_2_BYTES(packedPixel); - } - else { - ushort= *(const GLushort *)packedPixel; - } - - /* 00000000,00011111 == 0x001f */ - /* 00000111,11100000 == 0x07e0 */ - /* 11111000,00000000 == 0xf800 */ - - extractComponents[0]= (float)((ushort & 0x001F) ) / 31.0; - extractComponents[1]= (float)((ushort & 0x07E0) >> 5) / 63.0; - extractComponents[2]= (float)((ushort & 0xF800) >> 11) / 31.0; -} /* extract565rev() */ - -static void shove565rev(const GLfloat shoveComponents[], - int index,void *packedPixel) -{ - /* 00000000,00011111 == 0x001f */ - /* 00000111,11100000 == 0x07e0 */ - /* 11111000,00000000 == 0xf800 */ - - assert(0.0 <= shoveComponents[0] && shoveComponents[0] <= 1.0); - assert(0.0 <= shoveComponents[1] && shoveComponents[1] <= 1.0); - assert(0.0 <= shoveComponents[2] && shoveComponents[2] <= 1.0); - - /* due to limited precision, need to round before shoving */ - ((GLushort *)packedPixel)[index] = - ((GLushort)((shoveComponents[0] * 31.0)+0.5) ) & 0x001F; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[1] * 63.0)+0.5) << 5) & 0x07E0; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[2] * 31.0)+0.5) << 11) & 0xF800; -} /* shove565rev() */ - -static void extract4444(int isSwap,const void *packedPixel, - GLfloat extractComponents[]) -{ - GLushort ushort; - - if (isSwap) { - ushort= __GLU_SWAP_2_BYTES(packedPixel); - } - else { - ushort= *(const GLushort *)packedPixel; - } - - /* 11110000,00000000 == 0xf000 */ - /* 00001111,00000000 == 0x0f00 */ - /* 00000000,11110000 == 0x00f0 */ - /* 00000000,00001111 == 0x000f */ - - extractComponents[0]= (float)((ushort & 0xf000) >> 12) / 15.0;/* 15=2^4-1 */ - extractComponents[1]= (float)((ushort & 0x0f00) >> 8) / 15.0; - extractComponents[2]= (float)((ushort & 0x00f0) >> 4) / 15.0; - extractComponents[3]= (float)((ushort & 0x000f) ) / 15.0; -} /* extract4444() */ - -static void shove4444(const GLfloat shoveComponents[], - int index,void *packedPixel) -{ - assert(0.0 <= shoveComponents[0] && shoveComponents[0] <= 1.0); - assert(0.0 <= shoveComponents[1] && shoveComponents[1] <= 1.0); - assert(0.0 <= shoveComponents[2] && shoveComponents[2] <= 1.0); - assert(0.0 <= shoveComponents[3] && shoveComponents[3] <= 1.0); - - /* due to limited precision, need to round before shoving */ - ((GLushort *)packedPixel)[index] = - ((GLushort)((shoveComponents[0] * 15)+0.5) << 12) & 0xf000; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[1] * 15)+0.5) << 8) & 0x0f00; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[2] * 15)+0.5) << 4) & 0x00f0; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[3] * 15)+0.5) ) & 0x000f; -} /* shove4444() */ - -static void extract4444rev(int isSwap,const void *packedPixel, - GLfloat extractComponents[]) -{ - GLushort ushort; - - if (isSwap) { - ushort= __GLU_SWAP_2_BYTES(packedPixel); - } - else { - ushort= *(const GLushort *)packedPixel; - } - - /* 00000000,00001111 == 0x000f */ - /* 00000000,11110000 == 0x00f0 */ - /* 00001111,00000000 == 0x0f00 */ - /* 11110000,00000000 == 0xf000 */ - - /* 15 = 2^4-1 */ - extractComponents[0]= (float)((ushort & 0x000F) ) / 15.0; - extractComponents[1]= (float)((ushort & 0x00F0) >> 4) / 15.0; - extractComponents[2]= (float)((ushort & 0x0F00) >> 8) / 15.0; - extractComponents[3]= (float)((ushort & 0xF000) >> 12) / 15.0; -} /* extract4444rev() */ - -static void shove4444rev(const GLfloat shoveComponents[], - int index,void *packedPixel) -{ - /* 00000000,00001111 == 0x000f */ - /* 00000000,11110000 == 0x00f0 */ - /* 00001111,00000000 == 0x0f00 */ - /* 11110000,00000000 == 0xf000 */ - - assert(0.0 <= shoveComponents[0] && shoveComponents[0] <= 1.0); - assert(0.0 <= shoveComponents[1] && shoveComponents[1] <= 1.0); - assert(0.0 <= shoveComponents[2] && shoveComponents[2] <= 1.0); - assert(0.0 <= shoveComponents[3] && shoveComponents[3] <= 1.0); - - /* due to limited precision, need to round before shoving */ - ((GLushort *)packedPixel)[index] = - ((GLushort)((shoveComponents[0] * 15)+0.5) ) & 0x000F; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[1] * 15)+0.5) << 4) & 0x00F0; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[2] * 15)+0.5) << 8) & 0x0F00; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[3] * 15)+0.5) << 12) & 0xF000; -} /* shove4444rev() */ - -static void extract5551(int isSwap,const void *packedPixel, - GLfloat extractComponents[]) -{ - GLushort ushort; - - if (isSwap) { - ushort= __GLU_SWAP_2_BYTES(packedPixel); - } - else { - ushort= *(const GLushort *)packedPixel; - } - - /* 11111000,00000000 == 0xf800 */ - /* 00000111,11000000 == 0x07c0 */ - /* 00000000,00111110 == 0x003e */ - /* 00000000,00000001 == 0x0001 */ - - extractComponents[0]=(float)((ushort & 0xf800) >> 11) / 31.0;/* 31 = 2^5-1*/ - extractComponents[1]=(float)((ushort & 0x07c0) >> 6) / 31.0; - extractComponents[2]=(float)((ushort & 0x003e) >> 1) / 31.0; - extractComponents[3]=(float)((ushort & 0x0001) ); -} /* extract5551() */ - -static void shove5551(const GLfloat shoveComponents[], - int index,void *packedPixel) -{ - /* 11111000,00000000 == 0xf800 */ - /* 00000111,11000000 == 0x07c0 */ - /* 00000000,00111110 == 0x003e */ - /* 00000000,00000001 == 0x0001 */ - - assert(0.0 <= shoveComponents[0] && shoveComponents[0] <= 1.0); - assert(0.0 <= shoveComponents[1] && shoveComponents[1] <= 1.0); - assert(0.0 <= shoveComponents[2] && shoveComponents[2] <= 1.0); - assert(0.0 <= shoveComponents[3] && shoveComponents[3] <= 1.0); - - /* due to limited precision, need to round before shoving */ - ((GLushort *)packedPixel)[index] = - ((GLushort)((shoveComponents[0] * 31)+0.5) << 11) & 0xf800; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[1] * 31)+0.5) << 6) & 0x07c0; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[2] * 31)+0.5) << 1) & 0x003e; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[3])+0.5) ) & 0x0001; -} /* shove5551() */ - -static void extract1555rev(int isSwap,const void *packedPixel, - GLfloat extractComponents[]) -{ - GLushort ushort; - - if (isSwap) { - ushort= __GLU_SWAP_2_BYTES(packedPixel); - } - else { - ushort= *(const GLushort *)packedPixel; - } - - /* 00000000,00011111 == 0x001F */ - /* 00000011,11100000 == 0x03E0 */ - /* 01111100,00000000 == 0x7C00 */ - /* 10000000,00000000 == 0x8000 */ - - /* 31 = 2^5-1 */ - extractComponents[0]= (float)((ushort & 0x001F) ) / 31.0; - extractComponents[1]= (float)((ushort & 0x03E0) >> 5) / 31.0; - extractComponents[2]= (float)((ushort & 0x7C00) >> 10) / 31.0; - extractComponents[3]= (float)((ushort & 0x8000) >> 15); -} /* extract1555rev() */ - -static void shove1555rev(const GLfloat shoveComponents[], - int index,void *packedPixel) -{ - /* 00000000,00011111 == 0x001F */ - /* 00000011,11100000 == 0x03E0 */ - /* 01111100,00000000 == 0x7C00 */ - /* 10000000,00000000 == 0x8000 */ - - assert(0.0 <= shoveComponents[0] && shoveComponents[0] <= 1.0); - assert(0.0 <= shoveComponents[1] && shoveComponents[1] <= 1.0); - assert(0.0 <= shoveComponents[2] && shoveComponents[2] <= 1.0); - assert(0.0 <= shoveComponents[3] && shoveComponents[3] <= 1.0); - - /* due to limited precision, need to round before shoving */ - ((GLushort *)packedPixel)[index] = - ((GLushort)((shoveComponents[0] * 31)+0.5) ) & 0x001F; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[1] * 31)+0.5) << 5) & 0x03E0; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[2] * 31)+0.5) << 10) & 0x7C00; - ((GLushort *)packedPixel)[index]|= - ((GLushort)((shoveComponents[3])+0.5) << 15) & 0x8000; -} /* shove1555rev() */ - -static void extract8888(int isSwap, - const void *packedPixel, GLfloat extractComponents[]) -{ - GLuint uint; - - if (isSwap) { - uint= __GLU_SWAP_4_BYTES(packedPixel); - } - else { - uint= *(const GLuint *)packedPixel; - } - - /* 11111111,00000000,00000000,00000000 == 0xff000000 */ - /* 00000000,11111111,00000000,00000000 == 0x00ff0000 */ - /* 00000000,00000000,11111111,00000000 == 0x0000ff00 */ - /* 00000000,00000000,00000000,11111111 == 0x000000ff */ - - /* 255 = 2^8-1 */ - extractComponents[0]= (float)((uint & 0xff000000) >> 24) / 255.0; - extractComponents[1]= (float)((uint & 0x00ff0000) >> 16) / 255.0; - extractComponents[2]= (float)((uint & 0x0000ff00) >> 8) / 255.0; - extractComponents[3]= (float)((uint & 0x000000ff) ) / 255.0; -} /* extract8888() */ - -static void shove8888(const GLfloat shoveComponents[], - int index,void *packedPixel) -{ - /* 11111111,00000000,00000000,00000000 == 0xff000000 */ - /* 00000000,11111111,00000000,00000000 == 0x00ff0000 */ - /* 00000000,00000000,11111111,00000000 == 0x0000ff00 */ - /* 00000000,00000000,00000000,11111111 == 0x000000ff */ - - assert(0.0 <= shoveComponents[0] && shoveComponents[0] <= 1.0); - assert(0.0 <= shoveComponents[1] && shoveComponents[1] <= 1.0); - assert(0.0 <= shoveComponents[2] && shoveComponents[2] <= 1.0); - assert(0.0 <= shoveComponents[3] && shoveComponents[3] <= 1.0); - - /* due to limited precision, need to round before shoving */ - ((GLuint *)packedPixel)[index] = - ((GLuint)((shoveComponents[0] * 255)+0.5) << 24) & 0xff000000; - ((GLuint *)packedPixel)[index]|= - ((GLuint)((shoveComponents[1] * 255)+0.5) << 16) & 0x00ff0000; - ((GLuint *)packedPixel)[index]|= - ((GLuint)((shoveComponents[2] * 255)+0.5) << 8) & 0x0000ff00; - ((GLuint *)packedPixel)[index]|= - ((GLuint)((shoveComponents[3] * 255)+0.5) ) & 0x000000ff; -} /* shove8888() */ - -static void extract8888rev(int isSwap, - const void *packedPixel,GLfloat extractComponents[]) -{ - GLuint uint; - - if (isSwap) { - uint= __GLU_SWAP_4_BYTES(packedPixel); - } - else { - uint= *(const GLuint *)packedPixel; - } - - /* 00000000,00000000,00000000,11111111 == 0x000000ff */ - /* 00000000,00000000,11111111,00000000 == 0x0000ff00 */ - /* 00000000,11111111,00000000,00000000 == 0x00ff0000 */ - /* 11111111,00000000,00000000,00000000 == 0xff000000 */ - - /* 255 = 2^8-1 */ - extractComponents[0]= (float)((uint & 0x000000FF) ) / 255.0; - extractComponents[1]= (float)((uint & 0x0000FF00) >> 8) / 255.0; - extractComponents[2]= (float)((uint & 0x00FF0000) >> 16) / 255.0; - extractComponents[3]= (float)((uint & 0xFF000000) >> 24) / 255.0; -} /* extract8888rev() */ - -static void shove8888rev(const GLfloat shoveComponents[], - int index,void *packedPixel) -{ - /* 00000000,00000000,00000000,11111111 == 0x000000ff */ - /* 00000000,00000000,11111111,00000000 == 0x0000ff00 */ - /* 00000000,11111111,00000000,00000000 == 0x00ff0000 */ - /* 11111111,00000000,00000000,00000000 == 0xff000000 */ - - assert(0.0 <= shoveComponents[0] && shoveComponents[0] <= 1.0); - assert(0.0 <= shoveComponents[1] && shoveComponents[1] <= 1.0); - assert(0.0 <= shoveComponents[2] && shoveComponents[2] <= 1.0); - assert(0.0 <= shoveComponents[3] && shoveComponents[3] <= 1.0); - - /* due to limited precision, need to round before shoving */ - ((GLuint *)packedPixel)[index] = - ((GLuint)((shoveComponents[0] * 255)+0.5) ) & 0x000000FF; - ((GLuint *)packedPixel)[index]|= - ((GLuint)((shoveComponents[1] * 255)+0.5) << 8) & 0x0000FF00; - ((GLuint *)packedPixel)[index]|= - ((GLuint)((shoveComponents[2] * 255)+0.5) << 16) & 0x00FF0000; - ((GLuint *)packedPixel)[index]|= - ((GLuint)((shoveComponents[3] * 255)+0.5) << 24) & 0xFF000000; -} /* shove8888rev() */ - -static void extract1010102(int isSwap, - const void *packedPixel,GLfloat extractComponents[]) -{ - GLuint uint; - - if (isSwap) { - uint= __GLU_SWAP_4_BYTES(packedPixel); - } - else { - uint= *(const GLuint *)packedPixel; - } - - /* 11111111,11000000,00000000,00000000 == 0xffc00000 */ - /* 00000000,00111111,11110000,00000000 == 0x003ff000 */ - /* 00000000,00000000,00001111,11111100 == 0x00000ffc */ - /* 00000000,00000000,00000000,00000011 == 0x00000003 */ - - /* 1023 = 2^10-1 */ - extractComponents[0]= (float)((uint & 0xffc00000) >> 22) / 1023.0; - extractComponents[1]= (float)((uint & 0x003ff000) >> 12) / 1023.0; - extractComponents[2]= (float)((uint & 0x00000ffc) >> 2) / 1023.0; - extractComponents[3]= (float)((uint & 0x00000003) ) / 3.0; -} /* extract1010102() */ - -static void shove1010102(const GLfloat shoveComponents[], - int index,void *packedPixel) -{ - /* 11111111,11000000,00000000,00000000 == 0xffc00000 */ - /* 00000000,00111111,11110000,00000000 == 0x003ff000 */ - /* 00000000,00000000,00001111,11111100 == 0x00000ffc */ - /* 00000000,00000000,00000000,00000011 == 0x00000003 */ - - assert(0.0 <= shoveComponents[0] && shoveComponents[0] <= 1.0); - assert(0.0 <= shoveComponents[1] && shoveComponents[1] <= 1.0); - assert(0.0 <= shoveComponents[2] && shoveComponents[2] <= 1.0); - assert(0.0 <= shoveComponents[3] && shoveComponents[3] <= 1.0); - - /* due to limited precision, need to round before shoving */ - ((GLuint *)packedPixel)[index] = - ((GLuint)((shoveComponents[0] * 1023)+0.5) << 22) & 0xffc00000; - ((GLuint *)packedPixel)[index]|= - ((GLuint)((shoveComponents[1] * 1023)+0.5) << 12) & 0x003ff000; - ((GLuint *)packedPixel)[index]|= - ((GLuint)((shoveComponents[2] * 1023)+0.5) << 2) & 0x00000ffc; - ((GLuint *)packedPixel)[index]|= - ((GLuint)((shoveComponents[3] * 3)+0.5) ) & 0x00000003; -} /* shove1010102() */ - -static void extract2101010rev(int isSwap, - const void *packedPixel, - GLfloat extractComponents[]) -{ - GLuint uint; - - if (isSwap) { - uint= __GLU_SWAP_4_BYTES(packedPixel); - } - else { - uint= *(const GLuint *)packedPixel; - } - - /* 00000000,00000000,00000011,11111111 == 0x000003FF */ - /* 00000000,00001111,11111100,00000000 == 0x000FFC00 */ - /* 00111111,11110000,00000000,00000000 == 0x3FF00000 */ - /* 11000000,00000000,00000000,00000000 == 0xC0000000 */ - - /* 1023 = 2^10-1 */ - extractComponents[0]= (float)((uint & 0x000003FF) ) / 1023.0; - extractComponents[1]= (float)((uint & 0x000FFC00) >> 10) / 1023.0; - extractComponents[2]= (float)((uint & 0x3FF00000) >> 20) / 1023.0; - extractComponents[3]= (float)((uint & 0xC0000000) >> 30) / 3.0; - /* 3 = 2^2-1 */ -} /* extract2101010rev() */ - -static void shove2101010rev(const GLfloat shoveComponents[], - int index,void *packedPixel) -{ - /* 00000000,00000000,00000011,11111111 == 0x000003FF */ - /* 00000000,00001111,11111100,00000000 == 0x000FFC00 */ - /* 00111111,11110000,00000000,00000000 == 0x3FF00000 */ - /* 11000000,00000000,00000000,00000000 == 0xC0000000 */ - - assert(0.0 <= shoveComponents[0] && shoveComponents[0] <= 1.0); - assert(0.0 <= shoveComponents[1] && shoveComponents[1] <= 1.0); - assert(0.0 <= shoveComponents[2] && shoveComponents[2] <= 1.0); - assert(0.0 <= shoveComponents[3] && shoveComponents[3] <= 1.0); - - /* due to limited precision, need to round before shoving */ - ((GLuint *)packedPixel)[index] = - ((GLuint)((shoveComponents[0] * 1023)+0.5) ) & 0x000003FF; - ((GLuint *)packedPixel)[index]|= - ((GLuint)((shoveComponents[1] * 1023)+0.5) << 10) & 0x000FFC00; - ((GLuint *)packedPixel)[index]|= - ((GLuint)((shoveComponents[2] * 1023)+0.5) << 20) & 0x3FF00000; - ((GLuint *)packedPixel)[index]|= - ((GLuint)((shoveComponents[3] * 3)+0.5) << 30) & 0xC0000000; -} /* shove2101010rev() */ - -static void scaleInternalPackedPixel(int components, - void (*extractPackedPixel) - (int, const void *,GLfloat []), - void (*shovePackedPixel) - (const GLfloat [], int, void *), - GLint widthIn,GLint heightIn, - const void *dataIn, - GLint widthOut,GLint heightOut, - void *dataOut, - GLint pixelSizeInBytes, - GLint rowSizeInBytes,GLint isSwap) -{ - float convx; - float convy; - float percent; - - /* Max components in a format is 4, so... */ - float totals[4]; - float extractTotals[4], extractMoreTotals[4], shoveTotals[4]; - - float area; - int i,j,k,xindex; - - const char *temp, *temp0; - int outindex; - - int lowx_int, highx_int, lowy_int, highy_int; - float x_percent, y_percent; - float lowx_float, highx_float, lowy_float, highy_float; - float convy_float, convx_float; - int convy_int, convx_int; - int l, m; - const char *left, *right; - - if (widthIn == widthOut*2 && heightIn == heightOut*2) { - halveImagePackedPixel(components,extractPackedPixel,shovePackedPixel, - widthIn, heightIn, dataIn, dataOut, - pixelSizeInBytes,rowSizeInBytes,isSwap); - return; - } - convy = (float) heightIn/heightOut; - convx = (float) widthIn/widthOut; - convy_int = floor(convy); - convy_float = convy - convy_int; - convx_int = floor(convx); - convx_float = convx - convx_int; - - area = convx * convy; - - lowy_int = 0; - lowy_float = 0; - highy_int = convy_int; - highy_float = convy_float; - - for (i = 0; i < heightOut; i++) { - lowx_int = 0; - lowx_float = 0; - highx_int = convx_int; - highx_float = convx_float; - - for (j = 0; j < widthOut; j++) { - /* - ** Ok, now apply box filter to box that goes from (lowx, lowy) - ** to (highx, highy) on input data into this pixel on output - ** data. - */ - totals[0] = totals[1] = totals[2] = totals[3] = 0.0; - - /* calculate the value for pixels in the 1st row */ - xindex = lowx_int*pixelSizeInBytes; - if((highy_int>lowy_int) && (highx_int>lowx_int)) { - - y_percent = 1-lowy_float; - temp = (const char *)dataIn + xindex + lowy_int * rowSizeInBytes; - percent = y_percent * (1-lowx_float); -#if 0 - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } -#else - (*extractPackedPixel)(isSwap,temp,extractTotals); - for (k = 0; k < components; k++) { - totals[k]+= extractTotals[k] * percent; - } -#endif - left = temp; - for(l = lowx_int+1; l < highx_int; l++) { - temp += pixelSizeInBytes; -#if 0 - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += - __GLU_SWAP_2_BYTES(temp_index) * y_percent; - } else { - totals[k] += *(const GLushort*)temp_index * y_percent; - } - } -#else - (*extractPackedPixel)(isSwap,temp,extractTotals); - for (k = 0; k < components; k++) { - totals[k]+= extractTotals[k] * y_percent; - } -#endif - } - temp += pixelSizeInBytes; - right = temp; - percent = y_percent * highx_float; -#if 0 - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } -#else - (*extractPackedPixel)(isSwap,temp,extractTotals); - for (k = 0; k < components; k++) { - totals[k]+= extractTotals[k] * percent; - } -#endif - - /* calculate the value for pixels in the last row */ - - y_percent = highy_float; - percent = y_percent * (1-lowx_float); - temp = (const char *)dataIn + xindex + highy_int * rowSizeInBytes; -#if 0 - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } -#else - (*extractPackedPixel)(isSwap,temp,extractTotals); - for (k = 0; k < components; k++) { - totals[k]+= extractTotals[k] * percent; - } -#endif - for(l = lowx_int+1; l < highx_int; l++) { - temp += pixelSizeInBytes; -#if 0 - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += - __GLU_SWAP_2_BYTES(temp_index) * y_percent; - } else { - totals[k] += *(const GLushort*)temp_index * y_percent; - } - } -#else - (*extractPackedPixel)(isSwap,temp,extractTotals); - for (k = 0; k < components; k++) { - totals[k]+= extractTotals[k] * y_percent; - } -#endif - - } - temp += pixelSizeInBytes; - percent = y_percent * highx_float; -#if 0 - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } -#else - (*extractPackedPixel)(isSwap,temp,extractTotals); - for (k = 0; k < components; k++) { - totals[k]+= extractTotals[k] * percent; - } -#endif - - /* calculate the value for pixels in the 1st and last column */ - for(m = lowy_int+1; m < highy_int; m++) { - left += rowSizeInBytes; - right += rowSizeInBytes; -#if 0 - for (k = 0; k < components; - k++, left += element_size, right += element_size) { - if (myswap_bytes) { - totals[k] += - __GLU_SWAP_2_BYTES(left) * (1-lowx_float) + - __GLU_SWAP_2_BYTES(right) * highx_float; - } else { - totals[k] += *(const GLushort*)left * (1-lowx_float) - + *(const GLushort*)right * highx_float; - } - } -#else - (*extractPackedPixel)(isSwap,left,extractTotals); - (*extractPackedPixel)(isSwap,right,extractMoreTotals); - for (k = 0; k < components; k++) { - totals[k]+= (extractTotals[k]*(1-lowx_float) + - extractMoreTotals[k]*highx_float); - } -#endif - } - } else if (highy_int > lowy_int) { - x_percent = highx_float - lowx_float; - percent = (1-lowy_float)*x_percent; - temp = (const char *)dataIn + xindex + lowy_int*rowSizeInBytes; -#if 0 - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } -#else - (*extractPackedPixel)(isSwap,temp,extractTotals); - for (k = 0; k < components; k++) { - totals[k]+= extractTotals[k] * percent; - } -#endif - for(m = lowy_int+1; m < highy_int; m++) { - temp += rowSizeInBytes; -#if 0 - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += - __GLU_SWAP_2_BYTES(temp_index) * x_percent; - } else { - totals[k] += *(const GLushort*)temp_index * x_percent; - } - } -#else - (*extractPackedPixel)(isSwap,temp,extractTotals); - for (k = 0; k < components; k++) { - totals[k]+= extractTotals[k] * x_percent; - } -#endif - } - percent = x_percent * highy_float; - temp += rowSizeInBytes; -#if 0 - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } -#else - (*extractPackedPixel)(isSwap,temp,extractTotals); - for (k = 0; k < components; k++) { - totals[k]+= extractTotals[k] * percent; - } -#endif - } else if (highx_int > lowx_int) { - y_percent = highy_float - lowy_float; - percent = (1-lowx_float)*y_percent; - temp = (const char *)dataIn + xindex + lowy_int*rowSizeInBytes; -#if 0 - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } -#else - (*extractPackedPixel)(isSwap,temp,extractTotals); - for (k = 0; k < components; k++) { - totals[k]+= extractTotals[k] * percent; - } -#endif - for (l = lowx_int+1; l < highx_int; l++) { - temp += pixelSizeInBytes; -#if 0 - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += - __GLU_SWAP_2_BYTES(temp_index) * y_percent; - } else { - totals[k] += *(const GLushort*)temp_index * y_percent; - } - } -#else - (*extractPackedPixel)(isSwap,temp,extractTotals); - for (k = 0; k < components; k++) { - totals[k]+= extractTotals[k] * y_percent; - } -#endif - } - temp += pixelSizeInBytes; - percent = y_percent * highx_float; -#if 0 - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } -#else - (*extractPackedPixel)(isSwap,temp,extractTotals); - for (k = 0; k < components; k++) { - totals[k]+= extractTotals[k] * percent; - } -#endif - } else { - percent = (highy_float-lowy_float)*(highx_float-lowx_float); - temp = (const char *)dataIn + xindex + lowy_int * rowSizeInBytes; -#if 0 - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index) * percent; - } else { - totals[k] += *(const GLushort*)temp_index * percent; - } - } -#else - (*extractPackedPixel)(isSwap,temp,extractTotals); - for (k = 0; k < components; k++) { - totals[k]+= extractTotals[k] * percent; - } -#endif - } - - /* this is for the pixels in the body */ - temp0 = (const char *)dataIn + xindex + pixelSizeInBytes + (lowy_int+1)*rowSizeInBytes; - for (m = lowy_int+1; m < highy_int; m++) { - temp = temp0; - for(l = lowx_int+1; l < highx_int; l++) { -#if 0 - for (k = 0, temp_index = temp; k < components; - k++, temp_index += element_size) { - if (myswap_bytes) { - totals[k] += __GLU_SWAP_2_BYTES(temp_index); - } else { - totals[k] += *(const GLushort*)temp_index; - } - } -#else - (*extractPackedPixel)(isSwap,temp,extractTotals); - for (k = 0; k < components; k++) { - totals[k]+= extractTotals[k]; - } -#endif - temp += pixelSizeInBytes; - } - temp0 += rowSizeInBytes; - } - - outindex = (j + (i * widthOut)); /* * (components == 1) */ -#if 0 - for (k = 0; k < components; k++) { - dataout[outindex + k] = totals[k]/area; - /*printf("totals[%d] = %f\n", k, totals[k]);*/ - } -#else - for (k = 0; k < components; k++) { - shoveTotals[k]= totals[k]/area; - } - (*shovePackedPixel)(shoveTotals,outindex,(void *)dataOut); -#endif - lowx_int = highx_int; - lowx_float = highx_float; - highx_int += convx_int; - highx_float += convx_float; - if(highx_float > 1) { - highx_float -= 1.0; - highx_int++; - } - } - lowy_int = highy_int; - lowy_float = highy_float; - highy_int += convy_int; - highy_float += convy_float; - if(highy_float > 1) { - highy_float -= 1.0; - highy_int++; - } - } - - assert(outindex == (widthOut*heightOut - 1)); -} /* scaleInternalPackedPixel() */ - -/* rowSizeInBytes is at least the width (in bytes) due to padding on - * inputs; not always equal. Output NEVER has row padding. - */ -static void halveImagePackedPixel(int components, - void (*extractPackedPixel) - (int, const void *,GLfloat []), - void (*shovePackedPixel) - (const GLfloat [],int, void *), - GLint width, GLint height, - const void *dataIn, void *dataOut, - GLint pixelSizeInBytes, - GLint rowSizeInBytes, GLint isSwap) -{ - /* handle case where there is only 1 column/row */ - if (width == 1 || height == 1) { - assert(!(width == 1 && height == 1)); /* can't be 1x1 */ - halve1DimagePackedPixel(components,extractPackedPixel,shovePackedPixel, - width,height,dataIn,dataOut,pixelSizeInBytes, - rowSizeInBytes,isSwap); - return; - } - - { - int ii, jj; - - int halfWidth= width / 2; - int halfHeight= height / 2; - const char *src= (const char *) dataIn; - int padBytes= rowSizeInBytes - (width*pixelSizeInBytes); - int outIndex= 0; - - for (ii= 0; ii< halfHeight; ii++) { - for (jj= 0; jj< halfWidth; jj++) { -#define BOX4 4 - float totals[4]; /* 4 is maximum components */ - float extractTotals[BOX4][4]; /* 4 is maximum components */ - int cc; - - (*extractPackedPixel)(isSwap,src, - &extractTotals[0][0]); - (*extractPackedPixel)(isSwap,(src+pixelSizeInBytes), - &extractTotals[1][0]); - (*extractPackedPixel)(isSwap,(src+rowSizeInBytes), - &extractTotals[2][0]); - (*extractPackedPixel)(isSwap, - (src+rowSizeInBytes+pixelSizeInBytes), - &extractTotals[3][0]); - for (cc = 0; cc < components; cc++) { - int kk; - - /* grab 4 pixels to average */ - totals[cc]= 0.0; - /* totals[RED]= extractTotals[0][RED]+extractTotals[1][RED]+ - * extractTotals[2][RED]+extractTotals[3][RED]; - * totals[RED]/= 4.0; - */ - for (kk = 0; kk < BOX4; kk++) { - totals[cc]+= extractTotals[kk][cc]; - } - totals[cc]/= (float)BOX4; - } - (*shovePackedPixel)(totals,outIndex,dataOut); - - outIndex++; - /* skip over to next square of 4 */ - src+= pixelSizeInBytes + pixelSizeInBytes; - } - /* skip past pad bytes, if any, to get to next row */ - src+= padBytes; - - /* src is at beginning of a row here, but it's the second row of - * the square block of 4 pixels that we just worked on so we - * need to go one more row. - * i.e., - * OO... - * here -->OO... - * but want -->OO... - * OO... - * ... - */ - src+= rowSizeInBytes; - } - - /* both pointers must reach one byte after the end */ - assert(src == &((const char *)dataIn)[rowSizeInBytes*height]); - assert(outIndex == halfWidth * halfHeight); - } -} /* halveImagePackedPixel() */ - -static void halve1DimagePackedPixel(int components, - void (*extractPackedPixel) - (int, const void *,GLfloat []), - void (*shovePackedPixel) - (const GLfloat [],int, void *), - GLint width, GLint height, - const void *dataIn, void *dataOut, - GLint pixelSizeInBytes, - GLint rowSizeInBytes, GLint isSwap) -{ - int halfWidth= width / 2; - int halfHeight= height / 2; - const char *src= (const char *) dataIn; - int jj; - - assert(width == 1 || height == 1); /* must be 1D */ - assert(width != height); /* can't be square */ - - if (height == 1) { /* 1 row */ - int outIndex= 0; - - assert(width != 1); /* widthxheight can't be 1x1 */ - halfHeight= 1; - - /* one horizontal row with possible pad bytes */ - - for (jj= 0; jj< halfWidth; jj++) { -#define BOX2 2 - float totals[4]; /* 4 is maximum components */ - float extractTotals[BOX2][4]; /* 4 is maximum components */ - int cc; - - /* average two at a time, instead of four */ - (*extractPackedPixel)(isSwap,src, - &extractTotals[0][0]); - (*extractPackedPixel)(isSwap,(src+pixelSizeInBytes), - &extractTotals[1][0]); - for (cc = 0; cc < components; cc++) { - int kk; - - /* grab 2 pixels to average */ - totals[cc]= 0.0; - /* totals[RED]= extractTotals[0][RED]+extractTotals[1][RED]; - * totals[RED]/= 2.0; - */ - for (kk = 0; kk < BOX2; kk++) { - totals[cc]+= extractTotals[kk][cc]; - } - totals[cc]/= (float)BOX2; - } - (*shovePackedPixel)(totals,outIndex,dataOut); - - outIndex++; - /* skip over to next group of 2 */ - src+= pixelSizeInBytes + pixelSizeInBytes; - } - - { - int padBytes= rowSizeInBytes - (width*pixelSizeInBytes); - src+= padBytes; /* for assertion only */ - } - assert(src == &((const char *)dataIn)[rowSizeInBytes]); - assert(outIndex == halfWidth * halfHeight); - } - else if (width == 1) { /* 1 column */ - int outIndex= 0; - - assert(height != 1); /* widthxheight can't be 1x1 */ - halfWidth= 1; - /* one vertical column with possible pad bytes per row */ - /* average two at a time */ - - for (jj= 0; jj< halfHeight; jj++) { -#define BOX2 2 - float totals[4]; /* 4 is maximum components */ - float extractTotals[BOX2][4]; /* 4 is maximum components */ - int cc; - - /* average two at a time, instead of four */ - (*extractPackedPixel)(isSwap,src, - &extractTotals[0][0]); - (*extractPackedPixel)(isSwap,(src+rowSizeInBytes), - &extractTotals[1][0]); - for (cc = 0; cc < components; cc++) { - int kk; - - /* grab 2 pixels to average */ - totals[cc]= 0.0; - /* totals[RED]= extractTotals[0][RED]+extractTotals[1][RED]; - * totals[RED]/= 2.0; - */ - for (kk = 0; kk < BOX2; kk++) { - totals[cc]+= extractTotals[kk][cc]; - } - totals[cc]/= (float)BOX2; - } - (*shovePackedPixel)(totals,outIndex,dataOut); - - outIndex++; - src+= rowSizeInBytes + rowSizeInBytes; /* go to row after next */ - } - - assert(src == &((const char *)dataIn)[rowSizeInBytes*height]); - assert(outIndex == halfWidth * halfHeight); - } -} /* halve1DimagePackedPixel() */ - -/*===========================================================================*/ - -#ifdef RESOLVE_3D_TEXTURE_SUPPORT -/* - * This section ensures that GLU 1.3 will load and run on - * a GL 1.1 implementation. It dynamically resolves the - * call to glTexImage3D() which might not be available. - * Or is it might be supported as an extension. - * Contributed by Gerk Huisma . - */ - -typedef GLAPI void (GLAPIENTRY *TexImage3Dproc)( GLenum target, GLint level, - GLenum internalFormat, - GLsizei width, GLsizei height, - GLsizei depth, GLint border, - GLenum format, GLenum type, - const GLvoid *pixels ); - -static TexImage3Dproc pTexImage3D; - -#ifndef WIN32 -# include -# include -#else - WINGDIAPI PROC WINAPI wglGetProcAddress(LPCSTR); -#endif - -static void gluTexImage3D( GLenum target, GLint level, - GLenum internalFormat, - GLsizei width, GLsizei height, - GLsizei depth, GLint border, - GLenum format, GLenum type, - const GLvoid *pixels ) -{ - if (!pTexImage3D) { -#ifdef WIN32 - pTexImage3D = (TexImage3Dproc) wglGetProcAddress("glTexImage3D"); - if (!pTexImage3D) - pTexImage3D = (TexImage3Dproc) wglGetProcAddress("glTexImage3DEXT"); -#else - void *libHandle = dlopen("libgl.so", RTLD_LAZY); - pTexImage3D = TexImage3Dproc) dlsym(libHandle, "glTexImage3D" ); - if (!pTexImage3D) - pTexImage3D = (TexImage3Dproc) dlsym(libHandle,"glTexImage3DEXT"); - dlclose(libHandle); -#endif - } - - /* Now call glTexImage3D */ - if (pTexImage3D) - pTexImage3D(target, level, internalFormat, width, height, - depth, border, format, type, pixels); -} - -#else - -/* Only bind to a GL 1.2 implementation: */ -#define gluTexImage3D glTexImage3D - -#endif - -static GLint imageSize3D(GLint width, GLint height, GLint depth, - GLenum format, GLenum type) -{ - int components= elements_per_group(format,type); - int bytes_per_row= bytes_per_element(type) * width; - -assert(width > 0 && height > 0 && depth > 0); -assert(type != GL_BITMAP); - - return bytes_per_row * height * depth * components; -} /* imageSize3D() */ - -static void fillImage3D(const PixelStorageModes *psm, - GLint width, GLint height, GLint depth, GLenum format, - GLenum type, GLboolean indexFormat, - const void *userImage, GLushort *newImage) -{ - int myswapBytes; - int components; - int groupsPerLine; - int elementSize; - int groupSize; - int rowSize; - int padding; - int elementsPerLine; - int rowsPerImage; - int imageSize; - const GLubyte *start, *rowStart, *iter; - GLushort *iter2; - int ww, hh, dd, k; - - myswapBytes= psm->unpack_swap_bytes; - components= elements_per_group(format,type); - if (psm->unpack_row_length > 0) { - groupsPerLine= psm->unpack_row_length; - } - else { - groupsPerLine= width; - } - elementSize= bytes_per_element(type); - groupSize= elementSize * components; - if (elementSize == 1) myswapBytes= 0; - - /* 3dstuff begin */ - if (psm->unpack_image_height > 0) { - rowsPerImage= psm->unpack_image_height; - } - else { - rowsPerImage= height; - } - /* 3dstuff end */ - - rowSize= groupsPerLine * groupSize; - padding= rowSize % psm->unpack_alignment; - if (padding) { - rowSize+= psm->unpack_alignment - padding; - } - - imageSize= rowsPerImage * rowSize; /* 3dstuff */ - - start= (const GLubyte *)userImage + psm->unpack_skip_rows * rowSize + - psm->unpack_skip_pixels * groupSize + - /*3dstuff*/ - psm->unpack_skip_images * imageSize; - elementsPerLine = width * components; - - iter2= newImage; - for (dd= 0; dd < depth; dd++) { - rowStart= start; - - for (hh= 0; hh < height; hh++) { - iter= rowStart; - - for (ww= 0; ww < elementsPerLine; ww++) { - Type_Widget widget; - float extractComponents[4]; - - switch(type) { - case GL_UNSIGNED_BYTE: - if (indexFormat) { - *iter2++ = *iter; - } else { - *iter2++ = (*iter) * 257; - } - break; - case GL_BYTE: - if (indexFormat) { - *iter2++ = *((const GLbyte *) iter); - } else { - /* rough approx */ - *iter2++ = (*((const GLbyte *) iter)) * 516; - } - break; - case GL_UNSIGNED_BYTE_3_3_2: - extract332(0,iter,extractComponents); - for (k = 0; k < 3; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_BYTE_2_3_3_REV: - extract233rev(0,iter,extractComponents); - for (k = 0; k < 3; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_SHORT_5_6_5: - extract565(myswapBytes,iter,extractComponents); - for (k = 0; k < 3; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_SHORT_5_6_5_REV: - extract565rev(myswapBytes,iter,extractComponents); - for (k = 0; k < 3; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_SHORT_4_4_4_4: - extract4444(myswapBytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - extract4444rev(myswapBytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_SHORT_5_5_5_1: - extract5551(myswapBytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - extract1555rev(myswapBytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_SHORT: - case GL_SHORT: - if (myswapBytes) { - widget.ub[0] = iter[1]; - widget.ub[1] = iter[0]; - } else { - widget.ub[0] = iter[0]; - widget.ub[1] = iter[1]; - } - if (type == GL_SHORT) { - if (indexFormat) { - *iter2++ = widget.s[0]; - } else { - /* rough approx */ - *iter2++ = widget.s[0]*2; - } - } else { - *iter2++ = widget.us[0]; - } - break; - case GL_UNSIGNED_INT_8_8_8_8: - extract8888(myswapBytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_INT_8_8_8_8_REV: - extract8888rev(myswapBytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_INT_10_10_10_2: - extract1010102(myswapBytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_UNSIGNED_INT_2_10_10_10_REV: - extract2101010rev(myswapBytes,iter,extractComponents); - for (k = 0; k < 4; k++) { - *iter2++ = (GLushort)(extractComponents[k]*65535); - } - break; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - if (myswapBytes) { - widget.ub[0] = iter[3]; - widget.ub[1] = iter[2]; - widget.ub[2] = iter[1]; - widget.ub[3] = iter[0]; - } else { - widget.ub[0] = iter[0]; - widget.ub[1] = iter[1]; - widget.ub[2] = iter[2]; - widget.ub[3] = iter[3]; - } - if (type == GL_FLOAT) { - if (indexFormat) { - *iter2++ = widget.f; - } else { - *iter2++ = 65535 * widget.f; - } - } else if (type == GL_UNSIGNED_INT) { - if (indexFormat) { - *iter2++ = widget.ui; - } else { - *iter2++ = widget.ui >> 16; - } - } else { - if (indexFormat) { - *iter2++ = widget.i; - } else { - *iter2++ = widget.i >> 15; - } - } - break; - default: - assert(0); - } - - iter+= elementSize; - } /* for ww */ - rowStart+= rowSize; - - iter= rowStart; /* for assertion purposes */ - } /* for hh */ - - start+= imageSize; - } /* for dd */ - - /* iterators should be one byte past end */ - if (!isTypePackedPixel(type)) { - assert(iter2 == &newImage[width*height*depth*components]); - } - else { - assert(iter2 == &newImage[width*height*depth* - elements_per_group(format,0)]); - } - assert( iter == &((const GLubyte *)userImage)[rowSize*height*depth + - psm->unpack_skip_rows * rowSize + - psm->unpack_skip_pixels * groupSize + - /*3dstuff*/ - psm->unpack_skip_images * imageSize] ); -} /* fillImage3D () */ - -static void scaleInternal3D(GLint components, - GLint widthIn, GLint heightIn, GLint depthIn, - const GLushort *dataIn, - GLint widthOut, GLint heightOut, GLint depthOut, - GLushort *dataOut) -{ - float x, lowx, highx, convx, halfconvx; - float y, lowy, highy, convy, halfconvy; - float z, lowz, highz, convz, halfconvz; - float xpercent,ypercent,zpercent; - float percent; - /* Max components in a format is 4, so... */ - float totals[4]; - float volume; - int i,j,d,k,zint,yint,xint,xindex,yindex,zindex; - int temp; - - convz = (float) depthIn/depthOut; - convy = (float) heightIn/heightOut; - convx = (float) widthIn/widthOut; - halfconvx = convx/2; - halfconvy = convy/2; - halfconvz = convz/2; - for (d = 0; d < depthOut; d++) { - z = convz * (d+0.5); - if (depthIn > depthOut) { - highz = z + halfconvz; - lowz = z - halfconvz; - } else { - highz = z + 0.5; - lowz = z - 0.5; - } - for (i = 0; i < heightOut; i++) { - y = convy * (i+0.5); - if (heightIn > heightOut) { - highy = y + halfconvy; - lowy = y - halfconvy; - } else { - highy = y + 0.5; - lowy = y - 0.5; - } - for (j = 0; j < widthOut; j++) { - x = convx * (j+0.5); - if (widthIn > widthOut) { - highx = x + halfconvx; - lowx = x - halfconvx; - } else { - highx = x + 0.5; - lowx = x - 0.5; - } - - /* - ** Ok, now apply box filter to box that goes from (lowx, lowy, - ** lowz) to (highx, highy, highz) on input data into this pixel - ** on output data. - */ - totals[0] = totals[1] = totals[2] = totals[3] = 0.0; - volume = 0.0; - - z = lowz; - zint = floor(z); - while (z < highz) { - zindex = (zint + depthIn) % depthIn; - if (highz < zint+1) { - zpercent = highz - z; - } else { - zpercent = zint+1 - z; - } - - y = lowy; - yint = floor(y); - while (y < highy) { - yindex = (yint + heightIn) % heightIn; - if (highy < yint+1) { - ypercent = highy - y; - } else { - ypercent = yint+1 - y; - } - - x = lowx; - xint = floor(x); - - while (x < highx) { - xindex = (xint + widthIn) % widthIn; - if (highx < xint+1) { - xpercent = highx - x; - } else { - xpercent = xint+1 - x; - } - - percent = xpercent * ypercent * zpercent; - volume += percent; - - temp = (xindex + (yindex*widthIn) + - (zindex*widthIn*heightIn)) * components; - for (k = 0; k < components; k++) { - assert(0 <= (temp+k) && - (temp+k) < - (widthIn*heightIn*depthIn*components)); - totals[k] += dataIn[temp + k] * percent; - } - - xint++; - x = xint; - } /* while x */ - - yint++; - y = yint; - } /* while y */ - - zint++; - z = zint; - } /* while z */ - - temp = (j + (i * widthOut) + - (d*widthOut*heightOut)) * components; - for (k = 0; k < components; k++) { - /* totals[] should be rounded in the case of enlarging an - * RGB ramp when the type is 332 or 4444 - */ - assert(0 <= (temp+k) && - (temp+k) < (widthOut*heightOut*depthOut*components)); - dataOut[temp + k] = (totals[k]+0.5)/volume; - } - } /* for j */ - } /* for i */ - } /* for d */ -} /* scaleInternal3D() */ - -static void emptyImage3D(const PixelStorageModes *psm, - GLint width, GLint height, GLint depth, - GLenum format, GLenum type, GLboolean indexFormat, - const GLushort *oldImage, void *userImage) -{ - int myswapBytes; - int components; - int groupsPerLine; - int elementSize; - int groupSize; - int rowSize; - int padding; - GLubyte *start, *rowStart, *iter; - int elementsPerLine; - const GLushort *iter2; - int ii, jj, dd, k; - int rowsPerImage; - int imageSize; - - myswapBytes= psm->pack_swap_bytes; - components = elements_per_group(format,type); - if (psm->pack_row_length > 0) { - groupsPerLine = psm->pack_row_length; - } - else { - groupsPerLine = width; - } - - elementSize= bytes_per_element(type); - groupSize= elementSize * components; - if (elementSize == 1) myswapBytes= 0; - - /* 3dstuff begin */ - if (psm->pack_image_height > 0) { - rowsPerImage= psm->pack_image_height; - } - else { - rowsPerImage= height; - } - - /* 3dstuff end */ - - rowSize = groupsPerLine * groupSize; - padding = rowSize % psm->pack_alignment; - if (padding) { - rowSize+= psm->pack_alignment - padding; - } - - imageSize= rowsPerImage * rowSize; /* 3dstuff */ - - start = (GLubyte *)userImage + psm->pack_skip_rows * rowSize + - psm->pack_skip_pixels * groupSize + - /*3dstuff*/ - psm->pack_skip_images * imageSize; - elementsPerLine= width * components; - - iter2 = oldImage; - for (dd= 0; dd < depth; dd++) { - rowStart= start; - - for (ii= 0; ii< height; ii++) { - iter = rowStart; - - for (jj = 0; jj < elementsPerLine; jj++) { - Type_Widget widget; - float shoveComponents[4]; - - switch(type){ - case GL_UNSIGNED_BYTE: - if (indexFormat) { - *iter = *iter2++; - } else { - *iter = *iter2++ >> 8; - } - break; - case GL_BYTE: - if (indexFormat) { - *((GLbyte *) iter) = *iter2++; - } else { - *((GLbyte *) iter) = *iter2++ >> 9; - } - break; - case GL_UNSIGNED_BYTE_3_3_2: - for (k = 0; k < 3; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove332(shoveComponents,0,(void *)iter); - break; - case GL_UNSIGNED_BYTE_2_3_3_REV: - for (k = 0; k < 3; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove233rev(shoveComponents,0,(void *)iter); - break; - case GL_UNSIGNED_SHORT_5_6_5: - for (k = 0; k < 3; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove565(shoveComponents,0,(void *)&widget.us[0]); - if (myswapBytes) { - iter[0] = widget.ub[1]; - iter[1] = widget.ub[0]; - } - else { - *(GLushort *)iter = widget.us[0]; - } - break; - case GL_UNSIGNED_SHORT_5_6_5_REV: - for (k = 0; k < 3; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove565rev(shoveComponents,0,(void *)&widget.us[0]); - if (myswapBytes) { - iter[0] = widget.ub[1]; - iter[1] = widget.ub[0]; - } - else { - *(GLushort *)iter = widget.us[0]; - } - break; - case GL_UNSIGNED_SHORT_4_4_4_4: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove4444(shoveComponents,0,(void *)&widget.us[0]); - if (myswapBytes) { - iter[0] = widget.ub[1]; - iter[1] = widget.ub[0]; - } else { - *(GLushort *)iter = widget.us[0]; - } - break; - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove4444rev(shoveComponents,0,(void *)&widget.us[0]); - if (myswapBytes) { - iter[0] = widget.ub[1]; - iter[1] = widget.ub[0]; - } else { - *(GLushort *)iter = widget.us[0]; - } - break; - case GL_UNSIGNED_SHORT_5_5_5_1: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove5551(shoveComponents,0,(void *)&widget.us[0]); - if (myswapBytes) { - iter[0] = widget.ub[1]; - iter[1] = widget.ub[0]; - } else { - *(GLushort *)iter = widget.us[0]; - } - break; - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove1555rev(shoveComponents,0,(void *)&widget.us[0]); - if (myswapBytes) { - iter[0] = widget.ub[1]; - iter[1] = widget.ub[0]; - } else { - *(GLushort *)iter = widget.us[0]; - } - break; - case GL_UNSIGNED_SHORT: - case GL_SHORT: - if (type == GL_SHORT) { - if (indexFormat) { - widget.s[0] = *iter2++; - } else { - widget.s[0] = *iter2++ >> 1; - } - } else { - widget.us[0] = *iter2++; - } - if (myswapBytes) { - iter[0] = widget.ub[1]; - iter[1] = widget.ub[0]; - } else { - iter[0] = widget.ub[0]; - iter[1] = widget.ub[1]; - } - break; - case GL_UNSIGNED_INT_8_8_8_8: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove8888(shoveComponents,0,(void *)&widget.ui); - if (myswapBytes) { - iter[3] = widget.ub[0]; - iter[2] = widget.ub[1]; - iter[1] = widget.ub[2]; - iter[0] = widget.ub[3]; - } else { - *(GLuint *)iter= widget.ui; - } - break; - case GL_UNSIGNED_INT_8_8_8_8_REV: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove8888rev(shoveComponents,0,(void *)&widget.ui); - if (myswapBytes) { - iter[3] = widget.ub[0]; - iter[2] = widget.ub[1]; - iter[1] = widget.ub[2]; - iter[0] = widget.ub[3]; - } else { - *(GLuint *)iter= widget.ui; - } - break; - case GL_UNSIGNED_INT_10_10_10_2: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove1010102(shoveComponents,0,(void *)&widget.ui); - if (myswapBytes) { - iter[3] = widget.ub[0]; - iter[2] = widget.ub[1]; - iter[1] = widget.ub[2]; - iter[0] = widget.ub[3]; - } else { - *(GLuint *)iter= widget.ui; - } - break; - case GL_UNSIGNED_INT_2_10_10_10_REV: - for (k = 0; k < 4; k++) { - shoveComponents[k]= *iter2++ / 65535.0; - } - shove2101010rev(shoveComponents,0,(void *)&widget.ui); - if (myswapBytes) { - iter[3] = widget.ub[0]; - iter[2] = widget.ub[1]; - iter[1] = widget.ub[2]; - iter[0] = widget.ub[3]; - } else { - *(GLuint *)iter= widget.ui; - } - break; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - if (type == GL_FLOAT) { - if (indexFormat) { - widget.f = *iter2++; - } else { - widget.f = *iter2++ / (float) 65535.0; - } - } else if (type == GL_UNSIGNED_INT) { - if (indexFormat) { - widget.ui = *iter2++; - } else { - widget.ui = (unsigned int) *iter2++ * 65537; - } - } else { - if (indexFormat) { - widget.i = *iter2++; - } else { - widget.i = ((unsigned int) *iter2++ * 65537)/2; - } - } - if (myswapBytes) { - iter[3] = widget.ub[0]; - iter[2] = widget.ub[1]; - iter[1] = widget.ub[2]; - iter[0] = widget.ub[3]; - } else { - iter[0] = widget.ub[0]; - iter[1] = widget.ub[1]; - iter[2] = widget.ub[2]; - iter[3] = widget.ub[3]; - } - break; - default: - assert(0); - } - - iter+= elementSize; - } /* for jj */ - - rowStart+= rowSize; - } /* for ii */ - - start+= imageSize; - } /* for dd */ - - /* iterators should be one byte past end */ - if (!isTypePackedPixel(type)) { - assert(iter2 == &oldImage[width*height*depth*components]); - } - else { - assert(iter2 == &oldImage[width*height*depth* - elements_per_group(format,0)]); - } - assert( iter == &((GLubyte *)userImage)[rowSize*height*depth + - psm->unpack_skip_rows * rowSize + - psm->unpack_skip_pixels * groupSize + - /*3dstuff*/ - psm->unpack_skip_images * imageSize] ); -} /* emptyImage3D() */ - -static -int gluScaleImage3D(GLenum format, - GLint widthIn, GLint heightIn, GLint depthIn, - GLenum typeIn, const void *dataIn, - GLint widthOut, GLint heightOut, GLint depthOut, - GLenum typeOut, void *dataOut) -{ - int components; - GLushort *beforeImage, *afterImage; - PixelStorageModes psm; - - if (widthIn == 0 || heightIn == 0 || depthIn == 0 || - widthOut == 0 || heightOut == 0 || depthOut == 0) { - return 0; - } - - if (widthIn < 0 || heightIn < 0 || depthIn < 0 || - widthOut < 0 || heightOut < 0 || depthOut < 0) { - return GLU_INVALID_VALUE; - } - - if (!legalFormat(format) || !legalType(typeIn) || !legalType(typeOut) || - typeIn == GL_BITMAP || typeOut == GL_BITMAP) { - return GLU_INVALID_ENUM; - } - if (!isLegalFormatForPackedPixelType(format, typeIn)) { - return GLU_INVALID_OPERATION; - } - if (!isLegalFormatForPackedPixelType(format, typeOut)) { - return GLU_INVALID_OPERATION; - } - - beforeImage = malloc(imageSize3D(widthIn, heightIn, depthIn, format, - GL_UNSIGNED_SHORT)); - afterImage = malloc(imageSize3D(widthOut, heightOut, depthOut, format, - GL_UNSIGNED_SHORT)); - if (beforeImage == NULL || afterImage == NULL) { - return GLU_OUT_OF_MEMORY; - } - retrieveStoreModes3D(&psm); - - fillImage3D(&psm,widthIn,heightIn,depthIn,format,typeIn, is_index(format), - dataIn, beforeImage); - components = elements_per_group(format,0); - scaleInternal3D(components,widthIn,heightIn,depthIn,beforeImage, - widthOut,heightOut,depthOut,afterImage); - emptyImage3D(&psm,widthOut,heightOut,depthOut,format,typeOut, - is_index(format),afterImage, dataOut); - free((void *) beforeImage); - free((void *) afterImage); - - return 0; -} /* gluScaleImage3D() */ - - -static void closestFit3D(GLenum target, GLint width, GLint height, GLint depth, - GLint internalFormat, GLenum format, GLenum type, - GLint *newWidth, GLint *newHeight, GLint *newDepth) -{ - GLint widthPowerOf2= nearestPower(width); - GLint heightPowerOf2= nearestPower(height); - GLint depthPowerOf2= nearestPower(depth); - GLint proxyWidth; - - do { - /* compute level 1 width & height & depth, clamping each at 1 */ - GLint widthAtLevelOne= (widthPowerOf2 > 1) ? - widthPowerOf2 >> 1 : - widthPowerOf2; - GLint heightAtLevelOne= (heightPowerOf2 > 1) ? - heightPowerOf2 >> 1 : - heightPowerOf2; - GLint depthAtLevelOne= (depthPowerOf2 > 1) ? - depthPowerOf2 >> 1 : - depthPowerOf2; - GLenum proxyTarget = GL_PROXY_TEXTURE_3D; - assert(widthAtLevelOne > 0); - assert(heightAtLevelOne > 0); - assert(depthAtLevelOne > 0); - - /* does width x height x depth at level 1 & all their mipmaps fit? */ - assert(target == GL_TEXTURE_3D || target == GL_PROXY_TEXTURE_3D); - gluTexImage3D(proxyTarget, 1, /* must be non-zero */ - internalFormat, - widthAtLevelOne,heightAtLevelOne,depthAtLevelOne, - 0,format,type,NULL); - glGetTexLevelParameteriv(proxyTarget, 1,GL_TEXTURE_WIDTH,&proxyWidth); - /* does it fit??? */ - if (proxyWidth == 0) { /* nope, so try again with these sizes */ - if (widthPowerOf2 == 1 && heightPowerOf2 == 1 && - depthPowerOf2 == 1) { - *newWidth= *newHeight= *newDepth= 1; /* must fit 1x1x1 texture */ - return; - } - widthPowerOf2= widthAtLevelOne; - heightPowerOf2= heightAtLevelOne; - depthPowerOf2= depthAtLevelOne; - } - /* else it does fit */ - } while (proxyWidth == 0); - /* loop must terminate! */ - - /* return the width & height at level 0 that fits */ - *newWidth= widthPowerOf2; - *newHeight= heightPowerOf2; - *newDepth= depthPowerOf2; -/*printf("Proxy Textures\n");*/ -} /* closestFit3D() */ - -static void halveImagePackedPixelSlice(int components, - void (*extractPackedPixel) - (int, const void *,GLfloat []), - void (*shovePackedPixel) - (const GLfloat [],int, void *), - GLint width, GLint height, GLint depth, - const void *dataIn, void *dataOut, - GLint pixelSizeInBytes, - GLint rowSizeInBytes, - GLint imageSizeInBytes, - GLint isSwap) -{ - int ii, jj; - int halfWidth= width / 2; - int halfHeight= height / 2; - int halfDepth= depth / 2; - const char *src= (const char *)dataIn; - int outIndex= 0; - - assert((width == 1 || height == 1) && depth >= 2); - - if (width == height) { /* a 1-pixel column viewed from top */ - assert(width == 1 && height == 1); - assert(depth >= 2); - - for (ii= 0; ii< halfDepth; ii++) { - float totals[4]; - float extractTotals[BOX2][4]; - int cc; - - (*extractPackedPixel)(isSwap,src,&extractTotals[0][0]); - (*extractPackedPixel)(isSwap,(src+imageSizeInBytes), - &extractTotals[1][0]); - for (cc = 0; cc < components; cc++) { - int kk; - - /* average 2 pixels since only a column */ - totals[cc]= 0.0; - /* totals[RED]= extractTotals[0][RED]+extractTotals[1][RED]; - * totals[RED]/= 2.0; - */ - for (kk = 0; kk < BOX2; kk++) { - totals[cc]+= extractTotals[kk][cc]; - } - totals[cc]/= (float)BOX2; - } /* for cc */ - - (*shovePackedPixel)(totals,outIndex,dataOut); - outIndex++; - /* skip over to next group of 2 */ - src+= imageSizeInBytes + imageSizeInBytes; - } /* for ii */ - } - else if (height == 1) { /* horizontal slice viewed from top */ - assert(width != 1); - - for (ii= 0; ii< halfDepth; ii++) { - for (jj= 0; jj< halfWidth; jj++) { - float totals[4]; - float extractTotals[BOX4][4]; - int cc; - - (*extractPackedPixel)(isSwap,src, - &extractTotals[0][0]); - (*extractPackedPixel)(isSwap,(src+pixelSizeInBytes), - &extractTotals[1][0]); - (*extractPackedPixel)(isSwap,(src+imageSizeInBytes), - &extractTotals[2][0]); - (*extractPackedPixel)(isSwap, - (src+imageSizeInBytes+pixelSizeInBytes), - &extractTotals[3][0]); - for (cc = 0; cc < components; cc++) { - int kk; - - /* grab 4 pixels to average */ - totals[cc]= 0.0; - /* totals[RED]= extractTotals[0][RED]+extractTotals[1][RED]+ - * extractTotals[2][RED]+extractTotals[3][RED]; - * totals[RED]/= 4.0; - */ - for (kk = 0; kk < BOX4; kk++) { - totals[cc]+= extractTotals[kk][cc]; - } - totals[cc]/= (float)BOX4; - } - (*shovePackedPixel)(totals,outIndex,dataOut); - - outIndex++; - /* skip over to next horizontal square of 4 */ - src+= imageSizeInBytes + imageSizeInBytes; - } - } - - /* assert() */ - } - else if (width == 1) { /* vertical slice viewed from top */ - assert(height != 1); - - for (ii= 0; ii< halfDepth; ii++) { - for (jj= 0; jj< halfHeight; jj++) { - float totals[4]; - float extractTotals[BOX4][4]; - int cc; - - (*extractPackedPixel)(isSwap,src, - &extractTotals[0][0]); - (*extractPackedPixel)(isSwap,(src+rowSizeInBytes), - &extractTotals[1][0]); - (*extractPackedPixel)(isSwap,(src+imageSizeInBytes), - &extractTotals[2][0]); - (*extractPackedPixel)(isSwap, - (src+imageSizeInBytes+rowSizeInBytes), - &extractTotals[3][0]); - for (cc = 0; cc < components; cc++) { - int kk; - - /* grab 4 pixels to average */ - totals[cc]= 0.0; - /* totals[RED]= extractTotals[0][RED]+extractTotals[1][RED]+ - * extractTotals[2][RED]+extractTotals[3][RED]; - * totals[RED]/= 4.0; - */ - for (kk = 0; kk < BOX4; kk++) { - totals[cc]+= extractTotals[kk][cc]; - } - totals[cc]/= (float)BOX4; - } - (*shovePackedPixel)(totals,outIndex,dataOut); - - outIndex++; - - /* skip over to next vertical square of 4 */ - src+= imageSizeInBytes + imageSizeInBytes; - } - } - /* assert() */ - } - -} /* halveImagePackedPixelSlice() */ - -static void halveImagePackedPixel3D(int components, - void (*extractPackedPixel) - (int, const void *,GLfloat []), - void (*shovePackedPixel) - (const GLfloat [],int, void *), - GLint width, GLint height, GLint depth, - const void *dataIn, void *dataOut, - GLint pixelSizeInBytes, - GLint rowSizeInBytes, - GLint imageSizeInBytes, - GLint isSwap) -{ - if (depth == 1) { - assert(1 <= width && 1 <= height); - - halveImagePackedPixel(components,extractPackedPixel,shovePackedPixel, - width,height,dataIn,dataOut,pixelSizeInBytes, - rowSizeInBytes,isSwap); - return; - } - /* a horizontal or vertical slice viewed from top */ - else if (width == 1 || height == 1) { - assert(1 <= depth); - - halveImagePackedPixelSlice(components, - extractPackedPixel,shovePackedPixel, - width, height, depth, dataIn, dataOut, - pixelSizeInBytes, rowSizeInBytes, - imageSizeInBytes, isSwap); - return; - } - { - int ii, jj, dd; - - int halfWidth= width / 2; - int halfHeight= height / 2; - int halfDepth= depth / 2; - const char *src= (const char *) dataIn; - int padBytes= rowSizeInBytes - (width*pixelSizeInBytes); - int outIndex= 0; - - for (dd= 0; dd < halfDepth; dd++) { - for (ii= 0; ii< halfHeight; ii++) { - for (jj= 0; jj< halfWidth; jj++) { -#define BOX8 8 - float totals[4]; /* 4 is maximum components */ - float extractTotals[BOX8][4]; /* 4 is maximum components */ - int cc; - - (*extractPackedPixel)(isSwap,src, - &extractTotals[0][0]); - (*extractPackedPixel)(isSwap,(src+pixelSizeInBytes), - &extractTotals[1][0]); - (*extractPackedPixel)(isSwap,(src+rowSizeInBytes), - &extractTotals[2][0]); - (*extractPackedPixel)(isSwap, - (src+rowSizeInBytes+pixelSizeInBytes), - &extractTotals[3][0]); - - (*extractPackedPixel)(isSwap,(src+imageSizeInBytes), - &extractTotals[4][0]); - (*extractPackedPixel)(isSwap,(src+pixelSizeInBytes+imageSizeInBytes), - &extractTotals[5][0]); - (*extractPackedPixel)(isSwap,(src+rowSizeInBytes+imageSizeInBytes), - &extractTotals[6][0]); - (*extractPackedPixel)(isSwap, - (src+rowSizeInBytes+pixelSizeInBytes+imageSizeInBytes), - &extractTotals[7][0]); - for (cc = 0; cc < components; cc++) { - int kk; - - /* grab 8 pixels to average */ - totals[cc]= 0.0; - /* totals[RED]= extractTotals[0][RED]+extractTotals[1][RED]+ - * extractTotals[2][RED]+extractTotals[3][RED]+ - * extractTotals[4][RED]+extractTotals[5][RED]+ - * extractTotals[6][RED]+extractTotals[7][RED]; - * totals[RED]/= 8.0; - */ - for (kk = 0; kk < BOX8; kk++) { - totals[cc]+= extractTotals[kk][cc]; - } - totals[cc]/= (float)BOX8; - } - (*shovePackedPixel)(totals,outIndex,dataOut); - - outIndex++; - /* skip over to next square of 4 */ - src+= pixelSizeInBytes + pixelSizeInBytes; - } - /* skip past pad bytes, if any, to get to next row */ - src+= padBytes; - - /* src is at beginning of a row here, but it's the second row of - * the square block of 4 pixels that we just worked on so we - * need to go one more row. - * i.e., - * OO... - * here -->OO... - * but want -->OO... - * OO... - * ... - */ - src+= rowSizeInBytes; - } - - src+= imageSizeInBytes; - } /* for dd */ - - /* both pointers must reach one byte after the end */ - assert(src == &((const char *)dataIn)[rowSizeInBytes*height*depth]); - assert(outIndex == halfWidth * halfHeight * halfDepth); - } /* for dd */ - -} /* halveImagePackedPixel3D() */ - -static int gluBuild3DMipmapLevelsCore(GLenum target, GLint internalFormat, - GLsizei width, - GLsizei height, - GLsizei depth, - GLsizei widthPowerOf2, - GLsizei heightPowerOf2, - GLsizei depthPowerOf2, - GLenum format, GLenum type, - GLint userLevel, - GLint baseLevel,GLint maxLevel, - const void *data) -{ - GLint newWidth, newHeight, newDepth; - GLint level, levels; - const void *usersImage; - void *srcImage, *dstImage; - __GLU_INIT_SWAP_IMAGE; - GLint memReq; - GLint cmpts; - - GLint myswapBytes, groupsPerLine, elementSize, groupSize; - GLint rowsPerImage, imageSize; - GLint rowSize, padding; - PixelStorageModes psm; - - assert(checkMipmapArgs(internalFormat,format,type) == 0); - assert(width >= 1 && height >= 1 && depth >= 1); - assert(type != GL_BITMAP); - - srcImage = dstImage = NULL; - - newWidth= widthPowerOf2; - newHeight= heightPowerOf2; - newDepth= depthPowerOf2; - levels = computeLog(newWidth); - level = computeLog(newHeight); - if (level > levels) levels=level; - level = computeLog(newDepth); - if (level > levels) levels=level; - - levels+= userLevel; - - retrieveStoreModes3D(&psm); - myswapBytes = psm.unpack_swap_bytes; - cmpts = elements_per_group(format,type); - if (psm.unpack_row_length > 0) { - groupsPerLine = psm.unpack_row_length; - } else { - groupsPerLine = width; - } - - elementSize = bytes_per_element(type); - groupSize = elementSize * cmpts; - if (elementSize == 1) myswapBytes = 0; - - /* 3dstuff begin */ - if (psm.unpack_image_height > 0) { - rowsPerImage= psm.unpack_image_height; - } - else { - rowsPerImage= height; - } - - /* 3dstuff end */ - rowSize = groupsPerLine * groupSize; - padding = (rowSize % psm.unpack_alignment); - if (padding) { - rowSize += psm.unpack_alignment - padding; - } - - imageSize= rowsPerImage * rowSize; /* 3dstuff */ - - usersImage = (const GLubyte *)data + psm.unpack_skip_rows * rowSize + - psm.unpack_skip_pixels * groupSize + - /* 3dstuff */ - psm.unpack_skip_images * imageSize; - - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_SKIP_IMAGES, 0); - glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, 0); - - level = userLevel; - - if (width == newWidth && height == newHeight && depth == newDepth) { - /* Use usersImage for level userLevel */ - if (baseLevel <= level && level <= maxLevel) { - gluTexImage3D(target, level, internalFormat, width, - height, depth, 0, format, type, - usersImage); - } - if(levels == 0) { /* we're done. clean up and return */ - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - glPixelStorei(GL_UNPACK_SKIP_IMAGES, psm.unpack_skip_images); - glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, psm.unpack_image_height); - return 0; - } - { - int nextWidth= newWidth/2; - int nextHeight= newHeight/2; - int nextDepth= newDepth/2; - - /* clamp to 1 */ - if (nextWidth < 1) nextWidth= 1; - if (nextHeight < 1) nextHeight= 1; - if (nextDepth < 1) nextDepth= 1; - memReq = imageSize3D(nextWidth, nextHeight, nextDepth, format, type); - } - switch(type) { - case GL_UNSIGNED_BYTE: - dstImage = (GLubyte *)malloc(memReq); - break; - case GL_BYTE: - dstImage = (GLbyte *)malloc(memReq); - break; - case GL_UNSIGNED_SHORT: - dstImage = (GLushort *)malloc(memReq); - break; - case GL_SHORT: - dstImage = (GLshort *)malloc(memReq); - break; - case GL_UNSIGNED_INT: - dstImage = (GLuint *)malloc(memReq); - break; - case GL_INT: - dstImage = (GLint *)malloc(memReq); - break; - case GL_FLOAT: - dstImage = (GLfloat *)malloc(memReq); - break; - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - dstImage = (GLubyte *)malloc(memReq); - break; - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - dstImage = (GLushort *)malloc(memReq); - break; - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - dstImage = (GLuint *)malloc(memReq); - break; - default: - return GLU_INVALID_ENUM; /* assertion */ - } - if (dstImage == NULL) { - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - glPixelStorei(GL_UNPACK_SKIP_IMAGES, psm.unpack_skip_images); - glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, psm.unpack_image_height); - return GLU_OUT_OF_MEMORY; - } - else - switch(type) { - case GL_UNSIGNED_BYTE: - if (depth > 1) { - halveImage3D(cmpts,extractUbyte,shoveUbyte, - width,height,depth, - usersImage,dstImage,elementSize,groupSize,rowSize, - imageSize,myswapBytes); - } - else { - halveImage_ubyte(cmpts,width,height,usersImage,dstImage, - elementSize,rowSize,groupSize); - } - break; - case GL_BYTE: - if (depth > 1) { - halveImage3D(cmpts,extractSbyte,shoveSbyte, - width,height,depth, - usersImage,dstImage,elementSize,groupSize,rowSize, - imageSize,myswapBytes); - } - else { - halveImage_byte(cmpts,width,height,usersImage,dstImage, - elementSize,rowSize,groupSize); - } - break; - case GL_UNSIGNED_SHORT: - if (depth > 1) { - halveImage3D(cmpts,extractUshort,shoveUshort, - width,height,depth, - usersImage,dstImage,elementSize,groupSize,rowSize, - imageSize,myswapBytes); - } - else { - halveImage_ushort(cmpts,width,height,usersImage,dstImage, - elementSize,rowSize,groupSize,myswapBytes); - } - break; - case GL_SHORT: - if (depth > 1) { - halveImage3D(cmpts,extractSshort,shoveSshort, - width,height,depth, - usersImage,dstImage,elementSize,groupSize,rowSize, - imageSize,myswapBytes); - } - else { - halveImage_short(cmpts,width,height,usersImage,dstImage, - elementSize,rowSize,groupSize,myswapBytes); - } - break; - case GL_UNSIGNED_INT: - if (depth > 1) { - halveImage3D(cmpts,extractUint,shoveUint, - width,height,depth, - usersImage,dstImage,elementSize,groupSize,rowSize, - imageSize,myswapBytes); - } - else { - halveImage_uint(cmpts,width,height,usersImage,dstImage, - elementSize,rowSize,groupSize,myswapBytes); - } - break; - case GL_INT: - if (depth > 1) { - halveImage3D(cmpts,extractSint,shoveSint, - width,height,depth, - usersImage,dstImage,elementSize,groupSize,rowSize, - imageSize,myswapBytes); - } - else { - halveImage_int(cmpts,width,height,usersImage,dstImage, - elementSize,rowSize,groupSize,myswapBytes); - } - break; - case GL_FLOAT: - if (depth > 1 ) { - halveImage3D(cmpts,extractFloat,shoveFloat, - width,height,depth, - usersImage,dstImage,elementSize,groupSize,rowSize, - imageSize,myswapBytes); - } - else { - halveImage_float(cmpts,width,height,usersImage,dstImage, - elementSize,rowSize,groupSize,myswapBytes); - } - break; - case GL_UNSIGNED_BYTE_3_3_2: - assert(format == GL_RGB); - halveImagePackedPixel3D(3,extract332,shove332, - width,height,depth,usersImage,dstImage, - elementSize,rowSize,imageSize,myswapBytes); - break; - case GL_UNSIGNED_BYTE_2_3_3_REV: - assert(format == GL_RGB); - halveImagePackedPixel3D(3,extract233rev,shove233rev, - width,height,depth,usersImage,dstImage, - elementSize,rowSize,imageSize,myswapBytes); - break; - case GL_UNSIGNED_SHORT_5_6_5: - halveImagePackedPixel3D(3,extract565,shove565, - width,height,depth,usersImage,dstImage, - elementSize,rowSize,imageSize,myswapBytes); - break; - case GL_UNSIGNED_SHORT_5_6_5_REV: - halveImagePackedPixel3D(3,extract565rev,shove565rev, - width,height,depth,usersImage,dstImage, - elementSize,rowSize,imageSize,myswapBytes); - break; - case GL_UNSIGNED_SHORT_4_4_4_4: - halveImagePackedPixel3D(4,extract4444,shove4444, - width,height,depth,usersImage,dstImage, - elementSize,rowSize,imageSize,myswapBytes); - break; - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - halveImagePackedPixel3D(4,extract4444rev,shove4444rev, - width,height,depth,usersImage,dstImage, - elementSize,rowSize,imageSize,myswapBytes); - break; - case GL_UNSIGNED_SHORT_5_5_5_1: - halveImagePackedPixel3D(4,extract5551,shove5551, - width,height,depth,usersImage,dstImage, - elementSize,rowSize,imageSize,myswapBytes); - break; - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - halveImagePackedPixel3D(4,extract1555rev,shove1555rev, - width,height,depth,usersImage,dstImage, - elementSize,rowSize,imageSize,myswapBytes); - break; - case GL_UNSIGNED_INT_8_8_8_8: - halveImagePackedPixel3D(4,extract8888,shove8888, - width,height,depth,usersImage,dstImage, - elementSize,rowSize,imageSize,myswapBytes); - break; - case GL_UNSIGNED_INT_8_8_8_8_REV: - halveImagePackedPixel3D(4,extract8888rev,shove8888rev, - width,height,depth,usersImage,dstImage, - elementSize,rowSize,imageSize,myswapBytes); - break; - case GL_UNSIGNED_INT_10_10_10_2: - halveImagePackedPixel3D(4,extract1010102,shove1010102, - width,height,depth,usersImage,dstImage, - elementSize,rowSize,imageSize,myswapBytes); - break; - case GL_UNSIGNED_INT_2_10_10_10_REV: - halveImagePackedPixel3D(4,extract2101010rev,shove2101010rev, - width,height,depth,usersImage,dstImage, - elementSize,rowSize,imageSize,myswapBytes); - break; - default: - assert(0); - break; - } - newWidth = width/2; - newHeight = height/2; - newDepth = depth/2; - /* clamp to 1 */ - if (newWidth < 1) newWidth= 1; - if (newHeight < 1) newHeight= 1; - if (newDepth < 1) newDepth= 1; - - myswapBytes = 0; - rowSize = newWidth * groupSize; - imageSize= rowSize * newHeight; /* 3dstuff */ - memReq = imageSize3D(newWidth, newHeight, newDepth, format, type); - /* Swap srcImage and dstImage */ - __GLU_SWAP_IMAGE(srcImage,dstImage); - switch(type) { - case GL_UNSIGNED_BYTE: - dstImage = (GLubyte *)malloc(memReq); - break; - case GL_BYTE: - dstImage = (GLbyte *)malloc(memReq); - break; - case GL_UNSIGNED_SHORT: - dstImage = (GLushort *)malloc(memReq); - break; - case GL_SHORT: - dstImage = (GLshort *)malloc(memReq); - break; - case GL_UNSIGNED_INT: - dstImage = (GLuint *)malloc(memReq); - break; - case GL_INT: - dstImage = (GLint *)malloc(memReq); - break; - case GL_FLOAT: - dstImage = (GLfloat *)malloc(memReq); - break; - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - dstImage = (GLubyte *)malloc(memReq); - break; - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - dstImage = (GLushort *)malloc(memReq); - break; - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - dstImage = (GLuint *)malloc(memReq); - break; - default: - return GLU_INVALID_ENUM; /* assertion */ - } - if (dstImage == NULL) { - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - glPixelStorei(GL_UNPACK_SKIP_IMAGES, psm.unpack_skip_images); - glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, psm.unpack_image_height); - return GLU_OUT_OF_MEMORY; - } - /* level userLevel+1 is in srcImage; level userLevel already saved */ - level = userLevel+1; - } else {/* user's image is *not* nice power-of-2 sized square */ - memReq = imageSize3D(newWidth, newHeight, newDepth, format, type); - switch(type) { - case GL_UNSIGNED_BYTE: - dstImage = (GLubyte *)malloc(memReq); - break; - case GL_BYTE: - dstImage = (GLbyte *)malloc(memReq); - break; - case GL_UNSIGNED_SHORT: - dstImage = (GLushort *)malloc(memReq); - break; - case GL_SHORT: - dstImage = (GLshort *)malloc(memReq); - break; - case GL_UNSIGNED_INT: - dstImage = (GLuint *)malloc(memReq); - break; - case GL_INT: - dstImage = (GLint *)malloc(memReq); - break; - case GL_FLOAT: - dstImage = (GLfloat *)malloc(memReq); - break; - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - dstImage = (GLubyte *)malloc(memReq); - break; - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - dstImage = (GLushort *)malloc(memReq); - break; - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - dstImage = (GLuint *)malloc(memReq); - break; - default: - return GLU_INVALID_ENUM; /* assertion */ - } - - if (dstImage == NULL) { - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - glPixelStorei(GL_UNPACK_SKIP_IMAGES, psm.unpack_skip_images); - glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, psm.unpack_image_height); - return GLU_OUT_OF_MEMORY; - } - /*printf("Build3DMipmaps(): ScaleImage3D %d %d %d->%d %d %d\n", - width,height,depth,newWidth,newHeight,newDepth);*/ - - gluScaleImage3D(format, width, height, depth, type, usersImage, - newWidth, newHeight, newDepth, type, dstImage); - - myswapBytes = 0; - rowSize = newWidth * groupSize; - imageSize = rowSize * newHeight; /* 3dstuff */ - /* Swap dstImage and srcImage */ - __GLU_SWAP_IMAGE(srcImage,dstImage); - - if(levels != 0) { /* use as little memory as possible */ - { - int nextWidth= newWidth/2; - int nextHeight= newHeight/2; - int nextDepth= newDepth/2; - if (nextWidth < 1) nextWidth= 1; - if (nextHeight < 1) nextHeight= 1; - if (nextDepth < 1) nextDepth= 1; - - memReq = imageSize3D(nextWidth, nextHeight, nextDepth, format, type); - } - switch(type) { - case GL_UNSIGNED_BYTE: - dstImage = (GLubyte *)malloc(memReq); - break; - case GL_BYTE: - dstImage = (GLbyte *)malloc(memReq); - break; - case GL_UNSIGNED_SHORT: - dstImage = (GLushort *)malloc(memReq); - break; - case GL_SHORT: - dstImage = (GLshort *)malloc(memReq); - break; - case GL_UNSIGNED_INT: - dstImage = (GLuint *)malloc(memReq); - break; - case GL_INT: - dstImage = (GLint *)malloc(memReq); - break; - case GL_FLOAT: - dstImage = (GLfloat *)malloc(memReq); - break; - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - dstImage = (GLubyte *)malloc(memReq); - break; - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - dstImage = (GLushort *)malloc(memReq); - break; - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - dstImage = (GLuint *)malloc(memReq); - break; - default: - return GLU_INVALID_ENUM; /* assertion */ - } - if (dstImage == NULL) { - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - glPixelStorei(GL_UNPACK_SKIP_IMAGES, psm.unpack_skip_images); - glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, psm.unpack_image_height); - return GLU_OUT_OF_MEMORY; - } - } - /* level userLevel is in srcImage; nothing saved yet */ - level = userLevel; - } - - glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); - if (baseLevel <= level && level <= maxLevel) { - gluTexImage3D(target, level, internalFormat, newWidth, newHeight, newDepth, - 0,format, type, (void *)srcImage); - } - level++; /* update current level for the loop */ - for (; level <= levels; level++) { - switch(type) { - case GL_UNSIGNED_BYTE: - if (newDepth > 1) { - halveImage3D(cmpts,extractUbyte,shoveUbyte, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,groupSize,rowSize, - imageSize,myswapBytes); - } - else { - halveImage_ubyte(cmpts,newWidth,newHeight,srcImage,dstImage, - elementSize,rowSize,groupSize); - } - break; - case GL_BYTE: - if (newDepth > 1) { - halveImage3D(cmpts,extractSbyte,shoveSbyte, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,groupSize,rowSize, - imageSize,myswapBytes); - } - else { - halveImage_byte(cmpts,newWidth,newHeight,srcImage,dstImage, - elementSize,rowSize,groupSize); - } - break; - case GL_UNSIGNED_SHORT: - if (newDepth > 1) { - halveImage3D(cmpts,extractUshort,shoveUshort, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,groupSize,rowSize, - imageSize,myswapBytes); - } - else { - halveImage_ushort(cmpts,newWidth,newHeight,srcImage,dstImage, - elementSize,rowSize,groupSize,myswapBytes); - } - break; - case GL_SHORT: - if (newDepth > 1) { - halveImage3D(cmpts,extractSshort,shoveSshort, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,groupSize,rowSize, - imageSize,myswapBytes); - } - else { - halveImage_short(cmpts,newWidth,newHeight,srcImage,dstImage, - elementSize,rowSize,groupSize,myswapBytes); - } - break; - case GL_UNSIGNED_INT: - if (newDepth > 1) { - halveImage3D(cmpts,extractUint,shoveUint, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,groupSize,rowSize, - imageSize,myswapBytes); - } - else { - halveImage_uint(cmpts,newWidth,newHeight,srcImage,dstImage, - elementSize,rowSize,groupSize,myswapBytes); - } - break; - case GL_INT: - if (newDepth > 1) { - halveImage3D(cmpts,extractSint,shoveSint, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,groupSize,rowSize, - imageSize,myswapBytes); - } - else { - halveImage_int(cmpts,newWidth,newHeight,srcImage,dstImage, - elementSize,rowSize,groupSize,myswapBytes); - } - break; - case GL_FLOAT: - if (newDepth > 1) { - halveImage3D(cmpts,extractFloat,shoveFloat, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,groupSize,rowSize, - imageSize,myswapBytes); - } - else { - halveImage_float(cmpts,newWidth,newHeight,srcImage,dstImage, - elementSize,rowSize,groupSize,myswapBytes); - } - break; - case GL_UNSIGNED_BYTE_3_3_2: - halveImagePackedPixel3D(3,extract332,shove332, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,rowSize, - imageSize,myswapBytes); - break; - case GL_UNSIGNED_BYTE_2_3_3_REV: - halveImagePackedPixel3D(3,extract233rev,shove233rev, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,rowSize, - imageSize,myswapBytes); - break; - case GL_UNSIGNED_SHORT_5_6_5: - halveImagePackedPixel3D(3,extract565,shove565, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,rowSize, - imageSize,myswapBytes); - break; - case GL_UNSIGNED_SHORT_5_6_5_REV: - halveImagePackedPixel3D(3,extract565rev,shove565rev, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,rowSize, - imageSize,myswapBytes); - break; - case GL_UNSIGNED_SHORT_4_4_4_4: - halveImagePackedPixel3D(4,extract4444,shove4444, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,rowSize, - imageSize,myswapBytes); - break; - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - halveImagePackedPixel3D(4,extract4444rev,shove4444rev, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,rowSize, - imageSize,myswapBytes); - break; - case GL_UNSIGNED_SHORT_5_5_5_1: - halveImagePackedPixel3D(4,extract5551,shove5551, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,rowSize, - imageSize,myswapBytes); - break; - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - halveImagePackedPixel3D(4,extract1555rev,shove1555rev, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,rowSize, - imageSize,myswapBytes); - break; - case GL_UNSIGNED_INT_8_8_8_8: - halveImagePackedPixel3D(4,extract8888,shove8888, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,rowSize, - imageSize,myswapBytes); - break; - case GL_UNSIGNED_INT_8_8_8_8_REV: - halveImagePackedPixel3D(4,extract8888rev,shove8888rev, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,rowSize, - imageSize,myswapBytes); - break; - case GL_UNSIGNED_INT_10_10_10_2: - halveImagePackedPixel3D(4,extract1010102,shove1010102, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,rowSize, - imageSize,myswapBytes); - break; - case GL_UNSIGNED_INT_2_10_10_10_REV: - halveImagePackedPixel3D(4,extract2101010rev,shove2101010rev, - newWidth,newHeight,newDepth, - srcImage,dstImage,elementSize,rowSize, - imageSize,myswapBytes); - break; - default: - assert(0); - break; - } - - __GLU_SWAP_IMAGE(srcImage,dstImage); - - if (newWidth > 1) { newWidth /= 2; rowSize /= 2;} - if (newHeight > 1) { newHeight /= 2; imageSize = rowSize * newHeight; } - if (newDepth > 1) newDepth /= 2; - { - /* call tex image with srcImage untouched since it's not padded */ - if (baseLevel <= level && level <= maxLevel) { - gluTexImage3D(target, level, internalFormat, newWidth, newHeight, - newDepth,0, format, type, (void *) srcImage); - } - } - } /* for level */ - glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); - glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); - glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); - glPixelStorei(GL_UNPACK_SKIP_IMAGES, psm.unpack_skip_images); - glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, psm.unpack_image_height); - - free(srcImage); /*if you get to here, a srcImage has always been malloc'ed*/ - if (dstImage) { /* if it's non-rectangular and only 1 level */ - free(dstImage); - } - return 0; -} /* gluBuild3DMipmapLevelsCore() */ - -GLint GLAPIENTRY -gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLenum type, - GLint userLevel, GLint baseLevel, GLint maxLevel, - const void *data) -{ - int level, levels; - - int rc= checkMipmapArgs(internalFormat,format,type); - if (rc != 0) return rc; - - if (width < 1 || height < 1 || depth < 1) { - return GLU_INVALID_VALUE; - } - - if(type == GL_BITMAP) { - return GLU_INVALID_ENUM; - } - - levels = computeLog(width); - level = computeLog(height); - if (level > levels) levels=level; - level = computeLog(depth); - if (level > levels) levels=level; - - levels+= userLevel; - if (!isLegalLevels(userLevel,baseLevel,maxLevel,levels)) - return GLU_INVALID_VALUE; - - return gluBuild3DMipmapLevelsCore(target, internalFormat, - width, height, depth, - width, height, depth, - format, type, - userLevel, baseLevel, maxLevel, - data); -} /* gluBuild3DMipmapLevels() */ - -GLint GLAPIENTRY -gluBuild3DMipmaps(GLenum target, GLint internalFormat, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLenum type, const void *data) -{ - GLint widthPowerOf2, heightPowerOf2, depthPowerOf2; - int level, levels; - - int rc= checkMipmapArgs(internalFormat,format,type); - if (rc != 0) return rc; - - if (width < 1 || height < 1 || depth < 1) { - return GLU_INVALID_VALUE; - } - - if(type == GL_BITMAP) { - return GLU_INVALID_ENUM; - } - - closestFit3D(target,width,height,depth,internalFormat,format,type, - &widthPowerOf2,&heightPowerOf2,&depthPowerOf2); - - levels = computeLog(widthPowerOf2); - level = computeLog(heightPowerOf2); - if (level > levels) levels=level; - level = computeLog(depthPowerOf2); - if (level > levels) levels=level; - - return gluBuild3DMipmapLevelsCore(target, internalFormat, - width, height, depth, - widthPowerOf2, heightPowerOf2, - depthPowerOf2, - format, type, 0, 0, levels, - data); -} /* gluBuild3DMipmaps() */ - -static GLdouble extractUbyte(int isSwap, const void *ubyte) -{ - isSwap= isSwap; /* turn off warnings */ - - assert(*((const GLubyte *)ubyte) <= 255); - - return (GLdouble)(*((const GLubyte *)ubyte)); -} /* extractUbyte() */ - -static void shoveUbyte(GLdouble value, int index, void *data) -{ - assert(0.0 <= value && value < 256.0); - - ((GLubyte *)data)[index]= (GLubyte)value; -} /* shoveUbyte() */ - -static GLdouble extractSbyte(int isSwap, const void *sbyte) -{ - isSwap= isSwap; /* turn off warnings */ - - assert(*((const GLbyte *)sbyte) <= 127); - - return (GLdouble)(*((const GLbyte *)sbyte)); -} /* extractSbyte() */ - -static void shoveSbyte(GLdouble value, int index, void *data) -{ - ((GLbyte *)data)[index]= (GLbyte)value; -} /* shoveSbyte() */ - -static GLdouble extractUshort(int isSwap, const void *uitem) -{ - GLushort ushort; - - if (isSwap) { - ushort= __GLU_SWAP_2_BYTES(uitem); - } - else { - ushort= *(const GLushort *)uitem; - } - - assert(ushort <= 65535); - - return (GLdouble)ushort; -} /* extractUshort() */ - -static void shoveUshort(GLdouble value, int index, void *data) -{ - assert(0.0 <= value && value < 65536.0); - - ((GLushort *)data)[index]= (GLushort)value; -} /* shoveUshort() */ - -static GLdouble extractSshort(int isSwap, const void *sitem) -{ - GLshort sshort; - - if (isSwap) { - sshort= __GLU_SWAP_2_BYTES(sitem); - } - else { - sshort= *(const GLshort *)sitem; - } - - assert(sshort <= 32767); - - return (GLdouble)sshort; -} /* extractSshort() */ - -static void shoveSshort(GLdouble value, int index, void *data) -{ - assert(0.0 <= value && value < 32768.0); - - ((GLshort *)data)[index]= (GLshort)value; -} /* shoveSshort() */ - -static GLdouble extractUint(int isSwap, const void *uitem) -{ - GLuint uint; - - if (isSwap) { - uint= __GLU_SWAP_4_BYTES(uitem); - } - else { - uint= *(const GLuint *)uitem; - } - - assert(uint <= 0xffffffff); - - return (GLdouble)uint; -} /* extractUint() */ - -static void shoveUint(GLdouble value, int index, void *data) -{ - assert(0.0 <= value && value <= (GLdouble) UINT_MAX); - - ((GLuint *)data)[index]= (GLuint)value; -} /* shoveUint() */ - -static GLdouble extractSint(int isSwap, const void *sitem) -{ - GLint sint; - - if (isSwap) { - sint= __GLU_SWAP_4_BYTES(sitem); - } - else { - sint= *(const GLint *)sitem; - } - - assert(sint <= 0x7fffffff); - - return (GLdouble)sint; -} /* extractSint() */ - -static void shoveSint(GLdouble value, int index, void *data) -{ - assert(0.0 <= value && value <= (GLdouble) INT_MAX); - - ((GLint *)data)[index]= (GLint)value; -} /* shoveSint() */ - -static GLdouble extractFloat(int isSwap, const void *item) -{ - GLfloat ffloat; - - if (isSwap) { - ffloat= __GLU_SWAP_4_BYTES(item); - } - else { - ffloat= *(const GLfloat *)item; - } - - assert(ffloat <= 1.0); - - return (GLdouble)ffloat; -} /* extractFloat() */ - -static void shoveFloat(GLdouble value, int index, void *data) -{ - assert(0.0 <= value && value <= 1.0); - - ((GLfloat *)data)[index]= value; -} /* shoveFloat() */ - -static void halveImageSlice(int components, - GLdouble (*extract)(int, const void *), - void (*shove)(GLdouble, int, void *), - GLint width, GLint height, GLint depth, - const void *dataIn, void *dataOut, - GLint elementSizeInBytes, - GLint groupSizeInBytes, - GLint rowSizeInBytes, - GLint imageSizeInBytes, - GLint isSwap) -{ - int ii, jj; - int halfWidth= width / 2; - int halfHeight= height / 2; - int halfDepth= depth / 2; - const char *src= (const char *)dataIn; - int padBytes= rowSizeInBytes - (width * groupSizeInBytes); - int outIndex= 0; - - assert((width == 1 || height == 1) && depth >= 2); - - if (width == height) { /* a 1-pixel column viewed from top */ - /* printf("1-column\n");*/ - assert(width == 1 && height == 1); - assert(depth >= 2); - - for (ii= 0; ii< halfDepth; ii++) { - int cc; - - for (cc = 0; cc < components; cc++) { - double totals[4]; - double extractTotals[BOX2][4]; - int kk; - - extractTotals[0][cc]= (*extract)(isSwap,src); - extractTotals[1][cc]= (*extract)(isSwap,(src+imageSizeInBytes)); - - /* average 2 pixels since only a column */ - totals[cc]= 0.0; - /* totals[RED]= extractTotals[0][RED]+extractTotals[1][RED]; - * totals[RED]/= 2.0; - */ - for (kk = 0; kk < BOX2; kk++) { - totals[cc]+= extractTotals[kk][cc]; - } - totals[cc]/= (double)BOX2; - - (*shove)(totals[cc],outIndex,dataOut); - outIndex++; - src+= elementSizeInBytes; - } /* for cc */ - - /* skip over to next group of 2 */ - src+= rowSizeInBytes; - } /* for ii */ - - assert(src == &((const char *)dataIn)[rowSizeInBytes*height*depth]); - assert(outIndex == halfDepth * components); - } - else if (height == 1) { /* horizontal slice viewed from top */ - /* printf("horizontal slice\n"); */ - assert(width != 1); - - for (ii= 0; ii< halfDepth; ii++) { - for (jj= 0; jj< halfWidth; jj++) { - int cc; - - for (cc = 0; cc < components; cc++) { - int kk; - double totals[4]; - double extractTotals[BOX4][4]; - - extractTotals[0][cc]=(*extract)(isSwap,src); - extractTotals[1][cc]=(*extract)(isSwap, - (src+groupSizeInBytes)); - extractTotals[2][cc]=(*extract)(isSwap, - (src+imageSizeInBytes)); - extractTotals[3][cc]=(*extract)(isSwap, - (src+imageSizeInBytes+groupSizeInBytes)); - - /* grab 4 pixels to average */ - totals[cc]= 0.0; - /* totals[RED]= extractTotals[0][RED]+extractTotals[1][RED]+ - * extractTotals[2][RED]+extractTotals[3][RED]; - * totals[RED]/= 4.0; - */ - for (kk = 0; kk < BOX4; kk++) { - totals[cc]+= extractTotals[kk][cc]; - } - totals[cc]/= (double)BOX4; - - (*shove)(totals[cc],outIndex,dataOut); - outIndex++; - - src+= elementSizeInBytes; - } /* for cc */ - - /* skip over to next horizontal square of 4 */ - src+= groupSizeInBytes; - } /* for jj */ - src+= padBytes; - - src+= rowSizeInBytes; - } /* for ii */ - - assert(src == &((const char *)dataIn)[rowSizeInBytes*height*depth]); - assert(outIndex == halfWidth * halfDepth * components); - } - else if (width == 1) { /* vertical slice viewed from top */ - /* printf("vertical slice\n"); */ - assert(height != 1); - - for (ii= 0; ii< halfDepth; ii++) { - for (jj= 0; jj< halfHeight; jj++) { - int cc; - - for (cc = 0; cc < components; cc++) { - int kk; - double totals[4]; - double extractTotals[BOX4][4]; - - extractTotals[0][cc]=(*extract)(isSwap,src); - extractTotals[1][cc]=(*extract)(isSwap, - (src+rowSizeInBytes)); - extractTotals[2][cc]=(*extract)(isSwap, - (src+imageSizeInBytes)); - extractTotals[3][cc]=(*extract)(isSwap, - (src+imageSizeInBytes+rowSizeInBytes)); - - /* grab 4 pixels to average */ - totals[cc]= 0.0; - /* totals[RED]= extractTotals[0][RED]+extractTotals[1][RED]+ - * extractTotals[2][RED]+extractTotals[3][RED]; - * totals[RED]/= 4.0; - */ - for (kk = 0; kk < BOX4; kk++) { - totals[cc]+= extractTotals[kk][cc]; - } - totals[cc]/= (double)BOX4; - - (*shove)(totals[cc],outIndex,dataOut); - outIndex++; - - src+= elementSizeInBytes; - } /* for cc */ - src+= padBytes; - - /* skip over to next vertical square of 4 */ - src+= rowSizeInBytes; - } /* for jj */ - - src+= imageSizeInBytes; - } /* for ii */ - - assert(src == &((const char *)dataIn)[rowSizeInBytes*height*depth]); - assert(outIndex == halfHeight * halfDepth * components); - } - -} /* halveImageSlice() */ - -static void halveImage3D(int components, - GLdouble (*extract)(int, const void *), - void (*shove)(GLdouble, int, void *), - GLint width, GLint height, GLint depth, - const void *dataIn, void *dataOut, - GLint elementSizeInBytes, - GLint groupSizeInBytes, - GLint rowSizeInBytes, - GLint imageSizeInBytes, - GLint isSwap) -{ - assert(depth > 1); - - /* a horizontal/vertical/one-column slice viewed from top */ - if (width == 1 || height == 1) { - assert(1 <= depth); - - halveImageSlice(components,extract,shove, width, height, depth, - dataIn, dataOut, elementSizeInBytes, groupSizeInBytes, - rowSizeInBytes, imageSizeInBytes, isSwap); - return; - } - { - int ii, jj, dd; - - int halfWidth= width / 2; - int halfHeight= height / 2; - int halfDepth= depth / 2; - const char *src= (const char *) dataIn; - int padBytes= rowSizeInBytes - (width*groupSizeInBytes); - int outIndex= 0; - - for (dd= 0; dd < halfDepth; dd++) { - for (ii= 0; ii< halfHeight; ii++) { - for (jj= 0; jj< halfWidth; jj++) { - int cc; - - for (cc= 0; cc < components; cc++) { - int kk; -#define BOX8 8 - double totals[4]; /* 4 is maximum components */ - double extractTotals[BOX8][4]; /* 4 is maximum components */ - - extractTotals[0][cc]= (*extract)(isSwap,src); - extractTotals[1][cc]= (*extract)(isSwap, - (src+groupSizeInBytes)); - extractTotals[2][cc]= (*extract)(isSwap, - (src+rowSizeInBytes)); - extractTotals[3][cc]= (*extract)(isSwap, - (src+rowSizeInBytes+groupSizeInBytes)); - - extractTotals[4][cc]= (*extract)(isSwap, - (src+imageSizeInBytes)); - - extractTotals[5][cc]= (*extract)(isSwap, - (src+groupSizeInBytes+imageSizeInBytes)); - extractTotals[6][cc]= (*extract)(isSwap, - (src+rowSizeInBytes+imageSizeInBytes)); - extractTotals[7][cc]= (*extract)(isSwap, - (src+rowSizeInBytes+groupSizeInBytes+imageSizeInBytes)); - - totals[cc]= 0.0; - - /* totals[RED]= extractTotals[0][RED]+extractTotals[1][RED]+ - * extractTotals[2][RED]+extractTotals[3][RED]+ - * extractTotals[4][RED]+extractTotals[5][RED]+ - * extractTotals[6][RED]+extractTotals[7][RED]; - * totals[RED]/= 8.0; - */ - for (kk = 0; kk < BOX8; kk++) { - totals[cc]+= extractTotals[kk][cc]; - } - totals[cc]/= (double)BOX8; - - (*shove)(totals[cc],outIndex,dataOut); - - outIndex++; - - src+= elementSizeInBytes; /* go to next component */ - } /* for cc */ - - /* skip over to next square of 4 */ - src+= groupSizeInBytes; - } /* for jj */ - /* skip past pad bytes, if any, to get to next row */ - src+= padBytes; - - /* src is at beginning of a row here, but it's the second row of - * the square block of 4 pixels that we just worked on so we - * need to go one more row. - * i.e., - * OO... - * here -->OO... - * but want -->OO... - * OO... - * ... - */ - src+= rowSizeInBytes; - } /* for ii */ - - src+= imageSizeInBytes; - } /* for dd */ - - /* both pointers must reach one byte after the end */ - assert(src == &((const char *)dataIn)[rowSizeInBytes*height*depth]); - assert(outIndex == halfWidth * halfHeight * halfDepth * components); - } -} /* halveImage3D() */ - - - -/*** mipmap.c ***/ - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/project.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/project.c deleted file mode 100644 index ddb3e7ec75..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/project.c +++ /dev/null @@ -1,380 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2002/11/01 23:45:31 $ $Revision: 1.5 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/project.c,v 1.5 2002/11/01 23:45:31 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include -#include -#include "gluint.h" - -/* -** Make m an identity matrix -*/ -static void __gluMakeIdentityd(GLdouble m[16]) -{ - m[0+4*0] = 1; m[0+4*1] = 0; m[0+4*2] = 0; m[0+4*3] = 0; - m[1+4*0] = 0; m[1+4*1] = 1; m[1+4*2] = 0; m[1+4*3] = 0; - m[2+4*0] = 0; m[2+4*1] = 0; m[2+4*2] = 1; m[2+4*3] = 0; - m[3+4*0] = 0; m[3+4*1] = 0; m[3+4*2] = 0; m[3+4*3] = 1; -} - -static void __gluMakeIdentityf(GLfloat m[16]) -{ - m[0+4*0] = 1; m[0+4*1] = 0; m[0+4*2] = 0; m[0+4*3] = 0; - m[1+4*0] = 0; m[1+4*1] = 1; m[1+4*2] = 0; m[1+4*3] = 0; - m[2+4*0] = 0; m[2+4*1] = 0; m[2+4*2] = 1; m[2+4*3] = 0; - m[3+4*0] = 0; m[3+4*1] = 0; m[3+4*2] = 0; m[3+4*3] = 1; -} - -void GLAPIENTRY -gluOrtho2D(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top) -{ - glOrtho(left, right, bottom, top, -1, 1); -} - -#define __glPi 3.14159265358979323846 - -void GLAPIENTRY -gluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar) -{ - GLdouble m[4][4]; - double sine, cotangent, deltaZ; - double radians = fovy / 2 * __glPi / 180; - - deltaZ = zFar - zNear; - sine = sin(radians); - if ((deltaZ == 0) || (sine == 0) || (aspect == 0)) { - return; - } - cotangent = COS(radians) / sine; - - __gluMakeIdentityd(&m[0][0]); - m[0][0] = cotangent / aspect; - m[1][1] = cotangent; - m[2][2] = -(zFar + zNear) / deltaZ; - m[2][3] = -1; - m[3][2] = -2 * zNear * zFar / deltaZ; - m[3][3] = 0; - glMultMatrixd(&m[0][0]); -} - -static void normalize(float v[3]) -{ - float r; - - r = sqrt( v[0]*v[0] + v[1]*v[1] + v[2]*v[2] ); - if (r == 0.0) return; - - v[0] /= r; - v[1] /= r; - v[2] /= r; -} - -static void cross(float v1[3], float v2[3], float result[3]) -{ - result[0] = v1[1]*v2[2] - v1[2]*v2[1]; - result[1] = v1[2]*v2[0] - v1[0]*v2[2]; - result[2] = v1[0]*v2[1] - v1[1]*v2[0]; -} - -void GLAPIENTRY -gluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, - GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, - GLdouble upz) -{ - float forward[3], side[3], up[3]; - GLfloat m[4][4]; - - forward[0] = centerx - eyex; - forward[1] = centery - eyey; - forward[2] = centerz - eyez; - - up[0] = upx; - up[1] = upy; - up[2] = upz; - - normalize(forward); - - /* Side = forward x up */ - cross(forward, up, side); - normalize(side); - - /* Recompute up as: up = side x forward */ - cross(side, forward, up); - - __gluMakeIdentityf(&m[0][0]); - m[0][0] = side[0]; - m[1][0] = side[1]; - m[2][0] = side[2]; - - m[0][1] = up[0]; - m[1][1] = up[1]; - m[2][1] = up[2]; - - m[0][2] = -forward[0]; - m[1][2] = -forward[1]; - m[2][2] = -forward[2]; - - glMultMatrixf(&m[0][0]); - glTranslated(-eyex, -eyey, -eyez); -} - -static void __gluMultMatrixVecd(const GLdouble matrix[16], const GLdouble in[4], - GLdouble out[4]) -{ - int i; - - for (i=0; i<4; i++) { - out[i] = - in[0] * matrix[0*4+i] + - in[1] * matrix[1*4+i] + - in[2] * matrix[2*4+i] + - in[3] * matrix[3*4+i]; - } -} - -/* -** inverse = invert(src) -*/ -static int __gluInvertMatrixd(const GLdouble src[16], GLdouble inverse[16]) -{ - int i, j, k, swap; - double t; - GLdouble temp[4][4]; - - for (i=0; i<4; i++) { - for (j=0; j<4; j++) { - temp[i][j] = src[i*4+j]; - } - } - __gluMakeIdentityd(inverse); - - for (i = 0; i < 4; i++) { - /* - ** Look for largest element in column - */ - swap = i; - for (j = i + 1; j < 4; j++) { - if (fabs(temp[j][i]) > fabs(temp[i][i])) { - swap = j; - } - } - - if (swap != i) { - /* - ** Swap rows. - */ - for (k = 0; k < 4; k++) { - t = temp[i][k]; - temp[i][k] = temp[swap][k]; - temp[swap][k] = t; - - t = inverse[i*4+k]; - inverse[i*4+k] = inverse[swap*4+k]; - inverse[swap*4+k] = t; - } - } - - if (temp[i][i] == 0) { - /* - ** No non-zero pivot. The matrix is singular, which shouldn't - ** happen. This means the user gave us a bad matrix. - */ - return GL_FALSE; - } - - t = temp[i][i]; - for (k = 0; k < 4; k++) { - temp[i][k] /= t; - inverse[i*4+k] /= t; - } - for (j = 0; j < 4; j++) { - if (j != i) { - t = temp[j][i]; - for (k = 0; k < 4; k++) { - temp[j][k] -= temp[i][k]*t; - inverse[j*4+k] -= inverse[i*4+k]*t; - } - } - } - } - return GL_TRUE; -} - -static void __gluMultMatricesd(const GLdouble a[16], const GLdouble b[16], - GLdouble r[16]) -{ - int i, j; - - for (i = 0; i < 4; i++) { - for (j = 0; j < 4; j++) { - r[i*4+j] = - a[i*4+0]*b[0*4+j] + - a[i*4+1]*b[1*4+j] + - a[i*4+2]*b[2*4+j] + - a[i*4+3]*b[3*4+j]; - } - } -} - -GLint GLAPIENTRY -gluProject(GLdouble objx, GLdouble objy, GLdouble objz, - const GLdouble modelMatrix[16], - const GLdouble projMatrix[16], - const GLint viewport[4], - GLdouble *winx, GLdouble *winy, GLdouble *winz) -{ - double in[4]; - double out[4]; - - in[0]=objx; - in[1]=objy; - in[2]=objz; - in[3]=1.0; - __gluMultMatrixVecd(modelMatrix, in, out); - __gluMultMatrixVecd(projMatrix, out, in); - if (in[3] == 0.0) return(GL_FALSE); - in[0] /= in[3]; - in[1] /= in[3]; - in[2] /= in[3]; - /* Map x, y and z to range 0-1 */ - in[0] = in[0] * 0.5 + 0.5; - in[1] = in[1] * 0.5 + 0.5; - in[2] = in[2] * 0.5 + 0.5; - - /* Map x,y to viewport */ - in[0] = in[0] * viewport[2] + viewport[0]; - in[1] = in[1] * viewport[3] + viewport[1]; - - *winx=in[0]; - *winy=in[1]; - *winz=in[2]; - return(GL_TRUE); -} - -GLint GLAPIENTRY -gluUnProject(GLdouble winx, GLdouble winy, GLdouble winz, - const GLdouble modelMatrix[16], - const GLdouble projMatrix[16], - const GLint viewport[4], - GLdouble *objx, GLdouble *objy, GLdouble *objz) -{ - double finalMatrix[16]; - double in[4]; - double out[4]; - - __gluMultMatricesd(modelMatrix, projMatrix, finalMatrix); - if (!__gluInvertMatrixd(finalMatrix, finalMatrix)) return(GL_FALSE); - - in[0]=winx; - in[1]=winy; - in[2]=winz; - in[3]=1.0; - - /* Map x and y from window coordinates */ - in[0] = (in[0] - viewport[0]) / viewport[2]; - in[1] = (in[1] - viewport[1]) / viewport[3]; - - /* Map to range -1 to 1 */ - in[0] = in[0] * 2 - 1; - in[1] = in[1] * 2 - 1; - in[2] = in[2] * 2 - 1; - - __gluMultMatrixVecd(finalMatrix, in, out); - if (out[3] == 0.0) return(GL_FALSE); - out[0] /= out[3]; - out[1] /= out[3]; - out[2] /= out[3]; - *objx = out[0]; - *objy = out[1]; - *objz = out[2]; - return(GL_TRUE); -} - -GLint GLAPIENTRY -gluUnProject4(GLdouble winx, GLdouble winy, GLdouble winz, GLdouble clipw, - const GLdouble modelMatrix[16], - const GLdouble projMatrix[16], - const GLint viewport[4], - GLclampd nearVal, GLclampd farVal, - GLdouble *objx, GLdouble *objy, GLdouble *objz, - GLdouble *objw) -{ - double finalMatrix[16]; - double in[4]; - double out[4]; - - __gluMultMatricesd(modelMatrix, projMatrix, finalMatrix); - if (!__gluInvertMatrixd(finalMatrix, finalMatrix)) return(GL_FALSE); - - in[0]=winx; - in[1]=winy; - in[2]=winz; - in[3]=clipw; - - /* Map x and y from window coordinates */ - in[0] = (in[0] - viewport[0]) / viewport[2]; - in[1] = (in[1] - viewport[1]) / viewport[3]; - in[2] = (in[2] - nearVal) / (farVal - nearVal); - - /* Map to range -1 to 1 */ - in[0] = in[0] * 2 - 1; - in[1] = in[1] * 2 - 1; - in[2] = in[2] * 2 - 1; - - __gluMultMatrixVecd(finalMatrix, in, out); - if (out[3] == 0.0) return(GL_FALSE); - *objx = out[0]; - *objy = out[1]; - *objz = out[2]; - *objw = out[3]; - return(GL_TRUE); -} - -void GLAPIENTRY -gluPickMatrix(GLdouble x, GLdouble y, GLdouble deltax, GLdouble deltay, - GLint viewport[4]) -{ - if (deltax <= 0 || deltay <= 0) { - return; - } - - /* Translate and scale the picked region to the entire window */ - glTranslatef((viewport[2] - 2 * (x - viewport[0])) / deltax, - (viewport[3] - 2 * (y - viewport[1])) / deltay, 0); - glScalef(viewport[2] / deltax, viewport[3] / deltay, 1.0); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/quad.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/quad.c deleted file mode 100644 index e604539c82..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/quad.c +++ /dev/null @@ -1,1160 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#include "gluos.h" -#include "gluint.h" -#include -#include -#include -#include -#include - -/* Make it not a power of two to avoid cache thrashing on the chip */ -#define CACHE_SIZE 240 - -#undef PI -#define PI 3.14159265358979323846 - -struct GLUquadric { - GLint normals; - GLboolean textureCoords; - GLint orientation; - GLint drawStyle; - void (GLAPIENTRY *errorCallback)( GLint ); -}; - -GLUquadric * GLAPIENTRY -gluNewQuadric(void) -{ - GLUquadric *newstate; - - newstate = (GLUquadric *) malloc(sizeof(GLUquadric)); - if (newstate == NULL) { - /* Can't report an error at this point... */ - return NULL; - } - newstate->normals = GLU_SMOOTH; - newstate->textureCoords = GL_FALSE; - newstate->orientation = GLU_OUTSIDE; - newstate->drawStyle = GLU_FILL; - newstate->errorCallback = NULL; - return newstate; -} - - -void GLAPIENTRY -gluDeleteQuadric(GLUquadric *state) -{ - free(state); -} - -static void gluQuadricError(GLUquadric *qobj, GLenum which) -{ - if (qobj->errorCallback) { - qobj->errorCallback(which); - } -} - -void GLAPIENTRY -gluQuadricCallback(GLUquadric *qobj, GLenum which, _GLUfuncptr fn) -{ - switch (which) { - case GLU_ERROR: - qobj->errorCallback = (void (GLAPIENTRY *)(GLint)) fn; - break; - default: - gluQuadricError(qobj, GLU_INVALID_ENUM); - return; - } -} - -void GLAPIENTRY -gluQuadricNormals(GLUquadric *qobj, GLenum normals) -{ - switch (normals) { - case GLU_SMOOTH: - case GLU_FLAT: - case GLU_NONE: - break; - default: - gluQuadricError(qobj, GLU_INVALID_ENUM); - return; - } - qobj->normals = normals; -} - -void GLAPIENTRY -gluQuadricTexture(GLUquadric *qobj, GLboolean textureCoords) -{ - qobj->textureCoords = textureCoords; -} - -void GLAPIENTRY -gluQuadricOrientation(GLUquadric *qobj, GLenum orientation) -{ - switch(orientation) { - case GLU_OUTSIDE: - case GLU_INSIDE: - break; - default: - gluQuadricError(qobj, GLU_INVALID_ENUM); - return; - } - qobj->orientation = orientation; -} - -void GLAPIENTRY -gluQuadricDrawStyle(GLUquadric *qobj, GLenum drawStyle) -{ - switch(drawStyle) { - case GLU_POINT: - case GLU_LINE: - case GLU_FILL: - case GLU_SILHOUETTE: - break; - default: - gluQuadricError(qobj, GLU_INVALID_ENUM); - return; - } - qobj->drawStyle = drawStyle; -} - -void GLAPIENTRY -gluCylinder(GLUquadric *qobj, GLdouble baseRadius, GLdouble topRadius, - GLdouble height, GLint slices, GLint stacks) -{ - GLint i,j; - GLfloat sinCache[CACHE_SIZE]; - GLfloat cosCache[CACHE_SIZE]; - GLfloat sinCache2[CACHE_SIZE]; - GLfloat cosCache2[CACHE_SIZE]; - GLfloat sinCache3[CACHE_SIZE]; - GLfloat cosCache3[CACHE_SIZE]; - GLfloat angle; - GLfloat zLow, zHigh; - GLfloat sintemp, costemp; - GLfloat length; - GLfloat deltaRadius; - GLfloat zNormal; - GLfloat xyNormalRatio; - GLfloat radiusLow, radiusHigh; - int needCache2, needCache3; - - if (slices >= CACHE_SIZE) slices = CACHE_SIZE-1; - - if (slices < 2 || stacks < 1 || baseRadius < 0.0 || topRadius < 0.0 || - height < 0.0) { - gluQuadricError(qobj, GLU_INVALID_VALUE); - return; - } - - /* Compute length (needed for normal calculations) */ - deltaRadius = baseRadius - topRadius; - length = SQRT(deltaRadius*deltaRadius + height*height); - if (length == 0.0) { - gluQuadricError(qobj, GLU_INVALID_VALUE); - return; - } - - /* Cache is the vertex locations cache */ - /* Cache2 is the various normals at the vertices themselves */ - /* Cache3 is the various normals for the faces */ - needCache2 = needCache3 = 0; - if (qobj->normals == GLU_SMOOTH) { - needCache2 = 1; - } - - if (qobj->normals == GLU_FLAT) { - if (qobj->drawStyle != GLU_POINT) { - needCache3 = 1; - } - if (qobj->drawStyle == GLU_LINE) { - needCache2 = 1; - } - } - - zNormal = deltaRadius / length; - xyNormalRatio = height / length; - - for (i = 0; i < slices; i++) { - angle = 2 * PI * i / slices; - if (needCache2) { - if (qobj->orientation == GLU_OUTSIDE) { - sinCache2[i] = xyNormalRatio * SIN(angle); - cosCache2[i] = xyNormalRatio * COS(angle); - } else { - sinCache2[i] = -xyNormalRatio * SIN(angle); - cosCache2[i] = -xyNormalRatio * COS(angle); - } - } - sinCache[i] = SIN(angle); - cosCache[i] = COS(angle); - } - - if (needCache3) { - for (i = 0; i < slices; i++) { - angle = 2 * PI * (i-0.5) / slices; - if (qobj->orientation == GLU_OUTSIDE) { - sinCache3[i] = xyNormalRatio * SIN(angle); - cosCache3[i] = xyNormalRatio * COS(angle); - } else { - sinCache3[i] = -xyNormalRatio * SIN(angle); - cosCache3[i] = -xyNormalRatio * COS(angle); - } - } - } - - sinCache[slices] = sinCache[0]; - cosCache[slices] = cosCache[0]; - if (needCache2) { - sinCache2[slices] = sinCache2[0]; - cosCache2[slices] = cosCache2[0]; - } - if (needCache3) { - sinCache3[slices] = sinCache3[0]; - cosCache3[slices] = cosCache3[0]; - } - - switch (qobj->drawStyle) { - case GLU_FILL: - /* Note: - ** An argument could be made for using a TRIANGLE_FAN for the end - ** of the cylinder of either radii is 0.0 (a cone). However, a - ** TRIANGLE_FAN would not work in smooth shading mode (the common - ** case) because the normal for the apex is different for every - ** triangle (and TRIANGLE_FAN doesn't let me respecify that normal). - ** Now, my choice is GL_TRIANGLES, or leave the GL_QUAD_STRIP and - ** just let the GL trivially reject one of the two triangles of the - ** QUAD. GL_QUAD_STRIP is probably faster, so I will leave this code - ** alone. - */ - for (j = 0; j < stacks; j++) { - zLow = j * height / stacks; - zHigh = (j + 1) * height / stacks; - radiusLow = baseRadius - deltaRadius * ((float) j / stacks); - radiusHigh = baseRadius - deltaRadius * ((float) (j + 1) / stacks); - - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= slices; i++) { - switch(qobj->normals) { - case GLU_FLAT: - glNormal3f(sinCache3[i], cosCache3[i], zNormal); - break; - case GLU_SMOOTH: - glNormal3f(sinCache2[i], cosCache2[i], zNormal); - break; - case GLU_NONE: - default: - break; - } - if (qobj->orientation == GLU_OUTSIDE) { - if (qobj->textureCoords) { - glTexCoord2f(1 - (float) i / slices, - (float) j / stacks); - } - glVertex3f(radiusLow * sinCache[i], - radiusLow * cosCache[i], zLow); - if (qobj->textureCoords) { - glTexCoord2f(1 - (float) i / slices, - (float) (j+1) / stacks); - } - glVertex3f(radiusHigh * sinCache[i], - radiusHigh * cosCache[i], zHigh); - } else { - if (qobj->textureCoords) { - glTexCoord2f(1 - (float) i / slices, - (float) (j+1) / stacks); - } - glVertex3f(radiusHigh * sinCache[i], - radiusHigh * cosCache[i], zHigh); - if (qobj->textureCoords) { - glTexCoord2f(1 - (float) i / slices, - (float) j / stacks); - } - glVertex3f(radiusLow * sinCache[i], - radiusLow * cosCache[i], zLow); - } - } - glEnd(); - } - break; - case GLU_POINT: - glBegin(GL_POINTS); - for (i = 0; i < slices; i++) { - switch(qobj->normals) { - case GLU_FLAT: - case GLU_SMOOTH: - glNormal3f(sinCache2[i], cosCache2[i], zNormal); - break; - case GLU_NONE: - default: - break; - } - sintemp = sinCache[i]; - costemp = cosCache[i]; - for (j = 0; j <= stacks; j++) { - zLow = j * height / stacks; - radiusLow = baseRadius - deltaRadius * ((float) j / stacks); - - if (qobj->textureCoords) { - glTexCoord2f(1 - (float) i / slices, - (float) j / stacks); - } - glVertex3f(radiusLow * sintemp, - radiusLow * costemp, zLow); - } - } - glEnd(); - break; - case GLU_LINE: - for (j = 1; j < stacks; j++) { - zLow = j * height / stacks; - radiusLow = baseRadius - deltaRadius * ((float) j / stacks); - - glBegin(GL_LINE_STRIP); - for (i = 0; i <= slices; i++) { - switch(qobj->normals) { - case GLU_FLAT: - glNormal3f(sinCache3[i], cosCache3[i], zNormal); - break; - case GLU_SMOOTH: - glNormal3f(sinCache2[i], cosCache2[i], zNormal); - break; - case GLU_NONE: - default: - break; - } - if (qobj->textureCoords) { - glTexCoord2f(1 - (float) i / slices, - (float) j / stacks); - } - glVertex3f(radiusLow * sinCache[i], - radiusLow * cosCache[i], zLow); - } - glEnd(); - } - /* Intentionally fall through here... */ - case GLU_SILHOUETTE: - for (j = 0; j <= stacks; j += stacks) { - zLow = j * height / stacks; - radiusLow = baseRadius - deltaRadius * ((float) j / stacks); - - glBegin(GL_LINE_STRIP); - for (i = 0; i <= slices; i++) { - switch(qobj->normals) { - case GLU_FLAT: - glNormal3f(sinCache3[i], cosCache3[i], zNormal); - break; - case GLU_SMOOTH: - glNormal3f(sinCache2[i], cosCache2[i], zNormal); - break; - case GLU_NONE: - default: - break; - } - if (qobj->textureCoords) { - glTexCoord2f(1 - (float) i / slices, - (float) j / stacks); - } - glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], - zLow); - } - glEnd(); - } - for (i = 0; i < slices; i++) { - switch(qobj->normals) { - case GLU_FLAT: - case GLU_SMOOTH: - glNormal3f(sinCache2[i], cosCache2[i], 0.0); - break; - case GLU_NONE: - default: - break; - } - sintemp = sinCache[i]; - costemp = cosCache[i]; - glBegin(GL_LINE_STRIP); - for (j = 0; j <= stacks; j++) { - zLow = j * height / stacks; - radiusLow = baseRadius - deltaRadius * ((float) j / stacks); - - if (qobj->textureCoords) { - glTexCoord2f(1 - (float) i / slices, - (float) j / stacks); - } - glVertex3f(radiusLow * sintemp, - radiusLow * costemp, zLow); - } - glEnd(); - } - break; - default: - break; - } -} - -void GLAPIENTRY -gluDisk(GLUquadric *qobj, GLdouble innerRadius, GLdouble outerRadius, - GLint slices, GLint loops) -{ - gluPartialDisk(qobj, innerRadius, outerRadius, slices, loops, 0.0, 360.0); -} - -void GLAPIENTRY -gluPartialDisk(GLUquadric *qobj, GLdouble innerRadius, - GLdouble outerRadius, GLint slices, GLint loops, - GLdouble startAngle, GLdouble sweepAngle) -{ - GLint i,j; - GLfloat sinCache[CACHE_SIZE]; - GLfloat cosCache[CACHE_SIZE]; - GLfloat angle; - GLfloat sintemp, costemp; - GLfloat deltaRadius; - GLfloat radiusLow, radiusHigh; - GLfloat texLow = 0.0, texHigh = 0.0; - GLfloat angleOffset; - GLint slices2; - GLint finish; - - if (slices >= CACHE_SIZE) slices = CACHE_SIZE-1; - if (slices < 2 || loops < 1 || outerRadius <= 0.0 || innerRadius < 0.0 || - innerRadius > outerRadius) { - gluQuadricError(qobj, GLU_INVALID_VALUE); - return; - } - - if (sweepAngle < -360.0) sweepAngle = 360.0; - if (sweepAngle > 360.0) sweepAngle = 360.0; - if (sweepAngle < 0) { - startAngle += sweepAngle; - sweepAngle = -sweepAngle; - } - - if (sweepAngle == 360.0) { - slices2 = slices; - } else { - slices2 = slices + 1; - } - - /* Compute length (needed for normal calculations) */ - deltaRadius = outerRadius - innerRadius; - - /* Cache is the vertex locations cache */ - - angleOffset = startAngle / 180.0 * PI; - for (i = 0; i <= slices; i++) { - angle = angleOffset + ((PI * sweepAngle) / 180.0) * i / slices; - sinCache[i] = SIN(angle); - cosCache[i] = COS(angle); - } - - if (sweepAngle == 360.0) { - sinCache[slices] = sinCache[0]; - cosCache[slices] = cosCache[0]; - } - - switch(qobj->normals) { - case GLU_FLAT: - case GLU_SMOOTH: - if (qobj->orientation == GLU_OUTSIDE) { - glNormal3f(0.0, 0.0, 1.0); - } else { - glNormal3f(0.0, 0.0, -1.0); - } - break; - default: - case GLU_NONE: - break; - } - - switch (qobj->drawStyle) { - case GLU_FILL: - if (innerRadius == 0.0) { - finish = loops - 1; - /* Triangle strip for inner polygons */ - glBegin(GL_TRIANGLE_FAN); - if (qobj->textureCoords) { - glTexCoord2f(0.5, 0.5); - } - glVertex3f(0.0, 0.0, 0.0); - radiusLow = outerRadius - - deltaRadius * ((float) (loops-1) / loops); - if (qobj->textureCoords) { - texLow = radiusLow / outerRadius / 2; - } - - if (qobj->orientation == GLU_OUTSIDE) { - for (i = slices; i >= 0; i--) { - if (qobj->textureCoords) { - glTexCoord2f(texLow * sinCache[i] + 0.5, - texLow * cosCache[i] + 0.5); - } - glVertex3f(radiusLow * sinCache[i], - radiusLow * cosCache[i], 0.0); - } - } else { - for (i = 0; i <= slices; i++) { - if (qobj->textureCoords) { - glTexCoord2f(texLow * sinCache[i] + 0.5, - texLow * cosCache[i] + 0.5); - } - glVertex3f(radiusLow * sinCache[i], - radiusLow * cosCache[i], 0.0); - } - } - glEnd(); - } else { - finish = loops; - } - for (j = 0; j < finish; j++) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - radiusHigh = outerRadius - deltaRadius * ((float) (j + 1) / loops); - if (qobj->textureCoords) { - texLow = radiusLow / outerRadius / 2; - texHigh = radiusHigh / outerRadius / 2; - } - - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= slices; i++) { - if (qobj->orientation == GLU_OUTSIDE) { - if (qobj->textureCoords) { - glTexCoord2f(texLow * sinCache[i] + 0.5, - texLow * cosCache[i] + 0.5); - } - glVertex3f(radiusLow * sinCache[i], - radiusLow * cosCache[i], 0.0); - - if (qobj->textureCoords) { - glTexCoord2f(texHigh * sinCache[i] + 0.5, - texHigh * cosCache[i] + 0.5); - } - glVertex3f(radiusHigh * sinCache[i], - radiusHigh * cosCache[i], 0.0); - } else { - if (qobj->textureCoords) { - glTexCoord2f(texHigh * sinCache[i] + 0.5, - texHigh * cosCache[i] + 0.5); - } - glVertex3f(radiusHigh * sinCache[i], - radiusHigh * cosCache[i], 0.0); - - if (qobj->textureCoords) { - glTexCoord2f(texLow * sinCache[i] + 0.5, - texLow * cosCache[i] + 0.5); - } - glVertex3f(radiusLow * sinCache[i], - radiusLow * cosCache[i], 0.0); - } - } - glEnd(); - } - break; - case GLU_POINT: - glBegin(GL_POINTS); - for (i = 0; i < slices2; i++) { - sintemp = sinCache[i]; - costemp = cosCache[i]; - for (j = 0; j <= loops; j++) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - - if (qobj->textureCoords) { - texLow = radiusLow / outerRadius / 2; - - glTexCoord2f(texLow * sinCache[i] + 0.5, - texLow * cosCache[i] + 0.5); - } - glVertex3f(radiusLow * sintemp, radiusLow * costemp, 0.0); - } - } - glEnd(); - break; - case GLU_LINE: - if (innerRadius == outerRadius) { - glBegin(GL_LINE_STRIP); - - for (i = 0; i <= slices; i++) { - if (qobj->textureCoords) { - glTexCoord2f(sinCache[i] / 2 + 0.5, - cosCache[i] / 2 + 0.5); - } - glVertex3f(innerRadius * sinCache[i], - innerRadius * cosCache[i], 0.0); - } - glEnd(); - break; - } - for (j = 0; j <= loops; j++) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - if (qobj->textureCoords) { - texLow = radiusLow / outerRadius / 2; - } - - glBegin(GL_LINE_STRIP); - for (i = 0; i <= slices; i++) { - if (qobj->textureCoords) { - glTexCoord2f(texLow * sinCache[i] + 0.5, - texLow * cosCache[i] + 0.5); - } - glVertex3f(radiusLow * sinCache[i], - radiusLow * cosCache[i], 0.0); - } - glEnd(); - } - for (i=0; i < slices2; i++) { - sintemp = sinCache[i]; - costemp = cosCache[i]; - glBegin(GL_LINE_STRIP); - for (j = 0; j <= loops; j++) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - if (qobj->textureCoords) { - texLow = radiusLow / outerRadius / 2; - } - - if (qobj->textureCoords) { - glTexCoord2f(texLow * sinCache[i] + 0.5, - texLow * cosCache[i] + 0.5); - } - glVertex3f(radiusLow * sintemp, radiusLow * costemp, 0.0); - } - glEnd(); - } - break; - case GLU_SILHOUETTE: - if (sweepAngle < 360.0) { - for (i = 0; i <= slices; i+= slices) { - sintemp = sinCache[i]; - costemp = cosCache[i]; - glBegin(GL_LINE_STRIP); - for (j = 0; j <= loops; j++) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - - if (qobj->textureCoords) { - texLow = radiusLow / outerRadius / 2; - glTexCoord2f(texLow * sinCache[i] + 0.5, - texLow * cosCache[i] + 0.5); - } - glVertex3f(radiusLow * sintemp, radiusLow * costemp, 0.0); - } - glEnd(); - } - } - for (j = 0; j <= loops; j += loops) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - if (qobj->textureCoords) { - texLow = radiusLow / outerRadius / 2; - } - - glBegin(GL_LINE_STRIP); - for (i = 0; i <= slices; i++) { - if (qobj->textureCoords) { - glTexCoord2f(texLow * sinCache[i] + 0.5, - texLow * cosCache[i] + 0.5); - } - glVertex3f(radiusLow * sinCache[i], - radiusLow * cosCache[i], 0.0); - } - glEnd(); - if (innerRadius == outerRadius) break; - } - break; - default: - break; - } -} - -void GLAPIENTRY -gluSphere(GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks) -{ - GLint i,j; - GLfloat sinCache1a[CACHE_SIZE]; - GLfloat cosCache1a[CACHE_SIZE]; - GLfloat sinCache2a[CACHE_SIZE]; - GLfloat cosCache2a[CACHE_SIZE]; - GLfloat sinCache3a[CACHE_SIZE]; - GLfloat cosCache3a[CACHE_SIZE]; - GLfloat sinCache1b[CACHE_SIZE]; - GLfloat cosCache1b[CACHE_SIZE]; - GLfloat sinCache2b[CACHE_SIZE]; - GLfloat cosCache2b[CACHE_SIZE]; - GLfloat sinCache3b[CACHE_SIZE]; - GLfloat cosCache3b[CACHE_SIZE]; - GLfloat angle; - GLfloat zLow, zHigh; - GLfloat sintemp1, sintemp2, sintemp3 = 0.0, sintemp4 = 0.0; - GLfloat costemp1, costemp2 = 0.0, costemp3 = 0.0, costemp4 = 0.0; - GLboolean needCache2, needCache3; - GLint start, finish; - - if (slices >= CACHE_SIZE) slices = CACHE_SIZE-1; - if (stacks >= CACHE_SIZE) stacks = CACHE_SIZE-1; - if (slices < 2 || stacks < 1 || radius < 0.0) { - gluQuadricError(qobj, GLU_INVALID_VALUE); - return; - } - - /* Cache is the vertex locations cache */ - /* Cache2 is the various normals at the vertices themselves */ - /* Cache3 is the various normals for the faces */ - needCache2 = needCache3 = GL_FALSE; - - if (qobj->normals == GLU_SMOOTH) { - needCache2 = GL_TRUE; - } - - if (qobj->normals == GLU_FLAT) { - if (qobj->drawStyle != GLU_POINT) { - needCache3 = GL_TRUE; - } - if (qobj->drawStyle == GLU_LINE) { - needCache2 = GL_TRUE; - } - } - - for (i = 0; i < slices; i++) { - angle = 2 * PI * i / slices; - sinCache1a[i] = SIN(angle); - cosCache1a[i] = COS(angle); - if (needCache2) { - sinCache2a[i] = sinCache1a[i]; - cosCache2a[i] = cosCache1a[i]; - } - } - - for (j = 0; j <= stacks; j++) { - angle = PI * j / stacks; - if (needCache2) { - if (qobj->orientation == GLU_OUTSIDE) { - sinCache2b[j] = SIN(angle); - cosCache2b[j] = COS(angle); - } else { - sinCache2b[j] = -SIN(angle); - cosCache2b[j] = -COS(angle); - } - } - sinCache1b[j] = radius * SIN(angle); - cosCache1b[j] = radius * COS(angle); - } - /* Make sure it comes to a point */ - sinCache1b[0] = 0; - sinCache1b[stacks] = 0; - - if (needCache3) { - for (i = 0; i < slices; i++) { - angle = 2 * PI * (i-0.5) / slices; - sinCache3a[i] = SIN(angle); - cosCache3a[i] = COS(angle); - } - for (j = 0; j <= stacks; j++) { - angle = PI * (j - 0.5) / stacks; - if (qobj->orientation == GLU_OUTSIDE) { - sinCache3b[j] = SIN(angle); - cosCache3b[j] = COS(angle); - } else { - sinCache3b[j] = -SIN(angle); - cosCache3b[j] = -COS(angle); - } - } - } - - sinCache1a[slices] = sinCache1a[0]; - cosCache1a[slices] = cosCache1a[0]; - if (needCache2) { - sinCache2a[slices] = sinCache2a[0]; - cosCache2a[slices] = cosCache2a[0]; - } - if (needCache3) { - sinCache3a[slices] = sinCache3a[0]; - cosCache3a[slices] = cosCache3a[0]; - } - - switch (qobj->drawStyle) { - case GLU_FILL: - /* Do ends of sphere as TRIANGLE_FAN's (if not texturing) - ** We don't do it when texturing because we need to respecify the - ** texture coordinates of the apex for every adjacent vertex (because - ** it isn't a constant for that point) - */ - if (!(qobj->textureCoords)) { - start = 1; - finish = stacks - 1; - - /* Low end first (j == 0 iteration) */ - sintemp2 = sinCache1b[1]; - zHigh = cosCache1b[1]; - switch(qobj->normals) { - case GLU_FLAT: - sintemp3 = sinCache3b[1]; - costemp3 = cosCache3b[1]; - break; - case GLU_SMOOTH: - sintemp3 = sinCache2b[1]; - costemp3 = cosCache2b[1]; - glNormal3f(sinCache2a[0] * sinCache2b[0], - cosCache2a[0] * sinCache2b[0], - cosCache2b[0]); - break; - default: - break; - } - glBegin(GL_TRIANGLE_FAN); - glVertex3f(0.0, 0.0, radius); - if (qobj->orientation == GLU_OUTSIDE) { - for (i = slices; i >= 0; i--) { - switch(qobj->normals) { - case GLU_SMOOTH: - glNormal3f(sinCache2a[i] * sintemp3, - cosCache2a[i] * sintemp3, - costemp3); - break; - case GLU_FLAT: - if (i != slices) { - glNormal3f(sinCache3a[i+1] * sintemp3, - cosCache3a[i+1] * sintemp3, - costemp3); - } - break; - case GLU_NONE: - default: - break; - } - glVertex3f(sintemp2 * sinCache1a[i], - sintemp2 * cosCache1a[i], zHigh); - } - } else { - for (i = 0; i <= slices; i++) { - switch(qobj->normals) { - case GLU_SMOOTH: - glNormal3f(sinCache2a[i] * sintemp3, - cosCache2a[i] * sintemp3, - costemp3); - break; - case GLU_FLAT: - glNormal3f(sinCache3a[i] * sintemp3, - cosCache3a[i] * sintemp3, - costemp3); - break; - case GLU_NONE: - default: - break; - } - glVertex3f(sintemp2 * sinCache1a[i], - sintemp2 * cosCache1a[i], zHigh); - } - } - glEnd(); - - /* High end next (j == stacks-1 iteration) */ - sintemp2 = sinCache1b[stacks-1]; - zHigh = cosCache1b[stacks-1]; - switch(qobj->normals) { - case GLU_FLAT: - sintemp3 = sinCache3b[stacks]; - costemp3 = cosCache3b[stacks]; - break; - case GLU_SMOOTH: - sintemp3 = sinCache2b[stacks-1]; - costemp3 = cosCache2b[stacks-1]; - glNormal3f(sinCache2a[stacks] * sinCache2b[stacks], - cosCache2a[stacks] * sinCache2b[stacks], - cosCache2b[stacks]); - break; - default: - break; - } - glBegin(GL_TRIANGLE_FAN); - glVertex3f(0.0, 0.0, -radius); - if (qobj->orientation == GLU_OUTSIDE) { - for (i = 0; i <= slices; i++) { - switch(qobj->normals) { - case GLU_SMOOTH: - glNormal3f(sinCache2a[i] * sintemp3, - cosCache2a[i] * sintemp3, - costemp3); - break; - case GLU_FLAT: - glNormal3f(sinCache3a[i] * sintemp3, - cosCache3a[i] * sintemp3, - costemp3); - break; - case GLU_NONE: - default: - break; - } - glVertex3f(sintemp2 * sinCache1a[i], - sintemp2 * cosCache1a[i], zHigh); - } - } else { - for (i = slices; i >= 0; i--) { - switch(qobj->normals) { - case GLU_SMOOTH: - glNormal3f(sinCache2a[i] * sintemp3, - cosCache2a[i] * sintemp3, - costemp3); - break; - case GLU_FLAT: - if (i != slices) { - glNormal3f(sinCache3a[i+1] * sintemp3, - cosCache3a[i+1] * sintemp3, - costemp3); - } - break; - case GLU_NONE: - default: - break; - } - glVertex3f(sintemp2 * sinCache1a[i], - sintemp2 * cosCache1a[i], zHigh); - } - } - glEnd(); - } else { - start = 0; - finish = stacks; - } - for (j = start; j < finish; j++) { - zLow = cosCache1b[j]; - zHigh = cosCache1b[j+1]; - sintemp1 = sinCache1b[j]; - sintemp2 = sinCache1b[j+1]; - switch(qobj->normals) { - case GLU_FLAT: - sintemp4 = sinCache3b[j+1]; - costemp4 = cosCache3b[j+1]; - break; - case GLU_SMOOTH: - if (qobj->orientation == GLU_OUTSIDE) { - sintemp3 = sinCache2b[j+1]; - costemp3 = cosCache2b[j+1]; - sintemp4 = sinCache2b[j]; - costemp4 = cosCache2b[j]; - } else { - sintemp3 = sinCache2b[j]; - costemp3 = cosCache2b[j]; - sintemp4 = sinCache2b[j+1]; - costemp4 = cosCache2b[j+1]; - } - break; - default: - break; - } - - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= slices; i++) { - switch(qobj->normals) { - case GLU_SMOOTH: - glNormal3f(sinCache2a[i] * sintemp3, - cosCache2a[i] * sintemp3, - costemp3); - break; - case GLU_FLAT: - case GLU_NONE: - default: - break; - } - if (qobj->orientation == GLU_OUTSIDE) { - if (qobj->textureCoords) { - glTexCoord2f(1 - (float) i / slices, - 1 - (float) (j+1) / stacks); - } - glVertex3f(sintemp2 * sinCache1a[i], - sintemp2 * cosCache1a[i], zHigh); - } else { - if (qobj->textureCoords) { - glTexCoord2f(1 - (float) i / slices, - 1 - (float) j / stacks); - } - glVertex3f(sintemp1 * sinCache1a[i], - sintemp1 * cosCache1a[i], zLow); - } - switch(qobj->normals) { - case GLU_SMOOTH: - glNormal3f(sinCache2a[i] * sintemp4, - cosCache2a[i] * sintemp4, - costemp4); - break; - case GLU_FLAT: - glNormal3f(sinCache3a[i] * sintemp4, - cosCache3a[i] * sintemp4, - costemp4); - break; - case GLU_NONE: - default: - break; - } - if (qobj->orientation == GLU_OUTSIDE) { - if (qobj->textureCoords) { - glTexCoord2f(1 - (float) i / slices, - 1 - (float) j / stacks); - } - glVertex3f(sintemp1 * sinCache1a[i], - sintemp1 * cosCache1a[i], zLow); - } else { - if (qobj->textureCoords) { - glTexCoord2f(1 - (float) i / slices, - 1 - (float) (j+1) / stacks); - } - glVertex3f(sintemp2 * sinCache1a[i], - sintemp2 * cosCache1a[i], zHigh); - } - } - glEnd(); - } - break; - case GLU_POINT: - glBegin(GL_POINTS); - for (j = 0; j <= stacks; j++) { - sintemp1 = sinCache1b[j]; - costemp1 = cosCache1b[j]; - switch(qobj->normals) { - case GLU_FLAT: - case GLU_SMOOTH: - sintemp2 = sinCache2b[j]; - costemp2 = cosCache2b[j]; - break; - default: - break; - } - for (i = 0; i < slices; i++) { - switch(qobj->normals) { - case GLU_FLAT: - case GLU_SMOOTH: - glNormal3f(sinCache2a[i] * sintemp2, - cosCache2a[i] * sintemp2, - costemp2); - break; - case GLU_NONE: - default: - break; - } - - zLow = j * radius / stacks; - - if (qobj->textureCoords) { - glTexCoord2f(1 - (float) i / slices, - 1 - (float) j / stacks); - } - glVertex3f(sintemp1 * sinCache1a[i], - sintemp1 * cosCache1a[i], costemp1); - } - } - glEnd(); - break; - case GLU_LINE: - case GLU_SILHOUETTE: - for (j = 1; j < stacks; j++) { - sintemp1 = sinCache1b[j]; - costemp1 = cosCache1b[j]; - switch(qobj->normals) { - case GLU_FLAT: - case GLU_SMOOTH: - sintemp2 = sinCache2b[j]; - costemp2 = cosCache2b[j]; - break; - default: - break; - } - - glBegin(GL_LINE_STRIP); - for (i = 0; i <= slices; i++) { - switch(qobj->normals) { - case GLU_FLAT: - glNormal3f(sinCache3a[i] * sintemp2, - cosCache3a[i] * sintemp2, - costemp2); - break; - case GLU_SMOOTH: - glNormal3f(sinCache2a[i] * sintemp2, - cosCache2a[i] * sintemp2, - costemp2); - break; - case GLU_NONE: - default: - break; - } - if (qobj->textureCoords) { - glTexCoord2f(1 - (float) i / slices, - 1 - (float) j / stacks); - } - glVertex3f(sintemp1 * sinCache1a[i], - sintemp1 * cosCache1a[i], costemp1); - } - glEnd(); - } - for (i = 0; i < slices; i++) { - sintemp1 = sinCache1a[i]; - costemp1 = cosCache1a[i]; - switch(qobj->normals) { - case GLU_FLAT: - case GLU_SMOOTH: - sintemp2 = sinCache2a[i]; - costemp2 = cosCache2a[i]; - break; - default: - break; - } - - glBegin(GL_LINE_STRIP); - for (j = 0; j <= stacks; j++) { - switch(qobj->normals) { - case GLU_FLAT: - glNormal3f(sintemp2 * sinCache3b[j], - costemp2 * sinCache3b[j], - cosCache3b[j]); - break; - case GLU_SMOOTH: - glNormal3f(sintemp2 * sinCache2b[j], - costemp2 * sinCache2b[j], - cosCache2b[j]); - break; - case GLU_NONE: - default: - break; - } - - if (qobj->textureCoords) { - glTexCoord2f(1 - (float) i / slices, - 1 - (float) j / stacks); - } - glVertex3f(sintemp1 * sinCache1b[j], - costemp1 * sinCache1b[j], cosCache1b[j]); - } - glEnd(); - } - break; - default: - break; - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/registry.c b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/registry.c deleted file mode 100644 index e486ffa8ca..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/libutil/registry.c +++ /dev/null @@ -1,98 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/registry.c,v 1.1 2001/03/17 00:25:41 brianp Exp $ -*/ - -#include "gluos.h" -#include -#include -#include -#include - -static const GLubyte versionString[] = "1.3"; -static const GLubyte extensionString[] = - "GLU_EXT_nurbs_tessellator " - "GLU_EXT_object_space_tess " - ; - -const GLubyte * GLAPIENTRY -gluGetString(GLenum name) -{ - - if (name == GLU_VERSION) { - return versionString; - } else if (name == GLU_EXTENSIONS) { - return extensionString; - } - return NULL; -} - -/* extName is an extension name. - * extString is a string of extensions separated by blank(s). There may or - * may not be leading or trailing blank(s) in extString. - * This works in cases of extensions being prefixes of another like - * GL_EXT_texture and GL_EXT_texture3D. - * Returns GL_TRUE if extName is found otherwise it returns GL_FALSE. - */ -GLboolean GLAPIENTRY -gluCheckExtension(const GLubyte *extName, const GLubyte *extString) -{ - GLboolean flag = GL_FALSE; - char *word; - char *lookHere; - char *deleteThis; - - if (extString == NULL) return GL_FALSE; - - deleteThis = lookHere = (char *)malloc(strlen((const char *)extString)+1); - if (lookHere == NULL) - return GL_FALSE; - /* strtok() will modify string, so copy it somewhere */ - strcpy(lookHere,(const char *)extString); - - while ((word= strtok(lookHere," ")) != NULL) { - if (strcmp(word,(const char *)extName) == 0) { - flag = GL_TRUE; - break; - } - lookHere = NULL; /* get next token */ - } - free((void *)deleteThis); - return flag; -} /* gluCheckExtension() */ - - - -/*** registry.c ***/ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/mesaglu.opt b/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/mesaglu.opt deleted file mode 100644 index 9bac432884..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glu/sgi/mesaglu.opt +++ /dev/null @@ -1,67 +0,0 @@ -! -! ### UNIVERSAL procedures and global definitions extracted from MESAGL.MAP -! -case_sensitive=YES -symbol_vector = (gluErrorString = PROCEDURE) -symbol_vector = (__gluNURBSErrorString = PROCEDURE) -symbol_vector = (__gluTessErrorString = PROCEDURE) -symbol_vector = (gluBuild3DMipmaps = PROCEDURE) -symbol_vector = (gluBuild3DMipmapLevels = PROCEDURE) -symbol_vector = (gluBuild2DMipmaps = PROCEDURE) -symbol_vector = (gluBuild2DMipmapLevels = PROCEDURE) -symbol_vector = (gluBuild1DMipmaps = PROCEDURE) -symbol_vector = (gluBuild1DMipmapLevels = PROCEDURE) -symbol_vector = (gluScaleImage = PROCEDURE) -symbol_vector = (gluPickMatrix = PROCEDURE) -symbol_vector = (gluUnProject4 = PROCEDURE) -symbol_vector = (gluUnProject = PROCEDURE) -symbol_vector = (gluProject = PROCEDURE) -symbol_vector = (gluLookAt = PROCEDURE) -symbol_vector = (gluPerspective = PROCEDURE) -symbol_vector = (gluOrtho2D = PROCEDURE) -symbol_vector = (gluNewQuadric = PROCEDURE) -symbol_vector = (gluSphere = PROCEDURE) -symbol_vector = (gluPartialDisk = PROCEDURE) -symbol_vector = (gluDisk = PROCEDURE) -symbol_vector = (gluCylinder = PROCEDURE) -symbol_vector = (gluQuadricDrawStyle = PROCEDURE) -symbol_vector = (gluQuadricOrientation = PROCEDURE) -symbol_vector = (gluQuadricTexture = PROCEDURE) -symbol_vector = (gluQuadricNormals = PROCEDURE) -symbol_vector = (gluQuadricCallback = PROCEDURE) -symbol_vector = (gluDeleteQuadric = PROCEDURE) -symbol_vector = (gluGetString = PROCEDURE) -symbol_vector = (gluCheckExtension = PROCEDURE) -symbol_vector = (gluTessEndContour = PROCEDURE) -symbol_vector = (gluTessBeginContour = PROCEDURE) -symbol_vector = (gluTessBeginPolygon = PROCEDURE) -symbol_vector = (gluTessEndPolygon = PROCEDURE) -symbol_vector = (gluEndPolygon = PROCEDURE) -symbol_vector = (gluNextContour = PROCEDURE) -symbol_vector = (gluBeginPolygon = PROCEDURE) -symbol_vector = (gluTessVertex = PROCEDURE) -symbol_vector = (gluTessCallback = PROCEDURE) -symbol_vector = (gluTessNormal = PROCEDURE) -symbol_vector = (gluGetTessProperty = PROCEDURE) -symbol_vector = (gluTessProperty = PROCEDURE) -symbol_vector = (gluDeleteTess = PROCEDURE) -symbol_vector = (gluNewTess = PROCEDURE) -symbol_vector = (gluNurbsCallbackDataEXT = PROCEDURE) -symbol_vector = (gluNurbsCallbackData = PROCEDURE) -symbol_vector = (gluNurbsCallback = PROCEDURE) -symbol_vector = (gluGetNurbsProperty = PROCEDURE) -symbol_vector = (gluNurbsProperty = PROCEDURE) -symbol_vector = (gluLoadSamplingMatrices = PROCEDURE) -symbol_vector = (gluNurbsSurface = PROCEDURE) -symbol_vector = (gluNurbsCurve = PROCEDURE) -symbol_vector = (gluPwlCurve = PROCEDURE) -symbol_vector = (gluEndTrim = PROCEDURE) -symbol_vector = (gluBeginTrim = PROCEDURE) -symbol_vector = (gluEndSurface = PROCEDURE) -symbol_vector = (gluEndCurve = PROCEDURE) -symbol_vector = (gluBeginCurve = PROCEDURE) -symbol_vector = (gluBeginSurface = PROCEDURE) -symbol_vector = (gluDeleteNurbsTessellatorEXT = PROCEDURE) -symbol_vector = (gluDeleteNurbsRenderer = PROCEDURE) -symbol_vector = (gluNewNurbsRenderer = PROCEDURE) -symbol_vector = (glu_LOD_eval_list = PROCEDURE) diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/Makefile b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/Makefile deleted file mode 100644 index d9cf32565c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/Makefile +++ /dev/null @@ -1,97 +0,0 @@ -# Makefile for GLUT -# -# NOTICE: The OpenGL Utility Toolkit (GLUT) distribution contains source -# code published in a book titled "Programming OpenGL for the X Window -# System" (ISBN: 0-201-48359-9) published by Addison-Wesley. The -# programs and associated files contained in the distribution were -# developed by Mark J. Kilgard and are Copyright 1994, 1995, 1996 by Mark -# J. Kilgard (unless otherwise noted). The programs are not in the -# public domain, but they are freely distributable without licensing -# fees. These programs are provided without guarantee or warrantee -# expressed or implied. -# -# GLUT source included with Mesa with permission from Mark Kilgard. - -# src/glut/beos/Makefile - -TOP = ../../.. -include $(TOP)/configs/current - -GLUT_MAJOR = 3 -GLUT_MINOR = 7 -GLUT_TINY = 1 - -CPP_SOURCES = \ - glutBlocker.cpp \ - glutInit.cpp \ - glutWindow.cpp \ - glutEvent.cpp \ - glutCallback.cpp \ - glutOverlay.cpp \ - glutGet.cpp \ - glutColor.cpp \ - glutCursor.cpp \ - glutMenu.cpp \ - glutDstr.cpp \ - beos_x11.cpp - -C_SOURCES = \ - glut_8x13.c \ - glut_9x15.c \ - glut_bitmap.c \ - glut_bwidth.c \ - glut_hel10.c \ - glut_hel12.c \ - glut_hel18.c \ - glut_tr10.c \ - glut_tr24.c \ - glut_mroman.c \ - glut_roman.c \ - glut_stroke.c \ - glut_swidth.c \ - glut_shapes.c \ - glut_teapot.c \ - glut_vidresize.c \ - glut_util.c \ - glut_ext.c - -OBJECTS = \ - $(CPP_SOURCES:.cpp=.o) \ - $(C_SOURCES:.c=.o) - -INCLUDES = \ - -I. \ - -I- \ - -I$(TOP)/include - -# Rules - -.cpp.o: - $(CC) -c $< $(INCLUDES) $(CFLAGS) $(GLUT_CFLAGS) -o $@ - -.c.o: - $(CC) -c $< $(INCLUDES) $(CFLAGS) $(GLUT_CFLAGS) -o $@ - - -# ---- TARGETS - -default: $(LIB_DIR) $(LIB_DIR)/$(GLUT_LIB_NAME) - -# Create the lib directory if missing -$(LIB_DIR): - mkdir $(LIB_DIR) - -# Make the library -$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS) - @$(TOP)/bin/mklib -o $(GLUT_LIB) -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \ - -install $(LIB_DIR) $(MKLIB_OPTIONS) $(GLUT_LIB_DEPS) \ - $(OBJECTS) - -clean: - -rm -f *.o - -depend: $(SOURCES) - touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null - -include depend diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/beos_x11.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/beos_x11.cpp deleted file mode 100644 index 2d1bc655cb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/beos_x11.cpp +++ /dev/null @@ -1,181 +0,0 @@ - -/* Copyright (c) Nate Robins, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include -#include "beos_x11.h" - -/* NOTE: These functions require a BApplication to be instantiated first */ -int DisplayWidth() { - BScreen s; - return s.Frame().IntegerWidth() + 1; -} - -int DisplayHeight() { - BScreen s; - return s.Frame().IntegerHeight() + 1; -} - -/* the following function was stolen from the X sources as indicated. */ - -/* Copyright Massachusetts Institute of Technology 1985, 1986, 1987 */ -/* $XConsortium: XParseGeom.c,v 11.18 91/02/21 17:23:05 rws Exp $ */ - -/* -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the name of M.I.T. not be used in advertising or -publicity pertaining to distribution of the software without specific, -written prior permission. M.I.T. makes no representations about the -suitability of this software for any purpose. It is provided "as is" -without express or implied warranty. -*/ - -#if 0 // Not used currently... - -/* - *Returns pointer to first char ins search which is also in what, else NULL. - */ -static char *strscan (char *search, char *what) -{ - int i, len = strlen (what); - char c; - - while ((c = *(search++))) { - for (i = 0; i < len; i++) - if (c == what [i]) - return (--search); - } - return (NULL); -} - -#endif - -/* - * XParseGeometry parses strings of the form - * "=x{+-}{+-}", where - * width, height, xoffset, and yoffset are unsigned integers. - * Example: "=80x24+300-49" - * The equal sign is optional. - * It returns a bitmask that indicates which of the four values - * were actually found in the string. For each value found, - * the corresponding argument is updated; for each value - * not found, the corresponding argument is left unchanged. - */ - -static int -ReadInteger(char *string, char **NextString) -{ - register int Result = 0; - int Sign = 1; - - if (*string == '+') - string++; - else if (*string == '-') - { - string++; - Sign = -1; - } - for (; (*string >= '0') && (*string <= '9'); string++) - { - Result = (Result * 10) + (*string - '0'); - } - *NextString = string; - if (Sign >= 0) - return (Result); - else - return (-Result); -} - -int XParseGeometry (char *string, int *x, int *y, - unsigned int *width, unsigned int *height) -{ - int mask = NoValue; - register char *strind; - unsigned int tempWidth=0, tempHeight=0; - int tempX=0, tempY=0; - char *nextCharacter; - - if ( (string == NULL) || (*string == '\0')) return(mask); - if (*string == '=') - string++; /* ignore possible '=' at beg of geometry spec */ - - strind = (char *)string; - if (*strind != '+' && *strind != '-' && *strind != 'x') { - tempWidth = ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return (0); - strind = nextCharacter; - mask |= WidthValue; - } - - if (*strind == 'x' || *strind == 'X') { - strind++; - tempHeight = ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return (0); - strind = nextCharacter; - mask |= HeightValue; - } - - if ((*strind == '+') || (*strind == '-')) { - if (*strind == '-') { - strind++; - tempX = -ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return (0); - strind = nextCharacter; - mask |= XNegative; - - } - else - { strind++; - tempX = ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return(0); - strind = nextCharacter; - } - mask |= XValue; - if ((*strind == '+') || (*strind == '-')) { - if (*strind == '-') { - strind++; - tempY = -ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return(0); - strind = nextCharacter; - mask |= YNegative; - - } - else - { - strind++; - tempY = ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return(0); - strind = nextCharacter; - } - mask |= YValue; - } - } - - /* If strind isn't at the end of the string the it's an invalid - geometry specification. */ - - if (*strind != '\0') return (0); - - if (mask & XValue) - *x = tempX; - if (mask & YValue) - *y = tempY; - if (mask & WidthValue) - *width = tempWidth; - if (mask & HeightValue) - *height = tempHeight; - return (mask); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/beos_x11.h b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/beos_x11.h deleted file mode 100644 index 966dddd5e0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/beos_x11.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef __beos_x11_h__ -#define __beos_x11_h__ - -/* Copyright (c) Nate Robins, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -/* - * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding - * value (x, y, width, height) was found in the parsed string. -*/ -#define NoValue 0x0000 -#define XValue 0x0001 -#define YValue 0x0002 -#define WidthValue 0x0004 -#define HeightValue 0x0008 -#define AllValues 0x000F -#define XNegative 0x0010 -#define YNegative 0x0020 - -/* Function prototypes. */ - -extern int DisplayWidth(); -extern int DisplayHeight(); - -extern int XParseGeometry( - char* string, - int* x, int* y, - unsigned int* width, unsigned int* height); - -#endif /* __beos_x11_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutBlocker.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutBlocker.cpp deleted file mode 100644 index aa948522b9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutBlocker.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/*********************************************************** - * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby. - * - * This program is freely distributable without licensing fees - * and is provided without guarantee or warrantee expressed or - * implied. This program is -not- in the public domain. - * - * FILE: glutBlocker.cpp - * - * DESCRIPTION: helper class for GLUT event loop. - * if a window receives an event, wake up the event loop. - ***********************************************************/ - -/*********************************************************** - * Headers - ***********************************************************/ -#include "glutBlocker.h" - -/*********************************************************** - * Global variable - ***********************************************************/ -GlutBlocker gBlock; - -/*********************************************************** - * Member functions - ***********************************************************/ -GlutBlocker::GlutBlocker() { - gSem = create_sem(1, "gSem"); - eSem = create_sem(0, "eSem"); - events = false; - sleeping = false; -} - -GlutBlocker::~GlutBlocker() { - delete_sem(eSem); - delete_sem(gSem); -} - -void GlutBlocker::WaitEvent() { - acquire_sem(gSem); - if(!events) { // wait for new event - sleeping = true; - release_sem(gSem); - acquire_sem(eSem); // next event will release eSem - } else { - release_sem(gSem); - } -} - -void GlutBlocker::WaitEvent(bigtime_t usecs) { - acquire_sem(gSem); - if(!events) { // wait for new event - sleeping = true; - release_sem(gSem); - acquire_sem_etc(eSem, 1, B_TIMEOUT, usecs); // wait for next event or timeout - } else { - release_sem(gSem); - } -} - -void GlutBlocker::NewEvent() { - acquire_sem(gSem); - events = true; // next call to WaitEvent returns immediately - if(sleeping) { - sleeping = false; - release_sem(eSem); // if event loop is blocking, wake it up - } - release_sem(gSem); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutBlocker.h b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutBlocker.h deleted file mode 100644 index fc9e4cc309..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutBlocker.h +++ /dev/null @@ -1,47 +0,0 @@ -/*********************************************************** - * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby. - * - * This program is freely distributable without licensing fees - * and is provided without guarantee or warrantee expressed or - * implied. This program is -not- in the public domain. - * - * FILE: glutBlocker.h - * - * DESCRIPTION: helper class for GLUT event loop. - * if a window receives an event, wake up the event loop. - ***********************************************************/ - -/*********************************************************** - * Headers - ***********************************************************/ -#include - -/*********************************************************** - * CLASS: GlutBlocker - * - * DESCRIPTION: Fairly naive, but safe implementation. - * global semaphore controls access to state - * event semaphore blocks WaitEvent() call if necessary - * (this is basically a condition variable class) - ***********************************************************/ -class GlutBlocker { -public: - GlutBlocker(); - ~GlutBlocker(); - void WaitEvent(); // wait for new event - void WaitEvent(bigtime_t usecs); // wait with timeout - void NewEvent(); // new event from a window (may need to wakeup main thread) - void QuickNewEvent() { events = true; } // new event from main thread - void ClearEvents() { events = false; } // clear counter at beginning of event loop - bool PendingEvent() { return events; } // XPending() equivalent -private: - sem_id gSem; - sem_id eSem; - bool events; // are there any new events? - bool sleeping; // is someone sleeping on eSem? -}; - -/*********************************************************** - * Global variable - ***********************************************************/ -extern GlutBlocker gBlock; diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutCallback.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutCallback.cpp deleted file mode 100644 index cf3daaaf36..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutCallback.cpp +++ /dev/null @@ -1,171 +0,0 @@ -/*********************************************************** - * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby. - * - * This program is freely distributable without licensing fees - * and is provided without guarantee or warrantee expressed or - * implied. This program is -not- in the public domain. - * - * - * FILE: glutCallback.cpp - * - * DESCRIPTION: put all the callback setting routines in - * one place - ***********************************************************/ - -/*********************************************************** - * Headers - ***********************************************************/ -#include -#include "glutint.h" -#include "glutState.h" - -/*********************************************************** - * Window related callbacks - ***********************************************************/ -void APIENTRY -glutDisplayFunc(GLUTdisplayCB displayFunc) -{ - /* XXX Remove the warning after GLUT 3.0. */ - if (!displayFunc) - __glutFatalError("NULL display callback not allowed in GLUT 3.0; update your code."); - gState.currentWindow->display = displayFunc; -} - -void APIENTRY -glutKeyboardFunc(GLUTkeyboardCB keyboardFunc) -{ - gState.currentWindow->keyboard = keyboardFunc; -} - -void APIENTRY -glutSpecialFunc(GLUTspecialCB specialFunc) -{ - gState.currentWindow->special = specialFunc; -} - -void APIENTRY -glutMouseFunc(GLUTmouseCB mouseFunc) -{ - gState.currentWindow->mouse = mouseFunc; -} - -void APIENTRY -glutMotionFunc(GLUTmotionCB motionFunc) -{ - gState.currentWindow->motion = motionFunc; -} - -void APIENTRY -glutPassiveMotionFunc(GLUTpassiveCB passiveMotionFunc) -{ - gState.currentWindow->passive = passiveMotionFunc; -} - -void APIENTRY -glutEntryFunc(GLUTentryCB entryFunc) -{ - gState.currentWindow->entry = entryFunc; - if (!entryFunc) { - gState.currentWindow->entryState = -1; - } -} - -void APIENTRY -glutWindowStatusFunc(GLUTwindowStatusCB windowStatusFunc) -{ - gState.currentWindow->windowStatus = windowStatusFunc; -} - -static void -visibilityHelper(int status) -{ - if (status == GLUT_HIDDEN || status == GLUT_FULLY_COVERED) - gState.currentWindow->visibility(GLUT_NOT_VISIBLE); - else - gState.currentWindow->visibility(GLUT_VISIBLE); -} - -void APIENTRY -glutVisibilityFunc(GLUTvisibilityCB visibilityFunc) -{ - gState.currentWindow->visibility = visibilityFunc; - if (visibilityFunc) - glutWindowStatusFunc(visibilityHelper); - else - glutWindowStatusFunc(NULL); -} - -void APIENTRY -glutReshapeFunc(GLUTreshapeCB reshapeFunc) -{ - if (reshapeFunc) { - gState.currentWindow->reshape = reshapeFunc; - } else { - gState.currentWindow->reshape = __glutDefaultReshape; - } -} - -/*********************************************************** - * General callbacks (timer callback in glutEvent.cpp) - ***********************************************************/ -/* DEPRICATED, use glutMenuStatusFunc instead. */ -void APIENTRY -glutMenuStateFunc(GLUTmenuStateCB menuStateFunc) -{ - gState.menuStatus = (GLUTmenuStatusCB) menuStateFunc; -} - -void APIENTRY -glutMenuStatusFunc(GLUTmenuStatusCB menuStatusFunc) -{ - gState.menuStatus = menuStatusFunc; -} - -void APIENTRY -glutIdleFunc(GLUTidleCB idleFunc) -{ - gState.idle = idleFunc; -} - -/*********************************************************** - * Unsupported callbacks - ***********************************************************/ -void APIENTRY -glutOverlayDisplayFunc(GLUTdisplayCB displayFunc) -{ -} - -void APIENTRY -glutSpaceballMotionFunc(GLUTspaceMotionCB spaceMotionFunc) -{ -} - -void APIENTRY -glutSpaceballRotateFunc(GLUTspaceRotateCB spaceRotateFunc) -{ -} - -void APIENTRY -glutSpaceballButtonFunc(GLUTspaceButtonCB spaceButtonFunc) -{ -} - -void APIENTRY -glutButtonBoxFunc(GLUTbuttonBoxCB buttonBoxFunc) -{ -} - -void APIENTRY -glutDialsFunc(GLUTdialsCB dialsFunc) -{ -} - -void APIENTRY -glutTabletMotionFunc(GLUTtabletMotionCB tabletMotionFunc) -{ -} - -void APIENTRY -glutTabletButtonFunc(GLUTtabletButtonCB tabletButtonFunc) -{ -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutColor.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutColor.cpp deleted file mode 100644 index d9f7739ae5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutColor.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/*********************************************************** - * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby. - * - * This program is freely distributable without licensing fees - * and is provided without guarantee or warrantee expressed or - * implied. This program is -not- in the public domain. - * - * - * FILE: glutColor.cpp - * - * DESCRIPTION: we don't support indexed color, so this code is - * really simple - ***********************************************************/ - -/*********************************************************** - * Headers - ***********************************************************/ -#include -#include "glutint.h" - -void glutSetColor(int cell, GLfloat red, GLfloat green, GLfloat blue) { - __glutWarning("glutSetColor: current window is RGBA"); -} - -GLfloat glutGetColor(int cell, int component) { - __glutWarning("glutGetColor: current window is RGBA"); - return -1.0; -} - -void glutCopyColormap(int win) { - __glutWarning("glutCopyColormap: color index not supported in BeOS"); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutCursor.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutCursor.cpp deleted file mode 100644 index 3081fff44b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutCursor.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/*********************************************************** - * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby. - * - * This program is freely distributable without licensing fees - * and is provided without guarantee or warrantee expressed or - * implied. This program is -not- in the public domain. - * - * - * FILE: glutCursor.cpp - * - * DESCRIPTION: code for handling custom mouse cursors - ***********************************************************/ - -/*********************************************************** - * Headers - ***********************************************************/ -#include -#include "glutint.h" -#include "glutState.h" -#include "glutCursors.h" - -static const unsigned char *cursorTable[] = { - XC_arrow, /* GLUT_CURSOR_RIGHT_ARROW */ - XC_top_left_arrow, /* GLUT_CURSOR_LEFT_ARROW */ - XC_hand1, /* GLUT_CURSOR_INFO */ - XC_pirate, /* GLUT_CURSOR_DESTROY */ - XC_question_arrow, /* GLUT_CURSOR_HELP */ - XC_exchange, /* GLUT_CURSOR_CYCLE */ - XC_spraycan, /* GLUT_CURSOR_SPRAY */ - XC_watch, /* GLUT_CURSOR_WAIT */ - XC_xterm, /* GLUT_CURSOR_TEXT */ - XC_crosshair, /* GLUT_CURSOR_CROSSHAIR */ - XC_sb_v_double_arrow, /* GLUT_CURSOR_UP_DOWN */ - XC_sb_h_double_arrow, /* GLUT_CURSOR_LEFT_RIGHT */ - XC_top_side, /* GLUT_CURSOR_TOP_SIDE */ - XC_bottom_side, /* GLUT_CURSOR_BOTTOM_SIDE */ - XC_left_side, /* GLUT_CURSOR_LEFT_SIDE */ - XC_right_side, /* GLUT_CURSOR_RIGHT_SIDE */ - XC_top_left_corner, /* GLUT_CURSOR_TOP_LEFT_CORNER */ - XC_top_right_corner, /* GLUT_CURSOR_TOP_RIGHT_CORNER */ - XC_bottom_right_corner, /* GLUT_CURSOR_BOTTOM_RIGHT_CORNER */ - XC_bottom_left_corner, /* GLUT_CURSOR_BOTTOM_LEFT_CORNER */ -}; - -/*********************************************************** - * FUNCTION: glutSetCursor (4.13) - * - * DESCRIPTION: set a new mouse cursor for current window - ***********************************************************/ -void glutSetCursor(int cursor) { - gState.currentWindow->Window()->Lock(); - gState.currentWindow->cursor = cursor; - __glutSetCursor(cursor); - gState.currentWindow->Window()->Unlock(); -} - -/*********************************************************** - * FUNCTION: __glutSetCursor - * - * DESCRIPTION: the actual cursor changing routine - ***********************************************************/ -void __glutSetCursor(int cursor) { - int realcursor = cursor; - if (cursor < 0 || cursor > GLUT_CURSOR_BOTTOM_LEFT_CORNER) { - switch(cursor) { - case GLUT_CURSOR_INHERIT: - return; // don't change cursor - case GLUT_CURSOR_NONE: - // this hides the cursor until the user moves the mouse - // change it to HideCursor() AT YOUR OWN RISK! - be_app->ObscureCursor(); - return; - case GLUT_CURSOR_FULL_CROSSHAIR: - realcursor = GLUT_CURSOR_CROSSHAIR; - break; - default: - __glutWarning("unknown cursor\n"); - return; - } - } - be_app->SetCursor(cursorTable[realcursor]); -} - -/*********************************************************** - * FUNCTION: glutWarpPointer (x.xx) - * - * DESCRIPTION: move the mouse pointer to a new location - * (note: can't do this in BeOS!) - ***********************************************************/ -void glutWarpPointer(int x, int y) { } diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutCursors.h b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutCursors.h deleted file mode 100644 index 59f6951e2d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutCursors.h +++ /dev/null @@ -1,3083 +0,0 @@ -/* cursors.h: X Window standard cursor shapes */ -/* Generated by bdftobcursor */ - -const unsigned char XC_X_cursor[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 9, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x70, 0xe, - 0x78, 0x1e, - 0x7c, 0x3e, - 0x3e, 0x7c, - 0x1f, 0xf8, - 0xf, 0xf0, - 0x7, 0xe0, - 0x7, 0xe0, - 0xf, 0xf0, - 0x1f, 0xf8, - 0x3e, 0x7c, - 0x7c, 0x3e, - 0x78, 0x1e, - 0x70, 0xe, - 0x0, 0x0, - /* mask */ - 0xf0, 0xf, - 0xf8, 0x1f, - 0xfc, 0x3f, - 0xfe, 0x7f, - 0x7f, 0xfe, - 0x3f, 0xfc, - 0x1f, 0xf8, - 0xf, 0xf0, - 0xf, 0xf0, - 0x1f, 0xf8, - 0x3f, 0xfc, - 0x7f, 0xfe, - 0xfe, 0x7f, - 0xfc, 0x3f, - 0xf8, 0x1f, - 0xf0, 0xf, -}; - -const unsigned char XC_arrow[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 1, 2, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x60, 0x0, - 0x78, 0x0, - 0x3e, 0x0, - 0x3f, 0x80, - 0x1f, 0xe0, - 0x1f, 0xf8, - 0xf, 0x80, - 0xf, 0xc0, - 0x6, 0xe0, - 0x6, 0x70, - 0x2, 0x38, - 0x2, 0x1c, - 0x0, 0xe, - 0x0, 0x4, - 0x0, 0x0, - /* mask */ - 0xe0, 0x0, - 0xf8, 0x0, - 0xfe, 0x0, - 0x7f, 0x80, - 0x7f, 0xe0, - 0x3f, 0xf8, - 0x3f, 0xfc, - 0x1f, 0xfc, - 0x1f, 0xe0, - 0xf, 0xf0, - 0xf, 0xf8, - 0x7, 0x7c, - 0x7, 0x3e, - 0x2, 0x1f, - 0x0, 0xe, - 0x0, 0x4, -}; - -const unsigned char XC_based_arrow_down[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 12, 9, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0xf, 0xf0, - 0x0, 0x0, - 0xf, 0xf0, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x5, 0xa0, - 0x3, 0xc0, - 0x1, 0x80, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x0, 0x0, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x3, 0xc0, - 0x3, 0xc0, - 0xf, 0xf0, - 0xf, 0xf0, - 0xf, 0xf0, - 0x7, 0xe0, - 0x3, 0xc0, - 0x0, 0x0, - 0x0, 0x0, -}; - -const unsigned char XC_based_arrow_up[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 12, 9, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x1, 0x80, - 0x3, 0xc0, - 0x5, 0xa0, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0xf, 0xf0, - 0x0, 0x0, - 0xf, 0xf0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x0, 0x0, - 0x1, 0x80, - 0x3, 0xc0, - 0xf, 0xf0, - 0xf, 0xf0, - 0xf, 0xf0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x0, 0x0, - 0x0, 0x0, -}; - -const unsigned char XC_boat[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 2, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x80, - 0x3, 0xe0, - 0x6, 0x11, - 0xff, 0xff, - 0x18, 0x0, - 0x4, 0x0, - 0x2, 0x0, - 0x3, 0xff, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0xe0, - 0x3, 0xf0, - 0x7, 0xf9, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0x1f, 0xff, - 0x7, 0xff, - 0x3, 0xff, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, -}; - -const unsigned char XC_bogosity[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x38, 0x8e, - 0x8, 0x88, - 0x8, 0x88, - 0x8, 0x88, - 0x3f, 0xfe, - 0x28, 0x8a, - 0x28, 0x8a, - 0x28, 0x8a, - 0x28, 0x8a, - 0x3f, 0xfe, - 0x8, 0x88, - 0x8, 0x88, - 0x8, 0x88, - 0x38, 0x8e, - 0x0, 0x0, - /* mask */ - 0x7d, 0xdf, - 0x7d, 0xdf, - 0x7d, 0xdf, - 0x1d, 0xdc, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7d, 0xdf, - 0x7d, 0xdf, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x1d, 0xdc, - 0x7d, 0xdf, - 0x7d, 0xdf, - 0x7d, 0xdf, -}; - -const unsigned char XC_bottom_left_corner[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 14, 15, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x6, - 0x0, 0x6, - 0x10, 0x46, - 0x8, 0x46, - 0x4, 0x46, - 0x2, 0x46, - 0x1, 0x46, - 0x0, 0xc6, - 0x1f, 0xc6, - 0x0, 0x6, - 0x0, 0x6, - 0x0, 0x6, - 0x7f, 0xfe, - 0x7f, 0xfe, - 0x0, 0x0, - /* mask */ - 0x0, 0xf, - 0x0, 0xf, - 0x30, 0xef, - 0x38, 0xef, - 0x1c, 0xef, - 0xe, 0xef, - 0x7, 0xef, - 0x3, 0xef, - 0x3f, 0xef, - 0x3f, 0xef, - 0x3f, 0xef, - 0x0, 0xf, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, -}; - -const unsigned char XC_bottom_right_corner[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 14, 2, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x60, 0x0, - 0x60, 0x0, - 0x62, 0x8, - 0x62, 0x10, - 0x62, 0x20, - 0x62, 0x40, - 0x62, 0x80, - 0x63, 0x0, - 0x63, 0xf8, - 0x60, 0x0, - 0x60, 0x0, - 0x60, 0x0, - 0x7f, 0xfe, - 0x7f, 0xfe, - 0x0, 0x0, - /* mask */ - 0xf0, 0x0, - 0xf0, 0x0, - 0xf7, 0xc, - 0xf7, 0x1c, - 0xf7, 0x38, - 0xf7, 0x70, - 0xf7, 0xe0, - 0xf7, 0xc0, - 0xf7, 0xfc, - 0xf7, 0xfc, - 0xf7, 0xfc, - 0xf0, 0x0, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, -}; - -const unsigned char XC_bottom_side[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 14, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x8, 0x88, - 0x4, 0x90, - 0x2, 0xa0, - 0x1, 0xc0, - 0x0, 0x80, - 0x0, 0x0, - 0x3f, 0xfe, - 0x3f, 0xfe, - 0x0, 0x0, - /* mask */ - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x19, 0xcc, - 0x1d, 0xdc, - 0xf, 0xf8, - 0x7, 0xf0, - 0x3, 0xe0, - 0x1, 0xc0, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, -}; - -const unsigned char XC_bottom_tee[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 12, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x7f, 0xfe, - 0x7f, 0xfe, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x0, 0x0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0x0, 0x0, - 0x0, 0x0, -}; - -const unsigned char XC_box_spiral[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 8, 7, /* y,x of hotspot */ - /* data */ - 0xff, 0xff, - 0x0, 0x1, - 0x7f, 0xfd, - 0x40, 0x5, - 0x5f, 0xf5, - 0x50, 0x15, - 0x57, 0xd5, - 0x54, 0x55, - 0x55, 0x55, - 0x55, 0xd5, - 0x54, 0x15, - 0x57, 0xf5, - 0x50, 0x5, - 0x5f, 0xfd, - 0x40, 0x1, - 0x7f, 0xff, - /* mask */ - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, -}; - -const unsigned char XC_center_ptr[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 1, 9, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x81, 0x80, - 0x1, 0x80, - 0x3, 0xc0, - 0x3, 0xc0, - 0x7, 0xe0, - 0x7, 0xe0, - 0xf, 0xf0, - 0xf, 0xf0, - 0x19, 0x98, - 0x11, 0x88, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x0, 0x0, - /* mask */ - 0x83, 0xc0, - 0x3, 0xc0, - 0x7, 0xe0, - 0x7, 0xe0, - 0xf, 0xf0, - 0xf, 0xf0, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3b, 0xdc, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, -}; - -const unsigned char XC_circle[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 8, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x3, 0xc0, - 0xf, 0xf0, - 0x1f, 0xf8, - 0x3c, 0x3c, - 0x38, 0x1c, - 0x70, 0xe, - 0x70, 0xe, - 0x70, 0xe, - 0x70, 0xe, - 0x38, 0x1c, - 0x3c, 0x3c, - 0x1f, 0xf8, - 0xf, 0xf0, - 0x3, 0xc0, - 0x0, 0x0, - /* mask */ - 0x7, 0xe0, - 0x1f, 0xf8, - 0x3f, 0xfc, - 0x7f, 0xfe, - 0x7f, 0xfe, - 0xfc, 0x3f, - 0xf8, 0x1f, - 0xf8, 0x1f, - 0xf8, 0x1f, - 0xf8, 0x1f, - 0xfc, 0x3f, - 0x7f, 0xfe, - 0x7f, 0xfe, - 0x3f, 0xfc, - 0x1f, 0xf8, - 0x7, 0xe0, -}; - -const unsigned char XC_clock[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 3, 9, /* y,x of hotspot */ - /* data */ - 0x1f, 0xf8, - 0x33, 0xcc, - 0x66, 0x26, - 0x49, 0x92, - 0x48, 0xf2, - 0x44, 0x22, - 0x63, 0xc6, - 0x3f, 0xfc, - 0x29, 0x94, - 0x29, 0x94, - 0x29, 0x94, - 0x2b, 0xd4, - 0x69, 0x96, - 0x78, 0x1e, - 0x7f, 0xfe, - 0x7f, 0xfe, - /* mask */ - 0x1f, 0xfe, - 0x39, 0xf7, - 0x77, 0xdb, - 0x6d, 0xed, - 0x6f, 0xfd, - 0x66, 0xf9, - 0x73, 0xf3, - 0x3f, 0xff, - 0x35, 0xeb, - 0x35, 0xeb, - 0x35, 0xeb, - 0x37, 0xfb, - 0x75, 0xeb, - 0x7c, 0xcf, - 0x7f, 0xff, - 0x7f, 0xff, -}; - -const unsigned char XC_coffee_mug[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 9, 8, /* y,x of hotspot */ - /* data */ - 0x8f, 0xf8, - 0x10, 0x4, - 0x60, 0x6, - 0x58, 0xa, - 0x47, 0xf2, - 0x40, 0x3, - 0x40, 0x3, - 0x40, 0x2, - 0x40, 0x2, - 0x58, 0x9a, - 0x55, 0x56, - 0x55, 0xd7, - 0x59, 0x5b, - 0x40, 0x2, - 0x40, 0x2, - 0x3f, 0xfc, - /* mask */ - 0xf, 0xf8, - 0x1f, 0xfc, - 0xff, 0xfe, - 0xff, 0xfe, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xfe, - 0xff, 0xfe, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xfe, - 0x3f, 0xfc, -}; - -const unsigned char XC_cross[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 9, /* y,x of hotspot */ - /* data */ - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0xff, 0x7f, - 0x0, 0x0, - 0xff, 0x7f, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x0, 0x0, - /* mask */ - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, -}; - -const unsigned char XC_cross_reverse[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 9, /* y,x of hotspot */ - /* data */ - 0x21, 0x42, - 0x51, 0x45, - 0x29, 0x4a, - 0x15, 0x54, - 0xb, 0x68, - 0x5, 0x50, - 0xfe, 0xbf, - 0x1, 0x40, - 0xfe, 0xbf, - 0x5, 0x50, - 0xb, 0x68, - 0x15, 0x54, - 0x29, 0x4a, - 0x51, 0x45, - 0x21, 0x42, - 0x0, 0x0, - /* mask */ - 0x33, 0x66, - 0xdb, 0x6d, - 0x6f, 0x7b, - 0x37, 0x76, - 0x1b, 0x6c, - 0xfd, 0x5f, - 0xfe, 0x3f, - 0x0, 0x80, - 0xfe, 0x3f, - 0xfd, 0x5f, - 0x1b, 0x6c, - 0x37, 0x76, - 0x6f, 0x7b, - 0xdb, 0x6d, - 0x33, 0x66, - 0x0, 0x0, -}; - -const unsigned char XC_crosshair[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 9, /* y,x of hotspot */ - /* data */ - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0xff, 0x7f, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x0, - /* mask */ - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, -}; - -const unsigned char XC_diamond_cross[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 8, /* y,x of hotspot */ - /* data */ - 0x81, 0x40, - 0x3, 0x60, - 0x5, 0x50, - 0x9, 0x48, - 0x11, 0x44, - 0x21, 0x42, - 0x7f, 0x7f, - 0x0, 0x0, - 0x7f, 0x7f, - 0x21, 0x42, - 0x11, 0x44, - 0x9, 0x48, - 0x5, 0x50, - 0x3, 0x60, - 0x1, 0x40, - 0x0, 0x0, - /* mask */ - 0x3, 0xe0, - 0x7, 0xf0, - 0xf, 0xf8, - 0x1d, 0xdc, - 0x39, 0xce, - 0x71, 0xc7, - 0xff, 0xff, - 0xff, 0x7f, - 0xff, 0xff, - 0x71, 0xc7, - 0x39, 0xce, - 0x1d, 0xdc, - 0xf, 0xf8, - 0x7, 0xf0, - 0x3, 0xe0, - 0x1, 0xc0, -}; - -const unsigned char XC_dot[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 8, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x83, 0xc0, - 0xf, 0xf0, - 0xf, 0xf0, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0xf, 0xf0, - 0xf, 0xf0, - 0x3, 0xc0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x0, 0x0, - 0x87, 0xe0, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x7, 0xe0, - 0x0, 0x0, - 0x0, 0x0, -}; - -const unsigned char XC_dotbox[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x7f, 0xfc, - 0x20, 0x4, - 0x20, 0x4, - 0x20, 0x4, - 0x20, 0x4, - 0x21, 0x84, - 0x21, 0x84, - 0x20, 0x4, - 0x20, 0x4, - 0x20, 0x4, - 0x20, 0x4, - 0x3f, 0xfc, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x7f, 0xfe, - 0x7f, 0xfe, - 0x7f, 0xfe, - 0x70, 0xe, - 0x70, 0xe, - 0x73, 0xce, - 0x73, 0xce, - 0x73, 0xce, - 0x73, 0xce, - 0x70, 0xe, - 0x70, 0xe, - 0x7f, 0xfe, - 0x7f, 0xfe, - 0x7f, 0xfe, - 0x0, 0x0, -}; - -const unsigned char XC_double_arrow[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 8, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x81, 0x80, - 0x3, 0xc0, - 0x7, 0xe0, - 0xd, 0xb0, - 0x19, 0x98, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x19, 0x98, - 0xd, 0xb0, - 0x7, 0xe0, - 0x3, 0xc0, - 0x1, 0x80, - 0x0, 0x0, - /* mask */ - 0x83, 0xc0, - 0x7, 0xe0, - 0xf, 0xf0, - 0x1f, 0xf8, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x1f, 0xf8, - 0xf, 0xf0, - 0x7, 0xe0, - 0x3, 0xc0, -}; - -const unsigned char XC_draft_large[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 0, 1, /* y,x of hotspot */ - /* data */ - 0xc0, 0x0, - 0x30, 0x0, - 0x3c, 0x0, - 0x1f, 0x0, - 0x1f, 0xc0, - 0xf, 0xf0, - 0xf, 0xfc, - 0x7, 0x80, - 0x7, 0x40, - 0x3, 0x20, - 0x3, 0x10, - 0x1, 0x8, - 0x1, 0x4, - 0x0, 0x2, - 0x0, 0x1, - 0x0, 0x0, - /* mask */ - 0x60, 0x0, - 0x78, 0x0, - 0x7e, 0x0, - 0x3f, 0x80, - 0x1f, 0xe0, - 0x1f, 0xf8, - 0xf, 0xfe, - 0xf, 0xfe, - 0x7, 0xe0, - 0x7, 0xf0, - 0x3, 0xb8, - 0x3, 0x9c, - 0x1, 0x8e, - 0x1, 0x87, - 0x0, 0x3, - 0x0, 0x1, -}; - -const unsigned char XC_draft_small[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 0, 1, /* y,x of hotspot */ - /* data */ - 0x40, 0x0, - 0x30, 0x0, - 0x3c, 0x0, - 0x1f, 0x0, - 0x1f, 0xc0, - 0xe, 0x0, - 0xd, 0x0, - 0x4, 0x80, - 0x4, 0x40, - 0x0, 0x20, - 0x0, 0x10, - 0x0, 0x8, - 0x0, 0x4, - 0x0, 0x2, - 0x0, 0x1, - 0x0, 0x0, - /* mask */ - 0x60, 0x0, - 0x78, 0x0, - 0x3e, 0x0, - 0x3f, 0x80, - 0x1f, 0xe0, - 0x1f, 0xe0, - 0xf, 0x80, - 0xf, 0xc0, - 0x6, 0xe0, - 0x2, 0x70, - 0x0, 0x38, - 0x0, 0x1c, - 0x0, 0xe, - 0x0, 0x7, - 0x0, 0x3, - 0x0, 0x0, -}; - -const unsigned char XC_draped_box[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x7f, 0xfc, - 0x22, 0x44, - 0x26, 0x64, - 0x2c, 0x34, - 0x38, 0x1c, - 0x21, 0x84, - 0x21, 0x84, - 0x38, 0x1c, - 0x2c, 0x34, - 0x26, 0x64, - 0x22, 0x44, - 0x3f, 0xfc, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x7f, 0xfe, - 0x7f, 0xfe, - 0x67, 0xe6, - 0x6f, 0xf6, - 0x7e, 0x7e, - 0x7d, 0xbe, - 0x7b, 0xde, - 0x7b, 0xde, - 0x7d, 0xbe, - 0x7e, 0x7e, - 0x6f, 0xf6, - 0x67, 0xe6, - 0x7f, 0xfe, - 0x7f, 0xfe, - 0x0, 0x0, -}; - -const unsigned char XC_exchange[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 9, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x7, 0xe2, - 0xf, 0xf6, - 0x18, 0x3e, - 0x10, 0x12, - 0x0, 0x32, - 0x0, 0x7e, - 0x0, 0x0, - 0x0, 0x0, - 0x7e, 0x0, - 0x4c, 0x0, - 0x48, 0x8, - 0x7c, 0x18, - 0x6f, 0xf0, - 0x47, 0xe0, - 0x0, 0x0, - /* mask */ - 0x7, 0xe3, - 0xf, 0xf7, - 0x1f, 0xff, - 0x3f, 0xff, - 0x38, 0x3f, - 0x30, 0xff, - 0x0, 0xff, - 0x0, 0xff, - 0xff, 0x0, - 0xff, 0x0, - 0xfe, 0xc, - 0xfc, 0x1c, - 0xff, 0xfc, - 0xff, 0xf8, - 0xef, 0xf0, - 0xc7, 0xe0, -}; - -const unsigned char XC_fleur[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 8, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x1, 0x80, - 0x3, 0xc0, - 0x7, 0xe0, - 0x1, 0x80, - 0x11, 0x88, - 0x31, 0x8c, - 0x7f, 0xfe, - 0x7f, 0xfe, - 0x31, 0x8c, - 0x11, 0x88, - 0x1, 0x80, - 0x7, 0xe0, - 0x3, 0xc0, - 0x1, 0x80, - 0x0, 0x0, - /* mask */ - 0x3, 0xc0, - 0x7, 0xc0, - 0x7, 0xe0, - 0xf, 0xf0, - 0x17, 0xe8, - 0x3b, 0xdc, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0x3b, 0xdc, - 0x17, 0xe8, - 0xf, 0xf0, - 0x7, 0xe0, - 0x3, 0xc0, - 0x3, 0xc0, -}; - -const unsigned char XC_gobbler[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 2, 2, /* y,x of hotspot */ - /* data */ - 0x1e, 0x0, - 0xe, 0x0, - 0xcc, 0x1, - 0xd, 0xf9, - 0xf, 0xff, - 0xc, 0x7f, - 0xc, 0x3f, - 0x1c, 0x6, - 0xf, 0x0, - 0x7, 0xf8, - 0x0, 0x10, - 0x0, 0x10, - 0x0, 0x10, - 0x0, 0x10, - 0x0, 0x78, - 0x0, 0x0, - /* mask */ - 0x3f, 0x0, - 0x3f, 0x0, - 0xff, 0x3, - 0xff, 0xff, - 0xff, 0xff, - 0x3f, 0xff, - 0x3f, 0xff, - 0x3f, 0xff, - 0x3f, 0xff, - 0x3f, 0xff, - 0x1f, 0xfe, - 0xf, 0xf8, - 0x0, 0x38, - 0x0, 0x38, - 0x0, 0xfc, - 0x0, 0xfc, -}; - -const unsigned char XC_gumby[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 0, 14, /* y,x of hotspot */ - /* data */ - 0x0, 0xfc, - 0x1, 0x8, - 0x2, 0x13, - 0x5, 0x57, - 0x4, 0x13, - 0x5, 0xd3, - 0x3c, 0x1f, - 0xfc, 0x1c, - 0xe4, 0x10, - 0xe4, 0x10, - 0xf4, 0x90, - 0xe4, 0x90, - 0x4, 0x90, - 0x8, 0x88, - 0x10, 0x84, - 0x1f, 0x7c, - /* mask */ - 0x0, 0xfc, - 0x1, 0xfb, - 0x3, 0xf7, - 0x7, 0xff, - 0x7, 0xf7, - 0x3f, 0xf7, - 0x7f, 0xff, - 0xff, 0xff, - 0xf7, 0xfc, - 0xf7, 0xf0, - 0xff, 0xf0, - 0xf7, 0xf0, - 0xe7, 0xf0, - 0xf, 0xf8, - 0x1f, 0xfc, - 0x1f, 0x7c, -}; - -const unsigned char XC_hand1[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 0, 2, /* y,x of hotspot */ - /* data */ - 0x30, 0x0, - 0x3c, 0x0, - 0xf, 0x0, - 0x7, 0x80, - 0x3, 0xc0, - 0x7, 0xe0, - 0xf, 0xf0, - 0x7, 0xf4, - 0xf, 0xfe, - 0xf, 0xfa, - 0x7, 0xe0, - 0x3, 0xe0, - 0x0, 0x52, - 0x0, 0x46, - 0x0, 0x2c, - 0x0, 0x18, - /* mask */ - 0xb8, 0x0, - 0x3e, 0x0, - 0x1f, 0x80, - 0xf, 0xc0, - 0x7, 0xe0, - 0xf, 0xf0, - 0x1f, 0xfc, - 0x1f, 0xfe, - 0x1f, 0xfe, - 0x1f, 0xfe, - 0xf, 0xfe, - 0x7, 0xfe, - 0x3, 0xfe, - 0x0, 0xfe, - 0x0, 0x7e, - 0x0, 0x3c, -}; - -const unsigned char XC_hand2[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 1, 15, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x1, 0xfe, - 0x2, 0x1, - 0x4, 0x7e, - 0x8, 0x8, - 0x8, 0x70, - 0x8, 0x8, - 0x14, 0x70, - 0x22, 0x8, - 0x41, 0x30, - 0x20, 0xc0, - 0x12, 0x40, - 0x8, 0x80, - 0x5, 0x0, - 0x2, 0x0, - 0x0, 0x0, - /* mask */ - 0x1, 0xfe, - 0x3, 0xff, - 0x7, 0xff, - 0xf, 0xff, - 0x1f, 0xfe, - 0x1f, 0xf8, - 0x1f, 0xfc, - 0x3f, 0xf8, - 0x7f, 0xfc, - 0xff, 0xf8, - 0x7f, 0xf0, - 0x3f, 0xe0, - 0x1f, 0xc0, - 0xf, 0x80, - 0x7, 0x0, - 0x2, 0x0, -}; - -const unsigned char XC_heart[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 9, 9, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x1f, 0x7c, - 0x31, 0xc6, - 0x60, 0x83, - 0x40, 0x1, - 0x40, 0x1, - 0x40, 0x1, - 0x40, 0x1, - 0x60, 0x3, - 0x30, 0x6, - 0x18, 0xc, - 0xc, 0x18, - 0x6, 0x30, - 0x3, 0x60, - 0x1, 0xc0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x9f, 0x7c, - 0x3f, 0xfe, - 0x71, 0xc7, - 0x60, 0x83, - 0x60, 0x3, - 0x60, 0x3, - 0x61, 0x43, - 0x70, 0x87, - 0x38, 0xe, - 0x1c, 0x1c, - 0xe, 0x38, - 0x7, 0xf0, - 0x3, 0xe0, - 0x1, 0xc0, - 0x0, 0x0, -}; - -const unsigned char XC_icon[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 8, 8, /* y,x of hotspot */ - /* data */ - 0xff, 0xff, - 0xaa, 0xab, - 0xd5, 0x55, - 0xaa, 0xab, - 0xd0, 0x5, - 0xa0, 0xb, - 0xd0, 0x5, - 0xa0, 0xb, - 0xd0, 0x5, - 0xa0, 0xb, - 0xd0, 0x5, - 0xa0, 0xb, - 0xd5, 0x55, - 0xaa, 0xab, - 0xd5, 0x55, - 0xff, 0xff, - /* mask */ - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, -}; - -const unsigned char XC_iron_cross[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x3f, 0xfc, - 0x1f, 0xf8, - 0x4f, 0xf2, - 0x67, 0xe6, - 0x73, 0xce, - 0x79, 0x9e, - 0x7f, 0xfe, - 0x7f, 0xfe, - 0x79, 0x9e, - 0x73, 0xce, - 0x67, 0xe6, - 0x4f, 0xf2, - 0x1f, 0xf8, - 0x3f, 0xfc, - 0x0, 0x0, - /* mask */ - 0x3f, 0xfc, - 0x7f, 0xfe, - 0x7f, 0xfe, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0x7f, 0xfe, - 0x7f, 0xfe, - 0x3f, 0xfc, -}; - -const unsigned char XC_left_ptr[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 1, 12, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x10, - 0x0, 0x30, - 0x0, 0x70, - 0x0, 0xf0, - 0x1, 0xf0, - 0x3, 0xf0, - 0x7, 0xf0, - 0xf, 0xf0, - 0x1, 0xf0, - 0x1, 0xb0, - 0x3, 0x10, - 0x3, 0x0, - 0x6, 0x0, - 0x6, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x18, - 0x0, 0x38, - 0x0, 0x78, - 0x0, 0xf8, - 0x1, 0xf8, - 0x3, 0xf8, - 0x7, 0xf8, - 0xf, 0xf8, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x3, 0xf8, - 0x7, 0xb8, - 0x7, 0x98, - 0xf, 0x0, - 0xf, 0x0, - 0x6, 0x0, -}; - -const unsigned char XC_left_side[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 15, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x6, - 0x0, 0x6, - 0x1, 0x6, - 0x0, 0x86, - 0x0, 0x46, - 0x0, 0x26, - 0x7f, 0xf6, - 0x0, 0x26, - 0x0, 0x46, - 0x0, 0x86, - 0x1, 0x6, - 0x0, 0x6, - 0x0, 0x6, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0xf, - 0x0, 0xf, - 0x3, 0xf, - 0x3, 0x8f, - 0x1, 0xcf, - 0x0, 0xef, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0x0, 0xef, - 0x1, 0xcf, - 0x3, 0x8f, - 0x3, 0xf, - 0x0, 0xf, - 0x0, 0xf, - 0x0, 0x0, -}; - -const unsigned char XC_left_tee[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 8, 13, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x80, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x0, - /* mask */ - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, -}; - -const unsigned char XC_leftbutton[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 8, 8, /* y,x of hotspot */ - /* data */ - 0xc0, 0x1, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xa2, 0x22, - 0xaa, 0xa2, - 0xaa, 0xa2, - 0xaa, 0xa2, - 0xaa, 0xa2, - 0xa2, 0x22, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xc0, 0x1, - /* mask */ - 0xbf, 0xfe, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x3f, 0xfe, -}; - -const unsigned char XC_ll_angle[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 12, 13, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x80, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x0, 0x0, - 0x0, 0x0, -}; - -const unsigned char XC_lr_angle[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 12, 4, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x98, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x0, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x0, 0x0, - 0x0, 0x0, -}; - -const unsigned char XC_man[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 5, 2, /* y,x of hotspot */ - /* data */ - 0x1, 0xc0, - 0xf, 0x78, - 0x1, 0x40, - 0x0, 0x81, - 0xe1, 0xc2, - 0xd2, 0x24, - 0xe, 0xb8, - 0x2, 0xa0, - 0x2, 0x20, - 0x1, 0x40, - 0x2, 0x20, - 0x4, 0x90, - 0x9, 0x48, - 0xa, 0x28, - 0x3c, 0x1e, - 0xfc, 0x1f, - /* mask */ - 0x7, 0xf8, - 0xf, 0xfc, - 0x1f, 0xfc, - 0x41, 0xc3, - 0xe3, 0xe7, - 0xff, 0xfe, - 0xdf, 0xfc, - 0xf, 0xf8, - 0x7, 0xe0, - 0x3, 0xe0, - 0x7, 0xf0, - 0xf, 0xf8, - 0x1f, 0xfc, - 0x3f, 0x7e, - 0xfe, 0x3f, - 0xfe, 0x3f, -}; - -const unsigned char XC_middlebutton[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 8, 8, /* y,x of hotspot */ - /* data */ - 0xc0, 0x1, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xa2, 0x22, - 0xaa, 0x2a, - 0xaa, 0x2a, - 0xaa, 0x2a, - 0xaa, 0x2a, - 0xa2, 0x22, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xc0, 0x1, - /* mask */ - 0xbf, 0xfe, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x3f, 0xfe, -}; - -const unsigned char XC_mouse[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 2, 11, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0xe0, - 0x0, 0x30, - 0x0, 0x60, - 0x0, 0xc0, - 0x1f, 0xfe, - 0x20, 0x1, - 0x6c, 0xcd, - 0x6c, 0xcd, - 0x6c, 0xcd, - 0x60, 0x1, - 0x60, 0x1, - 0x38, 0x6, - 0x6, 0x18, - 0x1, 0xe0, - 0x0, 0x0, - /* mask */ - 0x1, 0xf0, - 0x0, 0x78, - 0x0, 0xf0, - 0x0, 0xe0, - 0x1f, 0xfe, - 0x3f, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xef, 0xfc, - 0x7, 0xf8, - 0x3, 0xf0, - 0x1, 0xe0, -}; - -const unsigned char XC_pencil[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 15, 3, /* y,x of hotspot */ - /* data */ - 0x40, 0x38, - 0x0, 0x44, - 0x0, 0xc4, - 0x1, 0x48, - 0x1, 0x78, - 0x2, 0x10, - 0x2, 0x20, - 0x4, 0x20, - 0x4, 0x40, - 0x8, 0xc0, - 0x8, 0x80, - 0x11, 0x0, - 0x1e, 0x0, - 0x1c, 0x0, - 0x18, 0x0, - 0x10, 0x0, - /* mask */ - 0x80, 0x7e, - 0x0, 0xfe, - 0x1, 0xfe, - 0x1, 0xfc, - 0x3, 0xf8, - 0x3, 0xf8, - 0x7, 0xf0, - 0x7, 0xe0, - 0xf, 0xe0, - 0xf, 0xc0, - 0x1f, 0xc0, - 0x3f, 0x80, - 0x3f, 0x0, - 0x3e, 0x0, - 0x3c, 0x0, - 0x38, 0x0, -}; - -const unsigned char XC_pirate[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 12, 8, /* y,x of hotspot */ - /* data */ - 0x1, 0xe0, - 0x3, 0xf0, - 0x7, 0xf8, - 0xc, 0xcc, - 0xc, 0xcc, - 0x7, 0xf8, - 0x3, 0xf0, - 0x1, 0xe0, - 0x21, 0xe1, - 0x61, 0xe1, - 0x10, 0xc2, - 0xe, 0x1c, - 0x1, 0xe0, - 0x47, 0xf8, - 0x7c, 0xf, - 0x20, 0x1, - /* mask */ - 0x3, 0xf0, - 0x7, 0xf8, - 0xf, 0xfc, - 0x1f, 0xfe, - 0x1f, 0xfe, - 0xf, 0xfc, - 0x7, 0xf8, - 0x83, 0xf1, - 0xe3, 0xf1, - 0xf3, 0xf3, - 0x39, 0xef, - 0x1e, 0x1e, - 0x1, 0xe0, - 0xc7, 0xfe, - 0xff, 0xff, - 0x7c, 0xf, -}; - -const unsigned char XC_plus[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 8, 9, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x81, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x0, 0x0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x0, 0x0, - 0x0, 0x0, -}; - -const unsigned char XC_question_arrow[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 8, /* y,x of hotspot */ - /* data */ - 0x83, 0xe0, - 0x7, 0xf0, - 0xe, 0x38, - 0xc, 0x18, - 0xc, 0x38, - 0xe, 0x30, - 0x7, 0x0, - 0x3, 0xc0, - 0x1, 0xc0, - 0x1, 0x40, - 0x1, 0x40, - 0x7, 0x70, - 0x3, 0x60, - 0x1, 0xc0, - 0x0, 0x80, - 0x0, 0x0, - /* mask */ - 0x3, 0xe0, - 0x7, 0xf0, - 0xf, 0xf8, - 0x1f, 0xfc, - 0x1e, 0x3c, - 0x1e, 0x7c, - 0x1f, 0x78, - 0xf, 0xf0, - 0x7, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x7, 0xf0, - 0xf, 0xf8, - 0x7, 0xf0, - 0x3, 0xe0, - 0x1, 0xc0, -}; - -const unsigned char XC_right_ptr[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 1, 5, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x8, 0x0, - 0xc, 0x0, - 0xe, 0x0, - 0xf, 0x0, - 0xf, 0x80, - 0xf, 0xc0, - 0xf, 0xe0, - 0xf, 0xf0, - 0xf, 0x80, - 0xd, 0x80, - 0x8, 0xc0, - 0x0, 0xc0, - 0x0, 0x60, - 0x0, 0x60, - 0x0, 0x0, - /* mask */ - 0x18, 0x0, - 0x1c, 0x0, - 0x1e, 0x0, - 0x1f, 0x0, - 0x1f, 0x80, - 0x1f, 0xc0, - 0x1f, 0xe0, - 0x1f, 0xf0, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x1f, 0xc0, - 0x1d, 0xe0, - 0x19, 0xe0, - 0x0, 0xf0, - 0x0, 0xf0, - 0x0, 0x60, -}; - -const unsigned char XC_right_side[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 2, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x60, 0x0, - 0x60, 0x0, - 0x60, 0x80, - 0x61, 0x0, - 0x62, 0x0, - 0x64, 0x0, - 0x6f, 0xfe, - 0x64, 0x0, - 0x62, 0x0, - 0x61, 0x0, - 0x60, 0x80, - 0x60, 0x0, - 0x60, 0x0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0xf0, 0x0, - 0xf0, 0x0, - 0xf0, 0xc0, - 0xf1, 0xc0, - 0xf3, 0x80, - 0xf7, 0x0, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xf7, 0x0, - 0xf3, 0x80, - 0xf1, 0xc0, - 0xf0, 0xc0, - 0xf0, 0x0, - 0xf0, 0x0, - 0x0, 0x0, -}; - -const unsigned char XC_right_tee[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 8, 4, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x98, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x0, 0x0, - /* mask */ - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, -}; - -const unsigned char XC_rightbutton[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 8, 8, /* y,x of hotspot */ - /* data */ - 0xc0, 0x1, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xa2, 0x22, - 0xa2, 0xaa, - 0xa2, 0xaa, - 0xa2, 0xaa, - 0xa2, 0xaa, - 0xa2, 0x22, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xbf, 0xfe, - 0xc0, 0x1, - /* mask */ - 0xbf, 0xfe, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x3f, 0xfe, -}; - -const unsigned char XC_rtl_logo[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 9, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x7f, 0xfe, - 0x44, 0x2, - 0x44, 0x2, - 0x44, 0x2, - 0x47, 0xfe, - 0x44, 0x22, - 0x44, 0x22, - 0x44, 0x22, - 0x44, 0x22, - 0x7f, 0xe2, - 0x40, 0x22, - 0x40, 0x22, - 0x40, 0x22, - 0x7f, 0xfe, - 0x0, 0x0, - /* mask */ - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xee, 0x7, - 0xef, 0xff, - 0xef, 0xff, - 0xef, 0xff, - 0xee, 0x77, - 0xee, 0x77, - 0xff, 0xf7, - 0xff, 0xf7, - 0xff, 0xf7, - 0xe0, 0x77, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, -}; - -const unsigned char XC_sailboat[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 0, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x42, 0x0, - 0x2, 0x0, - 0x6, 0x80, - 0x6, 0x80, - 0x6, 0xc0, - 0xe, 0xc0, - 0xe, 0xe0, - 0xe, 0xe0, - 0x1e, 0xf0, - 0x1e, 0xf0, - 0x1e, 0xf8, - 0x3e, 0xf8, - 0x1c, 0x7c, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x3, 0x0, - 0x7, 0x0, - 0x7, 0x80, - 0xf, 0xc0, - 0xf, 0xc0, - 0xf, 0xe0, - 0x1f, 0xe0, - 0x1f, 0xf0, - 0x1f, 0xf0, - 0x3f, 0xf8, - 0x3f, 0xf8, - 0x3f, 0xfc, - 0xff, 0xfc, - 0xff, 0xfe, - 0x1f, 0xff, - 0x7, 0xfe, -}; - -const unsigned char XC_sb_down_arrow[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 15, 8, /* y,x of hotspot */ - /* data */ - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x7, 0xf0, - 0x3, 0xe0, - 0x1, 0xc0, - 0x0, 0x80, - 0x0, 0x0, - /* mask */ - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0xf, 0xf8, - 0xf, 0xf8, - 0x7, 0xf0, - 0x3, 0xe0, - 0x1, 0xc0, - 0x0, 0x80, -}; - -const unsigned char XC_sb_h_double_arrow[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x8, 0x8, - 0x18, 0xc, - 0x3f, 0xfe, - 0x78, 0xf, - 0x3f, 0xfe, - 0x18, 0xc, - 0x8, 0x8, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x8c, 0x18, - 0x1c, 0x1c, - 0x3f, 0xfe, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x3f, 0xfe, - 0x1c, 0x1c, - 0xc, 0x18, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, -}; - -const unsigned char XC_sb_left_arrow[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 16, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x8, - 0x0, 0xc, - 0x7f, 0xfe, - 0x0, 0xf, - 0x7f, 0xfe, - 0x0, 0xc, - 0x0, 0x8, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x30, - 0x0, 0x38, - 0xff, 0xfc, - 0xff, 0xfe, - 0xff, 0xff, - 0xff, 0xfe, - 0xff, 0xfc, - 0x0, 0x38, - 0x0, 0x30, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, -}; - -const unsigned char XC_sb_right_arrow[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 0, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x8, 0x0, - 0x18, 0x0, - 0x3f, 0xff, - 0x78, 0x0, - 0x3f, 0xff, - 0x18, 0x0, - 0x8, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0xc, 0x0, - 0x1c, 0x0, - 0x3f, 0xff, - 0x7f, 0xff, - 0xff, 0xff, - 0x7f, 0xff, - 0x3f, 0xff, - 0x1c, 0x0, - 0xc, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, -}; - -const unsigned char XC_sb_up_arrow[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 0, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x80, - 0x9, 0xc0, - 0x3, 0xe0, - 0x7, 0xf0, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x0, 0x0, - /* mask */ - 0x0, 0x80, - 0x1, 0xc0, - 0x3, 0xe0, - 0x7, 0xf0, - 0xf, 0xf8, - 0xf, 0xf8, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, -}; - -const unsigned char XC_sb_v_double_arrow[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x80, - 0x9, 0xc0, - 0x3, 0xe0, - 0x7, 0xf0, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x7, 0xf0, - 0x3, 0xe0, - 0x1, 0xc0, - 0x0, 0x80, - 0x0, 0x0, - /* mask */ - 0x1, 0xc0, - 0x3, 0xe0, - 0x7, 0xf0, - 0xf, 0xf8, - 0xf, 0xf8, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0x3, 0xe0, - 0xf, 0xf8, - 0xf, 0xf8, - 0x7, 0xf0, - 0x3, 0xe0, - 0x1, 0xc0, - 0x0, 0x0, -}; - -const unsigned char XC_shuttle[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 0, 5, /* y,x of hotspot */ - /* data */ - 0x84, 0x0, - 0xe, 0x0, - 0x1f, 0x0, - 0x7b, 0x80, - 0x7b, 0xa0, - 0x7b, 0x90, - 0x7b, 0x88, - 0x7b, 0x88, - 0x7b, 0x88, - 0x7b, 0x88, - 0x7b, 0x8c, - 0x7b, 0x8e, - 0x7b, 0xbf, - 0x11, 0x18, - 0x1e, 0x0, - 0xc, 0x0, - /* mask */ - 0x1c, 0x0, - 0x3e, 0x0, - 0x7f, 0x0, - 0xff, 0x0, - 0xff, 0x60, - 0xff, 0x70, - 0xff, 0x78, - 0xff, 0x78, - 0xff, 0x78, - 0xff, 0x78, - 0xff, 0x7c, - 0xff, 0x7e, - 0xff, 0x7f, - 0x7f, 0x7e, - 0x7e, 0x30, - 0x3c, 0x0, -}; - -const unsigned char XC_sizing[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 8, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x81, 0xfe, - 0x0, 0x2, - 0x0, 0x2, - 0x0, 0x2, - 0x7, 0xe2, - 0x4, 0x22, - 0x44, 0x22, - 0x44, 0x22, - 0x44, 0x20, - 0x47, 0xe0, - 0x48, 0x0, - 0x50, 0x0, - 0x60, 0x0, - 0x7f, 0x80, - 0x0, 0x0, - /* mask */ - 0x3, 0xff, - 0x3, 0xff, - 0x3, 0xff, - 0x0, 0x7, - 0xf, 0xf7, - 0xf, 0xf7, - 0xef, 0xf7, - 0xee, 0x77, - 0xee, 0x77, - 0xef, 0xf7, - 0xef, 0xf0, - 0xff, 0xf0, - 0xf8, 0x0, - 0xff, 0xc0, - 0xff, 0xc0, - 0xff, 0xc0, -}; - -const unsigned char XC_spider[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 10, /* y,x of hotspot */ - /* data */ - 0x8, 0x4, - 0x4, 0x8, - 0x4, 0x8, - 0x2, 0x10, - 0x2, 0x10, - 0xe1, 0xe1, - 0x19, 0xe6, - 0x7, 0xf8, - 0x7, 0xf8, - 0x19, 0xe6, - 0xe1, 0xe1, - 0x2, 0x10, - 0x2, 0x10, - 0x4, 0x8, - 0x4, 0x8, - 0x8, 0x4, - /* mask */ - 0x18, 0x6, - 0xc, 0xc, - 0x4, 0x8, - 0x6, 0x18, - 0x83, 0xf1, - 0xf3, 0xf3, - 0x3b, 0xf6, - 0xf, 0xfc, - 0x7, 0xfc, - 0x1f, 0xf6, - 0xf3, 0xf3, - 0x83, 0xf1, - 0x2, 0x18, - 0x6, 0x18, - 0xc, 0xc, - 0x18, 0x6, -}; - -const unsigned char XC_spraycan[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 2, 4, /* y,x of hotspot */ - /* data */ - 0x98, 0x0, - 0x2, 0x0, - 0x18, 0xb0, - 0x2, 0x78, - 0x18, 0x58, - 0x0, 0xfc, - 0x0, 0x84, - 0x0, 0x9c, - 0x0, 0x94, - 0x0, 0x9c, - 0x0, 0x94, - 0x0, 0x9c, - 0x0, 0x9c, - 0x0, 0x84, - 0x0, 0x84, - 0x0, 0xfc, - /* mask */ - 0x30, 0x0, - 0x34, 0x60, - 0x35, 0xf0, - 0x35, 0xf0, - 0x35, 0xf8, - 0x3, 0xfc, - 0x3, 0xfc, - 0x3, 0xfc, - 0x3, 0xfc, - 0x3, 0xfc, - 0x3, 0xfc, - 0x3, 0xfc, - 0x3, 0xfc, - 0x3, 0xfc, - 0x3, 0xfc, - 0x3, 0xfc, -}; - -const unsigned char XC_star[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 8, /* y,x of hotspot */ - /* data */ - 0x80, 0x80, - 0x1, 0x40, - 0x1, 0x40, - 0x1, 0x40, - 0x2, 0x20, - 0x2, 0x20, - 0x2, 0x20, - 0x1c, 0x9c, - 0x60, 0x3, - 0x1c, 0x1c, - 0x4, 0x90, - 0x9, 0x48, - 0x12, 0x24, - 0x14, 0x14, - 0x18, 0xc, - 0x10, 0x4, - /* mask */ - 0x0, 0x80, - 0x1, 0xc0, - 0x1, 0xc0, - 0x3, 0x60, - 0x3, 0x60, - 0x6, 0x30, - 0x1e, 0x38, - 0x7c, 0x9f, - 0xe0, 0x3, - 0x7c, 0x1f, - 0x1c, 0x9c, - 0x19, 0xcc, - 0x33, 0x66, - 0x36, 0x36, - 0x3c, 0x1e, - 0x38, 0xe, -}; - -const unsigned char XC_target[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x81, 0xc0, - 0x7, 0xf0, - 0xe, 0x38, - 0x18, 0xc, - 0x30, 0x6, - 0x60, 0x83, - 0x61, 0x43, - 0x60, 0x83, - 0x30, 0x6, - 0x18, 0xc, - 0xe, 0x38, - 0x7, 0xf0, - 0x1, 0xc0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x3, 0xe0, - 0x7, 0xf0, - 0xf, 0xf8, - 0x1e, 0x3c, - 0x38, 0xe, - 0x70, 0x87, - 0xe1, 0xc3, - 0xe3, 0x63, - 0xe1, 0xc3, - 0x70, 0x87, - 0x38, 0xe, - 0x1e, 0x3c, - 0xf, 0xf8, - 0x3, 0xe0, - 0x0, 0x0, -}; - -const unsigned char XC_tcross[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 7, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0xc0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x3f, 0xfe, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x0, 0x0, -}; - -const unsigned char XC_top_left_arrow[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 1, 15, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x80, 0x6, - 0x0, 0x1e, - 0x0, 0x7c, - 0x1, 0xfc, - 0x7, 0xf8, - 0x1f, 0xf8, - 0x1, 0xf0, - 0x1, 0xf0, - 0x2, 0x60, - 0x4, 0x60, - 0x8, 0x40, - 0x10, 0x40, - 0x20, 0x0, - 0x40, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x7, - 0x0, 0x1f, - 0x0, 0x7f, - 0x1, 0xfe, - 0x7, 0xfe, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xf8, - 0x3, 0xf8, - 0x7, 0xf0, - 0xe, 0xf0, - 0x1c, 0xe0, - 0x38, 0xe0, - 0x70, 0xe0, - 0xe0, 0x0, - 0xc0, 0x0, -}; - -const unsigned char XC_top_left_corner[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 1, 15, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0xff, 0xfe, - 0x7f, 0xfe, - 0x0, 0x6, - 0x0, 0x6, - 0x0, 0x6, - 0x1f, 0xc6, - 0x0, 0xc6, - 0x1, 0x46, - 0x2, 0x46, - 0x4, 0x46, - 0x8, 0x46, - 0x10, 0x46, - 0x0, 0x6, - 0x0, 0x6, - 0x0, 0x0, - /* mask */ - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0x0, 0xf, - 0x3f, 0xef, - 0x3f, 0xef, - 0x3f, 0xef, - 0x3, 0xef, - 0x7, 0xef, - 0xe, 0xef, - 0x1c, 0xef, - 0x38, 0xef, - 0x30, 0xef, - 0x0, 0xf, - 0x0, 0xf, -}; - -const unsigned char XC_top_right_corner[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 1, 2, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0xff, 0xfe, - 0x7f, 0xfe, - 0x60, 0x0, - 0x60, 0x0, - 0x60, 0x0, - 0x63, 0xf8, - 0x63, 0x0, - 0x62, 0x80, - 0x62, 0x40, - 0x62, 0x20, - 0x62, 0x10, - 0x62, 0x8, - 0x60, 0x0, - 0x60, 0x0, - 0x0, 0x0, - /* mask */ - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xf0, 0x0, - 0xf7, 0xfc, - 0xf7, 0xfc, - 0xf7, 0xfc, - 0xf7, 0xc0, - 0xf7, 0xe0, - 0xf7, 0x70, - 0xf7, 0x38, - 0xf7, 0x1c, - 0xf7, 0xc, - 0xf0, 0x0, - 0xf0, 0x0, -}; - -const unsigned char XC_top_side[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 1, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0xff, 0xfe, - 0x3f, 0xfe, - 0x0, 0x0, - 0x0, 0x80, - 0x1, 0xc0, - 0x2, 0xa0, - 0x4, 0x90, - 0x8, 0x88, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x0, - /* mask */ - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x7f, 0xff, - 0x1, 0xc0, - 0x3, 0xe0, - 0x7, 0xf0, - 0xf, 0xf8, - 0x1d, 0xdc, - 0x19, 0xcc, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, -}; - -const unsigned char XC_top_tee[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 3, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0xff, 0xfe, - 0x7f, 0xfe, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x1, 0x80, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x0, 0x0, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x3, 0xc0, - 0x0, 0x0, - 0x0, 0x0, -}; - -const unsigned char XC_trek[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 0, 8, /* y,x of hotspot */ - /* data */ - 0x8, 0x80, - 0x8, 0x0, - 0x1, 0xc0, - 0x3, 0xe0, - 0x7, 0xf0, - 0x7, 0x70, - 0x7, 0xf0, - 0x3, 0xe0, - 0x1, 0xc0, - 0x0, 0x80, - 0x5, 0xd0, - 0x6, 0xb0, - 0x4, 0x90, - 0x4, 0x10, - 0x4, 0x10, - 0x4, 0x10, - /* mask */ - 0x1, 0xc0, - 0x1, 0xc0, - 0x3, 0xe0, - 0x7, 0xf0, - 0xf, 0xf8, - 0xf, 0xf8, - 0xf, 0xf8, - 0x7, 0xf0, - 0x3, 0xe0, - 0x5, 0xd0, - 0xf, 0xf8, - 0xf, 0xf8, - 0xf, 0xf8, - 0xe, 0xb8, - 0xe, 0xb8, - 0xe, 0x38, -}; - -const unsigned char XC_ul_angle[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 3, 13, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x18, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x0, 0x0, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x3c, - 0x0, 0x0, - 0x0, 0x0, -}; - -const unsigned char XC_umbrella[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 3, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x89, 0x10, - 0x14, 0x40, - 0x65, 0x92, - 0x13, 0xe4, - 0xc, 0x98, - 0x30, 0x86, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x2, 0x80, - 0x2, 0x80, - 0x1, 0x0, - 0x0, 0x0, - /* mask */ - 0x76, 0xe8, - 0xdf, 0xfb, - 0x3f, 0xfd, - 0xff, 0xfe, - 0x3f, 0xff, - 0xff, 0xff, - 0x79, 0xcf, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x7, 0xc0, - 0x7, 0xc0, - 0x7, 0xc0, - 0x7, 0xc0, - 0x3, 0x80, -}; - -const unsigned char XC_ur_angle[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 3, 4, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x1f, 0xf8, - 0x1f, 0xf8, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x18, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - /* mask */ - 0x0, 0x0, - 0x0, 0x0, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3f, 0xfc, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x3c, 0x0, - 0x0, 0x0, - 0x0, 0x0, -}; - -const unsigned char XC_watch[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 9, 1, /* y,x of hotspot */ - /* data */ - 0x7, 0xf8, - 0x7, 0xf8, - 0x7, 0xf8, - 0xf, 0xfc, - 0x18, 0x86, - 0x30, 0x83, - 0xe0, 0x81, - 0xe1, 0xc1, - 0xe1, 0xc1, - 0xe0, 0x21, - 0x30, 0x13, - 0x18, 0x6, - 0xf, 0xfc, - 0x7, 0xf8, - 0x7, 0xf8, - 0x7, 0xf8, - /* mask */ - 0xf, 0xfc, - 0xf, 0xfc, - 0xf, 0xfc, - 0x1f, 0xfe, - 0x3f, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0xff, 0xff, - 0x3f, 0xff, - 0x1f, 0xfe, - 0xf, 0xfc, - 0xf, 0xfc, - 0xf, 0xfc, -}; - -const unsigned char XC_xterm[] = { - 16, /* 16x16 size */ - 1, /* 1 bit depth */ - 8, 8, /* y,x of hotspot */ - /* data */ - 0x0, 0x0, - 0xf, 0x70, - 0x9, 0xc0, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x0, 0x80, - 0x1, 0xc0, - 0x7, 0x70, - 0x0, 0x0, - /* mask */ - 0xf, 0x78, - 0xf, 0xf8, - 0xf, 0xf8, - 0x3, 0xe0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x1, 0xc0, - 0x3, 0xe0, - 0xf, 0xf8, - 0xf, 0xf8, - 0xf, 0x78, -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutDstr.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutDstr.cpp deleted file mode 100644 index 281a039701..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutDstr.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/*********************************************************** - * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby. - * - * This program is freely distributable without licensing fees - * and is provided without guarantee or warrantee expressed or - * implied. This program is -not- in the public domain. - * - * - * FILE: glutDstr.cpp - * - * DESCRIPTION: convert display string into a Be options variable - ***********************************************************/ - -/*********************************************************** - * Headers - ***********************************************************/ -#include -#include -#include -#include "glutint.h" -#include "glutState.h" - -/*********************************************************** - * FUNCTION: glutInitDisplayString - * - * DESCRIPTION: sets the display string variable - ***********************************************************/ -void APIENTRY -glutInitDisplayString(const char *string) -{ - if (gState.displayString) { - free(gState.displayString); - } - if (string) { - gState.displayString = strdup(string); - if (!gState.displayString) - __glutFatalError("out of memory."); - } else - gState.displayString = NULL; -} - -/*********************************************************** - * FUNCTION: __glutConvertDisplayModeFromString - * - * DESCRIPTION: converts the current display mode into a BGLView - * display mode, printing warnings as appropriate. - * - * PARAMETERS: if options is non-NULL, the current display mode is - * returned in it. - * - * RETURNS: 1 if the current display mode is possible, else 0 - ***********************************************************/ -int __glutConvertDisplayModeFromString(unsigned long *options) { - ulong newoptions = 0; - - char *word = strtok(gState.displayString, " \t"); - do { - char *cstr = strpbrk(word, "=> -#include "glutint.h" -#include "glutState.h" -#include "glutBlocker.h" - -/*********************************************************** - * CLASS: GLUTtimer - * - * DESCRIPTION: list of timer callbacks - ***********************************************************/ -struct GLUTtimer { - GLUTtimer *next; // list of timers - bigtime_t timeout; // time to be called - GLUTtimerCB func; // function to call - int value; // value -}; - -/*********************************************************** - * Private variables - ***********************************************************/ -static GLUTtimer *__glutTimerList = 0; // list of timer callbacks -static GLUTtimer *freeTimerList = 0; - -/*********************************************************** - * FUNCTION: glutTimerFunc (7.19) - * - * DESCRIPTION: register a new timer callback - ***********************************************************/ -void APIENTRY -glutTimerFunc(unsigned int interval, GLUTtimerCB timerFunc, int value) -{ - GLUTtimer *timer, *other; - GLUTtimer **prevptr; - - if (!timerFunc) - return; - - if (freeTimerList) { - timer = freeTimerList; - freeTimerList = timer->next; - } else { - timer = new GLUTtimer(); - if (!timer) - __glutFatalError("out of memory."); - } - - timer->func = timerFunc; - timer->value = value; - timer->next = NULL; - timer->timeout = system_time() + (interval*1000); // 1000 ticks in a millisecond - prevptr = &__glutTimerList; - other = *prevptr; - while (other && (other->timeout < timer->timeout)) { - prevptr = &other->next; - other = *prevptr; - } - timer->next = other; - *prevptr = timer; -} - -/*********************************************************** - * FUNCTION: handleTimeouts - * - * DESCRIPTION: private function to handle outstanding timeouts - ***********************************************************/ -static void -handleTimeouts(void) -{ - bigtime_t now; - GLUTtimer *timer; - - /* Assumption is that __glutTimerList is already determined - to be non-NULL. */ - now = system_time(); - while (__glutTimerList->timeout <= now) { - timer = __glutTimerList; - if(gState.currentWindow) - gState.currentWindow->LockGL(); - timer->func(timer->value); - if(gState.currentWindow) - gState.currentWindow->UnlockGL(); - __glutTimerList = timer->next; - timer->next = freeTimerList; - freeTimerList = timer; - if (!__glutTimerList) - break; - } -} - - -/*********************************************************** - * FUNCTION: processEventsAndTimeouts - * - * DESCRIPTION: clear gBlock, then check all windows for events - ***********************************************************/ -static void -processEventsAndTimeouts(void) -{ - gBlock.WaitEvent(); // if there is already an event, returns - // immediately, otherwise wait forever - gBlock.ClearEvents(); - - if(gState.quitAll) - exit(0); // exit handler cleans up windows and quits nicely - - if (gState.currentWindow) - gState.currentWindow->LockGL(); - for(int i=0; ianyevents) { - win->anyevents = false; - if (win->reshapeEvent) { - win->reshapeEvent = false; - __glutSetWindow(win); - win->reshape(win->m_width, win->m_height); - } - if (!gState.windowList[i]) - continue; // window was destroyed by callback! - - if (win->displayEvent) { - win->displayEvent = false; - __glutSetWindow(win); - win->display(); - } - if (!gState.windowList[i]) - continue; // window was destroyed by callback! - - if (win->mouseEvent) { - win->mouseEvent = false; - __glutSetWindow(win); - if (win->mouse) { - gState.modifierKeys = win->modifierKeys; - win->mouse(win->button, win->mouseState, win->mouseX, win->mouseY); - gState.modifierKeys = ~0; - } - } - if (!gState.windowList[i]) - continue; // window was destroyed by callback! - - if (win->menuEvent) { - win->menuEvent = false; - __glutSetWindow(win); - GlutMenu *menu = __glutGetMenuByNum(win->menuNumber); - if (menu) { - gState.currentMenu = menu; - menu->select(win->menuValue); - } - } - if (!gState.windowList[i]) - continue; // window was destroyed by callback! - - if (win->statusEvent) { - win->statusEvent = false; - __glutSetWindow(win); - if (gState.menuStatus) { - gState.currentMenu = __glutGetMenuByNum(win->menuNumber); - gState.menuStatus(win->menuStatus, win->statusX, win->statusY); - } - } - if (!gState.windowList[i]) - continue; // window was destroyed by callback! - - if (win->motionEvent) { - win->motionEvent = false; - __glutSetWindow(win); - if (win->motion) - win->motion(win->motionX, win->motionY); - } - if (!gState.windowList[i]) - continue; // window was destroyed by callback! - - if (win->passiveEvent) { - win->passiveEvent = false; - __glutSetWindow(win); - if (win->passive) - win->passive(win->passiveX, win->passiveY); - } - if (!gState.windowList[i]) - continue; // window was destroyed by callback! - - if (win->keybEvent) { - win->keybEvent = false; - __glutSetWindow(win); - if (win->keyboard) { - gState.modifierKeys = win->modifierKeys; - win->keyboard(win->key, win->keyX, win->keyY); - gState.modifierKeys = ~0; - } - } - if (!gState.windowList[i]) - continue; // window was destroyed by callback! - - if (win->specialEvent) { - win->specialEvent = false; - __glutSetWindow(win); - if (win->special) { - gState.modifierKeys = win->modifierKeys; - win->special(win->specialKey, win->specialX, win->specialY); - gState.modifierKeys = ~0; - } - } - if (!gState.windowList[i]) - continue; // window was destroyed by callback! - - if (win->entryEvent) { - win->entryEvent = false; - __glutSetWindow(win); - if (win->entry) - win->entry(win->entryState); - } - if (!gState.windowList[i]) - continue; // window was destroyed by callback! - - if (win->windowStatusEvent) { - win->windowStatusEvent = false; - __glutSetWindow(win); - if (win->windowStatus) - win->windowStatus(win->visState); - } - if (!gState.windowList[i]) - continue; // window was destroyed by callback! - } - } - } - if (gState.currentWindow) - gState.currentWindow->UnlockGL(); - - // This code isn't necessary since BGLView automatically traps errors -#if 0 - if(gState.debug) { - for(int i=0; iLockGL(); - glutReportErrors(); - gState.windowList[i]->UnlockGL(); - } - } - } -#endif - if (__glutTimerList) { - handleTimeouts(); - } -} - -/*********************************************************** - * FUNCTION: waitForSomething - * - * DESCRIPTION: use gBlock to wait for a new event or timeout - ***********************************************************/ -static void -waitForSomething(void) -{ - bigtime_t timeout = __glutTimerList->timeout; - bigtime_t now = system_time(); - - if (gBlock.PendingEvent()) - goto immediatelyHandleEvent; - - if(timeout>now) - gBlock.WaitEvent(timeout-now); - if (gBlock.PendingEvent()) { - immediatelyHandleEvent: - processEventsAndTimeouts(); - } else { - if (__glutTimerList) - handleTimeouts(); - } -} - -/*********************************************************** - * FUNCTION: idleWait - * - * DESCRIPTION: check for events, then call idle function - ***********************************************************/ -static void -idleWait(void) -{ - if (gBlock.PendingEvent()) { - processEventsAndTimeouts(); - } else { - if (__glutTimerList) - handleTimeouts(); - } - /* Make sure idle func still exists! */ - if(gState.currentWindow) - gState.currentWindow->LockGL(); - if (gState.idle) { - gState.idle(); - } - if(gState.currentWindow) - gState.currentWindow->UnlockGL(); -} - -/*********************************************************** - * FUNCTION: glutMainLoop (3.1) - * - * DESCRIPTION: enter the event processing loop - ***********************************************************/ -void glutMainLoop() -{ - if (!gState.windowListSize) - __glutFatalUsage("main loop entered with no windows created."); - - if(gState.currentWindow) - gState.currentWindow->UnlockGL(); - - for (;;) { - if (gState.idle) { - idleWait(); - } else { - if (__glutTimerList) { - waitForSomething(); - } else { - processEventsAndTimeouts(); - } - } - } -} - -/*********************************************************** - * CLASS: GlutWindow - * - * FUNCTION: KeyDown - * - * DESCRIPTION: handles keyboard and special events - ***********************************************************/ -void GlutWindow::KeyDown(const char *s, int32 slen) -{ - ulong aChar = s[0]; - BGLView::KeyDown(s,slen); - - BPoint p; - - switch (aChar) { - case B_FUNCTION_KEY: - switch(Window()->CurrentMessage()->FindInt32("key")) { - case B_F1_KEY: - aChar = GLUT_KEY_F1; - goto specialLabel; - case B_F2_KEY: - aChar = GLUT_KEY_F2; - goto specialLabel; - case B_F3_KEY: - aChar = GLUT_KEY_F3; - goto specialLabel; - case B_F4_KEY: - aChar = GLUT_KEY_F4; - goto specialLabel; - case B_F5_KEY: - aChar = GLUT_KEY_F5; - goto specialLabel; - case B_F6_KEY: - aChar = GLUT_KEY_F6; - goto specialLabel; - case B_F7_KEY: - aChar = GLUT_KEY_F7; - goto specialLabel; - case B_F8_KEY: - aChar = GLUT_KEY_F8; - goto specialLabel; - case B_F9_KEY: - aChar = GLUT_KEY_F9; - goto specialLabel; - case B_F10_KEY: - aChar = GLUT_KEY_F10; - goto specialLabel; - case B_F11_KEY: - aChar = GLUT_KEY_F11; - goto specialLabel; - case B_F12_KEY: - aChar = GLUT_KEY_F12; - goto specialLabel; - default: - return; - } - case B_LEFT_ARROW: - aChar = GLUT_KEY_LEFT; - goto specialLabel; - case B_UP_ARROW: - aChar = GLUT_KEY_UP; - goto specialLabel; - case B_RIGHT_ARROW: - aChar = GLUT_KEY_RIGHT; - goto specialLabel; - case B_DOWN_ARROW: - aChar = GLUT_KEY_DOWN; - goto specialLabel; - case B_PAGE_UP: - aChar = GLUT_KEY_PAGE_UP; - goto specialLabel; - case B_PAGE_DOWN: - aChar = GLUT_KEY_PAGE_DOWN; - goto specialLabel; - case B_HOME: - aChar = GLUT_KEY_HOME; - goto specialLabel; - case B_END: - aChar = GLUT_KEY_END; - goto specialLabel; - case B_INSERT: - aChar = GLUT_KEY_INSERT; -specialLabel: - if (special) { - anyevents = specialEvent = true; - GetMouse(&p,&m_buttons); - specialKey = aChar; - specialX = (int)p.x; - specialY = (int)p.y; - goto setModifiers; // set the modifier variable - } - return; - - default: - break; - } - - if (keyboard) { - anyevents = keybEvent = true; - GetMouse(&p,&m_buttons); - key = aChar; - keyX = (int)p.x; - keyY = (int)p.y; -setModifiers: - modifierKeys = 0; - uint32 beMod = Window()->CurrentMessage()->FindInt32("modifiers"); - if(beMod & B_SHIFT_KEY) - modifierKeys |= GLUT_ACTIVE_SHIFT; - if(beMod & B_CONTROL_KEY) - modifierKeys |= GLUT_ACTIVE_CTRL; - if(beMod & B_OPTION_KEY) { - // since the window traps B_COMMAND_KEY, we'll have to settle - // for the option key.. but we need to get the raw character, - // not the Unicode-enhanced version - key = Window()->CurrentMessage()->FindInt32("raw_char"); - modifierKeys |= GLUT_ACTIVE_ALT; - } - gBlock.NewEvent(); - } -} - -/*********************************************************** - * CLASS: GlutWindow - * - * FUNCTION: MouseDown - * - * DESCRIPTION: handles mouse and menustatus events - ***********************************************************/ -void GlutWindow::MouseDown(BPoint point) -{ - BGLView::MouseDown(point); - MouseCheck(); -} - -/*********************************************************** - * CLASS: GlutWindow - * - * FUNCTION: MouseCheck - * - * DESCRIPTION: checks for button state changes - ***********************************************************/ -void GlutWindow::MouseCheck() -{ - if (mouseEvent) - return; // we already have an outstanding mouse event - - BPoint point; - uint32 newButtons; - GetMouse(&point, &newButtons); - if (m_buttons != newButtons) { - if (newButtons&B_PRIMARY_MOUSE_BUTTON && !(m_buttons&B_PRIMARY_MOUSE_BUTTON)) { - button = GLUT_LEFT_BUTTON; - mouseState = GLUT_DOWN; - } else if (m_buttons&B_PRIMARY_MOUSE_BUTTON && !(newButtons&B_PRIMARY_MOUSE_BUTTON)) { - button = GLUT_LEFT_BUTTON; - mouseState = GLUT_UP; - } else if (newButtons&B_SECONDARY_MOUSE_BUTTON && !(m_buttons&B_SECONDARY_MOUSE_BUTTON)) { - button = GLUT_RIGHT_BUTTON; - mouseState = GLUT_DOWN; - } else if (m_buttons&B_SECONDARY_MOUSE_BUTTON && !(newButtons&B_SECONDARY_MOUSE_BUTTON)) { - button = GLUT_RIGHT_BUTTON; - mouseState = GLUT_UP; - } else if (newButtons&B_TERTIARY_MOUSE_BUTTON && !(m_buttons&B_TERTIARY_MOUSE_BUTTON)) { - button = GLUT_MIDDLE_BUTTON; - mouseState = GLUT_DOWN; - } else if (m_buttons&B_TERTIARY_MOUSE_BUTTON && !(newButtons&B_TERTIARY_MOUSE_BUTTON)) { - button = GLUT_MIDDLE_BUTTON; - mouseState = GLUT_UP; - } - } else { - return; // no change, return - } - m_buttons = newButtons; - - if (mouseState == GLUT_DOWN) { - BWindow *w = Window(); - GlutMenu *m = __glutGetMenuByNum(menu[button]); - if (m) { - if (gState.menuStatus) { - anyevents = statusEvent = true; - menuNumber = menu[button]; - menuStatus = GLUT_MENU_IN_USE; - statusX = (int)point.x; - statusY = (int)point.y; - gBlock.NewEvent(); - } - BRect bounds = w->Frame(); - point.x += bounds.left; - point.y += bounds.top; - GlutPopUp *bmenu = static_cast(m->CreateBMenu()); // start menu - bmenu->point = point; - bmenu->win = this; - thread_id menu_thread = spawn_thread(MenuThread, "menu thread", B_NORMAL_PRIORITY, bmenu); - resume_thread(menu_thread); - return; - } - } - - if (mouse) { - anyevents = mouseEvent = true; - mouseX = (int)point.x; - mouseY = (int)point.y; - modifierKeys = 0; - uint32 beMod = modifiers(); - if(beMod & B_SHIFT_KEY) - modifierKeys |= GLUT_ACTIVE_SHIFT; - if(beMod & B_CONTROL_KEY) - modifierKeys |= GLUT_ACTIVE_CTRL; - if(beMod & B_OPTION_KEY) { - modifierKeys |= GLUT_ACTIVE_ALT; - } - gBlock.NewEvent(); - } -} - -/*********************************************************** - * CLASS: GlutWindow - * - * FUNCTION: MouseMoved - * - * DESCRIPTION: handles entry, motion, and passive events - ***********************************************************/ -void GlutWindow::MouseMoved(BPoint point, - ulong transit, const BMessage *msg) -{ - BGLView::MouseMoved(point,transit,msg); - - if(transit != B_INSIDE_VIEW) { - if (entry) { - anyevents = entryEvent = true; - gBlock.NewEvent(); - } - if (transit == B_ENTERED_VIEW) { - entryState = GLUT_ENTERED; - MakeFocus(); // make me the current focus - __glutSetCursor(cursor); - } else - entryState = GLUT_LEFT; - } - - MouseCheck(); - if(m_buttons) { - if(motion) { - anyevents = motionEvent = true; - motionX = (int)point.x; - motionY = (int)point.y; - gBlock.NewEvent(); - } - } else { - if(passive) { - anyevents = passiveEvent = true; - passiveX = (int)point.x; - passiveY = (int)point.y; - gBlock.NewEvent(); - } - } -} - -/*********************************************************** - * CLASS: GlutWindow - * - * FUNCTION: FrameResized - * - * DESCRIPTION: handles reshape event - ***********************************************************/ -void GlutWindow::FrameResized(float width, float height) -{ - BGLView::FrameResized(width, height); - if (visible) { - anyevents = reshapeEvent = true; - m_width = (int)(width)+1; - m_height = (int)(height)+1; - gBlock.NewEvent(); - } -} - -/*********************************************************** - * CLASS: GlutWindow - * - * FUNCTION: Draw - * - * DESCRIPTION: handles reshape and display events - ***********************************************************/ -void GlutWindow::Draw(BRect updateRect) -{ - BGLView::Draw(updateRect); - BRect frame = Frame(); - if (m_width != (frame.Width()+1) || m_height != (frame.Height()+1)) { - FrameResized(frame.Width(), frame.Height()); - } - Window()->Lock(); - if (visible) { - anyevents = displayEvent = true; - gBlock.NewEvent(); - } - Window()->Unlock(); -} - -/*********************************************************** - * CLASS: GlutWindow - * - * FUNCTION: Pulse - * - * DESCRIPTION: handles mouse up event (MouseUp is broken) - ***********************************************************/ -void GlutWindow::Pulse() -{ - BGLView::Pulse(); - if (m_buttons) { // if there are buttons pressed - MouseCheck(); - } -} - -/*********************************************************** - * CLASS: GlutWindow - * - * FUNCTION: ErrorCallback - * - * DESCRIPTION: handles GL error messages - ***********************************************************/ -void GlutWindow::ErrorCallback(GLenum errorCode) { - __glutWarning("GL error: %s", gluErrorString(errorCode)); -} - -/*********************************************************** - * CLASS: GlutWindow - * - * FUNCTION: MenuThread - * - * DESCRIPTION: a new thread to launch popup menu, wait - * wait for response, then clean up afterwards and - * send appropriate messages - ***********************************************************/ -long GlutWindow::MenuThread(void *m) { - GlutPopUp *bmenu = static_cast(m); - GlutWindow *win = bmenu->win; // my window - GlutBMenuItem *result = (GlutBMenuItem*)bmenu->Go(bmenu->point); - win->Window()->Lock(); - win->anyevents = win->statusEvent = true; - win->menuStatus = GLUT_MENU_NOT_IN_USE; - win->menuNumber = bmenu->menu; - BPoint cursor; - uint32 buttons; - win->GetMouse(&cursor, &buttons); - win->statusX = (int)cursor.x; - win->statusY = (int)cursor.y; - if(result && result->menu) { - win->menuEvent = true; - win->menuNumber = result->menu; // in case it was a submenu - win->menuValue = result->value; - } - win->Window()->Unlock(); - gBlock.NewEvent(); - delete bmenu; - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutGet.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutGet.cpp deleted file mode 100644 index 04a8479b98..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutGet.cpp +++ /dev/null @@ -1,211 +0,0 @@ -/*********************************************************** - * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby. - * - * This program is freely distributable without licensing fees - * and is provided without guarantee or warrantee expressed or - * implied. This program is -not- in the public domain. - * - * - * FILE: glutGet.cpp - * - * DESCRIPTION: get state information from GL - ***********************************************************/ - -/*********************************************************** - * Headers - ***********************************************************/ -#include -#include -#include -#include - -#include "glutint.h" -#include "glutState.h" - -/*********************************************************** - * Global variables - ***********************************************************/ -// rough guess, since we don't know how big the monitor really is -const float dots_per_mm = (72/25.4); // dots per millimeter - -/*********************************************************** - * FUNCTION: glutGet (9.1) - * - * DESCRIPTION: retrieve window and GL state - ***********************************************************/ -int glutGet(GLenum state) { - switch(state) { - case GLUT_WINDOW_X: - {BAutolock winlock(gState.currentWindow->Window()); // need to lock the window - if (gState.currentWindow->parent) - return (int)gState.currentWindow->Frame().left; - else - return (int)gState.currentWindow->Window()->Frame().left; - } - case GLUT_WINDOW_Y: - {BAutolock winlock(gState.currentWindow->Window()); - if (gState.currentWindow->parent) - return (int)gState.currentWindow->Frame().top; - else - return (int)gState.currentWindow->Window()->Frame().top; - } - case GLUT_WINDOW_WIDTH: - {BAutolock winlock(gState.currentWindow->Window()); - return gState.currentWindow->m_width; - } - case GLUT_WINDOW_HEIGHT: - {BAutolock winlock(gState.currentWindow->Window()); - return gState.currentWindow->m_height; - } - case GLUT_WINDOW_PARENT: - {BAutolock winlock(gState.currentWindow->Window()); - if(gState.currentWindow->parent) - return gState.currentWindow->parent->num + 1; - else - return 0; - } - case GLUT_WINDOW_NUM_CHILDREN: - {BAutolock winlock(gState.currentWindow->Window()); - int num = 0; - GlutWindow *children = gState.currentWindow->children; - while (children) { - num++; - children = children->siblings; - } - return num; - } - case GLUT_WINDOW_BUFFER_SIZE: // best guesses - case GLUT_WINDOW_DEPTH_SIZE: - return 32; - - case GLUT_WINDOW_STENCIL_SIZE: - case GLUT_WINDOW_RED_SIZE: // always 24-bit color - case GLUT_WINDOW_GREEN_SIZE: - case GLUT_WINDOW_BLUE_SIZE: - case GLUT_WINDOW_ALPHA_SIZE: - case GLUT_WINDOW_ACCUM_RED_SIZE: - case GLUT_WINDOW_ACCUM_GREEN_SIZE: - case GLUT_WINDOW_ACCUM_BLUE_SIZE: - case GLUT_WINDOW_ACCUM_ALPHA_SIZE: - return 8; - - case GLUT_WINDOW_DOUBLEBUFFER: // always double-buffered RGBA - case GLUT_WINDOW_RGBA: - return 1; - - case GLUT_WINDOW_COLORMAP_SIZE: // don't support these - case GLUT_WINDOW_NUM_SAMPLES: - case GLUT_WINDOW_STEREO: - return 0; - - case GLUT_WINDOW_CURSOR: - return gState.currentWindow->cursor; // don't need to lock window since it won't change - - case GLUT_SCREEN_WIDTH: - return (int)(BScreen().Frame().Width()) + 1; - case GLUT_SCREEN_HEIGHT: - return (int)(BScreen().Frame().Height()) + 1; - case GLUT_SCREEN_WIDTH_MM: - return (int)((BScreen().Frame().Width() + 1) / dots_per_mm); - case GLUT_SCREEN_HEIGHT_MM: - return (int)((BScreen().Frame().Height() + 1) / dots_per_mm); - case GLUT_MENU_NUM_ITEMS: - return gState.currentMenu->num; - case GLUT_DISPLAY_MODE_POSSIBLE: - return __glutConvertDisplayMode(0); // returns 1 if possible - case GLUT_INIT_DISPLAY_MODE: - return gState.displayMode; - case GLUT_INIT_WINDOW_X: - return gState.initX; - case GLUT_INIT_WINDOW_Y: - return gState.initY; - case GLUT_INIT_WINDOW_WIDTH: - return gState.initWidth; - case GLUT_INIT_WINDOW_HEIGHT: - return gState.initHeight; - case GLUT_ELAPSED_TIME: - bigtime_t elapsed, beginning, now; - __glutInitTime(&beginning); - now = system_time(); - elapsed = now - beginning; - return (int) (elapsed / 1000); // 1000 ticks in a millisecond - default: - __glutWarning("invalid glutGet parameter: %d", state); - return -1; - } -} - -/*********************************************************** - * FUNCTION: glutLayerGet (9.2) - * - * DESCRIPTION: since we don't support layers, this is easy - ***********************************************************/ -int glutLayerGet(GLenum info) { - switch(info) { - case GLUT_OVERLAY_POSSIBLE: - case GLUT_HAS_OVERLAY: - return 0; - case GLUT_LAYER_IN_USE: - return GLUT_NORMAL; - case GLUT_TRANSPARENT_INDEX: - return -1; - case GLUT_NORMAL_DAMAGED: - return gState.currentWindow->displayEvent; - case GLUT_OVERLAY_DAMAGED: - return -1; - default: - __glutWarning("invalid glutLayerGet param: %d", info); - return -1; - } -} - -/*********************************************************** - * FUNCTION: glutDeviceGet (9.3) - * - * DESCRIPTION: get info about I/O devices we support - * easy, since BeOS only supports a keyboard and mouse now - ***********************************************************/ -int glutDeviceGet(GLenum info) { - switch(info) { - case GLUT_HAS_KEYBOARD: - case GLUT_HAS_MOUSE: - return 1; - - case GLUT_HAS_SPACEBALL: - case GLUT_HAS_DIAL_AND_BUTTON_BOX: - case GLUT_HAS_TABLET: - case GLUT_NUM_SPACEBALL_BUTTONS: - case GLUT_NUM_BUTTON_BOX_BUTTONS: - case GLUT_NUM_DIALS: - case GLUT_NUM_TABLET_BUTTONS: - return 0; - - case GLUT_NUM_MOUSE_BUTTONS: - { - int32 mouseButtons = 3; // good guess - if(get_mouse_type(&mouseButtons) != B_OK) { - __glutWarning("error getting number of mouse buttons"); - } - return mouseButtons; - } - - default: - __glutWarning("invalid glutDeviceGet parameter: %d", info); - return -1; - } -} - -/*********************************************************** - * FUNCTION: glutGetModifiers (9.4) - * - * DESCRIPTION: get the modifier key state for the current window - ***********************************************************/ -int glutGetModifiers() { - if(gState.modifierKeys == (int) ~0) { - __glutWarning( - "glutCurrentModifiers: do not call outside core input callback."); - return 0; - } - return gState.modifierKeys; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutInit.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutInit.cpp deleted file mode 100644 index 401081328f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutInit.cpp +++ /dev/null @@ -1,263 +0,0 @@ -/*********************************************************** - * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby. - * - * This program is freely distributable without licensing fees - * and is provided without guarantee or warrantee expressed or - * implied. This program is -not- in the public domain. - * - * - * FILE: glutInit.cpp - * - * DESCRIPTION: initialize GLUT state - ***********************************************************/ - -/*********************************************************** - * Headers - ***********************************************************/ -#include -#include -#include -#include -#include "glutint.h" -#include "glutState.h" -#include "glutBlocker.h" -#include "beos_x11.h" - -/*********************************************************** - * Global variables - ***********************************************************/ -GlutState gState; -char *__glutProgramName = NULL; - -/*********************************************************** - * Private variables - ***********************************************************/ -static int __glutArgc; -static char **__glutArgv; - -/*********************************************************** - * FUNCTION: __glutInitTime - * - * DESCRIPTION: set up start time variable - ***********************************************************/ -void __glutInitTime(bigtime_t *beginning) -{ - static int beenhere = 0; - static bigtime_t genesis; - - if (!beenhere) { - genesis = system_time(); - beenhere = 1; - } - *beginning = genesis; -} - -/*********************************************************** - * FUNCTION: removeArgs - * - * DESCRIPTION: helper function for glutInit to remove args - * from argv variable passed in - ***********************************************************/ -static void -removeArgs(int *argcp, char **argv, int numToRemove) -{ - int i, j; - - for (i = 0, j = numToRemove; argv[j]; i++, j++) { - argv[i] = argv[j]; - } - argv[i] = NULL; - *argcp -= numToRemove; -} - -/*********************************************************** - * FUNCTION: bAppThread - * - * DESCRIPTION: starts the BApplication message loop running - ***********************************************************/ -static int32 bAppThread(void *arg) { - be_app->Lock(); - return be_app->Run(); -} - -/*********************************************************** - * FUNCTION: sigHandler - * - * DESCRIPTION: shuts down the app on CTRL-C - ***********************************************************/ -static void sigHandler(int) { - gState.quitAll = true; - gBlock.NewEvent(); -} - -/*********************************************************** - * FUNCTION: glutInit (2.1) - * - * DESCRIPTION: create BApplication, parse cmd-line arguments, - * and set up gState structure. - ***********************************************************/ -void glutInit(int *argcp, char **argv) { - char *str, *geometry = NULL; - int i; - - if (gState.display) { - __glutWarning("glutInit being called a second time."); - return; - } - /* Determine temporary program name. */ - str = strrchr(argv[0], '/'); - if (str == NULL) { - __glutProgramName = argv[0]; - } else { - __glutProgramName = str + 1; - } - - /* Make private copy of command line arguments. */ - __glutArgc = *argcp; - __glutArgv = (char **) malloc(__glutArgc * sizeof(char *)); - if (!__glutArgv) - __glutFatalError("out of memory."); - for (i = 0; i < __glutArgc; i++) { - __glutArgv[i] = strdup(argv[i]); - if (!__glutArgv[i]) - __glutFatalError("out of memory."); - } - - /* determine permanent program name */ - str = strrchr(__glutArgv[0], '/'); - if (str == NULL) { - __glutProgramName = __glutArgv[0]; - } else { - __glutProgramName = str + 1; - } - - /* parse arguments for standard options */ - for (i = 1; i < __glutArgc; i++) { - if (!strcmp(__glutArgv[i], "-display")) { - __glutWarning("-display option only valid for X glut."); - if (++i >= __glutArgc) { - __glutFatalError( - "follow -display option with X display name."); - } - removeArgs(argcp, &argv[1], 2); - } else if (!strcmp(__glutArgv[i], "-geometry")) { - if (++i >= __glutArgc) { - __glutFatalError( - "follow -geometry option with geometry parameter."); - } - geometry = __glutArgv[i]; - removeArgs(argcp, &argv[1], 2); - } else if (!strcmp(__glutArgv[i], "-direct")) { - __glutWarning("-direct option only valid for X glut."); - removeArgs(argcp, &argv[1], 1); - } else if (!strcmp(__glutArgv[i], "-indirect")) { - __glutWarning("-indirect option only valid for X glut."); - removeArgs(argcp, &argv[1], 1); - } else if (!strcmp(__glutArgv[i], "-iconic")) { - __glutWarning("-iconic option doesn't make sense in BeOS."); - removeArgs(argcp, &argv[1], 1); - } else if (!strcmp(__glutArgv[i], "-gldebug")) { - gState.debug = true; - removeArgs(argcp, &argv[1], 1); - } else if (!strcmp(__glutArgv[i], "-sync")) { - __glutWarning("-sync option only valid for X glut."); - removeArgs(argcp, &argv[1], 1); - } else { - /* Once unknown option encountered, stop command line - processing. */ - break; - } - } - - __glutInit(); /* Create BApplication first so DisplayWidth() works */ - if (geometry) { - int flags, x, y, width, height; - - /* Fix bogus "{width|height} may be used before set" - warning */ - width = 0; - height = 0; - - flags = XParseGeometry(geometry, &x, &y, - (unsigned int *) &width, (unsigned int *) &height); - if (WidthValue & flags) { - /* Careful because X does not allow zero or negative - width windows */ - if (width > 0) - gState.initWidth = width; - } - if (HeightValue & flags) { - /* Careful because X does not allow zero or negative - height windows */ - if (height > 0) - gState.initHeight = height; - } - if (XValue & flags) { - if (XNegative & flags) - x = DisplayWidth() + x - gState.initWidth; - /* Play safe: reject negative X locations */ - if (x >= 0) - gState.initX = x; - } - if (YValue & flags) { - if (YNegative & flags) - y = DisplayHeight() + y - gState.initHeight; - /* Play safe: reject negative Y locations */ - if (y >= 0) - gState.initY = y; - } - } -} - -/*********************************************************** - * FUNCTION: __glutInit - * - * DESCRIPTION: create BApplication, parse cmd-line arguments, - * and set up gState structure. - ***********************************************************/ -void __glutInit() { - // open BApplication - gState.display = new BApplication("application/x-glut-demo"); - be_app->Unlock(); - gState.appthread = spawn_thread(bAppThread, "BApplication", B_NORMAL_PRIORITY, 0); - resume_thread(gState.appthread); - - bigtime_t unused; - __glutInitTime(&unused); - - /* set atexit() function to destroy all windows before exiting */ - if(atexit(__glutDestroyAllWindows)) - __glutFatalError("can't set exit handler"); - - /* similarly, destroy all windows on CTRL-C */ - signal(SIGINT, sigHandler); -} - -/*********************************************************** - * FUNCTION: glutInitWindowPosition (2.2) - * - * DESCRIPTION: set initial window position - ***********************************************************/ -void glutInitWindowPosition(int x, int y) { - gState.initX = x; - gState.initY = y; -} - -/*********************************************************** - * FUNCTION: glutInitWindowSize (2.2) - * - * DESCRIPTION: set initial window size - ***********************************************************/ -void glutInitWindowSize(int width, int height) { - gState.initWidth = width; - gState.initHeight = height; -} - -/*********************************************************** - * FUNCTION: glutInitDisplayMode (2.3) - * - * DESCRIPTION: set initial display mode - ***********************************************************/ -void glutInitDisplayMode(unsigned int mode) { - gState.displayMode = mode; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutMenu.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutMenu.cpp deleted file mode 100644 index 2f9e6a2c67..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutMenu.cpp +++ /dev/null @@ -1,326 +0,0 @@ -/*********************************************************** - * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby. - * - * This program is freely distributable without licensing fees - * and is provided without guarantee or warrantee expressed or - * implied. This program is -not- in the public domain. - * - * FILE: glutMenu.cpp - * - * DESCRIPTION: code for popup menu handling - ***********************************************************/ - -/*********************************************************** - * Headers - ***********************************************************/ -#include -#include -#include -#include "glutint.h" -#include "glutState.h" - -/*********************************************************** - * Private variables - ***********************************************************/ -static GlutMenu **menuList = 0; -static int menuListSize = 0; - -/*********************************************************** - * FUNCTION: getUnusedMenuSlot - * - * DESCRIPTION: helper function to get a new menu slot - ***********************************************************/ -GlutMenu *__glutGetMenuByNum(int menunum) -{ - if (menunum < 1 || menunum > menuListSize) { - return NULL; - } - return menuList[menunum - 1]; -} - -/*********************************************************** - * FUNCTION: getUnusedMenuSlot - * - * DESCRIPTION: helper function to get a new menu slot - ***********************************************************/ -static int -getUnusedMenuSlot(void) -{ - int i; - - /* Look for allocated, unused slot. */ - for (i = 0; i < menuListSize; i++) { - if (!menuList[i]) { - return i; - } - } - /* Allocate a new slot. */ - menuListSize++; - menuList = (GlutMenu **) - realloc(menuList, menuListSize * sizeof(GlutMenu *)); - if (!menuList) - __glutFatalError("out of memory."); - menuList[menuListSize - 1] = NULL; - return menuListSize - 1; -} - -/*********************************************************** - * FUNCTION: glutCreateMenu (6.1) - * - * DESCRIPTION: create a new menu - ***********************************************************/ -int APIENTRY -glutCreateMenu(GLUTselectCB selectFunc) -{ - GlutMenu *menu; - int menuid; - - menuid = getUnusedMenuSlot(); - menu = new GlutMenu(menuid, selectFunc); // constructor sets up members - menuList[menuid] = menu; - gState.currentMenu = menu; - return menuid + 1; -} - -/*********************************************************** - * FUNCTION: glutSetMenu (6.2) - * glutGetMenu - * - * DESCRIPTION: set and get the current menu - ***********************************************************/ -int APIENTRY -glutGetMenu(void) -{ - if (gState.currentMenu) { - return gState.currentMenu->id + 1; - } else { - return 0; - } -} - -void APIENTRY -glutSetMenu(int menuid) -{ - GlutMenu *menu; - - if (menuid < 1 || menuid > menuListSize) { - __glutWarning("glutSetMenu attempted on bogus menu."); - return; - } - menu = menuList[menuid - 1]; - if (!menu) { - __glutWarning("glutSetMenu attempted on bogus menu."); - return; - } - gState.currentMenu = menu; -} - -/*********************************************************** - * FUNCTION: glutDestroyMenu (6.3) - * - * DESCRIPTION: destroy the specified menu - ***********************************************************/ -void APIENTRY -glutDestroyMenu(int menunum) -{ - GlutMenu *menu = __glutGetMenuByNum(menunum); - menuList[menunum - 1] = 0; - if (gState.currentMenu == menu) { - gState.currentMenu = 0; - } - delete menu; -} - -/*********************************************************** - * FUNCTION: glutAddMenuEntry (6.4) - * - * DESCRIPTION: add a new menu item - ***********************************************************/ -void -glutAddMenuEntry(const char *label, int value) -{ - new GlutMenuItem(gState.currentMenu, false, value, label); -} - -/*********************************************************** - * FUNCTION: glutAddSubMenu (6.5) - * - * DESCRIPTION: add a new submenu - ***********************************************************/ -void -glutAddSubMenu(const char *label, int menu) -{ - new GlutMenuItem(gState.currentMenu, true, menu-1, label); -} - -/*********************************************************** - * FUNCTION: glutChangeToMenuEntry (6.6) - * - * DESCRIPTION: change menuitem into a menu entry - ***********************************************************/ -void -glutChangeToMenuEntry(int num, const char *label, int value) -{ - GlutMenuItem *item; - int i; - - i = gState.currentMenu->num; - item = gState.currentMenu->list; - while (item) { - if (i == num) { - free(item->label); - item->label = strdup(label); - item->isTrigger = false; - item->value = value; - return; - } - i--; - item = item->next; - } - __glutWarning("Current menu has no %d item.", num); -} - -/*********************************************************** - * FUNCTION: glutChangeToSubMenu (6.7) - * - * DESCRIPTION: change menuitem into a submenu - ***********************************************************/ -void -glutChangeToSubMenu(int num, const char *label, int menu) -{ - GlutMenuItem *item; - int i; - - i = gState.currentMenu->num; - item = gState.currentMenu->list; - while (item) { - if (i == num) { - free(item->label); - item->label = strdup(label); - item->isTrigger = true; - item->value = menu-1; - return; - } - i--; - item = item->next; - } - __glutWarning("Current menu has no %d item.", num); -} - -/*********************************************************** - * FUNCTION: glutRemoveMenuItem (6.8) - * - * DESCRIPTION: remove a menu item - ***********************************************************/ -void -glutRemoveMenuItem(int num) -{ - GlutMenuItem *item, **prev; - int i; - - i = gState.currentMenu->num; - prev = &gState.currentMenu->list; - item = gState.currentMenu->list; - - while (item) { - if (i == num) { - gState.currentMenu->num--; - - /* Patch up menu's item list. */ - *prev = item->next; - - free(item->label); - delete item; - return; - } - i--; - prev = &item->next; - item = item->next; - } - __glutWarning("Current menu has no %d item.", num); -} - -/*********************************************************** - * FUNCTION: glutAttachMenu (6.9) - * glutDetachMenu - * - * DESCRIPTION: attach and detach menu from view - ***********************************************************/ -void -glutAttachMenu(int button) -{ - gState.currentWindow->menu[button] = gState.currentMenu->id + 1; -} - -void -glutDetachMenu(int button) -{ - gState.currentWindow->menu[button] = 0; -} - -/*********************************************************** - * CLASS: GlutMenu - * - * FUNCTION: CreateBMenu - * - * DESCRIPTION: construct a BPopupMenu for this menu - ***********************************************************/ -BMenu *GlutMenu::CreateBMenu(bool toplevel) { - BMenu *bpopup; - if(toplevel) { - bpopup = new GlutPopUp(id+1); - } else { - bpopup = new BMenu(""); - } - GlutMenuItem *item = list; - while (item) { - GlutBMenuItem *bitem; - if(item->isTrigger) { - // recursively call CreateBMenu - bitem = new GlutBMenuItem(menuList[item->value]->CreateBMenu(false)); - bitem->SetLabel(item->label); - bitem->menu = 0; // real menu items start at 1 - bitem->value = 0; - } else { - bitem = new GlutBMenuItem(item->label); - bitem->menu = id + 1; - bitem->value = item->value; - } - bpopup->AddItem(bitem, 0); - item = item->next; - } - return bpopup; -} - -/*********************************************************** - * CLASS: GlutMenu - * - * FUNCTION: (destructor) - * - * DESCRIPTION: destroy the menu and its items (but not submenus!) - ***********************************************************/ -GlutMenu::~GlutMenu() { - while (list) { - GlutMenuItem *next = list->next; - delete list; - list = next; - } -} - -/*********************************************************** - * CLASS: GlutMenuItem - * - * FUNCTION: (constructor) - * - * DESCRIPTION: construct the new menu item and add to parent - ***********************************************************/ -GlutMenuItem::GlutMenuItem(GlutMenu *n_menu, bool n_trig, int n_value, const char *n_label) -{ - menu = n_menu; - isTrigger = n_trig; - value = n_value; - label = strdup(n_label); - next = menu->list; - menu->list = this; - menu->num++; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutMenu.h b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutMenu.h deleted file mode 100644 index 1ee170694b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutMenu.h +++ /dev/null @@ -1,84 +0,0 @@ -/*********************************************************** - * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby. - * - * This program is freely distributable without licensing fees - * and is provided without guarantee or warrantee expressed or - * implied. This program is -not- in the public domain. - * - * FILE: glutMenu.h - * - * DESCRIPTION: the GlutMenu class is a simple popup menu - ***********************************************************/ - -/*********************************************************** - * Headers - ***********************************************************/ -#include -#include -#include -#include - -/*********************************************************** - * Definitions - ***********************************************************/ -const int32 MENU_ITEM = 'menu'; - -/*********************************************************** - * CLASS: GlutMenu - ***********************************************************/ -class GlutMenuItem; -class GlutPopUp; -class GlutMenu { -public: - GlutMenu(int n_id, GLUTselectCB n_select) { - id = n_id; - select = n_select; - list = 0; - num = 0; - } - ~GlutMenu(); - BMenu *CreateBMenu(bool toplevel=true); // construct BPopUpMenu - - // public data - int id; - GLUTselectCB select; // callback function - GlutMenuItem *list; // list of menu items - int num; // number of items -}; - -/*********************************************************** - * CLASS: GlutMenuItem - ***********************************************************/ -class GlutMenuItem { -public: - GlutMenuItem(GlutMenu *n_menu, bool n_trig, int n_value, const char *n_label); - - // public data - GlutMenu *menu; // parent menu - bool isTrigger; // are we a submenu? - int value; // value to send, or submenu id if isTrigger - char *label; // strdup'ed label string - GlutMenuItem *next; // next menu entry on list -}; - -/*********************************************************** - * CLASS: GlutPopUp - ***********************************************************/ -class GlutPopUp : public BPopUpMenu { -public: - GlutPopUp(int m) : BPopUpMenu(0, false, false) { menu = m;} - - BPoint point; // point to start menu - GlutWindow *win; // pointer to my window - int menu; // my menu number -}; - -/*********************************************************** - * CLASS: GlutBMenuItem - ***********************************************************/ -class GlutBMenuItem : public BMenuItem { -public: - GlutBMenuItem(const char *name) : BMenuItem(name, 0) {} - GlutBMenuItem(BMenu* menu) : BMenuItem(menu) {} - int menu, value; -}; diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutOverlay.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutOverlay.cpp deleted file mode 100644 index fed757fe95..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutOverlay.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/*********************************************************** - * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby. - * - * This program is freely distributable without licensing fees - * and is provided without guarantee or warrantee expressed or - * implied. This program is -not- in the public domain. - * - * - * FILE: glutOverlay.cpp - * - * DESCRIPTION: we don't support overlays, so this code is - * really simple - ***********************************************************/ - -/*********************************************************** - * Headers - ***********************************************************/ -#include -#include "glutint.h" - -void glutEstablishOverlay() { - __glutFatalError("BeOS lacks overlay support."); -} - -void glutUseLayer(GLenum layer) { - // ignore -} - -void glutRemoveOverlay() { - // ignore -} - -void glutPostOverlayRedisplay() { - // ignore -} - -void glutShowOverlay() { - // ignore -} - -void glutHideOverlay() { - // ignore -} - -void glutPostWindowOverlayRedisplay(int win) { - // ignore -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutState.h b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutState.h deleted file mode 100644 index 9c44eb6b53..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutState.h +++ /dev/null @@ -1,71 +0,0 @@ -/*********************************************************** - * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby. - * - * This program is freely distributable without licensing fees - * and is provided without guarantee or warrantee expressed or - * implied. This program is -not- in the public domain. - * - * - * FILE: glutState.h - * - * DESCRIPTION: the global state for GLUT - * (takes the place of glutint.h in the C version) - ***********************************************************/ - -/*********************************************************** - * Headers - ***********************************************************/ -#include -#include -#include "glutWindow.h" -#include "glutMenu.h" - -/*********************************************************** - * CLASS: GlutState - * - * DESCRIPTION: all the global state variables - ***********************************************************/ -struct GlutState { - BApplication *display; - thread_id appthread; - - int initX, initY; // initial window position - int initWidth, initHeight; // initial window size - unsigned int displayMode; // initial display mode - char *displayString; // verbose display mode - - GlutWindow *currentWindow; // current window - GlutMenu *currentMenu; // current menu - - GlutWindow **windowList; // array of pointers to windows - int windowListSize; // size of window list - - GLUTidleCB idle; // idle callback - GLUTmenuStatusCB menuStatus; // menu status callback - int modifierKeys; // only valid during keyboard callback - - bool debug; // call glGetError - bool quitAll; // quit - - GlutState() { - display = 0; - appthread = 0; - initX = initY = -1; - initWidth = initHeight = 300; - displayMode = GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH; - displayString = 0; - currentWindow = 0; - currentMenu = 0; - windowList = 0; - windowListSize = 0; - idle = 0; - menuStatus = 0; - modifierKeys = ~0; - debug = quitAll = false; - } -}; - -/*********************************************************** - * Global variable (declared in glutInit.cpp) - ***********************************************************/ -extern GlutState gState; diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutWindow.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutWindow.cpp deleted file mode 100644 index 66ea2a00a8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutWindow.cpp +++ /dev/null @@ -1,633 +0,0 @@ -/*********************************************************** - * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby. - * - * This program is freely distributable without licensing fees - * and is provided without guarantee or warrantee expressed or - * implied. This program is -not- in the public domain. - * - * - * FILE: glutWindow.cpp - * - * DESCRIPTION: all the routines for dealing with GlutWindows - ***********************************************************/ - -/*********************************************************** - * Headers - ***********************************************************/ -#include -#include -#include "glutint.h" -#include "glutState.h" -#include "glutBlocker.h" - -/*********************************************************** - * FUNCTION: getUnusedWindowSlot - * - * DESCRIPTION: helper function to get a new window slot - ***********************************************************/ -static int -getUnusedWindowSlot() -{ - int i; - - /* Look for allocated, unused slot. */ - for (i = 0; i < gState.windowListSize; i++) { - if (!gState.windowList[i]) { - return i; - } - } - /* Allocate a new slot. */ - gState.windowListSize++; - gState.windowList = (GlutWindow **) - realloc(gState.windowList, - gState.windowListSize * sizeof(GlutWindow *)); - - if (!gState.windowList) - __glutFatalError("out of memory."); - gState.windowList[gState.windowListSize - 1] = NULL; - return gState.windowListSize - 1; -} - -/*********************************************************** - * FUNCTION: __glutDefaultDisplay - * __glutDefaultReshape - * - * DESCRIPTION: default display and reshape functions - ***********************************************************/ -static void -__glutDefaultDisplay(void) -{ - /* XXX Remove the warning after GLUT 3.0. */ - __glutWarning("The following is a new check for GLUT 3.0; update your code."); - __glutFatalError( - "redisplay needed for window %d, but no display callback.", - gState.currentWindow->num + 1); -} - -void -__glutDefaultReshape(int width, int height) -{ - /* Adjust the viewport of the window */ - glViewport(0, 0, (GLsizei) width, (GLsizei) height); -} - -/*********************************************************** - * CLASS: GlutWindow - * - * FUNCTION: (constructor) - * - * DESCRIPTION: creates a new GLUT window - * note: subwindows don't resize, but top-level windows - * follow all sides - ***********************************************************/ -GlutWindow::GlutWindow(GlutWindow *nparent, char *name, - int x, int y, int width, int height, ulong options) : - BGLView( - (nparent ? BRect(x,y,x+width-1,y+height-1) : - BRect(0,0,width-1,height-1)), name, - (nparent ? B_FOLLOW_NONE : B_FOLLOW_ALL_SIDES), - B_WILL_DRAW|B_FRAME_EVENTS|B_FULL_UPDATE_ON_RESIZE|B_PULSE_NEEDED, - options) -{ - // add myself to window list - num = getUnusedWindowSlot(); - gState.windowList[num] = this; - - // set up parent/children relationships - parent = nparent; - if (parent) { - siblings = parent->children; - parent->children = this; - } else { - siblings = 0; - } - children = 0; - - // initialize variables - cursor = GLUT_CURSOR_INHERIT; // default cursor - for (int i = 0; i < GLUT_MAX_MENUS; i++) { - menu[i] = 0; - } - m_width = width; - m_height = height; - m_buttons = 0; - - // clear callbacks - display = __glutDefaultDisplay; - reshape = __glutDefaultReshape; - mouse = 0; - motion = 0; - passive = 0; - entry = 0; - keyboard = 0; - visibility = 0; - special = 0; - windowStatus = 0; - - // clear event counters - anyevents = 1; - displayEvent = 1; // get a reshape and a display event right away - reshapeEvent = 1; - mouseEvent = 0; - motionEvent = 0; - passiveEvent = 0; - entryEvent = 0; - keybEvent = 0; - windowStatusEvent = 0; // DirectConnected() will report change in - visState = -1; // visibility - specialEvent = 0; - statusEvent = 0; - menuEvent = 0; - visible = true; - gBlock.QuickNewEvent(); - - // if i'm a subwindow, add me to my parent view - if (parent) { - parent->Window()->Lock(); - parent->AddChild(this); - parent->Window()->Unlock(); - } else { - // if I'm a top-level window, create my BWindow - GlutBWindow *mybwindow = new GlutBWindow( - BRect(x,y,x+width-1,y+height-1), name); - mybwindow->AddChild(this); - mybwindow->bgl = this; - mybwindow->Show(); - } - - // give me the keyboard focus (focus follows mouse, X style, as - // implemented in GlutWindow::MouseMoved()) - Window()->Lock(); - MakeFocus(); - Window()->Unlock(); - - // make myself the default window - __glutSetWindow(this); -} - -/*********************************************************** - * FUNCTION: glutCreateWindow (4.1) - * - * DESCRIPTION: creates a new GLUT window - ***********************************************************/ -int glutCreateWindow(const char *name) { - if (!be_app) - __glutInit(); - - ulong options; - if (!__glutConvertDisplayMode(&options)) { - __glutWarning("visual with necessary capabilities not found."); - } - - // if X or Y is negative, then start at a reasonable position - bool defaultxy = (gState.initX < 0) || (gState.initY < 0); - - GlutWindow *window = new GlutWindow(0, const_cast(name), - (defaultxy ? 50 : gState.initX), (defaultxy ? 50 : gState.initY), - gState.initWidth, gState.initHeight, options); - - return window->num + 1; -} - -/*********************************************************** - * FUNCTION: glutCreateSubWindow (4.2) - * - * DESCRIPTION: creates a new GLUT subwindow - * Note: a subwindow is a GlutWindow (which is actually - * a BGLView) without its own BWindow - ***********************************************************/ -int glutCreateSubWindow(int win, int x, int y, int width, int height) { - ulong options; - if (!__glutConvertDisplayMode(&options)) { - __glutFatalError("visual with necessary capabilities not found."); - } - - GlutWindow *window = new GlutWindow(gState.windowList[win-1], "child", - x, y, width, height, options); - - return window->num + 1; -} - -/*********************************************************** - * FUNCTION: __glutSetWindow - * - * DESCRIPTION: set the current window (utility function) - ***********************************************************/ -void -__glutSetWindow(GlutWindow * window) -{ - if (gState.currentWindow) - gState.currentWindow->UnlockGL(); - gState.currentWindow = window; - gState.currentWindow->LockGL(); -} - -/*********************************************************** - * FUNCTION: glutSetWindow (4.3) - * glutGetWindow - * - * DESCRIPTION: set and get the current window - ***********************************************************/ -void glutSetWindow(int win) { - GlutWindow *window; - - if (win < 1 || win > gState.windowListSize) { - __glutWarning("glutSetWindow attempted on bogus window."); - return; - } - window = gState.windowList[win - 1]; - if (!window) { - __glutWarning("glutSetWindow attempted on bogus window."); - return; - } - __glutSetWindow(window); -} - -int glutGetWindow() { - if (gState.currentWindow) { - return gState.currentWindow->num + 1; - } else { - return 0; - } -} - -/*********************************************************** - * FUNCTION: __glutDestroyWindow - * - * DESCRIPTION: recursively set entries to 0 - ***********************************************************/ -static void -__glutDestroyWindow(GlutWindow *window, GlutWindow *initialWindow) { - // first, find all children recursively and set their entries to 0 - GlutWindow *cur = window->children; - while (cur) { - GlutWindow *siblings = cur->siblings; - __glutDestroyWindow(cur, initialWindow); - cur = siblings; - } - - /* Remove from parent's children list (only necessary for - non-initial windows and subwindows!). */ - GlutWindow *parent = window->parent; - if (parent && parent == initialWindow->parent) { - GlutWindow **prev = &parent->children; - cur = parent->children; - while (cur) { - if (cur == window) { - *prev = cur->siblings; - break; - } - prev = &(cur->siblings); - cur = cur->siblings; - } - } - - // finally, check if we are the current window, and set to 0 - if (gState.currentWindow == window) { - gState.currentWindow = 0; - } - gState.windowList[window->num] = 0; -} - -/*********************************************************** - * FUNCTION: glutDestroyWindow (4.4) - * - * DESCRIPTION: destroy window and all its children - ***********************************************************/ -void glutDestroyWindow(int win) { - // can't destroy a window if another window has the GL context - if (gState.currentWindow) - gState.currentWindow->UnlockGL(); - - // lock the window - GlutWindow *window = gState.windowList[win-1]; - BWindow *bwindow = window->Window(); - bwindow->Lock(); - - // if win is the current window, set current window to 0 - if (gState.currentWindow == window) { - gState.currentWindow = 0; - } - - // recursively set child entries to 0 - __glutDestroyWindow(window, window); - - // try flushing OpenGL - window->LockGL(); - glFlush(); - window->UnlockGL(); - - // now, if the window was top-level, delete its BWindow - if(!window->parent) { - bwindow->Quit(); - } else { - // else, detach it from the BWindow and delete it - window->RemoveSelf(); - delete window; - bwindow->Unlock(); - } - // relock GL if the current window is still valid - if(gState.currentWindow) - gState.currentWindow->LockGL(); -} - -/*********************************************************** - * FUNCTION: __glutDestroyAllWindows - * - * DESCRIPTION: destroy all windows when exit() is called - * this seems to be necessary to avoid delays - * and crashes when using BDirectWindow - ***********************************************************/ -void __glutDestroyAllWindows() { - for(int i=0; iLock(); - gState.display->Quit(); - status_t ignored; - wait_for_thread(gState.appthread, &ignored); -} - -/*********************************************************** - * FUNCTION: glutPostRedisplay (4.5) - * - * DESCRIPTION: mark window as needing redisplay - ***********************************************************/ -void glutPostRedisplay() { - gState.currentWindow->Window()->Lock(); - gState.currentWindow->anyevents = true; - gState.currentWindow->displayEvent = true; - gState.currentWindow->Window()->Unlock(); - gBlock.QuickNewEvent(); -} - -/*********************************************************** - * FUNCTION: glutPostWindowRedisplay - * - * DESCRIPTION: mark window as needing redisplay - ***********************************************************/ -void glutPostWindowRedisplay(int win) { - GlutWindow *gwin = gState.windowList[win - 1]; - gwin->Window()->Lock(); - gwin->anyevents = true; - gwin->displayEvent = true; - gwin->Window()->Unlock(); - gBlock.QuickNewEvent(); -} - -/*********************************************************** - * FUNCTION: glutSwapBuffers (4.6) - * - * DESCRIPTION: swap buffers - ***********************************************************/ -void glutSwapBuffers() { - gState.currentWindow->SwapBuffers(); -} - -/*********************************************************** - * FUNCTION: glutPositionWindow (4.7) - * - * DESCRIPTION: move window - ***********************************************************/ -void glutPositionWindow(int x, int y) { - BDirectWindow *win = dynamic_cast(gState.currentWindow->Window()); - win->Lock(); - if (gState.currentWindow->parent) - gState.currentWindow->MoveTo(x, y); // move the child view - else { - if(win->IsFullScreen()) { - win->SetFullScreen(false); - } - win->MoveTo(x, y); // move the window - } - win->Unlock(); -} - -/*********************************************************** - * FUNCTION: glutReshapeWindow (4.8) - * - * DESCRIPTION: reshape window (we'll catch the callback - * when the view gets a Draw() message - ***********************************************************/ -void glutReshapeWindow(int width, int height) { - BDirectWindow *win = dynamic_cast(gState.currentWindow->Window()); - win->Lock(); - if (gState.currentWindow->parent) - gState.currentWindow->ResizeTo(width-1, height-1); // resize the child - else { - if(win->IsFullScreen()) { - win->SetFullScreen(false); - } - win->ResizeTo(width-1, height-1); // resize the parent - } - win->Unlock(); -} - -/*********************************************************** - * FUNCTION: glutFullScreen (4.9) - * - * DESCRIPTION: makes the window full screen - ***********************************************************/ -void glutFullScreen() { - BDirectWindow *win = dynamic_cast(gState.currentWindow->Window()); - win->Lock(); - win->SetFullScreen(true); - win->Unlock(); -} - -/*********************************************************** - * FUNCTION: glutPopWindow (4.10) - * glutPushWindow - * - * DESCRIPTION: change the stacking order of the current window - * NOTE: I can't figure out how to do this for windows, - * and there is no concept of "stacking order" for - * subwindows, so these are currently no-ops. - ***********************************************************/ -void glutPopWindow() { } -void glutPushWindow() { } - -/*********************************************************** - * FUNCTION: glutShowWindow (4.11) - * glutHideWindow - * glutIconifyWindow - * - * DESCRIPTION: change display status of current window - ***********************************************************/ -void glutShowWindow() { - gState.currentWindow->Window()->Lock(); - if (gState.currentWindow->parent) // subwindow - gState.currentWindow->Show(); - else { - if(gState.currentWindow->Window()->IsHidden()) - gState.currentWindow->Window()->Show(); // show the actual BWindow - gState.currentWindow->Window()->Minimize(false); - } - gState.currentWindow->Window()->Unlock(); -} - -void glutHideWindow() { - gState.currentWindow->Window()->Lock(); - if (gState.currentWindow->parent) // subwindow - gState.currentWindow->Hide(); - else - gState.currentWindow->Window()->Hide(); // show the actual BWindow - gState.currentWindow->Window()->Unlock(); -} - -void glutIconifyWindow() { - if(gState.currentWindow->parent) - __glutFatalError("can't iconify a subwindow"); - - gState.currentWindow->Window()->Lock(); - gState.currentWindow->Window()->Minimize(true); - gState.currentWindow->Window()->Unlock(); -} - -/*********************************************************** - * FUNCTION: glutSetWindowTitle (4.12) - * glutSetIconTitle - * - * DESCRIPTION: set the window title (icon title is same) - ***********************************************************/ -void glutSetWindowTitle(const char *name) { - if (gState.currentWindow->parent) - __glutFatalError("glutSetWindowTitle: isn't a top-level window"); - - gState.currentWindow->Window()->Lock(); - gState.currentWindow->Window()->SetTitle(name); - gState.currentWindow->Window()->Unlock(); -} - -void glutSetIconTitle(const char *name) { - glutSetWindowTitle(name); -} - -/*********************************************************** - * FUNCTION: __glutConvertDisplayMode - * - * DESCRIPTION: converts the current display mode into a BGLView - * display mode, printing warnings as appropriate. - * - * PARAMETERS: if options is non-NULL, the current display mode is - * returned in it. - * - * RETURNS: 1 if the current display mode is possible, else 0 - ***********************************************************/ -int __glutConvertDisplayMode(unsigned long *options) { - if (gState.displayString) { - /* __glutDisplayString should be NULL except if - glutInitDisplayString has been called to register a - different display string. Calling glutInitDisplayString - means using a string instead of an integer mask determine - the visual to use. This big ugly code is in glutDstr.cpp */ - return __glutConvertDisplayModeFromString(options); - } - - if(options) { - ulong newoptions = 0; - if(gState.displayMode & GLUT_ACCUM) - newoptions |= BGL_ACCUM; - if(gState.displayMode & GLUT_ALPHA) - newoptions |= BGL_ALPHA; - if(gState.displayMode & GLUT_DEPTH) - newoptions |= BGL_DEPTH; - if(gState.displayMode & GLUT_DOUBLE) - newoptions |= BGL_DOUBLE; - if(gState.displayMode & GLUT_STENCIL) - newoptions |= BGL_STENCIL; - *options = newoptions; - } - - if(gState.displayMode & GLUT_INDEX) { - __glutWarning("BeOS doesn't support indexed color"); - return 0; - } - if(gState.displayMode & GLUT_MULTISAMPLE) { - return 1; // try to go without multisampling - } - if(gState.displayMode & GLUT_STEREO) { - __glutWarning("BeOS doesn't support stereo windows"); - return 0; - } - if(gState.displayMode & GLUT_LUMINANCE) { - __glutWarning("BeOS doesn't support luminance color model"); - return 0; - } - return 1; // visual supported -} - -/*********************************************************** - * CLASS: GlutBWindow - * - * DESCRIPTION: very thin wrapper around BWindow - ***********************************************************/ -GlutBWindow::GlutBWindow(BRect frame, char *name) : - BDirectWindow(frame, name, B_TITLED_WINDOW, 0) { - fConnectionDisabled = false; - bgl = 0; - SetPulseRate(100000); - - if (!SupportsWindowMode()) { - __glutFatalError("video card doesn't support windowed operation"); - } -} - -void GlutBWindow::DirectConnected( direct_buffer_info *info ) { - bgl->DirectConnected(info); - if(bgl && !fConnectionDisabled) { - bgl->EnableDirectMode(true); - } - int newVisState; - if((info->buffer_state & B_DIRECT_MODE_MASK) == B_DIRECT_START) { - bgl->visible = true; - } - if(!bgl->visible || info->buffer_state == B_DIRECT_STOP) - newVisState = GLUT_HIDDEN; - else { - if (info->clip_list_count == 0) - newVisState = GLUT_FULLY_COVERED; - else if (info->clip_list_count == 1) - newVisState = GLUT_FULLY_RETAINED; - else - newVisState = GLUT_PARTIALLY_RETAINED; - } - if(newVisState != bgl->visState) { - bgl->visState = newVisState; - bgl->anyevents = bgl->windowStatusEvent = true; - gBlock.NewEvent(); - } -} - -GlutBWindow::~GlutBWindow() { - fConnectionDisabled = true; - if(bgl) { - bgl->EnableDirectMode(false); - } - if(!IsHidden()) - Hide(); - Sync(); -} - -bool GlutBWindow::QuitRequested() { - gState.quitAll = true; - gBlock.NewEvent(); - return false; // don't quit now, wait for main thread to do it -} - -void GlutBWindow::Minimize(bool minimize) { - bgl->visible = !minimize; - BWindow::Minimize(minimize); -} - -void GlutBWindow::Hide() { - BWindow::Hide(); - bgl->visible = false; -} - -void GlutBWindow::Show() { - BWindow::Show(); - bgl->visible = true; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutWindow.h b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutWindow.h deleted file mode 100644 index d3ac186269..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutWindow.h +++ /dev/null @@ -1,119 +0,0 @@ -/*********************************************************** - * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby. - * - * This program is freely distributable without licensing fees - * and is provided without guarantee or warrantee expressed or - * implied. This program is -not- in the public domain. - * - * - * FILE: glutWindow.h - * - * DESCRIPTION: the GlutWindow class saves all events for - * handling by main thread - ***********************************************************/ - -/*********************************************************** - * Headers - ***********************************************************/ -#include -#include -#include - -/*********************************************************** - * CLASS: GlutWindow - * - * INHERITS FROM: BGLView (NOT BWindow!) - * - * DESCRIPTION: all information needed for windows and - * subwindows (handled as similarly as possible) - ***********************************************************/ -class GlutWindow : public BGLView { -public: - GlutWindow(GlutWindow *nparent, char *name, int x, int y, int width, - int height, ulong options); - - void KeyDown(const char *bytes, int32 numBytes); - void MouseDown(BPoint point); - void MouseMoved(BPoint point, uint32 transit, const BMessage *message); - void FrameResized(float width, float height); - void Draw(BRect updateRect); - void Pulse(); // needed since MouseUp() is broken - void MouseCheck(); // check for button state changes - void ErrorCallback(GLenum errorCode); - - static long MenuThread(void *menu); - - int num; // window number returned to user - int cursor; // my cursor -#define GLUT_MAX_MENUS 3 - int menu[GLUT_MAX_MENUS]; // my popup menus - int m_width, m_height; // the last width and height reported to GLUT - uint32 m_buttons; // the last mouse button state - - /* Window relationship state. */ - GlutWindow *parent; /* parent window */ - GlutWindow *children; /* first child window */ - GlutWindow *siblings; /* next sibling */ - - // leave out buttons and dials callbacks that we don't support - GLUTdisplayCB display; /* redraw */ - GLUTreshapeCB reshape; /* resize (width,height) */ - GLUTmouseCB mouse; /* mouse (button,state,x,y) */ - GLUTmotionCB motion; /* motion (x,y) */ - GLUTpassiveCB passive; /* passive motion (x,y) */ - GLUTentryCB entry; /* window entry/exit (state) */ - GLUTkeyboardCB keyboard; /* keyboard (ASCII,x,y) */ - GLUTvisibilityCB visibility; /* visibility */ - GLUTspecialCB special; /* special key */ - GLUTwindowStatusCB windowStatus; /* window status */ - - bool anyevents; // were any events received? - bool displayEvent; // call display - bool reshapeEvent; // call reshape - bool mouseEvent; // call mouse - bool motionEvent; // call motion - bool passiveEvent; // call passive - bool entryEvent; // call entry - bool keybEvent; // call keyboard - bool windowStatusEvent; // call visibility - bool specialEvent; // call special - bool statusEvent; // menu status changed - bool menuEvent; // menu selected - - int button, mouseState; // for mouse callback - int mouseX, mouseY; // for mouse callback - int motionX, motionY; // for motion callback - int passiveX, passiveY; // for passive callback - int entryState; // for entry callback - unsigned char key; // for keyboard callback - int keyX, keyY; // for keyboard callback - int visState; // for visibility callback - int specialKey; // for special key callback - int specialX, specialY; // for special callback - int modifierKeys; // modifier key state - int menuStatus; // for status callback - int statusX, statusY; // for status callback - int menuNumber; // for menu and status callbacks - int menuValue; // for menu callback - bool visible; // for visibility callback -}; - -/*********************************************************** - * CLASS: GlutBWindow - * - * INHERITS FROM: BDirectWindow - * - * DESCRIPTION: basically a BWindow that won't quit - ***********************************************************/ -class GlutBWindow : public BDirectWindow { -public: - GlutBWindow(BRect frame, char *name); - ~GlutBWindow(); - void DirectConnected(direct_buffer_info *info); - bool QuitRequested(); // exits app - void Minimize(bool minimized); // minimized windows are not visible - void Hide(); - void Show(); - GlutWindow *bgl; - bool fConnectionDisabled; -}; diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_8x13.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_8x13.c deleted file mode 100644 index 843c63d35a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_8x13.c +++ /dev/null @@ -1,2073 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmap8By13 XXX -#include "glutbitmap.h" -#undef glutBitmap8By13 - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch0data[] = { 0x0 }; -static const BitmapCharRec ch0 = {1,1,0,0,8,ch0data}; -#else -static const BitmapCharRec ch0 = {0,0,0,0,8,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,8,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,8,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch127data[] = { 0x0 }; -static const BitmapCharRec ch127 = {1,1,0,0,8,ch127data}; -#else -static const BitmapCharRec ch127 = {0,0,0,0,8,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,8,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,8,0}; -#endif - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x0,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch255 = {6,12,-1,2,8,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0x80,0x80,0xb8,0xc4,0x84,0x84,0xc4,0xb8,0x80,0x80, -}; - -static const BitmapCharRec ch254 = {6,10,-1,2,8,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch253 = {6,12,-1,2,8,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch252 = {6,10,-1,0,8,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch251 = {6,10,-1,0,8,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch250 = {6,10,-1,0,8,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch249 = {6,10,-1,0,8,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0x80,0x78,0xc4,0xa4,0x94,0x8c,0x78,0x4, -}; - -static const BitmapCharRec ch248 = {6,8,-1,1,8,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x20,0x20,0x0,0xf8,0x0,0x20,0x20, -}; - -static const BitmapCharRec ch247 = {5,7,-1,-1,8,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch246 = {6,10,-1,0,8,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch245 = {6,10,-1,0,8,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch244 = {6,10,-1,0,8,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch243 = {6,10,-1,0,8,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch242 = {6,10,-1,0,8,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0x84,0x84,0x84,0x84,0xc4,0xb8,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch241 = {6,10,-1,0,8,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x8,0x50,0x30,0x48, -}; - -static const BitmapCharRec ch240 = {6,10,-1,0,8,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x50,0x50, -}; - -static const BitmapCharRec ch239 = {5,10,-1,0,8,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x90,0x60, -}; - -static const BitmapCharRec ch238 = {5,10,-1,0,8,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch237 = {5,10,-1,0,8,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch236 = {5,10,-1,0,8,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch235 = {6,10,-1,0,8,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch234 = {6,10,-1,0,8,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch233 = {6,10,-1,0,8,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch232 = {6,10,-1,0,8,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x20,0x10,0x78,0x84,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch231 = {6,8,-1,2,8,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x6c,0x92,0x90,0x7c,0x12,0x6c, -}; - -static const BitmapCharRec ch230 = {7,6,0,0,8,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x30,0x48,0x30, -}; - -static const BitmapCharRec ch229 = {6,10,-1,0,8,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch228 = {6,10,-1,0,8,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch227 = {6,10,-1,0,8,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch226 = {6,10,-1,0,8,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch225 = {6,10,-1,0,8,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch224 = {6,10,-1,0,8,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0x80,0xb8,0xc4,0x84,0x84,0xf8,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch223 = {6,9,-1,1,8,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8,0x80, -}; - -static const BitmapCharRec ch222 = {6,9,-1,0,8,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x20,0x20,0x20,0x20,0x50,0x88,0x88,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch221 = {5,10,-1,0,8,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch220 = {6,10,-1,0,8,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch219 = {6,10,-1,0,8,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch218 = {6,10,-1,0,8,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch217 = {6,10,-1,0,8,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x80,0x78,0xc4,0xa4,0xa4,0xa4,0x94,0x94,0x8c,0x78,0x4, -}; - -static const BitmapCharRec ch216 = {6,11,-1,1,8,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x84,0x48,0x30,0x30,0x48,0x84, -}; - -static const BitmapCharRec ch215 = {6,6,-1,-1,8,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch214 = {7,10,0,0,8,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch213 = {7,10,0,0,8,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x24,0x18, -}; - -static const BitmapCharRec ch212 = {7,10,0,0,8,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch211 = {7,10,0,0,8,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x8,0x10, -}; - -static const BitmapCharRec ch210 = {7,10,0,0,8,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0x82,0x86,0x8a,0x92,0xa2,0xc2,0x82,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch209 = {7,10,0,0,8,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0xfc,0x42,0x42,0x42,0xe2,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch208 = {7,9,0,0,8,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x50,0x50, -}; - -static const BitmapCharRec ch207 = {5,10,-1,0,8,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch206 = {5,10,-1,0,8,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch205 = {5,10,-1,0,8,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch204 = {5,10,-1,0,8,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch203 = {6,10,-1,0,8,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch202 = {6,10,-1,0,8,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch201 = {6,10,-1,0,8,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch200 = {6,10,-1,0,8,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x20,0x10,0x78,0x84,0x80,0x80,0x80,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch199 = {6,11,-1,2,8,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0x9e,0x90,0x90,0xf0,0x9c,0x90,0x90,0x90,0x6e, -}; - -static const BitmapCharRec ch198 = {7,9,0,0,8,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x30,0x48,0x30, -}; - -static const BitmapCharRec ch197 = {6,10,-1,0,8,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch196 = {6,10,-1,0,8,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch195 = {6,10,-1,0,8,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch194 = {6,10,-1,0,8,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch193 = {6,10,-1,0,8,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch192 = {6,10,-1,0,8,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x78,0x84,0x84,0x80,0x40,0x20,0x20,0x0,0x20, -}; - -static const BitmapCharRec ch191 = {6,9,-1,0,8,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x6,0x1a,0x12,0xa,0x66,0x92,0x10,0x20,0x90,0x60, -}; - -static const BitmapCharRec ch190 = {7,10,0,0,8,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x1e,0x10,0xc,0x2,0xf2,0x4c,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch189 = {7,10,0,0,8,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x6,0x1a,0x12,0xa,0xe6,0x42,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch188 = {7,10,0,0,8,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0x90,0x48,0x24,0x12,0x24,0x48,0x90, -}; - -static const BitmapCharRec ch187 = {7,7,0,-1,8,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xf0,0x0,0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch186 = {4,6,-1,-3,8,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0xe0,0x40,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch185 = {3,6,-1,-4,8,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0xc0,0x40, -}; - -static const BitmapCharRec ch184 = {2,2,-3,2,8,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0xc0, -}; - -static const BitmapCharRec ch183 = {2,1,-3,-4,8,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x7c, -}; - -static const BitmapCharRec ch182 = {6,9,-1,0,8,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x80,0xb4,0xcc,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch181 = {6,7,-1,1,8,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0x80,0x40, -}; - -static const BitmapCharRec ch180 = {2,2,-3,-8,8,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0x60,0x90,0x10,0x20,0x90,0x60, -}; - -static const BitmapCharRec ch179 = {4,6,-1,-4,8,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xf0,0x80,0x60,0x10,0x90,0x60, -}; - -static const BitmapCharRec ch178 = {4,6,-1,-4,8,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xf8,0x0,0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch177 = {5,7,-1,-1,8,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch176 = {4,4,-2,-5,8,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xfc, -}; - -static const BitmapCharRec ch175 = {6,1,-1,-8,8,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x38,0x44,0xaa,0xb2,0xaa,0xaa,0x92,0x44,0x38, -}; - -static const BitmapCharRec ch174 = {7,9,0,-1,8,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xfc, -}; - -static const BitmapCharRec ch173 = {6,1,-1,-4,8,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x4,0x4,0x4,0xfc, -}; - -static const BitmapCharRec ch172 = {6,4,-1,-1,8,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x12,0x24,0x48,0x90,0x48,0x24,0x12, -}; - -static const BitmapCharRec ch171 = {7,7,0,-1,8,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xf8,0x0,0x78,0x88,0x78,0x8,0x70, -}; - -static const BitmapCharRec ch170 = {5,7,-1,-2,8,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x38,0x44,0x92,0xaa,0xa2,0xaa,0x92,0x44,0x38, -}; - -static const BitmapCharRec ch169 = {7,9,0,-1,8,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xd8, -}; - -static const BitmapCharRec ch168 = {5,1,-1,-8,8,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x60,0x90,0x10,0x60,0x90,0x90,0x60,0x80,0x90,0x60, -}; - -static const BitmapCharRec ch167 = {4,10,-2,0,8,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0x80,0x80,0x80,0x80,0x0,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch166 = {1,9,-3,0,8,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x10,0x10,0x7c,0x10,0x7c,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch165 = {7,9,0,0,8,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0x84,0x78,0x48,0x48,0x78,0x84, -}; - -static const BitmapCharRec ch164 = {6,6,-1,-1,8,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xdc,0x62,0x20,0x20,0x20,0x70,0x20,0x22,0x1c, -}; - -static const BitmapCharRec ch163 = {7,9,0,0,8,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x20,0x70,0xa8,0xa0,0xa0,0xa8,0x70,0x20, -}; - -static const BitmapCharRec ch162 = {5,8,-1,-1,8,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch161 = {1,9,-3,0,8,ch161data}; - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x90,0xa8,0x48, -}; - -static const BitmapCharRec ch126 = {5,3,-1,-6,8,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0xe0,0x10,0x10,0x20,0x18,0x20,0x10,0x10,0xe0, -}; - -static const BitmapCharRec ch125 = {5,9,-1,0,8,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch124 = {1,9,-3,0,8,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x38,0x40,0x40,0x20,0xc0,0x20,0x40,0x40,0x38, -}; - -static const BitmapCharRec ch123 = {5,9,-2,0,8,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xfc,0x40,0x20,0x10,0x8,0xfc, -}; - -static const BitmapCharRec ch122 = {6,6,-1,0,8,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch121 = {6,8,-1,2,8,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0x84,0x48,0x30,0x30,0x48,0x84, -}; - -static const BitmapCharRec ch120 = {6,6,-1,0,8,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x44,0xaa,0x92,0x92,0x82,0x82, -}; - -static const BitmapCharRec ch119 = {7,6,0,0,8,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x20,0x50,0x50,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch118 = {5,6,-1,0,8,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x74,0x88,0x88,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch117 = {6,6,-1,0,8,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x38,0x44,0x40,0x40,0x40,0xf8,0x40,0x40, -}; - -static const BitmapCharRec ch116 = {6,8,-1,0,8,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0x78,0x84,0x18,0x60,0x84,0x78, -}; - -static const BitmapCharRec ch115 = {6,6,-1,0,8,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0x40,0x40,0x40,0x40,0x44,0xb8, -}; - -static const BitmapCharRec ch114 = {6,6,-1,0,8,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x4,0x4,0x4,0x74,0x8c,0x84,0x8c,0x74, -}; - -static const BitmapCharRec ch113 = {6,8,-1,2,8,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0x80,0x80,0x80,0xb8,0xc4,0x84,0xc4,0xb8, -}; - -static const BitmapCharRec ch112 = {6,8,-1,2,8,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x78,0x84,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch111 = {6,6,-1,0,8,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0x84,0x84,0x84,0x84,0xc4,0xb8, -}; - -static const BitmapCharRec ch110 = {6,6,-1,0,8,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0x82,0x92,0x92,0x92,0x92,0xec, -}; - -static const BitmapCharRec ch109 = {7,6,0,0,8,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x60, -}; - -static const BitmapCharRec ch108 = {5,9,-1,0,8,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0x84,0x88,0x90,0xe0,0x90,0x88,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch107 = {6,9,-1,0,8,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0x70,0x88,0x88,0x8,0x8,0x8,0x8,0x18,0x0,0x8, -}; - -static const BitmapCharRec ch106 = {5,10,-1,2,8,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x20, -}; - -static const BitmapCharRec ch105 = {5,8,-1,0,8,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0x84,0x84,0x84,0x84,0xc4,0xb8,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch104 = {6,9,-1,0,8,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x78,0x84,0x78,0x80,0x70,0x88,0x88,0x74, -}; - -static const BitmapCharRec ch103 = {6,8,-1,2,8,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x40,0x40,0x40,0x40,0xf8,0x40,0x40,0x44,0x38, -}; - -static const BitmapCharRec ch102 = {6,9,-1,0,8,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x78,0x84,0x80,0xfc,0x84,0x78, -}; - -static const BitmapCharRec ch101 = {6,6,-1,0,8,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x74,0x8c,0x84,0x84,0x8c,0x74,0x4,0x4,0x4, -}; - -static const BitmapCharRec ch100 = {6,9,-1,0,8,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x78,0x84,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch99 = {6,6,-1,0,8,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xb8,0xc4,0x84,0x84,0xc4,0xb8,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch98 = {6,9,-1,0,8,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78, -}; - -static const BitmapCharRec ch97 = {6,6,-1,0,8,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0x10,0x60,0xe0, -}; - -static const BitmapCharRec ch96 = {4,3,-2,-6,8,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xfe, -}; - -static const BitmapCharRec ch95 = {7,1,0,1,8,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x88,0x50,0x20, -}; - -static const BitmapCharRec ch94 = {5,3,-1,-6,8,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xf0, -}; - -static const BitmapCharRec ch93 = {4,9,-1,0,8,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x2,0x2,0x4,0x8,0x10,0x20,0x40,0x80,0x80, -}; - -static const BitmapCharRec ch92 = {7,9,0,0,8,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xf0, -}; - -static const BitmapCharRec ch91 = {4,9,-2,0,8,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xfc,0x80,0x80,0x40,0x20,0x10,0x8,0x4,0xfc, -}; - -static const BitmapCharRec ch90 = {6,9,-1,0,8,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x10,0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch89 = {7,9,0,0,8,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0x82,0x82,0x44,0x28,0x10,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch88 = {7,9,0,0,8,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x44,0xaa,0x92,0x92,0x92,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch87 = {7,9,0,0,8,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x10,0x28,0x28,0x28,0x44,0x44,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch86 = {7,9,0,0,8,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch85 = {6,9,-1,0,8,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe, -}; - -static const BitmapCharRec ch84 = {7,9,0,0,8,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x78,0x84,0x4,0x4,0x78,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch83 = {6,9,-1,0,8,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0x84,0x88,0x90,0xa0,0xf8,0x84,0x84,0x84,0xf8, -}; - -static const BitmapCharRec ch82 = {6,9,-1,0,8,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x4,0x78,0x94,0xa4,0x84,0x84,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch81 = {6,10,-1,1,8,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0x80,0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8, -}; - -static const BitmapCharRec ch80 = {6,9,-1,0,8,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch79 = {6,9,-1,0,8,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0x84,0x84,0x84,0x8c,0x94,0xa4,0xc4,0x84,0x84, -}; - -static const BitmapCharRec ch78 = {6,9,-1,0,8,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0x82,0x82,0x82,0x92,0x92,0xaa,0xc6,0x82,0x82, -}; - -static const BitmapCharRec ch77 = {7,9,0,0,8,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xfc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch76 = {6,9,-1,0,8,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0x84,0x88,0x90,0xa0,0xc0,0xa0,0x90,0x88,0x84, -}; - -static const BitmapCharRec ch75 = {6,9,-1,0,8,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x70,0x88,0x8,0x8,0x8,0x8,0x8,0x8,0x3c, -}; - -static const BitmapCharRec ch74 = {6,9,-1,0,8,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8, -}; - -static const BitmapCharRec ch73 = {5,9,-1,0,8,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0x84,0x84,0x84,0x84,0xfc,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch72 = {6,9,-1,0,8,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x74,0x8c,0x84,0x9c,0x80,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch71 = {6,9,-1,0,8,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0x80,0x80,0x80,0x80,0xf0,0x80,0x80,0x80,0xfc, -}; - -static const BitmapCharRec ch70 = {6,9,-1,0,8,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xfc,0x80,0x80,0x80,0xf0,0x80,0x80,0x80,0xfc, -}; - -static const BitmapCharRec ch69 = {6,9,-1,0,8,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xfc,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch68 = {7,9,0,0,8,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x78,0x84,0x80,0x80,0x80,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch67 = {6,9,-1,0,8,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xfc,0x42,0x42,0x42,0x7c,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch66 = {7,9,0,0,8,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0x84,0x84,0x84,0xfc,0x84,0x84,0x84,0x48,0x30, -}; - -static const BitmapCharRec ch65 = {6,9,-1,0,8,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x78,0x80,0x94,0xac,0xa4,0x9c,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch64 = {6,9,-1,0,8,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x10,0x0,0x10,0x10,0x8,0x4,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch63 = {6,9,-1,0,8,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0x80,0x40,0x20,0x10,0x8,0x10,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch62 = {5,9,-1,0,8,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xfc,0x0,0x0,0xfc, -}; - -static const BitmapCharRec ch61 = {6,4,-1,-2,8,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x8,0x10,0x20,0x40,0x80,0x40,0x20,0x10,0x8, -}; - -static const BitmapCharRec ch60 = {5,9,-2,0,8,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x60,0x70,0x0,0x0,0x20,0x70,0x20, -}; - -static const BitmapCharRec ch59 = {4,8,-1,1,8,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0x40,0xe0,0x40,0x0,0x0,0x40,0xe0,0x40, -}; - -static const BitmapCharRec ch58 = {3,8,-2,1,8,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0x70,0x8,0x4,0x4,0x74,0x8c,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch57 = {6,9,-1,0,8,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x78,0x84,0x84,0x84,0x78,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch56 = {6,9,-1,0,8,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x40,0x40,0x20,0x20,0x10,0x10,0x8,0x4,0xfc, -}; - -static const BitmapCharRec ch55 = {6,9,-1,0,8,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x78,0x84,0x84,0xc4,0xb8,0x80,0x80,0x40,0x38, -}; - -static const BitmapCharRec ch54 = {6,9,-1,0,8,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x78,0x84,0x4,0x4,0xc4,0xb8,0x80,0x80,0xfc, -}; - -static const BitmapCharRec ch53 = {6,9,-1,0,8,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x8,0x8,0xfc,0x88,0x88,0x48,0x28,0x18,0x8, -}; - -static const BitmapCharRec ch52 = {6,9,-1,0,8,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x78,0x84,0x4,0x4,0x38,0x10,0x8,0x4,0xfc, -}; - -static const BitmapCharRec ch51 = {6,9,-1,0,8,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xfc,0x80,0x40,0x30,0x8,0x4,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch50 = {6,9,-1,0,8,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xa0,0x60,0x20, -}; - -static const BitmapCharRec ch49 = {5,9,-1,0,8,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x30,0x48,0x84,0x84,0x84,0x84,0x84,0x48,0x30, -}; - -static const BitmapCharRec ch48 = {6,9,-1,0,8,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0x80,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0x2, -}; - -static const BitmapCharRec ch47 = {7,9,0,0,8,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0x40,0xe0,0x40, -}; - -static const BitmapCharRec ch46 = {3,3,-2,1,8,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xfc, -}; - -static const BitmapCharRec ch45 = {6,1,-1,-4,8,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x60,0x70, -}; - -static const BitmapCharRec ch44 = {4,3,-1,1,8,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch43 = {5,5,-1,-2,8,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0x48,0x30,0xfc,0x30,0x48, -}; - -static const BitmapCharRec ch42 = {6,5,-1,-2,8,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x40,0x20,0x20,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {3,9,-2,0,8,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x20,0x40,0x40,0x80,0x80,0x80,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch40 = {3,9,-3,0,8,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x80,0x60,0x70, -}; - -static const BitmapCharRec ch39 = {4,3,-1,-6,8,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x74,0x88,0x94,0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch38 = {6,7,-1,0,8,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x88,0x54,0x48,0x20,0x10,0x10,0x48,0xa4,0x44, -}; - -static const BitmapCharRec ch37 = {6,9,-1,0,8,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x20,0xf0,0x28,0x70,0xa0,0x78,0x20, -}; - -static const BitmapCharRec ch36 = {5,7,-1,-1,8,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x48,0x48,0xfc,0x48,0xfc,0x48,0x48, -}; - -static const BitmapCharRec ch35 = {6,7,-1,-1,8,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0x90,0x90,0x90, -}; - -static const BitmapCharRec ch34 = {4,3,-2,-6,8,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch33 = {1,9,-3,0,8,ch33data}; - -/* char: 0x1f */ - -static const GLubyte ch31data[] = { -0x80, -}; - -static const BitmapCharRec ch31 = {1,1,-3,-3,8,ch31data}; - -/* char: 0x1e */ - -static const GLubyte ch30data[] = { -0xdc,0x62,0x20,0x20,0x20,0x70,0x20,0x22,0x1c, -}; - -static const BitmapCharRec ch30 = {7,9,0,0,8,ch30data}; - -/* char: 0x1d */ - -static const GLubyte ch29data[] = { -0x80,0x40,0xfe,0x10,0xfe,0x4,0x2, -}; - -static const BitmapCharRec ch29 = {7,7,0,0,8,ch29data}; - -/* char: 0x1c */ - -static const GLubyte ch28data[] = { -0x88,0x48,0x48,0x48,0x48,0xfc, -}; - -static const BitmapCharRec ch28 = {6,6,-1,0,8,ch28data}; - -/* char: 0x1b */ - -static const GLubyte ch27data[] = { -0xfe,0x80,0x20,0x8,0x2,0x8,0x20,0x80, -}; - -static const BitmapCharRec ch27 = {7,8,0,0,8,ch27data}; - -/* char: 0x1a */ - -static const GLubyte ch26data[] = { -0xfe,0x2,0x8,0x20,0x80,0x20,0x8,0x2, -}; - -static const BitmapCharRec ch26 = {7,8,0,0,8,ch26data}; - -/* char: 0x19 */ - -static const GLubyte ch25data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch25 = {1,13,-3,2,8,ch25data}; - -/* char: 0x18 */ - -static const GLubyte ch24data[] = { -0x10,0x10,0x10,0x10,0x10,0xff, -}; - -static const BitmapCharRec ch24 = {8,6,0,2,8,ch24data}; - -/* char: 0x17 */ - -static const GLubyte ch23data[] = { -0xff,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch23 = {8,8,0,-3,8,ch23data}; - -/* char: 0x16 */ - -static const GLubyte ch22data[] = { -0x10,0x10,0x10,0x10,0x10,0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch22 = {4,13,0,2,8,ch22data}; - -/* char: 0x15 */ - -static const GLubyte ch21data[] = { -0x80,0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch21 = {5,13,-3,2,8,ch21data}; - -/* char: 0x14 */ - -static const GLubyte ch20data[] = { -0xff, -}; - -static const BitmapCharRec ch20 = {8,1,0,1,8,ch20data}; - -/* char: 0x13 */ - -static const GLubyte ch19data[] = { -0xff, -}; - -static const BitmapCharRec ch19 = {8,1,0,-1,8,ch19data}; - -/* char: 0x12 */ - -static const GLubyte ch18data[] = { -0xff, -}; - -static const BitmapCharRec ch18 = {8,1,0,-3,8,ch18data}; - -/* char: 0x11 */ - -static const GLubyte ch17data[] = { -0xff, -}; - -static const BitmapCharRec ch17 = {8,1,0,-5,8,ch17data}; - -/* char: 0x10 */ - -static const GLubyte ch16data[] = { -0xff, -}; - -static const BitmapCharRec ch16 = {8,1,0,-7,8,ch16data}; - -/* char: 0xf */ - -static const GLubyte ch15data[] = { -0x10,0x10,0x10,0x10,0x10,0xff,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch15 = {8,13,0,2,8,ch15data}; - -/* char: 0xe */ - -static const GLubyte ch14data[] = { -0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch14 = {5,8,-3,-3,8,ch14data}; - -/* char: 0xd */ - -static const GLubyte ch13data[] = { -0x80,0x80,0x80,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch13 = {5,6,-3,2,8,ch13data}; - -/* char: 0xc */ - -static const GLubyte ch12data[] = { -0x10,0x10,0x10,0x10,0x10,0xf0, -}; - -static const BitmapCharRec ch12 = {4,6,0,2,8,ch12data}; - -/* char: 0xb */ - -static const GLubyte ch11data[] = { -0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch11 = {4,8,0,-3,8,ch11data}; - -/* char: 0xa */ - -static const GLubyte ch10data[] = { -0x8,0x8,0x8,0x8,0x3e,0x20,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch10 = {7,9,0,2,8,ch10data}; - -/* char: 0x9 */ - -static const GLubyte ch9data[] = { -0x3e,0x20,0x20,0x20,0x88,0x98,0xa8,0xc8,0x88, -}; - -static const BitmapCharRec ch9 = {7,9,0,2,8,ch9data}; - -/* char: 0x8 */ - -static const GLubyte ch8data[] = { -0xfe,0x10,0x10,0xfe,0x10,0x10, -}; - -static const BitmapCharRec ch8 = {7,6,0,0,8,ch8data}; - -/* char: 0x7 */ - -static const GLubyte ch7data[] = { -0x70,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch7 = {5,4,-1,-5,8,ch7data}; - -/* char: 0x6 */ - -static const GLubyte ch6data[] = { -0x20,0x20,0x3c,0x20,0x3e,0xf8,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch6 = {7,9,0,2,8,ch6data}; - -/* char: 0x5 */ - -static const GLubyte ch5data[] = { -0x22,0x22,0x3c,0x22,0x3c,0x78,0x80,0x80,0x78, -}; - -static const BitmapCharRec ch5 = {7,9,0,2,8,ch5data}; - -/* char: 0x4 */ - -static const GLubyte ch4data[] = { -0x10,0x10,0x1c,0x10,0x9e,0x80,0xe0,0x80,0xf0, -}; - -static const BitmapCharRec ch4 = {7,9,0,2,8,ch4data}; - -/* char: 0x3 */ - -static const GLubyte ch3data[] = { -0x8,0x8,0x8,0x3e,0x88,0x88,0xf8,0x88,0x88, -}; - -static const BitmapCharRec ch3 = {7,9,0,2,8,ch3data}; - -/* char: 0x2 */ - -static const GLubyte ch2data[] = { -0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa, -}; - -static const BitmapCharRec ch2 = {8,12,0,2,8,ch2data}; - -/* char: 0x1 */ - -static const GLubyte ch1data[] = { -0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10, -}; - -static const BitmapCharRec ch1 = {7,7,0,-1,8,ch1data}; - -static const BitmapCharRec * const chars[] = { -&ch0, -&ch1, -&ch2, -&ch3, -&ch4, -&ch5, -&ch6, -&ch7, -&ch8, -&ch9, -&ch10, -&ch11, -&ch12, -&ch13, -&ch14, -&ch15, -&ch16, -&ch17, -&ch18, -&ch19, -&ch20, -&ch21, -&ch22, -&ch23, -&ch24, -&ch25, -&ch26, -&ch27, -&ch28, -&ch29, -&ch30, -&ch31, -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -&ch127, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -const BitmapFontRec glutBitmap8By13 = { -"-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1", -256, -0, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_9x15.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_9x15.c deleted file mode 100644 index 2d5c004e47..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_9x15.c +++ /dev/null @@ -1,2075 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmap9By15 XXX -#include "glutbitmap.h" -#undef glutBitmap9By15 - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch0data[] = { 0x0 }; -static const BitmapCharRec ch0 = {1,1,0,0,9,ch0data}; -#else -static const BitmapCharRec ch0 = {0,0,0,0,9,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,9,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,9,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch127data[] = { 0x0 }; -static const BitmapCharRec ch127 = {1,1,0,0,9,ch127data}; -#else -static const BitmapCharRec ch127 = {0,0,0,0,9,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,9,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,9,0}; -#endif - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch255 = {6,14,-1,3,9,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0x80,0x80,0x80,0xbc,0xc2,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80, -}; - -static const BitmapCharRec ch254 = {7,12,-1,3,9,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch253 = {6,14,-1,3,9,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch252 = {7,11,-1,0,9,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch251 = {7,11,-1,0,9,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch250 = {7,11,-1,0,9,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch249 = {7,11,-1,0,9,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0x80,0x7c,0xa2,0xa2,0x92,0x8a,0x8a,0x7c,0x2, -}; - -static const BitmapCharRec ch248 = {7,9,-1,1,9,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x10,0x38,0x10,0x0,0xfe,0x0,0x10,0x38,0x10, -}; - -static const BitmapCharRec ch247 = {7,9,-1,0,9,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch246 = {7,11,-1,0,9,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch245 = {7,11,-1,0,9,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch244 = {7,11,-1,0,9,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch243 = {7,11,-1,0,9,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch242 = {7,11,-1,0,9,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0x82,0x82,0x82,0x82,0x82,0xc2,0xbc,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch241 = {7,11,-1,0,9,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x8,0x50,0x30,0x48, -}; - -static const BitmapCharRec ch240 = {7,11,-1,0,9,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x50,0x50, -}; - -static const BitmapCharRec ch239 = {5,11,-2,0,9,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x90,0x60, -}; - -static const BitmapCharRec ch238 = {5,11,-2,0,9,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x60,0x10, -}; - -static const BitmapCharRec ch237 = {5,11,-2,0,9,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x30,0x40, -}; - -static const BitmapCharRec ch236 = {5,11,-2,0,9,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch235 = {7,11,-1,0,9,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch234 = {7,11,-1,0,9,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch233 = {7,11,-1,0,9,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch232 = {7,11,-1,0,9,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x30,0x48,0x18,0x7c,0x82,0x80,0x80,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch231 = {7,10,-1,3,9,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x6e,0x92,0x90,0x7c,0x12,0x92,0x6c, -}; - -static const BitmapCharRec ch230 = {7,7,-1,0,9,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x18,0x24,0x18, -}; - -static const BitmapCharRec ch229 = {7,11,-1,0,9,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch228 = {7,11,-1,0,9,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch227 = {7,11,-1,0,9,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch226 = {7,11,-1,0,9,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch225 = {7,11,-1,0,9,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch224 = {7,11,-1,0,9,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0x80,0xbc,0xc2,0x82,0x82,0xfc,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch223 = {7,9,-1,1,9,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0x80,0x80,0x80,0xfc,0x82,0x82,0x82,0xfc,0x80,0x80, -}; - -static const BitmapCharRec ch222 = {7,10,-1,0,9,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch221 = {7,11,-1,0,9,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch220 = {7,11,-1,0,9,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch219 = {7,11,-1,0,9,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch218 = {7,11,-1,0,9,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch217 = {7,11,-1,0,9,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x80,0x7c,0xc2,0xa2,0xa2,0x92,0x92,0x8a,0x8a,0x86,0x7c,0x2, -}; - -static const BitmapCharRec ch216 = {7,12,-1,1,9,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x82,0x44,0x28,0x10,0x28,0x44,0x82, -}; - -static const BitmapCharRec ch215 = {7,7,-1,-1,9,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch214 = {7,11,-1,0,9,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch213 = {7,11,-1,0,9,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch212 = {7,11,-1,0,9,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch211 = {7,11,-1,0,9,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch210 = {7,11,-1,0,9,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0x82,0x86,0x8a,0x92,0x92,0xa2,0xc2,0x82,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch209 = {7,11,-1,0,9,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0xfc,0x42,0x42,0x42,0x42,0xf2,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch208 = {7,10,-1,0,9,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x50,0x50, -}; - -static const BitmapCharRec ch207 = {5,11,-2,0,9,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x88,0x70, -}; - -static const BitmapCharRec ch206 = {5,11,-2,0,9,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x60,0x10, -}; - -static const BitmapCharRec ch205 = {5,11,-2,0,9,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x30,0x40, -}; - -static const BitmapCharRec ch204 = {5,11,-2,0,9,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch203 = {7,11,-1,0,9,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch202 = {7,11,-1,0,9,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch201 = {7,11,-1,0,9,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch200 = {7,11,-1,0,9,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x30,0x48,0x18,0x7c,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch199 = {7,13,-1,3,9,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0x9e,0x90,0x90,0x90,0xfc,0x90,0x90,0x90,0x90,0x6e, -}; - -static const BitmapCharRec ch198 = {7,10,-1,0,9,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x10,0x28,0x10, -}; - -static const BitmapCharRec ch197 = {7,11,-1,0,9,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch196 = {7,11,-1,0,9,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch195 = {7,11,-1,0,9,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch194 = {7,11,-1,0,9,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch193 = {7,11,-1,0,9,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch192 = {7,11,-1,0,9,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x7c,0x82,0x82,0x80,0x40,0x20,0x10,0x10,0x0,0x10, -}; - -static const BitmapCharRec ch191 = {7,10,-1,0,9,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x6,0x1a,0x12,0xa,0x66,0x92,0x10,0x20,0x90,0x60, -}; - -static const BitmapCharRec ch190 = {7,10,-1,0,9,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x1e,0x10,0xc,0x2,0xf2,0x4c,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch189 = {7,10,-1,0,9,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x6,0x1a,0x12,0xa,0xe6,0x42,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch188 = {7,10,-1,0,9,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0x90,0x48,0x24,0x12,0x12,0x24,0x48,0x90, -}; - -static const BitmapCharRec ch187 = {7,8,-1,-1,9,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xf8,0x0,0x70,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch186 = {5,6,-1,-5,9,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0xe0,0x40,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch185 = {3,6,-1,-4,9,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0x60,0x90,0x30, -}; - -static const BitmapCharRec ch184 = {4,3,-2,3,9,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch183 = {2,2,-4,-4,9,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0xa,0xa,0xa,0xa,0xa,0x7a,0x8a,0x8a,0x8a,0x7e, -}; - -static const BitmapCharRec ch182 = {7,10,-1,0,9,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x80,0x80,0xba,0xc6,0x82,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch181 = {7,9,-1,2,9,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0xc0,0x20, -}; - -static const BitmapCharRec ch180 = {3,2,-3,-9,9,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0x60,0x90,0x10,0x20,0x90,0x60, -}; - -static const BitmapCharRec ch179 = {4,6,-1,-4,9,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xf0,0x80,0x60,0x10,0x90,0x60, -}; - -static const BitmapCharRec ch178 = {4,6,-1,-4,9,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xfe,0x0,0x10,0x10,0x10,0xfe,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch177 = {7,9,-1,-1,9,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch176 = {4,4,-3,-6,9,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xfc, -}; - -static const BitmapCharRec ch175 = {6,1,-1,-9,9,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x3c,0x42,0xa5,0xa9,0xbd,0xa5,0xb9,0x42,0x3c, -}; - -static const BitmapCharRec ch174 = {8,9,0,-1,9,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xfc, -}; - -static const BitmapCharRec ch173 = {6,1,-1,-4,9,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x4,0x4,0x4,0xfc, -}; - -static const BitmapCharRec ch172 = {6,4,-1,-2,9,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x12,0x24,0x48,0x90,0x90,0x48,0x24,0x12, -}; - -static const BitmapCharRec ch171 = {7,8,-1,-1,9,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xf8,0x0,0x78,0x90,0x70,0x90,0x60, -}; - -static const BitmapCharRec ch170 = {5,7,-3,-3,9,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x3c,0x42,0x99,0xa5,0xa1,0xa5,0x99,0x42,0x3c, -}; - -static const BitmapCharRec ch169 = {8,9,0,-1,9,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xa0,0xa0, -}; - -static const BitmapCharRec ch168 = {3,2,-3,-9,9,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x70,0x88,0x8,0x70,0x88,0x88,0x88,0x70,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch167 = {5,11,-2,1,9,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch166 = {1,11,-4,1,9,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x10,0x10,0x10,0x7c,0x10,0x7c,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch165 = {7,10,-1,0,9,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0x82,0x7c,0x44,0x44,0x7c,0x82, -}; - -static const BitmapCharRec ch164 = {7,6,-1,-3,9,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0x5c,0xa2,0x60,0x20,0x20,0xf8,0x20,0x20,0x22,0x1c, -}; - -static const BitmapCharRec ch163 = {7,10,-1,0,9,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x40,0x78,0xa4,0xa0,0x90,0x94,0x78,0x8, -}; - -static const BitmapCharRec ch162 = {6,8,-1,0,9,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x0,0x80,0x80, -}; - -static const BitmapCharRec ch161 = {1,11,-4,0,9,ch161data}; - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x8c,0x92,0x62, -}; - -static const BitmapCharRec ch126 = {7,3,-1,-7,9,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0xe0,0x10,0x10,0x10,0x20,0x18,0x18,0x20,0x10,0x10,0x10,0xe0, -}; - -static const BitmapCharRec ch125 = {5,12,-1,1,9,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch124 = {1,12,-4,1,9,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x38,0x40,0x40,0x40,0x20,0xc0,0xc0,0x20,0x40,0x40,0x40,0x38, -}; - -static const BitmapCharRec ch123 = {5,12,-3,1,9,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xfe,0x40,0x20,0x10,0x8,0x4,0xfe, -}; - -static const BitmapCharRec ch122 = {7,7,-1,0,9,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch121 = {6,10,-1,3,9,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0x82,0x44,0x28,0x10,0x28,0x44,0x82, -}; - -static const BitmapCharRec ch120 = {7,7,-1,0,9,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x44,0xaa,0x92,0x92,0x92,0x82,0x82, -}; - -static const BitmapCharRec ch119 = {7,7,-1,0,9,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x10,0x28,0x28,0x44,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch118 = {7,7,-1,0,9,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x7a,0x84,0x84,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch117 = {7,7,-1,0,9,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x1c,0x22,0x20,0x20,0x20,0x20,0xfc,0x20,0x20, -}; - -static const BitmapCharRec ch116 = {7,9,-1,0,9,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0x7c,0x82,0x2,0x7c,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch115 = {7,7,-1,0,9,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0x40,0x40,0x40,0x40,0x42,0x62,0x9c, -}; - -static const BitmapCharRec ch114 = {7,7,-1,0,9,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x2,0x2,0x2,0x7a,0x86,0x82,0x82,0x82,0x86,0x7a, -}; - -static const BitmapCharRec ch113 = {7,10,-1,3,9,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0x80,0x80,0x80,0xbc,0xc2,0x82,0x82,0x82,0xc2,0xbc, -}; - -static const BitmapCharRec ch112 = {7,10,-1,3,9,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch111 = {7,7,-1,0,9,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0x82,0x82,0x82,0x82,0x82,0xc2,0xbc, -}; - -static const BitmapCharRec ch110 = {7,7,-1,0,9,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0x82,0x92,0x92,0x92,0x92,0x92,0xec, -}; - -static const BitmapCharRec ch109 = {7,7,-1,0,9,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xe0, -}; - -static const BitmapCharRec ch108 = {5,10,-2,0,9,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0x82,0x8c,0xb0,0xc0,0xb0,0x8c,0x82,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch107 = {7,10,-1,0,9,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0x78,0x84,0x84,0x84,0x4,0x4,0x4,0x4,0x4,0x1c,0x0,0x0,0xc, -}; - -static const BitmapCharRec ch106 = {6,13,-1,3,9,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x60, -}; - -static const BitmapCharRec ch105 = {5,10,-2,0,9,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0x82,0x82,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch104 = {7,10,-1,0,9,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x7c,0x82,0x82,0x7c,0x80,0x78,0x84,0x84,0x84,0x7a, -}; - -static const BitmapCharRec ch103 = {7,10,-1,3,9,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x20,0x20,0x20,0x20,0xf8,0x20,0x20,0x22,0x22,0x1c, -}; - -static const BitmapCharRec ch102 = {7,10,-1,0,9,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch101 = {7,7,-1,0,9,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x7a,0x86,0x82,0x82,0x82,0x86,0x7a,0x2,0x2,0x2, -}; - -static const BitmapCharRec ch100 = {7,10,-1,0,9,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x7c,0x82,0x80,0x80,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch99 = {7,7,-1,0,9,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xbc,0xc2,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch98 = {7,10,-1,0,9,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c, -}; - -static const BitmapCharRec ch97 = {7,7,-1,0,9,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0x10,0x20,0x40,0xc0, -}; - -static const BitmapCharRec ch96 = {4,4,-3,-6,9,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xff, -}; - -static const BitmapCharRec ch95 = {8,1,0,1,9,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x82,0x44,0x28,0x10, -}; - -static const BitmapCharRec ch94 = {7,4,-1,-6,9,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xf0, -}; - -static const BitmapCharRec ch93 = {4,12,-2,1,9,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x2,0x4,0x4,0x8,0x10,0x10,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch92 = {7,10,-1,0,9,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xf0, -}; - -static const BitmapCharRec ch91 = {4,12,-3,1,9,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xfe,0x80,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0xfe, -}; - -static const BitmapCharRec ch90 = {7,10,-1,0,9,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x10,0x10,0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch89 = {7,10,-1,0,9,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0x82,0x82,0x44,0x28,0x10,0x10,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch88 = {7,10,-1,0,9,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x44,0xaa,0x92,0x92,0x92,0x92,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch87 = {7,10,-1,0,9,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x10,0x28,0x28,0x28,0x44,0x44,0x44,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch86 = {7,10,-1,0,9,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch85 = {7,10,-1,0,9,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe, -}; - -static const BitmapCharRec ch84 = {7,10,-1,0,9,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x7c,0x82,0x82,0x2,0xc,0x70,0x80,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch83 = {7,10,-1,0,9,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0x82,0x82,0x84,0x88,0x90,0xfc,0x82,0x82,0x82,0xfc, -}; - -static const BitmapCharRec ch82 = {7,10,-1,0,9,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x6,0x8,0x7c,0x92,0xa2,0x82,0x82,0x82,0x82,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch81 = {7,12,-1,2,9,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0x80,0x80,0x80,0x80,0x80,0xfc,0x82,0x82,0x82,0xfc, -}; - -static const BitmapCharRec ch80 = {7,10,-1,0,9,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch79 = {7,10,-1,0,9,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0x82,0x82,0x82,0x86,0x8a,0x92,0xa2,0xc2,0x82,0x82, -}; - -static const BitmapCharRec ch78 = {7,10,-1,0,9,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0x82,0x82,0x82,0x92,0x92,0xaa,0xaa,0xc6,0x82,0x82, -}; - -static const BitmapCharRec ch77 = {7,10,-1,0,9,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xfe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch76 = {7,10,-1,0,9,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0x82,0x84,0x88,0x90,0xa0,0xe0,0x90,0x88,0x84,0x82, -}; - -static const BitmapCharRec ch75 = {7,10,-1,0,9,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x78,0x84,0x4,0x4,0x4,0x4,0x4,0x4,0x4,0x1e, -}; - -static const BitmapCharRec ch74 = {7,10,-1,0,9,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8, -}; - -static const BitmapCharRec ch73 = {5,10,-2,0,9,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0x82,0x82,0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch72 = {7,10,-1,0,9,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x7c,0x82,0x82,0x82,0x8e,0x80,0x80,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch71 = {7,10,-1,0,9,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0x40,0x40,0x40,0x40,0x40,0x78,0x40,0x40,0x40,0xfe, -}; - -static const BitmapCharRec ch70 = {7,10,-1,0,9,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xfe,0x40,0x40,0x40,0x40,0x78,0x40,0x40,0x40,0xfe, -}; - -static const BitmapCharRec ch69 = {7,10,-1,0,9,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xfc,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch68 = {7,10,-1,0,9,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x7c,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch67 = {7,10,-1,0,9,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xfc,0x42,0x42,0x42,0x42,0x7c,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch66 = {7,10,-1,0,9,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x44,0x28,0x10, -}; - -static const BitmapCharRec ch65 = {7,10,-1,0,9,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x7c,0x80,0x80,0x9a,0xa6,0xa2,0x9e,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch64 = {7,10,-1,0,9,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x10,0x0,0x10,0x10,0x8,0x4,0x2,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch63 = {7,10,-1,0,9,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0x80,0x40,0x20,0x10,0x8,0x8,0x10,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch62 = {5,10,-2,0,9,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xfe,0x0,0x0,0xfe, -}; - -static const BitmapCharRec ch61 = {7,4,-1,-2,9,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x8,0x10,0x20,0x40,0x80,0x80,0x40,0x20,0x10,0x8, -}; - -static const BitmapCharRec ch60 = {5,10,-2,0,9,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x40,0x40,0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch59 = {2,10,-4,3,9,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch58 = {2,7,-4,0,9,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0x78,0x4,0x2,0x2,0x7a,0x86,0x82,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch57 = {7,10,-1,0,9,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x38,0x44,0x82,0x82,0x44,0x38,0x44,0x82,0x44,0x38, -}; - -static const BitmapCharRec ch56 = {7,10,-1,0,9,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x40,0x40,0x20,0x20,0x10,0x8,0x4,0x2,0x2,0xfe, -}; - -static const BitmapCharRec ch55 = {7,10,-1,0,9,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x7c,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,0x40,0x3c, -}; - -static const BitmapCharRec ch54 = {7,10,-1,0,9,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x7c,0x82,0x2,0x2,0x2,0xc2,0xbc,0x80,0x80,0xfe, -}; - -static const BitmapCharRec ch53 = {7,10,-1,0,9,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x4,0x4,0x4,0xfe,0x84,0x44,0x24,0x14,0xc,0x4, -}; - -static const BitmapCharRec ch52 = {7,10,-1,0,9,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x7c,0x82,0x2,0x2,0x2,0x1c,0x8,0x4,0x2,0xfe, -}; - -static const BitmapCharRec ch51 = {7,10,-1,0,9,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xfe,0x80,0x40,0x30,0x8,0x4,0x2,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch50 = {7,10,-1,0,9,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0xfe,0x10,0x10,0x10,0x10,0x10,0x90,0x50,0x30,0x10, -}; - -static const BitmapCharRec ch49 = {7,10,-1,0,9,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x38,0x44,0x82,0x82,0x82,0x82,0x82,0x82,0x44,0x38, -}; - -static const BitmapCharRec ch48 = {7,10,-1,0,9,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0x80,0x40,0x40,0x20,0x10,0x10,0x8,0x4,0x4,0x2, -}; - -static const BitmapCharRec ch47 = {7,10,-1,0,9,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch46 = {2,2,-4,0,9,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xfe, -}; - -static const BitmapCharRec ch45 = {7,1,-1,-4,9,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x40,0x40,0xc0,0xc0, -}; - -static const BitmapCharRec ch44 = {2,5,-4,3,9,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x10,0x10,0x10,0xfe,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch43 = {7,7,-1,-1,9,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0x10,0x92,0x54,0x38,0x54,0x92,0x10, -}; - -static const BitmapCharRec ch42 = {7,7,-1,-1,9,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x20,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {3,12,-3,1,9,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch40 = {3,12,-3,1,9,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x80,0x40,0x20,0x30, -}; - -static const BitmapCharRec ch39 = {4,4,-3,-6,9,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x62,0x94,0x88,0x94,0x62,0x60,0x90,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch38 = {7,10,-1,0,9,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x84,0x4a,0x4a,0x24,0x10,0x10,0x48,0xa4,0xa4,0x42, -}; - -static const BitmapCharRec ch37 = {7,10,-1,0,9,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x10,0x7c,0x92,0x12,0x12,0x14,0x38,0x50,0x90,0x92,0x7c,0x10, -}; - -static const BitmapCharRec ch36 = {7,12,-1,1,9,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x48,0x48,0xfc,0x48,0x48,0xfc,0x48,0x48, -}; - -static const BitmapCharRec ch35 = {6,8,-1,-1,9,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0x90,0x90,0x90, -}; - -static const BitmapCharRec ch34 = {4,3,-3,-7,9,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0x80,0x80,0x0,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch33 = {1,11,-4,0,9,ch33data}; - -/* char: 0x1f */ - -static const GLubyte ch31data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch31 = {2,2,-4,-2,9,ch31data}; - -/* char: 0x1e */ - -static const GLubyte ch30data[] = { -0x5c,0xa2,0x60,0x20,0x20,0xf8,0x20,0x20,0x22,0x1c, -}; - -static const BitmapCharRec ch30 = {7,10,-1,0,9,ch30data}; - -/* char: 0x1d */ - -static const GLubyte ch29data[] = { -0x80,0x40,0xfe,0x10,0xfe,0x4,0x2, -}; - -static const BitmapCharRec ch29 = {7,7,-1,0,9,ch29data}; - -/* char: 0x1c */ - -static const GLubyte ch28data[] = { -0x44,0x24,0x24,0x24,0x24,0x24,0xfe, -}; - -static const BitmapCharRec ch28 = {7,7,-1,0,9,ch28data}; - -/* char: 0x1b */ - -static const GLubyte ch27data[] = { -0xfe,0x0,0x80,0x40,0x20,0x10,0x8,0x8,0x10,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch27 = {7,12,-1,2,9,ch27data}; - -/* char: 0x1a */ - -static const GLubyte ch26data[] = { -0xfc,0x0,0x4,0x8,0x10,0x20,0x40,0x40,0x20,0x10,0x8,0x4, -}; - -static const BitmapCharRec ch26 = {6,12,-2,2,9,ch26data}; - -/* char: 0x19 */ - -static const GLubyte ch25data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch25 = {1,15,-4,3,9,ch25data}; - -/* char: 0x18 */ - -static const GLubyte ch24data[] = { -0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xff,0x80, -}; - -static const BitmapCharRec ch24 = {9,7,0,3,9,ch24data}; - -/* char: 0x17 */ - -static const GLubyte ch23data[] = { -0xff,0x80,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, -0x8,0x0, -}; - -static const BitmapCharRec ch23 = {9,9,0,-3,9,ch23data}; - -/* char: 0x16 */ - -static const GLubyte ch22data[] = { -0x8,0x8,0x8,0x8,0x8,0x8,0xf8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8, -}; - -static const BitmapCharRec ch22 = {5,15,0,3,9,ch22data}; - -/* char: 0x15 */ - -static const GLubyte ch21data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch21 = {5,15,-4,3,9,ch21data}; - -/* char: 0x14 */ - -static const GLubyte ch20data[] = { -0xff,0x80, -}; - -static const BitmapCharRec ch20 = {9,1,0,1,9,ch20data}; - -/* char: 0x13 */ - -static const GLubyte ch19data[] = { -0xff,0x80, -}; - -static const BitmapCharRec ch19 = {9,1,0,-1,9,ch19data}; - -/* char: 0x12 */ - -static const GLubyte ch18data[] = { -0xff,0x80, -}; - -static const BitmapCharRec ch18 = {9,1,0,-3,9,ch18data}; - -/* char: 0x11 */ - -static const GLubyte ch17data[] = { -0xff,0x80, -}; - -static const BitmapCharRec ch17 = {9,1,0,-5,9,ch17data}; - -/* char: 0x10 */ - -static const GLubyte ch16data[] = { -0xff,0x80, -}; - -static const BitmapCharRec ch16 = {9,1,0,-7,9,ch16data}; - -/* char: 0xf */ - -static const GLubyte ch15data[] = { -0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xff,0x80,0x8,0x0, -0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, -}; - -static const BitmapCharRec ch15 = {9,15,0,3,9,ch15data}; - -/* char: 0xe */ - -static const GLubyte ch14data[] = { -0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch14 = {5,9,-4,-3,9,ch14data}; - -/* char: 0xd */ - -static const GLubyte ch13data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch13 = {5,7,-4,3,9,ch13data}; - -/* char: 0xc */ - -static const GLubyte ch12data[] = { -0x8,0x8,0x8,0x8,0x8,0x8,0xf8, -}; - -static const BitmapCharRec ch12 = {5,7,0,3,9,ch12data}; - -/* char: 0xb */ - -static const GLubyte ch11data[] = { -0xf8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8, -}; - -static const BitmapCharRec ch11 = {5,9,0,-3,9,ch11data}; - -/* char: 0xa */ - -static const GLubyte ch10data[] = { -0x8,0x8,0x8,0x8,0x3e,0x0,0x20,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch10 = {7,10,-1,2,9,ch10data}; - -/* char: 0x9 */ - -static const GLubyte ch9data[] = { -0x3e,0x20,0x20,0x20,0x20,0x88,0x98,0xa8,0xc8,0x88, -}; - -static const BitmapCharRec ch9 = {7,10,-1,2,9,ch9data}; - -/* char: 0x8 */ - -static const GLubyte ch8data[] = { -0xfe,0x10,0x10,0xfe,0x10,0x10, -}; - -static const BitmapCharRec ch8 = {7,6,-1,0,9,ch8data}; - -/* char: 0x7 */ - -static const GLubyte ch7data[] = { -0x70,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch7 = {5,4,-2,-6,9,ch7data}; - -/* char: 0x6 */ - -static const GLubyte ch6data[] = { -0x20,0x20,0x3c,0x20,0x3e,0x0,0xf8,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch6 = {7,10,-1,2,9,ch6data}; - -/* char: 0x5 */ - -static const GLubyte ch5data[] = { -0x22,0x22,0x3c,0x22,0x3c,0x0,0x78,0x80,0x80,0x78, -}; - -static const BitmapCharRec ch5 = {7,10,-1,2,9,ch5data}; - -/* char: 0x4 */ - -static const GLubyte ch4data[] = { -0x10,0x10,0x1c,0x10,0x1e,0x80,0x80,0xe0,0x80,0xf0, -}; - -static const BitmapCharRec ch4 = {7,10,-1,2,9,ch4data}; - -/* char: 0x3 */ - -static const GLubyte ch3data[] = { -0x8,0x8,0x8,0x3e,0x0,0x88,0x88,0xf8,0x88,0x88, -}; - -static const BitmapCharRec ch3 = {7,10,-1,2,9,ch3data}; - -/* char: 0x2 */ - -static const GLubyte ch2data[] = { -0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa, -}; - -static const BitmapCharRec ch2 = {8,14,0,3,9,ch2data}; - -/* char: 0x1 */ - -static const GLubyte ch1data[] = { -0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10, -}; - -static const BitmapCharRec ch1 = {7,7,-1,0,9,ch1data}; - -static const BitmapCharRec * const chars[] = { -&ch0, -&ch1, -&ch2, -&ch3, -&ch4, -&ch5, -&ch6, -&ch7, -&ch8, -&ch9, -&ch10, -&ch11, -&ch12, -&ch13, -&ch14, -&ch15, -&ch16, -&ch17, -&ch18, -&ch19, -&ch20, -&ch21, -&ch22, -&ch23, -&ch24, -&ch25, -&ch26, -&ch27, -&ch28, -&ch29, -&ch30, -&ch31, -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -&ch127, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -const BitmapFontRec glutBitmap9By15 = { -"-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1", -256, -0, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_bitmap.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_bitmap.c deleted file mode 100644 index f1afdd7a04..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_bitmap.c +++ /dev/null @@ -1,57 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" -#include "glutbitmap.h" - -void APIENTRY -glutBitmapCharacter(GLUTbitmapFont font, int c) -{ - const BitmapCharRec *ch; - BitmapFontPtr fontinfo; - GLint swapbytes, lsbfirst, rowlength; - GLint skiprows, skippixels, alignment; - -#if defined(_WIN32) - fontinfo = (BitmapFontPtr) __glutFont(font); -#else - fontinfo = (BitmapFontPtr) font; -#endif - - if (c < fontinfo->first || - c >= fontinfo->first + fontinfo->num_chars) - return; - ch = fontinfo->ch[c - fontinfo->first]; - if (ch) { - /* Save current modes. */ - glGetIntegerv(GL_UNPACK_SWAP_BYTES, &swapbytes); - glGetIntegerv(GL_UNPACK_LSB_FIRST, &lsbfirst); - glGetIntegerv(GL_UNPACK_ROW_LENGTH, &rowlength); - glGetIntegerv(GL_UNPACK_SKIP_ROWS, &skiprows); - glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &skippixels); - glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment); - /* Little endian machines (DEC Alpha for example) could - benefit from setting GL_UNPACK_LSB_FIRST to GL_TRUE - instead of GL_FALSE, but this would require changing the - generated bitmaps too. */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); - glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE); - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glBitmap(ch->width, ch->height, ch->xorig, ch->yorig, - ch->advance, 0, ch->bitmap); - /* Restore saved modes. */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, swapbytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, lsbfirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, rowlength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, skiprows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, skippixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, alignment); - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_bwidth.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_bwidth.c deleted file mode 100644 index bee5e8827e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_bwidth.c +++ /dev/null @@ -1,58 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" -#include "glutbitmap.h" - -/* CENTRY */ -int APIENTRY -glutBitmapWidth(GLUTbitmapFont font, int c) -{ - BitmapFontPtr fontinfo; - const BitmapCharRec *ch; - -#ifdef _WIN32 - fontinfo = (BitmapFontPtr) __glutFont(font); -#else - fontinfo = (BitmapFontPtr) font; -#endif - - if (c < fontinfo->first || c >= fontinfo->first + fontinfo->num_chars) - return 0; - ch = fontinfo->ch[c - fontinfo->first]; - if (ch) - return ch->advance; - else - return 0; -} - -int APIENTRY -glutBitmapLength(GLUTbitmapFont font, const unsigned char *string) -{ - int c, length; - BitmapFontPtr fontinfo; - const BitmapCharRec *ch; - -#ifdef _WIN32 - fontinfo = (BitmapFontPtr) __glutFont(font); -#else - fontinfo = (BitmapFontPtr) font; -#endif - - length = 0; - for (; *string != '\0'; string++) { - c = *string; - if (c >= fontinfo->first && c < fontinfo->first + fontinfo->num_chars) { - ch = fontinfo->ch[c - fontinfo->first]; - if (ch) - length += ch->advance; - } - } - return length; -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_ext.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_ext.c deleted file mode 100644 index 334f31f1a3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_ext.c +++ /dev/null @@ -1,201 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include - -#include "glutint.h" - -/* CENTRY */ -int GLUTAPIENTRY -glutExtensionSupported(const char *extension) -{ - static const GLubyte *extensions = NULL; - const GLubyte *start; - GLubyte *where, *terminator; - - /* Extension names should not have spaces. */ - where = (GLubyte *) strchr(extension, ' '); - if (where || *extension == '\0') - return 0; - - if (!extensions) { - extensions = glGetString(GL_EXTENSIONS); - } - /* It takes a bit of care to be fool-proof about parsing the - OpenGL extensions string. Don't be fooled by sub-strings, - etc. */ - start = extensions; - for (;;) { - /* If your application crashes in the strstr routine below, - you are probably calling glutExtensionSupported without - having a current window. Calling glGetString without - a current OpenGL context has unpredictable results. - Please fix your program. */ - where = (GLubyte *) strstr((const char *) start, extension); - if (!where) - break; - terminator = where + strlen(extension); - if (where == start || *(where - 1) == ' ') { - if (*terminator == ' ' || *terminator == '\0') { - return 1; - } - } - start = terminator; - } - return 0; -} - - -struct name_address_pair { - const char *name; - const GLUTproc address; -}; - -static struct name_address_pair glut_functions[] = { - { "glutInit", (const GLUTproc) glutInit }, - { "glutInitDisplayMode", (const GLUTproc) glutInitDisplayMode }, - { "glutInitDisplayString", (const GLUTproc) glutInitDisplayString }, - { "glutInitWindowPosition", (const GLUTproc) glutInitWindowPosition }, - { "glutInitWindowSize", (const GLUTproc) glutInitWindowSize }, - { "glutMainLoop", (const GLUTproc) glutMainLoop }, - { "glutCreateWindow", (const GLUTproc) glutCreateWindow }, - { "glutCreateSubWindow", (const GLUTproc) glutCreateSubWindow }, - { "glutDestroyWindow", (const GLUTproc) glutDestroyWindow }, - { "glutPostRedisplay", (const GLUTproc) glutPostRedisplay }, - { "glutPostWindowRedisplay", (const GLUTproc) glutPostWindowRedisplay }, - { "glutSwapBuffers", (const GLUTproc) glutSwapBuffers }, - { "glutGetWindow", (const GLUTproc) glutGetWindow }, - { "glutSetWindow", (const GLUTproc) glutSetWindow }, - { "glutSetWindowTitle", (const GLUTproc) glutSetWindowTitle }, - { "glutSetIconTitle", (const GLUTproc) glutSetIconTitle }, - { "glutPositionWindow", (const GLUTproc) glutPositionWindow }, - { "glutReshapeWindow", (const GLUTproc) glutReshapeWindow }, - { "glutPopWindow", (const GLUTproc) glutPopWindow }, - { "glutPushWindow", (const GLUTproc) glutPushWindow }, - { "glutIconifyWindow", (const GLUTproc) glutIconifyWindow }, - { "glutShowWindow", (const GLUTproc) glutShowWindow }, - { "glutHideWindow", (const GLUTproc) glutHideWindow }, - { "glutFullScreen", (const GLUTproc) glutFullScreen }, - { "glutSetCursor", (const GLUTproc) glutSetCursor }, - { "glutWarpPointer", (const GLUTproc) glutWarpPointer }, - { "glutEstablishOverlay", (const GLUTproc) glutEstablishOverlay }, - { "glutRemoveOverlay", (const GLUTproc) glutRemoveOverlay }, - { "glutUseLayer", (const GLUTproc) glutUseLayer }, - { "glutPostOverlayRedisplay", (const GLUTproc) glutPostOverlayRedisplay }, - { "glutPostWindowOverlayRedisplay", (const GLUTproc) glutPostWindowOverlayRedisplay }, - { "glutShowOverlay", (const GLUTproc) glutShowOverlay }, - { "glutHideOverlay", (const GLUTproc) glutHideOverlay }, - { "glutCreateMenu", (const GLUTproc) glutCreateMenu }, - { "glutDestroyMenu", (const GLUTproc) glutDestroyMenu }, - { "glutGetMenu", (const GLUTproc) glutGetMenu }, - { "glutSetMenu", (const GLUTproc) glutSetMenu }, - { "glutAddMenuEntry", (const GLUTproc) glutAddMenuEntry }, - { "glutAddSubMenu", (const GLUTproc) glutAddSubMenu }, - { "glutChangeToMenuEntry", (const GLUTproc) glutChangeToMenuEntry }, - { "glutChangeToSubMenu", (const GLUTproc) glutChangeToSubMenu }, - { "glutRemoveMenuItem", (const GLUTproc) glutRemoveMenuItem }, - { "glutAttachMenu", (const GLUTproc) glutAttachMenu }, - { "glutDetachMenu", (const GLUTproc) glutDetachMenu }, - { "glutDisplayFunc", (const GLUTproc) glutDisplayFunc }, - { "glutReshapeFunc", (const GLUTproc) glutReshapeFunc }, - { "glutKeyboardFunc", (const GLUTproc) glutKeyboardFunc }, - { "glutMouseFunc", (const GLUTproc) glutMouseFunc }, - { "glutMotionFunc", (const GLUTproc) glutMotionFunc }, - { "glutPassiveMotionFunc", (const GLUTproc) glutPassiveMotionFunc }, - { "glutEntryFunc", (const GLUTproc) glutEntryFunc }, - { "glutVisibilityFunc", (const GLUTproc) glutVisibilityFunc }, - { "glutIdleFunc", (const GLUTproc) glutIdleFunc }, - { "glutTimerFunc", (const GLUTproc) glutTimerFunc }, - { "glutMenuStateFunc", (const GLUTproc) glutMenuStateFunc }, - { "glutSpecialFunc", (const GLUTproc) glutSpecialFunc }, - { "glutSpaceballMotionFunc", (const GLUTproc) glutSpaceballMotionFunc }, - { "glutSpaceballRotateFunc", (const GLUTproc) glutSpaceballRotateFunc }, - { "glutSpaceballButtonFunc", (const GLUTproc) glutSpaceballButtonFunc }, - { "glutButtonBoxFunc", (const GLUTproc) glutButtonBoxFunc }, - { "glutDialsFunc", (const GLUTproc) glutDialsFunc }, - { "glutTabletMotionFunc", (const GLUTproc) glutTabletMotionFunc }, - { "glutTabletButtonFunc", (const GLUTproc) glutTabletButtonFunc }, - { "glutMenuStatusFunc", (const GLUTproc) glutMenuStatusFunc }, - { "glutOverlayDisplayFunc", (const GLUTproc) glutOverlayDisplayFunc }, - { "glutWindowStatusFunc", (const GLUTproc) glutWindowStatusFunc }, -// { "glutKeyboardUpFunc", (const GLUTproc) glutKeyboardUpFunc }, -// { "glutSpecialUpFunc", (const GLUTproc) glutSpecialUpFunc }, -// { "glutJoystickFunc", (const GLUTproc) glutJoystickFunc }, - { "glutSetColor", (const GLUTproc) glutSetColor }, - { "glutGetColor", (const GLUTproc) glutGetColor }, - { "glutCopyColormap", (const GLUTproc) glutCopyColormap }, - { "glutGet", (const GLUTproc) glutGet }, - { "glutDeviceGet", (const GLUTproc) glutDeviceGet }, - { "glutExtensionSupported", (const GLUTproc) glutExtensionSupported }, - { "glutGetModifiers", (const GLUTproc) glutGetModifiers }, - { "glutLayerGet", (const GLUTproc) glutLayerGet }, - { "glutGetProcAddress", (const GLUTproc) glutGetProcAddress }, - { "glutBitmapCharacter", (const GLUTproc) glutBitmapCharacter }, - { "glutBitmapWidth", (const GLUTproc) glutBitmapWidth }, - { "glutStrokeCharacter", (const GLUTproc) glutStrokeCharacter }, - { "glutStrokeWidth", (const GLUTproc) glutStrokeWidth }, - { "glutBitmapLength", (const GLUTproc) glutBitmapLength }, - { "glutStrokeLength", (const GLUTproc) glutStrokeLength }, - { "glutWireSphere", (const GLUTproc) glutWireSphere }, - { "glutSolidSphere", (const GLUTproc) glutSolidSphere }, - { "glutWireCone", (const GLUTproc) glutWireCone }, - { "glutSolidCone", (const GLUTproc) glutSolidCone }, - { "glutWireCube", (const GLUTproc) glutWireCube }, - { "glutSolidCube", (const GLUTproc) glutSolidCube }, - { "glutWireTorus", (const GLUTproc) glutWireTorus }, - { "glutSolidTorus", (const GLUTproc) glutSolidTorus }, - { "glutWireDodecahedron", (const GLUTproc) glutWireDodecahedron }, - { "glutSolidDodecahedron", (const GLUTproc) glutSolidDodecahedron }, - { "glutWireTeapot", (const GLUTproc) glutWireTeapot }, - { "glutSolidTeapot", (const GLUTproc) glutSolidTeapot }, - { "glutWireOctahedron", (const GLUTproc) glutWireOctahedron }, - { "glutSolidOctahedron", (const GLUTproc) glutSolidOctahedron }, - { "glutWireTetrahedron", (const GLUTproc) glutWireTetrahedron }, - { "glutSolidTetrahedron", (const GLUTproc) glutSolidTetrahedron }, - { "glutWireIcosahedron", (const GLUTproc) glutWireIcosahedron }, - { "glutSolidIcosahedron", (const GLUTproc) glutSolidIcosahedron }, - { "glutVideoResizeGet", (const GLUTproc) glutVideoResizeGet }, - { "glutSetupVideoResizing", (const GLUTproc) glutSetupVideoResizing }, - { "glutStopVideoResizing", (const GLUTproc) glutStopVideoResizing }, - { "glutVideoResize", (const GLUTproc) glutVideoResize }, - { "glutVideoPan", (const GLUTproc) glutVideoPan }, - { "glutReportErrors", (const GLUTproc) glutReportErrors }, -// { "glutIgnoreKeyRepeat", (const GLUTproc) glutIgnoreKeyRepeat }, -// { "glutSetKeyRepeat", (const GLUTproc) glutSetKeyRepeat }, -// { "glutForceJoystickFunc", (const GLUTproc) glutForceJoystickFunc }, -// { "glutGameModeString", (const GLUTproc) glutGameModeString }, -// { "glutEnterGameMode", (const GLUTproc) glutEnterGameMode }, -// { "glutLeaveGameMode", (const GLUTproc) glutLeaveGameMode }, -// { "glutGameModeGet", (const GLUTproc) glutGameModeGet }, - { NULL, NULL } -}; - - -/* XXX This isn't an official GLUT function, yet */ -GLUTproc GLUTAPIENTRY -glutGetProcAddress(const char *procName) -{ - /* Try GLUT functions first */ - int i; - for (i = 0; glut_functions[i].name; i++) { - if (strcmp(glut_functions[i].name, procName) == 0) - return glut_functions[i].address; - } - - /* Try core GL functions */ -#if defined(_WIN32) - return (GLUTProc) wglGetProcAddress((LPCSTR) procName); -#elif defined(GLX_ARB_get_proc_address) - return (GLUTProc) glXGetProcAddressARB((const GLubyte *) procName); -#else - return NULL; -#endif -} - - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_hel10.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_hel10.c deleted file mode 100644 index 703cef38f2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_hel10.c +++ /dev/null @@ -1,1778 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmapHelvetica10 XXX -#include "glutbitmap.h" -#undef glutBitmapHelvetica10 - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90,0x0,0x50, -}; - -static const BitmapCharRec ch255 = {4,10,0,2,5,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0x80,0x80,0xb0,0xc8,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch254 = {5,10,0,2,6,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch253 = {4,11,0,2,5,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x50, -}; - -static const BitmapCharRec ch252 = {4,8,0,0,5,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch251 = {4,9,0,0,5,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch250 = {4,9,0,0,5,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch249 = {4,9,0,0,5,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0x70,0x88,0xc8,0xa8,0x98,0x74, -}; - -static const BitmapCharRec ch248 = {6,6,0,0,6,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x20,0x0,0xf8,0x0,0x20, -}; - -static const BitmapCharRec ch247 = {5,5,0,-1,6,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50, -}; - -static const BitmapCharRec ch246 = {5,8,0,0,6,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch245 = {5,9,0,0,6,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch244 = {5,9,0,0,6,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch243 = {5,9,0,0,6,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch242 = {5,9,0,0,6,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0x90,0x90,0x90,0x90,0x90,0xe0,0x0,0xa0,0x50, -}; - -static const BitmapCharRec ch241 = {4,9,0,0,5,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x70,0x88,0x88,0x88,0x88,0x78,0x90,0x60,0x50, -}; - -static const BitmapCharRec ch240 = {5,9,0,0,6,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0, -}; - -static const BitmapCharRec ch239 = {3,8,0,0,2,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch238 = {3,9,1,0,2,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40, -}; - -static const BitmapCharRec ch237 = {2,9,0,0,2,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch236 = {2,9,1,0,2,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x50, -}; - -static const BitmapCharRec ch235 = {4,8,0,0,5,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch234 = {4,9,0,0,5,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch233 = {4,9,0,0,5,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch232 = {4,9,0,0,5,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x60,0x20,0x60,0x90,0x80,0x80,0x90,0x60, -}; - -static const BitmapCharRec ch231 = {4,8,0,2,5,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x6c,0x92,0x90,0x7e,0x12,0xec, -}; - -static const BitmapCharRec ch230 = {7,6,0,0,8,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x20,0x50,0x20, -}; - -static const BitmapCharRec ch229 = {5,9,0,0,5,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x50, -}; - -static const BitmapCharRec ch228 = {5,8,0,0,5,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0xa0,0x50, -}; - -static const BitmapCharRec ch227 = {5,9,0,0,5,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch226 = {5,9,0,0,5,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch225 = {5,9,0,0,5,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch224 = {5,9,0,0,5,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0xa0,0x90,0x90,0x90,0xa0,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch223 = {4,8,0,0,5,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0x80,0x80,0xf0,0x88,0x88,0xf0,0x80,0x80, -}; - -static const BitmapCharRec ch222 = {5,8,-1,0,7,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x10,0x10,0x10,0x28,0x28,0x44,0x44,0x82,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch221 = {7,11,0,0,7,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48, -}; - -static const BitmapCharRec ch220 = {6,10,-1,0,8,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch219 = {6,11,-1,0,8,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch218 = {6,11,-1,0,8,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch217 = {6,11,-1,0,8,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x80,0x78,0xc4,0xa4,0xa4,0x94,0x94,0x8c,0x78,0x4, -}; - -static const BitmapCharRec ch216 = {6,10,-1,1,8,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x88,0x50,0x20,0x50,0x88, -}; - -static const BitmapCharRec ch215 = {5,5,0,-1,6,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x48, -}; - -static const BitmapCharRec ch214 = {6,10,-1,0,8,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch213 = {6,11,-1,0,8,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch212 = {6,11,-1,0,8,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch211 = {6,11,-1,0,8,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch210 = {6,11,-1,0,8,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0x8c,0x8c,0x94,0x94,0xa4,0xa4,0xc4,0xc4,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch209 = {6,11,-1,0,8,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0x78,0x44,0x42,0x42,0xf2,0x42,0x44,0x78, -}; - -static const BitmapCharRec ch208 = {7,8,0,0,8,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0, -}; - -static const BitmapCharRec ch207 = {3,10,0,0,3,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch206 = {3,11,0,0,3,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40, -}; - -static const BitmapCharRec ch205 = {2,11,-1,0,3,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch204 = {2,11,0,0,3,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x50, -}; - -static const BitmapCharRec ch203 = {5,10,-1,0,7,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xf8,0x80,0x80,0xf8,0x80,0x80,0x80,0xf8,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch202 = {5,11,-1,0,7,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch201 = {5,11,-1,0,7,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch200 = {5,11,-1,0,7,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x30,0x10,0x78,0x84,0x80,0x80,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch199 = {6,10,-1,2,8,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0x8f,0x80,0x88,0x0,0x78,0x0,0x48,0x0,0x2f,0x80,0x28,0x0,0x18,0x0,0x1f,0x80, -}; - -static const BitmapCharRec ch198 = {9,8,0,0,10,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x10,0x28,0x10, -}; - -static const BitmapCharRec ch197 = {7,11,0,0,7,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28, -}; - -static const BitmapCharRec ch196 = {7,10,0,0,7,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch195 = {7,11,0,0,7,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch194 = {7,11,0,0,7,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch193 = {7,11,0,0,7,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch192 = {7,11,0,0,7,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x60,0x90,0x80,0x40,0x20,0x20,0x0,0x20, -}; - -static const BitmapCharRec ch191 = {4,8,-1,2,6,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x21,0x0,0x17,0x80,0x13,0x0,0x9,0x0,0xc8,0x0,0x24,0x0,0x44,0x0,0xe2,0x0, -}; - -static const BitmapCharRec ch190 = {9,8,0,0,9,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x27,0x12,0x15,0xb,0x48,0x44,0xc4,0x42, -}; - -static const BitmapCharRec ch189 = {8,8,0,0,9,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x21,0x0,0x17,0x80,0x13,0x0,0x9,0x0,0x48,0x0,0x44,0x0,0xc4,0x0,0x42,0x0, -}; - -static const BitmapCharRec ch188 = {9,8,0,0,9,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0xa0,0x50,0x28,0x50,0xa0, -}; - -static const BitmapCharRec ch187 = {5,5,0,0,6,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xe0,0x0,0xe0,0xa0,0xe0, -}; - -static const BitmapCharRec ch186 = {3,5,0,-3,4,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch185 = {2,4,0,-3,3,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0xc0,0x40, -}; - -static const BitmapCharRec ch184 = {2,2,0,2,3,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0xc0, -}; - -static const BitmapCharRec ch183 = {2,1,0,-3,3,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x28,0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x7c, -}; - -static const BitmapCharRec ch182 = {6,10,0,2,6,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x80,0x80,0xf0,0x90,0x90,0x90,0x90,0x90, -}; - -static const BitmapCharRec ch181 = {4,8,0,2,5,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0x80,0x40, -}; - -static const BitmapCharRec ch180 = {2,2,0,-6,3,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0xc0,0x20,0x40,0xe0, -}; - -static const BitmapCharRec ch179 = {3,4,0,-3,3,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xe0,0x40,0xa0,0x60, -}; - -static const BitmapCharRec ch178 = {3,4,0,-3,3,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xf8,0x0,0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch177 = {5,7,0,0,6,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch176 = {4,4,0,-3,4,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xe0, -}; - -static const BitmapCharRec ch175 = {3,1,0,-7,3,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x38,0x44,0xaa,0xb2,0xba,0x44,0x38, -}; - -static const BitmapCharRec ch174 = {7,7,-1,0,9,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xe0, -}; - -static const BitmapCharRec ch173 = {3,1,0,-3,4,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x8,0x8,0xf8, -}; - -static const BitmapCharRec ch172 = {5,3,-1,-2,7,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x28,0x50,0xa0,0x50,0x28, -}; - -static const BitmapCharRec ch171 = {5,5,0,0,6,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xe0,0x0,0xa0,0x20,0xe0, -}; - -static const BitmapCharRec ch170 = {3,5,0,-3,4,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x38,0x44,0x9a,0xa2,0x9a,0x44,0x38, -}; - -static const BitmapCharRec ch169 = {7,7,-1,0,9,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xa0, -}; - -static const BitmapCharRec ch168 = {3,1,0,-7,3,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x70,0x88,0x18,0x70,0xc8,0x98,0x70,0xc0,0x88,0x70, -}; - -static const BitmapCharRec ch167 = {5,10,0,2,6,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0x80,0x80,0x80,0x80,0x0,0x0,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch166 = {1,10,-1,2,3,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x20,0xf8,0x20,0xf8,0x50,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch165 = {5,8,0,0,6,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0x90,0x60,0x90,0x90,0x60,0x90, -}; - -static const BitmapCharRec ch164 = {4,6,0,-1,5,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xb0,0x48,0x40,0x40,0xe0,0x40,0x48,0x30, -}; - -static const BitmapCharRec ch163 = {5,8,0,0,6,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x40,0x70,0xa8,0xa0,0xa0,0xa8,0x70,0x10, -}; - -static const BitmapCharRec ch162 = {5,8,0,1,6,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch161 = {1,8,-1,2,3,ch161data}; - -/* char: 0xa0 */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,3,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,3,0}; -#endif - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x98,0x64, -}; - -static const BitmapCharRec ch126 = {6,2,0,-3,7,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0x80,0x40,0x40,0x40,0x40,0x20,0x40,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch125 = {3,10,0,2,3,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch124 = {1,10,-1,2,3,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x20,0x40,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch123 = {3,10,0,2,3,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xf0,0x80,0x40,0x20,0x10,0xf0, -}; - -static const BitmapCharRec ch122 = {4,6,0,0,5,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90, -}; - -static const BitmapCharRec ch121 = {4,8,0,2,5,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0x88,0x88,0x50,0x20,0x50,0x88, -}; - -static const BitmapCharRec ch120 = {5,6,0,0,6,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x28,0x28,0x54,0x54,0x92,0x92, -}; - -static const BitmapCharRec ch119 = {7,6,0,0,8,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x20,0x20,0x50,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch118 = {5,6,0,0,6,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x70,0x90,0x90,0x90,0x90,0x90, -}; - -static const BitmapCharRec ch117 = {4,6,0,0,5,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x60,0x40,0x40,0x40,0x40,0xe0,0x40,0x40, -}; - -static const BitmapCharRec ch116 = {3,8,0,0,4,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0x60,0x90,0x10,0x60,0x90,0x60, -}; - -static const BitmapCharRec ch115 = {4,6,0,0,5,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0x80,0x80,0x80,0x80,0xc0,0xa0, -}; - -static const BitmapCharRec ch114 = {3,6,0,0,4,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x8,0x8,0x68,0x98,0x88,0x88,0x98,0x68, -}; - -static const BitmapCharRec ch113 = {5,8,0,2,6,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0x80,0x80,0xb0,0xc8,0x88,0x88,0xc8,0xb0, -}; - -static const BitmapCharRec ch112 = {5,8,0,2,6,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x70,0x88,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch111 = {5,6,0,0,6,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0x88,0x88,0x88,0x88,0xc8,0xb0, -}; - -static const BitmapCharRec ch110 = {5,6,0,0,6,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0x92,0x92,0x92,0x92,0x92,0xec, -}; - -static const BitmapCharRec ch109 = {7,6,0,0,8,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch108 = {1,8,0,0,2,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0x90,0x90,0xa0,0xc0,0xa0,0x90,0x80,0x80, -}; - -static const BitmapCharRec ch107 = {4,8,0,0,5,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch106 = {1,9,0,1,2,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch105 = {1,8,0,0,2,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0x88,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch104 = {5,8,0,0,6,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x70,0x8,0x68,0x98,0x88,0x88,0x98,0x68, -}; - -static const BitmapCharRec ch103 = {5,8,0,2,6,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x30, -}; - -static const BitmapCharRec ch102 = {4,8,0,0,4,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x60,0x90,0x80,0xf0,0x90,0x60, -}; - -static const BitmapCharRec ch101 = {4,6,0,0,5,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x68,0x98,0x88,0x88,0x98,0x68,0x8,0x8, -}; - -static const BitmapCharRec ch100 = {5,8,0,0,6,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x60,0x90,0x80,0x80,0x90,0x60, -}; - -static const BitmapCharRec ch99 = {4,6,0,0,5,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xb0,0xc8,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch98 = {5,8,0,0,6,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0, -}; - -static const BitmapCharRec ch97 = {5,6,0,0,5,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0x80,0x80,0x40, -}; - -static const BitmapCharRec ch96 = {2,3,0,-5,3,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xfc, -}; - -static const BitmapCharRec ch95 = {6,1,0,2,6,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x88,0x50,0x50,0x20,0x20, -}; - -static const BitmapCharRec ch94 = {5,5,0,-3,6,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0, -}; - -static const BitmapCharRec ch93 = {2,10,0,2,3,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x20,0x20,0x40,0x40,0x40,0x40,0x80,0x80, -}; - -static const BitmapCharRec ch92 = {3,8,0,0,3,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0, -}; - -static const BitmapCharRec ch91 = {2,10,-1,2,3,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xf8,0x80,0x40,0x20,0x20,0x10,0x8,0xf8, -}; - -static const BitmapCharRec ch90 = {5,8,-1,0,7,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x10,0x10,0x10,0x28,0x28,0x44,0x44,0x82, -}; - -static const BitmapCharRec ch89 = {7,8,0,0,7,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0x88,0x88,0x50,0x50,0x20,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch88 = {5,8,-1,0,7,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x22,0x0,0x22,0x0,0x22,0x0,0x55,0x0,0x49,0x0,0x49,0x0,0x88,0x80,0x88,0x80, -}; - -static const BitmapCharRec ch87 = {9,8,0,0,9,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x10,0x28,0x28,0x44,0x44,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch86 = {7,8,0,0,7,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch85 = {6,8,-1,0,8,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8, -}; - -static const BitmapCharRec ch84 = {5,8,0,0,5,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x70,0x88,0x88,0x8,0x70,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch83 = {5,8,-1,0,7,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0x88,0x88,0x88,0x88,0xf0,0x88,0x88,0xf0, -}; - -static const BitmapCharRec ch82 = {5,8,-1,0,7,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x2,0x7c,0x8c,0x94,0x84,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch81 = {7,9,-1,1,8,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0x80,0x80,0x80,0x80,0xf0,0x88,0x88,0xf0, -}; - -static const BitmapCharRec ch80 = {5,8,-1,0,7,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch79 = {6,8,-1,0,8,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0x8c,0x8c,0x94,0x94,0xa4,0xa4,0xc4,0xc4, -}; - -static const BitmapCharRec ch78 = {6,8,-1,0,8,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0x92,0x92,0x92,0xaa,0xaa,0xc6,0xc6,0x82, -}; - -static const BitmapCharRec ch77 = {7,8,-1,0,9,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch76 = {4,8,-1,0,6,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0x88,0x88,0x90,0x90,0xe0,0xa0,0x90,0x88, -}; - -static const BitmapCharRec ch75 = {5,8,-1,0,7,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x60,0x90,0x10,0x10,0x10,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch74 = {4,8,0,0,5,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch73 = {1,8,-1,0,3,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0x84,0x84,0x84,0x84,0xfc,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch72 = {6,8,-1,0,8,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x74,0x8c,0x84,0x8c,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch71 = {6,8,-1,0,8,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0x80,0x80,0x80,0x80,0xf0,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch70 = {5,8,-1,0,6,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch69 = {5,8,-1,0,7,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xf0,0x88,0x84,0x84,0x84,0x84,0x88,0xf0, -}; - -static const BitmapCharRec ch68 = {6,8,-1,0,8,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x78,0x84,0x80,0x80,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch67 = {6,8,-1,0,8,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xf0,0x88,0x88,0x88,0xf0,0x88,0x88,0xf0, -}; - -static const BitmapCharRec ch66 = {5,8,-1,0,7,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10, -}; - -static const BitmapCharRec ch65 = {7,8,0,0,7,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x3e,0x0,0x40,0x0,0x9b,0x0,0xa4,0x80,0xa4,0x80,0xa2,0x40,0x92,0x40,0x4d,0x40, -0x20,0x80,0x1f,0x0, -}; - -static const BitmapCharRec ch64 = {10,10,0,2,11,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x40,0x0,0x40,0x40,0x20,0x10,0x90,0x60, -}; - -static const BitmapCharRec ch63 = {4,8,-1,0,6,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0x80,0x40,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch62 = {3,5,-1,-1,6,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xf0,0x0,0xf0, -}; - -static const BitmapCharRec ch61 = {4,3,0,-2,5,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x20,0x40,0x80,0x40,0x20, -}; - -static const BitmapCharRec ch60 = {3,5,-1,-1,6,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x40,0x40,0x0,0x0,0x0,0x0,0x40, -}; - -static const BitmapCharRec ch59 = {2,8,0,2,3,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0x80,0x0,0x0,0x0,0x0,0x80, -}; - -static const BitmapCharRec ch58 = {1,6,-1,0,3,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0x70,0x88,0x8,0x68,0x98,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch57 = {5,8,0,0,6,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x70,0x88,0x88,0x88,0x70,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch56 = {5,8,0,0,6,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x40,0x40,0x20,0x20,0x10,0x10,0x8,0xf8, -}; - -static const BitmapCharRec ch55 = {5,8,0,0,6,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x70,0x88,0x88,0xc8,0xb0,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch54 = {5,8,0,0,6,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x70,0x88,0x8,0x8,0xf0,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch53 = {5,8,0,0,6,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x10,0x10,0xf8,0x90,0x50,0x50,0x30,0x10, -}; - -static const BitmapCharRec ch52 = {5,8,0,0,6,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x70,0x88,0x8,0x8,0x30,0x8,0x88,0x70, -}; - -static const BitmapCharRec ch51 = {5,8,0,0,6,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xf8,0x80,0x40,0x30,0x8,0x8,0x88,0x70, -}; - -static const BitmapCharRec ch50 = {5,8,0,0,6,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch49 = {2,8,-1,0,6,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch48 = {5,8,0,0,6,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0x80,0x80,0x40,0x40,0x40,0x40,0x20,0x20, -}; - -static const BitmapCharRec ch47 = {3,8,0,0,3,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0x80, -}; - -static const BitmapCharRec ch46 = {1,1,-1,0,3,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xf8, -}; - -static const BitmapCharRec ch45 = {5,1,-1,-3,7,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x40,0x40, -}; - -static const BitmapCharRec ch44 = {2,3,0,2,3,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch43 = {5,5,0,-1,6,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0xa0,0x40,0xa0, -}; - -static const BitmapCharRec ch42 = {3,3,0,-5,4,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {3,10,-1,2,4,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch40 = {3,10,0,2,4,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x80,0x40,0x40, -}; - -static const BitmapCharRec ch39 = {2,3,-1,-5,3,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x64,0x98,0x98,0xa4,0x60,0x50,0x50,0x20, -}; - -static const BitmapCharRec ch38 = {6,8,-1,0,8,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x26,0x29,0x16,0x10,0x8,0x68,0x94,0x64, -}; - -static const BitmapCharRec ch37 = {8,8,0,0,9,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x20,0x70,0xa8,0x28,0x70,0xa0,0xa8,0x70,0x20, -}; - -static const BitmapCharRec ch36 = {5,9,0,1,6,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x50,0x50,0xf8,0x28,0x7c,0x28,0x28, -}; - -static const BitmapCharRec ch35 = {6,7,0,0,6,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0xa0,0xa0, -}; - -static const BitmapCharRec ch34 = {3,2,-1,-6,4,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch33 = {1,8,-1,0,3,ch33data}; - -/* char: 0x20 ' ' */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {0,0,0,0,3,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,3,0}; -#endif - -static const BitmapCharRec * const chars[] = { -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -const BitmapFontRec glutBitmapHelvetica10 = { -"-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1", -224, -32, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_hel12.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_hel12.c deleted file mode 100644 index 68aed8a2bd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_hel12.c +++ /dev/null @@ -1,1788 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmapHelvetica12 XXX -#include "glutbitmap.h" -#undef glutBitmapHelvetica12 - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0xc0,0x20,0x20,0x20,0x30,0x50,0x50,0x48,0x88,0x88,0x0,0x50, -}; - -static const BitmapCharRec ch255 = {5,12,-1,3,7,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0x80,0x80,0x80,0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch254 = {5,12,-1,3,7,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x80,0x40,0x20,0x20,0x50,0x50,0x90,0x88,0x88,0x88,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch253 = {5,13,-1,3,7,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x50, -}; - -static const BitmapCharRec ch252 = {5,9,-1,0,7,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch251 = {5,10,-1,0,7,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch250 = {5,10,-1,0,7,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch249 = {5,10,-1,0,7,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0xb8,0x44,0x64,0x54,0x4c,0x44,0x3a, -}; - -static const BitmapCharRec ch248 = {7,7,0,0,7,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x20,0x0,0xf8,0x0,0x20, -}; - -static const BitmapCharRec ch247 = {5,5,-1,-1,7,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50, -}; - -static const BitmapCharRec ch246 = {5,9,-1,0,7,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch245 = {5,10,-1,0,7,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch244 = {5,10,-1,0,7,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch243 = {5,10,-1,0,7,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch242 = {5,10,-1,0,7,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0x88,0x88,0x88,0x88,0x88,0xc8,0xb0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch241 = {5,10,-1,0,7,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x70,0x88,0x88,0x88,0x88,0x78,0x8,0x50,0x30,0x68, -}; - -static const BitmapCharRec ch240 = {5,10,-1,0,7,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0, -}; - -static const BitmapCharRec ch239 = {3,9,0,0,3,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch238 = {3,10,0,0,3,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40, -}; - -static const BitmapCharRec ch237 = {2,10,-1,0,3,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch236 = {2,10,0,0,3,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x50, -}; - -static const BitmapCharRec ch235 = {5,9,-1,0,7,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch234 = {5,10,-1,0,7,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch233 = {5,10,-1,0,7,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch232 = {5,10,-1,0,7,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x60,0x10,0x20,0x70,0x88,0x80,0x80,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch231 = {5,10,-1,3,7,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x77,0x0,0x88,0x80,0x88,0x0,0x7f,0x80,0x8,0x80,0x88,0x80,0x77,0x0, -}; - -static const BitmapCharRec ch230 = {9,7,-1,0,11,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x30,0x48,0x30, -}; - -static const BitmapCharRec ch229 = {6,10,-1,0,7,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50, -}; - -static const BitmapCharRec ch228 = {6,9,-1,0,7,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch227 = {6,10,-1,0,7,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch226 = {6,10,-1,0,7,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch225 = {6,10,-1,0,7,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch224 = {6,10,-1,0,7,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0xb0,0x88,0x88,0x88,0xb0,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch223 = {5,9,-1,0,7,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0x80,0x80,0xf8,0x84,0x84,0x84,0xf8,0x80,0x80, -}; - -static const BitmapCharRec ch222 = {6,9,-1,0,8,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x10,0x10,0x10,0x10,0x28,0x44,0x44,0x82,0x82,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch221 = {7,12,-1,0,9,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48, -}; - -static const BitmapCharRec ch220 = {6,11,-1,0,8,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch219 = {6,12,-1,0,8,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch218 = {6,12,-1,0,8,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch217 = {6,12,-1,0,8,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x80,0x0,0x5e,0x0,0x21,0x0,0x50,0x80,0x48,0x80,0x44,0x80,0x44,0x80,0x42,0x80, -0x21,0x0,0x1e,0x80,0x0,0x40, -}; - -static const BitmapCharRec ch216 = {10,11,0,1,10,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x88,0x50,0x20,0x50,0x88, -}; - -static const BitmapCharRec ch215 = {5,5,-1,-1,7,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x24, -}; - -static const BitmapCharRec ch214 = {8,11,-1,0,10,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch213 = {8,12,-1,0,10,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x14,0x8, -}; - -static const BitmapCharRec ch212 = {8,12,-1,0,10,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x8,0x4, -}; - -static const BitmapCharRec ch211 = {8,12,-1,0,10,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x8,0x10, -}; - -static const BitmapCharRec ch210 = {8,12,-1,0,10,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0x82,0x86,0x8a,0x8a,0x92,0xa2,0xa2,0xc2,0x82,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch209 = {7,12,-1,0,9,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0x7c,0x42,0x41,0x41,0xf1,0x41,0x41,0x42,0x7c, -}; - -static const BitmapCharRec ch208 = {8,9,0,0,9,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0, -}; - -static const BitmapCharRec ch207 = {3,11,0,0,3,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch206 = {3,12,0,0,3,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40, -}; - -static const BitmapCharRec ch205 = {2,12,-1,0,3,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch204 = {2,12,0,0,3,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x28, -}; - -static const BitmapCharRec ch203 = {6,11,-1,0,8,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch202 = {6,12,-1,0,8,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch201 = {6,12,-1,0,8,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch200 = {6,12,-1,0,8,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x30,0x8,0x8,0x3c,0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x3c, -}; - -static const BitmapCharRec ch199 = {7,12,-1,3,9,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0x8f,0x80,0x88,0x0,0x88,0x0,0x78,0x0,0x4f,0x80,0x48,0x0,0x28,0x0,0x28,0x0, -0x1f,0x80, -}; - -static const BitmapCharRec ch198 = {9,9,-1,0,11,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x10,0x28,0x10, -}; - -static const BitmapCharRec ch197 = {7,12,-1,0,9,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28, -}; - -static const BitmapCharRec ch196 = {7,11,-1,0,9,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch195 = {7,12,-1,0,9,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch194 = {7,12,-1,0,9,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch193 = {7,12,-1,0,9,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch192 = {7,12,-1,0,9,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x70,0x88,0x88,0x40,0x40,0x20,0x20,0x0,0x20, -}; - -static const BitmapCharRec ch191 = {5,9,-1,3,7,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x21,0x0,0x17,0x80,0x15,0x0,0xb,0x0,0xc9,0x0,0x24,0x0,0x44,0x0,0x22,0x0, -0xe1,0x0, -}; - -static const BitmapCharRec ch190 = {9,9,0,0,10,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x47,0x80,0x22,0x0,0x11,0x0,0x14,0x80,0x4b,0x0,0x48,0x0,0x44,0x0,0xc2,0x0, -0x41,0x0, -}; - -static const BitmapCharRec ch189 = {9,9,0,0,10,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x41,0x0,0x27,0x80,0x15,0x0,0x13,0x0,0x49,0x0,0x44,0x0,0x44,0x0,0xc2,0x0, -0x41,0x0, -}; - -static const BitmapCharRec ch188 = {9,9,0,0,10,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0xa0,0x50,0x28,0x50,0xa0, -}; - -static const BitmapCharRec ch187 = {5,5,-1,-1,7,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xe0,0x0,0xe0,0xa0,0xe0, -}; - -static const BitmapCharRec ch186 = {3,5,-1,-4,5,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0x40,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch185 = {2,5,-1,-3,4,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0xc0,0x20,0x20,0x40, -}; - -static const BitmapCharRec ch184 = {3,4,0,3,3,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0x80, -}; - -static const BitmapCharRec ch183 = {1,1,-1,-3,3,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x28,0x28,0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x68,0x3c, -}; - -static const BitmapCharRec ch182 = {6,12,0,3,7,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x80,0x80,0x80,0xe8,0x98,0x88,0x88,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch181 = {5,10,-1,3,7,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0x80,0x40, -}; - -static const BitmapCharRec ch180 = {2,2,0,-8,2,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0xc0,0x20,0x40,0x20,0xe0, -}; - -static const BitmapCharRec ch179 = {3,5,0,-3,4,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xf0,0x40,0x20,0x90,0x60, -}; - -static const BitmapCharRec ch178 = {4,5,0,-3,4,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xf8,0x0,0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch177 = {5,7,-1,0,7,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch176 = {4,4,0,-4,5,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xf0, -}; - -static const BitmapCharRec ch175 = {4,1,0,-8,4,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x3e,0x0,0x41,0x0,0x94,0x80,0x94,0x80,0x98,0x80,0x94,0x80,0x9c,0x80,0x41,0x0, -0x3e,0x0, -}; - -static const BitmapCharRec ch174 = {9,9,-1,0,11,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xf0, -}; - -static const BitmapCharRec ch173 = {4,1,0,-3,5,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x4,0x4,0x4,0xfc, -}; - -static const BitmapCharRec ch172 = {6,4,-1,-2,8,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x28,0x50,0xa0,0x50,0x28, -}; - -static const BitmapCharRec ch171 = {5,5,-1,-1,7,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xe0,0x0,0xa0,0x20,0xe0, -}; - -static const BitmapCharRec ch170 = {3,5,-1,-4,5,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x3e,0x0,0x41,0x0,0x9c,0x80,0xa2,0x80,0xa0,0x80,0xa2,0x80,0x9c,0x80,0x41,0x0, -0x3e,0x0, -}; - -static const BitmapCharRec ch169 = {9,9,-1,0,11,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xa0, -}; - -static const BitmapCharRec ch168 = {3,1,0,-8,3,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x70,0x88,0x8,0x30,0x48,0x88,0x88,0x90,0x60,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch167 = {5,12,0,3,6,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0x80,0x80,0x80,0x80,0x0,0x0,0x0,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch166 = {1,11,-1,2,3,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x20,0x20,0xf8,0x20,0xf8,0x20,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch165 = {5,9,-1,0,7,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0x84,0x78,0x48,0x48,0x78,0x84, -}; - -static const BitmapCharRec ch164 = {6,6,0,-1,7,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xb0,0x48,0x20,0x20,0xf0,0x40,0x40,0x48,0x30, -}; - -static const BitmapCharRec ch163 = {5,9,-1,0,7,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x40,0x70,0xc8,0xa0,0xa0,0xa0,0xa8,0x70,0x10, -}; - -static const BitmapCharRec ch162 = {5,9,-1,1,7,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch161 = {1,10,-1,3,3,ch161data}; - -/* char: 0xa0 */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,4,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,4,0}; -#endif - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x98,0x64, -}; - -static const BitmapCharRec ch126 = {6,2,0,-3,7,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0xc0,0x20,0x20,0x20,0x20,0x20,0x10,0x20,0x20,0x20,0x20,0xc0, -}; - -static const BitmapCharRec ch125 = {4,12,0,3,4,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch124 = {1,12,-1,3,3,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x30,0x40,0x40,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x40,0x30, -}; - -static const BitmapCharRec ch123 = {4,12,0,3,4,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xf0,0x80,0x40,0x40,0x20,0x10,0xf0, -}; - -static const BitmapCharRec ch122 = {4,7,-1,0,6,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x80,0x40,0x20,0x20,0x50,0x50,0x90,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch121 = {5,10,-1,3,7,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0x84,0x84,0x48,0x30,0x30,0x48,0x84, -}; - -static const BitmapCharRec ch120 = {6,7,0,0,6,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x22,0x0,0x22,0x0,0x55,0x0,0x49,0x0,0x49,0x0,0x88,0x80,0x88,0x80, -}; - -static const BitmapCharRec ch119 = {9,7,0,0,9,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x20,0x20,0x50,0x50,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch118 = {5,7,-1,0,7,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x68,0x98,0x88,0x88,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch117 = {5,7,-1,0,7,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x60,0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x40, -}; - -static const BitmapCharRec ch116 = {3,9,0,0,3,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0x60,0x90,0x10,0x60,0x80,0x90,0x60, -}; - -static const BitmapCharRec ch115 = {4,7,-1,0,6,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0x80,0x80,0x80,0x80,0x80,0xc0,0xa0, -}; - -static const BitmapCharRec ch114 = {3,7,-1,0,4,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x8,0x8,0x8,0x68,0x98,0x88,0x88,0x88,0x98,0x68, -}; - -static const BitmapCharRec ch113 = {5,10,-1,3,7,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0x80,0x80,0x80,0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0, -}; - -static const BitmapCharRec ch112 = {5,10,-1,3,7,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch111 = {5,7,-1,0,7,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0x88,0x88,0x88,0x88,0x88,0xc8,0xb0, -}; - -static const BitmapCharRec ch110 = {5,7,-1,0,7,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0x92,0x92,0x92,0x92,0x92,0xda,0xa4, -}; - -static const BitmapCharRec ch109 = {7,7,-1,0,9,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch108 = {1,9,-1,0,3,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0x88,0x90,0xa0,0xc0,0xc0,0xa0,0x90,0x80,0x80, -}; - -static const BitmapCharRec ch107 = {5,9,-1,0,6,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0x80,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40, -}; - -static const BitmapCharRec ch106 = {2,12,0,3,3,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch105 = {1,9,-1,0,3,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0x88,0x88,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch104 = {5,9,-1,0,7,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x70,0x88,0x8,0x68,0x98,0x88,0x88,0x88,0x98,0x68, -}; - -static const BitmapCharRec ch103 = {5,10,-1,3,7,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x30, -}; - -static const BitmapCharRec ch102 = {4,9,0,0,3,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x70,0x88,0x80,0xf8,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch101 = {5,7,-1,0,7,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x68,0x98,0x88,0x88,0x88,0x98,0x68,0x8,0x8, -}; - -static const BitmapCharRec ch100 = {5,9,-1,0,7,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x70,0x88,0x80,0x80,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch99 = {5,7,-1,0,7,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch98 = {5,9,-1,0,7,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70, -}; - -static const BitmapCharRec ch97 = {6,7,-1,0,7,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0xc0,0x80,0x40, -}; - -static const BitmapCharRec ch96 = {2,3,0,-6,3,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xfe, -}; - -static const BitmapCharRec ch95 = {7,1,0,2,7,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x88,0x50,0x20, -}; - -static const BitmapCharRec ch94 = {5,3,0,-5,6,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0, -}; - -static const BitmapCharRec ch93 = {2,12,0,3,3,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x10,0x10,0x20,0x20,0x20,0x40,0x40,0x80,0x80, -}; - -static const BitmapCharRec ch92 = {4,9,0,0,4,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0, -}; - -static const BitmapCharRec ch91 = {2,12,-1,3,3,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xfe,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0xfe, -}; - -static const BitmapCharRec ch90 = {7,9,-1,0,9,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x10,0x10,0x10,0x10,0x28,0x44,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch89 = {7,9,-1,0,9,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0x82,0x44,0x44,0x28,0x10,0x28,0x44,0x44,0x82, -}; - -static const BitmapCharRec ch88 = {7,9,-1,0,9,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x22,0x0,0x22,0x0,0x22,0x0,0x55,0x0,0x55,0x0,0x49,0x0,0x88,0x80,0x88,0x80, -0x88,0x80, -}; - -static const BitmapCharRec ch87 = {9,9,-1,0,11,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x10,0x10,0x28,0x28,0x44,0x44,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch86 = {7,9,-1,0,9,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch85 = {6,9,-1,0,8,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe, -}; - -static const BitmapCharRec ch84 = {7,9,0,0,7,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x78,0x84,0x84,0x4,0x18,0x60,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch83 = {6,9,-1,0,8,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0x84,0x84,0x84,0x88,0xf8,0x84,0x84,0x84,0xf8, -}; - -static const BitmapCharRec ch82 = {6,9,-1,0,8,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x3d,0x42,0x85,0x89,0x81,0x81,0x81,0x42,0x3c, -}; - -static const BitmapCharRec ch81 = {8,9,-1,0,10,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0x80,0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8, -}; - -static const BitmapCharRec ch80 = {6,9,-1,0,8,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c, -}; - -static const BitmapCharRec ch79 = {8,9,-1,0,10,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0x82,0x86,0x8a,0x8a,0x92,0xa2,0xa2,0xc2,0x82, -}; - -static const BitmapCharRec ch78 = {7,9,-1,0,9,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0x88,0x80,0x88,0x80,0x94,0x80,0x94,0x80,0xa2,0x80,0xa2,0x80,0xc1,0x80,0xc1,0x80, -0x80,0x80, -}; - -static const BitmapCharRec ch77 = {9,9,-1,0,11,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch76 = {5,9,-1,0,7,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0x82,0x84,0x88,0x90,0xe0,0xa0,0x90,0x88,0x84, -}; - -static const BitmapCharRec ch75 = {7,9,-1,0,8,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x70,0x88,0x88,0x8,0x8,0x8,0x8,0x8,0x8, -}; - -static const BitmapCharRec ch74 = {5,9,-1,0,7,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch73 = {1,9,-1,0,3,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0x82,0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch72 = {7,9,-1,0,9,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x3a,0x46,0x82,0x82,0x8e,0x80,0x80,0x42,0x3c, -}; - -static const BitmapCharRec ch71 = {7,9,-1,0,9,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0xfc, -}; - -static const BitmapCharRec ch70 = {6,9,-1,0,8,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc, -}; - -static const BitmapCharRec ch69 = {6,9,-1,0,8,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xf8,0x84,0x82,0x82,0x82,0x82,0x82,0x84,0xf8, -}; - -static const BitmapCharRec ch68 = {7,9,-1,0,9,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x3c,0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x3c, -}; - -static const BitmapCharRec ch67 = {7,9,-1,0,9,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xf8,0x84,0x84,0x84,0xf8,0x84,0x84,0x84,0xf8, -}; - -static const BitmapCharRec ch66 = {6,9,-1,0,8,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x28,0x10, -}; - -static const BitmapCharRec ch65 = {7,9,-1,0,9,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x3e,0x0,0x40,0x0,0x9b,0x0,0xa6,0x80,0xa2,0x40,0xa2,0x40,0x92,0x40,0x4d,0x40, -0x60,0x80,0x1f,0x0, -}; - -static const BitmapCharRec ch64 = {10,10,-1,1,12,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x20,0x0,0x20,0x20,0x10,0x10,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch63 = {5,9,-1,0,7,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0xc0,0x30,0xc,0x30,0xc0, -}; - -static const BitmapCharRec ch62 = {6,5,-1,-1,7,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xf8,0x0,0xf8, -}; - -static const BitmapCharRec ch61 = {5,3,-1,-2,7,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0xc,0x30,0xc0,0x30,0xc, -}; - -static const BitmapCharRec ch60 = {6,5,0,-1,7,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x40,0x40,0x0,0x0,0x0,0x0,0x40, -}; - -static const BitmapCharRec ch59 = {2,8,0,2,3,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0x80,0x0,0x0,0x0,0x0,0x80, -}; - -static const BitmapCharRec ch58 = {1,6,-1,0,3,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0x70,0x88,0x8,0x8,0x78,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch57 = {5,9,-1,0,7,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch56 = {5,9,-1,0,7,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x40,0x40,0x20,0x20,0x20,0x10,0x10,0x8,0xf8, -}; - -static const BitmapCharRec ch55 = {5,9,-1,0,7,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x70,0x88,0x88,0x88,0xc8,0xb0,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch54 = {5,9,-1,0,7,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x70,0x88,0x88,0x8,0x8,0xf0,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch53 = {5,9,-1,0,7,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x8,0x8,0xfc,0x88,0x48,0x28,0x28,0x18,0x8, -}; - -static const BitmapCharRec ch52 = {6,9,0,0,7,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x70,0x88,0x88,0x8,0x8,0x30,0x8,0x88,0x70, -}; - -static const BitmapCharRec ch51 = {5,9,-1,0,7,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xf8,0x80,0x80,0x40,0x20,0x10,0x8,0x88,0x70, -}; - -static const BitmapCharRec ch50 = {5,9,-1,0,7,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xe0,0x20, -}; - -static const BitmapCharRec ch49 = {3,9,-1,0,7,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch48 = {5,9,-1,0,7,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0x80,0x80,0x40,0x40,0x40,0x20,0x20,0x10,0x10, -}; - -static const BitmapCharRec ch47 = {4,9,0,0,4,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0x80, -}; - -static const BitmapCharRec ch46 = {1,1,-1,0,3,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xf8, -}; - -static const BitmapCharRec ch45 = {5,1,-1,-3,8,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x40,0x40, -}; - -static const BitmapCharRec ch44 = {2,3,-1,2,4,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch43 = {5,5,-1,-1,7,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0xa0,0x40,0xa0, -}; - -static const BitmapCharRec ch42 = {3,3,-1,-6,5,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x20,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {3,12,0,3,4,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch40 = {3,12,-1,3,4,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x80,0x40,0xc0, -}; - -static const BitmapCharRec ch39 = {2,3,-1,-6,3,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x72,0x8c,0x84,0x8a,0x50,0x30,0x48,0x48,0x30, -}; - -static const BitmapCharRec ch38 = {7,9,-1,0,9,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x23,0x0,0x14,0x80,0x14,0x80,0x13,0x0,0x8,0x0,0x68,0x0,0x94,0x0,0x94,0x0, -0x62,0x0, -}; - -static const BitmapCharRec ch37 = {9,9,-1,0,11,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x20,0x70,0xa8,0xa8,0x28,0x70,0xa0,0xa8,0x70,0x20, -}; - -static const BitmapCharRec ch36 = {5,10,-1,1,7,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x50,0x50,0x50,0xfc,0x28,0xfc,0x28,0x28, -}; - -static const BitmapCharRec ch35 = {6,8,0,0,7,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0xa0,0xa0,0xa0, -}; - -static const BitmapCharRec ch34 = {3,3,-1,-6,5,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch33 = {1,9,-1,0,3,ch33data}; - -/* char: 0x20 ' ' */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,4,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,4,0}; -#endif - -static const BitmapCharRec * const chars[] = { -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -const BitmapFontRec glutBitmapHelvetica12 = { -"-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1", -224, -32, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_hel18.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_hel18.c deleted file mode 100644 index f0800843e8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_hel18.c +++ /dev/null @@ -1,1897 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmapHelvetica18 XXX -#include "glutbitmap.h" -#undef glutBitmapHelvetica18 - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,0x0,0x66, -0x66, -}; - -static const BitmapCharRec ch255 = {8,17,-1,4,10,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80, -0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0,0xff,0x0,0xde,0x0,0xc0,0x0,0xc0,0x0, -0xc0,0x0,0xc0,0x0, -}; - -static const BitmapCharRec ch254 = {9,18,-1,4,11,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,0x0,0x18, -0xc,0x6, -}; - -static const BitmapCharRec ch253 = {8,18,-1,4,10,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x66,0x66, -}; - -static const BitmapCharRec ch252 = {8,13,-1,0,10,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x66,0x3c,0x18, -}; - -static const BitmapCharRec ch251 = {8,14,-1,0,10,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x18,0xc,0x6, -}; - -static const BitmapCharRec ch250 = {8,14,-1,0,10,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0xc,0x18,0x30, -}; - -static const BitmapCharRec ch249 = {8,14,-1,0,10,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0xce,0x0,0x7f,0x80,0x31,0x80,0x78,0xc0,0x6c,0xc0,0x66,0xc0,0x63,0xc0,0x31,0x80, -0x3f,0xc0,0xe,0x60, -}; - -static const BitmapCharRec ch248 = {11,10,0,0,11,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x18,0x18,0x0,0xff,0xff,0x0,0x18,0x18, -}; - -static const BitmapCharRec ch247 = {8,8,-1,-1,10,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x0,0x0,0x36,0x0,0x36,0x0, -}; - -static const BitmapCharRec ch246 = {9,13,-1,0,11,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x0,0x0,0x26,0x0,0x2d,0x0,0x19,0x0, -}; - -static const BitmapCharRec ch245 = {9,14,-1,0,11,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x0,0x0,0x33,0x0,0x1e,0x0,0xc,0x0, -}; - -static const BitmapCharRec ch244 = {9,14,-1,0,11,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x0,0x0,0x18,0x0,0xc,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch243 = {9,14,-1,0,11,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x0,0x0,0xc,0x0,0x18,0x0,0x30,0x0, -}; - -static const BitmapCharRec ch242 = {9,14,-1,0,11,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce,0x0,0x4c,0x5a,0x32, -}; - -static const BitmapCharRec ch241 = {8,14,-1,0,10,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x4c,0x0,0x38,0x0,0x36,0x0,0x60,0x0, -}; - -static const BitmapCharRec ch240 = {9,14,-1,0,11,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0xd8,0xd8, -}; - -static const BitmapCharRec ch239 = {5,13,0,0,4,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc,0x78,0x30, -}; - -static const BitmapCharRec ch238 = {6,14,1,0,4,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0xc0,0x60,0x30, -}; - -static const BitmapCharRec ch237 = {4,14,0,0,4,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0x30,0x60,0xc0, -}; - -static const BitmapCharRec ch236 = {4,14,0,0,4,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x36,0x36, -}; - -static const BitmapCharRec ch235 = {8,13,-1,0,10,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x66,0x3c,0x18, -}; - -static const BitmapCharRec ch234 = {8,14,-1,0,10,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x18,0xc,0x6, -}; - -static const BitmapCharRec ch233 = {8,14,-1,0,10,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x18,0x30,0x60, -}; - -static const BitmapCharRec ch232 = {8,14,-1,0,10,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x78,0x6c,0xc,0x38,0x3e,0x7f,0x63,0xc0,0xc0,0xc0,0xc0,0x63,0x7f,0x3e, -}; - -static const BitmapCharRec ch231 = {8,14,-1,4,10,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x75,0xe0,0xef,0xf8,0xc7,0x18,0xc6,0x0,0xe6,0x0,0x7f,0xf8,0xe,0x18,0xc6,0x18, -0xef,0xf0,0x7d,0xe0, -}; - -static const BitmapCharRec ch230 = {13,10,-1,0,15,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x38,0x6c,0x6c,0x38, -}; - -static const BitmapCharRec ch229 = {7,14,-1,0,9,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x6c,0x6c, -}; - -static const BitmapCharRec ch228 = {7,13,-1,0,9,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x4c,0x5a,0x32, -}; - -static const BitmapCharRec ch227 = {7,14,-1,0,9,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x66,0x3c,0x18, -}; - -static const BitmapCharRec ch226 = {7,14,-1,0,9,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x30,0x18,0xc, -}; - -static const BitmapCharRec ch225 = {7,14,-1,0,9,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x18,0x30,0x60, -}; - -static const BitmapCharRec ch224 = {7,14,-1,0,9,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0xdc,0xde,0xc6,0xc6,0xc6,0xc6,0xdc,0xdc,0xc6,0xc6,0xc6,0xc6,0x7c,0x38, -}; - -static const BitmapCharRec ch223 = {7,14,-1,0,9,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x80,0xc1,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc1,0xc0,0xff,0x80,0xff,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -}; - -static const BitmapCharRec ch222 = {10,14,-1,0,12,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80, -0x30,0xc0,0x30,0xc0,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30,0x0,0x0,0x6,0x0, -0x3,0x0,0x1,0x80, -}; - -static const BitmapCharRec ch221 = {12,18,-1,0,14,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x19,0x80, -0x19,0x80, -}; - -static const BitmapCharRec ch220 = {11,17,-1,0,13,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x19,0x80, -0xf,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch219 = {11,18,-1,0,13,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0xc,0x0, -0x6,0x0,0x3,0x0, -}; - -static const BitmapCharRec ch218 = {11,18,-1,0,13,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x6,0x0, -0xc,0x0,0x18,0x0, -}; - -static const BitmapCharRec ch217 = {11,18,-1,0,13,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0xc7,0xc0,0xff,0xf0,0x78,0x38,0x38,0x18,0x6c,0x1c,0x6e,0xc,0x67,0xc,0x63,0x8c, -0x61,0xcc,0x70,0xdc,0x30,0x78,0x38,0x38,0x1f,0xfc,0x7,0xcc, -}; - -static const BitmapCharRec ch216 = {14,14,0,0,15,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0xc0,0xc0,0x61,0x80,0x33,0x0,0x1e,0x0,0xc,0x0,0x1e,0x0,0x33,0x0,0x61,0x80, -0xc0,0xc0, -}; - -static const BitmapCharRec ch215 = {10,9,0,0,10,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0xd,0x80, -0xd,0x80, -}; - -static const BitmapCharRec ch214 = {13,17,-1,0,15,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x9,0x80, -0xb,0x40,0x6,0x40, -}; - -static const BitmapCharRec ch213 = {13,18,-1,0,15,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0xc,0xc0, -0x7,0x80,0x3,0x0, -}; - -static const BitmapCharRec ch212 = {13,18,-1,0,15,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x3,0x0, -0x1,0x80,0x0,0xc0, -}; - -static const BitmapCharRec ch211 = {13,18,-1,0,15,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x3,0x0, -0x6,0x0,0xc,0x0, -}; - -static const BitmapCharRec ch210 = {13,18,-1,0,15,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0xc0,0x60,0xc0,0xe0,0xc1,0xe0,0xc1,0xe0,0xc3,0x60,0xc6,0x60,0xc6,0x60,0xcc,0x60, -0xcc,0x60,0xd8,0x60,0xd8,0x60,0xf0,0x60,0xe0,0x60,0xe0,0x60,0x0,0x0,0x13,0x0, -0x16,0x80,0xc,0x80, -}; - -static const BitmapCharRec ch209 = {11,18,-1,0,13,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0x7f,0x80,0x7f,0xc0,0x60,0xe0,0x60,0x60,0x60,0x30,0x60,0x30,0xfc,0x30,0xfc,0x30, -0x60,0x30,0x60,0x30,0x60,0x60,0x60,0xe0,0x7f,0xc0,0x7f,0x80, -}; - -static const BitmapCharRec ch208 = {12,14,0,0,13,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc, -0xcc, -}; - -static const BitmapCharRec ch207 = {6,17,0,0,6,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc, -0x78,0x30, -}; - -static const BitmapCharRec ch206 = {6,18,0,0,6,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0xc0, -0x60,0x30, -}; - -static const BitmapCharRec ch205 = {4,18,-2,0,6,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0x30, -0x60,0xc0, -}; - -static const BitmapCharRec ch204 = {4,18,0,0,6,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0x33,0x0, -0x33,0x0, -}; - -static const BitmapCharRec ch203 = {9,17,-1,0,11,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0x33,0x0, -0x1e,0x0,0xc,0x0, -}; - -static const BitmapCharRec ch202 = {9,18,-1,0,11,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0xc,0x0, -0x6,0x0,0x3,0x0, -}; - -static const BitmapCharRec ch201 = {9,18,-1,0,11,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0xc,0x0, -0x18,0x0,0x30,0x0, -}; - -static const BitmapCharRec ch200 = {9,18,-1,0,11,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x1e,0x0,0x1b,0x0,0x3,0x0,0xe,0x0,0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30, -0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xe0,0x0,0x60,0x30,0x70,0x70, -0x3f,0xe0,0xf,0x80, -}; - -static const BitmapCharRec ch199 = {12,18,-1,4,14,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0xc1,0xff,0xc1,0xff,0x61,0x80,0x61,0x80,0x7f,0x80,0x3f,0x80,0x31,0xfe,0x31,0xfe, -0x19,0x80,0x19,0x80,0xd,0x80,0xd,0x80,0x7,0xff,0x7,0xff, -}; - -static const BitmapCharRec ch198 = {16,14,-1,0,18,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80, -0x19,0x80,0xf,0x0, -}; - -static const BitmapCharRec ch197 = {12,18,0,0,12,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x19,0x80, -0x19,0x80, -}; - -static const BitmapCharRec ch196 = {12,17,0,0,12,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x13,0x0, -0x16,0x80,0xc,0x80, -}; - -static const BitmapCharRec ch195 = {12,18,0,0,12,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x19,0x80, -0xf,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch194 = {12,18,0,0,12,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x6,0x0, -0x3,0x0,0x1,0x80, -}; - -static const BitmapCharRec ch193 = {12,18,0,0,12,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x6,0x0, -0xc,0x0,0x18,0x0, -}; - -static const BitmapCharRec ch192 = {12,18,0,0,12,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x7c,0xfe,0xc6,0xc6,0xe0,0x70,0x38,0x18,0x18,0x18,0x0,0x0,0x18,0x18, -}; - -static const BitmapCharRec ch191 = {7,14,-1,4,10,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x18,0x18,0x18,0x18,0xc,0xfc,0x6,0xd8,0x6,0x78,0x73,0x38,0xf9,0x18,0x99,0x88, -0x30,0xc0,0x30,0xc0,0x98,0x60,0xf8,0x30,0x70,0x30, -}; - -static const BitmapCharRec ch190 = {14,13,0,0,15,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x30,0xf8,0x30,0xf8,0x18,0x60,0xc,0x30,0xc,0x18,0x66,0x98,0x62,0xf8,0x63,0x70, -0x61,0x80,0x61,0x80,0xe0,0xc0,0xe0,0x60,0x60,0x60, -}; - -static const BitmapCharRec ch189 = {13,13,-1,0,15,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x30,0x30,0x30,0x30,0x19,0xf8,0xd,0xb0,0xc,0xf0,0x66,0x70,0x62,0x30,0x63,0x10, -0x61,0x80,0x61,0x80,0xe0,0xc0,0xe0,0x60,0x60,0x60, -}; - -static const BitmapCharRec ch188 = {13,13,-1,0,15,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0x90,0xd8,0x6c,0x36,0x36,0x6c,0xd8,0x90, -}; - -static const BitmapCharRec ch187 = {7,8,-1,-1,9,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xf8,0x0,0x70,0xd8,0x88,0x88,0xd8,0x70, -}; - -static const BitmapCharRec ch186 = {5,8,-1,-6,7,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0x60,0x60,0x60,0x60,0x60,0xe0,0xe0,0x60, -}; - -static const BitmapCharRec ch185 = {3,8,-1,-5,6,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0xf0,0xd8,0x18,0x70,0x60, -}; - -static const BitmapCharRec ch184 = {5,5,0,4,5,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch183 = {2,2,-1,-4,4,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x32,0x72,0xf2,0xf2,0xf2,0xf2, -0x72,0x3f, -}; - -static const BitmapCharRec ch182 = {8,18,-1,4,10,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0xc0,0xc0,0xc0,0xc0,0xdb,0xff,0xe7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3, -}; - -static const BitmapCharRec ch181 = {8,14,-1,4,10,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0xc0,0x60,0x30, -}; - -static const BitmapCharRec ch180 = {4,3,0,-11,4,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0x70,0xf8,0x98,0x30,0x30,0x98,0xf8,0x70, -}; - -static const BitmapCharRec ch179 = {5,8,0,-5,6,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xf8,0xf8,0x60,0x30,0x18,0x98,0xf8,0x70, -}; - -static const BitmapCharRec ch178 = {5,8,0,-5,6,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xff,0xff,0x0,0x18,0x18,0x18,0xff,0xff,0x18,0x18,0x18, -}; - -static const BitmapCharRec ch177 = {8,11,-1,0,10,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x70,0xd8,0x88,0xd8,0x70, -}; - -static const BitmapCharRec ch176 = {5,5,-1,-8,7,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xf8, -}; - -static const BitmapCharRec ch175 = {5,1,0,-12,5,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0xf,0x80,0x30,0x60,0x40,0x10,0x48,0x50,0x88,0x88,0x89,0x8,0x8f,0x88,0x88,0x48, -0x88,0x48,0x4f,0x90,0x40,0x10,0x30,0x60,0xf,0x80, -}; - -static const BitmapCharRec ch174 = {13,13,-1,0,14,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xf8,0xf8, -}; - -static const BitmapCharRec ch173 = {5,2,-1,-4,7,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x1,0x80,0x1,0x80,0x1,0x80,0xff,0x80,0xff,0x80, -}; - -static const BitmapCharRec ch172 = {9,5,-1,-3,11,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x12,0x36,0x6c,0xd8,0xd8,0x6c,0x36,0x12, -}; - -static const BitmapCharRec ch171 = {7,8,-1,-1,9,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xf8,0x0,0x68,0xd8,0x48,0x38,0xc8,0x70, -}; - -static const BitmapCharRec ch170 = {5,8,-1,-6,7,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0xf,0x80,0x30,0x60,0x40,0x10,0x47,0x10,0x88,0x88,0x90,0x8,0x90,0x8,0x90,0x8, -0x88,0x88,0x47,0x10,0x40,0x10,0x30,0x60,0xf,0x80, -}; - -static const BitmapCharRec ch169 = {13,13,-1,0,15,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xd8,0xd8, -}; - -static const BitmapCharRec ch168 = {5,2,0,-11,6,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x3c,0x7e,0xc3,0xc3,0x7,0xe,0x3e,0x73,0xe3,0xc3,0xc7,0x6e,0x7c,0xf0,0xc3,0xc3, -0x7e,0x3c, -}; - -static const BitmapCharRec ch167 = {8,18,-1,4,10,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0, -}; - -static const BitmapCharRec ch166 = {2,17,-1,3,4,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x18,0x18,0x18,0x18,0xff,0x18,0xff,0x3c,0x66,0x66,0x66,0xc3,0xc3, -}; - -static const BitmapCharRec ch165 = {8,13,-1,0,10,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0xc3,0xff,0x66,0x66,0x66,0xff,0xc3, -}; - -static const BitmapCharRec ch164 = {8,7,-1,-3,10,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xdf,0x0,0xff,0x80,0x60,0x80,0x30,0x0,0x18,0x0,0x18,0x0,0x7e,0x0,0x30,0x0, -0x60,0x0,0x61,0x80,0x61,0x80,0x3f,0x0,0x1e,0x0, -}; - -static const BitmapCharRec ch163 = {9,13,0,0,10,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x10,0x10,0x3e,0x7f,0x6b,0xc8,0xc8,0xc8,0xc8,0x6b,0x7f,0x3e,0x4,0x4, -}; - -static const BitmapCharRec ch162 = {8,14,-1,2,10,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x40,0x40,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch161 = {2,14,-2,4,6,ch161data}; - -/* char: 0xa0 */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,5,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,5,0}; -#endif - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0xcc,0x7e,0x33, -}; - -static const BitmapCharRec ch126 = {8,3,-1,-4,10,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0xc0,0x60,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0xc,0x18,0x30,0x30,0x30,0x30,0x30, -0x60,0xc0, -}; - -static const BitmapCharRec ch125 = {6,18,0,4,6,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0, -}; - -static const BitmapCharRec ch124 = {2,18,-1,4,4,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0xc,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x60,0xc0,0x60,0x30,0x30,0x30,0x30,0x30, -0x18,0xc, -}; - -static const BitmapCharRec ch123 = {6,18,0,4,6,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xfe,0xfe,0xc0,0x60,0x30,0x18,0xc,0x6,0xfe,0xfe, -}; - -static const BitmapCharRec ch122 = {7,10,-1,0,9,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3, -}; - -static const BitmapCharRec ch121 = {8,14,-1,4,10,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0xc3,0xe7,0x66,0x3c,0x18,0x18,0x3c,0x66,0xe7,0xc3, -}; - -static const BitmapCharRec ch120 = {8,10,-1,0,10,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x19,0x80,0x19,0x80,0x39,0xc0,0x29,0x40,0x69,0x60,0x66,0x60,0x66,0x60,0xc6,0x30, -0xc6,0x30,0xc6,0x30, -}; - -static const BitmapCharRec ch119 = {12,10,-1,0,14,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3, -}; - -static const BitmapCharRec ch118 = {8,10,-1,0,10,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3, -}; - -static const BitmapCharRec ch117 = {8,10,-1,0,10,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x18,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0xfc,0xfc,0x30,0x30,0x30, -}; - -static const BitmapCharRec ch116 = {6,13,0,0,6,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0x78,0xfc,0xc6,0x6,0x3e,0xfc,0xc0,0xc6,0x7e,0x3c, -}; - -static const BitmapCharRec ch115 = {7,10,-1,0,9,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xe0,0xd8,0xd8, -}; - -static const BitmapCharRec ch114 = {5,10,-1,0,6,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80, -0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x80,0x7f,0x80,0x3d,0x80, -}; - -static const BitmapCharRec ch113 = {9,14,-1,4,11,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80, -0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0,0xff,0x0,0xde,0x0, -}; - -static const BitmapCharRec ch112 = {9,14,-1,4,11,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0, -}; - -static const BitmapCharRec ch111 = {9,10,-1,0,11,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce, -}; - -static const BitmapCharRec ch110 = {8,10,-1,0,10,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xe7,0x30, -0xde,0xf0,0xcc,0x60, -}; - -static const BitmapCharRec ch109 = {12,10,-1,0,14,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch108 = {2,14,-1,0,4,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0xc7,0xc6,0xce,0xcc,0xd8,0xf8,0xf0,0xd8,0xcc,0xc6,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch107 = {8,14,-1,0,9,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0xe0,0xf0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0x0, -0x30,0x30, -}; - -static const BitmapCharRec ch106 = {4,18,1,4,4,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch105 = {2,14,-1,0,4,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch104 = {8,14,-1,0,10,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x1c,0x0,0x7f,0x0,0x63,0x0,0x1,0x80,0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80, -0xc1,0x80,0xc1,0x80,0xc1,0x80,0x61,0x80,0x7f,0x80,0x3d,0x80, -}; - -static const BitmapCharRec ch103 = {9,14,-1,4,11,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfc,0xfc,0x30,0x30,0x3c,0x1c, -}; - -static const BitmapCharRec ch102 = {6,14,0,0,6,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c, -}; - -static const BitmapCharRec ch101 = {8,10,-1,0,10,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x80, -0x7f,0x80,0x3d,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80, -}; - -static const BitmapCharRec ch100 = {9,14,-1,0,11,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x3e,0x7f,0x63,0xc0,0xc0,0xc0,0xc0,0x63,0x7f,0x3e, -}; - -static const BitmapCharRec ch99 = {8,10,-1,0,10,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0, -0xff,0x0,0xde,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -}; - -static const BitmapCharRec ch98 = {9,14,-1,0,11,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c, -}; - -static const BitmapCharRec ch97 = {7,10,-1,0,9,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0xc0,0xc0,0x80,0x80,0x40, -}; - -static const BitmapCharRec ch96 = {2,5,-1,-9,4,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xff,0xc0,0xff,0xc0, -}; - -static const BitmapCharRec ch95 = {10,2,0,4,10,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x82,0xc6,0x6c,0x38,0x10, -}; - -static const BitmapCharRec ch94 = {7,5,-1,-8,9,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xf0,0xf0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0xf0,0xf0, -}; - -static const BitmapCharRec ch93 = {4,18,0,4,5,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x18,0x18,0x10,0x10,0x30,0x30,0x20,0x20,0x60,0x60,0x40,0x40,0xc0,0xc0, -}; - -static const BitmapCharRec ch92 = {5,14,0,0,5,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xf0,0xf0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xf0,0xf0, -}; - -static const BitmapCharRec ch91 = {4,18,-1,4,5,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xff,0xc0,0xff,0xc0,0xc0,0x0,0x60,0x0,0x30,0x0,0x18,0x0,0x1c,0x0,0xc,0x0, -0x6,0x0,0x3,0x0,0x1,0x80,0x0,0xc0,0xff,0xc0,0xff,0xc0, -}; - -static const BitmapCharRec ch90 = {10,14,-1,0,12,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80, -0x30,0xc0,0x30,0xc0,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30, -}; - -static const BitmapCharRec ch89 = {12,14,-1,0,14,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0xc0,0x60,0xe0,0xe0,0x60,0xc0,0x71,0xc0,0x31,0x80,0x1b,0x0,0xe,0x0,0xe,0x0, -0x1b,0x0,0x31,0x80,0x71,0xc0,0x60,0xc0,0xe0,0xe0,0xc0,0x60, -}; - -static const BitmapCharRec ch88 = {11,14,-1,0,13,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x18,0x18,0x18,0x18,0x1c,0x38,0x34,0x2c,0x36,0x6c,0x36,0x6c,0x66,0x66,0x66,0x66, -0x62,0x46,0x63,0xc6,0xc3,0xc3,0xc1,0x83,0xc1,0x83,0xc1,0x83, -}; - -static const BitmapCharRec ch87 = {16,14,-1,0,18,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x6,0x0,0xf,0x0,0xf,0x0,0x19,0x80,0x19,0x80,0x19,0x80,0x30,0xc0,0x30,0xc0, -0x30,0xc0,0x60,0x60,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30, -}; - -static const BitmapCharRec ch86 = {12,14,-1,0,14,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -}; - -static const BitmapCharRec ch85 = {11,14,-1,0,13,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0, -0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xff,0xc0,0xff,0xc0, -}; - -static const BitmapCharRec ch84 = {10,14,-1,0,12,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x3f,0x0,0x7f,0xc0,0xe0,0xe0,0xc0,0x60,0x0,0x60,0x0,0xe0,0x3,0xc0,0x1f,0x0, -0x7c,0x0,0xe0,0x0,0xc0,0x60,0xe0,0xe0,0x7f,0xc0,0x1f,0x0, -}; - -static const BitmapCharRec ch83 = {11,14,-1,0,13,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0x80,0xc1,0x80,0xff,0x0,0xff,0x80, -0xc1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0, -}; - -static const BitmapCharRec ch82 = {10,14,-1,0,12,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x0,0x30,0xf,0xb0,0x3f,0xe0,0x70,0xf0,0x61,0xb0,0xe1,0xb8,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80, -}; - -static const BitmapCharRec ch81 = {13,15,-1,1,15,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x80, -0xc1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0, -}; - -static const BitmapCharRec ch80 = {10,14,-1,0,12,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80, -}; - -static const BitmapCharRec ch79 = {13,14,-1,0,15,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0xc0,0x60,0xc0,0xe0,0xc1,0xe0,0xc1,0xe0,0xc3,0x60,0xc6,0x60,0xc6,0x60,0xcc,0x60, -0xcc,0x60,0xd8,0x60,0xf0,0x60,0xf0,0x60,0xe0,0x60,0xc0,0x60, -}; - -static const BitmapCharRec ch78 = {11,14,-1,0,13,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0xc3,0xc,0xc3,0xc,0xc7,0x8c,0xc4,0x8c,0xcc,0xcc,0xcc,0xcc,0xd8,0x6c,0xd8,0x6c, -0xf0,0x3c,0xf0,0x3c,0xe0,0x1c,0xe0,0x1c,0xc0,0xc,0xc0,0xc, -}; - -static const BitmapCharRec ch77 = {14,14,-1,0,16,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xff,0xff,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch76 = {8,14,-1,0,10,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0xc0,0x70,0xc0,0xe0,0xc1,0xc0,0xc3,0x80,0xc7,0x0,0xce,0x0,0xfc,0x0,0xf8,0x0, -0xdc,0x0,0xce,0x0,0xc7,0x0,0xc3,0x80,0xc1,0xc0,0xc0,0xe0, -}; - -static const BitmapCharRec ch75 = {12,14,-1,0,13,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x3c,0x7e,0xe7,0xc3,0xc3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3, -}; - -static const BitmapCharRec ch74 = {8,14,-1,0,10,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch73 = {2,14,-2,0,6,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xff,0xe0,0xff,0xe0, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -}; - -static const BitmapCharRec ch72 = {11,14,-1,0,13,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0xf,0xb0,0x3f,0xf0,0x70,0x70,0x60,0x30,0xe0,0x30,0xc1,0xf0,0xc1,0xf0,0xc0,0x0, -0xc0,0x0,0xe0,0x30,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80, -}; - -static const BitmapCharRec ch71 = {12,14,-1,0,14,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80, -}; - -static const BitmapCharRec ch70 = {9,14,-1,0,11,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80, -}; - -static const BitmapCharRec ch69 = {9,14,-1,0,11,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xff,0x0,0xff,0x80,0xc1,0xc0,0xc0,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0, -}; - -static const BitmapCharRec ch68 = {11,14,-1,0,13,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -0xc0,0x0,0xe0,0x0,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80, -}; - -static const BitmapCharRec ch67 = {12,14,-1,0,14,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xff,0x80,0xff,0xc0,0xc0,0xe0,0xc0,0x60,0xc0,0x60,0xc0,0xe0,0xff,0xc0,0xff,0x80, -0xc1,0x80,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0, -}; - -static const BitmapCharRec ch66 = {11,14,-1,0,13,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch65 = {12,14,0,0,12,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x7,0xe0,0x1f,0xf0,0x38,0x0,0x70,0x0,0x67,0x70,0xcf,0xf8,0xcc,0xcc,0xcc,0x66, -0xcc,0x66,0xcc,0x63,0xc6,0x33,0x67,0x73,0x63,0xb3,0x30,0x6,0x1c,0xe,0xf,0xfc, -0x3,0xf0, -}; - -static const BitmapCharRec ch64 = {16,17,-1,3,18,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x30,0x30,0x0,0x0,0x30,0x30,0x30,0x38,0x1c,0xe,0xc6,0xc6,0xfe,0x7c, -}; - -static const BitmapCharRec ch63 = {7,14,-1,0,10,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0xc0,0xf0,0x3c,0xe,0x3,0xe,0x3c,0xf0,0xc0, -}; - -static const BitmapCharRec ch62 = {8,9,-1,0,10,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xfe,0xfe,0x0,0x0,0xfe,0xfe, -}; - -static const BitmapCharRec ch61 = {7,6,-2,-2,11,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x3,0xf,0x3c,0x70,0xc0,0x70,0x3c,0xf,0x3, -}; - -static const BitmapCharRec ch60 = {8,9,-1,0,10,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x40,0x40,0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch59 = {2,13,-1,3,5,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch58 = {2,10,-1,0,5,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0x7c,0xfe,0xc6,0x3,0x3,0x3b,0x7f,0xc3,0xc3,0xc3,0xc7,0x7e,0x3c, -}; - -static const BitmapCharRec ch57 = {8,13,-1,0,10,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x3c,0x7e,0xe7,0xc3,0xc3,0x66,0x7e,0x66,0xc3,0xc3,0xe7,0x7e,0x3c, -}; - -static const BitmapCharRec ch56 = {8,13,-1,0,10,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x60,0x60,0x30,0x30,0x30,0x18,0x18,0xc,0xc,0x6,0x3,0xff,0xff, -}; - -static const BitmapCharRec ch55 = {8,13,-1,0,10,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x3c,0x7e,0xe3,0xc3,0xc3,0xc3,0xfe,0xdc,0xc0,0xc0,0x63,0x7f,0x3c, -}; - -static const BitmapCharRec ch54 = {8,13,-1,0,10,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x7c,0xfe,0xc7,0xc3,0x3,0x3,0xc7,0xfe,0xfc,0xc0,0xc0,0xfe,0xfe, -}; - -static const BitmapCharRec ch53 = {8,13,-1,0,10,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x3,0x0,0x3,0x0,0x3,0x0,0xff,0x80,0xff,0x80,0xc3,0x0,0x63,0x0,0x33,0x0, -0x33,0x0,0x1b,0x0,0xf,0x0,0x7,0x0,0x3,0x0, -}; - -static const BitmapCharRec ch52 = {9,13,-1,0,10,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x3c,0x7e,0xc7,0xc3,0x3,0x7,0x1e,0x1c,0x6,0xc3,0xc3,0x7e,0x3c, -}; - -static const BitmapCharRec ch51 = {8,13,-1,0,10,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xff,0xff,0xc0,0xe0,0x70,0x38,0x1c,0xe,0x7,0x3,0xc3,0xfe,0x3c, -}; - -static const BitmapCharRec ch50 = {8,13,-1,0,10,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0xf8,0x18, -}; - -static const BitmapCharRec ch49 = {5,13,-2,0,10,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x3c,0x7e,0x66,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x66,0x7e,0x3c, -}; - -static const BitmapCharRec ch48 = {8,13,-1,0,10,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0xc0,0xc0,0x40,0x40,0x60,0x60,0x20,0x20,0x30,0x30,0x10,0x10,0x18,0x18, -}; - -static const BitmapCharRec ch47 = {5,14,0,0,5,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch46 = {2,2,-1,0,5,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xff,0xff, -}; - -static const BitmapCharRec ch45 = {8,2,-1,-4,11,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x40,0x40,0xc0,0xc0, -}; - -static const BitmapCharRec ch44 = {2,5,-1,3,5,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x18,0x18,0x18,0x18,0xff,0xff,0x18,0x18,0x18,0x18, -}; - -static const BitmapCharRec ch43 = {8,10,-1,0,10,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0x88,0x70,0x70,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch42 = {5,6,-1,-8,7,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0xc0,0x60,0x60,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x60,0x60, -0xc0,0x80, -}; - -static const BitmapCharRec ch41 = {4,18,-1,4,6,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x10,0x30,0x60,0x60,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x60,0x60, -0x30,0x10, -}; - -static const BitmapCharRec ch40 = {4,18,-1,4,6,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x80,0x40,0x40,0xc0,0xc0, -}; - -static const BitmapCharRec ch39 = {2,5,-1,-9,4,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x3c,0x70,0x7e,0xe0,0xe7,0xc0,0xc3,0x80,0xc3,0xc0,0xc6,0xc0,0xee,0xc0,0x7c,0x0, -0x3c,0x0,0x66,0x0,0x66,0x0,0x7e,0x0,0x3c,0x0, -}; - -static const BitmapCharRec ch38 = {12,13,-1,0,13,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x18,0x78,0x18,0xfc,0xc,0xcc,0xc,0xcc,0x6,0xfc,0x6,0x78,0x3,0x0,0x7b,0x0, -0xfd,0x80,0xcd,0x80,0xcc,0xc0,0xfc,0xc0,0x78,0x60, -}; - -static const BitmapCharRec ch37 = {14,13,-1,0,16,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x8,0x0,0x8,0x0,0x3e,0x0,0x7f,0x0,0xeb,0x80,0xc9,0x80,0x9,0x80,0xf,0x0, -0x3e,0x0,0x78,0x0,0xe8,0x0,0xc8,0x0,0xcb,0x0,0x7f,0x0,0x3e,0x0,0x8,0x0, -}; - -static const BitmapCharRec ch36 = {9,16,-1,2,10,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x24,0x0,0x24,0x0,0x24,0x0,0xff,0x80,0xff,0x80,0x12,0x0,0x12,0x0,0x12,0x0, -0x7f,0xc0,0x7f,0xc0,0x9,0x0,0x9,0x0,0x9,0x0, -}; - -static const BitmapCharRec ch35 = {10,13,0,0,10,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0x90,0x90,0xd8,0xd8,0xd8, -}; - -static const BitmapCharRec ch34 = {5,5,0,-9,5,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0xc0,0xc0,0x0,0x0,0x80,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch33 = {2,14,-2,0,6,ch33data}; - -/* char: 0x20 ' ' */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,5,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,5,0}; -#endif - -static const BitmapCharRec * const chars[] = { -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -const BitmapFontRec glutBitmapHelvetica18 = { -"-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1", -224, -32, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_mroman.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_mroman.c deleted file mode 100644 index a29f043b4a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_mroman.c +++ /dev/null @@ -1,2451 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#include "glutstroke.h" - -/* char: 33 '!' */ - -static const CoordRec char33_stroke0[] = { - { 52.381, 100 }, - { 52.381, 33.3333 }, -}; - -static const CoordRec char33_stroke1[] = { - { 52.381, 9.5238 }, - { 47.6191, 4.7619 }, - { 52.381, 0 }, - { 57.1429, 4.7619 }, - { 52.381, 9.5238 }, -}; - -static const StrokeRec char33[] = { - { 2, char33_stroke0 }, - { 5, char33_stroke1 }, -}; - -/* char: 34 '"' */ - -static const CoordRec char34_stroke0[] = { - { 33.3334, 100 }, - { 33.3334, 66.6667 }, -}; - -static const CoordRec char34_stroke1[] = { - { 71.4286, 100 }, - { 71.4286, 66.6667 }, -}; - -static const StrokeRec char34[] = { - { 2, char34_stroke0 }, - { 2, char34_stroke1 }, -}; - -/* char: 35 '#' */ - -static const CoordRec char35_stroke0[] = { - { 54.7619, 119.048 }, - { 21.4286, -33.3333 }, -}; - -static const CoordRec char35_stroke1[] = { - { 83.3334, 119.048 }, - { 50, -33.3333 }, -}; - -static const CoordRec char35_stroke2[] = { - { 21.4286, 57.1429 }, - { 88.0952, 57.1429 }, -}; - -static const CoordRec char35_stroke3[] = { - { 16.6667, 28.5714 }, - { 83.3334, 28.5714 }, -}; - -static const StrokeRec char35[] = { - { 2, char35_stroke0 }, - { 2, char35_stroke1 }, - { 2, char35_stroke2 }, - { 2, char35_stroke3 }, -}; - -/* char: 36 '$' */ - -static const CoordRec char36_stroke0[] = { - { 42.8571, 119.048 }, - { 42.8571, -19.0476 }, -}; - -static const CoordRec char36_stroke1[] = { - { 61.9047, 119.048 }, - { 61.9047, -19.0476 }, -}; - -static const CoordRec char36_stroke2[] = { - { 85.7143, 85.7143 }, - { 76.1905, 95.2381 }, - { 61.9047, 100 }, - { 42.8571, 100 }, - { 28.5714, 95.2381 }, - { 19.0476, 85.7143 }, - { 19.0476, 76.1905 }, - { 23.8095, 66.6667 }, - { 28.5714, 61.9048 }, - { 38.0952, 57.1429 }, - { 66.6666, 47.619 }, - { 76.1905, 42.8571 }, - { 80.9524, 38.0952 }, - { 85.7143, 28.5714 }, - { 85.7143, 14.2857 }, - { 76.1905, 4.7619 }, - { 61.9047, 0 }, - { 42.8571, 0 }, - { 28.5714, 4.7619 }, - { 19.0476, 14.2857 }, -}; - -static const StrokeRec char36[] = { - { 2, char36_stroke0 }, - { 2, char36_stroke1 }, - { 20, char36_stroke2 }, -}; - -/* char: 37 '%' */ - -static const CoordRec char37_stroke0[] = { - { 95.2381, 100 }, - { 9.5238, 0 }, -}; - -static const CoordRec char37_stroke1[] = { - { 33.3333, 100 }, - { 42.8571, 90.4762 }, - { 42.8571, 80.9524 }, - { 38.0952, 71.4286 }, - { 28.5714, 66.6667 }, - { 19.0476, 66.6667 }, - { 9.5238, 76.1905 }, - { 9.5238, 85.7143 }, - { 14.2857, 95.2381 }, - { 23.8095, 100 }, - { 33.3333, 100 }, - { 42.8571, 95.2381 }, - { 57.1428, 90.4762 }, - { 71.4286, 90.4762 }, - { 85.7143, 95.2381 }, - { 95.2381, 100 }, -}; - -static const CoordRec char37_stroke2[] = { - { 76.1905, 33.3333 }, - { 66.6667, 28.5714 }, - { 61.9048, 19.0476 }, - { 61.9048, 9.5238 }, - { 71.4286, 0 }, - { 80.9524, 0 }, - { 90.4762, 4.7619 }, - { 95.2381, 14.2857 }, - { 95.2381, 23.8095 }, - { 85.7143, 33.3333 }, - { 76.1905, 33.3333 }, -}; - -static const StrokeRec char37[] = { - { 2, char37_stroke0 }, - { 16, char37_stroke1 }, - { 11, char37_stroke2 }, -}; - -/* char: 38 '&' */ - -static const CoordRec char38_stroke0[] = { - { 100, 57.1429 }, - { 100, 61.9048 }, - { 95.2381, 66.6667 }, - { 90.4762, 66.6667 }, - { 85.7143, 61.9048 }, - { 80.9524, 52.381 }, - { 71.4286, 28.5714 }, - { 61.9048, 14.2857 }, - { 52.3809, 4.7619 }, - { 42.8571, 0 }, - { 23.8095, 0 }, - { 14.2857, 4.7619 }, - { 9.5238, 9.5238 }, - { 4.7619, 19.0476 }, - { 4.7619, 28.5714 }, - { 9.5238, 38.0952 }, - { 14.2857, 42.8571 }, - { 47.619, 61.9048 }, - { 52.3809, 66.6667 }, - { 57.1429, 76.1905 }, - { 57.1429, 85.7143 }, - { 52.3809, 95.2381 }, - { 42.8571, 100 }, - { 33.3333, 95.2381 }, - { 28.5714, 85.7143 }, - { 28.5714, 76.1905 }, - { 33.3333, 61.9048 }, - { 42.8571, 47.619 }, - { 66.6667, 14.2857 }, - { 76.1905, 4.7619 }, - { 85.7143, 0 }, - { 95.2381, 0 }, - { 100, 4.7619 }, - { 100, 9.5238 }, -}; - -static const StrokeRec char38[] = { - { 34, char38_stroke0 }, -}; - -/* char: 39 ''' */ - -static const CoordRec char39_stroke0[] = { - { 52.381, 100 }, - { 52.381, 66.6667 }, -}; - -static const StrokeRec char39[] = { - { 2, char39_stroke0 }, -}; - -/* char: 40 '(' */ - -static const CoordRec char40_stroke0[] = { - { 69.0476, 119.048 }, - { 59.5238, 109.524 }, - { 50, 95.2381 }, - { 40.4762, 76.1905 }, - { 35.7143, 52.381 }, - { 35.7143, 33.3333 }, - { 40.4762, 9.5238 }, - { 50, -9.5238 }, - { 59.5238, -23.8095 }, - { 69.0476, -33.3333 }, -}; - -static const StrokeRec char40[] = { - { 10, char40_stroke0 }, -}; - -/* char: 41 ')' */ - -static const CoordRec char41_stroke0[] = { - { 35.7143, 119.048 }, - { 45.2381, 109.524 }, - { 54.7619, 95.2381 }, - { 64.2857, 76.1905 }, - { 69.0476, 52.381 }, - { 69.0476, 33.3333 }, - { 64.2857, 9.5238 }, - { 54.7619, -9.5238 }, - { 45.2381, -23.8095 }, - { 35.7143, -33.3333 }, -}; - -static const StrokeRec char41[] = { - { 10, char41_stroke0 }, -}; - -/* char: 42 '*' */ - -static const CoordRec char42_stroke0[] = { - { 52.381, 71.4286 }, - { 52.381, 14.2857 }, -}; - -static const CoordRec char42_stroke1[] = { - { 28.5715, 57.1429 }, - { 76.1905, 28.5714 }, -}; - -static const CoordRec char42_stroke2[] = { - { 76.1905, 57.1429 }, - { 28.5715, 28.5714 }, -}; - -static const StrokeRec char42[] = { - { 2, char42_stroke0 }, - { 2, char42_stroke1 }, - { 2, char42_stroke2 }, -}; - -/* char: 43 '+' */ - -static const CoordRec char43_stroke0[] = { - { 52.3809, 85.7143 }, - { 52.3809, 0 }, -}; - -static const CoordRec char43_stroke1[] = { - { 9.5238, 42.8571 }, - { 95.2381, 42.8571 }, -}; - -static const StrokeRec char43[] = { - { 2, char43_stroke0 }, - { 2, char43_stroke1 }, -}; - -/* char: 44 ',' */ - -static const CoordRec char44_stroke0[] = { - { 57.1429, 4.7619 }, - { 52.381, 0 }, - { 47.6191, 4.7619 }, - { 52.381, 9.5238 }, - { 57.1429, 4.7619 }, - { 57.1429, -4.7619 }, - { 52.381, -14.2857 }, - { 47.6191, -19.0476 }, -}; - -static const StrokeRec char44[] = { - { 8, char44_stroke0 }, -}; - -/* char: 45 '-' */ - -static const CoordRec char45_stroke0[] = { - { 9.5238, 42.8571 }, - { 95.2381, 42.8571 }, -}; - -static const StrokeRec char45[] = { - { 2, char45_stroke0 }, -}; - -/* char: 46 '.' */ - -static const CoordRec char46_stroke0[] = { - { 52.381, 9.5238 }, - { 47.6191, 4.7619 }, - { 52.381, 0 }, - { 57.1429, 4.7619 }, - { 52.381, 9.5238 }, -}; - -static const StrokeRec char46[] = { - { 5, char46_stroke0 }, -}; - -/* char: 47 '/' */ - -static const CoordRec char47_stroke0[] = { - { 19.0476, -14.2857 }, - { 85.7143, 100 }, -}; - -static const StrokeRec char47[] = { - { 2, char47_stroke0 }, -}; - -/* char: 48 '0' */ - -static const CoordRec char48_stroke0[] = { - { 47.619, 100 }, - { 33.3333, 95.2381 }, - { 23.8095, 80.9524 }, - { 19.0476, 57.1429 }, - { 19.0476, 42.8571 }, - { 23.8095, 19.0476 }, - { 33.3333, 4.7619 }, - { 47.619, 0 }, - { 57.1428, 0 }, - { 71.4286, 4.7619 }, - { 80.9524, 19.0476 }, - { 85.7143, 42.8571 }, - { 85.7143, 57.1429 }, - { 80.9524, 80.9524 }, - { 71.4286, 95.2381 }, - { 57.1428, 100 }, - { 47.619, 100 }, -}; - -static const StrokeRec char48[] = { - { 17, char48_stroke0 }, -}; - -/* char: 49 '1' */ - -static const CoordRec char49_stroke0[] = { - { 40.4762, 80.9524 }, - { 50, 85.7143 }, - { 64.2857, 100 }, - { 64.2857, 0 }, -}; - -static const StrokeRec char49[] = { - { 4, char49_stroke0 }, -}; - -/* char: 50 '2' */ - -static const CoordRec char50_stroke0[] = { - { 23.8095, 76.1905 }, - { 23.8095, 80.9524 }, - { 28.5714, 90.4762 }, - { 33.3333, 95.2381 }, - { 42.8571, 100 }, - { 61.9047, 100 }, - { 71.4286, 95.2381 }, - { 76.1905, 90.4762 }, - { 80.9524, 80.9524 }, - { 80.9524, 71.4286 }, - { 76.1905, 61.9048 }, - { 66.6666, 47.619 }, - { 19.0476, 0 }, - { 85.7143, 0 }, -}; - -static const StrokeRec char50[] = { - { 14, char50_stroke0 }, -}; - -/* char: 51 '3' */ - -static const CoordRec char51_stroke0[] = { - { 28.5714, 100 }, - { 80.9524, 100 }, - { 52.3809, 61.9048 }, - { 66.6666, 61.9048 }, - { 76.1905, 57.1429 }, - { 80.9524, 52.381 }, - { 85.7143, 38.0952 }, - { 85.7143, 28.5714 }, - { 80.9524, 14.2857 }, - { 71.4286, 4.7619 }, - { 57.1428, 0 }, - { 42.8571, 0 }, - { 28.5714, 4.7619 }, - { 23.8095, 9.5238 }, - { 19.0476, 19.0476 }, -}; - -static const StrokeRec char51[] = { - { 15, char51_stroke0 }, -}; - -/* char: 52 '4' */ - -static const CoordRec char52_stroke0[] = { - { 64.2857, 100 }, - { 16.6667, 33.3333 }, - { 88.0952, 33.3333 }, -}; - -static const CoordRec char52_stroke1[] = { - { 64.2857, 100 }, - { 64.2857, 0 }, -}; - -static const StrokeRec char52[] = { - { 3, char52_stroke0 }, - { 2, char52_stroke1 }, -}; - -/* char: 53 '5' */ - -static const CoordRec char53_stroke0[] = { - { 76.1905, 100 }, - { 28.5714, 100 }, - { 23.8095, 57.1429 }, - { 28.5714, 61.9048 }, - { 42.8571, 66.6667 }, - { 57.1428, 66.6667 }, - { 71.4286, 61.9048 }, - { 80.9524, 52.381 }, - { 85.7143, 38.0952 }, - { 85.7143, 28.5714 }, - { 80.9524, 14.2857 }, - { 71.4286, 4.7619 }, - { 57.1428, 0 }, - { 42.8571, 0 }, - { 28.5714, 4.7619 }, - { 23.8095, 9.5238 }, - { 19.0476, 19.0476 }, -}; - -static const StrokeRec char53[] = { - { 17, char53_stroke0 }, -}; - -/* char: 54 '6' */ - -static const CoordRec char54_stroke0[] = { - { 78.5714, 85.7143 }, - { 73.8096, 95.2381 }, - { 59.5238, 100 }, - { 50, 100 }, - { 35.7143, 95.2381 }, - { 26.1905, 80.9524 }, - { 21.4286, 57.1429 }, - { 21.4286, 33.3333 }, - { 26.1905, 14.2857 }, - { 35.7143, 4.7619 }, - { 50, 0 }, - { 54.7619, 0 }, - { 69.0476, 4.7619 }, - { 78.5714, 14.2857 }, - { 83.3334, 28.5714 }, - { 83.3334, 33.3333 }, - { 78.5714, 47.619 }, - { 69.0476, 57.1429 }, - { 54.7619, 61.9048 }, - { 50, 61.9048 }, - { 35.7143, 57.1429 }, - { 26.1905, 47.619 }, - { 21.4286, 33.3333 }, -}; - -static const StrokeRec char54[] = { - { 23, char54_stroke0 }, -}; - -/* char: 55 '7' */ - -static const CoordRec char55_stroke0[] = { - { 85.7143, 100 }, - { 38.0952, 0 }, -}; - -static const CoordRec char55_stroke1[] = { - { 19.0476, 100 }, - { 85.7143, 100 }, -}; - -static const StrokeRec char55[] = { - { 2, char55_stroke0 }, - { 2, char55_stroke1 }, -}; - -/* char: 56 '8' */ - -static const CoordRec char56_stroke0[] = { - { 42.8571, 100 }, - { 28.5714, 95.2381 }, - { 23.8095, 85.7143 }, - { 23.8095, 76.1905 }, - { 28.5714, 66.6667 }, - { 38.0952, 61.9048 }, - { 57.1428, 57.1429 }, - { 71.4286, 52.381 }, - { 80.9524, 42.8571 }, - { 85.7143, 33.3333 }, - { 85.7143, 19.0476 }, - { 80.9524, 9.5238 }, - { 76.1905, 4.7619 }, - { 61.9047, 0 }, - { 42.8571, 0 }, - { 28.5714, 4.7619 }, - { 23.8095, 9.5238 }, - { 19.0476, 19.0476 }, - { 19.0476, 33.3333 }, - { 23.8095, 42.8571 }, - { 33.3333, 52.381 }, - { 47.619, 57.1429 }, - { 66.6666, 61.9048 }, - { 76.1905, 66.6667 }, - { 80.9524, 76.1905 }, - { 80.9524, 85.7143 }, - { 76.1905, 95.2381 }, - { 61.9047, 100 }, - { 42.8571, 100 }, -}; - -static const StrokeRec char56[] = { - { 29, char56_stroke0 }, -}; - -/* char: 57 '9' */ - -static const CoordRec char57_stroke0[] = { - { 83.3334, 66.6667 }, - { 78.5714, 52.381 }, - { 69.0476, 42.8571 }, - { 54.7619, 38.0952 }, - { 50, 38.0952 }, - { 35.7143, 42.8571 }, - { 26.1905, 52.381 }, - { 21.4286, 66.6667 }, - { 21.4286, 71.4286 }, - { 26.1905, 85.7143 }, - { 35.7143, 95.2381 }, - { 50, 100 }, - { 54.7619, 100 }, - { 69.0476, 95.2381 }, - { 78.5714, 85.7143 }, - { 83.3334, 66.6667 }, - { 83.3334, 42.8571 }, - { 78.5714, 19.0476 }, - { 69.0476, 4.7619 }, - { 54.7619, 0 }, - { 45.2381, 0 }, - { 30.9524, 4.7619 }, - { 26.1905, 14.2857 }, -}; - -static const StrokeRec char57[] = { - { 23, char57_stroke0 }, -}; - -/* char: 58 ':' */ - -static const CoordRec char58_stroke0[] = { - { 52.381, 66.6667 }, - { 47.6191, 61.9048 }, - { 52.381, 57.1429 }, - { 57.1429, 61.9048 }, - { 52.381, 66.6667 }, -}; - -static const CoordRec char58_stroke1[] = { - { 52.381, 9.5238 }, - { 47.6191, 4.7619 }, - { 52.381, 0 }, - { 57.1429, 4.7619 }, - { 52.381, 9.5238 }, -}; - -static const StrokeRec char58[] = { - { 5, char58_stroke0 }, - { 5, char58_stroke1 }, -}; - -/* char: 59 ';' */ - -static const CoordRec char59_stroke0[] = { - { 52.381, 66.6667 }, - { 47.6191, 61.9048 }, - { 52.381, 57.1429 }, - { 57.1429, 61.9048 }, - { 52.381, 66.6667 }, -}; - -static const CoordRec char59_stroke1[] = { - { 57.1429, 4.7619 }, - { 52.381, 0 }, - { 47.6191, 4.7619 }, - { 52.381, 9.5238 }, - { 57.1429, 4.7619 }, - { 57.1429, -4.7619 }, - { 52.381, -14.2857 }, - { 47.6191, -19.0476 }, -}; - -static const StrokeRec char59[] = { - { 5, char59_stroke0 }, - { 8, char59_stroke1 }, -}; - -/* char: 60 '<' */ - -static const CoordRec char60_stroke0[] = { - { 90.4762, 85.7143 }, - { 14.2857, 42.8571 }, - { 90.4762, 0 }, -}; - -static const StrokeRec char60[] = { - { 3, char60_stroke0 }, -}; - -/* char: 61 '=' */ - -static const CoordRec char61_stroke0[] = { - { 9.5238, 57.1429 }, - { 95.2381, 57.1429 }, -}; - -static const CoordRec char61_stroke1[] = { - { 9.5238, 28.5714 }, - { 95.2381, 28.5714 }, -}; - -static const StrokeRec char61[] = { - { 2, char61_stroke0 }, - { 2, char61_stroke1 }, -}; - -/* char: 62 '>' */ - -static const CoordRec char62_stroke0[] = { - { 14.2857, 85.7143 }, - { 90.4762, 42.8571 }, - { 14.2857, 0 }, -}; - -static const StrokeRec char62[] = { - { 3, char62_stroke0 }, -}; - -/* char: 63 '?' */ - -static const CoordRec char63_stroke0[] = { - { 23.8095, 76.1905 }, - { 23.8095, 80.9524 }, - { 28.5714, 90.4762 }, - { 33.3333, 95.2381 }, - { 42.8571, 100 }, - { 61.9047, 100 }, - { 71.4285, 95.2381 }, - { 76.1905, 90.4762 }, - { 80.9524, 80.9524 }, - { 80.9524, 71.4286 }, - { 76.1905, 61.9048 }, - { 71.4285, 57.1429 }, - { 52.3809, 47.619 }, - { 52.3809, 33.3333 }, -}; - -static const CoordRec char63_stroke1[] = { - { 52.3809, 9.5238 }, - { 47.619, 4.7619 }, - { 52.3809, 0 }, - { 57.1428, 4.7619 }, - { 52.3809, 9.5238 }, -}; - -static const StrokeRec char63[] = { - { 14, char63_stroke0 }, - { 5, char63_stroke1 }, -}; - -/* char: 64 '@' */ - -static const CoordRec char64_stroke0[] = { - { 64.2857, 52.381 }, - { 54.7619, 57.1429 }, - { 45.2381, 57.1429 }, - { 40.4762, 47.619 }, - { 40.4762, 42.8571 }, - { 45.2381, 33.3333 }, - { 54.7619, 33.3333 }, - { 64.2857, 38.0952 }, -}; - -static const CoordRec char64_stroke1[] = { - { 64.2857, 57.1429 }, - { 64.2857, 38.0952 }, - { 69.0476, 33.3333 }, - { 78.5714, 33.3333 }, - { 83.3334, 42.8571 }, - { 83.3334, 47.619 }, - { 78.5714, 61.9048 }, - { 69.0476, 71.4286 }, - { 54.7619, 76.1905 }, - { 50, 76.1905 }, - { 35.7143, 71.4286 }, - { 26.1905, 61.9048 }, - { 21.4286, 47.619 }, - { 21.4286, 42.8571 }, - { 26.1905, 28.5714 }, - { 35.7143, 19.0476 }, - { 50, 14.2857 }, - { 54.7619, 14.2857 }, - { 69.0476, 19.0476 }, -}; - -static const StrokeRec char64[] = { - { 8, char64_stroke0 }, - { 19, char64_stroke1 }, -}; - -/* char: 65 'A' */ - -static const CoordRec char65_stroke0[] = { - { 52.3809, 100 }, - { 14.2857, 0 }, -}; - -static const CoordRec char65_stroke1[] = { - { 52.3809, 100 }, - { 90.4762, 0 }, -}; - -static const CoordRec char65_stroke2[] = { - { 28.5714, 33.3333 }, - { 76.1905, 33.3333 }, -}; - -static const StrokeRec char65[] = { - { 2, char65_stroke0 }, - { 2, char65_stroke1 }, - { 2, char65_stroke2 }, -}; - -/* char: 66 'B' */ - -static const CoordRec char66_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char66_stroke1[] = { - { 19.0476, 100 }, - { 61.9047, 100 }, - { 76.1905, 95.2381 }, - { 80.9524, 90.4762 }, - { 85.7143, 80.9524 }, - { 85.7143, 71.4286 }, - { 80.9524, 61.9048 }, - { 76.1905, 57.1429 }, - { 61.9047, 52.381 }, -}; - -static const CoordRec char66_stroke2[] = { - { 19.0476, 52.381 }, - { 61.9047, 52.381 }, - { 76.1905, 47.619 }, - { 80.9524, 42.8571 }, - { 85.7143, 33.3333 }, - { 85.7143, 19.0476 }, - { 80.9524, 9.5238 }, - { 76.1905, 4.7619 }, - { 61.9047, 0 }, - { 19.0476, 0 }, -}; - -static const StrokeRec char66[] = { - { 2, char66_stroke0 }, - { 9, char66_stroke1 }, - { 10, char66_stroke2 }, -}; - -/* char: 67 'C' */ - -static const CoordRec char67_stroke0[] = { - { 88.0952, 76.1905 }, - { 83.3334, 85.7143 }, - { 73.8096, 95.2381 }, - { 64.2857, 100 }, - { 45.2381, 100 }, - { 35.7143, 95.2381 }, - { 26.1905, 85.7143 }, - { 21.4286, 76.1905 }, - { 16.6667, 61.9048 }, - { 16.6667, 38.0952 }, - { 21.4286, 23.8095 }, - { 26.1905, 14.2857 }, - { 35.7143, 4.7619 }, - { 45.2381, 0 }, - { 64.2857, 0 }, - { 73.8096, 4.7619 }, - { 83.3334, 14.2857 }, - { 88.0952, 23.8095 }, -}; - -static const StrokeRec char67[] = { - { 18, char67_stroke0 }, -}; - -/* char: 68 'D' */ - -static const CoordRec char68_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char68_stroke1[] = { - { 19.0476, 100 }, - { 52.3809, 100 }, - { 66.6666, 95.2381 }, - { 76.1905, 85.7143 }, - { 80.9524, 76.1905 }, - { 85.7143, 61.9048 }, - { 85.7143, 38.0952 }, - { 80.9524, 23.8095 }, - { 76.1905, 14.2857 }, - { 66.6666, 4.7619 }, - { 52.3809, 0 }, - { 19.0476, 0 }, -}; - -static const StrokeRec char68[] = { - { 2, char68_stroke0 }, - { 12, char68_stroke1 }, -}; - -/* char: 69 'E' */ - -static const CoordRec char69_stroke0[] = { - { 21.4286, 100 }, - { 21.4286, 0 }, -}; - -static const CoordRec char69_stroke1[] = { - { 21.4286, 100 }, - { 83.3334, 100 }, -}; - -static const CoordRec char69_stroke2[] = { - { 21.4286, 52.381 }, - { 59.5238, 52.381 }, -}; - -static const CoordRec char69_stroke3[] = { - { 21.4286, 0 }, - { 83.3334, 0 }, -}; - -static const StrokeRec char69[] = { - { 2, char69_stroke0 }, - { 2, char69_stroke1 }, - { 2, char69_stroke2 }, - { 2, char69_stroke3 }, -}; - -/* char: 70 'F' */ - -static const CoordRec char70_stroke0[] = { - { 21.4286, 100 }, - { 21.4286, 0 }, -}; - -static const CoordRec char70_stroke1[] = { - { 21.4286, 100 }, - { 83.3334, 100 }, -}; - -static const CoordRec char70_stroke2[] = { - { 21.4286, 52.381 }, - { 59.5238, 52.381 }, -}; - -static const StrokeRec char70[] = { - { 2, char70_stroke0 }, - { 2, char70_stroke1 }, - { 2, char70_stroke2 }, -}; - -/* char: 71 'G' */ - -static const CoordRec char71_stroke0[] = { - { 88.0952, 76.1905 }, - { 83.3334, 85.7143 }, - { 73.8096, 95.2381 }, - { 64.2857, 100 }, - { 45.2381, 100 }, - { 35.7143, 95.2381 }, - { 26.1905, 85.7143 }, - { 21.4286, 76.1905 }, - { 16.6667, 61.9048 }, - { 16.6667, 38.0952 }, - { 21.4286, 23.8095 }, - { 26.1905, 14.2857 }, - { 35.7143, 4.7619 }, - { 45.2381, 0 }, - { 64.2857, 0 }, - { 73.8096, 4.7619 }, - { 83.3334, 14.2857 }, - { 88.0952, 23.8095 }, - { 88.0952, 38.0952 }, -}; - -static const CoordRec char71_stroke1[] = { - { 64.2857, 38.0952 }, - { 88.0952, 38.0952 }, -}; - -static const StrokeRec char71[] = { - { 19, char71_stroke0 }, - { 2, char71_stroke1 }, -}; - -/* char: 72 'H' */ - -static const CoordRec char72_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char72_stroke1[] = { - { 85.7143, 100 }, - { 85.7143, 0 }, -}; - -static const CoordRec char72_stroke2[] = { - { 19.0476, 52.381 }, - { 85.7143, 52.381 }, -}; - -static const StrokeRec char72[] = { - { 2, char72_stroke0 }, - { 2, char72_stroke1 }, - { 2, char72_stroke2 }, -}; - -/* char: 73 'I' */ - -static const CoordRec char73_stroke0[] = { - { 52.381, 100 }, - { 52.381, 0 }, -}; - -static const StrokeRec char73[] = { - { 2, char73_stroke0 }, -}; - -/* char: 74 'J' */ - -static const CoordRec char74_stroke0[] = { - { 76.1905, 100 }, - { 76.1905, 23.8095 }, - { 71.4286, 9.5238 }, - { 66.6667, 4.7619 }, - { 57.1429, 0 }, - { 47.6191, 0 }, - { 38.0953, 4.7619 }, - { 33.3334, 9.5238 }, - { 28.5715, 23.8095 }, - { 28.5715, 33.3333 }, -}; - -static const StrokeRec char74[] = { - { 10, char74_stroke0 }, -}; - -/* char: 75 'K' */ - -static const CoordRec char75_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char75_stroke1[] = { - { 85.7143, 100 }, - { 19.0476, 33.3333 }, -}; - -static const CoordRec char75_stroke2[] = { - { 42.8571, 57.1429 }, - { 85.7143, 0 }, -}; - -static const StrokeRec char75[] = { - { 2, char75_stroke0 }, - { 2, char75_stroke1 }, - { 2, char75_stroke2 }, -}; - -/* char: 76 'L' */ - -static const CoordRec char76_stroke0[] = { - { 23.8095, 100 }, - { 23.8095, 0 }, -}; - -static const CoordRec char76_stroke1[] = { - { 23.8095, 0 }, - { 80.9524, 0 }, -}; - -static const StrokeRec char76[] = { - { 2, char76_stroke0 }, - { 2, char76_stroke1 }, -}; - -/* char: 77 'M' */ - -static const CoordRec char77_stroke0[] = { - { 14.2857, 100 }, - { 14.2857, 0 }, -}; - -static const CoordRec char77_stroke1[] = { - { 14.2857, 100 }, - { 52.3809, 0 }, -}; - -static const CoordRec char77_stroke2[] = { - { 90.4762, 100 }, - { 52.3809, 0 }, -}; - -static const CoordRec char77_stroke3[] = { - { 90.4762, 100 }, - { 90.4762, 0 }, -}; - -static const StrokeRec char77[] = { - { 2, char77_stroke0 }, - { 2, char77_stroke1 }, - { 2, char77_stroke2 }, - { 2, char77_stroke3 }, -}; - -/* char: 78 'N' */ - -static const CoordRec char78_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char78_stroke1[] = { - { 19.0476, 100 }, - { 85.7143, 0 }, -}; - -static const CoordRec char78_stroke2[] = { - { 85.7143, 100 }, - { 85.7143, 0 }, -}; - -static const StrokeRec char78[] = { - { 2, char78_stroke0 }, - { 2, char78_stroke1 }, - { 2, char78_stroke2 }, -}; - -/* char: 79 'O' */ - -static const CoordRec char79_stroke0[] = { - { 42.8571, 100 }, - { 33.3333, 95.2381 }, - { 23.8095, 85.7143 }, - { 19.0476, 76.1905 }, - { 14.2857, 61.9048 }, - { 14.2857, 38.0952 }, - { 19.0476, 23.8095 }, - { 23.8095, 14.2857 }, - { 33.3333, 4.7619 }, - { 42.8571, 0 }, - { 61.9047, 0 }, - { 71.4286, 4.7619 }, - { 80.9524, 14.2857 }, - { 85.7143, 23.8095 }, - { 90.4762, 38.0952 }, - { 90.4762, 61.9048 }, - { 85.7143, 76.1905 }, - { 80.9524, 85.7143 }, - { 71.4286, 95.2381 }, - { 61.9047, 100 }, - { 42.8571, 100 }, -}; - -static const StrokeRec char79[] = { - { 21, char79_stroke0 }, -}; - -/* char: 80 'P' */ - -static const CoordRec char80_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char80_stroke1[] = { - { 19.0476, 100 }, - { 61.9047, 100 }, - { 76.1905, 95.2381 }, - { 80.9524, 90.4762 }, - { 85.7143, 80.9524 }, - { 85.7143, 66.6667 }, - { 80.9524, 57.1429 }, - { 76.1905, 52.381 }, - { 61.9047, 47.619 }, - { 19.0476, 47.619 }, -}; - -static const StrokeRec char80[] = { - { 2, char80_stroke0 }, - { 10, char80_stroke1 }, -}; - -/* char: 81 'Q' */ - -static const CoordRec char81_stroke0[] = { - { 42.8571, 100 }, - { 33.3333, 95.2381 }, - { 23.8095, 85.7143 }, - { 19.0476, 76.1905 }, - { 14.2857, 61.9048 }, - { 14.2857, 38.0952 }, - { 19.0476, 23.8095 }, - { 23.8095, 14.2857 }, - { 33.3333, 4.7619 }, - { 42.8571, 0 }, - { 61.9047, 0 }, - { 71.4286, 4.7619 }, - { 80.9524, 14.2857 }, - { 85.7143, 23.8095 }, - { 90.4762, 38.0952 }, - { 90.4762, 61.9048 }, - { 85.7143, 76.1905 }, - { 80.9524, 85.7143 }, - { 71.4286, 95.2381 }, - { 61.9047, 100 }, - { 42.8571, 100 }, -}; - -static const CoordRec char81_stroke1[] = { - { 57.1428, 19.0476 }, - { 85.7143, -9.5238 }, -}; - -static const StrokeRec char81[] = { - { 21, char81_stroke0 }, - { 2, char81_stroke1 }, -}; - -/* char: 82 'R' */ - -static const CoordRec char82_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char82_stroke1[] = { - { 19.0476, 100 }, - { 61.9047, 100 }, - { 76.1905, 95.2381 }, - { 80.9524, 90.4762 }, - { 85.7143, 80.9524 }, - { 85.7143, 71.4286 }, - { 80.9524, 61.9048 }, - { 76.1905, 57.1429 }, - { 61.9047, 52.381 }, - { 19.0476, 52.381 }, -}; - -static const CoordRec char82_stroke2[] = { - { 52.3809, 52.381 }, - { 85.7143, 0 }, -}; - -static const StrokeRec char82[] = { - { 2, char82_stroke0 }, - { 10, char82_stroke1 }, - { 2, char82_stroke2 }, -}; - -/* char: 83 'S' */ - -static const CoordRec char83_stroke0[] = { - { 85.7143, 85.7143 }, - { 76.1905, 95.2381 }, - { 61.9047, 100 }, - { 42.8571, 100 }, - { 28.5714, 95.2381 }, - { 19.0476, 85.7143 }, - { 19.0476, 76.1905 }, - { 23.8095, 66.6667 }, - { 28.5714, 61.9048 }, - { 38.0952, 57.1429 }, - { 66.6666, 47.619 }, - { 76.1905, 42.8571 }, - { 80.9524, 38.0952 }, - { 85.7143, 28.5714 }, - { 85.7143, 14.2857 }, - { 76.1905, 4.7619 }, - { 61.9047, 0 }, - { 42.8571, 0 }, - { 28.5714, 4.7619 }, - { 19.0476, 14.2857 }, -}; - -static const StrokeRec char83[] = { - { 20, char83_stroke0 }, -}; - -/* char: 84 'T' */ - -static const CoordRec char84_stroke0[] = { - { 52.3809, 100 }, - { 52.3809, 0 }, -}; - -static const CoordRec char84_stroke1[] = { - { 19.0476, 100 }, - { 85.7143, 100 }, -}; - -static const StrokeRec char84[] = { - { 2, char84_stroke0 }, - { 2, char84_stroke1 }, -}; - -/* char: 85 'U' */ - -static const CoordRec char85_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 28.5714 }, - { 23.8095, 14.2857 }, - { 33.3333, 4.7619 }, - { 47.619, 0 }, - { 57.1428, 0 }, - { 71.4286, 4.7619 }, - { 80.9524, 14.2857 }, - { 85.7143, 28.5714 }, - { 85.7143, 100 }, -}; - -static const StrokeRec char85[] = { - { 10, char85_stroke0 }, -}; - -/* char: 86 'V' */ - -static const CoordRec char86_stroke0[] = { - { 14.2857, 100 }, - { 52.3809, 0 }, -}; - -static const CoordRec char86_stroke1[] = { - { 90.4762, 100 }, - { 52.3809, 0 }, -}; - -static const StrokeRec char86[] = { - { 2, char86_stroke0 }, - { 2, char86_stroke1 }, -}; - -/* char: 87 'W' */ - -static const CoordRec char87_stroke0[] = { - { 4.7619, 100 }, - { 28.5714, 0 }, -}; - -static const CoordRec char87_stroke1[] = { - { 52.3809, 100 }, - { 28.5714, 0 }, -}; - -static const CoordRec char87_stroke2[] = { - { 52.3809, 100 }, - { 76.1905, 0 }, -}; - -static const CoordRec char87_stroke3[] = { - { 100, 100 }, - { 76.1905, 0 }, -}; - -static const StrokeRec char87[] = { - { 2, char87_stroke0 }, - { 2, char87_stroke1 }, - { 2, char87_stroke2 }, - { 2, char87_stroke3 }, -}; - -/* char: 88 'X' */ - -static const CoordRec char88_stroke0[] = { - { 19.0476, 100 }, - { 85.7143, 0 }, -}; - -static const CoordRec char88_stroke1[] = { - { 85.7143, 100 }, - { 19.0476, 0 }, -}; - -static const StrokeRec char88[] = { - { 2, char88_stroke0 }, - { 2, char88_stroke1 }, -}; - -/* char: 89 'Y' */ - -static const CoordRec char89_stroke0[] = { - { 14.2857, 100 }, - { 52.3809, 52.381 }, - { 52.3809, 0 }, -}; - -static const CoordRec char89_stroke1[] = { - { 90.4762, 100 }, - { 52.3809, 52.381 }, -}; - -static const StrokeRec char89[] = { - { 3, char89_stroke0 }, - { 2, char89_stroke1 }, -}; - -/* char: 90 'Z' */ - -static const CoordRec char90_stroke0[] = { - { 85.7143, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char90_stroke1[] = { - { 19.0476, 100 }, - { 85.7143, 100 }, -}; - -static const CoordRec char90_stroke2[] = { - { 19.0476, 0 }, - { 85.7143, 0 }, -}; - -static const StrokeRec char90[] = { - { 2, char90_stroke0 }, - { 2, char90_stroke1 }, - { 2, char90_stroke2 }, -}; - -/* char: 91 '[' */ - -static const CoordRec char91_stroke0[] = { - { 35.7143, 119.048 }, - { 35.7143, -33.3333 }, -}; - -static const CoordRec char91_stroke1[] = { - { 40.4762, 119.048 }, - { 40.4762, -33.3333 }, -}; - -static const CoordRec char91_stroke2[] = { - { 35.7143, 119.048 }, - { 69.0476, 119.048 }, -}; - -static const CoordRec char91_stroke3[] = { - { 35.7143, -33.3333 }, - { 69.0476, -33.3333 }, -}; - -static const StrokeRec char91[] = { - { 2, char91_stroke0 }, - { 2, char91_stroke1 }, - { 2, char91_stroke2 }, - { 2, char91_stroke3 }, -}; - -/* char: 92 '\' */ - -static const CoordRec char92_stroke0[] = { - { 19.0476, 100 }, - { 85.7143, -14.2857 }, -}; - -static const StrokeRec char92[] = { - { 2, char92_stroke0 }, -}; - -/* char: 93 ']' */ - -static const CoordRec char93_stroke0[] = { - { 64.2857, 119.048 }, - { 64.2857, -33.3333 }, -}; - -static const CoordRec char93_stroke1[] = { - { 69.0476, 119.048 }, - { 69.0476, -33.3333 }, -}; - -static const CoordRec char93_stroke2[] = { - { 35.7143, 119.048 }, - { 69.0476, 119.048 }, -}; - -static const CoordRec char93_stroke3[] = { - { 35.7143, -33.3333 }, - { 69.0476, -33.3333 }, -}; - -static const StrokeRec char93[] = { - { 2, char93_stroke0 }, - { 2, char93_stroke1 }, - { 2, char93_stroke2 }, - { 2, char93_stroke3 }, -}; - -/* char: 94 '^' */ - -static const CoordRec char94_stroke0[] = { - { 52.3809, 109.524 }, - { 14.2857, 42.8571 }, -}; - -static const CoordRec char94_stroke1[] = { - { 52.3809, 109.524 }, - { 90.4762, 42.8571 }, -}; - -static const StrokeRec char94[] = { - { 2, char94_stroke0 }, - { 2, char94_stroke1 }, -}; - -/* char: 95 '_' */ - -static const CoordRec char95_stroke0[] = { - { 0, -33.3333 }, - { 104.762, -33.3333 }, - { 104.762, -28.5714 }, - { 0, -28.5714 }, - { 0, -33.3333 }, -}; - -static const StrokeRec char95[] = { - { 5, char95_stroke0 }, -}; - -/* char: 96 '`' */ - -static const CoordRec char96_stroke0[] = { - { 42.8572, 100 }, - { 66.6667, 71.4286 }, -}; - -static const CoordRec char96_stroke1[] = { - { 42.8572, 100 }, - { 38.0953, 95.2381 }, - { 66.6667, 71.4286 }, -}; - -static const StrokeRec char96[] = { - { 2, char96_stroke0 }, - { 3, char96_stroke1 }, -}; - -/* char: 97 'a' */ - -static const CoordRec char97_stroke0[] = { - { 80.9524, 66.6667 }, - { 80.9524, 0 }, -}; - -static const CoordRec char97_stroke1[] = { - { 80.9524, 52.381 }, - { 71.4285, 61.9048 }, - { 61.9047, 66.6667 }, - { 47.619, 66.6667 }, - { 38.0952, 61.9048 }, - { 28.5714, 52.381 }, - { 23.8095, 38.0952 }, - { 23.8095, 28.5714 }, - { 28.5714, 14.2857 }, - { 38.0952, 4.7619 }, - { 47.619, 0 }, - { 61.9047, 0 }, - { 71.4285, 4.7619 }, - { 80.9524, 14.2857 }, -}; - -static const StrokeRec char97[] = { - { 2, char97_stroke0 }, - { 14, char97_stroke1 }, -}; - -/* char: 98 'b' */ - -static const CoordRec char98_stroke0[] = { - { 23.8095, 100 }, - { 23.8095, 0 }, -}; - -static const CoordRec char98_stroke1[] = { - { 23.8095, 52.381 }, - { 33.3333, 61.9048 }, - { 42.8571, 66.6667 }, - { 57.1428, 66.6667 }, - { 66.6666, 61.9048 }, - { 76.1905, 52.381 }, - { 80.9524, 38.0952 }, - { 80.9524, 28.5714 }, - { 76.1905, 14.2857 }, - { 66.6666, 4.7619 }, - { 57.1428, 0 }, - { 42.8571, 0 }, - { 33.3333, 4.7619 }, - { 23.8095, 14.2857 }, -}; - -static const StrokeRec char98[] = { - { 2, char98_stroke0 }, - { 14, char98_stroke1 }, -}; - -/* char: 99 'c' */ - -static const CoordRec char99_stroke0[] = { - { 80.9524, 52.381 }, - { 71.4285, 61.9048 }, - { 61.9047, 66.6667 }, - { 47.619, 66.6667 }, - { 38.0952, 61.9048 }, - { 28.5714, 52.381 }, - { 23.8095, 38.0952 }, - { 23.8095, 28.5714 }, - { 28.5714, 14.2857 }, - { 38.0952, 4.7619 }, - { 47.619, 0 }, - { 61.9047, 0 }, - { 71.4285, 4.7619 }, - { 80.9524, 14.2857 }, -}; - -static const StrokeRec char99[] = { - { 14, char99_stroke0 }, -}; - -/* char: 100 'd' */ - -static const CoordRec char100_stroke0[] = { - { 80.9524, 100 }, - { 80.9524, 0 }, -}; - -static const CoordRec char100_stroke1[] = { - { 80.9524, 52.381 }, - { 71.4285, 61.9048 }, - { 61.9047, 66.6667 }, - { 47.619, 66.6667 }, - { 38.0952, 61.9048 }, - { 28.5714, 52.381 }, - { 23.8095, 38.0952 }, - { 23.8095, 28.5714 }, - { 28.5714, 14.2857 }, - { 38.0952, 4.7619 }, - { 47.619, 0 }, - { 61.9047, 0 }, - { 71.4285, 4.7619 }, - { 80.9524, 14.2857 }, -}; - -static const StrokeRec char100[] = { - { 2, char100_stroke0 }, - { 14, char100_stroke1 }, -}; - -/* char: 101 'e' */ - -static const CoordRec char101_stroke0[] = { - { 23.8095, 38.0952 }, - { 80.9524, 38.0952 }, - { 80.9524, 47.619 }, - { 76.1905, 57.1429 }, - { 71.4285, 61.9048 }, - { 61.9047, 66.6667 }, - { 47.619, 66.6667 }, - { 38.0952, 61.9048 }, - { 28.5714, 52.381 }, - { 23.8095, 38.0952 }, - { 23.8095, 28.5714 }, - { 28.5714, 14.2857 }, - { 38.0952, 4.7619 }, - { 47.619, 0 }, - { 61.9047, 0 }, - { 71.4285, 4.7619 }, - { 80.9524, 14.2857 }, -}; - -static const StrokeRec char101[] = { - { 17, char101_stroke0 }, -}; - -/* char: 102 'f' */ - -static const CoordRec char102_stroke0[] = { - { 71.4286, 100 }, - { 61.9048, 100 }, - { 52.381, 95.2381 }, - { 47.6191, 80.9524 }, - { 47.6191, 0 }, -}; - -static const CoordRec char102_stroke1[] = { - { 33.3334, 66.6667 }, - { 66.6667, 66.6667 }, -}; - -static const StrokeRec char102[] = { - { 5, char102_stroke0 }, - { 2, char102_stroke1 }, -}; - -/* char: 103 'g' */ - -static const CoordRec char103_stroke0[] = { - { 80.9524, 66.6667 }, - { 80.9524, -9.5238 }, - { 76.1905, -23.8095 }, - { 71.4285, -28.5714 }, - { 61.9047, -33.3333 }, - { 47.619, -33.3333 }, - { 38.0952, -28.5714 }, -}; - -static const CoordRec char103_stroke1[] = { - { 80.9524, 52.381 }, - { 71.4285, 61.9048 }, - { 61.9047, 66.6667 }, - { 47.619, 66.6667 }, - { 38.0952, 61.9048 }, - { 28.5714, 52.381 }, - { 23.8095, 38.0952 }, - { 23.8095, 28.5714 }, - { 28.5714, 14.2857 }, - { 38.0952, 4.7619 }, - { 47.619, 0 }, - { 61.9047, 0 }, - { 71.4285, 4.7619 }, - { 80.9524, 14.2857 }, -}; - -static const StrokeRec char103[] = { - { 7, char103_stroke0 }, - { 14, char103_stroke1 }, -}; - -/* char: 104 'h' */ - -static const CoordRec char104_stroke0[] = { - { 26.1905, 100 }, - { 26.1905, 0 }, -}; - -static const CoordRec char104_stroke1[] = { - { 26.1905, 47.619 }, - { 40.4762, 61.9048 }, - { 50, 66.6667 }, - { 64.2857, 66.6667 }, - { 73.8095, 61.9048 }, - { 78.5715, 47.619 }, - { 78.5715, 0 }, -}; - -static const StrokeRec char104[] = { - { 2, char104_stroke0 }, - { 7, char104_stroke1 }, -}; - -/* char: 105 'i' */ - -static const CoordRec char105_stroke0[] = { - { 47.6191, 100 }, - { 52.381, 95.2381 }, - { 57.1429, 100 }, - { 52.381, 104.762 }, - { 47.6191, 100 }, -}; - -static const CoordRec char105_stroke1[] = { - { 52.381, 66.6667 }, - { 52.381, 0 }, -}; - -static const StrokeRec char105[] = { - { 5, char105_stroke0 }, - { 2, char105_stroke1 }, -}; - -/* char: 106 'j' */ - -static const CoordRec char106_stroke0[] = { - { 57.1429, 100 }, - { 61.9048, 95.2381 }, - { 66.6667, 100 }, - { 61.9048, 104.762 }, - { 57.1429, 100 }, -}; - -static const CoordRec char106_stroke1[] = { - { 61.9048, 66.6667 }, - { 61.9048, -14.2857 }, - { 57.1429, -28.5714 }, - { 47.6191, -33.3333 }, - { 38.0953, -33.3333 }, -}; - -static const StrokeRec char106[] = { - { 5, char106_stroke0 }, - { 5, char106_stroke1 }, -}; - -/* char: 107 'k' */ - -static const CoordRec char107_stroke0[] = { - { 26.1905, 100 }, - { 26.1905, 0 }, -}; - -static const CoordRec char107_stroke1[] = { - { 73.8095, 66.6667 }, - { 26.1905, 19.0476 }, -}; - -static const CoordRec char107_stroke2[] = { - { 45.2381, 38.0952 }, - { 78.5715, 0 }, -}; - -static const StrokeRec char107[] = { - { 2, char107_stroke0 }, - { 2, char107_stroke1 }, - { 2, char107_stroke2 }, -}; - -/* char: 108 'l' */ - -static const CoordRec char108_stroke0[] = { - { 52.381, 100 }, - { 52.381, 0 }, -}; - -static const StrokeRec char108[] = { - { 2, char108_stroke0 }, -}; - -/* char: 109 'm' */ - -static const CoordRec char109_stroke0[] = { - { 0, 66.6667 }, - { 0, 0 }, -}; - -static const CoordRec char109_stroke1[] = { - { 0, 47.619 }, - { 14.2857, 61.9048 }, - { 23.8095, 66.6667 }, - { 38.0952, 66.6667 }, - { 47.619, 61.9048 }, - { 52.381, 47.619 }, - { 52.381, 0 }, -}; - -static const CoordRec char109_stroke2[] = { - { 52.381, 47.619 }, - { 66.6667, 61.9048 }, - { 76.1905, 66.6667 }, - { 90.4762, 66.6667 }, - { 100, 61.9048 }, - { 104.762, 47.619 }, - { 104.762, 0 }, -}; - -static const StrokeRec char109[] = { - { 2, char109_stroke0 }, - { 7, char109_stroke1 }, - { 7, char109_stroke2 }, -}; - -/* char: 110 'n' */ - -static const CoordRec char110_stroke0[] = { - { 26.1905, 66.6667 }, - { 26.1905, 0 }, -}; - -static const CoordRec char110_stroke1[] = { - { 26.1905, 47.619 }, - { 40.4762, 61.9048 }, - { 50, 66.6667 }, - { 64.2857, 66.6667 }, - { 73.8095, 61.9048 }, - { 78.5715, 47.619 }, - { 78.5715, 0 }, -}; - -static const StrokeRec char110[] = { - { 2, char110_stroke0 }, - { 7, char110_stroke1 }, -}; - -/* char: 111 'o' */ - -static const CoordRec char111_stroke0[] = { - { 45.2381, 66.6667 }, - { 35.7143, 61.9048 }, - { 26.1905, 52.381 }, - { 21.4286, 38.0952 }, - { 21.4286, 28.5714 }, - { 26.1905, 14.2857 }, - { 35.7143, 4.7619 }, - { 45.2381, 0 }, - { 59.5238, 0 }, - { 69.0476, 4.7619 }, - { 78.5714, 14.2857 }, - { 83.3334, 28.5714 }, - { 83.3334, 38.0952 }, - { 78.5714, 52.381 }, - { 69.0476, 61.9048 }, - { 59.5238, 66.6667 }, - { 45.2381, 66.6667 }, -}; - -static const StrokeRec char111[] = { - { 17, char111_stroke0 }, -}; - -/* char: 112 'p' */ - -static const CoordRec char112_stroke0[] = { - { 23.8095, 66.6667 }, - { 23.8095, -33.3333 }, -}; - -static const CoordRec char112_stroke1[] = { - { 23.8095, 52.381 }, - { 33.3333, 61.9048 }, - { 42.8571, 66.6667 }, - { 57.1428, 66.6667 }, - { 66.6666, 61.9048 }, - { 76.1905, 52.381 }, - { 80.9524, 38.0952 }, - { 80.9524, 28.5714 }, - { 76.1905, 14.2857 }, - { 66.6666, 4.7619 }, - { 57.1428, 0 }, - { 42.8571, 0 }, - { 33.3333, 4.7619 }, - { 23.8095, 14.2857 }, -}; - -static const StrokeRec char112[] = { - { 2, char112_stroke0 }, - { 14, char112_stroke1 }, -}; - -/* char: 113 'q' */ - -static const CoordRec char113_stroke0[] = { - { 80.9524, 66.6667 }, - { 80.9524, -33.3333 }, -}; - -static const CoordRec char113_stroke1[] = { - { 80.9524, 52.381 }, - { 71.4285, 61.9048 }, - { 61.9047, 66.6667 }, - { 47.619, 66.6667 }, - { 38.0952, 61.9048 }, - { 28.5714, 52.381 }, - { 23.8095, 38.0952 }, - { 23.8095, 28.5714 }, - { 28.5714, 14.2857 }, - { 38.0952, 4.7619 }, - { 47.619, 0 }, - { 61.9047, 0 }, - { 71.4285, 4.7619 }, - { 80.9524, 14.2857 }, -}; - -static const StrokeRec char113[] = { - { 2, char113_stroke0 }, - { 14, char113_stroke1 }, -}; - -/* char: 114 'r' */ - -static const CoordRec char114_stroke0[] = { - { 33.3334, 66.6667 }, - { 33.3334, 0 }, -}; - -static const CoordRec char114_stroke1[] = { - { 33.3334, 38.0952 }, - { 38.0953, 52.381 }, - { 47.6191, 61.9048 }, - { 57.1429, 66.6667 }, - { 71.4286, 66.6667 }, -}; - -static const StrokeRec char114[] = { - { 2, char114_stroke0 }, - { 5, char114_stroke1 }, -}; - -/* char: 115 's' */ - -static const CoordRec char115_stroke0[] = { - { 78.5715, 52.381 }, - { 73.8095, 61.9048 }, - { 59.5238, 66.6667 }, - { 45.2381, 66.6667 }, - { 30.9524, 61.9048 }, - { 26.1905, 52.381 }, - { 30.9524, 42.8571 }, - { 40.4762, 38.0952 }, - { 64.2857, 33.3333 }, - { 73.8095, 28.5714 }, - { 78.5715, 19.0476 }, - { 78.5715, 14.2857 }, - { 73.8095, 4.7619 }, - { 59.5238, 0 }, - { 45.2381, 0 }, - { 30.9524, 4.7619 }, - { 26.1905, 14.2857 }, -}; - -static const StrokeRec char115[] = { - { 17, char115_stroke0 }, -}; - -/* char: 116 't' */ - -static const CoordRec char116_stroke0[] = { - { 47.6191, 100 }, - { 47.6191, 19.0476 }, - { 52.381, 4.7619 }, - { 61.9048, 0 }, - { 71.4286, 0 }, -}; - -static const CoordRec char116_stroke1[] = { - { 33.3334, 66.6667 }, - { 66.6667, 66.6667 }, -}; - -static const StrokeRec char116[] = { - { 5, char116_stroke0 }, - { 2, char116_stroke1 }, -}; - -/* char: 117 'u' */ - -static const CoordRec char117_stroke0[] = { - { 26.1905, 66.6667 }, - { 26.1905, 19.0476 }, - { 30.9524, 4.7619 }, - { 40.4762, 0 }, - { 54.7619, 0 }, - { 64.2857, 4.7619 }, - { 78.5715, 19.0476 }, -}; - -static const CoordRec char117_stroke1[] = { - { 78.5715, 66.6667 }, - { 78.5715, 0 }, -}; - -static const StrokeRec char117[] = { - { 7, char117_stroke0 }, - { 2, char117_stroke1 }, -}; - -/* char: 118 'v' */ - -static const CoordRec char118_stroke0[] = { - { 23.8095, 66.6667 }, - { 52.3809, 0 }, -}; - -static const CoordRec char118_stroke1[] = { - { 80.9524, 66.6667 }, - { 52.3809, 0 }, -}; - -static const StrokeRec char118[] = { - { 2, char118_stroke0 }, - { 2, char118_stroke1 }, -}; - -/* char: 119 'w' */ - -static const CoordRec char119_stroke0[] = { - { 14.2857, 66.6667 }, - { 33.3333, 0 }, -}; - -static const CoordRec char119_stroke1[] = { - { 52.3809, 66.6667 }, - { 33.3333, 0 }, -}; - -static const CoordRec char119_stroke2[] = { - { 52.3809, 66.6667 }, - { 71.4286, 0 }, -}; - -static const CoordRec char119_stroke3[] = { - { 90.4762, 66.6667 }, - { 71.4286, 0 }, -}; - -static const StrokeRec char119[] = { - { 2, char119_stroke0 }, - { 2, char119_stroke1 }, - { 2, char119_stroke2 }, - { 2, char119_stroke3 }, -}; - -/* char: 120 'x' */ - -static const CoordRec char120_stroke0[] = { - { 26.1905, 66.6667 }, - { 78.5715, 0 }, -}; - -static const CoordRec char120_stroke1[] = { - { 78.5715, 66.6667 }, - { 26.1905, 0 }, -}; - -static const StrokeRec char120[] = { - { 2, char120_stroke0 }, - { 2, char120_stroke1 }, -}; - -/* char: 121 'y' */ - -static const CoordRec char121_stroke0[] = { - { 26.1905, 66.6667 }, - { 54.7619, 0 }, -}; - -static const CoordRec char121_stroke1[] = { - { 83.3334, 66.6667 }, - { 54.7619, 0 }, - { 45.2381, -19.0476 }, - { 35.7143, -28.5714 }, - { 26.1905, -33.3333 }, - { 21.4286, -33.3333 }, -}; - -static const StrokeRec char121[] = { - { 2, char121_stroke0 }, - { 6, char121_stroke1 }, -}; - -/* char: 122 'z' */ - -static const CoordRec char122_stroke0[] = { - { 78.5715, 66.6667 }, - { 26.1905, 0 }, -}; - -static const CoordRec char122_stroke1[] = { - { 26.1905, 66.6667 }, - { 78.5715, 66.6667 }, -}; - -static const CoordRec char122_stroke2[] = { - { 26.1905, 0 }, - { 78.5715, 0 }, -}; - -static const StrokeRec char122[] = { - { 2, char122_stroke0 }, - { 2, char122_stroke1 }, - { 2, char122_stroke2 }, -}; - -/* char: 123 '{' */ - -static const CoordRec char123_stroke0[] = { - { 64.2857, 119.048 }, - { 54.7619, 114.286 }, - { 50, 109.524 }, - { 45.2381, 100 }, - { 45.2381, 90.4762 }, - { 50, 80.9524 }, - { 54.7619, 76.1905 }, - { 59.5238, 66.6667 }, - { 59.5238, 57.1429 }, - { 50, 47.619 }, -}; - -static const CoordRec char123_stroke1[] = { - { 54.7619, 114.286 }, - { 50, 104.762 }, - { 50, 95.2381 }, - { 54.7619, 85.7143 }, - { 59.5238, 80.9524 }, - { 64.2857, 71.4286 }, - { 64.2857, 61.9048 }, - { 59.5238, 52.381 }, - { 40.4762, 42.8571 }, - { 59.5238, 33.3333 }, - { 64.2857, 23.8095 }, - { 64.2857, 14.2857 }, - { 59.5238, 4.7619 }, - { 54.7619, 0 }, - { 50, -9.5238 }, - { 50, -19.0476 }, - { 54.7619, -28.5714 }, -}; - -static const CoordRec char123_stroke2[] = { - { 50, 38.0952 }, - { 59.5238, 28.5714 }, - { 59.5238, 19.0476 }, - { 54.7619, 9.5238 }, - { 50, 4.7619 }, - { 45.2381, -4.7619 }, - { 45.2381, -14.2857 }, - { 50, -23.8095 }, - { 54.7619, -28.5714 }, - { 64.2857, -33.3333 }, -}; - -static const StrokeRec char123[] = { - { 10, char123_stroke0 }, - { 17, char123_stroke1 }, - { 10, char123_stroke2 }, -}; - -/* char: 124 '|' */ - -static const CoordRec char124_stroke0[] = { - { 52.381, 119.048 }, - { 52.381, -33.3333 }, -}; - -static const StrokeRec char124[] = { - { 2, char124_stroke0 }, -}; - -/* char: 125 '}' */ - -static const CoordRec char125_stroke0[] = { - { 40.4762, 119.048 }, - { 50, 114.286 }, - { 54.7619, 109.524 }, - { 59.5238, 100 }, - { 59.5238, 90.4762 }, - { 54.7619, 80.9524 }, - { 50, 76.1905 }, - { 45.2381, 66.6667 }, - { 45.2381, 57.1429 }, - { 54.7619, 47.619 }, -}; - -static const CoordRec char125_stroke1[] = { - { 50, 114.286 }, - { 54.7619, 104.762 }, - { 54.7619, 95.2381 }, - { 50, 85.7143 }, - { 45.2381, 80.9524 }, - { 40.4762, 71.4286 }, - { 40.4762, 61.9048 }, - { 45.2381, 52.381 }, - { 64.2857, 42.8571 }, - { 45.2381, 33.3333 }, - { 40.4762, 23.8095 }, - { 40.4762, 14.2857 }, - { 45.2381, 4.7619 }, - { 50, 0 }, - { 54.7619, -9.5238 }, - { 54.7619, -19.0476 }, - { 50, -28.5714 }, -}; - -static const CoordRec char125_stroke2[] = { - { 54.7619, 38.0952 }, - { 45.2381, 28.5714 }, - { 45.2381, 19.0476 }, - { 50, 9.5238 }, - { 54.7619, 4.7619 }, - { 59.5238, -4.7619 }, - { 59.5238, -14.2857 }, - { 54.7619, -23.8095 }, - { 50, -28.5714 }, - { 40.4762, -33.3333 }, -}; - -static const StrokeRec char125[] = { - { 10, char125_stroke0 }, - { 17, char125_stroke1 }, - { 10, char125_stroke2 }, -}; - -/* char: 126 '~' */ - -static const CoordRec char126_stroke0[] = { - { 9.5238, 28.5714 }, - { 9.5238, 38.0952 }, - { 14.2857, 52.381 }, - { 23.8095, 57.1429 }, - { 33.3333, 57.1429 }, - { 42.8571, 52.381 }, - { 61.9048, 38.0952 }, - { 71.4286, 33.3333 }, - { 80.9524, 33.3333 }, - { 90.4762, 38.0952 }, - { 95.2381, 47.619 }, -}; - -static const CoordRec char126_stroke1[] = { - { 9.5238, 38.0952 }, - { 14.2857, 47.619 }, - { 23.8095, 52.381 }, - { 33.3333, 52.381 }, - { 42.8571, 47.619 }, - { 61.9048, 33.3333 }, - { 71.4286, 28.5714 }, - { 80.9524, 28.5714 }, - { 90.4762, 33.3333 }, - { 95.2381, 47.619 }, - { 95.2381, 57.1429 }, -}; - -static const StrokeRec char126[] = { - { 11, char126_stroke0 }, - { 11, char126_stroke1 }, -}; - -/* char: 127 */ - -static const CoordRec char127_stroke0[] = { - { 71.4286, 100 }, - { 33.3333, -33.3333 }, -}; - -static const CoordRec char127_stroke1[] = { - { 47.619, 66.6667 }, - { 33.3333, 61.9048 }, - { 23.8095, 52.381 }, - { 19.0476, 38.0952 }, - { 19.0476, 23.8095 }, - { 23.8095, 14.2857 }, - { 33.3333, 4.7619 }, - { 47.619, 0 }, - { 57.1428, 0 }, - { 71.4286, 4.7619 }, - { 80.9524, 14.2857 }, - { 85.7143, 28.5714 }, - { 85.7143, 42.8571 }, - { 80.9524, 52.381 }, - { 71.4286, 61.9048 }, - { 57.1428, 66.6667 }, - { 47.619, 66.6667 }, -}; - -static const StrokeRec char127[] = { - { 2, char127_stroke0 }, - { 17, char127_stroke1 }, -}; - -static const StrokeCharRec chars[] = { - { 0, /* char0 */ 0, 0, 0 }, - { 0, /* char1 */ 0, 0, 0 }, - { 0, /* char2 */ 0, 0, 0 }, - { 0, /* char3 */ 0, 0, 0 }, - { 0, /* char4 */ 0, 0, 0 }, - { 0, /* char5 */ 0, 0, 0 }, - { 0, /* char6 */ 0, 0, 0 }, - { 0, /* char7 */ 0, 0, 0 }, - { 0, /* char8 */ 0, 0, 0 }, - { 0, /* char9 */ 0, 0, 0 }, - { 0, /* char10 */ 0, 0, 0 }, - { 0, /* char11 */ 0, 0, 0 }, - { 0, /* char12 */ 0, 0, 0 }, - { 0, /* char13 */ 0, 0, 0 }, - { 0, /* char14 */ 0, 0, 0 }, - { 0, /* char15 */ 0, 0, 0 }, - { 0, /* char16 */ 0, 0, 0 }, - { 0, /* char17 */ 0, 0, 0 }, - { 0, /* char18 */ 0, 0, 0 }, - { 0, /* char19 */ 0, 0, 0 }, - { 0, /* char20 */ 0, 0, 0 }, - { 0, /* char21 */ 0, 0, 0 }, - { 0, /* char22 */ 0, 0, 0 }, - { 0, /* char23 */ 0, 0, 0 }, - { 0, /* char24 */ 0, 0, 0 }, - { 0, /* char25 */ 0, 0, 0 }, - { 0, /* char26 */ 0, 0, 0 }, - { 0, /* char27 */ 0, 0, 0 }, - { 0, /* char28 */ 0, 0, 0 }, - { 0, /* char29 */ 0, 0, 0 }, - { 0, /* char30 */ 0, 0, 0 }, - { 0, /* char31 */ 0, 0, 0 }, - { 0, /* char32 */ 0, 52.381, 104.762 }, - { 2, char33, 52.381, 104.762 }, - { 2, char34, 52.381, 104.762 }, - { 4, char35, 52.381, 104.762 }, - { 3, char36, 52.381, 104.762 }, - { 3, char37, 52.381, 104.762 }, - { 1, char38, 52.381, 104.762 }, - { 1, char39, 52.381, 104.762 }, - { 1, char40, 52.381, 104.762 }, - { 1, char41, 52.381, 104.762 }, - { 3, char42, 52.381, 104.762 }, - { 2, char43, 52.381, 104.762 }, - { 1, char44, 52.381, 104.762 }, - { 1, char45, 52.381, 104.762 }, - { 1, char46, 52.381, 104.762 }, - { 1, char47, 52.381, 104.762 }, - { 1, char48, 52.381, 104.762 }, - { 1, char49, 52.381, 104.762 }, - { 1, char50, 52.381, 104.762 }, - { 1, char51, 52.381, 104.762 }, - { 2, char52, 52.381, 104.762 }, - { 1, char53, 52.381, 104.762 }, - { 1, char54, 52.381, 104.762 }, - { 2, char55, 52.381, 104.762 }, - { 1, char56, 52.381, 104.762 }, - { 1, char57, 52.381, 104.762 }, - { 2, char58, 52.381, 104.762 }, - { 2, char59, 52.381, 104.762 }, - { 1, char60, 52.381, 104.762 }, - { 2, char61, 52.381, 104.762 }, - { 1, char62, 52.381, 104.762 }, - { 2, char63, 52.381, 104.762 }, - { 2, char64, 52.381, 104.762 }, - { 3, char65, 52.381, 104.762 }, - { 3, char66, 52.381, 104.762 }, - { 1, char67, 52.381, 104.762 }, - { 2, char68, 52.381, 104.762 }, - { 4, char69, 52.381, 104.762 }, - { 3, char70, 52.381, 104.762 }, - { 2, char71, 52.381, 104.762 }, - { 3, char72, 52.381, 104.762 }, - { 1, char73, 52.381, 104.762 }, - { 1, char74, 52.381, 104.762 }, - { 3, char75, 52.381, 104.762 }, - { 2, char76, 52.381, 104.762 }, - { 4, char77, 52.381, 104.762 }, - { 3, char78, 52.381, 104.762 }, - { 1, char79, 52.381, 104.762 }, - { 2, char80, 52.381, 104.762 }, - { 2, char81, 52.381, 104.762 }, - { 3, char82, 52.381, 104.762 }, - { 1, char83, 52.381, 104.762 }, - { 2, char84, 52.381, 104.762 }, - { 1, char85, 52.381, 104.762 }, - { 2, char86, 52.381, 104.762 }, - { 4, char87, 52.381, 104.762 }, - { 2, char88, 52.381, 104.762 }, - { 2, char89, 52.381, 104.762 }, - { 3, char90, 52.381, 104.762 }, - { 4, char91, 52.381, 104.762 }, - { 1, char92, 52.381, 104.762 }, - { 4, char93, 52.381, 104.762 }, - { 2, char94, 52.381, 104.762 }, - { 1, char95, 52.381, 104.762 }, - { 2, char96, 52.381, 104.762 }, - { 2, char97, 52.381, 104.762 }, - { 2, char98, 52.381, 104.762 }, - { 1, char99, 52.381, 104.762 }, - { 2, char100, 52.381, 104.762 }, - { 1, char101, 52.381, 104.762 }, - { 2, char102, 52.381, 104.762 }, - { 2, char103, 52.381, 104.762 }, - { 2, char104, 52.381, 104.762 }, - { 2, char105, 52.381, 104.762 }, - { 2, char106, 52.381, 104.762 }, - { 3, char107, 52.381, 104.762 }, - { 1, char108, 52.381, 104.762 }, - { 3, char109, 52.381, 104.762 }, - { 2, char110, 52.381, 104.762 }, - { 1, char111, 52.381, 104.762 }, - { 2, char112, 52.381, 104.762 }, - { 2, char113, 52.381, 104.762 }, - { 2, char114, 52.381, 104.762 }, - { 1, char115, 52.381, 104.762 }, - { 2, char116, 52.381, 104.762 }, - { 2, char117, 52.381, 104.762 }, - { 2, char118, 52.381, 104.762 }, - { 4, char119, 52.381, 104.762 }, - { 2, char120, 52.381, 104.762 }, - { 2, char121, 52.381, 104.762 }, - { 3, char122, 52.381, 104.762 }, - { 3, char123, 52.381, 104.762 }, - { 1, char124, 52.381, 104.762 }, - { 3, char125, 52.381, 104.762 }, - { 2, char126, 52.381, 104.762 }, - { 2, char127, 52.381, 104.762 }, -}; - -StrokeFontRec glutStrokeMonoRoman = { "Roman", 128, chars, 119.048, -33.3333 }; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_roman.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_roman.c deleted file mode 100644 index af2b4ec956..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_roman.c +++ /dev/null @@ -1,2451 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#include "glutstroke.h" - -/* char: 33 '!' */ - -static const CoordRec char33_stroke0[] = { - { 13.3819, 100 }, - { 13.3819, 33.3333 }, -}; - -static const CoordRec char33_stroke1[] = { - { 13.3819, 9.5238 }, - { 8.62, 4.7619 }, - { 13.3819, 0 }, - { 18.1438, 4.7619 }, - { 13.3819, 9.5238 }, -}; - -static const StrokeRec char33[] = { - { 2, char33_stroke0 }, - { 5, char33_stroke1 }, -}; - -/* char: 34 '"' */ - -static const CoordRec char34_stroke0[] = { - { 4.02, 100 }, - { 4.02, 66.6667 }, -}; - -static const CoordRec char34_stroke1[] = { - { 42.1152, 100 }, - { 42.1152, 66.6667 }, -}; - -static const StrokeRec char34[] = { - { 2, char34_stroke0 }, - { 2, char34_stroke1 }, -}; - -/* char: 35 '#' */ - -static const CoordRec char35_stroke0[] = { - { 41.2952, 119.048 }, - { 7.9619, -33.3333 }, -}; - -static const CoordRec char35_stroke1[] = { - { 69.8667, 119.048 }, - { 36.5333, -33.3333 }, -}; - -static const CoordRec char35_stroke2[] = { - { 7.9619, 57.1429 }, - { 74.6286, 57.1429 }, -}; - -static const CoordRec char35_stroke3[] = { - { 3.2, 28.5714 }, - { 69.8667, 28.5714 }, -}; - -static const StrokeRec char35[] = { - { 2, char35_stroke0 }, - { 2, char35_stroke1 }, - { 2, char35_stroke2 }, - { 2, char35_stroke3 }, -}; - -/* char: 36 '$' */ - -static const CoordRec char36_stroke0[] = { - { 28.6295, 119.048 }, - { 28.6295, -19.0476 }, -}; - -static const CoordRec char36_stroke1[] = { - { 47.6771, 119.048 }, - { 47.6771, -19.0476 }, -}; - -static const CoordRec char36_stroke2[] = { - { 71.4867, 85.7143 }, - { 61.9629, 95.2381 }, - { 47.6771, 100 }, - { 28.6295, 100 }, - { 14.3438, 95.2381 }, - { 4.82, 85.7143 }, - { 4.82, 76.1905 }, - { 9.5819, 66.6667 }, - { 14.3438, 61.9048 }, - { 23.8676, 57.1429 }, - { 52.439, 47.619 }, - { 61.9629, 42.8571 }, - { 66.7248, 38.0952 }, - { 71.4867, 28.5714 }, - { 71.4867, 14.2857 }, - { 61.9629, 4.7619 }, - { 47.6771, 0 }, - { 28.6295, 0 }, - { 14.3438, 4.7619 }, - { 4.82, 14.2857 }, -}; - -static const StrokeRec char36[] = { - { 2, char36_stroke0 }, - { 2, char36_stroke1 }, - { 20, char36_stroke2 }, -}; - -/* char: 37 '%' */ - -static const CoordRec char37_stroke0[] = { - { 92.0743, 100 }, - { 6.36, 0 }, -}; - -static const CoordRec char37_stroke1[] = { - { 30.1695, 100 }, - { 39.6933, 90.4762 }, - { 39.6933, 80.9524 }, - { 34.9314, 71.4286 }, - { 25.4076, 66.6667 }, - { 15.8838, 66.6667 }, - { 6.36, 76.1905 }, - { 6.36, 85.7143 }, - { 11.1219, 95.2381 }, - { 20.6457, 100 }, - { 30.1695, 100 }, - { 39.6933, 95.2381 }, - { 53.979, 90.4762 }, - { 68.2648, 90.4762 }, - { 82.5505, 95.2381 }, - { 92.0743, 100 }, -}; - -static const CoordRec char37_stroke2[] = { - { 73.0267, 33.3333 }, - { 63.5029, 28.5714 }, - { 58.741, 19.0476 }, - { 58.741, 9.5238 }, - { 68.2648, 0 }, - { 77.7886, 0 }, - { 87.3124, 4.7619 }, - { 92.0743, 14.2857 }, - { 92.0743, 23.8095 }, - { 82.5505, 33.3333 }, - { 73.0267, 33.3333 }, -}; - -static const StrokeRec char37[] = { - { 2, char37_stroke0 }, - { 16, char37_stroke1 }, - { 11, char37_stroke2 }, -}; - -/* char: 38 '&' */ - -static const CoordRec char38_stroke0[] = { - { 101.218, 57.1429 }, - { 101.218, 61.9048 }, - { 96.4562, 66.6667 }, - { 91.6943, 66.6667 }, - { 86.9324, 61.9048 }, - { 82.1705, 52.381 }, - { 72.6467, 28.5714 }, - { 63.1229, 14.2857 }, - { 53.599, 4.7619 }, - { 44.0752, 0 }, - { 25.0276, 0 }, - { 15.5038, 4.7619 }, - { 10.7419, 9.5238 }, - { 5.98, 19.0476 }, - { 5.98, 28.5714 }, - { 10.7419, 38.0952 }, - { 15.5038, 42.8571 }, - { 48.8371, 61.9048 }, - { 53.599, 66.6667 }, - { 58.361, 76.1905 }, - { 58.361, 85.7143 }, - { 53.599, 95.2381 }, - { 44.0752, 100 }, - { 34.5514, 95.2381 }, - { 29.7895, 85.7143 }, - { 29.7895, 76.1905 }, - { 34.5514, 61.9048 }, - { 44.0752, 47.619 }, - { 67.8848, 14.2857 }, - { 77.4086, 4.7619 }, - { 86.9324, 0 }, - { 96.4562, 0 }, - { 101.218, 4.7619 }, - { 101.218, 9.5238 }, -}; - -static const StrokeRec char38[] = { - { 34, char38_stroke0 }, -}; - -/* char: 39 ''' */ - -static const CoordRec char39_stroke0[] = { - { 4.44, 100 }, - { 4.44, 66.6667 }, -}; - -static const StrokeRec char39[] = { - { 2, char39_stroke0 }, -}; - -/* char: 40 '(' */ - -static const CoordRec char40_stroke0[] = { - { 40.9133, 119.048 }, - { 31.3895, 109.524 }, - { 21.8657, 95.2381 }, - { 12.3419, 76.1905 }, - { 7.58, 52.381 }, - { 7.58, 33.3333 }, - { 12.3419, 9.5238 }, - { 21.8657, -9.5238 }, - { 31.3895, -23.8095 }, - { 40.9133, -33.3333 }, -}; - -static const StrokeRec char40[] = { - { 10, char40_stroke0 }, -}; - -/* char: 41 ')' */ - -static const CoordRec char41_stroke0[] = { - { 5.28, 119.048 }, - { 14.8038, 109.524 }, - { 24.3276, 95.2381 }, - { 33.8514, 76.1905 }, - { 38.6133, 52.381 }, - { 38.6133, 33.3333 }, - { 33.8514, 9.5238 }, - { 24.3276, -9.5238 }, - { 14.8038, -23.8095 }, - { 5.28, -33.3333 }, -}; - -static const StrokeRec char41[] = { - { 10, char41_stroke0 }, -}; - -/* char: 42 '*' */ - -static const CoordRec char42_stroke0[] = { - { 30.7695, 71.4286 }, - { 30.7695, 14.2857 }, -}; - -static const CoordRec char42_stroke1[] = { - { 6.96, 57.1429 }, - { 54.579, 28.5714 }, -}; - -static const CoordRec char42_stroke2[] = { - { 54.579, 57.1429 }, - { 6.96, 28.5714 }, -}; - -static const StrokeRec char42[] = { - { 2, char42_stroke0 }, - { 2, char42_stroke1 }, - { 2, char42_stroke2 }, -}; - -/* char: 43 '+' */ - -static const CoordRec char43_stroke0[] = { - { 48.8371, 85.7143 }, - { 48.8371, 0 }, -}; - -static const CoordRec char43_stroke1[] = { - { 5.98, 42.8571 }, - { 91.6943, 42.8571 }, -}; - -static const StrokeRec char43[] = { - { 2, char43_stroke0 }, - { 2, char43_stroke1 }, -}; - -/* char: 44 ',' */ - -static const CoordRec char44_stroke0[] = { - { 18.2838, 4.7619 }, - { 13.5219, 0 }, - { 8.76, 4.7619 }, - { 13.5219, 9.5238 }, - { 18.2838, 4.7619 }, - { 18.2838, -4.7619 }, - { 13.5219, -14.2857 }, - { 8.76, -19.0476 }, -}; - -static const StrokeRec char44[] = { - { 8, char44_stroke0 }, -}; - -/* char: 45 '-' */ - -static const CoordRec char45_stroke0[] = { - { 7.38, 42.8571 }, - { 93.0943, 42.8571 }, -}; - -static const StrokeRec char45[] = { - { 2, char45_stroke0 }, -}; - -/* char: 46 '.' */ - -static const CoordRec char46_stroke0[] = { - { 13.1019, 9.5238 }, - { 8.34, 4.7619 }, - { 13.1019, 0 }, - { 17.8638, 4.7619 }, - { 13.1019, 9.5238 }, -}; - -static const StrokeRec char46[] = { - { 5, char46_stroke0 }, -}; - -/* char: 47 '/' */ - -static const CoordRec char47_stroke0[] = { - { 7.24, -14.2857 }, - { 73.9067, 100 }, -}; - -static const StrokeRec char47[] = { - { 2, char47_stroke0 }, -}; - -/* char: 48 '0' */ - -static const CoordRec char48_stroke0[] = { - { 33.5514, 100 }, - { 19.2657, 95.2381 }, - { 9.7419, 80.9524 }, - { 4.98, 57.1429 }, - { 4.98, 42.8571 }, - { 9.7419, 19.0476 }, - { 19.2657, 4.7619 }, - { 33.5514, 0 }, - { 43.0752, 0 }, - { 57.361, 4.7619 }, - { 66.8848, 19.0476 }, - { 71.6467, 42.8571 }, - { 71.6467, 57.1429 }, - { 66.8848, 80.9524 }, - { 57.361, 95.2381 }, - { 43.0752, 100 }, - { 33.5514, 100 }, -}; - -static const StrokeRec char48[] = { - { 17, char48_stroke0 }, -}; - -/* char: 49 '1' */ - -static const CoordRec char49_stroke0[] = { - { 11.82, 80.9524 }, - { 21.3438, 85.7143 }, - { 35.6295, 100 }, - { 35.6295, 0 }, -}; - -static const StrokeRec char49[] = { - { 4, char49_stroke0 }, -}; - -/* char: 50 '2' */ - -static const CoordRec char50_stroke0[] = { - { 10.1819, 76.1905 }, - { 10.1819, 80.9524 }, - { 14.9438, 90.4762 }, - { 19.7057, 95.2381 }, - { 29.2295, 100 }, - { 48.2771, 100 }, - { 57.801, 95.2381 }, - { 62.5629, 90.4762 }, - { 67.3248, 80.9524 }, - { 67.3248, 71.4286 }, - { 62.5629, 61.9048 }, - { 53.039, 47.619 }, - { 5.42, 0 }, - { 72.0867, 0 }, -}; - -static const StrokeRec char50[] = { - { 14, char50_stroke0 }, -}; - -/* char: 51 '3' */ - -static const CoordRec char51_stroke0[] = { - { 14.5238, 100 }, - { 66.9048, 100 }, - { 38.3333, 61.9048 }, - { 52.619, 61.9048 }, - { 62.1429, 57.1429 }, - { 66.9048, 52.381 }, - { 71.6667, 38.0952 }, - { 71.6667, 28.5714 }, - { 66.9048, 14.2857 }, - { 57.381, 4.7619 }, - { 43.0952, 0 }, - { 28.8095, 0 }, - { 14.5238, 4.7619 }, - { 9.7619, 9.5238 }, - { 5, 19.0476 }, -}; - -static const StrokeRec char51[] = { - { 15, char51_stroke0 }, -}; - -/* char: 52 '4' */ - -static const CoordRec char52_stroke0[] = { - { 51.499, 100 }, - { 3.88, 33.3333 }, - { 75.3086, 33.3333 }, -}; - -static const CoordRec char52_stroke1[] = { - { 51.499, 100 }, - { 51.499, 0 }, -}; - -static const StrokeRec char52[] = { - { 3, char52_stroke0 }, - { 2, char52_stroke1 }, -}; - -/* char: 53 '5' */ - -static const CoordRec char53_stroke0[] = { - { 62.0029, 100 }, - { 14.3838, 100 }, - { 9.6219, 57.1429 }, - { 14.3838, 61.9048 }, - { 28.6695, 66.6667 }, - { 42.9552, 66.6667 }, - { 57.241, 61.9048 }, - { 66.7648, 52.381 }, - { 71.5267, 38.0952 }, - { 71.5267, 28.5714 }, - { 66.7648, 14.2857 }, - { 57.241, 4.7619 }, - { 42.9552, 0 }, - { 28.6695, 0 }, - { 14.3838, 4.7619 }, - { 9.6219, 9.5238 }, - { 4.86, 19.0476 }, -}; - -static const StrokeRec char53[] = { - { 17, char53_stroke0 }, -}; - -/* char: 54 '6' */ - -static const CoordRec char54_stroke0[] = { - { 62.7229, 85.7143 }, - { 57.961, 95.2381 }, - { 43.6752, 100 }, - { 34.1514, 100 }, - { 19.8657, 95.2381 }, - { 10.3419, 80.9524 }, - { 5.58, 57.1429 }, - { 5.58, 33.3333 }, - { 10.3419, 14.2857 }, - { 19.8657, 4.7619 }, - { 34.1514, 0 }, - { 38.9133, 0 }, - { 53.199, 4.7619 }, - { 62.7229, 14.2857 }, - { 67.4848, 28.5714 }, - { 67.4848, 33.3333 }, - { 62.7229, 47.619 }, - { 53.199, 57.1429 }, - { 38.9133, 61.9048 }, - { 34.1514, 61.9048 }, - { 19.8657, 57.1429 }, - { 10.3419, 47.619 }, - { 5.58, 33.3333 }, -}; - -static const StrokeRec char54[] = { - { 23, char54_stroke0 }, -}; - -/* char: 55 '7' */ - -static const CoordRec char55_stroke0[] = { - { 72.2267, 100 }, - { 24.6076, 0 }, -}; - -static const CoordRec char55_stroke1[] = { - { 5.56, 100 }, - { 72.2267, 100 }, -}; - -static const StrokeRec char55[] = { - { 2, char55_stroke0 }, - { 2, char55_stroke1 }, -}; - -/* char: 56 '8' */ - -static const CoordRec char56_stroke0[] = { - { 29.4095, 100 }, - { 15.1238, 95.2381 }, - { 10.3619, 85.7143 }, - { 10.3619, 76.1905 }, - { 15.1238, 66.6667 }, - { 24.6476, 61.9048 }, - { 43.6952, 57.1429 }, - { 57.981, 52.381 }, - { 67.5048, 42.8571 }, - { 72.2667, 33.3333 }, - { 72.2667, 19.0476 }, - { 67.5048, 9.5238 }, - { 62.7429, 4.7619 }, - { 48.4571, 0 }, - { 29.4095, 0 }, - { 15.1238, 4.7619 }, - { 10.3619, 9.5238 }, - { 5.6, 19.0476 }, - { 5.6, 33.3333 }, - { 10.3619, 42.8571 }, - { 19.8857, 52.381 }, - { 34.1714, 57.1429 }, - { 53.219, 61.9048 }, - { 62.7429, 66.6667 }, - { 67.5048, 76.1905 }, - { 67.5048, 85.7143 }, - { 62.7429, 95.2381 }, - { 48.4571, 100 }, - { 29.4095, 100 }, -}; - -static const StrokeRec char56[] = { - { 29, char56_stroke0 }, -}; - -/* char: 57 '9' */ - -static const CoordRec char57_stroke0[] = { - { 68.5048, 66.6667 }, - { 63.7429, 52.381 }, - { 54.219, 42.8571 }, - { 39.9333, 38.0952 }, - { 35.1714, 38.0952 }, - { 20.8857, 42.8571 }, - { 11.3619, 52.381 }, - { 6.6, 66.6667 }, - { 6.6, 71.4286 }, - { 11.3619, 85.7143 }, - { 20.8857, 95.2381 }, - { 35.1714, 100 }, - { 39.9333, 100 }, - { 54.219, 95.2381 }, - { 63.7429, 85.7143 }, - { 68.5048, 66.6667 }, - { 68.5048, 42.8571 }, - { 63.7429, 19.0476 }, - { 54.219, 4.7619 }, - { 39.9333, 0 }, - { 30.4095, 0 }, - { 16.1238, 4.7619 }, - { 11.3619, 14.2857 }, -}; - -static const StrokeRec char57[] = { - { 23, char57_stroke0 }, -}; - -/* char: 58 ':' */ - -static const CoordRec char58_stroke0[] = { - { 14.0819, 66.6667 }, - { 9.32, 61.9048 }, - { 14.0819, 57.1429 }, - { 18.8438, 61.9048 }, - { 14.0819, 66.6667 }, -}; - -static const CoordRec char58_stroke1[] = { - { 14.0819, 9.5238 }, - { 9.32, 4.7619 }, - { 14.0819, 0 }, - { 18.8438, 4.7619 }, - { 14.0819, 9.5238 }, -}; - -static const StrokeRec char58[] = { - { 5, char58_stroke0 }, - { 5, char58_stroke1 }, -}; - -/* char: 59 ';' */ - -static const CoordRec char59_stroke0[] = { - { 12.9619, 66.6667 }, - { 8.2, 61.9048 }, - { 12.9619, 57.1429 }, - { 17.7238, 61.9048 }, - { 12.9619, 66.6667 }, -}; - -static const CoordRec char59_stroke1[] = { - { 17.7238, 4.7619 }, - { 12.9619, 0 }, - { 8.2, 4.7619 }, - { 12.9619, 9.5238 }, - { 17.7238, 4.7619 }, - { 17.7238, -4.7619 }, - { 12.9619, -14.2857 }, - { 8.2, -19.0476 }, -}; - -static const StrokeRec char59[] = { - { 5, char59_stroke0 }, - { 8, char59_stroke1 }, -}; - -/* char: 60 '<' */ - -static const CoordRec char60_stroke0[] = { - { 79.2505, 85.7143 }, - { 3.06, 42.8571 }, - { 79.2505, 0 }, -}; - -static const StrokeRec char60[] = { - { 3, char60_stroke0 }, -}; - -/* char: 61 '=' */ - -static const CoordRec char61_stroke0[] = { - { 5.7, 57.1429 }, - { 91.4143, 57.1429 }, -}; - -static const CoordRec char61_stroke1[] = { - { 5.7, 28.5714 }, - { 91.4143, 28.5714 }, -}; - -static const StrokeRec char61[] = { - { 2, char61_stroke0 }, - { 2, char61_stroke1 }, -}; - -/* char: 62 '>' */ - -static const CoordRec char62_stroke0[] = { - { 2.78, 85.7143 }, - { 78.9705, 42.8571 }, - { 2.78, 0 }, -}; - -static const StrokeRec char62[] = { - { 3, char62_stroke0 }, -}; - -/* char: 63 '?' */ - -static const CoordRec char63_stroke0[] = { - { 8.42, 76.1905 }, - { 8.42, 80.9524 }, - { 13.1819, 90.4762 }, - { 17.9438, 95.2381 }, - { 27.4676, 100 }, - { 46.5152, 100 }, - { 56.039, 95.2381 }, - { 60.801, 90.4762 }, - { 65.5629, 80.9524 }, - { 65.5629, 71.4286 }, - { 60.801, 61.9048 }, - { 56.039, 57.1429 }, - { 36.9914, 47.619 }, - { 36.9914, 33.3333 }, -}; - -static const CoordRec char63_stroke1[] = { - { 36.9914, 9.5238 }, - { 32.2295, 4.7619 }, - { 36.9914, 0 }, - { 41.7533, 4.7619 }, - { 36.9914, 9.5238 }, -}; - -static const StrokeRec char63[] = { - { 14, char63_stroke0 }, - { 5, char63_stroke1 }, -}; - -/* char: 64 '@' */ - -static const CoordRec char64_stroke0[] = { - { 49.2171, 52.381 }, - { 39.6933, 57.1429 }, - { 30.1695, 57.1429 }, - { 25.4076, 47.619 }, - { 25.4076, 42.8571 }, - { 30.1695, 33.3333 }, - { 39.6933, 33.3333 }, - { 49.2171, 38.0952 }, -}; - -static const CoordRec char64_stroke1[] = { - { 49.2171, 57.1429 }, - { 49.2171, 38.0952 }, - { 53.979, 33.3333 }, - { 63.5029, 33.3333 }, - { 68.2648, 42.8571 }, - { 68.2648, 47.619 }, - { 63.5029, 61.9048 }, - { 53.979, 71.4286 }, - { 39.6933, 76.1905 }, - { 34.9314, 76.1905 }, - { 20.6457, 71.4286 }, - { 11.1219, 61.9048 }, - { 6.36, 47.619 }, - { 6.36, 42.8571 }, - { 11.1219, 28.5714 }, - { 20.6457, 19.0476 }, - { 34.9314, 14.2857 }, - { 39.6933, 14.2857 }, - { 53.979, 19.0476 }, -}; - -static const StrokeRec char64[] = { - { 8, char64_stroke0 }, - { 19, char64_stroke1 }, -}; - -/* char: 65 'A' */ - -static const CoordRec char65_stroke0[] = { - { 40.5952, 100 }, - { 2.5, 0 }, -}; - -static const CoordRec char65_stroke1[] = { - { 40.5952, 100 }, - { 78.6905, 0 }, -}; - -static const CoordRec char65_stroke2[] = { - { 16.7857, 33.3333 }, - { 64.4048, 33.3333 }, -}; - -static const StrokeRec char65[] = { - { 2, char65_stroke0 }, - { 2, char65_stroke1 }, - { 2, char65_stroke2 }, -}; - -/* char: 66 'B' */ - -static const CoordRec char66_stroke0[] = { - { 11.42, 100 }, - { 11.42, 0 }, -}; - -static const CoordRec char66_stroke1[] = { - { 11.42, 100 }, - { 54.2771, 100 }, - { 68.5629, 95.2381 }, - { 73.3248, 90.4762 }, - { 78.0867, 80.9524 }, - { 78.0867, 71.4286 }, - { 73.3248, 61.9048 }, - { 68.5629, 57.1429 }, - { 54.2771, 52.381 }, -}; - -static const CoordRec char66_stroke2[] = { - { 11.42, 52.381 }, - { 54.2771, 52.381 }, - { 68.5629, 47.619 }, - { 73.3248, 42.8571 }, - { 78.0867, 33.3333 }, - { 78.0867, 19.0476 }, - { 73.3248, 9.5238 }, - { 68.5629, 4.7619 }, - { 54.2771, 0 }, - { 11.42, 0 }, -}; - -static const StrokeRec char66[] = { - { 2, char66_stroke0 }, - { 9, char66_stroke1 }, - { 10, char66_stroke2 }, -}; - -/* char: 67 'C' */ - -static const CoordRec char67_stroke0[] = { - { 78.0886, 76.1905 }, - { 73.3267, 85.7143 }, - { 63.8029, 95.2381 }, - { 54.279, 100 }, - { 35.2314, 100 }, - { 25.7076, 95.2381 }, - { 16.1838, 85.7143 }, - { 11.4219, 76.1905 }, - { 6.66, 61.9048 }, - { 6.66, 38.0952 }, - { 11.4219, 23.8095 }, - { 16.1838, 14.2857 }, - { 25.7076, 4.7619 }, - { 35.2314, 0 }, - { 54.279, 0 }, - { 63.8029, 4.7619 }, - { 73.3267, 14.2857 }, - { 78.0886, 23.8095 }, -}; - -static const StrokeRec char67[] = { - { 18, char67_stroke0 }, -}; - -/* char: 68 'D' */ - -static const CoordRec char68_stroke0[] = { - { 11.96, 100 }, - { 11.96, 0 }, -}; - -static const CoordRec char68_stroke1[] = { - { 11.96, 100 }, - { 45.2933, 100 }, - { 59.579, 95.2381 }, - { 69.1029, 85.7143 }, - { 73.8648, 76.1905 }, - { 78.6267, 61.9048 }, - { 78.6267, 38.0952 }, - { 73.8648, 23.8095 }, - { 69.1029, 14.2857 }, - { 59.579, 4.7619 }, - { 45.2933, 0 }, - { 11.96, 0 }, -}; - -static const StrokeRec char68[] = { - { 2, char68_stroke0 }, - { 12, char68_stroke1 }, -}; - -/* char: 69 'E' */ - -static const CoordRec char69_stroke0[] = { - { 11.42, 100 }, - { 11.42, 0 }, -}; - -static const CoordRec char69_stroke1[] = { - { 11.42, 100 }, - { 73.3248, 100 }, -}; - -static const CoordRec char69_stroke2[] = { - { 11.42, 52.381 }, - { 49.5152, 52.381 }, -}; - -static const CoordRec char69_stroke3[] = { - { 11.42, 0 }, - { 73.3248, 0 }, -}; - -static const StrokeRec char69[] = { - { 2, char69_stroke0 }, - { 2, char69_stroke1 }, - { 2, char69_stroke2 }, - { 2, char69_stroke3 }, -}; - -/* char: 70 'F' */ - -static const CoordRec char70_stroke0[] = { - { 11.42, 100 }, - { 11.42, 0 }, -}; - -static const CoordRec char70_stroke1[] = { - { 11.42, 100 }, - { 73.3248, 100 }, -}; - -static const CoordRec char70_stroke2[] = { - { 11.42, 52.381 }, - { 49.5152, 52.381 }, -}; - -static const StrokeRec char70[] = { - { 2, char70_stroke0 }, - { 2, char70_stroke1 }, - { 2, char70_stroke2 }, -}; - -/* char: 71 'G' */ - -static const CoordRec char71_stroke0[] = { - { 78.4886, 76.1905 }, - { 73.7267, 85.7143 }, - { 64.2029, 95.2381 }, - { 54.679, 100 }, - { 35.6314, 100 }, - { 26.1076, 95.2381 }, - { 16.5838, 85.7143 }, - { 11.8219, 76.1905 }, - { 7.06, 61.9048 }, - { 7.06, 38.0952 }, - { 11.8219, 23.8095 }, - { 16.5838, 14.2857 }, - { 26.1076, 4.7619 }, - { 35.6314, 0 }, - { 54.679, 0 }, - { 64.2029, 4.7619 }, - { 73.7267, 14.2857 }, - { 78.4886, 23.8095 }, - { 78.4886, 38.0952 }, -}; - -static const CoordRec char71_stroke1[] = { - { 54.679, 38.0952 }, - { 78.4886, 38.0952 }, -}; - -static const StrokeRec char71[] = { - { 19, char71_stroke0 }, - { 2, char71_stroke1 }, -}; - -/* char: 72 'H' */ - -static const CoordRec char72_stroke0[] = { - { 11.42, 100 }, - { 11.42, 0 }, -}; - -static const CoordRec char72_stroke1[] = { - { 78.0867, 100 }, - { 78.0867, 0 }, -}; - -static const CoordRec char72_stroke2[] = { - { 11.42, 52.381 }, - { 78.0867, 52.381 }, -}; - -static const StrokeRec char72[] = { - { 2, char72_stroke0 }, - { 2, char72_stroke1 }, - { 2, char72_stroke2 }, -}; - -/* char: 73 'I' */ - -static const CoordRec char73_stroke0[] = { - { 10.86, 100 }, - { 10.86, 0 }, -}; - -static const StrokeRec char73[] = { - { 2, char73_stroke0 }, -}; - -/* char: 74 'J' */ - -static const CoordRec char74_stroke0[] = { - { 50.119, 100 }, - { 50.119, 23.8095 }, - { 45.3571, 9.5238 }, - { 40.5952, 4.7619 }, - { 31.0714, 0 }, - { 21.5476, 0 }, - { 12.0238, 4.7619 }, - { 7.2619, 9.5238 }, - { 2.5, 23.8095 }, - { 2.5, 33.3333 }, -}; - -static const StrokeRec char74[] = { - { 10, char74_stroke0 }, -}; - -/* char: 75 'K' */ - -static const CoordRec char75_stroke0[] = { - { 11.28, 100 }, - { 11.28, 0 }, -}; - -static const CoordRec char75_stroke1[] = { - { 77.9467, 100 }, - { 11.28, 33.3333 }, -}; - -static const CoordRec char75_stroke2[] = { - { 35.0895, 57.1429 }, - { 77.9467, 0 }, -}; - -static const StrokeRec char75[] = { - { 2, char75_stroke0 }, - { 2, char75_stroke1 }, - { 2, char75_stroke2 }, -}; - -/* char: 76 'L' */ - -static const CoordRec char76_stroke0[] = { - { 11.68, 100 }, - { 11.68, 0 }, -}; - -static const CoordRec char76_stroke1[] = { - { 11.68, 0 }, - { 68.8229, 0 }, -}; - -static const StrokeRec char76[] = { - { 2, char76_stroke0 }, - { 2, char76_stroke1 }, -}; - -/* char: 77 'M' */ - -static const CoordRec char77_stroke0[] = { - { 10.86, 100 }, - { 10.86, 0 }, -}; - -static const CoordRec char77_stroke1[] = { - { 10.86, 100 }, - { 48.9552, 0 }, -}; - -static const CoordRec char77_stroke2[] = { - { 87.0505, 100 }, - { 48.9552, 0 }, -}; - -static const CoordRec char77_stroke3[] = { - { 87.0505, 100 }, - { 87.0505, 0 }, -}; - -static const StrokeRec char77[] = { - { 2, char77_stroke0 }, - { 2, char77_stroke1 }, - { 2, char77_stroke2 }, - { 2, char77_stroke3 }, -}; - -/* char: 78 'N' */ - -static const CoordRec char78_stroke0[] = { - { 11.14, 100 }, - { 11.14, 0 }, -}; - -static const CoordRec char78_stroke1[] = { - { 11.14, 100 }, - { 77.8067, 0 }, -}; - -static const CoordRec char78_stroke2[] = { - { 77.8067, 100 }, - { 77.8067, 0 }, -}; - -static const StrokeRec char78[] = { - { 2, char78_stroke0 }, - { 2, char78_stroke1 }, - { 2, char78_stroke2 }, -}; - -/* char: 79 'O' */ - -static const CoordRec char79_stroke0[] = { - { 34.8114, 100 }, - { 25.2876, 95.2381 }, - { 15.7638, 85.7143 }, - { 11.0019, 76.1905 }, - { 6.24, 61.9048 }, - { 6.24, 38.0952 }, - { 11.0019, 23.8095 }, - { 15.7638, 14.2857 }, - { 25.2876, 4.7619 }, - { 34.8114, 0 }, - { 53.859, 0 }, - { 63.3829, 4.7619 }, - { 72.9067, 14.2857 }, - { 77.6686, 23.8095 }, - { 82.4305, 38.0952 }, - { 82.4305, 61.9048 }, - { 77.6686, 76.1905 }, - { 72.9067, 85.7143 }, - { 63.3829, 95.2381 }, - { 53.859, 100 }, - { 34.8114, 100 }, -}; - -static const StrokeRec char79[] = { - { 21, char79_stroke0 }, -}; - -/* char: 80 'P' */ - -static const CoordRec char80_stroke0[] = { - { 12.1, 100 }, - { 12.1, 0 }, -}; - -static const CoordRec char80_stroke1[] = { - { 12.1, 100 }, - { 54.9571, 100 }, - { 69.2429, 95.2381 }, - { 74.0048, 90.4762 }, - { 78.7667, 80.9524 }, - { 78.7667, 66.6667 }, - { 74.0048, 57.1429 }, - { 69.2429, 52.381 }, - { 54.9571, 47.619 }, - { 12.1, 47.619 }, -}; - -static const StrokeRec char80[] = { - { 2, char80_stroke0 }, - { 10, char80_stroke1 }, -}; - -/* char: 81 'Q' */ - -static const CoordRec char81_stroke0[] = { - { 33.8714, 100 }, - { 24.3476, 95.2381 }, - { 14.8238, 85.7143 }, - { 10.0619, 76.1905 }, - { 5.3, 61.9048 }, - { 5.3, 38.0952 }, - { 10.0619, 23.8095 }, - { 14.8238, 14.2857 }, - { 24.3476, 4.7619 }, - { 33.8714, 0 }, - { 52.919, 0 }, - { 62.4429, 4.7619 }, - { 71.9667, 14.2857 }, - { 76.7286, 23.8095 }, - { 81.4905, 38.0952 }, - { 81.4905, 61.9048 }, - { 76.7286, 76.1905 }, - { 71.9667, 85.7143 }, - { 62.4429, 95.2381 }, - { 52.919, 100 }, - { 33.8714, 100 }, -}; - -static const CoordRec char81_stroke1[] = { - { 48.1571, 19.0476 }, - { 76.7286, -9.5238 }, -}; - -static const StrokeRec char81[] = { - { 21, char81_stroke0 }, - { 2, char81_stroke1 }, -}; - -/* char: 82 'R' */ - -static const CoordRec char82_stroke0[] = { - { 11.68, 100 }, - { 11.68, 0 }, -}; - -static const CoordRec char82_stroke1[] = { - { 11.68, 100 }, - { 54.5371, 100 }, - { 68.8229, 95.2381 }, - { 73.5848, 90.4762 }, - { 78.3467, 80.9524 }, - { 78.3467, 71.4286 }, - { 73.5848, 61.9048 }, - { 68.8229, 57.1429 }, - { 54.5371, 52.381 }, - { 11.68, 52.381 }, -}; - -static const CoordRec char82_stroke2[] = { - { 45.0133, 52.381 }, - { 78.3467, 0 }, -}; - -static const StrokeRec char82[] = { - { 2, char82_stroke0 }, - { 10, char82_stroke1 }, - { 2, char82_stroke2 }, -}; - -/* char: 83 'S' */ - -static const CoordRec char83_stroke0[] = { - { 74.6667, 85.7143 }, - { 65.1429, 95.2381 }, - { 50.8571, 100 }, - { 31.8095, 100 }, - { 17.5238, 95.2381 }, - { 8, 85.7143 }, - { 8, 76.1905 }, - { 12.7619, 66.6667 }, - { 17.5238, 61.9048 }, - { 27.0476, 57.1429 }, - { 55.619, 47.619 }, - { 65.1429, 42.8571 }, - { 69.9048, 38.0952 }, - { 74.6667, 28.5714 }, - { 74.6667, 14.2857 }, - { 65.1429, 4.7619 }, - { 50.8571, 0 }, - { 31.8095, 0 }, - { 17.5238, 4.7619 }, - { 8, 14.2857 }, -}; - -static const StrokeRec char83[] = { - { 20, char83_stroke0 }, -}; - -/* char: 84 'T' */ - -static const CoordRec char84_stroke0[] = { - { 35.6933, 100 }, - { 35.6933, 0 }, -}; - -static const CoordRec char84_stroke1[] = { - { 2.36, 100 }, - { 69.0267, 100 }, -}; - -static const StrokeRec char84[] = { - { 2, char84_stroke0 }, - { 2, char84_stroke1 }, -}; - -/* char: 85 'U' */ - -static const CoordRec char85_stroke0[] = { - { 11.54, 100 }, - { 11.54, 28.5714 }, - { 16.3019, 14.2857 }, - { 25.8257, 4.7619 }, - { 40.1114, 0 }, - { 49.6352, 0 }, - { 63.921, 4.7619 }, - { 73.4448, 14.2857 }, - { 78.2067, 28.5714 }, - { 78.2067, 100 }, -}; - -static const StrokeRec char85[] = { - { 10, char85_stroke0 }, -}; - -/* char: 86 'V' */ - -static const CoordRec char86_stroke0[] = { - { 2.36, 100 }, - { 40.4552, 0 }, -}; - -static const CoordRec char86_stroke1[] = { - { 78.5505, 100 }, - { 40.4552, 0 }, -}; - -static const StrokeRec char86[] = { - { 2, char86_stroke0 }, - { 2, char86_stroke1 }, -}; - -/* char: 87 'W' */ - -static const CoordRec char87_stroke0[] = { - { 2.22, 100 }, - { 26.0295, 0 }, -}; - -static const CoordRec char87_stroke1[] = { - { 49.839, 100 }, - { 26.0295, 0 }, -}; - -static const CoordRec char87_stroke2[] = { - { 49.839, 100 }, - { 73.6486, 0 }, -}; - -static const CoordRec char87_stroke3[] = { - { 97.4581, 100 }, - { 73.6486, 0 }, -}; - -static const StrokeRec char87[] = { - { 2, char87_stroke0 }, - { 2, char87_stroke1 }, - { 2, char87_stroke2 }, - { 2, char87_stroke3 }, -}; - -/* char: 88 'X' */ - -static const CoordRec char88_stroke0[] = { - { 2.5, 100 }, - { 69.1667, 0 }, -}; - -static const CoordRec char88_stroke1[] = { - { 69.1667, 100 }, - { 2.5, 0 }, -}; - -static const StrokeRec char88[] = { - { 2, char88_stroke0 }, - { 2, char88_stroke1 }, -}; - -/* char: 89 'Y' */ - -static const CoordRec char89_stroke0[] = { - { 1.52, 100 }, - { 39.6152, 52.381 }, - { 39.6152, 0 }, -}; - -static const CoordRec char89_stroke1[] = { - { 77.7105, 100 }, - { 39.6152, 52.381 }, -}; - -static const StrokeRec char89[] = { - { 3, char89_stroke0 }, - { 2, char89_stroke1 }, -}; - -/* char: 90 'Z' */ - -static const CoordRec char90_stroke0[] = { - { 69.1667, 100 }, - { 2.5, 0 }, -}; - -static const CoordRec char90_stroke1[] = { - { 2.5, 100 }, - { 69.1667, 100 }, -}; - -static const CoordRec char90_stroke2[] = { - { 2.5, 0 }, - { 69.1667, 0 }, -}; - -static const StrokeRec char90[] = { - { 2, char90_stroke0 }, - { 2, char90_stroke1 }, - { 2, char90_stroke2 }, -}; - -/* char: 91 '[' */ - -static const CoordRec char91_stroke0[] = { - { 7.78, 119.048 }, - { 7.78, -33.3333 }, -}; - -static const CoordRec char91_stroke1[] = { - { 12.5419, 119.048 }, - { 12.5419, -33.3333 }, -}; - -static const CoordRec char91_stroke2[] = { - { 7.78, 119.048 }, - { 41.1133, 119.048 }, -}; - -static const CoordRec char91_stroke3[] = { - { 7.78, -33.3333 }, - { 41.1133, -33.3333 }, -}; - -static const StrokeRec char91[] = { - { 2, char91_stroke0 }, - { 2, char91_stroke1 }, - { 2, char91_stroke2 }, - { 2, char91_stroke3 }, -}; - -/* char: 92 '\' */ - -static const CoordRec char92_stroke0[] = { - { 5.84, 100 }, - { 72.5067, -14.2857 }, -}; - -static const StrokeRec char92[] = { - { 2, char92_stroke0 }, -}; - -/* char: 93 ']' */ - -static const CoordRec char93_stroke0[] = { - { 33.0114, 119.048 }, - { 33.0114, -33.3333 }, -}; - -static const CoordRec char93_stroke1[] = { - { 37.7733, 119.048 }, - { 37.7733, -33.3333 }, -}; - -static const CoordRec char93_stroke2[] = { - { 4.44, 119.048 }, - { 37.7733, 119.048 }, -}; - -static const CoordRec char93_stroke3[] = { - { 4.44, -33.3333 }, - { 37.7733, -33.3333 }, -}; - -static const StrokeRec char93[] = { - { 2, char93_stroke0 }, - { 2, char93_stroke1 }, - { 2, char93_stroke2 }, - { 2, char93_stroke3 }, -}; - -/* char: 94 '^' */ - -static const CoordRec char94_stroke0[] = { - { 44.0752, 109.524 }, - { 5.98, 42.8571 }, -}; - -static const CoordRec char94_stroke1[] = { - { 44.0752, 109.524 }, - { 82.1705, 42.8571 }, -}; - -static const StrokeRec char94[] = { - { 2, char94_stroke0 }, - { 2, char94_stroke1 }, -}; - -/* char: 95 '_' */ - -static const CoordRec char95_stroke0[] = { - { -1.1, -33.3333 }, - { 103.662, -33.3333 }, - { 103.662, -28.5714 }, - { -1.1, -28.5714 }, - { -1.1, -33.3333 }, -}; - -static const StrokeRec char95[] = { - { 5, char95_stroke0 }, -}; - -/* char: 96 '`' */ - -static const CoordRec char96_stroke0[] = { - { 33.0219, 100 }, - { 56.8314, 71.4286 }, -}; - -static const CoordRec char96_stroke1[] = { - { 33.0219, 100 }, - { 28.26, 95.2381 }, - { 56.8314, 71.4286 }, -}; - -static const StrokeRec char96[] = { - { 2, char96_stroke0 }, - { 3, char96_stroke1 }, -}; - -/* char: 97 'a' */ - -static const CoordRec char97_stroke0[] = { - { 63.8229, 66.6667 }, - { 63.8229, 0 }, -}; - -static const CoordRec char97_stroke1[] = { - { 63.8229, 52.381 }, - { 54.299, 61.9048 }, - { 44.7752, 66.6667 }, - { 30.4895, 66.6667 }, - { 20.9657, 61.9048 }, - { 11.4419, 52.381 }, - { 6.68, 38.0952 }, - { 6.68, 28.5714 }, - { 11.4419, 14.2857 }, - { 20.9657, 4.7619 }, - { 30.4895, 0 }, - { 44.7752, 0 }, - { 54.299, 4.7619 }, - { 63.8229, 14.2857 }, -}; - -static const StrokeRec char97[] = { - { 2, char97_stroke0 }, - { 14, char97_stroke1 }, -}; - -/* char: 98 'b' */ - -static const CoordRec char98_stroke0[] = { - { 8.76, 100 }, - { 8.76, 0 }, -}; - -static const CoordRec char98_stroke1[] = { - { 8.76, 52.381 }, - { 18.2838, 61.9048 }, - { 27.8076, 66.6667 }, - { 42.0933, 66.6667 }, - { 51.6171, 61.9048 }, - { 61.141, 52.381 }, - { 65.9029, 38.0952 }, - { 65.9029, 28.5714 }, - { 61.141, 14.2857 }, - { 51.6171, 4.7619 }, - { 42.0933, 0 }, - { 27.8076, 0 }, - { 18.2838, 4.7619 }, - { 8.76, 14.2857 }, -}; - -static const StrokeRec char98[] = { - { 2, char98_stroke0 }, - { 14, char98_stroke1 }, -}; - -/* char: 99 'c' */ - -static const CoordRec char99_stroke0[] = { - { 62.6629, 52.381 }, - { 53.139, 61.9048 }, - { 43.6152, 66.6667 }, - { 29.3295, 66.6667 }, - { 19.8057, 61.9048 }, - { 10.2819, 52.381 }, - { 5.52, 38.0952 }, - { 5.52, 28.5714 }, - { 10.2819, 14.2857 }, - { 19.8057, 4.7619 }, - { 29.3295, 0 }, - { 43.6152, 0 }, - { 53.139, 4.7619 }, - { 62.6629, 14.2857 }, -}; - -static const StrokeRec char99[] = { - { 14, char99_stroke0 }, -}; - -/* char: 100 'd' */ - -static const CoordRec char100_stroke0[] = { - { 61.7829, 100 }, - { 61.7829, 0 }, -}; - -static const CoordRec char100_stroke1[] = { - { 61.7829, 52.381 }, - { 52.259, 61.9048 }, - { 42.7352, 66.6667 }, - { 28.4495, 66.6667 }, - { 18.9257, 61.9048 }, - { 9.4019, 52.381 }, - { 4.64, 38.0952 }, - { 4.64, 28.5714 }, - { 9.4019, 14.2857 }, - { 18.9257, 4.7619 }, - { 28.4495, 0 }, - { 42.7352, 0 }, - { 52.259, 4.7619 }, - { 61.7829, 14.2857 }, -}; - -static const StrokeRec char100[] = { - { 2, char100_stroke0 }, - { 14, char100_stroke1 }, -}; - -/* char: 101 'e' */ - -static const CoordRec char101_stroke0[] = { - { 5.72, 38.0952 }, - { 62.8629, 38.0952 }, - { 62.8629, 47.619 }, - { 58.101, 57.1429 }, - { 53.339, 61.9048 }, - { 43.8152, 66.6667 }, - { 29.5295, 66.6667 }, - { 20.0057, 61.9048 }, - { 10.4819, 52.381 }, - { 5.72, 38.0952 }, - { 5.72, 28.5714 }, - { 10.4819, 14.2857 }, - { 20.0057, 4.7619 }, - { 29.5295, 0 }, - { 43.8152, 0 }, - { 53.339, 4.7619 }, - { 62.8629, 14.2857 }, -}; - -static const StrokeRec char101[] = { - { 17, char101_stroke0 }, -}; - -/* char: 102 'f' */ - -static const CoordRec char102_stroke0[] = { - { 38.7752, 100 }, - { 29.2514, 100 }, - { 19.7276, 95.2381 }, - { 14.9657, 80.9524 }, - { 14.9657, 0 }, -}; - -static const CoordRec char102_stroke1[] = { - { 0.68, 66.6667 }, - { 34.0133, 66.6667 }, -}; - -static const StrokeRec char102[] = { - { 5, char102_stroke0 }, - { 2, char102_stroke1 }, -}; - -/* char: 103 'g' */ - -static const CoordRec char103_stroke0[] = { - { 62.5029, 66.6667 }, - { 62.5029, -9.5238 }, - { 57.741, -23.8095 }, - { 52.979, -28.5714 }, - { 43.4552, -33.3333 }, - { 29.1695, -33.3333 }, - { 19.6457, -28.5714 }, -}; - -static const CoordRec char103_stroke1[] = { - { 62.5029, 52.381 }, - { 52.979, 61.9048 }, - { 43.4552, 66.6667 }, - { 29.1695, 66.6667 }, - { 19.6457, 61.9048 }, - { 10.1219, 52.381 }, - { 5.36, 38.0952 }, - { 5.36, 28.5714 }, - { 10.1219, 14.2857 }, - { 19.6457, 4.7619 }, - { 29.1695, 0 }, - { 43.4552, 0 }, - { 52.979, 4.7619 }, - { 62.5029, 14.2857 }, -}; - -static const StrokeRec char103[] = { - { 7, char103_stroke0 }, - { 14, char103_stroke1 }, -}; - -/* char: 104 'h' */ - -static const CoordRec char104_stroke0[] = { - { 9.6, 100 }, - { 9.6, 0 }, -}; - -static const CoordRec char104_stroke1[] = { - { 9.6, 47.619 }, - { 23.8857, 61.9048 }, - { 33.4095, 66.6667 }, - { 47.6952, 66.6667 }, - { 57.219, 61.9048 }, - { 61.981, 47.619 }, - { 61.981, 0 }, -}; - -static const StrokeRec char104[] = { - { 2, char104_stroke0 }, - { 7, char104_stroke1 }, -}; - -/* char: 105 'i' */ - -static const CoordRec char105_stroke0[] = { - { 10.02, 100 }, - { 14.7819, 95.2381 }, - { 19.5438, 100 }, - { 14.7819, 104.762 }, - { 10.02, 100 }, -}; - -static const CoordRec char105_stroke1[] = { - { 14.7819, 66.6667 }, - { 14.7819, 0 }, -}; - -static const StrokeRec char105[] = { - { 5, char105_stroke0 }, - { 2, char105_stroke1 }, -}; - -/* char: 106 'j' */ - -static const CoordRec char106_stroke0[] = { - { 17.3876, 100 }, - { 22.1495, 95.2381 }, - { 26.9114, 100 }, - { 22.1495, 104.762 }, - { 17.3876, 100 }, -}; - -static const CoordRec char106_stroke1[] = { - { 22.1495, 66.6667 }, - { 22.1495, -14.2857 }, - { 17.3876, -28.5714 }, - { 7.8638, -33.3333 }, - { -1.66, -33.3333 }, -}; - -static const StrokeRec char106[] = { - { 5, char106_stroke0 }, - { 5, char106_stroke1 }, -}; - -/* char: 107 'k' */ - -static const CoordRec char107_stroke0[] = { - { 9.6, 100 }, - { 9.6, 0 }, -}; - -static const CoordRec char107_stroke1[] = { - { 57.219, 66.6667 }, - { 9.6, 19.0476 }, -}; - -static const CoordRec char107_stroke2[] = { - { 28.6476, 38.0952 }, - { 61.981, 0 }, -}; - -static const StrokeRec char107[] = { - { 2, char107_stroke0 }, - { 2, char107_stroke1 }, - { 2, char107_stroke2 }, -}; - -/* char: 108 'l' */ - -static const CoordRec char108_stroke0[] = { - { 10.02, 100 }, - { 10.02, 0 }, -}; - -static const StrokeRec char108[] = { - { 2, char108_stroke0 }, -}; - -/* char: 109 'm' */ - -static const CoordRec char109_stroke0[] = { - { 9.6, 66.6667 }, - { 9.6, 0 }, -}; - -static const CoordRec char109_stroke1[] = { - { 9.6, 47.619 }, - { 23.8857, 61.9048 }, - { 33.4095, 66.6667 }, - { 47.6952, 66.6667 }, - { 57.219, 61.9048 }, - { 61.981, 47.619 }, - { 61.981, 0 }, -}; - -static const CoordRec char109_stroke2[] = { - { 61.981, 47.619 }, - { 76.2667, 61.9048 }, - { 85.7905, 66.6667 }, - { 100.076, 66.6667 }, - { 109.6, 61.9048 }, - { 114.362, 47.619 }, - { 114.362, 0 }, -}; - -static const StrokeRec char109[] = { - { 2, char109_stroke0 }, - { 7, char109_stroke1 }, - { 7, char109_stroke2 }, -}; - -/* char: 110 'n' */ - -static const CoordRec char110_stroke0[] = { - { 9.18, 66.6667 }, - { 9.18, 0 }, -}; - -static const CoordRec char110_stroke1[] = { - { 9.18, 47.619 }, - { 23.4657, 61.9048 }, - { 32.9895, 66.6667 }, - { 47.2752, 66.6667 }, - { 56.799, 61.9048 }, - { 61.561, 47.619 }, - { 61.561, 0 }, -}; - -static const StrokeRec char110[] = { - { 2, char110_stroke0 }, - { 7, char110_stroke1 }, -}; - -/* char: 111 'o' */ - -static const CoordRec char111_stroke0[] = { - { 28.7895, 66.6667 }, - { 19.2657, 61.9048 }, - { 9.7419, 52.381 }, - { 4.98, 38.0952 }, - { 4.98, 28.5714 }, - { 9.7419, 14.2857 }, - { 19.2657, 4.7619 }, - { 28.7895, 0 }, - { 43.0752, 0 }, - { 52.599, 4.7619 }, - { 62.1229, 14.2857 }, - { 66.8848, 28.5714 }, - { 66.8848, 38.0952 }, - { 62.1229, 52.381 }, - { 52.599, 61.9048 }, - { 43.0752, 66.6667 }, - { 28.7895, 66.6667 }, -}; - -static const StrokeRec char111[] = { - { 17, char111_stroke0 }, -}; - -/* char: 112 'p' */ - -static const CoordRec char112_stroke0[] = { - { 9.46, 66.6667 }, - { 9.46, -33.3333 }, -}; - -static const CoordRec char112_stroke1[] = { - { 9.46, 52.381 }, - { 18.9838, 61.9048 }, - { 28.5076, 66.6667 }, - { 42.7933, 66.6667 }, - { 52.3171, 61.9048 }, - { 61.841, 52.381 }, - { 66.6029, 38.0952 }, - { 66.6029, 28.5714 }, - { 61.841, 14.2857 }, - { 52.3171, 4.7619 }, - { 42.7933, 0 }, - { 28.5076, 0 }, - { 18.9838, 4.7619 }, - { 9.46, 14.2857 }, -}; - -static const StrokeRec char112[] = { - { 2, char112_stroke0 }, - { 14, char112_stroke1 }, -}; - -/* char: 113 'q' */ - -static const CoordRec char113_stroke0[] = { - { 61.9829, 66.6667 }, - { 61.9829, -33.3333 }, -}; - -static const CoordRec char113_stroke1[] = { - { 61.9829, 52.381 }, - { 52.459, 61.9048 }, - { 42.9352, 66.6667 }, - { 28.6495, 66.6667 }, - { 19.1257, 61.9048 }, - { 9.6019, 52.381 }, - { 4.84, 38.0952 }, - { 4.84, 28.5714 }, - { 9.6019, 14.2857 }, - { 19.1257, 4.7619 }, - { 28.6495, 0 }, - { 42.9352, 0 }, - { 52.459, 4.7619 }, - { 61.9829, 14.2857 }, -}; - -static const StrokeRec char113[] = { - { 2, char113_stroke0 }, - { 14, char113_stroke1 }, -}; - -/* char: 114 'r' */ - -static const CoordRec char114_stroke0[] = { - { 9.46, 66.6667 }, - { 9.46, 0 }, -}; - -static const CoordRec char114_stroke1[] = { - { 9.46, 38.0952 }, - { 14.2219, 52.381 }, - { 23.7457, 61.9048 }, - { 33.2695, 66.6667 }, - { 47.5552, 66.6667 }, -}; - -static const StrokeRec char114[] = { - { 2, char114_stroke0 }, - { 5, char114_stroke1 }, -}; - -/* char: 115 's' */ - -static const CoordRec char115_stroke0[] = { - { 57.081, 52.381 }, - { 52.319, 61.9048 }, - { 38.0333, 66.6667 }, - { 23.7476, 66.6667 }, - { 9.4619, 61.9048 }, - { 4.7, 52.381 }, - { 9.4619, 42.8571 }, - { 18.9857, 38.0952 }, - { 42.7952, 33.3333 }, - { 52.319, 28.5714 }, - { 57.081, 19.0476 }, - { 57.081, 14.2857 }, - { 52.319, 4.7619 }, - { 38.0333, 0 }, - { 23.7476, 0 }, - { 9.4619, 4.7619 }, - { 4.7, 14.2857 }, -}; - -static const StrokeRec char115[] = { - { 17, char115_stroke0 }, -}; - -/* char: 116 't' */ - -static const CoordRec char116_stroke0[] = { - { 14.8257, 100 }, - { 14.8257, 19.0476 }, - { 19.5876, 4.7619 }, - { 29.1114, 0 }, - { 38.6352, 0 }, -}; - -static const CoordRec char116_stroke1[] = { - { 0.54, 66.6667 }, - { 33.8733, 66.6667 }, -}; - -static const StrokeRec char116[] = { - { 5, char116_stroke0 }, - { 2, char116_stroke1 }, -}; - -/* char: 117 'u' */ - -static const CoordRec char117_stroke0[] = { - { 9.46, 66.6667 }, - { 9.46, 19.0476 }, - { 14.2219, 4.7619 }, - { 23.7457, 0 }, - { 38.0314, 0 }, - { 47.5552, 4.7619 }, - { 61.841, 19.0476 }, -}; - -static const CoordRec char117_stroke1[] = { - { 61.841, 66.6667 }, - { 61.841, 0 }, -}; - -static const StrokeRec char117[] = { - { 7, char117_stroke0 }, - { 2, char117_stroke1 }, -}; - -/* char: 118 'v' */ - -static const CoordRec char118_stroke0[] = { - { 1.8, 66.6667 }, - { 30.3714, 0 }, -}; - -static const CoordRec char118_stroke1[] = { - { 58.9429, 66.6667 }, - { 30.3714, 0 }, -}; - -static const StrokeRec char118[] = { - { 2, char118_stroke0 }, - { 2, char118_stroke1 }, -}; - -/* char: 119 'w' */ - -static const CoordRec char119_stroke0[] = { - { 2.5, 66.6667 }, - { 21.5476, 0 }, -}; - -static const CoordRec char119_stroke1[] = { - { 40.5952, 66.6667 }, - { 21.5476, 0 }, -}; - -static const CoordRec char119_stroke2[] = { - { 40.5952, 66.6667 }, - { 59.6429, 0 }, -}; - -static const CoordRec char119_stroke3[] = { - { 78.6905, 66.6667 }, - { 59.6429, 0 }, -}; - -static const StrokeRec char119[] = { - { 2, char119_stroke0 }, - { 2, char119_stroke1 }, - { 2, char119_stroke2 }, - { 2, char119_stroke3 }, -}; - -/* char: 120 'x' */ - -static const CoordRec char120_stroke0[] = { - { 1.66, 66.6667 }, - { 54.041, 0 }, -}; - -static const CoordRec char120_stroke1[] = { - { 54.041, 66.6667 }, - { 1.66, 0 }, -}; - -static const StrokeRec char120[] = { - { 2, char120_stroke0 }, - { 2, char120_stroke1 }, -}; - -/* char: 121 'y' */ - -static const CoordRec char121_stroke0[] = { - { 6.5619, 66.6667 }, - { 35.1333, 0 }, -}; - -static const CoordRec char121_stroke1[] = { - { 63.7048, 66.6667 }, - { 35.1333, 0 }, - { 25.6095, -19.0476 }, - { 16.0857, -28.5714 }, - { 6.5619, -33.3333 }, - { 1.8, -33.3333 }, -}; - -static const StrokeRec char121[] = { - { 2, char121_stroke0 }, - { 6, char121_stroke1 }, -}; - -/* char: 122 'z' */ - -static const CoordRec char122_stroke0[] = { - { 56.821, 66.6667 }, - { 4.44, 0 }, -}; - -static const CoordRec char122_stroke1[] = { - { 4.44, 66.6667 }, - { 56.821, 66.6667 }, -}; - -static const CoordRec char122_stroke2[] = { - { 4.44, 0 }, - { 56.821, 0 }, -}; - -static const StrokeRec char122[] = { - { 2, char122_stroke0 }, - { 2, char122_stroke1 }, - { 2, char122_stroke2 }, -}; - -/* char: 123 '{' */ - -static const CoordRec char123_stroke0[] = { - { 31.1895, 119.048 }, - { 21.6657, 114.286 }, - { 16.9038, 109.524 }, - { 12.1419, 100 }, - { 12.1419, 90.4762 }, - { 16.9038, 80.9524 }, - { 21.6657, 76.1905 }, - { 26.4276, 66.6667 }, - { 26.4276, 57.1429 }, - { 16.9038, 47.619 }, -}; - -static const CoordRec char123_stroke1[] = { - { 21.6657, 114.286 }, - { 16.9038, 104.762 }, - { 16.9038, 95.2381 }, - { 21.6657, 85.7143 }, - { 26.4276, 80.9524 }, - { 31.1895, 71.4286 }, - { 31.1895, 61.9048 }, - { 26.4276, 52.381 }, - { 7.38, 42.8571 }, - { 26.4276, 33.3333 }, - { 31.1895, 23.8095 }, - { 31.1895, 14.2857 }, - { 26.4276, 4.7619 }, - { 21.6657, 0 }, - { 16.9038, -9.5238 }, - { 16.9038, -19.0476 }, - { 21.6657, -28.5714 }, -}; - -static const CoordRec char123_stroke2[] = { - { 16.9038, 38.0952 }, - { 26.4276, 28.5714 }, - { 26.4276, 19.0476 }, - { 21.6657, 9.5238 }, - { 16.9038, 4.7619 }, - { 12.1419, -4.7619 }, - { 12.1419, -14.2857 }, - { 16.9038, -23.8095 }, - { 21.6657, -28.5714 }, - { 31.1895, -33.3333 }, -}; - -static const StrokeRec char123[] = { - { 10, char123_stroke0 }, - { 17, char123_stroke1 }, - { 10, char123_stroke2 }, -}; - -/* char: 124 '|' */ - -static const CoordRec char124_stroke0[] = { - { 11.54, 119.048 }, - { 11.54, -33.3333 }, -}; - -static const StrokeRec char124[] = { - { 2, char124_stroke0 }, -}; - -/* char: 125 '}' */ - -static const CoordRec char125_stroke0[] = { - { 9.18, 119.048 }, - { 18.7038, 114.286 }, - { 23.4657, 109.524 }, - { 28.2276, 100 }, - { 28.2276, 90.4762 }, - { 23.4657, 80.9524 }, - { 18.7038, 76.1905 }, - { 13.9419, 66.6667 }, - { 13.9419, 57.1429 }, - { 23.4657, 47.619 }, -}; - -static const CoordRec char125_stroke1[] = { - { 18.7038, 114.286 }, - { 23.4657, 104.762 }, - { 23.4657, 95.2381 }, - { 18.7038, 85.7143 }, - { 13.9419, 80.9524 }, - { 9.18, 71.4286 }, - { 9.18, 61.9048 }, - { 13.9419, 52.381 }, - { 32.9895, 42.8571 }, - { 13.9419, 33.3333 }, - { 9.18, 23.8095 }, - { 9.18, 14.2857 }, - { 13.9419, 4.7619 }, - { 18.7038, 0 }, - { 23.4657, -9.5238 }, - { 23.4657, -19.0476 }, - { 18.7038, -28.5714 }, -}; - -static const CoordRec char125_stroke2[] = { - { 23.4657, 38.0952 }, - { 13.9419, 28.5714 }, - { 13.9419, 19.0476 }, - { 18.7038, 9.5238 }, - { 23.4657, 4.7619 }, - { 28.2276, -4.7619 }, - { 28.2276, -14.2857 }, - { 23.4657, -23.8095 }, - { 18.7038, -28.5714 }, - { 9.18, -33.3333 }, -}; - -static const StrokeRec char125[] = { - { 10, char125_stroke0 }, - { 17, char125_stroke1 }, - { 10, char125_stroke2 }, -}; - -/* char: 126 '~' */ - -static const CoordRec char126_stroke0[] = { - { 2.92, 28.5714 }, - { 2.92, 38.0952 }, - { 7.6819, 52.381 }, - { 17.2057, 57.1429 }, - { 26.7295, 57.1429 }, - { 36.2533, 52.381 }, - { 55.301, 38.0952 }, - { 64.8248, 33.3333 }, - { 74.3486, 33.3333 }, - { 83.8724, 38.0952 }, - { 88.6343, 47.619 }, -}; - -static const CoordRec char126_stroke1[] = { - { 2.92, 38.0952 }, - { 7.6819, 47.619 }, - { 17.2057, 52.381 }, - { 26.7295, 52.381 }, - { 36.2533, 47.619 }, - { 55.301, 33.3333 }, - { 64.8248, 28.5714 }, - { 74.3486, 28.5714 }, - { 83.8724, 33.3333 }, - { 88.6343, 47.619 }, - { 88.6343, 57.1429 }, -}; - -static const StrokeRec char126[] = { - { 11, char126_stroke0 }, - { 11, char126_stroke1 }, -}; - -/* char: 127 */ - -static const CoordRec char127_stroke0[] = { - { 52.381, 100 }, - { 14.2857, -33.3333 }, -}; - -static const CoordRec char127_stroke1[] = { - { 28.5714, 66.6667 }, - { 14.2857, 61.9048 }, - { 4.7619, 52.381 }, - { 0, 38.0952 }, - { 0, 23.8095 }, - { 4.7619, 14.2857 }, - { 14.2857, 4.7619 }, - { 28.5714, 0 }, - { 38.0952, 0 }, - { 52.381, 4.7619 }, - { 61.9048, 14.2857 }, - { 66.6667, 28.5714 }, - { 66.6667, 42.8571 }, - { 61.9048, 52.381 }, - { 52.381, 61.9048 }, - { 38.0952, 66.6667 }, - { 28.5714, 66.6667 }, -}; - -static const StrokeRec char127[] = { - { 2, char127_stroke0 }, - { 17, char127_stroke1 }, -}; - -static const StrokeCharRec chars[] = { - { 0, /* char0 */ 0, 0, 0 }, - { 0, /* char1 */ 0, 0, 0 }, - { 0, /* char2 */ 0, 0, 0 }, - { 0, /* char3 */ 0, 0, 0 }, - { 0, /* char4 */ 0, 0, 0 }, - { 0, /* char5 */ 0, 0, 0 }, - { 0, /* char6 */ 0, 0, 0 }, - { 0, /* char7 */ 0, 0, 0 }, - { 0, /* char8 */ 0, 0, 0 }, - { 0, /* char9 */ 0, 0, 0 }, - { 0, /* char10 */ 0, 0, 0 }, - { 0, /* char11 */ 0, 0, 0 }, - { 0, /* char12 */ 0, 0, 0 }, - { 0, /* char13 */ 0, 0, 0 }, - { 0, /* char14 */ 0, 0, 0 }, - { 0, /* char15 */ 0, 0, 0 }, - { 0, /* char16 */ 0, 0, 0 }, - { 0, /* char17 */ 0, 0, 0 }, - { 0, /* char18 */ 0, 0, 0 }, - { 0, /* char19 */ 0, 0, 0 }, - { 0, /* char20 */ 0, 0, 0 }, - { 0, /* char21 */ 0, 0, 0 }, - { 0, /* char22 */ 0, 0, 0 }, - { 0, /* char23 */ 0, 0, 0 }, - { 0, /* char24 */ 0, 0, 0 }, - { 0, /* char25 */ 0, 0, 0 }, - { 0, /* char26 */ 0, 0, 0 }, - { 0, /* char27 */ 0, 0, 0 }, - { 0, /* char28 */ 0, 0, 0 }, - { 0, /* char29 */ 0, 0, 0 }, - { 0, /* char30 */ 0, 0, 0 }, - { 0, /* char31 */ 0, 0, 0 }, - { 0, /* char32 */ 0, 52.381, 104.762 }, - { 2, char33, 13.3819, 26.6238 }, - { 2, char34, 23.0676, 51.4352 }, - { 4, char35, 36.5333, 79.4886 }, - { 3, char36, 38.1533, 76.2067 }, - { 3, char37, 49.2171, 96.5743 }, - { 1, char38, 53.599, 101.758 }, - { 1, char39, 4.44, 13.62 }, - { 1, char40, 21.8657, 47.1733 }, - { 1, char41, 24.3276, 47.5333 }, - { 3, char42, 30.7695, 59.439 }, - { 2, char43, 48.8371, 97.2543 }, - { 1, char44, 13.5219, 26.0638 }, - { 1, char45, 50.2371, 100.754 }, - { 1, char46, 13.1019, 26.4838 }, - { 1, char47, 40.5733, 82.1067 }, - { 1, char48, 38.3133, 77.0667 }, - { 1, char49, 30.8676, 66.5295 }, - { 1, char50, 38.7533, 77.6467 }, - { 1, char51, 38.3333, 77.0467 }, - { 2, char52, 37.2133, 80.1686 }, - { 1, char53, 38.1933, 77.6867 }, - { 1, char54, 34.1514, 73.8048 }, - { 2, char55, 38.8933, 77.2267 }, - { 1, char56, 38.9333, 77.6667 }, - { 1, char57, 39.9333, 74.0648 }, - { 2, char58, 14.0819, 26.2238 }, - { 2, char59, 12.9619, 26.3038 }, - { 1, char60, 41.1552, 81.6105 }, - { 2, char61, 48.5571, 97.2543 }, - { 1, char62, 40.8752, 81.6105 }, - { 2, char63, 36.9914, 73.9029 }, - { 2, char64, 34.9314, 74.3648 }, - { 3, char65, 40.5952, 80.4905 }, - { 3, char66, 44.7533, 83.6267 }, - { 1, char67, 39.9933, 84.4886 }, - { 2, char68, 45.2933, 85.2867 }, - { 4, char69, 39.9914, 78.1848 }, - { 3, char70, 39.9914, 78.7448 }, - { 2, char71, 40.3933, 89.7686 }, - { 3, char72, 44.7533, 89.0867 }, - { 1, char73, 10.86, 21.3 }, - { 1, char74, 31.0714, 59.999 }, - { 3, char75, 44.6133, 79.3267 }, - { 2, char76, 40.2514, 71.3229 }, - { 4, char77, 48.9552, 97.2105 }, - { 3, char78, 44.4733, 88.8067 }, - { 1, char79, 44.3352, 88.8305 }, - { 2, char80, 45.4333, 85.6667 }, - { 2, char81, 43.3952, 88.0905 }, - { 3, char82, 45.0133, 82.3667 }, - { 1, char83, 41.3333, 80.8267 }, - { 2, char84, 35.6933, 71.9467 }, - { 1, char85, 44.8733, 89.4867 }, - { 2, char86, 40.4552, 81.6105 }, - { 4, char87, 49.839, 100.518 }, - { 2, char88, 35.8333, 72.3667 }, - { 2, char89, 39.6152, 79.6505 }, - { 3, char90, 35.8333, 73.7467 }, - { 4, char91, 22.0657, 46.1133 }, - { 1, char92, 39.1733, 78.2067 }, - { 4, char93, 23.4876, 46.3933 }, - { 2, char94, 44.0752, 90.2305 }, - { 1, char95, 51.281, 104.062 }, - { 2, char96, 42.5457, 83.5714 }, - { 2, char97, 35.2514, 66.6029 }, - { 2, char98, 37.3314, 70.4629 }, - { 1, char99, 34.0914, 68.9229 }, - { 2, char100, 33.2114, 70.2629 }, - { 1, char101, 34.2914, 68.5229 }, - { 2, char102, 14.9657, 38.6552 }, - { 2, char103, 33.9314, 70.9829 }, - { 2, char104, 33.4095, 71.021 }, - { 2, char105, 14.7819, 28.8638 }, - { 2, char106, 17.3876, 36.2314 }, - { 3, char107, 33.4095, 62.521 }, - { 1, char108, 10.02, 19.34 }, - { 3, char109, 61.981, 123.962 }, - { 2, char110, 32.9895, 70.881 }, - { 1, char111, 33.5514, 71.7448 }, - { 2, char112, 38.0314, 70.8029 }, - { 2, char113, 33.4114, 70.7429 }, - { 2, char114, 23.7457, 49.4952 }, - { 1, char115, 28.5095, 62.321 }, - { 2, char116, 14.8257, 39.3152 }, - { 2, char117, 33.2695, 71.161 }, - { 2, char118, 30.3714, 60.6029 }, - { 4, char119, 40.5952, 80.4905 }, - { 2, char120, 25.4695, 56.401 }, - { 2, char121, 35.1333, 66.0648 }, - { 3, char122, 28.2495, 61.821 }, - { 3, char123, 21.6657, 41.6295 }, - { 1, char124, 11.54, 23.78 }, - { 3, char125, 18.7038, 41.4695 }, - { 2, char126, 45.7771, 91.2743 }, - { 2, char127, 33.3333, 66.6667 }, -}; - -StrokeFontRec glutStrokeRoman = { "Roman", 128, chars, 119.048, -33.3333 }; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_shapes.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_shapes.c deleted file mode 100644 index ce5bebb2be..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_shapes.c +++ /dev/null @@ -1,596 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/** -(c) Copyright 1993, Silicon Graphics, Inc. - -ALL RIGHTS RESERVED - -Permission to use, copy, modify, and distribute this software -for any purpose and without fee is hereby granted, provided -that the above copyright notice appear in all copies and that -both the copyright notice and this permission notice appear in -supporting documentation, and that the name of Silicon -Graphics, Inc. not be used in advertising or publicity -pertaining to distribution of the software without specific, -written prior permission. - -THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU -"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR -OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO -EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE -ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER, -INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE, -SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR -NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR -PERFORMANCE OF THIS SOFTWARE. - -US Government Users Restricted Rights - -Use, duplication, or disclosure by the Government is subject to -restrictions set forth in FAR 52.227.19(c)(2) or subparagraph -(c)(1)(ii) of the Rights in Technical Data and Computer -Software clause at DFARS 252.227-7013 and/or in similar or -successor clauses in the FAR or the DOD or NASA FAR -Supplement. Unpublished-- rights reserved under the copyright -laws of the United States. Contractor/manufacturer is Silicon -Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA -94039-7311. - -OpenGL(TM) is a trademark of Silicon Graphics, Inc. -*/ - -#include -#include "glutint.h" - -/* Some files do not define M_PI... */ -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -static GLUquadricObj *quadObj; - -#define QUAD_OBJ_INIT() { if(!quadObj) initQuadObj(); } - -static void -initQuadObj(void) -{ - quadObj = gluNewQuadric(); - if (!quadObj) - __glutFatalError("out of memory."); -} - -/* CENTRY */ -void APIENTRY -glutWireSphere(GLdouble radius, GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_LINE); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluSphere(quadObj, radius, slices, stacks); -} - -void APIENTRY -glutSolidSphere(GLdouble radius, GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_FILL); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluSphere(quadObj, radius, slices, stacks); -} - -void APIENTRY -glutWireCone(GLdouble base, GLdouble height, - GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_LINE); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluCylinder(quadObj, base, 0.0, height, slices, stacks); -} - -void APIENTRY -glutSolidCone(GLdouble base, GLdouble height, - GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_FILL); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluCylinder(quadObj, base, 0.0, height, slices, stacks); -} - -/* ENDCENTRY */ - -static void -drawBox(GLfloat size, GLenum type) -{ - static GLfloat n[6][3] = - { - {-1.0, 0.0, 0.0}, - {0.0, 1.0, 0.0}, - {1.0, 0.0, 0.0}, - {0.0, -1.0, 0.0}, - {0.0, 0.0, 1.0}, - {0.0, 0.0, -1.0} - }; - static GLint faces[6][4] = - { - {0, 1, 2, 3}, - {3, 2, 6, 7}, - {7, 6, 5, 4}, - {4, 5, 1, 0}, - {5, 6, 2, 1}, - {7, 4, 0, 3} - }; - GLfloat v[8][3]; - GLint i; - - v[0][0] = v[1][0] = v[2][0] = v[3][0] = -size / 2; - v[4][0] = v[5][0] = v[6][0] = v[7][0] = size / 2; - v[0][1] = v[1][1] = v[4][1] = v[5][1] = -size / 2; - v[2][1] = v[3][1] = v[6][1] = v[7][1] = size / 2; - v[0][2] = v[3][2] = v[4][2] = v[7][2] = -size / 2; - v[1][2] = v[2][2] = v[5][2] = v[6][2] = size / 2; - - for (i = 5; i >= 0; i--) { - glBegin(type); - glNormal3fv(&n[i][0]); - glVertex3fv(&v[faces[i][0]][0]); - glVertex3fv(&v[faces[i][1]][0]); - glVertex3fv(&v[faces[i][2]][0]); - glVertex3fv(&v[faces[i][3]][0]); - glEnd(); - } -} - -/* CENTRY */ -void APIENTRY -glutWireCube(GLdouble size) -{ - drawBox(size, GL_LINE_LOOP); -} - -void APIENTRY -glutSolidCube(GLdouble size) -{ - drawBox(size, GL_QUADS); -} - -/* ENDCENTRY */ - -static void -doughnut(GLfloat r, GLfloat R, GLint nsides, GLint rings) -{ - int i, j; - GLfloat theta, phi, theta1; - GLfloat cosTheta, sinTheta; - GLfloat cosTheta1, sinTheta1; - GLfloat ringDelta, sideDelta; - - ringDelta = 2.0 * M_PI / rings; - sideDelta = 2.0 * M_PI / nsides; - - theta = 0.0; - cosTheta = 1.0; - sinTheta = 0.0; - for (i = rings - 1; i >= 0; i--) { - theta1 = theta + ringDelta; - cosTheta1 = cos(theta1); - sinTheta1 = sin(theta1); - glBegin(GL_QUAD_STRIP); - phi = 0.0; - for (j = nsides; j >= 0; j--) { - GLfloat cosPhi, sinPhi, dist; - - phi += sideDelta; - cosPhi = cos(phi); - sinPhi = sin(phi); - dist = R + r * cosPhi; - - glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi, sinPhi); - glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, r * sinPhi); - glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi); - glVertex3f(cosTheta * dist, -sinTheta * dist, r * sinPhi); - } - glEnd(); - theta = theta1; - cosTheta = cosTheta1; - sinTheta = sinTheta1; - } -} - -/* CENTRY */ -void APIENTRY -glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, - GLint nsides, GLint rings) -{ - glPushAttrib(GL_POLYGON_BIT); - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - doughnut(innerRadius, outerRadius, nsides, rings); - glPopAttrib(); -} - -void APIENTRY -glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, - GLint nsides, GLint rings) -{ - doughnut(innerRadius, outerRadius, nsides, rings); -} - -/* ENDCENTRY */ - -static GLfloat dodec[20][3]; - -static void -initDodecahedron(void) -{ - GLfloat alpha, beta; - - alpha = sqrt(2.0 / (3.0 + sqrt(5.0))); - beta = 1.0 + sqrt(6.0 / (3.0 + sqrt(5.0)) - - 2.0 + 2.0 * sqrt(2.0 / (3.0 + sqrt(5.0)))); - /* *INDENT-OFF* */ - dodec[0][0] = -alpha; dodec[0][1] = 0; dodec[0][2] = beta; - dodec[1][0] = alpha; dodec[1][1] = 0; dodec[1][2] = beta; - dodec[2][0] = -1; dodec[2][1] = -1; dodec[2][2] = -1; - dodec[3][0] = -1; dodec[3][1] = -1; dodec[3][2] = 1; - dodec[4][0] = -1; dodec[4][1] = 1; dodec[4][2] = -1; - dodec[5][0] = -1; dodec[5][1] = 1; dodec[5][2] = 1; - dodec[6][0] = 1; dodec[6][1] = -1; dodec[6][2] = -1; - dodec[7][0] = 1; dodec[7][1] = -1; dodec[7][2] = 1; - dodec[8][0] = 1; dodec[8][1] = 1; dodec[8][2] = -1; - dodec[9][0] = 1; dodec[9][1] = 1; dodec[9][2] = 1; - dodec[10][0] = beta; dodec[10][1] = alpha; dodec[10][2] = 0; - dodec[11][0] = beta; dodec[11][1] = -alpha; dodec[11][2] = 0; - dodec[12][0] = -beta; dodec[12][1] = alpha; dodec[12][2] = 0; - dodec[13][0] = -beta; dodec[13][1] = -alpha; dodec[13][2] = 0; - dodec[14][0] = -alpha; dodec[14][1] = 0; dodec[14][2] = -beta; - dodec[15][0] = alpha; dodec[15][1] = 0; dodec[15][2] = -beta; - dodec[16][0] = 0; dodec[16][1] = beta; dodec[16][2] = alpha; - dodec[17][0] = 0; dodec[17][1] = beta; dodec[17][2] = -alpha; - dodec[18][0] = 0; dodec[18][1] = -beta; dodec[18][2] = alpha; - dodec[19][0] = 0; dodec[19][1] = -beta; dodec[19][2] = -alpha; - /* *INDENT-ON* */ - -} - -#define DIFF3(_a,_b,_c) { \ - (_c)[0] = (_a)[0] - (_b)[0]; \ - (_c)[1] = (_a)[1] - (_b)[1]; \ - (_c)[2] = (_a)[2] - (_b)[2]; \ -} - -static void -crossprod(GLfloat v1[3], GLfloat v2[3], GLfloat prod[3]) -{ - GLfloat p[3]; /* in case prod == v1 or v2 */ - - p[0] = v1[1] * v2[2] - v2[1] * v1[2]; - p[1] = v1[2] * v2[0] - v2[2] * v1[0]; - p[2] = v1[0] * v2[1] - v2[0] * v1[1]; - prod[0] = p[0]; - prod[1] = p[1]; - prod[2] = p[2]; -} - -static void -normalize(GLfloat v[3]) -{ - GLfloat d; - - d = sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); - if (d == 0.0) { - __glutWarning("normalize: zero length vector"); - v[0] = d = 1.0; - } - d = 1 / d; - v[0] *= d; - v[1] *= d; - v[2] *= d; -} - -static void -pentagon(int a, int b, int c, int d, int e, GLenum shadeType) -{ - GLfloat n0[3], d1[3], d2[3]; - - DIFF3(dodec[a], dodec[b], d1); - DIFF3(dodec[b], dodec[c], d2); - crossprod(d1, d2, n0); - normalize(n0); - - glBegin(shadeType); - glNormal3fv(n0); - glVertex3fv(&dodec[a][0]); - glVertex3fv(&dodec[b][0]); - glVertex3fv(&dodec[c][0]); - glVertex3fv(&dodec[d][0]); - glVertex3fv(&dodec[e][0]); - glEnd(); -} - -static void -dodecahedron(GLenum type) -{ - static int inited = 0; - - if (inited == 0) { - inited = 1; - initDodecahedron(); - } - pentagon(0, 1, 9, 16, 5, type); - pentagon(1, 0, 3, 18, 7, type); - pentagon(1, 7, 11, 10, 9, type); - pentagon(11, 7, 18, 19, 6, type); - pentagon(8, 17, 16, 9, 10, type); - pentagon(2, 14, 15, 6, 19, type); - pentagon(2, 13, 12, 4, 14, type); - pentagon(2, 19, 18, 3, 13, type); - pentagon(3, 0, 5, 12, 13, type); - pentagon(6, 15, 8, 10, 11, type); - pentagon(4, 17, 8, 15, 14, type); - pentagon(4, 12, 5, 16, 17, type); -} - -/* CENTRY */ -void APIENTRY -glutWireDodecahedron(void) -{ - dodecahedron(GL_LINE_LOOP); -} - -void APIENTRY -glutSolidDodecahedron(void) -{ - dodecahedron(GL_TRIANGLE_FAN); -} - -/* ENDCENTRY */ - -static void -recorditem(GLfloat * n1, GLfloat * n2, GLfloat * n3, - GLenum shadeType) -{ - GLfloat q0[3], q1[3]; - - DIFF3(n1, n2, q0); - DIFF3(n2, n3, q1); - crossprod(q0, q1, q1); - normalize(q1); - - glBegin(shadeType); - glNormal3fv(q1); - glVertex3fv(n1); - glVertex3fv(n2); - glVertex3fv(n3); - glEnd(); -} - -static void -subdivide(GLfloat * v0, GLfloat * v1, GLfloat * v2, - GLenum shadeType) -{ - int depth; - GLfloat w0[3], w1[3], w2[3]; - GLfloat l; - int i, j, k, n; - - depth = 1; - for (i = 0; i < depth; i++) { - for (j = 0; i + j < depth; j++) { - k = depth - i - j; - for (n = 0; n < 3; n++) { - w0[n] = (i * v0[n] + j * v1[n] + k * v2[n]) / depth; - w1[n] = ((i + 1) * v0[n] + j * v1[n] + (k - 1) * v2[n]) - / depth; - w2[n] = (i * v0[n] + (j + 1) * v1[n] + (k - 1) * v2[n]) - / depth; - } - l = sqrt(w0[0] * w0[0] + w0[1] * w0[1] + w0[2] * w0[2]); - w0[0] /= l; - w0[1] /= l; - w0[2] /= l; - l = sqrt(w1[0] * w1[0] + w1[1] * w1[1] + w1[2] * w1[2]); - w1[0] /= l; - w1[1] /= l; - w1[2] /= l; - l = sqrt(w2[0] * w2[0] + w2[1] * w2[1] + w2[2] * w2[2]); - w2[0] /= l; - w2[1] /= l; - w2[2] /= l; - recorditem(w1, w0, w2, shadeType); - } - } -} - -static void -drawtriangle(int i, GLfloat data[][3], int ndx[][3], - GLenum shadeType) -{ - GLfloat *x0, *x1, *x2; - - x0 = data[ndx[i][0]]; - x1 = data[ndx[i][1]]; - x2 = data[ndx[i][2]]; - subdivide(x0, x1, x2, shadeType); -} - -/* octahedron data: The octahedron produced is centered at the - origin and has radius 1.0 */ -static GLfloat odata[6][3] = -{ - {1.0, 0.0, 0.0}, - {-1.0, 0.0, 0.0}, - {0.0, 1.0, 0.0}, - {0.0, -1.0, 0.0}, - {0.0, 0.0, 1.0}, - {0.0, 0.0, -1.0} -}; - -static int ondex[8][3] = -{ - {0, 4, 2}, - {1, 2, 4}, - {0, 3, 4}, - {1, 4, 3}, - {0, 2, 5}, - {1, 5, 2}, - {0, 5, 3}, - {1, 3, 5} -}; - -static void -octahedron(GLenum shadeType) -{ - int i; - - for (i = 7; i >= 0; i--) { - drawtriangle(i, odata, ondex, shadeType); - } -} - -/* CENTRY */ -void APIENTRY -glutWireOctahedron(void) -{ - octahedron(GL_LINE_LOOP); -} - -void APIENTRY -glutSolidOctahedron(void) -{ - octahedron(GL_TRIANGLES); -} - -/* ENDCENTRY */ - -/* icosahedron data: These numbers are rigged to make an - icosahedron of radius 1.0 */ - -#define X .525731112119133606 -#define Z .850650808352039932 - -static GLfloat idata[12][3] = -{ - {-X, 0, Z}, - {X, 0, Z}, - {-X, 0, -Z}, - {X, 0, -Z}, - {0, Z, X}, - {0, Z, -X}, - {0, -Z, X}, - {0, -Z, -X}, - {Z, X, 0}, - {-Z, X, 0}, - {Z, -X, 0}, - {-Z, -X, 0} -}; - -static int index[20][3] = -{ - {0, 4, 1}, - {0, 9, 4}, - {9, 5, 4}, - {4, 5, 8}, - {4, 8, 1}, - {8, 10, 1}, - {8, 3, 10}, - {5, 3, 8}, - {5, 2, 3}, - {2, 7, 3}, - {7, 10, 3}, - {7, 6, 10}, - {7, 11, 6}, - {11, 0, 6}, - {0, 1, 6}, - {6, 1, 10}, - {9, 0, 11}, - {9, 11, 2}, - {9, 2, 5}, - {7, 2, 11}, -}; - -static void -icosahedron(GLenum shadeType) -{ - int i; - - for (i = 19; i >= 0; i--) { - drawtriangle(i, idata, index, shadeType); - } -} - -/* CENTRY */ -void APIENTRY -glutWireIcosahedron(void) -{ - icosahedron(GL_LINE_LOOP); -} - -void APIENTRY -glutSolidIcosahedron(void) -{ - icosahedron(GL_TRIANGLES); -} - -/* ENDCENTRY */ - -/* tetrahedron data: */ - -#define T 1.73205080756887729 - -static GLfloat tdata[4][3] = -{ - {T, T, T}, - {T, -T, -T}, - {-T, T, -T}, - {-T, -T, T} -}; - -static int tndex[4][3] = -{ - {0, 1, 3}, - {2, 1, 0}, - {3, 2, 0}, - {1, 2, 3} -}; - -static void -tetrahedron(GLenum shadeType) -{ - int i; - - for (i = 3; i >= 0; i--) - drawtriangle(i, tdata, tndex, shadeType); -} - -/* CENTRY */ -void APIENTRY -glutWireTetrahedron(void) -{ - tetrahedron(GL_LINE_LOOP); -} - -void APIENTRY -glutSolidTetrahedron(void) -{ - tetrahedron(GL_TRIANGLES); -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_stroke.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_stroke.c deleted file mode 100644 index 2fe408be1a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_stroke.c +++ /dev/null @@ -1,42 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" -#include "glutstroke.h" - -void APIENTRY -glutStrokeCharacter(GLUTstrokeFont font, int c) -{ - const StrokeCharRec *ch; - const StrokeRec *stroke; - const CoordRec *coord; - StrokeFontPtr fontinfo; - int i, j; - - -#if defined(_WIN32) - fontinfo = (StrokeFontPtr) __glutFont(font); -#else - fontinfo = (StrokeFontPtr) font; -#endif - - if (c < 0 || c >= fontinfo->num_chars) - return; - ch = &(fontinfo->ch[c]); - if (ch) { - for (i = ch->num_strokes, stroke = ch->stroke; - i > 0; i--, stroke++) { - glBegin(GL_LINE_STRIP); - for (j = stroke->num_coords, coord = stroke->coord; - j > 0; j--, coord++) { - glVertex2f(coord->x, coord->y); - } - glEnd(); - } - glTranslatef(ch->right, 0.0, 0.0); - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_swidth.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_swidth.c deleted file mode 100644 index e1b7374575..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_swidth.c +++ /dev/null @@ -1,58 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1995. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" -#include "glutstroke.h" - -/* CENTRY */ -int APIENTRY -glutStrokeWidth(GLUTstrokeFont font, int c) -{ - StrokeFontPtr fontinfo; - const StrokeCharRec *ch; - -#if defined(_WIN32) - fontinfo = (StrokeFontPtr) __glutFont(font); -#else - fontinfo = (StrokeFontPtr) font; -#endif - - if (c < 0 || c >= fontinfo->num_chars) - return 0; - ch = &(fontinfo->ch[c]); - if (ch) - return ch->right; - else - return 0; -} - -int APIENTRY -glutStrokeLength(GLUTstrokeFont font, const unsigned char *string) -{ - int c, length; - StrokeFontPtr fontinfo; - const StrokeCharRec *ch; - -#if defined(_WIN32) - fontinfo = (StrokeFontPtr) __glutFont(font); -#else - fontinfo = (StrokeFontPtr) font; -#endif - - length = 0; - for (; *string != '\0'; string++) { - c = *string; - if (c >= 0 && c < fontinfo->num_chars) { - ch = &(fontinfo->ch[c]); - if (ch) - length += ch->right; - } - } - return length; -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_teapot.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_teapot.c deleted file mode 100644 index 3c9bdc1ab7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_teapot.c +++ /dev/null @@ -1,210 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/** -(c) Copyright 1993, Silicon Graphics, Inc. - -ALL RIGHTS RESERVED - -Permission to use, copy, modify, and distribute this software -for any purpose and without fee is hereby granted, provided -that the above copyright notice appear in all copies and that -both the copyright notice and this permission notice appear in -supporting documentation, and that the name of Silicon -Graphics, Inc. not be used in advertising or publicity -pertaining to distribution of the software without specific, -written prior permission. - -THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU -"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR -OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO -EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE -ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER, -INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE, -SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR -NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR -PERFORMANCE OF THIS SOFTWARE. - -US Government Users Restricted Rights - -Use, duplication, or disclosure by the Government is subject to -restrictions set forth in FAR 52.227.19(c)(2) or subparagraph -(c)(1)(ii) of the Rights in Technical Data and Computer -Software clause at DFARS 252.227-7013 and/or in similar or -successor clauses in the FAR or the DOD or NASA FAR -Supplement. Unpublished-- rights reserved under the copyright -laws of the United States. Contractor/manufacturer is Silicon -Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA -94039-7311. - -OpenGL(TM) is a trademark of Silicon Graphics, Inc. -*/ - -#include "glutint.h" - -/* Rim, body, lid, and bottom data must be reflected in x and - y; handle and spout data across the y axis only. */ - -static int patchdata[][16] = -{ - /* rim */ - {102, 103, 104, 105, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15}, - /* body */ - {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27}, - {24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40}, - /* lid */ - {96, 96, 96, 96, 97, 98, 99, 100, 101, 101, 101, - 101, 0, 1, 2, 3,}, - {0, 1, 2, 3, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117}, - /* bottom */ - {118, 118, 118, 118, 124, 122, 119, 121, 123, 126, - 125, 120, 40, 39, 38, 37}, - /* handle */ - {41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56}, - {53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 28, 65, 66, 67}, - /* spout */ - {68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83}, - {80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95} -}; -/* *INDENT-OFF* */ - -static float cpdata[][3] = -{ - {0.2, 0, 2.7}, {0.2, -0.112, 2.7}, {0.112, -0.2, 2.7}, {0, - -0.2, 2.7}, {1.3375, 0, 2.53125}, {1.3375, -0.749, 2.53125}, - {0.749, -1.3375, 2.53125}, {0, -1.3375, 2.53125}, {1.4375, - 0, 2.53125}, {1.4375, -0.805, 2.53125}, {0.805, -1.4375, - 2.53125}, {0, -1.4375, 2.53125}, {1.5, 0, 2.4}, {1.5, -0.84, - 2.4}, {0.84, -1.5, 2.4}, {0, -1.5, 2.4}, {1.75, 0, 1.875}, - {1.75, -0.98, 1.875}, {0.98, -1.75, 1.875}, {0, -1.75, - 1.875}, {2, 0, 1.35}, {2, -1.12, 1.35}, {1.12, -2, 1.35}, - {0, -2, 1.35}, {2, 0, 0.9}, {2, -1.12, 0.9}, {1.12, -2, - 0.9}, {0, -2, 0.9}, {-2, 0, 0.9}, {2, 0, 0.45}, {2, -1.12, - 0.45}, {1.12, -2, 0.45}, {0, -2, 0.45}, {1.5, 0, 0.225}, - {1.5, -0.84, 0.225}, {0.84, -1.5, 0.225}, {0, -1.5, 0.225}, - {1.5, 0, 0.15}, {1.5, -0.84, 0.15}, {0.84, -1.5, 0.15}, {0, - -1.5, 0.15}, {-1.6, 0, 2.025}, {-1.6, -0.3, 2.025}, {-1.5, - -0.3, 2.25}, {-1.5, 0, 2.25}, {-2.3, 0, 2.025}, {-2.3, -0.3, - 2.025}, {-2.5, -0.3, 2.25}, {-2.5, 0, 2.25}, {-2.7, 0, - 2.025}, {-2.7, -0.3, 2.025}, {-3, -0.3, 2.25}, {-3, 0, - 2.25}, {-2.7, 0, 1.8}, {-2.7, -0.3, 1.8}, {-3, -0.3, 1.8}, - {-3, 0, 1.8}, {-2.7, 0, 1.575}, {-2.7, -0.3, 1.575}, {-3, - -0.3, 1.35}, {-3, 0, 1.35}, {-2.5, 0, 1.125}, {-2.5, -0.3, - 1.125}, {-2.65, -0.3, 0.9375}, {-2.65, 0, 0.9375}, {-2, - -0.3, 0.9}, {-1.9, -0.3, 0.6}, {-1.9, 0, 0.6}, {1.7, 0, - 1.425}, {1.7, -0.66, 1.425}, {1.7, -0.66, 0.6}, {1.7, 0, - 0.6}, {2.6, 0, 1.425}, {2.6, -0.66, 1.425}, {3.1, -0.66, - 0.825}, {3.1, 0, 0.825}, {2.3, 0, 2.1}, {2.3, -0.25, 2.1}, - {2.4, -0.25, 2.025}, {2.4, 0, 2.025}, {2.7, 0, 2.4}, {2.7, - -0.25, 2.4}, {3.3, -0.25, 2.4}, {3.3, 0, 2.4}, {2.8, 0, - 2.475}, {2.8, -0.25, 2.475}, {3.525, -0.25, 2.49375}, - {3.525, 0, 2.49375}, {2.9, 0, 2.475}, {2.9, -0.15, 2.475}, - {3.45, -0.15, 2.5125}, {3.45, 0, 2.5125}, {2.8, 0, 2.4}, - {2.8, -0.15, 2.4}, {3.2, -0.15, 2.4}, {3.2, 0, 2.4}, {0, 0, - 3.15}, {0.8, 0, 3.15}, {0.8, -0.45, 3.15}, {0.45, -0.8, - 3.15}, {0, -0.8, 3.15}, {0, 0, 2.85}, {1.4, 0, 2.4}, {1.4, - -0.784, 2.4}, {0.784, -1.4, 2.4}, {0, -1.4, 2.4}, {0.4, 0, - 2.55}, {0.4, -0.224, 2.55}, {0.224, -0.4, 2.55}, {0, -0.4, - 2.55}, {1.3, 0, 2.55}, {1.3, -0.728, 2.55}, {0.728, -1.3, - 2.55}, {0, -1.3, 2.55}, {1.3, 0, 2.4}, {1.3, -0.728, 2.4}, - {0.728, -1.3, 2.4}, {0, -1.3, 2.4}, {0, 0, 0}, {1.425, - -0.798, 0}, {1.5, 0, 0.075}, {1.425, 0, 0}, {0.798, -1.425, - 0}, {0, -1.5, 0.075}, {0, -1.425, 0}, {1.5, -0.84, 0.075}, - {0.84, -1.5, 0.075} -}; - -static float tex[2][2][2] = -{ - { {0, 0}, - {1, 0}}, - { {0, 1}, - {1, 1}} -}; - -/* *INDENT-ON* */ - -static void -teapot(GLint grid, GLdouble scale, GLenum type) -{ - float p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3]; - long i, j, k, l; - - glPushAttrib(GL_ENABLE_BIT | GL_EVAL_BIT); - glEnable(GL_AUTO_NORMAL); - glEnable(GL_NORMALIZE); - glEnable(GL_MAP2_VERTEX_3); - glEnable(GL_MAP2_TEXTURE_COORD_2); - glPushMatrix(); - glRotatef(270.0, 1.0, 0.0, 0.0); - glScalef(0.5 * scale, 0.5 * scale, 0.5 * scale); - glTranslatef(0.0, 0.0, -1.5); - for (i = 0; i < 10; i++) { - for (j = 0; j < 4; j++) { - for (k = 0; k < 4; k++) { - for (l = 0; l < 3; l++) { - p[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; - q[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l]; - if (l == 1) - q[j][k][l] *= -1.0; - if (i < 6) { - r[j][k][l] = - cpdata[patchdata[i][j * 4 + (3 - k)]][l]; - if (l == 0) - r[j][k][l] *= -1.0; - s[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; - if (l == 0) - s[j][k][l] *= -1.0; - if (l == 1) - s[j][k][l] *= -1.0; - } - } - } - } - glMap2f(GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2, - &tex[0][0][0]); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &p[0][0][0]); - glMapGrid2f(grid, 0.0, 1.0, grid, 0.0, 1.0); - glEvalMesh2(type, 0, grid, 0, grid); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &q[0][0][0]); - glEvalMesh2(type, 0, grid, 0, grid); - if (i < 6) { - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &r[0][0][0]); - glEvalMesh2(type, 0, grid, 0, grid); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &s[0][0][0]); - glEvalMesh2(type, 0, grid, 0, grid); - } - } - glPopMatrix(); - glPopAttrib(); -} - -/* CENTRY */ -void APIENTRY -glutSolidTeapot(GLdouble scale) -{ - teapot(14, scale, GL_FILL); -} - -void APIENTRY -glutWireTeapot(GLdouble scale) -{ - teapot(10, scale, GL_LINE); -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_tr10.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_tr10.c deleted file mode 100644 index 0fac8070ca..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_tr10.c +++ /dev/null @@ -1,1777 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmapTimesRoman10 XXX -#include "glutbitmap.h" -#undef glutBitmapTimesRoman10 - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0x80,0xc0,0x40,0x60,0xa0,0x90,0xb8,0x0,0xa0, -}; - -static const BitmapCharRec ch255 = {5,9,0,2,5,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0xc0,0x80,0xe0,0x90,0x90,0x90,0xe0,0x80,0x80, -}; - -static const BitmapCharRec ch254 = {4,9,0,2,5,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x80,0xc0,0x40,0x60,0xa0,0x90,0xb8,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch253 = {5,10,0,2,5,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x68,0x90,0x90,0x90,0x90,0x0,0x50, -}; - -static const BitmapCharRec ch252 = {5,7,0,0,5,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x68,0x90,0x90,0x90,0x90,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch251 = {5,8,0,0,5,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x68,0x90,0x90,0x90,0x90,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch250 = {5,8,0,0,5,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x68,0x90,0x90,0x90,0x90,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch249 = {5,8,0,0,5,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0x80,0x70,0x48,0x48,0x48,0x38,0x4, -}; - -static const BitmapCharRec ch248 = {6,7,1,1,5,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x20,0x0,0xf8,0x0,0x20, -}; - -static const BitmapCharRec ch247 = {5,5,0,0,6,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x60,0x90,0x90,0x90,0x60,0x0,0xa0, -}; - -static const BitmapCharRec ch246 = {4,7,0,0,5,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x60,0x90,0x90,0x90,0x60,0x0,0xa0,0x50, -}; - -static const BitmapCharRec ch245 = {4,8,0,0,5,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x60,0x90,0x90,0x90,0x60,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch244 = {4,8,0,0,5,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x60,0x90,0x90,0x90,0x60,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch243 = {4,8,0,0,5,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x60,0x90,0x90,0x90,0x60,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch242 = {4,8,0,0,5,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0xd8,0x90,0x90,0x90,0xe0,0x0,0xa0,0x50, -}; - -static const BitmapCharRec ch241 = {5,8,0,0,5,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x60,0x90,0x90,0x90,0x70,0xa0,0x70,0x40, -}; - -static const BitmapCharRec ch240 = {4,8,0,0,5,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0xe0,0x40,0x40,0x40,0xc0,0x0,0xa0, -}; - -static const BitmapCharRec ch239 = {3,7,0,0,4,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0xe0,0x40,0x40,0x40,0xc0,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch238 = {3,8,0,0,4,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0xe0,0x40,0x40,0x40,0xc0,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch237 = {3,8,0,0,4,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0xe0,0x40,0x40,0x40,0xc0,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch236 = {3,8,0,0,4,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x60,0x80,0xc0,0xa0,0x60,0x0,0xa0, -}; - -static const BitmapCharRec ch235 = {3,7,0,0,4,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x60,0x80,0xc0,0xa0,0x60,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch234 = {3,8,0,0,4,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x60,0x80,0xc0,0xa0,0x60,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch233 = {3,8,0,0,4,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x60,0x80,0xc0,0xa0,0x60,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch232 = {3,8,0,0,4,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0xc0,0x20,0x40,0x60,0x80,0x80,0x80,0x60, -}; - -static const BitmapCharRec ch231 = {3,8,0,3,4,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0xd8,0xa0,0x70,0x28,0xd8, -}; - -static const BitmapCharRec ch230 = {5,5,0,0,6,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0xe0,0xa0,0x60,0x20,0xc0,0x40,0xa0,0x40, -}; - -static const BitmapCharRec ch229 = {3,8,0,0,4,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0xe0,0xa0,0x60,0x20,0xc0,0x0,0xa0, -}; - -static const BitmapCharRec ch228 = {3,7,0,0,4,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0xe0,0xa0,0x60,0x20,0xc0,0x0,0xa0,0x50, -}; - -static const BitmapCharRec ch227 = {4,8,0,0,4,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0xe0,0xa0,0x60,0x20,0xc0,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch226 = {3,8,0,0,4,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0xe0,0xa0,0x60,0x20,0xc0,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch225 = {3,8,0,0,4,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0xe0,0xa0,0x60,0x20,0xc0,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch224 = {3,8,0,0,4,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0xe0,0x50,0x50,0x60,0x50,0x50,0x20, -}; - -static const BitmapCharRec ch223 = {4,7,0,0,5,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0xe0,0x40,0x70,0x48,0x70,0x40,0xe0, -}; - -static const BitmapCharRec ch222 = {5,7,0,0,6,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x38,0x10,0x10,0x28,0x28,0x44,0xee,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch221 = {7,10,0,0,8,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x28, -}; - -static const BitmapCharRec ch220 = {7,9,0,0,8,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch219 = {7,10,0,0,8,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch218 = {7,10,0,0,8,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch217 = {7,10,0,0,8,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x80,0x7c,0x66,0x52,0x52,0x4a,0x66,0x3e,0x1, -}; - -static const BitmapCharRec ch216 = {8,9,0,1,8,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x88,0x50,0x20,0x50,0x88, -}; - -static const BitmapCharRec ch215 = {5,5,0,0,6,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x50, -}; - -static const BitmapCharRec ch214 = {6,9,0,0,7,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch213 = {6,10,0,0,7,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch212 = {6,10,0,0,7,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch211 = {6,10,0,0,7,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch210 = {6,10,0,0,7,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0xe4,0x4c,0x4c,0x54,0x54,0x64,0xee,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch209 = {7,10,0,0,8,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0xf8,0x4c,0x44,0xe4,0x44,0x4c,0xf8, -}; - -static const BitmapCharRec ch208 = {6,7,0,0,7,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0xa0, -}; - -static const BitmapCharRec ch207 = {3,9,0,0,4,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch206 = {3,10,0,0,4,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch205 = {3,10,0,0,4,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch204 = {3,10,0,0,4,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x50, -}; - -static const BitmapCharRec ch203 = {5,9,0,0,6,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch202 = {5,10,0,0,6,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch201 = {5,10,0,0,6,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch200 = {5,10,0,0,6,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x60,0x10,0x20,0x78,0xc4,0x80,0x80,0x80,0xc4,0x7c, -}; - -static const BitmapCharRec ch199 = {6,10,0,3,7,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0xef,0x49,0x78,0x2e,0x28,0x39,0x1f, -}; - -static const BitmapCharRec ch198 = {8,7,0,0,9,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x10,0x28,0x10, -}; - -static const BitmapCharRec ch197 = {7,10,0,0,8,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x28, -}; - -static const BitmapCharRec ch196 = {7,9,0,0,8,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch195 = {7,10,0,0,8,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch194 = {7,10,0,0,8,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch193 = {7,10,0,0,8,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch192 = {7,10,0,0,8,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0xe0,0xa0,0x80,0x40,0x40,0x0,0x40, -}; - -static const BitmapCharRec ch191 = {3,7,0,2,4,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x44,0x3e,0x2c,0xd4,0x28,0x48,0xe4, -}; - -static const BitmapCharRec ch190 = {7,7,0,0,8,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x4e,0x24,0x2a,0xf6,0x48,0xc8,0x44, -}; - -static const BitmapCharRec ch189 = {7,7,0,0,8,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x44,0x3e,0x2c,0xf4,0x48,0xc8,0x44, -}; - -static const BitmapCharRec ch188 = {7,7,0,0,8,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0xa0,0x50,0x50,0xa0, -}; - -static const BitmapCharRec ch187 = {4,4,0,-1,5,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xe0,0x0,0x40,0xa0,0x40, -}; - -static const BitmapCharRec ch186 = {3,5,0,-2,4,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0xe0,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch185 = {3,4,0,-3,3,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0xc0,0x20,0x40, -}; - -static const BitmapCharRec ch184 = {3,3,0,3,4,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0x80, -}; - -static const BitmapCharRec ch183 = {1,1,0,-2,2,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x7c, -}; - -static const BitmapCharRec ch182 = {6,9,0,2,6,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x80,0x80,0xe8,0x90,0x90,0x90,0x90, -}; - -static const BitmapCharRec ch181 = {5,7,0,2,5,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0x80,0x40, -}; - -static const BitmapCharRec ch180 = {2,2,0,-5,3,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0xc0,0x20,0x40,0xe0, -}; - -static const BitmapCharRec ch179 = {3,4,0,-3,3,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xe0,0x40,0xa0,0x60, -}; - -static const BitmapCharRec ch178 = {3,4,0,-3,3,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xf8,0x0,0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch177 = {5,7,0,0,6,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch176 = {4,4,0,-3,4,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xe0, -}; - -static const BitmapCharRec ch175 = {3,1,0,-6,4,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x38,0x44,0xaa,0xb2,0xba,0x44,0x38, -}; - -static const BitmapCharRec ch174 = {7,7,-1,0,9,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xe0, -}; - -static const BitmapCharRec ch173 = {3,1,0,-2,4,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x8,0x8,0xf8, -}; - -static const BitmapCharRec ch172 = {5,3,-1,-1,7,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x50,0xa0,0xa0,0x50, -}; - -static const BitmapCharRec ch171 = {4,4,0,-1,5,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xe0,0x0,0xa0,0x20,0xc0, -}; - -static const BitmapCharRec ch170 = {3,5,0,-2,4,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x38,0x44,0x9a,0xa2,0x9a,0x44,0x38, -}; - -static const BitmapCharRec ch169 = {7,7,-1,0,9,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xa0, -}; - -static const BitmapCharRec ch168 = {3,1,-1,-6,5,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0xe0,0x90,0x20,0x50,0x90,0xa0,0x40,0x90,0x70, -}; - -static const BitmapCharRec ch167 = {4,9,0,1,5,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0x80,0x80,0x80,0x0,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch166 = {1,7,0,0,2,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x70,0x20,0xf8,0x20,0xd8,0x50,0x88, -}; - -static const BitmapCharRec ch165 = {5,7,0,0,5,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0x88,0x70,0x50,0x50,0x70,0x88, -}; - -static const BitmapCharRec ch164 = {5,6,0,-1,5,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xf0,0xc8,0x40,0xe0,0x40,0x50,0x30, -}; - -static const BitmapCharRec ch163 = {5,7,0,0,5,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x80,0xe0,0x90,0x80,0x90,0x70,0x10, -}; - -static const BitmapCharRec ch162 = {4,7,0,1,5,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch161 = {1,7,-1,2,3,ch161data}; - -/* char: 0xa0 */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,2,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,2,0}; -#endif - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x98,0x64, -}; - -static const BitmapCharRec ch126 = {6,2,0,-2,7,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0x80,0x40,0x40,0x40,0x20,0x40,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch125 = {3,9,0,2,4,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch124 = {1,9,0,2,2,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x20,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch123 = {3,9,0,2,4,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xf0,0x90,0x40,0x20,0xf0, -}; - -static const BitmapCharRec ch122 = {4,5,0,0,5,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x40,0x40,0x20,0x30,0x50,0x48,0xdc, -}; - -static const BitmapCharRec ch121 = {6,7,1,2,5,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0xd8,0x50,0x20,0x50,0xd8, -}; - -static const BitmapCharRec ch120 = {5,5,0,0,6,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x28,0x6c,0x54,0x92,0xdb, -}; - -static const BitmapCharRec ch119 = {8,5,0,0,8,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x20,0x60,0x50,0x90,0xd8, -}; - -static const BitmapCharRec ch118 = {5,5,0,0,5,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x68,0x90,0x90,0x90,0x90, -}; - -static const BitmapCharRec ch117 = {5,5,0,0,5,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x30,0x40,0x40,0x40,0xe0,0x40, -}; - -static const BitmapCharRec ch116 = {4,6,0,0,4,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0xe0,0x20,0x60,0x80,0xe0, -}; - -static const BitmapCharRec ch115 = {3,5,0,0,4,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0xe0,0x40,0x40,0x60,0xa0, -}; - -static const BitmapCharRec ch114 = {3,5,0,0,4,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x38,0x10,0x70,0x90,0x90,0x90,0x70, -}; - -static const BitmapCharRec ch113 = {5,7,0,2,5,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0xc0,0x80,0xe0,0x90,0x90,0x90,0xe0, -}; - -static const BitmapCharRec ch112 = {4,7,0,2,5,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x60,0x90,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch111 = {4,5,0,0,5,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0xd8,0x90,0x90,0x90,0xe0, -}; - -static const BitmapCharRec ch110 = {5,5,0,0,5,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0xdb,0x92,0x92,0x92,0xec, -}; - -static const BitmapCharRec ch109 = {8,5,0,0,8,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0xe0,0x40,0x40,0x40,0x40,0x40,0xc0, -}; - -static const BitmapCharRec ch108 = {3,7,0,0,4,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0x98,0x90,0xe0,0xa0,0x90,0x80,0x80, -}; - -static const BitmapCharRec ch107 = {5,7,0,0,5,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0x80,0x40,0x40,0x40,0x40,0x40,0xc0,0x0,0x40, -}; - -static const BitmapCharRec ch106 = {2,9,0,2,3,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0x40,0x40,0x40,0x40,0xc0,0x0,0x40, -}; - -static const BitmapCharRec ch105 = {2,7,0,0,3,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0xd8,0x90,0x90,0x90,0xe0,0x80,0x80, -}; - -static const BitmapCharRec ch104 = {5,7,0,0,5,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0xe0,0x90,0x60,0x40,0xa0,0xa0,0x70, -}; - -static const BitmapCharRec ch103 = {4,7,0,2,5,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0xe0,0x40,0x40,0x40,0xe0,0x40,0x30, -}; - -static const BitmapCharRec ch102 = {4,7,0,0,4,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x60,0x80,0xc0,0xa0,0x60, -}; - -static const BitmapCharRec ch101 = {3,5,0,0,4,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x68,0x90,0x90,0x90,0x70,0x10,0x30, -}; - -static const BitmapCharRec ch100 = {5,7,0,0,5,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x60,0x80,0x80,0x80,0x60, -}; - -static const BitmapCharRec ch99 = {3,5,0,0,4,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xe0,0x90,0x90,0x90,0xe0,0x80,0x80, -}; - -static const BitmapCharRec ch98 = {4,7,0,0,5,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0xe0,0xa0,0x60,0x20,0xc0, -}; - -static const BitmapCharRec ch97 = {3,5,0,0,4,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0xc0,0x80, -}; - -static const BitmapCharRec ch96 = {2,2,0,-5,3,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xf8, -}; - -static const BitmapCharRec ch95 = {5,1,0,3,5,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0xa0,0xa0,0x40, -}; - -static const BitmapCharRec ch94 = {3,3,-1,-4,5,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0, -}; - -static const BitmapCharRec ch93 = {2,9,0,2,3,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x20,0x20,0x40,0x40,0x40,0x80,0x80, -}; - -static const BitmapCharRec ch92 = {3,7,0,0,3,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0, -}; - -static const BitmapCharRec ch91 = {2,9,0,2,3,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xf8,0x88,0x40,0x20,0x10,0x88,0xf8, -}; - -static const BitmapCharRec ch90 = {5,7,0,0,6,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x38,0x10,0x10,0x28,0x28,0x44,0xee, -}; - -static const BitmapCharRec ch89 = {7,7,0,0,8,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0xee,0x44,0x28,0x10,0x28,0x44,0xee, -}; - -static const BitmapCharRec ch88 = {7,7,0,0,8,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x22,0x0,0x22,0x0,0x55,0x0,0x55,0x0,0xc9,0x80,0x88,0x80,0xdd,0xc0, -}; - -static const BitmapCharRec ch87 = {10,7,0,0,10,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x10,0x10,0x28,0x28,0x6c,0x44,0xee, -}; - -static const BitmapCharRec ch86 = {7,7,0,0,8,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x38,0x6c,0x44,0x44,0x44,0x44,0xee, -}; - -static const BitmapCharRec ch85 = {7,7,0,0,8,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0x70,0x20,0x20,0x20,0x20,0xa8,0xf8, -}; - -static const BitmapCharRec ch84 = {5,7,0,0,6,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0xe0,0x90,0x10,0x60,0xc0,0x90,0x70, -}; - -static const BitmapCharRec ch83 = {4,7,0,0,5,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0xec,0x48,0x50,0x70,0x48,0x48,0xf0, -}; - -static const BitmapCharRec ch82 = {6,7,0,0,7,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0xc,0x18,0x70,0xcc,0x84,0x84,0x84,0xcc,0x78, -}; - -static const BitmapCharRec ch81 = {6,9,0,2,7,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0xe0,0x40,0x40,0x70,0x48,0x48,0xf0, -}; - -static const BitmapCharRec ch80 = {5,7,0,0,6,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x78,0xcc,0x84,0x84,0x84,0xcc,0x78, -}; - -static const BitmapCharRec ch79 = {6,7,0,0,7,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0xe4,0x4c,0x4c,0x54,0x54,0x64,0xee, -}; - -static const BitmapCharRec ch78 = {7,7,0,0,8,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0xeb,0x80,0x49,0x0,0x55,0x0,0x55,0x0,0x63,0x0,0x63,0x0,0xe3,0x80, -}; - -static const BitmapCharRec ch77 = {9,7,0,0,10,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xf8,0x48,0x40,0x40,0x40,0x40,0xe0, -}; - -static const BitmapCharRec ch76 = {5,7,0,0,6,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0xec,0x48,0x50,0x60,0x50,0x48,0xec, -}; - -static const BitmapCharRec ch75 = {6,7,0,0,7,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0xc0,0xa0,0x20,0x20,0x20,0x20,0x70, -}; - -static const BitmapCharRec ch74 = {4,7,0,0,4,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0xe0,0x40,0x40,0x40,0x40,0x40,0xe0, -}; - -static const BitmapCharRec ch73 = {3,7,0,0,4,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0xee,0x44,0x44,0x7c,0x44,0x44,0xee, -}; - -static const BitmapCharRec ch72 = {7,7,0,0,8,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x78,0xc4,0x84,0x9c,0x80,0xc4,0x7c, -}; - -static const BitmapCharRec ch71 = {6,7,0,0,7,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0xe0,0x40,0x40,0x70,0x40,0x48,0xf8, -}; - -static const BitmapCharRec ch70 = {5,7,0,0,6,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xf8,0x48,0x40,0x70,0x40,0x48,0xf8, -}; - -static const BitmapCharRec ch69 = {5,7,0,0,6,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xf8,0x4c,0x44,0x44,0x44,0x4c,0xf8, -}; - -static const BitmapCharRec ch68 = {6,7,0,0,7,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x78,0xc4,0x80,0x80,0x80,0xc4,0x7c, -}; - -static const BitmapCharRec ch67 = {6,7,0,0,7,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xf0,0x48,0x48,0x70,0x48,0x48,0xf0, -}; - -static const BitmapCharRec ch66 = {5,7,0,0,6,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0xee,0x44,0x7c,0x28,0x28,0x38,0x10, -}; - -static const BitmapCharRec ch65 = {7,7,0,0,8,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x3e,0x40,0x92,0xad,0xa5,0xa5,0x9d,0x42,0x3c, -}; - -static const BitmapCharRec ch64 = {8,9,0,2,9,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x40,0x0,0x40,0x40,0x20,0xa0,0xe0, -}; - -static const BitmapCharRec ch63 = {3,7,0,0,4,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0x80,0x40,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch62 = {3,5,0,0,5,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xf8,0x0,0xf8, -}; - -static const BitmapCharRec ch61 = {5,3,0,-1,6,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x20,0x40,0x80,0x40,0x20, -}; - -static const BitmapCharRec ch60 = {3,5,-1,0,5,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x80,0x80,0x0,0x0,0x0,0x80, -}; - -static const BitmapCharRec ch59 = {1,7,-1,2,3,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0x80,0x0,0x0,0x0,0x80, -}; - -static const BitmapCharRec ch58 = {1,5,-1,0,3,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0xc0,0x20,0x70,0x90,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch57 = {4,7,0,0,5,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x60,0x90,0x90,0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch56 = {4,7,0,0,5,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x40,0x40,0x40,0x20,0x20,0x90,0xf0, -}; - -static const BitmapCharRec ch55 = {4,7,0,0,5,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x60,0x90,0x90,0x90,0xe0,0x40,0x30, -}; - -static const BitmapCharRec ch54 = {4,7,0,0,5,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0xe0,0x90,0x10,0x10,0xe0,0x40,0x70, -}; - -static const BitmapCharRec ch53 = {4,7,0,0,5,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x10,0x10,0xf8,0x90,0x50,0x30,0x10, -}; - -static const BitmapCharRec ch52 = {5,7,0,0,5,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0xe0,0x10,0x10,0x60,0x10,0x90,0x60, -}; - -static const BitmapCharRec ch51 = {4,7,0,0,5,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xf0,0x40,0x20,0x20,0x10,0x90,0x60, -}; - -static const BitmapCharRec ch50 = {4,7,0,0,5,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0xe0,0x40,0x40,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch49 = {3,7,-1,0,5,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x60,0x90,0x90,0x90,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch48 = {4,7,0,0,5,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0x80,0x80,0x40,0x40,0x40,0x20,0x20, -}; - -static const BitmapCharRec ch47 = {3,7,0,0,3,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0x80, -}; - -static const BitmapCharRec ch46 = {1,1,-1,0,3,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xf0, -}; - -static const BitmapCharRec ch45 = {4,1,-1,-2,7,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x80,0x80, -}; - -static const BitmapCharRec ch44 = {1,3,-1,2,3,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch43 = {5,5,0,0,6,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0xa0,0x40,0xa0, -}; - -static const BitmapCharRec ch42 = {3,3,0,-4,5,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x40,0x20,0x20,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {3,9,0,2,4,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x20,0x40,0x40,0x80,0x80,0x80,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch40 = {3,9,0,2,4,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x40,0xc0, -}; - -static const BitmapCharRec ch39 = {2,2,0,-5,3,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x76,0x8d,0x98,0x74,0x6e,0x50,0x30, -}; - -static const BitmapCharRec ch38 = {8,7,0,0,8,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x44,0x2a,0x2a,0x56,0xa8,0xa4,0x7e, -}; - -static const BitmapCharRec ch37 = {7,7,0,0,8,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x20,0xe0,0x90,0x10,0x60,0x80,0x90,0x70,0x20, -}; - -static const BitmapCharRec ch36 = {4,9,0,1,5,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x50,0x50,0xf8,0x50,0xf8,0x50,0x50, -}; - -static const BitmapCharRec ch35 = {5,7,0,0,5,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0xa0,0xa0, -}; - -static const BitmapCharRec ch34 = {3,2,0,-5,4,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0x80,0x0,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch33 = {1,7,-1,0,3,ch33data}; - -/* char: 0x20 ' ' */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,2,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,2,0}; -#endif - -static const BitmapCharRec * const chars[] = { -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -const BitmapFontRec glutBitmapTimesRoman10 = { -"-adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1", -224, -32, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_tr24.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_tr24.c deleted file mode 100644 index 22b0e51603..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_tr24.c +++ /dev/null @@ -1,2060 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmapTimesRoman24 XXX -#include "glutbitmap.h" -#undef glutBitmapTimesRoman24 - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0, -0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0, -0xf1,0xe0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0, -}; - -static const BitmapCharRec ch255 = {11,21,0,5,11,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0xf0,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x6e,0x0,0x73,0x80,0x61,0x80, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x61,0x80,0x73,0x80, -0x6e,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0xe0,0x0, -}; - -static const BitmapCharRec ch254 = {10,22,-1,5,12,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0, -0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0, -0xf1,0xe0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80,0x1,0x80, -}; - -static const BitmapCharRec ch253 = {11,22,0,5,11,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0, -}; - -static const BitmapCharRec ch252 = {11,16,-1,0,13,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0, -0xc,0x0, -}; - -static const BitmapCharRec ch251 = {11,17,-1,0,13,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80, -0x1,0x80, -}; - -static const BitmapCharRec ch250 = {11,17,-1,0,13,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x2,0x0,0xc,0x0,0x38,0x0, -0x30,0x0, -}; - -static const BitmapCharRec ch249 = {11,17,-1,0,13,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0xc0,0x0,0xde,0x0,0x73,0x80,0x71,0x80,0xd0,0xc0,0xd8,0xc0,0xc8,0xc0,0xcc,0xc0, -0xc4,0xc0,0xc6,0xc0,0x63,0x80,0x73,0x80,0x1e,0xc0,0x0,0xc0, -}; - -static const BitmapCharRec ch248 = {10,14,-1,1,12,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x6,0x0,0x6,0x0,0x0,0x0,0x0,0x0,0xff,0xf0,0xff,0xf0,0x0,0x0,0x0,0x0, -0x6,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch247 = {12,10,-1,-2,14,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0, -}; - -static const BitmapCharRec ch246 = {10,16,-1,0,12,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x0,0x0,0x27,0x0,0x1c,0x80, -}; - -static const BitmapCharRec ch245 = {10,16,-1,0,12,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0, -0xc,0x0, -}; - -static const BitmapCharRec ch244 = {10,17,-1,0,12,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80, -0x1,0x80, -}; - -static const BitmapCharRec ch243 = {10,17,-1,0,12,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x2,0x0,0xc,0x0,0x38,0x0, -0x30,0x0, -}; - -static const BitmapCharRec ch242 = {10,17,-1,0,12,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x71,0xc0,0x6f,0x80,0xe7,0x0,0x0,0x0,0x0,0x0,0x27,0x0,0x1c,0x80, -}; - -static const BitmapCharRec ch241 = {11,16,-1,0,13,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1f,0x0,0xc6,0x0,0x3c,0x0,0x1e,0x0,0x71,0x80, -0xc0,0x0, -}; - -static const BitmapCharRec ch240 = {10,17,-1,0,12,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x0,0xcc,0xcc, -}; - -static const BitmapCharRec ch239 = {6,16,0,0,6,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x84,0x48,0x78, -0x30, -}; - -static const BitmapCharRec ch238 = {6,17,0,0,6,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x0,0x80,0x60,0x38, -0x18, -}; - -static const BitmapCharRec ch237 = {5,17,-1,0,6,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x8,0x30,0xe0, -0xc0, -}; - -static const BitmapCharRec ch236 = {5,17,0,0,6,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, -0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0, -}; - -static const BitmapCharRec ch235 = {9,16,-1,0,11,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, -0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0, -0xc,0x0, -}; - -static const BitmapCharRec ch234 = {9,17,-1,0,11,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, -0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x10,0x0,0xc,0x0,0x7,0x0, -0x3,0x0, -}; - -static const BitmapCharRec ch233 = {9,17,-1,0,11,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, -0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x4,0x0,0x18,0x0,0x70,0x0, -0x60,0x0, -}; - -static const BitmapCharRec ch232 = {9,17,-1,0,11,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x3c,0x0,0x66,0x0,0x6,0x0,0x1e,0x0,0x18,0x0,0x8,0x0,0x1e,0x0,0x7f,0x0, -0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x41,0x80, -0x63,0x80,0x1f,0x0, -}; - -static const BitmapCharRec ch231 = {9,18,-1,6,11,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x70,0xf0,0xfb,0xf8,0xc7,0x84,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0xfc, -0x3,0xc,0x63,0xc,0x67,0x98,0x3c,0xf0, -}; - -static const BitmapCharRec ch230 = {14,12,-1,0,16,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x1c,0x0,0x22,0x0,0x22,0x0, -0x1c,0x0, -}; - -static const BitmapCharRec ch229 = {9,17,-1,0,11,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x66,0x0,0x66,0x0, -}; - -static const BitmapCharRec ch228 = {9,16,-1,0,11,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x5c,0x0,0x3a,0x0, -}; - -static const BitmapCharRec ch227 = {9,16,-1,0,11,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x42,0x0,0x24,0x0,0x3c,0x0, -0x18,0x0, -}; - -static const BitmapCharRec ch226 = {9,17,-1,0,11,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x10,0x0,0xc,0x0,0x7,0x0, -0x3,0x0, -}; - -static const BitmapCharRec ch225 = {9,17,-1,0,11,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x4,0x0,0x18,0x0,0x70,0x0, -0x60,0x0, -}; - -static const BitmapCharRec ch224 = {9,17,-1,0,11,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0xe7,0x0,0x6c,0x80,0x6c,0xc0,0x60,0xc0,0x60,0xc0,0x61,0xc0,0x61,0x80,0x63,0x80, -0x67,0x0,0x6c,0x0,0x63,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0, -0x1e,0x0, -}; - -static const BitmapCharRec ch223 = {10,17,-1,0,12,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x18, -0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70,0x3f,0xc0,0x30,0x0,0x30,0x0,0x30,0x0, -0xfc,0x0, -}; - -static const BitmapCharRec ch222 = {13,17,-1,0,15,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x7,0xe0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0xc0, -0x3,0x40,0x6,0x60,0x6,0x20,0xc,0x30,0x1c,0x10,0x18,0x18,0x38,0x8,0x30,0xc, -0xfc,0x3f,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30, -}; - -static const BitmapCharRec ch221 = {16,22,0,0,16,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0xfc,0x1f,0x0,0x0,0x0,0x0,0x6,0x30,0x6,0x30, -}; - -static const BitmapCharRec ch220 = {16,21,-1,0,18,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0xfc,0x1f,0x0,0x0,0x8,0x10,0x6,0x60,0x3,0xc0,0x1,0x80, -}; - -static const BitmapCharRec ch219 = {16,22,-1,0,18,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0xfc,0x1f,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30, -}; - -static const BitmapCharRec ch218 = {16,22,-1,0,18,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0xfc,0x1f,0x0,0x0,0x0,0x40,0x1,0x80,0x7,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch217 = {16,22,-1,0,18,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x20,0x0,0x27,0xe0,0x1c,0x38,0x38,0x1c,0x68,0x6,0x64,0x6,0xc2,0x3,0xc2,0x3, -0xc1,0x3,0xc1,0x3,0xc0,0x83,0xc0,0x83,0xc0,0x43,0x60,0x46,0x60,0x26,0x38,0x1c, -0x1c,0x38,0x7,0xe4,0x0,0x4, -}; - -static const BitmapCharRec ch216 = {16,19,-1,1,18,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x80,0x40,0xc0,0xc0,0x61,0x80,0x33,0x0,0x1e,0x0,0xc,0x0,0x1e,0x0,0x33,0x0, -0x61,0x80,0xc0,0xc0,0x80,0x40, -}; - -static const BitmapCharRec ch215 = {10,11,-2,-1,14,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0,0x0,0x0,0x0,0x0,0x6,0x60,0x6,0x60, -}; - -static const BitmapCharRec ch214 = {16,21,-1,0,18,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0,0x0,0x0,0x0,0x0,0x4,0xe0,0x3,0x90, -}; - -static const BitmapCharRec ch213 = {16,21,-1,0,18,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0,0x0,0x0,0x8,0x10,0x6,0x60,0x3,0xc0,0x1,0x80, -}; - -static const BitmapCharRec ch212 = {16,22,-1,0,18,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30, -}; - -static const BitmapCharRec ch211 = {16,22,-1,0,18,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0,0x0,0x0,0x0,0x40,0x1,0x80,0x7,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch210 = {16,22,-1,0,18,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0xf8,0xc,0x20,0x1c,0x20,0x1c,0x20,0x34,0x20,0x64,0x20,0x64,0x20,0xc4,0x21,0x84, -0x21,0x84,0x23,0x4,0x26,0x4,0x26,0x4,0x2c,0x4,0x38,0x4,0x38,0x4,0x30,0x4, -0xf0,0x1f,0x0,0x0,0x0,0x0,0x4,0xe0,0x3,0x90, -}; - -static const BitmapCharRec ch209 = {16,21,-1,0,18,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0x7f,0xe0,0x18,0x38,0x18,0x1c,0x18,0x6,0x18,0x6,0x18,0x3,0x18,0x3,0x18,0x3, -0xff,0x3,0x18,0x3,0x18,0x3,0x18,0x3,0x18,0x6,0x18,0x6,0x18,0x1c,0x18,0x38, -0x7f,0xe0, -}; - -static const BitmapCharRec ch208 = {16,17,0,0,17,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0xfc,0x0,0x0,0xcc,0xcc, -}; - -static const BitmapCharRec ch207 = {6,21,-1,0,8,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, -0x7e,0x0,0x81,0x66,0x3c,0x18, -}; - -static const BitmapCharRec ch206 = {8,22,-1,0,8,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0xfc,0x0,0x40,0x30,0x1c,0xc, -}; - -static const BitmapCharRec ch205 = {6,22,-1,0,8,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0xfc,0x0,0x8,0x30,0xe0,0xc0, -}; - -static const BitmapCharRec ch204 = {6,22,-1,0,8,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, -0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0,0x0,0x0,0x0,0x0,0x19,0x80,0x19,0x80, -}; - -static const BitmapCharRec ch203 = {13,21,-1,0,15,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, -0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0,0x0,0x0,0x10,0x20,0xc,0xc0,0x7,0x80,0x3,0x0, -}; - -static const BitmapCharRec ch202 = {13,22,-1,0,15,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, -0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0,0x0,0x0,0x4,0x0,0x3,0x0,0x1,0xc0,0x0,0xc0, -}; - -static const BitmapCharRec ch201 = {13,22,-1,0,15,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, -0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0,0x0,0x0,0x1,0x0,0x6,0x0,0x1c,0x0,0x18,0x0, -}; - -static const BitmapCharRec ch200 = {13,22,-1,0,15,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x7,0x80,0xc,0xc0,0x0,0xc0,0x3,0xc0,0x3,0x0,0x1,0x0,0x7,0xe0,0x1e,0x38, -0x38,0x8,0x60,0x4,0x60,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c,0x7,0xe4, -}; - -static const BitmapCharRec ch199 = {14,23,-1,6,16,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0xf9,0xff,0xf0,0x30,0x60,0x30,0x10,0x60,0x10,0x10,0x60,0x10,0x18,0x60,0x0,0x8, -0x60,0x0,0xf,0xe0,0x80,0xc,0x60,0x80,0x4,0x7f,0x80,0x4,0x60,0x80,0x6,0x60, -0x80,0x2,0x60,0x0,0x2,0x60,0x0,0x1,0x60,0x20,0x1,0x60,0x20,0x1,0xe0,0x60, -0x3,0xff,0xe0, -}; - -static const BitmapCharRec ch198 = {20,17,0,0,21,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x1,0xc0,0x0,0x2,0x20,0x0,0x2,0x20,0x0,0x1,0xc0,0x0, -}; - -static const BitmapCharRec ch197 = {17,21,0,0,17,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x30,0x0,0x6,0x30,0x0, -}; - -static const BitmapCharRec ch196 = {17,21,0,0,17,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0xfc,0x1f,0x80,0x30,0x7,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0xe0,0x0,0x3,0x90,0x0, -}; - -static const BitmapCharRec ch195 = {17,21,0,0,17,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x0,0x0,0x0,0x8,0x10,0x0,0x6,0x60,0x0,0x3,0xc0,0x0,0x1, -0x80,0x0, -}; - -static const BitmapCharRec ch194 = {17,22,0,0,17,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0xc0,0x0,0x0,0x70,0x0,0x0, -0x30,0x0, -}; - -static const BitmapCharRec ch193 = {17,22,0,0,17,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x0,0xc0,0x0,0x3,0x80,0x0,0x3, -0x0,0x0, -}; - -static const BitmapCharRec ch192 = {17,22,0,0,17,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x3e,0x63,0xc1,0xc3,0xc3,0xe0,0x70,0x30,0x38,0x18,0x18,0x8,0x8,0x0,0x0,0xc, -0xc, -}; - -static const BitmapCharRec ch191 = {8,17,-1,5,11,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x18,0x2,0x0,0x8,0x2,0x0,0xc,0x7f,0x80,0x4,0x22,0x0,0x6,0x32,0x0,0x3, -0x12,0x0,0x1,0xa,0x0,0x71,0x8e,0x0,0x88,0x86,0x0,0x8c,0xc2,0x0,0xc,0x60, -0x0,0x8,0x20,0x0,0x30,0x30,0x0,0x8,0x10,0x0,0x8c,0x18,0x0,0x4c,0xc,0x0, -0x38,0x4,0x0, -}; - -static const BitmapCharRec ch190 = {17,17,0,0,18,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x30,0x7e,0x10,0x22,0x18,0x10,0x8,0x18,0xc,0x8,0x6,0x4,0x2,0x6,0xfb,0x46, -0x21,0x26,0x21,0x9c,0x20,0xc0,0x20,0x40,0x20,0x60,0x20,0x20,0xa0,0x30,0x60,0x18, -0x20,0x8, -}; - -static const BitmapCharRec ch189 = {15,17,-1,0,18,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x30,0x4,0x10,0x4,0x18,0xff,0x8,0x44,0xc,0x64,0x6,0x24,0x2,0x14,0xfb,0x1c, -0x21,0xc,0x21,0x84,0x20,0xc0,0x20,0x40,0x20,0x60,0x20,0x20,0xa0,0x30,0x60,0x18, -0x20,0x8, -}; - -static const BitmapCharRec ch188 = {16,17,-1,0,18,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0x88,0x0,0xcc,0x0,0x66,0x0,0x33,0x0,0x19,0x80,0x19,0x80,0x33,0x0,0x66,0x0, -0xcc,0x0,0x88,0x0, -}; - -static const BitmapCharRec ch187 = {9,10,-2,-1,12,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xfc,0x0,0x78,0xcc,0xcc,0xcc,0xcc,0xcc,0x78, -}; - -static const BitmapCharRec ch186 = {6,9,-1,-8,8,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xa0,0x60,0x20, -}; - -static const BitmapCharRec ch185 = {5,10,-1,-7,7,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0x78,0xcc,0xc,0x3c,0x30,0x10, -}; - -static const BitmapCharRec ch184 = {6,6,-1,6,8,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch183 = {2,2,-2,-6,6,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0, -0x9,0x0,0x9,0x0,0x9,0x0,0x19,0x0,0x39,0x0,0x79,0x0,0x79,0x0,0xf9,0x0, -0xf9,0x0,0xf9,0x0,0x79,0x0,0x79,0x0,0x39,0x0,0x1f,0x80, -}; - -static const BitmapCharRec ch182 = {9,22,-1,5,11,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x40,0x0,0xe0,0x0,0xc0,0x0,0x40,0x0,0x40,0x0,0x5c,0xe0,0x7e,0xc0,0x71,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0xe1,0xc0, -}; - -static const BitmapCharRec ch181 = {11,17,-1,5,13,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0x80,0x60,0x38,0x18, -}; - -static const BitmapCharRec ch180 = {5,4,-2,-13,8,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0x70,0x88,0x8c,0xc,0x8,0x30,0x8,0x8c,0x4c,0x38, -}; - -static const BitmapCharRec ch179 = {6,10,0,-7,7,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xfc,0x44,0x20,0x30,0x10,0x8,0xc,0x8c,0x4c,0x38, -}; - -static const BitmapCharRec ch178 = {6,10,0,-7,7,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xff,0xf0,0xff,0xf0,0x0,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, -0xff,0xf0,0xff,0xf0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch177 = {12,15,-1,0,14,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x38,0x44,0x82,0x82,0x82,0x44,0x38, -}; - -static const BitmapCharRec ch176 = {7,7,-1,-10,9,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xfc,0xfc, -}; - -static const BitmapCharRec ch175 = {6,2,-1,-14,8,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x7,0xf0,0x0,0x1c,0x1c,0x0,0x30,0x6,0x0,0x60,0x3,0x0,0x47,0x19,0x0,0xc2, -0x31,0x80,0x82,0x20,0x80,0x82,0x40,0x80,0x83,0xe0,0x80,0x82,0x30,0x80,0x82,0x10, -0x80,0xc2,0x11,0x80,0x42,0x31,0x0,0x67,0xe3,0x0,0x30,0x6,0x0,0x1c,0x1c,0x0, -0x7,0xf0,0x0, -}; - -static const BitmapCharRec ch174 = {17,17,-1,0,19,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xfe,0xfe, -}; - -static const BitmapCharRec ch173 = {7,2,-1,-5,9,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0xff,0xf0,0xff,0xf0, -}; - -static const BitmapCharRec ch172 = {12,7,-1,-3,14,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x8,0x80,0x19,0x80,0x33,0x0,0x66,0x0,0xcc,0x0,0xcc,0x0,0x66,0x0,0x33,0x0, -0x19,0x80,0x8,0x80, -}; - -static const BitmapCharRec ch171 = {9,10,-2,-1,13,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0x7e,0x0,0x76,0xcc,0xcc,0x7c,0xc,0xcc,0x78, -}; - -static const BitmapCharRec ch170 = {7,9,0,-8,8,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x7,0xf0,0x0,0x1c,0x1c,0x0,0x30,0x6,0x0,0x61,0xc3,0x0,0x47,0x71,0x0,0xc4, -0x19,0x80,0x8c,0x0,0x80,0x88,0x0,0x80,0x88,0x0,0x80,0x88,0x0,0x80,0x8c,0x0, -0x80,0xc4,0x19,0x80,0x47,0x31,0x0,0x61,0xe3,0x0,0x30,0x6,0x0,0x1c,0x1c,0x0, -0x7,0xf0,0x0, -}; - -static const BitmapCharRec ch169 = {17,17,-1,0,19,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xcc,0xcc, -}; - -static const BitmapCharRec ch168 = {6,2,-1,-14,8,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x38,0x64,0x62,0x6,0xe,0x1c,0x38,0x74,0xe2,0xc3,0x83,0x87,0x4e,0x3c,0x38,0x70, -0x60,0x46,0x26,0x1c, -}; - -static const BitmapCharRec ch167 = {8,20,-2,2,12,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0, -}; - -static const BitmapCharRec ch166 = {2,17,-2,0,6,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0xf,0xc0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x1f,0xe0,0x3,0x0,0x1f,0xe0, -0x3,0x0,0x7,0x80,0xc,0x80,0xc,0xc0,0x18,0x40,0x18,0x60,0x30,0x20,0x70,0x30, -0xf8,0x7c, -}; - -static const BitmapCharRec ch165 = {14,17,0,0,14,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0xc0,0x60,0xee,0xe0,0x7f,0xc0,0x31,0x80,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x31,0x80,0x7f,0xc0,0xee,0xe0,0xc0,0x60, -}; - -static const BitmapCharRec ch164 = {11,12,-1,-3,13,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xe7,0x80,0xbe,0xc0,0x78,0x40,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, -0x30,0x0,0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x31,0x80,0x19,0x80, -0xf,0x0, -}; - -static const BitmapCharRec ch163 = {10,17,-1,0,12,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x40,0x0,0x40,0x0,0x3e,0x0,0x7f,0x0,0x70,0x80,0xd0,0x0,0xc8,0x0,0xc8,0x0, -0xc8,0x0,0xc4,0x0,0xc4,0x0,0x43,0x80,0x63,0x80,0x1f,0x0,0x1,0x0,0x1,0x0, -}; - -static const BitmapCharRec ch162 = {9,16,-1,2,12,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0xc0, -0xc0, -}; - -static const BitmapCharRec ch161 = {2,17,-4,5,8,ch161data}; - -/* char: 0xa0 */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,6,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,6,0}; -#endif - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x83,0x80,0xc7,0xc0,0x7c,0x60,0x38,0x20, -}; - -static const BitmapCharRec ch126 = {11,4,-1,-5,13,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0xe0,0x30,0x18,0x18,0x18,0x18,0x18,0x18,0x8,0xc,0x4,0x3,0x4,0xc,0x8,0x18, -0x18,0x18,0x18,0x18,0x30,0xe0, -}; - -static const BitmapCharRec ch125 = {8,22,-1,5,10,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0, -}; - -static const BitmapCharRec ch124 = {2,17,-2,0,6,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x7,0xc,0x18,0x18,0x18,0x18,0x18,0x18,0x10,0x30,0x20,0xc0,0x20,0x30,0x10,0x18, -0x18,0x18,0x18,0x18,0xc,0x7, -}; - -static const BitmapCharRec ch123 = {8,22,-1,5,10,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xff,0xc3,0x61,0x70,0x30,0x38,0x18,0x1c,0xe,0x86,0xc3,0xff, -}; - -static const BitmapCharRec ch122 = {8,12,-1,0,10,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0, -0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0, -0xf1,0xe0, -}; - -static const BitmapCharRec ch121 = {11,17,0,5,11,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0xf1,0xe0,0x60,0xc0,0x21,0x80,0x33,0x80,0x1b,0x0,0xe,0x0,0xc,0x0,0x1a,0x0, -0x39,0x0,0x31,0x80,0x60,0xc0,0xf1,0xe0, -}; - -static const BitmapCharRec ch120 = {11,12,-1,0,13,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x4,0x10,0x0,0xe,0x38,0x0,0xe,0x38,0x0,0x1a,0x28,0x0,0x1a,0x64,0x0,0x19, -0x64,0x0,0x31,0x64,0x0,0x30,0xc2,0x0,0x30,0xc2,0x0,0x60,0xc2,0x0,0x60,0xc3, -0x0,0xf1,0xe7,0x80, -}; - -static const BitmapCharRec ch119 = {17,12,0,0,17,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x4,0x0,0xe,0x0,0xe,0x0,0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80, -0x30,0x80,0x60,0x80,0x60,0xc0,0xf1,0xe0, -}; - -static const BitmapCharRec ch118 = {11,12,0,0,11,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0, -}; - -static const BitmapCharRec ch117 = {11,12,-1,0,13,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x1c,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfe,0x70,0x30,0x10, -}; - -static const BitmapCharRec ch116 = {7,15,0,0,7,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0xf8,0xc6,0x83,0x3,0x7,0x1e,0x7c,0x70,0xe0,0xc2,0x66,0x3e, -}; - -static const BitmapCharRec ch115 = {8,12,-1,0,10,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x76,0x6e,0xe6, -}; - -static const BitmapCharRec ch114 = {7,12,-1,0,8,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x3,0xc0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1d,0x80,0x73,0x80,0x61,0x80, -0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x61,0x80,0x73,0x80, -0x1d,0x80, -}; - -static const BitmapCharRec ch113 = {10,17,-1,5,12,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0xf0,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x6e,0x0,0x73,0x80,0x61,0x80, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x61,0x80,0x73,0x80, -0xee,0x0, -}; - -static const BitmapCharRec ch112 = {10,17,-1,5,12,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0, -}; - -static const BitmapCharRec ch111 = {10,12,-1,0,12,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x71,0xc0,0x6f,0x80,0xe7,0x0, -}; - -static const BitmapCharRec ch110 = {11,12,-1,0,13,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0xf1,0xe3,0xc0,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60, -0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x71,0xe3,0x80,0x6f,0x9f, -0x0,0xe7,0xe,0x0, -}; - -static const BitmapCharRec ch109 = {18,12,-1,0,20,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, -0xe0, -}; - -static const BitmapCharRec ch108 = {4,17,-1,0,6,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0xf3,0xe0,0x61,0xc0,0x63,0x80,0x67,0x0,0x6e,0x0,0x6c,0x0,0x78,0x0,0x68,0x0, -0x64,0x0,0x66,0x0,0x63,0x0,0x67,0xc0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0, -0xe0,0x0, -}; - -static const BitmapCharRec ch107 = {11,17,-1,0,12,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0xc0,0xe0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0x70,0x0,0x0,0x0,0x30,0x30, -}; - -static const BitmapCharRec ch106 = {4,22,0,5,6,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x0,0x0,0x0,0x60, -0x60, -}; - -static const BitmapCharRec ch105 = {4,17,-1,0,6,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x71,0xc0,0x6f,0x80,0x67,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0, -0xe0,0x0, -}; - -static const BitmapCharRec ch104 = {11,17,-1,0,13,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x3f,0x0,0xf1,0xc0,0xc0,0x60,0xc0,0x20,0x60,0x60,0x3f,0xc0,0x7f,0x0,0x60,0x0, -0x30,0x0,0x3e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0, -0x1f,0xc0, -}; - -static const BitmapCharRec ch103 = {11,17,-1,5,12,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfe,0x30,0x30,0x30,0x16, -0xe, -}; - -static const BitmapCharRec ch102 = {7,17,0,0,7,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, -0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0, -}; - -static const BitmapCharRec ch101 = {9,12,-1,0,11,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x1e,0xc0,0x73,0x80,0x61,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80, -0xc1,0x80,0x61,0x80,0x73,0x80,0x1d,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80, -0x3,0x80, -}; - -static const BitmapCharRec ch100 = {10,17,-1,0,12,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -0xc0,0x0,0x41,0x80,0x63,0x80,0x1f,0x0, -}; - -static const BitmapCharRec ch99 = {9,12,-1,0,11,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0x5e,0x0,0x73,0x80,0x61,0x80,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x61,0x80,0x73,0x80,0x6e,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0, -0xe0,0x0, -}; - -static const BitmapCharRec ch98 = {10,17,-1,0,12,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0, -}; - -static const BitmapCharRec ch97 = {9,12,-1,0,11,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0x60,0xe0,0x80,0xc0,0x60, -}; - -static const BitmapCharRec ch96 = {3,5,-2,-12,7,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xff,0xf8,0xff,0xf8, -}; - -static const BitmapCharRec ch95 = {13,2,0,5,13,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x80,0x80,0xc1,0x80,0x41,0x0,0x63,0x0,0x22,0x0,0x36,0x0,0x14,0x0,0x1c,0x0, -0x8,0x0, -}; - -static const BitmapCharRec ch94 = {9,9,-1,-8,11,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, -0x18,0x18,0x18,0x18,0xf8, -}; - -static const BitmapCharRec ch93 = {5,21,-1,4,8,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x6,0x6,0x4,0xc,0xc,0x8,0x18,0x18,0x10,0x30,0x30,0x20,0x60,0x60,0x40,0xc0, -0xc0, -}; - -static const BitmapCharRec ch92 = {7,17,0,0,7,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xf8,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0xc0,0xc0,0xf8, -}; - -static const BitmapCharRec ch91 = {5,21,-2,4,8,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xff,0xf8,0xe0,0x18,0x70,0x8,0x30,0x8,0x38,0x0,0x18,0x0,0x1c,0x0,0xe,0x0, -0x6,0x0,0x7,0x0,0x3,0x0,0x3,0x80,0x1,0xc0,0x80,0xc0,0x80,0xe0,0xc0,0x70, -0xff,0xf0, -}; - -static const BitmapCharRec ch90 = {13,17,-1,0,15,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x7,0xe0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0xc0, -0x3,0x40,0x6,0x60,0x6,0x20,0xc,0x30,0x1c,0x10,0x18,0x18,0x38,0x8,0x30,0xc, -0xfc,0x3f, -}; - -static const BitmapCharRec ch89 = {16,17,0,0,16,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0xfc,0xf,0xc0,0x30,0x3,0x80,0x18,0x7,0x0,0x8,0xe,0x0,0x4,0xc,0x0,0x6, -0x18,0x0,0x2,0x38,0x0,0x1,0x70,0x0,0x0,0xe0,0x0,0x0,0xc0,0x0,0x1,0xc0, -0x0,0x3,0xa0,0x0,0x3,0x10,0x0,0x6,0x8,0x0,0xe,0xc,0x0,0x1c,0x6,0x0, -0x7e,0xf,0x80, -}; - -static const BitmapCharRec ch88 = {18,17,0,0,18,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x1,0x83,0x0,0x1,0x83,0x0,0x1,0x83,0x80,0x3,0x87,0x80,0x3,0x46,0x80,0x3, -0x46,0xc0,0x6,0x46,0x40,0x6,0x4c,0x40,0x6,0x4c,0x60,0xc,0x2c,0x60,0xc,0x2c, -0x20,0x18,0x2c,0x20,0x18,0x18,0x30,0x18,0x18,0x10,0x30,0x18,0x10,0x30,0x18,0x18, -0xfc,0x7e,0x7e, -}; - -static const BitmapCharRec ch87 = {23,17,0,0,23,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x1,0x80,0x0,0x1,0x80,0x0,0x1,0x80,0x0,0x3,0xc0,0x0,0x3,0x40,0x0,0x3, -0x60,0x0,0x6,0x20,0x0,0x6,0x20,0x0,0x6,0x30,0x0,0xc,0x10,0x0,0xc,0x18, -0x0,0x18,0x8,0x0,0x18,0x8,0x0,0x18,0xc,0x0,0x30,0x4,0x0,0x30,0x6,0x0, -0xfc,0x1f,0x80, -}; - -static const BitmapCharRec ch86 = {17,17,0,0,17,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0xfc,0x1f, -}; - -static const BitmapCharRec ch85 = {16,17,-1,0,18,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0xf,0xc0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0, -0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x83,0x4,0x83,0x4,0xc3,0xc, -0xff,0xfc, -}; - -static const BitmapCharRec ch84 = {14,17,-1,0,16,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x9e,0x0,0xf1,0x80,0xc0,0xc0,0x80,0x60,0x80,0x60,0x0,0x60,0x0,0xe0,0x3,0xc0, -0xf,0x80,0x1e,0x0,0x78,0x0,0xe0,0x0,0xc0,0x40,0xc0,0x40,0xc0,0xc0,0x63,0xc0, -0x1e,0x40, -}; - -static const BitmapCharRec ch83 = {11,17,-1,0,13,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0xfc,0x1e,0x30,0x1c,0x30,0x38,0x30,0x70,0x30,0x60,0x30,0xc0,0x31,0xc0,0x33,0x80, -0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x38,0x30,0x18,0x30,0x38,0x30,0x30,0x30,0x70, -0xff,0xc0, -}; - -static const BitmapCharRec ch82 = {15,17,-1,0,16,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x0,0xf,0x0,0x38,0x0,0x70,0x0,0xe0,0x1,0xc0,0x7,0xe0,0x1c,0x38,0x38,0x1c, -0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,0x7,0xe0, -}; - -static const BitmapCharRec ch81 = {16,22,-1,5,18,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, -0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70, -0xff,0xc0, -}; - -static const BitmapCharRec ch80 = {13,17,-1,0,15,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0, -}; - -static const BitmapCharRec ch79 = {16,17,-1,0,18,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0xf8,0xc,0x20,0x1c,0x20,0x1c,0x20,0x34,0x20,0x64,0x20,0x64,0x20,0xc4,0x21,0x84, -0x21,0x84,0x23,0x4,0x26,0x4,0x26,0x4,0x2c,0x4,0x38,0x4,0x38,0x4,0x30,0x4, -0xf0,0x1f, -}; - -static const BitmapCharRec ch78 = {16,17,-1,0,18,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0xf8,0x21,0xf8,0x20,0x60,0x60,0x20,0x60,0x60,0x20,0xd0,0x60,0x20,0xd0,0x60,0x21, -0x88,0x60,0x21,0x88,0x60,0x23,0x8,0x60,0x23,0x4,0x60,0x26,0x4,0x60,0x26,0x2, -0x60,0x2c,0x2,0x60,0x2c,0x2,0x60,0x38,0x1,0x60,0x38,0x1,0x60,0x30,0x0,0xe0, -0xf0,0x0,0xf8, -}; - -static const BitmapCharRec ch77 = {21,17,-1,0,22,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, -0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, -0xfc,0x0, -}; - -static const BitmapCharRec ch76 = {13,17,-1,0,14,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0xfc,0x1f,0x30,0xe,0x30,0x1c,0x30,0x38,0x30,0x70,0x30,0xe0,0x31,0xc0,0x33,0x80, -0x3f,0x0,0x3e,0x0,0x33,0x0,0x31,0x80,0x30,0xc0,0x30,0x60,0x30,0x30,0x30,0x18, -0xfc,0x7e, -}; - -static const BitmapCharRec ch75 = {16,17,-1,0,17,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x78,0x0,0xcc,0x0,0xc6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, -0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, -0x1f,0x80, -}; - -static const BitmapCharRec ch74 = {9,17,-1,0,11,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0xfc, -}; - -static const BitmapCharRec ch73 = {6,17,-1,0,8,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30, -0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x3f,0xfe,0x0,0x30,0x6,0x0,0x30,0x6, -0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0, -0xfc,0x1f,0x80, -}; - -static const BitmapCharRec ch72 = {17,17,-1,0,19,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x7,0xe0,0x1e,0x38,0x38,0x1c,0x60,0xc,0x60,0xc,0xc0,0xc,0xc0,0xc,0xc0,0x3f, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c, -0x7,0xe4, -}; - -static const BitmapCharRec ch71 = {16,17,-1,0,18,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x20,0x30,0x20, -0x3f,0xe0,0x30,0x20,0x30,0x20,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0, -}; - -static const BitmapCharRec ch70 = {12,17,-1,0,14,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, -0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0, -}; - -static const BitmapCharRec ch69 = {13,17,-1,0,15,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xff,0xc0,0x30,0x70,0x30,0x38,0x30,0xc,0x30,0xc,0x30,0x6,0x30,0x6,0x30,0x6, -0x30,0x6,0x30,0x6,0x30,0x6,0x30,0x6,0x30,0xc,0x30,0xc,0x30,0x38,0x30,0x70, -0xff,0xc0, -}; - -static const BitmapCharRec ch68 = {15,17,-1,0,17,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x7,0xe0,0x1e,0x38,0x38,0x8,0x60,0x4,0x60,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c, -0x7,0xe4, -}; - -static const BitmapCharRec ch67 = {14,17,-1,0,16,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xff,0xe0,0x30,0x78,0x30,0x18,0x30,0xc,0x30,0xc,0x30,0xc,0x30,0x18,0x30,0x38, -0x3f,0xe0,0x30,0x40,0x30,0x30,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70, -0xff,0xc0, -}; - -static const BitmapCharRec ch66 = {14,17,-1,0,16,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0, -}; - -static const BitmapCharRec ch65 = {17,17,0,0,17,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x3,0xf0,0x0,0xe,0xc,0x0,0x18,0x0,0x0,0x30,0x0,0x0,0x61,0xde,0x0,0x63, -0x7b,0x0,0xc6,0x39,0x80,0xc6,0x18,0x80,0xc6,0x18,0xc0,0xc6,0x18,0x40,0xc6,0xc, -0x40,0xc3,0xc,0x40,0xc3,0x8c,0x40,0xe1,0xfc,0x40,0x60,0xec,0xc0,0x70,0x0,0x80, -0x38,0x1,0x80,0x1c,0x3,0x0,0xf,0xe,0x0,0x3,0xf8,0x0, -}; - -static const BitmapCharRec ch64 = {18,20,-2,3,22,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x30,0x30,0x0,0x0,0x10,0x10,0x10,0x18,0x18,0xc,0xe,0x7,0xc3,0xc3,0x83,0xc6, -0x7c, -}; - -static const BitmapCharRec ch63 = {8,17,-2,0,11,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0xc0,0x0,0x70,0x0,0x1c,0x0,0x7,0x0,0x1,0xc0,0x0,0x60,0x1,0xc0,0x7,0x0, -0x1c,0x0,0x70,0x0,0xc0,0x0, -}; - -static const BitmapCharRec ch62 = {11,11,-1,-1,13,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xff,0xf0,0xff,0xf0,0x0,0x0,0x0,0x0,0xff,0xf0,0xff,0xf0, -}; - -static const BitmapCharRec ch61 = {12,6,-1,-4,14,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x0,0x60,0x1,0xc0,0x7,0x0,0x1c,0x0,0x70,0x0,0xc0,0x0,0x70,0x0,0x1c,0x0, -0x7,0x0,0x1,0xc0,0x0,0x60, -}; - -static const BitmapCharRec ch60 = {11,11,-1,-1,13,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0xc0,0x60,0x20,0xe0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch59 = {3,14,-2,3,7,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch58 = {2,11,-2,0,6,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0xf0,0x0,0x1c,0x0,0x6,0x0,0x3,0x0,0x3,0x80,0x1,0x80,0x1d,0x80,0x73,0xc0, -0x61,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0x61,0x80,0x77,0x80, -0x1e,0x0, -}; - -static const BitmapCharRec ch57 = {10,17,-1,0,12,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x1e,0x0,0x73,0x80,0xe1,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x41,0xc0,0x61,0x80, -0x37,0x0,0x1e,0x0,0x1e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0, -0x1e,0x0, -}; - -static const BitmapCharRec ch56 = {10,17,-1,0,12,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x18,0x0,0x18,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0x4,0x0,0x6,0x0,0x6,0x0, -0x2,0x0,0x3,0x0,0x3,0x0,0x1,0x0,0x1,0x80,0x81,0x80,0xc0,0xc0,0xff,0xc0, -0x7f,0xc0, -}; - -static const BitmapCharRec ch55 = {10,17,-1,0,12,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x1e,0x0,0x7b,0x80,0x61,0x80,0xe0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc1,0x80,0xf3,0x80,0xee,0x0,0x60,0x0,0x70,0x0,0x30,0x0,0x18,0x0,0xe,0x0, -0x3,0xc0, -}; - -static const BitmapCharRec ch54 = {10,17,-1,0,12,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x7e,0x0,0xe3,0x80,0xc1,0x80,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x1,0xc0, -0x3,0x80,0xf,0x80,0x7e,0x0,0x78,0x0,0x60,0x0,0x20,0x0,0x20,0x0,0x1f,0x80, -0x1f,0xc0, -}; - -static const BitmapCharRec ch53 = {10,17,-1,0,12,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0xff,0xc0,0xff,0xc0,0xc3,0x0,0x43,0x0, -0x63,0x0,0x23,0x0,0x33,0x0,0x13,0x0,0x1b,0x0,0xb,0x0,0x7,0x0,0x7,0x0, -0x3,0x0, -}; - -static const BitmapCharRec ch52 = {10,17,-1,0,12,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x78,0x0,0xe6,0x0,0xc3,0x0,0x1,0x0,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0x80, -0x7,0x0,0x1e,0x0,0xc,0x0,0x6,0x0,0x83,0x0,0x83,0x0,0x47,0x0,0x7e,0x0, -0x1c,0x0, -}; - -static const BitmapCharRec ch51 = {9,17,-1,0,12,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xff,0x80,0xff,0xc0,0x60,0x40,0x30,0x0,0x18,0x0,0xc,0x0,0x4,0x0,0x6,0x0, -0x3,0x0,0x3,0x0,0x1,0x80,0x1,0x80,0x81,0x80,0x81,0x80,0x43,0x80,0x7f,0x0, -0x1c,0x0, -}; - -static const BitmapCharRec ch50 = {10,17,-1,0,12,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x18, -0x8, -}; - -static const BitmapCharRec ch49 = {8,17,-2,0,12,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x1e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0xe1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x61,0x80,0x61,0x80,0x33,0x0, -0x1e,0x0, -}; - -static const BitmapCharRec ch48 = {10,17,-1,0,12,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0xc0,0xc0,0xc0,0x60,0x60,0x20,0x30,0x30,0x10,0x18,0x18,0x8,0xc,0xc,0x4,0x6, -0x6,0x3,0x3,0x3, -}; - -static const BitmapCharRec ch47 = {8,20,1,3,7,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch46 = {2,2,-2,0,6,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xff,0xf0,0xff,0xf0, -}; - -static const BitmapCharRec ch45 = {12,2,-1,-6,14,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0xc0,0x60,0x20,0xe0,0xc0, -}; - -static const BitmapCharRec ch44 = {3,5,-2,3,7,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xff,0xf0,0xff,0xf0,0x6,0x0, -0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch43 = {12,12,-1,-1,14,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0x8,0x0,0x1c,0x0,0xc9,0x80,0xeb,0x80,0x1c,0x0,0xeb,0x80,0xc9,0x80,0x1c,0x0, -0x8,0x0, -}; - -static const BitmapCharRec ch42 = {9,9,-2,-8,12,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x20,0x30,0x10,0x18,0x18,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0x18, -0x18,0x10,0x30,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {6,22,-1,5,8,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x4,0x8,0x10,0x30,0x20,0x60,0x60,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x60, -0x60,0x20,0x30,0x10,0x8,0x4, -}; - -static const BitmapCharRec ch40 = {6,22,-1,5,8,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0xc0,0x60,0x20,0xe0,0xc0, -}; - -static const BitmapCharRec ch39 = {3,5,-3,-12,8,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x3c,0x3c,0x7f,0x7e,0xe1,0xe1,0xc0,0xc0,0xc1,0xc0,0xc1,0xa0,0x63,0x20,0x37,0x10, -0x1e,0x18,0xe,0x3e,0xf,0x0,0x1d,0x80,0x18,0xc0,0x18,0x40,0x18,0x40,0xc,0xc0, -0x7,0x80, -}; - -static const BitmapCharRec ch38 = {16,17,-1,0,18,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x30,0x3c,0x0,0x18,0x72,0x0,0xc,0x61,0x0,0x4,0x60,0x80,0x6,0x60,0x80,0x3, -0x30,0x80,0x1,0x19,0x80,0x1,0x8f,0x0,0x78,0xc0,0x0,0xe4,0x40,0x0,0xc2,0x60, -0x0,0xc1,0x30,0x0,0xc1,0x10,0x0,0x61,0x18,0x0,0x33,0xfc,0x0,0x1e,0xc,0x0, -}; - -static const BitmapCharRec ch37 = {17,16,-1,0,19,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x4,0x0,0x4,0x0,0x3f,0x0,0xe5,0xc0,0xc4,0xc0,0x84,0x60,0x84,0x60,0x4,0x60, -0x4,0xe0,0x7,0xc0,0x7,0x80,0x1e,0x0,0x3c,0x0,0x74,0x0,0x64,0x0,0x64,0x20, -0x64,0x60,0x34,0xe0,0x1f,0x80,0x4,0x0,0x4,0x0, -}; - -static const BitmapCharRec ch36 = {11,21,0,2,12,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x22,0x0,0x22,0x0,0x22,0x0,0x22,0x0,0x22,0x0,0xff,0xc0,0xff,0xc0,0x11,0x0, -0x11,0x0,0x11,0x0,0x7f,0xe0,0x7f,0xe0,0x8,0x80,0x8,0x80,0x8,0x80,0x8,0x80, -0x8,0x80, -}; - -static const BitmapCharRec ch35 = {11,17,-1,0,13,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0x88,0xcc,0xcc,0xcc,0xcc, -}; - -static const BitmapCharRec ch34 = {6,5,-1,-12,10,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0, -}; - -static const BitmapCharRec ch33 = {2,17,-3,0,8,ch33data}; - -/* char: 0x20 ' ' */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,6,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,6,0}; -#endif - -static const BitmapCharRec * const chars[] = { -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -const BitmapFontRec glutBitmapTimesRoman24 = { -"-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1", -224, -32, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_util.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_util.c deleted file mode 100644 index 29e79513a3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_util.c +++ /dev/null @@ -1,81 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include -#include -#include - -#include "glutint.h" - -/* strdup is actually not a standard ANSI C or POSIX routine - so implement a private one for GLUT. OpenVMS does not have a - strdup; Linux's standard libc doesn't declare strdup by default - (unless BSD or SVID interfaces are requested). */ -char * -__glutStrdup(const char *string) -{ - char *copy; - - copy = (char*) malloc(strlen(string) + 1); - if (copy == NULL) - return NULL; - strcpy(copy, string); - return copy; -} - -void -__glutWarning(char *format,...) -{ - va_list args; - - va_start(args, format); - fprintf(stderr, "GLUT: Warning in %s: ", - __glutProgramName ? __glutProgramName : "(unamed)"); - vfprintf(stderr, format, args); - va_end(args); - putc('\n', stderr); -} - -/* CENTRY */ -void APIENTRY -glutReportErrors(void) -{ - GLenum error; - - while ((error = glGetError()) != GL_NO_ERROR) - __glutWarning("GL error: %s", gluErrorString(error)); -} -/* ENDCENTRY */ - -void -__glutFatalError(char *format,...) -{ - va_list args; - - va_start(args, format); - fprintf(stderr, "GLUT: Fatal Error in %s: ", - __glutProgramName ? __glutProgramName : "(unamed)"); - vfprintf(stderr, format, args); - va_end(args); - putc('\n', stderr); - exit(1); -} - -void -__glutFatalUsage(char *format,...) -{ - va_list args; - - va_start(args, format); - fprintf(stderr, "GLUT: Fatal API Usage in %s: ", - __glutProgramName ? __glutProgramName : "(unamed)"); - vfprintf(stderr, format, args); - va_end(args); - putc('\n', stderr); - abort(); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_vidresize.c b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_vidresize.c deleted file mode 100644 index a9d9e632f5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glut_vidresize.c +++ /dev/null @@ -1,230 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1996. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include - -#if !defined(_WIN32) && !defined(__BEOS__) -#include -#endif - -#ifdef __sgi -#include -#endif - -#include "glutint.h" - -/* Grumble. The IRIX 6.3 and early IRIX 6.4 OpenGL headers - support the video resize extension, but failed to define - GLX_SGIX_video_resize. */ -#ifdef GLX_SYNC_FRAME_SGIX -#define GLX_SGIX_video_resize 1 -#endif - -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) -static int canVideoResize = -1; -static int videoResizeChannel; -#else -static int canVideoResize = 0; -#endif -static int videoResizeInUse = 0; -static int dx = -1, dy = -1, dw = -1, dh = -1; - -/* XXX Note that IRIX 6.2, 6.3, and some 6.4 versions have a - bug where programs seg-fault when they attempt video - resizing from an indirect OpenGL context (either local or - over a network). */ - -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - -static volatile int errorCaught; - -/* ARGSUSED */ -static -catchXSGIvcErrors(Display * dpy, XErrorEvent * event) -{ - errorCaught = 1; - return 0; -} -#endif - -/* CENTRY */ -int APIENTRY -glutVideoResizeGet(GLenum param) -{ -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (canVideoResize < 0) { - canVideoResize = __glutIsSupportedByGLX("GLX_SGIX_video_resize"); - if (canVideoResize) { -#if __sgi - /* This is a hack because IRIX 6.2, 6.3, and some 6.4 - versions were released with GLX_SGIX_video_resize - being advertised by the X server though the video - resize extension is not actually supported. We try to - determine if the libGL.so we are using actually has a - video resize entrypoint before we try to use the - feature. */ - void (*func) (void); - void *glxDso = dlopen("libGL.so", RTLD_LAZY); - - func = (void (*)(void)) dlsym(glxDso, "glXQueryChannelDeltasSGIX"); - if (!func) { - canVideoResize = 0; - } else -#endif - { - char *channelString; - int (*handler) (Display *, XErrorEvent *); - - channelString = getenv("GLUT_VIDEO_RESIZE_CHANNEL"); - videoResizeChannel = channelString ? atoi(channelString) : 0; - - /* Work around another annoying problem with SGI's - GLX_SGIX_video_resize implementation. Early IRIX - 6.4 OpenGL's advertise the extension and have the - video resize API, but an XSGIvc X protocol errors - result trying to use the API. Set up an error - handler to intercept what would otherwise be a fatal - error. If an error was recieved, do not report that - video resize is possible. */ - handler = XSetErrorHandler(catchXSGIvcErrors); - - errorCaught = 0; - - glXQueryChannelDeltasSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, &dx, &dy, &dw, &dh); - - /* glXQueryChannelDeltasSGIX is an inherent X server - round-trip so we know we will have gotten either the - correct reply or and error by this time. */ - XSetErrorHandler(handler); - - /* Still yet another work around. In IRIX 6.4 betas, - glXQueryChannelDeltasSGIX will return as if it - succeeded, but the values are filled with junk. - Watch to make sure the delta variables really make - sense. */ - if (errorCaught || - dx < 0 || dy < 0 || dw < 0 || dh < 0 || - dx > 2048 || dy > 2048 || dw > 2048 || dh > 2048) { - canVideoResize = 0; - } - } - } - } -#endif /* GLX_SGIX_video_resize */ - - switch (param) { - case GLUT_VIDEO_RESIZE_POSSIBLE: - return canVideoResize; - case GLUT_VIDEO_RESIZE_IN_USE: - return videoResizeInUse; - case GLUT_VIDEO_RESIZE_X_DELTA: - return dx; - case GLUT_VIDEO_RESIZE_Y_DELTA: - return dy; - case GLUT_VIDEO_RESIZE_WIDTH_DELTA: - return dw; - case GLUT_VIDEO_RESIZE_HEIGHT_DELTA: - return dh; - case GLUT_VIDEO_RESIZE_X: - case GLUT_VIDEO_RESIZE_Y: - case GLUT_VIDEO_RESIZE_WIDTH: - case GLUT_VIDEO_RESIZE_HEIGHT: -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (videoResizeInUse) { - int x, y, width, height; - - glXQueryChannelRectSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, &x, &y, &width, &height); - switch (param) { - case GLUT_VIDEO_RESIZE_X: - return x; - case GLUT_VIDEO_RESIZE_Y: - return y; - case GLUT_VIDEO_RESIZE_WIDTH: - return width; - case GLUT_VIDEO_RESIZE_HEIGHT: - return height; - } - } -#endif - return -1; - default: - __glutWarning("invalid glutVideoResizeGet parameter: %d", param); - return -1; - } -} - -void APIENTRY -glutSetupVideoResizing(void) -{ -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) { - glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, __glutCurrentWindow->win); - videoResizeInUse = 1; - } else -#endif - __glutFatalError("glutEstablishVideoResizing: video resizing not possible.\n"); -} - -void APIENTRY -glutStopVideoResizing(void) -{ -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) { - if (videoResizeInUse) { - glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, None); - videoResizeInUse = 0; - } - } -#endif -} - -/* ARGSUSED */ -void APIENTRY -glutVideoResize(int x, int y, int width, int height) -{ -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (videoResizeInUse) { -#ifdef GLX_SYNC_SWAP_SGIX - /* glXChannelRectSyncSGIX introduced in a patch to IRIX - 6.2; the original unpatched IRIX 6.2 behavior is always - GLX_SYNC_SWAP_SGIX. */ - glXChannelRectSyncSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, GLX_SYNC_SWAP_SGIX); -#endif - glXChannelRectSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, x, y, width, height); - } -#endif -} - -/* ARGSUSED */ -void APIENTRY -glutVideoPan(int x, int y, int width, int height) -{ -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (videoResizeInUse) { -#ifdef GLX_SYNC_FRAME_SGIX - /* glXChannelRectSyncSGIX introduced in a patch to IRIX - 6.2; the original unpatched IRIX 6.2 behavior is always - GLX_SYNC_SWAP_SGIX. We just ignore that we cannot - accomplish GLX_SYNC_FRAME_SGIX on IRIX unpatched 6.2; - this means you'd need a glutSwapBuffers to actually - realize the video resize. */ - glXChannelRectSyncSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, GLX_SYNC_FRAME_SGIX); -#endif - glXChannelRectSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, x, y, width, height); - } -#endif -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutbitmap.h b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutbitmap.h deleted file mode 100644 index 32bf53c097..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutbitmap.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __glutbitmap_h__ -#define __glutbitmap_h__ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include - -typedef struct { - const GLsizei width; - const GLsizei height; - const GLfloat xorig; - const GLfloat yorig; - const GLfloat advance; - const GLubyte *bitmap; -} BitmapCharRec, *BitmapCharPtr; - -typedef struct { - const char *name; - const int num_chars; - const int first; - const BitmapCharRec * const *ch; -} BitmapFontRec, *BitmapFontPtr; - -typedef void *GLUTbitmapFont; - -#endif /* __glutbitmap_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutint.h b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutint.h deleted file mode 100644 index 06b417e9ca..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutint.h +++ /dev/null @@ -1,814 +0,0 @@ -#ifndef __glutint_h__ -#define __glutint_h__ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#if defined(__CYGWIN32__) -#include -#endif - -#if defined(_WIN32) -#include "glutwin32.h" -#elif !defined(__BEOS__) -#ifdef __sgi -#define SUPPORT_FORTRAN -#endif -#include -#include -#include -#endif - -#include - -/* Non-Win32 platforms need APIENTRY defined to nothing - because all the GLUT routines have the APIENTRY prefix - to make Win32 happy. */ -#ifndef APIENTRY -#define APIENTRY -#endif - -#ifdef __vms -#if ( __VMS_VER < 70000000 ) -struct timeval { - __int64 val; -}; -extern int sys$gettim(struct timeval *); -#else -#include -#endif -#else -#include -#if !defined(_WIN32) -#include -#else -#include -#endif -#endif -#if defined(__vms) && ( __VMS_VER < 70000000 ) - -/* For VMS6.2 or lower : - One TICK on VMS is 100 nanoseconds; 0.1 microseconds or - 0.0001 milliseconds. This means that there are 0.01 - ticks/ns, 10 ticks/us, 10,000 ticks/ms and 10,000,000 - ticks/second. */ - -#define TICKS_PER_MILLISECOND 10000 -#define TICKS_PER_SECOND 10000000 - -#define GETTIMEOFDAY(_x) (void) sys$gettim (_x); - -#define ADD_TIME(dest, src1, src2) { \ - (dest).val = (src1).val + (src2).val; \ -} - -#define TIMEDELTA(dest, src1, src2) { \ - (dest).val = (src1).val - (src2).val; \ -} - -#define IS_AFTER(t1, t2) ((t2).val > (t1).val) - -#define IS_AT_OR_AFTER(t1, t2) ((t2).val >= (t1).val) - -#else -#if defined(SVR4) && !defined(sun) /* Sun claims SVR4, but - wants 2 args. */ -#define GETTIMEOFDAY(_x) gettimeofday(_x) -#else -#define GETTIMEOFDAY(_x) gettimeofday(_x, NULL) -#endif -#define ADD_TIME(dest, src1, src2) { \ - if(((dest).tv_usec = \ - (src1).tv_usec + (src2).tv_usec) >= 1000000) { \ - (dest).tv_usec -= 1000000; \ - (dest).tv_sec = (src1).tv_sec + (src2).tv_sec + 1; \ - } else { \ - (dest).tv_sec = (src1).tv_sec + (src2).tv_sec; \ - if(((dest).tv_sec >= 1) && (((dest).tv_usec <0))) { \ - (dest).tv_sec --;(dest).tv_usec += 1000000; \ - } \ - } \ -} -#define TIMEDELTA(dest, src1, src2) { \ - if(((dest).tv_usec = (src1).tv_usec - (src2).tv_usec) < 0) { \ - (dest).tv_usec += 1000000; \ - (dest).tv_sec = (src1).tv_sec - (src2).tv_sec - 1; \ - } else { \ - (dest).tv_sec = (src1).tv_sec - (src2).tv_sec; \ - } \ -} -#define IS_AFTER(t1, t2) \ - (((t2).tv_sec > (t1).tv_sec) || \ - (((t2).tv_sec == (t1).tv_sec) && \ - ((t2).tv_usec > (t1).tv_usec))) -#define IS_AT_OR_AFTER(t1, t2) \ - (((t2).tv_sec > (t1).tv_sec) || \ - (((t2).tv_sec == (t1).tv_sec) && \ - ((t2).tv_usec >= (t1).tv_usec))) -#endif - -#define IGNORE_IN_GAME_MODE() \ - { if (__glutGameModeWindow) return; } - -/* BeOS doesn't need most of this file */ -#ifndef __BEOS__ - -#define GLUT_WIND_IS_RGB(x) (((x) & GLUT_INDEX) == 0) -#define GLUT_WIND_IS_INDEX(x) (((x) & GLUT_INDEX) != 0) -#define GLUT_WIND_IS_SINGLE(x) (((x) & GLUT_DOUBLE) == 0) -#define GLUT_WIND_IS_DOUBLE(x) (((x) & GLUT_DOUBLE) != 0) -#define GLUT_WIND_HAS_ACCUM(x) (((x) & GLUT_ACCUM) != 0) -#define GLUT_WIND_HAS_ALPHA(x) (((x) & GLUT_ALPHA) != 0) -#define GLUT_WIND_HAS_DEPTH(x) (((x) & GLUT_DEPTH) != 0) -#define GLUT_WIND_HAS_STENCIL(x) (((x) & GLUT_STENCIL) != 0) -#define GLUT_WIND_IS_MULTISAMPLE(x) (((x) & GLUT_MULTISAMPLE) != 0) -#define GLUT_WIND_IS_STEREO(x) (((x) & GLUT_STEREO) != 0) -#define GLUT_WIND_IS_LUMINANCE(x) (((x) & GLUT_LUMINANCE) != 0) -#define GLUT_MAP_WORK (1 << 0) -#define GLUT_EVENT_MASK_WORK (1 << 1) -#define GLUT_REDISPLAY_WORK (1 << 2) -#define GLUT_CONFIGURE_WORK (1 << 3) -#define GLUT_COLORMAP_WORK (1 << 4) -#define GLUT_DEVICE_MASK_WORK (1 << 5) -#define GLUT_FINISH_WORK (1 << 6) -#define GLUT_DEBUG_WORK (1 << 7) -#define GLUT_DUMMY_WORK (1 << 8) -#define GLUT_FULL_SCREEN_WORK (1 << 9) -#define GLUT_OVERLAY_REDISPLAY_WORK (1 << 10) -#define GLUT_REPAIR_WORK (1 << 11) -#define GLUT_OVERLAY_REPAIR_WORK (1 << 12) - -/* Frame buffer capability macros and types. */ -#define RGBA 0 -#define BUFFER_SIZE 1 -#define DOUBLEBUFFER 2 -#define STEREO 3 -#define AUX_BUFFERS 4 -#define RED_SIZE 5 /* Used as mask bit for - "color selected". */ -#define GREEN_SIZE 6 -#define BLUE_SIZE 7 -#define ALPHA_SIZE 8 -#define DEPTH_SIZE 9 -#define STENCIL_SIZE 10 -#define ACCUM_RED_SIZE 11 /* Used as mask bit for - "acc selected". */ -#define ACCUM_GREEN_SIZE 12 -#define ACCUM_BLUE_SIZE 13 -#define ACCUM_ALPHA_SIZE 14 -#define LEVEL 15 - -#define NUM_GLXCAPS (LEVEL + 1) - -#define XVISUAL (NUM_GLXCAPS + 0) -#define TRANSPARENT (NUM_GLXCAPS + 1) -#define SAMPLES (NUM_GLXCAPS + 2) -#define XSTATICGRAY (NUM_GLXCAPS + 3) /* Used as - mask bit - for "any - visual type - selected". */ -#define XGRAYSCALE (NUM_GLXCAPS + 4) -#define XSTATICCOLOR (NUM_GLXCAPS + 5) -#define XPSEUDOCOLOR (NUM_GLXCAPS + 6) -#define XTRUECOLOR (NUM_GLXCAPS + 7) -#define XDIRECTCOLOR (NUM_GLXCAPS + 8) -#define SLOW (NUM_GLXCAPS + 9) -#define CONFORMANT (NUM_GLXCAPS + 10) - -#define NUM_CAPS (NUM_GLXCAPS + 11) - -/* Frame buffer capablities that don't have a corresponding - FrameBufferMode entry. These get used as mask bits. */ -#define NUM (NUM_CAPS + 0) -#define RGBA_MODE (NUM_CAPS + 1) -#define CI_MODE (NUM_CAPS + 2) -#define LUMINANCE_MODE (NUM_CAPS + 3) - -#define NONE 0 -#define EQ 1 -#define NEQ 2 -#define LTE 3 -#define GTE 4 -#define GT 5 -#define LT 6 -#define MIN 7 - -typedef struct _Criterion { - int capability; - int comparison; - int value; -} Criterion; - -typedef struct _FrameBufferMode { - XVisualInfo *vi; -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - - /* fbc is non-NULL when the XVisualInfo* is not OpenGL-capable - (ie, GLX_USE_GL is false), but the SGIX_fbconfig extension shows - the visual's fbconfig is OpenGL-capable. The reason for this is typically - an RGBA luminance fbconfig such as 16-bit StaticGray that could - not be advertised as a GLX visual since StaticGray visuals are - required (by the GLX specification) to be color index. The - SGIX_fbconfig allows StaticGray visuals to instead advertised as - fbconfigs that can provide RGBA luminance support. */ - - GLXFBConfigSGIX fbc; -#endif - int valid; - int cap[NUM_CAPS]; -} FrameBufferMode; - -/* DisplayMode capability macros for game mode. */ -#define DM_WIDTH 0 /* "width" */ -#define DM_HEIGHT 1 /* "height" */ -#define DM_PIXEL_DEPTH 2 /* "bpp" (bits per pixel) */ -#define DM_HERTZ 3 /* "hertz" */ -#define DM_NUM 4 /* "num" */ - -#define NUM_DM_CAPS (DM_NUM+1) - -typedef struct _DisplayMode { -#ifdef _WIN32 - DEVMODE devmode; -#else - /* XXX The X Window System does not have a standard - mechanism for display setting changes. On SGI - systems, GLUT could use the XSGIvc (SGI X video - control extension). Perhaps this can be done in - a future release of GLUT. */ -#endif - int valid; - int cap[NUM_DM_CAPS]; -} DisplayMode; - -#endif /* BeOS */ - -/* GLUT function types */ -typedef void (*GLUTdisplayCB) (void); -typedef void (*GLUTreshapeCB) (int, int); -typedef void (*GLUTkeyboardCB) (unsigned char, int, int); -typedef void (*GLUTmouseCB) (int, int, int, int); -typedef void (*GLUTmotionCB) (int, int); -typedef void (*GLUTpassiveCB) (int, int); -typedef void (*GLUTentryCB) (int); -typedef void (*GLUTvisibilityCB) (int); -typedef void (*GLUTwindowStatusCB) (int); -typedef void (*GLUTidleCB) (void); -typedef void (*GLUTtimerCB) (int); -typedef void (*GLUTmenuStateCB) (int); /* DEPRICATED. */ -typedef void (*GLUTmenuStatusCB) (int, int, int); -typedef void (*GLUTselectCB) (int); -typedef void (*GLUTspecialCB) (int, int, int); -typedef void (*GLUTspaceMotionCB) (int, int, int); -typedef void (*GLUTspaceRotateCB) (int, int, int); -typedef void (*GLUTspaceButtonCB) (int, int); -typedef void (*GLUTdialsCB) (int, int); -typedef void (*GLUTbuttonBoxCB) (int, int); -typedef void (*GLUTtabletMotionCB) (int, int); -typedef void (*GLUTtabletButtonCB) (int, int, int, int); -typedef void (*GLUTjoystickCB) (unsigned int buttonMask, int x, int y, int z); -#ifdef SUPPORT_FORTRAN -typedef void (*GLUTdisplayFCB) (void); -typedef void (*GLUTreshapeFCB) (int *, int *); -/* NOTE the pressed key is int, not unsigned char for Fortran! */ -typedef void (*GLUTkeyboardFCB) (int *, int *, int *); -typedef void (*GLUTmouseFCB) (int *, int *, int *, int *); -typedef void (*GLUTmotionFCB) (int *, int *); -typedef void (*GLUTpassiveFCB) (int *, int *); -typedef void (*GLUTentryFCB) (int *); -typedef void (*GLUTvisibilityFCB) (int *); -typedef void (*GLUTwindowStatusFCB) (int *); -typedef void (*GLUTidleFCB) (void); -typedef void (*GLUTtimerFCB) (int *); -typedef void (*GLUTmenuStateFCB) (int *); /* DEPRICATED. */ -typedef void (*GLUTmenuStatusFCB) (int *, int *, int *); -typedef void (*GLUTselectFCB) (int *); -typedef void (*GLUTspecialFCB) (int *, int *, int *); -typedef void (*GLUTspaceMotionFCB) (int *, int *, int *); -typedef void (*GLUTspaceRotateFCB) (int *, int *, int *); -typedef void (*GLUTspaceButtonFCB) (int *, int *); -typedef void (*GLUTdialsFCB) (int *, int *); -typedef void (*GLUTbuttonBoxFCB) (int *, int *); -typedef void (*GLUTtabletMotionFCB) (int *, int *); -typedef void (*GLUTtabletButtonFCB) (int *, int *, int *, int *); -typedef void (*GLUTjoystickFCB) (unsigned int *buttonMask, int *x, int *y, int *z); -#endif - -#ifndef __BEOS__ - -typedef struct _GLUTcolorcell GLUTcolorcell; -struct _GLUTcolorcell { - /* GLUT_RED, GLUT_GREEN, GLUT_BLUE */ - GLfloat component[3]; -}; - -typedef struct _GLUTcolormap GLUTcolormap; -struct _GLUTcolormap { - Visual *visual; /* visual of the colormap */ - Colormap cmap; /* X colormap ID */ - int refcnt; /* number of windows using colormap */ - int size; /* number of cells in colormap */ - int transparent; /* transparent pixel, or -1 if opaque */ - GLUTcolorcell *cells; /* array of cells */ - GLUTcolormap *next; /* next colormap in list */ -}; - -typedef struct _GLUTwindow GLUTwindow; -typedef struct _GLUToverlay GLUToverlay; -struct _GLUTwindow { - int num; /* Small integer window id (0-based). */ - - /* Window system related state. */ -#if defined(_WIN32) - int pf; /* Pixel format. */ - HDC hdc; /* Window's Win32 device context. */ -#endif - Window win; /* X window for GLUT window */ - GLXContext ctx; /* OpenGL context GLUT glut window */ - XVisualInfo *vis; /* visual for window */ - Bool visAlloced; /* if vis needs deallocate on destroy */ - Colormap cmap; /* RGB colormap for window; None if CI */ - GLUTcolormap *colormap; /* colormap; NULL if RGBA */ - GLUToverlay *overlay; /* overlay; NULL if no overlay */ -#if defined(_WIN32) - HDC renderDc; /* Win32's device context for rendering. */ -#endif - Window renderWin; /* X window for rendering (might be - overlay) */ - GLXContext renderCtx; /* OpenGL context for rendering (might - be overlay) */ - /* GLUT settable or visible window state. */ - int width; /* window width in pixels */ - int height; /* window height in pixels */ - int cursor; /* cursor name */ - int visState; /* visibility state (-1 is unknown) */ - int shownState; /* if window mapped */ - int entryState; /* entry state (-1 is unknown) */ -#define GLUT_MAX_MENUS 3 - - int menu[GLUT_MAX_MENUS]; /* attatched menu nums */ - /* Window relationship state. */ - GLUTwindow *parent; /* parent window */ - GLUTwindow *children; /* list of children */ - GLUTwindow *siblings; /* list of siblings */ - /* Misc. non-API visible (hidden) state. */ - Bool treatAsSingle; /* treat this window as single-buffered - (it might be "fake" though) */ - Bool forceReshape; /* force reshape before display */ -#if !defined(_WIN32) - Bool isDirect; /* if direct context (X11 only) */ -#endif - Bool usedSwapBuffers; /* if swap buffers used last display */ - long eventMask; /* mask of X events selected for */ - int buttonUses; /* number of button uses, ref cnt */ - int tabletPos[2]; /* tablet position (-1 is invalid) */ - /* Work list related state. */ - unsigned int workMask; /* mask of window work to be done */ - GLUTwindow *prevWorkWin; /* link list of windows to work on */ - Bool desiredMapState; /* how to mapped window if on map work - list */ - Bool ignoreKeyRepeat; /* if window ignores autorepeat */ - int desiredConfMask; /* mask of desired window configuration - */ - int desiredX; /* desired X location */ - int desiredY; /* desired Y location */ - int desiredWidth; /* desired window width */ - int desiredHeight; /* desired window height */ - int desiredStack; /* desired window stack */ - /* Per-window callbacks. */ - GLUTdisplayCB display; /* redraw */ - GLUTreshapeCB reshape; /* resize (width,height) */ - GLUTmouseCB mouse; /* mouse (button,state,x,y) */ - GLUTmotionCB motion; /* motion (x,y) */ - GLUTpassiveCB passive; /* passive motion (x,y) */ - GLUTentryCB entry; /* window entry/exit (state) */ - GLUTkeyboardCB keyboard; /* keyboard (ASCII,x,y) */ - GLUTkeyboardCB keyboardUp; /* keyboard up (ASCII,x,y) */ - GLUTwindowStatusCB windowStatus; /* window status */ - GLUTvisibilityCB visibility; /* visibility */ - GLUTspecialCB special; /* special key */ - GLUTspecialCB specialUp; /* special up key */ - GLUTbuttonBoxCB buttonBox; /* button box */ - GLUTdialsCB dials; /* dials */ - GLUTspaceMotionCB spaceMotion; /* Spaceball motion */ - GLUTspaceRotateCB spaceRotate; /* Spaceball rotate */ - GLUTspaceButtonCB spaceButton; /* Spaceball button */ - GLUTtabletMotionCB tabletMotion; /* tablet motion */ - GLUTtabletButtonCB tabletButton; /* tablet button */ -#ifdef _WIN32 - GLUTjoystickCB joystick; /* joystick */ - int joyPollInterval; /* joystick polling interval */ -#endif -#ifdef SUPPORT_FORTRAN - /* Special Fortran display unneeded since no - parameters! */ - GLUTreshapeFCB freshape; /* Fortran reshape */ - GLUTmouseFCB fmouse; /* Fortran mouse */ - GLUTmotionFCB fmotion; /* Fortran motion */ - GLUTpassiveFCB fpassive; /* Fortran passive */ - GLUTentryFCB fentry; /* Fortran entry */ - GLUTkeyboardFCB fkeyboard; /* Fortran keyboard */ - GLUTkeyboardFCB fkeyboardUp; /* Fortran keyboard up */ - GLUTwindowStatusFCB fwindowStatus; /* Fortran visibility - */ - GLUTvisibilityFCB fvisibility; /* Fortran visibility - */ - GLUTspecialFCB fspecial; /* special key */ - GLUTspecialFCB fspecialUp; /* special key up */ - GLUTbuttonBoxFCB fbuttonBox; /* button box */ - GLUTdialsFCB fdials; /* dials */ - GLUTspaceMotionFCB fspaceMotion; /* Spaceball motion - */ - GLUTspaceRotateFCB fspaceRotate; /* Spaceball rotate - */ - GLUTspaceButtonFCB fspaceButton; /* Spaceball button - */ - GLUTtabletMotionFCB ftabletMotion; /* tablet motion - */ - GLUTtabletButtonFCB ftabletButton; /* tablet button - */ -#ifdef _WIN32 - GLUTjoystickFCB fjoystick; /* joystick */ -#endif -#endif -}; - -struct _GLUToverlay { -#if defined(_WIN32) - int pf; - HDC hdc; -#endif - Window win; - GLXContext ctx; - XVisualInfo *vis; /* visual for window */ - Bool visAlloced; /* if vis needs deallocate on destroy */ - Colormap cmap; /* RGB colormap for window; None if CI */ - GLUTcolormap *colormap; /* colormap; NULL if RGBA */ - int shownState; /* if overlay window mapped */ - Bool treatAsSingle; /* treat as single-buffered */ -#if !defined(_WIN32) - Bool isDirect; /* if direct context */ -#endif - int transparentPixel; /* transparent pixel value */ - GLUTdisplayCB display; /* redraw */ - /* Special Fortran display unneeded since no - parameters! */ -}; - -typedef struct _GLUTstale GLUTstale; -struct _GLUTstale { - GLUTwindow *window; - Window win; - GLUTstale *next; -}; - -extern GLUTstale *__glutStaleWindowList; - -#define GLUT_OVERLAY_EVENT_FILTER_MASK \ - (ExposureMask | \ - StructureNotifyMask | \ - EnterWindowMask | \ - LeaveWindowMask) -#define GLUT_DONT_PROPAGATE_FILTER_MASK \ - (ButtonReleaseMask | \ - ButtonPressMask | \ - KeyPressMask | \ - KeyReleaseMask | \ - PointerMotionMask | \ - Button1MotionMask | \ - Button2MotionMask | \ - Button3MotionMask) -#define GLUT_HACK_STOP_PROPAGATE_MASK \ - (KeyPressMask | \ - KeyReleaseMask) - -typedef struct _GLUTmenu GLUTmenu; -typedef struct _GLUTmenuItem GLUTmenuItem; -struct _GLUTmenu { - int id; /* small integer menu id (0-based) */ - Window win; /* X window for the menu */ - GLUTselectCB select; /* function of menu */ - GLUTmenuItem *list; /* list of menu entries */ - int num; /* number of entries */ -#if !defined(_WIN32) - Bool managed; /* are the InputOnly windows size - validated? */ - Bool searched; /* help detect menu loops */ - int pixheight; /* height of menu in pixels */ - int pixwidth; /* width of menu in pixels */ -#endif - int submenus; /* number of submenu entries */ - GLUTmenuItem *highlighted; /* pointer to highlighted menu - entry, NULL not highlighted */ - GLUTmenu *cascade; /* currently cascading this menu */ - GLUTmenuItem *anchor; /* currently anchored to this entry */ - int x; /* current x origin relative to the - root window */ - int y; /* current y origin relative to the - root window */ -#ifdef SUPPORT_FORTRAN - GLUTselectFCB fselect; /* function of menu */ -#endif -}; - -struct _GLUTmenuItem { - Window win; /* InputOnly X window for entry */ - GLUTmenu *menu; /* menu entry belongs to */ - Bool isTrigger; /* is a submenu trigger? */ - int value; /* value to return for selecting this - entry; doubles as submenu id - (0-base) if submenu trigger */ -#if defined(_WIN32) - UINT unique; /* unique menu item id (Win32 only) */ -#endif - char *label; /* __glutStrdup'ed label string */ - int len; /* length of label string */ - int pixwidth; /* width of X window in pixels */ - GLUTmenuItem *next; /* next menu entry on list for menu */ -}; - -typedef struct _GLUTtimer GLUTtimer; -struct _GLUTtimer { - GLUTtimer *next; /* list of timers */ - struct timeval timeout; /* time to be called */ - GLUTtimerCB func; /* timer (value) */ - int value; /* return value */ -#ifdef SUPPORT_FORTRAN - GLUTtimerFCB ffunc; /* Fortran timer */ -#endif -}; - -typedef struct _GLUTeventParser GLUTeventParser; -struct _GLUTeventParser { - int (*func) (XEvent *); - GLUTeventParser *next; -}; - -/* Declarations to implement glutFullScreen support with - mwm/4Dwm. */ - -/* The following X property format is defined in Motif 1.1's - Xm/MwmUtils.h, but GLUT should not depend on that header - file. Note: Motif 1.2 expanded this structure with - uninteresting fields (to GLUT) so just stick with the - smaller Motif 1.1 structure. */ -typedef struct { -#define MWM_HINTS_DECORATIONS 2 - long flags; - long functions; - long decorations; - long input_mode; -} MotifWmHints; - -/* Make current and buffer swap macros. */ -#ifdef _WIN32 -#define MAKE_CURRENT_LAYER(window) \ - { \ - HGLRC currentContext = wglGetCurrentContext(); \ - HDC currentDc = wglGetCurrentDC(); \ - \ - if (currentContext != window->renderCtx \ - || currentDc != window->renderDc) { \ - wglMakeCurrent(window->renderDc, window->renderCtx); \ - } \ - } -#define MAKE_CURRENT_WINDOW(window) \ - { \ - HGLRC currentContext = wglGetCurrentContext(); \ - HDC currentDc = wglGetCurrentDC(); \ - \ - if (currentContext != window->ctx || currentDc != window->hdc) { \ - wglMakeCurrent(window->hdc, window->ctx); \ - } \ - } -#define MAKE_CURRENT_OVERLAY(overlay) \ - wglMakeCurrent(overlay->hdc, overlay->ctx) -#define UNMAKE_CURRENT() \ - wglMakeCurrent(NULL, NULL) -#define SWAP_BUFFERS_WINDOW(window) \ - SwapBuffers(window->hdc) -#define SWAP_BUFFERS_LAYER(window) \ - SwapBuffers(window->renderDc) -#else -#define MAKE_CURRENT_LAYER(window) \ - glXMakeCurrent(__glutDisplay, window->renderWin, window->renderCtx) -#define MAKE_CURRENT_WINDOW(window) \ - glXMakeCurrent(__glutDisplay, window->win, window->ctx) -#define MAKE_CURRENT_OVERLAY(overlay) \ - glXMakeCurrent(__glutDisplay, overlay->win, overlay->ctx) -#define UNMAKE_CURRENT() \ - glXMakeCurrent(__glutDisplay, None, NULL) -#define SWAP_BUFFERS_WINDOW(window) \ - glXSwapBuffers(__glutDisplay, window->win) -#define SWAP_BUFFERS_LAYER(window) \ - glXSwapBuffers(__glutDisplay, window->renderWin) -#endif - -/* private variables from glut_event.c */ -extern GLUTwindow *__glutWindowWorkList; -extern int __glutWindowDamaged; -#ifdef SUPPORT_FORTRAN -extern GLUTtimer *__glutTimerList; -extern GLUTtimer *__glutNewTimer; -#endif -extern GLUTmenu *__glutMappedMenu; - -extern void (*__glutUpdateInputDeviceMaskFunc) (GLUTwindow *); -#if !defined(_WIN32) -extern void (*__glutMenuItemEnterOrLeave)(GLUTmenuItem * item, - int num, int type); -extern void (*__glutFinishMenu)(Window win, int x, int y); -extern void (*__glutPaintMenu)(GLUTmenu * menu); -extern void (*__glutStartMenu)(GLUTmenu * menu, - GLUTwindow * window, int x, int y, int x_win, int y_win); -extern GLUTmenu * (*__glutGetMenuByNum)(int menunum); -extern GLUTmenuItem * (*__glutGetMenuItem)(GLUTmenu * menu, - Window win, int *which); -extern GLUTmenu * (*__glutGetMenu)(Window win); -#endif - -/* private variables from glut_init.c */ -extern Atom __glutWMDeleteWindow; -extern Display *__glutDisplay; -extern unsigned int __glutDisplayMode; -extern char *__glutDisplayString; -extern XVisualInfo *(*__glutDetermineVisualFromString) (char *string, Bool * treatAsSingle, - Criterion * requiredCriteria, int nRequired, int requiredMask, void **fbc); -extern GLboolean __glutDebug; -extern GLboolean __glutForceDirect; -extern GLboolean __glutIconic; -extern GLboolean __glutTryDirect; -extern Window __glutRoot; -extern XSizeHints __glutSizeHints; -extern char **__glutArgv; -#endif /* BeOS */ -extern char *__glutProgramName; -#ifndef __BEOS__ -extern int __glutArgc; -extern int __glutConnectionFD; -extern int __glutInitHeight; -extern int __glutInitWidth; -extern int __glutInitX; -extern int __glutInitY; -extern int __glutScreen; -extern int __glutScreenHeight; -extern int __glutScreenWidth; -extern Atom __glutMotifHints; -extern unsigned int __glutModifierMask; - -/* private variables from glut_menu.c */ -extern GLUTmenuItem *__glutItemSelected; -extern GLUTmenu **__glutMenuList; -extern void (*__glutMenuStatusFunc) (int, int, int); -extern void __glutMenuModificationError(void); -extern void __glutSetMenuItem(GLUTmenuItem * item, - const char *label, int value, Bool isTrigger); - -/* private variables from glut_win.c */ -extern GLUTwindow **__glutWindowList; -extern GLUTwindow *__glutCurrentWindow; -extern GLUTwindow *__glutMenuWindow; -extern GLUTmenu *__glutCurrentMenu; -extern int __glutWindowListSize; -extern void (*__glutFreeOverlayFunc) (GLUToverlay *); -extern XVisualInfo *__glutDetermineWindowVisual(Bool * treatAsSingle, - Bool * visAlloced, void **fbc); - -/* private variables from glut_mesa.c */ -extern int __glutMesaSwapHackSupport; - -/* private variables from glut_gamemode.c */ -extern GLUTwindow *__glutGameModeWindow; - -/* private routines from glut_cindex.c */ -extern GLUTcolormap * __glutAssociateNewColormap(XVisualInfo * vis); -extern void __glutFreeColormap(GLUTcolormap *); - -/* private routines from glut_cmap.c */ -extern void __glutSetupColormap( - XVisualInfo * vi, - GLUTcolormap ** colormap, - Colormap * cmap); -#if !defined(_WIN32) -extern void __glutEstablishColormapsProperty( - GLUTwindow * window); -extern GLUTwindow *__glutToplevelOf(GLUTwindow * window); -#endif - -/* private routines from glut_cursor.c */ -extern void __glutSetCursor(GLUTwindow *window); - -/* private routines from glut_event.c */ -extern void __glutPutOnWorkList(GLUTwindow * window, - int work_mask); -extern void __glutRegisterEventParser(GLUTeventParser * parser); -extern void __glutPostRedisplay(GLUTwindow * window, int layerMask); - -/* private routines from glut_init.c */ -#if !defined(_WIN32) -extern void __glutOpenXConnection(char *display); -#else -extern void __glutOpenWin32Connection(char *display); -#endif -extern void __glutInitTime(struct timeval *beginning); - -/* private routines for glut_menu.c (or win32_menu.c) */ -#if defined(_WIN32) -extern GLUTmenu *__glutGetMenu(Window win); -extern GLUTmenu *__glutGetMenuByNum(int menunum); -extern GLUTmenuItem *__glutGetMenuItem(GLUTmenu * menu, - Window win, int *which); -extern void __glutStartMenu(GLUTmenu * menu, - GLUTwindow * window, int x, int y, int x_win, int y_win); -extern void __glutFinishMenu(Window win, int x, int y); -#endif -extern void __glutSetMenu(GLUTmenu * menu); - -#endif /* BeOS */ -#ifdef __cplusplus -extern "C" { -#endif -/* private routines from glut_util.c */ -extern char * __glutStrdup(const char *string); -extern void __glutWarning(char *format,...); -extern void __glutFatalError(char *format,...); -extern void __glutFatalUsage(char *format,...); -#ifdef __cplusplus -} -#endif -#ifndef __BEOS__ - -/* private routines from glut_win.c */ -extern GLUTwindow *__glutGetWindow(Window win); -extern void __glutChangeWindowEventMask(long mask, Bool add); -extern XVisualInfo *__glutDetermineVisual( - unsigned int mode, - Bool * fakeSingle, - XVisualInfo * (getVisualInfo) (unsigned int)); -extern XVisualInfo *__glutGetVisualInfo(unsigned int mode); -extern void __glutSetWindow(GLUTwindow * window); -extern void __glutReshapeFunc(GLUTreshapeCB reshapeFunc, - int callingConvention); -extern void __glutDefaultReshape(int, int); -extern GLUTwindow *__glutCreateWindow( - GLUTwindow * parent, - int x, int y, int width, int height, int gamemode); -extern void __glutDestroyWindow( - GLUTwindow * window, - GLUTwindow * initialWindow); - -#if !defined(_WIN32) -/* private routines from glut_glxext.c */ -extern int __glutIsSupportedByGLX(char *); -#endif - -/* private routines from glut_input.c */ -extern void __glutUpdateInputDeviceMask(GLUTwindow * window); - -/* private routines from glut_mesa.c */ -extern void __glutDetermineMesaSwapHackSupport(void); - -/* private routines from glut_gameglut.c */ -extern void __glutCloseDownGameMode(void); - -#if defined(_WIN32) -/* private routines from win32_*.c */ -extern LONG WINAPI __glutWindowProc(HWND win, UINT msg, WPARAM w, LPARAM l); -extern HDC XHDC; -#endif - -#else /* BeOS */ -/* BeOS specific C++ function prototypes */ -#ifdef __cplusplus - -#include - -/* private routines from glutInit.cpp */ -void __glutInitTime(bigtime_t *beginning); -void __glutInit(); - -/* private routines from glutMenu.cpp */ -class GlutMenu; // avoid including glutMenu.h -GlutMenu *__glutGetMenuByNum(int menunum); - -/* private routines from glutWindow.cpp */ -int __glutConvertDisplayMode(unsigned long *options); -void __glutDefaultReshape(int width, int height); -class GlutWindow; // avoid including glutWindow.h in every source file -void __glutSetWindow(GlutWindow * window); -void __glutDestroyAllWindows(); - -/* private routines from glutDstr.cpp */ -int __glutConvertDisplayModeFromString(unsigned long *options); - -/* private routines from glutCursor.cpp */ -void __glutSetCursor(int cursor); - -#endif /* __cplusplus */ -#endif /* BeOS */ - -#endif /* __glutint_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutstroke.h b/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutstroke.h deleted file mode 100644 index cbc9e156fe..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/beos/glutstroke.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __glutstroke_h__ -#define __glutstroke_h__ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#if defined(_WIN32) -#pragma warning (disable:4244) /* disable bogus conversion warnings */ -#pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */ -#endif - -typedef struct { - float x; - float y; -} CoordRec, *CoordPtr; - -typedef struct { - int num_coords; - const CoordRec *coord; -} StrokeRec, *StrokePtr; - -typedef struct { - int num_strokes; - const StrokeRec *stroke; - float center; - float right; -} StrokeCharRec, *StrokeCharPtr; - -typedef struct { - const char *name; - int num_chars; - const StrokeCharRec *ch; - float top; - float bottom; -} StrokeFontRec, *StrokeFontPtr; - -typedef void *GLUTstrokeFont; - -#endif /* __glutstroke_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/Makefile.DJ b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/Makefile.DJ deleted file mode 100644 index 7e4e0b8576..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/Makefile.DJ +++ /dev/null @@ -1,126 +0,0 @@ -# DOS/DJGPP Mesa Utility Toolkit -# Version: 1.0 -# -# Copyright (C) 2005 Daniel Borca All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# DANIEL BORCA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -# -# Available options: -# -# Environment variables: -# CFLAGS -# -# GLIDE path to Glide3 SDK; used to resolve DXEs. -# default = $(TOP)/glide3 -# -# Targets: -# all: build GLUT -# clean: remove object files -# - - - -.PHONY: all clean - -TOP = ../../.. -GLIDE ?= $(TOP)/glide3 -LIBDIR = $(TOP)/lib -GLUT_LIB = libglut.a -GLUT_DXE = glut.dxe -GLUT_IMP = libiglut.a - -export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR);$(GLIDE)/lib - -CC = gcc -CFLAGS += -I$(TOP)/include -I. -IPC_HW -CFLAGS += -DGLUT_IMPORT_LIB - -AR = ar -ARFLAGS = crus - -HAVEDXE3 = $(wildcard $(DJDIR)/bin/dxe3gen.exe) - -ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) -UNLINK = del $(subst /,\,$(1)) -else -UNLINK = $(RM) $(1) -endif - -CORE_SOURCES = \ - loop.c \ - callback.c \ - color.c \ - extens.c \ - init.c \ - menu.c \ - mouse.c \ - overlay.c \ - state.c \ - util.c \ - window.c \ - f8x13.c \ - f9x15.c \ - hel10.c \ - hel12.c \ - hel18.c \ - tr10.c \ - tr24.c \ - mroman.c \ - roman.c \ - bitmap.c \ - stroke.c \ - teapot.c \ - shapes.c - -PC_HW_SOURCES = \ - PC_HW/pc_hw.c \ - PC_HW/pc_keyb.c \ - PC_HW/pc_mouse.c \ - PC_HW/pc_timer.c \ - PC_HW/pc_irq.S - -SOURCES = $(CORE_SOURCES) $(PC_HW_SOURCES) - -OBJECTS = $(addsuffix .o,$(basename $(SOURCES))) - -.c.o: - $(CC) -o $@ $(CFLAGS) -c $< -.S.o: - $(CC) -o $@ $(CFLAGS) -c $< -.s.o: - $(CC) -o $@ $(CFLAGS) -x assembler-with-cpp -c $< - -all: $(LIBDIR)/$(GLUT_LIB) $(LIBDIR)/$(GLUT_DXE) $(LIBDIR)/$(GLUT_IMP) - -$(LIBDIR)/$(GLUT_LIB): $(OBJECTS) - $(AR) $(ARFLAGS) $@ $^ - -$(LIBDIR)/$(GLUT_DXE) $(LIBDIR)/$(GLUT_IMP): $(OBJECTS) -ifeq ($(HAVEDXE3),) - $(warning Missing DXE3 package... Skipping $(GLUT_DXE)) -else - -dxe3gen -o $(LIBDIR)/$(GLUT_DXE) -Y $(LIBDIR)/$(GLUT_IMP) -D "MesaGLUT DJGPP" -E _glut -P gl.dxe -U $^ -endif - -clean: - -$(call UNLINK,*.o) - -$(call UNLINK,PC_HW/*.o) - --include depend diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_hw.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_hw.c deleted file mode 100644 index 100b372165..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_hw.c +++ /dev/null @@ -1,163 +0,0 @@ -/* - * PC/HW routine collection v1.3 for DOS/DJGPP - * - * Copyright (C) 2002 - Daniel Borca - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#include -#include -#include /* for mode definitions */ -#include -#include -#include - -#include "pc_hw.h" - - -/* - * atexit - */ -#define MAX_ATEXIT 32 - -static volatile int atexitcnt; -static VFUNC atexittbl[MAX_ATEXIT]; - - -static void __attribute__((destructor)) -doexit (void) -{ - while (atexitcnt) atexittbl[--atexitcnt](); -} - - -int -pc_clexit (VFUNC f) -{ - int i; - - for (i = 0; i < atexitcnt; i++) { - if (atexittbl[i] == f) { - for (atexitcnt--; i < atexitcnt; i++) atexittbl[i] = atexittbl[i+1]; - atexittbl[i] = 0; - return 0; - } - } - return -1; -} - - -int -pc_atexit (VFUNC f) -{ - pc_clexit(f); - if (atexitcnt < MAX_ATEXIT) { - atexittbl[atexitcnt++] = f; - return 0; - } - return -1; -} - - -/* - * locked memory allocation - */ -void * -pc_malloc (size_t size) -{ - void *p = malloc(size); - - if (p) { - if (_go32_dpmi_lock_data(p, size)) { - free(p); - return NULL; - } - } - - return p; -} - - -/* - * standard redirection - */ -static char outname[L_tmpnam]; -static int h_out, h_outbak; -static char errname[L_tmpnam]; -static int h_err, h_errbak; - - -int -pc_open_stdout (void) -{ - tmpnam(outname); - - if ((h_out=open(outname, O_WRONLY | O_CREAT | O_TEXT | O_TRUNC, S_IREAD | S_IWRITE)) > 0) { - h_outbak = dup(STDOUT_FILENO); - fflush(stdout); - dup2(h_out, STDOUT_FILENO); - } - - return h_out; -} - - -void -pc_close_stdout (void) -{ - FILE *f; - char *line = alloca(512); - - if (h_out > 0) { - dup2(h_outbak, STDOUT_FILENO); - close(h_out); - close(h_outbak); - - f = fopen(outname, "rt"); - while (fgets(line, 512, f)) { - fputs(line, stdout); - } - fclose(f); - - remove(outname); - } -} - - -int -pc_open_stderr (void) -{ - tmpnam(errname); - - if ((h_err=open(errname, O_WRONLY | O_CREAT | O_TEXT | O_TRUNC, S_IREAD | S_IWRITE)) > 0) { - h_errbak = dup(STDERR_FILENO); - fflush(stderr); - dup2(h_err, STDERR_FILENO); - } - - return h_err; -} - - -void -pc_close_stderr (void) -{ - FILE *f; - char *line = alloca(512); - - if (h_err > 0) { - dup2(h_errbak, STDERR_FILENO); - close(h_err); - close(h_errbak); - - f = fopen(errname, "rt"); - while (fgets(line, 512, f)) { - fputs(line, stderr); - } - fclose(f); - - remove(errname); - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_hw.h b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_hw.h deleted file mode 100644 index 41948ec991..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_hw.h +++ /dev/null @@ -1,229 +0,0 @@ -/* - * PC/HW routine collection v1.4 for DOS/DJGPP - * - * Copyright (C) 2002 - Daniel Borca - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#ifndef PC_HW_H_included -#define PC_HW_H_included - -#include -#include - -/* - * misc C definitions - */ -#define FALSE 0 -#define TRUE !FALSE - -#define SQR(x) ((x) * (x)) - -#define MIN(x,y) (((x) < (y)) ? (x) : (y)) -#define MAX(x,y) (((x) > (y)) ? (x) : (y)) -#define MID(x,y,z) MAX((x), MIN((y), (z))) - -typedef void (*VFUNC) (void); -typedef void (*PFUNC) (void *); -typedef void (*MFUNC) (int x, int y, int z, int b); - -/* - * atexit - */ -int pc_atexit (VFUNC f); -int pc_clexit (VFUNC f); - -/* - * locked memory - */ -#define ENDOFUNC(x) static void x##_end() { } -#define LOCKFUNC(x) _go32_dpmi_lock_code((void *)x, (long)x##_end - (long)x) -#define LOCKDATA(x) _go32_dpmi_lock_data((void *)&x, sizeof(x)) -#define LOCKBUFF(x, l) _go32_dpmi_lock_data((void *)x, l) - -void *pc_malloc (size_t size); - -/* - * IRQ - */ -#define ENABLE() __asm __volatile ("sti") -#define DISABLE() __asm __volatile ("cli") - -extern int pc_install_irq (int i, int (*handler) ()); -extern int pc_remove_irq (int i); - -/* - * keyboard - */ -#define KB_SHIFT_FLAG 0x0001 -#define KB_CTRL_FLAG 0x0002 -#define KB_ALT_FLAG 0x0004 -#define KB_LWIN_FLAG 0x0008 -#define KB_RWIN_FLAG 0x0010 -#define KB_MENU_FLAG 0x0020 -#define KB_SCROLOCK_FLAG 0x0100 -#define KB_NUMLOCK_FLAG 0x0200 -#define KB_CAPSLOCK_FLAG 0x0400 -#define KB_INALTSEQ_FLAG 0x0800 -#define KB_ACCENT1_FLAG 0x1000 -#define KB_ACCENT2_FLAG 0x2000 -#define KB_ACCENT3_FLAG 0x4000 -#define KB_ACCENT4_FLAG 0x8000 - -#define KEY_A 1 -#define KEY_B 2 -#define KEY_C 3 -#define KEY_D 4 -#define KEY_E 5 -#define KEY_F 6 -#define KEY_G 7 -#define KEY_H 8 -#define KEY_I 9 -#define KEY_J 10 -#define KEY_K 11 -#define KEY_L 12 -#define KEY_M 13 -#define KEY_N 14 -#define KEY_O 15 -#define KEY_P 16 -#define KEY_Q 17 -#define KEY_R 18 -#define KEY_S 19 -#define KEY_T 20 -#define KEY_U 21 -#define KEY_V 22 -#define KEY_W 23 -#define KEY_X 24 -#define KEY_Y 25 -#define KEY_Z 26 -#define KEY_0 27 -#define KEY_1 28 -#define KEY_2 29 -#define KEY_3 30 -#define KEY_4 31 -#define KEY_5 32 -#define KEY_6 33 -#define KEY_7 34 -#define KEY_8 35 -#define KEY_9 36 -#define KEY_0_PAD 37 -#define KEY_1_PAD 38 -#define KEY_2_PAD 39 -#define KEY_3_PAD 40 -#define KEY_4_PAD 41 -#define KEY_5_PAD 42 -#define KEY_6_PAD 43 -#define KEY_7_PAD 44 -#define KEY_8_PAD 45 -#define KEY_9_PAD 46 -#define KEY_F1 47 -#define KEY_F2 48 -#define KEY_F3 49 -#define KEY_F4 50 -#define KEY_F5 51 -#define KEY_F6 52 -#define KEY_F7 53 -#define KEY_F8 54 -#define KEY_F9 55 -#define KEY_F10 56 -#define KEY_F11 57 -#define KEY_F12 58 -#define KEY_ESC 59 -#define KEY_TILDE 60 -#define KEY_MINUS 61 -#define KEY_EQUALS 62 -#define KEY_BACKSPACE 63 -#define KEY_TAB 64 -#define KEY_OPENBRACE 65 -#define KEY_CLOSEBRACE 66 -#define KEY_ENTER 67 -#define KEY_COLON 68 -#define KEY_QUOTE 69 -#define KEY_BACKSLASH 70 -#define KEY_BACKSLASH2 71 -#define KEY_COMMA 72 -#define KEY_STOP 73 -#define KEY_SLASH 74 -#define KEY_SPACE 75 -#define KEY_INSERT 76 -#define KEY_DEL 77 -#define KEY_HOME 78 -#define KEY_END 79 -#define KEY_PGUP 80 -#define KEY_PGDN 81 -#define KEY_LEFT 82 -#define KEY_RIGHT 83 -#define KEY_UP 84 -#define KEY_DOWN 85 -#define KEY_SLASH_PAD 86 -#define KEY_ASTERISK 87 -#define KEY_MINUS_PAD 88 -#define KEY_PLUS_PAD 89 -#define KEY_DEL_PAD 90 -#define KEY_ENTER_PAD 91 -#define KEY_PRTSCR 92 -#define KEY_PAUSE 93 -#define KEY_ABNT_C1 94 -#define KEY_YEN 95 -#define KEY_KANA 96 -#define KEY_CONVERT 97 -#define KEY_NOCONVERT 98 -#define KEY_AT 99 -#define KEY_CIRCUMFLEX 100 -#define KEY_COLON2 101 -#define KEY_KANJI 102 - -#define KEY_MODIFIERS 103 - -#define KEY_LSHIFT 103 -#define KEY_RSHIFT 104 -#define KEY_LCONTROL 105 -#define KEY_RCONTROL 106 -#define KEY_ALT 107 -#define KEY_ALTGR 108 -#define KEY_LWIN 109 -#define KEY_RWIN 110 -#define KEY_MENU 111 -#define KEY_SCRLOCK 112 -#define KEY_NUMLOCK 113 -#define KEY_CAPSLOCK 114 - -#define KEY_MAX 115 - -int pc_install_keyb (void); -void pc_remove_keyb (void); -int pc_keypressed (void); -int pc_readkey (void); -int pc_keydown (int code); -int pc_keyshifts (void); - -/* - * timer - */ -int pc_install_int (PFUNC func, void *parm, unsigned int freq); -int pc_remove_int (int fid); -int pc_adjust_int (int fid, unsigned int freq); -void pc_remove_timer (void); - -/* - * mouse - */ -int pc_install_mouse (void); -void pc_remove_mouse (void); -MFUNC pc_install_mouse_handler (MFUNC handler); -void pc_mouse_area (int x1, int y1, int x2, int y2); -void pc_mouse_speed (int xspeed, int yspeed); -int pc_query_mouse (int *x, int *y, int *z); -void pc_warp_mouse (int x, int y); - -/* - * standard redirection - */ -int pc_open_stdout (void); -int pc_open_stderr (void); -void pc_close_stdout (void); -void pc_close_stderr (void); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_irq.S b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_irq.S deleted file mode 100644 index 7d62ac74ce..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_irq.S +++ /dev/null @@ -1,182 +0,0 @@ -/* - * PC/HW routine collection v1.3 for DOS/DJGPP - * - * Copyright (C) 2002 - Daniel Borca - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - - .file "pc_irq.S" - - .text - -#define IRQ_STACK_SIZE 16384 - -#define IRQ_WRAPPER_LEN (__irq_wrapper_1-__irq_wrapper_0) -#define IRQ_OLD (__irq_old_0-__irq_wrapper_0) -#define IRQ_HOOK (__irq_hook_0-__irq_wrapper_0) -#define IRQ_STACK (__irq_stack_0-__irq_wrapper_0) - - .balign 4 -common: - movw $0x0400, %ax - int $0x31 - - movl %ss:8(%ebp), %ebx - cmpl $15, %ebx - jbe 0f - fail: - orl $-1, %eax - popl %edi - popl %ebx - leave - ret - - 0: - movl %ebx, %edi - imull $IRQ_WRAPPER_LEN, %edi - addl $__irq_wrapper_0, %edi - - cmpb $7, %bl - jbe 1f - movb %dl, %dh - subb $8, %dh - 1: - addb %dh, %bl - ret - - .balign 4 - .global _pc_install_irq -_pc_install_irq: - pushl %ebp - movl %esp, %ebp - pushl %ebx - pushl %edi - - call common - - cmpl $0, IRQ_HOOK(%edi) - jne fail - - pushl $IRQ_WRAPPER_LEN - pushl %edi - call __go32_dpmi_lock_code - addl $8, %esp - testl %eax, %eax - jnz fail - - pushl $IRQ_STACK_SIZE - call _pc_malloc - popl %edx - testl %eax, %eax - jz fail - addl %edx, %eax - movl %eax, IRQ_STACK(%edi) - - movl ___djgpp_ds_alias, %eax - movl %eax, IRQ_STACK+4(%edi) - - movl %ss:12(%ebp), %eax - movl %eax, IRQ_HOOK(%edi) - - movw $0x0204, %ax - int $0x31 - movl %edx, IRQ_OLD(%edi) - movw %cx, IRQ_OLD+4(%edi) - movw $0x0205, %ax - movl %edi, %edx - movl %cs, %ecx - int $0x31 - - done: - xorl %eax, %eax - popl %edi - popl %ebx - leave - ret - - .balign 4 - .global _pc_remove_irq -_pc_remove_irq: - pushl %ebp - movl %esp, %ebp - pushl %ebx - pushl %edi - - call common - - cmpl $0, IRQ_HOOK(%edi) - je fail - - movl $0, IRQ_HOOK(%edi) - - movw $0x0205, %ax - movl IRQ_OLD(%edi), %edx - movl IRQ_OLD+4(%edi), %ecx - int $0x31 - - movl IRQ_STACK(%edi), %eax - subl $IRQ_STACK_SIZE, %eax - pushl %eax - call _free - popl %eax - - jmp done - -#define WRAPPER(x) ; \ - .balign 4 ; \ -__irq_wrapper_##x: ; \ - pushal ; \ - pushl %ds ; \ - pushl %es ; \ - pushl %fs ; \ - pushl %gs ; \ - movl %ss, %ebx ; \ - movl %esp, %esi ; \ - lss %cs:__irq_stack_##x, %esp ; \ - pushl %ss ; \ - pushl %ss ; \ - popl %es ; \ - popl %ds ; \ - movl ___djgpp_dos_sel, %fs ; \ - pushl %fs ; \ - popl %gs ; \ - call *__irq_hook_##x ; \ - movl %ebx, %ss ; \ - movl %esi, %esp ; \ - testl %eax, %eax ; \ - popl %gs ; \ - popl %fs ; \ - popl %es ; \ - popl %ds ; \ - popal ; \ - jz __irq_ignore_##x ; \ -__irq_bypass_##x: ; \ - ljmp *%cs:__irq_old_##x ; \ -__irq_ignore_##x: ; \ - iret ; \ - .balign 4 ; \ -__irq_old_##x: ; \ - .long 0, 0 ; \ -__irq_hook_##x: ; \ - .long 0 ; \ -__irq_stack_##x: ; \ - .long 0, 0 - - WRAPPER(0); - WRAPPER(1); - WRAPPER(2); - WRAPPER(3); - WRAPPER(4); - WRAPPER(5); - WRAPPER(6); - WRAPPER(7); - WRAPPER(8); - WRAPPER(9); - WRAPPER(10); - WRAPPER(11); - WRAPPER(12); - WRAPPER(13); - WRAPPER(14); - WRAPPER(15); diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_keyb.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_keyb.c deleted file mode 100644 index d7e3257b9d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_keyb.c +++ /dev/null @@ -1,540 +0,0 @@ -/* - * PC/HW routine collection v1.3 for DOS/DJGPP - * - * Copyright (C) 2002 - Daniel Borca - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#include -#include -#include - -#include "pc_hw.h" - - -#define KEYB_IRQ 1 - -#define KEY_BUFFER_SIZE 64 - -#define KB_MODIFIERS (KB_SHIFT_FLAG | KB_CTRL_FLAG | KB_ALT_FLAG | KB_LWIN_FLAG | KB_RWIN_FLAG | KB_MENU_FLAG) -#define KB_LED_FLAGS (KB_SCROLOCK_FLAG | KB_NUMLOCK_FLAG | KB_CAPSLOCK_FLAG) - -static int keyboard_installed; - -static volatile struct { - volatile int start, end; - volatile int key[KEY_BUFFER_SIZE]; -} key_buffer; - -static volatile int key_enhanced, key_pause_loop, key_shifts; -static int leds_ok = TRUE; -static int in_a_terrupt = FALSE; -static volatile char pc_key[KEY_MAX]; - - -/* convert Allegro format scancodes into key_shifts flag bits */ -static unsigned short modifier_table[KEY_MAX - KEY_MODIFIERS] = { - KB_SHIFT_FLAG, KB_SHIFT_FLAG, KB_CTRL_FLAG, - KB_CTRL_FLAG, KB_ALT_FLAG, KB_ALT_FLAG, - KB_LWIN_FLAG, KB_RWIN_FLAG, KB_MENU_FLAG, - KB_SCROLOCK_FLAG, KB_NUMLOCK_FLAG, KB_CAPSLOCK_FLAG -}; - - -/* lookup table for converting hardware scancodes into Allegro format */ -static unsigned char hw_to_mycode[128] = { - /* 0x00 */ 0, KEY_ESC, KEY_1, KEY_2, - /* 0x04 */ KEY_3, KEY_4, KEY_5, KEY_6, - /* 0x08 */ KEY_7, KEY_8, KEY_9, KEY_0, - /* 0x0C */ KEY_MINUS, KEY_EQUALS, KEY_BACKSPACE, KEY_TAB, - /* 0x10 */ KEY_Q, KEY_W, KEY_E, KEY_R, - /* 0x14 */ KEY_T, KEY_Y, KEY_U, KEY_I, - /* 0x18 */ KEY_O, KEY_P, KEY_OPENBRACE, KEY_CLOSEBRACE, - /* 0x1C */ KEY_ENTER, KEY_LCONTROL, KEY_A, KEY_S, - /* 0x20 */ KEY_D, KEY_F, KEY_G, KEY_H, - /* 0x24 */ KEY_J, KEY_K, KEY_L, KEY_COLON, - /* 0x28 */ KEY_QUOTE, KEY_TILDE, KEY_LSHIFT, KEY_BACKSLASH, - /* 0x2C */ KEY_Z, KEY_X, KEY_C, KEY_V, - /* 0x30 */ KEY_B, KEY_N, KEY_M, KEY_COMMA, - /* 0x34 */ KEY_STOP, KEY_SLASH, KEY_RSHIFT, KEY_ASTERISK, - /* 0x38 */ KEY_ALT, KEY_SPACE, KEY_CAPSLOCK, KEY_F1, - /* 0x3C */ KEY_F2, KEY_F3, KEY_F4, KEY_F5, - /* 0x40 */ KEY_F6, KEY_F7, KEY_F8, KEY_F9, - /* 0x44 */ KEY_F10, KEY_NUMLOCK, KEY_SCRLOCK, KEY_7_PAD, - /* 0x48 */ KEY_8_PAD, KEY_9_PAD, KEY_MINUS_PAD, KEY_4_PAD, - /* 0x4C */ KEY_5_PAD, KEY_6_PAD, KEY_PLUS_PAD, KEY_1_PAD, - /* 0x50 */ KEY_2_PAD, KEY_3_PAD, KEY_0_PAD, KEY_DEL_PAD, - /* 0x54 */ KEY_PRTSCR, 0, KEY_BACKSLASH2, KEY_F11, - /* 0x58 */ KEY_F12, 0, 0, KEY_LWIN, - /* 0x5C */ KEY_RWIN, KEY_MENU, 0, 0, - /* 0x60 */ 0, 0, 0, 0, - /* 0x64 */ 0, 0, 0, 0, - /* 0x68 */ 0, 0, 0, 0, - /* 0x6C */ 0, 0, 0, 0, - /* 0x70 */ KEY_KANA, 0, 0, KEY_ABNT_C1, - /* 0x74 */ 0, 0, 0, 0, - /* 0x78 */ 0, KEY_CONVERT, 0, KEY_NOCONVERT, - /* 0x7C */ 0, KEY_YEN, 0, 0 -}; - - -/* lookup table for converting extended hardware codes into Allegro format */ -static unsigned char hw_to_mycode_ex[128] = { - /* 0x00 */ 0, KEY_ESC, KEY_1, KEY_2, - /* 0x04 */ KEY_3, KEY_4, KEY_5, KEY_6, - /* 0x08 */ KEY_7, KEY_8, KEY_9, KEY_0, - /* 0x0C */ KEY_MINUS, KEY_EQUALS, KEY_BACKSPACE, KEY_TAB, - /* 0x10 */ KEY_CIRCUMFLEX, KEY_AT, KEY_COLON2, KEY_R, - /* 0x14 */ KEY_KANJI, KEY_Y, KEY_U, KEY_I, - /* 0x18 */ KEY_O, KEY_P, KEY_OPENBRACE, KEY_CLOSEBRACE, - /* 0x1C */ KEY_ENTER_PAD, KEY_RCONTROL, KEY_A, KEY_S, - /* 0x20 */ KEY_D, KEY_F, KEY_G, KEY_H, - /* 0x24 */ KEY_J, KEY_K, KEY_L, KEY_COLON, - /* 0x28 */ KEY_QUOTE, KEY_TILDE, 0, KEY_BACKSLASH, - /* 0x2C */ KEY_Z, KEY_X, KEY_C, KEY_V, - /* 0x30 */ KEY_B, KEY_N, KEY_M, KEY_COMMA, - /* 0x34 */ KEY_STOP, KEY_SLASH_PAD, 0, KEY_PRTSCR, - /* 0x38 */ KEY_ALTGR, KEY_SPACE, KEY_CAPSLOCK, KEY_F1, - /* 0x3C */ KEY_F2, KEY_F3, KEY_F4, KEY_F5, - /* 0x40 */ KEY_F6, KEY_F7, KEY_F8, KEY_F9, - /* 0x44 */ KEY_F10, KEY_NUMLOCK, KEY_PAUSE, KEY_HOME, - /* 0x48 */ KEY_UP, KEY_PGUP, KEY_MINUS_PAD, KEY_LEFT, - /* 0x4C */ KEY_5_PAD, KEY_RIGHT, KEY_PLUS_PAD, KEY_END, - /* 0x50 */ KEY_DOWN, KEY_PGDN, KEY_INSERT, KEY_DEL, - /* 0x54 */ KEY_PRTSCR, 0, KEY_BACKSLASH2, KEY_F11, - /* 0x58 */ KEY_F12, 0, 0, KEY_LWIN, - /* 0x5C */ KEY_RWIN, KEY_MENU, 0, 0, - /* 0x60 */ 0, 0, 0, 0, - /* 0x64 */ 0, 0, 0, 0, - /* 0x68 */ 0, 0, 0, 0, - /* 0x6C */ 0, 0, 0, 0, - /* 0x70 */ 0, 0, 0, 0, - /* 0x74 */ 0, 0, 0, 0, - /* 0x78 */ 0, 0, 0, 0, - /* 0x7C */ 0, 0, 0, 0 -}; - - -/* default mapping table for the US keyboard layout */ -static unsigned short standard_key_ascii_table[KEY_MAX] = { - /* start */ 0, - /* alphabet */ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', - /* numbers */ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - /* numpad */ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - /* func keys */ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, - /* misc chars */ 27, '`', '-', '=', 8, 9, '[', ']', 13, ';', '\'', '\\', '\\', ',', '.', '/', ' ', - /* controls */ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, - /* numpad */ '/', '*', '-', '+', '.', 13, - /* modifiers */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - - -/* capslock mapping table for the US keyboard layout */ -static unsigned short standard_key_capslock_table[KEY_MAX] = { - /* start */ 0, - /* alphabet */ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', - /* numbers */ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - /* numpad */ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - /* func keys */ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, - /* misc chars */ 27, '`', '-', '=', 8, 9, '[', ']', 13, ';', '\'', '\\', '\\', ',', '.', '/', ' ', - /* controls */ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, - /* numpad */ '/', '*', '-', '+', '.', 13, - /* modifiers */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - - -/* shifted mapping table for the US keyboard layout */ -static unsigned short standard_key_shift_table[KEY_MAX] = { - /* start */ 0, - /* alphabet */ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', - /* numbers */ ')', '!', '@', '#', '$', '%', '^', '&', '*', '(', - /* numpad */ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - /* func keys */ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, - /* misc chars */ 27, '~', '_', '+', 8, 9, '{', '}', 13, ':', '"', '|', '|', '<', '>', '?', ' ', - /* controls */ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, - /* numpad */ '/', '*', '-', '+', '.', 13, - /* modifiers */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - - -/* ctrl+key mapping table for the US keyboard layout */ -static unsigned short standard_key_control_table[KEY_MAX] = { - /* start */ 0, - /* alphabet */ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - /* numbers */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - /* numpad */ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - /* func keys */ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, - /* misc chars */ 27, 2, 2, 2, 127, 127, 2, 2, 10, 2, 2, 2, 2, 2, 2, 2, 2, - /* controls */ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, - /* numpad */ 2, 2, 2, 2, 2, 10, - /* modifiers */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - - -/* convert numeric pad scancodes into arrow codes */ -static unsigned char numlock_table[10] = { - KEY_INSERT, KEY_END, KEY_DOWN, KEY_PGDN, KEY_LEFT, - KEY_5_PAD, KEY_RIGHT, KEY_HOME, KEY_UP, KEY_PGUP -}; - - -/* kb_wait_for_write_ready: - * Wait for the keyboard controller to set the ready-for-write bit. - */ -static __inline int -kb_wait_for_write_ready (void) -{ - int timeout = 4096; - - while ((timeout > 0) && (inportb(0x64) & 2)) timeout--; - - return (timeout > 0); -} - - -/* kb_wait_for_read_ready: - * Wait for the keyboard controller to set the ready-for-read bit. - */ -static __inline int -kb_wait_for_read_ready (void) -{ - int timeout = 16384; - - while ((timeout > 0) && (!(inportb(0x64) & 1))) timeout--; - - return (timeout > 0); -} - - -/* kb_send_data: - * Sends a byte to the keyboard controller. Returns 1 if all OK. - */ -static __inline int -kb_send_data (unsigned char data) -{ - int resends = 4; - int timeout, temp; - - do { - if (!kb_wait_for_write_ready()) - return 0; - - outportb(0x60, data); - timeout = 4096; - - while (--timeout > 0) { - if (!kb_wait_for_read_ready()) - return 0; - - temp = inportb(0x60); - - if (temp == 0xFA) - return 1; - - if (temp == 0xFE) - break; - } - } while ((resends-- > 0) && (timeout > 0)); - - return 0; -} - - -static void -update_leds (int leds) -{ - if (leds_ok) { - if (!in_a_terrupt) - DISABLE(); - - if (!kb_send_data(0xED)) { - kb_send_data(0xF4); - leds_ok = FALSE; - } else if (!kb_send_data((leds >> 8) & 7)) { - kb_send_data(0xF4); - leds_ok = FALSE; - } - - if (!in_a_terrupt) - ENABLE(); - } -} ENDOFUNC(update_leds) - - -static void -inject_key (int scancode) -{ - unsigned short *table; - - if ((scancode >= KEY_0_PAD) && (scancode <= KEY_9_PAD)) { - if (((key_shifts & KB_NUMLOCK_FLAG) != 0) == ((key_shifts & KB_SHIFT_FLAG) != 0)) { - scancode = numlock_table[scancode - KEY_0_PAD]; - } - table = standard_key_ascii_table; - } else if (key_shifts & KB_CTRL_FLAG) { - table = standard_key_control_table; - } else if (key_shifts & KB_SHIFT_FLAG) { - if (key_shifts & KB_CAPSLOCK_FLAG) { - if (standard_key_ascii_table[scancode] == standard_key_capslock_table[scancode]) { - table = standard_key_shift_table; - } else { - table = standard_key_ascii_table; - } - } else { - table = standard_key_shift_table; - } - } else if (key_shifts & KB_CAPSLOCK_FLAG) { - table = standard_key_capslock_table; - } else { - table = standard_key_ascii_table; - } - - key_buffer.key[key_buffer.end++] = (scancode << 16) | table[scancode]; - - if (key_buffer.end >= KEY_BUFFER_SIZE) - key_buffer.end = 0; - if (key_buffer.end == key_buffer.start) { - key_buffer.start++; - if (key_buffer.start >= KEY_BUFFER_SIZE) - key_buffer.start = 0; - } -} ENDOFUNC(inject_key) - - -static void -handle_code (int scancode, int keycode) -{ - in_a_terrupt++; - - if (keycode == 0) { /* pause */ - inject_key(scancode); - pc_key[KEY_PAUSE] ^= TRUE; - } else if (scancode) { - int flag; - - if (scancode >= KEY_MODIFIERS) { - flag = modifier_table[scancode - KEY_MODIFIERS]; - } else { - flag = 0; - } - if ((char)keycode < 0) { /* release */ - pc_key[scancode] = FALSE; - if (flag & KB_MODIFIERS) { - key_shifts &= ~flag; - } - } else { /* keypress */ - pc_key[scancode] = TRUE; - if (flag & KB_MODIFIERS) { - key_shifts |= flag; - } - if (flag & KB_LED_FLAGS) { - key_shifts ^= flag; - update_leds(key_shifts); - } - if (scancode < KEY_MODIFIERS) { - inject_key(scancode); - } - } - } - - in_a_terrupt--; -} ENDOFUNC(handle_code) - - -static int -keyboard () -{ - unsigned char temp, scancode; - - temp = inportb(0x60); - - if (temp <= 0xe1) { - if (key_pause_loop) { - if (!--key_pause_loop) handle_code(KEY_PAUSE, 0); - } else - switch (temp) { - case 0xe0: - key_enhanced = TRUE; - break; - case 0xe1: - key_pause_loop = 5; - break; - default: - if (key_enhanced) { - key_enhanced = FALSE; - scancode = hw_to_mycode_ex[temp & 0x7f]; - } else { - scancode = hw_to_mycode[temp & 0x7f]; - } - handle_code(scancode, temp); - } - } - - if (((temp==0x4F)||(temp==0x53))&&(key_shifts&KB_CTRL_FLAG)&&(key_shifts&KB_ALT_FLAG)) { - /* Hack alert: - * only SIGINT (but not Ctrl-Break) - * calls the destructors and will safely clean up - */ - __asm("\n\ - movb $0x79, %%al \n\ - call ___djgpp_hw_exception \n\ - ":::"%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory"); - } - - __asm("\n\ - inb $0x61, %%al \n\ - movb %%al, %%ah \n\ - orb $0x80, %%al \n\ - outb %%al, $0x61 \n\ - xchgb %%al, %%ah \n\ - outb %%al, $0x61 \n\ - movb $0x20, %%al \n\ - outb %%al, $0x20 \n\ - ":::"%eax"); - return 0; -} ENDOFUNC(keyboard) - - -int -pc_keypressed (void) -{ - return (key_buffer.start!=key_buffer.end); -} - - -int -pc_readkey (void) -{ - if (keyboard_installed) { - int key; - - while (key_buffer.start == key_buffer.end) { - __dpmi_yield(); - } - - DISABLE(); - key = key_buffer.key[key_buffer.start++]; - if (key_buffer.start >= KEY_BUFFER_SIZE) - key_buffer.start = 0; - ENABLE(); - - return key; - } else { - return 0; - } -} - - -int -pc_keydown (int code) -{ - return pc_key[code]; -} - - -int -pc_keyshifts (void) -{ - return key_shifts; -} - - -void -pc_remove_keyb (void) -{ - if (keyboard_installed) { - int s1, s2, s3; - - keyboard_installed = FALSE; - pc_clexit(pc_remove_keyb); - - DISABLE(); - _farsetsel(__djgpp_dos_sel); - _farnspokew(0x41c, _farnspeekw(0x41a)); - - s1 = _farnspeekb(0x417) & 0x80; - s2 = _farnspeekb(0x418) & 0xFC; - s3 = _farnspeekb(0x496) & 0xF3; - - if (pc_key[KEY_RSHIFT]) { s1 |= 1; } - if (pc_key[KEY_LSHIFT]) { s1 |= 2; } - if (pc_key[KEY_LCONTROL]) { s2 |= 1; s1 |= 4; } - if (pc_key[KEY_ALT]) { s1 |= 8; s2 |= 2; } - if (pc_key[KEY_RCONTROL]) { s1 |= 4; s3 |= 4; } - if (pc_key[KEY_ALTGR]) { s1 |= 8; s3 |= 8; } - - if (key_shifts & KB_SCROLOCK_FLAG) s1 |= 16; - if (key_shifts & KB_NUMLOCK_FLAG) s1 |= 32; - if (key_shifts & KB_CAPSLOCK_FLAG) s1 |= 64; - - _farnspokeb(0x417, s1); - _farnspokeb(0x418, s2); - _farnspokeb(0x496, s3); - update_leds(key_shifts); - - ENABLE(); - pc_remove_irq(KEYB_IRQ); - } -} - - -int -pc_install_keyb (void) -{ - if (keyboard_installed || pc_install_irq(KEYB_IRQ, keyboard)) { - return -1; - } else { - int s1, s2, s3; - - LOCKDATA(key_buffer); - LOCKDATA(key_enhanced); - LOCKDATA(key_pause_loop); - LOCKDATA(key_shifts); - LOCKDATA(leds_ok); - LOCKDATA(in_a_terrupt); - LOCKDATA(pc_key); - LOCKDATA(modifier_table); - LOCKDATA(hw_to_mycode); - LOCKDATA(hw_to_mycode_ex); - LOCKDATA(standard_key_ascii_table); - LOCKDATA(standard_key_capslock_table); - LOCKDATA(standard_key_shift_table); - LOCKDATA(standard_key_control_table); - LOCKDATA(numlock_table); - LOCKFUNC(update_leds); - LOCKFUNC(inject_key); - LOCKFUNC(handle_code); - LOCKFUNC(keyboard); - - DISABLE(); - _farsetsel(__djgpp_dos_sel); - _farnspokew(0x41c, _farnspeekw(0x41a)); - - key_shifts = 0; - s1 = _farnspeekb(0x417); - s2 = _farnspeekb(0x418); - s3 = _farnspeekb(0x496); - - if (s1 & 1) { key_shifts |= KB_SHIFT_FLAG; pc_key[KEY_RSHIFT] = TRUE; } - if (s1 & 2) { key_shifts |= KB_SHIFT_FLAG; pc_key[KEY_LSHIFT] = TRUE; } - if (s2 & 1) { key_shifts |= KB_CTRL_FLAG; pc_key[KEY_LCONTROL] = TRUE; } - if (s2 & 2) { key_shifts |= KB_ALT_FLAG; pc_key[KEY_ALT] = TRUE; } - if (s3 & 4) { key_shifts |= KB_CTRL_FLAG; pc_key[KEY_RCONTROL] = TRUE; } - if (s3 & 8) { key_shifts |= KB_ALT_FLAG; pc_key[KEY_ALTGR] = TRUE; } - - if (s1 & 16) key_shifts |= KB_SCROLOCK_FLAG; - if (s1 & 32) key_shifts |= KB_NUMLOCK_FLAG; - if (s1 & 64) key_shifts |= KB_CAPSLOCK_FLAG; - update_leds(key_shifts); - - key_enhanced = key_pause_loop = 0; - key_buffer.start = key_buffer.end = 0; - ENABLE(); - - pc_atexit(pc_remove_keyb); - keyboard_installed = TRUE; - return 0; - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_mouse.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_mouse.c deleted file mode 100644 index 5bf99d367f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_mouse.c +++ /dev/null @@ -1,293 +0,0 @@ -/* - * PC/HW routine collection v1.3 for DOS/DJGPP - * - * Copyright (C) 2002 - Daniel Borca - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#include -#include -#include - -#include "pc_hw.h" - - -#define PC_CUTE_WHEEL 1 /* CuteMouse WheelAPI */ - -#define MOUSE_STACK_SIZE 16384 - -#define CLEAR_MICKEYS() \ - do { \ - __asm __volatile ("movw $0xb, %%ax; int $0x33":::"%eax", "%ecx", "%edx"); \ - ox = oy = 0; \ - } while (0) - -extern void mouse_wrap (void); -extern int mouse_wrap_end[]; - -static MFUNC mouse_func; -static long mouse_callback; -static __dpmi_regs mouse_regs; - -static volatile struct { - volatile int x, y, z, b; -} pc_mouse; - -static int minx = 0; -static int maxx = 319; -static int miny = 0; -static int maxy = 199; -static int minz = 0; -static int maxz = 255; - -static int sx = 2; -static int sy = 2; - -static int emulat3 = FALSE; - -static int ox, oy; - - -static void -mouse (__dpmi_regs *r) -{ - int nx = (signed short)r->x.si / sx; - int ny = (signed short)r->x.di / sy; - int dx = nx - ox; - int dy = ny - oy; -#if PC_CUTE_WHEEL - int dz = (signed char)r->h.bh; -#endif - ox = nx; - oy = ny; - - pc_mouse.b = r->h.bl; - pc_mouse.x = MID(minx, pc_mouse.x + dx, maxx); - pc_mouse.y = MID(miny, pc_mouse.y + dy, maxy); -#if PC_CUTE_WHEEL - pc_mouse.z = MID(minz, pc_mouse.z + dz, maxz); -#endif - - if (emulat3) { - if ((pc_mouse.b & 3) == 3) { - pc_mouse.b = 4; - } - } - - if (mouse_func) { - mouse_func(pc_mouse.x, pc_mouse.y, pc_mouse.z, pc_mouse.b); - } -} ENDOFUNC(mouse) - - -void -pc_remove_mouse (void) -{ - if (mouse_callback) { - pc_clexit(pc_remove_mouse); - __asm("\n\ - movl %%edx, %%ecx \n\ - shrl $16, %%ecx \n\ - movw $0x0304, %%ax \n\ - int $0x31 \n\ - movw $0x000c, %%ax \n\ - xorl %%ecx, %%ecx \n\ - int $0x33 \n\ - "::"d"(mouse_callback):"%eax", "%ecx"); - - mouse_callback = 0; - - free((void *)(mouse_wrap_end[0] - MOUSE_STACK_SIZE)); - } -} - - -int -pc_install_mouse (void) -{ - int buttons; - - /* fail if already call-backed */ - if (mouse_callback) { - return 0; - } - - /* reset mouse and get status */ - __asm("\n\ - xorl %%eax, %%eax \n\ - int $0x33 \n\ - andl %%ebx, %%eax \n\ - movl %%eax, %0 \n\ - ":"=g" (buttons)::"%eax", "%ebx"); - if (!buttons) { - return 0; - } - - /* lock wrapper */ - LOCKDATA(mouse_func); - LOCKDATA(mouse_callback); - LOCKDATA(mouse_regs); - LOCKDATA(pc_mouse); - LOCKDATA(minx); - LOCKDATA(maxx); - LOCKDATA(miny); - LOCKDATA(maxy); - LOCKDATA(minz); - LOCKDATA(maxz); - LOCKDATA(sx); - LOCKDATA(sy); - LOCKDATA(emulat3); - LOCKDATA(ox); - LOCKDATA(oy); - LOCKFUNC(mouse); - LOCKFUNC(mouse_wrap); - - mouse_wrap_end[1] = __djgpp_ds_alias; - /* grab a locked stack */ - if ((mouse_wrap_end[0] = (int)pc_malloc(MOUSE_STACK_SIZE)) == NULL) { - return 0; - } - - /* try to hook a call-back */ - __asm("\n\ - pushl %%ds \n\ - pushl %%es \n\ - movw $0x0303, %%ax \n\ - pushl %%ds \n\ - pushl %%cs \n\ - popl %%ds \n\ - popl %%es \n\ - int $0x31 \n\ - popl %%es \n\ - popl %%ds \n\ - jc 0f \n\ - shll $16, %%ecx \n\ - movw %%dx, %%cx \n\ - movl %%ecx, %0 \n\ - 0: \n\ - ":"=g"(mouse_callback) - :"S" (mouse_wrap), "D"(&mouse_regs) - :"%eax", "%ecx", "%edx"); - if (!mouse_callback) { - free((void *)mouse_wrap_end[0]); - return 0; - } - - /* adjust stack */ - mouse_wrap_end[0] += MOUSE_STACK_SIZE; - - /* install the handler */ - mouse_regs.x.ax = 0x000c; -#if PC_CUTE_WHEEL - mouse_regs.x.cx = 0x7f | 0x80; -#else - mouse_regs.x.cx = 0x7f; -#endif - mouse_regs.x.dx = mouse_callback & 0xffff; - mouse_regs.x.es = mouse_callback >> 16; - __dpmi_int(0x33, &mouse_regs); - - CLEAR_MICKEYS(); - - emulat3 = (buttons < 3); - pc_atexit(pc_remove_mouse); - return buttons; -} - - -MFUNC -pc_install_mouse_handler (MFUNC handler) -{ - MFUNC old; - - if (!mouse_callback && !pc_install_mouse()) { - return NULL; - } - - old = mouse_func; - mouse_func = handler; - return old; -} - - -void -pc_mouse_area (int x1, int y1, int x2, int y2) -{ - minx = x1; - maxx = x2; - miny = y1; - maxy = y2; -} - - -void -pc_mouse_speed (int xspeed, int yspeed) -{ - DISABLE(); - - sx = MAX(1, xspeed); - sy = MAX(1, yspeed); - - ENABLE(); -} - - -int -pc_query_mouse (int *x, int *y, int *z) -{ - *x = pc_mouse.x; - *y = pc_mouse.y; - *z = pc_mouse.z; - return pc_mouse.b; -} - - -void -pc_warp_mouse (int x, int y) -{ - CLEAR_MICKEYS(); - - pc_mouse.x = MID(minx, x, maxx); - pc_mouse.y = MID(miny, y, maxy); - - if (mouse_func) { - mouse_func(pc_mouse.x, pc_mouse.y, pc_mouse.z, pc_mouse.b); - } -} - - -/* Hack alert: - * `mouse_wrap_end' actually holds the - * address of stack in a safe data selector. - */ -__asm("\n\ - .text \n\ - .p2align 5,,31 \n\ - .global _mouse_wrap \n\ -_mouse_wrap: \n\ - cld \n\ - lodsl \n\ - movl %eax, %es:42(%edi) \n\ - addw $4, %es:46(%edi) \n\ - pushl %es \n\ - movl %ss, %ebx \n\ - movl %esp, %esi \n\ - lss %cs:_mouse_wrap_end, %esp\n\ - pushl %ss \n\ - pushl %ss \n\ - popl %es \n\ - popl %ds \n\ - movl ___djgpp_dos_sel, %fs \n\ - pushl %fs \n\ - popl %gs \n\ - pushl %edi \n\ - call _mouse \n\ - popl %edi \n\ - movl %ebx, %ss \n\ - movl %esi, %esp \n\ - popl %es \n\ - iret \n\ - .global _mouse_wrap_end \n\ -_mouse_wrap_end:.long 0, 0"); diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_timer.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_timer.c deleted file mode 100644 index e7cbe70a1f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/PC_HW/pc_timer.c +++ /dev/null @@ -1,327 +0,0 @@ -/* - * PC/HW routine collection v1.5 for DOS/DJGPP - * - * Copyright (C) 2002 - Daniel Borca - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#include -#include - -#include "pc_hw.h" - -#define TIMER_IRQ 0 - -#define MAX_TIMERS 8 - -#define PIT_FREQ 0x1234DD - -#define ADJUST(timer, basefreq) timer.counter = PIT_FREQ * timer.freq / SQR(basefreq) - -#define unvolatile(__v, __t) __extension__ ({union { volatile __t __cp; __t __p; } __q; __q.__cp = __v; __q.__p;}) - -static int timer_installed; - -typedef struct { - volatile unsigned int counter, clock_ticks, freq; - volatile PFUNC func; - volatile void *parm; -} TIMER; - -static TIMER timer_main, timer_func[MAX_TIMERS]; - - -/* Desc: main timer callback - * - * In : - - * Out : 0 to bypass BIOS, 1 to chain to BIOS - * - * Note: - - */ -static int -timer () -{ - int i; - - for (i = 0; i < MAX_TIMERS; i++) { - TIMER *t = &timer_func[i]; - if (t->func) { - t->clock_ticks += t->counter; - if (t->clock_ticks >= timer_main.counter) { - t->clock_ticks -= timer_main.counter; - t->func(unvolatile(t->parm, void *)); - } - } - } - - timer_main.clock_ticks += timer_main.counter; - if (timer_main.clock_ticks >= 0x10000) { - timer_main.clock_ticks -= 0x10000; - return 1; - } else { - outportb(0x20, 0x20); - return 0; - } -} ENDOFUNC(timer) - - -/* Desc: uninstall timer engine - * - * In : - - * Out : - - * - * Note: - - */ -void -pc_remove_timer (void) -{ - if (timer_installed) { - timer_installed = FALSE; - pc_clexit(pc_remove_timer); - - DISABLE(); - outportb(0x43, 0x34); - outportb(0x40, 0); - outportb(0x40, 0); - ENABLE(); - - pc_remove_irq(TIMER_IRQ); - } -} - - -/* Desc: remove timerfunc - * - * In : timerfunc id - * Out : 0 if success - * - * Note: tries to relax the main timer whenever possible - */ -int -pc_remove_int (int fid) -{ - int i; - unsigned int freq = 0; - - /* are we installed? */ - if (!timer_installed) { - return -1; - } - - /* sanity check */ - if ((fid < 0) || (fid >= MAX_TIMERS) || (timer_func[fid].func == NULL)) { - return -1; - } - timer_func[fid].func = NULL; - - /* scan for maximum frequency */ - for (i = 0; i < MAX_TIMERS; i++) { - TIMER *t = &timer_func[i]; - if (t->func) { - if (freq < t->freq) { - freq = t->freq; - } - } - } - - /* if there are no callbacks left, cleanup */ - if (!freq) { - pc_remove_timer(); - return 0; - } - - /* if we just lowered the maximum frequency, try to relax the timer engine */ - if (freq < timer_main.freq) { - unsigned int new_counter = PIT_FREQ / freq; - - DISABLE(); - - for (i = 0; i < MAX_TIMERS; i++) { - if (timer_func[i].func) { - ADJUST(timer_func[i], freq); - } - } - - outportb(0x43, 0x34); - outportb(0x40, (unsigned char)new_counter); - outportb(0x40, (unsigned char)(new_counter>>8)); - timer_main.clock_ticks = 0; - timer_main.counter = new_counter; - timer_main.freq = freq; - - ENABLE(); - } - - return 0; -} ENDOFUNC(pc_remove_int) - - -/* Desc: adjust timerfunc - * - * In : timerfunc id, new frequency (Hz) - * Out : 0 if success - * - * Note: might change the main timer frequency - */ -int -pc_adjust_int (int fid, unsigned int freq) -{ - int i; - - /* are we installed? */ - if (!timer_installed) { - return -1; - } - - /* sanity check */ - if ((fid < 0) || (fid >= MAX_TIMERS) || (timer_func[fid].func == NULL)) { - return -1; - } - timer_func[fid].freq = freq; - - /* scan for maximum frequency */ - freq = 0; - for (i = 0; i < MAX_TIMERS; i++) { - TIMER *t = &timer_func[i]; - if (t->func) { - if (freq < t->freq) { - freq = t->freq; - } - } - } - - /* update main timer / sons to match highest frequency */ - DISABLE(); - - /* using '>' is correct still (and avoids updating - * the HW timer too often), but doesn't relax the timer! - */ - if (freq != timer_main.freq) { - unsigned int new_counter = PIT_FREQ / freq; - - for (i = 0; i < MAX_TIMERS; i++) { - if (timer_func[i].func) { - ADJUST(timer_func[i], freq); - } - } - - outportb(0x43, 0x34); - outportb(0x40, (unsigned char)new_counter); - outportb(0x40, (unsigned char)(new_counter>>8)); - timer_main.clock_ticks = 0; - timer_main.counter = new_counter; - timer_main.freq = freq; - } else { - ADJUST(timer_func[fid], timer_main.freq); - } - - ENABLE(); - - return 0; -} ENDOFUNC(pc_adjust_int) - - -/* Desc: install timer engine - * - * In : - - * Out : 0 for success - * - * Note: initial frequency is 18.2 Hz - */ -static int -install_timer (void) -{ - if (timer_installed || pc_install_irq(TIMER_IRQ, timer)) { - return -1; - } else { - memset(timer_func, 0, sizeof(timer_func)); - - LOCKDATA(timer_func); - LOCKDATA(timer_main); - LOCKFUNC(timer); - LOCKFUNC(pc_adjust_int); - LOCKFUNC(pc_remove_int); - - timer_main.counter = 0x10000; - - DISABLE(); - outportb(0x43, 0x34); - outportb(0x40, 0); - outportb(0x40, 0); - timer_main.clock_ticks = 0; - ENABLE(); - - pc_atexit(pc_remove_timer); - timer_installed = TRUE; - return 0; - } -} - - -/* Desc: install timerfunc - * - * In : callback function, opaque pointer to be passed to callee, freq (Hz) - * Out : timerfunc id (0 .. MAX_TIMERS-1) - * - * Note: returns -1 if error - */ -int -pc_install_int (PFUNC func, void *parm, unsigned int freq) -{ - int i; - TIMER *t = NULL; - - /* ensure the timer engine is set up */ - if (!timer_installed) { - if (install_timer()) { - return -1; - } - } - - /* find an empty slot */ - for (i = 0; i < MAX_TIMERS; i++) { - if (!timer_func[i].func) { - t = &timer_func[i]; - break; - } - } - if (t == NULL) { - return -1; - } - - DISABLE(); - - t->func = func; - t->parm = parm; - t->freq = freq; - t->clock_ticks = 0; - - /* update main timer / sons to match highest frequency */ - if (freq > timer_main.freq) { - unsigned int new_counter = PIT_FREQ / freq; - - for (i = 0; i < MAX_TIMERS; i++) { - if (timer_func[i].func) { - ADJUST(timer_func[i], freq); - } - } - - outportb(0x43, 0x34); - outportb(0x40, (unsigned char)new_counter); - outportb(0x40, (unsigned char)(new_counter>>8)); - timer_main.clock_ticks = 0; - timer_main.counter = new_counter; - timer_main.freq = freq; - } else { - /* t == &timer_func[i] */ - ADJUST(timer_func[i], timer_main.freq); - } - - i = t - timer_func; - - ENABLE(); - - return i; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/bitmap.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/bitmap.c deleted file mode 100644 index 6d6b91e1c7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/bitmap.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * DOS/DJGPP Mesa Utility Toolkit - * Version: 1.0 - * - * Copyright (C) 2005 Daniel Borca All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * DANIEL BORCA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "internal.h" - - -void APIENTRY -glutBitmapCharacter (void *font, int c) -{ - const GLUTBitmapFont *bfp = _glut_font(font); - const GLUTBitmapChar *bcp; - - if (c >= bfp->num || !(bcp = bfp->table[c])) - return; - - glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); - - glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); - glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE); - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glBitmap(bcp->width, bcp->height, bcp->xorig, bcp->yorig, - bcp->xmove, 0, bcp->bitmap); - - glPopClientAttrib(); -} - - -void APIENTRY -glutBitmapString (void *font, const unsigned char *string) -{ - const GLUTBitmapFont *bfp = _glut_font(font); - const GLUTBitmapChar *bcp; - unsigned char c; - - glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); - - glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); - glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE); - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - while ((c = *(string++))) { - if (c < bfp->num && (bcp = bfp->table[c])) - glBitmap(bcp->width, bcp->height, bcp->xorig, - bcp->yorig, bcp->xmove, 0, bcp->bitmap); - } - - glPopClientAttrib(); -} - - -int APIENTRY -glutBitmapWidth (void *font, int c) -{ - const GLUTBitmapFont *bfp = _glut_font(font); - const GLUTBitmapChar *bcp; - - if (c >= bfp->num || !(bcp = bfp->table[c])) - return 0; - - return bcp->xmove; -} - - -int APIENTRY -glutBitmapLength (void *font, const unsigned char *string) -{ - const GLUTBitmapFont *bfp = _glut_font(font); - const GLUTBitmapChar *bcp; - unsigned char c; - int length = 0; - - while ((c = *(string++))) { - if (c < bfp->num && (bcp = bfp->table[c])) - length += bcp->xmove; - } - - return length; -} - - -int APIENTRY -glutBitmapHeight (void *font) -{ - const GLUTBitmapFont *bfp = _glut_font(font); - - return bfp->height; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/callback.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/callback.c deleted file mode 100644 index b6cc58feae..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/callback.c +++ /dev/null @@ -1,204 +0,0 @@ -/* - * DOS/DJGPP Mesa Utility Toolkit - * Version: 1.0 - * - * Copyright (C) 2005 Daniel Borca All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * DANIEL BORCA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "internal.h" - - -GLUTSShotCB _glut_timer_cb[MAX_TIMER_CB]; - -GLUTidleCB _glut_idle_func = NULL; - - -void APIENTRY -glutDisplayFunc (GLUTdisplayCB func) -{ - _glut_current->display = func; -} - - -void APIENTRY -glutReshapeFunc (GLUTreshapeCB func) -{ - _glut_current->reshape = func; -} - - -void APIENTRY -glutKeyboardFunc (GLUTkeyboardCB func) -{ - _glut_current->keyboard = func; -} - - -void APIENTRY -glutMouseFunc (GLUTmouseCB func) -{ - _glut_current->mouse = func; -} - - -void APIENTRY -glutMotionFunc (GLUTmotionCB func) -{ - _glut_current->motion = func; -} - - -void APIENTRY -glutPassiveMotionFunc (GLUTpassiveCB func) -{ - _glut_current->passive = func; -} - - -void APIENTRY -glutEntryFunc (GLUTentryCB func) -{ - _glut_current->entry = func; -} - - -void APIENTRY -glutVisibilityFunc (GLUTvisibilityCB func) -{ - _glut_current->visibility = func; -} - - -void APIENTRY -glutWindowStatusFunc (GLUTwindowStatusCB func) -{ - _glut_current->windowStatus = func; -} - - -void APIENTRY -glutIdleFunc (GLUTidleCB func) -{ - _glut_idle_func = func; -} - - -void APIENTRY -glutTimerFunc (unsigned int millis, GLUTtimerCB func, int value) -{ - int i; - - if (millis > 0) { - for (i = 0; i < MAX_TIMER_CB; i++) { - GLUTSShotCB *cb = &_glut_timer_cb[i]; - if (cb->func == NULL) { - cb->value = value; - cb->func = func; - cb->time = glutGet(GLUT_ELAPSED_TIME) + millis; - break; - } - } - } -} - - -void APIENTRY -glutSpecialFunc (GLUTspecialCB func) -{ - _glut_current->special = func; -} - - -void APIENTRY -glutSpaceballMotionFunc (GLUTspaceMotionCB func) -{ - _glut_current->spaceMotion = func; -} - - -void APIENTRY -glutSpaceballRotateFunc (GLUTspaceRotateCB func) -{ - _glut_current->spaceRotate = func; -} - - -void APIENTRY -glutSpaceballButtonFunc (GLUTspaceButtonCB func) -{ - _glut_current->spaceButton = func; -} - - -void APIENTRY -glutDialsFunc (GLUTdialsCB func) -{ - _glut_current->dials = func; -} - - -void APIENTRY -glutButtonBoxFunc (GLUTbuttonBoxCB func) -{ - _glut_current->buttonBox = func; -} - - -void APIENTRY -glutTabletMotionFunc (GLUTtabletMotionCB func) -{ - _glut_current->tabletMotion = func; -} - - -void APIENTRY -glutTabletButtonFunc (GLUTtabletButtonCB func) -{ - _glut_current->tabletButton = func; -} - - -void APIENTRY -glutJoystickFunc (GLUTjoystickCB func, int interval) -{ - _glut_current->joystick = func; -} - - -void APIENTRY -glutKeyboardUpFunc (GLUTkeyboardCB func) -{ - _glut_current->keyboardUp = func; -} - - -void APIENTRY -glutSpecialUpFunc (GLUTspecialCB func) -{ - _glut_current->specialUp = func; -} - - -void APIENTRY -glutMouseWheelFunc (GLUTmouseWheelCB func) -{ - _glut_current->mouseWheel = func; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/color.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/color.c deleted file mode 100644 index 5ffc1209a2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/color.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * DOS/DJGPP Mesa Utility Toolkit - * Version: 1.0 - * - * Copyright (C) 2005 Daniel Borca All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * DANIEL BORCA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "internal.h" - - -#define CLAMP(i) ((i) > 1.0F ? 1.0F : ((i) < 0.0F ? 0.0F : (i))) - - -void APIENTRY -glutSetColor (int ndx, GLfloat red, GLfloat green, GLfloat blue) -{ - if (_glut_default.mode & GLUT_INDEX) { - if ((ndx >= 0) && (ndx < (256 - RESERVED_COLORS))) { - DMesaSetCI(ndx, CLAMP(red), CLAMP(green), CLAMP(blue)); - } - } -} - - -GLfloat APIENTRY -glutGetColor (int ndx, int component) -{ - return 0.0; -} - - -void APIENTRY -glutCopyColormap (int win) -{ -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/extens.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/extens.c deleted file mode 100644 index 8bb867264e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/extens.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * DOS/DJGPP Mesa Utility Toolkit - * Version: 1.0 - * - * Copyright (C) 2005 Daniel Borca All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * DANIEL BORCA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include - -#include "internal.h" - - -int APIENTRY -glutExtensionSupported (const char *extension) -{ - static const GLubyte *extensions = NULL; - const GLubyte *last, *where; - - /* Extension names should not have spaces. */ - if (strchr(extension, ' ') || *extension == '\0') { - return GL_FALSE; - } - - /* Not my problem if you don't have a valid OpenGL context */ - if (!extensions) { - extensions = glGetString(GL_EXTENSIONS); - } - if (!extensions) { - return GL_FALSE; - } - - /* Take care of sub-strings etc. */ - for (last = extensions;;) { - if ((where = (GLubyte *)strstr((const char *)last, extension)) == NULL) { - return GL_FALSE; - } - last = where + strlen(extension); - if (where == extensions || *(where - 1) == ' ') { - if (*last == ' ' || *last == '\0') { - return GL_TRUE; - } - } - } -} - - -GLUTproc APIENTRY -glutGetProcAddress (const char *procName) -{ - /* TODO - handle glut namespace */ - return (GLUTproc)DMesaGetProcAddress(procName); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/f8x13.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/f8x13.c deleted file mode 100644 index bbf58b52b1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/f8x13.c +++ /dev/null @@ -1,1183 +0,0 @@ -/* autogenerated by bdf2c! do not edit */ - -/* "Public domain font. Share and enjoy." */ - - -#include "internal.h" -/* -typedef struct { - int width, height; - int xorig, yorig; - int xmove; - const unsigned char *bitmap; -} GLUTBitmapChar; - -typedef struct { - const char *name; - int height; - int num; - const GLUTBitmapChar *const *table; -} GLUTBitmapFont; -*/ - - -static const unsigned char ch0data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch0 = { 8, 13, 0, 2, 8, ch0data }; - -static const unsigned char ch1data[] = { - 0x0,0x0,0x0,0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch1 = { 8, 13, 0, 2, 8, ch1data }; - -static const unsigned char ch2data[] = { - 0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x0 -}; -static const GLUTBitmapChar ch2 = { 8, 13, 0, 2, 8, ch2data }; - -static const unsigned char ch3data[] = { - 0x8,0x8,0x8,0x3e,0x88,0x88,0xf8,0x88,0x88,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch3 = { 8, 13, 0, 2, 8, ch3data }; - -static const unsigned char ch4data[] = { - 0x10,0x10,0x1c,0x10,0x9e,0x80,0xe0,0x80,0xf0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch4 = { 8, 13, 0, 2, 8, ch4data }; - -static const unsigned char ch5data[] = { - 0x22,0x22,0x3c,0x22,0x3c,0x78,0x80,0x80,0x78,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch5 = { 8, 13, 0, 2, 8, ch5data }; - -static const unsigned char ch6data[] = { - 0x20,0x20,0x3c,0x20,0x3e,0xf8,0x80,0x80,0x80,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch6 = { 8, 13, 0, 2, 8, ch6data }; - -static const unsigned char ch7data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38,0x44,0x44,0x38,0x0,0x0 -}; -static const GLUTBitmapChar ch7 = { 8, 13, 0, 2, 8, ch7data }; - -static const unsigned char ch8data[] = { - 0x0,0x0,0xfe,0x10,0x10,0xfe,0x10,0x10,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch8 = { 8, 13, 0, 2, 8, ch8data }; - -static const unsigned char ch9data[] = { - 0x3e,0x20,0x20,0x20,0x88,0x98,0xa8,0xc8,0x88,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch9 = { 8, 13, 0, 2, 8, ch9data }; - -static const unsigned char ch10data[] = { - 0x8,0x8,0x8,0x8,0x3e,0x20,0x50,0x88,0x88,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch10 = { 8, 13, 0, 2, 8, ch10data }; - -static const unsigned char ch11data[] = { - 0x0,0x0,0x0,0x0,0x0,0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10 -}; -static const GLUTBitmapChar ch11 = { 8, 13, 0, 2, 8, ch11data }; - -static const unsigned char ch12data[] = { - 0x10,0x10,0x10,0x10,0x10,0xf0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch12 = { 8, 13, 0, 2, 8, ch12data }; - -static const unsigned char ch13data[] = { - 0x10,0x10,0x10,0x10,0x10,0x1f,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch13 = { 8, 13, 0, 2, 8, ch13data }; - -static const unsigned char ch14data[] = { - 0x0,0x0,0x0,0x0,0x0,0x1f,0x10,0x10,0x10,0x10,0x10,0x10,0x10 -}; -static const GLUTBitmapChar ch14 = { 8, 13, 0, 2, 8, ch14data }; - -static const unsigned char ch15data[] = { - 0x10,0x10,0x10,0x10,0x10,0xff,0x10,0x10,0x10,0x10,0x10,0x10,0x10 -}; -static const GLUTBitmapChar ch15 = { 8, 13, 0, 2, 8, ch15data }; - -static const unsigned char ch16data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch16 = { 8, 13, 0, 2, 8, ch16data }; - -static const unsigned char ch17data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch17 = { 8, 13, 0, 2, 8, ch17data }; - -static const unsigned char ch18data[] = { - 0x0,0x0,0x0,0x0,0x0,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch18 = { 8, 13, 0, 2, 8, ch18data }; - -static const unsigned char ch19data[] = { - 0x0,0x0,0x0,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch19 = { 8, 13, 0, 2, 8, ch19data }; - -static const unsigned char ch20data[] = { - 0x0,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch20 = { 8, 13, 0, 2, 8, ch20data }; - -static const unsigned char ch21data[] = { - 0x10,0x10,0x10,0x10,0x10,0x1f,0x10,0x10,0x10,0x10,0x10,0x10,0x10 -}; -static const GLUTBitmapChar ch21 = { 8, 13, 0, 2, 8, ch21data }; - -static const unsigned char ch22data[] = { - 0x10,0x10,0x10,0x10,0x10,0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10 -}; -static const GLUTBitmapChar ch22 = { 8, 13, 0, 2, 8, ch22data }; - -static const unsigned char ch23data[] = { - 0x0,0x0,0x0,0x0,0x0,0xff,0x10,0x10,0x10,0x10,0x10,0x10,0x10 -}; -static const GLUTBitmapChar ch23 = { 8, 13, 0, 2, 8, ch23data }; - -static const unsigned char ch24data[] = { - 0x10,0x10,0x10,0x10,0x10,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch24 = { 8, 13, 0, 2, 8, ch24data }; - -static const unsigned char ch25data[] = { - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10 -}; -static const GLUTBitmapChar ch25 = { 8, 13, 0, 2, 8, ch25data }; - -static const unsigned char ch26data[] = { - 0x0,0x0,0xfe,0x2,0x8,0x20,0x80,0x20,0x8,0x2,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch26 = { 8, 13, 0, 2, 8, ch26data }; - -static const unsigned char ch27data[] = { - 0x0,0x0,0xfe,0x80,0x20,0x8,0x2,0x8,0x20,0x80,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch27 = { 8, 13, 0, 2, 8, ch27data }; - -static const unsigned char ch28data[] = { - 0x0,0x0,0x44,0x24,0x24,0x24,0x24,0x7e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch28 = { 8, 13, 0, 2, 8, ch28data }; - -static const unsigned char ch29data[] = { - 0x0,0x0,0x80,0x40,0xfe,0x10,0xfe,0x4,0x2,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch29 = { 8, 13, 0, 2, 8, ch29data }; - -static const unsigned char ch30data[] = { - 0x0,0x0,0xdc,0x62,0x20,0x20,0x20,0x70,0x20,0x22,0x1c,0x0,0x0 -}; -static const GLUTBitmapChar ch30 = { 8, 13, 0, 2, 8, ch30data }; - -static const unsigned char ch31data[] = { - 0x0,0x0,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch31 = { 8, 13, 0, 2, 8, ch31data }; - -static const unsigned char ch32data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch32 = { 8, 13, 0, 2, 8, ch32data }; - -static const unsigned char ch33data[] = { - 0x0,0x0,0x10,0x0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x0,0x0 -}; -static const GLUTBitmapChar ch33 = { 8, 13, 0, 2, 8, ch33data }; - -static const unsigned char ch34data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x24,0x24,0x24,0x0,0x0 -}; -static const GLUTBitmapChar ch34 = { 8, 13, 0, 2, 8, ch34data }; - -static const unsigned char ch35data[] = { - 0x0,0x0,0x0,0x24,0x24,0x7e,0x24,0x7e,0x24,0x24,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch35 = { 8, 13, 0, 2, 8, ch35data }; - -static const unsigned char ch36data[] = { - 0x0,0x0,0x0,0x10,0x78,0x14,0x38,0x50,0x3c,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch36 = { 8, 13, 0, 2, 8, ch36data }; - -static const unsigned char ch37data[] = { - 0x0,0x0,0x44,0x2a,0x24,0x10,0x8,0x8,0x24,0x52,0x22,0x0,0x0 -}; -static const GLUTBitmapChar ch37 = { 8, 13, 0, 2, 8, ch37data }; - -static const unsigned char ch38data[] = { - 0x0,0x0,0x3a,0x44,0x4a,0x30,0x48,0x48,0x30,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch38 = { 8, 13, 0, 2, 8, ch38data }; - -static const unsigned char ch39data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x30,0x38,0x0,0x0 -}; -static const GLUTBitmapChar ch39 = { 8, 13, 0, 2, 8, ch39data }; - -static const unsigned char ch40data[] = { - 0x0,0x0,0x4,0x8,0x8,0x10,0x10,0x10,0x8,0x8,0x4,0x0,0x0 -}; -static const GLUTBitmapChar ch40 = { 8, 13, 0, 2, 8, ch40data }; - -static const unsigned char ch41data[] = { - 0x0,0x0,0x20,0x10,0x10,0x8,0x8,0x8,0x10,0x10,0x20,0x0,0x0 -}; -static const GLUTBitmapChar ch41 = { 8, 13, 0, 2, 8, ch41data }; - -static const unsigned char ch42data[] = { - 0x0,0x0,0x0,0x0,0x24,0x18,0x7e,0x18,0x24,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch42 = { 8, 13, 0, 2, 8, ch42data }; - -static const unsigned char ch43data[] = { - 0x0,0x0,0x0,0x0,0x10,0x10,0x7c,0x10,0x10,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch43 = { 8, 13, 0, 2, 8, ch43data }; - -static const unsigned char ch44data[] = { - 0x0,0x40,0x30,0x38,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch44 = { 8, 13, 0, 2, 8, ch44data }; - -static const unsigned char ch45data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7e,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch45 = { 8, 13, 0, 2, 8, ch45data }; - -static const unsigned char ch46data[] = { - 0x0,0x10,0x38,0x10,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch46 = { 8, 13, 0, 2, 8, ch46data }; - -static const unsigned char ch47data[] = { - 0x0,0x0,0x80,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0x2,0x0,0x0 -}; -static const GLUTBitmapChar ch47 = { 8, 13, 0, 2, 8, ch47data }; - -static const unsigned char ch48data[] = { - 0x0,0x0,0x18,0x24,0x42,0x42,0x42,0x42,0x42,0x24,0x18,0x0,0x0 -}; -static const GLUTBitmapChar ch48 = { 8, 13, 0, 2, 8, ch48data }; - -static const unsigned char ch49data[] = { - 0x0,0x0,0x7c,0x10,0x10,0x10,0x10,0x10,0x50,0x30,0x10,0x0,0x0 -}; -static const GLUTBitmapChar ch49 = { 8, 13, 0, 2, 8, ch49data }; - -static const unsigned char ch50data[] = { - 0x0,0x0,0x7e,0x40,0x20,0x18,0x4,0x2,0x42,0x42,0x3c,0x0,0x0 -}; -static const GLUTBitmapChar ch50 = { 8, 13, 0, 2, 8, ch50data }; - -static const unsigned char ch51data[] = { - 0x0,0x0,0x3c,0x42,0x2,0x2,0x1c,0x8,0x4,0x2,0x7e,0x0,0x0 -}; -static const GLUTBitmapChar ch51 = { 8, 13, 0, 2, 8, ch51data }; - -static const unsigned char ch52data[] = { - 0x0,0x0,0x4,0x4,0x7e,0x44,0x44,0x24,0x14,0xc,0x4,0x0,0x0 -}; -static const GLUTBitmapChar ch52 = { 8, 13, 0, 2, 8, ch52data }; - -static const unsigned char ch53data[] = { - 0x0,0x0,0x3c,0x42,0x2,0x2,0x62,0x5c,0x40,0x40,0x7e,0x0,0x0 -}; -static const GLUTBitmapChar ch53 = { 8, 13, 0, 2, 8, ch53data }; - -static const unsigned char ch54data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x62,0x5c,0x40,0x40,0x20,0x1c,0x0,0x0 -}; -static const GLUTBitmapChar ch54 = { 8, 13, 0, 2, 8, ch54data }; - -static const unsigned char ch55data[] = { - 0x0,0x0,0x20,0x20,0x10,0x10,0x8,0x8,0x4,0x2,0x7e,0x0,0x0 -}; -static const GLUTBitmapChar ch55 = { 8, 13, 0, 2, 8, ch55data }; - -static const unsigned char ch56data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x42,0x3c,0x42,0x42,0x42,0x3c,0x0,0x0 -}; -static const GLUTBitmapChar ch56 = { 8, 13, 0, 2, 8, ch56data }; - -static const unsigned char ch57data[] = { - 0x0,0x0,0x38,0x4,0x2,0x2,0x3a,0x46,0x42,0x42,0x3c,0x0,0x0 -}; -static const GLUTBitmapChar ch57 = { 8, 13, 0, 2, 8, ch57data }; - -static const unsigned char ch58data[] = { - 0x0,0x10,0x38,0x10,0x0,0x0,0x10,0x38,0x10,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch58 = { 8, 13, 0, 2, 8, ch58data }; - -static const unsigned char ch59data[] = { - 0x0,0x40,0x30,0x38,0x0,0x0,0x10,0x38,0x10,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch59 = { 8, 13, 0, 2, 8, ch59data }; - -static const unsigned char ch60data[] = { - 0x0,0x0,0x2,0x4,0x8,0x10,0x20,0x10,0x8,0x4,0x2,0x0,0x0 -}; -static const GLUTBitmapChar ch60 = { 8, 13, 0, 2, 8, ch60data }; - -static const unsigned char ch61data[] = { - 0x0,0x0,0x0,0x0,0x7e,0x0,0x0,0x7e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch61 = { 8, 13, 0, 2, 8, ch61data }; - -static const unsigned char ch62data[] = { - 0x0,0x0,0x40,0x20,0x10,0x8,0x4,0x8,0x10,0x20,0x40,0x0,0x0 -}; -static const GLUTBitmapChar ch62 = { 8, 13, 0, 2, 8, ch62data }; - -static const unsigned char ch63data[] = { - 0x0,0x0,0x8,0x0,0x8,0x8,0x4,0x2,0x42,0x42,0x3c,0x0,0x0 -}; -static const GLUTBitmapChar ch63 = { 8, 13, 0, 2, 8, ch63data }; - -static const unsigned char ch64data[] = { - 0x0,0x0,0x3c,0x40,0x4a,0x56,0x52,0x4e,0x42,0x42,0x3c,0x0,0x0 -}; -static const GLUTBitmapChar ch64 = { 8, 13, 0, 2, 8, ch64data }; - -static const unsigned char ch65data[] = { - 0x0,0x0,0x42,0x42,0x42,0x7e,0x42,0x42,0x42,0x24,0x18,0x0,0x0 -}; -static const GLUTBitmapChar ch65 = { 8, 13, 0, 2, 8, ch65data }; - -static const unsigned char ch66data[] = { - 0x0,0x0,0xfc,0x42,0x42,0x42,0x7c,0x42,0x42,0x42,0xfc,0x0,0x0 -}; -static const GLUTBitmapChar ch66 = { 8, 13, 0, 2, 8, ch66data }; - -static const unsigned char ch67data[] = { - 0x0,0x0,0x3c,0x42,0x40,0x40,0x40,0x40,0x40,0x42,0x3c,0x0,0x0 -}; -static const GLUTBitmapChar ch67 = { 8, 13, 0, 2, 8, ch67data }; - -static const unsigned char ch68data[] = { - 0x0,0x0,0xfc,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0xfc,0x0,0x0 -}; -static const GLUTBitmapChar ch68 = { 8, 13, 0, 2, 8, ch68data }; - -static const unsigned char ch69data[] = { - 0x0,0x0,0x7e,0x40,0x40,0x40,0x78,0x40,0x40,0x40,0x7e,0x0,0x0 -}; -static const GLUTBitmapChar ch69 = { 8, 13, 0, 2, 8, ch69data }; - -static const unsigned char ch70data[] = { - 0x0,0x0,0x40,0x40,0x40,0x40,0x78,0x40,0x40,0x40,0x7e,0x0,0x0 -}; -static const GLUTBitmapChar ch70 = { 8, 13, 0, 2, 8, ch70data }; - -static const unsigned char ch71data[] = { - 0x0,0x0,0x3a,0x46,0x42,0x4e,0x40,0x40,0x40,0x42,0x3c,0x0,0x0 -}; -static const GLUTBitmapChar ch71 = { 8, 13, 0, 2, 8, ch71data }; - -static const unsigned char ch72data[] = { - 0x0,0x0,0x42,0x42,0x42,0x42,0x7e,0x42,0x42,0x42,0x42,0x0,0x0 -}; -static const GLUTBitmapChar ch72 = { 8, 13, 0, 2, 8, ch72data }; - -static const unsigned char ch73data[] = { - 0x0,0x0,0x7c,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x7c,0x0,0x0 -}; -static const GLUTBitmapChar ch73 = { 8, 13, 0, 2, 8, ch73data }; - -static const unsigned char ch74data[] = { - 0x0,0x0,0x38,0x44,0x4,0x4,0x4,0x4,0x4,0x4,0x1e,0x0,0x0 -}; -static const GLUTBitmapChar ch74 = { 8, 13, 0, 2, 8, ch74data }; - -static const unsigned char ch75data[] = { - 0x0,0x0,0x42,0x44,0x48,0x50,0x60,0x50,0x48,0x44,0x42,0x0,0x0 -}; -static const GLUTBitmapChar ch75 = { 8, 13, 0, 2, 8, ch75data }; - -static const unsigned char ch76data[] = { - 0x0,0x0,0x7e,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x0 -}; -static const GLUTBitmapChar ch76 = { 8, 13, 0, 2, 8, ch76data }; - -static const unsigned char ch77data[] = { - 0x0,0x0,0x82,0x82,0x82,0x92,0x92,0xaa,0xc6,0x82,0x82,0x0,0x0 -}; -static const GLUTBitmapChar ch77 = { 8, 13, 0, 2, 8, ch77data }; - -static const unsigned char ch78data[] = { - 0x0,0x0,0x42,0x42,0x42,0x46,0x4a,0x52,0x62,0x42,0x42,0x0,0x0 -}; -static const GLUTBitmapChar ch78 = { 8, 13, 0, 2, 8, ch78data }; - -static const unsigned char ch79data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x3c,0x0,0x0 -}; -static const GLUTBitmapChar ch79 = { 8, 13, 0, 2, 8, ch79data }; - -static const unsigned char ch80data[] = { - 0x0,0x0,0x40,0x40,0x40,0x40,0x7c,0x42,0x42,0x42,0x7c,0x0,0x0 -}; -static const GLUTBitmapChar ch80 = { 8, 13, 0, 2, 8, ch80data }; - -static const unsigned char ch81data[] = { - 0x0,0x2,0x3c,0x4a,0x52,0x42,0x42,0x42,0x42,0x42,0x3c,0x0,0x0 -}; -static const GLUTBitmapChar ch81 = { 8, 13, 0, 2, 8, ch81data }; - -static const unsigned char ch82data[] = { - 0x0,0x0,0x42,0x44,0x48,0x50,0x7c,0x42,0x42,0x42,0x7c,0x0,0x0 -}; -static const GLUTBitmapChar ch82 = { 8, 13, 0, 2, 8, ch82data }; - -static const unsigned char ch83data[] = { - 0x0,0x0,0x3c,0x42,0x2,0x2,0x3c,0x40,0x40,0x42,0x3c,0x0,0x0 -}; -static const GLUTBitmapChar ch83 = { 8, 13, 0, 2, 8, ch83data }; - -static const unsigned char ch84data[] = { - 0x0,0x0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe,0x0,0x0 -}; -static const GLUTBitmapChar ch84 = { 8, 13, 0, 2, 8, ch84data }; - -static const unsigned char ch85data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x0,0x0 -}; -static const GLUTBitmapChar ch85 = { 8, 13, 0, 2, 8, ch85data }; - -static const unsigned char ch86data[] = { - 0x0,0x0,0x10,0x28,0x28,0x28,0x44,0x44,0x44,0x82,0x82,0x0,0x0 -}; -static const GLUTBitmapChar ch86 = { 8, 13, 0, 2, 8, ch86data }; - -static const unsigned char ch87data[] = { - 0x0,0x0,0x44,0xaa,0x92,0x92,0x92,0x82,0x82,0x82,0x82,0x0,0x0 -}; -static const GLUTBitmapChar ch87 = { 8, 13, 0, 2, 8, ch87data }; - -static const unsigned char ch88data[] = { - 0x0,0x0,0x82,0x82,0x44,0x28,0x10,0x28,0x44,0x82,0x82,0x0,0x0 -}; -static const GLUTBitmapChar ch88 = { 8, 13, 0, 2, 8, ch88data }; - -static const unsigned char ch89data[] = { - 0x0,0x0,0x10,0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82,0x0,0x0 -}; -static const GLUTBitmapChar ch89 = { 8, 13, 0, 2, 8, ch89data }; - -static const unsigned char ch90data[] = { - 0x0,0x0,0x7e,0x40,0x40,0x20,0x10,0x8,0x4,0x2,0x7e,0x0,0x0 -}; -static const GLUTBitmapChar ch90 = { 8, 13, 0, 2, 8, ch90data }; - -static const unsigned char ch91data[] = { - 0x0,0x0,0x3c,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x0,0x0 -}; -static const GLUTBitmapChar ch91 = { 8, 13, 0, 2, 8, ch91data }; - -static const unsigned char ch92data[] = { - 0x0,0x0,0x2,0x2,0x4,0x8,0x10,0x20,0x40,0x80,0x80,0x0,0x0 -}; -static const GLUTBitmapChar ch92 = { 8, 13, 0, 2, 8, ch92data }; - -static const unsigned char ch93data[] = { - 0x0,0x0,0x78,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x78,0x0,0x0 -}; -static const GLUTBitmapChar ch93 = { 8, 13, 0, 2, 8, ch93data }; - -static const unsigned char ch94data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x44,0x28,0x10,0x0,0x0 -}; -static const GLUTBitmapChar ch94 = { 8, 13, 0, 2, 8, ch94data }; - -static const unsigned char ch95data[] = { - 0x0,0xfe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch95 = { 8, 13, 0, 2, 8, ch95data }; - -static const unsigned char ch96data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x18,0x38,0x0,0x0 -}; -static const GLUTBitmapChar ch96 = { 8, 13, 0, 2, 8, ch96data }; - -static const unsigned char ch97data[] = { - 0x0,0x0,0x3a,0x46,0x42,0x3e,0x2,0x3c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch97 = { 8, 13, 0, 2, 8, ch97data }; - -static const unsigned char ch98data[] = { - 0x0,0x0,0x5c,0x62,0x42,0x42,0x62,0x5c,0x40,0x40,0x40,0x0,0x0 -}; -static const GLUTBitmapChar ch98 = { 8, 13, 0, 2, 8, ch98data }; - -static const unsigned char ch99data[] = { - 0x0,0x0,0x3c,0x42,0x40,0x40,0x42,0x3c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch99 = { 8, 13, 0, 2, 8, ch99data }; - -static const unsigned char ch100data[] = { - 0x0,0x0,0x3a,0x46,0x42,0x42,0x46,0x3a,0x2,0x2,0x2,0x0,0x0 -}; -static const GLUTBitmapChar ch100 = { 8, 13, 0, 2, 8, ch100data }; - -static const unsigned char ch101data[] = { - 0x0,0x0,0x3c,0x42,0x40,0x7e,0x42,0x3c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch101 = { 8, 13, 0, 2, 8, ch101data }; - -static const unsigned char ch102data[] = { - 0x0,0x0,0x20,0x20,0x20,0x20,0x7c,0x20,0x20,0x22,0x1c,0x0,0x0 -}; -static const GLUTBitmapChar ch102 = { 8, 13, 0, 2, 8, ch102data }; - -static const unsigned char ch103data[] = { - 0x3c,0x42,0x3c,0x40,0x38,0x44,0x44,0x3a,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch103 = { 8, 13, 0, 2, 8, ch103data }; - -static const unsigned char ch104data[] = { - 0x0,0x0,0x42,0x42,0x42,0x42,0x62,0x5c,0x40,0x40,0x40,0x0,0x0 -}; -static const GLUTBitmapChar ch104 = { 8, 13, 0, 2, 8, ch104data }; - -static const unsigned char ch105data[] = { - 0x0,0x0,0x7c,0x10,0x10,0x10,0x10,0x30,0x0,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch105 = { 8, 13, 0, 2, 8, ch105data }; - -static const unsigned char ch106data[] = { - 0x38,0x44,0x44,0x4,0x4,0x4,0x4,0xc,0x0,0x4,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch106 = { 8, 13, 0, 2, 8, ch106data }; - -static const unsigned char ch107data[] = { - 0x0,0x0,0x42,0x44,0x48,0x70,0x48,0x44,0x40,0x40,0x40,0x0,0x0 -}; -static const GLUTBitmapChar ch107 = { 8, 13, 0, 2, 8, ch107data }; - -static const unsigned char ch108data[] = { - 0x0,0x0,0x7c,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x30,0x0,0x0 -}; -static const GLUTBitmapChar ch108 = { 8, 13, 0, 2, 8, ch108data }; - -static const unsigned char ch109data[] = { - 0x0,0x0,0x82,0x92,0x92,0x92,0x92,0xec,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch109 = { 8, 13, 0, 2, 8, ch109data }; - -static const unsigned char ch110data[] = { - 0x0,0x0,0x42,0x42,0x42,0x42,0x62,0x5c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch110 = { 8, 13, 0, 2, 8, ch110data }; - -static const unsigned char ch111data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x42,0x42,0x3c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch111 = { 8, 13, 0, 2, 8, ch111data }; - -static const unsigned char ch112data[] = { - 0x40,0x40,0x40,0x5c,0x62,0x42,0x62,0x5c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch112 = { 8, 13, 0, 2, 8, ch112data }; - -static const unsigned char ch113data[] = { - 0x2,0x2,0x2,0x3a,0x46,0x42,0x46,0x3a,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch113 = { 8, 13, 0, 2, 8, ch113data }; - -static const unsigned char ch114data[] = { - 0x0,0x0,0x20,0x20,0x20,0x20,0x22,0x5c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch114 = { 8, 13, 0, 2, 8, ch114data }; - -static const unsigned char ch115data[] = { - 0x0,0x0,0x3c,0x42,0xc,0x30,0x42,0x3c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch115 = { 8, 13, 0, 2, 8, ch115data }; - -static const unsigned char ch116data[] = { - 0x0,0x0,0x1c,0x22,0x20,0x20,0x20,0x7c,0x20,0x20,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch116 = { 8, 13, 0, 2, 8, ch116data }; - -static const unsigned char ch117data[] = { - 0x0,0x0,0x3a,0x44,0x44,0x44,0x44,0x44,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch117 = { 8, 13, 0, 2, 8, ch117data }; - -static const unsigned char ch118data[] = { - 0x0,0x0,0x10,0x28,0x28,0x44,0x44,0x44,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch118 = { 8, 13, 0, 2, 8, ch118data }; - -static const unsigned char ch119data[] = { - 0x0,0x0,0x44,0xaa,0x92,0x92,0x82,0x82,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch119 = { 8, 13, 0, 2, 8, ch119data }; - -static const unsigned char ch120data[] = { - 0x0,0x0,0x42,0x24,0x18,0x18,0x24,0x42,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch120 = { 8, 13, 0, 2, 8, ch120data }; - -static const unsigned char ch121data[] = { - 0x3c,0x42,0x2,0x3a,0x46,0x42,0x42,0x42,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch121 = { 8, 13, 0, 2, 8, ch121data }; - -static const unsigned char ch122data[] = { - 0x0,0x0,0x7e,0x20,0x10,0x8,0x4,0x7e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch122 = { 8, 13, 0, 2, 8, ch122data }; - -static const unsigned char ch123data[] = { - 0x0,0x0,0xe,0x10,0x10,0x8,0x30,0x8,0x10,0x10,0xe,0x0,0x0 -}; -static const GLUTBitmapChar ch123 = { 8, 13, 0, 2, 8, ch123data }; - -static const unsigned char ch124data[] = { - 0x0,0x0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x0,0x0 -}; -static const GLUTBitmapChar ch124 = { 8, 13, 0, 2, 8, ch124data }; - -static const unsigned char ch125data[] = { - 0x0,0x0,0x70,0x8,0x8,0x10,0xc,0x10,0x8,0x8,0x70,0x0,0x0 -}; -static const GLUTBitmapChar ch125 = { 8, 13, 0, 2, 8, ch125data }; - -static const unsigned char ch126data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x48,0x54,0x24,0x0,0x0 -}; -static const GLUTBitmapChar ch126 = { 8, 13, 0, 2, 8, ch126data }; - -static const unsigned char ch127data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch127 = { 8, 13, 0, 2, 8, ch127data }; - -static const unsigned char ch160data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch160 = { 8, 13, 0, 2, 8, ch160data }; - -static const unsigned char ch161data[] = { - 0x0,0x0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x0,0x10,0x0,0x0 -}; -static const GLUTBitmapChar ch161 = { 8, 13, 0, 2, 8, ch161data }; - -static const unsigned char ch162data[] = { - 0x0,0x0,0x0,0x10,0x38,0x54,0x50,0x50,0x54,0x38,0x10,0x0,0x0 -}; -static const GLUTBitmapChar ch162 = { 8, 13, 0, 2, 8, ch162data }; - -static const unsigned char ch163data[] = { - 0x0,0x0,0xdc,0x62,0x20,0x20,0x20,0x70,0x20,0x22,0x1c,0x0,0x0 -}; -static const GLUTBitmapChar ch163 = { 8, 13, 0, 2, 8, ch163data }; - -static const unsigned char ch164data[] = { - 0x0,0x0,0x0,0x42,0x3c,0x24,0x24,0x3c,0x42,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch164 = { 8, 13, 0, 2, 8, ch164data }; - -static const unsigned char ch165data[] = { - 0x0,0x0,0x10,0x10,0x7c,0x10,0x7c,0x28,0x44,0x82,0x82,0x0,0x0 -}; -static const GLUTBitmapChar ch165 = { 8, 13, 0, 2, 8, ch165data }; - -static const unsigned char ch166data[] = { - 0x0,0x0,0x10,0x10,0x10,0x10,0x0,0x10,0x10,0x10,0x10,0x0,0x0 -}; -static const GLUTBitmapChar ch166 = { 8, 13, 0, 2, 8, ch166data }; - -static const unsigned char ch167data[] = { - 0x0,0x0,0x18,0x24,0x4,0x18,0x24,0x24,0x18,0x20,0x24,0x18,0x0 -}; -static const GLUTBitmapChar ch167 = { 8, 13, 0, 2, 8, ch167data }; - -static const unsigned char ch168data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6c,0x0,0x0 -}; -static const GLUTBitmapChar ch168 = { 8, 13, 0, 2, 8, ch168data }; - -static const unsigned char ch169data[] = { - 0x0,0x0,0x0,0x38,0x44,0x92,0xaa,0xa2,0xaa,0x92,0x44,0x38,0x0 -}; -static const GLUTBitmapChar ch169 = { 8, 13, 0, 2, 8, ch169data }; - -static const unsigned char ch170data[] = { - 0x0,0x0,0x0,0x0,0x7c,0x0,0x3c,0x44,0x3c,0x4,0x38,0x0,0x0 -}; -static const GLUTBitmapChar ch170 = { 8, 13, 0, 2, 8, ch170data }; - -static const unsigned char ch171data[] = { - 0x0,0x0,0x0,0x12,0x24,0x48,0x90,0x48,0x24,0x12,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch171 = { 8, 13, 0, 2, 8, ch171data }; - -static const unsigned char ch172data[] = { - 0x0,0x0,0x0,0x2,0x2,0x2,0x7e,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch172 = { 8, 13, 0, 2, 8, ch172data }; - -static const unsigned char ch173data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7e,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch173 = { 8, 13, 0, 2, 8, ch173data }; - -static const unsigned char ch174data[] = { - 0x0,0x0,0x0,0x38,0x44,0xaa,0xb2,0xaa,0xaa,0x92,0x44,0x38,0x0 -}; -static const GLUTBitmapChar ch174 = { 8, 13, 0, 2, 8, ch174data }; - -static const unsigned char ch175data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7e,0x0,0x0 -}; -static const GLUTBitmapChar ch175 = { 8, 13, 0, 2, 8, ch175data }; - -static const unsigned char ch176data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18,0x24,0x24,0x18,0x0,0x0 -}; -static const GLUTBitmapChar ch176 = { 8, 13, 0, 2, 8, ch176data }; - -static const unsigned char ch177data[] = { - 0x0,0x0,0x0,0x7c,0x0,0x10,0x10,0x7c,0x10,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch177 = { 8, 13, 0, 2, 8, ch177data }; - -static const unsigned char ch178data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x78,0x40,0x30,0x8,0x48,0x30,0x0 -}; -static const GLUTBitmapChar ch178 = { 8, 13, 0, 2, 8, ch178data }; - -static const unsigned char ch179data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x30,0x48,0x8,0x10,0x48,0x30,0x0 -}; -static const GLUTBitmapChar ch179 = { 8, 13, 0, 2, 8, ch179data }; - -static const unsigned char ch180data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10,0x8,0x0 -}; -static const GLUTBitmapChar ch180 = { 8, 13, 0, 2, 8, ch180data }; - -static const unsigned char ch181data[] = { - 0x0,0x40,0x5a,0x66,0x42,0x42,0x42,0x42,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch181 = { 8, 13, 0, 2, 8, ch181data }; - -static const unsigned char ch182data[] = { - 0x0,0x0,0x14,0x14,0x14,0x14,0x34,0x74,0x74,0x74,0x3e,0x0,0x0 -}; -static const GLUTBitmapChar ch182 = { 8, 13, 0, 2, 8, ch182data }; - -static const unsigned char ch183data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch183 = { 8, 13, 0, 2, 8, ch183data }; - -static const unsigned char ch184data[] = { - 0x18,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch184 = { 8, 13, 0, 2, 8, ch184data }; - -static const unsigned char ch185data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x70,0x20,0x20,0x20,0x60,0x20,0x0 -}; -static const GLUTBitmapChar ch185 = { 8, 13, 0, 2, 8, ch185data }; - -static const unsigned char ch186data[] = { - 0x0,0x0,0x0,0x0,0x0,0x78,0x0,0x30,0x48,0x48,0x30,0x0,0x0 -}; -static const GLUTBitmapChar ch186 = { 8, 13, 0, 2, 8, ch186data }; - -static const unsigned char ch187data[] = { - 0x0,0x0,0x0,0x90,0x48,0x24,0x12,0x24,0x48,0x90,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch187 = { 8, 13, 0, 2, 8, ch187data }; - -static const unsigned char ch188data[] = { - 0x0,0x0,0x6,0x1a,0x12,0xa,0xe6,0x42,0x40,0x40,0xc0,0x40,0x0 -}; -static const GLUTBitmapChar ch188 = { 8, 13, 0, 2, 8, ch188data }; - -static const unsigned char ch189data[] = { - 0x0,0x0,0x1e,0x10,0xc,0x2,0xf2,0x4c,0x40,0x40,0xc0,0x40,0x0 -}; -static const GLUTBitmapChar ch189 = { 8, 13, 0, 2, 8, ch189data }; - -static const unsigned char ch190data[] = { - 0x0,0x0,0x6,0x1a,0x12,0xa,0x66,0x92,0x10,0x20,0x90,0x60,0x0 -}; -static const GLUTBitmapChar ch190 = { 8, 13, 0, 2, 8, ch190data }; - -static const unsigned char ch191data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x40,0x20,0x10,0x10,0x0,0x10,0x0,0x0 -}; -static const GLUTBitmapChar ch191 = { 8, 13, 0, 2, 8, ch191data }; - -static const unsigned char ch192data[] = { - 0x0,0x0,0x42,0x42,0x7e,0x42,0x42,0x24,0x18,0x0,0x8,0x10,0x0 -}; -static const GLUTBitmapChar ch192 = { 8, 13, 0, 2, 8, ch192data }; - -static const unsigned char ch193data[] = { - 0x0,0x0,0x42,0x42,0x7e,0x42,0x42,0x24,0x18,0x0,0x10,0x8,0x0 -}; -static const GLUTBitmapChar ch193 = { 8, 13, 0, 2, 8, ch193data }; - -static const unsigned char ch194data[] = { - 0x0,0x0,0x42,0x42,0x7e,0x42,0x42,0x24,0x18,0x0,0x24,0x18,0x0 -}; -static const GLUTBitmapChar ch194 = { 8, 13, 0, 2, 8, ch194data }; - -static const unsigned char ch195data[] = { - 0x0,0x0,0x42,0x42,0x7e,0x42,0x42,0x24,0x18,0x0,0x28,0x14,0x0 -}; -static const GLUTBitmapChar ch195 = { 8, 13, 0, 2, 8, ch195data }; - -static const unsigned char ch196data[] = { - 0x0,0x0,0x42,0x42,0x7e,0x42,0x42,0x24,0x18,0x0,0x24,0x24,0x0 -}; -static const GLUTBitmapChar ch196 = { 8, 13, 0, 2, 8, ch196data }; - -static const unsigned char ch197data[] = { - 0x0,0x0,0x42,0x42,0x7e,0x42,0x42,0x24,0x18,0x18,0x24,0x18,0x0 -}; -static const GLUTBitmapChar ch197 = { 8, 13, 0, 2, 8, ch197data }; - -static const unsigned char ch198data[] = { - 0x0,0x0,0x9e,0x90,0x90,0xf0,0x9c,0x90,0x90,0x90,0x6e,0x0,0x0 -}; -static const GLUTBitmapChar ch198 = { 8, 13, 0, 2, 8, ch198data }; - -static const unsigned char ch199data[] = { - 0x10,0x8,0x3c,0x42,0x40,0x40,0x40,0x40,0x40,0x42,0x3c,0x0,0x0 -}; -static const GLUTBitmapChar ch199 = { 8, 13, 0, 2, 8, ch199data }; - -static const unsigned char ch200data[] = { - 0x0,0x0,0x7e,0x40,0x40,0x78,0x40,0x40,0x7e,0x0,0x8,0x10,0x0 -}; -static const GLUTBitmapChar ch200 = { 8, 13, 0, 2, 8, ch200data }; - -static const unsigned char ch201data[] = { - 0x0,0x0,0x7e,0x40,0x40,0x78,0x40,0x40,0x7e,0x0,0x10,0x8,0x0 -}; -static const GLUTBitmapChar ch201 = { 8, 13, 0, 2, 8, ch201data }; - -static const unsigned char ch202data[] = { - 0x0,0x0,0x7e,0x40,0x40,0x78,0x40,0x40,0x7e,0x0,0x24,0x18,0x0 -}; -static const GLUTBitmapChar ch202 = { 8, 13, 0, 2, 8, ch202data }; - -static const unsigned char ch203data[] = { - 0x0,0x0,0x7e,0x40,0x40,0x78,0x40,0x40,0x7e,0x0,0x24,0x24,0x0 -}; -static const GLUTBitmapChar ch203 = { 8, 13, 0, 2, 8, ch203data }; - -static const unsigned char ch204data[] = { - 0x0,0x0,0x7c,0x10,0x10,0x10,0x10,0x10,0x7c,0x0,0x8,0x10,0x0 -}; -static const GLUTBitmapChar ch204 = { 8, 13, 0, 2, 8, ch204data }; - -static const unsigned char ch205data[] = { - 0x0,0x0,0x7c,0x10,0x10,0x10,0x10,0x10,0x7c,0x0,0x10,0x8,0x0 -}; -static const GLUTBitmapChar ch205 = { 8, 13, 0, 2, 8, ch205data }; - -static const unsigned char ch206data[] = { - 0x0,0x0,0x7c,0x10,0x10,0x10,0x10,0x10,0x7c,0x0,0x24,0x18,0x0 -}; -static const GLUTBitmapChar ch206 = { 8, 13, 0, 2, 8, ch206data }; - -static const unsigned char ch207data[] = { - 0x0,0x0,0x7c,0x10,0x10,0x10,0x10,0x10,0x7c,0x0,0x28,0x28,0x0 -}; -static const GLUTBitmapChar ch207 = { 8, 13, 0, 2, 8, ch207data }; - -static const unsigned char ch208data[] = { - 0x0,0x0,0xfc,0x42,0x42,0x42,0xe2,0x42,0x42,0x42,0xfc,0x0,0x0 -}; -static const GLUTBitmapChar ch208 = { 8, 13, 0, 2, 8, ch208data }; - -static const unsigned char ch209data[] = { - 0x0,0x0,0x82,0x86,0x8a,0x92,0xa2,0xc2,0x82,0x0,0x28,0x14,0x0 -}; -static const GLUTBitmapChar ch209 = { 8, 13, 0, 2, 8, ch209data }; - -static const unsigned char ch210data[] = { - 0x0,0x0,0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x8,0x10,0x0 -}; -static const GLUTBitmapChar ch210 = { 8, 13, 0, 2, 8, ch210data }; - -static const unsigned char ch211data[] = { - 0x0,0x0,0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x10,0x8,0x0 -}; -static const GLUTBitmapChar ch211 = { 8, 13, 0, 2, 8, ch211data }; - -static const unsigned char ch212data[] = { - 0x0,0x0,0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x24,0x18,0x0 -}; -static const GLUTBitmapChar ch212 = { 8, 13, 0, 2, 8, ch212data }; - -static const unsigned char ch213data[] = { - 0x0,0x0,0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x14,0x0 -}; -static const GLUTBitmapChar ch213 = { 8, 13, 0, 2, 8, ch213data }; - -static const unsigned char ch214data[] = { - 0x0,0x0,0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x28,0x0 -}; -static const GLUTBitmapChar ch214 = { 8, 13, 0, 2, 8, ch214data }; - -static const unsigned char ch215data[] = { - 0x0,0x0,0x0,0x42,0x24,0x18,0x18,0x24,0x42,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch215 = { 8, 13, 0, 2, 8, ch215data }; - -static const unsigned char ch216data[] = { - 0x0,0x40,0x3c,0x62,0x52,0x52,0x52,0x4a,0x4a,0x46,0x3c,0x2,0x0 -}; -static const GLUTBitmapChar ch216 = { 8, 13, 0, 2, 8, ch216data }; - -static const unsigned char ch217data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x42,0x42,0x42,0x42,0x0,0x8,0x10,0x0 -}; -static const GLUTBitmapChar ch217 = { 8, 13, 0, 2, 8, ch217data }; - -static const unsigned char ch218data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x42,0x42,0x42,0x42,0x0,0x10,0x8,0x0 -}; -static const GLUTBitmapChar ch218 = { 8, 13, 0, 2, 8, ch218data }; - -static const unsigned char ch219data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x42,0x42,0x42,0x42,0x0,0x24,0x18,0x0 -}; -static const GLUTBitmapChar ch219 = { 8, 13, 0, 2, 8, ch219data }; - -static const unsigned char ch220data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x42,0x42,0x42,0x42,0x0,0x24,0x24,0x0 -}; -static const GLUTBitmapChar ch220 = { 8, 13, 0, 2, 8, ch220data }; - -static const unsigned char ch221data[] = { - 0x0,0x0,0x10,0x10,0x10,0x10,0x28,0x44,0x44,0x0,0x10,0x8,0x0 -}; -static const GLUTBitmapChar ch221 = { 8, 13, 0, 2, 8, ch221data }; - -static const unsigned char ch222data[] = { - 0x0,0x0,0x40,0x40,0x40,0x7c,0x42,0x42,0x42,0x7c,0x40,0x0,0x0 -}; -static const GLUTBitmapChar ch222 = { 8, 13, 0, 2, 8, ch222data }; - -static const unsigned char ch223data[] = { - 0x0,0x40,0x5c,0x62,0x42,0x42,0x7c,0x42,0x42,0x3c,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch223 = { 8, 13, 0, 2, 8, ch223data }; - -static const unsigned char ch224data[] = { - 0x0,0x0,0x3a,0x46,0x42,0x3e,0x2,0x3c,0x0,0x0,0x8,0x10,0x0 -}; -static const GLUTBitmapChar ch224 = { 8, 13, 0, 2, 8, ch224data }; - -static const unsigned char ch225data[] = { - 0x0,0x0,0x3a,0x46,0x42,0x3e,0x2,0x3c,0x0,0x0,0x10,0x8,0x0 -}; -static const GLUTBitmapChar ch225 = { 8, 13, 0, 2, 8, ch225data }; - -static const unsigned char ch226data[] = { - 0x0,0x0,0x3a,0x46,0x42,0x3e,0x2,0x3c,0x0,0x0,0x24,0x18,0x0 -}; -static const GLUTBitmapChar ch226 = { 8, 13, 0, 2, 8, ch226data }; - -static const unsigned char ch227data[] = { - 0x0,0x0,0x3a,0x46,0x42,0x3e,0x2,0x3c,0x0,0x0,0x28,0x14,0x0 -}; -static const GLUTBitmapChar ch227 = { 8, 13, 0, 2, 8, ch227data }; - -static const unsigned char ch228data[] = { - 0x0,0x0,0x3a,0x46,0x42,0x3e,0x2,0x3c,0x0,0x0,0x24,0x24,0x0 -}; -static const GLUTBitmapChar ch228 = { 8, 13, 0, 2, 8, ch228data }; - -static const unsigned char ch229data[] = { - 0x0,0x0,0x3a,0x46,0x42,0x3e,0x2,0x3c,0x0,0x18,0x24,0x18,0x0 -}; -static const GLUTBitmapChar ch229 = { 8, 13, 0, 2, 8, ch229data }; - -static const unsigned char ch230data[] = { - 0x0,0x0,0x6c,0x92,0x90,0x7c,0x12,0x6c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch230 = { 8, 13, 0, 2, 8, ch230data }; - -static const unsigned char ch231data[] = { - 0x10,0x8,0x3c,0x42,0x40,0x40,0x42,0x3c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch231 = { 8, 13, 0, 2, 8, ch231data }; - -static const unsigned char ch232data[] = { - 0x0,0x0,0x3c,0x42,0x40,0x7e,0x42,0x3c,0x0,0x0,0x8,0x10,0x0 -}; -static const GLUTBitmapChar ch232 = { 8, 13, 0, 2, 8, ch232data }; - -static const unsigned char ch233data[] = { - 0x0,0x0,0x3c,0x42,0x40,0x7e,0x42,0x3c,0x0,0x0,0x10,0x8,0x0 -}; -static const GLUTBitmapChar ch233 = { 8, 13, 0, 2, 8, ch233data }; - -static const unsigned char ch234data[] = { - 0x0,0x0,0x3c,0x42,0x40,0x7e,0x42,0x3c,0x0,0x0,0x24,0x18,0x0 -}; -static const GLUTBitmapChar ch234 = { 8, 13, 0, 2, 8, ch234data }; - -static const unsigned char ch235data[] = { - 0x0,0x0,0x3c,0x42,0x40,0x7e,0x42,0x3c,0x0,0x0,0x24,0x24,0x0 -}; -static const GLUTBitmapChar ch235 = { 8, 13, 0, 2, 8, ch235data }; - -static const unsigned char ch236data[] = { - 0x0,0x0,0x7c,0x10,0x10,0x10,0x10,0x30,0x0,0x0,0x10,0x20,0x0 -}; -static const GLUTBitmapChar ch236 = { 8, 13, 0, 2, 8, ch236data }; - -static const unsigned char ch237data[] = { - 0x0,0x0,0x7c,0x10,0x10,0x10,0x10,0x30,0x0,0x0,0x20,0x10,0x0 -}; -static const GLUTBitmapChar ch237 = { 8, 13, 0, 2, 8, ch237data }; - -static const unsigned char ch238data[] = { - 0x0,0x0,0x7c,0x10,0x10,0x10,0x10,0x30,0x0,0x0,0x48,0x30,0x0 -}; -static const GLUTBitmapChar ch238 = { 8, 13, 0, 2, 8, ch238data }; - -static const unsigned char ch239data[] = { - 0x0,0x0,0x7c,0x10,0x10,0x10,0x10,0x30,0x0,0x0,0x28,0x28,0x0 -}; -static const GLUTBitmapChar ch239 = { 8, 13, 0, 2, 8, ch239data }; - -static const unsigned char ch240data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x42,0x42,0x3c,0x4,0x28,0x18,0x24,0x0 -}; -static const GLUTBitmapChar ch240 = { 8, 13, 0, 2, 8, ch240data }; - -static const unsigned char ch241data[] = { - 0x0,0x0,0x42,0x42,0x42,0x42,0x62,0x5c,0x0,0x0,0x28,0x14,0x0 -}; -static const GLUTBitmapChar ch241 = { 8, 13, 0, 2, 8, ch241data }; - -static const unsigned char ch242data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x42,0x42,0x3c,0x0,0x0,0x8,0x10,0x0 -}; -static const GLUTBitmapChar ch242 = { 8, 13, 0, 2, 8, ch242data }; - -static const unsigned char ch243data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x42,0x42,0x3c,0x0,0x0,0x10,0x8,0x0 -}; -static const GLUTBitmapChar ch243 = { 8, 13, 0, 2, 8, ch243data }; - -static const unsigned char ch244data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x42,0x42,0x3c,0x0,0x0,0x24,0x18,0x0 -}; -static const GLUTBitmapChar ch244 = { 8, 13, 0, 2, 8, ch244data }; - -static const unsigned char ch245data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x42,0x42,0x3c,0x0,0x0,0x28,0x14,0x0 -}; -static const GLUTBitmapChar ch245 = { 8, 13, 0, 2, 8, ch245data }; - -static const unsigned char ch246data[] = { - 0x0,0x0,0x3c,0x42,0x42,0x42,0x42,0x3c,0x0,0x0,0x24,0x24,0x0 -}; -static const GLUTBitmapChar ch246 = { 8, 13, 0, 2, 8, ch246data }; - -static const unsigned char ch247data[] = { - 0x0,0x0,0x0,0x10,0x10,0x0,0x7c,0x0,0x10,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch247 = { 8, 13, 0, 2, 8, ch247data }; - -static const unsigned char ch248data[] = { - 0x0,0x40,0x3c,0x62,0x52,0x4a,0x46,0x3c,0x2,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch248 = { 8, 13, 0, 2, 8, ch248data }; - -static const unsigned char ch249data[] = { - 0x0,0x0,0x3a,0x44,0x44,0x44,0x44,0x44,0x0,0x0,0x8,0x10,0x0 -}; -static const GLUTBitmapChar ch249 = { 8, 13, 0, 2, 8, ch249data }; - -static const unsigned char ch250data[] = { - 0x0,0x0,0x3a,0x44,0x44,0x44,0x44,0x44,0x0,0x0,0x10,0x8,0x0 -}; -static const GLUTBitmapChar ch250 = { 8, 13, 0, 2, 8, ch250data }; - -static const unsigned char ch251data[] = { - 0x0,0x0,0x3a,0x44,0x44,0x44,0x44,0x44,0x0,0x0,0x24,0x18,0x0 -}; -static const GLUTBitmapChar ch251 = { 8, 13, 0, 2, 8, ch251data }; - -static const unsigned char ch252data[] = { - 0x0,0x0,0x3a,0x44,0x44,0x44,0x44,0x44,0x0,0x0,0x24,0x24,0x0 -}; -static const GLUTBitmapChar ch252 = { 8, 13, 0, 2, 8, ch252data }; - -static const unsigned char ch253data[] = { - 0x3c,0x42,0x2,0x3a,0x46,0x42,0x42,0x42,0x0,0x0,0x10,0x8,0x0 -}; -static const GLUTBitmapChar ch253 = { 8, 13, 0, 2, 8, ch253data }; - -static const unsigned char ch254data[] = { - 0x40,0x40,0x5c,0x62,0x42,0x42,0x62,0x5c,0x40,0x40,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch254 = { 8, 13, 0, 2, 8, ch254data }; - -static const unsigned char ch255data[] = { - 0x3c,0x42,0x2,0x3a,0x46,0x42,0x42,0x42,0x0,0x0,0x24,0x24,0x0 -}; -static const GLUTBitmapChar ch255 = { 8, 13, 0, 2, 8, ch255data }; - - -static const GLUTBitmapChar *chars[] = { - &ch0, &ch1, &ch2, &ch3, &ch4, &ch5, &ch6, &ch7, - &ch8, &ch9, &ch10, &ch11, &ch12, &ch13, &ch14, &ch15, - &ch16, &ch17, &ch18, &ch19, &ch20, &ch21, &ch22, &ch23, - &ch24, &ch25, &ch26, &ch27, &ch28, &ch29, &ch30, &ch31, - &ch32, &ch33, &ch34, &ch35, &ch36, &ch37, &ch38, &ch39, - &ch40, &ch41, &ch42, &ch43, &ch44, &ch45, &ch46, &ch47, - &ch48, &ch49, &ch50, &ch51, &ch52, &ch53, &ch54, &ch55, - &ch56, &ch57, &ch58, &ch59, &ch60, &ch61, &ch62, &ch63, - &ch64, &ch65, &ch66, &ch67, &ch68, &ch69, &ch70, &ch71, - &ch72, &ch73, &ch74, &ch75, &ch76, &ch77, &ch78, &ch79, - &ch80, &ch81, &ch82, &ch83, &ch84, &ch85, &ch86, &ch87, - &ch88, &ch89, &ch90, &ch91, &ch92, &ch93, &ch94, &ch95, - &ch96, &ch97, &ch98, &ch99, &ch100, &ch101, &ch102, &ch103, - &ch104, &ch105, &ch106, &ch107, &ch108, &ch109, &ch110, &ch111, - &ch112, &ch113, &ch114, &ch115, &ch116, &ch117, &ch118, &ch119, - &ch120, &ch121, &ch122, &ch123, &ch124, &ch125, &ch126, &ch127, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - &ch160, &ch161, &ch162, &ch163, &ch164, &ch165, &ch166, &ch167, - &ch168, &ch169, &ch170, &ch171, &ch172, &ch173, &ch174, &ch175, - &ch176, &ch177, &ch178, &ch179, &ch180, &ch181, &ch182, &ch183, - &ch184, &ch185, &ch186, &ch187, &ch188, &ch189, &ch190, &ch191, - &ch192, &ch193, &ch194, &ch195, &ch196, &ch197, &ch198, &ch199, - &ch200, &ch201, &ch202, &ch203, &ch204, &ch205, &ch206, &ch207, - &ch208, &ch209, &ch210, &ch211, &ch212, &ch213, &ch214, &ch215, - &ch216, &ch217, &ch218, &ch219, &ch220, &ch221, &ch222, &ch223, - &ch224, &ch225, &ch226, &ch227, &ch228, &ch229, &ch230, &ch231, - &ch232, &ch233, &ch234, &ch235, &ch236, &ch237, &ch238, &ch239, - &ch240, &ch241, &ch242, &ch243, &ch244, &ch245, &ch246, &ch247, - &ch248, &ch249, &ch250, &ch251, &ch252, &ch253, &ch254, &ch255 -}; - -const GLUTBitmapFont glutBitmap8By13 = { - "-Misc-Fixed-Medium-R-Normal--13-120-75-75-C-80-ISO8859-1", - 13, 256, chars -}; diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/f9x15.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/f9x15.c deleted file mode 100644 index 0e7cd6da51..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/f9x15.c +++ /dev/null @@ -1,1407 +0,0 @@ -/* autogenerated by bdf2c! do not edit */ - -/* "Public domain terminal emulator font. Share and enjoy." */ - - -#include "internal.h" -/* -typedef struct { - int width, height; - int xorig, yorig; - int xmove; - const unsigned char *bitmap; -} GLUTBitmapChar; - -typedef struct { - const char *name; - int height; - int num; - const GLUTBitmapChar *const *table; -} GLUTBitmapFont; -*/ - - -static const unsigned char ch0data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch0 = { 9, 15, 0, 3, 9, ch0data }; - -static const unsigned char ch1data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x1c,0x0,0x3e,0x0,0x7f,0x0,0x3e,0x0, - 0x1c,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch1 = { 9, 15, 0, 3, 9, ch1data }; - -static const unsigned char ch2data[] = { - 0x55,0x0,0xaa,0x0,0x55,0x0,0xaa,0x0,0x55,0x0,0xaa,0x0,0x55,0x0,0xaa,0x0, - 0x55,0x0,0xaa,0x0,0x55,0x0,0xaa,0x0,0x55,0x0,0xaa,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch2 = { 9, 15, 0, 3, 9, ch2data }; - -static const unsigned char ch3data[] = { - 0x0,0x0,0x4,0x0,0x4,0x0,0x4,0x0,0x1f,0x0,0x0,0x0,0x44,0x0,0x44,0x0, - 0x7c,0x0,0x44,0x0,0x44,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch3 = { 9, 15, 0, 3, 9, ch3data }; - -static const unsigned char ch4data[] = { - 0x0,0x0,0x8,0x0,0x8,0x0,0xe,0x0,0x8,0x0,0xf,0x0,0x40,0x0,0x40,0x0, - 0x70,0x0,0x40,0x0,0x78,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch4 = { 9, 15, 0, 3, 9, ch4data }; - -static const unsigned char ch5data[] = { - 0x0,0x0,0x11,0x0,0x11,0x0,0x1e,0x0,0x11,0x0,0x1e,0x0,0x0,0x0,0x3c,0x0, - 0x40,0x0,0x40,0x0,0x3c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch5 = { 9, 15, 0, 3, 9, ch5data }; - -static const unsigned char ch6data[] = { - 0x0,0x0,0x10,0x0,0x10,0x0,0x1e,0x0,0x10,0x0,0x1f,0x0,0x0,0x0,0x7c,0x0, - 0x40,0x0,0x40,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch6 = { 9, 15, 0, 3, 9, ch6data }; - -static const unsigned char ch7data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x1c,0x0,0x22,0x0,0x22,0x0,0x1c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch7 = { 9, 15, 0, 3, 9, ch7data }; - -static const unsigned char ch8data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0x0,0x8,0x0,0x8,0x0,0x7f,0x0,0x8,0x0, - 0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch8 = { 9, 15, 0, 3, 9, ch8data }; - -static const unsigned char ch9data[] = { - 0x0,0x0,0x1f,0x0,0x10,0x0,0x10,0x0,0x10,0x0,0x10,0x0,0x44,0x0,0x4c,0x0, - 0x54,0x0,0x64,0x0,0x44,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch9 = { 9, 15, 0, 3, 9, ch9data }; - -static const unsigned char ch10data[] = { - 0x0,0x0,0x4,0x0,0x4,0x0,0x4,0x0,0x4,0x0,0x1f,0x0,0x0,0x0,0x10,0x0, - 0x28,0x0,0x44,0x0,0x44,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch10 = { 9, 15, 0, 3, 9, ch10data }; - -static const unsigned char ch11data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf8,0x0,0x8,0x0, - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0 -}; -static const GLUTBitmapChar ch11 = { 9, 15, 0, 3, 9, ch11data }; - -static const unsigned char ch12data[] = { - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xf8,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch12 = { 9, 15, 0, 3, 9, ch12data }; - -static const unsigned char ch13data[] = { - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xf,0x80,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch13 = { 9, 15, 0, 3, 9, ch13data }; - -static const unsigned char ch14data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf,0x80,0x8,0x0, - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0 -}; -static const GLUTBitmapChar ch14 = { 9, 15, 0, 3, 9, ch14data }; - -static const unsigned char ch15data[] = { - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xff,0x80,0x8,0x0, - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0 -}; -static const GLUTBitmapChar ch15 = { 9, 15, 0, 3, 9, ch15data }; - -static const unsigned char ch16data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0xff,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch16 = { 9, 15, 0, 3, 9, ch16data }; - -static const unsigned char ch17data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0xff,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch17 = { 9, 15, 0, 3, 9, ch17data }; - -static const unsigned char ch18data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff,0x80,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch18 = { 9, 15, 0, 3, 9, ch18data }; - -static const unsigned char ch19data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff,0x80,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch19 = { 9, 15, 0, 3, 9, ch19data }; - -static const unsigned char ch20data[] = { - 0x0,0x0,0x0,0x0,0xff,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch20 = { 9, 15, 0, 3, 9, ch20data }; - -static const unsigned char ch21data[] = { - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xf,0x80,0x8,0x0, - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0 -}; -static const GLUTBitmapChar ch21 = { 9, 15, 0, 3, 9, ch21data }; - -static const unsigned char ch22data[] = { - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xf8,0x0,0x8,0x0, - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0 -}; -static const GLUTBitmapChar ch22 = { 9, 15, 0, 3, 9, ch22data }; - -static const unsigned char ch23data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff,0x80,0x8,0x0, - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0 -}; -static const GLUTBitmapChar ch23 = { 9, 15, 0, 3, 9, ch23data }; - -static const unsigned char ch24data[] = { - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xff,0x80,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch24 = { 9, 15, 0, 3, 9, ch24data }; - -static const unsigned char ch25data[] = { - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0 -}; -static const GLUTBitmapChar ch25 = { 9, 15, 0, 3, 9, ch25data }; - -static const unsigned char ch26data[] = { - 0x0,0x0,0x3f,0x0,0x0,0x0,0x1,0x0,0x2,0x0,0x4,0x0,0x8,0x0,0x10,0x0, - 0x10,0x0,0x8,0x0,0x4,0x0,0x2,0x0,0x1,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch26 = { 9, 15, 0, 3, 9, ch26data }; - -static const unsigned char ch27data[] = { - 0x0,0x0,0x7f,0x0,0x0,0x0,0x40,0x0,0x20,0x0,0x10,0x0,0x8,0x0,0x4,0x0, - 0x4,0x0,0x8,0x0,0x10,0x0,0x20,0x0,0x40,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch27 = { 9, 15, 0, 3, 9, ch27data }; - -static const unsigned char ch28data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x22,0x0,0x12,0x0,0x12,0x0,0x12,0x0,0x12,0x0, - 0x12,0x0,0x7f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch28 = { 9, 15, 0, 3, 9, ch28data }; - -static const unsigned char ch29data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x20,0x0,0x7f,0x0,0x8,0x0,0x7f,0x0, - 0x2,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch29 = { 9, 15, 0, 3, 9, ch29data }; - -static const unsigned char ch30data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x2e,0x0,0x51,0x0,0x30,0x0,0x10,0x0,0x10,0x0, - 0x7c,0x0,0x10,0x0,0x10,0x0,0x11,0x0,0xe,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch30 = { 9, 15, 0, 3, 9, ch30data }; - -static const unsigned char ch31data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc,0x0,0xc,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch31 = { 9, 15, 0, 3, 9, ch31data }; - -static const unsigned char ch32data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch32 = { 9, 15, 0, 3, 9, ch32data }; - -static const unsigned char ch33data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x8,0x0, - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch33 = { 9, 15, 0, 3, 9, ch33data }; - -static const unsigned char ch34data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x12,0x0,0x12,0x0,0x12,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch34 = { 9, 15, 0, 3, 9, ch34data }; - -static const unsigned char ch35data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x24,0x0,0x24,0x0,0x7e,0x0,0x24,0x0, - 0x24,0x0,0x7e,0x0,0x24,0x0,0x24,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch35 = { 9, 15, 0, 3, 9, ch35data }; - -static const unsigned char ch36data[] = { - 0x0,0x0,0x0,0x0,0x8,0x0,0x3e,0x0,0x49,0x0,0x9,0x0,0x9,0x0,0xa,0x0, - 0x1c,0x0,0x28,0x0,0x48,0x0,0x49,0x0,0x3e,0x0,0x8,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch36 = { 9, 15, 0, 3, 9, ch36data }; - -static const unsigned char ch37data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x42,0x0,0x25,0x0,0x25,0x0,0x12,0x0,0x8,0x0, - 0x8,0x0,0x24,0x0,0x52,0x0,0x52,0x0,0x21,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch37 = { 9, 15, 0, 3, 9, ch37data }; - -static const unsigned char ch38data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x31,0x0,0x4a,0x0,0x44,0x0,0x4a,0x0,0x31,0x0, - 0x30,0x0,0x48,0x0,0x48,0x0,0x48,0x0,0x30,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch38 = { 9, 15, 0, 3, 9, ch38data }; - -static const unsigned char ch39data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x10,0x0,0x8,0x0,0x4,0x0,0x6,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch39 = { 9, 15, 0, 3, 9, ch39data }; - -static const unsigned char ch40data[] = { - 0x0,0x0,0x0,0x0,0x4,0x0,0x8,0x0,0x8,0x0,0x10,0x0,0x10,0x0,0x10,0x0, - 0x10,0x0,0x10,0x0,0x10,0x0,0x8,0x0,0x8,0x0,0x4,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch40 = { 9, 15, 0, 3, 9, ch40data }; - -static const unsigned char ch41data[] = { - 0x0,0x0,0x0,0x0,0x10,0x0,0x8,0x0,0x8,0x0,0x4,0x0,0x4,0x0,0x4,0x0, - 0x4,0x0,0x4,0x0,0x4,0x0,0x8,0x0,0x8,0x0,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch41 = { 9, 15, 0, 3, 9, ch41data }; - -static const unsigned char ch42data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x49,0x0,0x2a,0x0,0x1c,0x0, - 0x2a,0x0,0x49,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch42 = { 9, 15, 0, 3, 9, ch42data }; - -static const unsigned char ch43data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x7f,0x0, - 0x8,0x0,0x8,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch43 = { 9, 15, 0, 3, 9, ch43data }; - -static const unsigned char ch44data[] = { - 0x8,0x0,0x4,0x0,0x4,0x0,0xc,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch44 = { 9, 15, 0, 3, 9, ch44data }; - -static const unsigned char ch45data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch45 = { 9, 15, 0, 3, 9, ch45data }; - -static const unsigned char ch46data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0xc,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch46 = { 9, 15, 0, 3, 9, ch46data }; - -static const unsigned char ch47data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x20,0x0,0x20,0x0,0x10,0x0,0x8,0x0, - 0x8,0x0,0x4,0x0,0x2,0x0,0x2,0x0,0x1,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch47 = { 9, 15, 0, 3, 9, ch47data }; - -static const unsigned char ch48data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x0,0x22,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x41,0x0,0x22,0x0,0x1c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch48 = { 9, 15, 0, 3, 9, ch48data }; - -static const unsigned char ch49data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x48,0x0,0x28,0x0,0x18,0x0,0x8,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch49 = { 9, 15, 0, 3, 9, ch49data }; - -static const unsigned char ch50data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0x0,0x40,0x0,0x20,0x0,0x18,0x0,0x4,0x0, - 0x2,0x0,0x1,0x0,0x41,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch50 = { 9, 15, 0, 3, 9, ch50data }; - -static const unsigned char ch51data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x1,0x0,0x1,0x0,0x1,0x0, - 0xe,0x0,0x4,0x0,0x2,0x0,0x1,0x0,0x7f,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch51 = { 9, 15, 0, 3, 9, ch51data }; - -static const unsigned char ch52data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x2,0x0,0x2,0x0,0x7f,0x0,0x42,0x0, - 0x22,0x0,0x12,0x0,0xa,0x0,0x6,0x0,0x2,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch52 = { 9, 15, 0, 3, 9, ch52data }; - -static const unsigned char ch53data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x1,0x0,0x1,0x0,0x1,0x0, - 0x61,0x0,0x5e,0x0,0x40,0x0,0x40,0x0,0x7f,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch53 = { 9, 15, 0, 3, 9, ch53data }; - -static const unsigned char ch54data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x61,0x0, - 0x5e,0x0,0x40,0x0,0x40,0x0,0x20,0x0,0x1e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch54 = { 9, 15, 0, 3, 9, ch54data }; - -static const unsigned char ch55data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x20,0x0,0x10,0x0,0x10,0x0,0x8,0x0, - 0x4,0x0,0x2,0x0,0x1,0x0,0x1,0x0,0x7f,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch55 = { 9, 15, 0, 3, 9, ch55data }; - -static const unsigned char ch56data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x0,0x22,0x0,0x41,0x0,0x41,0x0,0x22,0x0, - 0x1c,0x0,0x22,0x0,0x41,0x0,0x22,0x0,0x1c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch56 = { 9, 15, 0, 3, 9, ch56data }; - -static const unsigned char ch57data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3c,0x0,0x2,0x0,0x1,0x0,0x1,0x0,0x3d,0x0, - 0x43,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch57 = { 9, 15, 0, 3, 9, ch57data }; - -static const unsigned char ch58data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0xc,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0xc,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch58 = { 9, 15, 0, 3, 9, ch58data }; - -static const unsigned char ch59data[] = { - 0x8,0x0,0x4,0x0,0x4,0x0,0xc,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0xc,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch59 = { 9, 15, 0, 3, 9, ch59data }; - -static const unsigned char ch60data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x4,0x0,0x8,0x0,0x10,0x0,0x20,0x0, - 0x20,0x0,0x10,0x0,0x8,0x0,0x4,0x0,0x2,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch60 = { 9, 15, 0, 3, 9, ch60data }; - -static const unsigned char ch61data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0x0,0x0,0x0,0x0,0x0, - 0x7f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch61 = { 9, 15, 0, 3, 9, ch61data }; - -static const unsigned char ch62data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x10,0x0,0x8,0x0,0x4,0x0,0x2,0x0, - 0x2,0x0,0x4,0x0,0x8,0x0,0x10,0x0,0x20,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch62 = { 9, 15, 0, 3, 9, ch62data }; - -static const unsigned char ch63data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x0,0x8,0x0,0x4,0x0, - 0x2,0x0,0x1,0x0,0x41,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch63 = { 9, 15, 0, 3, 9, ch63data }; - -static const unsigned char ch64data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x40,0x0,0x40,0x0,0x4d,0x0,0x53,0x0, - 0x51,0x0,0x4f,0x0,0x41,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch64 = { 9, 15, 0, 3, 9, ch64data }; - -static const unsigned char ch65data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x7f,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x22,0x0,0x14,0x0,0x8,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch65 = { 9, 15, 0, 3, 9, ch65data }; - -static const unsigned char ch66data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7e,0x0,0x21,0x0,0x21,0x0,0x21,0x0,0x21,0x0, - 0x3e,0x0,0x21,0x0,0x21,0x0,0x21,0x0,0x7e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch66 = { 9, 15, 0, 3, 9, ch66data }; - -static const unsigned char ch67data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x40,0x0,0x40,0x0,0x40,0x0, - 0x40,0x0,0x40,0x0,0x40,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch67 = { 9, 15, 0, 3, 9, ch67data }; - -static const unsigned char ch68data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7e,0x0,0x21,0x0,0x21,0x0,0x21,0x0,0x21,0x0, - 0x21,0x0,0x21,0x0,0x21,0x0,0x21,0x0,0x7e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch68 = { 9, 15, 0, 3, 9, ch68data }; - -static const unsigned char ch69data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0x0,0x20,0x0,0x20,0x0,0x20,0x0,0x20,0x0, - 0x3c,0x0,0x20,0x0,0x20,0x0,0x20,0x0,0x7f,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch69 = { 9, 15, 0, 3, 9, ch69data }; - -static const unsigned char ch70data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x20,0x0,0x20,0x0,0x20,0x0,0x20,0x0, - 0x3c,0x0,0x20,0x0,0x20,0x0,0x20,0x0,0x7f,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch70 = { 9, 15, 0, 3, 9, ch70data }; - -static const unsigned char ch71data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x47,0x0, - 0x40,0x0,0x40,0x0,0x40,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch71 = { 9, 15, 0, 3, 9, ch71data }; - -static const unsigned char ch72data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x7f,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch72 = { 9, 15, 0, 3, 9, ch72data }; - -static const unsigned char ch73data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x3e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch73 = { 9, 15, 0, 3, 9, ch73data }; - -static const unsigned char ch74data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3c,0x0,0x42,0x0,0x2,0x0,0x2,0x0,0x2,0x0, - 0x2,0x0,0x2,0x0,0x2,0x0,0x2,0x0,0xf,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch74 = { 9, 15, 0, 3, 9, ch74data }; - -static const unsigned char ch75data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x42,0x0,0x44,0x0,0x48,0x0,0x50,0x0, - 0x70,0x0,0x48,0x0,0x44,0x0,0x42,0x0,0x41,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch75 = { 9, 15, 0, 3, 9, ch75data }; - -static const unsigned char ch76data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0x0,0x40,0x0,0x40,0x0,0x40,0x0,0x40,0x0, - 0x40,0x0,0x40,0x0,0x40,0x0,0x40,0x0,0x40,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch76 = { 9, 15, 0, 3, 9, ch76data }; - -static const unsigned char ch77data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x49,0x0,0x49,0x0, - 0x55,0x0,0x55,0x0,0x63,0x0,0x41,0x0,0x41,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch77 = { 9, 15, 0, 3, 9, ch77data }; - -static const unsigned char ch78data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x43,0x0,0x45,0x0, - 0x49,0x0,0x51,0x0,0x61,0x0,0x41,0x0,0x41,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch78 = { 9, 15, 0, 3, 9, ch78data }; - -static const unsigned char ch79data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch79 = { 9, 15, 0, 3, 9, ch79data }; - -static const unsigned char ch80data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x40,0x0,0x40,0x0,0x40,0x0,0x40,0x0, - 0x7e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x7e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch80 = { 9, 15, 0, 3, 9, ch80data }; - -static const unsigned char ch81data[] = { - 0x0,0x0,0x3,0x0,0x4,0x0,0x3e,0x0,0x49,0x0,0x51,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch81 = { 9, 15, 0, 3, 9, ch81data }; - -static const unsigned char ch82data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x41,0x0,0x42,0x0,0x44,0x0,0x48,0x0, - 0x7e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x7e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch82 = { 9, 15, 0, 3, 9, ch82data }; - -static const unsigned char ch83data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x1,0x0,0x6,0x0, - 0x38,0x0,0x40,0x0,0x41,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch83 = { 9, 15, 0, 3, 9, ch83data }; - -static const unsigned char ch84data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x7f,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch84 = { 9, 15, 0, 3, 9, ch84data }; - -static const unsigned char ch85data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch85 = { 9, 15, 0, 3, 9, ch85data }; - -static const unsigned char ch86data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x14,0x0,0x14,0x0,0x14,0x0,0x22,0x0, - 0x22,0x0,0x22,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch86 = { 9, 15, 0, 3, 9, ch86data }; - -static const unsigned char ch87data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x22,0x0,0x55,0x0,0x49,0x0,0x49,0x0,0x49,0x0, - 0x49,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch87 = { 9, 15, 0, 3, 9, ch87data }; - -static const unsigned char ch88data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x41,0x0,0x22,0x0,0x14,0x0,0x8,0x0, - 0x8,0x0,0x14,0x0,0x22,0x0,0x41,0x0,0x41,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch88 = { 9, 15, 0, 3, 9, ch88data }; - -static const unsigned char ch89data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x14,0x0,0x22,0x0,0x41,0x0,0x41,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch89 = { 9, 15, 0, 3, 9, ch89data }; - -static const unsigned char ch90data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0x0,0x40,0x0,0x40,0x0,0x20,0x0,0x10,0x0, - 0x8,0x0,0x4,0x0,0x2,0x0,0x1,0x0,0x7f,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch90 = { 9, 15, 0, 3, 9, ch90data }; - -static const unsigned char ch91data[] = { - 0x0,0x0,0x0,0x0,0x1e,0x0,0x10,0x0,0x10,0x0,0x10,0x0,0x10,0x0,0x10,0x0, - 0x10,0x0,0x10,0x0,0x10,0x0,0x10,0x0,0x10,0x0,0x1e,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch91 = { 9, 15, 0, 3, 9, ch91data }; - -static const unsigned char ch92data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x2,0x0,0x2,0x0,0x4,0x0,0x8,0x0, - 0x8,0x0,0x10,0x0,0x20,0x0,0x20,0x0,0x40,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch92 = { 9, 15, 0, 3, 9, ch92data }; - -static const unsigned char ch93data[] = { - 0x0,0x0,0x0,0x0,0x3c,0x0,0x4,0x0,0x4,0x0,0x4,0x0,0x4,0x0,0x4,0x0, - 0x4,0x0,0x4,0x0,0x4,0x0,0x4,0x0,0x4,0x0,0x3c,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch93 = { 9, 15, 0, 3, 9, ch93data }; - -static const unsigned char ch94data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x41,0x0,0x22,0x0,0x14,0x0,0x8,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch94 = { 9, 15, 0, 3, 9, ch94data }; - -static const unsigned char ch95data[] = { - 0x0,0x0,0x0,0x0,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch95 = { 9, 15, 0, 3, 9, ch95data }; - -static const unsigned char ch96data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x2,0x0,0x4,0x0,0x8,0x0,0x18,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch96 = { 9, 15, 0, 3, 9, ch96data }; - -static const unsigned char ch97data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3d,0x0,0x43,0x0,0x41,0x0,0x3f,0x0,0x1,0x0, - 0x1,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch97 = { 9, 15, 0, 3, 9, ch97data }; - -static const unsigned char ch98data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x5e,0x0,0x61,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x61,0x0,0x5e,0x0,0x40,0x0,0x40,0x0,0x40,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch98 = { 9, 15, 0, 3, 9, ch98data }; - -static const unsigned char ch99data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x40,0x0,0x40,0x0,0x40,0x0, - 0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch99 = { 9, 15, 0, 3, 9, ch99data }; - -static const unsigned char ch100data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3d,0x0,0x43,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x43,0x0,0x3d,0x0,0x1,0x0,0x1,0x0,0x1,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch100 = { 9, 15, 0, 3, 9, ch100data }; - -static const unsigned char ch101data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x40,0x0,0x40,0x0,0x7f,0x0,0x41,0x0, - 0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch101 = { 9, 15, 0, 3, 9, ch101data }; - -static const unsigned char ch102data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x10,0x0,0x10,0x0,0x10,0x0,0x10,0x0,0x7c,0x0, - 0x10,0x0,0x10,0x0,0x11,0x0,0x11,0x0,0xe,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch102 = { 9, 15, 0, 3, 9, ch102data }; - -static const unsigned char ch103data[] = { - 0x3e,0x0,0x41,0x0,0x41,0x0,0x3e,0x0,0x40,0x0,0x3c,0x0,0x42,0x0,0x42,0x0, - 0x42,0x0,0x3d,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch103 = { 9, 15, 0, 3, 9, ch103data }; - -static const unsigned char ch104data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x61,0x0,0x5e,0x0,0x40,0x0,0x40,0x0,0x40,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch104 = { 9, 15, 0, 3, 9, ch104data }; - -static const unsigned char ch105data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x38,0x0,0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch105 = { 9, 15, 0, 3, 9, ch105data }; - -static const unsigned char ch106data[] = { - 0x3c,0x0,0x42,0x0,0x42,0x0,0x42,0x0,0x2,0x0,0x2,0x0,0x2,0x0,0x2,0x0, - 0x2,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch106 = { 9, 15, 0, 3, 9, ch106data }; - -static const unsigned char ch107data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x46,0x0,0x58,0x0,0x60,0x0,0x58,0x0, - 0x46,0x0,0x41,0x0,0x40,0x0,0x40,0x0,0x40,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch107 = { 9, 15, 0, 3, 9, ch107data }; - -static const unsigned char ch108data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x38,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch108 = { 9, 15, 0, 3, 9, ch108data }; - -static const unsigned char ch109data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x49,0x0,0x49,0x0,0x49,0x0,0x49,0x0, - 0x49,0x0,0x76,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch109 = { 9, 15, 0, 3, 9, ch109data }; - -static const unsigned char ch110data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x61,0x0,0x5e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch110 = { 9, 15, 0, 3, 9, ch110data }; - -static const unsigned char ch111data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch111 = { 9, 15, 0, 3, 9, ch111data }; - -static const unsigned char ch112data[] = { - 0x40,0x0,0x40,0x0,0x40,0x0,0x5e,0x0,0x61,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x61,0x0,0x5e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch112 = { 9, 15, 0, 3, 9, ch112data }; - -static const unsigned char ch113data[] = { - 0x1,0x0,0x1,0x0,0x1,0x0,0x3d,0x0,0x43,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x43,0x0,0x3d,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch113 = { 9, 15, 0, 3, 9, ch113data }; - -static const unsigned char ch114data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x20,0x0,0x20,0x0,0x20,0x0,0x21,0x0, - 0x31,0x0,0x4e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch114 = { 9, 15, 0, 3, 9, ch114data }; - -static const unsigned char ch115data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x1,0x0,0x3e,0x0,0x40,0x0, - 0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch115 = { 9, 15, 0, 3, 9, ch115data }; - -static const unsigned char ch116data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0xe,0x0,0x11,0x0,0x10,0x0,0x10,0x0,0x10,0x0, - 0x10,0x0,0x7e,0x0,0x10,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch116 = { 9, 15, 0, 3, 9, ch116data }; - -static const unsigned char ch117data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3d,0x0,0x42,0x0,0x42,0x0,0x42,0x0,0x42,0x0, - 0x42,0x0,0x42,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch117 = { 9, 15, 0, 3, 9, ch117data }; - -static const unsigned char ch118data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x14,0x0,0x14,0x0,0x22,0x0,0x22,0x0, - 0x41,0x0,0x41,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch118 = { 9, 15, 0, 3, 9, ch118data }; - -static const unsigned char ch119data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x22,0x0,0x55,0x0,0x49,0x0,0x49,0x0,0x49,0x0, - 0x41,0x0,0x41,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch119 = { 9, 15, 0, 3, 9, ch119data }; - -static const unsigned char ch120data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x22,0x0,0x14,0x0,0x8,0x0,0x14,0x0, - 0x22,0x0,0x41,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch120 = { 9, 15, 0, 3, 9, ch120data }; - -static const unsigned char ch121data[] = { - 0x3c,0x0,0x42,0x0,0x2,0x0,0x3a,0x0,0x46,0x0,0x42,0x0,0x42,0x0,0x42,0x0, - 0x42,0x0,0x42,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch121 = { 9, 15, 0, 3, 9, ch121data }; - -static const unsigned char ch122data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0x0,0x20,0x0,0x10,0x0,0x8,0x0,0x4,0x0, - 0x2,0x0,0x7f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch122 = { 9, 15, 0, 3, 9, ch122data }; - -static const unsigned char ch123data[] = { - 0x0,0x0,0x0,0x0,0x7,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x4,0x0,0x18,0x0, - 0x18,0x0,0x4,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x7,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch123 = { 9, 15, 0, 3, 9, ch123data }; - -static const unsigned char ch124data[] = { - 0x0,0x0,0x0,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch124 = { 9, 15, 0, 3, 9, ch124data }; - -static const unsigned char ch125data[] = { - 0x0,0x0,0x0,0x0,0x70,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x10,0x0,0xc,0x0, - 0xc,0x0,0x10,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x70,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch125 = { 9, 15, 0, 3, 9, ch125data }; - -static const unsigned char ch126data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x46,0x0,0x49,0x0,0x31,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch126 = { 9, 15, 0, 3, 9, ch126data }; - -static const unsigned char ch127data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch127 = { 9, 15, 0, 3, 9, ch127data }; - -static const unsigned char ch160data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch160 = { 9, 15, 0, 3, 9, ch160data }; - -static const unsigned char ch161data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x8,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch161 = { 9, 15, 0, 3, 9, ch161data }; - -static const unsigned char ch162data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x3c,0x0,0x52,0x0,0x50,0x0,0x48,0x0, - 0x4a,0x0,0x3c,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch162 = { 9, 15, 0, 3, 9, ch162data }; - -static const unsigned char ch163data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x2e,0x0,0x51,0x0,0x30,0x0,0x10,0x0,0x10,0x0, - 0x7c,0x0,0x10,0x0,0x10,0x0,0x11,0x0,0xe,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch163 = { 9, 15, 0, 3, 9, ch163data }; - -static const unsigned char ch164data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x3e,0x0, - 0x22,0x0,0x22,0x0,0x3e,0x0,0x41,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch164 = { 9, 15, 0, 3, 9, ch164data }; - -static const unsigned char ch165data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x3e,0x0,0x8,0x0, - 0x3e,0x0,0x14,0x0,0x22,0x0,0x41,0x0,0x41,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch165 = { 9, 15, 0, 3, 9, ch165data }; - -static const unsigned char ch166data[] = { - 0x0,0x0,0x0,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x0,0x0, - 0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch166 = { 9, 15, 0, 3, 9, ch166data }; - -static const unsigned char ch167data[] = { - 0x0,0x0,0x0,0x0,0x1c,0x0,0x22,0x0,0x2,0x0,0x1c,0x0,0x22,0x0,0x22,0x0, - 0x22,0x0,0x1c,0x0,0x20,0x0,0x22,0x0,0x1c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch167 = { 9, 15, 0, 3, 9, ch167data }; - -static const unsigned char ch168data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x14,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch168 = { 9, 15, 0, 3, 9, ch168data }; - -static const unsigned char ch169data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c,0x0,0x42,0x0,0x99,0x0,0xa5,0x0, - 0xa1,0x0,0xa5,0x0,0x99,0x0,0x42,0x0,0x3c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch169 = { 9, 15, 0, 3, 9, ch169data }; - -static const unsigned char ch170data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f,0x0,0x0,0x0, - 0xf,0x0,0x12,0x0,0xe,0x0,0x12,0x0,0xc,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch170 = { 9, 15, 0, 3, 9, ch170data }; - -static const unsigned char ch171data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x9,0x0,0x12,0x0,0x24,0x0,0x48,0x0, - 0x48,0x0,0x24,0x0,0x12,0x0,0x9,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch171 = { 9, 15, 0, 3, 9, ch171data }; - -static const unsigned char ch172data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x2,0x0,0x2,0x0, - 0x7e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch172 = { 9, 15, 0, 3, 9, ch172data }; - -static const unsigned char ch173data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7e,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch173 = { 9, 15, 0, 3, 9, ch173data }; - -static const unsigned char ch174data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c,0x0,0x42,0x0,0xa5,0x0,0xa9,0x0, - 0xbd,0x0,0xa5,0x0,0xb9,0x0,0x42,0x0,0x3c,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch174 = { 9, 15, 0, 3, 9, ch174data }; - -static const unsigned char ch175data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch175 = { 9, 15, 0, 3, 9, ch175data }; - -static const unsigned char ch176data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0xc,0x0,0x12,0x0,0x12,0x0,0xc,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch176 = { 9, 15, 0, 3, 9, ch176data }; - -static const unsigned char ch177data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0x0,0x0,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x7f,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch177 = { 9, 15, 0, 3, 9, ch177data }; - -static const unsigned char ch178data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78,0x0, - 0x40,0x0,0x30,0x0,0x8,0x0,0x48,0x0,0x30,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch178 = { 9, 15, 0, 3, 9, ch178data }; - -static const unsigned char ch179data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30,0x0, - 0x48,0x0,0x8,0x0,0x10,0x0,0x48,0x0,0x30,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch179 = { 9, 15, 0, 3, 9, ch179data }; - -static const unsigned char ch180data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18,0x0,0x4,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch180 = { 9, 15, 0, 3, 9, ch180data }; - -static const unsigned char ch181data[] = { - 0x0,0x0,0x40,0x0,0x40,0x0,0x5d,0x0,0x63,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch181 = { 9, 15, 0, 3, 9, ch181data }; - -static const unsigned char ch182data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x5,0x0,0x5,0x0,0x5,0x0,0x5,0x0,0x5,0x0, - 0x3d,0x0,0x45,0x0,0x45,0x0,0x45,0x0,0x3f,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch182 = { 9, 15, 0, 3, 9, ch182data }; - -static const unsigned char ch183data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc,0x0, - 0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch183 = { 9, 15, 0, 3, 9, ch183data }; - -static const unsigned char ch184data[] = { - 0x18,0x0,0x24,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch184 = { 9, 15, 0, 3, 9, ch184data }; - -static const unsigned char ch185data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x70,0x0, - 0x20,0x0,0x20,0x0,0x20,0x0,0x60,0x0,0x20,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch185 = { 9, 15, 0, 3, 9, ch185data }; - -static const unsigned char ch186data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x7c,0x0,0x0,0x0,0x38,0x0,0x44,0x0,0x44,0x0,0x38,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch186 = { 9, 15, 0, 3, 9, ch186data }; - -static const unsigned char ch187data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x48,0x0,0x24,0x0,0x12,0x0,0x9,0x0, - 0x9,0x0,0x12,0x0,0x24,0x0,0x48,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch187 = { 9, 15, 0, 3, 9, ch187data }; - -static const unsigned char ch188data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0xd,0x0,0x9,0x0,0x5,0x0,0x73,0x0, - 0x21,0x0,0x20,0x0,0x20,0x0,0x60,0x0,0x20,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch188 = { 9, 15, 0, 3, 9, ch188data }; - -static const unsigned char ch189data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0xf,0x0,0x8,0x0,0x6,0x0,0x1,0x0,0x79,0x0, - 0x26,0x0,0x20,0x0,0x20,0x0,0x60,0x0,0x20,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch189 = { 9, 15, 0, 3, 9, ch189data }; - -static const unsigned char ch190data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0xd,0x0,0x9,0x0,0x5,0x0,0x33,0x0, - 0x49,0x0,0x8,0x0,0x10,0x0,0x48,0x0,0x30,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch190 = { 9, 15, 0, 3, 9, ch190data }; - -static const unsigned char ch191data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x40,0x0,0x20,0x0, - 0x10,0x0,0x8,0x0,0x8,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch191 = { 9, 15, 0, 3, 9, ch191data }; - -static const unsigned char ch192data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x7f,0x0,0x41,0x0, - 0x41,0x0,0x22,0x0,0x1c,0x0,0x0,0x0,0xc,0x0,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch192 = { 9, 15, 0, 3, 9, ch192data }; - -static const unsigned char ch193data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x7f,0x0,0x41,0x0, - 0x41,0x0,0x22,0x0,0x1c,0x0,0x0,0x0,0x18,0x0,0x4,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch193 = { 9, 15, 0, 3, 9, ch193data }; - -static const unsigned char ch194data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x7f,0x0,0x41,0x0, - 0x41,0x0,0x22,0x0,0x1c,0x0,0x0,0x0,0x22,0x0,0x1c,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch194 = { 9, 15, 0, 3, 9, ch194data }; - -static const unsigned char ch195data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x7f,0x0,0x41,0x0, - 0x41,0x0,0x22,0x0,0x1c,0x0,0x0,0x0,0x28,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch195 = { 9, 15, 0, 3, 9, ch195data }; - -static const unsigned char ch196data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x7f,0x0,0x41,0x0, - 0x41,0x0,0x22,0x0,0x1c,0x0,0x0,0x0,0x14,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch196 = { 9, 15, 0, 3, 9, ch196data }; - -static const unsigned char ch197data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x7f,0x0,0x41,0x0, - 0x41,0x0,0x22,0x0,0x1c,0x0,0x8,0x0,0x14,0x0,0x8,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch197 = { 9, 15, 0, 3, 9, ch197data }; - -static const unsigned char ch198data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x4f,0x0,0x48,0x0,0x48,0x0,0x48,0x0,0x7e,0x0, - 0x48,0x0,0x48,0x0,0x48,0x0,0x48,0x0,0x37,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch198 = { 9, 15, 0, 3, 9, ch198data }; - -static const unsigned char ch199data[] = { - 0x18,0x0,0x24,0x0,0xc,0x0,0x3e,0x0,0x41,0x0,0x40,0x0,0x40,0x0,0x40,0x0, - 0x40,0x0,0x40,0x0,0x40,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch199 = { 9, 15, 0, 3, 9, ch199data }; - -static const unsigned char ch200data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0x0,0x20,0x0,0x20,0x0,0x20,0x0,0x3c,0x0, - 0x20,0x0,0x20,0x0,0x7f,0x0,0x0,0x0,0xc,0x0,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch200 = { 9, 15, 0, 3, 9, ch200data }; - -static const unsigned char ch201data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0x0,0x20,0x0,0x20,0x0,0x20,0x0,0x3c,0x0, - 0x20,0x0,0x20,0x0,0x7f,0x0,0x0,0x0,0x18,0x0,0x4,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch201 = { 9, 15, 0, 3, 9, ch201data }; - -static const unsigned char ch202data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0x0,0x20,0x0,0x20,0x0,0x20,0x0,0x3c,0x0, - 0x20,0x0,0x20,0x0,0x7f,0x0,0x0,0x0,0x22,0x0,0x1c,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch202 = { 9, 15, 0, 3, 9, ch202data }; - -static const unsigned char ch203data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0x0,0x20,0x0,0x20,0x0,0x20,0x0,0x3c,0x0, - 0x20,0x0,0x20,0x0,0x7f,0x0,0x0,0x0,0x14,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch203 = { 9, 15, 0, 3, 9, ch203data }; - -static const unsigned char ch204data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x8,0x0,0x3e,0x0,0x0,0x0,0xc,0x0,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch204 = { 9, 15, 0, 3, 9, ch204data }; - -static const unsigned char ch205data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x8,0x0,0x3e,0x0,0x0,0x0,0x18,0x0,0x4,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch205 = { 9, 15, 0, 3, 9, ch205data }; - -static const unsigned char ch206data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x8,0x0,0x3e,0x0,0x0,0x0,0x22,0x0,0x1c,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch206 = { 9, 15, 0, 3, 9, ch206data }; - -static const unsigned char ch207data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x8,0x0,0x3e,0x0,0x0,0x0,0x14,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch207 = { 9, 15, 0, 3, 9, ch207data }; - -static const unsigned char ch208data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x7e,0x0,0x21,0x0,0x21,0x0,0x21,0x0,0x21,0x0, - 0x79,0x0,0x21,0x0,0x21,0x0,0x21,0x0,0x7e,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch208 = { 9, 15, 0, 3, 9, ch208data }; - -static const unsigned char ch209data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x43,0x0,0x45,0x0,0x49,0x0,0x49,0x0, - 0x51,0x0,0x61,0x0,0x41,0x0,0x0,0x0,0x28,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch209 = { 9, 15, 0, 3, 9, ch209data }; - -static const unsigned char ch210data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0xc,0x0,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch210 = { 9, 15, 0, 3, 9, ch210data }; - -static const unsigned char ch211data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0x18,0x0,0x4,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch211 = { 9, 15, 0, 3, 9, ch211data }; - -static const unsigned char ch212data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0x22,0x0,0x1c,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch212 = { 9, 15, 0, 3, 9, ch212data }; - -static const unsigned char ch213data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0x28,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch213 = { 9, 15, 0, 3, 9, ch213data }; - -static const unsigned char ch214data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0x14,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch214 = { 9, 15, 0, 3, 9, ch214data }; - -static const unsigned char ch215data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x22,0x0,0x14,0x0,0x8,0x0, - 0x14,0x0,0x22,0x0,0x41,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch215 = { 9, 15, 0, 3, 9, ch215data }; - -static const unsigned char ch216data[] = { - 0x0,0x0,0x0,0x0,0x40,0x0,0x3e,0x0,0x61,0x0,0x51,0x0,0x51,0x0,0x49,0x0, - 0x49,0x0,0x45,0x0,0x45,0x0,0x43,0x0,0x3e,0x0,0x1,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch216 = { 9, 15, 0, 3, 9, ch216data }; - -static const unsigned char ch217data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x41,0x0,0x0,0x0,0xc,0x0,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch217 = { 9, 15, 0, 3, 9, ch217data }; - -static const unsigned char ch218data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x41,0x0,0x0,0x0,0x18,0x0,0x4,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch218 = { 9, 15, 0, 3, 9, ch218data }; - -static const unsigned char ch219data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x41,0x0,0x0,0x0,0x22,0x0,0x1c,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch219 = { 9, 15, 0, 3, 9, ch219data }; - -static const unsigned char ch220data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x41,0x0,0x0,0x0,0x14,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch220 = { 9, 15, 0, 3, 9, ch220data }; - -static const unsigned char ch221data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x14,0x0, - 0x22,0x0,0x41,0x0,0x41,0x0,0x0,0x0,0x18,0x0,0x4,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch221 = { 9, 15, 0, 3, 9, ch221data }; - -static const unsigned char ch222data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x40,0x0,0x40,0x0,0x7e,0x0,0x41,0x0, - 0x41,0x0,0x41,0x0,0x7e,0x0,0x40,0x0,0x40,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch222 = { 9, 15, 0, 3, 9, ch222data }; - -static const unsigned char ch223data[] = { - 0x0,0x0,0x0,0x0,0x40,0x0,0x5e,0x0,0x61,0x0,0x41,0x0,0x41,0x0,0x7e,0x0, - 0x41,0x0,0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch223 = { 9, 15, 0, 3, 9, ch223data }; - -static const unsigned char ch224data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3d,0x0,0x43,0x0,0x41,0x0,0x3f,0x0,0x1,0x0, - 0x1,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0xc,0x0,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch224 = { 9, 15, 0, 3, 9, ch224data }; - -static const unsigned char ch225data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3d,0x0,0x43,0x0,0x41,0x0,0x3f,0x0,0x1,0x0, - 0x1,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x18,0x0,0x4,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch225 = { 9, 15, 0, 3, 9, ch225data }; - -static const unsigned char ch226data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3d,0x0,0x43,0x0,0x41,0x0,0x3f,0x0,0x1,0x0, - 0x1,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x22,0x0,0x1c,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch226 = { 9, 15, 0, 3, 9, ch226data }; - -static const unsigned char ch227data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3d,0x0,0x43,0x0,0x41,0x0,0x3f,0x0,0x1,0x0, - 0x1,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x28,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch227 = { 9, 15, 0, 3, 9, ch227data }; - -static const unsigned char ch228data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3d,0x0,0x43,0x0,0x41,0x0,0x3f,0x0,0x1,0x0, - 0x1,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x14,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch228 = { 9, 15, 0, 3, 9, ch228data }; - -static const unsigned char ch229data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3d,0x0,0x43,0x0,0x41,0x0,0x3f,0x0,0x1,0x0, - 0x1,0x0,0x3e,0x0,0x0,0x0,0xc,0x0,0x12,0x0,0xc,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch229 = { 9, 15, 0, 3, 9, ch229data }; - -static const unsigned char ch230data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x37,0x0,0x49,0x0,0x48,0x0,0x3e,0x0,0x9,0x0, - 0x49,0x0,0x36,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch230 = { 9, 15, 0, 3, 9, ch230data }; - -static const unsigned char ch231data[] = { - 0x18,0x0,0x24,0x0,0xc,0x0,0x3e,0x0,0x41,0x0,0x40,0x0,0x40,0x0,0x40,0x0, - 0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch231 = { 9, 15, 0, 3, 9, ch231data }; - -static const unsigned char ch232data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x40,0x0,0x40,0x0,0x7f,0x0,0x41,0x0, - 0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0xc,0x0,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch232 = { 9, 15, 0, 3, 9, ch232data }; - -static const unsigned char ch233data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x40,0x0,0x40,0x0,0x7f,0x0,0x41,0x0, - 0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x18,0x0,0x4,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch233 = { 9, 15, 0, 3, 9, ch233data }; - -static const unsigned char ch234data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x40,0x0,0x40,0x0,0x7f,0x0,0x41,0x0, - 0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x22,0x0,0x1c,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch234 = { 9, 15, 0, 3, 9, ch234data }; - -static const unsigned char ch235data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x40,0x0,0x40,0x0,0x7f,0x0,0x41,0x0, - 0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x14,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch235 = { 9, 15, 0, 3, 9, ch235data }; - -static const unsigned char ch236data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x38,0x0,0x0,0x0,0x0,0x0,0xc,0x0,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch236 = { 9, 15, 0, 3, 9, ch236data }; - -static const unsigned char ch237data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x38,0x0,0x0,0x0,0x0,0x0,0x18,0x0,0x4,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch237 = { 9, 15, 0, 3, 9, ch237data }; - -static const unsigned char ch238data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x38,0x0,0x0,0x0,0x0,0x0,0x24,0x0,0x18,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch238 = { 9, 15, 0, 3, 9, ch238data }; - -static const unsigned char ch239data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, - 0x8,0x0,0x38,0x0,0x0,0x0,0x0,0x0,0x14,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch239 = { 9, 15, 0, 3, 9, ch239data }; - -static const unsigned char ch240data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x3e,0x0,0x4,0x0,0x28,0x0,0x18,0x0,0x24,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch240 = { 9, 15, 0, 3, 9, ch240data }; - -static const unsigned char ch241data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x61,0x0,0x5e,0x0,0x0,0x0,0x0,0x0,0x28,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch241 = { 9, 15, 0, 3, 9, ch241data }; - -static const unsigned char ch242data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0xc,0x0,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch242 = { 9, 15, 0, 3, 9, ch242data }; - -static const unsigned char ch243data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x18,0x0,0x4,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch243 = { 9, 15, 0, 3, 9, ch243data }; - -static const unsigned char ch244data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x22,0x0,0x1c,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch244 = { 9, 15, 0, 3, 9, ch244data }; - -static const unsigned char ch245data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x28,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch245 = { 9, 15, 0, 3, 9, ch245data }; - -static const unsigned char ch246data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3e,0x0,0x41,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x41,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x14,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch246 = { 9, 15, 0, 3, 9, ch246data }; - -static const unsigned char ch247data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x1c,0x0,0x8,0x0,0x0,0x0,0x7f,0x0, - 0x0,0x0,0x8,0x0,0x1c,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch247 = { 9, 15, 0, 3, 9, ch247data }; - -static const unsigned char ch248data[] = { - 0x0,0x0,0x0,0x0,0x40,0x0,0x3e,0x0,0x51,0x0,0x51,0x0,0x49,0x0,0x45,0x0, - 0x45,0x0,0x3e,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch248 = { 9, 15, 0, 3, 9, ch248data }; - -static const unsigned char ch249data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3d,0x0,0x42,0x0,0x42,0x0,0x42,0x0,0x42,0x0, - 0x42,0x0,0x42,0x0,0x0,0x0,0x0,0x0,0xc,0x0,0x10,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch249 = { 9, 15, 0, 3, 9, ch249data }; - -static const unsigned char ch250data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3d,0x0,0x42,0x0,0x42,0x0,0x42,0x0,0x42,0x0, - 0x42,0x0,0x42,0x0,0x0,0x0,0x0,0x0,0x18,0x0,0x4,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch250 = { 9, 15, 0, 3, 9, ch250data }; - -static const unsigned char ch251data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3d,0x0,0x42,0x0,0x42,0x0,0x42,0x0,0x42,0x0, - 0x42,0x0,0x42,0x0,0x0,0x0,0x0,0x0,0x22,0x0,0x1c,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch251 = { 9, 15, 0, 3, 9, ch251data }; - -static const unsigned char ch252data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x3d,0x0,0x42,0x0,0x42,0x0,0x42,0x0,0x42,0x0, - 0x42,0x0,0x42,0x0,0x0,0x0,0x0,0x0,0x14,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch252 = { 9, 15, 0, 3, 9, ch252data }; - -static const unsigned char ch253data[] = { - 0x3c,0x0,0x42,0x0,0x2,0x0,0x3a,0x0,0x46,0x0,0x42,0x0,0x42,0x0,0x42,0x0, - 0x42,0x0,0x42,0x0,0x0,0x0,0x0,0x0,0x18,0x0,0x4,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch253 = { 9, 15, 0, 3, 9, ch253data }; - -static const unsigned char ch254data[] = { - 0x40,0x0,0x40,0x0,0x40,0x0,0x5e,0x0,0x61,0x0,0x41,0x0,0x41,0x0,0x41,0x0, - 0x61,0x0,0x5e,0x0,0x40,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch254 = { 9, 15, 0, 3, 9, ch254data }; - -static const unsigned char ch255data[] = { - 0x3c,0x0,0x42,0x0,0x2,0x0,0x3a,0x0,0x46,0x0,0x42,0x0,0x42,0x0,0x42,0x0, - 0x42,0x0,0x42,0x0,0x0,0x0,0x0,0x0,0x14,0x0,0x14,0x0,0x0,0x0 -}; -static const GLUTBitmapChar ch255 = { 9, 15, 0, 3, 9, ch255data }; - - -static const GLUTBitmapChar *chars[] = { - &ch0, &ch1, &ch2, &ch3, &ch4, &ch5, &ch6, &ch7, - &ch8, &ch9, &ch10, &ch11, &ch12, &ch13, &ch14, &ch15, - &ch16, &ch17, &ch18, &ch19, &ch20, &ch21, &ch22, &ch23, - &ch24, &ch25, &ch26, &ch27, &ch28, &ch29, &ch30, &ch31, - &ch32, &ch33, &ch34, &ch35, &ch36, &ch37, &ch38, &ch39, - &ch40, &ch41, &ch42, &ch43, &ch44, &ch45, &ch46, &ch47, - &ch48, &ch49, &ch50, &ch51, &ch52, &ch53, &ch54, &ch55, - &ch56, &ch57, &ch58, &ch59, &ch60, &ch61, &ch62, &ch63, - &ch64, &ch65, &ch66, &ch67, &ch68, &ch69, &ch70, &ch71, - &ch72, &ch73, &ch74, &ch75, &ch76, &ch77, &ch78, &ch79, - &ch80, &ch81, &ch82, &ch83, &ch84, &ch85, &ch86, &ch87, - &ch88, &ch89, &ch90, &ch91, &ch92, &ch93, &ch94, &ch95, - &ch96, &ch97, &ch98, &ch99, &ch100, &ch101, &ch102, &ch103, - &ch104, &ch105, &ch106, &ch107, &ch108, &ch109, &ch110, &ch111, - &ch112, &ch113, &ch114, &ch115, &ch116, &ch117, &ch118, &ch119, - &ch120, &ch121, &ch122, &ch123, &ch124, &ch125, &ch126, &ch127, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - &ch160, &ch161, &ch162, &ch163, &ch164, &ch165, &ch166, &ch167, - &ch168, &ch169, &ch170, &ch171, &ch172, &ch173, &ch174, &ch175, - &ch176, &ch177, &ch178, &ch179, &ch180, &ch181, &ch182, &ch183, - &ch184, &ch185, &ch186, &ch187, &ch188, &ch189, &ch190, &ch191, - &ch192, &ch193, &ch194, &ch195, &ch196, &ch197, &ch198, &ch199, - &ch200, &ch201, &ch202, &ch203, &ch204, &ch205, &ch206, &ch207, - &ch208, &ch209, &ch210, &ch211, &ch212, &ch213, &ch214, &ch215, - &ch216, &ch217, &ch218, &ch219, &ch220, &ch221, &ch222, &ch223, - &ch224, &ch225, &ch226, &ch227, &ch228, &ch229, &ch230, &ch231, - &ch232, &ch233, &ch234, &ch235, &ch236, &ch237, &ch238, &ch239, - &ch240, &ch241, &ch242, &ch243, &ch244, &ch245, &ch246, &ch247, - &ch248, &ch249, &ch250, &ch251, &ch252, &ch253, &ch254, &ch255 -}; - -const GLUTBitmapFont glutBitmap9By15 = { - "-Misc-Fixed-Medium-R-Normal--15-140-75-75-C-90-ISO8859-1", - 15, 256, chars -}; diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/hel10.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/hel10.c deleted file mode 100644 index 3d24ffee1c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/hel10.c +++ /dev/null @@ -1,1019 +0,0 @@ -/* autogenerated by bdf2c! do not edit */ - -/* "Copyright (c) 1984, 1987 Adobe Systems Incorporated. All Rights Reserved. Copyright (c) 1988, 1991 Digital Equipment Corporation. All Rights Reserved." */ - - -#include "internal.h" -/* -typedef struct { - int width, height; - int xorig, yorig; - int xmove; - const unsigned char *bitmap; -} GLUTBitmapChar; - -typedef struct { - const char *name; - int height; - int num; - const GLUTBitmapChar *const *table; -} GLUTBitmapFont; -*/ - - -static const unsigned char ch32data[] = { - 0x0 -}; -static const GLUTBitmapChar ch32 = { 1, 1, 0, 0, 3, ch32data }; - -static const unsigned char ch33data[] = { - 0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch33 = { 1, 8, -1, 0, 3, ch33data }; - -static const unsigned char ch34data[] = { - 0xa0,0xa0 -}; -static const GLUTBitmapChar ch34 = { 3, 2, -1, -6, 4, ch34data }; - -static const unsigned char ch35data[] = { - 0x50,0x50,0xf8,0x28,0x7c,0x28,0x28 -}; -static const GLUTBitmapChar ch35 = { 6, 7, 0, 0, 6, ch35data }; - -static const unsigned char ch36data[] = { - 0x20,0x70,0xa8,0x28,0x70,0xa0,0xa8,0x70,0x20 -}; -static const GLUTBitmapChar ch36 = { 5, 9, 0, 1, 6, ch36data }; - -static const unsigned char ch37data[] = { - 0x26,0x29,0x16,0x10,0x8,0x68,0x94,0x64 -}; -static const GLUTBitmapChar ch37 = { 8, 8, 0, 0, 9, ch37data }; - -static const unsigned char ch38data[] = { - 0x64,0x98,0x98,0xa4,0x60,0x50,0x50,0x20 -}; -static const GLUTBitmapChar ch38 = { 6, 8, -1, 0, 8, ch38data }; - -static const unsigned char ch39data[] = { - 0x80,0x40,0x40 -}; -static const GLUTBitmapChar ch39 = { 2, 3, -1, -5, 3, ch39data }; - -static const unsigned char ch40data[] = { - 0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x40,0x40,0x20 -}; -static const GLUTBitmapChar ch40 = { 3, 10, 0, 2, 4, ch40data }; - -static const unsigned char ch41data[] = { - 0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x40,0x40,0x80 -}; -static const GLUTBitmapChar ch41 = { 3, 10, -1, 2, 4, ch41data }; - -static const unsigned char ch42data[] = { - 0xa0,0x40,0xa0 -}; -static const GLUTBitmapChar ch42 = { 3, 3, 0, -5, 4, ch42data }; - -static const unsigned char ch43data[] = { - 0x20,0x20,0xf8,0x20,0x20 -}; -static const GLUTBitmapChar ch43 = { 5, 5, 0, -1, 6, ch43data }; - -static const unsigned char ch44data[] = { - 0x80,0x40,0x40 -}; -static const GLUTBitmapChar ch44 = { 2, 3, 0, 2, 3, ch44data }; - -static const unsigned char ch45data[] = { - 0xf8 -}; -static const GLUTBitmapChar ch45 = { 5, 1, -1, -3, 7, ch45data }; - -static const unsigned char ch46data[] = { - 0x80 -}; -static const GLUTBitmapChar ch46 = { 1, 1, -1, 0, 3, ch46data }; - -static const unsigned char ch47data[] = { - 0x80,0x80,0x40,0x40,0x40,0x40,0x20,0x20 -}; -static const GLUTBitmapChar ch47 = { 3, 8, 0, 0, 3, ch47data }; - -static const unsigned char ch48data[] = { - 0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x70 -}; -static const GLUTBitmapChar ch48 = { 5, 8, 0, 0, 6, ch48data }; - -static const unsigned char ch49data[] = { - 0x40,0x40,0x40,0x40,0x40,0x40,0xc0,0x40 -}; -static const GLUTBitmapChar ch49 = { 2, 8, -1, 0, 6, ch49data }; - -static const unsigned char ch50data[] = { - 0xf8,0x80,0x40,0x30,0x8,0x8,0x88,0x70 -}; -static const GLUTBitmapChar ch50 = { 5, 8, 0, 0, 6, ch50data }; - -static const unsigned char ch51data[] = { - 0x70,0x88,0x8,0x8,0x30,0x8,0x88,0x70 -}; -static const GLUTBitmapChar ch51 = { 5, 8, 0, 0, 6, ch51data }; - -static const unsigned char ch52data[] = { - 0x10,0x10,0xf8,0x90,0x50,0x50,0x30,0x10 -}; -static const GLUTBitmapChar ch52 = { 5, 8, 0, 0, 6, ch52data }; - -static const unsigned char ch53data[] = { - 0x70,0x88,0x8,0x8,0xf0,0x80,0x80,0xf8 -}; -static const GLUTBitmapChar ch53 = { 5, 8, 0, 0, 6, ch53data }; - -static const unsigned char ch54data[] = { - 0x70,0x88,0x88,0xc8,0xb0,0x80,0x88,0x70 -}; -static const GLUTBitmapChar ch54 = { 5, 8, 0, 0, 6, ch54data }; - -static const unsigned char ch55data[] = { - 0x40,0x40,0x20,0x20,0x10,0x10,0x8,0xf8 -}; -static const GLUTBitmapChar ch55 = { 5, 8, 0, 0, 6, ch55data }; - -static const unsigned char ch56data[] = { - 0x70,0x88,0x88,0x88,0x70,0x88,0x88,0x70 -}; -static const GLUTBitmapChar ch56 = { 5, 8, 0, 0, 6, ch56data }; - -static const unsigned char ch57data[] = { - 0x70,0x88,0x8,0x68,0x98,0x88,0x88,0x70 -}; -static const GLUTBitmapChar ch57 = { 5, 8, 0, 0, 6, ch57data }; - -static const unsigned char ch58data[] = { - 0x80,0x0,0x0,0x0,0x0,0x80 -}; -static const GLUTBitmapChar ch58 = { 1, 6, -1, 0, 3, ch58data }; - -static const unsigned char ch59data[] = { - 0x80,0x40,0x40,0x0,0x0,0x0,0x0,0x40 -}; -static const GLUTBitmapChar ch59 = { 2, 8, 0, 2, 3, ch59data }; - -static const unsigned char ch60data[] = { - 0x20,0x40,0x80,0x40,0x20 -}; -static const GLUTBitmapChar ch60 = { 3, 5, -1, -1, 6, ch60data }; - -static const unsigned char ch61data[] = { - 0xf0,0x0,0xf0 -}; -static const GLUTBitmapChar ch61 = { 4, 3, 0, -2, 5, ch61data }; - -static const unsigned char ch62data[] = { - 0x80,0x40,0x20,0x40,0x80 -}; -static const GLUTBitmapChar ch62 = { 3, 5, -1, -1, 6, ch62data }; - -static const unsigned char ch63data[] = { - 0x40,0x0,0x40,0x40,0x20,0x10,0x90,0x60 -}; -static const GLUTBitmapChar ch63 = { 4, 8, -1, 0, 6, ch63data }; - -static const unsigned char ch64data[] = { - 0x3e,0x0,0x40,0x0,0x9b,0x0,0xa4,0x80,0xa4,0x80,0xa2,0x40,0x92,0x40,0x4d,0x40, - 0x20,0x80,0x1f,0x0 -}; -static const GLUTBitmapChar ch64 = { 10, 10, 0, 2, 11, ch64data }; - -static const unsigned char ch65data[] = { - 0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10 -}; -static const GLUTBitmapChar ch65 = { 7, 8, 0, 0, 7, ch65data }; - -static const unsigned char ch66data[] = { - 0xf0,0x88,0x88,0x88,0xf0,0x88,0x88,0xf0 -}; -static const GLUTBitmapChar ch66 = { 5, 8, -1, 0, 7, ch66data }; - -static const unsigned char ch67data[] = { - 0x78,0x84,0x80,0x80,0x80,0x80,0x84,0x78 -}; -static const GLUTBitmapChar ch67 = { 6, 8, -1, 0, 8, ch67data }; - -static const unsigned char ch68data[] = { - 0xf0,0x88,0x84,0x84,0x84,0x84,0x88,0xf0 -}; -static const GLUTBitmapChar ch68 = { 6, 8, -1, 0, 8, ch68data }; - -static const unsigned char ch69data[] = { - 0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8 -}; -static const GLUTBitmapChar ch69 = { 5, 8, -1, 0, 7, ch69data }; - -static const unsigned char ch70data[] = { - 0x80,0x80,0x80,0x80,0xf0,0x80,0x80,0xf8 -}; -static const GLUTBitmapChar ch70 = { 5, 8, -1, 0, 6, ch70data }; - -static const unsigned char ch71data[] = { - 0x74,0x8c,0x84,0x8c,0x80,0x80,0x84,0x78 -}; -static const GLUTBitmapChar ch71 = { 6, 8, -1, 0, 8, ch71data }; - -static const unsigned char ch72data[] = { - 0x84,0x84,0x84,0x84,0xfc,0x84,0x84,0x84 -}; -static const GLUTBitmapChar ch72 = { 6, 8, -1, 0, 8, ch72data }; - -static const unsigned char ch73data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch73 = { 1, 8, -1, 0, 3, ch73data }; - -static const unsigned char ch74data[] = { - 0x60,0x90,0x10,0x10,0x10,0x10,0x10,0x10 -}; -static const GLUTBitmapChar ch74 = { 4, 8, 0, 0, 5, ch74data }; - -static const unsigned char ch75data[] = { - 0x88,0x88,0x90,0x90,0xe0,0xa0,0x90,0x88 -}; -static const GLUTBitmapChar ch75 = { 5, 8, -1, 0, 7, ch75data }; - -static const unsigned char ch76data[] = { - 0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch76 = { 4, 8, -1, 0, 6, ch76data }; - -static const unsigned char ch77data[] = { - 0x92,0x92,0x92,0xaa,0xaa,0xc6,0xc6,0x82 -}; -static const GLUTBitmapChar ch77 = { 7, 8, -1, 0, 9, ch77data }; - -static const unsigned char ch78data[] = { - 0x8c,0x8c,0x94,0x94,0xa4,0xa4,0xc4,0xc4 -}; -static const GLUTBitmapChar ch78 = { 6, 8, -1, 0, 8, ch78data }; - -static const unsigned char ch79data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78 -}; -static const GLUTBitmapChar ch79 = { 6, 8, -1, 0, 8, ch79data }; - -static const unsigned char ch80data[] = { - 0x80,0x80,0x80,0x80,0xf0,0x88,0x88,0xf0 -}; -static const GLUTBitmapChar ch80 = { 5, 8, -1, 0, 7, ch80data }; - -static const unsigned char ch81data[] = { - 0x2,0x7c,0x8c,0x94,0x84,0x84,0x84,0x84,0x78 -}; -static const GLUTBitmapChar ch81 = { 7, 9, -1, 1, 8, ch81data }; - -static const unsigned char ch82data[] = { - 0x88,0x88,0x88,0x88,0xf0,0x88,0x88,0xf0 -}; -static const GLUTBitmapChar ch82 = { 5, 8, -1, 0, 7, ch82data }; - -static const unsigned char ch83data[] = { - 0x70,0x88,0x88,0x8,0x70,0x80,0x88,0x70 -}; -static const GLUTBitmapChar ch83 = { 5, 8, -1, 0, 7, ch83data }; - -static const unsigned char ch84data[] = { - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8 -}; -static const GLUTBitmapChar ch84 = { 5, 8, 0, 0, 5, ch84data }; - -static const unsigned char ch85data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84 -}; -static const GLUTBitmapChar ch85 = { 6, 8, -1, 0, 8, ch85data }; - -static const unsigned char ch86data[] = { - 0x10,0x28,0x28,0x44,0x44,0x44,0x82,0x82 -}; -static const GLUTBitmapChar ch86 = { 7, 8, 0, 0, 7, ch86data }; - -static const unsigned char ch87data[] = { - 0x22,0x0,0x22,0x0,0x22,0x0,0x55,0x0,0x49,0x0,0x49,0x0,0x88,0x80,0x88,0x80 -}; -static const GLUTBitmapChar ch87 = { 9, 8, 0, 0, 9, ch87data }; - -static const unsigned char ch88data[] = { - 0x88,0x88,0x50,0x50,0x20,0x50,0x88,0x88 -}; -static const GLUTBitmapChar ch88 = { 5, 8, -1, 0, 7, ch88data }; - -static const unsigned char ch89data[] = { - 0x10,0x10,0x10,0x28,0x28,0x44,0x44,0x82 -}; -static const GLUTBitmapChar ch89 = { 7, 8, 0, 0, 7, ch89data }; - -static const unsigned char ch90data[] = { - 0xf8,0x80,0x40,0x20,0x20,0x10,0x8,0xf8 -}; -static const GLUTBitmapChar ch90 = { 5, 8, -1, 0, 7, ch90data }; - -static const unsigned char ch91data[] = { - 0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0 -}; -static const GLUTBitmapChar ch91 = { 2, 10, -1, 2, 3, ch91data }; - -static const unsigned char ch92data[] = { - 0x20,0x20,0x40,0x40,0x40,0x40,0x80,0x80 -}; -static const GLUTBitmapChar ch92 = { 3, 8, 0, 0, 3, ch92data }; - -static const unsigned char ch93data[] = { - 0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0 -}; -static const GLUTBitmapChar ch93 = { 2, 10, 0, 2, 3, ch93data }; - -static const unsigned char ch94data[] = { - 0x88,0x50,0x50,0x20,0x20 -}; -static const GLUTBitmapChar ch94 = { 5, 5, 0, -3, 6, ch94data }; - -static const unsigned char ch95data[] = { - 0xfc -}; -static const GLUTBitmapChar ch95 = { 6, 1, 0, 2, 6, ch95data }; - -static const unsigned char ch96data[] = { - 0x80,0x80,0x40 -}; -static const GLUTBitmapChar ch96 = { 2, 3, 0, -5, 3, ch96data }; - -static const unsigned char ch97data[] = { - 0x68,0x90,0x90,0x70,0x10,0xe0 -}; -static const GLUTBitmapChar ch97 = { 5, 6, 0, 0, 5, ch97data }; - -static const unsigned char ch98data[] = { - 0xb0,0xc8,0x88,0x88,0xc8,0xb0,0x80,0x80 -}; -static const GLUTBitmapChar ch98 = { 5, 8, 0, 0, 6, ch98data }; - -static const unsigned char ch99data[] = { - 0x60,0x90,0x80,0x80,0x90,0x60 -}; -static const GLUTBitmapChar ch99 = { 4, 6, 0, 0, 5, ch99data }; - -static const unsigned char ch100data[] = { - 0x68,0x98,0x88,0x88,0x98,0x68,0x8,0x8 -}; -static const GLUTBitmapChar ch100 = { 5, 8, 0, 0, 6, ch100data }; - -static const unsigned char ch101data[] = { - 0x60,0x90,0x80,0xf0,0x90,0x60 -}; -static const GLUTBitmapChar ch101 = { 4, 6, 0, 0, 5, ch101data }; - -static const unsigned char ch102data[] = { - 0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x30 -}; -static const GLUTBitmapChar ch102 = { 4, 8, 0, 0, 4, ch102data }; - -static const unsigned char ch103data[] = { - 0x70,0x8,0x68,0x98,0x88,0x88,0x98,0x68 -}; -static const GLUTBitmapChar ch103 = { 5, 8, 0, 2, 6, ch103data }; - -static const unsigned char ch104data[] = { - 0x88,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80 -}; -static const GLUTBitmapChar ch104 = { 5, 8, 0, 0, 6, ch104data }; - -static const unsigned char ch105data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80 -}; -static const GLUTBitmapChar ch105 = { 1, 8, 0, 0, 2, ch105data }; - -static const unsigned char ch106data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80 -}; -static const GLUTBitmapChar ch106 = { 1, 9, 0, 1, 2, ch106data }; - -static const unsigned char ch107data[] = { - 0x90,0x90,0xa0,0xc0,0xa0,0x90,0x80,0x80 -}; -static const GLUTBitmapChar ch107 = { 4, 8, 0, 0, 5, ch107data }; - -static const unsigned char ch108data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch108 = { 1, 8, 0, 0, 2, ch108data }; - -static const unsigned char ch109data[] = { - 0x92,0x92,0x92,0x92,0x92,0xec -}; -static const GLUTBitmapChar ch109 = { 7, 6, 0, 0, 8, ch109data }; - -static const unsigned char ch110data[] = { - 0x88,0x88,0x88,0x88,0xc8,0xb0 -}; -static const GLUTBitmapChar ch110 = { 5, 6, 0, 0, 6, ch110data }; - -static const unsigned char ch111data[] = { - 0x70,0x88,0x88,0x88,0x88,0x70 -}; -static const GLUTBitmapChar ch111 = { 5, 6, 0, 0, 6, ch111data }; - -static const unsigned char ch112data[] = { - 0x80,0x80,0xb0,0xc8,0x88,0x88,0xc8,0xb0 -}; -static const GLUTBitmapChar ch112 = { 5, 8, 0, 2, 6, ch112data }; - -static const unsigned char ch113data[] = { - 0x8,0x8,0x68,0x98,0x88,0x88,0x98,0x68 -}; -static const GLUTBitmapChar ch113 = { 5, 8, 0, 2, 6, ch113data }; - -static const unsigned char ch114data[] = { - 0x80,0x80,0x80,0x80,0xc0,0xa0 -}; -static const GLUTBitmapChar ch114 = { 3, 6, 0, 0, 4, ch114data }; - -static const unsigned char ch115data[] = { - 0x60,0x90,0x10,0x60,0x90,0x60 -}; -static const GLUTBitmapChar ch115 = { 4, 6, 0, 0, 5, ch115data }; - -static const unsigned char ch116data[] = { - 0x60,0x40,0x40,0x40,0x40,0xe0,0x40,0x40 -}; -static const GLUTBitmapChar ch116 = { 3, 8, 0, 0, 4, ch116data }; - -static const unsigned char ch117data[] = { - 0x70,0x90,0x90,0x90,0x90,0x90 -}; -static const GLUTBitmapChar ch117 = { 4, 6, 0, 0, 5, ch117data }; - -static const unsigned char ch118data[] = { - 0x20,0x20,0x50,0x50,0x88,0x88 -}; -static const GLUTBitmapChar ch118 = { 5, 6, 0, 0, 6, ch118data }; - -static const unsigned char ch119data[] = { - 0x28,0x28,0x54,0x54,0x92,0x92 -}; -static const GLUTBitmapChar ch119 = { 7, 6, 0, 0, 8, ch119data }; - -static const unsigned char ch120data[] = { - 0x88,0x88,0x50,0x20,0x50,0x88 -}; -static const GLUTBitmapChar ch120 = { 5, 6, 0, 0, 6, ch120data }; - -static const unsigned char ch121data[] = { - 0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90 -}; -static const GLUTBitmapChar ch121 = { 4, 8, 0, 2, 5, ch121data }; - -static const unsigned char ch122data[] = { - 0xf0,0x80,0x40,0x20,0x10,0xf0 -}; -static const GLUTBitmapChar ch122 = { 4, 6, 0, 0, 5, ch122data }; - -static const unsigned char ch123data[] = { - 0x20,0x40,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x20 -}; -static const GLUTBitmapChar ch123 = { 3, 10, 0, 2, 3, ch123data }; - -static const unsigned char ch124data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch124 = { 1, 10, -1, 2, 3, ch124data }; - -static const unsigned char ch125data[] = { - 0x80,0x40,0x40,0x40,0x40,0x20,0x40,0x40,0x40,0x80 -}; -static const GLUTBitmapChar ch125 = { 3, 10, 0, 2, 3, ch125data }; - -static const unsigned char ch126data[] = { - 0x98,0x64 -}; -static const GLUTBitmapChar ch126 = { 6, 2, 0, -3, 7, ch126data }; - -static const unsigned char ch160data[] = { - 0x0 -}; -static const GLUTBitmapChar ch160 = { 1, 1, 0, 0, 3, ch160data }; - -static const unsigned char ch161data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80 -}; -static const GLUTBitmapChar ch161 = { 1, 8, -1, 2, 3, ch161data }; - -static const unsigned char ch162data[] = { - 0x40,0x70,0xa8,0xa0,0xa0,0xa8,0x70,0x10 -}; -static const GLUTBitmapChar ch162 = { 5, 8, 0, 1, 6, ch162data }; - -static const unsigned char ch163data[] = { - 0xb0,0x48,0x40,0x40,0xe0,0x40,0x48,0x30 -}; -static const GLUTBitmapChar ch163 = { 5, 8, 0, 0, 6, ch163data }; - -static const unsigned char ch164data[] = { - 0x90,0x60,0x90,0x90,0x60,0x90 -}; -static const GLUTBitmapChar ch164 = { 4, 6, 0, -1, 5, ch164data }; - -static const unsigned char ch165data[] = { - 0x20,0xf8,0x20,0xf8,0x50,0x50,0x88,0x88 -}; -static const GLUTBitmapChar ch165 = { 5, 8, 0, 0, 6, ch165data }; - -static const unsigned char ch166data[] = { - 0x80,0x80,0x80,0x80,0x0,0x0,0x80,0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch166 = { 1, 10, -1, 2, 3, ch166data }; - -static const unsigned char ch167data[] = { - 0x70,0x88,0x18,0x70,0xc8,0x98,0x70,0xc0,0x88,0x70 -}; -static const GLUTBitmapChar ch167 = { 5, 10, 0, 2, 6, ch167data }; - -static const unsigned char ch168data[] = { - 0xa0 -}; -static const GLUTBitmapChar ch168 = { 3, 1, 0, -7, 3, ch168data }; - -static const unsigned char ch169data[] = { - 0x38,0x44,0x9a,0xa2,0x9a,0x44,0x38 -}; -static const GLUTBitmapChar ch169 = { 7, 7, -1, 0, 9, ch169data }; - -static const unsigned char ch170data[] = { - 0xe0,0x0,0xa0,0x20,0xe0 -}; -static const GLUTBitmapChar ch170 = { 3, 5, 0, -3, 4, ch170data }; - -static const unsigned char ch171data[] = { - 0x28,0x50,0xa0,0x50,0x28 -}; -static const GLUTBitmapChar ch171 = { 5, 5, 0, 0, 6, ch171data }; - -static const unsigned char ch172data[] = { - 0x8,0x8,0xf8 -}; -static const GLUTBitmapChar ch172 = { 5, 3, -1, -2, 7, ch172data }; - -static const unsigned char ch173data[] = { - 0xe0 -}; -static const GLUTBitmapChar ch173 = { 3, 1, 0, -3, 4, ch173data }; - -static const unsigned char ch174data[] = { - 0x38,0x44,0xaa,0xb2,0xba,0x44,0x38 -}; -static const GLUTBitmapChar ch174 = { 7, 7, -1, 0, 9, ch174data }; - -static const unsigned char ch175data[] = { - 0xe0 -}; -static const GLUTBitmapChar ch175 = { 3, 1, 0, -7, 3, ch175data }; - -static const unsigned char ch176data[] = { - 0x60,0x90,0x90,0x60 -}; -static const GLUTBitmapChar ch176 = { 4, 4, 0, -3, 4, ch176data }; - -static const unsigned char ch177data[] = { - 0xf8,0x0,0x20,0x20,0xf8,0x20,0x20 -}; -static const GLUTBitmapChar ch177 = { 5, 7, 0, 0, 6, ch177data }; - -static const unsigned char ch178data[] = { - 0xe0,0x40,0xa0,0x60 -}; -static const GLUTBitmapChar ch178 = { 3, 4, 0, -3, 3, ch178data }; - -static const unsigned char ch179data[] = { - 0xc0,0x20,0x40,0xe0 -}; -static const GLUTBitmapChar ch179 = { 3, 4, 0, -3, 3, ch179data }; - -static const unsigned char ch180data[] = { - 0x80,0x40 -}; -static const GLUTBitmapChar ch180 = { 2, 2, 0, -6, 3, ch180data }; - -static const unsigned char ch181data[] = { - 0x80,0x80,0xf0,0x90,0x90,0x90,0x90,0x90 -}; -static const GLUTBitmapChar ch181 = { 4, 8, 0, 2, 5, ch181data }; - -static const unsigned char ch182data[] = { - 0x28,0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x7c -}; -static const GLUTBitmapChar ch182 = { 6, 10, 0, 2, 6, ch182data }; - -static const unsigned char ch183data[] = { - 0xc0 -}; -static const GLUTBitmapChar ch183 = { 2, 1, 0, -3, 3, ch183data }; - -static const unsigned char ch184data[] = { - 0xc0,0x40 -}; -static const GLUTBitmapChar ch184 = { 2, 2, 0, 2, 3, ch184data }; - -static const unsigned char ch185data[] = { - 0x40,0x40,0xc0,0x40 -}; -static const GLUTBitmapChar ch185 = { 2, 4, 0, -3, 3, ch185data }; - -static const unsigned char ch186data[] = { - 0xe0,0x0,0xe0,0xa0,0xe0 -}; -static const GLUTBitmapChar ch186 = { 3, 5, 0, -3, 4, ch186data }; - -static const unsigned char ch187data[] = { - 0xa0,0x50,0x28,0x50,0xa0 -}; -static const GLUTBitmapChar ch187 = { 5, 5, 0, 0, 6, ch187data }; - -static const unsigned char ch188data[] = { - 0x21,0x0,0x17,0x80,0x13,0x0,0x9,0x0,0x48,0x0,0x44,0x0,0xc4,0x0,0x42,0x0 -}; -static const GLUTBitmapChar ch188 = { 9, 8, 0, 0, 9, ch188data }; - -static const unsigned char ch189data[] = { - 0x27,0x12,0x15,0xb,0x48,0x44,0xc4,0x42 -}; -static const GLUTBitmapChar ch189 = { 8, 8, 0, 0, 9, ch189data }; - -static const unsigned char ch190data[] = { - 0x21,0x0,0x17,0x80,0x13,0x0,0x9,0x0,0xc8,0x0,0x24,0x0,0x44,0x0,0xe2,0x0 -}; -static const GLUTBitmapChar ch190 = { 9, 8, 0, 0, 9, ch190data }; - -static const unsigned char ch191data[] = { - 0x60,0x90,0x80,0x40,0x20,0x20,0x0,0x20 -}; -static const GLUTBitmapChar ch191 = { 4, 8, -1, 2, 6, ch191data }; - -static const unsigned char ch192data[] = { - 0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x10,0x20 -}; -static const GLUTBitmapChar ch192 = { 7, 11, 0, 0, 7, ch192data }; - -static const unsigned char ch193data[] = { - 0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x10,0x8 -}; -static const GLUTBitmapChar ch193 = { 7, 11, 0, 0, 7, ch193data }; - -static const unsigned char ch194data[] = { - 0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28,0x10 -}; -static const GLUTBitmapChar ch194 = { 7, 11, 0, 0, 7, ch194data }; - -static const unsigned char ch195data[] = { - 0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28,0x14 -}; -static const GLUTBitmapChar ch195 = { 7, 11, 0, 0, 7, ch195data }; - -static const unsigned char ch196data[] = { - 0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28 -}; -static const GLUTBitmapChar ch196 = { 7, 10, 0, 0, 7, ch196data }; - -static const unsigned char ch197data[] = { - 0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x10,0x28,0x10 -}; -static const GLUTBitmapChar ch197 = { 7, 11, 0, 0, 7, ch197data }; - -static const unsigned char ch198data[] = { - 0x8f,0x80,0x88,0x0,0x78,0x0,0x48,0x0,0x2f,0x80,0x28,0x0,0x18,0x0,0x1f,0x80 -}; -static const GLUTBitmapChar ch198 = { 9, 8, 0, 0, 10, ch198data }; - -static const unsigned char ch199data[] = { - 0x30,0x10,0x78,0x84,0x80,0x80,0x80,0x80,0x84,0x78 -}; -static const GLUTBitmapChar ch199 = { 6, 10, -1, 2, 8, ch199data }; - -static const unsigned char ch200data[] = { - 0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x20,0x40 -}; -static const GLUTBitmapChar ch200 = { 5, 11, -1, 0, 7, ch200data }; - -static const unsigned char ch201data[] = { - 0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x20,0x10 -}; -static const GLUTBitmapChar ch201 = { 5, 11, -1, 0, 7, ch201data }; - -static const unsigned char ch202data[] = { - 0xf8,0x80,0x80,0xf8,0x80,0x80,0x80,0xf8,0x0,0x50,0x20 -}; -static const GLUTBitmapChar ch202 = { 5, 11, -1, 0, 7, ch202data }; - -static const unsigned char ch203data[] = { - 0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x50 -}; -static const GLUTBitmapChar ch203 = { 5, 10, -1, 0, 7, ch203data }; - -static const unsigned char ch204data[] = { - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80 -}; -static const GLUTBitmapChar ch204 = { 2, 11, 0, 0, 3, ch204data }; - -static const unsigned char ch205data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40 -}; -static const GLUTBitmapChar ch205 = { 2, 11, -1, 0, 3, ch205data }; - -static const unsigned char ch206data[] = { - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40 -}; -static const GLUTBitmapChar ch206 = { 3, 11, 0, 0, 3, ch206data }; - -static const unsigned char ch207data[] = { - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0 -}; -static const GLUTBitmapChar ch207 = { 3, 10, 0, 0, 3, ch207data }; - -static const unsigned char ch208data[] = { - 0x78,0x44,0x42,0x42,0xf2,0x42,0x44,0x78 -}; -static const GLUTBitmapChar ch208 = { 7, 8, 0, 0, 8, ch208data }; - -static const unsigned char ch209data[] = { - 0x8c,0x8c,0x94,0x94,0xa4,0xa4,0xc4,0xc4,0x0,0x50,0x28 -}; -static const GLUTBitmapChar ch209 = { 6, 11, -1, 0, 8, ch209data }; - -static const unsigned char ch210data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x10,0x20 -}; -static const GLUTBitmapChar ch210 = { 6, 11, -1, 0, 8, ch210data }; - -static const unsigned char ch211data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x10,0x8 -}; -static const GLUTBitmapChar ch211 = { 6, 11, -1, 0, 8, ch211data }; - -static const unsigned char ch212data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x28,0x10 -}; -static const GLUTBitmapChar ch212 = { 6, 11, -1, 0, 8, ch212data }; - -static const unsigned char ch213data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x50,0x28 -}; -static const GLUTBitmapChar ch213 = { 6, 11, -1, 0, 8, ch213data }; - -static const unsigned char ch214data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x48 -}; -static const GLUTBitmapChar ch214 = { 6, 10, -1, 0, 8, ch214data }; - -static const unsigned char ch215data[] = { - 0x88,0x50,0x20,0x50,0x88 -}; -static const GLUTBitmapChar ch215 = { 5, 5, 0, -1, 6, ch215data }; - -static const unsigned char ch216data[] = { - 0x80,0x78,0xc4,0xa4,0xa4,0x94,0x94,0x8c,0x78,0x4 -}; -static const GLUTBitmapChar ch216 = { 6, 10, -1, 1, 8, ch216data }; - -static const unsigned char ch217data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20 -}; -static const GLUTBitmapChar ch217 = { 6, 11, -1, 0, 8, ch217data }; - -static const unsigned char ch218data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x20,0x10 -}; -static const GLUTBitmapChar ch218 = { 6, 11, -1, 0, 8, ch218data }; - -static const unsigned char ch219data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x28,0x10 -}; -static const GLUTBitmapChar ch219 = { 6, 11, -1, 0, 8, ch219data }; - -static const unsigned char ch220data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48 -}; -static const GLUTBitmapChar ch220 = { 6, 10, -1, 0, 8, ch220data }; - -static const unsigned char ch221data[] = { - 0x10,0x10,0x10,0x28,0x28,0x44,0x44,0x82,0x0,0x10,0x8 -}; -static const GLUTBitmapChar ch221 = { 7, 11, 0, 0, 7, ch221data }; - -static const unsigned char ch222data[] = { - 0x80,0x80,0xf0,0x88,0x88,0xf0,0x80,0x80 -}; -static const GLUTBitmapChar ch222 = { 5, 8, -1, 0, 7, ch222data }; - -static const unsigned char ch223data[] = { - 0xa0,0x90,0x90,0x90,0xa0,0x90,0x90,0x60 -}; -static const GLUTBitmapChar ch223 = { 4, 8, 0, 0, 5, ch223data }; - -static const unsigned char ch224data[] = { - 0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x20,0x40 -}; -static const GLUTBitmapChar ch224 = { 5, 9, 0, 0, 5, ch224data }; - -static const unsigned char ch225data[] = { - 0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x20,0x10 -}; -static const GLUTBitmapChar ch225 = { 5, 9, 0, 0, 5, ch225data }; - -static const unsigned char ch226data[] = { - 0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x50,0x20 -}; -static const GLUTBitmapChar ch226 = { 5, 9, 0, 0, 5, ch226data }; - -static const unsigned char ch227data[] = { - 0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0xa0,0x50 -}; -static const GLUTBitmapChar ch227 = { 5, 9, 0, 0, 5, ch227data }; - -static const unsigned char ch228data[] = { - 0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x50 -}; -static const GLUTBitmapChar ch228 = { 5, 8, 0, 0, 5, ch228data }; - -static const unsigned char ch229data[] = { - 0x68,0x90,0x90,0x70,0x10,0xe0,0x20,0x50,0x20 -}; -static const GLUTBitmapChar ch229 = { 5, 9, 0, 0, 5, ch229data }; - -static const unsigned char ch230data[] = { - 0x6c,0x92,0x90,0x7e,0x12,0xec -}; -static const GLUTBitmapChar ch230 = { 7, 6, 0, 0, 8, ch230data }; - -static const unsigned char ch231data[] = { - 0x60,0x20,0x60,0x90,0x80,0x80,0x90,0x60 -}; -static const GLUTBitmapChar ch231 = { 4, 8, 0, 2, 5, ch231data }; - -static const unsigned char ch232data[] = { - 0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x20,0x40 -}; -static const GLUTBitmapChar ch232 = { 4, 9, 0, 0, 5, ch232data }; - -static const unsigned char ch233data[] = { - 0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x40,0x20 -}; -static const GLUTBitmapChar ch233 = { 4, 9, 0, 0, 5, ch233data }; - -static const unsigned char ch234data[] = { - 0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x50,0x20 -}; -static const GLUTBitmapChar ch234 = { 4, 9, 0, 0, 5, ch234data }; - -static const unsigned char ch235data[] = { - 0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x50 -}; -static const GLUTBitmapChar ch235 = { 4, 8, 0, 0, 5, ch235data }; - -static const unsigned char ch236data[] = { - 0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80 -}; -static const GLUTBitmapChar ch236 = { 2, 9, 1, 0, 2, ch236data }; - -static const unsigned char ch237data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40 -}; -static const GLUTBitmapChar ch237 = { 2, 9, 0, 0, 2, ch237data }; - -static const unsigned char ch238data[] = { - 0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40 -}; -static const GLUTBitmapChar ch238 = { 3, 9, 1, 0, 2, ch238data }; - -static const unsigned char ch239data[] = { - 0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0 -}; -static const GLUTBitmapChar ch239 = { 3, 8, 0, 0, 2, ch239data }; - -static const unsigned char ch240data[] = { - 0x70,0x88,0x88,0x88,0x88,0x78,0x90,0x60,0x50 -}; -static const GLUTBitmapChar ch240 = { 5, 9, 0, 0, 6, ch240data }; - -static const unsigned char ch241data[] = { - 0x90,0x90,0x90,0x90,0x90,0xe0,0x0,0xa0,0x50 -}; -static const GLUTBitmapChar ch241 = { 4, 9, 0, 0, 5, ch241data }; - -static const unsigned char ch242data[] = { - 0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x40 -}; -static const GLUTBitmapChar ch242 = { 5, 9, 0, 0, 6, ch242data }; - -static const unsigned char ch243data[] = { - 0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x10 -}; -static const GLUTBitmapChar ch243 = { 5, 9, 0, 0, 6, ch243data }; - -static const unsigned char ch244data[] = { - 0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x20 -}; -static const GLUTBitmapChar ch244 = { 5, 9, 0, 0, 6, ch244data }; - -static const unsigned char ch245data[] = { - 0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x28 -}; -static const GLUTBitmapChar ch245 = { 5, 9, 0, 0, 6, ch245data }; - -static const unsigned char ch246data[] = { - 0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50 -}; -static const GLUTBitmapChar ch246 = { 5, 8, 0, 0, 6, ch246data }; - -static const unsigned char ch247data[] = { - 0x20,0x0,0xf8,0x0,0x20 -}; -static const GLUTBitmapChar ch247 = { 5, 5, 0, -1, 6, ch247data }; - -static const unsigned char ch248data[] = { - 0x70,0x88,0xc8,0xa8,0x98,0x74 -}; -static const GLUTBitmapChar ch248 = { 6, 6, 0, 0, 6, ch248data }; - -static const unsigned char ch249data[] = { - 0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x20,0x40 -}; -static const GLUTBitmapChar ch249 = { 4, 9, 0, 0, 5, ch249data }; - -static const unsigned char ch250data[] = { - 0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x40,0x20 -}; -static const GLUTBitmapChar ch250 = { 4, 9, 0, 0, 5, ch250data }; - -static const unsigned char ch251data[] = { - 0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x50,0x20 -}; -static const GLUTBitmapChar ch251 = { 4, 9, 0, 0, 5, ch251data }; - -static const unsigned char ch252data[] = { - 0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x50 -}; -static const GLUTBitmapChar ch252 = { 4, 8, 0, 0, 5, ch252data }; - -static const unsigned char ch253data[] = { - 0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90,0x0,0x20,0x10 -}; -static const GLUTBitmapChar ch253 = { 4, 11, 0, 2, 5, ch253data }; - -static const unsigned char ch254data[] = { - 0x80,0x80,0xb0,0xc8,0x88,0x88,0xc8,0xb0,0x80,0x80 -}; -static const GLUTBitmapChar ch254 = { 5, 10, 0, 2, 6, ch254data }; - -static const unsigned char ch255data[] = { - 0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90,0x0,0x50 -}; -static const GLUTBitmapChar ch255 = { 4, 10, 0, 2, 5, ch255data }; - - -static const GLUTBitmapChar *chars[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - &ch32, &ch33, &ch34, &ch35, &ch36, &ch37, &ch38, &ch39, - &ch40, &ch41, &ch42, &ch43, &ch44, &ch45, &ch46, &ch47, - &ch48, &ch49, &ch50, &ch51, &ch52, &ch53, &ch54, &ch55, - &ch56, &ch57, &ch58, &ch59, &ch60, &ch61, &ch62, &ch63, - &ch64, &ch65, &ch66, &ch67, &ch68, &ch69, &ch70, &ch71, - &ch72, &ch73, &ch74, &ch75, &ch76, &ch77, &ch78, &ch79, - &ch80, &ch81, &ch82, &ch83, &ch84, &ch85, &ch86, &ch87, - &ch88, &ch89, &ch90, &ch91, &ch92, &ch93, &ch94, &ch95, - &ch96, &ch97, &ch98, &ch99, &ch100, &ch101, &ch102, &ch103, - &ch104, &ch105, &ch106, &ch107, &ch108, &ch109, &ch110, &ch111, - &ch112, &ch113, &ch114, &ch115, &ch116, &ch117, &ch118, &ch119, - &ch120, &ch121, &ch122, &ch123, &ch124, &ch125, &ch126, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - &ch160, &ch161, &ch162, &ch163, &ch164, &ch165, &ch166, &ch167, - &ch168, &ch169, &ch170, &ch171, &ch172, &ch173, &ch174, &ch175, - &ch176, &ch177, &ch178, &ch179, &ch180, &ch181, &ch182, &ch183, - &ch184, &ch185, &ch186, &ch187, &ch188, &ch189, &ch190, &ch191, - &ch192, &ch193, &ch194, &ch195, &ch196, &ch197, &ch198, &ch199, - &ch200, &ch201, &ch202, &ch203, &ch204, &ch205, &ch206, &ch207, - &ch208, &ch209, &ch210, &ch211, &ch212, &ch213, &ch214, &ch215, - &ch216, &ch217, &ch218, &ch219, &ch220, &ch221, &ch222, &ch223, - &ch224, &ch225, &ch226, &ch227, &ch228, &ch229, &ch230, &ch231, - &ch232, &ch233, &ch234, &ch235, &ch236, &ch237, &ch238, &ch239, - &ch240, &ch241, &ch242, &ch243, &ch244, &ch245, &ch246, &ch247, - &ch248, &ch249, &ch250, &ch251, &ch252, &ch253, &ch254, &ch255 -}; - -const GLUTBitmapFont glutBitmapHelvetica10 = { - "-Adobe-Helvetica-Medium-R-Normal--10-100-75-75-P-56-ISO8859-1", - 13, 256, chars -}; diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/hel12.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/hel12.c deleted file mode 100644 index 0fe8b0919b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/hel12.c +++ /dev/null @@ -1,1029 +0,0 @@ -/* autogenerated by bdf2c! do not edit */ - -/* "Copyright (c) 1984, 1987 Adobe Systems Incorporated. All Rights Reserved. Copyright (c) 1988, 1991 Digital Equipment Corporation. All Rights Reserved." */ - - -#include "internal.h" -/* -typedef struct { - int width, height; - int xorig, yorig; - int xmove; - const unsigned char *bitmap; -} GLUTBitmapChar; - -typedef struct { - const char *name; - int height; - int num; - const GLUTBitmapChar *const *table; -} GLUTBitmapFont; -*/ - - -static const unsigned char ch32data[] = { - 0x0 -}; -static const GLUTBitmapChar ch32 = { 1, 1, 0, 0, 4, ch32data }; - -static const unsigned char ch33data[] = { - 0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch33 = { 1, 9, -1, 0, 3, ch33data }; - -static const unsigned char ch34data[] = { - 0xa0,0xa0,0xa0 -}; -static const GLUTBitmapChar ch34 = { 3, 3, -1, -6, 5, ch34data }; - -static const unsigned char ch35data[] = { - 0x50,0x50,0x50,0xfc,0x28,0xfc,0x28,0x28 -}; -static const GLUTBitmapChar ch35 = { 6, 8, 0, 0, 7, ch35data }; - -static const unsigned char ch36data[] = { - 0x20,0x70,0xa8,0xa8,0x28,0x70,0xa0,0xa8,0x70,0x20 -}; -static const GLUTBitmapChar ch36 = { 5, 10, -1, 1, 7, ch36data }; - -static const unsigned char ch37data[] = { - 0x23,0x0,0x14,0x80,0x14,0x80,0x13,0x0,0x8,0x0,0x68,0x0,0x94,0x0,0x94,0x0, - 0x62,0x0 -}; -static const GLUTBitmapChar ch37 = { 9, 9, -1, 0, 11, ch37data }; - -static const unsigned char ch38data[] = { - 0x72,0x8c,0x84,0x8a,0x50,0x30,0x48,0x48,0x30 -}; -static const GLUTBitmapChar ch38 = { 7, 9, -1, 0, 9, ch38data }; - -static const unsigned char ch39data[] = { - 0x80,0x40,0xc0 -}; -static const GLUTBitmapChar ch39 = { 2, 3, -1, -6, 3, ch39data }; - -static const unsigned char ch40data[] = { - 0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x20 -}; -static const GLUTBitmapChar ch40 = { 3, 12, -1, 3, 4, ch40data }; - -static const unsigned char ch41data[] = { - 0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x20,0x20,0x40,0x40,0x80 -}; -static const GLUTBitmapChar ch41 = { 3, 12, 0, 3, 4, ch41data }; - -static const unsigned char ch42data[] = { - 0xa0,0x40,0xa0 -}; -static const GLUTBitmapChar ch42 = { 3, 3, -1, -6, 5, ch42data }; - -static const unsigned char ch43data[] = { - 0x20,0x20,0xf8,0x20,0x20 -}; -static const GLUTBitmapChar ch43 = { 5, 5, -1, -1, 7, ch43data }; - -static const unsigned char ch44data[] = { - 0x80,0x40,0x40 -}; -static const GLUTBitmapChar ch44 = { 2, 3, -1, 2, 4, ch44data }; - -static const unsigned char ch45data[] = { - 0xf8 -}; -static const GLUTBitmapChar ch45 = { 5, 1, -1, -3, 8, ch45data }; - -static const unsigned char ch46data[] = { - 0x80 -}; -static const GLUTBitmapChar ch46 = { 1, 1, -1, 0, 3, ch46data }; - -static const unsigned char ch47data[] = { - 0x80,0x80,0x40,0x40,0x40,0x20,0x20,0x10,0x10 -}; -static const GLUTBitmapChar ch47 = { 4, 9, 0, 0, 4, ch47data }; - -static const unsigned char ch48data[] = { - 0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x70 -}; -static const GLUTBitmapChar ch48 = { 5, 9, -1, 0, 7, ch48data }; - -static const unsigned char ch49data[] = { - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xe0,0x20 -}; -static const GLUTBitmapChar ch49 = { 3, 9, -1, 0, 7, ch49data }; - -static const unsigned char ch50data[] = { - 0xf8,0x80,0x80,0x40,0x20,0x10,0x8,0x88,0x70 -}; -static const GLUTBitmapChar ch50 = { 5, 9, -1, 0, 7, ch50data }; - -static const unsigned char ch51data[] = { - 0x70,0x88,0x88,0x8,0x8,0x30,0x8,0x88,0x70 -}; -static const GLUTBitmapChar ch51 = { 5, 9, -1, 0, 7, ch51data }; - -static const unsigned char ch52data[] = { - 0x8,0x8,0xfc,0x88,0x48,0x28,0x28,0x18,0x8 -}; -static const GLUTBitmapChar ch52 = { 6, 9, 0, 0, 7, ch52data }; - -static const unsigned char ch53data[] = { - 0x70,0x88,0x88,0x8,0x8,0xf0,0x80,0x80,0xf8 -}; -static const GLUTBitmapChar ch53 = { 5, 9, -1, 0, 7, ch53data }; - -static const unsigned char ch54data[] = { - 0x70,0x88,0x88,0x88,0xc8,0xb0,0x80,0x88,0x70 -}; -static const GLUTBitmapChar ch54 = { 5, 9, -1, 0, 7, ch54data }; - -static const unsigned char ch55data[] = { - 0x40,0x40,0x20,0x20,0x20,0x10,0x10,0x8,0xf8 -}; -static const GLUTBitmapChar ch55 = { 5, 9, -1, 0, 7, ch55data }; - -static const unsigned char ch56data[] = { - 0x70,0x88,0x88,0x88,0x88,0x70,0x88,0x88,0x70 -}; -static const GLUTBitmapChar ch56 = { 5, 9, -1, 0, 7, ch56data }; - -static const unsigned char ch57data[] = { - 0x70,0x88,0x8,0x8,0x78,0x88,0x88,0x88,0x70 -}; -static const GLUTBitmapChar ch57 = { 5, 9, -1, 0, 7, ch57data }; - -static const unsigned char ch58data[] = { - 0x80,0x0,0x0,0x0,0x0,0x80 -}; -static const GLUTBitmapChar ch58 = { 1, 6, -1, 0, 3, ch58data }; - -static const unsigned char ch59data[] = { - 0x80,0x40,0x40,0x0,0x0,0x0,0x0,0x40 -}; -static const GLUTBitmapChar ch59 = { 2, 8, 0, 2, 3, ch59data }; - -static const unsigned char ch60data[] = { - 0xc,0x30,0xc0,0x30,0xc -}; -static const GLUTBitmapChar ch60 = { 6, 5, 0, -1, 7, ch60data }; - -static const unsigned char ch61data[] = { - 0xf8,0x0,0xf8 -}; -static const GLUTBitmapChar ch61 = { 5, 3, -1, -2, 7, ch61data }; - -static const unsigned char ch62data[] = { - 0xc0,0x30,0xc,0x30,0xc0 -}; -static const GLUTBitmapChar ch62 = { 6, 5, -1, -1, 7, ch62data }; - -static const unsigned char ch63data[] = { - 0x20,0x0,0x20,0x20,0x10,0x10,0x88,0x88,0x70 -}; -static const GLUTBitmapChar ch63 = { 5, 9, -1, 0, 7, ch63data }; - -static const unsigned char ch64data[] = { - 0x3e,0x0,0x40,0x0,0x9b,0x0,0xa6,0x80,0xa2,0x40,0xa2,0x40,0x92,0x40,0x4d,0x40, - 0x60,0x80,0x1f,0x0 -}; -static const GLUTBitmapChar ch64 = { 10, 10, -1, 1, 12, ch64data }; - -static const unsigned char ch65data[] = { - 0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x28,0x10 -}; -static const GLUTBitmapChar ch65 = { 7, 9, -1, 0, 9, ch65data }; - -static const unsigned char ch66data[] = { - 0xf8,0x84,0x84,0x84,0xf8,0x84,0x84,0x84,0xf8 -}; -static const GLUTBitmapChar ch66 = { 6, 9, -1, 0, 8, ch66data }; - -static const unsigned char ch67data[] = { - 0x3c,0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x3c -}; -static const GLUTBitmapChar ch67 = { 7, 9, -1, 0, 9, ch67data }; - -static const unsigned char ch68data[] = { - 0xf8,0x84,0x82,0x82,0x82,0x82,0x82,0x84,0xf8 -}; -static const GLUTBitmapChar ch68 = { 7, 9, -1, 0, 9, ch68data }; - -static const unsigned char ch69data[] = { - 0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc -}; -static const GLUTBitmapChar ch69 = { 6, 9, -1, 0, 8, ch69data }; - -static const unsigned char ch70data[] = { - 0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0xfc -}; -static const GLUTBitmapChar ch70 = { 6, 9, -1, 0, 8, ch70data }; - -static const unsigned char ch71data[] = { - 0x3a,0x46,0x82,0x82,0x8e,0x80,0x80,0x42,0x3c -}; -static const GLUTBitmapChar ch71 = { 7, 9, -1, 0, 9, ch71data }; - -static const unsigned char ch72data[] = { - 0x82,0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x82 -}; -static const GLUTBitmapChar ch72 = { 7, 9, -1, 0, 9, ch72data }; - -static const unsigned char ch73data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch73 = { 1, 9, -1, 0, 3, ch73data }; - -static const unsigned char ch74data[] = { - 0x70,0x88,0x88,0x8,0x8,0x8,0x8,0x8,0x8 -}; -static const GLUTBitmapChar ch74 = { 5, 9, -1, 0, 7, ch74data }; - -static const unsigned char ch75data[] = { - 0x82,0x84,0x88,0x90,0xe0,0xa0,0x90,0x88,0x84 -}; -static const GLUTBitmapChar ch75 = { 7, 9, -1, 0, 8, ch75data }; - -static const unsigned char ch76data[] = { - 0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch76 = { 5, 9, -1, 0, 7, ch76data }; - -static const unsigned char ch77data[] = { - 0x88,0x80,0x88,0x80,0x94,0x80,0x94,0x80,0xa2,0x80,0xa2,0x80,0xc1,0x80,0xc1,0x80, - 0x80,0x80 -}; -static const GLUTBitmapChar ch77 = { 9, 9, -1, 0, 11, ch77data }; - -static const unsigned char ch78data[] = { - 0x82,0x86,0x8a,0x8a,0x92,0xa2,0xa2,0xc2,0x82 -}; -static const GLUTBitmapChar ch78 = { 7, 9, -1, 0, 9, ch78data }; - -static const unsigned char ch79data[] = { - 0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c -}; -static const GLUTBitmapChar ch79 = { 8, 9, -1, 0, 10, ch79data }; - -static const unsigned char ch80data[] = { - 0x80,0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8 -}; -static const GLUTBitmapChar ch80 = { 6, 9, -1, 0, 8, ch80data }; - -static const unsigned char ch81data[] = { - 0x3d,0x42,0x85,0x89,0x81,0x81,0x81,0x42,0x3c -}; -static const GLUTBitmapChar ch81 = { 8, 9, -1, 0, 10, ch81data }; - -static const unsigned char ch82data[] = { - 0x84,0x84,0x84,0x88,0xf8,0x84,0x84,0x84,0xf8 -}; -static const GLUTBitmapChar ch82 = { 6, 9, -1, 0, 8, ch82data }; - -static const unsigned char ch83data[] = { - 0x78,0x84,0x84,0x4,0x18,0x60,0x80,0x84,0x78 -}; -static const GLUTBitmapChar ch83 = { 6, 9, -1, 0, 8, ch83data }; - -static const unsigned char ch84data[] = { - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe -}; -static const GLUTBitmapChar ch84 = { 7, 9, 0, 0, 7, ch84data }; - -static const unsigned char ch85data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84 -}; -static const GLUTBitmapChar ch85 = { 6, 9, -1, 0, 8, ch85data }; - -static const unsigned char ch86data[] = { - 0x10,0x10,0x28,0x28,0x44,0x44,0x44,0x82,0x82 -}; -static const GLUTBitmapChar ch86 = { 7, 9, -1, 0, 9, ch86data }; - -static const unsigned char ch87data[] = { - 0x22,0x0,0x22,0x0,0x22,0x0,0x55,0x0,0x55,0x0,0x49,0x0,0x88,0x80,0x88,0x80, - 0x88,0x80 -}; -static const GLUTBitmapChar ch87 = { 9, 9, -1, 0, 11, ch87data }; - -static const unsigned char ch88data[] = { - 0x82,0x44,0x44,0x28,0x10,0x28,0x44,0x44,0x82 -}; -static const GLUTBitmapChar ch88 = { 7, 9, -1, 0, 9, ch88data }; - -static const unsigned char ch89data[] = { - 0x10,0x10,0x10,0x10,0x28,0x44,0x44,0x82,0x82 -}; -static const GLUTBitmapChar ch89 = { 7, 9, -1, 0, 9, ch89data }; - -static const unsigned char ch90data[] = { - 0xfe,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0xfe -}; -static const GLUTBitmapChar ch90 = { 7, 9, -1, 0, 9, ch90data }; - -static const unsigned char ch91data[] = { - 0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0 -}; -static const GLUTBitmapChar ch91 = { 2, 12, -1, 3, 3, ch91data }; - -static const unsigned char ch92data[] = { - 0x10,0x10,0x20,0x20,0x20,0x40,0x40,0x80,0x80 -}; -static const GLUTBitmapChar ch92 = { 4, 9, 0, 0, 4, ch92data }; - -static const unsigned char ch93data[] = { - 0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0 -}; -static const GLUTBitmapChar ch93 = { 2, 12, 0, 3, 3, ch93data }; - -static const unsigned char ch94data[] = { - 0x88,0x50,0x20 -}; -static const GLUTBitmapChar ch94 = { 5, 3, 0, -5, 6, ch94data }; - -static const unsigned char ch95data[] = { - 0xfe -}; -static const GLUTBitmapChar ch95 = { 7, 1, 0, 2, 7, ch95data }; - -static const unsigned char ch96data[] = { - 0xc0,0x80,0x40 -}; -static const GLUTBitmapChar ch96 = { 2, 3, 0, -6, 3, ch96data }; - -static const unsigned char ch97data[] = { - 0x74,0x88,0x88,0x78,0x8,0x88,0x70 -}; -static const GLUTBitmapChar ch97 = { 6, 7, -1, 0, 7, ch97data }; - -static const unsigned char ch98data[] = { - 0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80 -}; -static const GLUTBitmapChar ch98 = { 5, 9, -1, 0, 7, ch98data }; - -static const unsigned char ch99data[] = { - 0x70,0x88,0x80,0x80,0x80,0x88,0x70 -}; -static const GLUTBitmapChar ch99 = { 5, 7, -1, 0, 7, ch99data }; - -static const unsigned char ch100data[] = { - 0x68,0x98,0x88,0x88,0x88,0x98,0x68,0x8,0x8 -}; -static const GLUTBitmapChar ch100 = { 5, 9, -1, 0, 7, ch100data }; - -static const unsigned char ch101data[] = { - 0x70,0x88,0x80,0xf8,0x88,0x88,0x70 -}; -static const GLUTBitmapChar ch101 = { 5, 7, -1, 0, 7, ch101data }; - -static const unsigned char ch102data[] = { - 0x40,0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x30 -}; -static const GLUTBitmapChar ch102 = { 4, 9, 0, 0, 3, ch102data }; - -static const unsigned char ch103data[] = { - 0x70,0x88,0x8,0x68,0x98,0x88,0x88,0x88,0x98,0x68 -}; -static const GLUTBitmapChar ch103 = { 5, 10, -1, 3, 7, ch103data }; - -static const unsigned char ch104data[] = { - 0x88,0x88,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80 -}; -static const GLUTBitmapChar ch104 = { 5, 9, -1, 0, 7, ch104data }; - -static const unsigned char ch105data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80 -}; -static const GLUTBitmapChar ch105 = { 1, 9, -1, 0, 3, ch105data }; - -static const unsigned char ch106data[] = { - 0x80,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40 -}; -static const GLUTBitmapChar ch106 = { 2, 12, 0, 3, 3, ch106data }; - -static const unsigned char ch107data[] = { - 0x88,0x90,0xa0,0xc0,0xc0,0xa0,0x90,0x80,0x80 -}; -static const GLUTBitmapChar ch107 = { 5, 9, -1, 0, 6, ch107data }; - -static const unsigned char ch108data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch108 = { 1, 9, -1, 0, 3, ch108data }; - -static const unsigned char ch109data[] = { - 0x92,0x92,0x92,0x92,0x92,0xda,0xa4 -}; -static const GLUTBitmapChar ch109 = { 7, 7, -1, 0, 9, ch109data }; - -static const unsigned char ch110data[] = { - 0x88,0x88,0x88,0x88,0x88,0xc8,0xb0 -}; -static const GLUTBitmapChar ch110 = { 5, 7, -1, 0, 7, ch110data }; - -static const unsigned char ch111data[] = { - 0x70,0x88,0x88,0x88,0x88,0x88,0x70 -}; -static const GLUTBitmapChar ch111 = { 5, 7, -1, 0, 7, ch111data }; - -static const unsigned char ch112data[] = { - 0x80,0x80,0x80,0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0 -}; -static const GLUTBitmapChar ch112 = { 5, 10, -1, 3, 7, ch112data }; - -static const unsigned char ch113data[] = { - 0x8,0x8,0x8,0x68,0x98,0x88,0x88,0x88,0x98,0x68 -}; -static const GLUTBitmapChar ch113 = { 5, 10, -1, 3, 7, ch113data }; - -static const unsigned char ch114data[] = { - 0x80,0x80,0x80,0x80,0x80,0xc0,0xa0 -}; -static const GLUTBitmapChar ch114 = { 3, 7, -1, 0, 4, ch114data }; - -static const unsigned char ch115data[] = { - 0x60,0x90,0x10,0x60,0x80,0x90,0x60 -}; -static const GLUTBitmapChar ch115 = { 4, 7, -1, 0, 6, ch115data }; - -static const unsigned char ch116data[] = { - 0x60,0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x40 -}; -static const GLUTBitmapChar ch116 = { 3, 9, 0, 0, 3, ch116data }; - -static const unsigned char ch117data[] = { - 0x68,0x98,0x88,0x88,0x88,0x88,0x88 -}; -static const GLUTBitmapChar ch117 = { 5, 7, -1, 0, 7, ch117data }; - -static const unsigned char ch118data[] = { - 0x20,0x20,0x50,0x50,0x88,0x88,0x88 -}; -static const GLUTBitmapChar ch118 = { 5, 7, -1, 0, 7, ch118data }; - -static const unsigned char ch119data[] = { - 0x22,0x0,0x22,0x0,0x55,0x0,0x49,0x0,0x49,0x0,0x88,0x80,0x88,0x80 -}; -static const GLUTBitmapChar ch119 = { 9, 7, 0, 0, 9, ch119data }; - -static const unsigned char ch120data[] = { - 0x84,0x84,0x48,0x30,0x30,0x48,0x84 -}; -static const GLUTBitmapChar ch120 = { 6, 7, 0, 0, 6, ch120data }; - -static const unsigned char ch121data[] = { - 0x80,0x40,0x20,0x20,0x50,0x50,0x90,0x88,0x88,0x88 -}; -static const GLUTBitmapChar ch121 = { 5, 10, -1, 3, 7, ch121data }; - -static const unsigned char ch122data[] = { - 0xf0,0x80,0x40,0x40,0x20,0x10,0xf0 -}; -static const GLUTBitmapChar ch122 = { 4, 7, -1, 0, 6, ch122data }; - -static const unsigned char ch123data[] = { - 0x30,0x40,0x40,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x40,0x30 -}; -static const GLUTBitmapChar ch123 = { 4, 12, 0, 3, 4, ch123data }; - -static const unsigned char ch124data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch124 = { 1, 12, -1, 3, 3, ch124data }; - -static const unsigned char ch125data[] = { - 0xc0,0x20,0x20,0x20,0x20,0x20,0x10,0x20,0x20,0x20,0x20,0xc0 -}; -static const GLUTBitmapChar ch125 = { 4, 12, 0, 3, 4, ch125data }; - -static const unsigned char ch126data[] = { - 0x98,0x64 -}; -static const GLUTBitmapChar ch126 = { 6, 2, 0, -3, 7, ch126data }; - -static const unsigned char ch160data[] = { - 0x0 -}; -static const GLUTBitmapChar ch160 = { 1, 1, 0, 0, 4, ch160data }; - -static const unsigned char ch161data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80 -}; -static const GLUTBitmapChar ch161 = { 1, 10, -1, 3, 3, ch161data }; - -static const unsigned char ch162data[] = { - 0x40,0x70,0xc8,0xa0,0xa0,0xa0,0xa8,0x70,0x10 -}; -static const GLUTBitmapChar ch162 = { 5, 9, -1, 1, 7, ch162data }; - -static const unsigned char ch163data[] = { - 0xb0,0x48,0x20,0x20,0xf0,0x40,0x40,0x48,0x30 -}; -static const GLUTBitmapChar ch163 = { 5, 9, -1, 0, 7, ch163data }; - -static const unsigned char ch164data[] = { - 0x84,0x78,0x48,0x48,0x78,0x84 -}; -static const GLUTBitmapChar ch164 = { 6, 6, 0, -1, 7, ch164data }; - -static const unsigned char ch165data[] = { - 0x20,0x20,0xf8,0x20,0xf8,0x20,0x50,0x88,0x88 -}; -static const GLUTBitmapChar ch165 = { 5, 9, -1, 0, 7, ch165data }; - -static const unsigned char ch166data[] = { - 0x80,0x80,0x80,0x80,0x0,0x0,0x0,0x80,0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch166 = { 1, 11, -1, 2, 3, ch166data }; - -static const unsigned char ch167data[] = { - 0x70,0x88,0x8,0x30,0x48,0x88,0x88,0x90,0x60,0x80,0x88,0x70 -}; -static const GLUTBitmapChar ch167 = { 5, 12, 0, 3, 6, ch167data }; - -static const unsigned char ch168data[] = { - 0xa0 -}; -static const GLUTBitmapChar ch168 = { 3, 1, 0, -8, 3, ch168data }; - -static const unsigned char ch169data[] = { - 0x3e,0x0,0x41,0x0,0x9c,0x80,0xa2,0x80,0xa0,0x80,0xa2,0x80,0x9c,0x80,0x41,0x0, - 0x3e,0x0 -}; -static const GLUTBitmapChar ch169 = { 9, 9, -1, 0, 11, ch169data }; - -static const unsigned char ch170data[] = { - 0xe0,0x0,0xa0,0x20,0xe0 -}; -static const GLUTBitmapChar ch170 = { 3, 5, -1, -4, 5, ch170data }; - -static const unsigned char ch171data[] = { - 0x28,0x50,0xa0,0x50,0x28 -}; -static const GLUTBitmapChar ch171 = { 5, 5, -1, -1, 7, ch171data }; - -static const unsigned char ch172data[] = { - 0x4,0x4,0x4,0xfc -}; -static const GLUTBitmapChar ch172 = { 6, 4, -1, -2, 8, ch172data }; - -static const unsigned char ch173data[] = { - 0xf0 -}; -static const GLUTBitmapChar ch173 = { 4, 1, 0, -3, 5, ch173data }; - -static const unsigned char ch174data[] = { - 0x3e,0x0,0x41,0x0,0x94,0x80,0x94,0x80,0x98,0x80,0x94,0x80,0x9c,0x80,0x41,0x0, - 0x3e,0x0 -}; -static const GLUTBitmapChar ch174 = { 9, 9, -1, 0, 11, ch174data }; - -static const unsigned char ch175data[] = { - 0xf0 -}; -static const GLUTBitmapChar ch175 = { 4, 1, 0, -8, 4, ch175data }; - -static const unsigned char ch176data[] = { - 0x60,0x90,0x90,0x60 -}; -static const GLUTBitmapChar ch176 = { 4, 4, 0, -4, 5, ch176data }; - -static const unsigned char ch177data[] = { - 0xf8,0x0,0x20,0x20,0xf8,0x20,0x20 -}; -static const GLUTBitmapChar ch177 = { 5, 7, -1, 0, 7, ch177data }; - -static const unsigned char ch178data[] = { - 0xf0,0x40,0x20,0x90,0x60 -}; -static const GLUTBitmapChar ch178 = { 4, 5, 0, -3, 4, ch178data }; - -static const unsigned char ch179data[] = { - 0xc0,0x20,0x40,0x20,0xe0 -}; -static const GLUTBitmapChar ch179 = { 3, 5, 0, -3, 4, ch179data }; - -static const unsigned char ch180data[] = { - 0x80,0x40 -}; -static const GLUTBitmapChar ch180 = { 2, 2, 0, -8, 2, ch180data }; - -static const unsigned char ch181data[] = { - 0x80,0x80,0x80,0xe8,0x98,0x88,0x88,0x88,0x88,0x88 -}; -static const GLUTBitmapChar ch181 = { 5, 10, -1, 3, 7, ch181data }; - -static const unsigned char ch182data[] = { - 0x28,0x28,0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x68,0x3c -}; -static const GLUTBitmapChar ch182 = { 6, 12, 0, 3, 7, ch182data }; - -static const unsigned char ch183data[] = { - 0x80 -}; -static const GLUTBitmapChar ch183 = { 1, 1, -1, -3, 3, ch183data }; - -static const unsigned char ch184data[] = { - 0xc0,0x20,0x20,0x40 -}; -static const GLUTBitmapChar ch184 = { 3, 4, 0, 3, 3, ch184data }; - -static const unsigned char ch185data[] = { - 0x40,0x40,0x40,0xc0,0x40 -}; -static const GLUTBitmapChar ch185 = { 2, 5, -1, -3, 4, ch185data }; - -static const unsigned char ch186data[] = { - 0xe0,0x0,0xe0,0xa0,0xe0 -}; -static const GLUTBitmapChar ch186 = { 3, 5, -1, -4, 5, ch186data }; - -static const unsigned char ch187data[] = { - 0xa0,0x50,0x28,0x50,0xa0 -}; -static const GLUTBitmapChar ch187 = { 5, 5, -1, -1, 7, ch187data }; - -static const unsigned char ch188data[] = { - 0x41,0x0,0x27,0x80,0x15,0x0,0x13,0x0,0x49,0x0,0x44,0x0,0x44,0x0,0xc2,0x0, - 0x41,0x0 -}; -static const GLUTBitmapChar ch188 = { 9, 9, 0, 0, 10, ch188data }; - -static const unsigned char ch189data[] = { - 0x47,0x80,0x22,0x0,0x11,0x0,0x14,0x80,0x4b,0x0,0x48,0x0,0x44,0x0,0xc2,0x0, - 0x41,0x0 -}; -static const GLUTBitmapChar ch189 = { 9, 9, 0, 0, 10, ch189data }; - -static const unsigned char ch190data[] = { - 0x21,0x0,0x17,0x80,0x15,0x0,0xb,0x0,0xc9,0x0,0x24,0x0,0x44,0x0,0x22,0x0, - 0xe1,0x0 -}; -static const GLUTBitmapChar ch190 = { 9, 9, 0, 0, 10, ch190data }; - -static const unsigned char ch191data[] = { - 0x70,0x88,0x88,0x40,0x40,0x20,0x20,0x0,0x20 -}; -static const GLUTBitmapChar ch191 = { 5, 9, -1, 3, 7, ch191data }; - -static const unsigned char ch192data[] = { - 0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x10,0x20 -}; -static const GLUTBitmapChar ch192 = { 7, 12, -1, 0, 9, ch192data }; - -static const unsigned char ch193data[] = { - 0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x10,0x8 -}; -static const GLUTBitmapChar ch193 = { 7, 12, -1, 0, 9, ch193data }; - -static const unsigned char ch194data[] = { - 0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28,0x10 -}; -static const GLUTBitmapChar ch194 = { 7, 12, -1, 0, 9, ch194data }; - -static const unsigned char ch195data[] = { - 0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28,0x14 -}; -static const GLUTBitmapChar ch195 = { 7, 12, -1, 0, 9, ch195data }; - -static const unsigned char ch196data[] = { - 0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28 -}; -static const GLUTBitmapChar ch196 = { 7, 11, -1, 0, 9, ch196data }; - -static const unsigned char ch197data[] = { - 0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x10,0x28,0x10 -}; -static const GLUTBitmapChar ch197 = { 7, 12, -1, 0, 9, ch197data }; - -static const unsigned char ch198data[] = { - 0x8f,0x80,0x88,0x0,0x88,0x0,0x78,0x0,0x4f,0x80,0x48,0x0,0x28,0x0,0x28,0x0, - 0x1f,0x80 -}; -static const GLUTBitmapChar ch198 = { 9, 9, -1, 0, 11, ch198data }; - -static const unsigned char ch199data[] = { - 0x30,0x8,0x8,0x3c,0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x3c -}; -static const GLUTBitmapChar ch199 = { 7, 12, -1, 3, 9, ch199data }; - -static const unsigned char ch200data[] = { - 0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x10,0x20 -}; -static const GLUTBitmapChar ch200 = { 6, 12, -1, 0, 8, ch200data }; - -static const unsigned char ch201data[] = { - 0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x10,0x8 -}; -static const GLUTBitmapChar ch201 = { 6, 12, -1, 0, 8, ch201data }; - -static const unsigned char ch202data[] = { - 0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x28,0x10 -}; -static const GLUTBitmapChar ch202 = { 6, 12, -1, 0, 8, ch202data }; - -static const unsigned char ch203data[] = { - 0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x28 -}; -static const GLUTBitmapChar ch203 = { 6, 11, -1, 0, 8, ch203data }; - -static const unsigned char ch204data[] = { - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80 -}; -static const GLUTBitmapChar ch204 = { 2, 12, 0, 0, 3, ch204data }; - -static const unsigned char ch205data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40 -}; -static const GLUTBitmapChar ch205 = { 2, 12, -1, 0, 3, ch205data }; - -static const unsigned char ch206data[] = { - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40 -}; -static const GLUTBitmapChar ch206 = { 3, 12, 0, 0, 3, ch206data }; - -static const unsigned char ch207data[] = { - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0 -}; -static const GLUTBitmapChar ch207 = { 3, 11, 0, 0, 3, ch207data }; - -static const unsigned char ch208data[] = { - 0x7c,0x42,0x41,0x41,0xf1,0x41,0x41,0x42,0x7c -}; -static const GLUTBitmapChar ch208 = { 8, 9, 0, 0, 9, ch208data }; - -static const unsigned char ch209data[] = { - 0x82,0x86,0x8a,0x8a,0x92,0xa2,0xa2,0xc2,0x82,0x0,0x28,0x14 -}; -static const GLUTBitmapChar ch209 = { 7, 12, -1, 0, 9, ch209data }; - -static const unsigned char ch210data[] = { - 0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x8,0x10 -}; -static const GLUTBitmapChar ch210 = { 8, 12, -1, 0, 10, ch210data }; - -static const unsigned char ch211data[] = { - 0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x8,0x4 -}; -static const GLUTBitmapChar ch211 = { 8, 12, -1, 0, 10, ch211data }; - -static const unsigned char ch212data[] = { - 0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x14,0x8 -}; -static const GLUTBitmapChar ch212 = { 8, 12, -1, 0, 10, ch212data }; - -static const unsigned char ch213data[] = { - 0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x28,0x14 -}; -static const GLUTBitmapChar ch213 = { 8, 12, -1, 0, 10, ch213data }; - -static const unsigned char ch214data[] = { - 0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x24 -}; -static const GLUTBitmapChar ch214 = { 8, 11, -1, 0, 10, ch214data }; - -static const unsigned char ch215data[] = { - 0x88,0x50,0x20,0x50,0x88 -}; -static const GLUTBitmapChar ch215 = { 5, 5, -1, -1, 7, ch215data }; - -static const unsigned char ch216data[] = { - 0x80,0x0,0x5e,0x0,0x21,0x0,0x50,0x80,0x48,0x80,0x44,0x80,0x44,0x80,0x42,0x80, - 0x21,0x0,0x1e,0x80,0x0,0x40 -}; -static const GLUTBitmapChar ch216 = { 10, 11, 0, 1, 10, ch216data }; - -static const unsigned char ch217data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20 -}; -static const GLUTBitmapChar ch217 = { 6, 12, -1, 0, 8, ch217data }; - -static const unsigned char ch218data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x8 -}; -static const GLUTBitmapChar ch218 = { 6, 12, -1, 0, 8, ch218data }; - -static const unsigned char ch219data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x28,0x10 -}; -static const GLUTBitmapChar ch219 = { 6, 12, -1, 0, 8, ch219data }; - -static const unsigned char ch220data[] = { - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48 -}; -static const GLUTBitmapChar ch220 = { 6, 11, -1, 0, 8, ch220data }; - -static const unsigned char ch221data[] = { - 0x10,0x10,0x10,0x10,0x28,0x44,0x44,0x82,0x82,0x0,0x10,0x8 -}; -static const GLUTBitmapChar ch221 = { 7, 12, -1, 0, 9, ch221data }; - -static const unsigned char ch222data[] = { - 0x80,0x80,0xf8,0x84,0x84,0x84,0xf8,0x80,0x80 -}; -static const GLUTBitmapChar ch222 = { 6, 9, -1, 0, 8, ch222data }; - -static const unsigned char ch223data[] = { - 0xb0,0x88,0x88,0x88,0xb0,0x88,0x88,0x88,0x70 -}; -static const GLUTBitmapChar ch223 = { 5, 9, -1, 0, 7, ch223data }; - -static const unsigned char ch224data[] = { - 0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x10,0x20 -}; -static const GLUTBitmapChar ch224 = { 6, 10, -1, 0, 7, ch224data }; - -static const unsigned char ch225data[] = { - 0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x20,0x10 -}; -static const GLUTBitmapChar ch225 = { 6, 10, -1, 0, 7, ch225data }; - -static const unsigned char ch226data[] = { - 0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50,0x20 -}; -static const GLUTBitmapChar ch226 = { 6, 10, -1, 0, 7, ch226data }; - -static const unsigned char ch227data[] = { - 0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50,0x28 -}; -static const GLUTBitmapChar ch227 = { 6, 10, -1, 0, 7, ch227data }; - -static const unsigned char ch228data[] = { - 0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50 -}; -static const GLUTBitmapChar ch228 = { 6, 9, -1, 0, 7, ch228data }; - -static const unsigned char ch229data[] = { - 0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x30,0x48,0x30 -}; -static const GLUTBitmapChar ch229 = { 6, 10, -1, 0, 7, ch229data }; - -static const unsigned char ch230data[] = { - 0x77,0x0,0x88,0x80,0x88,0x0,0x7f,0x80,0x8,0x80,0x88,0x80,0x77,0x0 -}; -static const GLUTBitmapChar ch230 = { 9, 7, -1, 0, 11, ch230data }; - -static const unsigned char ch231data[] = { - 0x60,0x10,0x20,0x70,0x88,0x80,0x80,0x80,0x88,0x70 -}; -static const GLUTBitmapChar ch231 = { 5, 10, -1, 3, 7, ch231data }; - -static const unsigned char ch232data[] = { - 0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x20,0x40 -}; -static const GLUTBitmapChar ch232 = { 5, 10, -1, 0, 7, ch232data }; - -static const unsigned char ch233data[] = { - 0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x20,0x10 -}; -static const GLUTBitmapChar ch233 = { 5, 10, -1, 0, 7, ch233data }; - -static const unsigned char ch234data[] = { - 0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x50,0x20 -}; -static const GLUTBitmapChar ch234 = { 5, 10, -1, 0, 7, ch234data }; - -static const unsigned char ch235data[] = { - 0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x50 -}; -static const GLUTBitmapChar ch235 = { 5, 9, -1, 0, 7, ch235data }; - -static const unsigned char ch236data[] = { - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80 -}; -static const GLUTBitmapChar ch236 = { 2, 10, 0, 0, 3, ch236data }; - -static const unsigned char ch237data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40 -}; -static const GLUTBitmapChar ch237 = { 2, 10, -1, 0, 3, ch237data }; - -static const unsigned char ch238data[] = { - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40 -}; -static const GLUTBitmapChar ch238 = { 3, 10, 0, 0, 3, ch238data }; - -static const unsigned char ch239data[] = { - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0 -}; -static const GLUTBitmapChar ch239 = { 3, 9, 0, 0, 3, ch239data }; - -static const unsigned char ch240data[] = { - 0x70,0x88,0x88,0x88,0x88,0x78,0x8,0x50,0x30,0x68 -}; -static const GLUTBitmapChar ch240 = { 5, 10, -1, 0, 7, ch240data }; - -static const unsigned char ch241data[] = { - 0x88,0x88,0x88,0x88,0x88,0xc8,0xb0,0x0,0x50,0x28 -}; -static const GLUTBitmapChar ch241 = { 5, 10, -1, 0, 7, ch241data }; - -static const unsigned char ch242data[] = { - 0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x40 -}; -static const GLUTBitmapChar ch242 = { 5, 10, -1, 0, 7, ch242data }; - -static const unsigned char ch243data[] = { - 0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x10 -}; -static const GLUTBitmapChar ch243 = { 5, 10, -1, 0, 7, ch243data }; - -static const unsigned char ch244data[] = { - 0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x20 -}; -static const GLUTBitmapChar ch244 = { 5, 10, -1, 0, 7, ch244data }; - -static const unsigned char ch245data[] = { - 0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x28 -}; -static const GLUTBitmapChar ch245 = { 5, 10, -1, 0, 7, ch245data }; - -static const unsigned char ch246data[] = { - 0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50 -}; -static const GLUTBitmapChar ch246 = { 5, 9, -1, 0, 7, ch246data }; - -static const unsigned char ch247data[] = { - 0x20,0x0,0xf8,0x0,0x20 -}; -static const GLUTBitmapChar ch247 = { 5, 5, -1, -1, 7, ch247data }; - -static const unsigned char ch248data[] = { - 0xb8,0x44,0x64,0x54,0x4c,0x44,0x3a -}; -static const GLUTBitmapChar ch248 = { 7, 7, 0, 0, 7, ch248data }; - -static const unsigned char ch249data[] = { - 0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x20,0x40 -}; -static const GLUTBitmapChar ch249 = { 5, 10, -1, 0, 7, ch249data }; - -static const unsigned char ch250data[] = { - 0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x20,0x10 -}; -static const GLUTBitmapChar ch250 = { 5, 10, -1, 0, 7, ch250data }; - -static const unsigned char ch251data[] = { - 0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x50,0x20 -}; -static const GLUTBitmapChar ch251 = { 5, 10, -1, 0, 7, ch251data }; - -static const unsigned char ch252data[] = { - 0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x50 -}; -static const GLUTBitmapChar ch252 = { 5, 9, -1, 0, 7, ch252data }; - -static const unsigned char ch253data[] = { - 0x80,0x40,0x20,0x20,0x50,0x50,0x90,0x88,0x88,0x88,0x0,0x20,0x10 -}; -static const GLUTBitmapChar ch253 = { 5, 13, -1, 3, 7, ch253data }; - -static const unsigned char ch254data[] = { - 0x80,0x80,0x80,0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80 -}; -static const GLUTBitmapChar ch254 = { 5, 12, -1, 3, 7, ch254data }; - -static const unsigned char ch255data[] = { - 0xc0,0x20,0x20,0x20,0x30,0x50,0x50,0x48,0x88,0x88,0x0,0x50 -}; -static const GLUTBitmapChar ch255 = { 5, 12, -1, 3, 7, ch255data }; - - -static const GLUTBitmapChar *chars[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - &ch32, &ch33, &ch34, &ch35, &ch36, &ch37, &ch38, &ch39, - &ch40, &ch41, &ch42, &ch43, &ch44, &ch45, &ch46, &ch47, - &ch48, &ch49, &ch50, &ch51, &ch52, &ch53, &ch54, &ch55, - &ch56, &ch57, &ch58, &ch59, &ch60, &ch61, &ch62, &ch63, - &ch64, &ch65, &ch66, &ch67, &ch68, &ch69, &ch70, &ch71, - &ch72, &ch73, &ch74, &ch75, &ch76, &ch77, &ch78, &ch79, - &ch80, &ch81, &ch82, &ch83, &ch84, &ch85, &ch86, &ch87, - &ch88, &ch89, &ch90, &ch91, &ch92, &ch93, &ch94, &ch95, - &ch96, &ch97, &ch98, &ch99, &ch100, &ch101, &ch102, &ch103, - &ch104, &ch105, &ch106, &ch107, &ch108, &ch109, &ch110, &ch111, - &ch112, &ch113, &ch114, &ch115, &ch116, &ch117, &ch118, &ch119, - &ch120, &ch121, &ch122, &ch123, &ch124, &ch125, &ch126, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - &ch160, &ch161, &ch162, &ch163, &ch164, &ch165, &ch166, &ch167, - &ch168, &ch169, &ch170, &ch171, &ch172, &ch173, &ch174, &ch175, - &ch176, &ch177, &ch178, &ch179, &ch180, &ch181, &ch182, &ch183, - &ch184, &ch185, &ch186, &ch187, &ch188, &ch189, &ch190, &ch191, - &ch192, &ch193, &ch194, &ch195, &ch196, &ch197, &ch198, &ch199, - &ch200, &ch201, &ch202, &ch203, &ch204, &ch205, &ch206, &ch207, - &ch208, &ch209, &ch210, &ch211, &ch212, &ch213, &ch214, &ch215, - &ch216, &ch217, &ch218, &ch219, &ch220, &ch221, &ch222, &ch223, - &ch224, &ch225, &ch226, &ch227, &ch228, &ch229, &ch230, &ch231, - &ch232, &ch233, &ch234, &ch235, &ch236, &ch237, &ch238, &ch239, - &ch240, &ch241, &ch242, &ch243, &ch244, &ch245, &ch246, &ch247, - &ch248, &ch249, &ch250, &ch251, &ch252, &ch253, &ch254, &ch255 -}; - -const GLUTBitmapFont glutBitmapHelvetica12 = { - "-Adobe-Helvetica-Medium-R-Normal--12-120-75-75-P-67-ISO8859-1", - 15, 256, chars -}; diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/hel18.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/hel18.c deleted file mode 100644 index f4d4340e3e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/hel18.c +++ /dev/null @@ -1,1138 +0,0 @@ -/* autogenerated by bdf2c! do not edit */ - -/* "Copyright (c) 1984, 1987 Adobe Systems Incorporated. All Rights Reserved. Copyright (c) 1988, 1991 Digital Equipment Corporation. All Rights Reserved." */ - - -#include "internal.h" -/* -typedef struct { - int width, height; - int xorig, yorig; - int xmove; - const unsigned char *bitmap; -} GLUTBitmapChar; - -typedef struct { - const char *name; - int height; - int num; - const GLUTBitmapChar *const *table; -} GLUTBitmapFont; -*/ - - -static const unsigned char ch32data[] = { - 0x0 -}; -static const GLUTBitmapChar ch32 = { 1, 1, 0, 0, 5, ch32data }; - -static const unsigned char ch33data[] = { - 0xc0,0xc0,0x0,0x0,0x80,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0 -}; -static const GLUTBitmapChar ch33 = { 2, 14, -2, 0, 6, ch33data }; - -static const unsigned char ch34data[] = { - 0x90,0x90,0xd8,0xd8,0xd8 -}; -static const GLUTBitmapChar ch34 = { 5, 5, 0, -9, 5, ch34data }; - -static const unsigned char ch35data[] = { - 0x24,0x0,0x24,0x0,0x24,0x0,0xff,0x80,0xff,0x80,0x12,0x0,0x12,0x0,0x12,0x0, - 0x7f,0xc0,0x7f,0xc0,0x9,0x0,0x9,0x0,0x9,0x0 -}; -static const GLUTBitmapChar ch35 = { 10, 13, 0, 0, 10, ch35data }; - -static const unsigned char ch36data[] = { - 0x8,0x0,0x8,0x0,0x3e,0x0,0x7f,0x0,0xeb,0x80,0xc9,0x80,0x9,0x80,0xf,0x0, - 0x3e,0x0,0x78,0x0,0xe8,0x0,0xc8,0x0,0xcb,0x0,0x7f,0x0,0x3e,0x0,0x8,0x0 -}; -static const GLUTBitmapChar ch36 = { 9, 16, -1, 2, 10, ch36data }; - -static const unsigned char ch37data[] = { - 0x18,0x78,0x18,0xfc,0xc,0xcc,0xc,0xcc,0x6,0xfc,0x6,0x78,0x3,0x0,0x7b,0x0, - 0xfd,0x80,0xcd,0x80,0xcc,0xc0,0xfc,0xc0,0x78,0x60 -}; -static const GLUTBitmapChar ch37 = { 14, 13, -1, 0, 16, ch37data }; - -static const unsigned char ch38data[] = { - 0x3c,0x70,0x7e,0xe0,0xe7,0xc0,0xc3,0x80,0xc3,0xc0,0xc6,0xc0,0xee,0xc0,0x7c,0x0, - 0x3c,0x0,0x66,0x0,0x66,0x0,0x7e,0x0,0x3c,0x0 -}; -static const GLUTBitmapChar ch38 = { 12, 13, -1, 0, 13, ch38data }; - -static const unsigned char ch39data[] = { - 0x80,0x40,0x40,0xc0,0xc0 -}; -static const GLUTBitmapChar ch39 = { 2, 5, -1, -9, 4, ch39data }; - -static const unsigned char ch40data[] = { - 0x10,0x30,0x60,0x60,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x60,0x60, - 0x30,0x10 -}; -static const GLUTBitmapChar ch40 = { 4, 18, -1, 4, 6, ch40data }; - -static const unsigned char ch41data[] = { - 0x80,0xc0,0x60,0x60,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x60,0x60, - 0xc0,0x80 -}; -static const GLUTBitmapChar ch41 = { 4, 18, -1, 4, 6, ch41data }; - -static const unsigned char ch42data[] = { - 0x88,0x70,0x70,0xf8,0x20,0x20 -}; -static const GLUTBitmapChar ch42 = { 5, 6, -1, -8, 7, ch42data }; - -static const unsigned char ch43data[] = { - 0x18,0x18,0x18,0x18,0xff,0xff,0x18,0x18,0x18,0x18 -}; -static const GLUTBitmapChar ch43 = { 8, 10, -1, 0, 10, ch43data }; - -static const unsigned char ch44data[] = { - 0x80,0x40,0x40,0xc0,0xc0 -}; -static const GLUTBitmapChar ch44 = { 2, 5, -1, 3, 5, ch44data }; - -static const unsigned char ch45data[] = { - 0xff,0xff -}; -static const GLUTBitmapChar ch45 = { 8, 2, -1, -4, 11, ch45data }; - -static const unsigned char ch46data[] = { - 0xc0,0xc0 -}; -static const GLUTBitmapChar ch46 = { 2, 2, -1, 0, 5, ch46data }; - -static const unsigned char ch47data[] = { - 0xc0,0xc0,0x40,0x40,0x60,0x60,0x20,0x20,0x30,0x30,0x10,0x10,0x18,0x18 -}; -static const GLUTBitmapChar ch47 = { 5, 14, 0, 0, 5, ch47data }; - -static const unsigned char ch48data[] = { - 0x3c,0x7e,0x66,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x66,0x7e,0x3c -}; -static const GLUTBitmapChar ch48 = { 8, 13, -1, 0, 10, ch48data }; - -static const unsigned char ch49data[] = { - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0xf8,0x18 -}; -static const GLUTBitmapChar ch49 = { 5, 13, -2, 0, 10, ch49data }; - -static const unsigned char ch50data[] = { - 0xff,0xff,0xc0,0xe0,0x70,0x38,0x1c,0xe,0x7,0x3,0xc3,0xfe,0x3c -}; -static const GLUTBitmapChar ch50 = { 8, 13, -1, 0, 10, ch50data }; - -static const unsigned char ch51data[] = { - 0x3c,0x7e,0xc7,0xc3,0x3,0x7,0x1e,0x1c,0x6,0xc3,0xc3,0x7e,0x3c -}; -static const GLUTBitmapChar ch51 = { 8, 13, -1, 0, 10, ch51data }; - -static const unsigned char ch52data[] = { - 0x3,0x0,0x3,0x0,0x3,0x0,0xff,0x80,0xff,0x80,0xc3,0x0,0x63,0x0,0x33,0x0, - 0x33,0x0,0x1b,0x0,0xf,0x0,0x7,0x0,0x3,0x0 -}; -static const GLUTBitmapChar ch52 = { 9, 13, -1, 0, 10, ch52data }; - -static const unsigned char ch53data[] = { - 0x7c,0xfe,0xc7,0xc3,0x3,0x3,0xc7,0xfe,0xfc,0xc0,0xc0,0xfe,0xfe -}; -static const GLUTBitmapChar ch53 = { 8, 13, -1, 0, 10, ch53data }; - -static const unsigned char ch54data[] = { - 0x3c,0x7e,0xe3,0xc3,0xc3,0xc3,0xfe,0xdc,0xc0,0xc0,0x63,0x7f,0x3c -}; -static const GLUTBitmapChar ch54 = { 8, 13, -1, 0, 10, ch54data }; - -static const unsigned char ch55data[] = { - 0x60,0x60,0x30,0x30,0x30,0x18,0x18,0xc,0xc,0x6,0x3,0xff,0xff -}; -static const GLUTBitmapChar ch55 = { 8, 13, -1, 0, 10, ch55data }; - -static const unsigned char ch56data[] = { - 0x3c,0x7e,0xe7,0xc3,0xc3,0x66,0x7e,0x66,0xc3,0xc3,0xe7,0x7e,0x3c -}; -static const GLUTBitmapChar ch56 = { 8, 13, -1, 0, 10, ch56data }; - -static const unsigned char ch57data[] = { - 0x7c,0xfe,0xc6,0x3,0x3,0x3b,0x7f,0xc3,0xc3,0xc3,0xc7,0x7e,0x3c -}; -static const GLUTBitmapChar ch57 = { 8, 13, -1, 0, 10, ch57data }; - -static const unsigned char ch58data[] = { - 0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0 -}; -static const GLUTBitmapChar ch58 = { 2, 10, -1, 0, 5, ch58data }; - -static const unsigned char ch59data[] = { - 0x80,0x40,0x40,0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0 -}; -static const GLUTBitmapChar ch59 = { 2, 13, -1, 3, 5, ch59data }; - -static const unsigned char ch60data[] = { - 0x3,0xf,0x3c,0x70,0xc0,0x70,0x3c,0xf,0x3 -}; -static const GLUTBitmapChar ch60 = { 8, 9, -1, 0, 10, ch60data }; - -static const unsigned char ch61data[] = { - 0xfe,0xfe,0x0,0x0,0xfe,0xfe -}; -static const GLUTBitmapChar ch61 = { 7, 6, -2, -2, 11, ch61data }; - -static const unsigned char ch62data[] = { - 0xc0,0xf0,0x3c,0xe,0x3,0xe,0x3c,0xf0,0xc0 -}; -static const GLUTBitmapChar ch62 = { 8, 9, -1, 0, 10, ch62data }; - -static const unsigned char ch63data[] = { - 0x30,0x30,0x0,0x0,0x30,0x30,0x30,0x38,0x1c,0xe,0xc6,0xc6,0xfe,0x7c -}; -static const GLUTBitmapChar ch63 = { 7, 14, -1, 0, 10, ch63data }; - -static const unsigned char ch64data[] = { - 0x7,0xe0,0x1f,0xf0,0x38,0x0,0x70,0x0,0x67,0x70,0xcf,0xf8,0xcc,0xcc,0xcc,0x66, - 0xcc,0x66,0xcc,0x63,0xc6,0x33,0x67,0x73,0x63,0xb3,0x30,0x6,0x1c,0xe,0xf,0xfc, - 0x3,0xf0 -}; -static const GLUTBitmapChar ch64 = { 16, 17, -1, 3, 18, ch64data }; - -static const unsigned char ch65data[] = { - 0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, - 0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0 -}; -static const GLUTBitmapChar ch65 = { 12, 14, 0, 0, 12, ch65data }; - -static const unsigned char ch66data[] = { - 0xff,0x80,0xff,0xc0,0xc0,0xe0,0xc0,0x60,0xc0,0x60,0xc0,0xe0,0xff,0xc0,0xff,0x80, - 0xc1,0x80,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0 -}; -static const GLUTBitmapChar ch66 = { 11, 14, -1, 0, 13, ch66data }; - -static const unsigned char ch67data[] = { - 0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, - 0xc0,0x0,0xe0,0x0,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80 -}; -static const GLUTBitmapChar ch67 = { 12, 14, -1, 0, 14, ch67data }; - -static const unsigned char ch68data[] = { - 0xff,0x0,0xff,0x80,0xc1,0xc0,0xc0,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, - 0xc0,0x60,0xc0,0x60,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0 -}; -static const GLUTBitmapChar ch68 = { 11, 14, -1, 0, 13, ch68data }; - -static const unsigned char ch69data[] = { - 0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, - 0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80 -}; -static const GLUTBitmapChar ch69 = { 9, 14, -1, 0, 11, ch69data }; - -static const unsigned char ch70data[] = { - 0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, - 0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80 -}; -static const GLUTBitmapChar ch70 = { 9, 14, -1, 0, 11, ch70data }; - -static const unsigned char ch71data[] = { - 0xf,0xb0,0x3f,0xf0,0x70,0x70,0x60,0x30,0xe0,0x30,0xc1,0xf0,0xc1,0xf0,0xc0,0x0, - 0xc0,0x0,0xe0,0x30,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80 -}; -static const GLUTBitmapChar ch71 = { 12, 14, -1, 0, 14, ch71data }; - -static const unsigned char ch72data[] = { - 0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xff,0xe0,0xff,0xe0, - 0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60 -}; -static const GLUTBitmapChar ch72 = { 11, 14, -1, 0, 13, ch72data }; - -static const unsigned char ch73data[] = { - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0 -}; -static const GLUTBitmapChar ch73 = { 2, 14, -2, 0, 6, ch73data }; - -static const unsigned char ch74data[] = { - 0x3c,0x7e,0xe7,0xc3,0xc3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3 -}; -static const GLUTBitmapChar ch74 = { 8, 14, -1, 0, 10, ch74data }; - -static const unsigned char ch75data[] = { - 0xc0,0x70,0xc0,0xe0,0xc1,0xc0,0xc3,0x80,0xc7,0x0,0xce,0x0,0xfc,0x0,0xf8,0x0, - 0xdc,0x0,0xce,0x0,0xc7,0x0,0xc3,0x80,0xc1,0xc0,0xc0,0xe0 -}; -static const GLUTBitmapChar ch75 = { 12, 14, -1, 0, 13, ch75data }; - -static const unsigned char ch76data[] = { - 0xff,0xff,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0 -}; -static const GLUTBitmapChar ch76 = { 8, 14, -1, 0, 10, ch76data }; - -static const unsigned char ch77data[] = { - 0xc3,0xc,0xc3,0xc,0xc7,0x8c,0xc4,0x8c,0xcc,0xcc,0xcc,0xcc,0xd8,0x6c,0xd8,0x6c, - 0xf0,0x3c,0xf0,0x3c,0xe0,0x1c,0xe0,0x1c,0xc0,0xc,0xc0,0xc -}; -static const GLUTBitmapChar ch77 = { 14, 14, -1, 0, 16, ch77data }; - -static const unsigned char ch78data[] = { - 0xc0,0x60,0xc0,0xe0,0xc1,0xe0,0xc1,0xe0,0xc3,0x60,0xc6,0x60,0xc6,0x60,0xcc,0x60, - 0xcc,0x60,0xd8,0x60,0xf0,0x60,0xf0,0x60,0xe0,0x60,0xc0,0x60 -}; -static const GLUTBitmapChar ch78 = { 11, 14, -1, 0, 13, ch78data }; - -static const unsigned char ch79data[] = { - 0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, - 0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80 -}; -static const GLUTBitmapChar ch79 = { 13, 14, -1, 0, 15, ch79data }; - -static const unsigned char ch80data[] = { - 0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x80, - 0xc1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0 -}; -static const GLUTBitmapChar ch80 = { 10, 14, -1, 0, 12, ch80data }; - -static const unsigned char ch81data[] = { - 0x0,0x30,0xf,0xb0,0x3f,0xe0,0x70,0xf0,0x61,0xb0,0xe1,0xb8,0xc0,0x18,0xc0,0x18, - 0xc0,0x18,0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80 -}; -static const GLUTBitmapChar ch81 = { 13, 15, -1, 1, 15, ch81data }; - -static const unsigned char ch82data[] = { - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0x80,0xc1,0x80,0xff,0x0,0xff,0x80, - 0xc1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0 -}; -static const GLUTBitmapChar ch82 = { 10, 14, -1, 0, 12, ch82data }; - -static const unsigned char ch83data[] = { - 0x3f,0x0,0x7f,0xc0,0xe0,0xe0,0xc0,0x60,0x0,0x60,0x0,0xe0,0x3,0xc0,0x1f,0x0, - 0x7c,0x0,0xe0,0x0,0xc0,0x60,0xe0,0xe0,0x7f,0xc0,0x1f,0x0 -}; -static const GLUTBitmapChar ch83 = { 11, 14, -1, 0, 13, ch83data }; - -static const unsigned char ch84data[] = { - 0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0, - 0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xff,0xc0,0xff,0xc0 -}; -static const GLUTBitmapChar ch84 = { 10, 14, -1, 0, 12, ch84data }; - -static const unsigned char ch85data[] = { - 0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, - 0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60 -}; -static const GLUTBitmapChar ch85 = { 11, 14, -1, 0, 13, ch85data }; - -static const unsigned char ch86data[] = { - 0x6,0x0,0xf,0x0,0xf,0x0,0x19,0x80,0x19,0x80,0x19,0x80,0x30,0xc0,0x30,0xc0, - 0x30,0xc0,0x60,0x60,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30 -}; -static const GLUTBitmapChar ch86 = { 12, 14, -1, 0, 14, ch86data }; - -static const unsigned char ch87data[] = { - 0x18,0x18,0x18,0x18,0x1c,0x38,0x34,0x2c,0x36,0x6c,0x36,0x6c,0x66,0x66,0x66,0x66, - 0x62,0x46,0x63,0xc6,0xc3,0xc3,0xc1,0x83,0xc1,0x83,0xc1,0x83 -}; -static const GLUTBitmapChar ch87 = { 16, 14, -1, 0, 18, ch87data }; - -static const unsigned char ch88data[] = { - 0xc0,0x60,0xe0,0xe0,0x60,0xc0,0x71,0xc0,0x31,0x80,0x1b,0x0,0xe,0x0,0xe,0x0, - 0x1b,0x0,0x31,0x80,0x71,0xc0,0x60,0xc0,0xe0,0xe0,0xc0,0x60 -}; -static const GLUTBitmapChar ch88 = { 11, 14, -1, 0, 13, ch88data }; - -static const unsigned char ch89data[] = { - 0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80, - 0x30,0xc0,0x30,0xc0,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30 -}; -static const GLUTBitmapChar ch89 = { 12, 14, -1, 0, 14, ch89data }; - -static const unsigned char ch90data[] = { - 0xff,0xc0,0xff,0xc0,0xc0,0x0,0x60,0x0,0x30,0x0,0x18,0x0,0x1c,0x0,0xc,0x0, - 0x6,0x0,0x3,0x0,0x1,0x80,0x0,0xc0,0xff,0xc0,0xff,0xc0 -}; -static const GLUTBitmapChar ch90 = { 10, 14, -1, 0, 12, ch90data }; - -static const unsigned char ch91data[] = { - 0xf0,0xf0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xf0,0xf0 -}; -static const GLUTBitmapChar ch91 = { 4, 18, -1, 4, 5, ch91data }; - -static const unsigned char ch92data[] = { - 0x18,0x18,0x10,0x10,0x30,0x30,0x20,0x20,0x60,0x60,0x40,0x40,0xc0,0xc0 -}; -static const GLUTBitmapChar ch92 = { 5, 14, 0, 0, 5, ch92data }; - -static const unsigned char ch93data[] = { - 0xf0,0xf0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, - 0xf0,0xf0 -}; -static const GLUTBitmapChar ch93 = { 4, 18, 0, 4, 5, ch93data }; - -static const unsigned char ch94data[] = { - 0x82,0xc6,0x6c,0x38,0x10 -}; -static const GLUTBitmapChar ch94 = { 7, 5, -1, -8, 9, ch94data }; - -static const unsigned char ch95data[] = { - 0xff,0xc0,0xff,0xc0 -}; -static const GLUTBitmapChar ch95 = { 10, 2, 0, 4, 10, ch95data }; - -static const unsigned char ch96data[] = { - 0xc0,0xc0,0x80,0x80,0x40 -}; -static const GLUTBitmapChar ch96 = { 2, 5, -1, -9, 4, ch96data }; - -static const unsigned char ch97data[] = { - 0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c -}; -static const GLUTBitmapChar ch97 = { 7, 10, -1, 0, 9, ch97data }; - -static const unsigned char ch98data[] = { - 0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0, - 0xff,0x0,0xde,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0 -}; -static const GLUTBitmapChar ch98 = { 9, 14, -1, 0, 11, ch98data }; - -static const unsigned char ch99data[] = { - 0x3e,0x7f,0x63,0xc0,0xc0,0xc0,0xc0,0x63,0x7f,0x3e -}; -static const GLUTBitmapChar ch99 = { 8, 10, -1, 0, 10, ch99data }; - -static const unsigned char ch100data[] = { - 0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x80, - 0x7f,0x80,0x3d,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80 -}; -static const GLUTBitmapChar ch100 = { 9, 14, -1, 0, 11, ch100data }; - -static const unsigned char ch101data[] = { - 0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c -}; -static const GLUTBitmapChar ch101 = { 8, 10, -1, 0, 10, ch101data }; - -static const unsigned char ch102data[] = { - 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfc,0xfc,0x30,0x30,0x3c,0x1c -}; -static const GLUTBitmapChar ch102 = { 6, 14, 0, 0, 6, ch102data }; - -static const unsigned char ch103data[] = { - 0x1c,0x0,0x7f,0x0,0x63,0x0,0x1,0x80,0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80, - 0xc1,0x80,0xc1,0x80,0xc1,0x80,0x61,0x80,0x7f,0x80,0x3d,0x80 -}; -static const GLUTBitmapChar ch103 = { 9, 14, -1, 4, 11, ch103data }; - -static const unsigned char ch104data[] = { - 0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce,0xc0,0xc0,0xc0,0xc0 -}; -static const GLUTBitmapChar ch104 = { 8, 14, -1, 0, 10, ch104data }; - -static const unsigned char ch105data[] = { - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0xc0,0xc0 -}; -static const GLUTBitmapChar ch105 = { 2, 14, -1, 0, 4, ch105data }; - -static const unsigned char ch106data[] = { - 0xe0,0xf0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0x0, - 0x30,0x30 -}; -static const GLUTBitmapChar ch106 = { 4, 18, 1, 4, 4, ch106data }; - -static const unsigned char ch107data[] = { - 0xc7,0xc6,0xce,0xcc,0xd8,0xf8,0xf0,0xd8,0xcc,0xc6,0xc0,0xc0,0xc0,0xc0 -}; -static const GLUTBitmapChar ch107 = { 8, 14, -1, 0, 9, ch107data }; - -static const unsigned char ch108data[] = { - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0 -}; -static const GLUTBitmapChar ch108 = { 2, 14, -1, 0, 4, ch108data }; - -static const unsigned char ch109data[] = { - 0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xe7,0x30, - 0xde,0xf0,0xcc,0x60 -}; -static const GLUTBitmapChar ch109 = { 12, 10, -1, 0, 14, ch109data }; - -static const unsigned char ch110data[] = { - 0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce -}; -static const GLUTBitmapChar ch110 = { 8, 10, -1, 0, 10, ch110data }; - -static const unsigned char ch111data[] = { - 0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, - 0x7f,0x0,0x3e,0x0 -}; -static const GLUTBitmapChar ch111 = { 9, 10, -1, 0, 11, ch111data }; - -static const unsigned char ch112data[] = { - 0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80, - 0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0,0xff,0x0,0xde,0x0 -}; -static const GLUTBitmapChar ch112 = { 9, 14, -1, 4, 11, ch112data }; - -static const unsigned char ch113data[] = { - 0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80, - 0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x80,0x7f,0x80,0x3d,0x80 -}; -static const GLUTBitmapChar ch113 = { 9, 14, -1, 4, 11, ch113data }; - -static const unsigned char ch114data[] = { - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xe0,0xd8,0xd8 -}; -static const GLUTBitmapChar ch114 = { 5, 10, -1, 0, 6, ch114data }; - -static const unsigned char ch115data[] = { - 0x78,0xfc,0xc6,0x6,0x3e,0xfc,0xc0,0xc6,0x7e,0x3c -}; -static const GLUTBitmapChar ch115 = { 7, 10, -1, 0, 9, ch115data }; - -static const unsigned char ch116data[] = { - 0x18,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0xfc,0xfc,0x30,0x30,0x30 -}; -static const GLUTBitmapChar ch116 = { 6, 13, 0, 0, 6, ch116data }; - -static const unsigned char ch117data[] = { - 0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3 -}; -static const GLUTBitmapChar ch117 = { 8, 10, -1, 0, 10, ch117data }; - -static const unsigned char ch118data[] = { - 0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3 -}; -static const GLUTBitmapChar ch118 = { 8, 10, -1, 0, 10, ch118data }; - -static const unsigned char ch119data[] = { - 0x19,0x80,0x19,0x80,0x39,0xc0,0x29,0x40,0x69,0x60,0x66,0x60,0x66,0x60,0xc6,0x30, - 0xc6,0x30,0xc6,0x30 -}; -static const GLUTBitmapChar ch119 = { 12, 10, -1, 0, 14, ch119data }; - -static const unsigned char ch120data[] = { - 0xc3,0xe7,0x66,0x3c,0x18,0x18,0x3c,0x66,0xe7,0xc3 -}; -static const GLUTBitmapChar ch120 = { 8, 10, -1, 0, 10, ch120data }; - -static const unsigned char ch121data[] = { - 0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3 -}; -static const GLUTBitmapChar ch121 = { 8, 14, -1, 4, 10, ch121data }; - -static const unsigned char ch122data[] = { - 0xfe,0xfe,0xc0,0x60,0x30,0x18,0xc,0x6,0xfe,0xfe -}; -static const GLUTBitmapChar ch122 = { 7, 10, -1, 0, 9, ch122data }; - -static const unsigned char ch123data[] = { - 0xc,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x60,0xc0,0x60,0x30,0x30,0x30,0x30,0x30, - 0x18,0xc -}; -static const GLUTBitmapChar ch123 = { 6, 18, 0, 4, 6, ch123data }; - -static const unsigned char ch124data[] = { - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0 -}; -static const GLUTBitmapChar ch124 = { 2, 18, -1, 4, 4, ch124data }; - -static const unsigned char ch125data[] = { - 0xc0,0x60,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0xc,0x18,0x30,0x30,0x30,0x30,0x30, - 0x60,0xc0 -}; -static const GLUTBitmapChar ch125 = { 6, 18, 0, 4, 6, ch125data }; - -static const unsigned char ch126data[] = { - 0xcc,0x7e,0x33 -}; -static const GLUTBitmapChar ch126 = { 8, 3, -1, -4, 10, ch126data }; - -static const unsigned char ch160data[] = { - 0x0 -}; -static const GLUTBitmapChar ch160 = { 1, 1, 0, 0, 5, ch160data }; - -static const unsigned char ch161data[] = { - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x40,0x40,0x0,0x0,0xc0,0xc0 -}; -static const GLUTBitmapChar ch161 = { 2, 14, -2, 4, 6, ch161data }; - -static const unsigned char ch162data[] = { - 0x10,0x10,0x3e,0x7f,0x6b,0xc8,0xc8,0xc8,0xc8,0x6b,0x7f,0x3e,0x4,0x4 -}; -static const GLUTBitmapChar ch162 = { 8, 14, -1, 2, 10, ch162data }; - -static const unsigned char ch163data[] = { - 0xdf,0x0,0xff,0x80,0x60,0x80,0x30,0x0,0x18,0x0,0x18,0x0,0x7e,0x0,0x30,0x0, - 0x60,0x0,0x61,0x80,0x61,0x80,0x3f,0x0,0x1e,0x0 -}; -static const GLUTBitmapChar ch163 = { 9, 13, 0, 0, 10, ch163data }; - -static const unsigned char ch164data[] = { - 0xc3,0xff,0x66,0x66,0x66,0xff,0xc3 -}; -static const GLUTBitmapChar ch164 = { 8, 7, -1, -3, 10, ch164data }; - -static const unsigned char ch165data[] = { - 0x18,0x18,0x18,0x18,0xff,0x18,0xff,0x3c,0x66,0x66,0x66,0xc3,0xc3 -}; -static const GLUTBitmapChar ch165 = { 8, 13, -1, 0, 10, ch165data }; - -static const unsigned char ch166data[] = { - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0 -}; -static const GLUTBitmapChar ch166 = { 2, 17, -1, 3, 4, ch166data }; - -static const unsigned char ch167data[] = { - 0x3c,0x7e,0xc3,0xc3,0x7,0xe,0x3e,0x73,0xe3,0xc3,0xc7,0x6e,0x7c,0xf0,0xc3,0xc3, - 0x7e,0x3c -}; -static const GLUTBitmapChar ch167 = { 8, 18, -1, 4, 10, ch167data }; - -static const unsigned char ch168data[] = { - 0xd8,0xd8 -}; -static const GLUTBitmapChar ch168 = { 5, 2, 0, -11, 6, ch168data }; - -static const unsigned char ch169data[] = { - 0xf,0x80,0x30,0x60,0x40,0x10,0x47,0x10,0x88,0x88,0x90,0x8,0x90,0x8,0x90,0x8, - 0x88,0x88,0x47,0x10,0x40,0x10,0x30,0x60,0xf,0x80 -}; -static const GLUTBitmapChar ch169 = { 13, 13, -1, 0, 15, ch169data }; - -static const unsigned char ch170data[] = { - 0xf8,0x0,0x68,0xd8,0x48,0x38,0xc8,0x70 -}; -static const GLUTBitmapChar ch170 = { 5, 8, -1, -6, 7, ch170data }; - -static const unsigned char ch171data[] = { - 0x12,0x36,0x6c,0xd8,0xd8,0x6c,0x36,0x12 -}; -static const GLUTBitmapChar ch171 = { 7, 8, -1, -1, 9, ch171data }; - -static const unsigned char ch172data[] = { - 0x1,0x80,0x1,0x80,0x1,0x80,0xff,0x80,0xff,0x80 -}; -static const GLUTBitmapChar ch172 = { 9, 5, -1, -3, 11, ch172data }; - -static const unsigned char ch173data[] = { - 0xf8,0xf8 -}; -static const GLUTBitmapChar ch173 = { 5, 2, -1, -4, 7, ch173data }; - -static const unsigned char ch174data[] = { - 0xf,0x80,0x30,0x60,0x40,0x10,0x48,0x50,0x88,0x88,0x89,0x8,0x8f,0x88,0x88,0x48, - 0x88,0x48,0x4f,0x90,0x40,0x10,0x30,0x60,0xf,0x80 -}; -static const GLUTBitmapChar ch174 = { 13, 13, -1, 0, 14, ch174data }; - -static const unsigned char ch175data[] = { - 0xf8 -}; -static const GLUTBitmapChar ch175 = { 5, 1, 0, -12, 5, ch175data }; - -static const unsigned char ch176data[] = { - 0x70,0xd8,0x88,0xd8,0x70 -}; -static const GLUTBitmapChar ch176 = { 5, 5, -1, -8, 7, ch176data }; - -static const unsigned char ch177data[] = { - 0xff,0xff,0x0,0x18,0x18,0x18,0xff,0xff,0x18,0x18,0x18 -}; -static const GLUTBitmapChar ch177 = { 8, 11, -1, 0, 10, ch177data }; - -static const unsigned char ch178data[] = { - 0xf8,0xf8,0x60,0x30,0x18,0x98,0xf8,0x70 -}; -static const GLUTBitmapChar ch178 = { 5, 8, 0, -5, 6, ch178data }; - -static const unsigned char ch179data[] = { - 0x70,0xf8,0x98,0x30,0x30,0x98,0xf8,0x70 -}; -static const GLUTBitmapChar ch179 = { 5, 8, 0, -5, 6, ch179data }; - -static const unsigned char ch180data[] = { - 0xc0,0x60,0x30 -}; -static const GLUTBitmapChar ch180 = { 4, 3, 0, -11, 4, ch180data }; - -static const unsigned char ch181data[] = { - 0xc0,0xc0,0xc0,0xc0,0xdb,0xff,0xe7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3 -}; -static const GLUTBitmapChar ch181 = { 8, 14, -1, 4, 10, ch181data }; - -static const unsigned char ch182data[] = { - 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x32,0x72,0xf2,0xf2,0xf2,0xf2, - 0x72,0x3f -}; -static const GLUTBitmapChar ch182 = { 8, 18, -1, 4, 10, ch182data }; - -static const unsigned char ch183data[] = { - 0xc0,0xc0 -}; -static const GLUTBitmapChar ch183 = { 2, 2, -1, -4, 4, ch183data }; - -static const unsigned char ch184data[] = { - 0xf0,0xd8,0x18,0x70,0x60 -}; -static const GLUTBitmapChar ch184 = { 5, 5, 0, 4, 5, ch184data }; - -static const unsigned char ch185data[] = { - 0x60,0x60,0x60,0x60,0x60,0xe0,0xe0,0x60 -}; -static const GLUTBitmapChar ch185 = { 3, 8, -1, -5, 6, ch185data }; - -static const unsigned char ch186data[] = { - 0xf8,0x0,0x70,0xd8,0x88,0x88,0xd8,0x70 -}; -static const GLUTBitmapChar ch186 = { 5, 8, -1, -6, 7, ch186data }; - -static const unsigned char ch187data[] = { - 0x90,0xd8,0x6c,0x36,0x36,0x6c,0xd8,0x90 -}; -static const GLUTBitmapChar ch187 = { 7, 8, -1, -1, 9, ch187data }; - -static const unsigned char ch188data[] = { - 0x30,0x30,0x30,0x30,0x19,0xf8,0xd,0xb0,0xc,0xf0,0x66,0x70,0x62,0x30,0x63,0x10, - 0x61,0x80,0x61,0x80,0xe0,0xc0,0xe0,0x60,0x60,0x60 -}; -static const GLUTBitmapChar ch188 = { 13, 13, -1, 0, 15, ch188data }; - -static const unsigned char ch189data[] = { - 0x30,0xf8,0x30,0xf8,0x18,0x60,0xc,0x30,0xc,0x18,0x66,0x98,0x62,0xf8,0x63,0x70, - 0x61,0x80,0x61,0x80,0xe0,0xc0,0xe0,0x60,0x60,0x60 -}; -static const GLUTBitmapChar ch189 = { 13, 13, -1, 0, 15, ch189data }; - -static const unsigned char ch190data[] = { - 0x18,0x18,0x18,0x18,0xc,0xfc,0x6,0xd8,0x6,0x78,0x73,0x38,0xf9,0x18,0x99,0x88, - 0x30,0xc0,0x30,0xc0,0x98,0x60,0xf8,0x30,0x70,0x30 -}; -static const GLUTBitmapChar ch190 = { 14, 13, 0, 0, 15, ch190data }; - -static const unsigned char ch191data[] = { - 0x7c,0xfe,0xc6,0xc6,0xe0,0x70,0x38,0x18,0x18,0x18,0x0,0x0,0x18,0x18 -}; -static const GLUTBitmapChar ch191 = { 7, 14, -1, 4, 10, ch191data }; - -static const unsigned char ch192data[] = { - 0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, - 0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x6,0x0, - 0xc,0x0,0x18,0x0 -}; -static const GLUTBitmapChar ch192 = { 12, 18, 0, 0, 12, ch192data }; - -static const unsigned char ch193data[] = { - 0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, - 0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x6,0x0, - 0x3,0x0,0x1,0x80 -}; -static const GLUTBitmapChar ch193 = { 12, 18, 0, 0, 12, ch193data }; - -static const unsigned char ch194data[] = { - 0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, - 0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x19,0x80, - 0xf,0x0,0x6,0x0 -}; -static const GLUTBitmapChar ch194 = { 12, 18, 0, 0, 12, ch194data }; - -static const unsigned char ch195data[] = { - 0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, - 0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x13,0x0, - 0x16,0x80,0xc,0x80 -}; -static const GLUTBitmapChar ch195 = { 12, 18, 0, 0, 12, ch195data }; - -static const unsigned char ch196data[] = { - 0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, - 0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x19,0x80, - 0x19,0x80 -}; -static const GLUTBitmapChar ch196 = { 12, 17, 0, 0, 12, ch196data }; - -static const unsigned char ch197data[] = { - 0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, - 0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80, - 0x19,0x80,0xf,0x0 -}; -static const GLUTBitmapChar ch197 = { 12, 18, 0, 0, 12, ch197data }; - -static const unsigned char ch198data[] = { - 0xc1,0xff,0xc1,0xff,0x61,0x80,0x61,0x80,0x7f,0x80,0x3f,0x80,0x31,0xfe,0x31,0xfe, - 0x19,0x80,0x19,0x80,0xd,0x80,0xd,0x80,0x7,0xff,0x7,0xff -}; -static const GLUTBitmapChar ch198 = { 16, 14, -1, 0, 18, ch198data }; - -static const unsigned char ch199data[] = { - 0x1e,0x0,0x1b,0x0,0x3,0x0,0xe,0x0,0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30, - 0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xe0,0x0,0x60,0x30,0x70,0x70, - 0x3f,0xe0,0xf,0x80 -}; -static const GLUTBitmapChar ch199 = { 12, 18, -1, 4, 14, ch199data }; - -static const unsigned char ch200data[] = { - 0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, - 0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0xc,0x0, - 0x18,0x0,0x30,0x0 -}; -static const GLUTBitmapChar ch200 = { 9, 18, -1, 0, 11, ch200data }; - -static const unsigned char ch201data[] = { - 0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, - 0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0xc,0x0, - 0x6,0x0,0x3,0x0 -}; -static const GLUTBitmapChar ch201 = { 9, 18, -1, 0, 11, ch201data }; - -static const unsigned char ch202data[] = { - 0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, - 0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0x33,0x0, - 0x1e,0x0,0xc,0x0 -}; -static const GLUTBitmapChar ch202 = { 9, 18, -1, 0, 11, ch202data }; - -static const unsigned char ch203data[] = { - 0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, - 0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0x33,0x0, - 0x33,0x0 -}; -static const GLUTBitmapChar ch203 = { 9, 17, -1, 0, 11, ch203data }; - -static const unsigned char ch204data[] = { - 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0x30, - 0x60,0xc0 -}; -static const GLUTBitmapChar ch204 = { 4, 18, 0, 0, 6, ch204data }; - -static const unsigned char ch205data[] = { - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0xc0, - 0x60,0x30 -}; -static const GLUTBitmapChar ch205 = { 4, 18, -2, 0, 6, ch205data }; - -static const unsigned char ch206data[] = { - 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc, - 0x78,0x30 -}; -static const GLUTBitmapChar ch206 = { 6, 18, 0, 0, 6, ch206data }; - -static const unsigned char ch207data[] = { - 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc, - 0xcc -}; -static const GLUTBitmapChar ch207 = { 6, 17, 0, 0, 6, ch207data }; - -static const unsigned char ch208data[] = { - 0x7f,0x80,0x7f,0xc0,0x60,0xe0,0x60,0x60,0x60,0x30,0x60,0x30,0xfc,0x30,0xfc,0x30, - 0x60,0x30,0x60,0x30,0x60,0x60,0x60,0xe0,0x7f,0xc0,0x7f,0x80 -}; -static const GLUTBitmapChar ch208 = { 12, 14, 0, 0, 13, ch208data }; - -static const unsigned char ch209data[] = { - 0xc0,0x60,0xc0,0xe0,0xc1,0xe0,0xc1,0xe0,0xc3,0x60,0xc6,0x60,0xc6,0x60,0xcc,0x60, - 0xcc,0x60,0xd8,0x60,0xd8,0x60,0xf0,0x60,0xe0,0x60,0xe0,0x60,0x0,0x0,0x13,0x0, - 0x16,0x80,0xc,0x80 -}; -static const GLUTBitmapChar ch209 = { 11, 18, -1, 0, 13, ch209data }; - -static const unsigned char ch210data[] = { - 0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, - 0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x3,0x0, - 0x6,0x0,0xc,0x0 -}; -static const GLUTBitmapChar ch210 = { 13, 18, -1, 0, 15, ch210data }; - -static const unsigned char ch211data[] = { - 0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, - 0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x3,0x0, - 0x1,0x80,0x0,0xc0 -}; -static const GLUTBitmapChar ch211 = { 13, 18, -1, 0, 15, ch211data }; - -static const unsigned char ch212data[] = { - 0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, - 0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0xc,0xc0, - 0x7,0x80,0x3,0x0 -}; -static const GLUTBitmapChar ch212 = { 13, 18, -1, 0, 15, ch212data }; - -static const unsigned char ch213data[] = { - 0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, - 0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x9,0x80, - 0xb,0x40,0x6,0x40 -}; -static const GLUTBitmapChar ch213 = { 13, 18, -1, 0, 15, ch213data }; - -static const unsigned char ch214data[] = { - 0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, - 0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0xd,0x80, - 0xd,0x80 -}; -static const GLUTBitmapChar ch214 = { 13, 17, -1, 0, 15, ch214data }; - -static const unsigned char ch215data[] = { - 0xc0,0xc0,0x61,0x80,0x33,0x0,0x1e,0x0,0xc,0x0,0x1e,0x0,0x33,0x0,0x61,0x80, - 0xc0,0xc0 -}; -static const GLUTBitmapChar ch215 = { 10, 9, 0, 0, 10, ch215data }; - -static const unsigned char ch216data[] = { - 0xc7,0xc0,0xff,0xf0,0x78,0x38,0x38,0x18,0x6c,0x1c,0x6e,0xc,0x67,0xc,0x63,0x8c, - 0x61,0xcc,0x70,0xdc,0x30,0x78,0x38,0x38,0x1f,0xfc,0x7,0xcc -}; -static const GLUTBitmapChar ch216 = { 14, 14, 0, 0, 15, ch216data }; - -static const unsigned char ch217data[] = { - 0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, - 0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x6,0x0, - 0xc,0x0,0x18,0x0 -}; -static const GLUTBitmapChar ch217 = { 11, 18, -1, 0, 13, ch217data }; - -static const unsigned char ch218data[] = { - 0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, - 0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0xc,0x0, - 0x6,0x0,0x3,0x0 -}; -static const GLUTBitmapChar ch218 = { 11, 18, -1, 0, 13, ch218data }; - -static const unsigned char ch219data[] = { - 0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, - 0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x19,0x80, - 0xf,0x0,0x6,0x0 -}; -static const GLUTBitmapChar ch219 = { 11, 18, -1, 0, 13, ch219data }; - -static const unsigned char ch220data[] = { - 0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, - 0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x19,0x80, - 0x19,0x80 -}; -static const GLUTBitmapChar ch220 = { 11, 17, -1, 0, 13, ch220data }; - -static const unsigned char ch221data[] = { - 0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80, - 0x30,0xc0,0x30,0xc0,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30,0x0,0x0,0x6,0x0, - 0x3,0x0,0x1,0x80 -}; -static const GLUTBitmapChar ch221 = { 12, 18, -1, 0, 14, ch221data }; - -static const unsigned char ch222data[] = { - 0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x80,0xc1,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc1,0xc0,0xff,0x80,0xff,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0 -}; -static const GLUTBitmapChar ch222 = { 10, 14, -1, 0, 12, ch222data }; - -static const unsigned char ch223data[] = { - 0xdc,0xde,0xc6,0xc6,0xc6,0xc6,0xdc,0xdc,0xc6,0xc6,0xc6,0xc6,0x7c,0x38 -}; -static const GLUTBitmapChar ch223 = { 7, 14, -1, 0, 9, ch223data }; - -static const unsigned char ch224data[] = { - 0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x18,0x30,0x60 -}; -static const GLUTBitmapChar ch224 = { 7, 14, -1, 0, 9, ch224data }; - -static const unsigned char ch225data[] = { - 0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x30,0x18,0xc -}; -static const GLUTBitmapChar ch225 = { 7, 14, -1, 0, 9, ch225data }; - -static const unsigned char ch226data[] = { - 0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x66,0x3c,0x18 -}; -static const GLUTBitmapChar ch226 = { 7, 14, -1, 0, 9, ch226data }; - -static const unsigned char ch227data[] = { - 0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x4c,0x5a,0x32 -}; -static const GLUTBitmapChar ch227 = { 7, 14, -1, 0, 9, ch227data }; - -static const unsigned char ch228data[] = { - 0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x6c,0x6c -}; -static const GLUTBitmapChar ch228 = { 7, 13, -1, 0, 9, ch228data }; - -static const unsigned char ch229data[] = { - 0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x38,0x6c,0x6c,0x38 -}; -static const GLUTBitmapChar ch229 = { 7, 14, -1, 0, 9, ch229data }; - -static const unsigned char ch230data[] = { - 0x75,0xe0,0xef,0xf8,0xc7,0x18,0xc6,0x0,0xe6,0x0,0x7f,0xf8,0xe,0x18,0xc6,0x18, - 0xef,0xf0,0x7d,0xe0 -}; -static const GLUTBitmapChar ch230 = { 13, 10, -1, 0, 15, ch230data }; - -static const unsigned char ch231data[] = { - 0x78,0x6c,0xc,0x38,0x3e,0x7f,0x63,0xc0,0xc0,0xc0,0xc0,0x63,0x7f,0x3e -}; -static const GLUTBitmapChar ch231 = { 8, 14, -1, 4, 10, ch231data }; - -static const unsigned char ch232data[] = { - 0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x18,0x30,0x60 -}; -static const GLUTBitmapChar ch232 = { 8, 14, -1, 0, 10, ch232data }; - -static const unsigned char ch233data[] = { - 0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x18,0xc,0x6 -}; -static const GLUTBitmapChar ch233 = { 8, 14, -1, 0, 10, ch233data }; - -static const unsigned char ch234data[] = { - 0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x66,0x3c,0x18 -}; -static const GLUTBitmapChar ch234 = { 8, 14, -1, 0, 10, ch234data }; - -static const unsigned char ch235data[] = { - 0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x36,0x36 -}; -static const GLUTBitmapChar ch235 = { 8, 13, -1, 0, 10, ch235data }; - -static const unsigned char ch236data[] = { - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0x30,0x60,0xc0 -}; -static const GLUTBitmapChar ch236 = { 4, 14, 0, 0, 4, ch236data }; - -static const unsigned char ch237data[] = { - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0xc0,0x60,0x30 -}; -static const GLUTBitmapChar ch237 = { 4, 14, 0, 0, 4, ch237data }; - -static const unsigned char ch238data[] = { - 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc,0x78,0x30 -}; -static const GLUTBitmapChar ch238 = { 6, 14, 1, 0, 4, ch238data }; - -static const unsigned char ch239data[] = { - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0xd8,0xd8 -}; -static const GLUTBitmapChar ch239 = { 5, 13, 0, 0, 4, ch239data }; - -static const unsigned char ch240data[] = { - 0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, - 0x7f,0x0,0x3e,0x0,0x4c,0x0,0x38,0x0,0x36,0x0,0x60,0x0 -}; -static const GLUTBitmapChar ch240 = { 9, 14, -1, 0, 11, ch240data }; - -static const unsigned char ch241data[] = { - 0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce,0x0,0x4c,0x5a,0x32 -}; -static const GLUTBitmapChar ch241 = { 8, 14, -1, 0, 10, ch241data }; - -static const unsigned char ch242data[] = { - 0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, - 0x7f,0x0,0x3e,0x0,0x0,0x0,0xc,0x0,0x18,0x0,0x30,0x0 -}; -static const GLUTBitmapChar ch242 = { 9, 14, -1, 0, 11, ch242data }; - -static const unsigned char ch243data[] = { - 0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, - 0x7f,0x0,0x3e,0x0,0x0,0x0,0x18,0x0,0xc,0x0,0x6,0x0 -}; -static const GLUTBitmapChar ch243 = { 9, 14, -1, 0, 11, ch243data }; - -static const unsigned char ch244data[] = { - 0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, - 0x7f,0x0,0x3e,0x0,0x0,0x0,0x33,0x0,0x1e,0x0,0xc,0x0 -}; -static const GLUTBitmapChar ch244 = { 9, 14, -1, 0, 11, ch244data }; - -static const unsigned char ch245data[] = { - 0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, - 0x7f,0x0,0x3e,0x0,0x0,0x0,0x26,0x0,0x2d,0x0,0x19,0x0 -}; -static const GLUTBitmapChar ch245 = { 9, 14, -1, 0, 11, ch245data }; - -static const unsigned char ch246data[] = { - 0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, - 0x7f,0x0,0x3e,0x0,0x0,0x0,0x36,0x0,0x36,0x0 -}; -static const GLUTBitmapChar ch246 = { 9, 13, -1, 0, 11, ch246data }; - -static const unsigned char ch247data[] = { - 0x18,0x18,0x0,0xff,0xff,0x0,0x18,0x18 -}; -static const GLUTBitmapChar ch247 = { 8, 8, -1, -1, 10, ch247data }; - -static const unsigned char ch248data[] = { - 0xce,0x0,0x7f,0x80,0x31,0x80,0x78,0xc0,0x6c,0xc0,0x66,0xc0,0x63,0xc0,0x31,0x80, - 0x3f,0xc0,0xe,0x60 -}; -static const GLUTBitmapChar ch248 = { 11, 10, 0, 0, 11, ch248data }; - -static const unsigned char ch249data[] = { - 0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0xc,0x18,0x30 -}; -static const GLUTBitmapChar ch249 = { 8, 14, -1, 0, 10, ch249data }; - -static const unsigned char ch250data[] = { - 0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x18,0xc,0x6 -}; -static const GLUTBitmapChar ch250 = { 8, 14, -1, 0, 10, ch250data }; - -static const unsigned char ch251data[] = { - 0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x66,0x3c,0x18 -}; -static const GLUTBitmapChar ch251 = { 8, 14, -1, 0, 10, ch251data }; - -static const unsigned char ch252data[] = { - 0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x66,0x66 -}; -static const GLUTBitmapChar ch252 = { 8, 13, -1, 0, 10, ch252data }; - -static const unsigned char ch253data[] = { - 0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,0x0,0x18, - 0xc,0x6 -}; -static const GLUTBitmapChar ch253 = { 8, 18, -1, 4, 10, ch253data }; - -static const unsigned char ch254data[] = { - 0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80, - 0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0,0xff,0x0,0xde,0x0,0xc0,0x0,0xc0,0x0, - 0xc0,0x0,0xc0,0x0 -}; -static const GLUTBitmapChar ch254 = { 9, 18, -1, 4, 11, ch254data }; - -static const unsigned char ch255data[] = { - 0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,0x0,0x66, - 0x66 -}; -static const GLUTBitmapChar ch255 = { 8, 17, -1, 4, 10, ch255data }; - - -static const GLUTBitmapChar *chars[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - &ch32, &ch33, &ch34, &ch35, &ch36, &ch37, &ch38, &ch39, - &ch40, &ch41, &ch42, &ch43, &ch44, &ch45, &ch46, &ch47, - &ch48, &ch49, &ch50, &ch51, &ch52, &ch53, &ch54, &ch55, - &ch56, &ch57, &ch58, &ch59, &ch60, &ch61, &ch62, &ch63, - &ch64, &ch65, &ch66, &ch67, &ch68, &ch69, &ch70, &ch71, - &ch72, &ch73, &ch74, &ch75, &ch76, &ch77, &ch78, &ch79, - &ch80, &ch81, &ch82, &ch83, &ch84, &ch85, &ch86, &ch87, - &ch88, &ch89, &ch90, &ch91, &ch92, &ch93, &ch94, &ch95, - &ch96, &ch97, &ch98, &ch99, &ch100, &ch101, &ch102, &ch103, - &ch104, &ch105, &ch106, &ch107, &ch108, &ch109, &ch110, &ch111, - &ch112, &ch113, &ch114, &ch115, &ch116, &ch117, &ch118, &ch119, - &ch120, &ch121, &ch122, &ch123, &ch124, &ch125, &ch126, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - &ch160, &ch161, &ch162, &ch163, &ch164, &ch165, &ch166, &ch167, - &ch168, &ch169, &ch170, &ch171, &ch172, &ch173, &ch174, &ch175, - &ch176, &ch177, &ch178, &ch179, &ch180, &ch181, &ch182, &ch183, - &ch184, &ch185, &ch186, &ch187, &ch188, &ch189, &ch190, &ch191, - &ch192, &ch193, &ch194, &ch195, &ch196, &ch197, &ch198, &ch199, - &ch200, &ch201, &ch202, &ch203, &ch204, &ch205, &ch206, &ch207, - &ch208, &ch209, &ch210, &ch211, &ch212, &ch213, &ch214, &ch215, - &ch216, &ch217, &ch218, &ch219, &ch220, &ch221, &ch222, &ch223, - &ch224, &ch225, &ch226, &ch227, &ch228, &ch229, &ch230, &ch231, - &ch232, &ch233, &ch234, &ch235, &ch236, &ch237, &ch238, &ch239, - &ch240, &ch241, &ch242, &ch243, &ch244, &ch245, &ch246, &ch247, - &ch248, &ch249, &ch250, &ch251, &ch252, &ch253, &ch254, &ch255 -}; - -const GLUTBitmapFont glutBitmapHelvetica18 = { - "-Adobe-Helvetica-Medium-R-Normal--18-180-75-75-P-98-ISO8859-1", - 22, 256, chars -}; diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/init.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/init.c deleted file mode 100644 index 3a98dcf0a4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/init.c +++ /dev/null @@ -1,223 +0,0 @@ -/* - * DOS/DJGPP Mesa Utility Toolkit - * Version: 1.0 - * - * Copyright (C) 2005 Daniel Borca All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * DANIEL BORCA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include -#include -#include -#include - -#include "internal.h" - - -char *__glutProgramName = NULL; - -GLUTvisual _glut_visual = { - 16, 8, 16, 8, 16, /* bpp, alpha, depth, stencil, accum */ - - { 0, 0 }, 0, /* geometry */ - - 0 /* flags */ -}; - -GLUTdefault _glut_default = { - 0, 0, /* glutInitWindowPosition */ - 300, 300, /* glutInitWindowSize */ - 0 /* glutInitDisplayMode */ -}; - -GLuint _glut_fps = 0; - -static char *init_string; - - -void -_glut_fatal (char *format,...) -{ - va_list args; - - va_start(args, format); - fprintf(stderr, "GLUT: Fatal Error in %s: ", - __glutProgramName ? __glutProgramName : "(unamed)"); - vfprintf(stderr, format, args); - va_end(args); - putc('\n', stderr); - exit(1); -} - - -/* strdup is actually not a standard ANSI C or POSIX routine - * so implement a private one for GLUT. - */ -static char * -_glut_strdup (const char *string) -{ - if (string != NULL) { - int len = strlen(string) + 1; - char *p = malloc(len); - if (p != NULL) { - return strcpy(p, string); - } - } - return NULL; -} - - -void APIENTRY -glutInit (int *argc, char **argv) -{ - char *str; - const char *env; - - if ((env = getenv("DMESA_GLUT_BPP")) != NULL) { - _glut_visual.bpp = atoi(env); - } - if ((env = getenv("DMESA_GLUT_ALPHA")) != NULL) { - _glut_visual.alpha = atoi(env); - } - if ((env = getenv("DMESA_GLUT_DEPTH")) != NULL) { - _glut_visual.depth = atoi(env); - } - if ((env = getenv("DMESA_GLUT_STENCIL")) != NULL) { - _glut_visual.stencil = atoi(env); - } - if ((env = getenv("DMESA_GLUT_ACCUM")) != NULL) { - _glut_visual.accum = atoi(env); - } - if ((env = getenv("DMESA_GLUT_REFRESH")) != NULL) { - _glut_visual.refresh = atoi(env); - } - - /* Determine program name. */ - str = strrchr(argv[0], '/'); - if (str == NULL) { - str = argv[0]; - } else { - str++; - } - __glutProgramName = _glut_strdup(str); - - /* check if GLUT_FPS env var is set */ - if ((env = getenv("GLUT_FPS")) != NULL) { - if ((_glut_fps = atoi(env)) <= 0) { - _glut_fps = 5000; /* 5000 milliseconds */ - } - } - - /* Initialize timer */ - glutGet(GLUT_ELAPSED_TIME); -} - - -void APIENTRY -glutInitDisplayMode (unsigned int mode) -{ - _glut_default.mode = mode; -} - - -void APIENTRY -glutInitWindowPosition (int x, int y) -{ - _glut_default.x = x; - _glut_default.y = y; -} - - -void APIENTRY -glutInitWindowSize (int width, int height) -{ - _glut_default.width = width; - _glut_default.height = height; -} - - -void APIENTRY -glutInitDisplayString (const char *string) -{ - init_string = _glut_strdup(string); -} - - -void APIENTRY -glutSetOption (GLenum pname, int value) -{ - switch (pname) { - case GLUT_INIT_WINDOW_X: - _glut_default.x = value; - break; - case GLUT_INIT_WINDOW_Y: - _glut_default.y = value; - break; - } -} - - -void APIENTRY -glutForceJoystickFunc (void) -{ -} - - -void APIENTRY -glutIgnoreKeyRepeat (int ignore) -{ -} - - -void APIENTRY -glutSetKeyRepeat (int repeatMode) -{ -} - - -void APIENTRY -glutVideoPan (int x, int y, int w, int h) -{ -} - - -int APIENTRY -glutVideoResizeGet( GLenum eWhat ) -{ - return 0; -} - - -void APIENTRY -glutSetupVideoResizing (void) -{ -} - - -void APIENTRY -glutStopVideoResizing (void) -{ -} - - -void APIENTRY -glutVideoResize (int x, int y, int w, int h) -{ -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/internal.h b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/internal.h deleted file mode 100644 index 063c2d00d9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/internal.h +++ /dev/null @@ -1,197 +0,0 @@ -/* - * DOS/DJGPP Mesa Utility Toolkit - * Version: 1.0 - * - * Copyright (C) 2005 Daniel Borca All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * DANIEL BORCA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef INTERNAL_H_included -#define INTERNAL_H_included - -#include - -#include "GL/dmesa.h" - - -#define MAX_WINDOWS 2 -#define MAX_TIMER_CB 8 -#define RESERVED_COLORS 0 - - -/* GLUT function types */ -typedef void (GLUTCALLBACK *GLUTdisplayCB) (void); -typedef void (GLUTCALLBACK *GLUTreshapeCB) (int, int); -typedef void (GLUTCALLBACK *GLUTkeyboardCB) (unsigned char, int, int); -typedef void (GLUTCALLBACK *GLUTmouseCB) (int, int, int, int); -typedef void (GLUTCALLBACK *GLUTmotionCB) (int, int); -typedef void (GLUTCALLBACK *GLUTpassiveCB) (int, int); -typedef void (GLUTCALLBACK *GLUTentryCB) (int); -typedef void (GLUTCALLBACK *GLUTvisibilityCB) (int); -typedef void (GLUTCALLBACK *GLUTwindowStatusCB) (int); -typedef void (GLUTCALLBACK *GLUTidleCB) (void); -typedef void (GLUTCALLBACK *GLUTtimerCB) (int); -typedef void (GLUTCALLBACK *GLUTmenuStateCB) (int); /* DEPRECATED. */ -typedef void (GLUTCALLBACK *GLUTmenuStatusCB) (int, int, int); -typedef void (GLUTCALLBACK *GLUTselectCB) (int); -typedef void (GLUTCALLBACK *GLUTspecialCB) (int, int, int); -typedef void (GLUTCALLBACK *GLUTspaceMotionCB) (int, int, int); -typedef void (GLUTCALLBACK *GLUTspaceRotateCB) (int, int, int); -typedef void (GLUTCALLBACK *GLUTspaceButtonCB) (int, int); -typedef void (GLUTCALLBACK *GLUTdialsCB) (int, int); -typedef void (GLUTCALLBACK *GLUTbuttonBoxCB) (int, int); -typedef void (GLUTCALLBACK *GLUTtabletMotionCB) (int, int); -typedef void (GLUTCALLBACK *GLUTtabletButtonCB) (int, int, int, int); -typedef void (GLUTCALLBACK *GLUTjoystickCB) (unsigned int, int, int, int); - -typedef void (GLUTCALLBACK *GLUTdestroyCB) (void); -typedef void (GLUTCALLBACK *GLUTmouseWheelCB) (int, int, int, int); -typedef void (GLUTCALLBACK *GLUTmenuDestroyCB) (void); - - -typedef struct { - GLuint bpp, alpha; - GLuint depth, stencil; - GLuint accum; - - GLint geometry[2]; - GLuint refresh; - - GLint flags; -} GLUTvisual; - -typedef struct { - GLint x, y; - GLint width, height; - GLuint mode; -} GLUTdefault; - -typedef struct { - void (*func) (int); - int value; - int time; -} GLUTSShotCB; - -typedef struct GLUTwindow { - int num; /* window id */ - - DMesaContext context; - DMesaBuffer buffer; - - int show_mouse; - GLboolean redisplay; - - /* GLUT settable or visible window state. */ - int xpos; - int ypos; - int width; /* window width in pixels */ - int height; /* window height in pixels */ - - /* Per-window callbacks. */ - GLUTdisplayCB display; /* redraw */ - GLUTreshapeCB reshape; /* resize (width,height) */ - GLUTmouseCB mouse; /* mouse (button,state,x,y) */ - GLUTmotionCB motion; /* motion (x,y) */ - GLUTpassiveCB passive; /* passive motion (x,y) */ - GLUTentryCB entry; /* window entry/exit (state) */ - GLUTkeyboardCB keyboard; /* keyboard (ASCII,x,y) */ - GLUTkeyboardCB keyboardUp; /* keyboard up (ASCII,x,y) */ - GLUTwindowStatusCB windowStatus; /* window status */ - GLUTvisibilityCB visibility; /* visibility */ - GLUTspecialCB special; /* special key */ - GLUTspecialCB specialUp; /* special up key */ - GLUTbuttonBoxCB buttonBox; /* button box */ - GLUTdialsCB dials; /* dials */ - GLUTspaceMotionCB spaceMotion; /* Spaceball motion */ - GLUTspaceRotateCB spaceRotate; /* Spaceball rotate */ - GLUTspaceButtonCB spaceButton; /* Spaceball button */ - GLUTtabletMotionCB tabletMotion; /* tablet motion */ - GLUTtabletButtonCB tabletButton; /* tablet button */ - GLUTjoystickCB joystick; /* joystick */ - - GLUTdestroyCB destroy; /* destroy */ - GLUTmouseWheelCB mouseWheel; /* mouse wheel */ - - /* specific data */ - void *data; -} GLUTwindow; - -typedef struct { - int width, height; - int xorig, yorig; - int xmove; - const unsigned char *bitmap; -} GLUTBitmapChar; - -typedef struct { - const char *name; - int height; - int num; - const GLUTBitmapChar *const *table; -} GLUTBitmapFont; - -typedef struct { - const GLfloat x, y; -} GLUTStrokeVertex; - -typedef struct { - const unsigned num; - const GLUTStrokeVertex *vertex; -} GLUTStrokeStrip; - -typedef struct { - const GLfloat right; - const unsigned num; - const GLUTStrokeStrip *strip; -} GLUTStrokeChar; - -typedef struct { - const char *name; - const unsigned num; - const GLUTStrokeChar *const *table; - const GLfloat height; - const GLfloat descent; -} GLUTStrokeFont; - - -extern char *__glutProgramName; - -extern GLUTvisual _glut_visual; -extern GLUTdefault _glut_default; - -extern GLuint _glut_fps; -extern GLUTidleCB _glut_idle_func; -extern GLUTmenuStatusCB _glut_menu_status_func; -extern GLUTSShotCB _glut_timer_cb[]; - -extern GLUTwindow *_glut_current, *_glut_windows[]; - -extern int _glut_mouse; /* number of buttons, if mouse installed */ -extern int _glut_mouse_x, _glut_mouse_y; /* mouse coords, relative to current win */ - - -extern void _glut_mouse_init (void); -extern void _glut_fatal(char *format,...); -extern void *_glut_font (void *font); - - -#include "pc_hw/pc_hw.h" - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/loop.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/loop.c deleted file mode 100644 index 36c3adc3ff..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/loop.c +++ /dev/null @@ -1,245 +0,0 @@ -/* - * DOS/DJGPP Mesa Utility Toolkit - * Version: 1.0 - * - * Copyright (C) 2005 Daniel Borca All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * DANIEL BORCA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include - -#include -#include "GL/dmesa.h" - -#include "PC_HW/pc_hw.h" -#include "internal.h" - - -static int looping = 0; - - -#define DO_REDISPLAY(w, ccin, ccout) \ - do { \ - if (w->redisplay && w->display) { \ - int rv = GL_TRUE; \ - \ - idle = GL_FALSE; \ - w->redisplay = GL_FALSE; \ - \ - /* test IN condition (whether we need to `MakeCurrent') */\ - if (ccin) { \ - rv = DMesaMakeCurrent(w->context, w->buffer); \ - } \ - \ - /* do the display only if `MakeCurrent' didn't failed */ \ - if (rv) { \ - if (w->show_mouse && !(_glut_default.mode & GLUT_DOUBLE)) {\ - /* XXX scare mouse */ \ - w->display(); \ - /* XXX unscare mouse */ \ - } else { \ - w->display(); \ - } \ - \ - /* update OUT condition */ \ - ccout; \ - } \ - } \ - } while (0) - - -void APIENTRY -glutMainLoopEvent (void) -{ - int i, n; - GLUTwindow *w; - GLboolean idle; - static int old_mouse_x = 0; - static int old_mouse_y = 0; - static int old_mouse_b = 0; - - static GLboolean virgin = GL_TRUE; - if (virgin) { - pc_install_keyb(); - _glut_mouse_init(); - - for (i = 0; i < MAX_WINDOWS; i++) { - w = _glut_windows[i]; - if (w != NULL) { - glutSetWindow(w->num); - glutPostRedisplay(); - if (w->reshape) { - w->reshape(w->width, w->height); - } - if (w->visibility) { - w->visibility(GLUT_VISIBLE); - } - } - } - virgin = GL_FALSE; - } - - idle = GL_TRUE; - - n = 0; - for (i = 0; i < MAX_WINDOWS; i++) { - w = _glut_windows[i]; - if ((w != NULL) && (w != _glut_current)) { - /* 1) redisplay `w' - * 2) `MakeCurrent' always - * 3) update number of non-default windows - */ - DO_REDISPLAY(w, GL_TRUE, n++); - } - } - /* 1) redisplay `_glut_current' - * 2) `MakeCurrent' only if we previously did non-default windows - * 3) don't update anything - */ - DO_REDISPLAY(_glut_current, n, n); - - if (_glut_mouse) { - int mouse_x; - int mouse_y; - int mouse_z; - int mouse_b; - - /* query mouse */ - mouse_b = pc_query_mouse(&mouse_x, &mouse_y, &mouse_z); - - /* relative to window coordinates */ - _glut_mouse_x = mouse_x - _glut_current->xpos; - _glut_mouse_y = mouse_y - _glut_current->ypos; - - /* mouse was moved? */ - if ((mouse_x != old_mouse_x) || (mouse_y != old_mouse_y)) { - idle = GL_FALSE; - old_mouse_x = mouse_x; - old_mouse_y = mouse_y; - - if (mouse_b) { - /* any button pressed */ - if (_glut_current->motion) { - _glut_current->motion(_glut_mouse_x, _glut_mouse_y); - } - } else { - /* no button pressed */ - if (_glut_current->passive) { - _glut_current->passive(_glut_mouse_x, _glut_mouse_y); - } - } - } - - /* button state changed? */ - if (mouse_b != old_mouse_b) { - GLUTmouseCB mouse_func; - - if ((mouse_func = _glut_current->mouse)) { - if ((old_mouse_b & 1) && !(mouse_b & 1)) - mouse_func(GLUT_LEFT_BUTTON, GLUT_UP, _glut_mouse_x, _glut_mouse_y); - else if (!(old_mouse_b & 1) && (mouse_b & 1)) - mouse_func(GLUT_LEFT_BUTTON, GLUT_DOWN, _glut_mouse_x, _glut_mouse_y); - - if ((old_mouse_b & 2) && !(mouse_b & 2)) - mouse_func(GLUT_RIGHT_BUTTON, GLUT_UP, _glut_mouse_x, _glut_mouse_y); - else if (!(old_mouse_b & 2) && (mouse_b & 2)) - mouse_func(GLUT_RIGHT_BUTTON, GLUT_DOWN, _glut_mouse_x, _glut_mouse_y); - - if ((old_mouse_b & 4) && !(mouse_b & 4)) - mouse_func(GLUT_MIDDLE_BUTTON, GLUT_UP, _glut_mouse_x, _glut_mouse_y); - else if (!(old_mouse_b & 3) && (mouse_b & 4)) - mouse_func(GLUT_MIDDLE_BUTTON, GLUT_DOWN, _glut_mouse_x, _glut_mouse_y); - } - - idle = GL_FALSE; - old_mouse_b = mouse_b; - } - } - - if (pc_keypressed()) { - int key; - int glut_key; - - idle = GL_FALSE; - key = pc_readkey(); - - switch (key>>16) { - case KEY_F1: glut_key = GLUT_KEY_F1; goto special; - case KEY_F2: glut_key = GLUT_KEY_F2; goto special; - case KEY_F3: glut_key = GLUT_KEY_F3; goto special; - case KEY_F4: glut_key = GLUT_KEY_F4; goto special; - case KEY_F5: glut_key = GLUT_KEY_F5; goto special; - case KEY_F6: glut_key = GLUT_KEY_F6; goto special; - case KEY_F7: glut_key = GLUT_KEY_F7; goto special; - case KEY_F8: glut_key = GLUT_KEY_F8; goto special; - case KEY_F9: glut_key = GLUT_KEY_F9; goto special; - case KEY_F10: glut_key = GLUT_KEY_F10; goto special; - case KEY_F11: glut_key = GLUT_KEY_F11; goto special; - case KEY_F12: glut_key = GLUT_KEY_F12; goto special; - case KEY_LEFT: glut_key = GLUT_KEY_LEFT; goto special; - case KEY_UP: glut_key = GLUT_KEY_UP; goto special; - case KEY_RIGHT: glut_key = GLUT_KEY_RIGHT; goto special; - case KEY_DOWN: glut_key = GLUT_KEY_DOWN; goto special; - case KEY_PGUP: glut_key = GLUT_KEY_PAGE_UP; goto special; - case KEY_PGDN: glut_key = GLUT_KEY_PAGE_DOWN; goto special; - case KEY_HOME: glut_key = GLUT_KEY_HOME; goto special; - case KEY_END: glut_key = GLUT_KEY_END; goto special; - case KEY_INSERT: glut_key = GLUT_KEY_INSERT; goto special; - special: - if (_glut_current->special) { - _glut_current->special(glut_key, _glut_mouse_x, _glut_mouse_y); - } - break; - default: - if (_glut_current->keyboard) { - _glut_current->keyboard(key & 0xFF, _glut_mouse_x, _glut_mouse_y); - } - } - } - - if (idle && _glut_idle_func) - _glut_idle_func(); - - for (i = 0; i < MAX_TIMER_CB; i++) { - int time = glutGet(GLUT_ELAPSED_TIME); - GLUTSShotCB *cb = &_glut_timer_cb[i]; - if (cb->func && (time >= cb->time)) { - cb->func(cb->value); - cb->func = NULL; - } - } -} - - -void APIENTRY -glutMainLoop (void) -{ - looping++; - while (looping) { - glutMainLoopEvent(); - } -} - - -void APIENTRY -glutLeaveMainLoop (void) -{ - looping--; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/menu.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/menu.c deleted file mode 100644 index 857d2b4a46..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/menu.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * DOS/DJGPP Mesa Utility Toolkit - * Version: 1.0 - * - * Copyright (C) 2005 Daniel Borca All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * DANIEL BORCA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "internal.h" - - -GLUTmenuStatusCB _glut_menu_status_func = NULL; - - -void APIENTRY -glutMenuStateFunc (GLUTmenuStateCB func) -{ - _glut_menu_status_func = (GLUTmenuStatusCB)func; -} - - -void APIENTRY -glutMenuStatusFunc (GLUTmenuStatusCB func) -{ - _glut_menu_status_func = func; -} - - -int APIENTRY -glutCreateMenu (GLUTselectCB func) -{ - return 0; -} - - -void APIENTRY -glutDestroyMenu (int menu) -{ -} - - -int APIENTRY -glutGetMenu (void) -{ - return 0; -} - - -void APIENTRY -glutSetMenu (int menu) -{ -} - - -void APIENTRY -glutAddMenuEntry (const char *label, int value) -{ -} - - -void APIENTRY -glutAddSubMenu (const char *label, int submenu) -{ -} - - -void APIENTRY -glutChangeToMenuEntry (int item, const char *label, int value) -{ -} - - -void APIENTRY -glutChangeToSubMenu (int item, const char *label, int submenu) -{ -} - - -void APIENTRY -glutRemoveMenuItem (int item) -{ -} - - -void APIENTRY -glutAttachMenu (int button) -{ -} - - -void APIENTRY -glutDetachMenu (int button) -{ -} - - -void APIENTRY -glutMenuDestroyFunc ( void (* callback)( void ) ) -{ -} - - -void * APIENTRY -glutGetMenuData (void) -{ - return NULL; -} - - -void APIENTRY -glutSetMenuData (void *data) -{ -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/mouse.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/mouse.c deleted file mode 100644 index 945e2a5c14..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/mouse.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * DOS/DJGPP Mesa Utility Toolkit - * Version: 1.0 - * - * Copyright (C) 2005 Daniel Borca All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * DANIEL BORCA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "internal.h" - - -int _glut_mouse; -int _glut_mouse_x = 0, _glut_mouse_y = 0; - - -void -_glut_mouse_init (void) -{ - if ((_glut_mouse = pc_install_mouse())) { - pc_mouse_area(_glut_current->xpos, _glut_current->ypos, _glut_current->xpos + _glut_current->width - 1, _glut_current->ypos + _glut_current->height - 1); - - _glut_current->show_mouse = (_glut_current->mouse || _glut_current->motion || _glut_current->passive); - } -} - - -void APIENTRY -glutSetCursor (int cursor) -{ - /* XXX completely futile until full mouse support (maybe never) */ -} - - -void APIENTRY -glutWarpPointer (int x, int y) -{ - pc_warp_mouse(x, y); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/mroman.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/mroman.c deleted file mode 100644 index 5bf76dbf73..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/mroman.c +++ /dev/null @@ -1,2783 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#include "internal.h" - -/* char: 0x20 */ - -static const GLUTStrokeStrip ch32st[] = -{ -}; - -static const GLUTStrokeChar ch32 = {104.7619f,0,ch32st}; - -/* char: 0x21 */ - -static const GLUTStrokeVertex ch33st0[] = -{ - {52.3810f,100.0000f}, - {52.3810f,33.3333f} -}; - -static const GLUTStrokeVertex ch33st1[] = -{ - {52.3810f,9.5238f}, - {47.6191f,4.7619f}, - {52.3810f,0.0000f}, - {57.1429f,4.7619f}, - {52.3810f,9.5238f} -}; - -static const GLUTStrokeStrip ch33st[] = -{ - {2,ch33st0}, - {5,ch33st1} -}; - -static const GLUTStrokeChar ch33 = {104.7619f,2,ch33st}; - -/* char: 0x22 */ - -static const GLUTStrokeVertex ch34st0[] = -{ - {33.3334f,100.0000f}, - {33.3334f,66.6667f} -}; - -static const GLUTStrokeVertex ch34st1[] = -{ - {71.4286f,100.0000f}, - {71.4286f,66.6667f} -}; - -static const GLUTStrokeStrip ch34st[] = -{ - {2,ch34st0}, - {2,ch34st1} -}; - -static const GLUTStrokeChar ch34 = {104.7619f,2,ch34st}; - -/* char: 0x23 */ - -static const GLUTStrokeVertex ch35st0[] = -{ - {54.7619f,119.0476f}, - {21.4286f,-33.3333f} -}; - -static const GLUTStrokeVertex ch35st1[] = -{ - {83.3334f,119.0476f}, - {50.0000f,-33.3333f} -}; - -static const GLUTStrokeVertex ch35st2[] = -{ - {21.4286f,57.1429f}, - {88.0952f,57.1429f} -}; - -static const GLUTStrokeVertex ch35st3[] = -{ - {16.6667f,28.5714f}, - {83.3334f,28.5714f} -}; - -static const GLUTStrokeStrip ch35st[] = -{ - {2,ch35st0}, - {2,ch35st1}, - {2,ch35st2}, - {2,ch35st3} -}; - -static const GLUTStrokeChar ch35 = {104.7619f,4,ch35st}; - -/* char: 0x24 */ - -static const GLUTStrokeVertex ch36st0[] = -{ - {42.8571f,119.0476f}, - {42.8571f,-19.0476f} -}; - -static const GLUTStrokeVertex ch36st1[] = -{ - {61.9047f,119.0476f}, - {61.9047f,-19.0476f} -}; - -static const GLUTStrokeVertex ch36st2[] = -{ - {85.7143f,85.7143f}, - {76.1905f,95.2381f}, - {61.9047f,100.0000f}, - {42.8571f,100.0000f}, - {28.5714f,95.2381f}, - {19.0476f,85.7143f}, - {19.0476f,76.1905f}, - {23.8095f,66.6667f}, - {28.5714f,61.9048f}, - {38.0952f,57.1429f}, - {66.6666f,47.6190f}, - {76.1905f,42.8571f}, - {80.9524f,38.0952f}, - {85.7143f,28.5714f}, - {85.7143f,14.2857f}, - {76.1905f,4.7619f}, - {61.9047f,0.0000f}, - {42.8571f,0.0000f}, - {28.5714f,4.7619f}, - {19.0476f,14.2857f} -}; - -static const GLUTStrokeStrip ch36st[] = -{ - {2,ch36st0}, - {2,ch36st1}, - {20,ch36st2} -}; - -static const GLUTStrokeChar ch36 = {104.7619f,3,ch36st}; - -/* char: 0x25 */ - -static const GLUTStrokeVertex ch37st0[] = -{ - {95.2381f,100.0000f}, - {9.5238f,0.0000f} -}; - -static const GLUTStrokeVertex ch37st1[] = -{ - {33.3333f,100.0000f}, - {42.8571f,90.4762f}, - {42.8571f,80.9524f}, - {38.0952f,71.4286f}, - {28.5714f,66.6667f}, - {19.0476f,66.6667f}, - {9.5238f,76.1905f}, - {9.5238f,85.7143f}, - {14.2857f,95.2381f}, - {23.8095f,100.0000f}, - {33.3333f,100.0000f}, - {42.8571f,95.2381f}, - {57.1428f,90.4762f}, - {71.4286f,90.4762f}, - {85.7143f,95.2381f}, - {95.2381f,100.0000f} -}; - -static const GLUTStrokeVertex ch37st2[] = -{ - {76.1905f,33.3333f}, - {66.6667f,28.5714f}, - {61.9048f,19.0476f}, - {61.9048f,9.5238f}, - {71.4286f,0.0000f}, - {80.9524f,0.0000f}, - {90.4762f,4.7619f}, - {95.2381f,14.2857f}, - {95.2381f,23.8095f}, - {85.7143f,33.3333f}, - {76.1905f,33.3333f} -}; - -static const GLUTStrokeStrip ch37st[] = -{ - {2,ch37st0}, - {16,ch37st1}, - {11,ch37st2} -}; - -static const GLUTStrokeChar ch37 = {104.7619f,3,ch37st}; - -/* char: 0x26 */ - -static const GLUTStrokeVertex ch38st0[] = -{ - {100.0000f,57.1429f}, - {100.0000f,61.9048f}, - {95.2381f,66.6667f}, - {90.4762f,66.6667f}, - {85.7143f,61.9048f}, - {80.9524f,52.3810f}, - {71.4286f,28.5714f}, - {61.9048f,14.2857f}, - {52.3809f,4.7619f}, - {42.8571f,0.0000f}, - {23.8095f,0.0000f}, - {14.2857f,4.7619f}, - {9.5238f,9.5238f}, - {4.7619f,19.0476f}, - {4.7619f,28.5714f}, - {9.5238f,38.0952f}, - {14.2857f,42.8571f}, - {47.6190f,61.9048f}, - {52.3809f,66.6667f}, - {57.1429f,76.1905f}, - {57.1429f,85.7143f}, - {52.3809f,95.2381f}, - {42.8571f,100.0000f}, - {33.3333f,95.2381f}, - {28.5714f,85.7143f}, - {28.5714f,76.1905f}, - {33.3333f,61.9048f}, - {42.8571f,47.6190f}, - {66.6667f,14.2857f}, - {76.1905f,4.7619f}, - {85.7143f,0.0000f}, - {95.2381f,0.0000f}, - {100.0000f,4.7619f}, - {100.0000f,9.5238f} -}; - -static const GLUTStrokeStrip ch38st[] = -{ - {34,ch38st0} -}; - -static const GLUTStrokeChar ch38 = {104.7619f,1,ch38st}; - -/* char: 0x27 */ - -static const GLUTStrokeVertex ch39st0[] = -{ - {52.3810f,100.0000f}, - {52.3810f,66.6667f} -}; - -static const GLUTStrokeStrip ch39st[] = -{ - {2,ch39st0} -}; - -static const GLUTStrokeChar ch39 = {104.7619f,1,ch39st}; - -/* char: 0x28 */ - -static const GLUTStrokeVertex ch40st0[] = -{ - {69.0476f,119.0476f}, - {59.5238f,109.5238f}, - {50.0000f,95.2381f}, - {40.4762f,76.1905f}, - {35.7143f,52.3810f}, - {35.7143f,33.3333f}, - {40.4762f,9.5238f}, - {50.0000f,-9.5238f}, - {59.5238f,-23.8095f}, - {69.0476f,-33.3333f} -}; - -static const GLUTStrokeStrip ch40st[] = -{ - {10,ch40st0} -}; - -static const GLUTStrokeChar ch40 = {104.7619f,1,ch40st}; - -/* char: 0x29 */ - -static const GLUTStrokeVertex ch41st0[] = -{ - {35.7143f,119.0476f}, - {45.2381f,109.5238f}, - {54.7619f,95.2381f}, - {64.2857f,76.1905f}, - {69.0476f,52.3810f}, - {69.0476f,33.3333f}, - {64.2857f,9.5238f}, - {54.7619f,-9.5238f}, - {45.2381f,-23.8095f}, - {35.7143f,-33.3333f} -}; - -static const GLUTStrokeStrip ch41st[] = -{ - {10,ch41st0} -}; - -static const GLUTStrokeChar ch41 = {104.7619f,1,ch41st}; - -/* char: 0x2a */ - -static const GLUTStrokeVertex ch42st0[] = -{ - {52.3810f,71.4286f}, - {52.3810f,14.2857f} -}; - -static const GLUTStrokeVertex ch42st1[] = -{ - {28.5715f,57.1429f}, - {76.1905f,28.5714f} -}; - -static const GLUTStrokeVertex ch42st2[] = -{ - {76.1905f,57.1429f}, - {28.5715f,28.5714f} -}; - -static const GLUTStrokeStrip ch42st[] = -{ - {2,ch42st0}, - {2,ch42st1}, - {2,ch42st2} -}; - -static const GLUTStrokeChar ch42 = {104.7619f,3,ch42st}; - -/* char: 0x2b */ - -static const GLUTStrokeVertex ch43st0[] = -{ - {52.3809f,85.7143f}, - {52.3809f,0.0000f} -}; - -static const GLUTStrokeVertex ch43st1[] = -{ - {9.5238f,42.8571f}, - {95.2381f,42.8571f} -}; - -static const GLUTStrokeStrip ch43st[] = -{ - {2,ch43st0}, - {2,ch43st1} -}; - -static const GLUTStrokeChar ch43 = {104.7619f,2,ch43st}; - -/* char: 0x2c */ - -static const GLUTStrokeVertex ch44st0[] = -{ - {57.1429f,4.7619f}, - {52.3810f,0.0000f}, - {47.6191f,4.7619f}, - {52.3810f,9.5238f}, - {57.1429f,4.7619f}, - {57.1429f,-4.7619f}, - {52.3810f,-14.2857f}, - {47.6191f,-19.0476f} -}; - -static const GLUTStrokeStrip ch44st[] = -{ - {8,ch44st0} -}; - -static const GLUTStrokeChar ch44 = {104.7619f,1,ch44st}; - -/* char: 0x2d */ - -static const GLUTStrokeVertex ch45st0[] = -{ - {9.5238f,42.8571f}, - {95.2381f,42.8571f} -}; - -static const GLUTStrokeStrip ch45st[] = -{ - {2,ch45st0} -}; - -static const GLUTStrokeChar ch45 = {104.7619f,1,ch45st}; - -/* char: 0x2e */ - -static const GLUTStrokeVertex ch46st0[] = -{ - {52.3810f,9.5238f}, - {47.6191f,4.7619f}, - {52.3810f,0.0000f}, - {57.1429f,4.7619f}, - {52.3810f,9.5238f} -}; - -static const GLUTStrokeStrip ch46st[] = -{ - {5,ch46st0} -}; - -static const GLUTStrokeChar ch46 = {104.7619f,1,ch46st}; - -/* char: 0x2f */ - -static const GLUTStrokeVertex ch47st0[] = -{ - {19.0476f,-14.2857f}, - {85.7143f,100.0000f} -}; - -static const GLUTStrokeStrip ch47st[] = -{ - {2,ch47st0} -}; - -static const GLUTStrokeChar ch47 = {104.7619f,1,ch47st}; - -/* char: 0x30 */ - -static const GLUTStrokeVertex ch48st0[] = -{ - {47.6190f,100.0000f}, - {33.3333f,95.2381f}, - {23.8095f,80.9524f}, - {19.0476f,57.1429f}, - {19.0476f,42.8571f}, - {23.8095f,19.0476f}, - {33.3333f,4.7619f}, - {47.6190f,0.0000f}, - {57.1428f,0.0000f}, - {71.4286f,4.7619f}, - {80.9524f,19.0476f}, - {85.7143f,42.8571f}, - {85.7143f,57.1429f}, - {80.9524f,80.9524f}, - {71.4286f,95.2381f}, - {57.1428f,100.0000f}, - {47.6190f,100.0000f} -}; - -static const GLUTStrokeStrip ch48st[] = -{ - {17,ch48st0} -}; - -static const GLUTStrokeChar ch48 = {104.7619f,1,ch48st}; - -/* char: 0x31 */ - -static const GLUTStrokeVertex ch49st0[] = -{ - {40.4762f,80.9524f}, - {50.0000f,85.7143f}, - {64.2857f,100.0000f}, - {64.2857f,0.0000f} -}; - -static const GLUTStrokeStrip ch49st[] = -{ - {4,ch49st0} -}; - -static const GLUTStrokeChar ch49 = {104.7619f,1,ch49st}; - -/* char: 0x32 */ - -static const GLUTStrokeVertex ch50st0[] = -{ - {23.8095f,76.1905f}, - {23.8095f,80.9524f}, - {28.5714f,90.4762f}, - {33.3333f,95.2381f}, - {42.8571f,100.0000f}, - {61.9047f,100.0000f}, - {71.4286f,95.2381f}, - {76.1905f,90.4762f}, - {80.9524f,80.9524f}, - {80.9524f,71.4286f}, - {76.1905f,61.9048f}, - {66.6666f,47.6190f}, - {19.0476f,0.0000f}, - {85.7143f,0.0000f} -}; - -static const GLUTStrokeStrip ch50st[] = -{ - {14,ch50st0} -}; - -static const GLUTStrokeChar ch50 = {104.7619f,1,ch50st}; - -/* char: 0x33 */ - -static const GLUTStrokeVertex ch51st0[] = -{ - {28.5714f,100.0000f}, - {80.9524f,100.0000f}, - {52.3809f,61.9048f}, - {66.6666f,61.9048f}, - {76.1905f,57.1429f}, - {80.9524f,52.3810f}, - {85.7143f,38.0952f}, - {85.7143f,28.5714f}, - {80.9524f,14.2857f}, - {71.4286f,4.7619f}, - {57.1428f,0.0000f}, - {42.8571f,0.0000f}, - {28.5714f,4.7619f}, - {23.8095f,9.5238f}, - {19.0476f,19.0476f} -}; - -static const GLUTStrokeStrip ch51st[] = -{ - {15,ch51st0} -}; - -static const GLUTStrokeChar ch51 = {104.7619f,1,ch51st}; - -/* char: 0x34 */ - -static const GLUTStrokeVertex ch52st0[] = -{ - {64.2857f,100.0000f}, - {16.6667f,33.3333f}, - {88.0952f,33.3333f} -}; - -static const GLUTStrokeVertex ch52st1[] = -{ - {64.2857f,100.0000f}, - {64.2857f,0.0000f} -}; - -static const GLUTStrokeStrip ch52st[] = -{ - {3,ch52st0}, - {2,ch52st1} -}; - -static const GLUTStrokeChar ch52 = {104.7619f,2,ch52st}; - -/* char: 0x35 */ - -static const GLUTStrokeVertex ch53st0[] = -{ - {76.1905f,100.0000f}, - {28.5714f,100.0000f}, - {23.8095f,57.1429f}, - {28.5714f,61.9048f}, - {42.8571f,66.6667f}, - {57.1428f,66.6667f}, - {71.4286f,61.9048f}, - {80.9524f,52.3810f}, - {85.7143f,38.0952f}, - {85.7143f,28.5714f}, - {80.9524f,14.2857f}, - {71.4286f,4.7619f}, - {57.1428f,0.0000f}, - {42.8571f,0.0000f}, - {28.5714f,4.7619f}, - {23.8095f,9.5238f}, - {19.0476f,19.0476f} -}; - -static const GLUTStrokeStrip ch53st[] = -{ - {17,ch53st0} -}; - -static const GLUTStrokeChar ch53 = {104.7619f,1,ch53st}; - -/* char: 0x36 */ - -static const GLUTStrokeVertex ch54st0[] = -{ - {78.5714f,85.7143f}, - {73.8096f,95.2381f}, - {59.5238f,100.0000f}, - {50.0000f,100.0000f}, - {35.7143f,95.2381f}, - {26.1905f,80.9524f}, - {21.4286f,57.1429f}, - {21.4286f,33.3333f}, - {26.1905f,14.2857f}, - {35.7143f,4.7619f}, - {50.0000f,0.0000f}, - {54.7619f,0.0000f}, - {69.0476f,4.7619f}, - {78.5714f,14.2857f}, - {83.3334f,28.5714f}, - {83.3334f,33.3333f}, - {78.5714f,47.6190f}, - {69.0476f,57.1429f}, - {54.7619f,61.9048f}, - {50.0000f,61.9048f}, - {35.7143f,57.1429f}, - {26.1905f,47.6190f}, - {21.4286f,33.3333f} -}; - -static const GLUTStrokeStrip ch54st[] = -{ - {23,ch54st0} -}; - -static const GLUTStrokeChar ch54 = {104.7619f,1,ch54st}; - -/* char: 0x37 */ - -static const GLUTStrokeVertex ch55st0[] = -{ - {85.7143f,100.0000f}, - {38.0952f,0.0000f} -}; - -static const GLUTStrokeVertex ch55st1[] = -{ - {19.0476f,100.0000f}, - {85.7143f,100.0000f} -}; - -static const GLUTStrokeStrip ch55st[] = -{ - {2,ch55st0}, - {2,ch55st1} -}; - -static const GLUTStrokeChar ch55 = {104.7619f,2,ch55st}; - -/* char: 0x38 */ - -static const GLUTStrokeVertex ch56st0[] = -{ - {42.8571f,100.0000f}, - {28.5714f,95.2381f}, - {23.8095f,85.7143f}, - {23.8095f,76.1905f}, - {28.5714f,66.6667f}, - {38.0952f,61.9048f}, - {57.1428f,57.1429f}, - {71.4286f,52.3810f}, - {80.9524f,42.8571f}, - {85.7143f,33.3333f}, - {85.7143f,19.0476f}, - {80.9524f,9.5238f}, - {76.1905f,4.7619f}, - {61.9047f,0.0000f}, - {42.8571f,0.0000f}, - {28.5714f,4.7619f}, - {23.8095f,9.5238f}, - {19.0476f,19.0476f}, - {19.0476f,33.3333f}, - {23.8095f,42.8571f}, - {33.3333f,52.3810f}, - {47.6190f,57.1429f}, - {66.6666f,61.9048f}, - {76.1905f,66.6667f}, - {80.9524f,76.1905f}, - {80.9524f,85.7143f}, - {76.1905f,95.2381f}, - {61.9047f,100.0000f}, - {42.8571f,100.0000f} -}; - -static const GLUTStrokeStrip ch56st[] = -{ - {29,ch56st0} -}; - -static const GLUTStrokeChar ch56 = {104.7619f,1,ch56st}; - -/* char: 0x39 */ - -static const GLUTStrokeVertex ch57st0[] = -{ - {83.3334f,66.6667f}, - {78.5714f,52.3810f}, - {69.0476f,42.8571f}, - {54.7619f,38.0952f}, - {50.0000f,38.0952f}, - {35.7143f,42.8571f}, - {26.1905f,52.3810f}, - {21.4286f,66.6667f}, - {21.4286f,71.4286f}, - {26.1905f,85.7143f}, - {35.7143f,95.2381f}, - {50.0000f,100.0000f}, - {54.7619f,100.0000f}, - {69.0476f,95.2381f}, - {78.5714f,85.7143f}, - {83.3334f,66.6667f}, - {83.3334f,42.8571f}, - {78.5714f,19.0476f}, - {69.0476f,4.7619f}, - {54.7619f,0.0000f}, - {45.2381f,0.0000f}, - {30.9524f,4.7619f}, - {26.1905f,14.2857f} -}; - -static const GLUTStrokeStrip ch57st[] = -{ - {23,ch57st0} -}; - -static const GLUTStrokeChar ch57 = {104.7619f,1,ch57st}; - -/* char: 0x3a */ - -static const GLUTStrokeVertex ch58st0[] = -{ - {52.3810f,66.6667f}, - {47.6191f,61.9048f}, - {52.3810f,57.1429f}, - {57.1429f,61.9048f}, - {52.3810f,66.6667f} -}; - -static const GLUTStrokeVertex ch58st1[] = -{ - {52.3810f,9.5238f}, - {47.6191f,4.7619f}, - {52.3810f,0.0000f}, - {57.1429f,4.7619f}, - {52.3810f,9.5238f} -}; - -static const GLUTStrokeStrip ch58st[] = -{ - {5,ch58st0}, - {5,ch58st1} -}; - -static const GLUTStrokeChar ch58 = {104.7619f,2,ch58st}; - -/* char: 0x3b */ - -static const GLUTStrokeVertex ch59st0[] = -{ - {52.3810f,66.6667f}, - {47.6191f,61.9048f}, - {52.3810f,57.1429f}, - {57.1429f,61.9048f}, - {52.3810f,66.6667f} -}; - -static const GLUTStrokeVertex ch59st1[] = -{ - {57.1429f,4.7619f}, - {52.3810f,0.0000f}, - {47.6191f,4.7619f}, - {52.3810f,9.5238f}, - {57.1429f,4.7619f}, - {57.1429f,-4.7619f}, - {52.3810f,-14.2857f}, - {47.6191f,-19.0476f} -}; - -static const GLUTStrokeStrip ch59st[] = -{ - {5,ch59st0}, - {8,ch59st1} -}; - -static const GLUTStrokeChar ch59 = {104.7619f,2,ch59st}; - -/* char: 0x3c */ - -static const GLUTStrokeVertex ch60st0[] = -{ - {90.4762f,85.7143f}, - {14.2857f,42.8571f}, - {90.4762f,0.0000f} -}; - -static const GLUTStrokeStrip ch60st[] = -{ - {3,ch60st0} -}; - -static const GLUTStrokeChar ch60 = {104.7619f,1,ch60st}; - -/* char: 0x3d */ - -static const GLUTStrokeVertex ch61st0[] = -{ - {9.5238f,57.1429f}, - {95.2381f,57.1429f} -}; - -static const GLUTStrokeVertex ch61st1[] = -{ - {9.5238f,28.5714f}, - {95.2381f,28.5714f} -}; - -static const GLUTStrokeStrip ch61st[] = -{ - {2,ch61st0}, - {2,ch61st1} -}; - -static const GLUTStrokeChar ch61 = {104.7619f,2,ch61st}; - -/* char: 0x3e */ - -static const GLUTStrokeVertex ch62st0[] = -{ - {14.2857f,85.7143f}, - {90.4762f,42.8571f}, - {14.2857f,0.0000f} -}; - -static const GLUTStrokeStrip ch62st[] = -{ - {3,ch62st0} -}; - -static const GLUTStrokeChar ch62 = {104.7619f,1,ch62st}; - -/* char: 0x3f */ - -static const GLUTStrokeVertex ch63st0[] = -{ - {23.8095f,76.1905f}, - {23.8095f,80.9524f}, - {28.5714f,90.4762f}, - {33.3333f,95.2381f}, - {42.8571f,100.0000f}, - {61.9047f,100.0000f}, - {71.4285f,95.2381f}, - {76.1905f,90.4762f}, - {80.9524f,80.9524f}, - {80.9524f,71.4286f}, - {76.1905f,61.9048f}, - {71.4285f,57.1429f}, - {52.3809f,47.6190f}, - {52.3809f,33.3333f} -}; - -static const GLUTStrokeVertex ch63st1[] = -{ - {52.3809f,9.5238f}, - {47.6190f,4.7619f}, - {52.3809f,0.0000f}, - {57.1428f,4.7619f}, - {52.3809f,9.5238f} -}; - -static const GLUTStrokeStrip ch63st[] = -{ - {14,ch63st0}, - {5,ch63st1} -}; - -static const GLUTStrokeChar ch63 = {104.7619f,2,ch63st}; - -/* char: 0x40 */ - -static const GLUTStrokeVertex ch64st0[] = -{ - {64.2857f,52.3810f}, - {54.7619f,57.1429f}, - {45.2381f,57.1429f}, - {40.4762f,47.6190f}, - {40.4762f,42.8571f}, - {45.2381f,33.3333f}, - {54.7619f,33.3333f}, - {64.2857f,38.0952f} -}; - -static const GLUTStrokeVertex ch64st1[] = -{ - {64.2857f,57.1429f}, - {64.2857f,38.0952f}, - {69.0476f,33.3333f}, - {78.5714f,33.3333f}, - {83.3334f,42.8571f}, - {83.3334f,47.6190f}, - {78.5714f,61.9048f}, - {69.0476f,71.4286f}, - {54.7619f,76.1905f}, - {50.0000f,76.1905f}, - {35.7143f,71.4286f}, - {26.1905f,61.9048f}, - {21.4286f,47.6190f}, - {21.4286f,42.8571f}, - {26.1905f,28.5714f}, - {35.7143f,19.0476f}, - {50.0000f,14.2857f}, - {54.7619f,14.2857f}, - {69.0476f,19.0476f} -}; - -static const GLUTStrokeStrip ch64st[] = -{ - {8,ch64st0}, - {19,ch64st1} -}; - -static const GLUTStrokeChar ch64 = {104.7619f,2,ch64st}; - -/* char: 0x41 */ - -static const GLUTStrokeVertex ch65st0[] = -{ - {52.3809f,100.0000f}, - {14.2857f,0.0000f} -}; - -static const GLUTStrokeVertex ch65st1[] = -{ - {52.3809f,100.0000f}, - {90.4762f,0.0000f} -}; - -static const GLUTStrokeVertex ch65st2[] = -{ - {28.5714f,33.3333f}, - {76.1905f,33.3333f} -}; - -static const GLUTStrokeStrip ch65st[] = -{ - {2,ch65st0}, - {2,ch65st1}, - {2,ch65st2} -}; - -static const GLUTStrokeChar ch65 = {104.7619f,3,ch65st}; - -/* char: 0x42 */ - -static const GLUTStrokeVertex ch66st0[] = -{ - {19.0476f,100.0000f}, - {19.0476f,0.0000f} -}; - -static const GLUTStrokeVertex ch66st1[] = -{ - {19.0476f,100.0000f}, - {61.9047f,100.0000f}, - {76.1905f,95.2381f}, - {80.9524f,90.4762f}, - {85.7143f,80.9524f}, - {85.7143f,71.4286f}, - {80.9524f,61.9048f}, - {76.1905f,57.1429f}, - {61.9047f,52.3810f} -}; - -static const GLUTStrokeVertex ch66st2[] = -{ - {19.0476f,52.3810f}, - {61.9047f,52.3810f}, - {76.1905f,47.6190f}, - {80.9524f,42.8571f}, - {85.7143f,33.3333f}, - {85.7143f,19.0476f}, - {80.9524f,9.5238f}, - {76.1905f,4.7619f}, - {61.9047f,0.0000f}, - {19.0476f,0.0000f} -}; - -static const GLUTStrokeStrip ch66st[] = -{ - {2,ch66st0}, - {9,ch66st1}, - {10,ch66st2} -}; - -static const GLUTStrokeChar ch66 = {104.7619f,3,ch66st}; - -/* char: 0x43 */ - -static const GLUTStrokeVertex ch67st0[] = -{ - {88.0952f,76.1905f}, - {83.3334f,85.7143f}, - {73.8096f,95.2381f}, - {64.2857f,100.0000f}, - {45.2381f,100.0000f}, - {35.7143f,95.2381f}, - {26.1905f,85.7143f}, - {21.4286f,76.1905f}, - {16.6667f,61.9048f}, - {16.6667f,38.0952f}, - {21.4286f,23.8095f}, - {26.1905f,14.2857f}, - {35.7143f,4.7619f}, - {45.2381f,0.0000f}, - {64.2857f,0.0000f}, - {73.8096f,4.7619f}, - {83.3334f,14.2857f}, - {88.0952f,23.8095f} -}; - -static const GLUTStrokeStrip ch67st[] = -{ - {18,ch67st0} -}; - -static const GLUTStrokeChar ch67 = {104.7619f,1,ch67st}; - -/* char: 0x44 */ - -static const GLUTStrokeVertex ch68st0[] = -{ - {19.0476f,100.0000f}, - {19.0476f,0.0000f} -}; - -static const GLUTStrokeVertex ch68st1[] = -{ - {19.0476f,100.0000f}, - {52.3809f,100.0000f}, - {66.6666f,95.2381f}, - {76.1905f,85.7143f}, - {80.9524f,76.1905f}, - {85.7143f,61.9048f}, - {85.7143f,38.0952f}, - {80.9524f,23.8095f}, - {76.1905f,14.2857f}, - {66.6666f,4.7619f}, - {52.3809f,0.0000f}, - {19.0476f,0.0000f} -}; - -static const GLUTStrokeStrip ch68st[] = -{ - {2,ch68st0}, - {12,ch68st1} -}; - -static const GLUTStrokeChar ch68 = {104.7619f,2,ch68st}; - -/* char: 0x45 */ - -static const GLUTStrokeVertex ch69st0[] = -{ - {21.4286f,100.0000f}, - {21.4286f,0.0000f} -}; - -static const GLUTStrokeVertex ch69st1[] = -{ - {21.4286f,100.0000f}, - {83.3334f,100.0000f} -}; - -static const GLUTStrokeVertex ch69st2[] = -{ - {21.4286f,52.3810f}, - {59.5238f,52.3810f} -}; - -static const GLUTStrokeVertex ch69st3[] = -{ - {21.4286f,0.0000f}, - {83.3334f,0.0000f} -}; - -static const GLUTStrokeStrip ch69st[] = -{ - {2,ch69st0}, - {2,ch69st1}, - {2,ch69st2}, - {2,ch69st3} -}; - -static const GLUTStrokeChar ch69 = {104.7619f,4,ch69st}; - -/* char: 0x46 */ - -static const GLUTStrokeVertex ch70st0[] = -{ - {21.4286f,100.0000f}, - {21.4286f,0.0000f} -}; - -static const GLUTStrokeVertex ch70st1[] = -{ - {21.4286f,100.0000f}, - {83.3334f,100.0000f} -}; - -static const GLUTStrokeVertex ch70st2[] = -{ - {21.4286f,52.3810f}, - {59.5238f,52.3810f} -}; - -static const GLUTStrokeStrip ch70st[] = -{ - {2,ch70st0}, - {2,ch70st1}, - {2,ch70st2} -}; - -static const GLUTStrokeChar ch70 = {104.7619f,3,ch70st}; - -/* char: 0x47 */ - -static const GLUTStrokeVertex ch71st0[] = -{ - {88.0952f,76.1905f}, - {83.3334f,85.7143f}, - {73.8096f,95.2381f}, - {64.2857f,100.0000f}, - {45.2381f,100.0000f}, - {35.7143f,95.2381f}, - {26.1905f,85.7143f}, - {21.4286f,76.1905f}, - {16.6667f,61.9048f}, - {16.6667f,38.0952f}, - {21.4286f,23.8095f}, - {26.1905f,14.2857f}, - {35.7143f,4.7619f}, - {45.2381f,0.0000f}, - {64.2857f,0.0000f}, - {73.8096f,4.7619f}, - {83.3334f,14.2857f}, - {88.0952f,23.8095f}, - {88.0952f,38.0952f} -}; - -static const GLUTStrokeVertex ch71st1[] = -{ - {64.2857f,38.0952f}, - {88.0952f,38.0952f} -}; - -static const GLUTStrokeStrip ch71st[] = -{ - {19,ch71st0}, - {2,ch71st1} -}; - -static const GLUTStrokeChar ch71 = {104.7619f,2,ch71st}; - -/* char: 0x48 */ - -static const GLUTStrokeVertex ch72st0[] = -{ - {19.0476f,100.0000f}, - {19.0476f,0.0000f} -}; - -static const GLUTStrokeVertex ch72st1[] = -{ - {85.7143f,100.0000f}, - {85.7143f,0.0000f} -}; - -static const GLUTStrokeVertex ch72st2[] = -{ - {19.0476f,52.3810f}, - {85.7143f,52.3810f} -}; - -static const GLUTStrokeStrip ch72st[] = -{ - {2,ch72st0}, - {2,ch72st1}, - {2,ch72st2} -}; - -static const GLUTStrokeChar ch72 = {104.7619f,3,ch72st}; - -/* char: 0x49 */ - -static const GLUTStrokeVertex ch73st0[] = -{ - {52.3810f,100.0000f}, - {52.3810f,0.0000f} -}; - -static const GLUTStrokeStrip ch73st[] = -{ - {2,ch73st0} -}; - -static const GLUTStrokeChar ch73 = {104.7619f,1,ch73st}; - -/* char: 0x4a */ - -static const GLUTStrokeVertex ch74st0[] = -{ - {76.1905f,100.0000f}, - {76.1905f,23.8095f}, - {71.4286f,9.5238f}, - {66.6667f,4.7619f}, - {57.1429f,0.0000f}, - {47.6191f,0.0000f}, - {38.0953f,4.7619f}, - {33.3334f,9.5238f}, - {28.5715f,23.8095f}, - {28.5715f,33.3333f} -}; - -static const GLUTStrokeStrip ch74st[] = -{ - {10,ch74st0} -}; - -static const GLUTStrokeChar ch74 = {104.7619f,1,ch74st}; - -/* char: 0x4b */ - -static const GLUTStrokeVertex ch75st0[] = -{ - {19.0476f,100.0000f}, - {19.0476f,0.0000f} -}; - -static const GLUTStrokeVertex ch75st1[] = -{ - {85.7143f,100.0000f}, - {19.0476f,33.3333f} -}; - -static const GLUTStrokeVertex ch75st2[] = -{ - {42.8571f,57.1429f}, - {85.7143f,0.0000f} -}; - -static const GLUTStrokeStrip ch75st[] = -{ - {2,ch75st0}, - {2,ch75st1}, - {2,ch75st2} -}; - -static const GLUTStrokeChar ch75 = {104.7619f,3,ch75st}; - -/* char: 0x4c */ - -static const GLUTStrokeVertex ch76st0[] = -{ - {23.8095f,100.0000f}, - {23.8095f,0.0000f} -}; - -static const GLUTStrokeVertex ch76st1[] = -{ - {23.8095f,0.0000f}, - {80.9524f,0.0000f} -}; - -static const GLUTStrokeStrip ch76st[] = -{ - {2,ch76st0}, - {2,ch76st1} -}; - -static const GLUTStrokeChar ch76 = {104.7619f,2,ch76st}; - -/* char: 0x4d */ - -static const GLUTStrokeVertex ch77st0[] = -{ - {14.2857f,100.0000f}, - {14.2857f,0.0000f} -}; - -static const GLUTStrokeVertex ch77st1[] = -{ - {14.2857f,100.0000f}, - {52.3809f,0.0000f} -}; - -static const GLUTStrokeVertex ch77st2[] = -{ - {90.4762f,100.0000f}, - {52.3809f,0.0000f} -}; - -static const GLUTStrokeVertex ch77st3[] = -{ - {90.4762f,100.0000f}, - {90.4762f,0.0000f} -}; - -static const GLUTStrokeStrip ch77st[] = -{ - {2,ch77st0}, - {2,ch77st1}, - {2,ch77st2}, - {2,ch77st3} -}; - -static const GLUTStrokeChar ch77 = {104.7619f,4,ch77st}; - -/* char: 0x4e */ - -static const GLUTStrokeVertex ch78st0[] = -{ - {19.0476f,100.0000f}, - {19.0476f,0.0000f} -}; - -static const GLUTStrokeVertex ch78st1[] = -{ - {19.0476f,100.0000f}, - {85.7143f,0.0000f} -}; - -static const GLUTStrokeVertex ch78st2[] = -{ - {85.7143f,100.0000f}, - {85.7143f,0.0000f} -}; - -static const GLUTStrokeStrip ch78st[] = -{ - {2,ch78st0}, - {2,ch78st1}, - {2,ch78st2} -}; - -static const GLUTStrokeChar ch78 = {104.7619f,3,ch78st}; - -/* char: 0x4f */ - -static const GLUTStrokeVertex ch79st0[] = -{ - {42.8571f,100.0000f}, - {33.3333f,95.2381f}, - {23.8095f,85.7143f}, - {19.0476f,76.1905f}, - {14.2857f,61.9048f}, - {14.2857f,38.0952f}, - {19.0476f,23.8095f}, - {23.8095f,14.2857f}, - {33.3333f,4.7619f}, - {42.8571f,0.0000f}, - {61.9047f,0.0000f}, - {71.4286f,4.7619f}, - {80.9524f,14.2857f}, - {85.7143f,23.8095f}, - {90.4762f,38.0952f}, - {90.4762f,61.9048f}, - {85.7143f,76.1905f}, - {80.9524f,85.7143f}, - {71.4286f,95.2381f}, - {61.9047f,100.0000f}, - {42.8571f,100.0000f} -}; - -static const GLUTStrokeStrip ch79st[] = -{ - {21,ch79st0} -}; - -static const GLUTStrokeChar ch79 = {104.7619f,1,ch79st}; - -/* char: 0x50 */ - -static const GLUTStrokeVertex ch80st0[] = -{ - {19.0476f,100.0000f}, - {19.0476f,0.0000f} -}; - -static const GLUTStrokeVertex ch80st1[] = -{ - {19.0476f,100.0000f}, - {61.9047f,100.0000f}, - {76.1905f,95.2381f}, - {80.9524f,90.4762f}, - {85.7143f,80.9524f}, - {85.7143f,66.6667f}, - {80.9524f,57.1429f}, - {76.1905f,52.3810f}, - {61.9047f,47.6190f}, - {19.0476f,47.6190f} -}; - -static const GLUTStrokeStrip ch80st[] = -{ - {2,ch80st0}, - {10,ch80st1} -}; - -static const GLUTStrokeChar ch80 = {104.7619f,2,ch80st}; - -/* char: 0x51 */ - -static const GLUTStrokeVertex ch81st0[] = -{ - {42.8571f,100.0000f}, - {33.3333f,95.2381f}, - {23.8095f,85.7143f}, - {19.0476f,76.1905f}, - {14.2857f,61.9048f}, - {14.2857f,38.0952f}, - {19.0476f,23.8095f}, - {23.8095f,14.2857f}, - {33.3333f,4.7619f}, - {42.8571f,0.0000f}, - {61.9047f,0.0000f}, - {71.4286f,4.7619f}, - {80.9524f,14.2857f}, - {85.7143f,23.8095f}, - {90.4762f,38.0952f}, - {90.4762f,61.9048f}, - {85.7143f,76.1905f}, - {80.9524f,85.7143f}, - {71.4286f,95.2381f}, - {61.9047f,100.0000f}, - {42.8571f,100.0000f} -}; - -static const GLUTStrokeVertex ch81st1[] = -{ - {57.1428f,19.0476f}, - {85.7143f,-9.5238f} -}; - -static const GLUTStrokeStrip ch81st[] = -{ - {21,ch81st0}, - {2,ch81st1} -}; - -static const GLUTStrokeChar ch81 = {104.7619f,2,ch81st}; - -/* char: 0x52 */ - -static const GLUTStrokeVertex ch82st0[] = -{ - {19.0476f,100.0000f}, - {19.0476f,0.0000f} -}; - -static const GLUTStrokeVertex ch82st1[] = -{ - {19.0476f,100.0000f}, - {61.9047f,100.0000f}, - {76.1905f,95.2381f}, - {80.9524f,90.4762f}, - {85.7143f,80.9524f}, - {85.7143f,71.4286f}, - {80.9524f,61.9048f}, - {76.1905f,57.1429f}, - {61.9047f,52.3810f}, - {19.0476f,52.3810f} -}; - -static const GLUTStrokeVertex ch82st2[] = -{ - {52.3809f,52.3810f}, - {85.7143f,0.0000f} -}; - -static const GLUTStrokeStrip ch82st[] = -{ - {2,ch82st0}, - {10,ch82st1}, - {2,ch82st2} -}; - -static const GLUTStrokeChar ch82 = {104.7619f,3,ch82st}; - -/* char: 0x53 */ - -static const GLUTStrokeVertex ch83st0[] = -{ - {85.7143f,85.7143f}, - {76.1905f,95.2381f}, - {61.9047f,100.0000f}, - {42.8571f,100.0000f}, - {28.5714f,95.2381f}, - {19.0476f,85.7143f}, - {19.0476f,76.1905f}, - {23.8095f,66.6667f}, - {28.5714f,61.9048f}, - {38.0952f,57.1429f}, - {66.6666f,47.6190f}, - {76.1905f,42.8571f}, - {80.9524f,38.0952f}, - {85.7143f,28.5714f}, - {85.7143f,14.2857f}, - {76.1905f,4.7619f}, - {61.9047f,0.0000f}, - {42.8571f,0.0000f}, - {28.5714f,4.7619f}, - {19.0476f,14.2857f} -}; - -static const GLUTStrokeStrip ch83st[] = -{ - {20,ch83st0} -}; - -static const GLUTStrokeChar ch83 = {104.7619f,1,ch83st}; - -/* char: 0x54 */ - -static const GLUTStrokeVertex ch84st0[] = -{ - {52.3809f,100.0000f}, - {52.3809f,0.0000f} -}; - -static const GLUTStrokeVertex ch84st1[] = -{ - {19.0476f,100.0000f}, - {85.7143f,100.0000f} -}; - -static const GLUTStrokeStrip ch84st[] = -{ - {2,ch84st0}, - {2,ch84st1} -}; - -static const GLUTStrokeChar ch84 = {104.7619f,2,ch84st}; - -/* char: 0x55 */ - -static const GLUTStrokeVertex ch85st0[] = -{ - {19.0476f,100.0000f}, - {19.0476f,28.5714f}, - {23.8095f,14.2857f}, - {33.3333f,4.7619f}, - {47.6190f,0.0000f}, - {57.1428f,0.0000f}, - {71.4286f,4.7619f}, - {80.9524f,14.2857f}, - {85.7143f,28.5714f}, - {85.7143f,100.0000f} -}; - -static const GLUTStrokeStrip ch85st[] = -{ - {10,ch85st0} -}; - -static const GLUTStrokeChar ch85 = {104.7619f,1,ch85st}; - -/* char: 0x56 */ - -static const GLUTStrokeVertex ch86st0[] = -{ - {14.2857f,100.0000f}, - {52.3809f,0.0000f} -}; - -static const GLUTStrokeVertex ch86st1[] = -{ - {90.4762f,100.0000f}, - {52.3809f,0.0000f} -}; - -static const GLUTStrokeStrip ch86st[] = -{ - {2,ch86st0}, - {2,ch86st1} -}; - -static const GLUTStrokeChar ch86 = {104.7619f,2,ch86st}; - -/* char: 0x57 */ - -static const GLUTStrokeVertex ch87st0[] = -{ - {4.7619f,100.0000f}, - {28.5714f,0.0000f} -}; - -static const GLUTStrokeVertex ch87st1[] = -{ - {52.3809f,100.0000f}, - {28.5714f,0.0000f} -}; - -static const GLUTStrokeVertex ch87st2[] = -{ - {52.3809f,100.0000f}, - {76.1905f,0.0000f} -}; - -static const GLUTStrokeVertex ch87st3[] = -{ - {100.0000f,100.0000f}, - {76.1905f,0.0000f} -}; - -static const GLUTStrokeStrip ch87st[] = -{ - {2,ch87st0}, - {2,ch87st1}, - {2,ch87st2}, - {2,ch87st3} -}; - -static const GLUTStrokeChar ch87 = {104.7619f,4,ch87st}; - -/* char: 0x58 */ - -static const GLUTStrokeVertex ch88st0[] = -{ - {19.0476f,100.0000f}, - {85.7143f,0.0000f} -}; - -static const GLUTStrokeVertex ch88st1[] = -{ - {85.7143f,100.0000f}, - {19.0476f,0.0000f} -}; - -static const GLUTStrokeStrip ch88st[] = -{ - {2,ch88st0}, - {2,ch88st1} -}; - -static const GLUTStrokeChar ch88 = {104.7619f,2,ch88st}; - -/* char: 0x59 */ - -static const GLUTStrokeVertex ch89st0[] = -{ - {14.2857f,100.0000f}, - {52.3809f,52.3810f}, - {52.3809f,0.0000f} -}; - -static const GLUTStrokeVertex ch89st1[] = -{ - {90.4762f,100.0000f}, - {52.3809f,52.3810f} -}; - -static const GLUTStrokeStrip ch89st[] = -{ - {3,ch89st0}, - {2,ch89st1} -}; - -static const GLUTStrokeChar ch89 = {104.7619f,2,ch89st}; - -/* char: 0x5a */ - -static const GLUTStrokeVertex ch90st0[] = -{ - {85.7143f,100.0000f}, - {19.0476f,0.0000f} -}; - -static const GLUTStrokeVertex ch90st1[] = -{ - {19.0476f,100.0000f}, - {85.7143f,100.0000f} -}; - -static const GLUTStrokeVertex ch90st2[] = -{ - {19.0476f,0.0000f}, - {85.7143f,0.0000f} -}; - -static const GLUTStrokeStrip ch90st[] = -{ - {2,ch90st0}, - {2,ch90st1}, - {2,ch90st2} -}; - -static const GLUTStrokeChar ch90 = {104.7619f,3,ch90st}; - -/* char: 0x5b */ - -static const GLUTStrokeVertex ch91st0[] = -{ - {35.7143f,119.0476f}, - {35.7143f,-33.3333f} -}; - -static const GLUTStrokeVertex ch91st1[] = -{ - {40.4762f,119.0476f}, - {40.4762f,-33.3333f} -}; - -static const GLUTStrokeVertex ch91st2[] = -{ - {35.7143f,119.0476f}, - {69.0476f,119.0476f} -}; - -static const GLUTStrokeVertex ch91st3[] = -{ - {35.7143f,-33.3333f}, - {69.0476f,-33.3333f} -}; - -static const GLUTStrokeStrip ch91st[] = -{ - {2,ch91st0}, - {2,ch91st1}, - {2,ch91st2}, - {2,ch91st3} -}; - -static const GLUTStrokeChar ch91 = {104.7619f,4,ch91st}; - -/* char: 0x5c */ - -static const GLUTStrokeVertex ch92st0[] = -{ - {19.0476f,100.0000f}, - {85.7143f,-14.2857f} -}; - -static const GLUTStrokeStrip ch92st[] = -{ - {2,ch92st0} -}; - -static const GLUTStrokeChar ch92 = {104.7619f,1,ch92st}; - -/* char: 0x5d */ - -static const GLUTStrokeVertex ch93st0[] = -{ - {64.2857f,119.0476f}, - {64.2857f,-33.3333f} -}; - -static const GLUTStrokeVertex ch93st1[] = -{ - {69.0476f,119.0476f}, - {69.0476f,-33.3333f} -}; - -static const GLUTStrokeVertex ch93st2[] = -{ - {35.7143f,119.0476f}, - {69.0476f,119.0476f} -}; - -static const GLUTStrokeVertex ch93st3[] = -{ - {35.7143f,-33.3333f}, - {69.0476f,-33.3333f} -}; - -static const GLUTStrokeStrip ch93st[] = -{ - {2,ch93st0}, - {2,ch93st1}, - {2,ch93st2}, - {2,ch93st3} -}; - -static const GLUTStrokeChar ch93 = {104.7619f,4,ch93st}; - -/* char: 0x5e */ - -static const GLUTStrokeVertex ch94st0[] = -{ - {52.3809f,109.5238f}, - {14.2857f,42.8571f} -}; - -static const GLUTStrokeVertex ch94st1[] = -{ - {52.3809f,109.5238f}, - {90.4762f,42.8571f} -}; - -static const GLUTStrokeStrip ch94st[] = -{ - {2,ch94st0}, - {2,ch94st1} -}; - -static const GLUTStrokeChar ch94 = {104.7619f,2,ch94st}; - -/* char: 0x5f */ - -static const GLUTStrokeVertex ch95st0[] = -{ - {0.0000f,-33.3333f}, - {104.7619f,-33.3333f}, - {104.7619f,-28.5714f}, - {0.0000f,-28.5714f}, - {0.0000f,-33.3333f} -}; - -static const GLUTStrokeStrip ch95st[] = -{ - {5,ch95st0} -}; - -static const GLUTStrokeChar ch95 = {104.7619f,1,ch95st}; - -/* char: 0x60 */ - -static const GLUTStrokeVertex ch96st0[] = -{ - {42.8572f,100.0000f}, - {66.6667f,71.4286f} -}; - -static const GLUTStrokeVertex ch96st1[] = -{ - {42.8572f,100.0000f}, - {38.0953f,95.2381f}, - {66.6667f,71.4286f} -}; - -static const GLUTStrokeStrip ch96st[] = -{ - {2,ch96st0}, - {3,ch96st1} -}; - -static const GLUTStrokeChar ch96 = {104.7619f,2,ch96st}; - -/* char: 0x61 */ - -static const GLUTStrokeVertex ch97st0[] = -{ - {80.9524f,66.6667f}, - {80.9524f,0.0000f} -}; - -static const GLUTStrokeVertex ch97st1[] = -{ - {80.9524f,52.3810f}, - {71.4285f,61.9048f}, - {61.9047f,66.6667f}, - {47.6190f,66.6667f}, - {38.0952f,61.9048f}, - {28.5714f,52.3810f}, - {23.8095f,38.0952f}, - {23.8095f,28.5714f}, - {28.5714f,14.2857f}, - {38.0952f,4.7619f}, - {47.6190f,0.0000f}, - {61.9047f,0.0000f}, - {71.4285f,4.7619f}, - {80.9524f,14.2857f} -}; - -static const GLUTStrokeStrip ch97st[] = -{ - {2,ch97st0}, - {14,ch97st1} -}; - -static const GLUTStrokeChar ch97 = {104.7619f,2,ch97st}; - -/* char: 0x62 */ - -static const GLUTStrokeVertex ch98st0[] = -{ - {23.8095f,100.0000f}, - {23.8095f,0.0000f} -}; - -static const GLUTStrokeVertex ch98st1[] = -{ - {23.8095f,52.3810f}, - {33.3333f,61.9048f}, - {42.8571f,66.6667f}, - {57.1428f,66.6667f}, - {66.6666f,61.9048f}, - {76.1905f,52.3810f}, - {80.9524f,38.0952f}, - {80.9524f,28.5714f}, - {76.1905f,14.2857f}, - {66.6666f,4.7619f}, - {57.1428f,0.0000f}, - {42.8571f,0.0000f}, - {33.3333f,4.7619f}, - {23.8095f,14.2857f} -}; - -static const GLUTStrokeStrip ch98st[] = -{ - {2,ch98st0}, - {14,ch98st1} -}; - -static const GLUTStrokeChar ch98 = {104.7619f,2,ch98st}; - -/* char: 0x63 */ - -static const GLUTStrokeVertex ch99st0[] = -{ - {80.9524f,52.3810f}, - {71.4285f,61.9048f}, - {61.9047f,66.6667f}, - {47.6190f,66.6667f}, - {38.0952f,61.9048f}, - {28.5714f,52.3810f}, - {23.8095f,38.0952f}, - {23.8095f,28.5714f}, - {28.5714f,14.2857f}, - {38.0952f,4.7619f}, - {47.6190f,0.0000f}, - {61.9047f,0.0000f}, - {71.4285f,4.7619f}, - {80.9524f,14.2857f} -}; - -static const GLUTStrokeStrip ch99st[] = -{ - {14,ch99st0} -}; - -static const GLUTStrokeChar ch99 = {104.7619f,1,ch99st}; - -/* char: 0x64 */ - -static const GLUTStrokeVertex ch100st0[] = -{ - {80.9524f,100.0000f}, - {80.9524f,0.0000f} -}; - -static const GLUTStrokeVertex ch100st1[] = -{ - {80.9524f,52.3810f}, - {71.4285f,61.9048f}, - {61.9047f,66.6667f}, - {47.6190f,66.6667f}, - {38.0952f,61.9048f}, - {28.5714f,52.3810f}, - {23.8095f,38.0952f}, - {23.8095f,28.5714f}, - {28.5714f,14.2857f}, - {38.0952f,4.7619f}, - {47.6190f,0.0000f}, - {61.9047f,0.0000f}, - {71.4285f,4.7619f}, - {80.9524f,14.2857f} -}; - -static const GLUTStrokeStrip ch100st[] = -{ - {2,ch100st0}, - {14,ch100st1} -}; - -static const GLUTStrokeChar ch100 = {104.7619f,2,ch100st}; - -/* char: 0x65 */ - -static const GLUTStrokeVertex ch101st0[] = -{ - {23.8095f,38.0952f}, - {80.9524f,38.0952f}, - {80.9524f,47.6190f}, - {76.1905f,57.1429f}, - {71.4285f,61.9048f}, - {61.9047f,66.6667f}, - {47.6190f,66.6667f}, - {38.0952f,61.9048f}, - {28.5714f,52.3810f}, - {23.8095f,38.0952f}, - {23.8095f,28.5714f}, - {28.5714f,14.2857f}, - {38.0952f,4.7619f}, - {47.6190f,0.0000f}, - {61.9047f,0.0000f}, - {71.4285f,4.7619f}, - {80.9524f,14.2857f} -}; - -static const GLUTStrokeStrip ch101st[] = -{ - {17,ch101st0} -}; - -static const GLUTStrokeChar ch101 = {104.7619f,1,ch101st}; - -/* char: 0x66 */ - -static const GLUTStrokeVertex ch102st0[] = -{ - {71.4286f,100.0000f}, - {61.9048f,100.0000f}, - {52.3810f,95.2381f}, - {47.6191f,80.9524f}, - {47.6191f,0.0000f} -}; - -static const GLUTStrokeVertex ch102st1[] = -{ - {33.3334f,66.6667f}, - {66.6667f,66.6667f} -}; - -static const GLUTStrokeStrip ch102st[] = -{ - {5,ch102st0}, - {2,ch102st1} -}; - -static const GLUTStrokeChar ch102 = {104.7619f,2,ch102st}; - -/* char: 0x67 */ - -static const GLUTStrokeVertex ch103st0[] = -{ - {80.9524f,66.6667f}, - {80.9524f,-9.5238f}, - {76.1905f,-23.8095f}, - {71.4285f,-28.5714f}, - {61.9047f,-33.3333f}, - {47.6190f,-33.3333f}, - {38.0952f,-28.5714f} -}; - -static const GLUTStrokeVertex ch103st1[] = -{ - {80.9524f,52.3810f}, - {71.4285f,61.9048f}, - {61.9047f,66.6667f}, - {47.6190f,66.6667f}, - {38.0952f,61.9048f}, - {28.5714f,52.3810f}, - {23.8095f,38.0952f}, - {23.8095f,28.5714f}, - {28.5714f,14.2857f}, - {38.0952f,4.7619f}, - {47.6190f,0.0000f}, - {61.9047f,0.0000f}, - {71.4285f,4.7619f}, - {80.9524f,14.2857f} -}; - -static const GLUTStrokeStrip ch103st[] = -{ - {7,ch103st0}, - {14,ch103st1} -}; - -static const GLUTStrokeChar ch103 = {104.7619f,2,ch103st}; - -/* char: 0x68 */ - -static const GLUTStrokeVertex ch104st0[] = -{ - {26.1905f,100.0000f}, - {26.1905f,0.0000f} -}; - -static const GLUTStrokeVertex ch104st1[] = -{ - {26.1905f,47.6190f}, - {40.4762f,61.9048f}, - {50.0000f,66.6667f}, - {64.2857f,66.6667f}, - {73.8095f,61.9048f}, - {78.5715f,47.6190f}, - {78.5715f,0.0000f} -}; - -static const GLUTStrokeStrip ch104st[] = -{ - {2,ch104st0}, - {7,ch104st1} -}; - -static const GLUTStrokeChar ch104 = {104.7619f,2,ch104st}; - -/* char: 0x69 */ - -static const GLUTStrokeVertex ch105st0[] = -{ - {47.6191f,100.0000f}, - {52.3810f,95.2381f}, - {57.1429f,100.0000f}, - {52.3810f,104.7619f}, - {47.6191f,100.0000f} -}; - -static const GLUTStrokeVertex ch105st1[] = -{ - {52.3810f,66.6667f}, - {52.3810f,0.0000f} -}; - -static const GLUTStrokeStrip ch105st[] = -{ - {5,ch105st0}, - {2,ch105st1} -}; - -static const GLUTStrokeChar ch105 = {104.7619f,2,ch105st}; - -/* char: 0x6a */ - -static const GLUTStrokeVertex ch106st0[] = -{ - {57.1429f,100.0000f}, - {61.9048f,95.2381f}, - {66.6667f,100.0000f}, - {61.9048f,104.7619f}, - {57.1429f,100.0000f} -}; - -static const GLUTStrokeVertex ch106st1[] = -{ - {61.9048f,66.6667f}, - {61.9048f,-14.2857f}, - {57.1429f,-28.5714f}, - {47.6191f,-33.3333f}, - {38.0953f,-33.3333f} -}; - -static const GLUTStrokeStrip ch106st[] = -{ - {5,ch106st0}, - {5,ch106st1} -}; - -static const GLUTStrokeChar ch106 = {104.7619f,2,ch106st}; - -/* char: 0x6b */ - -static const GLUTStrokeVertex ch107st0[] = -{ - {26.1905f,100.0000f}, - {26.1905f,0.0000f} -}; - -static const GLUTStrokeVertex ch107st1[] = -{ - {73.8095f,66.6667f}, - {26.1905f,19.0476f} -}; - -static const GLUTStrokeVertex ch107st2[] = -{ - {45.2381f,38.0952f}, - {78.5715f,0.0000f} -}; - -static const GLUTStrokeStrip ch107st[] = -{ - {2,ch107st0}, - {2,ch107st1}, - {2,ch107st2} -}; - -static const GLUTStrokeChar ch107 = {104.7619f,3,ch107st}; - -/* char: 0x6c */ - -static const GLUTStrokeVertex ch108st0[] = -{ - {52.3810f,100.0000f}, - {52.3810f,0.0000f} -}; - -static const GLUTStrokeStrip ch108st[] = -{ - {2,ch108st0} -}; - -static const GLUTStrokeChar ch108 = {104.7619f,1,ch108st}; - -/* char: 0x6d */ - -static const GLUTStrokeVertex ch109st0[] = -{ - {0.0000f,66.6667f}, - {0.0000f,0.0000f} -}; - -static const GLUTStrokeVertex ch109st1[] = -{ - {0.0000f,47.6190f}, - {14.2857f,61.9048f}, - {23.8095f,66.6667f}, - {38.0952f,66.6667f}, - {47.6190f,61.9048f}, - {52.3810f,47.6190f}, - {52.3810f,0.0000f} -}; - -static const GLUTStrokeVertex ch109st2[] = -{ - {52.3810f,47.6190f}, - {66.6667f,61.9048f}, - {76.1905f,66.6667f}, - {90.4762f,66.6667f}, - {100.0000f,61.9048f}, - {104.7619f,47.6190f}, - {104.7619f,0.0000f} -}; - -static const GLUTStrokeStrip ch109st[] = -{ - {2,ch109st0}, - {7,ch109st1}, - {7,ch109st2} -}; - -static const GLUTStrokeChar ch109 = {104.7619f,3,ch109st}; - -/* char: 0x6e */ - -static const GLUTStrokeVertex ch110st0[] = -{ - {26.1905f,66.6667f}, - {26.1905f,0.0000f} -}; - -static const GLUTStrokeVertex ch110st1[] = -{ - {26.1905f,47.6190f}, - {40.4762f,61.9048f}, - {50.0000f,66.6667f}, - {64.2857f,66.6667f}, - {73.8095f,61.9048f}, - {78.5715f,47.6190f}, - {78.5715f,0.0000f} -}; - -static const GLUTStrokeStrip ch110st[] = -{ - {2,ch110st0}, - {7,ch110st1} -}; - -static const GLUTStrokeChar ch110 = {104.7619f,2,ch110st}; - -/* char: 0x6f */ - -static const GLUTStrokeVertex ch111st0[] = -{ - {45.2381f,66.6667f}, - {35.7143f,61.9048f}, - {26.1905f,52.3810f}, - {21.4286f,38.0952f}, - {21.4286f,28.5714f}, - {26.1905f,14.2857f}, - {35.7143f,4.7619f}, - {45.2381f,0.0000f}, - {59.5238f,0.0000f}, - {69.0476f,4.7619f}, - {78.5714f,14.2857f}, - {83.3334f,28.5714f}, - {83.3334f,38.0952f}, - {78.5714f,52.3810f}, - {69.0476f,61.9048f}, - {59.5238f,66.6667f}, - {45.2381f,66.6667f} -}; - -static const GLUTStrokeStrip ch111st[] = -{ - {17,ch111st0} -}; - -static const GLUTStrokeChar ch111 = {104.7619f,1,ch111st}; - -/* char: 0x70 */ - -static const GLUTStrokeVertex ch112st0[] = -{ - {23.8095f,66.6667f}, - {23.8095f,-33.3333f} -}; - -static const GLUTStrokeVertex ch112st1[] = -{ - {23.8095f,52.3810f}, - {33.3333f,61.9048f}, - {42.8571f,66.6667f}, - {57.1428f,66.6667f}, - {66.6666f,61.9048f}, - {76.1905f,52.3810f}, - {80.9524f,38.0952f}, - {80.9524f,28.5714f}, - {76.1905f,14.2857f}, - {66.6666f,4.7619f}, - {57.1428f,0.0000f}, - {42.8571f,0.0000f}, - {33.3333f,4.7619f}, - {23.8095f,14.2857f} -}; - -static const GLUTStrokeStrip ch112st[] = -{ - {2,ch112st0}, - {14,ch112st1} -}; - -static const GLUTStrokeChar ch112 = {104.7619f,2,ch112st}; - -/* char: 0x71 */ - -static const GLUTStrokeVertex ch113st0[] = -{ - {80.9524f,66.6667f}, - {80.9524f,-33.3333f} -}; - -static const GLUTStrokeVertex ch113st1[] = -{ - {80.9524f,52.3810f}, - {71.4285f,61.9048f}, - {61.9047f,66.6667f}, - {47.6190f,66.6667f}, - {38.0952f,61.9048f}, - {28.5714f,52.3810f}, - {23.8095f,38.0952f}, - {23.8095f,28.5714f}, - {28.5714f,14.2857f}, - {38.0952f,4.7619f}, - {47.6190f,0.0000f}, - {61.9047f,0.0000f}, - {71.4285f,4.7619f}, - {80.9524f,14.2857f} -}; - -static const GLUTStrokeStrip ch113st[] = -{ - {2,ch113st0}, - {14,ch113st1} -}; - -static const GLUTStrokeChar ch113 = {104.7619f,2,ch113st}; - -/* char: 0x72 */ - -static const GLUTStrokeVertex ch114st0[] = -{ - {33.3334f,66.6667f}, - {33.3334f,0.0000f} -}; - -static const GLUTStrokeVertex ch114st1[] = -{ - {33.3334f,38.0952f}, - {38.0953f,52.3810f}, - {47.6191f,61.9048f}, - {57.1429f,66.6667f}, - {71.4286f,66.6667f} -}; - -static const GLUTStrokeStrip ch114st[] = -{ - {2,ch114st0}, - {5,ch114st1} -}; - -static const GLUTStrokeChar ch114 = {104.7619f,2,ch114st}; - -/* char: 0x73 */ - -static const GLUTStrokeVertex ch115st0[] = -{ - {78.5715f,52.3810f}, - {73.8095f,61.9048f}, - {59.5238f,66.6667f}, - {45.2381f,66.6667f}, - {30.9524f,61.9048f}, - {26.1905f,52.3810f}, - {30.9524f,42.8571f}, - {40.4762f,38.0952f}, - {64.2857f,33.3333f}, - {73.8095f,28.5714f}, - {78.5715f,19.0476f}, - {78.5715f,14.2857f}, - {73.8095f,4.7619f}, - {59.5238f,0.0000f}, - {45.2381f,0.0000f}, - {30.9524f,4.7619f}, - {26.1905f,14.2857f} -}; - -static const GLUTStrokeStrip ch115st[] = -{ - {17,ch115st0} -}; - -static const GLUTStrokeChar ch115 = {104.7619f,1,ch115st}; - -/* char: 0x74 */ - -static const GLUTStrokeVertex ch116st0[] = -{ - {47.6191f,100.0000f}, - {47.6191f,19.0476f}, - {52.3810f,4.7619f}, - {61.9048f,0.0000f}, - {71.4286f,0.0000f} -}; - -static const GLUTStrokeVertex ch116st1[] = -{ - {33.3334f,66.6667f}, - {66.6667f,66.6667f} -}; - -static const GLUTStrokeStrip ch116st[] = -{ - {5,ch116st0}, - {2,ch116st1} -}; - -static const GLUTStrokeChar ch116 = {104.7619f,2,ch116st}; - -/* char: 0x75 */ - -static const GLUTStrokeVertex ch117st0[] = -{ - {26.1905f,66.6667f}, - {26.1905f,19.0476f}, - {30.9524f,4.7619f}, - {40.4762f,0.0000f}, - {54.7619f,0.0000f}, - {64.2857f,4.7619f}, - {78.5715f,19.0476f} -}; - -static const GLUTStrokeVertex ch117st1[] = -{ - {78.5715f,66.6667f}, - {78.5715f,0.0000f} -}; - -static const GLUTStrokeStrip ch117st[] = -{ - {7,ch117st0}, - {2,ch117st1} -}; - -static const GLUTStrokeChar ch117 = {104.7619f,2,ch117st}; - -/* char: 0x76 */ - -static const GLUTStrokeVertex ch118st0[] = -{ - {23.8095f,66.6667f}, - {52.3809f,0.0000f} -}; - -static const GLUTStrokeVertex ch118st1[] = -{ - {80.9524f,66.6667f}, - {52.3809f,0.0000f} -}; - -static const GLUTStrokeStrip ch118st[] = -{ - {2,ch118st0}, - {2,ch118st1} -}; - -static const GLUTStrokeChar ch118 = {104.7619f,2,ch118st}; - -/* char: 0x77 */ - -static const GLUTStrokeVertex ch119st0[] = -{ - {14.2857f,66.6667f}, - {33.3333f,0.0000f} -}; - -static const GLUTStrokeVertex ch119st1[] = -{ - {52.3809f,66.6667f}, - {33.3333f,0.0000f} -}; - -static const GLUTStrokeVertex ch119st2[] = -{ - {52.3809f,66.6667f}, - {71.4286f,0.0000f} -}; - -static const GLUTStrokeVertex ch119st3[] = -{ - {90.4762f,66.6667f}, - {71.4286f,0.0000f} -}; - -static const GLUTStrokeStrip ch119st[] = -{ - {2,ch119st0}, - {2,ch119st1}, - {2,ch119st2}, - {2,ch119st3} -}; - -static const GLUTStrokeChar ch119 = {104.7619f,4,ch119st}; - -/* char: 0x78 */ - -static const GLUTStrokeVertex ch120st0[] = -{ - {26.1905f,66.6667f}, - {78.5715f,0.0000f} -}; - -static const GLUTStrokeVertex ch120st1[] = -{ - {78.5715f,66.6667f}, - {26.1905f,0.0000f} -}; - -static const GLUTStrokeStrip ch120st[] = -{ - {2,ch120st0}, - {2,ch120st1} -}; - -static const GLUTStrokeChar ch120 = {104.7619f,2,ch120st}; - -/* char: 0x79 */ - -static const GLUTStrokeVertex ch121st0[] = -{ - {26.1905f,66.6667f}, - {54.7619f,0.0000f} -}; - -static const GLUTStrokeVertex ch121st1[] = -{ - {83.3334f,66.6667f}, - {54.7619f,0.0000f}, - {45.2381f,-19.0476f}, - {35.7143f,-28.5714f}, - {26.1905f,-33.3333f}, - {21.4286f,-33.3333f} -}; - -static const GLUTStrokeStrip ch121st[] = -{ - {2,ch121st0}, - {6,ch121st1} -}; - -static const GLUTStrokeChar ch121 = {104.7619f,2,ch121st}; - -/* char: 0x7a */ - -static const GLUTStrokeVertex ch122st0[] = -{ - {78.5715f,66.6667f}, - {26.1905f,0.0000f} -}; - -static const GLUTStrokeVertex ch122st1[] = -{ - {26.1905f,66.6667f}, - {78.5715f,66.6667f} -}; - -static const GLUTStrokeVertex ch122st2[] = -{ - {26.1905f,0.0000f}, - {78.5715f,0.0000f} -}; - -static const GLUTStrokeStrip ch122st[] = -{ - {2,ch122st0}, - {2,ch122st1}, - {2,ch122st2} -}; - -static const GLUTStrokeChar ch122 = {104.7619f,3,ch122st}; - -/* char: 0x7b */ - -static const GLUTStrokeVertex ch123st0[] = -{ - {64.2857f,119.0476f}, - {54.7619f,114.2857f}, - {50.0000f,109.5238f}, - {45.2381f,100.0000f}, - {45.2381f,90.4762f}, - {50.0000f,80.9524f}, - {54.7619f,76.1905f}, - {59.5238f,66.6667f}, - {59.5238f,57.1429f}, - {50.0000f,47.6190f} -}; - -static const GLUTStrokeVertex ch123st1[] = -{ - {54.7619f,114.2857f}, - {50.0000f,104.7619f}, - {50.0000f,95.2381f}, - {54.7619f,85.7143f}, - {59.5238f,80.9524f}, - {64.2857f,71.4286f}, - {64.2857f,61.9048f}, - {59.5238f,52.3810f}, - {40.4762f,42.8571f}, - {59.5238f,33.3333f}, - {64.2857f,23.8095f}, - {64.2857f,14.2857f}, - {59.5238f,4.7619f}, - {54.7619f,0.0000f}, - {50.0000f,-9.5238f}, - {50.0000f,-19.0476f}, - {54.7619f,-28.5714f} -}; - -static const GLUTStrokeVertex ch123st2[] = -{ - {50.0000f,38.0952f}, - {59.5238f,28.5714f}, - {59.5238f,19.0476f}, - {54.7619f,9.5238f}, - {50.0000f,4.7619f}, - {45.2381f,-4.7619f}, - {45.2381f,-14.2857f}, - {50.0000f,-23.8095f}, - {54.7619f,-28.5714f}, - {64.2857f,-33.3333f} -}; - -static const GLUTStrokeStrip ch123st[] = -{ - {10,ch123st0}, - {17,ch123st1}, - {10,ch123st2} -}; - -static const GLUTStrokeChar ch123 = {104.7619f,3,ch123st}; - -/* char: 0x7c */ - -static const GLUTStrokeVertex ch124st0[] = -{ - {52.3810f,119.0476f}, - {52.3810f,-33.3333f} -}; - -static const GLUTStrokeStrip ch124st[] = -{ - {2,ch124st0} -}; - -static const GLUTStrokeChar ch124 = {104.7619f,1,ch124st}; - -/* char: 0x7d */ - -static const GLUTStrokeVertex ch125st0[] = -{ - {40.4762f,119.0476f}, - {50.0000f,114.2857f}, - {54.7619f,109.5238f}, - {59.5238f,100.0000f}, - {59.5238f,90.4762f}, - {54.7619f,80.9524f}, - {50.0000f,76.1905f}, - {45.2381f,66.6667f}, - {45.2381f,57.1429f}, - {54.7619f,47.6190f} -}; - -static const GLUTStrokeVertex ch125st1[] = -{ - {50.0000f,114.2857f}, - {54.7619f,104.7619f}, - {54.7619f,95.2381f}, - {50.0000f,85.7143f}, - {45.2381f,80.9524f}, - {40.4762f,71.4286f}, - {40.4762f,61.9048f}, - {45.2381f,52.3810f}, - {64.2857f,42.8571f}, - {45.2381f,33.3333f}, - {40.4762f,23.8095f}, - {40.4762f,14.2857f}, - {45.2381f,4.7619f}, - {50.0000f,0.0000f}, - {54.7619f,-9.5238f}, - {54.7619f,-19.0476f}, - {50.0000f,-28.5714f} -}; - -static const GLUTStrokeVertex ch125st2[] = -{ - {54.7619f,38.0952f}, - {45.2381f,28.5714f}, - {45.2381f,19.0476f}, - {50.0000f,9.5238f}, - {54.7619f,4.7619f}, - {59.5238f,-4.7619f}, - {59.5238f,-14.2857f}, - {54.7619f,-23.8095f}, - {50.0000f,-28.5714f}, - {40.4762f,-33.3333f} -}; - -static const GLUTStrokeStrip ch125st[] = -{ - {10,ch125st0}, - {17,ch125st1}, - {10,ch125st2} -}; - -static const GLUTStrokeChar ch125 = {104.7619f,3,ch125st}; - -/* char: 0x7e */ - -static const GLUTStrokeVertex ch126st0[] = -{ - {9.5238f,28.5714f}, - {9.5238f,38.0952f}, - {14.2857f,52.3810f}, - {23.8095f,57.1429f}, - {33.3333f,57.1429f}, - {42.8571f,52.3810f}, - {61.9048f,38.0952f}, - {71.4286f,33.3333f}, - {80.9524f,33.3333f}, - {90.4762f,38.0952f}, - {95.2381f,47.6190f} -}; - -static const GLUTStrokeVertex ch126st1[] = -{ - {9.5238f,38.0952f}, - {14.2857f,47.6190f}, - {23.8095f,52.3810f}, - {33.3333f,52.3810f}, - {42.8571f,47.6190f}, - {61.9048f,33.3333f}, - {71.4286f,28.5714f}, - {80.9524f,28.5714f}, - {90.4762f,33.3333f}, - {95.2381f,47.6190f}, - {95.2381f,57.1429f} -}; - -static const GLUTStrokeStrip ch126st[] = -{ - {11,ch126st0}, - {11,ch126st1} -}; - -static const GLUTStrokeChar ch126 = {104.7619f,2,ch126st}; - -static const GLUTStrokeChar *chars[] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - &ch32, &ch33, &ch34, &ch35, &ch36, &ch37, &ch38, &ch39, - &ch40, &ch41, &ch42, &ch43, &ch44, &ch45, &ch46, &ch47, - &ch48, &ch49, &ch50, &ch51, &ch52, &ch53, &ch54, &ch55, - &ch56, &ch57, &ch58, &ch59, &ch60, &ch61, &ch62, &ch63, - &ch64, &ch65, &ch66, &ch67, &ch68, &ch69, &ch70, &ch71, - &ch72, &ch73, &ch74, &ch75, &ch76, &ch77, &ch78, &ch79, - &ch80, &ch81, &ch82, &ch83, &ch84, &ch85, &ch86, &ch87, - &ch88, &ch89, &ch90, &ch91, &ch92, &ch93, &ch94, &ch95, - &ch96, &ch97, &ch98, &ch99, &ch100, &ch101, &ch102, &ch103, - &ch104, &ch105, &ch106, &ch107, &ch108, &ch109, &ch110, &ch111, - &ch112, &ch113, &ch114, &ch115, &ch116, &ch117, &ch118, &ch119, - &ch120, &ch121, &ch122, &ch123, &ch124, &ch125, &ch126 -}; - -const GLUTStrokeFont glutStrokeMonoRoman = {"MonoRoman",128,chars,152.3809f,33.3333f}; diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/overlay.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/overlay.c deleted file mode 100644 index 46d3a39577..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/overlay.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * DOS/DJGPP Mesa Utility Toolkit - * Version: 1.0 - * - * Copyright (C) 2005 Daniel Borca All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * DANIEL BORCA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "internal.h" - - -int APIENTRY -glutLayerGet (GLenum info) -{ - switch (info) { - case GLUT_OVERLAY_POSSIBLE: - case GLUT_HAS_OVERLAY: - return GL_FALSE; - case GLUT_LAYER_IN_USE: - return GLUT_NORMAL; - case GLUT_NORMAL_DAMAGED: - return GL_FALSE; - case GLUT_OVERLAY_DAMAGED: - case GLUT_TRANSPARENT_INDEX: - default: - return -1; - } -} - - -void APIENTRY -glutOverlayDisplayFunc (GLUTdisplayCB func) -{ -} - - -void APIENTRY -glutEstablishOverlay (void) -{ -} - - -void APIENTRY -glutRemoveOverlay (void) -{ -} - - -void APIENTRY -glutUseLayer (GLenum layer) -{ -} - - -void APIENTRY -glutPostOverlayRedisplay (void) -{ -} - - -void APIENTRY -glutShowOverlay (void) -{ -} - - -void APIENTRY -glutHideOverlay (void) -{ -} - - -void APIENTRY -glutPostWindowOverlayRedisplay (int win) -{ -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/roman.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/roman.c deleted file mode 100644 index 89867c8f6c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/roman.c +++ /dev/null @@ -1,2783 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#include "internal.h" - -/* char: 0x20 */ - -static const GLUTStrokeStrip ch32st[] = -{ -}; - -static const GLUTStrokeChar ch32 = {104.7619f,0,ch32st}; - -/* char: 0x21 */ - -static const GLUTStrokeVertex ch33st0[] = -{ - {13.3819f,100.0000f}, - {13.3819f,33.3333f} -}; - -static const GLUTStrokeVertex ch33st1[] = -{ - {13.3819f,9.5238f}, - {8.6200f,4.7619f}, - {13.3819f,0.0000f}, - {18.1438f,4.7619f}, - {13.3819f,9.5238f} -}; - -static const GLUTStrokeStrip ch33st[] = -{ - {2,ch33st0}, - {5,ch33st1} -}; - -static const GLUTStrokeChar ch33 = {26.6238f,2,ch33st}; - -/* char: 0x22 */ - -static const GLUTStrokeVertex ch34st0[] = -{ - {4.0200f,100.0000f}, - {4.0200f,66.6667f} -}; - -static const GLUTStrokeVertex ch34st1[] = -{ - {42.1152f,100.0000f}, - {42.1152f,66.6667f} -}; - -static const GLUTStrokeStrip ch34st[] = -{ - {2,ch34st0}, - {2,ch34st1} -}; - -static const GLUTStrokeChar ch34 = {51.4352f,2,ch34st}; - -/* char: 0x23 */ - -static const GLUTStrokeVertex ch35st0[] = -{ - {41.2952f,119.0476f}, - {7.9619f,-33.3333f} -}; - -static const GLUTStrokeVertex ch35st1[] = -{ - {69.8667f,119.0476f}, - {36.5333f,-33.3333f} -}; - -static const GLUTStrokeVertex ch35st2[] = -{ - {7.9619f,57.1429f}, - {74.6286f,57.1429f} -}; - -static const GLUTStrokeVertex ch35st3[] = -{ - {3.2000f,28.5714f}, - {69.8667f,28.5714f} -}; - -static const GLUTStrokeStrip ch35st[] = -{ - {2,ch35st0}, - {2,ch35st1}, - {2,ch35st2}, - {2,ch35st3} -}; - -static const GLUTStrokeChar ch35 = {79.4886f,4,ch35st}; - -/* char: 0x24 */ - -static const GLUTStrokeVertex ch36st0[] = -{ - {28.6295f,119.0476f}, - {28.6295f,-19.0476f} -}; - -static const GLUTStrokeVertex ch36st1[] = -{ - {47.6771f,119.0476f}, - {47.6771f,-19.0476f} -}; - -static const GLUTStrokeVertex ch36st2[] = -{ - {71.4867f,85.7143f}, - {61.9629f,95.2381f}, - {47.6771f,100.0000f}, - {28.6295f,100.0000f}, - {14.3438f,95.2381f}, - {4.8200f,85.7143f}, - {4.8200f,76.1905f}, - {9.5819f,66.6667f}, - {14.3438f,61.9048f}, - {23.8676f,57.1429f}, - {52.4390f,47.6190f}, - {61.9629f,42.8571f}, - {66.7248f,38.0952f}, - {71.4867f,28.5714f}, - {71.4867f,14.2857f}, - {61.9629f,4.7619f}, - {47.6771f,0.0000f}, - {28.6295f,0.0000f}, - {14.3438f,4.7619f}, - {4.8200f,14.2857f} -}; - -static const GLUTStrokeStrip ch36st[] = -{ - {2,ch36st0}, - {2,ch36st1}, - {20,ch36st2} -}; - -static const GLUTStrokeChar ch36 = {76.2067f,3,ch36st}; - -/* char: 0x25 */ - -static const GLUTStrokeVertex ch37st0[] = -{ - {92.0743f,100.0000f}, - {6.3600f,0.0000f} -}; - -static const GLUTStrokeVertex ch37st1[] = -{ - {30.1695f,100.0000f}, - {39.6933f,90.4762f}, - {39.6933f,80.9524f}, - {34.9314f,71.4286f}, - {25.4076f,66.6667f}, - {15.8838f,66.6667f}, - {6.3600f,76.1905f}, - {6.3600f,85.7143f}, - {11.1219f,95.2381f}, - {20.6457f,100.0000f}, - {30.1695f,100.0000f}, - {39.6933f,95.2381f}, - {53.9790f,90.4762f}, - {68.2648f,90.4762f}, - {82.5505f,95.2381f}, - {92.0743f,100.0000f} -}; - -static const GLUTStrokeVertex ch37st2[] = -{ - {73.0267f,33.3333f}, - {63.5029f,28.5714f}, - {58.7410f,19.0476f}, - {58.7410f,9.5238f}, - {68.2648f,0.0000f}, - {77.7886f,0.0000f}, - {87.3124f,4.7619f}, - {92.0743f,14.2857f}, - {92.0743f,23.8095f}, - {82.5505f,33.3333f}, - {73.0267f,33.3333f} -}; - -static const GLUTStrokeStrip ch37st[] = -{ - {2,ch37st0}, - {16,ch37st1}, - {11,ch37st2} -}; - -static const GLUTStrokeChar ch37 = {96.5743f,3,ch37st}; - -/* char: 0x26 */ - -static const GLUTStrokeVertex ch38st0[] = -{ - {101.2181f,57.1429f}, - {101.2181f,61.9048f}, - {96.4562f,66.6667f}, - {91.6943f,66.6667f}, - {86.9324f,61.9048f}, - {82.1705f,52.3810f}, - {72.6467f,28.5714f}, - {63.1229f,14.2857f}, - {53.5990f,4.7619f}, - {44.0752f,0.0000f}, - {25.0276f,0.0000f}, - {15.5038f,4.7619f}, - {10.7419f,9.5238f}, - {5.9800f,19.0476f}, - {5.9800f,28.5714f}, - {10.7419f,38.0952f}, - {15.5038f,42.8571f}, - {48.8371f,61.9048f}, - {53.5990f,66.6667f}, - {58.3610f,76.1905f}, - {58.3610f,85.7143f}, - {53.5990f,95.2381f}, - {44.0752f,100.0000f}, - {34.5514f,95.2381f}, - {29.7895f,85.7143f}, - {29.7895f,76.1905f}, - {34.5514f,61.9048f}, - {44.0752f,47.6190f}, - {67.8848f,14.2857f}, - {77.4086f,4.7619f}, - {86.9324f,0.0000f}, - {96.4562f,0.0000f}, - {101.2181f,4.7619f}, - {101.2181f,9.5238f} -}; - -static const GLUTStrokeStrip ch38st[] = -{ - {34,ch38st0} -}; - -static const GLUTStrokeChar ch38 = {101.7581f,1,ch38st}; - -/* char: 0x27 */ - -static const GLUTStrokeVertex ch39st0[] = -{ - {4.4400f,100.0000f}, - {4.4400f,66.6667f} -}; - -static const GLUTStrokeStrip ch39st[] = -{ - {2,ch39st0} -}; - -static const GLUTStrokeChar ch39 = {13.6200f,1,ch39st}; - -/* char: 0x28 */ - -static const GLUTStrokeVertex ch40st0[] = -{ - {40.9133f,119.0476f}, - {31.3895f,109.5238f}, - {21.8657f,95.2381f}, - {12.3419f,76.1905f}, - {7.5800f,52.3810f}, - {7.5800f,33.3333f}, - {12.3419f,9.5238f}, - {21.8657f,-9.5238f}, - {31.3895f,-23.8095f}, - {40.9133f,-33.3333f} -}; - -static const GLUTStrokeStrip ch40st[] = -{ - {10,ch40st0} -}; - -static const GLUTStrokeChar ch40 = {47.1733f,1,ch40st}; - -/* char: 0x29 */ - -static const GLUTStrokeVertex ch41st0[] = -{ - {5.2800f,119.0476f}, - {14.8038f,109.5238f}, - {24.3276f,95.2381f}, - {33.8514f,76.1905f}, - {38.6133f,52.3810f}, - {38.6133f,33.3333f}, - {33.8514f,9.5238f}, - {24.3276f,-9.5238f}, - {14.8038f,-23.8095f}, - {5.2800f,-33.3333f} -}; - -static const GLUTStrokeStrip ch41st[] = -{ - {10,ch41st0} -}; - -static const GLUTStrokeChar ch41 = {47.5333f,1,ch41st}; - -/* char: 0x2a */ - -static const GLUTStrokeVertex ch42st0[] = -{ - {30.7695f,71.4286f}, - {30.7695f,14.2857f} -}; - -static const GLUTStrokeVertex ch42st1[] = -{ - {6.9600f,57.1429f}, - {54.5790f,28.5714f} -}; - -static const GLUTStrokeVertex ch42st2[] = -{ - {54.5790f,57.1429f}, - {6.9600f,28.5714f} -}; - -static const GLUTStrokeStrip ch42st[] = -{ - {2,ch42st0}, - {2,ch42st1}, - {2,ch42st2} -}; - -static const GLUTStrokeChar ch42 = {59.4390f,3,ch42st}; - -/* char: 0x2b */ - -static const GLUTStrokeVertex ch43st0[] = -{ - {48.8371f,85.7143f}, - {48.8371f,0.0000f} -}; - -static const GLUTStrokeVertex ch43st1[] = -{ - {5.9800f,42.8571f}, - {91.6943f,42.8571f} -}; - -static const GLUTStrokeStrip ch43st[] = -{ - {2,ch43st0}, - {2,ch43st1} -}; - -static const GLUTStrokeChar ch43 = {97.2543f,2,ch43st}; - -/* char: 0x2c */ - -static const GLUTStrokeVertex ch44st0[] = -{ - {18.2838f,4.7619f}, - {13.5219f,0.0000f}, - {8.7600f,4.7619f}, - {13.5219f,9.5238f}, - {18.2838f,4.7619f}, - {18.2838f,-4.7619f}, - {13.5219f,-14.2857f}, - {8.7600f,-19.0476f} -}; - -static const GLUTStrokeStrip ch44st[] = -{ - {8,ch44st0} -}; - -static const GLUTStrokeChar ch44 = {26.0638f,1,ch44st}; - -/* char: 0x2d */ - -static const GLUTStrokeVertex ch45st0[] = -{ - {7.3800f,42.8571f}, - {93.0943f,42.8571f} -}; - -static const GLUTStrokeStrip ch45st[] = -{ - {2,ch45st0} -}; - -static const GLUTStrokeChar ch45 = {100.7543f,1,ch45st}; - -/* char: 0x2e */ - -static const GLUTStrokeVertex ch46st0[] = -{ - {13.1019f,9.5238f}, - {8.3400f,4.7619f}, - {13.1019f,0.0000f}, - {17.8638f,4.7619f}, - {13.1019f,9.5238f} -}; - -static const GLUTStrokeStrip ch46st[] = -{ - {5,ch46st0} -}; - -static const GLUTStrokeChar ch46 = {26.4838f,1,ch46st}; - -/* char: 0x2f */ - -static const GLUTStrokeVertex ch47st0[] = -{ - {7.2400f,-14.2857f}, - {73.9067f,100.0000f} -}; - -static const GLUTStrokeStrip ch47st[] = -{ - {2,ch47st0} -}; - -static const GLUTStrokeChar ch47 = {82.1067f,1,ch47st}; - -/* char: 0x30 */ - -static const GLUTStrokeVertex ch48st0[] = -{ - {33.5514f,100.0000f}, - {19.2657f,95.2381f}, - {9.7419f,80.9524f}, - {4.9800f,57.1429f}, - {4.9800f,42.8571f}, - {9.7419f,19.0476f}, - {19.2657f,4.7619f}, - {33.5514f,0.0000f}, - {43.0752f,0.0000f}, - {57.3610f,4.7619f}, - {66.8848f,19.0476f}, - {71.6467f,42.8571f}, - {71.6467f,57.1429f}, - {66.8848f,80.9524f}, - {57.3610f,95.2381f}, - {43.0752f,100.0000f}, - {33.5514f,100.0000f} -}; - -static const GLUTStrokeStrip ch48st[] = -{ - {17,ch48st0} -}; - -static const GLUTStrokeChar ch48 = {77.0667f,1,ch48st}; - -/* char: 0x31 */ - -static const GLUTStrokeVertex ch49st0[] = -{ - {11.8200f,80.9524f}, - {21.3438f,85.7143f}, - {35.6295f,100.0000f}, - {35.6295f,0.0000f} -}; - -static const GLUTStrokeStrip ch49st[] = -{ - {4,ch49st0} -}; - -static const GLUTStrokeChar ch49 = {66.5295f,1,ch49st}; - -/* char: 0x32 */ - -static const GLUTStrokeVertex ch50st0[] = -{ - {10.1819f,76.1905f}, - {10.1819f,80.9524f}, - {14.9438f,90.4762f}, - {19.7057f,95.2381f}, - {29.2295f,100.0000f}, - {48.2771f,100.0000f}, - {57.8010f,95.2381f}, - {62.5629f,90.4762f}, - {67.3248f,80.9524f}, - {67.3248f,71.4286f}, - {62.5629f,61.9048f}, - {53.0390f,47.6190f}, - {5.4200f,0.0000f}, - {72.0867f,0.0000f} -}; - -static const GLUTStrokeStrip ch50st[] = -{ - {14,ch50st0} -}; - -static const GLUTStrokeChar ch50 = {77.6467f,1,ch50st}; - -/* char: 0x33 */ - -static const GLUTStrokeVertex ch51st0[] = -{ - {14.5238f,100.0000f}, - {66.9048f,100.0000f}, - {38.3333f,61.9048f}, - {52.6190f,61.9048f}, - {62.1429f,57.1429f}, - {66.9048f,52.3810f}, - {71.6667f,38.0952f}, - {71.6667f,28.5714f}, - {66.9048f,14.2857f}, - {57.3810f,4.7619f}, - {43.0952f,0.0000f}, - {28.8095f,0.0000f}, - {14.5238f,4.7619f}, - {9.7619f,9.5238f}, - {5.0000f,19.0476f} -}; - -static const GLUTStrokeStrip ch51st[] = -{ - {15,ch51st0} -}; - -static const GLUTStrokeChar ch51 = {77.0467f,1,ch51st}; - -/* char: 0x34 */ - -static const GLUTStrokeVertex ch52st0[] = -{ - {51.4990f,100.0000f}, - {3.8800f,33.3333f}, - {75.3086f,33.3333f} -}; - -static const GLUTStrokeVertex ch52st1[] = -{ - {51.4990f,100.0000f}, - {51.4990f,0.0000f} -}; - -static const GLUTStrokeStrip ch52st[] = -{ - {3,ch52st0}, - {2,ch52st1} -}; - -static const GLUTStrokeChar ch52 = {80.1686f,2,ch52st}; - -/* char: 0x35 */ - -static const GLUTStrokeVertex ch53st0[] = -{ - {62.0029f,100.0000f}, - {14.3838f,100.0000f}, - {9.6219f,57.1429f}, - {14.3838f,61.9048f}, - {28.6695f,66.6667f}, - {42.9552f,66.6667f}, - {57.2410f,61.9048f}, - {66.7648f,52.3810f}, - {71.5267f,38.0952f}, - {71.5267f,28.5714f}, - {66.7648f,14.2857f}, - {57.2410f,4.7619f}, - {42.9552f,0.0000f}, - {28.6695f,0.0000f}, - {14.3838f,4.7619f}, - {9.6219f,9.5238f}, - {4.8600f,19.0476f} -}; - -static const GLUTStrokeStrip ch53st[] = -{ - {17,ch53st0} -}; - -static const GLUTStrokeChar ch53 = {77.6867f,1,ch53st}; - -/* char: 0x36 */ - -static const GLUTStrokeVertex ch54st0[] = -{ - {62.7229f,85.7143f}, - {57.9610f,95.2381f}, - {43.6752f,100.0000f}, - {34.1514f,100.0000f}, - {19.8657f,95.2381f}, - {10.3419f,80.9524f}, - {5.5800f,57.1429f}, - {5.5800f,33.3333f}, - {10.3419f,14.2857f}, - {19.8657f,4.7619f}, - {34.1514f,0.0000f}, - {38.9133f,0.0000f}, - {53.1990f,4.7619f}, - {62.7229f,14.2857f}, - {67.4848f,28.5714f}, - {67.4848f,33.3333f}, - {62.7229f,47.6190f}, - {53.1990f,57.1429f}, - {38.9133f,61.9048f}, - {34.1514f,61.9048f}, - {19.8657f,57.1429f}, - {10.3419f,47.6190f}, - {5.5800f,33.3333f} -}; - -static const GLUTStrokeStrip ch54st[] = -{ - {23,ch54st0} -}; - -static const GLUTStrokeChar ch54 = {73.8048f,1,ch54st}; - -/* char: 0x37 */ - -static const GLUTStrokeVertex ch55st0[] = -{ - {72.2267f,100.0000f}, - {24.6076f,0.0000f} -}; - -static const GLUTStrokeVertex ch55st1[] = -{ - {5.5600f,100.0000f}, - {72.2267f,100.0000f} -}; - -static const GLUTStrokeStrip ch55st[] = -{ - {2,ch55st0}, - {2,ch55st1} -}; - -static const GLUTStrokeChar ch55 = {77.2267f,2,ch55st}; - -/* char: 0x38 */ - -static const GLUTStrokeVertex ch56st0[] = -{ - {29.4095f,100.0000f}, - {15.1238f,95.2381f}, - {10.3619f,85.7143f}, - {10.3619f,76.1905f}, - {15.1238f,66.6667f}, - {24.6476f,61.9048f}, - {43.6952f,57.1429f}, - {57.9810f,52.3810f}, - {67.5048f,42.8571f}, - {72.2667f,33.3333f}, - {72.2667f,19.0476f}, - {67.5048f,9.5238f}, - {62.7429f,4.7619f}, - {48.4571f,0.0000f}, - {29.4095f,0.0000f}, - {15.1238f,4.7619f}, - {10.3619f,9.5238f}, - {5.6000f,19.0476f}, - {5.6000f,33.3333f}, - {10.3619f,42.8571f}, - {19.8857f,52.3810f}, - {34.1714f,57.1429f}, - {53.2190f,61.9048f}, - {62.7429f,66.6667f}, - {67.5048f,76.1905f}, - {67.5048f,85.7143f}, - {62.7429f,95.2381f}, - {48.4571f,100.0000f}, - {29.4095f,100.0000f} -}; - -static const GLUTStrokeStrip ch56st[] = -{ - {29,ch56st0} -}; - -static const GLUTStrokeChar ch56 = {77.6667f,1,ch56st}; - -/* char: 0x39 */ - -static const GLUTStrokeVertex ch57st0[] = -{ - {68.5048f,66.6667f}, - {63.7429f,52.3810f}, - {54.2190f,42.8571f}, - {39.9333f,38.0952f}, - {35.1714f,38.0952f}, - {20.8857f,42.8571f}, - {11.3619f,52.3810f}, - {6.6000f,66.6667f}, - {6.6000f,71.4286f}, - {11.3619f,85.7143f}, - {20.8857f,95.2381f}, - {35.1714f,100.0000f}, - {39.9333f,100.0000f}, - {54.2190f,95.2381f}, - {63.7429f,85.7143f}, - {68.5048f,66.6667f}, - {68.5048f,42.8571f}, - {63.7429f,19.0476f}, - {54.2190f,4.7619f}, - {39.9333f,0.0000f}, - {30.4095f,0.0000f}, - {16.1238f,4.7619f}, - {11.3619f,14.2857f} -}; - -static const GLUTStrokeStrip ch57st[] = -{ - {23,ch57st0} -}; - -static const GLUTStrokeChar ch57 = {74.0648f,1,ch57st}; - -/* char: 0x3a */ - -static const GLUTStrokeVertex ch58st0[] = -{ - {14.0819f,66.6667f}, - {9.3200f,61.9048f}, - {14.0819f,57.1429f}, - {18.8438f,61.9048f}, - {14.0819f,66.6667f} -}; - -static const GLUTStrokeVertex ch58st1[] = -{ - {14.0819f,9.5238f}, - {9.3200f,4.7619f}, - {14.0819f,0.0000f}, - {18.8438f,4.7619f}, - {14.0819f,9.5238f} -}; - -static const GLUTStrokeStrip ch58st[] = -{ - {5,ch58st0}, - {5,ch58st1} -}; - -static const GLUTStrokeChar ch58 = {26.2238f,2,ch58st}; - -/* char: 0x3b */ - -static const GLUTStrokeVertex ch59st0[] = -{ - {12.9619f,66.6667f}, - {8.2000f,61.9048f}, - {12.9619f,57.1429f}, - {17.7238f,61.9048f}, - {12.9619f,66.6667f} -}; - -static const GLUTStrokeVertex ch59st1[] = -{ - {17.7238f,4.7619f}, - {12.9619f,0.0000f}, - {8.2000f,4.7619f}, - {12.9619f,9.5238f}, - {17.7238f,4.7619f}, - {17.7238f,-4.7619f}, - {12.9619f,-14.2857f}, - {8.2000f,-19.0476f} -}; - -static const GLUTStrokeStrip ch59st[] = -{ - {5,ch59st0}, - {8,ch59st1} -}; - -static const GLUTStrokeChar ch59 = {26.3038f,2,ch59st}; - -/* char: 0x3c */ - -static const GLUTStrokeVertex ch60st0[] = -{ - {79.2505f,85.7143f}, - {3.0600f,42.8571f}, - {79.2505f,0.0000f} -}; - -static const GLUTStrokeStrip ch60st[] = -{ - {3,ch60st0} -}; - -static const GLUTStrokeChar ch60 = {81.6105f,1,ch60st}; - -/* char: 0x3d */ - -static const GLUTStrokeVertex ch61st0[] = -{ - {5.7000f,57.1429f}, - {91.4143f,57.1429f} -}; - -static const GLUTStrokeVertex ch61st1[] = -{ - {5.7000f,28.5714f}, - {91.4143f,28.5714f} -}; - -static const GLUTStrokeStrip ch61st[] = -{ - {2,ch61st0}, - {2,ch61st1} -}; - -static const GLUTStrokeChar ch61 = {97.2543f,2,ch61st}; - -/* char: 0x3e */ - -static const GLUTStrokeVertex ch62st0[] = -{ - {2.7800f,85.7143f}, - {78.9705f,42.8571f}, - {2.7800f,0.0000f} -}; - -static const GLUTStrokeStrip ch62st[] = -{ - {3,ch62st0} -}; - -static const GLUTStrokeChar ch62 = {81.6105f,1,ch62st}; - -/* char: 0x3f */ - -static const GLUTStrokeVertex ch63st0[] = -{ - {8.4200f,76.1905f}, - {8.4200f,80.9524f}, - {13.1819f,90.4762f}, - {17.9438f,95.2381f}, - {27.4676f,100.0000f}, - {46.5152f,100.0000f}, - {56.0390f,95.2381f}, - {60.8010f,90.4762f}, - {65.5629f,80.9524f}, - {65.5629f,71.4286f}, - {60.8010f,61.9048f}, - {56.0390f,57.1429f}, - {36.9914f,47.6190f}, - {36.9914f,33.3333f} -}; - -static const GLUTStrokeVertex ch63st1[] = -{ - {36.9914f,9.5238f}, - {32.2295f,4.7619f}, - {36.9914f,0.0000f}, - {41.7533f,4.7619f}, - {36.9914f,9.5238f} -}; - -static const GLUTStrokeStrip ch63st[] = -{ - {14,ch63st0}, - {5,ch63st1} -}; - -static const GLUTStrokeChar ch63 = {73.9029f,2,ch63st}; - -/* char: 0x40 */ - -static const GLUTStrokeVertex ch64st0[] = -{ - {49.2171f,52.3810f}, - {39.6933f,57.1429f}, - {30.1695f,57.1429f}, - {25.4076f,47.6190f}, - {25.4076f,42.8571f}, - {30.1695f,33.3333f}, - {39.6933f,33.3333f}, - {49.2171f,38.0952f} -}; - -static const GLUTStrokeVertex ch64st1[] = -{ - {49.2171f,57.1429f}, - {49.2171f,38.0952f}, - {53.9790f,33.3333f}, - {63.5029f,33.3333f}, - {68.2648f,42.8571f}, - {68.2648f,47.6190f}, - {63.5029f,61.9048f}, - {53.9790f,71.4286f}, - {39.6933f,76.1905f}, - {34.9314f,76.1905f}, - {20.6457f,71.4286f}, - {11.1219f,61.9048f}, - {6.3600f,47.6190f}, - {6.3600f,42.8571f}, - {11.1219f,28.5714f}, - {20.6457f,19.0476f}, - {34.9314f,14.2857f}, - {39.6933f,14.2857f}, - {53.9790f,19.0476f} -}; - -static const GLUTStrokeStrip ch64st[] = -{ - {8,ch64st0}, - {19,ch64st1} -}; - -static const GLUTStrokeChar ch64 = {74.3648f,2,ch64st}; - -/* char: 0x41 */ - -static const GLUTStrokeVertex ch65st0[] = -{ - {40.5952f,100.0000f}, - {2.5000f,0.0000f} -}; - -static const GLUTStrokeVertex ch65st1[] = -{ - {40.5952f,100.0000f}, - {78.6905f,0.0000f} -}; - -static const GLUTStrokeVertex ch65st2[] = -{ - {16.7857f,33.3333f}, - {64.4048f,33.3333f} -}; - -static const GLUTStrokeStrip ch65st[] = -{ - {2,ch65st0}, - {2,ch65st1}, - {2,ch65st2} -}; - -static const GLUTStrokeChar ch65 = {80.4905f,3,ch65st}; - -/* char: 0x42 */ - -static const GLUTStrokeVertex ch66st0[] = -{ - {11.4200f,100.0000f}, - {11.4200f,0.0000f} -}; - -static const GLUTStrokeVertex ch66st1[] = -{ - {11.4200f,100.0000f}, - {54.2771f,100.0000f}, - {68.5629f,95.2381f}, - {73.3248f,90.4762f}, - {78.0867f,80.9524f}, - {78.0867f,71.4286f}, - {73.3248f,61.9048f}, - {68.5629f,57.1429f}, - {54.2771f,52.3810f} -}; - -static const GLUTStrokeVertex ch66st2[] = -{ - {11.4200f,52.3810f}, - {54.2771f,52.3810f}, - {68.5629f,47.6190f}, - {73.3248f,42.8571f}, - {78.0867f,33.3333f}, - {78.0867f,19.0476f}, - {73.3248f,9.5238f}, - {68.5629f,4.7619f}, - {54.2771f,0.0000f}, - {11.4200f,0.0000f} -}; - -static const GLUTStrokeStrip ch66st[] = -{ - {2,ch66st0}, - {9,ch66st1}, - {10,ch66st2} -}; - -static const GLUTStrokeChar ch66 = {83.6267f,3,ch66st}; - -/* char: 0x43 */ - -static const GLUTStrokeVertex ch67st0[] = -{ - {78.0886f,76.1905f}, - {73.3267f,85.7143f}, - {63.8029f,95.2381f}, - {54.2790f,100.0000f}, - {35.2314f,100.0000f}, - {25.7076f,95.2381f}, - {16.1838f,85.7143f}, - {11.4219f,76.1905f}, - {6.6600f,61.9048f}, - {6.6600f,38.0952f}, - {11.4219f,23.8095f}, - {16.1838f,14.2857f}, - {25.7076f,4.7619f}, - {35.2314f,0.0000f}, - {54.2790f,0.0000f}, - {63.8029f,4.7619f}, - {73.3267f,14.2857f}, - {78.0886f,23.8095f} -}; - -static const GLUTStrokeStrip ch67st[] = -{ - {18,ch67st0} -}; - -static const GLUTStrokeChar ch67 = {84.4886f,1,ch67st}; - -/* char: 0x44 */ - -static const GLUTStrokeVertex ch68st0[] = -{ - {11.9600f,100.0000f}, - {11.9600f,0.0000f} -}; - -static const GLUTStrokeVertex ch68st1[] = -{ - {11.9600f,100.0000f}, - {45.2933f,100.0000f}, - {59.5790f,95.2381f}, - {69.1029f,85.7143f}, - {73.8648f,76.1905f}, - {78.6267f,61.9048f}, - {78.6267f,38.0952f}, - {73.8648f,23.8095f}, - {69.1029f,14.2857f}, - {59.5790f,4.7619f}, - {45.2933f,0.0000f}, - {11.9600f,0.0000f} -}; - -static const GLUTStrokeStrip ch68st[] = -{ - {2,ch68st0}, - {12,ch68st1} -}; - -static const GLUTStrokeChar ch68 = {85.2867f,2,ch68st}; - -/* char: 0x45 */ - -static const GLUTStrokeVertex ch69st0[] = -{ - {11.4200f,100.0000f}, - {11.4200f,0.0000f} -}; - -static const GLUTStrokeVertex ch69st1[] = -{ - {11.4200f,100.0000f}, - {73.3248f,100.0000f} -}; - -static const GLUTStrokeVertex ch69st2[] = -{ - {11.4200f,52.3810f}, - {49.5152f,52.3810f} -}; - -static const GLUTStrokeVertex ch69st3[] = -{ - {11.4200f,0.0000f}, - {73.3248f,0.0000f} -}; - -static const GLUTStrokeStrip ch69st[] = -{ - {2,ch69st0}, - {2,ch69st1}, - {2,ch69st2}, - {2,ch69st3} -}; - -static const GLUTStrokeChar ch69 = {78.1848f,4,ch69st}; - -/* char: 0x46 */ - -static const GLUTStrokeVertex ch70st0[] = -{ - {11.4200f,100.0000f}, - {11.4200f,0.0000f} -}; - -static const GLUTStrokeVertex ch70st1[] = -{ - {11.4200f,100.0000f}, - {73.3248f,100.0000f} -}; - -static const GLUTStrokeVertex ch70st2[] = -{ - {11.4200f,52.3810f}, - {49.5152f,52.3810f} -}; - -static const GLUTStrokeStrip ch70st[] = -{ - {2,ch70st0}, - {2,ch70st1}, - {2,ch70st2} -}; - -static const GLUTStrokeChar ch70 = {78.7448f,3,ch70st}; - -/* char: 0x47 */ - -static const GLUTStrokeVertex ch71st0[] = -{ - {78.4886f,76.1905f}, - {73.7267f,85.7143f}, - {64.2029f,95.2381f}, - {54.6790f,100.0000f}, - {35.6314f,100.0000f}, - {26.1076f,95.2381f}, - {16.5838f,85.7143f}, - {11.8219f,76.1905f}, - {7.0600f,61.9048f}, - {7.0600f,38.0952f}, - {11.8219f,23.8095f}, - {16.5838f,14.2857f}, - {26.1076f,4.7619f}, - {35.6314f,0.0000f}, - {54.6790f,0.0000f}, - {64.2029f,4.7619f}, - {73.7267f,14.2857f}, - {78.4886f,23.8095f}, - {78.4886f,38.0952f} -}; - -static const GLUTStrokeVertex ch71st1[] = -{ - {54.6790f,38.0952f}, - {78.4886f,38.0952f} -}; - -static const GLUTStrokeStrip ch71st[] = -{ - {19,ch71st0}, - {2,ch71st1} -}; - -static const GLUTStrokeChar ch71 = {89.7686f,2,ch71st}; - -/* char: 0x48 */ - -static const GLUTStrokeVertex ch72st0[] = -{ - {11.4200f,100.0000f}, - {11.4200f,0.0000f} -}; - -static const GLUTStrokeVertex ch72st1[] = -{ - {78.0867f,100.0000f}, - {78.0867f,0.0000f} -}; - -static const GLUTStrokeVertex ch72st2[] = -{ - {11.4200f,52.3810f}, - {78.0867f,52.3810f} -}; - -static const GLUTStrokeStrip ch72st[] = -{ - {2,ch72st0}, - {2,ch72st1}, - {2,ch72st2} -}; - -static const GLUTStrokeChar ch72 = {89.0867f,3,ch72st}; - -/* char: 0x49 */ - -static const GLUTStrokeVertex ch73st0[] = -{ - {10.8600f,100.0000f}, - {10.8600f,0.0000f} -}; - -static const GLUTStrokeStrip ch73st[] = -{ - {2,ch73st0} -}; - -static const GLUTStrokeChar ch73 = {21.3000f,1,ch73st}; - -/* char: 0x4a */ - -static const GLUTStrokeVertex ch74st0[] = -{ - {50.1190f,100.0000f}, - {50.1190f,23.8095f}, - {45.3571f,9.5238f}, - {40.5952f,4.7619f}, - {31.0714f,0.0000f}, - {21.5476f,0.0000f}, - {12.0238f,4.7619f}, - {7.2619f,9.5238f}, - {2.5000f,23.8095f}, - {2.5000f,33.3333f} -}; - -static const GLUTStrokeStrip ch74st[] = -{ - {10,ch74st0} -}; - -static const GLUTStrokeChar ch74 = {59.9990f,1,ch74st}; - -/* char: 0x4b */ - -static const GLUTStrokeVertex ch75st0[] = -{ - {11.2800f,100.0000f}, - {11.2800f,0.0000f} -}; - -static const GLUTStrokeVertex ch75st1[] = -{ - {77.9467f,100.0000f}, - {11.2800f,33.3333f} -}; - -static const GLUTStrokeVertex ch75st2[] = -{ - {35.0895f,57.1429f}, - {77.9467f,0.0000f} -}; - -static const GLUTStrokeStrip ch75st[] = -{ - {2,ch75st0}, - {2,ch75st1}, - {2,ch75st2} -}; - -static const GLUTStrokeChar ch75 = {79.3267f,3,ch75st}; - -/* char: 0x4c */ - -static const GLUTStrokeVertex ch76st0[] = -{ - {11.6800f,100.0000f}, - {11.6800f,0.0000f} -}; - -static const GLUTStrokeVertex ch76st1[] = -{ - {11.6800f,0.0000f}, - {68.8229f,0.0000f} -}; - -static const GLUTStrokeStrip ch76st[] = -{ - {2,ch76st0}, - {2,ch76st1} -}; - -static const GLUTStrokeChar ch76 = {71.3229f,2,ch76st}; - -/* char: 0x4d */ - -static const GLUTStrokeVertex ch77st0[] = -{ - {10.8600f,100.0000f}, - {10.8600f,0.0000f} -}; - -static const GLUTStrokeVertex ch77st1[] = -{ - {10.8600f,100.0000f}, - {48.9552f,0.0000f} -}; - -static const GLUTStrokeVertex ch77st2[] = -{ - {87.0505f,100.0000f}, - {48.9552f,0.0000f} -}; - -static const GLUTStrokeVertex ch77st3[] = -{ - {87.0505f,100.0000f}, - {87.0505f,0.0000f} -}; - -static const GLUTStrokeStrip ch77st[] = -{ - {2,ch77st0}, - {2,ch77st1}, - {2,ch77st2}, - {2,ch77st3} -}; - -static const GLUTStrokeChar ch77 = {97.2105f,4,ch77st}; - -/* char: 0x4e */ - -static const GLUTStrokeVertex ch78st0[] = -{ - {11.1400f,100.0000f}, - {11.1400f,0.0000f} -}; - -static const GLUTStrokeVertex ch78st1[] = -{ - {11.1400f,100.0000f}, - {77.8067f,0.0000f} -}; - -static const GLUTStrokeVertex ch78st2[] = -{ - {77.8067f,100.0000f}, - {77.8067f,0.0000f} -}; - -static const GLUTStrokeStrip ch78st[] = -{ - {2,ch78st0}, - {2,ch78st1}, - {2,ch78st2} -}; - -static const GLUTStrokeChar ch78 = {88.8067f,3,ch78st}; - -/* char: 0x4f */ - -static const GLUTStrokeVertex ch79st0[] = -{ - {34.8114f,100.0000f}, - {25.2876f,95.2381f}, - {15.7638f,85.7143f}, - {11.0019f,76.1905f}, - {6.2400f,61.9048f}, - {6.2400f,38.0952f}, - {11.0019f,23.8095f}, - {15.7638f,14.2857f}, - {25.2876f,4.7619f}, - {34.8114f,0.0000f}, - {53.8590f,0.0000f}, - {63.3829f,4.7619f}, - {72.9067f,14.2857f}, - {77.6686f,23.8095f}, - {82.4305f,38.0952f}, - {82.4305f,61.9048f}, - {77.6686f,76.1905f}, - {72.9067f,85.7143f}, - {63.3829f,95.2381f}, - {53.8590f,100.0000f}, - {34.8114f,100.0000f} -}; - -static const GLUTStrokeStrip ch79st[] = -{ - {21,ch79st0} -}; - -static const GLUTStrokeChar ch79 = {88.8305f,1,ch79st}; - -/* char: 0x50 */ - -static const GLUTStrokeVertex ch80st0[] = -{ - {12.1000f,100.0000f}, - {12.1000f,0.0000f} -}; - -static const GLUTStrokeVertex ch80st1[] = -{ - {12.1000f,100.0000f}, - {54.9571f,100.0000f}, - {69.2429f,95.2381f}, - {74.0048f,90.4762f}, - {78.7667f,80.9524f}, - {78.7667f,66.6667f}, - {74.0048f,57.1429f}, - {69.2429f,52.3810f}, - {54.9571f,47.6190f}, - {12.1000f,47.6190f} -}; - -static const GLUTStrokeStrip ch80st[] = -{ - {2,ch80st0}, - {10,ch80st1} -}; - -static const GLUTStrokeChar ch80 = {85.6667f,2,ch80st}; - -/* char: 0x51 */ - -static const GLUTStrokeVertex ch81st0[] = -{ - {33.8714f,100.0000f}, - {24.3476f,95.2381f}, - {14.8238f,85.7143f}, - {10.0619f,76.1905f}, - {5.3000f,61.9048f}, - {5.3000f,38.0952f}, - {10.0619f,23.8095f}, - {14.8238f,14.2857f}, - {24.3476f,4.7619f}, - {33.8714f,0.0000f}, - {52.9190f,0.0000f}, - {62.4429f,4.7619f}, - {71.9667f,14.2857f}, - {76.7286f,23.8095f}, - {81.4905f,38.0952f}, - {81.4905f,61.9048f}, - {76.7286f,76.1905f}, - {71.9667f,85.7143f}, - {62.4429f,95.2381f}, - {52.9190f,100.0000f}, - {33.8714f,100.0000f} -}; - -static const GLUTStrokeVertex ch81st1[] = -{ - {48.1571f,19.0476f}, - {76.7286f,-9.5238f} -}; - -static const GLUTStrokeStrip ch81st[] = -{ - {21,ch81st0}, - {2,ch81st1} -}; - -static const GLUTStrokeChar ch81 = {88.0905f,2,ch81st}; - -/* char: 0x52 */ - -static const GLUTStrokeVertex ch82st0[] = -{ - {11.6800f,100.0000f}, - {11.6800f,0.0000f} -}; - -static const GLUTStrokeVertex ch82st1[] = -{ - {11.6800f,100.0000f}, - {54.5371f,100.0000f}, - {68.8229f,95.2381f}, - {73.5848f,90.4762f}, - {78.3467f,80.9524f}, - {78.3467f,71.4286f}, - {73.5848f,61.9048f}, - {68.8229f,57.1429f}, - {54.5371f,52.3810f}, - {11.6800f,52.3810f} -}; - -static const GLUTStrokeVertex ch82st2[] = -{ - {45.0133f,52.3810f}, - {78.3467f,0.0000f} -}; - -static const GLUTStrokeStrip ch82st[] = -{ - {2,ch82st0}, - {10,ch82st1}, - {2,ch82st2} -}; - -static const GLUTStrokeChar ch82 = {82.3667f,3,ch82st}; - -/* char: 0x53 */ - -static const GLUTStrokeVertex ch83st0[] = -{ - {74.6667f,85.7143f}, - {65.1429f,95.2381f}, - {50.8571f,100.0000f}, - {31.8095f,100.0000f}, - {17.5238f,95.2381f}, - {8.0000f,85.7143f}, - {8.0000f,76.1905f}, - {12.7619f,66.6667f}, - {17.5238f,61.9048f}, - {27.0476f,57.1429f}, - {55.6190f,47.6190f}, - {65.1429f,42.8571f}, - {69.9048f,38.0952f}, - {74.6667f,28.5714f}, - {74.6667f,14.2857f}, - {65.1429f,4.7619f}, - {50.8571f,0.0000f}, - {31.8095f,0.0000f}, - {17.5238f,4.7619f}, - {8.0000f,14.2857f} -}; - -static const GLUTStrokeStrip ch83st[] = -{ - {20,ch83st0} -}; - -static const GLUTStrokeChar ch83 = {80.8267f,1,ch83st}; - -/* char: 0x54 */ - -static const GLUTStrokeVertex ch84st0[] = -{ - {35.6933f,100.0000f}, - {35.6933f,0.0000f} -}; - -static const GLUTStrokeVertex ch84st1[] = -{ - {2.3600f,100.0000f}, - {69.0267f,100.0000f} -}; - -static const GLUTStrokeStrip ch84st[] = -{ - {2,ch84st0}, - {2,ch84st1} -}; - -static const GLUTStrokeChar ch84 = {71.9467f,2,ch84st}; - -/* char: 0x55 */ - -static const GLUTStrokeVertex ch85st0[] = -{ - {11.5400f,100.0000f}, - {11.5400f,28.5714f}, - {16.3019f,14.2857f}, - {25.8257f,4.7619f}, - {40.1114f,0.0000f}, - {49.6352f,0.0000f}, - {63.9210f,4.7619f}, - {73.4448f,14.2857f}, - {78.2067f,28.5714f}, - {78.2067f,100.0000f} -}; - -static const GLUTStrokeStrip ch85st[] = -{ - {10,ch85st0} -}; - -static const GLUTStrokeChar ch85 = {89.4867f,1,ch85st}; - -/* char: 0x56 */ - -static const GLUTStrokeVertex ch86st0[] = -{ - {2.3600f,100.0000f}, - {40.4552f,0.0000f} -}; - -static const GLUTStrokeVertex ch86st1[] = -{ - {78.5505f,100.0000f}, - {40.4552f,0.0000f} -}; - -static const GLUTStrokeStrip ch86st[] = -{ - {2,ch86st0}, - {2,ch86st1} -}; - -static const GLUTStrokeChar ch86 = {81.6105f,2,ch86st}; - -/* char: 0x57 */ - -static const GLUTStrokeVertex ch87st0[] = -{ - {2.2200f,100.0000f}, - {26.0295f,0.0000f} -}; - -static const GLUTStrokeVertex ch87st1[] = -{ - {49.8390f,100.0000f}, - {26.0295f,0.0000f} -}; - -static const GLUTStrokeVertex ch87st2[] = -{ - {49.8390f,100.0000f}, - {73.6486f,0.0000f} -}; - -static const GLUTStrokeVertex ch87st3[] = -{ - {97.4581f,100.0000f}, - {73.6486f,0.0000f} -}; - -static const GLUTStrokeStrip ch87st[] = -{ - {2,ch87st0}, - {2,ch87st1}, - {2,ch87st2}, - {2,ch87st3} -}; - -static const GLUTStrokeChar ch87 = {100.5181f,4,ch87st}; - -/* char: 0x58 */ - -static const GLUTStrokeVertex ch88st0[] = -{ - {2.5000f,100.0000f}, - {69.1667f,0.0000f} -}; - -static const GLUTStrokeVertex ch88st1[] = -{ - {69.1667f,100.0000f}, - {2.5000f,0.0000f} -}; - -static const GLUTStrokeStrip ch88st[] = -{ - {2,ch88st0}, - {2,ch88st1} -}; - -static const GLUTStrokeChar ch88 = {72.3667f,2,ch88st}; - -/* char: 0x59 */ - -static const GLUTStrokeVertex ch89st0[] = -{ - {1.5200f,100.0000f}, - {39.6152f,52.3810f}, - {39.6152f,0.0000f} -}; - -static const GLUTStrokeVertex ch89st1[] = -{ - {77.7105f,100.0000f}, - {39.6152f,52.3810f} -}; - -static const GLUTStrokeStrip ch89st[] = -{ - {3,ch89st0}, - {2,ch89st1} -}; - -static const GLUTStrokeChar ch89 = {79.6505f,2,ch89st}; - -/* char: 0x5a */ - -static const GLUTStrokeVertex ch90st0[] = -{ - {69.1667f,100.0000f}, - {2.5000f,0.0000f} -}; - -static const GLUTStrokeVertex ch90st1[] = -{ - {2.5000f,100.0000f}, - {69.1667f,100.0000f} -}; - -static const GLUTStrokeVertex ch90st2[] = -{ - {2.5000f,0.0000f}, - {69.1667f,0.0000f} -}; - -static const GLUTStrokeStrip ch90st[] = -{ - {2,ch90st0}, - {2,ch90st1}, - {2,ch90st2} -}; - -static const GLUTStrokeChar ch90 = {73.7467f,3,ch90st}; - -/* char: 0x5b */ - -static const GLUTStrokeVertex ch91st0[] = -{ - {7.7800f,119.0476f}, - {7.7800f,-33.3333f} -}; - -static const GLUTStrokeVertex ch91st1[] = -{ - {12.5419f,119.0476f}, - {12.5419f,-33.3333f} -}; - -static const GLUTStrokeVertex ch91st2[] = -{ - {7.7800f,119.0476f}, - {41.1133f,119.0476f} -}; - -static const GLUTStrokeVertex ch91st3[] = -{ - {7.7800f,-33.3333f}, - {41.1133f,-33.3333f} -}; - -static const GLUTStrokeStrip ch91st[] = -{ - {2,ch91st0}, - {2,ch91st1}, - {2,ch91st2}, - {2,ch91st3} -}; - -static const GLUTStrokeChar ch91 = {46.1133f,4,ch91st}; - -/* char: 0x5c */ - -static const GLUTStrokeVertex ch92st0[] = -{ - {5.8400f,100.0000f}, - {72.5067f,-14.2857f} -}; - -static const GLUTStrokeStrip ch92st[] = -{ - {2,ch92st0} -}; - -static const GLUTStrokeChar ch92 = {78.2067f,1,ch92st}; - -/* char: 0x5d */ - -static const GLUTStrokeVertex ch93st0[] = -{ - {33.0114f,119.0476f}, - {33.0114f,-33.3333f} -}; - -static const GLUTStrokeVertex ch93st1[] = -{ - {37.7733f,119.0476f}, - {37.7733f,-33.3333f} -}; - -static const GLUTStrokeVertex ch93st2[] = -{ - {4.4400f,119.0476f}, - {37.7733f,119.0476f} -}; - -static const GLUTStrokeVertex ch93st3[] = -{ - {4.4400f,-33.3333f}, - {37.7733f,-33.3333f} -}; - -static const GLUTStrokeStrip ch93st[] = -{ - {2,ch93st0}, - {2,ch93st1}, - {2,ch93st2}, - {2,ch93st3} -}; - -static const GLUTStrokeChar ch93 = {46.3933f,4,ch93st}; - -/* char: 0x5e */ - -static const GLUTStrokeVertex ch94st0[] = -{ - {44.0752f,109.5238f}, - {5.9800f,42.8571f} -}; - -static const GLUTStrokeVertex ch94st1[] = -{ - {44.0752f,109.5238f}, - {82.1705f,42.8571f} -}; - -static const GLUTStrokeStrip ch94st[] = -{ - {2,ch94st0}, - {2,ch94st1} -}; - -static const GLUTStrokeChar ch94 = {90.2305f,2,ch94st}; - -/* char: 0x5f */ - -static const GLUTStrokeVertex ch95st0[] = -{ - {-1.1000f,-33.3333f}, - {103.6619f,-33.3333f}, - {103.6619f,-28.5714f}, - {-1.1000f,-28.5714f}, - {-1.1000f,-33.3333f} -}; - -static const GLUTStrokeStrip ch95st[] = -{ - {5,ch95st0} -}; - -static const GLUTStrokeChar ch95 = {104.0619f,1,ch95st}; - -/* char: 0x60 */ - -static const GLUTStrokeVertex ch96st0[] = -{ - {33.0219f,100.0000f}, - {56.8314f,71.4286f} -}; - -static const GLUTStrokeVertex ch96st1[] = -{ - {33.0219f,100.0000f}, - {28.2600f,95.2381f}, - {56.8314f,71.4286f} -}; - -static const GLUTStrokeStrip ch96st[] = -{ - {2,ch96st0}, - {3,ch96st1} -}; - -static const GLUTStrokeChar ch96 = {83.5714f,2,ch96st}; - -/* char: 0x61 */ - -static const GLUTStrokeVertex ch97st0[] = -{ - {63.8229f,66.6667f}, - {63.8229f,0.0000f} -}; - -static const GLUTStrokeVertex ch97st1[] = -{ - {63.8229f,52.3810f}, - {54.2990f,61.9048f}, - {44.7752f,66.6667f}, - {30.4895f,66.6667f}, - {20.9657f,61.9048f}, - {11.4419f,52.3810f}, - {6.6800f,38.0952f}, - {6.6800f,28.5714f}, - {11.4419f,14.2857f}, - {20.9657f,4.7619f}, - {30.4895f,0.0000f}, - {44.7752f,0.0000f}, - {54.2990f,4.7619f}, - {63.8229f,14.2857f} -}; - -static const GLUTStrokeStrip ch97st[] = -{ - {2,ch97st0}, - {14,ch97st1} -}; - -static const GLUTStrokeChar ch97 = {66.6029f,2,ch97st}; - -/* char: 0x62 */ - -static const GLUTStrokeVertex ch98st0[] = -{ - {8.7600f,100.0000f}, - {8.7600f,0.0000f} -}; - -static const GLUTStrokeVertex ch98st1[] = -{ - {8.7600f,52.3810f}, - {18.2838f,61.9048f}, - {27.8076f,66.6667f}, - {42.0933f,66.6667f}, - {51.6171f,61.9048f}, - {61.1410f,52.3810f}, - {65.9029f,38.0952f}, - {65.9029f,28.5714f}, - {61.1410f,14.2857f}, - {51.6171f,4.7619f}, - {42.0933f,0.0000f}, - {27.8076f,0.0000f}, - {18.2838f,4.7619f}, - {8.7600f,14.2857f} -}; - -static const GLUTStrokeStrip ch98st[] = -{ - {2,ch98st0}, - {14,ch98st1} -}; - -static const GLUTStrokeChar ch98 = {70.4629f,2,ch98st}; - -/* char: 0x63 */ - -static const GLUTStrokeVertex ch99st0[] = -{ - {62.6629f,52.3810f}, - {53.1390f,61.9048f}, - {43.6152f,66.6667f}, - {29.3295f,66.6667f}, - {19.8057f,61.9048f}, - {10.2819f,52.3810f}, - {5.5200f,38.0952f}, - {5.5200f,28.5714f}, - {10.2819f,14.2857f}, - {19.8057f,4.7619f}, - {29.3295f,0.0000f}, - {43.6152f,0.0000f}, - {53.1390f,4.7619f}, - {62.6629f,14.2857f} -}; - -static const GLUTStrokeStrip ch99st[] = -{ - {14,ch99st0} -}; - -static const GLUTStrokeChar ch99 = {68.9229f,1,ch99st}; - -/* char: 0x64 */ - -static const GLUTStrokeVertex ch100st0[] = -{ - {61.7829f,100.0000f}, - {61.7829f,0.0000f} -}; - -static const GLUTStrokeVertex ch100st1[] = -{ - {61.7829f,52.3810f}, - {52.2590f,61.9048f}, - {42.7352f,66.6667f}, - {28.4495f,66.6667f}, - {18.9257f,61.9048f}, - {9.4019f,52.3810f}, - {4.6400f,38.0952f}, - {4.6400f,28.5714f}, - {9.4019f,14.2857f}, - {18.9257f,4.7619f}, - {28.4495f,0.0000f}, - {42.7352f,0.0000f}, - {52.2590f,4.7619f}, - {61.7829f,14.2857f} -}; - -static const GLUTStrokeStrip ch100st[] = -{ - {2,ch100st0}, - {14,ch100st1} -}; - -static const GLUTStrokeChar ch100 = {70.2629f,2,ch100st}; - -/* char: 0x65 */ - -static const GLUTStrokeVertex ch101st0[] = -{ - {5.7200f,38.0952f}, - {62.8629f,38.0952f}, - {62.8629f,47.6190f}, - {58.1010f,57.1429f}, - {53.3390f,61.9048f}, - {43.8152f,66.6667f}, - {29.5295f,66.6667f}, - {20.0057f,61.9048f}, - {10.4819f,52.3810f}, - {5.7200f,38.0952f}, - {5.7200f,28.5714f}, - {10.4819f,14.2857f}, - {20.0057f,4.7619f}, - {29.5295f,0.0000f}, - {43.8152f,0.0000f}, - {53.3390f,4.7619f}, - {62.8629f,14.2857f} -}; - -static const GLUTStrokeStrip ch101st[] = -{ - {17,ch101st0} -}; - -static const GLUTStrokeChar ch101 = {68.5229f,1,ch101st}; - -/* char: 0x66 */ - -static const GLUTStrokeVertex ch102st0[] = -{ - {38.7752f,100.0000f}, - {29.2514f,100.0000f}, - {19.7276f,95.2381f}, - {14.9657f,80.9524f}, - {14.9657f,0.0000f} -}; - -static const GLUTStrokeVertex ch102st1[] = -{ - {0.6800f,66.6667f}, - {34.0133f,66.6667f} -}; - -static const GLUTStrokeStrip ch102st[] = -{ - {5,ch102st0}, - {2,ch102st1} -}; - -static const GLUTStrokeChar ch102 = {38.6552f,2,ch102st}; - -/* char: 0x67 */ - -static const GLUTStrokeVertex ch103st0[] = -{ - {62.5029f,66.6667f}, - {62.5029f,-9.5238f}, - {57.7410f,-23.8095f}, - {52.9790f,-28.5714f}, - {43.4552f,-33.3333f}, - {29.1695f,-33.3333f}, - {19.6457f,-28.5714f} -}; - -static const GLUTStrokeVertex ch103st1[] = -{ - {62.5029f,52.3810f}, - {52.9790f,61.9048f}, - {43.4552f,66.6667f}, - {29.1695f,66.6667f}, - {19.6457f,61.9048f}, - {10.1219f,52.3810f}, - {5.3600f,38.0952f}, - {5.3600f,28.5714f}, - {10.1219f,14.2857f}, - {19.6457f,4.7619f}, - {29.1695f,0.0000f}, - {43.4552f,0.0000f}, - {52.9790f,4.7619f}, - {62.5029f,14.2857f} -}; - -static const GLUTStrokeStrip ch103st[] = -{ - {7,ch103st0}, - {14,ch103st1} -}; - -static const GLUTStrokeChar ch103 = {70.9829f,2,ch103st}; - -/* char: 0x68 */ - -static const GLUTStrokeVertex ch104st0[] = -{ - {9.6000f,100.0000f}, - {9.6000f,0.0000f} -}; - -static const GLUTStrokeVertex ch104st1[] = -{ - {9.6000f,47.6190f}, - {23.8857f,61.9048f}, - {33.4095f,66.6667f}, - {47.6952f,66.6667f}, - {57.2190f,61.9048f}, - {61.9810f,47.6190f}, - {61.9810f,0.0000f} -}; - -static const GLUTStrokeStrip ch104st[] = -{ - {2,ch104st0}, - {7,ch104st1} -}; - -static const GLUTStrokeChar ch104 = {71.0210f,2,ch104st}; - -/* char: 0x69 */ - -static const GLUTStrokeVertex ch105st0[] = -{ - {10.0200f,100.0000f}, - {14.7819f,95.2381f}, - {19.5438f,100.0000f}, - {14.7819f,104.7619f}, - {10.0200f,100.0000f} -}; - -static const GLUTStrokeVertex ch105st1[] = -{ - {14.7819f,66.6667f}, - {14.7819f,0.0000f} -}; - -static const GLUTStrokeStrip ch105st[] = -{ - {5,ch105st0}, - {2,ch105st1} -}; - -static const GLUTStrokeChar ch105 = {28.8638f,2,ch105st}; - -/* char: 0x6a */ - -static const GLUTStrokeVertex ch106st0[] = -{ - {17.3876f,100.0000f}, - {22.1495f,95.2381f}, - {26.9114f,100.0000f}, - {22.1495f,104.7619f}, - {17.3876f,100.0000f} -}; - -static const GLUTStrokeVertex ch106st1[] = -{ - {22.1495f,66.6667f}, - {22.1495f,-14.2857f}, - {17.3876f,-28.5714f}, - {7.8638f,-33.3333f}, - {-1.6600f,-33.3333f} -}; - -static const GLUTStrokeStrip ch106st[] = -{ - {5,ch106st0}, - {5,ch106st1} -}; - -static const GLUTStrokeChar ch106 = {36.2314f,2,ch106st}; - -/* char: 0x6b */ - -static const GLUTStrokeVertex ch107st0[] = -{ - {9.6000f,100.0000f}, - {9.6000f,0.0000f} -}; - -static const GLUTStrokeVertex ch107st1[] = -{ - {57.2190f,66.6667f}, - {9.6000f,19.0476f} -}; - -static const GLUTStrokeVertex ch107st2[] = -{ - {28.6476f,38.0952f}, - {61.9810f,0.0000f} -}; - -static const GLUTStrokeStrip ch107st[] = -{ - {2,ch107st0}, - {2,ch107st1}, - {2,ch107st2} -}; - -static const GLUTStrokeChar ch107 = {62.5210f,3,ch107st}; - -/* char: 0x6c */ - -static const GLUTStrokeVertex ch108st0[] = -{ - {10.0200f,100.0000f}, - {10.0200f,0.0000f} -}; - -static const GLUTStrokeStrip ch108st[] = -{ - {2,ch108st0} -}; - -static const GLUTStrokeChar ch108 = {19.3400f,1,ch108st}; - -/* char: 0x6d */ - -static const GLUTStrokeVertex ch109st0[] = -{ - {9.6000f,66.6667f}, - {9.6000f,0.0000f} -}; - -static const GLUTStrokeVertex ch109st1[] = -{ - {9.6000f,47.6190f}, - {23.8857f,61.9048f}, - {33.4095f,66.6667f}, - {47.6952f,66.6667f}, - {57.2190f,61.9048f}, - {61.9810f,47.6190f}, - {61.9810f,0.0000f} -}; - -static const GLUTStrokeVertex ch109st2[] = -{ - {61.9810f,47.6190f}, - {76.2667f,61.9048f}, - {85.7905f,66.6667f}, - {100.0762f,66.6667f}, - {109.6000f,61.9048f}, - {114.3619f,47.6190f}, - {114.3619f,0.0000f} -}; - -static const GLUTStrokeStrip ch109st[] = -{ - {2,ch109st0}, - {7,ch109st1}, - {7,ch109st2} -}; - -static const GLUTStrokeChar ch109 = {123.9619f,3,ch109st}; - -/* char: 0x6e */ - -static const GLUTStrokeVertex ch110st0[] = -{ - {9.1800f,66.6667f}, - {9.1800f,0.0000f} -}; - -static const GLUTStrokeVertex ch110st1[] = -{ - {9.1800f,47.6190f}, - {23.4657f,61.9048f}, - {32.9895f,66.6667f}, - {47.2752f,66.6667f}, - {56.7990f,61.9048f}, - {61.5610f,47.6190f}, - {61.5610f,0.0000f} -}; - -static const GLUTStrokeStrip ch110st[] = -{ - {2,ch110st0}, - {7,ch110st1} -}; - -static const GLUTStrokeChar ch110 = {70.8810f,2,ch110st}; - -/* char: 0x6f */ - -static const GLUTStrokeVertex ch111st0[] = -{ - {28.7895f,66.6667f}, - {19.2657f,61.9048f}, - {9.7419f,52.3810f}, - {4.9800f,38.0952f}, - {4.9800f,28.5714f}, - {9.7419f,14.2857f}, - {19.2657f,4.7619f}, - {28.7895f,0.0000f}, - {43.0752f,0.0000f}, - {52.5990f,4.7619f}, - {62.1229f,14.2857f}, - {66.8848f,28.5714f}, - {66.8848f,38.0952f}, - {62.1229f,52.3810f}, - {52.5990f,61.9048f}, - {43.0752f,66.6667f}, - {28.7895f,66.6667f} -}; - -static const GLUTStrokeStrip ch111st[] = -{ - {17,ch111st0} -}; - -static const GLUTStrokeChar ch111 = {71.7448f,1,ch111st}; - -/* char: 0x70 */ - -static const GLUTStrokeVertex ch112st0[] = -{ - {9.4600f,66.6667f}, - {9.4600f,-33.3333f} -}; - -static const GLUTStrokeVertex ch112st1[] = -{ - {9.4600f,52.3810f}, - {18.9838f,61.9048f}, - {28.5076f,66.6667f}, - {42.7933f,66.6667f}, - {52.3171f,61.9048f}, - {61.8410f,52.3810f}, - {66.6029f,38.0952f}, - {66.6029f,28.5714f}, - {61.8410f,14.2857f}, - {52.3171f,4.7619f}, - {42.7933f,0.0000f}, - {28.5076f,0.0000f}, - {18.9838f,4.7619f}, - {9.4600f,14.2857f} -}; - -static const GLUTStrokeStrip ch112st[] = -{ - {2,ch112st0}, - {14,ch112st1} -}; - -static const GLUTStrokeChar ch112 = {70.8029f,2,ch112st}; - -/* char: 0x71 */ - -static const GLUTStrokeVertex ch113st0[] = -{ - {61.9829f,66.6667f}, - {61.9829f,-33.3333f} -}; - -static const GLUTStrokeVertex ch113st1[] = -{ - {61.9829f,52.3810f}, - {52.4590f,61.9048f}, - {42.9352f,66.6667f}, - {28.6495f,66.6667f}, - {19.1257f,61.9048f}, - {9.6019f,52.3810f}, - {4.8400f,38.0952f}, - {4.8400f,28.5714f}, - {9.6019f,14.2857f}, - {19.1257f,4.7619f}, - {28.6495f,0.0000f}, - {42.9352f,0.0000f}, - {52.4590f,4.7619f}, - {61.9829f,14.2857f} -}; - -static const GLUTStrokeStrip ch113st[] = -{ - {2,ch113st0}, - {14,ch113st1} -}; - -static const GLUTStrokeChar ch113 = {70.7429f,2,ch113st}; - -/* char: 0x72 */ - -static const GLUTStrokeVertex ch114st0[] = -{ - {9.4600f,66.6667f}, - {9.4600f,0.0000f} -}; - -static const GLUTStrokeVertex ch114st1[] = -{ - {9.4600f,38.0952f}, - {14.2219f,52.3810f}, - {23.7457f,61.9048f}, - {33.2695f,66.6667f}, - {47.5552f,66.6667f} -}; - -static const GLUTStrokeStrip ch114st[] = -{ - {2,ch114st0}, - {5,ch114st1} -}; - -static const GLUTStrokeChar ch114 = {49.4952f,2,ch114st}; - -/* char: 0x73 */ - -static const GLUTStrokeVertex ch115st0[] = -{ - {57.0810f,52.3810f}, - {52.3190f,61.9048f}, - {38.0333f,66.6667f}, - {23.7476f,66.6667f}, - {9.4619f,61.9048f}, - {4.7000f,52.3810f}, - {9.4619f,42.8571f}, - {18.9857f,38.0952f}, - {42.7952f,33.3333f}, - {52.3190f,28.5714f}, - {57.0810f,19.0476f}, - {57.0810f,14.2857f}, - {52.3190f,4.7619f}, - {38.0333f,0.0000f}, - {23.7476f,0.0000f}, - {9.4619f,4.7619f}, - {4.7000f,14.2857f} -}; - -static const GLUTStrokeStrip ch115st[] = -{ - {17,ch115st0} -}; - -static const GLUTStrokeChar ch115 = {62.3210f,1,ch115st}; - -/* char: 0x74 */ - -static const GLUTStrokeVertex ch116st0[] = -{ - {14.8257f,100.0000f}, - {14.8257f,19.0476f}, - {19.5876f,4.7619f}, - {29.1114f,0.0000f}, - {38.6352f,0.0000f} -}; - -static const GLUTStrokeVertex ch116st1[] = -{ - {0.5400f,66.6667f}, - {33.8733f,66.6667f} -}; - -static const GLUTStrokeStrip ch116st[] = -{ - {5,ch116st0}, - {2,ch116st1} -}; - -static const GLUTStrokeChar ch116 = {39.3152f,2,ch116st}; - -/* char: 0x75 */ - -static const GLUTStrokeVertex ch117st0[] = -{ - {9.4600f,66.6667f}, - {9.4600f,19.0476f}, - {14.2219f,4.7619f}, - {23.7457f,0.0000f}, - {38.0314f,0.0000f}, - {47.5552f,4.7619f}, - {61.8410f,19.0476f} -}; - -static const GLUTStrokeVertex ch117st1[] = -{ - {61.8410f,66.6667f}, - {61.8410f,0.0000f} -}; - -static const GLUTStrokeStrip ch117st[] = -{ - {7,ch117st0}, - {2,ch117st1} -}; - -static const GLUTStrokeChar ch117 = {71.1610f,2,ch117st}; - -/* char: 0x76 */ - -static const GLUTStrokeVertex ch118st0[] = -{ - {1.8000f,66.6667f}, - {30.3714f,0.0000f} -}; - -static const GLUTStrokeVertex ch118st1[] = -{ - {58.9429f,66.6667f}, - {30.3714f,0.0000f} -}; - -static const GLUTStrokeStrip ch118st[] = -{ - {2,ch118st0}, - {2,ch118st1} -}; - -static const GLUTStrokeChar ch118 = {60.6029f,2,ch118st}; - -/* char: 0x77 */ - -static const GLUTStrokeVertex ch119st0[] = -{ - {2.5000f,66.6667f}, - {21.5476f,0.0000f} -}; - -static const GLUTStrokeVertex ch119st1[] = -{ - {40.5952f,66.6667f}, - {21.5476f,0.0000f} -}; - -static const GLUTStrokeVertex ch119st2[] = -{ - {40.5952f,66.6667f}, - {59.6429f,0.0000f} -}; - -static const GLUTStrokeVertex ch119st3[] = -{ - {78.6905f,66.6667f}, - {59.6429f,0.0000f} -}; - -static const GLUTStrokeStrip ch119st[] = -{ - {2,ch119st0}, - {2,ch119st1}, - {2,ch119st2}, - {2,ch119st3} -}; - -static const GLUTStrokeChar ch119 = {80.4905f,4,ch119st}; - -/* char: 0x78 */ - -static const GLUTStrokeVertex ch120st0[] = -{ - {1.6600f,66.6667f}, - {54.0410f,0.0000f} -}; - -static const GLUTStrokeVertex ch120st1[] = -{ - {54.0410f,66.6667f}, - {1.6600f,0.0000f} -}; - -static const GLUTStrokeStrip ch120st[] = -{ - {2,ch120st0}, - {2,ch120st1} -}; - -static const GLUTStrokeChar ch120 = {56.4010f,2,ch120st}; - -/* char: 0x79 */ - -static const GLUTStrokeVertex ch121st0[] = -{ - {6.5619f,66.6667f}, - {35.1333f,0.0000f} -}; - -static const GLUTStrokeVertex ch121st1[] = -{ - {63.7048f,66.6667f}, - {35.1333f,0.0000f}, - {25.6095f,-19.0476f}, - {16.0857f,-28.5714f}, - {6.5619f,-33.3333f}, - {1.8000f,-33.3333f} -}; - -static const GLUTStrokeStrip ch121st[] = -{ - {2,ch121st0}, - {6,ch121st1} -}; - -static const GLUTStrokeChar ch121 = {66.0648f,2,ch121st}; - -/* char: 0x7a */ - -static const GLUTStrokeVertex ch122st0[] = -{ - {56.8210f,66.6667f}, - {4.4400f,0.0000f} -}; - -static const GLUTStrokeVertex ch122st1[] = -{ - {4.4400f,66.6667f}, - {56.8210f,66.6667f} -}; - -static const GLUTStrokeVertex ch122st2[] = -{ - {4.4400f,0.0000f}, - {56.8210f,0.0000f} -}; - -static const GLUTStrokeStrip ch122st[] = -{ - {2,ch122st0}, - {2,ch122st1}, - {2,ch122st2} -}; - -static const GLUTStrokeChar ch122 = {61.8210f,3,ch122st}; - -/* char: 0x7b */ - -static const GLUTStrokeVertex ch123st0[] = -{ - {31.1895f,119.0476f}, - {21.6657f,114.2857f}, - {16.9038f,109.5238f}, - {12.1419f,100.0000f}, - {12.1419f,90.4762f}, - {16.9038f,80.9524f}, - {21.6657f,76.1905f}, - {26.4276f,66.6667f}, - {26.4276f,57.1429f}, - {16.9038f,47.6190f} -}; - -static const GLUTStrokeVertex ch123st1[] = -{ - {21.6657f,114.2857f}, - {16.9038f,104.7619f}, - {16.9038f,95.2381f}, - {21.6657f,85.7143f}, - {26.4276f,80.9524f}, - {31.1895f,71.4286f}, - {31.1895f,61.9048f}, - {26.4276f,52.3810f}, - {7.3800f,42.8571f}, - {26.4276f,33.3333f}, - {31.1895f,23.8095f}, - {31.1895f,14.2857f}, - {26.4276f,4.7619f}, - {21.6657f,0.0000f}, - {16.9038f,-9.5238f}, - {16.9038f,-19.0476f}, - {21.6657f,-28.5714f} -}; - -static const GLUTStrokeVertex ch123st2[] = -{ - {16.9038f,38.0952f}, - {26.4276f,28.5714f}, - {26.4276f,19.0476f}, - {21.6657f,9.5238f}, - {16.9038f,4.7619f}, - {12.1419f,-4.7619f}, - {12.1419f,-14.2857f}, - {16.9038f,-23.8095f}, - {21.6657f,-28.5714f}, - {31.1895f,-33.3333f} -}; - -static const GLUTStrokeStrip ch123st[] = -{ - {10,ch123st0}, - {17,ch123st1}, - {10,ch123st2} -}; - -static const GLUTStrokeChar ch123 = {41.6295f,3,ch123st}; - -/* char: 0x7c */ - -static const GLUTStrokeVertex ch124st0[] = -{ - {11.5400f,119.0476f}, - {11.5400f,-33.3333f} -}; - -static const GLUTStrokeStrip ch124st[] = -{ - {2,ch124st0} -}; - -static const GLUTStrokeChar ch124 = {23.7800f,1,ch124st}; - -/* char: 0x7d */ - -static const GLUTStrokeVertex ch125st0[] = -{ - {9.1800f,119.0476f}, - {18.7038f,114.2857f}, - {23.4657f,109.5238f}, - {28.2276f,100.0000f}, - {28.2276f,90.4762f}, - {23.4657f,80.9524f}, - {18.7038f,76.1905f}, - {13.9419f,66.6667f}, - {13.9419f,57.1429f}, - {23.4657f,47.6190f} -}; - -static const GLUTStrokeVertex ch125st1[] = -{ - {18.7038f,114.2857f}, - {23.4657f,104.7619f}, - {23.4657f,95.2381f}, - {18.7038f,85.7143f}, - {13.9419f,80.9524f}, - {9.1800f,71.4286f}, - {9.1800f,61.9048f}, - {13.9419f,52.3810f}, - {32.9895f,42.8571f}, - {13.9419f,33.3333f}, - {9.1800f,23.8095f}, - {9.1800f,14.2857f}, - {13.9419f,4.7619f}, - {18.7038f,0.0000f}, - {23.4657f,-9.5238f}, - {23.4657f,-19.0476f}, - {18.7038f,-28.5714f} -}; - -static const GLUTStrokeVertex ch125st2[] = -{ - {23.4657f,38.0952f}, - {13.9419f,28.5714f}, - {13.9419f,19.0476f}, - {18.7038f,9.5238f}, - {23.4657f,4.7619f}, - {28.2276f,-4.7619f}, - {28.2276f,-14.2857f}, - {23.4657f,-23.8095f}, - {18.7038f,-28.5714f}, - {9.1800f,-33.3333f} -}; - -static const GLUTStrokeStrip ch125st[] = -{ - {10,ch125st0}, - {17,ch125st1}, - {10,ch125st2} -}; - -static const GLUTStrokeChar ch125 = {41.4695f,3,ch125st}; - -/* char: 0x7e */ - -static const GLUTStrokeVertex ch126st0[] = -{ - {2.9200f,28.5714f}, - {2.9200f,38.0952f}, - {7.6819f,52.3810f}, - {17.2057f,57.1429f}, - {26.7295f,57.1429f}, - {36.2533f,52.3810f}, - {55.3010f,38.0952f}, - {64.8248f,33.3333f}, - {74.3486f,33.3333f}, - {83.8724f,38.0952f}, - {88.6343f,47.6190f} -}; - -static const GLUTStrokeVertex ch126st1[] = -{ - {2.9200f,38.0952f}, - {7.6819f,47.6190f}, - {17.2057f,52.3810f}, - {26.7295f,52.3810f}, - {36.2533f,47.6190f}, - {55.3010f,33.3333f}, - {64.8248f,28.5714f}, - {74.3486f,28.5714f}, - {83.8724f,33.3333f}, - {88.6343f,47.6190f}, - {88.6343f,57.1429f} -}; - -static const GLUTStrokeStrip ch126st[] = -{ - {11,ch126st0}, - {11,ch126st1} -}; - -static const GLUTStrokeChar ch126 = {91.2743f,2,ch126st}; - -static const GLUTStrokeChar *chars[] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - &ch32, &ch33, &ch34, &ch35, &ch36, &ch37, &ch38, &ch39, - &ch40, &ch41, &ch42, &ch43, &ch44, &ch45, &ch46, &ch47, - &ch48, &ch49, &ch50, &ch51, &ch52, &ch53, &ch54, &ch55, - &ch56, &ch57, &ch58, &ch59, &ch60, &ch61, &ch62, &ch63, - &ch64, &ch65, &ch66, &ch67, &ch68, &ch69, &ch70, &ch71, - &ch72, &ch73, &ch74, &ch75, &ch76, &ch77, &ch78, &ch79, - &ch80, &ch81, &ch82, &ch83, &ch84, &ch85, &ch86, &ch87, - &ch88, &ch89, &ch90, &ch91, &ch92, &ch93, &ch94, &ch95, - &ch96, &ch97, &ch98, &ch99, &ch100, &ch101, &ch102, &ch103, - &ch104, &ch105, &ch106, &ch107, &ch108, &ch109, &ch110, &ch111, - &ch112, &ch113, &ch114, &ch115, &ch116, &ch117, &ch118, &ch119, - &ch120, &ch121, &ch122, &ch123, &ch124, &ch125, &ch126 -}; - -const GLUTStrokeFont glutStrokeRoman = {"Roman",128,chars,152.3809f,33.3333f}; diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/shapes.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/shapes.c deleted file mode 100644 index 4edebe90ed..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/shapes.c +++ /dev/null @@ -1,1143 +0,0 @@ -/* - * freeglut_geometry.c - * - * Freeglut geometry rendering methods. - * - * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. - * Written by Pawel W. Olszta, - * Creation date: Fri Dec 3 1999 - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include -#include "internal.h" - -/* - * TODO BEFORE THE STABLE RELEASE: - * - * Following functions have been contributed by Andreas Umbach. - * - * glutWireCube() -- looks OK - * glutSolidCube() -- OK - * - * Those functions have been implemented by John Fay. - * - * glutWireTorus() -- looks OK - * glutSolidTorus() -- looks OK - * glutWireDodecahedron() -- looks OK - * glutSolidDodecahedron() -- looks OK - * glutWireOctahedron() -- looks OK - * glutSolidOctahedron() -- looks OK - * glutWireTetrahedron() -- looks OK - * glutSolidTetrahedron() -- looks OK - * glutWireIcosahedron() -- looks OK - * glutSolidIcosahedron() -- looks OK - * - * The Following functions have been updated by Nigel Stewart, based - * on FreeGLUT 2.0.0 implementations: - * - * glutWireSphere() -- looks OK - * glutSolidSphere() -- looks OK - * glutWireCone() -- looks OK - * glutSolidCone() -- looks OK - */ - - -/* -- INTERFACE FUNCTIONS -------------------------------------------------- */ - -/* - * Draws a wireframed cube. Code contributed by Andreas Umbach - */ -void GLUTAPIENTRY glutWireCube( GLdouble dSize ) -{ - double size = dSize * 0.5; - -# define V(a,b,c) glVertex3d( a size, b size, c size ); -# define N(a,b,c) glNormal3d( a, b, c ); - - /* - * PWO: I dared to convert the code to use macros... - */ - glBegin( GL_LINE_LOOP ); N( 1.0, 0.0, 0.0); V(+,-,+); V(+,-,-); V(+,+,-); V(+,+,+); glEnd(); - glBegin( GL_LINE_LOOP ); N( 0.0, 1.0, 0.0); V(+,+,+); V(+,+,-); V(-,+,-); V(-,+,+); glEnd(); - glBegin( GL_LINE_LOOP ); N( 0.0, 0.0, 1.0); V(+,+,+); V(-,+,+); V(-,-,+); V(+,-,+); glEnd(); - glBegin( GL_LINE_LOOP ); N(-1.0, 0.0, 0.0); V(-,-,+); V(-,+,+); V(-,+,-); V(-,-,-); glEnd(); - glBegin( GL_LINE_LOOP ); N( 0.0,-1.0, 0.0); V(-,-,+); V(-,-,-); V(+,-,-); V(+,-,+); glEnd(); - glBegin( GL_LINE_LOOP ); N( 0.0, 0.0,-1.0); V(-,-,-); V(-,+,-); V(+,+,-); V(+,-,-); glEnd(); - -# undef V -# undef N -} - -/* - * Draws a solid cube. Code contributed by Andreas Umbach - */ -void GLUTAPIENTRY glutSolidCube( GLdouble dSize ) -{ - double size = dSize * 0.5; - -# define V(a,b,c) glVertex3d( a size, b size, c size ); -# define N(a,b,c) glNormal3d( a, b, c ); - - /* - * PWO: Again, I dared to convert the code to use macros... - */ - glBegin( GL_QUADS ); - N( 1.0, 0.0, 0.0); V(+,-,+); V(+,-,-); V(+,+,-); V(+,+,+); - N( 0.0, 1.0, 0.0); V(+,+,+); V(+,+,-); V(-,+,-); V(-,+,+); - N( 0.0, 0.0, 1.0); V(+,+,+); V(-,+,+); V(-,-,+); V(+,-,+); - N(-1.0, 0.0, 0.0); V(-,-,+); V(-,+,+); V(-,+,-); V(-,-,-); - N( 0.0,-1.0, 0.0); V(-,-,+); V(-,-,-); V(+,-,-); V(+,-,+); - N( 0.0, 0.0,-1.0); V(-,-,-); V(-,+,-); V(+,+,-); V(+,-,-); - glEnd(); - -# undef V -# undef N -} - -/* - * Compute lookup table of cos and sin values forming a cirle - * - * Notes: - * It is the responsibility of the caller to free these tables - * The size of the table is (n+1) to form a connected loop - * The last entry is exactly the same as the first - * The sign of n can be flipped to get the reverse loop - */ - -static void circleTable(double **sint,double **cost,const int n) -{ - int i; - - /* Table size, the sign of n flips the circle direction */ - - const int size = abs(n); - - /* Determine the angle between samples */ - - const double angle = 2*M_PI/(double)n; - - /* Allocate memory for n samples, plus duplicate of first entry at the end */ - - *sint = (double *) calloc(sizeof(double), size+1); - *cost = (double *) calloc(sizeof(double), size+1); - - /* Bail out if memory allocation fails, fgError never returns */ - - if (!(*sint) || !(*cost)) - { - free(*sint); - free(*cost); - _glut_fatal("Failed to allocate memory in circleTable"); - } - - /* Compute cos and sin around the circle */ - - for (i=0; i=0; j--) - { - glNormal3d(cost1[j]*r1, sint1[j]*r1, z1 ); - glVertex3d(cost1[j]*r1*radius, sint1[j]*r1*radius, z1*radius); - } - - glEnd(); - - /* Cover each stack with a quad strip, except the top and bottom stacks */ - - for( i=1; i=0; j--) - glVertex3d(cost[j]*radius, sint[j]*radius, height); - glEnd(); - - /* Do the stacks */ - - z0 = 0.0; - z1 = zStep; - - for (i=1; i<=stacks; i++) - { - if (i==stacks) - z1 = height; - - glBegin(GL_QUAD_STRIP); - for (j=0; j<=slices; j++ ) - { - glNormal3d(cost[j], sint[j], 0.0 ); - glVertex3d(cost[j]*radius, sint[j]*radius, z0 ); - glVertex3d(cost[j]*radius, sint[j]*radius, z1 ); - } - glEnd(); - - z0 = z1; z1 += zStep; - } - - /* Release sin and cos tables */ - - free(sint); - free(cost); -} - -/* - * Draws a wire cylinder - */ -void GLUTAPIENTRY glutWireCylinder(GLdouble radius, GLdouble height, GLint slices, GLint stacks) -{ - int i,j; - - /* Step in z and radius as stacks are drawn. */ - - double z = 0.0; - const double zStep = height/stacks; - - /* Pre-computed circle */ - - double *sint,*cost; - circleTable(&sint,&cost,-slices); - - /* Draw the stacks... */ - - for (i=0; i<=stacks; i++) - { - if (i==stacks) - z = height; - - glBegin(GL_LINE_LOOP); - - for( j=0; j - -#include "internal.h" - - -#define FREQUENCY 100 /* set this to zero to use the default timer */ - - -static int timer_installed; -#if FREQUENCY -static volatile int ticks; - - -static void -ticks_timer (void *p) -{ - (void)p; - ticks++; -} ENDOFUNC(ticks_timer) -#else -#include - -static struct timeval then; -#endif - - -int APIENTRY -glutGet (GLenum type) -{ - switch (type) { - case GLUT_WINDOW_X: - return _glut_current->xpos; - case GLUT_WINDOW_Y: - return _glut_current->ypos; - case GLUT_WINDOW_WIDTH: - return _glut_current->width; - case GLUT_WINDOW_HEIGHT: - return _glut_current->height; - case GLUT_WINDOW_STENCIL_SIZE: - return _glut_visual.stencil; - case GLUT_WINDOW_DEPTH_SIZE: - return _glut_visual.depth; - case GLUT_WINDOW_RGBA: - return !(_glut_default.mode & GLUT_INDEX); - case GLUT_WINDOW_COLORMAP_SIZE: - return (_glut_default.mode & GLUT_INDEX) ? (256 - RESERVED_COLORS) : 0; - case GLUT_SCREEN_WIDTH: - return _glut_visual.geometry[0]; - case GLUT_SCREEN_HEIGHT: - return _glut_visual.geometry[1]; - case GLUT_INIT_WINDOW_X: - return _glut_default.x; - case GLUT_INIT_WINDOW_Y: - return _glut_default.y; - case GLUT_INIT_WINDOW_WIDTH: - return _glut_default.width; - case GLUT_INIT_WINDOW_HEIGHT: - return _glut_default.height; - case GLUT_INIT_DISPLAY_MODE: - return _glut_default.mode; - case GLUT_ELAPSED_TIME: -#if FREQUENCY - if (!timer_installed) { - timer_installed = GL_TRUE; - LOCKDATA(ticks); - LOCKFUNC(ticks_timer); - pc_install_int(ticks_timer, NULL, FREQUENCY); - } - return ticks * 1000 / FREQUENCY; -#else - if (!timer_installed) { - timer_installed = GL_TRUE; - gettimeofday(&then, NULL); - return 0; - } else { - struct timeval now; - gettimeofday(&now, NULL); - return (now.tv_usec - then.tv_usec) / 1000 + - (now.tv_sec - then.tv_sec) * 1000; - } -#endif - default: - return -1; - } -} - - -int APIENTRY -glutDeviceGet (GLenum type) -{ - switch (type) { - case GLUT_HAS_KEYBOARD: - return GL_TRUE; - case GLUT_HAS_MOUSE: - return (_glut_mouse != 0); - case GLUT_NUM_MOUSE_BUTTONS: - return _glut_mouse; - case GLUT_HAS_SPACEBALL: - case GLUT_HAS_DIAL_AND_BUTTON_BOX: - case GLUT_HAS_TABLET: - return GL_FALSE; - case GLUT_NUM_SPACEBALL_BUTTONS: - case GLUT_NUM_BUTTON_BOX_BUTTONS: - case GLUT_NUM_DIALS: - case GLUT_NUM_TABLET_BUTTONS: - return 0; - default: - return -1; - } -} - - -int APIENTRY -glutGetModifiers (void) -{ - int mod = 0; - int shifts = pc_keyshifts(); - - if (shifts & (KB_SHIFT_FLAG | KB_CAPSLOCK_FLAG)) { - mod |= GLUT_ACTIVE_SHIFT; - } - - if (shifts & KB_ALT_FLAG) { - mod |= GLUT_ACTIVE_ALT; - } - - if (shifts & KB_CTRL_FLAG) { - mod |= GLUT_ACTIVE_CTRL; - } - - return mod; -} - - -void APIENTRY -glutReportErrors (void) -{ - /* reports all the OpenGL errors that happened till now */ -} - - -/* GAME MODE - * Hack alert: incomplete... what is GameMode, anyway? - */ -static GLint game; -static GLboolean game_possible; -static GLboolean game_active; -static GLuint game_width; -static GLuint game_height; -static GLuint game_bpp; -static GLuint game_refresh; - - -void APIENTRY -glutGameModeString (const char *string) -{ - if (sscanf(string, "%ux%u:%u@%u", &game_width, &game_height, &game_bpp, &game_refresh) == 4) { - game_possible = GL_TRUE; - } -} - - -int APIENTRY -glutGameModeGet (GLenum mode) -{ - switch (mode) { - case GLUT_GAME_MODE_ACTIVE: - return game_active; - case GLUT_GAME_MODE_POSSIBLE: - return game_possible && !_glut_current; - case GLUT_GAME_MODE_WIDTH: - return game_active ? (int)game_width : -1; - case GLUT_GAME_MODE_HEIGHT: - return game_active ? (int)game_height : -1; - case GLUT_GAME_MODE_PIXEL_DEPTH: - return game_active ? (int)game_bpp : -1; - case GLUT_GAME_MODE_REFRESH_RATE: - return game_active ? (int)game_refresh : -1; - default: - return -1; - } -} - - -int APIENTRY -glutEnterGameMode (void) -{ - if (glutGameModeGet(GLUT_GAME_MODE_POSSIBLE)) { - _glut_visual.bpp = game_bpp; - _glut_visual.refresh = game_refresh; - - glutInitWindowSize(game_width, game_height); - - if ((game = glutCreateWindow("")) > 0) { - game_active = GL_TRUE; - } - - return game; - } else { - return 0; - } -} - - -void GLUTAPIENTRY -glutLeaveGameMode (void) -{ - if (glutGameModeGet(GLUT_GAME_MODE_ACTIVE)) { - game_active = GL_FALSE; - - glutDestroyWindow(game); - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/stroke.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/stroke.c deleted file mode 100644 index aa2c06a7db..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/stroke.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * FxGLUT version 0.12 - GLUT for Voodoo 1 and 2 under Linux - * Copyright (C) 1999 Christopher John Purnell - * cjp@lost.org.uk - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "internal.h" - - -void -glutStrokeCharacter (void *font, int c) -{ - const GLUTStrokeFont *sfp = _glut_font(font); - const GLUTStrokeChar *scp; - const GLUTStrokeStrip *ssp; - const GLUTStrokeVertex *svp; - unsigned i, j; - - if (((unsigned)c) >= sfp->num || !(scp = sfp->table[c])) - return; - - ssp = scp->strip; - - for (i = 0; i < scp->num; i++, ssp++) { - svp = ssp->vertex; - - glBegin(GL_LINE_STRIP); - for (j = 0; j < ssp->num; j++, svp++) { - glVertex2f(svp->x, svp->y); - } - glEnd(); - } - - glTranslatef(scp->right, 0.0, 0.0); -} - - -void -glutStrokeString (void *font, const unsigned char *string) -{ - const GLUTStrokeFont *sfp = _glut_font(font); - const GLUTStrokeChar *scp; - const GLUTStrokeStrip *ssp; - const GLUTStrokeVertex *svp; - unsigned char c; - unsigned i, j; - - while ((c = *(string++))) { - if (c < sfp->num && (scp = sfp->table[c])) { - ssp = scp->strip; - - for (i = 0; i < scp->num; i++, ssp++) { - svp = ssp->vertex; - - glBegin(GL_LINE_STRIP); - for (j = 0; j < ssp->num; j++, svp++) { - glVertex2f(svp->x, svp->y); - } - glEnd(); - } - - glTranslatef(scp->right, 0.0, 0.0); - } - } -} - - -int -glutStrokeWidth (void *font, int c) -{ - const GLUTStrokeFont *sfp = _glut_font(font); - const GLUTStrokeChar *scp; - - if (((unsigned)c) >= sfp->num || !(scp = sfp->table[c])) - return 0; - - return scp->right; -} - - -int -glutStrokeLength (void *font, const unsigned char *string) -{ - const GLUTStrokeFont *sfp = _glut_font(font); - const GLUTStrokeChar *scp; - unsigned char c; - int length = 0; - - while ((c = *(string++))) { - if (c < sfp->num && (scp = sfp->table[c])) - length += scp->right; - } - - return length; -} - - -GLfloat -glutStrokeHeight (void *font) -{ - const GLUTStrokeFont *sfp = _glut_font(font); - - return sfp->height; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/teapot.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/teapot.c deleted file mode 100644 index 8d02eb49f3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/teapot.c +++ /dev/null @@ -1,201 +0,0 @@ -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * - * ALL RIGHTS RESERVED - * - * Permission to use, copy, modify, and distribute this software - * for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that - * both the copyright notice and this permission notice appear in - * supporting documentation, and that the name of Silicon - * Graphics, Inc. not be used in advertising or publicity - * pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU - * "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR - * OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF - * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO - * EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE - * ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER, - * INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE, - * SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR - * NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY - * OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - * US Government Users Restricted Rights - * - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer - * Software clause at DFARS 252.227-7013 and/or in similar or - * successor clauses in the FAR or the DOD or NASA FAR - * Supplement. Unpublished-- rights reserved under the copyright - * laws of the United States. Contractor/manufacturer is Silicon - * Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA - * 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ - -#include "internal.h" - -/* - * Rim, body, lid, and bottom data must be reflected in x and y; - * handle and spout data across the y axis only. - */ -static int patchdata[][16] = -{ - { 102, 103, 104, 105, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15 }, /* rim */ - { 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27 }, /* body */ - { 24, 25, 26, 27, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40 }, - { 96, 96, 96, 96, 97, 98, 99, 100, - 101, 101, 101, 101, 0, 1, 2, 3 }, /* lid */ - { 0, 1, 2, 3, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117 }, - { 118, 118, 118, 118, 124, 122, 119, 121, - 123, 126, 125, 120, 40, 39, 38, 37 }, /* bottom */ - { 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56 }, /* handle */ - { 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 28, 65, 66, 67 }, - { 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83 }, /* spout */ - { 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95 } -}; - -static float cpdata[][3] = -{ - {0.2, 0, 2.7}, {0.2, -0.112, 2.7}, {0.112, -0.2, 2.7}, - {0,-0.2, 2.7}, {1.3375, 0, 2.53125}, {1.3375, -0.749, 2.53125}, - {0.749, -1.3375, 2.53125}, {0, -1.3375, 2.53125}, - {1.4375, 0, 2.53125}, {1.4375, -0.805, 2.53125}, - {0.805, -1.4375, 2.53125}, {0, -1.4375, 2.53125}, - {1.5, 0, 2.4}, {1.5, -0.84, 2.4}, {0.84, -1.5, 2.4}, - {0, -1.5, 2.4}, {1.75, 0, 1.875}, {1.75, -0.98, 1.875}, - {0.98, -1.75, 1.875}, {0, -1.75, 1.875}, {2, 0, 1.35}, - {2, -1.12, 1.35}, {1.12, -2, 1.35}, {0, -2, 1.35}, {2, 0, 0.9}, - {2, -1.12, 0.9}, {1.12, -2, 0.9}, {0, -2, 0.9}, {-2, 0, 0.9}, - {2, 0, 0.45}, {2, -1.12, 0.45}, {1.12, -2, 0.45}, {0, -2, 0.45}, - {1.5, 0, 0.225}, {1.5, -0.84, 0.225}, {0.84, -1.5, 0.225}, - {0, -1.5, 0.225}, {1.5, 0, 0.15}, {1.5, -0.84, 0.15}, - {0.84, -1.5, 0.15}, {0, -1.5, 0.15}, {-1.6, 0, 2.025}, - {-1.6, -0.3, 2.025}, {-1.5, -0.3, 2.25}, {-1.5, 0, 2.25}, - {-2.3, 0, 2.025}, {-2.3, -0.3, 2.025}, {-2.5, -0.3, 2.25}, - {-2.5, 0, 2.25}, {-2.7, 0, 2.025}, {-2.7, -0.3, 2.025}, - {-3, -0.3, 2.25}, {-3, 0, 2.25}, {-2.7, 0, 1.8}, - {-2.7, -0.3, 1.8}, {-3, -0.3, 1.8}, {-3, 0, 1.8}, - {-2.7, 0, 1.575}, {-2.7, -0.3, 1.575}, {-3, -0.3, 1.35}, - {-3, 0, 1.35}, {-2.5, 0, 1.125}, {-2.5, -0.3, 1.125}, - {-2.65, -0.3, 0.9375}, {-2.65, 0, 0.9375}, {-2, -0.3, 0.9}, - {-1.9, -0.3, 0.6}, {-1.9, 0, 0.6}, {1.7, 0, 1.425}, - {1.7, -0.66, 1.425}, {1.7, -0.66, 0.6}, {1.7, 0, 0.6}, - {2.6, 0, 1.425}, {2.6, -0.66, 1.425}, {3.1, -0.66, 0.825}, - {3.1, 0, 0.825}, {2.3, 0, 2.1}, {2.3, -0.25, 2.1}, - {2.4, -0.25, 2.025}, {2.4, 0, 2.025}, {2.7, 0, 2.4}, - {2.7, -0.25, 2.4}, {3.3, -0.25, 2.4}, {3.3, 0, 2.4}, - {2.8, 0, 2.475}, {2.8, -0.25, 2.475}, {3.525, -0.25, 2.49375}, - {3.525, 0, 2.49375}, {2.9, 0, 2.475}, {2.9, -0.15, 2.475}, - {3.45, -0.15, 2.5125}, {3.45, 0, 2.5125}, {2.8, 0, 2.4}, - {2.8, -0.15, 2.4}, {3.2, -0.15, 2.4}, {3.2, 0, 2.4}, - {0, 0, 3.15}, {0.8, 0, 3.15}, {0.8, -0.45, 3.15}, - {0.45, -0.8, 3.15}, {0, -0.8, 3.15}, {0, 0, 2.85}, {1.4, 0, 2.4}, - {1.4, -0.784, 2.4}, {0.784, -1.4, 2.4}, {0, -1.4, 2.4}, - {0.4, 0, 2.55}, {0.4, -0.224, 2.55}, {0.224, -0.4, 2.55}, - {0, -0.4, 2.55}, {1.3, 0, 2.55}, {1.3, -0.728, 2.55}, - {0.728, -1.3, 2.55}, {0, -1.3, 2.55}, {1.3, 0, 2.4}, - {1.3, -0.728, 2.4}, {0.728, -1.3, 2.4}, {0, -1.3, 2.4}, - {0, 0, 0}, {1.425, -0.798, 0}, {1.5, 0, 0.075}, {1.425, 0, 0}, - {0.798, -1.425, 0}, {0, -1.5, 0.075}, {0, -1.425, 0}, - {1.5, -0.84, 0.075}, {0.84, -1.5, 0.075} -}; - -static float tex[2][2][2] = -{ - { {0, 0}, {1, 0} }, - { {0, 1}, {1, 1} } -}; - -static void teapot( GLint grid, GLdouble scale, GLenum type ) -{ - float p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3]; - long i, j, k, l; - - glPushAttrib( GL_ENABLE_BIT | GL_EVAL_BIT ); - glEnable( GL_AUTO_NORMAL ); - glEnable( GL_NORMALIZE ); - glEnable( GL_MAP2_VERTEX_3 ); - glEnable( GL_MAP2_TEXTURE_COORD_2 ); - - glPushMatrix(); - glRotatef(270.0, 1.0, 0.0, 0.0); - glScalef(0.5 * scale, 0.5 * scale, 0.5 * scale); - glTranslatef(0.0, 0.0, -1.5); - - for (i = 0; i < 10; i++) - { - for (j = 0; j < 4; j++) - { - for (k = 0; k < 4; k++) - { - for (l = 0; l < 3; l++) - { - p[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; - q[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l]; - if (l == 1) - q[j][k][l] *= -1.0; - if (i < 6) - { - r[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l]; - if (l == 0) - r[j][k][l] *= -1.0; - s[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; - if (l == 0) - s[j][k][l] *= -1.0; - if (l == 1) - s[j][k][l] *= -1.0; - } - } - } - } - - glMap2f(GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2, - &tex[0][0][0]); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &p[0][0][0]); - glMapGrid2f(grid, 0.0, 1.0, grid, 0.0, 1.0); - glEvalMesh2(type, 0, grid, 0, grid); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &q[0][0][0]); - glEvalMesh2(type, 0, grid, 0, grid); - if (i < 6) - { - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &r[0][0][0]); - glEvalMesh2(type, 0, grid, 0, grid); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &s[0][0][0]); - glEvalMesh2(type, 0, grid, 0, grid); - } - } - - glPopMatrix(); - glPopAttrib(); -} - -void glutWireTeapot(GLdouble size) -{ - teapot(10, size, GL_LINE); -} - -void glutSolidTeapot(GLdouble size) -{ - teapot(7, size, GL_FILL); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/tr10.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/tr10.c deleted file mode 100644 index a1e03f3e1b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/tr10.c +++ /dev/null @@ -1,1018 +0,0 @@ -/* autogenerated by bdf2c! do not edit */ - -/* "Copyright (c) 1984, 1987 Adobe Systems Incorporated. All Rights Reserved. Copyright (c) 1988, 1991 Digital Equipment Corporation. All Rights Reserved." */ - - -#include "internal.h" -/* -typedef struct { - int width, height; - int xorig, yorig; - int xmove; - const unsigned char *bitmap; -} GLUTBitmapChar; - -typedef struct { - const char *name; - int height; - int num; - const GLUTBitmapChar *const *table; -} GLUTBitmapFont; -*/ - - -static const unsigned char ch32data[] = { - 0x0 -}; -static const GLUTBitmapChar ch32 = { 1, 1, 0, 0, 2, ch32data }; - -static const unsigned char ch33data[] = { - 0x80,0x0,0x80,0x80,0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch33 = { 1, 7, -1, 0, 3, ch33data }; - -static const unsigned char ch34data[] = { - 0xa0,0xa0 -}; -static const GLUTBitmapChar ch34 = { 3, 2, 0, -5, 4, ch34data }; - -static const unsigned char ch35data[] = { - 0x50,0x50,0xf8,0x50,0xf8,0x50,0x50 -}; -static const GLUTBitmapChar ch35 = { 5, 7, 0, 0, 5, ch35data }; - -static const unsigned char ch36data[] = { - 0x20,0xe0,0x90,0x10,0x60,0x80,0x90,0x70,0x20 -}; -static const GLUTBitmapChar ch36 = { 4, 9, 0, 1, 5, ch36data }; - -static const unsigned char ch37data[] = { - 0x44,0x2a,0x2a,0x56,0xa8,0xa4,0x7e -}; -static const GLUTBitmapChar ch37 = { 7, 7, 0, 0, 8, ch37data }; - -static const unsigned char ch38data[] = { - 0x76,0x8d,0x98,0x74,0x6e,0x50,0x30 -}; -static const GLUTBitmapChar ch38 = { 8, 7, 0, 0, 8, ch38data }; - -static const unsigned char ch39data[] = { - 0x40,0xc0 -}; -static const GLUTBitmapChar ch39 = { 2, 2, 0, -5, 3, ch39data }; - -static const unsigned char ch40data[] = { - 0x20,0x40,0x40,0x80,0x80,0x80,0x40,0x40,0x20 -}; -static const GLUTBitmapChar ch40 = { 3, 9, 0, 2, 4, ch40data }; - -static const unsigned char ch41data[] = { - 0x80,0x40,0x40,0x20,0x20,0x20,0x40,0x40,0x80 -}; -static const GLUTBitmapChar ch41 = { 3, 9, 0, 2, 4, ch41data }; - -static const unsigned char ch42data[] = { - 0xa0,0x40,0xa0 -}; -static const GLUTBitmapChar ch42 = { 3, 3, 0, -4, 5, ch42data }; - -static const unsigned char ch43data[] = { - 0x20,0x20,0xf8,0x20,0x20 -}; -static const GLUTBitmapChar ch43 = { 5, 5, 0, 0, 6, ch43data }; - -static const unsigned char ch44data[] = { - 0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch44 = { 1, 3, -1, 2, 3, ch44data }; - -static const unsigned char ch45data[] = { - 0xf0 -}; -static const GLUTBitmapChar ch45 = { 4, 1, -1, -2, 7, ch45data }; - -static const unsigned char ch46data[] = { - 0x80 -}; -static const GLUTBitmapChar ch46 = { 1, 1, -1, 0, 3, ch46data }; - -static const unsigned char ch47data[] = { - 0x80,0x80,0x40,0x40,0x40,0x20,0x20 -}; -static const GLUTBitmapChar ch47 = { 3, 7, 0, 0, 3, ch47data }; - -static const unsigned char ch48data[] = { - 0x60,0x90,0x90,0x90,0x90,0x90,0x60 -}; -static const GLUTBitmapChar ch48 = { 4, 7, 0, 0, 5, ch48data }; - -static const unsigned char ch49data[] = { - 0xe0,0x40,0x40,0x40,0x40,0xc0,0x40 -}; -static const GLUTBitmapChar ch49 = { 3, 7, -1, 0, 5, ch49data }; - -static const unsigned char ch50data[] = { - 0xf0,0x40,0x20,0x20,0x10,0x90,0x60 -}; -static const GLUTBitmapChar ch50 = { 4, 7, 0, 0, 5, ch50data }; - -static const unsigned char ch51data[] = { - 0xe0,0x10,0x10,0x60,0x10,0x90,0x60 -}; -static const GLUTBitmapChar ch51 = { 4, 7, 0, 0, 5, ch51data }; - -static const unsigned char ch52data[] = { - 0x10,0x10,0xf8,0x90,0x50,0x30,0x10 -}; -static const GLUTBitmapChar ch52 = { 5, 7, 0, 0, 5, ch52data }; - -static const unsigned char ch53data[] = { - 0xe0,0x90,0x10,0x10,0xe0,0x40,0x70 -}; -static const GLUTBitmapChar ch53 = { 4, 7, 0, 0, 5, ch53data }; - -static const unsigned char ch54data[] = { - 0x60,0x90,0x90,0x90,0xe0,0x40,0x30 -}; -static const GLUTBitmapChar ch54 = { 4, 7, 0, 0, 5, ch54data }; - -static const unsigned char ch55data[] = { - 0x40,0x40,0x40,0x20,0x20,0x90,0xf0 -}; -static const GLUTBitmapChar ch55 = { 4, 7, 0, 0, 5, ch55data }; - -static const unsigned char ch56data[] = { - 0x60,0x90,0x90,0x60,0x90,0x90,0x60 -}; -static const GLUTBitmapChar ch56 = { 4, 7, 0, 0, 5, ch56data }; - -static const unsigned char ch57data[] = { - 0xc0,0x20,0x70,0x90,0x90,0x90,0x60 -}; -static const GLUTBitmapChar ch57 = { 4, 7, 0, 0, 5, ch57data }; - -static const unsigned char ch58data[] = { - 0x80,0x0,0x0,0x0,0x80 -}; -static const GLUTBitmapChar ch58 = { 1, 5, -1, 0, 3, ch58data }; - -static const unsigned char ch59data[] = { - 0x80,0x80,0x80,0x0,0x0,0x0,0x80 -}; -static const GLUTBitmapChar ch59 = { 1, 7, -1, 2, 3, ch59data }; - -static const unsigned char ch60data[] = { - 0x20,0x40,0x80,0x40,0x20 -}; -static const GLUTBitmapChar ch60 = { 3, 5, -1, 0, 5, ch60data }; - -static const unsigned char ch61data[] = { - 0xf8,0x0,0xf8 -}; -static const GLUTBitmapChar ch61 = { 5, 3, 0, -1, 6, ch61data }; - -static const unsigned char ch62data[] = { - 0x80,0x40,0x20,0x40,0x80 -}; -static const GLUTBitmapChar ch62 = { 3, 5, 0, 0, 5, ch62data }; - -static const unsigned char ch63data[] = { - 0x40,0x0,0x40,0x40,0x20,0xa0,0xe0 -}; -static const GLUTBitmapChar ch63 = { 3, 7, 0, 0, 4, ch63data }; - -static const unsigned char ch64data[] = { - 0x3e,0x40,0x92,0xad,0xa5,0xa5,0x9d,0x42,0x3c -}; -static const GLUTBitmapChar ch64 = { 8, 9, 0, 2, 9, ch64data }; - -static const unsigned char ch65data[] = { - 0xee,0x44,0x7c,0x28,0x28,0x38,0x10 -}; -static const GLUTBitmapChar ch65 = { 7, 7, 0, 0, 8, ch65data }; - -static const unsigned char ch66data[] = { - 0xf0,0x48,0x48,0x70,0x48,0x48,0xf0 -}; -static const GLUTBitmapChar ch66 = { 5, 7, 0, 0, 6, ch66data }; - -static const unsigned char ch67data[] = { - 0x78,0xc4,0x80,0x80,0x80,0xc4,0x7c -}; -static const GLUTBitmapChar ch67 = { 6, 7, 0, 0, 7, ch67data }; - -static const unsigned char ch68data[] = { - 0xf8,0x4c,0x44,0x44,0x44,0x4c,0xf8 -}; -static const GLUTBitmapChar ch68 = { 6, 7, 0, 0, 7, ch68data }; - -static const unsigned char ch69data[] = { - 0xf8,0x48,0x40,0x70,0x40,0x48,0xf8 -}; -static const GLUTBitmapChar ch69 = { 5, 7, 0, 0, 6, ch69data }; - -static const unsigned char ch70data[] = { - 0xe0,0x40,0x40,0x70,0x40,0x48,0xf8 -}; -static const GLUTBitmapChar ch70 = { 5, 7, 0, 0, 6, ch70data }; - -static const unsigned char ch71data[] = { - 0x78,0xc4,0x84,0x9c,0x80,0xc4,0x7c -}; -static const GLUTBitmapChar ch71 = { 6, 7, 0, 0, 7, ch71data }; - -static const unsigned char ch72data[] = { - 0xee,0x44,0x44,0x7c,0x44,0x44,0xee -}; -static const GLUTBitmapChar ch72 = { 7, 7, 0, 0, 8, ch72data }; - -static const unsigned char ch73data[] = { - 0xe0,0x40,0x40,0x40,0x40,0x40,0xe0 -}; -static const GLUTBitmapChar ch73 = { 3, 7, 0, 0, 4, ch73data }; - -static const unsigned char ch74data[] = { - 0xc0,0xa0,0x20,0x20,0x20,0x20,0x70 -}; -static const GLUTBitmapChar ch74 = { 4, 7, 0, 0, 4, ch74data }; - -static const unsigned char ch75data[] = { - 0xec,0x48,0x50,0x60,0x50,0x48,0xec -}; -static const GLUTBitmapChar ch75 = { 6, 7, 0, 0, 7, ch75data }; - -static const unsigned char ch76data[] = { - 0xf8,0x48,0x40,0x40,0x40,0x40,0xe0 -}; -static const GLUTBitmapChar ch76 = { 5, 7, 0, 0, 6, ch76data }; - -static const unsigned char ch77data[] = { - 0xeb,0x80,0x49,0x0,0x55,0x0,0x55,0x0,0x63,0x0,0x63,0x0,0xe3,0x80 -}; -static const GLUTBitmapChar ch77 = { 9, 7, 0, 0, 10, ch77data }; - -static const unsigned char ch78data[] = { - 0xe4,0x4c,0x4c,0x54,0x54,0x64,0xee -}; -static const GLUTBitmapChar ch78 = { 7, 7, 0, 0, 8, ch78data }; - -static const unsigned char ch79data[] = { - 0x78,0xcc,0x84,0x84,0x84,0xcc,0x78 -}; -static const GLUTBitmapChar ch79 = { 6, 7, 0, 0, 7, ch79data }; - -static const unsigned char ch80data[] = { - 0xe0,0x40,0x40,0x70,0x48,0x48,0xf0 -}; -static const GLUTBitmapChar ch80 = { 5, 7, 0, 0, 6, ch80data }; - -static const unsigned char ch81data[] = { - 0xc,0x18,0x70,0xcc,0x84,0x84,0x84,0xcc,0x78 -}; -static const GLUTBitmapChar ch81 = { 6, 9, 0, 2, 7, ch81data }; - -static const unsigned char ch82data[] = { - 0xec,0x48,0x50,0x70,0x48,0x48,0xf0 -}; -static const GLUTBitmapChar ch82 = { 6, 7, 0, 0, 7, ch82data }; - -static const unsigned char ch83data[] = { - 0xe0,0x90,0x10,0x60,0xc0,0x90,0x70 -}; -static const GLUTBitmapChar ch83 = { 4, 7, 0, 0, 5, ch83data }; - -static const unsigned char ch84data[] = { - 0x70,0x20,0x20,0x20,0x20,0xa8,0xf8 -}; -static const GLUTBitmapChar ch84 = { 5, 7, 0, 0, 6, ch84data }; - -static const unsigned char ch85data[] = { - 0x38,0x6c,0x44,0x44,0x44,0x44,0xee -}; -static const GLUTBitmapChar ch85 = { 7, 7, 0, 0, 8, ch85data }; - -static const unsigned char ch86data[] = { - 0x10,0x10,0x28,0x28,0x6c,0x44,0xee -}; -static const GLUTBitmapChar ch86 = { 7, 7, 0, 0, 8, ch86data }; - -static const unsigned char ch87data[] = { - 0x22,0x0,0x22,0x0,0x55,0x0,0x55,0x0,0xc9,0x80,0x88,0x80,0xdd,0xc0 -}; -static const GLUTBitmapChar ch87 = { 10, 7, 0, 0, 10, ch87data }; - -static const unsigned char ch88data[] = { - 0xee,0x44,0x28,0x10,0x28,0x44,0xee -}; -static const GLUTBitmapChar ch88 = { 7, 7, 0, 0, 8, ch88data }; - -static const unsigned char ch89data[] = { - 0x38,0x10,0x10,0x28,0x28,0x44,0xee -}; -static const GLUTBitmapChar ch89 = { 7, 7, 0, 0, 8, ch89data }; - -static const unsigned char ch90data[] = { - 0xf8,0x88,0x40,0x20,0x10,0x88,0xf8 -}; -static const GLUTBitmapChar ch90 = { 5, 7, 0, 0, 6, ch90data }; - -static const unsigned char ch91data[] = { - 0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0 -}; -static const GLUTBitmapChar ch91 = { 2, 9, 0, 2, 3, ch91data }; - -static const unsigned char ch92data[] = { - 0x20,0x20,0x40,0x40,0x40,0x80,0x80 -}; -static const GLUTBitmapChar ch92 = { 3, 7, 0, 0, 3, ch92data }; - -static const unsigned char ch93data[] = { - 0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0 -}; -static const GLUTBitmapChar ch93 = { 2, 9, 0, 2, 3, ch93data }; - -static const unsigned char ch94data[] = { - 0xa0,0xa0,0x40 -}; -static const GLUTBitmapChar ch94 = { 3, 3, -1, -4, 5, ch94data }; - -static const unsigned char ch95data[] = { - 0xf8 -}; -static const GLUTBitmapChar ch95 = { 5, 1, 0, 3, 5, ch95data }; - -static const unsigned char ch96data[] = { - 0xc0,0x80 -}; -static const GLUTBitmapChar ch96 = { 2, 2, 0, -5, 3, ch96data }; - -static const unsigned char ch97data[] = { - 0xe0,0xa0,0x60,0x20,0xc0 -}; -static const GLUTBitmapChar ch97 = { 3, 5, 0, 0, 4, ch97data }; - -static const unsigned char ch98data[] = { - 0xe0,0x90,0x90,0x90,0xe0,0x80,0x80 -}; -static const GLUTBitmapChar ch98 = { 4, 7, 0, 0, 5, ch98data }; - -static const unsigned char ch99data[] = { - 0x60,0x80,0x80,0x80,0x60 -}; -static const GLUTBitmapChar ch99 = { 3, 5, 0, 0, 4, ch99data }; - -static const unsigned char ch100data[] = { - 0x68,0x90,0x90,0x90,0x70,0x10,0x30 -}; -static const GLUTBitmapChar ch100 = { 5, 7, 0, 0, 5, ch100data }; - -static const unsigned char ch101data[] = { - 0x60,0x80,0xc0,0xa0,0x60 -}; -static const GLUTBitmapChar ch101 = { 3, 5, 0, 0, 4, ch101data }; - -static const unsigned char ch102data[] = { - 0xe0,0x40,0x40,0x40,0xe0,0x40,0x30 -}; -static const GLUTBitmapChar ch102 = { 4, 7, 0, 0, 4, ch102data }; - -static const unsigned char ch103data[] = { - 0xe0,0x90,0x60,0x40,0xa0,0xa0,0x70 -}; -static const GLUTBitmapChar ch103 = { 4, 7, 0, 2, 5, ch103data }; - -static const unsigned char ch104data[] = { - 0xd8,0x90,0x90,0x90,0xe0,0x80,0x80 -}; -static const GLUTBitmapChar ch104 = { 5, 7, 0, 0, 5, ch104data }; - -static const unsigned char ch105data[] = { - 0x40,0x40,0x40,0x40,0xc0,0x0,0x40 -}; -static const GLUTBitmapChar ch105 = { 2, 7, 0, 0, 3, ch105data }; - -static const unsigned char ch106data[] = { - 0x80,0x40,0x40,0x40,0x40,0x40,0xc0,0x0,0x40 -}; -static const GLUTBitmapChar ch106 = { 2, 9, 0, 2, 3, ch106data }; - -static const unsigned char ch107data[] = { - 0x98,0x90,0xe0,0xa0,0x90,0x80,0x80 -}; -static const GLUTBitmapChar ch107 = { 5, 7, 0, 0, 5, ch107data }; - -static const unsigned char ch108data[] = { - 0xe0,0x40,0x40,0x40,0x40,0x40,0xc0 -}; -static const GLUTBitmapChar ch108 = { 3, 7, 0, 0, 4, ch108data }; - -static const unsigned char ch109data[] = { - 0xdb,0x92,0x92,0x92,0xec -}; -static const GLUTBitmapChar ch109 = { 8, 5, 0, 0, 8, ch109data }; - -static const unsigned char ch110data[] = { - 0xd8,0x90,0x90,0x90,0xe0 -}; -static const GLUTBitmapChar ch110 = { 5, 5, 0, 0, 5, ch110data }; - -static const unsigned char ch111data[] = { - 0x60,0x90,0x90,0x90,0x60 -}; -static const GLUTBitmapChar ch111 = { 4, 5, 0, 0, 5, ch111data }; - -static const unsigned char ch112data[] = { - 0xc0,0x80,0xe0,0x90,0x90,0x90,0xe0 -}; -static const GLUTBitmapChar ch112 = { 4, 7, 0, 2, 5, ch112data }; - -static const unsigned char ch113data[] = { - 0x38,0x10,0x70,0x90,0x90,0x90,0x70 -}; -static const GLUTBitmapChar ch113 = { 5, 7, 0, 2, 5, ch113data }; - -static const unsigned char ch114data[] = { - 0xe0,0x40,0x40,0x60,0xa0 -}; -static const GLUTBitmapChar ch114 = { 3, 5, 0, 0, 4, ch114data }; - -static const unsigned char ch115data[] = { - 0xe0,0x20,0x60,0x80,0xe0 -}; -static const GLUTBitmapChar ch115 = { 3, 5, 0, 0, 4, ch115data }; - -static const unsigned char ch116data[] = { - 0x30,0x40,0x40,0x40,0xe0,0x40 -}; -static const GLUTBitmapChar ch116 = { 4, 6, 0, 0, 4, ch116data }; - -static const unsigned char ch117data[] = { - 0x68,0x90,0x90,0x90,0x90 -}; -static const GLUTBitmapChar ch117 = { 5, 5, 0, 0, 5, ch117data }; - -static const unsigned char ch118data[] = { - 0x20,0x60,0x50,0x90,0xd8 -}; -static const GLUTBitmapChar ch118 = { 5, 5, 0, 0, 5, ch118data }; - -static const unsigned char ch119data[] = { - 0x28,0x6c,0x54,0x92,0xdb -}; -static const GLUTBitmapChar ch119 = { 8, 5, 0, 0, 8, ch119data }; - -static const unsigned char ch120data[] = { - 0xd8,0x50,0x20,0x50,0xd8 -}; -static const GLUTBitmapChar ch120 = { 5, 5, 0, 0, 6, ch120data }; - -static const unsigned char ch121data[] = { - 0x40,0x40,0x20,0x30,0x50,0x48,0xdc -}; -static const GLUTBitmapChar ch121 = { 6, 7, 1, 2, 5, ch121data }; - -static const unsigned char ch122data[] = { - 0xf0,0x90,0x40,0x20,0xf0 -}; -static const GLUTBitmapChar ch122 = { 4, 5, 0, 0, 5, ch122data }; - -static const unsigned char ch123data[] = { - 0x20,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x20 -}; -static const GLUTBitmapChar ch123 = { 3, 9, 0, 2, 4, ch123data }; - -static const unsigned char ch124data[] = { - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch124 = { 1, 9, 0, 2, 2, ch124data }; - -static const unsigned char ch125data[] = { - 0x80,0x40,0x40,0x40,0x20,0x40,0x40,0x40,0x80 -}; -static const GLUTBitmapChar ch125 = { 3, 9, 0, 2, 4, ch125data }; - -static const unsigned char ch126data[] = { - 0x98,0x64 -}; -static const GLUTBitmapChar ch126 = { 6, 2, 0, -2, 7, ch126data }; - -static const unsigned char ch160data[] = { - 0x0 -}; -static const GLUTBitmapChar ch160 = { 1, 1, 0, 0, 2, ch160data }; - -static const unsigned char ch161data[] = { - 0x80,0x80,0x80,0x80,0x80,0x0,0x80 -}; -static const GLUTBitmapChar ch161 = { 1, 7, -1, 2, 3, ch161data }; - -static const unsigned char ch162data[] = { - 0x80,0xe0,0x90,0x80,0x90,0x70,0x10 -}; -static const GLUTBitmapChar ch162 = { 4, 7, 0, 1, 5, ch162data }; - -static const unsigned char ch163data[] = { - 0xf0,0xc8,0x40,0xe0,0x40,0x50,0x30 -}; -static const GLUTBitmapChar ch163 = { 5, 7, 0, 0, 5, ch163data }; - -static const unsigned char ch164data[] = { - 0x88,0x70,0x50,0x50,0x70,0x88 -}; -static const GLUTBitmapChar ch164 = { 5, 6, 0, -1, 5, ch164data }; - -static const unsigned char ch165data[] = { - 0x70,0x20,0xf8,0x20,0xd8,0x50,0x88 -}; -static const GLUTBitmapChar ch165 = { 5, 7, 0, 0, 5, ch165data }; - -static const unsigned char ch166data[] = { - 0x80,0x80,0x80,0x0,0x80,0x80,0x80 -}; -static const GLUTBitmapChar ch166 = { 1, 7, 0, 0, 2, ch166data }; - -static const unsigned char ch167data[] = { - 0xe0,0x90,0x20,0x50,0x90,0xa0,0x40,0x90,0x70 -}; -static const GLUTBitmapChar ch167 = { 4, 9, 0, 1, 5, ch167data }; - -static const unsigned char ch168data[] = { - 0xa0 -}; -static const GLUTBitmapChar ch168 = { 3, 1, -1, -6, 5, ch168data }; - -static const unsigned char ch169data[] = { - 0x38,0x44,0x9a,0xa2,0x9a,0x44,0x38 -}; -static const GLUTBitmapChar ch169 = { 7, 7, -1, 0, 9, ch169data }; - -static const unsigned char ch170data[] = { - 0xe0,0x0,0xa0,0x20,0xc0 -}; -static const GLUTBitmapChar ch170 = { 3, 5, 0, -2, 4, ch170data }; - -static const unsigned char ch171data[] = { - 0x50,0xa0,0xa0,0x50 -}; -static const GLUTBitmapChar ch171 = { 4, 4, 0, -1, 5, ch171data }; - -static const unsigned char ch172data[] = { - 0x8,0x8,0xf8 -}; -static const GLUTBitmapChar ch172 = { 5, 3, -1, -1, 7, ch172data }; - -static const unsigned char ch173data[] = { - 0xe0 -}; -static const GLUTBitmapChar ch173 = { 3, 1, 0, -2, 4, ch173data }; - -static const unsigned char ch174data[] = { - 0x38,0x44,0xaa,0xb2,0xba,0x44,0x38 -}; -static const GLUTBitmapChar ch174 = { 7, 7, -1, 0, 9, ch174data }; - -static const unsigned char ch175data[] = { - 0xe0 -}; -static const GLUTBitmapChar ch175 = { 3, 1, 0, -6, 4, ch175data }; - -static const unsigned char ch176data[] = { - 0x60,0x90,0x90,0x60 -}; -static const GLUTBitmapChar ch176 = { 4, 4, 0, -3, 4, ch176data }; - -static const unsigned char ch177data[] = { - 0xf8,0x0,0x20,0x20,0xf8,0x20,0x20 -}; -static const GLUTBitmapChar ch177 = { 5, 7, 0, 0, 6, ch177data }; - -static const unsigned char ch178data[] = { - 0xe0,0x40,0xa0,0x60 -}; -static const GLUTBitmapChar ch178 = { 3, 4, 0, -3, 3, ch178data }; - -static const unsigned char ch179data[] = { - 0xc0,0x20,0x40,0xe0 -}; -static const GLUTBitmapChar ch179 = { 3, 4, 0, -3, 3, ch179data }; - -static const unsigned char ch180data[] = { - 0x80,0x40 -}; -static const GLUTBitmapChar ch180 = { 2, 2, 0, -5, 3, ch180data }; - -static const unsigned char ch181data[] = { - 0x80,0x80,0xe8,0x90,0x90,0x90,0x90 -}; -static const GLUTBitmapChar ch181 = { 5, 7, 0, 2, 5, ch181data }; - -static const unsigned char ch182data[] = { - 0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x7c -}; -static const GLUTBitmapChar ch182 = { 6, 9, 0, 2, 6, ch182data }; - -static const unsigned char ch183data[] = { - 0x80 -}; -static const GLUTBitmapChar ch183 = { 1, 1, 0, -2, 2, ch183data }; - -static const unsigned char ch184data[] = { - 0xc0,0x20,0x40 -}; -static const GLUTBitmapChar ch184 = { 3, 3, 0, 3, 4, ch184data }; - -static const unsigned char ch185data[] = { - 0xe0,0x40,0xc0,0x40 -}; -static const GLUTBitmapChar ch185 = { 3, 4, 0, -3, 3, ch185data }; - -static const unsigned char ch186data[] = { - 0xe0,0x0,0x40,0xa0,0x40 -}; -static const GLUTBitmapChar ch186 = { 3, 5, 0, -2, 4, ch186data }; - -static const unsigned char ch187data[] = { - 0xa0,0x50,0x50,0xa0 -}; -static const GLUTBitmapChar ch187 = { 4, 4, 0, -1, 5, ch187data }; - -static const unsigned char ch188data[] = { - 0x44,0x3e,0x2c,0xf4,0x48,0xc8,0x44 -}; -static const GLUTBitmapChar ch188 = { 7, 7, 0, 0, 8, ch188data }; - -static const unsigned char ch189data[] = { - 0x4e,0x24,0x2a,0xf6,0x48,0xc8,0x44 -}; -static const GLUTBitmapChar ch189 = { 7, 7, 0, 0, 8, ch189data }; - -static const unsigned char ch190data[] = { - 0x44,0x3e,0x2c,0xd4,0x28,0x48,0xe4 -}; -static const GLUTBitmapChar ch190 = { 7, 7, 0, 0, 8, ch190data }; - -static const unsigned char ch191data[] = { - 0xe0,0xa0,0x80,0x40,0x40,0x0,0x40 -}; -static const GLUTBitmapChar ch191 = { 3, 7, 0, 2, 4, ch191data }; - -static const unsigned char ch192data[] = { - 0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x10,0x20 -}; -static const GLUTBitmapChar ch192 = { 7, 10, 0, 0, 8, ch192data }; - -static const unsigned char ch193data[] = { - 0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x10,0x8 -}; -static const GLUTBitmapChar ch193 = { 7, 10, 0, 0, 8, ch193data }; - -static const unsigned char ch194data[] = { - 0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x28,0x10 -}; -static const GLUTBitmapChar ch194 = { 7, 10, 0, 0, 8, ch194data }; - -static const unsigned char ch195data[] = { - 0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x28,0x14 -}; -static const GLUTBitmapChar ch195 = { 7, 10, 0, 0, 8, ch195data }; - -static const unsigned char ch196data[] = { - 0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x28 -}; -static const GLUTBitmapChar ch196 = { 7, 9, 0, 0, 8, ch196data }; - -static const unsigned char ch197data[] = { - 0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x10,0x28,0x10 -}; -static const GLUTBitmapChar ch197 = { 7, 10, 0, 0, 8, ch197data }; - -static const unsigned char ch198data[] = { - 0xef,0x49,0x78,0x2e,0x28,0x39,0x1f -}; -static const GLUTBitmapChar ch198 = { 8, 7, 0, 0, 9, ch198data }; - -static const unsigned char ch199data[] = { - 0x60,0x10,0x20,0x78,0xc4,0x80,0x80,0x80,0xc4,0x7c -}; -static const GLUTBitmapChar ch199 = { 6, 10, 0, 3, 7, ch199data }; - -static const unsigned char ch200data[] = { - 0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x20,0x40 -}; -static const GLUTBitmapChar ch200 = { 5, 10, 0, 0, 6, ch200data }; - -static const unsigned char ch201data[] = { - 0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x20,0x10 -}; -static const GLUTBitmapChar ch201 = { 5, 10, 0, 0, 6, ch201data }; - -static const unsigned char ch202data[] = { - 0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x50,0x20 -}; -static const GLUTBitmapChar ch202 = { 5, 10, 0, 0, 6, ch202data }; - -static const unsigned char ch203data[] = { - 0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x50 -}; -static const GLUTBitmapChar ch203 = { 5, 9, 0, 0, 6, ch203data }; - -static const unsigned char ch204data[] = { - 0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0x40,0x80 -}; -static const GLUTBitmapChar ch204 = { 3, 10, 0, 0, 4, ch204data }; - -static const unsigned char ch205data[] = { - 0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0x40,0x20 -}; -static const GLUTBitmapChar ch205 = { 3, 10, 0, 0, 4, ch205data }; - -static const unsigned char ch206data[] = { - 0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0xa0,0x40 -}; -static const GLUTBitmapChar ch206 = { 3, 10, 0, 0, 4, ch206data }; - -static const unsigned char ch207data[] = { - 0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0xa0 -}; -static const GLUTBitmapChar ch207 = { 3, 9, 0, 0, 4, ch207data }; - -static const unsigned char ch208data[] = { - 0xf8,0x4c,0x44,0xe4,0x44,0x4c,0xf8 -}; -static const GLUTBitmapChar ch208 = { 6, 7, 0, 0, 7, ch208data }; - -static const unsigned char ch209data[] = { - 0xe4,0x4c,0x4c,0x54,0x54,0x64,0xee,0x0,0x50,0x28 -}; -static const GLUTBitmapChar ch209 = { 7, 10, 0, 0, 8, ch209data }; - -static const unsigned char ch210data[] = { - 0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x20,0x40 -}; -static const GLUTBitmapChar ch210 = { 6, 10, 0, 0, 7, ch210data }; - -static const unsigned char ch211data[] = { - 0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x10,0x8 -}; -static const GLUTBitmapChar ch211 = { 6, 10, 0, 0, 7, ch211data }; - -static const unsigned char ch212data[] = { - 0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x50,0x20 -}; -static const GLUTBitmapChar ch212 = { 6, 10, 0, 0, 7, ch212data }; - -static const unsigned char ch213data[] = { - 0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x50,0x28 -}; -static const GLUTBitmapChar ch213 = { 6, 10, 0, 0, 7, ch213data }; - -static const unsigned char ch214data[] = { - 0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x50 -}; -static const GLUTBitmapChar ch214 = { 6, 9, 0, 0, 7, ch214data }; - -static const unsigned char ch215data[] = { - 0x88,0x50,0x20,0x50,0x88 -}; -static const GLUTBitmapChar ch215 = { 5, 5, 0, 0, 6, ch215data }; - -static const unsigned char ch216data[] = { - 0x80,0x7c,0x66,0x52,0x52,0x4a,0x66,0x3e,0x1 -}; -static const GLUTBitmapChar ch216 = { 8, 9, 0, 1, 8, ch216data }; - -static const unsigned char ch217data[] = { - 0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x10,0x20 -}; -static const GLUTBitmapChar ch217 = { 7, 10, 0, 0, 8, ch217data }; - -static const unsigned char ch218data[] = { - 0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x10,0x8 -}; -static const GLUTBitmapChar ch218 = { 7, 10, 0, 0, 8, ch218data }; - -static const unsigned char ch219data[] = { - 0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x28,0x10 -}; -static const GLUTBitmapChar ch219 = { 7, 10, 0, 0, 8, ch219data }; - -static const unsigned char ch220data[] = { - 0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x28 -}; -static const GLUTBitmapChar ch220 = { 7, 9, 0, 0, 8, ch220data }; - -static const unsigned char ch221data[] = { - 0x38,0x10,0x10,0x28,0x28,0x44,0xee,0x0,0x10,0x8 -}; -static const GLUTBitmapChar ch221 = { 7, 10, 0, 0, 8, ch221data }; - -static const unsigned char ch222data[] = { - 0xe0,0x40,0x70,0x48,0x70,0x40,0xe0 -}; -static const GLUTBitmapChar ch222 = { 5, 7, 0, 0, 6, ch222data }; - -static const unsigned char ch223data[] = { - 0xe0,0x50,0x50,0x60,0x50,0x50,0x20 -}; -static const GLUTBitmapChar ch223 = { 4, 7, 0, 0, 5, ch223data }; - -static const unsigned char ch224data[] = { - 0xe0,0xa0,0x60,0x20,0xc0,0x0,0x40,0x80 -}; -static const GLUTBitmapChar ch224 = { 3, 8, 0, 0, 4, ch224data }; - -static const unsigned char ch225data[] = { - 0xe0,0xa0,0x60,0x20,0xc0,0x0,0x40,0x20 -}; -static const GLUTBitmapChar ch225 = { 3, 8, 0, 0, 4, ch225data }; - -static const unsigned char ch226data[] = { - 0xe0,0xa0,0x60,0x20,0xc0,0x0,0xa0,0x40 -}; -static const GLUTBitmapChar ch226 = { 3, 8, 0, 0, 4, ch226data }; - -static const unsigned char ch227data[] = { - 0xe0,0xa0,0x60,0x20,0xc0,0x0,0xa0,0x50 -}; -static const GLUTBitmapChar ch227 = { 4, 8, 0, 0, 4, ch227data }; - -static const unsigned char ch228data[] = { - 0xe0,0xa0,0x60,0x20,0xc0,0x0,0xa0 -}; -static const GLUTBitmapChar ch228 = { 3, 7, 0, 0, 4, ch228data }; - -static const unsigned char ch229data[] = { - 0xe0,0xa0,0x60,0x20,0xc0,0x40,0xa0,0x40 -}; -static const GLUTBitmapChar ch229 = { 3, 8, 0, 0, 4, ch229data }; - -static const unsigned char ch230data[] = { - 0xd8,0xa0,0x70,0x28,0xd8 -}; -static const GLUTBitmapChar ch230 = { 5, 5, 0, 0, 6, ch230data }; - -static const unsigned char ch231data[] = { - 0xc0,0x20,0x40,0x60,0x80,0x80,0x80,0x60 -}; -static const GLUTBitmapChar ch231 = { 3, 8, 0, 3, 4, ch231data }; - -static const unsigned char ch232data[] = { - 0x60,0x80,0xc0,0xa0,0x60,0x0,0x40,0x80 -}; -static const GLUTBitmapChar ch232 = { 3, 8, 0, 0, 4, ch232data }; - -static const unsigned char ch233data[] = { - 0x60,0x80,0xc0,0xa0,0x60,0x0,0x40,0x20 -}; -static const GLUTBitmapChar ch233 = { 3, 8, 0, 0, 4, ch233data }; - -static const unsigned char ch234data[] = { - 0x60,0x80,0xc0,0xa0,0x60,0x0,0xa0,0x40 -}; -static const GLUTBitmapChar ch234 = { 3, 8, 0, 0, 4, ch234data }; - -static const unsigned char ch235data[] = { - 0x60,0x80,0xc0,0xa0,0x60,0x0,0xa0 -}; -static const GLUTBitmapChar ch235 = { 3, 7, 0, 0, 4, ch235data }; - -static const unsigned char ch236data[] = { - 0xe0,0x40,0x40,0x40,0xc0,0x0,0x40,0x80 -}; -static const GLUTBitmapChar ch236 = { 3, 8, 0, 0, 4, ch236data }; - -static const unsigned char ch237data[] = { - 0xe0,0x40,0x40,0x40,0xc0,0x0,0x40,0x20 -}; -static const GLUTBitmapChar ch237 = { 3, 8, 0, 0, 4, ch237data }; - -static const unsigned char ch238data[] = { - 0xe0,0x40,0x40,0x40,0xc0,0x0,0xa0,0x40 -}; -static const GLUTBitmapChar ch238 = { 3, 8, 0, 0, 4, ch238data }; - -static const unsigned char ch239data[] = { - 0xe0,0x40,0x40,0x40,0xc0,0x0,0xa0 -}; -static const GLUTBitmapChar ch239 = { 3, 7, 0, 0, 4, ch239data }; - -static const unsigned char ch240data[] = { - 0x60,0x90,0x90,0x90,0x70,0xa0,0x70,0x40 -}; -static const GLUTBitmapChar ch240 = { 4, 8, 0, 0, 5, ch240data }; - -static const unsigned char ch241data[] = { - 0xd8,0x90,0x90,0x90,0xe0,0x0,0xa0,0x50 -}; -static const GLUTBitmapChar ch241 = { 5, 8, 0, 0, 5, ch241data }; - -static const unsigned char ch242data[] = { - 0x60,0x90,0x90,0x90,0x60,0x0,0x20,0x40 -}; -static const GLUTBitmapChar ch242 = { 4, 8, 0, 0, 5, ch242data }; - -static const unsigned char ch243data[] = { - 0x60,0x90,0x90,0x90,0x60,0x0,0x40,0x20 -}; -static const GLUTBitmapChar ch243 = { 4, 8, 0, 0, 5, ch243data }; - -static const unsigned char ch244data[] = { - 0x60,0x90,0x90,0x90,0x60,0x0,0xa0,0x40 -}; -static const GLUTBitmapChar ch244 = { 4, 8, 0, 0, 5, ch244data }; - -static const unsigned char ch245data[] = { - 0x60,0x90,0x90,0x90,0x60,0x0,0xa0,0x50 -}; -static const GLUTBitmapChar ch245 = { 4, 8, 0, 0, 5, ch245data }; - -static const unsigned char ch246data[] = { - 0x60,0x90,0x90,0x90,0x60,0x0,0xa0 -}; -static const GLUTBitmapChar ch246 = { 4, 7, 0, 0, 5, ch246data }; - -static const unsigned char ch247data[] = { - 0x20,0x0,0xf8,0x0,0x20 -}; -static const GLUTBitmapChar ch247 = { 5, 5, 0, 0, 6, ch247data }; - -static const unsigned char ch248data[] = { - 0x80,0x70,0x48,0x48,0x48,0x38,0x4 -}; -static const GLUTBitmapChar ch248 = { 6, 7, 1, 1, 5, ch248data }; - -static const unsigned char ch249data[] = { - 0x68,0x90,0x90,0x90,0x90,0x0,0x20,0x40 -}; -static const GLUTBitmapChar ch249 = { 5, 8, 0, 0, 5, ch249data }; - -static const unsigned char ch250data[] = { - 0x68,0x90,0x90,0x90,0x90,0x0,0x40,0x20 -}; -static const GLUTBitmapChar ch250 = { 5, 8, 0, 0, 5, ch250data }; - -static const unsigned char ch251data[] = { - 0x68,0x90,0x90,0x90,0x90,0x0,0x50,0x20 -}; -static const GLUTBitmapChar ch251 = { 5, 8, 0, 0, 5, ch251data }; - -static const unsigned char ch252data[] = { - 0x68,0x90,0x90,0x90,0x90,0x0,0x50 -}; -static const GLUTBitmapChar ch252 = { 5, 7, 0, 0, 5, ch252data }; - -static const unsigned char ch253data[] = { - 0x80,0xc0,0x40,0x60,0xa0,0x90,0xb8,0x0,0x20,0x10 -}; -static const GLUTBitmapChar ch253 = { 5, 10, 0, 2, 5, ch253data }; - -static const unsigned char ch254data[] = { - 0xc0,0x80,0xe0,0x90,0x90,0x90,0xe0,0x80,0x80 -}; -static const GLUTBitmapChar ch254 = { 4, 9, 0, 2, 5, ch254data }; - -static const unsigned char ch255data[] = { - 0x80,0xc0,0x40,0x60,0xa0,0x90,0xb8,0x0,0xa0 -}; -static const GLUTBitmapChar ch255 = { 5, 9, 0, 2, 5, ch255data }; - - -static const GLUTBitmapChar *chars[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - &ch32, &ch33, &ch34, &ch35, &ch36, &ch37, &ch38, &ch39, - &ch40, &ch41, &ch42, &ch43, &ch44, &ch45, &ch46, &ch47, - &ch48, &ch49, &ch50, &ch51, &ch52, &ch53, &ch54, &ch55, - &ch56, &ch57, &ch58, &ch59, &ch60, &ch61, &ch62, &ch63, - &ch64, &ch65, &ch66, &ch67, &ch68, &ch69, &ch70, &ch71, - &ch72, &ch73, &ch74, &ch75, &ch76, &ch77, &ch78, &ch79, - &ch80, &ch81, &ch82, &ch83, &ch84, &ch85, &ch86, &ch87, - &ch88, &ch89, &ch90, &ch91, &ch92, &ch93, &ch94, &ch95, - &ch96, &ch97, &ch98, &ch99, &ch100, &ch101, &ch102, &ch103, - &ch104, &ch105, &ch106, &ch107, &ch108, &ch109, &ch110, &ch111, - &ch112, &ch113, &ch114, &ch115, &ch116, &ch117, &ch118, &ch119, - &ch120, &ch121, &ch122, &ch123, &ch124, &ch125, &ch126, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - &ch160, &ch161, &ch162, &ch163, &ch164, &ch165, &ch166, &ch167, - &ch168, &ch169, &ch170, &ch171, &ch172, &ch173, &ch174, &ch175, - &ch176, &ch177, &ch178, &ch179, &ch180, &ch181, &ch182, &ch183, - &ch184, &ch185, &ch186, &ch187, &ch188, &ch189, &ch190, &ch191, - &ch192, &ch193, &ch194, &ch195, &ch196, &ch197, &ch198, &ch199, - &ch200, &ch201, &ch202, &ch203, &ch204, &ch205, &ch206, &ch207, - &ch208, &ch209, &ch210, &ch211, &ch212, &ch213, &ch214, &ch215, - &ch216, &ch217, &ch218, &ch219, &ch220, &ch221, &ch222, &ch223, - &ch224, &ch225, &ch226, &ch227, &ch228, &ch229, &ch230, &ch231, - &ch232, &ch233, &ch234, &ch235, &ch236, &ch237, &ch238, &ch239, - &ch240, &ch241, &ch242, &ch243, &ch244, &ch245, &ch246, &ch247, - &ch248, &ch249, &ch250, &ch251, &ch252, &ch253, &ch254, &ch255 -}; - -const GLUTBitmapFont glutBitmapTimesRoman10 = { - "-Adobe-Times-Medium-R-Normal--10-100-75-75-P-54-ISO8859-1", - 13, 256, chars -}; diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/tr24.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/tr24.c deleted file mode 100644 index 2dd2a78c83..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/tr24.c +++ /dev/null @@ -1,1301 +0,0 @@ -/* autogenerated by bdf2c! do not edit */ - -/* "Copyright (c) 1984, 1987 Adobe Systems Incorporated. All Rights Reserved. Copyright (c) 1988, 1991 Digital Equipment Corporation. All Rights Reserved." */ - - -#include "internal.h" -/* -typedef struct { - int width, height; - int xorig, yorig; - int xmove; - const unsigned char *bitmap; -} GLUTBitmapChar; - -typedef struct { - const char *name; - int height; - int num; - const GLUTBitmapChar *const *table; -} GLUTBitmapFont; -*/ - - -static const unsigned char ch32data[] = { - 0x0 -}; -static const GLUTBitmapChar ch32 = { 1, 1, 0, 0, 6, ch32data }; - -static const unsigned char ch33data[] = { - 0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0 -}; -static const GLUTBitmapChar ch33 = { 2, 17, -3, 0, 8, ch33data }; - -static const unsigned char ch34data[] = { - 0x88,0xcc,0xcc,0xcc,0xcc -}; -static const GLUTBitmapChar ch34 = { 6, 5, -1, -12, 10, ch34data }; - -static const unsigned char ch35data[] = { - 0x22,0x0,0x22,0x0,0x22,0x0,0x22,0x0,0x22,0x0,0xff,0xc0,0xff,0xc0,0x11,0x0, - 0x11,0x0,0x11,0x0,0x7f,0xe0,0x7f,0xe0,0x8,0x80,0x8,0x80,0x8,0x80,0x8,0x80, - 0x8,0x80 -}; -static const GLUTBitmapChar ch35 = { 11, 17, -1, 0, 13, ch35data }; - -static const unsigned char ch36data[] = { - 0x4,0x0,0x4,0x0,0x3f,0x0,0xe5,0xc0,0xc4,0xc0,0x84,0x60,0x84,0x60,0x4,0x60, - 0x4,0xe0,0x7,0xc0,0x7,0x80,0x1e,0x0,0x3c,0x0,0x74,0x0,0x64,0x0,0x64,0x20, - 0x64,0x60,0x34,0xe0,0x1f,0x80,0x4,0x0,0x4,0x0 -}; -static const GLUTBitmapChar ch36 = { 11, 21, 0, 2, 12, ch36data }; - -static const unsigned char ch37data[] = { - 0x30,0x3c,0x0,0x18,0x72,0x0,0xc,0x61,0x0,0x4,0x60,0x80,0x6,0x60,0x80,0x3, - 0x30,0x80,0x1,0x19,0x80,0x1,0x8f,0x0,0x78,0xc0,0x0,0xe4,0x40,0x0,0xc2,0x60, - 0x0,0xc1,0x30,0x0,0xc1,0x10,0x0,0x61,0x18,0x0,0x33,0xfc,0x0,0x1e,0xc,0x0 -}; -static const GLUTBitmapChar ch37 = { 17, 16, -1, 0, 19, ch37data }; - -static const unsigned char ch38data[] = { - 0x3c,0x3c,0x7f,0x7e,0xe1,0xe1,0xc0,0xc0,0xc1,0xc0,0xc1,0xa0,0x63,0x20,0x37,0x10, - 0x1e,0x18,0xe,0x3e,0xf,0x0,0x1d,0x80,0x18,0xc0,0x18,0x40,0x18,0x40,0xc,0xc0, - 0x7,0x80 -}; -static const GLUTBitmapChar ch38 = { 16, 17, -1, 0, 18, ch38data }; - -static const unsigned char ch39data[] = { - 0xc0,0x60,0x20,0xe0,0xc0 -}; -static const GLUTBitmapChar ch39 = { 3, 5, -3, -12, 8, ch39data }; - -static const unsigned char ch40data[] = { - 0x4,0x8,0x10,0x30,0x20,0x60,0x60,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x60, - 0x60,0x20,0x30,0x10,0x8,0x4 -}; -static const GLUTBitmapChar ch40 = { 6, 22, -1, 5, 8, ch40data }; - -static const unsigned char ch41data[] = { - 0x80,0x40,0x20,0x30,0x10,0x18,0x18,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0x18, - 0x18,0x10,0x30,0x20,0x40,0x80 -}; -static const GLUTBitmapChar ch41 = { 6, 22, -1, 5, 8, ch41data }; - -static const unsigned char ch42data[] = { - 0x8,0x0,0x1c,0x0,0xc9,0x80,0xeb,0x80,0x1c,0x0,0xeb,0x80,0xc9,0x80,0x1c,0x0, - 0x8,0x0 -}; -static const GLUTBitmapChar ch42 = { 9, 9, -2, -8, 12, ch42data }; - -static const unsigned char ch43data[] = { - 0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xff,0xf0,0xff,0xf0,0x6,0x0, - 0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0 -}; -static const GLUTBitmapChar ch43 = { 12, 12, -1, -1, 14, ch43data }; - -static const unsigned char ch44data[] = { - 0xc0,0x60,0x20,0xe0,0xc0 -}; -static const GLUTBitmapChar ch44 = { 3, 5, -2, 3, 7, ch44data }; - -static const unsigned char ch45data[] = { - 0xff,0xf0,0xff,0xf0 -}; -static const GLUTBitmapChar ch45 = { 12, 2, -1, -6, 14, ch45data }; - -static const unsigned char ch46data[] = { - 0xc0,0xc0 -}; -static const GLUTBitmapChar ch46 = { 2, 2, -2, 0, 6, ch46data }; - -static const unsigned char ch47data[] = { - 0xc0,0xc0,0xc0,0x60,0x60,0x20,0x30,0x30,0x10,0x18,0x18,0x8,0xc,0xc,0x4,0x6, - 0x6,0x3,0x3,0x3 -}; -static const GLUTBitmapChar ch47 = { 8, 20, 1, 3, 7, ch47data }; - -static const unsigned char ch48data[] = { - 0x1e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0xe1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x61,0x80,0x61,0x80,0x33,0x0, - 0x1e,0x0 -}; -static const GLUTBitmapChar ch48 = { 10, 17, -1, 0, 12, ch48data }; - -static const unsigned char ch49data[] = { - 0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x18, - 0x8 -}; -static const GLUTBitmapChar ch49 = { 8, 17, -2, 0, 12, ch49data }; - -static const unsigned char ch50data[] = { - 0xff,0x80,0xff,0xc0,0x60,0x40,0x30,0x0,0x18,0x0,0xc,0x0,0x4,0x0,0x6,0x0, - 0x3,0x0,0x3,0x0,0x1,0x80,0x1,0x80,0x81,0x80,0x81,0x80,0x43,0x80,0x7f,0x0, - 0x1c,0x0 -}; -static const GLUTBitmapChar ch50 = { 10, 17, -1, 0, 12, ch50data }; - -static const unsigned char ch51data[] = { - 0x78,0x0,0xe6,0x0,0xc3,0x0,0x1,0x0,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0x80, - 0x7,0x0,0x1e,0x0,0xc,0x0,0x6,0x0,0x83,0x0,0x83,0x0,0x47,0x0,0x7e,0x0, - 0x1c,0x0 -}; -static const GLUTBitmapChar ch51 = { 9, 17, -1, 0, 12, ch51data }; - -static const unsigned char ch52data[] = { - 0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0xff,0xc0,0xff,0xc0,0xc3,0x0,0x43,0x0, - 0x63,0x0,0x23,0x0,0x33,0x0,0x13,0x0,0x1b,0x0,0xb,0x0,0x7,0x0,0x7,0x0, - 0x3,0x0 -}; -static const GLUTBitmapChar ch52 = { 10, 17, -1, 0, 12, ch52data }; - -static const unsigned char ch53data[] = { - 0x7e,0x0,0xe3,0x80,0xc1,0x80,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x1,0xc0, - 0x3,0x80,0xf,0x80,0x7e,0x0,0x78,0x0,0x60,0x0,0x20,0x0,0x20,0x0,0x1f,0x80, - 0x1f,0xc0 -}; -static const GLUTBitmapChar ch53 = { 10, 17, -1, 0, 12, ch53data }; - -static const unsigned char ch54data[] = { - 0x1e,0x0,0x7b,0x80,0x61,0x80,0xe0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc1,0x80,0xf3,0x80,0xee,0x0,0x60,0x0,0x70,0x0,0x30,0x0,0x18,0x0,0xe,0x0, - 0x3,0xc0 -}; -static const GLUTBitmapChar ch54 = { 10, 17, -1, 0, 12, ch54data }; - -static const unsigned char ch55data[] = { - 0x18,0x0,0x18,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0x4,0x0,0x6,0x0,0x6,0x0, - 0x2,0x0,0x3,0x0,0x3,0x0,0x1,0x0,0x1,0x80,0x81,0x80,0xc0,0xc0,0xff,0xc0, - 0x7f,0xc0 -}; -static const GLUTBitmapChar ch55 = { 10, 17, -1, 0, 12, ch55data }; - -static const unsigned char ch56data[] = { - 0x1e,0x0,0x73,0x80,0xe1,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x41,0xc0,0x61,0x80, - 0x37,0x0,0x1e,0x0,0x1e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0, - 0x1e,0x0 -}; -static const GLUTBitmapChar ch56 = { 10, 17, -1, 0, 12, ch56data }; - -static const unsigned char ch57data[] = { - 0xf0,0x0,0x1c,0x0,0x6,0x0,0x3,0x0,0x3,0x80,0x1,0x80,0x1d,0x80,0x73,0xc0, - 0x61,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0x61,0x80,0x77,0x80, - 0x1e,0x0 -}; -static const GLUTBitmapChar ch57 = { 10, 17, -1, 0, 12, ch57data }; - -static const unsigned char ch58data[] = { - 0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0 -}; -static const GLUTBitmapChar ch58 = { 2, 11, -2, 0, 6, ch58data }; - -static const unsigned char ch59data[] = { - 0xc0,0x60,0x20,0xe0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0 -}; -static const GLUTBitmapChar ch59 = { 3, 14, -2, 3, 7, ch59data }; - -static const unsigned char ch60data[] = { - 0x0,0x60,0x1,0xc0,0x7,0x0,0x1c,0x0,0x70,0x0,0xc0,0x0,0x70,0x0,0x1c,0x0, - 0x7,0x0,0x1,0xc0,0x0,0x60 -}; -static const GLUTBitmapChar ch60 = { 11, 11, -1, -1, 13, ch60data }; - -static const unsigned char ch61data[] = { - 0xff,0xf0,0xff,0xf0,0x0,0x0,0x0,0x0,0xff,0xf0,0xff,0xf0 -}; -static const GLUTBitmapChar ch61 = { 12, 6, -1, -4, 14, ch61data }; - -static const unsigned char ch62data[] = { - 0xc0,0x0,0x70,0x0,0x1c,0x0,0x7,0x0,0x1,0xc0,0x0,0x60,0x1,0xc0,0x7,0x0, - 0x1c,0x0,0x70,0x0,0xc0,0x0 -}; -static const GLUTBitmapChar ch62 = { 11, 11, -1, -1, 13, ch62data }; - -static const unsigned char ch63data[] = { - 0x30,0x30,0x0,0x0,0x10,0x10,0x10,0x18,0x18,0xc,0xe,0x7,0xc3,0xc3,0x83,0xc6, - 0x7c -}; -static const GLUTBitmapChar ch63 = { 8, 17, -2, 0, 11, ch63data }; - -static const unsigned char ch64data[] = { - 0x3,0xf0,0x0,0xe,0xc,0x0,0x18,0x0,0x0,0x30,0x0,0x0,0x61,0xde,0x0,0x63, - 0x7b,0x0,0xc6,0x39,0x80,0xc6,0x18,0x80,0xc6,0x18,0xc0,0xc6,0x18,0x40,0xc6,0xc, - 0x40,0xc3,0xc,0x40,0xc3,0x8c,0x40,0xe1,0xfc,0x40,0x60,0xec,0xc0,0x70,0x0,0x80, - 0x38,0x1,0x80,0x1c,0x3,0x0,0xf,0xe,0x0,0x3,0xf8,0x0 -}; -static const GLUTBitmapChar ch64 = { 18, 20, -2, 3, 22, ch64data }; - -static const unsigned char ch65data[] = { - 0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, - 0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, - 0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, - 0x0,0x80,0x0 -}; -static const GLUTBitmapChar ch65 = { 17, 17, 0, 0, 17, ch65data }; - -static const unsigned char ch66data[] = { - 0xff,0xe0,0x30,0x78,0x30,0x18,0x30,0xc,0x30,0xc,0x30,0xc,0x30,0x18,0x30,0x38, - 0x3f,0xe0,0x30,0x40,0x30,0x30,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70, - 0xff,0xc0 -}; -static const GLUTBitmapChar ch66 = { 14, 17, -1, 0, 16, ch66data }; - -static const unsigned char ch67data[] = { - 0x7,0xe0,0x1e,0x38,0x38,0x8,0x60,0x4,0x60,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, - 0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c, - 0x7,0xe4 -}; -static const GLUTBitmapChar ch67 = { 14, 17, -1, 0, 16, ch67data }; - -static const unsigned char ch68data[] = { - 0xff,0xc0,0x30,0x70,0x30,0x38,0x30,0xc,0x30,0xc,0x30,0x6,0x30,0x6,0x30,0x6, - 0x30,0x6,0x30,0x6,0x30,0x6,0x30,0x6,0x30,0xc,0x30,0xc,0x30,0x38,0x30,0x70, - 0xff,0xc0 -}; -static const GLUTBitmapChar ch68 = { 15, 17, -1, 0, 17, ch68data }; - -static const unsigned char ch69data[] = { - 0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, - 0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, - 0xff,0xf0 -}; -static const GLUTBitmapChar ch69 = { 13, 17, -1, 0, 15, ch69data }; - -static const unsigned char ch70data[] = { - 0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x20,0x30,0x20, - 0x3f,0xe0,0x30,0x20,0x30,0x20,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, - 0xff,0xf0 -}; -static const GLUTBitmapChar ch70 = { 12, 17, -1, 0, 14, ch70data }; - -static const unsigned char ch71data[] = { - 0x7,0xe0,0x1e,0x38,0x38,0x1c,0x60,0xc,0x60,0xc,0xc0,0xc,0xc0,0xc,0xc0,0x3f, - 0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c, - 0x7,0xe4 -}; -static const GLUTBitmapChar ch71 = { 16, 17, -1, 0, 18, ch71data }; - -static const unsigned char ch72data[] = { - 0xfc,0x1f,0x80,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30, - 0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x3f,0xfe,0x0,0x30,0x6,0x0,0x30,0x6, - 0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0, - 0xfc,0x1f,0x80 -}; -static const GLUTBitmapChar ch72 = { 17, 17, -1, 0, 19, ch72data }; - -static const unsigned char ch73data[] = { - 0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, - 0xfc -}; -static const GLUTBitmapChar ch73 = { 6, 17, -1, 0, 8, ch73data }; - -static const unsigned char ch74data[] = { - 0x78,0x0,0xcc,0x0,0xc6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, - 0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, - 0x1f,0x80 -}; -static const GLUTBitmapChar ch74 = { 9, 17, -1, 0, 11, ch74data }; - -static const unsigned char ch75data[] = { - 0xfc,0x1f,0x30,0xe,0x30,0x1c,0x30,0x38,0x30,0x70,0x30,0xe0,0x31,0xc0,0x33,0x80, - 0x3f,0x0,0x3e,0x0,0x33,0x0,0x31,0x80,0x30,0xc0,0x30,0x60,0x30,0x30,0x30,0x18, - 0xfc,0x7e -}; -static const GLUTBitmapChar ch75 = { 16, 17, -1, 0, 17, ch75data }; - -static const unsigned char ch76data[] = { - 0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, - 0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, - 0xfc,0x0 -}; -static const GLUTBitmapChar ch76 = { 13, 17, -1, 0, 14, ch76data }; - -static const unsigned char ch77data[] = { - 0xf8,0x21,0xf8,0x20,0x60,0x60,0x20,0x60,0x60,0x20,0xd0,0x60,0x20,0xd0,0x60,0x21, - 0x88,0x60,0x21,0x88,0x60,0x23,0x8,0x60,0x23,0x4,0x60,0x26,0x4,0x60,0x26,0x2, - 0x60,0x2c,0x2,0x60,0x2c,0x2,0x60,0x38,0x1,0x60,0x38,0x1,0x60,0x30,0x0,0xe0, - 0xf0,0x0,0xf8 -}; -static const GLUTBitmapChar ch77 = { 21, 17, -1, 0, 22, ch77data }; - -static const unsigned char ch78data[] = { - 0xf8,0xc,0x20,0x1c,0x20,0x1c,0x20,0x34,0x20,0x64,0x20,0x64,0x20,0xc4,0x21,0x84, - 0x21,0x84,0x23,0x4,0x26,0x4,0x26,0x4,0x2c,0x4,0x38,0x4,0x38,0x4,0x30,0x4, - 0xf0,0x1f -}; -static const GLUTBitmapChar ch78 = { 16, 17, -1, 0, 18, ch78data }; - -static const unsigned char ch79data[] = { - 0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, - 0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, - 0x7,0xe0 -}; -static const GLUTBitmapChar ch79 = { 16, 17, -1, 0, 18, ch79data }; - -static const unsigned char ch80data[] = { - 0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, - 0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70, - 0xff,0xc0 -}; -static const GLUTBitmapChar ch80 = { 13, 17, -1, 0, 15, ch80data }; - -static const unsigned char ch81data[] = { - 0x0,0xf,0x0,0x38,0x0,0x70,0x0,0xe0,0x1,0xc0,0x7,0xe0,0x1c,0x38,0x38,0x1c, - 0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3, - 0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,0x7,0xe0 -}; -static const GLUTBitmapChar ch81 = { 16, 22, -1, 5, 18, ch81data }; - -static const unsigned char ch82data[] = { - 0xfc,0x1e,0x30,0x1c,0x30,0x38,0x30,0x70,0x30,0x60,0x30,0xc0,0x31,0xc0,0x33,0x80, - 0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x38,0x30,0x18,0x30,0x38,0x30,0x30,0x30,0x70, - 0xff,0xc0 -}; -static const GLUTBitmapChar ch82 = { 15, 17, -1, 0, 16, ch82data }; - -static const unsigned char ch83data[] = { - 0x9e,0x0,0xf1,0x80,0xc0,0xc0,0x80,0x60,0x80,0x60,0x0,0x60,0x0,0xe0,0x3,0xc0, - 0xf,0x80,0x1e,0x0,0x78,0x0,0xe0,0x0,0xc0,0x40,0xc0,0x40,0xc0,0xc0,0x63,0xc0, - 0x1e,0x40 -}; -static const GLUTBitmapChar ch83 = { 11, 17, -1, 0, 13, ch83data }; - -static const unsigned char ch84data[] = { - 0xf,0xc0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0, - 0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x83,0x4,0x83,0x4,0xc3,0xc, - 0xff,0xfc -}; -static const GLUTBitmapChar ch84 = { 14, 17, -1, 0, 16, ch84data }; - -static const unsigned char ch85data[] = { - 0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, - 0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, - 0xfc,0x1f -}; -static const GLUTBitmapChar ch85 = { 16, 17, -1, 0, 18, ch85data }; - -static const unsigned char ch86data[] = { - 0x1,0x80,0x0,0x1,0x80,0x0,0x1,0x80,0x0,0x3,0xc0,0x0,0x3,0x40,0x0,0x3, - 0x60,0x0,0x6,0x20,0x0,0x6,0x20,0x0,0x6,0x30,0x0,0xc,0x10,0x0,0xc,0x18, - 0x0,0x18,0x8,0x0,0x18,0x8,0x0,0x18,0xc,0x0,0x30,0x4,0x0,0x30,0x6,0x0, - 0xfc,0x1f,0x80 -}; -static const GLUTBitmapChar ch86 = { 17, 17, 0, 0, 17, ch86data }; - -static const unsigned char ch87data[] = { - 0x1,0x83,0x0,0x1,0x83,0x0,0x1,0x83,0x80,0x3,0x87,0x80,0x3,0x46,0x80,0x3, - 0x46,0xc0,0x6,0x46,0x40,0x6,0x4c,0x40,0x6,0x4c,0x60,0xc,0x2c,0x60,0xc,0x2c, - 0x20,0x18,0x2c,0x20,0x18,0x18,0x30,0x18,0x18,0x10,0x30,0x18,0x10,0x30,0x18,0x18, - 0xfc,0x7e,0x7e -}; -static const GLUTBitmapChar ch87 = { 23, 17, 0, 0, 23, ch87data }; - -static const unsigned char ch88data[] = { - 0xfc,0xf,0xc0,0x30,0x3,0x80,0x18,0x7,0x0,0x8,0xe,0x0,0x4,0xc,0x0,0x6, - 0x18,0x0,0x2,0x38,0x0,0x1,0x70,0x0,0x0,0xe0,0x0,0x0,0xc0,0x0,0x1,0xc0, - 0x0,0x3,0xa0,0x0,0x3,0x10,0x0,0x6,0x8,0x0,0xe,0xc,0x0,0x1c,0x6,0x0, - 0x7e,0xf,0x80 -}; -static const GLUTBitmapChar ch88 = { 18, 17, 0, 0, 18, ch88data }; - -static const unsigned char ch89data[] = { - 0x7,0xe0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0xc0, - 0x3,0x40,0x6,0x60,0x6,0x20,0xc,0x30,0x1c,0x10,0x18,0x18,0x38,0x8,0x30,0xc, - 0xfc,0x3f -}; -static const GLUTBitmapChar ch89 = { 16, 17, 0, 0, 16, ch89data }; - -static const unsigned char ch90data[] = { - 0xff,0xf8,0xe0,0x18,0x70,0x8,0x30,0x8,0x38,0x0,0x18,0x0,0x1c,0x0,0xe,0x0, - 0x6,0x0,0x7,0x0,0x3,0x0,0x3,0x80,0x1,0xc0,0x80,0xc0,0x80,0xe0,0xc0,0x70, - 0xff,0xf0 -}; -static const GLUTBitmapChar ch90 = { 13, 17, -1, 0, 15, ch90data }; - -static const unsigned char ch91data[] = { - 0xf8,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xf8 -}; -static const GLUTBitmapChar ch91 = { 5, 21, -2, 4, 8, ch91data }; - -static const unsigned char ch92data[] = { - 0x6,0x6,0x4,0xc,0xc,0x8,0x18,0x18,0x10,0x30,0x30,0x20,0x60,0x60,0x40,0xc0, - 0xc0 -}; -static const GLUTBitmapChar ch92 = { 7, 17, 0, 0, 7, ch92data }; - -static const unsigned char ch93data[] = { - 0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18,0xf8 -}; -static const GLUTBitmapChar ch93 = { 5, 21, -1, 4, 8, ch93data }; - -static const unsigned char ch94data[] = { - 0x80,0x80,0xc1,0x80,0x41,0x0,0x63,0x0,0x22,0x0,0x36,0x0,0x14,0x0,0x1c,0x0, - 0x8,0x0 -}; -static const GLUTBitmapChar ch94 = { 9, 9, -1, -8, 11, ch94data }; - -static const unsigned char ch95data[] = { - 0xff,0xf8,0xff,0xf8 -}; -static const GLUTBitmapChar ch95 = { 13, 2, 0, 5, 13, ch95data }; - -static const unsigned char ch96data[] = { - 0x60,0xe0,0x80,0xc0,0x60 -}; -static const GLUTBitmapChar ch96 = { 3, 5, -2, -12, 7, ch96data }; - -static const unsigned char ch97data[] = { - 0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, - 0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0 -}; -static const GLUTBitmapChar ch97 = { 9, 12, -1, 0, 11, ch97data }; - -static const unsigned char ch98data[] = { - 0x5e,0x0,0x73,0x80,0x61,0x80,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, - 0x60,0xc0,0x61,0x80,0x73,0x80,0x6e,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0, - 0xe0,0x0 -}; -static const GLUTBitmapChar ch98 = { 10, 17, -1, 0, 12, ch98data }; - -static const unsigned char ch99data[] = { - 0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, - 0xc0,0x0,0x41,0x80,0x63,0x80,0x1f,0x0 -}; -static const GLUTBitmapChar ch99 = { 9, 12, -1, 0, 11, ch99data }; - -static const unsigned char ch100data[] = { - 0x1e,0xc0,0x73,0x80,0x61,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80, - 0xc1,0x80,0x61,0x80,0x73,0x80,0x1d,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80, - 0x3,0x80 -}; -static const GLUTBitmapChar ch100 = { 10, 17, -1, 0, 12, ch100data }; - -static const unsigned char ch101data[] = { - 0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, - 0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0 -}; -static const GLUTBitmapChar ch101 = { 9, 12, -1, 0, 11, ch101data }; - -static const unsigned char ch102data[] = { - 0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfe,0x30,0x30,0x30,0x16, - 0xe -}; -static const GLUTBitmapChar ch102 = { 7, 17, 0, 0, 7, ch102data }; - -static const unsigned char ch103data[] = { - 0x3f,0x0,0xf1,0xc0,0xc0,0x60,0xc0,0x20,0x60,0x60,0x3f,0xc0,0x7f,0x0,0x60,0x0, - 0x30,0x0,0x3e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0, - 0x1f,0xc0 -}; -static const GLUTBitmapChar ch103 = { 11, 17, -1, 5, 12, ch103data }; - -static const unsigned char ch104data[] = { - 0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, - 0x60,0xc0,0x71,0xc0,0x6f,0x80,0x67,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0, - 0xe0,0x0 -}; -static const GLUTBitmapChar ch104 = { 11, 17, -1, 0, 13, ch104data }; - -static const unsigned char ch105data[] = { - 0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x0,0x0,0x0,0x60, - 0x60 -}; -static const GLUTBitmapChar ch105 = { 4, 17, -1, 0, 6, ch105data }; - -static const unsigned char ch106data[] = { - 0xc0,0xe0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, - 0x70,0x0,0x0,0x0,0x30,0x30 -}; -static const GLUTBitmapChar ch106 = { 4, 22, 0, 5, 6, ch106data }; - -static const unsigned char ch107data[] = { - 0xf3,0xe0,0x61,0xc0,0x63,0x80,0x67,0x0,0x6e,0x0,0x6c,0x0,0x78,0x0,0x68,0x0, - 0x64,0x0,0x66,0x0,0x63,0x0,0x67,0xc0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0, - 0xe0,0x0 -}; -static const GLUTBitmapChar ch107 = { 11, 17, -1, 0, 12, ch107data }; - -static const unsigned char ch108data[] = { - 0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0xe0 -}; -static const GLUTBitmapChar ch108 = { 4, 17, -1, 0, 6, ch108data }; - -static const unsigned char ch109data[] = { - 0xf1,0xe3,0xc0,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60, - 0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x71,0xe3,0x80,0x6f,0x9f, - 0x0,0xe7,0xe,0x0 -}; -static const GLUTBitmapChar ch109 = { 18, 12, -1, 0, 20, ch109data }; - -static const unsigned char ch110data[] = { - 0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, - 0x60,0xc0,0x71,0xc0,0x6f,0x80,0xe7,0x0 -}; -static const GLUTBitmapChar ch110 = { 11, 12, -1, 0, 13, ch110data }; - -static const unsigned char ch111data[] = { - 0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0 -}; -static const GLUTBitmapChar ch111 = { 10, 12, -1, 0, 12, ch111data }; - -static const unsigned char ch112data[] = { - 0xf0,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x6e,0x0,0x73,0x80,0x61,0x80, - 0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x61,0x80,0x73,0x80, - 0xee,0x0 -}; -static const GLUTBitmapChar ch112 = { 10, 17, -1, 5, 12, ch112data }; - -static const unsigned char ch113data[] = { - 0x3,0xc0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1d,0x80,0x73,0x80,0x61,0x80, - 0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x61,0x80,0x73,0x80, - 0x1d,0x80 -}; -static const GLUTBitmapChar ch113 = { 10, 17, -1, 5, 12, ch113data }; - -static const unsigned char ch114data[] = { - 0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x76,0x6e,0xe6 -}; -static const GLUTBitmapChar ch114 = { 7, 12, -1, 0, 8, ch114data }; - -static const unsigned char ch115data[] = { - 0xf8,0xc6,0x83,0x3,0x7,0x1e,0x7c,0x70,0xe0,0xc2,0x66,0x3e -}; -static const GLUTBitmapChar ch115 = { 8, 12, -1, 0, 10, ch115data }; - -static const unsigned char ch116data[] = { - 0x1c,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfe,0x70,0x30,0x10 -}; -static const GLUTBitmapChar ch116 = { 7, 15, 0, 0, 7, ch116data }; - -static const unsigned char ch117data[] = { - 0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, - 0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0 -}; -static const GLUTBitmapChar ch117 = { 11, 12, -1, 0, 13, ch117data }; - -static const unsigned char ch118data[] = { - 0x4,0x0,0xe,0x0,0xe,0x0,0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80, - 0x30,0x80,0x60,0x80,0x60,0xc0,0xf1,0xe0 -}; -static const GLUTBitmapChar ch118 = { 11, 12, 0, 0, 11, ch118data }; - -static const unsigned char ch119data[] = { - 0x4,0x10,0x0,0xe,0x38,0x0,0xe,0x38,0x0,0x1a,0x28,0x0,0x1a,0x64,0x0,0x19, - 0x64,0x0,0x31,0x64,0x0,0x30,0xc2,0x0,0x30,0xc2,0x0,0x60,0xc2,0x0,0x60,0xc3, - 0x0,0xf1,0xe7,0x80 -}; -static const GLUTBitmapChar ch119 = { 17, 12, 0, 0, 17, ch119data }; - -static const unsigned char ch120data[] = { - 0xf1,0xe0,0x60,0xc0,0x21,0x80,0x33,0x80,0x1b,0x0,0xe,0x0,0xc,0x0,0x1a,0x0, - 0x39,0x0,0x31,0x80,0x60,0xc0,0xf1,0xe0 -}; -static const GLUTBitmapChar ch120 = { 11, 12, -1, 0, 13, ch120data }; - -static const unsigned char ch121data[] = { - 0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0, - 0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0, - 0xf1,0xe0 -}; -static const GLUTBitmapChar ch121 = { 11, 17, 0, 5, 11, ch121data }; - -static const unsigned char ch122data[] = { - 0xff,0xc3,0x61,0x70,0x30,0x38,0x18,0x1c,0xe,0x86,0xc3,0xff -}; -static const GLUTBitmapChar ch122 = { 8, 12, -1, 0, 10, ch122data }; - -static const unsigned char ch123data[] = { - 0x7,0xc,0x18,0x18,0x18,0x18,0x18,0x18,0x10,0x30,0x20,0xc0,0x20,0x30,0x10,0x18, - 0x18,0x18,0x18,0x18,0xc,0x7 -}; -static const GLUTBitmapChar ch123 = { 8, 22, -1, 5, 10, ch123data }; - -static const unsigned char ch124data[] = { - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0 -}; -static const GLUTBitmapChar ch124 = { 2, 17, -2, 0, 6, ch124data }; - -static const unsigned char ch125data[] = { - 0xe0,0x30,0x18,0x18,0x18,0x18,0x18,0x18,0x8,0xc,0x4,0x3,0x4,0xc,0x8,0x18, - 0x18,0x18,0x18,0x18,0x30,0xe0 -}; -static const GLUTBitmapChar ch125 = { 8, 22, -1, 5, 10, ch125data }; - -static const unsigned char ch126data[] = { - 0x83,0x80,0xc7,0xc0,0x7c,0x60,0x38,0x20 -}; -static const GLUTBitmapChar ch126 = { 11, 4, -1, -5, 13, ch126data }; - -static const unsigned char ch160data[] = { - 0x0 -}; -static const GLUTBitmapChar ch160 = { 1, 1, 0, 0, 6, ch160data }; - -static const unsigned char ch161data[] = { - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0xc0, - 0xc0 -}; -static const GLUTBitmapChar ch161 = { 2, 17, -4, 5, 8, ch161data }; - -static const unsigned char ch162data[] = { - 0x40,0x0,0x40,0x0,0x3e,0x0,0x7f,0x0,0x70,0x80,0xd0,0x0,0xc8,0x0,0xc8,0x0, - 0xc8,0x0,0xc4,0x0,0xc4,0x0,0x43,0x80,0x63,0x80,0x1f,0x0,0x1,0x0,0x1,0x0 -}; -static const GLUTBitmapChar ch162 = { 9, 16, -1, 2, 12, ch162data }; - -static const unsigned char ch163data[] = { - 0xe7,0x80,0xbe,0xc0,0x78,0x40,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, - 0x30,0x0,0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x31,0x80,0x19,0x80, - 0xf,0x0 -}; -static const GLUTBitmapChar ch163 = { 10, 17, -1, 0, 12, ch163data }; - -static const unsigned char ch164data[] = { - 0xc0,0x60,0xee,0xe0,0x7f,0xc0,0x31,0x80,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, - 0x31,0x80,0x7f,0xc0,0xee,0xe0,0xc0,0x60 -}; -static const GLUTBitmapChar ch164 = { 11, 12, -1, -3, 13, ch164data }; - -static const unsigned char ch165data[] = { - 0xf,0xc0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x1f,0xe0,0x3,0x0,0x1f,0xe0, - 0x3,0x0,0x7,0x80,0xc,0x80,0xc,0xc0,0x18,0x40,0x18,0x60,0x30,0x20,0x70,0x30, - 0xf8,0x7c -}; -static const GLUTBitmapChar ch165 = { 14, 17, 0, 0, 14, ch165data }; - -static const unsigned char ch166data[] = { - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0 -}; -static const GLUTBitmapChar ch166 = { 2, 17, -2, 0, 6, ch166data }; - -static const unsigned char ch167data[] = { - 0x38,0x64,0x62,0x6,0xe,0x1c,0x38,0x74,0xe2,0xc3,0x83,0x87,0x4e,0x3c,0x38,0x70, - 0x60,0x46,0x26,0x1c -}; -static const GLUTBitmapChar ch167 = { 8, 20, -2, 2, 12, ch167data }; - -static const unsigned char ch168data[] = { - 0xcc,0xcc -}; -static const GLUTBitmapChar ch168 = { 6, 2, -1, -14, 8, ch168data }; - -static const unsigned char ch169data[] = { - 0x7,0xf0,0x0,0x1c,0x1c,0x0,0x30,0x6,0x0,0x61,0xc3,0x0,0x47,0x71,0x0,0xc4, - 0x19,0x80,0x8c,0x0,0x80,0x88,0x0,0x80,0x88,0x0,0x80,0x88,0x0,0x80,0x8c,0x0, - 0x80,0xc4,0x19,0x80,0x47,0x31,0x0,0x61,0xe3,0x0,0x30,0x6,0x0,0x1c,0x1c,0x0, - 0x7,0xf0,0x0 -}; -static const GLUTBitmapChar ch169 = { 17, 17, -1, 0, 19, ch169data }; - -static const unsigned char ch170data[] = { - 0x7e,0x0,0x76,0xcc,0xcc,0x7c,0xc,0xcc,0x78 -}; -static const GLUTBitmapChar ch170 = { 7, 9, 0, -8, 8, ch170data }; - -static const unsigned char ch171data[] = { - 0x8,0x80,0x19,0x80,0x33,0x0,0x66,0x0,0xcc,0x0,0xcc,0x0,0x66,0x0,0x33,0x0, - 0x19,0x80,0x8,0x80 -}; -static const GLUTBitmapChar ch171 = { 9, 10, -2, -1, 13, ch171data }; - -static const unsigned char ch172data[] = { - 0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0xff,0xf0,0xff,0xf0 -}; -static const GLUTBitmapChar ch172 = { 12, 7, -1, -3, 14, ch172data }; - -static const unsigned char ch173data[] = { - 0xfe,0xfe -}; -static const GLUTBitmapChar ch173 = { 7, 2, -1, -5, 9, ch173data }; - -static const unsigned char ch174data[] = { - 0x7,0xf0,0x0,0x1c,0x1c,0x0,0x30,0x6,0x0,0x60,0x3,0x0,0x47,0x19,0x0,0xc2, - 0x31,0x80,0x82,0x20,0x80,0x82,0x40,0x80,0x83,0xe0,0x80,0x82,0x30,0x80,0x82,0x10, - 0x80,0xc2,0x11,0x80,0x42,0x31,0x0,0x67,0xe3,0x0,0x30,0x6,0x0,0x1c,0x1c,0x0, - 0x7,0xf0,0x0 -}; -static const GLUTBitmapChar ch174 = { 17, 17, -1, 0, 19, ch174data }; - -static const unsigned char ch175data[] = { - 0xfc,0xfc -}; -static const GLUTBitmapChar ch175 = { 6, 2, -1, -14, 8, ch175data }; - -static const unsigned char ch176data[] = { - 0x38,0x44,0x82,0x82,0x82,0x44,0x38 -}; -static const GLUTBitmapChar ch176 = { 7, 7, -1, -10, 9, ch176data }; - -static const unsigned char ch177data[] = { - 0xff,0xf0,0xff,0xf0,0x0,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, - 0xff,0xf0,0xff,0xf0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0 -}; -static const GLUTBitmapChar ch177 = { 12, 15, -1, 0, 14, ch177data }; - -static const unsigned char ch178data[] = { - 0xfc,0x44,0x20,0x30,0x10,0x8,0xc,0x8c,0x4c,0x38 -}; -static const GLUTBitmapChar ch178 = { 6, 10, 0, -7, 7, ch178data }; - -static const unsigned char ch179data[] = { - 0x70,0x88,0x8c,0xc,0x8,0x30,0x8,0x8c,0x4c,0x38 -}; -static const GLUTBitmapChar ch179 = { 6, 10, 0, -7, 7, ch179data }; - -static const unsigned char ch180data[] = { - 0x80,0x60,0x38,0x18 -}; -static const GLUTBitmapChar ch180 = { 5, 4, -2, -13, 8, ch180data }; - -static const unsigned char ch181data[] = { - 0x40,0x0,0xe0,0x0,0xc0,0x0,0x40,0x0,0x40,0x0,0x5c,0xe0,0x7e,0xc0,0x71,0xc0, - 0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, - 0xe1,0xc0 -}; -static const GLUTBitmapChar ch181 = { 11, 17, -1, 5, 13, ch181data }; - -static const unsigned char ch182data[] = { - 0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0, - 0x9,0x0,0x9,0x0,0x9,0x0,0x19,0x0,0x39,0x0,0x79,0x0,0x79,0x0,0xf9,0x0, - 0xf9,0x0,0xf9,0x0,0x79,0x0,0x79,0x0,0x39,0x0,0x1f,0x80 -}; -static const GLUTBitmapChar ch182 = { 9, 22, -1, 5, 11, ch182data }; - -static const unsigned char ch183data[] = { - 0xc0,0xc0 -}; -static const GLUTBitmapChar ch183 = { 2, 2, -2, -6, 6, ch183data }; - -static const unsigned char ch184data[] = { - 0x78,0xcc,0xc,0x3c,0x30,0x10 -}; -static const GLUTBitmapChar ch184 = { 6, 6, -1, 6, 8, ch184data }; - -static const unsigned char ch185data[] = { - 0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xa0,0x60,0x20 -}; -static const GLUTBitmapChar ch185 = { 5, 10, -1, -7, 7, ch185data }; - -static const unsigned char ch186data[] = { - 0xfc,0x0,0x78,0xcc,0xcc,0xcc,0xcc,0xcc,0x78 -}; -static const GLUTBitmapChar ch186 = { 6, 9, -1, -8, 8, ch186data }; - -static const unsigned char ch187data[] = { - 0x88,0x0,0xcc,0x0,0x66,0x0,0x33,0x0,0x19,0x80,0x19,0x80,0x33,0x0,0x66,0x0, - 0xcc,0x0,0x88,0x0 -}; -static const GLUTBitmapChar ch187 = { 9, 10, -2, -1, 12, ch187data }; - -static const unsigned char ch188data[] = { - 0x30,0x4,0x10,0x4,0x18,0xff,0x8,0x44,0xc,0x64,0x6,0x24,0x2,0x14,0xfb,0x1c, - 0x21,0xc,0x21,0x84,0x20,0xc0,0x20,0x40,0x20,0x60,0x20,0x20,0xa0,0x30,0x60,0x18, - 0x20,0x8 -}; -static const GLUTBitmapChar ch188 = { 16, 17, -1, 0, 18, ch188data }; - -static const unsigned char ch189data[] = { - 0x30,0x7e,0x10,0x22,0x18,0x10,0x8,0x18,0xc,0x8,0x6,0x4,0x2,0x6,0xfb,0x46, - 0x21,0x26,0x21,0x9c,0x20,0xc0,0x20,0x40,0x20,0x60,0x20,0x20,0xa0,0x30,0x60,0x18, - 0x20,0x8 -}; -static const GLUTBitmapChar ch189 = { 15, 17, -1, 0, 18, ch189data }; - -static const unsigned char ch190data[] = { - 0x18,0x2,0x0,0x8,0x2,0x0,0xc,0x7f,0x80,0x4,0x22,0x0,0x6,0x32,0x0,0x3, - 0x12,0x0,0x1,0xa,0x0,0x71,0x8e,0x0,0x88,0x86,0x0,0x8c,0xc2,0x0,0xc,0x60, - 0x0,0x8,0x20,0x0,0x30,0x30,0x0,0x8,0x10,0x0,0x8c,0x18,0x0,0x4c,0xc,0x0, - 0x38,0x4,0x0 -}; -static const GLUTBitmapChar ch190 = { 17, 17, 0, 0, 18, ch190data }; - -static const unsigned char ch191data[] = { - 0x3e,0x63,0xc1,0xc3,0xc3,0xe0,0x70,0x30,0x38,0x18,0x18,0x8,0x8,0x0,0x0,0xc, - 0xc -}; -static const GLUTBitmapChar ch191 = { 8, 17, -1, 5, 11, ch191data }; - -static const unsigned char ch192data[] = { - 0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, - 0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, - 0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, - 0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x0,0xc0,0x0,0x3,0x80,0x0,0x3, - 0x0,0x0 -}; -static const GLUTBitmapChar ch192 = { 17, 22, 0, 0, 17, ch192data }; - -static const unsigned char ch193data[] = { - 0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, - 0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, - 0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, - 0x0,0x80,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0xc0,0x0,0x0,0x70,0x0,0x0, - 0x30,0x0 -}; -static const GLUTBitmapChar ch193 = { 17, 22, 0, 0, 17, ch193data }; - -static const unsigned char ch194data[] = { - 0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, - 0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, - 0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, - 0x0,0x80,0x0,0x0,0x0,0x0,0x8,0x10,0x0,0x6,0x60,0x0,0x3,0xc0,0x0,0x1, - 0x80,0x0 -}; -static const GLUTBitmapChar ch194 = { 17, 22, 0, 0, 17, ch194data }; - -static const unsigned char ch195data[] = { - 0xfc,0x1f,0x80,0x30,0x7,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, - 0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, - 0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, - 0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0xe0,0x0,0x3,0x90,0x0 -}; -static const GLUTBitmapChar ch195 = { 17, 21, 0, 0, 17, ch195data }; - -static const unsigned char ch196data[] = { - 0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, - 0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, - 0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, - 0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x30,0x0,0x6,0x30,0x0 -}; -static const GLUTBitmapChar ch196 = { 17, 21, 0, 0, 17, ch196data }; - -static const unsigned char ch197data[] = { - 0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, - 0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, - 0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, - 0x0,0x80,0x0,0x1,0xc0,0x0,0x2,0x20,0x0,0x2,0x20,0x0,0x1,0xc0,0x0 -}; -static const GLUTBitmapChar ch197 = { 17, 21, 0, 0, 17, ch197data }; - -static const unsigned char ch198data[] = { - 0xf9,0xff,0xf0,0x30,0x60,0x30,0x10,0x60,0x10,0x10,0x60,0x10,0x18,0x60,0x0,0x8, - 0x60,0x0,0xf,0xe0,0x80,0xc,0x60,0x80,0x4,0x7f,0x80,0x4,0x60,0x80,0x6,0x60, - 0x80,0x2,0x60,0x0,0x2,0x60,0x0,0x1,0x60,0x20,0x1,0x60,0x20,0x1,0xe0,0x60, - 0x3,0xff,0xe0 -}; -static const GLUTBitmapChar ch198 = { 20, 17, 0, 0, 21, ch198data }; - -static const unsigned char ch199data[] = { - 0x7,0x80,0xc,0xc0,0x0,0xc0,0x3,0xc0,0x3,0x0,0x1,0x0,0x7,0xe0,0x1e,0x38, - 0x38,0x8,0x60,0x4,0x60,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, - 0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c,0x7,0xe4 -}; -static const GLUTBitmapChar ch199 = { 14, 23, -1, 6, 16, ch199data }; - -static const unsigned char ch200data[] = { - 0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, - 0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, - 0xff,0xf0,0x0,0x0,0x1,0x0,0x6,0x0,0x1c,0x0,0x18,0x0 -}; -static const GLUTBitmapChar ch200 = { 13, 22, -1, 0, 15, ch200data }; - -static const unsigned char ch201data[] = { - 0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, - 0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, - 0xff,0xf0,0x0,0x0,0x4,0x0,0x3,0x0,0x1,0xc0,0x0,0xc0 -}; -static const GLUTBitmapChar ch201 = { 13, 22, -1, 0, 15, ch201data }; - -static const unsigned char ch202data[] = { - 0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, - 0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, - 0xff,0xf0,0x0,0x0,0x10,0x20,0xc,0xc0,0x7,0x80,0x3,0x0 -}; -static const GLUTBitmapChar ch202 = { 13, 22, -1, 0, 15, ch202data }; - -static const unsigned char ch203data[] = { - 0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, - 0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, - 0xff,0xf0,0x0,0x0,0x0,0x0,0x19,0x80,0x19,0x80 -}; -static const GLUTBitmapChar ch203 = { 13, 21, -1, 0, 15, ch203data }; - -static const unsigned char ch204data[] = { - 0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, - 0xfc,0x0,0x8,0x30,0xe0,0xc0 -}; -static const GLUTBitmapChar ch204 = { 6, 22, -1, 0, 8, ch204data }; - -static const unsigned char ch205data[] = { - 0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, - 0xfc,0x0,0x40,0x30,0x1c,0xc -}; -static const GLUTBitmapChar ch205 = { 6, 22, -1, 0, 8, ch205data }; - -static const unsigned char ch206data[] = { - 0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x7e,0x0,0x81,0x66,0x3c,0x18 -}; -static const GLUTBitmapChar ch206 = { 8, 22, -1, 0, 8, ch206data }; - -static const unsigned char ch207data[] = { - 0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, - 0xfc,0x0,0x0,0xcc,0xcc -}; -static const GLUTBitmapChar ch207 = { 6, 21, -1, 0, 8, ch207data }; - -static const unsigned char ch208data[] = { - 0x7f,0xe0,0x18,0x38,0x18,0x1c,0x18,0x6,0x18,0x6,0x18,0x3,0x18,0x3,0x18,0x3, - 0xff,0x3,0x18,0x3,0x18,0x3,0x18,0x3,0x18,0x6,0x18,0x6,0x18,0x1c,0x18,0x38, - 0x7f,0xe0 -}; -static const GLUTBitmapChar ch208 = { 16, 17, 0, 0, 17, ch208data }; - -static const unsigned char ch209data[] = { - 0xf8,0xc,0x20,0x1c,0x20,0x1c,0x20,0x34,0x20,0x64,0x20,0x64,0x20,0xc4,0x21,0x84, - 0x21,0x84,0x23,0x4,0x26,0x4,0x26,0x4,0x2c,0x4,0x38,0x4,0x38,0x4,0x30,0x4, - 0xf0,0x1f,0x0,0x0,0x0,0x0,0x4,0xe0,0x3,0x90 -}; -static const GLUTBitmapChar ch209 = { 16, 21, -1, 0, 18, ch209data }; - -static const unsigned char ch210data[] = { - 0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, - 0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, - 0x7,0xe0,0x0,0x0,0x0,0x40,0x1,0x80,0x7,0x0,0x6,0x0 -}; -static const GLUTBitmapChar ch210 = { 16, 22, -1, 0, 18, ch210data }; - -static const unsigned char ch211data[] = { - 0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, - 0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, - 0x7,0xe0,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30 -}; -static const GLUTBitmapChar ch211 = { 16, 22, -1, 0, 18, ch211data }; - -static const unsigned char ch212data[] = { - 0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, - 0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, - 0x7,0xe0,0x0,0x0,0x8,0x10,0x6,0x60,0x3,0xc0,0x1,0x80 -}; -static const GLUTBitmapChar ch212 = { 16, 22, -1, 0, 18, ch212data }; - -static const unsigned char ch213data[] = { - 0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, - 0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, - 0x7,0xe0,0x0,0x0,0x0,0x0,0x4,0xe0,0x3,0x90 -}; -static const GLUTBitmapChar ch213 = { 16, 21, -1, 0, 18, ch213data }; - -static const unsigned char ch214data[] = { - 0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, - 0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, - 0x7,0xe0,0x0,0x0,0x0,0x0,0x6,0x60,0x6,0x60 -}; -static const GLUTBitmapChar ch214 = { 16, 21, -1, 0, 18, ch214data }; - -static const unsigned char ch215data[] = { - 0x80,0x40,0xc0,0xc0,0x61,0x80,0x33,0x0,0x1e,0x0,0xc,0x0,0x1e,0x0,0x33,0x0, - 0x61,0x80,0xc0,0xc0,0x80,0x40 -}; -static const GLUTBitmapChar ch215 = { 10, 11, -2, -1, 14, ch215data }; - -static const unsigned char ch216data[] = { - 0x20,0x0,0x27,0xe0,0x1c,0x38,0x38,0x1c,0x68,0x6,0x64,0x6,0xc2,0x3,0xc2,0x3, - 0xc1,0x3,0xc1,0x3,0xc0,0x83,0xc0,0x83,0xc0,0x43,0x60,0x46,0x60,0x26,0x38,0x1c, - 0x1c,0x38,0x7,0xe4,0x0,0x4 -}; -static const GLUTBitmapChar ch216 = { 16, 19, -1, 1, 18, ch216data }; - -static const unsigned char ch217data[] = { - 0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, - 0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, - 0xfc,0x1f,0x0,0x0,0x0,0x40,0x1,0x80,0x7,0x0,0x6,0x0 -}; -static const GLUTBitmapChar ch217 = { 16, 22, -1, 0, 18, ch217data }; - -static const unsigned char ch218data[] = { - 0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, - 0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, - 0xfc,0x1f,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30 -}; -static const GLUTBitmapChar ch218 = { 16, 22, -1, 0, 18, ch218data }; - -static const unsigned char ch219data[] = { - 0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, - 0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, - 0xfc,0x1f,0x0,0x0,0x8,0x10,0x6,0x60,0x3,0xc0,0x1,0x80 -}; -static const GLUTBitmapChar ch219 = { 16, 22, -1, 0, 18, ch219data }; - -static const unsigned char ch220data[] = { - 0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, - 0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, - 0xfc,0x1f,0x0,0x0,0x0,0x0,0x6,0x30,0x6,0x30 -}; -static const GLUTBitmapChar ch220 = { 16, 21, -1, 0, 18, ch220data }; - -static const unsigned char ch221data[] = { - 0x7,0xe0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0xc0, - 0x3,0x40,0x6,0x60,0x6,0x20,0xc,0x30,0x1c,0x10,0x18,0x18,0x38,0x8,0x30,0xc, - 0xfc,0x3f,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30 -}; -static const GLUTBitmapChar ch221 = { 16, 22, 0, 0, 16, ch221data }; - -static const unsigned char ch222data[] = { - 0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x18, - 0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70,0x3f,0xc0,0x30,0x0,0x30,0x0,0x30,0x0, - 0xfc,0x0 -}; -static const GLUTBitmapChar ch222 = { 13, 17, -1, 0, 15, ch222data }; - -static const unsigned char ch223data[] = { - 0xe7,0x0,0x6c,0x80,0x6c,0xc0,0x60,0xc0,0x60,0xc0,0x61,0xc0,0x61,0x80,0x63,0x80, - 0x67,0x0,0x6c,0x0,0x63,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0, - 0x1e,0x0 -}; -static const GLUTBitmapChar ch223 = { 10, 17, -1, 0, 12, ch223data }; - -static const unsigned char ch224data[] = { - 0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, - 0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x4,0x0,0x18,0x0,0x70,0x0, - 0x60,0x0 -}; -static const GLUTBitmapChar ch224 = { 9, 17, -1, 0, 11, ch224data }; - -static const unsigned char ch225data[] = { - 0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, - 0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x10,0x0,0xc,0x0,0x7,0x0, - 0x3,0x0 -}; -static const GLUTBitmapChar ch225 = { 9, 17, -1, 0, 11, ch225data }; - -static const unsigned char ch226data[] = { - 0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, - 0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x42,0x0,0x24,0x0,0x3c,0x0, - 0x18,0x0 -}; -static const GLUTBitmapChar ch226 = { 9, 17, -1, 0, 11, ch226data }; - -static const unsigned char ch227data[] = { - 0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, - 0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x5c,0x0,0x3a,0x0 -}; -static const GLUTBitmapChar ch227 = { 9, 16, -1, 0, 11, ch227data }; - -static const unsigned char ch228data[] = { - 0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, - 0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x66,0x0,0x66,0x0 -}; -static const GLUTBitmapChar ch228 = { 9, 16, -1, 0, 11, ch228data }; - -static const unsigned char ch229data[] = { - 0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, - 0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x1c,0x0,0x22,0x0,0x22,0x0, - 0x1c,0x0 -}; -static const GLUTBitmapChar ch229 = { 9, 17, -1, 0, 11, ch229data }; - -static const unsigned char ch230data[] = { - 0x70,0xf0,0xfb,0xf8,0xc7,0x84,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0xfc, - 0x3,0xc,0x63,0xc,0x67,0x98,0x3c,0xf0 -}; -static const GLUTBitmapChar ch230 = { 14, 12, -1, 0, 16, ch230data }; - -static const unsigned char ch231data[] = { - 0x3c,0x0,0x66,0x0,0x6,0x0,0x1e,0x0,0x18,0x0,0x8,0x0,0x1e,0x0,0x7f,0x0, - 0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x41,0x80, - 0x63,0x80,0x1f,0x0 -}; -static const GLUTBitmapChar ch231 = { 9, 18, -1, 6, 11, ch231data }; - -static const unsigned char ch232data[] = { - 0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, - 0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x4,0x0,0x18,0x0,0x70,0x0, - 0x60,0x0 -}; -static const GLUTBitmapChar ch232 = { 9, 17, -1, 0, 11, ch232data }; - -static const unsigned char ch233data[] = { - 0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, - 0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x10,0x0,0xc,0x0,0x7,0x0, - 0x3,0x0 -}; -static const GLUTBitmapChar ch233 = { 9, 17, -1, 0, 11, ch233data }; - -static const unsigned char ch234data[] = { - 0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, - 0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0, - 0xc,0x0 -}; -static const GLUTBitmapChar ch234 = { 9, 17, -1, 0, 11, ch234data }; - -static const unsigned char ch235data[] = { - 0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, - 0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0 -}; -static const GLUTBitmapChar ch235 = { 9, 16, -1, 0, 11, ch235data }; - -static const unsigned char ch236data[] = { - 0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x8,0x30,0xe0, - 0xc0 -}; -static const GLUTBitmapChar ch236 = { 5, 17, 0, 0, 6, ch236data }; - -static const unsigned char ch237data[] = { - 0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x0,0x80,0x60,0x38, - 0x18 -}; -static const GLUTBitmapChar ch237 = { 5, 17, -1, 0, 6, ch237data }; - -static const unsigned char ch238data[] = { - 0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x84,0x48,0x78, - 0x30 -}; -static const GLUTBitmapChar ch238 = { 6, 17, 0, 0, 6, ch238data }; - -static const unsigned char ch239data[] = { - 0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x0,0xcc,0xcc -}; -static const GLUTBitmapChar ch239 = { 6, 16, 0, 0, 6, ch239data }; - -static const unsigned char ch240data[] = { - 0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0x61,0x80,0x73,0x80,0x1f,0x0,0xc6,0x0,0x3c,0x0,0x1e,0x0,0x71,0x80, - 0xc0,0x0 -}; -static const GLUTBitmapChar ch240 = { 10, 17, -1, 0, 12, ch240data }; - -static const unsigned char ch241data[] = { - 0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, - 0x60,0xc0,0x71,0xc0,0x6f,0x80,0xe7,0x0,0x0,0x0,0x0,0x0,0x27,0x0,0x1c,0x80 -}; -static const GLUTBitmapChar ch241 = { 11, 16, -1, 0, 13, ch241data }; - -static const unsigned char ch242data[] = { - 0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x2,0x0,0xc,0x0,0x38,0x0, - 0x30,0x0 -}; -static const GLUTBitmapChar ch242 = { 10, 17, -1, 0, 12, ch242data }; - -static const unsigned char ch243data[] = { - 0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80, - 0x1,0x80 -}; -static const GLUTBitmapChar ch243 = { 10, 17, -1, 0, 12, ch243data }; - -static const unsigned char ch244data[] = { - 0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0, - 0xc,0x0 -}; -static const GLUTBitmapChar ch244 = { 10, 17, -1, 0, 12, ch244data }; - -static const unsigned char ch245data[] = { - 0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x0,0x0,0x27,0x0,0x1c,0x80 -}; -static const GLUTBitmapChar ch245 = { 10, 16, -1, 0, 12, ch245data }; - -static const unsigned char ch246data[] = { - 0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0 -}; -static const GLUTBitmapChar ch246 = { 10, 16, -1, 0, 12, ch246data }; - -static const unsigned char ch247data[] = { - 0x6,0x0,0x6,0x0,0x0,0x0,0x0,0x0,0xff,0xf0,0xff,0xf0,0x0,0x0,0x0,0x0, - 0x6,0x0,0x6,0x0 -}; -static const GLUTBitmapChar ch247 = { 12, 10, -1, -2, 14, ch247data }; - -static const unsigned char ch248data[] = { - 0xc0,0x0,0xde,0x0,0x73,0x80,0x71,0x80,0xd0,0xc0,0xd8,0xc0,0xc8,0xc0,0xcc,0xc0, - 0xc4,0xc0,0xc6,0xc0,0x63,0x80,0x73,0x80,0x1e,0xc0,0x0,0xc0 -}; -static const GLUTBitmapChar ch248 = { 10, 14, -1, 1, 12, ch248data }; - -static const unsigned char ch249data[] = { - 0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, - 0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x2,0x0,0xc,0x0,0x38,0x0, - 0x30,0x0 -}; -static const GLUTBitmapChar ch249 = { 11, 17, -1, 0, 13, ch249data }; - -static const unsigned char ch250data[] = { - 0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, - 0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80, - 0x1,0x80 -}; -static const GLUTBitmapChar ch250 = { 11, 17, -1, 0, 13, ch250data }; - -static const unsigned char ch251data[] = { - 0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, - 0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0, - 0xc,0x0 -}; -static const GLUTBitmapChar ch251 = { 11, 17, -1, 0, 13, ch251data }; - -static const unsigned char ch252data[] = { - 0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, - 0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0 -}; -static const GLUTBitmapChar ch252 = { 11, 16, -1, 0, 13, ch252data }; - -static const unsigned char ch253data[] = { - 0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0, - 0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0, - 0xf1,0xe0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80,0x1,0x80 -}; -static const GLUTBitmapChar ch253 = { 11, 22, 0, 5, 11, ch253data }; - -static const unsigned char ch254data[] = { - 0xf0,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x6e,0x0,0x73,0x80,0x61,0x80, - 0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x61,0x80,0x73,0x80, - 0x6e,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0xe0,0x0 -}; -static const GLUTBitmapChar ch254 = { 10, 22, -1, 5, 12, ch254data }; - -static const unsigned char ch255data[] = { - 0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0, - 0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0, - 0xf1,0xe0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0 -}; -static const GLUTBitmapChar ch255 = { 11, 21, 0, 5, 11, ch255data }; - - -static const GLUTBitmapChar *chars[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - &ch32, &ch33, &ch34, &ch35, &ch36, &ch37, &ch38, &ch39, - &ch40, &ch41, &ch42, &ch43, &ch44, &ch45, &ch46, &ch47, - &ch48, &ch49, &ch50, &ch51, &ch52, &ch53, &ch54, &ch55, - &ch56, &ch57, &ch58, &ch59, &ch60, &ch61, &ch62, &ch63, - &ch64, &ch65, &ch66, &ch67, &ch68, &ch69, &ch70, &ch71, - &ch72, &ch73, &ch74, &ch75, &ch76, &ch77, &ch78, &ch79, - &ch80, &ch81, &ch82, &ch83, &ch84, &ch85, &ch86, &ch87, - &ch88, &ch89, &ch90, &ch91, &ch92, &ch93, &ch94, &ch95, - &ch96, &ch97, &ch98, &ch99, &ch100, &ch101, &ch102, &ch103, - &ch104, &ch105, &ch106, &ch107, &ch108, &ch109, &ch110, &ch111, - &ch112, &ch113, &ch114, &ch115, &ch116, &ch117, &ch118, &ch119, - &ch120, &ch121, &ch122, &ch123, &ch124, &ch125, &ch126, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - &ch160, &ch161, &ch162, &ch163, &ch164, &ch165, &ch166, &ch167, - &ch168, &ch169, &ch170, &ch171, &ch172, &ch173, &ch174, &ch175, - &ch176, &ch177, &ch178, &ch179, &ch180, &ch181, &ch182, &ch183, - &ch184, &ch185, &ch186, &ch187, &ch188, &ch189, &ch190, &ch191, - &ch192, &ch193, &ch194, &ch195, &ch196, &ch197, &ch198, &ch199, - &ch200, &ch201, &ch202, &ch203, &ch204, &ch205, &ch206, &ch207, - &ch208, &ch209, &ch210, &ch211, &ch212, &ch213, &ch214, &ch215, - &ch216, &ch217, &ch218, &ch219, &ch220, &ch221, &ch222, &ch223, - &ch224, &ch225, &ch226, &ch227, &ch228, &ch229, &ch230, &ch231, - &ch232, &ch233, &ch234, &ch235, &ch236, &ch237, &ch238, &ch239, - &ch240, &ch241, &ch242, &ch243, &ch244, &ch245, &ch246, &ch247, - &ch248, &ch249, &ch250, &ch251, &ch252, &ch253, &ch254, &ch255 -}; - -const GLUTBitmapFont glutBitmapTimesRoman24 = { - "-Adobe-Times-Medium-R-Normal--24-240-75-75-P-124-ISO8859-1", - 28, 256, chars -}; diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/util.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/util.c deleted file mode 100644 index df126443d3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/util.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * DOS/DJGPP Mesa Utility Toolkit - * Version: 1.0 - * - * Copyright (C) 2005 Daniel Borca All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * DANIEL BORCA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "internal.h" - - -extern GLUTStrokeFont glutStrokeRoman, glutStrokeMonoRoman; -extern GLUTBitmapFont glutBitmap8By13, glutBitmap9By15, glutBitmapTimesRoman10, glutBitmapTimesRoman24, glutBitmapHelvetica10, glutBitmapHelvetica12, glutBitmapHelvetica18; - -/* To get around the fact that DJGPP DXEs only allow functions - to be exported and no data addresses (as Unix DSOs support), the - GLUT API constants such as GLUT_STROKE_ROMAN have to get passed - through a case statement to get mapped to the actual data structure - address. */ -void * -_glut_font (void *font) -{ - switch ((int)font) { - case (int)GLUT_STROKE_ROMAN: - return &glutStrokeRoman; - case (int)GLUT_STROKE_MONO_ROMAN: - return &glutStrokeMonoRoman; - case (int)GLUT_BITMAP_9_BY_15: - return &glutBitmap9By15; - case (int)GLUT_BITMAP_8_BY_13: - return &glutBitmap8By13; - case (int)GLUT_BITMAP_TIMES_ROMAN_10: - return &glutBitmapTimesRoman10; - case (int)GLUT_BITMAP_TIMES_ROMAN_24: - return &glutBitmapTimesRoman24; - case (int)GLUT_BITMAP_HELVETICA_10: - return &glutBitmapHelvetica10; - case (int)GLUT_BITMAP_HELVETICA_12: - return &glutBitmapHelvetica12; - case (int)GLUT_BITMAP_HELVETICA_18: - return &glutBitmapHelvetica18; - default: - if ((font == &glutStrokeRoman) || - (font == &glutStrokeMonoRoman) || - (font == &glutBitmap9By15) || - (font == &glutBitmap8By13) || - (font == &glutBitmapTimesRoman10) || - (font == &glutBitmapTimesRoman24) || - (font == &glutBitmapHelvetica10) || - (font == &glutBitmapHelvetica12) || - (font == &glutBitmapHelvetica18)) { - return font; - } - _glut_fatal("bad font!"); - return NULL; - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/window.c b/nx-X11/extras/Mesa_6.4.2/src/glut/dos/window.c deleted file mode 100644 index b922746a9e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/dos/window.c +++ /dev/null @@ -1,325 +0,0 @@ -/* - * DOS/DJGPP Mesa Utility Toolkit - * Version: 1.0 - * - * Copyright (C) 2005 Daniel Borca All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * DANIEL BORCA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include - -#include "internal.h" - - -static GLuint swaptime, swapcount; - -static DMesaVisual visual = NULL; - -GLUTwindow *_glut_current, *_glut_windows[MAX_WINDOWS]; - - -static void -clean (void) -{ - int i; - - for (i=1; i<=MAX_WINDOWS; i++) { - glutDestroyWindow(i); - } - if (visual) DMesaDestroyVisual(visual); - - pc_close_stdout(); - pc_close_stderr(); -} - - -static GLUTwindow * -_glut_window (int win) -{ - if (win > 0 && --win < MAX_WINDOWS) { - return _glut_windows[win]; - } - return NULL; -} - - -int APIENTRY -glutCreateWindow (const char *title) -{ - int i; - int m8width = (_glut_default.width + 7) & ~7; - - /* We set the Visual once. This will be our desktop (graphic mode). - * We should do this in the `glutInit' code, but we don't have any idea - * about its geometry. Supposedly, when we are about to create one - * window, we have a slight idea about resolution. - */ - if (!visual) { - if ((visual=DMesaCreateVisual(_glut_default.x + m8width, _glut_default.y + _glut_default.height, _glut_visual.bpp, _glut_visual.refresh, - _glut_default.mode & GLUT_DOUBLE, - !(_glut_default.mode & GLUT_INDEX), - (_glut_default.mode & GLUT_ALPHA ) ? _glut_visual.alpha : 0, - (_glut_default.mode & GLUT_DEPTH ) ? _glut_visual.depth : 0, - (_glut_default.mode & GLUT_STENCIL) ? _glut_visual.stencil : 0, - (_glut_default.mode & GLUT_ACCUM ) ? _glut_visual.accum : 0))==NULL) { - return 0; - } - - DMesaGetIntegerv(DMESA_GET_SCREEN_SIZE, _glut_visual.geometry); - DMesaGetIntegerv(DMESA_GET_DRIVER_CAPS, &_glut_visual.flags); - - /* Also hook stdio/stderr once */ - pc_open_stdout(); - pc_open_stderr(); - pc_atexit(clean); - } - - /* Search for an empty slot. - * Each window has its own rendering Context and its own Buffer. - */ - for (i=0; inum = ++i; - w->xpos = _glut_default.x; - w->ypos = _glut_default.y; - w->width = m8width; - w->height = _glut_default.height; - w->context = c; - w->buffer = b; - - return i; - } - } - - return 0; -} - - -int APIENTRY -glutCreateSubWindow (int win, int x, int y, int width, int height) -{ - return GL_FALSE; -} - - -void APIENTRY -glutDestroyWindow (int win) -{ - GLUTwindow *w = _glut_window(win); - if (w != NULL) { - if (w->destroy) { - w->destroy(); - } - DMesaMakeCurrent(NULL, NULL); - DMesaDestroyBuffer(w->buffer); - DMesaDestroyContext(w->context); - free(w); - _glut_windows[win - 1] = NULL; - } -} - - -void APIENTRY -glutPostRedisplay (void) -{ - _glut_current->redisplay = GL_TRUE; -} - - -void APIENTRY -glutSwapBuffers (void) -{ - if (_glut_current->show_mouse) { - /* XXX scare mouse */ - DMesaSwapBuffers(_glut_current->buffer); - /* XXX unscare mouse */ - } else { - DMesaSwapBuffers(_glut_current->buffer); - } - - if (_glut_fps) { - GLint t = glutGet(GLUT_ELAPSED_TIME); - swapcount++; - if (swaptime == 0) - swaptime = t; - else if (t - swaptime > _glut_fps) { - double time = 0.001 * (t - swaptime); - double fps = (double)swapcount / time; - fprintf(stderr, "GLUT: %d frames in %.2f seconds = %.2f FPS\n", swapcount, time, fps); - swaptime = t; - swapcount = 0; - } - } -} - - -int APIENTRY -glutGetWindow (void) -{ - return _glut_current->num; -} - - -void APIENTRY -glutSetWindow (int win) -{ - GLUTwindow *w = _glut_window(win); - if (w != NULL) { - _glut_current = w; - DMesaMakeCurrent(_glut_current->context, _glut_current->buffer); - } -} - - -void APIENTRY -glutSetWindowTitle (const char *title) -{ -} - - -void APIENTRY -glutSetIconTitle (const char *title) -{ -} - - -void APIENTRY -glutPositionWindow (int x, int y) -{ - if (DMesaMoveBuffer(x, y)) { - _glut_current->xpos = x; - _glut_current->ypos = y; - } -} - - -void APIENTRY -glutReshapeWindow (int width, int height) -{ - if (DMesaResizeBuffer(width, height)) { - _glut_current->width = width; - _glut_current->height = height; - if (_glut_current->reshape) { - _glut_current->reshape(width, height); - } else { - glViewport(0, 0, width, height); - } - } -} - - -void APIENTRY -glutFullScreen (void) -{ -} - - -void APIENTRY -glutPopWindow (void) -{ -} - - -void APIENTRY -glutPushWindow (void) -{ -} - - -void APIENTRY -glutIconifyWindow (void) -{ -} - - -void APIENTRY -glutShowWindow (void) -{ -} - - -void APIENTRY -glutHideWindow (void) -{ -} - - -void APIENTRY -glutCloseFunc (GLUTdestroyCB destroy) -{ - _glut_current->destroy = destroy; -} - - -void APIENTRY -glutPostWindowRedisplay (int win) -{ - GLUTwindow *w = _glut_window(win); - if (w != NULL) { - w->redisplay = GL_TRUE; - } -} - - -void * APIENTRY -glutGetWindowData (void) -{ - return _glut_current->data; -} - - -void APIENTRY -glutSetWindowData (void *data) -{ - _glut_current->data = data; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/ggi/Makefile b/nx-X11/extras/Mesa_6.4.2/src/glut/ggi/Makefile deleted file mode 100644 index 61cfceeb25..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/ggi/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# Makefile for GLUT for ggi - -TOP = ../../.. - -include $(TOP)/configs/current - - -##### MACROS ##### - -GLUT_MAJOR = 3 -GLUT_MINOR = 7 -GLUT_TINY = 1 - -SOURCES = \ - ggiglut.c - - -OBJECTS = $(SOURCES:.c=.o) - - -##### RULES ##### - -.c.o: - $(CC) -c -I$(TOP)/include $(CFLAGS) $(GLUT_CFLAGS) $< - - - -##### TARGETS ##### - -default: $(LIB_DIR)/$(GLUT_LIB_NAME) - - -# Make the library -$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS) - $(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \ - -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \ - -patch $(GLUT_TINY) $(MKLIB_OPTIONS) -install $(LIB_DIR) \ - $(GLUT_LIB_DEPS) $(OBJECTS) - - -clean: - -rm -f *.o *~ - -rm -f *.lo - -rm -f *.la - -rm -rf .libs - - -depend: $(SOURCES) - touch depend - $(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(SOURCES) - -include depend diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/ggi/debug.h b/nx-X11/extras/Mesa_6.4.2/src/glut/ggi/debug.h deleted file mode 100644 index da329a1d9b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/ggi/debug.h +++ /dev/null @@ -1,259 +0,0 @@ -/* $Id: debug.h,v 1.1 2000/11/19 07:41:26 jtaylor Exp $ -****************************************************************************** - - GGIMesa debugging macros - - Copyright (C) 1998-1999 Marcus Sundberg [marcus@ggi-project.org] - Copyright (C) 1999-2000 Jon Taylor [taylorj@ggi-project.org] - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -****************************************************************************** -*/ - -#ifndef _GGI_GLUT_INTERNAL_DEBUG_H -#define _GGI_GLUT_INTERNAL_DEBUG_H - -#define DEBUG - -#include -#include -#include -#include - - -__BEGIN_DECLS - -/* Exported variables */ -#ifdef BUILDING_GGIGLUT -extern uint32 _ggiglutDebugState; -extern int _ggiglutDebugSync; -#else -IMPORTVAR uint32 _ggiglutDebugState; -IMPORTVAR int _ggiglutDebugSync; -#endif - -__END_DECLS - - -/* Debugging types - * bit 0 is reserved! */ - -#define GGIGLUTDEBUG_CORE (1<<1) /* 2 */ -#define GGIGLUTDEBUG_MODE (1<<2) /* 4 */ -#define GGIGLUTDEBUG_COLOR (1<<3) /* 8 */ -#define GGIGLUTDEBUG_DRAW (1<<4) /* 16 */ -#define GGIGLUTDEBUG_MISC (1<<5) /* 32 */ -#define GGIGLUTDEBUG_LIBS (1<<6) /* 64 */ -#define GGIGLUTDEBUG_EVENTS (1<<7) /* 128 */ - -#define GGIGLUTDEBUG_ALL 0xffffffff - -#ifdef __GNUC__ - -#ifdef DEBUG -#define GGIGLUTDPRINT(form,args...) if (_ggiglutDebugState) { ggDPrintf(_ggiglutDebugSync, "GGIGLUT",form, ##args); } -#define GGIGLUTDPRINT_CORE(form,args...) if (_ggiglutDebugState & GGIGLUTDEBUG_CORE) { ggDPrintf(_ggiglutDebugSync,"GGIGLUT",form, ##args); } -#define GGIGLUTDPRINT_MODE(form,args...) if (_ggiglutDebugState & GGIGLUTDEBUG_MODE) { ggDPrintf(_ggiglutDebugSync,"GGIGLUT",form, ##args); } -#define GGIGLUTDPRINT_COLOR(form,args...) if (_ggiglutDebugState & GGIGLUTDEBUG_COLOR) { ggDPrintf(_ggiglutDebugSync,"GGIGLUT",form, ##args); } -#define GGIGLUTDPRINT_DRAW(form,args...) if (_ggiglutDebugState & GGIGLUTDEBUG_DRAW) { ggDPrintf(_ggiglutDebugSync,"GGIGLUT",form, ##args); } -#define GGIGLUTDPRINT_MISC(form,args...) if (_ggiglutDebugState & GGIGLUTDEBUG_MISC) { ggDPrintf(_ggiglutDebugSync,"GGIGLUT",form, ##args); } -#define GGIGLUTDPRINT_LIBS(form,args...) if (_ggiglutDebugState & GGIGLUTDEBUG_LIBS) { ggDPrintf(_ggiglutDebugSync,"GGIGLUT",form, ##args); } -#define GGIGLUTDPRINT_EVENTS(form,args...) if (_ggiglutDebugState & GGIGLUTDEBUG_EVENTS) { ggDPrintf(_ggiglutDebugSync,"GGIGLUT",form, ##args); } -#else /* DEBUG */ -#define GGIGLUTDPRINT(form,args...) do{}while(0) -#define GGIGLUTDPRINT_CORE(form,args...) do{}while(0) -#define GGIGLUTDPRINT_MODE(form,args...) do{}while(0) -#define GGIGLUTDPRINT_COLOR(form,args...) do{}while(0) -#define GGIGLUTDPRINT_DRAW(form,args...) do{}while(0) -#define GGIGLUTDPRINT_MISC(form,args...) do{}while(0) -#define GGIGLUTDPRINT_LIBS(form,args...) do{}while(0) -#define GGIGLUTDPRINT_EVENTS(form,args...) do{}while(0) -#endif /* DEBUG */ - -#else /* __GNUC__ */ - -__BEGIN_DECLS - -static inline void GGIGLUTDPRINT(const char *form,...) -{ -#ifdef DEBUG - if (_ggiDebugState) { - va_list args; - - fprintf(stderr, "GGIGLUT: "); - va_start(args, form); - vfprintf(stderr, form, args); - va_end(args); - if (_ggiglutDebugSync) fflush(stderr); - } -#endif -} - -static inline void GGIGLUTDPRINT_CORE(const char *form,...) -{ -#ifdef DEBUG - if (_ggiDebugState & GGIDEBUG_CORE) { - va_list args; - - fprintf(stderr, "GGIGLUT: "); - va_start(args, form); - vfprintf(stderr, form, args); - va_end(args); - if (_ggiglutDebugSync) fflush(stderr); - } -#endif -} - -static inline void GGIGLUTDPRINT_MODE(const char *form,...) -{ -#ifdef DEBUG - if (_ggiDebugState & GGIDEBUG_MODE) { - va_list args; - - fprintf(stderr, "GGIGLUT: "); - va_start(args, form); - vfprintf(stderr, form, args); - va_end(args); - if (_ggiglutDebugSync) fflush(stderr); - } -#endif -} - -static inline void GGIGLUTDPRINT_COLOR(const char *form,...) -{ -#ifdef DEBUG - if (_ggiDebugState & GGIDEBUG_COLOR) { - va_list args; - - fprintf(stderr, "GGIGLUT: "); - va_start(args, form); - vfprintf(stderr, form, args); - va_end(args); - if (_ggiglutDebugSync) fflush(stderr); - } -#endif -} - -static inline void GGIGLUTDPRINT_DRAW(const char *form,...) -{ -#ifdef DEBUG - if (_ggiDebugState & GGIDEBUG_DRAW) { - va_list args; - - fprintf(stderr, "GGIGLUT: "); - va_start(args, form); - vfprintf(stderr, form, args); - va_end(args); - if (_ggiglutDebugSync) fflush(stderr); - } -#endif -} - -static inline void GGIGLUTDPRINT_MISC(const char *form,...) -{ -#ifdef DEBUG - if (_ggiDebugState & GGIDEBUG_MISC) { - va_list args; - - fprintf(stderr, "GGIGLUT: "); - va_start(args, form); - vfprintf(stderr, form, args); - va_end(args); - if (_ggiglutDebugSync) fflush(stderr); - } -#endif -} - -static inline void GGIGLUTDPRINT_LIBS(const char *form,...) -{ -#ifdef DEBUG - if (_ggiDebugState & GGIDEBUG_LIBS) { - va_list args; - - fprintf(stderr, "GGIGLUT: "); - va_start(args, form); - vfprintf(stderr, form, args); - va_end(args); - if (_ggiglutDebugSync) fflush(stderr); - } -#endif -} - -static inline void GGIGLUTDPRINT_EVENTS(const char *form,...) -{ -#ifdef DEBUG - if (_ggiDebugState & GGIDEBUG_EVENTS) { - va_list args; - - fprintf(stderr, "GGIGLUT: "); - va_start(args, form); - vfprintf(stderr, form, args); - va_end(args); - if (_ggiglutDebugSync) fflush(stderr); - } -#endif -} - -__END_DECLS - -#endif /* __GNUC__ */ - -#ifdef DEBUG -#define GGIGLUT_ASSERT(x,str) \ -{ if (!(x)) { \ - fprintf(stderr,"GGIGLUT:%s:%d: INTERNAL ERROR: %s\n",__FILE__,__LINE__,str); \ - exit(1); \ -} } -#define GGIGLUT_APPASSERT(x,str) \ -{ if (!(x)) { \ - fprintf(stderr,"GGIGLUT:%s:%d: APPLICATION ERROR: %s\n",__FILE__,__LINE__,str); \ - exit(1); \ -} } -#else /* DEBUG */ -#define GGIGLUT_ASSERT(x,str) do{}while(0) -#define GGIGLUT_APPASSERT(x,str) do{}while(0) -#endif /* DEBUG */ - -#ifdef DEBUG -# define GGIGLUTD0(x) x -#else -# define GGIGLUTD0(x) /* empty */ -#endif - -#ifdef GGIGLUTDLEV -# if GGIGLUTDLEV == 1 -# define GGIGLUTD1(x) x -# define GGIGLUTD2(x) /* empty */ -# define GGIGLUTD3(x) /* empty */ -# elif GGIGLUTDLEV == 2 -# define GGIGLUTD1(x) x -# define GGIGLUTD2(x) x -# define GGIGLUTD3(x) /* empty */ -# elif GGIGLUTDLEV > 2 -# define GGIGLUTD1(x) x -# define GGIGLUTD2(x) x -# define GGIGLUTD3(x) x -# endif -#else -# define GGIGLUTD1(x) /* empty */ -# define GGIGLUTD2(x) /* empty */ -# define GGIGLUTD3(x) /* empty */ -#endif - -#endif /* _GGI_MESA_INTERNAL_DEBUG_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/ggi/ggiglut.c b/nx-X11/extras/Mesa_6.4.2/src/glut/ggi/ggiglut.c deleted file mode 100644 index 2fe65a154c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/ggi/ggiglut.c +++ /dev/null @@ -1,959 +0,0 @@ -/* ************************************************************************** - * ggiglut.c - * ************************************************************************** - * - * Copyright (C) 1998 Uwe Maurer - uwe_maurer@t-online.de - * Copyright (C) 1999 James Simmons - * Copyright (C) 1999 Jon Taylor - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * ************************************************************************** - * To-do: - * - Make everything use the portable ggi_* types - * - */ - -#define BUILDING_GGIGLUT - -#define WIDTH 640 -#define HEIGHT 480 -#define GRAPHTYPE_RGB GT_16BIT -#define GRAPHTYPE_INDEX GT_8BIT - -/*************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include "GL/ggimesa.h" -#include "debug.h" - -#include -#include - -int _ggiglutDebugSync = 0; -uint32 _ggiglutDebugState = 0; - -char *__glutProgramName = "GGI"; - -static ggi_visual_t __glut_vis; - -static ggi_mesa_context_t __glut_ctx; - -//static int __glut_width = WIDTH; -//static int __glut_height = HEIGHT; -//static ggi_graphtype __glut_gt_rgb = GRAPHTYPE_RGB; -//static ggi_graphtype __glut_gt_index = GRAPHTYPE_INDEX; -static int __glut_width = GGI_AUTO; -static int __glut_height = GGI_AUTO; -static ggi_graphtype __glut_gt_rgb = GT_AUTO; -static ggi_graphtype __glut_gt_index = GT_8BIT; -static int __glut_init = GL_FALSE; - -static int mousex = WIDTH / 2; -static int mousey = HEIGHT / 2; -static int mouse_moved = GL_FALSE; -static int mouse_down = GL_FALSE; -static int mouse_showcursor = GL_FALSE; - -static void (*__glut_reshape)(int, int); -static void (*__glut_display)(void); -static void (*__glut_idle)(void); -static void (*__glut_keyboard)(unsigned char, int, int); -static void (*__glut_special)(int, int, int); -static void (*__glut_mouse)(int, int, int, int); -static void (*__glut_motion)(int, int); -static void (*__glut_passive_motion)(int, int); -static void (*__glut_visibility)(int); - -static unsigned int __glut_mode = GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH; - -static int __glut_mod_keys = 0; - -static int __glut_redisplay = GL_FALSE; - -/* Menu */ -static int __glut_menubutton = -1; -static int __glut_menuactive = GL_FALSE; - -#define MAX_ENTRIES 64 - -typedef struct menu_s -{ - char *label[MAX_ENTRIES]; - int value[MAX_ENTRIES]; - struct menu_s * submenu[MAX_ENTRIES]; - void (*func)(int); - int max_strlen; - int num_entries; -} menu_t; - -static menu_t *mainmenu; -static menu_t *curmenu; -static menu_t *activemenu; - -void glutInit(int *argc, char **argv) -{ - ggi_graphtype gt; - int i, k; - char *str; - - GGIGLUTDPRINT_CORE("glutInit() called\n"); - - #define REMOVE {for (k=i;k<*argc-1;k++) argv[k]=argv[k+1]; \ - (*argc)--; i--; } - - if (__glut_init) return; - - str = getenv("GGIGLUT_DEBUG"); - if (str != NULL) { - _ggiglutDebugState = atoi(str); - fprintf(stderr, "Debugging=%d\n", _ggiglutDebugState); - GGIGLUTDPRINT_CORE("Debugging=%d\n", _ggiglutDebugState); - } - - str = getenv("GGIGLUT_DEBUGSYNC"); - if (str != NULL) { - _ggiglutDebugSync = 1; - } - - if (argc && argv) - { - - for (i = 1; i < *argc; i++) - { - if (strcmp(argv[i], "-mouse") == 0) - { - mouse_showcursor = GL_TRUE; - REMOVE; - } - else - if (strcmp(argv[i], "-bpp") == 0 && (i + 1) < (*argc)) - { - switch(atoi(argv[i + 1])) - { - case 4: gt = GT_4BIT; break; - case 8: gt = GT_8BIT; break; - case 15: gt = GT_15BIT; break; - case 16: gt = GT_16BIT; break; - case 24: gt = GT_24BIT; break; - case 32: gt = GT_32BIT; break; - default: - ggiPanic("\"%s\" bits per pixel?\n", argv[i+1]); - } - __glut_gt_rgb = __glut_gt_index = gt; - REMOVE; - REMOVE; - } - else - if (strcmp(argv[i], "-size") == 0 && (i + 2) < (*argc)) - { - __glut_width = atoi(argv[i + 1]); - __glut_height = atoi(argv[i + 2]); - REMOVE; - REMOVE; - REMOVE; - } - } - } - - if (ggiInit() < 0) - { - ggiPanic("ggiInit() failed!\n"); - } - __glut_init = GL_TRUE; - -#undef REMOVE -} - -void glutInitWindowPosition(int x, int y) -{ - GGIGLUTDPRINT_CORE("glutInitWindowPosition() called\n"); -} - -void glutInitWindowSize(int x, int y) -{ - GGIGLUTDPRINT_CORE("glutInitWindowsSize() called\n"); -} - -void glutFullScreen(void) -{ - GGIGLUTDPRINT_CORE("glutFullScreen() called\n"); -} - -void glutInitDisplayMode(unsigned int mode) -{ - GGIGLUTDPRINT_CORE("glutInitDisplayMode() called\n"); - - __glut_mode = mode; -} - -void glutInitDisplayString(const char *string) -{ - GGIGLUTDPRINT_CORE("glutInitDisplayString(%s) called\n", string); -} - -int glutCreateWindow(const char *title) -{ - ggi_graphtype gt; - ggi_mode mode = - { - 1, - { GGI_AUTO, GGI_AUTO }, - { GGI_AUTO, GGI_AUTO }, - { 0, 0 }, - GT_AUTO, - { GGI_AUTO, GGI_AUTO } - }; - int frames; - int rgb; - int err; - - GGIGLUTDPRINT_CORE("glutCreateWindow() called\n"); - - if (!__glut_init) - glutInit(NULL, NULL); - - GGIGLUTDPRINT("GGIGLUT: %s\n", title); - - rgb = !(__glut_mode & GLUT_INDEX); - frames = (__glut_mode & GLUT_DOUBLE) ? 2 : 1; - - gt = (rgb) ? __glut_gt_rgb : __glut_gt_index; - - __glut_vis = ggiOpen(NULL); - if (__glut_vis == NULL) - { - ggiPanic("ggiOpen() failed!\n"); - /* return GL_FALSE; */ - } - - ggiSetFlags(__glut_vis, GGIFLAG_ASYNC); - - ggiCheckMode(__glut_vis, &mode); - - err = ggiSetMode(__glut_vis, &mode); - if (err < 0) - { - ggiPanic("Can't set graphic mode!\n"); - /* return GL_FALSE; */ - } - - if (ggiMesaExtendVisual(__glut_vis, GL_FALSE, GL_FALSE, - 16, 0, 0, 0, 0, 0, 1) < 0) - { - ggiPanic("GGIMesaSetVisual failed!\n"); - } - - __glut_ctx = ggiMesaCreateContext(__glut_vis); - - if (__glut_ctx == NULL) - ggiPanic("Can't create mesa-context\n"); - - ggiGetMode(__glut_vis, &mode); - - - __glut_width = mode.visible.x; - __glut_height = mode.visible.y; - - mousex = mode.visible.x / 2; - mousey = mode.visible.y / 2; - - ggiMesaMakeCurrent(__glut_ctx, __glut_vis); - - if (__glut_reshape) - __glut_reshape(__glut_width, __glut_height); - - return GL_TRUE; -} - -void glutReshapeFunc(void (*func)(int, int)) -{ - GGIGLUTDPRINT_CORE("glutReshapeFunc() called\n"); - - __glut_reshape = func; - if (__glut_vis && __glut_reshape) - __glut_reshape(__glut_width, __glut_height); -} - -void glutKeyboardFunc(void (*keyboard)(unsigned char key, int x, int y)) -{ - GGIGLUTDPRINT_CORE("glutKeyBoardFunc() called\n"); - - __glut_keyboard = keyboard; -} - -int glutGetModifiers(void) -{ - GGIGLUTDPRINT_CORE("glutGetModifiers() called\n"); - - return __glut_mod_keys; -} - -void glutEntryFunc(void (*func)(int state)) -{ - GGIGLUTDPRINT_CORE("glutEntryFunc() called\n"); -} - -void glutVisibilitFunc(void (*func)(int state)) -{ - GGIGLUTDPRINT_CORE("glutVisibilityFunc() called\n"); -} - -void glutTimerFunc(unsigned int millis, void (*func)(int value), int value) -{ - GGIGLUTDPRINT_CORE("glutTimerFunc() called\n"); -} - -void glutMenuStateFunc(void (*func)(int state)) -{ - GGIGLUTDPRINT_CORE("glutMenuStateFunc() called\n"); -} - -int glutGet(GLenum type) -{ - GGIGLUTDPRINT_CORE("glutGet() called\n"); - - switch(type) - { - case GLUT_WINDOW_X: - return 0; - case GLUT_WINDOW_Y: - return 0; - case GLUT_WINDOW_WIDTH: - return __glut_width; - case GLUT_WINDOW_HEIGHT: - return __glut_height; - case GLUT_MENU_NUM_ITEMS: - if (curmenu) - return curmenu->num_entries; - else - return 0; - default: - GGIGLUTDPRINT("glutGet: unknown type %i\n", type); - } - return 0; -} - -void glutSpecialFunc(void (*special)(int key, int x, int y)) -{ - GGIGLUTDPRINT_CORE("glutSpecialFunc() called\n"); - - __glut_special=special; -} - -void glutDisplayFunc(void (*disp)(void)) -{ - GGIGLUTDPRINT_CORE("glutDisplayFunc() called\n"); - __glut_display=disp; -} - -void glutSetColor(int index, GLfloat red, GLfloat green, GLfloat blue) -{ - ggi_color c; - GLfloat max; - - GGIGLUTDPRINT_CORE("glutSetColor() called\n"); - - if (red > 1.0) red = 1.0; - if (red < 0.0) red = 0.0; - if (green > 1.0) green = 1.0; - if (green < 0.0) green = 0.0; - if (blue > 1.0) blue = 1.0; - if (blue < 0.0) blue = 0.0; - - max = (float)((1 << GGI_COLOR_PRECISION) - 1); - - c.r = (int)(max * red); - c.g = (int)(max * green); - c.b = (int)(max * blue); - ggiSetPalette(__glut_vis, index, 1, &c); -} - -void glutPostRedisplay(void) -{ - GGIGLUTDPRINT_CORE("glutPostRedisplay() called\n"); - - __glut_redisplay = GL_TRUE; -} - -void glutPostWindowRedisplay(int win) -{ - GGIGLUTDPRINT_CORE("glutPostWindowRedisplay() called\n"); - - __glut_redisplay = GL_TRUE; -} - -void glutSwapBuffers(void) -{ - GGIGLUTDPRINT_CORE("glutSwapBuffers() called\n"); - - ggiMesaSwapBuffers(); -} - -void glutIdleFunc(void (*idle)(void)) -{ - GGIGLUTDPRINT_CORE("glutIdleFunc() called\n"); - - __glut_idle = idle; -} - -static void keyboard(ggi_event *ev) -{ - int sym; - int modifer = 0, key = 0; - - GGIGLUTDPRINT_CORE("keyboard() called\n"); - - sym = ev->key.sym; - - modifer = ev->key.modifiers; - if (modifer == GII_KM_SHIFT) - __glut_mod_keys |= GLUT_ACTIVE_SHIFT; - if (modifer == GII_KM_CTRL) - __glut_mod_keys |= GLUT_ACTIVE_CTRL; - if (modifer == GII_KM_ALT) - __glut_mod_keys |= GLUT_ACTIVE_ALT; - - /* if (__glut_special && key) __glut_special(GII_KTYP(key),0,0); */ - - if (__glut_keyboard) -// __glut_keyboard(GII_UNICODE(sym), 0, 0); - __glut_keyboard(sym, 0, 0); -} - -static void mouseabs(ggi_event *ev) -{ - int oldx = mousex; - int oldy = mousey; - - mousex = ev->pmove.x; - mousey = ev->pmove.y; - - if (mousex < 0) mousex = 0; - if (mousey < 0) mousey = 0; - if (mousex >= __glut_width) mousex = __glut_width - 1; - if (mousey >= __glut_height) mousey = __glut_height - 1; - - if (mousex != oldx || mousey != oldy) mouse_moved = GL_TRUE; -} - -static void mouse(ggi_event *ev) -{ - int oldx = mousex; - int oldy = mousey; - - GGIGLUTDPRINT_CORE("mouse() called\n"); - - mousex += ev->pmove.x >> 1; - mousey += ev->pmove.y >> 1; - - if (mousex < 0) mousex = 0; - if (mousey < 0) mousey = 0; - if (mousex >= __glut_width) mousex = __glut_width - 1; - if (mousey >= __glut_height) mousey = __glut_height - 1; - - if (mousex != oldx || mousey != oldy) mouse_moved = GL_TRUE; - -} - -static void showmenu(void); -static int clickmenu(void); -static void updatemouse(void); -static void drawmouse(void); - -static void mousemove(void) -{ - GGIGLUTDPRINT_CORE("mousemove() called\n"); - - if (mouse_moved) { - if (__glut_motion && mouse_down) { - __glut_motion(mousex,mousey); - } - - if (__glut_passive_motion && (!mouse_down)) { - __glut_passive_motion(mousex,mousey); - } - - if (__glut_menuactive) updatemouse(); - mouse_moved=GL_FALSE; - } -} - -static void button(ggi_event *ev) -{ - int i; - int btn[4] = { - 0, - GLUT_LEFT_BUTTON, - GLUT_RIGHT_BUTTON, - GLUT_MIDDLE_BUTTON - }; - - GGIGLUTDPRINT_CORE("button() called\n"); - - mousemove(); - - if (ev->pbutton.button <= 3) { /* GGI can have >3 buttons ! */ - char state = ev->any.type == evPtrButtonPress ? GLUT_DOWN : GLUT_UP; - if (__glut_menuactive) { - if (state == GLUT_UP && clickmenu()) { - glutPostRedisplay(); - __glut_menuactive = GL_FALSE; - } - } else - if (btn[ev->pbutton.button] == __glut_menubutton) { - __glut_menuactive = GL_TRUE; - activemenu = mainmenu; - showmenu(); - } else - if (__glut_mouse) { - __glut_mouse(btn[ev->pbutton.button], state, mousex, mousey); - } - if (state == GLUT_DOWN) { - mouse_down |= (1 << (ev->pbutton.button - 1)); - } - else mouse_down &= ~( 1 << (ev->pbutton.button - 1)); - } -} - -void glutMainLoop(void) -{ - ggi_event ev; - ggi_event_mask evmask = (emKeyPress | emKeyRepeat | emPtrMove | emPtrButton); - - GGIGLUTDPRINT_CORE("glutMainLoop() called\n"); - - ggiSetEventMask(__glut_vis, evmask); - - glutPostRedisplay(); - - if (__glut_visibility) - __glut_visibility(GLUT_VISIBLE); - - while (1) - { - if (!__glut_menuactive) - { - if (__glut_idle) - __glut_idle(); - if (__glut_redisplay && __glut_display) - { - __glut_redisplay = GL_FALSE; - __glut_display(); - } - } - - while (1) - { - struct timeval t = {0, 0}; - - if (ggiEventPoll(__glut_vis, evmask, &t) == 0) - break; - - ggiEventRead(__glut_vis, &ev, evmask); - - switch (ev.any.type) - { - case evKeyPress: - case evKeyRepeat: - keyboard(&ev); - break; - case evPtrAbsolute: - mouseabs(&ev); - break; - case evPtrRelative: - mouse(&ev); - break; - case evPtrButtonPress: - case evPtrButtonRelease: - button(&ev); - break; - } - } - mousemove(); - } -} - -static void showmenu() -{ - int y,i; - ggi_color col = { 0xffff, 0xffff, 0xffff }; - - GGIGLUTDPRINT_CORE("showmenu() called\n"); - - ggiSetGCForeground(__glut_vis,ggiMapColor(__glut_vis,&col)); - ggiSetOrigin(__glut_vis,0,0); - - for (y = i = 0; i < activemenu->num_entries; i++, y += 8) { - ggiPuts(__glut_vis, 0, y, activemenu->label[i]); - } - drawmouse(); -} - -static int clickmenu(void) -{ - int i; - int w, h; - - GGIGLUTDPRINT_CORE("clickmenu() called\n"); - - i = mousey / 8; - - if (i >= activemenu->num_entries) return GL_TRUE; - if (mousex >= 8 * strlen(activemenu->label[i])) return GL_TRUE; - - if (activemenu->submenu[i]) { - ggi_color col={0,0,0}; - ggiSetGCForeground(__glut_vis,ggiMapColor(__glut_vis,&col)); - h=activemenu->num_entries*8; - w=activemenu->max_strlen*8; - ggiDrawBox(__glut_vis,0,0,w,h); - activemenu=activemenu->submenu[i]; - showmenu(); - return GL_FALSE; - } - curmenu=activemenu; - activemenu->func(activemenu->value[i]); - return GL_TRUE; -} - -static int oldx=-1; -static int oldy=-1; -static char buffer[16*16*4]; - -static void updatemouse() -{ - GGIGLUTDPRINT_CORE("updatemouse() called\n"); - - ggiPutBox(__glut_vis,oldx,oldy,16,16,buffer); - drawmouse(); -} - -static void drawmouse() -{ - int x,y; - - GGIGLUTDPRINT_CORE("drawmouse() called\n"); - - x=mousex-8; - if (x<0) x=0; - y=mousey-8; - if (y<0) y=0; - ggiGetBox(__glut_vis,x,y,16,16,buffer); - ggiDrawLine(__glut_vis,mousex-2,mousey,mousex+2,mousey); - ggiDrawLine(__glut_vis,mousex,mousey-2,mousex,mousey+2); - oldx=x; - oldy=y; -} - -int glutCreateMenu(void(*func)(int)) -{ - menu_t *m; - - GGIGLUTDPRINT_CORE("glutCreateMenu() called\n"); - - m=malloc(sizeof(menu_t)); - memset(m,0,sizeof(menu_t)); - curmenu=m; - curmenu->func=func; - return (int)curmenu; -} - -static void addEntry(const char *label,int value,menu_t *submenu) -{ - int i=curmenu->num_entries; - - GGIGLUTDPRINT_CORE("addEntry() called\n"); - - /* printf("%i %i %s %p\n",i,value,label,submenu); */ - if (ilabel[i]=strdup(label); - curmenu->value[i]=value; - curmenu->submenu[i]=submenu; - - if (strlen(label)>curmenu->max_strlen) - curmenu->max_strlen=strlen(label); - curmenu->num_entries++; - } -} - -void glutAddMenuEntry(const char *label,int value) -{ - GGIGLUTDPRINT_CORE("glutAddMenuEntry() called\n"); - - addEntry(label,value,NULL); -} - -void glutAddSubMenu(const char *label,int submenu) -{ - char text[100]; - - GGIGLUTDPRINT_CORE("glutAddSubMenu() called\n"); - - if (!curmenu) return; - strncpy(text,label,98); - text[98]=0; - text[strlen(text)+1]=0; - text[strlen(text)]='>'; - - addEntry(text,0,(menu_t *) submenu); -} - -void glutAttachMenu(int button) -{ - GGIGLUTDPRINT_CORE("glutAttachMenu() called\n"); - - mainmenu=curmenu; - __glut_menubutton=button; -} - -void glutDetachMenu(int button) -{ - GGIGLUTDPRINT_CORE("glutDetachMenu() called\n"); -} - -void glutVisibilityFunc(void (*func)(int state)) -{ - GGIGLUTDPRINT_CORE("glutVisibilityFunc() called\n"); - - __glut_visibility=func; -} - -void glutMouseFunc(void (*mouse)(int, int, int, int)) -{ - GGIGLUTDPRINT_CORE("glutMouseFunc() called\n"); - - __glut_mouse=mouse; -} - -void glutMotionFunc(void (*motion)(int,int)) -{ - GGIGLUTDPRINT_CORE("glutMotionFunc() called\n"); - - __glut_motion=motion; -} - -void glutPassiveMotionFunc(void (*motion)(int,int)) -{ - GGIGLUTDPRINT_CORE("glutPassiveMotionFunc() called\n"); - - __glut_passive_motion=motion; -} - -void glutSetWindowTitle(const char *title) -{ - GGIGLUTDPRINT_CORE("glutSetWindowTitle() called\n"); -} - -void glutSetIconTitle(const char *title) -{ - GGIGLUTDPRINT_CORE("glutSetIconTitle() called\n"); -} - -void glutChangeToMenuEntry(int item,const char *label,int value) -{ - GGIGLUTDPRINT_CORE("glutChangeToMenuEntry() called\n"); - - if (item>0 && item<=curmenu->num_entries) { - item--; - free(curmenu->label[item]); - curmenu->label[item]=strdup(label); - curmenu->value[item]=value; - curmenu->submenu[item]=NULL; - } -} -void glutChangeToSubMenu(int item,const char *label,int submenu) -{ - GGIGLUTDPRINT_CORE("glutChengeToSubMenu() called\n"); - - if (item>0 && item<=curmenu->num_entries) { - item--; - free(curmenu->label[item]); - curmenu->label[item]=strdup(label); - curmenu->value[item]=0; - curmenu->submenu[item]=(menu_t *)submenu; - } -} - -void glutDestroyMenu(int menu) -{ - menu_t *m=(menu_t *)menu; - int i; - - GGIGLUTDPRINT_CORE("glutDestroyMenu() called\n"); - - for (i=0;inum_entries;i++) { - free(m->label[i]); - } - free(m); -} - -int glutCreateSubWindow(int win,int x,int y,int w,int h) -{ - GGIGLUTDPRINT_CORE("glutCreateSubWindow() called\n"); - - return 0; -} - -void glutDestroyWindow(int win) -{ - GGIGLUTDPRINT_CORE("glutDestroyWindow() called\n"); -} - -int glutGetWindow(void) -{ - GGIGLUTDPRINT_CORE("glutGetWindow() called\n"); - - return 0; -} - -void glutSetWindow(int win) -{ - GGIGLUTDPRINT_CORE("glutSetWindow() called\n"); -} - -void glutPositionWindow(int x,int y) -{ - GGIGLUTDPRINT_CORE("glutPositionWindow() called\n"); -} - -void glutReshapeWindow(int x,int y) -{ - GGIGLUTDPRINT_CORE("glutReshapeWindow() called\n"); -} - -void glutPushWindow(void) -{ - GGIGLUTDPRINT_CORE("glutPushWindow() called\n"); -} - -void glutPopWindow(void) -{ - GGIGLUTDPRINT_CORE("glutPopWindow() called\n"); -} - -void glutIconifyWindow(void) -{ - GGIGLUTDPRINT_CORE("glutIconifyWindow() called\n"); -} - -void glutShowWindow() -{ - GGIGLUTDPRINT_CORE("glutShowWindow() called\n"); -} - -void glutHideWindow() -{ - GGIGLUTDPRINT_CORE("glutHideWindow() called\n"); -} - -void glutSetCursor(int cursor) -{ - GGIGLUTDPRINT_CORE("glutSetCursor() called\n"); -} - -void glutWarpPointer(int x,int y) -{ - GGIGLUTDPRINT_CORE("glutWarpPointer() called\n"); -} - -void glutEstablishOverlay(void) -{ - GGIGLUTDPRINT_CORE("glutEstablishOverlay() called\n"); -} - -void glutRemoveOverlay(void) -{ - GGIGLUTDPRINT_CORE("glutRemoveOverlay() called\n"); -} - -void glutUseLayer(GLenum layer) -{ - GGIGLUTDPRINT_CORE("glutUseLayer() called\n"); -} - -int glutLayerGet(GLenum type) -{ - GGIGLUTDPRINT_CORE("glutLayerGet() called\n"); - return 0; -} - -void glutPostOverlayRedisplay(void) -{ - GGIGLUTDPRINT_CORE("glutPostOverlayRedisplay() called\n"); -} - -void glutPostWindowOverlayRedisplay(int w) -{ - GGIGLUTDPRINT_CORE("glutPostWindowOverlayRedisplay() called\n"); -} - -void glutShowOverlay(void) -{ - GGIGLUTDPRINT_CORE("glutShowOverlay() called\n"); -} - -void glutHideOverlay(void) -{ - GGIGLUTDPRINT_CORE("glutHideOverlay() called\n"); -} - -int glutGetMenu(void) -{ - GGIGLUTDPRINT_CORE("glutGetMenu() called\n"); - return 0; -} - -void glutSetMenu(int menu) -{ - GGIGLUTDPRINT_CORE("glutSetMenu() called\n"); -} - -void glutRemoveMenuItem(int item) -{ - GGIGLUTDPRINT_CORE("glutRemoveMenuItem() called\n"); -} - -void glutSpaceBallMotionFunc(void (*func)(int key,int x,int y)) -{ - GGIGLUTDPRINT_CORE("glutSpaceBallMotionFunc() called\n"); -} - -void glutSpaceBallRotateFunc(void (*func)(int x,int y,int z)) -{ - GGIGLUTDPRINT_CORE("glutSpaceBallRotateFunc() called\n"); -} - -void glutSpaceBallButtonFunc(void (*func)(int button,int state)) -{ - GGIGLUTDPRINT_CORE("glutSpaceBallButtonFunc() called\n"); -} - -void glutCopyColormap(int win) -{ - GGIGLUTDPRINT_CORE("glutCopyColormap() called\n"); -} - -int glutDeviceGet(GLenum param) -{ - GGIGLUTDPRINT_CORE("glutDeviceGet() called\n"); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/Makefile b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/Makefile deleted file mode 100644 index 3a85d3eb9b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/Makefile +++ /dev/null @@ -1,113 +0,0 @@ -# Makefile for GLUT -# -# NOTICE: The OpenGL Utility Toolkit (GLUT) distribution contains source -# code published in a book titled "Programming OpenGL for the X Window -# System" (ISBN: 0-201-48359-9) published by Addison-Wesley. The -# programs and associated files contained in the distribution were -# developed by Mark J. Kilgard and are Copyright 1994, 1995, 1996 by Mark -# J. Kilgard (unless otherwise noted). The programs are not in the -# public domain, but they are freely distributable without licensing -# fees. These programs are provided without guarantee or warrantee -# expressed or implied. -# -# GLUT source included with Mesa with permission from Mark Kilgard. - - -TOP = ../../.. - -include $(TOP)/configs/current - - -##### MACROS ##### - -GLUT_MAJOR = 3 -GLUT_MINOR = 7 -GLUT_TINY = 1 - -SOURCES = \ - glut_8x13.c \ - glut_9x15.c \ - glut_bitmap.c \ - glut_bwidth.c \ - glut_cindex.c \ - glut_cmap.c \ - glut_cursor.c \ - glut_dials.c \ - glut_dstr.c \ - glut_event.c \ - glut_ext.c \ - glut_fullscrn.c \ - glut_gamemode.c \ - glut_get.c \ - glut_glxext.c \ - glut_hel10.c \ - glut_hel12.c \ - glut_hel18.c \ - glut_init.c \ - glut_input.c \ - glut_joy.c \ - glut_key.c \ - glut_keyctrl.c \ - glut_keyup.c \ - glut_menu.c \ - glut_menu2.c \ - glut_mesa.c \ - glut_modifier.c \ - glut_mroman.c \ - glut_overlay.c \ - glut_roman.c \ - glut_shapes.c \ - glut_space.c \ - glut_stroke.c \ - glut_swap.c \ - glut_swidth.c \ - glut_tablet.c \ - glut_teapot.c \ - glut_tr10.c \ - glut_tr24.c \ - glut_util.c \ - glut_vidresize.c \ - glut_warp.c \ - glut_win.c \ - glut_winmisc.c \ - layerutil.c - - -OBJECTS = $(SOURCES:.c=.o) - - -##### RULES ##### - -.c.o: - $(CC) -c -I$(TOP)/include $(CFLAGS) $(GLUT_CFLAGS) $< - - - -##### TARGETS ##### - -default: $(LIB_DIR)/$(GLUT_LIB_NAME) - - -# Make the library -$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS) - $(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \ - -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \ - $(MKLIB_OPTIONS) -install $(LIB_DIR) \ - $(GLUT_LIB_DEPS) $(OBJECTS) - - -clean: - -rm -f *.o *~ - -rm -f *.lo - -rm -f *.la - -rm -rf .libs - -rm -rf depend depend.bak - - -depend: $(SOURCES) - @ echo "running $(MKDEP)" - @ touch depend - @ $(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(SOURCES) \ - > /dev/null - -include depend diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/Makefile.cygnus b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/Makefile.cygnus deleted file mode 100644 index 5d5fa6912c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/Makefile.cygnus +++ /dev/null @@ -1,110 +0,0 @@ -# Makefile.cygnus for Cygnus-Win32 target -# /Stephane Rehel, November 16 1997 - -# Makefile for GLUT 3.7 -# -# NOTICE: The OpenGL Utility Toolkit (GLUT) distribution contains source -# code published in a book titled "Programming OpenGL for the X Window -# System" (ISBN: 0-201-48359-9) published by Addison-Wesley. The -# programs and associated files contained in the distribution were -# developed by Mark J. Kilgard and are Copyright 1994, 1995, 1996 by Mark -# J. Kilgard (unless otherwise noted). The programs are not in the -# public domain, but they are freely distributable without licensing -# fees. These programs are provided without guarantee or warrantee -# expressed or implied. -# -# GLUT source included with Mesa with permission from Mark Kilgard. - - -##### MACROS ##### - -GLUT_MAJOR = 3 -GLUT_MINOR = 7 -GLUT_TINY = 0 - -VPATH = RCS - -INCDIR = ../include -LIBDIR = ../lib - -SOURCES = \ - glut_8x13.c \ - glut_9x15.c \ - glut_bitmap.c \ - glut_bwidth.c \ - glut_cindex.c \ - glut_cmap.c \ - glut_cursor.c \ - glut_dials.c \ - glut_dstr.c \ - glut_event.c \ - glut_ext.c \ - glut_fullscrn.c \ - glut_get.c \ - glut_hel10.c \ - glut_hel12.c \ - glut_hel18.c \ - glut_init.c \ - glut_input.c \ - glut_mesa.c \ - glut_modifier.c \ - glut_mroman.c \ - glut_overlay.c \ - glut_roman.c \ - glut_shapes.c \ - glut_space.c \ - glut_stroke.c \ - glut_swap.c \ - glut_swidth.c \ - glut_tablet.c \ - glut_teapot.c \ - glut_tr10.c \ - glut_tr24.c \ - glut_util.c \ - glut_vidresize.c \ - glut_warp.c \ - glut_win.c \ - glut_winmisc.c \ - win32_x11.c \ - win32_glx.c \ - win32_menu.c \ - win32_util.c - -OBJECTS = $(SOURCES:.c=.o) - - - -##### RULES ##### - -.c.o: - $(CC) -c -I$(INCDIR) $(CFLAGS) $< - - - -##### TARGETS ##### - -default: - @echo "Specify a target configuration" - -clean: - -rm *.o *~ - -targets: $(LIBDIR)/$(GLUT_LIB) - -# Make the library -$(LIBDIR)/$(GLUT_LIB): $(OBJECTS) - $(MAKELIB) $(GLUT_LIB) $(GLUT_MAJOR) $(GLUT_MINOR) $(GLUT_TINY) $(OBJECTS) - mv $(GLUT_LIB)* $(LIBDIR) - -include ../Make-config - -include depend - - - -# -# Run 'make dep' to update the dependencies if you change what's included -# by any source file. -# -dep: $(SOURCES) - makedepend -fdepend -Y -I../include $(SOURCES) diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/Makefile.sgi b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/Makefile.sgi deleted file mode 100644 index 9514c324d2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/Makefile.sgi +++ /dev/null @@ -1,189 +0,0 @@ -#! smake -# -# Copyright (c) Mark J. Kilgard, 1995, 1998. -# -include $(ROOT)/usr/include/make/commondefs - -# NOTE: In my GLUT development tree, many of the C source files for -# GLUT are generated. For this reason, "make full_clobber" will remove -# these generated C files, while "make clobber" will not. - -TOP = ../.. - -TARGETS = libglut.a - -LN = ln -s -MV = mv -RM = -rm -rf - -HDRS = glutint.h glutstroke.h layerutil.h glutbitmap.h - -SRCS = \ - glut_bitmap.c \ - glut_bwidth.c \ - glut_cindex.c \ - glut_cmap.c \ - glut_cursor.c \ - glut_dials.c \ - glut_dstr.c \ - glut_event.c \ - glut_ext.c \ - glut_fbc.c \ - glut_fullscrn.c \ - glut_gamemode.c \ - glut_get.c \ - glut_glxext.c \ - glut_init.c \ - glut_input.c \ - glut_joy.c \ - glut_key.c \ - glut_keyctrl.c \ - glut_keyup.c \ - glut_menu.c \ - glut_menu2.c \ - glut_mesa.c \ - glut_modifier.c \ - glut_overlay.c \ - glut_shapes.c \ - glut_space.c \ - glut_stroke.c \ - glut_swap.c \ - glut_swidth.c \ - glut_tablet.c \ - glut_teapot.c \ - glut_util.c \ - glut_vidresize.c \ - glut_warp.c \ - glut_win.c \ - glut_winmisc.c \ - layerutil.c - -SRCSSEMIGENS = \ - glut_8x13.c \ - glut_9x15.c \ - glut_hel10.c \ - glut_hel12.c \ - glut_hel18.c \ - glut_mroman.c \ - glut_roman.c \ - glut_tr10.c \ - glut_tr24.c - -OBJS = $(SRCS:.c=.o) $(SRCSSEMIGENS:.c=.o) -OTHERGENS = y.tab.c y.tab.h strokegen.c strokegen.h strokelex.c -OTHERSRCS = strokegen.y strokelex.l stroke.h -FONTS = Roman.stroke MonoRoman.stroke - -# Uncomment the LCDEFS line below if you want to build a version of -# libglut.a that avoids using the SGI "fast atoms" optimization -# introduced in IRIX 6.3. This optimization eliminates serveral X server -# round-trips. If you are building libglut.a on an IRIX 6.3 or later -# machine and want a chance (no guarantees) that GLUT executables built -# against your libglut.a will work on IRIX 6.2 machines, uncomment out -# the LCDEFS line below. Otherwise, you'll get a run-time message about -# "attempted access to unresolvable symbol in XXX: _XSGIFastInternAtom" -#LCDEFS = -DNO_FAST_ATOMS - -LCOPTS = -I$(TOP)/include -fullwarn -LWOFF = ,813,852,827,826 -LDIRT = *~ $(OTHERGENS) strokegen *.bak hardcopy glutsrc.ps capturexfont *.pure dstr dstr.c *.gen - -default: $(TARGETS) - -sinclude ObjectType.mk - -$(OBJS) : $(HDRS) - -libglut.a : $(OBJS) - $(RM) $@ - $(AR) crl $@ $(OBJS) - -.ORDER : strokegen.h strokegen.c - -strokegen.h strokegen.c : strokegen.y - $(YACC) -d strokegen.y - $(MV) y.tab.c strokegen.c - $(MV) y.tab.h strokegen.h - -# avoid warnings when compiling lex generated code -strokegen.o : strokegen.c - $(CC) $(CFLAGS) -woff 726,825,635,818,819,820,824,831,835,822,821,1167,1498,1116,1136,1174,1196,803 -c -MDupdate Makedepend strokegen.c - -strokelex.c : strokelex.l - $(LEX) strokelex.l - $(MV) lex.yy.c strokelex.c - -# avoid warnings when compiling lex generated code -strokelex.o : strokelex.c - $(CC) $(CFLAGS) -woff 831,825,817,835,702,819,635,824,822,1167,1498,1110,1196,1174,803 -c -MDupdate Makedepend strokelex.c - -strokegen : strokegen.o strokelex.o - $(CC) -o $@ $(LDFLAGS) strokegen.o strokelex.o -ll - -capturexfont : capturexfont.o - $(CC) -o $@ $(LDFLAGS) capturexfont.o -lX11 - -# glut_roman.c and glut_mroman.c are now checked in, but here are rules to generate them -glut_roman.c.gen : Roman.stroke strokegen - ./strokegen -s glutStrokeRoman < Roman.stroke > $@ -glut_mroman.c.gen : MonoRoman.stroke strokegen - ./strokegen -s glutStrokeMonoRoman < MonoRoman.stroke > $@ - -glutsrc.ps : $(SRCS) - $(RM) hardcopy - mkdir -p hardcopy - for i in $(SRCS) ;\ - do \ - grep -v CENTRY $$i | grep -v INDENT- > hardcopy/$$i; \ - done - cd hardcopy ; enscript -p ../$@ -G -2r `echo $(SRCS) | fmt -1 | sort` - $(RM) hardcopy - -# The bitmap files can be generated using capturexfont, but because -# they require a connection to an X server and potentially different -# X servers have different fonts, these generated files are part -# of the GLUT distribution. - -9_BY_15 = -misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1 -8_BY_13 = -misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1 -TR10 = -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 -TR24 = -adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1 -HEL10 = -adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1 -HEL12 = -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1 -HEL18 = -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1 - -semigens : capturexfont - ./capturexfont $(9_BY_15) glutBitmap9By15 > glut_9x15.c.gen - ./capturexfont $(8_BY_13) glutBitmap8By13 > glut_8x13.c.gen - ./capturexfont $(TR10) glutBitmapTimesRoman10 > glut_tr10.c.gen - ./capturexfont $(TR24) glutBitmapTimesRoman24 > glut_tr24.c.gen - ./capturexfont $(HEL10) glutBitmapHelvetica10 > glut_hel10.c.gen - ./capturexfont $(HEL12) glutBitmapHelvetica12 > glut_hel12.c.gen - ./capturexfont $(HEL18) glutBitmapHelvetica18 > glut_hel18.c.gen - -# unused test rule for test building 16-bit font -JIS = -jis-fixed-medium-r-normal--24-230-75-75-c-240-jisx0208.1983-0 -glut_jis.c : - ./capturexfont $(JIS) glutBitmapJis > $@ - -sources: $(SRCS) - -symcheck: libglut.a - -nm -Bo libglut.a | grep -v ' d ' | grep -v ' T glut' | grep -v ' D glut' | grep -v ' U ' | grep -v ' T __glut' | grep -v ' t ' | grep -v ' b ' | grep -v ' D __glut' | grep -v ' B __glut' - -dstr.c: glut_dstr.c - ln -s glut_dstr.c $@ - -dstr: dstr.c glut_util.o glut_glxext.o - $(RM) $@ - $(CC) -g -o $@ $(CFLAGS) -DTEST dstr.c glut_util.o glut_glxext.o -lGLU -lGL -lXext -lX11 -lm - -./glut.h : glut.h -./glutint.h : glutint.h -./glutstroke.h : glutstroke.h -./strokegen.h : strokegen.h -./stroke.h : stroke.h -./layerutil.h : layerutil.h -strokelex.o: strokelex.c strokegen.h - -include $(COMMONRULES) diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/Makefile.win b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/Makefile.win deleted file mode 100644 index 4ce7f6fc71..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/Makefile.win +++ /dev/null @@ -1,99 +0,0 @@ -# Makefile for Win32 - -!include - -TOP = .. - -# NOTE: glut_menu.c and glut_glxext.c are NOT compiled into Win32 GLUT - -SRCS = glut_8x13.c glut_9x15.c glut_bitmap.c glut_bwidth.c glut_cindex.c glut_cmap.c glut_cursor.c glut_dials.c glut_dstr.c glut_event.c glut_ext.c glut_fbc.c glut_fullscrn.c glut_gamemode.c glut_get.c glut_hel10.c glut_hel12.c glut_hel18.c glut_init.c glut_input.c glut_joy.c glut_key.c glut_keyctrl.c glut_keyup.c glut_mesa.c glut_modifier.c glut_mroman.c glut_overlay.c glut_roman.c glut_shapes.c glut_space.c glut_stroke.c glut_swap.c glut_swidth.c glut_tablet.c glut_teapot.c glut_tr10.c glut_tr24.c glut_util.c glut_vidresize.c glut_warp.c glut_win.c glut_winmisc.c win32_glx.c win32_menu.c win32_util.c win32_winproc.c win32_x11.c - -all : glutdll - -!include "$(TOP)/mesawin32.mak" - -glutdll : $(GLUTDLL) - -!IFDEF NODEBUG -OPTIMIZE_CFLAGS = -DNDEBUG -!ENDIF - -CFLAGS = $(cvarsdll) $(CFLAGS) $(OPTIMIZE_CFLAGS) -DMESA -DBUILD_GL32 -LFLAGS = $(dlllflags) $(lcommon) $(LFLAGS) - -OBJS = $(SRCS:.c=.obj) -MS_LIBS = ../lib/$(MESALIB) ../lib/$(GLULIB) winmm.lib $(guilibsdll) -SGI_LIBS = $(SGI_OPENGL) $(SGI_GLU) winmm.lib $(guilibsdll) - -MesaGlut.dll : $(OBJS) glut.def - $(link) $(LFLAGS) -out:MesaGlut.dll -def:glut.def $(OBJS) $(MS_LIBS) - @echo "copying GLUT dynamic link library to lib directory..." - -copy $(GLUTDLL) ..\lib - @echo "copying GLUT import library to lib directory..." - -copy $(GLUTLIB) ..\lib - -glut.dll : $(OBJS) glut.def - $(link) $(LFLAGS) -out:glut.dll -def:glut.def $(OBJS) $(SGI_LIBS) - -install : $(GLUTDLL) - @echo "copying GLUT dynamic link library to system directory..." - -copy $(GLUTDLL) $(DLLINSTALL) - @echo "copying GLUT header file to include directory..." - -copy ..\include\GL\glut.h $(INCLUDEINSTALL) - @echo "copying GLUT import library to library directory..." - -copy $(GLUTLIB) $(LIBINSTALL) - -.c.obj : - $(cc) $(CFLAGS) -I . $*.c - -# explicit object dependencies for all source files - -win32_glx.obj: win32_glx.c win32_glx.h -win32_x11.obj: win32_x11.c win32_x11.h -win32_menu.obj: win32_menu.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h -win32_util.obj: win32_util.c glutint.h ..\include\GL\glutf90.h -win32_winproc.obj: win32_winproc.c glutint.h ..\include\GL\glutf90.h - -glut_mroman.obj: glut_mroman.c glutstroke.h glutint.h ..\include\GL\glutf90.h -glut_roman.obj: glut_roman.c glutstroke.h glutint.h ..\include\GL\glutf90.h -glut_hel12.obj: glut_hel12.c glutbitmap.h glutint.h ..\include\GL\glutf90.h -glut_8x13.obj: glut_8x13.c glutbitmap.h glutint.h ..\include\GL\glutf90.h -glut_hel18.obj: glut_hel18.c glutbitmap.h glutint.h ..\include\GL\glutf90.h -glut_9x15.obj: glut_9x15.c glutbitmap.h glutint.h ..\include\GL\glutf90.h -glut_tr10.obj: glut_tr10.c glutbitmap.h glutint.h ..\include\GL\glutf90.h -glut_hel10.obj: glut_hel10.c glutbitmap.h glutint.h ..\include\GL\glutf90.h -glut_tr24.obj: glut_tr24.c glutbitmap.h glutint.h ..\include\GL\glutf90.h - -glut_bitmap.obj: glut_bitmap.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_bwidth.obj: glut_bwidth.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_cindex.obj: glut_cindex.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_cmap.obj: glut_cmap.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_cursor.obj: glut_cursor.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_dials.obj: glut_dials.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_dstr.obj: glut_dstr.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_event.obj: glut_event.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_ext.obj: glut_ext.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_fullscrn.obj: glut_fullscrn.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_gamemode.obj: glut_gamemode.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_get.obj: glut_get.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_init.obj: glut_init.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_input.obj: glut_input.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_joy.obj: glut_joy.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_key.obj: glut_key.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_keyctrl.obj: glut_keyctrl.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_keyup.obj: glut_keyup.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_mesa.obj: glut_mesa.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_modifier.obj: glut_modifier.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_overlay.obj: glut_overlay.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_shapes.obj: glut_shapes.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_space.obj: glut_space.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_swap.obj: glut_swap.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_swidth.obj: glut_swidth.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_tablet.obj: glut_tablet.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_teapot.obj: glut_teapot.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_util.obj: glut_util.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_vidresize.obj: glut_vidresize.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_warp.obj: glut_warp.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h -glut_win.obj: glut_win.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h -glut_winmisc.obj: glut_winmisc.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/capturexfont.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/capturexfont.c deleted file mode 100644 index b99e793056..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/capturexfont.c +++ /dev/null @@ -1,356 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -/* capturexfont.c connects to an X server and downloads a - bitmap font from which a C source file is generated, - encoding the font for GLUT's use. Example usage: - capturexfont.c 9x15 glutBitmap9By15 > glut_9x15.c */ - -#ifdef __VMS -#include -#endif - -#include -#include -#include -#include -#include -#include -#include - -#define MAX_GLYPHS_PER_GRAB 512 /* This is big enough for 2^9 - glyph character sets */ - -static void -outputChar(int num, int width, int height, - int xoff, int yoff, int advance, int data) -{ - if (width == 0 || height == 0) { - printf("#ifdef _WIN32\n"); - printf("/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\n"); - printf(" a height or width of zero does not advance the raster position\n"); - printf(" as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\n"); - printf("static const GLubyte ch%ddata[] = { 0x0 };\n", num); - printf("static const BitmapCharRec ch%d = {", num); - printf("%d,", 0); - printf("%d,", 0); - printf("%d,", xoff); - printf("%d,", yoff); - printf("%d,", advance); - printf("ch%ddata", num); - printf("};\n"); - printf("#else\n"); - } - printf("static const BitmapCharRec ch%d = {", num); - printf("%d,", width); - printf("%d,", height); - printf("%d,", xoff); - printf("%d,", yoff); - printf("%d,", advance); - if (data) { - printf("ch%ddata", num); - } else { - printf("0"); - } - printf("};\n"); - if (width == 0 || height == 0) { - printf("#endif\n"); - } - printf("\n"); -} - -/* Can't just use isprint because it only works for the range - of ASCII characters (ie, TRUE for isascii) and capturexfont - might be run on 16-bit fonts. */ -#define PRINTABLE(ch) (isascii(ch) ? isprint(ch) : 0) - -void -captureXFont(Display * dpy, Font font, char *xfont, char *name) -{ - int first, last, count; - int cnt, len; - Pixmap offscreen; - Window drawable; - XFontStruct *fontinfo; - XImage *image; - GC xgc; - XGCValues values; - int width, height; - int i, j, k; - XCharStruct *charinfo; - XChar2b character; - GLubyte *bitmapData; - int x, y; - int spanLength; - int charWidth, charHeight, maxSpanLength, pixwidth; - int grabList[MAX_GLYPHS_PER_GRAB]; - int glyphsPerGrab = MAX_GLYPHS_PER_GRAB; - int numToGrab; - int rows, pages, byte1, byte2, index; - int nullBitmap; - - drawable = RootWindow(dpy, DefaultScreen(dpy)); - - fontinfo = XQueryFont(dpy, font); - pages = fontinfo->max_char_or_byte2 - fontinfo->min_char_or_byte2 + 1; - first = (fontinfo->min_byte1 << 8) + fontinfo->min_char_or_byte2; - last = (fontinfo->max_byte1 << 8) + fontinfo->max_char_or_byte2; - count = last - first + 1; - - width = fontinfo->max_bounds.rbearing - - fontinfo->min_bounds.lbearing; - height = fontinfo->max_bounds.ascent + - fontinfo->max_bounds.descent; - /* 16-bit fonts have more than one row; indexing into - per_char is trickier. */ - rows = fontinfo->max_byte1 - fontinfo->min_byte1 + 1; - - maxSpanLength = (width + 7) / 8; - /* For portability reasons we don't use alloca for - bitmapData, but we could. */ - bitmapData = malloc(height * maxSpanLength); - /* Be careful determining the width of the pixmap; the X - protocol allows pixmaps of width 2^16-1 (unsigned short - size) but drawing coordinates max out at 2^15-1 (signed - short size). If the width is too large, we need to limit - the glyphs per grab. */ - if ((glyphsPerGrab * 8 * maxSpanLength) >= (1 << 15)) { - glyphsPerGrab = (1 << 15) / (8 * maxSpanLength); - } - pixwidth = glyphsPerGrab * 8 * maxSpanLength; - offscreen = XCreatePixmap(dpy, drawable, pixwidth, height, 1); - - values.font = font; - values.background = 0; - values.foreground = 0; - xgc = XCreateGC(dpy, offscreen, - GCFont | GCBackground | GCForeground, &values); - XFillRectangle(dpy, offscreen, xgc, 0, 0, - 8 * maxSpanLength * glyphsPerGrab, height); - XSetForeground(dpy, xgc, 1); - - numToGrab = 0; - if (fontinfo->per_char == NULL) { - charinfo = &(fontinfo->min_bounds); - charWidth = charinfo->rbearing - charinfo->lbearing; - charHeight = charinfo->ascent + charinfo->descent; - spanLength = (charWidth + 7) / 8; - } - printf("\n/* GENERATED FILE -- DO NOT MODIFY */\n\n"); - printf("#include \"glutbitmap.h\"\n\n"); - for (i = first; count; i++, count--) { - int undefined; - if (rows == 1) { - undefined = (fontinfo->min_char_or_byte2 > i || - fontinfo->max_char_or_byte2 < i); - } else { - byte2 = i & 0xff; - byte1 = i >> 8; - undefined = (fontinfo->min_char_or_byte2 > byte2 || - fontinfo->max_char_or_byte2 < byte2 || - fontinfo->min_byte1 > byte1 || - fontinfo->max_byte1 < byte1); - - } - if (undefined) { - goto PossiblyDoGrab; - } - if (fontinfo->per_char != NULL) { - if (rows == 1) { - index = i - fontinfo->min_char_or_byte2; - } else { - byte2 = i & 0xff; - byte1 = i >> 8; - index = - (byte1 - fontinfo->min_byte1) * pages + - (byte2 - fontinfo->min_char_or_byte2); - } - charinfo = &(fontinfo->per_char[index]); - charWidth = charinfo->rbearing - charinfo->lbearing; - charHeight = charinfo->ascent + charinfo->descent; - if (charWidth == 0 || charHeight == 0) { - if (charinfo->width != 0) { - /* Still must move raster pos even if empty character - - */ - outputChar(i, 0, 0, 0, 0, charinfo->width, 0); - } - goto PossiblyDoGrab; - } - } - grabList[numToGrab] = i; - character.byte2 = i & 255; - character.byte1 = i >> 8; - - /* XXX We could use XDrawImageString16 which would also - paint the backing rectangle but X server bugs in some - scalable font rasterizers makes it more effective to do - XFillRectangles to clear the pixmap and then - XDrawImage16 for the text. */ - XDrawString16(dpy, offscreen, xgc, - -charinfo->lbearing + 8 * maxSpanLength * numToGrab, - charinfo->ascent, &character, 1); - - numToGrab++; - - PossiblyDoGrab: - - if (numToGrab >= glyphsPerGrab || count == 1) { - image = XGetImage(dpy, offscreen, - 0, 0, pixwidth, height, 1, XYPixmap); - for (j = numToGrab - 1; j >= 0; j--) { - if (fontinfo->per_char != NULL) { - byte2 = grabList[j] & 0xff; - byte1 = grabList[j] >> 8; - index = - (byte1 - fontinfo->min_byte1) * pages + - (byte2 - fontinfo->min_char_or_byte2); - charinfo = &(fontinfo->per_char[index]); - charWidth = charinfo->rbearing - charinfo->lbearing; - charHeight = charinfo->ascent + charinfo->descent; - spanLength = (charWidth + 7) / 8; - } - memset(bitmapData, 0, height * spanLength); - for (y = 0; y < charHeight; y++) { - for (x = 0; x < charWidth; x++) { - if (XGetPixel(image, j * maxSpanLength * 8 + x, - charHeight - 1 - y)) { - /* Little endian machines (such as DEC Alpha) - could benefit from reversing the bit order - here and changing the GL_UNPACK_LSB_FIRST - parameter in glutBitmapCharacter to GL_TRUE. */ - bitmapData[y * spanLength + x / 8] |= - (1 << (7 - (x & 7))); - } - } - } - if (PRINTABLE(grabList[j])) { - printf("/* char: 0x%x '%c' */\n\n", - grabList[j], grabList[j]); - } else { - printf("/* char: 0x%x */\n\n", grabList[j]); - } - - /* Determine if the bitmap is null. */ - nullBitmap = 1; - len = (charinfo->ascent + charinfo->descent) * - ((charinfo->rbearing - charinfo->lbearing + 7) / 8); - cnt = 0; - while (cnt < len) { - for (k = 0; k < 16 && cnt < len; k++, cnt++) { - if (bitmapData[cnt] != 0) { - nullBitmap = 0; - } - } - } - - if (!nullBitmap) { - printf("static const GLubyte ch%ddata[] = {\n", grabList[j]); - len = (charinfo->ascent + charinfo->descent) * - ((charinfo->rbearing - charinfo->lbearing + 7) / 8); - cnt = 0; - while (cnt < len) { - for (k = 0; k < 16 && cnt < len; k++, cnt++) { - printf("0x%x,", bitmapData[cnt]); - } - printf("\n"); - } - printf("};\n\n"); - } else { - charWidth = 0; - charHeight = 0; - } - - outputChar(grabList[j], charWidth, charHeight, - -charinfo->lbearing, charinfo->descent, - charinfo->width, !nullBitmap); - } - XDestroyImage(image); - numToGrab = 0; - if (count > 0) { - XSetForeground(dpy, xgc, 0); - XFillRectangle(dpy, offscreen, xgc, 0, 0, - 8 * maxSpanLength * glyphsPerGrab, height); - XSetForeground(dpy, xgc, 1); - } - } - } - XFreeGC(dpy, xgc); - XFreePixmap(dpy, offscreen); - /* For portability reasons we don't use alloca for - bitmapData, but we could. */ - free(bitmapData); - - printf("static const BitmapCharRec * const chars[] = {\n"); - for (i = first; i <= last; i++) { - int undefined; - byte2 = i & 0xff; - byte1 = i >> 8; - undefined = (fontinfo->min_char_or_byte2 > byte2 || - fontinfo->max_char_or_byte2 < byte2 || - fontinfo->min_byte1 > byte1 || - fontinfo->max_byte1 < byte1); - if (undefined) { - printf("0,\n"); - } else { - if (fontinfo->per_char != NULL) { - if (rows == 1) { - index = i - fontinfo->min_char_or_byte2; - } else { - byte2 = i & 0xff; - byte1 = i >> 8; - index = - (byte1 - fontinfo->min_byte1) * pages + - (byte2 - fontinfo->min_char_or_byte2); - } - charinfo = &(fontinfo->per_char[index]); - charWidth = charinfo->rbearing - charinfo->lbearing; - charHeight = charinfo->ascent + charinfo->descent; - if (charWidth == 0 || charHeight == 0) { - if (charinfo->width == 0) { - printf("0,\n"); - continue; - } - } - } - printf("&ch%d,\n", i); - } - } - printf("};\n\n"); - printf("const BitmapFontRec %s = {\n", name); - printf("\"%s\",\n", xfont); - printf("%d,\n", last - first + 1); - printf("%d,\n", first); - printf("chars\n"); - printf("};\n\n"); - XFreeFont(dpy, fontinfo); -} - -int -main(int argc, char **argv) -{ - Display *dpy; - Font font; - - if (argc != 3) { - fprintf(stderr, "usage: capturexfont XFONT NAME\n"); - exit(1); - } - dpy = XOpenDisplay(NULL); - if (dpy == NULL) { - fprintf(stderr, "capturexfont: could not open X display\n"); - exit(1); - } - font = XLoadFont(dpy, argv[1]); - if (font == None) { - fprintf(stderr, "capturexfont: bad font\n"); - exit(1); - } - captureXFont(dpy, font, argv[1], argv[2]); - XCloseDisplay(dpy); - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/descrip.mms b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/descrip.mms deleted file mode 100644 index 5a536aa872..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/descrip.mms +++ /dev/null @@ -1,208 +0,0 @@ -# Makefile for GLUT for VMS -# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl - -.first - define gl [---.include.gl] - -.include [---]mms-config. - -##### MACROS ##### -GLUT_MAJOR = 3 -GLUT_MINOR = 7 - -VPATH = RCS - -INCDIR = [---.include] -LIBDIR = [---.lib] -CFLAGS = /nowarn/include=$(INCDIR)/prefix=all/name=(as_is,short) - -SOURCES = \ -glut_8x13.c \ -glut_9x15.c \ -glut_bitmap.c \ -glut_bwidth.c \ -glut_cindex.c \ -glut_cmap.c \ -glut_cursor.c \ -glut_dials.c \ -glut_dstr.c \ -glut_event.c \ -glut_ext.c \ -glut_fullscrn.c \ -glut_gamemode.c \ -glut_get.c \ -glut_glxext.c \ -glut_hel10.c \ -glut_hel12.c \ -glut_hel18.c \ -glut_init.c \ -glut_input.c \ -glut_joy.c \ -glut_key.c \ -glut_keyctrl.c \ -glut_keyup.c \ -glut_menu.c \ -glut_menu2.c \ -glut_mesa.c \ -glut_modifier.c \ -glut_mroman.c \ -glut_overlay.c \ -glut_roman.c \ -glut_shapes.c \ -glut_space.c \ -glut_stroke.c \ -glut_swap.c \ -glut_swidth.c \ -glut_tablet.c \ -glut_teapot.c \ -glut_tr10.c \ -glut_tr24.c \ -glut_util.c \ -glut_vidresize.c \ -glut_warp.c \ -glut_win.c \ -glut_winmisc.c \ -layerutil.c - -OBJECTS0=glut_8x13.obj,\ -glut_9x15.obj,\ -glut_bitmap.obj,\ -glut_bwidth.obj,\ -glut_cindex.obj,\ -glut_cmap.obj,\ -glut_cursor.obj,\ -glut_dials.obj,\ -glut_dstr.obj,\ -glut_event.obj,\ -glut_ext.obj,\ -glut_fullscrn.obj,\ -glut_gamemode.obj - -OBJECTS1=glut_get.obj,\ -glut_glxext.obj,\ -glut_hel10.obj,\ -glut_hel12.obj,\ -glut_hel18.obj,\ -glut_init.obj,\ -glut_input.obj,\ -glut_joy.obj,\ -glut_key.obj,\ -glut_keyctrl.obj,\ -glut_keyup.obj,\ -glut_menu.obj,\ -glut_menu2.obj,\ -glut_mesa.obj,\ -glut_modifier.obj - -OBJECTS2=glut_mroman.obj,\ -glut_overlay.obj,\ -glut_roman.obj,\ -glut_shapes.obj,\ -glut_space.obj,\ -glut_stroke.obj,\ -glut_swap.obj,\ -glut_swidth.obj,\ -glut_tablet.obj,\ -glut_teapot.obj,\ -glut_tr10.obj,\ -glut_tr24.obj,\ -glut_util.obj,\ -glut_vidresize.obj - -OBJECTS3=glut_warp.obj,\ -glut_win.obj,\ -glut_winmisc.obj,\ -layerutil.obj - -##### RULES ##### - -VERSION=Glut V3.7 - -##### TARGETS ##### - -# Make the library -$(LIBDIR)$(GLUT_LIB) : $(OBJECTS0) $(OBJECTS1) $(OBJECTS2) $(OBJECTS3) - @ $(MAKELIB) $(GLUT_LIB) $(OBJECTS0) - @ library $(GLUT_LIB) $(OBJECTS1) - @ library $(GLUT_LIB) $(OBJECTS2) - @ library $(GLUT_LIB) $(OBJECTS3) - @ rename $(GLUT_LIB)* $(LIBDIR) -.ifdef SHARE - @ WRITE_ SYS$OUTPUT " generating mesagl1.opt" - @ OPEN_/WRITE FILE mesagl1.opt - @ WRITE_ FILE "!" - @ WRITE_ FILE "! mesagl1.opt generated by DESCRIP.$(MMS_EXT)" - @ WRITE_ FILE "!" - @ WRITE_ FILE "IDENTIFICATION=""$(VERSION)""" - @ WRITE_ FILE "GSMATCH=LEQUAL,3,7 - @ WRITE_ FILE "$(OBJECTS0)" - @ WRITE_ FILE "$(OBJECTS1)" - @ WRITE_ FILE "$(OBJECTS2)" - @ WRITE_ FILE "$(OBJECTS3)" - @ WRITE_ FILE "[---.lib]libmesaglu.exe/SHARE" - @ WRITE_ FILE "[---.lib]libmesagl.exe/SHARE" - @ write file "sys$library:decw$xmulibshr.exe/share" - @ WRITE_ FILE "SYS$SHARE:DECW$XEXTLIBSHR/SHARE" - @ WRITE_ FILE "SYS$SHARE:DECW$XLIBSHR/SHARE" - @ CLOSE_ FILE - @ WRITE_ SYS$OUTPUT " generating mesagl.map ..." - @ CXXLINK_/NODEB/NOSHARE/NOEXE/MAP=mesagl.map/FULL mesagl1.opt/OPT - @ WRITE_ SYS$OUTPUT " analyzing mesagl.map ..." - @ @[---.vms]ANALYZE_MAP.COM mesagl.map mesagl.opt - @ WRITE_ SYS$OUTPUT " linking $(GLUT_SHAR) ..." - @ CXXLINK_/NODEB/SHARE=$(GLUT_SHAR)/MAP=mesagl.map/FULL mesagl1.opt/opt,mesagl.opt/opt - @ rename $(GLUT_SHAR)* $(LIBDIR) -.endif - -clean : - delete *.obj;* - purge - -include mms_depend. - -glut_8x13.obj : glut_8x13.c -glut_9x15.obj : glut_9x15.c -glut_bitmap.obj : glut_bitmap.c -glut_bwidth.obj : glut_bwidth.c -glut_cindex.obj : glut_cindex.c -glut_cmap.obj : glut_cmap.c -glut_cursor.obj : glut_cursor.c -glut_dials.obj : glut_dials.c -glut_dstr.obj : glut_dstr.c -glut_event.obj : glut_event.c -glut_ext.obj : glut_ext.c -glut_fullscrn.obj : glut_fullscrn.c -glut_gamemode.obj : glut_gamemode.c -glut_get.obj : glut_get.c -glut_glxext.obj : glut_glxext.c -glut_hel10.obj : glut_hel10.c -glut_hel12.obj : glut_hel12.c -glut_hel18.obj : glut_hel18.c -glut_init.obj : glut_init.c -glut_input.obj : glut_input.c -glut_joy.obj : glut_joy.c -glut_key.obj : glut_key.c -glut_keyctrl.obj : glut_keyctrl.c -glut_keyup.obj : glut_keyup.c -glut_menu.obj : glut_menu.c -glut_menu2.obj : glut_menu2.c -glut_mesa.obj : glut_mesa.c -glut_modifier.obj : glut_modifier.c -glut_mroman.obj : glut_mroman.c -glut_overlay.obj : glut_overlay.c -glut_roman.obj : glut_roman.c -glut_shapes.obj : glut_shapes.c -glut_space.obj : glut_space.c -glut_stroke.obj : glut_stroke.c -glut_swap.obj : glut_swap.c -glut_swidth.obj : glut_swidth.c -glut_tablet.obj : glut_tablet.c -glut_teapot.obj : glut_teapot.c -glut_tr10.obj : glut_tr10.c -glut_tr24.obj : glut_tr24.c -glut_util.obj : glut_util.c -glut_vidresize.obj : glut_vidresize.c -glut_warp.obj : glut_warp.c -glut_win.obj : glut_win.c -glut_winmisc.obj : glut_winmisc.c -layerutil.obj : layerutil.c diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/fxglut.def b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/fxglut.def deleted file mode 100644 index ff6ffb1d39..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/fxglut.def +++ /dev/null @@ -1,103 +0,0 @@ -EXPORTS - glutInit - glutInitDisplayMode - glutInitDisplayString - glutInitWindowPosition - glutInitWindowSize - glutMainLoop - glutCreateWindow - glutCreateSubWindow - glutDestroyWindow - glutPostRedisplay - glutSwapBuffers - glutGetWindow - glutSetWindow - glutSetWindowTitle - glutSetIconTitle - glutPositionWindow - glutReshapeWindow - glutPopWindow - glutPushWindow - glutIconifyWindow - glutShowWindow - glutHideWindow - glutFullScreen - glutSetCursor - glutWarpPointer - glutEstablishOverlay - glutRemoveOverlay - glutUseLayer - glutPostOverlayRedisplay - glutShowOverlay - glutHideOverlay - glutCreateMenu - glutDestroyMenu - glutGetMenu - glutSetMenu - glutAddMenuEntry - glutAddSubMenu - glutChangeToMenuEntry - glutChangeToSubMenu - glutRemoveMenuItem - glutAttachMenu - glutDetachMenu - glutDisplayFunc - glutReshapeFunc - glutKeyboardFunc - glutMouseFunc - glutMotionFunc - glutPassiveMotionFunc - glutEntryFunc - glutVisibilityFunc - glutIdleFunc - glutTimerFunc - glutMenuStateFunc - glutSpecialFunc - glutSpaceballMotionFunc - glutSpaceballRotateFunc - glutSpaceballButtonFunc - glutButtonBoxFunc - glutDialsFunc - glutTabletMotionFunc - glutTabletButtonFunc - glutMenuStatusFunc - glutOverlayDisplayFunc - glutWindowStatusFunc - glutSetColor - glutGetColor - glutCopyColormap - glutGet - glutDeviceGet - glutExtensionSupported - glutGetModifiers - glutLayerGet - glutBitmapCharacter - glutBitmapWidth - glutStrokeCharacter - glutStrokeWidth - glutBitmapLength - glutStrokeLength - glutWireSphere - glutSolidSphere - glutWireCone - glutSolidCone - glutWireCube - glutSolidCube - glutWireTorus - glutSolidTorus - glutWireDodecahedron - glutSolidDodecahedron - glutWireTeapot - glutSolidTeapot - glutWireOctahedron - glutSolidOctahedron - glutWireTetrahedron - glutSolidTetrahedron - glutWireIcosahedron - glutSolidIcosahedron - glutVideoResizeGet - glutSetupVideoResizing - glutStopVideoResizing - glutVideoResize - glutVideoPan - glutReportErrors diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut.def b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut.def deleted file mode 100644 index d5e0e0cf2a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut.def +++ /dev/null @@ -1,131 +0,0 @@ -DESCRIPTION 'OpenGL Utility Toolkit for Win32' - -VERSION 3.7 - -EXPORTS - - glutAddMenuEntry - glutAddSubMenu - glutAttachMenu - glutBitmapCharacter - glutBitmapLength - glutBitmapWidth - glutButtonBoxFunc - glutChangeToMenuEntry - glutChangeToSubMenu - glutCopyColormap - glutCreateMenu - __glutCreateMenuWithExit - glutCreateSubWindow - glutCreateWindow - __glutCreateWindowWithExit - glutDestroyMenu - glutDestroyWindow - glutDetachMenu - glutDeviceGet - glutDialsFunc - glutDisplayFunc - glutEnterGameMode - glutEntryFunc - glutEstablishOverlay - glutExtensionSupported - glutForceJoystickFunc - glutFullScreen - glutGameModeGet - glutGameModeString - glutGet - glutGetColor - glutGetMenu - glutGetModifiers - glutGetWindow - glutHideOverlay - glutHideWindow - glutIconifyWindow - glutIdleFunc - glutIgnoreKeyRepeat - glutInit - __glutInitWithExit - glutInitDisplayMode - glutInitDisplayString - glutInitWindowPosition - glutInitWindowSize - glutJoystickFunc - glutKeyboardFunc - glutKeyboardUpFunc - glutLayerGet - glutLeaveGameMode - glutMainLoop - glutMenuStateFunc - glutMenuStatusFunc - glutMotionFunc - glutMouseFunc - glutOverlayDisplayFunc - glutPassiveMotionFunc - glutPopWindow - glutPositionWindow - glutPostOverlayRedisplay - glutPostRedisplay - glutPostWindowOverlayRedisplay - glutPostWindowRedisplay - glutPushWindow - glutRemoveMenuItem - glutRemoveOverlay - glutReportErrors - glutReshapeFunc - glutReshapeWindow - glutSetColor - glutSetCursor - glutSetIconTitle - glutSetKeyRepeat - glutSetMenu - glutSetWindow - glutSetWindowTitle - glutSetupVideoResizing - glutShowOverlay - glutShowWindow - glutSolidCone - glutSolidCube - glutSolidDodecahedron - glutSolidIcosahedron - glutSolidOctahedron - glutSolidSphere - glutSolidTeapot - glutSolidTetrahedron - glutSolidTorus - glutSpaceballButtonFunc - glutSpaceballMotionFunc - glutSpaceballRotateFunc - glutSpecialFunc - glutSpecialUpFunc - glutStopVideoResizing - glutStrokeCharacter - glutStrokeLength - glutStrokeWidth - glutSwapBuffers - glutTabletButtonFunc - glutTabletMotionFunc - glutTimerFunc - glutUseLayer - glutVideoPan - glutVideoResize - glutVideoResizeGet - glutVisibilityFunc - glutWarpPointer - glutWindowStatusFunc - glutWireCone - glutWireCube - glutWireDodecahedron - glutWireIcosahedron - glutWireOctahedron - glutWireSphere - glutWireTeapot - glutWireTetrahedron - glutWireTorus - glutStrokeRoman - glutBitmap9By15 - glutBitmapHelvetica10 - glutBitmapHelvetica18 - glutBitmapTimesRoman24 -; __glutSetFCB -; __glutGetFCB - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_8x13.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_8x13.c deleted file mode 100644 index 843c63d35a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_8x13.c +++ /dev/null @@ -1,2073 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmap8By13 XXX -#include "glutbitmap.h" -#undef glutBitmap8By13 - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch0data[] = { 0x0 }; -static const BitmapCharRec ch0 = {1,1,0,0,8,ch0data}; -#else -static const BitmapCharRec ch0 = {0,0,0,0,8,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,8,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,8,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch127data[] = { 0x0 }; -static const BitmapCharRec ch127 = {1,1,0,0,8,ch127data}; -#else -static const BitmapCharRec ch127 = {0,0,0,0,8,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,8,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,8,0}; -#endif - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x0,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch255 = {6,12,-1,2,8,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0x80,0x80,0xb8,0xc4,0x84,0x84,0xc4,0xb8,0x80,0x80, -}; - -static const BitmapCharRec ch254 = {6,10,-1,2,8,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch253 = {6,12,-1,2,8,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch252 = {6,10,-1,0,8,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch251 = {6,10,-1,0,8,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch250 = {6,10,-1,0,8,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch249 = {6,10,-1,0,8,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0x80,0x78,0xc4,0xa4,0x94,0x8c,0x78,0x4, -}; - -static const BitmapCharRec ch248 = {6,8,-1,1,8,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x20,0x20,0x0,0xf8,0x0,0x20,0x20, -}; - -static const BitmapCharRec ch247 = {5,7,-1,-1,8,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch246 = {6,10,-1,0,8,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch245 = {6,10,-1,0,8,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch244 = {6,10,-1,0,8,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch243 = {6,10,-1,0,8,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch242 = {6,10,-1,0,8,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0x84,0x84,0x84,0x84,0xc4,0xb8,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch241 = {6,10,-1,0,8,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x8,0x50,0x30,0x48, -}; - -static const BitmapCharRec ch240 = {6,10,-1,0,8,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x50,0x50, -}; - -static const BitmapCharRec ch239 = {5,10,-1,0,8,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x90,0x60, -}; - -static const BitmapCharRec ch238 = {5,10,-1,0,8,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch237 = {5,10,-1,0,8,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch236 = {5,10,-1,0,8,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch235 = {6,10,-1,0,8,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch234 = {6,10,-1,0,8,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch233 = {6,10,-1,0,8,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch232 = {6,10,-1,0,8,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x20,0x10,0x78,0x84,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch231 = {6,8,-1,2,8,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x6c,0x92,0x90,0x7c,0x12,0x6c, -}; - -static const BitmapCharRec ch230 = {7,6,0,0,8,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x30,0x48,0x30, -}; - -static const BitmapCharRec ch229 = {6,10,-1,0,8,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch228 = {6,10,-1,0,8,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch227 = {6,10,-1,0,8,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch226 = {6,10,-1,0,8,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch225 = {6,10,-1,0,8,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch224 = {6,10,-1,0,8,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0x80,0xb8,0xc4,0x84,0x84,0xf8,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch223 = {6,9,-1,1,8,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8,0x80, -}; - -static const BitmapCharRec ch222 = {6,9,-1,0,8,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x20,0x20,0x20,0x20,0x50,0x88,0x88,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch221 = {5,10,-1,0,8,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch220 = {6,10,-1,0,8,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch219 = {6,10,-1,0,8,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch218 = {6,10,-1,0,8,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch217 = {6,10,-1,0,8,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x80,0x78,0xc4,0xa4,0xa4,0xa4,0x94,0x94,0x8c,0x78,0x4, -}; - -static const BitmapCharRec ch216 = {6,11,-1,1,8,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x84,0x48,0x30,0x30,0x48,0x84, -}; - -static const BitmapCharRec ch215 = {6,6,-1,-1,8,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch214 = {7,10,0,0,8,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch213 = {7,10,0,0,8,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x24,0x18, -}; - -static const BitmapCharRec ch212 = {7,10,0,0,8,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch211 = {7,10,0,0,8,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x8,0x10, -}; - -static const BitmapCharRec ch210 = {7,10,0,0,8,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0x82,0x86,0x8a,0x92,0xa2,0xc2,0x82,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch209 = {7,10,0,0,8,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0xfc,0x42,0x42,0x42,0xe2,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch208 = {7,9,0,0,8,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x50,0x50, -}; - -static const BitmapCharRec ch207 = {5,10,-1,0,8,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch206 = {5,10,-1,0,8,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch205 = {5,10,-1,0,8,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch204 = {5,10,-1,0,8,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch203 = {6,10,-1,0,8,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch202 = {6,10,-1,0,8,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch201 = {6,10,-1,0,8,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch200 = {6,10,-1,0,8,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x20,0x10,0x78,0x84,0x80,0x80,0x80,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch199 = {6,11,-1,2,8,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0x9e,0x90,0x90,0xf0,0x9c,0x90,0x90,0x90,0x6e, -}; - -static const BitmapCharRec ch198 = {7,9,0,0,8,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x30,0x48,0x30, -}; - -static const BitmapCharRec ch197 = {6,10,-1,0,8,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch196 = {6,10,-1,0,8,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch195 = {6,10,-1,0,8,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch194 = {6,10,-1,0,8,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch193 = {6,10,-1,0,8,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch192 = {6,10,-1,0,8,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x78,0x84,0x84,0x80,0x40,0x20,0x20,0x0,0x20, -}; - -static const BitmapCharRec ch191 = {6,9,-1,0,8,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x6,0x1a,0x12,0xa,0x66,0x92,0x10,0x20,0x90,0x60, -}; - -static const BitmapCharRec ch190 = {7,10,0,0,8,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x1e,0x10,0xc,0x2,0xf2,0x4c,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch189 = {7,10,0,0,8,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x6,0x1a,0x12,0xa,0xe6,0x42,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch188 = {7,10,0,0,8,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0x90,0x48,0x24,0x12,0x24,0x48,0x90, -}; - -static const BitmapCharRec ch187 = {7,7,0,-1,8,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xf0,0x0,0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch186 = {4,6,-1,-3,8,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0xe0,0x40,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch185 = {3,6,-1,-4,8,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0xc0,0x40, -}; - -static const BitmapCharRec ch184 = {2,2,-3,2,8,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0xc0, -}; - -static const BitmapCharRec ch183 = {2,1,-3,-4,8,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x7c, -}; - -static const BitmapCharRec ch182 = {6,9,-1,0,8,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x80,0xb4,0xcc,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch181 = {6,7,-1,1,8,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0x80,0x40, -}; - -static const BitmapCharRec ch180 = {2,2,-3,-8,8,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0x60,0x90,0x10,0x20,0x90,0x60, -}; - -static const BitmapCharRec ch179 = {4,6,-1,-4,8,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xf0,0x80,0x60,0x10,0x90,0x60, -}; - -static const BitmapCharRec ch178 = {4,6,-1,-4,8,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xf8,0x0,0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch177 = {5,7,-1,-1,8,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch176 = {4,4,-2,-5,8,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xfc, -}; - -static const BitmapCharRec ch175 = {6,1,-1,-8,8,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x38,0x44,0xaa,0xb2,0xaa,0xaa,0x92,0x44,0x38, -}; - -static const BitmapCharRec ch174 = {7,9,0,-1,8,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xfc, -}; - -static const BitmapCharRec ch173 = {6,1,-1,-4,8,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x4,0x4,0x4,0xfc, -}; - -static const BitmapCharRec ch172 = {6,4,-1,-1,8,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x12,0x24,0x48,0x90,0x48,0x24,0x12, -}; - -static const BitmapCharRec ch171 = {7,7,0,-1,8,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xf8,0x0,0x78,0x88,0x78,0x8,0x70, -}; - -static const BitmapCharRec ch170 = {5,7,-1,-2,8,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x38,0x44,0x92,0xaa,0xa2,0xaa,0x92,0x44,0x38, -}; - -static const BitmapCharRec ch169 = {7,9,0,-1,8,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xd8, -}; - -static const BitmapCharRec ch168 = {5,1,-1,-8,8,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x60,0x90,0x10,0x60,0x90,0x90,0x60,0x80,0x90,0x60, -}; - -static const BitmapCharRec ch167 = {4,10,-2,0,8,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0x80,0x80,0x80,0x80,0x0,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch166 = {1,9,-3,0,8,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x10,0x10,0x7c,0x10,0x7c,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch165 = {7,9,0,0,8,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0x84,0x78,0x48,0x48,0x78,0x84, -}; - -static const BitmapCharRec ch164 = {6,6,-1,-1,8,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xdc,0x62,0x20,0x20,0x20,0x70,0x20,0x22,0x1c, -}; - -static const BitmapCharRec ch163 = {7,9,0,0,8,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x20,0x70,0xa8,0xa0,0xa0,0xa8,0x70,0x20, -}; - -static const BitmapCharRec ch162 = {5,8,-1,-1,8,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch161 = {1,9,-3,0,8,ch161data}; - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x90,0xa8,0x48, -}; - -static const BitmapCharRec ch126 = {5,3,-1,-6,8,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0xe0,0x10,0x10,0x20,0x18,0x20,0x10,0x10,0xe0, -}; - -static const BitmapCharRec ch125 = {5,9,-1,0,8,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch124 = {1,9,-3,0,8,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x38,0x40,0x40,0x20,0xc0,0x20,0x40,0x40,0x38, -}; - -static const BitmapCharRec ch123 = {5,9,-2,0,8,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xfc,0x40,0x20,0x10,0x8,0xfc, -}; - -static const BitmapCharRec ch122 = {6,6,-1,0,8,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch121 = {6,8,-1,2,8,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0x84,0x48,0x30,0x30,0x48,0x84, -}; - -static const BitmapCharRec ch120 = {6,6,-1,0,8,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x44,0xaa,0x92,0x92,0x82,0x82, -}; - -static const BitmapCharRec ch119 = {7,6,0,0,8,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x20,0x50,0x50,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch118 = {5,6,-1,0,8,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x74,0x88,0x88,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch117 = {6,6,-1,0,8,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x38,0x44,0x40,0x40,0x40,0xf8,0x40,0x40, -}; - -static const BitmapCharRec ch116 = {6,8,-1,0,8,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0x78,0x84,0x18,0x60,0x84,0x78, -}; - -static const BitmapCharRec ch115 = {6,6,-1,0,8,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0x40,0x40,0x40,0x40,0x44,0xb8, -}; - -static const BitmapCharRec ch114 = {6,6,-1,0,8,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x4,0x4,0x4,0x74,0x8c,0x84,0x8c,0x74, -}; - -static const BitmapCharRec ch113 = {6,8,-1,2,8,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0x80,0x80,0x80,0xb8,0xc4,0x84,0xc4,0xb8, -}; - -static const BitmapCharRec ch112 = {6,8,-1,2,8,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x78,0x84,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch111 = {6,6,-1,0,8,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0x84,0x84,0x84,0x84,0xc4,0xb8, -}; - -static const BitmapCharRec ch110 = {6,6,-1,0,8,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0x82,0x92,0x92,0x92,0x92,0xec, -}; - -static const BitmapCharRec ch109 = {7,6,0,0,8,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x60, -}; - -static const BitmapCharRec ch108 = {5,9,-1,0,8,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0x84,0x88,0x90,0xe0,0x90,0x88,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch107 = {6,9,-1,0,8,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0x70,0x88,0x88,0x8,0x8,0x8,0x8,0x18,0x0,0x8, -}; - -static const BitmapCharRec ch106 = {5,10,-1,2,8,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x20, -}; - -static const BitmapCharRec ch105 = {5,8,-1,0,8,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0x84,0x84,0x84,0x84,0xc4,0xb8,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch104 = {6,9,-1,0,8,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x78,0x84,0x78,0x80,0x70,0x88,0x88,0x74, -}; - -static const BitmapCharRec ch103 = {6,8,-1,2,8,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x40,0x40,0x40,0x40,0xf8,0x40,0x40,0x44,0x38, -}; - -static const BitmapCharRec ch102 = {6,9,-1,0,8,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x78,0x84,0x80,0xfc,0x84,0x78, -}; - -static const BitmapCharRec ch101 = {6,6,-1,0,8,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x74,0x8c,0x84,0x84,0x8c,0x74,0x4,0x4,0x4, -}; - -static const BitmapCharRec ch100 = {6,9,-1,0,8,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x78,0x84,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch99 = {6,6,-1,0,8,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xb8,0xc4,0x84,0x84,0xc4,0xb8,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch98 = {6,9,-1,0,8,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78, -}; - -static const BitmapCharRec ch97 = {6,6,-1,0,8,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0x10,0x60,0xe0, -}; - -static const BitmapCharRec ch96 = {4,3,-2,-6,8,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xfe, -}; - -static const BitmapCharRec ch95 = {7,1,0,1,8,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x88,0x50,0x20, -}; - -static const BitmapCharRec ch94 = {5,3,-1,-6,8,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xf0, -}; - -static const BitmapCharRec ch93 = {4,9,-1,0,8,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x2,0x2,0x4,0x8,0x10,0x20,0x40,0x80,0x80, -}; - -static const BitmapCharRec ch92 = {7,9,0,0,8,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xf0, -}; - -static const BitmapCharRec ch91 = {4,9,-2,0,8,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xfc,0x80,0x80,0x40,0x20,0x10,0x8,0x4,0xfc, -}; - -static const BitmapCharRec ch90 = {6,9,-1,0,8,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x10,0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch89 = {7,9,0,0,8,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0x82,0x82,0x44,0x28,0x10,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch88 = {7,9,0,0,8,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x44,0xaa,0x92,0x92,0x92,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch87 = {7,9,0,0,8,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x10,0x28,0x28,0x28,0x44,0x44,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch86 = {7,9,0,0,8,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch85 = {6,9,-1,0,8,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe, -}; - -static const BitmapCharRec ch84 = {7,9,0,0,8,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x78,0x84,0x4,0x4,0x78,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch83 = {6,9,-1,0,8,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0x84,0x88,0x90,0xa0,0xf8,0x84,0x84,0x84,0xf8, -}; - -static const BitmapCharRec ch82 = {6,9,-1,0,8,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x4,0x78,0x94,0xa4,0x84,0x84,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch81 = {6,10,-1,1,8,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0x80,0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8, -}; - -static const BitmapCharRec ch80 = {6,9,-1,0,8,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch79 = {6,9,-1,0,8,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0x84,0x84,0x84,0x8c,0x94,0xa4,0xc4,0x84,0x84, -}; - -static const BitmapCharRec ch78 = {6,9,-1,0,8,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0x82,0x82,0x82,0x92,0x92,0xaa,0xc6,0x82,0x82, -}; - -static const BitmapCharRec ch77 = {7,9,0,0,8,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xfc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch76 = {6,9,-1,0,8,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0x84,0x88,0x90,0xa0,0xc0,0xa0,0x90,0x88,0x84, -}; - -static const BitmapCharRec ch75 = {6,9,-1,0,8,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x70,0x88,0x8,0x8,0x8,0x8,0x8,0x8,0x3c, -}; - -static const BitmapCharRec ch74 = {6,9,-1,0,8,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8, -}; - -static const BitmapCharRec ch73 = {5,9,-1,0,8,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0x84,0x84,0x84,0x84,0xfc,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch72 = {6,9,-1,0,8,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x74,0x8c,0x84,0x9c,0x80,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch71 = {6,9,-1,0,8,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0x80,0x80,0x80,0x80,0xf0,0x80,0x80,0x80,0xfc, -}; - -static const BitmapCharRec ch70 = {6,9,-1,0,8,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xfc,0x80,0x80,0x80,0xf0,0x80,0x80,0x80,0xfc, -}; - -static const BitmapCharRec ch69 = {6,9,-1,0,8,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xfc,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch68 = {7,9,0,0,8,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x78,0x84,0x80,0x80,0x80,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch67 = {6,9,-1,0,8,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xfc,0x42,0x42,0x42,0x7c,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch66 = {7,9,0,0,8,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0x84,0x84,0x84,0xfc,0x84,0x84,0x84,0x48,0x30, -}; - -static const BitmapCharRec ch65 = {6,9,-1,0,8,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x78,0x80,0x94,0xac,0xa4,0x9c,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch64 = {6,9,-1,0,8,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x10,0x0,0x10,0x10,0x8,0x4,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch63 = {6,9,-1,0,8,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0x80,0x40,0x20,0x10,0x8,0x10,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch62 = {5,9,-1,0,8,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xfc,0x0,0x0,0xfc, -}; - -static const BitmapCharRec ch61 = {6,4,-1,-2,8,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x8,0x10,0x20,0x40,0x80,0x40,0x20,0x10,0x8, -}; - -static const BitmapCharRec ch60 = {5,9,-2,0,8,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x60,0x70,0x0,0x0,0x20,0x70,0x20, -}; - -static const BitmapCharRec ch59 = {4,8,-1,1,8,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0x40,0xe0,0x40,0x0,0x0,0x40,0xe0,0x40, -}; - -static const BitmapCharRec ch58 = {3,8,-2,1,8,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0x70,0x8,0x4,0x4,0x74,0x8c,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch57 = {6,9,-1,0,8,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x78,0x84,0x84,0x84,0x78,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch56 = {6,9,-1,0,8,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x40,0x40,0x20,0x20,0x10,0x10,0x8,0x4,0xfc, -}; - -static const BitmapCharRec ch55 = {6,9,-1,0,8,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x78,0x84,0x84,0xc4,0xb8,0x80,0x80,0x40,0x38, -}; - -static const BitmapCharRec ch54 = {6,9,-1,0,8,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x78,0x84,0x4,0x4,0xc4,0xb8,0x80,0x80,0xfc, -}; - -static const BitmapCharRec ch53 = {6,9,-1,0,8,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x8,0x8,0xfc,0x88,0x88,0x48,0x28,0x18,0x8, -}; - -static const BitmapCharRec ch52 = {6,9,-1,0,8,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x78,0x84,0x4,0x4,0x38,0x10,0x8,0x4,0xfc, -}; - -static const BitmapCharRec ch51 = {6,9,-1,0,8,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xfc,0x80,0x40,0x30,0x8,0x4,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch50 = {6,9,-1,0,8,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xa0,0x60,0x20, -}; - -static const BitmapCharRec ch49 = {5,9,-1,0,8,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x30,0x48,0x84,0x84,0x84,0x84,0x84,0x48,0x30, -}; - -static const BitmapCharRec ch48 = {6,9,-1,0,8,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0x80,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0x2, -}; - -static const BitmapCharRec ch47 = {7,9,0,0,8,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0x40,0xe0,0x40, -}; - -static const BitmapCharRec ch46 = {3,3,-2,1,8,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xfc, -}; - -static const BitmapCharRec ch45 = {6,1,-1,-4,8,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x60,0x70, -}; - -static const BitmapCharRec ch44 = {4,3,-1,1,8,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch43 = {5,5,-1,-2,8,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0x48,0x30,0xfc,0x30,0x48, -}; - -static const BitmapCharRec ch42 = {6,5,-1,-2,8,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x40,0x20,0x20,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {3,9,-2,0,8,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x20,0x40,0x40,0x80,0x80,0x80,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch40 = {3,9,-3,0,8,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x80,0x60,0x70, -}; - -static const BitmapCharRec ch39 = {4,3,-1,-6,8,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x74,0x88,0x94,0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch38 = {6,7,-1,0,8,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x88,0x54,0x48,0x20,0x10,0x10,0x48,0xa4,0x44, -}; - -static const BitmapCharRec ch37 = {6,9,-1,0,8,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x20,0xf0,0x28,0x70,0xa0,0x78,0x20, -}; - -static const BitmapCharRec ch36 = {5,7,-1,-1,8,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x48,0x48,0xfc,0x48,0xfc,0x48,0x48, -}; - -static const BitmapCharRec ch35 = {6,7,-1,-1,8,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0x90,0x90,0x90, -}; - -static const BitmapCharRec ch34 = {4,3,-2,-6,8,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch33 = {1,9,-3,0,8,ch33data}; - -/* char: 0x1f */ - -static const GLubyte ch31data[] = { -0x80, -}; - -static const BitmapCharRec ch31 = {1,1,-3,-3,8,ch31data}; - -/* char: 0x1e */ - -static const GLubyte ch30data[] = { -0xdc,0x62,0x20,0x20,0x20,0x70,0x20,0x22,0x1c, -}; - -static const BitmapCharRec ch30 = {7,9,0,0,8,ch30data}; - -/* char: 0x1d */ - -static const GLubyte ch29data[] = { -0x80,0x40,0xfe,0x10,0xfe,0x4,0x2, -}; - -static const BitmapCharRec ch29 = {7,7,0,0,8,ch29data}; - -/* char: 0x1c */ - -static const GLubyte ch28data[] = { -0x88,0x48,0x48,0x48,0x48,0xfc, -}; - -static const BitmapCharRec ch28 = {6,6,-1,0,8,ch28data}; - -/* char: 0x1b */ - -static const GLubyte ch27data[] = { -0xfe,0x80,0x20,0x8,0x2,0x8,0x20,0x80, -}; - -static const BitmapCharRec ch27 = {7,8,0,0,8,ch27data}; - -/* char: 0x1a */ - -static const GLubyte ch26data[] = { -0xfe,0x2,0x8,0x20,0x80,0x20,0x8,0x2, -}; - -static const BitmapCharRec ch26 = {7,8,0,0,8,ch26data}; - -/* char: 0x19 */ - -static const GLubyte ch25data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch25 = {1,13,-3,2,8,ch25data}; - -/* char: 0x18 */ - -static const GLubyte ch24data[] = { -0x10,0x10,0x10,0x10,0x10,0xff, -}; - -static const BitmapCharRec ch24 = {8,6,0,2,8,ch24data}; - -/* char: 0x17 */ - -static const GLubyte ch23data[] = { -0xff,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch23 = {8,8,0,-3,8,ch23data}; - -/* char: 0x16 */ - -static const GLubyte ch22data[] = { -0x10,0x10,0x10,0x10,0x10,0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch22 = {4,13,0,2,8,ch22data}; - -/* char: 0x15 */ - -static const GLubyte ch21data[] = { -0x80,0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch21 = {5,13,-3,2,8,ch21data}; - -/* char: 0x14 */ - -static const GLubyte ch20data[] = { -0xff, -}; - -static const BitmapCharRec ch20 = {8,1,0,1,8,ch20data}; - -/* char: 0x13 */ - -static const GLubyte ch19data[] = { -0xff, -}; - -static const BitmapCharRec ch19 = {8,1,0,-1,8,ch19data}; - -/* char: 0x12 */ - -static const GLubyte ch18data[] = { -0xff, -}; - -static const BitmapCharRec ch18 = {8,1,0,-3,8,ch18data}; - -/* char: 0x11 */ - -static const GLubyte ch17data[] = { -0xff, -}; - -static const BitmapCharRec ch17 = {8,1,0,-5,8,ch17data}; - -/* char: 0x10 */ - -static const GLubyte ch16data[] = { -0xff, -}; - -static const BitmapCharRec ch16 = {8,1,0,-7,8,ch16data}; - -/* char: 0xf */ - -static const GLubyte ch15data[] = { -0x10,0x10,0x10,0x10,0x10,0xff,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch15 = {8,13,0,2,8,ch15data}; - -/* char: 0xe */ - -static const GLubyte ch14data[] = { -0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch14 = {5,8,-3,-3,8,ch14data}; - -/* char: 0xd */ - -static const GLubyte ch13data[] = { -0x80,0x80,0x80,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch13 = {5,6,-3,2,8,ch13data}; - -/* char: 0xc */ - -static const GLubyte ch12data[] = { -0x10,0x10,0x10,0x10,0x10,0xf0, -}; - -static const BitmapCharRec ch12 = {4,6,0,2,8,ch12data}; - -/* char: 0xb */ - -static const GLubyte ch11data[] = { -0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch11 = {4,8,0,-3,8,ch11data}; - -/* char: 0xa */ - -static const GLubyte ch10data[] = { -0x8,0x8,0x8,0x8,0x3e,0x20,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch10 = {7,9,0,2,8,ch10data}; - -/* char: 0x9 */ - -static const GLubyte ch9data[] = { -0x3e,0x20,0x20,0x20,0x88,0x98,0xa8,0xc8,0x88, -}; - -static const BitmapCharRec ch9 = {7,9,0,2,8,ch9data}; - -/* char: 0x8 */ - -static const GLubyte ch8data[] = { -0xfe,0x10,0x10,0xfe,0x10,0x10, -}; - -static const BitmapCharRec ch8 = {7,6,0,0,8,ch8data}; - -/* char: 0x7 */ - -static const GLubyte ch7data[] = { -0x70,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch7 = {5,4,-1,-5,8,ch7data}; - -/* char: 0x6 */ - -static const GLubyte ch6data[] = { -0x20,0x20,0x3c,0x20,0x3e,0xf8,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch6 = {7,9,0,2,8,ch6data}; - -/* char: 0x5 */ - -static const GLubyte ch5data[] = { -0x22,0x22,0x3c,0x22,0x3c,0x78,0x80,0x80,0x78, -}; - -static const BitmapCharRec ch5 = {7,9,0,2,8,ch5data}; - -/* char: 0x4 */ - -static const GLubyte ch4data[] = { -0x10,0x10,0x1c,0x10,0x9e,0x80,0xe0,0x80,0xf0, -}; - -static const BitmapCharRec ch4 = {7,9,0,2,8,ch4data}; - -/* char: 0x3 */ - -static const GLubyte ch3data[] = { -0x8,0x8,0x8,0x3e,0x88,0x88,0xf8,0x88,0x88, -}; - -static const BitmapCharRec ch3 = {7,9,0,2,8,ch3data}; - -/* char: 0x2 */ - -static const GLubyte ch2data[] = { -0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa, -}; - -static const BitmapCharRec ch2 = {8,12,0,2,8,ch2data}; - -/* char: 0x1 */ - -static const GLubyte ch1data[] = { -0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10, -}; - -static const BitmapCharRec ch1 = {7,7,0,-1,8,ch1data}; - -static const BitmapCharRec * const chars[] = { -&ch0, -&ch1, -&ch2, -&ch3, -&ch4, -&ch5, -&ch6, -&ch7, -&ch8, -&ch9, -&ch10, -&ch11, -&ch12, -&ch13, -&ch14, -&ch15, -&ch16, -&ch17, -&ch18, -&ch19, -&ch20, -&ch21, -&ch22, -&ch23, -&ch24, -&ch25, -&ch26, -&ch27, -&ch28, -&ch29, -&ch30, -&ch31, -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -&ch127, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -const BitmapFontRec glutBitmap8By13 = { -"-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1", -256, -0, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_9x15.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_9x15.c deleted file mode 100644 index 2d5c004e47..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_9x15.c +++ /dev/null @@ -1,2075 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmap9By15 XXX -#include "glutbitmap.h" -#undef glutBitmap9By15 - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch0data[] = { 0x0 }; -static const BitmapCharRec ch0 = {1,1,0,0,9,ch0data}; -#else -static const BitmapCharRec ch0 = {0,0,0,0,9,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,9,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,9,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch127data[] = { 0x0 }; -static const BitmapCharRec ch127 = {1,1,0,0,9,ch127data}; -#else -static const BitmapCharRec ch127 = {0,0,0,0,9,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,9,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,9,0}; -#endif - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch255 = {6,14,-1,3,9,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0x80,0x80,0x80,0xbc,0xc2,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80, -}; - -static const BitmapCharRec ch254 = {7,12,-1,3,9,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch253 = {6,14,-1,3,9,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch252 = {7,11,-1,0,9,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch251 = {7,11,-1,0,9,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch250 = {7,11,-1,0,9,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch249 = {7,11,-1,0,9,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0x80,0x7c,0xa2,0xa2,0x92,0x8a,0x8a,0x7c,0x2, -}; - -static const BitmapCharRec ch248 = {7,9,-1,1,9,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x10,0x38,0x10,0x0,0xfe,0x0,0x10,0x38,0x10, -}; - -static const BitmapCharRec ch247 = {7,9,-1,0,9,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch246 = {7,11,-1,0,9,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch245 = {7,11,-1,0,9,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch244 = {7,11,-1,0,9,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch243 = {7,11,-1,0,9,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch242 = {7,11,-1,0,9,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0x82,0x82,0x82,0x82,0x82,0xc2,0xbc,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch241 = {7,11,-1,0,9,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x8,0x50,0x30,0x48, -}; - -static const BitmapCharRec ch240 = {7,11,-1,0,9,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x50,0x50, -}; - -static const BitmapCharRec ch239 = {5,11,-2,0,9,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x90,0x60, -}; - -static const BitmapCharRec ch238 = {5,11,-2,0,9,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x60,0x10, -}; - -static const BitmapCharRec ch237 = {5,11,-2,0,9,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x30,0x40, -}; - -static const BitmapCharRec ch236 = {5,11,-2,0,9,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch235 = {7,11,-1,0,9,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch234 = {7,11,-1,0,9,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch233 = {7,11,-1,0,9,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch232 = {7,11,-1,0,9,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x30,0x48,0x18,0x7c,0x82,0x80,0x80,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch231 = {7,10,-1,3,9,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x6e,0x92,0x90,0x7c,0x12,0x92,0x6c, -}; - -static const BitmapCharRec ch230 = {7,7,-1,0,9,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x18,0x24,0x18, -}; - -static const BitmapCharRec ch229 = {7,11,-1,0,9,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch228 = {7,11,-1,0,9,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch227 = {7,11,-1,0,9,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch226 = {7,11,-1,0,9,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch225 = {7,11,-1,0,9,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch224 = {7,11,-1,0,9,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0x80,0xbc,0xc2,0x82,0x82,0xfc,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch223 = {7,9,-1,1,9,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0x80,0x80,0x80,0xfc,0x82,0x82,0x82,0xfc,0x80,0x80, -}; - -static const BitmapCharRec ch222 = {7,10,-1,0,9,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch221 = {7,11,-1,0,9,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch220 = {7,11,-1,0,9,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch219 = {7,11,-1,0,9,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch218 = {7,11,-1,0,9,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch217 = {7,11,-1,0,9,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x80,0x7c,0xc2,0xa2,0xa2,0x92,0x92,0x8a,0x8a,0x86,0x7c,0x2, -}; - -static const BitmapCharRec ch216 = {7,12,-1,1,9,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x82,0x44,0x28,0x10,0x28,0x44,0x82, -}; - -static const BitmapCharRec ch215 = {7,7,-1,-1,9,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch214 = {7,11,-1,0,9,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch213 = {7,11,-1,0,9,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch212 = {7,11,-1,0,9,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch211 = {7,11,-1,0,9,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch210 = {7,11,-1,0,9,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0x82,0x86,0x8a,0x92,0x92,0xa2,0xc2,0x82,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch209 = {7,11,-1,0,9,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0xfc,0x42,0x42,0x42,0x42,0xf2,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch208 = {7,10,-1,0,9,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x50,0x50, -}; - -static const BitmapCharRec ch207 = {5,11,-2,0,9,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x88,0x70, -}; - -static const BitmapCharRec ch206 = {5,11,-2,0,9,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x60,0x10, -}; - -static const BitmapCharRec ch205 = {5,11,-2,0,9,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x30,0x40, -}; - -static const BitmapCharRec ch204 = {5,11,-2,0,9,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch203 = {7,11,-1,0,9,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch202 = {7,11,-1,0,9,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch201 = {7,11,-1,0,9,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch200 = {7,11,-1,0,9,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x30,0x48,0x18,0x7c,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch199 = {7,13,-1,3,9,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0x9e,0x90,0x90,0x90,0xfc,0x90,0x90,0x90,0x90,0x6e, -}; - -static const BitmapCharRec ch198 = {7,10,-1,0,9,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x10,0x28,0x10, -}; - -static const BitmapCharRec ch197 = {7,11,-1,0,9,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch196 = {7,11,-1,0,9,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch195 = {7,11,-1,0,9,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch194 = {7,11,-1,0,9,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch193 = {7,11,-1,0,9,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch192 = {7,11,-1,0,9,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x7c,0x82,0x82,0x80,0x40,0x20,0x10,0x10,0x0,0x10, -}; - -static const BitmapCharRec ch191 = {7,10,-1,0,9,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x6,0x1a,0x12,0xa,0x66,0x92,0x10,0x20,0x90,0x60, -}; - -static const BitmapCharRec ch190 = {7,10,-1,0,9,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x1e,0x10,0xc,0x2,0xf2,0x4c,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch189 = {7,10,-1,0,9,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x6,0x1a,0x12,0xa,0xe6,0x42,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch188 = {7,10,-1,0,9,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0x90,0x48,0x24,0x12,0x12,0x24,0x48,0x90, -}; - -static const BitmapCharRec ch187 = {7,8,-1,-1,9,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xf8,0x0,0x70,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch186 = {5,6,-1,-5,9,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0xe0,0x40,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch185 = {3,6,-1,-4,9,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0x60,0x90,0x30, -}; - -static const BitmapCharRec ch184 = {4,3,-2,3,9,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch183 = {2,2,-4,-4,9,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0xa,0xa,0xa,0xa,0xa,0x7a,0x8a,0x8a,0x8a,0x7e, -}; - -static const BitmapCharRec ch182 = {7,10,-1,0,9,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x80,0x80,0xba,0xc6,0x82,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch181 = {7,9,-1,2,9,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0xc0,0x20, -}; - -static const BitmapCharRec ch180 = {3,2,-3,-9,9,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0x60,0x90,0x10,0x20,0x90,0x60, -}; - -static const BitmapCharRec ch179 = {4,6,-1,-4,9,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xf0,0x80,0x60,0x10,0x90,0x60, -}; - -static const BitmapCharRec ch178 = {4,6,-1,-4,9,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xfe,0x0,0x10,0x10,0x10,0xfe,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch177 = {7,9,-1,-1,9,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch176 = {4,4,-3,-6,9,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xfc, -}; - -static const BitmapCharRec ch175 = {6,1,-1,-9,9,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x3c,0x42,0xa5,0xa9,0xbd,0xa5,0xb9,0x42,0x3c, -}; - -static const BitmapCharRec ch174 = {8,9,0,-1,9,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xfc, -}; - -static const BitmapCharRec ch173 = {6,1,-1,-4,9,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x4,0x4,0x4,0xfc, -}; - -static const BitmapCharRec ch172 = {6,4,-1,-2,9,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x12,0x24,0x48,0x90,0x90,0x48,0x24,0x12, -}; - -static const BitmapCharRec ch171 = {7,8,-1,-1,9,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xf8,0x0,0x78,0x90,0x70,0x90,0x60, -}; - -static const BitmapCharRec ch170 = {5,7,-3,-3,9,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x3c,0x42,0x99,0xa5,0xa1,0xa5,0x99,0x42,0x3c, -}; - -static const BitmapCharRec ch169 = {8,9,0,-1,9,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xa0,0xa0, -}; - -static const BitmapCharRec ch168 = {3,2,-3,-9,9,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x70,0x88,0x8,0x70,0x88,0x88,0x88,0x70,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch167 = {5,11,-2,1,9,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch166 = {1,11,-4,1,9,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x10,0x10,0x10,0x7c,0x10,0x7c,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch165 = {7,10,-1,0,9,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0x82,0x7c,0x44,0x44,0x7c,0x82, -}; - -static const BitmapCharRec ch164 = {7,6,-1,-3,9,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0x5c,0xa2,0x60,0x20,0x20,0xf8,0x20,0x20,0x22,0x1c, -}; - -static const BitmapCharRec ch163 = {7,10,-1,0,9,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x40,0x78,0xa4,0xa0,0x90,0x94,0x78,0x8, -}; - -static const BitmapCharRec ch162 = {6,8,-1,0,9,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x0,0x80,0x80, -}; - -static const BitmapCharRec ch161 = {1,11,-4,0,9,ch161data}; - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x8c,0x92,0x62, -}; - -static const BitmapCharRec ch126 = {7,3,-1,-7,9,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0xe0,0x10,0x10,0x10,0x20,0x18,0x18,0x20,0x10,0x10,0x10,0xe0, -}; - -static const BitmapCharRec ch125 = {5,12,-1,1,9,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch124 = {1,12,-4,1,9,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x38,0x40,0x40,0x40,0x20,0xc0,0xc0,0x20,0x40,0x40,0x40,0x38, -}; - -static const BitmapCharRec ch123 = {5,12,-3,1,9,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xfe,0x40,0x20,0x10,0x8,0x4,0xfe, -}; - -static const BitmapCharRec ch122 = {7,7,-1,0,9,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch121 = {6,10,-1,3,9,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0x82,0x44,0x28,0x10,0x28,0x44,0x82, -}; - -static const BitmapCharRec ch120 = {7,7,-1,0,9,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x44,0xaa,0x92,0x92,0x92,0x82,0x82, -}; - -static const BitmapCharRec ch119 = {7,7,-1,0,9,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x10,0x28,0x28,0x44,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch118 = {7,7,-1,0,9,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x7a,0x84,0x84,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch117 = {7,7,-1,0,9,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x1c,0x22,0x20,0x20,0x20,0x20,0xfc,0x20,0x20, -}; - -static const BitmapCharRec ch116 = {7,9,-1,0,9,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0x7c,0x82,0x2,0x7c,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch115 = {7,7,-1,0,9,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0x40,0x40,0x40,0x40,0x42,0x62,0x9c, -}; - -static const BitmapCharRec ch114 = {7,7,-1,0,9,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x2,0x2,0x2,0x7a,0x86,0x82,0x82,0x82,0x86,0x7a, -}; - -static const BitmapCharRec ch113 = {7,10,-1,3,9,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0x80,0x80,0x80,0xbc,0xc2,0x82,0x82,0x82,0xc2,0xbc, -}; - -static const BitmapCharRec ch112 = {7,10,-1,3,9,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch111 = {7,7,-1,0,9,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0x82,0x82,0x82,0x82,0x82,0xc2,0xbc, -}; - -static const BitmapCharRec ch110 = {7,7,-1,0,9,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0x82,0x92,0x92,0x92,0x92,0x92,0xec, -}; - -static const BitmapCharRec ch109 = {7,7,-1,0,9,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xe0, -}; - -static const BitmapCharRec ch108 = {5,10,-2,0,9,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0x82,0x8c,0xb0,0xc0,0xb0,0x8c,0x82,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch107 = {7,10,-1,0,9,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0x78,0x84,0x84,0x84,0x4,0x4,0x4,0x4,0x4,0x1c,0x0,0x0,0xc, -}; - -static const BitmapCharRec ch106 = {6,13,-1,3,9,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x60, -}; - -static const BitmapCharRec ch105 = {5,10,-2,0,9,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0x82,0x82,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch104 = {7,10,-1,0,9,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x7c,0x82,0x82,0x7c,0x80,0x78,0x84,0x84,0x84,0x7a, -}; - -static const BitmapCharRec ch103 = {7,10,-1,3,9,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x20,0x20,0x20,0x20,0xf8,0x20,0x20,0x22,0x22,0x1c, -}; - -static const BitmapCharRec ch102 = {7,10,-1,0,9,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch101 = {7,7,-1,0,9,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x7a,0x86,0x82,0x82,0x82,0x86,0x7a,0x2,0x2,0x2, -}; - -static const BitmapCharRec ch100 = {7,10,-1,0,9,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x7c,0x82,0x80,0x80,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch99 = {7,7,-1,0,9,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xbc,0xc2,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch98 = {7,10,-1,0,9,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c, -}; - -static const BitmapCharRec ch97 = {7,7,-1,0,9,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0x10,0x20,0x40,0xc0, -}; - -static const BitmapCharRec ch96 = {4,4,-3,-6,9,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xff, -}; - -static const BitmapCharRec ch95 = {8,1,0,1,9,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x82,0x44,0x28,0x10, -}; - -static const BitmapCharRec ch94 = {7,4,-1,-6,9,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xf0, -}; - -static const BitmapCharRec ch93 = {4,12,-2,1,9,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x2,0x4,0x4,0x8,0x10,0x10,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch92 = {7,10,-1,0,9,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xf0, -}; - -static const BitmapCharRec ch91 = {4,12,-3,1,9,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xfe,0x80,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0xfe, -}; - -static const BitmapCharRec ch90 = {7,10,-1,0,9,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x10,0x10,0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch89 = {7,10,-1,0,9,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0x82,0x82,0x44,0x28,0x10,0x10,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch88 = {7,10,-1,0,9,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x44,0xaa,0x92,0x92,0x92,0x92,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch87 = {7,10,-1,0,9,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x10,0x28,0x28,0x28,0x44,0x44,0x44,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch86 = {7,10,-1,0,9,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch85 = {7,10,-1,0,9,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe, -}; - -static const BitmapCharRec ch84 = {7,10,-1,0,9,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x7c,0x82,0x82,0x2,0xc,0x70,0x80,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch83 = {7,10,-1,0,9,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0x82,0x82,0x84,0x88,0x90,0xfc,0x82,0x82,0x82,0xfc, -}; - -static const BitmapCharRec ch82 = {7,10,-1,0,9,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x6,0x8,0x7c,0x92,0xa2,0x82,0x82,0x82,0x82,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch81 = {7,12,-1,2,9,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0x80,0x80,0x80,0x80,0x80,0xfc,0x82,0x82,0x82,0xfc, -}; - -static const BitmapCharRec ch80 = {7,10,-1,0,9,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch79 = {7,10,-1,0,9,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0x82,0x82,0x82,0x86,0x8a,0x92,0xa2,0xc2,0x82,0x82, -}; - -static const BitmapCharRec ch78 = {7,10,-1,0,9,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0x82,0x82,0x82,0x92,0x92,0xaa,0xaa,0xc6,0x82,0x82, -}; - -static const BitmapCharRec ch77 = {7,10,-1,0,9,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xfe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch76 = {7,10,-1,0,9,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0x82,0x84,0x88,0x90,0xa0,0xe0,0x90,0x88,0x84,0x82, -}; - -static const BitmapCharRec ch75 = {7,10,-1,0,9,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x78,0x84,0x4,0x4,0x4,0x4,0x4,0x4,0x4,0x1e, -}; - -static const BitmapCharRec ch74 = {7,10,-1,0,9,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8, -}; - -static const BitmapCharRec ch73 = {5,10,-2,0,9,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0x82,0x82,0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch72 = {7,10,-1,0,9,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x7c,0x82,0x82,0x82,0x8e,0x80,0x80,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch71 = {7,10,-1,0,9,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0x40,0x40,0x40,0x40,0x40,0x78,0x40,0x40,0x40,0xfe, -}; - -static const BitmapCharRec ch70 = {7,10,-1,0,9,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xfe,0x40,0x40,0x40,0x40,0x78,0x40,0x40,0x40,0xfe, -}; - -static const BitmapCharRec ch69 = {7,10,-1,0,9,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xfc,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch68 = {7,10,-1,0,9,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x7c,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch67 = {7,10,-1,0,9,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xfc,0x42,0x42,0x42,0x42,0x7c,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch66 = {7,10,-1,0,9,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x44,0x28,0x10, -}; - -static const BitmapCharRec ch65 = {7,10,-1,0,9,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x7c,0x80,0x80,0x9a,0xa6,0xa2,0x9e,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch64 = {7,10,-1,0,9,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x10,0x0,0x10,0x10,0x8,0x4,0x2,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch63 = {7,10,-1,0,9,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0x80,0x40,0x20,0x10,0x8,0x8,0x10,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch62 = {5,10,-2,0,9,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xfe,0x0,0x0,0xfe, -}; - -static const BitmapCharRec ch61 = {7,4,-1,-2,9,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x8,0x10,0x20,0x40,0x80,0x80,0x40,0x20,0x10,0x8, -}; - -static const BitmapCharRec ch60 = {5,10,-2,0,9,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x40,0x40,0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch59 = {2,10,-4,3,9,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch58 = {2,7,-4,0,9,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0x78,0x4,0x2,0x2,0x7a,0x86,0x82,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch57 = {7,10,-1,0,9,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x38,0x44,0x82,0x82,0x44,0x38,0x44,0x82,0x44,0x38, -}; - -static const BitmapCharRec ch56 = {7,10,-1,0,9,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x40,0x40,0x20,0x20,0x10,0x8,0x4,0x2,0x2,0xfe, -}; - -static const BitmapCharRec ch55 = {7,10,-1,0,9,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x7c,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,0x40,0x3c, -}; - -static const BitmapCharRec ch54 = {7,10,-1,0,9,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x7c,0x82,0x2,0x2,0x2,0xc2,0xbc,0x80,0x80,0xfe, -}; - -static const BitmapCharRec ch53 = {7,10,-1,0,9,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x4,0x4,0x4,0xfe,0x84,0x44,0x24,0x14,0xc,0x4, -}; - -static const BitmapCharRec ch52 = {7,10,-1,0,9,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x7c,0x82,0x2,0x2,0x2,0x1c,0x8,0x4,0x2,0xfe, -}; - -static const BitmapCharRec ch51 = {7,10,-1,0,9,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xfe,0x80,0x40,0x30,0x8,0x4,0x2,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch50 = {7,10,-1,0,9,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0xfe,0x10,0x10,0x10,0x10,0x10,0x90,0x50,0x30,0x10, -}; - -static const BitmapCharRec ch49 = {7,10,-1,0,9,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x38,0x44,0x82,0x82,0x82,0x82,0x82,0x82,0x44,0x38, -}; - -static const BitmapCharRec ch48 = {7,10,-1,0,9,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0x80,0x40,0x40,0x20,0x10,0x10,0x8,0x4,0x4,0x2, -}; - -static const BitmapCharRec ch47 = {7,10,-1,0,9,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch46 = {2,2,-4,0,9,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xfe, -}; - -static const BitmapCharRec ch45 = {7,1,-1,-4,9,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x40,0x40,0xc0,0xc0, -}; - -static const BitmapCharRec ch44 = {2,5,-4,3,9,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x10,0x10,0x10,0xfe,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch43 = {7,7,-1,-1,9,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0x10,0x92,0x54,0x38,0x54,0x92,0x10, -}; - -static const BitmapCharRec ch42 = {7,7,-1,-1,9,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x20,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {3,12,-3,1,9,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch40 = {3,12,-3,1,9,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x80,0x40,0x20,0x30, -}; - -static const BitmapCharRec ch39 = {4,4,-3,-6,9,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x62,0x94,0x88,0x94,0x62,0x60,0x90,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch38 = {7,10,-1,0,9,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x84,0x4a,0x4a,0x24,0x10,0x10,0x48,0xa4,0xa4,0x42, -}; - -static const BitmapCharRec ch37 = {7,10,-1,0,9,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x10,0x7c,0x92,0x12,0x12,0x14,0x38,0x50,0x90,0x92,0x7c,0x10, -}; - -static const BitmapCharRec ch36 = {7,12,-1,1,9,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x48,0x48,0xfc,0x48,0x48,0xfc,0x48,0x48, -}; - -static const BitmapCharRec ch35 = {6,8,-1,-1,9,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0x90,0x90,0x90, -}; - -static const BitmapCharRec ch34 = {4,3,-3,-7,9,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0x80,0x80,0x0,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch33 = {1,11,-4,0,9,ch33data}; - -/* char: 0x1f */ - -static const GLubyte ch31data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch31 = {2,2,-4,-2,9,ch31data}; - -/* char: 0x1e */ - -static const GLubyte ch30data[] = { -0x5c,0xa2,0x60,0x20,0x20,0xf8,0x20,0x20,0x22,0x1c, -}; - -static const BitmapCharRec ch30 = {7,10,-1,0,9,ch30data}; - -/* char: 0x1d */ - -static const GLubyte ch29data[] = { -0x80,0x40,0xfe,0x10,0xfe,0x4,0x2, -}; - -static const BitmapCharRec ch29 = {7,7,-1,0,9,ch29data}; - -/* char: 0x1c */ - -static const GLubyte ch28data[] = { -0x44,0x24,0x24,0x24,0x24,0x24,0xfe, -}; - -static const BitmapCharRec ch28 = {7,7,-1,0,9,ch28data}; - -/* char: 0x1b */ - -static const GLubyte ch27data[] = { -0xfe,0x0,0x80,0x40,0x20,0x10,0x8,0x8,0x10,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch27 = {7,12,-1,2,9,ch27data}; - -/* char: 0x1a */ - -static const GLubyte ch26data[] = { -0xfc,0x0,0x4,0x8,0x10,0x20,0x40,0x40,0x20,0x10,0x8,0x4, -}; - -static const BitmapCharRec ch26 = {6,12,-2,2,9,ch26data}; - -/* char: 0x19 */ - -static const GLubyte ch25data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch25 = {1,15,-4,3,9,ch25data}; - -/* char: 0x18 */ - -static const GLubyte ch24data[] = { -0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xff,0x80, -}; - -static const BitmapCharRec ch24 = {9,7,0,3,9,ch24data}; - -/* char: 0x17 */ - -static const GLubyte ch23data[] = { -0xff,0x80,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, -0x8,0x0, -}; - -static const BitmapCharRec ch23 = {9,9,0,-3,9,ch23data}; - -/* char: 0x16 */ - -static const GLubyte ch22data[] = { -0x8,0x8,0x8,0x8,0x8,0x8,0xf8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8, -}; - -static const BitmapCharRec ch22 = {5,15,0,3,9,ch22data}; - -/* char: 0x15 */ - -static const GLubyte ch21data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch21 = {5,15,-4,3,9,ch21data}; - -/* char: 0x14 */ - -static const GLubyte ch20data[] = { -0xff,0x80, -}; - -static const BitmapCharRec ch20 = {9,1,0,1,9,ch20data}; - -/* char: 0x13 */ - -static const GLubyte ch19data[] = { -0xff,0x80, -}; - -static const BitmapCharRec ch19 = {9,1,0,-1,9,ch19data}; - -/* char: 0x12 */ - -static const GLubyte ch18data[] = { -0xff,0x80, -}; - -static const BitmapCharRec ch18 = {9,1,0,-3,9,ch18data}; - -/* char: 0x11 */ - -static const GLubyte ch17data[] = { -0xff,0x80, -}; - -static const BitmapCharRec ch17 = {9,1,0,-5,9,ch17data}; - -/* char: 0x10 */ - -static const GLubyte ch16data[] = { -0xff,0x80, -}; - -static const BitmapCharRec ch16 = {9,1,0,-7,9,ch16data}; - -/* char: 0xf */ - -static const GLubyte ch15data[] = { -0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xff,0x80,0x8,0x0, -0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, -}; - -static const BitmapCharRec ch15 = {9,15,0,3,9,ch15data}; - -/* char: 0xe */ - -static const GLubyte ch14data[] = { -0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch14 = {5,9,-4,-3,9,ch14data}; - -/* char: 0xd */ - -static const GLubyte ch13data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch13 = {5,7,-4,3,9,ch13data}; - -/* char: 0xc */ - -static const GLubyte ch12data[] = { -0x8,0x8,0x8,0x8,0x8,0x8,0xf8, -}; - -static const BitmapCharRec ch12 = {5,7,0,3,9,ch12data}; - -/* char: 0xb */ - -static const GLubyte ch11data[] = { -0xf8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8, -}; - -static const BitmapCharRec ch11 = {5,9,0,-3,9,ch11data}; - -/* char: 0xa */ - -static const GLubyte ch10data[] = { -0x8,0x8,0x8,0x8,0x3e,0x0,0x20,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch10 = {7,10,-1,2,9,ch10data}; - -/* char: 0x9 */ - -static const GLubyte ch9data[] = { -0x3e,0x20,0x20,0x20,0x20,0x88,0x98,0xa8,0xc8,0x88, -}; - -static const BitmapCharRec ch9 = {7,10,-1,2,9,ch9data}; - -/* char: 0x8 */ - -static const GLubyte ch8data[] = { -0xfe,0x10,0x10,0xfe,0x10,0x10, -}; - -static const BitmapCharRec ch8 = {7,6,-1,0,9,ch8data}; - -/* char: 0x7 */ - -static const GLubyte ch7data[] = { -0x70,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch7 = {5,4,-2,-6,9,ch7data}; - -/* char: 0x6 */ - -static const GLubyte ch6data[] = { -0x20,0x20,0x3c,0x20,0x3e,0x0,0xf8,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch6 = {7,10,-1,2,9,ch6data}; - -/* char: 0x5 */ - -static const GLubyte ch5data[] = { -0x22,0x22,0x3c,0x22,0x3c,0x0,0x78,0x80,0x80,0x78, -}; - -static const BitmapCharRec ch5 = {7,10,-1,2,9,ch5data}; - -/* char: 0x4 */ - -static const GLubyte ch4data[] = { -0x10,0x10,0x1c,0x10,0x1e,0x80,0x80,0xe0,0x80,0xf0, -}; - -static const BitmapCharRec ch4 = {7,10,-1,2,9,ch4data}; - -/* char: 0x3 */ - -static const GLubyte ch3data[] = { -0x8,0x8,0x8,0x3e,0x0,0x88,0x88,0xf8,0x88,0x88, -}; - -static const BitmapCharRec ch3 = {7,10,-1,2,9,ch3data}; - -/* char: 0x2 */ - -static const GLubyte ch2data[] = { -0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa, -}; - -static const BitmapCharRec ch2 = {8,14,0,3,9,ch2data}; - -/* char: 0x1 */ - -static const GLubyte ch1data[] = { -0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10, -}; - -static const BitmapCharRec ch1 = {7,7,-1,0,9,ch1data}; - -static const BitmapCharRec * const chars[] = { -&ch0, -&ch1, -&ch2, -&ch3, -&ch4, -&ch5, -&ch6, -&ch7, -&ch8, -&ch9, -&ch10, -&ch11, -&ch12, -&ch13, -&ch14, -&ch15, -&ch16, -&ch17, -&ch18, -&ch19, -&ch20, -&ch21, -&ch22, -&ch23, -&ch24, -&ch25, -&ch26, -&ch27, -&ch28, -&ch29, -&ch30, -&ch31, -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -&ch127, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -const BitmapFontRec glutBitmap9By15 = { -"-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1", -256, -0, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_bitmap.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_bitmap.c deleted file mode 100644 index 8fec7f1171..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_bitmap.c +++ /dev/null @@ -1,57 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" -#include "glutbitmap.h" - -void GLUTAPIENTRY -glutBitmapCharacter(GLUTbitmapFont font, int c) -{ - const BitmapCharRec *ch; - BitmapFontPtr fontinfo; - GLint swapbytes, lsbfirst, rowlength; - GLint skiprows, skippixels, alignment; - -#if defined(_WIN32) || defined(GLUT_IMPORT_LIB) - fontinfo = (BitmapFontPtr) __glutFont(font); -#else - fontinfo = (BitmapFontPtr) font; -#endif - - if (c < fontinfo->first || - c >= fontinfo->first + fontinfo->num_chars) - return; - ch = fontinfo->ch[c - fontinfo->first]; - if (ch) { - /* Save current modes. */ - glGetIntegerv(GL_UNPACK_SWAP_BYTES, &swapbytes); - glGetIntegerv(GL_UNPACK_LSB_FIRST, &lsbfirst); - glGetIntegerv(GL_UNPACK_ROW_LENGTH, &rowlength); - glGetIntegerv(GL_UNPACK_SKIP_ROWS, &skiprows); - glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &skippixels); - glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment); - /* Little endian machines (DEC Alpha for example) could - benefit from setting GL_UNPACK_LSB_FIRST to GL_TRUE - instead of GL_FALSE, but this would require changing the - generated bitmaps too. */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); - glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE); - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glBitmap(ch->width, ch->height, ch->xorig, ch->yorig, - ch->advance, 0, ch->bitmap); - /* Restore saved modes. */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, swapbytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, lsbfirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, rowlength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, skiprows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, skippixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, alignment); - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_bwidth.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_bwidth.c deleted file mode 100644 index f9cdb184da..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_bwidth.c +++ /dev/null @@ -1,58 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" -#include "glutbitmap.h" - -/* CENTRY */ -int GLUTAPIENTRY -glutBitmapWidth(GLUTbitmapFont font, int c) -{ - BitmapFontPtr fontinfo; - const BitmapCharRec *ch; - -#if defined(_WIN32) || defined(GLUT_IMPORT_LIB) - fontinfo = (BitmapFontPtr) __glutFont(font); -#else - fontinfo = (BitmapFontPtr) font; -#endif - - if (c < fontinfo->first || c >= fontinfo->first + fontinfo->num_chars) - return 0; - ch = fontinfo->ch[c - fontinfo->first]; - if (ch) - return ch->advance; - else - return 0; -} - -int GLUTAPIENTRY -glutBitmapLength(GLUTbitmapFont font, const unsigned char *string) -{ - int c, length; - BitmapFontPtr fontinfo; - const BitmapCharRec *ch; - -#if defined(_WIN32) || defined(GLUT_IMPORT_LIB) - fontinfo = (BitmapFontPtr) __glutFont(font); -#else - fontinfo = (BitmapFontPtr) font; -#endif - - length = 0; - for (; *string != '\0'; string++) { - c = *string; - if (c >= fontinfo->first && c < fontinfo->first + fontinfo->num_chars) { - ch = fontinfo->ch[c - fontinfo->first]; - if (ch) - length += ch->advance; - } - } - return length; -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_cindex.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_cindex.c deleted file mode 100644 index d0c12bf3a0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_cindex.c +++ /dev/null @@ -1,252 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1996, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include "glutint.h" - -#define CLAMP(i) ((i) > 1.0 ? 1.0 : ((i) < 0.0 ? 0.0 : (i))) - -/* CENTRY */ -void GLUTAPIENTRY -glutSetColor(int ndx, GLfloat red, GLfloat green, GLfloat blue) -{ - GLUTcolormap *cmap, *newcmap; - XVisualInfo *vis; - XColor color; - int i; - - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { - cmap = __glutCurrentWindow->colormap; - vis = __glutCurrentWindow->vis; - } else { - cmap = __glutCurrentWindow->overlay->colormap; - vis = __glutCurrentWindow->overlay->vis; - if (ndx == __glutCurrentWindow->overlay->transparentPixel) { - __glutWarning( - "glutSetColor: cannot set color of overlay transparent index %d\n", - ndx); - return; - } - } - - if (!cmap) { - __glutWarning("glutSetColor: current window is RGBA"); - return; - } -#if defined(_WIN32) - if (ndx >= 256 || /* always assume 256 colors on Win32 */ -#else - if (ndx >= vis->visual->map_entries || -#endif - ndx < 0) { - __glutWarning("glutSetColor: index %d out of range", ndx); - return; - } - if (cmap->refcnt > 1) { - newcmap = __glutAssociateNewColormap(vis); - cmap->refcnt--; - /* Wouldn't it be nice if XCopyColormapAndFree could be - told not to free the old colormap's entries! */ - for (i = cmap->size - 1; i >= 0; i--) { - if (i == ndx) { - /* We are going to set this cell shortly! */ - continue; - } - if (cmap->cells[i].component[GLUT_RED] >= 0.0) { - color.pixel = i; - newcmap->cells[i].component[GLUT_RED] = - cmap->cells[i].component[GLUT_RED]; - color.red = (GLfloat) 0xffff * - cmap->cells[i].component[GLUT_RED]; - newcmap->cells[i].component[GLUT_GREEN] = - cmap->cells[i].component[GLUT_GREEN]; - color.green = (GLfloat) 0xffff * - cmap->cells[i].component[GLUT_GREEN]; - newcmap->cells[i].component[GLUT_BLUE] = - cmap->cells[i].component[GLUT_BLUE]; - color.blue = (GLfloat) 0xffff * - cmap->cells[i].component[GLUT_BLUE]; - color.flags = DoRed | DoGreen | DoBlue; -#if defined(_WIN32) - if (IsWindowVisible(__glutCurrentWindow->win)) { - XHDC = __glutCurrentWindow->hdc; - } else { - XHDC = 0; - } -#endif - XStoreColor(__glutDisplay, newcmap->cmap, &color); - } else { - /* Leave unallocated entries unallocated. */ - } - } - cmap = newcmap; - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { - __glutCurrentWindow->colormap = cmap; - __glutCurrentWindow->cmap = cmap->cmap; - } else { - __glutCurrentWindow->overlay->colormap = cmap; - __glutCurrentWindow->overlay->cmap = cmap->cmap; - } - XSetWindowColormap(__glutDisplay, - __glutCurrentWindow->renderWin, cmap->cmap); - -#if !defined(_WIN32) - { - GLUTwindow *toplevel; - - toplevel = __glutToplevelOf(__glutCurrentWindow); - if (toplevel->cmap != cmap->cmap) { - __glutPutOnWorkList(toplevel, GLUT_COLORMAP_WORK); - } - } -#endif - } - color.pixel = ndx; - red = CLAMP(red); - cmap->cells[ndx].component[GLUT_RED] = red; - color.red = (GLfloat) 0xffff *red; - green = CLAMP(green); - cmap->cells[ndx].component[GLUT_GREEN] = green; - color.green = (GLfloat) 0xffff *green; - blue = CLAMP(blue); - cmap->cells[ndx].component[GLUT_BLUE] = blue; - color.blue = (GLfloat) 0xffff *blue; - color.flags = DoRed | DoGreen | DoBlue; -#if defined(_WIN32) - if (IsWindowVisible(__glutCurrentWindow->win)) { - XHDC = __glutCurrentWindow->hdc; - } else { - XHDC = 0; - } -#endif - XStoreColor(__glutDisplay, cmap->cmap, &color); -} - -GLfloat GLUTAPIENTRY -glutGetColor(int ndx, int comp) -{ - GLUTcolormap *colormap; - XVisualInfo *vis; - - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { - colormap = __glutCurrentWindow->colormap; - vis = __glutCurrentWindow->vis; - } else { - colormap = __glutCurrentWindow->overlay->colormap; - vis = __glutCurrentWindow->overlay->vis; - if (ndx == __glutCurrentWindow->overlay->transparentPixel) { - __glutWarning("glutGetColor: requesting overlay transparent index %d\n", - ndx); - return -1.0; - } - } - - if (!colormap) { - __glutWarning("glutGetColor: current window is RGBA"); - return -1.0; - } -#if defined(_WIN32) -#define OUT_OF_RANGE_NDX(ndx) (ndx >= 256 || ndx < 0) -#else -#define OUT_OF_RANGE_NDX(ndx) (ndx >= vis->visual->map_entries || ndx < 0) -#endif - if (OUT_OF_RANGE_NDX(ndx)) { - __glutWarning("glutGetColor: index %d out of range", ndx); - return -1.0; - } - return colormap->cells[ndx].component[comp]; -} - -void GLUTAPIENTRY -glutCopyColormap(int winnum) -{ - GLUTwindow *window = __glutWindowList[winnum - 1]; - GLUTcolormap *oldcmap, *newcmap; - XVisualInfo *dstvis; - - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { - oldcmap = __glutCurrentWindow->colormap; - dstvis = __glutCurrentWindow->vis; - newcmap = window->colormap; - } else { - oldcmap = __glutCurrentWindow->overlay->colormap; - dstvis = __glutCurrentWindow->overlay->vis; - if (!window->overlay) { - __glutWarning("glutCopyColormap: window %d has no overlay", winnum); - return; - } - newcmap = window->overlay->colormap; - } - - if (!oldcmap) { - __glutWarning("glutCopyColormap: destination colormap must be color index"); - return; - } - if (!newcmap) { - __glutWarning( - "glutCopyColormap: source colormap of window %d must be color index", - winnum); - return; - } - if (newcmap == oldcmap) { - /* Source and destination are the same; now copy needed. */ - return; - } -#if !defined(_WIN32) - /* Play safe: compare visual IDs, not Visual*'s. */ - if (newcmap->visual->visualid == oldcmap->visual->visualid) { -#endif - /* Visuals match! "Copy" by reference... */ - __glutFreeColormap(oldcmap); - newcmap->refcnt++; - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { - __glutCurrentWindow->colormap = newcmap; - __glutCurrentWindow->cmap = newcmap->cmap; - } else { - __glutCurrentWindow->overlay->colormap = newcmap; - __glutCurrentWindow->overlay->cmap = newcmap->cmap; - } - XSetWindowColormap(__glutDisplay, __glutCurrentWindow->renderWin, - newcmap->cmap); -#if !defined(_WIN32) - __glutPutOnWorkList(__glutToplevelOf(window), GLUT_COLORMAP_WORK); - } else { - GLUTcolormap *copycmap; - XColor color; - int i, last; - - /* Visuals different - need a distinct X colormap! */ - copycmap = __glutAssociateNewColormap(dstvis); - /* Wouldn't it be nice if XCopyColormapAndFree could be - told not to free the old colormap's entries! */ - last = newcmap->size; - if (last > copycmap->size) { - last = copycmap->size; - } - for (i = last - 1; i >= 0; i--) { - if (newcmap->cells[i].component[GLUT_RED] >= 0.0) { - color.pixel = i; - copycmap->cells[i].component[GLUT_RED] = - newcmap->cells[i].component[GLUT_RED]; - color.red = (GLfloat) 0xffff * - newcmap->cells[i].component[GLUT_RED]; - copycmap->cells[i].component[GLUT_GREEN] = - newcmap->cells[i].component[GLUT_GREEN]; - color.green = (GLfloat) 0xffff * - newcmap->cells[i].component[GLUT_GREEN]; - copycmap->cells[i].component[GLUT_BLUE] = - newcmap->cells[i].component[GLUT_BLUE]; - color.blue = (GLfloat) 0xffff * - newcmap->cells[i].component[GLUT_BLUE]; - color.flags = DoRed | DoGreen | DoBlue; - XStoreColor(__glutDisplay, copycmap->cmap, &color); - } - } - } -#endif -} -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_cmap.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_cmap.c deleted file mode 100644 index 1c496ad66d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_cmap.c +++ /dev/null @@ -1,399 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1996, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#ifdef __VMS -#include -#endif - -#include -#include -#include /* SunOS multithreaded assert() needs . Lame. */ -#include -#if !defined(_WIN32) -#include -#include -#include /* for XA_RGB_DEFAULT_MAP atom */ -#if defined(__vms) -#include /* for XmuLookupStandardColormap */ -#else -#include /* for XmuLookupStandardColormap */ -#endif -#endif - -/* SGI optimization introduced in IRIX 6.3 to avoid X server - round trips for interning common X atoms. */ -#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS) -#include -#else -#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how) -#endif - -#include "glutint.h" -#include "layerutil.h" - -GLUTcolormap *__glutColormapList = NULL; - -GLUTcolormap * -__glutAssociateNewColormap(XVisualInfo * vis) -{ - GLUTcolormap *cmap; - int transparentPixel, i; - unsigned long pixels[255]; - - cmap = (GLUTcolormap *) malloc(sizeof(GLUTcolormap)); - if (!cmap) - __glutFatalError("out of memory."); -#if defined(_WIN32) - pixels[0] = 0; /* avoid compilation warnings on win32 */ - cmap->visual = 0; - cmap->size = 256; /* always assume 256 on Win32 */ -#else - cmap->visual = vis->visual; - cmap->size = vis->visual->map_entries; -#endif - cmap->refcnt = 1; - cmap->cells = (GLUTcolorcell *) - malloc(sizeof(GLUTcolorcell) * cmap->size); - if (!cmap->cells) - __glutFatalError("out of memory."); - /* make all color cell entries be invalid */ - for (i = cmap->size - 1; i >= 0; i--) { - cmap->cells[i].component[GLUT_RED] = -1.0; - cmap->cells[i].component[GLUT_GREEN] = -1.0; - cmap->cells[i].component[GLUT_BLUE] = -1.0; - } - transparentPixel = __glutGetTransparentPixel(__glutDisplay, vis); - if (transparentPixel == -1 || transparentPixel >= cmap->size) { - - /* If there is no transparent pixel or if the transparent - pixel is outside the range of valid colormap cells (HP - can implement their overlays this smart way since their - transparent pixel is 255), we can AllocAll the colormap. - See note below. */ - - cmap->cmap = XCreateColormap(__glutDisplay, - __glutRoot, cmap->visual, AllocAll); - } else { - - /* On machines where zero (or some other value in the range - of 0 through map_entries-1), BadAlloc may be generated - when an AllocAll overlay colormap is allocated since the - transparent pixel precludes all the cells in the colormap - being allocated (the transparent pixel is pre-allocated). - So in this case, use XAllocColorCells to allocate - map_entries-1 pixels (that is, all but the transparent - pixel. */ - -#if defined(_WIN32) - cmap->cmap = XCreateColormap(__glutDisplay, - __glutRoot, 0, AllocNone); -#else - cmap->cmap = XCreateColormap(__glutDisplay, - __glutRoot, vis->visual, AllocNone); - XAllocColorCells(__glutDisplay, cmap->cmap, False, 0, 0, - pixels, cmap->size - 1); -#endif - } - cmap->next = __glutColormapList; - __glutColormapList = cmap; - return cmap; -} - -static GLUTcolormap * -associateColormap(XVisualInfo * vis) -{ -#if !defined(_WIN32) - GLUTcolormap *cmap = __glutColormapList; - - while (cmap != NULL) { - /* Play safe: compare visual IDs, not Visual*'s. */ - if (cmap->visual->visualid == vis->visual->visualid) { - /* Already have created colormap for the visual. */ - cmap->refcnt++; - return cmap; - } - cmap = cmap->next; - } -#endif - return __glutAssociateNewColormap(vis); -} - -void -__glutSetupColormap(XVisualInfo * vi, GLUTcolormap ** colormap, Colormap * cmap) -{ -#if defined(_WIN32) - if (vi->dwFlags & PFD_NEED_PALETTE || vi->iPixelType == PFD_TYPE_COLORINDEX) { - *colormap = associateColormap(vi); - *cmap = (*colormap)->cmap; - } else { - *colormap = NULL; - *cmap = 0; - } -#else - Status status; - XStandardColormap *standardCmaps; - int i, numCmaps; - static Atom hpColorRecoveryAtom = -1; - int isRGB, visualClass, rc; - -#if defined(__cplusplus) || defined(c_plusplus) - visualClass = vi->c_class; -#else - visualClass = vi->class; -#endif - switch (visualClass) { - case PseudoColor: - /* Mesa might return a PseudoColor visual for RGB mode. */ - rc = glXGetConfig(__glutDisplay, vi, GLX_RGBA, &isRGB); - if (rc == 0 && isRGB) { - /* Must be Mesa. */ - *colormap = NULL; - if (MaxCmapsOfScreen(DefaultScreenOfDisplay(__glutDisplay)) == 1 - && vi->visual == DefaultVisual(__glutDisplay, __glutScreen)) { - char *privateCmap = getenv("MESA_PRIVATE_CMAP"); - - if (privateCmap) { - /* User doesn't want to share colormaps. */ - *cmap = XCreateColormap(__glutDisplay, __glutRoot, - vi->visual, AllocNone); - } else { - /* Share the root colormap. */ - *cmap = DefaultColormap(__glutDisplay, __glutScreen); - } - } else { - /* Get our own PseudoColor colormap. */ - *cmap = XCreateColormap(__glutDisplay, __glutRoot, - vi->visual, AllocNone); - } - } else { - /* CI mode, real GLX never returns a PseudoColor visual - for RGB mode. */ - *colormap = associateColormap(vi); - *cmap = (*colormap)->cmap; - } - break; - case TrueColor: - case DirectColor: - *colormap = NULL; /* NULL if RGBA */ - - /* Hewlett-Packard supports a feature called "HP Color - Recovery". Mesa has code to use HP Color Recovery. For - Mesa to use this feature, the atom - _HP_RGB_SMOOTH_MAP_LIST must be defined on the root - window AND the colormap obtainable by XGetRGBColormaps - for that atom must be set on the window. If that - colormap is not set, the output will look stripy. */ - - if (hpColorRecoveryAtom == -1) { - char *xvendor; - -#define VENDOR_HP "Hewlett-Packard" - - /* Only makes sense to make XInternAtom round-trip if we - know that we are connected to an HP X server. */ - xvendor = ServerVendor(__glutDisplay); - if (!strncmp(xvendor, VENDOR_HP, sizeof(VENDOR_HP) - 1)) { - hpColorRecoveryAtom = XInternAtom(__glutDisplay, "_HP_RGB_SMOOTH_MAP_LIST", True); - } else { - hpColorRecoveryAtom = None; - } - } - if (hpColorRecoveryAtom != None) { - status = XGetRGBColormaps(__glutDisplay, __glutRoot, - &standardCmaps, &numCmaps, hpColorRecoveryAtom); - if (status == 1) { - for (i = 0; i < numCmaps; i++) { - if (standardCmaps[i].visualid == vi->visualid) { - *cmap = standardCmaps[i].colormap; - XFree(standardCmaps); - return; - } - } - XFree(standardCmaps); - } - } -#ifndef SOLARIS_2_4_BUG - /* Solaris 2.4 and 2.5 have a bug in their - XmuLookupStandardColormap implementations. Please - compile your Solaris 2.4 or 2.5 version of GLUT with - -DSOLARIS_2_4_BUG to work around this bug. The symptom - of the bug is that programs will get a BadMatch error - from X_CreateWindow when creating a GLUT window because - Solaris 2.4 and 2.5 create a corrupted RGB_DEFAULT_MAP - property. Note that this workaround prevents Colormap - sharing between applications, perhaps leading - unnecessary colormap installations or colormap flashing. - Sun fixed this bug in Solaris 2.6. */ - status = XmuLookupStandardColormap(__glutDisplay, - vi->screen, vi->visualid, vi->depth, XA_RGB_DEFAULT_MAP, - /* replace */ False, /* retain */ True); - if (status == 1) { - status = XGetRGBColormaps(__glutDisplay, __glutRoot, - &standardCmaps, &numCmaps, XA_RGB_DEFAULT_MAP); - if (status == 1) { - for (i = 0; i < numCmaps; i++) { - if (standardCmaps[i].visualid == vi->visualid) { - *cmap = standardCmaps[i].colormap; - XFree(standardCmaps); - return; - } - } - XFree(standardCmaps); - } - } -#endif - /* If no standard colormap but TrueColor, just make a - private one. */ - /* XXX Should do a better job of internal sharing for - privately allocated TrueColor colormaps. */ - /* XXX DirectColor probably needs ramps hand initialized! */ - *cmap = XCreateColormap(__glutDisplay, __glutRoot, - vi->visual, AllocNone); - break; - case StaticColor: - case StaticGray: - case GrayScale: - /* Mesa supports these visuals */ - *colormap = NULL; - *cmap = XCreateColormap(__glutDisplay, __glutRoot, - vi->visual, AllocNone); - break; - default: - __glutFatalError( - "could not allocate colormap for visual type: %d.", - visualClass); - } - return; -#endif -} - -#if !defined(_WIN32) -static int -findColormaps(GLUTwindow * window, - Window * winlist, Colormap * cmaplist, int num, int max) -{ - GLUTwindow *child; - int i; - - /* Do not allow more entries that maximum number of - colormaps! */ - if (num >= max) - return num; - /* Is cmap for this window already on the list? */ - for (i = 0; i < num; i++) { - if (cmaplist[i] == window->cmap) - goto normalColormapAlreadyListed; - } - /* Not found on the list; add colormap and window. */ - winlist[num] = window->win; - cmaplist[num] = window->cmap; - num++; - -normalColormapAlreadyListed: - - /* Repeat above but for the overlay colormap if there one. */ - if (window->overlay) { - if (num >= max) - return num; - for (i = 0; i < num; i++) { - if (cmaplist[i] == window->overlay->cmap) - goto overlayColormapAlreadyListed; - } - winlist[num] = window->overlay->win; - cmaplist[num] = window->overlay->cmap; - num++; - } -overlayColormapAlreadyListed: - - /* Recursively search children. */ - child = window->children; - while (child) { - num = findColormaps(child, winlist, cmaplist, num, max); - child = child->siblings; - } - return num; -} - -void -__glutEstablishColormapsProperty(GLUTwindow * window) -{ - /* this routine is strictly X. Win32 doesn't need to do - anything of this sort (but has to do other wacky stuff - later). */ - static Atom wmColormapWindows = None; - Window *winlist; - Colormap *cmaplist; - Status status; - int maxcmaps, num; - - assert(!window->parent); - maxcmaps = MaxCmapsOfScreen(ScreenOfDisplay(__glutDisplay, - __glutScreen)); - /* For portability reasons we don't use alloca for winlist - and cmaplist, but we could. */ - winlist = (Window *) malloc(maxcmaps * sizeof(Window)); - cmaplist = (Colormap *) malloc(maxcmaps * sizeof(Colormap)); - num = findColormaps(window, winlist, cmaplist, 0, maxcmaps); - if (num < 2) { - /* Property no longer needed; remove it. */ - wmColormapWindows = XSGIFastInternAtom(__glutDisplay, - "WM_COLORMAP_WINDOWS", SGI_XA_WM_COLORMAP_WINDOWS, False); - if (wmColormapWindows == None) { - __glutWarning("Could not intern X atom for WM_COLORMAP_WINDOWS."); - return; - } - XDeleteProperty(__glutDisplay, window->win, wmColormapWindows); - } else { - status = XSetWMColormapWindows(__glutDisplay, window->win, - winlist, num); - /* XSetWMColormapWindows should always work unless the - WM_COLORMAP_WINDOWS property cannot be intern'ed. We - check to be safe. */ - if (status == False) - __glutFatalError("XSetWMColormapWindows returned False."); - } - /* For portability reasons we don't use alloca for winlist - and cmaplist, but we could. */ - free(winlist); - free(cmaplist); -} - -GLUTwindow * -__glutToplevelOf(GLUTwindow * window) -{ - while (window->parent) { - window = window->parent; - } - return window; -} -#endif - -void -__glutFreeColormap(GLUTcolormap * cmap) -{ - GLUTcolormap *cur, **prev; - - cmap->refcnt--; - if (cmap->refcnt == 0) { - /* remove from colormap list */ - cur = __glutColormapList; - prev = &__glutColormapList; - while (cur) { - if (cur == cmap) { - *prev = cmap->next; - break; - } - prev = &(cur->next); - cur = cur->next; - } - /* actually free colormap */ - XFreeColormap(__glutDisplay, cmap->cmap); - free(cmap->cells); - free(cmap); - } -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_cursor.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_cursor.c deleted file mode 100644 index 797cb49fb0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_cursor.c +++ /dev/null @@ -1,201 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1995, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" - -#if !defined(_WIN32) -#include /* For XA_CURSOR */ -#include -#endif - -typedef struct _CursorTable { -#if defined(_WIN32) - char* glyph; -#else - int glyph; -#endif - Cursor cursor; -} CursorTable; -/* *INDENT-OFF* */ - -static CursorTable cursorTable[] = { - {XC_arrow, None}, /* GLUT_CURSOR_RIGHT_ARROW */ - {XC_top_left_arrow, None}, /* GLUT_CURSOR_LEFT_ARROW */ - {XC_hand1, None}, /* GLUT_CURSOR_INFO */ - {XC_pirate, None}, /* GLUT_CURSOR_DESTROY */ - {XC_question_arrow, None}, /* GLUT_CURSOR_HELP */ - {XC_exchange, None}, /* GLUT_CURSOR_CYCLE */ - {XC_spraycan, None}, /* GLUT_CURSOR_SPRAY */ - {XC_watch, None}, /* GLUT_CURSOR_WAIT */ - {XC_xterm, None}, /* GLUT_CURSOR_TEXT */ - {XC_crosshair, None}, /* GLUT_CURSOR_CROSSHAIR */ - {XC_sb_v_double_arrow, None}, /* GLUT_CURSOR_UP_DOWN */ - {XC_sb_h_double_arrow, None}, /* GLUT_CURSOR_LEFT_RIGHT */ - {XC_top_side, None}, /* GLUT_CURSOR_TOP_SIDE */ - {XC_bottom_side, None}, /* GLUT_CURSOR_BOTTOM_SIDE */ - {XC_left_side, None}, /* GLUT_CURSOR_LEFT_SIDE */ - {XC_right_side, None}, /* GLUT_CURSOR_RIGHT_SIDE */ - {XC_top_left_corner, None}, /* GLUT_CURSOR_TOP_LEFT_CORNER */ - {XC_top_right_corner, None}, /* GLUT_CURSOR_TOP_RIGHT_CORNER */ - {XC_bottom_right_corner, None}, /* GLUT_CURSOR_BOTTOM_RIGHT_CORNER */ - {XC_bottom_left_corner, None}, /* GLUT_CURSOR_BOTTOM_LEFT_CORNER */ -}; -/* *INDENT-ON* */ - -#if !defined(_WIN32) -static Cursor blankCursor = None; -static Cursor fullCrosshairCusor = None; - -/* SGI X server's support a special property called the - _SGI_CROSSHAIR_CURSOR that when installed as a window's - cursor, becomes a full screen crosshair cursor. SGI - has special cursor generation hardware for this case. */ -static Cursor -getFullCrosshairCursor(void) -{ - Cursor cursor; - Atom crosshairAtom, actualType; - int rc, actualFormat; - unsigned long n, left; - unsigned char *value; - - if (fullCrosshairCusor == None) { - crosshairAtom = XInternAtom(__glutDisplay, - "_SGI_CROSSHAIR_CURSOR", True); - if (crosshairAtom != None) { - value = 0; /* Make compiler happy. */ - rc = XGetWindowProperty(__glutDisplay, __glutRoot, - crosshairAtom, 0, 1, False, XA_CURSOR, &actualType, - &actualFormat, &n, &left, &value); - if (rc == Success && actualFormat == 32 && n >= 1) { - cursor = ((unsigned long *)value)[0]; - XFree(value); - return cursor; - } - } - } - return XCreateFontCursor(__glutDisplay, XC_crosshair); -} - -/* X11 forces you to create a blank cursor if you want - to disable the cursor. */ -static Cursor -makeBlankCursor(void) -{ - static char data[1] = - {0}; - Cursor cursor; - Pixmap blank; - XColor dummy; - - blank = XCreateBitmapFromData(__glutDisplay, __glutRoot, - data, 1, 1); - if (blank == None) - __glutFatalError("out of memory."); - cursor = XCreatePixmapCursor(__glutDisplay, blank, blank, - &dummy, &dummy, 0, 0); - XFreePixmap(__glutDisplay, blank); - - return cursor; -} -#endif /* !_WIN32 */ - -/* Win32 and X11 use this same function to accomplish - fairly different tasks. X11 lets you just define the - cursor for a window and the window system takes care - of making sure that the window's cursor is installed - when the mouse is in the window. Win32 requires the - application to handle a WM_SETCURSOR message to install - the right cursor when windows are entered. Think of - the Win32 __glutSetCursor (called from __glutWindowProc) - as "install cursor". Think of the X11 __glutSetCursor - (called from glutSetCursor) as "define cursor". */ -void -__glutSetCursor(GLUTwindow *window) -{ - int cursor = window->cursor; - Cursor xcursor = 0; - - if (cursor >= 0 && - cursor < sizeof(cursorTable) / sizeof(cursorTable[0])) { - if (cursorTable[cursor].cursor == None) { - cursorTable[cursor].cursor = XCreateFontCursor(__glutDisplay, - cursorTable[cursor].glyph); - } - xcursor = cursorTable[cursor].cursor; - } else { - /* Special cases. */ - switch (cursor) { - case GLUT_CURSOR_INHERIT: -#if defined(_WIN32) - while (window->parent) { - window = window->parent; - if (window->cursor != GLUT_CURSOR_INHERIT) { - __glutSetCursor(window); - return; - } - } - /* XXX Default to an arrow cursor. Is this - right or should we be letting the default - window proc be installing some system cursor? */ - xcursor = cursorTable[0].cursor; - if (xcursor == NULL) { - xcursor = - cursorTable[0].cursor = - LoadCursor(NULL, cursorTable[0].glyph); - } -#else - xcursor = None; -#endif - break; - case GLUT_CURSOR_NONE: -#if defined(_WIN32) - xcursor = NULL; -#else - if (blankCursor == None) { - blankCursor = makeBlankCursor(); - } - xcursor = blankCursor; -#endif - break; - case GLUT_CURSOR_FULL_CROSSHAIR: -#if defined(_WIN32) - xcursor = (HICON) IDC_CROSS; -#else - if (fullCrosshairCusor == None) { - fullCrosshairCusor = getFullCrosshairCursor(); - } - xcursor = fullCrosshairCusor; -#endif - break; - } - } - XDefineCursor(__glutDisplay, - window->win, xcursor); - XFlush(__glutDisplay); -} - -/* CENTRY */ -void GLUTAPIENTRY -glutSetCursor(int cursor) -{ -#ifdef _WIN32 - POINT point; - - __glutCurrentWindow->cursor = cursor; - /* Are we in the window right now? If so, - install the cursor. */ - GetCursorPos(&point); - if (__glutCurrentWindow->win == WindowFromPoint(point)) { - __glutSetCursor(__glutCurrentWindow); - } -#else - __glutCurrentWindow->cursor = cursor; - __glutSetCursor(__glutCurrentWindow); -#endif -} -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_dials.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_dials.c deleted file mode 100644 index e015b91bc4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_dials.c +++ /dev/null @@ -1,26 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" - -void GLUTAPIENTRY -glutButtonBoxFunc(GLUTbuttonBoxCB buttonBoxFunc) -{ - __glutCurrentWindow->buttonBox = buttonBoxFunc; - __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask; - __glutPutOnWorkList(__glutCurrentWindow, - GLUT_DEVICE_MASK_WORK); -} - -void GLUTAPIENTRY -glutDialsFunc(GLUTdialsCB dialsFunc) -{ - __glutCurrentWindow->dials = dialsFunc; - __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask; - __glutPutOnWorkList(__glutCurrentWindow, - GLUT_DEVICE_MASK_WORK); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_dstr.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_dstr.c deleted file mode 100644 index 981e88ffa4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_dstr.c +++ /dev/null @@ -1,1627 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include -#include -#include -#include "glutint.h" - -/* glxcaps matches the criteria macros listed in glutint.h, but - only list the first set (those that correspond to GLX visual - attributes). */ -static int glxcap[NUM_GLXCAPS] = -{ - GLX_RGBA, - GLX_BUFFER_SIZE, - GLX_DOUBLEBUFFER, - GLX_STEREO, - GLX_AUX_BUFFERS, - GLX_RED_SIZE, - GLX_GREEN_SIZE, - GLX_BLUE_SIZE, - GLX_ALPHA_SIZE, - GLX_DEPTH_SIZE, - GLX_STENCIL_SIZE, - GLX_ACCUM_RED_SIZE, - GLX_ACCUM_GREEN_SIZE, - GLX_ACCUM_BLUE_SIZE, - GLX_ACCUM_ALPHA_SIZE, - GLX_LEVEL, -}; - -#ifdef TEST - -#if !defined(_WIN32) -char *__glutProgramName = "dstr"; -Display *__glutDisplay; -int __glutScreen; -XVisualInfo *(*__glutDetermineVisualFromString) (char *string, Bool * treatAsSingle, - Criterion * requiredCriteria, int nRequired, int requiredMask, void **fbc) = NULL; -char *__glutDisplayString = NULL; -#endif -static int verbose = 0; - -static char *compstr[] = -{ - "none", "=", "!=", "<=", ">=", ">", "<", "~" -}; -static char *capstr[] = -{ - "rgba", "bufsize", "double", "stereo", "auxbufs", "red", "green", "blue", "alpha", - "depth", "stencil", "acred", "acgreen", "acblue", "acalpha", "level", "xvisual", - "transparent", "samples", "xstaticgray", "xgrayscale", "xstaticcolor", "xpseudocolor", - "xtruecolor", "xdirectcolor", "slow", "conformant", "num" -}; - -static void -printCriteria(Criterion * criteria, int ncriteria) -{ - int i; - printf("Criteria: %d\n", ncriteria); - for (i = 0; i < ncriteria; i++) { - printf(" %s %s %d\n", - capstr[criteria[i].capability], - compstr[criteria[i].comparison], - criteria[i].value); - } -} - -#endif /* TEST */ - -static int isMesaGLX = -1; - -static int -determineMesaGLX(void) -{ -#ifdef GLX_VERSION_1_1 - const char *vendor, *version, *ch; - - vendor = glXGetClientString(__glutDisplay, GLX_VENDOR); - if (!strcmp(vendor, "Brian Paul")) { - version = glXGetClientString(__glutDisplay, GLX_VERSION); - for (ch = version; *ch != ' ' && *ch != '\0'; ch++); - for (; *ch == ' ' && *ch != '\0'; ch++); - -#define MESA_NAME "Mesa " /* Trailing space is intentional. */ - - if (!strncmp(MESA_NAME, ch, sizeof(MESA_NAME) - 1)) { - return 1; - } - } -#else - /* Recent versions for Mesa should support GLX 1.1 and - therefore glXGetClientString. If we get into this case, - we would be compiling against a true OpenGL not supporting - GLX 1.1, and the resulting compiled library won't work well - with Mesa then. */ -#endif - return 0; -} - -static XVisualInfo ** -getMesaVisualList(int *n) -{ - XVisualInfo **vlist, *vinfo; - int attribs[23]; - int i, x, cnt; - - vlist = (XVisualInfo **) malloc((32 + 16) * sizeof(XVisualInfo *)); - if (!vlist) - __glutFatalError("out of memory."); - - cnt = 0; - for (i = 0; i < 32; i++) { - x = 0; - attribs[x] = GLX_RGBA; - x++; - attribs[x] = GLX_RED_SIZE; - x++; - attribs[x] = 1; - x++; - attribs[x] = GLX_GREEN_SIZE; - x++; - attribs[x] = 1; - x++; - attribs[x] = GLX_BLUE_SIZE; - x++; - attribs[x] = 1; - x++; - if (i & 1) { - attribs[x] = GLX_DEPTH_SIZE; - x++; - attribs[x] = 1; - x++; - } - if (i & 2) { - attribs[x] = GLX_STENCIL_SIZE; - x++; - attribs[x] = 1; - x++; - } - if (i & 4) { - attribs[x] = GLX_ACCUM_RED_SIZE; - x++; - attribs[x] = 1; - x++; - attribs[x] = GLX_ACCUM_GREEN_SIZE; - x++; - attribs[x] = 1; - x++; - attribs[x] = GLX_ACCUM_BLUE_SIZE; - x++; - attribs[x] = 1; - x++; - } - if (i & 8) { - attribs[x] = GLX_ALPHA_SIZE; - x++; - attribs[x] = 1; - x++; - if (i & 4) { - attribs[x] = GLX_ACCUM_ALPHA_SIZE; - x++; - attribs[x] = 1; - x++; - } - } - if (i & 16) { - attribs[x] = GLX_DOUBLEBUFFER; - x++; - } - attribs[x] = None; - x++; - assert(x <= sizeof(attribs) / sizeof(attribs[0])); - vinfo = glXChooseVisual(__glutDisplay, __glutScreen, attribs); - if (vinfo) { - vlist[cnt] = vinfo; - cnt++; - } - } - for (i = 0; i < 16; i++) { - x = 0; - if (i & 1) { - attribs[x] = GLX_DEPTH_SIZE; - x++; - attribs[x] = 1; - x++; - } - if (i & 2) { - attribs[x] = GLX_STENCIL_SIZE; - x++; - attribs[x] = 1; - x++; - } - if (i & 4) { - attribs[x] = GLX_DOUBLEBUFFER; - x++; - } - if (i & 8) { - attribs[x] = GLX_LEVEL; - x++; - attribs[x] = 1; - x++; -#if defined(GLX_TRANSPARENT_TYPE_EXT) && defined(GLX_TRANSPARENT_INDEX_EXT) - attribs[x] = GLX_TRANSPARENT_TYPE_EXT; - x++; - attribs[x] = GLX_TRANSPARENT_INDEX_EXT; - x++; -#endif - } - attribs[x] = None; - x++; - assert(x <= sizeof(attribs) / sizeof(attribs[0])); - vinfo = glXChooseVisual(__glutDisplay, __glutScreen, attribs); - if (vinfo) { - vlist[cnt] = vinfo; - cnt++; - } - } - - *n = cnt; - return vlist; -} - -static FrameBufferMode * -loadVisuals(int *nitems_return) -{ - XVisualInfo *vinfo, **vlist, template; - FrameBufferMode *fbmodes, *mode; - int n, i, j, rc, glcapable; -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample) - int multisample; -#endif -#if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_info) - int visual_info; -#endif -#if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_rating) - int visual_rating; -#endif -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - int fbconfig; -#endif - - isMesaGLX = determineMesaGLX(); - if (isMesaGLX) { - vlist = getMesaVisualList(&n); - } else { -#if !defined(_WIN32) - template.screen = __glutScreen; - vinfo = XGetVisualInfo(__glutDisplay, VisualScreenMask, &template, &n); -#else - vinfo = XGetVisualInfo(__glutDisplay, 0, &template, &n); -#endif - if (vinfo == NULL) { - *nitems_return = 0; - return NULL; - } - assert(n > 0); - - /* Make an array of XVisualInfo* pointers to help the Mesa - case because each glXChooseVisual call returns a - distinct XVisualInfo*, not a handy array like - XGetVisualInfo. (Mesa expects us to return the _exact_ - pointer returned by glXChooseVisual so we could not just - copy the returned structure.) */ - vlist = (XVisualInfo **) malloc(n * sizeof(XVisualInfo *)); - if (!vlist) - __glutFatalError("out of memory."); - for (i = 0; i < n; i++) { - vlist[i] = &vinfo[i]; - } - } - -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample) - multisample = __glutIsSupportedByGLX("GLX_SGIS_multisample"); -#endif -#if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_info) - visual_info = __glutIsSupportedByGLX("GLX_EXT_visual_info"); -#endif -#if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_rating) - visual_rating = __glutIsSupportedByGLX("GLX_EXT_visual_rating"); -#endif -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - fbconfig = __glutIsSupportedByGLX("GLX_SGIX_fbconfig"); -#endif - - fbmodes = (FrameBufferMode *) malloc(n * sizeof(FrameBufferMode)); - if (fbmodes == NULL) { - *nitems_return = -1; - return NULL; - } - for (i = 0; i < n; i++) { - mode = &fbmodes[i]; - mode->vi = vlist[i]; -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - mode->fbc = NULL; -#endif - rc = glXGetConfig(__glutDisplay, vlist[i], GLX_USE_GL, &glcapable); - if (rc == 0 && glcapable) { - mode->valid = 1; /* Assume the best until proven - otherwise. */ - for (j = 0; j < NUM_GLXCAPS; j++) { - rc = glXGetConfig(__glutDisplay, vlist[i], glxcap[j], &mode->cap[j]); - if (rc != 0) { - mode->valid = 0; - } - } -#if defined(_WIN32) - mode->cap[XVISUAL] = ChoosePixelFormat(XHDC, vlist[i]); -#else - mode->cap[XVISUAL] = (int) vlist[i]->visualid; -#endif - mode->cap[XSTATICGRAY] = 0; - mode->cap[XGRAYSCALE] = 0; - mode->cap[XSTATICCOLOR] = 0; - mode->cap[XPSEUDOCOLOR] = 0; - mode->cap[XTRUECOLOR] = 0; - mode->cap[XDIRECTCOLOR] = 0; -#if !defined(_WIN32) -#if defined(__cplusplus) || defined(c_plusplus) - switch (vlist[i]->c_class) { -#else - switch (vlist[i]->class) { -#endif - case StaticGray: - mode->cap[XSTATICGRAY] = 1; - break; - case GrayScale: - mode->cap[XGRAYSCALE] = 1; - break; - case StaticColor: - mode->cap[XSTATICCOLOR] = 1; - break; - case PseudoColor: - mode->cap[XPSEUDOCOLOR] = 1; - break; - case TrueColor: - mode->cap[XTRUECOLOR] = 1; - break; - case DirectColor: - mode->cap[XDIRECTCOLOR] = 1; - break; - } -#endif -#if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_rating) - if (visual_rating) { - int rating; - -/* babcock@cs.montana.edu reported that DEC UNIX (OSF1) V4.0 - 564 for Alpha did not properly define GLX_VISUAL_CAVEAT_EXT - in despite claiming to support - GLX_EXT_visual_rating. */ -#ifndef GLX_VISUAL_CAVEAT_EXT -#define GLX_VISUAL_CAVEAT_EXT 0x20 -#endif - - rc = glXGetConfig(__glutDisplay, - vlist[i], GLX_VISUAL_CAVEAT_EXT, &rating); - if (rc != 0) { - mode->cap[SLOW] = 0; - mode->cap[CONFORMANT] = 1; - } else { - switch (rating) { - case GLX_SLOW_VISUAL_EXT: - mode->cap[SLOW] = 1; - mode->cap[CONFORMANT] = 1; - break; - -/* IRIX 5.3 for the R10K Indigo2 may have shipped without this - properly defined in /usr/include/GL/glxtokens.h */ -#ifndef GLX_NON_CONFORMANT_VISUAL_EXT -#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D -#endif - - case GLX_NON_CONFORMANT_VISUAL_EXT: - mode->cap[SLOW] = 0; - mode->cap[CONFORMANT] = 0; - break; - case GLX_NONE_EXT: - default: /* XXX Hopefully this is a good default - assumption. */ - mode->cap[SLOW] = 0; - mode->cap[CONFORMANT] = 1; - break; - } - } - } else { - mode->cap[TRANSPARENT] = 0; - } -#else - mode->cap[SLOW] = 0; - mode->cap[CONFORMANT] = 1; -#endif -#if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_info) - if (visual_info) { - int transparent; - -/* babcock@cs.montana.edu reported that DEC UNIX (OSF1) V4.0 - 564 for Alpha did not properly define - GLX_TRANSPARENT_TYPE_EXT in despite claiming to - support GLX_EXT_visual_info. */ -#ifndef GLX_TRANSPARENT_TYPE_EXT -#define GLX_TRANSPARENT_TYPE_EXT 0x23 -#endif - - rc = glXGetConfig(__glutDisplay, - vlist[i], GLX_TRANSPARENT_TYPE_EXT, &transparent); - if (rc != 0) { - mode->cap[TRANSPARENT] = 0; - } else { - mode->cap[TRANSPARENT] = (transparent != GLX_NONE_EXT); - } - } else { - mode->cap[TRANSPARENT] = 0; - } -#else - mode->cap[TRANSPARENT] = 0; -#endif -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample) - if (multisample) { - rc = glXGetConfig(__glutDisplay, - vlist[i], GLX_SAMPLES_SGIS, &mode->cap[SAMPLES]); - if (rc != 0) { - mode->cap[SAMPLES] = 0; - } - } else { - mode->cap[SAMPLES] = 0; - } -#else - mode->cap[SAMPLES] = 0; -#endif - } else { -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - if (fbconfig) { - GLXFBConfigSGIX fbc; - int fbconfigID, drawType, renderType; - - fbc = __glut_glXGetFBConfigFromVisualSGIX(__glutDisplay, vlist[i]); - if (fbc) { - rc = __glut_glXGetFBConfigAttribSGIX(__glutDisplay, fbc, - GLX_FBCONFIG_ID_SGIX, &fbconfigID); - if ((rc == 0) && (fbconfigID != None)) { - rc = __glut_glXGetFBConfigAttribSGIX(__glutDisplay, fbc, - GLX_DRAWABLE_TYPE_SGIX, &drawType); - if ((rc == 0) && (drawType & GLX_WINDOW_BIT_SGIX)) { - rc = __glut_glXGetFBConfigAttribSGIX(__glutDisplay, fbc, - GLX_RENDER_TYPE_SGIX, &renderType); - if ((rc == 0) && (renderType & GLX_RGBA_BIT_SGIX)) { - mode->fbc = fbc; - mode->valid = 1; /* Assume the best until - proven otherwise. */ - - assert(glxcap[0] == GLX_RGBA); - mode->cap[0] = 1; - - /* Start with "j = 1" to skip the GLX_RGBA attribute. */ - for (j = 1; j < NUM_GLXCAPS; j++) { - rc = __glut_glXGetFBConfigAttribSGIX(__glutDisplay, - fbc, glxcap[j], &mode->cap[j]); - if (rc != 0) { - mode->valid = 0; - } - } - - mode->cap[XVISUAL] = (int) vlist[i]->visualid; - mode->cap[XSTATICGRAY] = 0; - mode->cap[XGRAYSCALE] = 0; - mode->cap[XSTATICCOLOR] = 0; - mode->cap[XPSEUDOCOLOR] = 0; - mode->cap[XTRUECOLOR] = 0; - mode->cap[XDIRECTCOLOR] = 0; -#if defined(__cplusplus) || defined(c_plusplus) - switch (vlist[i]->c_class) { -#else - switch (vlist[i]->class) { -#endif - case StaticGray: - mode->cap[XSTATICGRAY] = 1; - break; - case GrayScale: - mode->cap[XGRAYSCALE] = 1; - break; - case StaticColor: - mode->cap[XSTATICCOLOR] = 1; - break; - case PseudoColor: - mode->cap[XPSEUDOCOLOR] = 1; - break; - case TrueColor: - mode->cap[XTRUECOLOR] = 1; - break; - case DirectColor: - mode->cap[XDIRECTCOLOR] = 1; - break; - } -#if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_rating) - if (visual_rating) { - int rating; - -/* babcock@cs.montana.edu reported that DEC UNIX (OSF1) V4.0 - 564 for Alpha did not properly define GLX_VISUAL_CAVEAT_EXT - in despite claiming to support - GLX_EXT_visual_rating. */ -#ifndef GLX_VISUAL_CAVEAT_EXT -#define GLX_VISUAL_CAVEAT_EXT 0x20 -#endif - - rc = __glut_glXGetFBConfigAttribSGIX(__glutDisplay, - fbc, GLX_VISUAL_CAVEAT_EXT, &rating); - if (rc != 0) { - mode->cap[SLOW] = 0; - mode->cap[CONFORMANT] = 1; - } else { - switch (rating) { - case GLX_SLOW_VISUAL_EXT: - mode->cap[SLOW] = 1; - mode->cap[CONFORMANT] = 1; - break; - -/* IRIX 5.3 for the R10K Indigo2 may have shipped without this - properly defined in /usr/include/GL/glxtokens.h */ -#ifndef GLX_NON_CONFORMANT_VISUAL_EXT -#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D -#endif - - case GLX_NON_CONFORMANT_VISUAL_EXT: - mode->cap[SLOW] = 0; - mode->cap[CONFORMANT] = 0; - break; - case GLX_NONE_EXT: - default: /* XXX Hopefully this is a good - default assumption. */ - mode->cap[SLOW] = 0; - mode->cap[CONFORMANT] = 1; - break; - } - } - } else { - mode->cap[TRANSPARENT] = 0; - } -#else - mode->cap[SLOW] = 0; - mode->cap[CONFORMANT] = 1; -#endif -#if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_info) - if (visual_info) { - int transparent; - -/* babcock@cs.montana.edu reported that DEC UNIX (OSF1) V4.0 - 564 for Alpha did not properly define - GLX_TRANSPARENT_TYPE_EXT in despite claiming to - support GLX_EXT_visual_info. */ -#ifndef GLX_TRANSPARENT_TYPE_EXT -#define GLX_TRANSPARENT_TYPE_EXT 0x23 -#endif - - rc = __glut_glXGetFBConfigAttribSGIX(__glutDisplay, - fbc, GLX_TRANSPARENT_TYPE_EXT, &transparent); - if (rc != 0) { - mode->cap[TRANSPARENT] = 0; - } else { - mode->cap[TRANSPARENT] = (transparent != GLX_NONE_EXT); - } - } else { - mode->cap[TRANSPARENT] = 0; - } -#else - mode->cap[TRANSPARENT] = 0; -#endif -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample) - if (multisample) { - rc = __glut_glXGetFBConfigAttribSGIX(__glutDisplay, - fbc, GLX_SAMPLES_SGIS, &mode->cap[SAMPLES]); - if (rc != 0) { - mode->cap[SAMPLES] = 0; - } - } else { - mode->cap[SAMPLES] = 0; - } -#else - mode->cap[SAMPLES] = 0; -#endif - - } else { - /* Fbconfig is not RGBA; GLUT only uses RGBA - FBconfigs. */ - /* XXX Code could be exteneded to handle color - index FBconfigs, but seems a color index - window-renderable FBconfig would also be - advertised as an X visual. */ - mode->valid = 0; - } - } else { - /* Fbconfig does not support window rendering; - not a valid FBconfig for GLUT windows. */ - mode->valid = 0; - } - } else { - /* FBconfig ID is None (zero); not a valid - FBconfig. */ - mode->valid = 0; - } - } else { - /* FBconfig ID is None (zero); not a valid FBconfig. */ - mode->valid = 0; - } - } else { - /* No SGIX_fbconfig GLX sever implementation support. */ - mode->valid = 0; - } -#else - /* No SGIX_fbconfig GLX extension API support. */ - mode->valid = 0; -#endif - } - } - - free(vlist); - *nitems_return = n; - return fbmodes; -} - -static XVisualInfo * -findMatch(FrameBufferMode * fbmodes, int nfbmodes, - Criterion * criteria, int ncriteria, void **fbc) -{ - FrameBufferMode *found; - int *bestScore, *thisScore; - int i, j, numok, result = 0, worse, better; - - found = NULL; - numok = 1; /* "num" capability is indexed from 1, - not 0. */ - - /* XXX alloca canidate. */ - bestScore = (int *) malloc(ncriteria * sizeof(int)); - if (!bestScore) - __glutFatalError("out of memory."); - for (j = 0; j < ncriteria; j++) { - /* Very negative number. */ - bestScore[j] = -32768; - } - - /* XXX alloca canidate. */ - thisScore = (int *) malloc(ncriteria * sizeof(int)); - if (!thisScore) - __glutFatalError("out of memory."); - - for (i = 0; i < nfbmodes; i++) { - if (fbmodes[i].valid) { -#ifdef TEST -#if !defined(_WIN32) - if (verbose) - printf("Visual 0x%x\n", fbmodes[i].vi->visualid); -#endif -#endif - - worse = 0; - better = 0; - - for (j = 0; j < ncriteria; j++) { - int cap, cvalue, fbvalue; - - cap = criteria[j].capability; - cvalue = criteria[j].value; - if (cap == NUM) { - fbvalue = numok; - } else { - fbvalue = fbmodes[i].cap[cap]; - } -#ifdef TEST - if (verbose) - printf(" %s %s %d to %d\n", - capstr[cap], compstr[criteria[j].comparison], cvalue, fbvalue); -#endif - switch (criteria[j].comparison) { - case EQ: - result = cvalue == fbvalue; - thisScore[j] = 1; - break; - case NEQ: - result = cvalue != fbvalue; - thisScore[j] = 1; - break; - case LT: - result = fbvalue < cvalue; - thisScore[j] = fbvalue - cvalue; - break; - case GT: - result = fbvalue > cvalue; - thisScore[j] = fbvalue - cvalue; - break; - case LTE: - result = fbvalue <= cvalue; - thisScore[j] = fbvalue - cvalue; - break; - case GTE: - result = (fbvalue >= cvalue); - thisScore[j] = fbvalue - cvalue; - break; - case MIN: - result = fbvalue >= cvalue; - thisScore[j] = cvalue - fbvalue; - break; - } - -#ifdef TEST - if (verbose) - printf(" result=%d score=%d bestScore=%d\n", result, thisScore[j], bestScore[j]); -#endif - - if (result) { - if (better || thisScore[j] > bestScore[j]) { - better = 1; - } else if (thisScore[j] == bestScore[j]) { - /* Keep looking. */ - } else { - goto nextFBM; - } - } else { - if (cap == NUM) { - worse = 1; - } else { - goto nextFBM; - } - } - - } - - if (better && !worse) { - found = &fbmodes[i]; - for (j = 0; j < ncriteria; j++) { - bestScore[j] = thisScore[j]; - } - } - numok++; - - nextFBM:; - - } - } - free(bestScore); - free(thisScore); - if (found) { -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - *fbc = found->fbc; -#endif - return found->vi; - } else { - return NULL; - } -} - -static int -parseCriteria(char *word, Criterion * criterion, int *mask, - Bool * allowDoubleAsSingle) -{ - char *cstr, *vstr, *response; - int comparator, value = 0; - int rgb, rgba, acc, acca, count, i; - - cstr = strpbrk(word, "=>': - if (cstr[1] == '=') { - comparator = GTE; - vstr = &cstr[2]; - } else { - comparator = GT; - vstr = &cstr[1]; - } - break; - case '<': - if (cstr[1] == '=') { - comparator = LTE; - vstr = &cstr[2]; - } else { - comparator = LT; - vstr = &cstr[1]; - } - break; - case '!': - if (cstr[1] == '=') { - comparator = NEQ; - vstr = &cstr[2]; - } else { - return -1; - } - break; - default: - return -1; - } - value = (int) strtol(vstr, &response, 0); - if (response == vstr) { - /* Not a valid number. */ - return -1; - } - *cstr = '\0'; - } else { - comparator = NONE; - } - switch (word[0]) { - case 'a': - if (!strcmp(word, "alpha")) { - criterion[0].capability = ALPHA_SIZE; - if (comparator == NONE) { - criterion[0].comparison = GTE; - criterion[0].value = 1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - } - *mask |= (1 << RGBA); - *mask |= (1 << ALPHA_SIZE); - *mask |= (1 << RGBA_MODE); - return 1; - } - acca = !strcmp(word, "acca"); - acc = !strcmp(word, "acc"); - if (acc || acca) { - criterion[0].capability = ACCUM_RED_SIZE; - criterion[1].capability = ACCUM_GREEN_SIZE; - criterion[2].capability = ACCUM_BLUE_SIZE; - criterion[3].capability = ACCUM_ALPHA_SIZE; - if (acca) { - count = 4; - } else { - count = 3; - criterion[3].comparison = MIN; - criterion[3].value = 0; - } - if (comparator == NONE) { - comparator = GTE; - value = 8; - } - for (i = 0; i < count; i++) { - criterion[i].comparison = comparator; - criterion[i].value = value; - } - *mask |= (1 << ACCUM_RED_SIZE); - return 4; - } - if (!strcmp(word, "auxbufs")) { - criterion[0].capability = AUX_BUFFERS; - if (comparator == NONE) { - criterion[0].comparison = MIN; - criterion[0].value = 1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - } - *mask |= (1 << AUX_BUFFERS); - return 1; - } - return -1; - case 'b': - if (!strcmp(word, "blue")) { - criterion[0].capability = BLUE_SIZE; - if (comparator == NONE) { - criterion[0].comparison = GTE; - criterion[0].value = 1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - } - *mask |= (1 << RGBA); - *mask |= (1 << RGBA_MODE); - return 1; - } - if (!strcmp(word, "buffer")) { - criterion[0].capability = BUFFER_SIZE; - if (comparator == NONE) { - criterion[0].comparison = GTE; - criterion[0].value = 1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - } - return 1; - } - return -1; - case 'c': - if (!strcmp(word, "conformant")) { - criterion[0].capability = CONFORMANT; - if (comparator == NONE) { - criterion[0].comparison = EQ; - criterion[0].value = 1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - } - *mask |= (1 << CONFORMANT); - return 1; - } - return -1; - case 'd': - if (!strcmp(word, "depth")) { - criterion[0].capability = DEPTH_SIZE; - if (comparator == NONE) { - criterion[0].comparison = GTE; - criterion[0].value = 12; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - } - *mask |= (1 << DEPTH_SIZE); - return 1; - } - if (!strcmp(word, "double")) { - criterion[0].capability = DOUBLEBUFFER; - if (comparator == NONE) { - criterion[0].comparison = EQ; - criterion[0].value = 1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - } - *mask |= (1 << DOUBLEBUFFER); - return 1; - } - return -1; - case 'g': - if (!strcmp(word, "green")) { - criterion[0].capability = GREEN_SIZE; - if (comparator == NONE) { - criterion[0].comparison = GTE; - criterion[0].value = 1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - } - *mask |= (1 << RGBA); - *mask |= (1 << RGBA_MODE); - return 1; - } - return -1; - case 'i': - if (!strcmp(word, "index")) { - criterion[0].capability = RGBA; - criterion[0].comparison = EQ; - criterion[0].value = 0; - *mask |= (1 << RGBA); - *mask |= (1 << CI_MODE); - criterion[1].capability = BUFFER_SIZE; - if (comparator == NONE) { - criterion[1].comparison = GTE; - criterion[1].value = 1; - } else { - criterion[1].comparison = comparator; - criterion[1].value = value; - } - return 2; - } - return -1; - case 'l': - if (!strcmp(word, "luminance")) { - criterion[0].capability = RGBA; - criterion[0].comparison = EQ; - criterion[0].value = 1; - - criterion[1].capability = RED_SIZE; - if (comparator == NONE) { - criterion[1].comparison = GTE; - criterion[1].value = 1; - } else { - criterion[1].comparison = comparator; - criterion[1].value = value; - } - - criterion[2].capability = GREEN_SIZE; - criterion[2].comparison = EQ; - criterion[2].value = 0; - - criterion[3].capability = BLUE_SIZE; - criterion[3].comparison = EQ; - criterion[3].value = 0; - - *mask |= (1 << RGBA); - *mask |= (1 << RGBA_MODE); - *mask |= (1 << LUMINANCE_MODE); - return 4; - } - return -1; - case 'n': - if (!strcmp(word, "num")) { - criterion[0].capability = NUM; - if (comparator == NONE) { - return -1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - return 1; - } - } - return -1; - case 'r': - if (!strcmp(word, "red")) { - criterion[0].capability = RED_SIZE; - if (comparator == NONE) { - criterion[0].comparison = GTE; - criterion[0].value = 1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - } - *mask |= (1 << RGBA); - *mask |= (1 << RGBA_MODE); - return 1; - } - rgba = !strcmp(word, "rgba"); - rgb = !strcmp(word, "rgb"); - if (rgb || rgba) { - criterion[0].capability = RGBA; - criterion[0].comparison = EQ; - criterion[0].value = 1; - - criterion[1].capability = RED_SIZE; - criterion[2].capability = GREEN_SIZE; - criterion[3].capability = BLUE_SIZE; - criterion[4].capability = ALPHA_SIZE; - if (rgba) { - count = 5; - } else { - count = 4; - criterion[4].comparison = MIN; - criterion[4].value = 0; - } - if (comparator == NONE) { - comparator = GTE; - value = 1; - } - for (i = 1; i < count; i++) { - criterion[i].comparison = comparator; - criterion[i].value = value; - } - *mask |= (1 << RGBA); - *mask |= (1 << RGBA_MODE); - return 5; - } - return -1; - case 's': - if (!strcmp(word, "stencil")) { - criterion[0].capability = STENCIL_SIZE; - if (comparator == NONE) { - criterion[0].comparison = MIN; - criterion[0].value = 1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - } - *mask |= (1 << STENCIL_SIZE); - return 1; - } - if (!strcmp(word, "single")) { - criterion[0].capability = DOUBLEBUFFER; - if (comparator == NONE) { - criterion[0].comparison = EQ; - criterion[0].value = 0; - *allowDoubleAsSingle = True; - *mask |= (1 << DOUBLEBUFFER); - return 1; - } else { - return -1; - } - } - if (!strcmp(word, "stereo")) { - criterion[0].capability = STEREO; - if (comparator == NONE) { - criterion[0].comparison = EQ; - criterion[0].value = 1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - } - *mask |= (1 << STEREO); - return 1; - } - if (!strcmp(word, "samples")) { - criterion[0].capability = SAMPLES; - if (comparator == NONE) { - criterion[0].comparison = LTE; - criterion[0].value = 4; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - } - *mask |= (1 << SAMPLES); - return 1; - } - if (!strcmp(word, "slow")) { - criterion[0].capability = SLOW; - if (comparator == NONE) { - /* Just "slow" means permit fast visuals, but accept - slow ones in preference. Presumably the slow ones - must be higher quality or something else desirable. */ - criterion[0].comparison = GTE; - criterion[0].value = 0; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - } - *mask |= (1 << SLOW); - return 1; - } - return -1; -#if defined(_WIN32) - case 'w': - if (!strcmp(word, "win32pfd")) { - criterion[0].capability = XVISUAL; - if (comparator == NONE) { - return -1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - return 1; - } - } - return -1; -#endif -#if !defined(_WIN32) - case 'x': - if (!strcmp(word, "xvisual")) { - if (comparator == NONE) { - return -1; - } else { - criterion[0].capability = XVISUAL; - criterion[0].comparison = comparator; - criterion[0].value = value; - /* Set everything in "mask" so that no default criteria - get used. Assume the program really wants the - xvisual specified. */ - *mask |= ~0; - return 1; - } - } - /* Be a little over-eager to fill in the comparison and - value so we won't have to replicate the code after each - string match. */ - if (comparator == NONE) { - criterion[0].comparison = EQ; - criterion[0].value = 1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - } - - if (!strcmp(word, "xstaticgray")) { - criterion[0].capability = XSTATICGRAY; - *mask |= (1 << XSTATICGRAY); /* Indicates _any_ visual - class selected. */ - return 1; - } - if (!strcmp(word, "xgrayscale")) { - criterion[0].capability = XGRAYSCALE; - *mask |= (1 << XSTATICGRAY); /* Indicates _any_ visual - class selected. */ - return 1; - } - if (!strcmp(word, "xstaticcolor")) { - criterion[0].capability = XSTATICCOLOR; - *mask |= (1 << XSTATICGRAY); /* Indicates _any_ visual - class selected. */ - return 1; - } - if (!strcmp(word, "xpseudocolor")) { - criterion[0].capability = XPSEUDOCOLOR; - *mask |= (1 << XSTATICGRAY); /* Indicates _any_ visual - class selected. */ - return 1; - } - if (!strcmp(word, "xtruecolor")) { - criterion[0].capability = XTRUECOLOR; - *mask |= (1 << XSTATICGRAY); /* Indicates _any_ visual - class selected. */ - return 1; - } - if (!strcmp(word, "xdirectcolor")) { - criterion[0].capability = XDIRECTCOLOR; - *mask |= (1 << XSTATICGRAY); /* Indicates _any_ visual - class selected. */ - return 1; - } - return -1; -#endif - default: - return -1; - } -} - -static Criterion * -parseModeString(char *mode, int *ncriteria, Bool * allowDoubleAsSingle, - Criterion * requiredCriteria, int nRequired, int requiredMask) -{ - Criterion *criteria = NULL; - int n, mask, parsed, i; - char *copy, *word; - - *allowDoubleAsSingle = False; - copy = __glutStrdup(mode); - /* Attempt to estimate how many criteria entries should be - needed. */ - n = 0; - word = strtok(copy, " \t"); - while (word) { - n++; - word = strtok(NULL, " \t"); - } - /* Overestimate by 4 times ("rgba" might add four criteria - entries) plus add in possible defaults plus space for - required criteria. */ - criteria = (Criterion *) malloc((4 * n + 30 + nRequired) * sizeof(Criterion)); - if (!criteria) { - __glutFatalError("out of memory."); - } - - /* Re-copy the copy of the mode string. */ - strcpy(copy, mode); - - /* First add the required criteria (these match at the - highest priority). Typically these will be used to force a - specific level (layer), transparency, and/or visual type. */ - mask = requiredMask; - for (i = 0; i < nRequired; i++) { - criteria[i] = requiredCriteria[i]; - } - n = nRequired; - - word = strtok(copy, " \t"); - while (word) { - parsed = parseCriteria(word, &criteria[n], &mask, allowDoubleAsSingle); - if (parsed >= 0) { - n += parsed; - } else { - __glutWarning("Unrecognized display string word: %s (ignoring)\n", word); - } - word = strtok(NULL, " \t"); - } - -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample) - if (__glutIsSupportedByGLX("GLX_SGIS_multisample")) { - if (!(mask & (1 << SAMPLES))) { - criteria[n].capability = SAMPLES; - criteria[n].comparison = EQ; - criteria[n].value = 0; - n++; - } else { - /* Multisample visuals are marked nonconformant. If - multisampling was requeste and no conformant - preference was set, assume that we will settle for a - non-conformant visual to get multisampling. */ - if (!(mask & (1 << CONFORMANT))) { - criteria[n].capability = CONFORMANT; - criteria[n].comparison = MIN; - criteria[n].value = 0; - n++; - mask |= (1 << CONFORMANT); - } - } - } -#endif -#if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_info) - if (__glutIsSupportedByGLX("GLX_EXT_visual_info")) { - if (!(mask & (1 << TRANSPARENT))) { - criteria[n].capability = TRANSPARENT; - criteria[n].comparison = EQ; - criteria[n].value = 0; - n++; - } - } -#endif -#if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_rating) - if (__glutIsSupportedByGLX("GLX_EXT_visual_rating")) { - if (!(mask & (1 << SLOW))) { - criteria[n].capability = SLOW; - criteria[n].comparison = EQ; - criteria[n].value = 0; - n++; - } - if (!(mask & (1 << CONFORMANT))) { - criteria[n].capability = CONFORMANT; - criteria[n].comparison = EQ; - criteria[n].value = 1; - n++; - } - } -#endif - if (!(mask & (1 << ACCUM_RED_SIZE))) { - criteria[n].capability = ACCUM_RED_SIZE; - criteria[n].comparison = MIN; - criteria[n].value = 0; - criteria[n + 1].capability = ACCUM_GREEN_SIZE; - criteria[n + 1].comparison = MIN; - criteria[n + 1].value = 0; - criteria[n + 2].capability = ACCUM_BLUE_SIZE; - criteria[n + 2].comparison = MIN; - criteria[n + 2].value = 0; - criteria[n + 3].capability = ACCUM_ALPHA_SIZE; - criteria[n + 3].comparison = MIN; - criteria[n + 3].value = 0; - n += 4; - } - if (!(mask & (1 << AUX_BUFFERS))) { - criteria[n].capability = AUX_BUFFERS; - criteria[n].comparison = MIN; - criteria[n].value = 0; - n++; - } - if (!(mask & (1 << RGBA))) { - criteria[n].capability = RGBA; - criteria[n].comparison = EQ; - criteria[n].value = 1; - criteria[n + 1].capability = RED_SIZE; - criteria[n + 1].comparison = GTE; - criteria[n + 1].value = 1; - criteria[n + 2].capability = GREEN_SIZE; - criteria[n + 2].comparison = GTE; - criteria[n + 2].value = 1; - criteria[n + 3].capability = BLUE_SIZE; - criteria[n + 3].comparison = GTE; - criteria[n + 3].value = 1; - criteria[n + 4].capability = ALPHA_SIZE; - criteria[n + 4].comparison = MIN; - criteria[n + 4].value = 0; - n += 5; - mask |= (1 << RGBA_MODE); - } -#if !defined(_WIN32) - if (!(mask & (1 << XSTATICGRAY))) { - assert(isMesaGLX != -1); - if ((mask & (1 << RGBA_MODE)) && !isMesaGLX) { - /* Normally, request an RGBA mode visual be TrueColor, - except in the case of Mesa where we trust Mesa (and - other code in GLUT) to handle any type of RGBA visual - reasonably. */ - if (mask & (1 << LUMINANCE_MODE)) { - /* If RGBA luminance was requested, actually go for - a StaticGray visual. */ - criteria[n].capability = XSTATICGRAY; - } else { - criteria[n].capability = XTRUECOLOR; - } - criteria[n].value = 1; - criteria[n].comparison = EQ; - - n++; - } - if (mask & (1 << CI_MODE)) { - criteria[n].capability = XPSEUDOCOLOR; - criteria[n].value = 1; - criteria[n].comparison = EQ; - n++; - } - } -#endif - if (!(mask & (1 << STEREO))) { - criteria[n].capability = STEREO; - criteria[n].comparison = EQ; - criteria[n].value = 0; - n++; - } - if (!(mask & (1 << DOUBLEBUFFER))) { - criteria[n].capability = DOUBLEBUFFER; - criteria[n].comparison = EQ; - criteria[n].value = 0; - *allowDoubleAsSingle = True; - n++; - } - if (!(mask & (1 << DEPTH_SIZE))) { - criteria[n].capability = DEPTH_SIZE; - criteria[n].comparison = MIN; - criteria[n].value = 0; - n++; - } - if (!(mask & (1 << STENCIL_SIZE))) { - criteria[n].capability = STENCIL_SIZE; - criteria[n].comparison = MIN; - criteria[n].value = 0; - n++; - } - if (!(mask & (1 << LEVEL))) { - criteria[n].capability = LEVEL; - criteria[n].comparison = EQ; - criteria[n].value = 0; - n++; - } - if (n) { - /* Since over-estimated the size needed; squeeze it down to - reality. */ - criteria = (Criterion *) realloc(criteria, n * sizeof(Criterion)); - if (!criteria) { - /* Should never happen since should be shrinking down! */ - __glutFatalError("out of memory."); - } - } else { - /* For portability, avoid "realloc(ptr,0)" call. */ - free(criteria); - criteria = NULL; - } - - free(copy); - *ncriteria = n; - return criteria; -} - -static FrameBufferMode *fbmodes = NULL; -static int nfbmodes = 0; - -static XVisualInfo * -getVisualInfoFromString(char *string, Bool * treatAsSingle, - Criterion * requiredCriteria, int nRequired, int requiredMask, void **fbc) -{ - Criterion *criteria; - XVisualInfo *visinfo; - Bool allowDoubleAsSingle; - int ncriteria, i; - - if (!fbmodes) { - fbmodes = loadVisuals(&nfbmodes); - } - criteria = parseModeString(string, &ncriteria, - &allowDoubleAsSingle, requiredCriteria, nRequired, requiredMask); - if (criteria == NULL) { - __glutWarning("failed to parse mode string"); - return NULL; - } -#ifdef TEST - printCriteria(criteria, ncriteria); -#endif - visinfo = findMatch(fbmodes, nfbmodes, criteria, ncriteria, fbc); - if (visinfo) { - *treatAsSingle = 0; - } else { - if (allowDoubleAsSingle) { - /* Rewrite criteria so that we now look for a double - buffered visual which will then get treated as a - single buffered visual. */ - for (i = 0; i < ncriteria; i++) { - if (criteria[i].capability == DOUBLEBUFFER - && criteria[i].comparison == EQ - && criteria[i].value == 0) { - criteria[i].value = 1; - } - } - visinfo = findMatch(fbmodes, nfbmodes, criteria, ncriteria, fbc); - if (visinfo) { - *treatAsSingle = 1; - } - } - } - free(criteria); - - if (visinfo) { -#if defined(_WIN32) - /* We could have a valid pixel format for drawing to a - bitmap. However, we don't want to draw into a bitmap, we - need one that can be used with a window, so make sure - that this is true. */ - if (!(visinfo->dwFlags & PFD_DRAW_TO_WINDOW)) - return NULL; -#endif - return visinfo; - } else { - return NULL; - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutInitDisplayString(const char *string) -{ -#ifdef _WIN32 - XHDC = GetDC(GetDesktopWindow()); -#endif - - __glutDetermineVisualFromString = getVisualInfoFromString; - if (__glutDisplayString) { - free(__glutDisplayString); - } - if (string) { - __glutDisplayString = __glutStrdup(string); - if (!__glutDisplayString) - __glutFatalError("out of memory."); - } else { - __glutDisplayString = NULL; - } -} -/* ENDCENTRY */ - -#ifdef TEST - -Criterion requiredWindowCriteria[] = -{ - {LEVEL, EQ, 0}, - {TRANSPARENT, EQ, 0} -}; -int numRequiredWindowCriteria = sizeof(requiredWindowCriteria) / sizeof(Criterion); -int requiredWindowCriteriaMask = (1 << LEVEL) | (1 << TRANSPARENT); - -Criterion requiredOverlayCriteria[] = -{ - {LEVEL, EQ, 1}, - {TRANSPARENT, EQ, 1}, - {XPSEUDOCOLOR, EQ, 1}, - {RGBA, EQ, 0}, - {BUFFER_SIZE, GTE, 1} -}; -int numRequiredOverlayCriteria = sizeof(requiredOverlayCriteria) / sizeof(Criterion); -int requiredOverlayCriteriaMask = -(1 << LEVEL) | (1 << TRANSPARENT) | (1 << XSTATICGRAY) | (1 << RGBA) | (1 << CI_MODE); - -int -main(int argc, char **argv) -{ - Display *dpy; - XVisualInfo *vinfo; - Bool treatAsSingle; - char *str, buffer[1024]; - int tty = isatty(fileno(stdin)); - int overlay = 0, showconfig = 0; -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - GLXFBConfigSGIX fbc; -#else - void *fbc; -#endif - -#if !defined(_WIN32) - dpy = XOpenDisplay(NULL); - if (dpy == NULL) { - printf("Could not connect to X server\n"); - exit(1); - } - __glutDisplay = dpy; - __glutScreen = DefaultScreen(__glutDisplay); -#endif - while (!feof(stdin)) { - if (tty) - printf("dstr> "); - str = fgets(buffer, 1023, stdin); - if (str) { - printf("\n"); - if (!strcmp("v", str)) { - verbose = 1 - verbose; - printf("verbose = %d\n\n", verbose); - } else if (!strcmp("s", str)) { - showconfig = 1 - showconfig; - printf("showconfig = %d\n\n", showconfig); - } else if (!strcmp("o", str)) { - overlay = 1 - overlay; - printf("overlay = %d\n\n", overlay); - } else { - if (overlay) { - vinfo = getVisualInfoFromString(str, &treatAsSingle, - requiredOverlayCriteria, numRequiredOverlayCriteria, requiredOverlayCriteriaMask, (void**) &fbc); - } else { - vinfo = getVisualInfoFromString(str, &treatAsSingle, - requiredWindowCriteria, numRequiredWindowCriteria, requiredWindowCriteriaMask, (void**) &fbc); - } - if (vinfo) { - printf("\n"); - if (!tty) - printf("Display string: %s", str); -#ifdef _WIN32 - printf("Visual = 0x%x\n", 0); -#else - printf("Visual = 0x%x%s\n", vinfo->visualid, fbc ? " (needs FBC)" : ""); -#endif - if (treatAsSingle) { - printf("Treat as SINGLE.\n"); - } - if (showconfig) { - int glxCapable, bufferSize, level, renderType, doubleBuffer, - stereo, auxBuffers, redSize, greenSize, blueSize, - alphaSize, depthSize, stencilSize, acRedSize, acGreenSize, - acBlueSize, acAlphaSize; - - glXGetConfig(dpy, vinfo, GLX_BUFFER_SIZE, &bufferSize); - glXGetConfig(dpy, vinfo, GLX_LEVEL, &level); - glXGetConfig(dpy, vinfo, GLX_RGBA, &renderType); - glXGetConfig(dpy, vinfo, GLX_DOUBLEBUFFER, &doubleBuffer); - glXGetConfig(dpy, vinfo, GLX_STEREO, &stereo); - glXGetConfig(dpy, vinfo, GLX_AUX_BUFFERS, &auxBuffers); - glXGetConfig(dpy, vinfo, GLX_RED_SIZE, &redSize); - glXGetConfig(dpy, vinfo, GLX_GREEN_SIZE, &greenSize); - glXGetConfig(dpy, vinfo, GLX_BLUE_SIZE, &blueSize); - glXGetConfig(dpy, vinfo, GLX_ALPHA_SIZE, &alphaSize); - glXGetConfig(dpy, vinfo, GLX_DEPTH_SIZE, &depthSize); - glXGetConfig(dpy, vinfo, GLX_STENCIL_SIZE, &stencilSize); - glXGetConfig(dpy, vinfo, GLX_ACCUM_RED_SIZE, &acRedSize); - glXGetConfig(dpy, vinfo, GLX_ACCUM_GREEN_SIZE, &acGreenSize); - glXGetConfig(dpy, vinfo, GLX_ACCUM_BLUE_SIZE, &acBlueSize); - glXGetConfig(dpy, vinfo, GLX_ACCUM_ALPHA_SIZE, &acAlphaSize); - printf("RGBA = (%d, %d, %d, %d)\n", redSize, greenSize, blueSize, alphaSize); - printf("acc = (%d, %d, %d, %d)\n", acRedSize, acGreenSize, acBlueSize, acAlphaSize); - printf("db = %d\n", doubleBuffer); - printf("str = %d\n", stereo); - printf("aux = %d\n", auxBuffers); - printf("lvl = %d\n", level); - printf("buf = %d\n", bufferSize); - printf("rgba = %d\n", renderType); - printf("z = %d\n", depthSize); - printf("s = %d\n", stencilSize); - } - } else { - printf("\n"); - printf("No match.\n"); - } - printf("\n"); - } - } - } - printf("\n"); - return 0; -} -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_event.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_event.c deleted file mode 100644 index e453fe0389..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_event.c +++ /dev/null @@ -1,1377 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1997, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#ifdef __VMS -#include -#endif - -#include -#include -#include -#include -#include /* Some FD_ZERO macros use memset without - prototyping memset. */ - -/* Much of the following #ifdef logic to include the proper - prototypes for the select system call is based on logic - from the X11R6.3 version of . */ - -#if !defined(_WIN32) -# ifdef __sgi -# include /* prototype for bzero used by FD_ZERO */ -# endif -# if (defined(SVR4) || defined(CRAY) || defined(AIXV3)) && !defined(FD_SETSIZE) -# include /* select system call interface */ -# ifdef luna -# include -# endif -# endif - /* AIX 4.2 fubar-ed , so go to heroic measures to get it */ -# if defined(AIXV4) && !defined(NFDBITS) -# include -# endif -#endif /* !_WIN32 */ - -#include - -#if !defined(_WIN32) -# if defined(__vms) && ( __VMS_VER < 70000000 ) -# include -# else -# ifndef __vms -# include -# endif -# endif -# include -# include -# include -#else -# ifdef __CYGWIN32__ -# include -# else -# include -# endif -# ifdef __hpux - /* XXX Bert Gijsbers reports that HP-UX - needs different keysyms for the End, Insert, and Delete keys - to work on an HP 715. It would be better if HP generated - standard keysyms for standard keys. */ -# include -# endif -#endif /* !_WIN32 */ - -#include "glutint.h" - -#if defined(__vms) && ( __VMS_VER < 70000000 ) -#include -#include -extern int SYS$CLREF(int efn); -extern int SYS$SETIMR(unsigned int efn, struct timeval6 *timeout, void *ast, - unsigned int request_id, unsigned int flags); -extern int SYS$WFLOR(unsigned int efn, unsigned int mask); -extern int SYS$CANTIM(unsigned int request_id, unsigned int mode); -#endif /* __vms, VMs 6.2 or earlier */ - -static GLUTtimer *freeTimerList = NULL; - -GLUTidleCB __glutIdleFunc = NULL; -GLUTtimer *__glutTimerList = NULL; -#ifdef SUPPORT_FORTRAN -GLUTtimer *__glutNewTimer; -#endif -GLUTwindow *__glutWindowWorkList = NULL; -GLUTmenu *__glutMappedMenu; -GLUTmenu *__glutCurrentMenu = NULL; - -void (*__glutUpdateInputDeviceMaskFunc) (GLUTwindow *); -#if !defined(_WIN32) -void (*__glutMenuItemEnterOrLeave)(GLUTmenuItem * item, int num, int type) = NULL; -void (*__glutFinishMenu)(Window win, int x, int y); -void (*__glutPaintMenu)(GLUTmenu * menu); -void (*__glutStartMenu)(GLUTmenu * menu, GLUTwindow * window, int x, int y, int x_win, int y_win); -GLUTmenu * (*__glutGetMenuByNum)(int menunum); -GLUTmenuItem * (*__glutGetMenuItem)(GLUTmenu * menu, Window win, int *which); -GLUTmenu * (*__glutGetMenu)(Window win); -#endif - -Atom __glutMotifHints = None; -/* Modifier mask of ~0 implies not in core input callback. */ -unsigned int __glutModifierMask = (unsigned int) ~0; -int __glutWindowDamaged = 0; - -void GLUTAPIENTRY -glutIdleFunc(GLUTidleCB idleFunc) -{ - __glutIdleFunc = idleFunc; -} - -void GLUTAPIENTRY -glutTimerFunc(unsigned int interval, GLUTtimerCB timerFunc, int value) -{ - GLUTtimer *timer, *other; - GLUTtimer **prevptr; -#ifdef OLD_VMS - struct timeval6 now; -#else - struct timeval now; -#endif - - if (!timerFunc) - return; - - if (freeTimerList) { - timer = freeTimerList; - freeTimerList = timer->next; - } else { - timer = (GLUTtimer *) malloc(sizeof(GLUTtimer)); - if (!timer) - __glutFatalError("out of memory."); - } - - timer->func = timerFunc; -#if defined(__vms) && ( __VMS_VER < 70000000 ) - /* VMS time is expressed in units of 100 ns */ - timer->timeout.val = interval * TICKS_PER_MILLISECOND; -#else - timer->timeout.tv_sec = (int) interval / 1000; - timer->timeout.tv_usec = (int) (interval % 1000) * 1000; -#endif - timer->value = value; - timer->next = NULL; - GETTIMEOFDAY(&now); - ADD_TIME(timer->timeout, timer->timeout, now); - prevptr = &__glutTimerList; - other = *prevptr; - while (other && IS_AFTER(other->timeout, timer->timeout)) { - prevptr = &other->next; - other = *prevptr; - } - timer->next = other; -#ifdef SUPPORT_FORTRAN - __glutNewTimer = timer; /* for Fortran binding! */ -#endif - *prevptr = timer; -} - -void -handleTimeouts(void) -{ -#ifdef OLD_VMS - struct timeval6 now; -#else - struct timeval now; -#endif - GLUTtimer *timer; - - /* Assumption is that __glutTimerList is already determined - to be non-NULL. */ - GETTIMEOFDAY(&now); - while (IS_AT_OR_AFTER(__glutTimerList->timeout, now)) { - timer = __glutTimerList; - __glutTimerList = timer->next; - timer->func(timer->value); - timer->next = freeTimerList; - freeTimerList = timer; - if (!__glutTimerList) - break; - } -} - -void -__glutPutOnWorkList(GLUTwindow * window, int workMask) -{ - if (window->workMask) { - /* Already on list; just OR in new workMask. */ - window->workMask |= workMask; - } else { - /* Update work mask and add to window work list. */ - window->workMask = workMask; - /* Assert that if the window does not have a - workMask already, the window should definitely - not be the head of the work list. */ - assert(window != __glutWindowWorkList); - window->prevWorkWin = __glutWindowWorkList; - __glutWindowWorkList = window; - } -} - -void -__glutPostRedisplay(GLUTwindow * window, int layerMask) -{ - int shown = (layerMask & (GLUT_REDISPLAY_WORK | GLUT_REPAIR_WORK)) ? - window->shownState : window->overlay->shownState; - - /* Post a redisplay if the window is visible (or the - visibility of the window is unknown, ie. window->visState - == -1) _and_ the layer is known to be shown. */ - if (window->visState != GLUT_HIDDEN - && window->visState != GLUT_FULLY_COVERED && shown) { - __glutPutOnWorkList(window, layerMask); - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutPostRedisplay(void) -{ - __glutPostRedisplay(__glutCurrentWindow, GLUT_REDISPLAY_WORK); -} - -/* The advantage of this routine is that it saves the cost of a - glutSetWindow call (entailing an expensive OpenGL context switch), - particularly useful when multiple windows need redisplays posted at - the same times. See also glutPostWindowOverlayRedisplay. */ -void GLUTAPIENTRY -glutPostWindowRedisplay(int win) -{ - __glutPostRedisplay(__glutWindowList[win - 1], GLUT_REDISPLAY_WORK); -} - -/* ENDCENTRY */ -static GLUTeventParser *eventParserList = NULL; - -/* __glutRegisterEventParser allows another module to register - to intercept X events types not otherwise acted on by the - GLUT processEventsAndTimeouts routine. The X Input - extension support code uses an event parser for handling X - Input extension events. */ - -void -__glutRegisterEventParser(GLUTeventParser * parser) -{ - parser->next = eventParserList; - eventParserList = parser; -} - -static void -markWindowHidden(GLUTwindow * window) -{ - if (GLUT_HIDDEN != window->visState) { - GLUTwindow *child; - - if (window->windowStatus) { - window->visState = GLUT_HIDDEN; - __glutSetWindow(window); - window->windowStatus(GLUT_HIDDEN); - } - /* An unmap is only reported on a single window; its - descendents need to know they are no longer visible. */ - child = window->children; - while (child) { - markWindowHidden(child); - child = child->siblings; - } - } -} - -#if !defined(_WIN32) - -static void -purgeStaleWindow(Window win) -{ - GLUTstale **pEntry = &__glutStaleWindowList; - GLUTstale *entry = __glutStaleWindowList; - - /* Tranverse singly-linked stale window list look for the - window ID. */ - while (entry) { - if (entry->win == win) { - /* Found it; delete it. */ - *pEntry = entry->next; - free(entry); - return; - } else { - pEntry = &entry->next; - entry = *pEntry; - } - } -} - -/* Unlike XNextEvent, if a signal arrives, - interruptibleXNextEvent will return (with a zero return - value). This helps GLUT drop out of XNextEvent if a signal - is delivered. The intent is so that a GLUT program can call - glutIdleFunc in a signal handler to register an idle func - and then immediately get dropped into the idle func (after - returning from the signal handler). The idea is to make - GLUT's main loop reliably interruptible by signals. */ -static int -interruptibleXNextEvent(Display * dpy, XEvent * event) -{ - fd_set fds; - int rc; - - /* Flush X protocol since XPending does not do this - implicitly. */ - XFlush(__glutDisplay); - for (;;) { - if (XPending(__glutDisplay)) { - XNextEvent(dpy, event); - return 1; - } -#ifndef VMS - /* the combination ConectionNumber-select is buggy on VMS. Sometimes it - * fails. This part of the code hangs the program on VMS7.2. But even - * without it the program seems to run correctly. - * Note that this is a bug in the VMS/DECWindows run-time-libraries. - * Compaq engeneering does not want or is not able to make a fix. - * (last sentence is a quotation from Compaq when I reported the - * problem January 2000) */ - FD_ZERO(&fds); - FD_SET(__glutConnectionFD, &fds); - rc = select(__glutConnectionFD + 1, &fds, NULL, NULL, NULL); - if (rc < 0) { - if (errno == EINTR) { - return 0; - } else { - __glutFatalError("select error."); - } - } -#endif - } -} - -#endif - -static void -processEventsAndTimeouts(void) -{ - do { -#if defined(_WIN32) - MSG event; - - if(!GetMessage(&event, NULL, 0, 0)) /* bail if no more messages */ - exit(0); - TranslateMessage(&event); /* translate virtual-key messages */ - DispatchMessage(&event); /* call the window proc */ - /* see win32_event.c for event (message) processing procedures */ -#else - static int mappedMenuButton; - GLUTeventParser *parser; - XEvent event, ahead; - GLUTwindow *window; - GLUTkeyboardCB keyboard; - GLUTspecialCB special; - int gotEvent, width, height; - - gotEvent = interruptibleXNextEvent(__glutDisplay, &event); - if (gotEvent) { - switch (event.type) { - case MappingNotify: - XRefreshKeyboardMapping((XMappingEvent *) & event); - break; - case ConfigureNotify: - window = __glutGetWindow(event.xconfigure.window); - if (window) { - if (window->win != event.xconfigure.window) { - /* Ignore ConfigureNotify sent to the overlay - planes. GLUT could get here because overlays - select for StructureNotify events to receive - DestroyNotify. */ - break; - } - width = event.xconfigure.width; - height = event.xconfigure.height; - if (width != window->width || height != window->height) { - if (window->overlay) { - XResizeWindow(__glutDisplay, window->overlay->win, width, height); - } - window->width = width; - window->height = height; - __glutSetWindow(window); - /* Do not execute OpenGL out of sequence with - respect to the XResizeWindow request! */ - glXWaitX(); - window->reshape(width, height); - window->forceReshape = False; - /* A reshape should be considered like posting a - repair; this is necessary for the "Mesa - glXSwapBuffers to repair damage" hack to operate - correctly. Without it, there's not an initial - back buffer render from which to blit from when - damage happens to the window. */ - __glutPostRedisplay(window, GLUT_REPAIR_WORK); - } - } - break; - case Expose: - /* compress expose events */ - while (XEventsQueued(__glutDisplay, QueuedAfterReading) - > 0) { - XPeekEvent(__glutDisplay, &ahead); - if (ahead.type != Expose || - ahead.xexpose.window != event.xexpose.window) { - break; - } - XNextEvent(__glutDisplay, &event); - } - if (event.xexpose.count == 0) { - GLUTmenu *menu; - - if (__glutMappedMenu && - (menu = __glutGetMenu(event.xexpose.window))) { - __glutPaintMenu(menu); - } else { - window = __glutGetWindow(event.xexpose.window); - if (window) { - if (window->win == event.xexpose.window) { - __glutPostRedisplay(window, GLUT_REPAIR_WORK); - } else if (window->overlay && window->overlay->win == event.xexpose.window) { - __glutPostRedisplay(window, GLUT_OVERLAY_REPAIR_WORK); - } - } - } - } else { - /* there are more exposes to read; wait to redisplay */ - } - break; - case ButtonPress: - case ButtonRelease: - if (__glutMappedMenu && event.type == ButtonRelease - && mappedMenuButton == event.xbutton.button) { - /* Menu is currently popped up and its button is - released. */ - __glutFinishMenu(event.xbutton.window, event.xbutton.x, event.xbutton.y); - } else { - window = __glutGetWindow(event.xbutton.window); - if (window) { - GLUTmenu *menu; - int menuNum; - - menuNum = window->menu[event.xbutton.button - 1]; - /* Make sure that __glutGetMenuByNum is only called if there - really is a menu present. */ - if ((menuNum > 0) && (menu = __glutGetMenuByNum(menuNum))) { - if (event.type == ButtonPress && !__glutMappedMenu) { - __glutStartMenu(menu, window, - event.xbutton.x_root, event.xbutton.y_root, - event.xbutton.x, event.xbutton.y); - mappedMenuButton = event.xbutton.button; - } else { - /* Ignore a release of a button with a menu - attatched to it when no menu is popped up, - or ignore a press when another menu is - already popped up. */ - } - } else if (window->mouse) { - __glutSetWindow(window); - __glutModifierMask = event.xbutton.state; - window->mouse(event.xbutton.button - 1, - event.type == ButtonRelease ? - GLUT_UP : GLUT_DOWN, - event.xbutton.x, event.xbutton.y); - __glutModifierMask = ~0; - } else { - /* Stray mouse events. Ignore. */ - } - } else { - /* Window might have been destroyed and all the - events for the window may not yet be received. */ - } - } - break; - case MotionNotify: - if (!__glutMappedMenu) { - window = __glutGetWindow(event.xmotion.window); - if (window) { - /* If motion function registered _and_ buttons held - * down, call motion function... */ - if (window->motion && event.xmotion.state & - (Button1Mask | Button2Mask | Button3Mask)) { - __glutSetWindow(window); - window->motion(event.xmotion.x, event.xmotion.y); - } - /* If passive motion function registered _and_ - buttons not held down, call passive motion - function... */ - else if (window->passive && - ((event.xmotion.state & - (Button1Mask | Button2Mask | Button3Mask)) == - 0)) { - __glutSetWindow(window); - window->passive(event.xmotion.x, - event.xmotion.y); - } - } - } else { - /* Motion events are thrown away when a pop up menu - is active. */ - } - break; - case KeyPress: - case KeyRelease: - window = __glutGetWindow(event.xkey.window); - if (!window) { - break; - } - if (event.type == KeyPress) { - keyboard = window->keyboard; - } else { - - /* If we are ignoring auto repeated keys for this window, - check if the next event in the X event queue is a KeyPress - for the exact same key (and at the exact same time) as the - key being released. The X11 protocol will send auto - repeated keys as such KeyRelease/KeyPress pairs. */ - - if (window->ignoreKeyRepeat) { - if (XEventsQueued(__glutDisplay, QueuedAfterReading)) { - XPeekEvent(__glutDisplay, &ahead); - if (ahead.type == KeyPress - && ahead.xkey.window == event.xkey.window - && ahead.xkey.keycode == event.xkey.keycode - && ahead.xkey.time == event.xkey.time) { - /* Pop off the repeated KeyPress and ignore - the auto repeated KeyRelease/KeyPress pair. */ - XNextEvent(__glutDisplay, &event); - break; - } - } - } - keyboard = window->keyboardUp; - } - if (keyboard) { - char tmp[1]; - int rc; - - rc = XLookupString(&event.xkey, tmp, sizeof(tmp), - NULL, NULL); - if (rc) { - __glutSetWindow(window); - __glutModifierMask = event.xkey.state; - keyboard(tmp[0], - event.xkey.x, event.xkey.y); - __glutModifierMask = ~0; - break; - } - } - if (event.type == KeyPress) { - special = window->special; - } else { - special = window->specialUp; - } - if (special) { - KeySym ks; - int key; - -/* Introduced in X11R6: (Partial list of) Keypad Functions. Define - in place in case compiling against an older pre-X11R6 - X11/keysymdef.h file. */ -#ifndef XK_KP_Home -#define XK_KP_Home 0xFF95 -#endif -#ifndef XK_KP_Left -#define XK_KP_Left 0xFF96 -#endif -#ifndef XK_KP_Up -#define XK_KP_Up 0xFF97 -#endif -#ifndef XK_KP_Right -#define XK_KP_Right 0xFF98 -#endif -#ifndef XK_KP_Down -#define XK_KP_Down 0xFF99 -#endif -#ifndef XK_KP_Prior -#define XK_KP_Prior 0xFF9A -#endif -#ifndef XK_KP_Next -#define XK_KP_Next 0xFF9B -#endif -#ifndef XK_KP_End -#define XK_KP_End 0xFF9C -#endif -#ifndef XK_KP_Insert -#define XK_KP_Insert 0xFF9E -#endif -#ifndef XK_KP_Delete -#define XK_KP_Delete 0xFF9F -#endif - - ks = XLookupKeysym((XKeyEvent *) & event, 0); - /* XXX Verbose, but makes no assumptions about keysym - layout. */ - switch (ks) { -/* *INDENT-OFF* */ - /* function keys */ - case XK_F1: key = GLUT_KEY_F1; break; - case XK_F2: key = GLUT_KEY_F2; break; - case XK_F3: key = GLUT_KEY_F3; break; - case XK_F4: key = GLUT_KEY_F4; break; - case XK_F5: key = GLUT_KEY_F5; break; - case XK_F6: key = GLUT_KEY_F6; break; - case XK_F7: key = GLUT_KEY_F7; break; - case XK_F8: key = GLUT_KEY_F8; break; - case XK_F9: key = GLUT_KEY_F9; break; - case XK_F10: key = GLUT_KEY_F10; break; - case XK_F11: key = GLUT_KEY_F11; break; - case XK_F12: key = GLUT_KEY_F12; break; - /* directional keys */ - case XK_KP_Left: - case XK_Left: key = GLUT_KEY_LEFT; break; - case XK_KP_Up: /* Introduced in X11R6. */ - case XK_Up: key = GLUT_KEY_UP; break; - case XK_KP_Right: /* Introduced in X11R6. */ - case XK_Right: key = GLUT_KEY_RIGHT; break; - case XK_KP_Down: /* Introduced in X11R6. */ - case XK_Down: key = GLUT_KEY_DOWN; break; -/* *INDENT-ON* */ - - case XK_KP_Prior: /* Introduced in X11R6. */ - case XK_Prior: - /* XK_Prior same as X11R6's XK_Page_Up */ - key = GLUT_KEY_PAGE_UP; - break; - case XK_KP_Next: /* Introduced in X11R6. */ - case XK_Next: - /* XK_Next same as X11R6's XK_Page_Down */ - key = GLUT_KEY_PAGE_DOWN; - break; - case XK_KP_Home: /* Introduced in X11R6. */ - case XK_Home: - key = GLUT_KEY_HOME; - break; -#ifdef __hpux - case XK_Select: -#endif - case XK_KP_End: /* Introduced in X11R6. */ - case XK_End: - key = GLUT_KEY_END; - break; -#ifdef __hpux - case XK_InsertChar: -#endif - case XK_KP_Insert: /* Introduced in X11R6. */ - case XK_Insert: - key = GLUT_KEY_INSERT; - break; -#ifdef __hpux - case XK_DeleteChar: -#endif - case XK_KP_Delete: /* Introduced in X11R6. */ - /* The Delete character is really an ASCII key. */ - __glutSetWindow(window); - keyboard(127, /* ASCII Delete character. */ - event.xkey.x, event.xkey.y); - goto skip; - default: - goto skip; - } - __glutSetWindow(window); - __glutModifierMask = event.xkey.state; - special(key, event.xkey.x, event.xkey.y); - __glutModifierMask = ~0; - skip:; - } - break; - case EnterNotify: - case LeaveNotify: - if (event.xcrossing.mode != NotifyNormal || - event.xcrossing.detail == NotifyNonlinearVirtual || - event.xcrossing.detail == NotifyVirtual) { - - /* Careful to ignore Enter/LeaveNotify events that - come from the pop-up menu pointer grab and ungrab. - Also, ignore "virtual" Enter/LeaveNotify events - since they represent the pointer passing through - the window hierarchy without actually entering or - leaving the actual real estate of a window. */ - - break; - } - if (__glutMappedMenu) { - GLUTmenuItem *item; - int num; - - item = __glutGetMenuItem(__glutMappedMenu, - event.xcrossing.window, &num); - if (item) { - __glutMenuItemEnterOrLeave(item, num, event.type); - break; - } - } - window = __glutGetWindow(event.xcrossing.window); - if (window) { - if (window->entry) { - if (event.type == EnterNotify) { - - /* With overlays established, X can report two - enter events for both the overlay and normal - plane window. Do not generate a second enter - callback if we reported one without an - intervening leave. */ - - if (window->entryState != EnterNotify) { - int num = window->num; - Window xid = window->win; - - window->entryState = EnterNotify; - __glutSetWindow(window); - window->entry(GLUT_ENTERED); - - if (__glutMappedMenu) { - - /* Do not generate any passive motion events - when menus are in use. */ - - } else { - - /* An EnterNotify event can result in a - "compound" callback if a passive motion - callback is also registered. In this case, - be a little paranoid about the possibility - the window could have been destroyed in the - entry callback. */ - - window = __glutWindowList[num]; - if (window && window->passive && window->win == xid) { - __glutSetWindow(window); - window->passive(event.xcrossing.x, event.xcrossing.y); - } - } - } - } else { - if (window->entryState != LeaveNotify) { - - /* When an overlay is established for a window - already mapped and with the pointer in it, - the X server will generate a leave/enter - event pair as the pointer leaves (without - moving) from the normal plane X window to - the newly mapped overlay X window (or vice - versa). This enter/leave pair should not be - reported to the GLUT program since the pair - is a consequence of creating (or destroying) - the overlay, not an actual leave from the - GLUT window. */ - - if (XEventsQueued(__glutDisplay, QueuedAfterReading)) { - XPeekEvent(__glutDisplay, &ahead); - if (ahead.type == EnterNotify && - __glutGetWindow(ahead.xcrossing.window) == window) { - XNextEvent(__glutDisplay, &event); - break; - } - } - window->entryState = LeaveNotify; - __glutSetWindow(window); - window->entry(GLUT_LEFT); - } - } - } else if (window->passive) { - __glutSetWindow(window); - window->passive(event.xcrossing.x, event.xcrossing.y); - } - } - break; - case UnmapNotify: - /* MapNotify events are not needed to maintain - visibility state since VisibilityNotify events will - be delivered when a window becomes visible from - mapping. However, VisibilityNotify events are not - delivered when a window is unmapped (for the window - or its children). */ - window = __glutGetWindow(event.xunmap.window); - if (window) { - if (window->win != event.xconfigure.window) { - /* Ignore UnmapNotify sent to the overlay planes. - GLUT could get here because overlays select for - StructureNotify events to receive DestroyNotify. - */ - break; - } - markWindowHidden(window); - } - break; - case VisibilityNotify: - window = __glutGetWindow(event.xvisibility.window); - if (window) { - /* VisibilityUnobscured+1 = GLUT_FULLY_RETAINED, - VisibilityPartiallyObscured+1 = - GLUT_PARTIALLY_RETAINED, VisibilityFullyObscured+1 - = GLUT_FULLY_COVERED. */ - int visState = event.xvisibility.state + 1; - - if (visState != window->visState) { - if (window->windowStatus) { - window->visState = visState; - __glutSetWindow(window); - window->windowStatus(visState); - } - } - } - break; - case ClientMessage: - if (event.xclient.data.l[0] == __glutWMDeleteWindow) - exit(0); - break; - case DestroyNotify: - purgeStaleWindow(event.xdestroywindow.window); - break; - case CirculateNotify: - case CreateNotify: - case GravityNotify: - case ReparentNotify: - /* Uninteresting to GLUT (but possible for GLUT to - receive). */ - break; - default: - /* Pass events not directly handled by the GLUT main - event loop to any event parsers that have been - registered. In this way, X Input extension events - are passed to the correct handler without forcing - all GLUT programs to support X Input event handling. - */ - parser = eventParserList; - while (parser) { - if (parser->func(&event)) - break; - parser = parser->next; - } - break; - } - } -#endif /* _WIN32 */ - if (__glutTimerList) { - handleTimeouts(); - } - } - while (XPending(__glutDisplay)); -} - -static void -waitForSomething(void) -{ -#if defined(__vms) && ( __VMS_VER < 70000000 ) - static struct timeval6 zerotime = - {0}; - unsigned int timer_efn; -#define timer_id 'glut' /* random :-) number */ - unsigned int wait_mask; -#else - static struct timeval zerotime = - {0, 0}; -#if !defined(_WIN32) - fd_set fds; -#endif -#endif -#ifdef OLD_VMS - struct timeval6 now, timeout, waittime; -#else - struct timeval now, timeout, waittime; -#endif -#if !defined(_WIN32) - int rc; -#endif - - /* Flush X protocol since XPending does not do this - implicitly. */ - XFlush(__glutDisplay); - if (XPending(__glutDisplay)) { - /* It is possible (but quite rare) that XFlush may have - needed to wait for a writable X connection file - descriptor, and in the process, may have had to read off - X protocol from the file descriptor. If XPending is true, - this case occured and we should avoid waiting in select - since X protocol buffered within Xlib is due to be - processed and potentially no more X protocol is on the - file descriptor, so we would risk waiting improperly in - select. */ - goto immediatelyHandleXinput; - } -#if defined(__vms) && ( __VMS_VER < 70000000 ) - timeout = __glutTimerList->timeout; - GETTIMEOFDAY(&now); - wait_mask = 1 << (__glutConnectionFD & 31); - if (IS_AFTER(now, timeout)) { - /* We need an event flag for the timer. */ - /* XXX The `right' way to do this is to use LIB$GET_EF, but - since it needs to be in the same cluster as the EFN for - the display, we will have hack it. */ - timer_efn = __glutConnectionFD - 1; - if ((timer_efn / 32) != (__glutConnectionFD / 32)) { - timer_efn = __glutConnectionFD + 1; - } - rc = SYS$CLREF(timer_efn); - rc = SYS$SETIMR(timer_efn, &timeout, NULL, timer_id, 0); - wait_mask |= 1 << (timer_efn & 31); - } else { - timer_efn = 0; - } - rc = SYS$WFLOR(__glutConnectionFD, wait_mask); - if (timer_efn != 0 && SYS$CLREF(timer_efn) == SS$_WASCLR) { - rc = SYS$CANTIM(timer_id, PSL$C_USER); - } - /* XXX There does not seem to be checking of "rc" in the code - above. Can any of the SYS$ routines above fail? */ -#else /* not vms6.2 or lower */ -#if !defined(_WIN32) - FD_ZERO(&fds); - FD_SET(__glutConnectionFD, &fds); -#endif - timeout = __glutTimerList->timeout; - GETTIMEOFDAY(&now); - if (IS_AFTER(now, timeout)) { - TIMEDELTA(waittime, timeout, now); - } else { - waittime = zerotime; - } -#if !defined(_WIN32) - rc = select(__glutConnectionFD + 1, &fds, - NULL, NULL, &waittime); - if (rc < 0 && errno != EINTR) - __glutFatalError("select error."); -#else - - MsgWaitForMultipleObjects(0, NULL, FALSE, - waittime.tv_sec*1000 + waittime.tv_usec/1000, QS_ALLINPUT); - -#endif -#endif /* not vms6.2 or lower */ - /* Without considering the cause of select unblocking, check - for pending X events and handle any timeouts (by calling - processEventsAndTimeouts). We always look for X events - even if select returned with 0 (indicating a timeout); - otherwise we risk starving X event processing by continous - timeouts. */ - if (XPending(__glutDisplay)) { - immediatelyHandleXinput: - processEventsAndTimeouts(); - } else { - if (__glutTimerList) - handleTimeouts(); - } -} - -static void -idleWait(void) -{ - if (XPending(__glutDisplay)) { - processEventsAndTimeouts(); - } else { - if (__glutTimerList) { - handleTimeouts(); - } - } - /* Make sure idle func still exists! */ - if (__glutIdleFunc) { - __glutIdleFunc(); - } -} - -static GLUTwindow **beforeEnd; - -static GLUTwindow * -processWindowWorkList(GLUTwindow * window) -{ - int workMask; - - if (window->prevWorkWin) { - window->prevWorkWin = processWindowWorkList(window->prevWorkWin); - } else { - beforeEnd = &window->prevWorkWin; - } - - /* Capture work mask for work that needs to be done to this - window, then clear the window's work mask (excepting the - dummy work bit, see below). Then, process the captured - work mask. This allows callbacks in the processing the - captured work mask to set the window's work mask for - subsequent processing. */ - - workMask = window->workMask; - assert((workMask & GLUT_DUMMY_WORK) == 0); - - /* Set the dummy work bit, clearing all other bits, to - indicate that the window is currently on the window work - list _and_ that the window's work mask is currently being - processed. This convinces __glutPutOnWorkList that this - window is on the work list still. */ - window->workMask = GLUT_DUMMY_WORK; - - /* Optimization: most of the time, the work to do is a - redisplay and not these other types of work. Check for - the following cases as a group to before checking each one - individually one by one. This saves about 25 MIPS - instructions in the common redisplay only case. */ - if (workMask & (GLUT_EVENT_MASK_WORK | GLUT_DEVICE_MASK_WORK | - GLUT_CONFIGURE_WORK | GLUT_COLORMAP_WORK | GLUT_MAP_WORK)) { -#if !defined(_WIN32) - /* Be sure to set event mask BEFORE map window is done. */ - if (workMask & GLUT_EVENT_MASK_WORK) { - long eventMask; - - /* Make sure children are not propogating events this - window is selecting for. Be sure to do this before - enabling events on the children's parent. */ - if (window->children) { - GLUTwindow *child = window->children; - unsigned long attribMask = CWDontPropagate; - XSetWindowAttributes wa; - - wa.do_not_propagate_mask = window->eventMask & GLUT_DONT_PROPAGATE_FILTER_MASK; - if (window->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK) { - wa.event_mask = child->eventMask | (window->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK); - attribMask |= CWEventMask; - } - do { - XChangeWindowAttributes(__glutDisplay, child->win, - attribMask, &wa); - child = child->siblings; - } while (child); - } - eventMask = window->eventMask; - if (window->parent && window->parent->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK) - eventMask |= (window->parent->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK); - XSelectInput(__glutDisplay, window->win, eventMask); - if (window->overlay) - XSelectInput(__glutDisplay, window->overlay->win, - window->eventMask & GLUT_OVERLAY_EVENT_FILTER_MASK); - } -#endif /* !_WIN32 */ - /* Be sure to set device mask BEFORE map window is done. */ - if (workMask & GLUT_DEVICE_MASK_WORK) { - __glutUpdateInputDeviceMaskFunc(window); - } - /* Be sure to configure window BEFORE map window is done. */ - if (workMask & GLUT_CONFIGURE_WORK) { -#if defined(_WIN32) - RECT changes; - POINT point; - UINT flags = SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER - | SWP_NOSENDCHANGING | SWP_NOSIZE | SWP_NOZORDER; - - GetClientRect(window->win, &changes); - - /* If this window is a toplevel window, translate the 0,0 client - coordinate into a screen coordinate for proper placement. */ - if (!window->parent) { - point.x = 0; - point.y = 0; - ClientToScreen(window->win, &point); - changes.left = point.x; - changes.top = point.y; - } - if (window->desiredConfMask & (CWX | CWY)) { - changes.left = window->desiredX; - changes.top = window->desiredY; - flags &= ~SWP_NOMOVE; - } - if (window->desiredConfMask & (CWWidth | CWHeight)) { - changes.right = changes.left + window->desiredWidth; - changes.bottom = changes.top + window->desiredHeight; - flags &= ~SWP_NOSIZE; - /* XXX If overlay exists, resize the overlay here, ie. - if (window->overlay) ... */ - } - if (window->desiredConfMask & CWStackMode) { - flags &= ~SWP_NOZORDER; - /* XXX Overlay support might require something special here. */ - } - - /* Adjust the window rectangle because Win32 thinks that the x, y, - width & height are the WHOLE window (including decorations), - whereas GLUT treats the x, y, width & height as only the CLIENT - area of the window. Only do this to top level windows - that are not in game mode (since game mode windows do - not have any decorations). */ - if (!window->parent && window != __glutGameModeWindow) { - AdjustWindowRect(&changes, - WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, - FALSE); - } - - /* Do the repositioning, moving, and push/pop. */ - SetWindowPos(window->win, - window->desiredStack == Above ? HWND_TOP : HWND_NOTOPMOST, - changes.left, changes.top, - changes.right - changes.left, changes.bottom - changes.top, - flags); - - /* Zero out the mask. */ - window->desiredConfMask = 0; - - /* This hack causes the window to go back to the right position - when it is taken out of fullscreen mode. */ - if (workMask & GLUT_FULL_SCREEN_WORK) { - window->desiredConfMask |= CWX | CWY; - window->desiredX = point.x; - window->desiredY = point.y; - } -#else /* !_WIN32 */ - XWindowChanges changes; - - changes.x = window->desiredX; - changes.y = window->desiredY; - if (window->desiredConfMask & (CWWidth | CWHeight)) { - changes.width = window->desiredWidth; - changes.height = window->desiredHeight; - if (window->overlay) - XResizeWindow(__glutDisplay, window->overlay->win, - window->desiredWidth, window->desiredHeight); - if (__glutMotifHints != None) { - if (workMask & GLUT_FULL_SCREEN_WORK) { - MotifWmHints hints; - - hints.flags = MWM_HINTS_DECORATIONS; - hints.decorations = 0; /* Absolutely no - decorations. */ - XChangeProperty(__glutDisplay, window->win, - __glutMotifHints, __glutMotifHints, 32, - PropModeReplace, (unsigned char *) &hints, 4); - if (workMask & GLUT_MAP_WORK) { - /* Handle case where glutFullScreen is called - before the first time that the window is - mapped. Some window managers will randomly or - interactively position the window the first - time it is mapped if the window's - WM_NORMAL_HINTS property does not request an - explicit position. We don't want any such - window manager interaction when going - fullscreen. Overwrite the WM_NORMAL_HINTS - property installed by glutCreateWindow's - XSetWMProperties property with one explicitly - requesting a fullscreen window. */ - XSizeHints hints; - - hints.flags = USPosition | USSize; - hints.x = 0; - hints.y = 0; - hints.width = window->desiredWidth; - hints.height = window->desiredHeight; - XSetWMNormalHints(__glutDisplay, window->win, &hints); - } - } else { - XDeleteProperty(__glutDisplay, window->win, __glutMotifHints); - } - } - } - if (window->desiredConfMask & CWStackMode) { - changes.stack_mode = window->desiredStack; - /* Do not let glutPushWindow push window beneath the - underlay. */ - if (window->parent && window->parent->overlay - && window->desiredStack == Below) { - changes.stack_mode = Above; - changes.sibling = window->parent->overlay->win; - window->desiredConfMask |= CWSibling; - } - } - XConfigureWindow(__glutDisplay, window->win, - window->desiredConfMask, &changes); - window->desiredConfMask = 0; -#endif - } -#if !defined(_WIN32) - /* Be sure to establish the colormaps BEFORE map window is - done. */ - if (workMask & GLUT_COLORMAP_WORK) { - __glutEstablishColormapsProperty(window); - } -#endif - if (workMask & GLUT_MAP_WORK) { - switch (window->desiredMapState) { - case WithdrawnState: - if (window->parent) { - XUnmapWindow(__glutDisplay, window->win); - } else { - XWithdrawWindow(__glutDisplay, window->win, - __glutScreen); - } - window->shownState = 0; - break; - case NormalState: - XMapWindow(__glutDisplay, window->win); - window->shownState = 1; - break; -#ifdef _WIN32 - case GameModeState: /* Not an Xlib value. */ - ShowWindow(window->win, SW_SHOW); - window->shownState = 1; - break; -#endif - case IconicState: - XIconifyWindow(__glutDisplay, window->win, __glutScreen); - window->shownState = 0; - break; - } - } - } - if (workMask & (GLUT_REDISPLAY_WORK | GLUT_OVERLAY_REDISPLAY_WORK | GLUT_REPAIR_WORK | GLUT_OVERLAY_REPAIR_WORK)) { - if (window->forceReshape) { - /* Guarantee that before a display callback is generated - for a window, a reshape callback must be generated. */ - __glutSetWindow(window); - window->reshape(window->width, window->height); - window->forceReshape = False; - - /* Setting the redisplay bit on the first reshape is - necessary to make the "Mesa glXSwapBuffers to repair - damage" hack operate correctly. Without indicating a - redisplay is necessary, there's not an initial back - buffer render from which to blit from when damage - happens to the window. */ - workMask |= GLUT_REDISPLAY_WORK; - } - /* The code below is more involved than otherwise necessary - because it is paranoid about the overlay or entire window - being removed or destroyed in the course of the callbacks. - Notice how the global __glutWindowDamaged is used to record - the layers' damage status. See the code in glutLayerGet for - how __glutWindowDamaged is used. The point is to not have to - update the "damaged" field after the callback since the - window (or overlay) may be destroyed (or removed) when the - callback returns. */ - - if (window->overlay && window->overlay->display) { - int num = window->num; - Window xid = window->overlay ? window->overlay->win : None; - - /* If an overlay display callback is registered, we - differentiate between a redisplay needed for the - overlay and/or normal plane. If there is no overlay - display callback registered, we simply use the - standard display callback. */ - - if (workMask & (GLUT_REDISPLAY_WORK | GLUT_REPAIR_WORK)) { - if (__glutMesaSwapHackSupport) { - if (window->usedSwapBuffers) { - if ((workMask & (GLUT_REPAIR_WORK | GLUT_REDISPLAY_WORK)) == GLUT_REPAIR_WORK) { - SWAP_BUFFERS_WINDOW(window); - goto skippedDisplayCallback1; - } - } - } - /* Render to normal plane. */ -#ifdef _WIN32 - window->renderDc = window->hdc; -#endif - window->renderWin = window->win; - window->renderCtx = window->ctx; - __glutWindowDamaged = (workMask & GLUT_REPAIR_WORK); - __glutSetWindow(window); - window->usedSwapBuffers = 0; - window->display(); - __glutWindowDamaged = 0; - - skippedDisplayCallback1:; - } - if (workMask & (GLUT_OVERLAY_REDISPLAY_WORK | GLUT_OVERLAY_REPAIR_WORK)) { - window = __glutWindowList[num]; - if (window && window->overlay && - window->overlay->win == xid && window->overlay->display) { - - /* Render to overlay. */ -#ifdef _WIN32 - window->renderDc = window->overlay->hdc; -#endif - window->renderWin = window->overlay->win; - window->renderCtx = window->overlay->ctx; - __glutWindowDamaged = (workMask & GLUT_OVERLAY_REPAIR_WORK); - __glutSetWindow(window); - window->overlay->display(); - __glutWindowDamaged = 0; - } else { - /* Overlay may have since been destroyed or the - overlay callback may have been disabled during - normal display callback. */ - } - } - } else { - if (__glutMesaSwapHackSupport) { - if (!window->overlay && window->usedSwapBuffers) { - if ((workMask & (GLUT_REPAIR_WORK | GLUT_REDISPLAY_WORK)) == GLUT_REPAIR_WORK) { - SWAP_BUFFERS_WINDOW(window); - goto skippedDisplayCallback2; - } - } - } - /* Render to normal plane (and possibly overlay). */ - __glutWindowDamaged = (workMask & (GLUT_OVERLAY_REPAIR_WORK | GLUT_REPAIR_WORK)); - __glutSetWindow(window); - window->usedSwapBuffers = 0; - window->display(); - __glutWindowDamaged = 0; - - skippedDisplayCallback2:; - } - } - /* Combine workMask with window->workMask to determine what - finish and debug work there is. */ - workMask |= window->workMask; - - if (workMask & GLUT_FINISH_WORK) { - /* Finish work makes sure a glFinish gets done to indirect - rendering contexts. Indirect contexts tend to have much - longer latency because lots of OpenGL extension requests - can queue up in the X protocol stream. __glutSetWindow - is where the finish works gets queued for indirect - contexts. */ - __glutSetWindow(window); - glFinish(); - } - if (workMask & GLUT_DEBUG_WORK) { - __glutSetWindow(window); - glutReportErrors(); - } - /* Strip out dummy, finish, and debug work bits. */ - window->workMask &= ~(GLUT_DUMMY_WORK | GLUT_FINISH_WORK | GLUT_DEBUG_WORK); - if (window->workMask) { - /* Leave on work list. */ - return window; - } else { - /* Remove current window from work list. */ - return window->prevWorkWin; - } -} - -#ifndef _WIN32 -static /* X11 implementations do not need this global. */ -#endif -void -__glutProcessWindowWorkLists(void) -{ - if (__glutWindowWorkList) { - GLUTwindow *remainder, *work; - - work = __glutWindowWorkList; - __glutWindowWorkList = NULL; - if (work) { - remainder = processWindowWorkList(work); - if (remainder) { - *beforeEnd = __glutWindowWorkList; - __glutWindowWorkList = remainder; - } - } - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutMainLoop(void) -{ -#if !defined(_WIN32) - if (!__glutDisplay) - __glutFatalUsage("main loop entered with out proper initialization."); -#endif - if (!__glutWindowListSize) - __glutFatalUsage( - "main loop entered with no windows created."); - for (;;) { - __glutProcessWindowWorkLists(); - if (__glutIdleFunc || __glutWindowWorkList) { - idleWait(); - } else { - if (__glutTimerList) { - waitForSomething(); - } else { - processEventsAndTimeouts(); - } - } - } -} -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_ext.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_ext.c deleted file mode 100644 index 922a94b20d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_ext.c +++ /dev/null @@ -1,201 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include - -#include "glutint.h" - -/* CENTRY */ -int GLUTAPIENTRY -glutExtensionSupported(const char *extension) -{ - static const GLubyte *extensions = NULL; - const GLubyte *start; - GLubyte *where, *terminator; - - /* Extension names should not have spaces. */ - where = (GLubyte *) strchr(extension, ' '); - if (where || *extension == '\0') - return 0; - - if (!extensions) { - extensions = glGetString(GL_EXTENSIONS); - } - /* It takes a bit of care to be fool-proof about parsing the - OpenGL extensions string. Don't be fooled by sub-strings, - etc. */ - start = extensions; - for (;;) { - /* If your application crashes in the strstr routine below, - you are probably calling glutExtensionSupported without - having a current window. Calling glGetString without - a current OpenGL context has unpredictable results. - Please fix your program. */ - where = (GLubyte *) strstr((const char *) start, extension); - if (!where) - break; - terminator = where + strlen(extension); - if (where == start || *(where - 1) == ' ') { - if (*terminator == ' ' || *terminator == '\0') { - return 1; - } - } - start = terminator; - } - return 0; -} - - -struct name_address_pair { - const char *name; - const GLUTproc address; -}; - -static struct name_address_pair glut_functions[] = { - { "glutInit", (const GLUTproc) glutInit }, - { "glutInitDisplayMode", (const GLUTproc) glutInitDisplayMode }, - { "glutInitDisplayString", (const GLUTproc) glutInitDisplayString }, - { "glutInitWindowPosition", (const GLUTproc) glutInitWindowPosition }, - { "glutInitWindowSize", (const GLUTproc) glutInitWindowSize }, - { "glutMainLoop", (const GLUTproc) glutMainLoop }, - { "glutCreateWindow", (const GLUTproc) glutCreateWindow }, - { "glutCreateSubWindow", (const GLUTproc) glutCreateSubWindow }, - { "glutDestroyWindow", (const GLUTproc) glutDestroyWindow }, - { "glutPostRedisplay", (const GLUTproc) glutPostRedisplay }, - { "glutPostWindowRedisplay", (const GLUTproc) glutPostWindowRedisplay }, - { "glutSwapBuffers", (const GLUTproc) glutSwapBuffers }, - { "glutGetWindow", (const GLUTproc) glutGetWindow }, - { "glutSetWindow", (const GLUTproc) glutSetWindow }, - { "glutSetWindowTitle", (const GLUTproc) glutSetWindowTitle }, - { "glutSetIconTitle", (const GLUTproc) glutSetIconTitle }, - { "glutPositionWindow", (const GLUTproc) glutPositionWindow }, - { "glutReshapeWindow", (const GLUTproc) glutReshapeWindow }, - { "glutPopWindow", (const GLUTproc) glutPopWindow }, - { "glutPushWindow", (const GLUTproc) glutPushWindow }, - { "glutIconifyWindow", (const GLUTproc) glutIconifyWindow }, - { "glutShowWindow", (const GLUTproc) glutShowWindow }, - { "glutHideWindow", (const GLUTproc) glutHideWindow }, - { "glutFullScreen", (const GLUTproc) glutFullScreen }, - { "glutSetCursor", (const GLUTproc) glutSetCursor }, - { "glutWarpPointer", (const GLUTproc) glutWarpPointer }, - { "glutEstablishOverlay", (const GLUTproc) glutEstablishOverlay }, - { "glutRemoveOverlay", (const GLUTproc) glutRemoveOverlay }, - { "glutUseLayer", (const GLUTproc) glutUseLayer }, - { "glutPostOverlayRedisplay", (const GLUTproc) glutPostOverlayRedisplay }, - { "glutPostWindowOverlayRedisplay", (const GLUTproc) glutPostWindowOverlayRedisplay }, - { "glutShowOverlay", (const GLUTproc) glutShowOverlay }, - { "glutHideOverlay", (const GLUTproc) glutHideOverlay }, - { "glutCreateMenu", (const GLUTproc) glutCreateMenu }, - { "glutDestroyMenu", (const GLUTproc) glutDestroyMenu }, - { "glutGetMenu", (const GLUTproc) glutGetMenu }, - { "glutSetMenu", (const GLUTproc) glutSetMenu }, - { "glutAddMenuEntry", (const GLUTproc) glutAddMenuEntry }, - { "glutAddSubMenu", (const GLUTproc) glutAddSubMenu }, - { "glutChangeToMenuEntry", (const GLUTproc) glutChangeToMenuEntry }, - { "glutChangeToSubMenu", (const GLUTproc) glutChangeToSubMenu }, - { "glutRemoveMenuItem", (const GLUTproc) glutRemoveMenuItem }, - { "glutAttachMenu", (const GLUTproc) glutAttachMenu }, - { "glutDetachMenu", (const GLUTproc) glutDetachMenu }, - { "glutDisplayFunc", (const GLUTproc) glutDisplayFunc }, - { "glutReshapeFunc", (const GLUTproc) glutReshapeFunc }, - { "glutKeyboardFunc", (const GLUTproc) glutKeyboardFunc }, - { "glutMouseFunc", (const GLUTproc) glutMouseFunc }, - { "glutMotionFunc", (const GLUTproc) glutMotionFunc }, - { "glutPassiveMotionFunc", (const GLUTproc) glutPassiveMotionFunc }, - { "glutEntryFunc", (const GLUTproc) glutEntryFunc }, - { "glutVisibilityFunc", (const GLUTproc) glutVisibilityFunc }, - { "glutIdleFunc", (const GLUTproc) glutIdleFunc }, - { "glutTimerFunc", (const GLUTproc) glutTimerFunc }, - { "glutMenuStateFunc", (const GLUTproc) glutMenuStateFunc }, - { "glutSpecialFunc", (const GLUTproc) glutSpecialFunc }, - { "glutSpaceballMotionFunc", (const GLUTproc) glutSpaceballMotionFunc }, - { "glutSpaceballRotateFunc", (const GLUTproc) glutSpaceballRotateFunc }, - { "glutSpaceballButtonFunc", (const GLUTproc) glutSpaceballButtonFunc }, - { "glutButtonBoxFunc", (const GLUTproc) glutButtonBoxFunc }, - { "glutDialsFunc", (const GLUTproc) glutDialsFunc }, - { "glutTabletMotionFunc", (const GLUTproc) glutTabletMotionFunc }, - { "glutTabletButtonFunc", (const GLUTproc) glutTabletButtonFunc }, - { "glutMenuStatusFunc", (const GLUTproc) glutMenuStatusFunc }, - { "glutOverlayDisplayFunc", (const GLUTproc) glutOverlayDisplayFunc }, - { "glutWindowStatusFunc", (const GLUTproc) glutWindowStatusFunc }, - { "glutKeyboardUpFunc", (const GLUTproc) glutKeyboardUpFunc }, - { "glutSpecialUpFunc", (const GLUTproc) glutSpecialUpFunc }, - { "glutJoystickFunc", (const GLUTproc) glutJoystickFunc }, - { "glutSetColor", (const GLUTproc) glutSetColor }, - { "glutGetColor", (const GLUTproc) glutGetColor }, - { "glutCopyColormap", (const GLUTproc) glutCopyColormap }, - { "glutGet", (const GLUTproc) glutGet }, - { "glutDeviceGet", (const GLUTproc) glutDeviceGet }, - { "glutExtensionSupported", (const GLUTproc) glutExtensionSupported }, - { "glutGetModifiers", (const GLUTproc) glutGetModifiers }, - { "glutLayerGet", (const GLUTproc) glutLayerGet }, - { "glutGetProcAddress", (const GLUTproc) glutGetProcAddress }, - { "glutBitmapCharacter", (const GLUTproc) glutBitmapCharacter }, - { "glutBitmapWidth", (const GLUTproc) glutBitmapWidth }, - { "glutStrokeCharacter", (const GLUTproc) glutStrokeCharacter }, - { "glutStrokeWidth", (const GLUTproc) glutStrokeWidth }, - { "glutBitmapLength", (const GLUTproc) glutBitmapLength }, - { "glutStrokeLength", (const GLUTproc) glutStrokeLength }, - { "glutWireSphere", (const GLUTproc) glutWireSphere }, - { "glutSolidSphere", (const GLUTproc) glutSolidSphere }, - { "glutWireCone", (const GLUTproc) glutWireCone }, - { "glutSolidCone", (const GLUTproc) glutSolidCone }, - { "glutWireCube", (const GLUTproc) glutWireCube }, - { "glutSolidCube", (const GLUTproc) glutSolidCube }, - { "glutWireTorus", (const GLUTproc) glutWireTorus }, - { "glutSolidTorus", (const GLUTproc) glutSolidTorus }, - { "glutWireDodecahedron", (const GLUTproc) glutWireDodecahedron }, - { "glutSolidDodecahedron", (const GLUTproc) glutSolidDodecahedron }, - { "glutWireTeapot", (const GLUTproc) glutWireTeapot }, - { "glutSolidTeapot", (const GLUTproc) glutSolidTeapot }, - { "glutWireOctahedron", (const GLUTproc) glutWireOctahedron }, - { "glutSolidOctahedron", (const GLUTproc) glutSolidOctahedron }, - { "glutWireTetrahedron", (const GLUTproc) glutWireTetrahedron }, - { "glutSolidTetrahedron", (const GLUTproc) glutSolidTetrahedron }, - { "glutWireIcosahedron", (const GLUTproc) glutWireIcosahedron }, - { "glutSolidIcosahedron", (const GLUTproc) glutSolidIcosahedron }, - { "glutVideoResizeGet", (const GLUTproc) glutVideoResizeGet }, - { "glutSetupVideoResizing", (const GLUTproc) glutSetupVideoResizing }, - { "glutStopVideoResizing", (const GLUTproc) glutStopVideoResizing }, - { "glutVideoResize", (const GLUTproc) glutVideoResize }, - { "glutVideoPan", (const GLUTproc) glutVideoPan }, - { "glutReportErrors", (const GLUTproc) glutReportErrors }, - { "glutIgnoreKeyRepeat", (const GLUTproc) glutIgnoreKeyRepeat }, - { "glutSetKeyRepeat", (const GLUTproc) glutSetKeyRepeat }, - { "glutForceJoystickFunc", (const GLUTproc) glutForceJoystickFunc }, - { "glutGameModeString", (const GLUTproc) glutGameModeString }, - { "glutEnterGameMode", (const GLUTproc) glutEnterGameMode }, - { "glutLeaveGameMode", (const GLUTproc) glutLeaveGameMode }, - { "glutGameModeGet", (const GLUTproc) glutGameModeGet }, - { NULL, NULL } -}; - - -/* XXX This isn't an official GLUT function, yet */ -GLUTproc GLUTAPIENTRY -glutGetProcAddress(const char *procName) -{ - /* Try GLUT functions first */ - int i; - for (i = 0; glut_functions[i].name; i++) { - if (strcmp(glut_functions[i].name, procName) == 0) - return glut_functions[i].address; - } - - /* Try core GL functions */ -#if defined(_WIN32) - return (GLUTproc) wglGetProcAddress((LPCSTR) procName); -#elif defined(GLX_ARB_get_proc_address) - return (GLUTproc) glXGetProcAddressARB((const GLubyte *) procName); -#else - return NULL; -#endif -} - - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_fbc.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_fbc.c deleted file mode 100644 index deb46c3d8d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_fbc.c +++ /dev/null @@ -1,164 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -/* I appreciate the guidance from William Mitchell - (mitchell@cam.nist.gov) in developing this friend interface - for use by the f90gl package. See ../../README.fortran */ - -#include "glutint.h" - -/* FCB stands for Fortran CallBack. */ - -/* There is only one idleFunc, menuStateFunc, and menuStatusFunc, so they - can be saved in the wrappers for Fortran rather than the C structures. */ - -/* Set a Fortran callback function. */ - -void GLUTAPIENTRY -__glutSetFCB(int which, void *func) -{ -#ifdef SUPPORT_FORTRAN - switch (which) { - case GLUT_FCB_DISPLAY: - __glutCurrentWindow->fdisplay = (GLUTdisplayFCB) func; - break; - case GLUT_FCB_RESHAPE: - __glutCurrentWindow->freshape = (GLUTreshapeFCB) func; - break; - case GLUT_FCB_MOUSE: - __glutCurrentWindow->fmouse = (GLUTmouseFCB) func; - break; - case GLUT_FCB_MOTION: - __glutCurrentWindow->fmotion = (GLUTmotionFCB) func; - break; - case GLUT_FCB_PASSIVE: - __glutCurrentWindow->fpassive = (GLUTpassiveFCB) func; - break; - case GLUT_FCB_ENTRY: - __glutCurrentWindow->fentry = (GLUTentryFCB) func; - break; - case GLUT_FCB_KEYBOARD: - __glutCurrentWindow->fkeyboard = (GLUTkeyboardFCB) func; - break; - case GLUT_FCB_KEYBOARD_UP: - __glutCurrentWindow->fkeyboardUp = (GLUTkeyboardFCB) func; - break; - case GLUT_FCB_WINDOW_STATUS: - __glutCurrentWindow->fwindowStatus = (GLUTwindowStatusFCB) func; - break; - case GLUT_FCB_VISIBILITY: - __glutCurrentWindow->fvisibility = (GLUTvisibilityFCB) func; - break; - case GLUT_FCB_SPECIAL: - __glutCurrentWindow->fspecial = (GLUTspecialFCB) func; - break; - case GLUT_FCB_SPECIAL_UP: - __glutCurrentWindow->fspecialUp = (GLUTspecialFCB) func; - break; - case GLUT_FCB_BUTTON_BOX: - __glutCurrentWindow->fbuttonBox = (GLUTbuttonBoxFCB) func; - break; - case GLUT_FCB_DIALS: - __glutCurrentWindow->fdials = (GLUTdialsFCB) func; - break; - case GLUT_FCB_SPACE_MOTION: - __glutCurrentWindow->fspaceMotion = (GLUTspaceMotionFCB) func; - break; - case GLUT_FCB_SPACE_ROTATE: - __glutCurrentWindow->fspaceRotate = (GLUTspaceRotateFCB) func; - break; - case GLUT_FCB_SPACE_BUTTON: - __glutCurrentWindow->fspaceButton = (GLUTspaceButtonFCB) func; - break; - case GLUT_FCB_TABLET_MOTION: - __glutCurrentWindow->ftabletMotion = (GLUTtabletMotionFCB) func; - break; - case GLUT_FCB_TABLET_BUTTON: - __glutCurrentWindow->ftabletButton = (GLUTtabletButtonFCB) func; - break; -#ifdef _WIN32 - case GLUT_FCB_JOYSTICK: - __glutCurrentWindow->fjoystick = (GLUTjoystickFCB) func; - break; -#endif - case GLUT_FCB_OVERLAY_DISPLAY: - __glutCurrentWindow->overlay->fdisplay = (GLUTdisplayFCB) func; - break; - case GLUT_FCB_SELECT: - __glutCurrentMenu->fselect = (GLUTselectFCB) func; - break; - case GLUT_FCB_TIMER: - __glutNewTimer->ffunc = (GLUTtimerFCB) func; - break; - } -#endif -} - -/* Get a Fortran callback function. */ - -void* GLUTAPIENTRY -__glutGetFCB(int which) -{ -#ifdef SUPPORT_FORTRAN - switch (which) { - case GLUT_FCB_DISPLAY: - return (void *) __glutCurrentWindow->fdisplay; - case GLUT_FCB_RESHAPE: - return (void *) __glutCurrentWindow->freshape; - case GLUT_FCB_MOUSE: - return (void *) __glutCurrentWindow->fmouse; - case GLUT_FCB_MOTION: - return (void *) __glutCurrentWindow->fmotion; - case GLUT_FCB_PASSIVE: - return (void *) __glutCurrentWindow->fpassive; - case GLUT_FCB_ENTRY: - return (void *) __glutCurrentWindow->fentry; - case GLUT_FCB_KEYBOARD: - return (void *) __glutCurrentWindow->fkeyboard; - case GLUT_FCB_KEYBOARD_UP: - return (void *) __glutCurrentWindow->fkeyboardUp; - case GLUT_FCB_WINDOW_STATUS: - return (void *) __glutCurrentWindow->fwindowStatus; - case GLUT_FCB_VISIBILITY: - return (void *) __glutCurrentWindow->fvisibility; - case GLUT_FCB_SPECIAL: - return (void *) __glutCurrentWindow->fspecial; - case GLUT_FCB_SPECIAL_UP: - return (void *) __glutCurrentWindow->fspecialUp; - case GLUT_FCB_BUTTON_BOX: - return (void *) __glutCurrentWindow->fbuttonBox; - case GLUT_FCB_DIALS: - return (void *) __glutCurrentWindow->fdials; - case GLUT_FCB_SPACE_MOTION: - return (void *) __glutCurrentWindow->fspaceMotion; - case GLUT_FCB_SPACE_ROTATE: - return (void *) __glutCurrentWindow->fspaceRotate; - case GLUT_FCB_SPACE_BUTTON: - return (void *) __glutCurrentWindow->fspaceButton; - case GLUT_FCB_TABLET_MOTION: - return (void *) __glutCurrentWindow->ftabletMotion; - case GLUT_FCB_TABLET_BUTTON: - return (void *) __glutCurrentWindow->ftabletButton; - case GLUT_FCB_JOYSTICK: -#ifdef _WIN32 - return (void *) __glutCurrentWindow->fjoystick; -#else - return NULL; -#endif - case GLUT_FCB_OVERLAY_DISPLAY: - return (void *) __glutCurrentWindow->overlay->fdisplay; - case GLUT_FCB_SELECT: - return (void *) __glutCurrentMenu->fselect; - case GLUT_FCB_TIMER: - return (void *) __glutTimerList->ffunc; - default: - return NULL; - } -#else - return NULL; -#endif -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_fullscrn.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_fullscrn.c deleted file mode 100644 index aab3b48763..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_fullscrn.c +++ /dev/null @@ -1,56 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1995, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#ifdef __VMS -#include -#endif - -#include /* SunOS multithreaded assert() needs . Lame. */ -#include - -#if !defined(_WIN32) -#include -#include -#endif - -/* SGI optimization introduced in IRIX 6.3 to avoid X server - round trips for interning common X atoms. */ -#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS) -#include -#else -#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how) -#endif - -#include "glutint.h" - -/* CENTRY */ -void GLUTAPIENTRY -glutFullScreen(void) -{ - assert(!__glutCurrentWindow->parent); - IGNORE_IN_GAME_MODE(); -#if !defined(_WIN32) - if (__glutMotifHints == None) { - __glutMotifHints = XSGIFastInternAtom(__glutDisplay, "_MOTIF_WM_HINTS", - SGI_XA__MOTIF_WM_HINTS, 0); - if (__glutMotifHints == None) { - __glutWarning("Could not intern X atom for _MOTIF_WM_HINTS."); - } - } -#endif - - __glutCurrentWindow->desiredX = 0; - __glutCurrentWindow->desiredY = 0; - __glutCurrentWindow->desiredWidth = __glutScreenWidth; - __glutCurrentWindow->desiredHeight = __glutScreenHeight; - __glutCurrentWindow->desiredConfMask |= CWX | CWY | CWWidth | CWHeight; - - __glutPutOnWorkList(__glutCurrentWindow, - GLUT_CONFIGURE_WORK | GLUT_FULL_SCREEN_WORK); -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_gamemode.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_gamemode.c deleted file mode 100644 index 3ffeafee57..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_gamemode.c +++ /dev/null @@ -1,678 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#ifdef __VMS -#include -#endif - -#include -#include -#include -#include - -#include "glutint.h" - -#ifndef _WIN32 -#include -#include - -/* SGI optimization introduced in IRIX 6.3 to avoid X server - round trips for interning common X atoms. */ -#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS) -#include -#else -#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how) -#endif -#endif /* not _WIN32 */ - -int __glutDisplaySettingsChanged = 0; -static DisplayMode *dmodes, *currentDm = NULL; -static int ndmodes = -1; -GLUTwindow *__glutGameModeWindow = NULL; - -#ifdef TEST -static char *compstr[] = -{ - "none", "=", "!=", "<=", ">=", ">", "<", "~" -}; -static char *capstr[] = -{ - "width", "height", "bpp", "hertz", "num" -}; -#endif - -void -__glutCloseDownGameMode(void) -{ - if (__glutDisplaySettingsChanged) { -#ifdef _WIN32 - /* Assumes that display settings have been changed, that - is __glutDisplaySettingsChanged is true. */ - ChangeDisplaySettings(NULL, 0); -#endif - __glutDisplaySettingsChanged = 0; - } - __glutGameModeWindow = NULL; -} - -void GLUTAPIENTRY -glutLeaveGameMode(void) -{ - if (__glutGameModeWindow == NULL) { - __glutWarning("not in game mode so cannot leave game mode"); - return; - } - __glutDestroyWindow(__glutGameModeWindow, - __glutGameModeWindow); - XFlush(__glutDisplay); - __glutGameModeWindow = NULL; -} - -#ifdef _WIN32 - -/* Same values as from MSDN's SetDisp.c example. */ -#define MIN_WIDTH 400 -#define MIN_FREQUENCY 60 - -static void -initGameModeSupport(void) -{ - DEVMODE dm; - DWORD mode; - int i; - - if (ndmodes >= 0) { - /* ndmodes is initially -1 to indicate no - dmodes allocated yet. */ - return; - } - - /* Determine how many display modes there are. */ - ndmodes = 0; - mode = 0; - while (EnumDisplaySettings(NULL, mode, &dm)) { - if (dm.dmPelsWidth >= MIN_WIDTH && - (dm.dmDisplayFrequency == 0 || - dm.dmDisplayFrequency >= MIN_FREQUENCY)) { - ndmodes++; - } - mode++; - } - - /* Allocate memory for a list of all the display modes. */ - dmodes = (DisplayMode*) - malloc(ndmodes * sizeof(DisplayMode)); - - /* Now that we know how many display modes to expect, - enumerate them again and save the information in - the list we allocated above. */ - i = 0; - mode = 0; - while (EnumDisplaySettings(NULL, mode, &dm)) { - /* Try to reject any display settings that seem unplausible. */ - if (dm.dmPelsWidth >= MIN_WIDTH && - (dm.dmDisplayFrequency == 0 || - dm.dmDisplayFrequency >= MIN_FREQUENCY)) { - dmodes[i].devmode = dm; - dmodes[i].valid = 1; /* XXX Not used for now. */ - dmodes[i].cap[DM_WIDTH] = dm.dmPelsWidth; - dmodes[i].cap[DM_HEIGHT] = dm.dmPelsHeight; - dmodes[i].cap[DM_PIXEL_DEPTH] = dm.dmBitsPerPel; - if (dm.dmDisplayFrequency == 0) { - /* Guess a reasonable guess. */ - /* Lame Windows 95 version of EnumDisplaySettings. */ - dmodes[i].cap[DM_HERTZ] = 60; - } else { - dmodes[i].cap[DM_HERTZ] = dm.dmDisplayFrequency; - } - i++; - } - mode++; - } - - assert(i == ndmodes); -} - -#else - -/* X Windows version of initGameModeSupport. */ -static void -initGameModeSupport(void) -{ - if (ndmodes >= 0) { - /* ndmodes is initially -1 to indicate no - dmodes allocated yet. */ - return; - } - - /* Determine how many display modes there are. */ - ndmodes = 0; -} - -#endif - -/* This routine is based on similiar code in glut_dstr.c */ -static DisplayMode * -findMatch(DisplayMode * dmodes, int ndmodes, - Criterion * criteria, int ncriteria) -{ - DisplayMode *found; - int *bestScore, *thisScore; - int i, j, numok, result = 0, worse, better; - - found = NULL; - numok = 1; /* "num" capability is indexed from 1, - not 0. */ - - /* XXX alloca canidate. */ - bestScore = (int *) malloc(ncriteria * sizeof(int)); - if (!bestScore) { - __glutFatalError("out of memory."); - } - for (j = 0; j < ncriteria; j++) { - /* Very negative number. */ - bestScore[j] = -32768; - } - - /* XXX alloca canidate. */ - thisScore = (int *) malloc(ncriteria * sizeof(int)); - if (!thisScore) { - __glutFatalError("out of memory."); - } - - for (i = 0; i < ndmodes; i++) { - if (dmodes[i].valid) { - worse = 0; - better = 0; - - for (j = 0; j < ncriteria; j++) { - int cap, cvalue, dvalue; - - cap = criteria[j].capability; - cvalue = criteria[j].value; - if (cap == NUM) { - dvalue = numok; - } else { - dvalue = dmodes[i].cap[cap]; - } -#ifdef TEST - if (verbose) - printf(" %s %s %d to %d\n", - capstr[cap], compstr[criteria[j].comparison], cvalue, dvalue); -#endif - switch (criteria[j].comparison) { - case EQ: - result = cvalue == dvalue; - thisScore[j] = 1; - break; - case NEQ: - result = cvalue != dvalue; - thisScore[j] = 1; - break; - case LT: - result = dvalue < cvalue; - thisScore[j] = dvalue - cvalue; - break; - case GT: - result = dvalue > cvalue; - thisScore[j] = dvalue - cvalue; - break; - case LTE: - result = dvalue <= cvalue; - thisScore[j] = dvalue - cvalue; - break; - case GTE: - result = (dvalue >= cvalue); - thisScore[j] = dvalue - cvalue; - break; - case MIN: - result = dvalue >= cvalue; - thisScore[j] = cvalue - dvalue; - break; - } - -#ifdef TEST - if (verbose) - printf(" result=%d score=%d bestScore=%d\n", result, thisScore[j], bestScore[j]); -#endif - - if (result) { - if (better || thisScore[j] > bestScore[j]) { - better = 1; - } else if (thisScore[j] == bestScore[j]) { - /* Keep looking. */ - } else { - goto nextDM; - } - } else { - if (cap == NUM) { - worse = 1; - } else { - goto nextDM; - } - } - - } - - if (better && !worse) { - found = &dmodes[i]; - for (j = 0; j < ncriteria; j++) { - bestScore[j] = thisScore[j]; - } - } - numok++; - - nextDM:; - - } - } - free(bestScore); - free(thisScore); - return found; -} - -/** - * Parses strings in the form of: - * 800x600 - * 800x600:16 - * 800x600@60 - * 800x600:16@60 - * @60 - * :16 - * :16@60 - * NOTE that @ before : is not parsed. - */ -static int -specialCaseParse(char *word, Criterion * criterion, int mask) -{ - char *xstr, *response; - int got; - int width, height, bpp, hertz; - - switch(word[0]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - /* The WWWxHHH case. */ - if (mask & (1 << DM_WIDTH)) { - return -1; - } - xstr = strpbrk(&word[1], "x"); - if (xstr) { - width = (int) strtol(word, &response, 0); - if (response == word || response[0] != 'x') { - /* Not a valid number OR needs to be followed by 'x'. */ - return -1; - } - height = (int) strtol(&xstr[1], &response, 0); - if (response == &xstr[1]) { - /* Not a valid number. */ - return -1; - } - criterion[0].capability = DM_WIDTH; - criterion[0].comparison = EQ; - criterion[0].value = width; - criterion[1].capability = DM_HEIGHT; - criterion[1].comparison = EQ; - criterion[1].value = height; - got = specialCaseParse(response, - &criterion[2], 1 << DM_WIDTH); - if (got >= 0) { - return got + 2; - } else { - return -1; - } - } - return -1; - case ':': - /* The :BPP case. */ - if (mask & (1 << DM_PIXEL_DEPTH)) { - return -1; - } - bpp = (int) strtol(&word[1], &response, 0); - if (response == &word[1]) { - /* Not a valid number. */ - return -1; - } - criterion[0].capability = DM_PIXEL_DEPTH; - criterion[0].comparison = EQ; - criterion[0].value = bpp; - got = specialCaseParse(response, - &criterion[1], 1 << DM_WIDTH | 1 << DM_PIXEL_DEPTH); - if (got >= 0) { - return got + 1; - } else { - return -1; - } - case '@': - /* The @HZ case. */ - if (mask & (1 << DM_HERTZ)) { - return -1; - } - hertz = (int) strtol(&word[1], &response, 0); - if (response == &word[1]) { - /* Not a valid number. */ - return -1; - } - criterion[0].capability = DM_HERTZ; - criterion[0].comparison = EQ; - criterion[0].value = hertz; - got = specialCaseParse(response, - &criterion[1], ~DM_HERTZ); - if (got >= 0) { - return got + 1; - } else { - return -1; - } - case '\0': - return 0; - } - return -1; -} - -/* This routine is based on similiar code in glut_dstr.c */ -static int -parseCriteria(char *word, Criterion * criterion) -{ - char *cstr, *vstr, *response; - int comparator, value = 0; - - cstr = strpbrk(word, "=>': - if (cstr[1] == '=') { - comparator = GTE; - vstr = &cstr[2]; - } else { - comparator = GT; - vstr = &cstr[1]; - } - break; - case '<': - if (cstr[1] == '=') { - comparator = LTE; - vstr = &cstr[2]; - } else { - comparator = LT; - vstr = &cstr[1]; - } - break; - case '!': - if (cstr[1] == '=') { - comparator = NEQ; - vstr = &cstr[2]; - } else { - return -1; - } - break; - default: - return -1; - } - value = (int) strtol(vstr, &response, 0); - if (response == vstr) { - /* Not a valid number. */ - return -1; - } - *cstr = '\0'; - } else { - comparator = NONE; - } - switch (word[0]) { - case 'b': - if (!strcmp(word, "bpp")) { - criterion[0].capability = DM_PIXEL_DEPTH; - if (comparator == NONE) { - return -1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - return 1; - } - } - return -1; - case 'h': - if (!strcmp(word, "height")) { - criterion[0].capability = DM_HEIGHT; - if (comparator == NONE) { - return -1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - return 1; - } - } - if (!strcmp(word, "hertz")) { - criterion[0].capability = DM_HERTZ; - if (comparator == NONE) { - return -1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - return 1; - } - } - return -1; - case 'n': - if (!strcmp(word, "num")) { - criterion[0].capability = DM_NUM; - if (comparator == NONE) { - return -1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - return 1; - } - } - return -1; - case 'w': - if (!strcmp(word, "width")) { - criterion[0].capability = DM_WIDTH; - if (comparator == NONE) { - return -1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - return 1; - } - } - return -1; - } - if (comparator == NONE) { - return specialCaseParse(word, criterion, 0); - } - return -1; -} - -/* This routine is based on similiar code in glut_dstr.c */ -static Criterion * -parseDisplayString(const char *display, int *ncriteria) -{ - Criterion *criteria = NULL; - int n, parsed; - char *copy, *word; - - copy = __glutStrdup(display); - /* Attempt to estimate how many criteria entries should be - needed. */ - n = 0; - word = strtok(copy, " \t"); - while (word) { - n++; - word = strtok(NULL, " \t"); - } - /* Allocate number of words of criteria. A word - could contain as many as four criteria in the - worst case. Example: 800x600:16@60 */ - criteria = (Criterion *) malloc(4 * n * sizeof(Criterion)); - if (!criteria) { - __glutFatalError("out of memory."); - } - - /* Re-copy the copy of the display string. */ - strcpy(copy, display); - - n = 0; - word = strtok(copy, " \t"); - while (word) { - parsed = parseCriteria(word, &criteria[n]); - if (parsed >= 0) { - n += parsed; - } else { - __glutWarning("Unrecognized game mode string word: %s (ignoring)\n", word); - } - word = strtok(NULL, " \t"); - } - - free(copy); - *ncriteria = n; - return criteria; -} - -void GLUTAPIENTRY -glutGameModeString(const char *string) -{ - Criterion *criteria; - int ncriteria; - - initGameModeSupport(); - criteria = parseDisplayString(string, &ncriteria); - currentDm = findMatch(dmodes, ndmodes, criteria, ncriteria); - free(criteria); -} - -int GLUTAPIENTRY -glutEnterGameMode(void) -{ - GLUTwindow *window; - int width, height; - Window win; - - if (__glutMappedMenu) { - __glutFatalUsage("entering game mode not allowed while menus in use"); - } - if (__glutGameModeWindow) { - /* Already in game mode, so blow away game mode - window so apps can change resolutions. */ - window = __glutGameModeWindow; - /* Setting the game mode window to NULL tricks - the window destroy code into not undoing the - screen display change since we plan on immediately - doing another mode change. */ - __glutGameModeWindow = NULL; - __glutDestroyWindow(window, window); - } - - /* Assume default screen size until we find out if we - can actually change the display settings. */ - width = __glutScreenWidth; - height = __glutScreenHeight; - - if (currentDm) { -#ifdef _WIN32 - LONG status; - static int registered = 0; - - status = ChangeDisplaySettings(¤tDm->devmode, - CDS_FULLSCREEN); - if (status == DISP_CHANGE_SUCCESSFUL) { - __glutDisplaySettingsChanged = 1; - width = currentDm->cap[DM_WIDTH]; - height = currentDm->cap[DM_HEIGHT]; - if (!registered) { - atexit(__glutCloseDownGameMode); - registered = 1; - } - } else { - /* Switch back to default resolution. */ - ChangeDisplaySettings(NULL, 0); - } -#endif - } - - window = __glutCreateWindow(NULL, 0, 0, - width, height, /* game mode */ 1); - win = window->win; - -#if !defined(_WIN32) - if (__glutMotifHints == None) { - __glutMotifHints = XSGIFastInternAtom(__glutDisplay, "_MOTIF_WM_HINTS", - SGI_XA__MOTIF_WM_HINTS, 0); - if (__glutMotifHints == None) { - __glutWarning("Could not intern X atom for _MOTIF_WM_HINTS."); - } - } - - /* Game mode window is a toplevel window. */ - XSetWMProtocols(__glutDisplay, win, &__glutWMDeleteWindow, 1); -#endif - - /* Schedule the fullscreen property to be added and to - make sure the window is configured right. Win32 - doesn't need this. */ - window->desiredX = 0; - window->desiredY = 0; - window->desiredWidth = width; - window->desiredHeight = height; - window->desiredConfMask |= CWX | CWY | CWWidth | CWHeight; -#ifdef _WIN32 - /* Win32 does not want to use GLUT_FULL_SCREEN_WORK - for game mode because we need to be maximizing - the window in game mode, not just sizing it to - take up the full screen. The Win32-ness of game - mode happens when you pass 1 in the gameMode parameter - to __glutCreateWindow above. A gameMode of creates - a WS_POPUP window, not a standard WS_OVERLAPPEDWINDOW - window. WS_POPUP ensures the taskbar is hidden. */ - __glutPutOnWorkList(window, - GLUT_CONFIGURE_WORK); -#else - __glutPutOnWorkList(window, - GLUT_CONFIGURE_WORK | GLUT_FULL_SCREEN_WORK); -#endif - - __glutGameModeWindow = window; - return window->num + 1; -} - -int GLUTAPIENTRY -glutGameModeGet(GLenum mode) -{ - switch (mode) { - case GLUT_GAME_MODE_ACTIVE: - return __glutGameModeWindow != NULL; - case GLUT_GAME_MODE_POSSIBLE: - return currentDm != NULL; - case GLUT_GAME_MODE_WIDTH: - return currentDm ? currentDm->cap[DM_WIDTH] : -1; - case GLUT_GAME_MODE_HEIGHT: - return currentDm ? currentDm->cap[DM_HEIGHT] : -1; - case GLUT_GAME_MODE_PIXEL_DEPTH: - return currentDm ? currentDm->cap[DM_PIXEL_DEPTH] : -1; - case GLUT_GAME_MODE_REFRESH_RATE: - return currentDm ? currentDm->cap[DM_HERTZ] : -1; - case GLUT_GAME_MODE_DISPLAY_CHANGED: - return __glutDisplaySettingsChanged; - default: - return -1; - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_get.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_get.c deleted file mode 100644 index 9c1ca6caae..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_get.c +++ /dev/null @@ -1,220 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include /* SunOS 4 needs NULL defined for GETTIMEOFDAY macro. */ -#include "glutint.h" - -/* CENTRY */ -int GLUTAPIENTRY -glutGet(GLenum param) -{ - Window win, root; - int x, y, value; - unsigned int width, height, border, depth; - - switch (param) { - case GLUT_INIT_WINDOW_X: - return __glutInitX; - case GLUT_INIT_WINDOW_Y: - return __glutInitY; - case GLUT_INIT_WINDOW_WIDTH: - return __glutInitWidth; - case GLUT_INIT_WINDOW_HEIGHT: - return __glutInitHeight; - case GLUT_INIT_DISPLAY_MODE: - return __glutDisplayMode; - case GLUT_WINDOW_X: - XTranslateCoordinates(__glutDisplay, __glutCurrentWindow->win, - __glutRoot, 0, 0, &x, &y, &win); - return x; - case GLUT_WINDOW_Y: - XTranslateCoordinates(__glutDisplay, __glutCurrentWindow->win, - __glutRoot, 0, 0, &x, &y, &win); - return y; - case GLUT_WINDOW_WIDTH: - if (!__glutCurrentWindow->reshape) { - XGetGeometry(__glutDisplay, __glutCurrentWindow->win, - &root, &x, &y, - &width, &height, &border, &depth); - return width; - } - return __glutCurrentWindow->width; - case GLUT_WINDOW_HEIGHT: - if (!__glutCurrentWindow->reshape) { - XGetGeometry(__glutDisplay, __glutCurrentWindow->win, - &root, &x, &y, - &width, &height, &border, &depth); - return height; - } - return __glutCurrentWindow->height; - -#define GET_CONFIG(attrib) { \ - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { \ - glXGetConfig(__glutDisplay, __glutCurrentWindow->vis, \ - attrib, &value); \ - } else { \ - glXGetConfig(__glutDisplay, __glutCurrentWindow->overlay->vis, \ - attrib, &value); \ - } \ -} - - case GLUT_WINDOW_BUFFER_SIZE: - GET_CONFIG(GLX_BUFFER_SIZE); - return value; - case GLUT_WINDOW_STENCIL_SIZE: - GET_CONFIG(GLX_STENCIL_SIZE); - return value; - case GLUT_WINDOW_DEPTH_SIZE: - GET_CONFIG(GLX_DEPTH_SIZE); - return value; - case GLUT_WINDOW_RED_SIZE: - GET_CONFIG(GLX_RED_SIZE); - return value; - case GLUT_WINDOW_GREEN_SIZE: - GET_CONFIG(GLX_GREEN_SIZE); - return value; - case GLUT_WINDOW_BLUE_SIZE: - GET_CONFIG(GLX_BLUE_SIZE); - return value; - case GLUT_WINDOW_ALPHA_SIZE: - GET_CONFIG(GLX_ALPHA_SIZE); - return value; - case GLUT_WINDOW_ACCUM_RED_SIZE: - GET_CONFIG(GLX_ACCUM_RED_SIZE); - return value; - case GLUT_WINDOW_ACCUM_GREEN_SIZE: - GET_CONFIG(GLX_ACCUM_GREEN_SIZE); - return value; - case GLUT_WINDOW_ACCUM_BLUE_SIZE: - GET_CONFIG(GLX_ACCUM_BLUE_SIZE); - return value; - case GLUT_WINDOW_ACCUM_ALPHA_SIZE: - GET_CONFIG(GLX_ACCUM_ALPHA_SIZE); - return value; - case GLUT_WINDOW_DOUBLEBUFFER: - GET_CONFIG(GLX_DOUBLEBUFFER); - return value; - case GLUT_WINDOW_RGBA: - GET_CONFIG(GLX_RGBA); - return value; - case GLUT_WINDOW_COLORMAP_SIZE: - GET_CONFIG(GLX_RGBA); - if (value) { - return 0; - } else { -#if defined(_WIN32) - /* KLUDGE: we always assume 256 colors in CI mode on - Win32 */ - return 256; -#else - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { - return __glutCurrentWindow->vis->visual->map_entries; - } else { - return __glutCurrentWindow->overlay->vis->visual->map_entries; - } -#endif /* _WIN32 */ - } - case GLUT_WINDOW_PARENT: - return __glutCurrentWindow->parent ? - __glutCurrentWindow->parent->num + 1 : 0; - case GLUT_WINDOW_NUM_CHILDREN: - { - int num = 0; - GLUTwindow *children = __glutCurrentWindow->children; - - while (children) { - num++; - children = children->siblings; - } - return num; - } - case GLUT_WINDOW_NUM_SAMPLES: -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample) - if (__glutIsSupportedByGLX("GLX_SGIS_multisample")) { - GET_CONFIG(GLX_SAMPLES_SGIS); - return value; - } else { - return 0; - } -#else - /* Independent of GLX server support, multisampling not - supported by GLX client-side. */ - return 0; -#endif - case GLUT_WINDOW_STEREO: - GET_CONFIG(GLX_STEREO); - return value; - case GLUT_WINDOW_CURSOR: - return __glutCurrentWindow->cursor; - case GLUT_SCREEN_WIDTH: - return DisplayWidth(__glutDisplay, __glutScreen); - case GLUT_SCREEN_HEIGHT: - return DisplayHeight(__glutDisplay, __glutScreen); - case GLUT_SCREEN_WIDTH_MM: - return DisplayWidthMM(__glutDisplay, __glutScreen); - case GLUT_SCREEN_HEIGHT_MM: - return DisplayHeightMM(__glutDisplay, __glutScreen); - case GLUT_MENU_NUM_ITEMS: - return __glutCurrentMenu->num; - case GLUT_DISPLAY_MODE_POSSIBLE: - { - XVisualInfo *vi; - Bool dummy, visAlloced; - void *fbc; - -#if defined(_WIN32) - /* Our fake glXChooseVisual (which is called by - __glutDetermineVisual) needs an HDC to work with, so grab one - from the "root" window. */ - XHDC = GetDC(GetDesktopWindow()); -#endif - vi = __glutDetermineWindowVisual(&dummy, &visAlloced, &fbc); -#if defined(_WIN32) - ReleaseDC(GetDesktopWindow(), XHDC); -#endif - if (vi) { - if (visAlloced) - XFree(vi); - return 1; - } - return 0; - } - case GLUT_ELAPSED_TIME: - { -#ifdef OLD_VMS - struct timeval6 elapsed, beginning, now; -#else - struct timeval elapsed, beginning, now; -#endif - - __glutInitTime(&beginning); - GETTIMEOFDAY(&now); - TIMEDELTA(elapsed, now, beginning); - /* Return elapsed milliseconds. */ -#if defined(__vms) && ( __VMS_VER < 70000000 ) - return (int) (elapsed.val / TICKS_PER_MILLISECOND); -#else - return (int) ((elapsed.tv_sec * 1000) + (elapsed.tv_usec / 1000)); -#endif - } - case GLUT_WINDOW_FORMAT_ID: -#if defined(_WIN32) - return GetPixelFormat(__glutCurrentWindow->hdc); -#else - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { - return (int) __glutCurrentWindow->vis->visualid; - } else { - return (int) __glutCurrentWindow->overlay->vis->visualid; - } -#endif - default: - __glutWarning("invalid glutGet parameter: %d", param); - return -1; - } -} -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_glxext.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_glxext.c deleted file mode 100644 index 71b67e075d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_glxext.c +++ /dev/null @@ -1,255 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include -#include "glutint.h" - -#if defined(GLX_VERSION_1_1) -int -__glutIsSupportedByGLX(char *extension) -{ - static const char *extensions = NULL; - const char *start; - char *where, *terminator; - int major, minor; - - glXQueryVersion(__glutDisplay, &major, &minor); - /* Be careful not to call glXQueryExtensionsString if it - looks like the server doesn't support GLX 1.1. - Unfortunately, the original GLX 1.0 didn't have the notion - of GLX extensions. */ - if ((major == 1 && minor >= 1) || (major > 1)) { - if (!extensions) - extensions = glXQueryExtensionsString(__glutDisplay, __glutScreen); - /* It takes a bit of care to be fool-proof about parsing - the GLX extensions string. Don't be fooled by - sub-strings, etc. */ - start = extensions; - for (;;) { - where = strstr(start, extension); - if (!where) - return 0; - terminator = where + strlen(extension); - if (where == start || *(where - 1) == ' ') { - if (*terminator == ' ' || *terminator == '\0') { - return 1; - } - } - start = terminator; - } - } - return 0; -} -#endif - - - -/* - * Wrapping of GLX extension functions. - * Technically, we should do a runtime test to see if we've got the - * glXGetProcAddressARB() function. I think GLX_ARB_get_proc_address - * is pretty widely supported now and any system that has - * GLX_ARB_get_proc_address defined in its header files should be OK - * at runtime. - */ - -int -__glut_glXBindChannelToWindowSGIX(Display *dpy, int screen, - int channel, Window window) -{ -#ifdef GLX_ARB_get_proc_address - typedef int (*glXBindChannelToWindowSGIX_t) (Display *, int, int, Window); - static glXBindChannelToWindowSGIX_t glXBindChannelToWindowSGIX_ptr = NULL; - if (!glXBindChannelToWindowSGIX_ptr) { - glXBindChannelToWindowSGIX_ptr = (glXBindChannelToWindowSGIX_t) - glXGetProcAddressARB((const GLubyte *) "glXBindChannelToWindowSGIX"); - } - if (glXBindChannelToWindowSGIX_ptr) - return (*glXBindChannelToWindowSGIX_ptr)(dpy, screen, channel, window); - else - return 0; -#elif defined(GLX_SGIX_video_resize) - return glXBindChannelToWindowSGIX(dpy, screen, channel, window); -#else - return 0; -#endif -} - - -int -__glut_glXChannelRectSGIX(Display *dpy, int screen, int channel, - int x, int y, int w, int h) -{ -#ifdef GLX_ARB_get_proc_address - typedef int (*glXChannelRectSGIX_t)(Display *, int, int, int, int, int, int); - static glXChannelRectSGIX_t glXChannelRectSGIX_ptr = NULL; - if (!glXChannelRectSGIX_ptr) { - glXChannelRectSGIX_ptr = (glXChannelRectSGIX_t) - glXGetProcAddressARB((const GLubyte *) "glXChannelRectSGIX"); - } - if (glXChannelRectSGIX_ptr) - return (*glXChannelRectSGIX_ptr)(dpy, screen, channel, x, y, w, h); - else - return 0; -#elif defined(GLX_SGIX_video_resize) - return glXChannelRectSGIX(dpy, screen, channel, x, y, w, h); -#else - return 0; -#endif -} - - -int -__glut_glXQueryChannelRectSGIX(Display *dpy, int screen, int channel, - int *x, int *y, int *w, int *h) -{ -#ifdef GLX_ARB_get_proc_address - typedef int (*glXQueryChannelRectSGIX_t)(Display *, int, int, - int *, int *, int *, int *); - static glXQueryChannelRectSGIX_t glXQueryChannelRectSGIX_ptr = NULL; - if (!glXQueryChannelRectSGIX_ptr) { - glXQueryChannelRectSGIX_ptr = (glXQueryChannelRectSGIX_t) - glXGetProcAddressARB((const GLubyte *) "glXQueryChannelRectSGIX"); - } - if (glXQueryChannelRectSGIX_ptr) - return (*glXQueryChannelRectSGIX_ptr)(dpy, screen, channel, x, y, w, h); - else - return 0; -#elif defined(GLX_SGIX_video_resize) - return glXQueryChannelRectSGIX(dpy, screen, channel, x, y, w, h); -#else - return 0; -#endif -} - - -int -__glut_glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel, - int *dx, int *dy, int *dw, int *dh) -{ -#ifdef GLX_ARB_get_proc_address - typedef int (*glXQueryChannelDeltasSGIX_t)(Display *, int, int, - int *, int *, int *, int *); - static glXQueryChannelDeltasSGIX_t glXQueryChannelDeltasSGIX_ptr = NULL; - if (!glXQueryChannelDeltasSGIX_ptr) { - glXQueryChannelDeltasSGIX_ptr = (glXQueryChannelDeltasSGIX_t) - glXGetProcAddressARB((const GLubyte *) "glXQueryChannelDeltasSGIX"); - } - if (glXQueryChannelDeltasSGIX_ptr) - return (*glXQueryChannelDeltasSGIX_ptr)(dpy, screen, channel, - dx, dy, dw, dh); - else - return 0; -#elif defined(GLX_SGIX_video_resize) - return glXQueryChannelDeltasSGIX(dpy, screen, channel, dx, dy, dw, dh); -#else - return 0; -#endif -} - - -int -__glut_glXChannelRectSyncSGIX(Display *dpy, int screen, - int channel, GLenum synctype) -{ -#ifdef GLX_ARB_get_proc_address - typedef int (*glXChannelRectSyncSGIX_t)(Display *, int, int, GLenum); - static glXChannelRectSyncSGIX_t glXChannelRectSyncSGIX_ptr = NULL; - if (!glXChannelRectSyncSGIX_ptr) { - glXChannelRectSyncSGIX_ptr = (glXChannelRectSyncSGIX_t) - glXGetProcAddressARB((const GLubyte *) "glXChannelRectSyncSGIX"); - } - if (glXChannelRectSyncSGIX_ptr) - return (*glXChannelRectSyncSGIX_ptr)(dpy, screen, channel, synctype); - else - return 0; -#elif defined(GLX_SGIX_video_resize) - return glXChannelRectSyncSGIX(dpy, screen, channel, synctype); -#else - return 0; -#endif -} - - - -GLXContext -__glut_glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, - int render_type, GLXContext share_list, - Bool direct) -{ -#ifdef GLX_ARB_get_proc_address - typedef GLXContext (*glXCreateContextWithConfigSGIX_t)(Display *, - GLXFBConfigSGIX, int, GLXContext, Bool); - static glXCreateContextWithConfigSGIX_t glXCreateContextWithConfig_ptr = NULL; - if (!glXCreateContextWithConfig_ptr) { - glXCreateContextWithConfig_ptr = (glXCreateContextWithConfigSGIX_t) - glXGetProcAddressARB((const GLubyte *) "glXCreateContextWithConfigSGIX"); - } - if (glXCreateContextWithConfig_ptr) - return (*glXCreateContextWithConfig_ptr)(dpy, config, render_type, - share_list, direct); - else - return 0; -#elif defined(GLX_SGIX_fbconfig) - return glXCreateContextWithConfigSGIX(dpy, config, render_type, - share_list, direct); -#else - return 0; -#endif -} - - -int -__glut_glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config, - int attribute, int *value) -{ -#ifdef GLX_ARB_get_proc_address - typedef int (*glXGetFBConfigAttribSGIX_t)(Display *, - GLXFBConfigSGIX, int, int *); - static glXGetFBConfigAttribSGIX_t glXGetFBConfigAttrib_ptr = NULL; - if (!glXGetFBConfigAttrib_ptr) { - glXGetFBConfigAttrib_ptr = (glXGetFBConfigAttribSGIX_t) - glXGetProcAddressARB((const GLubyte *) "glXGetFBConfigAttribSGIX"); - } - if (glXGetFBConfigAttrib_ptr) - return (*glXGetFBConfigAttrib_ptr)(dpy, config, attribute, value); - else - return 0; -#elif defined(GLX_SGIX_fbconfig) - return glXGetFBConfigAttribSGIX(dpy, config, attribute, value); -#else - return 0; -#endif -} - - -GLXFBConfigSGIX -__glut_glXGetFBConfigFromVisualSGIX(Display *dpy, XVisualInfo *vis) -{ -#ifdef GLX_ARB_get_proc_address - typedef GLXFBConfigSGIX (*glXGetFBConfigFromVisualSGIX_t)(Display *, - XVisualInfo *); - static glXGetFBConfigFromVisualSGIX_t glXGetFBConfigFromVisual_ptr = NULL; - if (!glXGetFBConfigFromVisual_ptr) { - glXGetFBConfigFromVisual_ptr = (glXGetFBConfigFromVisualSGIX_t) - glXGetProcAddressARB((const GLubyte *) "glXGetFBConfigFromVisualSGIX"); - } - if (glXGetFBConfigFromVisual_ptr) - return (*glXGetFBConfigFromVisual_ptr)(dpy, vis); - else - return 0; -#elif defined(GLX_SGIX_fbconfig) - return glXGetFBConfigFromVisualSGIX(dpy, vis); -#else - return 0; -#endif -} - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_hel10.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_hel10.c deleted file mode 100644 index 703cef38f2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_hel10.c +++ /dev/null @@ -1,1778 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmapHelvetica10 XXX -#include "glutbitmap.h" -#undef glutBitmapHelvetica10 - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90,0x0,0x50, -}; - -static const BitmapCharRec ch255 = {4,10,0,2,5,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0x80,0x80,0xb0,0xc8,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch254 = {5,10,0,2,6,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch253 = {4,11,0,2,5,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x50, -}; - -static const BitmapCharRec ch252 = {4,8,0,0,5,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch251 = {4,9,0,0,5,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch250 = {4,9,0,0,5,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch249 = {4,9,0,0,5,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0x70,0x88,0xc8,0xa8,0x98,0x74, -}; - -static const BitmapCharRec ch248 = {6,6,0,0,6,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x20,0x0,0xf8,0x0,0x20, -}; - -static const BitmapCharRec ch247 = {5,5,0,-1,6,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50, -}; - -static const BitmapCharRec ch246 = {5,8,0,0,6,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch245 = {5,9,0,0,6,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch244 = {5,9,0,0,6,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch243 = {5,9,0,0,6,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch242 = {5,9,0,0,6,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0x90,0x90,0x90,0x90,0x90,0xe0,0x0,0xa0,0x50, -}; - -static const BitmapCharRec ch241 = {4,9,0,0,5,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x70,0x88,0x88,0x88,0x88,0x78,0x90,0x60,0x50, -}; - -static const BitmapCharRec ch240 = {5,9,0,0,6,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0, -}; - -static const BitmapCharRec ch239 = {3,8,0,0,2,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch238 = {3,9,1,0,2,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40, -}; - -static const BitmapCharRec ch237 = {2,9,0,0,2,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch236 = {2,9,1,0,2,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x50, -}; - -static const BitmapCharRec ch235 = {4,8,0,0,5,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch234 = {4,9,0,0,5,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch233 = {4,9,0,0,5,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch232 = {4,9,0,0,5,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x60,0x20,0x60,0x90,0x80,0x80,0x90,0x60, -}; - -static const BitmapCharRec ch231 = {4,8,0,2,5,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x6c,0x92,0x90,0x7e,0x12,0xec, -}; - -static const BitmapCharRec ch230 = {7,6,0,0,8,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x20,0x50,0x20, -}; - -static const BitmapCharRec ch229 = {5,9,0,0,5,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x50, -}; - -static const BitmapCharRec ch228 = {5,8,0,0,5,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0xa0,0x50, -}; - -static const BitmapCharRec ch227 = {5,9,0,0,5,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch226 = {5,9,0,0,5,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch225 = {5,9,0,0,5,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch224 = {5,9,0,0,5,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0xa0,0x90,0x90,0x90,0xa0,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch223 = {4,8,0,0,5,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0x80,0x80,0xf0,0x88,0x88,0xf0,0x80,0x80, -}; - -static const BitmapCharRec ch222 = {5,8,-1,0,7,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x10,0x10,0x10,0x28,0x28,0x44,0x44,0x82,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch221 = {7,11,0,0,7,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48, -}; - -static const BitmapCharRec ch220 = {6,10,-1,0,8,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch219 = {6,11,-1,0,8,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch218 = {6,11,-1,0,8,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch217 = {6,11,-1,0,8,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x80,0x78,0xc4,0xa4,0xa4,0x94,0x94,0x8c,0x78,0x4, -}; - -static const BitmapCharRec ch216 = {6,10,-1,1,8,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x88,0x50,0x20,0x50,0x88, -}; - -static const BitmapCharRec ch215 = {5,5,0,-1,6,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x48, -}; - -static const BitmapCharRec ch214 = {6,10,-1,0,8,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch213 = {6,11,-1,0,8,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch212 = {6,11,-1,0,8,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch211 = {6,11,-1,0,8,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch210 = {6,11,-1,0,8,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0x8c,0x8c,0x94,0x94,0xa4,0xa4,0xc4,0xc4,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch209 = {6,11,-1,0,8,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0x78,0x44,0x42,0x42,0xf2,0x42,0x44,0x78, -}; - -static const BitmapCharRec ch208 = {7,8,0,0,8,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0, -}; - -static const BitmapCharRec ch207 = {3,10,0,0,3,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch206 = {3,11,0,0,3,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40, -}; - -static const BitmapCharRec ch205 = {2,11,-1,0,3,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch204 = {2,11,0,0,3,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x50, -}; - -static const BitmapCharRec ch203 = {5,10,-1,0,7,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xf8,0x80,0x80,0xf8,0x80,0x80,0x80,0xf8,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch202 = {5,11,-1,0,7,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch201 = {5,11,-1,0,7,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch200 = {5,11,-1,0,7,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x30,0x10,0x78,0x84,0x80,0x80,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch199 = {6,10,-1,2,8,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0x8f,0x80,0x88,0x0,0x78,0x0,0x48,0x0,0x2f,0x80,0x28,0x0,0x18,0x0,0x1f,0x80, -}; - -static const BitmapCharRec ch198 = {9,8,0,0,10,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x10,0x28,0x10, -}; - -static const BitmapCharRec ch197 = {7,11,0,0,7,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28, -}; - -static const BitmapCharRec ch196 = {7,10,0,0,7,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch195 = {7,11,0,0,7,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch194 = {7,11,0,0,7,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch193 = {7,11,0,0,7,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch192 = {7,11,0,0,7,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x60,0x90,0x80,0x40,0x20,0x20,0x0,0x20, -}; - -static const BitmapCharRec ch191 = {4,8,-1,2,6,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x21,0x0,0x17,0x80,0x13,0x0,0x9,0x0,0xc8,0x0,0x24,0x0,0x44,0x0,0xe2,0x0, -}; - -static const BitmapCharRec ch190 = {9,8,0,0,9,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x27,0x12,0x15,0xb,0x48,0x44,0xc4,0x42, -}; - -static const BitmapCharRec ch189 = {8,8,0,0,9,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x21,0x0,0x17,0x80,0x13,0x0,0x9,0x0,0x48,0x0,0x44,0x0,0xc4,0x0,0x42,0x0, -}; - -static const BitmapCharRec ch188 = {9,8,0,0,9,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0xa0,0x50,0x28,0x50,0xa0, -}; - -static const BitmapCharRec ch187 = {5,5,0,0,6,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xe0,0x0,0xe0,0xa0,0xe0, -}; - -static const BitmapCharRec ch186 = {3,5,0,-3,4,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch185 = {2,4,0,-3,3,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0xc0,0x40, -}; - -static const BitmapCharRec ch184 = {2,2,0,2,3,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0xc0, -}; - -static const BitmapCharRec ch183 = {2,1,0,-3,3,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x28,0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x7c, -}; - -static const BitmapCharRec ch182 = {6,10,0,2,6,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x80,0x80,0xf0,0x90,0x90,0x90,0x90,0x90, -}; - -static const BitmapCharRec ch181 = {4,8,0,2,5,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0x80,0x40, -}; - -static const BitmapCharRec ch180 = {2,2,0,-6,3,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0xc0,0x20,0x40,0xe0, -}; - -static const BitmapCharRec ch179 = {3,4,0,-3,3,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xe0,0x40,0xa0,0x60, -}; - -static const BitmapCharRec ch178 = {3,4,0,-3,3,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xf8,0x0,0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch177 = {5,7,0,0,6,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch176 = {4,4,0,-3,4,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xe0, -}; - -static const BitmapCharRec ch175 = {3,1,0,-7,3,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x38,0x44,0xaa,0xb2,0xba,0x44,0x38, -}; - -static const BitmapCharRec ch174 = {7,7,-1,0,9,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xe0, -}; - -static const BitmapCharRec ch173 = {3,1,0,-3,4,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x8,0x8,0xf8, -}; - -static const BitmapCharRec ch172 = {5,3,-1,-2,7,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x28,0x50,0xa0,0x50,0x28, -}; - -static const BitmapCharRec ch171 = {5,5,0,0,6,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xe0,0x0,0xa0,0x20,0xe0, -}; - -static const BitmapCharRec ch170 = {3,5,0,-3,4,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x38,0x44,0x9a,0xa2,0x9a,0x44,0x38, -}; - -static const BitmapCharRec ch169 = {7,7,-1,0,9,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xa0, -}; - -static const BitmapCharRec ch168 = {3,1,0,-7,3,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x70,0x88,0x18,0x70,0xc8,0x98,0x70,0xc0,0x88,0x70, -}; - -static const BitmapCharRec ch167 = {5,10,0,2,6,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0x80,0x80,0x80,0x80,0x0,0x0,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch166 = {1,10,-1,2,3,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x20,0xf8,0x20,0xf8,0x50,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch165 = {5,8,0,0,6,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0x90,0x60,0x90,0x90,0x60,0x90, -}; - -static const BitmapCharRec ch164 = {4,6,0,-1,5,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xb0,0x48,0x40,0x40,0xe0,0x40,0x48,0x30, -}; - -static const BitmapCharRec ch163 = {5,8,0,0,6,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x40,0x70,0xa8,0xa0,0xa0,0xa8,0x70,0x10, -}; - -static const BitmapCharRec ch162 = {5,8,0,1,6,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch161 = {1,8,-1,2,3,ch161data}; - -/* char: 0xa0 */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,3,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,3,0}; -#endif - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x98,0x64, -}; - -static const BitmapCharRec ch126 = {6,2,0,-3,7,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0x80,0x40,0x40,0x40,0x40,0x20,0x40,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch125 = {3,10,0,2,3,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch124 = {1,10,-1,2,3,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x20,0x40,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch123 = {3,10,0,2,3,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xf0,0x80,0x40,0x20,0x10,0xf0, -}; - -static const BitmapCharRec ch122 = {4,6,0,0,5,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90, -}; - -static const BitmapCharRec ch121 = {4,8,0,2,5,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0x88,0x88,0x50,0x20,0x50,0x88, -}; - -static const BitmapCharRec ch120 = {5,6,0,0,6,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x28,0x28,0x54,0x54,0x92,0x92, -}; - -static const BitmapCharRec ch119 = {7,6,0,0,8,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x20,0x20,0x50,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch118 = {5,6,0,0,6,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x70,0x90,0x90,0x90,0x90,0x90, -}; - -static const BitmapCharRec ch117 = {4,6,0,0,5,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x60,0x40,0x40,0x40,0x40,0xe0,0x40,0x40, -}; - -static const BitmapCharRec ch116 = {3,8,0,0,4,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0x60,0x90,0x10,0x60,0x90,0x60, -}; - -static const BitmapCharRec ch115 = {4,6,0,0,5,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0x80,0x80,0x80,0x80,0xc0,0xa0, -}; - -static const BitmapCharRec ch114 = {3,6,0,0,4,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x8,0x8,0x68,0x98,0x88,0x88,0x98,0x68, -}; - -static const BitmapCharRec ch113 = {5,8,0,2,6,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0x80,0x80,0xb0,0xc8,0x88,0x88,0xc8,0xb0, -}; - -static const BitmapCharRec ch112 = {5,8,0,2,6,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x70,0x88,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch111 = {5,6,0,0,6,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0x88,0x88,0x88,0x88,0xc8,0xb0, -}; - -static const BitmapCharRec ch110 = {5,6,0,0,6,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0x92,0x92,0x92,0x92,0x92,0xec, -}; - -static const BitmapCharRec ch109 = {7,6,0,0,8,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch108 = {1,8,0,0,2,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0x90,0x90,0xa0,0xc0,0xa0,0x90,0x80,0x80, -}; - -static const BitmapCharRec ch107 = {4,8,0,0,5,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch106 = {1,9,0,1,2,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch105 = {1,8,0,0,2,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0x88,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch104 = {5,8,0,0,6,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x70,0x8,0x68,0x98,0x88,0x88,0x98,0x68, -}; - -static const BitmapCharRec ch103 = {5,8,0,2,6,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x30, -}; - -static const BitmapCharRec ch102 = {4,8,0,0,4,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x60,0x90,0x80,0xf0,0x90,0x60, -}; - -static const BitmapCharRec ch101 = {4,6,0,0,5,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x68,0x98,0x88,0x88,0x98,0x68,0x8,0x8, -}; - -static const BitmapCharRec ch100 = {5,8,0,0,6,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x60,0x90,0x80,0x80,0x90,0x60, -}; - -static const BitmapCharRec ch99 = {4,6,0,0,5,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xb0,0xc8,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch98 = {5,8,0,0,6,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0, -}; - -static const BitmapCharRec ch97 = {5,6,0,0,5,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0x80,0x80,0x40, -}; - -static const BitmapCharRec ch96 = {2,3,0,-5,3,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xfc, -}; - -static const BitmapCharRec ch95 = {6,1,0,2,6,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x88,0x50,0x50,0x20,0x20, -}; - -static const BitmapCharRec ch94 = {5,5,0,-3,6,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0, -}; - -static const BitmapCharRec ch93 = {2,10,0,2,3,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x20,0x20,0x40,0x40,0x40,0x40,0x80,0x80, -}; - -static const BitmapCharRec ch92 = {3,8,0,0,3,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0, -}; - -static const BitmapCharRec ch91 = {2,10,-1,2,3,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xf8,0x80,0x40,0x20,0x20,0x10,0x8,0xf8, -}; - -static const BitmapCharRec ch90 = {5,8,-1,0,7,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x10,0x10,0x10,0x28,0x28,0x44,0x44,0x82, -}; - -static const BitmapCharRec ch89 = {7,8,0,0,7,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0x88,0x88,0x50,0x50,0x20,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch88 = {5,8,-1,0,7,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x22,0x0,0x22,0x0,0x22,0x0,0x55,0x0,0x49,0x0,0x49,0x0,0x88,0x80,0x88,0x80, -}; - -static const BitmapCharRec ch87 = {9,8,0,0,9,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x10,0x28,0x28,0x44,0x44,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch86 = {7,8,0,0,7,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch85 = {6,8,-1,0,8,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8, -}; - -static const BitmapCharRec ch84 = {5,8,0,0,5,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x70,0x88,0x88,0x8,0x70,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch83 = {5,8,-1,0,7,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0x88,0x88,0x88,0x88,0xf0,0x88,0x88,0xf0, -}; - -static const BitmapCharRec ch82 = {5,8,-1,0,7,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x2,0x7c,0x8c,0x94,0x84,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch81 = {7,9,-1,1,8,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0x80,0x80,0x80,0x80,0xf0,0x88,0x88,0xf0, -}; - -static const BitmapCharRec ch80 = {5,8,-1,0,7,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch79 = {6,8,-1,0,8,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0x8c,0x8c,0x94,0x94,0xa4,0xa4,0xc4,0xc4, -}; - -static const BitmapCharRec ch78 = {6,8,-1,0,8,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0x92,0x92,0x92,0xaa,0xaa,0xc6,0xc6,0x82, -}; - -static const BitmapCharRec ch77 = {7,8,-1,0,9,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch76 = {4,8,-1,0,6,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0x88,0x88,0x90,0x90,0xe0,0xa0,0x90,0x88, -}; - -static const BitmapCharRec ch75 = {5,8,-1,0,7,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x60,0x90,0x10,0x10,0x10,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch74 = {4,8,0,0,5,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch73 = {1,8,-1,0,3,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0x84,0x84,0x84,0x84,0xfc,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch72 = {6,8,-1,0,8,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x74,0x8c,0x84,0x8c,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch71 = {6,8,-1,0,8,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0x80,0x80,0x80,0x80,0xf0,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch70 = {5,8,-1,0,6,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch69 = {5,8,-1,0,7,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xf0,0x88,0x84,0x84,0x84,0x84,0x88,0xf0, -}; - -static const BitmapCharRec ch68 = {6,8,-1,0,8,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x78,0x84,0x80,0x80,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch67 = {6,8,-1,0,8,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xf0,0x88,0x88,0x88,0xf0,0x88,0x88,0xf0, -}; - -static const BitmapCharRec ch66 = {5,8,-1,0,7,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10, -}; - -static const BitmapCharRec ch65 = {7,8,0,0,7,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x3e,0x0,0x40,0x0,0x9b,0x0,0xa4,0x80,0xa4,0x80,0xa2,0x40,0x92,0x40,0x4d,0x40, -0x20,0x80,0x1f,0x0, -}; - -static const BitmapCharRec ch64 = {10,10,0,2,11,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x40,0x0,0x40,0x40,0x20,0x10,0x90,0x60, -}; - -static const BitmapCharRec ch63 = {4,8,-1,0,6,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0x80,0x40,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch62 = {3,5,-1,-1,6,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xf0,0x0,0xf0, -}; - -static const BitmapCharRec ch61 = {4,3,0,-2,5,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x20,0x40,0x80,0x40,0x20, -}; - -static const BitmapCharRec ch60 = {3,5,-1,-1,6,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x40,0x40,0x0,0x0,0x0,0x0,0x40, -}; - -static const BitmapCharRec ch59 = {2,8,0,2,3,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0x80,0x0,0x0,0x0,0x0,0x80, -}; - -static const BitmapCharRec ch58 = {1,6,-1,0,3,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0x70,0x88,0x8,0x68,0x98,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch57 = {5,8,0,0,6,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x70,0x88,0x88,0x88,0x70,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch56 = {5,8,0,0,6,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x40,0x40,0x20,0x20,0x10,0x10,0x8,0xf8, -}; - -static const BitmapCharRec ch55 = {5,8,0,0,6,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x70,0x88,0x88,0xc8,0xb0,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch54 = {5,8,0,0,6,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x70,0x88,0x8,0x8,0xf0,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch53 = {5,8,0,0,6,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x10,0x10,0xf8,0x90,0x50,0x50,0x30,0x10, -}; - -static const BitmapCharRec ch52 = {5,8,0,0,6,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x70,0x88,0x8,0x8,0x30,0x8,0x88,0x70, -}; - -static const BitmapCharRec ch51 = {5,8,0,0,6,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xf8,0x80,0x40,0x30,0x8,0x8,0x88,0x70, -}; - -static const BitmapCharRec ch50 = {5,8,0,0,6,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch49 = {2,8,-1,0,6,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch48 = {5,8,0,0,6,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0x80,0x80,0x40,0x40,0x40,0x40,0x20,0x20, -}; - -static const BitmapCharRec ch47 = {3,8,0,0,3,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0x80, -}; - -static const BitmapCharRec ch46 = {1,1,-1,0,3,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xf8, -}; - -static const BitmapCharRec ch45 = {5,1,-1,-3,7,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x40,0x40, -}; - -static const BitmapCharRec ch44 = {2,3,0,2,3,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch43 = {5,5,0,-1,6,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0xa0,0x40,0xa0, -}; - -static const BitmapCharRec ch42 = {3,3,0,-5,4,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {3,10,-1,2,4,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch40 = {3,10,0,2,4,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x80,0x40,0x40, -}; - -static const BitmapCharRec ch39 = {2,3,-1,-5,3,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x64,0x98,0x98,0xa4,0x60,0x50,0x50,0x20, -}; - -static const BitmapCharRec ch38 = {6,8,-1,0,8,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x26,0x29,0x16,0x10,0x8,0x68,0x94,0x64, -}; - -static const BitmapCharRec ch37 = {8,8,0,0,9,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x20,0x70,0xa8,0x28,0x70,0xa0,0xa8,0x70,0x20, -}; - -static const BitmapCharRec ch36 = {5,9,0,1,6,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x50,0x50,0xf8,0x28,0x7c,0x28,0x28, -}; - -static const BitmapCharRec ch35 = {6,7,0,0,6,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0xa0,0xa0, -}; - -static const BitmapCharRec ch34 = {3,2,-1,-6,4,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch33 = {1,8,-1,0,3,ch33data}; - -/* char: 0x20 ' ' */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {0,0,0,0,3,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,3,0}; -#endif - -static const BitmapCharRec * const chars[] = { -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -const BitmapFontRec glutBitmapHelvetica10 = { -"-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1", -224, -32, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_hel12.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_hel12.c deleted file mode 100644 index 68aed8a2bd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_hel12.c +++ /dev/null @@ -1,1788 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmapHelvetica12 XXX -#include "glutbitmap.h" -#undef glutBitmapHelvetica12 - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0xc0,0x20,0x20,0x20,0x30,0x50,0x50,0x48,0x88,0x88,0x0,0x50, -}; - -static const BitmapCharRec ch255 = {5,12,-1,3,7,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0x80,0x80,0x80,0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch254 = {5,12,-1,3,7,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x80,0x40,0x20,0x20,0x50,0x50,0x90,0x88,0x88,0x88,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch253 = {5,13,-1,3,7,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x50, -}; - -static const BitmapCharRec ch252 = {5,9,-1,0,7,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch251 = {5,10,-1,0,7,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch250 = {5,10,-1,0,7,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch249 = {5,10,-1,0,7,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0xb8,0x44,0x64,0x54,0x4c,0x44,0x3a, -}; - -static const BitmapCharRec ch248 = {7,7,0,0,7,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x20,0x0,0xf8,0x0,0x20, -}; - -static const BitmapCharRec ch247 = {5,5,-1,-1,7,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50, -}; - -static const BitmapCharRec ch246 = {5,9,-1,0,7,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch245 = {5,10,-1,0,7,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch244 = {5,10,-1,0,7,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch243 = {5,10,-1,0,7,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch242 = {5,10,-1,0,7,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0x88,0x88,0x88,0x88,0x88,0xc8,0xb0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch241 = {5,10,-1,0,7,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x70,0x88,0x88,0x88,0x88,0x78,0x8,0x50,0x30,0x68, -}; - -static const BitmapCharRec ch240 = {5,10,-1,0,7,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0, -}; - -static const BitmapCharRec ch239 = {3,9,0,0,3,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch238 = {3,10,0,0,3,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40, -}; - -static const BitmapCharRec ch237 = {2,10,-1,0,3,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch236 = {2,10,0,0,3,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x50, -}; - -static const BitmapCharRec ch235 = {5,9,-1,0,7,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch234 = {5,10,-1,0,7,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch233 = {5,10,-1,0,7,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch232 = {5,10,-1,0,7,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x60,0x10,0x20,0x70,0x88,0x80,0x80,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch231 = {5,10,-1,3,7,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x77,0x0,0x88,0x80,0x88,0x0,0x7f,0x80,0x8,0x80,0x88,0x80,0x77,0x0, -}; - -static const BitmapCharRec ch230 = {9,7,-1,0,11,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x30,0x48,0x30, -}; - -static const BitmapCharRec ch229 = {6,10,-1,0,7,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50, -}; - -static const BitmapCharRec ch228 = {6,9,-1,0,7,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch227 = {6,10,-1,0,7,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch226 = {6,10,-1,0,7,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch225 = {6,10,-1,0,7,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch224 = {6,10,-1,0,7,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0xb0,0x88,0x88,0x88,0xb0,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch223 = {5,9,-1,0,7,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0x80,0x80,0xf8,0x84,0x84,0x84,0xf8,0x80,0x80, -}; - -static const BitmapCharRec ch222 = {6,9,-1,0,8,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x10,0x10,0x10,0x10,0x28,0x44,0x44,0x82,0x82,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch221 = {7,12,-1,0,9,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48, -}; - -static const BitmapCharRec ch220 = {6,11,-1,0,8,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch219 = {6,12,-1,0,8,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch218 = {6,12,-1,0,8,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch217 = {6,12,-1,0,8,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x80,0x0,0x5e,0x0,0x21,0x0,0x50,0x80,0x48,0x80,0x44,0x80,0x44,0x80,0x42,0x80, -0x21,0x0,0x1e,0x80,0x0,0x40, -}; - -static const BitmapCharRec ch216 = {10,11,0,1,10,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x88,0x50,0x20,0x50,0x88, -}; - -static const BitmapCharRec ch215 = {5,5,-1,-1,7,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x24, -}; - -static const BitmapCharRec ch214 = {8,11,-1,0,10,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch213 = {8,12,-1,0,10,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x14,0x8, -}; - -static const BitmapCharRec ch212 = {8,12,-1,0,10,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x8,0x4, -}; - -static const BitmapCharRec ch211 = {8,12,-1,0,10,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x8,0x10, -}; - -static const BitmapCharRec ch210 = {8,12,-1,0,10,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0x82,0x86,0x8a,0x8a,0x92,0xa2,0xa2,0xc2,0x82,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch209 = {7,12,-1,0,9,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0x7c,0x42,0x41,0x41,0xf1,0x41,0x41,0x42,0x7c, -}; - -static const BitmapCharRec ch208 = {8,9,0,0,9,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0, -}; - -static const BitmapCharRec ch207 = {3,11,0,0,3,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch206 = {3,12,0,0,3,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40, -}; - -static const BitmapCharRec ch205 = {2,12,-1,0,3,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch204 = {2,12,0,0,3,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x28, -}; - -static const BitmapCharRec ch203 = {6,11,-1,0,8,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch202 = {6,12,-1,0,8,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch201 = {6,12,-1,0,8,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch200 = {6,12,-1,0,8,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x30,0x8,0x8,0x3c,0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x3c, -}; - -static const BitmapCharRec ch199 = {7,12,-1,3,9,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0x8f,0x80,0x88,0x0,0x88,0x0,0x78,0x0,0x4f,0x80,0x48,0x0,0x28,0x0,0x28,0x0, -0x1f,0x80, -}; - -static const BitmapCharRec ch198 = {9,9,-1,0,11,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x10,0x28,0x10, -}; - -static const BitmapCharRec ch197 = {7,12,-1,0,9,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28, -}; - -static const BitmapCharRec ch196 = {7,11,-1,0,9,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch195 = {7,12,-1,0,9,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch194 = {7,12,-1,0,9,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch193 = {7,12,-1,0,9,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch192 = {7,12,-1,0,9,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x70,0x88,0x88,0x40,0x40,0x20,0x20,0x0,0x20, -}; - -static const BitmapCharRec ch191 = {5,9,-1,3,7,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x21,0x0,0x17,0x80,0x15,0x0,0xb,0x0,0xc9,0x0,0x24,0x0,0x44,0x0,0x22,0x0, -0xe1,0x0, -}; - -static const BitmapCharRec ch190 = {9,9,0,0,10,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x47,0x80,0x22,0x0,0x11,0x0,0x14,0x80,0x4b,0x0,0x48,0x0,0x44,0x0,0xc2,0x0, -0x41,0x0, -}; - -static const BitmapCharRec ch189 = {9,9,0,0,10,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x41,0x0,0x27,0x80,0x15,0x0,0x13,0x0,0x49,0x0,0x44,0x0,0x44,0x0,0xc2,0x0, -0x41,0x0, -}; - -static const BitmapCharRec ch188 = {9,9,0,0,10,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0xa0,0x50,0x28,0x50,0xa0, -}; - -static const BitmapCharRec ch187 = {5,5,-1,-1,7,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xe0,0x0,0xe0,0xa0,0xe0, -}; - -static const BitmapCharRec ch186 = {3,5,-1,-4,5,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0x40,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch185 = {2,5,-1,-3,4,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0xc0,0x20,0x20,0x40, -}; - -static const BitmapCharRec ch184 = {3,4,0,3,3,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0x80, -}; - -static const BitmapCharRec ch183 = {1,1,-1,-3,3,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x28,0x28,0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x68,0x3c, -}; - -static const BitmapCharRec ch182 = {6,12,0,3,7,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x80,0x80,0x80,0xe8,0x98,0x88,0x88,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch181 = {5,10,-1,3,7,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0x80,0x40, -}; - -static const BitmapCharRec ch180 = {2,2,0,-8,2,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0xc0,0x20,0x40,0x20,0xe0, -}; - -static const BitmapCharRec ch179 = {3,5,0,-3,4,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xf0,0x40,0x20,0x90,0x60, -}; - -static const BitmapCharRec ch178 = {4,5,0,-3,4,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xf8,0x0,0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch177 = {5,7,-1,0,7,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch176 = {4,4,0,-4,5,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xf0, -}; - -static const BitmapCharRec ch175 = {4,1,0,-8,4,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x3e,0x0,0x41,0x0,0x94,0x80,0x94,0x80,0x98,0x80,0x94,0x80,0x9c,0x80,0x41,0x0, -0x3e,0x0, -}; - -static const BitmapCharRec ch174 = {9,9,-1,0,11,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xf0, -}; - -static const BitmapCharRec ch173 = {4,1,0,-3,5,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x4,0x4,0x4,0xfc, -}; - -static const BitmapCharRec ch172 = {6,4,-1,-2,8,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x28,0x50,0xa0,0x50,0x28, -}; - -static const BitmapCharRec ch171 = {5,5,-1,-1,7,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xe0,0x0,0xa0,0x20,0xe0, -}; - -static const BitmapCharRec ch170 = {3,5,-1,-4,5,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x3e,0x0,0x41,0x0,0x9c,0x80,0xa2,0x80,0xa0,0x80,0xa2,0x80,0x9c,0x80,0x41,0x0, -0x3e,0x0, -}; - -static const BitmapCharRec ch169 = {9,9,-1,0,11,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xa0, -}; - -static const BitmapCharRec ch168 = {3,1,0,-8,3,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x70,0x88,0x8,0x30,0x48,0x88,0x88,0x90,0x60,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch167 = {5,12,0,3,6,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0x80,0x80,0x80,0x80,0x0,0x0,0x0,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch166 = {1,11,-1,2,3,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x20,0x20,0xf8,0x20,0xf8,0x20,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch165 = {5,9,-1,0,7,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0x84,0x78,0x48,0x48,0x78,0x84, -}; - -static const BitmapCharRec ch164 = {6,6,0,-1,7,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xb0,0x48,0x20,0x20,0xf0,0x40,0x40,0x48,0x30, -}; - -static const BitmapCharRec ch163 = {5,9,-1,0,7,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x40,0x70,0xc8,0xa0,0xa0,0xa0,0xa8,0x70,0x10, -}; - -static const BitmapCharRec ch162 = {5,9,-1,1,7,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch161 = {1,10,-1,3,3,ch161data}; - -/* char: 0xa0 */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,4,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,4,0}; -#endif - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x98,0x64, -}; - -static const BitmapCharRec ch126 = {6,2,0,-3,7,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0xc0,0x20,0x20,0x20,0x20,0x20,0x10,0x20,0x20,0x20,0x20,0xc0, -}; - -static const BitmapCharRec ch125 = {4,12,0,3,4,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch124 = {1,12,-1,3,3,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x30,0x40,0x40,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x40,0x30, -}; - -static const BitmapCharRec ch123 = {4,12,0,3,4,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xf0,0x80,0x40,0x40,0x20,0x10,0xf0, -}; - -static const BitmapCharRec ch122 = {4,7,-1,0,6,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x80,0x40,0x20,0x20,0x50,0x50,0x90,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch121 = {5,10,-1,3,7,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0x84,0x84,0x48,0x30,0x30,0x48,0x84, -}; - -static const BitmapCharRec ch120 = {6,7,0,0,6,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x22,0x0,0x22,0x0,0x55,0x0,0x49,0x0,0x49,0x0,0x88,0x80,0x88,0x80, -}; - -static const BitmapCharRec ch119 = {9,7,0,0,9,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x20,0x20,0x50,0x50,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch118 = {5,7,-1,0,7,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x68,0x98,0x88,0x88,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch117 = {5,7,-1,0,7,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x60,0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x40, -}; - -static const BitmapCharRec ch116 = {3,9,0,0,3,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0x60,0x90,0x10,0x60,0x80,0x90,0x60, -}; - -static const BitmapCharRec ch115 = {4,7,-1,0,6,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0x80,0x80,0x80,0x80,0x80,0xc0,0xa0, -}; - -static const BitmapCharRec ch114 = {3,7,-1,0,4,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x8,0x8,0x8,0x68,0x98,0x88,0x88,0x88,0x98,0x68, -}; - -static const BitmapCharRec ch113 = {5,10,-1,3,7,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0x80,0x80,0x80,0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0, -}; - -static const BitmapCharRec ch112 = {5,10,-1,3,7,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch111 = {5,7,-1,0,7,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0x88,0x88,0x88,0x88,0x88,0xc8,0xb0, -}; - -static const BitmapCharRec ch110 = {5,7,-1,0,7,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0x92,0x92,0x92,0x92,0x92,0xda,0xa4, -}; - -static const BitmapCharRec ch109 = {7,7,-1,0,9,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch108 = {1,9,-1,0,3,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0x88,0x90,0xa0,0xc0,0xc0,0xa0,0x90,0x80,0x80, -}; - -static const BitmapCharRec ch107 = {5,9,-1,0,6,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0x80,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40, -}; - -static const BitmapCharRec ch106 = {2,12,0,3,3,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch105 = {1,9,-1,0,3,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0x88,0x88,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch104 = {5,9,-1,0,7,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x70,0x88,0x8,0x68,0x98,0x88,0x88,0x88,0x98,0x68, -}; - -static const BitmapCharRec ch103 = {5,10,-1,3,7,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x30, -}; - -static const BitmapCharRec ch102 = {4,9,0,0,3,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x70,0x88,0x80,0xf8,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch101 = {5,7,-1,0,7,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x68,0x98,0x88,0x88,0x88,0x98,0x68,0x8,0x8, -}; - -static const BitmapCharRec ch100 = {5,9,-1,0,7,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x70,0x88,0x80,0x80,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch99 = {5,7,-1,0,7,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch98 = {5,9,-1,0,7,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70, -}; - -static const BitmapCharRec ch97 = {6,7,-1,0,7,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0xc0,0x80,0x40, -}; - -static const BitmapCharRec ch96 = {2,3,0,-6,3,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xfe, -}; - -static const BitmapCharRec ch95 = {7,1,0,2,7,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x88,0x50,0x20, -}; - -static const BitmapCharRec ch94 = {5,3,0,-5,6,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0, -}; - -static const BitmapCharRec ch93 = {2,12,0,3,3,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x10,0x10,0x20,0x20,0x20,0x40,0x40,0x80,0x80, -}; - -static const BitmapCharRec ch92 = {4,9,0,0,4,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0, -}; - -static const BitmapCharRec ch91 = {2,12,-1,3,3,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xfe,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0xfe, -}; - -static const BitmapCharRec ch90 = {7,9,-1,0,9,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x10,0x10,0x10,0x10,0x28,0x44,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch89 = {7,9,-1,0,9,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0x82,0x44,0x44,0x28,0x10,0x28,0x44,0x44,0x82, -}; - -static const BitmapCharRec ch88 = {7,9,-1,0,9,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x22,0x0,0x22,0x0,0x22,0x0,0x55,0x0,0x55,0x0,0x49,0x0,0x88,0x80,0x88,0x80, -0x88,0x80, -}; - -static const BitmapCharRec ch87 = {9,9,-1,0,11,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x10,0x10,0x28,0x28,0x44,0x44,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch86 = {7,9,-1,0,9,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch85 = {6,9,-1,0,8,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe, -}; - -static const BitmapCharRec ch84 = {7,9,0,0,7,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x78,0x84,0x84,0x4,0x18,0x60,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch83 = {6,9,-1,0,8,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0x84,0x84,0x84,0x88,0xf8,0x84,0x84,0x84,0xf8, -}; - -static const BitmapCharRec ch82 = {6,9,-1,0,8,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x3d,0x42,0x85,0x89,0x81,0x81,0x81,0x42,0x3c, -}; - -static const BitmapCharRec ch81 = {8,9,-1,0,10,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0x80,0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8, -}; - -static const BitmapCharRec ch80 = {6,9,-1,0,8,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c, -}; - -static const BitmapCharRec ch79 = {8,9,-1,0,10,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0x82,0x86,0x8a,0x8a,0x92,0xa2,0xa2,0xc2,0x82, -}; - -static const BitmapCharRec ch78 = {7,9,-1,0,9,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0x88,0x80,0x88,0x80,0x94,0x80,0x94,0x80,0xa2,0x80,0xa2,0x80,0xc1,0x80,0xc1,0x80, -0x80,0x80, -}; - -static const BitmapCharRec ch77 = {9,9,-1,0,11,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch76 = {5,9,-1,0,7,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0x82,0x84,0x88,0x90,0xe0,0xa0,0x90,0x88,0x84, -}; - -static const BitmapCharRec ch75 = {7,9,-1,0,8,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x70,0x88,0x88,0x8,0x8,0x8,0x8,0x8,0x8, -}; - -static const BitmapCharRec ch74 = {5,9,-1,0,7,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch73 = {1,9,-1,0,3,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0x82,0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch72 = {7,9,-1,0,9,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x3a,0x46,0x82,0x82,0x8e,0x80,0x80,0x42,0x3c, -}; - -static const BitmapCharRec ch71 = {7,9,-1,0,9,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0xfc, -}; - -static const BitmapCharRec ch70 = {6,9,-1,0,8,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc, -}; - -static const BitmapCharRec ch69 = {6,9,-1,0,8,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xf8,0x84,0x82,0x82,0x82,0x82,0x82,0x84,0xf8, -}; - -static const BitmapCharRec ch68 = {7,9,-1,0,9,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x3c,0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x3c, -}; - -static const BitmapCharRec ch67 = {7,9,-1,0,9,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xf8,0x84,0x84,0x84,0xf8,0x84,0x84,0x84,0xf8, -}; - -static const BitmapCharRec ch66 = {6,9,-1,0,8,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x28,0x10, -}; - -static const BitmapCharRec ch65 = {7,9,-1,0,9,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x3e,0x0,0x40,0x0,0x9b,0x0,0xa6,0x80,0xa2,0x40,0xa2,0x40,0x92,0x40,0x4d,0x40, -0x60,0x80,0x1f,0x0, -}; - -static const BitmapCharRec ch64 = {10,10,-1,1,12,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x20,0x0,0x20,0x20,0x10,0x10,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch63 = {5,9,-1,0,7,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0xc0,0x30,0xc,0x30,0xc0, -}; - -static const BitmapCharRec ch62 = {6,5,-1,-1,7,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xf8,0x0,0xf8, -}; - -static const BitmapCharRec ch61 = {5,3,-1,-2,7,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0xc,0x30,0xc0,0x30,0xc, -}; - -static const BitmapCharRec ch60 = {6,5,0,-1,7,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x40,0x40,0x0,0x0,0x0,0x0,0x40, -}; - -static const BitmapCharRec ch59 = {2,8,0,2,3,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0x80,0x0,0x0,0x0,0x0,0x80, -}; - -static const BitmapCharRec ch58 = {1,6,-1,0,3,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0x70,0x88,0x8,0x8,0x78,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch57 = {5,9,-1,0,7,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch56 = {5,9,-1,0,7,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x40,0x40,0x20,0x20,0x20,0x10,0x10,0x8,0xf8, -}; - -static const BitmapCharRec ch55 = {5,9,-1,0,7,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x70,0x88,0x88,0x88,0xc8,0xb0,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch54 = {5,9,-1,0,7,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x70,0x88,0x88,0x8,0x8,0xf0,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch53 = {5,9,-1,0,7,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x8,0x8,0xfc,0x88,0x48,0x28,0x28,0x18,0x8, -}; - -static const BitmapCharRec ch52 = {6,9,0,0,7,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x70,0x88,0x88,0x8,0x8,0x30,0x8,0x88,0x70, -}; - -static const BitmapCharRec ch51 = {5,9,-1,0,7,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xf8,0x80,0x80,0x40,0x20,0x10,0x8,0x88,0x70, -}; - -static const BitmapCharRec ch50 = {5,9,-1,0,7,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xe0,0x20, -}; - -static const BitmapCharRec ch49 = {3,9,-1,0,7,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch48 = {5,9,-1,0,7,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0x80,0x80,0x40,0x40,0x40,0x20,0x20,0x10,0x10, -}; - -static const BitmapCharRec ch47 = {4,9,0,0,4,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0x80, -}; - -static const BitmapCharRec ch46 = {1,1,-1,0,3,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xf8, -}; - -static const BitmapCharRec ch45 = {5,1,-1,-3,8,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x40,0x40, -}; - -static const BitmapCharRec ch44 = {2,3,-1,2,4,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch43 = {5,5,-1,-1,7,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0xa0,0x40,0xa0, -}; - -static const BitmapCharRec ch42 = {3,3,-1,-6,5,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x20,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {3,12,0,3,4,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch40 = {3,12,-1,3,4,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x80,0x40,0xc0, -}; - -static const BitmapCharRec ch39 = {2,3,-1,-6,3,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x72,0x8c,0x84,0x8a,0x50,0x30,0x48,0x48,0x30, -}; - -static const BitmapCharRec ch38 = {7,9,-1,0,9,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x23,0x0,0x14,0x80,0x14,0x80,0x13,0x0,0x8,0x0,0x68,0x0,0x94,0x0,0x94,0x0, -0x62,0x0, -}; - -static const BitmapCharRec ch37 = {9,9,-1,0,11,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x20,0x70,0xa8,0xa8,0x28,0x70,0xa0,0xa8,0x70,0x20, -}; - -static const BitmapCharRec ch36 = {5,10,-1,1,7,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x50,0x50,0x50,0xfc,0x28,0xfc,0x28,0x28, -}; - -static const BitmapCharRec ch35 = {6,8,0,0,7,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0xa0,0xa0,0xa0, -}; - -static const BitmapCharRec ch34 = {3,3,-1,-6,5,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch33 = {1,9,-1,0,3,ch33data}; - -/* char: 0x20 ' ' */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,4,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,4,0}; -#endif - -static const BitmapCharRec * const chars[] = { -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -const BitmapFontRec glutBitmapHelvetica12 = { -"-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1", -224, -32, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_hel18.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_hel18.c deleted file mode 100644 index f0800843e8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_hel18.c +++ /dev/null @@ -1,1897 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmapHelvetica18 XXX -#include "glutbitmap.h" -#undef glutBitmapHelvetica18 - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,0x0,0x66, -0x66, -}; - -static const BitmapCharRec ch255 = {8,17,-1,4,10,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80, -0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0,0xff,0x0,0xde,0x0,0xc0,0x0,0xc0,0x0, -0xc0,0x0,0xc0,0x0, -}; - -static const BitmapCharRec ch254 = {9,18,-1,4,11,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,0x0,0x18, -0xc,0x6, -}; - -static const BitmapCharRec ch253 = {8,18,-1,4,10,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x66,0x66, -}; - -static const BitmapCharRec ch252 = {8,13,-1,0,10,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x66,0x3c,0x18, -}; - -static const BitmapCharRec ch251 = {8,14,-1,0,10,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x18,0xc,0x6, -}; - -static const BitmapCharRec ch250 = {8,14,-1,0,10,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0xc,0x18,0x30, -}; - -static const BitmapCharRec ch249 = {8,14,-1,0,10,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0xce,0x0,0x7f,0x80,0x31,0x80,0x78,0xc0,0x6c,0xc0,0x66,0xc0,0x63,0xc0,0x31,0x80, -0x3f,0xc0,0xe,0x60, -}; - -static const BitmapCharRec ch248 = {11,10,0,0,11,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x18,0x18,0x0,0xff,0xff,0x0,0x18,0x18, -}; - -static const BitmapCharRec ch247 = {8,8,-1,-1,10,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x0,0x0,0x36,0x0,0x36,0x0, -}; - -static const BitmapCharRec ch246 = {9,13,-1,0,11,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x0,0x0,0x26,0x0,0x2d,0x0,0x19,0x0, -}; - -static const BitmapCharRec ch245 = {9,14,-1,0,11,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x0,0x0,0x33,0x0,0x1e,0x0,0xc,0x0, -}; - -static const BitmapCharRec ch244 = {9,14,-1,0,11,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x0,0x0,0x18,0x0,0xc,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch243 = {9,14,-1,0,11,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x0,0x0,0xc,0x0,0x18,0x0,0x30,0x0, -}; - -static const BitmapCharRec ch242 = {9,14,-1,0,11,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce,0x0,0x4c,0x5a,0x32, -}; - -static const BitmapCharRec ch241 = {8,14,-1,0,10,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x4c,0x0,0x38,0x0,0x36,0x0,0x60,0x0, -}; - -static const BitmapCharRec ch240 = {9,14,-1,0,11,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0xd8,0xd8, -}; - -static const BitmapCharRec ch239 = {5,13,0,0,4,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc,0x78,0x30, -}; - -static const BitmapCharRec ch238 = {6,14,1,0,4,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0xc0,0x60,0x30, -}; - -static const BitmapCharRec ch237 = {4,14,0,0,4,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0x30,0x60,0xc0, -}; - -static const BitmapCharRec ch236 = {4,14,0,0,4,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x36,0x36, -}; - -static const BitmapCharRec ch235 = {8,13,-1,0,10,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x66,0x3c,0x18, -}; - -static const BitmapCharRec ch234 = {8,14,-1,0,10,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x18,0xc,0x6, -}; - -static const BitmapCharRec ch233 = {8,14,-1,0,10,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x18,0x30,0x60, -}; - -static const BitmapCharRec ch232 = {8,14,-1,0,10,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x78,0x6c,0xc,0x38,0x3e,0x7f,0x63,0xc0,0xc0,0xc0,0xc0,0x63,0x7f,0x3e, -}; - -static const BitmapCharRec ch231 = {8,14,-1,4,10,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x75,0xe0,0xef,0xf8,0xc7,0x18,0xc6,0x0,0xe6,0x0,0x7f,0xf8,0xe,0x18,0xc6,0x18, -0xef,0xf0,0x7d,0xe0, -}; - -static const BitmapCharRec ch230 = {13,10,-1,0,15,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x38,0x6c,0x6c,0x38, -}; - -static const BitmapCharRec ch229 = {7,14,-1,0,9,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x6c,0x6c, -}; - -static const BitmapCharRec ch228 = {7,13,-1,0,9,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x4c,0x5a,0x32, -}; - -static const BitmapCharRec ch227 = {7,14,-1,0,9,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x66,0x3c,0x18, -}; - -static const BitmapCharRec ch226 = {7,14,-1,0,9,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x30,0x18,0xc, -}; - -static const BitmapCharRec ch225 = {7,14,-1,0,9,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x18,0x30,0x60, -}; - -static const BitmapCharRec ch224 = {7,14,-1,0,9,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0xdc,0xde,0xc6,0xc6,0xc6,0xc6,0xdc,0xdc,0xc6,0xc6,0xc6,0xc6,0x7c,0x38, -}; - -static const BitmapCharRec ch223 = {7,14,-1,0,9,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x80,0xc1,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc1,0xc0,0xff,0x80,0xff,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -}; - -static const BitmapCharRec ch222 = {10,14,-1,0,12,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80, -0x30,0xc0,0x30,0xc0,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30,0x0,0x0,0x6,0x0, -0x3,0x0,0x1,0x80, -}; - -static const BitmapCharRec ch221 = {12,18,-1,0,14,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x19,0x80, -0x19,0x80, -}; - -static const BitmapCharRec ch220 = {11,17,-1,0,13,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x19,0x80, -0xf,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch219 = {11,18,-1,0,13,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0xc,0x0, -0x6,0x0,0x3,0x0, -}; - -static const BitmapCharRec ch218 = {11,18,-1,0,13,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x6,0x0, -0xc,0x0,0x18,0x0, -}; - -static const BitmapCharRec ch217 = {11,18,-1,0,13,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0xc7,0xc0,0xff,0xf0,0x78,0x38,0x38,0x18,0x6c,0x1c,0x6e,0xc,0x67,0xc,0x63,0x8c, -0x61,0xcc,0x70,0xdc,0x30,0x78,0x38,0x38,0x1f,0xfc,0x7,0xcc, -}; - -static const BitmapCharRec ch216 = {14,14,0,0,15,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0xc0,0xc0,0x61,0x80,0x33,0x0,0x1e,0x0,0xc,0x0,0x1e,0x0,0x33,0x0,0x61,0x80, -0xc0,0xc0, -}; - -static const BitmapCharRec ch215 = {10,9,0,0,10,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0xd,0x80, -0xd,0x80, -}; - -static const BitmapCharRec ch214 = {13,17,-1,0,15,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x9,0x80, -0xb,0x40,0x6,0x40, -}; - -static const BitmapCharRec ch213 = {13,18,-1,0,15,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0xc,0xc0, -0x7,0x80,0x3,0x0, -}; - -static const BitmapCharRec ch212 = {13,18,-1,0,15,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x3,0x0, -0x1,0x80,0x0,0xc0, -}; - -static const BitmapCharRec ch211 = {13,18,-1,0,15,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x3,0x0, -0x6,0x0,0xc,0x0, -}; - -static const BitmapCharRec ch210 = {13,18,-1,0,15,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0xc0,0x60,0xc0,0xe0,0xc1,0xe0,0xc1,0xe0,0xc3,0x60,0xc6,0x60,0xc6,0x60,0xcc,0x60, -0xcc,0x60,0xd8,0x60,0xd8,0x60,0xf0,0x60,0xe0,0x60,0xe0,0x60,0x0,0x0,0x13,0x0, -0x16,0x80,0xc,0x80, -}; - -static const BitmapCharRec ch209 = {11,18,-1,0,13,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0x7f,0x80,0x7f,0xc0,0x60,0xe0,0x60,0x60,0x60,0x30,0x60,0x30,0xfc,0x30,0xfc,0x30, -0x60,0x30,0x60,0x30,0x60,0x60,0x60,0xe0,0x7f,0xc0,0x7f,0x80, -}; - -static const BitmapCharRec ch208 = {12,14,0,0,13,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc, -0xcc, -}; - -static const BitmapCharRec ch207 = {6,17,0,0,6,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc, -0x78,0x30, -}; - -static const BitmapCharRec ch206 = {6,18,0,0,6,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0xc0, -0x60,0x30, -}; - -static const BitmapCharRec ch205 = {4,18,-2,0,6,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0x30, -0x60,0xc0, -}; - -static const BitmapCharRec ch204 = {4,18,0,0,6,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0x33,0x0, -0x33,0x0, -}; - -static const BitmapCharRec ch203 = {9,17,-1,0,11,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0x33,0x0, -0x1e,0x0,0xc,0x0, -}; - -static const BitmapCharRec ch202 = {9,18,-1,0,11,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0xc,0x0, -0x6,0x0,0x3,0x0, -}; - -static const BitmapCharRec ch201 = {9,18,-1,0,11,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0xc,0x0, -0x18,0x0,0x30,0x0, -}; - -static const BitmapCharRec ch200 = {9,18,-1,0,11,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x1e,0x0,0x1b,0x0,0x3,0x0,0xe,0x0,0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30, -0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xe0,0x0,0x60,0x30,0x70,0x70, -0x3f,0xe0,0xf,0x80, -}; - -static const BitmapCharRec ch199 = {12,18,-1,4,14,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0xc1,0xff,0xc1,0xff,0x61,0x80,0x61,0x80,0x7f,0x80,0x3f,0x80,0x31,0xfe,0x31,0xfe, -0x19,0x80,0x19,0x80,0xd,0x80,0xd,0x80,0x7,0xff,0x7,0xff, -}; - -static const BitmapCharRec ch198 = {16,14,-1,0,18,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80, -0x19,0x80,0xf,0x0, -}; - -static const BitmapCharRec ch197 = {12,18,0,0,12,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x19,0x80, -0x19,0x80, -}; - -static const BitmapCharRec ch196 = {12,17,0,0,12,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x13,0x0, -0x16,0x80,0xc,0x80, -}; - -static const BitmapCharRec ch195 = {12,18,0,0,12,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x19,0x80, -0xf,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch194 = {12,18,0,0,12,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x6,0x0, -0x3,0x0,0x1,0x80, -}; - -static const BitmapCharRec ch193 = {12,18,0,0,12,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x6,0x0, -0xc,0x0,0x18,0x0, -}; - -static const BitmapCharRec ch192 = {12,18,0,0,12,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x7c,0xfe,0xc6,0xc6,0xe0,0x70,0x38,0x18,0x18,0x18,0x0,0x0,0x18,0x18, -}; - -static const BitmapCharRec ch191 = {7,14,-1,4,10,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x18,0x18,0x18,0x18,0xc,0xfc,0x6,0xd8,0x6,0x78,0x73,0x38,0xf9,0x18,0x99,0x88, -0x30,0xc0,0x30,0xc0,0x98,0x60,0xf8,0x30,0x70,0x30, -}; - -static const BitmapCharRec ch190 = {14,13,0,0,15,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x30,0xf8,0x30,0xf8,0x18,0x60,0xc,0x30,0xc,0x18,0x66,0x98,0x62,0xf8,0x63,0x70, -0x61,0x80,0x61,0x80,0xe0,0xc0,0xe0,0x60,0x60,0x60, -}; - -static const BitmapCharRec ch189 = {13,13,-1,0,15,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x30,0x30,0x30,0x30,0x19,0xf8,0xd,0xb0,0xc,0xf0,0x66,0x70,0x62,0x30,0x63,0x10, -0x61,0x80,0x61,0x80,0xe0,0xc0,0xe0,0x60,0x60,0x60, -}; - -static const BitmapCharRec ch188 = {13,13,-1,0,15,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0x90,0xd8,0x6c,0x36,0x36,0x6c,0xd8,0x90, -}; - -static const BitmapCharRec ch187 = {7,8,-1,-1,9,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xf8,0x0,0x70,0xd8,0x88,0x88,0xd8,0x70, -}; - -static const BitmapCharRec ch186 = {5,8,-1,-6,7,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0x60,0x60,0x60,0x60,0x60,0xe0,0xe0,0x60, -}; - -static const BitmapCharRec ch185 = {3,8,-1,-5,6,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0xf0,0xd8,0x18,0x70,0x60, -}; - -static const BitmapCharRec ch184 = {5,5,0,4,5,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch183 = {2,2,-1,-4,4,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x32,0x72,0xf2,0xf2,0xf2,0xf2, -0x72,0x3f, -}; - -static const BitmapCharRec ch182 = {8,18,-1,4,10,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0xc0,0xc0,0xc0,0xc0,0xdb,0xff,0xe7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3, -}; - -static const BitmapCharRec ch181 = {8,14,-1,4,10,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0xc0,0x60,0x30, -}; - -static const BitmapCharRec ch180 = {4,3,0,-11,4,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0x70,0xf8,0x98,0x30,0x30,0x98,0xf8,0x70, -}; - -static const BitmapCharRec ch179 = {5,8,0,-5,6,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xf8,0xf8,0x60,0x30,0x18,0x98,0xf8,0x70, -}; - -static const BitmapCharRec ch178 = {5,8,0,-5,6,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xff,0xff,0x0,0x18,0x18,0x18,0xff,0xff,0x18,0x18,0x18, -}; - -static const BitmapCharRec ch177 = {8,11,-1,0,10,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x70,0xd8,0x88,0xd8,0x70, -}; - -static const BitmapCharRec ch176 = {5,5,-1,-8,7,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xf8, -}; - -static const BitmapCharRec ch175 = {5,1,0,-12,5,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0xf,0x80,0x30,0x60,0x40,0x10,0x48,0x50,0x88,0x88,0x89,0x8,0x8f,0x88,0x88,0x48, -0x88,0x48,0x4f,0x90,0x40,0x10,0x30,0x60,0xf,0x80, -}; - -static const BitmapCharRec ch174 = {13,13,-1,0,14,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xf8,0xf8, -}; - -static const BitmapCharRec ch173 = {5,2,-1,-4,7,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x1,0x80,0x1,0x80,0x1,0x80,0xff,0x80,0xff,0x80, -}; - -static const BitmapCharRec ch172 = {9,5,-1,-3,11,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x12,0x36,0x6c,0xd8,0xd8,0x6c,0x36,0x12, -}; - -static const BitmapCharRec ch171 = {7,8,-1,-1,9,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xf8,0x0,0x68,0xd8,0x48,0x38,0xc8,0x70, -}; - -static const BitmapCharRec ch170 = {5,8,-1,-6,7,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0xf,0x80,0x30,0x60,0x40,0x10,0x47,0x10,0x88,0x88,0x90,0x8,0x90,0x8,0x90,0x8, -0x88,0x88,0x47,0x10,0x40,0x10,0x30,0x60,0xf,0x80, -}; - -static const BitmapCharRec ch169 = {13,13,-1,0,15,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xd8,0xd8, -}; - -static const BitmapCharRec ch168 = {5,2,0,-11,6,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x3c,0x7e,0xc3,0xc3,0x7,0xe,0x3e,0x73,0xe3,0xc3,0xc7,0x6e,0x7c,0xf0,0xc3,0xc3, -0x7e,0x3c, -}; - -static const BitmapCharRec ch167 = {8,18,-1,4,10,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0, -}; - -static const BitmapCharRec ch166 = {2,17,-1,3,4,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x18,0x18,0x18,0x18,0xff,0x18,0xff,0x3c,0x66,0x66,0x66,0xc3,0xc3, -}; - -static const BitmapCharRec ch165 = {8,13,-1,0,10,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0xc3,0xff,0x66,0x66,0x66,0xff,0xc3, -}; - -static const BitmapCharRec ch164 = {8,7,-1,-3,10,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xdf,0x0,0xff,0x80,0x60,0x80,0x30,0x0,0x18,0x0,0x18,0x0,0x7e,0x0,0x30,0x0, -0x60,0x0,0x61,0x80,0x61,0x80,0x3f,0x0,0x1e,0x0, -}; - -static const BitmapCharRec ch163 = {9,13,0,0,10,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x10,0x10,0x3e,0x7f,0x6b,0xc8,0xc8,0xc8,0xc8,0x6b,0x7f,0x3e,0x4,0x4, -}; - -static const BitmapCharRec ch162 = {8,14,-1,2,10,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x40,0x40,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch161 = {2,14,-2,4,6,ch161data}; - -/* char: 0xa0 */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,5,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,5,0}; -#endif - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0xcc,0x7e,0x33, -}; - -static const BitmapCharRec ch126 = {8,3,-1,-4,10,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0xc0,0x60,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0xc,0x18,0x30,0x30,0x30,0x30,0x30, -0x60,0xc0, -}; - -static const BitmapCharRec ch125 = {6,18,0,4,6,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0, -}; - -static const BitmapCharRec ch124 = {2,18,-1,4,4,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0xc,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x60,0xc0,0x60,0x30,0x30,0x30,0x30,0x30, -0x18,0xc, -}; - -static const BitmapCharRec ch123 = {6,18,0,4,6,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xfe,0xfe,0xc0,0x60,0x30,0x18,0xc,0x6,0xfe,0xfe, -}; - -static const BitmapCharRec ch122 = {7,10,-1,0,9,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3, -}; - -static const BitmapCharRec ch121 = {8,14,-1,4,10,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0xc3,0xe7,0x66,0x3c,0x18,0x18,0x3c,0x66,0xe7,0xc3, -}; - -static const BitmapCharRec ch120 = {8,10,-1,0,10,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x19,0x80,0x19,0x80,0x39,0xc0,0x29,0x40,0x69,0x60,0x66,0x60,0x66,0x60,0xc6,0x30, -0xc6,0x30,0xc6,0x30, -}; - -static const BitmapCharRec ch119 = {12,10,-1,0,14,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3, -}; - -static const BitmapCharRec ch118 = {8,10,-1,0,10,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3, -}; - -static const BitmapCharRec ch117 = {8,10,-1,0,10,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x18,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0xfc,0xfc,0x30,0x30,0x30, -}; - -static const BitmapCharRec ch116 = {6,13,0,0,6,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0x78,0xfc,0xc6,0x6,0x3e,0xfc,0xc0,0xc6,0x7e,0x3c, -}; - -static const BitmapCharRec ch115 = {7,10,-1,0,9,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xe0,0xd8,0xd8, -}; - -static const BitmapCharRec ch114 = {5,10,-1,0,6,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80, -0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x80,0x7f,0x80,0x3d,0x80, -}; - -static const BitmapCharRec ch113 = {9,14,-1,4,11,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80, -0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0,0xff,0x0,0xde,0x0, -}; - -static const BitmapCharRec ch112 = {9,14,-1,4,11,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0, -}; - -static const BitmapCharRec ch111 = {9,10,-1,0,11,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce, -}; - -static const BitmapCharRec ch110 = {8,10,-1,0,10,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xe7,0x30, -0xde,0xf0,0xcc,0x60, -}; - -static const BitmapCharRec ch109 = {12,10,-1,0,14,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch108 = {2,14,-1,0,4,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0xc7,0xc6,0xce,0xcc,0xd8,0xf8,0xf0,0xd8,0xcc,0xc6,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch107 = {8,14,-1,0,9,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0xe0,0xf0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0x0, -0x30,0x30, -}; - -static const BitmapCharRec ch106 = {4,18,1,4,4,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch105 = {2,14,-1,0,4,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch104 = {8,14,-1,0,10,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x1c,0x0,0x7f,0x0,0x63,0x0,0x1,0x80,0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80, -0xc1,0x80,0xc1,0x80,0xc1,0x80,0x61,0x80,0x7f,0x80,0x3d,0x80, -}; - -static const BitmapCharRec ch103 = {9,14,-1,4,11,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfc,0xfc,0x30,0x30,0x3c,0x1c, -}; - -static const BitmapCharRec ch102 = {6,14,0,0,6,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c, -}; - -static const BitmapCharRec ch101 = {8,10,-1,0,10,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x80, -0x7f,0x80,0x3d,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80, -}; - -static const BitmapCharRec ch100 = {9,14,-1,0,11,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x3e,0x7f,0x63,0xc0,0xc0,0xc0,0xc0,0x63,0x7f,0x3e, -}; - -static const BitmapCharRec ch99 = {8,10,-1,0,10,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0, -0xff,0x0,0xde,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -}; - -static const BitmapCharRec ch98 = {9,14,-1,0,11,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c, -}; - -static const BitmapCharRec ch97 = {7,10,-1,0,9,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0xc0,0xc0,0x80,0x80,0x40, -}; - -static const BitmapCharRec ch96 = {2,5,-1,-9,4,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xff,0xc0,0xff,0xc0, -}; - -static const BitmapCharRec ch95 = {10,2,0,4,10,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x82,0xc6,0x6c,0x38,0x10, -}; - -static const BitmapCharRec ch94 = {7,5,-1,-8,9,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xf0,0xf0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0xf0,0xf0, -}; - -static const BitmapCharRec ch93 = {4,18,0,4,5,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x18,0x18,0x10,0x10,0x30,0x30,0x20,0x20,0x60,0x60,0x40,0x40,0xc0,0xc0, -}; - -static const BitmapCharRec ch92 = {5,14,0,0,5,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xf0,0xf0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xf0,0xf0, -}; - -static const BitmapCharRec ch91 = {4,18,-1,4,5,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xff,0xc0,0xff,0xc0,0xc0,0x0,0x60,0x0,0x30,0x0,0x18,0x0,0x1c,0x0,0xc,0x0, -0x6,0x0,0x3,0x0,0x1,0x80,0x0,0xc0,0xff,0xc0,0xff,0xc0, -}; - -static const BitmapCharRec ch90 = {10,14,-1,0,12,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80, -0x30,0xc0,0x30,0xc0,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30, -}; - -static const BitmapCharRec ch89 = {12,14,-1,0,14,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0xc0,0x60,0xe0,0xe0,0x60,0xc0,0x71,0xc0,0x31,0x80,0x1b,0x0,0xe,0x0,0xe,0x0, -0x1b,0x0,0x31,0x80,0x71,0xc0,0x60,0xc0,0xe0,0xe0,0xc0,0x60, -}; - -static const BitmapCharRec ch88 = {11,14,-1,0,13,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x18,0x18,0x18,0x18,0x1c,0x38,0x34,0x2c,0x36,0x6c,0x36,0x6c,0x66,0x66,0x66,0x66, -0x62,0x46,0x63,0xc6,0xc3,0xc3,0xc1,0x83,0xc1,0x83,0xc1,0x83, -}; - -static const BitmapCharRec ch87 = {16,14,-1,0,18,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x6,0x0,0xf,0x0,0xf,0x0,0x19,0x80,0x19,0x80,0x19,0x80,0x30,0xc0,0x30,0xc0, -0x30,0xc0,0x60,0x60,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30, -}; - -static const BitmapCharRec ch86 = {12,14,-1,0,14,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -}; - -static const BitmapCharRec ch85 = {11,14,-1,0,13,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0, -0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xff,0xc0,0xff,0xc0, -}; - -static const BitmapCharRec ch84 = {10,14,-1,0,12,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x3f,0x0,0x7f,0xc0,0xe0,0xe0,0xc0,0x60,0x0,0x60,0x0,0xe0,0x3,0xc0,0x1f,0x0, -0x7c,0x0,0xe0,0x0,0xc0,0x60,0xe0,0xe0,0x7f,0xc0,0x1f,0x0, -}; - -static const BitmapCharRec ch83 = {11,14,-1,0,13,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0x80,0xc1,0x80,0xff,0x0,0xff,0x80, -0xc1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0, -}; - -static const BitmapCharRec ch82 = {10,14,-1,0,12,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x0,0x30,0xf,0xb0,0x3f,0xe0,0x70,0xf0,0x61,0xb0,0xe1,0xb8,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80, -}; - -static const BitmapCharRec ch81 = {13,15,-1,1,15,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x80, -0xc1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0, -}; - -static const BitmapCharRec ch80 = {10,14,-1,0,12,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80, -}; - -static const BitmapCharRec ch79 = {13,14,-1,0,15,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0xc0,0x60,0xc0,0xe0,0xc1,0xe0,0xc1,0xe0,0xc3,0x60,0xc6,0x60,0xc6,0x60,0xcc,0x60, -0xcc,0x60,0xd8,0x60,0xf0,0x60,0xf0,0x60,0xe0,0x60,0xc0,0x60, -}; - -static const BitmapCharRec ch78 = {11,14,-1,0,13,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0xc3,0xc,0xc3,0xc,0xc7,0x8c,0xc4,0x8c,0xcc,0xcc,0xcc,0xcc,0xd8,0x6c,0xd8,0x6c, -0xf0,0x3c,0xf0,0x3c,0xe0,0x1c,0xe0,0x1c,0xc0,0xc,0xc0,0xc, -}; - -static const BitmapCharRec ch77 = {14,14,-1,0,16,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xff,0xff,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch76 = {8,14,-1,0,10,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0xc0,0x70,0xc0,0xe0,0xc1,0xc0,0xc3,0x80,0xc7,0x0,0xce,0x0,0xfc,0x0,0xf8,0x0, -0xdc,0x0,0xce,0x0,0xc7,0x0,0xc3,0x80,0xc1,0xc0,0xc0,0xe0, -}; - -static const BitmapCharRec ch75 = {12,14,-1,0,13,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x3c,0x7e,0xe7,0xc3,0xc3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3, -}; - -static const BitmapCharRec ch74 = {8,14,-1,0,10,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch73 = {2,14,-2,0,6,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xff,0xe0,0xff,0xe0, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -}; - -static const BitmapCharRec ch72 = {11,14,-1,0,13,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0xf,0xb0,0x3f,0xf0,0x70,0x70,0x60,0x30,0xe0,0x30,0xc1,0xf0,0xc1,0xf0,0xc0,0x0, -0xc0,0x0,0xe0,0x30,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80, -}; - -static const BitmapCharRec ch71 = {12,14,-1,0,14,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80, -}; - -static const BitmapCharRec ch70 = {9,14,-1,0,11,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80, -}; - -static const BitmapCharRec ch69 = {9,14,-1,0,11,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xff,0x0,0xff,0x80,0xc1,0xc0,0xc0,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0, -}; - -static const BitmapCharRec ch68 = {11,14,-1,0,13,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -0xc0,0x0,0xe0,0x0,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80, -}; - -static const BitmapCharRec ch67 = {12,14,-1,0,14,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xff,0x80,0xff,0xc0,0xc0,0xe0,0xc0,0x60,0xc0,0x60,0xc0,0xe0,0xff,0xc0,0xff,0x80, -0xc1,0x80,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0, -}; - -static const BitmapCharRec ch66 = {11,14,-1,0,13,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch65 = {12,14,0,0,12,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x7,0xe0,0x1f,0xf0,0x38,0x0,0x70,0x0,0x67,0x70,0xcf,0xf8,0xcc,0xcc,0xcc,0x66, -0xcc,0x66,0xcc,0x63,0xc6,0x33,0x67,0x73,0x63,0xb3,0x30,0x6,0x1c,0xe,0xf,0xfc, -0x3,0xf0, -}; - -static const BitmapCharRec ch64 = {16,17,-1,3,18,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x30,0x30,0x0,0x0,0x30,0x30,0x30,0x38,0x1c,0xe,0xc6,0xc6,0xfe,0x7c, -}; - -static const BitmapCharRec ch63 = {7,14,-1,0,10,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0xc0,0xf0,0x3c,0xe,0x3,0xe,0x3c,0xf0,0xc0, -}; - -static const BitmapCharRec ch62 = {8,9,-1,0,10,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xfe,0xfe,0x0,0x0,0xfe,0xfe, -}; - -static const BitmapCharRec ch61 = {7,6,-2,-2,11,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x3,0xf,0x3c,0x70,0xc0,0x70,0x3c,0xf,0x3, -}; - -static const BitmapCharRec ch60 = {8,9,-1,0,10,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x40,0x40,0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch59 = {2,13,-1,3,5,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch58 = {2,10,-1,0,5,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0x7c,0xfe,0xc6,0x3,0x3,0x3b,0x7f,0xc3,0xc3,0xc3,0xc7,0x7e,0x3c, -}; - -static const BitmapCharRec ch57 = {8,13,-1,0,10,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x3c,0x7e,0xe7,0xc3,0xc3,0x66,0x7e,0x66,0xc3,0xc3,0xe7,0x7e,0x3c, -}; - -static const BitmapCharRec ch56 = {8,13,-1,0,10,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x60,0x60,0x30,0x30,0x30,0x18,0x18,0xc,0xc,0x6,0x3,0xff,0xff, -}; - -static const BitmapCharRec ch55 = {8,13,-1,0,10,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x3c,0x7e,0xe3,0xc3,0xc3,0xc3,0xfe,0xdc,0xc0,0xc0,0x63,0x7f,0x3c, -}; - -static const BitmapCharRec ch54 = {8,13,-1,0,10,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x7c,0xfe,0xc7,0xc3,0x3,0x3,0xc7,0xfe,0xfc,0xc0,0xc0,0xfe,0xfe, -}; - -static const BitmapCharRec ch53 = {8,13,-1,0,10,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x3,0x0,0x3,0x0,0x3,0x0,0xff,0x80,0xff,0x80,0xc3,0x0,0x63,0x0,0x33,0x0, -0x33,0x0,0x1b,0x0,0xf,0x0,0x7,0x0,0x3,0x0, -}; - -static const BitmapCharRec ch52 = {9,13,-1,0,10,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x3c,0x7e,0xc7,0xc3,0x3,0x7,0x1e,0x1c,0x6,0xc3,0xc3,0x7e,0x3c, -}; - -static const BitmapCharRec ch51 = {8,13,-1,0,10,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xff,0xff,0xc0,0xe0,0x70,0x38,0x1c,0xe,0x7,0x3,0xc3,0xfe,0x3c, -}; - -static const BitmapCharRec ch50 = {8,13,-1,0,10,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0xf8,0x18, -}; - -static const BitmapCharRec ch49 = {5,13,-2,0,10,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x3c,0x7e,0x66,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x66,0x7e,0x3c, -}; - -static const BitmapCharRec ch48 = {8,13,-1,0,10,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0xc0,0xc0,0x40,0x40,0x60,0x60,0x20,0x20,0x30,0x30,0x10,0x10,0x18,0x18, -}; - -static const BitmapCharRec ch47 = {5,14,0,0,5,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch46 = {2,2,-1,0,5,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xff,0xff, -}; - -static const BitmapCharRec ch45 = {8,2,-1,-4,11,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x40,0x40,0xc0,0xc0, -}; - -static const BitmapCharRec ch44 = {2,5,-1,3,5,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x18,0x18,0x18,0x18,0xff,0xff,0x18,0x18,0x18,0x18, -}; - -static const BitmapCharRec ch43 = {8,10,-1,0,10,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0x88,0x70,0x70,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch42 = {5,6,-1,-8,7,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0xc0,0x60,0x60,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x60,0x60, -0xc0,0x80, -}; - -static const BitmapCharRec ch41 = {4,18,-1,4,6,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x10,0x30,0x60,0x60,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x60,0x60, -0x30,0x10, -}; - -static const BitmapCharRec ch40 = {4,18,-1,4,6,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x80,0x40,0x40,0xc0,0xc0, -}; - -static const BitmapCharRec ch39 = {2,5,-1,-9,4,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x3c,0x70,0x7e,0xe0,0xe7,0xc0,0xc3,0x80,0xc3,0xc0,0xc6,0xc0,0xee,0xc0,0x7c,0x0, -0x3c,0x0,0x66,0x0,0x66,0x0,0x7e,0x0,0x3c,0x0, -}; - -static const BitmapCharRec ch38 = {12,13,-1,0,13,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x18,0x78,0x18,0xfc,0xc,0xcc,0xc,0xcc,0x6,0xfc,0x6,0x78,0x3,0x0,0x7b,0x0, -0xfd,0x80,0xcd,0x80,0xcc,0xc0,0xfc,0xc0,0x78,0x60, -}; - -static const BitmapCharRec ch37 = {14,13,-1,0,16,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x8,0x0,0x8,0x0,0x3e,0x0,0x7f,0x0,0xeb,0x80,0xc9,0x80,0x9,0x80,0xf,0x0, -0x3e,0x0,0x78,0x0,0xe8,0x0,0xc8,0x0,0xcb,0x0,0x7f,0x0,0x3e,0x0,0x8,0x0, -}; - -static const BitmapCharRec ch36 = {9,16,-1,2,10,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x24,0x0,0x24,0x0,0x24,0x0,0xff,0x80,0xff,0x80,0x12,0x0,0x12,0x0,0x12,0x0, -0x7f,0xc0,0x7f,0xc0,0x9,0x0,0x9,0x0,0x9,0x0, -}; - -static const BitmapCharRec ch35 = {10,13,0,0,10,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0x90,0x90,0xd8,0xd8,0xd8, -}; - -static const BitmapCharRec ch34 = {5,5,0,-9,5,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0xc0,0xc0,0x0,0x0,0x80,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch33 = {2,14,-2,0,6,ch33data}; - -/* char: 0x20 ' ' */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,5,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,5,0}; -#endif - -static const BitmapCharRec * const chars[] = { -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -const BitmapFontRec glutBitmapHelvetica18 = { -"-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1", -224, -32, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_init.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_init.c deleted file mode 100644 index b1a42a328d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_init.c +++ /dev/null @@ -1,390 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#ifdef __VMS -#include -#endif - -#include -#include -#include - -#if !defined(_WIN32) -#include -#include -#endif - -/* SGI optimization introduced in IRIX 6.3 to avoid X server - round trips for interning common X atoms. */ -#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS) -#include -#else -#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how) -#endif - -#include "glutint.h" - -/* GLUT inter-file variables */ -/* *INDENT-OFF* */ -char *__glutProgramName = NULL; -int __glutArgc = 0; -char **__glutArgv = NULL; -char *__glutGeometry = NULL; -Display *__glutDisplay = NULL; -int __glutScreen; -Window __glutRoot; -int __glutScreenHeight; -int __glutScreenWidth; -GLboolean __glutIconic = GL_FALSE; -GLboolean __glutDebug = GL_FALSE; -unsigned int __glutDisplayMode = - GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH; -char *__glutDisplayString = NULL; -int __glutConnectionFD; -XSizeHints __glutSizeHints = {0}; -int __glutInitWidth = 300, __glutInitHeight = 300; -int __glutInitX = -1, __glutInitY = -1; -GLboolean __glutForceDirect = GL_FALSE, - __glutTryDirect = GL_TRUE; -Atom __glutWMDeleteWindow; -/* *INDENT-ON* */ - -#ifdef _WIN32 -void (__cdecl *__glutExitFunc)(int retval) = NULL; -#endif - -static Bool synchronize = False; - -#if defined(_WIN32) - -#ifdef __BORLANDC__ -#include /* For masking floating point exceptions. */ -#endif - -void -__glutOpenWin32Connection(char* display) -{ - static char *classname; - WNDCLASS wc; - HINSTANCE hInstance = GetModuleHandle(NULL); - - /* Make sure we register the window only once. */ - if(classname) - return; - -#ifdef __BORLANDC__ - /* Under certain conditions (e.g. while rendering solid surfaces with - lighting enabled) Microsoft OpenGL libraries cause some illegal - operations like floating point overflow or division by zero. The - default behaviour of Microsoft compilers is to mask (ignore) - floating point exceptions, while Borland compilers do not. The - following function of Borland RTL allows to mask exceptions. - Advice from Pier Giorgio Esposito (mc2172@mclink.it). */ - _control87(MCW_EM,MCW_EM); -#endif - - classname = "GLUT"; - - /* Clear (important!) and then fill in the window class structure. */ - memset(&wc, 0, sizeof(WNDCLASS)); - wc.style = CS_OWNDC; - wc.lpfnWndProc = (WNDPROC)__glutWindowProc; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(hInstance, "GLUT_ICON"); - wc.hCursor = LoadCursor(hInstance, IDC_ARROW); - wc.hbrBackground = NULL; - wc.lpszMenuName = NULL; - wc.lpszClassName = classname; - - /* Fill in a default icon if one isn't specified as a resource. */ - if(!wc.hIcon) - wc.hIcon = LoadIcon(NULL, IDI_WINLOGO); - - if(!RegisterClass(&wc)) { - __glutFatalError("RegisterClass() failed:" - "Cannot register GLUT window class."); - } - - __glutScreenWidth = GetSystemMetrics(SM_CXSCREEN); - __glutScreenHeight = GetSystemMetrics(SM_CYSCREEN); - - /* Set the root window to NULL because windows creates a top-level - window when the parent is NULL. X creates a top-level window - when the parent is the root window. */ - __glutRoot = NULL; - - /* Set the display to 1 -- we shouldn't be using this anywhere - (except as an argument to X calls). */ - __glutDisplay = (Display*)1; - - /* There isn't any concept of multiple screens in Win32, therefore, - we don't need to keep track of the screen we're on... it's always - the same one. */ - __glutScreen = 0; -} -#else /* !_WIN32 */ -void -__glutOpenXConnection(char *display) -{ - int errorBase, eventBase; - - __glutDisplay = XOpenDisplay(display); - if (!__glutDisplay) - __glutFatalError("could not open display: %s", - XDisplayName(display)); - if (synchronize) - XSynchronize(__glutDisplay, True); - if (!glXQueryExtension(__glutDisplay, &errorBase, &eventBase)) - __glutFatalError( - "OpenGL GLX extension not supported by display: %s", - XDisplayName(display)); - __glutScreen = DefaultScreen(__glutDisplay); - __glutRoot = RootWindow(__glutDisplay, __glutScreen); - __glutScreenWidth = DisplayWidth(__glutDisplay, __glutScreen); - __glutScreenHeight = DisplayHeight(__glutDisplay, - __glutScreen); - __glutConnectionFD = ConnectionNumber(__glutDisplay); - __glutWMDeleteWindow = XSGIFastInternAtom(__glutDisplay, - "WM_DELETE_WINDOW", SGI_XA_WM_DELETE_WINDOW, False); -} -#endif /* _WIN32 */ - -void -#ifdef OLD_VMS - __glutInitTime(struct timeval6 *beginning) -#else - __glutInitTime(struct timeval *beginning) -#endif -{ - static int beenhere = 0; -#ifdef OLD_VMS - static struct timeval6 genesis; -#else - static struct timeval genesis; -#endif - - if (!beenhere) { - GETTIMEOFDAY(&genesis); - beenhere = 1; - } - *beginning = genesis; -} - -static void -removeArgs(int *argcp, char **argv, int numToRemove) -{ - int i, j; - - for (i = 0, j = numToRemove; argv[j]; i++, j++) { - argv[i] = argv[j]; - } - argv[i] = NULL; - *argcp -= numToRemove; -} - -void GLUTAPIENTRY -glutInit(int *argcp, char **argv) -{ - char *display = NULL; - char *str, *geometry = NULL; -#ifdef OLD_VMS - struct timeval6 unused; -#else - struct timeval unused; -#endif - int i; - - if (__glutDisplay) { - __glutWarning("glutInit being called a second time."); - return; - } - /* Determine temporary program name. */ - str = strrchr(argv[0], '/'); - if (str == NULL) { - __glutProgramName = argv[0]; - } else { - __glutProgramName = str + 1; - } - - /* Make private copy of command line arguments. */ - __glutArgc = *argcp; - __glutArgv = (char **) malloc(__glutArgc * sizeof(char *)); - if (!__glutArgv) - __glutFatalError("out of memory."); - for (i = 0; i < __glutArgc; i++) { - __glutArgv[i] = __glutStrdup(argv[i]); - if (!__glutArgv[i]) - __glutFatalError("out of memory."); - } - - /* determine permanent program name */ - str = strrchr(__glutArgv[0], '/'); - if (str == NULL) { - __glutProgramName = __glutArgv[0]; - } else { - __glutProgramName = str + 1; - } - - /* parse arguments for standard options */ - for (i = 1; i < __glutArgc; i++) { - if (!strcmp(__glutArgv[i], "-display")) { -#if defined(_WIN32) - __glutWarning("-display option not supported by Win32 GLUT."); -#endif - if (++i >= __glutArgc) { - __glutFatalError( - "follow -display option with X display name."); - } - display = __glutArgv[i]; - removeArgs(argcp, &argv[1], 2); - } else if (!strcmp(__glutArgv[i], "-geometry")) { - if (++i >= __glutArgc) { - __glutFatalError( - "follow -geometry option with geometry parameter."); - } - geometry = __glutArgv[i]; - removeArgs(argcp, &argv[1], 2); - } else if (!strcmp(__glutArgv[i], "-direct")) { -#if defined(_WIN32) - __glutWarning("-direct option not supported by Win32 GLUT."); -#endif - if (!__glutTryDirect) - __glutFatalError( - "cannot force both direct and indirect rendering."); - __glutForceDirect = GL_TRUE; - removeArgs(argcp, &argv[1], 1); - } else if (!strcmp(__glutArgv[i], "-indirect")) { -#if defined(_WIN32) - __glutWarning("-indirect option not supported by Win32 GLUT."); -#endif - if (__glutForceDirect) - __glutFatalError( - "cannot force both direct and indirect rendering."); - __glutTryDirect = GL_FALSE; - removeArgs(argcp, &argv[1], 1); - } else if (!strcmp(__glutArgv[i], "-iconic")) { - __glutIconic = GL_TRUE; - removeArgs(argcp, &argv[1], 1); - } else if (!strcmp(__glutArgv[i], "-gldebug")) { - __glutDebug = GL_TRUE; - removeArgs(argcp, &argv[1], 1); - } else if (!strcmp(__glutArgv[i], "-sync")) { -#if defined(_WIN32) - __glutWarning("-sync option not supported by Win32 GLUT."); -#endif - synchronize = GL_TRUE; - removeArgs(argcp, &argv[1], 1); - } else { - /* Once unknown option encountered, stop command line - processing. */ - break; - } - } -#if defined(_WIN32) - __glutOpenWin32Connection(display); -#else - __glutOpenXConnection(display); -#endif - if (geometry) { - int flags, x, y, width, height; - - /* Fix bogus "{width|height} may be used before set" - warning */ - width = 0; - height = 0; - - flags = XParseGeometry(geometry, &x, &y, - (unsigned int *) &width, (unsigned int *) &height); - if (WidthValue & flags) { - /* Careful because X does not allow zero or negative - width windows */ - if (width > 0) - __glutInitWidth = width; - } - if (HeightValue & flags) { - /* Careful because X does not allow zero or negative - height windows */ - if (height > 0) - __glutInitHeight = height; - } - glutInitWindowSize(__glutInitWidth, __glutInitHeight); - if (XValue & flags) { - if (XNegative & flags) - x = DisplayWidth(__glutDisplay, __glutScreen) + - x - __glutSizeHints.width; - /* Play safe: reject negative X locations */ - if (x >= 0) - __glutInitX = x; - } - if (YValue & flags) { - if (YNegative & flags) - y = DisplayHeight(__glutDisplay, __glutScreen) + - y - __glutSizeHints.height; - /* Play safe: reject negative Y locations */ - if (y >= 0) - __glutInitY = y; - } - glutInitWindowPosition(__glutInitX, __glutInitY); - } - __glutInitTime(&unused); - - /* check if GLUT_FPS env var is set */ - { - const char *fps = getenv("GLUT_FPS"); - if (fps) { - sscanf(fps, "%d", &__glutFPS); - if (__glutFPS <= 0) - __glutFPS = 5000; /* 5000 milliseconds */ - } - } -} - -#ifdef _WIN32 -void GLUTAPIENTRY -__glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int)) -{ - __glutExitFunc = exitfunc; - glutInit(argcp, argv); -} -#endif - -/* CENTRY */ -void GLUTAPIENTRY -glutInitWindowPosition(int x, int y) -{ - __glutInitX = x; - __glutInitY = y; - if (x >= 0 && y >= 0) { - __glutSizeHints.x = x; - __glutSizeHints.y = y; - __glutSizeHints.flags |= USPosition; - } else { - __glutSizeHints.flags &= ~USPosition; - } -} - -void GLUTAPIENTRY -glutInitWindowSize(int width, int height) -{ - __glutInitWidth = width; - __glutInitHeight = height; - if (width > 0 && height > 0) { - __glutSizeHints.width = width; - __glutSizeHints.height = height; - __glutSizeHints.flags |= USSize; - } else { - __glutSizeHints.flags &= ~USSize; - } -} - -void GLUTAPIENTRY -glutInitDisplayMode(unsigned int mask) -{ - __glutDisplayMode = mask; -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_input.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_input.c deleted file mode 100644 index add3df7c3f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_input.c +++ /dev/null @@ -1,639 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#ifdef __VMS -#include -#endif - -#include -#include -#include -#include - -#if !defined(_WIN32) -#include -#if defined(__vms) -#include -#else -#include -#endif -#include -#else -#include -#ifndef __CYGWIN32__ -#include /* Win32 Multimedia API header. */ -#endif -#endif /* !_WIN32 */ - -#include "glutint.h" - -int __glutNumDials = 0; -int __glutNumSpaceballButtons = 0; -int __glutNumButtonBoxButtons = 0; -int __glutNumTabletButtons = 0; -int __glutNumMouseButtons = 3; /* Good guess. */ -XDevice *__glutTablet = NULL; -XDevice *__glutDials = NULL; -XDevice *__glutSpaceball = NULL; - -int __glutHasJoystick = 0; -int __glutNumJoystickButtons = 0; -int __glutNumJoystickAxes = 0; - -#if !defined(_WIN32) -typedef struct _Range { - int min; - int range; -} Range; - -#define NUM_SPACEBALL_AXIS 6 -#define NUM_TABLET_AXIS 2 -#define NUM_DIALS_AXIS 8 - -Range __glutSpaceballRange[NUM_SPACEBALL_AXIS]; -Range __glutTabletRange[NUM_TABLET_AXIS]; -int *__glutDialsResolution; - -/* Safely assumes 0 is an illegal event type for X Input - extension events. */ -int __glutDeviceMotionNotify = 0; -int __glutDeviceButtonPress = 0; -int __glutDeviceButtonPressGrab = 0; -int __glutDeviceButtonRelease = 0; -int __glutDeviceStateNotify = 0; - -static int -normalizeTabletPos(int axis, int rawValue) -{ - assert(rawValue >= __glutTabletRange[axis].min); - assert(rawValue <= __glutTabletRange[axis].min - + __glutTabletRange[axis].range); - /* Normalize rawValue to between 0 and 4000. */ - return ((rawValue - __glutTabletRange[axis].min) * 4000) / - __glutTabletRange[axis].range; -} - -static int -normalizeDialAngle(int axis, int rawValue) -{ - /* XXX Assumption made that the resolution of the device is - number of clicks for one complete dial revolution. This - is true for SGI's dial & button box. */ - return (rawValue * 360.0) / __glutDialsResolution[axis]; -} - -static int -normalizeSpaceballAngle(int axis, int rawValue) -{ - assert(rawValue >= __glutSpaceballRange[axis].min); - assert(rawValue <= __glutSpaceballRange[axis].min + - __glutSpaceballRange[axis].range); - /* Normalize rawValue to between -1800 and 1800. */ - return ((rawValue - __glutSpaceballRange[axis].min) * 3600) / - __glutSpaceballRange[axis].range - 1800; -} - -static int -normalizeSpaceballDelta(int axis, int rawValue) -{ - assert(rawValue >= __glutSpaceballRange[axis].min); - assert(rawValue <= __glutSpaceballRange[axis].min + - __glutSpaceballRange[axis].range); - /* Normalize rawValue to between -1000 and 1000. */ - return ((rawValue - __glutSpaceballRange[axis].min) * 2000) / - __glutSpaceballRange[axis].range - 1000; -} - -static void -queryTabletPos(GLUTwindow * window) -{ - XDeviceState *state; - XInputClass *any; - XValuatorState *v; - int i; - - state = XQueryDeviceState(__glutDisplay, __glutTablet); - any = state->data; - for (i = 0; i < state->num_classes; i++) { -#if defined(__cplusplus) || defined(c_plusplus) - switch (any->c_class) { -#else - switch (any->class) { -#endif - case ValuatorClass: - v = (XValuatorState *) any; - if (v->num_valuators < 2) - goto end; - if (window->tabletPos[0] == -1) - window->tabletPos[0] = normalizeTabletPos(0, v->valuators[0]); - if (window->tabletPos[1] == -1) - window->tabletPos[1] = normalizeTabletPos(1, v->valuators[1]); - } - any = (XInputClass *) ((char *) any + any->length); - } -end: - XFreeDeviceState(state); -} - -static void -tabletPosChange(GLUTwindow * window, int first, int count, int *data) -{ - int i, value, genEvent = 0; - - for (i = first; i < first + count; i++) { - switch (i) { - case 0: /* X axis */ - case 1: /* Y axis */ - value = normalizeTabletPos(i, data[i - first]); - if (value != window->tabletPos[i]) { - window->tabletPos[i] = value; - genEvent = 1; - } - break; - } - } - if (window->tabletPos[0] == -1 || window->tabletPos[1] == -1) - queryTabletPos(window); - if (genEvent) - window->tabletMotion(window->tabletPos[0], window->tabletPos[1]); -} -#endif /* !_WIN32 */ - -static int -__glutProcessDeviceEvents(XEvent * event) -{ -#if !defined(_WIN32) - GLUTwindow *window; - - /* XXX Ugly code fan out. */ - - /* Can't use switch/case since X Input event types are - dynamic. */ - - if (__glutDeviceMotionNotify && event->type == __glutDeviceMotionNotify) { - XDeviceMotionEvent *devmot = (XDeviceMotionEvent *) event; - - window = __glutGetWindow(devmot->window); - if (window) { - if (__glutTablet - && devmot->deviceid == __glutTablet->device_id - && window->tabletMotion) { - tabletPosChange(window, devmot->first_axis, devmot->axes_count, - devmot->axis_data); - } else if (__glutDials - && devmot->deviceid == __glutDials->device_id - && window->dials) { - int i, first = devmot->first_axis, count = devmot->axes_count; - - for (i = first; i < first + count; i++) - window->dials(i + 1, - normalizeDialAngle(i, devmot->axis_data[i - first])); - } else if (__glutSpaceball - && devmot->deviceid == __glutSpaceball->device_id) { - /* XXX Assume that space ball motion events come in as - all the first 6 axes. Assume first 3 axes are XYZ - translations; second 3 axes are XYZ rotations. */ - if (devmot->first_axis == 0 && devmot->axes_count == 6) { - if (window->spaceMotion) - window->spaceMotion( - normalizeSpaceballDelta(0, devmot->axis_data[0]), - normalizeSpaceballDelta(1, devmot->axis_data[1]), - normalizeSpaceballDelta(2, devmot->axis_data[2])); - if (window->spaceRotate) - window->spaceRotate( - normalizeSpaceballAngle(3, devmot->axis_data[3]), - normalizeSpaceballAngle(4, devmot->axis_data[4]), - normalizeSpaceballAngle(5, devmot->axis_data[5])); - } - } - return 1; - } - } else if (__glutDeviceButtonPress - && event->type == __glutDeviceButtonPress) { - XDeviceButtonEvent *devbtn = (XDeviceButtonEvent *) event; - - window = __glutGetWindow(devbtn->window); - if (window) { - if (__glutTablet - && devbtn->deviceid == __glutTablet->device_id - && window->tabletButton - && devbtn->first_axis == 0 - && devbtn->axes_count == 2) { - tabletPosChange(window, devbtn->first_axis, devbtn->axes_count, - devbtn->axis_data); - window->tabletButton(devbtn->button, GLUT_DOWN, - window->tabletPos[0], window->tabletPos[1]); - } else if (__glutDials - && devbtn->deviceid == __glutDials->device_id - && window->buttonBox) { - window->buttonBox(devbtn->button, GLUT_DOWN); - } else if (__glutSpaceball - && devbtn->deviceid == __glutSpaceball->device_id - && window->spaceButton) { - window->spaceButton(devbtn->button, GLUT_DOWN); - } - return 1; - } - } else if (__glutDeviceButtonRelease - && event->type == __glutDeviceButtonRelease) { - XDeviceButtonEvent *devbtn = (XDeviceButtonEvent *) event; - - window = __glutGetWindow(devbtn->window); - if (window) { - if (__glutTablet - && devbtn->deviceid == __glutTablet->device_id - && window->tabletButton - && devbtn->first_axis == 0 - && devbtn->axes_count == 2) { - tabletPosChange(window, devbtn->first_axis, devbtn->axes_count, - devbtn->axis_data); - window->tabletButton(devbtn->button, GLUT_UP, - window->tabletPos[0], window->tabletPos[1]); - } else if (__glutDials - && devbtn->deviceid == __glutDials->device_id - && window->buttonBox) { - window->buttonBox(devbtn->button, GLUT_UP); - } else if (__glutSpaceball - && devbtn->deviceid == __glutSpaceball->device_id - && window->spaceButton) { - window->spaceButton(devbtn->button, GLUT_UP); - } - return 1; - } - } -#else - { - JOYINFOEX info; - JOYCAPS joyCaps; - - memset(&info, 0, sizeof(JOYINFOEX)); - info.dwSize = sizeof(JOYINFOEX); - info.dwFlags = JOY_RETURNALL; - - if (joyGetPosEx(JOYSTICKID1,&info) != JOYERR_NOERROR) { - __glutHasJoystick = 1; - joyGetDevCaps(JOYSTICKID1, &joyCaps, sizeof(joyCaps)); - __glutNumJoystickButtons = joyCaps.wNumButtons; - __glutNumJoystickAxes = joyCaps.wNumAxes; - } else { - __glutHasJoystick = 0; - __glutNumJoystickButtons = 0; - __glutNumJoystickAxes = 0; - } - } -#endif /* !_WIN32 */ - return 0; -} - -static GLUTeventParser eventParser = -{__glutProcessDeviceEvents, NULL}; - -static void -addDeviceEventParser(void) -{ - static Bool been_here = False; - - if (been_here) - return; - been_here = True; - __glutRegisterEventParser(&eventParser); -} - -static int -probeDevices(void) -{ - static Bool been_here = False; - static int support; -#if !defined(_WIN32) - XExtensionVersion *version; - XDeviceInfoPtr device_info, device; - XAnyClassPtr any; - XButtonInfoPtr b; - XValuatorInfoPtr v; - XAxisInfoPtr a; - int num_dev = 0, btns = 0, dials = 0; - int i, j, k; -#endif /* !_WIN32 */ - - if (been_here) { - return support; - } - been_here = True; - -#if !defined(_WIN32) - version = XGetExtensionVersion(__glutDisplay, "XInputExtension"); - /* Ugh. XInput extension API forces annoying cast of a pointer - to a long so it can be compared with the NoSuchExtension - value (#defined to 1). */ - if (version == NULL || ((long) version) == NoSuchExtension) { - support = 0; - return support; - } - XFree(version); - device_info = XListInputDevices(__glutDisplay, &num_dev); - if (device_info) { - for (i = 0; i < num_dev; i++) { - /* XXX These are SGI names for these devices; - unfortunately, no good standard exists for standard - types of X input extension devices. */ - - device = &device_info[i]; - any = (XAnyClassPtr) device->inputclassinfo; - - if (!__glutSpaceball && !strcmp(device->name, "spaceball")) { - v = NULL; - b = NULL; - for (j = 0; j < device->num_classes; j++) { -#if defined(__cplusplus) || defined(c_plusplus) - switch (any->c_class) { -#else - switch (any->class) { -#endif - case ButtonClass: - b = (XButtonInfoPtr) any; - btns = b->num_buttons; - break; - case ValuatorClass: - v = (XValuatorInfoPtr) any; - /* Sanity check: at least 6 valuators? */ - if (v->num_axes < NUM_SPACEBALL_AXIS) - goto skip_device; - a = (XAxisInfoPtr) ((char *) v + sizeof(XValuatorInfo)); - for (k = 0; k < NUM_SPACEBALL_AXIS; k++, a++) { - __glutSpaceballRange[k].min = a->min_value; - __glutSpaceballRange[k].range = a->max_value - a->min_value; - } - break; - } - any = (XAnyClassPtr) ((char *) any + any->length); - } - if (v) { - __glutSpaceball = XOpenDevice(__glutDisplay, device->id); - if (__glutSpaceball) { - __glutNumSpaceballButtons = btns; - addDeviceEventParser(); - } - } - } else if (!__glutDials && !strcmp(device->name, "dial+buttons")) { - v = NULL; - b = NULL; - for (j = 0; j < device->num_classes; j++) { -#if defined(__cplusplus) || defined(c_plusplus) - switch (any->c_class) { -#else - switch (any->class) { -#endif - case ButtonClass: - b = (XButtonInfoPtr) any; - btns = b->num_buttons; - break; - case ValuatorClass: - v = (XValuatorInfoPtr) any; - /* Sanity check: at least 8 valuators? */ - if (v->num_axes < NUM_DIALS_AXIS) - goto skip_device; - dials = v->num_axes; - __glutDialsResolution = (int *) malloc(sizeof(int) * dials); - a = (XAxisInfoPtr) ((char *) v + sizeof(XValuatorInfo)); - for (k = 0; k < dials; k++, a++) { - __glutDialsResolution[k] = a->resolution; - } - break; - } - any = (XAnyClassPtr) ((char *) any + any->length); - } - if (v) { - __glutDials = XOpenDevice(__glutDisplay, device->id); - if (__glutDials) { - __glutNumButtonBoxButtons = btns; - __glutNumDials = dials; - addDeviceEventParser(); - } - } - } else if (!__glutTablet && !strcmp(device->name, "tablet")) { - v = NULL; - b = NULL; - for (j = 0; j < device->num_classes; j++) { -#if defined(__cplusplus) || defined(c_plusplus) - switch (any->c_class) { -#else - switch (any->class) { -#endif - case ButtonClass: - b = (XButtonInfoPtr) any; - btns = b->num_buttons; - break; - case ValuatorClass: - v = (XValuatorInfoPtr) any; - /* Sanity check: exactly 2 valuators? */ - if (v->num_axes != NUM_TABLET_AXIS) - goto skip_device; - a = (XAxisInfoPtr) ((char *) v + sizeof(XValuatorInfo)); - for (k = 0; k < NUM_TABLET_AXIS; k++, a++) { - __glutTabletRange[k].min = a->min_value; - __glutTabletRange[k].range = a->max_value - a->min_value; - } - break; - } - any = (XAnyClassPtr) ((char *) any + any->length); - } - if (v) { - __glutTablet = XOpenDevice(__glutDisplay, device->id); - if (__glutTablet) { - __glutNumTabletButtons = btns; - addDeviceEventParser(); - } - } - } else if (!strcmp(device->name, "mouse")) { - for (j = 0; j < device->num_classes; j++) { -#if defined(__cplusplus) || defined(c_plusplus) - if (any->c_class == ButtonClass) { -#else - if (any->class == ButtonClass) { -#endif - b = (XButtonInfoPtr) any; - __glutNumMouseButtons = b->num_buttons; - } - any = (XAnyClassPtr) ((char *) any + any->length); - } - } - skip_device:; - } - XFreeDeviceList(device_info); - } -#else /* _WIN32 */ - __glutNumMouseButtons = GetSystemMetrics(SM_CMOUSEBUTTONS); -#endif /* !_WIN32 */ - /* X Input extension might be supported, but only if there is - a tablet, dials, or spaceball do we claim devices are - supported. */ - support = __glutTablet || __glutDials || __glutSpaceball; - return support; -} - -void -__glutUpdateInputDeviceMask(GLUTwindow * window) -{ -#if !defined(_WIN32) - /* 5 (dial and buttons) + 5 (tablet locator and buttons) + 5 - (Spaceball buttons and axis) = 15 */ - XEventClass eventList[15]; - int rc, numEvents; - - rc = probeDevices(); - if (rc) { - numEvents = 0; - if (__glutTablet) { - if (window->tabletMotion) { - DeviceMotionNotify(__glutTablet, __glutDeviceMotionNotify, - eventList[numEvents]); - numEvents++; - } - if (window->tabletButton) { - DeviceButtonPress(__glutTablet, __glutDeviceButtonPress, - eventList[numEvents]); - numEvents++; - DeviceButtonPressGrab(__glutTablet, __glutDeviceButtonPressGrab, - eventList[numEvents]); - numEvents++; - DeviceButtonRelease(__glutTablet, __glutDeviceButtonRelease, - eventList[numEvents]); - numEvents++; - } - if (window->tabletMotion || window->tabletButton) { - DeviceStateNotify(__glutTablet, __glutDeviceStateNotify, - eventList[numEvents]); - numEvents++; - } - } - if (__glutDials) { - if (window->dials) { - DeviceMotionNotify(__glutDials, __glutDeviceMotionNotify, - eventList[numEvents]); - numEvents++; - } - if (window->buttonBox) { - DeviceButtonPress(__glutDials, __glutDeviceButtonPress, - eventList[numEvents]); - numEvents++; - DeviceButtonPressGrab(__glutDials, __glutDeviceButtonPressGrab, - eventList[numEvents]); - numEvents++; - DeviceButtonRelease(__glutDials, __glutDeviceButtonRelease, - eventList[numEvents]); - numEvents++; - } - if (window->dials || window->buttonBox) { - DeviceStateNotify(__glutDials, __glutDeviceStateNotify, - eventList[numEvents]); - numEvents++; - } - } - if (__glutSpaceball) { - if (window->spaceMotion || window->spaceRotate) { - DeviceMotionNotify(__glutSpaceball, __glutDeviceMotionNotify, - eventList[numEvents]); - numEvents++; - } - if (window->spaceButton) { - DeviceButtonPress(__glutSpaceball, __glutDeviceButtonPress, - eventList[numEvents]); - numEvents++; - DeviceButtonPressGrab(__glutSpaceball, __glutDeviceButtonPressGrab, - eventList[numEvents]); - numEvents++; - DeviceButtonRelease(__glutSpaceball, __glutDeviceButtonRelease, - eventList[numEvents]); - numEvents++; - } - if (window->spaceMotion || window->spaceRotate || window->spaceButton) { - DeviceStateNotify(__glutSpaceball, __glutDeviceStateNotify, - eventList[numEvents]); - numEvents++; - } - } -#if 0 - if (window->children) { - GLUTwindow *child = window->children; - - do { - XChangeDeviceDontPropagateList(__glutDisplay, child->win, - numEvents, eventList, AddToList); - child = child->siblings; - } while (child); - } -#endif - XSelectExtensionEvent(__glutDisplay, window->win, - eventList, numEvents); - if (window->overlay) { - XSelectExtensionEvent(__glutDisplay, window->overlay->win, - eventList, numEvents); - } - } else { - /* X Input extension not supported; no chance for exotic - input devices. */ - } -#endif /* !_WIN32 */ -} - -/* CENTRY */ -int GLUTAPIENTRY -glutDeviceGet(GLenum param) -{ - probeDevices(); - switch (param) { - case GLUT_HAS_KEYBOARD: - case GLUT_HAS_MOUSE: - /* Assume window system always has mouse and keyboard. */ - return 1; - case GLUT_HAS_SPACEBALL: - return __glutSpaceball != NULL; - case GLUT_HAS_DIAL_AND_BUTTON_BOX: - return __glutDials != NULL; - case GLUT_HAS_TABLET: - return __glutTablet != NULL; - case GLUT_NUM_MOUSE_BUTTONS: - return __glutNumMouseButtons; - case GLUT_NUM_SPACEBALL_BUTTONS: - return __glutNumSpaceballButtons; - case GLUT_NUM_BUTTON_BOX_BUTTONS: - return __glutNumButtonBoxButtons; - case GLUT_NUM_DIALS: - return __glutNumDials; - case GLUT_NUM_TABLET_BUTTONS: - return __glutNumTabletButtons; - case GLUT_DEVICE_IGNORE_KEY_REPEAT: - return __glutCurrentWindow->ignoreKeyRepeat; -#ifndef _WIN32 - case GLUT_DEVICE_KEY_REPEAT: - { - XKeyboardState state; - - XGetKeyboardControl(__glutDisplay, &state); - return state.global_auto_repeat; - } - case GLUT_JOYSTICK_POLL_RATE: - return 0; -#else - case GLUT_DEVICE_KEY_REPEAT: - /* Win32 cannot globally disable key repeat. */ - return GLUT_KEY_REPEAT_ON; - case GLUT_JOYSTICK_POLL_RATE: - return __glutCurrentWindow->joyPollInterval; -#endif - case GLUT_HAS_JOYSTICK: - return __glutHasJoystick; - case GLUT_JOYSTICK_BUTTONS: - return __glutNumJoystickButtons; - case GLUT_JOYSTICK_AXES: - return __glutNumJoystickAxes; - default: - __glutWarning("invalid glutDeviceGet parameter: %d", param); - return -1; - } -} -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_joy.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_joy.c deleted file mode 100644 index a4528ae1ce..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_joy.c +++ /dev/null @@ -1,82 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1997, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#ifdef _WIN32 -#include -#ifndef __CYGWIN32__ -#include /* Win32 Multimedia API header. */ -#endif -#endif - -#include "glutint.h" - -/* CENTRY */ -void GLUTAPIENTRY -glutJoystickFunc(GLUTjoystickCB joystickFunc, int pollInterval) -{ -#ifdef _WIN32 - if (joystickFunc && (pollInterval > 0)) { - if (__glutCurrentWindow->entryState == WM_SETFOCUS) { - MMRESULT result; - - /* Capture joystick focus if current window has - focus now. */ - result = joySetCapture(__glutCurrentWindow->win, - JOYSTICKID1, 0, TRUE); - if (result == JOYERR_NOERROR) { - (void) joySetThreshold(JOYSTICKID1, pollInterval); - } - } - __glutCurrentWindow->joyPollInterval = pollInterval; - } else { - /* Release joystick focus if current window has - focus now. */ - if (__glutCurrentWindow->joystick - && (__glutCurrentWindow->joyPollInterval > 0) - && (__glutCurrentWindow->entryState == WM_SETFOCUS)) { - (void) joyReleaseCapture(JOYSTICKID1); - } - __glutCurrentWindow->joyPollInterval = 0; - } - __glutCurrentWindow->joystick = joystickFunc; -#else - /* XXX No support currently for X11 joysticks. */ -#endif -} - -void GLUTAPIENTRY -glutForceJoystickFunc(void) -{ -#ifdef _WIN32 - if (__glutCurrentWindow->joystick) { - JOYINFOEX jix; - MMRESULT res; - int x, y, z; - - /* Poll the joystick. */ - jix.dwSize = sizeof(jix); - jix.dwFlags = JOY_RETURNALL; - res = joyGetPosEx(JOYSTICKID1,&jix); - if (res == JOYERR_NOERROR) { - - /* Convert to int for scaling. */ - x = jix.dwXpos; - y = jix.dwYpos; - z = jix.dwZpos; - -#define SCALE(v) ((int) ((v - 32767)/32.768)) - - __glutCurrentWindow->joystick(jix.dwButtons, - SCALE(x), SCALE(y), SCALE(z)); - } - } -#else - /* XXX No support currently for X11 joysticks. */ -#endif -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_key.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_key.c deleted file mode 100644 index 3e1f7e52c1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_key.c +++ /dev/null @@ -1,29 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include - -#include "glutint.h" - -/* CENTRY */ -void GLUTAPIENTRY -glutKeyboardFunc(GLUTkeyboardCB keyboardFunc) -{ - __glutChangeWindowEventMask(KeyPressMask, - keyboardFunc != NULL || __glutCurrentWindow->special != NULL); - __glutCurrentWindow->keyboard = keyboardFunc; -} - -void GLUTAPIENTRY -glutSpecialFunc(GLUTspecialCB specialFunc) -{ - __glutChangeWindowEventMask(KeyPressMask, - specialFunc != NULL || __glutCurrentWindow->keyboard != NULL); - __glutCurrentWindow->special = specialFunc; -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_keyctrl.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_keyctrl.c deleted file mode 100644 index c76912e100..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_keyctrl.c +++ /dev/null @@ -1,29 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1996, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" - -/* CENTRY */ -void GLUTAPIENTRY -glutIgnoreKeyRepeat(int ignore) -{ - __glutCurrentWindow->ignoreKeyRepeat = ignore; -} - -void GLUTAPIENTRY -glutSetKeyRepeat(int repeatMode) -{ -#if !defined(_WIN32) - XKeyboardControl values; - - /* GLUT's repeatMode #define's match the Xlib API values. */ - values.auto_repeat_mode = repeatMode; - XChangeKeyboardControl(__glutDisplay, KBAutoRepeatMode, &values); -#endif -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_keyup.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_keyup.c deleted file mode 100644 index ae97b2f967..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_keyup.c +++ /dev/null @@ -1,29 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include - -#include "glutint.h" - -/* CENTRY */ -void GLUTAPIENTRY -glutKeyboardUpFunc(GLUTkeyboardCB keyboardUpFunc) -{ - __glutChangeWindowEventMask(KeyReleaseMask, - keyboardUpFunc != NULL || __glutCurrentWindow->specialUp != NULL); - __glutCurrentWindow->keyboardUp = keyboardUpFunc; -} - -void GLUTAPIENTRY -glutSpecialUpFunc(GLUTspecialCB specialUpFunc) -{ - __glutChangeWindowEventMask(KeyReleaseMask, - specialUpFunc != NULL || __glutCurrentWindow->keyboardUp != NULL); - __glutCurrentWindow->specialUp = specialUpFunc; -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_menu.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_menu.c deleted file mode 100644 index 4e2cac2795..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_menu.c +++ /dev/null @@ -1,1014 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -/* The Win32 GLUT file win32_menu.c completely re-implements all - the menuing functionality implemented. This file is used only by - the X Window System version of GLUT. */ - -#ifdef __VMS -#include -#endif - -#include -#include -#include -#include -#include - -#include -#include -#include /* for XC_arrow */ - -#include "glutint.h" -#include "layerutil.h" - -void (CDECL *__glutMenuStatusFunc) (int, int, int); -GLUTmenuItem *__glutItemSelected; -GLUTmenu **__glutMenuList = NULL; - -static int menuListSize = 0; -static XFontStruct *menuFont = NULL; -static Cursor menuCursor; -static Colormap menuColormap; -static Visual *menuVisual; -static int menuDepth; -static int fontHeight; -static GC blackGC, grayGC, whiteGC; -static unsigned long menuBlack, menuWhite, menuGray; -static unsigned long useSaveUnders; - -/* A replacement for XAllocColor (originally by Brian Paul). - This function should never fail to allocate a color. When - XAllocColor fails, we return the nearest matching color. If - we have to allocate many colors this function isn't a great - solution; the XQueryColors() could be done just once. */ -static void -noFaultXAllocColor(Display * dpy, Colormap cmap, int cmapSize, - XColor * color) -{ - XColor *ctable, subColor; - int i, bestmatch; - double mindist; /* 3*2^16^2 exceeds 32-bit long int - precision. */ - - for (;;) { - /* First try just using XAllocColor. */ - if (XAllocColor(dpy, cmap, color)) { - return; - } - - /* Retrieve color table entries. */ - /* XXX alloca canidate. */ - ctable = (XColor *) malloc(cmapSize * sizeof(XColor)); - for (i = 0; i < cmapSize; i++) - ctable[i].pixel = i; - XQueryColors(dpy, cmap, ctable, cmapSize); - - /* Find best match. */ - bestmatch = -1; - mindist = 0.0; - for (i = 0; i < cmapSize; i++) { - double dr = (double) color->red - (double) ctable[i].red; - double dg = (double) color->green - (double) ctable[i].green; - double db = (double) color->blue - (double) ctable[i].blue; - double dist = dr * dr + dg * dg + db * db; - if (bestmatch < 0 || dist < mindist) { - bestmatch = i; - mindist = dist; - } - } - - /* Return result. */ - subColor.red = ctable[bestmatch].red; - subColor.green = ctable[bestmatch].green; - subColor.blue = ctable[bestmatch].blue; - free(ctable); - if (XAllocColor(dpy, cmap, &subColor)) { - *color = subColor; - return; - } - /* Extremely unlikely, but possibly color was deallocated - and reallocated by someone else before we could - XAllocColor the color cell we located. If so, loop - again... */ - } -} - -static int -ifSunCreator(void) -{ - char *xvendor, *glvendor, *renderer; - int isSunCreator = 0; /* Until proven that it is. */ - int savedDisplayMode = 0; - char *savedDisplayString = 0; - GLUTwindow *window; - -#define VENDOR_SUN "Sun Microsystems" -#define RENDERER_CREATOR "Creator" - - /* Check the X vendor string first. It is easier to check - than the OpenGL vendor and renderer strings since it - doesn't require a valid OpenGL rendering context. Bail - early if not connected to a Sun. */ - xvendor = ServerVendor(__glutDisplay); - if (!strncmp(xvendor, VENDOR_SUN, sizeof(VENDOR_SUN) - 1)) { - - /* We need a valid current OpenGL rendering context to be - able to call glGetString successfully. If there is not - a current window, set up a temporary one just to call - glGetString with (gag, expensive). */ - if (__glutCurrentWindow) { - window = NULL; - } else { - savedDisplayMode = __glutDisplayMode; - savedDisplayString = __glutDisplayString; - __glutDisplayMode = GLUT_RGB | GLUT_SINGLE; - __glutDisplayString = NULL; - window = __glutCreateWindow(NULL, 0, 0, 1, 1, 0); - } - - glvendor = (char *) glGetString(GL_VENDOR); - if (!strncmp(glvendor, VENDOR_SUN, sizeof(VENDOR_SUN) - 1)) { - renderer = (char *) glGetString(GL_RENDERER); - if (!strncmp(renderer, RENDERER_CREATOR, sizeof(RENDERER_CREATOR) - 1)) { - isSunCreator = 1; - } - } - /* Destroy the temporary window for glGetString if one - needed to be created. */ - if (window) { - __glutDestroyWindow(window, window); - __glutDisplayMode = savedDisplayMode; - __glutDisplayString = savedDisplayString; - } - } - return isSunCreator; -} - -static void -menuVisualSetup(void) -{ - XLayerVisualInfo template, *visual, *overlayVisuals; - XColor color; - Status status; - Bool presumablyMesa; - int layer, nVisuals, i, dummy; - unsigned long *placeHolders = NULL; - int numPlaceHolders = 0; - Bool allocateHigh; - - allocateHigh = ifSunCreator(); - - /* Start with the highest overlay layer and work down. I - don't think any hardware has more than 3 overlay layers. */ - for (layer = 3; layer > 0; layer--) { - template.layer = layer; - template.vinfo.screen = __glutScreen; - overlayVisuals = __glutXGetLayerVisualInfo(__glutDisplay, - VisualScreenMask | VisualLayerMask, &template, &nVisuals); - if (overlayVisuals) { - /* First, check if the default visual is in this layer. - If the default visual is in this layer, we try to use - it since it has pre-defined black and white pixels and - - using the default visual will probably minimize - colormap flashing problems. Suggested by Thomas Roell - (thomas@xig.com). */ - for (i = 0; i < nVisuals; i++) { - visual = &overlayVisuals[i]; - if (visual->vinfo.colormap_size >= 3) { - /* Compare visual IDs just to be safe. */ - if (visual->vinfo.visual->visualid == DefaultVisual(__glutDisplay, __glutScreen)->visualid) { - /* Settle for default visual. */ - menuVisual = DefaultVisual(__glutDisplay, __glutScreen); - menuDepth = DefaultDepth(__glutDisplay, __glutScreen); - menuColormap = DefaultColormap(__glutDisplay, __glutScreen); - menuBlack = BlackPixel(__glutDisplay, __glutScreen); - menuWhite = WhitePixel(__glutDisplay, __glutScreen); - color.red = color.green = color.blue = 0xaa00; - noFaultXAllocColor(__glutDisplay, menuColormap, - menuVisual->map_entries, &color); - menuGray = color.pixel; - useSaveUnders = 0; - XFree(overlayVisuals); - return; - } - } - } - for (i = 0; i < nVisuals; i++) { - visual = &overlayVisuals[i]; - if (visual->vinfo.colormap_size >= 3) { - if (allocateHigh) { - /* For Sun's Creator graphics, try to force the - read-only colors to the high end of the colormap - by first allocating read-write place-holder cells - for all but the last three cells. This helps - avoid colormap flashing problems. */ - numPlaceHolders = visual->vinfo.colormap_size - 3; - if (numPlaceHolders > 0) { - placeHolders = (unsigned long *) - malloc(numPlaceHolders * sizeof(unsigned long)); - /* A malloc failure would be harmless. */ - } - } - menuColormap = XCreateColormap(__glutDisplay, __glutRoot, - visual->vinfo.visual, AllocNone); - if (placeHolders) { - /* Again for Sun's Creator graphics, do the actual - read-write place-holder cell allocation. */ - status = XAllocColorCells(__glutDisplay, menuColormap, False, 0, 0, - placeHolders, numPlaceHolders); - if (!status) { - XFreeColormap(__glutDisplay, menuColormap); - free(placeHolders); - continue; - } - } - /* Allocate overlay colormap cells in defined order: - gray, black, white to match the IRIS GL allocation - scheme. Increases likelihood of less overlay - colormap flashing. */ - /* XXX Nice if these 3 AllocColor's could be done in - one protocol round-trip. */ - color.red = color.green = color.blue = 0xaa00; - status = XAllocColor(__glutDisplay, - menuColormap, &color); - if (!status) { - XFreeColormap(__glutDisplay, menuColormap); - if (placeHolders) { - free(placeHolders); - } - continue; - } - menuGray = color.pixel; - color.red = color.green = color.blue = 0x0000; - status = XAllocColor(__glutDisplay, - menuColormap, &color); - if (!status) { - XFreeColormap(__glutDisplay, menuColormap); - if (placeHolders) { - free(placeHolders); - } - continue; - } - menuBlack = color.pixel; - color.red = color.green = color.blue = 0xffff; - status = XAllocColor(__glutDisplay, - menuColormap, &color); - if (!status) { - XFreeColormap(__glutDisplay, menuColormap); - if (placeHolders) { - free(placeHolders); - } - continue; - } - if (placeHolders) { - /* Now free the placeholder cells. */ - XFreeColors(__glutDisplay, menuColormap, - placeHolders, numPlaceHolders, 0); - free(placeHolders); - } - menuWhite = color.pixel; - menuVisual = visual->vinfo.visual; - menuDepth = visual->vinfo.depth; - /* If using overlays, do not request "save unders". */ - useSaveUnders = 0; - XFree(overlayVisuals); - return; - } - } - XFree(overlayVisuals); - } - } - /* Settle for default visual. */ - menuVisual = DefaultVisual(__glutDisplay, __glutScreen); - menuDepth = DefaultDepth(__glutDisplay, __glutScreen); - menuColormap = DefaultColormap(__glutDisplay, __glutScreen); - menuBlack = BlackPixel(__glutDisplay, __glutScreen); - menuWhite = WhitePixel(__glutDisplay, __glutScreen); - color.red = color.green = color.blue = 0xaa00; - noFaultXAllocColor(__glutDisplay, menuColormap, - menuVisual->map_entries, &color); - menuGray = color.pixel; - - /* When no overlays are supported, we would like to use X - "save unders" to avoid exposes to windows obscured by - pop-up menus. However, OpenGL's direct rendering support - means OpenGL interacts poorly with X backing store and - save unders. X servers do not (in implementation - practice) redirect OpenGL rendering destined to obscured - window regions into backing store. - - Implementation solutions exist for this problem, but they - are expensive and high-end OpenGL implementations - typically provide fast rendering and/or overlays to - obviate the problem associated of user interfaces (pop-up - menus) forcing redraws of complex normal plane scenes. - (See support for overlays pop-up menus above.) - - Mesa 3D, however, does not support direct rendering. - Overlays are often unavailable to Mesa, and Mesa is also - relatively slow. For these reasons, Mesa-rendering GLUT - programs can and should use X save unders. - - Look for the GLX extension. If _not_ supported, we are - presumably using Mesa so enable save unders. */ - - presumablyMesa = !XQueryExtension(__glutDisplay, "GLX", - &dummy, &dummy, &dummy); - - if (presumablyMesa) { - useSaveUnders = CWSaveUnder; - } else { - useSaveUnders = 0; - } -} - -static void -menuSetup(void) -{ - if (menuFont) { - /* MenuFont overload to indicate menu initalization. */ - return; - } - menuFont = XLoadQueryFont(__glutDisplay, - "-*-helvetica-bold-o-normal--14-*-*-*-p-*-iso8859-1"); - if (!menuFont) { - /* Try back up font. */ - menuFont = XLoadQueryFont(__glutDisplay, "fixed"); - } - if (!menuFont) { - __glutFatalError("could not load font."); - } - menuVisualSetup(); - fontHeight = menuFont->ascent + menuFont->descent; - menuCursor = XCreateFontCursor(__glutDisplay, XC_arrow); -} - -static void -menuGraphicsContextSetup(Window win) -{ - XGCValues gcvals; - - if (blackGC != None) { - return; - } - gcvals.font = menuFont->fid; - gcvals.foreground = menuBlack; - blackGC = XCreateGC(__glutDisplay, win, - GCFont | GCForeground, &gcvals); - gcvals.foreground = menuGray; - grayGC = XCreateGC(__glutDisplay, win, GCForeground, &gcvals); - gcvals.foreground = menuWhite; - whiteGC = XCreateGC(__glutDisplay, win, GCForeground, &gcvals); -} - -void -__glutSetMenu(GLUTmenu * menu) -{ - __glutCurrentMenu = menu; -} - -static void -unmapMenu(GLUTmenu * menu) -{ - if (menu->cascade) { - unmapMenu(menu->cascade); - menu->cascade = NULL; - } - menu->anchor = NULL; - menu->highlighted = NULL; - XUnmapWindow(__glutDisplay, menu->win); -} - -static void -finishMenu(Window win, int x, int y) -{ - Window dummy; - int rc; - - unmapMenu(__glutMappedMenu); - XUngrabPointer(__glutDisplay, CurrentTime); - - /* Popping up an overlay popup menu will install its own - colormap. If the window associated with the menu has an - overlay, install that window's overlay colormap so the - overlay isn't left using the popup menu's colormap. */ - if (__glutMenuWindow->overlay) { - XInstallColormap(__glutDisplay, - __glutMenuWindow->overlay->colormap->cmap); - } - - /* This XFlush is needed to to make sure the pointer is - really ungrabbed when the application's menu callback is - called. Otherwise, a deadlock might happen because the - application may try to read from an terminal window, but - yet the ungrab hasn't really happened since it hasn't been - flushed out. */ - XFlush(__glutDisplay); - - if (__glutMenuStatusFunc) { - if (win != __glutMenuWindow->win) { - /* The button release may have occurred in a window other - than the window requesting the pop-up menu (for - example, one of the submenu windows). In this case, we - need to translate the coordinates into the coordinate - system of the window associated with the window. */ - rc = XTranslateCoordinates(__glutDisplay, win, __glutMenuWindow->win, - x, y, &x, &y, &dummy); - assert(rc != False); /* Will always be on same screen. */ - } - __glutSetWindow(__glutMenuWindow); - __glutSetMenu(__glutMappedMenu); - - /* Setting __glutMappedMenu to NULL permits operations that - change menus or destroy the menu window again. */ - __glutMappedMenu = NULL; - - __glutMenuStatusFunc(GLUT_MENU_NOT_IN_USE, x, y); - } - /* Setting __glutMappedMenu to NULL permits operations that - change menus or destroy the menu window again. */ - __glutMappedMenu = NULL; - - /* If an item is selected and it is not a submenu trigger, - generate menu callback. */ - if (__glutItemSelected && !__glutItemSelected->isTrigger) { - __glutSetWindow(__glutMenuWindow); - /* When menu callback is triggered, current menu should be - set to the callback menu. */ - __glutSetMenu(__glutItemSelected->menu); - __glutItemSelected->menu->select( - __glutItemSelected->value); - } - __glutMenuWindow = NULL; -} - -#define MENU_BORDER 1 -#define MENU_GAP 2 -#define MENU_ARROW_GAP 6 -#define MENU_ARROW_WIDTH 8 - -static void -mapMenu(GLUTmenu * menu, int x, int y) -{ - XWindowChanges changes; - unsigned int mask; - int subMenuExtension, num; - - /* If there are submenus, we need to provide extra space for - the submenu pull arrow. */ - if (menu->submenus > 0) { - subMenuExtension = MENU_ARROW_GAP + MENU_ARROW_WIDTH; - } else { - subMenuExtension = 0; - } - - changes.stack_mode = Above; - mask = CWStackMode | CWX | CWY; - /* If the menu isn't managed (ie, validated so all the - InputOnly subwindows are the right size), do so. */ - if (!menu->managed) { - GLUTmenuItem *item; - - item = menu->list; - num = menu->num; - while (item) { - XWindowChanges itemupdate; - - itemupdate.y = (num - 1) * fontHeight + MENU_GAP; - itemupdate.width = menu->pixwidth; - itemupdate.width += subMenuExtension; - XConfigureWindow(__glutDisplay, item->win, - CWWidth | CWY, &itemupdate); - item = item->next; - num--; - } - menu->pixheight = MENU_GAP + - fontHeight * menu->num + MENU_GAP; - changes.height = menu->pixheight; - changes.width = MENU_GAP + - menu->pixwidth + subMenuExtension + MENU_GAP; - mask |= CWWidth | CWHeight; - menu->managed = True; - } - /* Make sure menu appears fully on screen. */ - if (y + menu->pixheight >= __glutScreenHeight) { - changes.y = __glutScreenHeight - menu->pixheight; - } else { - changes.y = y; - } - if (x + menu->pixwidth + subMenuExtension >= - __glutScreenWidth) { - changes.x = __glutScreenWidth - - menu->pixwidth + subMenuExtension; - } else { - changes.x = x; - } - - /* Rember where the menu is placed so submenus can be - properly placed relative to it. */ - menu->x = changes.x; - menu->y = changes.y; - - XConfigureWindow(__glutDisplay, menu->win, mask, &changes); - XInstallColormap(__glutDisplay, menuColormap); - /* XXX The XRaiseWindow below should not be necessary because - the XConfigureWindow requests an Above stack mode (same as - XRaiseWindow), but some Sun users complained this was still - necessary. Probably some window manager or X server bug on - these machines?? */ - XRaiseWindow(__glutDisplay, menu->win); - XMapWindow(__glutDisplay, menu->win); -} - -static void -startMenu(GLUTmenu * menu, GLUTwindow * window, - int x, int y, int x_win, int y_win) -{ - int grab; - - assert(__glutMappedMenu == NULL); - grab = XGrabPointer(__glutDisplay, __glutRoot, True, - ButtonPressMask | ButtonReleaseMask, - GrabModeAsync, GrabModeAsync, - __glutRoot, menuCursor, CurrentTime); - if (grab != GrabSuccess) { - /* Somebody else has pointer grabbed, ignore menu - activation. */ - return; - } - __glutMappedMenu = menu; - __glutMenuWindow = window; - __glutItemSelected = NULL; - if (__glutMenuStatusFunc) { - __glutSetMenu(menu); - __glutSetWindow(window); - __glutMenuStatusFunc(GLUT_MENU_IN_USE, x_win, y_win); - } - mapMenu(menu, x, y); -} - -static void -paintSubMenuArrow(Window win, int x, int y) -{ - XPoint p[5]; - - p[0].x = p[4].x = x; - p[0].y = p[4].y = y - menuFont->ascent + 1; - p[1].x = p[0].x + MENU_ARROW_WIDTH - 1; - p[1].y = p[0].y + (menuFont->ascent / 2) - 1; - p[2].x = p[1].x; - p[2].y = p[1].y + 1; - p[3].x = p[0].x; - p[3].y = p[0].y + menuFont->ascent - 2; - XFillPolygon(__glutDisplay, win, - whiteGC, p, 4, Convex, CoordModeOrigin); - XDrawLines(__glutDisplay, win, blackGC, p, 5, CoordModeOrigin); -} - -static void -paintMenuItem(GLUTmenuItem * item, int num) -{ - Window win = item->menu->win; - GC gc; - int y; - int subMenuExtension; - - if (item->menu->submenus > 0) { - subMenuExtension = MENU_ARROW_GAP + MENU_ARROW_WIDTH; - } else { - subMenuExtension = 0; - } - if (item->menu->highlighted == item) { - gc = whiteGC; - } else { - gc = grayGC; - } - y = MENU_GAP + fontHeight * num - menuFont->descent; - XFillRectangle(__glutDisplay, win, gc, - MENU_GAP, y - fontHeight + menuFont->descent, - item->menu->pixwidth + subMenuExtension, fontHeight); - XDrawString(__glutDisplay, win, blackGC, - MENU_GAP, y, item->label, item->len); - if (item->isTrigger) { - paintSubMenuArrow(win, - item->menu->pixwidth + MENU_ARROW_GAP + 1, y); - } -} - -static void -paintMenu(GLUTmenu * menu) -{ - GLUTmenuItem *item; - int i = menu->num; - int y = MENU_GAP + fontHeight * i - menuFont->descent; - - item = menu->list; - while (item) { - if (item->menu->highlighted == item) { - paintMenuItem(item, i); - } else { - /* Quick render of the menu item; assume background - already cleared to gray. */ - XDrawString(__glutDisplay, menu->win, blackGC, - 2, y, item->label, item->len); - if (item->isTrigger) { - paintSubMenuArrow(menu->win, - menu->pixwidth + MENU_ARROW_GAP + 1, y); - } - } - i--; - y -= fontHeight; - item = item->next; - } -} - -static GLUTmenuItem * -getMenuItem(GLUTmenu * menu, Window win, int *which) -{ - GLUTmenuItem *item; - int i; - - if (menu->searched) { - __glutFatalError("submenu infinite loop detected"); - } - menu->searched = True; - i = menu->num; - item = menu->list; - while (item) { - if (item->win == win) { - *which = i; - menu->searched = False; - return item; - } - if (item->isTrigger) { - GLUTmenuItem *subitem; - - subitem = __glutGetMenuItem(__glutMenuList[item->value], - win, which); - if (subitem) { - menu->searched = False; - return subitem; - } - } - i--; - item = item->next; - } - menu->searched = False; - return NULL; -} - -static int -getMenuItemIndex(GLUTmenuItem * item) -{ - int count = 0; - - while (item) { - count++; - item = item->next; - } - return count; -} - -static GLUTmenu * -getMenu(Window win) -{ - GLUTmenu *menu; - - menu = __glutMappedMenu; - while (menu) { - if (win == menu->win) { - return menu; - } - menu = menu->cascade; - } - return NULL; -} - -static GLUTmenu * -getMenuByNum(int menunum) -{ - if (menunum < 1 || menunum > menuListSize) { - return NULL; - } - return __glutMenuList[menunum - 1]; -} - -static int -getUnusedMenuSlot(void) -{ - int i; - - /* Look for allocated, unused slot. */ - for (i = 0; i < menuListSize; i++) { - if (!__glutMenuList[i]) { - return i; - } - } - /* Allocate a new slot. */ - menuListSize++; - if (__glutMenuList) { - __glutMenuList = (GLUTmenu **) - realloc(__glutMenuList, menuListSize * sizeof(GLUTmenu *)); - } else { - /* XXX Some realloc's do not correctly perform a malloc - when asked to perform a realloc on a NULL pointer, - though the ANSI C library spec requires this. */ - __glutMenuList = (GLUTmenu **) malloc(sizeof(GLUTmenu *)); - } - if (!__glutMenuList) { - __glutFatalError("out of memory."); - } - __glutMenuList[menuListSize - 1] = NULL; - return menuListSize - 1; -} - -void -__glutMenuModificationError(void) -{ - /* XXX Remove the warning after GLUT 3.0. */ - __glutWarning("The following is a new check for GLUT 3.0; update your code."); - __glutFatalError("menu manipulation not allowed while menus in use."); -} - - -static void -menuItemEnterOrLeave(GLUTmenuItem * item, - int num, int type) -{ - int alreadyUp = 0; - - if (type == EnterNotify) { - GLUTmenuItem *prevItem = item->menu->highlighted; - - if (prevItem && prevItem != item) { - /* If there's an already higlighted item in this menu - that is different from this one (we could be - re-entering an item with an already cascaded - submenu!), unhighlight the previous item. */ - item->menu->highlighted = NULL; - paintMenuItem(prevItem, getMenuItemIndex(prevItem)); - } - item->menu->highlighted = item; - __glutItemSelected = item; - if (item->menu->cascade) { - if (!item->isTrigger) { - /* Entered a menu item that is not a submenu trigger, - so pop down the current submenu cascade of this - menu. */ - unmapMenu(item->menu->cascade); - item->menu->cascade = NULL; - } else { - GLUTmenu *submenu = __glutMenuList[item->value]; - - if (submenu->anchor == item) { - /* We entered the submenu trigger for the submenu - that is already up, so don't take down the - submenu. */ - alreadyUp = 1; - } else { - /* Submenu already popped up for some other submenu - item of this menu; need to pop down that other - submenu cascade. */ - unmapMenu(item->menu->cascade); - item->menu->cascade = NULL; - } - } - } - if (!alreadyUp) { - /* Make sure the menu item gets painted with - highlighting. */ - paintMenuItem(item, num); - } else { - /* If already up, should already be highlighted. */ - } - } else { - /* LeaveNotify: Handle leaving a menu item... */ - if (item->menu->cascade && - item->menu->cascade->anchor == item) { - /* If there is a submenu casacaded from this item, do not - change the highlighting on this item upon leaving. */ - } else { - /* Unhighlight this menu item. */ - item->menu->highlighted = NULL; - paintMenuItem(item, num); - } - __glutItemSelected = NULL; - } - if (item->isTrigger) { - if (type == EnterNotify && !alreadyUp) { - GLUTmenu *submenu = __glutMenuList[item->value]; - - mapMenu(submenu, - item->menu->x + item->menu->pixwidth + - MENU_ARROW_GAP + MENU_ARROW_WIDTH + - MENU_GAP + MENU_BORDER, - item->menu->y + fontHeight * (num - 1) + MENU_GAP); - item->menu->cascade = submenu; - submenu->anchor = item; - } - } -} - -/* Installs callback functions for use by glut_event.c The point - of this is so that GLUT's menu code only gets linked into - GLUT binaries (assuming a static library) if the GLUT menu - API is used. */ -static void -installMenuCallbacks(void) -{ - __glutMenuItemEnterOrLeave = menuItemEnterOrLeave; - __glutFinishMenu = finishMenu; - __glutPaintMenu = paintMenu; - __glutStartMenu = startMenu; - __glutGetMenuByNum = getMenuByNum; - __glutGetMenu = getMenu; - __glutGetMenuItem = getMenuItem; -} - -int GLUTAPIENTRY -glutCreateMenu(GLUTselectCB selectFunc) -{ - XSetWindowAttributes wa; - GLUTmenu *menu; - int menuid; - - if (__glutMappedMenu) { - __glutMenuModificationError(); - } - if (!__glutDisplay) { - __glutOpenXConnection(NULL); - } - - installMenuCallbacks(); - - menuid = getUnusedMenuSlot(); - menu = (GLUTmenu *) malloc(sizeof(GLUTmenu)); - if (!menu) { - __glutFatalError("out of memory."); - } - menu->id = menuid; - menu->num = 0; - menu->submenus = 0; - menu->managed = False; - menu->searched = False; - menu->pixwidth = 0; - menu->select = selectFunc; - menu->list = NULL; - menu->cascade = NULL; - menu->highlighted = NULL; - menu->anchor = NULL; - menuSetup(); - wa.override_redirect = True; - wa.background_pixel = menuGray; - wa.border_pixel = menuBlack; - wa.colormap = menuColormap; - wa.event_mask = StructureNotifyMask | ExposureMask | - ButtonPressMask | ButtonReleaseMask | - EnterWindowMask | LeaveWindowMask; - /* Save unders really only enabled if useSaveUnders is set to - CWSaveUnder, ie. using Mesa 3D. See earlier comments. */ - wa.save_under = True; - menu->win = XCreateWindow(__glutDisplay, __glutRoot, - /* Real position determined when mapped. */ - 0, 0, - /* Real size will be determined when menu is manged. */ - 1, 1, - MENU_BORDER, menuDepth, InputOutput, menuVisual, - CWOverrideRedirect | CWBackPixel | CWBorderPixel | - CWEventMask | CWColormap | useSaveUnders, - &wa); - menuGraphicsContextSetup(menu->win); - __glutMenuList[menuid] = menu; - __glutSetMenu(menu); - return menuid + 1; -} - -/* CENTRY */ -int GLUTAPIENTRY -glutGetMenu(void) -{ - if (__glutCurrentMenu) { - return __glutCurrentMenu->id + 1; - } else { - return 0; - } -} - -void GLUTAPIENTRY -glutSetMenu(int menuid) -{ - GLUTmenu *menu; - - if (menuid < 1 || menuid > menuListSize) { - __glutWarning("glutSetMenu attempted on bogus menu."); - return; - } - menu = __glutMenuList[menuid - 1]; - if (!menu) { - __glutWarning("glutSetMenu attempted on bogus menu."); - return; - } - __glutSetMenu(menu); -} -/* ENDCENTRY */ - -void -__glutSetMenuItem(GLUTmenuItem * item, const char *label, - int value, Bool isTrigger) -{ - GLUTmenu *menu; - - menu = item->menu; - item->label = __glutStrdup(label); - if (!item->label) { - __glutFatalError("out of memory."); - } - item->isTrigger = isTrigger; - item->len = (int) strlen(label); - item->value = value; - item->pixwidth = XTextWidth(menuFont, label, item->len) + 4; - if (item->pixwidth > menu->pixwidth) { - menu->pixwidth = item->pixwidth; - } - menu->managed = False; -} - -/* CENTRY */ -void GLUTAPIENTRY -glutAddMenuEntry(const char *label, int value) -{ - XSetWindowAttributes wa; - GLUTmenuItem *entry; - - if (__glutMappedMenu) { - __glutMenuModificationError(); - } - entry = (GLUTmenuItem *) malloc(sizeof(GLUTmenuItem)); - if (!entry) { - __glutFatalError("out of memory."); - } - entry->menu = __glutCurrentMenu; - __glutSetMenuItem(entry, label, value, False); - wa.event_mask = EnterWindowMask | LeaveWindowMask; - entry->win = XCreateWindow(__glutDisplay, - __glutCurrentMenu->win, MENU_GAP, - __glutCurrentMenu->num * fontHeight + MENU_GAP, /* x & y */ - entry->pixwidth, fontHeight, /* width & height */ - 0, CopyFromParent, InputOnly, CopyFromParent, - CWEventMask, &wa); - XMapWindow(__glutDisplay, entry->win); - __glutCurrentMenu->num++; - entry->next = __glutCurrentMenu->list; - __glutCurrentMenu->list = entry; -} - -void GLUTAPIENTRY -glutAddSubMenu(const char *label, int menu) -{ - XSetWindowAttributes wa; - GLUTmenuItem *submenu; - - if (__glutMappedMenu) { - __glutMenuModificationError(); - } - submenu = (GLUTmenuItem *) malloc(sizeof(GLUTmenuItem)); - if (!submenu) { - __glutFatalError("out of memory."); - } - __glutCurrentMenu->submenus++; - submenu->menu = __glutCurrentMenu; - __glutSetMenuItem(submenu, label, /* base 0 */ menu - 1, True); - wa.event_mask = EnterWindowMask | LeaveWindowMask; - submenu->win = XCreateWindow(__glutDisplay, - __glutCurrentMenu->win, MENU_GAP, - __glutCurrentMenu->num * fontHeight + MENU_GAP, /* x & y */ - submenu->pixwidth, fontHeight, /* width & height */ - 0, CopyFromParent, InputOnly, CopyFromParent, - CWEventMask, &wa); - XMapWindow(__glutDisplay, submenu->win); - __glutCurrentMenu->num++; - submenu->next = __glutCurrentMenu->list; - __glutCurrentMenu->list = submenu; -} - -void GLUTAPIENTRY -glutAttachMenu(int button) -{ - if (__glutMappedMenu) { - __glutMenuModificationError(); - } - installMenuCallbacks(); - if (__glutCurrentWindow->menu[button] < 1) { - __glutCurrentWindow->buttonUses++; - } - __glutChangeWindowEventMask( - ButtonPressMask | ButtonReleaseMask, True); - __glutCurrentWindow->menu[button] = __glutCurrentMenu->id + 1; -} -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_menu2.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_menu2.c deleted file mode 100644 index 969b8120b4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_menu2.c +++ /dev/null @@ -1,189 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -/* glut_menu2.c implements the little used GLUT menu calls in - a distinct file from glut_menu.c for slim static linking. */ - -/* The Win32 GLUT file win32_menu.c completely re-implements all - the menuing functionality implemented. This file is used only by - the X Window System version of GLUT. */ - -#ifdef __VMS -#include -#endif - -#include -#include -#include -#include -#include - -#include - -#include "glutint.h" -#include "layerutil.h" - -/* CENTRY */ -/* DEPRICATED, use glutMenuStatusFunc instead. */ -void GLUTAPIENTRY -glutMenuStateFunc(GLUTmenuStateCB menuStateFunc) -{ - __glutMenuStatusFunc = (GLUTmenuStatusCB) menuStateFunc; -} - -void GLUTAPIENTRY -glutMenuStatusFunc(GLUTmenuStatusCB menuStatusFunc) -{ - __glutMenuStatusFunc = menuStatusFunc; -} - -void GLUTAPIENTRY -glutDestroyMenu(int menunum) -{ - GLUTmenu *menu = __glutGetMenuByNum(menunum); - GLUTmenuItem *item, *next; - - if (__glutMappedMenu) - __glutMenuModificationError(); - assert(menu->id == menunum - 1); - XDestroySubwindows(__glutDisplay, menu->win); - XDestroyWindow(__glutDisplay, menu->win); - __glutMenuList[menunum - 1] = NULL; - /* free all menu entries */ - item = menu->list; - while (item) { - assert(item->menu == menu); - next = item->next; - free(item->label); - free(item); - item = next; - } - if (__glutCurrentMenu == menu) { - __glutCurrentMenu = NULL; - } - free(menu); -} - -void GLUTAPIENTRY -glutChangeToMenuEntry(int num, const char *label, int value) -{ - GLUTmenuItem *item; - int i; - - if (__glutMappedMenu) - __glutMenuModificationError(); - i = __glutCurrentMenu->num; - item = __glutCurrentMenu->list; - while (item) { - if (i == num) { - if (item->isTrigger) { - /* If changing a submenu trigger to a menu entry, we - need to account for submenus. */ - item->menu->submenus--; - } - free(item->label); - __glutSetMenuItem(item, label, value, False); - return; - } - i--; - item = item->next; - } - __glutWarning("Current menu has no %d item.", num); -} - -void GLUTAPIENTRY -glutChangeToSubMenu(int num, const char *label, int menu) -{ - GLUTmenuItem *item; - int i; - - if (__glutMappedMenu) - __glutMenuModificationError(); - i = __glutCurrentMenu->num; - item = __glutCurrentMenu->list; - while (item) { - if (i == num) { - if (!item->isTrigger) { - /* If changing a menu entry to as submenu trigger, we - need to account for submenus. */ - item->menu->submenus++; - } - free(item->label); - __glutSetMenuItem(item, label, /* base 0 */ menu - 1, True); - return; - } - i--; - item = item->next; - } - __glutWarning("Current menu has no %d item.", num); -} - -void GLUTAPIENTRY -glutRemoveMenuItem(int num) -{ - GLUTmenuItem *item, **prev, *remaining; - int pixwidth, i; - - if (__glutMappedMenu) - __glutMenuModificationError(); - i = __glutCurrentMenu->num; - prev = &__glutCurrentMenu->list; - item = __glutCurrentMenu->list; - /* If menu item is removed, the menu's pixwidth may need to - be recomputed. */ - pixwidth = 1; - while (item) { - if (i == num) { - /* If this menu item's pixwidth is as wide as the menu's - pixwidth, removing this menu item will necessitate - shrinking the menu's pixwidth. */ - if (item->pixwidth >= __glutCurrentMenu->pixwidth) { - /* Continue recalculating menu pixwidth, first skipping - the removed item. */ - remaining = item->next; - while (remaining) { - if (remaining->pixwidth > pixwidth) { - pixwidth = remaining->pixwidth; - } - remaining = remaining->next; - } - __glutCurrentMenu->pixwidth = pixwidth; - } - __glutCurrentMenu->num--; - __glutCurrentMenu->managed = False; - - /* Patch up menu's item list. */ - *prev = item->next; - - free(item->label); - free(item); - return; - } - if (item->pixwidth > pixwidth) { - pixwidth = item->pixwidth; - } - i--; - prev = &item->next; - item = item->next; - } - __glutWarning("Current menu has no %d item.", num); -} - -void GLUTAPIENTRY -glutDetachMenu(int button) -{ - if (__glutMappedMenu) - __glutMenuModificationError(); - if (__glutCurrentWindow->menu[button] > 0) { - __glutCurrentWindow->buttonUses--; - __glutChangeWindowEventMask(ButtonPressMask | ButtonReleaseMask, - __glutCurrentWindow->buttonUses > 0); - __glutCurrentWindow->menu[button] = 0; - } -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_mesa.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_mesa.c deleted file mode 100644 index 7e202fa078..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_mesa.c +++ /dev/null @@ -1,57 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1996. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include -#include "glutint.h" - -int __glutMesaSwapHackSupport = 0; /* Not supported until - proven otherwise. */ - -/* Use the "Mesa swap hack" if reasonable if and only if - MESA_SWAP_HACK is set to something whose first character is - not "N" or "n" AND "Brian Paul" is the vendor string AND - "Mesa X11"* (or "Mesa" for backward compatibility) is the - renderer string. - - Anyone who modifies Mesa so that glXSwapBuffers does not - simply blit the previously rendered back buffer should - change either their vendor or renderer string to avoid - confusing GLUT. */ - -void -__glutDetermineMesaSwapHackSupport(void) -{ - static int doneAlready = 0; - char *env, *vendor, *renderer; - - if (doneAlready) - return; - env = getenv("MESA_SWAP_HACK"); - if (env) { - if ((env[0] != 'n') && (env[0] != 'N')) { - vendor = (char *) glGetString(GL_VENDOR); - renderer = (char *) glGetString(GL_RENDERER); - - /* Old versions of X11 Mesa uses the renderer string - "Mesa"; Brian plans to start using "Mesa X11" to - distinguish the X version of Mesa from other flavor - such as Windows or 3Dfx. */ - -#define MESA_X11 "Mesa X11" - - /* XXX At some point in the future, eliminate the - backward compatibility for the old "Mesa" renderer - string. */ - - if (!strcmp(vendor, "Brian Paul") && (!strcmp(renderer, "Mesa") || - !strncmp(renderer, MESA_X11, sizeof(MESA_X11) - 1))) - __glutMesaSwapHackSupport = 1; - } - } - doneAlready = 1; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_modifier.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_modifier.c deleted file mode 100644 index 69fa5aba95..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_modifier.c +++ /dev/null @@ -1,31 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" - -/* CENTRY */ -int GLUTAPIENTRY -glutGetModifiers(void) -{ - int modifiers; - - if(__glutModifierMask == (unsigned int) ~0) { - __glutWarning( - "glutCurrentModifiers: do not call outside core input callback."); - return 0; - } - modifiers = 0; - if(__glutModifierMask & (ShiftMask|LockMask)) - modifiers |= GLUT_ACTIVE_SHIFT; - if(__glutModifierMask & ControlMask) - modifiers |= GLUT_ACTIVE_CTRL; - if(__glutModifierMask & Mod1Mask) - modifiers |= GLUT_ACTIVE_ALT; - return modifiers; -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_mroman.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_mroman.c deleted file mode 100644 index a29f043b4a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_mroman.c +++ /dev/null @@ -1,2451 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#include "glutstroke.h" - -/* char: 33 '!' */ - -static const CoordRec char33_stroke0[] = { - { 52.381, 100 }, - { 52.381, 33.3333 }, -}; - -static const CoordRec char33_stroke1[] = { - { 52.381, 9.5238 }, - { 47.6191, 4.7619 }, - { 52.381, 0 }, - { 57.1429, 4.7619 }, - { 52.381, 9.5238 }, -}; - -static const StrokeRec char33[] = { - { 2, char33_stroke0 }, - { 5, char33_stroke1 }, -}; - -/* char: 34 '"' */ - -static const CoordRec char34_stroke0[] = { - { 33.3334, 100 }, - { 33.3334, 66.6667 }, -}; - -static const CoordRec char34_stroke1[] = { - { 71.4286, 100 }, - { 71.4286, 66.6667 }, -}; - -static const StrokeRec char34[] = { - { 2, char34_stroke0 }, - { 2, char34_stroke1 }, -}; - -/* char: 35 '#' */ - -static const CoordRec char35_stroke0[] = { - { 54.7619, 119.048 }, - { 21.4286, -33.3333 }, -}; - -static const CoordRec char35_stroke1[] = { - { 83.3334, 119.048 }, - { 50, -33.3333 }, -}; - -static const CoordRec char35_stroke2[] = { - { 21.4286, 57.1429 }, - { 88.0952, 57.1429 }, -}; - -static const CoordRec char35_stroke3[] = { - { 16.6667, 28.5714 }, - { 83.3334, 28.5714 }, -}; - -static const StrokeRec char35[] = { - { 2, char35_stroke0 }, - { 2, char35_stroke1 }, - { 2, char35_stroke2 }, - { 2, char35_stroke3 }, -}; - -/* char: 36 '$' */ - -static const CoordRec char36_stroke0[] = { - { 42.8571, 119.048 }, - { 42.8571, -19.0476 }, -}; - -static const CoordRec char36_stroke1[] = { - { 61.9047, 119.048 }, - { 61.9047, -19.0476 }, -}; - -static const CoordRec char36_stroke2[] = { - { 85.7143, 85.7143 }, - { 76.1905, 95.2381 }, - { 61.9047, 100 }, - { 42.8571, 100 }, - { 28.5714, 95.2381 }, - { 19.0476, 85.7143 }, - { 19.0476, 76.1905 }, - { 23.8095, 66.6667 }, - { 28.5714, 61.9048 }, - { 38.0952, 57.1429 }, - { 66.6666, 47.619 }, - { 76.1905, 42.8571 }, - { 80.9524, 38.0952 }, - { 85.7143, 28.5714 }, - { 85.7143, 14.2857 }, - { 76.1905, 4.7619 }, - { 61.9047, 0 }, - { 42.8571, 0 }, - { 28.5714, 4.7619 }, - { 19.0476, 14.2857 }, -}; - -static const StrokeRec char36[] = { - { 2, char36_stroke0 }, - { 2, char36_stroke1 }, - { 20, char36_stroke2 }, -}; - -/* char: 37 '%' */ - -static const CoordRec char37_stroke0[] = { - { 95.2381, 100 }, - { 9.5238, 0 }, -}; - -static const CoordRec char37_stroke1[] = { - { 33.3333, 100 }, - { 42.8571, 90.4762 }, - { 42.8571, 80.9524 }, - { 38.0952, 71.4286 }, - { 28.5714, 66.6667 }, - { 19.0476, 66.6667 }, - { 9.5238, 76.1905 }, - { 9.5238, 85.7143 }, - { 14.2857, 95.2381 }, - { 23.8095, 100 }, - { 33.3333, 100 }, - { 42.8571, 95.2381 }, - { 57.1428, 90.4762 }, - { 71.4286, 90.4762 }, - { 85.7143, 95.2381 }, - { 95.2381, 100 }, -}; - -static const CoordRec char37_stroke2[] = { - { 76.1905, 33.3333 }, - { 66.6667, 28.5714 }, - { 61.9048, 19.0476 }, - { 61.9048, 9.5238 }, - { 71.4286, 0 }, - { 80.9524, 0 }, - { 90.4762, 4.7619 }, - { 95.2381, 14.2857 }, - { 95.2381, 23.8095 }, - { 85.7143, 33.3333 }, - { 76.1905, 33.3333 }, -}; - -static const StrokeRec char37[] = { - { 2, char37_stroke0 }, - { 16, char37_stroke1 }, - { 11, char37_stroke2 }, -}; - -/* char: 38 '&' */ - -static const CoordRec char38_stroke0[] = { - { 100, 57.1429 }, - { 100, 61.9048 }, - { 95.2381, 66.6667 }, - { 90.4762, 66.6667 }, - { 85.7143, 61.9048 }, - { 80.9524, 52.381 }, - { 71.4286, 28.5714 }, - { 61.9048, 14.2857 }, - { 52.3809, 4.7619 }, - { 42.8571, 0 }, - { 23.8095, 0 }, - { 14.2857, 4.7619 }, - { 9.5238, 9.5238 }, - { 4.7619, 19.0476 }, - { 4.7619, 28.5714 }, - { 9.5238, 38.0952 }, - { 14.2857, 42.8571 }, - { 47.619, 61.9048 }, - { 52.3809, 66.6667 }, - { 57.1429, 76.1905 }, - { 57.1429, 85.7143 }, - { 52.3809, 95.2381 }, - { 42.8571, 100 }, - { 33.3333, 95.2381 }, - { 28.5714, 85.7143 }, - { 28.5714, 76.1905 }, - { 33.3333, 61.9048 }, - { 42.8571, 47.619 }, - { 66.6667, 14.2857 }, - { 76.1905, 4.7619 }, - { 85.7143, 0 }, - { 95.2381, 0 }, - { 100, 4.7619 }, - { 100, 9.5238 }, -}; - -static const StrokeRec char38[] = { - { 34, char38_stroke0 }, -}; - -/* char: 39 ''' */ - -static const CoordRec char39_stroke0[] = { - { 52.381, 100 }, - { 52.381, 66.6667 }, -}; - -static const StrokeRec char39[] = { - { 2, char39_stroke0 }, -}; - -/* char: 40 '(' */ - -static const CoordRec char40_stroke0[] = { - { 69.0476, 119.048 }, - { 59.5238, 109.524 }, - { 50, 95.2381 }, - { 40.4762, 76.1905 }, - { 35.7143, 52.381 }, - { 35.7143, 33.3333 }, - { 40.4762, 9.5238 }, - { 50, -9.5238 }, - { 59.5238, -23.8095 }, - { 69.0476, -33.3333 }, -}; - -static const StrokeRec char40[] = { - { 10, char40_stroke0 }, -}; - -/* char: 41 ')' */ - -static const CoordRec char41_stroke0[] = { - { 35.7143, 119.048 }, - { 45.2381, 109.524 }, - { 54.7619, 95.2381 }, - { 64.2857, 76.1905 }, - { 69.0476, 52.381 }, - { 69.0476, 33.3333 }, - { 64.2857, 9.5238 }, - { 54.7619, -9.5238 }, - { 45.2381, -23.8095 }, - { 35.7143, -33.3333 }, -}; - -static const StrokeRec char41[] = { - { 10, char41_stroke0 }, -}; - -/* char: 42 '*' */ - -static const CoordRec char42_stroke0[] = { - { 52.381, 71.4286 }, - { 52.381, 14.2857 }, -}; - -static const CoordRec char42_stroke1[] = { - { 28.5715, 57.1429 }, - { 76.1905, 28.5714 }, -}; - -static const CoordRec char42_stroke2[] = { - { 76.1905, 57.1429 }, - { 28.5715, 28.5714 }, -}; - -static const StrokeRec char42[] = { - { 2, char42_stroke0 }, - { 2, char42_stroke1 }, - { 2, char42_stroke2 }, -}; - -/* char: 43 '+' */ - -static const CoordRec char43_stroke0[] = { - { 52.3809, 85.7143 }, - { 52.3809, 0 }, -}; - -static const CoordRec char43_stroke1[] = { - { 9.5238, 42.8571 }, - { 95.2381, 42.8571 }, -}; - -static const StrokeRec char43[] = { - { 2, char43_stroke0 }, - { 2, char43_stroke1 }, -}; - -/* char: 44 ',' */ - -static const CoordRec char44_stroke0[] = { - { 57.1429, 4.7619 }, - { 52.381, 0 }, - { 47.6191, 4.7619 }, - { 52.381, 9.5238 }, - { 57.1429, 4.7619 }, - { 57.1429, -4.7619 }, - { 52.381, -14.2857 }, - { 47.6191, -19.0476 }, -}; - -static const StrokeRec char44[] = { - { 8, char44_stroke0 }, -}; - -/* char: 45 '-' */ - -static const CoordRec char45_stroke0[] = { - { 9.5238, 42.8571 }, - { 95.2381, 42.8571 }, -}; - -static const StrokeRec char45[] = { - { 2, char45_stroke0 }, -}; - -/* char: 46 '.' */ - -static const CoordRec char46_stroke0[] = { - { 52.381, 9.5238 }, - { 47.6191, 4.7619 }, - { 52.381, 0 }, - { 57.1429, 4.7619 }, - { 52.381, 9.5238 }, -}; - -static const StrokeRec char46[] = { - { 5, char46_stroke0 }, -}; - -/* char: 47 '/' */ - -static const CoordRec char47_stroke0[] = { - { 19.0476, -14.2857 }, - { 85.7143, 100 }, -}; - -static const StrokeRec char47[] = { - { 2, char47_stroke0 }, -}; - -/* char: 48 '0' */ - -static const CoordRec char48_stroke0[] = { - { 47.619, 100 }, - { 33.3333, 95.2381 }, - { 23.8095, 80.9524 }, - { 19.0476, 57.1429 }, - { 19.0476, 42.8571 }, - { 23.8095, 19.0476 }, - { 33.3333, 4.7619 }, - { 47.619, 0 }, - { 57.1428, 0 }, - { 71.4286, 4.7619 }, - { 80.9524, 19.0476 }, - { 85.7143, 42.8571 }, - { 85.7143, 57.1429 }, - { 80.9524, 80.9524 }, - { 71.4286, 95.2381 }, - { 57.1428, 100 }, - { 47.619, 100 }, -}; - -static const StrokeRec char48[] = { - { 17, char48_stroke0 }, -}; - -/* char: 49 '1' */ - -static const CoordRec char49_stroke0[] = { - { 40.4762, 80.9524 }, - { 50, 85.7143 }, - { 64.2857, 100 }, - { 64.2857, 0 }, -}; - -static const StrokeRec char49[] = { - { 4, char49_stroke0 }, -}; - -/* char: 50 '2' */ - -static const CoordRec char50_stroke0[] = { - { 23.8095, 76.1905 }, - { 23.8095, 80.9524 }, - { 28.5714, 90.4762 }, - { 33.3333, 95.2381 }, - { 42.8571, 100 }, - { 61.9047, 100 }, - { 71.4286, 95.2381 }, - { 76.1905, 90.4762 }, - { 80.9524, 80.9524 }, - { 80.9524, 71.4286 }, - { 76.1905, 61.9048 }, - { 66.6666, 47.619 }, - { 19.0476, 0 }, - { 85.7143, 0 }, -}; - -static const StrokeRec char50[] = { - { 14, char50_stroke0 }, -}; - -/* char: 51 '3' */ - -static const CoordRec char51_stroke0[] = { - { 28.5714, 100 }, - { 80.9524, 100 }, - { 52.3809, 61.9048 }, - { 66.6666, 61.9048 }, - { 76.1905, 57.1429 }, - { 80.9524, 52.381 }, - { 85.7143, 38.0952 }, - { 85.7143, 28.5714 }, - { 80.9524, 14.2857 }, - { 71.4286, 4.7619 }, - { 57.1428, 0 }, - { 42.8571, 0 }, - { 28.5714, 4.7619 }, - { 23.8095, 9.5238 }, - { 19.0476, 19.0476 }, -}; - -static const StrokeRec char51[] = { - { 15, char51_stroke0 }, -}; - -/* char: 52 '4' */ - -static const CoordRec char52_stroke0[] = { - { 64.2857, 100 }, - { 16.6667, 33.3333 }, - { 88.0952, 33.3333 }, -}; - -static const CoordRec char52_stroke1[] = { - { 64.2857, 100 }, - { 64.2857, 0 }, -}; - -static const StrokeRec char52[] = { - { 3, char52_stroke0 }, - { 2, char52_stroke1 }, -}; - -/* char: 53 '5' */ - -static const CoordRec char53_stroke0[] = { - { 76.1905, 100 }, - { 28.5714, 100 }, - { 23.8095, 57.1429 }, - { 28.5714, 61.9048 }, - { 42.8571, 66.6667 }, - { 57.1428, 66.6667 }, - { 71.4286, 61.9048 }, - { 80.9524, 52.381 }, - { 85.7143, 38.0952 }, - { 85.7143, 28.5714 }, - { 80.9524, 14.2857 }, - { 71.4286, 4.7619 }, - { 57.1428, 0 }, - { 42.8571, 0 }, - { 28.5714, 4.7619 }, - { 23.8095, 9.5238 }, - { 19.0476, 19.0476 }, -}; - -static const StrokeRec char53[] = { - { 17, char53_stroke0 }, -}; - -/* char: 54 '6' */ - -static const CoordRec char54_stroke0[] = { - { 78.5714, 85.7143 }, - { 73.8096, 95.2381 }, - { 59.5238, 100 }, - { 50, 100 }, - { 35.7143, 95.2381 }, - { 26.1905, 80.9524 }, - { 21.4286, 57.1429 }, - { 21.4286, 33.3333 }, - { 26.1905, 14.2857 }, - { 35.7143, 4.7619 }, - { 50, 0 }, - { 54.7619, 0 }, - { 69.0476, 4.7619 }, - { 78.5714, 14.2857 }, - { 83.3334, 28.5714 }, - { 83.3334, 33.3333 }, - { 78.5714, 47.619 }, - { 69.0476, 57.1429 }, - { 54.7619, 61.9048 }, - { 50, 61.9048 }, - { 35.7143, 57.1429 }, - { 26.1905, 47.619 }, - { 21.4286, 33.3333 }, -}; - -static const StrokeRec char54[] = { - { 23, char54_stroke0 }, -}; - -/* char: 55 '7' */ - -static const CoordRec char55_stroke0[] = { - { 85.7143, 100 }, - { 38.0952, 0 }, -}; - -static const CoordRec char55_stroke1[] = { - { 19.0476, 100 }, - { 85.7143, 100 }, -}; - -static const StrokeRec char55[] = { - { 2, char55_stroke0 }, - { 2, char55_stroke1 }, -}; - -/* char: 56 '8' */ - -static const CoordRec char56_stroke0[] = { - { 42.8571, 100 }, - { 28.5714, 95.2381 }, - { 23.8095, 85.7143 }, - { 23.8095, 76.1905 }, - { 28.5714, 66.6667 }, - { 38.0952, 61.9048 }, - { 57.1428, 57.1429 }, - { 71.4286, 52.381 }, - { 80.9524, 42.8571 }, - { 85.7143, 33.3333 }, - { 85.7143, 19.0476 }, - { 80.9524, 9.5238 }, - { 76.1905, 4.7619 }, - { 61.9047, 0 }, - { 42.8571, 0 }, - { 28.5714, 4.7619 }, - { 23.8095, 9.5238 }, - { 19.0476, 19.0476 }, - { 19.0476, 33.3333 }, - { 23.8095, 42.8571 }, - { 33.3333, 52.381 }, - { 47.619, 57.1429 }, - { 66.6666, 61.9048 }, - { 76.1905, 66.6667 }, - { 80.9524, 76.1905 }, - { 80.9524, 85.7143 }, - { 76.1905, 95.2381 }, - { 61.9047, 100 }, - { 42.8571, 100 }, -}; - -static const StrokeRec char56[] = { - { 29, char56_stroke0 }, -}; - -/* char: 57 '9' */ - -static const CoordRec char57_stroke0[] = { - { 83.3334, 66.6667 }, - { 78.5714, 52.381 }, - { 69.0476, 42.8571 }, - { 54.7619, 38.0952 }, - { 50, 38.0952 }, - { 35.7143, 42.8571 }, - { 26.1905, 52.381 }, - { 21.4286, 66.6667 }, - { 21.4286, 71.4286 }, - { 26.1905, 85.7143 }, - { 35.7143, 95.2381 }, - { 50, 100 }, - { 54.7619, 100 }, - { 69.0476, 95.2381 }, - { 78.5714, 85.7143 }, - { 83.3334, 66.6667 }, - { 83.3334, 42.8571 }, - { 78.5714, 19.0476 }, - { 69.0476, 4.7619 }, - { 54.7619, 0 }, - { 45.2381, 0 }, - { 30.9524, 4.7619 }, - { 26.1905, 14.2857 }, -}; - -static const StrokeRec char57[] = { - { 23, char57_stroke0 }, -}; - -/* char: 58 ':' */ - -static const CoordRec char58_stroke0[] = { - { 52.381, 66.6667 }, - { 47.6191, 61.9048 }, - { 52.381, 57.1429 }, - { 57.1429, 61.9048 }, - { 52.381, 66.6667 }, -}; - -static const CoordRec char58_stroke1[] = { - { 52.381, 9.5238 }, - { 47.6191, 4.7619 }, - { 52.381, 0 }, - { 57.1429, 4.7619 }, - { 52.381, 9.5238 }, -}; - -static const StrokeRec char58[] = { - { 5, char58_stroke0 }, - { 5, char58_stroke1 }, -}; - -/* char: 59 ';' */ - -static const CoordRec char59_stroke0[] = { - { 52.381, 66.6667 }, - { 47.6191, 61.9048 }, - { 52.381, 57.1429 }, - { 57.1429, 61.9048 }, - { 52.381, 66.6667 }, -}; - -static const CoordRec char59_stroke1[] = { - { 57.1429, 4.7619 }, - { 52.381, 0 }, - { 47.6191, 4.7619 }, - { 52.381, 9.5238 }, - { 57.1429, 4.7619 }, - { 57.1429, -4.7619 }, - { 52.381, -14.2857 }, - { 47.6191, -19.0476 }, -}; - -static const StrokeRec char59[] = { - { 5, char59_stroke0 }, - { 8, char59_stroke1 }, -}; - -/* char: 60 '<' */ - -static const CoordRec char60_stroke0[] = { - { 90.4762, 85.7143 }, - { 14.2857, 42.8571 }, - { 90.4762, 0 }, -}; - -static const StrokeRec char60[] = { - { 3, char60_stroke0 }, -}; - -/* char: 61 '=' */ - -static const CoordRec char61_stroke0[] = { - { 9.5238, 57.1429 }, - { 95.2381, 57.1429 }, -}; - -static const CoordRec char61_stroke1[] = { - { 9.5238, 28.5714 }, - { 95.2381, 28.5714 }, -}; - -static const StrokeRec char61[] = { - { 2, char61_stroke0 }, - { 2, char61_stroke1 }, -}; - -/* char: 62 '>' */ - -static const CoordRec char62_stroke0[] = { - { 14.2857, 85.7143 }, - { 90.4762, 42.8571 }, - { 14.2857, 0 }, -}; - -static const StrokeRec char62[] = { - { 3, char62_stroke0 }, -}; - -/* char: 63 '?' */ - -static const CoordRec char63_stroke0[] = { - { 23.8095, 76.1905 }, - { 23.8095, 80.9524 }, - { 28.5714, 90.4762 }, - { 33.3333, 95.2381 }, - { 42.8571, 100 }, - { 61.9047, 100 }, - { 71.4285, 95.2381 }, - { 76.1905, 90.4762 }, - { 80.9524, 80.9524 }, - { 80.9524, 71.4286 }, - { 76.1905, 61.9048 }, - { 71.4285, 57.1429 }, - { 52.3809, 47.619 }, - { 52.3809, 33.3333 }, -}; - -static const CoordRec char63_stroke1[] = { - { 52.3809, 9.5238 }, - { 47.619, 4.7619 }, - { 52.3809, 0 }, - { 57.1428, 4.7619 }, - { 52.3809, 9.5238 }, -}; - -static const StrokeRec char63[] = { - { 14, char63_stroke0 }, - { 5, char63_stroke1 }, -}; - -/* char: 64 '@' */ - -static const CoordRec char64_stroke0[] = { - { 64.2857, 52.381 }, - { 54.7619, 57.1429 }, - { 45.2381, 57.1429 }, - { 40.4762, 47.619 }, - { 40.4762, 42.8571 }, - { 45.2381, 33.3333 }, - { 54.7619, 33.3333 }, - { 64.2857, 38.0952 }, -}; - -static const CoordRec char64_stroke1[] = { - { 64.2857, 57.1429 }, - { 64.2857, 38.0952 }, - { 69.0476, 33.3333 }, - { 78.5714, 33.3333 }, - { 83.3334, 42.8571 }, - { 83.3334, 47.619 }, - { 78.5714, 61.9048 }, - { 69.0476, 71.4286 }, - { 54.7619, 76.1905 }, - { 50, 76.1905 }, - { 35.7143, 71.4286 }, - { 26.1905, 61.9048 }, - { 21.4286, 47.619 }, - { 21.4286, 42.8571 }, - { 26.1905, 28.5714 }, - { 35.7143, 19.0476 }, - { 50, 14.2857 }, - { 54.7619, 14.2857 }, - { 69.0476, 19.0476 }, -}; - -static const StrokeRec char64[] = { - { 8, char64_stroke0 }, - { 19, char64_stroke1 }, -}; - -/* char: 65 'A' */ - -static const CoordRec char65_stroke0[] = { - { 52.3809, 100 }, - { 14.2857, 0 }, -}; - -static const CoordRec char65_stroke1[] = { - { 52.3809, 100 }, - { 90.4762, 0 }, -}; - -static const CoordRec char65_stroke2[] = { - { 28.5714, 33.3333 }, - { 76.1905, 33.3333 }, -}; - -static const StrokeRec char65[] = { - { 2, char65_stroke0 }, - { 2, char65_stroke1 }, - { 2, char65_stroke2 }, -}; - -/* char: 66 'B' */ - -static const CoordRec char66_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char66_stroke1[] = { - { 19.0476, 100 }, - { 61.9047, 100 }, - { 76.1905, 95.2381 }, - { 80.9524, 90.4762 }, - { 85.7143, 80.9524 }, - { 85.7143, 71.4286 }, - { 80.9524, 61.9048 }, - { 76.1905, 57.1429 }, - { 61.9047, 52.381 }, -}; - -static const CoordRec char66_stroke2[] = { - { 19.0476, 52.381 }, - { 61.9047, 52.381 }, - { 76.1905, 47.619 }, - { 80.9524, 42.8571 }, - { 85.7143, 33.3333 }, - { 85.7143, 19.0476 }, - { 80.9524, 9.5238 }, - { 76.1905, 4.7619 }, - { 61.9047, 0 }, - { 19.0476, 0 }, -}; - -static const StrokeRec char66[] = { - { 2, char66_stroke0 }, - { 9, char66_stroke1 }, - { 10, char66_stroke2 }, -}; - -/* char: 67 'C' */ - -static const CoordRec char67_stroke0[] = { - { 88.0952, 76.1905 }, - { 83.3334, 85.7143 }, - { 73.8096, 95.2381 }, - { 64.2857, 100 }, - { 45.2381, 100 }, - { 35.7143, 95.2381 }, - { 26.1905, 85.7143 }, - { 21.4286, 76.1905 }, - { 16.6667, 61.9048 }, - { 16.6667, 38.0952 }, - { 21.4286, 23.8095 }, - { 26.1905, 14.2857 }, - { 35.7143, 4.7619 }, - { 45.2381, 0 }, - { 64.2857, 0 }, - { 73.8096, 4.7619 }, - { 83.3334, 14.2857 }, - { 88.0952, 23.8095 }, -}; - -static const StrokeRec char67[] = { - { 18, char67_stroke0 }, -}; - -/* char: 68 'D' */ - -static const CoordRec char68_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char68_stroke1[] = { - { 19.0476, 100 }, - { 52.3809, 100 }, - { 66.6666, 95.2381 }, - { 76.1905, 85.7143 }, - { 80.9524, 76.1905 }, - { 85.7143, 61.9048 }, - { 85.7143, 38.0952 }, - { 80.9524, 23.8095 }, - { 76.1905, 14.2857 }, - { 66.6666, 4.7619 }, - { 52.3809, 0 }, - { 19.0476, 0 }, -}; - -static const StrokeRec char68[] = { - { 2, char68_stroke0 }, - { 12, char68_stroke1 }, -}; - -/* char: 69 'E' */ - -static const CoordRec char69_stroke0[] = { - { 21.4286, 100 }, - { 21.4286, 0 }, -}; - -static const CoordRec char69_stroke1[] = { - { 21.4286, 100 }, - { 83.3334, 100 }, -}; - -static const CoordRec char69_stroke2[] = { - { 21.4286, 52.381 }, - { 59.5238, 52.381 }, -}; - -static const CoordRec char69_stroke3[] = { - { 21.4286, 0 }, - { 83.3334, 0 }, -}; - -static const StrokeRec char69[] = { - { 2, char69_stroke0 }, - { 2, char69_stroke1 }, - { 2, char69_stroke2 }, - { 2, char69_stroke3 }, -}; - -/* char: 70 'F' */ - -static const CoordRec char70_stroke0[] = { - { 21.4286, 100 }, - { 21.4286, 0 }, -}; - -static const CoordRec char70_stroke1[] = { - { 21.4286, 100 }, - { 83.3334, 100 }, -}; - -static const CoordRec char70_stroke2[] = { - { 21.4286, 52.381 }, - { 59.5238, 52.381 }, -}; - -static const StrokeRec char70[] = { - { 2, char70_stroke0 }, - { 2, char70_stroke1 }, - { 2, char70_stroke2 }, -}; - -/* char: 71 'G' */ - -static const CoordRec char71_stroke0[] = { - { 88.0952, 76.1905 }, - { 83.3334, 85.7143 }, - { 73.8096, 95.2381 }, - { 64.2857, 100 }, - { 45.2381, 100 }, - { 35.7143, 95.2381 }, - { 26.1905, 85.7143 }, - { 21.4286, 76.1905 }, - { 16.6667, 61.9048 }, - { 16.6667, 38.0952 }, - { 21.4286, 23.8095 }, - { 26.1905, 14.2857 }, - { 35.7143, 4.7619 }, - { 45.2381, 0 }, - { 64.2857, 0 }, - { 73.8096, 4.7619 }, - { 83.3334, 14.2857 }, - { 88.0952, 23.8095 }, - { 88.0952, 38.0952 }, -}; - -static const CoordRec char71_stroke1[] = { - { 64.2857, 38.0952 }, - { 88.0952, 38.0952 }, -}; - -static const StrokeRec char71[] = { - { 19, char71_stroke0 }, - { 2, char71_stroke1 }, -}; - -/* char: 72 'H' */ - -static const CoordRec char72_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char72_stroke1[] = { - { 85.7143, 100 }, - { 85.7143, 0 }, -}; - -static const CoordRec char72_stroke2[] = { - { 19.0476, 52.381 }, - { 85.7143, 52.381 }, -}; - -static const StrokeRec char72[] = { - { 2, char72_stroke0 }, - { 2, char72_stroke1 }, - { 2, char72_stroke2 }, -}; - -/* char: 73 'I' */ - -static const CoordRec char73_stroke0[] = { - { 52.381, 100 }, - { 52.381, 0 }, -}; - -static const StrokeRec char73[] = { - { 2, char73_stroke0 }, -}; - -/* char: 74 'J' */ - -static const CoordRec char74_stroke0[] = { - { 76.1905, 100 }, - { 76.1905, 23.8095 }, - { 71.4286, 9.5238 }, - { 66.6667, 4.7619 }, - { 57.1429, 0 }, - { 47.6191, 0 }, - { 38.0953, 4.7619 }, - { 33.3334, 9.5238 }, - { 28.5715, 23.8095 }, - { 28.5715, 33.3333 }, -}; - -static const StrokeRec char74[] = { - { 10, char74_stroke0 }, -}; - -/* char: 75 'K' */ - -static const CoordRec char75_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char75_stroke1[] = { - { 85.7143, 100 }, - { 19.0476, 33.3333 }, -}; - -static const CoordRec char75_stroke2[] = { - { 42.8571, 57.1429 }, - { 85.7143, 0 }, -}; - -static const StrokeRec char75[] = { - { 2, char75_stroke0 }, - { 2, char75_stroke1 }, - { 2, char75_stroke2 }, -}; - -/* char: 76 'L' */ - -static const CoordRec char76_stroke0[] = { - { 23.8095, 100 }, - { 23.8095, 0 }, -}; - -static const CoordRec char76_stroke1[] = { - { 23.8095, 0 }, - { 80.9524, 0 }, -}; - -static const StrokeRec char76[] = { - { 2, char76_stroke0 }, - { 2, char76_stroke1 }, -}; - -/* char: 77 'M' */ - -static const CoordRec char77_stroke0[] = { - { 14.2857, 100 }, - { 14.2857, 0 }, -}; - -static const CoordRec char77_stroke1[] = { - { 14.2857, 100 }, - { 52.3809, 0 }, -}; - -static const CoordRec char77_stroke2[] = { - { 90.4762, 100 }, - { 52.3809, 0 }, -}; - -static const CoordRec char77_stroke3[] = { - { 90.4762, 100 }, - { 90.4762, 0 }, -}; - -static const StrokeRec char77[] = { - { 2, char77_stroke0 }, - { 2, char77_stroke1 }, - { 2, char77_stroke2 }, - { 2, char77_stroke3 }, -}; - -/* char: 78 'N' */ - -static const CoordRec char78_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char78_stroke1[] = { - { 19.0476, 100 }, - { 85.7143, 0 }, -}; - -static const CoordRec char78_stroke2[] = { - { 85.7143, 100 }, - { 85.7143, 0 }, -}; - -static const StrokeRec char78[] = { - { 2, char78_stroke0 }, - { 2, char78_stroke1 }, - { 2, char78_stroke2 }, -}; - -/* char: 79 'O' */ - -static const CoordRec char79_stroke0[] = { - { 42.8571, 100 }, - { 33.3333, 95.2381 }, - { 23.8095, 85.7143 }, - { 19.0476, 76.1905 }, - { 14.2857, 61.9048 }, - { 14.2857, 38.0952 }, - { 19.0476, 23.8095 }, - { 23.8095, 14.2857 }, - { 33.3333, 4.7619 }, - { 42.8571, 0 }, - { 61.9047, 0 }, - { 71.4286, 4.7619 }, - { 80.9524, 14.2857 }, - { 85.7143, 23.8095 }, - { 90.4762, 38.0952 }, - { 90.4762, 61.9048 }, - { 85.7143, 76.1905 }, - { 80.9524, 85.7143 }, - { 71.4286, 95.2381 }, - { 61.9047, 100 }, - { 42.8571, 100 }, -}; - -static const StrokeRec char79[] = { - { 21, char79_stroke0 }, -}; - -/* char: 80 'P' */ - -static const CoordRec char80_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char80_stroke1[] = { - { 19.0476, 100 }, - { 61.9047, 100 }, - { 76.1905, 95.2381 }, - { 80.9524, 90.4762 }, - { 85.7143, 80.9524 }, - { 85.7143, 66.6667 }, - { 80.9524, 57.1429 }, - { 76.1905, 52.381 }, - { 61.9047, 47.619 }, - { 19.0476, 47.619 }, -}; - -static const StrokeRec char80[] = { - { 2, char80_stroke0 }, - { 10, char80_stroke1 }, -}; - -/* char: 81 'Q' */ - -static const CoordRec char81_stroke0[] = { - { 42.8571, 100 }, - { 33.3333, 95.2381 }, - { 23.8095, 85.7143 }, - { 19.0476, 76.1905 }, - { 14.2857, 61.9048 }, - { 14.2857, 38.0952 }, - { 19.0476, 23.8095 }, - { 23.8095, 14.2857 }, - { 33.3333, 4.7619 }, - { 42.8571, 0 }, - { 61.9047, 0 }, - { 71.4286, 4.7619 }, - { 80.9524, 14.2857 }, - { 85.7143, 23.8095 }, - { 90.4762, 38.0952 }, - { 90.4762, 61.9048 }, - { 85.7143, 76.1905 }, - { 80.9524, 85.7143 }, - { 71.4286, 95.2381 }, - { 61.9047, 100 }, - { 42.8571, 100 }, -}; - -static const CoordRec char81_stroke1[] = { - { 57.1428, 19.0476 }, - { 85.7143, -9.5238 }, -}; - -static const StrokeRec char81[] = { - { 21, char81_stroke0 }, - { 2, char81_stroke1 }, -}; - -/* char: 82 'R' */ - -static const CoordRec char82_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char82_stroke1[] = { - { 19.0476, 100 }, - { 61.9047, 100 }, - { 76.1905, 95.2381 }, - { 80.9524, 90.4762 }, - { 85.7143, 80.9524 }, - { 85.7143, 71.4286 }, - { 80.9524, 61.9048 }, - { 76.1905, 57.1429 }, - { 61.9047, 52.381 }, - { 19.0476, 52.381 }, -}; - -static const CoordRec char82_stroke2[] = { - { 52.3809, 52.381 }, - { 85.7143, 0 }, -}; - -static const StrokeRec char82[] = { - { 2, char82_stroke0 }, - { 10, char82_stroke1 }, - { 2, char82_stroke2 }, -}; - -/* char: 83 'S' */ - -static const CoordRec char83_stroke0[] = { - { 85.7143, 85.7143 }, - { 76.1905, 95.2381 }, - { 61.9047, 100 }, - { 42.8571, 100 }, - { 28.5714, 95.2381 }, - { 19.0476, 85.7143 }, - { 19.0476, 76.1905 }, - { 23.8095, 66.6667 }, - { 28.5714, 61.9048 }, - { 38.0952, 57.1429 }, - { 66.6666, 47.619 }, - { 76.1905, 42.8571 }, - { 80.9524, 38.0952 }, - { 85.7143, 28.5714 }, - { 85.7143, 14.2857 }, - { 76.1905, 4.7619 }, - { 61.9047, 0 }, - { 42.8571, 0 }, - { 28.5714, 4.7619 }, - { 19.0476, 14.2857 }, -}; - -static const StrokeRec char83[] = { - { 20, char83_stroke0 }, -}; - -/* char: 84 'T' */ - -static const CoordRec char84_stroke0[] = { - { 52.3809, 100 }, - { 52.3809, 0 }, -}; - -static const CoordRec char84_stroke1[] = { - { 19.0476, 100 }, - { 85.7143, 100 }, -}; - -static const StrokeRec char84[] = { - { 2, char84_stroke0 }, - { 2, char84_stroke1 }, -}; - -/* char: 85 'U' */ - -static const CoordRec char85_stroke0[] = { - { 19.0476, 100 }, - { 19.0476, 28.5714 }, - { 23.8095, 14.2857 }, - { 33.3333, 4.7619 }, - { 47.619, 0 }, - { 57.1428, 0 }, - { 71.4286, 4.7619 }, - { 80.9524, 14.2857 }, - { 85.7143, 28.5714 }, - { 85.7143, 100 }, -}; - -static const StrokeRec char85[] = { - { 10, char85_stroke0 }, -}; - -/* char: 86 'V' */ - -static const CoordRec char86_stroke0[] = { - { 14.2857, 100 }, - { 52.3809, 0 }, -}; - -static const CoordRec char86_stroke1[] = { - { 90.4762, 100 }, - { 52.3809, 0 }, -}; - -static const StrokeRec char86[] = { - { 2, char86_stroke0 }, - { 2, char86_stroke1 }, -}; - -/* char: 87 'W' */ - -static const CoordRec char87_stroke0[] = { - { 4.7619, 100 }, - { 28.5714, 0 }, -}; - -static const CoordRec char87_stroke1[] = { - { 52.3809, 100 }, - { 28.5714, 0 }, -}; - -static const CoordRec char87_stroke2[] = { - { 52.3809, 100 }, - { 76.1905, 0 }, -}; - -static const CoordRec char87_stroke3[] = { - { 100, 100 }, - { 76.1905, 0 }, -}; - -static const StrokeRec char87[] = { - { 2, char87_stroke0 }, - { 2, char87_stroke1 }, - { 2, char87_stroke2 }, - { 2, char87_stroke3 }, -}; - -/* char: 88 'X' */ - -static const CoordRec char88_stroke0[] = { - { 19.0476, 100 }, - { 85.7143, 0 }, -}; - -static const CoordRec char88_stroke1[] = { - { 85.7143, 100 }, - { 19.0476, 0 }, -}; - -static const StrokeRec char88[] = { - { 2, char88_stroke0 }, - { 2, char88_stroke1 }, -}; - -/* char: 89 'Y' */ - -static const CoordRec char89_stroke0[] = { - { 14.2857, 100 }, - { 52.3809, 52.381 }, - { 52.3809, 0 }, -}; - -static const CoordRec char89_stroke1[] = { - { 90.4762, 100 }, - { 52.3809, 52.381 }, -}; - -static const StrokeRec char89[] = { - { 3, char89_stroke0 }, - { 2, char89_stroke1 }, -}; - -/* char: 90 'Z' */ - -static const CoordRec char90_stroke0[] = { - { 85.7143, 100 }, - { 19.0476, 0 }, -}; - -static const CoordRec char90_stroke1[] = { - { 19.0476, 100 }, - { 85.7143, 100 }, -}; - -static const CoordRec char90_stroke2[] = { - { 19.0476, 0 }, - { 85.7143, 0 }, -}; - -static const StrokeRec char90[] = { - { 2, char90_stroke0 }, - { 2, char90_stroke1 }, - { 2, char90_stroke2 }, -}; - -/* char: 91 '[' */ - -static const CoordRec char91_stroke0[] = { - { 35.7143, 119.048 }, - { 35.7143, -33.3333 }, -}; - -static const CoordRec char91_stroke1[] = { - { 40.4762, 119.048 }, - { 40.4762, -33.3333 }, -}; - -static const CoordRec char91_stroke2[] = { - { 35.7143, 119.048 }, - { 69.0476, 119.048 }, -}; - -static const CoordRec char91_stroke3[] = { - { 35.7143, -33.3333 }, - { 69.0476, -33.3333 }, -}; - -static const StrokeRec char91[] = { - { 2, char91_stroke0 }, - { 2, char91_stroke1 }, - { 2, char91_stroke2 }, - { 2, char91_stroke3 }, -}; - -/* char: 92 '\' */ - -static const CoordRec char92_stroke0[] = { - { 19.0476, 100 }, - { 85.7143, -14.2857 }, -}; - -static const StrokeRec char92[] = { - { 2, char92_stroke0 }, -}; - -/* char: 93 ']' */ - -static const CoordRec char93_stroke0[] = { - { 64.2857, 119.048 }, - { 64.2857, -33.3333 }, -}; - -static const CoordRec char93_stroke1[] = { - { 69.0476, 119.048 }, - { 69.0476, -33.3333 }, -}; - -static const CoordRec char93_stroke2[] = { - { 35.7143, 119.048 }, - { 69.0476, 119.048 }, -}; - -static const CoordRec char93_stroke3[] = { - { 35.7143, -33.3333 }, - { 69.0476, -33.3333 }, -}; - -static const StrokeRec char93[] = { - { 2, char93_stroke0 }, - { 2, char93_stroke1 }, - { 2, char93_stroke2 }, - { 2, char93_stroke3 }, -}; - -/* char: 94 '^' */ - -static const CoordRec char94_stroke0[] = { - { 52.3809, 109.524 }, - { 14.2857, 42.8571 }, -}; - -static const CoordRec char94_stroke1[] = { - { 52.3809, 109.524 }, - { 90.4762, 42.8571 }, -}; - -static const StrokeRec char94[] = { - { 2, char94_stroke0 }, - { 2, char94_stroke1 }, -}; - -/* char: 95 '_' */ - -static const CoordRec char95_stroke0[] = { - { 0, -33.3333 }, - { 104.762, -33.3333 }, - { 104.762, -28.5714 }, - { 0, -28.5714 }, - { 0, -33.3333 }, -}; - -static const StrokeRec char95[] = { - { 5, char95_stroke0 }, -}; - -/* char: 96 '`' */ - -static const CoordRec char96_stroke0[] = { - { 42.8572, 100 }, - { 66.6667, 71.4286 }, -}; - -static const CoordRec char96_stroke1[] = { - { 42.8572, 100 }, - { 38.0953, 95.2381 }, - { 66.6667, 71.4286 }, -}; - -static const StrokeRec char96[] = { - { 2, char96_stroke0 }, - { 3, char96_stroke1 }, -}; - -/* char: 97 'a' */ - -static const CoordRec char97_stroke0[] = { - { 80.9524, 66.6667 }, - { 80.9524, 0 }, -}; - -static const CoordRec char97_stroke1[] = { - { 80.9524, 52.381 }, - { 71.4285, 61.9048 }, - { 61.9047, 66.6667 }, - { 47.619, 66.6667 }, - { 38.0952, 61.9048 }, - { 28.5714, 52.381 }, - { 23.8095, 38.0952 }, - { 23.8095, 28.5714 }, - { 28.5714, 14.2857 }, - { 38.0952, 4.7619 }, - { 47.619, 0 }, - { 61.9047, 0 }, - { 71.4285, 4.7619 }, - { 80.9524, 14.2857 }, -}; - -static const StrokeRec char97[] = { - { 2, char97_stroke0 }, - { 14, char97_stroke1 }, -}; - -/* char: 98 'b' */ - -static const CoordRec char98_stroke0[] = { - { 23.8095, 100 }, - { 23.8095, 0 }, -}; - -static const CoordRec char98_stroke1[] = { - { 23.8095, 52.381 }, - { 33.3333, 61.9048 }, - { 42.8571, 66.6667 }, - { 57.1428, 66.6667 }, - { 66.6666, 61.9048 }, - { 76.1905, 52.381 }, - { 80.9524, 38.0952 }, - { 80.9524, 28.5714 }, - { 76.1905, 14.2857 }, - { 66.6666, 4.7619 }, - { 57.1428, 0 }, - { 42.8571, 0 }, - { 33.3333, 4.7619 }, - { 23.8095, 14.2857 }, -}; - -static const StrokeRec char98[] = { - { 2, char98_stroke0 }, - { 14, char98_stroke1 }, -}; - -/* char: 99 'c' */ - -static const CoordRec char99_stroke0[] = { - { 80.9524, 52.381 }, - { 71.4285, 61.9048 }, - { 61.9047, 66.6667 }, - { 47.619, 66.6667 }, - { 38.0952, 61.9048 }, - { 28.5714, 52.381 }, - { 23.8095, 38.0952 }, - { 23.8095, 28.5714 }, - { 28.5714, 14.2857 }, - { 38.0952, 4.7619 }, - { 47.619, 0 }, - { 61.9047, 0 }, - { 71.4285, 4.7619 }, - { 80.9524, 14.2857 }, -}; - -static const StrokeRec char99[] = { - { 14, char99_stroke0 }, -}; - -/* char: 100 'd' */ - -static const CoordRec char100_stroke0[] = { - { 80.9524, 100 }, - { 80.9524, 0 }, -}; - -static const CoordRec char100_stroke1[] = { - { 80.9524, 52.381 }, - { 71.4285, 61.9048 }, - { 61.9047, 66.6667 }, - { 47.619, 66.6667 }, - { 38.0952, 61.9048 }, - { 28.5714, 52.381 }, - { 23.8095, 38.0952 }, - { 23.8095, 28.5714 }, - { 28.5714, 14.2857 }, - { 38.0952, 4.7619 }, - { 47.619, 0 }, - { 61.9047, 0 }, - { 71.4285, 4.7619 }, - { 80.9524, 14.2857 }, -}; - -static const StrokeRec char100[] = { - { 2, char100_stroke0 }, - { 14, char100_stroke1 }, -}; - -/* char: 101 'e' */ - -static const CoordRec char101_stroke0[] = { - { 23.8095, 38.0952 }, - { 80.9524, 38.0952 }, - { 80.9524, 47.619 }, - { 76.1905, 57.1429 }, - { 71.4285, 61.9048 }, - { 61.9047, 66.6667 }, - { 47.619, 66.6667 }, - { 38.0952, 61.9048 }, - { 28.5714, 52.381 }, - { 23.8095, 38.0952 }, - { 23.8095, 28.5714 }, - { 28.5714, 14.2857 }, - { 38.0952, 4.7619 }, - { 47.619, 0 }, - { 61.9047, 0 }, - { 71.4285, 4.7619 }, - { 80.9524, 14.2857 }, -}; - -static const StrokeRec char101[] = { - { 17, char101_stroke0 }, -}; - -/* char: 102 'f' */ - -static const CoordRec char102_stroke0[] = { - { 71.4286, 100 }, - { 61.9048, 100 }, - { 52.381, 95.2381 }, - { 47.6191, 80.9524 }, - { 47.6191, 0 }, -}; - -static const CoordRec char102_stroke1[] = { - { 33.3334, 66.6667 }, - { 66.6667, 66.6667 }, -}; - -static const StrokeRec char102[] = { - { 5, char102_stroke0 }, - { 2, char102_stroke1 }, -}; - -/* char: 103 'g' */ - -static const CoordRec char103_stroke0[] = { - { 80.9524, 66.6667 }, - { 80.9524, -9.5238 }, - { 76.1905, -23.8095 }, - { 71.4285, -28.5714 }, - { 61.9047, -33.3333 }, - { 47.619, -33.3333 }, - { 38.0952, -28.5714 }, -}; - -static const CoordRec char103_stroke1[] = { - { 80.9524, 52.381 }, - { 71.4285, 61.9048 }, - { 61.9047, 66.6667 }, - { 47.619, 66.6667 }, - { 38.0952, 61.9048 }, - { 28.5714, 52.381 }, - { 23.8095, 38.0952 }, - { 23.8095, 28.5714 }, - { 28.5714, 14.2857 }, - { 38.0952, 4.7619 }, - { 47.619, 0 }, - { 61.9047, 0 }, - { 71.4285, 4.7619 }, - { 80.9524, 14.2857 }, -}; - -static const StrokeRec char103[] = { - { 7, char103_stroke0 }, - { 14, char103_stroke1 }, -}; - -/* char: 104 'h' */ - -static const CoordRec char104_stroke0[] = { - { 26.1905, 100 }, - { 26.1905, 0 }, -}; - -static const CoordRec char104_stroke1[] = { - { 26.1905, 47.619 }, - { 40.4762, 61.9048 }, - { 50, 66.6667 }, - { 64.2857, 66.6667 }, - { 73.8095, 61.9048 }, - { 78.5715, 47.619 }, - { 78.5715, 0 }, -}; - -static const StrokeRec char104[] = { - { 2, char104_stroke0 }, - { 7, char104_stroke1 }, -}; - -/* char: 105 'i' */ - -static const CoordRec char105_stroke0[] = { - { 47.6191, 100 }, - { 52.381, 95.2381 }, - { 57.1429, 100 }, - { 52.381, 104.762 }, - { 47.6191, 100 }, -}; - -static const CoordRec char105_stroke1[] = { - { 52.381, 66.6667 }, - { 52.381, 0 }, -}; - -static const StrokeRec char105[] = { - { 5, char105_stroke0 }, - { 2, char105_stroke1 }, -}; - -/* char: 106 'j' */ - -static const CoordRec char106_stroke0[] = { - { 57.1429, 100 }, - { 61.9048, 95.2381 }, - { 66.6667, 100 }, - { 61.9048, 104.762 }, - { 57.1429, 100 }, -}; - -static const CoordRec char106_stroke1[] = { - { 61.9048, 66.6667 }, - { 61.9048, -14.2857 }, - { 57.1429, -28.5714 }, - { 47.6191, -33.3333 }, - { 38.0953, -33.3333 }, -}; - -static const StrokeRec char106[] = { - { 5, char106_stroke0 }, - { 5, char106_stroke1 }, -}; - -/* char: 107 'k' */ - -static const CoordRec char107_stroke0[] = { - { 26.1905, 100 }, - { 26.1905, 0 }, -}; - -static const CoordRec char107_stroke1[] = { - { 73.8095, 66.6667 }, - { 26.1905, 19.0476 }, -}; - -static const CoordRec char107_stroke2[] = { - { 45.2381, 38.0952 }, - { 78.5715, 0 }, -}; - -static const StrokeRec char107[] = { - { 2, char107_stroke0 }, - { 2, char107_stroke1 }, - { 2, char107_stroke2 }, -}; - -/* char: 108 'l' */ - -static const CoordRec char108_stroke0[] = { - { 52.381, 100 }, - { 52.381, 0 }, -}; - -static const StrokeRec char108[] = { - { 2, char108_stroke0 }, -}; - -/* char: 109 'm' */ - -static const CoordRec char109_stroke0[] = { - { 0, 66.6667 }, - { 0, 0 }, -}; - -static const CoordRec char109_stroke1[] = { - { 0, 47.619 }, - { 14.2857, 61.9048 }, - { 23.8095, 66.6667 }, - { 38.0952, 66.6667 }, - { 47.619, 61.9048 }, - { 52.381, 47.619 }, - { 52.381, 0 }, -}; - -static const CoordRec char109_stroke2[] = { - { 52.381, 47.619 }, - { 66.6667, 61.9048 }, - { 76.1905, 66.6667 }, - { 90.4762, 66.6667 }, - { 100, 61.9048 }, - { 104.762, 47.619 }, - { 104.762, 0 }, -}; - -static const StrokeRec char109[] = { - { 2, char109_stroke0 }, - { 7, char109_stroke1 }, - { 7, char109_stroke2 }, -}; - -/* char: 110 'n' */ - -static const CoordRec char110_stroke0[] = { - { 26.1905, 66.6667 }, - { 26.1905, 0 }, -}; - -static const CoordRec char110_stroke1[] = { - { 26.1905, 47.619 }, - { 40.4762, 61.9048 }, - { 50, 66.6667 }, - { 64.2857, 66.6667 }, - { 73.8095, 61.9048 }, - { 78.5715, 47.619 }, - { 78.5715, 0 }, -}; - -static const StrokeRec char110[] = { - { 2, char110_stroke0 }, - { 7, char110_stroke1 }, -}; - -/* char: 111 'o' */ - -static const CoordRec char111_stroke0[] = { - { 45.2381, 66.6667 }, - { 35.7143, 61.9048 }, - { 26.1905, 52.381 }, - { 21.4286, 38.0952 }, - { 21.4286, 28.5714 }, - { 26.1905, 14.2857 }, - { 35.7143, 4.7619 }, - { 45.2381, 0 }, - { 59.5238, 0 }, - { 69.0476, 4.7619 }, - { 78.5714, 14.2857 }, - { 83.3334, 28.5714 }, - { 83.3334, 38.0952 }, - { 78.5714, 52.381 }, - { 69.0476, 61.9048 }, - { 59.5238, 66.6667 }, - { 45.2381, 66.6667 }, -}; - -static const StrokeRec char111[] = { - { 17, char111_stroke0 }, -}; - -/* char: 112 'p' */ - -static const CoordRec char112_stroke0[] = { - { 23.8095, 66.6667 }, - { 23.8095, -33.3333 }, -}; - -static const CoordRec char112_stroke1[] = { - { 23.8095, 52.381 }, - { 33.3333, 61.9048 }, - { 42.8571, 66.6667 }, - { 57.1428, 66.6667 }, - { 66.6666, 61.9048 }, - { 76.1905, 52.381 }, - { 80.9524, 38.0952 }, - { 80.9524, 28.5714 }, - { 76.1905, 14.2857 }, - { 66.6666, 4.7619 }, - { 57.1428, 0 }, - { 42.8571, 0 }, - { 33.3333, 4.7619 }, - { 23.8095, 14.2857 }, -}; - -static const StrokeRec char112[] = { - { 2, char112_stroke0 }, - { 14, char112_stroke1 }, -}; - -/* char: 113 'q' */ - -static const CoordRec char113_stroke0[] = { - { 80.9524, 66.6667 }, - { 80.9524, -33.3333 }, -}; - -static const CoordRec char113_stroke1[] = { - { 80.9524, 52.381 }, - { 71.4285, 61.9048 }, - { 61.9047, 66.6667 }, - { 47.619, 66.6667 }, - { 38.0952, 61.9048 }, - { 28.5714, 52.381 }, - { 23.8095, 38.0952 }, - { 23.8095, 28.5714 }, - { 28.5714, 14.2857 }, - { 38.0952, 4.7619 }, - { 47.619, 0 }, - { 61.9047, 0 }, - { 71.4285, 4.7619 }, - { 80.9524, 14.2857 }, -}; - -static const StrokeRec char113[] = { - { 2, char113_stroke0 }, - { 14, char113_stroke1 }, -}; - -/* char: 114 'r' */ - -static const CoordRec char114_stroke0[] = { - { 33.3334, 66.6667 }, - { 33.3334, 0 }, -}; - -static const CoordRec char114_stroke1[] = { - { 33.3334, 38.0952 }, - { 38.0953, 52.381 }, - { 47.6191, 61.9048 }, - { 57.1429, 66.6667 }, - { 71.4286, 66.6667 }, -}; - -static const StrokeRec char114[] = { - { 2, char114_stroke0 }, - { 5, char114_stroke1 }, -}; - -/* char: 115 's' */ - -static const CoordRec char115_stroke0[] = { - { 78.5715, 52.381 }, - { 73.8095, 61.9048 }, - { 59.5238, 66.6667 }, - { 45.2381, 66.6667 }, - { 30.9524, 61.9048 }, - { 26.1905, 52.381 }, - { 30.9524, 42.8571 }, - { 40.4762, 38.0952 }, - { 64.2857, 33.3333 }, - { 73.8095, 28.5714 }, - { 78.5715, 19.0476 }, - { 78.5715, 14.2857 }, - { 73.8095, 4.7619 }, - { 59.5238, 0 }, - { 45.2381, 0 }, - { 30.9524, 4.7619 }, - { 26.1905, 14.2857 }, -}; - -static const StrokeRec char115[] = { - { 17, char115_stroke0 }, -}; - -/* char: 116 't' */ - -static const CoordRec char116_stroke0[] = { - { 47.6191, 100 }, - { 47.6191, 19.0476 }, - { 52.381, 4.7619 }, - { 61.9048, 0 }, - { 71.4286, 0 }, -}; - -static const CoordRec char116_stroke1[] = { - { 33.3334, 66.6667 }, - { 66.6667, 66.6667 }, -}; - -static const StrokeRec char116[] = { - { 5, char116_stroke0 }, - { 2, char116_stroke1 }, -}; - -/* char: 117 'u' */ - -static const CoordRec char117_stroke0[] = { - { 26.1905, 66.6667 }, - { 26.1905, 19.0476 }, - { 30.9524, 4.7619 }, - { 40.4762, 0 }, - { 54.7619, 0 }, - { 64.2857, 4.7619 }, - { 78.5715, 19.0476 }, -}; - -static const CoordRec char117_stroke1[] = { - { 78.5715, 66.6667 }, - { 78.5715, 0 }, -}; - -static const StrokeRec char117[] = { - { 7, char117_stroke0 }, - { 2, char117_stroke1 }, -}; - -/* char: 118 'v' */ - -static const CoordRec char118_stroke0[] = { - { 23.8095, 66.6667 }, - { 52.3809, 0 }, -}; - -static const CoordRec char118_stroke1[] = { - { 80.9524, 66.6667 }, - { 52.3809, 0 }, -}; - -static const StrokeRec char118[] = { - { 2, char118_stroke0 }, - { 2, char118_stroke1 }, -}; - -/* char: 119 'w' */ - -static const CoordRec char119_stroke0[] = { - { 14.2857, 66.6667 }, - { 33.3333, 0 }, -}; - -static const CoordRec char119_stroke1[] = { - { 52.3809, 66.6667 }, - { 33.3333, 0 }, -}; - -static const CoordRec char119_stroke2[] = { - { 52.3809, 66.6667 }, - { 71.4286, 0 }, -}; - -static const CoordRec char119_stroke3[] = { - { 90.4762, 66.6667 }, - { 71.4286, 0 }, -}; - -static const StrokeRec char119[] = { - { 2, char119_stroke0 }, - { 2, char119_stroke1 }, - { 2, char119_stroke2 }, - { 2, char119_stroke3 }, -}; - -/* char: 120 'x' */ - -static const CoordRec char120_stroke0[] = { - { 26.1905, 66.6667 }, - { 78.5715, 0 }, -}; - -static const CoordRec char120_stroke1[] = { - { 78.5715, 66.6667 }, - { 26.1905, 0 }, -}; - -static const StrokeRec char120[] = { - { 2, char120_stroke0 }, - { 2, char120_stroke1 }, -}; - -/* char: 121 'y' */ - -static const CoordRec char121_stroke0[] = { - { 26.1905, 66.6667 }, - { 54.7619, 0 }, -}; - -static const CoordRec char121_stroke1[] = { - { 83.3334, 66.6667 }, - { 54.7619, 0 }, - { 45.2381, -19.0476 }, - { 35.7143, -28.5714 }, - { 26.1905, -33.3333 }, - { 21.4286, -33.3333 }, -}; - -static const StrokeRec char121[] = { - { 2, char121_stroke0 }, - { 6, char121_stroke1 }, -}; - -/* char: 122 'z' */ - -static const CoordRec char122_stroke0[] = { - { 78.5715, 66.6667 }, - { 26.1905, 0 }, -}; - -static const CoordRec char122_stroke1[] = { - { 26.1905, 66.6667 }, - { 78.5715, 66.6667 }, -}; - -static const CoordRec char122_stroke2[] = { - { 26.1905, 0 }, - { 78.5715, 0 }, -}; - -static const StrokeRec char122[] = { - { 2, char122_stroke0 }, - { 2, char122_stroke1 }, - { 2, char122_stroke2 }, -}; - -/* char: 123 '{' */ - -static const CoordRec char123_stroke0[] = { - { 64.2857, 119.048 }, - { 54.7619, 114.286 }, - { 50, 109.524 }, - { 45.2381, 100 }, - { 45.2381, 90.4762 }, - { 50, 80.9524 }, - { 54.7619, 76.1905 }, - { 59.5238, 66.6667 }, - { 59.5238, 57.1429 }, - { 50, 47.619 }, -}; - -static const CoordRec char123_stroke1[] = { - { 54.7619, 114.286 }, - { 50, 104.762 }, - { 50, 95.2381 }, - { 54.7619, 85.7143 }, - { 59.5238, 80.9524 }, - { 64.2857, 71.4286 }, - { 64.2857, 61.9048 }, - { 59.5238, 52.381 }, - { 40.4762, 42.8571 }, - { 59.5238, 33.3333 }, - { 64.2857, 23.8095 }, - { 64.2857, 14.2857 }, - { 59.5238, 4.7619 }, - { 54.7619, 0 }, - { 50, -9.5238 }, - { 50, -19.0476 }, - { 54.7619, -28.5714 }, -}; - -static const CoordRec char123_stroke2[] = { - { 50, 38.0952 }, - { 59.5238, 28.5714 }, - { 59.5238, 19.0476 }, - { 54.7619, 9.5238 }, - { 50, 4.7619 }, - { 45.2381, -4.7619 }, - { 45.2381, -14.2857 }, - { 50, -23.8095 }, - { 54.7619, -28.5714 }, - { 64.2857, -33.3333 }, -}; - -static const StrokeRec char123[] = { - { 10, char123_stroke0 }, - { 17, char123_stroke1 }, - { 10, char123_stroke2 }, -}; - -/* char: 124 '|' */ - -static const CoordRec char124_stroke0[] = { - { 52.381, 119.048 }, - { 52.381, -33.3333 }, -}; - -static const StrokeRec char124[] = { - { 2, char124_stroke0 }, -}; - -/* char: 125 '}' */ - -static const CoordRec char125_stroke0[] = { - { 40.4762, 119.048 }, - { 50, 114.286 }, - { 54.7619, 109.524 }, - { 59.5238, 100 }, - { 59.5238, 90.4762 }, - { 54.7619, 80.9524 }, - { 50, 76.1905 }, - { 45.2381, 66.6667 }, - { 45.2381, 57.1429 }, - { 54.7619, 47.619 }, -}; - -static const CoordRec char125_stroke1[] = { - { 50, 114.286 }, - { 54.7619, 104.762 }, - { 54.7619, 95.2381 }, - { 50, 85.7143 }, - { 45.2381, 80.9524 }, - { 40.4762, 71.4286 }, - { 40.4762, 61.9048 }, - { 45.2381, 52.381 }, - { 64.2857, 42.8571 }, - { 45.2381, 33.3333 }, - { 40.4762, 23.8095 }, - { 40.4762, 14.2857 }, - { 45.2381, 4.7619 }, - { 50, 0 }, - { 54.7619, -9.5238 }, - { 54.7619, -19.0476 }, - { 50, -28.5714 }, -}; - -static const CoordRec char125_stroke2[] = { - { 54.7619, 38.0952 }, - { 45.2381, 28.5714 }, - { 45.2381, 19.0476 }, - { 50, 9.5238 }, - { 54.7619, 4.7619 }, - { 59.5238, -4.7619 }, - { 59.5238, -14.2857 }, - { 54.7619, -23.8095 }, - { 50, -28.5714 }, - { 40.4762, -33.3333 }, -}; - -static const StrokeRec char125[] = { - { 10, char125_stroke0 }, - { 17, char125_stroke1 }, - { 10, char125_stroke2 }, -}; - -/* char: 126 '~' */ - -static const CoordRec char126_stroke0[] = { - { 9.5238, 28.5714 }, - { 9.5238, 38.0952 }, - { 14.2857, 52.381 }, - { 23.8095, 57.1429 }, - { 33.3333, 57.1429 }, - { 42.8571, 52.381 }, - { 61.9048, 38.0952 }, - { 71.4286, 33.3333 }, - { 80.9524, 33.3333 }, - { 90.4762, 38.0952 }, - { 95.2381, 47.619 }, -}; - -static const CoordRec char126_stroke1[] = { - { 9.5238, 38.0952 }, - { 14.2857, 47.619 }, - { 23.8095, 52.381 }, - { 33.3333, 52.381 }, - { 42.8571, 47.619 }, - { 61.9048, 33.3333 }, - { 71.4286, 28.5714 }, - { 80.9524, 28.5714 }, - { 90.4762, 33.3333 }, - { 95.2381, 47.619 }, - { 95.2381, 57.1429 }, -}; - -static const StrokeRec char126[] = { - { 11, char126_stroke0 }, - { 11, char126_stroke1 }, -}; - -/* char: 127 */ - -static const CoordRec char127_stroke0[] = { - { 71.4286, 100 }, - { 33.3333, -33.3333 }, -}; - -static const CoordRec char127_stroke1[] = { - { 47.619, 66.6667 }, - { 33.3333, 61.9048 }, - { 23.8095, 52.381 }, - { 19.0476, 38.0952 }, - { 19.0476, 23.8095 }, - { 23.8095, 14.2857 }, - { 33.3333, 4.7619 }, - { 47.619, 0 }, - { 57.1428, 0 }, - { 71.4286, 4.7619 }, - { 80.9524, 14.2857 }, - { 85.7143, 28.5714 }, - { 85.7143, 42.8571 }, - { 80.9524, 52.381 }, - { 71.4286, 61.9048 }, - { 57.1428, 66.6667 }, - { 47.619, 66.6667 }, -}; - -static const StrokeRec char127[] = { - { 2, char127_stroke0 }, - { 17, char127_stroke1 }, -}; - -static const StrokeCharRec chars[] = { - { 0, /* char0 */ 0, 0, 0 }, - { 0, /* char1 */ 0, 0, 0 }, - { 0, /* char2 */ 0, 0, 0 }, - { 0, /* char3 */ 0, 0, 0 }, - { 0, /* char4 */ 0, 0, 0 }, - { 0, /* char5 */ 0, 0, 0 }, - { 0, /* char6 */ 0, 0, 0 }, - { 0, /* char7 */ 0, 0, 0 }, - { 0, /* char8 */ 0, 0, 0 }, - { 0, /* char9 */ 0, 0, 0 }, - { 0, /* char10 */ 0, 0, 0 }, - { 0, /* char11 */ 0, 0, 0 }, - { 0, /* char12 */ 0, 0, 0 }, - { 0, /* char13 */ 0, 0, 0 }, - { 0, /* char14 */ 0, 0, 0 }, - { 0, /* char15 */ 0, 0, 0 }, - { 0, /* char16 */ 0, 0, 0 }, - { 0, /* char17 */ 0, 0, 0 }, - { 0, /* char18 */ 0, 0, 0 }, - { 0, /* char19 */ 0, 0, 0 }, - { 0, /* char20 */ 0, 0, 0 }, - { 0, /* char21 */ 0, 0, 0 }, - { 0, /* char22 */ 0, 0, 0 }, - { 0, /* char23 */ 0, 0, 0 }, - { 0, /* char24 */ 0, 0, 0 }, - { 0, /* char25 */ 0, 0, 0 }, - { 0, /* char26 */ 0, 0, 0 }, - { 0, /* char27 */ 0, 0, 0 }, - { 0, /* char28 */ 0, 0, 0 }, - { 0, /* char29 */ 0, 0, 0 }, - { 0, /* char30 */ 0, 0, 0 }, - { 0, /* char31 */ 0, 0, 0 }, - { 0, /* char32 */ 0, 52.381, 104.762 }, - { 2, char33, 52.381, 104.762 }, - { 2, char34, 52.381, 104.762 }, - { 4, char35, 52.381, 104.762 }, - { 3, char36, 52.381, 104.762 }, - { 3, char37, 52.381, 104.762 }, - { 1, char38, 52.381, 104.762 }, - { 1, char39, 52.381, 104.762 }, - { 1, char40, 52.381, 104.762 }, - { 1, char41, 52.381, 104.762 }, - { 3, char42, 52.381, 104.762 }, - { 2, char43, 52.381, 104.762 }, - { 1, char44, 52.381, 104.762 }, - { 1, char45, 52.381, 104.762 }, - { 1, char46, 52.381, 104.762 }, - { 1, char47, 52.381, 104.762 }, - { 1, char48, 52.381, 104.762 }, - { 1, char49, 52.381, 104.762 }, - { 1, char50, 52.381, 104.762 }, - { 1, char51, 52.381, 104.762 }, - { 2, char52, 52.381, 104.762 }, - { 1, char53, 52.381, 104.762 }, - { 1, char54, 52.381, 104.762 }, - { 2, char55, 52.381, 104.762 }, - { 1, char56, 52.381, 104.762 }, - { 1, char57, 52.381, 104.762 }, - { 2, char58, 52.381, 104.762 }, - { 2, char59, 52.381, 104.762 }, - { 1, char60, 52.381, 104.762 }, - { 2, char61, 52.381, 104.762 }, - { 1, char62, 52.381, 104.762 }, - { 2, char63, 52.381, 104.762 }, - { 2, char64, 52.381, 104.762 }, - { 3, char65, 52.381, 104.762 }, - { 3, char66, 52.381, 104.762 }, - { 1, char67, 52.381, 104.762 }, - { 2, char68, 52.381, 104.762 }, - { 4, char69, 52.381, 104.762 }, - { 3, char70, 52.381, 104.762 }, - { 2, char71, 52.381, 104.762 }, - { 3, char72, 52.381, 104.762 }, - { 1, char73, 52.381, 104.762 }, - { 1, char74, 52.381, 104.762 }, - { 3, char75, 52.381, 104.762 }, - { 2, char76, 52.381, 104.762 }, - { 4, char77, 52.381, 104.762 }, - { 3, char78, 52.381, 104.762 }, - { 1, char79, 52.381, 104.762 }, - { 2, char80, 52.381, 104.762 }, - { 2, char81, 52.381, 104.762 }, - { 3, char82, 52.381, 104.762 }, - { 1, char83, 52.381, 104.762 }, - { 2, char84, 52.381, 104.762 }, - { 1, char85, 52.381, 104.762 }, - { 2, char86, 52.381, 104.762 }, - { 4, char87, 52.381, 104.762 }, - { 2, char88, 52.381, 104.762 }, - { 2, char89, 52.381, 104.762 }, - { 3, char90, 52.381, 104.762 }, - { 4, char91, 52.381, 104.762 }, - { 1, char92, 52.381, 104.762 }, - { 4, char93, 52.381, 104.762 }, - { 2, char94, 52.381, 104.762 }, - { 1, char95, 52.381, 104.762 }, - { 2, char96, 52.381, 104.762 }, - { 2, char97, 52.381, 104.762 }, - { 2, char98, 52.381, 104.762 }, - { 1, char99, 52.381, 104.762 }, - { 2, char100, 52.381, 104.762 }, - { 1, char101, 52.381, 104.762 }, - { 2, char102, 52.381, 104.762 }, - { 2, char103, 52.381, 104.762 }, - { 2, char104, 52.381, 104.762 }, - { 2, char105, 52.381, 104.762 }, - { 2, char106, 52.381, 104.762 }, - { 3, char107, 52.381, 104.762 }, - { 1, char108, 52.381, 104.762 }, - { 3, char109, 52.381, 104.762 }, - { 2, char110, 52.381, 104.762 }, - { 1, char111, 52.381, 104.762 }, - { 2, char112, 52.381, 104.762 }, - { 2, char113, 52.381, 104.762 }, - { 2, char114, 52.381, 104.762 }, - { 1, char115, 52.381, 104.762 }, - { 2, char116, 52.381, 104.762 }, - { 2, char117, 52.381, 104.762 }, - { 2, char118, 52.381, 104.762 }, - { 4, char119, 52.381, 104.762 }, - { 2, char120, 52.381, 104.762 }, - { 2, char121, 52.381, 104.762 }, - { 3, char122, 52.381, 104.762 }, - { 3, char123, 52.381, 104.762 }, - { 1, char124, 52.381, 104.762 }, - { 3, char125, 52.381, 104.762 }, - { 2, char126, 52.381, 104.762 }, - { 2, char127, 52.381, 104.762 }, -}; - -StrokeFontRec glutStrokeMonoRoman = { "Roman", 128, chars, 119.048, -33.3333 }; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_overlay.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_overlay.c deleted file mode 100644 index 937ecb6824..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_overlay.c +++ /dev/null @@ -1,611 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1996, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#ifdef __VMS -#include -#endif - -#include -#include -#include -#include - -#if !defined(_WIN32) -#include -#include -#include /* for XA_RGB_DEFAULT_MAP atom */ -#if defined (__vms) -#include /* for XmuLookupStandardColormap */ -#else -#include /* for XmuLookupStandardColormap */ -#endif -#endif /* !_WIN32 */ - -#include "glutint.h" -#include "layerutil.h" - -static Criterion requiredOverlayCriteria[] = -{ - {LEVEL, EQ, 1}, /* This entry gets poked in - determineOverlayVisual. */ - {TRANSPARENT, EQ, 1}, - {XPSEUDOCOLOR, EQ, 1}, - {RGBA, EQ, 0}, - {BUFFER_SIZE, GTE, 1} -}; -static int numRequiredOverlayCriteria = sizeof(requiredOverlayCriteria) / sizeof(Criterion); -static int requiredOverlayCriteriaMask = -(1 << LEVEL) | (1 << TRANSPARENT) | (1 << XSTATICGRAY) | (1 << RGBA) | (1 << CI_MODE); - -#if !defined(_WIN32) -static int -checkOverlayAcceptability(XVisualInfo * vi, unsigned int mode) -{ - int value; - - /* Must support OpenGL. */ - glXGetConfig(__glutDisplay, vi, GLX_USE_GL, &value); - if (!value) - return 1; - - /* Must be color index. */ - glXGetConfig(__glutDisplay, vi, GLX_RGBA, &value); - if (value) - return 1; - - /* Must match single/double buffering request. */ - glXGetConfig(__glutDisplay, vi, GLX_DOUBLEBUFFER, &value); - if (GLUT_WIND_IS_DOUBLE(mode) != (value != 0)) - return 1; - - /* Must match mono/stereo request. */ - glXGetConfig(__glutDisplay, vi, GLX_STEREO, &value); - if (GLUT_WIND_IS_STEREO(mode) != (value != 0)) - return 1; - - /* Alpha and accumulation buffers incompatible with color - index. */ - if (GLUT_WIND_HAS_ALPHA(mode) || GLUT_WIND_HAS_ACCUM(mode)) - return 1; - - /* Look for depth buffer if requested. */ - glXGetConfig(__glutDisplay, vi, GLX_DEPTH_SIZE, &value); - if (GLUT_WIND_HAS_DEPTH(mode) && (value <= 0)) - return 1; - - /* Look for stencil buffer if requested. */ - glXGetConfig(__glutDisplay, vi, GLX_STENCIL_SIZE, &value); - if (GLUT_WIND_HAS_STENCIL(mode) && (value <= 0)) - return 1; - -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample) - /* XXX Multisampled overlay color index?? Pretty unlikely. */ - /* Look for multisampling if requested. */ - if (__glutIsSupportedByGLX("GLX_SGIS_multisample")) - glXGetConfig(__glutDisplay, vi, GLX_SAMPLES_SGIS, &value); - else - value = 0; - if (GLUT_WIND_IS_MULTISAMPLE(mode) && (value <= 0)) - return 1; -#endif - - return 0; -} -#endif - -static XVisualInfo * -getOverlayVisualInfoCI(unsigned int mode) -{ -#if !defined(_WIN32) - XLayerVisualInfo *vi; - XLayerVisualInfo template; - XVisualInfo *goodVisual, *returnVisual; - int nitems, i, j, bad; - - /* The GLX 1.0 glXChooseVisual is does not permit queries - based on pixel transparency (and GLX_BUFFER_SIZE uses - "smallest that meets" its requirement instead of "largest - that meets" that GLUT wants. So, GLUT implements its own - visual selection routine for color index overlays. */ - - /* Try three overlay layers. */ - for (i = 1; i <= 3; i++) { - template.vinfo.screen = __glutScreen; - template.vinfo.class = PseudoColor; - template.layer = i; - template.type = TransparentPixel; - vi = __glutXGetLayerVisualInfo(__glutDisplay, - VisualTransparentType | VisualScreenMask | VisualClassMask | VisualLayerMask, - &template, &nitems); - if (vi) { - /* Check list for acceptable visual meeting requirements - of requested display mode. */ - for (j = 0; j < nitems; j++) { - bad = checkOverlayAcceptability(&vi[j].vinfo, mode); - if (bad) { - /* Set vi[j].vinfo.visual to mark it unacceptable. */ - vi[j].vinfo.visual = NULL; - } - } - - /* Look through list to find deepest acceptable visual. */ - goodVisual = NULL; - for (j = 0; j < nitems; j++) { - if (vi[j].vinfo.visual) { - if (goodVisual == NULL) { - goodVisual = &vi[j].vinfo; - } else { - if (goodVisual->depth < vi[j].vinfo.depth) { - goodVisual = &vi[j].vinfo; - } - } - } - } - - /* If a visual is found, clean up and return the visual. */ - if (goodVisual) { - returnVisual = (XVisualInfo *) malloc(sizeof(XVisualInfo)); - if (returnVisual) { - *returnVisual = *goodVisual; - } - XFree(vi); - return returnVisual; - } - XFree(vi); - } - } -#endif /* !_WIN32 */ - return NULL; -} - -/* ARGSUSED */ -static XVisualInfo * -getOverlayVisualInfoRGB(unsigned int mode) -{ - - /* XXX For now, transparent RGBA overlays are not supported - by GLUT. RGBA overlays raise difficult questions about - what the transparent pixel (really color) value should be. - - Color index overlay transparency is "easy" because the - transparent pixel value does not affect displayable colors - (except for stealing one color cell) since colors are - determined by indirection through a colormap, and because - it is uncommon for arbitrary pixel values in color index to - be "calculated" (as can occur with a host of RGBA operations - like lighting, blending, etc) so it is easy to avoid the - transparent pixel value. - - Since it is typically easy to avoid the transparent pixel - value in color index mode, if GLUT tells the programmer what - pixel is transparent, then most program can easily avoid - generating that pixel value except when they intend - transparency. GLUT returns whatever transparent pixel value - is provided by the system through glutGet( - GLUT_TRANSPARENT_INDEX). - - Theory versus practice for RGBA overlay transparency: In - theory, the reasonable thing is enabling overlay transparency - when an overlay pixel's destination alpha is 0 because this - allows overlay transparency to be controlled via alpha and all - visibile colors are permited, but no hardware I am aware of - supports this practice (and it requires destination alpha which - is typically optional and quite uncommon for overlay windows!). - - In practice, the choice of transparent pixel value is typically - "hardwired" into most graphics hardware to a single pixel value. - SGI hardware uses true black (0,0,0) without regard for the - destination alpha. This is far from ideal because true black (a - common color that is easy to accidently generate) can not be - generated in an RGBA overlay. I am not sure what other vendors - do. - - Pragmatically, most of the typical things you want to do in the - overlays can be done in color index (rubber banding, pop-up - menus, etc.). One solution for GLUT would be to simply - "advertise" what RGB triple (or possibly RGBA quadruple or simply - A alone) generates transparency. The problem with this approach - is that it forces programmers to avoid whatever arbitrary color - various systems decide is transparent. This is a difficult - burden to place on programmers that want to portably make use of - overlays. - - To actually support transparent RGBA overlays, there are really - two reaonsable options. ONE: Simply mandate that true black is - the RGBA overlay transparent color (what IRIS GL did). This is - nice for programmers since only one option, nice for existing SGI - hardware, bad for anyone (including SGI) who wants to improve - upon "true black" RGB transparency. - - Or TWO: Provide a set of queriable "transparency types" (like - "true black" or "alpha == 0" or "true white" or even a queriable - transparent color). This is harder for programmers, OK for - existing SGI hardware, and it leaves open the issue of what other - modes are reasonable. - - Option TWO seems the more general approach, but since hardware - designers will likely only implement a single mode (this is a - scan out issue where bandwidth is pressing issue), codifying - multiple speculative approaches nobody may ever implement seems - silly. And option ONE fiats a suboptimal solution. - - Therefore, I defer any decision of how GLUT should support RGBA - overlay transparency and leave support for it unimplemented. - Nobody has been pressing me for RGBA overlay transparency (though - people have requested color index overlay transparency - repeatedly). Geez, if you read this far you are either really - bored or maybe actually interested in this topic. Anyway, if - you have ideas (particularly if you plan on implementing a - hardware scheme for RGBA overlay transparency), I'd be - interested. - - For the record, SGI's expiremental Framebufer Configuration - experimental GLX extension uses option TWO. Transparency modes - for "none" and "RGB" are defined (others could be defined later). - What RGB value is the transparent one must be queried. - - I was hoping GLUT could have something that required less work - from the programmer to use portably. -mjk */ - - __glutWarning("RGBA overlays are not supported by GLUT (for now)."); - return NULL; -} - -static XVisualInfo * -getOverlayVisualInfo(unsigned int mode) -{ - /* XXX GLUT_LUMINANCE not implemented for GLUT 3.0. */ - if (GLUT_WIND_IS_LUMINANCE(mode)) - return NULL; - - if (GLUT_WIND_IS_RGB(mode)) - return getOverlayVisualInfoRGB(mode); - else - return getOverlayVisualInfoCI(mode); -} - -#if !defined(_WIN32) - -/* The GLUT overlay can come and go, and the overlay window has - a distinct X window ID. Logically though, GLUT treats the - normal and overlay windows as a unified window. In - particular, X input events typically go to the overlay window - since it is "on top of" the normal window. When an overlay - window ID is destroyed (due to glutRemoveOverlay or a call to - glutEstablishOverlay when an overlay already exists), we - still keep track of the overlay window ID until we get back a - DestroyNotify event for the overlay window. Otherwise, we - could lose track of X input events sent to a destroyed - overlay. To avoid this, we keep the destroyed overlay window - ID on a "stale window" list. This lets us properly route X - input events generated on destroyed overlay windows to the - proper GLUT window. */ -static void -addStaleWindow(GLUTwindow * window, Window win) -{ - GLUTstale *entry; - - entry = (GLUTstale *) malloc(sizeof(GLUTstale)); - if (!entry) - __glutFatalError("out of memory"); - entry->window = window; - entry->win = win; - entry->next = __glutStaleWindowList; - __glutStaleWindowList = entry; -} - -#endif - -void -__glutFreeOverlay(GLUToverlay * overlay) -{ - if (overlay->visAlloced) - XFree(overlay->vis); - XDestroyWindow(__glutDisplay, overlay->win); - glXDestroyContext(__glutDisplay, overlay->ctx); - if (overlay->colormap) { - /* Only color index overlays have colormap data structure. */ - __glutFreeColormap(overlay->colormap); - } - free(overlay); -} - -static XVisualInfo * -determineOverlayVisual(int *treatAsSingle, Bool * visAlloced, void **fbc) -{ - if (__glutDisplayString) { - XVisualInfo *vi; - int i; - - /* __glutDisplayString should be NULL except if - glutInitDisplayString has been called to register a - different display string. Calling glutInitDisplayString - means using a string instead of an integer mask determine - - the visual to use. Using the function pointer variable - __glutDetermineVisualFromString below avoids linking in - the code for implementing glutInitDisplayString (ie, - glut_dstr.o) unless glutInitDisplayString gets called by - the application. */ - - assert(__glutDetermineVisualFromString); - - /* Try three overlay layers. */ - *visAlloced = False; - *fbc = NULL; - for (i = 1; i <= 3; i++) { - requiredOverlayCriteria[0].value = i; - vi = __glutDetermineVisualFromString(__glutDisplayString, treatAsSingle, - requiredOverlayCriteria, numRequiredOverlayCriteria, - requiredOverlayCriteriaMask, fbc); - if (vi) { - return vi; - } - } - return NULL; - } else { - *visAlloced = True; - *fbc = NULL; - return __glutDetermineVisual(__glutDisplayMode, - treatAsSingle, getOverlayVisualInfo); - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutEstablishOverlay(void) -{ - GLUToverlay *overlay; - GLUTwindow *window; - XSetWindowAttributes wa; -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - GLXFBConfigSGIX fbc; -#else - void *fbc; -#endif - - /* Register a routine to free an overlay with glut_win.c; - this keeps glut_win.c from pulling in all of - glut_overlay.c when no overlay functionality is used by - the application. */ - __glutFreeOverlayFunc = __glutFreeOverlay; - - window = __glutCurrentWindow; - - /* Allow for an existant overlay to be re-established perhaps - if you wanted a different display mode. */ - if (window->overlay) { -#if !defined(_WIN32) - addStaleWindow(window, window->overlay->win); -#endif - __glutFreeOverlay(window->overlay); - } - overlay = (GLUToverlay *) malloc(sizeof(GLUToverlay)); - if (!overlay) - __glutFatalError("out of memory."); - - overlay->vis = determineOverlayVisual(&overlay->treatAsSingle, - &overlay->visAlloced, (void **) &fbc); - if (!overlay->vis) { - __glutFatalError("lacks overlay support."); - } -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - if (fbc) { - window->ctx = __glut_glXCreateContextWithConfigSGIX(__glutDisplay, fbc, - GLX_RGBA_TYPE_SGIX, None, __glutTryDirect); - } else -#endif - { - overlay->ctx = glXCreateContext(__glutDisplay, overlay->vis, - None, __glutTryDirect); - } - if (!overlay->ctx) { - __glutFatalError( - "failed to create overlay OpenGL rendering context."); - } -#if !defined(_WIN32) - overlay->isDirect = glXIsDirect(__glutDisplay, overlay->ctx); - if (__glutForceDirect) { - if (!overlay->isDirect) { - __glutFatalError("direct rendering not possible."); - } - } -#endif - __glutSetupColormap(overlay->vis, &overlay->colormap, &overlay->cmap); - overlay->transparentPixel = __glutGetTransparentPixel(__glutDisplay, - overlay->vis); - wa.colormap = overlay->cmap; - wa.background_pixel = overlay->transparentPixel; - wa.event_mask = window->eventMask & GLUT_OVERLAY_EVENT_FILTER_MASK; - wa.border_pixel = 0; -#if defined(_WIN32) - /* XXX Overlays not supported in Win32 yet. */ -#else - overlay->win = XCreateWindow(__glutDisplay, - window->win, - 0, 0, window->width, window->height, 0, - overlay->vis->depth, InputOutput, overlay->vis->visual, - CWBackPixel | CWBorderPixel | CWEventMask | CWColormap, - &wa); -#endif - if (window->children) { - /* Overlay window must be lowered below any GLUT - subwindows. */ - XLowerWindow(__glutDisplay, overlay->win); - } - XMapWindow(__glutDisplay, overlay->win); - overlay->shownState = 1; - - overlay->display = NULL; - - /* Make sure a reshape gets delivered. */ - window->forceReshape = True; - -#if !defined(_WIN32) - __glutPutOnWorkList(__glutToplevelOf(window), GLUT_COLORMAP_WORK); -#endif - - window->overlay = overlay; - glutUseLayer(GLUT_OVERLAY); - - if (overlay->treatAsSingle) { - glDrawBuffer(GL_FRONT); - glReadBuffer(GL_FRONT); - } -} - -void GLUTAPIENTRY -glutRemoveOverlay(void) -{ - GLUTwindow *window = __glutCurrentWindow; - GLUToverlay *overlay = __glutCurrentWindow->overlay; - - if (!window->overlay) - return; - - /* If using overlay, switch to the normal layer. */ - if (window->renderWin == overlay->win) { - glutUseLayer(GLUT_NORMAL); - } -#if !defined(_WIN32) - addStaleWindow(window, overlay->win); -#endif - __glutFreeOverlay(overlay); - window->overlay = NULL; -#if !defined(_WIN32) - __glutPutOnWorkList(__glutToplevelOf(window), GLUT_COLORMAP_WORK); -#endif -} - -void GLUTAPIENTRY -glutUseLayer(GLenum layer) -{ - GLUTwindow *window = __glutCurrentWindow; - - switch (layer) { - case GLUT_NORMAL: -#ifdef _WIN32 - window->renderDc = window->hdc; -#endif - window->renderWin = window->win; - window->renderCtx = window->ctx; - break; - case GLUT_OVERLAY: - /* Did you crash here? Calling glutUseLayer(GLUT_OVERLAY) - without an overlay established is erroneous. Fix your - code. */ -#ifdef _WIN32 - window->renderDc = window->overlay->hdc; -#endif - window->renderWin = window->overlay->win; - window->renderCtx = window->overlay->ctx; - break; - default: - __glutWarning("glutUseLayer: unknown layer, %d.", layer); - break; - } - __glutSetWindow(window); -} - -void GLUTAPIENTRY -glutPostOverlayRedisplay(void) -{ - __glutPostRedisplay(__glutCurrentWindow, GLUT_OVERLAY_REDISPLAY_WORK); -} - -/* The advantage of this routine is that it saves the cost of a - glutSetWindow call (entailing an expensive OpenGL context - switch), particularly useful when multiple windows need - redisplays posted at the same times. */ -void GLUTAPIENTRY -glutPostWindowOverlayRedisplay(int win) -{ - __glutPostRedisplay(__glutWindowList[win - 1], GLUT_OVERLAY_REDISPLAY_WORK); -} - -void GLUTAPIENTRY -glutOverlayDisplayFunc(GLUTdisplayCB displayFunc) -{ - if (!__glutCurrentWindow->overlay) { - __glutWarning("glutOverlayDisplayFunc: window has no overlay established"); - return; - } - __glutCurrentWindow->overlay->display = displayFunc; -} - -void GLUTAPIENTRY -glutHideOverlay(void) -{ - if (!__glutCurrentWindow->overlay) { - __glutWarning("glutHideOverlay: window has no overlay established"); - return; - } - XUnmapWindow(__glutDisplay, __glutCurrentWindow->overlay->win); - __glutCurrentWindow->overlay->shownState = 0; -} - -void GLUTAPIENTRY -glutShowOverlay(void) -{ - if (!__glutCurrentWindow->overlay) { - __glutWarning("glutShowOverlay: window has no overlay established"); - return; - } - XMapWindow(__glutDisplay, __glutCurrentWindow->overlay->win); - __glutCurrentWindow->overlay->shownState = 1; -} - -int GLUTAPIENTRY -glutLayerGet(GLenum param) -{ - switch (param) { - case GLUT_OVERLAY_POSSIBLE: - { - XVisualInfo *vi; - Bool dummy, visAlloced; - void *fbc; - - vi = determineOverlayVisual(&dummy, &visAlloced, &fbc); - if (vi) { - if (visAlloced) - XFree(vi); - return 1; - } - return 0; - } - case GLUT_LAYER_IN_USE: - return __glutCurrentWindow->renderWin != __glutCurrentWindow->win; - case GLUT_HAS_OVERLAY: - return __glutCurrentWindow->overlay != NULL; - case GLUT_TRANSPARENT_INDEX: - if (__glutCurrentWindow->overlay) { - return __glutCurrentWindow->overlay->transparentPixel; - } else { - return -1; - } - case GLUT_NORMAL_DAMAGED: - /* __glutWindowDamaged is used so the damage state within - the window (or overlay belwo) can be cleared before - calling a display callback so on return, the state does - not have to be cleared (since upon return from the - callback the window could be destroyed (or layer - removed). */ - return (__glutCurrentWindow->workMask & GLUT_REPAIR_WORK) - || __glutWindowDamaged; - case GLUT_OVERLAY_DAMAGED: - if (__glutCurrentWindow->overlay) { - return (__glutCurrentWindow->workMask & GLUT_OVERLAY_REPAIR_WORK) - || __glutWindowDamaged; - } else { - return -1; - } - default: - __glutWarning("invalid glutLayerGet param: %d", param); - return -1; - } -} -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_roman.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_roman.c deleted file mode 100644 index af2b4ec956..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_roman.c +++ /dev/null @@ -1,2451 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#include "glutstroke.h" - -/* char: 33 '!' */ - -static const CoordRec char33_stroke0[] = { - { 13.3819, 100 }, - { 13.3819, 33.3333 }, -}; - -static const CoordRec char33_stroke1[] = { - { 13.3819, 9.5238 }, - { 8.62, 4.7619 }, - { 13.3819, 0 }, - { 18.1438, 4.7619 }, - { 13.3819, 9.5238 }, -}; - -static const StrokeRec char33[] = { - { 2, char33_stroke0 }, - { 5, char33_stroke1 }, -}; - -/* char: 34 '"' */ - -static const CoordRec char34_stroke0[] = { - { 4.02, 100 }, - { 4.02, 66.6667 }, -}; - -static const CoordRec char34_stroke1[] = { - { 42.1152, 100 }, - { 42.1152, 66.6667 }, -}; - -static const StrokeRec char34[] = { - { 2, char34_stroke0 }, - { 2, char34_stroke1 }, -}; - -/* char: 35 '#' */ - -static const CoordRec char35_stroke0[] = { - { 41.2952, 119.048 }, - { 7.9619, -33.3333 }, -}; - -static const CoordRec char35_stroke1[] = { - { 69.8667, 119.048 }, - { 36.5333, -33.3333 }, -}; - -static const CoordRec char35_stroke2[] = { - { 7.9619, 57.1429 }, - { 74.6286, 57.1429 }, -}; - -static const CoordRec char35_stroke3[] = { - { 3.2, 28.5714 }, - { 69.8667, 28.5714 }, -}; - -static const StrokeRec char35[] = { - { 2, char35_stroke0 }, - { 2, char35_stroke1 }, - { 2, char35_stroke2 }, - { 2, char35_stroke3 }, -}; - -/* char: 36 '$' */ - -static const CoordRec char36_stroke0[] = { - { 28.6295, 119.048 }, - { 28.6295, -19.0476 }, -}; - -static const CoordRec char36_stroke1[] = { - { 47.6771, 119.048 }, - { 47.6771, -19.0476 }, -}; - -static const CoordRec char36_stroke2[] = { - { 71.4867, 85.7143 }, - { 61.9629, 95.2381 }, - { 47.6771, 100 }, - { 28.6295, 100 }, - { 14.3438, 95.2381 }, - { 4.82, 85.7143 }, - { 4.82, 76.1905 }, - { 9.5819, 66.6667 }, - { 14.3438, 61.9048 }, - { 23.8676, 57.1429 }, - { 52.439, 47.619 }, - { 61.9629, 42.8571 }, - { 66.7248, 38.0952 }, - { 71.4867, 28.5714 }, - { 71.4867, 14.2857 }, - { 61.9629, 4.7619 }, - { 47.6771, 0 }, - { 28.6295, 0 }, - { 14.3438, 4.7619 }, - { 4.82, 14.2857 }, -}; - -static const StrokeRec char36[] = { - { 2, char36_stroke0 }, - { 2, char36_stroke1 }, - { 20, char36_stroke2 }, -}; - -/* char: 37 '%' */ - -static const CoordRec char37_stroke0[] = { - { 92.0743, 100 }, - { 6.36, 0 }, -}; - -static const CoordRec char37_stroke1[] = { - { 30.1695, 100 }, - { 39.6933, 90.4762 }, - { 39.6933, 80.9524 }, - { 34.9314, 71.4286 }, - { 25.4076, 66.6667 }, - { 15.8838, 66.6667 }, - { 6.36, 76.1905 }, - { 6.36, 85.7143 }, - { 11.1219, 95.2381 }, - { 20.6457, 100 }, - { 30.1695, 100 }, - { 39.6933, 95.2381 }, - { 53.979, 90.4762 }, - { 68.2648, 90.4762 }, - { 82.5505, 95.2381 }, - { 92.0743, 100 }, -}; - -static const CoordRec char37_stroke2[] = { - { 73.0267, 33.3333 }, - { 63.5029, 28.5714 }, - { 58.741, 19.0476 }, - { 58.741, 9.5238 }, - { 68.2648, 0 }, - { 77.7886, 0 }, - { 87.3124, 4.7619 }, - { 92.0743, 14.2857 }, - { 92.0743, 23.8095 }, - { 82.5505, 33.3333 }, - { 73.0267, 33.3333 }, -}; - -static const StrokeRec char37[] = { - { 2, char37_stroke0 }, - { 16, char37_stroke1 }, - { 11, char37_stroke2 }, -}; - -/* char: 38 '&' */ - -static const CoordRec char38_stroke0[] = { - { 101.218, 57.1429 }, - { 101.218, 61.9048 }, - { 96.4562, 66.6667 }, - { 91.6943, 66.6667 }, - { 86.9324, 61.9048 }, - { 82.1705, 52.381 }, - { 72.6467, 28.5714 }, - { 63.1229, 14.2857 }, - { 53.599, 4.7619 }, - { 44.0752, 0 }, - { 25.0276, 0 }, - { 15.5038, 4.7619 }, - { 10.7419, 9.5238 }, - { 5.98, 19.0476 }, - { 5.98, 28.5714 }, - { 10.7419, 38.0952 }, - { 15.5038, 42.8571 }, - { 48.8371, 61.9048 }, - { 53.599, 66.6667 }, - { 58.361, 76.1905 }, - { 58.361, 85.7143 }, - { 53.599, 95.2381 }, - { 44.0752, 100 }, - { 34.5514, 95.2381 }, - { 29.7895, 85.7143 }, - { 29.7895, 76.1905 }, - { 34.5514, 61.9048 }, - { 44.0752, 47.619 }, - { 67.8848, 14.2857 }, - { 77.4086, 4.7619 }, - { 86.9324, 0 }, - { 96.4562, 0 }, - { 101.218, 4.7619 }, - { 101.218, 9.5238 }, -}; - -static const StrokeRec char38[] = { - { 34, char38_stroke0 }, -}; - -/* char: 39 ''' */ - -static const CoordRec char39_stroke0[] = { - { 4.44, 100 }, - { 4.44, 66.6667 }, -}; - -static const StrokeRec char39[] = { - { 2, char39_stroke0 }, -}; - -/* char: 40 '(' */ - -static const CoordRec char40_stroke0[] = { - { 40.9133, 119.048 }, - { 31.3895, 109.524 }, - { 21.8657, 95.2381 }, - { 12.3419, 76.1905 }, - { 7.58, 52.381 }, - { 7.58, 33.3333 }, - { 12.3419, 9.5238 }, - { 21.8657, -9.5238 }, - { 31.3895, -23.8095 }, - { 40.9133, -33.3333 }, -}; - -static const StrokeRec char40[] = { - { 10, char40_stroke0 }, -}; - -/* char: 41 ')' */ - -static const CoordRec char41_stroke0[] = { - { 5.28, 119.048 }, - { 14.8038, 109.524 }, - { 24.3276, 95.2381 }, - { 33.8514, 76.1905 }, - { 38.6133, 52.381 }, - { 38.6133, 33.3333 }, - { 33.8514, 9.5238 }, - { 24.3276, -9.5238 }, - { 14.8038, -23.8095 }, - { 5.28, -33.3333 }, -}; - -static const StrokeRec char41[] = { - { 10, char41_stroke0 }, -}; - -/* char: 42 '*' */ - -static const CoordRec char42_stroke0[] = { - { 30.7695, 71.4286 }, - { 30.7695, 14.2857 }, -}; - -static const CoordRec char42_stroke1[] = { - { 6.96, 57.1429 }, - { 54.579, 28.5714 }, -}; - -static const CoordRec char42_stroke2[] = { - { 54.579, 57.1429 }, - { 6.96, 28.5714 }, -}; - -static const StrokeRec char42[] = { - { 2, char42_stroke0 }, - { 2, char42_stroke1 }, - { 2, char42_stroke2 }, -}; - -/* char: 43 '+' */ - -static const CoordRec char43_stroke0[] = { - { 48.8371, 85.7143 }, - { 48.8371, 0 }, -}; - -static const CoordRec char43_stroke1[] = { - { 5.98, 42.8571 }, - { 91.6943, 42.8571 }, -}; - -static const StrokeRec char43[] = { - { 2, char43_stroke0 }, - { 2, char43_stroke1 }, -}; - -/* char: 44 ',' */ - -static const CoordRec char44_stroke0[] = { - { 18.2838, 4.7619 }, - { 13.5219, 0 }, - { 8.76, 4.7619 }, - { 13.5219, 9.5238 }, - { 18.2838, 4.7619 }, - { 18.2838, -4.7619 }, - { 13.5219, -14.2857 }, - { 8.76, -19.0476 }, -}; - -static const StrokeRec char44[] = { - { 8, char44_stroke0 }, -}; - -/* char: 45 '-' */ - -static const CoordRec char45_stroke0[] = { - { 7.38, 42.8571 }, - { 93.0943, 42.8571 }, -}; - -static const StrokeRec char45[] = { - { 2, char45_stroke0 }, -}; - -/* char: 46 '.' */ - -static const CoordRec char46_stroke0[] = { - { 13.1019, 9.5238 }, - { 8.34, 4.7619 }, - { 13.1019, 0 }, - { 17.8638, 4.7619 }, - { 13.1019, 9.5238 }, -}; - -static const StrokeRec char46[] = { - { 5, char46_stroke0 }, -}; - -/* char: 47 '/' */ - -static const CoordRec char47_stroke0[] = { - { 7.24, -14.2857 }, - { 73.9067, 100 }, -}; - -static const StrokeRec char47[] = { - { 2, char47_stroke0 }, -}; - -/* char: 48 '0' */ - -static const CoordRec char48_stroke0[] = { - { 33.5514, 100 }, - { 19.2657, 95.2381 }, - { 9.7419, 80.9524 }, - { 4.98, 57.1429 }, - { 4.98, 42.8571 }, - { 9.7419, 19.0476 }, - { 19.2657, 4.7619 }, - { 33.5514, 0 }, - { 43.0752, 0 }, - { 57.361, 4.7619 }, - { 66.8848, 19.0476 }, - { 71.6467, 42.8571 }, - { 71.6467, 57.1429 }, - { 66.8848, 80.9524 }, - { 57.361, 95.2381 }, - { 43.0752, 100 }, - { 33.5514, 100 }, -}; - -static const StrokeRec char48[] = { - { 17, char48_stroke0 }, -}; - -/* char: 49 '1' */ - -static const CoordRec char49_stroke0[] = { - { 11.82, 80.9524 }, - { 21.3438, 85.7143 }, - { 35.6295, 100 }, - { 35.6295, 0 }, -}; - -static const StrokeRec char49[] = { - { 4, char49_stroke0 }, -}; - -/* char: 50 '2' */ - -static const CoordRec char50_stroke0[] = { - { 10.1819, 76.1905 }, - { 10.1819, 80.9524 }, - { 14.9438, 90.4762 }, - { 19.7057, 95.2381 }, - { 29.2295, 100 }, - { 48.2771, 100 }, - { 57.801, 95.2381 }, - { 62.5629, 90.4762 }, - { 67.3248, 80.9524 }, - { 67.3248, 71.4286 }, - { 62.5629, 61.9048 }, - { 53.039, 47.619 }, - { 5.42, 0 }, - { 72.0867, 0 }, -}; - -static const StrokeRec char50[] = { - { 14, char50_stroke0 }, -}; - -/* char: 51 '3' */ - -static const CoordRec char51_stroke0[] = { - { 14.5238, 100 }, - { 66.9048, 100 }, - { 38.3333, 61.9048 }, - { 52.619, 61.9048 }, - { 62.1429, 57.1429 }, - { 66.9048, 52.381 }, - { 71.6667, 38.0952 }, - { 71.6667, 28.5714 }, - { 66.9048, 14.2857 }, - { 57.381, 4.7619 }, - { 43.0952, 0 }, - { 28.8095, 0 }, - { 14.5238, 4.7619 }, - { 9.7619, 9.5238 }, - { 5, 19.0476 }, -}; - -static const StrokeRec char51[] = { - { 15, char51_stroke0 }, -}; - -/* char: 52 '4' */ - -static const CoordRec char52_stroke0[] = { - { 51.499, 100 }, - { 3.88, 33.3333 }, - { 75.3086, 33.3333 }, -}; - -static const CoordRec char52_stroke1[] = { - { 51.499, 100 }, - { 51.499, 0 }, -}; - -static const StrokeRec char52[] = { - { 3, char52_stroke0 }, - { 2, char52_stroke1 }, -}; - -/* char: 53 '5' */ - -static const CoordRec char53_stroke0[] = { - { 62.0029, 100 }, - { 14.3838, 100 }, - { 9.6219, 57.1429 }, - { 14.3838, 61.9048 }, - { 28.6695, 66.6667 }, - { 42.9552, 66.6667 }, - { 57.241, 61.9048 }, - { 66.7648, 52.381 }, - { 71.5267, 38.0952 }, - { 71.5267, 28.5714 }, - { 66.7648, 14.2857 }, - { 57.241, 4.7619 }, - { 42.9552, 0 }, - { 28.6695, 0 }, - { 14.3838, 4.7619 }, - { 9.6219, 9.5238 }, - { 4.86, 19.0476 }, -}; - -static const StrokeRec char53[] = { - { 17, char53_stroke0 }, -}; - -/* char: 54 '6' */ - -static const CoordRec char54_stroke0[] = { - { 62.7229, 85.7143 }, - { 57.961, 95.2381 }, - { 43.6752, 100 }, - { 34.1514, 100 }, - { 19.8657, 95.2381 }, - { 10.3419, 80.9524 }, - { 5.58, 57.1429 }, - { 5.58, 33.3333 }, - { 10.3419, 14.2857 }, - { 19.8657, 4.7619 }, - { 34.1514, 0 }, - { 38.9133, 0 }, - { 53.199, 4.7619 }, - { 62.7229, 14.2857 }, - { 67.4848, 28.5714 }, - { 67.4848, 33.3333 }, - { 62.7229, 47.619 }, - { 53.199, 57.1429 }, - { 38.9133, 61.9048 }, - { 34.1514, 61.9048 }, - { 19.8657, 57.1429 }, - { 10.3419, 47.619 }, - { 5.58, 33.3333 }, -}; - -static const StrokeRec char54[] = { - { 23, char54_stroke0 }, -}; - -/* char: 55 '7' */ - -static const CoordRec char55_stroke0[] = { - { 72.2267, 100 }, - { 24.6076, 0 }, -}; - -static const CoordRec char55_stroke1[] = { - { 5.56, 100 }, - { 72.2267, 100 }, -}; - -static const StrokeRec char55[] = { - { 2, char55_stroke0 }, - { 2, char55_stroke1 }, -}; - -/* char: 56 '8' */ - -static const CoordRec char56_stroke0[] = { - { 29.4095, 100 }, - { 15.1238, 95.2381 }, - { 10.3619, 85.7143 }, - { 10.3619, 76.1905 }, - { 15.1238, 66.6667 }, - { 24.6476, 61.9048 }, - { 43.6952, 57.1429 }, - { 57.981, 52.381 }, - { 67.5048, 42.8571 }, - { 72.2667, 33.3333 }, - { 72.2667, 19.0476 }, - { 67.5048, 9.5238 }, - { 62.7429, 4.7619 }, - { 48.4571, 0 }, - { 29.4095, 0 }, - { 15.1238, 4.7619 }, - { 10.3619, 9.5238 }, - { 5.6, 19.0476 }, - { 5.6, 33.3333 }, - { 10.3619, 42.8571 }, - { 19.8857, 52.381 }, - { 34.1714, 57.1429 }, - { 53.219, 61.9048 }, - { 62.7429, 66.6667 }, - { 67.5048, 76.1905 }, - { 67.5048, 85.7143 }, - { 62.7429, 95.2381 }, - { 48.4571, 100 }, - { 29.4095, 100 }, -}; - -static const StrokeRec char56[] = { - { 29, char56_stroke0 }, -}; - -/* char: 57 '9' */ - -static const CoordRec char57_stroke0[] = { - { 68.5048, 66.6667 }, - { 63.7429, 52.381 }, - { 54.219, 42.8571 }, - { 39.9333, 38.0952 }, - { 35.1714, 38.0952 }, - { 20.8857, 42.8571 }, - { 11.3619, 52.381 }, - { 6.6, 66.6667 }, - { 6.6, 71.4286 }, - { 11.3619, 85.7143 }, - { 20.8857, 95.2381 }, - { 35.1714, 100 }, - { 39.9333, 100 }, - { 54.219, 95.2381 }, - { 63.7429, 85.7143 }, - { 68.5048, 66.6667 }, - { 68.5048, 42.8571 }, - { 63.7429, 19.0476 }, - { 54.219, 4.7619 }, - { 39.9333, 0 }, - { 30.4095, 0 }, - { 16.1238, 4.7619 }, - { 11.3619, 14.2857 }, -}; - -static const StrokeRec char57[] = { - { 23, char57_stroke0 }, -}; - -/* char: 58 ':' */ - -static const CoordRec char58_stroke0[] = { - { 14.0819, 66.6667 }, - { 9.32, 61.9048 }, - { 14.0819, 57.1429 }, - { 18.8438, 61.9048 }, - { 14.0819, 66.6667 }, -}; - -static const CoordRec char58_stroke1[] = { - { 14.0819, 9.5238 }, - { 9.32, 4.7619 }, - { 14.0819, 0 }, - { 18.8438, 4.7619 }, - { 14.0819, 9.5238 }, -}; - -static const StrokeRec char58[] = { - { 5, char58_stroke0 }, - { 5, char58_stroke1 }, -}; - -/* char: 59 ';' */ - -static const CoordRec char59_stroke0[] = { - { 12.9619, 66.6667 }, - { 8.2, 61.9048 }, - { 12.9619, 57.1429 }, - { 17.7238, 61.9048 }, - { 12.9619, 66.6667 }, -}; - -static const CoordRec char59_stroke1[] = { - { 17.7238, 4.7619 }, - { 12.9619, 0 }, - { 8.2, 4.7619 }, - { 12.9619, 9.5238 }, - { 17.7238, 4.7619 }, - { 17.7238, -4.7619 }, - { 12.9619, -14.2857 }, - { 8.2, -19.0476 }, -}; - -static const StrokeRec char59[] = { - { 5, char59_stroke0 }, - { 8, char59_stroke1 }, -}; - -/* char: 60 '<' */ - -static const CoordRec char60_stroke0[] = { - { 79.2505, 85.7143 }, - { 3.06, 42.8571 }, - { 79.2505, 0 }, -}; - -static const StrokeRec char60[] = { - { 3, char60_stroke0 }, -}; - -/* char: 61 '=' */ - -static const CoordRec char61_stroke0[] = { - { 5.7, 57.1429 }, - { 91.4143, 57.1429 }, -}; - -static const CoordRec char61_stroke1[] = { - { 5.7, 28.5714 }, - { 91.4143, 28.5714 }, -}; - -static const StrokeRec char61[] = { - { 2, char61_stroke0 }, - { 2, char61_stroke1 }, -}; - -/* char: 62 '>' */ - -static const CoordRec char62_stroke0[] = { - { 2.78, 85.7143 }, - { 78.9705, 42.8571 }, - { 2.78, 0 }, -}; - -static const StrokeRec char62[] = { - { 3, char62_stroke0 }, -}; - -/* char: 63 '?' */ - -static const CoordRec char63_stroke0[] = { - { 8.42, 76.1905 }, - { 8.42, 80.9524 }, - { 13.1819, 90.4762 }, - { 17.9438, 95.2381 }, - { 27.4676, 100 }, - { 46.5152, 100 }, - { 56.039, 95.2381 }, - { 60.801, 90.4762 }, - { 65.5629, 80.9524 }, - { 65.5629, 71.4286 }, - { 60.801, 61.9048 }, - { 56.039, 57.1429 }, - { 36.9914, 47.619 }, - { 36.9914, 33.3333 }, -}; - -static const CoordRec char63_stroke1[] = { - { 36.9914, 9.5238 }, - { 32.2295, 4.7619 }, - { 36.9914, 0 }, - { 41.7533, 4.7619 }, - { 36.9914, 9.5238 }, -}; - -static const StrokeRec char63[] = { - { 14, char63_stroke0 }, - { 5, char63_stroke1 }, -}; - -/* char: 64 '@' */ - -static const CoordRec char64_stroke0[] = { - { 49.2171, 52.381 }, - { 39.6933, 57.1429 }, - { 30.1695, 57.1429 }, - { 25.4076, 47.619 }, - { 25.4076, 42.8571 }, - { 30.1695, 33.3333 }, - { 39.6933, 33.3333 }, - { 49.2171, 38.0952 }, -}; - -static const CoordRec char64_stroke1[] = { - { 49.2171, 57.1429 }, - { 49.2171, 38.0952 }, - { 53.979, 33.3333 }, - { 63.5029, 33.3333 }, - { 68.2648, 42.8571 }, - { 68.2648, 47.619 }, - { 63.5029, 61.9048 }, - { 53.979, 71.4286 }, - { 39.6933, 76.1905 }, - { 34.9314, 76.1905 }, - { 20.6457, 71.4286 }, - { 11.1219, 61.9048 }, - { 6.36, 47.619 }, - { 6.36, 42.8571 }, - { 11.1219, 28.5714 }, - { 20.6457, 19.0476 }, - { 34.9314, 14.2857 }, - { 39.6933, 14.2857 }, - { 53.979, 19.0476 }, -}; - -static const StrokeRec char64[] = { - { 8, char64_stroke0 }, - { 19, char64_stroke1 }, -}; - -/* char: 65 'A' */ - -static const CoordRec char65_stroke0[] = { - { 40.5952, 100 }, - { 2.5, 0 }, -}; - -static const CoordRec char65_stroke1[] = { - { 40.5952, 100 }, - { 78.6905, 0 }, -}; - -static const CoordRec char65_stroke2[] = { - { 16.7857, 33.3333 }, - { 64.4048, 33.3333 }, -}; - -static const StrokeRec char65[] = { - { 2, char65_stroke0 }, - { 2, char65_stroke1 }, - { 2, char65_stroke2 }, -}; - -/* char: 66 'B' */ - -static const CoordRec char66_stroke0[] = { - { 11.42, 100 }, - { 11.42, 0 }, -}; - -static const CoordRec char66_stroke1[] = { - { 11.42, 100 }, - { 54.2771, 100 }, - { 68.5629, 95.2381 }, - { 73.3248, 90.4762 }, - { 78.0867, 80.9524 }, - { 78.0867, 71.4286 }, - { 73.3248, 61.9048 }, - { 68.5629, 57.1429 }, - { 54.2771, 52.381 }, -}; - -static const CoordRec char66_stroke2[] = { - { 11.42, 52.381 }, - { 54.2771, 52.381 }, - { 68.5629, 47.619 }, - { 73.3248, 42.8571 }, - { 78.0867, 33.3333 }, - { 78.0867, 19.0476 }, - { 73.3248, 9.5238 }, - { 68.5629, 4.7619 }, - { 54.2771, 0 }, - { 11.42, 0 }, -}; - -static const StrokeRec char66[] = { - { 2, char66_stroke0 }, - { 9, char66_stroke1 }, - { 10, char66_stroke2 }, -}; - -/* char: 67 'C' */ - -static const CoordRec char67_stroke0[] = { - { 78.0886, 76.1905 }, - { 73.3267, 85.7143 }, - { 63.8029, 95.2381 }, - { 54.279, 100 }, - { 35.2314, 100 }, - { 25.7076, 95.2381 }, - { 16.1838, 85.7143 }, - { 11.4219, 76.1905 }, - { 6.66, 61.9048 }, - { 6.66, 38.0952 }, - { 11.4219, 23.8095 }, - { 16.1838, 14.2857 }, - { 25.7076, 4.7619 }, - { 35.2314, 0 }, - { 54.279, 0 }, - { 63.8029, 4.7619 }, - { 73.3267, 14.2857 }, - { 78.0886, 23.8095 }, -}; - -static const StrokeRec char67[] = { - { 18, char67_stroke0 }, -}; - -/* char: 68 'D' */ - -static const CoordRec char68_stroke0[] = { - { 11.96, 100 }, - { 11.96, 0 }, -}; - -static const CoordRec char68_stroke1[] = { - { 11.96, 100 }, - { 45.2933, 100 }, - { 59.579, 95.2381 }, - { 69.1029, 85.7143 }, - { 73.8648, 76.1905 }, - { 78.6267, 61.9048 }, - { 78.6267, 38.0952 }, - { 73.8648, 23.8095 }, - { 69.1029, 14.2857 }, - { 59.579, 4.7619 }, - { 45.2933, 0 }, - { 11.96, 0 }, -}; - -static const StrokeRec char68[] = { - { 2, char68_stroke0 }, - { 12, char68_stroke1 }, -}; - -/* char: 69 'E' */ - -static const CoordRec char69_stroke0[] = { - { 11.42, 100 }, - { 11.42, 0 }, -}; - -static const CoordRec char69_stroke1[] = { - { 11.42, 100 }, - { 73.3248, 100 }, -}; - -static const CoordRec char69_stroke2[] = { - { 11.42, 52.381 }, - { 49.5152, 52.381 }, -}; - -static const CoordRec char69_stroke3[] = { - { 11.42, 0 }, - { 73.3248, 0 }, -}; - -static const StrokeRec char69[] = { - { 2, char69_stroke0 }, - { 2, char69_stroke1 }, - { 2, char69_stroke2 }, - { 2, char69_stroke3 }, -}; - -/* char: 70 'F' */ - -static const CoordRec char70_stroke0[] = { - { 11.42, 100 }, - { 11.42, 0 }, -}; - -static const CoordRec char70_stroke1[] = { - { 11.42, 100 }, - { 73.3248, 100 }, -}; - -static const CoordRec char70_stroke2[] = { - { 11.42, 52.381 }, - { 49.5152, 52.381 }, -}; - -static const StrokeRec char70[] = { - { 2, char70_stroke0 }, - { 2, char70_stroke1 }, - { 2, char70_stroke2 }, -}; - -/* char: 71 'G' */ - -static const CoordRec char71_stroke0[] = { - { 78.4886, 76.1905 }, - { 73.7267, 85.7143 }, - { 64.2029, 95.2381 }, - { 54.679, 100 }, - { 35.6314, 100 }, - { 26.1076, 95.2381 }, - { 16.5838, 85.7143 }, - { 11.8219, 76.1905 }, - { 7.06, 61.9048 }, - { 7.06, 38.0952 }, - { 11.8219, 23.8095 }, - { 16.5838, 14.2857 }, - { 26.1076, 4.7619 }, - { 35.6314, 0 }, - { 54.679, 0 }, - { 64.2029, 4.7619 }, - { 73.7267, 14.2857 }, - { 78.4886, 23.8095 }, - { 78.4886, 38.0952 }, -}; - -static const CoordRec char71_stroke1[] = { - { 54.679, 38.0952 }, - { 78.4886, 38.0952 }, -}; - -static const StrokeRec char71[] = { - { 19, char71_stroke0 }, - { 2, char71_stroke1 }, -}; - -/* char: 72 'H' */ - -static const CoordRec char72_stroke0[] = { - { 11.42, 100 }, - { 11.42, 0 }, -}; - -static const CoordRec char72_stroke1[] = { - { 78.0867, 100 }, - { 78.0867, 0 }, -}; - -static const CoordRec char72_stroke2[] = { - { 11.42, 52.381 }, - { 78.0867, 52.381 }, -}; - -static const StrokeRec char72[] = { - { 2, char72_stroke0 }, - { 2, char72_stroke1 }, - { 2, char72_stroke2 }, -}; - -/* char: 73 'I' */ - -static const CoordRec char73_stroke0[] = { - { 10.86, 100 }, - { 10.86, 0 }, -}; - -static const StrokeRec char73[] = { - { 2, char73_stroke0 }, -}; - -/* char: 74 'J' */ - -static const CoordRec char74_stroke0[] = { - { 50.119, 100 }, - { 50.119, 23.8095 }, - { 45.3571, 9.5238 }, - { 40.5952, 4.7619 }, - { 31.0714, 0 }, - { 21.5476, 0 }, - { 12.0238, 4.7619 }, - { 7.2619, 9.5238 }, - { 2.5, 23.8095 }, - { 2.5, 33.3333 }, -}; - -static const StrokeRec char74[] = { - { 10, char74_stroke0 }, -}; - -/* char: 75 'K' */ - -static const CoordRec char75_stroke0[] = { - { 11.28, 100 }, - { 11.28, 0 }, -}; - -static const CoordRec char75_stroke1[] = { - { 77.9467, 100 }, - { 11.28, 33.3333 }, -}; - -static const CoordRec char75_stroke2[] = { - { 35.0895, 57.1429 }, - { 77.9467, 0 }, -}; - -static const StrokeRec char75[] = { - { 2, char75_stroke0 }, - { 2, char75_stroke1 }, - { 2, char75_stroke2 }, -}; - -/* char: 76 'L' */ - -static const CoordRec char76_stroke0[] = { - { 11.68, 100 }, - { 11.68, 0 }, -}; - -static const CoordRec char76_stroke1[] = { - { 11.68, 0 }, - { 68.8229, 0 }, -}; - -static const StrokeRec char76[] = { - { 2, char76_stroke0 }, - { 2, char76_stroke1 }, -}; - -/* char: 77 'M' */ - -static const CoordRec char77_stroke0[] = { - { 10.86, 100 }, - { 10.86, 0 }, -}; - -static const CoordRec char77_stroke1[] = { - { 10.86, 100 }, - { 48.9552, 0 }, -}; - -static const CoordRec char77_stroke2[] = { - { 87.0505, 100 }, - { 48.9552, 0 }, -}; - -static const CoordRec char77_stroke3[] = { - { 87.0505, 100 }, - { 87.0505, 0 }, -}; - -static const StrokeRec char77[] = { - { 2, char77_stroke0 }, - { 2, char77_stroke1 }, - { 2, char77_stroke2 }, - { 2, char77_stroke3 }, -}; - -/* char: 78 'N' */ - -static const CoordRec char78_stroke0[] = { - { 11.14, 100 }, - { 11.14, 0 }, -}; - -static const CoordRec char78_stroke1[] = { - { 11.14, 100 }, - { 77.8067, 0 }, -}; - -static const CoordRec char78_stroke2[] = { - { 77.8067, 100 }, - { 77.8067, 0 }, -}; - -static const StrokeRec char78[] = { - { 2, char78_stroke0 }, - { 2, char78_stroke1 }, - { 2, char78_stroke2 }, -}; - -/* char: 79 'O' */ - -static const CoordRec char79_stroke0[] = { - { 34.8114, 100 }, - { 25.2876, 95.2381 }, - { 15.7638, 85.7143 }, - { 11.0019, 76.1905 }, - { 6.24, 61.9048 }, - { 6.24, 38.0952 }, - { 11.0019, 23.8095 }, - { 15.7638, 14.2857 }, - { 25.2876, 4.7619 }, - { 34.8114, 0 }, - { 53.859, 0 }, - { 63.3829, 4.7619 }, - { 72.9067, 14.2857 }, - { 77.6686, 23.8095 }, - { 82.4305, 38.0952 }, - { 82.4305, 61.9048 }, - { 77.6686, 76.1905 }, - { 72.9067, 85.7143 }, - { 63.3829, 95.2381 }, - { 53.859, 100 }, - { 34.8114, 100 }, -}; - -static const StrokeRec char79[] = { - { 21, char79_stroke0 }, -}; - -/* char: 80 'P' */ - -static const CoordRec char80_stroke0[] = { - { 12.1, 100 }, - { 12.1, 0 }, -}; - -static const CoordRec char80_stroke1[] = { - { 12.1, 100 }, - { 54.9571, 100 }, - { 69.2429, 95.2381 }, - { 74.0048, 90.4762 }, - { 78.7667, 80.9524 }, - { 78.7667, 66.6667 }, - { 74.0048, 57.1429 }, - { 69.2429, 52.381 }, - { 54.9571, 47.619 }, - { 12.1, 47.619 }, -}; - -static const StrokeRec char80[] = { - { 2, char80_stroke0 }, - { 10, char80_stroke1 }, -}; - -/* char: 81 'Q' */ - -static const CoordRec char81_stroke0[] = { - { 33.8714, 100 }, - { 24.3476, 95.2381 }, - { 14.8238, 85.7143 }, - { 10.0619, 76.1905 }, - { 5.3, 61.9048 }, - { 5.3, 38.0952 }, - { 10.0619, 23.8095 }, - { 14.8238, 14.2857 }, - { 24.3476, 4.7619 }, - { 33.8714, 0 }, - { 52.919, 0 }, - { 62.4429, 4.7619 }, - { 71.9667, 14.2857 }, - { 76.7286, 23.8095 }, - { 81.4905, 38.0952 }, - { 81.4905, 61.9048 }, - { 76.7286, 76.1905 }, - { 71.9667, 85.7143 }, - { 62.4429, 95.2381 }, - { 52.919, 100 }, - { 33.8714, 100 }, -}; - -static const CoordRec char81_stroke1[] = { - { 48.1571, 19.0476 }, - { 76.7286, -9.5238 }, -}; - -static const StrokeRec char81[] = { - { 21, char81_stroke0 }, - { 2, char81_stroke1 }, -}; - -/* char: 82 'R' */ - -static const CoordRec char82_stroke0[] = { - { 11.68, 100 }, - { 11.68, 0 }, -}; - -static const CoordRec char82_stroke1[] = { - { 11.68, 100 }, - { 54.5371, 100 }, - { 68.8229, 95.2381 }, - { 73.5848, 90.4762 }, - { 78.3467, 80.9524 }, - { 78.3467, 71.4286 }, - { 73.5848, 61.9048 }, - { 68.8229, 57.1429 }, - { 54.5371, 52.381 }, - { 11.68, 52.381 }, -}; - -static const CoordRec char82_stroke2[] = { - { 45.0133, 52.381 }, - { 78.3467, 0 }, -}; - -static const StrokeRec char82[] = { - { 2, char82_stroke0 }, - { 10, char82_stroke1 }, - { 2, char82_stroke2 }, -}; - -/* char: 83 'S' */ - -static const CoordRec char83_stroke0[] = { - { 74.6667, 85.7143 }, - { 65.1429, 95.2381 }, - { 50.8571, 100 }, - { 31.8095, 100 }, - { 17.5238, 95.2381 }, - { 8, 85.7143 }, - { 8, 76.1905 }, - { 12.7619, 66.6667 }, - { 17.5238, 61.9048 }, - { 27.0476, 57.1429 }, - { 55.619, 47.619 }, - { 65.1429, 42.8571 }, - { 69.9048, 38.0952 }, - { 74.6667, 28.5714 }, - { 74.6667, 14.2857 }, - { 65.1429, 4.7619 }, - { 50.8571, 0 }, - { 31.8095, 0 }, - { 17.5238, 4.7619 }, - { 8, 14.2857 }, -}; - -static const StrokeRec char83[] = { - { 20, char83_stroke0 }, -}; - -/* char: 84 'T' */ - -static const CoordRec char84_stroke0[] = { - { 35.6933, 100 }, - { 35.6933, 0 }, -}; - -static const CoordRec char84_stroke1[] = { - { 2.36, 100 }, - { 69.0267, 100 }, -}; - -static const StrokeRec char84[] = { - { 2, char84_stroke0 }, - { 2, char84_stroke1 }, -}; - -/* char: 85 'U' */ - -static const CoordRec char85_stroke0[] = { - { 11.54, 100 }, - { 11.54, 28.5714 }, - { 16.3019, 14.2857 }, - { 25.8257, 4.7619 }, - { 40.1114, 0 }, - { 49.6352, 0 }, - { 63.921, 4.7619 }, - { 73.4448, 14.2857 }, - { 78.2067, 28.5714 }, - { 78.2067, 100 }, -}; - -static const StrokeRec char85[] = { - { 10, char85_stroke0 }, -}; - -/* char: 86 'V' */ - -static const CoordRec char86_stroke0[] = { - { 2.36, 100 }, - { 40.4552, 0 }, -}; - -static const CoordRec char86_stroke1[] = { - { 78.5505, 100 }, - { 40.4552, 0 }, -}; - -static const StrokeRec char86[] = { - { 2, char86_stroke0 }, - { 2, char86_stroke1 }, -}; - -/* char: 87 'W' */ - -static const CoordRec char87_stroke0[] = { - { 2.22, 100 }, - { 26.0295, 0 }, -}; - -static const CoordRec char87_stroke1[] = { - { 49.839, 100 }, - { 26.0295, 0 }, -}; - -static const CoordRec char87_stroke2[] = { - { 49.839, 100 }, - { 73.6486, 0 }, -}; - -static const CoordRec char87_stroke3[] = { - { 97.4581, 100 }, - { 73.6486, 0 }, -}; - -static const StrokeRec char87[] = { - { 2, char87_stroke0 }, - { 2, char87_stroke1 }, - { 2, char87_stroke2 }, - { 2, char87_stroke3 }, -}; - -/* char: 88 'X' */ - -static const CoordRec char88_stroke0[] = { - { 2.5, 100 }, - { 69.1667, 0 }, -}; - -static const CoordRec char88_stroke1[] = { - { 69.1667, 100 }, - { 2.5, 0 }, -}; - -static const StrokeRec char88[] = { - { 2, char88_stroke0 }, - { 2, char88_stroke1 }, -}; - -/* char: 89 'Y' */ - -static const CoordRec char89_stroke0[] = { - { 1.52, 100 }, - { 39.6152, 52.381 }, - { 39.6152, 0 }, -}; - -static const CoordRec char89_stroke1[] = { - { 77.7105, 100 }, - { 39.6152, 52.381 }, -}; - -static const StrokeRec char89[] = { - { 3, char89_stroke0 }, - { 2, char89_stroke1 }, -}; - -/* char: 90 'Z' */ - -static const CoordRec char90_stroke0[] = { - { 69.1667, 100 }, - { 2.5, 0 }, -}; - -static const CoordRec char90_stroke1[] = { - { 2.5, 100 }, - { 69.1667, 100 }, -}; - -static const CoordRec char90_stroke2[] = { - { 2.5, 0 }, - { 69.1667, 0 }, -}; - -static const StrokeRec char90[] = { - { 2, char90_stroke0 }, - { 2, char90_stroke1 }, - { 2, char90_stroke2 }, -}; - -/* char: 91 '[' */ - -static const CoordRec char91_stroke0[] = { - { 7.78, 119.048 }, - { 7.78, -33.3333 }, -}; - -static const CoordRec char91_stroke1[] = { - { 12.5419, 119.048 }, - { 12.5419, -33.3333 }, -}; - -static const CoordRec char91_stroke2[] = { - { 7.78, 119.048 }, - { 41.1133, 119.048 }, -}; - -static const CoordRec char91_stroke3[] = { - { 7.78, -33.3333 }, - { 41.1133, -33.3333 }, -}; - -static const StrokeRec char91[] = { - { 2, char91_stroke0 }, - { 2, char91_stroke1 }, - { 2, char91_stroke2 }, - { 2, char91_stroke3 }, -}; - -/* char: 92 '\' */ - -static const CoordRec char92_stroke0[] = { - { 5.84, 100 }, - { 72.5067, -14.2857 }, -}; - -static const StrokeRec char92[] = { - { 2, char92_stroke0 }, -}; - -/* char: 93 ']' */ - -static const CoordRec char93_stroke0[] = { - { 33.0114, 119.048 }, - { 33.0114, -33.3333 }, -}; - -static const CoordRec char93_stroke1[] = { - { 37.7733, 119.048 }, - { 37.7733, -33.3333 }, -}; - -static const CoordRec char93_stroke2[] = { - { 4.44, 119.048 }, - { 37.7733, 119.048 }, -}; - -static const CoordRec char93_stroke3[] = { - { 4.44, -33.3333 }, - { 37.7733, -33.3333 }, -}; - -static const StrokeRec char93[] = { - { 2, char93_stroke0 }, - { 2, char93_stroke1 }, - { 2, char93_stroke2 }, - { 2, char93_stroke3 }, -}; - -/* char: 94 '^' */ - -static const CoordRec char94_stroke0[] = { - { 44.0752, 109.524 }, - { 5.98, 42.8571 }, -}; - -static const CoordRec char94_stroke1[] = { - { 44.0752, 109.524 }, - { 82.1705, 42.8571 }, -}; - -static const StrokeRec char94[] = { - { 2, char94_stroke0 }, - { 2, char94_stroke1 }, -}; - -/* char: 95 '_' */ - -static const CoordRec char95_stroke0[] = { - { -1.1, -33.3333 }, - { 103.662, -33.3333 }, - { 103.662, -28.5714 }, - { -1.1, -28.5714 }, - { -1.1, -33.3333 }, -}; - -static const StrokeRec char95[] = { - { 5, char95_stroke0 }, -}; - -/* char: 96 '`' */ - -static const CoordRec char96_stroke0[] = { - { 33.0219, 100 }, - { 56.8314, 71.4286 }, -}; - -static const CoordRec char96_stroke1[] = { - { 33.0219, 100 }, - { 28.26, 95.2381 }, - { 56.8314, 71.4286 }, -}; - -static const StrokeRec char96[] = { - { 2, char96_stroke0 }, - { 3, char96_stroke1 }, -}; - -/* char: 97 'a' */ - -static const CoordRec char97_stroke0[] = { - { 63.8229, 66.6667 }, - { 63.8229, 0 }, -}; - -static const CoordRec char97_stroke1[] = { - { 63.8229, 52.381 }, - { 54.299, 61.9048 }, - { 44.7752, 66.6667 }, - { 30.4895, 66.6667 }, - { 20.9657, 61.9048 }, - { 11.4419, 52.381 }, - { 6.68, 38.0952 }, - { 6.68, 28.5714 }, - { 11.4419, 14.2857 }, - { 20.9657, 4.7619 }, - { 30.4895, 0 }, - { 44.7752, 0 }, - { 54.299, 4.7619 }, - { 63.8229, 14.2857 }, -}; - -static const StrokeRec char97[] = { - { 2, char97_stroke0 }, - { 14, char97_stroke1 }, -}; - -/* char: 98 'b' */ - -static const CoordRec char98_stroke0[] = { - { 8.76, 100 }, - { 8.76, 0 }, -}; - -static const CoordRec char98_stroke1[] = { - { 8.76, 52.381 }, - { 18.2838, 61.9048 }, - { 27.8076, 66.6667 }, - { 42.0933, 66.6667 }, - { 51.6171, 61.9048 }, - { 61.141, 52.381 }, - { 65.9029, 38.0952 }, - { 65.9029, 28.5714 }, - { 61.141, 14.2857 }, - { 51.6171, 4.7619 }, - { 42.0933, 0 }, - { 27.8076, 0 }, - { 18.2838, 4.7619 }, - { 8.76, 14.2857 }, -}; - -static const StrokeRec char98[] = { - { 2, char98_stroke0 }, - { 14, char98_stroke1 }, -}; - -/* char: 99 'c' */ - -static const CoordRec char99_stroke0[] = { - { 62.6629, 52.381 }, - { 53.139, 61.9048 }, - { 43.6152, 66.6667 }, - { 29.3295, 66.6667 }, - { 19.8057, 61.9048 }, - { 10.2819, 52.381 }, - { 5.52, 38.0952 }, - { 5.52, 28.5714 }, - { 10.2819, 14.2857 }, - { 19.8057, 4.7619 }, - { 29.3295, 0 }, - { 43.6152, 0 }, - { 53.139, 4.7619 }, - { 62.6629, 14.2857 }, -}; - -static const StrokeRec char99[] = { - { 14, char99_stroke0 }, -}; - -/* char: 100 'd' */ - -static const CoordRec char100_stroke0[] = { - { 61.7829, 100 }, - { 61.7829, 0 }, -}; - -static const CoordRec char100_stroke1[] = { - { 61.7829, 52.381 }, - { 52.259, 61.9048 }, - { 42.7352, 66.6667 }, - { 28.4495, 66.6667 }, - { 18.9257, 61.9048 }, - { 9.4019, 52.381 }, - { 4.64, 38.0952 }, - { 4.64, 28.5714 }, - { 9.4019, 14.2857 }, - { 18.9257, 4.7619 }, - { 28.4495, 0 }, - { 42.7352, 0 }, - { 52.259, 4.7619 }, - { 61.7829, 14.2857 }, -}; - -static const StrokeRec char100[] = { - { 2, char100_stroke0 }, - { 14, char100_stroke1 }, -}; - -/* char: 101 'e' */ - -static const CoordRec char101_stroke0[] = { - { 5.72, 38.0952 }, - { 62.8629, 38.0952 }, - { 62.8629, 47.619 }, - { 58.101, 57.1429 }, - { 53.339, 61.9048 }, - { 43.8152, 66.6667 }, - { 29.5295, 66.6667 }, - { 20.0057, 61.9048 }, - { 10.4819, 52.381 }, - { 5.72, 38.0952 }, - { 5.72, 28.5714 }, - { 10.4819, 14.2857 }, - { 20.0057, 4.7619 }, - { 29.5295, 0 }, - { 43.8152, 0 }, - { 53.339, 4.7619 }, - { 62.8629, 14.2857 }, -}; - -static const StrokeRec char101[] = { - { 17, char101_stroke0 }, -}; - -/* char: 102 'f' */ - -static const CoordRec char102_stroke0[] = { - { 38.7752, 100 }, - { 29.2514, 100 }, - { 19.7276, 95.2381 }, - { 14.9657, 80.9524 }, - { 14.9657, 0 }, -}; - -static const CoordRec char102_stroke1[] = { - { 0.68, 66.6667 }, - { 34.0133, 66.6667 }, -}; - -static const StrokeRec char102[] = { - { 5, char102_stroke0 }, - { 2, char102_stroke1 }, -}; - -/* char: 103 'g' */ - -static const CoordRec char103_stroke0[] = { - { 62.5029, 66.6667 }, - { 62.5029, -9.5238 }, - { 57.741, -23.8095 }, - { 52.979, -28.5714 }, - { 43.4552, -33.3333 }, - { 29.1695, -33.3333 }, - { 19.6457, -28.5714 }, -}; - -static const CoordRec char103_stroke1[] = { - { 62.5029, 52.381 }, - { 52.979, 61.9048 }, - { 43.4552, 66.6667 }, - { 29.1695, 66.6667 }, - { 19.6457, 61.9048 }, - { 10.1219, 52.381 }, - { 5.36, 38.0952 }, - { 5.36, 28.5714 }, - { 10.1219, 14.2857 }, - { 19.6457, 4.7619 }, - { 29.1695, 0 }, - { 43.4552, 0 }, - { 52.979, 4.7619 }, - { 62.5029, 14.2857 }, -}; - -static const StrokeRec char103[] = { - { 7, char103_stroke0 }, - { 14, char103_stroke1 }, -}; - -/* char: 104 'h' */ - -static const CoordRec char104_stroke0[] = { - { 9.6, 100 }, - { 9.6, 0 }, -}; - -static const CoordRec char104_stroke1[] = { - { 9.6, 47.619 }, - { 23.8857, 61.9048 }, - { 33.4095, 66.6667 }, - { 47.6952, 66.6667 }, - { 57.219, 61.9048 }, - { 61.981, 47.619 }, - { 61.981, 0 }, -}; - -static const StrokeRec char104[] = { - { 2, char104_stroke0 }, - { 7, char104_stroke1 }, -}; - -/* char: 105 'i' */ - -static const CoordRec char105_stroke0[] = { - { 10.02, 100 }, - { 14.7819, 95.2381 }, - { 19.5438, 100 }, - { 14.7819, 104.762 }, - { 10.02, 100 }, -}; - -static const CoordRec char105_stroke1[] = { - { 14.7819, 66.6667 }, - { 14.7819, 0 }, -}; - -static const StrokeRec char105[] = { - { 5, char105_stroke0 }, - { 2, char105_stroke1 }, -}; - -/* char: 106 'j' */ - -static const CoordRec char106_stroke0[] = { - { 17.3876, 100 }, - { 22.1495, 95.2381 }, - { 26.9114, 100 }, - { 22.1495, 104.762 }, - { 17.3876, 100 }, -}; - -static const CoordRec char106_stroke1[] = { - { 22.1495, 66.6667 }, - { 22.1495, -14.2857 }, - { 17.3876, -28.5714 }, - { 7.8638, -33.3333 }, - { -1.66, -33.3333 }, -}; - -static const StrokeRec char106[] = { - { 5, char106_stroke0 }, - { 5, char106_stroke1 }, -}; - -/* char: 107 'k' */ - -static const CoordRec char107_stroke0[] = { - { 9.6, 100 }, - { 9.6, 0 }, -}; - -static const CoordRec char107_stroke1[] = { - { 57.219, 66.6667 }, - { 9.6, 19.0476 }, -}; - -static const CoordRec char107_stroke2[] = { - { 28.6476, 38.0952 }, - { 61.981, 0 }, -}; - -static const StrokeRec char107[] = { - { 2, char107_stroke0 }, - { 2, char107_stroke1 }, - { 2, char107_stroke2 }, -}; - -/* char: 108 'l' */ - -static const CoordRec char108_stroke0[] = { - { 10.02, 100 }, - { 10.02, 0 }, -}; - -static const StrokeRec char108[] = { - { 2, char108_stroke0 }, -}; - -/* char: 109 'm' */ - -static const CoordRec char109_stroke0[] = { - { 9.6, 66.6667 }, - { 9.6, 0 }, -}; - -static const CoordRec char109_stroke1[] = { - { 9.6, 47.619 }, - { 23.8857, 61.9048 }, - { 33.4095, 66.6667 }, - { 47.6952, 66.6667 }, - { 57.219, 61.9048 }, - { 61.981, 47.619 }, - { 61.981, 0 }, -}; - -static const CoordRec char109_stroke2[] = { - { 61.981, 47.619 }, - { 76.2667, 61.9048 }, - { 85.7905, 66.6667 }, - { 100.076, 66.6667 }, - { 109.6, 61.9048 }, - { 114.362, 47.619 }, - { 114.362, 0 }, -}; - -static const StrokeRec char109[] = { - { 2, char109_stroke0 }, - { 7, char109_stroke1 }, - { 7, char109_stroke2 }, -}; - -/* char: 110 'n' */ - -static const CoordRec char110_stroke0[] = { - { 9.18, 66.6667 }, - { 9.18, 0 }, -}; - -static const CoordRec char110_stroke1[] = { - { 9.18, 47.619 }, - { 23.4657, 61.9048 }, - { 32.9895, 66.6667 }, - { 47.2752, 66.6667 }, - { 56.799, 61.9048 }, - { 61.561, 47.619 }, - { 61.561, 0 }, -}; - -static const StrokeRec char110[] = { - { 2, char110_stroke0 }, - { 7, char110_stroke1 }, -}; - -/* char: 111 'o' */ - -static const CoordRec char111_stroke0[] = { - { 28.7895, 66.6667 }, - { 19.2657, 61.9048 }, - { 9.7419, 52.381 }, - { 4.98, 38.0952 }, - { 4.98, 28.5714 }, - { 9.7419, 14.2857 }, - { 19.2657, 4.7619 }, - { 28.7895, 0 }, - { 43.0752, 0 }, - { 52.599, 4.7619 }, - { 62.1229, 14.2857 }, - { 66.8848, 28.5714 }, - { 66.8848, 38.0952 }, - { 62.1229, 52.381 }, - { 52.599, 61.9048 }, - { 43.0752, 66.6667 }, - { 28.7895, 66.6667 }, -}; - -static const StrokeRec char111[] = { - { 17, char111_stroke0 }, -}; - -/* char: 112 'p' */ - -static const CoordRec char112_stroke0[] = { - { 9.46, 66.6667 }, - { 9.46, -33.3333 }, -}; - -static const CoordRec char112_stroke1[] = { - { 9.46, 52.381 }, - { 18.9838, 61.9048 }, - { 28.5076, 66.6667 }, - { 42.7933, 66.6667 }, - { 52.3171, 61.9048 }, - { 61.841, 52.381 }, - { 66.6029, 38.0952 }, - { 66.6029, 28.5714 }, - { 61.841, 14.2857 }, - { 52.3171, 4.7619 }, - { 42.7933, 0 }, - { 28.5076, 0 }, - { 18.9838, 4.7619 }, - { 9.46, 14.2857 }, -}; - -static const StrokeRec char112[] = { - { 2, char112_stroke0 }, - { 14, char112_stroke1 }, -}; - -/* char: 113 'q' */ - -static const CoordRec char113_stroke0[] = { - { 61.9829, 66.6667 }, - { 61.9829, -33.3333 }, -}; - -static const CoordRec char113_stroke1[] = { - { 61.9829, 52.381 }, - { 52.459, 61.9048 }, - { 42.9352, 66.6667 }, - { 28.6495, 66.6667 }, - { 19.1257, 61.9048 }, - { 9.6019, 52.381 }, - { 4.84, 38.0952 }, - { 4.84, 28.5714 }, - { 9.6019, 14.2857 }, - { 19.1257, 4.7619 }, - { 28.6495, 0 }, - { 42.9352, 0 }, - { 52.459, 4.7619 }, - { 61.9829, 14.2857 }, -}; - -static const StrokeRec char113[] = { - { 2, char113_stroke0 }, - { 14, char113_stroke1 }, -}; - -/* char: 114 'r' */ - -static const CoordRec char114_stroke0[] = { - { 9.46, 66.6667 }, - { 9.46, 0 }, -}; - -static const CoordRec char114_stroke1[] = { - { 9.46, 38.0952 }, - { 14.2219, 52.381 }, - { 23.7457, 61.9048 }, - { 33.2695, 66.6667 }, - { 47.5552, 66.6667 }, -}; - -static const StrokeRec char114[] = { - { 2, char114_stroke0 }, - { 5, char114_stroke1 }, -}; - -/* char: 115 's' */ - -static const CoordRec char115_stroke0[] = { - { 57.081, 52.381 }, - { 52.319, 61.9048 }, - { 38.0333, 66.6667 }, - { 23.7476, 66.6667 }, - { 9.4619, 61.9048 }, - { 4.7, 52.381 }, - { 9.4619, 42.8571 }, - { 18.9857, 38.0952 }, - { 42.7952, 33.3333 }, - { 52.319, 28.5714 }, - { 57.081, 19.0476 }, - { 57.081, 14.2857 }, - { 52.319, 4.7619 }, - { 38.0333, 0 }, - { 23.7476, 0 }, - { 9.4619, 4.7619 }, - { 4.7, 14.2857 }, -}; - -static const StrokeRec char115[] = { - { 17, char115_stroke0 }, -}; - -/* char: 116 't' */ - -static const CoordRec char116_stroke0[] = { - { 14.8257, 100 }, - { 14.8257, 19.0476 }, - { 19.5876, 4.7619 }, - { 29.1114, 0 }, - { 38.6352, 0 }, -}; - -static const CoordRec char116_stroke1[] = { - { 0.54, 66.6667 }, - { 33.8733, 66.6667 }, -}; - -static const StrokeRec char116[] = { - { 5, char116_stroke0 }, - { 2, char116_stroke1 }, -}; - -/* char: 117 'u' */ - -static const CoordRec char117_stroke0[] = { - { 9.46, 66.6667 }, - { 9.46, 19.0476 }, - { 14.2219, 4.7619 }, - { 23.7457, 0 }, - { 38.0314, 0 }, - { 47.5552, 4.7619 }, - { 61.841, 19.0476 }, -}; - -static const CoordRec char117_stroke1[] = { - { 61.841, 66.6667 }, - { 61.841, 0 }, -}; - -static const StrokeRec char117[] = { - { 7, char117_stroke0 }, - { 2, char117_stroke1 }, -}; - -/* char: 118 'v' */ - -static const CoordRec char118_stroke0[] = { - { 1.8, 66.6667 }, - { 30.3714, 0 }, -}; - -static const CoordRec char118_stroke1[] = { - { 58.9429, 66.6667 }, - { 30.3714, 0 }, -}; - -static const StrokeRec char118[] = { - { 2, char118_stroke0 }, - { 2, char118_stroke1 }, -}; - -/* char: 119 'w' */ - -static const CoordRec char119_stroke0[] = { - { 2.5, 66.6667 }, - { 21.5476, 0 }, -}; - -static const CoordRec char119_stroke1[] = { - { 40.5952, 66.6667 }, - { 21.5476, 0 }, -}; - -static const CoordRec char119_stroke2[] = { - { 40.5952, 66.6667 }, - { 59.6429, 0 }, -}; - -static const CoordRec char119_stroke3[] = { - { 78.6905, 66.6667 }, - { 59.6429, 0 }, -}; - -static const StrokeRec char119[] = { - { 2, char119_stroke0 }, - { 2, char119_stroke1 }, - { 2, char119_stroke2 }, - { 2, char119_stroke3 }, -}; - -/* char: 120 'x' */ - -static const CoordRec char120_stroke0[] = { - { 1.66, 66.6667 }, - { 54.041, 0 }, -}; - -static const CoordRec char120_stroke1[] = { - { 54.041, 66.6667 }, - { 1.66, 0 }, -}; - -static const StrokeRec char120[] = { - { 2, char120_stroke0 }, - { 2, char120_stroke1 }, -}; - -/* char: 121 'y' */ - -static const CoordRec char121_stroke0[] = { - { 6.5619, 66.6667 }, - { 35.1333, 0 }, -}; - -static const CoordRec char121_stroke1[] = { - { 63.7048, 66.6667 }, - { 35.1333, 0 }, - { 25.6095, -19.0476 }, - { 16.0857, -28.5714 }, - { 6.5619, -33.3333 }, - { 1.8, -33.3333 }, -}; - -static const StrokeRec char121[] = { - { 2, char121_stroke0 }, - { 6, char121_stroke1 }, -}; - -/* char: 122 'z' */ - -static const CoordRec char122_stroke0[] = { - { 56.821, 66.6667 }, - { 4.44, 0 }, -}; - -static const CoordRec char122_stroke1[] = { - { 4.44, 66.6667 }, - { 56.821, 66.6667 }, -}; - -static const CoordRec char122_stroke2[] = { - { 4.44, 0 }, - { 56.821, 0 }, -}; - -static const StrokeRec char122[] = { - { 2, char122_stroke0 }, - { 2, char122_stroke1 }, - { 2, char122_stroke2 }, -}; - -/* char: 123 '{' */ - -static const CoordRec char123_stroke0[] = { - { 31.1895, 119.048 }, - { 21.6657, 114.286 }, - { 16.9038, 109.524 }, - { 12.1419, 100 }, - { 12.1419, 90.4762 }, - { 16.9038, 80.9524 }, - { 21.6657, 76.1905 }, - { 26.4276, 66.6667 }, - { 26.4276, 57.1429 }, - { 16.9038, 47.619 }, -}; - -static const CoordRec char123_stroke1[] = { - { 21.6657, 114.286 }, - { 16.9038, 104.762 }, - { 16.9038, 95.2381 }, - { 21.6657, 85.7143 }, - { 26.4276, 80.9524 }, - { 31.1895, 71.4286 }, - { 31.1895, 61.9048 }, - { 26.4276, 52.381 }, - { 7.38, 42.8571 }, - { 26.4276, 33.3333 }, - { 31.1895, 23.8095 }, - { 31.1895, 14.2857 }, - { 26.4276, 4.7619 }, - { 21.6657, 0 }, - { 16.9038, -9.5238 }, - { 16.9038, -19.0476 }, - { 21.6657, -28.5714 }, -}; - -static const CoordRec char123_stroke2[] = { - { 16.9038, 38.0952 }, - { 26.4276, 28.5714 }, - { 26.4276, 19.0476 }, - { 21.6657, 9.5238 }, - { 16.9038, 4.7619 }, - { 12.1419, -4.7619 }, - { 12.1419, -14.2857 }, - { 16.9038, -23.8095 }, - { 21.6657, -28.5714 }, - { 31.1895, -33.3333 }, -}; - -static const StrokeRec char123[] = { - { 10, char123_stroke0 }, - { 17, char123_stroke1 }, - { 10, char123_stroke2 }, -}; - -/* char: 124 '|' */ - -static const CoordRec char124_stroke0[] = { - { 11.54, 119.048 }, - { 11.54, -33.3333 }, -}; - -static const StrokeRec char124[] = { - { 2, char124_stroke0 }, -}; - -/* char: 125 '}' */ - -static const CoordRec char125_stroke0[] = { - { 9.18, 119.048 }, - { 18.7038, 114.286 }, - { 23.4657, 109.524 }, - { 28.2276, 100 }, - { 28.2276, 90.4762 }, - { 23.4657, 80.9524 }, - { 18.7038, 76.1905 }, - { 13.9419, 66.6667 }, - { 13.9419, 57.1429 }, - { 23.4657, 47.619 }, -}; - -static const CoordRec char125_stroke1[] = { - { 18.7038, 114.286 }, - { 23.4657, 104.762 }, - { 23.4657, 95.2381 }, - { 18.7038, 85.7143 }, - { 13.9419, 80.9524 }, - { 9.18, 71.4286 }, - { 9.18, 61.9048 }, - { 13.9419, 52.381 }, - { 32.9895, 42.8571 }, - { 13.9419, 33.3333 }, - { 9.18, 23.8095 }, - { 9.18, 14.2857 }, - { 13.9419, 4.7619 }, - { 18.7038, 0 }, - { 23.4657, -9.5238 }, - { 23.4657, -19.0476 }, - { 18.7038, -28.5714 }, -}; - -static const CoordRec char125_stroke2[] = { - { 23.4657, 38.0952 }, - { 13.9419, 28.5714 }, - { 13.9419, 19.0476 }, - { 18.7038, 9.5238 }, - { 23.4657, 4.7619 }, - { 28.2276, -4.7619 }, - { 28.2276, -14.2857 }, - { 23.4657, -23.8095 }, - { 18.7038, -28.5714 }, - { 9.18, -33.3333 }, -}; - -static const StrokeRec char125[] = { - { 10, char125_stroke0 }, - { 17, char125_stroke1 }, - { 10, char125_stroke2 }, -}; - -/* char: 126 '~' */ - -static const CoordRec char126_stroke0[] = { - { 2.92, 28.5714 }, - { 2.92, 38.0952 }, - { 7.6819, 52.381 }, - { 17.2057, 57.1429 }, - { 26.7295, 57.1429 }, - { 36.2533, 52.381 }, - { 55.301, 38.0952 }, - { 64.8248, 33.3333 }, - { 74.3486, 33.3333 }, - { 83.8724, 38.0952 }, - { 88.6343, 47.619 }, -}; - -static const CoordRec char126_stroke1[] = { - { 2.92, 38.0952 }, - { 7.6819, 47.619 }, - { 17.2057, 52.381 }, - { 26.7295, 52.381 }, - { 36.2533, 47.619 }, - { 55.301, 33.3333 }, - { 64.8248, 28.5714 }, - { 74.3486, 28.5714 }, - { 83.8724, 33.3333 }, - { 88.6343, 47.619 }, - { 88.6343, 57.1429 }, -}; - -static const StrokeRec char126[] = { - { 11, char126_stroke0 }, - { 11, char126_stroke1 }, -}; - -/* char: 127 */ - -static const CoordRec char127_stroke0[] = { - { 52.381, 100 }, - { 14.2857, -33.3333 }, -}; - -static const CoordRec char127_stroke1[] = { - { 28.5714, 66.6667 }, - { 14.2857, 61.9048 }, - { 4.7619, 52.381 }, - { 0, 38.0952 }, - { 0, 23.8095 }, - { 4.7619, 14.2857 }, - { 14.2857, 4.7619 }, - { 28.5714, 0 }, - { 38.0952, 0 }, - { 52.381, 4.7619 }, - { 61.9048, 14.2857 }, - { 66.6667, 28.5714 }, - { 66.6667, 42.8571 }, - { 61.9048, 52.381 }, - { 52.381, 61.9048 }, - { 38.0952, 66.6667 }, - { 28.5714, 66.6667 }, -}; - -static const StrokeRec char127[] = { - { 2, char127_stroke0 }, - { 17, char127_stroke1 }, -}; - -static const StrokeCharRec chars[] = { - { 0, /* char0 */ 0, 0, 0 }, - { 0, /* char1 */ 0, 0, 0 }, - { 0, /* char2 */ 0, 0, 0 }, - { 0, /* char3 */ 0, 0, 0 }, - { 0, /* char4 */ 0, 0, 0 }, - { 0, /* char5 */ 0, 0, 0 }, - { 0, /* char6 */ 0, 0, 0 }, - { 0, /* char7 */ 0, 0, 0 }, - { 0, /* char8 */ 0, 0, 0 }, - { 0, /* char9 */ 0, 0, 0 }, - { 0, /* char10 */ 0, 0, 0 }, - { 0, /* char11 */ 0, 0, 0 }, - { 0, /* char12 */ 0, 0, 0 }, - { 0, /* char13 */ 0, 0, 0 }, - { 0, /* char14 */ 0, 0, 0 }, - { 0, /* char15 */ 0, 0, 0 }, - { 0, /* char16 */ 0, 0, 0 }, - { 0, /* char17 */ 0, 0, 0 }, - { 0, /* char18 */ 0, 0, 0 }, - { 0, /* char19 */ 0, 0, 0 }, - { 0, /* char20 */ 0, 0, 0 }, - { 0, /* char21 */ 0, 0, 0 }, - { 0, /* char22 */ 0, 0, 0 }, - { 0, /* char23 */ 0, 0, 0 }, - { 0, /* char24 */ 0, 0, 0 }, - { 0, /* char25 */ 0, 0, 0 }, - { 0, /* char26 */ 0, 0, 0 }, - { 0, /* char27 */ 0, 0, 0 }, - { 0, /* char28 */ 0, 0, 0 }, - { 0, /* char29 */ 0, 0, 0 }, - { 0, /* char30 */ 0, 0, 0 }, - { 0, /* char31 */ 0, 0, 0 }, - { 0, /* char32 */ 0, 52.381, 104.762 }, - { 2, char33, 13.3819, 26.6238 }, - { 2, char34, 23.0676, 51.4352 }, - { 4, char35, 36.5333, 79.4886 }, - { 3, char36, 38.1533, 76.2067 }, - { 3, char37, 49.2171, 96.5743 }, - { 1, char38, 53.599, 101.758 }, - { 1, char39, 4.44, 13.62 }, - { 1, char40, 21.8657, 47.1733 }, - { 1, char41, 24.3276, 47.5333 }, - { 3, char42, 30.7695, 59.439 }, - { 2, char43, 48.8371, 97.2543 }, - { 1, char44, 13.5219, 26.0638 }, - { 1, char45, 50.2371, 100.754 }, - { 1, char46, 13.1019, 26.4838 }, - { 1, char47, 40.5733, 82.1067 }, - { 1, char48, 38.3133, 77.0667 }, - { 1, char49, 30.8676, 66.5295 }, - { 1, char50, 38.7533, 77.6467 }, - { 1, char51, 38.3333, 77.0467 }, - { 2, char52, 37.2133, 80.1686 }, - { 1, char53, 38.1933, 77.6867 }, - { 1, char54, 34.1514, 73.8048 }, - { 2, char55, 38.8933, 77.2267 }, - { 1, char56, 38.9333, 77.6667 }, - { 1, char57, 39.9333, 74.0648 }, - { 2, char58, 14.0819, 26.2238 }, - { 2, char59, 12.9619, 26.3038 }, - { 1, char60, 41.1552, 81.6105 }, - { 2, char61, 48.5571, 97.2543 }, - { 1, char62, 40.8752, 81.6105 }, - { 2, char63, 36.9914, 73.9029 }, - { 2, char64, 34.9314, 74.3648 }, - { 3, char65, 40.5952, 80.4905 }, - { 3, char66, 44.7533, 83.6267 }, - { 1, char67, 39.9933, 84.4886 }, - { 2, char68, 45.2933, 85.2867 }, - { 4, char69, 39.9914, 78.1848 }, - { 3, char70, 39.9914, 78.7448 }, - { 2, char71, 40.3933, 89.7686 }, - { 3, char72, 44.7533, 89.0867 }, - { 1, char73, 10.86, 21.3 }, - { 1, char74, 31.0714, 59.999 }, - { 3, char75, 44.6133, 79.3267 }, - { 2, char76, 40.2514, 71.3229 }, - { 4, char77, 48.9552, 97.2105 }, - { 3, char78, 44.4733, 88.8067 }, - { 1, char79, 44.3352, 88.8305 }, - { 2, char80, 45.4333, 85.6667 }, - { 2, char81, 43.3952, 88.0905 }, - { 3, char82, 45.0133, 82.3667 }, - { 1, char83, 41.3333, 80.8267 }, - { 2, char84, 35.6933, 71.9467 }, - { 1, char85, 44.8733, 89.4867 }, - { 2, char86, 40.4552, 81.6105 }, - { 4, char87, 49.839, 100.518 }, - { 2, char88, 35.8333, 72.3667 }, - { 2, char89, 39.6152, 79.6505 }, - { 3, char90, 35.8333, 73.7467 }, - { 4, char91, 22.0657, 46.1133 }, - { 1, char92, 39.1733, 78.2067 }, - { 4, char93, 23.4876, 46.3933 }, - { 2, char94, 44.0752, 90.2305 }, - { 1, char95, 51.281, 104.062 }, - { 2, char96, 42.5457, 83.5714 }, - { 2, char97, 35.2514, 66.6029 }, - { 2, char98, 37.3314, 70.4629 }, - { 1, char99, 34.0914, 68.9229 }, - { 2, char100, 33.2114, 70.2629 }, - { 1, char101, 34.2914, 68.5229 }, - { 2, char102, 14.9657, 38.6552 }, - { 2, char103, 33.9314, 70.9829 }, - { 2, char104, 33.4095, 71.021 }, - { 2, char105, 14.7819, 28.8638 }, - { 2, char106, 17.3876, 36.2314 }, - { 3, char107, 33.4095, 62.521 }, - { 1, char108, 10.02, 19.34 }, - { 3, char109, 61.981, 123.962 }, - { 2, char110, 32.9895, 70.881 }, - { 1, char111, 33.5514, 71.7448 }, - { 2, char112, 38.0314, 70.8029 }, - { 2, char113, 33.4114, 70.7429 }, - { 2, char114, 23.7457, 49.4952 }, - { 1, char115, 28.5095, 62.321 }, - { 2, char116, 14.8257, 39.3152 }, - { 2, char117, 33.2695, 71.161 }, - { 2, char118, 30.3714, 60.6029 }, - { 4, char119, 40.5952, 80.4905 }, - { 2, char120, 25.4695, 56.401 }, - { 2, char121, 35.1333, 66.0648 }, - { 3, char122, 28.2495, 61.821 }, - { 3, char123, 21.6657, 41.6295 }, - { 1, char124, 11.54, 23.78 }, - { 3, char125, 18.7038, 41.4695 }, - { 2, char126, 45.7771, 91.2743 }, - { 2, char127, 33.3333, 66.6667 }, -}; - -StrokeFontRec glutStrokeRoman = { "Roman", 128, chars, 119.048, -33.3333 }; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_shapes.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_shapes.c deleted file mode 100644 index 20e21026c2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_shapes.c +++ /dev/null @@ -1,596 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/** -(c) Copyright 1993, Silicon Graphics, Inc. - -ALL RIGHTS RESERVED - -Permission to use, copy, modify, and distribute this software -for any purpose and without fee is hereby granted, provided -that the above copyright notice appear in all copies and that -both the copyright notice and this permission notice appear in -supporting documentation, and that the name of Silicon -Graphics, Inc. not be used in advertising or publicity -pertaining to distribution of the software without specific, -written prior permission. - -THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU -"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR -OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO -EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE -ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER, -INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE, -SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR -NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR -PERFORMANCE OF THIS SOFTWARE. - -US Government Users Restricted Rights - -Use, duplication, or disclosure by the Government is subject to -restrictions set forth in FAR 52.227.19(c)(2) or subparagraph -(c)(1)(ii) of the Rights in Technical Data and Computer -Software clause at DFARS 252.227-7013 and/or in similar or -successor clauses in the FAR or the DOD or NASA FAR -Supplement. Unpublished-- rights reserved under the copyright -laws of the United States. Contractor/manufacturer is Silicon -Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA -94039-7311. - -OpenGL(TM) is a trademark of Silicon Graphics, Inc. -*/ - -#include -#include "glutint.h" - -/* Some files do not define M_PI... */ -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -static GLUquadricObj *quadObj; - -#define QUAD_OBJ_INIT() { if(!quadObj) initQuadObj(); } - -static void -initQuadObj(void) -{ - quadObj = gluNewQuadric(); - if (!quadObj) - __glutFatalError("out of memory."); -} - -/* CENTRY */ -void GLUTAPIENTRY -glutWireSphere(GLdouble radius, GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_LINE); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluSphere(quadObj, radius, slices, stacks); -} - -void GLUTAPIENTRY -glutSolidSphere(GLdouble radius, GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_FILL); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluSphere(quadObj, radius, slices, stacks); -} - -void GLUTAPIENTRY -glutWireCone(GLdouble base, GLdouble height, - GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_LINE); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluCylinder(quadObj, base, 0.0, height, slices, stacks); -} - -void GLUTAPIENTRY -glutSolidCone(GLdouble base, GLdouble height, - GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_FILL); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluCylinder(quadObj, base, 0.0, height, slices, stacks); -} - -/* ENDCENTRY */ - -static void -drawBox(GLfloat size, GLenum type) -{ - static GLfloat n[6][3] = - { - {-1.0, 0.0, 0.0}, - {0.0, 1.0, 0.0}, - {1.0, 0.0, 0.0}, - {0.0, -1.0, 0.0}, - {0.0, 0.0, 1.0}, - {0.0, 0.0, -1.0} - }; - static GLint faces[6][4] = - { - {0, 1, 2, 3}, - {3, 2, 6, 7}, - {7, 6, 5, 4}, - {4, 5, 1, 0}, - {5, 6, 2, 1}, - {7, 4, 0, 3} - }; - GLfloat v[8][3]; - GLint i; - - v[0][0] = v[1][0] = v[2][0] = v[3][0] = -size / 2; - v[4][0] = v[5][0] = v[6][0] = v[7][0] = size / 2; - v[0][1] = v[1][1] = v[4][1] = v[5][1] = -size / 2; - v[2][1] = v[3][1] = v[6][1] = v[7][1] = size / 2; - v[0][2] = v[3][2] = v[4][2] = v[7][2] = -size / 2; - v[1][2] = v[2][2] = v[5][2] = v[6][2] = size / 2; - - for (i = 5; i >= 0; i--) { - glBegin(type); - glNormal3fv(&n[i][0]); - glVertex3fv(&v[faces[i][0]][0]); - glVertex3fv(&v[faces[i][1]][0]); - glVertex3fv(&v[faces[i][2]][0]); - glVertex3fv(&v[faces[i][3]][0]); - glEnd(); - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutWireCube(GLdouble size) -{ - drawBox(size, GL_LINE_LOOP); -} - -void GLUTAPIENTRY -glutSolidCube(GLdouble size) -{ - drawBox(size, GL_QUADS); -} - -/* ENDCENTRY */ - -static void -doughnut(GLfloat r, GLfloat R, GLint nsides, GLint rings) -{ - int i, j; - GLfloat theta, phi, theta1; - GLfloat cosTheta, sinTheta; - GLfloat cosTheta1, sinTheta1; - GLfloat ringDelta, sideDelta; - - ringDelta = 2.0 * M_PI / rings; - sideDelta = 2.0 * M_PI / nsides; - - theta = 0.0; - cosTheta = 1.0; - sinTheta = 0.0; - for (i = rings - 1; i >= 0; i--) { - theta1 = theta + ringDelta; - cosTheta1 = cos(theta1); - sinTheta1 = sin(theta1); - glBegin(GL_QUAD_STRIP); - phi = 0.0; - for (j = nsides; j >= 0; j--) { - GLfloat cosPhi, sinPhi, dist; - - phi += sideDelta; - cosPhi = cos(phi); - sinPhi = sin(phi); - dist = R + r * cosPhi; - - glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi, sinPhi); - glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, r * sinPhi); - glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi); - glVertex3f(cosTheta * dist, -sinTheta * dist, r * sinPhi); - } - glEnd(); - theta = theta1; - cosTheta = cosTheta1; - sinTheta = sinTheta1; - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, - GLint nsides, GLint rings) -{ - glPushAttrib(GL_POLYGON_BIT); - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - doughnut(innerRadius, outerRadius, nsides, rings); - glPopAttrib(); -} - -void GLUTAPIENTRY -glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, - GLint nsides, GLint rings) -{ - doughnut(innerRadius, outerRadius, nsides, rings); -} - -/* ENDCENTRY */ - -static GLfloat dodec[20][3]; - -static void -initDodecahedron(void) -{ - GLfloat alpha, beta; - - alpha = sqrt(2.0 / (3.0 + sqrt(5.0))); - beta = 1.0 + sqrt(6.0 / (3.0 + sqrt(5.0)) - - 2.0 + 2.0 * sqrt(2.0 / (3.0 + sqrt(5.0)))); - /* *INDENT-OFF* */ - dodec[0][0] = -alpha; dodec[0][1] = 0; dodec[0][2] = beta; - dodec[1][0] = alpha; dodec[1][1] = 0; dodec[1][2] = beta; - dodec[2][0] = -1; dodec[2][1] = -1; dodec[2][2] = -1; - dodec[3][0] = -1; dodec[3][1] = -1; dodec[3][2] = 1; - dodec[4][0] = -1; dodec[4][1] = 1; dodec[4][2] = -1; - dodec[5][0] = -1; dodec[5][1] = 1; dodec[5][2] = 1; - dodec[6][0] = 1; dodec[6][1] = -1; dodec[6][2] = -1; - dodec[7][0] = 1; dodec[7][1] = -1; dodec[7][2] = 1; - dodec[8][0] = 1; dodec[8][1] = 1; dodec[8][2] = -1; - dodec[9][0] = 1; dodec[9][1] = 1; dodec[9][2] = 1; - dodec[10][0] = beta; dodec[10][1] = alpha; dodec[10][2] = 0; - dodec[11][0] = beta; dodec[11][1] = -alpha; dodec[11][2] = 0; - dodec[12][0] = -beta; dodec[12][1] = alpha; dodec[12][2] = 0; - dodec[13][0] = -beta; dodec[13][1] = -alpha; dodec[13][2] = 0; - dodec[14][0] = -alpha; dodec[14][1] = 0; dodec[14][2] = -beta; - dodec[15][0] = alpha; dodec[15][1] = 0; dodec[15][2] = -beta; - dodec[16][0] = 0; dodec[16][1] = beta; dodec[16][2] = alpha; - dodec[17][0] = 0; dodec[17][1] = beta; dodec[17][2] = -alpha; - dodec[18][0] = 0; dodec[18][1] = -beta; dodec[18][2] = alpha; - dodec[19][0] = 0; dodec[19][1] = -beta; dodec[19][2] = -alpha; - /* *INDENT-ON* */ - -} - -#define DIFF3(_a,_b,_c) { \ - (_c)[0] = (_a)[0] - (_b)[0]; \ - (_c)[1] = (_a)[1] - (_b)[1]; \ - (_c)[2] = (_a)[2] - (_b)[2]; \ -} - -static void -crossprod(GLfloat v1[3], GLfloat v2[3], GLfloat prod[3]) -{ - GLfloat p[3]; /* in case prod == v1 or v2 */ - - p[0] = v1[1] * v2[2] - v2[1] * v1[2]; - p[1] = v1[2] * v2[0] - v2[2] * v1[0]; - p[2] = v1[0] * v2[1] - v2[0] * v1[1]; - prod[0] = p[0]; - prod[1] = p[1]; - prod[2] = p[2]; -} - -static void -normalize(GLfloat v[3]) -{ - GLfloat d; - - d = sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); - if (d == 0.0) { - __glutWarning("normalize: zero length vector"); - v[0] = d = 1.0; - } - d = 1 / d; - v[0] *= d; - v[1] *= d; - v[2] *= d; -} - -static void -pentagon(int a, int b, int c, int d, int e, GLenum shadeType) -{ - GLfloat n0[3], d1[3], d2[3]; - - DIFF3(dodec[a], dodec[b], d1); - DIFF3(dodec[b], dodec[c], d2); - crossprod(d1, d2, n0); - normalize(n0); - - glBegin(shadeType); - glNormal3fv(n0); - glVertex3fv(&dodec[a][0]); - glVertex3fv(&dodec[b][0]); - glVertex3fv(&dodec[c][0]); - glVertex3fv(&dodec[d][0]); - glVertex3fv(&dodec[e][0]); - glEnd(); -} - -static void -dodecahedron(GLenum type) -{ - static int inited = 0; - - if (inited == 0) { - inited = 1; - initDodecahedron(); - } - pentagon(0, 1, 9, 16, 5, type); - pentagon(1, 0, 3, 18, 7, type); - pentagon(1, 7, 11, 10, 9, type); - pentagon(11, 7, 18, 19, 6, type); - pentagon(8, 17, 16, 9, 10, type); - pentagon(2, 14, 15, 6, 19, type); - pentagon(2, 13, 12, 4, 14, type); - pentagon(2, 19, 18, 3, 13, type); - pentagon(3, 0, 5, 12, 13, type); - pentagon(6, 15, 8, 10, 11, type); - pentagon(4, 17, 8, 15, 14, type); - pentagon(4, 12, 5, 16, 17, type); -} - -/* CENTRY */ -void GLUTAPIENTRY -glutWireDodecahedron(void) -{ - dodecahedron(GL_LINE_LOOP); -} - -void GLUTAPIENTRY -glutSolidDodecahedron(void) -{ - dodecahedron(GL_TRIANGLE_FAN); -} - -/* ENDCENTRY */ - -static void -recorditem(GLfloat * n1, GLfloat * n2, GLfloat * n3, - GLenum shadeType) -{ - GLfloat q0[3], q1[3]; - - DIFF3(n1, n2, q0); - DIFF3(n2, n3, q1); - crossprod(q0, q1, q1); - normalize(q1); - - glBegin(shadeType); - glNormal3fv(q1); - glVertex3fv(n1); - glVertex3fv(n2); - glVertex3fv(n3); - glEnd(); -} - -static void -subdivide(GLfloat * v0, GLfloat * v1, GLfloat * v2, - GLenum shadeType) -{ - int depth; - GLfloat w0[3], w1[3], w2[3]; - GLfloat l; - int i, j, k, n; - - depth = 1; - for (i = 0; i < depth; i++) { - for (j = 0; i + j < depth; j++) { - k = depth - i - j; - for (n = 0; n < 3; n++) { - w0[n] = (i * v0[n] + j * v1[n] + k * v2[n]) / depth; - w1[n] = ((i + 1) * v0[n] + j * v1[n] + (k - 1) * v2[n]) - / depth; - w2[n] = (i * v0[n] + (j + 1) * v1[n] + (k - 1) * v2[n]) - / depth; - } - l = sqrt(w0[0] * w0[0] + w0[1] * w0[1] + w0[2] * w0[2]); - w0[0] /= l; - w0[1] /= l; - w0[2] /= l; - l = sqrt(w1[0] * w1[0] + w1[1] * w1[1] + w1[2] * w1[2]); - w1[0] /= l; - w1[1] /= l; - w1[2] /= l; - l = sqrt(w2[0] * w2[0] + w2[1] * w2[1] + w2[2] * w2[2]); - w2[0] /= l; - w2[1] /= l; - w2[2] /= l; - recorditem(w1, w0, w2, shadeType); - } - } -} - -static void -drawtriangle(int i, GLfloat data[][3], int ndx[][3], - GLenum shadeType) -{ - GLfloat *x0, *x1, *x2; - - x0 = data[ndx[i][0]]; - x1 = data[ndx[i][1]]; - x2 = data[ndx[i][2]]; - subdivide(x0, x1, x2, shadeType); -} - -/* octahedron data: The octahedron produced is centered at the - origin and has radius 1.0 */ -static GLfloat odata[6][3] = -{ - {1.0, 0.0, 0.0}, - {-1.0, 0.0, 0.0}, - {0.0, 1.0, 0.0}, - {0.0, -1.0, 0.0}, - {0.0, 0.0, 1.0}, - {0.0, 0.0, -1.0} -}; - -static int ondex[8][3] = -{ - {0, 4, 2}, - {1, 2, 4}, - {0, 3, 4}, - {1, 4, 3}, - {0, 2, 5}, - {1, 5, 2}, - {0, 5, 3}, - {1, 3, 5} -}; - -static void -octahedron(GLenum shadeType) -{ - int i; - - for (i = 7; i >= 0; i--) { - drawtriangle(i, odata, ondex, shadeType); - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutWireOctahedron(void) -{ - octahedron(GL_LINE_LOOP); -} - -void GLUTAPIENTRY -glutSolidOctahedron(void) -{ - octahedron(GL_TRIANGLES); -} - -/* ENDCENTRY */ - -/* icosahedron data: These numbers are rigged to make an - icosahedron of radius 1.0 */ - -#define X .525731112119133606 -#define Z .850650808352039932 - -static GLfloat idata[12][3] = -{ - {-X, 0, Z}, - {X, 0, Z}, - {-X, 0, -Z}, - {X, 0, -Z}, - {0, Z, X}, - {0, Z, -X}, - {0, -Z, X}, - {0, -Z, -X}, - {Z, X, 0}, - {-Z, X, 0}, - {Z, -X, 0}, - {-Z, -X, 0} -}; - -static int index[20][3] = -{ - {0, 4, 1}, - {0, 9, 4}, - {9, 5, 4}, - {4, 5, 8}, - {4, 8, 1}, - {8, 10, 1}, - {8, 3, 10}, - {5, 3, 8}, - {5, 2, 3}, - {2, 7, 3}, - {7, 10, 3}, - {7, 6, 10}, - {7, 11, 6}, - {11, 0, 6}, - {0, 1, 6}, - {6, 1, 10}, - {9, 0, 11}, - {9, 11, 2}, - {9, 2, 5}, - {7, 2, 11}, -}; - -static void -icosahedron(GLenum shadeType) -{ - int i; - - for (i = 19; i >= 0; i--) { - drawtriangle(i, idata, index, shadeType); - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutWireIcosahedron(void) -{ - icosahedron(GL_LINE_LOOP); -} - -void GLUTAPIENTRY -glutSolidIcosahedron(void) -{ - icosahedron(GL_TRIANGLES); -} - -/* ENDCENTRY */ - -/* tetrahedron data: */ - -#define T 1.73205080756887729 - -static GLfloat tdata[4][3] = -{ - {T, T, T}, - {T, -T, -T}, - {-T, T, -T}, - {-T, -T, T} -}; - -static int tndex[4][3] = -{ - {0, 1, 3}, - {2, 1, 0}, - {3, 2, 0}, - {1, 2, 3} -}; - -static void -tetrahedron(GLenum shadeType) -{ - int i; - - for (i = 3; i >= 0; i--) - drawtriangle(i, tdata, tndex, shadeType); -} - -/* CENTRY */ -void GLUTAPIENTRY -glutWireTetrahedron(void) -{ - tetrahedron(GL_LINE_LOOP); -} - -void GLUTAPIENTRY -glutSolidTetrahedron(void) -{ - tetrahedron(GL_TRIANGLES); -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_space.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_space.c deleted file mode 100644 index cde6ea732c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_space.c +++ /dev/null @@ -1,35 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" - -void GLUTAPIENTRY -glutSpaceballMotionFunc(GLUTspaceMotionCB spaceMotionFunc) -{ - __glutCurrentWindow->spaceMotion = spaceMotionFunc; - __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask; - __glutPutOnWorkList(__glutCurrentWindow, - GLUT_DEVICE_MASK_WORK); -} - -void GLUTAPIENTRY -glutSpaceballRotateFunc(GLUTspaceRotateCB spaceRotateFunc) -{ - __glutCurrentWindow->spaceRotate = spaceRotateFunc; - __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask; - __glutPutOnWorkList(__glutCurrentWindow, - GLUT_DEVICE_MASK_WORK); -} - -void GLUTAPIENTRY -glutSpaceballButtonFunc(GLUTspaceButtonCB spaceButtonFunc) -{ - __glutCurrentWindow->spaceButton = spaceButtonFunc; - __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask; - __glutPutOnWorkList(__glutCurrentWindow, - GLUT_DEVICE_MASK_WORK); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_stroke.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_stroke.c deleted file mode 100644 index 7569012ec4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_stroke.c +++ /dev/null @@ -1,42 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" -#include "glutstroke.h" - -void GLUTAPIENTRY -glutStrokeCharacter(GLUTstrokeFont font, int c) -{ - const StrokeCharRec *ch; - const StrokeRec *stroke; - const CoordRec *coord; - StrokeFontPtr fontinfo; - int i, j; - - -#if defined(_WIN32) || defined(GLUT_IMPORT_LIB) - fontinfo = (StrokeFontPtr) __glutFont(font); -#else - fontinfo = (StrokeFontPtr) font; -#endif - - if (c < 0 || c >= fontinfo->num_chars) - return; - ch = &(fontinfo->ch[c]); - if (ch) { - for (i = ch->num_strokes, stroke = ch->stroke; - i > 0; i--, stroke++) { - glBegin(GL_LINE_STRIP); - for (j = stroke->num_coords, coord = stroke->coord; - j > 0; j--, coord++) { - glVertex2f(coord->x, coord->y); - } - glEnd(); - } - glTranslatef(ch->right, 0.0, 0.0); - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_swap.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_swap.c deleted file mode 100644 index 4831b8eb35..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_swap.c +++ /dev/null @@ -1,67 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include "glutint.h" - -GLint __glutFPS = 0; -GLint __glutSwapCount = 0; -GLint __glutSwapTime = 0; - -/* CENTRY */ -void GLUTAPIENTRY -glutSwapBuffers(void) -{ - GLUTwindow *window = __glutCurrentWindow; - - if (window->renderWin == window->win) { - if (__glutCurrentWindow->treatAsSingle) { - /* Pretend the double buffered window is single buffered, - so treat glutSwapBuffers as a no-op. */ - return; - } - } else { - if (__glutCurrentWindow->overlay->treatAsSingle) { - /* Pretend the double buffered overlay is single - buffered, so treat glutSwapBuffers as a no-op. */ - return; - } - } - - /* For the MESA_SWAP_HACK. */ - window->usedSwapBuffers = 1; - - SWAP_BUFFERS_LAYER(__glutCurrentWindow); - - /* I considered putting the window being swapped on the - GLUT_FINISH_WORK work list because you could call - glutSwapBuffers from an idle callback which doesn't call - __glutSetWindow which normally adds indirect rendering - windows to the GLUT_FINISH_WORK work list. Not being put - on the list could lead to the buffering up of multiple - redisplays and buffer swaps and hamper interactivity. I - consider this an application bug due to not using - glutPostRedisplay to trigger redraws. If - glutPostRedisplay were used, __glutSetWindow would be - called and a glFinish to throttle buffering would occur. */ - - if (__glutFPS) { - GLint t = glutGet(GLUT_ELAPSED_TIME); - __glutSwapCount++; - if (__glutSwapTime == 0) - __glutSwapTime = t; - else if (t - __glutSwapTime > __glutFPS) { - float time = 0.001 * (t - __glutSwapTime); - float fps = (float) __glutSwapCount / time; - fprintf(stderr, "GLUT: %d frames in %.2f seconds = %.2f FPS\n", - __glutSwapCount, time, fps); - __glutSwapTime = t; - __glutSwapCount = 0; - } - } -} -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_swidth.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_swidth.c deleted file mode 100644 index 4717bbff5b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_swidth.c +++ /dev/null @@ -1,58 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1995. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" -#include "glutstroke.h" - -/* CENTRY */ -int GLUTAPIENTRY -glutStrokeWidth(GLUTstrokeFont font, int c) -{ - StrokeFontPtr fontinfo; - const StrokeCharRec *ch; - -#if defined(_WIN32) || defined(GLUT_IMPORT_LIB) - fontinfo = (StrokeFontPtr) __glutFont(font); -#else - fontinfo = (StrokeFontPtr) font; -#endif - - if (c < 0 || c >= fontinfo->num_chars) - return 0; - ch = &(fontinfo->ch[c]); - if (ch) - return ch->right; - else - return 0; -} - -int GLUTAPIENTRY -glutStrokeLength(GLUTstrokeFont font, const unsigned char *string) -{ - int c, length; - StrokeFontPtr fontinfo; - const StrokeCharRec *ch; - -#if defined(_WIN32) || defined(GLUT_IMPORT_LIB) - fontinfo = (StrokeFontPtr) __glutFont(font); -#else - fontinfo = (StrokeFontPtr) font; -#endif - - length = 0; - for (; *string != '\0'; string++) { - c = *string; - if (c >= 0 && c < fontinfo->num_chars) { - ch = &(fontinfo->ch[c]); - if (ch) - length += ch->right; - } - } - return length; -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_tablet.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_tablet.c deleted file mode 100644 index 80c68288c1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_tablet.c +++ /dev/null @@ -1,33 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include - -#include "glutint.h" - -void GLUTAPIENTRY -glutTabletMotionFunc(GLUTtabletMotionCB tabletMotionFunc) -{ - __glutCurrentWindow->tabletMotion = tabletMotionFunc; - __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask; - __glutPutOnWorkList(__glutCurrentWindow, - GLUT_DEVICE_MASK_WORK); - /* If deinstalling callback, invalidate tablet position. */ - if (tabletMotionFunc == NULL) { - __glutCurrentWindow->tabletPos[0] = -1; - __glutCurrentWindow->tabletPos[1] = -1; - } -} - -void GLUTAPIENTRY -glutTabletButtonFunc(GLUTtabletButtonCB tabletButtonFunc) -{ - __glutCurrentWindow->tabletButton = tabletButtonFunc; - __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask; - __glutPutOnWorkList(__glutCurrentWindow, - GLUT_DEVICE_MASK_WORK); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_teapot.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_teapot.c deleted file mode 100644 index ff46d96b85..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_teapot.c +++ /dev/null @@ -1,210 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/** -(c) Copyright 1993, Silicon Graphics, Inc. - -ALL RIGHTS RESERVED - -Permission to use, copy, modify, and distribute this software -for any purpose and without fee is hereby granted, provided -that the above copyright notice appear in all copies and that -both the copyright notice and this permission notice appear in -supporting documentation, and that the name of Silicon -Graphics, Inc. not be used in advertising or publicity -pertaining to distribution of the software without specific, -written prior permission. - -THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU -"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR -OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO -EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE -ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER, -INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE, -SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR -NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR -PERFORMANCE OF THIS SOFTWARE. - -US Government Users Restricted Rights - -Use, duplication, or disclosure by the Government is subject to -restrictions set forth in FAR 52.227.19(c)(2) or subparagraph -(c)(1)(ii) of the Rights in Technical Data and Computer -Software clause at DFARS 252.227-7013 and/or in similar or -successor clauses in the FAR or the DOD or NASA FAR -Supplement. Unpublished-- rights reserved under the copyright -laws of the United States. Contractor/manufacturer is Silicon -Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA -94039-7311. - -OpenGL(TM) is a trademark of Silicon Graphics, Inc. -*/ - -#include "glutint.h" - -/* Rim, body, lid, and bottom data must be reflected in x and - y; handle and spout data across the y axis only. */ - -static int patchdata[][16] = -{ - /* rim */ - {102, 103, 104, 105, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15}, - /* body */ - {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27}, - {24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40}, - /* lid */ - {96, 96, 96, 96, 97, 98, 99, 100, 101, 101, 101, - 101, 0, 1, 2, 3,}, - {0, 1, 2, 3, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117}, - /* bottom */ - {118, 118, 118, 118, 124, 122, 119, 121, 123, 126, - 125, 120, 40, 39, 38, 37}, - /* handle */ - {41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56}, - {53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 28, 65, 66, 67}, - /* spout */ - {68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83}, - {80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95} -}; -/* *INDENT-OFF* */ - -static float cpdata[][3] = -{ - {0.2, 0, 2.7}, {0.2, -0.112, 2.7}, {0.112, -0.2, 2.7}, {0, - -0.2, 2.7}, {1.3375, 0, 2.53125}, {1.3375, -0.749, 2.53125}, - {0.749, -1.3375, 2.53125}, {0, -1.3375, 2.53125}, {1.4375, - 0, 2.53125}, {1.4375, -0.805, 2.53125}, {0.805, -1.4375, - 2.53125}, {0, -1.4375, 2.53125}, {1.5, 0, 2.4}, {1.5, -0.84, - 2.4}, {0.84, -1.5, 2.4}, {0, -1.5, 2.4}, {1.75, 0, 1.875}, - {1.75, -0.98, 1.875}, {0.98, -1.75, 1.875}, {0, -1.75, - 1.875}, {2, 0, 1.35}, {2, -1.12, 1.35}, {1.12, -2, 1.35}, - {0, -2, 1.35}, {2, 0, 0.9}, {2, -1.12, 0.9}, {1.12, -2, - 0.9}, {0, -2, 0.9}, {-2, 0, 0.9}, {2, 0, 0.45}, {2, -1.12, - 0.45}, {1.12, -2, 0.45}, {0, -2, 0.45}, {1.5, 0, 0.225}, - {1.5, -0.84, 0.225}, {0.84, -1.5, 0.225}, {0, -1.5, 0.225}, - {1.5, 0, 0.15}, {1.5, -0.84, 0.15}, {0.84, -1.5, 0.15}, {0, - -1.5, 0.15}, {-1.6, 0, 2.025}, {-1.6, -0.3, 2.025}, {-1.5, - -0.3, 2.25}, {-1.5, 0, 2.25}, {-2.3, 0, 2.025}, {-2.3, -0.3, - 2.025}, {-2.5, -0.3, 2.25}, {-2.5, 0, 2.25}, {-2.7, 0, - 2.025}, {-2.7, -0.3, 2.025}, {-3, -0.3, 2.25}, {-3, 0, - 2.25}, {-2.7, 0, 1.8}, {-2.7, -0.3, 1.8}, {-3, -0.3, 1.8}, - {-3, 0, 1.8}, {-2.7, 0, 1.575}, {-2.7, -0.3, 1.575}, {-3, - -0.3, 1.35}, {-3, 0, 1.35}, {-2.5, 0, 1.125}, {-2.5, -0.3, - 1.125}, {-2.65, -0.3, 0.9375}, {-2.65, 0, 0.9375}, {-2, - -0.3, 0.9}, {-1.9, -0.3, 0.6}, {-1.9, 0, 0.6}, {1.7, 0, - 1.425}, {1.7, -0.66, 1.425}, {1.7, -0.66, 0.6}, {1.7, 0, - 0.6}, {2.6, 0, 1.425}, {2.6, -0.66, 1.425}, {3.1, -0.66, - 0.825}, {3.1, 0, 0.825}, {2.3, 0, 2.1}, {2.3, -0.25, 2.1}, - {2.4, -0.25, 2.025}, {2.4, 0, 2.025}, {2.7, 0, 2.4}, {2.7, - -0.25, 2.4}, {3.3, -0.25, 2.4}, {3.3, 0, 2.4}, {2.8, 0, - 2.475}, {2.8, -0.25, 2.475}, {3.525, -0.25, 2.49375}, - {3.525, 0, 2.49375}, {2.9, 0, 2.475}, {2.9, -0.15, 2.475}, - {3.45, -0.15, 2.5125}, {3.45, 0, 2.5125}, {2.8, 0, 2.4}, - {2.8, -0.15, 2.4}, {3.2, -0.15, 2.4}, {3.2, 0, 2.4}, {0, 0, - 3.15}, {0.8, 0, 3.15}, {0.8, -0.45, 3.15}, {0.45, -0.8, - 3.15}, {0, -0.8, 3.15}, {0, 0, 2.85}, {1.4, 0, 2.4}, {1.4, - -0.784, 2.4}, {0.784, -1.4, 2.4}, {0, -1.4, 2.4}, {0.4, 0, - 2.55}, {0.4, -0.224, 2.55}, {0.224, -0.4, 2.55}, {0, -0.4, - 2.55}, {1.3, 0, 2.55}, {1.3, -0.728, 2.55}, {0.728, -1.3, - 2.55}, {0, -1.3, 2.55}, {1.3, 0, 2.4}, {1.3, -0.728, 2.4}, - {0.728, -1.3, 2.4}, {0, -1.3, 2.4}, {0, 0, 0}, {1.425, - -0.798, 0}, {1.5, 0, 0.075}, {1.425, 0, 0}, {0.798, -1.425, - 0}, {0, -1.5, 0.075}, {0, -1.425, 0}, {1.5, -0.84, 0.075}, - {0.84, -1.5, 0.075} -}; - -static float tex[2][2][2] = -{ - { {0, 0}, - {1, 0}}, - { {0, 1}, - {1, 1}} -}; - -/* *INDENT-ON* */ - -static void -teapot(GLint grid, GLdouble scale, GLenum type) -{ - float p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3]; - long i, j, k, l; - - glPushAttrib(GL_ENABLE_BIT | GL_EVAL_BIT); - glEnable(GL_AUTO_NORMAL); - glEnable(GL_NORMALIZE); - glEnable(GL_MAP2_VERTEX_3); - glEnable(GL_MAP2_TEXTURE_COORD_2); - glPushMatrix(); - glRotatef(270.0, 1.0, 0.0, 0.0); - glScalef(0.5 * scale, 0.5 * scale, 0.5 * scale); - glTranslatef(0.0, 0.0, -1.5); - for (i = 0; i < 10; i++) { - for (j = 0; j < 4; j++) { - for (k = 0; k < 4; k++) { - for (l = 0; l < 3; l++) { - p[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; - q[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l]; - if (l == 1) - q[j][k][l] *= -1.0; - if (i < 6) { - r[j][k][l] = - cpdata[patchdata[i][j * 4 + (3 - k)]][l]; - if (l == 0) - r[j][k][l] *= -1.0; - s[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; - if (l == 0) - s[j][k][l] *= -1.0; - if (l == 1) - s[j][k][l] *= -1.0; - } - } - } - } - glMap2f(GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2, - &tex[0][0][0]); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &p[0][0][0]); - glMapGrid2f(grid, 0.0, 1.0, grid, 0.0, 1.0); - glEvalMesh2(type, 0, grid, 0, grid); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &q[0][0][0]); - glEvalMesh2(type, 0, grid, 0, grid); - if (i < 6) { - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &r[0][0][0]); - glEvalMesh2(type, 0, grid, 0, grid); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &s[0][0][0]); - glEvalMesh2(type, 0, grid, 0, grid); - } - } - glPopMatrix(); - glPopAttrib(); -} - -/* CENTRY */ -void GLUTAPIENTRY -glutSolidTeapot(GLdouble scale) -{ - teapot(7, scale, GL_FILL); -} - -void GLUTAPIENTRY -glutWireTeapot(GLdouble scale) -{ - teapot(10, scale, GL_LINE); -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_tr10.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_tr10.c deleted file mode 100644 index 0fac8070ca..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_tr10.c +++ /dev/null @@ -1,1777 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmapTimesRoman10 XXX -#include "glutbitmap.h" -#undef glutBitmapTimesRoman10 - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0x80,0xc0,0x40,0x60,0xa0,0x90,0xb8,0x0,0xa0, -}; - -static const BitmapCharRec ch255 = {5,9,0,2,5,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0xc0,0x80,0xe0,0x90,0x90,0x90,0xe0,0x80,0x80, -}; - -static const BitmapCharRec ch254 = {4,9,0,2,5,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x80,0xc0,0x40,0x60,0xa0,0x90,0xb8,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch253 = {5,10,0,2,5,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x68,0x90,0x90,0x90,0x90,0x0,0x50, -}; - -static const BitmapCharRec ch252 = {5,7,0,0,5,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x68,0x90,0x90,0x90,0x90,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch251 = {5,8,0,0,5,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x68,0x90,0x90,0x90,0x90,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch250 = {5,8,0,0,5,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x68,0x90,0x90,0x90,0x90,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch249 = {5,8,0,0,5,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0x80,0x70,0x48,0x48,0x48,0x38,0x4, -}; - -static const BitmapCharRec ch248 = {6,7,1,1,5,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x20,0x0,0xf8,0x0,0x20, -}; - -static const BitmapCharRec ch247 = {5,5,0,0,6,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x60,0x90,0x90,0x90,0x60,0x0,0xa0, -}; - -static const BitmapCharRec ch246 = {4,7,0,0,5,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x60,0x90,0x90,0x90,0x60,0x0,0xa0,0x50, -}; - -static const BitmapCharRec ch245 = {4,8,0,0,5,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x60,0x90,0x90,0x90,0x60,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch244 = {4,8,0,0,5,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x60,0x90,0x90,0x90,0x60,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch243 = {4,8,0,0,5,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x60,0x90,0x90,0x90,0x60,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch242 = {4,8,0,0,5,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0xd8,0x90,0x90,0x90,0xe0,0x0,0xa0,0x50, -}; - -static const BitmapCharRec ch241 = {5,8,0,0,5,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x60,0x90,0x90,0x90,0x70,0xa0,0x70,0x40, -}; - -static const BitmapCharRec ch240 = {4,8,0,0,5,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0xe0,0x40,0x40,0x40,0xc0,0x0,0xa0, -}; - -static const BitmapCharRec ch239 = {3,7,0,0,4,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0xe0,0x40,0x40,0x40,0xc0,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch238 = {3,8,0,0,4,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0xe0,0x40,0x40,0x40,0xc0,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch237 = {3,8,0,0,4,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0xe0,0x40,0x40,0x40,0xc0,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch236 = {3,8,0,0,4,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x60,0x80,0xc0,0xa0,0x60,0x0,0xa0, -}; - -static const BitmapCharRec ch235 = {3,7,0,0,4,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x60,0x80,0xc0,0xa0,0x60,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch234 = {3,8,0,0,4,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x60,0x80,0xc0,0xa0,0x60,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch233 = {3,8,0,0,4,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x60,0x80,0xc0,0xa0,0x60,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch232 = {3,8,0,0,4,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0xc0,0x20,0x40,0x60,0x80,0x80,0x80,0x60, -}; - -static const BitmapCharRec ch231 = {3,8,0,3,4,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0xd8,0xa0,0x70,0x28,0xd8, -}; - -static const BitmapCharRec ch230 = {5,5,0,0,6,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0xe0,0xa0,0x60,0x20,0xc0,0x40,0xa0,0x40, -}; - -static const BitmapCharRec ch229 = {3,8,0,0,4,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0xe0,0xa0,0x60,0x20,0xc0,0x0,0xa0, -}; - -static const BitmapCharRec ch228 = {3,7,0,0,4,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0xe0,0xa0,0x60,0x20,0xc0,0x0,0xa0,0x50, -}; - -static const BitmapCharRec ch227 = {4,8,0,0,4,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0xe0,0xa0,0x60,0x20,0xc0,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch226 = {3,8,0,0,4,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0xe0,0xa0,0x60,0x20,0xc0,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch225 = {3,8,0,0,4,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0xe0,0xa0,0x60,0x20,0xc0,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch224 = {3,8,0,0,4,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0xe0,0x50,0x50,0x60,0x50,0x50,0x20, -}; - -static const BitmapCharRec ch223 = {4,7,0,0,5,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0xe0,0x40,0x70,0x48,0x70,0x40,0xe0, -}; - -static const BitmapCharRec ch222 = {5,7,0,0,6,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x38,0x10,0x10,0x28,0x28,0x44,0xee,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch221 = {7,10,0,0,8,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x28, -}; - -static const BitmapCharRec ch220 = {7,9,0,0,8,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch219 = {7,10,0,0,8,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch218 = {7,10,0,0,8,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch217 = {7,10,0,0,8,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x80,0x7c,0x66,0x52,0x52,0x4a,0x66,0x3e,0x1, -}; - -static const BitmapCharRec ch216 = {8,9,0,1,8,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x88,0x50,0x20,0x50,0x88, -}; - -static const BitmapCharRec ch215 = {5,5,0,0,6,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x50, -}; - -static const BitmapCharRec ch214 = {6,9,0,0,7,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch213 = {6,10,0,0,7,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch212 = {6,10,0,0,7,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch211 = {6,10,0,0,7,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch210 = {6,10,0,0,7,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0xe4,0x4c,0x4c,0x54,0x54,0x64,0xee,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch209 = {7,10,0,0,8,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0xf8,0x4c,0x44,0xe4,0x44,0x4c,0xf8, -}; - -static const BitmapCharRec ch208 = {6,7,0,0,7,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0xa0, -}; - -static const BitmapCharRec ch207 = {3,9,0,0,4,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch206 = {3,10,0,0,4,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch205 = {3,10,0,0,4,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch204 = {3,10,0,0,4,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x50, -}; - -static const BitmapCharRec ch203 = {5,9,0,0,6,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch202 = {5,10,0,0,6,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch201 = {5,10,0,0,6,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch200 = {5,10,0,0,6,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x60,0x10,0x20,0x78,0xc4,0x80,0x80,0x80,0xc4,0x7c, -}; - -static const BitmapCharRec ch199 = {6,10,0,3,7,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0xef,0x49,0x78,0x2e,0x28,0x39,0x1f, -}; - -static const BitmapCharRec ch198 = {8,7,0,0,9,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x10,0x28,0x10, -}; - -static const BitmapCharRec ch197 = {7,10,0,0,8,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x28, -}; - -static const BitmapCharRec ch196 = {7,9,0,0,8,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch195 = {7,10,0,0,8,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch194 = {7,10,0,0,8,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch193 = {7,10,0,0,8,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch192 = {7,10,0,0,8,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0xe0,0xa0,0x80,0x40,0x40,0x0,0x40, -}; - -static const BitmapCharRec ch191 = {3,7,0,2,4,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x44,0x3e,0x2c,0xd4,0x28,0x48,0xe4, -}; - -static const BitmapCharRec ch190 = {7,7,0,0,8,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x4e,0x24,0x2a,0xf6,0x48,0xc8,0x44, -}; - -static const BitmapCharRec ch189 = {7,7,0,0,8,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x44,0x3e,0x2c,0xf4,0x48,0xc8,0x44, -}; - -static const BitmapCharRec ch188 = {7,7,0,0,8,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0xa0,0x50,0x50,0xa0, -}; - -static const BitmapCharRec ch187 = {4,4,0,-1,5,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xe0,0x0,0x40,0xa0,0x40, -}; - -static const BitmapCharRec ch186 = {3,5,0,-2,4,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0xe0,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch185 = {3,4,0,-3,3,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0xc0,0x20,0x40, -}; - -static const BitmapCharRec ch184 = {3,3,0,3,4,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0x80, -}; - -static const BitmapCharRec ch183 = {1,1,0,-2,2,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x7c, -}; - -static const BitmapCharRec ch182 = {6,9,0,2,6,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x80,0x80,0xe8,0x90,0x90,0x90,0x90, -}; - -static const BitmapCharRec ch181 = {5,7,0,2,5,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0x80,0x40, -}; - -static const BitmapCharRec ch180 = {2,2,0,-5,3,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0xc0,0x20,0x40,0xe0, -}; - -static const BitmapCharRec ch179 = {3,4,0,-3,3,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xe0,0x40,0xa0,0x60, -}; - -static const BitmapCharRec ch178 = {3,4,0,-3,3,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xf8,0x0,0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch177 = {5,7,0,0,6,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch176 = {4,4,0,-3,4,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xe0, -}; - -static const BitmapCharRec ch175 = {3,1,0,-6,4,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x38,0x44,0xaa,0xb2,0xba,0x44,0x38, -}; - -static const BitmapCharRec ch174 = {7,7,-1,0,9,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xe0, -}; - -static const BitmapCharRec ch173 = {3,1,0,-2,4,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x8,0x8,0xf8, -}; - -static const BitmapCharRec ch172 = {5,3,-1,-1,7,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x50,0xa0,0xa0,0x50, -}; - -static const BitmapCharRec ch171 = {4,4,0,-1,5,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xe0,0x0,0xa0,0x20,0xc0, -}; - -static const BitmapCharRec ch170 = {3,5,0,-2,4,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x38,0x44,0x9a,0xa2,0x9a,0x44,0x38, -}; - -static const BitmapCharRec ch169 = {7,7,-1,0,9,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xa0, -}; - -static const BitmapCharRec ch168 = {3,1,-1,-6,5,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0xe0,0x90,0x20,0x50,0x90,0xa0,0x40,0x90,0x70, -}; - -static const BitmapCharRec ch167 = {4,9,0,1,5,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0x80,0x80,0x80,0x0,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch166 = {1,7,0,0,2,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x70,0x20,0xf8,0x20,0xd8,0x50,0x88, -}; - -static const BitmapCharRec ch165 = {5,7,0,0,5,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0x88,0x70,0x50,0x50,0x70,0x88, -}; - -static const BitmapCharRec ch164 = {5,6,0,-1,5,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xf0,0xc8,0x40,0xe0,0x40,0x50,0x30, -}; - -static const BitmapCharRec ch163 = {5,7,0,0,5,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x80,0xe0,0x90,0x80,0x90,0x70,0x10, -}; - -static const BitmapCharRec ch162 = {4,7,0,1,5,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch161 = {1,7,-1,2,3,ch161data}; - -/* char: 0xa0 */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,2,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,2,0}; -#endif - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x98,0x64, -}; - -static const BitmapCharRec ch126 = {6,2,0,-2,7,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0x80,0x40,0x40,0x40,0x20,0x40,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch125 = {3,9,0,2,4,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch124 = {1,9,0,2,2,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x20,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch123 = {3,9,0,2,4,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xf0,0x90,0x40,0x20,0xf0, -}; - -static const BitmapCharRec ch122 = {4,5,0,0,5,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x40,0x40,0x20,0x30,0x50,0x48,0xdc, -}; - -static const BitmapCharRec ch121 = {6,7,1,2,5,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0xd8,0x50,0x20,0x50,0xd8, -}; - -static const BitmapCharRec ch120 = {5,5,0,0,6,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x28,0x6c,0x54,0x92,0xdb, -}; - -static const BitmapCharRec ch119 = {8,5,0,0,8,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x20,0x60,0x50,0x90,0xd8, -}; - -static const BitmapCharRec ch118 = {5,5,0,0,5,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x68,0x90,0x90,0x90,0x90, -}; - -static const BitmapCharRec ch117 = {5,5,0,0,5,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x30,0x40,0x40,0x40,0xe0,0x40, -}; - -static const BitmapCharRec ch116 = {4,6,0,0,4,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0xe0,0x20,0x60,0x80,0xe0, -}; - -static const BitmapCharRec ch115 = {3,5,0,0,4,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0xe0,0x40,0x40,0x60,0xa0, -}; - -static const BitmapCharRec ch114 = {3,5,0,0,4,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x38,0x10,0x70,0x90,0x90,0x90,0x70, -}; - -static const BitmapCharRec ch113 = {5,7,0,2,5,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0xc0,0x80,0xe0,0x90,0x90,0x90,0xe0, -}; - -static const BitmapCharRec ch112 = {4,7,0,2,5,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x60,0x90,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch111 = {4,5,0,0,5,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0xd8,0x90,0x90,0x90,0xe0, -}; - -static const BitmapCharRec ch110 = {5,5,0,0,5,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0xdb,0x92,0x92,0x92,0xec, -}; - -static const BitmapCharRec ch109 = {8,5,0,0,8,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0xe0,0x40,0x40,0x40,0x40,0x40,0xc0, -}; - -static const BitmapCharRec ch108 = {3,7,0,0,4,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0x98,0x90,0xe0,0xa0,0x90,0x80,0x80, -}; - -static const BitmapCharRec ch107 = {5,7,0,0,5,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0x80,0x40,0x40,0x40,0x40,0x40,0xc0,0x0,0x40, -}; - -static const BitmapCharRec ch106 = {2,9,0,2,3,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0x40,0x40,0x40,0x40,0xc0,0x0,0x40, -}; - -static const BitmapCharRec ch105 = {2,7,0,0,3,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0xd8,0x90,0x90,0x90,0xe0,0x80,0x80, -}; - -static const BitmapCharRec ch104 = {5,7,0,0,5,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0xe0,0x90,0x60,0x40,0xa0,0xa0,0x70, -}; - -static const BitmapCharRec ch103 = {4,7,0,2,5,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0xe0,0x40,0x40,0x40,0xe0,0x40,0x30, -}; - -static const BitmapCharRec ch102 = {4,7,0,0,4,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x60,0x80,0xc0,0xa0,0x60, -}; - -static const BitmapCharRec ch101 = {3,5,0,0,4,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x68,0x90,0x90,0x90,0x70,0x10,0x30, -}; - -static const BitmapCharRec ch100 = {5,7,0,0,5,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x60,0x80,0x80,0x80,0x60, -}; - -static const BitmapCharRec ch99 = {3,5,0,0,4,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xe0,0x90,0x90,0x90,0xe0,0x80,0x80, -}; - -static const BitmapCharRec ch98 = {4,7,0,0,5,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0xe0,0xa0,0x60,0x20,0xc0, -}; - -static const BitmapCharRec ch97 = {3,5,0,0,4,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0xc0,0x80, -}; - -static const BitmapCharRec ch96 = {2,2,0,-5,3,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xf8, -}; - -static const BitmapCharRec ch95 = {5,1,0,3,5,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0xa0,0xa0,0x40, -}; - -static const BitmapCharRec ch94 = {3,3,-1,-4,5,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0, -}; - -static const BitmapCharRec ch93 = {2,9,0,2,3,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x20,0x20,0x40,0x40,0x40,0x80,0x80, -}; - -static const BitmapCharRec ch92 = {3,7,0,0,3,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0, -}; - -static const BitmapCharRec ch91 = {2,9,0,2,3,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xf8,0x88,0x40,0x20,0x10,0x88,0xf8, -}; - -static const BitmapCharRec ch90 = {5,7,0,0,6,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x38,0x10,0x10,0x28,0x28,0x44,0xee, -}; - -static const BitmapCharRec ch89 = {7,7,0,0,8,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0xee,0x44,0x28,0x10,0x28,0x44,0xee, -}; - -static const BitmapCharRec ch88 = {7,7,0,0,8,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x22,0x0,0x22,0x0,0x55,0x0,0x55,0x0,0xc9,0x80,0x88,0x80,0xdd,0xc0, -}; - -static const BitmapCharRec ch87 = {10,7,0,0,10,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x10,0x10,0x28,0x28,0x6c,0x44,0xee, -}; - -static const BitmapCharRec ch86 = {7,7,0,0,8,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x38,0x6c,0x44,0x44,0x44,0x44,0xee, -}; - -static const BitmapCharRec ch85 = {7,7,0,0,8,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0x70,0x20,0x20,0x20,0x20,0xa8,0xf8, -}; - -static const BitmapCharRec ch84 = {5,7,0,0,6,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0xe0,0x90,0x10,0x60,0xc0,0x90,0x70, -}; - -static const BitmapCharRec ch83 = {4,7,0,0,5,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0xec,0x48,0x50,0x70,0x48,0x48,0xf0, -}; - -static const BitmapCharRec ch82 = {6,7,0,0,7,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0xc,0x18,0x70,0xcc,0x84,0x84,0x84,0xcc,0x78, -}; - -static const BitmapCharRec ch81 = {6,9,0,2,7,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0xe0,0x40,0x40,0x70,0x48,0x48,0xf0, -}; - -static const BitmapCharRec ch80 = {5,7,0,0,6,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x78,0xcc,0x84,0x84,0x84,0xcc,0x78, -}; - -static const BitmapCharRec ch79 = {6,7,0,0,7,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0xe4,0x4c,0x4c,0x54,0x54,0x64,0xee, -}; - -static const BitmapCharRec ch78 = {7,7,0,0,8,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0xeb,0x80,0x49,0x0,0x55,0x0,0x55,0x0,0x63,0x0,0x63,0x0,0xe3,0x80, -}; - -static const BitmapCharRec ch77 = {9,7,0,0,10,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xf8,0x48,0x40,0x40,0x40,0x40,0xe0, -}; - -static const BitmapCharRec ch76 = {5,7,0,0,6,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0xec,0x48,0x50,0x60,0x50,0x48,0xec, -}; - -static const BitmapCharRec ch75 = {6,7,0,0,7,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0xc0,0xa0,0x20,0x20,0x20,0x20,0x70, -}; - -static const BitmapCharRec ch74 = {4,7,0,0,4,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0xe0,0x40,0x40,0x40,0x40,0x40,0xe0, -}; - -static const BitmapCharRec ch73 = {3,7,0,0,4,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0xee,0x44,0x44,0x7c,0x44,0x44,0xee, -}; - -static const BitmapCharRec ch72 = {7,7,0,0,8,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x78,0xc4,0x84,0x9c,0x80,0xc4,0x7c, -}; - -static const BitmapCharRec ch71 = {6,7,0,0,7,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0xe0,0x40,0x40,0x70,0x40,0x48,0xf8, -}; - -static const BitmapCharRec ch70 = {5,7,0,0,6,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xf8,0x48,0x40,0x70,0x40,0x48,0xf8, -}; - -static const BitmapCharRec ch69 = {5,7,0,0,6,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xf8,0x4c,0x44,0x44,0x44,0x4c,0xf8, -}; - -static const BitmapCharRec ch68 = {6,7,0,0,7,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x78,0xc4,0x80,0x80,0x80,0xc4,0x7c, -}; - -static const BitmapCharRec ch67 = {6,7,0,0,7,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xf0,0x48,0x48,0x70,0x48,0x48,0xf0, -}; - -static const BitmapCharRec ch66 = {5,7,0,0,6,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0xee,0x44,0x7c,0x28,0x28,0x38,0x10, -}; - -static const BitmapCharRec ch65 = {7,7,0,0,8,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x3e,0x40,0x92,0xad,0xa5,0xa5,0x9d,0x42,0x3c, -}; - -static const BitmapCharRec ch64 = {8,9,0,2,9,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x40,0x0,0x40,0x40,0x20,0xa0,0xe0, -}; - -static const BitmapCharRec ch63 = {3,7,0,0,4,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0x80,0x40,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch62 = {3,5,0,0,5,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xf8,0x0,0xf8, -}; - -static const BitmapCharRec ch61 = {5,3,0,-1,6,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x20,0x40,0x80,0x40,0x20, -}; - -static const BitmapCharRec ch60 = {3,5,-1,0,5,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x80,0x80,0x0,0x0,0x0,0x80, -}; - -static const BitmapCharRec ch59 = {1,7,-1,2,3,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0x80,0x0,0x0,0x0,0x80, -}; - -static const BitmapCharRec ch58 = {1,5,-1,0,3,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0xc0,0x20,0x70,0x90,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch57 = {4,7,0,0,5,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x60,0x90,0x90,0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch56 = {4,7,0,0,5,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x40,0x40,0x40,0x20,0x20,0x90,0xf0, -}; - -static const BitmapCharRec ch55 = {4,7,0,0,5,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x60,0x90,0x90,0x90,0xe0,0x40,0x30, -}; - -static const BitmapCharRec ch54 = {4,7,0,0,5,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0xe0,0x90,0x10,0x10,0xe0,0x40,0x70, -}; - -static const BitmapCharRec ch53 = {4,7,0,0,5,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x10,0x10,0xf8,0x90,0x50,0x30,0x10, -}; - -static const BitmapCharRec ch52 = {5,7,0,0,5,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0xe0,0x10,0x10,0x60,0x10,0x90,0x60, -}; - -static const BitmapCharRec ch51 = {4,7,0,0,5,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xf0,0x40,0x20,0x20,0x10,0x90,0x60, -}; - -static const BitmapCharRec ch50 = {4,7,0,0,5,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0xe0,0x40,0x40,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch49 = {3,7,-1,0,5,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x60,0x90,0x90,0x90,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch48 = {4,7,0,0,5,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0x80,0x80,0x40,0x40,0x40,0x20,0x20, -}; - -static const BitmapCharRec ch47 = {3,7,0,0,3,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0x80, -}; - -static const BitmapCharRec ch46 = {1,1,-1,0,3,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xf0, -}; - -static const BitmapCharRec ch45 = {4,1,-1,-2,7,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x80,0x80, -}; - -static const BitmapCharRec ch44 = {1,3,-1,2,3,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch43 = {5,5,0,0,6,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0xa0,0x40,0xa0, -}; - -static const BitmapCharRec ch42 = {3,3,0,-4,5,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x40,0x20,0x20,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {3,9,0,2,4,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x20,0x40,0x40,0x80,0x80,0x80,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch40 = {3,9,0,2,4,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x40,0xc0, -}; - -static const BitmapCharRec ch39 = {2,2,0,-5,3,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x76,0x8d,0x98,0x74,0x6e,0x50,0x30, -}; - -static const BitmapCharRec ch38 = {8,7,0,0,8,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x44,0x2a,0x2a,0x56,0xa8,0xa4,0x7e, -}; - -static const BitmapCharRec ch37 = {7,7,0,0,8,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x20,0xe0,0x90,0x10,0x60,0x80,0x90,0x70,0x20, -}; - -static const BitmapCharRec ch36 = {4,9,0,1,5,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x50,0x50,0xf8,0x50,0xf8,0x50,0x50, -}; - -static const BitmapCharRec ch35 = {5,7,0,0,5,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0xa0,0xa0, -}; - -static const BitmapCharRec ch34 = {3,2,0,-5,4,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0x80,0x0,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch33 = {1,7,-1,0,3,ch33data}; - -/* char: 0x20 ' ' */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,2,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,2,0}; -#endif - -static const BitmapCharRec * const chars[] = { -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -const BitmapFontRec glutBitmapTimesRoman10 = { -"-adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1", -224, -32, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_tr24.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_tr24.c deleted file mode 100644 index 22b0e51603..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_tr24.c +++ /dev/null @@ -1,2060 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmapTimesRoman24 XXX -#include "glutbitmap.h" -#undef glutBitmapTimesRoman24 - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0, -0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0, -0xf1,0xe0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0, -}; - -static const BitmapCharRec ch255 = {11,21,0,5,11,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0xf0,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x6e,0x0,0x73,0x80,0x61,0x80, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x61,0x80,0x73,0x80, -0x6e,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0xe0,0x0, -}; - -static const BitmapCharRec ch254 = {10,22,-1,5,12,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0, -0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0, -0xf1,0xe0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80,0x1,0x80, -}; - -static const BitmapCharRec ch253 = {11,22,0,5,11,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0, -}; - -static const BitmapCharRec ch252 = {11,16,-1,0,13,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0, -0xc,0x0, -}; - -static const BitmapCharRec ch251 = {11,17,-1,0,13,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80, -0x1,0x80, -}; - -static const BitmapCharRec ch250 = {11,17,-1,0,13,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x2,0x0,0xc,0x0,0x38,0x0, -0x30,0x0, -}; - -static const BitmapCharRec ch249 = {11,17,-1,0,13,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0xc0,0x0,0xde,0x0,0x73,0x80,0x71,0x80,0xd0,0xc0,0xd8,0xc0,0xc8,0xc0,0xcc,0xc0, -0xc4,0xc0,0xc6,0xc0,0x63,0x80,0x73,0x80,0x1e,0xc0,0x0,0xc0, -}; - -static const BitmapCharRec ch248 = {10,14,-1,1,12,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x6,0x0,0x6,0x0,0x0,0x0,0x0,0x0,0xff,0xf0,0xff,0xf0,0x0,0x0,0x0,0x0, -0x6,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch247 = {12,10,-1,-2,14,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0, -}; - -static const BitmapCharRec ch246 = {10,16,-1,0,12,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x0,0x0,0x27,0x0,0x1c,0x80, -}; - -static const BitmapCharRec ch245 = {10,16,-1,0,12,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0, -0xc,0x0, -}; - -static const BitmapCharRec ch244 = {10,17,-1,0,12,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80, -0x1,0x80, -}; - -static const BitmapCharRec ch243 = {10,17,-1,0,12,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x2,0x0,0xc,0x0,0x38,0x0, -0x30,0x0, -}; - -static const BitmapCharRec ch242 = {10,17,-1,0,12,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x71,0xc0,0x6f,0x80,0xe7,0x0,0x0,0x0,0x0,0x0,0x27,0x0,0x1c,0x80, -}; - -static const BitmapCharRec ch241 = {11,16,-1,0,13,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1f,0x0,0xc6,0x0,0x3c,0x0,0x1e,0x0,0x71,0x80, -0xc0,0x0, -}; - -static const BitmapCharRec ch240 = {10,17,-1,0,12,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x0,0xcc,0xcc, -}; - -static const BitmapCharRec ch239 = {6,16,0,0,6,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x84,0x48,0x78, -0x30, -}; - -static const BitmapCharRec ch238 = {6,17,0,0,6,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x0,0x80,0x60,0x38, -0x18, -}; - -static const BitmapCharRec ch237 = {5,17,-1,0,6,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x8,0x30,0xe0, -0xc0, -}; - -static const BitmapCharRec ch236 = {5,17,0,0,6,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, -0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0, -}; - -static const BitmapCharRec ch235 = {9,16,-1,0,11,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, -0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0, -0xc,0x0, -}; - -static const BitmapCharRec ch234 = {9,17,-1,0,11,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, -0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x10,0x0,0xc,0x0,0x7,0x0, -0x3,0x0, -}; - -static const BitmapCharRec ch233 = {9,17,-1,0,11,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, -0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x4,0x0,0x18,0x0,0x70,0x0, -0x60,0x0, -}; - -static const BitmapCharRec ch232 = {9,17,-1,0,11,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x3c,0x0,0x66,0x0,0x6,0x0,0x1e,0x0,0x18,0x0,0x8,0x0,0x1e,0x0,0x7f,0x0, -0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x41,0x80, -0x63,0x80,0x1f,0x0, -}; - -static const BitmapCharRec ch231 = {9,18,-1,6,11,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x70,0xf0,0xfb,0xf8,0xc7,0x84,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0xfc, -0x3,0xc,0x63,0xc,0x67,0x98,0x3c,0xf0, -}; - -static const BitmapCharRec ch230 = {14,12,-1,0,16,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x1c,0x0,0x22,0x0,0x22,0x0, -0x1c,0x0, -}; - -static const BitmapCharRec ch229 = {9,17,-1,0,11,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x66,0x0,0x66,0x0, -}; - -static const BitmapCharRec ch228 = {9,16,-1,0,11,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x5c,0x0,0x3a,0x0, -}; - -static const BitmapCharRec ch227 = {9,16,-1,0,11,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x42,0x0,0x24,0x0,0x3c,0x0, -0x18,0x0, -}; - -static const BitmapCharRec ch226 = {9,17,-1,0,11,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x10,0x0,0xc,0x0,0x7,0x0, -0x3,0x0, -}; - -static const BitmapCharRec ch225 = {9,17,-1,0,11,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x4,0x0,0x18,0x0,0x70,0x0, -0x60,0x0, -}; - -static const BitmapCharRec ch224 = {9,17,-1,0,11,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0xe7,0x0,0x6c,0x80,0x6c,0xc0,0x60,0xc0,0x60,0xc0,0x61,0xc0,0x61,0x80,0x63,0x80, -0x67,0x0,0x6c,0x0,0x63,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0, -0x1e,0x0, -}; - -static const BitmapCharRec ch223 = {10,17,-1,0,12,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x18, -0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70,0x3f,0xc0,0x30,0x0,0x30,0x0,0x30,0x0, -0xfc,0x0, -}; - -static const BitmapCharRec ch222 = {13,17,-1,0,15,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x7,0xe0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0xc0, -0x3,0x40,0x6,0x60,0x6,0x20,0xc,0x30,0x1c,0x10,0x18,0x18,0x38,0x8,0x30,0xc, -0xfc,0x3f,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30, -}; - -static const BitmapCharRec ch221 = {16,22,0,0,16,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0xfc,0x1f,0x0,0x0,0x0,0x0,0x6,0x30,0x6,0x30, -}; - -static const BitmapCharRec ch220 = {16,21,-1,0,18,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0xfc,0x1f,0x0,0x0,0x8,0x10,0x6,0x60,0x3,0xc0,0x1,0x80, -}; - -static const BitmapCharRec ch219 = {16,22,-1,0,18,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0xfc,0x1f,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30, -}; - -static const BitmapCharRec ch218 = {16,22,-1,0,18,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0xfc,0x1f,0x0,0x0,0x0,0x40,0x1,0x80,0x7,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch217 = {16,22,-1,0,18,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x20,0x0,0x27,0xe0,0x1c,0x38,0x38,0x1c,0x68,0x6,0x64,0x6,0xc2,0x3,0xc2,0x3, -0xc1,0x3,0xc1,0x3,0xc0,0x83,0xc0,0x83,0xc0,0x43,0x60,0x46,0x60,0x26,0x38,0x1c, -0x1c,0x38,0x7,0xe4,0x0,0x4, -}; - -static const BitmapCharRec ch216 = {16,19,-1,1,18,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x80,0x40,0xc0,0xc0,0x61,0x80,0x33,0x0,0x1e,0x0,0xc,0x0,0x1e,0x0,0x33,0x0, -0x61,0x80,0xc0,0xc0,0x80,0x40, -}; - -static const BitmapCharRec ch215 = {10,11,-2,-1,14,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0,0x0,0x0,0x0,0x0,0x6,0x60,0x6,0x60, -}; - -static const BitmapCharRec ch214 = {16,21,-1,0,18,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0,0x0,0x0,0x0,0x0,0x4,0xe0,0x3,0x90, -}; - -static const BitmapCharRec ch213 = {16,21,-1,0,18,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0,0x0,0x0,0x8,0x10,0x6,0x60,0x3,0xc0,0x1,0x80, -}; - -static const BitmapCharRec ch212 = {16,22,-1,0,18,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30, -}; - -static const BitmapCharRec ch211 = {16,22,-1,0,18,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0,0x0,0x0,0x0,0x40,0x1,0x80,0x7,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch210 = {16,22,-1,0,18,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0xf8,0xc,0x20,0x1c,0x20,0x1c,0x20,0x34,0x20,0x64,0x20,0x64,0x20,0xc4,0x21,0x84, -0x21,0x84,0x23,0x4,0x26,0x4,0x26,0x4,0x2c,0x4,0x38,0x4,0x38,0x4,0x30,0x4, -0xf0,0x1f,0x0,0x0,0x0,0x0,0x4,0xe0,0x3,0x90, -}; - -static const BitmapCharRec ch209 = {16,21,-1,0,18,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0x7f,0xe0,0x18,0x38,0x18,0x1c,0x18,0x6,0x18,0x6,0x18,0x3,0x18,0x3,0x18,0x3, -0xff,0x3,0x18,0x3,0x18,0x3,0x18,0x3,0x18,0x6,0x18,0x6,0x18,0x1c,0x18,0x38, -0x7f,0xe0, -}; - -static const BitmapCharRec ch208 = {16,17,0,0,17,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0xfc,0x0,0x0,0xcc,0xcc, -}; - -static const BitmapCharRec ch207 = {6,21,-1,0,8,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, -0x7e,0x0,0x81,0x66,0x3c,0x18, -}; - -static const BitmapCharRec ch206 = {8,22,-1,0,8,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0xfc,0x0,0x40,0x30,0x1c,0xc, -}; - -static const BitmapCharRec ch205 = {6,22,-1,0,8,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0xfc,0x0,0x8,0x30,0xe0,0xc0, -}; - -static const BitmapCharRec ch204 = {6,22,-1,0,8,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, -0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0,0x0,0x0,0x0,0x0,0x19,0x80,0x19,0x80, -}; - -static const BitmapCharRec ch203 = {13,21,-1,0,15,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, -0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0,0x0,0x0,0x10,0x20,0xc,0xc0,0x7,0x80,0x3,0x0, -}; - -static const BitmapCharRec ch202 = {13,22,-1,0,15,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, -0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0,0x0,0x0,0x4,0x0,0x3,0x0,0x1,0xc0,0x0,0xc0, -}; - -static const BitmapCharRec ch201 = {13,22,-1,0,15,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, -0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0,0x0,0x0,0x1,0x0,0x6,0x0,0x1c,0x0,0x18,0x0, -}; - -static const BitmapCharRec ch200 = {13,22,-1,0,15,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x7,0x80,0xc,0xc0,0x0,0xc0,0x3,0xc0,0x3,0x0,0x1,0x0,0x7,0xe0,0x1e,0x38, -0x38,0x8,0x60,0x4,0x60,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c,0x7,0xe4, -}; - -static const BitmapCharRec ch199 = {14,23,-1,6,16,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0xf9,0xff,0xf0,0x30,0x60,0x30,0x10,0x60,0x10,0x10,0x60,0x10,0x18,0x60,0x0,0x8, -0x60,0x0,0xf,0xe0,0x80,0xc,0x60,0x80,0x4,0x7f,0x80,0x4,0x60,0x80,0x6,0x60, -0x80,0x2,0x60,0x0,0x2,0x60,0x0,0x1,0x60,0x20,0x1,0x60,0x20,0x1,0xe0,0x60, -0x3,0xff,0xe0, -}; - -static const BitmapCharRec ch198 = {20,17,0,0,21,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x1,0xc0,0x0,0x2,0x20,0x0,0x2,0x20,0x0,0x1,0xc0,0x0, -}; - -static const BitmapCharRec ch197 = {17,21,0,0,17,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x30,0x0,0x6,0x30,0x0, -}; - -static const BitmapCharRec ch196 = {17,21,0,0,17,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0xfc,0x1f,0x80,0x30,0x7,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0xe0,0x0,0x3,0x90,0x0, -}; - -static const BitmapCharRec ch195 = {17,21,0,0,17,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x0,0x0,0x0,0x8,0x10,0x0,0x6,0x60,0x0,0x3,0xc0,0x0,0x1, -0x80,0x0, -}; - -static const BitmapCharRec ch194 = {17,22,0,0,17,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0xc0,0x0,0x0,0x70,0x0,0x0, -0x30,0x0, -}; - -static const BitmapCharRec ch193 = {17,22,0,0,17,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x0,0xc0,0x0,0x3,0x80,0x0,0x3, -0x0,0x0, -}; - -static const BitmapCharRec ch192 = {17,22,0,0,17,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x3e,0x63,0xc1,0xc3,0xc3,0xe0,0x70,0x30,0x38,0x18,0x18,0x8,0x8,0x0,0x0,0xc, -0xc, -}; - -static const BitmapCharRec ch191 = {8,17,-1,5,11,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x18,0x2,0x0,0x8,0x2,0x0,0xc,0x7f,0x80,0x4,0x22,0x0,0x6,0x32,0x0,0x3, -0x12,0x0,0x1,0xa,0x0,0x71,0x8e,0x0,0x88,0x86,0x0,0x8c,0xc2,0x0,0xc,0x60, -0x0,0x8,0x20,0x0,0x30,0x30,0x0,0x8,0x10,0x0,0x8c,0x18,0x0,0x4c,0xc,0x0, -0x38,0x4,0x0, -}; - -static const BitmapCharRec ch190 = {17,17,0,0,18,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x30,0x7e,0x10,0x22,0x18,0x10,0x8,0x18,0xc,0x8,0x6,0x4,0x2,0x6,0xfb,0x46, -0x21,0x26,0x21,0x9c,0x20,0xc0,0x20,0x40,0x20,0x60,0x20,0x20,0xa0,0x30,0x60,0x18, -0x20,0x8, -}; - -static const BitmapCharRec ch189 = {15,17,-1,0,18,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x30,0x4,0x10,0x4,0x18,0xff,0x8,0x44,0xc,0x64,0x6,0x24,0x2,0x14,0xfb,0x1c, -0x21,0xc,0x21,0x84,0x20,0xc0,0x20,0x40,0x20,0x60,0x20,0x20,0xa0,0x30,0x60,0x18, -0x20,0x8, -}; - -static const BitmapCharRec ch188 = {16,17,-1,0,18,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0x88,0x0,0xcc,0x0,0x66,0x0,0x33,0x0,0x19,0x80,0x19,0x80,0x33,0x0,0x66,0x0, -0xcc,0x0,0x88,0x0, -}; - -static const BitmapCharRec ch187 = {9,10,-2,-1,12,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xfc,0x0,0x78,0xcc,0xcc,0xcc,0xcc,0xcc,0x78, -}; - -static const BitmapCharRec ch186 = {6,9,-1,-8,8,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xa0,0x60,0x20, -}; - -static const BitmapCharRec ch185 = {5,10,-1,-7,7,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0x78,0xcc,0xc,0x3c,0x30,0x10, -}; - -static const BitmapCharRec ch184 = {6,6,-1,6,8,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch183 = {2,2,-2,-6,6,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0, -0x9,0x0,0x9,0x0,0x9,0x0,0x19,0x0,0x39,0x0,0x79,0x0,0x79,0x0,0xf9,0x0, -0xf9,0x0,0xf9,0x0,0x79,0x0,0x79,0x0,0x39,0x0,0x1f,0x80, -}; - -static const BitmapCharRec ch182 = {9,22,-1,5,11,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x40,0x0,0xe0,0x0,0xc0,0x0,0x40,0x0,0x40,0x0,0x5c,0xe0,0x7e,0xc0,0x71,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0xe1,0xc0, -}; - -static const BitmapCharRec ch181 = {11,17,-1,5,13,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0x80,0x60,0x38,0x18, -}; - -static const BitmapCharRec ch180 = {5,4,-2,-13,8,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0x70,0x88,0x8c,0xc,0x8,0x30,0x8,0x8c,0x4c,0x38, -}; - -static const BitmapCharRec ch179 = {6,10,0,-7,7,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xfc,0x44,0x20,0x30,0x10,0x8,0xc,0x8c,0x4c,0x38, -}; - -static const BitmapCharRec ch178 = {6,10,0,-7,7,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xff,0xf0,0xff,0xf0,0x0,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, -0xff,0xf0,0xff,0xf0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch177 = {12,15,-1,0,14,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x38,0x44,0x82,0x82,0x82,0x44,0x38, -}; - -static const BitmapCharRec ch176 = {7,7,-1,-10,9,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xfc,0xfc, -}; - -static const BitmapCharRec ch175 = {6,2,-1,-14,8,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x7,0xf0,0x0,0x1c,0x1c,0x0,0x30,0x6,0x0,0x60,0x3,0x0,0x47,0x19,0x0,0xc2, -0x31,0x80,0x82,0x20,0x80,0x82,0x40,0x80,0x83,0xe0,0x80,0x82,0x30,0x80,0x82,0x10, -0x80,0xc2,0x11,0x80,0x42,0x31,0x0,0x67,0xe3,0x0,0x30,0x6,0x0,0x1c,0x1c,0x0, -0x7,0xf0,0x0, -}; - -static const BitmapCharRec ch174 = {17,17,-1,0,19,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xfe,0xfe, -}; - -static const BitmapCharRec ch173 = {7,2,-1,-5,9,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0xff,0xf0,0xff,0xf0, -}; - -static const BitmapCharRec ch172 = {12,7,-1,-3,14,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x8,0x80,0x19,0x80,0x33,0x0,0x66,0x0,0xcc,0x0,0xcc,0x0,0x66,0x0,0x33,0x0, -0x19,0x80,0x8,0x80, -}; - -static const BitmapCharRec ch171 = {9,10,-2,-1,13,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0x7e,0x0,0x76,0xcc,0xcc,0x7c,0xc,0xcc,0x78, -}; - -static const BitmapCharRec ch170 = {7,9,0,-8,8,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x7,0xf0,0x0,0x1c,0x1c,0x0,0x30,0x6,0x0,0x61,0xc3,0x0,0x47,0x71,0x0,0xc4, -0x19,0x80,0x8c,0x0,0x80,0x88,0x0,0x80,0x88,0x0,0x80,0x88,0x0,0x80,0x8c,0x0, -0x80,0xc4,0x19,0x80,0x47,0x31,0x0,0x61,0xe3,0x0,0x30,0x6,0x0,0x1c,0x1c,0x0, -0x7,0xf0,0x0, -}; - -static const BitmapCharRec ch169 = {17,17,-1,0,19,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xcc,0xcc, -}; - -static const BitmapCharRec ch168 = {6,2,-1,-14,8,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x38,0x64,0x62,0x6,0xe,0x1c,0x38,0x74,0xe2,0xc3,0x83,0x87,0x4e,0x3c,0x38,0x70, -0x60,0x46,0x26,0x1c, -}; - -static const BitmapCharRec ch167 = {8,20,-2,2,12,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0, -}; - -static const BitmapCharRec ch166 = {2,17,-2,0,6,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0xf,0xc0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x1f,0xe0,0x3,0x0,0x1f,0xe0, -0x3,0x0,0x7,0x80,0xc,0x80,0xc,0xc0,0x18,0x40,0x18,0x60,0x30,0x20,0x70,0x30, -0xf8,0x7c, -}; - -static const BitmapCharRec ch165 = {14,17,0,0,14,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0xc0,0x60,0xee,0xe0,0x7f,0xc0,0x31,0x80,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x31,0x80,0x7f,0xc0,0xee,0xe0,0xc0,0x60, -}; - -static const BitmapCharRec ch164 = {11,12,-1,-3,13,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xe7,0x80,0xbe,0xc0,0x78,0x40,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, -0x30,0x0,0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x31,0x80,0x19,0x80, -0xf,0x0, -}; - -static const BitmapCharRec ch163 = {10,17,-1,0,12,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x40,0x0,0x40,0x0,0x3e,0x0,0x7f,0x0,0x70,0x80,0xd0,0x0,0xc8,0x0,0xc8,0x0, -0xc8,0x0,0xc4,0x0,0xc4,0x0,0x43,0x80,0x63,0x80,0x1f,0x0,0x1,0x0,0x1,0x0, -}; - -static const BitmapCharRec ch162 = {9,16,-1,2,12,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0xc0, -0xc0, -}; - -static const BitmapCharRec ch161 = {2,17,-4,5,8,ch161data}; - -/* char: 0xa0 */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,6,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,6,0}; -#endif - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x83,0x80,0xc7,0xc0,0x7c,0x60,0x38,0x20, -}; - -static const BitmapCharRec ch126 = {11,4,-1,-5,13,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0xe0,0x30,0x18,0x18,0x18,0x18,0x18,0x18,0x8,0xc,0x4,0x3,0x4,0xc,0x8,0x18, -0x18,0x18,0x18,0x18,0x30,0xe0, -}; - -static const BitmapCharRec ch125 = {8,22,-1,5,10,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0, -}; - -static const BitmapCharRec ch124 = {2,17,-2,0,6,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x7,0xc,0x18,0x18,0x18,0x18,0x18,0x18,0x10,0x30,0x20,0xc0,0x20,0x30,0x10,0x18, -0x18,0x18,0x18,0x18,0xc,0x7, -}; - -static const BitmapCharRec ch123 = {8,22,-1,5,10,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xff,0xc3,0x61,0x70,0x30,0x38,0x18,0x1c,0xe,0x86,0xc3,0xff, -}; - -static const BitmapCharRec ch122 = {8,12,-1,0,10,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0, -0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0, -0xf1,0xe0, -}; - -static const BitmapCharRec ch121 = {11,17,0,5,11,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0xf1,0xe0,0x60,0xc0,0x21,0x80,0x33,0x80,0x1b,0x0,0xe,0x0,0xc,0x0,0x1a,0x0, -0x39,0x0,0x31,0x80,0x60,0xc0,0xf1,0xe0, -}; - -static const BitmapCharRec ch120 = {11,12,-1,0,13,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x4,0x10,0x0,0xe,0x38,0x0,0xe,0x38,0x0,0x1a,0x28,0x0,0x1a,0x64,0x0,0x19, -0x64,0x0,0x31,0x64,0x0,0x30,0xc2,0x0,0x30,0xc2,0x0,0x60,0xc2,0x0,0x60,0xc3, -0x0,0xf1,0xe7,0x80, -}; - -static const BitmapCharRec ch119 = {17,12,0,0,17,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x4,0x0,0xe,0x0,0xe,0x0,0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80, -0x30,0x80,0x60,0x80,0x60,0xc0,0xf1,0xe0, -}; - -static const BitmapCharRec ch118 = {11,12,0,0,11,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0, -}; - -static const BitmapCharRec ch117 = {11,12,-1,0,13,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x1c,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfe,0x70,0x30,0x10, -}; - -static const BitmapCharRec ch116 = {7,15,0,0,7,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0xf8,0xc6,0x83,0x3,0x7,0x1e,0x7c,0x70,0xe0,0xc2,0x66,0x3e, -}; - -static const BitmapCharRec ch115 = {8,12,-1,0,10,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x76,0x6e,0xe6, -}; - -static const BitmapCharRec ch114 = {7,12,-1,0,8,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x3,0xc0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1d,0x80,0x73,0x80,0x61,0x80, -0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x61,0x80,0x73,0x80, -0x1d,0x80, -}; - -static const BitmapCharRec ch113 = {10,17,-1,5,12,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0xf0,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x6e,0x0,0x73,0x80,0x61,0x80, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x61,0x80,0x73,0x80, -0xee,0x0, -}; - -static const BitmapCharRec ch112 = {10,17,-1,5,12,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0, -}; - -static const BitmapCharRec ch111 = {10,12,-1,0,12,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x71,0xc0,0x6f,0x80,0xe7,0x0, -}; - -static const BitmapCharRec ch110 = {11,12,-1,0,13,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0xf1,0xe3,0xc0,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60, -0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x71,0xe3,0x80,0x6f,0x9f, -0x0,0xe7,0xe,0x0, -}; - -static const BitmapCharRec ch109 = {18,12,-1,0,20,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, -0xe0, -}; - -static const BitmapCharRec ch108 = {4,17,-1,0,6,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0xf3,0xe0,0x61,0xc0,0x63,0x80,0x67,0x0,0x6e,0x0,0x6c,0x0,0x78,0x0,0x68,0x0, -0x64,0x0,0x66,0x0,0x63,0x0,0x67,0xc0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0, -0xe0,0x0, -}; - -static const BitmapCharRec ch107 = {11,17,-1,0,12,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0xc0,0xe0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0x70,0x0,0x0,0x0,0x30,0x30, -}; - -static const BitmapCharRec ch106 = {4,22,0,5,6,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x0,0x0,0x0,0x60, -0x60, -}; - -static const BitmapCharRec ch105 = {4,17,-1,0,6,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x71,0xc0,0x6f,0x80,0x67,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0, -0xe0,0x0, -}; - -static const BitmapCharRec ch104 = {11,17,-1,0,13,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x3f,0x0,0xf1,0xc0,0xc0,0x60,0xc0,0x20,0x60,0x60,0x3f,0xc0,0x7f,0x0,0x60,0x0, -0x30,0x0,0x3e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0, -0x1f,0xc0, -}; - -static const BitmapCharRec ch103 = {11,17,-1,5,12,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfe,0x30,0x30,0x30,0x16, -0xe, -}; - -static const BitmapCharRec ch102 = {7,17,0,0,7,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, -0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0, -}; - -static const BitmapCharRec ch101 = {9,12,-1,0,11,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x1e,0xc0,0x73,0x80,0x61,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80, -0xc1,0x80,0x61,0x80,0x73,0x80,0x1d,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80, -0x3,0x80, -}; - -static const BitmapCharRec ch100 = {10,17,-1,0,12,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -0xc0,0x0,0x41,0x80,0x63,0x80,0x1f,0x0, -}; - -static const BitmapCharRec ch99 = {9,12,-1,0,11,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0x5e,0x0,0x73,0x80,0x61,0x80,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x61,0x80,0x73,0x80,0x6e,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0, -0xe0,0x0, -}; - -static const BitmapCharRec ch98 = {10,17,-1,0,12,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0, -}; - -static const BitmapCharRec ch97 = {9,12,-1,0,11,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0x60,0xe0,0x80,0xc0,0x60, -}; - -static const BitmapCharRec ch96 = {3,5,-2,-12,7,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xff,0xf8,0xff,0xf8, -}; - -static const BitmapCharRec ch95 = {13,2,0,5,13,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x80,0x80,0xc1,0x80,0x41,0x0,0x63,0x0,0x22,0x0,0x36,0x0,0x14,0x0,0x1c,0x0, -0x8,0x0, -}; - -static const BitmapCharRec ch94 = {9,9,-1,-8,11,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, -0x18,0x18,0x18,0x18,0xf8, -}; - -static const BitmapCharRec ch93 = {5,21,-1,4,8,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x6,0x6,0x4,0xc,0xc,0x8,0x18,0x18,0x10,0x30,0x30,0x20,0x60,0x60,0x40,0xc0, -0xc0, -}; - -static const BitmapCharRec ch92 = {7,17,0,0,7,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xf8,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0xc0,0xc0,0xf8, -}; - -static const BitmapCharRec ch91 = {5,21,-2,4,8,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xff,0xf8,0xe0,0x18,0x70,0x8,0x30,0x8,0x38,0x0,0x18,0x0,0x1c,0x0,0xe,0x0, -0x6,0x0,0x7,0x0,0x3,0x0,0x3,0x80,0x1,0xc0,0x80,0xc0,0x80,0xe0,0xc0,0x70, -0xff,0xf0, -}; - -static const BitmapCharRec ch90 = {13,17,-1,0,15,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x7,0xe0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0xc0, -0x3,0x40,0x6,0x60,0x6,0x20,0xc,0x30,0x1c,0x10,0x18,0x18,0x38,0x8,0x30,0xc, -0xfc,0x3f, -}; - -static const BitmapCharRec ch89 = {16,17,0,0,16,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0xfc,0xf,0xc0,0x30,0x3,0x80,0x18,0x7,0x0,0x8,0xe,0x0,0x4,0xc,0x0,0x6, -0x18,0x0,0x2,0x38,0x0,0x1,0x70,0x0,0x0,0xe0,0x0,0x0,0xc0,0x0,0x1,0xc0, -0x0,0x3,0xa0,0x0,0x3,0x10,0x0,0x6,0x8,0x0,0xe,0xc,0x0,0x1c,0x6,0x0, -0x7e,0xf,0x80, -}; - -static const BitmapCharRec ch88 = {18,17,0,0,18,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x1,0x83,0x0,0x1,0x83,0x0,0x1,0x83,0x80,0x3,0x87,0x80,0x3,0x46,0x80,0x3, -0x46,0xc0,0x6,0x46,0x40,0x6,0x4c,0x40,0x6,0x4c,0x60,0xc,0x2c,0x60,0xc,0x2c, -0x20,0x18,0x2c,0x20,0x18,0x18,0x30,0x18,0x18,0x10,0x30,0x18,0x10,0x30,0x18,0x18, -0xfc,0x7e,0x7e, -}; - -static const BitmapCharRec ch87 = {23,17,0,0,23,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x1,0x80,0x0,0x1,0x80,0x0,0x1,0x80,0x0,0x3,0xc0,0x0,0x3,0x40,0x0,0x3, -0x60,0x0,0x6,0x20,0x0,0x6,0x20,0x0,0x6,0x30,0x0,0xc,0x10,0x0,0xc,0x18, -0x0,0x18,0x8,0x0,0x18,0x8,0x0,0x18,0xc,0x0,0x30,0x4,0x0,0x30,0x6,0x0, -0xfc,0x1f,0x80, -}; - -static const BitmapCharRec ch86 = {17,17,0,0,17,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0xfc,0x1f, -}; - -static const BitmapCharRec ch85 = {16,17,-1,0,18,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0xf,0xc0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0, -0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x83,0x4,0x83,0x4,0xc3,0xc, -0xff,0xfc, -}; - -static const BitmapCharRec ch84 = {14,17,-1,0,16,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x9e,0x0,0xf1,0x80,0xc0,0xc0,0x80,0x60,0x80,0x60,0x0,0x60,0x0,0xe0,0x3,0xc0, -0xf,0x80,0x1e,0x0,0x78,0x0,0xe0,0x0,0xc0,0x40,0xc0,0x40,0xc0,0xc0,0x63,0xc0, -0x1e,0x40, -}; - -static const BitmapCharRec ch83 = {11,17,-1,0,13,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0xfc,0x1e,0x30,0x1c,0x30,0x38,0x30,0x70,0x30,0x60,0x30,0xc0,0x31,0xc0,0x33,0x80, -0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x38,0x30,0x18,0x30,0x38,0x30,0x30,0x30,0x70, -0xff,0xc0, -}; - -static const BitmapCharRec ch82 = {15,17,-1,0,16,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x0,0xf,0x0,0x38,0x0,0x70,0x0,0xe0,0x1,0xc0,0x7,0xe0,0x1c,0x38,0x38,0x1c, -0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,0x7,0xe0, -}; - -static const BitmapCharRec ch81 = {16,22,-1,5,18,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, -0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70, -0xff,0xc0, -}; - -static const BitmapCharRec ch80 = {13,17,-1,0,15,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0, -}; - -static const BitmapCharRec ch79 = {16,17,-1,0,18,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0xf8,0xc,0x20,0x1c,0x20,0x1c,0x20,0x34,0x20,0x64,0x20,0x64,0x20,0xc4,0x21,0x84, -0x21,0x84,0x23,0x4,0x26,0x4,0x26,0x4,0x2c,0x4,0x38,0x4,0x38,0x4,0x30,0x4, -0xf0,0x1f, -}; - -static const BitmapCharRec ch78 = {16,17,-1,0,18,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0xf8,0x21,0xf8,0x20,0x60,0x60,0x20,0x60,0x60,0x20,0xd0,0x60,0x20,0xd0,0x60,0x21, -0x88,0x60,0x21,0x88,0x60,0x23,0x8,0x60,0x23,0x4,0x60,0x26,0x4,0x60,0x26,0x2, -0x60,0x2c,0x2,0x60,0x2c,0x2,0x60,0x38,0x1,0x60,0x38,0x1,0x60,0x30,0x0,0xe0, -0xf0,0x0,0xf8, -}; - -static const BitmapCharRec ch77 = {21,17,-1,0,22,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, -0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, -0xfc,0x0, -}; - -static const BitmapCharRec ch76 = {13,17,-1,0,14,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0xfc,0x1f,0x30,0xe,0x30,0x1c,0x30,0x38,0x30,0x70,0x30,0xe0,0x31,0xc0,0x33,0x80, -0x3f,0x0,0x3e,0x0,0x33,0x0,0x31,0x80,0x30,0xc0,0x30,0x60,0x30,0x30,0x30,0x18, -0xfc,0x7e, -}; - -static const BitmapCharRec ch75 = {16,17,-1,0,17,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x78,0x0,0xcc,0x0,0xc6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, -0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, -0x1f,0x80, -}; - -static const BitmapCharRec ch74 = {9,17,-1,0,11,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0xfc, -}; - -static const BitmapCharRec ch73 = {6,17,-1,0,8,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30, -0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x3f,0xfe,0x0,0x30,0x6,0x0,0x30,0x6, -0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0, -0xfc,0x1f,0x80, -}; - -static const BitmapCharRec ch72 = {17,17,-1,0,19,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x7,0xe0,0x1e,0x38,0x38,0x1c,0x60,0xc,0x60,0xc,0xc0,0xc,0xc0,0xc,0xc0,0x3f, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c, -0x7,0xe4, -}; - -static const BitmapCharRec ch71 = {16,17,-1,0,18,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x20,0x30,0x20, -0x3f,0xe0,0x30,0x20,0x30,0x20,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0, -}; - -static const BitmapCharRec ch70 = {12,17,-1,0,14,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, -0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0, -}; - -static const BitmapCharRec ch69 = {13,17,-1,0,15,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xff,0xc0,0x30,0x70,0x30,0x38,0x30,0xc,0x30,0xc,0x30,0x6,0x30,0x6,0x30,0x6, -0x30,0x6,0x30,0x6,0x30,0x6,0x30,0x6,0x30,0xc,0x30,0xc,0x30,0x38,0x30,0x70, -0xff,0xc0, -}; - -static const BitmapCharRec ch68 = {15,17,-1,0,17,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x7,0xe0,0x1e,0x38,0x38,0x8,0x60,0x4,0x60,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c, -0x7,0xe4, -}; - -static const BitmapCharRec ch67 = {14,17,-1,0,16,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xff,0xe0,0x30,0x78,0x30,0x18,0x30,0xc,0x30,0xc,0x30,0xc,0x30,0x18,0x30,0x38, -0x3f,0xe0,0x30,0x40,0x30,0x30,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70, -0xff,0xc0, -}; - -static const BitmapCharRec ch66 = {14,17,-1,0,16,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0, -}; - -static const BitmapCharRec ch65 = {17,17,0,0,17,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x3,0xf0,0x0,0xe,0xc,0x0,0x18,0x0,0x0,0x30,0x0,0x0,0x61,0xde,0x0,0x63, -0x7b,0x0,0xc6,0x39,0x80,0xc6,0x18,0x80,0xc6,0x18,0xc0,0xc6,0x18,0x40,0xc6,0xc, -0x40,0xc3,0xc,0x40,0xc3,0x8c,0x40,0xe1,0xfc,0x40,0x60,0xec,0xc0,0x70,0x0,0x80, -0x38,0x1,0x80,0x1c,0x3,0x0,0xf,0xe,0x0,0x3,0xf8,0x0, -}; - -static const BitmapCharRec ch64 = {18,20,-2,3,22,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x30,0x30,0x0,0x0,0x10,0x10,0x10,0x18,0x18,0xc,0xe,0x7,0xc3,0xc3,0x83,0xc6, -0x7c, -}; - -static const BitmapCharRec ch63 = {8,17,-2,0,11,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0xc0,0x0,0x70,0x0,0x1c,0x0,0x7,0x0,0x1,0xc0,0x0,0x60,0x1,0xc0,0x7,0x0, -0x1c,0x0,0x70,0x0,0xc0,0x0, -}; - -static const BitmapCharRec ch62 = {11,11,-1,-1,13,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xff,0xf0,0xff,0xf0,0x0,0x0,0x0,0x0,0xff,0xf0,0xff,0xf0, -}; - -static const BitmapCharRec ch61 = {12,6,-1,-4,14,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x0,0x60,0x1,0xc0,0x7,0x0,0x1c,0x0,0x70,0x0,0xc0,0x0,0x70,0x0,0x1c,0x0, -0x7,0x0,0x1,0xc0,0x0,0x60, -}; - -static const BitmapCharRec ch60 = {11,11,-1,-1,13,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0xc0,0x60,0x20,0xe0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch59 = {3,14,-2,3,7,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch58 = {2,11,-2,0,6,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0xf0,0x0,0x1c,0x0,0x6,0x0,0x3,0x0,0x3,0x80,0x1,0x80,0x1d,0x80,0x73,0xc0, -0x61,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0x61,0x80,0x77,0x80, -0x1e,0x0, -}; - -static const BitmapCharRec ch57 = {10,17,-1,0,12,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x1e,0x0,0x73,0x80,0xe1,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x41,0xc0,0x61,0x80, -0x37,0x0,0x1e,0x0,0x1e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0, -0x1e,0x0, -}; - -static const BitmapCharRec ch56 = {10,17,-1,0,12,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x18,0x0,0x18,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0x4,0x0,0x6,0x0,0x6,0x0, -0x2,0x0,0x3,0x0,0x3,0x0,0x1,0x0,0x1,0x80,0x81,0x80,0xc0,0xc0,0xff,0xc0, -0x7f,0xc0, -}; - -static const BitmapCharRec ch55 = {10,17,-1,0,12,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x1e,0x0,0x7b,0x80,0x61,0x80,0xe0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc1,0x80,0xf3,0x80,0xee,0x0,0x60,0x0,0x70,0x0,0x30,0x0,0x18,0x0,0xe,0x0, -0x3,0xc0, -}; - -static const BitmapCharRec ch54 = {10,17,-1,0,12,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x7e,0x0,0xe3,0x80,0xc1,0x80,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x1,0xc0, -0x3,0x80,0xf,0x80,0x7e,0x0,0x78,0x0,0x60,0x0,0x20,0x0,0x20,0x0,0x1f,0x80, -0x1f,0xc0, -}; - -static const BitmapCharRec ch53 = {10,17,-1,0,12,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0xff,0xc0,0xff,0xc0,0xc3,0x0,0x43,0x0, -0x63,0x0,0x23,0x0,0x33,0x0,0x13,0x0,0x1b,0x0,0xb,0x0,0x7,0x0,0x7,0x0, -0x3,0x0, -}; - -static const BitmapCharRec ch52 = {10,17,-1,0,12,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x78,0x0,0xe6,0x0,0xc3,0x0,0x1,0x0,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0x80, -0x7,0x0,0x1e,0x0,0xc,0x0,0x6,0x0,0x83,0x0,0x83,0x0,0x47,0x0,0x7e,0x0, -0x1c,0x0, -}; - -static const BitmapCharRec ch51 = {9,17,-1,0,12,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xff,0x80,0xff,0xc0,0x60,0x40,0x30,0x0,0x18,0x0,0xc,0x0,0x4,0x0,0x6,0x0, -0x3,0x0,0x3,0x0,0x1,0x80,0x1,0x80,0x81,0x80,0x81,0x80,0x43,0x80,0x7f,0x0, -0x1c,0x0, -}; - -static const BitmapCharRec ch50 = {10,17,-1,0,12,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x18, -0x8, -}; - -static const BitmapCharRec ch49 = {8,17,-2,0,12,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x1e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0xe1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x61,0x80,0x61,0x80,0x33,0x0, -0x1e,0x0, -}; - -static const BitmapCharRec ch48 = {10,17,-1,0,12,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0xc0,0xc0,0xc0,0x60,0x60,0x20,0x30,0x30,0x10,0x18,0x18,0x8,0xc,0xc,0x4,0x6, -0x6,0x3,0x3,0x3, -}; - -static const BitmapCharRec ch47 = {8,20,1,3,7,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch46 = {2,2,-2,0,6,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xff,0xf0,0xff,0xf0, -}; - -static const BitmapCharRec ch45 = {12,2,-1,-6,14,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0xc0,0x60,0x20,0xe0,0xc0, -}; - -static const BitmapCharRec ch44 = {3,5,-2,3,7,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xff,0xf0,0xff,0xf0,0x6,0x0, -0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch43 = {12,12,-1,-1,14,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0x8,0x0,0x1c,0x0,0xc9,0x80,0xeb,0x80,0x1c,0x0,0xeb,0x80,0xc9,0x80,0x1c,0x0, -0x8,0x0, -}; - -static const BitmapCharRec ch42 = {9,9,-2,-8,12,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x20,0x30,0x10,0x18,0x18,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0x18, -0x18,0x10,0x30,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {6,22,-1,5,8,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x4,0x8,0x10,0x30,0x20,0x60,0x60,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x60, -0x60,0x20,0x30,0x10,0x8,0x4, -}; - -static const BitmapCharRec ch40 = {6,22,-1,5,8,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0xc0,0x60,0x20,0xe0,0xc0, -}; - -static const BitmapCharRec ch39 = {3,5,-3,-12,8,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x3c,0x3c,0x7f,0x7e,0xe1,0xe1,0xc0,0xc0,0xc1,0xc0,0xc1,0xa0,0x63,0x20,0x37,0x10, -0x1e,0x18,0xe,0x3e,0xf,0x0,0x1d,0x80,0x18,0xc0,0x18,0x40,0x18,0x40,0xc,0xc0, -0x7,0x80, -}; - -static const BitmapCharRec ch38 = {16,17,-1,0,18,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x30,0x3c,0x0,0x18,0x72,0x0,0xc,0x61,0x0,0x4,0x60,0x80,0x6,0x60,0x80,0x3, -0x30,0x80,0x1,0x19,0x80,0x1,0x8f,0x0,0x78,0xc0,0x0,0xe4,0x40,0x0,0xc2,0x60, -0x0,0xc1,0x30,0x0,0xc1,0x10,0x0,0x61,0x18,0x0,0x33,0xfc,0x0,0x1e,0xc,0x0, -}; - -static const BitmapCharRec ch37 = {17,16,-1,0,19,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x4,0x0,0x4,0x0,0x3f,0x0,0xe5,0xc0,0xc4,0xc0,0x84,0x60,0x84,0x60,0x4,0x60, -0x4,0xe0,0x7,0xc0,0x7,0x80,0x1e,0x0,0x3c,0x0,0x74,0x0,0x64,0x0,0x64,0x20, -0x64,0x60,0x34,0xe0,0x1f,0x80,0x4,0x0,0x4,0x0, -}; - -static const BitmapCharRec ch36 = {11,21,0,2,12,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x22,0x0,0x22,0x0,0x22,0x0,0x22,0x0,0x22,0x0,0xff,0xc0,0xff,0xc0,0x11,0x0, -0x11,0x0,0x11,0x0,0x7f,0xe0,0x7f,0xe0,0x8,0x80,0x8,0x80,0x8,0x80,0x8,0x80, -0x8,0x80, -}; - -static const BitmapCharRec ch35 = {11,17,-1,0,13,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0x88,0xcc,0xcc,0xcc,0xcc, -}; - -static const BitmapCharRec ch34 = {6,5,-1,-12,10,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0, -}; - -static const BitmapCharRec ch33 = {2,17,-3,0,8,ch33data}; - -/* char: 0x20 ' ' */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,6,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,6,0}; -#endif - -static const BitmapCharRec * const chars[] = { -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -const BitmapFontRec glutBitmapTimesRoman24 = { -"-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1", -224, -32, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_util.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_util.c deleted file mode 100644 index 4ebac64c1d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_util.c +++ /dev/null @@ -1,86 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include -#include -#include - -#include "glutint.h" - -/* strdup is actually not a standard ANSI C or POSIX routine - so implement a private one for GLUT. OpenVMS does not have a - strdup; Linux's standard libc doesn't declare strdup by default - (unless BSD or SVID interfaces are requested). */ -char * -__glutStrdup(const char *string) -{ - char *copy; - - copy = (char*) malloc(strlen(string) + 1); - if (copy == NULL) - return NULL; - strcpy(copy, string); - return copy; -} - -void -__glutWarning(char *format,...) -{ - va_list args; - - va_start(args, format); - fprintf(stderr, "GLUT: Warning in %s: ", - __glutProgramName ? __glutProgramName : "(unamed)"); - vfprintf(stderr, format, args); - va_end(args); - putc('\n', stderr); -} - -/* CENTRY */ -void GLUTAPIENTRY -glutReportErrors(void) -{ - GLenum error; - - while ((error = glGetError()) != GL_NO_ERROR) - __glutWarning("GL error: %s", gluErrorString(error)); -} -/* ENDCENTRY */ - -void -__glutFatalError(char *format,...) -{ - va_list args; - - va_start(args, format); - fprintf(stderr, "GLUT: Fatal Error in %s: ", - __glutProgramName ? __glutProgramName : "(unamed)"); - vfprintf(stderr, format, args); - va_end(args); - putc('\n', stderr); -#ifdef _WIN32 - if (__glutExitFunc) { - __glutExitFunc(1); - } -#endif - exit(1); -} - -void -__glutFatalUsage(char *format,...) -{ - va_list args; - - va_start(args, format); - fprintf(stderr, "GLUT: Fatal API Usage in %s: ", - __glutProgramName ? __glutProgramName : "(unamed)"); - vfprintf(stderr, format, args); - va_end(args); - putc('\n', stderr); - abort(); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_vidresize.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_vidresize.c deleted file mode 100644 index 5993e83709..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_vidresize.c +++ /dev/null @@ -1,231 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1996. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include - -#ifdef __sgi -#include -#endif - -#include "glutint.h" - -/* Grumble. The IRIX 6.3 and early IRIX 6.4 OpenGL headers - support the video resize extension, but failed to define - GLX_SGIX_video_resize. */ -#if 0 -#ifdef GLX_SYNC_FRAME_SGIX -#define GLX_SGIX_video_resize 1 -#endif -#endif - -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) -static int canVideoResize = -1; -static int videoResizeChannel; -#else -static int canVideoResize = 0; -#endif -static int videoResizeInUse = 0; -static int dx = -1, dy = -1, dw = -1, dh = -1; - -/* XXX Note that IRIX 6.2, 6.3, and some 6.4 versions have a - bug where programs seg-fault when they attempt video - resizing from an indirect OpenGL context (either local or - over a network). */ - -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - -static volatile int errorCaught; - -/* ARGSUSED */ -static int -catchXSGIvcErrors(Display * dpy, XErrorEvent * event) -{ - errorCaught = 1; - return 0; -} -#endif - -/* CENTRY */ -int GLUTAPIENTRY -glutVideoResizeGet(GLenum param) -{ -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (canVideoResize < 0) { - canVideoResize = __glutIsSupportedByGLX("GLX_SGIX_video_resize"); - if (canVideoResize) { -#if defined(__sgi) && __sgi - /* This is a hack because IRIX 6.2, 6.3, and some 6.4 - versions were released with GLX_SGIX_video_resize - being advertised by the X server though the video - resize extension is not actually supported. We try to - determine if the libGL.so we are using actually has a - video resize entrypoint before we try to use the - feature. */ - void (*func) (void); - void *glxDso = dlopen("libGL.so", RTLD_LAZY); - - func = (void (*)(void)) dlsym(glxDso, "glXQueryChannelDeltasSGIX"); - if (!func) { - canVideoResize = 0; - } else -#endif - { - char *channelString; - int (*handler) (Display *, XErrorEvent *); - - channelString = getenv("GLUT_VIDEO_RESIZE_CHANNEL"); - videoResizeChannel = channelString ? atoi(channelString) : 0; - - /* Work around another annoying problem with SGI's - GLX_SGIX_video_resize implementation. Early IRIX - 6.4 OpenGL's advertise the extension and have the - video resize API, but an XSGIvc X protocol errors - result trying to use the API. Set up an error - handler to intercept what would otherwise be a fatal - error. If an error was recieved, do not report that - video resize is possible. */ - handler = XSetErrorHandler(catchXSGIvcErrors); - - errorCaught = 0; - -#if defined(GLX_GLXEXT_PROTOTYPES) -#endif - - __glut_glXQueryChannelDeltasSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, &dx, &dy, &dw, &dh); - - /* glXQueryChannelDeltasSGIX is an inherent X server - round-trip so we know we will have gotten either the - correct reply or and error by this time. */ - XSetErrorHandler(handler); - - /* Still yet another work around. In IRIX 6.4 betas, - glXQueryChannelDeltasSGIX will return as if it - succeeded, but the values are filled with junk. - Watch to make sure the delta variables really make - sense. */ - if (errorCaught || - dx < 0 || dy < 0 || dw < 0 || dh < 0 || - dx > 2048 || dy > 2048 || dw > 2048 || dh > 2048) { - canVideoResize = 0; - } - } - } - } -#endif /* GLX_SGIX_video_resize */ - - switch (param) { - case GLUT_VIDEO_RESIZE_POSSIBLE: - return canVideoResize; - case GLUT_VIDEO_RESIZE_IN_USE: - return videoResizeInUse; - case GLUT_VIDEO_RESIZE_X_DELTA: - return dx; - case GLUT_VIDEO_RESIZE_Y_DELTA: - return dy; - case GLUT_VIDEO_RESIZE_WIDTH_DELTA: - return dw; - case GLUT_VIDEO_RESIZE_HEIGHT_DELTA: - return dh; - case GLUT_VIDEO_RESIZE_X: - case GLUT_VIDEO_RESIZE_Y: - case GLUT_VIDEO_RESIZE_WIDTH: - case GLUT_VIDEO_RESIZE_HEIGHT: -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (videoResizeInUse) { - int x, y, width, height; - - __glut_glXQueryChannelRectSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, &x, &y, &width, &height); - switch (param) { - case GLUT_VIDEO_RESIZE_X: - return x; - case GLUT_VIDEO_RESIZE_Y: - return y; - case GLUT_VIDEO_RESIZE_WIDTH: - return width; - case GLUT_VIDEO_RESIZE_HEIGHT: - return height; - } - } -#endif - return -1; - default: - __glutWarning("invalid glutVideoResizeGet parameter: %d", param); - return -1; - } -} - -void GLUTAPIENTRY -glutSetupVideoResizing(void) -{ -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) { - __glut_glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, __glutCurrentWindow->win); - videoResizeInUse = 1; - } else -#endif - __glutFatalError("glutEstablishVideoResizing: video resizing not possible.\n"); -} - -void GLUTAPIENTRY -glutStopVideoResizing(void) -{ -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) { - if (videoResizeInUse) { - __glut_glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, None); - videoResizeInUse = 0; - } - } -#endif -} - -/* ARGSUSED */ -void GLUTAPIENTRY -glutVideoResize(int x, int y, int width, int height) -{ -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (videoResizeInUse) { -#ifdef GLX_SYNC_SWAP_SGIX - /* glXChannelRectSyncSGIX introduced in a patch to IRIX - 6.2; the original unpatched IRIX 6.2 behavior is always - GLX_SYNC_SWAP_SGIX. */ - __glut_glXChannelRectSyncSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, GLX_SYNC_SWAP_SGIX); -#endif - __glut_glXChannelRectSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, x, y, width, height); - } -#endif -} - -/* ARGSUSED */ -void GLUTAPIENTRY -glutVideoPan(int x, int y, int width, int height) -{ -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (videoResizeInUse) { -#ifdef GLX_SYNC_FRAME_SGIX - /* glXChannelRectSyncSGIX introduced in a patch to IRIX - 6.2; the original unpatched IRIX 6.2 behavior is always - GLX_SYNC_SWAP_SGIX. We just ignore that we cannot - accomplish GLX_SYNC_FRAME_SGIX on IRIX unpatched 6.2; - this means you'd need a glutSwapBuffers to actually - realize the video resize. */ - __glut_glXChannelRectSyncSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, GLX_SYNC_FRAME_SGIX); -#endif - __glut_glXChannelRectSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, x, y, width, height); - } -#endif -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_warp.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_warp.c deleted file mode 100644 index 3d48655ed1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_warp.c +++ /dev/null @@ -1,23 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1996, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include -#include - -#include "glutint.h" - -/* CENTRY */ -void GLUTAPIENTRY -glutWarpPointer(int x, int y) -{ - XWarpPointer(__glutDisplay, None, __glutCurrentWindow->win, - 0, 0, 0, 0, x, y); - XFlush(__glutDisplay); -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_win.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_win.c deleted file mode 100644 index 4b044d084d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_win.c +++ /dev/null @@ -1,1016 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#ifdef __VMS -#include -#endif - -#include -#include -#include -#include -#if !defined(_WIN32) -#include -#include -#endif - -#include "glutint.h" - -GLUTwindow *__glutCurrentWindow = NULL; -GLUTwindow **__glutWindowList = NULL; -int __glutWindowListSize = 0; -#if !defined(_WIN32) -GLUTstale *__glutStaleWindowList = NULL; -#endif -GLUTwindow *__glutMenuWindow = NULL; - -void (*__glutFreeOverlayFunc) (GLUToverlay *); -XVisualInfo *(*__glutDetermineVisualFromString) (char *string, Bool * treatAsSingle, - Criterion * requiredCriteria, int nRequired, int requiredMask, void** fbc) = NULL; - -static Criterion requiredWindowCriteria[] = -{ - {LEVEL, EQ, 0}, - {TRANSPARENT, EQ, 0} -}; -static int numRequiredWindowCriteria = sizeof(requiredWindowCriteria) / sizeof(Criterion); -static int requiredWindowCriteriaMask = (1 << LEVEL) | (1 << TRANSPARENT); - -static void -cleanWindowWorkList(GLUTwindow * window) -{ - GLUTwindow **pEntry = &__glutWindowWorkList; - GLUTwindow *entry = __glutWindowWorkList; - - /* Tranverse singly-linked window work list look for the - window. */ - while (entry) { - if (entry == window) { - /* Found it; delete it. */ - *pEntry = entry->prevWorkWin; - return; - } else { - pEntry = &entry->prevWorkWin; - entry = *pEntry; - } - } -} - -#if !defined(_WIN32) - -static void -cleanStaleWindowList(GLUTwindow * window) -{ - GLUTstale **pEntry = &__glutStaleWindowList; - GLUTstale *entry = __glutStaleWindowList; - - /* Tranverse singly-linked stale window list look for the - window ID. */ - while (entry) { - if (entry->window == window) { - /* Found it; delete it. */ - *pEntry = entry->next; - free(entry); - return; - } else { - pEntry = &entry->next; - entry = *pEntry; - } - } -} - -#endif - -static GLUTwindow *__glutWindowCache = NULL; - -GLUTwindow * -__glutGetWindow(Window win) -{ - int i; - - /* Does win belong to the last window ID looked up? */ - if (__glutWindowCache && (win == __glutWindowCache->win || - (__glutWindowCache->overlay && win == - __glutWindowCache->overlay->win))) { - return - __glutWindowCache; - } - /* Otherwise scan the window list looking for the window ID. */ - for (i = 0; i < __glutWindowListSize; i++) { - if (__glutWindowList[i]) { - if (win == __glutWindowList[i]->win) { - __glutWindowCache = __glutWindowList[i]; - return __glutWindowCache; - } - if (__glutWindowList[i]->overlay) { - if (win == __glutWindowList[i]->overlay->win) { - __glutWindowCache = __glutWindowList[i]; - return __glutWindowCache; - } - } - } - } -#if !defined(_WIN32) - { - GLUTstale *entry; - - /* Scan through destroyed overlay window IDs for which no - DestroyNotify has yet been received. */ - for (entry = __glutStaleWindowList; entry; entry = entry->next) { - if (entry->win == win) - return entry->window; - } - } -#endif - return NULL; -} - -/* CENTRY */ -int GLUTAPIENTRY -glutGetWindow(void) -{ - if (__glutCurrentWindow) { - return __glutCurrentWindow->num + 1; - } else { - return 0; - } -} -/* ENDCENTRY */ - -void -__glutSetWindow(GLUTwindow * window) -{ - /* It is tempting to try to short-circuit the call to - glXMakeCurrent if we "know" we are going to make current - to a window we are already current to. In fact, this - assumption breaks when GLUT is expected to integrated with - other OpenGL windowing APIs that also make current to - OpenGL contexts. Since glXMakeCurrent short-circuits the - "already bound" case, GLUT avoids the temptation to do so - too. */ - __glutCurrentWindow = window; - - MAKE_CURRENT_LAYER(__glutCurrentWindow); - -#if !defined(_WIN32) - /* We should be careful to force a finish between each - iteration through the GLUT main loop if indirect OpenGL - contexts are in use; indirect contexts tend to have much - longer latency because lots of OpenGL extension requests - can queue up in the X protocol stream. We accomplish this - by posting GLUT_FINISH_WORK to be done. */ - if (!__glutCurrentWindow->isDirect) - __glutPutOnWorkList(__glutCurrentWindow, GLUT_FINISH_WORK); -#endif - - /* If debugging is enabled, we'll want to check this window - for any OpenGL errors every iteration through the GLUT - main loop. To accomplish this, we post the - GLUT_DEBUG_WORK to be done on this window. */ - if (__glutDebug) { - __glutPutOnWorkList(__glutCurrentWindow, GLUT_DEBUG_WORK); - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutSetWindow(int win) -{ - GLUTwindow *window; - - if (win < 1 || win > __glutWindowListSize) { - __glutWarning("glutSetWindow attempted on bogus window."); - return; - } - window = __glutWindowList[win - 1]; - if (!window) { - __glutWarning("glutSetWindow attempted on bogus window."); - return; - } - __glutSetWindow(window); -} -/* ENDCENTRY */ - -static int -getUnusedWindowSlot(void) -{ - int i; - - /* Look for allocated, unused slot. */ - for (i = 0; i < __glutWindowListSize; i++) { - if (!__glutWindowList[i]) { - return i; - } - } - /* Allocate a new slot. */ - __glutWindowListSize++; - if (__glutWindowList) { - __glutWindowList = (GLUTwindow **) - realloc(__glutWindowList, - __glutWindowListSize * sizeof(GLUTwindow *)); - } else { - /* XXX Some realloc's do not correctly perform a malloc - when asked to perform a realloc on a NULL pointer, - though the ANSI C library spec requires this. */ - __glutWindowList = (GLUTwindow **) - malloc(sizeof(GLUTwindow *)); - } - if (!__glutWindowList) - __glutFatalError("out of memory."); - __glutWindowList[__glutWindowListSize - 1] = NULL; - return __glutWindowListSize - 1; -} - -static XVisualInfo * -getVisualInfoCI(unsigned int mode) -{ - static int bufSizeList[] = - {16, 12, 8, 4, 2, 1, 0}; - XVisualInfo *vi; - int list[32]; - int i, n = 0; - - /* Should not be looking at display mode mask if - __glutDisplayString is non-NULL. */ - assert(!__glutDisplayString); - - list[n++] = GLX_BUFFER_SIZE; - list[n++] = 1; - if (GLUT_WIND_IS_DOUBLE(mode)) { - list[n++] = GLX_DOUBLEBUFFER; - } - if (GLUT_WIND_IS_STEREO(mode)) { - list[n++] = GLX_STEREO; - } - if (GLUT_WIND_HAS_DEPTH(mode)) { - list[n++] = GLX_DEPTH_SIZE; - list[n++] = 1; - } - if (GLUT_WIND_HAS_STENCIL(mode)) { - list[n++] = GLX_STENCIL_SIZE; - list[n++] = 1; - } - list[n] = (int) None; /* terminate list */ - - /* glXChooseVisual specify GLX_BUFFER_SIZE prefers the - "smallest index buffer of at least the specified size". - This would be reasonable if GLUT allowed the user to - specify the required buffe size, but GLUT's display mode - is too simplistic (easy to use?). GLUT should try to find - the "largest". So start with a large buffer size and - shrink until we find a matching one that exists. */ - - for (i = 0; bufSizeList[i]; i++) { - /* XXX Assumes list[1] is where GLX_BUFFER_SIZE parameter - is. */ - list[1] = bufSizeList[i]; - vi = glXChooseVisual(__glutDisplay, - __glutScreen, list); - if (vi) - return vi; - } - return NULL; -} - -static XVisualInfo * -getVisualInfoRGB(unsigned int mode) -{ - int list[32]; - int n = 0; - - /* Should not be looking at display mode mask if - __glutDisplayString is non-NULL. */ - assert(!__glutDisplayString); - - /* XXX Would a caching mechanism to minize the calls to - glXChooseVisual? You'd have to reference count - XVisualInfo* pointers. Would also have to properly - interact with glutInitDisplayString. */ - - list[n++] = GLX_RGBA; - list[n++] = GLX_RED_SIZE; - list[n++] = 1; - list[n++] = GLX_GREEN_SIZE; - list[n++] = 1; - list[n++] = GLX_BLUE_SIZE; - list[n++] = 1; - if (GLUT_WIND_HAS_ALPHA(mode)) { - list[n++] = GLX_ALPHA_SIZE; - list[n++] = 1; - } - if (GLUT_WIND_IS_DOUBLE(mode)) { - list[n++] = GLX_DOUBLEBUFFER; - } - if (GLUT_WIND_IS_STEREO(mode)) { - list[n++] = GLX_STEREO; - } - if (GLUT_WIND_HAS_DEPTH(mode)) { - list[n++] = GLX_DEPTH_SIZE; - list[n++] = 1; - } - if (GLUT_WIND_HAS_STENCIL(mode)) { - list[n++] = GLX_STENCIL_SIZE; - list[n++] = 1; - } - if (GLUT_WIND_HAS_ACCUM(mode)) { - list[n++] = GLX_ACCUM_RED_SIZE; - list[n++] = 1; - list[n++] = GLX_ACCUM_GREEN_SIZE; - list[n++] = 1; - list[n++] = GLX_ACCUM_BLUE_SIZE; - list[n++] = 1; - if (GLUT_WIND_HAS_ALPHA(mode)) { - list[n++] = GLX_ACCUM_ALPHA_SIZE; - list[n++] = 1; - } - } -#if defined(GLX_VERSION_1_1) && (defined(GLX_SGIS_multisample) || defined(GLX_ARB_multisample)) - if (GLUT_WIND_IS_MULTISAMPLE(mode)) { - if (!__glutIsSupportedByGLX("GLX_SGIS_multisample") && - !__glutIsSupportedByGLX("GLX_ARB_multisample")) - return NULL; -#if defined(GLX_ARB_multisample) - list[n++] = GLX_SAMPLES_ARB; -#elif defined(GLX_SGIS_multisample) - list[n++] = GLX_SAMPLES_SGIS; -#endif - /* XXX Is 4 a reasonable minimum acceptable number of - samples? */ - list[n++] = 4; - } -#endif - list[n] = (int) None; /* terminate list */ - - return glXChooseVisual(__glutDisplay, - __glutScreen, list); -} - -XVisualInfo * -__glutGetVisualInfo(unsigned int mode) -{ - /* XXX GLUT_LUMINANCE not implemented for GLUT 3.0. */ - if (GLUT_WIND_IS_LUMINANCE(mode)) - return NULL; - - if (GLUT_WIND_IS_RGB(mode)) - return getVisualInfoRGB(mode); - else - return getVisualInfoCI(mode); -} - -XVisualInfo * -__glutDetermineVisual( - unsigned int displayMode, - Bool * treatAsSingle, - XVisualInfo * (getVisualInfo) (unsigned int)) -{ - XVisualInfo *vis; - - /* Should not be looking at display mode mask if - __glutDisplayString is non-NULL. */ - assert(!__glutDisplayString); - - *treatAsSingle = GLUT_WIND_IS_SINGLE(displayMode); - vis = getVisualInfo(displayMode); - if (!vis) { - /* Fallback cases when can't get exactly what was asked - for... */ - if (GLUT_WIND_IS_SINGLE(displayMode)) { - /* If we can't find a single buffered visual, try looking - for a double buffered visual. We can treat a double - buffered visual as a single buffer visual by changing - the draw buffer to GL_FRONT and treating any swap - buffers as no-ops. */ - displayMode |= GLUT_DOUBLE; - vis = getVisualInfo(displayMode); - *treatAsSingle = True; - } - if (!vis && GLUT_WIND_IS_MULTISAMPLE(displayMode)) { - /* If we can't seem to get multisampling (ie, not Reality - Engine class graphics!), go without multisampling. It - is up to the application to query how many multisamples - were allocated (0 equals no multisampling) if the - application is going to use multisampling for more than - just antialiasing. */ - displayMode &= ~GLUT_MULTISAMPLE; - vis = getVisualInfo(displayMode); - } - } - return vis; -} - -static void GLUTCALLBACK -__glutDefaultDisplay(void) -{ - /* XXX Remove the warning after GLUT 3.0. */ - __glutWarning("The following is a new check for GLUT 3.0; update your code."); - __glutFatalError( - "redisplay needed for window %d, but no display callback.", - __glutCurrentWindow->num + 1); -} - -void GLUTCALLBACK -__glutDefaultReshape(int width, int height) -{ - GLUToverlay *overlay; - - /* Adjust the viewport of the window (and overlay if one - exists). */ - MAKE_CURRENT_WINDOW(__glutCurrentWindow); - glViewport(0, 0, (GLsizei) width, (GLsizei) height); - overlay = __glutCurrentWindow->overlay; - if (overlay) { - MAKE_CURRENT_OVERLAY(overlay); - glViewport(0, 0, (GLsizei) width, (GLsizei) height); - } - /* Make sure we are current to the current layer (application - should be able to count on the current layer not changing - unless the application explicitly calls glutUseLayer). */ - MAKE_CURRENT_LAYER(__glutCurrentWindow); -} - -XVisualInfo * -__glutDetermineWindowVisual(Bool * treatAsSingle, Bool * visAlloced, void **fbc) -{ - if (__glutDisplayString) { - - /* __glutDisplayString should be NULL except if - glutInitDisplayString has been called to register a - different display string. Calling glutInitDisplayString - means using a string instead of an integer mask determine - the visual to use. Using the function pointer variable - __glutDetermineVisualFromString below avoids linking in - the code for implementing glutInitDisplayString (ie, - glut_dstr.o) unless glutInitDisplayString gets called by - the application. */ - - assert(__glutDetermineVisualFromString); - *visAlloced = False; - *fbc = NULL; - return __glutDetermineVisualFromString(__glutDisplayString, treatAsSingle, - requiredWindowCriteria, numRequiredWindowCriteria, requiredWindowCriteriaMask, fbc); - } else { - *visAlloced = True; - *fbc = NULL; - return __glutDetermineVisual(__glutDisplayMode, - treatAsSingle, __glutGetVisualInfo); - } -} - -/* ARGSUSED5 */ /* Only Win32 uses gameMode parameter. */ -GLUTwindow * -__glutCreateWindow(GLUTwindow * parent, - int x, int y, int width, int height, int gameMode) -{ - GLUTwindow *window; - XSetWindowAttributes wa; - unsigned long attribMask; - int winnum; - int i; -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - GLXFBConfigSGIX fbc; -#else - void *fbc; -#endif - -#if defined(_WIN32) - WNDCLASS wc; - int style; - - if (!GetClassInfo(GetModuleHandle(NULL), "GLUT", &wc)) { - __glutOpenWin32Connection(NULL); - } -#else - if (!__glutDisplay) { - __glutOpenXConnection(NULL); - } -#endif - if (__glutGameModeWindow) { - __glutFatalError("cannot create windows in game mode."); - } - winnum = getUnusedWindowSlot(); - window = (GLUTwindow *) malloc(sizeof(GLUTwindow)); - if (!window) { - __glutFatalError("out of memory."); - } - window->num = winnum; - -#if !defined(_WIN32) - window->vis = __glutDetermineWindowVisual(&window->treatAsSingle, - &window->visAlloced, (void**) &fbc); - if (!window->vis) { - __glutFatalError( - "visual with necessary capabilities not found."); - } - __glutSetupColormap(window->vis, &window->colormap, &window->cmap); -#endif - window->eventMask = StructureNotifyMask | ExposureMask; - - attribMask = CWBackPixmap | CWBorderPixel | CWColormap | CWEventMask; - wa.background_pixmap = None; - wa.border_pixel = 0; - wa.colormap = window->cmap; - wa.event_mask = window->eventMask; - if (parent) { - if (parent->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK) - wa.event_mask |= GLUT_HACK_STOP_PROPAGATE_MASK; - attribMask |= CWDontPropagate; - wa.do_not_propagate_mask = parent->eventMask & GLUT_DONT_PROPAGATE_FILTER_MASK; - } else { - wa.do_not_propagate_mask = 0; - } - - /* Stash width and height before Win32's __glutAdjustCoords - possibly overwrites the values. */ - window->width = width; - window->height = height; - window->forceReshape = True; - window->ignoreKeyRepeat = False; - -#if defined(_WIN32) - __glutAdjustCoords(parent ? parent->win : NULL, - &x, &y, &width, &height); - if (parent) { - style = WS_CHILD; - } else { - if (gameMode) { - /* Game mode window should be a WS_POPUP window to - ensure that the taskbar is hidden by it. A standard - WS_OVERLAPPEDWINDOW does not hide the task bar. */ - style = WS_POPUP | WS_MAXIMIZE; - } else { - /* A standard toplevel window with borders and such. */ - style = WS_OVERLAPPEDWINDOW; - } - } - window->win = CreateWindow("GLUT", "GLUT", - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | style, - x, y, width, height, parent ? parent->win : __glutRoot, - NULL, GetModuleHandle(NULL), 0); - window->hdc = GetDC(window->win); - /* Must set the XHDC for fake glXChooseVisual & fake - glXCreateContext & fake XAllocColorCells. */ - XHDC = window->hdc; - window->vis = __glutDetermineWindowVisual(&window->treatAsSingle, - &window->visAlloced, &fbc); - if (!window->vis) { - __glutFatalError( - "pixel format with necessary capabilities not found."); - } - if (!SetPixelFormat(window->hdc, - ChoosePixelFormat(window->hdc, window->vis), - window->vis)) { - __glutFatalError("SetPixelFormat failed during window create."); - } - __glutSetupColormap(window->vis, &window->colormap, &window->cmap); - /* Make sure subwindows get a windowStatus callback. */ - if (parent) { - PostMessage(parent->win, WM_ACTIVATE, 0, 0); - } - window->renderDc = window->hdc; -#else - window->win = XCreateWindow(__glutDisplay, - parent == NULL ? __glutRoot : parent->win, - x, y, width, height, 0, - window->vis->depth, InputOutput, window->vis->visual, - attribMask, &wa); -#endif - window->renderWin = window->win; -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - if (fbc) { - window->ctx = __glut_glXCreateContextWithConfigSGIX(__glutDisplay, fbc, - GLX_RGBA_TYPE_SGIX, None, __glutTryDirect); - } else -#endif - { - window->ctx = glXCreateContext(__glutDisplay, window->vis, - None, __glutTryDirect); - } - if (!window->ctx) { - __glutFatalError( - "failed to create OpenGL rendering context."); - } - window->renderCtx = window->ctx; -#if !defined(_WIN32) - window->isDirect = glXIsDirect(__glutDisplay, window->ctx); - if (__glutForceDirect) { - if (!window->isDirect) - __glutFatalError("direct rendering not possible."); - } -#endif - - window->parent = parent; - if (parent) { - window->siblings = parent->children; - parent->children = window; - } else { - window->siblings = NULL; - } - window->overlay = NULL; - window->children = NULL; - window->display = __glutDefaultDisplay; - window->reshape = __glutDefaultReshape; - window->mouse = NULL; - window->motion = NULL; - window->passive = NULL; - window->entry = NULL; - window->keyboard = NULL; - window->keyboardUp = NULL; - window->windowStatus = NULL; - window->visibility = NULL; - window->special = NULL; - window->specialUp = NULL; - window->buttonBox = NULL; - window->dials = NULL; - window->spaceMotion = NULL; - window->spaceRotate = NULL; - window->spaceButton = NULL; - window->tabletMotion = NULL; - window->tabletButton = NULL; -#ifdef _WIN32 - window->joystick = NULL; - window->joyPollInterval = 0; -#endif - window->tabletPos[0] = -1; - window->tabletPos[1] = -1; - window->shownState = 0; - window->visState = -1; /* not VisibilityUnobscured, - VisibilityPartiallyObscured, or - VisibilityFullyObscured */ - window->entryState = -1; /* not EnterNotify or LeaveNotify */ - - window->desiredConfMask = 0; - window->buttonUses = 0; - window->cursor = GLUT_CURSOR_INHERIT; - - /* Setup window to be mapped when glutMainLoop starts. */ - window->workMask = GLUT_MAP_WORK; -#ifdef _WIN32 - if (gameMode) { - /* When mapping a game mode window, just show - the window. We have already created the game - mode window with a maximize flag at creation - time. Doing a ShowWindow(window->win, SW_SHOWNORMAL) - would be wrong for a game mode window since it - would unmaximize the window. */ - window->desiredMapState = GameModeState; - } else { - window->desiredMapState = NormalState; - } -#else - window->desiredMapState = NormalState; -#endif - window->prevWorkWin = __glutWindowWorkList; - __glutWindowWorkList = window; - - /* Initially, no menus attached. */ - for (i = 0; i < GLUT_MAX_MENUS; i++) { - window->menu[i] = 0; - } - - /* Add this new window to the window list. */ - __glutWindowList[winnum] = window; - - /* Make the new window the current window. */ - __glutSetWindow(window); - - __glutDetermineMesaSwapHackSupport(); - - if (window->treatAsSingle) { - /* We do this because either the window really is single - buffered (in which case this is redundant, but harmless, - because this is the initial single-buffered context - state); or we are treating a double buffered window as a - single-buffered window because the system does not appear - to export any suitable single- buffered visuals (in which - the following are necessary). */ - glDrawBuffer(GL_FRONT); - glReadBuffer(GL_FRONT); - } - return window; -} - -/* CENTRY */ -int GLUTAPIENTRY -glutCreateWindow(const char *title) -{ - static int firstWindow = 1; - GLUTwindow *window; -#if !defined(_WIN32) - XWMHints *wmHints; -#endif - Window win; - XTextProperty textprop; - - if (__glutGameModeWindow) { - __glutFatalError("cannot create windows in game mode."); - } - window = __glutCreateWindow(NULL, - __glutSizeHints.x, __glutSizeHints.y, - __glutInitWidth, __glutInitHeight, - /* not game mode */ 0); - win = window->win; - /* Setup ICCCM properties. */ - textprop.value = (unsigned char *) title; - textprop.encoding = XA_STRING; - textprop.format = 8; - textprop.nitems = strlen(title); -#if defined(_WIN32) - SetWindowText(win, title); - if (__glutIconic) { - window->desiredMapState = IconicState; - } -#else - wmHints = XAllocWMHints(); - wmHints->initial_state = - __glutIconic ? IconicState : NormalState; - wmHints->flags = StateHint; - XSetWMProperties(__glutDisplay, win, &textprop, &textprop, - /* Only put WM_COMMAND property on first window. */ - firstWindow ? __glutArgv : NULL, - firstWindow ? __glutArgc : 0, - &__glutSizeHints, wmHints, NULL); - XFree(wmHints); - XSetWMProtocols(__glutDisplay, win, &__glutWMDeleteWindow, 1); -#endif - firstWindow = 0; - return window->num + 1; -} - -#ifdef _WIN32 -int GLUTAPIENTRY -__glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int)) -{ - __glutExitFunc = exitfunc; - return glutCreateWindow(title); -} -#endif - -int GLUTAPIENTRY -glutCreateSubWindow(int win, int x, int y, int width, int height) -{ - GLUTwindow *window; - - window = __glutCreateWindow(__glutWindowList[win - 1], - x, y, width, height, /* not game mode */ 0); -#if !defined(_WIN32) - { - GLUTwindow *toplevel; - - toplevel = __glutToplevelOf(window); - if (toplevel->cmap != window->cmap) { - __glutPutOnWorkList(toplevel, GLUT_COLORMAP_WORK); - } - } -#endif - return window->num + 1; -} -/* ENDCENTRY */ - -void -__glutDestroyWindow(GLUTwindow * window, - GLUTwindow * initialWindow) -{ - GLUTwindow **prev, *cur, *parent, *siblings; - - /* Recursively destroy any children. */ - cur = window->children; - while (cur) { - siblings = cur->siblings; - __glutDestroyWindow(cur, initialWindow); - cur = siblings; - } - /* Remove from parent's children list (only necessary for - non-initial windows and subwindows!). */ - parent = window->parent; - if (parent && parent == initialWindow->parent) { - prev = &parent->children; - cur = parent->children; - while (cur) { - if (cur == window) { - *prev = cur->siblings; - break; - } - prev = &(cur->siblings); - cur = cur->siblings; - } - } - /* Unbind if bound to this window. */ - if (window == __glutCurrentWindow) { - UNMAKE_CURRENT(); - __glutCurrentWindow = NULL; - } - /* Begin tearing down window itself. */ - if (window->overlay) { - __glutFreeOverlayFunc(window->overlay); - } - XDestroyWindow(__glutDisplay, window->win); - glXDestroyContext(__glutDisplay, window->ctx); - if (window->colormap) { - /* Only color index windows have colormap data structure. */ - __glutFreeColormap(window->colormap); - } - /* NULLing the __glutWindowList helps detect is a window - instance has been destroyed, given a window number. */ - __glutWindowList[window->num] = NULL; - - /* Cleanup data structures that might contain window. */ - cleanWindowWorkList(window); -#if !defined(_WIN32) - cleanStaleWindowList(window); -#endif - /* Remove window from the "get window cache" if it is there. */ - if (__glutWindowCache == window) - __glutWindowCache = NULL; - - if (window->visAlloced) { - /* Only free XVisualInfo* gotten from glXChooseVisual. */ - XFree(window->vis); - } - - if (window == __glutGameModeWindow) { - /* Destroying the game mode window should implicitly - have GLUT leave game mode. */ - __glutCloseDownGameMode(); - } - - free(window); -} - -/* CENTRY */ -void GLUTAPIENTRY -glutDestroyWindow(int win) -{ - GLUTwindow *window = __glutWindowList[win - 1]; - - if (__glutMappedMenu && __glutMenuWindow == window) { - __glutFatalUsage("destroying menu window not allowed while menus in use"); - } -#if !defined(_WIN32) - /* If not a toplevel window... */ - if (window->parent) { - /* Destroying subwindows may change colormap requirements; - recalculate toplevel window's WM_COLORMAP_WINDOWS - property. */ - __glutPutOnWorkList(__glutToplevelOf(window->parent), - GLUT_COLORMAP_WORK); - } -#endif - __glutDestroyWindow(window, window); - XFlush(__glutDisplay); -} -/* ENDCENTRY */ - -void -__glutChangeWindowEventMask(long eventMask, Bool add) -{ - if (add) { - /* Add eventMask to window's event mask. */ - if ((__glutCurrentWindow->eventMask & eventMask) != - eventMask) { - __glutCurrentWindow->eventMask |= eventMask; - __glutPutOnWorkList(__glutCurrentWindow, - GLUT_EVENT_MASK_WORK); - } - } else { - /* Remove eventMask from window's event mask. */ - if (__glutCurrentWindow->eventMask & eventMask) { - __glutCurrentWindow->eventMask &= ~eventMask; - __glutPutOnWorkList(__glutCurrentWindow, - GLUT_EVENT_MASK_WORK); - } - } -} - -void GLUTAPIENTRY -glutDisplayFunc(GLUTdisplayCB displayFunc) -{ - /* XXX Remove the warning after GLUT 3.0. */ - if (!displayFunc) - __glutFatalError("NULL display callback not allowed in GLUT 3.0; update your code."); - __glutCurrentWindow->display = displayFunc; -} - -void GLUTAPIENTRY -glutMouseFunc(GLUTmouseCB mouseFunc) -{ - if (__glutCurrentWindow->mouse) { - if (!mouseFunc) { - /* Previous mouseFunc being disabled. */ - __glutCurrentWindow->buttonUses--; - __glutChangeWindowEventMask( - ButtonPressMask | ButtonReleaseMask, - __glutCurrentWindow->buttonUses > 0); - } - } else { - if (mouseFunc) { - /* Previously no mouseFunc, new one being installed. */ - __glutCurrentWindow->buttonUses++; - __glutChangeWindowEventMask( - ButtonPressMask | ButtonReleaseMask, True); - } - } - __glutCurrentWindow->mouse = mouseFunc; -} - -void GLUTAPIENTRY -glutMotionFunc(GLUTmotionCB motionFunc) -{ - /* Hack. Some window managers (4Dwm by default) will mask - motion events if the client is not selecting for button - press and release events. So we select for press and - release events too (being careful to use reference - counting). */ - if (__glutCurrentWindow->motion) { - if (!motionFunc) { - /* previous mouseFunc being disabled */ - __glutCurrentWindow->buttonUses--; - __glutChangeWindowEventMask( - ButtonPressMask | ButtonReleaseMask, - __glutCurrentWindow->buttonUses > 0); - } - } else { - if (motionFunc) { - /* Previously no mouseFunc, new one being installed. */ - __glutCurrentWindow->buttonUses++; - __glutChangeWindowEventMask( - ButtonPressMask | ButtonReleaseMask, True); - } - } - /* Real work of selecting for passive mouse motion. */ - __glutChangeWindowEventMask( - Button1MotionMask | Button2MotionMask | Button3MotionMask, - motionFunc != NULL); - __glutCurrentWindow->motion = motionFunc; -} - -void GLUTAPIENTRY -glutPassiveMotionFunc(GLUTpassiveCB passiveMotionFunc) -{ - __glutChangeWindowEventMask(PointerMotionMask, - passiveMotionFunc != NULL); - - /* Passive motion also requires watching enters and leaves so - that a fake passive motion event can be generated on an - enter. */ - __glutChangeWindowEventMask(EnterWindowMask | LeaveWindowMask, - __glutCurrentWindow->entry != NULL || passiveMotionFunc != NULL); - - __glutCurrentWindow->passive = passiveMotionFunc; -} - -void GLUTAPIENTRY -glutEntryFunc(GLUTentryCB entryFunc) -{ - __glutChangeWindowEventMask(EnterWindowMask | LeaveWindowMask, - entryFunc != NULL || __glutCurrentWindow->passive); - __glutCurrentWindow->entry = entryFunc; - if (!entryFunc) { - __glutCurrentWindow->entryState = -1; - } -} - -void GLUTAPIENTRY -glutWindowStatusFunc(GLUTwindowStatusCB windowStatusFunc) -{ - __glutChangeWindowEventMask(VisibilityChangeMask, - windowStatusFunc != NULL); - __glutCurrentWindow->windowStatus = windowStatusFunc; - if (!windowStatusFunc) { - /* Make state invalid. */ - __glutCurrentWindow->visState = -1; - } -} - -static void GLUTCALLBACK -visibilityHelper(int status) -{ - if (status == GLUT_HIDDEN || status == GLUT_FULLY_COVERED) - __glutCurrentWindow->visibility(GLUT_NOT_VISIBLE); - else - __glutCurrentWindow->visibility(GLUT_VISIBLE); -} - -void GLUTAPIENTRY -glutVisibilityFunc(GLUTvisibilityCB visibilityFunc) -{ - __glutCurrentWindow->visibility = visibilityFunc; - if (visibilityFunc) - glutWindowStatusFunc(visibilityHelper); - else - glutWindowStatusFunc(NULL); -} - -void GLUTAPIENTRY -glutReshapeFunc(GLUTreshapeCB reshapeFunc) -{ - if (reshapeFunc) { - __glutCurrentWindow->reshape = reshapeFunc; - } else { - __glutCurrentWindow->reshape = __glutDefaultReshape; - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_winmisc.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_winmisc.c deleted file mode 100644 index 0fc4c805f2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glut_winmisc.c +++ /dev/null @@ -1,124 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#ifdef __VMS -#include -#endif - -#include -#include -#include -#include - -#if !defined(_WIN32) -#include -#include -#include /* for XA_STRING atom */ -#endif - -#include "glutint.h" - -/* CENTRY */ -void GLUTAPIENTRY -glutSetWindowTitle(const char *title) -{ - XTextProperty textprop; - - assert(!__glutCurrentWindow->parent); - IGNORE_IN_GAME_MODE(); - textprop.value = (unsigned char *) title; - textprop.encoding = XA_STRING; - textprop.format = 8; - textprop.nitems = strlen(title); - XSetWMName(__glutDisplay, - __glutCurrentWindow->win, &textprop); - XFlush(__glutDisplay); -} - -void GLUTAPIENTRY -glutSetIconTitle(const char *title) -{ - XTextProperty textprop; - - assert(!__glutCurrentWindow->parent); - IGNORE_IN_GAME_MODE(); - textprop.value = (unsigned char *) title; - textprop.encoding = XA_STRING; - textprop.format = 8; - textprop.nitems = strlen(title); - XSetWMIconName(__glutDisplay, - __glutCurrentWindow->win, &textprop); - XFlush(__glutDisplay); -} - -void GLUTAPIENTRY -glutPositionWindow(int x, int y) -{ - IGNORE_IN_GAME_MODE(); - __glutCurrentWindow->desiredX = x; - __glutCurrentWindow->desiredY = y; - __glutCurrentWindow->desiredConfMask |= CWX | CWY; - __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK); -} - -void GLUTAPIENTRY -glutReshapeWindow(int w, int h) -{ - IGNORE_IN_GAME_MODE(); - if (w <= 0 || h <= 0) - __glutWarning("glutReshapeWindow: non-positive width or height not allowed"); - - __glutCurrentWindow->desiredWidth = w; - __glutCurrentWindow->desiredHeight = h; - __glutCurrentWindow->desiredConfMask |= CWWidth | CWHeight; - __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK); -} - -void GLUTAPIENTRY -glutPopWindow(void) -{ - IGNORE_IN_GAME_MODE(); - __glutCurrentWindow->desiredStack = Above; - __glutCurrentWindow->desiredConfMask |= CWStackMode; - __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK); -} - -void GLUTAPIENTRY -glutPushWindow(void) -{ - IGNORE_IN_GAME_MODE(); - __glutCurrentWindow->desiredStack = Below; - __glutCurrentWindow->desiredConfMask |= CWStackMode; - __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK); -} - -void GLUTAPIENTRY -glutIconifyWindow(void) -{ - IGNORE_IN_GAME_MODE(); - assert(!__glutCurrentWindow->parent); - __glutCurrentWindow->desiredMapState = IconicState; - __glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK); -} - -void GLUTAPIENTRY -glutShowWindow(void) -{ - IGNORE_IN_GAME_MODE(); - __glutCurrentWindow->desiredMapState = NormalState; - __glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK); -} - -void GLUTAPIENTRY -glutHideWindow(void) -{ - IGNORE_IN_GAME_MODE(); - __glutCurrentWindow->desiredMapState = WithdrawnState; - __glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK); -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glutbitmap.h b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glutbitmap.h deleted file mode 100644 index 9584bb129d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glutbitmap.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef __glutbitmap_h__ -#define __glutbitmap_h__ - -/* Copyright (c) Mark J. Kilgard, 1994, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#define GLUT_NO_LIB_PRAGMA /* Avoid auto library linking when building - the GLUT library itself. */ -#include - -typedef struct { - const GLsizei width; - const GLsizei height; - const GLfloat xorig; - const GLfloat yorig; - const GLfloat advance; - const GLubyte *bitmap; -} BitmapCharRec, *BitmapCharPtr; - -typedef struct { - const char *name; - const int num_chars; - const int first; - const BitmapCharRec * const *ch; -} BitmapFontRec, *BitmapFontPtr; - -typedef void *GLUTbitmapFont; - -#endif /* __glutbitmap_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glutint.h b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glutint.h deleted file mode 100644 index 6fe09ffe7e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glutint.h +++ /dev/null @@ -1,812 +0,0 @@ -#ifndef __glutint_h__ -#define __glutint_h__ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#ifdef __VMS -#include -#endif - -#if defined(__CYGWIN32__) -#include -#endif - -#define SUPPORT_FORTRAN /* With GLUT 3.7, everyone supports Fortran. */ - -#if defined(_WIN32) -#include "glutwin32.h" -#else -#include -#include -#define GLX_GLXEXT_PROTOTYPES -#include -#endif - -#define GLUT_BUILDING_LIB /* Building the GLUT library itself. */ -#include - -#if defined(MESA) && defined(_WIN32) && !defined(__CYGWIN32__) -#include -#endif - -#ifndef _WIN32 -/* added by BrianP: */ -#ifndef APIENTRY -#define APIENTRY GLAPIENTRY -#endif -#define __cdecl GLAPIENTRY -#define CDECL GLAPIENTRY -#endif - -/* GLUT_BUILDING_LIB is used by to 1) not #pragma link - with the GLUT library, and 2) avoid the Win32 atexit hack. */ - -/* This must be done after is included. MESA is defined - if the is supplied by Brian Paul's Mesa library. */ -#if defined(MESA) && defined(_WIN32) -/* Mesa implements "wgl" versions of GDI entry points needed for - using OpenGL. Map these "wgl" versions to the GDI names via - macros. */ -#define ChoosePixelFormat wglChoosePixelFormat -#define DescribePixelFormat wglDescribePixelFormat -#define GetPixelFormat wglGetPixelFormat -#define SetPixelFormat wglSetPixelFormat -#define SwapBuffers wglSwapBuffers -#define GetCurrentContext wglGetCurrentContext -#define GetCurrentDC wglGetCurrentDC -#define MakeCurrent wglMakeCurrent -#define CreateContext wglCreateContext -#define DeleteContext wglDeleteContext -#endif /* MESA */ - -#ifdef SUPPORT_FORTRAN -#include -#endif - -#ifdef __vms -#if ( __VMS_VER < 70000000 ) -#define OLD_VMS -struct timeval6 { - __int64 val; -}; -extern int sys$gettim(struct timeval6 *); -#else -#include -#endif -#else -#include -#if !defined(_WIN32) || defined(__CYGWIN32__) -#include -#else -#include -#endif -#endif -#if defined(__vms) && ( __VMS_VER < 70000000 ) - -/* For VMS6.2 or lower : - One TICK on VMS is 100 nanoseconds; 0.1 microseconds or - 0.0001 milliseconds. This means that there are 0.01 - ticks/ns, 10 ticks/us, 10,000 ticks/ms and 10,000,000 - ticks/second. */ - -#define TICKS_PER_MILLISECOND 10000 -#define TICKS_PER_SECOND 10000000 - -#define GETTIMEOFDAY(_x) (void) sys$gettim (_x); - -#define ADD_TIME(dest, src1, src2) { \ - (dest).val = (src1).val + (src2).val; \ -} - -#define TIMEDELTA(dest, src1, src2) { \ - (dest).val = (src1).val - (src2).val; \ -} - -#define IS_AFTER(t1, t2) ((t2).val > (t1).val) - -#define IS_AT_OR_AFTER(t1, t2) ((t2).val >= (t1).val) - -#else -#if defined(SVR4) && !defined(sun) /* Sun claims SVR4, but - wants 2 args. */ -#define GETTIMEOFDAY(_x) gettimeofday(_x) -#else -#define GETTIMEOFDAY(_x) gettimeofday(_x, NULL) -#endif -#define ADD_TIME(dest, src1, src2) { \ - if(((dest).tv_usec = \ - (src1).tv_usec + (src2).tv_usec) >= 1000000) { \ - (dest).tv_usec -= 1000000; \ - (dest).tv_sec = (src1).tv_sec + (src2).tv_sec + 1; \ - } else { \ - (dest).tv_sec = (src1).tv_sec + (src2).tv_sec; \ - if(((dest).tv_sec >= 1) && (((dest).tv_usec <0))) { \ - (dest).tv_sec --;(dest).tv_usec += 1000000; \ - } \ - } \ -} -#define TIMEDELTA(dest, src1, src2) { \ - if(((dest).tv_usec = (src1).tv_usec - (src2).tv_usec) < 0) { \ - (dest).tv_usec += 1000000; \ - (dest).tv_sec = (src1).tv_sec - (src2).tv_sec - 1; \ - } else { \ - (dest).tv_sec = (src1).tv_sec - (src2).tv_sec; \ - } \ -} -#define IS_AFTER(t1, t2) \ - (((t2).tv_sec > (t1).tv_sec) || \ - (((t2).tv_sec == (t1).tv_sec) && \ - ((t2).tv_usec > (t1).tv_usec))) -#define IS_AT_OR_AFTER(t1, t2) \ - (((t2).tv_sec > (t1).tv_sec) || \ - (((t2).tv_sec == (t1).tv_sec) && \ - ((t2).tv_usec >= (t1).tv_usec))) -#endif - -#define IGNORE_IN_GAME_MODE() \ - { if (__glutGameModeWindow) return; } - -#define GLUT_WIND_IS_RGB(x) (((x) & GLUT_INDEX) == 0) -#define GLUT_WIND_IS_INDEX(x) (((x) & GLUT_INDEX) != 0) -#define GLUT_WIND_IS_SINGLE(x) (((x) & GLUT_DOUBLE) == 0) -#define GLUT_WIND_IS_DOUBLE(x) (((x) & GLUT_DOUBLE) != 0) -#define GLUT_WIND_HAS_ACCUM(x) (((x) & GLUT_ACCUM) != 0) -#define GLUT_WIND_HAS_ALPHA(x) (((x) & GLUT_ALPHA) != 0) -#define GLUT_WIND_HAS_DEPTH(x) (((x) & GLUT_DEPTH) != 0) -#define GLUT_WIND_HAS_STENCIL(x) (((x) & GLUT_STENCIL) != 0) -#define GLUT_WIND_IS_MULTISAMPLE(x) (((x) & GLUT_MULTISAMPLE) != 0) -#define GLUT_WIND_IS_STEREO(x) (((x) & GLUT_STEREO) != 0) -#define GLUT_WIND_IS_LUMINANCE(x) (((x) & GLUT_LUMINANCE) != 0) -#define GLUT_MAP_WORK (1 << 0) -#define GLUT_EVENT_MASK_WORK (1 << 1) -#define GLUT_REDISPLAY_WORK (1 << 2) -#define GLUT_CONFIGURE_WORK (1 << 3) -#define GLUT_COLORMAP_WORK (1 << 4) -#define GLUT_DEVICE_MASK_WORK (1 << 5) -#define GLUT_FINISH_WORK (1 << 6) -#define GLUT_DEBUG_WORK (1 << 7) -#define GLUT_DUMMY_WORK (1 << 8) -#define GLUT_FULL_SCREEN_WORK (1 << 9) -#define GLUT_OVERLAY_REDISPLAY_WORK (1 << 10) -#define GLUT_REPAIR_WORK (1 << 11) -#define GLUT_OVERLAY_REPAIR_WORK (1 << 12) - -/* Frame buffer capability macros and types. */ -#define RGBA 0 -#define BUFFER_SIZE 1 -#define DOUBLEBUFFER 2 -#define STEREO 3 -#define AUX_BUFFERS 4 -#define RED_SIZE 5 /* Used as mask bit for - "color selected". */ -#define GREEN_SIZE 6 -#define BLUE_SIZE 7 -#define ALPHA_SIZE 8 -#define DEPTH_SIZE 9 -#define STENCIL_SIZE 10 -#define ACCUM_RED_SIZE 11 /* Used as mask bit for - "acc selected". */ -#define ACCUM_GREEN_SIZE 12 -#define ACCUM_BLUE_SIZE 13 -#define ACCUM_ALPHA_SIZE 14 -#define LEVEL 15 - -#define NUM_GLXCAPS (LEVEL + 1) - -#define XVISUAL (NUM_GLXCAPS + 0) -#define TRANSPARENT (NUM_GLXCAPS + 1) -#define SAMPLES (NUM_GLXCAPS + 2) -#define XSTATICGRAY (NUM_GLXCAPS + 3) /* Used as - mask bit - for "any - visual type - selected". */ -#define XGRAYSCALE (NUM_GLXCAPS + 4) -#define XSTATICCOLOR (NUM_GLXCAPS + 5) -#define XPSEUDOCOLOR (NUM_GLXCAPS + 6) -#define XTRUECOLOR (NUM_GLXCAPS + 7) -#define XDIRECTCOLOR (NUM_GLXCAPS + 8) -#define SLOW (NUM_GLXCAPS + 9) -#define CONFORMANT (NUM_GLXCAPS + 10) - -#define NUM_CAPS (NUM_GLXCAPS + 11) - -/* Frame buffer capablities that don't have a corresponding - FrameBufferMode entry. These get used as mask bits. */ -#define NUM (NUM_CAPS + 0) -#define RGBA_MODE (NUM_CAPS + 1) -#define CI_MODE (NUM_CAPS + 2) -#define LUMINANCE_MODE (NUM_CAPS + 3) - -#define NONE 0 -#define EQ 1 -#define NEQ 2 -#define LTE 3 -#define GTE 4 -#define GT 5 -#define LT 6 -#define MIN 7 - -typedef struct _Criterion { - int capability; - int comparison; - int value; -} Criterion; - -typedef struct _FrameBufferMode { - XVisualInfo *vi; -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - - /* fbc is non-NULL when the XVisualInfo* is not OpenGL-capable - (ie, GLX_USE_GL is false), but the SGIX_fbconfig extension shows - the visual's fbconfig is OpenGL-capable. The reason for this is typically - an RGBA luminance fbconfig such as 16-bit StaticGray that could - not be advertised as a GLX visual since StaticGray visuals are - required (by the GLX specification) to be color index. The - SGIX_fbconfig allows StaticGray visuals to instead advertised as - fbconfigs that can provide RGBA luminance support. */ - - GLXFBConfigSGIX fbc; -#endif - int valid; - int cap[NUM_CAPS]; -} FrameBufferMode; - -/* DisplayMode capability macros for game mode. */ -#define DM_WIDTH 0 /* "width" */ -#define DM_HEIGHT 1 /* "height" */ -#define DM_PIXEL_DEPTH 2 /* "bpp" (bits per pixel) */ -#define DM_HERTZ 3 /* "hertz" */ -#define DM_NUM 4 /* "num" */ - -#define NUM_DM_CAPS (DM_NUM+1) - -typedef struct _DisplayMode { -#ifdef _WIN32 - DEVMODE devmode; -#else - /* XXX The X Window System does not have a standard - mechanism for display setting changes. On SGI - systems, GLUT could use the XSGIvc (SGI X video - control extension). Perhaps this can be done in - a future release of GLUT. */ -#endif - int valid; - int cap[NUM_DM_CAPS]; -} DisplayMode; - -/* GLUT function types */ -typedef void (GLUTCALLBACK *GLUTdisplayCB) (void); -typedef void (GLUTCALLBACK *GLUTreshapeCB) (int, int); -typedef void (GLUTCALLBACK *GLUTkeyboardCB) (unsigned char, int, int); -typedef void (GLUTCALLBACK *GLUTmouseCB) (int, int, int, int); -typedef void (GLUTCALLBACK *GLUTmotionCB) (int, int); -typedef void (GLUTCALLBACK *GLUTpassiveCB) (int, int); -typedef void (GLUTCALLBACK *GLUTentryCB) (int); -typedef void (GLUTCALLBACK *GLUTvisibilityCB) (int); -typedef void (GLUTCALLBACK *GLUTwindowStatusCB) (int); -typedef void (GLUTCALLBACK *GLUTidleCB) (void); -typedef void (GLUTCALLBACK *GLUTtimerCB) (int); -typedef void (GLUTCALLBACK *GLUTmenuStateCB) (int); /* DEPRICATED. */ -typedef void (GLUTCALLBACK *GLUTmenuStatusCB) (int, int, int); -typedef void (GLUTCALLBACK *GLUTselectCB) (int); -typedef void (GLUTCALLBACK *GLUTspecialCB) (int, int, int); -typedef void (GLUTCALLBACK *GLUTspaceMotionCB) (int, int, int); -typedef void (GLUTCALLBACK *GLUTspaceRotateCB) (int, int, int); -typedef void (GLUTCALLBACK *GLUTspaceButtonCB) (int, int); -typedef void (GLUTCALLBACK *GLUTdialsCB) (int, int); -typedef void (GLUTCALLBACK *GLUTbuttonBoxCB) (int, int); -typedef void (GLUTCALLBACK *GLUTtabletMotionCB) (int, int); -typedef void (GLUTCALLBACK *GLUTtabletButtonCB) (int, int, int, int); -typedef void (GLUTCALLBACK *GLUTjoystickCB) (unsigned int buttonMask, int x, int y, int z); - -typedef struct _GLUTcolorcell GLUTcolorcell; -struct _GLUTcolorcell { - /* GLUT_RED, GLUT_GREEN, GLUT_BLUE */ - GLfloat component[3]; -}; - -typedef struct _GLUTcolormap GLUTcolormap; -struct _GLUTcolormap { - Visual *visual; /* visual of the colormap */ - Colormap cmap; /* X colormap ID */ - int refcnt; /* number of windows using colormap */ - int size; /* number of cells in colormap */ - int transparent; /* transparent pixel, or -1 if opaque */ - GLUTcolorcell *cells; /* array of cells */ - GLUTcolormap *next; /* next colormap in list */ -}; - -typedef struct _GLUTwindow GLUTwindow; -typedef struct _GLUToverlay GLUToverlay; -struct _GLUTwindow { - int num; /* Small integer window id (0-based). */ - - /* Window system related state. */ -#if defined(_WIN32) - int pf; /* Pixel format. */ - HDC hdc; /* Window's Win32 device context. */ -#endif - Window win; /* X window for GLUT window */ - GLXContext ctx; /* OpenGL context GLUT glut window */ - XVisualInfo *vis; /* visual for window */ - Bool visAlloced; /* if vis needs deallocate on destroy */ - Colormap cmap; /* RGB colormap for window; None if CI */ - GLUTcolormap *colormap; /* colormap; NULL if RGBA */ - GLUToverlay *overlay; /* overlay; NULL if no overlay */ -#if defined(_WIN32) - HDC renderDc; /* Win32's device context for rendering. */ -#endif - Window renderWin; /* X window for rendering (might be - overlay) */ - GLXContext renderCtx; /* OpenGL context for rendering (might - be overlay) */ - /* GLUT settable or visible window state. */ - int width; /* window width in pixels */ - int height; /* window height in pixels */ - int cursor; /* cursor name */ - int visState; /* visibility state (-1 is unknown) */ - int shownState; /* if window mapped */ - int entryState; /* entry state (-1 is unknown) */ -#define GLUT_MAX_MENUS 3 - - int menu[GLUT_MAX_MENUS]; /* attatched menu nums */ - /* Window relationship state. */ - GLUTwindow *parent; /* parent window */ - GLUTwindow *children; /* list of children */ - GLUTwindow *siblings; /* list of siblings */ - /* Misc. non-API visible (hidden) state. */ - Bool treatAsSingle; /* treat this window as single-buffered - (it might be "fake" though) */ - Bool forceReshape; /* force reshape before display */ -#if !defined(_WIN32) - Bool isDirect; /* if direct context (X11 only) */ -#endif - Bool usedSwapBuffers; /* if swap buffers used last display */ - long eventMask; /* mask of X events selected for */ - int buttonUses; /* number of button uses, ref cnt */ - int tabletPos[2]; /* tablet position (-1 is invalid) */ - /* Work list related state. */ - unsigned int workMask; /* mask of window work to be done */ - GLUTwindow *prevWorkWin; /* link list of windows to work on */ - Bool desiredMapState; /* how to mapped window if on map work - list */ - Bool ignoreKeyRepeat; /* if window ignores autorepeat */ - int desiredConfMask; /* mask of desired window configuration - */ - int desiredX; /* desired X location */ - int desiredY; /* desired Y location */ - int desiredWidth; /* desired window width */ - int desiredHeight; /* desired window height */ - int desiredStack; /* desired window stack */ - /* Per-window callbacks. */ - GLUTdisplayCB display; /* redraw */ - GLUTreshapeCB reshape; /* resize (width,height) */ - GLUTmouseCB mouse; /* mouse (button,state,x,y) */ - GLUTmotionCB motion; /* motion (x,y) */ - GLUTpassiveCB passive; /* passive motion (x,y) */ - GLUTentryCB entry; /* window entry/exit (state) */ - GLUTkeyboardCB keyboard; /* keyboard (ASCII,x,y) */ - GLUTkeyboardCB keyboardUp; /* keyboard up (ASCII,x,y) */ - GLUTwindowStatusCB windowStatus; /* window status */ - GLUTvisibilityCB visibility; /* visibility */ - GLUTspecialCB special; /* special key */ - GLUTspecialCB specialUp; /* special up key */ - GLUTbuttonBoxCB buttonBox; /* button box */ - GLUTdialsCB dials; /* dials */ - GLUTspaceMotionCB spaceMotion; /* Spaceball motion */ - GLUTspaceRotateCB spaceRotate; /* Spaceball rotate */ - GLUTspaceButtonCB spaceButton; /* Spaceball button */ - GLUTtabletMotionCB tabletMotion; /* tablet motion */ - GLUTtabletButtonCB tabletButton; /* tablet button */ -#ifdef _WIN32 - GLUTjoystickCB joystick; /* joystick */ - int joyPollInterval; /* joystick polling interval */ -#endif -#ifdef SUPPORT_FORTRAN - GLUTdisplayFCB fdisplay; /* Fortran display */ - GLUTreshapeFCB freshape; /* Fortran reshape */ - GLUTmouseFCB fmouse; /* Fortran mouse */ - GLUTmotionFCB fmotion; /* Fortran motion */ - GLUTpassiveFCB fpassive; /* Fortran passive */ - GLUTentryFCB fentry; /* Fortran entry */ - GLUTkeyboardFCB fkeyboard; /* Fortran keyboard */ - GLUTkeyboardFCB fkeyboardUp; /* Fortran keyboard up */ - GLUTwindowStatusFCB fwindowStatus; /* Fortran window status */ - GLUTvisibilityFCB fvisibility; /* Fortran visibility */ - GLUTspecialFCB fspecial; /* special key */ - GLUTspecialFCB fspecialUp; /* special key up */ - GLUTbuttonBoxFCB fbuttonBox; /* button box */ - GLUTdialsFCB fdials; /* dials */ - GLUTspaceMotionFCB fspaceMotion; /* Spaceball motion */ - GLUTspaceRotateFCB fspaceRotate; /* Spaceball rotate */ - GLUTspaceButtonFCB fspaceButton; /* Spaceball button */ - GLUTtabletMotionFCB ftabletMotion; /* tablet motion */ - GLUTtabletButtonFCB ftabletButton; /* tablet button */ -#ifdef _WIN32 - GLUTjoystickFCB fjoystick; /* joystick */ -#endif -#endif -}; - -struct _GLUToverlay { -#if defined(_WIN32) - int pf; - HDC hdc; -#endif - Window win; - GLXContext ctx; - XVisualInfo *vis; /* visual for window */ - Bool visAlloced; /* if vis needs deallocate on destroy */ - Colormap cmap; /* RGB colormap for window; None if CI */ - GLUTcolormap *colormap; /* colormap; NULL if RGBA */ - int shownState; /* if overlay window mapped */ - Bool treatAsSingle; /* treat as single-buffered */ -#if !defined(_WIN32) - Bool isDirect; /* if direct context */ -#endif - int transparentPixel; /* transparent pixel value */ - GLUTdisplayCB display; /* redraw */ -#ifdef SUPPORT_FORTRAN - GLUTdisplayFCB fdisplay; /* redraw */ -#endif -}; - -typedef struct _GLUTstale GLUTstale; -struct _GLUTstale { - GLUTwindow *window; - Window win; - GLUTstale *next; -}; - -extern GLUTstale *__glutStaleWindowList; - -#define GLUT_OVERLAY_EVENT_FILTER_MASK \ - (ExposureMask | \ - StructureNotifyMask | \ - EnterWindowMask | \ - LeaveWindowMask) -#define GLUT_DONT_PROPAGATE_FILTER_MASK \ - (ButtonReleaseMask | \ - ButtonPressMask | \ - KeyPressMask | \ - KeyReleaseMask | \ - PointerMotionMask | \ - Button1MotionMask | \ - Button2MotionMask | \ - Button3MotionMask) -#define GLUT_HACK_STOP_PROPAGATE_MASK \ - (KeyPressMask | \ - KeyReleaseMask) - -typedef struct _GLUTmenu GLUTmenu; -typedef struct _GLUTmenuItem GLUTmenuItem; -struct _GLUTmenu { - int id; /* small integer menu id (0-based) */ - Window win; /* X window for the menu */ - GLUTselectCB select; /* function of menu */ - GLUTmenuItem *list; /* list of menu entries */ - int num; /* number of entries */ -#if !defined(_WIN32) - Bool managed; /* are the InputOnly windows size - validated? */ - Bool searched; /* help detect menu loops */ - int pixheight; /* height of menu in pixels */ - int pixwidth; /* width of menu in pixels */ -#endif - int submenus; /* number of submenu entries */ - GLUTmenuItem *highlighted; /* pointer to highlighted menu - entry, NULL not highlighted */ - GLUTmenu *cascade; /* currently cascading this menu */ - GLUTmenuItem *anchor; /* currently anchored to this entry */ - int x; /* current x origin relative to the - root window */ - int y; /* current y origin relative to the - root window */ -#ifdef SUPPORT_FORTRAN - GLUTselectFCB fselect; /* function of menu */ -#endif -}; - -struct _GLUTmenuItem { - Window win; /* InputOnly X window for entry */ - GLUTmenu *menu; /* menu entry belongs to */ - Bool isTrigger; /* is a submenu trigger? */ - int value; /* value to return for selecting this - entry; doubles as submenu id - (0-base) if submenu trigger */ -#if defined(_WIN32) - UINT unique; /* unique menu item id (Win32 only) */ -#endif - char *label; /* __glutStrdup'ed label string */ - int len; /* length of label string */ - int pixwidth; /* width of X window in pixels */ - GLUTmenuItem *next; /* next menu entry on list for menu */ -}; - -typedef struct _GLUTtimer GLUTtimer; -struct _GLUTtimer { - GLUTtimer *next; /* list of timers */ -#ifdef OLD_VMS - struct timeval6 timeout; /* time to be called */ -#else - struct timeval timeout; /* time to be called */ -#endif - GLUTtimerCB func; /* timer (value) */ - int value; /* return value */ -#ifdef SUPPORT_FORTRAN - GLUTtimerFCB ffunc; /* Fortran timer */ -#endif -}; - -typedef struct _GLUTeventParser GLUTeventParser; -struct _GLUTeventParser { - int (*func) (XEvent *); - GLUTeventParser *next; -}; - -/* Declarations to implement glutFullScreen support with - mwm/4Dwm. */ - -/* The following X property format is defined in Motif 1.1's - Xm/MwmUtils.h, but GLUT should not depend on that header - file. Note: Motif 1.2 expanded this structure with - uninteresting fields (to GLUT) so just stick with the - smaller Motif 1.1 structure. */ -typedef struct { -#define MWM_HINTS_DECORATIONS 2 - long flags; - long functions; - long decorations; - long input_mode; -} MotifWmHints; - -/* Make current and buffer swap macros. */ -#ifdef _WIN32 -#define MAKE_CURRENT_LAYER(window) \ - { \ - HGLRC currentContext = GetCurrentContext(); \ - HDC currentDc = GetCurrentDC(); \ - \ - if (currentContext != window->renderCtx \ - || currentDc != window->renderDc) { \ - MakeCurrent(window->renderDc, window->renderCtx); \ - } \ - } -#define MAKE_CURRENT_WINDOW(window) \ - { \ - HGLRC currentContext = GetCurrentContext(); \ - HDC currentDc = GetCurrentDC(); \ - \ - if (currentContext != window->ctx || currentDc != window->hdc) { \ - MakeCurrent(window->hdc, window->ctx); \ - } \ - } -#define MAKE_CURRENT_OVERLAY(overlay) \ - MakeCurrent(overlay->hdc, overlay->ctx) -#define UNMAKE_CURRENT() \ - MakeCurrent(NULL, NULL) -#define SWAP_BUFFERS_WINDOW(window) \ - SwapBuffers(window->hdc) -#define SWAP_BUFFERS_LAYER(window) \ - SwapBuffers(window->renderDc) -#else -#define MAKE_CURRENT_LAYER(window) \ - glXMakeCurrent(__glutDisplay, window->renderWin, window->renderCtx) -#define MAKE_CURRENT_WINDOW(window) \ - glXMakeCurrent(__glutDisplay, window->win, window->ctx) -#define MAKE_CURRENT_OVERLAY(overlay) \ - glXMakeCurrent(__glutDisplay, overlay->win, overlay->ctx) -#define UNMAKE_CURRENT() \ - glXMakeCurrent(__glutDisplay, None, NULL) -#define SWAP_BUFFERS_WINDOW(window) \ - glXSwapBuffers(__glutDisplay, window->win) -#define SWAP_BUFFERS_LAYER(window) \ - glXSwapBuffers(__glutDisplay, window->renderWin) -#endif - -/* private variables from glut_event.c */ -extern GLUTwindow *__glutWindowWorkList; -extern int __glutWindowDamaged; -#ifdef SUPPORT_FORTRAN -extern GLUTtimer *__glutTimerList; -extern GLUTtimer *__glutNewTimer; -#endif -extern GLUTmenu *__glutMappedMenu; - -extern void (*__glutUpdateInputDeviceMaskFunc) (GLUTwindow *); -#if !defined(_WIN32) -extern void (*__glutMenuItemEnterOrLeave)(GLUTmenuItem * item, - int num, int type); -extern void (*__glutFinishMenu)(Window win, int x, int y); -extern void (*__glutPaintMenu)(GLUTmenu * menu); -extern void (*__glutStartMenu)(GLUTmenu * menu, - GLUTwindow * window, int x, int y, int x_win, int y_win); -extern GLUTmenu * (*__glutGetMenuByNum)(int menunum); -extern GLUTmenuItem * (*__glutGetMenuItem)(GLUTmenu * menu, - Window win, int *which); -extern GLUTmenu * (*__glutGetMenu)(Window win); -#endif - -/* private variables from glut_init.c */ -extern Atom __glutWMDeleteWindow; -extern Display *__glutDisplay; -extern unsigned int __glutDisplayMode; -extern char *__glutDisplayString; -extern XVisualInfo *(*__glutDetermineVisualFromString) (char *string, Bool * treatAsSingle, - Criterion * requiredCriteria, int nRequired, int requiredMask, void **fbc); -extern GLboolean __glutDebug; -extern GLboolean __glutForceDirect; -extern GLboolean __glutIconic; -extern GLboolean __glutTryDirect; -extern Window __glutRoot; -extern XSizeHints __glutSizeHints; -extern char **__glutArgv; -extern char *__glutProgramName; -extern int __glutArgc; -extern int __glutConnectionFD; -extern int __glutInitHeight; -extern int __glutInitWidth; -extern int __glutInitX; -extern int __glutInitY; -extern int __glutScreen; -extern int __glutScreenHeight; -extern int __glutScreenWidth; -extern Atom __glutMotifHints; -extern unsigned int __glutModifierMask; -#ifdef _WIN32 -extern void (__cdecl *__glutExitFunc)(int retval); -#endif - -/* private variables from glut_menu.c */ -extern GLUTmenuItem *__glutItemSelected; -extern GLUTmenu **__glutMenuList; -extern void (GLUTCALLBACK *__glutMenuStatusFunc) (int, int, int); -extern void __glutMenuModificationError(void); -extern void __glutSetMenuItem(GLUTmenuItem * item, - const char *label, int value, Bool isTrigger); - -/* private variables from glut_win.c */ -extern GLUTwindow **__glutWindowList; -extern GLUTwindow *__glutCurrentWindow; -extern GLUTwindow *__glutMenuWindow; -extern GLUTmenu *__glutCurrentMenu; -extern int __glutWindowListSize; -extern void (*__glutFreeOverlayFunc) (GLUToverlay *); -extern void __glutFreeOverlay(GLUToverlay * overlay); -extern XVisualInfo *__glutDetermineWindowVisual(Bool * treatAsSingle, - Bool * visAlloced, void **fbc); - -/* private variables from glut_mesa.c */ -extern int __glutMesaSwapHackSupport; - -/* private variables from glut_gamemode.c */ -extern GLUTwindow *__glutGameModeWindow; - -/* private routines from glut_cindex.c */ -extern GLUTcolormap * __glutAssociateNewColormap(XVisualInfo * vis); -extern void __glutFreeColormap(GLUTcolormap *); - -/* private routines from glut_cmap.c */ -extern void __glutSetupColormap( - XVisualInfo * vi, - GLUTcolormap ** colormap, - Colormap * cmap); -#if !defined(_WIN32) -extern void __glutEstablishColormapsProperty( - GLUTwindow * window); -extern GLUTwindow *__glutToplevelOf(GLUTwindow * window); -#endif - -/* private routines from glut_cursor.c */ -extern void __glutSetCursor(GLUTwindow *window); - -/* private routines from glut_event.c */ -extern void __glutPutOnWorkList(GLUTwindow * window, - int work_mask); -extern void __glutRegisterEventParser(GLUTeventParser * parser); -extern void __glutPostRedisplay(GLUTwindow * window, int layerMask); -extern void handleTimeouts(void); - -/* private routines from glut_init.c */ -#if !defined(_WIN32) -extern void __glutOpenXConnection(char *display); -#else -extern void __glutOpenWin32Connection(char *display); -#endif -#ifdef OLD_VMS -extern void __glutInitTime(struct timeval6 *beginning); -#else -extern void __glutInitTime(struct timeval *beginning); -#endif - -/* private routines for glut_menu.c (or win32_menu.c) */ -#if defined(_WIN32) -extern GLUTmenu *__glutGetMenu(Window win); -extern GLUTmenu *__glutGetMenuByNum(int menunum); -extern GLUTmenuItem *__glutGetMenuItem(GLUTmenu * menu, - Window win, int *which); -extern void __glutStartMenu(GLUTmenu * menu, - GLUTwindow * window, int x, int y, int x_win, int y_win); -extern void __glutFinishMenu(Window win, int x, int y); -#endif -extern void __glutSetMenu(GLUTmenu * menu); - -/* private routines from glut_util.c */ -extern char * __glutStrdup(const char *string); -extern void __glutWarning(char *format,...); -extern void __glutFatalError(char *format,...); -extern void __glutFatalUsage(char *format,...); - -/* private routines from glut_win.c */ -extern GLUTwindow *__glutGetWindow(Window win); -extern void __glutChangeWindowEventMask(long mask, Bool add); -extern XVisualInfo *__glutDetermineVisual( - unsigned int mode, - Bool * fakeSingle, - XVisualInfo * (getVisualInfo) (unsigned int)); -extern XVisualInfo *__glutGetVisualInfo(unsigned int mode); -extern void __glutSetWindow(GLUTwindow * window); -extern void __glutReshapeFunc(GLUTreshapeCB reshapeFunc, - int callingConvention); -extern void GLUTCALLBACK __glutDefaultReshape(int, int); -extern GLUTwindow *__glutCreateWindow( - GLUTwindow * parent, - int x, int y, int width, int height, int gamemode); -extern void __glutDestroyWindow( - GLUTwindow * window, - GLUTwindow * initialWindow); - -#if !defined(_WIN32) -/* private routines from glut_glxext.c */ -extern int __glutIsSupportedByGLX(char *); -extern int __glut_glXBindChannelToWindowSGIX(Display *dpy, int screen, - int channel, Window window); -extern int __glut_glXChannelRectSGIX(Display *dpy, int screen, int channel, - int x, int y, int w, int h); -extern int __glut_glXQueryChannelRectSGIX(Display *dpy, int screen, - int channel, int *x, int *y, - int *w, int *h); -extern int __glut_glXQueryChannelDeltasSGIX(Display *dpy, int screen, - int channel, int *dx, int *dy, - int *dw, int *dh); -extern int __glut_glXChannelRectSyncSGIX(Display *dpy, int screen, int channel, - GLenum synctype); -extern GLXContext __glut_glXCreateContextWithConfigSGIX(Display *dpy, - GLXFBConfigSGIX config, - int render_type, - GLXContext share_list, - Bool direct); -extern int __glut_glXGetFBConfigAttribSGIX(Display *dpy, - GLXFBConfigSGIX config, - int attribute, - int *value); -extern GLXFBConfigSGIX __glut_glXGetFBConfigFromVisualSGIX(Display *dpy, - XVisualInfo *vis); -#endif - -/* private routines from glut_input.c */ -extern void __glutUpdateInputDeviceMask(GLUTwindow * window); - -/* private routines from glut_mesa.c */ -extern void __glutDetermineMesaSwapHackSupport(void); - -/* private routines from glut_gameglut.c */ -extern void __glutCloseDownGameMode(void); - -/* private variables from glut_swap.c (BrianP) */ -extern GLint __glutFPS; -extern GLint __glutSwapCount; -extern GLint __glutSwapTime; - -#if defined(_WIN32) -/* private routines from win32_*.c */ -extern LONG WINAPI __glutWindowProc(HWND win, UINT msg, WPARAM w, LPARAM l); -extern HDC XHDC; -#endif - -#endif /* __glutint_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glutstroke.h b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glutstroke.h deleted file mode 100644 index cbc9e156fe..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glutstroke.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __glutstroke_h__ -#define __glutstroke_h__ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#if defined(_WIN32) -#pragma warning (disable:4244) /* disable bogus conversion warnings */ -#pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */ -#endif - -typedef struct { - float x; - float y; -} CoordRec, *CoordPtr; - -typedef struct { - int num_coords; - const CoordRec *coord; -} StrokeRec, *StrokePtr; - -typedef struct { - int num_strokes; - const StrokeRec *stroke; - float center; - float right; -} StrokeCharRec, *StrokeCharPtr; - -typedef struct { - const char *name; - int num_chars; - const StrokeCharRec *ch; - float top; - float bottom; -} StrokeFontRec, *StrokeFontPtr; - -typedef void *GLUTstrokeFont; - -#endif /* __glutstroke_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glutwin32.h b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glutwin32.h deleted file mode 100644 index 304eeb20a2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/glutwin32.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef __glutwin32_h__ -#define __glutwin32_h__ - -/* Copyright (c) Nate Robins, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "win32_x11.h" -#include "win32_glx.h" - -/* We have to undef some things because Microsoft likes to pollute the - global namespace. */ -#undef TRANSPARENT - -/* Win32 "equivalent" cursors - eventually, the X glyphs should be - converted to Win32 cursors -- then they will look the same */ -#define XC_arrow IDC_ARROW -#define XC_top_left_arrow IDC_ARROW -#define XC_hand1 IDC_SIZEALL -#define XC_pirate IDC_NO -#define XC_question_arrow IDC_HELP -#define XC_exchange IDC_NO -#define XC_spraycan IDC_SIZEALL -#define XC_watch IDC_WAIT -#define XC_xterm IDC_IBEAM -#define XC_crosshair IDC_CROSS -#define XC_sb_v_double_arrow IDC_SIZENS -#define XC_sb_h_double_arrow IDC_SIZEWE -#define XC_top_side IDC_UPARROW -#define XC_bottom_side IDC_SIZENS -#define XC_left_side IDC_SIZEWE -#define XC_right_side IDC_SIZEWE -#define XC_top_left_corner IDC_SIZENWSE -#define XC_top_right_corner IDC_SIZENESW -#define XC_bottom_right_corner IDC_SIZENWSE -#define XC_bottom_left_corner IDC_SIZENESW - -#define XA_STRING 0 - -/* Private routines from win32_util.c */ -#ifndef __CYGWIN32__ -extern int gettimeofday(struct timeval* tp, void* tzp); -#endif -extern void *__glutFont(void *font); -extern int __glutGetTransparentPixel(Display *dpy, XVisualInfo *vinfo); -extern void __glutAdjustCoords(Window parent, int *x, int *y, int *width, int *height); - - -/* Cygwin B20.1 misses the following definitions */ -#ifdef __CYGWIN32__ - -/* from winuser.h */ -#define CDS_FULLSCREEN 4 - -/* from mmsystem.h */ -#define WINMMAPI __declspec(dllimport) -typedef UINT MMRESULT; - -#define MM_JOY1MOVE 0x3A0 -#define MM_JOY1ZMOVE 0x3A2 -#define MM_JOY1BUTTONDOWN 0x3B5 -#define MM_JOY1BUTTONUP 0x3B7 - -#define JOYERR_NOERROR 0 -#define JOYERR_PARMS 165 - -#define JOY_RETURNALL 0x000000ffl - -#define JOYSTICKID1 0 - -typedef struct joyinfoex_tag { - DWORD dwSize; /* size of structure */ - DWORD dwFlags; /* flags to indicate what to return */ - DWORD dwXpos; /* x position */ - DWORD dwYpos; /* y position */ - DWORD dwZpos; /* z position */ - DWORD dwRpos; /* rudder/4th axis position */ - DWORD dwUpos; /* 5th axis position */ - DWORD dwVpos; /* 6th axis position */ - DWORD dwButtons; /* button states */ - DWORD dwButtonNumber; /* current button number pressed */ - DWORD dwPOV; /* point of view state */ - DWORD dwReserved1; /* reserved for communication between winmm & driver */ - DWORD dwReserved2; /* reserved for future expansion */ -} JOYINFOEX, *PJOYINFOEX, /* NEAR */ *NPJOYINFOEX, /* FAR */ *LPJOYINFOEX; - -WINMMAPI MMRESULT WINAPI joyGetPosEx( UINT uJoyID, LPJOYINFOEX pji); -WINMMAPI MMRESULT WINAPI joyReleaseCapture( UINT uJoyID); -WINMMAPI MMRESULT WINAPI joySetCapture( HWND hwnd, UINT uJoyID, UINT uPeriod, BOOL fChanged); -WINMMAPI MMRESULT WINAPI joySetThreshold( UINT uJoyID, UINT uThreshold); - -#endif - -#endif /* __glutwin32_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/layerutil.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/layerutil.c deleted file mode 100644 index 26ba0b6029..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/layerutil.c +++ /dev/null @@ -1,204 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1993, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -/* Based on XLayerUtil.c: Revision: 1.5 */ - -#include -#include -#include "layerutil.h" - -/* SGI optimization introduced in IRIX 6.3 to avoid X server - round trips for interning common X atoms. */ -#include -#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS) -#include -#else -#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how) -#endif - -static Bool layersRead = False; -static OverlayInfo **overlayInfoPerScreen; -static unsigned long *numOverlaysPerScreen; - -static void -findServerOverlayVisualsInfo(Display * dpy) -{ - static Atom overlayVisualsAtom; - Atom actualType; - Status status; - unsigned long sizeData, bytesLeft; - Window root; - int actualFormat, numScreens, i; - - if (layersRead == False) { - overlayVisualsAtom = XSGIFastInternAtom(dpy, - "SERVER_OVERLAY_VISUALS", SGI_XA_SERVER_OVERLAY_VISUALS, True); - if (overlayVisualsAtom != None) { - numScreens = ScreenCount(dpy); - overlayInfoPerScreen = (OverlayInfo **) - malloc(numScreens * sizeof(OverlayInfo *)); - numOverlaysPerScreen = (unsigned long *) - malloc(numScreens * sizeof(unsigned long)); - if (overlayInfoPerScreen != NULL && - numOverlaysPerScreen != NULL) { - for (i = 0; i < numScreens; i++) { - root = RootWindow(dpy, i); - status = XGetWindowProperty(dpy, root, - overlayVisualsAtom, 0L, (long) 10000, False, - overlayVisualsAtom, &actualType, &actualFormat, - &sizeData, &bytesLeft, - (unsigned char **) &overlayInfoPerScreen[i]); - if (status != Success || - actualType != overlayVisualsAtom || - actualFormat != 32 || sizeData < 4) - numOverlaysPerScreen[i] = 0; - else - /* Four 32-bit quantities per - SERVER_OVERLAY_VISUALS entry. */ - numOverlaysPerScreen[i] = sizeData / 4; - } - layersRead = True; - } else { - if (overlayInfoPerScreen != NULL) - free(overlayInfoPerScreen); - if (numOverlaysPerScreen != NULL) - free(numOverlaysPerScreen); - } - } - } -} - -int -__glutGetTransparentPixel(Display * dpy, XVisualInfo * vinfo) -{ - int i, screen = vinfo->screen; - OverlayInfo *overlayInfo; - - findServerOverlayVisualsInfo(dpy); - if (layersRead) { - for (i = 0; i < numOverlaysPerScreen[screen]; i++) { - overlayInfo = &overlayInfoPerScreen[screen][i]; - if (vinfo->visualid == overlayInfo->overlay_visual) { - if (overlayInfo->transparent_type == TransparentPixel) { - return (int) overlayInfo->value; - } else { - return -1; - } - } - } - } - return -1; -} - -XLayerVisualInfo * -__glutXGetLayerVisualInfo(Display * dpy, long lvinfo_mask, - XLayerVisualInfo * lvinfo_template, int *nitems_return) -{ - XVisualInfo *vinfo; - XLayerVisualInfo *layerInfo; - int numVisuals, count, i, j; - - vinfo = XGetVisualInfo(dpy, lvinfo_mask & VisualAllMask, - &lvinfo_template->vinfo, nitems_return); - if (vinfo == NULL) - return NULL; - numVisuals = *nitems_return; - findServerOverlayVisualsInfo(dpy); - layerInfo = (XLayerVisualInfo *) - malloc(numVisuals * sizeof(XLayerVisualInfo)); - if (layerInfo == NULL) { - XFree(vinfo); - return NULL; - } - count = 0; - for (i = 0; i < numVisuals; i++) { - XVisualInfo *pVinfo = &vinfo[i]; - int screen = pVinfo->screen; - OverlayInfo *overlayInfo = NULL; - - overlayInfo = NULL; - if (layersRead) { - for (j = 0; j < numOverlaysPerScreen[screen]; j++) - if (pVinfo->visualid == - overlayInfoPerScreen[screen][j].overlay_visual) { - overlayInfo = &overlayInfoPerScreen[screen][j]; - break; - } - } - if (lvinfo_mask & VisualLayerMask) { - if (overlayInfo == NULL) { - if (lvinfo_template->layer != 0) - continue; - } else if (lvinfo_template->layer != overlayInfo->layer) - continue; - } - if (lvinfo_mask & VisualTransparentType) { - if (overlayInfo == NULL) { - if (lvinfo_template->type != None) - continue; - } else if (lvinfo_template->type != - overlayInfo->transparent_type) - continue; - } - if (lvinfo_mask & VisualTransparentValue) { - if (overlayInfo == NULL) - /* Non-overlay visuals have no sense of - TransparentValue. */ - continue; - else if (lvinfo_template->value != overlayInfo->value) - continue; - } - layerInfo[count].vinfo = *pVinfo; - if (overlayInfo == NULL) { - layerInfo[count].layer = 0; - layerInfo[count].type = None; - layerInfo[count].value = 0; /* meaningless */ - } else { - layerInfo[count].layer = overlayInfo->layer; - layerInfo[count].type = overlayInfo->transparent_type; - layerInfo[count].value = overlayInfo->value; - } - count++; - } - XFree(vinfo); - *nitems_return = count; - if (count == 0) { - XFree(layerInfo); - return NULL; - } else - return layerInfo; -} - -#if 0 /* Unused by GLUT. */ -Status -__glutXMatchLayerVisualInfo(Display * dpy, int screen, - int depth, int visualClass, int layer, - XLayerVisualInfo * lvinfo_return) -{ - XLayerVisualInfo *lvinfo; - XLayerVisualInfo lvinfoTemplate; - int nitems; - - lvinfoTemplate.vinfo.screen = screen; - lvinfoTemplate.vinfo.depth = depth; -#if defined(__cplusplus) || defined(c_plusplus) - lvinfoTemplate.vinfo.c_class = visualClass; -#else - lvinfoTemplate.vinfo.class = visualClass; -#endif - lvinfoTemplate.layer = layer; - lvinfo = __glutXGetLayerVisualInfo(dpy, - VisualScreenMask | VisualDepthMask | - VisualClassMask | VisualLayerMask, - &lvinfoTemplate, &nitems); - if (lvinfo != NULL && nitems > 0) { - *lvinfo_return = *lvinfo; - return 1; - } else - return 0; -} -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/layerutil.h b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/layerutil.h deleted file mode 100644 index 8f580afe3b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/layerutil.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef __layerutil_h__ -#define __layerutil_h__ - -/* Copyright (c) Mark J. Kilgard, 1993, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -/* Based on XLayerUtil.h: Revision: 1.3 */ - -#ifdef __VMS -#include -#endif - -#if !defined(_WIN32) -#include -#include -#include -#endif /* !_WIN32 */ - -/* Transparent type values */ -/* None 0 */ -#define TransparentPixel 1 -#define TransparentMask 2 - -/* layered visual info template flags */ -#define VisualLayerMask 0x200 -#define VisualTransparentType 0x400 -#define VisualTransparentValue 0x800 -#define VisualAllLayerMask 0xFFF - -/* layered visual info structure */ -typedef struct _XLayerVisualInfo { - XVisualInfo vinfo; - long layer; - long type; - unsigned long value; -} XLayerVisualInfo; - -/* SERVER_OVERLAY_VISUALS property element */ -typedef struct _OverlayInfo { - /* Avoid 64-bit portability problems by being careful to use - longs due to the way XGetWindowProperty is specified. Note - that these parameters are passed as CARD32s over X - protocol. */ - long overlay_visual; - long transparent_type; - long value; - long layer; -} OverlayInfo; - -extern int __glutGetTransparentPixel(Display *, XVisualInfo *); -extern XLayerVisualInfo *__glutXGetLayerVisualInfo(Display *, - long, XLayerVisualInfo *, int *); -extern Status __glutXMatchLayerVisualInfo(Display *, - int, int, int, int, XLayerVisualInfo *); - -#endif /* __layerutil_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/mms_depend b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/mms_depend deleted file mode 100644 index 98f87c29e2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/mms_depend +++ /dev/null @@ -1,72 +0,0 @@ -# DO NOT DELETE - -glut_8x13.obj : glutbitmap.h [---.include.gl]gl.h -glut_9x15.obj : glutbitmap.h [---.include.gl]gl.h -glut_bitmap.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_bitmap.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -glut_bitmap.obj : glutbitmap.h -glut_bwidth.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_bwidth.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -glut_bwidth.obj : glutbitmap.h -glut_cindex.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_cindex.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -glut_cindex.obj : layerutil.h -glut_cursor.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_cursor.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -glut_dials.obj : glutint.h [---.include.gl]glx.h [---.include.gl]gl.h -glut_dials.obj : [---.include.gl]xmesa.h [---.include.gl]glut.h [---.include.gl]glu.h -glut_dstr.obj : glutint.h [---.include.gl]glx.h [---.include.gl]gl.h -glut_dstr.obj : [---.include.gl]xmesa.h [---.include.gl]glut.h [---.include.gl]glu.h -glut_event.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_event.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -glut_ext.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_ext.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -glut_fullscrn.obj : glutint.h [---.include.gl]glx.h [---.include.gl]gl.h -glut_fullscrn.obj : [---.include.gl]xmesa.h [---.include.gl]glut.h -glut_fullscrn.obj : [---.include.gl]glu.h -glut_get.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_get.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -glut_hel10.obj : glutbitmap.h [---.include.gl]gl.h -glut_hel12.obj : glutbitmap.h [---.include.gl]gl.h -glut_hel18.obj : glutbitmap.h [---.include.gl]gl.h -glut_init.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_init.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -glut_menu.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_menu.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h layerutil.h -glut_mesa.obj : glutint.h [---.include.gl]glx.h [---.include.gl]gl.h -glut_mesa.obj : [---.include.gl]xmesa.h [---.include.gl]glut.h [---.include.gl]glu.h -glut_modifier.obj : glutint.h [---.include.gl]glx.h [---.include.gl]gl.h -glut_modifier.obj : [---.include.gl]xmesa.h [---.include.gl]glut.h -glut_modifier.obj : [---.include.gl]glu.h -glut_mroman.obj : glutstroke.h -glut_overlay.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_overlay.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -glut_overlay.obj : layerutil.h -glut_roman.obj : glutstroke.h -glut_shapes.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_shapes.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -glut_space.obj : glutint.h [---.include.gl]glx.h [---.include.gl]gl.h -glut_space.obj : [---.include.gl]xmesa.h [---.include.gl]glut.h [---.include.gl]glu.h -glut_stroke.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_stroke.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -glut_stroke.obj : glutstroke.h -glut_swidth.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_swidth.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -glut_swidth.obj : glutstroke.h -glut_tablet.obj : glutint.h [---.include.gl]glx.h [---.include.gl]gl.h -glut_tablet.obj : [---.include.gl]xmesa.h [---.include.gl]glut.h [---.include.gl]glu.h -glut_teapot.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_tr10.obj : glutbitmap.h [---.include.gl]gl.h -glut_tr24.obj : glutbitmap.h [---.include.gl]gl.h -glut_util.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_util.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -glut_vidresize.obj : [---.include.gl]glx.h [---.include.gl]gl.h -glut_vidresize.obj : [---.include.gl]xmesa.h glutint.h [---.include.gl]glut.h -glut_vidresize.obj : [---.include.gl]glu.h -glut_warp.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_warp.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -glut_win.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_win.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -glut_winmisc.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h -glut_winmisc.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h -layerutil.obj : layerutil.h diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/stroke.h b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/stroke.h deleted file mode 100644 index fc29680bea..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/stroke.h +++ /dev/null @@ -1,134 +0,0 @@ -/* $XConsortium: wfont.h,v 5.1 91/02/16 09:46:37 rws Exp $ */ - -/***************************************************************** -Copyright (c) 1989,1990, 1991 by Sun Microsystems, Inc. and the X Consortium. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the names of Sun Microsystems, -the X Consortium, and MIT not be used in advertising or publicity -pertaining to distribution of the software without specific, written -prior permission. - -SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT -SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifndef WFONT_INCLUDED -#define WFONT_INCLUDED - -#define WFONT_MAGIC 0x813 -#define WFONT_MAGIC_PLUS 0x715 -#define WFONT_MAGIC_PEX 0x70686e74 -#define START_PROPS 0x100 -#define START_DISPATCH(_num_props) (START_PROPS + 160 * _num_props) -#define START_PATH(_num_ch_, _num_props) (START_DISPATCH(_num_props) + sizeof(Dispatch) * _num_ch_) -#define NUM_DISPATCH 128 - -typedef struct { - unsigned short x; - unsigned short y; -} Path_point2dpx; - -typedef struct { - float x; - float y; -} Path_point2df; - -typedef struct { - int x; - int y; - int z; -} Path_point3di; - -typedef struct { - float x; - float y; - float z; -} Path_point3df; - -typedef struct { - float x; - float y; - float z; - float w; -} Path_point4df; - -typedef union { - Path_point2dpx *pt2dpx; - Path_point2df *pt2df; - Path_point3di *pt3di; - Path_point3df *pt3df; - Path_point4df *pt4df; -} Path_pt_ptr; - -typedef enum { - PATH_2DF, - PATH_2DPX, - PATH_3DF, - PATH_3DI, - PATH_4DF -} Path_type; - -typedef struct { - int n_pts; /* number of points in the subpath */ - Path_pt_ptr pts; /* pointer to them */ - int closed; /* true if the subpath is closed */ - int dcmp_flag; /* flag for pgon dcmp, pgon type - * and dcmped triangle type */ -} Path_subpath; - -typedef struct { - Path_type type; /* type of vertices in this path */ - int n_subpaths; /* number of subpaths */ - int n_vertices; /* total number of vertices */ - Path_subpath *subpaths; /* array of subpaths */ -} Path; - -typedef Path *Path_handle; - -typedef struct { - char propname[80]; /* font property name */ - char propvalue[80]; /* font property value */ -} Property; - -typedef struct { - int magic; /* magic number */ - char name[80]; /* name of this font */ - float top, /* extreme values */ - bottom, max_width; - int num_ch; /* no. of fonts in the set */ - int num_props; /* no. of font properties */ - Property *properties; /* array of properties */ -} Font_header; - -typedef struct { - float center, /* center of the character */ - right; /* right edge */ - long offset; /* offset in the file of the character - * * description */ -} Dispatch; - -typedef struct { - float center, right; - Path strokes; -} Ch_font; - -typedef struct { - char name[80]; - float top, bottom, max_width; - int num_ch; /* # characters in the font */ - Ch_font **ch_data; -} Phg_font; - -#endif /*WFONT_INCLUDED */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_glx.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_glx.c deleted file mode 100644 index ecfff44b93..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_glx.c +++ /dev/null @@ -1,256 +0,0 @@ - -/* Copyright (c) Nate Robins, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include "glutint.h" -#include "win32_glx.h" - -/* global current HDC */ -extern HDC XHDC; - -GLXContext -glXCreateContext(Display * display, XVisualInfo * visinfo, - GLXContext share, Bool direct) -{ - /* KLUDGE: GLX really expects a display pointer to be passed - in as the first parameter, but Win32 needs an HDC instead, - so BE SURE that the global XHDC is set before calling this - routine. */ - HGLRC context; - - context = CreateContext(XHDC); - -#if 0 - /* XXX GLUT doesn't support it now, so don't worry about display list - and texture object sharing. */ - if (share) { - wglShareLists(share, context); - } -#endif - - /* Since direct rendering is implicit, the direct flag is - ignored. */ - - return context; -} - -int -glXGetConfig(Display * display, XVisualInfo * visual, int attrib, int *value) -{ - if (!visual) - return GLX_BAD_VISUAL; - - switch (attrib) { - case GLX_USE_GL: - if (visual->dwFlags & (PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW)) { - /* XXX Brad's Matrix Millenium II has problems creating - color index windows in 24-bit mode (lead to GDI crash) - and 32-bit mode (lead to black window). The cColorBits - filed of the PIXELFORMATDESCRIPTOR returned claims to - have 24 and 32 bits respectively of color indices. 2^24 - and 2^32 are ridiculously huge writable colormaps. - Assume that if we get back a color index - PIXELFORMATDESCRIPTOR with 24 or more bits, the - PIXELFORMATDESCRIPTOR doesn't really work and skip it. - -mjk */ - if (visual->iPixelType == PFD_TYPE_COLORINDEX - && visual->cColorBits >= 24) { - *value = 0; - } else { - *value = 1; - } - } else { - *value = 0; - } - break; - case GLX_BUFFER_SIZE: - /* KLUDGE: if we're RGBA, return the number of bits/pixel, - otherwise, return 8 (we guessed at 256 colors in CI - mode). */ - if (visual->iPixelType == PFD_TYPE_RGBA) - *value = visual->cColorBits; - else - *value = 8; - break; - case GLX_LEVEL: - /* The bReserved flag of the pfd contains the - overlay/underlay info. */ - *value = visual->bReserved; - break; - case GLX_RGBA: - *value = visual->iPixelType == PFD_TYPE_RGBA; - break; - case GLX_DOUBLEBUFFER: - *value = visual->dwFlags & PFD_DOUBLEBUFFER; - break; - case GLX_STEREO: - *value = visual->dwFlags & PFD_STEREO; - break; - case GLX_AUX_BUFFERS: - *value = visual->cAuxBuffers; - break; - case GLX_RED_SIZE: - *value = visual->cRedBits; - break; - case GLX_GREEN_SIZE: - *value = visual->cGreenBits; - break; - case GLX_BLUE_SIZE: - *value = visual->cBlueBits; - break; - case GLX_ALPHA_SIZE: - *value = visual->cAlphaBits; - break; - case GLX_DEPTH_SIZE: - *value = visual->cDepthBits; - break; - case GLX_STENCIL_SIZE: - *value = visual->cStencilBits; - break; - case GLX_ACCUM_RED_SIZE: - *value = visual->cAccumRedBits; - break; - case GLX_ACCUM_GREEN_SIZE: - *value = visual->cAccumGreenBits; - break; - case GLX_ACCUM_BLUE_SIZE: - *value = visual->cAccumBlueBits; - break; - case GLX_ACCUM_ALPHA_SIZE: - *value = visual->cAccumAlphaBits; - break; - default: - return GLX_BAD_ATTRIB; - } - return 0; -} - -XVisualInfo * -glXChooseVisual(Display * display, int screen, int *attribList) -{ - /* KLUDGE: since we need the HDC, MAKE SURE to set XHDC - before calling this routine. */ - - int *p = attribList; - int pf; - PIXELFORMATDESCRIPTOR pfd; - PIXELFORMATDESCRIPTOR *match = NULL; - int stereo = 0; - - /* Avoid seg-faults. */ - if (!p) - return NULL; - - memset(&pfd, 0, sizeof(PIXELFORMATDESCRIPTOR)); - pfd.nSize = (sizeof(PIXELFORMATDESCRIPTOR)); - pfd.nVersion = 1; - - /* Defaults. */ - pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW; - pfd.iPixelType = PFD_TYPE_COLORINDEX; - pfd.cColorBits = 32; - pfd.cDepthBits = 0; - - while (*p) { - switch (*p) { - case GLX_USE_GL: - pfd.dwFlags |= PFD_SUPPORT_OPENGL; - break; - case GLX_BUFFER_SIZE: - pfd.cColorBits = *(++p); - break; - case GLX_LEVEL: - /* the bReserved flag of the pfd contains the - overlay/underlay info. */ - pfd.bReserved = *(++p); - break; - case GLX_RGBA: - pfd.iPixelType = PFD_TYPE_RGBA; - break; - case GLX_DOUBLEBUFFER: - pfd.dwFlags |= PFD_DOUBLEBUFFER; - break; - case GLX_STEREO: - stereo = 1; - pfd.dwFlags |= PFD_STEREO; - break; - case GLX_AUX_BUFFERS: - pfd.cAuxBuffers = *(++p); - break; - case GLX_RED_SIZE: - pfd.cRedBits = 8; /* Try to get the maximum. */ - ++p; - break; - case GLX_GREEN_SIZE: - pfd.cGreenBits = 8; - ++p; - break; - case GLX_BLUE_SIZE: - pfd.cBlueBits = 8; - ++p; - break; - case GLX_ALPHA_SIZE: - pfd.cAlphaBits = 8; - ++p; - break; - case GLX_DEPTH_SIZE: - pfd.cDepthBits = 32; - ++p; - break; - case GLX_STENCIL_SIZE: - pfd.cStencilBits = *(++p); - break; - case GLX_ACCUM_RED_SIZE: - case GLX_ACCUM_GREEN_SIZE: - case GLX_ACCUM_BLUE_SIZE: - case GLX_ACCUM_ALPHA_SIZE: - /* I believe that WGL only used the cAccumRedBits, - cAccumBlueBits, cAccumGreenBits, and cAccumAlphaBits fields - when returning info about the accumulation buffer precision. - Only cAccumBits is used for requesting an accumulation - buffer. */ - pfd.cAccumBits = 1; - ++p; - break; - } - ++p; - } - - /* Let Win32 choose one for us. */ - pf = ChoosePixelFormat(XHDC, &pfd); - if (pf > 0) { - match = (PIXELFORMATDESCRIPTOR *) malloc(sizeof(PIXELFORMATDESCRIPTOR)); - DescribePixelFormat(XHDC, pf, sizeof(PIXELFORMATDESCRIPTOR), match); - - /* ChoosePixelFormat is dumb in that it will return a pixel - format that doesn't have stereo even if it was requested - so we need to make sure that if stereo was selected, we - got it. */ - if (stereo) { - if (!(match->dwFlags & PFD_STEREO)) { - free(match); - return NULL; - } - } - /* XXX Brad's Matrix Millenium II has problems creating - color index windows in 24-bit mode (lead to GDI crash) - and 32-bit mode (lead to black window). The cColorBits - filed of the PIXELFORMATDESCRIPTOR returned claims to - have 24 and 32 bits respectively of color indices. 2^24 - and 2^32 are ridiculously huge writable colormaps. - Assume that if we get back a color index - PIXELFORMATDESCRIPTOR with 24 or more bits, the - PIXELFORMATDESCRIPTOR doesn't really work and skip it. - -mjk */ - if (match->iPixelType == PFD_TYPE_COLORINDEX - && match->cColorBits >= 24) { - free(match); - return NULL; - } - } - return match; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_glx.h b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_glx.h deleted file mode 100644 index d3630e7a1e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_glx.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef __win32_glx_h__ -#define __win32_glx_h__ - -/* Copyright (c) Nate Robins, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "win32_x11.h" - -/* Type definitions (conversions). */ -typedef HGLRC GLXContext; - -#define GLX_USE_GL 1 /* support GLX rendering */ -#define GLX_BUFFER_SIZE 2 /* depth of the color buffer */ -#define GLX_LEVEL 3 /* level in plane stacking */ -#define GLX_RGBA 4 /* true if RGBA mode */ -#define GLX_DOUBLEBUFFER 5 /* double buffering supported */ -#define GLX_STEREO 6 /* stereo buffering supported */ -#define GLX_AUX_BUFFERS 7 /* number of aux buffers */ -#define GLX_RED_SIZE 8 /* number of red component bits */ -#define GLX_GREEN_SIZE 9 /* number of green component bits */ -#define GLX_BLUE_SIZE 10 /* number of blue component bits */ -#define GLX_ALPHA_SIZE 11 /* number of alpha component bits */ -#define GLX_DEPTH_SIZE 12 /* number of depth bits */ -#define GLX_STENCIL_SIZE 13 /* number of stencil bits */ -#define GLX_ACCUM_RED_SIZE 14 /* number of red accum bits */ -#define GLX_ACCUM_GREEN_SIZE 15 /* number of green accum bits */ -#define GLX_ACCUM_BLUE_SIZE 16 /* number of blue accum bits */ -#define GLX_ACCUM_ALPHA_SIZE 17 /* number of alpha accum bits */ - -#define GLX_BAD_ATTRIB 2 -#define GLX_BAD_VISUAL 4 - -/* Functions emulated by macros. */ - -#define glXDestroyContext(display, context) \ - wglDeleteContext(context) - -/* Function prototypes. */ - -extern GLXContext glXCreateContext( - Display* display, - XVisualInfo* visinfo, - GLXContext share, - Bool direct); -extern int glXGetConfig( - Display* display, - XVisualInfo* visual, - int attrib, - int* value); -extern XVisualInfo* glXChooseVisual( - Display* display, - int screen, - int* attribList); - -#endif /* __win32_glx_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_menu.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_menu.c deleted file mode 100644 index 5ce264dcdb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_menu.c +++ /dev/null @@ -1,531 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */ -/* Copyright (c) Nate Robins, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -/* This file completely re-implements glut_menu.c and glut_menu2.c - for Win32. Note that neither glut_menu.c nor glut_menu2.c are - compiled into Win32 GLUT. */ - -#include -#include -#include -#include -#include - -#include "glutint.h" - -void (GLUTCALLBACK *__glutMenuStatusFunc) (int, int, int); -GLUTmenu *__glutMappedMenu; -GLUTwindow *__glutMenuWindow; -GLUTmenuItem *__glutItemSelected; -unsigned __glutMenuButton; - -static GLUTmenu **menuList = NULL; -static int menuListSize = 0; -static UINT uniqueMenuHandler = 1; - -/* DEPRICATED, use glutMenuStatusFunc instead. */ -void GLUTAPIENTRY -glutMenuStateFunc(GLUTmenuStateCB menuStateFunc) -{ - __glutMenuStatusFunc = (GLUTmenuStatusCB) menuStateFunc; -} - -void GLUTAPIENTRY -glutMenuStatusFunc(GLUTmenuStatusCB menuStatusFunc) -{ - __glutMenuStatusFunc = menuStatusFunc; -} - -void -__glutSetMenu(GLUTmenu * menu) -{ - __glutCurrentMenu = menu; -} - -static void -unmapMenu(GLUTmenu * menu) -{ - if (menu->cascade) { - unmapMenu(menu->cascade); - menu->cascade = NULL; - } - menu->anchor = NULL; - menu->highlighted = NULL; -} - -void -__glutFinishMenu(Window win, int x, int y) -{ - - unmapMenu(__glutMappedMenu); - - /* XXX Put in a GdiFlush just in case. Probably unnecessary. -mjk */ - GdiFlush(); - - if (__glutMenuStatusFunc) { - __glutSetWindow(__glutMenuWindow); - __glutSetMenu(__glutMappedMenu); - - /* Setting __glutMappedMenu to NULL permits operations that - change menus or destroy the menu window again. */ - __glutMappedMenu = NULL; - - __glutMenuStatusFunc(GLUT_MENU_NOT_IN_USE, x, y); - } - /* Setting __glutMappedMenu to NULL permits operations that - change menus or destroy the menu window again. */ - __glutMappedMenu = NULL; - - /* If an item is selected and it is not a submenu trigger, - generate menu callback. */ - if (__glutItemSelected && !__glutItemSelected->isTrigger) { - __glutSetWindow(__glutMenuWindow); - /* When menu callback is triggered, current menu should be - set to the callback menu. */ - __glutSetMenu(__glutItemSelected->menu); - __glutItemSelected->menu->select(__glutItemSelected->value); - } - __glutMenuWindow = NULL; -} - -static void -mapMenu(GLUTmenu * menu, int x, int y) -{ - TrackPopupMenu((HMENU) menu->win, TPM_LEFTALIGN | - (__glutMenuButton == TPM_RIGHTBUTTON) ? TPM_RIGHTBUTTON : TPM_LEFTBUTTON, - x, y, 0, __glutCurrentWindow->win, NULL); -} - -void -__glutStartMenu(GLUTmenu * menu, GLUTwindow * window, - int x, int y, int x_win, int y_win) -{ - assert(__glutMappedMenu == NULL); - __glutMappedMenu = menu; - __glutMenuWindow = window; - __glutItemSelected = NULL; - if (__glutMenuStatusFunc) { - __glutSetMenu(menu); - __glutSetWindow(window); - __glutMenuStatusFunc(GLUT_MENU_IN_USE, x_win, y_win); - } - mapMenu(menu, x, y); -} - -GLUTmenuItem * -__glutGetUniqueMenuItem(GLUTmenu * menu, UINT unique) -{ - GLUTmenuItem *item; - int i; - - i = menu->num; - item = menu->list; - while (item) { - if (item->unique == unique) { - return item; - } - if (item->isTrigger) { - GLUTmenuItem *subitem; - subitem = __glutGetUniqueMenuItem(menuList[item->value], unique); - if (subitem) { - return subitem; - } - } - i--; - item = item->next; - } - return NULL; -} - -GLUTmenuItem * -__glutGetMenuItem(GLUTmenu * menu, Window win, int *which) -{ - GLUTmenuItem *item; - int i; - - i = menu->num; - item = menu->list; - while (item) { - if (item->win == win) { - *which = i; - return item; - } - if (item->isTrigger) { - GLUTmenuItem *subitem; - - subitem = __glutGetMenuItem(menuList[item->value], - win, which); - if (subitem) { - return subitem; - } - } - i--; - item = item->next; - } - return NULL; -} - -GLUTmenu * -__glutGetMenu(Window win) -{ - GLUTmenu *menu; - - menu = __glutMappedMenu; - while (menu) { - if (win == menu->win) { - return menu; - } - menu = menu->cascade; - } - return NULL; -} - -GLUTmenu * -__glutGetMenuByNum(int menunum) -{ - if (menunum < 1 || menunum > menuListSize) { - return NULL; - } - return menuList[menunum - 1]; -} - -static int -getUnusedMenuSlot(void) -{ - int i; - - /* Look for allocated, unused slot. */ - for (i = 0; i < menuListSize; i++) { - if (!menuList[i]) { - return i; - } - } - /* Allocate a new slot. */ - menuListSize++; - if (menuList) { - menuList = (GLUTmenu **) - realloc(menuList, menuListSize * sizeof(GLUTmenu *)); - } else { - /* XXX Some realloc's do not correctly perform a malloc - when asked to perform a realloc on a NULL pointer, - though the ANSI C library spec requires this. */ - menuList = (GLUTmenu **) malloc(sizeof(GLUTmenu *)); - } - if (!menuList) { - __glutFatalError("out of memory."); - } - menuList[menuListSize - 1] = NULL; - return menuListSize - 1; -} - -static void -menuModificationError(void) -{ - /* XXX Remove the warning after GLUT 3.0. */ - __glutWarning("The following is a new check for GLUT 3.0; update your code."); - __glutFatalError("menu manipulation not allowed while menus in use."); -} - -int GLUTAPIENTRY -glutCreateMenu(GLUTselectCB selectFunc) -{ - GLUTmenu *menu; - int menuid; - - if (__glutMappedMenu) { - menuModificationError(); - } - menuid = getUnusedMenuSlot(); - menu = (GLUTmenu *) malloc(sizeof(GLUTmenu)); - if (!menu) { - __glutFatalError("out of memory."); - } - menu->id = menuid; - menu->num = 0; - menu->submenus = 0; - menu->select = selectFunc; - menu->list = NULL; - menu->cascade = NULL; - menu->highlighted = NULL; - menu->anchor = NULL; - menu->win = (HWND) CreatePopupMenu(); - menuList[menuid] = menu; - __glutSetMenu(menu); - return menuid + 1; -} - -int GLUTAPIENTRY -__glutCreateMenuWithExit(GLUTselectCB selectFunc, void (__cdecl *exitfunc)(int)) -{ - __glutExitFunc = exitfunc; - return glutCreateMenu(selectFunc); -} - -void GLUTAPIENTRY -glutDestroyMenu(int menunum) -{ - GLUTmenu *menu = __glutGetMenuByNum(menunum); - GLUTmenuItem *item, *next; - - if (__glutMappedMenu) { - menuModificationError(); - } - assert(menu->id == menunum - 1); - DestroyMenu( (HMENU) menu->win); - menuList[menunum - 1] = NULL; - /* free all menu entries */ - item = menu->list; - while (item) { - assert(item->menu == menu); - next = item->next; - free(item->label); - free(item); - item = next; - } - if (__glutCurrentMenu == menu) { - __glutCurrentMenu = NULL; - } - free(menu); -} - -int GLUTAPIENTRY -glutGetMenu(void) -{ - if (__glutCurrentMenu) { - return __glutCurrentMenu->id + 1; - } else { - return 0; - } -} - -void GLUTAPIENTRY -glutSetMenu(int menuid) -{ - GLUTmenu *menu; - - if (menuid < 1 || menuid > menuListSize) { - __glutWarning("glutSetMenu attempted on bogus menu."); - return; - } - menu = menuList[menuid - 1]; - if (!menu) { - __glutWarning("glutSetMenu attempted on bogus menu."); - return; - } - __glutSetMenu(menu); -} - -static void -setMenuItem(GLUTmenuItem * item, const char *label, - int value, Bool isTrigger) -{ - GLUTmenu *menu; - - menu = item->menu; - item->label = __glutStrdup(label); - if (!item->label) { - __glutFatalError("out of memory."); - } - item->isTrigger = isTrigger; - item->len = (int) strlen(label); - item->value = value; - item->unique = uniqueMenuHandler++; - if (isTrigger) { - AppendMenu((HMENU) menu->win, MF_POPUP, (UINT)item->win, label); - } else { - AppendMenu((HMENU) menu->win, MF_STRING, item->unique, label); - } -} - -void GLUTAPIENTRY -glutAddMenuEntry(const char *label, int value) -{ - GLUTmenuItem *entry; - - if (__glutMappedMenu) { - menuModificationError(); - } - entry = (GLUTmenuItem *) malloc(sizeof(GLUTmenuItem)); - if (!entry) { - __glutFatalError("out of memory."); - } - entry->menu = __glutCurrentMenu; - setMenuItem(entry, label, value, FALSE); - __glutCurrentMenu->num++; - entry->next = __glutCurrentMenu->list; - __glutCurrentMenu->list = entry; -} - -void GLUTAPIENTRY -glutAddSubMenu(const char *label, int menu) -{ - GLUTmenuItem *submenu; - GLUTmenu *popupmenu; - - if (__glutMappedMenu) { - menuModificationError(); - } - submenu = (GLUTmenuItem *) malloc(sizeof(GLUTmenuItem)); - if (!submenu) { - __glutFatalError("out of memory."); - } - __glutCurrentMenu->submenus++; - submenu->menu = __glutCurrentMenu; - popupmenu = __glutGetMenuByNum(menu); - if (popupmenu) { - submenu->win = popupmenu->win; - } - setMenuItem(submenu, label, /* base 0 */ menu - 1, TRUE); - __glutCurrentMenu->num++; - submenu->next = __glutCurrentMenu->list; - __glutCurrentMenu->list = submenu; -} - -void GLUTAPIENTRY -glutChangeToMenuEntry(int num, const char *label, int value) -{ - GLUTmenuItem *item; - int i; - - if (__glutMappedMenu) { - menuModificationError(); - } - i = __glutCurrentMenu->num; - item = __glutCurrentMenu->list; - while (item) { - if (i == num) { - if (item->isTrigger) { - /* If changing a submenu trigger to a menu entry, we - need to account for submenus. */ - item->menu->submenus--; - /* Nuke the Win32 menu. */ - DestroyMenu((HMENU) item->win); - } - free(item->label); - - item->label = strdup(label); - if (!item->label) - __glutFatalError("out of memory"); - item->isTrigger = FALSE; - item->len = (int) strlen(label); - item->value = value; - item->unique = uniqueMenuHandler++; - ModifyMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1, - MF_BYPOSITION | MFT_STRING, item->unique, label); - - return; - } - i--; - item = item->next; - } - __glutWarning("Current menu has no %d item.", num); -} - -void GLUTAPIENTRY -glutChangeToSubMenu(int num, const char *label, int menu) -{ - GLUTmenu *popupmenu; - GLUTmenuItem *item; - int i; - - if (__glutMappedMenu) { - menuModificationError(); - } - i = __glutCurrentMenu->num; - item = __glutCurrentMenu->list; - while (item) { - if (i == num) { - if (!item->isTrigger) { - /* If changing a menu entry to as submenu trigger, we - need to account for submenus. */ - item->menu->submenus++; - item->win = (HWND) CreatePopupMenu(); - } - free(item->label); - - item->label = strdup(label); - if (!item->label) - __glutFatalError("out of memory"); - item->isTrigger = TRUE; - item->len = (int) strlen(label); - item->value = menu - 1; - item->unique = uniqueMenuHandler++; - popupmenu = __glutGetMenuByNum(menu); - if (popupmenu) - item->win = popupmenu->win; - ModifyMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1, - MF_BYPOSITION | MF_POPUP, (UINT) item->win, label); - return; - } - i--; - item = item->next; - } - __glutWarning("Current menu has no %d item.", num); -} - -void GLUTAPIENTRY -glutRemoveMenuItem(int num) -{ - GLUTmenuItem *item, **prev; - int i; - - if (__glutMappedMenu) { - menuModificationError(); - } - i = __glutCurrentMenu->num; - prev = &__glutCurrentMenu->list; - item = __glutCurrentMenu->list; - while (item) { - if (i == num) { - /* Found the menu item in list to remove. */ - __glutCurrentMenu->num--; - - /* Patch up menu's item list. */ - *prev = item->next; - - RemoveMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1, MF_BYPOSITION); - - free(item->label); - free(item); - return; - } - i--; - prev = &item->next; - item = item->next; - } - __glutWarning("Current menu has no %d item.", num); -} - -void GLUTAPIENTRY -glutAttachMenu(int button) -{ - if (__glutCurrentWindow == __glutGameModeWindow) { - __glutWarning("cannot attach menus in game mode."); - return; - } - if (__glutMappedMenu) { - menuModificationError(); - } - if (__glutCurrentWindow->menu[button] < 1) { - __glutCurrentWindow->buttonUses++; - } - __glutCurrentWindow->menu[button] = __glutCurrentMenu->id + 1; -} - -void GLUTAPIENTRY -glutDetachMenu(int button) -{ - if (__glutMappedMenu) { - menuModificationError(); - } - if (__glutCurrentWindow->menu[button] > 0) { - __glutCurrentWindow->buttonUses--; - __glutCurrentWindow->menu[button] = 0; - } -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_util.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_util.c deleted file mode 100644 index becd823a40..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_util.c +++ /dev/null @@ -1,120 +0,0 @@ - -/* Copyright (c) Nate Robins, 1997. */ - -/* portions Copyright (c) Mark Kilgard, 1997, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - - -#include "glutint.h" -#include "glutstroke.h" -#include "glutbitmap.h" -#include - -/* The following added by Paul Garceau */ -#if defined(__MINGW32__) -#include -#include -struct timeval; -#endif - -extern StrokeFontRec glutStrokeRoman, glutStrokeMonoRoman; -extern BitmapFontRec glutBitmap8By13, glutBitmap9By15, glutBitmapTimesRoman10, glutBitmapTimesRoman24, glutBitmapHelvetica10, glutBitmapHelvetica12, glutBitmapHelvetica18; - -#ifndef __CYGWIN32__ -int -gettimeofday(struct timeval* tp, void* tzp) -{ - struct timeb tb; - - ftime(&tb); - tp->tv_sec = tb.time; - tp->tv_usec = tb.millitm * 1000; - - /* 0 indicates that the call succeeded. */ - return 0; -} -#endif - -/* To get around the fact that Microsoft DLLs only allow functions - to be exported and now data addresses (as Unix DSOs support), the - GLUT API constants such as GLUT_STROKE_ROMAN have to get passed - through a case statement to get mapped to the actual data structure - address. */ -void* -__glutFont(void *font) -{ - switch((int)font) { - case (int)GLUT_STROKE_ROMAN: - return &glutStrokeRoman; - case (int)GLUT_STROKE_MONO_ROMAN: - return &glutStrokeMonoRoman; - case (int)GLUT_BITMAP_9_BY_15: - return &glutBitmap9By15; - case (int)GLUT_BITMAP_8_BY_13: - return &glutBitmap8By13; - case (int)GLUT_BITMAP_TIMES_ROMAN_10: - return &glutBitmapTimesRoman10; - case (int)GLUT_BITMAP_TIMES_ROMAN_24: - return &glutBitmapTimesRoman24; - case (int)GLUT_BITMAP_HELVETICA_10: - return &glutBitmapHelvetica10; - case (int)GLUT_BITMAP_HELVETICA_12: - return &glutBitmapHelvetica12; - case (int)GLUT_BITMAP_HELVETICA_18: - return &glutBitmapHelvetica18; - } - __glutFatalError("font not found."); - /* NOTREACHED */ - return NULL; /* MSVC compiler complains if there is no return at all */ -} - -int -__glutGetTransparentPixel(Display * dpy, XVisualInfo * vinfo) -{ - /* the transparent pixel on Win32 is always index number 0. So if - we put this routine in this file, we can avoid compiling the - whole of layerutil.c which is where this routine normally comes - from. */ - return 0; -} - -void -__glutAdjustCoords(Window parent, int* x, int* y, int* width, int* height) -{ - RECT rect; - - /* adjust the window rectangle because Win32 thinks that the x, y, - width & height are the WHOLE window (including decorations), - whereas GLUT treats the x, y, width & height as only the CLIENT - area of the window. */ - rect.left = *x; rect.top = *y; - rect.right = *x + *width; rect.bottom = *y + *height; - - /* must adjust the coordinates according to the correct style - because depending on the style, there may or may not be - borders. */ - AdjustWindowRect(&rect, WS_CLIPSIBLINGS | WS_CLIPCHILDREN | - (parent ? WS_CHILD : WS_OVERLAPPEDWINDOW), - FALSE); - /* FALSE in the third parameter = window has no menu bar */ - - /* readjust if the x and y are offscreen */ - if(rect.left < 0) { - *x = 0; - } else { - *x = rect.left; - } - - if(rect.top < 0) { - *y = 0; - } else { - *y = rect.top; - } - - *width = rect.right - rect.left; /* adjusted width */ - *height = rect.bottom - rect.top; /* adjusted height */ -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_winproc.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_winproc.c deleted file mode 100644 index a54bac75fa..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_winproc.c +++ /dev/null @@ -1,784 +0,0 @@ - -/* Copyright (c) Nate Robins, 1997. */ -/* portions Copyright (c) Mark Kilgard, 1997, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - - -#include "glutint.h" -#include - -#if defined(_WIN32) && !defined(__CYGWIN32__) -#include /* Win32 Multimedia API header. */ -#endif - -extern unsigned __glutMenuButton; -extern GLUTidleCB __glutIdleFunc; -extern GLUTtimer *__glutTimerList; -extern GLUTmenuItem *__glutGetUniqueMenuItem(GLUTmenu * menu, int unique); -static HMENU __glutHMenu; - -void -updateWindowState(GLUTwindow *window, int visState) -{ - GLUTwindow* child; - - /* XXX shownState and visState are the same in Win32. */ - window->shownState = visState; - if (visState != window->visState) { - if (window->windowStatus) { - window->visState = visState; - __glutSetWindow(window); - window->windowStatus(visState); - } - } - /* Since Win32 only sends an activate for the toplevel window, - update the visibility for all the child windows. */ - child = window->children; - while (child) { - updateWindowState(child, visState); - child = child->siblings; - } -} - -LONG WINAPI -__glutWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - POINT point; /* Point structure. */ - PAINTSTRUCT ps; /* Paint structure. */ - LPMINMAXINFO minmax; /* Minimum/maximum info structure. */ - GLUTwindow* window; /* GLUT window associated with message. */ - GLUTmenu* menu; /* GLUT menu associated with message. */ - int x, y, width, height, key; - int button = -1; - - switch(msg) { - case WM_CREATE: - return 0; - case WM_CLOSE: - if (__glutExitFunc) { - __glutExitFunc(0); - } - exit(0); - break; -#if 0 - case WM_DESTROY: - /* XXX NVidia's NT OpenGL can have problems closing down - its OpenGL internal data structures if we just allow - the process to terminate without unbinding and deleting - the windows context. Apparently, DirectDraw unloads - before OPENGL32.DLL in the close down sequence, but - NVidia's NT OpenGL needs DirectDraw to close down its - data structures. */ - window = __glutGetWindow(hwnd); - if (window) { - if (window->ctx) { - wglMakeCurrent(NULL, NULL); - wglDeleteContext(window->ctx); - } - } - return 0; -#endif - case WM_PAINT: - window = __glutGetWindow(hwnd); - if (window) { - BeginPaint(hwnd, &ps); /* Must have this for some Win32 reason. */ - EndPaint(hwnd, &ps); - if (window->win == hwnd) { - __glutPostRedisplay(window, GLUT_REPAIR_WORK); - } else if (window->overlay && window->overlay->win == hwnd) { - __glutPostRedisplay(window, GLUT_OVERLAY_REPAIR_WORK); - } - } - return 0; - - case WM_SYSKEYUP: - case WM_KEYUP: - window = __glutGetWindow(hwnd); - if (!window) { - break; - } - /* Win32 is dumb and sends these messages only to the parent - window. Therefore, find out if we're in a child window and - call the child windows keyboard callback if we are. */ - if (window->parent) { - GetCursorPos(&point); - ScreenToClient(hwnd, &point); - hwnd = ChildWindowFromPoint(hwnd, point); - window = __glutGetWindow(hwnd); - } - if (window->specialUp || window->keyboardUp) { - GetCursorPos(&point); - ScreenToClient(window->win, &point); - __glutSetWindow(window); - __glutModifierMask = 0; - if (GetKeyState(VK_SHIFT) < 0) /* < 0 = high order bit is on */ - __glutModifierMask |= ShiftMask; - if (GetKeyState(VK_SHIFT) < 0) /* < 0 = high order bit is on */ - __glutModifierMask |= ControlMask; - if (GetKeyState(VK_MENU) < 0) - __glutModifierMask |= Mod1Mask; - switch (wParam) { - /* *INDENT-OFF* */ - case VK_F1: key = GLUT_KEY_F1; break; - case VK_F2: key = GLUT_KEY_F2; break; - case VK_F3: key = GLUT_KEY_F3; break; - case VK_F4: key = GLUT_KEY_F4; break; - case VK_F5: key = GLUT_KEY_F5; break; - case VK_F6: key = GLUT_KEY_F6; break; - case VK_F7: key = GLUT_KEY_F7; break; - case VK_F8: key = GLUT_KEY_F8; break; - case VK_F9: key = GLUT_KEY_F9; break; - case VK_F10: key = GLUT_KEY_F10; break; - case VK_F11: key = GLUT_KEY_F11; break; - case VK_F12: key = GLUT_KEY_F12; break; - case VK_LEFT: key = GLUT_KEY_LEFT; break; - case VK_UP: key = GLUT_KEY_UP; break; - case VK_RIGHT: key = GLUT_KEY_RIGHT; break; - case VK_DOWN: key = GLUT_KEY_DOWN; break; - case VK_PRIOR: key = GLUT_KEY_PAGE_UP; break; - case VK_NEXT: key = GLUT_KEY_PAGE_DOWN; break; - case VK_HOME: key = GLUT_KEY_HOME; break; - case VK_END: key = GLUT_KEY_END; break; - case VK_INSERT: key = GLUT_KEY_INSERT; break; - case VK_DELETE: - /* Delete is an ASCII character. */ - if (window->keyboardUp) { - window->keyboardUp((unsigned char) 127, point.x, point.y); - } - return 0; - /* *INDENT-ON* */ - default: - if (window->keyboardUp) { - key = MapVirtualKey(wParam, 2); /* Map to ASCII. */ - if (isascii(key) && (key != 0)) { - - /* XXX Attempt to determine modified ASCII character - is quite incomplete. Digits, symbols, CapsLock, - Ctrl, and numeric keypad are all ignored. Fix this. */ - - if (!(__glutModifierMask & ShiftMask)) - key = tolower(key); - window->keyboardUp((unsigned char) key, point.x, point.y); - } - } - __glutModifierMask = (unsigned int) ~0; - return 0; - } - if (window->specialUp) { - window->specialUp(key, point.x, point.y); - } - __glutModifierMask = (unsigned int) ~0; - } - return 0; - - case WM_SYSCHAR: - case WM_CHAR: - window = __glutGetWindow(hwnd); - if (!window) { - break; - } - - /* Bit 30 of lParam is set if key already held down. If - we are ignoring auto repeated key strokes for the window, bail. */ - if (window->ignoreKeyRepeat && (lParam & (1 << 30)) ) { - break; - } - - /* Win32 is dumb and sends these messages only to the parent - window. Therefore, find out if we're in a child window and - call the child windows keyboard callback if we are. */ - if (window->parent) { - GetCursorPos(&point); - ScreenToClient(hwnd, &point); - hwnd = ChildWindowFromPoint(hwnd, point); - window = __glutGetWindow(hwnd); - } - if (window->keyboard) { - GetCursorPos(&point); - ScreenToClient(window->win, &point); - __glutSetWindow(window); - __glutModifierMask = 0; - if (GetKeyState(VK_SHIFT) < 0) /* < 0 = high order bit is on */ - __glutModifierMask |= ShiftMask; - if (GetKeyState(VK_CONTROL) < 0) - __glutModifierMask |= ControlMask; - if (GetKeyState(VK_MENU) < 0) - __glutModifierMask |= Mod1Mask; - window->keyboard((unsigned char)wParam, point.x, point.y); - __glutModifierMask = (unsigned int) ~0; - } - return 0; - - case WM_SYSKEYDOWN: - case WM_KEYDOWN: - window = __glutGetWindow(hwnd); - if (!window) { - break; - } - - /* Bit 30 of lParam is set if key already held down. If - we are ignoring auto repeated key strokes for the window, bail. */ - if (window->ignoreKeyRepeat && (lParam & (1 << 30)) ) { - break; - } - - /* Win32 is dumb and sends these messages only to the parent - window. Therefore, find out if we're in a child window and - call the child windows keyboard callback if we are. */ - if (window->parent) { - GetCursorPos(&point); - ScreenToClient(hwnd, &point); - hwnd = ChildWindowFromPoint(hwnd, point); - window = __glutGetWindow(hwnd); - } - if (window->special) { - switch (wParam) { - /* *INDENT-OFF* */ - /* function keys */ - case VK_F1: key = GLUT_KEY_F1; break; - case VK_F2: key = GLUT_KEY_F2; break; - case VK_F3: key = GLUT_KEY_F3; break; - case VK_F4: key = GLUT_KEY_F4; break; - case VK_F5: key = GLUT_KEY_F5; break; - case VK_F6: key = GLUT_KEY_F6; break; - case VK_F7: key = GLUT_KEY_F7; break; - case VK_F8: key = GLUT_KEY_F8; break; - case VK_F9: key = GLUT_KEY_F9; break; - case VK_F10: key = GLUT_KEY_F10; break; - case VK_F11: key = GLUT_KEY_F11; break; - case VK_F12: key = GLUT_KEY_F12; break; - /* directional keys */ - case VK_LEFT: key = GLUT_KEY_LEFT; break; - case VK_UP: key = GLUT_KEY_UP; break; - case VK_RIGHT: key = GLUT_KEY_RIGHT; break; - case VK_DOWN: key = GLUT_KEY_DOWN; break; - /* *INDENT-ON* */ - - case VK_PRIOR: - /* VK_PRIOR is Win32's Page Up */ - key = GLUT_KEY_PAGE_UP; - break; - case VK_NEXT: - /* VK_NEXT is Win32's Page Down */ - key = GLUT_KEY_PAGE_DOWN; - break; - case VK_HOME: - key = GLUT_KEY_HOME; - break; - case VK_END: - key = GLUT_KEY_END; - break; - case VK_INSERT: - key = GLUT_KEY_INSERT; - break; - case VK_DELETE: - goto handleDelete; - default: - goto defproc; - } - GetCursorPos(&point); - ScreenToClient(window->win, &point); - __glutSetWindow(window); - __glutModifierMask = 0; - if (GetKeyState(VK_SHIFT) < 0) /* < 0 = high order bit is on */ - __glutModifierMask |= ShiftMask; - if (GetKeyState(VK_CONTROL) < 0) - __glutModifierMask |= ControlMask; - if (GetKeyState(VK_MENU) < 0) - __glutModifierMask |= Mod1Mask; - window->special(key, point.x, point.y); - __glutModifierMask = (unsigned int) ~0; - } else if (window->keyboard) { - /* Specially handle any keys that match ASCII values but - do not generate Windows WM_SYSCHAR or WM_CHAR messages. */ - switch (wParam) { - case VK_DELETE: - handleDelete: - /* Delete is an ASCII character. */ - GetCursorPos(&point); - ScreenToClient(window->win, &point); - __glutSetWindow(window); - __glutModifierMask = 0; - if (GetKeyState(VK_SHIFT) < 0) /* < 0 = high order bit is on */ - __glutModifierMask |= ShiftMask; - if (GetKeyState(VK_CONTROL) < 0) - __glutModifierMask |= ControlMask; - if (GetKeyState(VK_MENU) < 0) - __glutModifierMask |= Mod1Mask; - window->keyboard((unsigned char) 127, point.x, point.y); - __glutModifierMask = (unsigned int) ~0; - return 0; - default: - /* Let the following WM_SYSCHAR or WM_CHAR message generate - the keyboard callback. */ - break; - } - } - return 0; - - case WM_LBUTTONDOWN: - button = GLUT_LEFT_BUTTON; - case WM_MBUTTONDOWN: - if (button < 0) - button = GLUT_MIDDLE_BUTTON; - case WM_RBUTTONDOWN: - if (button < 0) - button = GLUT_RIGHT_BUTTON; - - /* finish the menu if we get a button down message (user must have - cancelled the menu). */ - if (__glutMappedMenu) { - /* TODO: take this out once the menu on middle mouse stuff works - properly. */ - if (button == GLUT_MIDDLE_BUTTON) - return 0; - GetCursorPos(&point); - ScreenToClient(hwnd, &point); - __glutItemSelected = NULL; - __glutFinishMenu(hwnd, point.x, point.y); - return 0; - } - - /* set the capture so we can get mouse events outside the window */ - SetCapture(hwnd); - - /* Win32 doesn't return the same numbers as X does when the mouse - goes beyond the upper or left side of the window. roll the - Win32's 0..2^16 pointer co-ord range to 0 +/- 2^15. */ - x = LOWORD(lParam); - y = HIWORD(lParam); - if(x & 1 << 15) x -= (1 << 16); - if(y & 1 << 15) y -= (1 << 16); - - window = __glutGetWindow(hwnd); - if (window) { - menu = __glutGetMenuByNum(window->menu[button]); - if (menu) { - point.x = LOWORD(lParam); point.y = HIWORD(lParam); - ClientToScreen(window->win, &point); - __glutMenuButton = button == GLUT_RIGHT_BUTTON ? TPM_RIGHTBUTTON : - button == GLUT_LEFT_BUTTON ? TPM_LEFTBUTTON : - 0x0001; - __glutStartMenu(menu, window, point.x, point.y, x, y); - } else if (window->mouse) { - - __glutSetWindow(window); - __glutModifierMask = 0; - if (GetKeyState(VK_SHIFT) < 0) /* < 0 = high order bit is on. */ - __glutModifierMask |= ShiftMask; - if (GetKeyState(VK_CONTROL) < 0) - __glutModifierMask |= ControlMask; - if (GetKeyState(VK_MENU) < 0) - __glutModifierMask |= Mod1Mask; - window->mouse(button, GLUT_DOWN, x, y); - __glutModifierMask = (unsigned int)~0; - } else { - /* Stray mouse events. Ignore. */ - } - } - return 0; - - case WM_LBUTTONUP: - button = GLUT_LEFT_BUTTON; - case WM_MBUTTONUP: - if (button < 0) - button = GLUT_MIDDLE_BUTTON; - case WM_RBUTTONUP: - if (button < 0) - button = GLUT_RIGHT_BUTTON; - - /* Bail out if we're processing a menu. */ - if (__glutMappedMenu) { - GetCursorPos(&point); - ScreenToClient(hwnd, &point); - /* if we're getting the middle button up signal, then something - on the menu was selected. */ - if (button == GLUT_MIDDLE_BUTTON) { - return 0; - /* For some reason, the code below always returns -1 even - though the point IS IN THE ITEM! Therefore, just bail out if - we get a middle mouse up. The user must select using the - left mouse button. Stupid Win32. */ -#if 0 - int item = MenuItemFromPoint(hwnd, __glutHMenu, point); - if (item != -1) - __glutItemSelected = (GLUTmenuItem*)GetMenuItemID(__glutHMenu, item); - else - __glutItemSelected = NULL; - __glutFinishMenu(hwnd, point.x, point.y); -#endif - } else { - __glutItemSelected = NULL; - __glutFinishMenu(hwnd, point.x, point.y); - } - return 0; - } - - /* Release the mouse capture. */ - ReleaseCapture(); - - window = __glutGetWindow(hwnd); - if (window && window->mouse) { - /* Win32 doesn't return the same numbers as X does when the - mouse goes beyond the upper or left side of the window. roll - the Win32's 0..2^16 pointer co-ord range to 0 +/- 2^15. */ - x = LOWORD(lParam); - y = HIWORD(lParam); - if(x & 1 << 15) x -= (1 << 16); - if(y & 1 << 15) y -= (1 << 16); - - __glutSetWindow(window); - __glutModifierMask = 0; - if (GetKeyState(VK_SHIFT) < 0) /* < 0 = high order bit is on */ - __glutModifierMask |= ShiftMask; - if (GetKeyState(VK_CONTROL) < 0) - __glutModifierMask |= ControlMask; - if (GetKeyState(VK_MENU) < 0) - __glutModifierMask |= Mod1Mask; - window->mouse(button, GLUT_UP, x, y); - __glutModifierMask = (unsigned int)~0; - } else { - /* Window might have been destroyed and all the - events for the window may not yet be received. */ - } - return 0; - - case WM_ENTERMENULOOP: - /* KLUDGE: create a timer that fires every 100 ms when we start a - menu so that we can still process the idle & timer events (that - way, the timers will fire during a menu pick and so will the - idle func. */ - SetTimer(hwnd, 1, 1, NULL); - return 0; - - case WM_TIMER: -#if 0 - /* If the timer id is 2, then this is the timer that is set up in - the main glut message processing loop, and we don't want to do - anything but acknowledge that we got it. It is used to prevent - CPU spiking when an idle function is installed. */ - if (wParam == 2) - return 0; -#endif - - /* only worry about the idle function and the timeouts, since - these are the only events we expect to process during - processing of a menu. */ - /* we no longer process the idle functions (as outlined in the - README), since drawing can't be done until the menu has - finished...it's pretty lame when the animation goes on, but - doesn't update, so you get this weird jerkiness. */ -#if 0 - if (__glutIdleFunc) - __glutIdleFunc(); -#endif - if (__glutTimerList) - handleTimeouts(); - return 0; - - case WM_EXITMENULOOP: - /* nuke the above created timer...we don't need it anymore, since - the menu is gone now. */ - KillTimer(hwnd, 1); - return 0; - - case WM_MENUSELECT: - if (lParam != 0) - __glutHMenu = (HMENU)lParam; - return 0; - - case WM_COMMAND: - if (__glutMappedMenu) { - if (GetSubMenu(__glutHMenu, LOWORD(wParam))) - __glutItemSelected = NULL; - else - __glutItemSelected = - __glutGetUniqueMenuItem(__glutMappedMenu, LOWORD(wParam)); - GetCursorPos(&point); - ScreenToClient(hwnd, &point); - __glutFinishMenu(hwnd, point.x, point.y); - } - return 0; - - case WM_MOUSEMOVE: - if (!__glutMappedMenu) { - window = __glutGetWindow(hwnd); - if (window) { - /* If motion function registered _and_ buttons held * - down, call motion function... */ - x = LOWORD(lParam); - y = HIWORD(lParam); - - /* Win32 doesn't return the same numbers as X does when the - mouse goes beyond the upper or left side of the window. - roll the Win32's 0..2^16 pointer co-ord range to 0..+/-2^15. */ - if(x & 1 << 15) x -= (1 << 16); - if(y & 1 << 15) y -= (1 << 16); - - if (window->motion && wParam & - (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) { - __glutSetWindow(window); - window->motion(x, y); - } - /* If passive motion function registered _and_ - buttons not held down, call passive motion - function... */ - else if (window->passive && - ((wParam & - (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) == - 0)) { - __glutSetWindow(window); - window->passive(x, y); - } - } - } else { - /* Motion events are thrown away when a pop up menu is - active. */ - } - return 0; - - case WM_GETMINMAXINFO: - /* this voodoo is brought to you by Win32 (again). It allows the - window to be bigger than the screen, and smaller than 100x100 - (although it doesn't seem to help the y minimum). */ - minmax = (LPMINMAXINFO)lParam; - minmax->ptMaxSize.x = __glutScreenWidth; - minmax->ptMaxSize.y = __glutScreenHeight; - minmax->ptMinTrackSize.x = 0; - minmax->ptMinTrackSize.y = 0; - minmax->ptMaxTrackSize.x = __glutScreenWidth + - GetSystemMetrics(SM_CXSIZE) * 2; - minmax->ptMaxTrackSize.y = __glutScreenHeight + - GetSystemMetrics(SM_CXSIZE) * 2 + GetSystemMetrics(SM_CYCAPTION); - return 0; - - case WM_SIZE: - window = __glutGetWindow(hwnd); - if (window) { - width = LOWORD(lParam); - height = HIWORD(lParam); - if (width != window->width || height != window->height) { -#if 0 /* Win32 GLUT does not support overlays for now. */ - if (window->overlay) { - XResizeWindow(__glutDisplay, window->overlay->win, width, height); - } -#endif - window->width = width; - window->height = height; - __glutSetWindow(window); - /* Do not execute OpenGL out of sequence with respect - to the SetWindowPos request! */ - GdiFlush(); - window->reshape(width, height); - window->forceReshape = FALSE; - /* A reshape should be considered like posting a - repair request. */ - __glutPostRedisplay(window, GLUT_REPAIR_WORK); - } - } - return 0; - - case WM_SETCURSOR: - /* If the cursor is not in the client area, then we want to send - this message to the default window procedure ('cause its - probably in the border or title, and we don't handle that - cursor. otherwise, set our cursor. Win32 makes us set the - cursor every time the mouse moves (DUMB!). */ - if(LOWORD(lParam) != HTCLIENT) { - goto defproc; - } - window = __glutGetWindow(hwnd); - if (window) { - __glutSetCursor(window); - } - /* TODO: check out the info in DevStudio on WM_SETCURSOR in the - DefaultAction section. */ - return 1; - - case WM_SETFOCUS: - window = __glutGetWindow(hwnd); - if (window) { - window->entryState = WM_SETFOCUS; - if (window->entry) { - __glutSetWindow(window); - window->entry(GLUT_ENTERED); - /* XXX Generation of fake passive notify? See how much - work the X11 code does to support fake passive notify - callbacks. */ - } - if (window->joystick && __glutCurrentWindow) { - if (__glutCurrentWindow->joyPollInterval > 0) { - MMRESULT result; - - /* Because Win32 will only let one window capture the - joystick at a time, we must capture it when we get the - focus and release it when we lose the focus. */ - result = joySetCapture(__glutCurrentWindow->win, - JOYSTICKID1, 0, TRUE); - if (result != JOYERR_NOERROR) { - return 0; - } - (void) joySetThreshold(JOYSTICKID1, - __glutCurrentWindow->joyPollInterval); - } - } - } - return 0; - - case WM_KILLFOCUS: - window = __glutGetWindow(hwnd); - if (window) { - window->entryState = WM_KILLFOCUS; - if (window->entry) { - __glutSetWindow(window); - window->entry(GLUT_LEFT); - } - if (window->joystick && __glutCurrentWindow) { - if (__glutCurrentWindow->joyPollInterval > 0) { - /* Because Win32 will only let one window capture the - joystick at a time, we must capture it when we get the - focus and release it when we lose the focus. */ - (void) joyReleaseCapture(JOYSTICKID1); - } - } - } - return 0; - case WM_ACTIVATE: - window = __glutGetWindow(hwnd); - /* Make sure we re-select the correct palette if needed. */ - if (LOWORD(wParam)) { - PostMessage(hwnd, WM_PALETTECHANGED, 0, 0); - } - if (window) { - int visState; - - /* HIWORD(wParam) is the minimized flag. */ - visState = !HIWORD(wParam); - updateWindowState(window, visState); - } - return 0; - - /* Colour Palette Management */ - case WM_PALETTECHANGED: - if (hwnd == (HWND)wParam) { - /* Don't respond to the message that we sent! */ - break; - } - /* fall through to WM_QUERYNEWPALETTE */ - - case WM_QUERYNEWPALETTE: - window = __glutGetWindow(hwnd); - if (window && window->colormap) { - UnrealizeObject(window->colormap->cmap); - SelectPalette(window->hdc, window->colormap->cmap, FALSE); - RealizePalette(window->hdc); - return TRUE; - } - return FALSE; - - case MM_JOY1MOVE: - case MM_JOY1ZMOVE: - window = __glutGetWindow(hwnd); - if (window->joystick) { - JOYINFOEX jix; - int x, y, z; - - /* Because WIN32 only supports messages for X, Y, and Z - translations, we must poll for the rest */ - jix.dwSize = sizeof(jix); - jix.dwFlags = JOY_RETURNALL; - joyGetPosEx(JOYSTICKID1,&jix); - -#define SCALE(v) ((int) ((v - 32767)/32.768)) - - /* Convert to integer for scaling. */ - x = jix.dwXpos; - y = jix.dwYpos; - z = jix.dwZpos; - window->joystick(jix.dwButtons, SCALE(x), SCALE(y), SCALE(z)); - - return TRUE; - } - return FALSE; - case MM_JOY1BUTTONDOWN: - case MM_JOY1BUTTONUP: - window = __glutGetWindow(hwnd); - if (window->joystick) { - JOYINFOEX jix; - - /* Because WIN32 only supports messages for X, Y, and Z - translations, we must poll for the rest */ - jix.dwSize = sizeof(jix); - jix.dwFlags = JOY_RETURNALL; - joyGetPosEx(JOYSTICKID1,&jix); - - return TRUE; - } - return FALSE; - -#if 0 - /* Miscellaneous messages (don't really need to enumerate them, - but it's good to know what you're not getting sometimes). */ - case WM_DISPLAYCHANGE: - break; - case WM_NCHITTEST: - /* This event is generated by every mouse move event. */ - goto defproc; - case WM_NCMOUSEMOVE: - goto defproc; - case WM_NCACTIVATE: - goto defproc; - case WM_NCPAINT: - goto defproc; - case WM_NCCALCSIZE: - goto defproc; - case WM_NCCREATE: - goto defproc; - case WM_NCDESTROY: - goto defproc; - case WM_NCLBUTTONDOWN: - goto defproc; - case WM_SETTEXT: - goto defproc; - case WM_GETTEXT: - goto defproc; - case WM_ACTIVATEAPP: - goto defproc; - case WM_GETICON: - goto defproc; - case WM_ERASEBKGND: - goto defproc; - case WM_WINDOWPOSCHANGING: - goto defproc; - case WM_WINDOWPOSCHANGED: - goto defproc; - case WM_MOUSEACTIVATE: - goto defproc; - case WM_SHOWWINDOW: - goto defproc; - case WM_MOVING: - goto defproc; - case WM_MOVE: - goto defproc; - case WM_KEYUP: - goto defproc; - case WM_CAPTURECHANGED: - goto defproc; - case WM_SYSCOMMAND: - goto defproc; - case WM_ENTERSIZEMOVE: - goto defproc; - case WM_ENTERIDLE: - goto defproc; -#endif - - default: - goto defproc; - } - -defproc: - return DefWindowProc(hwnd, msg, wParam, lParam); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_x11.c b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_x11.c deleted file mode 100644 index 1d138cfa2a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_x11.c +++ /dev/null @@ -1,400 +0,0 @@ - -/* Copyright (c) Nate Robins, 1997. */ -/* portions Copyright (c) Mark Kilgard, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" - -/* global variable that must be set for some functions to operate - correctly. */ -HDC XHDC; - -XVisualInfo* -XGetVisualInfo(Display* display, long mask, XVisualInfo* template, int* nitems) -{ - /* KLUDGE: this function needs XHDC to be set to the HDC currently - being operated on before it is invoked! */ - - PIXELFORMATDESCRIPTOR* pfds; - int i, n; - - n = DescribePixelFormat(XHDC, 0, 0, NULL); - pfds = (PIXELFORMATDESCRIPTOR*)malloc(sizeof(PIXELFORMATDESCRIPTOR) * n); - memset(pfds, 0, sizeof(PIXELFORMATDESCRIPTOR) * n); - - for (i = 0; i < n; i++) { - DescribePixelFormat(XHDC, i + 1, sizeof(PIXELFORMATDESCRIPTOR), &pfds[i]); - } - - *nitems = n; - return pfds; -} - -Colormap -XCreateColormap(Display* display, Window root, Visual* visual, int alloc) -{ - /* KLUDGE: this function needs XHDC to be set to the HDC currently - being operated on before it is invoked! */ - - PIXELFORMATDESCRIPTOR pfd; - LOGPALETTE *logical; - HPALETTE palette; - int n; - - /* grab the pixel format */ - memset(&pfd, 0, sizeof(PIXELFORMATDESCRIPTOR)); - DescribePixelFormat(XHDC, GetPixelFormat(XHDC), - sizeof(PIXELFORMATDESCRIPTOR), &pfd); - - if (!(pfd.dwFlags & PFD_NEED_PALETTE || - pfd.iPixelType == PFD_TYPE_COLORINDEX)) - { - return 0; - } - - n = 1 << pfd.cColorBits; - - /* allocate a bunch of memory for the logical palette (assume 256 - colors in a Win32 palette */ - logical = (LOGPALETTE*)malloc(sizeof(LOGPALETTE) + - sizeof(PALETTEENTRY) * n); - memset(logical, 0, sizeof(LOGPALETTE) + sizeof(PALETTEENTRY) * n); - - /* set the entries in the logical palette */ - logical->palVersion = 0x300; - logical->palNumEntries = n; - - /* start with a copy of the current system palette */ - GetSystemPaletteEntries(XHDC, 0, 256, &logical->palPalEntry[0]); - - if (pfd.iPixelType == PFD_TYPE_RGBA) { - int redMask = (1 << pfd.cRedBits) - 1; - int greenMask = (1 << pfd.cGreenBits) - 1; - int blueMask = (1 << pfd.cBlueBits) - 1; - int i; - - /* fill in an RGBA color palette */ - for (i = 0; i < n; ++i) { - logical->palPalEntry[i].peRed = - (((i >> pfd.cRedShift) & redMask) * 255) / redMask; - logical->palPalEntry[i].peGreen = - (((i >> pfd.cGreenShift) & greenMask) * 255) / greenMask; - logical->palPalEntry[i].peBlue = - (((i >> pfd.cBlueShift) & blueMask) * 255) / blueMask; - logical->palPalEntry[i].peFlags = 0; - } - } - - palette = CreatePalette(logical); - free(logical); - - SelectPalette(XHDC, palette, FALSE); - RealizePalette(XHDC); - - return palette; -} - -void -XAllocColorCells(Display* display, Colormap colormap, Bool contig, - unsigned long plane_masks_return[], unsigned int nplanes, - unsigned long pixels_return[], unsigned int npixels) -{ - /* NOP -- we did all the allocating in XCreateColormap! */ -} - -void -XStoreColor(Display* display, Colormap colormap, XColor* color) -{ - /* KLUDGE: set XHDC to 0 if the palette should NOT be realized after - setting the color. set XHDC to the correct HDC if it should. */ - - PALETTEENTRY pe; - - /* X11 stores color from 0-65535, Win32 expects them to be 0-256, so - twiddle the bits ( / 256). */ - pe.peRed = color->red / 256; - pe.peGreen = color->green / 256; - pe.peBlue = color->blue / 256; - - /* make sure we use this flag, otherwise the colors might get mapped - to another place in the colormap, and when we glIndex() that - color, it may have moved (argh!!) */ - pe.peFlags = PC_NOCOLLAPSE; - - /* the pixel field of the XColor structure is the index into the - colormap */ - SetPaletteEntries(colormap, color->pixel, 1, &pe); - - if (XHDC) { - UnrealizeObject(colormap); - SelectPalette(XHDC, colormap, FALSE); - RealizePalette(XHDC); - } -} - -void -XSetWindowColormap(Display* display, Window window, Colormap colormap) -{ - HDC hdc = GetDC(window); - - /* if the third parameter is FALSE, the logical colormap is copied - into the device palette when the application is in the - foreground, if it is TRUE, the colors are mapped into the current - palette in the best possible way. */ - SelectPalette(hdc, colormap, FALSE); - RealizePalette(hdc); - - /* note that we don't have to release the DC, since our window class - uses the WC_OWNDC flag! */ -} - -Bool -XTranslateCoordinates(Display *display, Window src, Window dst, - int src_x, int src_y, - int* dest_x_return, int* dest_y_return, - Window* child_return) -{ - /* KLUDGE: this isn't really a translate coordinates into some other - windows coordinate system...it only translates coordinates into the - root window (screen) coordinate system. */ - - POINT point; - - point.x = src_x; - point.y = src_y; - - ClientToScreen(src, &point); - - *dest_x_return = point.x; - *dest_y_return = point.y; - - /* just to make compilers happy...we don't use the return value. */ - return True; -} - -Status -XGetGeometry(Display* display, Window window, Window* root_return, - int* x_return, int* y_return, - unsigned int* width_return, unsigned int* height_return, - unsigned int *border_width_return, unsigned int* depth_return) -{ - /* KLUDGE: doesn't return the border_width or depth or root, x & y - are in screen coordinates. */ - - RECT rect; - POINT point; - - GetClientRect(window, &rect); - - point.x = 0; - point.y = 0; - ClientToScreen(window, &point); - - *x_return = point.x; - *y_return = point.y; - *width_return = rect.right; - *height_return = rect.bottom; - - /* just to make compilers happy...we don't use the return value. */ - return 1; -} - -int -DisplayWidthMM(Display* display, int screen) -{ - int width; - HWND hwnd = GetDesktopWindow(); - HDC hdc = GetDC(hwnd); - - width = GetDeviceCaps(hdc, HORZSIZE); - - /* make sure to release this DC (it's the desktops, not ours) */ - ReleaseDC(hwnd, hdc); - - return width; -} - -int -DisplayHeightMM(Display* display, int screen) -{ - int height; - HWND hwnd = GetDesktopWindow(); - HDC hdc = GetDC(hwnd); - - height = GetDeviceCaps(hdc, VERTSIZE); - - /* make sure to release this DC (it's the desktops, not ours) */ - ReleaseDC(hwnd, hdc); - - return height; -} - -void -XWarpPointer(Display* display, Window src, Window dst, - int src_x, int src_y, int src_width, int src_height, - int dst_x, int dst_y) -{ - /* KLUDGE: this isn't really a warp pointer into some other windows - coordinate system...it only warps the pointer into the root window - (screen) coordinate system. */ - - POINT point; - - point.x = dst_x; - point.y = dst_y; - ClientToScreen(dst, &point); - - SetCursorPos(point.x, point.y); -} - -int -XPending(Display* display) -{ - /* similar functionality...I don't think that it is exact, but this - will have to do. */ - MSG msg; - - return PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE); -} - -/* the following function was stolen from the X sources as indicated. */ - -/* Copyright Massachusetts Institute of Technology 1985, 1986, 1987 */ -/* $XConsortium: XParseGeom.c,v 11.18 91/02/21 17:23:05 rws Exp $ */ - -/* -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the name of M.I.T. not be used in advertising or -publicity pertaining to distribution of the software without specific, -written prior permission. M.I.T. makes no representations about the -suitability of this software for any purpose. It is provided "as is" -without express or implied warranty. -*/ - -/* - * XParseGeometry parses strings of the form - * "=x{+-}{+-}", where - * width, height, xoffset, and yoffset are unsigned integers. - * Example: "=80x24+300-49" - * The equal sign is optional. - * It returns a bitmask that indicates which of the four values - * were actually found in the string. For each value found, - * the corresponding argument is updated; for each value - * not found, the corresponding argument is left unchanged. - */ - -static int -ReadInteger(char *string, char **NextString) -{ - register int Result = 0; - int Sign = 1; - - if (*string == '+') - string++; - else if (*string == '-') - { - string++; - Sign = -1; - } - for (; (*string >= '0') && (*string <= '9'); string++) - { - Result = (Result * 10) + (*string - '0'); - } - *NextString = string; - if (Sign >= 0) - return (Result); - else - return (-Result); -} - -int XParseGeometry(char *string, int *x, int *y, unsigned int *width, unsigned int *height) -{ - int mask = NoValue; - register char *strind; - unsigned int tempWidth, tempHeight; - int tempX, tempY; - char *nextCharacter; - - if ( (string == NULL) || (*string == '\0')) return(mask); - if (*string == '=') - string++; /* ignore possible '=' at beg of geometry spec */ - - strind = (char *)string; - if (*strind != '+' && *strind != '-' && *strind != 'x') { - tempWidth = ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return (0); - strind = nextCharacter; - mask |= WidthValue; - } - - if (*strind == 'x' || *strind == 'X') { - strind++; - tempHeight = ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return (0); - strind = nextCharacter; - mask |= HeightValue; - } - - if ((*strind == '+') || (*strind == '-')) { - if (*strind == '-') { - strind++; - tempX = -ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return (0); - strind = nextCharacter; - mask |= XNegative; - - } - else - { strind++; - tempX = ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return(0); - strind = nextCharacter; - } - mask |= XValue; - if ((*strind == '+') || (*strind == '-')) { - if (*strind == '-') { - strind++; - tempY = -ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return(0); - strind = nextCharacter; - mask |= YNegative; - - } - else - { - strind++; - tempY = ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return(0); - strind = nextCharacter; - } - mask |= YValue; - } - } - - /* If strind isn't at the end of the string the it's an invalid - geometry specification. */ - - if (*strind != '\0') return (0); - - if (mask & XValue) - *x = tempX; - if (mask & YValue) - *y = tempY; - if (mask & WidthValue) - *width = tempWidth; - if (mask & HeightValue) - *height = tempHeight; - return (mask); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_x11.h b/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_x11.h deleted file mode 100644 index 1d8d048b2e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/glx/win32_x11.h +++ /dev/null @@ -1,326 +0,0 @@ -#ifndef __win32_x11_h__ -#define __win32_x11_h__ - -/* Copyright (c) Nate Robins, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include - -/* These definitions are missing from windows.h */ -WINGDIAPI int WINAPI wglChoosePixelFormat(HDC, PIXELFORMATDESCRIPTOR *); -WINGDIAPI int WINAPI wglDescribePixelFormat(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR); -WINGDIAPI int WINAPI wglGetPixelFormat(HDC); -WINGDIAPI BOOL WINAPI wglSetPixelFormat(HDC, int, PIXELFORMATDESCRIPTOR *); -WINGDIAPI BOOL WINAPI wglSwapBuffers(HDC); - -/* Type definitions (conversions) */ -typedef int Visual; /* Win32 equivalent of X11 type */ -typedef HWND Window; -typedef HPALETTE Colormap; -typedef PIXELFORMATDESCRIPTOR XVisualInfo; -typedef BOOL Bool; -typedef MSG XEvent; -typedef HDC Display; -typedef HCURSOR Cursor; - -typedef int Atom; /* dummies */ -typedef int XDevice; -typedef int Status; - -#define True TRUE /* Win32 equivalents of X11 booleans */ -#define False FALSE - -#define None 0L /* universal null resource or null atom */ - -/* Input Event Masks. Used as event-mask window attribute and as arguments - to Grab requests. Not to be confused with event names. */ - -#define NoEventMask 0L -#define KeyPressMask (1L<<0) -#define KeyReleaseMask (1L<<1) -#define ButtonPressMask (1L<<2) -#define ButtonReleaseMask (1L<<3) -#define EnterWindowMask (1L<<4) -#define LeaveWindowMask (1L<<5) -#define PointerMotionMask (1L<<6) -#define PointerMotionHintMask (1L<<7) -#define Button1MotionMask (1L<<8) -#define Button2MotionMask (1L<<9) -#define Button3MotionMask (1L<<10) -#define Button4MotionMask (1L<<11) -#define Button5MotionMask (1L<<12) -#define ButtonMotionMask (1L<<13) -#define KeymapStateMask (1L<<14) -#define ExposureMask (1L<<15) -#define VisibilityChangeMask (1L<<16) -#define StructureNotifyMask (1L<<17) -#define ResizeRedirectMask (1L<<18) -#define SubstructureNotifyMask (1L<<19) -#define SubstructureRedirectMask (1L<<20) -#define FocusChangeMask (1L<<21) -#define PropertyChangeMask (1L<<22) -#define ColormapChangeMask (1L<<23) -#define OwnerGrabButtonMask (1L<<24) - -/* Key masks. Used as modifiers to GrabButton and GrabKey, results of - QueryPointer, state in various key-, mouse-, and button-related - events. */ - -#define ShiftMask (1<<0) -#define LockMask (1<<1) -#define ControlMask (1<<2) -#define Mod1Mask (1<<3) -#define Mod2Mask (1<<4) -#define Mod3Mask (1<<5) -#define Mod4Mask (1<<6) -#define Mod5Mask (1<<7) - -/* Window classes used by CreateWindow */ -/* Note that CopyFromParent is already defined as 0 above */ - -#define InputOutput 1 -#define InputOnly 2 - -/* Window attributes for CreateWindow and ChangeWindowAttributes */ - -#define CWBackPixmap (1L<<0) -#define CWBackPixel (1L<<1) -#define CWBorderPixmap (1L<<2) -#define CWBorderPixel (1L<<3) -#define CWBitGravity (1L<<4) -#define CWWinGravity (1L<<5) -#define CWBackingStore (1L<<6) -#define CWBackingPlanes (1L<<7) -#define CWBackingPixel (1L<<8) -#define CWOverrideRedirect (1L<<9) -#define CWSaveUnder (1L<<10) -#define CWEventMask (1L<<11) -#define CWDontPropagate (1L<<12) -#define CWColormap (1L<<13) -#define CWCursor (1L<<14) - -/* ConfigureWindow structure */ - -#define CWX (1<<0) -#define CWY (1<<1) -#define CWWidth (1<<2) -#define CWHeight (1<<3) -#define CWBorderWidth (1<<4) -#define CWSibling (1<<5) -#define CWStackMode (1<<6) - - -/* Used in GetWindowAttributes reply */ - -#define IsUnmapped 0 -#define IsUnviewable 1 -#define IsViewable 2 - -/* Window stacking method (in configureWindow) */ - -#define Above 0 -#define Below 1 -#define TopIf 2 -#define BottomIf 3 -#define Opposite 4 - -/* For CreateColormap */ - -#define AllocNone 0 /* create map with no entries */ -#define AllocAll 1 /* allocate entire map writeable */ - - -/* Flags used in StoreNamedColor, StoreColors */ - -#define DoRed (1<<0) -#define DoGreen (1<<1) -#define DoBlue (1<<2) - -/* - * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding - * value (x, y, width, height) was found in the parsed string. - */ -#define NoValue 0x0000 -#define XValue 0x0001 -#define YValue 0x0002 -#define WidthValue 0x0004 -#define HeightValue 0x0008 -#define AllValues 0x000F -#define XNegative 0x0010 -#define YNegative 0x0020 - -/* flags argument in size hints */ -#define USPosition (1L << 0) /* user specified x, y */ -#define USSize (1L << 1) /* user specified width, height */ - -/* definitions for initial window state */ -#define WithdrawnState 0 /* for windows that are not mapped */ -#define NormalState 1 /* most applications want to start this way */ -#define IconicState 3 /* application wants to start as an icon */ -#define GameModeState 4 /* Win32 GLUT only (not in Xlib!). */ - -/* Type definitions */ - -typedef struct { - unsigned int background_pixmap; /* background pixmap */ - unsigned long background_pixel; /* background pixel */ - unsigned long border_pixel; /* border pixel value */ - long event_mask; /* set of events that should be saved */ - long do_not_propagate_mask; /* set of events that should not propagate */ - Bool override_redirect; /* boolean value for override-redirect */ - Colormap colormap; /* color map to be associated with window */ -} XSetWindowAttributes; - -typedef struct { - unsigned long pixel; - unsigned short red, green, blue; - char flags; /* do_red, do_green, do_blue */ -} XColor; - -typedef struct { - unsigned char *value; /* same as Property routines */ - Atom encoding; /* prop type */ - int format; /* prop data format: 8, 16, or 32 */ - unsigned long nitems; /* number of data items in value */ -} XTextProperty; - -typedef struct { - long flags; /* marks which fields in this structure are defined */ - int x, y; /* obsolete for new window mgrs, but clients */ - int width, height; /* should set so old wm's don't mess up */ -} XSizeHints; - -/* Functions emulated by macros. */ - -#define XFreeColormap(display, colormap) \ - DeleteObject(colormap) - -#define XCreateFontCursor(display, shape) \ - LoadCursor(NULL, shape) - -#define XDefineCursor(display, window, cursor) \ - SetCursor(cursor) - -#define XFlush(display) \ - /* Nothing. */ - -#define DisplayWidth(display, screen) \ - GetSystemMetrics(SM_CXSCREEN) - -#define DisplayHeight(display, screen) \ - GetSystemMetrics(SM_CYSCREEN) - -#define XMapWindow(display, window) \ - ShowWindow(window, SW_SHOWNORMAL) - -#define XUnmapWindow(display, window) \ - ShowWindow(window, SW_HIDE) - -#define XIconifyWindow(display, window, screen) \ - ShowWindow(window, SW_MINIMIZE) - -#define XWithdrawWindow(display, window, screen) \ - ShowWindow(window, SW_HIDE) - -#define XLowerWindow(display, window) \ - SetWindowPos(window, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE) - -#define XSetWMName(display, window, tp) \ - SetWindowText(window, (tp)->value) - -/* There really isn't a way to set the icon name separate from the - windows name in Win32, so, just set the windows name. */ -#define XSetWMIconName(display, window, tp) \ - XSetWMName(display, window, tp) - -#define XDestroyWindow(display, window) \ - DestroyWindow(window) - -/* Anything that needs to be freed was allocated with malloc in our - fake X windows library for Win32, so free it with plain old - free(). */ -#define XFree(data) \ - free(data) - -/* Nothing to be done for this...the pointer is always 'ungrabbed' - in Win32. */ -#define XUngrabPointer(display, time) \ - /* Nothing. */ - -/* Function prototypes. */ - -extern XVisualInfo* XGetVisualInfo( - Display* display, - long mask, - XVisualInfo* ttemplate, /* Avoid class with C++ keyword. */ - int*nitems); - -extern Colormap XCreateColormap( - Display* display, - Window root, - Visual* visual, - int alloc); - -extern void XAllocColorCells( - Display* display, - Colormap colormap, - Bool contig, - unsigned long plane_masks_return[], - unsigned int nplanes, - unsigned long pixels_return[], - unsigned int npixels); - -extern void XStoreColor( - Display* display, - Colormap colormap, - XColor* color); - -extern void XSetWindowColormap( - Display* display, - Window window, - Colormap colormap); - -extern Bool XTranslateCoordinates( - Display *display, - Window src, Window dst, - int src_x, int src_y, - int* dest_x_return, int* dest_y_return, - Window* child_return); - -extern Status XGetGeometry( - Display* display, - Window window, - Window* root_return, - int* x_return, int* y_return, - unsigned int* width_return, unsigned int* height_return, - unsigned int *border_width_return, - unsigned int* depth_return); - -extern int DisplayWidthMM( - Display* display, - int screen); - -extern int DisplayHeightMM( - Display* display, - int screen); - -extern void XWarpPointer( - Display* display, - Window src, Window dst, - int src_x, int src_y, - int src_width, int src_height, - int dst_x, int dst_y); - -extern int XParseGeometry( - char* string, - int* x, int* y, - unsigned int* width, unsigned int* height); - -extern int XPending( - Display* display); - -#endif /* __win32_x11_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/Makefile b/nx-X11/extras/Mesa_6.4.2/src/glut/mini/Makefile deleted file mode 100644 index cb82384941..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/Makefile +++ /dev/null @@ -1,80 +0,0 @@ -# subset glut - -TOP = ../../.. -include $(TOP)/configs/current - -MARK = $(TOP)/src/glut/glx - -GLUT_MAJOR = 3 -GLUT_MINOR = 7 -GLUT_TINY = 1 - -INCLUDES = -I$(TOP)/include -I$(MARK) - -CORE_SOURCES = \ - bitmap.c \ - callback.c \ - color.c \ - globals.c \ - init.c \ - menu.c \ - models.c \ - overlay.c \ - state.c \ - teapot.c \ - window.c - - -MARK_SOURCES = \ - $(MARK)/glut_8x13.c \ - $(MARK)/glut_9x15.c \ - $(MARK)/glut_hel10.c \ - $(MARK)/glut_hel12.c \ - $(MARK)/glut_hel18.c \ - $(MARK)/glut_tr10.c \ - $(MARK)/glut_tr24.c - -SOURCES = $(CORE_SOURCES) $(MARK_SOURCES) - -OBJECTS = $(SOURCES:.c=.o) - - -##### RULES ##### - -.c.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ - -.S.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ - - -##### TARGETS ##### - -default: depend $(LIB_DIR)/$(GLUT_LIB_NAME) - - -# Make the library -$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS) - $(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \ - -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \ - $(GLUT_LIB_DEPS) -install $(LIB_DIR) \ - $(MKLIB_OPTIONS) $(OBJECTS) - - -# Run 'make -f Makefile.solo dep' to update the dependencies if you change -# what's included by any source file. -depend: $(SOURCES) - touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null - -# Emacs tags -tags: - etags `find . -name \*.[ch]` `find ../include` - - -# Remove .o and backup files -clean: depend - -rm -f depend - -rm -f *.o *~ *.o *~ *.so libglut.so.3.7 - -include depend diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/bitmap.c b/nx-X11/extras/Mesa_6.4.2/src/glut/mini/bitmap.c deleted file mode 100644 index 55a031af0a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/bitmap.c +++ /dev/null @@ -1,56 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutbitmap.h" - -void APIENTRY -glutBitmapCharacter(GLUTbitmapFont font, int c) -{ - const BitmapCharRec *ch; - BitmapFontPtr fontinfo; - GLfloat swapbytes, lsbfirst, rowlength; - GLfloat skiprows, skippixels, alignment; - -#if defined(_WIN32) - fontinfo = (BitmapFontPtr) __glutFont(font); -#else - fontinfo = (BitmapFontPtr) font; -#endif - - if (c < fontinfo->first || - c >= fontinfo->first + fontinfo->num_chars) - return; - ch = fontinfo->ch[c - fontinfo->first]; - if (ch) { - /* Save current modes. */ -/* glGetFloatv(GL_UNPACK_SWAP_BYTES, &swapbytes); */ -/* glGetFloatv(GL_UNPACK_LSB_FIRST, &lsbfirst); */ -/* glGetFloatv(GL_UNPACK_ROW_LENGTH, &rowlength); */ -/* glGetFloatv(GL_UNPACK_SKIP_ROWS, &skiprows); */ -/* glGetFloatv(GL_UNPACK_SKIP_PIXELS, &skippixels); */ - glGetFloatv(GL_UNPACK_ALIGNMENT, &alignment); - /* Little endian machines (DEC Alpha for example) could - benefit from setting GL_UNPACK_LSB_FIRST to GL_TRUE - instead of GL_FALSE, but this would require changing the - generated bitmaps too. */ -/* glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); */ -/* glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE); */ -/* glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); */ -/* glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); */ -/* glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); */ - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glBitmap(ch->width, ch->height, ch->xorig, ch->yorig, - ch->advance, 0, ch->bitmap); - /* Restore saved modes. */ -/* glPixelStorei(GL_UNPACK_SWAP_BYTES, swapbytes); */ -/* glPixelStorei(GL_UNPACK_LSB_FIRST, (int)lsbfirst); */ -/* glPixelStorei(GL_UNPACK_ROW_LENGTH, (int)rowlength); */ -/* glPixelStorei(GL_UNPACK_SKIP_ROWS, skiprows); */ -/* glPixelStorei(GL_UNPACK_SKIP_PIXELS, skippixels); */ - glPixelStorei(GL_UNPACK_ALIGNMENT, (int)alignment); - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/callback.c b/nx-X11/extras/Mesa_6.4.2/src/glut/mini/callback.c deleted file mode 100644 index d4e3101cc0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/callback.c +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.4 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * DOS/DJGPP glut driver v1.0 for Mesa 4.0 - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#include "GL/glut.h" -#include "internal.h" - - -void APIENTRY glutDisplayFunc (void (GLUTCALLBACK *func) (void)) -{ - display_func = func; -} - - -void APIENTRY glutReshapeFunc (void (GLUTCALLBACK *func) (int width, int height)) -{ - reshape_func = func; -} - - -void APIENTRY glutKeyboardFunc (void (GLUTCALLBACK *func) (unsigned char key, int x, int y)) -{ - keyboard_func = func; -} - - -void APIENTRY glutMouseFunc (void (GLUTCALLBACK *func) (int button, int state, int x, int y)) -{ - mouse_func = func; -} - - -void APIENTRY glutMotionFunc (void (GLUTCALLBACK *func) (int x, int y)) -{ - motion_func = func; -} - - -void APIENTRY glutPassiveMotionFunc (void (GLUTCALLBACK *func) (int x, int y)) -{ - passive_motion_func = func; -} - - -void APIENTRY glutEntryFunc (void (GLUTCALLBACK *func) (int state)) -{ - entry_func = func; -} - - -void APIENTRY glutVisibilityFunc (void (GLUTCALLBACK *func) (int state)) -{ - visibility_func = func; -} - - -void APIENTRY glutIdleFunc (void (GLUTCALLBACK *func) (void)) -{ - idle_func = func; -} - - -void APIENTRY glutTimerFunc (unsigned int millis, void (GLUTCALLBACK *func) (int value), int value) -{ -} - - -void APIENTRY glutMenuStateFunc (void (GLUTCALLBACK *func) (int state)) -{ - menu_state_func = func; -} - - -void APIENTRY glutSpecialFunc (void (GLUTCALLBACK *func) (int key, int x, int y)) -{ - special_func = func; -} - - -void APIENTRY glutSpaceballMotionFunc (void (GLUTCALLBACK *func) (int x, int y, int z)) -{ -} - - -void APIENTRY glutSpaceballRotateFunc (void (GLUTCALLBACK *func) (int x, int y, int z)) -{ -} - - -void APIENTRY glutSpaceballButtonFunc (void (GLUTCALLBACK *func) (int button, int state)) -{ -} - - -void APIENTRY glutButtonBoxFunc (void (GLUTCALLBACK *func) (int button, int state)) -{ -} - - -void APIENTRY glutDialsFunc (void (GLUTCALLBACK *func) (int dial, int value)) -{ -} - - -void APIENTRY glutTabletMotionFunc (void (GLUTCALLBACK *func) (int x, int y)) -{ -} - - -void APIENTRY glutTabletButtonFunc (void (GLUTCALLBACK *func) (int button, int state, int x, int y)) -{ -} - - -void APIENTRY glutMenuStatusFunc (void (GLUTCALLBACK *func) (int status, int x, int y)) -{ -} - - -void APIENTRY glutOverlayDisplayFunc (void (GLUTCALLBACK *func) (void)) -{ -} - - -void APIENTRY glutWindowStatusFunc (void (GLUTCALLBACK *func) (int state)) -{ -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/color.c b/nx-X11/extras/Mesa_6.4.2/src/glut/mini/color.c deleted file mode 100644 index b53c5b669e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/color.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.4 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * DOS/DJGPP glut driver v1.0 for Mesa 4.0 - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#include "GL/glut.h" - - -void APIENTRY glutSetColor (int ndx, GLfloat red, GLfloat green, GLfloat blue) -{ -} - - -GLfloat APIENTRY glutGetColor (int ndx, int component) -{ - return 0.0; -} - - -void APIENTRY glutCopyColormap (int win) -{ -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/globals.c b/nx-X11/extras/Mesa_6.4.2/src/glut/mini/globals.c deleted file mode 100644 index 76db53c695..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/globals.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.4 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * DOS/DJGPP glut driver v1.0 for Mesa 4.0 - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#include "GL/glut.h" -#include "internal.h" - -GLenum g_display_mode = 0; -GLuint g_width = DEFAULT_WIDTH; -GLuint g_height = DEFAULT_HEIGHT; -GLint g_mouse = GL_FALSE; -GLboolean g_redisplay = GL_FALSE; -GLint g_xpos = 0; -GLint g_ypos = 0; - -void (GLUTCALLBACK *display_func) (void) = 0; -void (GLUTCALLBACK *reshape_func) (int width, int height) = 0; -void (GLUTCALLBACK *keyboard_func) (unsigned char key, int x, int y) = 0; -void (GLUTCALLBACK *mouse_func) (int button, int state, int x, int y) = 0; -void (GLUTCALLBACK *motion_func) (int x, int y) = 0; -void (GLUTCALLBACK *passive_motion_func) (int x, int y) = 0; -void (GLUTCALLBACK *entry_func) (int state) = 0; -void (GLUTCALLBACK *visibility_func) (int state) = 0; -void (GLUTCALLBACK *idle_func) (void) = 0; -void (GLUTCALLBACK *menu_state_func) (int state) = 0; -void (GLUTCALLBACK *special_func) (int key, int x, int y) = 0; -void (GLUTCALLBACK *spaceball_motion_func) (int x, int y, int z) = 0; -void (GLUTCALLBACK *spaceball_rotate_func) (int x, int y, int z) = 0; -void (GLUTCALLBACK *spaceball_button_func) (int button, int state) = 0; -void (GLUTCALLBACK *button_box_func) (int button, int state) = 0; -void (GLUTCALLBACK *dials_func) (int dial, int value) = 0; -void (GLUTCALLBACK *tablet_motion_func) (int x, int y) = 0; -void (GLUTCALLBACK *tabled_button_func) (int button, int state, int x, int y) = 0; -void (GLUTCALLBACK *menu_status_func) (int status, int x, int y) = 0; -void (GLUTCALLBACK *overlay_display_func) (void) = 0; -void (GLUTCALLBACK *window_status_func) (int state) = 0; diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/init.c b/nx-X11/extras/Mesa_6.4.2/src/glut/mini/init.c deleted file mode 100644 index 5588db9aba..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/init.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * DOS/DJGPP glut driver v1.0 for Mesa 4.0 - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#include "GL/glut.h" -#include "internal.h" - - -void APIENTRY glutInit (int *argcp, char **argv) -{ - glutGet(GLUT_ELAPSED_TIME); -} - - -void APIENTRY glutInitDisplayMode (unsigned int mode) -{ - g_display_mode = mode; -} - - -void APIENTRY glutInitWindowPosition (int x, int y) -{ - g_xpos = x; - g_ypos = y; -} - - -void APIENTRY glutInitWindowSize (int width, int height) -{ - g_width = width; - g_height = height; -} - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/internal.h b/nx-X11/extras/Mesa_6.4.2/src/glut/mini/internal.h deleted file mode 100644 index ccd12e54af..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/internal.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * DOS/DJGPP glut driver v1.0 for Mesa 4.0 - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#ifndef INTERNAL_H_included -#define INTERNAL_H_included - - -#include "GL/glut.h" -/* #include "pc_hw/pc_hw.h" */ - - -#define MAX_WINDOWS 4 - -#define DEFAULT_WIDTH 640 -#define DEFAULT_HEIGHT 480 -#define DEFAULT_BPP 16 - -#define DEPTH_SIZE 16 -#define STENCIL_SIZE 8 -#define ACCUM_SIZE 16 - -extern GLenum g_display_mode; -extern GLuint g_width; -extern GLuint g_height; -extern GLint g_mouse; -extern GLboolean g_redisplay; -extern GLint g_xpos; -extern GLint g_ypos; - -extern void (GLUTCALLBACK *display_func) (void); -extern void (GLUTCALLBACK *reshape_func) (int width, int height); -extern void (GLUTCALLBACK *keyboard_func) (unsigned char key, int x, int y); -extern void (GLUTCALLBACK *mouse_func) (int button, int state, int x, int y); -extern void (GLUTCALLBACK *motion_func) (int x, int y); -extern void (GLUTCALLBACK *passive_motion_func) (int x, int y); -extern void (GLUTCALLBACK *entry_func) (int state); -extern void (GLUTCALLBACK *visibility_func) (int state); -extern void (GLUTCALLBACK *idle_func) (void); -extern void (GLUTCALLBACK *menu_state_func) (int state); -extern void (GLUTCALLBACK *special_func) (int key, int x, int y); -extern void (GLUTCALLBACK *spaceball_motion_func) (int x, int y, int z); -extern void (GLUTCALLBACK *spaceball_rotate_func) (int x, int y, int z); -extern void (GLUTCALLBACK *spaceball_button_func) (int button, int state); -extern void (GLUTCALLBACK *button_box_func) (int button, int state); -extern void (GLUTCALLBACK *dials_func) (int dial, int value); -extern void (GLUTCALLBACK *tablet_motion_func) (int x, int y); -extern void (GLUTCALLBACK *tabled_button_func) (int button, int state, int x, int y); -extern void (GLUTCALLBACK *menu_status_func) (int status, int x, int y); -extern void (GLUTCALLBACK *overlay_display_func) (void); -extern void (GLUTCALLBACK *window_status_func) (int state); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/menu.c b/nx-X11/extras/Mesa_6.4.2/src/glut/mini/menu.c deleted file mode 100644 index 3c571647b1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/menu.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.4 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * DOS/DJGPP glut driver v1.0 for Mesa 4.0 - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#include "GL/glut.h" - - -int APIENTRY glutCreateMenu (void (GLUTCALLBACK *func) (int)) -{ - return 0; -} - -void APIENTRY glutDestroyMenu (int menu) -{ -} - - -int APIENTRY glutGetMenu (void) -{ - return 0; -} - - -void APIENTRY glutSetMenu (int menu) -{ -} - - -void APIENTRY glutAddMenuEntry (const char *label, int value) -{ -} - - -void APIENTRY glutAddSubMenu (const char *label, int submenu) -{ -} - - -void APIENTRY glutChangeToMenuEntry (int item, const char *label, int value) -{ -} - - -void APIENTRY glutChangeToSubMenu (int item, const char *label, int submenu) -{ -} - - -void APIENTRY glutRemoveMenuItem (int item) -{ -} - - -void APIENTRY glutAttachMenu (int button) -{ -} - - -void APIENTRY glutDetachMenu (int button) -{ -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/models.c b/nx-X11/extras/Mesa_6.4.2/src/glut/mini/models.c deleted file mode 100644 index 57f45a262c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/models.c +++ /dev/null @@ -1,598 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/** -(c) Copyright 1993, Silicon Graphics, Inc. - -ALL RIGHTS RESERVED - -Permission to use, copy, modify, and distribute this software -for any purpose and without fee is hereby granted, provided -that the above copyright notice appear in all copies and that -both the copyright notice and this permission notice appear in -supporting documentation, and that the name of Silicon -Graphics, Inc. not be used in advertising or publicity -pertaining to distribution of the software without specific, -written prior permission. - -THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU -"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR -OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO -EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE -ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER, -INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE, -SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR -NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR -PERFORMANCE OF THIS SOFTWARE. - -US Government Users Restricted Rights - -Use, duplication, or disclosure by the Government is subject to -restrictions set forth in FAR 52.227.19(c)(2) or subparagraph -(c)(1)(ii) of the Rights in Technical Data and Computer -Software clause at DFARS 252.227-7013 and/or in similar or -successor clauses in the FAR or the DOD or NASA FAR -Supplement. Unpublished-- rights reserved under the copyright -laws of the United States. Contractor/manufacturer is Silicon -Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA -94039-7311. - -OpenGL(TM) is a trademark of Silicon Graphics, Inc. -*/ - -#include -#include -#include -#include "GL/glut.h" - -/* Some files do not define M_PI... */ -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -static GLUquadricObj *quadObj; - -#define QUAD_OBJ_INIT() { if(!quadObj) initQuadObj(); } - -static void -initQuadObj(void) -{ - quadObj = gluNewQuadric(); -/* if (!quadObj) - __glutFatalError("out of memory."); */ -} - -/* CENTRY */ -void APIENTRY -glutWireSphere(GLdouble radius, GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_LINE); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluSphere(quadObj, radius, slices, stacks); -} - -void APIENTRY -glutSolidSphere(GLdouble radius, GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_FILL); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluSphere(quadObj, radius, slices, stacks); -} - -void APIENTRY -glutWireCone(GLdouble base, GLdouble height, - GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_LINE); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluCylinder(quadObj, base, 0.0, height, slices, stacks); -} - -void APIENTRY -glutSolidCone(GLdouble base, GLdouble height, - GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_FILL); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluCylinder(quadObj, base, 0.0, height, slices, stacks); -} - -/* ENDCENTRY */ - -static void -drawBox(GLfloat size, GLenum type) -{ - static GLfloat n[6][3] = - { - {-1.0, 0.0, 0.0}, - {0.0, 1.0, 0.0}, - {1.0, 0.0, 0.0}, - {0.0, -1.0, 0.0}, - {0.0, 0.0, 1.0}, - {0.0, 0.0, -1.0} - }; - static GLint faces[6][4] = - { - {0, 1, 2, 3}, - {3, 2, 6, 7}, - {7, 6, 5, 4}, - {4, 5, 1, 0}, - {5, 6, 2, 1}, - {7, 4, 0, 3} - }; - GLfloat v[8][3]; - GLint i; - - v[0][0] = v[1][0] = v[2][0] = v[3][0] = -size / 2; - v[4][0] = v[5][0] = v[6][0] = v[7][0] = size / 2; - v[0][1] = v[1][1] = v[4][1] = v[5][1] = -size / 2; - v[2][1] = v[3][1] = v[6][1] = v[7][1] = size / 2; - v[0][2] = v[3][2] = v[4][2] = v[7][2] = -size / 2; - v[1][2] = v[2][2] = v[5][2] = v[6][2] = size / 2; - - for (i = 5; i >= 0; i--) { - glBegin(type); -/* glNormal3fv(&n[i][0]); */ - glVertex3fv(&v[faces[i][0]][0]); - glVertex3fv(&v[faces[i][1]][0]); - glVertex3fv(&v[faces[i][2]][0]); - glVertex3fv(&v[faces[i][3]][0]); - glEnd(); - } -} - -/* CENTRY */ -void APIENTRY -glutWireCube(GLdouble size) -{ - drawBox(size, GL_LINE_LOOP); -} - -void APIENTRY -glutSolidCube(GLdouble size) -{ - drawBox(size, GL_QUADS); -} - -/* ENDCENTRY */ - -static void -doughnut(GLfloat r, GLfloat R, GLint nsides, GLint rings) -{ - int i, j; - GLfloat theta, phi, theta1; - GLfloat cosTheta, sinTheta; - GLfloat cosTheta1, sinTheta1; - GLfloat ringDelta, sideDelta; - - ringDelta = 2.0 * M_PI / rings; - sideDelta = 2.0 * M_PI / nsides; - - theta = 0.0; - cosTheta = 1.0; - sinTheta = 0.0; - for (i = rings - 1; i >= 0; i--) { - theta1 = theta + ringDelta; - cosTheta1 = cos(theta1); - sinTheta1 = sin(theta1); - glBegin(GL_QUAD_STRIP); - phi = 0.0; - for (j = nsides; j >= 0; j--) { - GLfloat cosPhi, sinPhi, dist; - - phi += sideDelta; - cosPhi = cos(phi); - sinPhi = sin(phi); - dist = R + r * cosPhi; - -/* glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi, sinPhi); */ - glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, r * sinPhi); -/* glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi); */ - glVertex3f(cosTheta * dist, -sinTheta * dist, r * sinPhi); - } - glEnd(); - theta = theta1; - cosTheta = cosTheta1; - sinTheta = sinTheta1; - } -} - -/* CENTRY */ -void APIENTRY -glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, - GLint nsides, GLint rings) -{ -/* glPushAttrib(GL_POLYGON_BIT); */ -/* glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); */ - doughnut(innerRadius, outerRadius, nsides, rings); -/* glPopAttrib(); */ -} - -void APIENTRY -glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, - GLint nsides, GLint rings) -{ - doughnut(innerRadius, outerRadius, nsides, rings); -} - -/* ENDCENTRY */ - -static GLfloat dodec[20][3]; - -static void -initDodecahedron(void) -{ - GLfloat alpha, beta; - - alpha = sqrt(2.0 / (3.0 + sqrt(5.0))); - beta = 1.0 + sqrt(6.0 / (3.0 + sqrt(5.0)) - - 2.0 + 2.0 * sqrt(2.0 / (3.0 + sqrt(5.0)))); - /* *INDENT-OFF* */ - dodec[0][0] = -alpha; dodec[0][1] = 0; dodec[0][2] = beta; - dodec[1][0] = alpha; dodec[1][1] = 0; dodec[1][2] = beta; - dodec[2][0] = -1; dodec[2][1] = -1; dodec[2][2] = -1; - dodec[3][0] = -1; dodec[3][1] = -1; dodec[3][2] = 1; - dodec[4][0] = -1; dodec[4][1] = 1; dodec[4][2] = -1; - dodec[5][0] = -1; dodec[5][1] = 1; dodec[5][2] = 1; - dodec[6][0] = 1; dodec[6][1] = -1; dodec[6][2] = -1; - dodec[7][0] = 1; dodec[7][1] = -1; dodec[7][2] = 1; - dodec[8][0] = 1; dodec[8][1] = 1; dodec[8][2] = -1; - dodec[9][0] = 1; dodec[9][1] = 1; dodec[9][2] = 1; - dodec[10][0] = beta; dodec[10][1] = alpha; dodec[10][2] = 0; - dodec[11][0] = beta; dodec[11][1] = -alpha; dodec[11][2] = 0; - dodec[12][0] = -beta; dodec[12][1] = alpha; dodec[12][2] = 0; - dodec[13][0] = -beta; dodec[13][1] = -alpha; dodec[13][2] = 0; - dodec[14][0] = -alpha; dodec[14][1] = 0; dodec[14][2] = -beta; - dodec[15][0] = alpha; dodec[15][1] = 0; dodec[15][2] = -beta; - dodec[16][0] = 0; dodec[16][1] = beta; dodec[16][2] = alpha; - dodec[17][0] = 0; dodec[17][1] = beta; dodec[17][2] = -alpha; - dodec[18][0] = 0; dodec[18][1] = -beta; dodec[18][2] = alpha; - dodec[19][0] = 0; dodec[19][1] = -beta; dodec[19][2] = -alpha; - /* *INDENT-ON* */ - -} - -#define DIFF3(_a,_b,_c) { \ - (_c)[0] = (_a)[0] - (_b)[0]; \ - (_c)[1] = (_a)[1] - (_b)[1]; \ - (_c)[2] = (_a)[2] - (_b)[2]; \ -} - -static void -crossprod(GLfloat v1[3], GLfloat v2[3], GLfloat prod[3]) -{ - GLfloat p[3]; /* in case prod == v1 or v2 */ - - p[0] = v1[1] * v2[2] - v2[1] * v1[2]; - p[1] = v1[2] * v2[0] - v2[2] * v1[0]; - p[2] = v1[0] * v2[1] - v2[0] * v1[1]; - prod[0] = p[0]; - prod[1] = p[1]; - prod[2] = p[2]; -} - -static void -normalize(GLfloat v[3]) -{ - GLfloat d; - - d = sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); - if (d == 0.0) { -/* __glutWarning("normalize: zero length vector"); */ - v[0] = d = 1.0; - } - d = 1 / d; - v[0] *= d; - v[1] *= d; - v[2] *= d; -} - -static void -pentagon(int a, int b, int c, int d, int e, GLenum shadeType) -{ - GLfloat n0[3], d1[3], d2[3]; - - DIFF3(dodec[a], dodec[b], d1); - DIFF3(dodec[b], dodec[c], d2); - crossprod(d1, d2, n0); - normalize(n0); - - glBegin(shadeType); -/* glNormal3fv(n0); */ - glVertex3fv(&dodec[a][0]); - glVertex3fv(&dodec[b][0]); - glVertex3fv(&dodec[c][0]); - glVertex3fv(&dodec[d][0]); - glVertex3fv(&dodec[e][0]); - glEnd(); -} - -static void -dodecahedron(GLenum type) -{ - static int inited = 0; - - if (inited == 0) { - inited = 1; - initDodecahedron(); - } - pentagon(0, 1, 9, 16, 5, type); - pentagon(1, 0, 3, 18, 7, type); - pentagon(1, 7, 11, 10, 9, type); - pentagon(11, 7, 18, 19, 6, type); - pentagon(8, 17, 16, 9, 10, type); - pentagon(2, 14, 15, 6, 19, type); - pentagon(2, 13, 12, 4, 14, type); - pentagon(2, 19, 18, 3, 13, type); - pentagon(3, 0, 5, 12, 13, type); - pentagon(6, 15, 8, 10, 11, type); - pentagon(4, 17, 8, 15, 14, type); - pentagon(4, 12, 5, 16, 17, type); -} - -/* CENTRY */ -void APIENTRY -glutWireDodecahedron(void) -{ - dodecahedron(GL_LINE_LOOP); -} - -void APIENTRY -glutSolidDodecahedron(void) -{ - dodecahedron(GL_TRIANGLE_FAN); -} - -/* ENDCENTRY */ - -static void -recorditem(GLfloat * n1, GLfloat * n2, GLfloat * n3, - GLenum shadeType) -{ - GLfloat q0[3], q1[3]; - - DIFF3(n1, n2, q0); - DIFF3(n2, n3, q1); - crossprod(q0, q1, q1); - normalize(q1); - - glBegin(shadeType); -/* glNormal3fv(q1); */ - glVertex3fv(n1); - glVertex3fv(n2); - glVertex3fv(n3); - glEnd(); -} - -static void -subdivide(GLfloat * v0, GLfloat * v1, GLfloat * v2, - GLenum shadeType) -{ - int depth; - GLfloat w0[3], w1[3], w2[3]; - GLfloat l; - int i, j, k, n; - - depth = 1; - for (i = 0; i < depth; i++) { - for (j = 0; i + j < depth; j++) { - k = depth - i - j; - for (n = 0; n < 3; n++) { - w0[n] = (i * v0[n] + j * v1[n] + k * v2[n]) / depth; - w1[n] = ((i + 1) * v0[n] + j * v1[n] + (k - 1) * v2[n]) - / depth; - w2[n] = (i * v0[n] + (j + 1) * v1[n] + (k - 1) * v2[n]) - / depth; - } - l = sqrt(w0[0] * w0[0] + w0[1] * w0[1] + w0[2] * w0[2]); - w0[0] /= l; - w0[1] /= l; - w0[2] /= l; - l = sqrt(w1[0] * w1[0] + w1[1] * w1[1] + w1[2] * w1[2]); - w1[0] /= l; - w1[1] /= l; - w1[2] /= l; - l = sqrt(w2[0] * w2[0] + w2[1] * w2[1] + w2[2] * w2[2]); - w2[0] /= l; - w2[1] /= l; - w2[2] /= l; - recorditem(w1, w0, w2, shadeType); - } - } -} - -static void -drawtriangle(int i, GLfloat data[][3], int ndx[][3], - GLenum shadeType) -{ - GLfloat *x0, *x1, *x2; - - x0 = data[ndx[i][0]]; - x1 = data[ndx[i][1]]; - x2 = data[ndx[i][2]]; - subdivide(x0, x1, x2, shadeType); -} - -/* octahedron data: The octahedron produced is centered at the - origin and has radius 1.0 */ -static GLfloat odata[6][3] = -{ - {1.0, 0.0, 0.0}, - {-1.0, 0.0, 0.0}, - {0.0, 1.0, 0.0}, - {0.0, -1.0, 0.0}, - {0.0, 0.0, 1.0}, - {0.0, 0.0, -1.0} -}; - -static int ondex[8][3] = -{ - {0, 4, 2}, - {1, 2, 4}, - {0, 3, 4}, - {1, 4, 3}, - {0, 2, 5}, - {1, 5, 2}, - {0, 5, 3}, - {1, 3, 5} -}; - -static void -octahedron(GLenum shadeType) -{ - int i; - - for (i = 7; i >= 0; i--) { - drawtriangle(i, odata, ondex, shadeType); - } -} - -/* CENTRY */ -void APIENTRY -glutWireOctahedron(void) -{ - octahedron(GL_LINE_LOOP); -} - -void APIENTRY -glutSolidOctahedron(void) -{ - octahedron(GL_TRIANGLES); -} - -/* ENDCENTRY */ - -/* icosahedron data: These numbers are rigged to make an - icosahedron of radius 1.0 */ - -#define X .525731112119133606 -#define Z .850650808352039932 - -static GLfloat idata[12][3] = -{ - {-X, 0, Z}, - {X, 0, Z}, - {-X, 0, -Z}, - {X, 0, -Z}, - {0, Z, X}, - {0, Z, -X}, - {0, -Z, X}, - {0, -Z, -X}, - {Z, X, 0}, - {-Z, X, 0}, - {Z, -X, 0}, - {-Z, -X, 0} -}; - -static int index[20][3] = -{ - {0, 4, 1}, - {0, 9, 4}, - {9, 5, 4}, - {4, 5, 8}, - {4, 8, 1}, - {8, 10, 1}, - {8, 3, 10}, - {5, 3, 8}, - {5, 2, 3}, - {2, 7, 3}, - {7, 10, 3}, - {7, 6, 10}, - {7, 11, 6}, - {11, 0, 6}, - {0, 1, 6}, - {6, 1, 10}, - {9, 0, 11}, - {9, 11, 2}, - {9, 2, 5}, - {7, 2, 11}, -}; - -static void -icosahedron(GLenum shadeType) -{ - int i; - - for (i = 19; i >= 0; i--) { - drawtriangle(i, idata, index, shadeType); - } -} - -/* CENTRY */ -void APIENTRY -glutWireIcosahedron(void) -{ - icosahedron(GL_LINE_LOOP); -} - -void APIENTRY -glutSolidIcosahedron(void) -{ - icosahedron(GL_TRIANGLES); -} - -/* ENDCENTRY */ - -/* tetrahedron data: */ - -#define T 1.73205080756887729 - -static GLfloat tdata[4][3] = -{ - {T, T, T}, - {T, -T, -T}, - {-T, T, -T}, - {-T, -T, T} -}; - -static int tndex[4][3] = -{ - {0, 1, 3}, - {2, 1, 0}, - {3, 2, 0}, - {1, 2, 3} -}; - -static void -tetrahedron(GLenum shadeType) -{ - int i; - - for (i = 3; i >= 0; i--) - drawtriangle(i, tdata, tndex, shadeType); -} - -/* CENTRY */ -void APIENTRY -glutWireTetrahedron(void) -{ - tetrahedron(GL_LINE_LOOP); -} - -void APIENTRY -glutSolidTetrahedron(void) -{ - tetrahedron(GL_TRIANGLES); -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/overlay.c b/nx-X11/extras/Mesa_6.4.2/src/glut/mini/overlay.c deleted file mode 100644 index fc8a8e5b0d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/overlay.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.4 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * DOS/DJGPP glut driver v1.0 for Mesa 4.0 - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#include "GL/glut.h" - - -void APIENTRY glutEstablishOverlay (void) -{ -} - - -void APIENTRY glutRemoveOverlay (void) -{ -} - - -void APIENTRY glutUseLayer (GLenum layer) -{ -} - - -void APIENTRY glutPostOverlayRedisplay (void) -{ -} - - -void APIENTRY glutShowOverlay (void) -{ -} - - -void APIENTRY glutHideOverlay (void) -{ -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/state.c b/nx-X11/extras/Mesa_6.4.2/src/glut/mini/state.c deleted file mode 100644 index 81aefc53bd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/state.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.4 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * DOS/DJGPP glut driver v1.0 for Mesa 4.0 - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#include "GL/glut.h" -#include - - -#define TIMEDELTA(dest, src1, src2) { \ - if(((dest).tv_usec = (src1).tv_usec - (src2).tv_usec) < 0) { \ - (dest).tv_usec += 1000000; \ - (dest).tv_sec = (src1).tv_sec - (src2).tv_sec - 1; \ - } else { \ - (dest).tv_sec = (src1).tv_sec - (src2).tv_sec; \ - } \ -} - -int APIENTRY glutGet (GLenum type) -{ - - switch (type) { - case GLUT_WINDOW_RGBA: - return 1; - case GLUT_ELAPSED_TIME: { - static int inited = 0; - static struct timeval elapsed, beginning, now; - if (!inited) { - gettimeofday(&beginning, 0); - inited = 1; - } - gettimeofday(&now, 0); - TIMEDELTA(elapsed, now, beginning); - /* Return elapsed milliseconds. */ - return (int) ((elapsed.tv_sec * 1000) + (elapsed.tv_usec / 1000)); - } - default: - return 0; - } -} - - -int APIENTRY glutDeviceGet (GLenum type) -{ - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/teapot.c b/nx-X11/extras/Mesa_6.4.2/src/glut/mini/teapot.c deleted file mode 100644 index ec2a207763..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/teapot.c +++ /dev/null @@ -1,214 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/** -(c) Copyright 1993, Silicon Graphics, Inc. - -ALL RIGHTS RESERVED - -Permission to use, copy, modify, and distribute this software -for any purpose and without fee is hereby granted, provided -that the above copyright notice appear in all copies and that -both the copyright notice and this permission notice appear in -supporting documentation, and that the name of Silicon -Graphics, Inc. not be used in advertising or publicity -pertaining to distribution of the software without specific, -written prior permission. - -THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU -"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR -OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO -EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE -ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER, -INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE, -SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR -NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR -PERFORMANCE OF THIS SOFTWARE. - -US Government Users Restricted Rights - -Use, duplication, or disclosure by the Government is subject to -restrictions set forth in FAR 52.227.19(c)(2) or subparagraph -(c)(1)(ii) of the Rights in Technical Data and Computer -Software clause at DFARS 252.227-7013 and/or in similar or -successor clauses in the FAR or the DOD or NASA FAR -Supplement. Unpublished-- rights reserved under the copyright -laws of the United States. Contractor/manufacturer is Silicon -Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA -94039-7311. - -OpenGL(TM) is a trademark of Silicon Graphics, Inc. -*/ - -#include -#include -#include "GL/glut.h" - -/* Rim, body, lid, and bottom data must be reflected in x and - y; handle and spout data across the y axis only. */ - -static int patchdata[][16] = -{ - /* rim */ - {102, 103, 104, 105, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15}, - /* body */ - {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27}, - {24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40}, - /* lid */ - {96, 96, 96, 96, 97, 98, 99, 100, 101, 101, 101, - 101, 0, 1, 2, 3,}, - {0, 1, 2, 3, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117}, - /* bottom */ - {118, 118, 118, 118, 124, 122, 119, 121, 123, 126, - 125, 120, 40, 39, 38, 37}, - /* handle */ - {41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56}, - {53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 28, 65, 66, 67}, - /* spout */ - {68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83}, - {80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95} -}; -/* *INDENT-OFF* */ - -static float cpdata[][3] = -{ - {0.2, 0, 2.7}, {0.2, -0.112, 2.7}, {0.112, -0.2, 2.7}, {0, - -0.2, 2.7}, {1.3375, 0, 2.53125}, {1.3375, -0.749, 2.53125}, - {0.749, -1.3375, 2.53125}, {0, -1.3375, 2.53125}, {1.4375, - 0, 2.53125}, {1.4375, -0.805, 2.53125}, {0.805, -1.4375, - 2.53125}, {0, -1.4375, 2.53125}, {1.5, 0, 2.4}, {1.5, -0.84, - 2.4}, {0.84, -1.5, 2.4}, {0, -1.5, 2.4}, {1.75, 0, 1.875}, - {1.75, -0.98, 1.875}, {0.98, -1.75, 1.875}, {0, -1.75, - 1.875}, {2, 0, 1.35}, {2, -1.12, 1.35}, {1.12, -2, 1.35}, - {0, -2, 1.35}, {2, 0, 0.9}, {2, -1.12, 0.9}, {1.12, -2, - 0.9}, {0, -2, 0.9}, {-2, 0, 0.9}, {2, 0, 0.45}, {2, -1.12, - 0.45}, {1.12, -2, 0.45}, {0, -2, 0.45}, {1.5, 0, 0.225}, - {1.5, -0.84, 0.225}, {0.84, -1.5, 0.225}, {0, -1.5, 0.225}, - {1.5, 0, 0.15}, {1.5, -0.84, 0.15}, {0.84, -1.5, 0.15}, {0, - -1.5, 0.15}, {-1.6, 0, 2.025}, {-1.6, -0.3, 2.025}, {-1.5, - -0.3, 2.25}, {-1.5, 0, 2.25}, {-2.3, 0, 2.025}, {-2.3, -0.3, - 2.025}, {-2.5, -0.3, 2.25}, {-2.5, 0, 2.25}, {-2.7, 0, - 2.025}, {-2.7, -0.3, 2.025}, {-3, -0.3, 2.25}, {-3, 0, - 2.25}, {-2.7, 0, 1.8}, {-2.7, -0.3, 1.8}, {-3, -0.3, 1.8}, - {-3, 0, 1.8}, {-2.7, 0, 1.575}, {-2.7, -0.3, 1.575}, {-3, - -0.3, 1.35}, {-3, 0, 1.35}, {-2.5, 0, 1.125}, {-2.5, -0.3, - 1.125}, {-2.65, -0.3, 0.9375}, {-2.65, 0, 0.9375}, {-2, - -0.3, 0.9}, {-1.9, -0.3, 0.6}, {-1.9, 0, 0.6}, {1.7, 0, - 1.425}, {1.7, -0.66, 1.425}, {1.7, -0.66, 0.6}, {1.7, 0, - 0.6}, {2.6, 0, 1.425}, {2.6, -0.66, 1.425}, {3.1, -0.66, - 0.825}, {3.1, 0, 0.825}, {2.3, 0, 2.1}, {2.3, -0.25, 2.1}, - {2.4, -0.25, 2.025}, {2.4, 0, 2.025}, {2.7, 0, 2.4}, {2.7, - -0.25, 2.4}, {3.3, -0.25, 2.4}, {3.3, 0, 2.4}, {2.8, 0, - 2.475}, {2.8, -0.25, 2.475}, {3.525, -0.25, 2.49375}, - {3.525, 0, 2.49375}, {2.9, 0, 2.475}, {2.9, -0.15, 2.475}, - {3.45, -0.15, 2.5125}, {3.45, 0, 2.5125}, {2.8, 0, 2.4}, - {2.8, -0.15, 2.4}, {3.2, -0.15, 2.4}, {3.2, 0, 2.4}, {0, 0, - 3.15}, {0.8, 0, 3.15}, {0.8, -0.45, 3.15}, {0.45, -0.8, - 3.15}, {0, -0.8, 3.15}, {0, 0, 2.85}, {1.4, 0, 2.4}, {1.4, - -0.784, 2.4}, {0.784, -1.4, 2.4}, {0, -1.4, 2.4}, {0.4, 0, - 2.55}, {0.4, -0.224, 2.55}, {0.224, -0.4, 2.55}, {0, -0.4, - 2.55}, {1.3, 0, 2.55}, {1.3, -0.728, 2.55}, {0.728, -1.3, - 2.55}, {0, -1.3, 2.55}, {1.3, 0, 2.4}, {1.3, -0.728, 2.4}, - {0.728, -1.3, 2.4}, {0, -1.3, 2.4}, {0, 0, 0}, {1.425, - -0.798, 0}, {1.5, 0, 0.075}, {1.425, 0, 0}, {0.798, -1.425, - 0}, {0, -1.5, 0.075}, {0, -1.425, 0}, {1.5, -0.84, 0.075}, - {0.84, -1.5, 0.075} -}; - -static float tex[2][2][2] = -{ - { {0, 0}, - {1, 0}}, - { {0, 1}, - {1, 1}} -}; - -/* *INDENT-ON* */ - -static void -teapot(GLint grid, GLdouble scale, GLenum type) -{ - float p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3]; - long i, j, k, l; - -#if 0 - glPushAttrib(GL_ENABLE_BIT | GL_EVAL_BIT); - glEnable(GL_AUTO_NORMAL); - glEnable(GL_NORMALIZE); - glEnable(GL_MAP2_VERTEX_3); - glEnable(GL_MAP2_TEXTURE_COORD_2); - glPushMatrix(); - glRotatef(270.0, 1.0, 0.0, 0.0); - glScalef(0.5 * scale, 0.5 * scale, 0.5 * scale); - glTranslatef(0.0, 0.0, -1.5); - for (i = 0; i < 10; i++) { - for (j = 0; j < 4; j++) { - for (k = 0; k < 4; k++) { - for (l = 0; l < 3; l++) { - p[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; - q[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l]; - if (l == 1) - q[j][k][l] *= -1.0; - if (i < 6) { - r[j][k][l] = - cpdata[patchdata[i][j * 4 + (3 - k)]][l]; - if (l == 0) - r[j][k][l] *= -1.0; - s[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; - if (l == 0) - s[j][k][l] *= -1.0; - if (l == 1) - s[j][k][l] *= -1.0; - } - } - } - } - glMap2f(GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2, - &tex[0][0][0]); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &p[0][0][0]); - glMapGrid2f(grid, 0.0, 1.0, grid, 0.0, 1.0); - glEvalMesh2(type, 0, grid, 0, grid); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &q[0][0][0]); - glEvalMesh2(type, 0, grid, 0, grid); - if (i < 6) { - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &r[0][0][0]); - glEvalMesh2(type, 0, grid, 0, grid); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &s[0][0][0]); - glEvalMesh2(type, 0, grid, 0, grid); - } - } - glPopMatrix(); - glPopAttrib(); -#endif -} - -/* CENTRY */ -void APIENTRY -glutSolidTeapot(GLdouble scale) -{ - teapot(7, scale, GL_FILL); -} - -void APIENTRY -glutWireTeapot(GLdouble scale) -{ - teapot(10, scale, GL_LINE); -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/window.c b/nx-X11/extras/Mesa_6.4.2/src/glut/mini/window.c deleted file mode 100644 index 73266769c5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/mini/window.c +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.1 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * DOS/DJGPP glut driver v1.2 for Mesa 4.1 - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#include -#include -#include "GL/glut.h" -#include "internal.h" - -#define USE_MINI_GLX 1 -#if USE_MINI_GLX -#include "GL/miniglx.h" -#else -#include -#endif - - - -static GLXContext context = 0; -static Window win; -static XVisualInfo *visinfo = 0; -static Display *dpy = 0; - - -int APIENTRY glutCreateWindow (const char *title) -{ - XSetWindowAttributes attr; - unsigned long mask; - GLXContext ctx; - int scrnum = 0; - Window root = RootWindow( dpy, scrnum ); - - if (win) - return 0; - - if (!dpy) { - dpy = XOpenDisplay(NULL); - if (!dpy) { - printf("Error: XOpenDisplay failed\n"); - exit(1); - } - } - - if (!visinfo) { - int attrib[] = {GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DEPTH_SIZE, 1, - GLX_DOUBLEBUFFER, - None }; - - - visinfo = glXChooseVisual( dpy, scrnum, attrib ); - if (!visinfo) { - printf("Error: couldn't get an RGB, Double-buffered visual\n"); - exit(1); - } - } - - /* window attributes */ - attr.background_pixel = 0; - attr.border_pixel = 0; - attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone); - attr.event_mask = StructureNotifyMask | ExposureMask; - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow( dpy, root, 0, 0, g_width, g_height, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr ); - if (!win) { - printf("Error: XCreateWindow failed\n"); - exit(1); - } - - ctx = glXCreateContext( dpy, visinfo, NULL, True ); - if (!ctx) { - printf("Error: glXCreateContext failed\n"); - exit(1); - } - - if (!glXMakeCurrent( dpy, win, ctx )) { - printf("Error: glXMakeCurrent failed\n"); - exit(1); - } - - if (!(g_display_mode & GLUT_DOUBLE)) - glDrawBuffer( GL_FRONT ); - - - XMapWindow( dpy, win ); - -#if !USE_MINI_GLX - { - XEvent e; - while (1) { - XNextEvent( dpy, &e ); - if (e.type == MapNotify && e.xmap.window == win) { - break; - } - } - } -#endif - - return 1; -} - - -int APIENTRY glutCreateSubWindow (int win, int x, int y, int width, int height) -{ - return GL_FALSE; -} - - -void APIENTRY glutDestroyWindow (int idx) -{ - if (dpy && win) - XDestroyWindow( dpy, win ); - - if (dpy) - XCloseDisplay( dpy ); - - win = 0; - dpy = 0; -} - - -void APIENTRY glutPostRedisplay (void) -{ - g_redisplay = GL_TRUE; -} - - -void APIENTRY glutSwapBuffers (void) -{ -/* if (g_mouse) pc_scare_mouse(); */ - if (dpy && win) glXSwapBuffers( dpy, win ); -/* if (g_mouse) pc_unscare_mouse(); */ -} - - -int APIENTRY glutGetWindow (void) -{ - return 0; -} - - -void APIENTRY glutSetWindow (int win) -{ -} - - -void APIENTRY glutSetWindowTitle (const char *title) -{ -} - - -void APIENTRY glutSetIconTitle (const char *title) -{ -} - - -void APIENTRY glutPositionWindow (int x, int y) -{ -} - - -void APIENTRY glutReshapeWindow (int width, int height) -{ -} - - -void APIENTRY glutPopWindow (void) -{ -} - - -void APIENTRY glutPushWindow (void) -{ -} - - -void APIENTRY glutIconifyWindow (void) -{ -} - - -void APIENTRY glutShowWindow (void) -{ -} - - -void APIENTRY glutHideWindow (void) -{ -} - -void APIENTRY glutMainLoop (void) -{ - GLboolean idle; - GLboolean have_event; - XEvent evt; - int visible = 0; - - glutPostRedisplay(); - if (reshape_func) reshape_func(g_width, g_height); - - while (GL_TRUE) { - idle = GL_TRUE; - - - if (visible && idle_func) - have_event = XCheckMaskEvent( dpy, ~0, &evt ); - else - have_event = XNextEvent( dpy, &evt ); - - if (have_event) { - idle = GL_FALSE; - switch(evt.type) { - case MapNotify: - if (visibility_func) { - visibility_func(GLUT_VISIBLE); - } - visible = 1; - break; - case UnmapNotify: - if (visibility_func) { - visibility_func(GLUT_NOT_VISIBLE); - } - visible = 0; - break; - case Expose: - g_redisplay = 1; - break; - } - } - - if (visible && g_redisplay && display_func) { - idle = GL_FALSE; - g_redisplay = GL_FALSE; - - display_func(); - } - - if (visible && idle && idle_func) { - idle_func(); - } - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/Makefile b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/Makefile deleted file mode 100644 index 56ad4e4c47..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/Makefile +++ /dev/null @@ -1,420 +0,0 @@ -# Makefile -# Created by IBM WorkFrame/2 MakeMake at 12:46:25 on 3 June 2003 -# -# The actions included in this make file are: -# Compile::C++ Compiler -# Link::Linker -# Lib::Import Lib - -.SUFFIXES: - -.SUFFIXES: \ - .LIB .cpp .dll .obj - -.cpp.obj: - @echo " Compile::C++ Compiler " - icc.exe /I..\ /I..\X86 /I..\GL /I..\swrast /I..\swrast_setup /Ss /Wcmpcndcnscnvcpydclenuextgeninilanobsordparporppcprorearettrdtruund /Tx /O /Gm /Ge- /G5 /Gf /Gi /Oi /C %s - -{G:\EVGEN\MESA5\src-glut.os2pm}.cpp.obj: - @echo " Compile::C++ Compiler " - icc.exe /I..\ /I..\X86 /I..\GL /I..\swrast /I..\swrast_setup /Ss /Wcmpcndcnscnvcpydclenuextgeninilanobsordparporppcprorearettrdtruund /Tx /O /Gm /Ge- /G5 /Gf /Gi /Oi /C %s - -.dll.LIB: - @echo " Lib::Import Lib " - implib.exe %|dpfF.LIB %s - -{G:\EVGEN\MESA5\src-glut.os2pm}.dll.LIB: - @echo " Lib::Import Lib " - implib.exe %|dpfF.LIB %s - -all: \ - .\libGlut.LIB - -.\libGlut.dll: \ - .\os2_winproc.obj \ - .\WarpWin.obj \ - .\glutOverlay.obj \ - .\glut_8x13.obj \ - .\glut_9x15.obj \ - .\glut_bitmap.obj \ - .\glut_cindex.obj \ - .\glut_cmap.obj \ - .\glut_cursor.obj \ - .\glut_event.obj \ - .\glut_ext.obj \ - .\glut_fullscrn.obj \ - .\glut_gamemode.obj \ - .\glut_get.obj \ - .\glut_hel10.obj \ - .\glut_hel12.obj \ - .\glut_hel18.obj \ - .\glut_init.obj \ - .\glut_input.obj \ - .\glut_key.obj \ - .\glut_keyctrl.obj \ - .\glut_keyup.obj \ - .\glut_mesa.obj \ - .\glut_modifier.obj \ - .\glut_roman.obj \ - .\glut_shapes.obj \ - .\glut_stroke.obj \ - .\glut_swap.obj \ - .\glut_teapot.obj \ - .\glut_tr24.obj \ - .\glut_util.obj \ - .\glut_vidresize.obj \ - .\glut_warp.obj \ - .\glut_win.obj \ - .\glut_winmisc.obj \ - .\os2_glx.obj \ - .\os2_menu.obj \ - ..\si-glu\libGLU.lib \ - ..\MesaDll\MesaGL2.lib \ - ..\drv\DrvLoad\MesaDrvLoad.lib \ - {$(LIB)}libGlut.DEF - @echo " Link::Linker " - icc.exe @<< - /B" /dbgpack /exepack:2 /st:200000 /packd /optfunc" - /FelibGlut.dll - ..\si-glu\libGLU.lib - ..\MesaDll\MesaGL2.lib - ..\drv\DrvLoad\MesaDrvLoad.lib - libGlut.DEF - .\os2_winproc.obj - .\WarpWin.obj - .\glutOverlay.obj - .\glut_8x13.obj - .\glut_9x15.obj - .\glut_bitmap.obj - .\glut_cindex.obj - .\glut_cmap.obj - .\glut_cursor.obj - .\glut_event.obj - .\glut_ext.obj - .\glut_fullscrn.obj - .\glut_gamemode.obj - .\glut_get.obj - .\glut_hel10.obj - .\glut_hel12.obj - .\glut_hel18.obj - .\glut_init.obj - .\glut_input.obj - .\glut_key.obj - .\glut_keyctrl.obj - .\glut_keyup.obj - .\glut_mesa.obj - .\glut_modifier.obj - .\glut_roman.obj - .\glut_shapes.obj - .\glut_stroke.obj - .\glut_swap.obj - .\glut_teapot.obj - .\glut_tr24.obj - .\glut_util.obj - .\glut_vidresize.obj - .\glut_warp.obj - .\glut_win.obj - .\glut_winmisc.obj - .\os2_glx.obj - .\os2_menu.obj -<< - -.\os2_winproc.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\os2_winproc.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h \ - gl\os2mesa.h \ - gl\gl.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}gl_mangle.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2_config.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2mesadef.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}context.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glapi.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}mtypes.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glheader.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}config.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glapitable.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glthread.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}math/m_matrix.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}Trace/tr_context.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}dd.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}conf.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_config.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/glext.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}Xthreads.h - -.\os2_menu.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\os2_menu.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\os2_glx.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\os2_glx.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - gl\os2mesa.h \ - gl\gl.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}gl_mangle.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2_config.h - -.\glut_winmisc.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_winmisc.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_win.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_win.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutos2.h \ - gl\os2mesa.h \ - gl\gl.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}gl_mangle.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2_config.h - -.\glut_warp.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_warp.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_vidresize.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_vidresize.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_util.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_util.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_tr24.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_tr24.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h - -.\glut_teapot.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_teapot.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_swap.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_swap.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_stroke.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_stroke.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutstroke.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_shapes.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_shapes.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_roman.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_roman.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutstroke.h - -.\glut_modifier.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_modifier.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_mesa.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_mesa.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_keyup.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_keyup.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_keyctrl.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_keyctrl.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_key.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_key.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_input.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_input.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_init.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_init.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_hel18.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_hel18.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h - -.\glut_hel12.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_hel12.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h - -.\glut_hel10.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_hel10.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h - -.\glut_get.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_get.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_gamemode.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_gamemode.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_fullscrn.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_fullscrn.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_ext.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_ext.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_event.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_event.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_cursor.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_cursor.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_cmap.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_cmap.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}layerutil.h - -.\glut_cindex.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_cindex.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_bitmap.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_bitmap.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\glut_9x15.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_9x15.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h - -.\glut_8x13.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glut_8x13.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h - -.\glutOverlay.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\glutOverlay.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutstroke.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h - -.\WarpWin.obj: \ - G:\EVGEN\MESA5\src-glut.os2pm\WarpWin.cpp \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpWin.h \ - {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h - -.\libGlut.LIB: \ - .\libGlut.dll diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/WarpWin.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/WarpWin.cpp deleted file mode 100644 index ee746ecc76..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/WarpWin.cpp +++ /dev/null @@ -1,420 +0,0 @@ -/* WarpWin.c */ -/* glut for Warp */ -#include -#include - -#include "WarpWin.h" -#include "WarpGL.h" - -#define POKA 0 - -/* global variables that must be set for some functions to operate - correctly. */ -HDC XHDC; -HWND XHWND; - - -void -XStoreColor(Display* display, Colormap colormap, XColor* color) -{ - /* KLUDGE: set XHDC to 0 if the palette should NOT be realized after - setting the color. set XHDC to the correct HDC if it should. */ - - LONG pe; - ULONG cclr; - int r,g,b; - /* X11 stores color from 0-65535, Win32 expects them to be 0-256, so - twiddle the bits ( / 256). */ - r = color->red / 256; - g = color->green / 256; - b = color->blue / 256; - pe = LONGFromRGB(r,g,b); - /* make sure we use this flag, otherwise the colors might get mapped - to another place in the colormap, and when we glIndex() that - color, it may have moved (argh!!) */ - pe |= (PC_NOCOLLAPSE<<24); -/* This function changes the entries in a palette. */ -#if POKA -OS2: - rc = GpiSetPaletteEntries(colormap,LCOLF_CONSECRGB, color->pixel, 1, &pe); - GpiSelectPalette(hps,colormap); - WinRealizePalette(hwnd,hps,&cclr); -source Win: - if (XHDC) { - UnrealizeObject(colormap); - SelectPalette(XHDC, colormap, FALSE); - RealizePalette(XHDC); - - } -#endif -} - -void -XSetWindowColormap(Display* display, Window window, Colormap colormap) -{ -#if POKA - HDC hdc = GetDC(window); - - /* if the third parameter is FALSE, the logical colormap is copied - into the device palette when the application is in the - foreground, if it is TRUE, the colors are mapped into the current - palette in the best possible way. */ - SelectPalette(hdc, colormap, FALSE); - RealizePalette(hdc); - - /* note that we don't have to release the DC, since our window class - uses the WC_OWNDC flag! */ -#endif -} - - -/* display, root and visual - don't used at all */ -Colormap -XCreateColormap(Display* display, Window root, Visual* visual, int alloc) -{ - /* KLUDGE: this function needs XHDC to be set to the HDC currently - being operated on before it is invoked! */ - - HPAL palette; - int n; -#if POKA - PIXELFORMATDESCRIPTOR pfd; - LOGPALETTE *logical; - - /* grab the pixel format */ - memset(&pfd, 0, sizeof(PIXELFORMATDESCRIPTOR)); - DescribePixelFormat(XHDC, GetPixelFormat(XHDC), - sizeof(PIXELFORMATDESCRIPTOR), &pfd); - - if (!(pfd.dwFlags & PFD_NEED_PALETTE || - pfd.iPixelType == PFD_TYPE_COLORINDEX)) - { - return 0; - } - - n = 1 << pfd.cColorBits; - - /* allocate a bunch of memory for the logical palette (assume 256 - colors in a Win32 palette */ - logical = (LOGPALETTE*)malloc(sizeof(LOGPALETTE) + - sizeof(PALETTEENTRY) * n); - memset(logical, 0, sizeof(LOGPALETTE) + sizeof(PALETTEENTRY) * n); - - /* set the entries in the logical palette */ - logical->palVersion = 0x300; - logical->palNumEntries = n; - - /* start with a copy of the current system palette */ - GetSystemPaletteEntries(XHDC, 0, 256, &logical->palPalEntry[0]); - - if (pfd.iPixelType == PFD_TYPE_RGBA) { - int redMask = (1 << pfd.cRedBits) - 1; - int greenMask = (1 << pfd.cGreenBits) - 1; - int blueMask = (1 << pfd.cBlueBits) - 1; - int i; - - /* fill in an RGBA color palette */ - for (i = 0; i < n; ++i) { - logical->palPalEntry[i].peRed = - (((i >> pfd.cRedShift) & redMask) * 255) / redMask; - logical->palPalEntry[i].peGreen = - (((i >> pfd.cGreenShift) & greenMask) * 255) / greenMask; - logical->palPalEntry[i].peBlue = - (((i >> pfd.cBlueShift) & blueMask) * 255) / blueMask; - logical->palPalEntry[i].peFlags = 0; - } - } - - palette = CreatePalette(logical); - free(logical); - - SelectPalette(XHDC, palette, FALSE); - RealizePalette(XHDC); -#endif /* POKA */ - - return palette; -} - - - -int GetSystemMetrics( int mode) -{ RECTL rect; - - switch(mode) - { case SM_CXSCREEN: - WinQueryWindowRect(HWND_DESKTOP,&rect); - return (rect.xRight-rect.xLeft); - break; - case SM_CYSCREEN: - WinQueryWindowRect(HWND_DESKTOP,&rect); - return (rect.yTop-rect.yBottom); - break; - default: ; - } - return 0; -} -/* - * XParseGeometry parses strings of the form - * "=x{+-}{+-}", where - * width, height, xoffset, and yoffset are unsigned integers. - * Example: "=80x24+300-49" - * The equal sign is optional. - * It returns a bitmask that indicates which of the four values - * were actually found in the string. For each value found, - * the corresponding argument is updated; for each value - * not found, the corresponding argument is left unchanged. - */ - -static int -ReadInteger(char *string, char **NextString) -{ - register int Result = 0; - int Sign = 1; - - if (*string == '+') - string++; - else if (*string == '-') - { - string++; - Sign = -1; - } - for (; (*string >= '0') && (*string <= '9'); string++) - { - Result = (Result * 10) + (*string - '0'); - } - *NextString = string; - if (Sign >= 0) - return (Result); - else - return (-Result); -} - -int XParseGeometry(char *string, int *x, int *y, unsigned int *width, unsigned int *height) -{ - int mask = NoValue; - register char *strind; - unsigned int tempWidth, tempHeight; - int tempX, tempY; - char *nextCharacter; - - if ( (string == NULL) || (*string == '\0')) return(mask); - if (*string == '=') - string++; /* ignore possible '=' at beg of geometry spec */ - - strind = (char *)string; - if (*strind != '+' && *strind != '-' && *strind != 'x') { - tempWidth = ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return (0); - strind = nextCharacter; - mask |= WidthValue; - } - - if (*strind == 'x' || *strind == 'X') { - strind++; - tempHeight = ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return (0); - strind = nextCharacter; - mask |= HeightValue; - } - - if ((*strind == '+') || (*strind == '-')) { - if (*strind == '-') { - strind++; - tempX = -ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return (0); - strind = nextCharacter; - mask |= XNegative; - - } - else - { strind++; - tempX = ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return(0); - strind = nextCharacter; - } - mask |= XValue; - if ((*strind == '+') || (*strind == '-')) { - if (*strind == '-') { - strind++; - tempY = -ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return(0); - strind = nextCharacter; - mask |= YNegative; - - } - else - { - strind++; - tempY = ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) - return(0); - strind = nextCharacter; - } - mask |= YValue; - } - } - - /* If strind isn't at the end of the string the it's an invalid - geometry specification. */ - - if (*strind != '\0') return (0); - - if (mask & XValue) - *x = tempX; - if (mask & YValue) - *y = tempY; - if (mask & WidthValue) - *width = tempWidth; - if (mask & HeightValue) - *height = tempHeight; - return (mask); -} - -int gettimeofday(struct timeval* tp, void* tzp) -{ - DATETIME DateTime; - APIRET ulrc; /* Return Code. */ - - ulrc = DosGetDateTime(&DateTime); - tp->tv_sec = 60 * (60*DateTime.hours + DateTime.minutes) + DateTime.seconds; - tp->tv_usec = DateTime.hundredths * 10000; - return 0; -} - - -int -XPending(Display* display) -{ - /* similar functionality...I don't think that it is exact, but this - will have to do. */ - QMSG msg; - extern HAB hab; /* PM anchor block handle */ - -//?? WinPeekMsg(hab - return WinPeekMsg(hab, &msg, NULLHANDLE, 0, 0, PM_NOREMOVE); -} - -void -__glutAdjustCoords(Window parent, int* x, int* y, int* width, int* height) -{ - RECTL rect; - - /* adjust the window rectangle because Win32 thinks that the x, y, - width & height are the WHOLE window (including decorations), - whereas GLUT treats the x, y, width & height as only the CLIENT - area of the window. */ - rect.xLeft = *x; rect.yTop = *y; - rect.xRight = *x + *width; rect.yBottom = *y + *height; - - /* must adjust the coordinates according to the correct style - because depending on the style, there may or may not be - borders. */ -//?? AdjustWindowRect(&rect, WS_CLIPSIBLINGS | WS_CLIPCHILDREN | -//?? (parent ? WS_CHILD : WS_OVERLAPPEDWINDOW), -//?? FALSE); - /* FALSE in the third parameter = window has no menu bar */ - - /* readjust if the x and y are offscreen */ - if(rect.xLeft < 0) { - *x = 0; - } else { - *x = rect.xLeft; - } - - if(rect.yTop < 0) { - *y = 0; - } else { - *y = rect.yTop; - } - - *width = rect.xRight - rect.xLeft; /* adjusted width */ - *height = -(rect.yBottom - rect.yTop); /* adjusted height */ -} - - -int -__glutGetTransparentPixel(Display * dpy, XVisualInfo * vinfo) -{ - /* the transparent pixel on Win32 is always index number 0. So if - we put this routine in this file, we can avoid compiling the - whole of layerutil.c which is where this routine normally comes - from. */ - return 0; -} - -/* Translate point coordinates src_x and src_y from src to dst */ - -Bool -XTranslateCoordinates(Display *display, Window src, Window dst, - int src_x, int src_y, - int* dest_x_return, int* dest_y_return, - Window* child_return) -{ - SWP swp_src,swp_dst; - - WinQueryWindowPos(src,&swp_src); - WinQueryWindowPos(dst,&swp_dst); - - *dest_x_return = src_x + swp_src.x - swp_dst.x; - *dest_y_return = src_y + swp_src.y - swp_dst.y; - - /* just to make compilers happy...we don't use the return value. */ - return True; -} - -Status -XGetGeometry(Display* display, Window window, Window* root_return, - int* x_return, int* y_return, - unsigned int* width_return, unsigned int* height_return, - unsigned int *border_width_return, unsigned int* depth_return) -{ - /* KLUDGE: doesn't return the border_width or depth or root, x & y - are in screen coordinates. */ - SWP swp_src; - WinQueryWindowPos(window,&swp_src); - - *x_return = swp_src.x; - *y_return = swp_src.y; - *width_return = swp_src.cx; - *height_return = swp_src.cy; - - /* just to make compilers happy...we don't use the return value. */ - return 1; -} - -/* Get Display Width in millimeters */ -int -DisplayWidthMM(Display* display, int screen) -{ - int width; - LONG *pVC_Caps; - pVC_Caps = GetVideoConfig(NULLHANDLE); - width = (int)( 0.001 * pVC_Caps[CAPS_WIDTH] / pVC_Caps[CAPS_HORIZONTAL_RESOLUTION]);/* mm */ - return width; -} - -/* Get Display Height in millimeters */ -int -DisplayHeightMM(Display* display, int screen) -{ - int height; - LONG *pVC_Caps; - pVC_Caps = GetVideoConfig(NULLHANDLE); - height = (int)( 0.001 * pVC_Caps[CAPS_HEIGHT] / pVC_Caps[CAPS_VERTICAL_RESOLUTION]); /* mm */ - return height; -} - -void ScreenToClient( HWND hwnd, POINTL *point) -{ - SWP swp_src; - WinQueryWindowPos(hwnd,&swp_src); - point->x -= swp_src.x; - point->y -= swp_src.y; -} - - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glutOverlay.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glutOverlay.cpp deleted file mode 100644 index 563708de2d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glutOverlay.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/*********************************************************** - * Copyright (C) 1997, Be Inc. All rights reserved. - * - * FILE: glutOverlay.cpp - * - * DESCRIPTION: we don't support overlays, so this code is - * really simple - ***********************************************************/ - -/*********************************************************** - * Headers - ***********************************************************/ -#include -#include "glutint.h" -#include "glutbitmap.h" -#include "glutstroke.h" - -GLUTAPI void GLUTAPIENTRY -glutEstablishOverlay(void) -{ - __glutFatalError("OS2PM lacks overlay support."); -} - -GLUTAPI void GLUTAPIENTRY -glutUseLayer(GLenum layer) { - // ignore -} - -GLUTAPI void GLUTAPIENTRY -glutRemoveOverlay(void) { - // ignore -} - -GLUTAPI void GLUTAPIENTRY -glutPostOverlayRedisplay(void) { - // ignore -} - -GLUTAPI void GLUTAPIENTRY -glutShowOverlay(void) { - // ignore -} - -GLUTAPI void GLUTAPIENTRY glutHideOverlay(void) -{ - // ignore -} - -int GLUTAPIENTRY -glutLayerGet(GLenum param) -{ - // ignore -} - -/*********************************************************** - * Unsupported callbacks - ***********************************************************/ -GLUTAPI void GLUTAPIENTRY -glutOverlayDisplayFunc(GLUTdisplayCB displayFunc) -{ -} - -GLUTAPI void GLUTAPIENTRY -glutSpaceballMotionFunc(GLUTspaceMotionCB spaceMotionFunc) -{ -} - -GLUTAPI void GLUTAPIENTRY -glutSpaceballRotateFunc(GLUTspaceRotateCB spaceRotateFunc) -{ -} - -GLUTAPI void GLUTAPIENTRY -glutSpaceballButtonFunc(GLUTspaceButtonCB spaceButtonFunc) -{ -} - -GLUTAPI void GLUTAPIENTRY -glutButtonBoxFunc(GLUTbuttonBoxCB buttonBoxFunc) -{ -} - -GLUTAPI void GLUTAPIENTRY -glutDialsFunc(GLUTdialsCB dialsFunc) -{ -} - -GLUTAPI void GLUTAPIENTRY -glutTabletMotionFunc(GLUTtabletMotionCB tabletMotionFunc) -{ -} - -GLUTAPI void GLUTAPIENTRY -glutTabletButtonFunc(GLUTtabletButtonCB tabletButtonFunc) -{ -} -GLUTAPI void GLUTAPIENTRY -glutPostWindowOverlayRedisplay(int win) -{ // -} - -void GLUTAPIENTRY -glutInitDisplayString(const char *string) -{ // -} -void GLUTAPIENTRY -glutJoystickFunc(GLUTjoystickCB joystickFunc, int pollInterval) -{ // -} - -void GLUTAPIENTRY -glutForceJoystickFunc(void) -{ // -} - - -int GLUTAPIENTRY -glutBitmapWidth(GLUTbitmapFont font, int c) -{ return 0; -} -int GLUTAPIENTRY -glutBitmapLength(GLUTbitmapFont font, const unsigned char *string) -{ // - return 0; -} -int GLUTAPIENTRY -glutStrokeWidth(GLUTstrokeFont font, int c) -{ return 0; -} -int GLUTAPIENTRY -glutStrokeLength(GLUTstrokeFont font, const unsigned char *string) -{ return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_8x13.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_8x13.cpp deleted file mode 100644 index e361e17cbf..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_8x13.cpp +++ /dev/null @@ -1,2076 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmap8By13 XXX -#include "glutbitmap.h" -#undef glutBitmap8By13 - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch0data[] = { 0x0 }; -static const BitmapCharRec ch0 = {1,1,0,0,8,ch0data}; -#else -static const BitmapCharRec ch0 = {0,0,0,0,8,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,8,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,8,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch127data[] = { 0x0 }; -static const BitmapCharRec ch127 = {1,1,0,0,8,ch127data}; -#else -static const BitmapCharRec ch127 = {0,0,0,0,8,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,8,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,8,0}; -#endif - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x0,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch255 = {6,12,-1,2,8,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0x80,0x80,0xb8,0xc4,0x84,0x84,0xc4,0xb8,0x80,0x80, -}; - -static const BitmapCharRec ch254 = {6,10,-1,2,8,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch253 = {6,12,-1,2,8,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch252 = {6,10,-1,0,8,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch251 = {6,10,-1,0,8,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch250 = {6,10,-1,0,8,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch249 = {6,10,-1,0,8,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0x80,0x78,0xc4,0xa4,0x94,0x8c,0x78,0x4, -}; - -static const BitmapCharRec ch248 = {6,8,-1,1,8,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x20,0x20,0x0,0xf8,0x0,0x20,0x20, -}; - -static const BitmapCharRec ch247 = {5,7,-1,-1,8,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch246 = {6,10,-1,0,8,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch245 = {6,10,-1,0,8,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch244 = {6,10,-1,0,8,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch243 = {6,10,-1,0,8,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch242 = {6,10,-1,0,8,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0x84,0x84,0x84,0x84,0xc4,0xb8,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch241 = {6,10,-1,0,8,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x78,0x84,0x84,0x84,0x84,0x78,0x8,0x50,0x30,0x48, -}; - -static const BitmapCharRec ch240 = {6,10,-1,0,8,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x50,0x50, -}; - -static const BitmapCharRec ch239 = {5,10,-1,0,8,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x90,0x60, -}; - -static const BitmapCharRec ch238 = {5,10,-1,0,8,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch237 = {5,10,-1,0,8,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch236 = {5,10,-1,0,8,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch235 = {6,10,-1,0,8,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch234 = {6,10,-1,0,8,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch233 = {6,10,-1,0,8,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch232 = {6,10,-1,0,8,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x20,0x10,0x78,0x84,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch231 = {6,8,-1,2,8,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x6c,0x92,0x90,0x7c,0x12,0x6c, -}; - -static const BitmapCharRec ch230 = {7,6,0,0,8,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x30,0x48,0x30, -}; - -static const BitmapCharRec ch229 = {6,10,-1,0,8,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch228 = {6,10,-1,0,8,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch227 = {6,10,-1,0,8,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch226 = {6,10,-1,0,8,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch225 = {6,10,-1,0,8,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch224 = {6,10,-1,0,8,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0x80,0xb8,0xc4,0x84,0x84,0xf8,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch223 = {6,9,-1,1,8,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8,0x80, -}; - -static const BitmapCharRec ch222 = {6,9,-1,0,8,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x20,0x20,0x20,0x20,0x50,0x88,0x88,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch221 = {5,10,-1,0,8,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch220 = {6,10,-1,0,8,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch219 = {6,10,-1,0,8,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch218 = {6,10,-1,0,8,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch217 = {6,10,-1,0,8,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x80,0x78,0xc4,0xa4,0xa4,0xa4,0x94,0x94,0x8c,0x78,0x4, -}; - -static const BitmapCharRec ch216 = {6,11,-1,1,8,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x84,0x48,0x30,0x30,0x48,0x84, -}; - -static const BitmapCharRec ch215 = {6,6,-1,-1,8,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch214 = {7,10,0,0,8,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch213 = {7,10,0,0,8,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x24,0x18, -}; - -static const BitmapCharRec ch212 = {7,10,0,0,8,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch211 = {7,10,0,0,8,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x8,0x10, -}; - -static const BitmapCharRec ch210 = {7,10,0,0,8,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0x82,0x86,0x8a,0x92,0xa2,0xc2,0x82,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch209 = {7,10,0,0,8,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0xfc,0x42,0x42,0x42,0xe2,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch208 = {7,9,0,0,8,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x50,0x50, -}; - -static const BitmapCharRec ch207 = {5,10,-1,0,8,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch206 = {5,10,-1,0,8,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch205 = {5,10,-1,0,8,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch204 = {5,10,-1,0,8,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch203 = {6,10,-1,0,8,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch202 = {6,10,-1,0,8,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch201 = {6,10,-1,0,8,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch200 = {6,10,-1,0,8,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x20,0x10,0x78,0x84,0x80,0x80,0x80,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch199 = {6,11,-1,2,8,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0x9e,0x90,0x90,0xf0,0x9c,0x90,0x90,0x90,0x6e, -}; - -static const BitmapCharRec ch198 = {7,9,0,0,8,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x30,0x48,0x30, -}; - -static const BitmapCharRec ch197 = {6,10,-1,0,8,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x48,0x48, -}; - -static const BitmapCharRec ch196 = {6,10,-1,0,8,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch195 = {6,10,-1,0,8,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x48,0x30, -}; - -static const BitmapCharRec ch194 = {6,10,-1,0,8,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch193 = {6,10,-1,0,8,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch192 = {6,10,-1,0,8,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x78,0x84,0x84,0x80,0x40,0x20,0x20,0x0,0x20, -}; - -static const BitmapCharRec ch191 = {6,9,-1,0,8,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x6,0x1a,0x12,0xa,0x66,0x92,0x10,0x20,0x90,0x60, -}; - -static const BitmapCharRec ch190 = {7,10,0,0,8,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x1e,0x10,0xc,0x2,0xf2,0x4c,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch189 = {7,10,0,0,8,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x6,0x1a,0x12,0xa,0xe6,0x42,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch188 = {7,10,0,0,8,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0x90,0x48,0x24,0x12,0x24,0x48,0x90, -}; - -static const BitmapCharRec ch187 = {7,7,0,-1,8,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xf0,0x0,0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch186 = {4,6,-1,-3,8,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0xe0,0x40,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch185 = {3,6,-1,-4,8,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0xc0,0x40, -}; - -static const BitmapCharRec ch184 = {2,2,-3,2,8,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0xc0, -}; - -static const BitmapCharRec ch183 = {2,1,-3,-4,8,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x7c, -}; - -static const BitmapCharRec ch182 = {6,9,-1,0,8,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x80,0xb4,0xcc,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch181 = {6,7,-1,1,8,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0x80,0x40, -}; - -static const BitmapCharRec ch180 = {2,2,-3,-8,8,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0x60,0x90,0x10,0x20,0x90,0x60, -}; - -static const BitmapCharRec ch179 = {4,6,-1,-4,8,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xf0,0x80,0x60,0x10,0x90,0x60, -}; - -static const BitmapCharRec ch178 = {4,6,-1,-4,8,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xf8,0x0,0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch177 = {5,7,-1,-1,8,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch176 = {4,4,-2,-5,8,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xfc, -}; - -static const BitmapCharRec ch175 = {6,1,-1,-8,8,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x38,0x44,0xaa,0xb2,0xaa,0xaa,0x92,0x44,0x38, -}; - -static const BitmapCharRec ch174 = {7,9,0,-1,8,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xfc, -}; - -static const BitmapCharRec ch173 = {6,1,-1,-4,8,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x4,0x4,0x4,0xfc, -}; - -static const BitmapCharRec ch172 = {6,4,-1,-1,8,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x12,0x24,0x48,0x90,0x48,0x24,0x12, -}; - -static const BitmapCharRec ch171 = {7,7,0,-1,8,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xf8,0x0,0x78,0x88,0x78,0x8,0x70, -}; - -static const BitmapCharRec ch170 = {5,7,-1,-2,8,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x38,0x44,0x92,0xaa,0xa2,0xaa,0x92,0x44,0x38, -}; - -static const BitmapCharRec ch169 = {7,9,0,-1,8,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xd8, -}; - -static const BitmapCharRec ch168 = {5,1,-1,-8,8,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x60,0x90,0x10,0x60,0x90,0x90,0x60,0x80,0x90,0x60, -}; - -static const BitmapCharRec ch167 = {4,10,-2,0,8,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0x80,0x80,0x80,0x80,0x0,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch166 = {1,9,-3,0,8,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x10,0x10,0x7c,0x10,0x7c,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch165 = {7,9,0,0,8,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0x84,0x78,0x48,0x48,0x78,0x84, -}; - -static const BitmapCharRec ch164 = {6,6,-1,-1,8,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xdc,0x62,0x20,0x20,0x20,0x70,0x20,0x22,0x1c, -}; - -static const BitmapCharRec ch163 = {7,9,0,0,8,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x20,0x70,0xa8,0xa0,0xa0,0xa8,0x70,0x20, -}; - -static const BitmapCharRec ch162 = {5,8,-1,-1,8,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch161 = {1,9,-3,0,8,ch161data}; - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x90,0xa8,0x48, -}; - -static const BitmapCharRec ch126 = {5,3,-1,-6,8,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0xe0,0x10,0x10,0x20,0x18,0x20,0x10,0x10,0xe0, -}; - -static const BitmapCharRec ch125 = {5,9,-1,0,8,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch124 = {1,9,-3,0,8,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x38,0x40,0x40,0x20,0xc0,0x20,0x40,0x40,0x38, -}; - -static const BitmapCharRec ch123 = {5,9,-2,0,8,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xfc,0x40,0x20,0x10,0x8,0xfc, -}; - -static const BitmapCharRec ch122 = {6,6,-1,0,8,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch121 = {6,8,-1,2,8,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0x84,0x48,0x30,0x30,0x48,0x84, -}; - -static const BitmapCharRec ch120 = {6,6,-1,0,8,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x44,0xaa,0x92,0x92,0x82,0x82, -}; - -static const BitmapCharRec ch119 = {7,6,0,0,8,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x20,0x50,0x50,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch118 = {5,6,-1,0,8,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x74,0x88,0x88,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch117 = {6,6,-1,0,8,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x38,0x44,0x40,0x40,0x40,0xf8,0x40,0x40, -}; - -static const BitmapCharRec ch116 = {6,8,-1,0,8,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0x78,0x84,0x18,0x60,0x84,0x78, -}; - -static const BitmapCharRec ch115 = {6,6,-1,0,8,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0x40,0x40,0x40,0x40,0x44,0xb8, -}; - -static const BitmapCharRec ch114 = {6,6,-1,0,8,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x4,0x4,0x4,0x74,0x8c,0x84,0x8c,0x74, -}; - -static const BitmapCharRec ch113 = {6,8,-1,2,8,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0x80,0x80,0x80,0xb8,0xc4,0x84,0xc4,0xb8, -}; - -static const BitmapCharRec ch112 = {6,8,-1,2,8,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x78,0x84,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch111 = {6,6,-1,0,8,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0x84,0x84,0x84,0x84,0xc4,0xb8, -}; - -static const BitmapCharRec ch110 = {6,6,-1,0,8,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0x82,0x92,0x92,0x92,0x92,0xec, -}; - -static const BitmapCharRec ch109 = {7,6,0,0,8,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x60, -}; - -static const BitmapCharRec ch108 = {5,9,-1,0,8,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0x84,0x88,0x90,0xe0,0x90,0x88,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch107 = {6,9,-1,0,8,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0x70,0x88,0x88,0x8,0x8,0x8,0x8,0x18,0x0,0x8, -}; - -static const BitmapCharRec ch106 = {5,10,-1,2,8,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x20, -}; - -static const BitmapCharRec ch105 = {5,8,-1,0,8,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0x84,0x84,0x84,0x84,0xc4,0xb8,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch104 = {6,9,-1,0,8,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x78,0x84,0x78,0x80,0x70,0x88,0x88,0x74, -}; - -static const BitmapCharRec ch103 = {6,8,-1,2,8,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x40,0x40,0x40,0x40,0xf8,0x40,0x40,0x44,0x38, -}; - -static const BitmapCharRec ch102 = {6,9,-1,0,8,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x78,0x84,0x80,0xfc,0x84,0x78, -}; - -static const BitmapCharRec ch101 = {6,6,-1,0,8,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x74,0x8c,0x84,0x84,0x8c,0x74,0x4,0x4,0x4, -}; - -static const BitmapCharRec ch100 = {6,9,-1,0,8,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x78,0x84,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch99 = {6,6,-1,0,8,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xb8,0xc4,0x84,0x84,0xc4,0xb8,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch98 = {6,9,-1,0,8,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x74,0x8c,0x84,0x7c,0x4,0x78, -}; - -static const BitmapCharRec ch97 = {6,6,-1,0,8,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0x10,0x60,0xe0, -}; - -static const BitmapCharRec ch96 = {4,3,-2,-6,8,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xfe, -}; - -static const BitmapCharRec ch95 = {7,1,0,1,8,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x88,0x50,0x20, -}; - -static const BitmapCharRec ch94 = {5,3,-1,-6,8,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xf0, -}; - -static const BitmapCharRec ch93 = {4,9,-1,0,8,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x2,0x2,0x4,0x8,0x10,0x20,0x40,0x80,0x80, -}; - -static const BitmapCharRec ch92 = {7,9,0,0,8,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xf0, -}; - -static const BitmapCharRec ch91 = {4,9,-2,0,8,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xfc,0x80,0x80,0x40,0x20,0x10,0x8,0x4,0xfc, -}; - -static const BitmapCharRec ch90 = {6,9,-1,0,8,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x10,0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch89 = {7,9,0,0,8,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0x82,0x82,0x44,0x28,0x10,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch88 = {7,9,0,0,8,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x44,0xaa,0x92,0x92,0x92,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch87 = {7,9,0,0,8,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x10,0x28,0x28,0x28,0x44,0x44,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch86 = {7,9,0,0,8,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch85 = {6,9,-1,0,8,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe, -}; - -static const BitmapCharRec ch84 = {7,9,0,0,8,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x78,0x84,0x4,0x4,0x78,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch83 = {6,9,-1,0,8,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0x84,0x88,0x90,0xa0,0xf8,0x84,0x84,0x84,0xf8, -}; - -static const BitmapCharRec ch82 = {6,9,-1,0,8,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x4,0x78,0x94,0xa4,0x84,0x84,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch81 = {6,10,-1,1,8,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0x80,0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8, -}; - -static const BitmapCharRec ch80 = {6,9,-1,0,8,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch79 = {6,9,-1,0,8,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0x84,0x84,0x84,0x8c,0x94,0xa4,0xc4,0x84,0x84, -}; - -static const BitmapCharRec ch78 = {6,9,-1,0,8,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0x82,0x82,0x82,0x92,0x92,0xaa,0xc6,0x82,0x82, -}; - -static const BitmapCharRec ch77 = {7,9,0,0,8,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xfc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch76 = {6,9,-1,0,8,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0x84,0x88,0x90,0xa0,0xc0,0xa0,0x90,0x88,0x84, -}; - -static const BitmapCharRec ch75 = {6,9,-1,0,8,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x70,0x88,0x8,0x8,0x8,0x8,0x8,0x8,0x3c, -}; - -static const BitmapCharRec ch74 = {6,9,-1,0,8,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8, -}; - -static const BitmapCharRec ch73 = {5,9,-1,0,8,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0x84,0x84,0x84,0x84,0xfc,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch72 = {6,9,-1,0,8,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x74,0x8c,0x84,0x9c,0x80,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch71 = {6,9,-1,0,8,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0x80,0x80,0x80,0x80,0xf0,0x80,0x80,0x80,0xfc, -}; - -static const BitmapCharRec ch70 = {6,9,-1,0,8,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xfc,0x80,0x80,0x80,0xf0,0x80,0x80,0x80,0xfc, -}; - -static const BitmapCharRec ch69 = {6,9,-1,0,8,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xfc,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch68 = {7,9,0,0,8,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x78,0x84,0x80,0x80,0x80,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch67 = {6,9,-1,0,8,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xfc,0x42,0x42,0x42,0x7c,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch66 = {7,9,0,0,8,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0x84,0x84,0x84,0xfc,0x84,0x84,0x84,0x48,0x30, -}; - -static const BitmapCharRec ch65 = {6,9,-1,0,8,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x78,0x80,0x94,0xac,0xa4,0x9c,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch64 = {6,9,-1,0,8,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x10,0x0,0x10,0x10,0x8,0x4,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch63 = {6,9,-1,0,8,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0x80,0x40,0x20,0x10,0x8,0x10,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch62 = {5,9,-1,0,8,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xfc,0x0,0x0,0xfc, -}; - -static const BitmapCharRec ch61 = {6,4,-1,-2,8,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x8,0x10,0x20,0x40,0x80,0x40,0x20,0x10,0x8, -}; - -static const BitmapCharRec ch60 = {5,9,-2,0,8,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x60,0x70,0x0,0x0,0x20,0x70,0x20, -}; - -static const BitmapCharRec ch59 = {4,8,-1,1,8,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0x40,0xe0,0x40,0x0,0x0,0x40,0xe0,0x40, -}; - -static const BitmapCharRec ch58 = {3,8,-2,1,8,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0x70,0x8,0x4,0x4,0x74,0x8c,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch57 = {6,9,-1,0,8,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x78,0x84,0x84,0x84,0x78,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch56 = {6,9,-1,0,8,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x40,0x40,0x20,0x20,0x10,0x10,0x8,0x4,0xfc, -}; - -static const BitmapCharRec ch55 = {6,9,-1,0,8,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x78,0x84,0x84,0xc4,0xb8,0x80,0x80,0x40,0x38, -}; - -static const BitmapCharRec ch54 = {6,9,-1,0,8,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x78,0x84,0x4,0x4,0xc4,0xb8,0x80,0x80,0xfc, -}; - -static const BitmapCharRec ch53 = {6,9,-1,0,8,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x8,0x8,0xfc,0x88,0x88,0x48,0x28,0x18,0x8, -}; - -static const BitmapCharRec ch52 = {6,9,-1,0,8,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x78,0x84,0x4,0x4,0x38,0x10,0x8,0x4,0xfc, -}; - -static const BitmapCharRec ch51 = {6,9,-1,0,8,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xfc,0x80,0x40,0x30,0x8,0x4,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch50 = {6,9,-1,0,8,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xa0,0x60,0x20, -}; - -static const BitmapCharRec ch49 = {5,9,-1,0,8,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x30,0x48,0x84,0x84,0x84,0x84,0x84,0x48,0x30, -}; - -static const BitmapCharRec ch48 = {6,9,-1,0,8,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0x80,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0x2, -}; - -static const BitmapCharRec ch47 = {7,9,0,0,8,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0x40,0xe0,0x40, -}; - -static const BitmapCharRec ch46 = {3,3,-2,1,8,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xfc, -}; - -static const BitmapCharRec ch45 = {6,1,-1,-4,8,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x60,0x70, -}; - -static const BitmapCharRec ch44 = {4,3,-1,1,8,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch43 = {5,5,-1,-2,8,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0x48,0x30,0xfc,0x30,0x48, -}; - -static const BitmapCharRec ch42 = {6,5,-1,-2,8,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x40,0x20,0x20,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {3,9,-2,0,8,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x20,0x40,0x40,0x80,0x80,0x80,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch40 = {3,9,-3,0,8,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x80,0x60,0x70, -}; - -static const BitmapCharRec ch39 = {4,3,-1,-6,8,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x74,0x88,0x94,0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch38 = {6,7,-1,0,8,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x88,0x54,0x48,0x20,0x10,0x10,0x48,0xa4,0x44, -}; - -static const BitmapCharRec ch37 = {6,9,-1,0,8,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x20,0xf0,0x28,0x70,0xa0,0x78,0x20, -}; - -static const BitmapCharRec ch36 = {5,7,-1,-1,8,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x48,0x48,0xfc,0x48,0xfc,0x48,0x48, -}; - -static const BitmapCharRec ch35 = {6,7,-1,-1,8,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0x90,0x90,0x90, -}; - -static const BitmapCharRec ch34 = {4,3,-2,-6,8,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch33 = {1,9,-3,0,8,ch33data}; - -/* char: 0x1f */ - -static const GLubyte ch31data[] = { -0x80, -}; - -static const BitmapCharRec ch31 = {1,1,-3,-3,8,ch31data}; - -/* char: 0x1e */ - -static const GLubyte ch30data[] = { -0xdc,0x62,0x20,0x20,0x20,0x70,0x20,0x22,0x1c, -}; - -static const BitmapCharRec ch30 = {7,9,0,0,8,ch30data}; - -/* char: 0x1d */ - -static const GLubyte ch29data[] = { -0x80,0x40,0xfe,0x10,0xfe,0x4,0x2, -}; - -static const BitmapCharRec ch29 = {7,7,0,0,8,ch29data}; - -/* char: 0x1c */ - -static const GLubyte ch28data[] = { -0x88,0x48,0x48,0x48,0x48,0xfc, -}; - -static const BitmapCharRec ch28 = {6,6,-1,0,8,ch28data}; - -/* char: 0x1b */ - -static const GLubyte ch27data[] = { -0xfe,0x80,0x20,0x8,0x2,0x8,0x20,0x80, -}; - -static const BitmapCharRec ch27 = {7,8,0,0,8,ch27data}; - -/* char: 0x1a */ - -static const GLubyte ch26data[] = { -0xfe,0x2,0x8,0x20,0x80,0x20,0x8,0x2, -}; - -static const BitmapCharRec ch26 = {7,8,0,0,8,ch26data}; - -/* char: 0x19 */ - -static const GLubyte ch25data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch25 = {1,13,-3,2,8,ch25data}; - -/* char: 0x18 */ - -static const GLubyte ch24data[] = { -0x10,0x10,0x10,0x10,0x10,0xff, -}; - -static const BitmapCharRec ch24 = {8,6,0,2,8,ch24data}; - -/* char: 0x17 */ - -static const GLubyte ch23data[] = { -0xff,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch23 = {8,8,0,-3,8,ch23data}; - -/* char: 0x16 */ - -static const GLubyte ch22data[] = { -0x10,0x10,0x10,0x10,0x10,0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch22 = {4,13,0,2,8,ch22data}; - -/* char: 0x15 */ - -static const GLubyte ch21data[] = { -0x80,0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch21 = {5,13,-3,2,8,ch21data}; - -/* char: 0x14 */ - -static const GLubyte ch20data[] = { -0xff, -}; - -static const BitmapCharRec ch20 = {8,1,0,1,8,ch20data}; - -/* char: 0x13 */ - -static const GLubyte ch19data[] = { -0xff, -}; - -static const BitmapCharRec ch19 = {8,1,0,-1,8,ch19data}; - -/* char: 0x12 */ - -static const GLubyte ch18data[] = { -0xff, -}; - -static const BitmapCharRec ch18 = {8,1,0,-3,8,ch18data}; - -/* char: 0x11 */ - -static const GLubyte ch17data[] = { -0xff, -}; - -static const BitmapCharRec ch17 = {8,1,0,-5,8,ch17data}; - -/* char: 0x10 */ - -static const GLubyte ch16data[] = { -0xff, -}; - -static const BitmapCharRec ch16 = {8,1,0,-7,8,ch16data}; - -/* char: 0xf */ - -static const GLubyte ch15data[] = { -0x10,0x10,0x10,0x10,0x10,0xff,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch15 = {8,13,0,2,8,ch15data}; - -/* char: 0xe */ - -static const GLubyte ch14data[] = { -0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch14 = {5,8,-3,-3,8,ch14data}; - -/* char: 0xd */ - -static const GLubyte ch13data[] = { -0x80,0x80,0x80,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch13 = {5,6,-3,2,8,ch13data}; - -/* char: 0xc */ - -static const GLubyte ch12data[] = { -0x10,0x10,0x10,0x10,0x10,0xf0, -}; - -static const BitmapCharRec ch12 = {4,6,0,2,8,ch12data}; - -/* char: 0xb */ - -static const GLubyte ch11data[] = { -0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch11 = {4,8,0,-3,8,ch11data}; - -/* char: 0xa */ - -static const GLubyte ch10data[] = { -0x8,0x8,0x8,0x8,0x3e,0x20,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch10 = {7,9,0,2,8,ch10data}; - -/* char: 0x9 */ - -static const GLubyte ch9data[] = { -0x3e,0x20,0x20,0x20,0x88,0x98,0xa8,0xc8,0x88, -}; - -static const BitmapCharRec ch9 = {7,9,0,2,8,ch9data}; - -/* char: 0x8 */ - -static const GLubyte ch8data[] = { -0xfe,0x10,0x10,0xfe,0x10,0x10, -}; - -static const BitmapCharRec ch8 = {7,6,0,0,8,ch8data}; - -/* char: 0x7 */ - -static const GLubyte ch7data[] = { -0x70,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch7 = {5,4,-1,-5,8,ch7data}; - -/* char: 0x6 */ - -static const GLubyte ch6data[] = { -0x20,0x20,0x3c,0x20,0x3e,0xf8,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch6 = {7,9,0,2,8,ch6data}; - -/* char: 0x5 */ - -static const GLubyte ch5data[] = { -0x22,0x22,0x3c,0x22,0x3c,0x78,0x80,0x80,0x78, -}; - -static const BitmapCharRec ch5 = {7,9,0,2,8,ch5data}; - -/* char: 0x4 */ - -static const GLubyte ch4data[] = { -0x10,0x10,0x1c,0x10,0x9e,0x80,0xe0,0x80,0xf0, -}; - -static const BitmapCharRec ch4 = {7,9,0,2,8,ch4data}; - -/* char: 0x3 */ - -static const GLubyte ch3data[] = { -0x8,0x8,0x8,0x3e,0x88,0x88,0xf8,0x88,0x88, -}; - -static const BitmapCharRec ch3 = {7,9,0,2,8,ch3data}; - -/* char: 0x2 */ - -static const GLubyte ch2data[] = { -0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa, -}; - -static const BitmapCharRec ch2 = {8,12,0,2,8,ch2data}; - -/* char: 0x1 */ - -static const GLubyte ch1data[] = { -0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10, -}; - -static const BitmapCharRec ch1 = {7,7,0,-1,8,ch1data}; - -static const BitmapCharRec * const chars[] = { -&ch0, -&ch1, -&ch2, -&ch3, -&ch4, -&ch5, -&ch6, -&ch7, -&ch8, -&ch9, -&ch10, -&ch11, -&ch12, -&ch13, -&ch14, -&ch15, -&ch16, -&ch17, -&ch18, -&ch19, -&ch20, -&ch21, -&ch22, -&ch23, -&ch24, -&ch25, -&ch26, -&ch27, -&ch28, -&ch29, -&ch30, -&ch31, -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -&ch127, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -#if !defined(__IBMCPP__) -const -#endif -BitmapFontRec glutBitmap8By13 = { -"-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1", -256, -0, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_9x15.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_9x15.cpp deleted file mode 100644 index a3a02a4c5f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_9x15.cpp +++ /dev/null @@ -1,2077 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmap9By15 XXX -#include "glutbitmap.h" -#undef glutBitmap9By15 - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch0data[] = { 0x0 }; -static const BitmapCharRec ch0 = {1,1,0,0,9,ch0data}; -#else -static const BitmapCharRec ch0 = {0,0,0,0,9,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,9,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,9,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch127data[] = { 0x0 }; -static const BitmapCharRec ch127 = {1,1,0,0,9,ch127data}; -#else -static const BitmapCharRec ch127 = {0,0,0,0,9,0}; -#endif - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,9,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,9,0}; -#endif - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch255 = {6,14,-1,3,9,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0x80,0x80,0x80,0xbc,0xc2,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80, -}; - -static const BitmapCharRec ch254 = {7,12,-1,3,9,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch253 = {6,14,-1,3,9,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch252 = {7,11,-1,0,9,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch251 = {7,11,-1,0,9,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch250 = {7,11,-1,0,9,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch249 = {7,11,-1,0,9,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0x80,0x7c,0xa2,0xa2,0x92,0x8a,0x8a,0x7c,0x2, -}; - -static const BitmapCharRec ch248 = {7,9,-1,1,9,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x10,0x38,0x10,0x0,0xfe,0x0,0x10,0x38,0x10, -}; - -static const BitmapCharRec ch247 = {7,9,-1,0,9,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch246 = {7,11,-1,0,9,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch245 = {7,11,-1,0,9,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch244 = {7,11,-1,0,9,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch243 = {7,11,-1,0,9,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch242 = {7,11,-1,0,9,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0x82,0x82,0x82,0x82,0x82,0xc2,0xbc,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch241 = {7,11,-1,0,9,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x8,0x50,0x30,0x48, -}; - -static const BitmapCharRec ch240 = {7,11,-1,0,9,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x50,0x50, -}; - -static const BitmapCharRec ch239 = {5,11,-2,0,9,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x90,0x60, -}; - -static const BitmapCharRec ch238 = {5,11,-2,0,9,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x60,0x10, -}; - -static const BitmapCharRec ch237 = {5,11,-2,0,9,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x30,0x40, -}; - -static const BitmapCharRec ch236 = {5,11,-2,0,9,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch235 = {7,11,-1,0,9,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch234 = {7,11,-1,0,9,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch233 = {7,11,-1,0,9,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch232 = {7,11,-1,0,9,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x30,0x48,0x18,0x7c,0x82,0x80,0x80,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch231 = {7,10,-1,3,9,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x6e,0x92,0x90,0x7c,0x12,0x92,0x6c, -}; - -static const BitmapCharRec ch230 = {7,7,-1,0,9,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x18,0x24,0x18, -}; - -static const BitmapCharRec ch229 = {7,11,-1,0,9,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch228 = {7,11,-1,0,9,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch227 = {7,11,-1,0,9,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch226 = {7,11,-1,0,9,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch225 = {7,11,-1,0,9,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch224 = {7,11,-1,0,9,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0x80,0xbc,0xc2,0x82,0x82,0xfc,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch223 = {7,9,-1,1,9,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0x80,0x80,0x80,0xfc,0x82,0x82,0x82,0xfc,0x80,0x80, -}; - -static const BitmapCharRec ch222 = {7,10,-1,0,9,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch221 = {7,11,-1,0,9,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch220 = {7,11,-1,0,9,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch219 = {7,11,-1,0,9,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch218 = {7,11,-1,0,9,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch217 = {7,11,-1,0,9,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x80,0x7c,0xc2,0xa2,0xa2,0x92,0x92,0x8a,0x8a,0x86,0x7c,0x2, -}; - -static const BitmapCharRec ch216 = {7,12,-1,1,9,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x82,0x44,0x28,0x10,0x28,0x44,0x82, -}; - -static const BitmapCharRec ch215 = {7,7,-1,-1,9,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch214 = {7,11,-1,0,9,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch213 = {7,11,-1,0,9,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch212 = {7,11,-1,0,9,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch211 = {7,11,-1,0,9,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch210 = {7,11,-1,0,9,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0x82,0x86,0x8a,0x92,0x92,0xa2,0xc2,0x82,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch209 = {7,11,-1,0,9,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0xfc,0x42,0x42,0x42,0x42,0xf2,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch208 = {7,10,-1,0,9,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x50,0x50, -}; - -static const BitmapCharRec ch207 = {5,11,-2,0,9,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x88,0x70, -}; - -static const BitmapCharRec ch206 = {5,11,-2,0,9,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x60,0x10, -}; - -static const BitmapCharRec ch205 = {5,11,-2,0,9,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x30,0x40, -}; - -static const BitmapCharRec ch204 = {5,11,-2,0,9,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch203 = {7,11,-1,0,9,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch202 = {7,11,-1,0,9,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch201 = {7,11,-1,0,9,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch200 = {7,11,-1,0,9,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x30,0x48,0x18,0x7c,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch199 = {7,13,-1,3,9,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0x9e,0x90,0x90,0x90,0xfc,0x90,0x90,0x90,0x90,0x6e, -}; - -static const BitmapCharRec ch198 = {7,10,-1,0,9,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x10,0x28,0x10, -}; - -static const BitmapCharRec ch197 = {7,11,-1,0,9,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x28,0x28, -}; - -static const BitmapCharRec ch196 = {7,11,-1,0,9,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch195 = {7,11,-1,0,9,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x44,0x38, -}; - -static const BitmapCharRec ch194 = {7,11,-1,0,9,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x30,0x8, -}; - -static const BitmapCharRec ch193 = {7,11,-1,0,9,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x18,0x20, -}; - -static const BitmapCharRec ch192 = {7,11,-1,0,9,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x7c,0x82,0x82,0x80,0x40,0x20,0x10,0x10,0x0,0x10, -}; - -static const BitmapCharRec ch191 = {7,10,-1,0,9,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x6,0x1a,0x12,0xa,0x66,0x92,0x10,0x20,0x90,0x60, -}; - -static const BitmapCharRec ch190 = {7,10,-1,0,9,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x1e,0x10,0xc,0x2,0xf2,0x4c,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch189 = {7,10,-1,0,9,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x6,0x1a,0x12,0xa,0xe6,0x42,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch188 = {7,10,-1,0,9,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0x90,0x48,0x24,0x12,0x12,0x24,0x48,0x90, -}; - -static const BitmapCharRec ch187 = {7,8,-1,-1,9,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xf8,0x0,0x70,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch186 = {5,6,-1,-5,9,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0xe0,0x40,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch185 = {3,6,-1,-4,9,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0x60,0x90,0x30, -}; - -static const BitmapCharRec ch184 = {4,3,-2,3,9,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch183 = {2,2,-4,-4,9,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0xa,0xa,0xa,0xa,0xa,0x7a,0x8a,0x8a,0x8a,0x7e, -}; - -static const BitmapCharRec ch182 = {7,10,-1,0,9,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x80,0x80,0xba,0xc6,0x82,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch181 = {7,9,-1,2,9,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0xc0,0x20, -}; - -static const BitmapCharRec ch180 = {3,2,-3,-9,9,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0x60,0x90,0x10,0x20,0x90,0x60, -}; - -static const BitmapCharRec ch179 = {4,6,-1,-4,9,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xf0,0x80,0x60,0x10,0x90,0x60, -}; - -static const BitmapCharRec ch178 = {4,6,-1,-4,9,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xfe,0x0,0x10,0x10,0x10,0xfe,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch177 = {7,9,-1,-1,9,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch176 = {4,4,-3,-6,9,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xfc, -}; - -static const BitmapCharRec ch175 = {6,1,-1,-9,9,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x3c,0x42,0xa5,0xa9,0xbd,0xa5,0xb9,0x42,0x3c, -}; - -static const BitmapCharRec ch174 = {8,9,0,-1,9,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xfc, -}; - -static const BitmapCharRec ch173 = {6,1,-1,-4,9,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x4,0x4,0x4,0xfc, -}; - -static const BitmapCharRec ch172 = {6,4,-1,-2,9,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x12,0x24,0x48,0x90,0x90,0x48,0x24,0x12, -}; - -static const BitmapCharRec ch171 = {7,8,-1,-1,9,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xf8,0x0,0x78,0x90,0x70,0x90,0x60, -}; - -static const BitmapCharRec ch170 = {5,7,-3,-3,9,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x3c,0x42,0x99,0xa5,0xa1,0xa5,0x99,0x42,0x3c, -}; - -static const BitmapCharRec ch169 = {8,9,0,-1,9,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xa0,0xa0, -}; - -static const BitmapCharRec ch168 = {3,2,-3,-9,9,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x70,0x88,0x8,0x70,0x88,0x88,0x88,0x70,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch167 = {5,11,-2,1,9,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch166 = {1,11,-4,1,9,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x10,0x10,0x10,0x7c,0x10,0x7c,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch165 = {7,10,-1,0,9,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0x82,0x7c,0x44,0x44,0x7c,0x82, -}; - -static const BitmapCharRec ch164 = {7,6,-1,-3,9,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0x5c,0xa2,0x60,0x20,0x20,0xf8,0x20,0x20,0x22,0x1c, -}; - -static const BitmapCharRec ch163 = {7,10,-1,0,9,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x40,0x78,0xa4,0xa0,0x90,0x94,0x78,0x8, -}; - -static const BitmapCharRec ch162 = {6,8,-1,0,9,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x0,0x80,0x80, -}; - -static const BitmapCharRec ch161 = {1,11,-4,0,9,ch161data}; - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x8c,0x92,0x62, -}; - -static const BitmapCharRec ch126 = {7,3,-1,-7,9,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0xe0,0x10,0x10,0x10,0x20,0x18,0x18,0x20,0x10,0x10,0x10,0xe0, -}; - -static const BitmapCharRec ch125 = {5,12,-1,1,9,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch124 = {1,12,-4,1,9,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x38,0x40,0x40,0x40,0x20,0xc0,0xc0,0x20,0x40,0x40,0x40,0x38, -}; - -static const BitmapCharRec ch123 = {5,12,-3,1,9,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xfe,0x40,0x20,0x10,0x8,0x4,0xfe, -}; - -static const BitmapCharRec ch122 = {7,7,-1,0,9,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch121 = {6,10,-1,3,9,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0x82,0x44,0x28,0x10,0x28,0x44,0x82, -}; - -static const BitmapCharRec ch120 = {7,7,-1,0,9,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x44,0xaa,0x92,0x92,0x92,0x82,0x82, -}; - -static const BitmapCharRec ch119 = {7,7,-1,0,9,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x10,0x28,0x28,0x44,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch118 = {7,7,-1,0,9,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x7a,0x84,0x84,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch117 = {7,7,-1,0,9,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x1c,0x22,0x20,0x20,0x20,0x20,0xfc,0x20,0x20, -}; - -static const BitmapCharRec ch116 = {7,9,-1,0,9,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0x7c,0x82,0x2,0x7c,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch115 = {7,7,-1,0,9,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0x40,0x40,0x40,0x40,0x42,0x62,0x9c, -}; - -static const BitmapCharRec ch114 = {7,7,-1,0,9,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x2,0x2,0x2,0x7a,0x86,0x82,0x82,0x82,0x86,0x7a, -}; - -static const BitmapCharRec ch113 = {7,10,-1,3,9,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0x80,0x80,0x80,0xbc,0xc2,0x82,0x82,0x82,0xc2,0xbc, -}; - -static const BitmapCharRec ch112 = {7,10,-1,3,9,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch111 = {7,7,-1,0,9,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0x82,0x82,0x82,0x82,0x82,0xc2,0xbc, -}; - -static const BitmapCharRec ch110 = {7,7,-1,0,9,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0x82,0x92,0x92,0x92,0x92,0x92,0xec, -}; - -static const BitmapCharRec ch109 = {7,7,-1,0,9,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xe0, -}; - -static const BitmapCharRec ch108 = {5,10,-2,0,9,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0x82,0x8c,0xb0,0xc0,0xb0,0x8c,0x82,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch107 = {7,10,-1,0,9,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0x78,0x84,0x84,0x84,0x4,0x4,0x4,0x4,0x4,0x1c,0x0,0x0,0xc, -}; - -static const BitmapCharRec ch106 = {6,13,-1,3,9,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x60, -}; - -static const BitmapCharRec ch105 = {5,10,-2,0,9,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0x82,0x82,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch104 = {7,10,-1,0,9,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x7c,0x82,0x82,0x7c,0x80,0x78,0x84,0x84,0x84,0x7a, -}; - -static const BitmapCharRec ch103 = {7,10,-1,3,9,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x20,0x20,0x20,0x20,0xf8,0x20,0x20,0x22,0x22,0x1c, -}; - -static const BitmapCharRec ch102 = {7,10,-1,0,9,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch101 = {7,7,-1,0,9,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x7a,0x86,0x82,0x82,0x82,0x86,0x7a,0x2,0x2,0x2, -}; - -static const BitmapCharRec ch100 = {7,10,-1,0,9,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x7c,0x82,0x80,0x80,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch99 = {7,7,-1,0,9,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xbc,0xc2,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch98 = {7,10,-1,0,9,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c, -}; - -static const BitmapCharRec ch97 = {7,7,-1,0,9,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0x10,0x20,0x40,0xc0, -}; - -static const BitmapCharRec ch96 = {4,4,-3,-6,9,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xff, -}; - -static const BitmapCharRec ch95 = {8,1,0,1,9,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x82,0x44,0x28,0x10, -}; - -static const BitmapCharRec ch94 = {7,4,-1,-6,9,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xf0, -}; - -static const BitmapCharRec ch93 = {4,12,-2,1,9,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x2,0x4,0x4,0x8,0x10,0x10,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch92 = {7,10,-1,0,9,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xf0, -}; - -static const BitmapCharRec ch91 = {4,12,-3,1,9,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xfe,0x80,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0xfe, -}; - -static const BitmapCharRec ch90 = {7,10,-1,0,9,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x10,0x10,0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch89 = {7,10,-1,0,9,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0x82,0x82,0x44,0x28,0x10,0x10,0x28,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch88 = {7,10,-1,0,9,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x44,0xaa,0x92,0x92,0x92,0x92,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch87 = {7,10,-1,0,9,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x10,0x28,0x28,0x28,0x44,0x44,0x44,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch86 = {7,10,-1,0,9,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch85 = {7,10,-1,0,9,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe, -}; - -static const BitmapCharRec ch84 = {7,10,-1,0,9,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x7c,0x82,0x82,0x2,0xc,0x70,0x80,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch83 = {7,10,-1,0,9,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0x82,0x82,0x84,0x88,0x90,0xfc,0x82,0x82,0x82,0xfc, -}; - -static const BitmapCharRec ch82 = {7,10,-1,0,9,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x6,0x8,0x7c,0x92,0xa2,0x82,0x82,0x82,0x82,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch81 = {7,12,-1,2,9,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0x80,0x80,0x80,0x80,0x80,0xfc,0x82,0x82,0x82,0xfc, -}; - -static const BitmapCharRec ch80 = {7,10,-1,0,9,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch79 = {7,10,-1,0,9,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0x82,0x82,0x82,0x86,0x8a,0x92,0xa2,0xc2,0x82,0x82, -}; - -static const BitmapCharRec ch78 = {7,10,-1,0,9,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0x82,0x82,0x82,0x92,0x92,0xaa,0xaa,0xc6,0x82,0x82, -}; - -static const BitmapCharRec ch77 = {7,10,-1,0,9,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xfe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch76 = {7,10,-1,0,9,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0x82,0x84,0x88,0x90,0xa0,0xe0,0x90,0x88,0x84,0x82, -}; - -static const BitmapCharRec ch75 = {7,10,-1,0,9,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x78,0x84,0x4,0x4,0x4,0x4,0x4,0x4,0x4,0x1e, -}; - -static const BitmapCharRec ch74 = {7,10,-1,0,9,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8, -}; - -static const BitmapCharRec ch73 = {5,10,-2,0,9,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0x82,0x82,0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch72 = {7,10,-1,0,9,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x7c,0x82,0x82,0x82,0x8e,0x80,0x80,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch71 = {7,10,-1,0,9,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0x40,0x40,0x40,0x40,0x40,0x78,0x40,0x40,0x40,0xfe, -}; - -static const BitmapCharRec ch70 = {7,10,-1,0,9,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xfe,0x40,0x40,0x40,0x40,0x78,0x40,0x40,0x40,0xfe, -}; - -static const BitmapCharRec ch69 = {7,10,-1,0,9,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xfc,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch68 = {7,10,-1,0,9,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x7c,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x7c, -}; - -static const BitmapCharRec ch67 = {7,10,-1,0,9,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xfc,0x42,0x42,0x42,0x42,0x7c,0x42,0x42,0x42,0xfc, -}; - -static const BitmapCharRec ch66 = {7,10,-1,0,9,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x44,0x28,0x10, -}; - -static const BitmapCharRec ch65 = {7,10,-1,0,9,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x7c,0x80,0x80,0x9a,0xa6,0xa2,0x9e,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch64 = {7,10,-1,0,9,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x10,0x0,0x10,0x10,0x8,0x4,0x2,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch63 = {7,10,-1,0,9,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0x80,0x40,0x20,0x10,0x8,0x8,0x10,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch62 = {5,10,-2,0,9,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xfe,0x0,0x0,0xfe, -}; - -static const BitmapCharRec ch61 = {7,4,-1,-2,9,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x8,0x10,0x20,0x40,0x80,0x80,0x40,0x20,0x10,0x8, -}; - -static const BitmapCharRec ch60 = {5,10,-2,0,9,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x40,0x40,0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch59 = {2,10,-4,3,9,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch58 = {2,7,-4,0,9,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0x78,0x4,0x2,0x2,0x7a,0x86,0x82,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch57 = {7,10,-1,0,9,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x38,0x44,0x82,0x82,0x44,0x38,0x44,0x82,0x44,0x38, -}; - -static const BitmapCharRec ch56 = {7,10,-1,0,9,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x40,0x40,0x20,0x20,0x10,0x8,0x4,0x2,0x2,0xfe, -}; - -static const BitmapCharRec ch55 = {7,10,-1,0,9,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x7c,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,0x40,0x3c, -}; - -static const BitmapCharRec ch54 = {7,10,-1,0,9,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x7c,0x82,0x2,0x2,0x2,0xc2,0xbc,0x80,0x80,0xfe, -}; - -static const BitmapCharRec ch53 = {7,10,-1,0,9,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x4,0x4,0x4,0xfe,0x84,0x44,0x24,0x14,0xc,0x4, -}; - -static const BitmapCharRec ch52 = {7,10,-1,0,9,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x7c,0x82,0x2,0x2,0x2,0x1c,0x8,0x4,0x2,0xfe, -}; - -static const BitmapCharRec ch51 = {7,10,-1,0,9,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xfe,0x80,0x40,0x30,0x8,0x4,0x2,0x82,0x82,0x7c, -}; - -static const BitmapCharRec ch50 = {7,10,-1,0,9,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0xfe,0x10,0x10,0x10,0x10,0x10,0x90,0x50,0x30,0x10, -}; - -static const BitmapCharRec ch49 = {7,10,-1,0,9,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x38,0x44,0x82,0x82,0x82,0x82,0x82,0x82,0x44,0x38, -}; - -static const BitmapCharRec ch48 = {7,10,-1,0,9,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0x80,0x40,0x40,0x20,0x10,0x10,0x8,0x4,0x4,0x2, -}; - -static const BitmapCharRec ch47 = {7,10,-1,0,9,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch46 = {2,2,-4,0,9,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xfe, -}; - -static const BitmapCharRec ch45 = {7,1,-1,-4,9,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x40,0x40,0xc0,0xc0, -}; - -static const BitmapCharRec ch44 = {2,5,-4,3,9,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x10,0x10,0x10,0xfe,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch43 = {7,7,-1,-1,9,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0x10,0x92,0x54,0x38,0x54,0x92,0x10, -}; - -static const BitmapCharRec ch42 = {7,7,-1,-1,9,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x20,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {3,12,-3,1,9,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch40 = {3,12,-3,1,9,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x80,0x40,0x20,0x30, -}; - -static const BitmapCharRec ch39 = {4,4,-3,-6,9,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x62,0x94,0x88,0x94,0x62,0x60,0x90,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch38 = {7,10,-1,0,9,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x84,0x4a,0x4a,0x24,0x10,0x10,0x48,0xa4,0xa4,0x42, -}; - -static const BitmapCharRec ch37 = {7,10,-1,0,9,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x10,0x7c,0x92,0x12,0x12,0x14,0x38,0x50,0x90,0x92,0x7c,0x10, -}; - -static const BitmapCharRec ch36 = {7,12,-1,1,9,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x48,0x48,0xfc,0x48,0x48,0xfc,0x48,0x48, -}; - -static const BitmapCharRec ch35 = {6,8,-1,-1,9,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0x90,0x90,0x90, -}; - -static const BitmapCharRec ch34 = {4,3,-3,-7,9,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0x80,0x80,0x0,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch33 = {1,11,-4,0,9,ch33data}; - -/* char: 0x1f */ - -static const GLubyte ch31data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch31 = {2,2,-4,-2,9,ch31data}; - -/* char: 0x1e */ - -static const GLubyte ch30data[] = { -0x5c,0xa2,0x60,0x20,0x20,0xf8,0x20,0x20,0x22,0x1c, -}; - -static const BitmapCharRec ch30 = {7,10,-1,0,9,ch30data}; - -/* char: 0x1d */ - -static const GLubyte ch29data[] = { -0x80,0x40,0xfe,0x10,0xfe,0x4,0x2, -}; - -static const BitmapCharRec ch29 = {7,7,-1,0,9,ch29data}; - -/* char: 0x1c */ - -static const GLubyte ch28data[] = { -0x44,0x24,0x24,0x24,0x24,0x24,0xfe, -}; - -static const BitmapCharRec ch28 = {7,7,-1,0,9,ch28data}; - -/* char: 0x1b */ - -static const GLubyte ch27data[] = { -0xfe,0x0,0x80,0x40,0x20,0x10,0x8,0x8,0x10,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch27 = {7,12,-1,2,9,ch27data}; - -/* char: 0x1a */ - -static const GLubyte ch26data[] = { -0xfc,0x0,0x4,0x8,0x10,0x20,0x40,0x40,0x20,0x10,0x8,0x4, -}; - -static const BitmapCharRec ch26 = {6,12,-2,2,9,ch26data}; - -/* char: 0x19 */ - -static const GLubyte ch25data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch25 = {1,15,-4,3,9,ch25data}; - -/* char: 0x18 */ - -static const GLubyte ch24data[] = { -0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xff,0x80, -}; - -static const BitmapCharRec ch24 = {9,7,0,3,9,ch24data}; - -/* char: 0x17 */ - -static const GLubyte ch23data[] = { -0xff,0x80,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, -0x8,0x0, -}; - -static const BitmapCharRec ch23 = {9,9,0,-3,9,ch23data}; - -/* char: 0x16 */ - -static const GLubyte ch22data[] = { -0x8,0x8,0x8,0x8,0x8,0x8,0xf8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8, -}; - -static const BitmapCharRec ch22 = {5,15,0,3,9,ch22data}; - -/* char: 0x15 */ - -static const GLubyte ch21data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch21 = {5,15,-4,3,9,ch21data}; - -/* char: 0x14 */ - -static const GLubyte ch20data[] = { -0xff,0x80, -}; - -static const BitmapCharRec ch20 = {9,1,0,1,9,ch20data}; - -/* char: 0x13 */ - -static const GLubyte ch19data[] = { -0xff,0x80, -}; - -static const BitmapCharRec ch19 = {9,1,0,-1,9,ch19data}; - -/* char: 0x12 */ - -static const GLubyte ch18data[] = { -0xff,0x80, -}; - -static const BitmapCharRec ch18 = {9,1,0,-3,9,ch18data}; - -/* char: 0x11 */ - -static const GLubyte ch17data[] = { -0xff,0x80, -}; - -static const BitmapCharRec ch17 = {9,1,0,-5,9,ch17data}; - -/* char: 0x10 */ - -static const GLubyte ch16data[] = { -0xff,0x80, -}; - -static const BitmapCharRec ch16 = {9,1,0,-7,9,ch16data}; - -/* char: 0xf */ - -static const GLubyte ch15data[] = { -0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xff,0x80,0x8,0x0, -0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0, -}; - -static const BitmapCharRec ch15 = {9,15,0,3,9,ch15data}; - -/* char: 0xe */ - -static const GLubyte ch14data[] = { -0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch14 = {5,9,-4,-3,9,ch14data}; - -/* char: 0xd */ - -static const GLubyte ch13data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch13 = {5,7,-4,3,9,ch13data}; - -/* char: 0xc */ - -static const GLubyte ch12data[] = { -0x8,0x8,0x8,0x8,0x8,0x8,0xf8, -}; - -static const BitmapCharRec ch12 = {5,7,0,3,9,ch12data}; - -/* char: 0xb */ - -static const GLubyte ch11data[] = { -0xf8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8, -}; - -static const BitmapCharRec ch11 = {5,9,0,-3,9,ch11data}; - -/* char: 0xa */ - -static const GLubyte ch10data[] = { -0x8,0x8,0x8,0x8,0x3e,0x0,0x20,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch10 = {7,10,-1,2,9,ch10data}; - -/* char: 0x9 */ - -static const GLubyte ch9data[] = { -0x3e,0x20,0x20,0x20,0x20,0x88,0x98,0xa8,0xc8,0x88, -}; - -static const BitmapCharRec ch9 = {7,10,-1,2,9,ch9data}; - -/* char: 0x8 */ - -static const GLubyte ch8data[] = { -0xfe,0x10,0x10,0xfe,0x10,0x10, -}; - -static const BitmapCharRec ch8 = {7,6,-1,0,9,ch8data}; - -/* char: 0x7 */ - -static const GLubyte ch7data[] = { -0x70,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch7 = {5,4,-2,-6,9,ch7data}; - -/* char: 0x6 */ - -static const GLubyte ch6data[] = { -0x20,0x20,0x3c,0x20,0x3e,0x0,0xf8,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch6 = {7,10,-1,2,9,ch6data}; - -/* char: 0x5 */ - -static const GLubyte ch5data[] = { -0x22,0x22,0x3c,0x22,0x3c,0x0,0x78,0x80,0x80,0x78, -}; - -static const BitmapCharRec ch5 = {7,10,-1,2,9,ch5data}; - -/* char: 0x4 */ - -static const GLubyte ch4data[] = { -0x10,0x10,0x1c,0x10,0x1e,0x80,0x80,0xe0,0x80,0xf0, -}; - -static const BitmapCharRec ch4 = {7,10,-1,2,9,ch4data}; - -/* char: 0x3 */ - -static const GLubyte ch3data[] = { -0x8,0x8,0x8,0x3e,0x0,0x88,0x88,0xf8,0x88,0x88, -}; - -static const BitmapCharRec ch3 = {7,10,-1,2,9,ch3data}; - -/* char: 0x2 */ - -static const GLubyte ch2data[] = { -0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa, -}; - -static const BitmapCharRec ch2 = {8,14,0,3,9,ch2data}; - -/* char: 0x1 */ - -static const GLubyte ch1data[] = { -0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10, -}; - -static const BitmapCharRec ch1 = {7,7,-1,0,9,ch1data}; - -static const BitmapCharRec * const chars[] = { -&ch0, -&ch1, -&ch2, -&ch3, -&ch4, -&ch5, -&ch6, -&ch7, -&ch8, -&ch9, -&ch10, -&ch11, -&ch12, -&ch13, -&ch14, -&ch15, -&ch16, -&ch17, -&ch18, -&ch19, -&ch20, -&ch21, -&ch22, -&ch23, -&ch24, -&ch25, -&ch26, -&ch27, -&ch28, -&ch29, -&ch30, -&ch31, -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -&ch127, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; -#if !defined(__IBMCPP__) -const -#endif - BitmapFontRec glutBitmap9By15 = { -"-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1", -256, -0, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_bitmap.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_bitmap.cpp deleted file mode 100644 index 789a89ae73..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_bitmap.cpp +++ /dev/null @@ -1,57 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" -#include "glutbitmap.h" - -void GLUTAPIENTRY -glutBitmapCharacter(GLUTbitmapFont font, int c) -{ - const BitmapCharRec *ch; - BitmapFontPtr fontinfo; - GLint swapbytes, lsbfirst, rowlength; - GLint skiprows, skippixels, alignment; - -#if defined(_WIN32) - fontinfo = (BitmapFontPtr) __glutFont(font); -#else - fontinfo = (BitmapFontPtr) font; -#endif - - if (c < fontinfo->first || - c >= fontinfo->first + fontinfo->num_chars) - return; - ch = fontinfo->ch[c - fontinfo->first]; - if (ch) { - /* Save current modes. */ - glGetIntegerv(GL_UNPACK_SWAP_BYTES, &swapbytes); - glGetIntegerv(GL_UNPACK_LSB_FIRST, &lsbfirst); - glGetIntegerv(GL_UNPACK_ROW_LENGTH, &rowlength); - glGetIntegerv(GL_UNPACK_SKIP_ROWS, &skiprows); - glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &skippixels); - glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment); - /* Little endian machines (DEC Alpha for example) could - benefit from setting GL_UNPACK_LSB_FIRST to GL_TRUE - instead of GL_FALSE, but this would require changing the - generated bitmaps too. */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); - glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE); - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glBitmap(ch->width, ch->height, ch->xorig, ch->yorig, - ch->advance, 0, ch->bitmap); - /* Restore saved modes. */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, swapbytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, lsbfirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, rowlength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, skiprows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, skippixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, alignment); - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_cindex.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_cindex.cpp deleted file mode 100644 index 0897a3cf85..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_cindex.cpp +++ /dev/null @@ -1,259 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1996, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include "glutint.h" - -#if defined(__OS2PM__) - #define IsWindowVisible WinIsWindowVisible -#endif - -#define CLAMP(i) ((i) > 1.0 ? 1.0 : ((i) < 0.0 ? 0.0 : (i))) - -/* CENTRY */ -void GLUTAPIENTRY -glutSetColor(int ndx, GLfloat red, GLfloat green, GLfloat blue) -{ - GLUTcolormap *cmap, *newcmap; - XVisualInfo *vis; - XColor color; - int i; - - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { - cmap = __glutCurrentWindow->colormap; - vis = __glutCurrentWindow->vis; - } else { - cmap = __glutCurrentWindow->overlay->colormap; - vis = __glutCurrentWindow->overlay->vis; - if (ndx == __glutCurrentWindow->overlay->transparentPixel) { - __glutWarning( - "glutSetColor: cannot set color of overlay transparent index %d\n", - ndx); - return; - } - } - - if (!cmap) { - __glutWarning("glutSetColor: current window is RGBA"); - return; - } -#if defined(_WIN32) || defined(__OS2PM__) - if (ndx >= 256 || /* always assume 256 colors on Win32 */ -#else - if (ndx >= vis->visual->map_entries || -#endif - ndx < 0) { - __glutWarning("glutSetColor: index %d out of range", ndx); - return; - } - if (cmap->refcnt > 1) { - newcmap = __glutAssociateNewColormap(vis); - cmap->refcnt--; - /* Wouldn't it be nice if XCopyColormapAndFree could be - told not to free the old colormap's entries! */ - for (i = cmap->size - 1; i >= 0; i--) { - if (i == ndx) { - /* We are going to set this cell shortly! */ - continue; - } - if (cmap->cells[i].component[GLUT_RED] >= 0.0) { - color.pixel = i; - newcmap->cells[i].component[GLUT_RED] = - cmap->cells[i].component[GLUT_RED]; - color.red = (GLfloat) 0xffff * - cmap->cells[i].component[GLUT_RED]; - newcmap->cells[i].component[GLUT_GREEN] = - cmap->cells[i].component[GLUT_GREEN]; - color.green = (GLfloat) 0xffff * - cmap->cells[i].component[GLUT_GREEN]; - newcmap->cells[i].component[GLUT_BLUE] = - cmap->cells[i].component[GLUT_BLUE]; - color.blue = (GLfloat) 0xffff * - cmap->cells[i].component[GLUT_BLUE]; - color.flags = DoRed | DoGreen | DoBlue; -#if defined(_WIN32) || defined(__OS2PM__) - if (IsWindowVisible(__glutCurrentWindow->win)) { - XHDC = __glutCurrentWindow->hdc; - } else { - XHDC = 0; - } -#endif - XStoreColor(__glutDisplay, newcmap->cmap, &color); - } else { - /* Leave unallocated entries unallocated. */ - } - } - cmap = newcmap; - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { - __glutCurrentWindow->colormap = cmap; - __glutCurrentWindow->cmap = cmap->cmap; - } else { - __glutCurrentWindow->overlay->colormap = cmap; - __glutCurrentWindow->overlay->cmap = cmap->cmap; - } - XSetWindowColormap(__glutDisplay, - __glutCurrentWindow->renderWin, cmap->cmap); - -#if !defined(_WIN32) && !defined(__OS2PM__) - { - GLUTwindow *toplevel; - - toplevel = __glutToplevelOf(__glutCurrentWindow); - if (toplevel->cmap != cmap->cmap) { - __glutPutOnWorkList(toplevel, GLUT_COLORMAP_WORK); - } - } -#endif - } - color.pixel = ndx; - red = CLAMP(red); - cmap->cells[ndx].component[GLUT_RED] = red; - color.red = (GLfloat) 0xffff *red; - green = CLAMP(green); - cmap->cells[ndx].component[GLUT_GREEN] = green; - color.green = (GLfloat) 0xffff *green; - blue = CLAMP(blue); - cmap->cells[ndx].component[GLUT_BLUE] = blue; - color.blue = (GLfloat) 0xffff *blue; - color.flags = DoRed | DoGreen | DoBlue; -#if defined(_WIN32) || defined(__OS2PM__) - if (IsWindowVisible(__glutCurrentWindow->win)) { - XHDC = __glutCurrentWindow->hdc; - } else { - XHDC = 0; - } -#endif - XStoreColor(__glutDisplay, cmap->cmap, &color); -} - -GLfloat GLUTAPIENTRY -glutGetColor(int ndx, int comp) -{ - GLUTcolormap *colormap; - XVisualInfo *vis; - - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { - colormap = __glutCurrentWindow->colormap; - vis = __glutCurrentWindow->vis; - } else { - colormap = __glutCurrentWindow->overlay->colormap; - vis = __glutCurrentWindow->overlay->vis; - if (ndx == __glutCurrentWindow->overlay->transparentPixel) { - __glutWarning("glutGetColor: requesting overlay transparent index %d\n", - ndx); - return -1.0; - } - } - - if (!colormap) { - __glutWarning("glutGetColor: current window is RGBA"); - return -1.0; - } -#if defined(_WIN32) || defined(__OS2PM__) -#define OUT_OF_RANGE_NDX(ndx) (ndx >= 256 || ndx < 0) -#else -#define OUT_OF_RANGE_NDX(ndx) (ndx >= vis->visual->map_entries || ndx < 0) -#endif - if (OUT_OF_RANGE_NDX(ndx)) { - __glutWarning("glutGetColor: index %d out of range", ndx); - return -1.0; - } - return colormap->cells[ndx].component[comp]; -} - -void GLUTAPIENTRY -glutCopyColormap(int winnum) -{ - GLUTwindow *window = __glutWindowList[winnum - 1]; - GLUTcolormap *oldcmap, *newcmap; - XVisualInfo *dstvis; - - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { - oldcmap = __glutCurrentWindow->colormap; - dstvis = __glutCurrentWindow->vis; - newcmap = window->colormap; - } else { - oldcmap = __glutCurrentWindow->overlay->colormap; - dstvis = __glutCurrentWindow->overlay->vis; - if (!window->overlay) { - __glutWarning("glutCopyColormap: window %d has no overlay", winnum); - return; - } - newcmap = window->overlay->colormap; - } - - if (!oldcmap) { - __glutWarning("glutCopyColormap: destination colormap must be color index"); - return; - } - if (!newcmap) { - __glutWarning( - "glutCopyColormap: source colormap of window %d must be color index", - winnum); - return; - } - if (newcmap == oldcmap) { - /* Source and destination are the same; now copy needed. */ - return; - } -#if !defined(_WIN32) && !defined(__OS2PM__) - /* Play safe: compare visual IDs, not Visual*'s. */ - if (newcmap->visual->visualid == oldcmap->visual->visualid) { -#endif - /* Visuals match! "Copy" by reference... */ - __glutFreeColormap(oldcmap); - newcmap->refcnt++; - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { - __glutCurrentWindow->colormap = newcmap; - __glutCurrentWindow->cmap = newcmap->cmap; - } else { - __glutCurrentWindow->overlay->colormap = newcmap; - __glutCurrentWindow->overlay->cmap = newcmap->cmap; - } - XSetWindowColormap(__glutDisplay, __glutCurrentWindow->renderWin, - newcmap->cmap); -#if !defined(_WIN32) && !defined(__OS2PM__) - __glutPutOnWorkList(__glutToplevelOf(window), GLUT_COLORMAP_WORK); -bla bla bla - - } else { - GLUTcolormap *copycmap; - XColor color; - int i, last; - - /* Visuals different - need a distinct X colormap! */ - copycmap = __glutAssociateNewColormap(dstvis); - /* Wouldn't it be nice if XCopyColormapAndFree could be - told not to free the old colormap's entries! */ - last = newcmap->size; - if (last > copycmap->size) { - last = copycmap->size; - } - for (i = last - 1; i >= 0; i--) { - if (newcmap->cells[i].component[GLUT_RED] >= 0.0) { - color.pixel = i; - copycmap->cells[i].component[GLUT_RED] = - newcmap->cells[i].component[GLUT_RED]; - color.red = (GLfloat) 0xffff * - newcmap->cells[i].component[GLUT_RED]; - copycmap->cells[i].component[GLUT_GREEN] = - newcmap->cells[i].component[GLUT_GREEN]; - color.green = (GLfloat) 0xffff * - newcmap->cells[i].component[GLUT_GREEN]; - copycmap->cells[i].component[GLUT_BLUE] = - newcmap->cells[i].component[GLUT_BLUE]; - color.blue = (GLfloat) 0xffff * - newcmap->cells[i].component[GLUT_BLUE]; - color.flags = DoRed | DoGreen | DoBlue; - XStoreColor(__glutDisplay, copycmap->cmap, &color); - } - } - } -#endif -} -/* ENDCENTRY */ - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_cmap.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_cmap.cpp deleted file mode 100644 index d5b8d436a5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_cmap.cpp +++ /dev/null @@ -1,399 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1996, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#ifdef __VMS -//EK#include -#endif - -#include -#include -#include /* SunOS multithreaded assert() needs . Lame. */ -#include -#if !defined(_WIN32) && !defined(__OS2__) - #include - #include - #include /* for XA_RGB_DEFAULT_MAP atom */ - #if defined(__vms) - #include /* for XmuLookupStandardColormap */ - #else - #include /* for XmuLookupStandardColormap */ - #endif -#endif - -/* SGI optimization introduced in IRIX 6.3 to avoid X server - round trips for interning common X atoms. */ -#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS) -#include -#else -#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how) -#endif - -#include "glutint.h" -#include "layerutil.h" - -GLUTcolormap *__glutColormapList = NULL; - -GLUTcolormap * -__glutAssociateNewColormap(XVisualInfo * vis) -{ - GLUTcolormap *cmap; - int transparentPixel, i; - unsigned long pixels[255]; - - cmap = (GLUTcolormap *) malloc(sizeof(GLUTcolormap)); - if (!cmap) - __glutFatalError("out of memory."); -#if defined(_WIN32) || defined(__OS2__) - pixels[0] = 0; /* avoid compilation warnings on win32 */ - cmap->visual = 0; - cmap->size = 256; /* always assume 256 on Win32 */ -#else - cmap->visual = vis->visual; - cmap->size = vis->visual->map_entries; -#endif - cmap->refcnt = 1; - cmap->cells = (GLUTcolorcell *) - malloc(sizeof(GLUTcolorcell) * cmap->size); - if (!cmap->cells) - __glutFatalError("out of memory."); - /* make all color cell entries be invalid */ - for (i = cmap->size - 1; i >= 0; i--) { - cmap->cells[i].component[GLUT_RED] = -1.0; - cmap->cells[i].component[GLUT_GREEN] = -1.0; - cmap->cells[i].component[GLUT_BLUE] = -1.0; - } - transparentPixel = __glutGetTransparentPixel(__glutDisplay, vis); - if (transparentPixel == -1 || transparentPixel >= cmap->size) { - - /* If there is no transparent pixel or if the transparent - pixel is outside the range of valid colormap cells (HP - can implement their overlays this smart way since their - transparent pixel is 255), we can AllocAll the colormap. - See note below. */ - - cmap->cmap = XCreateColormap(__glutDisplay, - __glutRoot, cmap->visual, AllocAll); - } else { - - /* On machines where zero (or some other value in the range - of 0 through map_entries-1), BadAlloc may be generated - when an AllocAll overlay colormap is allocated since the - transparent pixel precludes all the cells in the colormap - being allocated (the transparent pixel is pre-allocated). - So in this case, use XAllocColorCells to allocate - map_entries-1 pixels (that is, all but the transparent - pixel. */ - -#if defined(_WIN32) || defined(__OS2__) - cmap->cmap = XCreateColormap(__glutDisplay, - __glutRoot, 0, AllocNone); -#else - cmap->cmap = XCreateColormap(__glutDisplay, - __glutRoot, vis->visual, AllocNone); - XAllocColorCells(__glutDisplay, cmap->cmap, False, 0, 0, - pixels, cmap->size - 1); -#endif - } - cmap->next = __glutColormapList; - __glutColormapList = cmap; - return cmap; -} - -static GLUTcolormap * -associateColormap(XVisualInfo * vis) -{ -#if !defined(_WIN32) && !defined(__OS2__) - GLUTcolormap *cmap = __glutColormapList; - - while (cmap != NULL) { - /* Play safe: compare visual IDs, not Visual*'s. */ - if (cmap->visual->visualid == vis->visual->visualid) { - /* Already have created colormap for the visual. */ - cmap->refcnt++; - return cmap; - } - cmap = cmap->next; - } -#endif - return __glutAssociateNewColormap(vis); -} - -void -__glutSetupColormap(XVisualInfo * vi, GLUTcolormap ** colormap, Colormap * cmap) -{ -#if defined(_WIN32) || defined(__OS2__) - if (vi->dwFlags & PFD_NEED_PALETTE || vi->iPixelType == PFD_TYPE_COLORINDEX) { - *colormap = associateColormap(vi); - *cmap = (*colormap)->cmap; - } else { - *colormap = NULL; - *cmap = 0; - } -#else - Status status; - XStandardColormap *standardCmaps; - int i, numCmaps; - static Atom hpColorRecoveryAtom = -1; - int isRGB, visualClass, rc; - -#if defined(__cplusplus) || defined(c_plusplus) - visualClass = vi->c_class; -#else - visualClass = vi->class; -#endif - switch (visualClass) { - case PseudoColor: - /* Mesa might return a PseudoColor visual for RGB mode. */ - rc = glXGetConfig(__glutDisplay, vi, GLX_RGBA, &isRGB); - if (rc == 0 && isRGB) { - /* Must be Mesa. */ - *colormap = NULL; - if (MaxCmapsOfScreen(DefaultScreenOfDisplay(__glutDisplay)) == 1 - && vi->visual == DefaultVisual(__glutDisplay, __glutScreen)) { - char *privateCmap = getenv("MESA_PRIVATE_CMAP"); - - if (privateCmap) { - /* User doesn't want to share colormaps. */ - *cmap = XCreateColormap(__glutDisplay, __glutRoot, - vi->visual, AllocNone); - } else { - /* Share the root colormap. */ - *cmap = DefaultColormap(__glutDisplay, __glutScreen); - } - } else { - /* Get our own PseudoColor colormap. */ - *cmap = XCreateColormap(__glutDisplay, __glutRoot, - vi->visual, AllocNone); - } - } else { - /* CI mode, real GLX never returns a PseudoColor visual - for RGB mode. */ - *colormap = associateColormap(vi); - *cmap = (*colormap)->cmap; - } - break; - case TrueColor: - case DirectColor: - *colormap = NULL; /* NULL if RGBA */ - - /* Hewlett-Packard supports a feature called "HP Color - Recovery". Mesa has code to use HP Color Recovery. For - Mesa to use this feature, the atom - _HP_RGB_SMOOTH_MAP_LIST must be defined on the root - window AND the colormap obtainable by XGetRGBColormaps - for that atom must be set on the window. If that - colormap is not set, the output will look stripy. */ - - if (hpColorRecoveryAtom == -1) { - char *xvendor; - -#define VENDOR_HP "Hewlett-Packard" - - /* Only makes sense to make XInternAtom round-trip if we - know that we are connected to an HP X server. */ - xvendor = ServerVendor(__glutDisplay); - if (!strncmp(xvendor, VENDOR_HP, sizeof(VENDOR_HP) - 1)) { - hpColorRecoveryAtom = XInternAtom(__glutDisplay, "_HP_RGB_SMOOTH_MAP_LIST", True); - } else { - hpColorRecoveryAtom = None; - } - } - if (hpColorRecoveryAtom != None) { - status = XGetRGBColormaps(__glutDisplay, __glutRoot, - &standardCmaps, &numCmaps, hpColorRecoveryAtom); - if (status == 1) { - for (i = 0; i < numCmaps; i++) { - if (standardCmaps[i].visualid == vi->visualid) { - *cmap = standardCmaps[i].colormap; - XFree(standardCmaps); - return; - } - } - XFree(standardCmaps); - } - } -#ifndef SOLARIS_2_4_BUG - /* Solaris 2.4 and 2.5 have a bug in their - XmuLookupStandardColormap implementations. Please - compile your Solaris 2.4 or 2.5 version of GLUT with - -DSOLARIS_2_4_BUG to work around this bug. The symptom - of the bug is that programs will get a BadMatch error - from X_CreateWindow when creating a GLUT window because - Solaris 2.4 and 2.5 create a corrupted RGB_DEFAULT_MAP - property. Note that this workaround prevents Colormap - sharing between applications, perhaps leading - unnecessary colormap installations or colormap flashing. - Sun fixed this bug in Solaris 2.6. */ - status = XmuLookupStandardColormap(__glutDisplay, - vi->screen, vi->visualid, vi->depth, XA_RGB_DEFAULT_MAP, - /* replace */ False, /* retain */ True); - if (status == 1) { - status = XGetRGBColormaps(__glutDisplay, __glutRoot, - &standardCmaps, &numCmaps, XA_RGB_DEFAULT_MAP); - if (status == 1) { - for (i = 0; i < numCmaps; i++) { - if (standardCmaps[i].visualid == vi->visualid) { - *cmap = standardCmaps[i].colormap; - XFree(standardCmaps); - return; - } - } - XFree(standardCmaps); - } - } -#endif - /* If no standard colormap but TrueColor, just make a - private one. */ - /* XXX Should do a better job of internal sharing for - privately allocated TrueColor colormaps. */ - /* XXX DirectColor probably needs ramps hand initialized! */ - *cmap = XCreateColormap(__glutDisplay, __glutRoot, - vi->visual, AllocNone); - break; - case StaticColor: - case StaticGray: - case GrayScale: - /* Mesa supports these visuals */ - *colormap = NULL; - *cmap = XCreateColormap(__glutDisplay, __glutRoot, - vi->visual, AllocNone); - break; - default: - __glutFatalError( - "could not allocate colormap for visual type: %d.", - visualClass); - } - return; -#endif -} - -#if !defined(_WIN32) && !defined(__OS2__) -static int -findColormaps(GLUTwindow * window, - Window * winlist, Colormap * cmaplist, int num, int max) -{ - GLUTwindow *child; - int i; - - /* Do not allow more entries that maximum number of - colormaps! */ - if (num >= max) - return num; - /* Is cmap for this window already on the list? */ - for (i = 0; i < num; i++) { - if (cmaplist[i] == window->cmap) - goto normalColormapAlreadyListed; - } - /* Not found on the list; add colormap and window. */ - winlist[num] = window->win; - cmaplist[num] = window->cmap; - num++; - -normalColormapAlreadyListed: - - /* Repeat above but for the overlay colormap if there one. */ - if (window->overlay) { - if (num >= max) - return num; - for (i = 0; i < num; i++) { - if (cmaplist[i] == window->overlay->cmap) - goto overlayColormapAlreadyListed; - } - winlist[num] = window->overlay->win; - cmaplist[num] = window->overlay->cmap; - num++; - } -overlayColormapAlreadyListed: - - /* Recursively search children. */ - child = window->children; - while (child) { - num = findColormaps(child, winlist, cmaplist, num, max); - child = child->siblings; - } - return num; -} - -void -__glutEstablishColormapsProperty(GLUTwindow * window) -{ - /* this routine is strictly X. Win32 doesn't need to do - anything of this sort (but has to do other wacky stuff - later). */ - static Atom wmColormapWindows = None; - Window *winlist; - Colormap *cmaplist; - Status status; - int maxcmaps, num; - - assert(!window->parent); - maxcmaps = MaxCmapsOfScreen(ScreenOfDisplay(__glutDisplay, - __glutScreen)); - /* For portability reasons we don't use alloca for winlist - and cmaplist, but we could. */ - winlist = (Window *) malloc(maxcmaps * sizeof(Window)); - cmaplist = (Colormap *) malloc(maxcmaps * sizeof(Colormap)); - num = findColormaps(window, winlist, cmaplist, 0, maxcmaps); - if (num < 2) { - /* Property no longer needed; remove it. */ - wmColormapWindows = XSGIFastInternAtom(__glutDisplay, - "WM_COLORMAP_WINDOWS", SGI_XA_WM_COLORMAP_WINDOWS, False); - if (wmColormapWindows == None) { - __glutWarning("Could not intern X atom for WM_COLORMAP_WINDOWS."); - return; - } - XDeleteProperty(__glutDisplay, window->win, wmColormapWindows); - } else { - status = XSetWMColormapWindows(__glutDisplay, window->win, - winlist, num); - /* XSetWMColormapWindows should always work unless the - WM_COLORMAP_WINDOWS property cannot be intern'ed. We - check to be safe. */ - if (status == False) - __glutFatalError("XSetWMColormapWindows returned False."); - } - /* For portability reasons we don't use alloca for winlist - and cmaplist, but we could. */ - free(winlist); - free(cmaplist); -} - -GLUTwindow * -__glutToplevelOf(GLUTwindow * window) -{ - while (window->parent) { - window = window->parent; - } - return window; -} -#endif - -void -__glutFreeColormap(GLUTcolormap * cmap) -{ - GLUTcolormap *cur, **prev; - - cmap->refcnt--; - if (cmap->refcnt == 0) { - /* remove from colormap list */ - cur = __glutColormapList; - prev = &__glutColormapList; - while (cur) { - if (cur == cmap) { - *prev = cmap->next; - break; - } - prev = &(cur->next); - cur = cur->next; - } - /* actually free colormap */ - XFreeColormap(__glutDisplay, cmap->cmap); - free(cmap->cells); - free(cmap); - } -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_cursor.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_cursor.cpp deleted file mode 100644 index 9784e9b622..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_cursor.cpp +++ /dev/null @@ -1,210 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1995, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" - -#if !defined(_WIN32) && !defined(__OS2PM__) -#include /* For XA_CURSOR */ -#include -#endif - -typedef struct _CursorTable { -#if defined(_WIN32) - char* glyph; -#else - int glyph; -#endif - Cursor cursor; -} CursorTable; -/* *INDENT-OFF* */ - -static CursorTable cursorTable[] = { - {XC_arrow, None}, /* GLUT_CURSOR_RIGHT_ARROW */ - {XC_top_left_arrow, None}, /* GLUT_CURSOR_LEFT_ARROW */ - {XC_hand1, None}, /* GLUT_CURSOR_INFO */ - {XC_pirate, None}, /* GLUT_CURSOR_DESTROY */ - {XC_question_arrow, None}, /* GLUT_CURSOR_HELP */ - {XC_exchange, None}, /* GLUT_CURSOR_CYCLE */ - {XC_spraycan, None}, /* GLUT_CURSOR_SPRAY */ - {XC_watch, None}, /* GLUT_CURSOR_WAIT */ - {XC_xterm, None}, /* GLUT_CURSOR_TEXT */ - {XC_crosshair, None}, /* GLUT_CURSOR_CROSSHAIR */ - {XC_sb_v_double_arrow, None}, /* GLUT_CURSOR_UP_DOWN */ - {XC_sb_h_double_arrow, None}, /* GLUT_CURSOR_LEFT_RIGHT */ - {XC_top_side, None}, /* GLUT_CURSOR_TOP_SIDE */ - {XC_bottom_side, None}, /* GLUT_CURSOR_BOTTOM_SIDE */ - {XC_left_side, None}, /* GLUT_CURSOR_LEFT_SIDE */ - {XC_right_side, None}, /* GLUT_CURSOR_RIGHT_SIDE */ - {XC_top_left_corner, None}, /* GLUT_CURSOR_TOP_LEFT_CORNER */ - {XC_top_right_corner, None}, /* GLUT_CURSOR_TOP_RIGHT_CORNER */ - {XC_bottom_right_corner, None}, /* GLUT_CURSOR_BOTTOM_RIGHT_CORNER */ - {XC_bottom_left_corner, None}, /* GLUT_CURSOR_BOTTOM_LEFT_CORNER */ -}; -/* *INDENT-ON* */ - -#if !defined(_WIN32) && !defined(__OS2PM__) -static Cursor blankCursor = None; -static Cursor fullCrosshairCusor = None; - -/* SGI X server's support a special property called the - _SGI_CROSSHAIR_CURSOR that when installed as a window's - cursor, becomes a full screen crosshair cursor. SGI - has special cursor generation hardware for this case. */ -static Cursor -getFullCrosshairCursor(void) -{ - Cursor cursor; - Atom crosshairAtom, actualType; - int rc, actualFormat; - unsigned long n, left; - unsigned long *value; - - if (fullCrosshairCusor == None) { - crosshairAtom = XInternAtom(__glutDisplay, - "_SGI_CROSSHAIR_CURSOR", True); - if (crosshairAtom != None) { - value = 0; /* Make compiler happy. */ - rc = XGetWindowProperty(__glutDisplay, __glutRoot, - crosshairAtom, 0, 1, False, XA_CURSOR, &actualType, - &actualFormat, &n, &left, (unsigned char **) &value); - if (rc == Success && actualFormat == 32 && n >= 1) { - cursor = value[0]; - XFree(value); - return cursor; - } - } - } - return XCreateFontCursor(__glutDisplay, XC_crosshair); -} - -/* X11 forces you to create a blank cursor if you want - to disable the cursor. */ -static Cursor -makeBlankCursor(void) -{ - static char data[1] = - {0}; - Cursor cursor; - Pixmap blank; - XColor dummy; - - blank = XCreateBitmapFromData(__glutDisplay, __glutRoot, - data, 1, 1); - if (blank == None) - __glutFatalError("out of memory."); - cursor = XCreatePixmapCursor(__glutDisplay, blank, blank, - &dummy, &dummy, 0, 0); - XFreePixmap(__glutDisplay, blank); - - return cursor; -} -#endif /* !_WIN32 && !__OS2PM__*/ - -/* Win32 and X11 use this same function to accomplish - fairly different tasks. X11 lets you just define the - cursor for a window and the window system takes care - of making sure that the window's cursor is installed - when the mouse is in the window. Win32 requires the - application to handle a WM_SETCURSOR message to install - the right cursor when windows are entered. Think of - the Win32 __glutSetCursor (called from __glutWindowProc) - as "install cursor". Think of the X11 __glutSetCursor - (called from glutSetCursor) as "define cursor". */ -void -__glutSetCursor(GLUTwindow *window) -{ - int cursor = window->cursor; - Cursor xcursor = 0; - - if (cursor >= 0 && - cursor < sizeof(cursorTable) / sizeof(cursorTable[0])) { - if (cursorTable[cursor].cursor == None) { - cursorTable[cursor].cursor = XCreateFontCursor(__glutDisplay, - cursorTable[cursor].glyph); - } - xcursor = cursorTable[cursor].cursor; - } else { - /* Special cases. */ - switch (cursor) { - case GLUT_CURSOR_INHERIT: -#if defined(_WIN32) - while (window->parent) { - window = window->parent; - if (window->cursor != GLUT_CURSOR_INHERIT) { - __glutSetCursor(window); - return; - } - } - /* XXX Default to an arrow cursor. Is this - right or should we be letting the default - window proc be installing some system cursor? */ - xcursor = cursorTable[0].cursor; - if (xcursor == NULL) { - xcursor = - cursorTable[0].cursor = - LoadCursor(NULL, cursorTable[0].glyph); - } - -#elif defined(__OS2PM__) -//todo - xcursor = None; - -#else - xcursor = None; -#endif - break; - case GLUT_CURSOR_NONE: -#if defined(_WIN32) || defined(__OS2PM__) - xcursor = NULL; -#else - if (blankCursor == None) { - blankCursor = makeBlankCursor(); - } - xcursor = blankCursor; -#endif - break; - case GLUT_CURSOR_FULL_CROSSHAIR: -#if defined(_WIN32) - xcursor = (HICON) IDC_CROSS; -#elif defined(__OS2PM__) -//todo -#else - if (fullCrosshairCusor == None) { - fullCrosshairCusor = getFullCrosshairCursor(); - } - xcursor = fullCrosshairCusor; -#endif - break; - } - } - XDefineCursor(__glutDisplay, - window->win, xcursor); - XFlush(__glutDisplay); -} - -/* CENTRY */ -void GLUTAPIENTRY -glutSetCursor(int cursor) -{ -#ifdef _WIN32 - POINT point; - - __glutCurrentWindow->cursor = cursor; - /* Are we in the window right now? If so, - install the cursor. */ - GetCursorPos(&point); - if (__glutCurrentWindow->win == WindowFromPoint(point)) { - __glutSetCursor(__glutCurrentWindow); - } -#elif defined(__OS2PM__) -//todo -#else - __glutCurrentWindow->cursor = cursor; - __glutSetCursor(__glutCurrentWindow); -#endif -} -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_event.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_event.cpp deleted file mode 100644 index c556ef2826..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_event.cpp +++ /dev/null @@ -1,1399 +0,0 @@ -/* glut_event.c */ -/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1997, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#ifdef __VMS -#include -#endif - -#include -#include -#include -#include -#include /* Some FD_ZERO macros use memset without - prototyping memset. */ - -/* Much of the following #ifdef logic to include the proper - prototypes for the select system call is based on logic - from the X11R6.3 version of . */ - -#if !defined(_WIN32) -# ifdef __sgi -# include /* prototype for bzero used by FD_ZERO */ -# endif -# if (defined(SVR4) || defined(CRAY) || defined(AIXV3)) && !defined(FD_SETSIZE) -# include /* select system call interface */ -# ifdef luna -# include -# endif -# endif - /* AIX 4.2 fubar-ed , so go to heroic measures to get it */ -# if defined(AIXV4) && !defined(NFDBITS) -# include -# endif -#endif /* !_WIN32 */ - -#include - -#if defined(__OS2__) -//??? ­ ä¨£  ?? # include -#elif !defined(_WIN32) -# if defined(__vms) && ( __VMS_VER < 70000000 ) -# include -# else -# ifndef __vms -# include -# endif -# endif -# include -# include -# include -#else -# ifdef __CYGWIN32__ -# include -# else -# include -# endif -# ifdef __hpux - /* XXX Bert Gijsbers reports that HP-UX - needs different keysyms for the End, Insert, and Delete keys - to work on an HP 715. It would be better if HP generated - standard keysyms for standard keys. */ -# include -# endif -#endif /* !_WIN32 */ - -#include "glutint.h" - -#if defined(__vms) && ( __VMS_VER < 70000000 ) -#include -#include -extern int SYS$CLREF(int efn); -extern int SYS$SETIMR(unsigned int efn, struct timeval6 *timeout, void *ast, - unsigned int request_id, unsigned int flags); -extern int SYS$WFLOR(unsigned int efn, unsigned int mask); -extern int SYS$CANTIM(unsigned int request_id, unsigned int mode); -#endif /* __vms, VMs 6.2 or earlier */ - -static GLUTtimer *freeTimerList = NULL; - -GLUTidleCB __glutIdleFunc = NULL; -GLUTtimer *__glutTimerList = NULL; -#ifdef SUPPORT_FORTRAN -GLUTtimer *__glutNewTimer; -#endif -GLUTwindow *__glutWindowWorkList = NULL; -GLUTmenu *__glutMappedMenu; -GLUTmenu *__glutCurrentMenu = NULL; - -void (*__glutUpdateInputDeviceMaskFunc) (GLUTwindow *); -#if !defined(_WIN32) && !defined(__OS2__) -void (*__glutMenuItemEnterOrLeave)(GLUTmenuItem * item, int num, int type) = NULL; -void (*__glutFinishMenu)(Window win, int x, int y); -void (*__glutPaintMenu)(GLUTmenu * menu); -void (*__glutStartMenu)(GLUTmenu * menu, GLUTwindow * window, int x, int y, int x_win, int y_win); -GLUTmenu * (*__glutGetMenuByNum)(int menunum); -GLUTmenuItem * (*__glutGetMenuItem)(GLUTmenu * menu, Window win, int *which); -GLUTmenu * (*__glutGetMenu)(Window win); -#endif - -Atom __glutMotifHints = None; -/* Modifier mask of ~0 implies not in core input callback. */ -unsigned int __glutModifierMask = (unsigned int) ~0; -int __glutWindowDamaged = 0; - -void GLUTAPIENTRY -glutIdleFunc(GLUTidleCB idleFunc) -{ - __glutIdleFunc = idleFunc; -} - -void GLUTAPIENTRY -glutTimerFunc(unsigned int interval, GLUTtimerCB timerFunc, int value) -{ - GLUTtimer *timer, *other; - GLUTtimer **prevptr; -#ifdef OLD_VMS - struct timeval6 now; -#else - struct timeval now; -#endif - - if (!timerFunc) - return; - - if (freeTimerList) { - timer = freeTimerList; - freeTimerList = timer->next; - } else { - timer = (GLUTtimer *) malloc(sizeof(GLUTtimer)); - if (!timer) - __glutFatalError("out of memory."); - } - - timer->func = timerFunc; -#if defined(__vms) && ( __VMS_VER < 70000000 ) - /* VMS time is expressed in units of 100 ns */ - timer->timeout.val = interval * TICKS_PER_MILLISECOND; -#else - timer->timeout.tv_sec = (int) interval / 1000; - timer->timeout.tv_usec = (int) (interval % 1000) * 1000; -#endif - timer->value = value; - timer->next = NULL; - GETTIMEOFDAY(&now); - ADD_TIME(timer->timeout, timer->timeout, now); - prevptr = &__glutTimerList; - other = *prevptr; - while (other && IS_AFTER(other->timeout, timer->timeout)) { - prevptr = &other->next; - other = *prevptr; - } - timer->next = other; -#ifdef SUPPORT_FORTRAN - __glutNewTimer = timer; /* for Fortran binding! */ -#endif - *prevptr = timer; -} - -void -handleTimeouts(void) -{ -#ifdef OLD_VMS - struct timeval6 now; -#else - struct timeval now; -#endif - GLUTtimer *timer; - - /* Assumption is that __glutTimerList is already determined - to be non-NULL. */ - GETTIMEOFDAY(&now); - while (IS_AT_OR_AFTER(__glutTimerList->timeout, now)) { - timer = __glutTimerList; - timer->func(timer->value); - __glutTimerList = timer->next; - timer->next = freeTimerList; - freeTimerList = timer; - if (!__glutTimerList) - break; - } -} - -void -__glutPutOnWorkList(GLUTwindow * window, int workMask) -{ - if (window->workMask) { - /* Already on list; just OR in new workMask. */ - window->workMask |= workMask; - } else { - /* Update work mask and add to window work list. */ - window->workMask = workMask; - /* Assert that if the window does not have a - workMask already, the window should definitely - not be the head of the work list. */ - assert(window != __glutWindowWorkList); - window->prevWorkWin = __glutWindowWorkList; - __glutWindowWorkList = window; - } -} - -void -__glutPostRedisplay(GLUTwindow * window, int layerMask) -{ - int shown = (layerMask & (GLUT_REDISPLAY_WORK | GLUT_REPAIR_WORK)) ? - window->shownState : window->overlay->shownState; - - /* Post a redisplay if the window is visible (or the - visibility of the window is unknown, ie. window->visState - == -1) _and_ the layer is known to be shown. */ - if (window->visState != GLUT_HIDDEN - && window->visState != GLUT_FULLY_COVERED && shown) { - __glutPutOnWorkList(window, layerMask); - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutPostRedisplay(void) -{ - __glutPostRedisplay(__glutCurrentWindow, GLUT_REDISPLAY_WORK); -} - -/* The advantage of this routine is that it saves the cost of a - glutSetWindow call (entailing an expensive OpenGL context switch), - particularly useful when multiple windows need redisplays posted at - the same times. See also glutPostWindowOverlayRedisplay. */ -void GLUTAPIENTRY -glutPostWindowRedisplay(int win) -{ - __glutPostRedisplay(__glutWindowList[win - 1], GLUT_REDISPLAY_WORK); -} - -/* ENDCENTRY */ -static GLUTeventParser *eventParserList = NULL; - -/* __glutRegisterEventParser allows another module to register - to intercept X events types not otherwise acted on by the - GLUT processEventsAndTimeouts routine. The X Input - extension support code uses an event parser for handling X - Input extension events. */ - -void -__glutRegisterEventParser(GLUTeventParser * parser) -{ - parser->next = eventParserList; - eventParserList = parser; -} - -static void -markWindowHidden(GLUTwindow * window) -{ - if (GLUT_HIDDEN != window->visState) { - GLUTwindow *child; - - if (window->windowStatus) { - window->visState = GLUT_HIDDEN; - __glutSetWindow(window); - window->windowStatus(GLUT_HIDDEN); - } - /* An unmap is only reported on a single window; its - descendents need to know they are no longer visible. */ - child = window->children; - while (child) { - markWindowHidden(child); - child = child->siblings; - } - } -} - -#if !defined(_WIN32) && !defined(__OS2__) - -static void -purgeStaleWindow(Window win) -{ - GLUTstale **pEntry = &__glutStaleWindowList; - GLUTstale *entry = __glutStaleWindowList; - - /* Tranverse singly-linked stale window list look for the - window ID. */ - while (entry) { - if (entry->win == win) { - /* Found it; delete it. */ - *pEntry = entry->next; - free(entry); - return; - } else { - pEntry = &entry->next; - entry = *pEntry; - } - } -} - -/* Unlike XNextEvent, if a signal arrives, - interruptibleXNextEvent will return (with a zero return - value). This helps GLUT drop out of XNextEvent if a signal - is delivered. The intent is so that a GLUT program can call - glutIdleFunc in a signal handler to register an idle func - and then immediately get dropped into the idle func (after - returning from the signal handler). The idea is to make - GLUT's main loop reliably interruptible by signals. */ -static int -interruptibleXNextEvent(Display * dpy, XEvent * event) -{ - fd_set fds; - int rc; - - /* Flush X protocol since XPending does not do this - implicitly. */ - XFlush(__glutDisplay); - for (;;) { - if (XPending(__glutDisplay)) { - XNextEvent(dpy, event); - return 1; - } -#ifndef VMS - /* the combination ConectionNumber-select is buggy on VMS. Sometimes it - * fails. This part of the code hangs the program on VMS7.2. But even - * without it the program seems to run correctly. - * Note that this is a bug in the VMS/DECWindows run-time-libraries. - * Compaq engeneering does not want or is not able to make a fix. - * (last sentence is a quotation from Compaq when I reported the - * problem January 2000) */ - FD_ZERO(&fds); - FD_SET(__glutConnectionFD, &fds); - rc = select(__glutConnectionFD + 1, &fds, NULL, NULL, NULL); - if (rc < 0) { - if (errno == EINTR) { - return 0; - } else { - __glutFatalError("select error."); - } - } -#endif - } -} - -#endif - -static void -processEventsAndTimeouts(void) -{ - do { -#if defined(__OS2__) - QMSG qmsg; /* message from message queue */ - extern HAB hab; /* PM anchor block handle */ - - if(! WinGetMsg( hab, &qmsg, 0UL, 0UL, 0UL ) ) - exit(0); - WinDispatchMsg( hab, /* PM anchor block handle */ - &qmsg ); /* pointer to message */ - -#elif defined(_WIN32) - MSG event; - - if(!GetMessage(&event, NULL, 0, 0)) /* bail if no more messages */ - exit(0); - TranslateMessage(&event); /* translate virtual-key messages */ - DispatchMessage(&event); /* call the window proc */ - /* see win32_event.c for event (message) processing procedures */ -#else - static int mappedMenuButton; - GLUTeventParser *parser; - XEvent event, ahead; - GLUTwindow *window; - GLUTkeyboardCB keyboard; - GLUTspecialCB special; - int gotEvent, width, height; - - gotEvent = interruptibleXNextEvent(__glutDisplay, &event); - if (gotEvent) { - switch (event.type) { - case MappingNotify: - XRefreshKeyboardMapping((XMappingEvent *) & event); - break; - case ConfigureNotify: - window = __glutGetWindow(event.xconfigure.window); - if (window) { - if (window->win != event.xconfigure.window) { - /* Ignore ConfigureNotify sent to the overlay - planes. GLUT could get here because overlays - select for StructureNotify events to receive - DestroyNotify. */ - break; - } - width = event.xconfigure.width; - height = event.xconfigure.height; - if (width != window->width || height != window->height) { - if (window->overlay) { - XResizeWindow(__glutDisplay, window->overlay->win, width, height); - } - window->width = width; - window->height = height; - __glutSetWindow(window); - /* Do not execute OpenGL out of sequence with - respect to the XResizeWindow request! */ - glXWaitX(); - window->reshape(width, height); - window->forceReshape = False; - /* A reshape should be considered like posting a - repair; this is necessary for the "Mesa - glXSwapBuffers to repair damage" hack to operate - correctly. Without it, there's not an initial - back buffer render from which to blit from when - damage happens to the window. */ - __glutPostRedisplay(window, GLUT_REPAIR_WORK); - } - } - break; - case Expose: - /* compress expose events */ - while (XEventsQueued(__glutDisplay, QueuedAfterReading) - > 0) { - XPeekEvent(__glutDisplay, &ahead); - if (ahead.type != Expose || - ahead.xexpose.window != event.xexpose.window) { - break; - } - XNextEvent(__glutDisplay, &event); - } - if (event.xexpose.count == 0) { - GLUTmenu *menu; - - if (__glutMappedMenu && - (menu = __glutGetMenu(event.xexpose.window))) { - __glutPaintMenu(menu); - } else { - window = __glutGetWindow(event.xexpose.window); - if (window) { - if (window->win == event.xexpose.window) { - __glutPostRedisplay(window, GLUT_REPAIR_WORK); - } else if (window->overlay && window->overlay->win == event.xexpose.window) { - __glutPostRedisplay(window, GLUT_OVERLAY_REPAIR_WORK); - } - } - } - } else { - /* there are more exposes to read; wait to redisplay */ - } - break; - case ButtonPress: - case ButtonRelease: - if (__glutMappedMenu && event.type == ButtonRelease - && mappedMenuButton == event.xbutton.button) { - /* Menu is currently popped up and its button is - released. */ - __glutFinishMenu(event.xbutton.window, event.xbutton.x, event.xbutton.y); - } else { - window = __glutGetWindow(event.xbutton.window); - if (window) { - GLUTmenu *menu; - int menuNum; - - menuNum = window->menu[event.xbutton.button - 1]; - /* Make sure that __glutGetMenuByNum is only called if there - really is a menu present. */ - if ((menuNum > 0) && (menu = __glutGetMenuByNum(menuNum))) { - if (event.type == ButtonPress && !__glutMappedMenu) { - __glutStartMenu(menu, window, - event.xbutton.x_root, event.xbutton.y_root, - event.xbutton.x, event.xbutton.y); - mappedMenuButton = event.xbutton.button; - } else { - /* Ignore a release of a button with a menu - attatched to it when no menu is popped up, - or ignore a press when another menu is - already popped up. */ - } - } else if (window->mouse) { - __glutSetWindow(window); - __glutModifierMask = event.xbutton.state; - window->mouse(event.xbutton.button - 1, - event.type == ButtonRelease ? - GLUT_UP : GLUT_DOWN, - event.xbutton.x, event.xbutton.y); - __glutModifierMask = ~0; - } else { - /* Stray mouse events. Ignore. */ - } - } else { - /* Window might have been destroyed and all the - events for the window may not yet be received. */ - } - } - break; - case MotionNotify: - if (!__glutMappedMenu) { - window = __glutGetWindow(event.xmotion.window); - if (window) { - /* If motion function registered _and_ buttons held - * down, call motion function... */ - if (window->motion && event.xmotion.state & - (Button1Mask | Button2Mask | Button3Mask)) { - __glutSetWindow(window); - window->motion(event.xmotion.x, event.xmotion.y); - } - /* If passive motion function registered _and_ - buttons not held down, call passive motion - function... */ - else if (window->passive && - ((event.xmotion.state & - (Button1Mask | Button2Mask | Button3Mask)) == - 0)) { - __glutSetWindow(window); - window->passive(event.xmotion.x, - event.xmotion.y); - } - } - } else { - /* Motion events are thrown away when a pop up menu - is active. */ - } - break; - case KeyPress: - case KeyRelease: - window = __glutGetWindow(event.xkey.window); - if (!window) { - break; - } - if (event.type == KeyPress) { - keyboard = window->keyboard; - } else { - - /* If we are ignoring auto repeated keys for this window, - check if the next event in the X event queue is a KeyPress - for the exact same key (and at the exact same time) as the - key being released. The X11 protocol will send auto - repeated keys as such KeyRelease/KeyPress pairs. */ - - if (window->ignoreKeyRepeat) { - if (XEventsQueued(__glutDisplay, QueuedAfterReading)) { - XPeekEvent(__glutDisplay, &ahead); - if (ahead.type == KeyPress - && ahead.xkey.window == event.xkey.window - && ahead.xkey.keycode == event.xkey.keycode - && ahead.xkey.time == event.xkey.time) { - /* Pop off the repeated KeyPress and ignore - the auto repeated KeyRelease/KeyPress pair. */ - XNextEvent(__glutDisplay, &event); - break; - } - } - } - keyboard = window->keyboardUp; - } - if (keyboard) { - char tmp[1]; - int rc; - - rc = XLookupString(&event.xkey, tmp, sizeof(tmp), - NULL, NULL); - if (rc) { - __glutSetWindow(window); - __glutModifierMask = event.xkey.state; - keyboard(tmp[0], - event.xkey.x, event.xkey.y); - __glutModifierMask = ~0; - break; - } - } - if (event.type == KeyPress) { - special = window->special; - } else { - special = window->specialUp; - } - if (special) { - KeySym ks; - int key; - -/* Introduced in X11R6: (Partial list of) Keypad Functions. Define - in place in case compiling against an older pre-X11R6 - X11/keysymdef.h file. */ -#ifndef XK_KP_Home -#define XK_KP_Home 0xFF95 -#endif -#ifndef XK_KP_Left -#define XK_KP_Left 0xFF96 -#endif -#ifndef XK_KP_Up -#define XK_KP_Up 0xFF97 -#endif -#ifndef XK_KP_Right -#define XK_KP_Right 0xFF98 -#endif -#ifndef XK_KP_Down -#define XK_KP_Down 0xFF99 -#endif -#ifndef XK_KP_Prior -#define XK_KP_Prior 0xFF9A -#endif -#ifndef XK_KP_Next -#define XK_KP_Next 0xFF9B -#endif -#ifndef XK_KP_End -#define XK_KP_End 0xFF9C -#endif -#ifndef XK_KP_Insert -#define XK_KP_Insert 0xFF9E -#endif -#ifndef XK_KP_Delete -#define XK_KP_Delete 0xFF9F -#endif - - ks = XLookupKeysym((XKeyEvent *) & event, 0); - /* XXX Verbose, but makes no assumptions about keysym - layout. */ - switch (ks) { -/* *INDENT-OFF* */ - /* function keys */ - case XK_F1: key = GLUT_KEY_F1; break; - case XK_F2: key = GLUT_KEY_F2; break; - case XK_F3: key = GLUT_KEY_F3; break; - case XK_F4: key = GLUT_KEY_F4; break; - case XK_F5: key = GLUT_KEY_F5; break; - case XK_F6: key = GLUT_KEY_F6; break; - case XK_F7: key = GLUT_KEY_F7; break; - case XK_F8: key = GLUT_KEY_F8; break; - case XK_F9: key = GLUT_KEY_F9; break; - case XK_F10: key = GLUT_KEY_F10; break; - case XK_F11: key = GLUT_KEY_F11; break; - case XK_F12: key = GLUT_KEY_F12; break; - /* directional keys */ - case XK_KP_Left: - case XK_Left: key = GLUT_KEY_LEFT; break; - case XK_KP_Up: /* Introduced in X11R6. */ - case XK_Up: key = GLUT_KEY_UP; break; - case XK_KP_Right: /* Introduced in X11R6. */ - case XK_Right: key = GLUT_KEY_RIGHT; break; - case XK_KP_Down: /* Introduced in X11R6. */ - case XK_Down: key = GLUT_KEY_DOWN; break; -/* *INDENT-ON* */ - - case XK_KP_Prior: /* Introduced in X11R6. */ - case XK_Prior: - /* XK_Prior same as X11R6's XK_Page_Up */ - key = GLUT_KEY_PAGE_UP; - break; - case XK_KP_Next: /* Introduced in X11R6. */ - case XK_Next: - /* XK_Next same as X11R6's XK_Page_Down */ - key = GLUT_KEY_PAGE_DOWN; - break; - case XK_KP_Home: /* Introduced in X11R6. */ - case XK_Home: - key = GLUT_KEY_HOME; - break; -#ifdef __hpux - case XK_Select: -#endif - case XK_KP_End: /* Introduced in X11R6. */ - case XK_End: - key = GLUT_KEY_END; - break; -#ifdef __hpux - case XK_InsertChar: -#endif - case XK_KP_Insert: /* Introduced in X11R6. */ - case XK_Insert: - key = GLUT_KEY_INSERT; - break; -#ifdef __hpux - case XK_DeleteChar: -#endif - case XK_KP_Delete: /* Introduced in X11R6. */ - /* The Delete character is really an ASCII key. */ - __glutSetWindow(window); - keyboard(127, /* ASCII Delete character. */ - event.xkey.x, event.xkey.y); - goto skip; - default: - goto skip; - } - __glutSetWindow(window); - __glutModifierMask = event.xkey.state; - special(key, event.xkey.x, event.xkey.y); - __glutModifierMask = ~0; - skip:; - } - break; - case EnterNotify: - case LeaveNotify: - if (event.xcrossing.mode != NotifyNormal || - event.xcrossing.detail == NotifyNonlinearVirtual || - event.xcrossing.detail == NotifyVirtual) { - - /* Careful to ignore Enter/LeaveNotify events that - come from the pop-up menu pointer grab and ungrab. - Also, ignore "virtual" Enter/LeaveNotify events - since they represent the pointer passing through - the window hierarchy without actually entering or - leaving the actual real estate of a window. */ - - break; - } - if (__glutMappedMenu) { - GLUTmenuItem *item; - int num; - - item = __glutGetMenuItem(__glutMappedMenu, - event.xcrossing.window, &num); - if (item) { - __glutMenuItemEnterOrLeave(item, num, event.type); - break; - } - } - window = __glutGetWindow(event.xcrossing.window); - if (window) { - if (window->entry) { - if (event.type == EnterNotify) { - - /* With overlays established, X can report two - enter events for both the overlay and normal - plane window. Do not generate a second enter - callback if we reported one without an - intervening leave. */ - - if (window->entryState != EnterNotify) { - int num = window->num; - Window xid = window->win; - - window->entryState = EnterNotify; - __glutSetWindow(window); - window->entry(GLUT_ENTERED); - - if (__glutMappedMenu) { - - /* Do not generate any passive motion events - when menus are in use. */ - - } else { - - /* An EnterNotify event can result in a - "compound" callback if a passive motion - callback is also registered. In this case, - be a little paranoid about the possibility - the window could have been destroyed in the - entry callback. */ - - window = __glutWindowList[num]; - if (window && window->passive && window->win == xid) { - __glutSetWindow(window); - window->passive(event.xcrossing.x, event.xcrossing.y); - } - } - } - } else { - if (window->entryState != LeaveNotify) { - - /* When an overlay is established for a window - already mapped and with the pointer in it, - the X server will generate a leave/enter - event pair as the pointer leaves (without - moving) from the normal plane X window to - the newly mapped overlay X window (or vice - versa). This enter/leave pair should not be - reported to the GLUT program since the pair - is a consequence of creating (or destroying) - the overlay, not an actual leave from the - GLUT window. */ - - if (XEventsQueued(__glutDisplay, QueuedAfterReading)) { - XPeekEvent(__glutDisplay, &ahead); - if (ahead.type == EnterNotify && - __glutGetWindow(ahead.xcrossing.window) == window) { - XNextEvent(__glutDisplay, &event); - break; - } - } - window->entryState = LeaveNotify; - __glutSetWindow(window); - window->entry(GLUT_LEFT); - } - } - } else if (window->passive) { - __glutSetWindow(window); - window->passive(event.xcrossing.x, event.xcrossing.y); - } - } - break; - case UnmapNotify: - /* MapNotify events are not needed to maintain - visibility state since VisibilityNotify events will - be delivered when a window becomes visible from - mapping. However, VisibilityNotify events are not - delivered when a window is unmapped (for the window - or its children). */ - window = __glutGetWindow(event.xunmap.window); - if (window) { - if (window->win != event.xconfigure.window) { - /* Ignore UnmapNotify sent to the overlay planes. - GLUT could get here because overlays select for - StructureNotify events to receive DestroyNotify. - */ - break; - } - markWindowHidden(window); - } - break; - case VisibilityNotify: - window = __glutGetWindow(event.xvisibility.window); - if (window) { - /* VisibilityUnobscured+1 = GLUT_FULLY_RETAINED, - VisibilityPartiallyObscured+1 = - GLUT_PARTIALLY_RETAINED, VisibilityFullyObscured+1 - = GLUT_FULLY_COVERED. */ - int visState = event.xvisibility.state + 1; - - if (visState != window->visState) { - if (window->windowStatus) { - window->visState = visState; - __glutSetWindow(window); - window->windowStatus(visState); - } - } - } - break; - case ClientMessage: - if (event.xclient.data.l[0] == __glutWMDeleteWindow) - exit(0); - break; - case DestroyNotify: - purgeStaleWindow(event.xdestroywindow.window); - break; - case CirculateNotify: - case CreateNotify: - case GravityNotify: - case ReparentNotify: - /* Uninteresting to GLUT (but possible for GLUT to - receive). */ - break; - default: - /* Pass events not directly handled by the GLUT main - event loop to any event parsers that have been - registered. In this way, X Input extension events - are passed to the correct handler without forcing - all GLUT programs to support X Input event handling. - */ - parser = eventParserList; - while (parser) { - if (parser->func(&event)) - break; - parser = parser->next; - } - break; - } - } -#endif /* _WIN32 */ - if (__glutTimerList) { - handleTimeouts(); - } - } - while (XPending(__glutDisplay)); -} - -static void -waitForSomething(void) -{ -#if defined(__vms) && ( __VMS_VER < 70000000 ) - static struct timeval6 zerotime = - {0}; - unsigned int timer_efn; -#define timer_id 'glut' /* random :-) number */ - unsigned int wait_mask; -#else - static struct timeval zerotime = - {0, 0}; -#if defined(__OS2__) - -#elif !defined(_WIN32) - fd_set fds; -#endif -#endif -#ifdef OLD_VMS - struct timeval6 now, timeout, waittime; -#else - struct timeval now, timeout, waittime; -#endif -#if !defined(_WIN32) - int rc; -#endif - - /* Flush X protocol since XPending does not do this - implicitly. */ - XFlush(__glutDisplay); - if (XPending(__glutDisplay)) { - /* It is possible (but quite rare) that XFlush may have - needed to wait for a writable X connection file - descriptor, and in the process, may have had to read off - X protocol from the file descriptor. If XPending is true, - this case occured and we should avoid waiting in select - since X protocol buffered within Xlib is due to be - processed and potentially no more X protocol is on the - file descriptor, so we would risk waiting improperly in - select. */ - goto immediatelyHandleXinput; - } -#if defined(__vms) && ( __VMS_VER < 70000000 ) - timeout = __glutTimerList->timeout; - GETTIMEOFDAY(&now); - wait_mask = 1 << (__glutConnectionFD & 31); - if (IS_AFTER(now, timeout)) { - /* We need an event flag for the timer. */ - /* XXX The `right' way to do this is to use LIB$GET_EF, but - since it needs to be in the same cluster as the EFN for - the display, we will have hack it. */ - timer_efn = __glutConnectionFD - 1; - if ((timer_efn / 32) != (__glutConnectionFD / 32)) { - timer_efn = __glutConnectionFD + 1; - } - rc = SYS$CLREF(timer_efn); - rc = SYS$SETIMR(timer_efn, &timeout, NULL, timer_id, 0); - wait_mask |= 1 << (timer_efn & 31); - } else { - timer_efn = 0; - } - rc = SYS$WFLOR(__glutConnectionFD, wait_mask); - if (timer_efn != 0 && SYS$CLREF(timer_efn) == SS$_WASCLR) { - rc = SYS$CANTIM(timer_id, PSL$C_USER); - } - /* XXX There does not seem to be checking of "rc" in the code - above. Can any of the SYS$ routines above fail? */ -#else /* not vms6.2 or lower */ -#if defined(__OS2__) - -#elif !defined(_WIN32) - FD_ZERO(&fds); - FD_SET(__glutConnectionFD, &fds); -#endif - timeout = __glutTimerList->timeout; - GETTIMEOFDAY(&now); - if (IS_AFTER(now, timeout)) { - TIMEDELTA(waittime, timeout, now); - } else { - waittime = zerotime; - } - -#if defined(__OS2__) - DosSleep(0); -#elif !defined(_WIN32) - rc = select(__glutConnectionFD + 1, &fds, - NULL, NULL, &waittime); - if (rc < 0 && errno != EINTR) - __glutFatalError("select error."); -#else - - MsgWaitForMultipleObjects(0, NULL, FALSE, - waittime.tv_sec*1000 + waittime.tv_usec/1000, QS_ALLINPUT); - -#endif -#endif /* not vms6.2 or lower */ - /* Without considering the cause of select unblocking, check - for pending X events and handle any timeouts (by calling - processEventsAndTimeouts). We always look for X events - even if select returned with 0 (indicating a timeout); - otherwise we risk starving X event processing by continous - timeouts. */ - if (XPending(__glutDisplay)) { - immediatelyHandleXinput: - processEventsAndTimeouts(); - } else { - if (__glutTimerList) - handleTimeouts(); - } -} - -static void -idleWait(void) -{ - if (XPending(__glutDisplay)) { - processEventsAndTimeouts(); - } else { - if (__glutTimerList) { - handleTimeouts(); - } - } - /* Make sure idle func still exists! */ - if (__glutIdleFunc) { - __glutIdleFunc(); - } -} - -static GLUTwindow **beforeEnd; - -static GLUTwindow * -processWindowWorkList(GLUTwindow * window) -{ - int workMask; - - if (window->prevWorkWin) { - window->prevWorkWin = processWindowWorkList(window->prevWorkWin); - } else { - beforeEnd = &window->prevWorkWin; - } - - /* Capture work mask for work that needs to be done to this - window, then clear the window's work mask (excepting the - dummy work bit, see below). Then, process the captured - work mask. This allows callbacks in the processing the - captured work mask to set the window's work mask for - subsequent processing. */ - - workMask = window->workMask; - assert((workMask & GLUT_DUMMY_WORK) == 0); - - /* Set the dummy work bit, clearing all other bits, to - indicate that the window is currently on the window work - list _and_ that the window's work mask is currently being - processed. This convinces __glutPutOnWorkList that this - window is on the work list still. */ - window->workMask = GLUT_DUMMY_WORK; - - /* Optimization: most of the time, the work to do is a - redisplay and not these other types of work. Check for - the following cases as a group to before checking each one - individually one by one. This saves about 25 MIPS - instructions in the common redisplay only case. */ - if (workMask & (GLUT_EVENT_MASK_WORK | GLUT_DEVICE_MASK_WORK | - GLUT_CONFIGURE_WORK | GLUT_COLORMAP_WORK | GLUT_MAP_WORK)) { - -#if !defined(_WIN32) && !defined(__OS2__) - /* Be sure to set event mask BEFORE map window is done. */ - if (workMask & GLUT_EVENT_MASK_WORK) { - long eventMask; - - /* Make sure children are not propogating events this - window is selecting for. Be sure to do this before - enabling events on the children's parent. */ - if (window->children) { - GLUTwindow *child = window->children; - unsigned long attribMask = CWDontPropagate; - XSetWindowAttributes wa; - - wa.do_not_propagate_mask = window->eventMask & GLUT_DONT_PROPAGATE_FILTER_MASK; - if (window->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK) { - wa.event_mask = child->eventMask | (window->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK); - attribMask |= CWEventMask; - } - do { - XChangeWindowAttributes(__glutDisplay, child->win, - attribMask, &wa); - child = child->siblings; - } while (child); - } - eventMask = window->eventMask; - if (window->parent && window->parent->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK) - eventMask |= (window->parent->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK); - XSelectInput(__glutDisplay, window->win, eventMask); - if (window->overlay) - XSelectInput(__glutDisplay, window->overlay->win, - window->eventMask & GLUT_OVERLAY_EVENT_FILTER_MASK); - } -#endif /* !_WIN32 */ - /* Be sure to set device mask BEFORE map window is done. */ - if (workMask & GLUT_DEVICE_MASK_WORK) { - __glutUpdateInputDeviceMaskFunc(window); - } - /* Be sure to configure window BEFORE map window is done. */ - if (workMask & GLUT_CONFIGURE_WORK) { -#if defined(__OS2__) - RECTL changes; - -#elif defined(_WIN32) - RECT changes; - POINT point; - UINT flags = SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER - | SWP_NOSENDCHANGING | SWP_NOSIZE | SWP_NOZORDER; - - GetClientRect(window->win, &changes); - - /* If this window is a toplevel window, translate the 0,0 client - coordinate into a screen coordinate for proper placement. */ - if (!window->parent) { - point.x = 0; - point.y = 0; - ClientToScreen(window->win, &point); - changes.left = point.x; - changes.top = point.y; - } - if (window->desiredConfMask & (CWX | CWY)) { - changes.left = window->desiredX; - changes.top = window->desiredY; - flags &= ~SWP_NOMOVE; - } - if (window->desiredConfMask & (CWWidth | CWHeight)) { - changes.right = changes.left + window->desiredWidth; - changes.bottom = changes.top + window->desiredHeight; - flags &= ~SWP_NOSIZE; - /* XXX If overlay exists, resize the overlay here, ie. - if (window->overlay) ... */ - } - if (window->desiredConfMask & CWStackMode) { - flags &= ~SWP_NOZORDER; - /* XXX Overlay support might require something special here. */ - } - - /* Adjust the window rectangle because Win32 thinks that the x, y, - width & height are the WHOLE window (including decorations), - whereas GLUT treats the x, y, width & height as only the CLIENT - area of the window. Only do this to top level windows - that are not in game mode (since game mode windows do - not have any decorations). */ - if (!window->parent && window != __glutGameModeWindow) { - AdjustWindowRect(&changes, - WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, - FALSE); - } - - /* Do the repositioning, moving, and push/pop. */ - SetWindowPos(window->win, - window->desiredStack == Above ? HWND_TOP : HWND_NOTOPMOST, - changes.left, changes.top, - changes.right - changes.left, changes.bottom - changes.top, - flags); - - /* Zero out the mask. */ - window->desiredConfMask = 0; - - /* This hack causes the window to go back to the right position - when it is taken out of fullscreen mode. */ - if (workMask & GLUT_FULL_SCREEN_WORK) { - window->desiredConfMask |= CWX | CWY; - window->desiredX = point.x; - window->desiredY = point.y; - } -#else /* !_WIN32 */ - XWindowChanges changes; - - changes.x = window->desiredX; - changes.y = window->desiredY; - if (window->desiredConfMask & (CWWidth | CWHeight)) { - changes.width = window->desiredWidth; - changes.height = window->desiredHeight; - if (window->overlay) - XResizeWindow(__glutDisplay, window->overlay->win, - window->desiredWidth, window->desiredHeight); - if (__glutMotifHints != None) { - if (workMask & GLUT_FULL_SCREEN_WORK) { - MotifWmHints hints; - - hints.flags = MWM_HINTS_DECORATIONS; - hints.decorations = 0; /* Absolutely no - decorations. */ - XChangeProperty(__glutDisplay, window->win, - __glutMotifHints, __glutMotifHints, 32, - PropModeReplace, (unsigned char *) &hints, 4); - if (workMask & GLUT_MAP_WORK) { - /* Handle case where glutFullScreen is called - before the first time that the window is - mapped. Some window managers will randomly or - interactively position the window the first - time it is mapped if the window's - WM_NORMAL_HINTS property does not request an - explicit position. We don't want any such - window manager interaction when going - fullscreen. Overwrite the WM_NORMAL_HINTS - property installed by glutCreateWindow's - XSetWMProperties property with one explicitly - requesting a fullscreen window. */ - XSizeHints hints; - - hints.flags = USPosition | USSize; - hints.x = 0; - hints.y = 0; - hints.width = window->desiredWidth; - hints.height = window->desiredHeight; - XSetWMNormalHints(__glutDisplay, window->win, &hints); - } - } else { - XDeleteProperty(__glutDisplay, window->win, __glutMotifHints); - } - } - } - if (window->desiredConfMask & CWStackMode) { - changes.stack_mode = window->desiredStack; - /* Do not let glutPushWindow push window beneath the - underlay. */ - if (window->parent && window->parent->overlay - && window->desiredStack == Below) { - changes.stack_mode = Above; - changes.sibling = window->parent->overlay->win; - window->desiredConfMask |= CWSibling; - } - } - XConfigureWindow(__glutDisplay, window->win, - window->desiredConfMask, &changes); - window->desiredConfMask = 0; -#endif - } -#if !defined(_WIN32) && !defined(__OS2__) - /* Be sure to establish the colormaps BEFORE map window is - done. */ - if (workMask & GLUT_COLORMAP_WORK) { - __glutEstablishColormapsProperty(window); - } -#endif - if (workMask & GLUT_MAP_WORK) { - switch (window->desiredMapState) { - case WithdrawnState: - if (window->parent) { - XUnmapWindow(__glutDisplay, window->win); - } else { - XWithdrawWindow(__glutDisplay, window->win, - __glutScreen); - } - window->shownState = 0; - break; - case NormalState: - XMapWindow(__glutDisplay, window->win); - window->shownState = 1; - break; -#ifdef _WIN32 - case GameModeState: /* Not an Xlib value. */ - ShowWindow(window->win, SW_SHOW); - window->shownState = 1; - break; -#endif - case IconicState: - XIconifyWindow(__glutDisplay, window->win, __glutScreen); - window->shownState = 0; - break; - } - } - } - if (workMask & (GLUT_REDISPLAY_WORK | GLUT_OVERLAY_REDISPLAY_WORK | GLUT_REPAIR_WORK | GLUT_OVERLAY_REPAIR_WORK)) { - if (window->forceReshape) { - /* Guarantee that before a display callback is generated - for a window, a reshape callback must be generated. */ - __glutSetWindow(window); - window->reshape(window->width, window->height); - window->forceReshape = False; - - /* Setting the redisplay bit on the first reshape is - necessary to make the "Mesa glXSwapBuffers to repair - damage" hack operate correctly. Without indicating a - redisplay is necessary, there's not an initial back - buffer render from which to blit from when damage - happens to the window. */ - workMask |= GLUT_REDISPLAY_WORK; - } - /* The code below is more involved than otherwise necessary - because it is paranoid about the overlay or entire window - being removed or destroyed in the course of the callbacks. - Notice how the global __glutWindowDamaged is used to record - the layers' damage status. See the code in glutLayerGet for - how __glutWindowDamaged is used. The point is to not have to - update the "damaged" field after the callback since the - window (or overlay) may be destroyed (or removed) when the - callback returns. */ - - if (window->overlay && window->overlay->display) { - int num = window->num; - Window xid = window->overlay ? window->overlay->win : None; - - /* If an overlay display callback is registered, we - differentiate between a redisplay needed for the - overlay and/or normal plane. If there is no overlay - display callback registered, we simply use the - standard display callback. */ - - if (workMask & (GLUT_REDISPLAY_WORK | GLUT_REPAIR_WORK)) { - if (__glutMesaSwapHackSupport) { - if (window->usedSwapBuffers) { - if ((workMask & (GLUT_REPAIR_WORK | GLUT_REDISPLAY_WORK)) == GLUT_REPAIR_WORK) { - SWAP_BUFFERS_WINDOW(window); - goto skippedDisplayCallback1; - } - } - } - /* Render to normal plane. */ -#ifdef _WIN32 - window->renderDc = window->hdc; -#endif - window->renderWin = window->win; - window->renderCtx = window->ctx; - __glutWindowDamaged = (workMask & GLUT_REPAIR_WORK); - __glutSetWindow(window); - window->usedSwapBuffers = 0; - window->display(); - __glutWindowDamaged = 0; - - skippedDisplayCallback1:; - } - if (workMask & (GLUT_OVERLAY_REDISPLAY_WORK | GLUT_OVERLAY_REPAIR_WORK)) { - window = __glutWindowList[num]; - if (window && window->overlay && - window->overlay->win == xid && window->overlay->display) { - - /* Render to overlay. */ -#ifdef _WIN32 - window->renderDc = window->overlay->hdc; -#endif - window->renderWin = window->overlay->win; - window->renderCtx = window->overlay->ctx; - __glutWindowDamaged = (workMask & GLUT_OVERLAY_REPAIR_WORK); - __glutSetWindow(window); - window->overlay->display(); - __glutWindowDamaged = 0; - } else { - /* Overlay may have since been destroyed or the - overlay callback may have been disabled during - normal display callback. */ - } - } - } else { - if (__glutMesaSwapHackSupport) { - if (!window->overlay && window->usedSwapBuffers) { - if ((workMask & (GLUT_REPAIR_WORK | GLUT_REDISPLAY_WORK)) == GLUT_REPAIR_WORK) { - SWAP_BUFFERS_WINDOW(window); - goto skippedDisplayCallback2; - } - } - } - /* Render to normal plane (and possibly overlay). */ - __glutWindowDamaged = (workMask & (GLUT_OVERLAY_REPAIR_WORK | GLUT_REPAIR_WORK)); - __glutSetWindow(window); - window->usedSwapBuffers = 0; - window->display(); - __glutWindowDamaged = 0; - - skippedDisplayCallback2:; - } - } - /* Combine workMask with window->workMask to determine what - finish and debug work there is. */ - workMask |= window->workMask; - - if (workMask & GLUT_FINISH_WORK) { - /* Finish work makes sure a glFinish gets done to indirect - rendering contexts. Indirect contexts tend to have much - longer latency because lots of OpenGL extension requests - can queue up in the X protocol stream. __glutSetWindow - is where the finish works gets queued for indirect - contexts. */ - __glutSetWindow(window); - glFinish(); - } - if (workMask & GLUT_DEBUG_WORK) { - __glutSetWindow(window); - glutReportErrors(); - } - /* Strip out dummy, finish, and debug work bits. */ - window->workMask &= ~(GLUT_DUMMY_WORK | GLUT_FINISH_WORK | GLUT_DEBUG_WORK); - if (window->workMask) { - /* Leave on work list. */ - return window; - } else { - /* Remove current window from work list. */ - return window->prevWorkWin; - } -} - -#ifndef _WIN32 -static /* X11 implementations do not need this global. */ -#endif -void -__glutProcessWindowWorkLists(void) -{ - if (__glutWindowWorkList) { - GLUTwindow *remainder, *work; - - work = __glutWindowWorkList; - __glutWindowWorkList = NULL; - if (work) { - remainder = processWindowWorkList(work); - if (remainder) { - *beforeEnd = __glutWindowWorkList; - __glutWindowWorkList = remainder; - } - } - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutMainLoop(void) -{ -#if !defined(_WIN32) - if (!__glutDisplay) - __glutFatalUsage("main loop entered with out proper initialization."); -#endif - if (!__glutWindowListSize) - __glutFatalUsage( - "main loop entered with no windows created."); - for (;;) { - __glutProcessWindowWorkLists(); - if (__glutIdleFunc || __glutWindowWorkList) { - idleWait(); - } else { - if (__glutTimerList) { - waitForSomething(); - } else { - processEventsAndTimeouts(); - } - } - } -} -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_ext.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_ext.cpp deleted file mode 100644 index feb6fbfa20..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_ext.cpp +++ /dev/null @@ -1,204 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include - -#include "glutint.h" - -/* CENTRY */ -int GLUTAPIENTRY -glutExtensionSupported(const char *extension) -{ - static const GLubyte *extensions = NULL; - const GLubyte *start; - GLubyte *where, *terminator; - - /* Extension names should not have spaces. */ - where = (GLubyte *) strchr(extension, ' '); - if (where || *extension == '\0') - return 0; - - if (!extensions) { - extensions = glGetString(GL_EXTENSIONS); - } - /* It takes a bit of care to be fool-proof about parsing the - OpenGL extensions string. Don't be fooled by sub-strings, - etc. */ - start = extensions; - for (;;) { - /* If your application crashes in the strstr routine below, - you are probably calling glutExtensionSupported without - having a current window. Calling glGetString without - a current OpenGL context has unpredictable results. - Please fix your program. */ - where = (GLubyte *) strstr((const char *) start, extension); - if (!where) - break; - terminator = where + strlen(extension); - if (where == start || *(where - 1) == ' ') { - if (*terminator == ' ' || *terminator == '\0') { - return 1; - } - } - start = terminator; - } - return 0; -} - - -struct name_address_pair { - const char *name; - const void *address; -}; - -static struct name_address_pair glut_functions[] = { - { "glutInit", (const void *) glutInit }, - { "glutInitDisplayMode", (const void *) glutInitDisplayMode }, - { "glutInitDisplayString", (const void *) glutInitDisplayString }, - { "glutInitWindowPosition", (const void *) glutInitWindowPosition }, - { "glutInitWindowSize", (const void *) glutInitWindowSize }, - { "glutMainLoop", (const void *) glutMainLoop }, - { "glutCreateWindow", (const void *) glutCreateWindow }, - { "glutCreateSubWindow", (const void *) glutCreateSubWindow }, - { "glutDestroyWindow", (const void *) glutDestroyWindow }, - { "glutPostRedisplay", (const void *) glutPostRedisplay }, - { "glutPostWindowRedisplay", (const void *) glutPostWindowRedisplay }, - { "glutSwapBuffers", (const void *) glutSwapBuffers }, - { "glutGetWindow", (const void *) glutGetWindow }, - { "glutSetWindow", (const void *) glutSetWindow }, - { "glutSetWindowTitle", (const void *) glutSetWindowTitle }, - { "glutSetIconTitle", (const void *) glutSetIconTitle }, - { "glutPositionWindow", (const void *) glutPositionWindow }, - { "glutReshapeWindow", (const void *) glutReshapeWindow }, - { "glutPopWindow", (const void *) glutPopWindow }, - { "glutPushWindow", (const void *) glutPushWindow }, - { "glutIconifyWindow", (const void *) glutIconifyWindow }, - { "glutShowWindow", (const void *) glutShowWindow }, - { "glutHideWindow", (const void *) glutHideWindow }, - { "glutFullScreen", (const void *) glutFullScreen }, - { "glutSetCursor", (const void *) glutSetCursor }, - { "glutWarpPointer", (const void *) glutWarpPointer }, - { "glutEstablishOverlay", (const void *) glutEstablishOverlay }, - { "glutRemoveOverlay", (const void *) glutRemoveOverlay }, - { "glutUseLayer", (const void *) glutUseLayer }, - { "glutPostOverlayRedisplay", (const void *) glutPostOverlayRedisplay }, - { "glutPostWindowOverlayRedisplay", (const void *) glutPostWindowOverlayRedisplay }, - { "glutShowOverlay", (const void *) glutShowOverlay }, - { "glutHideOverlay", (const void *) glutHideOverlay }, - { "glutCreateMenu", (const void *) glutCreateMenu }, - { "glutDestroyMenu", (const void *) glutDestroyMenu }, - { "glutGetMenu", (const void *) glutGetMenu }, - { "glutSetMenu", (const void *) glutSetMenu }, - { "glutAddMenuEntry", (const void *) glutAddMenuEntry }, - { "glutAddSubMenu", (const void *) glutAddSubMenu }, - { "glutChangeToMenuEntry", (const void *) glutChangeToMenuEntry }, - { "glutChangeToSubMenu", (const void *) glutChangeToSubMenu }, - { "glutRemoveMenuItem", (const void *) glutRemoveMenuItem }, - { "glutAttachMenu", (const void *) glutAttachMenu }, - { "glutDetachMenu", (const void *) glutDetachMenu }, - { "glutDisplayFunc", (const void *) glutDisplayFunc }, - { "glutReshapeFunc", (const void *) glutReshapeFunc }, - { "glutKeyboardFunc", (const void *) glutKeyboardFunc }, - { "glutMouseFunc", (const void *) glutMouseFunc }, - { "glutMotionFunc", (const void *) glutMotionFunc }, - { "glutPassiveMotionFunc", (const void *) glutPassiveMotionFunc }, - { "glutEntryFunc", (const void *) glutEntryFunc }, - { "glutVisibilityFunc", (const void *) glutVisibilityFunc }, - { "glutIdleFunc", (const void *) glutIdleFunc }, - { "glutTimerFunc", (const void *) glutTimerFunc }, - { "glutMenuStateFunc", (const void *) glutMenuStateFunc }, - { "glutSpecialFunc", (const void *) glutSpecialFunc }, - { "glutSpaceballMotionFunc", (const void *) glutSpaceballMotionFunc }, - { "glutSpaceballRotateFunc", (const void *) glutSpaceballRotateFunc }, - { "glutSpaceballButtonFunc", (const void *) glutSpaceballButtonFunc }, - { "glutButtonBoxFunc", (const void *) glutButtonBoxFunc }, - { "glutDialsFunc", (const void *) glutDialsFunc }, - { "glutTabletMotionFunc", (const void *) glutTabletMotionFunc }, - { "glutTabletButtonFunc", (const void *) glutTabletButtonFunc }, - { "glutMenuStatusFunc", (const void *) glutMenuStatusFunc }, - { "glutOverlayDisplayFunc", (const void *) glutOverlayDisplayFunc }, - { "glutWindowStatusFunc", (const void *) glutWindowStatusFunc }, - { "glutKeyboardUpFunc", (const void *) glutKeyboardUpFunc }, - { "glutSpecialUpFunc", (const void *) glutSpecialUpFunc }, - { "glutJoystickFunc", (const void *) glutJoystickFunc }, - { "glutSetColor", (const void *) glutSetColor }, - { "glutGetColor", (const void *) glutGetColor }, - { "glutCopyColormap", (const void *) glutCopyColormap }, - { "glutGet", (const void *) glutGet }, - { "glutDeviceGet", (const void *) glutDeviceGet }, - { "glutExtensionSupported", (const void *) glutExtensionSupported }, - { "glutGetModifiers", (const void *) glutGetModifiers }, - { "glutLayerGet", (const void *) glutLayerGet }, - { "glutGetProcAddress", (const void *) glutGetProcAddress }, - { "glutBitmapCharacter", (const void *) glutBitmapCharacter }, - { "glutBitmapWidth", (const void *) glutBitmapWidth }, - { "glutStrokeCharacter", (const void *) glutStrokeCharacter }, - { "glutStrokeWidth", (const void *) glutStrokeWidth }, - { "glutBitmapLength", (const void *) glutBitmapLength }, - { "glutStrokeLength", (const void *) glutStrokeLength }, - { "glutWireSphere", (const void *) glutWireSphere }, - { "glutSolidSphere", (const void *) glutSolidSphere }, - { "glutWireCone", (const void *) glutWireCone }, - { "glutSolidCone", (const void *) glutSolidCone }, - { "glutWireCube", (const void *) glutWireCube }, - { "glutSolidCube", (const void *) glutSolidCube }, - { "glutWireTorus", (const void *) glutWireTorus }, - { "glutSolidTorus", (const void *) glutSolidTorus }, - { "glutWireDodecahedron", (const void *) glutWireDodecahedron }, - { "glutSolidDodecahedron", (const void *) glutSolidDodecahedron }, - { "glutWireTeapot", (const void *) glutWireTeapot }, - { "glutSolidTeapot", (const void *) glutSolidTeapot }, - { "glutWireOctahedron", (const void *) glutWireOctahedron }, - { "glutSolidOctahedron", (const void *) glutSolidOctahedron }, - { "glutWireTetrahedron", (const void *) glutWireTetrahedron }, - { "glutSolidTetrahedron", (const void *) glutSolidTetrahedron }, - { "glutWireIcosahedron", (const void *) glutWireIcosahedron }, - { "glutSolidIcosahedron", (const void *) glutSolidIcosahedron }, - { "glutVideoResizeGet", (const void *) glutVideoResizeGet }, - { "glutSetupVideoResizing", (const void *) glutSetupVideoResizing }, - { "glutStopVideoResizing", (const void *) glutStopVideoResizing }, - { "glutVideoResize", (const void *) glutVideoResize }, - { "glutVideoPan", (const void *) glutVideoPan }, - { "glutReportErrors", (const void *) glutReportErrors }, - { "glutIgnoreKeyRepeat", (const void *) glutIgnoreKeyRepeat }, - { "glutSetKeyRepeat", (const void *) glutSetKeyRepeat }, - { "glutForceJoystickFunc", (const void *) glutForceJoystickFunc }, - { "glutGameModeString", (const void *) glutGameModeString }, - { "glutEnterGameMode", (const void *) glutEnterGameMode }, - { "glutLeaveGameMode", (const void *) glutLeaveGameMode }, - { "glutGameModeGet", (const void *) glutGameModeGet }, - { NULL, NULL } -}; - - -/* XXX This isn't an official GLUT function, yet */ -void * GLUTAPIENTRY -glutGetProcAddress(const char *procName) -{ - /* Try GLUT functions first */ - int i; - for (i = 0; glut_functions[i].name; i++) { - if (strcmp(glut_functions[i].name, procName) == 0) - return (void *) glut_functions[i].address; - } - - /* Try core GL functions */ -#if defined(_WIN32) - return (void *) wglGetProcAddress((LPCSTR) procName); - -#elif defined(__OS2PM__) - return (void *) wglGetProcAddress((char *) procName); -#elif defined(GLX_ARB_get_proc_address) - return (void *) glXGetProcAddressARB((const GLubyte *) procName); -#else - return NULL; -#endif -} - - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_fullscrn.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_fullscrn.cpp deleted file mode 100644 index d6efb68b3a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_fullscrn.cpp +++ /dev/null @@ -1,38 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1995, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include - -#include "glutint.h" - -/* CENTRY */ -void GLUTAPIENTRY -glutFullScreen(void) -{ - assert(!__glutCurrentWindow->parent); - IGNORE_IN_GAME_MODE(); -#if !defined(_WIN32) && !defined(__OS2PM__) - if (__glutMotifHints == None) { - __glutMotifHints = XSGIFastInternAtom(__glutDisplay, "_MOTIF_WM_HINTS", - SGI_XA__MOTIF_WM_HINTS, 0); - if (__glutMotifHints == None) { - __glutWarning("Could not intern X atom for _MOTIF_WM_HINTS."); - } - } -#endif - - __glutCurrentWindow->desiredX = 0; - __glutCurrentWindow->desiredY = 0; - __glutCurrentWindow->desiredWidth = __glutScreenWidth; - __glutCurrentWindow->desiredHeight = __glutScreenHeight; - __glutCurrentWindow->desiredConfMask |= CWX | CWY | CWWidth | CWHeight; - - __glutPutOnWorkList(__glutCurrentWindow, - GLUT_CONFIGURE_WORK | GLUT_FULL_SCREEN_WORK); -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_gamemode.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_gamemode.cpp deleted file mode 100644 index 50185d7b9d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_gamemode.cpp +++ /dev/null @@ -1,680 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - - -#include -#include -#include -#include - -#include "glutint.h" - -#if !defined(_WIN32) && !defined(__OS2__) -#include -#include - -/* SGI optimization introduced in IRIX 6.3 to avoid X server - round trips for interning common X atoms. */ -#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS) -#include -#else -#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how) -#endif -#endif /* not _WIN32 */ - -int __glutDisplaySettingsChanged = 0; -static DisplayMode *dmodes, *currentDm = NULL; -static int ndmodes = -1; -GLUTwindow *__glutGameModeWindow = NULL; - -#ifdef TEST -static char *compstr[] = -{ - "none", "=", "!=", "<=", ">=", ">", "<", "~" -}; -static char *capstr[] = -{ - "width", "height", "bpp", "hertz", "num" -}; -#endif - -#if defined(__OS2__) -void -#else -void __cdecl -#endif -__glutCloseDownGameMode(void) -{ - if (__glutDisplaySettingsChanged) { -#ifdef _WIN32 - /* Assumes that display settings have been changed, that - is __glutDisplaySettingsChanged is true. */ - ChangeDisplaySettings(NULL, 0); -#endif - __glutDisplaySettingsChanged = 0; - } - __glutGameModeWindow = NULL; -} - -void GLUTAPIENTRY -glutLeaveGameMode(void) -{ - if (__glutGameModeWindow == NULL) { - __glutWarning("not in game mode so cannot leave game mode"); - return; - } - __glutDestroyWindow(__glutGameModeWindow, - __glutGameModeWindow); - XFlush(__glutDisplay); - __glutGameModeWindow = NULL; -} - -#ifdef _WIN32 - -/* Same values as from MSDN's SetDisp.c example. */ -#define MIN_WIDTH 400 -#define MIN_FREQUENCY 60 - -static void -initGameModeSupport(void) -{ - DEVMODE dm; - DWORD mode; - int i; - - if (ndmodes >= 0) { - /* ndmodes is initially -1 to indicate no - dmodes allocated yet. */ - return; - } - - /* Determine how many display modes there are. */ - ndmodes = 0; - mode = 0; - while (EnumDisplaySettings(NULL, mode, &dm)) { - if (dm.dmPelsWidth >= MIN_WIDTH && - (dm.dmDisplayFrequency == 0 || - dm.dmDisplayFrequency >= MIN_FREQUENCY)) { - ndmodes++; - } - mode++; - } - - /* Allocate memory for a list of all the display modes. */ - dmodes = (DisplayMode*) - malloc(ndmodes * sizeof(DisplayMode)); - - /* Now that we know how many display modes to expect, - enumerate them again and save the information in - the list we allocated above. */ - i = 0; - mode = 0; - while (EnumDisplaySettings(NULL, mode, &dm)) { - /* Try to reject any display settings that seem unplausible. */ - if (dm.dmPelsWidth >= MIN_WIDTH && - (dm.dmDisplayFrequency == 0 || - dm.dmDisplayFrequency >= MIN_FREQUENCY)) { - dmodes[i].devmode = dm; - dmodes[i].valid = 1; /* XXX Not used for now. */ - dmodes[i].cap[DM_WIDTH] = dm.dmPelsWidth; - dmodes[i].cap[DM_HEIGHT] = dm.dmPelsHeight; - dmodes[i].cap[DM_PIXEL_DEPTH] = dm.dmBitsPerPel; - if (dm.dmDisplayFrequency == 0) { - /* Guess a reasonable guess. */ - /* Lame Windows 95 version of EnumDisplaySettings. */ - dmodes[i].cap[DM_HERTZ] = 60; - } else { - dmodes[i].cap[DM_HERTZ] = dm.dmDisplayFrequency; - } - i++; - } - mode++; - } - - assert(i == ndmodes); -} - -#else - -/* X Windows version of initGameModeSupport. */ -static void -initGameModeSupport(void) -{ - if (ndmodes >= 0) { - /* ndmodes is initially -1 to indicate no - dmodes allocated yet. */ - return; - } - - /* Determine how many display modes there are. */ - ndmodes = 0; -} - -#endif - -/* This routine is based on similiar code in glut_dstr.c */ -static DisplayMode * -findMatch(DisplayMode * dmodes, int ndmodes, - Criterion * criteria, int ncriteria) -{ - DisplayMode *found; - int *bestScore, *thisScore; - int i, j, numok, result = 0, worse, better; - - found = NULL; - numok = 1; /* "num" capability is indexed from 1, - not 0. */ - - /* XXX alloca canidate. */ - bestScore = (int *) malloc(ncriteria * sizeof(int)); - if (!bestScore) { - __glutFatalError("out of memory."); - } - for (j = 0; j < ncriteria; j++) { - /* Very negative number. */ - bestScore[j] = -32768; - } - - /* XXX alloca canidate. */ - thisScore = (int *) malloc(ncriteria * sizeof(int)); - if (!thisScore) { - __glutFatalError("out of memory."); - } - - for (i = 0; i < ndmodes; i++) { - if (dmodes[i].valid) { - worse = 0; - better = 0; - - for (j = 0; j < ncriteria; j++) { - int cap, cvalue, dvalue; - - cap = criteria[j].capability; - cvalue = criteria[j].value; - if (cap == NUM) { - dvalue = numok; - } else { - dvalue = dmodes[i].cap[cap]; - } -#ifdef TEST - if (verbose) - printf(" %s %s %d to %d\n", - capstr[cap], compstr[criteria[j].comparison], cvalue, dvalue); -#endif - switch (criteria[j].comparison) { - case EQ: - result = cvalue == dvalue; - thisScore[j] = 1; - break; - case NEQ: - result = cvalue != dvalue; - thisScore[j] = 1; - break; - case LT: - result = dvalue < cvalue; - thisScore[j] = dvalue - cvalue; - break; - case GT: - result = dvalue > cvalue; - thisScore[j] = dvalue - cvalue; - break; - case LTE: - result = dvalue <= cvalue; - thisScore[j] = dvalue - cvalue; - break; - case GTE: - result = (dvalue >= cvalue); - thisScore[j] = dvalue - cvalue; - break; - case MIN: - result = dvalue >= cvalue; - thisScore[j] = cvalue - dvalue; - break; - } - -#ifdef TEST - if (verbose) - printf(" result=%d score=%d bestScore=%d\n", result, thisScore[j], bestScore[j]); -#endif - - if (result) { - if (better || thisScore[j] > bestScore[j]) { - better = 1; - } else if (thisScore[j] == bestScore[j]) { - /* Keep looking. */ - } else { - goto nextDM; - } - } else { - if (cap == NUM) { - worse = 1; - } else { - goto nextDM; - } - } - - } - - if (better && !worse) { - found = &dmodes[i]; - for (j = 0; j < ncriteria; j++) { - bestScore[j] = thisScore[j]; - } - } - numok++; - - nextDM:; - - } - } - free(bestScore); - free(thisScore); - return found; -} - -/** - * Parses strings in the form of: - * 800x600 - * 800x600:16 - * 800x600@60 - * 800x600:16@60 - * @60 - * :16 - * :16@60 - * NOTE that @ before : is not parsed. - */ -static int -specialCaseParse(char *word, Criterion * criterion, int mask) -{ - char *xstr, *response; - int got; - int width, height, bpp, hertz; - - switch(word[0]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - /* The WWWxHHH case. */ - if (mask & (1 << DM_WIDTH)) { - return -1; - } - xstr = strpbrk(&word[1], "x"); - if (xstr) { - width = (int) strtol(word, &response, 0); - if (response == word || response[0] != 'x') { - /* Not a valid number OR needs to be followed by 'x'. */ - return -1; - } - height = (int) strtol(&xstr[1], &response, 0); - if (response == &xstr[1]) { - /* Not a valid number. */ - return -1; - } - criterion[0].capability = DM_WIDTH; - criterion[0].comparison = EQ; - criterion[0].value = width; - criterion[1].capability = DM_HEIGHT; - criterion[1].comparison = EQ; - criterion[1].value = height; - got = specialCaseParse(response, - &criterion[2], 1 << DM_WIDTH); - if (got >= 0) { - return got + 2; - } else { - return -1; - } - } - return -1; - case ':': - /* The :BPP case. */ - if (mask & (1 << DM_PIXEL_DEPTH)) { - return -1; - } - bpp = (int) strtol(&word[1], &response, 0); - if (response == &word[1]) { - /* Not a valid number. */ - return -1; - } - criterion[0].capability = DM_PIXEL_DEPTH; - criterion[0].comparison = EQ; - criterion[0].value = bpp; - got = specialCaseParse(response, - &criterion[1], (1 << DM_WIDTH) | (1 << DM_PIXEL_DEPTH)); - if (got >= 0) { - return got + 1; - } else { - return -1; - } - case '@': - /* The @HZ case. */ - if (mask & (1 << DM_HERTZ)) { - return -1; - } - hertz = (int) strtol(&word[1], &response, 0); - if (response == &word[1]) { - /* Not a valid number. */ - return -1; - } - criterion[0].capability = DM_HERTZ; - criterion[0].comparison = EQ; - criterion[0].value = hertz; - got = specialCaseParse(response, - &criterion[1], ~DM_HERTZ); - if (got >= 0) { - return got + 1; - } else { - return -1; - } - case '\0': - return 0; - } - return -1; -} - -/* This routine is based on similiar code in glut_dstr.c */ -static int -parseCriteria(char *word, Criterion * criterion) -{ - char *cstr, *vstr, *response; - int comparator, value = 0; - - cstr = strpbrk(word, "=>': - if (cstr[1] == '=') { - comparator = GTE; - vstr = &cstr[2]; - } else { - comparator = GT; - vstr = &cstr[1]; - } - break; - case '<': - if (cstr[1] == '=') { - comparator = LTE; - vstr = &cstr[2]; - } else { - comparator = LT; - vstr = &cstr[1]; - } - break; - case '!': - if (cstr[1] == '=') { - comparator = NEQ; - vstr = &cstr[2]; - } else { - return -1; - } - break; - default: - return -1; - } - value = (int) strtol(vstr, &response, 0); - if (response == vstr) { - /* Not a valid number. */ - return -1; - } - *cstr = '\0'; - } else { - comparator = NONE; - } - switch (word[0]) { - case 'b': - if (!strcmp(word, "bpp")) { - criterion[0].capability = DM_PIXEL_DEPTH; - if (comparator == NONE) { - return -1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - return 1; - } - } - return -1; - case 'h': - if (!strcmp(word, "height")) { - criterion[0].capability = DM_HEIGHT; - if (comparator == NONE) { - return -1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - return 1; - } - } - if (!strcmp(word, "hertz")) { - criterion[0].capability = DM_HERTZ; - if (comparator == NONE) { - return -1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - return 1; - } - } - return -1; - case 'n': - if (!strcmp(word, "num")) { - criterion[0].capability = DM_NUM; - if (comparator == NONE) { - return -1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - return 1; - } - } - return -1; - case 'w': - if (!strcmp(word, "width")) { - criterion[0].capability = DM_WIDTH; - if (comparator == NONE) { - return -1; - } else { - criterion[0].comparison = comparator; - criterion[0].value = value; - return 1; - } - } - return -1; - } - if (comparator == NONE) { - return specialCaseParse(word, criterion, 0); - } - return -1; -} - -/* This routine is based on similiar code in glut_dstr.c */ -static Criterion * -parseDisplayString(const char *display, int *ncriteria) -{ - Criterion *criteria = NULL; - int n, parsed; - char *copy, *word; - - copy = __glutStrdup(display); - /* Attempt to estimate how many criteria entries should be - needed. */ - n = 0; - word = strtok(copy, " \t"); - while (word) { - n++; - word = strtok(NULL, " \t"); - } - /* Allocate number of words of criteria. A word - could contain as many as four criteria in the - worst case. Example: 800x600:16@60 */ - criteria = (Criterion *) malloc(4 * n * sizeof(Criterion)); - if (!criteria) { - __glutFatalError("out of memory."); - } - - /* Re-copy the copy of the display string. */ - strcpy(copy, display); - - n = 0; - word = strtok(copy, " \t"); - while (word) { - parsed = parseCriteria(word, &criteria[n]); - if (parsed >= 0) { - n += parsed; - } else { - __glutWarning("Unrecognized game mode string word: %s (ignoring)\n", word); - } - word = strtok(NULL, " \t"); - } - - free(copy); - *ncriteria = n; - return criteria; -} - -void GLUTAPIENTRY -glutGameModeString(const char *string) -{ - Criterion *criteria; - int ncriteria; - - initGameModeSupport(); - criteria = parseDisplayString(string, &ncriteria); - currentDm = findMatch(dmodes, ndmodes, criteria, ncriteria); - free(criteria); -} - -int GLUTAPIENTRY -glutEnterGameMode(void) -{ - GLUTwindow *window; - int width, height; - Window win; - - if (__glutMappedMenu) { - __glutFatalUsage("entering game mode not allowed while menus in use"); - } - if (__glutGameModeWindow) { - /* Already in game mode, so blow away game mode - window so apps can change resolutions. */ - window = __glutGameModeWindow; - /* Setting the game mode window to NULL tricks - the window destroy code into not undoing the - screen display change since we plan on immediately - doing another mode change. */ - __glutGameModeWindow = NULL; - __glutDestroyWindow(window, window); - } - - /* Assume default screen size until we find out if we - can actually change the display settings. */ - width = __glutScreenWidth; - height = __glutScreenHeight; - - if (currentDm) { -#ifdef _WIN32 - LONG status; - static int registered = 0; - - status = ChangeDisplaySettings(¤tDm->devmode, - CDS_FULLSCREEN); - if (status == DISP_CHANGE_SUCCESSFUL) { - __glutDisplaySettingsChanged = 1; - width = currentDm->cap[DM_WIDTH]; - height = currentDm->cap[DM_HEIGHT]; - if (!registered) { - atexit(__glutCloseDownGameMode); - registered = 1; - } - } else { - /* Switch back to default resolution. */ - ChangeDisplaySettings(NULL, 0); - } -#endif - } - - window = __glutCreateWindow(NULL, 0, 0, - width, height, /* game mode */ 1); - win = window->win; - -#if !defined(_WIN32) && !defined(__OS2__) - if (__glutMotifHints == None) { - __glutMotifHints = XSGIFastInternAtom(__glutDisplay, "_MOTIF_WM_HINTS", - SGI_XA__MOTIF_WM_HINTS, 0); - if (__glutMotifHints == None) { - __glutWarning("Could not intern X atom for _MOTIF_WM_HINTS."); - } - } - - /* Game mode window is a toplevel window. */ - XSetWMProtocols(__glutDisplay, win, &__glutWMDeleteWindow, 1); -#endif - - /* Schedule the fullscreen property to be added and to - make sure the window is configured right. Win32 - doesn't need this. */ - window->desiredX = 0; - window->desiredY = 0; - window->desiredWidth = width; - window->desiredHeight = height; - window->desiredConfMask |= CWX | CWY | CWWidth | CWHeight; -#ifdef _WIN32 - /* Win32 does not want to use GLUT_FULL_SCREEN_WORK - for game mode because we need to be maximizing - the window in game mode, not just sizing it to - take up the full screen. The Win32-ness of game - mode happens when you pass 1 in the gameMode parameter - to __glutCreateWindow above. A gameMode of creates - a WS_POPUP window, not a standard WS_OVERLAPPEDWINDOW - window. WS_POPUP ensures the taskbar is hidden. */ - __glutPutOnWorkList(window, - GLUT_CONFIGURE_WORK); -#else - __glutPutOnWorkList(window, - GLUT_CONFIGURE_WORK | GLUT_FULL_SCREEN_WORK); -#endif - - __glutGameModeWindow = window; - return window->num + 1; -} - -int GLUTAPIENTRY -glutGameModeGet(GLenum mode) -{ - switch (mode) { - case GLUT_GAME_MODE_ACTIVE: - return __glutGameModeWindow != NULL; - case GLUT_GAME_MODE_POSSIBLE: - return currentDm != NULL; - case GLUT_GAME_MODE_WIDTH: - return currentDm ? currentDm->cap[DM_WIDTH] : -1; - case GLUT_GAME_MODE_HEIGHT: - return currentDm ? currentDm->cap[DM_HEIGHT] : -1; - case GLUT_GAME_MODE_PIXEL_DEPTH: - return currentDm ? currentDm->cap[DM_PIXEL_DEPTH] : -1; - case GLUT_GAME_MODE_REFRESH_RATE: - return currentDm ? currentDm->cap[DM_HERTZ] : -1; - case GLUT_GAME_MODE_DISPLAY_CHANGED: - return __glutDisplaySettingsChanged; - default: - return -1; - } -} - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_get.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_get.cpp deleted file mode 100644 index c846f48658..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_get.cpp +++ /dev/null @@ -1,232 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include /* SunOS 4 needs NULL defined for GETTIMEOFDAY macro. */ -#include "glutint.h" - -/* CENTRY */ -int GLUTAPIENTRY -glutGet(GLenum param) -{ - Window win, root; - int x, y, value; - unsigned int width, height, border, depth; - - switch (param) { - case GLUT_INIT_WINDOW_X: - return __glutInitX; - case GLUT_INIT_WINDOW_Y: - return __glutInitY; - case GLUT_INIT_WINDOW_WIDTH: - return __glutInitWidth; - case GLUT_INIT_WINDOW_HEIGHT: - return __glutInitHeight; - case GLUT_INIT_DISPLAY_MODE: - return __glutDisplayMode; - case GLUT_WINDOW_X: - XTranslateCoordinates(__glutDisplay, __glutCurrentWindow->win, - __glutRoot, 0, 0, &x, &y, &win); - return x; - case GLUT_WINDOW_Y: - XTranslateCoordinates(__glutDisplay, __glutCurrentWindow->win, - __glutRoot, 0, 0, &x, &y, &win); - return y; - case GLUT_WINDOW_WIDTH: - if (!__glutCurrentWindow->reshape) { - XGetGeometry(__glutDisplay, __glutCurrentWindow->win, - &root, &x, &y, - &width, &height, &border, &depth); - return width; - } - return __glutCurrentWindow->width; - case GLUT_WINDOW_HEIGHT: - if (!__glutCurrentWindow->reshape) { - XGetGeometry(__glutDisplay, __glutCurrentWindow->win, - &root, &x, &y, - &width, &height, &border, &depth); - return height; - } - return __glutCurrentWindow->height; -#ifdef __OS2__ - #define GET_CONFIG(attrib) \ - { if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) \ - glXGetConfig( __glutCurrentWindow->vis, attrib, &value); \ - else \ - glXGetConfig(__glutCurrentWindow->overlay->vis, attrib, &value); \ - } \ - -#else - -#define GET_CONFIG(attrib) { \ - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { \ - glXGetConfig(__glutDisplay, __glutCurrentWindow->vis, \ - attrib, &value); \ - } else { \ - glXGetConfig(__glutDisplay, __glutCurrentWindow->overlay->vis, \ - attrib, &value); \ - } \ -} -#endif - - case GLUT_WINDOW_BUFFER_SIZE: - GET_CONFIG(GLX_BUFFER_SIZE); - return value; - case GLUT_WINDOW_STENCIL_SIZE: - GET_CONFIG(GLX_STENCIL_SIZE); - return value; - case GLUT_WINDOW_DEPTH_SIZE: - GET_CONFIG(GLX_DEPTH_SIZE); - return value; - case GLUT_WINDOW_RED_SIZE: - GET_CONFIG(GLX_RED_SIZE); - return value; - case GLUT_WINDOW_GREEN_SIZE: - GET_CONFIG(GLX_GREEN_SIZE); - return value; - case GLUT_WINDOW_BLUE_SIZE: - GET_CONFIG(GLX_BLUE_SIZE); - return value; - case GLUT_WINDOW_ALPHA_SIZE: - GET_CONFIG(GLX_ALPHA_SIZE); - return value; - case GLUT_WINDOW_ACCUM_RED_SIZE: - GET_CONFIG(GLX_ACCUM_RED_SIZE); - return value; - case GLUT_WINDOW_ACCUM_GREEN_SIZE: - GET_CONFIG(GLX_ACCUM_GREEN_SIZE); - return value; - case GLUT_WINDOW_ACCUM_BLUE_SIZE: - GET_CONFIG(GLX_ACCUM_BLUE_SIZE); - return value; - case GLUT_WINDOW_ACCUM_ALPHA_SIZE: - GET_CONFIG(GLX_ACCUM_ALPHA_SIZE); - return value; - case GLUT_WINDOW_DOUBLEBUFFER: - GET_CONFIG(GLX_DOUBLEBUFFER); - return value; - case GLUT_WINDOW_RGBA: - GET_CONFIG(GLX_RGBA); - return value; - case GLUT_WINDOW_COLORMAP_SIZE: - GET_CONFIG(GLX_RGBA); - if (value) { - return 0; - } else { -#if defined(_WIN32) || defined(__OS2__) - /* KLUDGE: we always assume 256 colors in CI mode on - Win32 */ - return 256; -#else - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { - return __glutCurrentWindow->vis->visual->map_entries; - } else { - return __glutCurrentWindow->overlay->vis->visual->map_entries; - } -#endif /* _WIN32 */ - } - case GLUT_WINDOW_PARENT: - return __glutCurrentWindow->parent ? - __glutCurrentWindow->parent->num + 1 : 0; - case GLUT_WINDOW_NUM_CHILDREN: - { - int num = 0; - GLUTwindow *children = __glutCurrentWindow->children; - - while (children) { - num++; - children = children->siblings; - } - return num; - } - case GLUT_WINDOW_NUM_SAMPLES: -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample) - if (__glutIsSupportedByGLX("GLX_SGIS_multisample")) { - GET_CONFIG(GLX_SAMPLES_SGIS); - return value; - } else { - return 0; - } -#else - /* Independent of GLX server support, multisampling not - supported by GLX client-side. */ - return 0; -#endif - case GLUT_WINDOW_STEREO: - GET_CONFIG(GLX_STEREO); - return value; - case GLUT_WINDOW_CURSOR: - return __glutCurrentWindow->cursor; - case GLUT_SCREEN_WIDTH: - return DisplayWidth(__glutDisplay, __glutScreen); - case GLUT_SCREEN_HEIGHT: - return DisplayHeight(__glutDisplay, __glutScreen); - case GLUT_SCREEN_WIDTH_MM: - return DisplayWidthMM(__glutDisplay, __glutScreen); - case GLUT_SCREEN_HEIGHT_MM: - return DisplayHeightMM(__glutDisplay, __glutScreen); - case GLUT_MENU_NUM_ITEMS: - return __glutCurrentMenu->num; - case GLUT_DISPLAY_MODE_POSSIBLE: - { - XVisualInfo *vi; - Bool dummy, visAlloced; - void *fbc; - -#if defined(_WIN32) - /* Our fake glXChooseVisual (which is called by - __glutDetermineVisual) needs an HDC to work with, so grab one - from the "root" window. */ - XHDC = GetDC(GetDesktopWindow()); -#endif - vi = __glutDetermineWindowVisual(&dummy, &visAlloced, &fbc); -#if defined(_WIN32) - ReleaseDC(GetDesktopWindow(), XHDC); -#endif - if (vi) { - if (visAlloced) - XFree(vi); - return 1; - } - return 0; - } - case GLUT_ELAPSED_TIME: - { -#ifdef OLD_VMS - struct timeval6 elapsed, beginning, now; -#else - struct timeval elapsed, beginning, now; -#endif - - __glutInitTime(&beginning); - GETTIMEOFDAY(&now); - TIMEDELTA(elapsed, now, beginning); - /* Return elapsed milliseconds. */ -#if defined(__vms) && ( __VMS_VER < 70000000 ) - return (int) (elapsed.val / TICKS_PER_MILLISECOND); -#else - return (int) ((elapsed.tv_sec * 1000) + (elapsed.tv_usec / 1000)); -#endif - } - case GLUT_WINDOW_FORMAT_ID: -#if defined(__OS2__) - return wglGetPixelFormat(__glutCurrentWindow->hdc); -#elif defined(_WIN32) - return GetPixelFormat(__glutCurrentWindow->hdc); -#else - if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { - return (int) __glutCurrentWindow->vis->visualid; - } else { - return (int) __glutCurrentWindow->overlay->vis->visualid; - } -#endif - default: - __glutWarning("invalid glutGet parameter: %d", param); - return -1; - } -} -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_hel10.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_hel10.cpp deleted file mode 100644 index 6409f6181a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_hel10.cpp +++ /dev/null @@ -1,1781 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmapHelvetica10 XXX -#include "glutbitmap.h" -#undef glutBitmapHelvetica10 - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90,0x0,0x50, -}; - -static const BitmapCharRec ch255 = {4,10,0,2,5,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0x80,0x80,0xb0,0xc8,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch254 = {5,10,0,2,6,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch253 = {4,11,0,2,5,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x50, -}; - -static const BitmapCharRec ch252 = {4,8,0,0,5,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch251 = {4,9,0,0,5,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch250 = {4,9,0,0,5,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch249 = {4,9,0,0,5,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0x70,0x88,0xc8,0xa8,0x98,0x74, -}; - -static const BitmapCharRec ch248 = {6,6,0,0,6,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x20,0x0,0xf8,0x0,0x20, -}; - -static const BitmapCharRec ch247 = {5,5,0,-1,6,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50, -}; - -static const BitmapCharRec ch246 = {5,8,0,0,6,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch245 = {5,9,0,0,6,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch244 = {5,9,0,0,6,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch243 = {5,9,0,0,6,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch242 = {5,9,0,0,6,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0x90,0x90,0x90,0x90,0x90,0xe0,0x0,0xa0,0x50, -}; - -static const BitmapCharRec ch241 = {4,9,0,0,5,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x70,0x88,0x88,0x88,0x88,0x78,0x90,0x60,0x50, -}; - -static const BitmapCharRec ch240 = {5,9,0,0,6,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0, -}; - -static const BitmapCharRec ch239 = {3,8,0,0,2,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch238 = {3,9,1,0,2,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40, -}; - -static const BitmapCharRec ch237 = {2,9,0,0,2,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch236 = {2,9,1,0,2,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x50, -}; - -static const BitmapCharRec ch235 = {4,8,0,0,5,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch234 = {4,9,0,0,5,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x40,0x20, -}; - -static const BitmapCharRec ch233 = {4,9,0,0,5,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch232 = {4,9,0,0,5,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x60,0x20,0x60,0x90,0x80,0x80,0x90,0x60, -}; - -static const BitmapCharRec ch231 = {4,8,0,2,5,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x6c,0x92,0x90,0x7e,0x12,0xec, -}; - -static const BitmapCharRec ch230 = {7,6,0,0,8,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x20,0x50,0x20, -}; - -static const BitmapCharRec ch229 = {5,9,0,0,5,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x50, -}; - -static const BitmapCharRec ch228 = {5,8,0,0,5,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0xa0,0x50, -}; - -static const BitmapCharRec ch227 = {5,9,0,0,5,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch226 = {5,9,0,0,5,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch225 = {5,9,0,0,5,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch224 = {5,9,0,0,5,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0xa0,0x90,0x90,0x90,0xa0,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch223 = {4,8,0,0,5,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0x80,0x80,0xf0,0x88,0x88,0xf0,0x80,0x80, -}; - -static const BitmapCharRec ch222 = {5,8,-1,0,7,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x10,0x10,0x10,0x28,0x28,0x44,0x44,0x82,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch221 = {7,11,0,0,7,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48, -}; - -static const BitmapCharRec ch220 = {6,10,-1,0,8,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch219 = {6,11,-1,0,8,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch218 = {6,11,-1,0,8,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch217 = {6,11,-1,0,8,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x80,0x78,0xc4,0xa4,0xa4,0x94,0x94,0x8c,0x78,0x4, -}; - -static const BitmapCharRec ch216 = {6,10,-1,1,8,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x88,0x50,0x20,0x50,0x88, -}; - -static const BitmapCharRec ch215 = {5,5,0,-1,6,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x48, -}; - -static const BitmapCharRec ch214 = {6,10,-1,0,8,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch213 = {6,11,-1,0,8,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch212 = {6,11,-1,0,8,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch211 = {6,11,-1,0,8,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch210 = {6,11,-1,0,8,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0x8c,0x8c,0x94,0x94,0xa4,0xa4,0xc4,0xc4,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch209 = {6,11,-1,0,8,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0x78,0x44,0x42,0x42,0xf2,0x42,0x44,0x78, -}; - -static const BitmapCharRec ch208 = {7,8,0,0,8,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0, -}; - -static const BitmapCharRec ch207 = {3,10,0,0,3,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch206 = {3,11,0,0,3,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40, -}; - -static const BitmapCharRec ch205 = {2,11,-1,0,3,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch204 = {2,11,0,0,3,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x50, -}; - -static const BitmapCharRec ch203 = {5,10,-1,0,7,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xf8,0x80,0x80,0xf8,0x80,0x80,0x80,0xf8,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch202 = {5,11,-1,0,7,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch201 = {5,11,-1,0,7,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch200 = {5,11,-1,0,7,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x30,0x10,0x78,0x84,0x80,0x80,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch199 = {6,10,-1,2,8,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0x8f,0x80,0x88,0x0,0x78,0x0,0x48,0x0,0x2f,0x80,0x28,0x0,0x18,0x0,0x1f,0x80, -}; - -static const BitmapCharRec ch198 = {9,8,0,0,10,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x10,0x28,0x10, -}; - -static const BitmapCharRec ch197 = {7,11,0,0,7,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28, -}; - -static const BitmapCharRec ch196 = {7,10,0,0,7,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch195 = {7,11,0,0,7,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch194 = {7,11,0,0,7,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch193 = {7,11,0,0,7,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch192 = {7,11,0,0,7,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x60,0x90,0x80,0x40,0x20,0x20,0x0,0x20, -}; - -static const BitmapCharRec ch191 = {4,8,-1,2,6,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x21,0x0,0x17,0x80,0x13,0x0,0x9,0x0,0xc8,0x0,0x24,0x0,0x44,0x0,0xe2,0x0, -}; - -static const BitmapCharRec ch190 = {9,8,0,0,9,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x27,0x12,0x15,0xb,0x48,0x44,0xc4,0x42, -}; - -static const BitmapCharRec ch189 = {8,8,0,0,9,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x21,0x0,0x17,0x80,0x13,0x0,0x9,0x0,0x48,0x0,0x44,0x0,0xc4,0x0,0x42,0x0, -}; - -static const BitmapCharRec ch188 = {9,8,0,0,9,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0xa0,0x50,0x28,0x50,0xa0, -}; - -static const BitmapCharRec ch187 = {5,5,0,0,6,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xe0,0x0,0xe0,0xa0,0xe0, -}; - -static const BitmapCharRec ch186 = {3,5,0,-3,4,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch185 = {2,4,0,-3,3,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0xc0,0x40, -}; - -static const BitmapCharRec ch184 = {2,2,0,2,3,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0xc0, -}; - -static const BitmapCharRec ch183 = {2,1,0,-3,3,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x28,0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x7c, -}; - -static const BitmapCharRec ch182 = {6,10,0,2,6,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x80,0x80,0xf0,0x90,0x90,0x90,0x90,0x90, -}; - -static const BitmapCharRec ch181 = {4,8,0,2,5,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0x80,0x40, -}; - -static const BitmapCharRec ch180 = {2,2,0,-6,3,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0xc0,0x20,0x40,0xe0, -}; - -static const BitmapCharRec ch179 = {3,4,0,-3,3,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xe0,0x40,0xa0,0x60, -}; - -static const BitmapCharRec ch178 = {3,4,0,-3,3,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xf8,0x0,0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch177 = {5,7,0,0,6,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch176 = {4,4,0,-3,4,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xe0, -}; - -static const BitmapCharRec ch175 = {3,1,0,-7,3,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x38,0x44,0xaa,0xb2,0xba,0x44,0x38, -}; - -static const BitmapCharRec ch174 = {7,7,-1,0,9,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xe0, -}; - -static const BitmapCharRec ch173 = {3,1,0,-3,4,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x8,0x8,0xf8, -}; - -static const BitmapCharRec ch172 = {5,3,-1,-2,7,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x28,0x50,0xa0,0x50,0x28, -}; - -static const BitmapCharRec ch171 = {5,5,0,0,6,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xe0,0x0,0xa0,0x20,0xe0, -}; - -static const BitmapCharRec ch170 = {3,5,0,-3,4,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x38,0x44,0x9a,0xa2,0x9a,0x44,0x38, -}; - -static const BitmapCharRec ch169 = {7,7,-1,0,9,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xa0, -}; - -static const BitmapCharRec ch168 = {3,1,0,-7,3,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x70,0x88,0x18,0x70,0xc8,0x98,0x70,0xc0,0x88,0x70, -}; - -static const BitmapCharRec ch167 = {5,10,0,2,6,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0x80,0x80,0x80,0x80,0x0,0x0,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch166 = {1,10,-1,2,3,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x20,0xf8,0x20,0xf8,0x50,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch165 = {5,8,0,0,6,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0x90,0x60,0x90,0x90,0x60,0x90, -}; - -static const BitmapCharRec ch164 = {4,6,0,-1,5,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xb0,0x48,0x40,0x40,0xe0,0x40,0x48,0x30, -}; - -static const BitmapCharRec ch163 = {5,8,0,0,6,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x40,0x70,0xa8,0xa0,0xa0,0xa8,0x70,0x10, -}; - -static const BitmapCharRec ch162 = {5,8,0,1,6,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch161 = {1,8,-1,2,3,ch161data}; - -/* char: 0xa0 */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,3,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,3,0}; -#endif - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x98,0x64, -}; - -static const BitmapCharRec ch126 = {6,2,0,-3,7,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0x80,0x40,0x40,0x40,0x40,0x20,0x40,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch125 = {3,10,0,2,3,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch124 = {1,10,-1,2,3,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x20,0x40,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch123 = {3,10,0,2,3,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xf0,0x80,0x40,0x20,0x10,0xf0, -}; - -static const BitmapCharRec ch122 = {4,6,0,0,5,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90, -}; - -static const BitmapCharRec ch121 = {4,8,0,2,5,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0x88,0x88,0x50,0x20,0x50,0x88, -}; - -static const BitmapCharRec ch120 = {5,6,0,0,6,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x28,0x28,0x54,0x54,0x92,0x92, -}; - -static const BitmapCharRec ch119 = {7,6,0,0,8,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x20,0x20,0x50,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch118 = {5,6,0,0,6,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x70,0x90,0x90,0x90,0x90,0x90, -}; - -static const BitmapCharRec ch117 = {4,6,0,0,5,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x60,0x40,0x40,0x40,0x40,0xe0,0x40,0x40, -}; - -static const BitmapCharRec ch116 = {3,8,0,0,4,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0x60,0x90,0x10,0x60,0x90,0x60, -}; - -static const BitmapCharRec ch115 = {4,6,0,0,5,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0x80,0x80,0x80,0x80,0xc0,0xa0, -}; - -static const BitmapCharRec ch114 = {3,6,0,0,4,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x8,0x8,0x68,0x98,0x88,0x88,0x98,0x68, -}; - -static const BitmapCharRec ch113 = {5,8,0,2,6,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0x80,0x80,0xb0,0xc8,0x88,0x88,0xc8,0xb0, -}; - -static const BitmapCharRec ch112 = {5,8,0,2,6,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x70,0x88,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch111 = {5,6,0,0,6,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0x88,0x88,0x88,0x88,0xc8,0xb0, -}; - -static const BitmapCharRec ch110 = {5,6,0,0,6,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0x92,0x92,0x92,0x92,0x92,0xec, -}; - -static const BitmapCharRec ch109 = {7,6,0,0,8,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch108 = {1,8,0,0,2,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0x90,0x90,0xa0,0xc0,0xa0,0x90,0x80,0x80, -}; - -static const BitmapCharRec ch107 = {4,8,0,0,5,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch106 = {1,9,0,1,2,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch105 = {1,8,0,0,2,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0x88,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch104 = {5,8,0,0,6,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x70,0x8,0x68,0x98,0x88,0x88,0x98,0x68, -}; - -static const BitmapCharRec ch103 = {5,8,0,2,6,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x30, -}; - -static const BitmapCharRec ch102 = {4,8,0,0,4,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x60,0x90,0x80,0xf0,0x90,0x60, -}; - -static const BitmapCharRec ch101 = {4,6,0,0,5,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x68,0x98,0x88,0x88,0x98,0x68,0x8,0x8, -}; - -static const BitmapCharRec ch100 = {5,8,0,0,6,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x60,0x90,0x80,0x80,0x90,0x60, -}; - -static const BitmapCharRec ch99 = {4,6,0,0,5,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xb0,0xc8,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch98 = {5,8,0,0,6,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x68,0x90,0x90,0x70,0x10,0xe0, -}; - -static const BitmapCharRec ch97 = {5,6,0,0,5,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0x80,0x80,0x40, -}; - -static const BitmapCharRec ch96 = {2,3,0,-5,3,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xfc, -}; - -static const BitmapCharRec ch95 = {6,1,0,2,6,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x88,0x50,0x50,0x20,0x20, -}; - -static const BitmapCharRec ch94 = {5,5,0,-3,6,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0, -}; - -static const BitmapCharRec ch93 = {2,10,0,2,3,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x20,0x20,0x40,0x40,0x40,0x40,0x80,0x80, -}; - -static const BitmapCharRec ch92 = {3,8,0,0,3,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0, -}; - -static const BitmapCharRec ch91 = {2,10,-1,2,3,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xf8,0x80,0x40,0x20,0x20,0x10,0x8,0xf8, -}; - -static const BitmapCharRec ch90 = {5,8,-1,0,7,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x10,0x10,0x10,0x28,0x28,0x44,0x44,0x82, -}; - -static const BitmapCharRec ch89 = {7,8,0,0,7,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0x88,0x88,0x50,0x50,0x20,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch88 = {5,8,-1,0,7,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x22,0x0,0x22,0x0,0x22,0x0,0x55,0x0,0x49,0x0,0x49,0x0,0x88,0x80,0x88,0x80, -}; - -static const BitmapCharRec ch87 = {9,8,0,0,9,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x10,0x28,0x28,0x44,0x44,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch86 = {7,8,0,0,7,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch85 = {6,8,-1,0,8,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8, -}; - -static const BitmapCharRec ch84 = {5,8,0,0,5,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x70,0x88,0x88,0x8,0x70,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch83 = {5,8,-1,0,7,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0x88,0x88,0x88,0x88,0xf0,0x88,0x88,0xf0, -}; - -static const BitmapCharRec ch82 = {5,8,-1,0,7,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x2,0x7c,0x8c,0x94,0x84,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch81 = {7,9,-1,1,8,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0x80,0x80,0x80,0x80,0xf0,0x88,0x88,0xf0, -}; - -static const BitmapCharRec ch80 = {5,8,-1,0,7,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78, -}; - -static const BitmapCharRec ch79 = {6,8,-1,0,8,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0x8c,0x8c,0x94,0x94,0xa4,0xa4,0xc4,0xc4, -}; - -static const BitmapCharRec ch78 = {6,8,-1,0,8,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0x92,0x92,0x92,0xaa,0xaa,0xc6,0xc6,0x82, -}; - -static const BitmapCharRec ch77 = {7,8,-1,0,9,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch76 = {4,8,-1,0,6,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0x88,0x88,0x90,0x90,0xe0,0xa0,0x90,0x88, -}; - -static const BitmapCharRec ch75 = {5,8,-1,0,7,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x60,0x90,0x10,0x10,0x10,0x10,0x10,0x10, -}; - -static const BitmapCharRec ch74 = {4,8,0,0,5,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch73 = {1,8,-1,0,3,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0x84,0x84,0x84,0x84,0xfc,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch72 = {6,8,-1,0,8,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x74,0x8c,0x84,0x8c,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch71 = {6,8,-1,0,8,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0x80,0x80,0x80,0x80,0xf0,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch70 = {5,8,-1,0,6,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch69 = {5,8,-1,0,7,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xf0,0x88,0x84,0x84,0x84,0x84,0x88,0xf0, -}; - -static const BitmapCharRec ch68 = {6,8,-1,0,8,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x78,0x84,0x80,0x80,0x80,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch67 = {6,8,-1,0,8,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xf0,0x88,0x88,0x88,0xf0,0x88,0x88,0xf0, -}; - -static const BitmapCharRec ch66 = {5,8,-1,0,7,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10, -}; - -static const BitmapCharRec ch65 = {7,8,0,0,7,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x3e,0x0,0x40,0x0,0x9b,0x0,0xa4,0x80,0xa4,0x80,0xa2,0x40,0x92,0x40,0x4d,0x40, -0x20,0x80,0x1f,0x0, -}; - -static const BitmapCharRec ch64 = {10,10,0,2,11,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x40,0x0,0x40,0x40,0x20,0x10,0x90,0x60, -}; - -static const BitmapCharRec ch63 = {4,8,-1,0,6,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0x80,0x40,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch62 = {3,5,-1,-1,6,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xf0,0x0,0xf0, -}; - -static const BitmapCharRec ch61 = {4,3,0,-2,5,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x20,0x40,0x80,0x40,0x20, -}; - -static const BitmapCharRec ch60 = {3,5,-1,-1,6,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x40,0x40,0x0,0x0,0x0,0x0,0x40, -}; - -static const BitmapCharRec ch59 = {2,8,0,2,3,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0x80,0x0,0x0,0x0,0x0,0x80, -}; - -static const BitmapCharRec ch58 = {1,6,-1,0,3,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0x70,0x88,0x8,0x68,0x98,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch57 = {5,8,0,0,6,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x70,0x88,0x88,0x88,0x70,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch56 = {5,8,0,0,6,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x40,0x40,0x20,0x20,0x10,0x10,0x8,0xf8, -}; - -static const BitmapCharRec ch55 = {5,8,0,0,6,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x70,0x88,0x88,0xc8,0xb0,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch54 = {5,8,0,0,6,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x70,0x88,0x8,0x8,0xf0,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch53 = {5,8,0,0,6,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x10,0x10,0xf8,0x90,0x50,0x50,0x30,0x10, -}; - -static const BitmapCharRec ch52 = {5,8,0,0,6,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x70,0x88,0x8,0x8,0x30,0x8,0x88,0x70, -}; - -static const BitmapCharRec ch51 = {5,8,0,0,6,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xf8,0x80,0x40,0x30,0x8,0x8,0x88,0x70, -}; - -static const BitmapCharRec ch50 = {5,8,0,0,6,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch49 = {2,8,-1,0,6,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch48 = {5,8,0,0,6,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0x80,0x80,0x40,0x40,0x40,0x40,0x20,0x20, -}; - -static const BitmapCharRec ch47 = {3,8,0,0,3,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0x80, -}; - -static const BitmapCharRec ch46 = {1,1,-1,0,3,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xf8, -}; - -static const BitmapCharRec ch45 = {5,1,-1,-3,7,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x40,0x40, -}; - -static const BitmapCharRec ch44 = {2,3,0,2,3,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch43 = {5,5,0,-1,6,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0xa0,0x40,0xa0, -}; - -static const BitmapCharRec ch42 = {3,3,0,-5,4,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {3,10,-1,2,4,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch40 = {3,10,0,2,4,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x80,0x40,0x40, -}; - -static const BitmapCharRec ch39 = {2,3,-1,-5,3,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x64,0x98,0x98,0xa4,0x60,0x50,0x50,0x20, -}; - -static const BitmapCharRec ch38 = {6,8,-1,0,8,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x26,0x29,0x16,0x10,0x8,0x68,0x94,0x64, -}; - -static const BitmapCharRec ch37 = {8,8,0,0,9,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x20,0x70,0xa8,0x28,0x70,0xa0,0xa8,0x70,0x20, -}; - -static const BitmapCharRec ch36 = {5,9,0,1,6,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x50,0x50,0xf8,0x28,0x7c,0x28,0x28, -}; - -static const BitmapCharRec ch35 = {6,7,0,0,6,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0xa0,0xa0, -}; - -static const BitmapCharRec ch34 = {3,2,-1,-6,4,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch33 = {1,8,-1,0,3,ch33data}; - -/* char: 0x20 ' ' */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {0,0,0,0,3,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,3,0}; -#endif - -static const BitmapCharRec * const chars[] = { -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -#if !defined(__IBMCPP__) -const -#endif -BitmapFontRec glutBitmapHelvetica10 = { -"-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1", -224, -32, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_hel12.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_hel12.cpp deleted file mode 100644 index cbd0548b93..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_hel12.cpp +++ /dev/null @@ -1,1791 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmapHelvetica12 XXX -#include "glutbitmap.h" -#undef glutBitmapHelvetica12 - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0xc0,0x20,0x20,0x20,0x30,0x50,0x50,0x48,0x88,0x88,0x0,0x50, -}; - -static const BitmapCharRec ch255 = {5,12,-1,3,7,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0x80,0x80,0x80,0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch254 = {5,12,-1,3,7,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x80,0x40,0x20,0x20,0x50,0x50,0x90,0x88,0x88,0x88,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch253 = {5,13,-1,3,7,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x50, -}; - -static const BitmapCharRec ch252 = {5,9,-1,0,7,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch251 = {5,10,-1,0,7,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch250 = {5,10,-1,0,7,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch249 = {5,10,-1,0,7,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0xb8,0x44,0x64,0x54,0x4c,0x44,0x3a, -}; - -static const BitmapCharRec ch248 = {7,7,0,0,7,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x20,0x0,0xf8,0x0,0x20, -}; - -static const BitmapCharRec ch247 = {5,5,-1,-1,7,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50, -}; - -static const BitmapCharRec ch246 = {5,9,-1,0,7,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch245 = {5,10,-1,0,7,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch244 = {5,10,-1,0,7,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch243 = {5,10,-1,0,7,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch242 = {5,10,-1,0,7,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0x88,0x88,0x88,0x88,0x88,0xc8,0xb0,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch241 = {5,10,-1,0,7,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x70,0x88,0x88,0x88,0x88,0x78,0x8,0x50,0x30,0x68, -}; - -static const BitmapCharRec ch240 = {5,10,-1,0,7,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0, -}; - -static const BitmapCharRec ch239 = {3,9,0,0,3,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch238 = {3,10,0,0,3,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40, -}; - -static const BitmapCharRec ch237 = {2,10,-1,0,3,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch236 = {2,10,0,0,3,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x50, -}; - -static const BitmapCharRec ch235 = {5,9,-1,0,7,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch234 = {5,10,-1,0,7,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch233 = {5,10,-1,0,7,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x20,0x40, -}; - -static const BitmapCharRec ch232 = {5,10,-1,0,7,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x60,0x10,0x20,0x70,0x88,0x80,0x80,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch231 = {5,10,-1,3,7,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x77,0x0,0x88,0x80,0x88,0x0,0x7f,0x80,0x8,0x80,0x88,0x80,0x77,0x0, -}; - -static const BitmapCharRec ch230 = {9,7,-1,0,11,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x30,0x48,0x30, -}; - -static const BitmapCharRec ch229 = {6,10,-1,0,7,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50, -}; - -static const BitmapCharRec ch228 = {6,9,-1,0,7,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50,0x28, -}; - -static const BitmapCharRec ch227 = {6,10,-1,0,7,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50,0x20, -}; - -static const BitmapCharRec ch226 = {6,10,-1,0,7,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x20,0x10, -}; - -static const BitmapCharRec ch225 = {6,10,-1,0,7,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch224 = {6,10,-1,0,7,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0xb0,0x88,0x88,0x88,0xb0,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch223 = {5,9,-1,0,7,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0x80,0x80,0xf8,0x84,0x84,0x84,0xf8,0x80,0x80, -}; - -static const BitmapCharRec ch222 = {6,9,-1,0,8,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x10,0x10,0x10,0x10,0x28,0x44,0x44,0x82,0x82,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch221 = {7,12,-1,0,9,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48, -}; - -static const BitmapCharRec ch220 = {6,11,-1,0,8,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch219 = {6,12,-1,0,8,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch218 = {6,12,-1,0,8,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch217 = {6,12,-1,0,8,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x80,0x0,0x5e,0x0,0x21,0x0,0x50,0x80,0x48,0x80,0x44,0x80,0x44,0x80,0x42,0x80, -0x21,0x0,0x1e,0x80,0x0,0x40, -}; - -static const BitmapCharRec ch216 = {10,11,0,1,10,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x88,0x50,0x20,0x50,0x88, -}; - -static const BitmapCharRec ch215 = {5,5,-1,-1,7,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x24, -}; - -static const BitmapCharRec ch214 = {8,11,-1,0,10,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch213 = {8,12,-1,0,10,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x14,0x8, -}; - -static const BitmapCharRec ch212 = {8,12,-1,0,10,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x8,0x4, -}; - -static const BitmapCharRec ch211 = {8,12,-1,0,10,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x8,0x10, -}; - -static const BitmapCharRec ch210 = {8,12,-1,0,10,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0x82,0x86,0x8a,0x8a,0x92,0xa2,0xa2,0xc2,0x82,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch209 = {7,12,-1,0,9,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0x7c,0x42,0x41,0x41,0xf1,0x41,0x41,0x42,0x7c, -}; - -static const BitmapCharRec ch208 = {8,9,0,0,9,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0, -}; - -static const BitmapCharRec ch207 = {3,11,0,0,3,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40, -}; - -static const BitmapCharRec ch206 = {3,12,0,0,3,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40, -}; - -static const BitmapCharRec ch205 = {2,12,-1,0,3,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80, -}; - -static const BitmapCharRec ch204 = {2,12,0,0,3,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x28, -}; - -static const BitmapCharRec ch203 = {6,11,-1,0,8,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch202 = {6,12,-1,0,8,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch201 = {6,12,-1,0,8,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch200 = {6,12,-1,0,8,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x30,0x8,0x8,0x3c,0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x3c, -}; - -static const BitmapCharRec ch199 = {7,12,-1,3,9,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0x8f,0x80,0x88,0x0,0x88,0x0,0x78,0x0,0x4f,0x80,0x48,0x0,0x28,0x0,0x28,0x0, -0x1f,0x80, -}; - -static const BitmapCharRec ch198 = {9,9,-1,0,11,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x10,0x28,0x10, -}; - -static const BitmapCharRec ch197 = {7,12,-1,0,9,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28, -}; - -static const BitmapCharRec ch196 = {7,11,-1,0,9,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28,0x14, -}; - -static const BitmapCharRec ch195 = {7,12,-1,0,9,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28,0x10, -}; - -static const BitmapCharRec ch194 = {7,12,-1,0,9,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x10,0x8, -}; - -static const BitmapCharRec ch193 = {7,12,-1,0,9,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x10,0x20, -}; - -static const BitmapCharRec ch192 = {7,12,-1,0,9,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x70,0x88,0x88,0x40,0x40,0x20,0x20,0x0,0x20, -}; - -static const BitmapCharRec ch191 = {5,9,-1,3,7,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x21,0x0,0x17,0x80,0x15,0x0,0xb,0x0,0xc9,0x0,0x24,0x0,0x44,0x0,0x22,0x0, -0xe1,0x0, -}; - -static const BitmapCharRec ch190 = {9,9,0,0,10,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x47,0x80,0x22,0x0,0x11,0x0,0x14,0x80,0x4b,0x0,0x48,0x0,0x44,0x0,0xc2,0x0, -0x41,0x0, -}; - -static const BitmapCharRec ch189 = {9,9,0,0,10,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x41,0x0,0x27,0x80,0x15,0x0,0x13,0x0,0x49,0x0,0x44,0x0,0x44,0x0,0xc2,0x0, -0x41,0x0, -}; - -static const BitmapCharRec ch188 = {9,9,0,0,10,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0xa0,0x50,0x28,0x50,0xa0, -}; - -static const BitmapCharRec ch187 = {5,5,-1,-1,7,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xe0,0x0,0xe0,0xa0,0xe0, -}; - -static const BitmapCharRec ch186 = {3,5,-1,-4,5,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0x40,0x40,0x40,0xc0,0x40, -}; - -static const BitmapCharRec ch185 = {2,5,-1,-3,4,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0xc0,0x20,0x20,0x40, -}; - -static const BitmapCharRec ch184 = {3,4,0,3,3,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0x80, -}; - -static const BitmapCharRec ch183 = {1,1,-1,-3,3,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x28,0x28,0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x68,0x3c, -}; - -static const BitmapCharRec ch182 = {6,12,0,3,7,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x80,0x80,0x80,0xe8,0x98,0x88,0x88,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch181 = {5,10,-1,3,7,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0x80,0x40, -}; - -static const BitmapCharRec ch180 = {2,2,0,-8,2,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0xc0,0x20,0x40,0x20,0xe0, -}; - -static const BitmapCharRec ch179 = {3,5,0,-3,4,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xf0,0x40,0x20,0x90,0x60, -}; - -static const BitmapCharRec ch178 = {4,5,0,-3,4,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xf8,0x0,0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch177 = {5,7,-1,0,7,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x60,0x90,0x90,0x60, -}; - -static const BitmapCharRec ch176 = {4,4,0,-4,5,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xf0, -}; - -static const BitmapCharRec ch175 = {4,1,0,-8,4,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x3e,0x0,0x41,0x0,0x94,0x80,0x94,0x80,0x98,0x80,0x94,0x80,0x9c,0x80,0x41,0x0, -0x3e,0x0, -}; - -static const BitmapCharRec ch174 = {9,9,-1,0,11,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xf0, -}; - -static const BitmapCharRec ch173 = {4,1,0,-3,5,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x4,0x4,0x4,0xfc, -}; - -static const BitmapCharRec ch172 = {6,4,-1,-2,8,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x28,0x50,0xa0,0x50,0x28, -}; - -static const BitmapCharRec ch171 = {5,5,-1,-1,7,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xe0,0x0,0xa0,0x20,0xe0, -}; - -static const BitmapCharRec ch170 = {3,5,-1,-4,5,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x3e,0x0,0x41,0x0,0x9c,0x80,0xa2,0x80,0xa0,0x80,0xa2,0x80,0x9c,0x80,0x41,0x0, -0x3e,0x0, -}; - -static const BitmapCharRec ch169 = {9,9,-1,0,11,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xa0, -}; - -static const BitmapCharRec ch168 = {3,1,0,-8,3,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x70,0x88,0x8,0x30,0x48,0x88,0x88,0x90,0x60,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch167 = {5,12,0,3,6,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0x80,0x80,0x80,0x80,0x0,0x0,0x0,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch166 = {1,11,-1,2,3,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x20,0x20,0xf8,0x20,0xf8,0x20,0x50,0x88,0x88, -}; - -static const BitmapCharRec ch165 = {5,9,-1,0,7,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0x84,0x78,0x48,0x48,0x78,0x84, -}; - -static const BitmapCharRec ch164 = {6,6,0,-1,7,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xb0,0x48,0x20,0x20,0xf0,0x40,0x40,0x48,0x30, -}; - -static const BitmapCharRec ch163 = {5,9,-1,0,7,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x40,0x70,0xc8,0xa0,0xa0,0xa0,0xa8,0x70,0x10, -}; - -static const BitmapCharRec ch162 = {5,9,-1,1,7,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch161 = {1,10,-1,3,3,ch161data}; - -/* char: 0xa0 */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,4,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,4,0}; -#endif - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x98,0x64, -}; - -static const BitmapCharRec ch126 = {6,2,0,-3,7,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0xc0,0x20,0x20,0x20,0x20,0x20,0x10,0x20,0x20,0x20,0x20,0xc0, -}; - -static const BitmapCharRec ch125 = {4,12,0,3,4,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch124 = {1,12,-1,3,3,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x30,0x40,0x40,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x40,0x30, -}; - -static const BitmapCharRec ch123 = {4,12,0,3,4,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xf0,0x80,0x40,0x40,0x20,0x10,0xf0, -}; - -static const BitmapCharRec ch122 = {4,7,-1,0,6,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x80,0x40,0x20,0x20,0x50,0x50,0x90,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch121 = {5,10,-1,3,7,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0x84,0x84,0x48,0x30,0x30,0x48,0x84, -}; - -static const BitmapCharRec ch120 = {6,7,0,0,6,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x22,0x0,0x22,0x0,0x55,0x0,0x49,0x0,0x49,0x0,0x88,0x80,0x88,0x80, -}; - -static const BitmapCharRec ch119 = {9,7,0,0,9,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x20,0x20,0x50,0x50,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch118 = {5,7,-1,0,7,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x68,0x98,0x88,0x88,0x88,0x88,0x88, -}; - -static const BitmapCharRec ch117 = {5,7,-1,0,7,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x60,0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x40, -}; - -static const BitmapCharRec ch116 = {3,9,0,0,3,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0x60,0x90,0x10,0x60,0x80,0x90,0x60, -}; - -static const BitmapCharRec ch115 = {4,7,-1,0,6,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0x80,0x80,0x80,0x80,0x80,0xc0,0xa0, -}; - -static const BitmapCharRec ch114 = {3,7,-1,0,4,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x8,0x8,0x8,0x68,0x98,0x88,0x88,0x88,0x98,0x68, -}; - -static const BitmapCharRec ch113 = {5,10,-1,3,7,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0x80,0x80,0x80,0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0, -}; - -static const BitmapCharRec ch112 = {5,10,-1,3,7,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch111 = {5,7,-1,0,7,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0x88,0x88,0x88,0x88,0x88,0xc8,0xb0, -}; - -static const BitmapCharRec ch110 = {5,7,-1,0,7,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0x92,0x92,0x92,0x92,0x92,0xda,0xa4, -}; - -static const BitmapCharRec ch109 = {7,7,-1,0,9,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch108 = {1,9,-1,0,3,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0x88,0x90,0xa0,0xc0,0xc0,0xa0,0x90,0x80,0x80, -}; - -static const BitmapCharRec ch107 = {5,9,-1,0,6,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0x80,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40, -}; - -static const BitmapCharRec ch106 = {2,12,0,3,3,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80, -}; - -static const BitmapCharRec ch105 = {1,9,-1,0,3,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0x88,0x88,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch104 = {5,9,-1,0,7,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x70,0x88,0x8,0x68,0x98,0x88,0x88,0x88,0x98,0x68, -}; - -static const BitmapCharRec ch103 = {5,10,-1,3,7,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x40,0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x30, -}; - -static const BitmapCharRec ch102 = {4,9,0,0,3,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x70,0x88,0x80,0xf8,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch101 = {5,7,-1,0,7,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x68,0x98,0x88,0x88,0x88,0x98,0x68,0x8,0x8, -}; - -static const BitmapCharRec ch100 = {5,9,-1,0,7,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x70,0x88,0x80,0x80,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch99 = {5,7,-1,0,7,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80, -}; - -static const BitmapCharRec ch98 = {5,9,-1,0,7,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x74,0x88,0x88,0x78,0x8,0x88,0x70, -}; - -static const BitmapCharRec ch97 = {6,7,-1,0,7,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0xc0,0x80,0x40, -}; - -static const BitmapCharRec ch96 = {2,3,0,-6,3,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xfe, -}; - -static const BitmapCharRec ch95 = {7,1,0,2,7,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x88,0x50,0x20, -}; - -static const BitmapCharRec ch94 = {5,3,0,-5,6,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0, -}; - -static const BitmapCharRec ch93 = {2,12,0,3,3,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x10,0x10,0x20,0x20,0x20,0x40,0x40,0x80,0x80, -}; - -static const BitmapCharRec ch92 = {4,9,0,0,4,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0, -}; - -static const BitmapCharRec ch91 = {2,12,-1,3,3,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xfe,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0xfe, -}; - -static const BitmapCharRec ch90 = {7,9,-1,0,9,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x10,0x10,0x10,0x10,0x28,0x44,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch89 = {7,9,-1,0,9,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0x82,0x44,0x44,0x28,0x10,0x28,0x44,0x44,0x82, -}; - -static const BitmapCharRec ch88 = {7,9,-1,0,9,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x22,0x0,0x22,0x0,0x22,0x0,0x55,0x0,0x55,0x0,0x49,0x0,0x88,0x80,0x88,0x80, -0x88,0x80, -}; - -static const BitmapCharRec ch87 = {9,9,-1,0,11,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x10,0x10,0x28,0x28,0x44,0x44,0x44,0x82,0x82, -}; - -static const BitmapCharRec ch86 = {7,9,-1,0,9,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84, -}; - -static const BitmapCharRec ch85 = {6,9,-1,0,8,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe, -}; - -static const BitmapCharRec ch84 = {7,9,0,0,7,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x78,0x84,0x84,0x4,0x18,0x60,0x80,0x84,0x78, -}; - -static const BitmapCharRec ch83 = {6,9,-1,0,8,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0x84,0x84,0x84,0x88,0xf8,0x84,0x84,0x84,0xf8, -}; - -static const BitmapCharRec ch82 = {6,9,-1,0,8,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x3d,0x42,0x85,0x89,0x81,0x81,0x81,0x42,0x3c, -}; - -static const BitmapCharRec ch81 = {8,9,-1,0,10,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0x80,0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8, -}; - -static const BitmapCharRec ch80 = {6,9,-1,0,8,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c, -}; - -static const BitmapCharRec ch79 = {8,9,-1,0,10,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0x82,0x86,0x8a,0x8a,0x92,0xa2,0xa2,0xc2,0x82, -}; - -static const BitmapCharRec ch78 = {7,9,-1,0,9,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0x88,0x80,0x88,0x80,0x94,0x80,0x94,0x80,0xa2,0x80,0xa2,0x80,0xc1,0x80,0xc1,0x80, -0x80,0x80, -}; - -static const BitmapCharRec ch77 = {9,9,-1,0,11,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch76 = {5,9,-1,0,7,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0x82,0x84,0x88,0x90,0xe0,0xa0,0x90,0x88,0x84, -}; - -static const BitmapCharRec ch75 = {7,9,-1,0,8,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x70,0x88,0x88,0x8,0x8,0x8,0x8,0x8,0x8, -}; - -static const BitmapCharRec ch74 = {5,9,-1,0,7,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch73 = {1,9,-1,0,3,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0x82,0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x82, -}; - -static const BitmapCharRec ch72 = {7,9,-1,0,9,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x3a,0x46,0x82,0x82,0x8e,0x80,0x80,0x42,0x3c, -}; - -static const BitmapCharRec ch71 = {7,9,-1,0,9,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0xfc, -}; - -static const BitmapCharRec ch70 = {6,9,-1,0,8,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc, -}; - -static const BitmapCharRec ch69 = {6,9,-1,0,8,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xf8,0x84,0x82,0x82,0x82,0x82,0x82,0x84,0xf8, -}; - -static const BitmapCharRec ch68 = {7,9,-1,0,9,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x3c,0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x3c, -}; - -static const BitmapCharRec ch67 = {7,9,-1,0,9,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xf8,0x84,0x84,0x84,0xf8,0x84,0x84,0x84,0xf8, -}; - -static const BitmapCharRec ch66 = {6,9,-1,0,8,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x28,0x10, -}; - -static const BitmapCharRec ch65 = {7,9,-1,0,9,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x3e,0x0,0x40,0x0,0x9b,0x0,0xa6,0x80,0xa2,0x40,0xa2,0x40,0x92,0x40,0x4d,0x40, -0x60,0x80,0x1f,0x0, -}; - -static const BitmapCharRec ch64 = {10,10,-1,1,12,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x20,0x0,0x20,0x20,0x10,0x10,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch63 = {5,9,-1,0,7,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0xc0,0x30,0xc,0x30,0xc0, -}; - -static const BitmapCharRec ch62 = {6,5,-1,-1,7,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xf8,0x0,0xf8, -}; - -static const BitmapCharRec ch61 = {5,3,-1,-2,7,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0xc,0x30,0xc0,0x30,0xc, -}; - -static const BitmapCharRec ch60 = {6,5,0,-1,7,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x40,0x40,0x0,0x0,0x0,0x0,0x40, -}; - -static const BitmapCharRec ch59 = {2,8,0,2,3,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0x80,0x0,0x0,0x0,0x0,0x80, -}; - -static const BitmapCharRec ch58 = {1,6,-1,0,3,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0x70,0x88,0x8,0x8,0x78,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch57 = {5,9,-1,0,7,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x70,0x88,0x88,0x88,0x88,0x70,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch56 = {5,9,-1,0,7,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x40,0x40,0x20,0x20,0x20,0x10,0x10,0x8,0xf8, -}; - -static const BitmapCharRec ch55 = {5,9,-1,0,7,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x70,0x88,0x88,0x88,0xc8,0xb0,0x80,0x88,0x70, -}; - -static const BitmapCharRec ch54 = {5,9,-1,0,7,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x70,0x88,0x88,0x8,0x8,0xf0,0x80,0x80,0xf8, -}; - -static const BitmapCharRec ch53 = {5,9,-1,0,7,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x8,0x8,0xfc,0x88,0x48,0x28,0x28,0x18,0x8, -}; - -static const BitmapCharRec ch52 = {6,9,0,0,7,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x70,0x88,0x88,0x8,0x8,0x30,0x8,0x88,0x70, -}; - -static const BitmapCharRec ch51 = {5,9,-1,0,7,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xf8,0x80,0x80,0x40,0x20,0x10,0x8,0x88,0x70, -}; - -static const BitmapCharRec ch50 = {5,9,-1,0,7,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xe0,0x20, -}; - -static const BitmapCharRec ch49 = {3,9,-1,0,7,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x70, -}; - -static const BitmapCharRec ch48 = {5,9,-1,0,7,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0x80,0x80,0x40,0x40,0x40,0x20,0x20,0x10,0x10, -}; - -static const BitmapCharRec ch47 = {4,9,0,0,4,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0x80, -}; - -static const BitmapCharRec ch46 = {1,1,-1,0,3,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xf8, -}; - -static const BitmapCharRec ch45 = {5,1,-1,-3,8,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x40,0x40, -}; - -static const BitmapCharRec ch44 = {2,3,-1,2,4,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x20,0x20,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch43 = {5,5,-1,-1,7,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0xa0,0x40,0xa0, -}; - -static const BitmapCharRec ch42 = {3,3,-1,-6,5,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x20,0x20,0x40,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {3,12,0,3,4,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x20, -}; - -static const BitmapCharRec ch40 = {3,12,-1,3,4,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x80,0x40,0xc0, -}; - -static const BitmapCharRec ch39 = {2,3,-1,-6,3,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x72,0x8c,0x84,0x8a,0x50,0x30,0x48,0x48,0x30, -}; - -static const BitmapCharRec ch38 = {7,9,-1,0,9,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x23,0x0,0x14,0x80,0x14,0x80,0x13,0x0,0x8,0x0,0x68,0x0,0x94,0x0,0x94,0x0, -0x62,0x0, -}; - -static const BitmapCharRec ch37 = {9,9,-1,0,11,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x20,0x70,0xa8,0xa8,0x28,0x70,0xa0,0xa8,0x70,0x20, -}; - -static const BitmapCharRec ch36 = {5,10,-1,1,7,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x50,0x50,0x50,0xfc,0x28,0xfc,0x28,0x28, -}; - -static const BitmapCharRec ch35 = {6,8,0,0,7,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0xa0,0xa0,0xa0, -}; - -static const BitmapCharRec ch34 = {3,3,-1,-6,5,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -}; - -static const BitmapCharRec ch33 = {1,9,-1,0,3,ch33data}; - -/* char: 0x20 ' ' */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,4,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,4,0}; -#endif - -static const BitmapCharRec * const chars[] = { -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -#if !defined(__IBMCPP__) -const -#endif -BitmapFontRec glutBitmapHelvetica12 = { -"-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1", -224, -32, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_hel18.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_hel18.cpp deleted file mode 100644 index 26f88ec505..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_hel18.cpp +++ /dev/null @@ -1,1900 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmapHelvetica18 XXX -#include "glutbitmap.h" -#undef glutBitmapHelvetica18 - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,0x0,0x66, -0x66, -}; - -static const BitmapCharRec ch255 = {8,17,-1,4,10,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80, -0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0,0xff,0x0,0xde,0x0,0xc0,0x0,0xc0,0x0, -0xc0,0x0,0xc0,0x0, -}; - -static const BitmapCharRec ch254 = {9,18,-1,4,11,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,0x0,0x18, -0xc,0x6, -}; - -static const BitmapCharRec ch253 = {8,18,-1,4,10,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x66,0x66, -}; - -static const BitmapCharRec ch252 = {8,13,-1,0,10,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x66,0x3c,0x18, -}; - -static const BitmapCharRec ch251 = {8,14,-1,0,10,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x18,0xc,0x6, -}; - -static const BitmapCharRec ch250 = {8,14,-1,0,10,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0xc,0x18,0x30, -}; - -static const BitmapCharRec ch249 = {8,14,-1,0,10,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0xce,0x0,0x7f,0x80,0x31,0x80,0x78,0xc0,0x6c,0xc0,0x66,0xc0,0x63,0xc0,0x31,0x80, -0x3f,0xc0,0xe,0x60, -}; - -static const BitmapCharRec ch248 = {11,10,0,0,11,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x18,0x18,0x0,0xff,0xff,0x0,0x18,0x18, -}; - -static const BitmapCharRec ch247 = {8,8,-1,-1,10,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x0,0x0,0x36,0x0,0x36,0x0, -}; - -static const BitmapCharRec ch246 = {9,13,-1,0,11,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x0,0x0,0x26,0x0,0x2d,0x0,0x19,0x0, -}; - -static const BitmapCharRec ch245 = {9,14,-1,0,11,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x0,0x0,0x33,0x0,0x1e,0x0,0xc,0x0, -}; - -static const BitmapCharRec ch244 = {9,14,-1,0,11,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x0,0x0,0x18,0x0,0xc,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch243 = {9,14,-1,0,11,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x0,0x0,0xc,0x0,0x18,0x0,0x30,0x0, -}; - -static const BitmapCharRec ch242 = {9,14,-1,0,11,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce,0x0,0x4c,0x5a,0x32, -}; - -static const BitmapCharRec ch241 = {8,14,-1,0,10,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0,0x4c,0x0,0x38,0x0,0x36,0x0,0x60,0x0, -}; - -static const BitmapCharRec ch240 = {9,14,-1,0,11,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0xd8,0xd8, -}; - -static const BitmapCharRec ch239 = {5,13,0,0,4,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc,0x78,0x30, -}; - -static const BitmapCharRec ch238 = {6,14,1,0,4,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0xc0,0x60,0x30, -}; - -static const BitmapCharRec ch237 = {4,14,0,0,4,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0x30,0x60,0xc0, -}; - -static const BitmapCharRec ch236 = {4,14,0,0,4,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x36,0x36, -}; - -static const BitmapCharRec ch235 = {8,13,-1,0,10,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x66,0x3c,0x18, -}; - -static const BitmapCharRec ch234 = {8,14,-1,0,10,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x18,0xc,0x6, -}; - -static const BitmapCharRec ch233 = {8,14,-1,0,10,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x18,0x30,0x60, -}; - -static const BitmapCharRec ch232 = {8,14,-1,0,10,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x78,0x6c,0xc,0x38,0x3e,0x7f,0x63,0xc0,0xc0,0xc0,0xc0,0x63,0x7f,0x3e, -}; - -static const BitmapCharRec ch231 = {8,14,-1,4,10,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x75,0xe0,0xef,0xf8,0xc7,0x18,0xc6,0x0,0xe6,0x0,0x7f,0xf8,0xe,0x18,0xc6,0x18, -0xef,0xf0,0x7d,0xe0, -}; - -static const BitmapCharRec ch230 = {13,10,-1,0,15,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x38,0x6c,0x6c,0x38, -}; - -static const BitmapCharRec ch229 = {7,14,-1,0,9,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x6c,0x6c, -}; - -static const BitmapCharRec ch228 = {7,13,-1,0,9,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x4c,0x5a,0x32, -}; - -static const BitmapCharRec ch227 = {7,14,-1,0,9,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x66,0x3c,0x18, -}; - -static const BitmapCharRec ch226 = {7,14,-1,0,9,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x30,0x18,0xc, -}; - -static const BitmapCharRec ch225 = {7,14,-1,0,9,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x18,0x30,0x60, -}; - -static const BitmapCharRec ch224 = {7,14,-1,0,9,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0xdc,0xde,0xc6,0xc6,0xc6,0xc6,0xdc,0xdc,0xc6,0xc6,0xc6,0xc6,0x7c,0x38, -}; - -static const BitmapCharRec ch223 = {7,14,-1,0,9,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x80,0xc1,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc1,0xc0,0xff,0x80,0xff,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -}; - -static const BitmapCharRec ch222 = {10,14,-1,0,12,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80, -0x30,0xc0,0x30,0xc0,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30,0x0,0x0,0x6,0x0, -0x3,0x0,0x1,0x80, -}; - -static const BitmapCharRec ch221 = {12,18,-1,0,14,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x19,0x80, -0x19,0x80, -}; - -static const BitmapCharRec ch220 = {11,17,-1,0,13,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x19,0x80, -0xf,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch219 = {11,18,-1,0,13,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0xc,0x0, -0x6,0x0,0x3,0x0, -}; - -static const BitmapCharRec ch218 = {11,18,-1,0,13,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x6,0x0, -0xc,0x0,0x18,0x0, -}; - -static const BitmapCharRec ch217 = {11,18,-1,0,13,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0xc7,0xc0,0xff,0xf0,0x78,0x38,0x38,0x18,0x6c,0x1c,0x6e,0xc,0x67,0xc,0x63,0x8c, -0x61,0xcc,0x70,0xdc,0x30,0x78,0x38,0x38,0x1f,0xfc,0x7,0xcc, -}; - -static const BitmapCharRec ch216 = {14,14,0,0,15,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0xc0,0xc0,0x61,0x80,0x33,0x0,0x1e,0x0,0xc,0x0,0x1e,0x0,0x33,0x0,0x61,0x80, -0xc0,0xc0, -}; - -static const BitmapCharRec ch215 = {10,9,0,0,10,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0xd,0x80, -0xd,0x80, -}; - -static const BitmapCharRec ch214 = {13,17,-1,0,15,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x9,0x80, -0xb,0x40,0x6,0x40, -}; - -static const BitmapCharRec ch213 = {13,18,-1,0,15,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0xc,0xc0, -0x7,0x80,0x3,0x0, -}; - -static const BitmapCharRec ch212 = {13,18,-1,0,15,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x3,0x0, -0x1,0x80,0x0,0xc0, -}; - -static const BitmapCharRec ch211 = {13,18,-1,0,15,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x3,0x0, -0x6,0x0,0xc,0x0, -}; - -static const BitmapCharRec ch210 = {13,18,-1,0,15,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0xc0,0x60,0xc0,0xe0,0xc1,0xe0,0xc1,0xe0,0xc3,0x60,0xc6,0x60,0xc6,0x60,0xcc,0x60, -0xcc,0x60,0xd8,0x60,0xd8,0x60,0xf0,0x60,0xe0,0x60,0xe0,0x60,0x0,0x0,0x13,0x0, -0x16,0x80,0xc,0x80, -}; - -static const BitmapCharRec ch209 = {11,18,-1,0,13,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0x7f,0x80,0x7f,0xc0,0x60,0xe0,0x60,0x60,0x60,0x30,0x60,0x30,0xfc,0x30,0xfc,0x30, -0x60,0x30,0x60,0x30,0x60,0x60,0x60,0xe0,0x7f,0xc0,0x7f,0x80, -}; - -static const BitmapCharRec ch208 = {12,14,0,0,13,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc, -0xcc, -}; - -static const BitmapCharRec ch207 = {6,17,0,0,6,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc, -0x78,0x30, -}; - -static const BitmapCharRec ch206 = {6,18,0,0,6,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0xc0, -0x60,0x30, -}; - -static const BitmapCharRec ch205 = {4,18,-2,0,6,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0x30, -0x60,0xc0, -}; - -static const BitmapCharRec ch204 = {4,18,0,0,6,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0x33,0x0, -0x33,0x0, -}; - -static const BitmapCharRec ch203 = {9,17,-1,0,11,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0x33,0x0, -0x1e,0x0,0xc,0x0, -}; - -static const BitmapCharRec ch202 = {9,18,-1,0,11,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0xc,0x0, -0x6,0x0,0x3,0x0, -}; - -static const BitmapCharRec ch201 = {9,18,-1,0,11,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0xc,0x0, -0x18,0x0,0x30,0x0, -}; - -static const BitmapCharRec ch200 = {9,18,-1,0,11,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x1e,0x0,0x1b,0x0,0x3,0x0,0xe,0x0,0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30, -0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xe0,0x0,0x60,0x30,0x70,0x70, -0x3f,0xe0,0xf,0x80, -}; - -static const BitmapCharRec ch199 = {12,18,-1,4,14,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0xc1,0xff,0xc1,0xff,0x61,0x80,0x61,0x80,0x7f,0x80,0x3f,0x80,0x31,0xfe,0x31,0xfe, -0x19,0x80,0x19,0x80,0xd,0x80,0xd,0x80,0x7,0xff,0x7,0xff, -}; - -static const BitmapCharRec ch198 = {16,14,-1,0,18,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80, -0x19,0x80,0xf,0x0, -}; - -static const BitmapCharRec ch197 = {12,18,0,0,12,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x19,0x80, -0x19,0x80, -}; - -static const BitmapCharRec ch196 = {12,17,0,0,12,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x13,0x0, -0x16,0x80,0xc,0x80, -}; - -static const BitmapCharRec ch195 = {12,18,0,0,12,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x19,0x80, -0xf,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch194 = {12,18,0,0,12,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x6,0x0, -0x3,0x0,0x1,0x80, -}; - -static const BitmapCharRec ch193 = {12,18,0,0,12,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x6,0x0, -0xc,0x0,0x18,0x0, -}; - -static const BitmapCharRec ch192 = {12,18,0,0,12,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x7c,0xfe,0xc6,0xc6,0xe0,0x70,0x38,0x18,0x18,0x18,0x0,0x0,0x18,0x18, -}; - -static const BitmapCharRec ch191 = {7,14,-1,4,10,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x18,0x18,0x18,0x18,0xc,0xfc,0x6,0xd8,0x6,0x78,0x73,0x38,0xf9,0x18,0x99,0x88, -0x30,0xc0,0x30,0xc0,0x98,0x60,0xf8,0x30,0x70,0x30, -}; - -static const BitmapCharRec ch190 = {14,13,0,0,15,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x30,0xf8,0x30,0xf8,0x18,0x60,0xc,0x30,0xc,0x18,0x66,0x98,0x62,0xf8,0x63,0x70, -0x61,0x80,0x61,0x80,0xe0,0xc0,0xe0,0x60,0x60,0x60, -}; - -static const BitmapCharRec ch189 = {13,13,-1,0,15,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x30,0x30,0x30,0x30,0x19,0xf8,0xd,0xb0,0xc,0xf0,0x66,0x70,0x62,0x30,0x63,0x10, -0x61,0x80,0x61,0x80,0xe0,0xc0,0xe0,0x60,0x60,0x60, -}; - -static const BitmapCharRec ch188 = {13,13,-1,0,15,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0x90,0xd8,0x6c,0x36,0x36,0x6c,0xd8,0x90, -}; - -static const BitmapCharRec ch187 = {7,8,-1,-1,9,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xf8,0x0,0x70,0xd8,0x88,0x88,0xd8,0x70, -}; - -static const BitmapCharRec ch186 = {5,8,-1,-6,7,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0x60,0x60,0x60,0x60,0x60,0xe0,0xe0,0x60, -}; - -static const BitmapCharRec ch185 = {3,8,-1,-5,6,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0xf0,0xd8,0x18,0x70,0x60, -}; - -static const BitmapCharRec ch184 = {5,5,0,4,5,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch183 = {2,2,-1,-4,4,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x32,0x72,0xf2,0xf2,0xf2,0xf2, -0x72,0x3f, -}; - -static const BitmapCharRec ch182 = {8,18,-1,4,10,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0xc0,0xc0,0xc0,0xc0,0xdb,0xff,0xe7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3, -}; - -static const BitmapCharRec ch181 = {8,14,-1,4,10,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0xc0,0x60,0x30, -}; - -static const BitmapCharRec ch180 = {4,3,0,-11,4,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0x70,0xf8,0x98,0x30,0x30,0x98,0xf8,0x70, -}; - -static const BitmapCharRec ch179 = {5,8,0,-5,6,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xf8,0xf8,0x60,0x30,0x18,0x98,0xf8,0x70, -}; - -static const BitmapCharRec ch178 = {5,8,0,-5,6,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xff,0xff,0x0,0x18,0x18,0x18,0xff,0xff,0x18,0x18,0x18, -}; - -static const BitmapCharRec ch177 = {8,11,-1,0,10,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x70,0xd8,0x88,0xd8,0x70, -}; - -static const BitmapCharRec ch176 = {5,5,-1,-8,7,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xf8, -}; - -static const BitmapCharRec ch175 = {5,1,0,-12,5,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0xf,0x80,0x30,0x60,0x40,0x10,0x48,0x50,0x88,0x88,0x89,0x8,0x8f,0x88,0x88,0x48, -0x88,0x48,0x4f,0x90,0x40,0x10,0x30,0x60,0xf,0x80, -}; - -static const BitmapCharRec ch174 = {13,13,-1,0,14,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xf8,0xf8, -}; - -static const BitmapCharRec ch173 = {5,2,-1,-4,7,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x1,0x80,0x1,0x80,0x1,0x80,0xff,0x80,0xff,0x80, -}; - -static const BitmapCharRec ch172 = {9,5,-1,-3,11,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x12,0x36,0x6c,0xd8,0xd8,0x6c,0x36,0x12, -}; - -static const BitmapCharRec ch171 = {7,8,-1,-1,9,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0xf8,0x0,0x68,0xd8,0x48,0x38,0xc8,0x70, -}; - -static const BitmapCharRec ch170 = {5,8,-1,-6,7,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0xf,0x80,0x30,0x60,0x40,0x10,0x47,0x10,0x88,0x88,0x90,0x8,0x90,0x8,0x90,0x8, -0x88,0x88,0x47,0x10,0x40,0x10,0x30,0x60,0xf,0x80, -}; - -static const BitmapCharRec ch169 = {13,13,-1,0,15,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xd8,0xd8, -}; - -static const BitmapCharRec ch168 = {5,2,0,-11,6,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x3c,0x7e,0xc3,0xc3,0x7,0xe,0x3e,0x73,0xe3,0xc3,0xc7,0x6e,0x7c,0xf0,0xc3,0xc3, -0x7e,0x3c, -}; - -static const BitmapCharRec ch167 = {8,18,-1,4,10,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0, -}; - -static const BitmapCharRec ch166 = {2,17,-1,3,4,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0x18,0x18,0x18,0x18,0xff,0x18,0xff,0x3c,0x66,0x66,0x66,0xc3,0xc3, -}; - -static const BitmapCharRec ch165 = {8,13,-1,0,10,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0xc3,0xff,0x66,0x66,0x66,0xff,0xc3, -}; - -static const BitmapCharRec ch164 = {8,7,-1,-3,10,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xdf,0x0,0xff,0x80,0x60,0x80,0x30,0x0,0x18,0x0,0x18,0x0,0x7e,0x0,0x30,0x0, -0x60,0x0,0x61,0x80,0x61,0x80,0x3f,0x0,0x1e,0x0, -}; - -static const BitmapCharRec ch163 = {9,13,0,0,10,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x10,0x10,0x3e,0x7f,0x6b,0xc8,0xc8,0xc8,0xc8,0x6b,0x7f,0x3e,0x4,0x4, -}; - -static const BitmapCharRec ch162 = {8,14,-1,2,10,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x40,0x40,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch161 = {2,14,-2,4,6,ch161data}; - -/* char: 0xa0 */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,5,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,5,0}; -#endif - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0xcc,0x7e,0x33, -}; - -static const BitmapCharRec ch126 = {8,3,-1,-4,10,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0xc0,0x60,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0xc,0x18,0x30,0x30,0x30,0x30,0x30, -0x60,0xc0, -}; - -static const BitmapCharRec ch125 = {6,18,0,4,6,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0, -}; - -static const BitmapCharRec ch124 = {2,18,-1,4,4,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0xc,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x60,0xc0,0x60,0x30,0x30,0x30,0x30,0x30, -0x18,0xc, -}; - -static const BitmapCharRec ch123 = {6,18,0,4,6,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xfe,0xfe,0xc0,0x60,0x30,0x18,0xc,0x6,0xfe,0xfe, -}; - -static const BitmapCharRec ch122 = {7,10,-1,0,9,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3, -}; - -static const BitmapCharRec ch121 = {8,14,-1,4,10,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0xc3,0xe7,0x66,0x3c,0x18,0x18,0x3c,0x66,0xe7,0xc3, -}; - -static const BitmapCharRec ch120 = {8,10,-1,0,10,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x19,0x80,0x19,0x80,0x39,0xc0,0x29,0x40,0x69,0x60,0x66,0x60,0x66,0x60,0xc6,0x30, -0xc6,0x30,0xc6,0x30, -}; - -static const BitmapCharRec ch119 = {12,10,-1,0,14,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3, -}; - -static const BitmapCharRec ch118 = {8,10,-1,0,10,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3, -}; - -static const BitmapCharRec ch117 = {8,10,-1,0,10,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x18,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0xfc,0xfc,0x30,0x30,0x30, -}; - -static const BitmapCharRec ch116 = {6,13,0,0,6,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0x78,0xfc,0xc6,0x6,0x3e,0xfc,0xc0,0xc6,0x7e,0x3c, -}; - -static const BitmapCharRec ch115 = {7,10,-1,0,9,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xe0,0xd8,0xd8, -}; - -static const BitmapCharRec ch114 = {5,10,-1,0,6,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80, -0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x80,0x7f,0x80,0x3d,0x80, -}; - -static const BitmapCharRec ch113 = {9,14,-1,4,11,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80, -0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0,0xff,0x0,0xde,0x0, -}; - -static const BitmapCharRec ch112 = {9,14,-1,4,11,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0, -0x7f,0x0,0x3e,0x0, -}; - -static const BitmapCharRec ch111 = {9,10,-1,0,11,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce, -}; - -static const BitmapCharRec ch110 = {8,10,-1,0,10,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xe7,0x30, -0xde,0xf0,0xcc,0x60, -}; - -static const BitmapCharRec ch109 = {12,10,-1,0,14,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch108 = {2,14,-1,0,4,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0xc7,0xc6,0xce,0xcc,0xd8,0xf8,0xf0,0xd8,0xcc,0xc6,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch107 = {8,14,-1,0,9,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0xe0,0xf0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0x0, -0x30,0x30, -}; - -static const BitmapCharRec ch106 = {4,18,1,4,4,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch105 = {2,14,-1,0,4,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch104 = {8,14,-1,0,10,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x1c,0x0,0x7f,0x0,0x63,0x0,0x1,0x80,0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80, -0xc1,0x80,0xc1,0x80,0xc1,0x80,0x61,0x80,0x7f,0x80,0x3d,0x80, -}; - -static const BitmapCharRec ch103 = {9,14,-1,4,11,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfc,0xfc,0x30,0x30,0x3c,0x1c, -}; - -static const BitmapCharRec ch102 = {6,14,0,0,6,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c, -}; - -static const BitmapCharRec ch101 = {8,10,-1,0,10,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x80, -0x7f,0x80,0x3d,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80, -}; - -static const BitmapCharRec ch100 = {9,14,-1,0,11,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x3e,0x7f,0x63,0xc0,0xc0,0xc0,0xc0,0x63,0x7f,0x3e, -}; - -static const BitmapCharRec ch99 = {8,10,-1,0,10,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0, -0xff,0x0,0xde,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -}; - -static const BitmapCharRec ch98 = {9,14,-1,0,11,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c, -}; - -static const BitmapCharRec ch97 = {7,10,-1,0,9,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0xc0,0xc0,0x80,0x80,0x40, -}; - -static const BitmapCharRec ch96 = {2,5,-1,-9,4,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xff,0xc0,0xff,0xc0, -}; - -static const BitmapCharRec ch95 = {10,2,0,4,10,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x82,0xc6,0x6c,0x38,0x10, -}; - -static const BitmapCharRec ch94 = {7,5,-1,-8,9,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xf0,0xf0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0xf0,0xf0, -}; - -static const BitmapCharRec ch93 = {4,18,0,4,5,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x18,0x18,0x10,0x10,0x30,0x30,0x20,0x20,0x60,0x60,0x40,0x40,0xc0,0xc0, -}; - -static const BitmapCharRec ch92 = {5,14,0,0,5,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xf0,0xf0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xf0,0xf0, -}; - -static const BitmapCharRec ch91 = {4,18,-1,4,5,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xff,0xc0,0xff,0xc0,0xc0,0x0,0x60,0x0,0x30,0x0,0x18,0x0,0x1c,0x0,0xc,0x0, -0x6,0x0,0x3,0x0,0x1,0x80,0x0,0xc0,0xff,0xc0,0xff,0xc0, -}; - -static const BitmapCharRec ch90 = {10,14,-1,0,12,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80, -0x30,0xc0,0x30,0xc0,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30, -}; - -static const BitmapCharRec ch89 = {12,14,-1,0,14,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0xc0,0x60,0xe0,0xe0,0x60,0xc0,0x71,0xc0,0x31,0x80,0x1b,0x0,0xe,0x0,0xe,0x0, -0x1b,0x0,0x31,0x80,0x71,0xc0,0x60,0xc0,0xe0,0xe0,0xc0,0x60, -}; - -static const BitmapCharRec ch88 = {11,14,-1,0,13,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x18,0x18,0x18,0x18,0x1c,0x38,0x34,0x2c,0x36,0x6c,0x36,0x6c,0x66,0x66,0x66,0x66, -0x62,0x46,0x63,0xc6,0xc3,0xc3,0xc1,0x83,0xc1,0x83,0xc1,0x83, -}; - -static const BitmapCharRec ch87 = {16,14,-1,0,18,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x6,0x0,0xf,0x0,0xf,0x0,0x19,0x80,0x19,0x80,0x19,0x80,0x30,0xc0,0x30,0xc0, -0x30,0xc0,0x60,0x60,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30, -}; - -static const BitmapCharRec ch86 = {12,14,-1,0,14,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -}; - -static const BitmapCharRec ch85 = {11,14,-1,0,13,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0, -0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xff,0xc0,0xff,0xc0, -}; - -static const BitmapCharRec ch84 = {10,14,-1,0,12,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x3f,0x0,0x7f,0xc0,0xe0,0xe0,0xc0,0x60,0x0,0x60,0x0,0xe0,0x3,0xc0,0x1f,0x0, -0x7c,0x0,0xe0,0x0,0xc0,0x60,0xe0,0xe0,0x7f,0xc0,0x1f,0x0, -}; - -static const BitmapCharRec ch83 = {11,14,-1,0,13,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0x80,0xc1,0x80,0xff,0x0,0xff,0x80, -0xc1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0, -}; - -static const BitmapCharRec ch82 = {10,14,-1,0,12,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x0,0x30,0xf,0xb0,0x3f,0xe0,0x70,0xf0,0x61,0xb0,0xe1,0xb8,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80, -}; - -static const BitmapCharRec ch81 = {13,15,-1,1,15,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x80, -0xc1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0, -}; - -static const BitmapCharRec ch80 = {10,14,-1,0,12,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18, -0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80, -}; - -static const BitmapCharRec ch79 = {13,14,-1,0,15,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0xc0,0x60,0xc0,0xe0,0xc1,0xe0,0xc1,0xe0,0xc3,0x60,0xc6,0x60,0xc6,0x60,0xcc,0x60, -0xcc,0x60,0xd8,0x60,0xf0,0x60,0xf0,0x60,0xe0,0x60,0xc0,0x60, -}; - -static const BitmapCharRec ch78 = {11,14,-1,0,13,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0xc3,0xc,0xc3,0xc,0xc7,0x8c,0xc4,0x8c,0xcc,0xcc,0xcc,0xcc,0xd8,0x6c,0xd8,0x6c, -0xf0,0x3c,0xf0,0x3c,0xe0,0x1c,0xe0,0x1c,0xc0,0xc,0xc0,0xc, -}; - -static const BitmapCharRec ch77 = {14,14,-1,0,16,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xff,0xff,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch76 = {8,14,-1,0,10,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0xc0,0x70,0xc0,0xe0,0xc1,0xc0,0xc3,0x80,0xc7,0x0,0xce,0x0,0xfc,0x0,0xf8,0x0, -0xdc,0x0,0xce,0x0,0xc7,0x0,0xc3,0x80,0xc1,0xc0,0xc0,0xe0, -}; - -static const BitmapCharRec ch75 = {12,14,-1,0,13,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x3c,0x7e,0xe7,0xc3,0xc3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3, -}; - -static const BitmapCharRec ch74 = {8,14,-1,0,10,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch73 = {2,14,-2,0,6,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xff,0xe0,0xff,0xe0, -0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -}; - -static const BitmapCharRec ch72 = {11,14,-1,0,13,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0xf,0xb0,0x3f,0xf0,0x70,0x70,0x60,0x30,0xe0,0x30,0xc1,0xf0,0xc1,0xf0,0xc0,0x0, -0xc0,0x0,0xe0,0x30,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80, -}; - -static const BitmapCharRec ch71 = {12,14,-1,0,14,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80, -}; - -static const BitmapCharRec ch70 = {9,14,-1,0,11,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80, -}; - -static const BitmapCharRec ch69 = {9,14,-1,0,11,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xff,0x0,0xff,0x80,0xc1,0xc0,0xc0,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60, -0xc0,0x60,0xc0,0x60,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0, -}; - -static const BitmapCharRec ch68 = {11,14,-1,0,13,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -0xc0,0x0,0xe0,0x0,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80, -}; - -static const BitmapCharRec ch67 = {12,14,-1,0,14,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xff,0x80,0xff,0xc0,0xc0,0xe0,0xc0,0x60,0xc0,0x60,0xc0,0xe0,0xff,0xc0,0xff,0x80, -0xc1,0x80,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0, -}; - -static const BitmapCharRec ch66 = {11,14,-1,0,13,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0, -0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch65 = {12,14,0,0,12,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x7,0xe0,0x1f,0xf0,0x38,0x0,0x70,0x0,0x67,0x70,0xcf,0xf8,0xcc,0xcc,0xcc,0x66, -0xcc,0x66,0xcc,0x63,0xc6,0x33,0x67,0x73,0x63,0xb3,0x30,0x6,0x1c,0xe,0xf,0xfc, -0x3,0xf0, -}; - -static const BitmapCharRec ch64 = {16,17,-1,3,18,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x30,0x30,0x0,0x0,0x30,0x30,0x30,0x38,0x1c,0xe,0xc6,0xc6,0xfe,0x7c, -}; - -static const BitmapCharRec ch63 = {7,14,-1,0,10,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0xc0,0xf0,0x3c,0xe,0x3,0xe,0x3c,0xf0,0xc0, -}; - -static const BitmapCharRec ch62 = {8,9,-1,0,10,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xfe,0xfe,0x0,0x0,0xfe,0xfe, -}; - -static const BitmapCharRec ch61 = {7,6,-2,-2,11,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x3,0xf,0x3c,0x70,0xc0,0x70,0x3c,0xf,0x3, -}; - -static const BitmapCharRec ch60 = {8,9,-1,0,10,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0x80,0x40,0x40,0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch59 = {2,13,-1,3,5,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch58 = {2,10,-1,0,5,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0x7c,0xfe,0xc6,0x3,0x3,0x3b,0x7f,0xc3,0xc3,0xc3,0xc7,0x7e,0x3c, -}; - -static const BitmapCharRec ch57 = {8,13,-1,0,10,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x3c,0x7e,0xe7,0xc3,0xc3,0x66,0x7e,0x66,0xc3,0xc3,0xe7,0x7e,0x3c, -}; - -static const BitmapCharRec ch56 = {8,13,-1,0,10,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x60,0x60,0x30,0x30,0x30,0x18,0x18,0xc,0xc,0x6,0x3,0xff,0xff, -}; - -static const BitmapCharRec ch55 = {8,13,-1,0,10,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x3c,0x7e,0xe3,0xc3,0xc3,0xc3,0xfe,0xdc,0xc0,0xc0,0x63,0x7f,0x3c, -}; - -static const BitmapCharRec ch54 = {8,13,-1,0,10,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x7c,0xfe,0xc7,0xc3,0x3,0x3,0xc7,0xfe,0xfc,0xc0,0xc0,0xfe,0xfe, -}; - -static const BitmapCharRec ch53 = {8,13,-1,0,10,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x3,0x0,0x3,0x0,0x3,0x0,0xff,0x80,0xff,0x80,0xc3,0x0,0x63,0x0,0x33,0x0, -0x33,0x0,0x1b,0x0,0xf,0x0,0x7,0x0,0x3,0x0, -}; - -static const BitmapCharRec ch52 = {9,13,-1,0,10,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x3c,0x7e,0xc7,0xc3,0x3,0x7,0x1e,0x1c,0x6,0xc3,0xc3,0x7e,0x3c, -}; - -static const BitmapCharRec ch51 = {8,13,-1,0,10,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xff,0xff,0xc0,0xe0,0x70,0x38,0x1c,0xe,0x7,0x3,0xc3,0xfe,0x3c, -}; - -static const BitmapCharRec ch50 = {8,13,-1,0,10,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0xf8,0x18, -}; - -static const BitmapCharRec ch49 = {5,13,-2,0,10,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x3c,0x7e,0x66,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x66,0x7e,0x3c, -}; - -static const BitmapCharRec ch48 = {8,13,-1,0,10,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0xc0,0xc0,0x40,0x40,0x60,0x60,0x20,0x20,0x30,0x30,0x10,0x10,0x18,0x18, -}; - -static const BitmapCharRec ch47 = {5,14,0,0,5,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch46 = {2,2,-1,0,5,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xff,0xff, -}; - -static const BitmapCharRec ch45 = {8,2,-1,-4,11,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0x80,0x40,0x40,0xc0,0xc0, -}; - -static const BitmapCharRec ch44 = {2,5,-1,3,5,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x18,0x18,0x18,0x18,0xff,0xff,0x18,0x18,0x18,0x18, -}; - -static const BitmapCharRec ch43 = {8,10,-1,0,10,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0x88,0x70,0x70,0xf8,0x20,0x20, -}; - -static const BitmapCharRec ch42 = {5,6,-1,-8,7,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0xc0,0x60,0x60,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x60,0x60, -0xc0,0x80, -}; - -static const BitmapCharRec ch41 = {4,18,-1,4,6,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x10,0x30,0x60,0x60,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x60,0x60, -0x30,0x10, -}; - -static const BitmapCharRec ch40 = {4,18,-1,4,6,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0x80,0x40,0x40,0xc0,0xc0, -}; - -static const BitmapCharRec ch39 = {2,5,-1,-9,4,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x3c,0x70,0x7e,0xe0,0xe7,0xc0,0xc3,0x80,0xc3,0xc0,0xc6,0xc0,0xee,0xc0,0x7c,0x0, -0x3c,0x0,0x66,0x0,0x66,0x0,0x7e,0x0,0x3c,0x0, -}; - -static const BitmapCharRec ch38 = {12,13,-1,0,13,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x18,0x78,0x18,0xfc,0xc,0xcc,0xc,0xcc,0x6,0xfc,0x6,0x78,0x3,0x0,0x7b,0x0, -0xfd,0x80,0xcd,0x80,0xcc,0xc0,0xfc,0xc0,0x78,0x60, -}; - -static const BitmapCharRec ch37 = {14,13,-1,0,16,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x8,0x0,0x8,0x0,0x3e,0x0,0x7f,0x0,0xeb,0x80,0xc9,0x80,0x9,0x80,0xf,0x0, -0x3e,0x0,0x78,0x0,0xe8,0x0,0xc8,0x0,0xcb,0x0,0x7f,0x0,0x3e,0x0,0x8,0x0, -}; - -static const BitmapCharRec ch36 = {9,16,-1,2,10,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x24,0x0,0x24,0x0,0x24,0x0,0xff,0x80,0xff,0x80,0x12,0x0,0x12,0x0,0x12,0x0, -0x7f,0xc0,0x7f,0xc0,0x9,0x0,0x9,0x0,0x9,0x0, -}; - -static const BitmapCharRec ch35 = {10,13,0,0,10,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0x90,0x90,0xd8,0xd8,0xd8, -}; - -static const BitmapCharRec ch34 = {5,5,0,-9,5,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0xc0,0xc0,0x0,0x0,0x80,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -}; - -static const BitmapCharRec ch33 = {2,14,-2,0,6,ch33data}; - -/* char: 0x20 ' ' */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,5,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,5,0}; -#endif - -static const BitmapCharRec * const chars[] = { -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -#if !defined(__IBMCPP__) -const -#endif -BitmapFontRec glutBitmapHelvetica18 = { -"-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1", -224, -32, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_init.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_init.cpp deleted file mode 100644 index da5d0735e2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_init.cpp +++ /dev/null @@ -1,451 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#ifdef __VMS -#include -#endif - -#include -#include -#include - -#if !defined(_WIN32) && !defined(__OS2__) - #include - #include -#endif - -/* SGI optimization introduced in IRIX 6.3 to avoid X server - round trips for interning common X atoms. */ -#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS) -#include -#else -#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how) -#endif - -#include "glutint.h" - -/* GLUT inter-file variables */ -/* *INDENT-OFF* */ -char *__glutProgramName = NULL; -int __glutArgc = 0; -char **__glutArgv = NULL; -char *__glutGeometry = NULL; -Display *__glutDisplay = NULL; -int __glutScreen; -Window __glutRoot; -int __glutScreenHeight; -int __glutScreenWidth; -GLboolean __glutIconic = GL_FALSE; -GLboolean __glutDebug = GL_FALSE; -unsigned int __glutDisplayMode = - GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH; -char *__glutDisplayString = NULL; -int __glutConnectionFD; -XSizeHints __glutSizeHints = {0}; -int __glutInitWidth = 300, __glutInitHeight = 300; -int __glutInitX = -1, __glutInitY = -1; -GLboolean __glutForceDirect = GL_FALSE, - __glutTryDirect = GL_TRUE; -Atom __glutWMDeleteWindow; -/* *INDENT-ON* */ - -#ifdef _WIN32 -void (__cdecl *__glutExitFunc)(int retval) = NULL; -#endif - -static Bool synchronize = False; - -#if defined(__OS2__) - -MRESULT EXPENTRY GlutWindowProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 ); -MRESULT EXPENTRY GlutWindowChildProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 ); - - -void __glutOpenOS2Connection(char* display) -{ - static char *classname=NULL; -extern HAB hab; /* PM anchor block handle */ -ERRORID erridErrorCode;/* last error id code */ -int ii; - - /* Make sure we register the window only once. */ - if(classname) - return; - - classname = "GLUT"; - - if ( !WinRegisterClass( hab, /* PM anchor block handle */ - classname,/* window class name */ - GlutWindowProc,/* address of window procedure*/ - CS_SIZEREDRAW, /* |CS_SYNCPAINT size changes cause redrawing */ - 0UL ) ) /* window data */ - { erridErrorCode = WinGetLastError(hab); - ii = erridErrorCode; - return; - } - - classname = "GLUTCHILD"; - - if ( !WinRegisterClass( hab, /* PM anchor block handle */ - classname,/* window class name */ - GlutWindowChildProc,/* address of window procedure*/ - CS_SIZEREDRAW, /* size changes cause redrawing */ - 0UL ) ) /* window data */ - { erridErrorCode = WinGetLastError(hab); - ii = erridErrorCode; - return; - } - - __glutScreenWidth = GetSystemMetrics(SM_CXSCREEN); - __glutScreenHeight = GetSystemMetrics(SM_CYSCREEN); - - /* Set the root window to NULL because windows creates a top-level - window when the parent is NULL. X creates a top-level window - when the parent is the root window. */ - __glutRoot = NULLHANDLE; - - /* Set the display to 1 -- we shouldn't be using this anywhere - (except as an argument to X calls). */ - __glutDisplay = (Display*)1; - - /* There isn't any concept of multiple screens in Win32, therefore, - we don't need to keep track of the screen we're on... it's always - the same one. */ - __glutScreen = 0; -} - -#elif defined(_WIN32) - -#ifdef __BORLANDC__ -#include /* For masking floating point exceptions. */ -#endif - -void -__glutOpenWin32Connection(char* display) -{ - static char *classname; - WNDCLASS wc; - HINSTANCE hInstance = GetModuleHandle(NULL); - - /* Make sure we register the window only once. */ - if(classname) - return; - -#ifdef __BORLANDC__ - /* Under certain conditions (e.g. while rendering solid surfaces with - lighting enabled) Microsoft OpenGL libraries cause some illegal - operations like floating point overflow or division by zero. The - default behaviour of Microsoft compilers is to mask (ignore) - floating point exceptions, while Borland compilers do not. The - following function of Borland RTL allows to mask exceptions. - Advice from Pier Giorgio Esposito (mc2172@mclink.it). */ - _control87(MCW_EM,MCW_EM); -#endif - - classname = "GLUT"; - - /* Clear (important!) and then fill in the window class structure. */ - memset(&wc, 0, sizeof(WNDCLASS)); - wc.style = CS_OWNDC; - wc.lpfnWndProc = (WNDPROC)__glutWindowProc; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(hInstance, "GLUT_ICON"); - wc.hCursor = LoadCursor(hInstance, IDC_ARROW); - wc.hbrBackground = NULL; - wc.lpszMenuName = NULL; - wc.lpszClassName = classname; - - /* Fill in a default icon if one isn't specified as a resource. */ - if(!wc.hIcon) - wc.hIcon = LoadIcon(NULL, IDI_WINLOGO); - - if(!RegisterClass(&wc)) { - __glutFatalError("RegisterClass() failed:" - "Cannot register GLUT window class."); - } - - __glutScreenWidth = GetSystemMetrics(SM_CXSCREEN); - __glutScreenHeight = GetSystemMetrics(SM_CYSCREEN); - - /* Set the root window to NULL because windows creates a top-level - window when the parent is NULL. X creates a top-level window - when the parent is the root window. */ - __glutRoot = NULL; - - /* Set the display to 1 -- we shouldn't be using this anywhere - (except as an argument to X calls). */ - __glutDisplay = (Display*)1; - - /* There isn't any concept of multiple screens in Win32, therefore, - we don't need to keep track of the screen we're on... it's always - the same one. */ - __glutScreen = 0; -} -#else /* !_WIN32 */ -void -__glutOpenXConnection(char *display) -{ - int errorBase, eventBase; - - __glutDisplay = XOpenDisplay(display); - if (!__glutDisplay) - __glutFatalError("could not open display: %s", - XDisplayName(display)); - if (synchronize) - XSynchronize(__glutDisplay, True); - if (!glXQueryExtension(__glutDisplay, &errorBase, &eventBase)) - __glutFatalError( - "OpenGL GLX extension not supported by display: %s", - XDisplayName(display)); - __glutScreen = DefaultScreen(__glutDisplay); - __glutRoot = RootWindow(__glutDisplay, __glutScreen); - __glutScreenWidth = DisplayWidth(__glutDisplay, __glutScreen); - __glutScreenHeight = DisplayHeight(__glutDisplay, - __glutScreen); - __glutConnectionFD = ConnectionNumber(__glutDisplay); - __glutWMDeleteWindow = XSGIFastInternAtom(__glutDisplay, - "WM_DELETE_WINDOW", SGI_XA_WM_DELETE_WINDOW, False); -} -#endif /* _WIN32 */ - -void -#ifdef OLD_VMS - __glutInitTime(struct timeval6 *beginning) -#else - __glutInitTime(struct timeval *beginning) -#endif -{ - static int beenhere = 0; -#ifdef OLD_VMS - static struct timeval6 genesis; -#else - static struct timeval genesis; -#endif - - if (!beenhere) { - GETTIMEOFDAY(&genesis); - beenhere = 1; - } - *beginning = genesis; -} - -static void -removeArgs(int *argcp, char **argv, int numToRemove) -{ - int i, j; - - for (i = 0, j = numToRemove; argv[j]; i++, j++) { - argv[i] = argv[j]; - } - argv[i] = NULL; - *argcp -= numToRemove; -} - -void GLUTAPIENTRY -glutInit(int *argcp, char **argv) -{ - char *display = NULL; - char *str, *geometry = NULL; -#ifdef OLD_VMS - struct timeval6 unused; -#else - struct timeval unused; -#endif - int i; - - if (__glutDisplay) { - __glutWarning("glutInit being called a second time."); - return; - } - /* Determine temporary program name. */ - str = strrchr(argv[0], '/'); - if (str == NULL) { - __glutProgramName = argv[0]; - } else { - __glutProgramName = str + 1; - } - - /* Make private copy of command line arguments. */ - __glutArgc = *argcp; - __glutArgv = (char **) malloc(__glutArgc * sizeof(char *)); - if (!__glutArgv) - __glutFatalError("out of memory."); - for (i = 0; i < __glutArgc; i++) { - __glutArgv[i] = __glutStrdup(argv[i]); - if (!__glutArgv[i]) - __glutFatalError("out of memory."); - } - - /* determine permanent program name */ - str = strrchr(__glutArgv[0], '/'); - if (str == NULL) { - __glutProgramName = __glutArgv[0]; - } else { - __glutProgramName = str + 1; - } - - /* parse arguments for standard options */ - for (i = 1; i < __glutArgc; i++) { - if (!strcmp(__glutArgv[i], "-display")) { -#if defined(_WIN32) - __glutWarning("-display option not supported by Win32 GLUT."); -#endif - if (++i >= __glutArgc) { - __glutFatalError( - "follow -display option with X display name."); - } - display = __glutArgv[i]; - removeArgs(argcp, &argv[1], 2); - } else if (!strcmp(__glutArgv[i], "-geometry")) { - if (++i >= __glutArgc) { - __glutFatalError( - "follow -geometry option with geometry parameter."); - } - geometry = __glutArgv[i]; - removeArgs(argcp, &argv[1], 2); - } else if (!strcmp(__glutArgv[i], "-direct")) { -#if defined(_WIN32) - __glutWarning("-direct option not supported by Win32 GLUT."); -#endif - if (!__glutTryDirect) - __glutFatalError( - "cannot force both direct and indirect rendering."); - __glutForceDirect = GL_TRUE; - removeArgs(argcp, &argv[1], 1); - } else if (!strcmp(__glutArgv[i], "-indirect")) { -#if defined(_WIN32) - __glutWarning("-indirect option not supported by Win32 GLUT."); -#endif - if (__glutForceDirect) - __glutFatalError( - "cannot force both direct and indirect rendering."); - __glutTryDirect = GL_FALSE; - removeArgs(argcp, &argv[1], 1); - } else if (!strcmp(__glutArgv[i], "-iconic")) { - __glutIconic = GL_TRUE; - removeArgs(argcp, &argv[1], 1); - } else if (!strcmp(__glutArgv[i], "-gldebug")) { - __glutDebug = GL_TRUE; - removeArgs(argcp, &argv[1], 1); - } else if (!strcmp(__glutArgv[i], "-sync")) { -#if defined(_WIN32) - __glutWarning("-sync option not supported by Win32 GLUT."); -#endif - synchronize = GL_TRUE; - removeArgs(argcp, &argv[1], 1); - } else { - /* Once unknown option encountered, stop command line - processing. */ - break; - } - } -#if defined(__OS2__) - __glutOpenOS2Connection(display); -#elif defined(_WIN32) - __glutOpenWin32Connection(display); -#else - __glutOpenXConnection(display); -#endif - if (geometry) { - int flags, x, y, width, height; - - /* Fix bogus "{width|height} may be used before set" - warning */ - width = 0; - height = 0; - - flags = XParseGeometry(geometry, &x, &y, - (unsigned int *) &width, (unsigned int *) &height); - if (WidthValue & flags) { - /* Careful because X does not allow zero or negative - width windows */ - if (width > 0) - __glutInitWidth = width; - } - if (HeightValue & flags) { - /* Careful because X does not allow zero or negative - height windows */ - if (height > 0) - __glutInitHeight = height; - } - glutInitWindowSize(__glutInitWidth, __glutInitHeight); - if (XValue & flags) { - if (XNegative & flags) - x = DisplayWidth(__glutDisplay, __glutScreen) + - x - __glutSizeHints.width; - /* Play safe: reject negative X locations */ - if (x >= 0) - __glutInitX = x; - } - if (YValue & flags) { - if (YNegative & flags) - y = DisplayHeight(__glutDisplay, __glutScreen) + - y - __glutSizeHints.height; - /* Play safe: reject negative Y locations */ - if (y >= 0) - __glutInitY = y; - } - glutInitWindowPosition(__glutInitX, __glutInitY); - } - __glutInitTime(&unused); - - /* check if GLUT_FPS env var is set */ - { - const char *fps = getenv("GLUT_FPS"); - if (fps) { - sscanf(fps, "%d", &__glutFPS); - if (__glutFPS <= 0) - __glutFPS = 5000; /* 5000 milliseconds */ - } - } -} - -#ifdef _WIN32 -void APIENTRY -__glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int)) -{ - __glutExitFunc = exitfunc; - glutInit(argcp, argv); -} -#endif - -/* CENTRY */ -void GLUTAPIENTRY -glutInitWindowPosition(int x, int y) -{ - __glutInitX = x; - __glutInitY = y; - if (x >= 0 && y >= 0) { - __glutSizeHints.x = x; - __glutSizeHints.y = y; - __glutSizeHints.flags |= USPosition; - } else { - __glutSizeHints.flags &= ~USPosition; - } -} - -void GLUTAPIENTRY -glutInitWindowSize(int width, int height) -{ - __glutInitWidth = width; - __glutInitHeight = height; - if (width > 0 && height > 0) { - __glutSizeHints.width = width; - __glutSizeHints.height = height; - __glutSizeHints.flags |= USSize; - } else { - __glutSizeHints.flags &= ~USSize; - } -} - -void GLUTAPIENTRY -glutInitDisplayMode(unsigned int mask) -{ - __glutDisplayMode = mask; -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_input.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_input.cpp deleted file mode 100644 index c517fe1249..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_input.cpp +++ /dev/null @@ -1,628 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include -#include -#include - -#include "glutint.h" -#define POFIG 0 -#if POFIG - -int __glutNumDials = 0; -int __glutNumSpaceballButtons = 0; -int __glutNumButtonBoxButtons = 0; -int __glutNumTabletButtons = 0; -int __glutNumMouseButtons = 3; /* Good guess. */ -XDevice *__glutTablet = NULL; -XDevice *__glutDials = NULL; -XDevice *__glutSpaceball = NULL; - -int __glutHasJoystick = 0; -int __glutNumJoystickButtons = 0; -int __glutNumJoystickAxes = 0; - -#if !defined(_WIN32) -typedef struct _Range { - int min; - int range; -} Range; - -#define NUM_SPACEBALL_AXIS 6 -#define NUM_TABLET_AXIS 2 -#define NUM_DIALS_AXIS 8 - -Range __glutSpaceballRange[NUM_SPACEBALL_AXIS]; -Range __glutTabletRange[NUM_TABLET_AXIS]; -int *__glutDialsResolution; - -/* Safely assumes 0 is an illegal event type for X Input - extension events. */ -int __glutDeviceMotionNotify = 0; -int __glutDeviceButtonPress = 0; -int __glutDeviceButtonPressGrab = 0; -int __glutDeviceButtonRelease = 0; -int __glutDeviceStateNotify = 0; - -static int -normalizeTabletPos(int axis, int rawValue) -{ - assert(rawValue >= __glutTabletRange[axis].min); - assert(rawValue <= __glutTabletRange[axis].min - + __glutTabletRange[axis].range); - /* Normalize rawValue to between 0 and 4000. */ - return ((rawValue - __glutTabletRange[axis].min) * 4000) / - __glutTabletRange[axis].range; -} - -static int -normalizeDialAngle(int axis, int rawValue) -{ - /* XXX Assumption made that the resolution of the device is - number of clicks for one complete dial revolution. This - is true for SGI's dial & button box. */ - return (rawValue * 360.0) / __glutDialsResolution[axis]; -} - -static int -normalizeSpaceballAngle(int axis, int rawValue) -{ - assert(rawValue >= __glutSpaceballRange[axis].min); - assert(rawValue <= __glutSpaceballRange[axis].min + - __glutSpaceballRange[axis].range); - /* Normalize rawValue to between -1800 and 1800. */ - return ((rawValue - __glutSpaceballRange[axis].min) * 3600) / - __glutSpaceballRange[axis].range - 1800; -} - -static int -normalizeSpaceballDelta(int axis, int rawValue) -{ - assert(rawValue >= __glutSpaceballRange[axis].min); - assert(rawValue <= __glutSpaceballRange[axis].min + - __glutSpaceballRange[axis].range); - /* Normalize rawValue to between -1000 and 1000. */ - return ((rawValue - __glutSpaceballRange[axis].min) * 2000) / - __glutSpaceballRange[axis].range - 1000; -} - -static void -queryTabletPos(GLUTwindow * window) -{ - XDeviceState *state; - XInputClass *any; - XValuatorState *v; - int i; - - state = XQueryDeviceState(__glutDisplay, __glutTablet); - any = state->data; - for (i = 0; i < state->num_classes; i++) { -#if defined(__cplusplus) || defined(c_plusplus) - switch (any->c_class) { -#else - switch (any->class) { -#endif - case ValuatorClass: - v = (XValuatorState *) any; - if (v->num_valuators < 2) - goto end; - if (window->tabletPos[0] == -1) - window->tabletPos[0] = normalizeTabletPos(0, v->valuators[0]); - if (window->tabletPos[1] == -1) - window->tabletPos[1] = normalizeTabletPos(1, v->valuators[1]); - } - any = (XInputClass *) ((char *) any + any->length); - } -end: - XFreeDeviceState(state); -} - -static void -tabletPosChange(GLUTwindow * window, int first, int count, int *data) -{ - int i, value, genEvent = 0; - - for (i = first; i < first + count; i++) { - switch (i) { - case 0: /* X axis */ - case 1: /* Y axis */ - value = normalizeTabletPos(i, data[i - first]); - if (value != window->tabletPos[i]) { - window->tabletPos[i] = value; - genEvent = 1; - } - break; - } - } - if (window->tabletPos[0] == -1 || window->tabletPos[1] == -1) - queryTabletPos(window); - if (genEvent) - window->tabletMotion(window->tabletPos[0], window->tabletPos[1]); -} -#endif /* !_WIN32 */ - -static int -__glutProcessDeviceEvents(XEvent * event) -{ -#if !defined(_WIN32) - GLUTwindow *window; - - /* XXX Ugly code fan out. */ - - /* Can't use switch/case since X Input event types are - dynamic. */ - - if (__glutDeviceMotionNotify && event->type == __glutDeviceMotionNotify) { - XDeviceMotionEvent *devmot = (XDeviceMotionEvent *) event; - - window = __glutGetWindow(devmot->window); - if (window) { - if (__glutTablet - && devmot->deviceid == __glutTablet->device_id - && window->tabletMotion) { - tabletPosChange(window, devmot->first_axis, devmot->axes_count, - devmot->axis_data); - } else if (__glutDials - && devmot->deviceid == __glutDials->device_id - && window->dials) { - int i, first = devmot->first_axis, count = devmot->axes_count; - - for (i = first; i < first + count; i++) - window->dials(i + 1, - normalizeDialAngle(i, devmot->axis_data[i - first])); - } else if (__glutSpaceball - && devmot->deviceid == __glutSpaceball->device_id) { - /* XXX Assume that space ball motion events come in as - all the first 6 axes. Assume first 3 axes are XYZ - translations; second 3 axes are XYZ rotations. */ - if (devmot->first_axis == 0 && devmot->axes_count == 6) { - if (window->spaceMotion) - window->spaceMotion( - normalizeSpaceballDelta(0, devmot->axis_data[0]), - normalizeSpaceballDelta(1, devmot->axis_data[1]), - normalizeSpaceballDelta(2, devmot->axis_data[2])); - if (window->spaceRotate) - window->spaceRotate( - normalizeSpaceballAngle(3, devmot->axis_data[3]), - normalizeSpaceballAngle(4, devmot->axis_data[4]), - normalizeSpaceballAngle(5, devmot->axis_data[5])); - } - } - return 1; - } - } else if (__glutDeviceButtonPress - && event->type == __glutDeviceButtonPress) { - XDeviceButtonEvent *devbtn = (XDeviceButtonEvent *) event; - - window = __glutGetWindow(devbtn->window); - if (window) { - if (__glutTablet - && devbtn->deviceid == __glutTablet->device_id - && window->tabletButton - && devbtn->first_axis == 0 - && devbtn->axes_count == 2) { - tabletPosChange(window, devbtn->first_axis, devbtn->axes_count, - devbtn->axis_data); - window->tabletButton(devbtn->button, GLUT_DOWN, - window->tabletPos[0], window->tabletPos[1]); - } else if (__glutDials - && devbtn->deviceid == __glutDials->device_id - && window->buttonBox) { - window->buttonBox(devbtn->button, GLUT_DOWN); - } else if (__glutSpaceball - && devbtn->deviceid == __glutSpaceball->device_id - && window->spaceButton) { - window->spaceButton(devbtn->button, GLUT_DOWN); - } - return 1; - } - } else if (__glutDeviceButtonRelease - && event->type == __glutDeviceButtonRelease) { - XDeviceButtonEvent *devbtn = (XDeviceButtonEvent *) event; - - window = __glutGetWindow(devbtn->window); - if (window) { - if (__glutTablet - && devbtn->deviceid == __glutTablet->device_id - && window->tabletButton - && devbtn->first_axis == 0 - && devbtn->axes_count == 2) { - tabletPosChange(window, devbtn->first_axis, devbtn->axes_count, - devbtn->axis_data); - window->tabletButton(devbtn->button, GLUT_UP, - window->tabletPos[0], window->tabletPos[1]); - } else if (__glutDials - && devbtn->deviceid == __glutDials->device_id - && window->buttonBox) { - window->buttonBox(devbtn->button, GLUT_UP); - } else if (__glutSpaceball - && devbtn->deviceid == __glutSpaceball->device_id - && window->spaceButton) { - window->spaceButton(devbtn->button, GLUT_UP); - } - return 1; - } - } -#else - { - JOYINFOEX info; - JOYCAPS joyCaps; - - memset(&info, 0, sizeof(JOYINFOEX)); - info.dwSize = sizeof(JOYINFOEX); - info.dwFlags = JOY_RETURNALL; - - if (joyGetPosEx(JOYSTICKID1,&info) != JOYERR_NOERROR) { - __glutHasJoystick = 1; - joyGetDevCaps(JOYSTICKID1, &joyCaps, sizeof(joyCaps)); - __glutNumJoystickButtons = joyCaps.wNumButtons; - __glutNumJoystickAxes = joyCaps.wNumAxes; - } else { - __glutHasJoystick = 0; - __glutNumJoystickButtons = 0; - __glutNumJoystickAxes = 0; - } - } -#endif /* !_WIN32 */ - return 0; -} - -static GLUTeventParser eventParser = -{__glutProcessDeviceEvents, NULL}; - -static void -addDeviceEventParser(void) -{ - static Bool been_here = False; - - if (been_here) - return; - been_here = True; - __glutRegisterEventParser(&eventParser); -} - -static int -probeDevices(void) -{ - static Bool been_here = False; - static int support; -#if !defined(_WIN32) - XExtensionVersion *version; - XDeviceInfoPtr device_info, device; - XAnyClassPtr any; - XButtonInfoPtr b; - XValuatorInfoPtr v; - XAxisInfoPtr a; - int num_dev = 0, btns = 0, dials = 0; - int i, j, k; -#endif /* !_WIN32 */ - - if (been_here) { - return support; - } - been_here = True; - -#if !defined(_WIN32) - version = XGetExtensionVersion(__glutDisplay, "XInputExtension"); - /* Ugh. XInput extension API forces annoying cast of a pointer - to a long so it can be compared with the NoSuchExtension - value (#defined to 1). */ - if (version == NULL || ((long) version) == NoSuchExtension) { - support = 0; - return support; - } - XFree(version); - device_info = XListInputDevices(__glutDisplay, &num_dev); - if (device_info) { - for (i = 0; i < num_dev; i++) { - /* XXX These are SGI names for these devices; - unfortunately, no good standard exists for standard - types of X input extension devices. */ - - device = &device_info[i]; - any = (XAnyClassPtr) device->inputclassinfo; - - if (!__glutSpaceball && !strcmp(device->name, "spaceball")) { - v = NULL; - b = NULL; - for (j = 0; j < device->num_classes; j++) { -#if defined(__cplusplus) || defined(c_plusplus) - switch (any->c_class) { -#else - switch (any->class) { -#endif - case ButtonClass: - b = (XButtonInfoPtr) any; - btns = b->num_buttons; - break; - case ValuatorClass: - v = (XValuatorInfoPtr) any; - /* Sanity check: at least 6 valuators? */ - if (v->num_axes < NUM_SPACEBALL_AXIS) - goto skip_device; - a = (XAxisInfoPtr) ((char *) v + sizeof(XValuatorInfo)); - for (k = 0; k < NUM_SPACEBALL_AXIS; k++, a++) { - __glutSpaceballRange[k].min = a->min_value; - __glutSpaceballRange[k].range = a->max_value - a->min_value; - } - break; - } - any = (XAnyClassPtr) ((char *) any + any->length); - } - if (v) { - __glutSpaceball = XOpenDevice(__glutDisplay, device->id); - if (__glutSpaceball) { - __glutNumSpaceballButtons = btns; - addDeviceEventParser(); - } - } - } else if (!__glutDials && !strcmp(device->name, "dial+buttons")) { - v = NULL; - b = NULL; - for (j = 0; j < device->num_classes; j++) { -#if defined(__cplusplus) || defined(c_plusplus) - switch (any->c_class) { -#else - switch (any->class) { -#endif - case ButtonClass: - b = (XButtonInfoPtr) any; - btns = b->num_buttons; - break; - case ValuatorClass: - v = (XValuatorInfoPtr) any; - /* Sanity check: at least 8 valuators? */ - if (v->num_axes < NUM_DIALS_AXIS) - goto skip_device; - dials = v->num_axes; - __glutDialsResolution = (int *) malloc(sizeof(int) * dials); - a = (XAxisInfoPtr) ((char *) v + sizeof(XValuatorInfo)); - for (k = 0; k < dials; k++, a++) { - __glutDialsResolution[k] = a->resolution; - } - break; - } - any = (XAnyClassPtr) ((char *) any + any->length); - } - if (v) { - __glutDials = XOpenDevice(__glutDisplay, device->id); - if (__glutDials) { - __glutNumButtonBoxButtons = btns; - __glutNumDials = dials; - addDeviceEventParser(); - } - } - } else if (!__glutTablet && !strcmp(device->name, "tablet")) { - v = NULL; - b = NULL; - for (j = 0; j < device->num_classes; j++) { -#if defined(__cplusplus) || defined(c_plusplus) - switch (any->c_class) { -#else - switch (any->class) { -#endif - case ButtonClass: - b = (XButtonInfoPtr) any; - btns = b->num_buttons; - break; - case ValuatorClass: - v = (XValuatorInfoPtr) any; - /* Sanity check: exactly 2 valuators? */ - if (v->num_axes != NUM_TABLET_AXIS) - goto skip_device; - a = (XAxisInfoPtr) ((char *) v + sizeof(XValuatorInfo)); - for (k = 0; k < NUM_TABLET_AXIS; k++, a++) { - __glutTabletRange[k].min = a->min_value; - __glutTabletRange[k].range = a->max_value - a->min_value; - } - break; - } - any = (XAnyClassPtr) ((char *) any + any->length); - } - if (v) { - __glutTablet = XOpenDevice(__glutDisplay, device->id); - if (__glutTablet) { - __glutNumTabletButtons = btns; - addDeviceEventParser(); - } - } - } else if (!strcmp(device->name, "mouse")) { - for (j = 0; j < device->num_classes; j++) { -#if defined(__cplusplus) || defined(c_plusplus) - if (any->c_class == ButtonClass) { -#else - if (any->class == ButtonClass) { -#endif - b = (XButtonInfoPtr) any; - __glutNumMouseButtons = b->num_buttons; - } - any = (XAnyClassPtr) ((char *) any + any->length); - } - } - skip_device:; - } - XFreeDeviceList(device_info); - } -#else /* _WIN32 */ - __glutNumMouseButtons = GetSystemMetrics(SM_CMOUSEBUTTONS); -#endif /* !_WIN32 */ - /* X Input extension might be supported, but only if there is - a tablet, dials, or spaceball do we claim devices are - supported. */ - support = __glutTablet || __glutDials || __glutSpaceball; - return support; -} - -void -__glutUpdateInputDeviceMask(GLUTwindow * window) -{ -#if !defined(_WIN32) - /* 5 (dial and buttons) + 5 (tablet locator and buttons) + 5 - (Spaceball buttons and axis) = 15 */ - XEventClass eventList[15]; - int rc, numEvents; - - rc = probeDevices(); - if (rc) { - numEvents = 0; - if (__glutTablet) { - if (window->tabletMotion) { - DeviceMotionNotify(__glutTablet, __glutDeviceMotionNotify, - eventList[numEvents]); - numEvents++; - } - if (window->tabletButton) { - DeviceButtonPress(__glutTablet, __glutDeviceButtonPress, - eventList[numEvents]); - numEvents++; - DeviceButtonPressGrab(__glutTablet, __glutDeviceButtonPressGrab, - eventList[numEvents]); - numEvents++; - DeviceButtonRelease(__glutTablet, __glutDeviceButtonRelease, - eventList[numEvents]); - numEvents++; - } - if (window->tabletMotion || window->tabletButton) { - DeviceStateNotify(__glutTablet, __glutDeviceStateNotify, - eventList[numEvents]); - numEvents++; - } - } - if (__glutDials) { - if (window->dials) { - DeviceMotionNotify(__glutDials, __glutDeviceMotionNotify, - eventList[numEvents]); - numEvents++; - } - if (window->buttonBox) { - DeviceButtonPress(__glutDials, __glutDeviceButtonPress, - eventList[numEvents]); - numEvents++; - DeviceButtonPressGrab(__glutDials, __glutDeviceButtonPressGrab, - eventList[numEvents]); - numEvents++; - DeviceButtonRelease(__glutDials, __glutDeviceButtonRelease, - eventList[numEvents]); - numEvents++; - } - if (window->dials || window->buttonBox) { - DeviceStateNotify(__glutDials, __glutDeviceStateNotify, - eventList[numEvents]); - numEvents++; - } - } - if (__glutSpaceball) { - if (window->spaceMotion || window->spaceRotate) { - DeviceMotionNotify(__glutSpaceball, __glutDeviceMotionNotify, - eventList[numEvents]); - numEvents++; - } - if (window->spaceButton) { - DeviceButtonPress(__glutSpaceball, __glutDeviceButtonPress, - eventList[numEvents]); - numEvents++; - DeviceButtonPressGrab(__glutSpaceball, __glutDeviceButtonPressGrab, - eventList[numEvents]); - numEvents++; - DeviceButtonRelease(__glutSpaceball, __glutDeviceButtonRelease, - eventList[numEvents]); - numEvents++; - } - if (window->spaceMotion || window->spaceRotate || window->spaceButton) { - DeviceStateNotify(__glutSpaceball, __glutDeviceStateNotify, - eventList[numEvents]); - numEvents++; - } - } -#if 0 - if (window->children) { - GLUTwindow *child = window->children; - - do { - XChangeDeviceDontPropagateList(__glutDisplay, child->win, - numEvents, eventList, AddToList); - child = child->siblings; - } while (child); - } -#endif - XSelectExtensionEvent(__glutDisplay, window->win, - eventList, numEvents); - if (window->overlay) { - XSelectExtensionEvent(__glutDisplay, window->overlay->win, - eventList, numEvents); - } - } else { - /* X Input extension not supported; no chance for exotic - input devices. */ - } -#endif /* !_WIN32 */ -} - -#endif //POFIG - -/* CENTRY */ -int GLUTAPIENTRY -glutDeviceGet(GLenum param) -{ -#if POFIG - probeDevices(); -#endif - switch (param) { - case GLUT_HAS_KEYBOARD: - case GLUT_HAS_MOUSE: - /* Assume window system always has mouse and keyboard. */ - return 1; -#if POFIG - case GLUT_HAS_SPACEBALL: - return __glutSpaceball != NULL; - case GLUT_HAS_DIAL_AND_BUTTON_BOX: - return __glutDials != NULL; - case GLUT_HAS_TABLET: - return __glutTablet != NULL; - case GLUT_NUM_MOUSE_BUTTONS: - return __glutNumMouseButtons; - case GLUT_NUM_SPACEBALL_BUTTONS: - return __glutNumSpaceballButtons; - case GLUT_NUM_BUTTON_BOX_BUTTONS: - return __glutNumButtonBoxButtons; - case GLUT_NUM_DIALS: - return __glutNumDials; - case GLUT_NUM_TABLET_BUTTONS: - return __glutNumTabletButtons; - case GLUT_DEVICE_IGNORE_KEY_REPEAT: - return __glutCurrentWindow->ignoreKeyRepeat; -#ifndef _WIN32 - case GLUT_DEVICE_KEY_REPEAT: - { - XKeyboardState state; - - XGetKeyboardControl(__glutDisplay, &state); - return state.global_auto_repeat; - } - case GLUT_JOYSTICK_POLL_RATE: - return 0; -#else - case GLUT_DEVICE_KEY_REPEAT: - /* Win32 cannot globally disable key repeat. */ - return GLUT_KEY_REPEAT_ON; - case GLUT_JOYSTICK_POLL_RATE: - return __glutCurrentWindow->joyPollInterval; -#endif - case GLUT_HAS_JOYSTICK: - return __glutHasJoystick; - case GLUT_JOYSTICK_BUTTONS: - return __glutNumJoystickButtons; - case GLUT_JOYSTICK_AXES: - return __glutNumJoystickAxes; -#endif //POFIG - default: - __glutWarning("invalid glutDeviceGet parameter: %d", param); - return -1; - } -} -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_key.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_key.cpp deleted file mode 100644 index a1b9919abc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_key.cpp +++ /dev/null @@ -1,29 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include - -#include "glutint.h" - -/* CENTRY */ -void GLUTAPIENTRY -glutKeyboardFunc(GLUTkeyboardCB keyboardFunc) -{ - __glutChangeWindowEventMask(KeyPressMask, - keyboardFunc != NULL || __glutCurrentWindow->special != NULL); - __glutCurrentWindow->keyboard = keyboardFunc; -} - -void GLUTAPIENTRY -glutSpecialFunc(GLUTspecialCB specialFunc) -{ - __glutChangeWindowEventMask(KeyPressMask, - specialFunc != NULL || __glutCurrentWindow->keyboard != NULL); - __glutCurrentWindow->special = specialFunc; -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_keyctrl.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_keyctrl.cpp deleted file mode 100644 index b0f3a28f7d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_keyctrl.cpp +++ /dev/null @@ -1,29 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1996, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" - -/* CENTRY */ -void GLUTAPIENTRY -glutIgnoreKeyRepeat(int ignore) -{ - __glutCurrentWindow->ignoreKeyRepeat = ignore; -} - -void GLUTAPIENTRY -glutSetKeyRepeat(int repeatMode) -{ -#if !defined(_WIN32) && !defined(__OS2PM__) - XKeyboardControl values; - - /* GLUT's repeatMode #define's match the Xlib API values. */ - values.auto_repeat_mode = repeatMode; - XChangeKeyboardControl(__glutDisplay, KBAutoRepeatMode, &values); -#endif -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_keyup.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_keyup.cpp deleted file mode 100644 index ada758e277..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_keyup.cpp +++ /dev/null @@ -1,29 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include - -#include "glutint.h" - -/* CENTRY */ -void GLUTAPIENTRY -glutKeyboardUpFunc(GLUTkeyboardCB keyboardUpFunc) -{ - __glutChangeWindowEventMask(KeyReleaseMask, - keyboardUpFunc != NULL || __glutCurrentWindow->specialUp != NULL); - __glutCurrentWindow->keyboardUp = keyboardUpFunc; -} - -void GLUTAPIENTRY -glutSpecialUpFunc(GLUTspecialCB specialUpFunc) -{ - __glutChangeWindowEventMask(KeyReleaseMask, - specialUpFunc != NULL || __glutCurrentWindow->keyboardUp != NULL); - __glutCurrentWindow->specialUp = specialUpFunc; -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_mesa.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_mesa.cpp deleted file mode 100644 index 73682a5067..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_mesa.cpp +++ /dev/null @@ -1,57 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1996. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include -#include "glutint.h" - -int __glutMesaSwapHackSupport = 0; /* Not supported until - proven otherwise. */ - -/* Use the "Mesa swap hack" if reasonable if and only if - MESA_SWAP_HACK is set to something whose first character is - not "N" or "n" AND "Brian Paul" is the vendor string AND - "Mesa X11"* (or "Mesa" for backward compatibility) is the - renderer string. - - Anyone who modifies Mesa so that glXSwapBuffers does not - simply blit the previously rendered back buffer should - change either their vendor or renderer string to avoid - confusing GLUT. */ - -void -__glutDetermineMesaSwapHackSupport(void) -{ - static int doneAlready = 0; - char *env, *vendor, *renderer; - - if (doneAlready) - return; - env = getenv("MESA_SWAP_HACK"); - if (env) { - if ((env[0] != 'n') && (env[0] != 'N')) { - vendor = (char *) glGetString(GL_VENDOR); - renderer = (char *) glGetString(GL_RENDERER); - - /* Old versions of X11 Mesa uses the renderer string - "Mesa"; Brian plans to start using "Mesa X11" to - distinguish the X version of Mesa from other flavor - such as Windows or 3Dfx. */ - -#define MESA_X11 "Mesa X11" - - /* XXX At some point in the future, eliminate the - backward compatibility for the old "Mesa" renderer - string. */ - - if (!strcmp(vendor, "Brian Paul") && (!strcmp(renderer, "Mesa") || - !strncmp(renderer, MESA_X11, sizeof(MESA_X11) - 1))) - __glutMesaSwapHackSupport = 1; - } - } - doneAlready = 1; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_modifier.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_modifier.cpp deleted file mode 100644 index 0ffa5a6801..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_modifier.cpp +++ /dev/null @@ -1,31 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" - -/* CENTRY */ -int GLUTAPIENTRY -glutGetModifiers(void) -{ - int modifiers; - - if(__glutModifierMask == (unsigned int) ~0) { - __glutWarning( - "glutCurrentModifiers: do not call outside core input callback."); - return 0; - } - modifiers = 0; - if(__glutModifierMask & (ShiftMask|LockMask)) - modifiers |= GLUT_ACTIVE_SHIFT; - if(__glutModifierMask & ControlMask) - modifiers |= GLUT_ACTIVE_CTRL; - if(__glutModifierMask & Mod1Mask) - modifiers |= GLUT_ACTIVE_ALT; - return modifiers; -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_roman.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_roman.cpp deleted file mode 100644 index 8e25de8ac1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_roman.cpp +++ /dev/null @@ -1,2451 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#include "glutstroke.h" - -/* char: 33 '!' */ - -static const CoordRec char33_stroke0[] = { - { 13.3819, 100 }, - { 13.3819, 33.3333 }, -}; - -static const CoordRec char33_stroke1[] = { - { 13.3819, 9.5238 }, - { 8.62, 4.7619 }, - { 13.3819, 0 }, - { 18.1438, 4.7619 }, - { 13.3819, 9.5238 }, -}; - -static const StrokeRec char33[] = { - { 2, char33_stroke0 }, - { 5, char33_stroke1 }, -}; - -/* char: 34 '"' */ - -static const CoordRec char34_stroke0[] = { - { 4.02, 100 }, - { 4.02, 66.6667 }, -}; - -static const CoordRec char34_stroke1[] = { - { 42.1152, 100 }, - { 42.1152, 66.6667 }, -}; - -static const StrokeRec char34[] = { - { 2, char34_stroke0 }, - { 2, char34_stroke1 }, -}; - -/* char: 35 '#' */ - -static const CoordRec char35_stroke0[] = { - { 41.2952, 119.048 }, - { 7.9619, -33.3333 }, -}; - -static const CoordRec char35_stroke1[] = { - { 69.8667, 119.048 }, - { 36.5333, -33.3333 }, -}; - -static const CoordRec char35_stroke2[] = { - { 7.9619, 57.1429 }, - { 74.6286, 57.1429 }, -}; - -static const CoordRec char35_stroke3[] = { - { 3.2, 28.5714 }, - { 69.8667, 28.5714 }, -}; - -static const StrokeRec char35[] = { - { 2, char35_stroke0 }, - { 2, char35_stroke1 }, - { 2, char35_stroke2 }, - { 2, char35_stroke3 }, -}; - -/* char: 36 '$' */ - -static const CoordRec char36_stroke0[] = { - { 28.6295, 119.048 }, - { 28.6295, -19.0476 }, -}; - -static const CoordRec char36_stroke1[] = { - { 47.6771, 119.048 }, - { 47.6771, -19.0476 }, -}; - -static const CoordRec char36_stroke2[] = { - { 71.4867, 85.7143 }, - { 61.9629, 95.2381 }, - { 47.6771, 100 }, - { 28.6295, 100 }, - { 14.3438, 95.2381 }, - { 4.82, 85.7143 }, - { 4.82, 76.1905 }, - { 9.5819, 66.6667 }, - { 14.3438, 61.9048 }, - { 23.8676, 57.1429 }, - { 52.439, 47.619 }, - { 61.9629, 42.8571 }, - { 66.7248, 38.0952 }, - { 71.4867, 28.5714 }, - { 71.4867, 14.2857 }, - { 61.9629, 4.7619 }, - { 47.6771, 0 }, - { 28.6295, 0 }, - { 14.3438, 4.7619 }, - { 4.82, 14.2857 }, -}; - -static const StrokeRec char36[] = { - { 2, char36_stroke0 }, - { 2, char36_stroke1 }, - { 20, char36_stroke2 }, -}; - -/* char: 37 '%' */ - -static const CoordRec char37_stroke0[] = { - { 92.0743, 100 }, - { 6.36, 0 }, -}; - -static const CoordRec char37_stroke1[] = { - { 30.1695, 100 }, - { 39.6933, 90.4762 }, - { 39.6933, 80.9524 }, - { 34.9314, 71.4286 }, - { 25.4076, 66.6667 }, - { 15.8838, 66.6667 }, - { 6.36, 76.1905 }, - { 6.36, 85.7143 }, - { 11.1219, 95.2381 }, - { 20.6457, 100 }, - { 30.1695, 100 }, - { 39.6933, 95.2381 }, - { 53.979, 90.4762 }, - { 68.2648, 90.4762 }, - { 82.5505, 95.2381 }, - { 92.0743, 100 }, -}; - -static const CoordRec char37_stroke2[] = { - { 73.0267, 33.3333 }, - { 63.5029, 28.5714 }, - { 58.741, 19.0476 }, - { 58.741, 9.5238 }, - { 68.2648, 0 }, - { 77.7886, 0 }, - { 87.3124, 4.7619 }, - { 92.0743, 14.2857 }, - { 92.0743, 23.8095 }, - { 82.5505, 33.3333 }, - { 73.0267, 33.3333 }, -}; - -static const StrokeRec char37[] = { - { 2, char37_stroke0 }, - { 16, char37_stroke1 }, - { 11, char37_stroke2 }, -}; - -/* char: 38 '&' */ - -static const CoordRec char38_stroke0[] = { - { 101.218, 57.1429 }, - { 101.218, 61.9048 }, - { 96.4562, 66.6667 }, - { 91.6943, 66.6667 }, - { 86.9324, 61.9048 }, - { 82.1705, 52.381 }, - { 72.6467, 28.5714 }, - { 63.1229, 14.2857 }, - { 53.599, 4.7619 }, - { 44.0752, 0 }, - { 25.0276, 0 }, - { 15.5038, 4.7619 }, - { 10.7419, 9.5238 }, - { 5.98, 19.0476 }, - { 5.98, 28.5714 }, - { 10.7419, 38.0952 }, - { 15.5038, 42.8571 }, - { 48.8371, 61.9048 }, - { 53.599, 66.6667 }, - { 58.361, 76.1905 }, - { 58.361, 85.7143 }, - { 53.599, 95.2381 }, - { 44.0752, 100 }, - { 34.5514, 95.2381 }, - { 29.7895, 85.7143 }, - { 29.7895, 76.1905 }, - { 34.5514, 61.9048 }, - { 44.0752, 47.619 }, - { 67.8848, 14.2857 }, - { 77.4086, 4.7619 }, - { 86.9324, 0 }, - { 96.4562, 0 }, - { 101.218, 4.7619 }, - { 101.218, 9.5238 }, -}; - -static const StrokeRec char38[] = { - { 34, char38_stroke0 }, -}; - -/* char: 39 ''' */ - -static const CoordRec char39_stroke0[] = { - { 4.44, 100 }, - { 4.44, 66.6667 }, -}; - -static const StrokeRec char39[] = { - { 2, char39_stroke0 }, -}; - -/* char: 40 '(' */ - -static const CoordRec char40_stroke0[] = { - { 40.9133, 119.048 }, - { 31.3895, 109.524 }, - { 21.8657, 95.2381 }, - { 12.3419, 76.1905 }, - { 7.58, 52.381 }, - { 7.58, 33.3333 }, - { 12.3419, 9.5238 }, - { 21.8657, -9.5238 }, - { 31.3895, -23.8095 }, - { 40.9133, -33.3333 }, -}; - -static const StrokeRec char40[] = { - { 10, char40_stroke0 }, -}; - -/* char: 41 ')' */ - -static const CoordRec char41_stroke0[] = { - { 5.28, 119.048 }, - { 14.8038, 109.524 }, - { 24.3276, 95.2381 }, - { 33.8514, 76.1905 }, - { 38.6133, 52.381 }, - { 38.6133, 33.3333 }, - { 33.8514, 9.5238 }, - { 24.3276, -9.5238 }, - { 14.8038, -23.8095 }, - { 5.28, -33.3333 }, -}; - -static const StrokeRec char41[] = { - { 10, char41_stroke0 }, -}; - -/* char: 42 '*' */ - -static const CoordRec char42_stroke0[] = { - { 30.7695, 71.4286 }, - { 30.7695, 14.2857 }, -}; - -static const CoordRec char42_stroke1[] = { - { 6.96, 57.1429 }, - { 54.579, 28.5714 }, -}; - -static const CoordRec char42_stroke2[] = { - { 54.579, 57.1429 }, - { 6.96, 28.5714 }, -}; - -static const StrokeRec char42[] = { - { 2, char42_stroke0 }, - { 2, char42_stroke1 }, - { 2, char42_stroke2 }, -}; - -/* char: 43 '+' */ - -static const CoordRec char43_stroke0[] = { - { 48.8371, 85.7143 }, - { 48.8371, 0 }, -}; - -static const CoordRec char43_stroke1[] = { - { 5.98, 42.8571 }, - { 91.6943, 42.8571 }, -}; - -static const StrokeRec char43[] = { - { 2, char43_stroke0 }, - { 2, char43_stroke1 }, -}; - -/* char: 44 ',' */ - -static const CoordRec char44_stroke0[] = { - { 18.2838, 4.7619 }, - { 13.5219, 0 }, - { 8.76, 4.7619 }, - { 13.5219, 9.5238 }, - { 18.2838, 4.7619 }, - { 18.2838, -4.7619 }, - { 13.5219, -14.2857 }, - { 8.76, -19.0476 }, -}; - -static const StrokeRec char44[] = { - { 8, char44_stroke0 }, -}; - -/* char: 45 '-' */ - -static const CoordRec char45_stroke0[] = { - { 7.38, 42.8571 }, - { 93.0943, 42.8571 }, -}; - -static const StrokeRec char45[] = { - { 2, char45_stroke0 }, -}; - -/* char: 46 '.' */ - -static const CoordRec char46_stroke0[] = { - { 13.1019, 9.5238 }, - { 8.34, 4.7619 }, - { 13.1019, 0 }, - { 17.8638, 4.7619 }, - { 13.1019, 9.5238 }, -}; - -static const StrokeRec char46[] = { - { 5, char46_stroke0 }, -}; - -/* char: 47 '/' */ - -static const CoordRec char47_stroke0[] = { - { 7.24, -14.2857 }, - { 73.9067, 100 }, -}; - -static const StrokeRec char47[] = { - { 2, char47_stroke0 }, -}; - -/* char: 48 '0' */ - -static const CoordRec char48_stroke0[] = { - { 33.5514, 100 }, - { 19.2657, 95.2381 }, - { 9.7419, 80.9524 }, - { 4.98, 57.1429 }, - { 4.98, 42.8571 }, - { 9.7419, 19.0476 }, - { 19.2657, 4.7619 }, - { 33.5514, 0 }, - { 43.0752, 0 }, - { 57.361, 4.7619 }, - { 66.8848, 19.0476 }, - { 71.6467, 42.8571 }, - { 71.6467, 57.1429 }, - { 66.8848, 80.9524 }, - { 57.361, 95.2381 }, - { 43.0752, 100 }, - { 33.5514, 100 }, -}; - -static const StrokeRec char48[] = { - { 17, char48_stroke0 }, -}; - -/* char: 49 '1' */ - -static const CoordRec char49_stroke0[] = { - { 11.82, 80.9524 }, - { 21.3438, 85.7143 }, - { 35.6295, 100 }, - { 35.6295, 0 }, -}; - -static const StrokeRec char49[] = { - { 4, char49_stroke0 }, -}; - -/* char: 50 '2' */ - -static const CoordRec char50_stroke0[] = { - { 10.1819, 76.1905 }, - { 10.1819, 80.9524 }, - { 14.9438, 90.4762 }, - { 19.7057, 95.2381 }, - { 29.2295, 100 }, - { 48.2771, 100 }, - { 57.801, 95.2381 }, - { 62.5629, 90.4762 }, - { 67.3248, 80.9524 }, - { 67.3248, 71.4286 }, - { 62.5629, 61.9048 }, - { 53.039, 47.619 }, - { 5.42, 0 }, - { 72.0867, 0 }, -}; - -static const StrokeRec char50[] = { - { 14, char50_stroke0 }, -}; - -/* char: 51 '3' */ - -static const CoordRec char51_stroke0[] = { - { 14.5238, 100 }, - { 66.9048, 100 }, - { 38.3333, 61.9048 }, - { 52.619, 61.9048 }, - { 62.1429, 57.1429 }, - { 66.9048, 52.381 }, - { 71.6667, 38.0952 }, - { 71.6667, 28.5714 }, - { 66.9048, 14.2857 }, - { 57.381, 4.7619 }, - { 43.0952, 0 }, - { 28.8095, 0 }, - { 14.5238, 4.7619 }, - { 9.7619, 9.5238 }, - { 5, 19.0476 }, -}; - -static const StrokeRec char51[] = { - { 15, char51_stroke0 }, -}; - -/* char: 52 '4' */ - -static const CoordRec char52_stroke0[] = { - { 51.499, 100 }, - { 3.88, 33.3333 }, - { 75.3086, 33.3333 }, -}; - -static const CoordRec char52_stroke1[] = { - { 51.499, 100 }, - { 51.499, 0 }, -}; - -static const StrokeRec char52[] = { - { 3, char52_stroke0 }, - { 2, char52_stroke1 }, -}; - -/* char: 53 '5' */ - -static const CoordRec char53_stroke0[] = { - { 62.0029, 100 }, - { 14.3838, 100 }, - { 9.6219, 57.1429 }, - { 14.3838, 61.9048 }, - { 28.6695, 66.6667 }, - { 42.9552, 66.6667 }, - { 57.241, 61.9048 }, - { 66.7648, 52.381 }, - { 71.5267, 38.0952 }, - { 71.5267, 28.5714 }, - { 66.7648, 14.2857 }, - { 57.241, 4.7619 }, - { 42.9552, 0 }, - { 28.6695, 0 }, - { 14.3838, 4.7619 }, - { 9.6219, 9.5238 }, - { 4.86, 19.0476 }, -}; - -static const StrokeRec char53[] = { - { 17, char53_stroke0 }, -}; - -/* char: 54 '6' */ - -static const CoordRec char54_stroke0[] = { - { 62.7229, 85.7143 }, - { 57.961, 95.2381 }, - { 43.6752, 100 }, - { 34.1514, 100 }, - { 19.8657, 95.2381 }, - { 10.3419, 80.9524 }, - { 5.58, 57.1429 }, - { 5.58, 33.3333 }, - { 10.3419, 14.2857 }, - { 19.8657, 4.7619 }, - { 34.1514, 0 }, - { 38.9133, 0 }, - { 53.199, 4.7619 }, - { 62.7229, 14.2857 }, - { 67.4848, 28.5714 }, - { 67.4848, 33.3333 }, - { 62.7229, 47.619 }, - { 53.199, 57.1429 }, - { 38.9133, 61.9048 }, - { 34.1514, 61.9048 }, - { 19.8657, 57.1429 }, - { 10.3419, 47.619 }, - { 5.58, 33.3333 }, -}; - -static const StrokeRec char54[] = { - { 23, char54_stroke0 }, -}; - -/* char: 55 '7' */ - -static const CoordRec char55_stroke0[] = { - { 72.2267, 100 }, - { 24.6076, 0 }, -}; - -static const CoordRec char55_stroke1[] = { - { 5.56, 100 }, - { 72.2267, 100 }, -}; - -static const StrokeRec char55[] = { - { 2, char55_stroke0 }, - { 2, char55_stroke1 }, -}; - -/* char: 56 '8' */ - -static const CoordRec char56_stroke0[] = { - { 29.4095, 100 }, - { 15.1238, 95.2381 }, - { 10.3619, 85.7143 }, - { 10.3619, 76.1905 }, - { 15.1238, 66.6667 }, - { 24.6476, 61.9048 }, - { 43.6952, 57.1429 }, - { 57.981, 52.381 }, - { 67.5048, 42.8571 }, - { 72.2667, 33.3333 }, - { 72.2667, 19.0476 }, - { 67.5048, 9.5238 }, - { 62.7429, 4.7619 }, - { 48.4571, 0 }, - { 29.4095, 0 }, - { 15.1238, 4.7619 }, - { 10.3619, 9.5238 }, - { 5.6, 19.0476 }, - { 5.6, 33.3333 }, - { 10.3619, 42.8571 }, - { 19.8857, 52.381 }, - { 34.1714, 57.1429 }, - { 53.219, 61.9048 }, - { 62.7429, 66.6667 }, - { 67.5048, 76.1905 }, - { 67.5048, 85.7143 }, - { 62.7429, 95.2381 }, - { 48.4571, 100 }, - { 29.4095, 100 }, -}; - -static const StrokeRec char56[] = { - { 29, char56_stroke0 }, -}; - -/* char: 57 '9' */ - -static const CoordRec char57_stroke0[] = { - { 68.5048, 66.6667 }, - { 63.7429, 52.381 }, - { 54.219, 42.8571 }, - { 39.9333, 38.0952 }, - { 35.1714, 38.0952 }, - { 20.8857, 42.8571 }, - { 11.3619, 52.381 }, - { 6.6, 66.6667 }, - { 6.6, 71.4286 }, - { 11.3619, 85.7143 }, - { 20.8857, 95.2381 }, - { 35.1714, 100 }, - { 39.9333, 100 }, - { 54.219, 95.2381 }, - { 63.7429, 85.7143 }, - { 68.5048, 66.6667 }, - { 68.5048, 42.8571 }, - { 63.7429, 19.0476 }, - { 54.219, 4.7619 }, - { 39.9333, 0 }, - { 30.4095, 0 }, - { 16.1238, 4.7619 }, - { 11.3619, 14.2857 }, -}; - -static const StrokeRec char57[] = { - { 23, char57_stroke0 }, -}; - -/* char: 58 ':' */ - -static const CoordRec char58_stroke0[] = { - { 14.0819, 66.6667 }, - { 9.32, 61.9048 }, - { 14.0819, 57.1429 }, - { 18.8438, 61.9048 }, - { 14.0819, 66.6667 }, -}; - -static const CoordRec char58_stroke1[] = { - { 14.0819, 9.5238 }, - { 9.32, 4.7619 }, - { 14.0819, 0 }, - { 18.8438, 4.7619 }, - { 14.0819, 9.5238 }, -}; - -static const StrokeRec char58[] = { - { 5, char58_stroke0 }, - { 5, char58_stroke1 }, -}; - -/* char: 59 ';' */ - -static const CoordRec char59_stroke0[] = { - { 12.9619, 66.6667 }, - { 8.2, 61.9048 }, - { 12.9619, 57.1429 }, - { 17.7238, 61.9048 }, - { 12.9619, 66.6667 }, -}; - -static const CoordRec char59_stroke1[] = { - { 17.7238, 4.7619 }, - { 12.9619, 0 }, - { 8.2, 4.7619 }, - { 12.9619, 9.5238 }, - { 17.7238, 4.7619 }, - { 17.7238, -4.7619 }, - { 12.9619, -14.2857 }, - { 8.2, -19.0476 }, -}; - -static const StrokeRec char59[] = { - { 5, char59_stroke0 }, - { 8, char59_stroke1 }, -}; - -/* char: 60 '<' */ - -static const CoordRec char60_stroke0[] = { - { 79.2505, 85.7143 }, - { 3.06, 42.8571 }, - { 79.2505, 0 }, -}; - -static const StrokeRec char60[] = { - { 3, char60_stroke0 }, -}; - -/* char: 61 '=' */ - -static const CoordRec char61_stroke0[] = { - { 5.7, 57.1429 }, - { 91.4143, 57.1429 }, -}; - -static const CoordRec char61_stroke1[] = { - { 5.7, 28.5714 }, - { 91.4143, 28.5714 }, -}; - -static const StrokeRec char61[] = { - { 2, char61_stroke0 }, - { 2, char61_stroke1 }, -}; - -/* char: 62 '>' */ - -static const CoordRec char62_stroke0[] = { - { 2.78, 85.7143 }, - { 78.9705, 42.8571 }, - { 2.78, 0 }, -}; - -static const StrokeRec char62[] = { - { 3, char62_stroke0 }, -}; - -/* char: 63 '?' */ - -static const CoordRec char63_stroke0[] = { - { 8.42, 76.1905 }, - { 8.42, 80.9524 }, - { 13.1819, 90.4762 }, - { 17.9438, 95.2381 }, - { 27.4676, 100 }, - { 46.5152, 100 }, - { 56.039, 95.2381 }, - { 60.801, 90.4762 }, - { 65.5629, 80.9524 }, - { 65.5629, 71.4286 }, - { 60.801, 61.9048 }, - { 56.039, 57.1429 }, - { 36.9914, 47.619 }, - { 36.9914, 33.3333 }, -}; - -static const CoordRec char63_stroke1[] = { - { 36.9914, 9.5238 }, - { 32.2295, 4.7619 }, - { 36.9914, 0 }, - { 41.7533, 4.7619 }, - { 36.9914, 9.5238 }, -}; - -static const StrokeRec char63[] = { - { 14, char63_stroke0 }, - { 5, char63_stroke1 }, -}; - -/* char: 64 '@' */ - -static const CoordRec char64_stroke0[] = { - { 49.2171, 52.381 }, - { 39.6933, 57.1429 }, - { 30.1695, 57.1429 }, - { 25.4076, 47.619 }, - { 25.4076, 42.8571 }, - { 30.1695, 33.3333 }, - { 39.6933, 33.3333 }, - { 49.2171, 38.0952 }, -}; - -static const CoordRec char64_stroke1[] = { - { 49.2171, 57.1429 }, - { 49.2171, 38.0952 }, - { 53.979, 33.3333 }, - { 63.5029, 33.3333 }, - { 68.2648, 42.8571 }, - { 68.2648, 47.619 }, - { 63.5029, 61.9048 }, - { 53.979, 71.4286 }, - { 39.6933, 76.1905 }, - { 34.9314, 76.1905 }, - { 20.6457, 71.4286 }, - { 11.1219, 61.9048 }, - { 6.36, 47.619 }, - { 6.36, 42.8571 }, - { 11.1219, 28.5714 }, - { 20.6457, 19.0476 }, - { 34.9314, 14.2857 }, - { 39.6933, 14.2857 }, - { 53.979, 19.0476 }, -}; - -static const StrokeRec char64[] = { - { 8, char64_stroke0 }, - { 19, char64_stroke1 }, -}; - -/* char: 65 'A' */ - -static const CoordRec char65_stroke0[] = { - { 40.5952, 100 }, - { 2.5, 0 }, -}; - -static const CoordRec char65_stroke1[] = { - { 40.5952, 100 }, - { 78.6905, 0 }, -}; - -static const CoordRec char65_stroke2[] = { - { 16.7857, 33.3333 }, - { 64.4048, 33.3333 }, -}; - -static const StrokeRec char65[] = { - { 2, char65_stroke0 }, - { 2, char65_stroke1 }, - { 2, char65_stroke2 }, -}; - -/* char: 66 'B' */ - -static const CoordRec char66_stroke0[] = { - { 11.42, 100 }, - { 11.42, 0 }, -}; - -static const CoordRec char66_stroke1[] = { - { 11.42, 100 }, - { 54.2771, 100 }, - { 68.5629, 95.2381 }, - { 73.3248, 90.4762 }, - { 78.0867, 80.9524 }, - { 78.0867, 71.4286 }, - { 73.3248, 61.9048 }, - { 68.5629, 57.1429 }, - { 54.2771, 52.381 }, -}; - -static const CoordRec char66_stroke2[] = { - { 11.42, 52.381 }, - { 54.2771, 52.381 }, - { 68.5629, 47.619 }, - { 73.3248, 42.8571 }, - { 78.0867, 33.3333 }, - { 78.0867, 19.0476 }, - { 73.3248, 9.5238 }, - { 68.5629, 4.7619 }, - { 54.2771, 0 }, - { 11.42, 0 }, -}; - -static const StrokeRec char66[] = { - { 2, char66_stroke0 }, - { 9, char66_stroke1 }, - { 10, char66_stroke2 }, -}; - -/* char: 67 'C' */ - -static const CoordRec char67_stroke0[] = { - { 78.0886, 76.1905 }, - { 73.3267, 85.7143 }, - { 63.8029, 95.2381 }, - { 54.279, 100 }, - { 35.2314, 100 }, - { 25.7076, 95.2381 }, - { 16.1838, 85.7143 }, - { 11.4219, 76.1905 }, - { 6.66, 61.9048 }, - { 6.66, 38.0952 }, - { 11.4219, 23.8095 }, - { 16.1838, 14.2857 }, - { 25.7076, 4.7619 }, - { 35.2314, 0 }, - { 54.279, 0 }, - { 63.8029, 4.7619 }, - { 73.3267, 14.2857 }, - { 78.0886, 23.8095 }, -}; - -static const StrokeRec char67[] = { - { 18, char67_stroke0 }, -}; - -/* char: 68 'D' */ - -static const CoordRec char68_stroke0[] = { - { 11.96, 100 }, - { 11.96, 0 }, -}; - -static const CoordRec char68_stroke1[] = { - { 11.96, 100 }, - { 45.2933, 100 }, - { 59.579, 95.2381 }, - { 69.1029, 85.7143 }, - { 73.8648, 76.1905 }, - { 78.6267, 61.9048 }, - { 78.6267, 38.0952 }, - { 73.8648, 23.8095 }, - { 69.1029, 14.2857 }, - { 59.579, 4.7619 }, - { 45.2933, 0 }, - { 11.96, 0 }, -}; - -static const StrokeRec char68[] = { - { 2, char68_stroke0 }, - { 12, char68_stroke1 }, -}; - -/* char: 69 'E' */ - -static const CoordRec char69_stroke0[] = { - { 11.42, 100 }, - { 11.42, 0 }, -}; - -static const CoordRec char69_stroke1[] = { - { 11.42, 100 }, - { 73.3248, 100 }, -}; - -static const CoordRec char69_stroke2[] = { - { 11.42, 52.381 }, - { 49.5152, 52.381 }, -}; - -static const CoordRec char69_stroke3[] = { - { 11.42, 0 }, - { 73.3248, 0 }, -}; - -static const StrokeRec char69[] = { - { 2, char69_stroke0 }, - { 2, char69_stroke1 }, - { 2, char69_stroke2 }, - { 2, char69_stroke3 }, -}; - -/* char: 70 'F' */ - -static const CoordRec char70_stroke0[] = { - { 11.42, 100 }, - { 11.42, 0 }, -}; - -static const CoordRec char70_stroke1[] = { - { 11.42, 100 }, - { 73.3248, 100 }, -}; - -static const CoordRec char70_stroke2[] = { - { 11.42, 52.381 }, - { 49.5152, 52.381 }, -}; - -static const StrokeRec char70[] = { - { 2, char70_stroke0 }, - { 2, char70_stroke1 }, - { 2, char70_stroke2 }, -}; - -/* char: 71 'G' */ - -static const CoordRec char71_stroke0[] = { - { 78.4886, 76.1905 }, - { 73.7267, 85.7143 }, - { 64.2029, 95.2381 }, - { 54.679, 100 }, - { 35.6314, 100 }, - { 26.1076, 95.2381 }, - { 16.5838, 85.7143 }, - { 11.8219, 76.1905 }, - { 7.06, 61.9048 }, - { 7.06, 38.0952 }, - { 11.8219, 23.8095 }, - { 16.5838, 14.2857 }, - { 26.1076, 4.7619 }, - { 35.6314, 0 }, - { 54.679, 0 }, - { 64.2029, 4.7619 }, - { 73.7267, 14.2857 }, - { 78.4886, 23.8095 }, - { 78.4886, 38.0952 }, -}; - -static const CoordRec char71_stroke1[] = { - { 54.679, 38.0952 }, - { 78.4886, 38.0952 }, -}; - -static const StrokeRec char71[] = { - { 19, char71_stroke0 }, - { 2, char71_stroke1 }, -}; - -/* char: 72 'H' */ - -static const CoordRec char72_stroke0[] = { - { 11.42, 100 }, - { 11.42, 0 }, -}; - -static const CoordRec char72_stroke1[] = { - { 78.0867, 100 }, - { 78.0867, 0 }, -}; - -static const CoordRec char72_stroke2[] = { - { 11.42, 52.381 }, - { 78.0867, 52.381 }, -}; - -static const StrokeRec char72[] = { - { 2, char72_stroke0 }, - { 2, char72_stroke1 }, - { 2, char72_stroke2 }, -}; - -/* char: 73 'I' */ - -static const CoordRec char73_stroke0[] = { - { 10.86, 100 }, - { 10.86, 0 }, -}; - -static const StrokeRec char73[] = { - { 2, char73_stroke0 }, -}; - -/* char: 74 'J' */ - -static const CoordRec char74_stroke0[] = { - { 50.119, 100 }, - { 50.119, 23.8095 }, - { 45.3571, 9.5238 }, - { 40.5952, 4.7619 }, - { 31.0714, 0 }, - { 21.5476, 0 }, - { 12.0238, 4.7619 }, - { 7.2619, 9.5238 }, - { 2.5, 23.8095 }, - { 2.5, 33.3333 }, -}; - -static const StrokeRec char74[] = { - { 10, char74_stroke0 }, -}; - -/* char: 75 'K' */ - -static const CoordRec char75_stroke0[] = { - { 11.28, 100 }, - { 11.28, 0 }, -}; - -static const CoordRec char75_stroke1[] = { - { 77.9467, 100 }, - { 11.28, 33.3333 }, -}; - -static const CoordRec char75_stroke2[] = { - { 35.0895, 57.1429 }, - { 77.9467, 0 }, -}; - -static const StrokeRec char75[] = { - { 2, char75_stroke0 }, - { 2, char75_stroke1 }, - { 2, char75_stroke2 }, -}; - -/* char: 76 'L' */ - -static const CoordRec char76_stroke0[] = { - { 11.68, 100 }, - { 11.68, 0 }, -}; - -static const CoordRec char76_stroke1[] = { - { 11.68, 0 }, - { 68.8229, 0 }, -}; - -static const StrokeRec char76[] = { - { 2, char76_stroke0 }, - { 2, char76_stroke1 }, -}; - -/* char: 77 'M' */ - -static const CoordRec char77_stroke0[] = { - { 10.86, 100 }, - { 10.86, 0 }, -}; - -static const CoordRec char77_stroke1[] = { - { 10.86, 100 }, - { 48.9552, 0 }, -}; - -static const CoordRec char77_stroke2[] = { - { 87.0505, 100 }, - { 48.9552, 0 }, -}; - -static const CoordRec char77_stroke3[] = { - { 87.0505, 100 }, - { 87.0505, 0 }, -}; - -static const StrokeRec char77[] = { - { 2, char77_stroke0 }, - { 2, char77_stroke1 }, - { 2, char77_stroke2 }, - { 2, char77_stroke3 }, -}; - -/* char: 78 'N' */ - -static const CoordRec char78_stroke0[] = { - { 11.14, 100 }, - { 11.14, 0 }, -}; - -static const CoordRec char78_stroke1[] = { - { 11.14, 100 }, - { 77.8067, 0 }, -}; - -static const CoordRec char78_stroke2[] = { - { 77.8067, 100 }, - { 77.8067, 0 }, -}; - -static const StrokeRec char78[] = { - { 2, char78_stroke0 }, - { 2, char78_stroke1 }, - { 2, char78_stroke2 }, -}; - -/* char: 79 'O' */ - -static const CoordRec char79_stroke0[] = { - { 34.8114, 100 }, - { 25.2876, 95.2381 }, - { 15.7638, 85.7143 }, - { 11.0019, 76.1905 }, - { 6.24, 61.9048 }, - { 6.24, 38.0952 }, - { 11.0019, 23.8095 }, - { 15.7638, 14.2857 }, - { 25.2876, 4.7619 }, - { 34.8114, 0 }, - { 53.859, 0 }, - { 63.3829, 4.7619 }, - { 72.9067, 14.2857 }, - { 77.6686, 23.8095 }, - { 82.4305, 38.0952 }, - { 82.4305, 61.9048 }, - { 77.6686, 76.1905 }, - { 72.9067, 85.7143 }, - { 63.3829, 95.2381 }, - { 53.859, 100 }, - { 34.8114, 100 }, -}; - -static const StrokeRec char79[] = { - { 21, char79_stroke0 }, -}; - -/* char: 80 'P' */ - -static const CoordRec char80_stroke0[] = { - { 12.1, 100 }, - { 12.1, 0 }, -}; - -static const CoordRec char80_stroke1[] = { - { 12.1, 100 }, - { 54.9571, 100 }, - { 69.2429, 95.2381 }, - { 74.0048, 90.4762 }, - { 78.7667, 80.9524 }, - { 78.7667, 66.6667 }, - { 74.0048, 57.1429 }, - { 69.2429, 52.381 }, - { 54.9571, 47.619 }, - { 12.1, 47.619 }, -}; - -static const StrokeRec char80[] = { - { 2, char80_stroke0 }, - { 10, char80_stroke1 }, -}; - -/* char: 81 'Q' */ - -static const CoordRec char81_stroke0[] = { - { 33.8714, 100 }, - { 24.3476, 95.2381 }, - { 14.8238, 85.7143 }, - { 10.0619, 76.1905 }, - { 5.3, 61.9048 }, - { 5.3, 38.0952 }, - { 10.0619, 23.8095 }, - { 14.8238, 14.2857 }, - { 24.3476, 4.7619 }, - { 33.8714, 0 }, - { 52.919, 0 }, - { 62.4429, 4.7619 }, - { 71.9667, 14.2857 }, - { 76.7286, 23.8095 }, - { 81.4905, 38.0952 }, - { 81.4905, 61.9048 }, - { 76.7286, 76.1905 }, - { 71.9667, 85.7143 }, - { 62.4429, 95.2381 }, - { 52.919, 100 }, - { 33.8714, 100 }, -}; - -static const CoordRec char81_stroke1[] = { - { 48.1571, 19.0476 }, - { 76.7286, -9.5238 }, -}; - -static const StrokeRec char81[] = { - { 21, char81_stroke0 }, - { 2, char81_stroke1 }, -}; - -/* char: 82 'R' */ - -static const CoordRec char82_stroke0[] = { - { 11.68, 100 }, - { 11.68, 0 }, -}; - -static const CoordRec char82_stroke1[] = { - { 11.68, 100 }, - { 54.5371, 100 }, - { 68.8229, 95.2381 }, - { 73.5848, 90.4762 }, - { 78.3467, 80.9524 }, - { 78.3467, 71.4286 }, - { 73.5848, 61.9048 }, - { 68.8229, 57.1429 }, - { 54.5371, 52.381 }, - { 11.68, 52.381 }, -}; - -static const CoordRec char82_stroke2[] = { - { 45.0133, 52.381 }, - { 78.3467, 0 }, -}; - -static const StrokeRec char82[] = { - { 2, char82_stroke0 }, - { 10, char82_stroke1 }, - { 2, char82_stroke2 }, -}; - -/* char: 83 'S' */ - -static const CoordRec char83_stroke0[] = { - { 74.6667, 85.7143 }, - { 65.1429, 95.2381 }, - { 50.8571, 100 }, - { 31.8095, 100 }, - { 17.5238, 95.2381 }, - { 8, 85.7143 }, - { 8, 76.1905 }, - { 12.7619, 66.6667 }, - { 17.5238, 61.9048 }, - { 27.0476, 57.1429 }, - { 55.619, 47.619 }, - { 65.1429, 42.8571 }, - { 69.9048, 38.0952 }, - { 74.6667, 28.5714 }, - { 74.6667, 14.2857 }, - { 65.1429, 4.7619 }, - { 50.8571, 0 }, - { 31.8095, 0 }, - { 17.5238, 4.7619 }, - { 8, 14.2857 }, -}; - -static const StrokeRec char83[] = { - { 20, char83_stroke0 }, -}; - -/* char: 84 'T' */ - -static const CoordRec char84_stroke0[] = { - { 35.6933, 100 }, - { 35.6933, 0 }, -}; - -static const CoordRec char84_stroke1[] = { - { 2.36, 100 }, - { 69.0267, 100 }, -}; - -static const StrokeRec char84[] = { - { 2, char84_stroke0 }, - { 2, char84_stroke1 }, -}; - -/* char: 85 'U' */ - -static const CoordRec char85_stroke0[] = { - { 11.54, 100 }, - { 11.54, 28.5714 }, - { 16.3019, 14.2857 }, - { 25.8257, 4.7619 }, - { 40.1114, 0 }, - { 49.6352, 0 }, - { 63.921, 4.7619 }, - { 73.4448, 14.2857 }, - { 78.2067, 28.5714 }, - { 78.2067, 100 }, -}; - -static const StrokeRec char85[] = { - { 10, char85_stroke0 }, -}; - -/* char: 86 'V' */ - -static const CoordRec char86_stroke0[] = { - { 2.36, 100 }, - { 40.4552, 0 }, -}; - -static const CoordRec char86_stroke1[] = { - { 78.5505, 100 }, - { 40.4552, 0 }, -}; - -static const StrokeRec char86[] = { - { 2, char86_stroke0 }, - { 2, char86_stroke1 }, -}; - -/* char: 87 'W' */ - -static const CoordRec char87_stroke0[] = { - { 2.22, 100 }, - { 26.0295, 0 }, -}; - -static const CoordRec char87_stroke1[] = { - { 49.839, 100 }, - { 26.0295, 0 }, -}; - -static const CoordRec char87_stroke2[] = { - { 49.839, 100 }, - { 73.6486, 0 }, -}; - -static const CoordRec char87_stroke3[] = { - { 97.4581, 100 }, - { 73.6486, 0 }, -}; - -static const StrokeRec char87[] = { - { 2, char87_stroke0 }, - { 2, char87_stroke1 }, - { 2, char87_stroke2 }, - { 2, char87_stroke3 }, -}; - -/* char: 88 'X' */ - -static const CoordRec char88_stroke0[] = { - { 2.5, 100 }, - { 69.1667, 0 }, -}; - -static const CoordRec char88_stroke1[] = { - { 69.1667, 100 }, - { 2.5, 0 }, -}; - -static const StrokeRec char88[] = { - { 2, char88_stroke0 }, - { 2, char88_stroke1 }, -}; - -/* char: 89 'Y' */ - -static const CoordRec char89_stroke0[] = { - { 1.52, 100 }, - { 39.6152, 52.381 }, - { 39.6152, 0 }, -}; - -static const CoordRec char89_stroke1[] = { - { 77.7105, 100 }, - { 39.6152, 52.381 }, -}; - -static const StrokeRec char89[] = { - { 3, char89_stroke0 }, - { 2, char89_stroke1 }, -}; - -/* char: 90 'Z' */ - -static const CoordRec char90_stroke0[] = { - { 69.1667, 100 }, - { 2.5, 0 }, -}; - -static const CoordRec char90_stroke1[] = { - { 2.5, 100 }, - { 69.1667, 100 }, -}; - -static const CoordRec char90_stroke2[] = { - { 2.5, 0 }, - { 69.1667, 0 }, -}; - -static const StrokeRec char90[] = { - { 2, char90_stroke0 }, - { 2, char90_stroke1 }, - { 2, char90_stroke2 }, -}; - -/* char: 91 '[' */ - -static const CoordRec char91_stroke0[] = { - { 7.78, 119.048 }, - { 7.78, -33.3333 }, -}; - -static const CoordRec char91_stroke1[] = { - { 12.5419, 119.048 }, - { 12.5419, -33.3333 }, -}; - -static const CoordRec char91_stroke2[] = { - { 7.78, 119.048 }, - { 41.1133, 119.048 }, -}; - -static const CoordRec char91_stroke3[] = { - { 7.78, -33.3333 }, - { 41.1133, -33.3333 }, -}; - -static const StrokeRec char91[] = { - { 2, char91_stroke0 }, - { 2, char91_stroke1 }, - { 2, char91_stroke2 }, - { 2, char91_stroke3 }, -}; - -/* char: 92 '\' */ - -static const CoordRec char92_stroke0[] = { - { 5.84, 100 }, - { 72.5067, -14.2857 }, -}; - -static const StrokeRec char92[] = { - { 2, char92_stroke0 }, -}; - -/* char: 93 ']' */ - -static const CoordRec char93_stroke0[] = { - { 33.0114, 119.048 }, - { 33.0114, -33.3333 }, -}; - -static const CoordRec char93_stroke1[] = { - { 37.7733, 119.048 }, - { 37.7733, -33.3333 }, -}; - -static const CoordRec char93_stroke2[] = { - { 4.44, 119.048 }, - { 37.7733, 119.048 }, -}; - -static const CoordRec char93_stroke3[] = { - { 4.44, -33.3333 }, - { 37.7733, -33.3333 }, -}; - -static const StrokeRec char93[] = { - { 2, char93_stroke0 }, - { 2, char93_stroke1 }, - { 2, char93_stroke2 }, - { 2, char93_stroke3 }, -}; - -/* char: 94 '^' */ - -static const CoordRec char94_stroke0[] = { - { 44.0752, 109.524 }, - { 5.98, 42.8571 }, -}; - -static const CoordRec char94_stroke1[] = { - { 44.0752, 109.524 }, - { 82.1705, 42.8571 }, -}; - -static const StrokeRec char94[] = { - { 2, char94_stroke0 }, - { 2, char94_stroke1 }, -}; - -/* char: 95 '_' */ - -static const CoordRec char95_stroke0[] = { - { -1.1, -33.3333 }, - { 103.662, -33.3333 }, - { 103.662, -28.5714 }, - { -1.1, -28.5714 }, - { -1.1, -33.3333 }, -}; - -static const StrokeRec char95[] = { - { 5, char95_stroke0 }, -}; - -/* char: 96 '`' */ - -static const CoordRec char96_stroke0[] = { - { 33.0219, 100 }, - { 56.8314, 71.4286 }, -}; - -static const CoordRec char96_stroke1[] = { - { 33.0219, 100 }, - { 28.26, 95.2381 }, - { 56.8314, 71.4286 }, -}; - -static const StrokeRec char96[] = { - { 2, char96_stroke0 }, - { 3, char96_stroke1 }, -}; - -/* char: 97 'a' */ - -static const CoordRec char97_stroke0[] = { - { 63.8229, 66.6667 }, - { 63.8229, 0 }, -}; - -static const CoordRec char97_stroke1[] = { - { 63.8229, 52.381 }, - { 54.299, 61.9048 }, - { 44.7752, 66.6667 }, - { 30.4895, 66.6667 }, - { 20.9657, 61.9048 }, - { 11.4419, 52.381 }, - { 6.68, 38.0952 }, - { 6.68, 28.5714 }, - { 11.4419, 14.2857 }, - { 20.9657, 4.7619 }, - { 30.4895, 0 }, - { 44.7752, 0 }, - { 54.299, 4.7619 }, - { 63.8229, 14.2857 }, -}; - -static const StrokeRec char97[] = { - { 2, char97_stroke0 }, - { 14, char97_stroke1 }, -}; - -/* char: 98 'b' */ - -static const CoordRec char98_stroke0[] = { - { 8.76, 100 }, - { 8.76, 0 }, -}; - -static const CoordRec char98_stroke1[] = { - { 8.76, 52.381 }, - { 18.2838, 61.9048 }, - { 27.8076, 66.6667 }, - { 42.0933, 66.6667 }, - { 51.6171, 61.9048 }, - { 61.141, 52.381 }, - { 65.9029, 38.0952 }, - { 65.9029, 28.5714 }, - { 61.141, 14.2857 }, - { 51.6171, 4.7619 }, - { 42.0933, 0 }, - { 27.8076, 0 }, - { 18.2838, 4.7619 }, - { 8.76, 14.2857 }, -}; - -static const StrokeRec char98[] = { - { 2, char98_stroke0 }, - { 14, char98_stroke1 }, -}; - -/* char: 99 'c' */ - -static const CoordRec char99_stroke0[] = { - { 62.6629, 52.381 }, - { 53.139, 61.9048 }, - { 43.6152, 66.6667 }, - { 29.3295, 66.6667 }, - { 19.8057, 61.9048 }, - { 10.2819, 52.381 }, - { 5.52, 38.0952 }, - { 5.52, 28.5714 }, - { 10.2819, 14.2857 }, - { 19.8057, 4.7619 }, - { 29.3295, 0 }, - { 43.6152, 0 }, - { 53.139, 4.7619 }, - { 62.6629, 14.2857 }, -}; - -static const StrokeRec char99[] = { - { 14, char99_stroke0 }, -}; - -/* char: 100 'd' */ - -static const CoordRec char100_stroke0[] = { - { 61.7829, 100 }, - { 61.7829, 0 }, -}; - -static const CoordRec char100_stroke1[] = { - { 61.7829, 52.381 }, - { 52.259, 61.9048 }, - { 42.7352, 66.6667 }, - { 28.4495, 66.6667 }, - { 18.9257, 61.9048 }, - { 9.4019, 52.381 }, - { 4.64, 38.0952 }, - { 4.64, 28.5714 }, - { 9.4019, 14.2857 }, - { 18.9257, 4.7619 }, - { 28.4495, 0 }, - { 42.7352, 0 }, - { 52.259, 4.7619 }, - { 61.7829, 14.2857 }, -}; - -static const StrokeRec char100[] = { - { 2, char100_stroke0 }, - { 14, char100_stroke1 }, -}; - -/* char: 101 'e' */ - -static const CoordRec char101_stroke0[] = { - { 5.72, 38.0952 }, - { 62.8629, 38.0952 }, - { 62.8629, 47.619 }, - { 58.101, 57.1429 }, - { 53.339, 61.9048 }, - { 43.8152, 66.6667 }, - { 29.5295, 66.6667 }, - { 20.0057, 61.9048 }, - { 10.4819, 52.381 }, - { 5.72, 38.0952 }, - { 5.72, 28.5714 }, - { 10.4819, 14.2857 }, - { 20.0057, 4.7619 }, - { 29.5295, 0 }, - { 43.8152, 0 }, - { 53.339, 4.7619 }, - { 62.8629, 14.2857 }, -}; - -static const StrokeRec char101[] = { - { 17, char101_stroke0 }, -}; - -/* char: 102 'f' */ - -static const CoordRec char102_stroke0[] = { - { 38.7752, 100 }, - { 29.2514, 100 }, - { 19.7276, 95.2381 }, - { 14.9657, 80.9524 }, - { 14.9657, 0 }, -}; - -static const CoordRec char102_stroke1[] = { - { 0.68, 66.6667 }, - { 34.0133, 66.6667 }, -}; - -static const StrokeRec char102[] = { - { 5, char102_stroke0 }, - { 2, char102_stroke1 }, -}; - -/* char: 103 'g' */ - -static const CoordRec char103_stroke0[] = { - { 62.5029, 66.6667 }, - { 62.5029, -9.5238 }, - { 57.741, -23.8095 }, - { 52.979, -28.5714 }, - { 43.4552, -33.3333 }, - { 29.1695, -33.3333 }, - { 19.6457, -28.5714 }, -}; - -static const CoordRec char103_stroke1[] = { - { 62.5029, 52.381 }, - { 52.979, 61.9048 }, - { 43.4552, 66.6667 }, - { 29.1695, 66.6667 }, - { 19.6457, 61.9048 }, - { 10.1219, 52.381 }, - { 5.36, 38.0952 }, - { 5.36, 28.5714 }, - { 10.1219, 14.2857 }, - { 19.6457, 4.7619 }, - { 29.1695, 0 }, - { 43.4552, 0 }, - { 52.979, 4.7619 }, - { 62.5029, 14.2857 }, -}; - -static const StrokeRec char103[] = { - { 7, char103_stroke0 }, - { 14, char103_stroke1 }, -}; - -/* char: 104 'h' */ - -static const CoordRec char104_stroke0[] = { - { 9.6, 100 }, - { 9.6, 0 }, -}; - -static const CoordRec char104_stroke1[] = { - { 9.6, 47.619 }, - { 23.8857, 61.9048 }, - { 33.4095, 66.6667 }, - { 47.6952, 66.6667 }, - { 57.219, 61.9048 }, - { 61.981, 47.619 }, - { 61.981, 0 }, -}; - -static const StrokeRec char104[] = { - { 2, char104_stroke0 }, - { 7, char104_stroke1 }, -}; - -/* char: 105 'i' */ - -static const CoordRec char105_stroke0[] = { - { 10.02, 100 }, - { 14.7819, 95.2381 }, - { 19.5438, 100 }, - { 14.7819, 104.762 }, - { 10.02, 100 }, -}; - -static const CoordRec char105_stroke1[] = { - { 14.7819, 66.6667 }, - { 14.7819, 0 }, -}; - -static const StrokeRec char105[] = { - { 5, char105_stroke0 }, - { 2, char105_stroke1 }, -}; - -/* char: 106 'j' */ - -static const CoordRec char106_stroke0[] = { - { 17.3876, 100 }, - { 22.1495, 95.2381 }, - { 26.9114, 100 }, - { 22.1495, 104.762 }, - { 17.3876, 100 }, -}; - -static const CoordRec char106_stroke1[] = { - { 22.1495, 66.6667 }, - { 22.1495, -14.2857 }, - { 17.3876, -28.5714 }, - { 7.8638, -33.3333 }, - { -1.66, -33.3333 }, -}; - -static const StrokeRec char106[] = { - { 5, char106_stroke0 }, - { 5, char106_stroke1 }, -}; - -/* char: 107 'k' */ - -static const CoordRec char107_stroke0[] = { - { 9.6, 100 }, - { 9.6, 0 }, -}; - -static const CoordRec char107_stroke1[] = { - { 57.219, 66.6667 }, - { 9.6, 19.0476 }, -}; - -static const CoordRec char107_stroke2[] = { - { 28.6476, 38.0952 }, - { 61.981, 0 }, -}; - -static const StrokeRec char107[] = { - { 2, char107_stroke0 }, - { 2, char107_stroke1 }, - { 2, char107_stroke2 }, -}; - -/* char: 108 'l' */ - -static const CoordRec char108_stroke0[] = { - { 10.02, 100 }, - { 10.02, 0 }, -}; - -static const StrokeRec char108[] = { - { 2, char108_stroke0 }, -}; - -/* char: 109 'm' */ - -static const CoordRec char109_stroke0[] = { - { 9.6, 66.6667 }, - { 9.6, 0 }, -}; - -static const CoordRec char109_stroke1[] = { - { 9.6, 47.619 }, - { 23.8857, 61.9048 }, - { 33.4095, 66.6667 }, - { 47.6952, 66.6667 }, - { 57.219, 61.9048 }, - { 61.981, 47.619 }, - { 61.981, 0 }, -}; - -static const CoordRec char109_stroke2[] = { - { 61.981, 47.619 }, - { 76.2667, 61.9048 }, - { 85.7905, 66.6667 }, - { 100.076, 66.6667 }, - { 109.6, 61.9048 }, - { 114.362, 47.619 }, - { 114.362, 0 }, -}; - -static const StrokeRec char109[] = { - { 2, char109_stroke0 }, - { 7, char109_stroke1 }, - { 7, char109_stroke2 }, -}; - -/* char: 110 'n' */ - -static const CoordRec char110_stroke0[] = { - { 9.18, 66.6667 }, - { 9.18, 0 }, -}; - -static const CoordRec char110_stroke1[] = { - { 9.18, 47.619 }, - { 23.4657, 61.9048 }, - { 32.9895, 66.6667 }, - { 47.2752, 66.6667 }, - { 56.799, 61.9048 }, - { 61.561, 47.619 }, - { 61.561, 0 }, -}; - -static const StrokeRec char110[] = { - { 2, char110_stroke0 }, - { 7, char110_stroke1 }, -}; - -/* char: 111 'o' */ - -static const CoordRec char111_stroke0[] = { - { 28.7895, 66.6667 }, - { 19.2657, 61.9048 }, - { 9.7419, 52.381 }, - { 4.98, 38.0952 }, - { 4.98, 28.5714 }, - { 9.7419, 14.2857 }, - { 19.2657, 4.7619 }, - { 28.7895, 0 }, - { 43.0752, 0 }, - { 52.599, 4.7619 }, - { 62.1229, 14.2857 }, - { 66.8848, 28.5714 }, - { 66.8848, 38.0952 }, - { 62.1229, 52.381 }, - { 52.599, 61.9048 }, - { 43.0752, 66.6667 }, - { 28.7895, 66.6667 }, -}; - -static const StrokeRec char111[] = { - { 17, char111_stroke0 }, -}; - -/* char: 112 'p' */ - -static const CoordRec char112_stroke0[] = { - { 9.46, 66.6667 }, - { 9.46, -33.3333 }, -}; - -static const CoordRec char112_stroke1[] = { - { 9.46, 52.381 }, - { 18.9838, 61.9048 }, - { 28.5076, 66.6667 }, - { 42.7933, 66.6667 }, - { 52.3171, 61.9048 }, - { 61.841, 52.381 }, - { 66.6029, 38.0952 }, - { 66.6029, 28.5714 }, - { 61.841, 14.2857 }, - { 52.3171, 4.7619 }, - { 42.7933, 0 }, - { 28.5076, 0 }, - { 18.9838, 4.7619 }, - { 9.46, 14.2857 }, -}; - -static const StrokeRec char112[] = { - { 2, char112_stroke0 }, - { 14, char112_stroke1 }, -}; - -/* char: 113 'q' */ - -static const CoordRec char113_stroke0[] = { - { 61.9829, 66.6667 }, - { 61.9829, -33.3333 }, -}; - -static const CoordRec char113_stroke1[] = { - { 61.9829, 52.381 }, - { 52.459, 61.9048 }, - { 42.9352, 66.6667 }, - { 28.6495, 66.6667 }, - { 19.1257, 61.9048 }, - { 9.6019, 52.381 }, - { 4.84, 38.0952 }, - { 4.84, 28.5714 }, - { 9.6019, 14.2857 }, - { 19.1257, 4.7619 }, - { 28.6495, 0 }, - { 42.9352, 0 }, - { 52.459, 4.7619 }, - { 61.9829, 14.2857 }, -}; - -static const StrokeRec char113[] = { - { 2, char113_stroke0 }, - { 14, char113_stroke1 }, -}; - -/* char: 114 'r' */ - -static const CoordRec char114_stroke0[] = { - { 9.46, 66.6667 }, - { 9.46, 0 }, -}; - -static const CoordRec char114_stroke1[] = { - { 9.46, 38.0952 }, - { 14.2219, 52.381 }, - { 23.7457, 61.9048 }, - { 33.2695, 66.6667 }, - { 47.5552, 66.6667 }, -}; - -static const StrokeRec char114[] = { - { 2, char114_stroke0 }, - { 5, char114_stroke1 }, -}; - -/* char: 115 's' */ - -static const CoordRec char115_stroke0[] = { - { 57.081, 52.381 }, - { 52.319, 61.9048 }, - { 38.0333, 66.6667 }, - { 23.7476, 66.6667 }, - { 9.4619, 61.9048 }, - { 4.7, 52.381 }, - { 9.4619, 42.8571 }, - { 18.9857, 38.0952 }, - { 42.7952, 33.3333 }, - { 52.319, 28.5714 }, - { 57.081, 19.0476 }, - { 57.081, 14.2857 }, - { 52.319, 4.7619 }, - { 38.0333, 0 }, - { 23.7476, 0 }, - { 9.4619, 4.7619 }, - { 4.7, 14.2857 }, -}; - -static const StrokeRec char115[] = { - { 17, char115_stroke0 }, -}; - -/* char: 116 't' */ - -static const CoordRec char116_stroke0[] = { - { 14.8257, 100 }, - { 14.8257, 19.0476 }, - { 19.5876, 4.7619 }, - { 29.1114, 0 }, - { 38.6352, 0 }, -}; - -static const CoordRec char116_stroke1[] = { - { 0.54, 66.6667 }, - { 33.8733, 66.6667 }, -}; - -static const StrokeRec char116[] = { - { 5, char116_stroke0 }, - { 2, char116_stroke1 }, -}; - -/* char: 117 'u' */ - -static const CoordRec char117_stroke0[] = { - { 9.46, 66.6667 }, - { 9.46, 19.0476 }, - { 14.2219, 4.7619 }, - { 23.7457, 0 }, - { 38.0314, 0 }, - { 47.5552, 4.7619 }, - { 61.841, 19.0476 }, -}; - -static const CoordRec char117_stroke1[] = { - { 61.841, 66.6667 }, - { 61.841, 0 }, -}; - -static const StrokeRec char117[] = { - { 7, char117_stroke0 }, - { 2, char117_stroke1 }, -}; - -/* char: 118 'v' */ - -static const CoordRec char118_stroke0[] = { - { 1.8, 66.6667 }, - { 30.3714, 0 }, -}; - -static const CoordRec char118_stroke1[] = { - { 58.9429, 66.6667 }, - { 30.3714, 0 }, -}; - -static const StrokeRec char118[] = { - { 2, char118_stroke0 }, - { 2, char118_stroke1 }, -}; - -/* char: 119 'w' */ - -static const CoordRec char119_stroke0[] = { - { 2.5, 66.6667 }, - { 21.5476, 0 }, -}; - -static const CoordRec char119_stroke1[] = { - { 40.5952, 66.6667 }, - { 21.5476, 0 }, -}; - -static const CoordRec char119_stroke2[] = { - { 40.5952, 66.6667 }, - { 59.6429, 0 }, -}; - -static const CoordRec char119_stroke3[] = { - { 78.6905, 66.6667 }, - { 59.6429, 0 }, -}; - -static const StrokeRec char119[] = { - { 2, char119_stroke0 }, - { 2, char119_stroke1 }, - { 2, char119_stroke2 }, - { 2, char119_stroke3 }, -}; - -/* char: 120 'x' */ - -static const CoordRec char120_stroke0[] = { - { 1.66, 66.6667 }, - { 54.041, 0 }, -}; - -static const CoordRec char120_stroke1[] = { - { 54.041, 66.6667 }, - { 1.66, 0 }, -}; - -static const StrokeRec char120[] = { - { 2, char120_stroke0 }, - { 2, char120_stroke1 }, -}; - -/* char: 121 'y' */ - -static const CoordRec char121_stroke0[] = { - { 6.5619, 66.6667 }, - { 35.1333, 0 }, -}; - -static const CoordRec char121_stroke1[] = { - { 63.7048, 66.6667 }, - { 35.1333, 0 }, - { 25.6095, -19.0476 }, - { 16.0857, -28.5714 }, - { 6.5619, -33.3333 }, - { 1.8, -33.3333 }, -}; - -static const StrokeRec char121[] = { - { 2, char121_stroke0 }, - { 6, char121_stroke1 }, -}; - -/* char: 122 'z' */ - -static const CoordRec char122_stroke0[] = { - { 56.821, 66.6667 }, - { 4.44, 0 }, -}; - -static const CoordRec char122_stroke1[] = { - { 4.44, 66.6667 }, - { 56.821, 66.6667 }, -}; - -static const CoordRec char122_stroke2[] = { - { 4.44, 0 }, - { 56.821, 0 }, -}; - -static const StrokeRec char122[] = { - { 2, char122_stroke0 }, - { 2, char122_stroke1 }, - { 2, char122_stroke2 }, -}; - -/* char: 123 '{' */ - -static const CoordRec char123_stroke0[] = { - { 31.1895, 119.048 }, - { 21.6657, 114.286 }, - { 16.9038, 109.524 }, - { 12.1419, 100 }, - { 12.1419, 90.4762 }, - { 16.9038, 80.9524 }, - { 21.6657, 76.1905 }, - { 26.4276, 66.6667 }, - { 26.4276, 57.1429 }, - { 16.9038, 47.619 }, -}; - -static const CoordRec char123_stroke1[] = { - { 21.6657, 114.286 }, - { 16.9038, 104.762 }, - { 16.9038, 95.2381 }, - { 21.6657, 85.7143 }, - { 26.4276, 80.9524 }, - { 31.1895, 71.4286 }, - { 31.1895, 61.9048 }, - { 26.4276, 52.381 }, - { 7.38, 42.8571 }, - { 26.4276, 33.3333 }, - { 31.1895, 23.8095 }, - { 31.1895, 14.2857 }, - { 26.4276, 4.7619 }, - { 21.6657, 0 }, - { 16.9038, -9.5238 }, - { 16.9038, -19.0476 }, - { 21.6657, -28.5714 }, -}; - -static const CoordRec char123_stroke2[] = { - { 16.9038, 38.0952 }, - { 26.4276, 28.5714 }, - { 26.4276, 19.0476 }, - { 21.6657, 9.5238 }, - { 16.9038, 4.7619 }, - { 12.1419, -4.7619 }, - { 12.1419, -14.2857 }, - { 16.9038, -23.8095 }, - { 21.6657, -28.5714 }, - { 31.1895, -33.3333 }, -}; - -static const StrokeRec char123[] = { - { 10, char123_stroke0 }, - { 17, char123_stroke1 }, - { 10, char123_stroke2 }, -}; - -/* char: 124 '|' */ - -static const CoordRec char124_stroke0[] = { - { 11.54, 119.048 }, - { 11.54, -33.3333 }, -}; - -static const StrokeRec char124[] = { - { 2, char124_stroke0 }, -}; - -/* char: 125 '}' */ - -static const CoordRec char125_stroke0[] = { - { 9.18, 119.048 }, - { 18.7038, 114.286 }, - { 23.4657, 109.524 }, - { 28.2276, 100 }, - { 28.2276, 90.4762 }, - { 23.4657, 80.9524 }, - { 18.7038, 76.1905 }, - { 13.9419, 66.6667 }, - { 13.9419, 57.1429 }, - { 23.4657, 47.619 }, -}; - -static const CoordRec char125_stroke1[] = { - { 18.7038, 114.286 }, - { 23.4657, 104.762 }, - { 23.4657, 95.2381 }, - { 18.7038, 85.7143 }, - { 13.9419, 80.9524 }, - { 9.18, 71.4286 }, - { 9.18, 61.9048 }, - { 13.9419, 52.381 }, - { 32.9895, 42.8571 }, - { 13.9419, 33.3333 }, - { 9.18, 23.8095 }, - { 9.18, 14.2857 }, - { 13.9419, 4.7619 }, - { 18.7038, 0 }, - { 23.4657, -9.5238 }, - { 23.4657, -19.0476 }, - { 18.7038, -28.5714 }, -}; - -static const CoordRec char125_stroke2[] = { - { 23.4657, 38.0952 }, - { 13.9419, 28.5714 }, - { 13.9419, 19.0476 }, - { 18.7038, 9.5238 }, - { 23.4657, 4.7619 }, - { 28.2276, -4.7619 }, - { 28.2276, -14.2857 }, - { 23.4657, -23.8095 }, - { 18.7038, -28.5714 }, - { 9.18, -33.3333 }, -}; - -static const StrokeRec char125[] = { - { 10, char125_stroke0 }, - { 17, char125_stroke1 }, - { 10, char125_stroke2 }, -}; - -/* char: 126 '~' */ - -static const CoordRec char126_stroke0[] = { - { 2.92, 28.5714 }, - { 2.92, 38.0952 }, - { 7.6819, 52.381 }, - { 17.2057, 57.1429 }, - { 26.7295, 57.1429 }, - { 36.2533, 52.381 }, - { 55.301, 38.0952 }, - { 64.8248, 33.3333 }, - { 74.3486, 33.3333 }, - { 83.8724, 38.0952 }, - { 88.6343, 47.619 }, -}; - -static const CoordRec char126_stroke1[] = { - { 2.92, 38.0952 }, - { 7.6819, 47.619 }, - { 17.2057, 52.381 }, - { 26.7295, 52.381 }, - { 36.2533, 47.619 }, - { 55.301, 33.3333 }, - { 64.8248, 28.5714 }, - { 74.3486, 28.5714 }, - { 83.8724, 33.3333 }, - { 88.6343, 47.619 }, - { 88.6343, 57.1429 }, -}; - -static const StrokeRec char126[] = { - { 11, char126_stroke0 }, - { 11, char126_stroke1 }, -}; - -/* char: 127 */ - -static const CoordRec char127_stroke0[] = { - { 52.381, 100 }, - { 14.2857, -33.3333 }, -}; - -static const CoordRec char127_stroke1[] = { - { 28.5714, 66.6667 }, - { 14.2857, 61.9048 }, - { 4.7619, 52.381 }, - { 0, 38.0952 }, - { 0, 23.8095 }, - { 4.7619, 14.2857 }, - { 14.2857, 4.7619 }, - { 28.5714, 0 }, - { 38.0952, 0 }, - { 52.381, 4.7619 }, - { 61.9048, 14.2857 }, - { 66.6667, 28.5714 }, - { 66.6667, 42.8571 }, - { 61.9048, 52.381 }, - { 52.381, 61.9048 }, - { 38.0952, 66.6667 }, - { 28.5714, 66.6667 }, -}; - -static const StrokeRec char127[] = { - { 2, char127_stroke0 }, - { 17, char127_stroke1 }, -}; - -static const StrokeCharRec chars[] = { - { 0, /* char0 */ 0, 0, 0 }, - { 0, /* char1 */ 0, 0, 0 }, - { 0, /* char2 */ 0, 0, 0 }, - { 0, /* char3 */ 0, 0, 0 }, - { 0, /* char4 */ 0, 0, 0 }, - { 0, /* char5 */ 0, 0, 0 }, - { 0, /* char6 */ 0, 0, 0 }, - { 0, /* char7 */ 0, 0, 0 }, - { 0, /* char8 */ 0, 0, 0 }, - { 0, /* char9 */ 0, 0, 0 }, - { 0, /* char10 */ 0, 0, 0 }, - { 0, /* char11 */ 0, 0, 0 }, - { 0, /* char12 */ 0, 0, 0 }, - { 0, /* char13 */ 0, 0, 0 }, - { 0, /* char14 */ 0, 0, 0 }, - { 0, /* char15 */ 0, 0, 0 }, - { 0, /* char16 */ 0, 0, 0 }, - { 0, /* char17 */ 0, 0, 0 }, - { 0, /* char18 */ 0, 0, 0 }, - { 0, /* char19 */ 0, 0, 0 }, - { 0, /* char20 */ 0, 0, 0 }, - { 0, /* char21 */ 0, 0, 0 }, - { 0, /* char22 */ 0, 0, 0 }, - { 0, /* char23 */ 0, 0, 0 }, - { 0, /* char24 */ 0, 0, 0 }, - { 0, /* char25 */ 0, 0, 0 }, - { 0, /* char26 */ 0, 0, 0 }, - { 0, /* char27 */ 0, 0, 0 }, - { 0, /* char28 */ 0, 0, 0 }, - { 0, /* char29 */ 0, 0, 0 }, - { 0, /* char30 */ 0, 0, 0 }, - { 0, /* char31 */ 0, 0, 0 }, - { 0, /* char32 */ 0, 52.381, 104.762 }, - { 2, char33, 13.3819, 26.6238 }, - { 2, char34, 23.0676, 51.4352 }, - { 4, char35, 36.5333, 79.4886 }, - { 3, char36, 38.1533, 76.2067 }, - { 3, char37, 49.2171, 96.5743 }, - { 1, char38, 53.599, 101.758 }, - { 1, char39, 4.44, 13.62 }, - { 1, char40, 21.8657, 47.1733 }, - { 1, char41, 24.3276, 47.5333 }, - { 3, char42, 30.7695, 59.439 }, - { 2, char43, 48.8371, 97.2543 }, - { 1, char44, 13.5219, 26.0638 }, - { 1, char45, 50.2371, 100.754 }, - { 1, char46, 13.1019, 26.4838 }, - { 1, char47, 40.5733, 82.1067 }, - { 1, char48, 38.3133, 77.0667 }, - { 1, char49, 30.8676, 66.5295 }, - { 1, char50, 38.7533, 77.6467 }, - { 1, char51, 38.3333, 77.0467 }, - { 2, char52, 37.2133, 80.1686 }, - { 1, char53, 38.1933, 77.6867 }, - { 1, char54, 34.1514, 73.8048 }, - { 2, char55, 38.8933, 77.2267 }, - { 1, char56, 38.9333, 77.6667 }, - { 1, char57, 39.9333, 74.0648 }, - { 2, char58, 14.0819, 26.2238 }, - { 2, char59, 12.9619, 26.3038 }, - { 1, char60, 41.1552, 81.6105 }, - { 2, char61, 48.5571, 97.2543 }, - { 1, char62, 40.8752, 81.6105 }, - { 2, char63, 36.9914, 73.9029 }, - { 2, char64, 34.9314, 74.3648 }, - { 3, char65, 40.5952, 80.4905 }, - { 3, char66, 44.7533, 83.6267 }, - { 1, char67, 39.9933, 84.4886 }, - { 2, char68, 45.2933, 85.2867 }, - { 4, char69, 39.9914, 78.1848 }, - { 3, char70, 39.9914, 78.7448 }, - { 2, char71, 40.3933, 89.7686 }, - { 3, char72, 44.7533, 89.0867 }, - { 1, char73, 10.86, 21.3 }, - { 1, char74, 31.0714, 59.999 }, - { 3, char75, 44.6133, 79.3267 }, - { 2, char76, 40.2514, 71.3229 }, - { 4, char77, 48.9552, 97.2105 }, - { 3, char78, 44.4733, 88.8067 }, - { 1, char79, 44.3352, 88.8305 }, - { 2, char80, 45.4333, 85.6667 }, - { 2, char81, 43.3952, 88.0905 }, - { 3, char82, 45.0133, 82.3667 }, - { 1, char83, 41.3333, 80.8267 }, - { 2, char84, 35.6933, 71.9467 }, - { 1, char85, 44.8733, 89.4867 }, - { 2, char86, 40.4552, 81.6105 }, - { 4, char87, 49.839, 100.518 }, - { 2, char88, 35.8333, 72.3667 }, - { 2, char89, 39.6152, 79.6505 }, - { 3, char90, 35.8333, 73.7467 }, - { 4, char91, 22.0657, 46.1133 }, - { 1, char92, 39.1733, 78.2067 }, - { 4, char93, 23.4876, 46.3933 }, - { 2, char94, 44.0752, 90.2305 }, - { 1, char95, 51.281, 104.062 }, - { 2, char96, 42.5457, 83.5714 }, - { 2, char97, 35.2514, 66.6029 }, - { 2, char98, 37.3314, 70.4629 }, - { 1, char99, 34.0914, 68.9229 }, - { 2, char100, 33.2114, 70.2629 }, - { 1, char101, 34.2914, 68.5229 }, - { 2, char102, 14.9657, 38.6552 }, - { 2, char103, 33.9314, 70.9829 }, - { 2, char104, 33.4095, 71.021 }, - { 2, char105, 14.7819, 28.8638 }, - { 2, char106, 17.3876, 36.2314 }, - { 3, char107, 33.4095, 62.521 }, - { 1, char108, 10.02, 19.34 }, - { 3, char109, 61.981, 123.962 }, - { 2, char110, 32.9895, 70.881 }, - { 1, char111, 33.5514, 71.7448 }, - { 2, char112, 38.0314, 70.8029 }, - { 2, char113, 33.4114, 70.7429 }, - { 2, char114, 23.7457, 49.4952 }, - { 1, char115, 28.5095, 62.321 }, - { 2, char116, 14.8257, 39.3152 }, - { 2, char117, 33.2695, 71.161 }, - { 2, char118, 30.3714, 60.6029 }, - { 4, char119, 40.5952, 80.4905 }, - { 2, char120, 25.4695, 56.401 }, - { 2, char121, 35.1333, 66.0648 }, - { 3, char122, 28.2495, 61.821 }, - { 3, char123, 21.6657, 41.6295 }, - { 1, char124, 11.54, 23.78 }, - { 3, char125, 18.7038, 41.4695 }, - { 2, char126, 45.7771, 91.2743 }, - { 2, char127, 33.3333, 66.6667 }, -}; - -StrokeFontRec glutStrokeRoman = { "Roman", 128, chars, 119.048, -33.3333 }; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_shapes.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_shapes.cpp deleted file mode 100644 index 76b0809511..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_shapes.cpp +++ /dev/null @@ -1,595 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/** -(c) Copyright 1993, Silicon Graphics, Inc. - -ALL RIGHTS RESERVED - -Permission to use, copy, modify, and distribute this software -for any purpose and without fee is hereby granted, provided -that the above copyright notice appear in all copies and that -both the copyright notice and this permission notice appear in -supporting documentation, and that the name of Silicon -Graphics, Inc. not be used in advertising or publicity -pertaining to distribution of the software without specific, -written prior permission. - -THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU -"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR -OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO -EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE -ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER, -INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE, -SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR -NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR -PERFORMANCE OF THIS SOFTWARE. - -US Government Users Restricted Rights - -Use, duplication, or disclosure by the Government is subject to -restrictions set forth in FAR 52.227.19(c)(2) or subparagraph -(c)(1)(ii) of the Rights in Technical Data and Computer -Software clause at DFARS 252.227-7013 and/or in similar or -successor clauses in the FAR or the DOD or NASA FAR -Supplement. Unpublished-- rights reserved under the copyright -laws of the United States. Contractor/manufacturer is Silicon -Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA -94039-7311. - -OpenGL(TM) is a trademark of Silicon Graphics, Inc. -*/ - -#include -#include "glutint.h" - -/* Some files do not define M_PI... */ -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -static GLUquadricObj *quadObj; - -#define QUAD_OBJ_INIT() { if(!quadObj) initQuadObj(); } - -static void -initQuadObj(void) -{ - quadObj = gluNewQuadric(); - if (!quadObj) - __glutFatalError("out of memory."); -} - -/* CENTRY */ -void GLUTAPIENTRY -glutWireSphere(GLdouble radius, GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_LINE); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluSphere(quadObj, radius, slices, stacks); -} - -void GLUTAPIENTRY -glutSolidSphere(GLdouble radius, GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_FILL); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluSphere(quadObj, radius, slices, stacks); -} - -void GLUTAPIENTRY -glutWireCone(GLdouble base, GLdouble height, - GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_LINE); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluCylinder(quadObj, base, 0.0, height, slices, stacks); -} - -void GLUTAPIENTRY -glutSolidCone(GLdouble base, GLdouble height, - GLint slices, GLint stacks) -{ - QUAD_OBJ_INIT(); - gluQuadricDrawStyle(quadObj, GLU_FILL); - gluQuadricNormals(quadObj, GLU_SMOOTH); - /* If we ever changed/used the texture or orientation state - of quadObj, we'd need to change it to the defaults here - with gluQuadricTexture and/or gluQuadricOrientation. */ - gluCylinder(quadObj, base, 0.0, height, slices, stacks); -} - -/* ENDCENTRY */ - -static void -drawBox(GLfloat size, GLenum type) -{ - static GLfloat n[6][3] = - { - {-1.0, 0.0, 0.0}, - {0.0, 1.0, 0.0}, - {1.0, 0.0, 0.0}, - {0.0, -1.0, 0.0}, - {0.0, 0.0, 1.0}, - {0.0, 0.0, -1.0} - }; - static GLint faces[6][4] = - { - {0, 1, 2, 3}, - {3, 2, 6, 7}, - {7, 6, 5, 4}, - {4, 5, 1, 0}, - {5, 6, 2, 1}, - {7, 4, 0, 3} - }; - GLfloat v[8][3]; - GLint i; - - v[0][0] = v[1][0] = v[2][0] = v[3][0] = -size / 2; - v[4][0] = v[5][0] = v[6][0] = v[7][0] = size / 2; - v[0][1] = v[1][1] = v[4][1] = v[5][1] = -size / 2; - v[2][1] = v[3][1] = v[6][1] = v[7][1] = size / 2; - v[0][2] = v[3][2] = v[4][2] = v[7][2] = -size / 2; - v[1][2] = v[2][2] = v[5][2] = v[6][2] = size / 2; - - for (i = 5; i >= 0; i--) { - glBegin(type); - glNormal3fv(&n[i][0]); - glVertex3fv(&v[faces[i][0]][0]); - glVertex3fv(&v[faces[i][1]][0]); - glVertex3fv(&v[faces[i][2]][0]); - glVertex3fv(&v[faces[i][3]][0]); - glEnd(); - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutWireCube(GLdouble size) -{ - drawBox(size, GL_LINE_LOOP); -} - -void GLUTAPIENTRY -glutSolidCube(GLdouble size) -{ - drawBox(size, GL_QUADS); -} - -/* ENDCENTRY */ - -static void -doughnut(GLfloat r, GLfloat R, GLint nsides, GLint rings) -{ - int i, j; - GLfloat theta, phi, theta1; - GLfloat cosTheta, sinTheta; - GLfloat cosTheta1, sinTheta1; - GLfloat ringDelta, sideDelta; - - ringDelta = 2.0 * M_PI / rings; - sideDelta = 2.0 * M_PI / nsides; - - theta = 0.0; - cosTheta = 1.0; - sinTheta = 0.0; - for (i = rings - 1; i >= 0; i--) { - theta1 = theta + ringDelta; - cosTheta1 = cos(theta1); - sinTheta1 = sin(theta1); - glBegin(GL_QUAD_STRIP); - phi = 0.0; - for (j = nsides; j >= 0; j--) { - GLfloat cosPhi, sinPhi, dist; - - phi += sideDelta; - cosPhi = cos(phi); - sinPhi = sin(phi); - dist = R + r * cosPhi; - - glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi, sinPhi); - glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, r * sinPhi); - glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi); - glVertex3f(cosTheta * dist, -sinTheta * dist, r * sinPhi); - } - glEnd(); - theta = theta1; - cosTheta = cosTheta1; - sinTheta = sinTheta1; - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, - GLint nsides, GLint rings) -{ - glPushAttrib(GL_POLYGON_BIT); - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - doughnut(innerRadius, outerRadius, nsides, rings); - glPopAttrib(); -} - -void GLUTAPIENTRY -glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, - GLint nsides, GLint rings) -{ - doughnut(innerRadius, outerRadius, nsides, rings); -} - -/* ENDCENTRY */ - -static GLfloat dodec[20][3]; - -static void -initDodecahedron(void) -{ - GLfloat alpha, beta; - - alpha = sqrt(2.0 / (3.0 + sqrt(5.0))); - beta = 1.0 + sqrt(6.0 / (3.0 + sqrt(5.0)) - - 2.0 + 2.0 * sqrt(2.0 / (3.0 + sqrt(5.0)))); - /* *INDENT-OFF* */ - dodec[0][0] = -alpha; dodec[0][1] = 0; dodec[0][2] = beta; - dodec[1][0] = alpha; dodec[1][1] = 0; dodec[1][2] = beta; - dodec[2][0] = -1; dodec[2][1] = -1; dodec[2][2] = -1; - dodec[3][0] = -1; dodec[3][1] = -1; dodec[3][2] = 1; - dodec[4][0] = -1; dodec[4][1] = 1; dodec[4][2] = -1; - dodec[5][0] = -1; dodec[5][1] = 1; dodec[5][2] = 1; - dodec[6][0] = 1; dodec[6][1] = -1; dodec[6][2] = -1; - dodec[7][0] = 1; dodec[7][1] = -1; dodec[7][2] = 1; - dodec[8][0] = 1; dodec[8][1] = 1; dodec[8][2] = -1; - dodec[9][0] = 1; dodec[9][1] = 1; dodec[9][2] = 1; - dodec[10][0] = beta; dodec[10][1] = alpha; dodec[10][2] = 0; - dodec[11][0] = beta; dodec[11][1] = -alpha; dodec[11][2] = 0; - dodec[12][0] = -beta; dodec[12][1] = alpha; dodec[12][2] = 0; - dodec[13][0] = -beta; dodec[13][1] = -alpha; dodec[13][2] = 0; - dodec[14][0] = -alpha; dodec[14][1] = 0; dodec[14][2] = -beta; - dodec[15][0] = alpha; dodec[15][1] = 0; dodec[15][2] = -beta; - dodec[16][0] = 0; dodec[16][1] = beta; dodec[16][2] = alpha; - dodec[17][0] = 0; dodec[17][1] = beta; dodec[17][2] = -alpha; - dodec[18][0] = 0; dodec[18][1] = -beta; dodec[18][2] = alpha; - dodec[19][0] = 0; dodec[19][1] = -beta; dodec[19][2] = -alpha; - /* *INDENT-ON* */ - -} - -#define DIFF3(_a,_b,_c) { \ - (_c)[0] = (_a)[0] - (_b)[0]; \ - (_c)[1] = (_a)[1] - (_b)[1]; \ - (_c)[2] = (_a)[2] - (_b)[2]; \ -} - -static void -crossprod(GLfloat v1[3], GLfloat v2[3], GLfloat prod[3]) -{ - GLfloat p[3]; /* in case prod == v1 or v2 */ - - p[0] = v1[1] * v2[2] - v2[1] * v1[2]; - p[1] = v1[2] * v2[0] - v2[2] * v1[0]; - p[2] = v1[0] * v2[1] - v2[0] * v1[1]; - prod[0] = p[0]; - prod[1] = p[1]; - prod[2] = p[2]; -} - -static void -normalize(GLfloat v[3]) -{ - GLfloat d; - - d = sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); - if (d == 0.0) { - __glutWarning("normalize: zero length vector"); - v[0] = d = 1.0; - } - d = 1 / d; - v[0] *= d; - v[1] *= d; - v[2] *= d; -} - -static void -pentagon(int a, int b, int c, int d, int e, GLenum shadeType) -{ - GLfloat n0[3], d1[3], d2[3]; - - DIFF3(dodec[a], dodec[b], d1); - DIFF3(dodec[b], dodec[c], d2); - crossprod(d1, d2, n0); - normalize(n0); - - glBegin(shadeType); - glNormal3fv(n0); - glVertex3fv(&dodec[a][0]); - glVertex3fv(&dodec[b][0]); - glVertex3fv(&dodec[c][0]); - glVertex3fv(&dodec[d][0]); - glVertex3fv(&dodec[e][0]); - glEnd(); -} - -static void -dodecahedron(GLenum type) -{ - static int inited = 0; - - if (inited == 0) { - inited = 1; - initDodecahedron(); - } - pentagon(0, 1, 9, 16, 5, type); - pentagon(1, 0, 3, 18, 7, type); - pentagon(1, 7, 11, 10, 9, type); - pentagon(11, 7, 18, 19, 6, type); - pentagon(8, 17, 16, 9, 10, type); - pentagon(2, 14, 15, 6, 19, type); - pentagon(2, 13, 12, 4, 14, type); - pentagon(2, 19, 18, 3, 13, type); - pentagon(3, 0, 5, 12, 13, type); - pentagon(6, 15, 8, 10, 11, type); - pentagon(4, 17, 8, 15, 14, type); - pentagon(4, 12, 5, 16, 17, type); -} - -/* CENTRY */ -void GLUTAPIENTRY glutWireDodecahedron(void) -{ - dodecahedron(GL_LINE_LOOP); -} - -void GLUTAPIENTRY -glutSolidDodecahedron(void) -{ - dodecahedron(GL_TRIANGLE_FAN); -} - -/* ENDCENTRY */ - -static void -recorditem(GLfloat * n1, GLfloat * n2, GLfloat * n3, - GLenum shadeType) -{ - GLfloat q0[3], q1[3]; - - DIFF3(n1, n2, q0); - DIFF3(n2, n3, q1); - crossprod(q0, q1, q1); - normalize(q1); - - glBegin(shadeType); - glNormal3fv(q1); - glVertex3fv(n1); - glVertex3fv(n2); - glVertex3fv(n3); - glEnd(); -} - -static void -subdivide(GLfloat * v0, GLfloat * v1, GLfloat * v2, - GLenum shadeType) -{ - int depth; - GLfloat w0[3], w1[3], w2[3]; - GLfloat l; - int i, j, k, n; - - depth = 1; - for (i = 0; i < depth; i++) { - for (j = 0; i + j < depth; j++) { - k = depth - i - j; - for (n = 0; n < 3; n++) { - w0[n] = (i * v0[n] + j * v1[n] + k * v2[n]) / depth; - w1[n] = ((i + 1) * v0[n] + j * v1[n] + (k - 1) * v2[n]) - / depth; - w2[n] = (i * v0[n] + (j + 1) * v1[n] + (k - 1) * v2[n]) - / depth; - } - l = sqrt(w0[0] * w0[0] + w0[1] * w0[1] + w0[2] * w0[2]); - w0[0] /= l; - w0[1] /= l; - w0[2] /= l; - l = sqrt(w1[0] * w1[0] + w1[1] * w1[1] + w1[2] * w1[2]); - w1[0] /= l; - w1[1] /= l; - w1[2] /= l; - l = sqrt(w2[0] * w2[0] + w2[1] * w2[1] + w2[2] * w2[2]); - w2[0] /= l; - w2[1] /= l; - w2[2] /= l; - recorditem(w1, w0, w2, shadeType); - } - } -} - -static void -drawtriangle(int i, GLfloat data[][3], int ndx[][3], - GLenum shadeType) -{ - GLfloat *x0, *x1, *x2; - - x0 = data[ndx[i][0]]; - x1 = data[ndx[i][1]]; - x2 = data[ndx[i][2]]; - subdivide(x0, x1, x2, shadeType); -} - -/* octahedron data: The octahedron produced is centered at the - origin and has radius 1.0 */ -static GLfloat odata[6][3] = -{ - {1.0, 0.0, 0.0}, - {-1.0, 0.0, 0.0}, - {0.0, 1.0, 0.0}, - {0.0, -1.0, 0.0}, - {0.0, 0.0, 1.0}, - {0.0, 0.0, -1.0} -}; - -static int ondex[8][3] = -{ - {0, 4, 2}, - {1, 2, 4}, - {0, 3, 4}, - {1, 4, 3}, - {0, 2, 5}, - {1, 5, 2}, - {0, 5, 3}, - {1, 3, 5} -}; - -static void -octahedron(GLenum shadeType) -{ - int i; - - for (i = 7; i >= 0; i--) { - drawtriangle(i, odata, ondex, shadeType); - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutWireOctahedron(void) -{ - octahedron(GL_LINE_LOOP); -} - -void GLUTAPIENTRY -glutSolidOctahedron(void) -{ - octahedron(GL_TRIANGLES); -} - -/* ENDCENTRY */ - -/* icosahedron data: These numbers are rigged to make an - icosahedron of radius 1.0 */ - -#define X .525731112119133606 -#define Z .850650808352039932 - -static GLfloat idata[12][3] = -{ - {-X, 0, Z}, - {X, 0, Z}, - {-X, 0, -Z}, - {X, 0, -Z}, - {0, Z, X}, - {0, Z, -X}, - {0, -Z, X}, - {0, -Z, -X}, - {Z, X, 0}, - {-Z, X, 0}, - {Z, -X, 0}, - {-Z, -X, 0} -}; - -static int index[20][3] = -{ - {0, 4, 1}, - {0, 9, 4}, - {9, 5, 4}, - {4, 5, 8}, - {4, 8, 1}, - {8, 10, 1}, - {8, 3, 10}, - {5, 3, 8}, - {5, 2, 3}, - {2, 7, 3}, - {7, 10, 3}, - {7, 6, 10}, - {7, 11, 6}, - {11, 0, 6}, - {0, 1, 6}, - {6, 1, 10}, - {9, 0, 11}, - {9, 11, 2}, - {9, 2, 5}, - {7, 2, 11}, -}; - -static void -icosahedron(GLenum shadeType) -{ - int i; - - for (i = 19; i >= 0; i--) { - drawtriangle(i, idata, index, shadeType); - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutWireIcosahedron(void) -{ - icosahedron(GL_LINE_LOOP); -} - -void GLUTAPIENTRY -glutSolidIcosahedron(void) -{ - icosahedron(GL_TRIANGLES); -} - -/* ENDCENTRY */ - -/* tetrahedron data: */ - -#define T 1.73205080756887729 - -static GLfloat tdata[4][3] = -{ - {T, T, T}, - {T, -T, -T}, - {-T, T, -T}, - {-T, -T, T} -}; - -static int tndex[4][3] = -{ - {0, 1, 3}, - {2, 1, 0}, - {3, 2, 0}, - {1, 2, 3} -}; - -static void -tetrahedron(GLenum shadeType) -{ - int i; - - for (i = 3; i >= 0; i--) - drawtriangle(i, tdata, tndex, shadeType); -} - -/* CENTRY */ -void GLUTAPIENTRY -glutWireTetrahedron(void) -{ - tetrahedron(GL_LINE_LOOP); -} - -void GLUTAPIENTRY -glutSolidTetrahedron(void) -{ - tetrahedron(GL_TRIANGLES); -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_stroke.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_stroke.cpp deleted file mode 100644 index 4823283c8c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_stroke.cpp +++ /dev/null @@ -1,42 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include "glutint.h" -#include "glutstroke.h" - -void GLUTAPIENTRY -glutStrokeCharacter(GLUTstrokeFont font, int c) -{ - const StrokeCharRec *ch; - const StrokeRec *stroke; - const CoordRec *coord; - StrokeFontPtr fontinfo; - int i, j; - - -#if defined(_WIN32) - fontinfo = (StrokeFontPtr) __glutFont(font); -#else - fontinfo = (StrokeFontPtr) font; -#endif - - if (c < 0 || c >= fontinfo->num_chars) - return; - ch = &(fontinfo->ch[c]); - if (ch) { - for (i = ch->num_strokes, stroke = ch->stroke; - i > 0; i--, stroke++) { - glBegin(GL_LINE_STRIP); - for (j = stroke->num_coords, coord = stroke->coord; - j > 0; j--, coord++) { - glVertex2f(coord->x, coord->y); - } - glEnd(); - } - glTranslatef(ch->right, 0.0, 0.0); - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_swap.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_swap.cpp deleted file mode 100644 index 210a7fc37e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_swap.cpp +++ /dev/null @@ -1,67 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include "glutint.h" - -GLint __glutFPS = 0; -GLint __glutSwapCount = 0; -GLint __glutSwapTime = 0; - -/* CENTRY */ -void GLUTAPIENTRY -glutSwapBuffers(void) -{ - GLUTwindow *window = __glutCurrentWindow; - - if (window->renderWin == window->win) { - if (__glutCurrentWindow->treatAsSingle) { - /* Pretend the double buffered window is single buffered, - so treat glutSwapBuffers as a no-op. */ - return; - } - } else { - if (__glutCurrentWindow->overlay->treatAsSingle) { - /* Pretend the double buffered overlay is single - buffered, so treat glutSwapBuffers as a no-op. */ - return; - } - } - - /* For the MESA_SWAP_HACK. */ - window->usedSwapBuffers = 1; - - SWAP_BUFFERS_LAYER(__glutCurrentWindow); - - /* I considered putting the window being swapped on the - GLUT_FINISH_WORK work list because you could call - glutSwapBuffers from an idle callback which doesn't call - __glutSetWindow which normally adds indirect rendering - windows to the GLUT_FINISH_WORK work list. Not being put - on the list could lead to the buffering up of multiple - redisplays and buffer swaps and hamper interactivity. I - consider this an application bug due to not using - glutPostRedisplay to trigger redraws. If - glutPostRedisplay were used, __glutSetWindow would be - called and a glFinish to throttle buffering would occur. */ - - if (__glutFPS) { - GLint t = glutGet(GLUT_ELAPSED_TIME); - __glutSwapCount++; - if (__glutSwapTime == 0) - __glutSwapTime = t; - else if (t - __glutSwapTime > __glutFPS) { - float time = 0.001 * (t - __glutSwapTime); - float fps = (float) __glutSwapCount / time; - fprintf(stderr, "GLUT: %d frames in %.2f seconds = %.2f FPS\n", - __glutSwapCount, time, fps); - __glutSwapTime = t; - __glutSwapCount = 0; - } - } -} -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_teapot.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_teapot.cpp deleted file mode 100644 index e2fcb53152..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_teapot.cpp +++ /dev/null @@ -1,210 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/** -(c) Copyright 1993, Silicon Graphics, Inc. - -ALL RIGHTS RESERVED - -Permission to use, copy, modify, and distribute this software -for any purpose and without fee is hereby granted, provided -that the above copyright notice appear in all copies and that -both the copyright notice and this permission notice appear in -supporting documentation, and that the name of Silicon -Graphics, Inc. not be used in advertising or publicity -pertaining to distribution of the software without specific, -written prior permission. - -THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU -"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR -OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO -EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE -ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER, -INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE, -SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR -NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR -PERFORMANCE OF THIS SOFTWARE. - -US Government Users Restricted Rights - -Use, duplication, or disclosure by the Government is subject to -restrictions set forth in FAR 52.227.19(c)(2) or subparagraph -(c)(1)(ii) of the Rights in Technical Data and Computer -Software clause at DFARS 252.227-7013 and/or in similar or -successor clauses in the FAR or the DOD or NASA FAR -Supplement. Unpublished-- rights reserved under the copyright -laws of the United States. Contractor/manufacturer is Silicon -Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA -94039-7311. - -OpenGL(TM) is a trademark of Silicon Graphics, Inc. -*/ - -#include "glutint.h" - -/* Rim, body, lid, and bottom data must be reflected in x and - y; handle and spout data across the y axis only. */ - -static int patchdata[][16] = -{ - /* rim */ - {102, 103, 104, 105, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15}, - /* body */ - {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27}, - {24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40}, - /* lid */ - {96, 96, 96, 96, 97, 98, 99, 100, 101, 101, 101, - 101, 0, 1, 2, 3,}, - {0, 1, 2, 3, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117}, - /* bottom */ - {118, 118, 118, 118, 124, 122, 119, 121, 123, 126, - 125, 120, 40, 39, 38, 37}, - /* handle */ - {41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56}, - {53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 28, 65, 66, 67}, - /* spout */ - {68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83}, - {80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95} -}; -/* *INDENT-OFF* */ - -static float cpdata[][3] = -{ - {0.2, 0, 2.7}, {0.2, -0.112, 2.7}, {0.112, -0.2, 2.7}, {0, - -0.2, 2.7}, {1.3375, 0, 2.53125}, {1.3375, -0.749, 2.53125}, - {0.749, -1.3375, 2.53125}, {0, -1.3375, 2.53125}, {1.4375, - 0, 2.53125}, {1.4375, -0.805, 2.53125}, {0.805, -1.4375, - 2.53125}, {0, -1.4375, 2.53125}, {1.5, 0, 2.4}, {1.5, -0.84, - 2.4}, {0.84, -1.5, 2.4}, {0, -1.5, 2.4}, {1.75, 0, 1.875}, - {1.75, -0.98, 1.875}, {0.98, -1.75, 1.875}, {0, -1.75, - 1.875}, {2, 0, 1.35}, {2, -1.12, 1.35}, {1.12, -2, 1.35}, - {0, -2, 1.35}, {2, 0, 0.9}, {2, -1.12, 0.9}, {1.12, -2, - 0.9}, {0, -2, 0.9}, {-2, 0, 0.9}, {2, 0, 0.45}, {2, -1.12, - 0.45}, {1.12, -2, 0.45}, {0, -2, 0.45}, {1.5, 0, 0.225}, - {1.5, -0.84, 0.225}, {0.84, -1.5, 0.225}, {0, -1.5, 0.225}, - {1.5, 0, 0.15}, {1.5, -0.84, 0.15}, {0.84, -1.5, 0.15}, {0, - -1.5, 0.15}, {-1.6, 0, 2.025}, {-1.6, -0.3, 2.025}, {-1.5, - -0.3, 2.25}, {-1.5, 0, 2.25}, {-2.3, 0, 2.025}, {-2.3, -0.3, - 2.025}, {-2.5, -0.3, 2.25}, {-2.5, 0, 2.25}, {-2.7, 0, - 2.025}, {-2.7, -0.3, 2.025}, {-3, -0.3, 2.25}, {-3, 0, - 2.25}, {-2.7, 0, 1.8}, {-2.7, -0.3, 1.8}, {-3, -0.3, 1.8}, - {-3, 0, 1.8}, {-2.7, 0, 1.575}, {-2.7, -0.3, 1.575}, {-3, - -0.3, 1.35}, {-3, 0, 1.35}, {-2.5, 0, 1.125}, {-2.5, -0.3, - 1.125}, {-2.65, -0.3, 0.9375}, {-2.65, 0, 0.9375}, {-2, - -0.3, 0.9}, {-1.9, -0.3, 0.6}, {-1.9, 0, 0.6}, {1.7, 0, - 1.425}, {1.7, -0.66, 1.425}, {1.7, -0.66, 0.6}, {1.7, 0, - 0.6}, {2.6, 0, 1.425}, {2.6, -0.66, 1.425}, {3.1, -0.66, - 0.825}, {3.1, 0, 0.825}, {2.3, 0, 2.1}, {2.3, -0.25, 2.1}, - {2.4, -0.25, 2.025}, {2.4, 0, 2.025}, {2.7, 0, 2.4}, {2.7, - -0.25, 2.4}, {3.3, -0.25, 2.4}, {3.3, 0, 2.4}, {2.8, 0, - 2.475}, {2.8, -0.25, 2.475}, {3.525, -0.25, 2.49375}, - {3.525, 0, 2.49375}, {2.9, 0, 2.475}, {2.9, -0.15, 2.475}, - {3.45, -0.15, 2.5125}, {3.45, 0, 2.5125}, {2.8, 0, 2.4}, - {2.8, -0.15, 2.4}, {3.2, -0.15, 2.4}, {3.2, 0, 2.4}, {0, 0, - 3.15}, {0.8, 0, 3.15}, {0.8, -0.45, 3.15}, {0.45, -0.8, - 3.15}, {0, -0.8, 3.15}, {0, 0, 2.85}, {1.4, 0, 2.4}, {1.4, - -0.784, 2.4}, {0.784, -1.4, 2.4}, {0, -1.4, 2.4}, {0.4, 0, - 2.55}, {0.4, -0.224, 2.55}, {0.224, -0.4, 2.55}, {0, -0.4, - 2.55}, {1.3, 0, 2.55}, {1.3, -0.728, 2.55}, {0.728, -1.3, - 2.55}, {0, -1.3, 2.55}, {1.3, 0, 2.4}, {1.3, -0.728, 2.4}, - {0.728, -1.3, 2.4}, {0, -1.3, 2.4}, {0, 0, 0}, {1.425, - -0.798, 0}, {1.5, 0, 0.075}, {1.425, 0, 0}, {0.798, -1.425, - 0}, {0, -1.5, 0.075}, {0, -1.425, 0}, {1.5, -0.84, 0.075}, - {0.84, -1.5, 0.075} -}; - -static float tex[2][2][2] = -{ - { {0, 0}, - {1, 0}}, - { {0, 1}, - {1, 1}} -}; - -/* *INDENT-ON* */ - -static void -teapot(GLint grid, GLdouble scale, GLenum type) -{ - float p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3]; - long i, j, k, l; - - glPushAttrib(GL_ENABLE_BIT | GL_EVAL_BIT); - glEnable(GL_AUTO_NORMAL); - glEnable(GL_NORMALIZE); - glEnable(GL_MAP2_VERTEX_3); - glEnable(GL_MAP2_TEXTURE_COORD_2); - glPushMatrix(); - glRotatef(270.0, 1.0, 0.0, 0.0); - glScalef(0.5 * scale, 0.5 * scale, 0.5 * scale); - glTranslatef(0.0, 0.0, -1.5); - for (i = 0; i < 10; i++) { - for (j = 0; j < 4; j++) { - for (k = 0; k < 4; k++) { - for (l = 0; l < 3; l++) { - p[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; - q[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l]; - if (l == 1) - q[j][k][l] *= -1.0; - if (i < 6) { - r[j][k][l] = - cpdata[patchdata[i][j * 4 + (3 - k)]][l]; - if (l == 0) - r[j][k][l] *= -1.0; - s[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; - if (l == 0) - s[j][k][l] *= -1.0; - if (l == 1) - s[j][k][l] *= -1.0; - } - } - } - } - glMap2f(GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2, - &tex[0][0][0]); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &p[0][0][0]); - glMapGrid2f(grid, 0.0, 1.0, grid, 0.0, 1.0); - glEvalMesh2(type, 0, grid, 0, grid); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &q[0][0][0]); - glEvalMesh2(type, 0, grid, 0, grid); - if (i < 6) { - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &r[0][0][0]); - glEvalMesh2(type, 0, grid, 0, grid); - glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, - &s[0][0][0]); - glEvalMesh2(type, 0, grid, 0, grid); - } - } - glPopMatrix(); - glPopAttrib(); -} - -/* CENTRY */ -void GLUTAPIENTRY -glutSolidTeapot(GLdouble scale) -{ - teapot(7, scale, GL_FILL); -} - -void GLUTAPIENTRY -glutWireTeapot(GLdouble scale) -{ - teapot(10, scale, GL_LINE); -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_tr24.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_tr24.cpp deleted file mode 100644 index 9e1234644d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_tr24.cpp +++ /dev/null @@ -1,2063 +0,0 @@ - -/* GENERATED FILE -- DO NOT MODIFY */ - -#define glutBitmapTimesRoman24 XXX -#include "glutbitmap.h" -#undef glutBitmapTimesRoman24 - -/* char: 0xff */ - -static const GLubyte ch255data[] = { -0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0, -0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0, -0xf1,0xe0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0, -}; - -static const BitmapCharRec ch255 = {11,21,0,5,11,ch255data}; - -/* char: 0xfe */ - -static const GLubyte ch254data[] = { -0xf0,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x6e,0x0,0x73,0x80,0x61,0x80, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x61,0x80,0x73,0x80, -0x6e,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0xe0,0x0, -}; - -static const BitmapCharRec ch254 = {10,22,-1,5,12,ch254data}; - -/* char: 0xfd */ - -static const GLubyte ch253data[] = { -0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0, -0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0, -0xf1,0xe0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80,0x1,0x80, -}; - -static const BitmapCharRec ch253 = {11,22,0,5,11,ch253data}; - -/* char: 0xfc */ - -static const GLubyte ch252data[] = { -0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0, -}; - -static const BitmapCharRec ch252 = {11,16,-1,0,13,ch252data}; - -/* char: 0xfb */ - -static const GLubyte ch251data[] = { -0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0, -0xc,0x0, -}; - -static const BitmapCharRec ch251 = {11,17,-1,0,13,ch251data}; - -/* char: 0xfa */ - -static const GLubyte ch250data[] = { -0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80, -0x1,0x80, -}; - -static const BitmapCharRec ch250 = {11,17,-1,0,13,ch250data}; - -/* char: 0xf9 */ - -static const GLubyte ch249data[] = { -0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x2,0x0,0xc,0x0,0x38,0x0, -0x30,0x0, -}; - -static const BitmapCharRec ch249 = {11,17,-1,0,13,ch249data}; - -/* char: 0xf8 */ - -static const GLubyte ch248data[] = { -0xc0,0x0,0xde,0x0,0x73,0x80,0x71,0x80,0xd0,0xc0,0xd8,0xc0,0xc8,0xc0,0xcc,0xc0, -0xc4,0xc0,0xc6,0xc0,0x63,0x80,0x73,0x80,0x1e,0xc0,0x0,0xc0, -}; - -static const BitmapCharRec ch248 = {10,14,-1,1,12,ch248data}; - -/* char: 0xf7 */ - -static const GLubyte ch247data[] = { -0x6,0x0,0x6,0x0,0x0,0x0,0x0,0x0,0xff,0xf0,0xff,0xf0,0x0,0x0,0x0,0x0, -0x6,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch247 = {12,10,-1,-2,14,ch247data}; - -/* char: 0xf6 */ - -static const GLubyte ch246data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0, -}; - -static const BitmapCharRec ch246 = {10,16,-1,0,12,ch246data}; - -/* char: 0xf5 */ - -static const GLubyte ch245data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x0,0x0,0x27,0x0,0x1c,0x80, -}; - -static const BitmapCharRec ch245 = {10,16,-1,0,12,ch245data}; - -/* char: 0xf4 */ - -static const GLubyte ch244data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0, -0xc,0x0, -}; - -static const BitmapCharRec ch244 = {10,17,-1,0,12,ch244data}; - -/* char: 0xf3 */ - -static const GLubyte ch243data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80, -0x1,0x80, -}; - -static const BitmapCharRec ch243 = {10,17,-1,0,12,ch243data}; - -/* char: 0xf2 */ - -static const GLubyte ch242data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x2,0x0,0xc,0x0,0x38,0x0, -0x30,0x0, -}; - -static const BitmapCharRec ch242 = {10,17,-1,0,12,ch242data}; - -/* char: 0xf1 */ - -static const GLubyte ch241data[] = { -0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x71,0xc0,0x6f,0x80,0xe7,0x0,0x0,0x0,0x0,0x0,0x27,0x0,0x1c,0x80, -}; - -static const BitmapCharRec ch241 = {11,16,-1,0,13,ch241data}; - -/* char: 0xf0 */ - -static const GLubyte ch240data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1f,0x0,0xc6,0x0,0x3c,0x0,0x1e,0x0,0x71,0x80, -0xc0,0x0, -}; - -static const BitmapCharRec ch240 = {10,17,-1,0,12,ch240data}; - -/* char: 0xef */ - -static const GLubyte ch239data[] = { -0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x0,0xcc,0xcc, -}; - -static const BitmapCharRec ch239 = {6,16,0,0,6,ch239data}; - -/* char: 0xee */ - -static const GLubyte ch238data[] = { -0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x84,0x48,0x78, -0x30, -}; - -static const BitmapCharRec ch238 = {6,17,0,0,6,ch238data}; - -/* char: 0xed */ - -static const GLubyte ch237data[] = { -0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x0,0x80,0x60,0x38, -0x18, -}; - -static const BitmapCharRec ch237 = {5,17,-1,0,6,ch237data}; - -/* char: 0xec */ - -static const GLubyte ch236data[] = { -0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x8,0x30,0xe0, -0xc0, -}; - -static const BitmapCharRec ch236 = {5,17,0,0,6,ch236data}; - -/* char: 0xeb */ - -static const GLubyte ch235data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, -0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0, -}; - -static const BitmapCharRec ch235 = {9,16,-1,0,11,ch235data}; - -/* char: 0xea */ - -static const GLubyte ch234data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, -0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0, -0xc,0x0, -}; - -static const BitmapCharRec ch234 = {9,17,-1,0,11,ch234data}; - -/* char: 0xe9 */ - -static const GLubyte ch233data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, -0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x10,0x0,0xc,0x0,0x7,0x0, -0x3,0x0, -}; - -static const BitmapCharRec ch233 = {9,17,-1,0,11,ch233data}; - -/* char: 0xe8 */ - -static const GLubyte ch232data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, -0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x4,0x0,0x18,0x0,0x70,0x0, -0x60,0x0, -}; - -static const BitmapCharRec ch232 = {9,17,-1,0,11,ch232data}; - -/* char: 0xe7 */ - -static const GLubyte ch231data[] = { -0x3c,0x0,0x66,0x0,0x6,0x0,0x1e,0x0,0x18,0x0,0x8,0x0,0x1e,0x0,0x7f,0x0, -0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x41,0x80, -0x63,0x80,0x1f,0x0, -}; - -static const BitmapCharRec ch231 = {9,18,-1,6,11,ch231data}; - -/* char: 0xe6 */ - -static const GLubyte ch230data[] = { -0x70,0xf0,0xfb,0xf8,0xc7,0x84,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0xfc, -0x3,0xc,0x63,0xc,0x67,0x98,0x3c,0xf0, -}; - -static const BitmapCharRec ch230 = {14,12,-1,0,16,ch230data}; - -/* char: 0xe5 */ - -static const GLubyte ch229data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x1c,0x0,0x22,0x0,0x22,0x0, -0x1c,0x0, -}; - -static const BitmapCharRec ch229 = {9,17,-1,0,11,ch229data}; - -/* char: 0xe4 */ - -static const GLubyte ch228data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x66,0x0,0x66,0x0, -}; - -static const BitmapCharRec ch228 = {9,16,-1,0,11,ch228data}; - -/* char: 0xe3 */ - -static const GLubyte ch227data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x5c,0x0,0x3a,0x0, -}; - -static const BitmapCharRec ch227 = {9,16,-1,0,11,ch227data}; - -/* char: 0xe2 */ - -static const GLubyte ch226data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x42,0x0,0x24,0x0,0x3c,0x0, -0x18,0x0, -}; - -static const BitmapCharRec ch226 = {9,17,-1,0,11,ch226data}; - -/* char: 0xe1 */ - -static const GLubyte ch225data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x10,0x0,0xc,0x0,0x7,0x0, -0x3,0x0, -}; - -static const BitmapCharRec ch225 = {9,17,-1,0,11,ch225data}; - -/* char: 0xe0 */ - -static const GLubyte ch224data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x4,0x0,0x18,0x0,0x70,0x0, -0x60,0x0, -}; - -static const BitmapCharRec ch224 = {9,17,-1,0,11,ch224data}; - -/* char: 0xdf */ - -static const GLubyte ch223data[] = { -0xe7,0x0,0x6c,0x80,0x6c,0xc0,0x60,0xc0,0x60,0xc0,0x61,0xc0,0x61,0x80,0x63,0x80, -0x67,0x0,0x6c,0x0,0x63,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0, -0x1e,0x0, -}; - -static const BitmapCharRec ch223 = {10,17,-1,0,12,ch223data}; - -/* char: 0xde */ - -static const GLubyte ch222data[] = { -0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x18, -0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70,0x3f,0xc0,0x30,0x0,0x30,0x0,0x30,0x0, -0xfc,0x0, -}; - -static const BitmapCharRec ch222 = {13,17,-1,0,15,ch222data}; - -/* char: 0xdd */ - -static const GLubyte ch221data[] = { -0x7,0xe0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0xc0, -0x3,0x40,0x6,0x60,0x6,0x20,0xc,0x30,0x1c,0x10,0x18,0x18,0x38,0x8,0x30,0xc, -0xfc,0x3f,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30, -}; - -static const BitmapCharRec ch221 = {16,22,0,0,16,ch221data}; - -/* char: 0xdc */ - -static const GLubyte ch220data[] = { -0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0xfc,0x1f,0x0,0x0,0x0,0x0,0x6,0x30,0x6,0x30, -}; - -static const BitmapCharRec ch220 = {16,21,-1,0,18,ch220data}; - -/* char: 0xdb */ - -static const GLubyte ch219data[] = { -0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0xfc,0x1f,0x0,0x0,0x8,0x10,0x6,0x60,0x3,0xc0,0x1,0x80, -}; - -static const BitmapCharRec ch219 = {16,22,-1,0,18,ch219data}; - -/* char: 0xda */ - -static const GLubyte ch218data[] = { -0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0xfc,0x1f,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30, -}; - -static const BitmapCharRec ch218 = {16,22,-1,0,18,ch218data}; - -/* char: 0xd9 */ - -static const GLubyte ch217data[] = { -0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0xfc,0x1f,0x0,0x0,0x0,0x40,0x1,0x80,0x7,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch217 = {16,22,-1,0,18,ch217data}; - -/* char: 0xd8 */ - -static const GLubyte ch216data[] = { -0x20,0x0,0x27,0xe0,0x1c,0x38,0x38,0x1c,0x68,0x6,0x64,0x6,0xc2,0x3,0xc2,0x3, -0xc1,0x3,0xc1,0x3,0xc0,0x83,0xc0,0x83,0xc0,0x43,0x60,0x46,0x60,0x26,0x38,0x1c, -0x1c,0x38,0x7,0xe4,0x0,0x4, -}; - -static const BitmapCharRec ch216 = {16,19,-1,1,18,ch216data}; - -/* char: 0xd7 */ - -static const GLubyte ch215data[] = { -0x80,0x40,0xc0,0xc0,0x61,0x80,0x33,0x0,0x1e,0x0,0xc,0x0,0x1e,0x0,0x33,0x0, -0x61,0x80,0xc0,0xc0,0x80,0x40, -}; - -static const BitmapCharRec ch215 = {10,11,-2,-1,14,ch215data}; - -/* char: 0xd6 */ - -static const GLubyte ch214data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0,0x0,0x0,0x0,0x0,0x6,0x60,0x6,0x60, -}; - -static const BitmapCharRec ch214 = {16,21,-1,0,18,ch214data}; - -/* char: 0xd5 */ - -static const GLubyte ch213data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0,0x0,0x0,0x0,0x0,0x4,0xe0,0x3,0x90, -}; - -static const BitmapCharRec ch213 = {16,21,-1,0,18,ch213data}; - -/* char: 0xd4 */ - -static const GLubyte ch212data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0,0x0,0x0,0x8,0x10,0x6,0x60,0x3,0xc0,0x1,0x80, -}; - -static const BitmapCharRec ch212 = {16,22,-1,0,18,ch212data}; - -/* char: 0xd3 */ - -static const GLubyte ch211data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30, -}; - -static const BitmapCharRec ch211 = {16,22,-1,0,18,ch211data}; - -/* char: 0xd2 */ - -static const GLubyte ch210data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0,0x0,0x0,0x0,0x40,0x1,0x80,0x7,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch210 = {16,22,-1,0,18,ch210data}; - -/* char: 0xd1 */ - -static const GLubyte ch209data[] = { -0xf8,0xc,0x20,0x1c,0x20,0x1c,0x20,0x34,0x20,0x64,0x20,0x64,0x20,0xc4,0x21,0x84, -0x21,0x84,0x23,0x4,0x26,0x4,0x26,0x4,0x2c,0x4,0x38,0x4,0x38,0x4,0x30,0x4, -0xf0,0x1f,0x0,0x0,0x0,0x0,0x4,0xe0,0x3,0x90, -}; - -static const BitmapCharRec ch209 = {16,21,-1,0,18,ch209data}; - -/* char: 0xd0 */ - -static const GLubyte ch208data[] = { -0x7f,0xe0,0x18,0x38,0x18,0x1c,0x18,0x6,0x18,0x6,0x18,0x3,0x18,0x3,0x18,0x3, -0xff,0x3,0x18,0x3,0x18,0x3,0x18,0x3,0x18,0x6,0x18,0x6,0x18,0x1c,0x18,0x38, -0x7f,0xe0, -}; - -static const BitmapCharRec ch208 = {16,17,0,0,17,ch208data}; - -/* char: 0xcf */ - -static const GLubyte ch207data[] = { -0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0xfc,0x0,0x0,0xcc,0xcc, -}; - -static const BitmapCharRec ch207 = {6,21,-1,0,8,ch207data}; - -/* char: 0xce */ - -static const GLubyte ch206data[] = { -0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, -0x7e,0x0,0x81,0x66,0x3c,0x18, -}; - -static const BitmapCharRec ch206 = {8,22,-1,0,8,ch206data}; - -/* char: 0xcd */ - -static const GLubyte ch205data[] = { -0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0xfc,0x0,0x40,0x30,0x1c,0xc, -}; - -static const BitmapCharRec ch205 = {6,22,-1,0,8,ch205data}; - -/* char: 0xcc */ - -static const GLubyte ch204data[] = { -0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0xfc,0x0,0x8,0x30,0xe0,0xc0, -}; - -static const BitmapCharRec ch204 = {6,22,-1,0,8,ch204data}; - -/* char: 0xcb */ - -static const GLubyte ch203data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, -0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0,0x0,0x0,0x0,0x0,0x19,0x80,0x19,0x80, -}; - -static const BitmapCharRec ch203 = {13,21,-1,0,15,ch203data}; - -/* char: 0xca */ - -static const GLubyte ch202data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, -0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0,0x0,0x0,0x10,0x20,0xc,0xc0,0x7,0x80,0x3,0x0, -}; - -static const BitmapCharRec ch202 = {13,22,-1,0,15,ch202data}; - -/* char: 0xc9 */ - -static const GLubyte ch201data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, -0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0,0x0,0x0,0x4,0x0,0x3,0x0,0x1,0xc0,0x0,0xc0, -}; - -static const BitmapCharRec ch201 = {13,22,-1,0,15,ch201data}; - -/* char: 0xc8 */ - -static const GLubyte ch200data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, -0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0,0x0,0x0,0x1,0x0,0x6,0x0,0x1c,0x0,0x18,0x0, -}; - -static const BitmapCharRec ch200 = {13,22,-1,0,15,ch200data}; - -/* char: 0xc7 */ - -static const GLubyte ch199data[] = { -0x7,0x80,0xc,0xc0,0x0,0xc0,0x3,0xc0,0x3,0x0,0x1,0x0,0x7,0xe0,0x1e,0x38, -0x38,0x8,0x60,0x4,0x60,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c,0x7,0xe4, -}; - -static const BitmapCharRec ch199 = {14,23,-1,6,16,ch199data}; - -/* char: 0xc6 */ - -static const GLubyte ch198data[] = { -0xf9,0xff,0xf0,0x30,0x60,0x30,0x10,0x60,0x10,0x10,0x60,0x10,0x18,0x60,0x0,0x8, -0x60,0x0,0xf,0xe0,0x80,0xc,0x60,0x80,0x4,0x7f,0x80,0x4,0x60,0x80,0x6,0x60, -0x80,0x2,0x60,0x0,0x2,0x60,0x0,0x1,0x60,0x20,0x1,0x60,0x20,0x1,0xe0,0x60, -0x3,0xff,0xe0, -}; - -static const BitmapCharRec ch198 = {20,17,0,0,21,ch198data}; - -/* char: 0xc5 */ - -static const GLubyte ch197data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x1,0xc0,0x0,0x2,0x20,0x0,0x2,0x20,0x0,0x1,0xc0,0x0, -}; - -static const BitmapCharRec ch197 = {17,21,0,0,17,ch197data}; - -/* char: 0xc4 */ - -static const GLubyte ch196data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x30,0x0,0x6,0x30,0x0, -}; - -static const BitmapCharRec ch196 = {17,21,0,0,17,ch196data}; - -/* char: 0xc3 */ - -static const GLubyte ch195data[] = { -0xfc,0x1f,0x80,0x30,0x7,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0xe0,0x0,0x3,0x90,0x0, -}; - -static const BitmapCharRec ch195 = {17,21,0,0,17,ch195data}; - -/* char: 0xc2 */ - -static const GLubyte ch194data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x0,0x0,0x0,0x8,0x10,0x0,0x6,0x60,0x0,0x3,0xc0,0x0,0x1, -0x80,0x0, -}; - -static const BitmapCharRec ch194 = {17,22,0,0,17,ch194data}; - -/* char: 0xc1 */ - -static const GLubyte ch193data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0xc0,0x0,0x0,0x70,0x0,0x0, -0x30,0x0, -}; - -static const BitmapCharRec ch193 = {17,22,0,0,17,ch193data}; - -/* char: 0xc0 */ - -static const GLubyte ch192data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x0,0xc0,0x0,0x3,0x80,0x0,0x3, -0x0,0x0, -}; - -static const BitmapCharRec ch192 = {17,22,0,0,17,ch192data}; - -/* char: 0xbf */ - -static const GLubyte ch191data[] = { -0x3e,0x63,0xc1,0xc3,0xc3,0xe0,0x70,0x30,0x38,0x18,0x18,0x8,0x8,0x0,0x0,0xc, -0xc, -}; - -static const BitmapCharRec ch191 = {8,17,-1,5,11,ch191data}; - -/* char: 0xbe */ - -static const GLubyte ch190data[] = { -0x18,0x2,0x0,0x8,0x2,0x0,0xc,0x7f,0x80,0x4,0x22,0x0,0x6,0x32,0x0,0x3, -0x12,0x0,0x1,0xa,0x0,0x71,0x8e,0x0,0x88,0x86,0x0,0x8c,0xc2,0x0,0xc,0x60, -0x0,0x8,0x20,0x0,0x30,0x30,0x0,0x8,0x10,0x0,0x8c,0x18,0x0,0x4c,0xc,0x0, -0x38,0x4,0x0, -}; - -static const BitmapCharRec ch190 = {17,17,0,0,18,ch190data}; - -/* char: 0xbd */ - -static const GLubyte ch189data[] = { -0x30,0x7e,0x10,0x22,0x18,0x10,0x8,0x18,0xc,0x8,0x6,0x4,0x2,0x6,0xfb,0x46, -0x21,0x26,0x21,0x9c,0x20,0xc0,0x20,0x40,0x20,0x60,0x20,0x20,0xa0,0x30,0x60,0x18, -0x20,0x8, -}; - -static const BitmapCharRec ch189 = {15,17,-1,0,18,ch189data}; - -/* char: 0xbc */ - -static const GLubyte ch188data[] = { -0x30,0x4,0x10,0x4,0x18,0xff,0x8,0x44,0xc,0x64,0x6,0x24,0x2,0x14,0xfb,0x1c, -0x21,0xc,0x21,0x84,0x20,0xc0,0x20,0x40,0x20,0x60,0x20,0x20,0xa0,0x30,0x60,0x18, -0x20,0x8, -}; - -static const BitmapCharRec ch188 = {16,17,-1,0,18,ch188data}; - -/* char: 0xbb */ - -static const GLubyte ch187data[] = { -0x88,0x0,0xcc,0x0,0x66,0x0,0x33,0x0,0x19,0x80,0x19,0x80,0x33,0x0,0x66,0x0, -0xcc,0x0,0x88,0x0, -}; - -static const BitmapCharRec ch187 = {9,10,-2,-1,12,ch187data}; - -/* char: 0xba */ - -static const GLubyte ch186data[] = { -0xfc,0x0,0x78,0xcc,0xcc,0xcc,0xcc,0xcc,0x78, -}; - -static const BitmapCharRec ch186 = {6,9,-1,-8,8,ch186data}; - -/* char: 0xb9 */ - -static const GLubyte ch185data[] = { -0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xa0,0x60,0x20, -}; - -static const BitmapCharRec ch185 = {5,10,-1,-7,7,ch185data}; - -/* char: 0xb8 */ - -static const GLubyte ch184data[] = { -0x78,0xcc,0xc,0x3c,0x30,0x10, -}; - -static const BitmapCharRec ch184 = {6,6,-1,6,8,ch184data}; - -/* char: 0xb7 */ - -static const GLubyte ch183data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch183 = {2,2,-2,-6,6,ch183data}; - -/* char: 0xb6 */ - -static const GLubyte ch182data[] = { -0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0, -0x9,0x0,0x9,0x0,0x9,0x0,0x19,0x0,0x39,0x0,0x79,0x0,0x79,0x0,0xf9,0x0, -0xf9,0x0,0xf9,0x0,0x79,0x0,0x79,0x0,0x39,0x0,0x1f,0x80, -}; - -static const BitmapCharRec ch182 = {9,22,-1,5,11,ch182data}; - -/* char: 0xb5 */ - -static const GLubyte ch181data[] = { -0x40,0x0,0xe0,0x0,0xc0,0x0,0x40,0x0,0x40,0x0,0x5c,0xe0,0x7e,0xc0,0x71,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0xe1,0xc0, -}; - -static const BitmapCharRec ch181 = {11,17,-1,5,13,ch181data}; - -/* char: 0xb4 */ - -static const GLubyte ch180data[] = { -0x80,0x60,0x38,0x18, -}; - -static const BitmapCharRec ch180 = {5,4,-2,-13,8,ch180data}; - -/* char: 0xb3 */ - -static const GLubyte ch179data[] = { -0x70,0x88,0x8c,0xc,0x8,0x30,0x8,0x8c,0x4c,0x38, -}; - -static const BitmapCharRec ch179 = {6,10,0,-7,7,ch179data}; - -/* char: 0xb2 */ - -static const GLubyte ch178data[] = { -0xfc,0x44,0x20,0x30,0x10,0x8,0xc,0x8c,0x4c,0x38, -}; - -static const BitmapCharRec ch178 = {6,10,0,-7,7,ch178data}; - -/* char: 0xb1 */ - -static const GLubyte ch177data[] = { -0xff,0xf0,0xff,0xf0,0x0,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, -0xff,0xf0,0xff,0xf0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch177 = {12,15,-1,0,14,ch177data}; - -/* char: 0xb0 */ - -static const GLubyte ch176data[] = { -0x38,0x44,0x82,0x82,0x82,0x44,0x38, -}; - -static const BitmapCharRec ch176 = {7,7,-1,-10,9,ch176data}; - -/* char: 0xaf */ - -static const GLubyte ch175data[] = { -0xfc,0xfc, -}; - -static const BitmapCharRec ch175 = {6,2,-1,-14,8,ch175data}; - -/* char: 0xae */ - -static const GLubyte ch174data[] = { -0x7,0xf0,0x0,0x1c,0x1c,0x0,0x30,0x6,0x0,0x60,0x3,0x0,0x47,0x19,0x0,0xc2, -0x31,0x80,0x82,0x20,0x80,0x82,0x40,0x80,0x83,0xe0,0x80,0x82,0x30,0x80,0x82,0x10, -0x80,0xc2,0x11,0x80,0x42,0x31,0x0,0x67,0xe3,0x0,0x30,0x6,0x0,0x1c,0x1c,0x0, -0x7,0xf0,0x0, -}; - -static const BitmapCharRec ch174 = {17,17,-1,0,19,ch174data}; - -/* char: 0xad */ - -static const GLubyte ch173data[] = { -0xfe,0xfe, -}; - -static const BitmapCharRec ch173 = {7,2,-1,-5,9,ch173data}; - -/* char: 0xac */ - -static const GLubyte ch172data[] = { -0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0xff,0xf0,0xff,0xf0, -}; - -static const BitmapCharRec ch172 = {12,7,-1,-3,14,ch172data}; - -/* char: 0xab */ - -static const GLubyte ch171data[] = { -0x8,0x80,0x19,0x80,0x33,0x0,0x66,0x0,0xcc,0x0,0xcc,0x0,0x66,0x0,0x33,0x0, -0x19,0x80,0x8,0x80, -}; - -static const BitmapCharRec ch171 = {9,10,-2,-1,13,ch171data}; - -/* char: 0xaa */ - -static const GLubyte ch170data[] = { -0x7e,0x0,0x76,0xcc,0xcc,0x7c,0xc,0xcc,0x78, -}; - -static const BitmapCharRec ch170 = {7,9,0,-8,8,ch170data}; - -/* char: 0xa9 */ - -static const GLubyte ch169data[] = { -0x7,0xf0,0x0,0x1c,0x1c,0x0,0x30,0x6,0x0,0x61,0xc3,0x0,0x47,0x71,0x0,0xc4, -0x19,0x80,0x8c,0x0,0x80,0x88,0x0,0x80,0x88,0x0,0x80,0x88,0x0,0x80,0x8c,0x0, -0x80,0xc4,0x19,0x80,0x47,0x31,0x0,0x61,0xe3,0x0,0x30,0x6,0x0,0x1c,0x1c,0x0, -0x7,0xf0,0x0, -}; - -static const BitmapCharRec ch169 = {17,17,-1,0,19,ch169data}; - -/* char: 0xa8 */ - -static const GLubyte ch168data[] = { -0xcc,0xcc, -}; - -static const BitmapCharRec ch168 = {6,2,-1,-14,8,ch168data}; - -/* char: 0xa7 */ - -static const GLubyte ch167data[] = { -0x38,0x64,0x62,0x6,0xe,0x1c,0x38,0x74,0xe2,0xc3,0x83,0x87,0x4e,0x3c,0x38,0x70, -0x60,0x46,0x26,0x1c, -}; - -static const BitmapCharRec ch167 = {8,20,-2,2,12,ch167data}; - -/* char: 0xa6 */ - -static const GLubyte ch166data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0, -}; - -static const BitmapCharRec ch166 = {2,17,-2,0,6,ch166data}; - -/* char: 0xa5 */ - -static const GLubyte ch165data[] = { -0xf,0xc0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x1f,0xe0,0x3,0x0,0x1f,0xe0, -0x3,0x0,0x7,0x80,0xc,0x80,0xc,0xc0,0x18,0x40,0x18,0x60,0x30,0x20,0x70,0x30, -0xf8,0x7c, -}; - -static const BitmapCharRec ch165 = {14,17,0,0,14,ch165data}; - -/* char: 0xa4 */ - -static const GLubyte ch164data[] = { -0xc0,0x60,0xee,0xe0,0x7f,0xc0,0x31,0x80,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x31,0x80,0x7f,0xc0,0xee,0xe0,0xc0,0x60, -}; - -static const BitmapCharRec ch164 = {11,12,-1,-3,13,ch164data}; - -/* char: 0xa3 */ - -static const GLubyte ch163data[] = { -0xe7,0x80,0xbe,0xc0,0x78,0x40,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, -0x30,0x0,0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x31,0x80,0x19,0x80, -0xf,0x0, -}; - -static const BitmapCharRec ch163 = {10,17,-1,0,12,ch163data}; - -/* char: 0xa2 */ - -static const GLubyte ch162data[] = { -0x40,0x0,0x40,0x0,0x3e,0x0,0x7f,0x0,0x70,0x80,0xd0,0x0,0xc8,0x0,0xc8,0x0, -0xc8,0x0,0xc4,0x0,0xc4,0x0,0x43,0x80,0x63,0x80,0x1f,0x0,0x1,0x0,0x1,0x0, -}; - -static const BitmapCharRec ch162 = {9,16,-1,2,12,ch162data}; - -/* char: 0xa1 */ - -static const GLubyte ch161data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0xc0, -0xc0, -}; - -static const BitmapCharRec ch161 = {2,17,-4,5,8,ch161data}; - -/* char: 0xa0 */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch160data[] = { 0x0 }; -static const BitmapCharRec ch160 = {1,1,0,0,6,ch160data}; -#else -static const BitmapCharRec ch160 = {0,0,0,0,6,0}; -#endif - -/* char: 0x7e '~' */ - -static const GLubyte ch126data[] = { -0x83,0x80,0xc7,0xc0,0x7c,0x60,0x38,0x20, -}; - -static const BitmapCharRec ch126 = {11,4,-1,-5,13,ch126data}; - -/* char: 0x7d '}' */ - -static const GLubyte ch125data[] = { -0xe0,0x30,0x18,0x18,0x18,0x18,0x18,0x18,0x8,0xc,0x4,0x3,0x4,0xc,0x8,0x18, -0x18,0x18,0x18,0x18,0x30,0xe0, -}; - -static const BitmapCharRec ch125 = {8,22,-1,5,10,ch125data}; - -/* char: 0x7c '|' */ - -static const GLubyte ch124data[] = { -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0, -}; - -static const BitmapCharRec ch124 = {2,17,-2,0,6,ch124data}; - -/* char: 0x7b '{' */ - -static const GLubyte ch123data[] = { -0x7,0xc,0x18,0x18,0x18,0x18,0x18,0x18,0x10,0x30,0x20,0xc0,0x20,0x30,0x10,0x18, -0x18,0x18,0x18,0x18,0xc,0x7, -}; - -static const BitmapCharRec ch123 = {8,22,-1,5,10,ch123data}; - -/* char: 0x7a 'z' */ - -static const GLubyte ch122data[] = { -0xff,0xc3,0x61,0x70,0x30,0x38,0x18,0x1c,0xe,0x86,0xc3,0xff, -}; - -static const BitmapCharRec ch122 = {8,12,-1,0,10,ch122data}; - -/* char: 0x79 'y' */ - -static const GLubyte ch121data[] = { -0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0, -0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0, -0xf1,0xe0, -}; - -static const BitmapCharRec ch121 = {11,17,0,5,11,ch121data}; - -/* char: 0x78 'x' */ - -static const GLubyte ch120data[] = { -0xf1,0xe0,0x60,0xc0,0x21,0x80,0x33,0x80,0x1b,0x0,0xe,0x0,0xc,0x0,0x1a,0x0, -0x39,0x0,0x31,0x80,0x60,0xc0,0xf1,0xe0, -}; - -static const BitmapCharRec ch120 = {11,12,-1,0,13,ch120data}; - -/* char: 0x77 'w' */ - -static const GLubyte ch119data[] = { -0x4,0x10,0x0,0xe,0x38,0x0,0xe,0x38,0x0,0x1a,0x28,0x0,0x1a,0x64,0x0,0x19, -0x64,0x0,0x31,0x64,0x0,0x30,0xc2,0x0,0x30,0xc2,0x0,0x60,0xc2,0x0,0x60,0xc3, -0x0,0xf1,0xe7,0x80, -}; - -static const BitmapCharRec ch119 = {17,12,0,0,17,ch119data}; - -/* char: 0x76 'v' */ - -static const GLubyte ch118data[] = { -0x4,0x0,0xe,0x0,0xe,0x0,0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80, -0x30,0x80,0x60,0x80,0x60,0xc0,0xf1,0xe0, -}; - -static const BitmapCharRec ch118 = {11,12,0,0,11,ch118data}; - -/* char: 0x75 'u' */ - -static const GLubyte ch117data[] = { -0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0, -}; - -static const BitmapCharRec ch117 = {11,12,-1,0,13,ch117data}; - -/* char: 0x74 't' */ - -static const GLubyte ch116data[] = { -0x1c,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfe,0x70,0x30,0x10, -}; - -static const BitmapCharRec ch116 = {7,15,0,0,7,ch116data}; - -/* char: 0x73 's' */ - -static const GLubyte ch115data[] = { -0xf8,0xc6,0x83,0x3,0x7,0x1e,0x7c,0x70,0xe0,0xc2,0x66,0x3e, -}; - -static const BitmapCharRec ch115 = {8,12,-1,0,10,ch115data}; - -/* char: 0x72 'r' */ - -static const GLubyte ch114data[] = { -0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x76,0x6e,0xe6, -}; - -static const BitmapCharRec ch114 = {7,12,-1,0,8,ch114data}; - -/* char: 0x71 'q' */ - -static const GLubyte ch113data[] = { -0x3,0xc0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1d,0x80,0x73,0x80,0x61,0x80, -0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x61,0x80,0x73,0x80, -0x1d,0x80, -}; - -static const BitmapCharRec ch113 = {10,17,-1,5,12,ch113data}; - -/* char: 0x70 'p' */ - -static const GLubyte ch112data[] = { -0xf0,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x6e,0x0,0x73,0x80,0x61,0x80, -0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x61,0x80,0x73,0x80, -0xee,0x0, -}; - -static const BitmapCharRec ch112 = {10,17,-1,5,12,ch112data}; - -/* char: 0x6f 'o' */ - -static const GLubyte ch111data[] = { -0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0, -}; - -static const BitmapCharRec ch111 = {10,12,-1,0,12,ch111data}; - -/* char: 0x6e 'n' */ - -static const GLubyte ch110data[] = { -0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x71,0xc0,0x6f,0x80,0xe7,0x0, -}; - -static const BitmapCharRec ch110 = {11,12,-1,0,13,ch110data}; - -/* char: 0x6d 'm' */ - -static const GLubyte ch109data[] = { -0xf1,0xe3,0xc0,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60, -0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x71,0xe3,0x80,0x6f,0x9f, -0x0,0xe7,0xe,0x0, -}; - -static const BitmapCharRec ch109 = {18,12,-1,0,20,ch109data}; - -/* char: 0x6c 'l' */ - -static const GLubyte ch108data[] = { -0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, -0xe0, -}; - -static const BitmapCharRec ch108 = {4,17,-1,0,6,ch108data}; - -/* char: 0x6b 'k' */ - -static const GLubyte ch107data[] = { -0xf3,0xe0,0x61,0xc0,0x63,0x80,0x67,0x0,0x6e,0x0,0x6c,0x0,0x78,0x0,0x68,0x0, -0x64,0x0,0x66,0x0,0x63,0x0,0x67,0xc0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0, -0xe0,0x0, -}; - -static const BitmapCharRec ch107 = {11,17,-1,0,12,ch107data}; - -/* char: 0x6a 'j' */ - -static const GLubyte ch106data[] = { -0xc0,0xe0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0x70,0x0,0x0,0x0,0x30,0x30, -}; - -static const BitmapCharRec ch106 = {4,22,0,5,6,ch106data}; - -/* char: 0x69 'i' */ - -static const GLubyte ch105data[] = { -0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x0,0x0,0x0,0x60, -0x60, -}; - -static const BitmapCharRec ch105 = {4,17,-1,0,6,ch105data}; - -/* char: 0x68 'h' */ - -static const GLubyte ch104data[] = { -0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x71,0xc0,0x6f,0x80,0x67,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0, -0xe0,0x0, -}; - -static const BitmapCharRec ch104 = {11,17,-1,0,13,ch104data}; - -/* char: 0x67 'g' */ - -static const GLubyte ch103data[] = { -0x3f,0x0,0xf1,0xc0,0xc0,0x60,0xc0,0x20,0x60,0x60,0x3f,0xc0,0x7f,0x0,0x60,0x0, -0x30,0x0,0x3e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0, -0x1f,0xc0, -}; - -static const BitmapCharRec ch103 = {11,17,-1,5,12,ch103data}; - -/* char: 0x66 'f' */ - -static const GLubyte ch102data[] = { -0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfe,0x30,0x30,0x30,0x16, -0xe, -}; - -static const BitmapCharRec ch102 = {7,17,0,0,7,ch102data}; - -/* char: 0x65 'e' */ - -static const GLubyte ch101data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80, -0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0, -}; - -static const BitmapCharRec ch101 = {9,12,-1,0,11,ch101data}; - -/* char: 0x64 'd' */ - -static const GLubyte ch100data[] = { -0x1e,0xc0,0x73,0x80,0x61,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80, -0xc1,0x80,0x61,0x80,0x73,0x80,0x1d,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80, -0x3,0x80, -}; - -static const BitmapCharRec ch100 = {10,17,-1,0,12,ch100data}; - -/* char: 0x63 'c' */ - -static const GLubyte ch99data[] = { -0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -0xc0,0x0,0x41,0x80,0x63,0x80,0x1f,0x0, -}; - -static const BitmapCharRec ch99 = {9,12,-1,0,11,ch99data}; - -/* char: 0x62 'b' */ - -static const GLubyte ch98data[] = { -0x5e,0x0,0x73,0x80,0x61,0x80,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0, -0x60,0xc0,0x61,0x80,0x73,0x80,0x6e,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0, -0xe0,0x0, -}; - -static const BitmapCharRec ch98 = {10,17,-1,0,12,ch98data}; - -/* char: 0x61 'a' */ - -static const GLubyte ch97data[] = { -0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0, -0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0, -}; - -static const BitmapCharRec ch97 = {9,12,-1,0,11,ch97data}; - -/* char: 0x60 '`' */ - -static const GLubyte ch96data[] = { -0x60,0xe0,0x80,0xc0,0x60, -}; - -static const BitmapCharRec ch96 = {3,5,-2,-12,7,ch96data}; - -/* char: 0x5f '_' */ - -static const GLubyte ch95data[] = { -0xff,0xf8,0xff,0xf8, -}; - -static const BitmapCharRec ch95 = {13,2,0,5,13,ch95data}; - -/* char: 0x5e '^' */ - -static const GLubyte ch94data[] = { -0x80,0x80,0xc1,0x80,0x41,0x0,0x63,0x0,0x22,0x0,0x36,0x0,0x14,0x0,0x1c,0x0, -0x8,0x0, -}; - -static const BitmapCharRec ch94 = {9,9,-1,-8,11,ch94data}; - -/* char: 0x5d ']' */ - -static const GLubyte ch93data[] = { -0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, -0x18,0x18,0x18,0x18,0xf8, -}; - -static const BitmapCharRec ch93 = {5,21,-1,4,8,ch93data}; - -/* char: 0x5c '\' */ - -static const GLubyte ch92data[] = { -0x6,0x6,0x4,0xc,0xc,0x8,0x18,0x18,0x10,0x30,0x30,0x20,0x60,0x60,0x40,0xc0, -0xc0, -}; - -static const BitmapCharRec ch92 = {7,17,0,0,7,ch92data}; - -/* char: 0x5b '[' */ - -static const GLubyte ch91data[] = { -0xf8,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0xc0,0xc0,0xf8, -}; - -static const BitmapCharRec ch91 = {5,21,-2,4,8,ch91data}; - -/* char: 0x5a 'Z' */ - -static const GLubyte ch90data[] = { -0xff,0xf8,0xe0,0x18,0x70,0x8,0x30,0x8,0x38,0x0,0x18,0x0,0x1c,0x0,0xe,0x0, -0x6,0x0,0x7,0x0,0x3,0x0,0x3,0x80,0x1,0xc0,0x80,0xc0,0x80,0xe0,0xc0,0x70, -0xff,0xf0, -}; - -static const BitmapCharRec ch90 = {13,17,-1,0,15,ch90data}; - -/* char: 0x59 'Y' */ - -static const GLubyte ch89data[] = { -0x7,0xe0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0xc0, -0x3,0x40,0x6,0x60,0x6,0x20,0xc,0x30,0x1c,0x10,0x18,0x18,0x38,0x8,0x30,0xc, -0xfc,0x3f, -}; - -static const BitmapCharRec ch89 = {16,17,0,0,16,ch89data}; - -/* char: 0x58 'X' */ - -static const GLubyte ch88data[] = { -0xfc,0xf,0xc0,0x30,0x3,0x80,0x18,0x7,0x0,0x8,0xe,0x0,0x4,0xc,0x0,0x6, -0x18,0x0,0x2,0x38,0x0,0x1,0x70,0x0,0x0,0xe0,0x0,0x0,0xc0,0x0,0x1,0xc0, -0x0,0x3,0xa0,0x0,0x3,0x10,0x0,0x6,0x8,0x0,0xe,0xc,0x0,0x1c,0x6,0x0, -0x7e,0xf,0x80, -}; - -static const BitmapCharRec ch88 = {18,17,0,0,18,ch88data}; - -/* char: 0x57 'W' */ - -static const GLubyte ch87data[] = { -0x1,0x83,0x0,0x1,0x83,0x0,0x1,0x83,0x80,0x3,0x87,0x80,0x3,0x46,0x80,0x3, -0x46,0xc0,0x6,0x46,0x40,0x6,0x4c,0x40,0x6,0x4c,0x60,0xc,0x2c,0x60,0xc,0x2c, -0x20,0x18,0x2c,0x20,0x18,0x18,0x30,0x18,0x18,0x10,0x30,0x18,0x10,0x30,0x18,0x18, -0xfc,0x7e,0x7e, -}; - -static const BitmapCharRec ch87 = {23,17,0,0,23,ch87data}; - -/* char: 0x56 'V' */ - -static const GLubyte ch86data[] = { -0x1,0x80,0x0,0x1,0x80,0x0,0x1,0x80,0x0,0x3,0xc0,0x0,0x3,0x40,0x0,0x3, -0x60,0x0,0x6,0x20,0x0,0x6,0x20,0x0,0x6,0x30,0x0,0xc,0x10,0x0,0xc,0x18, -0x0,0x18,0x8,0x0,0x18,0x8,0x0,0x18,0xc,0x0,0x30,0x4,0x0,0x30,0x6,0x0, -0xfc,0x1f,0x80, -}; - -static const BitmapCharRec ch86 = {17,17,0,0,17,ch86data}; - -/* char: 0x55 'U' */ - -static const GLubyte ch85data[] = { -0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4, -0xfc,0x1f, -}; - -static const BitmapCharRec ch85 = {16,17,-1,0,18,ch85data}; - -/* char: 0x54 'T' */ - -static const GLubyte ch84data[] = { -0xf,0xc0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0, -0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x83,0x4,0x83,0x4,0xc3,0xc, -0xff,0xfc, -}; - -static const BitmapCharRec ch84 = {14,17,-1,0,16,ch84data}; - -/* char: 0x53 'S' */ - -static const GLubyte ch83data[] = { -0x9e,0x0,0xf1,0x80,0xc0,0xc0,0x80,0x60,0x80,0x60,0x0,0x60,0x0,0xe0,0x3,0xc0, -0xf,0x80,0x1e,0x0,0x78,0x0,0xe0,0x0,0xc0,0x40,0xc0,0x40,0xc0,0xc0,0x63,0xc0, -0x1e,0x40, -}; - -static const BitmapCharRec ch83 = {11,17,-1,0,13,ch83data}; - -/* char: 0x52 'R' */ - -static const GLubyte ch82data[] = { -0xfc,0x1e,0x30,0x1c,0x30,0x38,0x30,0x70,0x30,0x60,0x30,0xc0,0x31,0xc0,0x33,0x80, -0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x38,0x30,0x18,0x30,0x38,0x30,0x30,0x30,0x70, -0xff,0xc0, -}; - -static const BitmapCharRec ch82 = {15,17,-1,0,16,ch82data}; - -/* char: 0x51 'Q' */ - -static const GLubyte ch81data[] = { -0x0,0xf,0x0,0x38,0x0,0x70,0x0,0xe0,0x1,0xc0,0x7,0xe0,0x1c,0x38,0x38,0x1c, -0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,0x7,0xe0, -}; - -static const BitmapCharRec ch81 = {16,22,-1,5,18,ch81data}; - -/* char: 0x50 'P' */ - -static const GLubyte ch80data[] = { -0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, -0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70, -0xff,0xc0, -}; - -static const BitmapCharRec ch80 = {13,17,-1,0,15,ch80data}; - -/* char: 0x4f 'O' */ - -static const GLubyte ch79data[] = { -0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3, -0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38, -0x7,0xe0, -}; - -static const BitmapCharRec ch79 = {16,17,-1,0,18,ch79data}; - -/* char: 0x4e 'N' */ - -static const GLubyte ch78data[] = { -0xf8,0xc,0x20,0x1c,0x20,0x1c,0x20,0x34,0x20,0x64,0x20,0x64,0x20,0xc4,0x21,0x84, -0x21,0x84,0x23,0x4,0x26,0x4,0x26,0x4,0x2c,0x4,0x38,0x4,0x38,0x4,0x30,0x4, -0xf0,0x1f, -}; - -static const BitmapCharRec ch78 = {16,17,-1,0,18,ch78data}; - -/* char: 0x4d 'M' */ - -static const GLubyte ch77data[] = { -0xf8,0x21,0xf8,0x20,0x60,0x60,0x20,0x60,0x60,0x20,0xd0,0x60,0x20,0xd0,0x60,0x21, -0x88,0x60,0x21,0x88,0x60,0x23,0x8,0x60,0x23,0x4,0x60,0x26,0x4,0x60,0x26,0x2, -0x60,0x2c,0x2,0x60,0x2c,0x2,0x60,0x38,0x1,0x60,0x38,0x1,0x60,0x30,0x0,0xe0, -0xf0,0x0,0xf8, -}; - -static const BitmapCharRec ch77 = {21,17,-1,0,22,ch77data}; - -/* char: 0x4c 'L' */ - -static const GLubyte ch76data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, -0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0, -0xfc,0x0, -}; - -static const BitmapCharRec ch76 = {13,17,-1,0,14,ch76data}; - -/* char: 0x4b 'K' */ - -static const GLubyte ch75data[] = { -0xfc,0x1f,0x30,0xe,0x30,0x1c,0x30,0x38,0x30,0x70,0x30,0xe0,0x31,0xc0,0x33,0x80, -0x3f,0x0,0x3e,0x0,0x33,0x0,0x31,0x80,0x30,0xc0,0x30,0x60,0x30,0x30,0x30,0x18, -0xfc,0x7e, -}; - -static const BitmapCharRec ch75 = {16,17,-1,0,17,ch75data}; - -/* char: 0x4a 'J' */ - -static const GLubyte ch74data[] = { -0x78,0x0,0xcc,0x0,0xc6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, -0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, -0x1f,0x80, -}; - -static const BitmapCharRec ch74 = {9,17,-1,0,11,ch74data}; - -/* char: 0x49 'I' */ - -static const GLubyte ch73data[] = { -0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0xfc, -}; - -static const BitmapCharRec ch73 = {6,17,-1,0,8,ch73data}; - -/* char: 0x48 'H' */ - -static const GLubyte ch72data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30, -0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x3f,0xfe,0x0,0x30,0x6,0x0,0x30,0x6, -0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0, -0xfc,0x1f,0x80, -}; - -static const BitmapCharRec ch72 = {17,17,-1,0,19,ch72data}; - -/* char: 0x47 'G' */ - -static const GLubyte ch71data[] = { -0x7,0xe0,0x1e,0x38,0x38,0x1c,0x60,0xc,0x60,0xc,0xc0,0xc,0xc0,0xc,0xc0,0x3f, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c, -0x7,0xe4, -}; - -static const BitmapCharRec ch71 = {16,17,-1,0,18,ch71data}; - -/* char: 0x46 'F' */ - -static const GLubyte ch70data[] = { -0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x20,0x30,0x20, -0x3f,0xe0,0x30,0x20,0x30,0x20,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0, -}; - -static const BitmapCharRec ch70 = {12,17,-1,0,14,ch70data}; - -/* char: 0x45 'E' */ - -static const GLubyte ch69data[] = { -0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40, -0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30, -0xff,0xf0, -}; - -static const BitmapCharRec ch69 = {13,17,-1,0,15,ch69data}; - -/* char: 0x44 'D' */ - -static const GLubyte ch68data[] = { -0xff,0xc0,0x30,0x70,0x30,0x38,0x30,0xc,0x30,0xc,0x30,0x6,0x30,0x6,0x30,0x6, -0x30,0x6,0x30,0x6,0x30,0x6,0x30,0x6,0x30,0xc,0x30,0xc,0x30,0x38,0x30,0x70, -0xff,0xc0, -}; - -static const BitmapCharRec ch68 = {15,17,-1,0,17,ch68data}; - -/* char: 0x43 'C' */ - -static const GLubyte ch67data[] = { -0x7,0xe0,0x1e,0x38,0x38,0x8,0x60,0x4,0x60,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0, -0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c, -0x7,0xe4, -}; - -static const BitmapCharRec ch67 = {14,17,-1,0,16,ch67data}; - -/* char: 0x42 'B' */ - -static const GLubyte ch66data[] = { -0xff,0xe0,0x30,0x78,0x30,0x18,0x30,0xc,0x30,0xc,0x30,0xc,0x30,0x18,0x30,0x38, -0x3f,0xe0,0x30,0x40,0x30,0x30,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70, -0xff,0xc0, -}; - -static const BitmapCharRec ch66 = {14,17,-1,0,16,ch66data}; - -/* char: 0x41 'A' */ - -static const GLubyte ch65data[] = { -0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8, -0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30, -0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0, -0x0,0x80,0x0, -}; - -static const BitmapCharRec ch65 = {17,17,0,0,17,ch65data}; - -/* char: 0x40 '@' */ - -static const GLubyte ch64data[] = { -0x3,0xf0,0x0,0xe,0xc,0x0,0x18,0x0,0x0,0x30,0x0,0x0,0x61,0xde,0x0,0x63, -0x7b,0x0,0xc6,0x39,0x80,0xc6,0x18,0x80,0xc6,0x18,0xc0,0xc6,0x18,0x40,0xc6,0xc, -0x40,0xc3,0xc,0x40,0xc3,0x8c,0x40,0xe1,0xfc,0x40,0x60,0xec,0xc0,0x70,0x0,0x80, -0x38,0x1,0x80,0x1c,0x3,0x0,0xf,0xe,0x0,0x3,0xf8,0x0, -}; - -static const BitmapCharRec ch64 = {18,20,-2,3,22,ch64data}; - -/* char: 0x3f '?' */ - -static const GLubyte ch63data[] = { -0x30,0x30,0x0,0x0,0x10,0x10,0x10,0x18,0x18,0xc,0xe,0x7,0xc3,0xc3,0x83,0xc6, -0x7c, -}; - -static const BitmapCharRec ch63 = {8,17,-2,0,11,ch63data}; - -/* char: 0x3e '>' */ - -static const GLubyte ch62data[] = { -0xc0,0x0,0x70,0x0,0x1c,0x0,0x7,0x0,0x1,0xc0,0x0,0x60,0x1,0xc0,0x7,0x0, -0x1c,0x0,0x70,0x0,0xc0,0x0, -}; - -static const BitmapCharRec ch62 = {11,11,-1,-1,13,ch62data}; - -/* char: 0x3d '=' */ - -static const GLubyte ch61data[] = { -0xff,0xf0,0xff,0xf0,0x0,0x0,0x0,0x0,0xff,0xf0,0xff,0xf0, -}; - -static const BitmapCharRec ch61 = {12,6,-1,-4,14,ch61data}; - -/* char: 0x3c '<' */ - -static const GLubyte ch60data[] = { -0x0,0x60,0x1,0xc0,0x7,0x0,0x1c,0x0,0x70,0x0,0xc0,0x0,0x70,0x0,0x1c,0x0, -0x7,0x0,0x1,0xc0,0x0,0x60, -}; - -static const BitmapCharRec ch60 = {11,11,-1,-1,13,ch60data}; - -/* char: 0x3b ';' */ - -static const GLubyte ch59data[] = { -0xc0,0x60,0x20,0xe0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch59 = {3,14,-2,3,7,ch59data}; - -/* char: 0x3a ':' */ - -static const GLubyte ch58data[] = { -0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0, -}; - -static const BitmapCharRec ch58 = {2,11,-2,0,6,ch58data}; - -/* char: 0x39 '9' */ - -static const GLubyte ch57data[] = { -0xf0,0x0,0x1c,0x0,0x6,0x0,0x3,0x0,0x3,0x80,0x1,0x80,0x1d,0x80,0x73,0xc0, -0x61,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0x61,0x80,0x77,0x80, -0x1e,0x0, -}; - -static const BitmapCharRec ch57 = {10,17,-1,0,12,ch57data}; - -/* char: 0x38 '8' */ - -static const GLubyte ch56data[] = { -0x1e,0x0,0x73,0x80,0xe1,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x41,0xc0,0x61,0x80, -0x37,0x0,0x1e,0x0,0x1e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0, -0x1e,0x0, -}; - -static const BitmapCharRec ch56 = {10,17,-1,0,12,ch56data}; - -/* char: 0x37 '7' */ - -static const GLubyte ch55data[] = { -0x18,0x0,0x18,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0x4,0x0,0x6,0x0,0x6,0x0, -0x2,0x0,0x3,0x0,0x3,0x0,0x1,0x0,0x1,0x80,0x81,0x80,0xc0,0xc0,0xff,0xc0, -0x7f,0xc0, -}; - -static const BitmapCharRec ch55 = {10,17,-1,0,12,ch55data}; - -/* char: 0x36 '6' */ - -static const GLubyte ch54data[] = { -0x1e,0x0,0x7b,0x80,0x61,0x80,0xe0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc1,0x80,0xf3,0x80,0xee,0x0,0x60,0x0,0x70,0x0,0x30,0x0,0x18,0x0,0xe,0x0, -0x3,0xc0, -}; - -static const BitmapCharRec ch54 = {10,17,-1,0,12,ch54data}; - -/* char: 0x35 '5' */ - -static const GLubyte ch53data[] = { -0x7e,0x0,0xe3,0x80,0xc1,0x80,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x1,0xc0, -0x3,0x80,0xf,0x80,0x7e,0x0,0x78,0x0,0x60,0x0,0x20,0x0,0x20,0x0,0x1f,0x80, -0x1f,0xc0, -}; - -static const BitmapCharRec ch53 = {10,17,-1,0,12,ch53data}; - -/* char: 0x34 '4' */ - -static const GLubyte ch52data[] = { -0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0xff,0xc0,0xff,0xc0,0xc3,0x0,0x43,0x0, -0x63,0x0,0x23,0x0,0x33,0x0,0x13,0x0,0x1b,0x0,0xb,0x0,0x7,0x0,0x7,0x0, -0x3,0x0, -}; - -static const BitmapCharRec ch52 = {10,17,-1,0,12,ch52data}; - -/* char: 0x33 '3' */ - -static const GLubyte ch51data[] = { -0x78,0x0,0xe6,0x0,0xc3,0x0,0x1,0x0,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0x80, -0x7,0x0,0x1e,0x0,0xc,0x0,0x6,0x0,0x83,0x0,0x83,0x0,0x47,0x0,0x7e,0x0, -0x1c,0x0, -}; - -static const BitmapCharRec ch51 = {9,17,-1,0,12,ch51data}; - -/* char: 0x32 '2' */ - -static const GLubyte ch50data[] = { -0xff,0x80,0xff,0xc0,0x60,0x40,0x30,0x0,0x18,0x0,0xc,0x0,0x4,0x0,0x6,0x0, -0x3,0x0,0x3,0x0,0x1,0x80,0x1,0x80,0x81,0x80,0x81,0x80,0x43,0x80,0x7f,0x0, -0x1c,0x0, -}; - -static const BitmapCharRec ch50 = {10,17,-1,0,12,ch50data}; - -/* char: 0x31 '1' */ - -static const GLubyte ch49data[] = { -0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x18, -0x8, -}; - -static const BitmapCharRec ch49 = {8,17,-2,0,12,ch49data}; - -/* char: 0x30 '0' */ - -static const GLubyte ch48data[] = { -0x1e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0xe1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x61,0x80,0x61,0x80,0x33,0x0, -0x1e,0x0, -}; - -static const BitmapCharRec ch48 = {10,17,-1,0,12,ch48data}; - -/* char: 0x2f '/' */ - -static const GLubyte ch47data[] = { -0xc0,0xc0,0xc0,0x60,0x60,0x20,0x30,0x30,0x10,0x18,0x18,0x8,0xc,0xc,0x4,0x6, -0x6,0x3,0x3,0x3, -}; - -static const BitmapCharRec ch47 = {8,20,1,3,7,ch47data}; - -/* char: 0x2e '.' */ - -static const GLubyte ch46data[] = { -0xc0,0xc0, -}; - -static const BitmapCharRec ch46 = {2,2,-2,0,6,ch46data}; - -/* char: 0x2d '-' */ - -static const GLubyte ch45data[] = { -0xff,0xf0,0xff,0xf0, -}; - -static const BitmapCharRec ch45 = {12,2,-1,-6,14,ch45data}; - -/* char: 0x2c ',' */ - -static const GLubyte ch44data[] = { -0xc0,0x60,0x20,0xe0,0xc0, -}; - -static const BitmapCharRec ch44 = {3,5,-2,3,7,ch44data}; - -/* char: 0x2b '+' */ - -static const GLubyte ch43data[] = { -0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xff,0xf0,0xff,0xf0,0x6,0x0, -0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0, -}; - -static const BitmapCharRec ch43 = {12,12,-1,-1,14,ch43data}; - -/* char: 0x2a '*' */ - -static const GLubyte ch42data[] = { -0x8,0x0,0x1c,0x0,0xc9,0x80,0xeb,0x80,0x1c,0x0,0xeb,0x80,0xc9,0x80,0x1c,0x0, -0x8,0x0, -}; - -static const BitmapCharRec ch42 = {9,9,-2,-8,12,ch42data}; - -/* char: 0x29 ')' */ - -static const GLubyte ch41data[] = { -0x80,0x40,0x20,0x30,0x10,0x18,0x18,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0x18, -0x18,0x10,0x30,0x20,0x40,0x80, -}; - -static const BitmapCharRec ch41 = {6,22,-1,5,8,ch41data}; - -/* char: 0x28 '(' */ - -static const GLubyte ch40data[] = { -0x4,0x8,0x10,0x30,0x20,0x60,0x60,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x60, -0x60,0x20,0x30,0x10,0x8,0x4, -}; - -static const BitmapCharRec ch40 = {6,22,-1,5,8,ch40data}; - -/* char: 0x27 ''' */ - -static const GLubyte ch39data[] = { -0xc0,0x60,0x20,0xe0,0xc0, -}; - -static const BitmapCharRec ch39 = {3,5,-3,-12,8,ch39data}; - -/* char: 0x26 '&' */ - -static const GLubyte ch38data[] = { -0x3c,0x3c,0x7f,0x7e,0xe1,0xe1,0xc0,0xc0,0xc1,0xc0,0xc1,0xa0,0x63,0x20,0x37,0x10, -0x1e,0x18,0xe,0x3e,0xf,0x0,0x1d,0x80,0x18,0xc0,0x18,0x40,0x18,0x40,0xc,0xc0, -0x7,0x80, -}; - -static const BitmapCharRec ch38 = {16,17,-1,0,18,ch38data}; - -/* char: 0x25 '%' */ - -static const GLubyte ch37data[] = { -0x30,0x3c,0x0,0x18,0x72,0x0,0xc,0x61,0x0,0x4,0x60,0x80,0x6,0x60,0x80,0x3, -0x30,0x80,0x1,0x19,0x80,0x1,0x8f,0x0,0x78,0xc0,0x0,0xe4,0x40,0x0,0xc2,0x60, -0x0,0xc1,0x30,0x0,0xc1,0x10,0x0,0x61,0x18,0x0,0x33,0xfc,0x0,0x1e,0xc,0x0, -}; - -static const BitmapCharRec ch37 = {17,16,-1,0,19,ch37data}; - -/* char: 0x24 '$' */ - -static const GLubyte ch36data[] = { -0x4,0x0,0x4,0x0,0x3f,0x0,0xe5,0xc0,0xc4,0xc0,0x84,0x60,0x84,0x60,0x4,0x60, -0x4,0xe0,0x7,0xc0,0x7,0x80,0x1e,0x0,0x3c,0x0,0x74,0x0,0x64,0x0,0x64,0x20, -0x64,0x60,0x34,0xe0,0x1f,0x80,0x4,0x0,0x4,0x0, -}; - -static const BitmapCharRec ch36 = {11,21,0,2,12,ch36data}; - -/* char: 0x23 '#' */ - -static const GLubyte ch35data[] = { -0x22,0x0,0x22,0x0,0x22,0x0,0x22,0x0,0x22,0x0,0xff,0xc0,0xff,0xc0,0x11,0x0, -0x11,0x0,0x11,0x0,0x7f,0xe0,0x7f,0xe0,0x8,0x80,0x8,0x80,0x8,0x80,0x8,0x80, -0x8,0x80, -}; - -static const BitmapCharRec ch35 = {11,17,-1,0,13,ch35data}; - -/* char: 0x22 '"' */ - -static const GLubyte ch34data[] = { -0x88,0xcc,0xcc,0xcc,0xcc, -}; - -static const BitmapCharRec ch34 = {6,5,-1,-12,10,ch34data}; - -/* char: 0x21 '!' */ - -static const GLubyte ch33data[] = { -0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0, -}; - -static const BitmapCharRec ch33 = {2,17,-3,0,8,ch33data}; - -/* char: 0x20 ' ' */ - -#ifdef _WIN32 -/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with - a height or width of zero does not advance the raster position - as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ -static const GLubyte ch32data[] = { 0x0 }; -static const BitmapCharRec ch32 = {1,1,0,0,6,ch32data}; -#else -static const BitmapCharRec ch32 = {0,0,0,0,6,0}; -#endif - -static const BitmapCharRec * const chars[] = { -&ch32, -&ch33, -&ch34, -&ch35, -&ch36, -&ch37, -&ch38, -&ch39, -&ch40, -&ch41, -&ch42, -&ch43, -&ch44, -&ch45, -&ch46, -&ch47, -&ch48, -&ch49, -&ch50, -&ch51, -&ch52, -&ch53, -&ch54, -&ch55, -&ch56, -&ch57, -&ch58, -&ch59, -&ch60, -&ch61, -&ch62, -&ch63, -&ch64, -&ch65, -&ch66, -&ch67, -&ch68, -&ch69, -&ch70, -&ch71, -&ch72, -&ch73, -&ch74, -&ch75, -&ch76, -&ch77, -&ch78, -&ch79, -&ch80, -&ch81, -&ch82, -&ch83, -&ch84, -&ch85, -&ch86, -&ch87, -&ch88, -&ch89, -&ch90, -&ch91, -&ch92, -&ch93, -&ch94, -&ch95, -&ch96, -&ch97, -&ch98, -&ch99, -&ch100, -&ch101, -&ch102, -&ch103, -&ch104, -&ch105, -&ch106, -&ch107, -&ch108, -&ch109, -&ch110, -&ch111, -&ch112, -&ch113, -&ch114, -&ch115, -&ch116, -&ch117, -&ch118, -&ch119, -&ch120, -&ch121, -&ch122, -&ch123, -&ch124, -&ch125, -&ch126, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -&ch160, -&ch161, -&ch162, -&ch163, -&ch164, -&ch165, -&ch166, -&ch167, -&ch168, -&ch169, -&ch170, -&ch171, -&ch172, -&ch173, -&ch174, -&ch175, -&ch176, -&ch177, -&ch178, -&ch179, -&ch180, -&ch181, -&ch182, -&ch183, -&ch184, -&ch185, -&ch186, -&ch187, -&ch188, -&ch189, -&ch190, -&ch191, -&ch192, -&ch193, -&ch194, -&ch195, -&ch196, -&ch197, -&ch198, -&ch199, -&ch200, -&ch201, -&ch202, -&ch203, -&ch204, -&ch205, -&ch206, -&ch207, -&ch208, -&ch209, -&ch210, -&ch211, -&ch212, -&ch213, -&ch214, -&ch215, -&ch216, -&ch217, -&ch218, -&ch219, -&ch220, -&ch221, -&ch222, -&ch223, -&ch224, -&ch225, -&ch226, -&ch227, -&ch228, -&ch229, -&ch230, -&ch231, -&ch232, -&ch233, -&ch234, -&ch235, -&ch236, -&ch237, -&ch238, -&ch239, -&ch240, -&ch241, -&ch242, -&ch243, -&ch244, -&ch245, -&ch246, -&ch247, -&ch248, -&ch249, -&ch250, -&ch251, -&ch252, -&ch253, -&ch254, -&ch255, -}; - -#if !defined(__IBMCPP__) -const -#endif -BitmapFontRec glutBitmapTimesRoman24 = { -"-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1", -224, -32, -chars -}; - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_util.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_util.cpp deleted file mode 100644 index 76f25020af..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_util.cpp +++ /dev/null @@ -1,90 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include -#include -#include - -#include "glutint.h" - -#if !defined(__OS2__) - -/* strdup is actually not a standard ANSI C or POSIX routine - so implement a private one for GLUT. OpenVMS does not have a - strdup; Linux's standard libc doesn't declare strdup by default - (unless BSD or SVID interfaces are requested). */ -char * -__glutStrdup(const char *string) -{ - char *copy; - - copy = (char*) malloc(strlen(string) + 1); - if (copy == NULL) - return NULL; - strcpy(copy, string); - return copy; -} -#endif - -void -__glutWarning(char *format,...) -{ - va_list args; - - va_start(args, format); - fprintf(stderr, "GLUT: Warning in %s: ", - __glutProgramName ? __glutProgramName : "(unamed)"); - vfprintf(stderr, format, args); - va_end(args); - putc('\n', stderr); -} - -/* CENTRY */ -void GLUTAPIENTRY -glutReportErrors(void) -{ - GLenum error; - - while ((error = glGetError()) != GL_NO_ERROR) - __glutWarning("GL error: %s", gluErrorString(error)); -} -/* ENDCENTRY */ - -void -__glutFatalError(char *format,...) -{ - va_list args; - - va_start(args, format); - fprintf(stderr, "GLUT: Fatal Error in %s: ", - __glutProgramName ? __glutProgramName : "(unamed)"); - vfprintf(stderr, format, args); - va_end(args); - putc('\n', stderr); -/* || defined(__OS2__) */ -#if defined(_WIN32) - if (__glutExitFunc) { - __glutExitFunc(1); - } -#endif - exit(1); -} - -void -__glutFatalUsage(char *format,...) -{ - va_list args; - - va_start(args, format); - fprintf(stderr, "GLUT: Fatal API Usage in %s: ", - __glutProgramName ? __glutProgramName : "(unamed)"); - vfprintf(stderr, format, args); - va_end(args); - putc('\n', stderr); - abort(); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_vidresize.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_vidresize.cpp deleted file mode 100644 index f9d345dcf5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_vidresize.cpp +++ /dev/null @@ -1,232 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1996. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include - -#ifdef __sgi -#include -#endif - -#include "glutint.h" - -/* Grumble. The IRIX 6.3 and early IRIX 6.4 OpenGL headers - support the video resize extension, but failed to define - GLX_SGIX_video_resize. */ -#if 0 -#ifdef GLX_SYNC_FRAME_SGIX -#define GLX_SGIX_video_resize 1 -#endif -#endif - -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) -static int canVideoResize = -1; -static int videoResizeChannel; -#else -static int canVideoResize = 0; -#endif -static int videoResizeInUse = 0; -static int dx = -1, dy = -1, dw = -1, dh = -1; - -/* XXX Note that IRIX 6.2, 6.3, and some 6.4 versions have a - bug where programs seg-fault when they attempt video - resizing from an indirect OpenGL context (either local or - over a network). */ - -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - -static volatile int errorCaught; - -/* ARGSUSED */ -static int -catchXSGIvcErrors(Display * dpy, XErrorEvent * event) -{ - errorCaught = 1; - return 0; -} -#endif - -/* CENTRY */ - -int GLUTAPIENTRY -glutVideoResizeGet(GLenum param) -{ -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (canVideoResize < 0) { - canVideoResize = __glutIsSupportedByGLX("GLX_SGIX_video_resize"); - if (canVideoResize) { -#if defined(__sgi) && __sgi - /* This is a hack because IRIX 6.2, 6.3, and some 6.4 - versions were released with GLX_SGIX_video_resize - being advertised by the X server though the video - resize extension is not actually supported. We try to - determine if the libGL.so we are using actually has a - video resize entrypoint before we try to use the - feature. */ - void (*func) (void); - void *glxDso = dlopen("libGL.so", RTLD_LAZY); - - func = (void (*)(void)) dlsym(glxDso, "glXQueryChannelDeltasSGIX"); - if (!func) { - canVideoResize = 0; - } else -#endif - { - char *channelString; - int (*handler) (Display *, XErrorEvent *); - - channelString = getenv("GLUT_VIDEO_RESIZE_CHANNEL"); - videoResizeChannel = channelString ? atoi(channelString) : 0; - - /* Work around another annoying problem with SGI's - GLX_SGIX_video_resize implementation. Early IRIX - 6.4 OpenGL's advertise the extension and have the - video resize API, but an XSGIvc X protocol errors - result trying to use the API. Set up an error - handler to intercept what would otherwise be a fatal - error. If an error was recieved, do not report that - video resize is possible. */ - handler = XSetErrorHandler(catchXSGIvcErrors); - - errorCaught = 0; - -#if defined(GLX_GLXEXT_PROTOTYPES) -#endif - - __glut_glXQueryChannelDeltasSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, &dx, &dy, &dw, &dh); - - /* glXQueryChannelDeltasSGIX is an inherent X server - round-trip so we know we will have gotten either the - correct reply or and error by this time. */ - XSetErrorHandler(handler); - - /* Still yet another work around. In IRIX 6.4 betas, - glXQueryChannelDeltasSGIX will return as if it - succeeded, but the values are filled with junk. - Watch to make sure the delta variables really make - sense. */ - if (errorCaught || - dx < 0 || dy < 0 || dw < 0 || dh < 0 || - dx > 2048 || dy > 2048 || dw > 2048 || dh > 2048) { - canVideoResize = 0; - } - } - } - } -#endif /* GLX_SGIX_video_resize */ - - switch (param) { - case GLUT_VIDEO_RESIZE_POSSIBLE: - return canVideoResize; - case GLUT_VIDEO_RESIZE_IN_USE: - return videoResizeInUse; - case GLUT_VIDEO_RESIZE_X_DELTA: - return dx; - case GLUT_VIDEO_RESIZE_Y_DELTA: - return dy; - case GLUT_VIDEO_RESIZE_WIDTH_DELTA: - return dw; - case GLUT_VIDEO_RESIZE_HEIGHT_DELTA: - return dh; - case GLUT_VIDEO_RESIZE_X: - case GLUT_VIDEO_RESIZE_Y: - case GLUT_VIDEO_RESIZE_WIDTH: - case GLUT_VIDEO_RESIZE_HEIGHT: -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (videoResizeInUse) { - int x, y, width, height; - - __glut_glXQueryChannelRectSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, &x, &y, &width, &height); - switch (param) { - case GLUT_VIDEO_RESIZE_X: - return x; - case GLUT_VIDEO_RESIZE_Y: - return y; - case GLUT_VIDEO_RESIZE_WIDTH: - return width; - case GLUT_VIDEO_RESIZE_HEIGHT: - return height; - } - } -#endif - return -1; - default: - __glutWarning("invalid glutVideoResizeGet parameter: %d", param); - return -1; - } -} - -void GLUTAPIENTRY -glutSetupVideoResizing(void) -{ -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) { - __glut_glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, __glutCurrentWindow->win); - videoResizeInUse = 1; - } else -#endif - __glutFatalError("glutEstablishVideoResizing: video resizing not possible.\n"); -} - -void GLUTAPIENTRY -glutStopVideoResizing(void) -{ -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) { - if (videoResizeInUse) { - __glut_glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, None); - videoResizeInUse = 0; - } - } -#endif -} - -/* ARGSUSED */ -void GLUTAPIENTRY -glutVideoResize(int x, int y, int width, int height) -{ -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (videoResizeInUse) { -#ifdef GLX_SYNC_SWAP_SGIX - /* glXChannelRectSyncSGIX introduced in a patch to IRIX - 6.2; the original unpatched IRIX 6.2 behavior is always - GLX_SYNC_SWAP_SGIX. */ - __glut_glXChannelRectSyncSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, GLX_SYNC_SWAP_SGIX); -#endif - __glut_glXChannelRectSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, x, y, width, height); - } -#endif -} - -/* ARGSUSED */ -void GLUTAPIENTRY -glutVideoPan(int x, int y, int width, int height) -{ -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) - if (videoResizeInUse) { -#ifdef GLX_SYNC_FRAME_SGIX - /* glXChannelRectSyncSGIX introduced in a patch to IRIX - 6.2; the original unpatched IRIX 6.2 behavior is always - GLX_SYNC_SWAP_SGIX. We just ignore that we cannot - accomplish GLX_SYNC_FRAME_SGIX on IRIX unpatched 6.2; - this means you'd need a glutSwapBuffers to actually - realize the video resize. */ - __glut_glXChannelRectSyncSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, GLX_SYNC_FRAME_SGIX); -#endif - __glut_glXChannelRectSGIX(__glutDisplay, __glutScreen, - videoResizeChannel, x, y, width, height); - } -#endif -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_warp.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_warp.cpp deleted file mode 100644 index 885e169d3f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_warp.cpp +++ /dev/null @@ -1,29 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1996, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#include -#include -#include - -#include "glutint.h" - -/* CENTRY */ -void GLUTAPIENTRY -glutWarpPointer(int x, int y) -{ -// XWarpPointer(__glutDisplay, None, __glutCurrentWindow->win, -// 0, 0, 0, 0, x, y); - POINTL point; - point.x = x; - point.y = y; - WinMapWindowPoints(__glutCurrentWindow->win,HWND_DESKTOP,&point,1); - WinSetPointerPos(HWND_DESKTOP, point.x, point.y); - - XFlush(__glutDisplay); -} - -/* ENDCENTRY */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_win.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_win.cpp deleted file mode 100644 index 82abba87e4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_win.cpp +++ /dev/null @@ -1,1221 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#ifdef __VMS -#include -#endif - -#include -#include -#include -#include -#if defined(__OS2__) -#define POKA 0 - #include "WarpGL.h" - #include "glutos2.h" - #include "glutint.h" - - #include "gl\os2mesa.h" - -// -//define for resource id for main GLUT window, in samples it is defined in GL_TEST.h - #define ID_WINDOW 256 - - int evglSetPixelFormat(int iPixelFormat); - HPS hpsCurrent; - -#elif !defined(_WIN32) - -#include -#include -#endif - -#include "glutint.h" - -GLUTwindow *__glutCurrentWindow = NULL; -GLUTwindow **__glutWindowList = NULL; -int __glutWindowListSize = 0; -#if !defined(_WIN32) && !defined(__OS2__) -GLUTstale *__glutStaleWindowList = NULL; -#endif -GLUTwindow *__glutMenuWindow = NULL; - -void (*__glutFreeOverlayFunc) (GLUToverlay *); -XVisualInfo *(*__glutDetermineVisualFromString) (char *string, Bool * treatAsSingle, - Criterion * requiredCriteria, int nRequired, int requiredMask, void** fbc) = NULL; - -static Criterion requiredWindowCriteria[] = -{ - {LEVEL, EQ, 0}, - {TRANSPARENT, EQ, 0} -}; -static int numRequiredWindowCriteria = sizeof(requiredWindowCriteria) / sizeof(Criterion); -static int requiredWindowCriteriaMask = (1 << LEVEL) | (1 << TRANSPARENT); - -static void -cleanWindowWorkList(GLUTwindow * window) -{ - GLUTwindow **pEntry = &__glutWindowWorkList; - GLUTwindow *entry = __glutWindowWorkList; - - /* Tranverse singly-linked window work list look for the - window. */ - while (entry) { - if (entry == window) { - /* Found it; delete it. */ - *pEntry = entry->prevWorkWin; - return; - } else { - pEntry = &entry->prevWorkWin; - entry = *pEntry; - } - } -} - -#if !defined(_WIN32) && !defined(__OS2PM__) - -static void -cleanStaleWindowList(GLUTwindow * window) -{ - GLUTstale **pEntry = &__glutStaleWindowList; - GLUTstale *entry = __glutStaleWindowList; - - /* Tranverse singly-linked stale window list look for the - window ID. */ - while (entry) { - if (entry->window == window) { - /* Found it; delete it. */ - *pEntry = entry->next; - free(entry); - return; - } else { - pEntry = &entry->next; - entry = *pEntry; - } - } -} - -#endif - -static GLUTwindow *__glutWindowCache = NULL; - -GLUTwindow * -__glutGetWindow(Window win) -{ - int i; - - /* Does win belong to the last window ID looked up? */ - if (__glutWindowCache && (win == __glutWindowCache->win || - (__glutWindowCache->overlay && win == - __glutWindowCache->overlay->win))) { - return - __glutWindowCache; - } - /* Otherwise scan the window list looking for the window ID. */ - for (i = 0; i < __glutWindowListSize; i++) { - if (__glutWindowList[i]) { - if (win == __glutWindowList[i]->win) { - __glutWindowCache = __glutWindowList[i]; - return __glutWindowCache; - } - if (__glutWindowList[i]->overlay) { - if (win == __glutWindowList[i]->overlay->win) { - __glutWindowCache = __glutWindowList[i]; - return __glutWindowCache; - } - } - } - } -#if !defined(_WIN32) && !defined(__OS2PM__) - { - GLUTstale *entry; - - /* Scan through destroyed overlay window IDs for which no - DestroyNotify has yet been received. */ - for (entry = __glutStaleWindowList; entry; entry = entry->next) { - if (entry->win == win) - return entry->window; - } - } -#endif - return NULL; -} - -/* CENTRY */ -int GLUTAPIENTRY -glutGetWindow(void) -{ - if (__glutCurrentWindow) { - return __glutCurrentWindow->num + 1; - } else { - return 0; - } -} -/* ENDCENTRY */ - -void -__glutSetWindow(GLUTwindow * window) -{ - /* It is tempting to try to short-circuit the call to - glXMakeCurrent if we "know" we are going to make current - to a window we are already current to. In fact, this - assumption breaks when GLUT is expected to integrated with - other OpenGL windowing APIs that also make current to - OpenGL contexts. Since glXMakeCurrent short-circuits the - "already bound" case, GLUT avoids the temptation to do so - too. */ - __glutCurrentWindow = window; - - MAKE_CURRENT_LAYER(__glutCurrentWindow); - -#if !defined(_WIN32) && !defined(__OS2__) - /* We should be careful to force a finish between each - iteration through the GLUT main loop if indirect OpenGL - contexts are in use; indirect contexts tend to have much - longer latency because lots of OpenGL extension requests - can queue up in the X protocol stream. We accomplish this - by posting GLUT_FINISH_WORK to be done. */ - if (!__glutCurrentWindow->isDirect) - __glutPutOnWorkList(__glutCurrentWindow, GLUT_FINISH_WORK); -#endif - - /* If debugging is enabled, we'll want to check this window - for any OpenGL errors every iteration through the GLUT - main loop. To accomplish this, we post the - GLUT_DEBUG_WORK to be done on this window. */ - if (__glutDebug) { - __glutPutOnWorkList(__glutCurrentWindow, GLUT_DEBUG_WORK); - } -} - -/* CENTRY */ -void GLUTAPIENTRY -glutSetWindow(int win) -{ - GLUTwindow *window; - - if (win < 1 || win > __glutWindowListSize) { - __glutWarning("glutSetWindow attempted on bogus window."); - return; - } - window = __glutWindowList[win - 1]; - if (!window) { - __glutWarning("glutSetWindow attempted on bogus window."); - return; - } - __glutSetWindow(window); -} -/* ENDCENTRY */ - -static int -getUnusedWindowSlot(void) -{ - int i; - - /* Look for allocated, unused slot. */ - for (i = 0; i < __glutWindowListSize; i++) { - if (!__glutWindowList[i]) { - return i; - } - } - /* Allocate a new slot. */ - __glutWindowListSize++; - if (__glutWindowList) { - __glutWindowList = (GLUTwindow **) - realloc(__glutWindowList, - __glutWindowListSize * sizeof(GLUTwindow *)); - } else { - /* XXX Some realloc's do not correctly perform a malloc - when asked to perform a realloc on a NULL pointer, - though the ANSI C library spec requires this. */ - __glutWindowList = (GLUTwindow **) - malloc(sizeof(GLUTwindow *)); - } - if (!__glutWindowList) - __glutFatalError("out of memory."); - __glutWindowList[__glutWindowListSize - 1] = NULL; - return __glutWindowListSize - 1; -} - -static XVisualInfo * -getVisualInfoCI(unsigned int mode) -{ -#if POKA - static int bufSizeList[] = - {16, 12, 8, 4, 2, 1, 0}; - XVisualInfo *vi; - int list[32]; - int i, n = 0; - - /* Should not be looking at display mode mask if - __glutDisplayString is non-NULL. */ - assert(!__glutDisplayString); - - list[n++] = GLX_BUFFER_SIZE; - list[n++] = 1; - if (GLUT_WIND_IS_DOUBLE(mode)) { - list[n++] = GLX_DOUBLEBUFFER; - } - if (GLUT_WIND_IS_STEREO(mode)) { - list[n++] = GLX_STEREO; - } - if (GLUT_WIND_HAS_DEPTH(mode)) { - list[n++] = GLX_DEPTH_SIZE; - list[n++] = 1; - } - if (GLUT_WIND_HAS_STENCIL(mode)) { - list[n++] = GLX_STENCIL_SIZE; - list[n++] = 1; - } - list[n] = (int) None; /* terminate list */ - - /* glXChooseVisual specify GLX_BUFFER_SIZE prefers the - "smallest index buffer of at least the specified size". - This would be reasonable if GLUT allowed the user to - specify the required buffe size, but GLUT's display mode - is too simplistic (easy to use?). GLUT should try to find - the "largest". So start with a large buffer size and - shrink until we find a matching one that exists. */ - - for (i = 0; bufSizeList[i]; i++) { - /* XXX Assumes list[1] is where GLX_BUFFER_SIZE parameter - is. */ - list[1] = bufSizeList[i]; - vi = glXChooseVisual(__glutDisplay, - __glutScreen, list); - if (vi) - return vi; - } - return NULL; -#else - return - glXChooseVisual(mode); - -#endif -} - -static XVisualInfo * -getVisualInfoRGB(unsigned int mode) -{ -#if POKA - int list[32]; - int n = 0; - - /* Should not be looking at display mode mask if - __glutDisplayString is non-NULL. */ - assert(!__glutDisplayString); - - /* XXX Would a caching mechanism to minize the calls to - glXChooseVisual? You'd have to reference count - XVisualInfo* pointers. Would also have to properly - interact with glutInitDisplayString. */ - - list[n++] = GLX_RGBA; - list[n++] = GLX_RED_SIZE; - list[n++] = 1; - list[n++] = GLX_GREEN_SIZE; - list[n++] = 1; - list[n++] = GLX_BLUE_SIZE; - list[n++] = 1; - if (GLUT_WIND_HAS_ALPHA(mode)) { - list[n++] = GLX_ALPHA_SIZE; - list[n++] = 1; - } - if (GLUT_WIND_IS_DOUBLE(mode)) { - list[n++] = GLX_DOUBLEBUFFER; - } - if (GLUT_WIND_IS_STEREO(mode)) { - list[n++] = GLX_STEREO; - } - if (GLUT_WIND_HAS_DEPTH(mode)) { - list[n++] = GLX_DEPTH_SIZE; - list[n++] = 1; - } - if (GLUT_WIND_HAS_STENCIL(mode)) { - list[n++] = GLX_STENCIL_SIZE; - list[n++] = 1; - } - if (GLUT_WIND_HAS_ACCUM(mode)) { - list[n++] = GLX_ACCUM_RED_SIZE; - list[n++] = 1; - list[n++] = GLX_ACCUM_GREEN_SIZE; - list[n++] = 1; - list[n++] = GLX_ACCUM_BLUE_SIZE; - list[n++] = 1; - if (GLUT_WIND_HAS_ALPHA(mode)) { - list[n++] = GLX_ACCUM_ALPHA_SIZE; - list[n++] = 1; - } - } -#if defined(GLX_VERSION_1_1) && (defined(GLX_SGIS_multisample) || defined(GLX_ARB_multisample)) - if (GLUT_WIND_IS_MULTISAMPLE(mode)) { - if (!__glutIsSupportedByGLX("GLX_SGIS_multisample") && - !__glutIsSupportedByGLX("GLX_ARB_multisample")) - return NULL; -#if defined(GLX_ARB_multisample) - list[n++] = GLX_SAMPLES_ARB; -#elif defined(GLX_SGIS_multisample) - list[n++] = GLX_SAMPLES_SGIS; -#endif - /* XXX Is 4 a reasonable minimum acceptable number of - samples? */ - list[n++] = 4; - } -#endif - list[n] = (int) None; /* terminate list */ - - return glXChooseVisual(__glutDisplay, - __glutScreen, list); -#else /* POKA */ - - return - glXChooseVisual(mode); - -#endif -} - -XVisualInfo * -__glutGetVisualInfo(unsigned int mode) -{ - /* XXX GLUT_LUMINANCE not implemented for GLUT 3.0. */ - if (GLUT_WIND_IS_LUMINANCE(mode)) - return NULL; - - if (GLUT_WIND_IS_RGB(mode)) - return getVisualInfoRGB(mode); - else - return getVisualInfoCI(mode); -} - -XVisualInfo * -__glutDetermineVisual( - unsigned int displayMode, - Bool * treatAsSingle, - XVisualInfo * (getVisualInfo) (unsigned int)) -{ - XVisualInfo *vis; - - /* Should not be looking at display mode mask if - __glutDisplayString is non-NULL. */ - assert(!__glutDisplayString); - - *treatAsSingle = GLUT_WIND_IS_SINGLE(displayMode); - vis = getVisualInfo(displayMode); - if (!vis) { - /* Fallback cases when can't get exactly what was asked - for... */ - if (GLUT_WIND_IS_SINGLE(displayMode)) { - /* If we can't find a single buffered visual, try looking - for a double buffered visual. We can treat a double - buffered visual as a single buffer visual by changing - the draw buffer to GL_FRONT and treating any swap - buffers as no-ops. */ - displayMode |= GLUT_DOUBLE; - vis = getVisualInfo(displayMode); - *treatAsSingle = True; - } - if (!vis && GLUT_WIND_IS_MULTISAMPLE(displayMode)) { - /* If we can't seem to get multisampling (ie, not Reality - Engine class graphics!), go without multisampling. It - is up to the application to query how many multisamples - were allocated (0 equals no multisampling) if the - application is going to use multisampling for more than - just antialiasing. */ - displayMode &= ~GLUT_MULTISAMPLE; - vis = getVisualInfo(displayMode); - } - } - return vis; -} - -static void GLUTCALLBACK -__glutDefaultDisplay(void) -{ - /* XXX Remove the warning after GLUT 3.0. */ - __glutWarning("The following is a new check for GLUT 3.0; update your code."); - __glutFatalError( - "redisplay needed for window %d, but no display callback.", - __glutCurrentWindow->num + 1); -} - -void GLUTCALLBACK -__glutDefaultReshape(int width, int height) -{ - GLUToverlay *overlay; - - /* Adjust the viewport of the window (and overlay if one - exists). */ - MAKE_CURRENT_WINDOW(__glutCurrentWindow); - glViewport(0, 0, (GLsizei) width, (GLsizei) height); - overlay = __glutCurrentWindow->overlay; - if (overlay) { - MAKE_CURRENT_OVERLAY(overlay); - glViewport(0, 0, (GLsizei) width, (GLsizei) height); - } - /* Make sure we are current to the current layer (application - should be able to count on the current layer not changing - unless the application explicitly calls glutUseLayer). */ - MAKE_CURRENT_LAYER(__glutCurrentWindow); -} - -XVisualInfo * -__glutDetermineWindowVisual(Bool * treatAsSingle, Bool * visAlloced, void **fbc) -{ - if (__glutDisplayString) { - - /* __glutDisplayString should be NULL except if - glutInitDisplayString has been called to register a - different display string. Calling glutInitDisplayString - means using a string instead of an integer mask determine - the visual to use. Using the function pointer variable - __glutDetermineVisualFromString below avoids linking in - the code for implementing glutInitDisplayString (ie, - glut_dstr.o) unless glutInitDisplayString gets called by - the application. */ - - assert(__glutDetermineVisualFromString); - *visAlloced = False; - *fbc = NULL; - return __glutDetermineVisualFromString(__glutDisplayString, treatAsSingle, - requiredWindowCriteria, numRequiredWindowCriteria, requiredWindowCriteriaMask, fbc); - } else { - *visAlloced = True; - *fbc = NULL; - return __glutDetermineVisual(__glutDisplayMode, - treatAsSingle, __glutGetVisualInfo); - } -} - -/* ARGSUSED5 */ /* Only Win32 uses gameMode parameter. */ -GLUTwindow * -__glutCreateWindow(GLUTwindow * parent, - int x, int y, int width, int height, int gameMode) -{ - GLUTwindow *window; - XSetWindowAttributes wa; - unsigned long attribMask; - int winnum; - int i; -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - GLXFBConfigSGIX fbc; -#else - void *fbc; -#endif - -#if defined(__OS2PM__) - { - extern HAB hab; /* PM anchor block handle */ - CLASSINFO classinfo; - - if(!WinQueryClassInfo(hab,"GLUT", &classinfo) ) - __glutOpenOS2Connection(NULL); - } -#elif defined(_WIN32) - WNDCLASS wc; - int style; - - if (!GetClassInfo(GetModuleHandle(NULL), "GLUT", &wc)) { - __glutOpenWin32Connection(NULL); - } -#else - if (!__glutDisplay) { - __glutOpenXConnection(NULL); - } -#endif - -#ifndef __OS2PM__ - if (__glutGameModeWindow) { - __glutFatalError("cannot create windows in game mode."); - } -#endif - - winnum = getUnusedWindowSlot(); - window = (GLUTwindow *) malloc(sizeof(GLUTwindow)); - if (!window) { - __glutFatalError("out of memory."); - } - window->num = winnum; - -#if defined(__OS2PM__) - /* Add this new window to the window list. */ - __glutWindowList[winnum] = window; - window->shownState = -1; -#endif - -#if !defined(_WIN32) && !defined(__OS2PM__) - window->vis = __glutDetermineWindowVisual(&window->treatAsSingle, - &window->visAlloced, (void**) &fbc); - if (!window->vis) { - __glutFatalError( - "visual with necessary capabilities not found."); - } - __glutSetupColormap(window->vis, &window->colormap, &window->cmap); -#endif - window->eventMask = StructureNotifyMask | ExposureMask; - - attribMask = CWBackPixmap | CWBorderPixel | CWColormap | CWEventMask; - wa.background_pixmap = None; - wa.border_pixel = 0; - wa.colormap = window->cmap; - wa.event_mask = window->eventMask; - if (parent) { - if (parent->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK) - wa.event_mask |= GLUT_HACK_STOP_PROPAGATE_MASK; - attribMask |= CWDontPropagate; - wa.do_not_propagate_mask = parent->eventMask & GLUT_DONT_PROPAGATE_FILTER_MASK; - } else { - wa.do_not_propagate_mask = 0; - } - - /* Stash width and height before Win32's __glutAdjustCoords - possibly overwrites the values. */ - window->width = width; - window->height = height; - window->forceReshape = True; - window->ignoreKeyRepeat = False; - -#if defined(__OS2PM__) - - { ULONG flStyle=0; - int ii; - ERRORID erridErrorCode;/* last error id code */ - extern HAB hab; /* PM anchor block handle */ - - if (parent) { - flStyle = WS_CLIPCHILDREN|WS_VISIBLE; - } else { - if (gameMode) { - /* Game mode window should be a WS_POPUP window to - ensure that the taskbar is hidden by it. A standard - WS_OVERLAPPEDWINDOW does not hide the task bar. */ - flStyle = FCF_STANDARD | WS_MAXIMIZED; - } else { - /* A standard toplevel window with borders and such. */ - flStyle = FCF_STANDARD | WS_CLIPCHILDREN; -// flStyle = WS_OVERLAPPEDWINDOW; - } - } -{ - HWND hwnd; /* Window */ - ULONG ListBoxId; /* Window id */ - /* (supplied by application) */ - - - HWND hwndClient; /* handle to the client */ - HWND hwndFrame; /* handle to the frame */ - PFNWP GenericWndProc; - FRAMECDATA fcd; - RECTL rect; /* Boundary rectangle */ - - - -/************************************************/ -// flCreate = (FCF_STANDARD) & ~FCF_TASKLIST; -/**********************************/ - if (parent) - { window->frame = NULL; - - hwnd = WinCreateWindow(parent->win, /* Parent window */ - "GLUTCHILD", /* Class name */ - "", /* Window text */ - flStyle, /* Window style */ - x, y, /* Position (x,y) */ - width, height, /* Size (width,height) */ - parent->win, /* Owner window */ - HWND_TOP, /* Sibling window */ - 0, /* Window id */ - NULL, /* Control data */ - NULL); /* Pres parameters */ - - erridErrorCode = WinGetLastError(hab); - window->win = hwnd; - - window->hdc = WinOpenWindowDC(window->win); - window->hpsBuffer = hpsCurrent; - - - rect.xLeft = x; - rect.xRight = x+width; - rect.yBottom = y; - rect.yTop = y + height; - -/***** else parent *****************************/ - } else { - hwnd = WinCreateStdWindow(HWND_DESKTOP, - 0, /* WS_VISIBLE frame-window style */ - &flStyle, /* window style */ - "GLUT", /* class name */ - "GLUT",/* window title */ - 0L, /* default client style */ - NULLHANDLE, /* resource in executable file */ - ID_WINDOW, /* resource id */ - &hwndClient); /* receives client window handle */ - - erridErrorCode = WinGetLastError(hab); - window->win = hwndClient; - window->frame = hwnd; - window->hdc = WinOpenWindowDC(window->win); - - window->hpsBuffer = hpsCurrent; - - -/* converts a client window's boundaries into an equivalent frame rectangle */ - rect.xLeft = x; - rect.xRight = x+width; - rect.yBottom = y; - rect.yTop = y + height; - - /* calculate equivalent frame boundary from boundary data */ - WinCalcFrameRect(window->frame, &rect, FALSE); - } -/***** endof if(parent) *****************************/ - - /* Must set the XHDC for fake glXChooseVisual & fake - glXCreateContext & fake XAllocColorCells. */ - XHDC = window->hdc; - XHWND = window->win; - window->vis = __glutDetermineWindowVisual(&window->treatAsSingle, - &window->visAlloced, &fbc); - if (!window->vis) - { __glutFatalError( - "pixel format with necessary capabilities not found."); - } - { int rc; - rc = wglChoosePixelFormat(window->hdc, window->vis), - -// evglSetPixelFormat(2); /* int iPixelFormat 1 - doublebuffer/2 - single buffer ??*/ - wglSetPixelFormat(window->hdc,rc,window->vis); - } - __glutSetupColormap(window->vis, &window->colormap, &window->cmap); - - window->ctx = glXCreateContext(window->hpsBuffer, window->vis, - None, __glutTryDirect); - - WinSetWindowPos(hwnd, - HWND_TOP,rect.xLeft,rect.yBottom, - rect.xRight-rect.xLeft, rect.yTop-rect.yBottom, - SWP_ACTIVATE | SWP_MOVE | SWP_SIZE | SWP_SHOW|SWP_ZORDER); /* flags*/ - - /* Make sure subwindows get a windowStatus callback. */ - if (parent) - WinPostMsg(parent->win, WM_ACTIVATE, 0, 0); - - } -} - -#elif defined(_WIN32) - - __glutAdjustCoords(parent ? parent->win : NULL, - &x, &y, &width, &height); - if (parent) { - style = WS_CHILD; - } else { - if (gameMode) { - /* Game mode window should be a WS_POPUP window to - ensure that the taskbar is hidden by it. A standard - WS_OVERLAPPEDWINDOW does not hide the task bar. */ - style = WS_POPUP | WS_MAXIMIZE; - } else { - /* A standard toplevel window with borders and such. */ - style = WS_OVERLAPPEDWINDOW; - } - } - window->win = CreateWindow("GLUT", "GLUT", - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | style, - x, y, width, height, parent ? parent->win : __glutRoot, - NULL, GetModuleHandle(NULL), 0); - window->hdc = GetDC(window->win); - /* Must set the XHDC for fake glXChooseVisual & fake - glXCreateContext & fake XAllocColorCells. */ - XHDC = window->hdc; - window->vis = __glutDetermineWindowVisual(&window->treatAsSingle, - &window->visAlloced, &fbc); - if (!window->vis) { - __glutFatalError( - "pixel format with necessary capabilities not found."); - } - if (!SetPixelFormat(window->hdc, - ChoosePixelFormat(window->hdc, window->vis), - window->vis)) { - __glutFatalError("SetPixelFormat failed during window create."); - } - __glutSetupColormap(window->vis, &window->colormap, &window->cmap); - /* Make sure subwindows get a windowStatus callback. */ - if (parent) { - PostMessage(parent->win, WM_ACTIVATE, 0, 0); - } - window->renderDc = window->hdc; -#else - window->win = XCreateWindow(__glutDisplay, - parent == NULL ? __glutRoot : parent->win, - x, y, width, height, 0, - window->vis->depth, InputOutput, window->vis->visual, - attribMask, &wa); -#endif - window->renderWin = window->win; -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - if (fbc) { - window->ctx = __glut_glXCreateContextWithConfigSGIX(__glutDisplay, fbc, - GLX_RGBA_TYPE_SGIX, None, __glutTryDirect); - } else -#endif -#if defined(__OS2PM__) -// window->ctx = glXCreateContext(window->hpsBuffer, window->vis, -// None, __glutTryDirect); -#else - window->ctx = glXCreateContext(__glutDisplay, window->vis, - None, __glutTryDirect); -#endif - if (!window->ctx) { - __glutFatalError( - "failed to create OpenGL rendering context."); - } - window->renderCtx = window->ctx; -#if !defined(_WIN32) && !defined(__OS2PM__) - window->isDirect = glXIsDirect(__glutDisplay, window->ctx); - if (__glutForceDirect) { - if (!window->isDirect) - __glutFatalError("direct rendering not possible."); - } -#endif - - window->parent = parent; - if (parent) { - window->siblings = parent->children; - parent->children = window; - } else { - window->siblings = NULL; - } - window->overlay = NULL; - window->children = NULL; - window->display = __glutDefaultDisplay; - window->reshape = __glutDefaultReshape; - window->mouse = NULL; - window->motion = NULL; - window->passive = NULL; - window->entry = NULL; - window->keyboard = NULL; - window->keyboardUp = NULL; - window->windowStatus = NULL; - window->visibility = NULL; - window->special = NULL; - window->specialUp = NULL; - window->buttonBox = NULL; - window->dials = NULL; - window->spaceMotion = NULL; - window->spaceRotate = NULL; - window->spaceButton = NULL; - window->tabletMotion = NULL; - window->tabletButton = NULL; -#ifdef _WIN32 - window->joystick = NULL; - window->joyPollInterval = 0; -#endif - -#if defined(__OS2PM__) - window->wm_command = NULL; -#endif - - window->tabletPos[0] = -1; - window->tabletPos[1] = -1; -#if defined(__OS2PM__) - if(window->shownState == -1) - window->shownState = 0; - window->visState = window->shownState; -#else - window->shownState = 0; - window->visState = -1; /* not VisibilityUnobscured, - VisibilityPartiallyObscured, or - VisibilityFullyObscured */ -#endif - window->entryState = -1; /* not EnterNotify or LeaveNotify */ - - window->desiredConfMask = 0; - window->buttonUses = 0; - window->cursor = GLUT_CURSOR_INHERIT; - - /* Setup window to be mapped when glutMainLoop starts. */ - window->workMask = GLUT_MAP_WORK; -#ifdef _WIN32 - if (gameMode) { - /* When mapping a game mode window, just show - the window. We have already created the game - mode window with a maximize flag at creation - time. Doing a ShowWindow(window->win, SW_SHOWNORMAL) - would be wrong for a game mode window since it - would unmaximize the window. */ - window->desiredMapState = GameModeState; - } else { - window->desiredMapState = NormalState; - } -#else - window->desiredMapState = NormalState; -#endif - window->prevWorkWin = __glutWindowWorkList; - __glutWindowWorkList = window; - - /* Initially, no menus attached. */ - for (i = 0; i < GLUT_MAX_MENUS; i++) { - window->menu[i] = 0; - } - - /* Add this new window to the window list. */ - __glutWindowList[winnum] = window; - - /* Make the new window the current window. */ - __glutSetWindow(window); - - __glutDetermineMesaSwapHackSupport(); - - if (window->treatAsSingle) { - /* We do this because either the window really is single - buffered (in which case this is redundant, but harmless, - because this is the initial single-buffered context - state); or we are treating a double buffered window as a - single-buffered window because the system does not appear - to export any suitable single- buffered visuals (in which - the following are necessary). */ - glDrawBuffer(GL_FRONT); - glReadBuffer(GL_FRONT); - } - return window; -} - -/* CENTRY */ -int GLUTAPIENTRY -glutCreateWindow(const char *title) -{ - static int firstWindow = 1; - GLUTwindow *window; -#if !defined(_WIN32) && !defined(__OS2__) - XWMHints *wmHints; -#endif - Window win; - XTextProperty textprop; - - if (__glutGameModeWindow) { - __glutFatalError("cannot create windows in game mode."); - } - window = __glutCreateWindow(NULL, - __glutSizeHints.x, __glutSizeHints.y, - __glutInitWidth, __glutInitHeight, - /* not game mode */ 0); - win = window->win; - /* Setup ICCCM properties. */ - textprop.value = (unsigned char *) title; - textprop.encoding = XA_STRING; - textprop.format = 8; - textprop.nitems = strlen(title); -#if defined(__OS2__) - WinSetWindowText(window->frame, (PCSZ)title); - if (__glutIconic) { - window->desiredMapState = IconicState; - } -#elif defined(_WIN32) - SetWindowText(win, title); - if (__glutIconic) { - window->desiredMapState = IconicState; - } -#else - wmHints = XAllocWMHints(); - wmHints->initial_state = - __glutIconic ? IconicState : NormalState; - wmHints->flags = StateHint; - XSetWMProperties(__glutDisplay, win, &textprop, &textprop, - /* Only put WM_COMMAND property on first window. */ - firstWindow ? __glutArgv : NULL, - firstWindow ? __glutArgc : 0, - &__glutSizeHints, wmHints, NULL); - XFree(wmHints); - XSetWMProtocols(__glutDisplay, win, &__glutWMDeleteWindow, 1); -#endif - firstWindow = 0; - return window->num + 1; -} - -#ifdef _WIN32 -int GLUTAPIENTRY -__glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int)) -{ - __glutExitFunc = exitfunc; - return glutCreateWindow(title); -} -#endif - -int GLUTAPIENTRY -glutCreateSubWindow(int win, int x, int y, int width, int height) -{ - GLUTwindow *window; - - window = __glutCreateWindow(__glutWindowList[win - 1], - x, y, width, height, /* not game mode */ 0); -#if !defined(_WIN32) && !defined(__OS2__) - { - GLUTwindow *toplevel; - - toplevel = __glutToplevelOf(window); - if (toplevel->cmap != window->cmap) { - __glutPutOnWorkList(toplevel, GLUT_COLORMAP_WORK); - } - } -#endif - return window->num + 1; -} -/* ENDCENTRY */ - -void -__glutDestroyWindow(GLUTwindow * window, - GLUTwindow * initialWindow) -{ - GLUTwindow **prev, *cur, *parent, *siblings; - - /* Recursively destroy any children. */ - cur = window->children; - while (cur) { - siblings = cur->siblings; - __glutDestroyWindow(cur, initialWindow); - cur = siblings; - } - /* Remove from parent's children list (only necessary for - non-initial windows and subwindows!). */ - parent = window->parent; - if (parent && parent == initialWindow->parent) { - prev = &parent->children; - cur = parent->children; - while (cur) { - if (cur == window) { - *prev = cur->siblings; - break; - } - prev = &(cur->siblings); - cur = cur->siblings; - } - } - /* Unbind if bound to this window. */ - if (window == __glutCurrentWindow) { - UNMAKE_CURRENT(); - __glutCurrentWindow = NULL; - } - /* Begin tearing down window itself. */ - if (window->overlay) { - __glutFreeOverlayFunc(window->overlay); - } - XDestroyWindow(__glutDisplay, window->win); - glXDestroyContext(__glutDisplay, window->ctx); - if (window->colormap) { - /* Only color index windows have colormap data structure. */ - __glutFreeColormap(window->colormap); - } - /* NULLing the __glutWindowList helps detect is a window - instance has been destroyed, given a window number. */ - __glutWindowList[window->num] = NULL; - - /* Cleanup data structures that might contain window. */ - cleanWindowWorkList(window); -#if !defined(_WIN32) && !defined(__OS2__) - cleanStaleWindowList(window); -#endif - /* Remove window from the "get window cache" if it is there. */ - if (__glutWindowCache == window) - __glutWindowCache = NULL; - - if (window->visAlloced) { - /* Only free XVisualInfo* gotten from glXChooseVisual. */ - XFree(window->vis); - } - - if (window == __glutGameModeWindow) { - /* Destroying the game mode window should implicitly - have GLUT leave game mode. */ - __glutCloseDownGameMode(); - } - - free(window); -} - -/* CENTRY */ -void GLUTAPIENTRY -glutDestroyWindow(int win) -{ - GLUTwindow *window = __glutWindowList[win - 1]; - - if (__glutMappedMenu && __glutMenuWindow == window) { - __glutFatalUsage("destroying menu window not allowed while menus in use"); - } -#if !defined(_WIN32) && !defined(__OS2__) - /* If not a toplevel window... */ - if (window->parent) { - /* Destroying subwindows may change colormap requirements; - recalculate toplevel window's WM_COLORMAP_WINDOWS - property. */ - __glutPutOnWorkList(__glutToplevelOf(window->parent), - GLUT_COLORMAP_WORK); - } -#endif - __glutDestroyWindow(window, window); - XFlush(__glutDisplay); -} -/* ENDCENTRY */ - -void -__glutChangeWindowEventMask(long eventMask, Bool add) -{ - if (add) { - /* Add eventMask to window's event mask. */ - if ((__glutCurrentWindow->eventMask & eventMask) != - eventMask) { - __glutCurrentWindow->eventMask |= eventMask; - __glutPutOnWorkList(__glutCurrentWindow, - GLUT_EVENT_MASK_WORK); - } - } else { - /* Remove eventMask from window's event mask. */ - if (__glutCurrentWindow->eventMask & eventMask) { - __glutCurrentWindow->eventMask &= ~eventMask; - __glutPutOnWorkList(__glutCurrentWindow, - GLUT_EVENT_MASK_WORK); - } - } -} - -void GLUTAPIENTRY -glutDisplayFunc(GLUTdisplayCB displayFunc) -{ - /* XXX Remove the warning after GLUT 3.0. */ - if (!displayFunc) - __glutFatalError("NULL display callback not allowed in GLUT 3.0; update your code."); - __glutCurrentWindow->display = displayFunc; -} - -void GLUTAPIENTRY -glutMouseFunc(GLUTmouseCB mouseFunc) -{ - if (__glutCurrentWindow->mouse) { - if (!mouseFunc) { - /* Previous mouseFunc being disabled. */ - __glutCurrentWindow->buttonUses--; - __glutChangeWindowEventMask( - ButtonPressMask | ButtonReleaseMask, - __glutCurrentWindow->buttonUses > 0); - } - } else { - if (mouseFunc) { - /* Previously no mouseFunc, new one being installed. */ - __glutCurrentWindow->buttonUses++; - __glutChangeWindowEventMask( - ButtonPressMask | ButtonReleaseMask, True); - } - } - __glutCurrentWindow->mouse = mouseFunc; -} - -void GLUTAPIENTRY -glutMotionFunc(GLUTmotionCB motionFunc) -{ - /* Hack. Some window managers (4Dwm by default) will mask - motion events if the client is not selecting for button - press and release events. So we select for press and - release events too (being careful to use reference - counting). */ - if (__glutCurrentWindow->motion) { - if (!motionFunc) { - /* previous mouseFunc being disabled */ - __glutCurrentWindow->buttonUses--; - __glutChangeWindowEventMask( - ButtonPressMask | ButtonReleaseMask, - __glutCurrentWindow->buttonUses > 0); - } - } else { - if (motionFunc) { - /* Previously no mouseFunc, new one being installed. */ - __glutCurrentWindow->buttonUses++; - __glutChangeWindowEventMask( - ButtonPressMask | ButtonReleaseMask, True); - } - } - /* Real work of selecting for passive mouse motion. */ - __glutChangeWindowEventMask( - Button1MotionMask | Button2MotionMask | Button3MotionMask, - motionFunc != NULL); - __glutCurrentWindow->motion = motionFunc; -} - -void GLUTAPIENTRY -glutPassiveMotionFunc(GLUTpassiveCB passiveMotionFunc) -{ - __glutChangeWindowEventMask(PointerMotionMask, - passiveMotionFunc != NULL); - - /* Passive motion also requires watching enters and leaves so - that a fake passive motion event can be generated on an - enter. */ - __glutChangeWindowEventMask(EnterWindowMask | LeaveWindowMask, - __glutCurrentWindow->entry != NULL || passiveMotionFunc != NULL); - - __glutCurrentWindow->passive = passiveMotionFunc; -} - -void GLUTAPIENTRY -glutEntryFunc(GLUTentryCB entryFunc) -{ - __glutChangeWindowEventMask(EnterWindowMask | LeaveWindowMask, - entryFunc != NULL || __glutCurrentWindow->passive); - __glutCurrentWindow->entry = entryFunc; - if (!entryFunc) { - __glutCurrentWindow->entryState = -1; - } -} - -void GLUTAPIENTRY -glutWindowStatusFunc(GLUTwindowStatusCB windowStatusFunc) -{ - __glutChangeWindowEventMask(VisibilityChangeMask, - windowStatusFunc != NULL); - __glutCurrentWindow->windowStatus = windowStatusFunc; - if (!windowStatusFunc) { - /* Make state invalid. */ - __glutCurrentWindow->visState = -1; - } -} - -static void GLUTCALLBACK -visibilityHelper(int status) -{ - if (status == GLUT_HIDDEN || status == GLUT_FULLY_COVERED) - __glutCurrentWindow->visibility(GLUT_NOT_VISIBLE); - else - __glutCurrentWindow->visibility(GLUT_VISIBLE); -} - - -void GLUTAPIENTRY -glutVisibilityFunc(GLUTvisibilityCB visibilityFunc) -{ - __glutCurrentWindow->visibility = visibilityFunc; - - if (visibilityFunc) - { glutWindowStatusFunc(visibilityHelper); -#if defined(__OS2PM__) - if(__glutCurrentWindow->shownState >= 0) - { visibilityHelper(__glutCurrentWindow->shownState); - } -#endif - } - else - glutWindowStatusFunc(NULL); -} - -void GLUTAPIENTRY -glutReshapeFunc(GLUTreshapeCB reshapeFunc) -{ - if (reshapeFunc) { - __glutCurrentWindow->reshape = reshapeFunc; - } else { - __glutCurrentWindow->reshape = __glutDefaultReshape; - } -} - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_winmisc.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_winmisc.cpp deleted file mode 100644 index ffa31c021c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glut_winmisc.cpp +++ /dev/null @@ -1,127 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - - -#include -#include -#include -#include - - -#include "glutint.h" - -/* CENTRY */ -void GLUTAPIENTRY -glutSetWindowTitle(const char *title) -{ -#if defined(__OS2PM__) - __glutSetWindowText(__glutCurrentWindow->win, (char *)title); - -#else - XTextProperty textprop; - - assert(!__glutCurrentWindow->parent); - IGNORE_IN_GAME_MODE(); - textprop.value = (unsigned char *) title; - textprop.encoding = XA_STRING; - textprop.format = 8; - textprop.nitems = strlen(title); - XSetWMName(__glutDisplay, - __glutCurrentWindow->win, &textprop); - XFlush(__glutDisplay); -#endif -} - -void GLUTAPIENTRY -glutSetIconTitle(const char *title) -{ -#if defined(__OS2PM__) -//todo ? -#else - - XTextProperty textprop; - - assert(!__glutCurrentWindow->parent); - IGNORE_IN_GAME_MODE(); - textprop.value = (unsigned char *) title; - textprop.encoding = XA_STRING; - textprop.format = 8; - textprop.nitems = strlen(title); - XSetWMIconName(__glutDisplay, - __glutCurrentWindow->win, &textprop); - XFlush(__glutDisplay); -#endif -} - -void GLUTAPIENTRY -glutPositionWindow(int x, int y) -{ - IGNORE_IN_GAME_MODE(); - __glutCurrentWindow->desiredX = x; - __glutCurrentWindow->desiredY = y; - __glutCurrentWindow->desiredConfMask |= CWX | CWY; - __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK); -} - -void GLUTAPIENTRY -glutReshapeWindow(int w, int h) -{ - IGNORE_IN_GAME_MODE(); - if (w <= 0 || h <= 0) - __glutWarning("glutReshapeWindow: non-positive width or height not allowed"); - - __glutCurrentWindow->desiredWidth = w; - __glutCurrentWindow->desiredHeight = h; - __glutCurrentWindow->desiredConfMask |= CWWidth | CWHeight; - __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK); -} - -void GLUTAPIENTRY -glutPopWindow(void) -{ - IGNORE_IN_GAME_MODE(); - __glutCurrentWindow->desiredStack = Above; - __glutCurrentWindow->desiredConfMask |= CWStackMode; - __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK); -} - -void GLUTAPIENTRY -glutPushWindow(void) -{ - IGNORE_IN_GAME_MODE(); - __glutCurrentWindow->desiredStack = Below; - __glutCurrentWindow->desiredConfMask |= CWStackMode; - __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK); -} - -void GLUTAPIENTRY -glutIconifyWindow(void) -{ - IGNORE_IN_GAME_MODE(); - assert(!__glutCurrentWindow->parent); - __glutCurrentWindow->desiredMapState = IconicState; - __glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK); -} - -void GLUTAPIENTRY -glutShowWindow(void) -{ - IGNORE_IN_GAME_MODE(); - __glutCurrentWindow->desiredMapState = NormalState; - __glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK); -} - -void GLUTAPIENTRY -glutHideWindow(void) -{ - IGNORE_IN_GAME_MODE(); - __glutCurrentWindow->desiredMapState = WithdrawnState; - __glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK); -} - -/* ENDCENTRY */ - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glutbitmap.h b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glutbitmap.h deleted file mode 100644 index dc1b61af19..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glutbitmap.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef __glutbitmap_h__ -#define __glutbitmap_h__ - -/* Copyright (c) Mark J. Kilgard, 1994, 1998. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#define GLUT_NO_LIB_PRAGMA /* Avoid auto library linking when building - the GLUT library itself. */ -#include - -typedef struct { - const GLsizei width; - const GLsizei height; - const GLfloat xorig; - const GLfloat yorig; - const GLfloat advance; - const GLubyte *bitmap; -} BitmapCharRec, *BitmapCharPtr; - -typedef struct { - const char *name; - const int num_chars; - const int first; - const BitmapCharRec * const *ch; -} BitmapFontRec, *BitmapFontPtr; - -typedef void *GLUTbitmapFont; - -#endif /* __glutbitmap_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glutos2.h b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glutos2.h deleted file mode 100644 index 533a78011e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glutos2.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef __glutos2_h__ -#define __glutos2_h__ - - -/* Win32 "equivalent" cursors - eventually, the X glyphs should be - converted to Win32 cursors -- then they will look the same */ -#define XC_arrow IDC_ARROW -#define XC_top_left_arrow IDC_ARROW -#define XC_hand1 IDC_SIZEALL -#define XC_pirate IDC_NO -#define XC_question_arrow IDC_HELP -#define XC_exchange IDC_NO -#define XC_spraycan IDC_SIZEALL -#define XC_watch IDC_WAIT -#define XC_xterm IDC_IBEAM -#define XC_crosshair IDC_CROSS -#define XC_sb_v_double_arrow IDC_SIZENS -#define XC_sb_h_double_arrow IDC_SIZEWE -#define XC_top_side IDC_UPARROW -#define XC_bottom_side IDC_SIZENS -#define XC_left_side IDC_SIZEWE -#define XC_right_side IDC_SIZEWE -#define XC_top_left_corner IDC_SIZENWSE -#define XC_top_right_corner IDC_SIZENESW -#define XC_bottom_right_corner IDC_SIZENWSE -#define XC_bottom_left_corner IDC_SIZENESW - -#define XA_STRING 0 - -/* Private routines from win32_util.c */ -extern int gettimeofday(struct timeval* tp, void* tzp); -//extern void *__glutFont(void *font); -extern int __glutGetTransparentPixel(Display *dpy, XVisualInfo *vinfo); -extern void __glutAdjustCoords(Window parent, int *x, int *y, int *width, int *height); - -#endif /* __glutos2_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glutstroke.h b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glutstroke.h deleted file mode 100644 index fbbc70d6cc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/glutstroke.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __glutstroke_h__ -#define __glutstroke_h__ - -/* Copyright (c) Mark J. Kilgard, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -#if defined(_WIN32) -#pragma warning (disable:4244) /* disable bogus conversion warnings */ -#pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */ -#endif - -typedef struct { - float x; - float y; -} CoordRec, *CoordPtr; - -typedef struct { - int num_coords; - const CoordRec *coord; -} StrokeRec, *StrokePtr; - -typedef struct { - int num_strokes; - const StrokeRec *stroke; - float center; - float right; -} StrokeCharRec, *StrokeCharPtr; - -typedef struct { - const char *name; - int num_chars; - const StrokeCharRec *ch; - float top; - float bottom; -} StrokeFontRec, *StrokeFontPtr; - -typedef void *GLUTstrokeFont; - -#endif /* __glutstroke_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/layerutil.h b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/layerutil.h deleted file mode 100644 index 3786c4d871..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/layerutil.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef __layerutil_h__ -#define __layerutil_h__ - -/* Copyright (c) Mark J. Kilgard, 1993, 1994. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -/* Based on XLayerUtil.h: Revision: 1.3 */ - -#ifdef __VMS -#include -#endif - -#if !defined(_WIN32) && !defined(__OS2__) -#include -#include -#include -#endif /* !_WIN32 */ - -/* Transparent type values */ -/* None 0 */ -#define TransparentPixel 1 -#define TransparentMask 2 - -/* layered visual info template flags */ -#define VisualLayerMask 0x200 -#define VisualTransparentType 0x400 -#define VisualTransparentValue 0x800 -#define VisualAllLayerMask 0xFFF - -/* layered visual info structure */ -typedef struct _XLayerVisualInfo { - XVisualInfo vinfo; - long layer; - long type; - unsigned long value; -} XLayerVisualInfo; - -/* SERVER_OVERLAY_VISUALS property element */ -typedef struct _OverlayInfo { - /* Avoid 64-bit portability problems by being careful to use - longs due to the way XGetWindowProperty is specified. Note - that these parameters are passed as CARD32s over X - protocol. */ - long overlay_visual; - long transparent_type; - long value; - long layer; -} OverlayInfo; - -extern int __glutGetTransparentPixel(Display *, XVisualInfo *); -extern XLayerVisualInfo *__glutXGetLayerVisualInfo(Display *, - long, XLayerVisualInfo *, int *); -extern Status __glutXMatchLayerVisualInfo(Display *, - int, int, int, int, XLayerVisualInfo *); - -#endif /* __layerutil_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/libGlut.DEF b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/libGlut.DEF deleted file mode 100644 index fb92544ab8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/libGlut.DEF +++ /dev/null @@ -1,94 +0,0 @@ - -;----------------------------------------------------- -; def Module definition file for the DLL -;----------------------------------------------------- - -LIBRARY libGlut INITINSTANCE TERMINSTANCE -PROTMODE -DATA MULTIPLE NONSHARED READWRITE LOADONCALL -CODE LOADONCALL -EXPORTS ; Names of exported functions and data - -;********************************* -;MesaGLUT - glutCommandFunc @3001 - glutCreateWindow @3002 - glutCreateSubWindow @3003 - glutDestroyWindow @3004 - glutDisplayFunc @3005 - glutEntryFunc @3006 - glutExtensionSupported @3007 - glutIdleFunc @3008 - glutInit @3009 - glutInitDisplayMode @3010 - glutInitWindowPosition @3011 - glutInitWindowSize @3012 - glutMainLoop @3013 - glutGet @3014 - glutGetColor @3015 - glutGetWindow @3016 - glutKeyboardFunc @3017 - glutMouseFunc @3018 - glutSpecialFunc @3019 - glutStrokeCharacter @3020 - glutSetColor @3021 - glutSetIconTitle @3022 - glutSetWindow @3023 - glutSetWindowTitle @3024 - - glutReshapeFunc @3025 - glutReshapeWindow @3026 - - - glutSwapBuffers @3027 - glutPostRedisplay @3028 - glutPositionWindow @3029 - glutVisibilityFunc @3030 - glutTimerFunc @3031 - glutMotionFunc @3032 - - glutCreateMenu @3033 - glutAttachMenu @3034 - glutDestroyMenu @3035 - glutAddMenuEntry @3036 - glutPassiveMotionFunc @3037 - - glutSolidCone @3038 - glutSolidCube @3039 - glutSolidDodecahedron @3040 - glutSolidOctahedron @3041 - glutSolidIcosahedron @3042 - glutSolidSphere @3043 - glutSolidTeapot @3044 - glutSolidTetrahedron @3045 - glutSolidTorus @3046 - - glutWireCone @3047 - glutWireCube @3048 - glutWireDodecahedron @3049 - glutWireIcosahedron @3050 - glutWireOctahedron @3051 - glutWireSphere @3052 - glutWireTetrahedron @3053 - glutWireTorus @3054 - glutWireTeapot @3055 - -;GL_GLEXT_PROTOTYPES - glutBitmapCharacter @3101 - glutBitmap9By15 @3102 - glutBitmapHelvetica10 @3103 - glutBitmapHelvetica12 @3104 - glutBitmapHelvetica18 @3105 - glutBitmapTimesRoman24 @3106 - glutStrokeRoman @3107 - glutBitmap8By13 @3108 - -;Global constants -; hab @12001 -; /* PM anchor block handle */ -; hpsCurrent @12002 - XHDC @12004 - XHWND @12005 - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/os2_glx.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/os2_glx.cpp deleted file mode 100644 index ca345ea05b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/os2_glx.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* os2_glx.c */ - -#include -#include -#include -#include "gl/gl.h" -#include "WarpGL.h" -#include "GL/os2mesa.h" - -#define POKA 0 -/* global current HDC */ - -XVisualInfo *wglDescribePixelFormat(int iPixelFormat); - -extern HDC XHDC; -extern HWND XHWND; -//extern HPS hpsCurrent; -extern HAB hab; /* PM anchor block handle */ - -GLXContext -glXCreateContext(HPS hps, XVisualInfo * visinfo, - GLXContext share, Bool direct) -{ - /* KLUDGE: GLX really expects a display pointer to be passed - in as the first parameter, but Win32 needs an HDC instead, - so BE SURE that the global XHDC is set before calling this - routine. */ - HGLRC context; - - context = wglCreateContext(XHDC,hps,hab); - - - /* Since direct rendering is implicit, the direct flag is - ignored. */ - - return context; -} - - -int -glXGetConfig(XVisualInfo * visual, int attrib, int *value) -{ - if (!visual) - return GLX_BAD_VISUAL; - - switch (attrib) { - case GLX_USE_GL: - if (visual->dwFlags & (PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW)) { - /* XXX Brad's Matrix Millenium II has problems creating - color index windows in 24-bit mode (lead to GDI crash) - and 32-bit mode (lead to black window). The cColorBits - filed of the PIXELFORMATDESCRIPTOR returned claims to - have 24 and 32 bits respectively of color indices. 2^24 - and 2^32 are ridiculously huge writable colormaps. - Assume that if we get back a color index - PIXELFORMATDESCRIPTOR with 24 or more bits, the - PIXELFORMATDESCRIPTOR doesn't really work and skip it. - -mjk */ - if (visual->iPixelType == PFD_TYPE_COLORINDEX - && visual->cColorBits >= 24) { - *value = 0; - } else { - *value = 1; - } - } else { - *value = 0; - } - break; - case GLX_BUFFER_SIZE: - /* KLUDGE: if we're RGBA, return the number of bits/pixel, - otherwise, return 8 (we guessed at 256 colors in CI - mode). */ - if (visual->iPixelType == PFD_TYPE_RGBA) - *value = visual->cColorBits; - else - *value = 8; - break; - case GLX_LEVEL: - /* The bReserved flag of the pfd contains the - overlay/underlay info. */ - *value = visual->bReserved; - break; - case GLX_RGBA: - *value = visual->iPixelType == PFD_TYPE_RGBA; - break; - case GLX_DOUBLEBUFFER: - *value = visual->dwFlags & PFD_DOUBLEBUFFER; - break; - case GLX_STEREO: - *value = visual->dwFlags & PFD_STEREO; - break; - case GLX_AUX_BUFFERS: - *value = visual->cAuxBuffers; - break; - case GLX_RED_SIZE: - *value = visual->cRedBits; - break; - case GLX_GREEN_SIZE: - *value = visual->cGreenBits; - break; - case GLX_BLUE_SIZE: - *value = visual->cBlueBits; - break; - case GLX_ALPHA_SIZE: - *value = visual->cAlphaBits; - break; - case GLX_DEPTH_SIZE: - *value = visual->cDepthBits; - break; - case GLX_STENCIL_SIZE: - *value = visual->cStencilBits; - break; - case GLX_ACCUM_RED_SIZE: - *value = visual->cAccumRedBits; - break; - case GLX_ACCUM_GREEN_SIZE: - *value = visual->cAccumGreenBits; - break; - case GLX_ACCUM_BLUE_SIZE: - *value = visual->cAccumBlueBits; - break; - case GLX_ACCUM_ALPHA_SIZE: - *value = visual->cAccumAlphaBits; - break; -#if POKA == 100 -#endif /* POKA == 100 */ - default: - return GLX_BAD_ATTRIB; - } - return 0; -} - - -XVisualInfo * glXChooseVisual(int mode) -{ int imode = 2; - if(mode & GLUT_DOUBLE) - imode = 1; - return - wglDescribePixelFormat(imode); -} - - -#if POKA -#endif /* POKA */ - - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/os2_menu.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/os2_menu.cpp deleted file mode 100644 index 4eef308e5a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/os2_menu.cpp +++ /dev/null @@ -1,533 +0,0 @@ - -/* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */ -/* Copyright (c) Nate Robins, 1997. */ - -/* This program is freely distributable without licensing fees - and is provided without guarantee or warrantee expressed or - implied. This program is -not- in the public domain. */ - -/* This file completely re-implements glut_menu.c and glut_menu2.c - for Win32. Note that neither glut_menu.c nor glut_menu2.c are - compiled into Win32 GLUT. */ - -#include -#include -#include -#include -#include - -#include "glutint.h" - -void (GLUTCALLBACK *__glutMenuStatusFunc) (int, int, int); -//GLUTmenu *__glutMappedMenu; -//GLUTwindow *__glutMenuWindow; -GLUTmenuItem *__glutItemSelected; -unsigned __glutMenuButton; - -static GLUTmenu **menuList = NULL; -static int menuListSize = 0; -static UINT uniqueMenuHandler = 1; - -/* DEPRICATED, use glutMenuStatusFunc instead. */ -void GLUTAPIENTRY -glutMenuStateFunc(GLUTmenuStateCB menuStateFunc) -{ - __glutMenuStatusFunc = (GLUTmenuStatusCB) menuStateFunc; -} - -void GLUTAPIENTRY -glutMenuStatusFunc(GLUTmenuStatusCB menuStatusFunc) -{ - __glutMenuStatusFunc = menuStatusFunc; -} - -void -__glutSetMenu(GLUTmenu * menu) -{ - __glutCurrentMenu = menu; -} - -static void -unmapMenu(GLUTmenu * menu) -{ - if (menu->cascade) { - unmapMenu(menu->cascade); - menu->cascade = NULL; - } - menu->anchor = NULL; - menu->highlighted = NULL; -} - -void -__glutFinishMenu(Window win, int x, int y) -{ - - unmapMenu(__glutMappedMenu); - - /* XXX Put in a GdiFlush just in case. Probably unnecessary. -mjk */ -// GdiFlush(); - - if (__glutMenuStatusFunc) { - __glutSetWindow(__glutMenuWindow); - __glutSetMenu(__glutMappedMenu); - - /* Setting __glutMappedMenu to NULL permits operations that - change menus or destroy the menu window again. */ - __glutMappedMenu = NULL; - - __glutMenuStatusFunc(GLUT_MENU_NOT_IN_USE, x, y); - } - /* Setting __glutMappedMenu to NULL permits operations that - change menus or destroy the menu window again. */ - __glutMappedMenu = NULL; - - /* If an item is selected and it is not a submenu trigger, - generate menu callback. */ - if (__glutItemSelected && !__glutItemSelected->isTrigger) { - __glutSetWindow(__glutMenuWindow); - /* When menu callback is triggered, current menu should be - set to the callback menu. */ - __glutSetMenu(__glutItemSelected->menu); - __glutItemSelected->menu->select(__glutItemSelected->value); - } - __glutMenuWindow = NULL; -} - -static void -mapMenu(GLUTmenu * menu, int x, int y) -{ -//todo -// TrackPopupMenu((HMENU) menu->win, TPM_LEFTALIGN | -// (__glutMenuButton == TPM_RIGHTBUTTON) ? TPM_RIGHTBUTTON : TPM_LEFTBUTTON, -// x, y, 0, __glutCurrentWindow->win, NULL); -} - -void -__glutStartMenu(GLUTmenu * menu, GLUTwindow * window, - int x, int y, int x_win, int y_win) -{ - assert(__glutMappedMenu == NULL); - __glutMappedMenu = menu; - __glutMenuWindow = window; - __glutItemSelected = NULL; - if (__glutMenuStatusFunc) { - __glutSetMenu(menu); - __glutSetWindow(window); - __glutMenuStatusFunc(GLUT_MENU_IN_USE, x_win, y_win); - } - mapMenu(menu, x, y); -} - -GLUTmenuItem * -__glutGetUniqueMenuItem(GLUTmenu * menu, UINT unique) -{ - GLUTmenuItem *item; - int i; - - i = menu->num; - item = menu->list; - while (item) { - if (item->unique == unique) { - return item; - } - if (item->isTrigger) { - GLUTmenuItem *subitem; - subitem = __glutGetUniqueMenuItem(menuList[item->value], unique); - if (subitem) { - return subitem; - } - } - i--; - item = item->next; - } - return NULL; -} - -GLUTmenuItem * -__glutGetMenuItem(GLUTmenu * menu, Window win, int *which) -{ - GLUTmenuItem *item; - int i; - - i = menu->num; - item = menu->list; - while (item) { - if (item->win == win) { - *which = i; - return item; - } - if (item->isTrigger) { - GLUTmenuItem *subitem; - - subitem = __glutGetMenuItem(menuList[item->value], - win, which); - if (subitem) { - return subitem; - } - } - i--; - item = item->next; - } - return NULL; -} - -GLUTmenu * -__glutGetMenu(Window win) -{ - GLUTmenu *menu; - - menu = __glutMappedMenu; - while (menu) { - if (win == menu->win) { - return menu; - } - menu = menu->cascade; - } - return NULL; -} - -GLUTmenu * -__glutGetMenuByNum(int menunum) -{ - if (menunum < 1 || menunum > menuListSize) { - return NULL; - } - return menuList[menunum - 1]; -} - -static int -getUnusedMenuSlot(void) -{ - int i; - - /* Look for allocated, unused slot. */ - for (i = 0; i < menuListSize; i++) { - if (!menuList[i]) { - return i; - } - } - /* Allocate a new slot. */ - menuListSize++; - if (menuList) { - menuList = (GLUTmenu **) - realloc(menuList, menuListSize * sizeof(GLUTmenu *)); - } else { - /* XXX Some realloc's do not correctly perform a malloc - when asked to perform a realloc on a NULL pointer, - though the ANSI C library spec requires this. */ - menuList = (GLUTmenu **) malloc(sizeof(GLUTmenu *)); - } - if (!menuList) { - __glutFatalError("out of memory."); - } - menuList[menuListSize - 1] = NULL; - return menuListSize - 1; -} - -static void -menuModificationError(void) -{ - /* XXX Remove the warning after GLUT 3.0. */ - __glutWarning("The following is a new check for GLUT 3.0; update your code."); - __glutFatalError("menu manipulation not allowed while menus in use."); -} - -int GLUTAPIENTRY -glutCreateMenu(GLUTselectCB selectFunc) -{ - GLUTmenu *menu; - int menuid; - - if (__glutMappedMenu) { - menuModificationError(); - } - menuid = getUnusedMenuSlot(); - menu = (GLUTmenu *) malloc(sizeof(GLUTmenu)); - if (!menu) { - __glutFatalError("out of memory."); - } - menu->id = menuid; - menu->num = 0; - menu->submenus = 0; - menu->select = selectFunc; - menu->list = NULL; - menu->cascade = NULL; - menu->highlighted = NULL; - menu->anchor = NULL; -//todo -// menu->win = (HWND) CreatePopupMenu(); - menuList[menuid] = menu; - __glutSetMenu(menu); - return menuid + 1; -} - - -void GLUTAPIENTRY -glutDestroyMenu(int menunum) -{ - GLUTmenu *menu = __glutGetMenuByNum(menunum); - GLUTmenuItem *item, *next; - - if (__glutMappedMenu) { - menuModificationError(); - } - assert(menu->id == menunum - 1); -//todo DestroyMenu( (HMENU) menu->win); - menuList[menunum - 1] = NULL; - /* free all menu entries */ - item = menu->list; - while (item) { - assert(item->menu == menu); - next = item->next; - free(item->label); - free(item); - item = next; - } - if (__glutCurrentMenu == menu) { - __glutCurrentMenu = NULL; - } - free(menu); -} - -int GLUTAPIENTRY -glutGetMenu(void) -{ - if (__glutCurrentMenu) { - return __glutCurrentMenu->id + 1; - } else { - return 0; - } -} - -void GLUTAPIENTRY -glutSetMenu(int menuid) -{ - GLUTmenu *menu; - - if (menuid < 1 || menuid > menuListSize) { - __glutWarning("glutSetMenu attempted on bogus menu."); - return; - } - menu = menuList[menuid - 1]; - if (!menu) { - __glutWarning("glutSetMenu attempted on bogus menu."); - return; - } - __glutSetMenu(menu); -} - -static void -setMenuItem(GLUTmenuItem * item, const char *label, - int value, Bool isTrigger) -{ - GLUTmenu *menu; - - menu = item->menu; - item->label = __glutStrdup(label); - if (!item->label) { - __glutFatalError("out of memory."); - } - item->isTrigger = isTrigger; - item->len = (int) strlen(label); - item->value = value; - item->unique = uniqueMenuHandler++; -//todo -// if (isTrigger) { -// AppendMenu((HMENU) menu->win, MF_POPUP, (UINT)item->win, label); -// } else { -// AppendMenu((HMENU) menu->win, MF_STRING, item->unique, label); -// } -} - -void GLUTAPIENTRY -glutAddMenuEntry(const char *label, int value) -{ - GLUTmenuItem *entry; - - if (__glutMappedMenu) { - menuModificationError(); - } - entry = (GLUTmenuItem *) malloc(sizeof(GLUTmenuItem)); - if (!entry) { - __glutFatalError("out of memory."); - } - entry->menu = __glutCurrentMenu; - setMenuItem(entry, label, value, FALSE); - __glutCurrentMenu->num++; - entry->next = __glutCurrentMenu->list; - __glutCurrentMenu->list = entry; -} - -void GLUTAPIENTRY -glutAddSubMenu(const char *label, int menu) -{ - GLUTmenuItem *submenu; - GLUTmenu *popupmenu; - - if (__glutMappedMenu) { - menuModificationError(); - } - submenu = (GLUTmenuItem *) malloc(sizeof(GLUTmenuItem)); - if (!submenu) { - __glutFatalError("out of memory."); - } - __glutCurrentMenu->submenus++; - submenu->menu = __glutCurrentMenu; - popupmenu = __glutGetMenuByNum(menu); - if (popupmenu) { - submenu->win = popupmenu->win; - } - setMenuItem(submenu, label, /* base 0 */ menu - 1, TRUE); - __glutCurrentMenu->num++; - submenu->next = __glutCurrentMenu->list; - __glutCurrentMenu->list = submenu; -} - -void GLUTAPIENTRY -glutChangeToMenuEntry(int num, const char *label, int value) -{ - GLUTmenuItem *item; - int i; - - if (__glutMappedMenu) { - menuModificationError(); - } - i = __glutCurrentMenu->num; - item = __glutCurrentMenu->list; - while (item) { - if (i == num) { - if (item->isTrigger) { - /* If changing a submenu trigger to a menu entry, we - need to account for submenus. */ - item->menu->submenus--; - /* Nuke the Win32 menu. */ -//todo -// DestroyMenu((HMENU) item->win); - } - free(item->label); - - item->label = strdup(label); - if (!item->label) - __glutFatalError("out of memory"); - item->isTrigger = FALSE; - item->len = (int) strlen(label); - item->value = value; - item->unique = uniqueMenuHandler++; -//todo -// ModifyMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1, -// MF_BYPOSITION | MFT_STRING, item->unique, label); - - return; - } - i--; - item = item->next; - } - __glutWarning("Current menu has no %d item.", num); -} - -void GLUTAPIENTRY -glutChangeToSubMenu(int num, const char *label, int menu) -{ - GLUTmenu *popupmenu; - GLUTmenuItem *item; - int i; - - if (__glutMappedMenu) { - menuModificationError(); - } - i = __glutCurrentMenu->num; - item = __glutCurrentMenu->list; - while (item) { - if (i == num) { - if (!item->isTrigger) { - /* If changing a menu entry to as submenu trigger, we - need to account for submenus. */ - item->menu->submenus++; -//todo -// item->win = (HWND) CreatePopupMenu(); - } - free(item->label); - - item->label = strdup(label); - if (!item->label) - __glutFatalError("out of memory"); - item->isTrigger = TRUE; - item->len = (int) strlen(label); - item->value = menu - 1; - item->unique = uniqueMenuHandler++; - popupmenu = __glutGetMenuByNum(menu); - if (popupmenu) - item->win = popupmenu->win; -//todo -// ModifyMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1, -// MF_BYPOSITION | MF_POPUP, (UINT) item->win, label); - return; - } - i--; - item = item->next; - } - __glutWarning("Current menu has no %d item.", num); -} - -void GLUTAPIENTRY -glutRemoveMenuItem(int num) -{ - GLUTmenuItem *item, **prev; - int i; - - if (__glutMappedMenu) { - menuModificationError(); - } - i = __glutCurrentMenu->num; - prev = &__glutCurrentMenu->list; - item = __glutCurrentMenu->list; - while (item) { - if (i == num) { - /* Found the menu item in list to remove. */ - __glutCurrentMenu->num--; - - /* Patch up menu's item list. */ - *prev = item->next; -//todo -// RemoveMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1, MF_BYPOSITION); - - free(item->label); - free(item); - return; - } - i--; - prev = &item->next; - item = item->next; - } - __glutWarning("Current menu has no %d item.", num); -} - -void GLUTAPIENTRY -glutAttachMenu(int button) -{ - if (__glutCurrentWindow == __glutGameModeWindow) { - __glutWarning("cannot attach menus in game mode."); - return; - } - if (__glutMappedMenu) { - menuModificationError(); - } - if (__glutCurrentWindow->menu[button] < 1) { - __glutCurrentWindow->buttonUses++; - } - __glutCurrentWindow->menu[button] = __glutCurrentMenu->id + 1; -} - -void GLUTAPIENTRY -glutDetachMenu(int button) -{ - if (__glutMappedMenu) { - menuModificationError(); - } - if (__glutCurrentWindow->menu[button] > 0) { - __glutCurrentWindow->buttonUses--; - __glutCurrentWindow->menu[button] = 0; - } -} - - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/os2_winproc.cpp b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/os2_winproc.cpp deleted file mode 100644 index e2d4ba9d55..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/os2_winproc.cpp +++ /dev/null @@ -1,1297 +0,0 @@ -/* os2_winproc.c */ - - -#define INCL_DEV -#include "WarpGL.h" -#include "GL/os2mesa.h" - - -#define _MEERROR_H_ -#include /* It is from MMPM toolkit */ -#include -#include - - -#include "os2mesadef.h" -#include "glutint.h" - - -#define POKA 0 - -#if POKA - -extern unsigned __glutMenuButton; -extern GLUTidleCB __glutIdleFunc; -extern GLUTtimer *__glutTimerList; -extern void handleTimeouts(void); -extern GLUTmenuItem *__glutGetUniqueMenuItem(GLUTmenu * menu, int unique); -static HMENU __glutHMenu; - -#endif - -extern void _mesa_ResizeBuffersMESA( void ); - - -MRESULT EXPENTRY GlutWindowProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 ); -MRESULT EXPENTRY GlutWindowChildProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 ); -void updateWindowState(GLUTwindow *window, int visState); - -volatile extern HAB hab; /* PM anchor block handle */ -volatile extern HPS hpsCurrent; - -RECTL rCtls[52]; -ULONG ulNumRcls; - -MRESULT EXPENTRY GlutWindowChildProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 ) -{ MRESULT rc; - rc = GlutWindowProc(hwnd, msg, mp1, mp2 ); - return rc; -} - -MRESULT EXPENTRY GlutWindowProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 ) -{ - HPS hps = NULLHANDLE; /* presentation space handle */ - GLUTwindow* window; /* GLUT window associated with message. */ - GLUTmenu* menu; /* GLUT menu associated with message. */ - RECTL rclClient; - POINTL point; - int button = -1,rc,key; - - -/* Process the message. */ - - switch( msg ) - { - case WM_CREATE: - { - SIZEL sizl = { 0L, 0L }; - LONG *alCaps; - HDC hdc; - - /*+-----------------------------------------------------------------+*/ - /*| The client window is being created. Create the semaphore to |*/ - /*| control access to the presentation space. Then create the |*/ - /*| thread that will draw the lines. |*/ - /*+-----------------------------------------------------------------+*/ - // DosCreateMutexSem( (PSZ)NULL, &hmtxPS, 0UL, FALSE ); - - hdc = WinOpenWindowDC(hwnd); - - /*+-----------------------------------------------------------------+*/ - /*| Create a non-cached presentation space. We will not release |*/ - /*| this PS, as we will be Selecting a Palette to this PS and then |*/ - /*| animating the palette. Upon releasing a PS the palette is no |*/ - /*| longer selected for obvious reasons. |*/ - /*+-----------------------------------------------------------------+*/ - hpsCurrent = GpiCreatePS( hab, - hdc, - &sizl, - PU_PELS | GPIF_DEFAULT | - GPIT_MICRO | GPIA_ASSOC ); -// DevQueryCaps( hdc, lStart, lCount, alCaps ); -// fPaletteCaps = alCaps[CAPS_ADDITIONAL_GRAPHICS] & CAPS_PALETTE_MANAGER; -// PaletteInit(3); - /* ¯¥p¥¢®¤ hpsBuffer ¢ p¥¦¨¬ RGB color table */ - - GpiCreateLogColorTable(hpsCurrent,0 ,LCOLF_RGB,0,0,NULL); - GpiSetPattern(hpsCurrent,PATSYM_SOLID); - GpiSetPatternSet(hpsCurrent,LCID_DEFAULT); - - } - break; - - return 0; - case WM_CLOSE: - WinPostMsg( hwnd, WM_QUIT, NULL, NULL ); - - return 0; - - case WM_PAINT: - window = __glutGetWindow(hwnd); - if (window) - { - PWMC ctx; -// hps = WinBeginPaint(hwnd,NULLHANDLE,&rclClient); - hps = WinBeginPaint(hwnd,NULLHANDLE,&rclClient); - // blit Dive buffer to screen. - - { - SWP swp; // Window position - POINTL pointl; // Point to offset from Desktop - - // Convert the point to offset from desktop lower left. - pointl.x = 0; - pointl.y = 0; - WinMapWindowPoints ( hwnd, HWND_DESKTOP, &pointl, 1 ); - - -// ctx = window->ctx; -// ctx->xDiveScr = pointl.x; -// ctx->yDiveScr = pointl.y; - } -// rc = DiveBlitImage (ctx->hDive, -// ctx->ulDiveBufferNumber, -// DIVE_BUFFER_SCREEN ); -// - - if (window->win == hwnd) { - __glutPostRedisplay(window, GLUT_REPAIR_WORK); - } else if (window->overlay && window->overlay->win == hwnd) { - __glutPostRedisplay(window, GLUT_OVERLAY_REPAIR_WORK); - } - WinEndPaint(hps); - } else { - - hps = WinBeginPaint(hwnd,NULLHANDLE,&rclClient); - WinFillRect(hps, &rclClient, CLR_WHITE); - WinEndPaint(hps); - } - break; - - case WM_VRNDISABLED: - -// pwinData->fDataInProcess = TRUE; -// DiveSetupBlitter ( pwinData->hDive, 0 ); -// pwinData->fVrnDisabled = TRUE; - break; - - case WM_VRNENABLED: - { HRGN hrgn; /* Region handle */ - RGNRECT rgnCtl; /* Processing control structure */ -// RECTL rCtls[52]; -// ULONG ulNumRcls; - -// pwinData->fDataInProcess = TRUE; - hps = WinGetPS ( hwnd ); - if ( !hps ) - break; - hrgn = GpiCreateRegion ( hps, 0L, NULL ); - if ( hrgn ) - { /* NOTE: If mp1 is zero, then this was just a move message. - ** Illustrate the visible region on a WM_VRNENABLE. - */ - WinQueryVisibleRegion ( hwnd, hrgn ); - rgnCtl.ircStart = 0; - rgnCtl.crc = 50; - rgnCtl.ulDirection = 1; - - /* Get the all ORed rectangles */ - if ( GpiQueryRegionRects ( hps, hrgn, NULL, - &rgnCtl, rCtls) ) - { - ulNumRcls = rgnCtl.crcReturned; - - /* Now find the window position and size, relative to parent. - */ -// WinQueryWindowPos ( pwinData->hwndClient, &pwinData->swp ); - -// rcl.xLeft = 0; -// rcl.yBottom = 0; - - /* Convert the point to offset from desktop lower left. - */ -// pointl.x = pwinData->swp.x; -// pointl.y = pwinData->swp.y; - -// WinMapWindowPoints ( pwinData->hwndFrame, -// HWND_DESKTOP, &pointl, 1 ); - -// pwinData->cxWindowPos = pointl.x; -// pwinData->cyWindowPos = pointl.y; - - } - GpiDestroyRegion( hps, hrgn ); - } - WinReleasePS( hps ); - - } - break; - - case WM_SIZE: - window = __glutGetWindow(hwnd); - if (window) - { int width,height; - width = SHORT1FROMMP(mp2); - height = SHORT2FROMMP(mp2); - if (width != window->width || height != window->height) { -#if 0 /* Win32 GLUT does not support overlays for now. */ - if (window->overlay) { - XResizeWindow(__glutDisplay, window->overlay->win, width, height); - } -#endif - window->width = width; - window->height = height; - __glutSetWindow(window); - if(width <= 0 || height <= 0) - break; - _mesa_ResizeBuffersMESA(); - - /* Do not execute OpenGL out of sequence with respect - to the SetWindowPos request! */ - window->reshape(width, height); - window->forceReshape = FALSE; - /* A reshape should be considered like posting a - repair request. */ - __glutPostRedisplay(window, GLUT_REPAIR_WORK); - } - } - return 0; - case WM_SHOW: - window = __glutGetWindow(hwnd); - if (window) { - int visState; - visState = SHORT1FROMMP( mp1 ); - updateWindowState(window, visState); - } - return 0; - - case WM_ACTIVATE: - window = __glutGetWindow(hwnd); -// /* Make sure we re-select the correct palette if needed. */ -// if (LOWORD(wParam)) { -// PostMessage(hwnd, WM_PALETTECHANGED, 0, 0); -// } - if (window) { - int visState; - visState = SHORT1FROMMP( mp1 ); - updateWindowState(window, visState); - } - return 0; - - case WM_CHAR: - { USHORT fsflags; - window = __glutGetWindow(hwnd); - if (!window) { - break; - } - fsflags = SHORT1FROMMP(mp1); -/* ?? */ - if((fsflags & KC_KEYUP) ) /* ¨£­®p¨p㥬 ®â¦ â¨¥ ª­®¯ª¨, p¥ £¨p㥬 ⮫쪮 ­  ­ ¦ â¨¥ */ - break; -/////////////////////////////////////////////////// - if(!(fsflags & KC_CHAR) ) - { - if (!(fsflags & KC_VIRTUALKEY)) - break; - key = 0; - /* Get the virtual key from mp2. */ - switch (SHORT2FROMMP(mp2)) - { -/* directional keys */ - case VK_LEFT: key = GLUT_KEY_LEFT; break; - case VK_UP: key = GLUT_KEY_UP; break; - case VK_RIGHT: key = GLUT_KEY_RIGHT; break; - case VK_DOWN: key = GLUT_KEY_DOWN; break; - - case VK_PAGEUP: key = GLUT_KEY_PAGE_UP; break; - case VK_PAGEDOWN:key = GLUT_KEY_PAGE_DOWN; break; - case VK_HOME: key = GLUT_KEY_HOME;break; - case VK_END: key = GLUT_KEY_END; break; - case VK_INSERT: key = GLUT_KEY_INSERT; break; - -/* function keys */ - case VK_F1 : key = GLUT_KEY_F1; break; - case VK_F2 : key = GLUT_KEY_F2; break; - case VK_F3 : key = GLUT_KEY_F3; break; - case VK_F4 : key = GLUT_KEY_F4; break; - case VK_F5 : key = GLUT_KEY_F5; break; - case VK_F6 : key = GLUT_KEY_F6; break; - case VK_F7 : key = GLUT_KEY_F7; break; - case VK_F8 : key = GLUT_KEY_F8; break; - case VK_F9 : key = GLUT_KEY_F9; break; - case VK_F10: key = GLUT_KEY_F10;break; - case VK_F11: key = GLUT_KEY_F11; break; - case VK_F12: key = GLUT_KEY_F12; break; - case VK_ESC: key = -1; break; /* Character codes */ - case VK_SPACE: key = -1; break; - case VK_TAB: key = -1; break; - } - if(!key) - { break; /* Key Not implemented */ - } - if(key > 0) - { if (!window->special) /* ­¥ ãáâ ­®¢«¥­® ®¡à ¡®â稪  */ - break; - - WinQueryPointerPos(HWND_DESKTOP,&point); - ScreenToClient(window->win, &point); - __glutSetWindow(window); - __glutModifierMask = 0; - if(WinGetKeyState(HWND_DESKTOP,VK_SHIFT) & 0x8000) /* high order bit is on */ - __glutModifierMask |= ShiftMask; - if(WinGetKeyState(HWND_DESKTOP,VK_CTRL) & 0x8000) - __glutModifierMask |= ControlMask; - if(WinGetKeyState(HWND_DESKTOP,VK_MENU) & 0x8000) - __glutModifierMask |= Mod1Mask; - window->special(key, point.x, point.y); - __glutModifierMask = (unsigned int) ~0; - return 0; - } - - } -///////////////////////////////////////////////////// - /* If we are ignoring auto repeated key strokes for the window, bail. */ - if (window->ignoreKeyRepeat && (CHAR3FROMMP(mp1)) ) - break; - if(!((unsigned char)SHORT1FROMMP(mp2)) ) /* ¨£­®p¨p㥬 ­¥á¨¬¢®«ì­ë¥ ª®¤ë */ - break; - if (window->keyboard) { - WinQueryPointerPos(HWND_DESKTOP,&point); - - ScreenToClient(window->win, &point); - __glutSetWindow(window); - __glutModifierMask = 0; - if(WinGetKeyState(HWND_DESKTOP,VK_SHIFT) & 0x8000) /* high order bit is on */ - __glutModifierMask |= ShiftMask; - if(WinGetKeyState(HWND_DESKTOP,VK_CTRL) & 0x8000) - __glutModifierMask |= ControlMask; - if(WinGetKeyState(HWND_DESKTOP,VK_MENU) & 0x8000) - __glutModifierMask |= Mod1Mask; - window->keyboard((unsigned char)SHORT1FROMMP(mp2), point.x, point.y); - __glutModifierMask = (unsigned int) ~0; - } - return 0; - } /* endof case WM_CHAR: */ -//////////////////////////////////////////////// - case WM_BUTTON1DOWN: - button = GLUT_LEFT_BUTTON; - case WM_BUTTON3DOWN: - if (button < 0) - button = GLUT_MIDDLE_BUTTON; - case WM_BUTTON2DOWN: - if (button < 0) - button = GLUT_RIGHT_BUTTON; - { POINTS psh; - psh = *((POINTS *)&mp1); - point.x = psh.x; - point.y = psh.y; - } - /* finish the menu if we get a button down message (user must have - cancelled the menu). */ - if (__glutMappedMenu) { - /* TODO: take this out once the menu on middle mouse stuff works - properly. */ - if (button == GLUT_MIDDLE_BUTTON) - return 0; - /* get current mouse pointer position */ -// WinQueryPointerPos(HWND_DESKTOP,&point); - /* map from desktop to client window */ -// WinMapWindowPoints(HWND_DESKTOP, hwnd, &point, 1); - __glutItemSelected = NULL; - __glutFinishMenu(hwnd, point.x, point.y); - return 0; - } - window = __glutGetWindow(hwnd); - if (window) { - window->buttonDownState = button+1; - menu = __glutGetMenuByNum(window->menu[button]); - if (menu) { -//todo -// __glutMenuButton = button == GLUT_RIGHT_BUTTON ? TPM_RIGHTBUTTON : -// button == GLUT_LEFT_BUTTON ? TPM_LEFTBUTTON : -// 0x0001; -// __glutStartMenu(menu, window, point.x, point.y, x, y); - } else if (window->mouse) { - - __glutSetWindow(window); - __glutModifierMask = 0; - if (WinGetKeyState(HWND_DESKTOP,VK_SHIFT) & 0x8000) /* < 0 = high order bit is on. */ - __glutModifierMask |= ShiftMask; - if (WinGetKeyState(HWND_DESKTOP,VK_CTRL) & 0x8000) - __glutModifierMask |= ControlMask; - if (WinGetKeyState(HWND_DESKTOP,VK_MENU) & 0x8000) - __glutModifierMask |= Mod1Mask; - window->mouse(button, GLUT_DOWN, point.x, point.y); - __glutModifierMask = (unsigned int)~0; - } else { - /* Stray mouse events. Ignore. */ - } - } - return 0; - - break; -/********************************************/ - case WM_BUTTON1UP: - button = GLUT_LEFT_BUTTON; - case WM_BUTTON3UP: - if (button < 0) - button = GLUT_MIDDLE_BUTTON; - case WM_BUTTON2UP: - if (button < 0) - button = GLUT_RIGHT_BUTTON; - { POINTS psh; - psh = *((POINTS *)&mp1); - point.x = psh.x; - point.y = psh.y; - } - /* Bail out if we're processing a menu. */ - /* Bail out = ¢ë¡à®á¨âìáï á ¯ à èã⮬ */ - if (__glutMappedMenu) { - WinQueryPointerPos(HWND_DESKTOP,&point); - WinMapWindowPoints(HWND_DESKTOP, hwnd, &point, 1); - /* if we're getting the middle button up signal, then something - on the menu was selected. */ - if (button == GLUT_MIDDLE_BUTTON) { - return 0; - /* For some reason, the code below always returns -1 even - though the point IS IN THE ITEM! Therefore, just bail out if - we get a middle mouse up. The user must select using the - left mouse button. Stupid Win32. */ -#if 0 - int item = MenuItemFromPoint(hwnd, __glutHMenu, point); - if (item != -1) - __glutItemSelected = (GLUTmenuItem*)GetMenuItemID(__glutHMenu, item); - else - __glutItemSelected = NULL; - __glutFinishMenu(hwnd, point.x, point.y); -#endif - } else { - __glutItemSelected = NULL; - __glutFinishMenu(hwnd, point.x, point.y); - } - return 0; - } - - window = __glutGetWindow(hwnd); - if(window) - window->buttonDownState = 0; - - if (window && window->mouse) { - __glutSetWindow(window); - __glutModifierMask = 0; - if (WinGetKeyState(HWND_DESKTOP,VK_SHIFT) & 0x8000) /* < 0 = high order bit is on */ - __glutModifierMask |= ShiftMask; - if (WinGetKeyState(HWND_DESKTOP,VK_CTRL) & 0x8000) - __glutModifierMask |= ControlMask; - if (WinGetKeyState(HWND_DESKTOP,VK_MENU) & 0x8000) - __glutModifierMask |= Mod1Mask; - window->mouse(button, GLUT_UP, point.x, point.y); - - __glutModifierMask = (unsigned int)~0; - } else { - /* Window might have been destroyed and all the - events for the window may not yet be received. */ - } - return 0; - - - break; -////////////////////////////////////////////////// - case WM_COMMAND: - window = __glutGetWindow(hwnd); - if (window) - { if (window->wm_command) - window->wm_command(hwnd,mp1,mp2); - } - break; - - case WM_MOUSEMOVE: - if (!__glutMappedMenu) { - window = __glutGetWindow(hwnd); - if (window) { - /* If motion function registered _and_ buttons held * - down, call motion function... */ - { POINTS psh; - psh = *((POINTS *)&mp1); - point.x = psh.x; - point.y = psh.y; - } - - if (window->motion && window->buttonDownState) { - __glutSetWindow(window); - window->motion(point.x, point.y); - } - /* If passive motion function registered _and_ - buttons not held down, call passive motion - function... */ - else if (window->passive && !window->buttonDownState) { - __glutSetWindow(window); - window->passive(point.x, point.y); - } - } - } else { - /* Motion events are thrown away when a pop up menu is - active. */ - } - return 0; - - - default: - /* For all other messages, let the default window procedure process them. */ - return ( WinDefWindowProc( hwnd, msg, mp1, mp2 ) ); - - } //endof switch( msg ) - return ( WinDefWindowProc( hwnd, msg, mp1, mp2 ) ); -// return NULL; -} - -void APIENTRY glutCommandFunc(GLUTcommandCB Func) -{ -extern GLUTwindow *__glutCurrentWindow; - __glutCurrentWindow->wm_command = Func; -} - - - - -void -updateWindowState(GLUTwindow *window, int visState) -{ - GLUTwindow* child; - - /* XXX shownState and visState are the same in Win32. */ - window->shownState = visState; - if (visState != window->visState) { - if (window->windowStatus) { - window->visState = visState; - __glutSetWindow(window); - window->windowStatus(visState); - } - } - /* Since Win32 only sends an activate for the toplevel window, - update the visibility for all the child windows. */ - child = window->children; - while (child) { - updateWindowState(child, visState); - child = child->siblings; - } -} - -#if POKA - -LONG WINAPI -__glutWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - POINT point; /* Point structure. */ - PAINTSTRUCT ps; /* Paint structure. */ - LPMINMAXINFO minmax; /* Minimum/maximum info structure. */ - GLUTwindow* window; /* GLUT window associated with message. */ - GLUTmenu* menu; /* GLUT menu associated with message. */ - int x, y, width, height, key; - int button = -1; - - switch(msg) { - case WM_CREATE: - return 0; - case WM_CLOSE: - PostQuitMessage(0); - return 0; -#if 0 - case WM_DESTROY: - /* XXX NVidia's NT OpenGL can have problems closing down - its OpenGL internal data structures if we just allow - the process to terminate without unbinding and deleting - the windows context. Apparently, DirectDraw unloads - before OPENGL32.DLL in the close down sequence, but - NVidia's NT OpenGL needs DirectDraw to close down its - data structures. */ - window = __glutGetWindow(hwnd); - if (window) { - if (window->ctx) { - wglMakeCurrent(NULL, NULL); - wglDeleteContext(window->ctx); - } - } - return 0; -#endif - - case WM_SYSKEYUP: - case WM_KEYUP: - window = __glutGetWindow(hwnd); - if (!window) { - break; - } - /* Win32 is dumb and sends these messages only to the parent - window. Therefore, find out if we're in a child window and - call the child windows keyboard callback if we are. */ - if (window->parent) { - GetCursorPos(&point); - ScreenToClient(hwnd, &point); - hwnd = ChildWindowFromPoint(hwnd, point); - window = __glutGetWindow(hwnd); - } - if (window->specialUp || window->keyboardUp) { - GetCursorPos(&point); - ScreenToClient(window->win, &point); - __glutSetWindow(window); - __glutModifierMask = 0; - if (GetKeyState(VK_SHIFT) < 0) /* < 0 = high order bit is on */ - __glutModifierMask |= ShiftMask; - if (GetKeyState(VK_SHIFT) < 0) /* < 0 = high order bit is on */ - __glutModifierMask |= ControlMask; - if (GetKeyState(VK_MENU) < 0) - __glutModifierMask |= Mod1Mask; - switch (wParam) { - /* *INDENT-OFF* */ - case VK_F1: key = GLUT_KEY_F1; break; - case VK_F2: key = GLUT_KEY_F2; break; - case VK_F3: key = GLUT_KEY_F3; break; - case VK_F4: key = GLUT_KEY_F4; break; - case VK_F5: key = GLUT_KEY_F5; break; - case VK_F6: key = GLUT_KEY_F6; break; - case VK_F7: key = GLUT_KEY_F7; break; - case VK_F8: key = GLUT_KEY_F8; break; - case VK_F9: key = GLUT_KEY_F9; break; - case VK_F10: key = GLUT_KEY_F10; break; - case VK_F11: key = GLUT_KEY_F11; break; - case VK_F12: key = GLUT_KEY_F12; break; - case VK_LEFT: key = GLUT_KEY_LEFT; break; - case VK_UP: key = GLUT_KEY_UP; break; - case VK_RIGHT: key = GLUT_KEY_RIGHT; break; - case VK_DOWN: key = GLUT_KEY_DOWN; break; - case VK_PRIOR: key = GLUT_KEY_PAGE_UP; break; - case VK_NEXT: key = GLUT_KEY_PAGE_DOWN; break; - case VK_HOME: key = GLUT_KEY_HOME; break; - case VK_END: key = GLUT_KEY_END; break; - case VK_INSERT: key = GLUT_KEY_INSERT; break; - case VK_DELETE: - /* Delete is an ASCII character. */ - if (window->keyboardUp) { - window->keyboardUp((unsigned char) 127, point.x, point.y); - } - return 0; - /* *INDENT-ON* */ - default: - if (window->keyboardUp) { - key = MapVirtualKey(wParam, 2); /* Map to ASCII. */ - if (isascii(key) && (key != 0)) { - - /* XXX Attempt to determine modified ASCII character - is quite incomplete. Digits, symbols, CapsLock, - Ctrl, and numeric keypad are all ignored. Fix this. */ - - if (!(__glutModifierMask & ShiftMask)) - key = tolower(key); - window->keyboardUp((unsigned char) key, point.x, point.y); - } - } - __glutModifierMask = (unsigned int) ~0; - return 0; - } - if (window->specialUp) { - window->specialUp(key, point.x, point.y); - } - __glutModifierMask = (unsigned int) ~0; - } - return 0; - - case WM_SYSCHAR: - case WM_CHAR: - window = __glutGetWindow(hwnd); - if (!window) { - break; - } - - /* Bit 30 of lParam is set if key already held down. If - we are ignoring auto repeated key strokes for the window, bail. */ - if (window->ignoreKeyRepeat && (lParam & (1 << 30)) ) { - break; - } - - /* Win32 is dumb and sends these messages only to the parent - window. Therefore, find out if we're in a child window and - call the child windows keyboard callback if we are. */ - if (window->parent) { - GetCursorPos(&point); - ScreenToClient(hwnd, &point); - hwnd = ChildWindowFromPoint(hwnd, point); - window = __glutGetWindow(hwnd); - } - if (window->keyboard) { - GetCursorPos(&point); - ScreenToClient(window->win, &point); - __glutSetWindow(window); - __glutModifierMask = 0; - if (GetKeyState(VK_SHIFT) < 0) /* < 0 = high order bit is on */ - __glutModifierMask |= ShiftMask; - if (GetKeyState(VK_CONTROL) < 0) - __glutModifierMask |= ControlMask; - if (GetKeyState(VK_MENU) < 0) - __glutModifierMask |= Mod1Mask; - window->keyboard((unsigned char)wParam, point.x, point.y); - __glutModifierMask = (unsigned int) ~0; - } - return 0; - - case WM_SYSKEYDOWN: - case WM_KEYDOWN: - window = __glutGetWindow(hwnd); - if (!window) { - break; - } - - /* Bit 30 of lParam is set if key already held down. If - we are ignoring auto repeated key strokes for the window, bail. */ - if (window->ignoreKeyRepeat && (lParam & (1 << 30)) ) { - break; - } - - /* Win32 is dumb and sends these messages only to the parent - window. Therefore, find out if we're in a child window and - call the child windows keyboard callback if we are. */ - if (window->parent) { - GetCursorPos(&point); - ScreenToClient(hwnd, &point); - hwnd = ChildWindowFromPoint(hwnd, point); - window = __glutGetWindow(hwnd); - } - if (window->special) { - switch (wParam) { - /* *INDENT-OFF* */ - /* function keys */ - case VK_F1: key = GLUT_KEY_F1; break; - case VK_F2: key = GLUT_KEY_F2; break; - case VK_F3: key = GLUT_KEY_F3; break; - case VK_F4: key = GLUT_KEY_F4; break; - case VK_F5: key = GLUT_KEY_F5; break; - case VK_F6: key = GLUT_KEY_F6; break; - case VK_F7: key = GLUT_KEY_F7; break; - case VK_F8: key = GLUT_KEY_F8; break; - case VK_F9: key = GLUT_KEY_F9; break; - case VK_F10: key = GLUT_KEY_F10; break; - case VK_F11: key = GLUT_KEY_F11; break; - case VK_F12: key = GLUT_KEY_F12; break; - /* directional keys */ - case VK_LEFT: key = GLUT_KEY_LEFT; break; - case VK_UP: key = GLUT_KEY_UP; break; - case VK_RIGHT: key = GLUT_KEY_RIGHT; break; - case VK_DOWN: key = GLUT_KEY_DOWN; break; - /* *INDENT-ON* */ - - case VK_PRIOR: - /* VK_PRIOR is Win32's Page Up */ - key = GLUT_KEY_PAGE_UP; - break; - case VK_NEXT: - /* VK_NEXT is Win32's Page Down */ - key = GLUT_KEY_PAGE_DOWN; - break; - case VK_HOME: - key = GLUT_KEY_HOME; - break; - case VK_END: - key = GLUT_KEY_END; - break; - case VK_INSERT: - key = GLUT_KEY_INSERT; - break; - case VK_DELETE: - goto handleDelete; - default: - goto defproc; - } - GetCursorPos(&point); - ScreenToClient(window->win, &point); - __glutSetWindow(window); - __glutModifierMask = 0; - if (GetKeyState(VK_SHIFT) < 0) /* < 0 = high order bit is on */ - __glutModifierMask |= ShiftMask; - if (GetKeyState(VK_CONTROL) < 0) - __glutModifierMask |= ControlMask; - if (GetKeyState(VK_MENU) < 0) - __glutModifierMask |= Mod1Mask; - window->special(key, point.x, point.y); - __glutModifierMask = (unsigned int) ~0; - } else if (window->keyboard) { - /* Specially handle any keys that match ASCII values but - do not generate Windows WM_SYSCHAR or WM_CHAR messages. */ - switch (wParam) { - case VK_DELETE: - handleDelete: - /* Delete is an ASCII character. */ - GetCursorPos(&point); - ScreenToClient(window->win, &point); - __glutSetWindow(window); - __glutModifierMask = 0; - if (GetKeyState(VK_SHIFT) < 0) /* < 0 = high order bit is on */ - __glutModifierMask |= ShiftMask; - if (GetKeyState(VK_CONTROL) < 0) - __glutModifierMask |= ControlMask; - if (GetKeyState(VK_MENU) < 0) - __glutModifierMask |= Mod1Mask; - window->keyboard((unsigned char) 127, point.x, point.y); - __glutModifierMask = (unsigned int) ~0; - return 0; - default: - /* Let the following WM_SYSCHAR or WM_CHAR message generate - the keyboard callback. */ - break; - } - } - return 0; - - case WM_LBUTTONDOWN: - button = GLUT_LEFT_BUTTON; - case WM_MBUTTONDOWN: - if (button < 0) - button = GLUT_MIDDLE_BUTTON; - case WM_RBUTTONDOWN: - if (button < 0) - button = GLUT_RIGHT_BUTTON; - - /* finish the menu if we get a button down message (user must have - cancelled the menu). */ - if (__glutMappedMenu) { - /* TODO: take this out once the menu on middle mouse stuff works - properly. */ - if (button == GLUT_MIDDLE_BUTTON) - return 0; - GetCursorPos(&point); - ScreenToClient(hwnd, &point); - __glutItemSelected = NULL; - __glutFinishMenu(hwnd, point.x, point.y); - return 0; - } - - /* set the capture so we can get mouse events outside the window */ - SetCapture(hwnd); - - /* Win32 doesn't return the same numbers as X does when the mouse - goes beyond the upper or left side of the window. roll the - Win32's 0..2^16 pointer co-ord range to 0 +/- 2^15. */ - x = LOWORD(lParam); - y = HIWORD(lParam); - if(x & 1 << 15) x -= (1 << 16); - if(y & 1 << 15) y -= (1 << 16); - - window = __glutGetWindow(hwnd); - if (window) { - menu = __glutGetMenuByNum(window->menu[button]); - if (menu) { - point.x = LOWORD(lParam); point.y = HIWORD(lParam); - ClientToScreen(window->win, &point); - __glutMenuButton = button == GLUT_RIGHT_BUTTON ? TPM_RIGHTBUTTON : - button == GLUT_LEFT_BUTTON ? TPM_LEFTBUTTON : - 0x0001; - __glutStartMenu(menu, window, point.x, point.y, x, y); - } else if (window->mouse) { - - __glutSetWindow(window); - __glutModifierMask = 0; - if (GetKeyState(VK_SHIFT) < 0) /* < 0 = high order bit is on. */ - __glutModifierMask |= ShiftMask; - if (GetKeyState(VK_CONTROL) < 0) - __glutModifierMask |= ControlMask; - if (GetKeyState(VK_MENU) < 0) - __glutModifierMask |= Mod1Mask; - window->mouse(button, GLUT_DOWN, x, y); - __glutModifierMask = (unsigned int)~0; - } else { - /* Stray mouse events. Ignore. */ - } - } - return 0; - - case WM_LBUTTONUP: - button = GLUT_LEFT_BUTTON; - case WM_MBUTTONUP: - if (button < 0) - button = GLUT_MIDDLE_BUTTON; - case WM_RBUTTONUP: - if (button < 0) - button = GLUT_RIGHT_BUTTON; - - /* Bail out if we're processing a menu. */ - if (__glutMappedMenu) { - GetCursorPos(&point); - ScreenToClient(hwnd, &point); - /* if we're getting the middle button up signal, then something - on the menu was selected. */ - if (button == GLUT_MIDDLE_BUTTON) { - return 0; - /* For some reason, the code below always returns -1 even - though the point IS IN THE ITEM! Therefore, just bail out if - we get a middle mouse up. The user must select using the - left mouse button. Stupid Win32. */ -#if 0 - int item = MenuItemFromPoint(hwnd, __glutHMenu, point); - if (item != -1) - __glutItemSelected = (GLUTmenuItem*)GetMenuItemID(__glutHMenu, item); - else - __glutItemSelected = NULL; - __glutFinishMenu(hwnd, point.x, point.y); -#endif - } else { - __glutItemSelected = NULL; - __glutFinishMenu(hwnd, point.x, point.y); - } - return 0; - } - - /* Release the mouse capture. */ - ReleaseCapture(); - - window = __glutGetWindow(hwnd); - if (window && window->mouse) { - /* Win32 doesn't return the same numbers as X does when the - mouse goes beyond the upper or left side of the window. roll - the Win32's 0..2^16 pointer co-ord range to 0 +/- 2^15. */ - x = LOWORD(lParam); - y = HIWORD(lParam); - if(x & 1 << 15) x -= (1 << 16); - if(y & 1 << 15) y -= (1 << 16); - - __glutSetWindow(window); - __glutModifierMask = 0; - if (GetKeyState(VK_SHIFT) < 0) /* < 0 = high order bit is on */ - __glutModifierMask |= ShiftMask; - if (GetKeyState(VK_CONTROL) < 0) - __glutModifierMask |= ControlMask; - if (GetKeyState(VK_MENU) < 0) - __glutModifierMask |= Mod1Mask; - window->mouse(button, GLUT_UP, x, y); - __glutModifierMask = (unsigned int)~0; - } else { - /* Window might have been destroyed and all the - events for the window may not yet be received. */ - } - return 0; - - case WM_ENTERMENULOOP: - /* KLUDGE: create a timer that fires every 100 ms when we start a - menu so that we can still process the idle & timer events (that - way, the timers will fire during a menu pick and so will the - idle func. */ - SetTimer(hwnd, 1, 1, NULL); - return 0; - - case WM_TIMER: -#if 0 - /* If the timer id is 2, then this is the timer that is set up in - the main glut message processing loop, and we don't want to do - anything but acknowledge that we got it. It is used to prevent - CPU spiking when an idle function is installed. */ - if (wParam == 2) - return 0; -#endif - - /* only worry about the idle function and the timeouts, since - these are the only events we expect to process during - processing of a menu. */ - /* we no longer process the idle functions (as outlined in the - README), since drawing can't be done until the menu has - finished...it's pretty lame when the animation goes on, but - doesn't update, so you get this weird jerkiness. */ -#if 0 - if (__glutIdleFunc) - __glutIdleFunc(); -#endif - if (__glutTimerList) - handleTimeouts(); - return 0; - - case WM_EXITMENULOOP: - /* nuke the above created timer...we don't need it anymore, since - the menu is gone now. */ - KillTimer(hwnd, 1); - return 0; - - case WM_MENUSELECT: - if (lParam != 0) - __glutHMenu = (HMENU)lParam; - return 0; - - case WM_COMMAND: - if (__glutMappedMenu) { - if (GetSubMenu(__glutHMenu, LOWORD(wParam))) - __glutItemSelected = NULL; - else - __glutItemSelected = - __glutGetUniqueMenuItem(__glutMappedMenu, LOWORD(wParam)); - GetCursorPos(&point); - ScreenToClient(hwnd, &point); - __glutFinishMenu(hwnd, point.x, point.y); - } - return 0; - - case WM_MOUSEMOVE: - if (!__glutMappedMenu) { - window = __glutGetWindow(hwnd); - if (window) { - /* If motion function registered _and_ buttons held * - down, call motion function... */ - x = LOWORD(lParam); - y = HIWORD(lParam); - - /* Win32 doesn't return the same numbers as X does when the - mouse goes beyond the upper or left side of the window. - roll the Win32's 0..2^16 pointer co-ord range to 0..+/-2^15. */ - if(x & 1 << 15) x -= (1 << 16); - if(y & 1 << 15) y -= (1 << 16); - - if (window->motion && wParam & - (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) { - __glutSetWindow(window); - window->motion(x, y); - } - /* If passive motion function registered _and_ - buttons not held down, call passive motion - function... */ - else if (window->passive && - ((wParam & - (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) == - 0)) { - __glutSetWindow(window); - window->passive(x, y); - } - } - } else { - /* Motion events are thrown away when a pop up menu is - active. */ - } - return 0; - - case WM_GETMINMAXINFO: - /* this voodoo is brought to you by Win32 (again). It allows the - window to be bigger than the screen, and smaller than 100x100 - (although it doesn't seem to help the y minimum). */ - minmax = (LPMINMAXINFO)lParam; - minmax->ptMaxSize.x = __glutScreenWidth; - minmax->ptMaxSize.y = __glutScreenHeight; - minmax->ptMinTrackSize.x = 0; - minmax->ptMinTrackSize.y = 0; - minmax->ptMaxTrackSize.x = __glutScreenWidth + - GetSystemMetrics(SM_CXSIZE) * 2; - minmax->ptMaxTrackSize.y = __glutScreenHeight + - GetSystemMetrics(SM_CXSIZE) * 2 + GetSystemMetrics(SM_CYCAPTION); - return 0; - - case WM_SIZE: - window = __glutGetWindow(hwnd); - if (window) { - width = LOWORD(lParam); - height = HIWORD(lParam); - if (width != window->width || height != window->height) { -#if 0 /* Win32 GLUT does not support overlays for now. */ - if (window->overlay) { - XResizeWindow(__glutDisplay, window->overlay->win, width, height); - } -#endif - window->width = width; - window->height = height; - __glutSetWindow(window); - /* Do not execute OpenGL out of sequence with respect - to the SetWindowPos request! */ - GdiFlush(); - window->reshape(width, height); - window->forceReshape = FALSE; - /* A reshape should be considered like posting a - repair request. */ - __glutPostRedisplay(window, GLUT_REPAIR_WORK); - } - } - return 0; - - case WM_SETCURSOR: - /* If the cursor is not in the client area, then we want to send - this message to the default window procedure ('cause its - probably in the border or title, and we don't handle that - cursor. otherwise, set our cursor. Win32 makes us set the - cursor every time the mouse moves (DUMB!). */ - if(LOWORD(lParam) != HTCLIENT) { - goto defproc; - } - window = __glutGetWindow(hwnd); - if (window) { - __glutSetCursor(window); - } - /* TODO: check out the info in DevStudio on WM_SETCURSOR in the - DefaultAction section. */ - return 1; - - case WM_SETFOCUS: - window = __glutGetWindow(hwnd); - if (window) { - window->entryState = WM_SETFOCUS; - if (window->entry) { - __glutSetWindow(window); - window->entry(GLUT_ENTERED); - /* XXX Generation of fake passive notify? See how much - work the X11 code does to support fake passive notify - callbacks. */ - } - if (window->joystick && __glutCurrentWindow) { - if (__glutCurrentWindow->joyPollInterval > 0) { - MMRESULT result; - - /* Because Win32 will only let one window capture the - joystick at a time, we must capture it when we get the - focus and release it when we lose the focus. */ - result = joySetCapture(__glutCurrentWindow->win, - JOYSTICKID1, 0, TRUE); - if (result != JOYERR_NOERROR) { - return 0; - } - (void) joySetThreshold(JOYSTICKID1, - __glutCurrentWindow->joyPollInterval); - } - } - } - return 0; - - case WM_KILLFOCUS: - window = __glutGetWindow(hwnd); - if (window) { - window->entryState = WM_KILLFOCUS; - if (window->entry) { - __glutSetWindow(window); - window->entry(GLUT_LEFT); - } - if (window->joystick && __glutCurrentWindow) { - if (__glutCurrentWindow->joyPollInterval > 0) { - /* Because Win32 will only let one window capture the - joystick at a time, we must capture it when we get the - focus and release it when we lose the focus. */ - (void) joyReleaseCapture(JOYSTICKID1); - } - } - } - return 0; - case WM_ACTIVATE: - window = __glutGetWindow(hwnd); - /* Make sure we re-select the correct palette if needed. */ - if (LOWORD(wParam)) { - PostMessage(hwnd, WM_PALETTECHANGED, 0, 0); - } - if (window) { - int visState; - - /* HIWORD(wParam) is the minimized flag. */ - visState = !HIWORD(wParam); - updateWindowState(window, visState); - } - return 0; - - /* Colour Palette Management */ - case WM_PALETTECHANGED: - if (hwnd == (HWND)wParam) { - /* Don't respond to the message that we sent! */ - break; - } - /* fall through to WM_QUERYNEWPALETTE */ - - case WM_QUERYNEWPALETTE: - window = __glutGetWindow(hwnd); - if (window && window->colormap) { - UnrealizeObject(window->colormap->cmap); - SelectPalette(window->hdc, window->colormap->cmap, FALSE); - RealizePalette(window->hdc); - return TRUE; - } - return FALSE; - - case MM_JOY1MOVE: - case MM_JOY1ZMOVE: - window = __glutGetWindow(hwnd); - if (window->joystick) { - JOYINFOEX jix; - int x, y, z; - - /* Because WIN32 only supports messages for X, Y, and Z - translations, we must poll for the rest */ - jix.dwSize = sizeof(jix); - jix.dwFlags = JOY_RETURNALL; - joyGetPosEx(JOYSTICKID1,&jix); - -#define SCALE(v) ((int) ((v - 32767)/32.768)) - - /* Convert to integer for scaling. */ - x = jix.dwXpos; - y = jix.dwYpos; - z = jix.dwZpos; - window->joystick(jix.dwButtons, SCALE(x), SCALE(y), SCALE(z)); - - return TRUE; - } - return FALSE; - case MM_JOY1BUTTONDOWN: - case MM_JOY1BUTTONUP: - window = __glutGetWindow(hwnd); - if (window->joystick) { - JOYINFOEX jix; - - /* Because WIN32 only supports messages for X, Y, and Z - translations, we must poll for the rest */ - jix.dwSize = sizeof(jix); - jix.dwFlags = JOY_RETURNALL; - joyGetPosEx(JOYSTICKID1,&jix); - - return TRUE; - } - return FALSE; - -#if 0 - /* Miscellaneous messages (don't really need to enumerate them, - but it's good to know what you're not getting sometimes). */ - case WM_DISPLAYCHANGE: - break; - case WM_NCHITTEST: - /* This event is generated by every mouse move event. */ - goto defproc; - case WM_NCMOUSEMOVE: - goto defproc; - case WM_NCACTIVATE: - goto defproc; - case WM_NCPAINT: - goto defproc; - case WM_NCCALCSIZE: - goto defproc; - case WM_NCCREATE: - goto defproc; - case WM_NCDESTROY: - goto defproc; - case WM_NCLBUTTONDOWN: - goto defproc; - case WM_SETTEXT: - goto defproc; - case WM_GETTEXT: - goto defproc; - case WM_ACTIVATEAPP: - goto defproc; - case WM_GETICON: - goto defproc; - case WM_ERASEBKGND: - goto defproc; - case WM_WINDOWPOSCHANGING: - goto defproc; - case WM_WINDOWPOSCHANGED: - goto defproc; - case WM_MOUSEACTIVATE: - goto defproc; - case WM_SHOWWINDOW: - goto defproc; - case WM_MOVING: - goto defproc; - case WM_MOVE: - goto defproc; - case WM_KEYUP: - goto defproc; - case WM_CAPTURECHANGED: - goto defproc; - case WM_SYSCOMMAND: - goto defproc; - case WM_ENTERSIZEMOVE: - goto defproc; - case WM_ENTERIDLE: - goto defproc; -#endif - - default: - goto defproc; - } - -defproc: - return DefWindowProc(hwnd, msg, wParam, lParam); -} - -#endif - -#if defined(__OS2PM__) -Bool __glutSetWindowText(Window window, char *text) -{ - return WinSetWindowText(window, (PCSZ)text); - -} - -#endif - \ No newline at end of file diff --git a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/src-glut_os2pm.zip b/nx-X11/extras/Mesa_6.4.2/src/glut/os2/src-glut_os2pm.zip deleted file mode 100644 index 8c8a8c7ac4..0000000000 Binary files a/nx-X11/extras/Mesa_6.4.2/src/glut/os2/src-glut_os2pm.zip and /dev/null differ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glw/GLwDrawA.c b/nx-X11/extras/Mesa_6.4.2/src/glw/GLwDrawA.c deleted file mode 100644 index 30304a4080..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glw/GLwDrawA.c +++ /dev/null @@ -1,684 +0,0 @@ -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ - -/* - * - * This file has been slightly modified from the original for use with Mesa - * - * Jeroen van der Zijp - * - * jvz@cyberia.cfdrc.com - * - */ -#include -#include -#include -#include -#ifdef __GLX_MOTIF -#include -#include "GLwMDrawAP.h" -#else -#include "GLwDrawAP.h" -#endif -#include -#include - -#ifdef __GLX_MOTIF -#define GLwDrawingAreaWidget GLwMDrawingAreaWidget -#define GLwDrawingAreaClassRec GLwMDrawingAreaClassRec -#define glwDrawingAreaClassRec glwMDrawingAreaClassRec -#define glwDrawingAreaWidgetClass glwMDrawingAreaWidgetClass -#define GLwDrawingAreaRec GLwMDrawingAreaRec -#endif - -#define ATTRIBLIST_SIZE 32 - -#define offset(field) XtOffset(GLwDrawingAreaWidget,glwDrawingArea.field) - - -/* forward definitions */ -static void createColormap(GLwDrawingAreaWidget w,int offset,XrmValue *value); -static void Initialize(GLwDrawingAreaWidget req,GLwDrawingAreaWidget neww,ArgList args,Cardinal *num_args); -static void Realize(Widget w,Mask *valueMask,XSetWindowAttributes *attributes); -static void Redraw(GLwDrawingAreaWidget w,XEvent *event,Region region); -static void Resize(GLwDrawingAreaWidget glw); -static void Destroy(GLwDrawingAreaWidget glw); -static void glwInput(GLwDrawingAreaWidget glw,XEvent *event,String *params,Cardinal *numParams); - - - -static char defaultTranslations[] = -#ifdef __GLX_MOTIF - "osfHelp:PrimitiveHelp() \n" -#endif - ": glwInput() \n\ - : glwInput() \n\ - : glwInput() \n\ - : glwInput() \n\ - : glwInput() "; - - -static XtActionsRec actions[] = { - {"glwInput",(XtActionProc)glwInput}, /* key or mouse input */ - }; - - -/* - * There is a bit of unusual handling of the resources here. - * Because Xt insists on allocating the colormap resource when it is - * processing the core resources (even if we redeclare the colormap - * resource here, we need to do a little trick. When Xt first allocates - * the colormap, we allow it to allocate the default one, since we have - * not yet determined the appropriate visual (which is determined from - * resources parsed after the colormap). We also let it allocate colors - * in that default colormap. - * - * In the initialize proc we calculate the actual visual. Then, we - * reobtain the colormap resource using XtGetApplicationResources in - * the initialize proc. If requested, we also reallocate colors in - * that colormap using the same method. - */ - -static XtResource resources[] = { - /* The GLX attributes. Add any new attributes here */ - - {GLwNbufferSize, GLwCBufferSize, XtRInt, sizeof (int), - offset(bufferSize), XtRImmediate, (XtPointer) 0}, - - {GLwNlevel, GLwCLevel, XtRInt, sizeof (int), - offset(level), XtRImmediate, (XtPointer) 0}, - - {GLwNrgba, GLwCRgba, XtRBoolean, sizeof (Boolean), - offset(rgba), XtRImmediate, (XtPointer) FALSE}, - - {GLwNdoublebuffer, GLwCDoublebuffer, XtRBoolean, sizeof (Boolean), - offset(doublebuffer), XtRImmediate, (XtPointer) FALSE}, - - {GLwNstereo, GLwCStereo, XtRBoolean, sizeof (Boolean), - offset(stereo), XtRImmediate, (XtPointer) FALSE}, - - {GLwNauxBuffers, GLwCAuxBuffers, XtRInt, sizeof (int), - offset(auxBuffers), XtRImmediate, (XtPointer) 0}, - - {GLwNredSize, GLwCColorSize, XtRInt, sizeof (int), - offset(redSize), XtRImmediate, (XtPointer) 1}, - - {GLwNgreenSize, GLwCColorSize, XtRInt, sizeof (int), - offset(greenSize), XtRImmediate, (XtPointer) 1}, - - {GLwNblueSize, GLwCColorSize, XtRInt, sizeof (int), - offset(blueSize), XtRImmediate, (XtPointer) 1}, - - {GLwNalphaSize, GLwCAlphaSize, XtRInt, sizeof (int), - offset(alphaSize), XtRImmediate, (XtPointer) 0}, - - {GLwNdepthSize, GLwCDepthSize, XtRInt, sizeof (int), - offset(depthSize), XtRImmediate, (XtPointer) 0}, - - {GLwNstencilSize, GLwCStencilSize, XtRInt, sizeof (int), - offset(stencilSize), XtRImmediate, (XtPointer) 0}, - - {GLwNaccumRedSize, GLwCAccumColorSize, XtRInt, sizeof (int), - offset(accumRedSize), XtRImmediate, (XtPointer) 0}, - - {GLwNaccumGreenSize, GLwCAccumColorSize, XtRInt, sizeof (int), - offset(accumGreenSize), XtRImmediate, (XtPointer) 0}, - - {GLwNaccumBlueSize, GLwCAccumColorSize, XtRInt, sizeof (int), - offset(accumBlueSize), XtRImmediate, (XtPointer) 0}, - - {GLwNaccumAlphaSize, GLwCAccumAlphaSize, XtRInt, sizeof (int), - offset(accumAlphaSize), XtRImmediate, (XtPointer) 0}, - - /* the attribute list */ - {GLwNattribList, GLwCAttribList, XtRPointer, sizeof(int *), - offset(attribList), XtRImmediate, (XtPointer) NULL}, - - /* the visual info */ - {GLwNvisualInfo, GLwCVisualInfo, GLwRVisualInfo, sizeof (XVisualInfo *), - offset(visualInfo), XtRImmediate, (XtPointer) NULL}, - - /* miscellaneous resources */ - {GLwNinstallColormap, GLwCInstallColormap, XtRBoolean, sizeof (Boolean), - offset(installColormap), XtRImmediate, (XtPointer) TRUE}, - - {GLwNallocateBackground, GLwCAllocateColors, XtRBoolean, sizeof (Boolean), - offset(allocateBackground), XtRImmediate, (XtPointer) FALSE}, - - {GLwNallocateOtherColors, GLwCAllocateColors, XtRBoolean, sizeof (Boolean), - offset(allocateOtherColors), XtRImmediate, (XtPointer) FALSE}, - - {GLwNinstallBackground, GLwCInstallBackground, XtRBoolean, sizeof (Boolean), - offset(installBackground), XtRImmediate, (XtPointer) TRUE}, - - {GLwNginitCallback, GLwCCallback, XtRCallback, sizeof (XtCallbackList), - offset(ginitCallback), XtRImmediate, (XtPointer) NULL}, - - {GLwNinputCallback, GLwCCallback, XtRCallback, sizeof (XtCallbackList), - offset(inputCallback), XtRImmediate, (XtPointer) NULL}, - - {GLwNresizeCallback, GLwCCallback, XtRCallback, sizeof (XtCallbackList), - offset(resizeCallback), XtRImmediate, (XtPointer) NULL}, - - {GLwNexposeCallback, GLwCCallback, XtRCallback, sizeof (XtCallbackList), - offset(exposeCallback), XtRImmediate, (XtPointer) NULL}, - - /* Changes to Motif primitive resources */ -#ifdef __GLX_MOTIF - {XmNtraversalOn, XmCTraversalOn, XmRBoolean, sizeof (Boolean), - XtOffset (GLwDrawingAreaWidget, primitive.traversal_on), XmRImmediate, - (XtPointer)FALSE}, - - /* highlighting is normally disabled, as when Motif tries to disable - * highlighting, it tries to reset the color back to the parent's - * background (usually Motif blue). Unfortunately, that is in a - * different colormap, and doesn't work too well. - */ - {XmNhighlightOnEnter, XmCHighlightOnEnter, XmRBoolean, sizeof (Boolean), - XtOffset (GLwDrawingAreaWidget, primitive.highlight_on_enter), - XmRImmediate, (XtPointer) FALSE}, - - {XmNhighlightThickness, XmCHighlightThickness, XmRHorizontalDimension, - sizeof (Dimension), - XtOffset (GLwDrawingAreaWidget, primitive.highlight_thickness), - XmRImmediate, (XtPointer) 0}, -#endif - }; - - -/* -** The following resources are reobtained using XtGetApplicationResources -** in the initialize proc. -*/ - -/* The colormap */ -static XtResource initializeResources[] = { - /* reobtain the colormap with the new visual */ - {XtNcolormap, XtCColormap, XtRColormap, sizeof(Colormap), - XtOffset(GLwDrawingAreaWidget, core.colormap), - XtRCallProc,(XtPointer) createColormap}, - }; - - -/* reallocate any colors we need in the new colormap */ - -/* The background is obtained only if the allocateBackground resource is TRUE*/ -static XtResource backgroundResources[] = { -#ifdef __GLX_MOTIF - {XmNbackground, XmCBackground,XmRPixel, - sizeof(Pixel),XtOffset(GLwDrawingAreaWidget,core.background_pixel), - XmRString,(XtPointer)"lightgrey"}, - /*XmRCallProc,(XtPointer)_XmBackgroundColorDefault},*/ - - {XmNbackgroundPixmap,XmCPixmap,XmRXmBackgroundPixmap, - sizeof(Pixmap),XtOffset(GLwDrawingAreaWidget,core.background_pixmap), - XmRImmediate,(XtPointer)XmUNSPECIFIED_PIXMAP}, - -#else - {XtNbackground,XtCBackground,XtRPixel,sizeof(Pixel), - XtOffset(GLwDrawingAreaWidget,core.background_pixel), - XtRString,(XtPointer)"lightgrey"}, - /*XtRString,(XtPointer)"XtDefaultBackground"},*/ - - {XtNbackgroundPixmap, XtCPixmap, XtRPixmap, sizeof(Pixmap), - XtOffset(GLwDrawingAreaWidget,core.background_pixmap), - XtRImmediate,(XtPointer)XtUnspecifiedPixmap}, -#endif - }; - - - -/* The other colors such as the foreground are allocated only if - * allocateOtherColors are set. These resources only exist in Motif. - */ -#ifdef __GLX_MOTIF -static XtResource otherColorResources[] = { - {XmNforeground,XmCForeground,XmRPixel, - sizeof(Pixel),XtOffset(GLwDrawingAreaWidget,primitive.foreground), - XmRString,(XtPointer)"lighgrey"}, - /*XmRCallProc, (XtPointer) _XmForegroundColorDefault},*/ - - {XmNhighlightColor,XmCHighlightColor,XmRPixel,sizeof(Pixel), - XtOffset(GLwDrawingAreaWidget,primitive.highlight_color), - XmRString,(XtPointer)"lightgrey"}, - /*XmRCallProc,(XtPointer)_XmHighlightColorDefault},*/ - - {XmNhighlightPixmap,XmCHighlightPixmap,XmRPrimHighlightPixmap, - sizeof(Pixmap), - XtOffset(GLwDrawingAreaWidget,primitive.highlight_pixmap), - XmRImmediate,(XtPointer)XmUNSPECIFIED_PIXMAP}, - /*XmRCallProc,(XtPointer)_XmPrimitiveHighlightPixmapDefault},*/ - }; -#endif - - -#undef offset - - -GLwDrawingAreaClassRec glwDrawingAreaClassRec = { - { /* core fields */ -#ifdef __GLX_MOTIF - /* superclass */ (WidgetClass) &xmPrimitiveClassRec, - /* class_name */ "GLwMDrawingArea", -#else /* not __GLX_MOTIF */ - /* superclass */ (WidgetClass) &widgetClassRec, - /* class_name */ "GLwDrawingArea", -#endif /* __GLX_MOTIF */ - /* widget_size */ sizeof(GLwDrawingAreaRec), - /* class_initialize */ NULL, - /* class_part_initialize */ NULL, - /* class_inited */ FALSE, - /* initialize */ (XtInitProc) Initialize, - /* initialize_hook */ NULL, - /* realize */ Realize, - /* actions */ actions, - /* num_actions */ XtNumber(actions), - /* resources */ resources, - /* num_resources */ XtNumber(resources), - /* xrm_class */ NULLQUARK, - /* compress_motion */ TRUE, - /* compress_exposure */ TRUE, - /* compress_enterleave */ TRUE, - /* visible_interest */ TRUE, - /* destroy */ (XtWidgetProc) Destroy, - /* resize */ (XtWidgetProc) Resize, - /* expose */ (XtExposeProc) Redraw, - /* set_values */ NULL, - /* set_values_hook */ NULL, - /* set_values_almost */ XtInheritSetValuesAlmost, - /* get_values_hook */ NULL, - /* accept_focus */ NULL, - /* version */ XtVersion, - /* callback_private */ NULL, - /* tm_table */ defaultTranslations, - /* query_geometry */ XtInheritQueryGeometry, - /* display_accelerator */ XtInheritDisplayAccelerator, - /* extension */ NULL - }, -#ifdef __GLX_MOTIF /* primitive resources */ - { - /* border_highlight */ XmInheritBorderHighlight, - /* border_unhighlight */ XmInheritBorderUnhighlight, - /* translations */ XtInheritTranslations, - /* arm_and_activate */ NULL, - /* get_resources */ NULL, - /* num get_resources */ 0, - /* extension */ NULL, - } -#endif - }; - -WidgetClass glwDrawingAreaWidgetClass=(WidgetClass)&glwDrawingAreaClassRec; - - - -static void error(Widget w,char* string){ - char buf[100]; -#ifdef __GLX_MOTIF - sprintf(buf,"GLwMDrawingArea: %s\n",string); -#else - sprintf(buf,"GLwDrawingArea: %s\n",string); -#endif - XtAppError(XtWidgetToApplicationContext(w),buf); - } - - -static void warning(Widget w,char* string){ - char buf[100]; -#ifdef __GLX_MOTIF - sprintf (buf, "GLwMDraw: %s\n", string); -#else - sprintf (buf, "GLwDraw: %s\n", string); -#endif - XtAppWarning(XtWidgetToApplicationContext(w), buf); - } - - - -/* Initialize the attribList based on the attributes */ -static void createAttribList(GLwDrawingAreaWidget w){ - int *ptr; - w->glwDrawingArea.attribList = (int*)XtMalloc(ATTRIBLIST_SIZE*sizeof(int)); - if(!w->glwDrawingArea.attribList){ - error((Widget)w,"Unable to allocate attribute list"); - } - ptr = w->glwDrawingArea.attribList; - *ptr++ = GLX_BUFFER_SIZE; - *ptr++ = w->glwDrawingArea.bufferSize; - *ptr++ = GLX_LEVEL; - *ptr++ = w->glwDrawingArea.level; - if(w->glwDrawingArea.rgba) *ptr++ = GLX_RGBA; - if(w->glwDrawingArea.doublebuffer) *ptr++ = GLX_DOUBLEBUFFER; - if(w->glwDrawingArea.stereo) *ptr++ = GLX_STEREO; - *ptr++ = GLX_AUX_BUFFERS; - *ptr++ = w->glwDrawingArea.auxBuffers; - *ptr++ = GLX_RED_SIZE; - *ptr++ = w->glwDrawingArea.redSize; - *ptr++ = GLX_GREEN_SIZE; - *ptr++ = w->glwDrawingArea.greenSize; - *ptr++ = GLX_BLUE_SIZE; - *ptr++ = w->glwDrawingArea.blueSize; - *ptr++ = GLX_ALPHA_SIZE; - *ptr++ = w->glwDrawingArea.alphaSize; - *ptr++ = GLX_DEPTH_SIZE; - *ptr++ = w->glwDrawingArea.depthSize; - *ptr++ = GLX_STENCIL_SIZE; - *ptr++ = w->glwDrawingArea.stencilSize; - *ptr++ = GLX_ACCUM_RED_SIZE; - *ptr++ = w->glwDrawingArea.accumRedSize; - *ptr++ = GLX_ACCUM_GREEN_SIZE; - *ptr++ = w->glwDrawingArea.accumGreenSize; - *ptr++ = GLX_ACCUM_BLUE_SIZE; - *ptr++ = w->glwDrawingArea.accumBlueSize; - *ptr++ = GLX_ACCUM_ALPHA_SIZE; - *ptr++ = w->glwDrawingArea.accumAlphaSize; - *ptr++ = None; - assert((ptr-w->glwDrawingArea.attribList)glwDrawingArea.attribList); - w->glwDrawingArea.visualInfo=glXChooseVisual(XtDisplay(w),XScreenNumberOfScreen(XtScreen(w)),w->glwDrawingArea.attribList); - if(!w->glwDrawingArea.visualInfo) error((Widget)w,"requested visual not supported"); - } - - - -/* Initialize the colormap based on the visual info. - * This routine maintains a cache of visual-infos to colormaps. If two - * widgets share the same visual info, they share the same colormap. - * This function is called by the callProc of the colormap resource entry. - */ -static void createColormap(GLwDrawingAreaWidget w,int offset,XrmValue *value){ - static struct cmapCache { Visual *visual; Colormap cmap; } *cmapCache; - static int cacheEntries=0; - static int cacheMalloced=0; - register int i; - - assert(w->glwDrawingArea.visualInfo); - - /* see if we can find it in the cache */ - for(i=0; iglwDrawingArea.visualInfo->visual){ - value->addr=(XtPointer)(&cmapCache[i].cmap); - return; - } - } - - /* not in the cache, create a new entry */ - if(cacheEntries >= cacheMalloced){ - /* need to malloc a new one. Since we are likely to have only a - * few colormaps, we allocate one the first time, and double - * each subsequent time. - */ - if(cacheMalloced==0){ - cacheMalloced=1; - cmapCache=(struct cmapCache*)XtMalloc(sizeof(struct cmapCache)); - } - else{ - cacheMalloced<<=1; - cmapCache=(struct cmapCache*)XtRealloc((char*)cmapCache,sizeof(struct cmapCache)*cacheMalloced); - } - } - - cmapCache[cacheEntries].cmap=XCreateColormap(XtDisplay(w), - RootWindow(XtDisplay(w), - w->glwDrawingArea.visualInfo->screen), - w->glwDrawingArea.visualInfo->visual, - AllocNone); - cmapCache[cacheEntries].visual=w->glwDrawingArea.visualInfo->visual; - value->addr=(XtPointer)(&cmapCache[cacheEntries++].cmap); - } - - - -static void Initialize(GLwDrawingAreaWidget req,GLwDrawingAreaWidget neww,ArgList args,Cardinal *num_args){ - - /* fix size */ - if(req->core.width==0) neww->core.width=100; - if(req->core.height==0) neww->core.width=100; - - /* create the attribute list if needed */ - neww->glwDrawingArea.myList=FALSE; - if(neww->glwDrawingArea.attribList==NULL){ - neww->glwDrawingArea.myList=TRUE; - createAttribList(neww); - } - - /* Gotta have it */ - assert(neww->glwDrawingArea.attribList); - - /* determine the visual info if needed */ - neww->glwDrawingArea.myVisual=FALSE; - if(neww->glwDrawingArea.visualInfo==NULL){ - neww->glwDrawingArea.myVisual=TRUE; - createVisualInfo(neww); - } - - /* Gotta have that too */ - assert(neww->glwDrawingArea.visualInfo); - - neww->core.depth=neww->glwDrawingArea.visualInfo->depth; - - /* Reobtain the colormap and colors in it using XtGetApplicationResources*/ - XtGetApplicationResources((Widget)neww,neww,initializeResources,XtNumber(initializeResources),args,*num_args); - - /* obtain the color resources if appropriate */ - if(req->glwDrawingArea.allocateBackground){ - XtGetApplicationResources((Widget)neww,neww,backgroundResources,XtNumber(backgroundResources),args,*num_args); - } - -#ifdef __GLX_MOTIF - if(req->glwDrawingArea.allocateOtherColors){ - XtGetApplicationResources((Widget)neww,neww,otherColorResources,XtNumber(otherColorResources),args,*num_args); - } -#endif - } - - - -static void Realize(Widget w,Mask *valueMask,XSetWindowAttributes *attributes){ - register GLwDrawingAreaWidget glw=(GLwDrawingAreaWidget)w; - GLwDrawingAreaCallbackStruct cb; - Widget parentShell; - Status status; - Window windows[2],*windowsReturn,*windowList; - int countReturn,i; - - /* if we haven't requested that the background be both installed and - * allocated, don't install it. - */ - if(!(glw->glwDrawingArea.installBackground && glw->glwDrawingArea.allocateBackground)){ - *valueMask&=~CWBackPixel; - } - - XtCreateWindow(w,(unsigned int)InputOutput,glw->glwDrawingArea.visualInfo->visual,*valueMask,attributes); - - /* if appropriate, call XSetWMColormapWindows to install the colormap */ - if(glw->glwDrawingArea.installColormap){ - - /* Get parent shell */ - for(parentShell=XtParent(w); parentShell&&!XtIsShell(parentShell); parentShell=XtParent(parentShell)); - - if(parentShell && XtWindow(parentShell)){ - - /* check to see if there is already a property */ - status=XGetWMColormapWindows(XtDisplay(parentShell),XtWindow(parentShell),&windowsReturn,&countReturn); - - /* if no property, just create one */ - if(!status){ - windows[0]=XtWindow(w); - windows[1]=XtWindow(parentShell); - XSetWMColormapWindows(XtDisplay(parentShell),XtWindow(parentShell),windows,2); - } - - /* there was a property, add myself to the beginning */ - else{ - windowList=(Window *)XtMalloc((sizeof(Window))*(countReturn+1)); - windowList[0]=XtWindow(w); - for(i=0; icore.width; - cb.height=glw->core.height; - XtCallCallbackList((Widget)glw,glw->glwDrawingArea.ginitCallback,&cb); - } - - - -static void Redraw(GLwDrawingAreaWidget w,XEvent *event,Region region){ - GLwDrawingAreaCallbackStruct cb; - if(!XtIsRealized((Widget)w)) return; - cb.reason=GLwCR_EXPOSE; - cb.event=event; - cb.width=w->core.width; - cb.height=w->core.height; - XtCallCallbackList((Widget)w,w->glwDrawingArea.exposeCallback,&cb); - } - - - -static void Resize(GLwDrawingAreaWidget glw){ - GLwDrawingAreaCallbackStruct cb; - if(!XtIsRealized((Widget)glw)) return; - cb.reason=GLwCR_RESIZE; - cb.event=NULL; - cb.width=glw->core.width; - cb.height=glw->core.height; - XtCallCallbackList((Widget)glw,glw->glwDrawingArea.resizeCallback,&cb); - } - - - -static void Destroy(GLwDrawingAreaWidget glw){ - Window *windowsReturn; - Widget parentShell; - Status status; - int countReturn; - register int i; - - if(glw->glwDrawingArea.myList && glw->glwDrawingArea.attribList){ - XtFree((XtPointer)glw->glwDrawingArea.attribList); - } - - if(glw->glwDrawingArea.myVisual && glw->glwDrawingArea.visualInfo){ - XtFree((XtPointer)glw->glwDrawingArea.visualInfo); - } - - /* if my colormap was installed, remove it */ - if(glw->glwDrawingArea.installColormap){ - - /* Get parent shell */ - for(parentShell=XtParent(glw); parentShell&&!XtIsShell(parentShell); parentShell=XtParent(parentShell)); - - if(parentShell && XtWindow(parentShell)){ - - /* make sure there is a property */ - status=XGetWMColormapWindows(XtDisplay(parentShell),XtWindow(parentShell),&windowsReturn,&countReturn); - - /* if no property, just return. If there was a property, continue */ - if(status){ - - /* search for a match */ - for(i=0; icore.width; - cb.height=glw->core.height; - XtCallCallbackList((Widget)glw,glw->glwDrawingArea.inputCallback,&cb); - } - - -#ifdef __GLX_MOTIF - -/* Create routine */ -Widget GLwCreateMDrawingArea(Widget parent, char *name,ArgList arglist,Cardinal argcount){ - return XtCreateWidget(name,glwMDrawingAreaWidgetClass, parent, arglist,argcount); - } - -#endif - - -#ifndef __GLX_MOTIF - -/* Make context current */ -void GLwDrawingAreaMakeCurrent(Widget w,GLXContext ctx){ - glXMakeCurrent(XtDisplay(w),XtWindow(w),ctx); - } - - -/* Swap buffers convenience function */ -void GLwDrawingAreaSwapBuffers(Widget w){ - glXSwapBuffers(XtDisplay(w),XtWindow(w)); - } - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glw/GLwDrawA.h b/nx-X11/extras/Mesa_6.4.2/src/glw/GLwDrawA.h deleted file mode 100644 index cd631b4fb5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glw/GLwDrawA.h +++ /dev/null @@ -1,195 +0,0 @@ -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -#ifndef _GLwDrawA_h -#define _GLwDrawA_h - -#include -#include - -/**************************************************************** - * - * GLwDrawingArea widgets - * - ****************************************************************/ - -/* Resources: - - Name Class RepType Default Value - ---- ----- ------- ------------- - attribList AttribList int * NULL - visualInfo VisualInfo VisualInfo NULL - installColormap InstallColormap Boolean TRUE - allocateBackground AllocateColors Boolean FALSE - allocateOtherColors AllocateColors Boolean FALSE - installBackground InstallBackground Boolean TRUE - exposeCallback Callback Pointer NULL - ginitCallback Callback Pointer NULL - inputCallback Callback Pointer NULL - resizeCallback Callback Pointer NULL - -*** The following resources all correspond to the GLX configuration -*** attributes and are used to create the attribList if it is NULL - bufferSize BufferSize int 0 - level Level int 0 - rgba Rgba Boolean FALSE - doublebuffer Doublebuffer Boolean FALSE - stereo Stereo Boolean FALSE - auxBuffers AuxBuffers int 0 - redSize ColorSize int 1 - greenSize ColorSize int 1 - blueSize ColorSize int 1 - alphaSize AlphaSize int 0 - depthSize DepthSize int 0 - stencilSize StencilSize int 0 - accumRedSize AccumColorSize int 0 - accumGreenSize AccumColorSize int 0 - accumBlueSize AccumColorSize int 0 - accumAlphaSize AccumAlphaSize int 0 -*/ - -#define GLwNattribList "attribList" -#define GLwCAttribList "AttribList" -#define GLwNvisualInfo "visualInfo" -#define GLwCVisualInfo "VisualInfo" -#define GLwRVisualInfo "VisualInfo" - -#define GLwNinstallColormap "installColormap" -#define GLwCInstallColormap "InstallColormap" -#define GLwNallocateBackground "allocateBackground" -#define GLwNallocateOtherColors "allocateOtherColors" -#define GLwCAllocateColors "AllocateColors" -#define GLwNinstallBackground "installBackground" -#define GLwCInstallBackground "InstallBackground" - -#define GLwCCallback "Callback" -#define GLwNexposeCallback "exposeCallback" -#define GLwNginitCallback "ginitCallback" -#define GLwNresizeCallback "resizeCallback" -#define GLwNinputCallback "inputCallback" - -#define GLwNbufferSize "bufferSize" -#define GLwCBufferSize "BufferSize" -#define GLwNlevel "level" -#define GLwCLevel "Level" -#define GLwNrgba "rgba" -#define GLwCRgba "Rgba" -#define GLwNdoublebuffer "doublebuffer" -#define GLwCDoublebuffer "Doublebuffer" -#define GLwNstereo "stereo" -#define GLwCStereo "Stereo" -#define GLwNauxBuffers "auxBuffers" -#define GLwCAuxBuffers "AuxBuffers" -#define GLwNredSize "redSize" -#define GLwNgreenSize "greenSize" -#define GLwNblueSize "blueSize" -#define GLwCColorSize "ColorSize" -#define GLwNalphaSize "alphaSize" -#define GLwCAlphaSize "AlphaSize" -#define GLwNdepthSize "depthSize" -#define GLwCDepthSize "DepthSize" -#define GLwNstencilSize "stencilSize" -#define GLwCStencilSize "StencilSize" -#define GLwNaccumRedSize "accumRedSize" -#define GLwNaccumGreenSize "accumGreenSize" -#define GLwNaccumBlueSize "accumBlueSize" -#define GLwCAccumColorSize "AccumColorSize" -#define GLwNaccumAlphaSize "accumAlphaSize" -#define GLwCAccumAlphaSize "AccumAlphaSize" - -#ifdef __GLX_MOTIF - -typedef struct _GLwMDrawingAreaClassRec *GLwMDrawingAreaWidgetClass; -typedef struct _GLwMDrawingAreaRec *GLwMDrawingAreaWidget; - -extern WidgetClass glwMDrawingAreaWidgetClass; - - -#else - -typedef struct _GLwDrawingAreaClassRec *GLwDrawingAreaWidgetClass; -typedef struct _GLwDrawingAreaRec *GLwDrawingAreaWidget; - -extern WidgetClass glwDrawingAreaWidgetClass; - - -#endif - - -/* Callback reasons */ -#ifdef __GLX_MOTIF -#define GLwCR_EXPOSE XmCR_EXPOSE -#define GLwCR_RESIZE XmCR_RESIZE -#define GLwCR_INPUT XmCR_INPUT -#else -/* The same values as Motif, but don't use Motif constants */ -#define GLwCR_EXPOSE 38 -#define GLwCR_RESIZE 39 -#define GLwCR_INPUT 40 -#endif - -#define GLwCR_GINIT 32135 /* Arbitrary number that should neverr clash */ - -typedef struct - { - int reason; - XEvent *event; - Dimension width,height; - } - GLwDrawingAreaCallbackStruct; - -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - -/* front ends to glXMakeCurrent and glXSwapBuffers */ -extern void GLwDrawingAreaMakeCurrent(Widget w,GLXContext ctx); -extern void GLwDrawingAreaSwapBuffers(Widget w); - -#ifdef __GLX_MOTIF -#ifdef _NO_PROTO -GLAPI Widget GLwCreateMDrawingArea(); -#else -GLAPI Widget GLwCreateMDrawingArea(Widget parent,char *name,ArgList arglist,Cardinal argcount); -#endif -#endif - -#if defined(__cplusplus) || defined(c_plusplus) -} -#endif - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glw/GLwDrawAP.h b/nx-X11/extras/Mesa_6.4.2/src/glw/GLwDrawAP.h deleted file mode 100644 index f121701954..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glw/GLwDrawAP.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -#ifndef _GLwDrawAP_h -#define _GLwDrawAP_h - - -/* MOTIF */ -#ifdef __GLX_MOTIF -#include "GLwMDrawA.h" -#else -#include "GLwDrawA.h" -#endif - -typedef struct _GLwDrawingAreaClassPart { - caddr_t extension; - } GLwDrawingAreaClassPart; - - -#ifdef __GLX_MOTIF -typedef struct _GLwMDrawingAreaClassRec { - CoreClassPart core_class; - XmPrimitiveClassPart primitive_class; - GLwDrawingAreaClassPart glwDrawingArea_class; - } GLwMDrawingAreaClassRec; - - -extern GLwMDrawingAreaClassRec glwMDrawingAreaClassRec; - - -/* XT */ -#else - -typedef struct _GLwDrawingAreaClassRec { - CoreClassPart core_class; - GLwDrawingAreaClassPart glwDrawingArea_class; - } GLwDrawingAreaClassRec; - -extern GLwDrawingAreaClassRec glwDrawingAreaClassRec; - - -#endif - - - -typedef struct { - /* resources */ - int * attribList; - XVisualInfo * visualInfo; - Boolean myList; /* TRUE if we malloced the attribList*/ - Boolean myVisual; /* TRUE if we created the visualInfo*/ - Boolean installColormap; - Boolean allocateBackground; - Boolean allocateOtherColors; - Boolean installBackground; - XtCallbackList ginitCallback; - XtCallbackList resizeCallback; - XtCallbackList exposeCallback; - XtCallbackList inputCallback; - /* specific attributes; add as we get new attributes */ - int bufferSize; - int level; - Boolean rgba; - Boolean doublebuffer; - Boolean stereo; - int auxBuffers; - int redSize; - int greenSize; - int blueSize; - int alphaSize; - int depthSize; - int stencilSize; - int accumRedSize; - int accumGreenSize; - int accumBlueSize; - int accumAlphaSize; - } GLwDrawingAreaPart; - -#ifdef __GLX_MOTIF - -typedef struct _GLwMDrawingAreaRec { - CorePart core; - XmPrimitivePart primitive; - GLwDrawingAreaPart glwDrawingArea; - } GLwMDrawingAreaRec; - -#else - -typedef struct _GLwDrawingAreaRec { - CorePart core; - GLwDrawingAreaPart glwDrawingArea; - } GLwDrawingAreaRec; - -#endif - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/glw/GLwMDrawA.c b/nx-X11/extras/Mesa_6.4.2/src/glw/GLwMDrawA.c deleted file mode 100644 index bdefe92a6d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glw/GLwMDrawA.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -#ifndef __GLX_MOTIF -#define __GLX_MOTIF 1 -#endif -#include "GLwDrawA.c" diff --git a/nx-X11/extras/Mesa_6.4.2/src/glw/GLwMDrawA.h b/nx-X11/extras/Mesa_6.4.2/src/glw/GLwMDrawA.h deleted file mode 100644 index 2e24589041..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glw/GLwMDrawA.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -#ifndef __GLX_MOTIF -#define __GLX_MOTIF 1 -#endif -#include "GLwDrawA.h" diff --git a/nx-X11/extras/Mesa_6.4.2/src/glw/GLwMDrawAP.h b/nx-X11/extras/Mesa_6.4.2/src/glw/GLwMDrawAP.h deleted file mode 100644 index a0a689bb99..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glw/GLwMDrawAP.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. - */ -#ifndef __GLX_MOTIF -#define __GLX_MOTIF 1 -#endif -#include "GLwDrawAP.h" diff --git a/nx-X11/extras/Mesa_6.4.2/src/glw/Makefile b/nx-X11/extras/Mesa_6.4.2/src/glw/Makefile deleted file mode 100644 index 3c66c6778f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glw/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# src/glw/Makefile - -TOP = ../.. -include $(TOP)/configs/current - -MAJOR = 1 -MINOR = 0 -TINY = 0 - -INCDIRS = -I$(TOP)/include -I/usr/include/Motif1.2 -I/usr/contrib/X11R6/include -I/usr/X11R6/include - - -OBJECTS = $(GLW_SOURCES:.c=.o) - - - -##### RULES ##### - -.c.o: - $(CC) -c $(INCDIRS) $(CFLAGS) $< - - - -##### TARGETS ##### - -default: $(LIB_DIR)/$(GLW_LIB_NAME) - - -clean: - -rm depend depend.bak - -rm -f *.o *~ - - -# Make the library -$(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS) - $(TOP)/bin/mklib -o $(GLW_LIB) -linker '$(CC)' \ - -major $(MAJOR) -minor $(MINOR) -patch $(TINY) \ - $(MKLIB_OPTIONS) -install $(LIB_DIR) \ - $(GLW_LIB_DEPS) $(OBJECTS) - - -# -# Run 'make depend' to update the dependencies if you change what's included -# by any source file. -# -depend: $(GLW_SOURCES) - touch depend - $(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(GLW_SOURCES) \ - > /dev/null - - -include depend diff --git a/nx-X11/extras/Mesa_6.4.2/src/glw/README b/nx-X11/extras/Mesa_6.4.2/src/glw/README deleted file mode 100644 index 70f4f7bc2e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glw/README +++ /dev/null @@ -1,56 +0,0 @@ - - widgets README file - - -This directory contains the source code for SGI's OpenGL Xt/Motif widgets, -slightly modified by Jeroen van der Zijp to work better with Mesa. - -To compile the widget code (producing lib/libGLw.a) cd to the widgets/ -directory and type 'make ' where is the system configuration -you used to compile Mesa (like 'make linux'). This hasn't been tested on -many systems so let us know if you have trouble. - -If you want to make a Linux ELF shared lib instead of the non-shared .a -file see the notes in the Makefile. - -If you want to build with Motif support, edit Makefile.X11, looking -for the "Motif" information. - -The SGI copyright is as follows. - - - * (c) Copyright 1993, Silicon Graphics, Inc. - * ALL RIGHTS RESERVED - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the above - * copyright notice appear in all copies and that both the copyright notice - * and this permission notice appear in supporting documentation, and that - * the name of Silicon Graphics, Inc. not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. - * - * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" - * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, - * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY - * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, - * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF - * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN - * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE - * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. - * - * - * US Government Users Restricted Rights - * Use, duplication, or disclosure by the Government is subject to - * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph - * (c)(1)(ii) of the Rights in Technical Data and Computer Software - * clause at DFARS 252.227-7013 and/or in similar or successor - * clauses in the FAR or the DOD or NASA FAR Supplement. - * Unpublished-- rights reserved under the copyright laws of the - * United States. Contractor/manufacturer is Silicon Graphics, - * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. - * - * OpenGL(TM) is a trademark of Silicon Graphics, Inc. diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/Makefile b/nx-X11/extras/Mesa_6.4.2/src/glx/Makefile deleted file mode 100644 index bd486cf81b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/Makefile +++ /dev/null @@ -1,12 +0,0 @@ - -TOP = ../.. -include $(TOP)/configs/current - - -default: - cd mini ; $(MAKE) - - -clean: - cd mini ; $(MAKE) clean - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/Makefile b/nx-X11/extras/Mesa_6.4.2/src/glx/mini/Makefile deleted file mode 100644 index e87905acba..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/Makefile +++ /dev/null @@ -1,86 +0,0 @@ -# Build a subset DRI-based libGL.so library. -# Indirect rendering not supported, etc. - -TOP = ../../.. -include $(TOP)/configs/current - - -DEFINES += -DGLX_DIRECT_RENDERING -DIN_MINI_GLX -UIN_DRI_DRIVER - -C_SOURCES = \ - $(TOP)/src/mesa/main/dispatch.c \ - $(TOP)/src/mesa/glapi/glapi.c \ - $(TOP)/src/mesa/glapi/glthread.c \ - $(TOP)/src/mesa/drivers/dri/common/glcontextmodes.c \ - $(DRM_SOURCE_PATH)/libdrm/xf86drm.c \ - $(DRM_SOURCE_PATH)/libdrm/xf86drmHash.c \ - $(DRM_SOURCE_PATH)/libdrm/xf86drmRandom.c \ - miniglx.c \ - miniglx_events.c - -X86_SOURCES = $(TOP)/src/mesa/x86/glapi_x86.S - -OBJECTS = $(C_SOURCES:.c=.o) \ - $(ASM_SOURCES:.S=.o) - -INCLUDES = -I. $(INCLUDE_DIRS) - -INCLUDE_DIRS = \ - -I$(TOP)/include \ - -I$(TOP)/src/mesa \ - -I$(TOP)/src/mesa/main \ - -I$(TOP)/src/mesa/glapi \ - -I$(TOP)/src/mesa/math \ - -I$(TOP)/src/mesa/transform \ - -I$(TOP)/src/mesa/swrast \ - -I$(TOP)/src/mesa/swrast_setup \ - -I$(TOP)/src/mesa/drivers/dri/common \ - -I$(DRM_SOURCE_PATH)/libdrm \ - -I$(DRM_SOURCE_PATH)/shared - - -##### RULES ##### - -.c.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ - -.S.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ - - -##### TARGETS ##### - -default: depend $(LIB_DIR)/$(GL_LIB_NAME) - - -# Make libGL -$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile - $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \ - -major 1 -minor 2 $(MKLIB_OPTIONS) \ - -install $(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS) - rm -f $(LIB_DIR)/miniglx.conf - install example.miniglx.conf $(LIB_DIR)/miniglx.conf - - -drmtest: xf86drm.o drmtest.o - rm -f drmtest && $(CC) -o drmtest xf86drm.o drmtest.o - - -depend: $(C_SOURCES) $(ASM_SOURCES) - touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES) \ - > /dev/null - - -# Emacs tags -tags: - etags `find . -name \*.[ch]` `find ../include` - - -# Remove .o and backup files -clean: - -rm -f drmtest $(LIB_DIR)/libGL.so* - -rm -f *.o *~ - -rm -f depend - -include depend diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/NOTES b/nx-X11/extras/Mesa_6.4.2/src/glx/mini/NOTES deleted file mode 100644 index 1774107d63..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/NOTES +++ /dev/null @@ -1,115 +0,0 @@ - - -Getting MiniGLX up and running ------------------------------- - -It's necessary to do a bit of work to set up an environment to run miniglx. - -For the radeon driver, it's necessary to get the right set of kernel -modules installed before attempting to run any programs: - - rmmod radeon agpgart; - insmod agpgart; - insmod $(MESA)/src/kernel/radeonfb/radeonfb.o; - insmod $(MESA)/src/kernel/radeon/radeon.o; - -For all drivers, its necessary to reach the compiled libraries, and -tell MiniGLX where to find it's configuration file: - - export LD_LIBRARY_PATH=$(MESA)/lib; - export MINIGLX_CONF=$(MESA)/lib/miniglx.conf - ------------------------------------------------------------- - -MiniGLX Example Programs ------------------------- - -The following programs will work with miniglx: - - $(MESA)/tests/miniglx - $(MESA)/xdemos/glxgears - -Thanks to the miniglut stub library, most of the mesa glut demos will -work. In particular, the following have been tested. (Note there is -no keyboard or mouse interaction with these demos). - - $(MESA)/demos/gears - $(MESA)/demos/geartrain - $(MESA)/demos/morph3d - $(MESA)/demos/isosurf - $(MESA)/demos/texobj - $(MESA)/demos/texcyl - $(MESA)/demos/gloss - $(MESA)/demos/fire - $(MESA)/demos/tunnel - $(MESA)/demos/teapot - $(MESA)/samples/prim - $(MESA)/samples/olympic - $(MESA)/samples/star - $(MESA)/samples/wave - ...etc - -In fact most of the glut demos seem to work within the constraints of -having no keyboard/mouse interactivity. Furthermore, the use of the -glut wrapper means that these programs don't require recompilation to -run under MiniGLX -- the same binary works with both regular GLX and -MiniGLX. - - ------------------------------------------------------------- - -Porting GLX apps to MiniGLX ---------------------------- - -A quick list of issues encountered in porting existing GLX apps to -MiniGLX. Listed in no particular order. - -1) No input events - -MiniGLX doesn't provide an input layer, so any X11 input event -handling in the existing app will have to be redone for whatever -input devices exist on the target. - -2) No configuration, expose events - -Many GLX and Xlib programs wait on an event to ensure the window has -become visible after being mapped. MiniGLX provides no equivalent -facility. - -3) Different headers - -X11/Xlib.h, GL/GLX.h, etc must not be used if the program is being -compiled against MiniGLX. - -The equivalent header is GL/MiniGLX.h. - -4) Different library - -It may be necessary to link directly against the minGLX libGL.so. - -5) Reduced number of Xlib and GLX entrypoints. - -By definition (MiniGLX is a subset of GLX), many Xlib and GLX -entrypoints, structures and macros are not present in MiniGLX. It -will be necessary to find and eliminate all references to -non-supported entrypoints. - - ---------------------------------------------------------------- - -Bugs in radeonfb.o -- the radeon framebuffer driver. ----------------------------------------------------- - -Several bugs have been found in the radeonfb.o framebuffer driver. -Most of these are resolved in the version included in the MiniGLX -sources, but some remain: - -1) Occasionally, after entering graphics mode, colors appear 'shifted' -or 'translated', particularly in higher resolution modes. This is -definitely a bug in radeonfb.o as this can be provoked even when using -the software dri driver (fb_dri.so). Importance: High. Workaround: -Use 800x600 as it seems to be less frequent at this resolution, -otherwise, restart the application. - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/dispatch.c b/nx-X11/extras/Mesa_6.4.2/src/glx/mini/dispatch.c deleted file mode 100644 index ac24df9e7d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/dispatch.c +++ /dev/null @@ -1,64 +0,0 @@ -/** - * \file miniglx/dispatch.c - * - * \brief C-based dispatch of the OpenGL entry points (glAccum(), glBegin(), - * etc). - * - * \author Brian Paul - * - * \note This code IS NOT USED if we're compiling on an x86 system and using - * the glapi_x86.S assembly code. - */ - -/* - * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "glheader.h" -#include "glapi.h" -#include "glapitable.h" - - -#if !(defined(USE_X86_ASM) || defined(USE_SPARC_ASM)) - -#define KEYWORD1 - -#define KEYWORD2 - -#define NAME(func) gl##func - -#define DISPATCH(func, args, msg) \ - const struct _glapi_table *dispatch; \ - dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\ - (dispatch->func) args - -#define RETURN_DISPATCH(func, args, msg) \ - const struct _glapi_table *dispatch; \ - dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\ - return (dispatch->func) args - - -#include "glapitemp.h" - -#endif /* USE_X86_ASM */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/driver.h b/nx-X11/extras/Mesa_6.4.2/src/glx/mini/driver.h deleted file mode 100644 index 27402641b7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/driver.h +++ /dev/null @@ -1,169 +0,0 @@ -/** - * \file driver.h - * \brief DRI utility functions definitions. - * - * This module acts as glue between GLX and the actual hardware driver. A DRI - * driver doesn't really \e have to use any of this - it's optional. But, some - * useful stuff is done here that otherwise would have to be duplicated in most - * drivers. - * - * Basically, these utility functions take care of some of the dirty details of - * screen initialization, context creation, context binding, DRM setup, etc. - * - * These functions are compiled into each DRI driver so libGL.so knows nothing - * about them. - * - * Look for more comments in the dri_util.c file. - * - * \author Kevin E. Martin - * \author Brian Paul - */ - -/* - * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef _driver_H_ -#define _driver_H_ - -#define CAPI /* XXX this should be globally defined somewhere */ - -#include "GL/gl.h" -#include "GL/internal/glcore.h" - -#include "drm.h" -#include "drm_sarea.h" - -/** - * \brief DRIDriverContext type. - */ -typedef struct DRIDriverContextRec { - const char *pciBusID; - int pciBus; - int pciDevice; - int pciFunc; - int chipset; - int bpp; - int cpp; - int agpmode; - int isPCI; - - int colorTiling; /**< \brief color tiling is enabled */ - - unsigned long FBStart; /**< \brief physical address of the framebuffer */ - unsigned long MMIOStart; /**< \brief physical address of the MMIO region */ - - int FBSize; /**< \brief size of the mmap'd framebuffer in bytes */ - int MMIOSize; /**< \brief size of the mmap'd MMIO region in bytes */ - - void *FBAddress; /**< \brief start of the mmap'd framebuffer */ - void *MMIOAddress; /**< \brief start of the mmap'd MMIO region */ - - /** - * \brief Client configuration details - * - * These are computed on the server and sent to clients as part of - * the initial handshaking. - */ - struct { - unsigned long hSAREA; - int SAREASize; - unsigned long hFrameBuffer; - int fbOrigin; - int fbSize; - int fbStride; - int virtualWidth; - int virtualHeight; - } shared; - - /** - * \name From DRIInfoRec - */ - /*@{*/ - int drmFD; /**< \brief DRM device file descriptor */ - drm_sarea_t *pSAREA; - unsigned int serverContext; /**< \brief DRM context only active on server */ - /*@}*/ - - - /** - * \name Driver private - * - * Populated by __driInitFBDev() - */ - /*@{*/ - void *driverPrivate; - void *driverClientMsg; - int driverClientMsgSize; - /*@}*/ -} DRIDriverContext; - -/** - * \brief Interface to the DRI driver. - * - * This structure is retrieved from the loadable driver by the \e - * __driDriver symbol to access the Mini GLX specific hardware - * initialization and take down routines. - */ -typedef struct DRIDriverRec { - /** - * \brief Validate the framebuffer device mode - */ - int (*validateMode)( const DRIDriverContext *context ); - - /** - * \brief Examine mode returned by fbdev (may differ from the one - * requested), restore any hw regs clobbered by fbdev. - */ - int (*postValidateMode)( const DRIDriverContext *context ); - - /** - * \brief Initialize the framebuffer device. - */ - int (*initFBDev)( DRIDriverContext *context ); - - /** - * \brief Halt the framebuffer device. - */ - void (*haltFBDev)( DRIDriverContext *context ); - - - /** - * \brief Idle and shutdown hardware in preparation for a VT switch. - */ - int (*shutdownHardware)( const DRIDriverContext *context ); - - /** - * \brief Restore hardware state after regaining the VT. - */ - int (*restoreHardware)( const DRIDriverContext *context ); - - /** - * \brief Notify hardware driver of gain/loose focus. May be zero - * as this is of limited utility for most drivers. - */ - void (*notifyFocus)( int have_focus ); -} DRIDriver; - -#endif /* _driver_H_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/example.miniglx.conf b/nx-X11/extras/Mesa_6.4.2/src/glx/mini/example.miniglx.conf deleted file mode 100644 index 62dd4f65ec..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/example.miniglx.conf +++ /dev/null @@ -1,36 +0,0 @@ -# Example miniglx configuration file (/etc/miniglx.conf) -# - -# Framebuffer device to open: Might need to change this on dual-head -# systems. -fbdevDevice=/dev/fb0 - -# Which driver? -# radeon_dri.so -- HW accelerated radeon driver -# fb_dri.so -- Software rasterizer -clientDriverName=radeon_dri.so - -# The pci bus id of the video card. Find this with scanpci, lspci or -# look in /proc/pci. -pciBusID=PCI:1:0:0 - -# Is the card PCI or AGP ? -isPCI=0 - -# Virtual screen dimensions. Can reduce this to save videocard memory -# at the expense of maximum window size available. -virtualWidth=1280 -virtualHeight=1024 - -# Screen depth. Only 16 & 32bpp supported. -bpp=32 - -# AGP Mode. Not all cards supported (1, 2 or 4) -agpmode=1 - -# Rotated monitor? -- NOTE: only works with subsetted radeon driver! -rotateMode=0 - -# Do we want to use color tiling ? -colorTiling=0 - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/miniglx.c b/nx-X11/extras/Mesa_6.4.2/src/glx/mini/miniglx.c deleted file mode 100644 index c1c4446ab7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/miniglx.c +++ /dev/null @@ -1,2563 +0,0 @@ -/** - * \file miniglx.c - * \brief Mini GLX interface functions. - * \author Brian Paul - * - * The Mini GLX interface is a subset of the GLX interface, plus a - * minimal set of Xlib functions. - */ - -/* - * Mesa 3-D graphics library - * Version: 6.0.1 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/** - * \mainpage Mini GLX - * - * \section miniglxIntro Introduction - * - * The Mini GLX interface facilitates OpenGL rendering on embedded devices. The - * interface is a subset of the GLX interface, plus a minimal set of Xlib-like - * functions. - * - * Programs written to the Mini GLX specification should run unchanged - * on systems with the X Window System and the GLX extension (after - * recompilation). The intention is to allow flexibility for - * prototyping and testing. - * - * The files in the src/miniglx/ directory are compiled to build the - * libGL.so library. This is the library which applications link with. - * libGL.so in turn, loads the hardware-specific device driver. - * - * - * \section miniglxDoxygen About Doxygen - * - * For a list of all files, select File List. Choose a file from - * the list for a list of all functions in the file. - * - * For a list of all functions, types, constants, etc. - * select File Members. - * - * - * \section miniglxReferences References - * - * - Mini GLX Specification, - * Tungsten Graphics, Inc. - * - OpenGL Graphics with the X Window System, Silicon Graphics, Inc., - * ftp://ftp.sgi.com/opengl/doc/opengl1.2/glx1.3.ps - * - Xlib - C Language X Interface, X Consortium Standard, X Version 11, - * Release 6.4, ftp://ftp.x.org/pub/R6.4/xc/doc/hardcopy/X11/xlib.PS.gz - * - XFree86 Man pages, The XFree86 Project, Inc., - * http://www.xfree86.org/current/manindex3.html - * - */ - -/** - * \page datatypes Notes on the XVisualInfo, Visual, and __GLXvisualConfig data types - * - * -# X (unfortunately) has two (or three) data types which - * describe visuals. Ideally, there would just be one. - * -# We need the #__GLXvisualConfig type to augment #XVisualInfo and #Visual - * because we need to describe the GLX-specific attributes of visuals. - * -# In this interface there is a one-to-one-to-one correspondence between - * the three types and they're all interconnected. - * -# The #XVisualInfo type has a pointer to a #Visual. The #Visual structure - * (aka MiniGLXVisualRec) has a pointer to the #__GLXvisualConfig. The - * #Visual structure also has a pointer pointing back to the #XVisualInfo. - * -# The #XVisualInfo structure is the only one who's contents are public. - * -# The glXChooseVisual() and XGetVisualInfo() are the only functions that - * return #XVisualInfo structures. They can be freed with XFree(), though - * there is a small memory leak. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* for gettimeofday */ -#include -#include - -#include "miniglxP.h" -#include "dri_util.h" - -#include "imports.h" -#include "glcontextmodes.h" -#include "glapi.h" - - -static GLboolean __glXCreateContextWithConfig(__DRInativeDisplay *dpy, - int screen, int fbconfigID, void *contextID, - drm_context_t *hHWContext); - -static GLboolean __glXGetDrawableInfo(__DRInativeDisplay *dpy, int scrn, - __DRIid draw, unsigned int * index, unsigned int * stamp, - int * x, int * y, int * width, int * height, - int * numClipRects, drm_clip_rect_t ** pClipRects, - int * backX, int * backY, - int * numBackClipRects, drm_clip_rect_t ** pBackClipRects); - -static __DRIscreen * __glXFindDRIScreen(__DRInativeDisplay *dpy, int scrn); - -static GLboolean __glXWindowExists(__DRInativeDisplay *dpy, __DRIid draw); - -static int __glXGetUST( int64_t * ust ); - -static GLboolean __glXGetMscRate(__DRInativeDisplay * dpy, __DRIid drawable, - int32_t * numerator, int32_t * denominator); - -static GLboolean xf86DRI_DestroyContext(__DRInativeDisplay *dpy, int screen, - __DRIid context_id ); - -static GLboolean xf86DRI_CreateDrawable(__DRInativeDisplay *dpy, int screen, - __DRIid drawable, drm_drawable_t *hHWDrawable ); - -static GLboolean xf86DRI_DestroyDrawable(__DRInativeDisplay *dpy, int screen, - __DRIid drawable); - - -/** Wrapper around either malloc() */ -void * -_mesa_malloc(size_t bytes) -{ - return malloc(bytes); -} - -/** Wrapper around either calloc() */ -void * -_mesa_calloc(size_t bytes) -{ - return calloc(1, bytes); -} - -/** Wrapper around either free() */ -void -_mesa_free(void *ptr) -{ - free(ptr); -} - - -/** - * \brief Current GLX context. - * - * \sa glXGetCurrentContext(). - */ -static GLXContext CurrentContext = NULL; - - - -static Display *SignalDisplay = 0; - -static void SwitchVT(int sig) -{ - fprintf(stderr, "SwitchVT %d dpy %p\n", sig, SignalDisplay); - - if (SignalDisplay) { - SignalDisplay->vtSignalFlag = 1; - switch( sig ) - { - case SIGUSR1: /* vt has been released */ - SignalDisplay->haveVT = 0; - break; - case SIGUSR2: /* vt has been acquired */ - SignalDisplay->haveVT = 1; - break; - } - } -} - -/**********************************************************************/ -/** \name Framebuffer device functions */ -/**********************************************************************/ -/*@{*/ - -/** - * \brief Do the first part of setting up the framebuffer device. - * - * \param dpy the display handle. - * \param use_vt use a VT for display or not - * - * \return GL_TRUE on success, or GL_FALSE on failure. - * - * \sa This is called during XOpenDisplay(). - * - * \internal - * Gets the VT number, opens the respective console TTY device. Saves its state - * to restore when exiting and goes into graphics mode. - * - * Opens the framebuffer device and make a copy of the original variable screen - * information and gets the fixed screen information. Maps the framebuffer and - * MMIO region into the process address space. - */ -static GLboolean -OpenFBDev( Display *dpy, int use_vt ) -{ - char ttystr[1000]; - int fd, vtnumber, ttyfd; - - assert(dpy); - - if (geteuid()) { - fprintf(stderr, "error: you need to be root\n"); - return GL_FALSE; - } - - if (use_vt) { - - /* open /dev/tty0 and get the VT number */ - if ((fd = open("/dev/tty0", O_WRONLY, 0)) < 0) { - fprintf(stderr, "error opening /dev/tty0\n"); - return GL_FALSE; - } - if (ioctl(fd, VT_OPENQRY, &vtnumber) < 0 || vtnumber < 0) { - fprintf(stderr, "error: couldn't get a free vt\n"); - return GL_FALSE; - } - - fprintf(stderr, "*** got vt nr: %d\n", vtnumber); - close(fd); - - /* open the console tty */ - sprintf(ttystr, "/dev/tty%d", vtnumber); /* /dev/tty1-64 */ - dpy->ConsoleFD = open(ttystr, O_RDWR | O_NDELAY, 0); - if (dpy->ConsoleFD < 0) { - fprintf(stderr, "error couldn't open console fd\n"); - return GL_FALSE; - } - - /* save current vt number */ - { - struct vt_stat vts; - if (ioctl(dpy->ConsoleFD, VT_GETSTATE, &vts) == 0) - dpy->OriginalVT = vts.v_active; - } - - /* disconnect from controlling tty */ - ttyfd = open("/dev/tty", O_RDWR); - if (ttyfd >= 0) { - ioctl(ttyfd, TIOCNOTTY, 0); - close(ttyfd); - } - - /* some magic to restore the vt when we exit */ - { - struct vt_mode vt; - struct sigaction sig_tty; - - /* Set-up tty signal handler to catch the signal we request below */ - SignalDisplay = dpy; - memset( &sig_tty, 0, sizeof( sig_tty ) ); - sig_tty.sa_handler = SwitchVT; - sigemptyset( &sig_tty.sa_mask ); - if( sigaction( SIGUSR1, &sig_tty, &dpy->OrigSigUsr1 ) || - sigaction( SIGUSR2, &sig_tty, &dpy->OrigSigUsr2 ) ) - { - fprintf(stderr, "error: can't set up signal handler (%s)", - strerror(errno) ); - return GL_FALSE; - } - - - - vt.mode = VT_PROCESS; - vt.waitv = 0; - vt.relsig = SIGUSR1; - vt.acqsig = SIGUSR2; - if (ioctl(dpy->ConsoleFD, VT_SETMODE, &vt) < 0) { - fprintf(stderr, "error: ioctl(VT_SETMODE) failed: %s\n", - strerror(errno)); - return GL_FALSE; - } - - - if (ioctl(dpy->ConsoleFD, VT_ACTIVATE, vtnumber) != 0) - printf("ioctl VT_ACTIVATE: %s\n", strerror(errno)); - if (ioctl(dpy->ConsoleFD, VT_WAITACTIVE, vtnumber) != 0) - printf("ioctl VT_WAITACTIVE: %s\n", strerror(errno)); - - if (ioctl(dpy->ConsoleFD, VT_GETMODE, &vt) < 0) { - fprintf(stderr, "error: ioctl VT_GETMODE: %s\n", strerror(errno)); - return GL_FALSE; - } - - - - } - - /* go into graphics mode */ - if (ioctl(dpy->ConsoleFD, KDSETMODE, KD_GRAPHICS) < 0) { - fprintf(stderr, "error: ioctl(KDSETMODE, KD_GRAPHICS) failed: %s\n", - strerror(errno)); - return GL_FALSE; - } - } - - /* open the framebuffer device */ - dpy->FrameBufferFD = open(dpy->fbdevDevice, O_RDWR); - if (dpy->FrameBufferFD < 0) { - fprintf(stderr, "Error opening /dev/fb0: %s\n", strerror(errno)); - return GL_FALSE; - } - - /* get the original variable screen info */ - if (ioctl(dpy->FrameBufferFD, FBIOGET_VSCREENINFO, &dpy->OrigVarInfo)) { - fprintf(stderr, "error: ioctl(FBIOGET_VSCREENINFO) failed: %s\n", - strerror(errno)); - return GL_FALSE; - } - - /* make copy */ - dpy->VarInfo = dpy->OrigVarInfo; /* structure copy */ - - /* Turn off hw accels (otherwise mmap of mmio region will be - * refused) - */ - dpy->VarInfo.accel_flags = 0; - if (ioctl(dpy->FrameBufferFD, FBIOPUT_VSCREENINFO, &dpy->VarInfo)) { - fprintf(stderr, "error: ioctl(FBIOPUT_VSCREENINFO) failed: %s\n", - strerror(errno)); - return GL_FALSE; - } - - - - /* Get the fixed screen info */ - if (ioctl(dpy->FrameBufferFD, FBIOGET_FSCREENINFO, &dpy->FixedInfo)) { - fprintf(stderr, "error: ioctl(FBIOGET_FSCREENINFO) failed: %s\n", - strerror(errno)); - return GL_FALSE; - } - - - - /* mmap the framebuffer into our address space */ - dpy->driverContext.FBStart = dpy->FixedInfo.smem_start; - dpy->driverContext.FBSize = dpy->FixedInfo.smem_len; - dpy->driverContext.shared.fbSize = dpy->FixedInfo.smem_len; - dpy->driverContext.FBAddress = (caddr_t) mmap(0, /* start */ - dpy->driverContext.shared.fbSize, /* bytes */ - PROT_READ | PROT_WRITE, /* prot */ - MAP_SHARED, /* flags */ - dpy->FrameBufferFD, /* fd */ - 0 /* offset */); - if (dpy->driverContext.FBAddress == (caddr_t) - 1) { - fprintf(stderr, "error: unable to mmap framebuffer: %s\n", - strerror(errno)); - return GL_FALSE; - } - - /* mmap the MMIO region into our address space */ - dpy->driverContext.MMIOStart = dpy->FixedInfo.mmio_start; - dpy->driverContext.MMIOSize = dpy->FixedInfo.mmio_len; - dpy->driverContext.MMIOAddress = (caddr_t) mmap(0, /* start */ - dpy->driverContext.MMIOSize, /* bytes */ - PROT_READ | PROT_WRITE, /* prot */ - MAP_SHARED, /* flags */ - dpy->FrameBufferFD, /* fd */ - dpy->FixedInfo.smem_len /* offset */); - if (dpy->driverContext.MMIOAddress == (caddr_t) - 1) { - fprintf(stderr, "error: unable to mmap mmio region: %s\n", - strerror(errno)); - return GL_FALSE; - } - - fprintf(stderr, "got MMIOAddress %p offset %d\n", - dpy->driverContext.MMIOAddress, - dpy->FixedInfo.smem_len); - - return GL_TRUE; -} - - - - -/** - * \brief Setup up the desired framebuffer device mode. - * - * \param dpy the display handle. - * - * \return GL_TRUE on success, or GL_FALSE on failure. - * - * \sa This is called during __miniglx_StartServer(). - * - * \internal - * - * Bumps the size of the window the the next supported mode. Sets the - * variable screen information according to the desired mode and asks - * the driver to validate the mode. Certifies that a DirectColor or - * TrueColor visual is used from the updated fixed screen information. - * In the case of DirectColor visuals, sets up an 'identity' colormap to - * mimic a TrueColor visual. - * - * Calls the driver hooks 'ValidateMode' and 'PostValidateMode' to - * allow the driver to make modifications to the chosen mode according - * to hardware constraints, or to save and restore videocard registers - * that may be clobbered by the fbdev driver. - * - * \todo Timings are hard-coded in the source for a set of supported modes. - */ -static GLboolean -SetupFBDev( Display *dpy ) -{ - int width, height; - - assert(dpy); - - width = dpy->driverContext.shared.virtualWidth; - height = dpy->driverContext.shared.virtualHeight; - - if (width==832) - width=800; - /* Bump size up to next supported mode. - */ - if (width <= 720 && height <= 480) { - width = 720; height = 480; - } - else if (width <= 960 && height <= 540) { - width = 960; height = 540; - } - else if (width <= 800 && height <= 600) { - width = 800; height = 600; - } - else if (width <= 1024 && height <= 768) { - width = 1024; height = 768; - } - else if (width <= 768 && height <= 1024) { - width = 768; height = 1024; - } - else if (width <= 1280 && height <= 1024) { - width = 1280; height = 1024; - } - - - dpy->driverContext.shared.fbStride = width * (dpy->driverContext.bpp / 8); - - /* set the depth, resolution, etc */ - dpy->VarInfo = dpy->OrigVarInfo; - dpy->VarInfo.bits_per_pixel = dpy->driverContext.bpp; - dpy->VarInfo.xres_virtual = dpy->driverContext.shared.virtualWidth; - dpy->VarInfo.yres_virtual = dpy->driverContext.shared.virtualHeight; - dpy->VarInfo.xres = width; - dpy->VarInfo.yres = height; - dpy->VarInfo.xoffset = 0; - dpy->VarInfo.yoffset = 0; - dpy->VarInfo.nonstd = 0; - dpy->VarInfo.vmode &= ~FB_VMODE_YWRAP; /* turn off scrolling */ - - if (dpy->VarInfo.bits_per_pixel == 32) { - dpy->VarInfo.red.offset = 16; - dpy->VarInfo.green.offset = 8; - dpy->VarInfo.blue.offset = 0; - dpy->VarInfo.transp.offset = 24; - dpy->VarInfo.red.length = 8; - dpy->VarInfo.green.length = 8; - dpy->VarInfo.blue.length = 8; - dpy->VarInfo.transp.length = 8; - } - else if (dpy->VarInfo.bits_per_pixel == 16) { - dpy->VarInfo.red.offset = 11; - dpy->VarInfo.green.offset = 5; - dpy->VarInfo.blue.offset = 0; - dpy->VarInfo.red.length = 5; - dpy->VarInfo.green.length = 6; - dpy->VarInfo.blue.length = 5; - dpy->VarInfo.transp.offset = 0; - dpy->VarInfo.transp.length = 0; - } - else { - fprintf(stderr, "Only 32bpp and 16bpp modes supported at the moment\n"); - return 0; - } - - if (!dpy->driver->validateMode( &dpy->driverContext )) { - fprintf(stderr, "Driver validateMode() failed\n"); - return 0; - } - - /* These should be calculated with the gtf.c program, and then we could - remove all this... AlanH. */ - if (dpy->VarInfo.xres == 1280 && - dpy->VarInfo.yres == 1024) { - /* timing values taken from /etc/fb.modes (1280x1024 @ 75Hz) */ - dpy->VarInfo.pixclock = 7408; - dpy->VarInfo.left_margin = 248; - dpy->VarInfo.right_margin = 16; - dpy->VarInfo.upper_margin = 38; - dpy->VarInfo.lower_margin = 1; - dpy->VarInfo.hsync_len = 144; - dpy->VarInfo.vsync_len = 3; - } - else if (dpy->VarInfo.xres == 1024 && - dpy->VarInfo.yres == 768) { - /* timing values taken from /etc/fb.modes (1024x768 @ 75Hz) */ - dpy->VarInfo.pixclock = 12699; - dpy->VarInfo.left_margin = 176; - dpy->VarInfo.right_margin = 16; - dpy->VarInfo.upper_margin = 28; - dpy->VarInfo.lower_margin = 1; - dpy->VarInfo.hsync_len = 96; - dpy->VarInfo.vsync_len = 3; - } - else if (dpy->VarInfo.xres == 800 && - dpy->VarInfo.yres == 600) { - /* timing values taken from /etc/fb.modes (800x600 @ 75Hz) */ - dpy->VarInfo.pixclock = 27778; - dpy->VarInfo.left_margin = 128; - dpy->VarInfo.right_margin = 24; - dpy->VarInfo.upper_margin = 22; - dpy->VarInfo.lower_margin = 1; - dpy->VarInfo.hsync_len = 72; - dpy->VarInfo.vsync_len = 2; - } - else if (dpy->VarInfo.xres == 720 && - dpy->VarInfo.yres == 480) { - dpy->VarInfo.pixclock = 37202; - dpy->VarInfo.left_margin = 88; - dpy->VarInfo.right_margin = 16; - dpy->VarInfo.upper_margin = 14; - dpy->VarInfo.lower_margin = 1; - dpy->VarInfo.hsync_len = 72; - dpy->VarInfo.vsync_len = 3; - } - else if (dpy->VarInfo.xres == 960 && - dpy->VarInfo.yres == 540) { - dpy->VarInfo.pixclock = 24273; - dpy->VarInfo.left_margin = 128; - dpy->VarInfo.right_margin = 32; - dpy->VarInfo.upper_margin = 16; - dpy->VarInfo.lower_margin = 1; - dpy->VarInfo.hsync_len = 96; - dpy->VarInfo.vsync_len = 3; - } - else if (dpy->VarInfo.xres == 768 && - dpy->VarInfo.yres == 1024) { - /* timing values for 768x1024 @ 75Hz */ - dpy->VarInfo.pixclock = 11993; - dpy->VarInfo.left_margin = 136; - dpy->VarInfo.right_margin = 32; - dpy->VarInfo.upper_margin = 41; - dpy->VarInfo.lower_margin = 1; - dpy->VarInfo.hsync_len = 80; - dpy->VarInfo.vsync_len = 3; - } - else { - /* XXX need timings for other screen sizes */ - fprintf(stderr, "XXXX screen size %d x %d not supported at this time!\n", - dpy->VarInfo.xres, dpy->VarInfo.yres); - return GL_FALSE; - } - - fprintf(stderr, "[miniglx] Setting mode: visible %dx%d virtual %dx%dx%d\n", - dpy->VarInfo.xres, dpy->VarInfo.yres, - dpy->VarInfo.xres_virtual, dpy->VarInfo.yres_virtual, - dpy->VarInfo.bits_per_pixel); - - /* set variable screen info */ - if (ioctl(dpy->FrameBufferFD, FBIOPUT_VSCREENINFO, &dpy->VarInfo)) { - fprintf(stderr, "error: ioctl(FBIOPUT_VSCREENINFO) failed: %s\n", - strerror(errno)); - return GL_FALSE; - } - - /* get the variable screen info, in case it has been modified */ - if (ioctl(dpy->FrameBufferFD, FBIOGET_VSCREENINFO, &dpy->VarInfo)) { - fprintf(stderr, "error: ioctl(FBIOGET_VSCREENINFO) failed: %s\n", - strerror(errno)); - return GL_FALSE; - } - - - fprintf(stderr, "[miniglx] Readback mode: visible %dx%d virtual %dx%dx%d\n", - dpy->VarInfo.xres, dpy->VarInfo.yres, - dpy->VarInfo.xres_virtual, dpy->VarInfo.yres_virtual, - dpy->VarInfo.bits_per_pixel); - - /* Get the fixed screen info */ - if (ioctl(dpy->FrameBufferFD, FBIOGET_FSCREENINFO, &dpy->FixedInfo)) { - fprintf(stderr, "error: ioctl(FBIOGET_FSCREENINFO) failed: %s\n", - strerror(errno)); - return GL_FALSE; - } - - if (dpy->FixedInfo.visual != FB_VISUAL_TRUECOLOR && - dpy->FixedInfo.visual != FB_VISUAL_DIRECTCOLOR) { - fprintf(stderr, "non-TRUECOLOR visuals not supported.\n"); - return GL_FALSE; - } - - if (dpy->FixedInfo.visual == FB_VISUAL_DIRECTCOLOR) { - struct fb_cmap cmap; - unsigned short red[256], green[256], blue[256]; - int rcols = 1 << dpy->VarInfo.red.length; - int gcols = 1 << dpy->VarInfo.green.length; - int bcols = 1 << dpy->VarInfo.blue.length; - int i; - - cmap.start = 0; - cmap.len = gcols; - cmap.red = red; - cmap.green = green; - cmap.blue = blue; - cmap.transp = NULL; - - for (i = 0; i < rcols ; i++) - red[i] = (65536/(rcols-1)) * i; - - for (i = 0; i < gcols ; i++) - green[i] = (65536/(gcols-1)) * i; - - for (i = 0; i < bcols ; i++) - blue[i] = (65536/(bcols-1)) * i; - - if (ioctl(dpy->FrameBufferFD, FBIOPUTCMAP, (void *) &cmap) < 0) { - fprintf(stderr, "ioctl(FBIOPUTCMAP) failed [%d]\n", i); - exit(1); - } - } - - /* May need to restore regs fbdev has clobbered: - */ - if (!dpy->driver->postValidateMode( &dpy->driverContext )) { - fprintf(stderr, "Driver postValidateMode() failed\n"); - return 0; - } - - return GL_TRUE; -} - - -/** - * \brief Restore the framebuffer device to state it was in before we started - * - * Undoes the work done by SetupFBDev(). - * - * \param dpy the display handle. - * - * \return GL_TRUE on success, or GL_FALSE on failure. - * - * \sa Called from XDestroyWindow(). - * - * \internal - * Restores the original variable screen info. - */ -static GLboolean -RestoreFBDev( Display *dpy ) -{ - /* restore original variable screen info */ - if (ioctl(dpy->FrameBufferFD, FBIOPUT_VSCREENINFO, &dpy->OrigVarInfo)) { - fprintf(stderr, "ioctl(FBIOPUT_VSCREENINFO failed): %s\n", - strerror(errno)); - return GL_FALSE; - } - dpy->VarInfo = dpy->OrigVarInfo; - - return GL_TRUE; -} - - -/** - * \brief Close the framebuffer device. - * - * \param dpy the display handle. - * - * \sa Called from XCloseDisplay(). - * - * \internal - * Unmaps the framebuffer and MMIO region. Restores the text mode and the - * original virtual terminal. Closes the console and framebuffer devices. - */ -static void -CloseFBDev( Display *dpy ) -{ - struct vt_mode VT; - - munmap(dpy->driverContext.FBAddress, dpy->driverContext.FBSize); - munmap(dpy->driverContext.MMIOAddress, dpy->driverContext.MMIOSize); - - if (dpy->ConsoleFD) { - /* restore text mode */ - ioctl(dpy->ConsoleFD, KDSETMODE, KD_TEXT); - - /* set vt */ - if (ioctl(dpy->ConsoleFD, VT_GETMODE, &VT) != -1) { - VT.mode = VT_AUTO; - ioctl(dpy->ConsoleFD, VT_SETMODE, &VT); - } - - /* restore original vt */ - if (dpy->OriginalVT >= 0) { - ioctl(dpy->ConsoleFD, VT_ACTIVATE, dpy->OriginalVT); - dpy->OriginalVT = -1; - } - - close(dpy->ConsoleFD); - } - close(dpy->FrameBufferFD); -} - -/*@}*/ - - -/**********************************************************************/ -/** \name Misc functions needed for DRI drivers */ -/**********************************************************************/ -/*@{*/ - -/** - * \brief Find the DRI screen dependent methods associated with the display. - * - * \param dpy a display handle, as returned by XOpenDisplay(). - * \param scrn the screen number. Not referenced. - * - * \returns a pointer to a __DRIscreenRec structure. - * - * \internal - * Returns the MiniGLXDisplayRec::driScreen attribute. - */ -static __DRIscreen * -__glXFindDRIScreen(__DRInativeDisplay *dpy, int scrn) -{ - (void) scrn; - return &((Display*)dpy)->driScreen; -} - -/** - * \brief Validate a drawable. - * - * \param dpy a display handle, as returned by XOpenDisplay(). - * \param draw drawable to validate. - * - * \internal - * Since Mini GLX only supports one window, compares the specified drawable with - * the MiniGLXDisplayRec::TheWindow attribute. - */ -static GLboolean -__glXWindowExists(__DRInativeDisplay *dpy, __DRIid draw) -{ - const Display * const display = (Display*)dpy; - if (display->TheWindow == (Window) draw) - return True; - else - return False; -} - -/** - * \brief Get current thread ID. - * - * \return thread ID. - * - * \internal - * Always returns 0. - */ -/*unsigned long -_glthread_GetID(void) -{ - return 0; -}*/ - -/*@}*/ - - -/** - * \brief Scan Linux /prog/bus/pci/devices file to determine hardware - * chipset based on supplied bus ID. - * - * \return probed chipset (non-zero) on success, zero otherwise. - * - * \internal - */ -static int get_chipset_from_busid( Display *dpy ) -{ - char buf[0x200]; - FILE *file; - const char *fname = "/proc/bus/pci/devices"; - int retval = 0; - - if (!(file = fopen(fname,"r"))) { - fprintf(stderr, "couldn't open %s: %s\n", fname, strerror(errno)); - return 0; - } - - while (fgets(buf, sizeof(buf)-1, file)) { - unsigned int nr, bus, dev, fn, vendor, device, encode; - nr = sscanf(buf, "%04x\t%04x%04x", &encode, - &vendor, &device); - - bus = encode >> 8; - dev = (encode & 0xFF) >> 3; - fn = encode & 0x7; - - if (nr != 3) - break; - - if (bus == dpy->driverContext.pciBus && - dev == dpy->driverContext.pciDevice && - fn == dpy->driverContext.pciFunc) { - retval = device; - break; - } - } - - fclose(file); - - if (retval) - fprintf(stderr, "[miniglx] probed chipset 0x%x\n", retval); - else - fprintf(stderr, "[miniglx] failed to probe chipset\n"); - - return retval; -} - - -/** - * \brief Read settings from a configuration file. - * - * The configuration file is usually "/etc/miniglx.conf", but can be overridden - * with the MINIGLX_CONF environment variable. - * - * The format consists in \code option = value \endcode lines. The option names - * corresponds to the fields in MiniGLXDisplayRec. - * - * \param dpy the display handle as. - * - * \return non-zero on success, zero otherwise. - * - * \internal - * Sets some defaults. Opens and parses the the Mini GLX configuration file and - * fills in the MiniGLXDisplayRec field that corresponds for each option. - */ -static int __read_config_file( Display *dpy ) -{ - FILE *file; - const char *fname; - - /* Fallback/defaults - */ - dpy->fbdevDevice = "/dev/fb0"; - dpy->clientDriverName = "fb_dri.so"; - dpy->driverContext.pciBus = 0; - dpy->driverContext.pciDevice = 0; - dpy->driverContext.pciFunc = 0; - dpy->driverContext.chipset = 0; - dpy->driverContext.pciBusID = 0; - dpy->driverContext.shared.virtualWidth = 1280; - dpy->driverContext.shared.virtualHeight = 1024; - dpy->driverContext.bpp = 32; - dpy->driverContext.cpp = 4; - dpy->rotateMode = 0; - dpy->driverContext.agpmode = 1; - dpy->driverContext.isPCI = 0; - dpy->driverContext.colorTiling = 0; - - fname = getenv("MINIGLX_CONF"); - if (!fname) fname = "/etc/miniglx.conf"; - - file = fopen(fname, "r"); - if (!file) { - fprintf(stderr, "couldn't open config file %s: %s\n", fname, strerror(errno)); - return 0; - } - - - while (!feof(file)) { - char buf[81], *opt = buf, *val, *tmp1, *tmp2; - fgets(buf, sizeof(buf), file); - - /* Parse 'opt = val' -- must be easier ways to do this. - */ - while (isspace(*opt)) opt++; - val = opt; - if (*val == '#') continue; /* comment */ - while (!isspace(*val) && *val != '=' && *val) val++; - tmp1 = val; - while (isspace(*val)) val++; - if (*val != '=') continue; - *tmp1 = 0; - val++; - while (isspace(*val)) val++; - tmp2 = val; - while (!isspace(*tmp2) && *tmp2 != '\n' && *tmp2) tmp2++; - *tmp2 = 0; - - - if (strcmp(opt, "fbdevDevice") == 0) - dpy->fbdevDevice = strdup(val); - else if (strcmp(opt, "clientDriverName") == 0) - dpy->clientDriverName = strdup(val); - else if (strcmp(opt, "rotateMode") == 0) - dpy->rotateMode = atoi(val) ? 1 : 0; - else if (strcmp(opt, "pciBusID") == 0) { - if (sscanf(val, "PCI:%d:%d:%d", - &dpy->driverContext.pciBus, - &dpy->driverContext.pciDevice, - &dpy->driverContext.pciFunc) != 3) { - fprintf(stderr, "malformed bus id: %s\n", val); - continue; - } - dpy->driverContext.pciBusID = strdup(val); - } - else if (strcmp(opt, "chipset") == 0) { - if (sscanf(val, "0x%x", &dpy->driverContext.chipset) != 1) - fprintf(stderr, "malformed chipset: %s\n", opt); - } - else if (strcmp(opt, "virtualWidth") == 0) { - if (sscanf(val, "%d", &dpy->driverContext.shared.virtualWidth) != 1) - fprintf(stderr, "malformed virtualWidth: %s\n", opt); - } - else if (strcmp(opt, "virtualHeight") == 0) { - if (sscanf(val, "%d", &dpy->driverContext.shared.virtualHeight) != 1) - fprintf(stderr, "malformed virutalHeight: %s\n", opt); - } - else if (strcmp(opt, "bpp") == 0) { - if (sscanf(val, "%d", &dpy->driverContext.bpp) != 1) - fprintf(stderr, "malformed bpp: %s\n", opt); - dpy->driverContext.cpp = dpy->driverContext.bpp / 8; - } - else if (strcmp(opt, "agpmode") == 0) { - if (sscanf(val, "%d", &dpy->driverContext.agpmode) != 1) - fprintf(stderr, "malformed agpmode: %s\n", opt); - } - else if (strcmp(opt, "isPCI") == 0) { - dpy->driverContext.isPCI = atoi(val) ? 1 : 0; - } - else if (strcmp(opt, "colorTiling") == 0) { - dpy->driverContext.colorTiling = atoi(val) ? 1 : 0; - } - } - - fclose(file); - - if (dpy->driverContext.chipset == 0 && dpy->driverContext.pciBusID != 0) - dpy->driverContext.chipset = get_chipset_from_busid( dpy ); - - return 1; -} - -/** - * Versioned name of the expected \c __driCreateNewScreen function. - * - * The version of the last incompatible loader/driver inteface change is - * appended to the name of the \c __driCreateNewScreen function. This - * prevents loaders from trying to load drivers that are too old. - * - * \todo - * Create a macro or something so that this is automatically updated. - */ -static const char createNewScreenName[] = "__driCreateNewScreen_20050727"; - - -static int InitDriver( Display *dpy ) -{ - /* - * Begin DRI setup. - * We're kind of combining the per-display and per-screen information - * which was kept separate in XFree86/DRI's libGL. - */ - dpy->dlHandle = dlopen(dpy->clientDriverName, RTLD_NOW | RTLD_GLOBAL); - if (!dpy->dlHandle) { - fprintf(stderr, "Unable to open %s: %s\n", dpy->clientDriverName, - dlerror()); - goto failed; - } - - /* Pull in Mini GLX specific hooks: - */ - dpy->driver = (struct DRIDriverRec *) dlsym(dpy->dlHandle, - "__driDriver"); - if (!dpy->driver) { - fprintf(stderr, "Couldn't find __driDriver in %s\n", - dpy->clientDriverName); - goto failed; - } - - /* Pull in standard DRI client-side driver hooks: - */ - dpy->createNewScreen = (PFNCREATENEWSCREENFUNC) - dlsym(dpy->dlHandle, createNewScreenName); - if (!dpy->createNewScreen) { - fprintf(stderr, "Couldn't find %s in %s\n", createNewScreenName, - dpy->clientDriverName); - goto failed; - } - - return GL_TRUE; - -failed: - if (dpy->dlHandle) { - dlclose(dpy->dlHandle); - dpy->dlHandle = 0; - } - return GL_FALSE; -} - - -/**********************************************************************/ -/** \name Public API functions (Xlib and GLX) */ -/**********************************************************************/ -/*@{*/ - - -/** - * \brief Initialize the graphics system. - * - * \param display_name currently ignored. It is recommended to pass it as NULL. - * \return a pointer to a #Display if the function is able to initialize - * the graphics system, NULL otherwise. - * - * Allocates a MiniGLXDisplayRec structure and fills in with information from a - * configuration file. - * - * Calls OpenFBDev() to open the framebuffer device and calls - * DRIDriverRec::initFBDev to do the client-side initialization on it. - * - * Loads the DRI driver and pulls in Mini GLX specific hooks into a - * DRIDriverRec structure, and the standard DRI \e __driCreateScreen hook. - * Asks the driver for a list of supported visuals. Performs the per-screen - * client-side initialization. Also setups the callbacks in the screen private - * information. - * - * Does the framebuffer device setup. Calls __miniglx_open_connections() to - * serve clients. - */ -Display * -__miniglx_StartServer( const char *display_name ) -{ - Display *dpy; - int use_vt = 0; - - dpy = (Display *)calloc(1, sizeof(Display)); - if (!dpy) - return NULL; - - dpy->IsClient = False; - - if (!__read_config_file( dpy )) { - fprintf(stderr, "Couldn't get configuration details\n"); - free(dpy); - return NULL; - } - - /* Open the fbdev device - */ - if (!OpenFBDev(dpy, use_vt)) { - fprintf(stderr, "OpenFBDev failed\n"); - free(dpy); - return NULL; - } - - if (!InitDriver(dpy)) { - fprintf(stderr, "InitDriver failed\n"); - free(dpy); - return NULL; - } - - /* Perform the initialization normally done in the X server - */ - if (!dpy->driver->initFBDev( &dpy->driverContext )) { - fprintf(stderr, "%s: __driInitFBDev failed\n", __FUNCTION__); - dlclose(dpy->dlHandle); - return GL_FALSE; - } - - /* do fbdev setup - */ - if (!SetupFBDev(dpy)) { - fprintf(stderr, "SetupFBDev failed\n"); - free(dpy); - return NULL; - } - - /* unlock here if not using VT -- JDS */ - if (!use_vt) { - if (dpy->driver->restoreHardware) - dpy->driver->restoreHardware( &dpy->driverContext ); - DRM_UNLOCK( dpy->driverContext.drmFD, - dpy->driverContext.pSAREA, - dpy->driverContext.serverContext ); - dpy->hwActive = 1; - } - - /* Ready for clients: - */ - if (!__miniglx_open_connections(dpy)) { - free(dpy); - return NULL; - } - - return dpy; -} - - -/** - * Implement \c __DRIinterfaceMethods::getProcAddress. - */ -static __DRIfuncPtr get_proc_address( const char * proc_name ) -{ - (void) proc_name; - return NULL; -} - - -/** - * Table of functions exported by the loader to the driver. - */ -static const __DRIinterfaceMethods interface_methods = { - get_proc_address, - - _gl_context_modes_create, - _gl_context_modes_destroy, - - __glXFindDRIScreen, - __glXWindowExists, - - __glXCreateContextWithConfig, - xf86DRI_DestroyContext, - - xf86DRI_CreateDrawable, - xf86DRI_DestroyDrawable, - __glXGetDrawableInfo, - - __glXGetUST, - __glXGetMscRate, -}; - - -static void * -CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc) -{ - void *psp = NULL; - drm_handle_t hSAREA; - drmAddress pSAREA; - const char *BusID; - int i; - __DRIversion ddx_version; - __DRIversion dri_version; - __DRIversion drm_version; - __DRIframebuffer framebuffer; - int fd = -1; - int status; - const char * err_msg; - const char * err_extra; - drmVersionPtr version; - drm_handle_t hFB; - drm_magic_t magic; - - - hSAREA = dpy->driverContext.shared.hSAREA; - BusID = dpy->driverContext.pciBusID; - - fd = drmOpen(NULL, BusID); - - err_msg = "open DRM"; - err_extra = strerror( -fd ); - - if (fd < 0) goto done; - - err_msg = "drmGetMagic"; - err_extra = NULL; - - if (drmGetMagic(fd, &magic)) goto done; - - dpy->authorized = False; - send_char_msg( dpy, 0, _Authorize ); - send_msg( dpy, 0, &magic, sizeof(magic)); - - /* force net buffer flush */ - while (!dpy->authorized) - handle_fd_events( dpy, 0 ); - - version = drmGetVersion(fd); - if (version) { - drm_version.major = version->version_major; - drm_version.minor = version->version_minor; - drm_version.patch = version->version_patchlevel; - drmFreeVersion(version); - } - else { - drm_version.major = -1; - drm_version.minor = -1; - drm_version.patch = -1; - } - - /* - * Get device name (like "tdfx") and the ddx version numbers. - * We'll check the version in each DRI driver's "createScreen" - * function. - */ - ddx_version.major = 4; - ddx_version.minor = 0; - ddx_version.patch = 0; - - /* - * Get the DRI X extension version. - */ - dri_version.major = 4; - dri_version.minor = 0; - dri_version.patch = 0; - - /* - * Get device-specific info. pDevPriv will point to a struct - * (such as DRIRADEONRec in xfree86/driver/ati/radeon_dri.h) - * that has information about the screen size, depth, pitch, - * ancilliary buffers, DRM mmap handles, etc. - */ - hFB = dpy->driverContext.shared.hFrameBuffer; - framebuffer.size = dpy->driverContext.shared.fbSize; - framebuffer.stride = dpy->driverContext.shared.fbStride; - framebuffer.dev_priv_size = dpy->driverContext.driverClientMsgSize; - framebuffer.dev_priv = dpy->driverContext.driverClientMsg; - framebuffer.width = dpy->driverContext.shared.virtualWidth; - framebuffer.height = dpy->driverContext.shared.virtualHeight; - - /* - * Map the framebuffer region. - */ - status = drmMap(fd, hFB, framebuffer.size, - (drmAddressPtr)&framebuffer.base); - - err_msg = "drmMap of framebuffer"; - err_extra = strerror( -status ); - - if ( status != 0 ) goto done; - - /* - * Map the SAREA region. Further mmap regions may be setup in - * each DRI driver's "createScreen" function. - */ - status = drmMap(fd, hSAREA, SAREA_MAX, &pSAREA); - - err_msg = "drmMap of sarea"; - err_extra = strerror( -status ); - - if ( status == 0 ) { - err_msg = "InitDriver"; - err_extra = NULL; - psp = dpy->createNewScreen(dpy, scrn, psc, NULL, - & ddx_version, - & dri_version, - & drm_version, - & framebuffer, - pSAREA, - fd, - 20050727, - & interface_methods, - (__GLcontextModes **) &dpy->driver_modes); - - /* fill in dummy visual ids */ - { - __GLcontextModes *temp; - temp = (__GLcontextModes *)dpy->driver_modes; - i = 1; - while (temp) - { - temp->visualID = i++; - temp=temp->next; - } - } - } - -done: - if ( psp == NULL ) { - if ( pSAREA != MAP_FAILED ) { - (void)drmUnmap(pSAREA, SAREA_MAX); - } - - if ( framebuffer.base != MAP_FAILED ) { - (void)drmUnmap((drmAddress)framebuffer.base, framebuffer.size); - } - - if ( framebuffer.dev_priv != NULL ) { - free(framebuffer.dev_priv); - } - - if ( fd >= 0 ) { - (void)drmClose(fd); - } - - if ( err_extra != NULL ) { - fprintf(stderr, "libGL error: %s failed (%s)\n", err_msg, - err_extra); - } - else { - fprintf(stderr, "libGL error: %s failed\n", err_msg ); - } - - fprintf(stderr, "libGL error: reverting to (slow) indirect rendering\n"); - } - - return psp; -} - -/** - * \brief Initialize the graphics system. - * - * \param display_name currently ignored. It is recommended to pass it as NULL. - * \return a pointer to a #Display if the function is able to initialize - * the graphics system, NULL otherwise. - * - * Allocates a MiniGLXDisplayRec structure and fills in with information from a - * configuration file. - * - * Calls __miniglx_open_connections() to connect to the server. - * - * Loads the DRI driver and pulls in Mini GLX specific hooks into a - * DRIDriverRec structure, and the standard DRI \e __driCreateScreen hook. - * Asks the driver for a list of supported visuals. Performs the per-screen - * client-side initialization. Also setups the callbacks in the screen private - * information. - * - * \todo - * - read config file - * - what about virtualWidth, etc? - * - determine dpy->driverClientMsgSize, - * - allocate dpy->driverClientMsg - */ -Display * -XOpenDisplay( const char *display_name ) -{ - Display *dpy; - - dpy = (Display *)calloc(1, sizeof(Display)); - if (!dpy) - return NULL; - - dpy->IsClient = True; - - /* read config file - */ - if (!__read_config_file( dpy )) { - fprintf(stderr, "Couldn't get configuration details\n"); - free(dpy); - return NULL; - } - - /* Connect to the server and receive driverClientMsg - */ - if (!__miniglx_open_connections(dpy)) { - free(dpy); - return NULL; - } - - /* dlopen the driver .so file - */ - if (!InitDriver(dpy)) { - fprintf(stderr, "InitDriver failed\n"); - free(dpy); - return NULL; - } - - /* Perform the client-side initialization. - * - * Clearly there is a limit of one on the number of windows in - * existence at any time. - * - * Need to shut down DRM and free DRI data in XDestroyWindow(), too. - */ - dpy->driScreen.private = CallCreateNewScreen(dpy, 0, &dpy->driScreen); - if (!dpy->driScreen.private) { - fprintf(stderr, "%s: __driCreateScreen failed\n", __FUNCTION__); - dlclose(dpy->dlHandle); - free(dpy); - return NULL; - } - - /* Anything more to do? - */ - return dpy; -} - - -/** - * \brief Release display resources. - * - * When the application is about to exit, the resources associated with the - * graphics system can be released by calling this function. - * - * \param dpy display handle. It becomes invalid at this point. - * - * Destroys the window if any, and destroys the per-screen - * driver private information. - * Calls __miniglx_close_connections(). - * - * If a server, puts the the framebuffer back into the initial state. - * - * Finally frees the display structure. - */ -void -XCloseDisplay( Display *dpy ) -{ - glXMakeCurrent( dpy, NULL, NULL); - - if (dpy->NumWindows) - XDestroyWindow( dpy, dpy->TheWindow ); - - /* As this is done in XOpenDisplay, need to undo it here: - */ - dpy->driScreen.destroyScreen(dpy, 0, dpy->driScreen.private); - - __miniglx_close_connections( dpy ); - - if (!dpy->IsClient) { - /* put framebuffer back to initial state - */ - (*dpy->driver->haltFBDev)( &dpy->driverContext ); - RestoreFBDev(dpy); - CloseFBDev(dpy); - } - - dlclose(dpy->dlHandle); - free(dpy); -} - - -/** - * \brief Window creation. - * - * \param display a display handle, as returned by XOpenDisplay(). - * \param parent the parent window for the new window. For Mini GLX this should - * be - * \code RootWindow(display, 0) \endcode - * \param x the window abscissa. For Mini GLX, it should be zero. - * \param y the window ordinate. For Mini GLX, it should be zero. - * \param width the window width. For Mini GLX, this specifies the desired - * screen width such as 1024 or 1280. - * \param height the window height. For Mini GLX, this specifies the desired - * screen height such as 768 or 1024. - * \param border_width the border width. For Mini GLX, it should be zero. - * \param depth the window pixel depth. For Mini GLX, this should be the depth - * found in the #XVisualInfo object returned by glXChooseVisual() - * \param winclass the window class. For Mini GLX this value should be - * #InputOutput. - * \param visual the visual type. It should be the visual field of the - * #XVisualInfo object returned by glXChooseVisual(). - * \param valuemask which fields of the XSetWindowAttributes() are to be used. - * For Mini GLX this is typically the bitmask - * \code CWBackPixel | CWBorderPixel | CWColormap \endcode - * \param attributes initial window attributes. The - * XSetWindowAttributes::background_pixel, XSetWindowAttributes::border_pixel - * and XSetWindowAttributes::colormap fields should be set. - * - * \return a window handle if it succeeds or zero if it fails. - * - * \note For Mini GLX, windows are full-screen; they cover the entire frame - * buffer. Also, Mini GLX imposes a limit of one window. A second window - * cannot be created until the first one is destroyed. - * - * This function creates and initializes a ::MiniGLXWindowRec structure after - * ensuring that there is no other window created. Performs the per-drawable - * client-side initialization calling the __DRIscreenRec::createDrawable - * method. - * - */ -Window -XCreateWindow( Display *dpy, Window parent, int x, int y, - unsigned int width, unsigned int height, - unsigned int border_width, int depth, unsigned int winclass, - Visual *visual, unsigned long valuemask, - XSetWindowAttributes *attributes ) -{ - const int empty_attribute_list[1] = { None }; - - Window win; - - /* ignored */ - (void) x; - (void) y; - (void) border_width; - (void) depth; - (void) winclass; - (void) valuemask; - (void) attributes; - - if (!dpy->IsClient) { - fprintf(stderr, "Server process may not create windows (currently)\n"); - return NULL; - } - - if (dpy->NumWindows > 0) - return NULL; /* only allow one window */ - - assert(dpy->TheWindow == NULL); - - win = malloc(sizeof(struct MiniGLXWindowRec)); - if (!win) - return NULL; - - /* In rotated mode, translate incoming x,y,width,height into - * 'normal' coordinates. - */ - if (dpy->rotateMode) { - int tmp; - tmp = width; width = height; height = tmp; - tmp = x; x = y; y = tmp; - } - - /* init other per-window fields */ - win->x = 0; - win->y = 0; - win->w = width; - win->h = height; - win->visual = visual; /* ptr assignment */ - - win->bytesPerPixel = dpy->driverContext.cpp; - win->rowStride = dpy->driverContext.shared.virtualWidth * win->bytesPerPixel; - win->size = win->rowStride * height; - win->frontStart = dpy->driverContext.FBAddress; - win->frontBottom = (GLubyte *) win->frontStart + (height-1) * win->rowStride; - - /* This is incorrect: the hardware driver could put the backbuffer - * just about anywhere. These fields, including the above are - * hardware dependent & don't really belong here. - */ - if (visual->mode->doubleBufferMode) { - win->backStart = (GLubyte *) win->frontStart + - win->rowStride * dpy->driverContext.shared.virtualHeight; - win->backBottom = (GLubyte *) win->backStart - + (height - 1) * win->rowStride; - win->curBottom = win->backBottom; - } - else { - /* single buffered */ - win->backStart = NULL; - win->backBottom = NULL; - win->curBottom = win->frontBottom; - } - - dpy->driScreen.createNewDrawable(dpy, visual->mode, (int) win, - &win->driDrawable, GLX_WINDOW_BIT, empty_attribute_list); - - if (!win->driDrawable.private) { - fprintf(stderr, "%s: dri.createDrawable failed\n", __FUNCTION__); - free(win); - return NULL; - } - - dpy->NumWindows++; - dpy->TheWindow = win; - - return win; -} - - -/** - * \brief Destroy window. - * - * \param display display handle. - * \param w window handle. - * - * This function calls XUnmapWindow() and frees window \p w. - * - * In case of destroying the current buffer first unbinds the GLX context - * by calling glXMakeCurrent() with no drawable. - */ -void -XDestroyWindow( Display *display, Window win ) -{ - if (display && display->IsClient && win) { - /* check if destroying the current buffer */ - Window curDraw = glXGetCurrentDrawable(); - if (win == curDraw) { - glXMakeCurrent( display, NULL, NULL); - } - - XUnmapWindow( display, win ); - - /* Destroy the drawable. */ - win->driDrawable.destroyDrawable(display, win->driDrawable.private); - free(win); - - /* unlink window from display */ - display->NumWindows--; - assert(display->NumWindows == 0); - display->TheWindow = NULL; - } -} - - - - -/** - * \brief Create color map structure. - * - * \param dpy the display handle as returned by XOpenDisplay(). - * \param w the window on whose screen you want to create a color map. This - * parameter is ignored by Mini GLX but should be the value returned by the - * \code RootWindow(display, 0) \endcode macro. - * \param visual a visual type supported on the screen. This parameter is - * ignored by Mini GLX but should be the XVisualInfo::visual returned by - * glXChooseVisual(). - * \param alloc the color map entries to be allocated. This parameter is ignored - * by Mini GLX but should be set to #AllocNone. - * - * \return the color map. - * - * This function is only provided to ease porting. Practically a no-op - - * returns a pointer to a dynamically allocated chunk of memory (one byte). - */ -Colormap -XCreateColormap( Display *dpy, Window w, Visual *visual, int alloc ) -{ - (void) dpy; - (void) w; - (void) visual; - (void) alloc; - return (Colormap) malloc(1); -} - - -/** - * \brief Destroy color map structure. - * - * \param display The display handle as returned by XOpenDisplay(). - * \param colormap the color map to destroy. - * - * This function is only provided to ease porting. Practically a no-op. - * - * Frees the memory pointed by \p colormap. - */ -void -XFreeColormap( Display *display, Colormap colormap ) -{ - (void) display; - (void) colormap; - free(colormap); -} - - -/** - * \brief Free client data. - * - * \param data the data that is to be freed. - * - * Frees the memory pointed by \p data. - */ -void -XFree( void *data ) -{ - free(data); -} - - -/** - * \brief Query available visuals. - * - * \param dpy the display handle, as returned by XOpenDisplay(). - * \param vinfo_mask a bitmask indicating which fields of the \p vinfo_template - * are to be matched. The value must be \c VisualScreenMask. - * \param vinfo_template a template whose fields indicate which visual - * attributes must be matched by the results. The XVisualInfo::screen field of - * this structure must be zero. - * \param nitens_return will hold the number of visuals returned. - * - * \return the address of an array of all available visuals. - * - * An example of using XGetVisualInfo() to get all available visuals follows: - * - * \code - * XVisualInfo vinfo_template, *results; - * int nitens_return; - * Display *dpy = XOpenDisplay(NULL); - * vinfo_template.screen = 0; - * results = XGetVisualInfo(dpy, VisualScreenMask, &vinfo_template, &nitens_return); - * \endcode - * - * Returns the list of all ::XVisualInfo available, one per - * ::__GLcontextMode stored in MiniGLXDisplayRec::modes. - */ -XVisualInfo * -XGetVisualInfo( Display *dpy, long vinfo_mask, XVisualInfo *vinfo_template, int *nitens_return ) -{ - const __GLcontextModes *mode; - XVisualInfo *results; - Visual *visResults; - int i, n=0; - - // ASSERT(vinfo_mask == VisualScreenMask); - ASSERT(vinfo_template.screen == 0); - - if (vinfo_mask == VisualIDMask) - { - for ( mode = dpy->driver_modes ; mode != NULL ; mode= mode->next ) - if (mode->visualID == vinfo_template->visualid) - n=1; - - if (n==0) - return NULL; - - results = (XVisualInfo *)calloc(1, n * sizeof(XVisualInfo)); - if (!results) { - *nitens_return = 0; - return NULL; - } - - visResults = (Visual *)calloc(1, n * sizeof(Visual)); - if (!results) { - free(results); - *nitens_return = 0; - return NULL; - } - - for ( mode = dpy->driver_modes ; mode != NULL ; mode= mode->next ) - if (mode->visualID == vinfo_template->visualid) - { - visResults[0].mode=mode; - visResults[0].visInfo = results; - visResults[0].dpy = dpy; - if (dpy->driverContext.bpp == 32) - visResults[0].pixelFormat = PF_B8G8R8A8; /* XXX: FIX ME */ - else - visResults[0].pixelFormat = PF_B5G6R5; /* XXX: FIX ME */ - - results[0].visual = visResults; - results[0].visualid = mode->visualID; -#if defined(__cplusplus) || defined(c_plusplus) - results[0].c_class = TrueColor; -#else - results[0].class = TrueColor; -#endif - results[0].depth = mode->redBits + - mode->redBits + - mode->redBits + - mode->redBits; - results[0].bits_per_rgb = dpy->driverContext.bpp; - - } - - } - else // if (vinfo_mask == VisualScreenMask) - { - n = 0; - for ( mode = dpy->driver_modes ; mode != NULL ; mode = mode->next ) - n++; - - results = (XVisualInfo *)calloc(1, n * sizeof(XVisualInfo)); - if (!results) { - *nitens_return = 0; - return NULL; - } - - visResults = (Visual *)calloc(1, n * sizeof(Visual)); - if (!results) { - free(results); - *nitens_return = 0; - return NULL; - } - - for ( mode = dpy->driver_modes, i = 0 ; mode != NULL ; mode = mode->next, i++ ) { - visResults[i].mode = mode; - visResults[i].visInfo = results + i; - visResults[i].dpy = dpy; - - if (dpy->driverContext.bpp == 32) - visResults[i].pixelFormat = PF_B8G8R8A8; /* XXX: FIX ME */ - else - visResults[i].pixelFormat = PF_B5G6R5; /* XXX: FIX ME */ - - results[i].visual = visResults + i; - results[i].visualid = mode->visualID; -#if defined(__cplusplus) || defined(c_plusplus) - results[i].c_class = TrueColor; -#else - results[i].class = TrueColor; -#endif - results[i].depth = mode->redBits + - mode->redBits + - mode->redBits + - mode->redBits; - results[i].bits_per_rgb = dpy->driverContext.bpp; - } - } - *nitens_return = n; - return results; -} - - -/** - * \brief Return a visual that matches specified attributes. - * - * \param dpy the display handle, as returned by XOpenDisplay(). - * \param screen the screen number. It is currently ignored by Mini GLX and - * should be zero. - * \param attribList a list of GLX attributes which describe the desired pixel - * format. It is terminated by the token \c None. - * - * The attributes are as follows: - * \arg GLX_USE_GL: - * This attribute should always be present in order to maintain compatibility - * with GLX. - * \arg GLX_RGBA: - * If present, only RGBA pixel formats will be considered. Otherwise, only - * color index formats are considered. - * \arg GLX_DOUBLEBUFFER: - * if present, only double-buffered pixel formats will be chosen. - * \arg GLX_RED_SIZE \e n: - * Must be followed by a non-negative integer indicating the minimum number of - * bits per red pixel component that is acceptable. - * \arg GLX_GREEN_SIZE \e n: - * Must be followed by a non-negative integer indicating the minimum number of - * bits per green pixel component that is acceptable. - * \arg GLX_BLUE_SIZE \e n: - * Must be followed by a non-negative integer indicating the minimum number of - * bits per blue pixel component that is acceptable. - * \arg GLX_ALPHA_SIZE \e n: - * Must be followed by a non-negative integer indicating the minimum number of - * bits per alpha pixel component that is acceptable. - * \arg GLX_STENCIL_SIZE \e n: - * Must be followed by a non-negative integer indicating the minimum number of - * bits per stencil value that is acceptable. - * \arg GLX_DEPTH_SIZE \e n: - * Must be followed by a non-negative integer indicating the minimum number of - * bits per depth component that is acceptable. - * \arg None: - * This token is used to terminate the attribute list. - * - * \return a pointer to an #XVisualInfo object which most closely matches the - * requirements of the attribute list. If there is no visual which matches the - * request, \c NULL will be returned. - * - * \note Visuals with accumulation buffers are not available. - * - * This function searches the list of available visual configurations in - * MiniGLXDisplayRec::configs for a configuration which best matches the GLX - * attribute list parameter. A new ::XVisualInfo object is created which - * describes the visual configuration. The match criteria is described in the - * specification. - */ -XVisualInfo* -glXChooseVisual( Display *dpy, int screen, int *attribList ) -{ - const __GLcontextModes *mode; - Visual *vis; - XVisualInfo *visInfo; - const int *attrib; - GLboolean rgbFlag = GL_FALSE, dbFlag = GL_FALSE, stereoFlag = GL_FALSE; - GLint redBits = 0, greenBits = 0, blueBits = 0, alphaBits = 0; - GLint indexBits = 0, depthBits = 0, stencilBits = 0; - GLint numSamples = 0; - int i=0; - - /* - * XXX in the future, might be interpreted as a VT - */ - ASSERT(dpy); - ASSERT(screen == 0); - - vis = (Visual *)calloc(1, sizeof(Visual)); - if (!vis) - return NULL; - - visInfo = (XVisualInfo *)malloc(sizeof(XVisualInfo)); - if (!visInfo) { - free(vis); - return NULL; - } - - visInfo->visual = vis; - vis->visInfo = visInfo; - vis->dpy = dpy; - - /* parse the attribute list */ - for (attrib = attribList; attrib && *attrib != None; attrib++) { - switch (attrib[0]) { - case GLX_DOUBLEBUFFER: - dbFlag = GL_TRUE; - break; - case GLX_RGBA: - rgbFlag = GL_TRUE; - break; - case GLX_RED_SIZE: - redBits = attrib[1]; - attrib++; - break; - case GLX_GREEN_SIZE: - greenBits = attrib[1]; - attrib++; - break; - case GLX_BLUE_SIZE: - blueBits = attrib[1]; - attrib++; - break; - case GLX_ALPHA_SIZE: - alphaBits = attrib[1]; - attrib++; - break; - case GLX_STENCIL_SIZE: - stencilBits = attrib[1]; - attrib++; - break; - case GLX_DEPTH_SIZE: - depthBits = attrib[1]; - attrib++; - break; -#if 0 - case GLX_ACCUM_RED_SIZE: - accumRedBits = attrib[1]; - attrib++; - break; - case GLX_ACCUM_GREEN_SIZE: - accumGreenBits = attrib[1]; - attrib++; - break; - case GLX_ACCUM_BLUE_SIZE: - accumBlueBits = attrib[1]; - attrib++; - break; - case GLX_ACCUM_ALPHA_SIZE: - accumAlphaBits = attrib[1]; - attrib++; - break; - case GLX_LEVEL: - /* ignored for now */ - break; -#endif - default: - /* unexpected token */ - fprintf(stderr, "unexpected token in glXChooseVisual attrib list\n"); - free(vis); - free(visInfo); - return NULL; - } - } - - /* search screen configs for suitable visual */ - (void) numSamples; - (void) indexBits; - (void) redBits; - (void) greenBits; - (void) blueBits; - (void) alphaBits; - (void) stereoFlag; - for ( mode = dpy->driver_modes ; mode != NULL ; mode = mode->next ) { - i++; - if (mode->rgbMode == rgbFlag && - mode->doubleBufferMode == dbFlag && - mode->redBits >= redBits && - mode->greenBits >= greenBits && - mode->blueBits >= blueBits && - mode->alphaBits >= alphaBits && - mode->depthBits >= depthBits && - mode->stencilBits >= stencilBits) { - /* found it */ - visInfo->visualid = i; - vis->mode = mode; - break; - } - } - if (!vis->mode) - return NULL; - - /* compute depth and bpp */ - if (rgbFlag) { - /* XXX maybe support depth 16 someday */ -#if defined(__cplusplus) || defined(c_plusplus) - visInfo->c_class = TrueColor; -#else - visInfo->class = TrueColor; -#endif - visInfo->depth = dpy->driverContext.bpp; - visInfo->bits_per_rgb = dpy->driverContext.bpp; - if (dpy->driverContext.bpp == 32) - vis->pixelFormat = PF_B8G8R8A8; - else - vis->pixelFormat = PF_B5G6R5; - } - else { - /* color index mode */ -#if defined(__cplusplus) || defined(c_plusplus) - visInfo->c_class = PseudoColor; -#else - visInfo->class = PseudoColor; -#endif - visInfo->depth = 8; - visInfo->bits_per_rgb = 8; /* bits/pixel */ - vis->pixelFormat = PF_CI8; - } - - return visInfo; -} - - -/** - * \brief Return information about GLX visuals. - * - * \param dpy the display handle, as returned by XOpenDisplay(). - * \param vis the visual to be queried, as returned by glXChooseVisual(). - * \param attrib the visual attribute to be returned. - * \param value pointer to an integer in which the result of the query will be - * stored. - * - * \return zero if no error occurs, \c GLX_INVALID_ATTRIBUTE if the attribute - * parameter is invalid, or \c GLX_BAD_VISUAL if the \p vis parameter is - * invalid. - * - * Returns the appropriate attribute of ::__GLXvisualConfig pointed by - * MiniGLXVisualRec::glxConfig of XVisualInfo::visual. - * - * \sa data types. - */ -int -glXGetConfig( Display *dpy, XVisualInfo *vis, int attrib, int *value ) -{ - const __GLcontextModes *mode = vis->visual->mode; - if (!mode) { - *value = 0; - return GLX_BAD_VISUAL; - } - - switch (attrib) { - case GLX_USE_GL: - *value = True; - return 0; - case GLX_RGBA: - *value = mode->rgbMode; - return 0; - case GLX_DOUBLEBUFFER: - *value = mode->doubleBufferMode; - return 0; - case GLX_RED_SIZE: - *value = mode->redBits; - return 0; - case GLX_GREEN_SIZE: - *value = mode->greenBits; - return 0; - case GLX_BLUE_SIZE: - *value = mode->blueBits; - return 0; - case GLX_ALPHA_SIZE: - *value = mode->alphaBits; - return 0; - case GLX_DEPTH_SIZE: - *value = mode->depthBits; - return 0; - case GLX_STENCIL_SIZE: - *value = mode->stencilBits; - return 0; - default: - *value = 0; - return GLX_BAD_ATTRIBUTE; - } - return 0; -} - - -/** - * \brief Create a new GLX rendering context. - * - * \param dpy the display handle, as returned by XOpenDisplay(). - * \param vis the visual that defines the frame buffer resources available to - * the rendering context, as returned by glXChooseVisual(). - * \param shareList If non-zero, texture objects and display lists are shared - * with the named rendering context. If zero, texture objects and display lists - * will (initially) be private to this context. They may be shared when a - * subsequent context is created. - * \param direct whether direct or indirect rendering is desired. For Mini GLX - * this value is ignored but it should be set to \c True. - * - * \return a ::GLXContext handle if it succeeds or zero if it fails due to - * invalid parameter or insufficient resources. - * - * This function creates and initializes a ::MiniGLXContextRec structure and - * calls the __DRIscreenRec::createContext method to initialize the client - * private data. - */ -GLXContext -glXCreateContext( Display *dpy, XVisualInfo *vis, - GLXContext shareList, Bool direct ) -{ - GLXContext ctx; - void *sharePriv; - - ASSERT(vis); - - ctx = (struct MiniGLXContextRec *)calloc(1, sizeof(struct MiniGLXContextRec)); - if (!ctx) - return NULL; - - ctx->vid = vis->visualid; - - if (shareList) - sharePriv = shareList->driContext.private; - else - sharePriv = NULL; - - ctx->driContext.mode = vis->visual->mode; - ctx->driContext.private = dpy->driScreen.createNewContext(dpy, vis->visual->mode, - GLX_WINDOW_BIT, sharePriv, &ctx->driContext); - - if (!ctx->driContext.private) { - free(ctx); - return NULL; - } - - return ctx; -} - - -/** - * \brief Destroy a GLX context. - * - * \param dpy the display handle, as returned by XOpenDisplay(). - * \param ctx the GLX context to be destroyed. - * - * This function frees the \p ctx parameter after unbinding the current context - * by calling the __DRIcontextRec::bindContext method with zeros and calling - * the __DRIcontextRec::destroyContext method. - */ -void -glXDestroyContext( Display *dpy, GLXContext ctx ) -{ - GLXContext glxctx = glXGetCurrentContext(); - - if (ctx) { - if (glxctx == ctx) { - /* destroying current context */ - ctx->driContext.bindContext(dpy, 0, 0, 0, 0); - CurrentContext = 0; - } - ctx->driContext.destroyContext(dpy, 0, ctx->driContext.private); - free(ctx); - } -} - - -/** - * \brief Bind a GLX context to a window or a pixmap. - * - * \param dpy the display handle, as returned by XOpenDisplay(). - * \param drawable the window or drawable to bind to the rendering context. - * This should be the value returned by XCreateWindow(). - * \param ctx the GLX context to be destroyed. - * - * \return \c True if it succeeds, \c False otherwise to indicate an invalid - * display, window or context parameter. - * - * The current rendering context may be unbound by calling glXMakeCurrent() - * with the window and context parameters set to zero. - * - * An application may create any number of rendering contexts and bind them as - * needed. Note that binding a rendering context is generally not a - * light-weight operation. Most simple OpenGL applications create only one - * rendering context. - * - * This function first unbinds any old context via - * __DRIcontextRec::unbindContext and binds the new one via - * __DRIcontextRec::bindContext. - * - * If \p drawable is zero it unbinds the GLX context by calling - * __DRIcontextRec::bindContext with zeros. - */ -Bool -glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx) -{ - if (dpy && drawable && ctx) { - GLXContext oldContext = glXGetCurrentContext(); - GLXDrawable oldDrawable = glXGetCurrentDrawable(); - /* unbind old */ - if (oldContext) { - oldContext->driContext.unbindContext(dpy, 0, - (__DRIid) oldDrawable, (__DRIid) oldDrawable, - &oldContext->driContext); - } - /* bind new */ - CurrentContext = ctx; - ctx->driContext.bindContext(dpy, 0, (__DRIid) drawable, - (__DRIid) drawable, &ctx->driContext); - ctx->drawBuffer = drawable; - ctx->curBuffer = drawable; - } - else if (ctx && dpy) { - /* unbind */ - ctx->driContext.bindContext(dpy, 0, 0, 0, 0); - } - else if (dpy) { - CurrentContext = 0; /* kw: this seems to be intended??? */ - } - - return True; -} - - -/** - * \brief Exchange front and back buffers. - * - * \param dpy the display handle, as returned by XOpenDisplay(). - * \param drawable the drawable whose buffers are to be swapped. - * - * Any pending rendering commands will be completed before the buffer swap - * takes place. - * - * Calling glXSwapBuffers() on a window which is single-buffered has no effect. - * - * This function just calls the __DRIdrawableRec::swapBuffers method to do the - * work. - */ -void -glXSwapBuffers( Display *dpy, GLXDrawable drawable ) -{ - if (!dpy || !drawable) - return; - - drawable->driDrawable.swapBuffers(dpy, drawable->driDrawable.private); -} - - -/** - * \brief Return the current context - * - * \return the current context, as specified by glXMakeCurrent(), or zero if no - * context is currently bound. - * - * \sa glXCreateContext(), glXMakeCurrent() - * - * Returns the value of the ::CurrentContext global variable. - */ -GLXContext -glXGetCurrentContext( void ) -{ - return CurrentContext; -} - - -/** - * \brief Return the current drawable. - * - * \return the current drawable, as specified by glXMakeCurrent(), or zero if - * no drawable is currently bound. - * - * This function gets the current context via glXGetCurrentContext() and - * returns the MiniGLXContextRec::drawBuffer attribute. - */ -GLXDrawable -glXGetCurrentDrawable( void ) -{ - GLXContext glxctx = glXGetCurrentContext(); - if (glxctx) - return glxctx->drawBuffer; - else - return NULL; -} - - -static GLboolean -__glXCreateContextWithConfig(__DRInativeDisplay *dpy, int screen, - int fbconfigID, void *contextID, drm_context_t *hHWContext) -{ - __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; - - pDRIScreen = __glXFindDRIScreen(dpy, screen); - if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { - return GL_FALSE; - } - - psp = (__DRIscreenPrivate *) pDRIScreen->private; - - if (psp->fd) { - if (drmCreateContext(psp->fd, hHWContext)) { - fprintf(stderr, ">>> drmCreateContext failed\n"); - return GL_FALSE; - } - *(void**)contextID = (void*) *hHWContext; - } - - return GL_TRUE; -} - - -static GLboolean -__glXGetDrawableInfo(__DRInativeDisplay *dpy, int scrn, - __DRIid draw, unsigned int * index, unsigned int * stamp, - int * x, int * y, int * width, int * height, - int * numClipRects, drm_clip_rect_t ** pClipRects, - int * backX, int * backY, - int * numBackClipRects, drm_clip_rect_t ** pBackClipRects) -{ - GLXDrawable drawable = (GLXDrawable) draw; - drm_clip_rect_t * cliprect; - Display* display = (Display*)dpy; - __DRIcontextPrivate *pcp = (__DRIcontextPrivate *)CurrentContext->driContext.private; - if (drawable == 0) { - return GL_FALSE; - } - - cliprect = (drm_clip_rect_t*) _mesa_malloc(sizeof(drm_clip_rect_t)); - cliprect->x1 = drawable->x; - cliprect->y1 = drawable->y; - cliprect->x2 = drawable->x + drawable->w; - cliprect->y2 = drawable->y + drawable->h; - - /* the drawable index is by client id */ - *index = display->clientID; - - *stamp = pcp->driScreenPriv->pSAREA->drawableTable[display->clientID].stamp; - *x = drawable->x; - *y = drawable->y; - *width = drawable->w; - *height = drawable->h; - *numClipRects = 1; - *pClipRects = cliprect; - - *backX = drawable->x; - *backY = drawable->y; - *numBackClipRects = 0; - *pBackClipRects = 0; - - return GL_TRUE; -} - - -static GLboolean -xf86DRI_DestroyContext(__DRInativeDisplay *dpy, int screen, __DRIid context_id ) -{ - return GL_TRUE; -} - - -static GLboolean -xf86DRI_CreateDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable, - drm_drawable_t *hHWDrawable ) -{ - return GL_TRUE; -} - - -static GLboolean -xf86DRI_DestroyDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable) -{ - return GL_TRUE; -} - - -/** - * \brief Query function address. - * - * The glXGetProcAddress() function will return the address of any available - * OpenGL or Mini GLX function. - * - * \param procName name of the function to be returned. - * - * \return If \p procName is a valid function name, a pointer to that function - * will be returned. Otherwise, \c NULL will be returned. - * - * The purpose of glXGetProcAddress() is to facilitate using future extensions - * to OpenGL or Mini GLX. If a future version of the library adds new extension - * functions they'll be accessible via glXGetProcAddress(). The alternative is - * to hard-code calls to the new functions in the application but doing so will - * prevent linking the application with older versions of the library. - * - * Returns the function address by looking up its name in a static (name, - * address) pair list. - */ -void (*glXGetProcAddress(const GLubyte *procname))( void ) -{ - struct name_address { - const char *name; - const void *func; - }; - static const struct name_address functions[] = { - { "glXChooseVisual", (void *) glXChooseVisual }, - { "glXCreateContext", (void *) glXCreateContext }, - { "glXDestroyContext", (void *) glXDestroyContext }, - { "glXMakeCurrent", (void *) glXMakeCurrent }, - { "glXSwapBuffers", (void *) glXSwapBuffers }, - { "glXGetCurrentContext", (void *) glXGetCurrentContext }, - { "glXGetCurrentDrawable", (void *) glXGetCurrentDrawable }, - { "glXGetProcAddress", (void *) glXGetProcAddress }, - { "XOpenDisplay", (void *) XOpenDisplay }, - { "XCloseDisplay", (void *) XCloseDisplay }, - { "XCreateWindow", (void *) XCreateWindow }, - { "XDestroyWindow", (void *) XDestroyWindow }, - { "XMapWindow", (void *) XMapWindow }, - { "XCreateColormap", (void *) XCreateColormap }, - { "XFreeColormap", (void *) XFreeColormap }, - { "XFree", (void *) XFree }, - { "XGetVisualinfo", (void *) XGetVisualInfo }, - { "glXCreatePbuffer", (void *) glXCreatePbuffer }, - { "glXDestroyPbuffer", (void *) glXDestroyPbuffer }, - { "glXChooseFBConfig", (void *) glXChooseFBConfig }, - { "glXGetVisualFromFBConfig", (void *) glXGetVisualFromFBConfig }, - { NULL, NULL } - }; - const struct name_address *entry; - for (entry = functions; entry->name; entry++) { - if (strcmp(entry->name, (const char *) procname) == 0) { - return entry->func; - } - } - return _glapi_get_proc_address((const char *) procname); -} - - -/** - * \brief Query the Mini GLX version. - * - * \param dpy the display handle. It is currently ignored, but should be the - * value returned by XOpenDisplay(). - * \param major receives the major version number of Mini GLX. - * \param minor receives the minor version number of Mini GLX. - * - * \return \c True if the function succeeds, \c False if the function fails due - * to invalid parameters. - * - * \sa #MINI_GLX_VERSION_1_0. - * - * Returns the hard-coded Mini GLX version. - */ -Bool -glXQueryVersion( Display *dpy, int *major, int *minor ) -{ - (void) dpy; - *major = 1; - *minor = 0; - return True; -} - - -/** - * \brief Create a new pbuffer. - */ -GLXPbuffer -glXCreatePbuffer( Display *dpy, GLXFBConfig config, const int *attribList ) -{ - return NULL; -} - - -void -glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf ) -{ - free(pbuf); -} - - -GLXFBConfig * -glXChooseFBConfig( Display *dpy, int screen, const int *attribList, - int *nitems ) -{ - GLXFBConfig *f = (GLXFBConfig *) malloc(sizeof(GLXFBConfig)); - f->visInfo = glXChooseVisual( dpy, screen, (int *) attribList ); - if (f->visInfo) { - *nitems = 1; - return f; - } - else { - *nitems = 0; - free(f); - return NULL; - } -} - - -XVisualInfo * -glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ) -{ - /* XVisualInfo and GLXFBConfig are the same structure */ - (void) dpy; - return config.visInfo; -} - -void *glXAllocateMemoryMESA(Display *dpy, int scrn, - size_t size, float readFreq, - float writeFreq, float priority) -{ - if (dpy->driScreen.private && dpy->driScreen.allocateMemory) { - return (*dpy->driScreen.allocateMemory)( dpy, scrn, size, - readFreq, writeFreq, - priority ); - } - - return NULL; -} - -void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer) -{ - if (dpy->driScreen.private && dpy->driScreen.freeMemory) { - (*dpy->driScreen.freeMemory)( dpy, scrn, pointer ); - } -} - -GLuint glXGetMemoryOffsetMESA( Display *dpy, int scrn, - const void *pointer ) -{ - if (dpy->driScreen.private && dpy->driScreen.memoryOffset) { - return (*dpy->driScreen.memoryOffset)( dpy, scrn, pointer ); - } - - return 0; -} - - -/** - * Get the unadjusted system time (UST). Currently, the UST is measured in - * microseconds since Epoc. The actual resolution of the UST may vary from - * system to system, and the units may vary from release to release. - * Drivers should not call this function directly. They should instead use - * \c glXGetProcAddress to obtain a pointer to the function. - * - * \param ust Location to store the 64-bit UST - * \returns Zero on success or a negative errno value on failure. - * - * \note - * This function was copied directly from src/glx/x11/glxcmds.c. - */ -static int __glXGetUST( int64_t * ust ) -{ - struct timeval tv; - - if ( ust == NULL ) { - return -EFAULT; - } - - if ( gettimeofday( & tv, NULL ) == 0 ) { - ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec; - return 0; - } else { - return -errno; - } -} - - -/** - * - * \bug - * This needs to be implemented for miniGlx. - */ -static GLboolean __glXGetMscRate(__DRInativeDisplay * dpy, __DRIid drawable, - int32_t * numerator, int32_t * denominator) -{ - *numerator = 0; - *denominator = 0; - return False; -} -/*@}*/ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/miniglxP.h b/nx-X11/extras/Mesa_6.4.2/src/glx/mini/miniglxP.h deleted file mode 100644 index 96ed0e81cd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/miniglxP.h +++ /dev/null @@ -1,205 +0,0 @@ -/** - * \file miniglxP.h - * \brief Define replacements for some X data types and define the DRI-related - * data structures. - * - * \note Cut down version of glxclient.h. - * - */ - -#ifndef _mini_GLX_client_h_ -#define _mini_GLX_client_h_ - -#include -#include - -#include -#include "glheader.h" -#include "mtypes.h" - -#include "driver.h" -#include "GL/internal/dri_interface.h" - -/** - * \brief Supported pixel formats. - */ -enum PixelFormat { - PF_B8G8R8, /**< \brief 24-bit BGR */ - PF_B8G8R8A8, /**< \brief 32-bit BGRA */ - PF_B5G6R5, /**< \brief 16-bit BGR */ - PF_B5G5R5, /**< \brief 15-bit BGR */ - PF_CI8 /**< \brief 8-bit color index */ -}; - -/** - * \brief X Visual type. - * - * \sa ::Visual, \ref datatypes. - */ -struct MiniGLXVisualRec { - /** \brief GLX visual information */ - const __GLcontextModes *mode; - - /** \brief pointer back to corresponding ::XVisualInfo */ - XVisualInfo *visInfo; - - /** \brief display handle */ - Display *dpy; - - /** \brief pixel format */ - enum PixelFormat pixelFormat; -}; - - - -/** - * \brief X Window type. - * - * \sa ::Window, \ref datatypes. - */ -struct MiniGLXWindowRec { - Visual *visual; - /** \brief position (always 0,0) */ - int x, y; - /** \brief size */ - unsigned int w, h; - void *frontStart; /**< \brief start of front color buffer */ - void *backStart; /**< \brief start of back color buffer */ - size_t size; /**< \brief color buffer size, in bytes */ - GLuint bytesPerPixel; - GLuint rowStride; /**< \brief in bytes */ - GLubyte *frontBottom; /**< \brief pointer to last row */ - GLubyte *backBottom; /**< \brief pointer to last row */ - GLubyte *curBottom; /**< = frontBottom or backBottom */ - __DRIdrawable driDrawable; - GLuint ismapped; -}; - - -/** - * \brief GLXContext type. - * - * \sa ::GLXContext, \ref datatypes. - */ -struct MiniGLXContextRec { - Window drawBuffer; /**< \brief drawing buffer */ - Window curBuffer; /**< \brief current buffer */ - VisualID vid; /**< \brief visual ID */ - __DRIcontext driContext; /**< \brief context dependent methods */ -}; - -#define MINIGLX_BUF_SIZE 512 -#define MINIGLX_MAX_SERVER_FDS 10 -#define MINIGLX_MAX_CLIENT_FDS 1 -#define MINIGLX_EVENT_QUEUE_SZ 16 -#define MINIGLX_EVENT_QUEUE_MASK (MINIGLX_EVENT_QUEUE_SZ-1) - -/** - * A connection to/from the server - * - * All information is to/from the server is buffered and then dispatched by - * __miniglx_Select() to avoid blocking the server. - */ -struct MiniGLXConnection { - int fd; /**< \brief file descriptor */ - char readbuf[MINIGLX_BUF_SIZE]; /**< \brief read buffer */ - char writebuf[MINIGLX_BUF_SIZE]; /**< \brief write buffer */ - int readbuf_count; /**< \brief count of bytes waiting to be read */ - int writebuf_count; /**< \brief count of bytes waiting to be written */ -}; - - -/** - * \brief X Display type - * - * \sa ::Display, \ref datatypes. - */ -struct MiniGLXDisplayRec { - /** \brief fixed framebuffer screen info */ - struct fb_fix_screeninfo FixedInfo; - /** \brief original and current variable framebuffer screen info */ - struct fb_var_screeninfo OrigVarInfo, VarInfo; - struct sigaction OrigSigUsr1; - struct sigaction OrigSigUsr2; - int OriginalVT; - int ConsoleFD; /**< \brief console TTY device file descriptor */ - int FrameBufferFD; /**< \brief framebuffer device file descriptor */ - int NumWindows; /**< \brief number of open windows */ - Window TheWindow; /**< \brief open window - only allow one window for now */ - int rotateMode; - - - volatile int vtSignalFlag; - volatile int haveVT; /**< \brief whether the VT is hold */ - int hwActive; /**< \brief whether the hardware is active -- mimics - the variations of MiniGLXDisplayRec::haveVT */ - - - int IsClient; /**< \brief whether it's a client or the server */ - int clientID; - int nrFds; /**< \brief number of connections (usually just one for the clients) */ - struct MiniGLXConnection *fd; /**< \brief connections */ - int drmFd; /**< \brief handle to drm device */ - int authorized; /**< \brief has server authorized this process? */ - - struct { - int nr, head, tail; - XEvent queue[MINIGLX_EVENT_QUEUE_SZ]; - } eventqueue; - - /** - * \name Visuals - * - * Visuals (configs) in this screen. - */ - /*@{*/ - const __GLcontextModes *driver_modes; /**< \brief Modes filtered by driver. */ - /*@}*/ - - /** - * \name From __GLXdisplayPrivate - */ - /*@{*/ - PFNCREATENEWSCREENFUNC createNewScreen; /**< \brief \e __driCreateScreen hook */ - __DRIscreen driScreen; /**< \brief Screen dependent methods */ - void *dlHandle; /**< - * \brief handle to the client dynamic - * library - */ - /*@}*/ - - /** - * \brief Mini GLX specific driver hooks - */ - struct DRIDriverRec *driver; - struct DRIDriverContextRec driverContext; - - /** - * \name Configuration details - * - * They are read from a configuration file by __read_config_file(). - */ - /*@{*/ - const char *fbdevDevice; - const char *clientDriverName; - /*@}*/ -}; - -/** Character messages. */ -enum msgs { - _CanIHaveFocus, - _IDontWantFocus, - _YouveGotFocus, - _YouveLostFocus, - _RepaintPlease, - _Authorize, -}; -extern int send_msg( Display *dpy, int i, const void *msg, size_t sz ); -extern int send_char_msg( Display *dpy, int i, char msg ); -extern int blocking_read( Display *dpy, int connection, char *msg, size_t msg_size ); -extern int handle_fd_events( Display *dpy, int nonblock ); - -extern int __miniglx_open_connections( Display *dpy ); -extern void __miniglx_close_connections( Display *dpy ); - -#endif /* !_mini_GLX_client_h_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/miniglx_events.c b/nx-X11/extras/Mesa_6.4.2/src/glx/mini/miniglx_events.c deleted file mode 100644 index ce6bff06a2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/mini/miniglx_events.c +++ /dev/null @@ -1,978 +0,0 @@ -/** - * \file miniglx_events.c - * \brief Mini GLX client/server communication functions. - * \author Keith Whitwell - * - * The Mini GLX interface is a subset of the GLX interface, plus a - * minimal set of Xlib functions. This file adds interfaces to - * arbitrate a single cliprect between multiple direct rendering - * clients. - * - * A fairly complete client/server non-blocking communication - * mechanism. Probably overkill given that none of our messages - * currently exceed 1 byte in length and take place over the - * relatively benign channel provided by a Unix domain socket. - */ - -/* - * Mesa 3-D graphics library - * Version: 5.0 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* $Id: miniglx_events.c,v 1.4.8.2 2005/08/31 01:25:24 airlied Exp $ */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "xf86drm.h" -#include "miniglxP.h" - - -#define MINIGLX_FIFO_NAME "/tmp/miniglx.fifo" - -/** - * \brief Allocate an XEvent structure on the event queue. - * - * \param dpy the display handle. - * - * \return Pointer to the queued event structure or NULL on failure. - * - * \internal - * If there is space on the XEvent queue, return a pointer - * to the next free event and increment the eventqueue tail value. - * Otherwise return null. - */ -static XEvent *queue_event( Display *dpy ) -{ - int incr = (dpy->eventqueue.tail + 1) & MINIGLX_EVENT_QUEUE_MASK; - if (incr == dpy->eventqueue.head) { - return 0; - } - else { - XEvent *ev = &dpy->eventqueue.queue[dpy->eventqueue.tail]; - dpy->eventqueue.tail = incr; - return ev; - } -} - -/** - * \brief Dequeue an XEvent and copy it into provided storage. - * - * \param dpy the display handle. - * \param event_return pointer to copy the queued event to. - * - * \return True or False depending on success. - * - * \internal - * If there is a queued XEvent on the queue, copy it to the provided - * pointer and increment the eventqueue head value. Otherwise return - * null. - */ -static int dequeue_event( Display *dpy, XEvent *event_return ) -{ - if (dpy->eventqueue.tail == dpy->eventqueue.head) { - return False; - } - else { - *event_return = dpy->eventqueue.queue[dpy->eventqueue.head]; - dpy->eventqueue.head += 1; - dpy->eventqueue.head &= MINIGLX_EVENT_QUEUE_MASK; - return True; - } -} - -/** - * \brief Shutdown a socket connection. - * - * \param dpy the display handle. - * \param i the index in dpy->fd of the socket connection. - * - * \internal - * Shutdown and close the file descriptor. If this is the special - * connection in fd[0], issue an error message and exit - there's been - * some sort of failure somewhere. Otherwise, let the application - * know about whats happened by issuing a DestroyNotify event. - */ -static void shut_fd( Display *dpy, int i ) -{ - if (dpy->fd[i].fd < 0) - return; - - shutdown (dpy->fd[i].fd, SHUT_RDWR); - close (dpy->fd[i].fd); - dpy->fd[i].fd = -1; - dpy->fd[i].readbuf_count = 0; - dpy->fd[i].writebuf_count = 0; - - if (i == 0) { - fprintf(stderr, "server connection lost\n"); - exit(1); - } - else { - /* Pass this to the application as a DestroyNotify event. - */ - XEvent *er = queue_event(dpy); - if (!er) return; - er->xdestroywindow.type = DestroyNotify; - er->xdestroywindow.serial = 0; - er->xdestroywindow.send_event = 0; - er->xdestroywindow.display = dpy; - er->xdestroywindow.window = (Window)i; - } -} - -/** - * \brief Send a message to a socket connection. - * - * \param dpy the display handle. - * \param i the index in dpy->fd of the socket connection. - * \param msg the message to send. - * \param sz the size of the message - * - * \internal - * Copy the message to the write buffer for the nominated connection. - * This will be actually sent to that file descriptor from - * __miniglx_Select(). - */ -int send_msg( Display *dpy, int i, - const void *msg, size_t sz ) -{ - int cnt = dpy->fd[i].writebuf_count; - if (MINIGLX_BUF_SIZE - cnt < sz) { - fprintf(stderr, "client %d: writebuf overflow\n", i); - return False; - } - - memcpy( dpy->fd[i].writebuf + cnt, msg, sz ); cnt += sz; - dpy->fd[i].writebuf_count = cnt; - return True; -} - -/** - * \brief Send a message to a socket connection. - * - * \param dpy the display handle. - * \param i the index in dpy->fd of the socket connection. - * \param msg the message to send. - * - * \internal - * Use send_msg() to send a one-byte message to a socket. - */ -int send_char_msg( Display *dpy, int i, char msg ) -{ - return send_msg( dpy, i, &msg, sizeof(char)); -} - - -/** - * \brief Block and receive a message from a socket connection. - * - * \param dpy the display handle. - * \param connection the index in dpy->fd of the socket connection. - * \param msg storage for the received message. - * \param msg_size the number of bytes to read. - * - * \internal - * Block and read from the connection's file descriptor - * until msg_size bytes have been received. - * - * Only called from welcome_message_part(). - */ -int blocking_read( Display *dpy, int connection, - char *msg, size_t msg_size ) -{ - int i, r; - - for (i = 0 ; i < msg_size ; i += r) { - r = read(dpy->fd[connection].fd, msg + i, msg_size - i); - if (r < 1) { - fprintf(stderr, "blocking_read: %d %s\n", r, strerror(errno)); - shut_fd(dpy,connection); - return False; - } - } - - return True; -} - -/** - * \brief Send/receive a part of the welcome message. - * - * \param dpy the display handle. - * \param i the index in dpy->fd of the socket connection. - * \param msg storage for the sent/received message. - * \param sz the number of bytes to write/read. - * - * \return True on success, or False on failure. - * - * This function is called by welcome_message_part(), to either send or receive - * (via blocking_read()) part of the welcome message, according to whether - * Display::IsClient is set. - * - * Each part of the welcome message on the wire consists of a count and then the - * actual message data with that number of bytes. - */ -static int welcome_message_part( Display *dpy, int i, void **msg, int sz ) -{ - if (dpy->IsClient) { - int sz; - if (!blocking_read( dpy, i, (char *)&sz, sizeof(sz))) return False; - if (!*msg) *msg = malloc(sz); - if (!*msg) return False; - if (!blocking_read( dpy, i, *msg, sz )) return False; - return sz; - } - else { - if (!send_msg( dpy, i, &sz, sizeof(sz))) return False; - if (!send_msg( dpy, i, *msg, sz )) return False; - } - - return True; -} - -/** - * \brief Send/receive the welcome message. - * - * \param dpy the display handle. - * \param i the index in dpy->fd of the socket connection. - * - * \return True on success, or False on failure. - * - * Using welcome_message_part(), sends/receives the client ID, the client - * configuration details in DRIDriverContext::shared, and the driver private - * message in DRIDriverContext::driverClientMsg. - */ -static int welcome_message( Display *dpy, int i ) -{ - void *tmp = &dpy->driverContext.shared; - int *clientid = dpy->IsClient ? &dpy->clientID : &i; - int size; - if (!welcome_message_part( dpy, i, (void **)&clientid, sizeof(*clientid))) - return False; - - if (!welcome_message_part( dpy, i, &tmp, sizeof(dpy->driverContext.shared))) - return False; - - size=welcome_message_part( dpy, i, - (void **)&dpy->driverContext.driverClientMsg, - dpy->driverContext.driverClientMsgSize ); - if (!size) - return False; - if (dpy->IsClient) { - dpy->driverContext.driverClientMsgSize = size; - } - return True; -} - - -/** - * \brief Handle a new client connection. - * - * \param dpy the display handle. - * - * \return True on success or False on failure. - * - * Accepts the connection, sets it in non-blocking operation, and finds a free - * slot in Display::fd for it. - */ -static int handle_new_client( Display *dpy ) -{ - struct sockaddr_un client_address; - unsigned int l = sizeof(client_address); - int r, i; - - r = accept(dpy->fd[0].fd, (struct sockaddr *) &client_address, &l); - if (r < 0) { - perror ("accept()"); - shut_fd(dpy,0); - return False; - } - - if (fcntl(r, F_SETFL, O_NONBLOCK) != 0) { - perror("fcntl"); - close(r); - return False; - } - - - /* Some rough & ready adaption of the XEvent semantics. - */ - for (i = 1 ; i < dpy->nrFds ; i++) { - if (dpy->fd[i].fd < 0) { - XEvent *er = queue_event(dpy); - if (!er) { - close(r); - return False; - } - - dpy->fd[i].fd = r; - er->xcreatewindow.type = CreateNotify; - er->xcreatewindow.serial = 0; - er->xcreatewindow.send_event = 0; - er->xcreatewindow.display = dpy; - er->xcreatewindow.window = (Window)i; /* fd slot == window, now? */ - - /* Send the driver client message - this is expected as the - * first message on a new connection. The recpient already - * knows the size of the message. - */ - welcome_message( dpy, i ); - return True; - } - } - - - fprintf(stderr, "[miniglx] %s: Max nr clients exceeded\n", __FUNCTION__); - close(r); - return False; -} - -/** - * This routine "puffs out" the very basic communications between - * client and server to full-sized X Events that can be handled by the - * application. - * - * \param dpy the display handle. - * \param i the index in dpy->fd of the socket connection. - * - * \return True on success or False on failure. - * - * \internal - * Interprets the message (see msg) into a XEvent and advances the file FIFO - * buffer. - */ -static int -handle_fifo_read( Display *dpy, int i ) -{ - drm_magic_t magic; - int err; - - while (dpy->fd[i].readbuf_count) { - char id = dpy->fd[i].readbuf[0]; - XEvent *er; - int count = 1; - - if (dpy->IsClient) { - switch (id) { - /* The server has called XMapWindow on a client window */ - case _YouveGotFocus: - er = queue_event(dpy); - if (!er) return False; - er->xmap.type = MapNotify; - er->xmap.serial = 0; - er->xmap.send_event = False; - er->xmap.display = dpy; - er->xmap.event = dpy->TheWindow; - er->xmap.window = dpy->TheWindow; - er->xmap.override_redirect = False; - if (dpy->driver->notifyFocus) - dpy->driver->notifyFocus( 1 ); - break; - - /* The server has called XMapWindow on a client window */ - case _RepaintPlease: - er = queue_event(dpy); - if (!er) return False; - er->xexpose.type = Expose; - er->xexpose.serial = 0; - er->xexpose.send_event = False; - er->xexpose.display = dpy; - er->xexpose.window = dpy->TheWindow; - if (dpy->rotateMode) { - er->xexpose.x = dpy->TheWindow->y; - er->xexpose.y = dpy->TheWindow->x; - er->xexpose.width = dpy->TheWindow->h; - er->xexpose.height = dpy->TheWindow->w; - } - else { - er->xexpose.x = dpy->TheWindow->x; - er->xexpose.y = dpy->TheWindow->y; - er->xexpose.width = dpy->TheWindow->w; - er->xexpose.height = dpy->TheWindow->h; - } - er->xexpose.count = 0; - break; - - /* The server has called 'XUnmapWindow' on a client - * window. - */ - case _YouveLostFocus: - er = queue_event(dpy); - if (!er) return False; - er->xunmap.type = UnmapNotify; - er->xunmap.serial = 0; - er->xunmap.send_event = False; - er->xunmap.display = dpy; - er->xunmap.event = dpy->TheWindow; - er->xunmap.window = dpy->TheWindow; - er->xunmap.from_configure = False; - if (dpy->driver->notifyFocus) - dpy->driver->notifyFocus( 0 ); - break; - - case _Authorize: - dpy->authorized = True; - break; - - default: - fprintf(stderr, "Client received unhandled message type %d\n", id); - shut_fd(dpy, i); /* Actually shuts down the client */ - return False; - } - } - else { - switch (id) { - /* Lets the server know that the client is ready to render - * (having called 'XMapWindow' locally). - */ - case _CanIHaveFocus: - er = queue_event(dpy); - if (!er) return False; - er->xmaprequest.type = MapRequest; - er->xmaprequest.serial = 0; - er->xmaprequest.send_event = False; - er->xmaprequest.display = dpy; - er->xmaprequest.parent = 0; - er->xmaprequest.window = (Window)i; - break; - - /* Both _YouveLostFocus and _IDontWantFocus generate unmap - * events. The idea is that _YouveLostFocus lets the client - * know that it has had focus revoked by the server, whereas - * _IDontWantFocus lets the server know that the client has - * unmapped its own window. - */ - case _IDontWantFocus: - er = queue_event(dpy); - if (!er) return False; - er->xunmap.type = UnmapNotify; - er->xunmap.serial = 0; - er->xunmap.send_event = False; - er->xunmap.display = dpy; - er->xunmap.event = (Window)i; - er->xunmap.window = (Window)i; - er->xunmap.from_configure = False; - break; - - case _Authorize: - /* is full message here yet? */ - if (dpy->fd[i].readbuf_count < count + sizeof(magic)) { - count = 0; - break; - } - memcpy(&magic, dpy->fd[i].readbuf + count, sizeof(magic)); - fprintf(stderr, "Authorize - magic %d\n", magic); - - err = drmAuthMagic(dpy->driverContext.drmFD, magic); - count += sizeof(magic); - - send_char_msg( dpy, i, _Authorize ); - break; - - default: - fprintf(stderr, "Server received unhandled message type %d\n", id); - shut_fd(dpy, i); /* Generates DestroyNotify event */ - return False; - } - } - - dpy->fd[i].readbuf_count -= count; - - if (dpy->fd[i].readbuf_count) { - memmove(dpy->fd[i].readbuf, - dpy->fd[i].readbuf + count, - dpy->fd[i].readbuf_count); - } - } - - return True; -} - -/** - * Handle a VT signal - * - * \param dpy display handle. - * - * The VT switches is detected by comparing Display::haveVT and - * Display::hwActive. When loosing the VT the hardware lock is acquired, the - * hardware is shutdown via a call to DRIDriverRec::shutdownHardware(), and the - * VT released. When acquiring the VT back the hardware state is restored via a - * call to DRIDriverRec::restoreHardware() and the hardware lock released. - */ -static void __driHandleVtSignals( Display *dpy ) -{ - dpy->vtSignalFlag = 0; - - fprintf(stderr, "%s: haveVT %d hwActive %d\n", __FUNCTION__, - dpy->haveVT, dpy->hwActive); - - if (!dpy->haveVT && dpy->hwActive) { - /* Need to get lock and shutdown hardware */ - DRM_LIGHT_LOCK( dpy->driverContext.drmFD, - dpy->driverContext.pSAREA, - dpy->driverContext.serverContext ); - dpy->driver->shutdownHardware( &dpy->driverContext ); - - /* Can now give up control of the VT */ - ioctl( dpy->ConsoleFD, VT_RELDISP, 1 ); - dpy->hwActive = 0; - } - else if (dpy->haveVT && !dpy->hwActive) { - /* Get VT (wait??) */ - ioctl( dpy->ConsoleFD, VT_RELDISP, VT_ACTIVATE ); - - /* restore HW state, release lock */ - dpy->driver->restoreHardware( &dpy->driverContext ); - DRM_UNLOCK( dpy->driverContext.drmFD, - dpy->driverContext.pSAREA, - dpy->driverContext.serverContext ); - dpy->hwActive = 1; - } -} - - -#undef max -#define max(x,y) ((x) > (y) ? (x) : (y)) - -/** - * Logic for the select() call. - * - * \param dpy display handle. - * \param n highest fd in any set plus one. - * \param rfds fd set to be watched for reading, or NULL to create one. - * \param wfds fd set to be watched for writing, or NULL to create one. - * \param xfds fd set to be watched for exceptions or error, or NULL to create one. - * \param tv timeout value, or NULL for no timeout. - * - * \return number of file descriptors contained in the sets, or a negative number on failure. - * - * \note - * This all looks pretty complex, but is necessary especially on the - * server side to prevent a poorly-behaved client from causing the - * server to block in a read or write and hence not service the other - * clients. - * - * \sa - * See select_tut in the Linux manual pages for more discussion. - * - * \internal - * Creates and initializes the file descriptor sets by inspecting Display::fd - * if these aren't passed in the function call. Calls select() and fulfill the - * demands by trying to fill MiniGLXConnection::readbuf and draining - * MiniGLXConnection::writebuf. - * The server fd[0] is handled specially for new connections, by calling - * handle_new_client(). - * - */ -int -__miniglx_Select( Display *dpy, int n, fd_set *rfds, fd_set *wfds, fd_set *xfds, - struct timeval *tv ) -{ - int i; - int retval; - fd_set my_rfds, my_wfds; - struct timeval my_tv; - - if (!rfds) { - rfds = &my_rfds; - FD_ZERO(rfds); - } - - if (!wfds) { - wfds = &my_wfds; - FD_ZERO(wfds); - } - - /* Don't block if there are events queued. Review this if the - * flush in XMapWindow is changed to blocking. (Test case: - * miniglxtest). - */ - if (dpy->eventqueue.head != dpy->eventqueue.tail) { - my_tv.tv_sec = my_tv.tv_usec = 0; - tv = &my_tv; - } - - for (i = 0 ; i < dpy->nrFds; i++) { - if (dpy->fd[i].fd < 0) - continue; - - if (dpy->fd[i].writebuf_count) - FD_SET(dpy->fd[i].fd, wfds); - - if (dpy->fd[i].readbuf_count < MINIGLX_BUF_SIZE) - FD_SET(dpy->fd[i].fd, rfds); - - n = max(n, dpy->fd[i].fd + 1); - } - - if (dpy->vtSignalFlag) - __driHandleVtSignals( dpy ); - - retval = select( n, rfds, wfds, xfds, tv ); - - if (dpy->vtSignalFlag) { - int tmp = errno; - __driHandleVtSignals( dpy ); - errno = tmp; - } - - if (retval < 0) { - FD_ZERO(rfds); - FD_ZERO(wfds); - return retval; - } - - /* Handle server fd[0] specially on the server - accept new client - * connections. - */ - if (!dpy->IsClient) { - if (FD_ISSET(dpy->fd[0].fd, rfds)) { - FD_CLR(dpy->fd[0].fd, rfds); - handle_new_client( dpy ); - } - } - - /* Otherwise, try and fill readbuffer and drain writebuffer: - */ - for (i = 0 ; i < dpy->nrFds ; i++) { - if (dpy->fd[i].fd < 0) - continue; - - /* If there aren't any event slots left, don't examine - * any more file events. This will prevent lost events. - */ - if (dpy->eventqueue.head == - ((dpy->eventqueue.tail + 1) & MINIGLX_EVENT_QUEUE_MASK)) { - fprintf(stderr, "leaving event loop as event queue is full\n"); - return retval; - } - - if (FD_ISSET(dpy->fd[i].fd, wfds)) { - int r = write(dpy->fd[i].fd, - dpy->fd[i].writebuf, - dpy->fd[i].writebuf_count); - - if (r < 1) - shut_fd(dpy,i); - else { - dpy->fd[i].writebuf_count -= r; - if (dpy->fd[i].writebuf_count) { - memmove(dpy->fd[i].writebuf, - dpy->fd[i].writebuf + r, - dpy->fd[i].writebuf_count); - } - } - } - - if (FD_ISSET(dpy->fd[i].fd, rfds)) { - int r = read(dpy->fd[i].fd, - dpy->fd[i].readbuf + dpy->fd[i].readbuf_count, - MINIGLX_BUF_SIZE - dpy->fd[i].readbuf_count); - - if (r < 1) - shut_fd(dpy,i); - else { - dpy->fd[i].readbuf_count += r; - - handle_fifo_read( dpy, i ); - } - } - } - - return retval; -} - -/** - * \brief Handle socket events. - * - * \param dpy the display handle. - * \param nonblock whether to return immediately or wait for an event. - * - * \return True on success, False on failure. Aborts on critical error. - * - * \internal - * This function is the select() main loop. - */ -int handle_fd_events( Display *dpy, int nonblock ) -{ - while (1) { - struct timeval tv = {0, 0}; - int r = __miniglx_Select( dpy, 0, 0, 0, 0, nonblock ? &tv : 0 ); - if (r >= 0) - return True; - if (errno == EINTR || errno == EAGAIN) - continue; - perror ("select()"); - exit (1); - } -} - -/** - * Initializes the connections. - * - * \param dpy the display handle. - * - * \return True on success or False on failure. - * - * Allocates and initializes the Display::fd array and create a Unix socket on - * the first entry. For a server binds the socket to a filename and listen for - * connections. For a client connects to the server and waits for a welcome - * message. Sets the socket in nonblocking mode. - */ -int __miniglx_open_connections( Display *dpy ) -{ - struct sockaddr_un sa; - int i; - - dpy->nrFds = dpy->IsClient ? 1 : MINIGLX_MAX_SERVER_FDS; - dpy->fd = calloc(1, dpy->nrFds * sizeof(struct MiniGLXConnection)); - if (!dpy->fd) - return False; - - for (i = 0 ; i < dpy->nrFds ; i++) - dpy->fd[i].fd = -1; - - if (!dpy->IsClient) { - if (unlink(MINIGLX_FIFO_NAME) != 0 && errno != ENOENT) { - perror("unlink " MINIGLX_FIFO_NAME); - return False; - } - - } - - /* Create a Unix socket -- Note this is *not* a network connection! - */ - dpy->fd[0].fd = socket(PF_UNIX, SOCK_STREAM, 0); - if (dpy->fd[0].fd < 0) { - perror("socket " MINIGLX_FIFO_NAME); - return False; - } - - memset(&sa, 0, sizeof(sa)); - sa.sun_family = AF_UNIX; - strcpy(sa.sun_path, MINIGLX_FIFO_NAME); - - if (dpy->IsClient) { - /* Connect to server - */ - if (connect(dpy->fd[0].fd, (struct sockaddr *)&sa, sizeof(sa)) != 0) { - perror("connect"); - shut_fd(dpy,0); - return False; - } - - /* Wait for configuration messages from the server. - */ - welcome_message( dpy, 0 ); - } - else { - mode_t tmp = umask( 0000 ); /* open to everybody ? */ - - /* Bind socket to our filename - */ - if (bind(dpy->fd[0].fd, (struct sockaddr *)&sa, sizeof(sa)) != 0) { - perror("bind"); - shut_fd(dpy,0); - return False; - } - - umask( tmp ); - - /* Listen for connections - */ - if (listen(dpy->fd[0].fd, 5) != 0) { - perror("listen"); - shut_fd(dpy,0); - return False; - } - } - - if (fcntl(dpy->fd[0].fd, F_SETFL, O_NONBLOCK) != 0) { - perror("fcntl"); - shut_fd(dpy,0); - return False; - } - - - return True; -} - - -/** - * Frees the connections initialized by __miniglx_open_connections(). - * - * \param dpy the display handle. - */ -void __miniglx_close_connections( Display *dpy ) -{ - int i; - - for (i = 0 ; i < dpy->nrFds ; i++) { - if (dpy->fd[i].fd >= 0) { - shutdown (dpy->fd[i].fd, SHUT_RDWR); - close (dpy->fd[i].fd); - } - } - - dpy->nrFds = 0; - free(dpy->fd); -} - - -/** - * Set a drawable flag. - * - * \param dpy the display handle. - * \param w drawable (window). - * \param flag flag. - * - * Sets the specified drawable flag in the SAREA and increment its stamp while - * holding the light hardware lock. - */ -static void set_drawable_flag( Display *dpy, int w, int flag ) -{ - if (dpy->driverContext.pSAREA) { - if (dpy->hwActive) - DRM_LIGHT_LOCK( dpy->driverContext.drmFD, - dpy->driverContext.pSAREA, - dpy->driverContext.serverContext ); - - dpy->driverContext.pSAREA->drawableTable[w].stamp++; - dpy->driverContext.pSAREA->drawableTable[w].flags = flag; - - if (dpy->hwActive) - DRM_UNLOCK( dpy->driverContext.drmFD, - dpy->driverContext.pSAREA, - dpy->driverContext.serverContext ); - } -} - - - -/** - * \brief Map Window. - * - * \param dpy the display handle as returned by XOpenDisplay(). - * \param w the window handle. - * - * If called by a client, sends a request for focus to the server. If - * called by the server, will generate a MapNotify and Expose event at - * the client. - * - */ -void -XMapWindow( Display *dpy, Window w ) -{ - if (dpy->IsClient) - send_char_msg( dpy, 0, _CanIHaveFocus ); - else { - set_drawable_flag( dpy, (int)w, 1 ); - send_char_msg( dpy, (int)w, _YouveGotFocus ); - send_char_msg( dpy, (int)w, _RepaintPlease ); - dpy->TheWindow = w; - } - handle_fd_events( dpy, 0 ); /* flush write queue */ -} - -/** - * \brief Unmap Window. - * - * \param dpy the display handle as returned by XOpenDisplay(). - * \param w the window handle. - * - * Called from the client: Lets the server know that the window won't - * be updated anymore. - * - * Called from the server: Tells the specified client that it no longer - * holds the focus. - */ -void -XUnmapWindow( Display *dpy, Window w ) -{ - if (dpy->IsClient) { - send_char_msg( dpy, 0, _IDontWantFocus ); - } - else { - dpy->TheWindow = 0; - set_drawable_flag( dpy, (int)w, 0 ); - send_char_msg( dpy, (int)w, _YouveLostFocus ); - } - handle_fd_events( dpy, 0 ); /* flush write queue */ -} - - -/** - * \brief Block and wait for next X event. - * - * \param dpy the display handle as returned by XOpenDisplay(). - * \param event_return a pointer to an XEvent structure for the returned data. - * - * Wait until there is a new XEvent pending. - */ -int XNextEvent(Display *dpy, XEvent *event_return) -{ - for (;;) { - if ( dpy->eventqueue.head != dpy->eventqueue.tail ) - return dequeue_event( dpy, event_return ); - - handle_fd_events( dpy, 0 ); - } -} - -/** - * \brief Non-blocking check for next X event. - * - * \param dpy the display handle as returned by XOpenDisplay(). - * \param event_mask ignored. - * \param event_return a pointer to an XEvent structure for the returned data. - * - * Check if there is a new XEvent pending. Note that event_mask is - * ignored and any pending event will be returned. - */ -Bool XCheckMaskEvent(Display *dpy, long event_mask, XEvent *event_return) -{ - if ( dpy->eventqueue.head != dpy->eventqueue.tail ) - return dequeue_event( dpy, event_return ); - - handle_fd_events( dpy, 1 ); - - return dequeue_event( dpy, event_return ); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/Makefile b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/Makefile deleted file mode 100644 index 415ec02dd6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -TOP = ../../.. -include $(TOP)/configs/current - -DEFINES += -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER - -C_SOURCES = \ - $(TOP)/src/mesa/glapi/glapi.c \ - $(TOP)/src/mesa/glapi/glthread.c \ - $(TOP)/src/mesa/main/dispatch.c \ - glcontextmodes.c \ - clientattrib.c \ - compsize.c \ - eval.c \ - glxcmds.c \ - glxext.c \ - glxextensions.c \ - indirect.c \ - indirect_init.c \ - indirect_size.c \ - indirect_window_pos.c \ - indirect_transpose_matrix.c \ - indirect_vertex_array.c \ - indirect_vertex_program.c \ - pixel.c \ - pixelstore.c \ - render2.c \ - renderpix.c \ - single2.c \ - singlepix.c \ - vertarr.c \ - xfont.c \ - glx_pbuffer.c \ - glx_query.c \ - glx_texture_compression.c \ - dri_glx.c \ - XF86dri.c \ - -X86_SOURCES = $(TOP)/src/mesa/x86/glapi_x86.S -X86-64_SOURCES = $(TOP)/src/mesa/x86-64/glapi_x86-64.S - -# ASM_SOURCES = $(X86_SOURCES) - -OBJECTS = $(C_SOURCES:.c=.o) \ - $(ASM_SOURCES:.S=.o) - -INCLUDES = -I. \ - -I$(TOP)/include \ - -I$(TOP)/include/GL/internal \ - -I$(TOP)/src/mesa/main \ - -I$(TOP)/src/mesa/glapi \ - -I$(TOP)/src/mesa/drivers/dri/common \ - `pkg-config --cflags libdrm` \ - $(X11_INCLUDES) - - -##### RULES ##### - -.c.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ - -.S.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ - -##### TARGETS ##### - -default: depend $(LIB_DIR)/$(GL_LIB_NAME) - -glcontextmodes.c: - ln -s $(TOP)/src/mesa/drivers/dri/common/glcontextmodes.c . - -# Make libGL -$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile - $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \ - -major 1 -minor 2 $(MKLIB_OPTIONS) \ - -install $(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS) - - -depend: $(C_SOURCES) $(ASM_SOURCES) Makefile - touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES) - - -# Emacs tags -tags: - etags `find . -name \*.[ch]` `find ../include` - - -# Remove .o and backup files -clean: - -rm -f $(LIB_DIR)/libGL.so* - -rm -f *.o *~ - -rm -f depend - -include depend diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/XF86dri.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/XF86dri.c deleted file mode 100644 index 07aea6e075..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/XF86dri.c +++ /dev/null @@ -1,617 +0,0 @@ -/* $XFree86: xc/lib/GL/dri/XF86dri.c,v 1.13 2002/10/30 12:51:25 alanh Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright 2000 VA Linux Systems, Inc. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Jens Owen - * Rickard E. (Rik) Faith - * - */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#define NEED_REPLIES -#include -#include -#include -#include "glheader.h" -#include "xf86dristr.h" - -static XExtensionInfo _xf86dri_info_data; -static XExtensionInfo *xf86dri_info = &_xf86dri_info_data; -static char xf86dri_extension_name[] = XF86DRINAME; - -#define XF86DRICheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, xf86dri_extension_name, val) - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static int close_display(Display *dpy, XExtCodes *extCodes); -static /* const */ XExtensionHooks xf86dri_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, xf86dri_info, - xf86dri_extension_name, - &xf86dri_extension_hooks, - 0, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xf86dri_info) - - -/***************************************************************************** - * * - * public XFree86-DRI Extension routines * - * * - *****************************************************************************/ - -#if 0 -#include -#define TRACE(msg) fprintf(stderr,"XF86DRI%s\n", msg); -#else -#define TRACE(msg) -#endif - - -PUBLIC Bool XF86DRIQueryExtension (dpy, event_basep, error_basep) - Display *dpy; - int *event_basep, *error_basep; -{ - XExtDisplayInfo *info = find_display (dpy); - - TRACE("QueryExtension..."); - if (XextHasExtension(info)) { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - TRACE("QueryExtension... return True"); - return True; - } else { - TRACE("QueryExtension... return False"); - return False; - } -} - -PUBLIC Bool XF86DRIQueryVersion(dpy, majorVersion, minorVersion, patchVersion) - Display* dpy; - int* majorVersion; - int* minorVersion; - int* patchVersion; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86DRIQueryVersionReply rep; - xXF86DRIQueryVersionReq *req; - - TRACE("QueryVersion..."); - XF86DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DRIQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_XF86DRIQueryVersion; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("QueryVersion... return False"); - return False; - } - *majorVersion = rep.majorVersion; - *minorVersion = rep.minorVersion; - *patchVersion = rep.patchVersion; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("QueryVersion... return True"); - return True; -} - -PUBLIC Bool XF86DRIQueryDirectRenderingCapable(dpy, screen, isCapable) - Display* dpy; - int screen; - Bool* isCapable; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86DRIQueryDirectRenderingCapableReply rep; - xXF86DRIQueryDirectRenderingCapableReq *req; - - TRACE("QueryDirectRenderingCapable..."); - XF86DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DRIQueryDirectRenderingCapable, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_XF86DRIQueryDirectRenderingCapable; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("QueryDirectRenderingCapable... return False"); - return False; - } - *isCapable = rep.isCapable; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("QueryDirectRenderingCapable... return True"); - return True; -} - -PUBLIC Bool XF86DRIOpenConnection(dpy, screen, hSAREA, busIdString) - Display* dpy; - int screen; - drm_handle_t * hSAREA; - char **busIdString; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86DRIOpenConnectionReply rep; - xXF86DRIOpenConnectionReq *req; - - TRACE("OpenConnection..."); - XF86DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DRIOpenConnection, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_XF86DRIOpenConnection; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("OpenConnection... return False"); - return False; - } - - *hSAREA = rep.hSAREALow; - if (sizeof(drm_handle_t) == 8) { - *hSAREA |= ((drm_handle_t) rep.hSAREAHigh) << 32; - } - - if (rep.length) { - if (!(*busIdString = (char *)Xcalloc(rep.busIdStringLength + 1, 1))) { - _XEatData(dpy, ((rep.busIdStringLength+3) & ~3)); - UnlockDisplay(dpy); - SyncHandle(); - TRACE("OpenConnection... return False"); - return False; - } - _XReadPad(dpy, *busIdString, rep.busIdStringLength); - } else { - *busIdString = NULL; - } - UnlockDisplay(dpy); - SyncHandle(); - TRACE("OpenConnection... return True"); - return True; -} - -PUBLIC Bool XF86DRIAuthConnection(dpy, screen, magic) - Display* dpy; - int screen; - drm_magic_t magic; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86DRIAuthConnectionReq *req; - xXF86DRIAuthConnectionReply rep; - - TRACE("AuthConnection..."); - XF86DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DRIAuthConnection, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_XF86DRIAuthConnection; - req->screen = screen; - req->magic = magic; - rep.authenticated = 0; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse) || !rep.authenticated) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("AuthConnection... return False"); - return False; - } - UnlockDisplay(dpy); - SyncHandle(); - TRACE("AuthConnection... return True"); - return True; -} - -PUBLIC Bool XF86DRICloseConnection(dpy, screen) - Display* dpy; - int screen; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86DRICloseConnectionReq *req; - - TRACE("CloseConnection..."); - - XF86DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DRICloseConnection, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_XF86DRICloseConnection; - req->screen = screen; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("CloseConnection... return True"); - return True; -} - -PUBLIC Bool XF86DRIGetClientDriverName(dpy, screen, ddxDriverMajorVersion, - ddxDriverMinorVersion, ddxDriverPatchVersion, clientDriverName) - Display* dpy; - int screen; - int* ddxDriverMajorVersion; - int* ddxDriverMinorVersion; - int* ddxDriverPatchVersion; - char** clientDriverName; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86DRIGetClientDriverNameReply rep; - xXF86DRIGetClientDriverNameReq *req; - - TRACE("GetClientDriverName..."); - XF86DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DRIGetClientDriverName, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_XF86DRIGetClientDriverName; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetClientDriverName... return False"); - return False; - } - - *ddxDriverMajorVersion = rep.ddxDriverMajorVersion; - *ddxDriverMinorVersion = rep.ddxDriverMinorVersion; - *ddxDriverPatchVersion = rep.ddxDriverPatchVersion; - - if (rep.length) { - if (!(*clientDriverName = (char *)Xcalloc(rep.clientDriverNameLength + 1, 1))) { - _XEatData(dpy, ((rep.clientDriverNameLength+3) & ~3)); - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetClientDriverName... return False"); - return False; - } - _XReadPad(dpy, *clientDriverName, rep.clientDriverNameLength); - } else { - *clientDriverName = NULL; - } - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetClientDriverName... return True"); - return True; -} - -PUBLIC Bool XF86DRICreateContextWithConfig(dpy, screen, configID, context, - hHWContext) - Display* dpy; - int screen; - int configID; - XID* context; - drm_context_t * hHWContext; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86DRICreateContextReply rep; - xXF86DRICreateContextReq *req; - - TRACE("CreateContext..."); - XF86DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DRICreateContext, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_XF86DRICreateContext; - req->visual = configID; - req->screen = screen; - *context = XAllocID(dpy); - req->context = *context; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("CreateContext... return False"); - return False; - } - *hHWContext = rep.hHWContext; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("CreateContext... return True"); - return True; -} - -PUBLIC Bool XF86DRICreateContext(dpy, screen, visual, context, hHWContext) - Display* dpy; - int screen; - Visual* visual; - XID* context; - drm_context_t * hHWContext; -{ - return XF86DRICreateContextWithConfig( dpy, screen, visual->visualid, - context, hHWContext ); -} - -PUBLIC GLboolean XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, - __DRIid context ) -{ - Display * const dpy = (Display *) ndpy; - XExtDisplayInfo *info = find_display (dpy); - xXF86DRIDestroyContextReq *req; - - TRACE("DestroyContext..."); - XF86DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DRIDestroyContext, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_XF86DRIDestroyContext; - req->screen = screen; - req->context = context; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("DestroyContext... return True"); - return True; -} - -PUBLIC GLboolean XF86DRICreateDrawable( __DRInativeDisplay * ndpy, int screen, - __DRIid drawable, drm_drawable_t * hHWDrawable ) -{ - Display * const dpy = (Display *) ndpy; - XExtDisplayInfo *info = find_display (dpy); - xXF86DRICreateDrawableReply rep; - xXF86DRICreateDrawableReq *req; - - TRACE("CreateDrawable..."); - XF86DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DRICreateDrawable, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_XF86DRICreateDrawable; - req->screen = screen; - req->drawable = drawable; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("CreateDrawable... return False"); - return False; - } - *hHWDrawable = rep.hHWDrawable; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("CreateDrawable... return True"); - return True; -} - -PUBLIC GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen, - __DRIid drawable ) -{ - Display * const dpy = (Display *) ndpy; - XExtDisplayInfo *info = find_display (dpy); - xXF86DRIDestroyDrawableReq *req; - - TRACE("DestroyDrawable..."); - XF86DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DRIDestroyDrawable, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_XF86DRIDestroyDrawable; - req->screen = screen; - req->drawable = drawable; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("DestroyDrawable... return True"); - return True; -} - -PUBLIC Bool XF86DRIGetDrawableInfo(Display* dpy, int screen, Drawable drawable, - unsigned int* index, unsigned int* stamp, - int* X, int* Y, int* W, int* H, - int* numClipRects, drm_clip_rect_t ** pClipRects, - int* backX, int* backY, - int* numBackClipRects, drm_clip_rect_t ** pBackClipRects ) -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86DRIGetDrawableInfoReply rep; - xXF86DRIGetDrawableInfoReq *req; - int total_rects; - - TRACE("GetDrawableInfo..."); - XF86DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DRIGetDrawableInfo, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_XF86DRIGetDrawableInfo; - req->screen = screen; - req->drawable = drawable; - - if (!_XReply(dpy, (xReply *)&rep, 1, xFalse)) - { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetDrawableInfo... return False"); - return False; - } - *index = rep.drawableTableIndex; - *stamp = rep.drawableTableStamp; - *X = (int)rep.drawableX; - *Y = (int)rep.drawableY; - *W = (int)rep.drawableWidth; - *H = (int)rep.drawableHeight; - *numClipRects = rep.numClipRects; - total_rects = *numClipRects; - - *backX = rep.backX; - *backY = rep.backY; - *numBackClipRects = rep.numBackClipRects; - total_rects += *numBackClipRects; - -#if 0 - /* Because of the fix in Xserver/GL/dri/xf86dri.c, this check breaks - * backwards compatibility (Because of the >> 2 shift) but the fix - * enables multi-threaded apps to work. - */ - if (rep.length != ((((SIZEOF(xXF86DRIGetDrawableInfoReply) - - SIZEOF(xGenericReply) + - total_rects * sizeof(drm_clip_rect_t)) + 3) & ~3) >> 2)) { - _XEatData(dpy, rep.length); - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetDrawableInfo... return False"); - return False; - } -#endif - - if (*numClipRects) { - int len = sizeof(drm_clip_rect_t) * (*numClipRects); - - *pClipRects = (drm_clip_rect_t *)Xcalloc(len, 1); - if (*pClipRects) - _XRead(dpy, (char*)*pClipRects, len); - } else { - *pClipRects = NULL; - } - - if (*numBackClipRects) { - int len = sizeof(drm_clip_rect_t) * (*numBackClipRects); - - *pBackClipRects = (drm_clip_rect_t *)Xcalloc(len, 1); - if (*pBackClipRects) - _XRead(dpy, (char*)*pBackClipRects, len); - } else { - *pBackClipRects = NULL; - } - - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetDrawableInfo... return True"); - return True; -} - -PUBLIC Bool XF86DRIGetDeviceInfo(dpy, screen, hFrameBuffer, - fbOrigin, fbSize, fbStride, devPrivateSize, pDevPrivate) - Display* dpy; - int screen; - drm_handle_t * hFrameBuffer; - int* fbOrigin; - int* fbSize; - int* fbStride; - int* devPrivateSize; - void** pDevPrivate; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86DRIGetDeviceInfoReply rep; - xXF86DRIGetDeviceInfoReq *req; - - TRACE("GetDeviceInfo..."); - XF86DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DRIGetDeviceInfo, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_XF86DRIGetDeviceInfo; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetDeviceInfo... return False"); - return False; - } - - *hFrameBuffer = rep.hFrameBufferLow; - if (sizeof(drm_handle_t) == 8) { - *hFrameBuffer |= ((drm_handle_t) rep.hFrameBufferHigh) << 32; - } - - *fbOrigin = rep.framebufferOrigin; - *fbSize = rep.framebufferSize; - *fbStride = rep.framebufferStride; - *devPrivateSize = rep.devPrivateSize; - - if (rep.length) { - if (!(*pDevPrivate = (void *)Xcalloc(rep.devPrivateSize, 1))) { - _XEatData(dpy, ((rep.devPrivateSize+3) & ~3)); - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetDeviceInfo... return False"); - return False; - } - _XRead(dpy, (char*)*pDevPrivate, rep.devPrivateSize); - } else { - *pDevPrivate = NULL; - } - - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetDeviceInfo... return True"); - return True; -} - -PUBLIC Bool XF86DRIOpenFullScreen(dpy, screen, drawable) - Display* dpy; - int screen; - Drawable drawable; -{ - /* This function and the underlying X protocol are deprecated. - */ - (void) dpy; - (void) screen; - (void) drawable; - return False; -} - -PUBLIC Bool XF86DRICloseFullScreen(dpy, screen, drawable) - Display* dpy; - int screen; - Drawable drawable; -{ - /* This function and the underlying X protocol are deprecated. - */ - (void) dpy; - (void) screen; - (void) drawable; - return True; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/clientattrib.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/clientattrib.c deleted file mode 100644 index bfb263ced1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/clientattrib.c +++ /dev/null @@ -1,141 +0,0 @@ -/* $XFree86: xc/lib/GL/glx/clientattrib.c,v 1.5 2001/03/21 16:04:39 dawes Exp $ */ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#include -#include "glxclient.h" -#include "indirect.h" -#include "indirect_vertex_array.h" - -/*****************************************************************************/ - -static void -do_enable_disable(GLenum array, GLboolean val ) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - unsigned index = 0; - - if ( array == GL_TEXTURE_COORD_ARRAY ) { - index = __glXGetActiveTextureUnit( state ); - } - - if ( ! __glXSetArrayEnable( state, array, index, val ) ) { - __glXSetError(gc, GL_INVALID_ENUM); - } -} - -void __indirect_glEnableClientState(GLenum array) -{ - do_enable_disable( array, GL_TRUE ); -} - -void __indirect_glDisableClientState(GLenum array) -{ - do_enable_disable( array, GL_FALSE ); -} - -/************************************************************************/ - -void __indirect_glPushClientAttrib(GLuint mask) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - __GLXattribute **spp = gc->attributes.stackPointer, *sp; - - if (spp < &gc->attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]) { - if (!(sp = *spp)) { - sp = (__GLXattribute *)Xmalloc(sizeof(__GLXattribute)); - *spp = sp; - } - sp->mask = mask; - gc->attributes.stackPointer = spp + 1; - if (mask & GL_CLIENT_PIXEL_STORE_BIT) { - sp->storePack = state->storePack; - sp->storeUnpack = state->storeUnpack; - } - if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) { - __glXPushArrayState( state ); - } - } else { - __glXSetError(gc, GL_STACK_OVERFLOW); - return; - } -} - -void __indirect_glPopClientAttrib(void) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - __GLXattribute **spp = gc->attributes.stackPointer, *sp; - GLuint mask; - - if (spp > &gc->attributes.stack[0]) { - --spp; - sp = *spp; - assert(sp != 0); - mask = sp->mask; - gc->attributes.stackPointer = spp; - - if (mask & GL_CLIENT_PIXEL_STORE_BIT) { - state->storePack = sp->storePack; - state->storeUnpack = sp->storeUnpack; - } - if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) { - __glXPopArrayState( state ); - } - - sp->mask = 0; - } else { - __glXSetError(gc, GL_STACK_UNDERFLOW); - return; - } -} - -void __glFreeAttributeState(__GLXcontext *gc) -{ - __GLXattribute *sp, **spp; - - for (spp = &gc->attributes.stack[0]; - spp < &gc->attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]; - spp++) { - sp = *spp; - if (sp) { - XFree((char *)sp); - } else { - break; - } - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/compsize.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/compsize.c deleted file mode 100644 index 193570c848..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/compsize.c +++ /dev/null @@ -1,190 +0,0 @@ -/* $XFree86: xc/lib/GL/glx/compsize.c,v 1.6 2004/01/28 18:11:38 alanh Exp $ */ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#include -#include "indirect_size.h" - -/* -** Return the number of elements per group of a specified format -*/ -GLint __glElementsPerGroup(GLenum format, GLenum type) -{ - /* - ** To make row length computation valid for image extraction, - ** packed pixel types assume elements per group equals one. - */ - switch(type) { - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - case GL_UNSIGNED_SHORT_8_8_APPLE: - case GL_UNSIGNED_SHORT_8_8_REV_APPLE: - case GL_UNSIGNED_SHORT_15_1_MESA: - case GL_UNSIGNED_SHORT_1_15_REV_MESA: - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - case GL_UNSIGNED_INT_24_8_NV: - case GL_UNSIGNED_INT_24_8_MESA: - case GL_UNSIGNED_INT_8_24_REV_MESA: - return 1; - default: - break; - } - - switch(format) { - case GL_RGB: - case GL_BGR: - return 3; - case GL_422_EXT: - case GL_422_REV_EXT: - case GL_422_AVERAGE_EXT: - case GL_422_REV_AVERAGE_EXT: - case GL_YCBCR_422_APPLE: - case GL_LUMINANCE_ALPHA: - return 2; - case GL_RGBA: - case GL_BGRA: - case GL_ABGR_EXT: - return 4; - case GL_COLOR_INDEX: - case GL_STENCIL_INDEX: - case GL_DEPTH_COMPONENT: - case GL_RED: - case GL_GREEN: - case GL_BLUE: - case GL_ALPHA: - case GL_LUMINANCE: - case GL_INTENSITY: - return 1; - default: - return 0; - } -} - -/* -** Return the number of bytes per element, based on the element type (other -** than GL_BITMAP). -*/ -GLint __glBytesPerElement(GLenum type) -{ - switch(type) { - case GL_UNSIGNED_SHORT: - case GL_SHORT: - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - case GL_UNSIGNED_SHORT_8_8_APPLE: - case GL_UNSIGNED_SHORT_8_8_REV_APPLE: - case GL_UNSIGNED_SHORT_15_1_MESA: - case GL_UNSIGNED_SHORT_1_15_REV_MESA: - return 2; - case GL_UNSIGNED_BYTE: - case GL_BYTE: - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - return 1; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - case GL_UNSIGNED_INT_24_8_NV: - case GL_UNSIGNED_INT_24_8_MESA: - case GL_UNSIGNED_INT_8_24_REV_MESA: - return 4; - default: - return 0; - } -} - -/* -** Compute memory required for internal packed array of data of given type -** and format. -*/ -GLint __glImageSize(GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLenum type, GLenum target) -{ - int bytes_per_row; - int components; - - switch( target ) { - case GL_PROXY_TEXTURE_1D: - case GL_PROXY_TEXTURE_2D: - case GL_PROXY_TEXTURE_3D: - case GL_PROXY_TEXTURE_4D_SGIS: - case GL_PROXY_TEXTURE_CUBE_MAP: - case GL_PROXY_TEXTURE_RECTANGLE_ARB: - case GL_PROXY_HISTOGRAM: - case GL_PROXY_COLOR_TABLE: - case GL_PROXY_TEXTURE_COLOR_TABLE_SGI: - case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE: - case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE: - case GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP: - return 0; - } - - if (width < 0 || height < 0 || depth < 0) { - return 0; - } - - /* - ** Zero is returned if either format or type are invalid. - */ - components = __glElementsPerGroup(format,type); - if (type == GL_BITMAP) { - if (format == GL_COLOR_INDEX || format == GL_STENCIL_INDEX) { - bytes_per_row = (width + 7) >> 3; - } else { - return 0; - } - } else { - bytes_per_row = __glBytesPerElement(type) * width; - } - - return bytes_per_row * height * depth * components; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/dri_glx.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/dri_glx.c deleted file mode 100644 index 516ca508c5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/dri_glx.c +++ /dev/null @@ -1,461 +0,0 @@ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ -/* $XFree86: xc/lib/GL/dri/dri_glx.c,v 1.14 2003/07/16 00:54:00 dawes Exp $ */ - -/* - * Authors: - * Kevin E. Martin - * Brian Paul - * - */ - -#ifdef GLX_DIRECT_RENDERING - -#include -#include -#include -#include -#include "glxclient.h" -#include "xf86dri.h" -#include "sarea.h" -#include -#include -#include "dri_glx.h" -#include -#include - -#ifndef RTLD_NOW -#define RTLD_NOW 0 -#endif -#ifndef RTLD_GLOBAL -#define RTLD_GLOBAL 0 -#endif - - -#ifndef DEFAULT_DRIVER_DIR -/* this is normally defined in the Imakefile */ -#define DEFAULT_DRIVER_DIR "/usr/X11R6/lib/modules/dri" -#endif - -static __DRIdriver *Drivers = NULL; - - -/* - * printf wrappers - */ - -static void InfoMessageF(const char *f, ...) -{ - va_list args; - const char *env; - - if ((env = getenv("LIBGL_DEBUG")) && strstr(env, "verbose")) { - fprintf(stderr, "libGL: "); - va_start(args, f); - vfprintf(stderr, f, args); - va_end(args); - } -} - -static void ErrorMessageF(const char *f, ...) -{ - va_list args; - - if (getenv("LIBGL_DEBUG")) { - fprintf(stderr, "libGL error: "); - va_start(args, f); - vfprintf(stderr, f, args); - va_end(args); - } -} - - -/** - * Extract the ith directory path out of a colon-separated list of paths. No - * more than \c dirLen characters, including the terminating \c NUL, will be - * written to \c dir. - * - * \param index Index of path to extract (starting at zero) - * \param paths The colon-separated list of paths - * \param dirLen Maximum length of result to store in \c dir - * \param dir Buffer to hold the extracted directory path - * - * \returns - * The number of characters that would have been written to \c dir had there - * been enough room. This does not include the terminating \c NUL. When - * extraction fails, zero will be returned. - * - * \todo - * It seems like this function could be rewritten to use \c strchr. - */ -static size_t -ExtractDir(int index, const char *paths, int dirLen, char *dir) -{ - int i, len; - const char *start, *end; - - /* find ith colon */ - start = paths; - i = 0; - while (i < index) { - if (*start == ':') { - i++; - start++; - } - else if (*start == 0) { - /* end of string and couldn't find ith colon */ - dir[0] = 0; - return 0; - } - else { - start++; - } - } - - while (*start == ':') - start++; - - /* find next colon, or end of string */ - end = start + 1; - while (*end != ':' && *end != 0) { - end++; - } - - /* copy string between and into result string */ - len = end - start; - if (len > dirLen - 1) - len = dirLen - 1; - strncpy(dir, start, len); - dir[len] = 0; - - return( end - start ); -} - - -/** - * Versioned name of the expected \c __driCreateNewScreen function. - * - * The version of the last incompatible loader/driver inteface change is - * appended to the name of the \c __driCreateNewScreen function. This - * prevents loaders from trying to load drivers that are too old. - * - * \todo - * Create a macro or something so that this is automatically updated. - */ -static const char createNewScreenName[] = "__driCreateNewScreen_20050727"; - - -/** - * Try to \c dlopen the named driver. - * - * This function adds the "_dri.so" suffix to the driver name and searches the - * directories specified by the \c LIBGL_DRIVERS_PATH environment variable in - * order to find the driver. - * - * \param driverName - a name like "tdfx", "i810", "mga", etc. - * - * \returns - * A handle from \c dlopen, or \c NULL if driver file not found. - */ -static __DRIdriver *OpenDriver(const char *driverName) -{ - char *libPaths = NULL; - char libDir[1000]; - int i; - __DRIdriver *driver; - - /* First, search Drivers list to see if we've already opened this driver */ - for (driver = Drivers; driver; driver = driver->next) { - if (strcmp(driver->name, driverName) == 0) { - /* found it */ - return driver; - } - } - - if (geteuid() == getuid()) { - /* don't allow setuid apps to use LIBGL_DRIVERS_PATH */ - libPaths = getenv("LIBGL_DRIVERS_PATH"); - if (!libPaths) - libPaths = getenv("LIBGL_DRIVERS_DIR"); /* deprecated */ - } - if (!libPaths) - libPaths = DEFAULT_DRIVER_DIR; - - for ( i = 0 ; ExtractDir(i, libPaths, 1000, libDir) != 0 ; i++ ) { - char realDriverName[200]; - void *handle = NULL; - - - /* If TLS support is enabled, try to open the TLS version of the driver - * binary first. If that fails, try the non-TLS version. - */ -#ifdef GLX_USE_TLS - snprintf(realDriverName, 200, "%s/tls/%s_dri.so", libDir, driverName); - InfoMessageF("OpenDriver: trying %s\n", realDriverName); - handle = dlopen(realDriverName, RTLD_NOW | RTLD_GLOBAL); -#endif - - if ( handle == NULL ) { - snprintf(realDriverName, 200, "%s/%s_dri.so", libDir, driverName); - InfoMessageF("OpenDriver: trying %s\n", realDriverName); - handle = dlopen(realDriverName, RTLD_NOW | RTLD_GLOBAL); - } - - if ( handle != NULL ) { - /* allocate __DRIdriver struct */ - driver = (__DRIdriver *) Xmalloc(sizeof(__DRIdriver)); - if (!driver) - return NULL; /* out of memory! */ - /* init the struct */ - driver->name = __glXstrdup(driverName); - if (!driver->name) { - Xfree(driver); - return NULL; /* out of memory! */ - } - - driver->createNewScreenFunc = (PFNCREATENEWSCREENFUNC) - dlsym(handle, createNewScreenName); - - if ( driver->createNewScreenFunc == NULL ) { - /* If the driver doesn't have this symbol then something's - * really, really wrong. - */ - ErrorMessageF("%s not defined in %s_dri.so!\n" - "Your driver may be too old for this libGL.\n", - createNewScreenName, driverName); - Xfree(driver); - dlclose(handle); - continue; - } - driver->handle = handle; - /* put at head of linked list */ - driver->next = Drivers; - Drivers = driver; - return driver; - } - else { - ErrorMessageF("dlopen %s failed (%s)\n", realDriverName, dlerror()); - } - } - - ErrorMessageF("unable to find driver: %s_dri.so\n", driverName); - return NULL; -} - - -/* - * Given a display pointer and screen number, determine the name of - * the DRI driver for the screen. (I.e. "r128", "tdfx", etc). - * Return True for success, False for failure. - */ -static Bool GetDriverName(Display *dpy, int scrNum, char **driverName) -{ - int directCapable; - Bool b; - int driverMajor, driverMinor, driverPatch; - - *driverName = NULL; - - if (!XF86DRIQueryDirectRenderingCapable(dpy, scrNum, &directCapable)) { - ErrorMessageF("XF86DRIQueryDirectRenderingCapable failed\n"); - return False; - } - if (!directCapable) { - ErrorMessageF("XF86DRIQueryDirectRenderingCapable returned false\n"); - return False; - } - - b = XF86DRIGetClientDriverName(dpy, scrNum, &driverMajor, &driverMinor, - &driverPatch, driverName); - if (!b) { - ErrorMessageF("Cannot determine driver name for screen %d\n", scrNum); - return False; - } - - InfoMessageF("XF86DRIGetClientDriverName: %d.%d.%d %s (screen %d)\n", - driverMajor, driverMinor, driverPatch, *driverName, scrNum); - - return True; -} - - -/* - * Given a display pointer and screen number, return a __DRIdriver handle. - * Return NULL if anything goes wrong. - */ -__DRIdriver *driGetDriver(Display *dpy, int scrNum) -{ - char *driverName; - if (GetDriverName(dpy, scrNum, &driverName)) { - __DRIdriver *ret; - ret = OpenDriver(driverName); - if (driverName) - Xfree(driverName); - return ret; - } - return NULL; -} - - -/* - * Exported function for querying the DRI driver for a given screen. - * - * The returned char pointer points to a static array that will be - * overwritten by subsequent calls. - */ -const char *glXGetScreenDriver (Display *dpy, int scrNum) { - static char ret[32]; - char *driverName; - if (GetDriverName(dpy, scrNum, &driverName)) { - int len; - if (!driverName) - return NULL; - len = strlen (driverName); - if (len >= 31) - return NULL; - memcpy (ret, driverName, len+1); - Xfree(driverName); - return ret; - } - return NULL; -} - - -/* - * Exported function for obtaining a driver's option list (UTF-8 encoded XML). - * - * The returned char pointer points directly into the driver. Therefore - * it should be treated as a constant. - * - * If the driver was not found or does not support configuration NULL is - * returned. - * - * Note: The driver remains opened after this function returns. - */ -const char *glXGetDriverConfig (const char *driverName) { - __DRIdriver *driver = OpenDriver (driverName); - if (driver) - return dlsym (driver->handle, "__driConfigOptions"); - else - return NULL; -} - - -/* This function isn't currently used. - */ -static void driDestroyDisplay(Display *dpy, void *private) -{ - __DRIdisplayPrivate *pdpyp = (__DRIdisplayPrivate *)private; - - if (pdpyp) { - const int numScreens = ScreenCount(dpy); - int i; - for (i = 0; i < numScreens; i++) { - if (pdpyp->libraryHandles[i]) - dlclose(pdpyp->libraryHandles[i]); - } - Xfree(pdpyp->libraryHandles); - Xfree(pdpyp); - } -} - - -/* - * Allocate, initialize and return a __DRIdisplayPrivate object. - * This is called from __glXInitialize() when we are given a new - * display pointer. - */ -void *driCreateDisplay(Display *dpy, __DRIdisplay *pdisp) -{ - const int numScreens = ScreenCount(dpy); - __DRIdisplayPrivate *pdpyp; - int eventBase, errorBase; - int major, minor, patch; - int scrn; - - /* Initialize these fields to NULL in case we fail. - * If we don't do this we may later get segfaults trying to free random - * addresses when the display is closed. - */ - pdisp->private = NULL; - pdisp->destroyDisplay = NULL; - - if (!XF86DRIQueryExtension(dpy, &eventBase, &errorBase)) { - return NULL; - } - - if (!XF86DRIQueryVersion(dpy, &major, &minor, &patch)) { - return NULL; - } - - pdpyp = (__DRIdisplayPrivate *)Xmalloc(sizeof(__DRIdisplayPrivate)); - if (!pdpyp) { - return NULL; - } - - pdpyp->driMajor = major; - pdpyp->driMinor = minor; - pdpyp->driPatch = patch; - - pdisp->destroyDisplay = driDestroyDisplay; - - /* allocate array of pointers to createNewScreen funcs */ - pdisp->createNewScreen = (PFNCREATENEWSCREENFUNC *) - Xmalloc(numScreens * sizeof(void *)); - if (!pdisp->createNewScreen) { - Xfree(pdpyp); - return NULL; - } - - /* allocate array of library handles */ - pdpyp->libraryHandles = (void **) Xmalloc(numScreens * sizeof(void*)); - if (!pdpyp->libraryHandles) { - Xfree(pdisp->createNewScreen); - Xfree(pdpyp); - return NULL; - } - - /* dynamically discover DRI drivers for all screens, saving each - * driver's "__driCreateScreen" function pointer. That's the bootstrap - * entrypoint for all DRI drivers. - */ - for (scrn = 0; scrn < numScreens; scrn++) { - __DRIdriver *driver = driGetDriver(dpy, scrn); - if (driver) { - pdisp->createNewScreen[scrn] = driver->createNewScreenFunc; - pdpyp->libraryHandles[scrn] = driver->handle; - } - else { - pdisp->createNewScreen[scrn] = NULL; - pdpyp->libraryHandles[scrn] = NULL; - } - } - - return (void *)pdpyp; -} - -#endif /* GLX_DIRECT_RENDERING */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/dri_glx.h b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/dri_glx.h deleted file mode 100644 index 75561685c8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/dri_glx.h +++ /dev/null @@ -1,61 +0,0 @@ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Brian Paul - * - */ - -#ifndef _DRI_GLX_H_ -#define _DRI_GLX_H_ - -#ifdef GLX_DIRECT_RENDERING - -struct __DRIdisplayPrivateRec { - /* - ** XFree86-DRI version information - */ - int driMajor; - int driMinor; - int driPatch; - - /* - ** Array of library handles [indexed by screen number] - */ - void **libraryHandles; -}; - -typedef struct __DRIdisplayPrivateRec __DRIdisplayPrivate; -typedef struct __DRIscreenPrivateRec __DRIscreenPrivate; -typedef struct __DRIvisualPrivateRec __DRIvisualPrivate; -typedef struct __DRIcontextPrivateRec __DRIcontextPrivate; -typedef struct __DRIdrawablePrivateRec __DRIdrawablePrivate; - -#endif -#endif /* _DRI_GLX_H_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/eval.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/eval.c deleted file mode 100644 index 0f94e6da6f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/eval.c +++ /dev/null @@ -1,132 +0,0 @@ -/* $XFree86$ */ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#include "packrender.h" - -/* -** Routines to pack evaluator maps into the transport buffer. Maps are -** allowed to have extra arbitrary data, so these routines extract just -** the information that the GL needs. -*/ - -void __glFillMap1f(GLint k, GLint order, GLint stride, - const GLfloat *points, GLubyte *pc) -{ - if (stride == k) { - /* Just copy the data */ - __GLX_PUT_FLOAT_ARRAY(0, points, order * k); - } else { - GLint i; - - for (i = 0; i < order; i++) { - __GLX_PUT_FLOAT_ARRAY(0, points, k); - points += stride; - pc += k * __GLX_SIZE_FLOAT32; - } - } -} - -void __glFillMap1d(GLint k, GLint order, GLint stride, - const GLdouble *points, GLubyte *pc) -{ - if (stride == k) { - /* Just copy the data */ - __GLX_PUT_DOUBLE_ARRAY(0, points, order * k); - } else { - GLint i; - for (i = 0; i < order; i++) { - __GLX_PUT_DOUBLE_ARRAY(0, points, k); - points += stride; - pc += k * __GLX_SIZE_FLOAT64; - } - } -} - -void __glFillMap2f(GLint k, GLint majorOrder, GLint minorOrder, - GLint majorStride, GLint minorStride, - const GLfloat *points, GLfloat *data) -{ - GLint i, j, x; - - if ((minorStride == k) && (majorStride == minorOrder*k)) { - /* Just copy the data */ - __GLX_MEM_COPY(data, points, majorOrder * majorStride * - __GLX_SIZE_FLOAT32); - return; - } - for (i = 0; i < majorOrder; i++) { - for (j = 0; j < minorOrder; j++) { - for (x = 0; x < k; x++) { - data[x] = points[x]; - } - points += minorStride; - data += k; - } - points += majorStride - minorStride * minorOrder; - } -} - -void __glFillMap2d(GLint k, GLint majorOrder, GLint minorOrder, - GLint majorStride, GLint minorStride, - const GLdouble *points, GLdouble *data) -{ - int i,j,x; - - if ((minorStride == k) && (majorStride == minorOrder*k)) { - /* Just copy the data */ - __GLX_MEM_COPY(data, points, majorOrder * majorStride * - __GLX_SIZE_FLOAT64); - return; - } - -#ifdef __GLX_ALIGN64 - x = k * __GLX_SIZE_FLOAT64; -#endif - for (i = 0; i - */ - -#include -#include "glxclient.h" -#include -#include -#include -#include -#include "glapi.h" -#include "glxextensions.h" -#include "glcontextmodes.h" -#include "glheader.h" - -static void ChangeDrawableAttribute( Display * dpy, GLXDrawable drawable, - const CARD32 * attribs, size_t num_attribs ); - -static void DestroyPbuffer( Display * dpy, GLXDrawable drawable ); - -static GLXDrawable CreatePbuffer( Display *dpy, - const __GLcontextModes * fbconfig, unsigned int width, unsigned int height, - const int *attrib_list, GLboolean size_in_attribs ); - -static int GetDrawableAttribute( Display *dpy, GLXDrawable drawable, - int attribute, unsigned int *value ); - - -/** - * Change a drawable's attribute. - * - * This function is used to implement \c glXSelectEvent and - * \c glXSelectEventSGIX. - * - * \note - * This function dynamically determines whether to use the SGIX_pbuffer - * version of the protocol or the GLX 1.3 version of the protocol. - * - * \todo - * This function needs to be modified to work with direct-rendering drivers. - */ -static void -ChangeDrawableAttribute( Display * dpy, GLXDrawable drawable, - const CARD32 * attribs, size_t num_attribs ) -{ - __GLXdisplayPrivate *priv = __glXInitialize(dpy); - CARD32 * output; - - - if ( (dpy == NULL) || (drawable == 0) ) { - return; - } - - - LockDisplay(dpy); - - if ( (priv->majorVersion > 1) || (priv->minorVersion >= 3) ) { - xGLXChangeDrawableAttributesReq *req; - - GetReqExtra( GLXChangeDrawableAttributes, 8 + (8 * num_attribs), req ); - output = (CARD32 *) (req + 1); - - req->reqType = __glXSetupForCommand(dpy); - req->glxCode = X_GLXChangeDrawableAttributes; - req->drawable = drawable; - req->numAttribs = (CARD32) num_attribs; - } - else { - xGLXVendorPrivateWithReplyReq *vpreq; - - GetReqExtra( GLXVendorPrivateWithReply, 4 + (8 * num_attribs), vpreq ); - output = (CARD32 *) (vpreq + 1); - - vpreq->reqType = __glXSetupForCommand(dpy); - vpreq->glxCode = X_GLXVendorPrivateWithReply; - vpreq->vendorCode = X_GLXvop_ChangeDrawableAttributesSGIX; - - output[0] = (CARD32) drawable; - output++; - } - - (void) memcpy( output, attribs, sizeof( CARD32 ) * 2 * num_attribs ); - - UnlockDisplay(dpy); - SyncHandle(); - - return; -} - - -/** - * Destroy a pbuffer. - * - * This function is used to implement \c glXDestroyPbuffer and - * \c glXDestroyGLXPbufferSGIX. - * - * \note - * This function dynamically determines whether to use the SGIX_pbuffer - * version of the protocol or the GLX 1.3 version of the protocol. - * - * \todo - * This function needs to be modified to work with direct-rendering drivers. - */ -static void -DestroyPbuffer( Display * dpy, GLXDrawable drawable ) -{ - __GLXdisplayPrivate *priv = __glXInitialize(dpy); - - if ( (dpy == NULL) || (drawable == 0) ) { - return; - } - - - LockDisplay(dpy); - - if ( (priv->majorVersion > 1) || (priv->minorVersion >= 3) ) { - xGLXDestroyPbufferReq * req; - - GetReqExtra( GLXDestroyPbuffer, 4, req ); - req->reqType = __glXSetupForCommand(dpy); - req->glxCode = X_GLXDestroyPbuffer; - req->pbuffer = (GLXPbuffer) drawable; - } - else { - xGLXVendorPrivateWithReplyReq *vpreq; - CARD32 * data; - - GetReqExtra( GLXVendorPrivateWithReply, 4, vpreq ); - data = (CARD32 *) (vpreq + 1); - - data[0] = (CARD32) drawable; - - vpreq->reqType = __glXSetupForCommand(dpy); - vpreq->glxCode = X_GLXVendorPrivateWithReply; - vpreq->vendorCode = X_GLXvop_DestroyGLXPbufferSGIX; - } - - UnlockDisplay(dpy); - SyncHandle(); - - return; -} - - -/** - * Get a drawable's attribute. - * - * This function is used to implement \c glXGetSelectedEvent and - * \c glXGetSelectedEventSGIX. - * - * \note - * This function dynamically determines whether to use the SGIX_pbuffer - * version of the protocol or the GLX 1.3 version of the protocol. - * - * \todo - * The number of attributes returned is likely to be small, probably less than - * 10. Given that, this routine should try to use an array on the stack to - * capture the reply rather than always calling Xmalloc. - * - * \todo - * This function needs to be modified to work with direct-rendering drivers. - */ -static int -GetDrawableAttribute( Display *dpy, GLXDrawable drawable, - int attribute, unsigned int *value ) -{ - __GLXdisplayPrivate *priv = __glXInitialize(dpy); - xGLXGetDrawableAttributesReply reply; - CARD32 * data; - unsigned int length; - unsigned int i; - unsigned int num_attributes; - GLboolean use_glx_1_3 = ((priv->majorVersion > 1) - || (priv->minorVersion >= 3)); - - - if ( (dpy == NULL) || (drawable == 0) ) { - return 0; - } - - - LockDisplay(dpy); - - if ( use_glx_1_3 ) { - xGLXGetDrawableAttributesReq *req; - - GetReqExtra( GLXGetDrawableAttributes, 4, req ); - req->reqType = __glXSetupForCommand(dpy); - req->glxCode = X_GLXGetDrawableAttributes; - req->drawable = drawable; - } - else { - xGLXVendorPrivateWithReplyReq *vpreq; - - GetReqExtra( GLXVendorPrivateWithReply, 4, vpreq ); - data = (CARD32 *) (vpreq + 1); - data[0] = (CARD32) drawable; - - vpreq->reqType = __glXSetupForCommand(dpy); - vpreq->glxCode = X_GLXVendorPrivateWithReply; - vpreq->vendorCode = X_GLXvop_GetDrawableAttributesSGIX; - } - - _XReply(dpy, (xReply*) &reply, 0, False); - - length = reply.length; - num_attributes = (use_glx_1_3) ? reply.numAttribs : length / 2; - data = (CARD32 *) Xmalloc( length * sizeof(CARD32) ); - if ( data == NULL ) { - /* Throw data on the floor */ - _XEatData(dpy, length); - } else { - _XRead(dpy, (char *)data, length * sizeof(CARD32) ); - } - - UnlockDisplay(dpy); - SyncHandle(); - - - /* Search the set of returned attributes for the attribute requested by - * the caller. - */ - - for ( i = 0 ; i < num_attributes ; i++ ) { - if ( data[i*2] == attribute ) { - *value = data[ (i*2) + 1 ]; - break; - } - } - - Xfree( data ); - - return 0; -} - - -/** - * Create a non-pbuffer GLX drawable. - * - * \todo - * This function needs to be modified to work with direct-rendering drivers. - */ -static GLXDrawable -CreateDrawable( Display *dpy, const __GLcontextModes * fbconfig, - Drawable drawable, const int *attrib_list, - CARD8 glxCode ) -{ - xGLXCreateWindowReq * req; - CARD32 * data; - unsigned int i; - - i = 0; - if (attrib_list) { - while (attrib_list[i * 2] != None) - i++; - } - - LockDisplay(dpy); - GetReqExtra( GLXCreateWindow, 8 * i, req ); - data = (CARD32 *) (req + 1); - - req->reqType = __glXSetupForCommand(dpy); - req->glxCode = glxCode; - req->screen = (CARD32) fbconfig->screen; - req->fbconfig = fbconfig->fbconfigID; - req->window = (GLXPbuffer) drawable; - req->glxwindow = (GLXWindow) XAllocID(dpy); - req->numAttribs = (CARD32) i; - - memcpy( data, attrib_list, 8 * i ); - - UnlockDisplay(dpy); - SyncHandle(); - - return (GLXDrawable)req->glxwindow; -} - - -/** - * Destroy a non-pbuffer GLX drawable. - * - * \todo - * This function needs to be modified to work with direct-rendering drivers. - */ -static void -DestroyDrawable( Display * dpy, GLXDrawable drawable, CARD32 glxCode ) -{ - xGLXDestroyPbufferReq * req; - - if ( (dpy == NULL) || (drawable == 0) ) { - return; - } - - - LockDisplay(dpy); - - GetReqExtra( GLXDestroyPbuffer, 4, req ); - req->reqType = __glXSetupForCommand(dpy); - req->glxCode = glxCode; - req->pbuffer = (GLXPbuffer) drawable; - - UnlockDisplay(dpy); - SyncHandle(); - - return; -} - - -/** - * Create a pbuffer. - * - * This function is used to implement \c glXCreatePbuffer and - * \c glXCreateGLXPbufferSGIX. - * - * \note - * This function dynamically determines whether to use the SGIX_pbuffer - * version of the protocol or the GLX 1.3 version of the protocol. - * - * \todo - * This function needs to be modified to work with direct-rendering drivers. - */ -static GLXDrawable -CreatePbuffer( Display *dpy, const __GLcontextModes * fbconfig, - unsigned int width, unsigned int height, - const int *attrib_list, GLboolean size_in_attribs ) -{ - __GLXdisplayPrivate *priv = __glXInitialize(dpy); - GLXDrawable id = 0; - CARD32 * data; - unsigned int i; - - i = 0; - if (attrib_list) { - while (attrib_list[i * 2]) - i++; - } - - LockDisplay(dpy); - id = XAllocID(dpy); - - if ( (priv->majorVersion > 1) || (priv->minorVersion >= 3) ) { - xGLXCreatePbufferReq * req; - unsigned int extra = (size_in_attribs) ? 0 : 2; - - GetReqExtra( GLXCreatePbuffer, (8 * (i + extra)), req ); - data = (CARD32 *) (req + 1); - - req->reqType = __glXSetupForCommand(dpy); - req->glxCode = X_GLXCreatePbuffer; - req->screen = (CARD32) fbconfig->screen; - req->fbconfig = fbconfig->fbconfigID; - req->pbuffer = (GLXPbuffer) id; - req->numAttribs = (CARD32) (i + extra); - - if ( ! size_in_attribs ) { - data[(2 * i) + 0] = GLX_PBUFFER_WIDTH; - data[(2 * i) + 1] = width; - data[(2 * i) + 2] = GLX_PBUFFER_HEIGHT; - data[(2 * i) + 3] = height; - data += 4; - } - } - else { - xGLXVendorPrivateReq *vpreq; - - GetReqExtra( GLXVendorPrivate, 20 + (8 * i), vpreq ); - data = (CARD32 *) (vpreq + 1); - - vpreq->reqType = __glXSetupForCommand(dpy); - vpreq->glxCode = X_GLXVendorPrivate; - vpreq->vendorCode = X_GLXvop_CreateGLXPbufferSGIX; - - data[0] = (CARD32) fbconfig->screen; - data[1] = (CARD32) fbconfig->fbconfigID; - data[2] = (CARD32) id; - data[3] = (CARD32) width; - data[4] = (CARD32) height; - data += 5; - } - - (void) memcpy( data, attrib_list, sizeof(CARD32) * 2 * i ); - - UnlockDisplay(dpy); - SyncHandle(); - - return id; -} - - -/** - * Create a new pbuffer. - */ -PUBLIC GLXPbufferSGIX -glXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config, - unsigned int width, unsigned int height, - int *attrib_list) -{ - return (GLXPbufferSGIX) CreatePbuffer( dpy, (__GLcontextModes *) config, - width, height, - attrib_list, GL_FALSE ); -} - - -/** - * Create a new pbuffer. - */ -PUBLIC GLXPbuffer -glXCreatePbuffer(Display *dpy, GLXFBConfig config, const int *attrib_list) -{ - return (GLXPbuffer) CreatePbuffer( dpy, (__GLcontextModes *) config, - 0, 0, - attrib_list, GL_TRUE ); -} - - -/** - * Destroy an existing pbuffer. - */ -PUBLIC void -glXDestroyPbuffer(Display *dpy, GLXPbuffer pbuf) -{ - DestroyPbuffer( dpy, pbuf ); -} - - -/** - * Query an attribute of a drawable. - */ -PUBLIC void -glXQueryDrawable(Display *dpy, GLXDrawable drawable, - int attribute, unsigned int *value) -{ - GetDrawableAttribute( dpy, drawable, attribute, value ); -} - - -/** - * Query an attribute of a pbuffer. - */ -PUBLIC int -glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX drawable, - int attribute, unsigned int *value) -{ - return GetDrawableAttribute( dpy, drawable, attribute, value ); -} - - -/** - * Select the event mask for a drawable. - */ -PUBLIC void -glXSelectEvent(Display *dpy, GLXDrawable drawable, unsigned long mask) -{ - CARD32 attribs[2]; - - attribs[0] = (CARD32) GLX_EVENT_MASK; - attribs[1] = (CARD32) mask; - - ChangeDrawableAttribute( dpy, drawable, attribs, 1 ); -} - - -/** - * Get the selected event mask for a drawable. - */ -PUBLIC void -glXGetSelectedEvent(Display *dpy, GLXDrawable drawable, unsigned long *mask) -{ - unsigned int value; - - - /* The non-sense with value is required because on LP64 platforms - * sizeof(unsigned int) != sizeof(unsigned long). On little-endian - * we could just type-cast the pointer, but why? - */ - - GetDrawableAttribute( dpy, drawable, GLX_EVENT_MASK_SGIX, & value ); - *mask = value; -} - - -PUBLIC GLXPixmap -glXCreatePixmap( Display *dpy, GLXFBConfig config, Pixmap pixmap, - const int *attrib_list ) -{ - return CreateDrawable( dpy, (__GLcontextModes *) config, - (Drawable) pixmap, attrib_list, - X_GLXCreatePixmap ); -} - - -PUBLIC GLXWindow -glXCreateWindow( Display *dpy, GLXFBConfig config, Window win, - const int *attrib_list ) -{ - return CreateDrawable( dpy, (__GLcontextModes *) config, - (Drawable) win, attrib_list, - X_GLXCreateWindow ); -} - - -PUBLIC void -glXDestroyPixmap(Display *dpy, GLXPixmap pixmap) -{ - DestroyDrawable( dpy, (GLXDrawable) pixmap, X_GLXDestroyPixmap ); -} - - -PUBLIC void -glXDestroyWindow(Display *dpy, GLXWindow win) -{ - DestroyDrawable( dpy, (GLXDrawable) win, X_GLXDestroyWindow ); -} - - -PUBLIC GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX, - (Display *dpy, GLXPbufferSGIX pbuf), - (dpy, pbuf), - glXDestroyPbuffer) - -PUBLIC GLX_ALIAS_VOID(glXSelectEventSGIX, - (Display *dpy, GLXDrawable drawable, unsigned long mask), - (dpy, drawable, mask), - glXSelectEvent) - -PUBLIC GLX_ALIAS_VOID(glXGetSelectedEventSGIX, - (Display *dpy, GLXDrawable drawable, unsigned long *mask), - (dpy, drawable, mask), - glXGetSelectedEvent) diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glx_query.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glx_query.c deleted file mode 100644 index e93cd2afd4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glx_query.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file glx_query.c - * Generic utility functions to query internal data from the server. - * - * \author Ian Romanick - */ - -#include "glxclient.h" - -/** - * GLX protocol structure for the ficticious "GXLGenericGetString" request. - * - * This is a non-existant protocol packet. It just so happens that all of - * the real protocol packets used to request a string from the server have - * an identical binary layout. The only difference between them is the - * meaning of the \c for_whom field and the value of the \c glxCode. - */ -typedef struct GLXGenericGetString { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 for_whom B32; - CARD32 name B32; -} xGLXGenericGetStringReq; - -/* These defines are only needed to make the GetReq macro happy. - */ -#define sz_xGLXGenericGetStringReq 12 -#define X_GLXGenericGetString 0 - -/** - * Query the Server GLX string and cache it in the display private. - * This routine will allocate the necessay space for the string. - */ -char * -__glXGetStringFromServer( Display * dpy, int opcode, CARD32 glxCode, - CARD32 for_whom, CARD32 name ) -{ - xGLXGenericGetStringReq *req; - xGLXSingleReply reply; - int length; - int numbytes; - char * buf; - - - LockDisplay( dpy ); - - - /* All of the GLX protocol requests for getting a string from the server - * look the same. The exact meaning of the for_whom field is usually - * either the screen number (for glXQueryServerString) or the context tag - * (for GLXSingle). - */ - - GetReq( GLXGenericGetString, req ); - req->reqType = opcode; - req->glxCode = glxCode; - req->for_whom = for_whom; - req->name = name; - - _XReply( dpy, (xReply *) & reply, 0, False ); - - length = reply.length * 4; - numbytes = reply.size; - - buf = (char *) Xmalloc( numbytes ); - if ( buf != NULL ) { - _XRead( dpy, buf, numbytes ); - length -= numbytes; - } - - _XEatData( dpy, length ); - - UnlockDisplay( dpy ); - SyncHandle(); - - return buf; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glx_texture_compression.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glx_texture_compression.c deleted file mode 100644 index 5676858017..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glx_texture_compression.c +++ /dev/null @@ -1,347 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file glx_texture_compression.c - * Contains the routines required to implement GLX protocol for - * ARB_texture_compression and related extensions. - * - * \sa http://oss.sgi.com/projects/ogl-sample/registry/ARB/texture_compression.txt - * - * \author Ian Romanick - */ - -#include "packrender.h" -#include "packsingle.h" -#include "indirect.h" - -#include - - -void -__indirect_glGetCompressedTexImageARB( GLenum target, GLint level, - GLvoid * img ) -{ - __GLX_SINGLE_DECLARE_VARIABLES(); - xGLXGetTexImageReply reply; - size_t image_bytes; - - __GLX_SINGLE_LOAD_VARIABLES(); - __GLX_SINGLE_BEGIN( X_GLsop_GetCompressedTexImage, 8 ); - __GLX_SINGLE_PUT_LONG( 0, target ); - __GLX_SINGLE_PUT_LONG( 4, level ); - __GLX_SINGLE_READ_XREPLY(); - - image_bytes = reply.width; - assert( image_bytes <= ((4 * reply.length) - 0) ); - assert( image_bytes >= ((4 * reply.length) - 3) ); - - if ( image_bytes != 0 ) { - _XRead( dpy, (char *) img, image_bytes ); - if ( image_bytes < (4 * reply.length) ) { - _XEatData( dpy, (4 * reply.length) - image_bytes ); - } - } - - __GLX_SINGLE_END(); -} - - -/** - * Internal function used for \c glCompressedTexImage1D and - * \c glCompressedTexImage2D. - */ -static void -CompressedTexImage1D2D( GLenum target, GLint level, - GLenum internal_format, - GLsizei width, GLsizei height, - GLint border, GLsizei image_size, - const GLvoid *data, CARD32 rop ) -{ - __GLX_DECLARE_VARIABLES(); - - __GLX_LOAD_VARIABLES(); - if ( gc->currentDpy == NULL ) { - return; - } - - if ( (target == GL_PROXY_TEXTURE_1D) - || (target == GL_PROXY_TEXTURE_2D) - || (target == GL_PROXY_TEXTURE_CUBE_MAP) ) { - compsize = 0; - } - else { - compsize = image_size; - } - - cmdlen = __GLX_PAD( __GLX_COMPRESSED_TEXIMAGE_CMD_HDR_SIZE - + compsize ); - if ( cmdlen <= gc->maxSmallRenderCommandSize ) { - __GLX_BEGIN_VARIABLE( rop, cmdlen ); - __GLX_PUT_LONG( 4, target ); - __GLX_PUT_LONG( 8, level ); - __GLX_PUT_LONG( 12, internal_format ); - __GLX_PUT_LONG( 16, width ); - __GLX_PUT_LONG( 20, height ); - __GLX_PUT_LONG( 24, border ); - __GLX_PUT_LONG( 28, image_size ); - if ( compsize != 0 ) { - __GLX_PUT_CHAR_ARRAY( __GLX_COMPRESSED_TEXIMAGE_CMD_HDR_SIZE, - data, image_size ); - } - __GLX_END( cmdlen ); - } - else { - assert( compsize != 0 ); - - __GLX_BEGIN_VARIABLE_LARGE( rop, cmdlen + 4 ); - __GLX_PUT_LONG( 8, target ); - __GLX_PUT_LONG( 12, level ); - __GLX_PUT_LONG( 16, internal_format ); - __GLX_PUT_LONG( 20, width ); - __GLX_PUT_LONG( 24, height ); - __GLX_PUT_LONG( 28, border ); - __GLX_PUT_LONG( 32, image_size ); - __glXSendLargeCommand( gc, gc->pc, - __GLX_COMPRESSED_TEXIMAGE_CMD_HDR_SIZE + 4, - data, image_size ); - } -} - - -/** - * Internal function used for \c glCompressedTexSubImage1D and - * \c glCompressedTexSubImage2D. - */ -static void -CompressedTexSubImage1D2D( GLenum target, GLint level, - GLsizei xoffset, GLsizei yoffset, - GLsizei width, GLsizei height, - GLenum format, GLsizei image_size, - const GLvoid *data, CARD32 rop ) -{ - __GLX_DECLARE_VARIABLES(); - - __GLX_LOAD_VARIABLES(); - if ( gc->currentDpy == NULL ) { - return; - } - - if ( target == GL_PROXY_TEXTURE_3D ) { - compsize = 0; - } - else { - compsize = image_size; - } - - cmdlen = __GLX_PAD( __GLX_COMPRESSED_TEXSUBIMAGE_CMD_HDR_SIZE - + compsize ); - if ( cmdlen <= gc->maxSmallRenderCommandSize ) { - __GLX_BEGIN_VARIABLE( rop, cmdlen ); - __GLX_PUT_LONG( 4, target ); - __GLX_PUT_LONG( 8, level ); - __GLX_PUT_LONG( 12, xoffset ); - __GLX_PUT_LONG( 16, yoffset ); - __GLX_PUT_LONG( 20, width ); - __GLX_PUT_LONG( 24, height ); - __GLX_PUT_LONG( 28, format ); - __GLX_PUT_LONG( 32, image_size ); - if ( compsize != 0 ) { - __GLX_PUT_CHAR_ARRAY( __GLX_COMPRESSED_TEXSUBIMAGE_CMD_HDR_SIZE, - data, image_size ); - } - __GLX_END( cmdlen ); - } - else { - assert( compsize != 0 ); - - __GLX_BEGIN_VARIABLE_LARGE( rop, cmdlen + 4 ); - __GLX_PUT_LONG( 8, target ); - __GLX_PUT_LONG( 12, level ); - __GLX_PUT_LONG( 16, xoffset ); - __GLX_PUT_LONG( 20, yoffset ); - __GLX_PUT_LONG( 24, width ); - __GLX_PUT_LONG( 28, height ); - __GLX_PUT_LONG( 32, format ); - __GLX_PUT_LONG( 36, image_size ); - __glXSendLargeCommand( gc, gc->pc, - __GLX_COMPRESSED_TEXSUBIMAGE_CMD_HDR_SIZE + 4, - data, image_size ); - } -} - - -void -__indirect_glCompressedTexImage1DARB( GLenum target, GLint level, - GLenum internal_format, GLsizei width, - GLint border, GLsizei image_size, - const GLvoid *data ) -{ - CompressedTexImage1D2D( target, level, internal_format, width, 0, - border, image_size, data, - X_GLrop_CompressedTexImage1D ); -} - - -void -__indirect_glCompressedTexImage2DARB( GLenum target, GLint level, - GLenum internal_format, - GLsizei width, GLsizei height, - GLint border, GLsizei image_size, - const GLvoid *data ) -{ - CompressedTexImage1D2D( target, level, internal_format, width, height, - border, image_size, data, - X_GLrop_CompressedTexImage2D ); -} - - -void -__indirect_glCompressedTexImage3DARB( GLenum target, GLint level, - GLenum internal_format, - GLsizei width, GLsizei height, GLsizei depth, - GLint border, GLsizei image_size, - const GLvoid *data ) -{ - __GLX_DECLARE_VARIABLES(); - - __GLX_LOAD_VARIABLES(); - if ( gc->currentDpy == NULL ) { - return; - } - - cmdlen = __GLX_PAD( __GLX_COMPRESSED_TEXIMAGE_3D_CMD_HDR_SIZE - + image_size ); - if ( cmdlen <= gc->maxSmallRenderCommandSize ) { - __GLX_BEGIN_VARIABLE( X_GLrop_CompressedTexImage3D, cmdlen ); - __GLX_PUT_LONG( 4, target ); - __GLX_PUT_LONG( 8, level ); - __GLX_PUT_LONG( 12, internal_format ); - __GLX_PUT_LONG( 16, width ); - __GLX_PUT_LONG( 20, height ); - __GLX_PUT_LONG( 24, depth ); - __GLX_PUT_LONG( 28, border ); - __GLX_PUT_LONG( 32, image_size ); - if ( image_size != 0 ) { - __GLX_PUT_CHAR_ARRAY( __GLX_COMPRESSED_TEXIMAGE_3D_CMD_HDR_SIZE, - data, image_size ); - } - __GLX_END( cmdlen ); - } - else { - __GLX_BEGIN_VARIABLE_LARGE( X_GLrop_CompressedTexImage3D, - cmdlen + 4 ); - __GLX_PUT_LONG( 8, target ); - __GLX_PUT_LONG( 12, level ); - __GLX_PUT_LONG( 16, internal_format ); - __GLX_PUT_LONG( 20, width ); - __GLX_PUT_LONG( 24, height ); - __GLX_PUT_LONG( 28, depth ); - __GLX_PUT_LONG( 32, border ); - __GLX_PUT_LONG( 36, image_size ); - __glXSendLargeCommand( gc, gc->pc, - __GLX_COMPRESSED_TEXIMAGE_3D_CMD_HDR_SIZE + 4, - data, image_size ); - } -} - - -void -__indirect_glCompressedTexSubImage1DARB( GLenum target, GLint level, - GLint xoffset, - GLsizei width, - GLenum format, GLsizei image_size, - const GLvoid *data ) -{ - CompressedTexSubImage1D2D( target, level, xoffset, 0, width, 0, - format, image_size, data, - X_GLrop_CompressedTexSubImage1D ); -} - - -void -__indirect_glCompressedTexSubImage2DARB( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLsizei image_size, - const GLvoid *data ) -{ - CompressedTexSubImage1D2D( target, level, xoffset, yoffset, width, height, - format, image_size, data, - X_GLrop_CompressedTexSubImage2D ); -} - - -void -__indirect_glCompressedTexSubImage3DARB( GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLsizei image_size, - const GLvoid *data ) -{ - __GLX_DECLARE_VARIABLES(); - - __GLX_LOAD_VARIABLES(); - if ( gc->currentDpy == NULL ) { - return; - } - - cmdlen = __GLX_PAD( __GLX_COMPRESSED_TEXSUBIMAGE_3D_CMD_HDR_SIZE - + image_size ); - if ( cmdlen <= gc->maxSmallRenderCommandSize ) { - __GLX_BEGIN_VARIABLE( X_GLrop_CompressedTexSubImage3D, cmdlen ); - __GLX_PUT_LONG( 4, target ); - __GLX_PUT_LONG( 8, level ); - __GLX_PUT_LONG( 12, xoffset ); - __GLX_PUT_LONG( 16, yoffset ); - __GLX_PUT_LONG( 20, zoffset ); - __GLX_PUT_LONG( 24, width ); - __GLX_PUT_LONG( 28, height ); - __GLX_PUT_LONG( 32, depth ); - __GLX_PUT_LONG( 36, format ); - __GLX_PUT_LONG( 40, image_size ); - if ( image_size != 0 ) { - __GLX_PUT_CHAR_ARRAY( __GLX_COMPRESSED_TEXSUBIMAGE_3D_CMD_HDR_SIZE, - data, image_size ); - } - __GLX_END( cmdlen ); - } - else { - __GLX_BEGIN_VARIABLE_LARGE( X_GLrop_CompressedTexSubImage3D, - cmdlen + 4 ); - __GLX_PUT_LONG( 8, target ); - __GLX_PUT_LONG( 12, level ); - __GLX_PUT_LONG( 16, xoffset ); - __GLX_PUT_LONG( 20, yoffset ); - __GLX_PUT_LONG( 24, zoffset ); - __GLX_PUT_LONG( 28, width ); - __GLX_PUT_LONG( 32, height ); - __GLX_PUT_LONG( 36, depth ); - __GLX_PUT_LONG( 40, format ); - __GLX_PUT_LONG( 44, image_size ); - __glXSendLargeCommand( gc, gc->pc, - __GLX_COMPRESSED_TEXSUBIMAGE_3D_CMD_HDR_SIZE + 4, - data, image_size ); - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glxclient.h b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glxclient.h deleted file mode 100644 index bc9a94c5d5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glxclient.h +++ /dev/null @@ -1,690 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ -/* $XFree86: xc/lib/GL/glx/glxclient.h,v 1.21 2004/02/09 23:46:31 alanh Exp $ */ - -/** - * \file glxclient.h - * Direct rendering support added by Precision Insight, Inc. - * - * \author Kevin E. Martin - */ - -#ifndef _GLX_client_h_ -#define _GLX_client_h_ -#define NEED_REPLIES -#define NEED_EVENTS -#include -#include -#define GLX_GLXEXT_PROTOTYPES -#include -#include -#include -#include -#include -#ifdef WIN32 -#include -#endif -#include "GL/glxint.h" -#include "GL/glxproto.h" -#include "GL/internal/glcore.h" -#include "glapitable.h" -#include "glxextensions.h" -#if defined( USE_XTHREADS ) -# include -#elif defined( PTHREADS ) -# include -#endif - -#define GLX_MAJOR_VERSION 1 /* current version numbers */ -#define GLX_MINOR_VERSION 4 - -#define __GLX_MAX_TEXTURE_UNITS 32 - -typedef struct __GLXcontextRec __GLXcontext; -typedef struct __GLXdisplayPrivateRec __GLXdisplayPrivate; -typedef struct _glapi_table __GLapi; - -/************************************************************************/ - -#ifdef GLX_DIRECT_RENDERING - -#include - - -/** - * Display dependent methods. This structure is initialized during the - * \c driCreateDisplay call. - */ -struct __DRIdisplayRec { - /** - * Method to destroy the private DRI display data. - */ - void (*destroyDisplay)(Display *dpy, void *displayPrivate); - - /** - * Opaque pointer to private per display direct rendering data. - * \c NULL if direct rendering is not supported on this display. - */ - struct __DRIdisplayPrivateRec *private; - - /** - * Array of pointers to methods to create and initialize the private DRI - * screen data. - */ - PFNCREATENEWSCREENFUNC * createNewScreen; -}; - - -/* -** We keep a linked list of these structures, one per DRI device driver. -*/ -struct __DRIdriverRec { - const char *name; - void *handle; - PFNCREATENEWSCREENFUNC createNewScreenFunc; - struct __DRIdriverRec *next; -}; - -/* -** Function to create and DRI display data and initialize the display -** dependent methods. -*/ -extern void *driCreateDisplay(Display *dpy, __DRIdisplay *pdisp); - -extern __DRIdriver *driGetDriver(Display *dpy, int scrNum); - -extern void DRI_glXUseXFont( Font font, int first, int count, int listbase ); - -/* -** Functions to obtain driver configuration information from a direct -** rendering client application -*/ -extern const char *glXGetScreenDriver (Display *dpy, int scrNum); - -extern const char *glXGetDriverConfig (const char *driverName); - -extern Bool __glXWindowExists(Display *dpy, GLXDrawable draw); - -#endif - -/************************************************************************/ - -#define __GL_CLIENT_ATTRIB_STACK_DEPTH 16 - -typedef struct __GLXpixelStoreModeRec { - GLboolean swapEndian; - GLboolean lsbFirst; - GLuint rowLength; - GLuint imageHeight; - GLuint imageDepth; - GLuint skipRows; - GLuint skipPixels; - GLuint skipImages; - GLuint alignment; -} __GLXpixelStoreMode; - - -typedef struct __GLXattributeRec { - GLuint mask; - - /** - * Pixel storage state. Most of the pixel store mode state is kept - * here and used by the client code to manage the packing and - * unpacking of data sent to/received from the server. - */ - __GLXpixelStoreMode storePack, storeUnpack; - - /** - * Is EXT_vertex_array / GL 1.1 DrawArrays protocol specifically - * disabled? - */ - GLboolean NoDrawArraysProtocol; - - /** - * Vertex Array storage state. The vertex array component - * state is stored here and is used to manage the packing of - * DrawArrays data sent to the server. - */ - struct array_state_vector * array_state; -} __GLXattribute; - -typedef struct __GLXattributeMachineRec { - __GLXattribute *stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]; - __GLXattribute **stackPointer; -} __GLXattributeMachine; - -/** - * GLX state that needs to be kept on the client. One of these records - * exist for each context that has been made current by this client. - */ -struct __GLXcontextRec { - /** - * \name Drawing command buffer. - * - * Drawing commands are packed into this buffer before being sent as a - * single GLX protocol request. The buffer is sent when it overflows or - * is flushed by \c __glXFlushRenderBuffer. \c pc is the next location - * in the buffer to be filled. \c limit is described above in the buffer - * slop discussion. - * - * Commands that require large amounts of data to be transfered will - * also use this buffer to hold a header that describes the large - * command. - * - * These must be the first 6 fields since they are static initialized - * in the dummy context in glxext.c - */ - /*@{*/ - GLubyte *buf; - GLubyte *pc; - GLubyte *limit; - GLubyte *bufEnd; - GLint bufSize; - /*@}*/ - - /** - * The XID of this rendering context. When the context is created a - * new XID is allocated. This is set to None when the context is - * destroyed but is still current to some thread. In this case the - * context will be freed on next MakeCurrent. - */ - XID xid; - - /** - * The XID of the \c shareList context. - */ - XID share_xid; - - /** - * Visual id. - * - * \deprecated - * This filed has been largely been replaced by the \c mode field, but - * the work is not quite done. - */ - VisualID vid; - - /** - * Screen number. - */ - GLint screen; - - /** - * \c GL_TRUE if the context was created with ImportContext, which - * means the server-side context was created by another X client. - */ - GLboolean imported; - - /** - * The context tag returned by MakeCurrent when this context is made - * current. This tag is used to identify the context that a thread has - * current so that proper server context management can be done. It is - * used for all context specific commands (i.e., \c Render, \c RenderLarge, - * \c WaitX, \c WaitGL, \c UseXFont, and \c MakeCurrent (for the old - * context)). - */ - GLXContextTag currentContextTag; - - /** - * \name Rendering mode - * - * The rendering mode is kept on the client as well as the server. - * When \c glRenderMode is called, the buffer associated with the - * previous rendering mode (feedback or select) is filled. - */ - /*@{*/ - GLenum renderMode; - GLfloat *feedbackBuf; - GLuint *selectBuf; - /*@}*/ - - /** - * This is \c GL_TRUE if the pixel unpack modes are such that an image - * can be unpacked from the clients memory by just copying. It may - * still be true that the server will have to do some work. This - * just promises that a straight copy will fetch the correct bytes. - */ - GLboolean fastImageUnpack; - - /** - * Fill newImage with the unpacked form of \c oldImage getting it - * ready for transport to the server. - */ - void (*fillImage)(__GLXcontext*, GLint, GLint, GLint, GLint, GLenum, - GLenum, const GLvoid*, GLubyte*, GLubyte*); - - /** - * Client side attribs. - */ - __GLXattributeMachine attributes; - - /** - * Client side error code. This is set when client side gl API - * routines need to set an error because of a bad enumerant or - * running out of memory, etc. - */ - GLenum error; - - /** - * Whether this context does direct rendering. - */ - Bool isDirect; - - /** - * \c dpy of current display for this context. Will be \c NULL if not - * current to any display, or if this is the "dummy context". - */ - Display *currentDpy; - - /** - * The current drawable for this context. Will be None if this - * context is not current to any drawable. currentReadable is below. - */ - GLXDrawable currentDrawable; - - /** - * \name GL Constant Strings - * - * Constant strings that describe the server implementation - * These pertain to GL attributes, not to be confused with - * GLX versioning attributes. - */ - /*@{*/ - GLubyte *vendor; - GLubyte *renderer; - GLubyte *version; - GLubyte *extensions; - /*@}*/ - - /** - * Record the dpy this context was created on for later freeing - */ - Display *createDpy; - - /** - * Maximum small render command size. This is the smaller of 64k and - * the size of the above buffer. - */ - GLint maxSmallRenderCommandSize; - - /** - * Major opcode for the extension. Copied here so a lookup isn't - * needed. - */ - GLint majorOpcode; - -#ifdef GLX_DIRECT_RENDERING - /** - * Per context direct rendering interface functions and data. - */ - __DRIcontext driContext; -#endif - - /** - * \c GLXFBConfigID used to create this context. May be \c None. This - * field has been replaced by the \c mode field. - * - * \since Internal API version 20030317. - * - * \deprecated - * This filed has been largely been replaced by the \c mode field, but - * the work is not quite done. - */ - GLXFBConfigID fbconfigID; - - /** - * The current read-drawable for this context. Will be None if this - * context is not current to any drawable. - * - * \since Internal API version 20030606. - */ - GLXDrawable currentReadable; - - /** - * Pointer to client-state data that is private to libGL. This is only - * used for indirect rendering contexts. - * - * No internal API version change was made for this change. Client-side - * drivers should NEVER use this data or even care that it exists. - */ - void * client_state_private; - - /** - * Stored value for \c glXQueryContext attribute \c GLX_RENDER_TYPE. - */ - int renderType; - - /** - * \name Raw server GL version - * - * True core GL version supported by the server. This is the raw value - * returned by the server, and it may not reflect what is actually - * supported (or reported) by the client-side library. - */ - /*@{*/ - int server_major; /**< Major version number. */ - int server_minor; /**< Minor version number. */ - /*@}*/ - - char gl_extension_bits[ __GL_EXT_BYTES ]; -}; - -#define __glXSetError(gc,code) \ - if (!(gc)->error) { \ - (gc)->error = code; \ - } - -extern void __glFreeAttributeState(__GLXcontext *); - -/************************************************************************/ - -/** - * The size of the largest drawing command known to the implementation - * that will use the GLXRender GLX command. In this case it is - * \c glPolygonStipple. - */ -#define __GLX_MAX_SMALL_RENDER_CMD_SIZE 156 - -/** - * To keep the implementation fast, the code uses a "limit" pointer - * to determine when the drawing command buffer is too full to hold - * another fixed size command. This constant defines the amount of - * space that must always be available in the drawing command buffer - * at all times for the implementation to work. It is important that - * the number be just large enough, but not so large as to reduce the - * efficacy of the buffer. The "+32" is just to keep the code working - * in case somebody counts wrong. - */ -#define __GLX_BUFFER_LIMIT_SIZE (__GLX_MAX_SMALL_RENDER_CMD_SIZE + 32) - -/** - * This implementation uses a smaller threshold for switching - * to the RenderLarge protocol than the protcol requires so that - * large copies don't occur. - */ -#define __GLX_RENDER_CMD_SIZE_LIMIT 4096 - -/** - * One of these records exists per screen of the display. It contains - * a pointer to the config data for that screen (if the screen supports GL). - */ -typedef struct __GLXscreenConfigsRec { - /** - * GLX extension string reported by the X-server. - */ - const char *serverGLXexts; - - /** - * GLX extension string to be reported to applications. This is the - * set of extensions that the application can actually use. - */ - char *effectiveGLXexts; - -#ifdef GLX_DIRECT_RENDERING - /** - * Per screen direct rendering interface functions and data. - */ - __DRIscreen driScreen; -#endif - - /** - * Linked list of configurations for this screen. - */ - __GLcontextModes *configs; - - /** - * Per-screen dynamic GLX extension tracking. The \c direct_support - * field only contains enough bits for 64 extensions. Should libGL - * ever need to track more than 64 GLX extensions, we can safely grow - * this field. The \c __GLXscreenConfigs structure is not used outside - * libGL. - */ - /*@{*/ - unsigned char direct_support[8]; - GLboolean ext_list_first_time; - /*@}*/ - -} __GLXscreenConfigs; - -/** - * Per display private data. One of these records exists for each display - * that is using the OpenGL (GLX) extension. - */ -struct __GLXdisplayPrivateRec { - /** - * Back pointer to the display - */ - Display *dpy; - - /** - * The \c majorOpcode is common to all connections to the same server. - * It is also copied into the context structure. - */ - int majorOpcode; - - /** - * \name Server Version - * - * Major and minor version returned by the server during initialization. - */ - /*@{*/ - int majorVersion, minorVersion; - /*@}*/ - - /** - * \name Storage for the servers GLX vendor and versions strings. - * - * These are the same for all screens on this display. These fields will - * be filled in on demand. - */ - /*@{*/ - const char *serverGLXvendor; - const char *serverGLXversion; - /*@}*/ - - /** - * Configurations of visuals for all screens on this display. - * Also, per screen data which now includes the server \c GLX_EXTENSION - * string. - */ - __GLXscreenConfigs *screenConfigs; - -#ifdef GLX_DIRECT_RENDERING - /** - * Per display direct rendering interface functions and data. - */ - __DRIdisplay driDisplay; -#endif -}; - -void __glXFreeContext(__GLXcontext*); - -extern GLubyte *__glXFlushRenderBuffer(__GLXcontext*, GLubyte*); - -extern void __glXSendLargeChunk(__GLXcontext *gc, GLint requestNumber, - GLint totalRequests, - const GLvoid * data, GLint dataLen); - -extern void __glXSendLargeCommand(__GLXcontext *, const GLvoid *, GLint, - const GLvoid *, GLint); - -/* Initialize the GLX extension for dpy */ -extern __GLXdisplayPrivate *__glXInitialize(Display*); - -/************************************************************************/ - -extern int __glXDebug; - -/* This is per-thread storage in an MT environment */ -#if defined( USE_XTHREADS ) || defined( PTHREADS ) - -extern void __glXSetCurrentContext(__GLXcontext *c); - -# if defined( GLX_USE_TLS ) - -extern __thread void * __glX_tls_Context - __attribute__((tls_model("initial-exec"))); - -# define __glXGetCurrentContext() __glX_tls_Context - -# else - -extern __GLXcontext *__glXGetCurrentContext(void); - -# endif /* defined( GLX_USE_TLS ) */ - -#else - -extern __GLXcontext *__glXcurrentContext; -#define __glXGetCurrentContext() __glXcurrentContext -#define __glXSetCurrentContext(gc) __glXcurrentContext = gc - -#endif /* defined( USE_XTHREADS ) || defined( PTHREADS ) */ - - -/* -** Global lock for all threads in this address space using the GLX -** extension -*/ -#if defined( USE_XTHREADS ) -extern xmutex_rec __glXmutex; -#define __glXLock() xmutex_lock(&__glXmutex) -#define __glXUnlock() xmutex_unlock(&__glXmutex) -#elif defined( PTHREADS ) -extern pthread_mutex_t __glXmutex; -#define __glXLock() pthread_mutex_lock(&__glXmutex) -#define __glXUnlock() pthread_mutex_unlock(&__glXmutex) -#else -#define __glXLock() -#define __glXUnlock() -#endif - -/* -** Setup for a command. Initialize the extension for dpy if necessary. -*/ -extern CARD8 __glXSetupForCommand(Display *dpy); - -/************************************************************************/ - -/* -** Data conversion and packing support. -*/ - -extern const GLuint __glXDefaultPixelStore[9]; - -/* Send an image to the server using RenderLarge. */ -extern void __glXSendLargeImage(__GLXcontext *gc, GLint compsize, GLint dim, - GLint width, GLint height, GLint depth, GLenum format, GLenum type, - const GLvoid *src, GLubyte *pc, GLubyte *modes); - -/* Return the size, in bytes, of some pixel data */ -extern GLint __glImageSize(GLint, GLint, GLint, GLenum, GLenum, GLenum); - -/* Return the number of elements per group of a specified format*/ -extern GLint __glElementsPerGroup(GLenum format, GLenum type); - -/* Return the number of bytes per element, based on the element type (other -** than GL_BITMAP). -*/ -extern GLint __glBytesPerElement(GLenum type); - -/* -** Fill the transport buffer with the data from the users buffer, -** applying some of the pixel store modes (unpack modes) to the data -** first. As a side effect of this call, the "modes" field is -** updated to contain the modes needed by the server to decode the -** sent data. -*/ -extern void __glFillImage(__GLXcontext*, GLint, GLint, GLint, GLint, GLenum, - GLenum, const GLvoid*, GLubyte*, GLubyte*); - -/* Copy map data with a stride into a packed buffer */ -extern void __glFillMap1f(GLint, GLint, GLint, const GLfloat *, GLubyte *); -extern void __glFillMap1d(GLint, GLint, GLint, const GLdouble *, GLubyte *); -extern void __glFillMap2f(GLint, GLint, GLint, GLint, GLint, - const GLfloat *, GLfloat *); -extern void __glFillMap2d(GLint, GLint, GLint, GLint, GLint, - const GLdouble *, GLdouble *); - -/* -** Empty an image out of the reply buffer into the clients memory applying -** the pack modes to pack back into the clients requested format. -*/ -extern void __glEmptyImage(__GLXcontext*, GLint, GLint, GLint, GLint, GLenum, - GLenum, const GLubyte *, GLvoid *); - - -/* -** Allocate and Initialize Vertex Array client state -*/ -extern void __glXInitVertexArrayState(__GLXcontext*); - -/* -** Inform the Server of the major and minor numbers and of the client -** libraries extension string. -*/ -extern void __glXClientInfo ( Display *dpy, int opcode ); - -/************************************************************************/ - -/* -** Declarations that should be in Xlib -*/ -#ifdef __GL_USE_OUR_PROTOTYPES -extern void _XFlush(Display*); -extern Status _XReply(Display*, xReply*, int, Bool); -extern void _XRead(Display*, void*, long); -extern void _XSend(Display*, const void*, long); -#endif - - -extern void __glXInitializeVisualConfigFromTags( __GLcontextModes *config, - int count, const INT32 *bp, Bool tagged_only, Bool fbconfig_style_tags ); - -extern char * __glXGetStringFromServer( Display * dpy, int opcode, - CARD32 glxCode, CARD32 for_whom, CARD32 name ); - -extern char *__glXstrdup(const char *str); - - -extern const char __glXGLClientVersion[]; -extern const char __glXGLClientExtensions[]; - -/* Determine the internal API version */ -extern int __glXGetInternalVersion(void); - -/* Get the unadjusted system time */ -extern int __glXGetUST( int64_t * ust ); - -#endif /* !__GLX_client_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glxcmds.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glxcmds.c deleted file mode 100644 index 6a31f24dd8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glxcmds.c +++ /dev/null @@ -1,2969 +0,0 @@ -/* $XFree86: xc/lib/GL/glx/glxcmds.c,v 1.30 2004/01/30 20:33:06 alanh Exp $ */ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -/** - * \file glxcmds.c - * Client-side GLX interface. - */ - -#include -#include "glxclient.h" -#include -#include -#include -#include -#include "glapi.h" -#ifdef GLX_DIRECT_RENDERING -#include "indirect_init.h" -#include -#include "xf86dri.h" -#endif -#include "glxextensions.h" -#include "glcontextmodes.h" -#include "glheader.h" -#include - -static const char __glXGLXClientVendorName[] = "SGI"; -static const char __glXGLXClientVersion[] = "1.4"; - - -/****************************************************************************/ -/** - * Get the __DRIdrawable for the drawable associated with a GLXContext - * - * \param dpy The display associated with \c drawable. - * \param drawable GLXDrawable whose __DRIdrawable part is to be retrieved. - * \returns A pointer to the context's __DRIdrawable on success, or NULL if - * the drawable is not associated with a direct-rendering context. - */ - -#ifdef GLX_DIRECT_RENDERING -static __DRIdrawable * -GetDRIDrawable( Display *dpy, GLXDrawable drawable, int * const scrn_num ) -{ - __GLXdisplayPrivate * const priv = __glXInitialize(dpy); - - if ( (priv != NULL) && (priv->driDisplay.private != NULL) ) { - const unsigned screen_count = ScreenCount(dpy); - unsigned i; - - for ( i = 0 ; i < screen_count ; i++ ) { - __DRIscreen * const psc = &priv->screenConfigs[i].driScreen; - __DRIdrawable * const pdraw = (psc->private != NULL) - ? (*psc->getDrawable)(dpy, drawable, psc->private) : NULL; - - if ( pdraw != NULL ) { - if ( scrn_num != NULL ) { - *scrn_num = i; - } - return pdraw; - } - } - } - - return NULL; -} -#endif - - -/** - * Get the GLX per-screen data structure associated with a GLX context. - * - * \param dpy Display for which the GLX per-screen information is to be - * retrieved. - * \param scrn Screen on \c dpy for which the GLX per-screen information is - * to be retrieved. - * \returns A pointer to the GLX per-screen data if \c dpy and \c scrn - * specify a valid GLX screen, or NULL otherwise. - * - * \todo Should this function validate that \c scrn is within the screen - * number range for \c dpy? - */ - -static __GLXscreenConfigs * -GetGLXScreenConfigs(Display *dpy, int scrn) -{ - __GLXdisplayPrivate * const priv = __glXInitialize(dpy); - - return (priv->screenConfigs != NULL) ? &priv->screenConfigs[scrn] : NULL; -} - - -static int -GetGLXPrivScreenConfig( Display *dpy, int scrn, __GLXdisplayPrivate ** ppriv, - __GLXscreenConfigs ** ppsc ) -{ - /* Initialize the extension, if needed . This has the added value - * of initializing/allocating the display private - */ - - if ( dpy == NULL ) { - return GLX_NO_EXTENSION; - } - - *ppriv = __glXInitialize(dpy); - if ( *ppriv == NULL ) { - return GLX_NO_EXTENSION; - } - - /* Check screen number to see if its valid */ - if ((scrn < 0) || (scrn >= ScreenCount(dpy))) { - return GLX_BAD_SCREEN; - } - - /* Check to see if the GL is supported on this screen */ - *ppsc = &((*ppriv)->screenConfigs[scrn]); - if ( (*ppsc)->configs == NULL ) { - /* No support for GL on this screen regardless of visual */ - return GLX_BAD_VISUAL; - } - - return Success; -} - - -/** - * Determine if a \c GLXFBConfig supplied by the application is valid. - * - * \param dpy Application supplied \c Display pointer. - * \param config Application supplied \c GLXFBConfig. - * - * \returns If the \c GLXFBConfig is valid, the a pointer to the matching - * \c __GLcontextModes structure is returned. Otherwise, \c NULL - * is returned. - */ -static __GLcontextModes * -ValidateGLXFBConfig( Display * dpy, GLXFBConfig config ) -{ - __GLXdisplayPrivate * const priv = __glXInitialize(dpy); - const unsigned num_screens = ScreenCount(dpy); - unsigned i; - const __GLcontextModes * modes; - - - if ( priv != NULL ) { - for ( i = 0 ; i < num_screens ; i++ ) { - for ( modes = priv->screenConfigs[i].configs - ; modes != NULL - ; modes = modes->next ) { - if ( modes == (__GLcontextModes *) config ) { - return (__GLcontextModes *) config; - } - } - } - } - - return NULL; -} - - -/** - * \todo It should be possible to move the allocate of \c client_state_private - * later in the function for direct-rendering contexts. Direct-rendering - * contexts don't need to track client state, so they don't need that memory - * at all. - * - * \todo Eliminate \c __glXInitVertexArrayState. Replace it with a new - * function called \c __glXAllocateClientState that allocates the memory and - * does all the initialization (including the pixel pack / unpack). - */ -static -GLXContext AllocateGLXContext( Display *dpy ) -{ - GLXContext gc; - int bufSize; - CARD8 opcode; - __GLXattribute *state; - - if (!dpy) - return NULL; - - opcode = __glXSetupForCommand(dpy); - if (!opcode) { - return NULL; - } - - /* Allocate our context record */ - gc = (GLXContext) Xmalloc(sizeof(struct __GLXcontextRec)); - if (!gc) { - /* Out of memory */ - return NULL; - } - memset(gc, 0, sizeof(struct __GLXcontextRec)); - - state = Xmalloc(sizeof(struct __GLXattributeRec)); - if (state == NULL) { - /* Out of memory */ - Xfree(gc); - return NULL; - } - gc->client_state_private = state; - memset(gc->client_state_private, 0, sizeof(struct __GLXattributeRec)); - state->NoDrawArraysProtocol = (getenv("LIBGL_NO_DRAWARRAYS") != NULL); - - /* - ** Create a temporary buffer to hold GLX rendering commands. The size - ** of the buffer is selected so that the maximum number of GLX rendering - ** commands can fit in a single X packet and still have room in the X - ** packet for the GLXRenderReq header. - */ - - bufSize = (XMaxRequestSize(dpy) * 4) - sz_xGLXRenderReq; - gc->buf = (GLubyte *) Xmalloc(bufSize); - if (!gc->buf) { - Xfree(gc->client_state_private); - Xfree(gc); - return NULL; - } - gc->bufSize = bufSize; - - /* Fill in the new context */ - gc->renderMode = GL_RENDER; - - state->storePack.alignment = 4; - state->storeUnpack.alignment = 4; - - gc->attributes.stackPointer = &gc->attributes.stack[0]; - - /* - ** PERFORMANCE NOTE: A mode dependent fill image can speed things up. - ** Other code uses the fastImageUnpack bit, but it is never set - ** to GL_TRUE. - */ - gc->fastImageUnpack = GL_FALSE; - gc->fillImage = __glFillImage; - gc->isDirect = GL_FALSE; - gc->pc = gc->buf; - gc->bufEnd = gc->buf + bufSize; - if (__glXDebug) { - /* - ** Set limit register so that there will be one command per packet - */ - gc->limit = gc->buf; - } else { - gc->limit = gc->buf + bufSize - __GLX_BUFFER_LIMIT_SIZE; - } - gc->createDpy = dpy; - gc->majorOpcode = opcode; - - /* - ** Constrain the maximum drawing command size allowed to be - ** transfered using the X_GLXRender protocol request. First - ** constrain by a software limit, then constrain by the protocl - ** limit. - */ - if (bufSize > __GLX_RENDER_CMD_SIZE_LIMIT) { - bufSize = __GLX_RENDER_CMD_SIZE_LIMIT; - } - if (bufSize > __GLX_MAX_RENDER_CMD_SIZE) { - bufSize = __GLX_MAX_RENDER_CMD_SIZE; - } - gc->maxSmallRenderCommandSize = bufSize; - return gc; -} - - -/** - * Create a new context. Exactly one of \c vis and \c fbconfig should be - * non-NULL. - * - * \param use_glx_1_3 For FBConfigs, should GLX 1.3 protocol or - * SGIX_fbconfig protocol be used? - * \param renderType For FBConfigs, what is the rendering type? - */ - -static GLXContext -CreateContext(Display *dpy, XVisualInfo *vis, - const __GLcontextModes * const fbconfig, - GLXContext shareList, - Bool allowDirect, GLXContextID contextID, - Bool use_glx_1_3, int renderType) -{ - GLXContext gc; - - if ( dpy == NULL ) - return NULL; - - gc = AllocateGLXContext(dpy); - if (!gc) - return NULL; - - if (None == contextID) { - if ( (vis == NULL) && (fbconfig == NULL) ) - return NULL; - -#ifdef GLX_DIRECT_RENDERING - if (allowDirect) { - int screen = (fbconfig == NULL) ? vis->screen : fbconfig->screen; - __GLXscreenConfigs * const psc = GetGLXScreenConfigs(dpy, screen); - const __GLcontextModes * mode; - - /* The value of fbconfig cannot change because it is tested - * later in the function. - */ - if ( fbconfig == NULL ) { - /* FIXME: Is it possible for the __GLcontextModes structure - * FIXME: to not be found? - */ - mode = _gl_context_modes_find_visual( psc->configs, - vis->visualid ); - assert( mode != NULL ); - assert( mode->screen == screen ); - } - else { - mode = fbconfig; - } - - if (psc && psc->driScreen.private) { - void * const shared = (shareList != NULL) - ? shareList->driContext.private : NULL; - gc->driContext.private = - (*psc->driScreen.createNewContext)( dpy, mode, renderType, - shared, - &gc->driContext ); - if (gc->driContext.private) { - gc->isDirect = GL_TRUE; - gc->screen = mode->screen; - gc->vid = mode->visualID; - gc->fbconfigID = mode->fbconfigID; - gc->driContext.mode = mode; - } - } - } -#endif - - LockDisplay(dpy); - if ( fbconfig == NULL ) { - xGLXCreateContextReq *req; - - /* Send the glXCreateContext request */ - GetReq(GLXCreateContext,req); - req->reqType = gc->majorOpcode; - req->glxCode = X_GLXCreateContext; - req->context = gc->xid = XAllocID(dpy); - req->visual = vis->visualid; - req->screen = vis->screen; - req->shareList = shareList ? shareList->xid : None; - req->isDirect = gc->isDirect; - } - else if ( use_glx_1_3 ) { - xGLXCreateNewContextReq *req; - - /* Send the glXCreateNewContext request */ - GetReq(GLXCreateNewContext,req); - req->reqType = gc->majorOpcode; - req->glxCode = X_GLXCreateNewContext; - req->context = gc->xid = XAllocID(dpy); - req->fbconfig = fbconfig->fbconfigID; - req->screen = fbconfig->screen; - req->renderType = renderType; - req->shareList = shareList ? shareList->xid : None; - req->isDirect = gc->isDirect; - } - else { - xGLXVendorPrivateWithReplyReq *vpreq; - xGLXCreateContextWithConfigSGIXReq *req; - - /* Send the glXCreateNewContext request */ - GetReqExtra(GLXVendorPrivateWithReply, - sz_xGLXCreateContextWithConfigSGIXReq-sz_xGLXVendorPrivateWithReplyReq,vpreq); - req = (xGLXCreateContextWithConfigSGIXReq *)vpreq; - req->reqType = gc->majorOpcode; - req->glxCode = X_GLXVendorPrivateWithReply; - req->vendorCode = X_GLXvop_CreateContextWithConfigSGIX; - req->context = gc->xid = XAllocID(dpy); - req->fbconfig = fbconfig->fbconfigID; - req->screen = fbconfig->screen; - req->renderType = renderType; - req->shareList = shareList ? shareList->xid : None; - req->isDirect = gc->isDirect; - } - - UnlockDisplay(dpy); - SyncHandle(); - gc->imported = GL_FALSE; - } - else { - gc->xid = contextID; - gc->imported = GL_TRUE; - } - - return gc; -} - -PUBLIC GLXContext glXCreateContext(Display *dpy, XVisualInfo *vis, - GLXContext shareList, Bool allowDirect) -{ - return CreateContext(dpy, vis, NULL, shareList, allowDirect, None, - False, 0); -} - -void __glXFreeContext(__GLXcontext *gc) -{ - if (gc->vendor) XFree((char *) gc->vendor); - if (gc->renderer) XFree((char *) gc->renderer); - if (gc->version) XFree((char *) gc->version); - if (gc->extensions) XFree((char *) gc->extensions); - __glFreeAttributeState(gc); - XFree((char *) gc->buf); - Xfree((char *) gc->client_state_private); - XFree((char *) gc); - -} - -/* -** Destroy the named context -*/ -static void -DestroyContext(Display *dpy, GLXContext gc) -{ - xGLXDestroyContextReq *req; - GLXContextID xid; - CARD8 opcode; - GLboolean imported; - - opcode = __glXSetupForCommand(dpy); - if (!opcode || !gc) { - return; - } - - __glXLock(); - xid = gc->xid; - imported = gc->imported; - gc->xid = None; - -#ifdef GLX_DIRECT_RENDERING - /* Destroy the direct rendering context */ - if (gc->isDirect) { - if (gc->driContext.private) { - (*gc->driContext.destroyContext)(dpy, gc->screen, - gc->driContext.private); - gc->driContext.private = NULL; - } - } -#endif - - if (gc->currentDpy) { - /* Have to free later cuz it's in use now */ - __glXUnlock(); - } else { - /* Destroy the handle if not current to anybody */ - __glXUnlock(); - __glXFreeContext(gc); - } - - if (!imported) { - /* - ** This dpy also created the server side part of the context. - ** Send the glXDestroyContext request. - */ - LockDisplay(dpy); - GetReq(GLXDestroyContext,req); - req->reqType = opcode; - req->glxCode = X_GLXDestroyContext; - req->context = xid; - UnlockDisplay(dpy); - SyncHandle(); - } -} - -PUBLIC void glXDestroyContext(Display *dpy, GLXContext gc) -{ - DestroyContext(dpy, gc); -} - -/* -** Return the major and minor version #s for the GLX extension -*/ -PUBLIC Bool glXQueryVersion(Display *dpy, int *major, int *minor) -{ - __GLXdisplayPrivate *priv; - - /* Init the extension. This fetches the major and minor version. */ - priv = __glXInitialize(dpy); - if (!priv) return GL_FALSE; - - if (major) *major = priv->majorVersion; - if (minor) *minor = priv->minorVersion; - return GL_TRUE; -} - -/* -** Query the existance of the GLX extension -*/ -PUBLIC Bool glXQueryExtension(Display *dpy, int *errorBase, int *eventBase) -{ - int major_op, erb, evb; - Bool rv; - - rv = XQueryExtension(dpy, GLX_EXTENSION_NAME, &major_op, &evb, &erb); - if (rv) { - if (errorBase) *errorBase = erb; - if (eventBase) *eventBase = evb; - } - return rv; -} - -/* -** Put a barrier in the token stream that forces the GL to finish its -** work before X can proceed. -*/ -PUBLIC void glXWaitGL(void) -{ - xGLXWaitGLReq *req; - GLXContext gc = __glXGetCurrentContext(); - Display *dpy = gc->currentDpy; - - if (!dpy) return; - - /* Flush any pending commands out */ - __glXFlushRenderBuffer(gc, gc->pc); - -#ifdef GLX_DIRECT_RENDERING - if (gc->isDirect) { -/* This bit of ugliness unwraps the glFinish function */ -#ifdef glFinish -#undef glFinish -#endif - glFinish(); - return; - } -#endif - - /* Send the glXWaitGL request */ - LockDisplay(dpy); - GetReq(GLXWaitGL,req); - req->reqType = gc->majorOpcode; - req->glxCode = X_GLXWaitGL; - req->contextTag = gc->currentContextTag; - UnlockDisplay(dpy); - SyncHandle(); -} - -/* -** Put a barrier in the token stream that forces X to finish its -** work before GL can proceed. -*/ -PUBLIC void glXWaitX(void) -{ - xGLXWaitXReq *req; - GLXContext gc = __glXGetCurrentContext(); - Display *dpy = gc->currentDpy; - - if (!dpy) return; - - /* Flush any pending commands out */ - __glXFlushRenderBuffer(gc, gc->pc); - -#ifdef GLX_DIRECT_RENDERING - if (gc->isDirect) { - XSync(dpy, False); - return; - } -#endif - - /* - ** Send the glXWaitX request. - */ - LockDisplay(dpy); - GetReq(GLXWaitX,req); - req->reqType = gc->majorOpcode; - req->glxCode = X_GLXWaitX; - req->contextTag = gc->currentContextTag; - UnlockDisplay(dpy); - SyncHandle(); -} - -PUBLIC void glXUseXFont(Font font, int first, int count, int listBase) -{ - xGLXUseXFontReq *req; - GLXContext gc = __glXGetCurrentContext(); - Display *dpy = gc->currentDpy; - - if (!dpy) return; - - /* Flush any pending commands out */ - (void) __glXFlushRenderBuffer(gc, gc->pc); - -#ifdef GLX_DIRECT_RENDERING - if (gc->isDirect) { - DRI_glXUseXFont(font, first, count, listBase); - return; - } -#endif - - /* Send the glXUseFont request */ - LockDisplay(dpy); - GetReq(GLXUseXFont,req); - req->reqType = gc->majorOpcode; - req->glxCode = X_GLXUseXFont; - req->contextTag = gc->currentContextTag; - req->font = font; - req->first = first; - req->count = count; - req->listBase = listBase; - UnlockDisplay(dpy); - SyncHandle(); -} - -/************************************************************************/ - -/* -** Copy the source context to the destination context using the -** attribute "mask". -*/ -PUBLIC void glXCopyContext(Display *dpy, GLXContext source, - GLXContext dest, unsigned long mask) -{ - xGLXCopyContextReq *req; - GLXContext gc = __glXGetCurrentContext(); - GLXContextTag tag; - CARD8 opcode; - - opcode = __glXSetupForCommand(dpy); - if (!opcode) { - return; - } - -#ifdef GLX_DIRECT_RENDERING - if (gc->isDirect) { - /* NOT_DONE: This does not work yet */ - } -#endif - - /* - ** If the source is the current context, send its tag so that the context - ** can be flushed before the copy. - */ - if (source == gc && dpy == gc->currentDpy) { - tag = gc->currentContextTag; - } else { - tag = 0; - } - - /* Send the glXCopyContext request */ - LockDisplay(dpy); - GetReq(GLXCopyContext,req); - req->reqType = opcode; - req->glxCode = X_GLXCopyContext; - req->source = source ? source->xid : None; - req->dest = dest ? dest->xid : None; - req->mask = mask; - req->contextTag = tag; - UnlockDisplay(dpy); - SyncHandle(); -} - - -/** - * Determine if a context uses direct rendering. - * - * \param dpy Display where the context was created. - * \param contextID ID of the context to be tested. - * - * \returns \c GL_TRUE if the context is direct rendering or not. - */ -static Bool __glXIsDirect(Display *dpy, GLXContextID contextID) -{ - xGLXIsDirectReq *req; - xGLXIsDirectReply reply; - CARD8 opcode; - - opcode = __glXSetupForCommand(dpy); - if (!opcode) { - return GL_FALSE; - } - - /* Send the glXIsDirect request */ - LockDisplay(dpy); - GetReq(GLXIsDirect,req); - req->reqType = opcode; - req->glxCode = X_GLXIsDirect; - req->context = contextID; - _XReply(dpy, (xReply*) &reply, 0, False); - UnlockDisplay(dpy); - SyncHandle(); - - return reply.isDirect; -} - -/** - * \todo - * Shouldn't this function \b always return \c GL_FALSE when - * \c GLX_DIRECT_RENDERING is not defined? Do we really need to bother with - * the GLX protocol here at all? - */ -PUBLIC Bool glXIsDirect(Display *dpy, GLXContext gc) -{ - if (!gc) { - return GL_FALSE; -#ifdef GLX_DIRECT_RENDERING - } else if (gc->isDirect) { - return GL_TRUE; -#endif - } - return __glXIsDirect(dpy, gc->xid); -} - -PUBLIC GLXPixmap glXCreateGLXPixmap(Display *dpy, XVisualInfo *vis, - Pixmap pixmap) -{ - xGLXCreateGLXPixmapReq *req; - GLXPixmap xid; - CARD8 opcode; - - opcode = __glXSetupForCommand(dpy); - if (!opcode) { - return None; - } - - /* Send the glXCreateGLXPixmap request */ - LockDisplay(dpy); - GetReq(GLXCreateGLXPixmap,req); - req->reqType = opcode; - req->glxCode = X_GLXCreateGLXPixmap; - req->screen = vis->screen; - req->visual = vis->visualid; - req->pixmap = pixmap; - req->glxpixmap = xid = XAllocID(dpy); - UnlockDisplay(dpy); - SyncHandle(); - return xid; -} - -/* -** Destroy the named pixmap -*/ -PUBLIC void glXDestroyGLXPixmap(Display *dpy, GLXPixmap glxpixmap) -{ - xGLXDestroyGLXPixmapReq *req; - CARD8 opcode; - - opcode = __glXSetupForCommand(dpy); - if (!opcode) { - return; - } - - /* Send the glXDestroyGLXPixmap request */ - LockDisplay(dpy); - GetReq(GLXDestroyGLXPixmap,req); - req->reqType = opcode; - req->glxCode = X_GLXDestroyGLXPixmap; - req->glxpixmap = glxpixmap; - UnlockDisplay(dpy); - SyncHandle(); -} - -PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable drawable) -{ - xGLXSwapBuffersReq *req; - GLXContext gc; - GLXContextTag tag; - CARD8 opcode; -#ifdef GLX_DIRECT_RENDERING - __DRIdrawable *pdraw = GetDRIDrawable( dpy, drawable, NULL ); - - if ( pdraw != NULL ) { - (*pdraw->swapBuffers)(dpy, pdraw->private); - return; - } -#endif - - opcode = __glXSetupForCommand(dpy); - if (!opcode) { - return; - } - - /* - ** The calling thread may or may not have a current context. If it - ** does, send the context tag so the server can do a flush. - */ - gc = __glXGetCurrentContext(); - if ((gc != NULL) && (dpy == gc->currentDpy) && - ((drawable == gc->currentDrawable) || (drawable == gc->currentReadable)) ) { - tag = gc->currentContextTag; - } else { - tag = 0; - } - - /* Send the glXSwapBuffers request */ - LockDisplay(dpy); - GetReq(GLXSwapBuffers,req); - req->reqType = opcode; - req->glxCode = X_GLXSwapBuffers; - req->drawable = drawable; - req->contextTag = tag; - UnlockDisplay(dpy); - SyncHandle(); - XFlush(dpy); -} - - -/* -** Return configuration information for the given display, screen and -** visual combination. -*/ -PUBLIC int glXGetConfig(Display *dpy, XVisualInfo *vis, int attribute, - int *value_return) -{ - __GLXdisplayPrivate *priv; - __GLXscreenConfigs *psc; - int status; - - status = GetGLXPrivScreenConfig( dpy, vis->screen, & priv, & psc ); - if ( status == Success ) { - const __GLcontextModes * const modes = _gl_context_modes_find_visual( - psc->configs, vis->visualid ); - - /* Lookup attribute after first finding a match on the visual */ - if ( modes != NULL ) { - return _gl_get_context_mode_data( modes, attribute, value_return ); - } - - status = GLX_BAD_VISUAL; - } - - /* - ** If we can't find the config for this visual, this visual is not - ** supported by the OpenGL implementation on the server. - */ - if ( (status == GLX_BAD_VISUAL) && (attribute == GLX_USE_GL) ) { - *value_return = GL_FALSE; - status = Success; - } - - return status; -} - -/************************************************************************/ - -static void -init_fbconfig_for_chooser( __GLcontextModes * config, - GLboolean fbconfig_style_tags ) -{ - memset( config, 0, sizeof( __GLcontextModes ) ); - config->visualID = (XID) GLX_DONT_CARE; - config->visualType = GLX_DONT_CARE; - - /* glXChooseFBConfig specifies different defaults for these two than - * glXChooseVisual. - */ - if ( fbconfig_style_tags ) { - config->rgbMode = GL_TRUE; - config->doubleBufferMode = GLX_DONT_CARE; - } - - config->visualRating = GLX_DONT_CARE; - config->transparentPixel = GLX_NONE; - config->transparentRed = GLX_DONT_CARE; - config->transparentGreen = GLX_DONT_CARE; - config->transparentBlue = GLX_DONT_CARE; - config->transparentAlpha = GLX_DONT_CARE; - config->transparentIndex = GLX_DONT_CARE; - - config->drawableType = GLX_WINDOW_BIT; - config->renderType = (config->rgbMode) ? GLX_RGBA_BIT : GLX_COLOR_INDEX_BIT; - config->xRenderable = GLX_DONT_CARE; - config->fbconfigID = (GLXFBConfigID)(GLX_DONT_CARE); - - config->swapMethod = GLX_DONT_CARE; -} - -#define MATCH_DONT_CARE( param ) \ - do { \ - if ( (a-> param != GLX_DONT_CARE) \ - && (a-> param != b-> param) ) { \ - return False; \ - } \ - } while ( 0 ) - -#define MATCH_MINIMUM( param ) \ - do { \ - if ( (a-> param != GLX_DONT_CARE) \ - && (a-> param > b-> param) ) { \ - return False; \ - } \ - } while ( 0 ) - -#define MATCH_EXACT( param ) \ - do { \ - if ( a-> param != b-> param) { \ - return False; \ - } \ - } while ( 0 ) - -/** - * Determine if two GLXFBConfigs are compatible. - * - * \param a Application specified config to test. - * \param b Server specified config to test against \c a. - */ -static Bool -fbconfigs_compatible( const __GLcontextModes * const a, - const __GLcontextModes * const b ) -{ - MATCH_DONT_CARE( doubleBufferMode ); - MATCH_DONT_CARE( visualType ); - MATCH_DONT_CARE( visualRating ); - MATCH_DONT_CARE( xRenderable ); - MATCH_DONT_CARE( fbconfigID ); - MATCH_DONT_CARE( swapMethod ); - - MATCH_MINIMUM( rgbBits ); - MATCH_MINIMUM( numAuxBuffers ); - MATCH_MINIMUM( redBits ); - MATCH_MINIMUM( greenBits ); - MATCH_MINIMUM( blueBits ); - MATCH_MINIMUM( alphaBits ); - MATCH_MINIMUM( depthBits ); - MATCH_MINIMUM( stencilBits ); - MATCH_MINIMUM( accumRedBits ); - MATCH_MINIMUM( accumGreenBits ); - MATCH_MINIMUM( accumBlueBits ); - MATCH_MINIMUM( accumAlphaBits ); - MATCH_MINIMUM( sampleBuffers ); - MATCH_MINIMUM( maxPbufferWidth ); - MATCH_MINIMUM( maxPbufferHeight ); - MATCH_MINIMUM( maxPbufferPixels ); - MATCH_MINIMUM( samples ); - - MATCH_DONT_CARE( stereoMode ); - MATCH_EXACT( level ); - - if ( ((a->drawableType & b->drawableType) == 0) - || ((a->renderType & b->renderType) == 0) ) { - return False; - } - - - /* There is a bug in a few of the XFree86 DDX drivers. They contain - * visuals with a "transparent type" of 0 when they really mean GLX_NONE. - * Technically speaking, it is a bug in the DDX driver, but there is - * enough of an installed base to work around the problem here. In any - * case, 0 is not a valid value of the transparent type, so we'll treat 0 - * from the app as GLX_DONT_CARE. We'll consider GLX_NONE from the app and - * 0 from the server to be a match to maintain backward compatibility with - * the (broken) drivers. - */ - - if ( a->transparentPixel != GLX_DONT_CARE - && a->transparentPixel != 0 ) { - if ( a->transparentPixel == GLX_NONE ) { - if ( b->transparentPixel != GLX_NONE && b->transparentPixel != 0 ) - return False; - } else { - MATCH_EXACT( transparentPixel ); - } - - switch ( a->transparentPixel ) { - case GLX_TRANSPARENT_RGB: - MATCH_DONT_CARE( transparentRed ); - MATCH_DONT_CARE( transparentGreen ); - MATCH_DONT_CARE( transparentBlue ); - MATCH_DONT_CARE( transparentAlpha ); - break; - - case GLX_TRANSPARENT_INDEX: - MATCH_DONT_CARE( transparentIndex ); - break; - - default: - break; - } - } - - return True; -} - - -/* There's some trickly language in the GLX spec about how this is supposed - * to work. Basically, if a given component size is either not specified - * or the requested size is zero, it is supposed to act like PERFER_SMALLER. - * Well, that's really hard to do with the code as-is. This behavior is - * closer to correct, but still not technically right. - */ -#define PREFER_LARGER_OR_ZERO(comp) \ - do { \ - if ( ((*a)-> comp) != ((*b)-> comp) ) { \ - if ( ((*a)-> comp) == 0 ) { \ - return -1; \ - } \ - else if ( ((*b)-> comp) == 0 ) { \ - return 1; \ - } \ - else { \ - return ((*b)-> comp) - ((*a)-> comp) ; \ - } \ - } \ - } while( 0 ) - -#define PREFER_LARGER(comp) \ - do { \ - if ( ((*a)-> comp) != ((*b)-> comp) ) { \ - return ((*b)-> comp) - ((*a)-> comp) ; \ - } \ - } while( 0 ) - -#define PREFER_SMALLER(comp) \ - do { \ - if ( ((*a)-> comp) != ((*b)-> comp) ) { \ - return ((*a)-> comp) - ((*b)-> comp) ; \ - } \ - } while( 0 ) - -/** - * Compare two GLXFBConfigs. This function is intended to be used as the - * compare function passed in to qsort. - * - * \returns If \c a is a "better" config, according to the specification of - * SGIX_fbconfig, a number less than zero is returned. If \c b is - * better, then a number greater than zero is return. If both are - * equal, zero is returned. - * \sa qsort, glXChooseVisual, glXChooseFBConfig, glXChooseFBConfigSGIX - */ -static int -fbconfig_compare( const __GLcontextModes * const * const a, - const __GLcontextModes * const * const b ) -{ - /* The order of these comparisons must NOT change. It is defined by - * the GLX 1.3 spec and ARB_multisample. - */ - - PREFER_SMALLER( visualSelectGroup ); - - /* The sort order for the visualRating is GLX_NONE, GLX_SLOW, and - * GLX_NON_CONFORMANT_CONFIG. It just so happens that this is the - * numerical sort order of the enums (0x8000, 0x8001, and 0x800D). - */ - PREFER_SMALLER( visualRating ); - - /* This isn't quite right. It is supposed to compare the sum of the - * components the user specifically set minimums for. - */ - PREFER_LARGER_OR_ZERO( redBits ); - PREFER_LARGER_OR_ZERO( greenBits ); - PREFER_LARGER_OR_ZERO( blueBits ); - PREFER_LARGER_OR_ZERO( alphaBits ); - - PREFER_SMALLER( rgbBits ); - - if ( ((*a)->doubleBufferMode != (*b)->doubleBufferMode) ) { - /* Prefer single-buffer. - */ - return ( !(*a)->doubleBufferMode ) ? -1 : 1; - } - - PREFER_SMALLER( numAuxBuffers ); - - PREFER_LARGER_OR_ZERO( depthBits ); - PREFER_SMALLER( stencilBits ); - - /* This isn't quite right. It is supposed to compare the sum of the - * components the user specifically set minimums for. - */ - PREFER_LARGER_OR_ZERO( accumRedBits ); - PREFER_LARGER_OR_ZERO( accumGreenBits ); - PREFER_LARGER_OR_ZERO( accumBlueBits ); - PREFER_LARGER_OR_ZERO( accumAlphaBits ); - - PREFER_SMALLER( visualType ); - - /* None of the multisample specs say where this comparison should happen, - * so I put it near the end. - */ - PREFER_SMALLER( sampleBuffers ); - PREFER_SMALLER( samples ); - - /* None of the pbuffer or fbconfig specs say that this comparison needs - * to happen at all, but it seems like it should. - */ - PREFER_LARGER( maxPbufferWidth ); - PREFER_LARGER( maxPbufferHeight ); - PREFER_LARGER( maxPbufferPixels ); - - return 0; -} - - -/** - * Selects and sorts a subset of the supplied configs based on the attributes. - * This function forms to basis of \c glXChooseVisual, \c glXChooseFBConfig, - * and \c glXChooseFBConfigSGIX. - * - * \param configs Array of pointers to possible configs. The elements of - * this array that do not meet the criteria will be set to - * NULL. The remaining elements will be sorted according to - * the various visual / FBConfig selection rules. - * \param num_configs Number of elements in the \c configs array. - * \param attribList Attributes used select from \c configs. This array is - * terminated by a \c None tag. The array can either take - * the form expected by \c glXChooseVisual (where boolean - * tags do not have a value) or by \c glXChooseFBConfig - * (where every tag has a value). - * \param fbconfig_style_tags Selects whether \c attribList is in - * \c glXChooseVisual style or - * \c glXChooseFBConfig style. - * \returns The number of valid elements left in \c configs. - * - * \sa glXChooseVisual, glXChooseFBConfig, glXChooseFBConfigSGIX - */ -static int -choose_visual( __GLcontextModes ** configs, int num_configs, - const int *attribList, GLboolean fbconfig_style_tags ) -{ - __GLcontextModes test_config; - int base; - int i; - - /* This is a fairly direct implementation of the selection method - * described by GLX_SGIX_fbconfig. Start by culling out all the - * configs that are not compatible with the selected parameter - * list. - */ - - init_fbconfig_for_chooser( & test_config, fbconfig_style_tags ); - __glXInitializeVisualConfigFromTags( & test_config, 512, - (const INT32 *) attribList, - GL_TRUE, fbconfig_style_tags ); - - base = 0; - for ( i = 0 ; i < num_configs ; i++ ) { - if ( fbconfigs_compatible( & test_config, configs[i] ) ) { - configs[ base ] = configs[ i ]; - base++; - } - } - - if ( base == 0 ) { - return 0; - } - - if ( base < num_configs ) { - (void) memset( & configs[ base ], 0, - sizeof( void * ) * (num_configs - base) ); - } - - /* After the incompatible configs are removed, the resulting - * list is sorted according to the rules set out in the various - * specifications. - */ - - qsort( configs, base, sizeof( __GLcontextModes * ), - (int (*)(const void*, const void*)) fbconfig_compare ); - return base; -} - - - - -/* -** Return the visual that best matches the template. Return None if no -** visual matches the template. -*/ -PUBLIC XVisualInfo *glXChooseVisual(Display *dpy, int screen, int *attribList) -{ - XVisualInfo *visualList = NULL; - __GLXdisplayPrivate *priv; - __GLXscreenConfigs *psc; - __GLcontextModes test_config; - __GLcontextModes *modes; - const __GLcontextModes *best_config = NULL; - - /* - ** Get a list of all visuals, return if list is empty - */ - if ( GetGLXPrivScreenConfig( dpy, screen, & priv, & psc ) != Success ) { - return None; - } - - - /* - ** Build a template from the defaults and the attribute list - ** Free visual list and return if an unexpected token is encountered - */ - init_fbconfig_for_chooser( & test_config, GL_FALSE ); - __glXInitializeVisualConfigFromTags( & test_config, 512, - (const INT32 *) attribList, - GL_TRUE, GL_FALSE ); - - /* - ** Eliminate visuals that don't meet minimum requirements - ** Compute a score for those that do - ** Remember which visual, if any, got the highest score - */ - for ( modes = psc->configs ; modes != NULL ; modes = modes->next ) { - if ( fbconfigs_compatible( & test_config, modes ) - && ((best_config == NULL) - || (fbconfig_compare( (const __GLcontextModes * const * const)&modes, &best_config ) < 0)) ) { - best_config = modes; - } - } - - /* - ** If no visual is acceptable, return None - ** Otherwise, create an XVisualInfo list with just the selected X visual - ** and return this. - */ - if (best_config != NULL) { - XVisualInfo visualTemplate; - int i; - - visualTemplate.screen = screen; - visualTemplate.visualid = best_config->visualID; - visualList = XGetVisualInfo( dpy, VisualScreenMask|VisualIDMask, - &visualTemplate, &i ); - } - - return visualList; -} - - -PUBLIC const char *glXQueryExtensionsString( Display *dpy, int screen ) -{ - __GLXscreenConfigs *psc; - __GLXdisplayPrivate *priv; - - if ( GetGLXPrivScreenConfig( dpy, screen, & priv, & psc ) != Success ) { - return NULL; - } - - if (!psc->effectiveGLXexts) { - if (!psc->serverGLXexts) { - psc->serverGLXexts = __glXGetStringFromServer(dpy, priv->majorOpcode, - X_GLXQueryServerString, - screen, GLX_EXTENSIONS); - } - - __glXCalculateUsableExtensions(psc, -#ifdef GLX_DIRECT_RENDERING - (psc->driScreen.private != NULL), -#else - GL_FALSE, -#endif - priv->minorVersion); - } - - return psc->effectiveGLXexts; -} - -PUBLIC const char *glXGetClientString( Display *dpy, int name ) -{ - switch(name) { - case GLX_VENDOR: - return (__glXGLXClientVendorName); - case GLX_VERSION: - return (__glXGLXClientVersion); - case GLX_EXTENSIONS: - return (__glXGetClientExtensions()); - default: - return NULL; - } -} - -PUBLIC const char *glXQueryServerString( Display *dpy, int screen, int name ) -{ - __GLXscreenConfigs *psc; - __GLXdisplayPrivate *priv; - const char ** str; - - - if ( GetGLXPrivScreenConfig( dpy, screen, & priv, & psc ) != Success ) { - return NULL; - } - - switch(name) { - case GLX_VENDOR: - str = & priv->serverGLXvendor; - break; - case GLX_VERSION: - str = & priv->serverGLXversion; - break; - case GLX_EXTENSIONS: - str = & psc->serverGLXexts; - break; - default: - return NULL; - } - - if ( *str == NULL ) { - *str = __glXGetStringFromServer(dpy, priv->majorOpcode, - X_GLXQueryServerString, screen, name); - } - - return *str; -} - -void __glXClientInfo ( Display *dpy, int opcode ) -{ - xGLXClientInfoReq *req; - int size; - char * ext_str = __glXGetClientGLExtensionString(); - - /* Send the glXClientInfo request */ - LockDisplay(dpy); - GetReq(GLXClientInfo,req); - req->reqType = opcode; - req->glxCode = X_GLXClientInfo; - req->major = GLX_MAJOR_VERSION; - req->minor = GLX_MINOR_VERSION; - - size = strlen( ext_str ) + 1; - req->length += (size + 3) >> 2; - req->numbytes = size; - Data(dpy, ext_str, size); - - UnlockDisplay(dpy); - SyncHandle(); - - Xfree( ext_str ); -} - - -/* -** EXT_import_context -*/ - -PUBLIC Display *glXGetCurrentDisplay(void) -{ - GLXContext gc = __glXGetCurrentContext(); - if (NULL == gc) return NULL; - return gc->currentDpy; -} - -PUBLIC GLX_ALIAS(Display *, glXGetCurrentDisplayEXT, (void), (), - glXGetCurrentDisplay) - -/** - * Used internally by libGL to send \c xGLXQueryContextinfoExtReq requests - * to the X-server. - * - * \param dpy Display where \c ctx was created. - * \param ctx Context to query. - * \returns \c Success on success. \c GLX_BAD_CONTEXT if \c ctx is invalid, - * or zero if the request failed due to internal problems (i.e., - * unable to allocate temporary memory, etc.) - * - * \note - * This function dynamically determines whether to use the EXT_import_context - * version of the protocol or the GLX 1.3 version of the protocol. - */ -static int __glXQueryContextInfo(Display *dpy, GLXContext ctx) -{ - __GLXdisplayPrivate *priv = __glXInitialize(dpy); - xGLXQueryContextReply reply; - CARD8 opcode; - GLuint numValues; - int retval; - - if (ctx == NULL) { - return GLX_BAD_CONTEXT; - } - opcode = __glXSetupForCommand(dpy); - if (!opcode) { - return 0; - } - - /* Send the glXQueryContextInfoEXT request */ - LockDisplay(dpy); - - if ( (priv->majorVersion > 1) || (priv->minorVersion >= 3) ) { - xGLXQueryContextReq *req; - - GetReq(GLXQueryContext, req); - - req->reqType = opcode; - req->glxCode = X_GLXQueryContext; - req->context = (unsigned int)(ctx->xid); - } - else { - xGLXVendorPrivateReq *vpreq; - xGLXQueryContextInfoEXTReq *req; - - GetReqExtra( GLXVendorPrivate, - sz_xGLXQueryContextInfoEXTReq - sz_xGLXVendorPrivateReq, - vpreq ); - req = (xGLXQueryContextInfoEXTReq *)vpreq; - req->reqType = opcode; - req->glxCode = X_GLXVendorPrivateWithReply; - req->vendorCode = X_GLXvop_QueryContextInfoEXT; - req->context = (unsigned int)(ctx->xid); - } - - _XReply(dpy, (xReply*) &reply, 0, False); - - numValues = reply.n; - if (numValues == 0) - retval = Success; - else if (numValues > __GLX_MAX_CONTEXT_PROPS) - retval = 0; - else - { - int *propList, *pProp; - int nPropListBytes; - int i; - - nPropListBytes = numValues << 3; - propList = (int *) Xmalloc(nPropListBytes); - if (NULL == propList) { - retval = 0; - } else { - _XRead(dpy, (char *)propList, nPropListBytes); - pProp = propList; - for (i=0; i < numValues; i++) { - switch (*pProp++) { - case GLX_SHARE_CONTEXT_EXT: - ctx->share_xid = *pProp++; - break; - case GLX_VISUAL_ID_EXT: - ctx->vid = *pProp++; - break; - case GLX_SCREEN: - ctx->screen = *pProp++; - break; - case GLX_FBCONFIG_ID: - ctx->fbconfigID = *pProp++; - break; - case GLX_RENDER_TYPE: - ctx->renderType = *pProp++; - break; - default: - pProp++; - continue; - } - } - Xfree((char *)propList); - retval = Success; - } - } - UnlockDisplay(dpy); - SyncHandle(); - return retval; -} - -PUBLIC int -glXQueryContext(Display *dpy, GLXContext ctx, int attribute, int *value) -{ - int retVal; - - /* get the information from the server if we don't have it already */ - if (!ctx->isDirect && (ctx->vid == None)) { - retVal = __glXQueryContextInfo(dpy, ctx); - if (Success != retVal) return retVal; - } - switch (attribute) { - case GLX_SHARE_CONTEXT_EXT: - *value = (int)(ctx->share_xid); - break; - case GLX_VISUAL_ID_EXT: - *value = (int)(ctx->vid); - break; - case GLX_SCREEN: - *value = (int)(ctx->screen); - break; - case GLX_FBCONFIG_ID: - *value = (int)(ctx->fbconfigID); - break; - case GLX_RENDER_TYPE: - *value = (int)(ctx->renderType); - break; - default: - return GLX_BAD_ATTRIBUTE; - } - return Success; -} - -PUBLIC GLX_ALIAS( int, glXQueryContextInfoEXT, - (Display *dpy, GLXContext ctx, int attribute, int *value), - (dpy, ctx, attribute, value), - glXQueryContext ) - -PUBLIC GLXContextID glXGetContextIDEXT(const GLXContext ctx) -{ - return ctx->xid; -} - -PUBLIC GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID) -{ - GLXContext ctx; - - if (contextID == None) { - return NULL; - } - if (__glXIsDirect(dpy, contextID)) { - return NULL; - } - - ctx = CreateContext(dpy, NULL, NULL, NULL, False, contextID, False, 0); - if (NULL != ctx) { - if (Success != __glXQueryContextInfo(dpy, ctx)) { - return NULL; - } - } - return ctx; -} - -PUBLIC void glXFreeContextEXT(Display *dpy, GLXContext ctx) -{ - DestroyContext(dpy, ctx); -} - - - -/* - * GLX 1.3 functions - these are just stubs for now! - */ - -PUBLIC GLXFBConfig *glXChooseFBConfig(Display *dpy, int screen, - const int *attribList, int *nitems) -{ - __GLcontextModes ** config_list; - int list_size; - - - config_list = (__GLcontextModes **) - glXGetFBConfigs( dpy, screen, & list_size ); - - if ( (config_list != NULL) && (list_size > 0) && (attribList != NULL) ) { - list_size = choose_visual( config_list, list_size, attribList, - GL_TRUE ); - if ( list_size == 0 ) { - XFree( config_list ); - config_list = NULL; - } - } - - *nitems = list_size; - return (GLXFBConfig *) config_list; -} - - -PUBLIC GLXContext glXCreateNewContext(Display *dpy, GLXFBConfig config, - int renderType, GLXContext shareList, - Bool allowDirect) -{ - return CreateContext( dpy, NULL, (__GLcontextModes *) config, shareList, - allowDirect, None, True, renderType ); -} - - -PUBLIC GLXDrawable glXGetCurrentReadDrawable(void) -{ - GLXContext gc = __glXGetCurrentContext(); - return gc->currentReadable; -} - - -PUBLIC GLXFBConfig *glXGetFBConfigs(Display *dpy, int screen, int *nelements) -{ - __GLXdisplayPrivate *priv = __glXInitialize(dpy); - __GLcontextModes ** config = NULL; - int i; - - if ( (priv->screenConfigs != NULL) - && (screen >= 0) && (screen <= ScreenCount(dpy)) - && (priv->screenConfigs[screen].configs != NULL) - && (priv->screenConfigs[screen].configs->fbconfigID != GLX_DONT_CARE) ) { - unsigned num_configs = 0; - __GLcontextModes * modes; - - - for ( modes = priv->screenConfigs[screen].configs - ; modes != NULL - ; modes = modes->next ) { - if ( modes->fbconfigID != GLX_DONT_CARE ) { - num_configs++; - } - } - - config = (__GLcontextModes **) Xmalloc( sizeof(__GLcontextModes *) - * num_configs ); - if ( config != NULL ) { - *nelements = num_configs; - i = 0; - for ( modes = priv->screenConfigs[screen].configs - ; modes != NULL - ; modes = modes->next ) { - config[i] = modes; - i++; - } - } - } - return (GLXFBConfig *) config; -} - - -PUBLIC int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, - int attribute, int *value) -{ - __GLcontextModes * const modes = ValidateGLXFBConfig( dpy, config ); - - return (modes != NULL) - ? _gl_get_context_mode_data( modes, attribute, value ) - : GLXBadFBConfig; -} - - -PUBLIC XVisualInfo *glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config) -{ - XVisualInfo visualTemplate; - __GLcontextModes * fbconfig = (__GLcontextModes *) config; - int count; - - /* - ** Get a list of all visuals, return if list is empty - */ - visualTemplate.visualid = fbconfig->visualID; - return XGetVisualInfo(dpy,VisualIDMask,&visualTemplate,&count); -} - - -/* -** GLX_SGI_make_current_read -*/ - -PUBLIC GLX_ALIAS(GLXDrawable, glXGetCurrentReadDrawableSGI, (void), (), - glXGetCurrentReadDrawable) - - -/* -** GLX_SGI_swap_control -*/ -PUBLIC int glXSwapIntervalSGI(int interval) -{ - xGLXVendorPrivateReq *req; - GLXContext gc = __glXGetCurrentContext(); - Display * dpy; - CARD32 * interval_ptr; - CARD8 opcode; - - if ( gc == NULL ) { - return GLX_BAD_CONTEXT; - } - - if ( interval <= 0 ) { - return GLX_BAD_VALUE; - } - -#ifdef GLX_DIRECT_RENDERING - if ( gc->isDirect ) { - __GLXscreenConfigs * const psc = GetGLXScreenConfigs( gc->currentDpy, - gc->screen ); - __DRIdrawable * const pdraw = GetDRIDrawable( gc->currentDpy, - gc->currentDrawable, - NULL ); - if ( __glXExtensionBitIsEnabled( psc, SGI_swap_control_bit ) - && (pdraw != NULL) ) { - pdraw->swap_interval = interval; - return 0; - } - else { - return GLX_BAD_CONTEXT; - } - } -#endif - dpy = gc->currentDpy; - opcode = __glXSetupForCommand(dpy); - if (!opcode) { - return 0; - } - - /* Send the glXSwapIntervalSGI request */ - LockDisplay(dpy); - GetReqExtra(GLXVendorPrivate,sizeof(CARD32),req); - req->reqType = opcode; - req->glxCode = X_GLXVendorPrivate; - req->vendorCode = X_GLXvop_SwapIntervalSGI; - req->contextTag = gc->currentContextTag; - - interval_ptr = (CARD32 *) req + 1; - *interval_ptr = interval; - - UnlockDisplay(dpy); - SyncHandle(); - XFlush(dpy); - - return 0; -} - - -/* -** GLX_MESA_swap_control -*/ -PUBLIC GLint glXSwapIntervalMESA(unsigned interval) -{ -#ifdef GLX_DIRECT_RENDERING - GLXContext gc = __glXGetCurrentContext(); - - if ( interval < 0 ) { - return GLX_BAD_VALUE; - } - - if ( (gc != NULL) && gc->isDirect ) { - __GLXscreenConfigs * const psc = GetGLXScreenConfigs( gc->currentDpy, - gc->screen ); - - if ( (psc != NULL) && (psc->driScreen.private != NULL) - && __glXExtensionBitIsEnabled( psc, MESA_swap_control_bit ) ) { - __DRIdrawable * const pdraw = - (*psc->driScreen.getDrawable)(gc->currentDpy, - gc->currentDrawable, - psc->driScreen.private); - if ( pdraw != NULL ) { - pdraw->swap_interval = interval; - return 0; - } - } - } -#else - (void) interval; -#endif - - return GLX_BAD_CONTEXT; -} - -PUBLIC GLint glXGetSwapIntervalMESA( void ) -{ -#ifdef GLX_DIRECT_RENDERING - GLXContext gc = __glXGetCurrentContext(); - - if ( (gc != NULL) && gc->isDirect ) { - __GLXscreenConfigs * const psc = GetGLXScreenConfigs( gc->currentDpy, - gc->screen ); - - if ( (psc != NULL) && (psc->driScreen.private != NULL) - && __glXExtensionBitIsEnabled( psc, MESA_swap_control_bit ) ) { - __DRIdrawable * const pdraw = - (*psc->driScreen.getDrawable)(gc->currentDpy, - gc->currentDrawable, - psc->driScreen.private); - if ( pdraw != NULL ) { - return pdraw->swap_interval; - } - } - } -#endif - - return 0; -} - - -/* -** GLX_MESA_swap_frame_usage -*/ - -PUBLIC GLint glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable) -{ - int status = GLX_BAD_CONTEXT; -#ifdef GLX_DIRECT_RENDERING - int screen; - __DRIdrawable * const pdraw = GetDRIDrawable(dpy, drawable, & screen); - __GLXscreenConfigs * const psc = GetGLXScreenConfigs(dpy, screen); - - if ( (pdraw != NULL) && (pdraw->frameTracking != NULL) - && __glXExtensionBitIsEnabled( psc, MESA_swap_frame_usage_bit ) ) { - status = pdraw->frameTracking( dpy, pdraw->private, GL_TRUE ); - } -#else - (void) dpy; - (void) drawable; -#endif - return status; -} - - -PUBLIC GLint glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable) -{ - int status = GLX_BAD_CONTEXT; -#ifdef GLX_DIRECT_RENDERING - int screen; - __DRIdrawable * const pdraw = GetDRIDrawable(dpy, drawable, & screen); - __GLXscreenConfigs * const psc = GetGLXScreenConfigs(dpy, screen); - - if ( (pdraw != NULL) && (pdraw->frameTracking != NULL) - && __glXExtensionBitIsEnabled( psc, MESA_swap_frame_usage_bit ) ) { - status = pdraw->frameTracking( dpy, pdraw->private, GL_FALSE ); - } -#else - (void) dpy; - (void) drawable; -#endif - return status; -} - - -PUBLIC GLint glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, - GLfloat *usage) -{ - int status = GLX_BAD_CONTEXT; -#ifdef GLX_DIRECT_RENDERING - int screen; - __DRIdrawable * const pdraw = GetDRIDrawable(dpy, drawable, & screen); - __GLXscreenConfigs * const psc = GetGLXScreenConfigs(dpy, screen); - - if ( (pdraw != NULL ) && (pdraw->queryFrameTracking != NULL) - && __glXExtensionBitIsEnabled( psc, MESA_swap_frame_usage_bit ) ) { - int64_t sbc, missedFrames; - float lastMissedUsage; - - status = pdraw->queryFrameTracking( dpy, pdraw->private, &sbc, - &missedFrames, &lastMissedUsage, - usage ); - } -#else - (void) dpy; - (void) drawable; - (void) usage; -#endif - return status; -} - - -PUBLIC GLint glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, - int64_t *sbc, int64_t *missedFrames, - GLfloat *lastMissedUsage) -{ - int status = GLX_BAD_CONTEXT; -#ifdef GLX_DIRECT_RENDERING - int screen; - __DRIdrawable * const pdraw = GetDRIDrawable(dpy, drawable, & screen); - __GLXscreenConfigs * const psc = GetGLXScreenConfigs(dpy, screen); - - if ( (pdraw != NULL ) && (pdraw->queryFrameTracking != NULL) - && __glXExtensionBitIsEnabled( psc, MESA_swap_frame_usage_bit ) ) { - float usage; - - status = pdraw->queryFrameTracking( dpy, pdraw->private, sbc, - missedFrames, lastMissedUsage, - & usage ); - } -#else - (void) dpy; - (void) drawable; - (void) sbc; - (void) missedFrames; - (void) lastMissedUsage; -#endif - return status; -} - - -/* -** GLX_SGI_video_sync -*/ -PUBLIC int glXGetVideoSyncSGI(unsigned int *count) -{ - /* FIXME: Looking at the GLX_SGI_video_sync spec in the extension registry, - * FIXME: there should be a GLX encoding for this call. I can find no - * FIXME: documentation for the GLX encoding. - */ -#ifdef GLX_DIRECT_RENDERING - GLXContext gc = __glXGetCurrentContext(); - - - if ( (gc != NULL) && gc->isDirect ) { - __GLXscreenConfigs * const psc = GetGLXScreenConfigs( gc->currentDpy, - gc->screen ); - if ( __glXExtensionBitIsEnabled( psc, SGI_video_sync_bit ) - && psc->driScreen.private && psc->driScreen.getMSC) { - int ret; - int64_t temp; - - ret = psc->driScreen.getMSC( psc->driScreen.private, & temp ); - *count = (unsigned) temp; - return (ret == 0) ? 0 : GLX_BAD_CONTEXT; - } - } -#else - (void) count; -#endif - return GLX_BAD_CONTEXT; -} - -PUBLIC int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count) -{ -#ifdef GLX_DIRECT_RENDERING - GLXContext gc = __glXGetCurrentContext(); - - if ( divisor <= 0 || remainder < 0 ) - return GLX_BAD_VALUE; - - if ( (gc != NULL) && gc->isDirect ) { - __GLXscreenConfigs * const psc = GetGLXScreenConfigs( gc->currentDpy, - gc->screen ); - if ( __glXExtensionBitIsEnabled( psc, SGI_video_sync_bit ) - && psc->driScreen.private ) { - __DRIdrawable * const pdraw = - (*psc->driScreen.getDrawable)(gc->currentDpy, - gc->currentDrawable, - psc->driScreen.private); - if ( (pdraw != NULL) && (pdraw->waitForMSC != NULL) ) { - int ret; - int64_t msc; - int64_t sbc; - - ret = (*pdraw->waitForMSC)( gc->currentDpy, pdraw->private, - 0, divisor, remainder, - & msc, & sbc ); - *count = (unsigned) msc; - return (ret == 0) ? 0 : GLX_BAD_CONTEXT; - } - } - } -#else - (void) count; -#endif - return GLX_BAD_CONTEXT; -} - - -/* -** GLX_SGIS_video_source -*/ -#if defined(_VL_H) - -PUBLIC GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX(Display *dpy, - int screen, VLServer server, VLPath path, - int nodeClass, VLNode drainNode) -{ - (void) dpy; - (void) screen; - (void) server; - (void) path; - (void) nodeClass; - (void) drainNode; - return 0; -} - -PUBLIC void glXDestroyGLXVideoSourceSGIX(Display *dpy, GLXVideoSourceSGIX src) -{ - (void) dpy; - (void) src; -} - -#endif - - -/* -** GLX_SGIX_fbconfig -** Many of these functions are aliased to GLX 1.3 entry points in the -** GLX_functions table. -*/ - -PUBLIC GLX_ALIAS(int, glXGetFBConfigAttribSGIX, - (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value), - (dpy, config, attribute, value), - glXGetFBConfigAttrib) - -PUBLIC GLX_ALIAS(GLXFBConfigSGIX *, glXChooseFBConfigSGIX, - (Display *dpy, int screen, int *attrib_list, int *nelements), - (dpy, screen, attrib_list, nelements), - glXChooseFBConfig) - -PUBLIC GLX_ALIAS(XVisualInfo *, glXGetVisualFromFBConfigSGIX, - (Display * dpy, GLXFBConfigSGIX config), - (dpy, config), - glXGetVisualFromFBConfig) - -PUBLIC GLXPixmap glXCreateGLXPixmapWithConfigSGIX(Display *dpy, - GLXFBConfigSGIX config, Pixmap pixmap) -{ - xGLXVendorPrivateWithReplyReq *vpreq; - xGLXCreateGLXPixmapWithConfigSGIXReq *req; - GLXPixmap xid = None; - CARD8 opcode; - const __GLcontextModes * const fbconfig = (__GLcontextModes *) config; - __GLXscreenConfigs * psc; - - - if ( (dpy == NULL) || (config == NULL) ) { - return None; - } - - psc = GetGLXScreenConfigs( dpy, fbconfig->screen ); - if ( (psc != NULL) - && __glXExtensionBitIsEnabled( psc, SGIX_fbconfig_bit ) ) { - opcode = __glXSetupForCommand(dpy); - if (!opcode) { - return None; - } - - /* Send the glXCreateGLXPixmapWithConfigSGIX request */ - LockDisplay(dpy); - GetReqExtra(GLXVendorPrivateWithReply, - sz_xGLXCreateGLXPixmapWithConfigSGIXReq-sz_xGLXVendorPrivateWithReplyReq,vpreq); - req = (xGLXCreateGLXPixmapWithConfigSGIXReq *)vpreq; - req->reqType = opcode; - req->glxCode = X_GLXVendorPrivateWithReply; - req->vendorCode = X_GLXvop_CreateGLXPixmapWithConfigSGIX; - req->screen = fbconfig->screen; - req->fbconfig = fbconfig->fbconfigID; - req->pixmap = pixmap; - req->glxpixmap = xid = XAllocID(dpy); - UnlockDisplay(dpy); - SyncHandle(); - } - - return xid; -} - -PUBLIC GLXContext glXCreateContextWithConfigSGIX(Display *dpy, - GLXFBConfigSGIX config, int renderType, - GLXContext shareList, Bool allowDirect) -{ - GLXContext gc = NULL; - const __GLcontextModes * const fbconfig = (__GLcontextModes *) config; - __GLXscreenConfigs * psc; - - - if ( (dpy == NULL) || (config == NULL) ) { - return None; - } - - psc = GetGLXScreenConfigs( dpy, fbconfig->screen ); - if ( (psc != NULL) - && __glXExtensionBitIsEnabled( psc, SGIX_fbconfig_bit ) ) { - gc = CreateContext( dpy, NULL, (__GLcontextModes *) config, shareList, - allowDirect, None, False, renderType ); - } - - return gc; -} - - -PUBLIC GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX(Display *dpy, - XVisualInfo *vis) -{ - __GLXdisplayPrivate *priv; - __GLXscreenConfigs *psc; - - if ( (GetGLXPrivScreenConfig( dpy, vis->screen, & priv, & psc ) != Success) - && __glXExtensionBitIsEnabled( psc, SGIX_fbconfig_bit ) - && (psc->configs->fbconfigID != GLX_DONT_CARE) ) { - return (GLXFBConfigSGIX) _gl_context_modes_find_visual( psc->configs, - vis->visualid ); - } - - return NULL; -} - - -/* -** GLX_SGI_cushion -*/ -PUBLIC void glXCushionSGI(Display *dpy, Window win, float cushion) -{ - (void) dpy; - (void) win; - (void) cushion; -} - - -/* -** GLX_SGIX_video_resize -*/ -PUBLIC int glXBindChannelToWindowSGIX(Display *dpy, int screen, - int channel , Window window) -{ - (void) dpy; - (void) screen; - (void) channel; - (void) window; - return 0; -} - -PUBLIC int glXChannelRectSGIX(Display *dpy, int screen, int channel, - int x, int y, int w, int h) -{ - (void) dpy; - (void) screen; - (void) channel; - (void) x; - (void) y; - (void) w; - (void) h; - return 0; -} - -PUBLIC int glXQueryChannelRectSGIX(Display *dpy, int screen, int channel, - int *x, int *y, int *w, int *h) -{ - (void) dpy; - (void) screen; - (void) channel; - (void) x; - (void) y; - (void) w; - (void) h; - return 0; -} - -int glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel, - int *dx, int *dy, int *dw, int *dh) -{ - (void) dpy; - (void) screen; - (void) channel; - (void) dx; - (void) dy; - (void) dw; - (void) dh; - return 0; -} - -PUBLIC int glXChannelRectSyncSGIX(Display *dpy, int screen, - int channel, GLenum synctype) -{ - (void) dpy; - (void) screen; - (void) channel; - (void) synctype; - return 0; -} - - -#if defined(_DM_BUFFER_H_) - -PUBLIC Bool glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer, - DMparams *params, DMbuffer dmbuffer) -{ - (void) dpy; - (void) pbuffer; - (void) params; - (void) dmbuffer; - return False; -} - -#endif - - -/* -** GLX_SGIX_swap_group -*/ -PUBLIC void glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable, - GLXDrawable member) -{ - (void) dpy; - (void) drawable; - (void) member; -} - - -/* -** GLX_SGIX_swap_barrier -*/ -PUBLIC void glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable, - int barrier) -{ - (void) dpy; - (void) drawable; - (void) barrier; -} - -PUBLIC Bool glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max) -{ - (void) dpy; - (void) screen; - (void) max; - return False; -} - - -/* -** GLX_SUN_get_transparent_index -*/ -PUBLIC Status glXGetTransparentIndexSUN(Display *dpy, Window overlay, - Window underlay, long *pTransparent) -{ - (void) dpy; - (void) overlay; - (void) underlay; - (void) pTransparent; - return 0; -} - - -/* -** GLX_OML_sync_control -*/ -PUBLIC Bool glXGetSyncValuesOML(Display *dpy, GLXDrawable drawable, - int64_t *ust, int64_t *msc, int64_t *sbc) -{ -#ifdef GLX_DIRECT_RENDERING - __GLXdisplayPrivate * const priv = __glXInitialize(dpy); - - if ( priv != NULL ) { - int i; - __DRIdrawable * const pdraw = GetDRIDrawable( dpy, drawable, & i ); - __GLXscreenConfigs * const psc = &priv->screenConfigs[i]; - - assert( (pdraw == NULL) || (i != -1) ); - return ( (pdraw && pdraw->getSBC && psc->driScreen.getMSC) - && __glXExtensionBitIsEnabled( psc, OML_sync_control_bit ) - && ((*psc->driScreen.getMSC)( psc->driScreen.private, msc ) == 0) - && ((*pdraw->getSBC)( dpy, psc->driScreen.private, sbc ) == 0) - && (__glXGetUST( ust ) == 0) ); - } -#else - (void) dpy; - (void) drawable; - (void) ust; - (void) msc; - (void) sbc; -#endif - return False; -} - - -/** - * Determine the refresh rate of the specified drawable and display. - * - * \param dpy Display whose refresh rate is to be determined. - * \param drawable Drawable whose refresh rate is to be determined. - * \param numerator Numerator of the refresh rate. - * \param demoninator Denominator of the refresh rate. - * \return If the refresh rate for the specified display and drawable could - * be calculated, True is returned. Otherwise False is returned. - * - * \note This function is implemented entirely client-side. A lot of other - * functionality is required to export GLX_OML_sync_control, so on - * XFree86 this function can be called for direct-rendering contexts - * when GLX_OML_sync_control appears in the client extension string. - */ - -PUBLIC Bool glXGetMscRateOML(Display * dpy, GLXDrawable drawable, - int32_t * numerator, int32_t * denominator) -{ -#if defined( GLX_DIRECT_RENDERING ) && defined( XF86VIDMODE ) - __GLXdisplayPrivate * const priv = __glXInitialize(dpy); - - - if ( priv != NULL ) { - XF86VidModeModeLine mode_line; - int dot_clock; - int screen_num; - int i; - - - GetDRIDrawable( dpy, drawable, & screen_num ); - if ( (screen_num != -1) - && XF86VidModeQueryVersion( dpy, & i, & i ) - && XF86VidModeGetModeLine( dpy, screen_num, & dot_clock, - & mode_line ) ) { - unsigned n = dot_clock * 1000; - unsigned d = mode_line.vtotal * mode_line.htotal; - -# define V_INTERLACE 0x010 -# define V_DBLSCAN 0x020 - - if ( (mode_line.flags & V_INTERLACE) ) { - n *= 2; - } - else if ( (mode_line.flags & V_DBLSCAN) ) { - d *= 2; - } - - /* The OML_sync_control spec requires that if the refresh rate is a - * whole number, that the returned numerator be equal to the refresh - * rate and the denominator be 1. - */ - - if ( (n % d) == 0 ) { - n /= d; - d = 1; - } - else { - static const unsigned f[] = { 13, 11, 7, 5, 3, 2, 0 }; - - - /* This is a poor man's way to reduce a fraction. It's far from - * perfect, but it will work well enough for this situation. - */ - - for ( i = 0 ; f[i] != 0 ; i++ ) { - while ( ((n % f[i]) == 0) && ((d % f[i]) == 0) ) { - d /= f[i]; - n /= f[i]; - } - } - } - - *numerator = n; - *denominator = d; - - (void) drawable; - return True; - } - } -#else - (void) dpy; - (void) drawable; - (void) numerator; - (void) denominator; -#endif - return False; -} - - -PUBLIC int64_t glXSwapBuffersMscOML(Display *dpy, GLXDrawable drawable, - int64_t target_msc, int64_t divisor, - int64_t remainder) -{ -#ifdef GLX_DIRECT_RENDERING - int screen; - __DRIdrawable *pdraw = GetDRIDrawable( dpy, drawable, & screen ); - __GLXscreenConfigs * const psc = GetGLXScreenConfigs( dpy, screen ); - - /* The OML_sync_control spec says these should "generate a GLX_BAD_VALUE - * error", but it also says "It [glXSwapBuffersMscOML] will return a value - * of -1 if the function failed because of errors detected in the input - * parameters" - */ - if ( divisor < 0 || remainder < 0 || target_msc < 0 ) - return -1; - if ( divisor > 0 && remainder >= divisor ) - return -1; - - if ( (pdraw != NULL) && (pdraw->swapBuffersMSC != NULL) - && __glXExtensionBitIsEnabled( psc, OML_sync_control_bit ) ) { - return (*pdraw->swapBuffersMSC)(dpy, pdraw->private, target_msc, - divisor, remainder); - } -#else - (void) dpy; - (void) drawable; - (void) target_msc; - (void) divisor; - (void) remainder; -#endif - return 0; -} - - -PUBLIC Bool glXWaitForMscOML(Display * dpy, GLXDrawable drawable, - int64_t target_msc, int64_t divisor, - int64_t remainder, int64_t *ust, - int64_t *msc, int64_t *sbc) -{ -#ifdef GLX_DIRECT_RENDERING - int screen; - __DRIdrawable *pdraw = GetDRIDrawable( dpy, drawable, & screen ); - __GLXscreenConfigs * const psc = GetGLXScreenConfigs( dpy, screen ); - int ret; - - /* The OML_sync_control spec says these should "generate a GLX_BAD_VALUE - * error", but the return type in the spec is Bool. - */ - if ( divisor < 0 || remainder < 0 || target_msc < 0 ) - return False; - if ( divisor > 0 && remainder >= divisor ) - return False; - - if ( (pdraw != NULL) && (pdraw->waitForMSC != NULL) - && __glXExtensionBitIsEnabled( psc, OML_sync_control_bit ) ) { - ret = (*pdraw->waitForMSC)( dpy, pdraw->private, target_msc, - divisor, remainder, msc, sbc ); - - /* __glXGetUST returns zero on success and non-zero on failure. - * This function returns True on success and False on failure. - */ - return ( (ret == 0) && (__glXGetUST( ust ) == 0) ); - } -#else - (void) dpy; - (void) drawable; - (void) target_msc; - (void) divisor; - (void) remainder; - (void) ust; - (void) msc; - (void) sbc; -#endif - return False; -} - - -PUBLIC Bool glXWaitForSbcOML(Display * dpy, GLXDrawable drawable, - int64_t target_sbc, int64_t *ust, - int64_t *msc, int64_t *sbc ) -{ -#ifdef GLX_DIRECT_RENDERING - int screen; - __DRIdrawable *pdraw = GetDRIDrawable( dpy, drawable, & screen ); - __GLXscreenConfigs * const psc = GetGLXScreenConfigs( dpy, screen ); - int ret; - - /* The OML_sync_control spec says this should "generate a GLX_BAD_VALUE - * error", but the return type in the spec is Bool. - */ - if ( target_sbc < 0 ) - return False; - - if ( (pdraw != NULL) && (pdraw->waitForSBC != NULL) - && __glXExtensionBitIsEnabled( psc, OML_sync_control_bit )) { - ret = (*pdraw->waitForSBC)( dpy, pdraw->private, target_sbc, msc, sbc ); - - /* __glXGetUST returns zero on success and non-zero on failure. - * This function returns True on success and False on failure. - */ - return( (ret == 0) && (__glXGetUST( ust ) == 0) ); - } -#else - (void) dpy; - (void) drawable; - (void) target_sbc; - (void) ust; - (void) msc; - (void) sbc; -#endif - return False; -} - - -/** - * GLX_MESA_allocate_memory - */ -/*@{*/ - -PUBLIC void *glXAllocateMemoryMESA(Display *dpy, int scrn, - size_t size, float readFreq, - float writeFreq, float priority) -{ -#ifdef GLX_DIRECT_RENDERING - __GLXscreenConfigs * const psc = GetGLXScreenConfigs( dpy, scrn ); - - if ( __glXExtensionBitIsEnabled( psc, MESA_allocate_memory_bit ) ) { - if (psc && psc->driScreen.private && psc->driScreen.allocateMemory) { - return (*psc->driScreen.allocateMemory)( dpy, scrn, size, - readFreq, writeFreq, - priority ); - } - } -#else - (void) dpy; - (void) scrn; - (void) size; - (void) readFreq; - (void) writeFreq; - (void) priority; -#endif /* GLX_DIRECT_RENDERING */ - - return NULL; -} - - -PUBLIC void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer) -{ -#ifdef GLX_DIRECT_RENDERING - __GLXscreenConfigs * const psc = GetGLXScreenConfigs( dpy, scrn ); - - if ( __glXExtensionBitIsEnabled( psc, MESA_allocate_memory_bit ) ) { - if (psc && psc->driScreen.private && psc->driScreen.freeMemory) { - (*psc->driScreen.freeMemory)( dpy, scrn, pointer ); - } - } -#else - (void) dpy; - (void) scrn; - (void) pointer; -#endif /* GLX_DIRECT_RENDERING */ -} - - -PUBLIC GLuint glXGetMemoryOffsetMESA( Display *dpy, int scrn, - const void *pointer ) -{ -#ifdef GLX_DIRECT_RENDERING - __GLXscreenConfigs * const psc = GetGLXScreenConfigs( dpy, scrn ); - - if ( __glXExtensionBitIsEnabled( psc, MESA_allocate_memory_bit ) ) { - if (psc && psc->driScreen.private && psc->driScreen.memoryOffset) { - return (*psc->driScreen.memoryOffset)( dpy, scrn, pointer ); - } - } -#else - (void) dpy; - (void) scrn; - (void) pointer; -#endif /* GLX_DIRECT_RENDERING */ - - return ~0L; -} -/*@}*/ - - -/** - * Mesa extension stubs. These will help reduce portability problems. - */ -/*@{*/ - -/** - * Release all buffers associated with the specified GLX drawable. - * - * \todo - * This function was intended for stand-alone Mesa. The issue there is that - * the library doesn't get any notification when a window is closed. In - * DRI there is a similar but slightly different issue. When GLX 1.3 is - * supported, there are 3 different functions to destroy a drawable. It - * should be possible to create GLX protocol (or have it determine which - * protocol to use based on the type of the drawable) to have one function - * do the work of 3. For the direct-rendering case, this function could - * just call the driver's \c __DRIdrawableRec::destroyDrawable function. - * This would reduce the frequency with which \c __driGarbageCollectDrawables - * would need to be used. This really should be done as part of the new DRI - * interface work. - * - * \sa http://oss.sgi.com/projects/ogl-sample/registry/MESA/release_buffers.txt - * __driGarbageCollectDrawables - * glXDestroyGLXPixmap - * glXDestroyPbuffer glXDestroyPixmap glXDestroyWindow - * glXDestroyGLXPbufferSGIX glXDestroyGLXVideoSourceSGIX - */ -PUBLIC Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d ) -{ - (void) dpy; - (void) d; - return False; -} - - -PUBLIC GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual, - Pixmap pixmap, Colormap cmap ) -{ - (void) dpy; - (void) visual; - (void) pixmap; - (void) cmap; - return 0; -} - - -PUBLIC void glXCopySubBufferMESA(Display *dpy, GLXDrawable drawable, - int x, int y, int width, int height) -{ - (void) dpy; - (void) drawable; - (void) x; - (void) y; - (void) width; - (void) height; -} - - -PUBLIC Bool glXSet3DfxModeMESA( int mode ) -{ - (void) mode; - return GL_FALSE; -} -/*@}*/ - - - -/** - * \c strdup is actually not a standard ANSI C or POSIX routine. - * Irix will not define it if ANSI mode is in effect. - * - * \sa strdup - */ -char * -__glXstrdup(const char *str) -{ - char *copy; - copy = (char *) Xmalloc(strlen(str) + 1); - if (!copy) - return NULL; - strcpy(copy, str); - return copy; -} - -/* -** glXGetProcAddress support -*/ - -struct name_address_pair { - const char *Name; - GLvoid *Address; -}; - -#define GLX_FUNCTION(f) { # f, (GLvoid *) f } -#define GLX_FUNCTION2(n,f) { # n, (GLvoid *) f } - -static const struct name_address_pair GLX_functions[] = { - /*** GLX_VERSION_1_0 ***/ - GLX_FUNCTION( glXChooseVisual ), - GLX_FUNCTION( glXCopyContext ), - GLX_FUNCTION( glXCreateContext ), - GLX_FUNCTION( glXCreateGLXPixmap ), - GLX_FUNCTION( glXDestroyContext ), - GLX_FUNCTION( glXDestroyGLXPixmap ), - GLX_FUNCTION( glXGetConfig ), - GLX_FUNCTION( glXGetCurrentContext ), - GLX_FUNCTION( glXGetCurrentDrawable ), - GLX_FUNCTION( glXIsDirect ), - GLX_FUNCTION( glXMakeCurrent ), - GLX_FUNCTION( glXQueryExtension ), - GLX_FUNCTION( glXQueryVersion ), - GLX_FUNCTION( glXSwapBuffers ), - GLX_FUNCTION( glXUseXFont ), - GLX_FUNCTION( glXWaitGL ), - GLX_FUNCTION( glXWaitX ), - - /*** GLX_VERSION_1_1 ***/ - GLX_FUNCTION( glXGetClientString ), - GLX_FUNCTION( glXQueryExtensionsString ), - GLX_FUNCTION( glXQueryServerString ), - - /*** GLX_VERSION_1_2 ***/ - GLX_FUNCTION( glXGetCurrentDisplay ), - - /*** GLX_VERSION_1_3 ***/ - GLX_FUNCTION( glXChooseFBConfig ), - GLX_FUNCTION( glXCreateNewContext ), - GLX_FUNCTION( glXCreatePbuffer ), - GLX_FUNCTION( glXCreatePixmap ), - GLX_FUNCTION( glXCreateWindow ), - GLX_FUNCTION( glXDestroyPbuffer ), - GLX_FUNCTION( glXDestroyPixmap ), - GLX_FUNCTION( glXDestroyWindow ), - GLX_FUNCTION( glXGetCurrentReadDrawable ), - GLX_FUNCTION( glXGetFBConfigAttrib ), - GLX_FUNCTION( glXGetFBConfigs ), - GLX_FUNCTION( glXGetSelectedEvent ), - GLX_FUNCTION( glXGetVisualFromFBConfig ), - GLX_FUNCTION( glXMakeContextCurrent ), - GLX_FUNCTION( glXQueryContext ), - GLX_FUNCTION( glXQueryDrawable ), - GLX_FUNCTION( glXSelectEvent ), - - /*** GLX_SGI_swap_control ***/ - GLX_FUNCTION( glXSwapIntervalSGI ), - - /*** GLX_SGI_video_sync ***/ - GLX_FUNCTION( glXGetVideoSyncSGI ), - GLX_FUNCTION( glXWaitVideoSyncSGI ), - - /*** GLX_SGI_make_current_read ***/ - GLX_FUNCTION2( glXMakeCurrentReadSGI, glXMakeContextCurrent ), - GLX_FUNCTION2( glXGetCurrentReadDrawableSGI, glXGetCurrentReadDrawable ), - - /*** GLX_SGIX_video_source ***/ -#if defined(_VL_H) - GLX_FUNCTION( glXCreateGLXVideoSourceSGIX ), - GLX_FUNCTION( glXDestroyGLXVideoSourceSGIX ), -#endif - - /*** GLX_EXT_import_context ***/ - GLX_FUNCTION( glXFreeContextEXT ), - GLX_FUNCTION( glXGetContextIDEXT ), - GLX_FUNCTION2( glXGetCurrentDisplayEXT, glXGetCurrentDisplay ), - GLX_FUNCTION( glXImportContextEXT ), - GLX_FUNCTION2( glXQueryContextInfoEXT, glXQueryContext ), - - /*** GLX_SGIX_fbconfig ***/ - GLX_FUNCTION2( glXGetFBConfigAttribSGIX, glXGetFBConfigAttrib ), - GLX_FUNCTION2( glXChooseFBConfigSGIX, glXChooseFBConfig ), - GLX_FUNCTION( glXCreateGLXPixmapWithConfigSGIX ), - GLX_FUNCTION( glXCreateContextWithConfigSGIX ), - GLX_FUNCTION2( glXGetVisualFromFBConfigSGIX, glXGetVisualFromFBConfig ), - GLX_FUNCTION( glXGetFBConfigFromVisualSGIX ), - - /*** GLX_SGIX_pbuffer ***/ - GLX_FUNCTION( glXCreateGLXPbufferSGIX ), - GLX_FUNCTION( glXDestroyGLXPbufferSGIX ), - GLX_FUNCTION( glXQueryGLXPbufferSGIX ), - GLX_FUNCTION( glXSelectEventSGIX ), - GLX_FUNCTION( glXGetSelectedEventSGIX ), - - /*** GLX_SGI_cushion ***/ - GLX_FUNCTION( glXCushionSGI ), - - /*** GLX_SGIX_video_resize ***/ - GLX_FUNCTION( glXBindChannelToWindowSGIX ), - GLX_FUNCTION( glXChannelRectSGIX ), - GLX_FUNCTION( glXQueryChannelRectSGIX ), - GLX_FUNCTION( glXQueryChannelDeltasSGIX ), - GLX_FUNCTION( glXChannelRectSyncSGIX ), - - /*** GLX_SGIX_dmbuffer **/ -#if defined(_DM_BUFFER_H_) - GLX_FUNCTION( glXAssociateDMPbufferSGIX ), -#endif - - /*** GLX_SGIX_swap_group ***/ - GLX_FUNCTION( glXJoinSwapGroupSGIX ), - - /*** GLX_SGIX_swap_barrier ***/ - GLX_FUNCTION( glXBindSwapBarrierSGIX ), - GLX_FUNCTION( glXQueryMaxSwapBarriersSGIX ), - - /*** GLX_SUN_get_transparent_index ***/ - GLX_FUNCTION( glXGetTransparentIndexSUN ), - - /*** GLX_MESA_allocate_memory ***/ - GLX_FUNCTION( glXAllocateMemoryMESA ), - GLX_FUNCTION( glXFreeMemoryMESA ), - GLX_FUNCTION( glXGetMemoryOffsetMESA ), - - /*** GLX_MESA_copy_sub_buffer ***/ - GLX_FUNCTION( glXCopySubBufferMESA ), - - /*** GLX_MESA_pixmap_colormap ***/ - GLX_FUNCTION( glXCreateGLXPixmapMESA ), - - /*** GLX_MESA_release_buffers ***/ - GLX_FUNCTION( glXReleaseBuffersMESA ), - - /*** GLX_MESA_set_3dfx_mode ***/ - GLX_FUNCTION( glXSet3DfxModeMESA ), - - /*** GLX_MESA_swap_control ***/ - GLX_FUNCTION( glXSwapIntervalMESA ), - GLX_FUNCTION( glXGetSwapIntervalMESA ), - - /*** GLX_MESA_swap_frame_usage ***/ - GLX_FUNCTION( glXBeginFrameTrackingMESA ), - GLX_FUNCTION( glXEndFrameTrackingMESA ), - GLX_FUNCTION( glXGetFrameUsageMESA ), - GLX_FUNCTION( glXQueryFrameTrackingMESA ), - - /*** GLX_ARB_get_proc_address ***/ - GLX_FUNCTION( glXGetProcAddressARB ), - - /*** GLX 1.4 ***/ - GLX_FUNCTION2( glXGetProcAddress, glXGetProcAddressARB ), - - /*** GLX_OML_sync_control ***/ - GLX_FUNCTION( glXWaitForSbcOML ), - GLX_FUNCTION( glXWaitForMscOML ), - GLX_FUNCTION( glXSwapBuffersMscOML ), - GLX_FUNCTION( glXGetMscRateOML ), - GLX_FUNCTION( glXGetSyncValuesOML ), - -#ifdef GLX_DIRECT_RENDERING - /*** DRI configuration ***/ - GLX_FUNCTION( glXGetScreenDriver ), - GLX_FUNCTION( glXGetDriverConfig ), -#endif - - { NULL, NULL } /* end of list */ -}; - - -static const GLvoid * -get_glx_proc_address(const char *funcName) -{ - GLuint i; - - /* try static functions */ - for (i = 0; GLX_functions[i].Name; i++) { - if (strcmp(GLX_functions[i].Name, funcName) == 0) - return GLX_functions[i].Address; - } - - return NULL; -} - - -/** - * Get the address of a named GL function. This is the pre-GLX 1.4 name for - * \c glXGetProcAddress. - * - * \param procName Name of a GL or GLX function. - * \returns A pointer to the named function - * - * \sa glXGetProcAddress - */ -PUBLIC void (*glXGetProcAddressARB(const GLubyte *procName))( void ) -{ - typedef void (*gl_function)( void ); - gl_function f; - - - /* Search the table of GLX and internal functions first. If that - * fails and the supplied name could be a valid core GL name, try - * searching the core GL function table. This check is done to prevent - * DRI based drivers from searching the core GL function table for - * internal API functions. - */ - - f = (gl_function) get_glx_proc_address((const char *) procName); - if ( (f == NULL) && (procName[0] == 'g') && (procName[1] == 'l') - && (procName[2] != 'X') ) { - f = (gl_function) _glapi_get_proc_address((const char *) procName); - } - - return f; -} - -/** - * Get the address of a named GL function. This is the GLX 1.4 name for - * \c glXGetProcAddressARB. - * - * \param procName Name of a GL or GLX function. - * \returns A pointer to the named function - * - * \sa glXGetProcAddressARB - */ -PUBLIC void (*glXGetProcAddress(const GLubyte *procName))( void ) -#if defined(__GNUC__) && !defined(GLX_ALIAS_UNSUPPORTED) - __attribute__ ((alias ("glXGetProcAddressARB"))); -#else -{ - return glXGetProcAddressARB(procName); -} -#endif /* __GNUC__ */ - - -#ifdef GLX_DIRECT_RENDERING -/** - * Retrieves the verion of the internal libGL API in YYYYMMDD format. This - * might be used by the DRI drivers to determine how new libGL is at runtime. - * Drivers should not call this function directly. They should instead use - * \c glXGetProcAddress to obtain a pointer to the function. - * - * \returns An 8-digit decimal number representing the internal libGL API in - * YYYYMMDD format. - * - * \sa glXGetProcAddress, PFNGLXGETINTERNALVERSIONPROC - * - * \since Internal API version 20021121. - */ -int __glXGetInternalVersion(void) -{ - /* History: - * 20021121 - Initial version - * 20021128 - Added __glXWindowExists() function - * 20021207 - Added support for dynamic GLX extensions, - * GLX_SGI_swap_control, GLX_SGI_video_sync, - * GLX_OML_sync_control, and GLX_MESA_swap_control. - * Never officially released. Do NOT test against - * this version. Use 20030317 instead. - * 20030317 - Added support GLX_SGIX_fbconfig, - * GLX_MESA_swap_frame_usage, GLX_OML_swap_method, - * GLX_{ARB,SGIS}_multisample, and - * GLX_SGIX_visual_select_group. - * 20030606 - Added support for GLX_SGI_make_current_read. - * 20030813 - Made support for dynamic extensions multi-head aware. - * 20030818 - Added support for GLX_MESA_allocate_memory in place of the - * deprecated GLX_NV_vertex_array_range & GLX_MESA_agp_offset - * interfaces. - * 20031201 - Added support for the first round of DRI interface changes. - * Do NOT test against this version! It has binary - * compatibility bugs, use 20040317 instead. - * 20040317 - Added the 'mode' field to __DRIcontextRec. - * 20040415 - Added support for bindContext3 and unbindContext3. - * 20040602 - Add __glXGetDrawableInfo. I though that was there - * months ago. :( - * 20050727 - Gut all the old interfaces. This breaks compatability with - * any DRI driver built to any previous version. - */ - return 20050727; -} - - - -static Bool windowExistsFlag; - -static int windowExistsErrorHandler(Display *dpy, XErrorEvent *xerr) -{ - if (xerr->error_code == BadWindow) { - windowExistsFlag = GL_FALSE; - } - return 0; -} - -/** - * Determine if a window associated with a \c GLXDrawable exists on the - * X-server. This function is not used internally by libGL. It is provided - * as a utility function for DRI drivers. - * Drivers should not call this function directly. They should instead use - * \c glXGetProcAddress to obtain a pointer to the function. - * - * \param dpy Display associated with the drawable to be queried. - * \param draw \c GLXDrawable to test. - * - * \returns \c GL_TRUE if a window exists that is associated with \c draw, - * otherwise \c GL_FALSE is returned. - * - * \warning This function is not currently thread-safe. - * - * \sa glXGetProcAddress - * - * \since Internal API version 20021128. - */ -Bool __glXWindowExists(Display *dpy, GLXDrawable draw) -{ - XWindowAttributes xwa; - int (*oldXErrorHandler)(Display *, XErrorEvent *); - - XSync(dpy, GL_FALSE); - windowExistsFlag = GL_TRUE; - oldXErrorHandler = XSetErrorHandler(windowExistsErrorHandler); - XGetWindowAttributes(dpy, draw, &xwa); /* dummy request */ - XSetErrorHandler(oldXErrorHandler); - return windowExistsFlag; -} - - -/** - * Get the unadjusted system time (UST). Currently, the UST is measured in - * microseconds since Epoc. The actual resolution of the UST may vary from - * system to system, and the units may vary from release to release. - * Drivers should not call this function directly. They should instead use - * \c glXGetProcAddress to obtain a pointer to the function. - * - * \param ust Location to store the 64-bit UST - * \returns Zero on success or a negative errno value on failure. - * - * \sa glXGetProcAddress, PFNGLXGETUSTPROC - * - * \since Internal API version 20030317. - */ -int __glXGetUST( int64_t * ust ) -{ - struct timeval tv; - - if ( ust == NULL ) { - return -EFAULT; - } - - if ( gettimeofday( & tv, NULL ) == 0 ) { - ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec; - return 0; - } else { - return -errno; - } -} -#endif /* GLX_DIRECT_RENDERING */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glxext.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glxext.c deleted file mode 100644 index eb6e870e98..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glxext.c +++ /dev/null @@ -1,1864 +0,0 @@ -/* $XFree86: xc/lib/GL/glx/glxext.c,v 1.22 2003/12/08 17:35:28 dawes Exp $ */ - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -/** - * \file glxext.c - * GLX protocol interface boot-strap code. - * - * Direct rendering support added by Precision Insight, Inc. - * - * \author Kevin E. Martin - */ - -#include "glxclient.h" -#include -#include -#include -#include -#include "indirect_init.h" -#include "glapi.h" -#include "glxextensions.h" -#include "glcontextmodes.h" -#include "glheader.h" - -#ifdef GLX_DIRECT_RENDERING -#include -#include -#include "xf86dri.h" -#include "sarea.h" -#include "dri_glx.h" -#endif - -#ifdef USE_XCB -#include -#include -#include -#endif - -#include - -#ifdef DEBUG -void __glXDumpDrawBuffer(__GLXcontext *ctx); -#endif - -#ifdef USE_SPARC_ASM -/* - * This is where our dispatch table's bounds are. - * And the static mesa_init is taken directly from - * Mesa's 'sparc.c' initializer. - * - * We need something like this here, because this version - * of openGL/glx never initializes a Mesa context, and so - * the address of the dispatch table pointer never gets stuffed - * into the dispatch jump table otherwise. - * - * It matters only on SPARC, and only if you are using assembler - * code instead of C-code indirect dispatch. - * - * -- FEM, 04.xii.03 - */ -extern unsigned int _mesa_sparc_glapi_begin; -extern unsigned int _mesa_sparc_glapi_end; -extern void __glapi_sparc_icache_flush(unsigned int *); -static void _glx_mesa_init_sparc_glapi_relocs(void); -static int _mesa_sparc_needs_init = 1; -#define INIT_MESA_SPARC { \ - if(_mesa_sparc_needs_init) { \ - _glx_mesa_init_sparc_glapi_relocs(); \ - _mesa_sparc_needs_init = 0; \ - } \ -} -#else -#define INIT_MESA_SPARC -#endif - -#ifdef GLX_DIRECT_RENDERING -static __DRIscreen *__glXFindDRIScreen(__DRInativeDisplay *dpy, int scrn); -#endif /* GLX_DIRECT_RENDERING */ - -static Bool MakeContextCurrent(Display *dpy, GLXDrawable draw, - GLXDrawable read, GLXContext gc); - -/* -** We setup some dummy structures here so that the API can be used -** even if no context is current. -*/ - -static GLubyte dummyBuffer[__GLX_BUFFER_LIMIT_SIZE]; - -/* -** Dummy context used by small commands when there is no current context. -** All the -** gl and glx entry points are designed to operate as nop's when using -** the dummy context structure. -*/ -static __GLXcontext dummyContext = { - &dummyBuffer[0], - &dummyBuffer[0], - &dummyBuffer[0], - &dummyBuffer[__GLX_BUFFER_LIMIT_SIZE], - sizeof(dummyBuffer), -}; - - -/* -** All indirect rendering contexts will share the same indirect dispatch table. -*/ -static __GLapi *IndirectAPI = NULL; - - -/* - * Current context management and locking - */ - -#if defined( USE_XTHREADS ) - -/* thread safe */ -static GLboolean TSDinitialized = GL_FALSE; -static xthread_key_t ContextTSD; - -__GLXcontext *__glXGetCurrentContext(void) -{ - if (!TSDinitialized) { - xthread_key_create(&ContextTSD, NULL); - TSDinitialized = GL_TRUE; - return &dummyContext; - } - else { - void *p; - xthread_get_specific(ContextTSD, &p); - if (!p) - return &dummyContext; - else - return (__GLXcontext *) p; - } -} - -void __glXSetCurrentContext(__GLXcontext *c) -{ - if (!TSDinitialized) { - xthread_key_create(&ContextTSD, NULL); - TSDinitialized = GL_TRUE; - } - xthread_set_specific(ContextTSD, c); -} - - -/* Used by the __glXLock() and __glXUnlock() macros */ -xmutex_rec __glXmutex; - -#elif defined( PTHREADS ) - -pthread_mutex_t __glXmutex = PTHREAD_MUTEX_INITIALIZER; - -# if defined( GLX_USE_TLS ) - -/** - * Per-thread GLX context pointer. - * - * \c __glXSetCurrentContext is written is such a way that this pointer can - * \b never be \c NULL. This is important! Because of this - * \c __glXGetCurrentContext can be implemented as trivial macro. - */ -__thread void * __glX_tls_Context __attribute__((tls_model("initial-exec"))) - = &dummyContext; - -void __glXSetCurrentContext( __GLXcontext * c ) -{ - __glX_tls_Context = (c != NULL) ? c : &dummyContext; -} - -# else - -static pthread_once_t once_control = PTHREAD_ONCE_INIT; - -/** - * Per-thread data key. - * - * Once \c init_thread_data has been called, the per-thread data key will - * take a value of \c NULL. As each new thread is created the default - * value, in that thread, will be \c NULL. - */ -static pthread_key_t ContextTSD; - -/** - * Initialize the per-thread data key. - * - * This function is called \b exactly once per-process (not per-thread!) to - * initialize the per-thread data key. This is ideally done using the - * \c pthread_once mechanism. - */ -static void init_thread_data( void ) -{ - if ( pthread_key_create( & ContextTSD, NULL ) != 0 ) { - perror( "pthread_key_create" ); - exit( -1 ); - } -} - -void __glXSetCurrentContext( __GLXcontext * c ) -{ - pthread_once( & once_control, init_thread_data ); - pthread_setspecific( ContextTSD, c ); -} - -__GLXcontext * __glXGetCurrentContext( void ) -{ - void * v; - - pthread_once( & once_control, init_thread_data ); - - v = pthread_getspecific( ContextTSD ); - return (v == NULL) ? & dummyContext : (__GLXcontext *) v; -} - -# endif /* defined( GLX_USE_TLS ) */ - -#elif defined( THREADS ) - -#error Unknown threading method specified. - -#else - -/* not thread safe */ -__GLXcontext *__glXcurrentContext = &dummyContext; - -#endif - - -/* -** You can set this cell to 1 to force the gl drawing stuff to be -** one command per packet -*/ -int __glXDebug = 0; - -/* -** forward prototype declarations -*/ -int __glXCloseDisplay(Display *dpy, XExtCodes *codes); - - -/************************************************************************/ - -/* Extension required boiler plate */ - -static char *__glXExtensionName = GLX_EXTENSION_NAME; -XExtensionInfo *__glXExtensionInfo = NULL; - -static /* const */ char *error_list[] = { - "GLXBadContext", - "GLXBadContextState", - "GLXBadDrawable", - "GLXBadPixmap", - "GLXBadContextTag", - "GLXBadCurrentWindow", - "GLXBadRenderRequest", - "GLXBadLargeRequest", - "GLXUnsupportedPrivateRequest", -}; - -int __glXCloseDisplay(Display *dpy, XExtCodes *codes) -{ - GLXContext gc; - - gc = __glXGetCurrentContext(); - if (dpy == gc->currentDpy) { - __glXSetCurrentContext(&dummyContext); -#ifdef GLX_DIRECT_RENDERING - _glapi_set_dispatch(NULL); /* no-op functions */ -#endif - __glXFreeContext(gc); - } - - return XextRemoveDisplay(__glXExtensionInfo, dpy); -} - - -static XEXT_GENERATE_ERROR_STRING(__glXErrorString, __glXExtensionName, - __GLX_NUMBER_ERRORS, error_list) - -static /* const */ XExtensionHooks __glXExtensionHooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - __glXCloseDisplay, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - __glXErrorString, /* error_string */ -}; - -static -XEXT_GENERATE_FIND_DISPLAY(__glXFindDisplay, __glXExtensionInfo, - __glXExtensionName, &__glXExtensionHooks, - __GLX_NUMBER_EVENTS, NULL) - -/************************************************************************/ - -/* -** Free the per screen configs data as well as the array of -** __glXScreenConfigs. -*/ -static void FreeScreenConfigs(__GLXdisplayPrivate *priv) -{ - __GLXscreenConfigs *psc; - GLint i, screens; - - /* Free screen configuration information */ - psc = priv->screenConfigs; - screens = ScreenCount(priv->dpy); - for (i = 0; i < screens; i++, psc++) { - if (psc->configs) { - _gl_context_modes_destroy( psc->configs ); - if(psc->effectiveGLXexts) - Xfree(psc->effectiveGLXexts); - - psc->configs = NULL; /* NOTE: just for paranoia */ - } - -#ifdef GLX_DIRECT_RENDERING - /* Free the direct rendering per screen data */ - if (psc->driScreen.private) - (*psc->driScreen.destroyScreen)(priv->dpy, i, - psc->driScreen.private); - psc->driScreen.private = NULL; -#endif - } - XFree((char*) priv->screenConfigs); -} - -/* -** Release the private memory referred to in a display private -** structure. The caller will free the extension structure. -*/ -static int __glXFreeDisplayPrivate(XExtData *extension) -{ - __GLXdisplayPrivate *priv; - - priv = (__GLXdisplayPrivate*) extension->private_data; - FreeScreenConfigs(priv); - if(priv->serverGLXvendor) { - Xfree((char*)priv->serverGLXvendor); - priv->serverGLXvendor = 0x0; /* to protect against double free's */ - } - if(priv->serverGLXversion) { - Xfree((char*)priv->serverGLXversion); - priv->serverGLXversion = 0x0; /* to protect against double free's */ - } - -#if 0 /* GLX_DIRECT_RENDERING */ - /* Free the direct rendering per display data */ - if (priv->driDisplay.private) - (*priv->driDisplay.destroyDisplay)(priv->dpy, - priv->driDisplay.private); - priv->driDisplay.private = NULL; -#endif - - Xfree((char*) priv); - return 0; -} - -/************************************************************************/ - -/* -** Query the version of the GLX extension. This procedure works even if -** the client extension is not completely set up. -*/ -static Bool QueryVersion(Display *dpy, int opcode, int *major, int *minor) -{ - xGLXQueryVersionReq *req; - xGLXQueryVersionReply reply; - - /* Send the glXQueryVersion request */ - LockDisplay(dpy); - GetReq(GLXQueryVersion,req); - req->reqType = opcode; - req->glxCode = X_GLXQueryVersion; - req->majorVersion = GLX_MAJOR_VERSION; - req->minorVersion = GLX_MINOR_VERSION; - _XReply(dpy, (xReply*) &reply, 0, False); - UnlockDisplay(dpy); - SyncHandle(); - - if (reply.majorVersion != GLX_MAJOR_VERSION) { - /* - ** The server does not support the same major release as this - ** client. - */ - return GL_FALSE; - } - *major = reply.majorVersion; - *minor = min(reply.minorVersion, GLX_MINOR_VERSION); - return GL_TRUE; -} - - -void -__glXInitializeVisualConfigFromTags( __GLcontextModes *config, int count, - const INT32 *bp, Bool tagged_only, - Bool fbconfig_style_tags ) -{ - int i; - - if (!tagged_only) { - /* Copy in the first set of properties */ - config->visualID = *bp++; - - config->visualType = _gl_convert_from_x_visual_type( *bp++ ); - - config->rgbMode = *bp++; - - config->redBits = *bp++; - config->greenBits = *bp++; - config->blueBits = *bp++; - config->alphaBits = *bp++; - config->accumRedBits = *bp++; - config->accumGreenBits = *bp++; - config->accumBlueBits = *bp++; - config->accumAlphaBits = *bp++; - - config->doubleBufferMode = *bp++; - config->stereoMode = *bp++; - - config->rgbBits = *bp++; - config->depthBits = *bp++; - config->stencilBits = *bp++; - config->numAuxBuffers = *bp++; - config->level = *bp++; - - count -= __GLX_MIN_CONFIG_PROPS; - } - - /* - ** Additional properties may be in a list at the end - ** of the reply. They are in pairs of property type - ** and property value. - */ - -#define FETCH_OR_SET(tag) \ - config-> tag = ( fbconfig_style_tags ) ? *bp++ : 1 - - for (i = 0; i < count; i += 2 ) { - switch(*bp++) { - case GLX_RGBA: - FETCH_OR_SET( rgbMode ); - break; - case GLX_BUFFER_SIZE: - config->rgbBits = *bp++; - break; - case GLX_LEVEL: - config->level = *bp++; - break; - case GLX_DOUBLEBUFFER: - FETCH_OR_SET( doubleBufferMode ); - break; - case GLX_STEREO: - FETCH_OR_SET( stereoMode ); - break; - case GLX_AUX_BUFFERS: - config->numAuxBuffers = *bp++; - break; - case GLX_RED_SIZE: - config->redBits = *bp++; - break; - case GLX_GREEN_SIZE: - config->greenBits = *bp++; - break; - case GLX_BLUE_SIZE: - config->blueBits = *bp++; - break; - case GLX_ALPHA_SIZE: - config->alphaBits = *bp++; - break; - case GLX_DEPTH_SIZE: - config->depthBits = *bp++; - break; - case GLX_STENCIL_SIZE: - config->stencilBits = *bp++; - break; - case GLX_ACCUM_RED_SIZE: - config->accumRedBits = *bp++; - break; - case GLX_ACCUM_GREEN_SIZE: - config->accumGreenBits = *bp++; - break; - case GLX_ACCUM_BLUE_SIZE: - config->accumBlueBits = *bp++; - break; - case GLX_ACCUM_ALPHA_SIZE: - config->accumAlphaBits = *bp++; - break; - case GLX_VISUAL_CAVEAT_EXT: - config->visualRating = *bp++; - break; - case GLX_X_VISUAL_TYPE: - config->visualType = *bp++; - break; - case GLX_TRANSPARENT_TYPE: - config->transparentPixel = *bp++; - break; - case GLX_TRANSPARENT_INDEX_VALUE: - config->transparentIndex = *bp++; - break; - case GLX_TRANSPARENT_RED_VALUE: - config->transparentRed = *bp++; - break; - case GLX_TRANSPARENT_GREEN_VALUE: - config->transparentGreen = *bp++; - break; - case GLX_TRANSPARENT_BLUE_VALUE: - config->transparentBlue = *bp++; - break; - case GLX_TRANSPARENT_ALPHA_VALUE: - config->transparentAlpha = *bp++; - break; - case GLX_VISUAL_ID: - config->visualID = *bp++; - break; - case GLX_DRAWABLE_TYPE: - config->drawableType = *bp++; - break; - case GLX_RENDER_TYPE: - config->renderType = *bp++; - break; - case GLX_X_RENDERABLE: - config->xRenderable = *bp++; - break; - case GLX_FBCONFIG_ID: - config->fbconfigID = *bp++; - break; - case GLX_MAX_PBUFFER_WIDTH: - config->maxPbufferWidth = *bp++; - break; - case GLX_MAX_PBUFFER_HEIGHT: - config->maxPbufferHeight = *bp++; - break; - case GLX_MAX_PBUFFER_PIXELS: - config->maxPbufferPixels = *bp++; - break; - case GLX_OPTIMAL_PBUFFER_WIDTH_SGIX: - config->optimalPbufferWidth = *bp++; - break; - case GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX: - config->optimalPbufferHeight = *bp++; - break; - case GLX_VISUAL_SELECT_GROUP_SGIX: - config->visualSelectGroup = *bp++; - break; - case GLX_SWAP_METHOD_OML: - config->swapMethod = *bp++; - break; - case GLX_SAMPLE_BUFFERS_SGIS: - config->sampleBuffers = *bp++; - break; - case GLX_SAMPLES_SGIS: - config->samples = *bp++; - break; - case None: - i = count; - break; - default: - break; - } - } - - config->renderType = (config->rgbMode) ? GLX_RGBA_BIT : GLX_COLOR_INDEX_BIT; - - config->haveAccumBuffer = ((config->accumRedBits + - config->accumGreenBits + - config->accumBlueBits + - config->accumAlphaBits) > 0); - config->haveDepthBuffer = (config->depthBits > 0); - config->haveStencilBuffer = (config->stencilBits > 0); -} - - -#ifdef GLX_DIRECT_RENDERING -static unsigned -filter_modes( __GLcontextModes ** server_modes, - const __GLcontextModes * driver_modes ) -{ - __GLcontextModes * m; - __GLcontextModes ** prev_next; - const __GLcontextModes * check; - unsigned modes_count = 0; - - if ( driver_modes == NULL ) { - fprintf(stderr, "libGL warning: 3D driver returned no fbconfigs.\n"); - return 0; - } - - /* For each mode in server_modes, check to see if a matching mode exists - * in driver_modes. If not, then the mode is not available. - */ - - prev_next = server_modes; - for ( m = *prev_next ; m != NULL ; m = *prev_next ) { - GLboolean do_delete = GL_TRUE; - - for ( check = driver_modes ; check != NULL ; check = check->next ) { - if ( _gl_context_modes_are_same( m, check ) ) { - do_delete = GL_FALSE; - break; - } - } - - /* The 3D has to support all the modes that match the GLX visuals - * sent from the X server. - */ - if ( do_delete && (m->visualID != 0) ) { - do_delete = GL_FALSE; - - fprintf(stderr, "libGL warning: 3D driver claims to not support " - "visual 0x%02x\n", m->visualID); - } - - if ( do_delete ) { - *prev_next = m->next; - - m->next = NULL; - _gl_context_modes_destroy( m ); - } - else { - modes_count++; - prev_next = & m->next; - } - } - - return modes_count; -} - - -/** - * Implement \c __DRIinterfaceMethods::getProcAddress. - */ -static __DRIfuncPtr get_proc_address( const char * proc_name ) -{ - if (strcmp( proc_name, "glxEnableExtension" ) == 0) { - return (__DRIfuncPtr) __glXScrEnableExtension; - } - - return NULL; -} - - -/** - * Table of functions exported by the loader to the driver. - */ -static const __DRIinterfaceMethods interface_methods = { - get_proc_address, - - _gl_context_modes_create, - _gl_context_modes_destroy, - - __glXFindDRIScreen, - __glXWindowExists, - - XF86DRICreateContextWithConfig, - XF86DRIDestroyContext, - - XF86DRICreateDrawable, - XF86DRIDestroyDrawable, - XF86DRIGetDrawableInfo, - - __glXGetUST, - glXGetMscRateOML, -}; - - -/** - * Perform the required libGL-side initialization and call the client-side - * driver's \c __driCreateNewScreen function. - * - * \param dpy Display pointer. - * \param scrn Screen number on the display. - * \param psc DRI screen information. - * \param driDpy DRI display information. - * \param createNewScreen Pointer to the client-side driver's - * \c __driCreateNewScreen function. - * \returns A pointer to the \c __DRIscreenPrivate structure returned by - * the client-side driver on success, or \c NULL on failure. - * - * \todo This function needs to be modified to remove context-modes from the - * list stored in the \c __GLXscreenConfigsRec to match the list - * returned by the client-side driver. - */ -static void * -CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc, - __DRIdisplay * driDpy, - PFNCREATENEWSCREENFUNC createNewScreen) -{ - __DRIscreenPrivate *psp = NULL; -#ifndef GLX_USE_APPLEGL - drm_handle_t hSAREA; - drmAddress pSAREA = MAP_FAILED; - char *BusID; - __DRIversion ddx_version; - __DRIversion dri_version; - __DRIversion drm_version; - __DRIframebuffer framebuffer; - int fd = -1; - int status; - const char * err_msg; - const char * err_extra; - int api_ver = __glXGetInternalVersion(); - - - dri_version.major = driDpy->private->driMajor; - dri_version.minor = driDpy->private->driMinor; - dri_version.patch = driDpy->private->driPatch; - - - err_msg = "XF86DRIOpenConnection"; - err_extra = NULL; - - framebuffer.base = MAP_FAILED; - framebuffer.dev_priv = NULL; - - if (XF86DRIOpenConnection(dpy, scrn, &hSAREA, &BusID)) { - fd = drmOpen(NULL,BusID); - Xfree(BusID); /* No longer needed */ - - err_msg = "open DRM"; - err_extra = strerror( -fd ); - - if (fd >= 0) { - drm_magic_t magic; - - err_msg = "drmGetMagic"; - err_extra = NULL; - - if (!drmGetMagic(fd, &magic)) { - drmVersionPtr version = drmGetVersion(fd); - if (version) { - drm_version.major = version->version_major; - drm_version.minor = version->version_minor; - drm_version.patch = version->version_patchlevel; - drmFreeVersion(version); - } - else { - drm_version.major = -1; - drm_version.minor = -1; - drm_version.patch = -1; - } - - err_msg = "XF86DRIAuthConnection"; - if (XF86DRIAuthConnection(dpy, scrn, magic)) { - char *driverName; - - /* - * Get device name (like "tdfx") and the ddx version - * numbers. We'll check the version in each DRI driver's - * "createNewScreen" function. - */ - err_msg = "XF86DRIGetClientDriverName"; - if (XF86DRIGetClientDriverName(dpy, scrn, - &ddx_version.major, - &ddx_version.minor, - &ddx_version.patch, - &driverName)) { - drm_handle_t hFB; - int junk; - - /* No longer needed. */ - Xfree( driverName ); - - - /* - * Get device-specific info. pDevPriv will point to a struct - * (such as DRIRADEONRec in xfree86/driver/ati/radeon_dri.h) - * that has information about the screen size, depth, pitch, - * ancilliary buffers, DRM mmap handles, etc. - */ - err_msg = "XF86DRIGetDeviceInfo"; - if (XF86DRIGetDeviceInfo(dpy, scrn, - &hFB, - &junk, - &framebuffer.size, - &framebuffer.stride, - &framebuffer.dev_priv_size, - &framebuffer.dev_priv)) { - framebuffer.width = DisplayWidth(dpy, scrn); - framebuffer.height = DisplayHeight(dpy, scrn); - - /* - * Map the framebuffer region. - */ - status = drmMap(fd, hFB, framebuffer.size, - (drmAddressPtr)&framebuffer.base); - - err_msg = "drmMap of framebuffer"; - err_extra = strerror( -status ); - - if ( status == 0 ) { - /* - * Map the SAREA region. Further mmap regions - * may be setup in each DRI driver's - * "createNewScreen" function. - */ - status = drmMap(fd, hSAREA, SAREA_MAX, - &pSAREA); - - err_msg = "drmMap of sarea"; - err_extra = strerror( -status ); - - if ( status == 0 ) { - __GLcontextModes * driver_modes = NULL; - __GLXscreenConfigs *configs = psc->screenConfigs; - - err_msg = "InitDriver"; - err_extra = NULL; - psp = (*createNewScreen)(dpy, scrn, - psc, - configs->configs, - & ddx_version, - & dri_version, - & drm_version, - & framebuffer, - pSAREA, - fd, - api_ver, - & interface_methods, - & driver_modes ); - - filter_modes( & configs->configs, - driver_modes ); - _gl_context_modes_destroy( driver_modes ); - } - } - } - } - } - } - } - } - - if ( psp == NULL ) { - if ( pSAREA != MAP_FAILED ) { - (void)drmUnmap(pSAREA, SAREA_MAX); - } - - if ( framebuffer.base != MAP_FAILED ) { - (void)drmUnmap((drmAddress)framebuffer.base, framebuffer.size); - } - - if ( framebuffer.dev_priv != NULL ) { - Xfree(framebuffer.dev_priv); - } - - if ( fd >= 0 ) { - (void)drmClose(fd); - } - - (void)XF86DRICloseConnection(dpy, scrn); - - if ( err_extra != NULL ) { - fprintf(stderr, "libGL error: %s failed (%s)\n", err_msg, - err_extra); - } - else { - fprintf(stderr, "libGL error: %s failed\n", err_msg ); - } - - fprintf(stderr, "libGL error: reverting to (slow) indirect rendering\n"); - } -#endif /* !GLX_USE_APPLEGL */ - - return psp; -} -#endif /* GLX_DIRECT_RENDERING */ - - -/* -** Allocate the memory for the per screen configs for each screen. -** If that works then fetch the per screen configs data. -*/ -static Bool AllocAndFetchScreenConfigs(Display *dpy, __GLXdisplayPrivate *priv) -{ - xGLXGetVisualConfigsReq *req; - xGLXGetFBConfigsReq *fb_req; - xGLXVendorPrivateWithReplyReq *vpreq; - xGLXGetFBConfigsSGIXReq *sgi_req; - xGLXGetVisualConfigsReply reply; - __GLXscreenConfigs *psc; - __GLcontextModes *config; - GLint i, j, nprops, screens; - INT32 buf[__GLX_TOTAL_CONFIG], *props; - unsigned supported_request = 0; - unsigned prop_size; - - /* - ** First allocate memory for the array of per screen configs. - */ - screens = ScreenCount(dpy); - psc = (__GLXscreenConfigs*) Xmalloc(screens * sizeof(__GLXscreenConfigs)); - if (!psc) { - return GL_FALSE; - } - memset(psc, 0, screens * sizeof(__GLXscreenConfigs)); - priv->screenConfigs = psc; - - priv->serverGLXversion = __glXGetStringFromServer(dpy, priv->majorOpcode, - X_GLXQueryServerString, - 0, GLX_VERSION); - if ( priv->serverGLXversion == NULL ) { - FreeScreenConfigs(priv); - return GL_FALSE; - } - - if ( atof( priv->serverGLXversion ) >= 1.3 ) { - supported_request = 1; - } - - /* - ** Now fetch each screens configs structures. If a screen supports - ** GL (by returning a numVisuals > 0) then allocate memory for our - ** config structure and then fill it in. - */ - for (i = 0; i < screens; i++, psc++) { - if ( supported_request != 1 ) { - psc->serverGLXexts = __glXGetStringFromServer(dpy, priv->majorOpcode, - X_GLXQueryServerString, - i, GLX_EXTENSIONS); - if ( strstr( psc->serverGLXexts, "GLX_SGIX_fbconfig" ) != NULL ) { - supported_request = 2; - } - else { - supported_request = 3; - } - } - - - LockDisplay(dpy); - switch( supported_request ) { - case 1: - GetReq(GLXGetFBConfigs,fb_req); - fb_req->reqType = priv->majorOpcode; - fb_req->glxCode = X_GLXGetFBConfigs; - fb_req->screen = i; - break; - - case 2: - GetReqExtra(GLXVendorPrivateWithReply, - sz_xGLXGetFBConfigsSGIXReq-sz_xGLXVendorPrivateWithReplyReq,vpreq); - sgi_req = (xGLXGetFBConfigsSGIXReq *) vpreq; - sgi_req->reqType = priv->majorOpcode; - sgi_req->glxCode = X_GLXVendorPrivateWithReply; - sgi_req->vendorCode = X_GLXvop_GetFBConfigsSGIX; - sgi_req->screen = i; - break; - - case 3: - GetReq(GLXGetVisualConfigs,req); - req->reqType = priv->majorOpcode; - req->glxCode = X_GLXGetVisualConfigs; - req->screen = i; - break; - } - - if (!_XReply(dpy, (xReply*) &reply, 0, False)) { - /* Something is busted. Punt. */ - UnlockDisplay(dpy); - FreeScreenConfigs(priv); - return GL_FALSE; - } - - UnlockDisplay(dpy); - if (!reply.numVisuals) { - /* This screen does not support GL rendering */ - UnlockDisplay(dpy); - continue; - } - - /* FIXME: Is the __GLX_MIN_CONFIG_PROPS test correct for - * FIXME: FBconfigs? - */ - /* Check number of properties */ - nprops = reply.numProps; - if ((nprops < __GLX_MIN_CONFIG_PROPS) || - (nprops > __GLX_MAX_CONFIG_PROPS)) { - /* Huh? Not in protocol defined limits. Punt */ - UnlockDisplay(dpy); - SyncHandle(); - FreeScreenConfigs(priv); - return GL_FALSE; - } - - /* Allocate memory for our config structure */ - psc->configs = _gl_context_modes_create(reply.numVisuals, - sizeof(__GLcontextModes)); - if (!psc->configs) { - UnlockDisplay(dpy); - SyncHandle(); - FreeScreenConfigs(priv); - return GL_FALSE; - } - - /* Allocate memory for the properties, if needed */ - if ( supported_request != 3 ) { - nprops *= 2; - } - - prop_size = nprops * __GLX_SIZE_INT32; - - if (prop_size <= sizeof(buf)) { - props = buf; - } else { - props = (INT32 *) Xmalloc(prop_size); - } - - /* Read each config structure and convert it into our format */ - config = psc->configs; - for (j = 0; j < reply.numVisuals; j++) { - assert( config != NULL ); - _XRead(dpy, (char *)props, prop_size); - - if ( supported_request != 3 ) { - config->rgbMode = GL_TRUE; - config->drawableType = GLX_WINDOW_BIT; - } - else { - config->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT; - } - - __glXInitializeVisualConfigFromTags( config, nprops, props, - (supported_request != 3), - GL_TRUE ); - if ( config->fbconfigID == GLX_DONT_CARE ) { - config->fbconfigID = config->visualID; - } - config->screen = i; - config = config->next; - } - if (props != buf) { - Xfree((char *)props); - } - UnlockDisplay(dpy); - -#ifdef GLX_DIRECT_RENDERING - /* Initialize per screen dynamic client GLX extensions */ - psc->ext_list_first_time = GL_TRUE; - /* Initialize the direct rendering per screen data and functions */ - if (priv->driDisplay.private != NULL) { - /* FIXME: Should it be some sort of an error if createNewScreen[i] - * FIXME: is NULL? - */ - if (priv->driDisplay.createNewScreen && - priv->driDisplay.createNewScreen[i]) { - - psc->driScreen.screenConfigs = (void *)psc; - psc->driScreen.private = - CallCreateNewScreen(dpy, i, & psc->driScreen, - & priv->driDisplay, - priv->driDisplay.createNewScreen[i] ); - } - } -#endif - } - SyncHandle(); - return GL_TRUE; -} - -/* -** Initialize the client side extension code. -*/ -__GLXdisplayPrivate *__glXInitialize(Display* dpy) -{ - XExtDisplayInfo *info = __glXFindDisplay(dpy); - XExtData **privList, *private, *found; - __GLXdisplayPrivate *dpyPriv; - XEDataObject dataObj; - int major, minor; - -#if defined(USE_XTHREADS) - { - static int firstCall = 1; - if (firstCall) { - /* initialize the GLX mutexes */ - xmutex_init(&__glXmutex); - firstCall = 0; - } - } -#endif - - INIT_MESA_SPARC - /* The one and only long long lock */ - __glXLock(); - - if (!XextHasExtension(info)) { - /* No GLX extension supported by this server. Oh well. */ - __glXUnlock(); - XMissingExtension(dpy, __glXExtensionName); - return 0; - } - - /* See if a display private already exists. If so, return it */ - dataObj.display = dpy; - privList = XEHeadOfExtensionList(dataObj); - found = XFindOnExtensionList(privList, info->codes->extension); - if (found) { - __glXUnlock(); - return (__GLXdisplayPrivate *) found->private_data; - } - - /* See if the versions are compatible */ - if (!QueryVersion(dpy, info->codes->major_opcode, &major, &minor)) { - /* The client and server do not agree on versions. Punt. */ - __glXUnlock(); - return 0; - } - - /* - ** Allocate memory for all the pieces needed for this buffer. - */ - private = (XExtData *) Xmalloc(sizeof(XExtData)); - if (!private) { - __glXUnlock(); - return 0; - } - dpyPriv = (__GLXdisplayPrivate *) Xmalloc(sizeof(__GLXdisplayPrivate)); - if (!dpyPriv) { - __glXUnlock(); - Xfree((char*) private); - return 0; - } - - /* - ** Init the display private and then read in the screen config - ** structures from the server. - */ - dpyPriv->majorOpcode = info->codes->major_opcode; - dpyPriv->majorVersion = major; - dpyPriv->minorVersion = minor; - dpyPriv->dpy = dpy; - - dpyPriv->serverGLXvendor = 0x0; - dpyPriv->serverGLXversion = 0x0; - -#ifdef GLX_DIRECT_RENDERING - /* - ** Initialize the direct rendering per display data and functions. - ** Note: This _must_ be done before calling any other DRI routines - ** (e.g., those called in AllocAndFetchScreenConfigs). - */ - if (getenv("LIBGL_ALWAYS_INDIRECT")) { - /* Assinging zero here assures we'll never go direct */ - dpyPriv->driDisplay.private = 0; - dpyPriv->driDisplay.destroyDisplay = 0; - } - else { - dpyPriv->driDisplay.private = - driCreateDisplay(dpy, &dpyPriv->driDisplay); - } -#endif - - if (!AllocAndFetchScreenConfigs(dpy, dpyPriv)) { - __glXUnlock(); - Xfree((char*) dpyPriv); - Xfree((char*) private); - return 0; - } - - /* - ** Fill in the private structure. This is the actual structure that - ** hangs off of the Display structure. Our private structure is - ** referred to by this structure. Got that? - */ - private->number = info->codes->extension; - private->next = 0; - private->free_private = __glXFreeDisplayPrivate; - private->private_data = (char *) dpyPriv; - XAddToExtensionList(privList, private); - - if (dpyPriv->majorVersion == 1 && dpyPriv->minorVersion >= 1) { - __glXClientInfo(dpy, dpyPriv->majorOpcode); - } - __glXUnlock(); - - return dpyPriv; -} - -/* -** Setup for sending a GLX command on dpy. Make sure the extension is -** initialized. Try to avoid calling __glXInitialize as its kinda slow. -*/ -CARD8 __glXSetupForCommand(Display *dpy) -{ - GLXContext gc; - __GLXdisplayPrivate *priv; - - /* If this thread has a current context, flush its rendering commands */ - gc = __glXGetCurrentContext(); - if (gc->currentDpy) { - /* Flush rendering buffer of the current context, if any */ - (void) __glXFlushRenderBuffer(gc, gc->pc); - - if (gc->currentDpy == dpy) { - /* Use opcode from gc because its right */ - INIT_MESA_SPARC - return gc->majorOpcode; - } else { - /* - ** Have to get info about argument dpy because it might be to - ** a different server - */ - } - } - - /* Forced to lookup extension via the slow initialize route */ - priv = __glXInitialize(dpy); - if (!priv) { - return 0; - } - return priv->majorOpcode; -} - -/** - * Flush the drawing command transport buffer. - * - * \param ctx Context whose transport buffer is to be flushed. - * \param pc Pointer to first unused buffer location. - * - * \todo - * Modify this function to use \c ctx->pc instead of the explicit - * \c pc parameter. - */ -GLubyte *__glXFlushRenderBuffer(__GLXcontext *ctx, GLubyte *pc) -{ - Display * const dpy = ctx->currentDpy; -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); -#else - xGLXRenderReq *req; -#endif /* USE_XCB */ - const GLint size = pc - ctx->buf; - - if ( (dpy != NULL) && (size > 0) ) { -#ifdef USE_XCB - XCBGlxRender(c, ctx->currentContextTag, size, (char *)ctx->buf); -#else - /* Send the entire buffer as an X request */ - LockDisplay(dpy); - GetReq(GLXRender,req); - req->reqType = ctx->majorOpcode; - req->glxCode = X_GLXRender; - req->contextTag = ctx->currentContextTag; - req->length += (size + 3) >> 2; - _XSend(dpy, (char *)ctx->buf, size); - UnlockDisplay(dpy); - SyncHandle(); -#endif - } - - /* Reset pointer and return it */ - ctx->pc = ctx->buf; - return ctx->pc; -} - - -/** - * Send a portion of a GLXRenderLarge command to the server. The advantage of - * this function over \c __glXSendLargeCommand is that callers can use the - * data buffer in the GLX context and may be able to avoid allocating an - * extra buffer. The disadvantage is the clients will have to do more - * GLX protocol work (i.e., calculating \c totalRequests, etc.). - * - * \sa __glXSendLargeCommand - * - * \param gc GLX context - * \param requestNumber Which part of the whole command is this? The first - * request is 1. - * \param totalRequests How many requests will there be? - * \param data Command data. - * \param dataLen Size, in bytes, of the command data. - */ -void __glXSendLargeChunk(__GLXcontext *gc, GLint requestNumber, - GLint totalRequests, - const GLvoid * data, GLint dataLen) -{ - Display *dpy = gc->currentDpy; -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - XCBGlxRenderLarge(c, gc->currentContextTag, requestNumber, totalRequests, dataLen, data); -#else - xGLXRenderLargeReq *req; - - if ( requestNumber == 1 ) { - LockDisplay(dpy); - } - - GetReq(GLXRenderLarge,req); - req->reqType = gc->majorOpcode; - req->glxCode = X_GLXRenderLarge; - req->contextTag = gc->currentContextTag; - req->length += (dataLen + 3) >> 2; - req->requestNumber = requestNumber; - req->requestTotal = totalRequests; - req->dataBytes = dataLen; - Data(dpy, data, dataLen); - - if ( requestNumber == totalRequests ) { - UnlockDisplay(dpy); - SyncHandle(); - } -#endif /* USE_XCB */ -} - - -/** - * Send a command that is too large for the GLXRender protocol request. - * - * Send a large command, one that is too large for some reason to - * send using the GLXRender protocol request. One reason to send - * a large command is to avoid copying the data. - * - * \param ctx GLX context - * \param header Header data. - * \param headerLen Size, in bytes, of the header data. It is assumed that - * the header data will always be small enough to fit in - * a single X protocol packet. - * \param data Command data. - * \param dataLen Size, in bytes, of the command data. - */ -void __glXSendLargeCommand(__GLXcontext *ctx, - const GLvoid *header, GLint headerLen, - const GLvoid *data, GLint dataLen) -{ - GLint maxSize; - GLint totalRequests, requestNumber; - - /* - ** Calculate the maximum amount of data can be stuffed into a single - ** packet. sz_xGLXRenderReq is added because bufSize is the maximum - ** packet size minus sz_xGLXRenderReq. - */ - maxSize = (ctx->bufSize + sz_xGLXRenderReq) - sz_xGLXRenderLargeReq; - totalRequests = 1 + (dataLen / maxSize); - if (dataLen % maxSize) totalRequests++; - - /* - ** Send all of the command, except the large array, as one request. - */ - assert( headerLen <= maxSize ); - __glXSendLargeChunk(ctx, 1, totalRequests, header, headerLen); - - /* - ** Send enough requests until the whole array is sent. - */ - for ( requestNumber = 2 ; requestNumber <= (totalRequests - 1) ; requestNumber++ ) { - __glXSendLargeChunk(ctx, requestNumber, totalRequests, data, maxSize); - data = (const GLvoid *) (((const GLubyte *) data) + maxSize); - dataLen -= maxSize; - assert( dataLen > 0 ); - } - - assert( dataLen <= maxSize ); - __glXSendLargeChunk(ctx, requestNumber, totalRequests, data, dataLen); -} - -/************************************************************************/ - -GLXContext glXGetCurrentContext(void) -{ - GLXContext cx = __glXGetCurrentContext(); - - if (cx == &dummyContext) { - return NULL; - } else { - return cx; - } -} - -GLXDrawable glXGetCurrentDrawable(void) -{ - GLXContext gc = __glXGetCurrentContext(); - return gc->currentDrawable; -} - - -/************************************************************************/ - -#ifdef GLX_DIRECT_RENDERING -/* Return the DRI per screen structure */ -__DRIscreen *__glXFindDRIScreen(__DRInativeDisplay *dpy, int scrn) -{ - __DRIscreen *pDRIScreen = NULL; - XExtDisplayInfo *info = __glXFindDisplay(dpy); - XExtData **privList, *found; - __GLXdisplayPrivate *dpyPriv; - XEDataObject dataObj; - - __glXLock(); - dataObj.display = dpy; - privList = XEHeadOfExtensionList(dataObj); - found = XFindOnExtensionList(privList, info->codes->extension); - __glXUnlock(); - - if (found) { - dpyPriv = (__GLXdisplayPrivate *)found->private_data; - pDRIScreen = &dpyPriv->screenConfigs[scrn].driScreen; - } - - return pDRIScreen; -} -#endif - -/************************************************************************/ - -static Bool SendMakeCurrentRequest( Display *dpy, CARD8 opcode, - GLXContextID gc, GLXContextTag old_gc, GLXDrawable draw, GLXDrawable read, - xGLXMakeCurrentReply * reply ); - -/** - * Sends a GLX protocol message to the specified display to make the context - * and the drawables current. - * - * \param dpy Display to send the message to. - * \param opcode Major opcode value for the display. - * \param gc_id Context tag for the context to be made current. - * \param draw Drawable ID for the "draw" drawable. - * \param read Drawable ID for the "read" drawable. - * \param reply Space to store the X-server's reply. - * - * \warning - * This function assumes that \c dpy is locked with \c LockDisplay on entry. - */ -static Bool SendMakeCurrentRequest( Display *dpy, CARD8 opcode, - GLXContextID gc_id, GLXContextTag gc_tag, - GLXDrawable draw, GLXDrawable read, - xGLXMakeCurrentReply * reply ) -{ - if ( draw == read ) { - xGLXMakeCurrentReq *req; - - GetReq(GLXMakeCurrent,req); - req->reqType = opcode; - req->glxCode = X_GLXMakeCurrent; - req->drawable = draw; - req->context = gc_id; - req->oldContextTag = gc_tag; - } - else { - __GLXdisplayPrivate *priv = __glXInitialize(dpy); - - /* If the server can support the GLX 1.3 version, we should - * perfer that. Not only that, some servers support GLX 1.3 but - * not the SGI extension. - */ - - if ( (priv->majorVersion > 1) || (priv->minorVersion >= 3) ) { - xGLXMakeContextCurrentReq *req; - - GetReq(GLXMakeContextCurrent,req); - req->reqType = opcode; - req->glxCode = X_GLXMakeContextCurrent; - req->drawable = draw; - req->readdrawable = read; - req->context = gc_id; - req->oldContextTag = gc_tag; - } - else { - xGLXVendorPrivateWithReplyReq *vpreq; - xGLXMakeCurrentReadSGIReq *req; - - GetReqExtra(GLXVendorPrivateWithReply, - sz_xGLXMakeCurrentReadSGIReq-sz_xGLXVendorPrivateWithReplyReq,vpreq); - req = (xGLXMakeCurrentReadSGIReq *)vpreq; - req->reqType = opcode; - req->glxCode = X_GLXVendorPrivateWithReply; - req->vendorCode = X_GLXvop_MakeCurrentReadSGI; - req->drawable = draw; - req->readable = read; - req->context = gc_id; - req->oldContextTag = gc_tag; - } - } - - return _XReply(dpy, (xReply*) reply, 0, False); -} - - -#ifdef GLX_DIRECT_RENDERING -static Bool BindContextWrapper( Display *dpy, GLXContext gc, - GLXDrawable draw, GLXDrawable read ) -{ - return (*gc->driContext.bindContext)(dpy, gc->screen, draw, read, - & gc->driContext); -} - - -static Bool UnbindContextWrapper( GLXContext gc ) -{ - return (*gc->driContext.unbindContext)(gc->currentDpy, gc->screen, - gc->currentDrawable, - gc->currentReadable, - & gc->driContext ); -} -#endif /* GLX_DIRECT_RENDERING */ - - -/* -** Make a particular context current. -** NOTE: this is in this file so that it can access dummyContext. -*/ -USED static Bool MakeContextCurrent(Display *dpy, GLXDrawable draw, - GLXDrawable read, GLXContext gc) -{ - xGLXMakeCurrentReply reply; - GLXContext oldGC; - CARD8 opcode, oldOpcode; - Bool sentRequestToOldDpy = False; - Bool bindReturnValue = True; - - opcode = __glXSetupForCommand(dpy); - if (!opcode) { - return GL_FALSE; - } - - /* - ** Make sure that the new context has a nonzero ID. In the request, - ** a zero context ID is used only to mean that we bind to no current - ** context. - */ - if ((gc != NULL) && (gc->xid == None)) { - return GL_FALSE; - } - - oldGC = __glXGetCurrentContext(); - oldOpcode = (gc == oldGC) ? opcode : __glXSetupForCommand(dpy); - if (!oldOpcode) { - return GL_FALSE; - } - - if ((dpy != oldGC->currentDpy || (gc && gc->isDirect)) && - !oldGC->isDirect && oldGC != &dummyContext) { - /* - ** We are either switching from one dpy to another and have to - ** send a request to the previous dpy to unbind the previous - ** context, or we are switching away from a indirect context to - ** a direct context and have to send a request to the dpy to - ** unbind the previous context. - */ - sentRequestToOldDpy = True; - LockDisplay(oldGC->currentDpy); - if ( ! SendMakeCurrentRequest( oldGC->currentDpy, oldOpcode, None, - oldGC->currentContextTag, None, None, - &reply ) ) { - /* The make current failed. Just return GL_FALSE. */ - UnlockDisplay(oldGC->currentDpy); - SyncHandle(); - return GL_FALSE; - } - - oldGC->currentContextTag = 0; - } - - _glapi_check_multithread(); - -#ifdef GLX_DIRECT_RENDERING - /* Unbind the old direct rendering context */ - if (oldGC->isDirect) { - if (oldGC->driContext.private) { - if (! UnbindContextWrapper( oldGC )) { - /* The make current failed. Just return GL_FALSE. */ - return GL_FALSE; - } - } - oldGC->currentContextTag = 0; - } - - /* Bind the direct rendering context to the drawable */ - if (gc && gc->isDirect) { - if (gc->driContext.private) { - bindReturnValue = BindContextWrapper( dpy, gc, draw, read ); - } - } else { -#endif - /* Send a glXMakeCurrent request to bind the new context. */ - LockDisplay(dpy); - - bindReturnValue = SendMakeCurrentRequest( dpy, opcode, - gc ? gc->xid : None, - oldGC->currentContextTag, - draw, read, &reply ); - UnlockDisplay(dpy); -#ifdef GLX_DIRECT_RENDERING - } -#endif - - - if (!bindReturnValue) { - /* The make current failed. */ - if (gc && !gc->isDirect) { - SyncHandle(); - } - -#ifdef GLX_DIRECT_RENDERING - /* If the old context was direct rendering, then re-bind to it. */ - if (oldGC->isDirect) { - if (oldGC->driContext.private) { - if (! BindContextWrapper( oldGC->currentDpy, oldGC, - oldGC->currentDrawable, - oldGC->currentReadable )) { - /* - ** The request failed; this cannot happen with the - ** current API. If in the future the API is - ** extended to allow context sharing between - ** clients, then this may fail (because another - ** client may have grabbed the context); in that - ** case, we cannot undo the previous request, and - ** cannot adhere to the "no-op" behavior. - */ - } - } - } else -#endif - /* - ** If we had just sent a request to a previous dpy, we have to - ** undo that request (because if a command fails, it should act - ** like a no-op) by making current to the previous context and - ** drawable. - */ - if (sentRequestToOldDpy) { - if ( !SendMakeCurrentRequest( oldGC->currentDpy, oldOpcode, - oldGC->xid, 0, - oldGC->currentDrawable, - oldGC->currentReadable, &reply ) ) { - UnlockDisplay(oldGC->currentDpy); - SyncHandle(); - /* - ** The request failed; this cannot happen with the - ** current API. If in the future the API is extended to - ** allow context sharing between clients, then this may - ** fail (because another client may have grabbed the - ** context); in that case, we cannot undo the previous - ** request, and cannot adhere to the "no-op" behavior. - */ - } - else { - UnlockDisplay(oldGC->currentDpy); - } - oldGC->currentContextTag = reply.contextTag; - } - return GL_FALSE; - } - - /* Update our notion of what is current */ - __glXLock(); - if (gc == oldGC) { - /* - ** Even though the contexts are the same the drawable might have - ** changed. Note that gc cannot be the dummy, and that oldGC - ** cannot be NULL, therefore if they are the same, gc is not - ** NULL and not the dummy. - */ - gc->currentDrawable = draw; - gc->currentReadable = read; - } else { - if (oldGC != &dummyContext) { - /* Old current context is no longer current to anybody */ - oldGC->currentDpy = 0; - oldGC->currentDrawable = None; - oldGC->currentReadable = None; - oldGC->currentContextTag = 0; - - if (oldGC->xid == None) { - /* - ** We are switching away from a context that was - ** previously destroyed, so we need to free the memory - ** for the old handle. - */ -#ifdef GLX_DIRECT_RENDERING - /* Destroy the old direct rendering context */ - if (oldGC->isDirect) { - if (oldGC->driContext.private) { - (*oldGC->driContext.destroyContext) - (dpy, oldGC->screen, oldGC->driContext.private); - oldGC->driContext.private = NULL; - } - } -#endif - __glXFreeContext(oldGC); - } - } - if (gc) { - __glXSetCurrentContext(gc); -#ifdef GLX_DIRECT_RENDERING - if (!gc->isDirect) { - if (!IndirectAPI) - IndirectAPI = __glXNewIndirectAPI(); - _glapi_set_dispatch(IndirectAPI); -# ifdef GLX_USE_APPLEGL - do { - extern void XAppleDRIUseIndirectDispatch(void); - XAppleDRIUseIndirectDispatch(); - } while (0); -# endif - } -#else - /* if not direct rendering, always need indirect dispatch */ - if (!IndirectAPI) - IndirectAPI = __glXNewIndirectAPI(); - _glapi_set_dispatch(IndirectAPI); -#endif - gc->currentDpy = dpy; - gc->currentDrawable = draw; - gc->currentReadable = read; - - if ( ! gc->isDirect ) { - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - - gc->currentContextTag = reply.contextTag; - if ( state->array_state == NULL ) { - (void) glGetString( GL_EXTENSIONS ); - (void) glGetString( GL_VERSION ); - __glXInitVertexArrayState(gc); - } - } - else { - gc->currentContextTag = -1; - } - } else { - __glXSetCurrentContext(&dummyContext); -#ifdef GLX_DIRECT_RENDERING - _glapi_set_dispatch(NULL); /* no-op functions */ -#endif - } - } - __glXUnlock(); - return GL_TRUE; -} - - -PUBLIC Bool glXMakeCurrent(Display *dpy, GLXDrawable draw, GLXContext gc) -{ - return MakeContextCurrent( dpy, draw, draw, gc ); -} - -PUBLIC GLX_ALIAS(Bool, glXMakeCurrentReadSGI, - (Display *dpy, GLXDrawable d, GLXDrawable r, GLXContext ctx), - (dpy, d, r, ctx), MakeContextCurrent) - -PUBLIC GLX_ALIAS(Bool, glXMakeContextCurrent, - (Display *dpy, GLXDrawable d, GLXDrawable r, GLXContext ctx), - (dpy, d, r, ctx), MakeContextCurrent) - - -#ifdef DEBUG -void __glXDumpDrawBuffer(__GLXcontext *ctx) -{ - GLubyte *p = ctx->buf; - GLubyte *end = ctx->pc; - GLushort opcode, length; - - while (p < end) { - /* Fetch opcode */ - opcode = *((GLushort*) p); - length = *((GLushort*) (p + 2)); - printf("%2x: %5d: ", opcode, length); - length -= 4; - p += 4; - while (length > 0) { - printf("%08x ", *((unsigned *) p)); - p += 4; - length -= 4; - } - printf("\n"); - } -} -#endif - -#ifdef USE_SPARC_ASM -/* - * Used only when we are sparc, using sparc assembler. - * - */ - -static void -_glx_mesa_init_sparc_glapi_relocs(void) -{ - unsigned int *insn_ptr, *end_ptr; - unsigned long disp_addr; - - insn_ptr = &_mesa_sparc_glapi_begin; - end_ptr = &_mesa_sparc_glapi_end; - disp_addr = (unsigned long) &_glapi_Dispatch; - - /* - * Verbatim from Mesa sparc.c. It's needed because there doesn't - * seem to be a better way to do this: - * - * UNCONDITIONAL_JUMP ( (*_glapi_Dispatch) + entry_offset ) - * - * This code is patching in the ADDRESS of the pointer to the - * dispatch table. Hence, it must be called exactly once, because - * that address is not going to change. - * - * What it points to can change, but Mesa (and hence, we) assume - * that there is only one pointer. - * - */ - while (insn_ptr < end_ptr) { -#if ( defined(__sparc_v9__) && ( !defined(__linux__) || defined(__linux_64__) ) ) -/* - This code patches for 64-bit addresses. This had better - not happen for Sparc/Linux, no matter what architecture we - are building for. So, don't do this. - - The 'defined(__linux_64__)' is used here as a placeholder for - when we do do 64-bit usermode on sparc linux. - */ - insn_ptr[0] |= (disp_addr >> (32 + 10)); - insn_ptr[1] |= ((disp_addr & 0xffffffff) >> 10); - __glapi_sparc_icache_flush(&insn_ptr[0]); - insn_ptr[2] |= ((disp_addr >> 32) & ((1 << 10) - 1)); - insn_ptr[3] |= (disp_addr & ((1 << 10) - 1)); - __glapi_sparc_icache_flush(&insn_ptr[2]); - insn_ptr += 11; -#else - insn_ptr[0] |= (disp_addr >> 10); - insn_ptr[1] |= (disp_addr & ((1 << 10) - 1)); - __glapi_sparc_icache_flush(&insn_ptr[0]); - insn_ptr += 5; -#endif - } -} -#endif /* sparc ASM in use */ - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glxextensions.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glxextensions.c deleted file mode 100644 index d2597981cf..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glxextensions.c +++ /dev/null @@ -1,717 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2002, 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file glxextensions.c - * - * \author Ian Romanick - */ - -#include "glxclient.h" -#include -#include -#include -#include "glapi.h" -#include "glxextensions.h" -#include "simple_list.h" - -#define SET_BIT(m,b) (m[ (b) / 8 ] |= (1U << ((b) % 8))) -#define CLR_BIT(m,b) (m[ (b) / 8 ] &= ~(1U << ((b) % 8))) -#define IS_SET(m,b) ((m[ (b) / 8 ] & (1U << ((b) % 8))) != 0) -#define CONCAT(a,b) a ## b -#define GLX(n) "GLX_" # n, 4 + sizeof( # n ) - 1, CONCAT(n,_bit) -#define GL(n) "GL_" # n, 3 + sizeof( # n ) - 1, GL_ ## n ## _bit -#define VER(a,b) a, b -#define Y 1 -#define N 0 -#define EXT_ENABLED(bit,supported) (IS_SET( supported, bit )) - - -struct extension_info { - const char * const name; - unsigned name_len; - - unsigned char bit; - - /* This is the lowest version of GLX that "requires" this extension. - * For example, GLX 1.3 requires SGIX_fbconfig, SGIX_pbuffer, and - * SGI_make_current_read. If the extension is not required by any known - * version of GLX, use 0, 0. - */ - unsigned char version_major; - unsigned char version_minor; - unsigned char client_support; - unsigned char direct_support; - unsigned char client_only; /** Is the extension client-side only? */ - unsigned char direct_only; /** Is the extension for direct - * contexts only? - */ -}; - -static const struct extension_info known_glx_extensions[] = { - { GLX(ARB_get_proc_address), VER(1,4), Y, N, Y, N }, - { GLX(ARB_multisample), VER(1,4), Y, Y, N, N }, - { GLX(ARB_render_texture), VER(0,0), N, N, N, N }, - { GLX(ATI_pixel_format_float), VER(0,0), N, N, N, N }, - { GLX(EXT_import_context), VER(0,0), Y, Y, N, N }, - { GLX(EXT_visual_info), VER(0,0), Y, Y, N, N }, - { GLX(EXT_visual_rating), VER(0,0), Y, Y, N, N }, - { GLX(MESA_agp_offset), VER(0,0), N, N, N, Y }, /* Deprecated */ - { GLX(MESA_allocate_memory), VER(0,0), Y, N, N, Y }, - { GLX(MESA_copy_sub_buffer), VER(0,0), N, N, N, N }, /* Deprecated? */ - { GLX(MESA_pixmap_colormap), VER(0,0), N, N, N, N }, /* Deprecated */ - { GLX(MESA_release_buffers), VER(0,0), N, N, N, N }, /* Deprecated */ - { GLX(MESA_set_3dfx_mode), VER(0,0), N, N, N, N }, /* Deprecated */ - { GLX(MESA_swap_control), VER(0,0), Y, N, N, Y }, - { GLX(MESA_swap_frame_usage), VER(0,0), Y, N, N, Y }, - { GLX(NV_float_buffer), VER(0,0), N, N, N, N }, - { GLX(NV_render_depth_texture), VER(0,0), N, N, N, N }, - { GLX(NV_render_texture_rectangle), VER(0,0), N, N, N, N }, - { GLX(NV_vertex_array_range), VER(0,0), N, N, N, Y }, /* Deprecated */ - { GLX(OML_swap_method), VER(0,0), Y, Y, N, N }, - { GLX(OML_sync_control), VER(0,0), Y, N, N, Y }, - { GLX(SGI_cushion), VER(0,0), N, N, N, N }, - { GLX(SGI_make_current_read), VER(1,3), Y, N, N, N }, - { GLX(SGI_swap_control), VER(0,0), Y, N, N, N }, - { GLX(SGI_video_sync), VER(0,0), Y, N, N, Y }, - { GLX(SGIS_blended_overlay), VER(0,0), N, N, N, N }, - { GLX(SGIS_color_range), VER(0,0), N, N, N, N }, - { GLX(SGIS_multisample), VER(0,0), Y, Y, N, N }, - { GLX(SGIX_dm_buffer), VER(0,0), N, N, N, N }, - { GLX(SGIX_fbconfig), VER(1,3), Y, Y, N, N }, - { GLX(SGIX_pbuffer), VER(1,3), Y, N, N, N }, - { GLX(SGIX_swap_barrier), VER(0,0), N, N, N, N }, - { GLX(SGIX_swap_group), VER(0,0), N, N, N, N }, - { GLX(SGIX_video_resize), VER(0,0), N, N, N, N }, - { GLX(SGIX_video_source), VER(0,0), N, N, N, N }, - { GLX(SGIX_visual_select_group), VER(0,0), Y, Y, N, N }, - { GLX(SUN_get_transparent_index), VER(0,0), N, N, N, N }, - { NULL } -}; - -static const struct extension_info known_gl_extensions[] = { - { GL(ARB_depth_texture), VER(1,4), Y, N, N, N }, - { GL(ARB_draw_buffers), VER(0,0), Y, N, N, N }, - { GL(ARB_fragment_program), VER(0,0), Y, N, N, N }, - { GL(ARB_fragment_program_shadow), VER(0,0), Y, N, N, N }, - { GL(ARB_imaging), VER(0,0), Y, N, N, N }, - { GL(ARB_multisample), VER(1,3), Y, N, N, N }, - { GL(ARB_multitexture), VER(1,3), Y, N, N, N }, - { GL(ARB_occlusion_query), VER(1,5), Y, N, N, N }, - { GL(ARB_point_parameters), VER(1,4), Y, N, N, N }, - { GL(ARB_point_sprite), VER(0,0), Y, N, N, N }, - { GL(ARB_shadow), VER(1,4), Y, N, N, N }, - { GL(ARB_shadow_ambient), VER(0,0), Y, N, N, N }, - { GL(ARB_texture_border_clamp), VER(1,3), Y, N, N, N }, - { GL(ARB_texture_compression), VER(1,3), Y, N, N, N }, - { GL(ARB_texture_cube_map), VER(1,3), Y, N, N, N }, - { GL(ARB_texture_env_add), VER(1,3), Y, N, N, N }, - { GL(ARB_texture_env_combine), VER(1,3), Y, N, N, N }, - { GL(ARB_texture_env_crossbar), VER(1,4), Y, N, N, N }, - { GL(ARB_texture_env_dot3), VER(1,3), Y, N, N, N }, - { GL(ARB_texture_mirrored_repeat), VER(1,4), Y, N, N, N }, - { GL(ARB_texture_non_power_of_two), VER(1,5), Y, N, N, N }, - { GL(ARB_texture_rectangle), VER(0,0), Y, N, N, N }, - { GL(ARB_transpose_matrix), VER(1,3), Y, N, Y, N }, - { GL(ARB_vertex_buffer_object), VER(1,5), N, N, N, N }, - { GL(ARB_vertex_program), VER(0,0), Y, N, N, N }, - { GL(ARB_window_pos), VER(1,4), Y, N, N, N }, - { GL(EXT_abgr), VER(0,0), Y, N, N, N }, - { GL(EXT_bgra), VER(1,2), Y, N, N, N }, - { GL(EXT_blend_color), VER(1,4), Y, N, N, N }, - { GL(EXT_blend_equation_separate), VER(0,0), N, N, N, N }, - { GL(EXT_blend_func_separate), VER(1,4), Y, N, N, N }, - { GL(EXT_blend_logic_op), VER(1,4), Y, N, N, N }, - { GL(EXT_blend_minmax), VER(1,4), Y, N, N, N }, - { GL(EXT_blend_subtract), VER(1,4), Y, N, N, N }, - { GL(EXT_clip_volume_hint), VER(0,0), Y, N, N, N }, - { GL(EXT_compiled_vertex_array), VER(0,0), N, N, N, N }, - { GL(EXT_convolution), VER(0,0), N, N, N, N }, - { GL(EXT_copy_texture), VER(1,1), Y, N, N, N }, - { GL(EXT_cull_vertex), VER(0,0), N, N, N, N }, - { GL(EXT_depth_bounds_test), VER(0,0), N, N, N, N }, - { GL(EXT_draw_range_elements), VER(1,2), Y, N, Y, N }, - { GL(EXT_fog_coord), VER(1,4), Y, N, N, N }, - { GL(EXT_multi_draw_arrays), VER(1,4), Y, N, Y, N }, - { GL(EXT_packed_pixels), VER(1,2), Y, N, N, N }, - { GL(EXT_paletted_texture), VER(0,0), Y, N, N, N }, - { GL(EXT_pixel_buffer_object), VER(0,0), N, N, N, N }, - { GL(EXT_point_parameters), VER(1,4), Y, N, N, N }, - { GL(EXT_polygon_offset), VER(1,1), Y, N, N, N }, - { GL(EXT_rescale_normal), VER(1,2), Y, N, N, N }, - { GL(EXT_secondary_color), VER(1,4), Y, N, N, N }, - { GL(EXT_separate_specular_color), VER(1,2), Y, N, N, N }, - { GL(EXT_shadow_funcs), VER(1,5), Y, N, N, N }, - { GL(EXT_shared_texture_palette), VER(0,0), Y, N, N, N }, - { GL(EXT_stencil_two_side), VER(0,0), Y, N, N, N }, - { GL(EXT_stencil_wrap), VER(1,4), Y, N, N, N }, - { GL(EXT_subtexture), VER(1,1), Y, N, N, N }, - { GL(EXT_texture), VER(1,1), Y, N, N, N }, - { GL(EXT_texture3D), VER(1,2), Y, N, N, N }, - { GL(EXT_texture_compression_dxt1), VER(0,0), Y, N, N, N }, - { GL(EXT_texture_compression_s3tc), VER(0,0), Y, N, N, N }, - { GL(EXT_texture_edge_clamp), VER(1,2), Y, N, N, N }, - { GL(EXT_texture_env_add), VER(1,3), Y, N, N, N }, - { GL(EXT_texture_env_combine), VER(1,3), Y, N, N, N }, - { GL(EXT_texture_env_dot3), VER(0,0), Y, N, N, N }, - { GL(EXT_texture_filter_anisotropic), VER(0,0), Y, N, N, N }, - { GL(EXT_texture_lod), VER(1,2), Y, N, N, N }, - { GL(EXT_texture_lod_bias), VER(1,4), Y, N, N, N }, - { GL(EXT_texture_mirror_clamp), VER(0,0), Y, N, N, N }, - { GL(EXT_texture_object), VER(1,1), Y, N, N, N }, - { GL(EXT_texture_rectangle), VER(0,0), Y, N, N, N }, - { GL(EXT_vertex_array), VER(0,0), Y, N, N, N }, - { GL(3DFX_texture_compression_FXT1), VER(0,0), Y, N, N, N }, - { GL(APPLE_packed_pixels), VER(1,2), Y, N, N, N }, - { GL(APPLE_ycbcr_422), VER(0,0), Y, N, N, N }, - { GL(ATI_draw_buffers), VER(0,0), Y, N, N, N }, - { GL(ATI_text_fragment_shader), VER(0,0), Y, N, N, N }, - { GL(ATI_texture_env_combine3), VER(0,0), Y, N, N, N }, - { GL(ATI_texture_float), VER(0,0), Y, N, N, N }, - { GL(ATI_texture_mirror_once), VER(0,0), Y, N, N, N }, - { GL(ATIX_texture_env_combine3), VER(0,0), Y, N, N, N }, - { GL(HP_convolution_border_modes), VER(0,0), Y, N, N, N }, - { GL(HP_occlusion_test), VER(0,0), Y, N, N, N }, - { GL(IBM_cull_vertex), VER(0,0), Y, N, N, N }, - { GL(IBM_pixel_filter_hint), VER(0,0), Y, N, N, N }, - { GL(IBM_rasterpos_clip), VER(0,0), Y, N, N, N }, - { GL(IBM_texture_clamp_nodraw), VER(0,0), Y, N, N, N }, - { GL(IBM_texture_mirrored_repeat), VER(0,0), Y, N, N, N }, - { GL(INGR_blend_func_separate), VER(0,0), Y, N, N, N }, - { GL(INGR_interlace_read), VER(0,0), Y, N, N, N }, - { GL(MESA_pack_invert), VER(0,0), Y, N, N, N }, - { GL(MESA_ycbcr_texture), VER(0,0), Y, N, N, N }, - { GL(NV_blend_square), VER(1,4), Y, N, N, N }, - { GL(NV_copy_depth_to_color), VER(0,0), Y, N, N, N }, - { GL(NV_depth_clamp), VER(0,0), Y, N, N, N }, - { GL(NV_fog_distance), VER(0,0), Y, N, N, N }, - { GL(NV_fragment_program), VER(0,0), Y, N, N, N }, - { GL(NV_fragment_program_option), VER(0,0), Y, N, N, N }, - { GL(NV_fragment_program2), VER(0,0), Y, N, N, N }, - { GL(NV_light_max_exponent), VER(0,0), Y, N, N, N }, - { GL(NV_multisample_filter_hint), VER(0,0), Y, N, N, N }, - { GL(NV_point_sprite), VER(0,0), Y, N, N, N }, - { GL(NV_texgen_reflection), VER(0,0), Y, N, N, N }, - { GL(NV_texture_compression_vtc), VER(0,0), Y, N, N, N }, - { GL(NV_texture_env_combine4), VER(0,0), Y, N, N, N }, - { GL(NV_texture_rectangle), VER(0,0), Y, N, N, N }, - { GL(NV_vertex_program), VER(0,0), Y, N, N, N }, - { GL(NV_vertex_program1_1), VER(0,0), Y, N, N, N }, - { GL(NV_vertex_program2), VER(0,0), Y, N, N, N }, - { GL(NV_vertex_program2_option), VER(0,0), Y, N, N, N }, - { GL(NV_vertex_program3), VER(0,0), Y, N, N, N }, - { GL(OES_read_format), VER(0,0), Y, N, N, N }, - { GL(OES_compressed_paletted_texture),VER(0,0), Y, N, N, N }, - { GL(SGI_color_matrix), VER(0,0), Y, N, N, N }, - { GL(SGI_texture_color_table), VER(0,0), Y, N, N, N }, - { GL(SGIS_generate_mipmap), VER(1,4), Y, N, N, N }, - { GL(SGIS_multisample), VER(0,0), Y, N, N, N }, - { GL(SGIS_texture_border_clamp), VER(1,3), Y, N, N, N }, - { GL(SGIS_texture_edge_clamp), VER(1,2), Y, N, N, N }, - { GL(SGIS_texture_lod), VER(1,2), Y, N, N, N }, - { GL(SGIX_blend_alpha_minmax), VER(0,0), Y, N, N, N }, - { GL(SGIX_clipmap), VER(0,0), Y, N, N, N }, - { GL(SGIX_depth_texture), VER(0,0), Y, N, N, N }, - { GL(SGIX_fog_offset), VER(0,0), Y, N, N, N }, - { GL(SGIX_shadow), VER(0,0), Y, N, N, N }, - { GL(SGIX_shadow_ambient), VER(0,0), Y, N, N, N }, - { GL(SGIX_texture_coordinate_clamp), VER(0,0), Y, N, N, N }, - { GL(SGIX_texture_lod_bias), VER(0,0), Y, N, N, N }, - { GL(SGIX_texture_range), VER(0,0), Y, N, N, N }, - { GL(SGIX_texture_scale_bias), VER(0,0), Y, N, N, N }, - { GL(SGIX_vertex_preclip), VER(0,0), Y, N, N, N }, - { GL(SGIX_vertex_preclip_hint), VER(0,0), Y, N, N, N }, - { GL(SGIX_ycrcb), VER(0,0), Y, N, N, N }, - { GL(SUN_convolution_border_modes), VER(0,0), Y, N, N, N }, - { GL(SUN_multi_draw_arrays), VER(0,0), Y, N, Y, N }, - { GL(SUN_slice_accum), VER(0,0), Y, N, N, N }, - { NULL } -}; - - -/* global bit-fields of available extensions and their characteristics */ -static unsigned char client_glx_support[8]; -static unsigned char client_glx_only[8]; -static unsigned char direct_glx_only[8]; -static unsigned char client_gl_support[ __GL_EXT_BYTES ]; -static unsigned char client_gl_only[ __GL_EXT_BYTES ]; - -/** - * Bits representing the set of extensions that are enabled by default in all - * direct rendering drivers. - */ -static unsigned char direct_glx_support[8]; - -/** - * Highest core GL version that can be supported for indirect rendering. - */ -static const unsigned gl_major = 1; -static const unsigned gl_minor = 4; - -/* client extensions string */ -static const char * __glXGLXClientExtensions = NULL; - -static void __glXExtensionsCtr( void ); -static void __glXExtensionsCtrScreen( __GLXscreenConfigs *psc ); -static void __glXProcessServerString( const struct extension_info * ext, - const char * server_string, unsigned char * server_support ); - -/** - * Set the state of a GLX extension. - * - * \param name Name of the extension. - * \param name_len Length, in characters, of the extension name. - * \param state New state (either enabled or disabled) of the extension. - * \param supported Table in which the state of the extension is to be set. - */ -static void -set_glx_extension( const struct extension_info * ext, - const char * name, unsigned name_len, GLboolean state, - unsigned char * supported ) -{ - unsigned i; - - - for ( i = 0 ; ext[i].name != NULL ; i++ ) { - if ( (name_len == ext[i].name_len) - && (strncmp( ext[i].name, name, name_len ) == 0) ) { - if ( state ) { - SET_BIT( supported, ext[i].bit ); - } - else { - CLR_BIT( supported, ext[i].bit ); - } - - return; - } - } -} - - -#define NUL '\0' -#define SEPARATOR ' ' - -/** - * Convert the server's extension string to a bit-field. - * - * \param server_string GLX extension string from the server. - * \param server_support Bit-field of supported extensions. - */ -static void -__glXProcessServerString( const struct extension_info * ext, - const char * server_string, - unsigned char * server_support ) -{ - unsigned base; - unsigned len; - - (void) memset( server_support, 0, sizeof( server_support ) ); - - for ( base = 0 ; server_string[ base ] != NUL ; /* empty */ ) { - /* Determine the length of the next extension name. - */ - for ( len = 0 - ; (server_string[ base + len ] != SEPARATOR) - && (server_string[ base + len ] != NUL) - ; len++ ) { - /* empty */ - } - - /* Set the bit for the extension in the server_support table. - */ - set_glx_extension( ext, & server_string[ base ], len, GL_TRUE, - server_support ); - - - /* Advance to the next extension string. This means that we skip - * over the previous string and any trialing white-space. - */ - for ( base += len ; - (server_string[ base ] == SEPARATOR) - && (server_string[ base ] != NUL) - ; base++ ) { - /* empty */ - } - } -} - - -/** - * Enable a named GLX extension on a given screen. - * Drivers should not call this function directly. They should instead use - * \c glXGetProcAddress to obtain a pointer to the function. - * - * \param psc Pointer to GLX per-screen record. - * \param name Name of the extension to enable. - * - * \sa glXGetProcAddress - * - * \since Internal API version 20030813. - */ -void -__glXScrEnableExtension( __GLXscreenConfigs *psc, const char * name ) -{ - __glXExtensionsCtr(); - __glXExtensionsCtrScreen(psc); - set_glx_extension( known_glx_extensions, name, strlen( name ), GL_TRUE, - psc->direct_support ); -} - - -/** - * Initialize global extension support tables. - */ - -static void -__glXExtensionsCtr( void ) -{ - unsigned i; - static GLboolean ext_list_first_time = GL_TRUE; - - - if ( ext_list_first_time ) { - ext_list_first_time = GL_FALSE; - - (void) memset( client_glx_support, 0, sizeof( client_glx_support ) ); - (void) memset( direct_glx_support, 0, sizeof( direct_glx_support ) ); - (void) memset( client_glx_only, 0, sizeof( client_glx_only ) ); - (void) memset( direct_glx_only, 0, sizeof( direct_glx_only ) ); - - (void) memset( client_gl_support, 0, sizeof( client_gl_support ) ); - (void) memset( client_gl_only, 0, sizeof( client_gl_only ) ); - - for ( i = 0 ; known_glx_extensions[i].name != NULL ; i++ ) { - const unsigned bit = known_glx_extensions[i].bit; - - if ( known_glx_extensions[i].client_support ) { - SET_BIT( client_glx_support, bit ); - } - - if ( known_glx_extensions[i].direct_support ) { - SET_BIT( direct_glx_support, bit ); - } - - if ( known_glx_extensions[i].client_only ) { - SET_BIT( client_glx_only, bit ); - } - - if ( known_glx_extensions[i].direct_only ) { - SET_BIT( direct_glx_only, bit ); - } - } - - for ( i = 0 ; known_gl_extensions[i].name != NULL ; i++ ) { - const unsigned bit = known_gl_extensions[i].bit; - - if ( known_gl_extensions[i].client_support ) { - SET_BIT( client_gl_support, bit ); - } - - if ( known_gl_extensions[i].client_only ) { - SET_BIT( client_gl_only, bit ); - } - } - -#if 0 - fprintf( stderr, "[%s:%u] Maximum client library version: %u.%u\n", - __func__, __LINE__, gl_major, gl_minor ); -#endif - } -} - - -/** - * Make sure that per-screen direct-support table is initialized. - * - * \param psc Pointer to GLX per-screen record. - */ - -static void -__glXExtensionsCtrScreen( __GLXscreenConfigs *psc ) -{ - if (psc->ext_list_first_time) { - psc->ext_list_first_time = GL_FALSE; - (void) memcpy( psc->direct_support, direct_glx_support, - sizeof( direct_glx_support ) ); - } -} - - -/** - * Check if a certain extension is enabled on a given screen. - * - * \param psc Pointer to GLX per-screen record. - * \param bit Bit index in the direct-support table. - * \returns If the extension bit is enabled for the screen, \c GL_TRUE is - * returned. If the extension bit is not enabled or if \c psc is - * \c NULL, then \c GL_FALSE is returned. - */ -GLboolean -__glXExtensionBitIsEnabled( __GLXscreenConfigs *psc, unsigned bit ) -{ - GLboolean enabled = GL_FALSE; - - if ( psc != NULL ) { - __glXExtensionsCtr(); - __glXExtensionsCtrScreen( psc ); - enabled = EXT_ENABLED( bit, psc->direct_support ); - } - - return enabled; -} - - -/** - * Check if a certain extension is enabled in a given context. - * - */ -GLboolean -__glExtensionBitIsEnabled( const __GLXcontext * gc, unsigned bit ) -{ - GLboolean enabled = GL_FALSE; - - if ( gc != NULL ) { - enabled = EXT_ENABLED( bit, gc->gl_extension_bits ); - } - - return enabled; -} - - - -/** - * Convert a bit-field to a string of supported extensions. - */ -static char * -__glXGetStringFromTable( const struct extension_info * ext, - const unsigned char * supported ) -{ - unsigned i; - unsigned ext_str_len; - char * ext_str; - char * point; - - - ext_str_len = 0; - for ( i = 0 ; ext[i].name != NULL ; i++ ) { - if ( EXT_ENABLED( ext[i].bit, supported ) ) { - ext_str_len += ext[i].name_len + 1; - } - } - - ext_str = Xmalloc( ext_str_len + 1 ); - if ( ext_str != NULL ) { - point = ext_str; - - for ( i = 0 ; ext[i].name != NULL ; i++ ) { - if ( EXT_ENABLED( ext[i].bit, supported ) ) { - (void) memcpy( point, ext[i].name, ext[i].name_len ); - point += ext[i].name_len; - - *point = ' '; - point++; - } - } - - *point = '\0'; - } - - return ext_str; -} - - -/** - * Get the string of client library supported extensions. - */ -const char * -__glXGetClientExtensions( void ) -{ - if ( __glXGLXClientExtensions == NULL ) { - __glXExtensionsCtr(); - __glXGLXClientExtensions = __glXGetStringFromTable( known_glx_extensions, - client_glx_support ); - } - - return __glXGLXClientExtensions; -} - - -/** - * Calculate the list of application usable extensions. The resulting - * string is stored in \c psc->effectiveGLXexts. - * - * \param psc Pointer to GLX per-screen record. - * \param display_is_direct_capable True if the display is capable of - * direct rendering. - * \param minor_version GLX minor version from the server. - */ - -void -__glXCalculateUsableExtensions( __GLXscreenConfigs *psc, - GLboolean display_is_direct_capable, - int minor_version ) -{ - unsigned char server_support[8]; - unsigned char usable[8]; - unsigned i; - - __glXExtensionsCtr(); - __glXExtensionsCtrScreen( psc ); - __glXProcessServerString( known_glx_extensions, - psc->serverGLXexts, server_support ); - - - /* This is a hack. Some servers support GLX 1.3 but don't export - * all of the extensions implied by GLX 1.3. If the server claims - * support for GLX 1.3, enable support for the extensions that can be - * "emulated" as well. - */ - - if ( minor_version >= 3 ) { - SET_BIT( server_support, EXT_visual_info_bit ); - SET_BIT( server_support, EXT_visual_rating_bit ); - SET_BIT( server_support, SGI_make_current_read_bit ); - SET_BIT( server_support, SGIX_fbconfig_bit ); - SET_BIT( server_support, SGIX_pbuffer_bit ); - - /* This one is a little iffy. GLX 1.3 doesn't incorporate all of this - * extension. However, the only part that is not strictly client-side - * is shared. That's the glXQueryContext / glXQueryContextInfoEXT - * function. - */ - - SET_BIT( server_support, EXT_import_context_bit ); - } - - - /* An extension is supported if the client-side (i.e., libGL) supports - * it and the "server" supports it. In this case that means that either - * the true server supports it or it is only for direct-rendering and - * the direct rendering driver supports it. - * - * If the display is not capable of direct rendering, then the extension - * is enabled if and only if the client-side library and the server - * support it. - */ - - if ( display_is_direct_capable ) { - for ( i = 0 ; i < 8 ; i++ ) { - usable[i] = (client_glx_support[i] & client_glx_only[i]) - | (client_glx_support[i] & psc->direct_support[i] & server_support[i]) - | (client_glx_support[i] & psc->direct_support[i] & direct_glx_only[i]); - } - } - else { - for ( i = 0 ; i < 8 ; i++ ) { - usable[i] = (client_glx_support[i] & client_glx_only[i]) - | (client_glx_support[i] & server_support[i]); - } - } - - psc->effectiveGLXexts = __glXGetStringFromTable( known_glx_extensions, - usable ); -} - - -/** - * Calculate the list of application usable extensions. The resulting - * string is stored in \c gc->extensions. - * - * \param gc Pointer to GLX context. - * \param server_string Extension string from the server. - * \param major_version GL major version from the server. - * \param minor_version GL minor version from the server. - */ - -void -__glXCalculateUsableGLExtensions( __GLXcontext * gc, - const char * server_string, - int major_version, int minor_version ) -{ - unsigned char server_support[ __GL_EXT_BYTES ]; - unsigned char usable[ __GL_EXT_BYTES ]; - unsigned i; - - - __glXExtensionsCtr(); - - (void) memset( server_support, 0, sizeof( server_support ) ); - __glXProcessServerString( known_gl_extensions, server_string, - server_support ); - - - /* Handle lazy servers that don't export all the extensions strings that - * are part of the GL core version that they support. - */ - - for ( i = 0 ; i < __GL_EXT_BYTES ; i++ ) { - if ( (known_gl_extensions[i].version_major != 0) - && ((major_version > known_gl_extensions[i].version_major) - || ((major_version == known_gl_extensions[i].version_major) - && (minor_version >= known_gl_extensions[i].version_minor))) ) { - SET_BIT( server_support, known_gl_extensions[i].bit ); - } - } - - - /* An extension is supported if the client-side (i.e., libGL) supports - * it and the server supports it or the client-side library supports it - * and it only needs client-side support. - */ - - for ( i = 0 ; i < __GL_EXT_BYTES ; i++ ) { - usable[i] = (client_gl_support[i] & client_gl_only[i]) - | (client_gl_support[i] & server_support[i]); - } - - gc->extensions = (unsigned char *) - __glXGetStringFromTable( known_gl_extensions, usable ); - (void) memcpy( gc->gl_extension_bits, usable, sizeof( usable ) ); -} - - -/** - * Calculates the maximum core GL version that can be supported for indirect - * rendering. - */ -void -__glXGetGLVersion( int * major_version, int * minor_version ) -{ - __glXExtensionsCtr(); - *major_version = gl_major; - *minor_version = gl_minor; -} - - -/** - * Get a string representing the set of extensions supported by the client - * library. This is currently only used to send the list of extensions - * supported by the client to the server. - */ -char * -__glXGetClientGLExtensionString( void ) -{ - __glXExtensionsCtr(); - return __glXGetStringFromTable( known_gl_extensions, client_gl_support ); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glxextensions.h b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glxextensions.h deleted file mode 100644 index b4b03729ce..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/glxextensions.h +++ /dev/null @@ -1,279 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2002, 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file glxextensions.h - * - * \author Ian Romanick - */ - -#ifndef GLX_GLXEXTENSIONS_H -#define GLX_GLXEXTENSIONS_H - -enum { - ARB_get_proc_address_bit = 0, - ARB_multisample_bit, - ARB_render_texture_bit, - ATI_pixel_format_float_bit, - EXT_visual_info_bit, - EXT_visual_rating_bit, - EXT_import_context_bit, - MESA_agp_offset_bit, - MESA_allocate_memory_bit, /* Replaces MESA_agp_offset & NV_vertex_array_range */ - MESA_copy_sub_buffer_bit, - MESA_depth_float_bit, - MESA_pixmap_colormap_bit, - MESA_release_buffers_bit, - MESA_set_3dfx_mode_bit, - MESA_swap_control_bit, - MESA_swap_frame_usage_bit, - NV_float_buffer_bit, - NV_render_depth_texture_bit, - NV_render_texture_rectangle_bit, - NV_vertex_array_range_bit, - OML_swap_method_bit, - OML_sync_control_bit, - SGI_cushion_bit, - SGI_make_current_read_bit, - SGI_swap_control_bit, - SGI_video_sync_bit, - SGIS_blended_overlay_bit, - SGIS_color_range_bit, - SGIS_multisample_bit, - SGIX_dm_buffer_bit, - SGIX_fbconfig_bit, - SGIX_pbuffer_bit, - SGIX_swap_barrier_bit, - SGIX_swap_group_bit, - SGIX_video_resize_bit, - SGIX_video_source_bit, - SGIX_visual_select_group_bit, - SUN_get_transparent_index_bit -}; - -enum { - GL_ARB_depth_texture_bit = 0, - GL_ARB_draw_buffers_bit, - GL_ARB_fragment_program_bit, - GL_ARB_fragment_program_shadow_bit, - GL_ARB_imaging_bit, - GL_ARB_multisample_bit, - GL_ARB_multitexture_bit, - GL_ARB_occlusion_query_bit, - GL_ARB_point_parameters_bit, - GL_ARB_point_sprite_bit, - GL_ARB_shadow_bit, - GL_ARB_shadow_ambient_bit, - GL_ARB_texture_border_clamp_bit, - GL_ARB_texture_cube_map_bit, - GL_ARB_texture_compression_bit, - GL_ARB_texture_env_add_bit, - GL_ARB_texture_env_combine_bit, - GL_ARB_texture_env_crossbar_bit, - GL_ARB_texture_env_dot3_bit, - GL_ARB_texture_mirrored_repeat_bit, - GL_ARB_texture_non_power_of_two_bit, - GL_ARB_texture_rectangle_bit, - GL_ARB_transpose_matrix_bit, - GL_ARB_vertex_buffer_object_bit, - GL_ARB_vertex_program_bit, - GL_ARB_window_pos_bit, - GL_EXT_abgr_bit, - GL_EXT_bgra_bit, - GL_EXT_blend_color_bit, - GL_EXT_blend_equation_separate_bit, - GL_EXT_blend_func_separate_bit, - GL_EXT_blend_logic_op_bit, - GL_EXT_blend_minmax_bit, - GL_EXT_blend_subtract_bit, - GL_EXT_clip_volume_hint_bit, - GL_EXT_compiled_vertex_array_bit, - GL_EXT_convolution_bit, - GL_EXT_copy_texture_bit, - GL_EXT_cull_vertex_bit, - GL_EXT_depth_bounds_test_bit, - GL_EXT_draw_range_elements_bit, - GL_EXT_fog_coord_bit, - GL_EXT_multi_draw_arrays_bit, - GL_EXT_packed_pixels_bit, - GL_EXT_paletted_texture_bit, - GL_EXT_pixel_buffer_object_bit, - GL_EXT_polygon_offset_bit, - GL_EXT_rescale_normal_bit, - GL_EXT_secondary_color_bit, - GL_EXT_separate_specular_color_bit, - GL_EXT_shadow_funcs_bit, - GL_EXT_shared_texture_palette_bit, - GL_EXT_stencil_two_side_bit, - GL_EXT_stencil_wrap_bit, - GL_EXT_subtexture_bit, - GL_EXT_texture_bit, - GL_EXT_texture3D_bit, - GL_EXT_texture_compression_dxt1_bit, - GL_EXT_texture_compression_s3tc_bit, - GL_EXT_texture_edge_clamp_bit, - GL_EXT_texture_env_combine_bit, - GL_EXT_texture_env_dot3_bit, - GL_EXT_texture_filter_anisotropic_bit, - GL_EXT_texture_lod_bit, - GL_EXT_texture_lod_bias_bit, - GL_EXT_texture_mirror_clamp_bit, - GL_EXT_texture_object_bit, - GL_EXT_vertex_array_bit, - GL_3DFX_texture_compression_FXT1_bit, - GL_APPLE_packed_pixels_bit, - GL_APPLE_ycbcr_422_bit, - GL_ATI_text_fragment_shader_bit, - GL_ATI_texture_env_combine3_bit, - GL_ATI_texture_float_bit, - GL_ATI_texture_mirror_once_bit, - GL_HP_convolution_border_modes_bit, - GL_HP_occlusion_test_bit, - GL_IBM_cull_vertex_bit, - GL_IBM_pixel_filter_hint_bit, - GL_IBM_rasterpos_clip_bit, - GL_IBM_texture_clamp_nodraw_bit, - GL_INGR_interlace_read_bit, - GL_MESA_pack_invert_bit, - GL_MESA_ycbcr_texture_bit, - GL_NV_blend_square_bit, - GL_NV_copy_depth_to_color_bit, - GL_NV_depth_clamp_bit, - GL_NV_fog_distance_bit, - GL_NV_fragment_program_bit, - GL_NV_fragment_program_option_bit, - GL_NV_fragment_program2_bit, - GL_NV_light_max_exponent_bit, - GL_NV_multisample_filter_hint_bit, - GL_NV_point_sprite_bit, - GL_NV_texgen_reflection_bit, - GL_NV_texture_compression_vtc_bit, - GL_NV_texture_env_combine4_bit, - GL_NV_vertex_program_bit, - GL_NV_vertex_program1_1_bit, - GL_NV_vertex_program2_bit, - GL_NV_vertex_program2_option_bit, - GL_NV_vertex_program3_bit, - GL_OES_compressed_paletted_texture_bit, - GL_OES_read_format_bit, - GL_SGI_color_matrix_bit, - GL_SGI_texture_color_table_bit, - GL_SGIS_generate_mipmap_bit, - GL_SGIS_multisample_bit, - GL_SGIS_texture_lod_bit, - GL_SGIX_blend_alpha_minmax_bit, - GL_SGIX_clipmap_bit, - GL_SGIX_depth_texture_bit, - GL_SGIX_fog_offset_bit, - GL_SGIX_shadow_bit, - GL_SGIX_texture_coordinate_clamp_bit, - GL_SGIX_texture_lod_bias_bit, - GL_SGIX_texture_range_bit, - GL_SGIX_texture_scale_bias_bit, - GL_SGIX_vertex_preclip_bit, - GL_SGIX_vertex_preclip_hint_bit, - GL_SGIX_ycrcb_bit, - GL_SUN_convolution_border_modes_bit, - GL_SUN_slice_accum_bit, - - /* This *MUST* go here. If it gets put after the duplicate values it will - * get the value after the last duplicate. - */ - __NUM_GL_EXTS, - - - /* Alias extension bits. These extensions exist in either vendor-specific - * or EXT form and were later promoted to either EXT or ARB form. In all - * cases, the meaning is *exactly* the same. That's why - * EXT_texture_env_combine is *NOT* an alias of ARB_texture_env_combine and - * EXT_texture_env_dot3 is *NOT* an alias of ARB_texture_env_dot3. Be - * careful! When in doubt, src/mesa/main/extensions.c in the Mesa tree - * is a great reference. - */ - - GL_ATI_blend_equation_separate_bit = GL_EXT_blend_equation_separate_bit, - GL_ATI_draw_buffers_bit = GL_ARB_draw_buffers_bit, - GL_ATIX_texture_env_combine3_bit = GL_ATI_texture_env_combine3_bit, - GL_EXT_point_parameters_bit = GL_ARB_point_parameters_bit, - GL_EXT_texture_env_add_bit = GL_ARB_texture_env_add_bit, - GL_EXT_texture_rectangle_bit = GL_ARB_texture_rectangle_bit, - GL_IBM_texture_mirrored_repeat_bit = GL_ARB_texture_mirrored_repeat_bit, - GL_INGR_blend_func_separate_bit = GL_EXT_blend_func_separate_bit, - GL_MESA_window_pos_bit = GL_ARB_window_pos_bit, - GL_NV_texture_rectangle_bit = GL_ARB_texture_rectangle_bit, - GL_SGIS_texture_border_clamp_bit = GL_ARB_texture_border_clamp_bit, - GL_SGIS_texture_edge_clamp_bit = GL_EXT_texture_edge_clamp_bit, - GL_SGIX_shadow_ambient_bit = GL_ARB_shadow_ambient_bit, - GL_SUN_multi_draw_arrays_bit = GL_EXT_multi_draw_arrays_bit -}; - -#define __GL_EXT_BYTES ((__NUM_GL_EXTS + 7) / 8) - -struct __GLXscreenConfigsRec; -struct __GLXcontextRec; - -extern GLboolean __glXExtensionBitIsEnabled( struct __GLXscreenConfigsRec *psc, unsigned bit ); -extern const char * __glXGetClientExtensions( void ); -extern void __glXCalculateUsableExtensions( struct __GLXscreenConfigsRec *psc, - GLboolean display_is_direct_capable, int server_minor_version ); -extern void __glXScrEnableExtension( struct __GLXscreenConfigsRec *psc, const char * name ); -extern void __glXCalculateUsableGLExtensions( struct __GLXcontextRec * gc, - const char * server_string, int major_version, int minor_version ); -extern void __glXGetGLVersion( int * major_version, int * minor_version ); -extern char * __glXGetClientGLExtensionString( void ); - -extern GLboolean __glExtensionBitIsEnabled( const struct __GLXcontextRec * gc, - unsigned bit ); - - -/* Source-level backwards compatibility with old drivers. They won't - * find the respective functions, though. - */ -typedef void (* PFNGLXENABLEEXTENSIONPROC) ( const char * name, - GLboolean force_client ); -typedef void (* PFNGLXDISABLEEXTENSIONPROC) ( const char * name ); - -/* GLX_ALIAS should be used for functions with a non-void return type. - GLX_ALIAS_VOID is for functions with a void return type. */ -#ifdef GLX_NO_STATIC_EXTENSION_FUNCTIONS -# define GLX_ALIAS(return_type, real_func, proto_args, args, aliased_func) -# define GLX_ALIAS_VOID(real_func, proto_args, args, aliased_func) -#else -# if defined(__GNUC__) && !defined(GLX_ALIAS_UNSUPPORTED) -# define GLX_ALIAS(return_type, real_func, proto_args, args, aliased_func) \ - return_type real_func proto_args \ - __attribute__ ((alias( # aliased_func ) )); -# define GLX_ALIAS_VOID(real_func, proto_args, args, aliased_func) \ - GLX_ALIAS(void, real_func, proto_args, args, aliased_func) -# else -# define GLX_ALIAS(return_type, real_func, proto_args, args, aliased_func) \ - return_type real_func proto_args \ - { return aliased_func args ; } -# define GLX_ALIAS_VOID(real_func, proto_args, args, aliased_func) \ - void real_func proto_args \ - { aliased_func args ; } -# endif /* __GNUC__ */ -#endif /* GLX_NO_STATIC_EXTENSION_FUNCTIONS */ - -#endif /* GLX_GLXEXTENSIONS_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect.c deleted file mode 100644 index 2a4db6578a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect.c +++ /dev/null @@ -1,8472 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_send.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2004, 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - - -#include -#include "indirect.h" -#include "glxclient.h" -#include "indirect_size.h" -#include -#ifdef USE_XCB -#include -#include -#include -#endif /* USE_XCB */ - -#define __GLX_PAD(n) (((n) + 3) & ~3) - -# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) -# define FASTCALL __attribute__((fastcall)) -# else -# define FASTCALL -# endif -# if defined(__GNUC__) -# define NOINLINE __attribute__((noinline)) -# else -# define NOINLINE -# endif - -#if !defined __GNUC__ || __GNUC__ < 3 -# define __builtin_expect(x, y) x -#endif - -/* If the size and opcode values are known at compile-time, this will, on - * x86 at least, emit them with a single instruction. - */ -#define emit_header(dest, op, size) \ - do { union { short s[2]; int i; } temp; \ - temp.s[0] = (size); temp.s[1] = (op); \ - *((int *)(dest)) = temp.i; } while(0) - -NOINLINE CARD32 -__glXReadReply( Display *dpy, size_t size, void * dest, GLboolean reply_is_always_array ) -{ - xGLXSingleReply reply; - - (void) _XReply(dpy, (xReply *) & reply, 0, False); - if (size != 0) { - if ((reply.length > 0) || reply_is_always_array) { - const GLint bytes = (reply_is_always_array) - ? (4 * reply.length) : (reply.size * size); - const GLint extra = 4 - (bytes & 3); - - _XRead(dpy, dest, bytes); - if ( extra < 4 ) { - _XEatData(dpy, extra); - } - } - else { - (void) memcpy( dest, &(reply.pad3), size); - } - } - - return reply.retval; -} - -NOINLINE void -__glXReadPixelReply( Display *dpy, __GLXcontext * gc, unsigned max_dim, - GLint width, GLint height, GLint depth, GLenum format, GLenum type, - void * dest, GLboolean dimensions_in_reply ) -{ - xGLXSingleReply reply; - GLint size; - - (void) _XReply(dpy, (xReply *) & reply, 0, False); - - if ( dimensions_in_reply ) { - width = reply.pad3; - height = reply.pad4; - depth = reply.pad5; - - if ((height == 0) || (max_dim < 2)) { height = 1; } - if ((depth == 0) || (max_dim < 3)) { depth = 1; } - } - - size = reply.length * 4; - if (size != 0) { - void * buf = Xmalloc( size ); - - if ( buf == NULL ) { - _XEatData(dpy, size); - __glXSetError(gc, GL_OUT_OF_MEMORY); - } - else { - const GLint extra = 4 - (size & 3); - - _XRead(dpy, buf, size); - if ( extra < 4 ) { - _XEatData(dpy, extra); - } - - __glEmptyImage(gc, 3, width, height, depth, format, type, - buf, dest); - Xfree(buf); - } - } -} - -#define X_GLXSingle 0 - -NOINLINE FASTCALL GLubyte * -__glXSetupSingleRequest( __GLXcontext * gc, GLint sop, GLint cmdlen ) -{ - xGLXSingleReq * req; - Display * const dpy = gc->currentDpy; - - (void) __glXFlushRenderBuffer(gc, gc->pc); - LockDisplay(dpy); - GetReqExtra(GLXSingle, cmdlen, req); - req->reqType = gc->majorOpcode; - req->contextTag = gc->currentContextTag; - req->glxCode = sop; - return (GLubyte *)(req) + sz_xGLXSingleReq; -} - -NOINLINE FASTCALL GLubyte * -__glXSetupVendorRequest( __GLXcontext * gc, GLint code, GLint vop, GLint cmdlen ) -{ - xGLXVendorPrivateReq * req; - Display * const dpy = gc->currentDpy; - - (void) __glXFlushRenderBuffer(gc, gc->pc); - LockDisplay(dpy); - GetReqExtra(GLXVendorPrivate, cmdlen, req); - req->reqType = gc->majorOpcode; - req->glxCode = code; - req->vendorCode = vop; - req->contextTag = gc->currentContextTag; - return (GLubyte *)(req) + sz_xGLXVendorPrivateReq; -} - -const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 }; - -#define zero (__glXDefaultPixelStore+0) -#define one (__glXDefaultPixelStore+8) -#define default_pixel_store_1D (__glXDefaultPixelStore+4) -#define default_pixel_store_1D_size 20 -#define default_pixel_store_2D (__glXDefaultPixelStore+4) -#define default_pixel_store_2D_size 20 -#define default_pixel_store_3D (__glXDefaultPixelStore+0) -#define default_pixel_store_3D_size 36 -#define default_pixel_store_4D (__glXDefaultPixelStore+0) -#define default_pixel_store_4D_size 36 - -static FASTCALL NOINLINE void -generic_3_byte( GLint rop, const void * ptr ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - - emit_header(gc->pc, rop, cmdlen); - (void) memcpy((void *)(gc->pc + 4), ptr, 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -static FASTCALL NOINLINE void -generic_4_byte( GLint rop, const void * ptr ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - - emit_header(gc->pc, rop, cmdlen); - (void) memcpy((void *)(gc->pc + 4), ptr, 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -static FASTCALL NOINLINE void -generic_6_byte( GLint rop, const void * ptr ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - - emit_header(gc->pc, rop, cmdlen); - (void) memcpy((void *)(gc->pc + 4), ptr, 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -static FASTCALL NOINLINE void -generic_8_byte( GLint rop, const void * ptr ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - - emit_header(gc->pc, rop, cmdlen); - (void) memcpy((void *)(gc->pc + 4), ptr, 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -static FASTCALL NOINLINE void -generic_12_byte( GLint rop, const void * ptr ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - - emit_header(gc->pc, rop, cmdlen); - (void) memcpy((void *)(gc->pc + 4), ptr, 12); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -static FASTCALL NOINLINE void -generic_16_byte( GLint rop, const void * ptr ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - - emit_header(gc->pc, rop, cmdlen); - (void) memcpy((void *)(gc->pc + 4), ptr, 16); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -static FASTCALL NOINLINE void -generic_24_byte( GLint rop, const void * ptr ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - - emit_header(gc->pc, rop, cmdlen); - (void) memcpy((void *)(gc->pc + 4), ptr, 24); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -static FASTCALL NOINLINE void -generic_32_byte( GLint rop, const void * ptr ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 36; - - emit_header(gc->pc, rop, cmdlen); - (void) memcpy((void *)(gc->pc + 4), ptr, 32); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLsop_NewList 101 -void -__indirect_glNewList(GLuint list, GLenum mode) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxNewList(c, gc->currentContextTag, list, mode); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_NewList, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&list), 4); - (void) memcpy((void *)(pc + 4), (void *)(&mode), 4); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_EndList 102 -void -__indirect_glEndList(void) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 0; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxEndList(c, gc->currentContextTag); -#else - (void) __glXSetupSingleRequest(gc, X_GLsop_EndList, cmdlen); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLrop_CallList 1 -void -__indirect_glCallList(GLuint list) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_CallList, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&list), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_CallLists 2 -void -__indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glCallLists_size(type); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * n)); - if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) { - if (cmdlen <= gc->maxSmallRenderCommandSize) { - if ( (gc->pc + cmdlen) > gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - emit_header(gc->pc, X_GLrop_CallLists, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&type), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(lists), (compsize * n)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } - else { - const GLint op = X_GLrop_CallLists; - const GLuint cmdlenLarge = cmdlen + 4; - GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); - (void) memcpy((void *)(pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(pc + 12), (void *)(&type), 4); - __glXSendLargeCommand(gc, pc, 16, lists, (compsize * n)); - } - } -} - -#define X_GLsop_DeleteLists 103 -void -__indirect_glDeleteLists(GLuint list, GLsizei range) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxDeleteLists(c, gc->currentContextTag, list, range); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteLists, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&list), 4); - (void) memcpy((void *)(pc + 4), (void *)(&range), 4); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GenLists 104 -GLuint -__indirect_glGenLists(GLsizei range) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - GLuint retval = (GLuint) 0; - const GLuint cmdlen = 4; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGenListsRep *reply = XCBGlxGenListsReply(c, XCBGlxGenLists(c, gc->currentContextTag, range), NULL); - retval = reply->ret_val; - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenLists, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&range), 4); - retval = (GLuint) __glXReadReply(dpy, 0, NULL, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return retval; -} - -#define X_GLrop_ListBase 3 -void -__indirect_glListBase(GLuint base) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_ListBase, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&base), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Begin 4 -void -__indirect_glBegin(GLenum mode) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_Begin, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Bitmap 5 -void -__indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = (bitmap != NULL) ? __glImageSize(width, height, 1, GL_COLOR_INDEX, GL_BITMAP, 0) : 0; - const GLuint cmdlen = 48 + __GLX_PAD(compsize); - if (__builtin_expect(gc->currentDpy != NULL, 1)) { - if (cmdlen <= gc->maxSmallRenderCommandSize) { - if ( (gc->pc + cmdlen) > gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - emit_header(gc->pc, X_GLrop_Bitmap, cmdlen); - (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4); - (void) memcpy((void *)(gc->pc + 32), (void *)(&xorig), 4); - (void) memcpy((void *)(gc->pc + 36), (void *)(&yorig), 4); - (void) memcpy((void *)(gc->pc + 40), (void *)(&xmove), 4); - (void) memcpy((void *)(gc->pc + 44), (void *)(&ymove), 4); - if (compsize > 0) { - (*gc->fillImage)(gc, 2, width, height, 1, GL_COLOR_INDEX, GL_BITMAP, bitmap, gc->pc + 48, gc->pc + 4); - } - else { - (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size ); - } - gc->pc += cmdlen; - if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } - else { - const GLint op = X_GLrop_Bitmap; - const GLuint cmdlenLarge = cmdlen + 4; - GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); - (void) memcpy((void *)(pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(pc + 28), (void *)(&width), 4); - (void) memcpy((void *)(pc + 32), (void *)(&height), 4); - (void) memcpy((void *)(pc + 36), (void *)(&xorig), 4); - (void) memcpy((void *)(pc + 40), (void *)(&yorig), 4); - (void) memcpy((void *)(pc + 44), (void *)(&xmove), 4); - (void) memcpy((void *)(pc + 48), (void *)(&ymove), 4); - __glXSendLargeImage(gc, compsize, 2, width, height, 1, GL_COLOR_INDEX, GL_BITMAP, bitmap, pc + 52, pc + 8); - } - } -} - -#define X_GLrop_Color3bv 6 -void -__indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_Color3bv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1); - (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1); - (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color3bv 6 -void -__indirect_glColor3bv(const GLbyte * v) -{ - generic_3_byte( X_GLrop_Color3bv, v ); -} - -#define X_GLrop_Color3dv 7 -void -__indirect_glColor3d(GLdouble red, GLdouble green, GLdouble blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_Color3dv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color3dv 7 -void -__indirect_glColor3dv(const GLdouble * v) -{ - generic_24_byte( X_GLrop_Color3dv, v ); -} - -#define X_GLrop_Color3fv 8 -void -__indirect_glColor3f(GLfloat red, GLfloat green, GLfloat blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_Color3fv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color3fv 8 -void -__indirect_glColor3fv(const GLfloat * v) -{ - generic_12_byte( X_GLrop_Color3fv, v ); -} - -#define X_GLrop_Color3iv 9 -void -__indirect_glColor3i(GLint red, GLint green, GLint blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_Color3iv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color3iv 9 -void -__indirect_glColor3iv(const GLint * v) -{ - generic_12_byte( X_GLrop_Color3iv, v ); -} - -#define X_GLrop_Color3sv 10 -void -__indirect_glColor3s(GLshort red, GLshort green, GLshort blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Color3sv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2); - (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color3sv 10 -void -__indirect_glColor3sv(const GLshort * v) -{ - generic_6_byte( X_GLrop_Color3sv, v ); -} - -#define X_GLrop_Color3ubv 11 -void -__indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_Color3ubv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1); - (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1); - (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color3ubv 11 -void -__indirect_glColor3ubv(const GLubyte * v) -{ - generic_3_byte( X_GLrop_Color3ubv, v ); -} - -#define X_GLrop_Color3uiv 12 -void -__indirect_glColor3ui(GLuint red, GLuint green, GLuint blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_Color3uiv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color3uiv 12 -void -__indirect_glColor3uiv(const GLuint * v) -{ - generic_12_byte( X_GLrop_Color3uiv, v ); -} - -#define X_GLrop_Color3usv 13 -void -__indirect_glColor3us(GLushort red, GLushort green, GLushort blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Color3usv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2); - (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color3usv 13 -void -__indirect_glColor3usv(const GLushort * v) -{ - generic_6_byte( X_GLrop_Color3usv, v ); -} - -#define X_GLrop_Color4bv 14 -void -__indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_Color4bv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1); - (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1); - (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1); - (void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color4bv 14 -void -__indirect_glColor4bv(const GLbyte * v) -{ - generic_4_byte( X_GLrop_Color4bv, v ); -} - -#define X_GLrop_Color4dv 15 -void -__indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 36; - emit_header(gc->pc, X_GLrop_Color4dv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&alpha), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color4dv 15 -void -__indirect_glColor4dv(const GLdouble * v) -{ - generic_32_byte( X_GLrop_Color4dv, v ); -} - -#define X_GLrop_Color4fv 16 -void -__indirect_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_Color4fv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color4fv 16 -void -__indirect_glColor4fv(const GLfloat * v) -{ - generic_16_byte( X_GLrop_Color4fv, v ); -} - -#define X_GLrop_Color4iv 17 -void -__indirect_glColor4i(GLint red, GLint green, GLint blue, GLint alpha) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_Color4iv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color4iv 17 -void -__indirect_glColor4iv(const GLint * v) -{ - generic_16_byte( X_GLrop_Color4iv, v ); -} - -#define X_GLrop_Color4sv 18 -void -__indirect_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Color4sv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2); - (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2); - (void) memcpy((void *)(gc->pc + 10), (void *)(&alpha), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color4sv 18 -void -__indirect_glColor4sv(const GLshort * v) -{ - generic_8_byte( X_GLrop_Color4sv, v ); -} - -#define X_GLrop_Color4ubv 19 -void -__indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_Color4ubv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1); - (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1); - (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1); - (void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color4ubv 19 -void -__indirect_glColor4ubv(const GLubyte * v) -{ - generic_4_byte( X_GLrop_Color4ubv, v ); -} - -#define X_GLrop_Color4uiv 20 -void -__indirect_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_Color4uiv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color4uiv 20 -void -__indirect_glColor4uiv(const GLuint * v) -{ - generic_16_byte( X_GLrop_Color4uiv, v ); -} - -#define X_GLrop_Color4usv 21 -void -__indirect_glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Color4usv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2); - (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2); - (void) memcpy((void *)(gc->pc + 10), (void *)(&alpha), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Color4usv 21 -void -__indirect_glColor4usv(const GLushort * v) -{ - generic_8_byte( X_GLrop_Color4usv, v ); -} - -#define X_GLrop_EdgeFlagv 22 -void -__indirect_glEdgeFlag(GLboolean flag) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&flag), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_EdgeFlagv 22 -void -__indirect_glEdgeFlagv(const GLboolean * flag) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(flag), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_End 23 -void -__indirect_glEnd(void) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 4; - emit_header(gc->pc, X_GLrop_End, cmdlen); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Indexdv 24 -void -__indirect_glIndexd(GLdouble c) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Indexdv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Indexdv 24 -void -__indirect_glIndexdv(const GLdouble * c) -{ - generic_8_byte( X_GLrop_Indexdv, c ); -} - -#define X_GLrop_Indexfv 25 -void -__indirect_glIndexf(GLfloat c) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_Indexfv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Indexfv 25 -void -__indirect_glIndexfv(const GLfloat * c) -{ - generic_4_byte( X_GLrop_Indexfv, c ); -} - -#define X_GLrop_Indexiv 26 -void -__indirect_glIndexi(GLint c) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_Indexiv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Indexiv 26 -void -__indirect_glIndexiv(const GLint * c) -{ - generic_4_byte( X_GLrop_Indexiv, c ); -} - -#define X_GLrop_Indexsv 27 -void -__indirect_glIndexs(GLshort c) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_Indexsv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Indexsv 27 -void -__indirect_glIndexsv(const GLshort * c) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_Indexsv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(c), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Normal3bv 28 -void -__indirect_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_Normal3bv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 1); - (void) memcpy((void *)(gc->pc + 5), (void *)(&ny), 1); - (void) memcpy((void *)(gc->pc + 6), (void *)(&nz), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Normal3bv 28 -void -__indirect_glNormal3bv(const GLbyte * v) -{ - generic_3_byte( X_GLrop_Normal3bv, v ); -} - -#define X_GLrop_Normal3dv 29 -void -__indirect_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_Normal3dv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&ny), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&nz), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Normal3dv 29 -void -__indirect_glNormal3dv(const GLdouble * v) -{ - generic_24_byte( X_GLrop_Normal3dv, v ); -} - -#define X_GLrop_Normal3fv 30 -void -__indirect_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_Normal3fv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&ny), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&nz), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Normal3fv 30 -void -__indirect_glNormal3fv(const GLfloat * v) -{ - generic_12_byte( X_GLrop_Normal3fv, v ); -} - -#define X_GLrop_Normal3iv 31 -void -__indirect_glNormal3i(GLint nx, GLint ny, GLint nz) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_Normal3iv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&ny), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&nz), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Normal3iv 31 -void -__indirect_glNormal3iv(const GLint * v) -{ - generic_12_byte( X_GLrop_Normal3iv, v ); -} - -#define X_GLrop_Normal3sv 32 -void -__indirect_glNormal3s(GLshort nx, GLshort ny, GLshort nz) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Normal3sv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&ny), 2); - (void) memcpy((void *)(gc->pc + 8), (void *)(&nz), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Normal3sv 32 -void -__indirect_glNormal3sv(const GLshort * v) -{ - generic_6_byte( X_GLrop_Normal3sv, v ); -} - -#define X_GLrop_RasterPos2dv 33 -void -__indirect_glRasterPos2d(GLdouble x, GLdouble y) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_RasterPos2dv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_RasterPos2dv 33 -void -__indirect_glRasterPos2dv(const GLdouble * v) -{ - generic_16_byte( X_GLrop_RasterPos2dv, v ); -} - -#define X_GLrop_RasterPos2fv 34 -void -__indirect_glRasterPos2f(GLfloat x, GLfloat y) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_RasterPos2fv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_RasterPos2fv 34 -void -__indirect_glRasterPos2fv(const GLfloat * v) -{ - generic_8_byte( X_GLrop_RasterPos2fv, v ); -} - -#define X_GLrop_RasterPos2iv 35 -void -__indirect_glRasterPos2i(GLint x, GLint y) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_RasterPos2iv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_RasterPos2iv 35 -void -__indirect_glRasterPos2iv(const GLint * v) -{ - generic_8_byte( X_GLrop_RasterPos2iv, v ); -} - -#define X_GLrop_RasterPos2sv 36 -void -__indirect_glRasterPos2s(GLshort x, GLshort y) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_RasterPos2sv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_RasterPos2sv 36 -void -__indirect_glRasterPos2sv(const GLshort * v) -{ - generic_4_byte( X_GLrop_RasterPos2sv, v ); -} - -#define X_GLrop_RasterPos3dv 37 -void -__indirect_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_RasterPos3dv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_RasterPos3dv 37 -void -__indirect_glRasterPos3dv(const GLdouble * v) -{ - generic_24_byte( X_GLrop_RasterPos3dv, v ); -} - -#define X_GLrop_RasterPos3fv 38 -void -__indirect_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_RasterPos3fv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_RasterPos3fv 38 -void -__indirect_glRasterPos3fv(const GLfloat * v) -{ - generic_12_byte( X_GLrop_RasterPos3fv, v ); -} - -#define X_GLrop_RasterPos3iv 39 -void -__indirect_glRasterPos3i(GLint x, GLint y, GLint z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_RasterPos3iv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_RasterPos3iv 39 -void -__indirect_glRasterPos3iv(const GLint * v) -{ - generic_12_byte( X_GLrop_RasterPos3iv, v ); -} - -#define X_GLrop_RasterPos3sv 40 -void -__indirect_glRasterPos3s(GLshort x, GLshort y, GLshort z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_RasterPos3sv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2); - (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_RasterPos3sv 40 -void -__indirect_glRasterPos3sv(const GLshort * v) -{ - generic_6_byte( X_GLrop_RasterPos3sv, v ); -} - -#define X_GLrop_RasterPos4dv 41 -void -__indirect_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 36; - emit_header(gc->pc, X_GLrop_RasterPos4dv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_RasterPos4dv 41 -void -__indirect_glRasterPos4dv(const GLdouble * v) -{ - generic_32_byte( X_GLrop_RasterPos4dv, v ); -} - -#define X_GLrop_RasterPos4fv 42 -void -__indirect_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_RasterPos4fv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_RasterPos4fv 42 -void -__indirect_glRasterPos4fv(const GLfloat * v) -{ - generic_16_byte( X_GLrop_RasterPos4fv, v ); -} - -#define X_GLrop_RasterPos4iv 43 -void -__indirect_glRasterPos4i(GLint x, GLint y, GLint z, GLint w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_RasterPos4iv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_RasterPos4iv 43 -void -__indirect_glRasterPos4iv(const GLint * v) -{ - generic_16_byte( X_GLrop_RasterPos4iv, v ); -} - -#define X_GLrop_RasterPos4sv 44 -void -__indirect_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_RasterPos4sv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2); - (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2); - (void) memcpy((void *)(gc->pc + 10), (void *)(&w), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_RasterPos4sv 44 -void -__indirect_glRasterPos4sv(const GLshort * v) -{ - generic_8_byte( X_GLrop_RasterPos4sv, v ); -} - -#define X_GLrop_Rectdv 45 -void -__indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 36; - emit_header(gc->pc, X_GLrop_Rectdv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y1), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&x2), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&y2), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Rectdv 45 -void -__indirect_glRectdv(const GLdouble * v1, const GLdouble * v2) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 36; - emit_header(gc->pc, X_GLrop_Rectdv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 16); - (void) memcpy((void *)(gc->pc + 20), (void *)(v2), 16); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Rectfv 46 -void -__indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_Rectfv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y1), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&x2), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&y2), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Rectfv 46 -void -__indirect_glRectfv(const GLfloat * v1, const GLfloat * v2) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_Rectfv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(v2), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Rectiv 47 -void -__indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_Rectiv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y1), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&x2), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&y2), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Rectiv 47 -void -__indirect_glRectiv(const GLint * v1, const GLint * v2) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_Rectiv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(v2), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Rectsv 48 -void -__indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Rectsv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&y1), 2); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x2), 2); - (void) memcpy((void *)(gc->pc + 10), (void *)(&y2), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Rectsv 48 -void -__indirect_glRectsv(const GLshort * v1, const GLshort * v2) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Rectsv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v2), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord1dv 49 -void -__indirect_glTexCoord1d(GLdouble s) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_TexCoord1dv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord1dv 49 -void -__indirect_glTexCoord1dv(const GLdouble * v) -{ - generic_8_byte( X_GLrop_TexCoord1dv, v ); -} - -#define X_GLrop_TexCoord1fv 50 -void -__indirect_glTexCoord1f(GLfloat s) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_TexCoord1fv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord1fv 50 -void -__indirect_glTexCoord1fv(const GLfloat * v) -{ - generic_4_byte( X_GLrop_TexCoord1fv, v ); -} - -#define X_GLrop_TexCoord1iv 51 -void -__indirect_glTexCoord1i(GLint s) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_TexCoord1iv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord1iv 51 -void -__indirect_glTexCoord1iv(const GLint * v) -{ - generic_4_byte( X_GLrop_TexCoord1iv, v ); -} - -#define X_GLrop_TexCoord1sv 52 -void -__indirect_glTexCoord1s(GLshort s) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord1sv 52 -void -__indirect_glTexCoord1sv(const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord2dv 53 -void -__indirect_glTexCoord2d(GLdouble s, GLdouble t) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_TexCoord2dv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord2dv 53 -void -__indirect_glTexCoord2dv(const GLdouble * v) -{ - generic_16_byte( X_GLrop_TexCoord2dv, v ); -} - -#define X_GLrop_TexCoord2fv 54 -void -__indirect_glTexCoord2f(GLfloat s, GLfloat t) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_TexCoord2fv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord2fv 54 -void -__indirect_glTexCoord2fv(const GLfloat * v) -{ - generic_8_byte( X_GLrop_TexCoord2fv, v ); -} - -#define X_GLrop_TexCoord2iv 55 -void -__indirect_glTexCoord2i(GLint s, GLint t) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_TexCoord2iv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord2iv 55 -void -__indirect_glTexCoord2iv(const GLint * v) -{ - generic_8_byte( X_GLrop_TexCoord2iv, v ); -} - -#define X_GLrop_TexCoord2sv 56 -void -__indirect_glTexCoord2s(GLshort s, GLshort t) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_TexCoord2sv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord2sv 56 -void -__indirect_glTexCoord2sv(const GLshort * v) -{ - generic_4_byte( X_GLrop_TexCoord2sv, v ); -} - -#define X_GLrop_TexCoord3dv 57 -void -__indirect_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_TexCoord3dv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord3dv 57 -void -__indirect_glTexCoord3dv(const GLdouble * v) -{ - generic_24_byte( X_GLrop_TexCoord3dv, v ); -} - -#define X_GLrop_TexCoord3fv 58 -void -__indirect_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_TexCoord3fv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord3fv 58 -void -__indirect_glTexCoord3fv(const GLfloat * v) -{ - generic_12_byte( X_GLrop_TexCoord3fv, v ); -} - -#define X_GLrop_TexCoord3iv 59 -void -__indirect_glTexCoord3i(GLint s, GLint t, GLint r) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_TexCoord3iv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord3iv 59 -void -__indirect_glTexCoord3iv(const GLint * v) -{ - generic_12_byte( X_GLrop_TexCoord3iv, v ); -} - -#define X_GLrop_TexCoord3sv 60 -void -__indirect_glTexCoord3s(GLshort s, GLshort t, GLshort r) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_TexCoord3sv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2); - (void) memcpy((void *)(gc->pc + 8), (void *)(&r), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord3sv 60 -void -__indirect_glTexCoord3sv(const GLshort * v) -{ - generic_6_byte( X_GLrop_TexCoord3sv, v ); -} - -#define X_GLrop_TexCoord4dv 61 -void -__indirect_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 36; - emit_header(gc->pc, X_GLrop_TexCoord4dv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&q), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord4dv 61 -void -__indirect_glTexCoord4dv(const GLdouble * v) -{ - generic_32_byte( X_GLrop_TexCoord4dv, v ); -} - -#define X_GLrop_TexCoord4fv 62 -void -__indirect_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_TexCoord4fv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&q), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord4fv 62 -void -__indirect_glTexCoord4fv(const GLfloat * v) -{ - generic_16_byte( X_GLrop_TexCoord4fv, v ); -} - -#define X_GLrop_TexCoord4iv 63 -void -__indirect_glTexCoord4i(GLint s, GLint t, GLint r, GLint q) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_TexCoord4iv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&q), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord4iv 63 -void -__indirect_glTexCoord4iv(const GLint * v) -{ - generic_16_byte( X_GLrop_TexCoord4iv, v ); -} - -#define X_GLrop_TexCoord4sv 64 -void -__indirect_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_TexCoord4sv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2); - (void) memcpy((void *)(gc->pc + 8), (void *)(&r), 2); - (void) memcpy((void *)(gc->pc + 10), (void *)(&q), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexCoord4sv 64 -void -__indirect_glTexCoord4sv(const GLshort * v) -{ - generic_8_byte( X_GLrop_TexCoord4sv, v ); -} - -#define X_GLrop_Vertex2dv 65 -void -__indirect_glVertex2d(GLdouble x, GLdouble y) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_Vertex2dv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Vertex2dv 65 -void -__indirect_glVertex2dv(const GLdouble * v) -{ - generic_16_byte( X_GLrop_Vertex2dv, v ); -} - -#define X_GLrop_Vertex2fv 66 -void -__indirect_glVertex2f(GLfloat x, GLfloat y) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Vertex2fv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Vertex2fv 66 -void -__indirect_glVertex2fv(const GLfloat * v) -{ - generic_8_byte( X_GLrop_Vertex2fv, v ); -} - -#define X_GLrop_Vertex2iv 67 -void -__indirect_glVertex2i(GLint x, GLint y) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Vertex2iv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Vertex2iv 67 -void -__indirect_glVertex2iv(const GLint * v) -{ - generic_8_byte( X_GLrop_Vertex2iv, v ); -} - -#define X_GLrop_Vertex2sv 68 -void -__indirect_glVertex2s(GLshort x, GLshort y) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_Vertex2sv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Vertex2sv 68 -void -__indirect_glVertex2sv(const GLshort * v) -{ - generic_4_byte( X_GLrop_Vertex2sv, v ); -} - -#define X_GLrop_Vertex3dv 69 -void -__indirect_glVertex3d(GLdouble x, GLdouble y, GLdouble z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_Vertex3dv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Vertex3dv 69 -void -__indirect_glVertex3dv(const GLdouble * v) -{ - generic_24_byte( X_GLrop_Vertex3dv, v ); -} - -#define X_GLrop_Vertex3fv 70 -void -__indirect_glVertex3f(GLfloat x, GLfloat y, GLfloat z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_Vertex3fv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Vertex3fv 70 -void -__indirect_glVertex3fv(const GLfloat * v) -{ - generic_12_byte( X_GLrop_Vertex3fv, v ); -} - -#define X_GLrop_Vertex3iv 71 -void -__indirect_glVertex3i(GLint x, GLint y, GLint z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_Vertex3iv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Vertex3iv 71 -void -__indirect_glVertex3iv(const GLint * v) -{ - generic_12_byte( X_GLrop_Vertex3iv, v ); -} - -#define X_GLrop_Vertex3sv 72 -void -__indirect_glVertex3s(GLshort x, GLshort y, GLshort z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Vertex3sv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2); - (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Vertex3sv 72 -void -__indirect_glVertex3sv(const GLshort * v) -{ - generic_6_byte( X_GLrop_Vertex3sv, v ); -} - -#define X_GLrop_Vertex4dv 73 -void -__indirect_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 36; - emit_header(gc->pc, X_GLrop_Vertex4dv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Vertex4dv 73 -void -__indirect_glVertex4dv(const GLdouble * v) -{ - generic_32_byte( X_GLrop_Vertex4dv, v ); -} - -#define X_GLrop_Vertex4fv 74 -void -__indirect_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_Vertex4fv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Vertex4fv 74 -void -__indirect_glVertex4fv(const GLfloat * v) -{ - generic_16_byte( X_GLrop_Vertex4fv, v ); -} - -#define X_GLrop_Vertex4iv 75 -void -__indirect_glVertex4i(GLint x, GLint y, GLint z, GLint w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_Vertex4iv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Vertex4iv 75 -void -__indirect_glVertex4iv(const GLint * v) -{ - generic_16_byte( X_GLrop_Vertex4iv, v ); -} - -#define X_GLrop_Vertex4sv 76 -void -__indirect_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Vertex4sv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2); - (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2); - (void) memcpy((void *)(gc->pc + 10), (void *)(&w), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Vertex4sv 76 -void -__indirect_glVertex4sv(const GLshort * v) -{ - generic_8_byte( X_GLrop_Vertex4sv, v ); -} - -#define X_GLrop_ClipPlane 77 -void -__indirect_glClipPlane(GLenum plane, const GLdouble * equation) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 40; - emit_header(gc->pc, X_GLrop_ClipPlane, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(equation), 32); - (void) memcpy((void *)(gc->pc + 36), (void *)(&plane), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ColorMaterial 78 -void -__indirect_glColorMaterial(GLenum face, GLenum mode) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_ColorMaterial, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_CullFace 79 -void -__indirect_glCullFace(GLenum mode) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_CullFace, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Fogf 80 -void -__indirect_glFogf(GLenum pname, GLfloat param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Fogf, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Fogfv 81 -void -__indirect_glFogfv(GLenum pname, const GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glFogfv_size(pname); - const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_Fogfv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Fogi 82 -void -__indirect_glFogi(GLenum pname, GLint param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Fogi, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Fogiv 83 -void -__indirect_glFogiv(GLenum pname, const GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glFogiv_size(pname); - const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_Fogiv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_FrontFace 84 -void -__indirect_glFrontFace(GLenum mode) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_FrontFace, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Hint 85 -void -__indirect_glHint(GLenum target, GLenum mode) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Hint, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Lightf 86 -void -__indirect_glLightf(GLenum light, GLenum pname, GLfloat param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_Lightf, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Lightfv 87 -void -__indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glLightfv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_Lightfv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Lighti 88 -void -__indirect_glLighti(GLenum light, GLenum pname, GLint param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_Lighti, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Lightiv 89 -void -__indirect_glLightiv(GLenum light, GLenum pname, const GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glLightiv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_Lightiv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_LightModelf 90 -void -__indirect_glLightModelf(GLenum pname, GLfloat param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_LightModelf, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_LightModelfv 91 -void -__indirect_glLightModelfv(GLenum pname, const GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glLightModelfv_size(pname); - const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_LightModelfv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_LightModeli 92 -void -__indirect_glLightModeli(GLenum pname, GLint param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_LightModeli, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_LightModeliv 93 -void -__indirect_glLightModeliv(GLenum pname, const GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glLightModeliv_size(pname); - const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_LightModeliv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_LineStipple 94 -void -__indirect_glLineStipple(GLint factor, GLushort pattern) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_LineStipple, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&factor), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pattern), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_LineWidth 95 -void -__indirect_glLineWidth(GLfloat width) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_LineWidth, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&width), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Materialf 96 -void -__indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_Materialf, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Materialfv 97 -void -__indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glMaterialfv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_Materialfv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Materiali 98 -void -__indirect_glMateriali(GLenum face, GLenum pname, GLint param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_Materiali, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Materialiv 99 -void -__indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glMaterialiv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_Materialiv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PointSize 100 -void -__indirect_glPointSize(GLfloat size) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_PointSize, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&size), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PolygonMode 101 -void -__indirect_glPolygonMode(GLenum face, GLenum mode) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_PolygonMode, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PolygonStipple 102 -void -__indirect_glPolygonStipple(const GLubyte * mask) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = (mask != NULL) ? __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, 0) : 0; - const GLuint cmdlen = 24 + __GLX_PAD(compsize); - emit_header(gc->pc, X_GLrop_PolygonStipple, cmdlen); - if (compsize > 0) { - (*gc->fillImage)(gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask, gc->pc + 24, gc->pc + 4); - } - else { - (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size ); - } - gc->pc += cmdlen; - if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Scissor 103 -void -__indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_Scissor, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ShadeModel 104 -void -__indirect_glShadeModel(GLenum mode) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_ShadeModel, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexParameterf 105 -void -__indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_TexParameterf, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexParameterfv 106 -void -__indirect_glTexParameterfv(GLenum target, GLenum pname, const GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glTexParameterfv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_TexParameterfv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexParameteri 107 -void -__indirect_glTexParameteri(GLenum target, GLenum pname, GLint param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_TexParameteri, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexParameteriv 108 -void -__indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glTexParameteriv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_TexParameteriv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -static void -__glx_TexImage_1D2D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glImageSize(width, height, 1, format, type, target); - const GLuint cmdlen = 56 + __GLX_PAD(compsize); - if (__builtin_expect(gc->currentDpy != NULL, 1)) { - if (cmdlen <= gc->maxSmallRenderCommandSize) { - if ( (gc->pc + cmdlen) > gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - emit_header(gc->pc, opcode, cmdlen); - (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 28), (void *)(&level), 4); - (void) memcpy((void *)(gc->pc + 32), (void *)(&internalformat), 4); - (void) memcpy((void *)(gc->pc + 36), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 40), (void *)(&height), 4); - (void) memcpy((void *)(gc->pc + 44), (void *)(&border), 4); - (void) memcpy((void *)(gc->pc + 48), (void *)(&format), 4); - (void) memcpy((void *)(gc->pc + 52), (void *)(&type), 4); - if ((compsize > 0) && (pixels != NULL)) { - (*gc->fillImage)(gc, dim, width, height, 1, format, type, pixels, gc->pc + 56, gc->pc + 4); - } - else { - (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size ); - } - gc->pc += cmdlen; - if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } - else { - const GLint op = opcode; - const GLuint cmdlenLarge = cmdlen + 4; - GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); - (void) memcpy((void *)(pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(pc + 28), (void *)(&target), 4); - (void) memcpy((void *)(pc + 32), (void *)(&level), 4); - (void) memcpy((void *)(pc + 36), (void *)(&internalformat), 4); - (void) memcpy((void *)(pc + 40), (void *)(&width), 4); - (void) memcpy((void *)(pc + 44), (void *)(&height), 4); - (void) memcpy((void *)(pc + 48), (void *)(&border), 4); - (void) memcpy((void *)(pc + 52), (void *)(&format), 4); - (void) memcpy((void *)(pc + 56), (void *)(&type), 4); - __glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, pixels, pc + 60, pc + 8); - } - } -} - -#define X_GLrop_TexImage1D 109 -void -__indirect_glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels) -{ - __glx_TexImage_1D2D(X_GLrop_TexImage1D, 1, target, level, internalformat, width, 1, border, format, type, pixels ); -} - -#define X_GLrop_TexImage2D 110 -void -__indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels) -{ - __glx_TexImage_1D2D(X_GLrop_TexImage2D, 2, target, level, internalformat, width, height, border, format, type, pixels ); -} - -#define X_GLrop_TexEnvf 111 -void -__indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_TexEnvf, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexEnvfv 112 -void -__indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glTexEnvfv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_TexEnvfv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexEnvi 113 -void -__indirect_glTexEnvi(GLenum target, GLenum pname, GLint param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_TexEnvi, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexEnviv 114 -void -__indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glTexEnviv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_TexEnviv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexGend 115 -void -__indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_TexGend, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(¶m), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&coord), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&pname), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexGendv 116 -void -__indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glTexGendv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)); - emit_header(gc->pc, X_GLrop_TexGendv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 8)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexGenf 117 -void -__indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_TexGenf, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexGenfv 118 -void -__indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glTexGenfv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_TexGenfv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexGeni 119 -void -__indirect_glTexGeni(GLenum coord, GLenum pname, GLint param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_TexGeni, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_TexGeniv 120 -void -__indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glTexGeniv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_TexGeniv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_InitNames 121 -void -__indirect_glInitNames(void) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 4; - emit_header(gc->pc, X_GLrop_InitNames, cmdlen); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_LoadName 122 -void -__indirect_glLoadName(GLuint name) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_LoadName, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&name), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PassThrough 123 -void -__indirect_glPassThrough(GLfloat token) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_PassThrough, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&token), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PopName 124 -void -__indirect_glPopName(void) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 4; - emit_header(gc->pc, X_GLrop_PopName, cmdlen); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PushName 125 -void -__indirect_glPushName(GLuint name) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_PushName, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&name), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_DrawBuffer 126 -void -__indirect_glDrawBuffer(GLenum mode) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_DrawBuffer, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Clear 127 -void -__indirect_glClear(GLbitfield mask) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_Clear, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ClearAccum 128 -void -__indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_ClearAccum, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ClearIndex 129 -void -__indirect_glClearIndex(GLfloat c) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_ClearIndex, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ClearColor 130 -void -__indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_ClearColor, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ClearStencil 131 -void -__indirect_glClearStencil(GLint s) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_ClearStencil, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ClearDepth 132 -void -__indirect_glClearDepth(GLclampd depth) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_ClearDepth, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&depth), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_StencilMask 133 -void -__indirect_glStencilMask(GLuint mask) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_StencilMask, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ColorMask 134 -void -__indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_ColorMask, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1); - (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1); - (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1); - (void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_DepthMask 135 -void -__indirect_glDepthMask(GLboolean flag) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_DepthMask, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&flag), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_IndexMask 136 -void -__indirect_glIndexMask(GLuint mask) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_IndexMask, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Accum 137 -void -__indirect_glAccum(GLenum op, GLfloat value) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_Accum, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&value), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PopAttrib 141 -void -__indirect_glPopAttrib(void) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 4; - emit_header(gc->pc, X_GLrop_PopAttrib, cmdlen); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PushAttrib 142 -void -__indirect_glPushAttrib(GLbitfield mask) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_PushAttrib, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MapGrid1d 147 -void -__indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_MapGrid1d, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&u1), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&un), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MapGrid1f 148 -void -__indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_MapGrid1f, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&un), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&u1), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MapGrid2d 149 -void -__indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 44; - emit_header(gc->pc, X_GLrop_MapGrid2d, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&u1), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&v1), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&v2), 8); - (void) memcpy((void *)(gc->pc + 36), (void *)(&un), 4); - (void) memcpy((void *)(gc->pc + 40), (void *)(&vn), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MapGrid2f 150 -void -__indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_MapGrid2f, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&un), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&u1), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&vn), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&v1), 4); - (void) memcpy((void *)(gc->pc + 24), (void *)(&v2), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_EvalCoord1dv 151 -void -__indirect_glEvalCoord1d(GLdouble u) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_EvalCoord1dv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_EvalCoord1dv 151 -void -__indirect_glEvalCoord1dv(const GLdouble * u) -{ - generic_8_byte( X_GLrop_EvalCoord1dv, u ); -} - -#define X_GLrop_EvalCoord1fv 152 -void -__indirect_glEvalCoord1f(GLfloat u) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_EvalCoord1fv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_EvalCoord1fv 152 -void -__indirect_glEvalCoord1fv(const GLfloat * u) -{ - generic_4_byte( X_GLrop_EvalCoord1fv, u ); -} - -#define X_GLrop_EvalCoord2dv 153 -void -__indirect_glEvalCoord2d(GLdouble u, GLdouble v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_EvalCoord2dv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&v), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_EvalCoord2dv 153 -void -__indirect_glEvalCoord2dv(const GLdouble * u) -{ - generic_16_byte( X_GLrop_EvalCoord2dv, u ); -} - -#define X_GLrop_EvalCoord2fv 154 -void -__indirect_glEvalCoord2f(GLfloat u, GLfloat v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_EvalCoord2fv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&v), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_EvalCoord2fv 154 -void -__indirect_glEvalCoord2fv(const GLfloat * u) -{ - generic_8_byte( X_GLrop_EvalCoord2fv, u ); -} - -#define X_GLrop_EvalMesh1 155 -void -__indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_EvalMesh1, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&i1), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&i2), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_EvalPoint1 156 -void -__indirect_glEvalPoint1(GLint i) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_EvalPoint1, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&i), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_EvalMesh2 157 -void -__indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_EvalMesh2, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&i1), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&i2), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&j1), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&j2), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_EvalPoint2 158 -void -__indirect_glEvalPoint2(GLint i, GLint j) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_EvalPoint2, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&i), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&j), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_AlphaFunc 159 -void -__indirect_glAlphaFunc(GLenum func, GLclampf ref) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_AlphaFunc, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&ref), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_BlendFunc 160 -void -__indirect_glBlendFunc(GLenum sfactor, GLenum dfactor) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_BlendFunc, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&sfactor), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&dfactor), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_LogicOp 161 -void -__indirect_glLogicOp(GLenum opcode) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_LogicOp, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&opcode), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_StencilFunc 162 -void -__indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_StencilFunc, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&ref), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&mask), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_StencilOp 163 -void -__indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_StencilOp, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&fail), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&zfail), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&zpass), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_DepthFunc 164 -void -__indirect_glDepthFunc(GLenum func) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_DepthFunc, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PixelZoom 165 -void -__indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_PixelZoom, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&xfactor), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&yfactor), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PixelTransferf 166 -void -__indirect_glPixelTransferf(GLenum pname, GLfloat param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_PixelTransferf, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PixelTransferi 167 -void -__indirect_glPixelTransferi(GLenum pname, GLint param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_PixelTransferi, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PixelMapfv 168 -void -__indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4)); - if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) { - if (cmdlen <= gc->maxSmallRenderCommandSize) { - if ( (gc->pc + cmdlen) > gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - emit_header(gc->pc, X_GLrop_PixelMapfv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } - else { - const GLint op = X_GLrop_PixelMapfv; - const GLuint cmdlenLarge = cmdlen + 4; - GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); - (void) memcpy((void *)(pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(pc + 8), (void *)(&map), 4); - (void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4); - __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4)); - } - } -} - -#define X_GLrop_PixelMapuiv 169 -void -__indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4)); - if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) { - if (cmdlen <= gc->maxSmallRenderCommandSize) { - if ( (gc->pc + cmdlen) > gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - emit_header(gc->pc, X_GLrop_PixelMapuiv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } - else { - const GLint op = X_GLrop_PixelMapuiv; - const GLuint cmdlenLarge = cmdlen + 4; - GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); - (void) memcpy((void *)(pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(pc + 8), (void *)(&map), 4); - (void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4); - __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4)); - } - } -} - -#define X_GLrop_PixelMapusv 170 -void -__indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 2)); - if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) { - if (cmdlen <= gc->maxSmallRenderCommandSize) { - if ( (gc->pc + cmdlen) > gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - emit_header(gc->pc, X_GLrop_PixelMapusv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 2)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } - else { - const GLint op = X_GLrop_PixelMapusv; - const GLuint cmdlenLarge = cmdlen + 4; - GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); - (void) memcpy((void *)(pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(pc + 8), (void *)(&map), 4); - (void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4); - __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 2)); - } - } -} - -#define X_GLrop_ReadBuffer 171 -void -__indirect_glReadBuffer(GLenum mode) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_ReadBuffer, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_CopyPixels 172 -void -__indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_CopyPixels, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&type), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLsop_ReadPixels 111 -void -__indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const __GLXattribute * const state = gc->client_state_private; - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 28; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxReadPixelsRep *reply = XCBGlxReadPixelsReply(c, XCBGlxReadPixels(c, gc->currentContextTag, x, y, width, height, format, type, state->storePack.swapEndian, 0), NULL); - (void)memcpy(pixels, XCBGlxReadPixelsData(reply), XCBGlxReadPixelsDataLength(reply) * sizeof(GLvoid)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_ReadPixels, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&x), 4); - (void) memcpy((void *)(pc + 4), (void *)(&y), 4); - (void) memcpy((void *)(pc + 8), (void *)(&width), 4); - (void) memcpy((void *)(pc + 12), (void *)(&height), 4); - (void) memcpy((void *)(pc + 16), (void *)(&format), 4); - (void) memcpy((void *)(pc + 20), (void *)(&type), 4); - *(int32_t *)(pc + 24) = 0; - * (int8_t *)(pc + 24) = state->storePack.swapEndian; - __glXReadPixelReply(dpy, gc, 2, width, height, 1, format, type, pixels, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLrop_DrawPixels 173 -void -__indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, 1, format, type, 0) : 0; - const GLuint cmdlen = 40 + __GLX_PAD(compsize); - if (__builtin_expect(gc->currentDpy != NULL, 1)) { - if (cmdlen <= gc->maxSmallRenderCommandSize) { - if ( (gc->pc + cmdlen) > gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - emit_header(gc->pc, X_GLrop_DrawPixels, cmdlen); - (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4); - (void) memcpy((void *)(gc->pc + 32), (void *)(&format), 4); - (void) memcpy((void *)(gc->pc + 36), (void *)(&type), 4); - if (compsize > 0) { - (*gc->fillImage)(gc, 2, width, height, 1, format, type, pixels, gc->pc + 40, gc->pc + 4); - } - else { - (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size ); - } - gc->pc += cmdlen; - if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } - else { - const GLint op = X_GLrop_DrawPixels; - const GLuint cmdlenLarge = cmdlen + 4; - GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); - (void) memcpy((void *)(pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(pc + 28), (void *)(&width), 4); - (void) memcpy((void *)(pc + 32), (void *)(&height), 4); - (void) memcpy((void *)(pc + 36), (void *)(&format), 4); - (void) memcpy((void *)(pc + 40), (void *)(&type), 4); - __glXSendLargeImage(gc, compsize, 2, width, height, 1, format, type, pixels, pc + 44, pc + 8); - } - } -} - -#define X_GLsop_GetClipPlane 113 -void -__indirect_glGetClipPlane(GLenum plane, GLdouble * equation) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 4; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetClipPlaneRep *reply = XCBGlxGetClipPlaneReply(c, XCBGlxGetClipPlane(c, gc->currentContextTag, plane), NULL); - (void)memcpy(equation, XCBGlxGetClipPlaneData(reply), XCBGlxGetClipPlaneDataLength(reply) * sizeof(GLdouble)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetClipPlane, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&plane), 4); - (void) __glXReadReply(dpy, 8, equation, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetLightfv 118 -void -__indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetLightfvRep *reply = XCBGlxGetLightfvReply(c, XCBGlxGetLightfv(c, gc->currentContextTag, light, pname), NULL); - if (XCBGlxGetLightfvDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetLightfvData(reply), XCBGlxGetLightfvDataLength(reply) * sizeof(GLfloat)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetLightfv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&light), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetLightiv 119 -void -__indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetLightivRep *reply = XCBGlxGetLightivReply(c, XCBGlxGetLightiv(c, gc->currentContextTag, light, pname), NULL); - if (XCBGlxGetLightivDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetLightivData(reply), XCBGlxGetLightivDataLength(reply) * sizeof(GLint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetLightiv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&light), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetMapdv 120 -void -__indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetMapdvRep *reply = XCBGlxGetMapdvReply(c, XCBGlxGetMapdv(c, gc->currentContextTag, target, query), NULL); - if (XCBGlxGetMapdvDataLength(reply) == 0) - (void)memcpy(v, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(v, XCBGlxGetMapdvData(reply), XCBGlxGetMapdvDataLength(reply) * sizeof(GLdouble)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapdv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&query), 4); - (void) __glXReadReply(dpy, 8, v, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetMapfv 121 -void -__indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetMapfvRep *reply = XCBGlxGetMapfvReply(c, XCBGlxGetMapfv(c, gc->currentContextTag, target, query), NULL); - if (XCBGlxGetMapfvDataLength(reply) == 0) - (void)memcpy(v, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(v, XCBGlxGetMapfvData(reply), XCBGlxGetMapfvDataLength(reply) * sizeof(GLfloat)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapfv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&query), 4); - (void) __glXReadReply(dpy, 4, v, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetMapiv 122 -void -__indirect_glGetMapiv(GLenum target, GLenum query, GLint * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetMapivRep *reply = XCBGlxGetMapivReply(c, XCBGlxGetMapiv(c, gc->currentContextTag, target, query), NULL); - if (XCBGlxGetMapivDataLength(reply) == 0) - (void)memcpy(v, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(v, XCBGlxGetMapivData(reply), XCBGlxGetMapivDataLength(reply) * sizeof(GLint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapiv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&query), 4); - (void) __glXReadReply(dpy, 4, v, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetMaterialfv 123 -void -__indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetMaterialfvRep *reply = XCBGlxGetMaterialfvReply(c, XCBGlxGetMaterialfv(c, gc->currentContextTag, face, pname), NULL); - if (XCBGlxGetMaterialfvDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetMaterialfvData(reply), XCBGlxGetMaterialfvDataLength(reply) * sizeof(GLfloat)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMaterialfv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&face), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetMaterialiv 124 -void -__indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetMaterialivRep *reply = XCBGlxGetMaterialivReply(c, XCBGlxGetMaterialiv(c, gc->currentContextTag, face, pname), NULL); - if (XCBGlxGetMaterialivDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetMaterialivData(reply), XCBGlxGetMaterialivDataLength(reply) * sizeof(GLint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMaterialiv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&face), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetPixelMapfv 125 -void -__indirect_glGetPixelMapfv(GLenum map, GLfloat * values) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 4; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetPixelMapfvRep *reply = XCBGlxGetPixelMapfvReply(c, XCBGlxGetPixelMapfv(c, gc->currentContextTag, map), NULL); - if (XCBGlxGetPixelMapfvDataLength(reply) == 0) - (void)memcpy(values, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(values, XCBGlxGetPixelMapfvData(reply), XCBGlxGetPixelMapfvDataLength(reply) * sizeof(GLfloat)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapfv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&map), 4); - (void) __glXReadReply(dpy, 4, values, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetPixelMapuiv 126 -void -__indirect_glGetPixelMapuiv(GLenum map, GLuint * values) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 4; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetPixelMapuivRep *reply = XCBGlxGetPixelMapuivReply(c, XCBGlxGetPixelMapuiv(c, gc->currentContextTag, map), NULL); - if (XCBGlxGetPixelMapuivDataLength(reply) == 0) - (void)memcpy(values, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(values, XCBGlxGetPixelMapuivData(reply), XCBGlxGetPixelMapuivDataLength(reply) * sizeof(GLuint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapuiv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&map), 4); - (void) __glXReadReply(dpy, 4, values, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetPixelMapusv 127 -void -__indirect_glGetPixelMapusv(GLenum map, GLushort * values) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 4; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetPixelMapusvRep *reply = XCBGlxGetPixelMapusvReply(c, XCBGlxGetPixelMapusv(c, gc->currentContextTag, map), NULL); - if (XCBGlxGetPixelMapusvDataLength(reply) == 0) - (void)memcpy(values, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(values, XCBGlxGetPixelMapusvData(reply), XCBGlxGetPixelMapusvDataLength(reply) * sizeof(GLushort)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapusv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&map), 4); - (void) __glXReadReply(dpy, 2, values, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetPolygonStipple 128 -void -__indirect_glGetPolygonStipple(GLubyte * mask) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const __GLXattribute * const state = gc->client_state_private; - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 4; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetPolygonStippleRep *reply = XCBGlxGetPolygonStippleReply(c, XCBGlxGetPolygonStipple(c, gc->currentContextTag, 0), NULL); - (void)memcpy(mask, XCBGlxGetPolygonStippleData(reply), XCBGlxGetPolygonStippleDataLength(reply) * sizeof(GLubyte)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPolygonStipple, cmdlen); - *(int32_t *)(pc + 0) = 0; - __glXReadPixelReply(dpy, gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetTexEnvfv 130 -void -__indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetTexEnvfvRep *reply = XCBGlxGetTexEnvfvReply(c, XCBGlxGetTexEnvfv(c, gc->currentContextTag, target, pname), NULL); - if (XCBGlxGetTexEnvfvDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetTexEnvfvData(reply), XCBGlxGetTexEnvfvDataLength(reply) * sizeof(GLfloat)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexEnvfv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetTexEnviv 131 -void -__indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetTexEnvivRep *reply = XCBGlxGetTexEnvivReply(c, XCBGlxGetTexEnviv(c, gc->currentContextTag, target, pname), NULL); - if (XCBGlxGetTexEnvivDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetTexEnvivData(reply), XCBGlxGetTexEnvivDataLength(reply) * sizeof(GLint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexEnviv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetTexGendv 132 -void -__indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetTexGendvRep *reply = XCBGlxGetTexGendvReply(c, XCBGlxGetTexGendv(c, gc->currentContextTag, coord, pname), NULL); - if (XCBGlxGetTexGendvDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetTexGendvData(reply), XCBGlxGetTexGendvDataLength(reply) * sizeof(GLdouble)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGendv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&coord), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 8, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetTexGenfv 133 -void -__indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetTexGenfvRep *reply = XCBGlxGetTexGenfvReply(c, XCBGlxGetTexGenfv(c, gc->currentContextTag, coord, pname), NULL); - if (XCBGlxGetTexGenfvDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetTexGenfvData(reply), XCBGlxGetTexGenfvDataLength(reply) * sizeof(GLfloat)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGenfv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&coord), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetTexGeniv 134 -void -__indirect_glGetTexGeniv(GLenum coord, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetTexGenivRep *reply = XCBGlxGetTexGenivReply(c, XCBGlxGetTexGeniv(c, gc->currentContextTag, coord, pname), NULL); - if (XCBGlxGetTexGenivDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetTexGenivData(reply), XCBGlxGetTexGenivDataLength(reply) * sizeof(GLint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGeniv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&coord), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetTexImage 135 -void -__indirect_glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const __GLXattribute * const state = gc->client_state_private; - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 20; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetTexImageRep *reply = XCBGlxGetTexImageReply(c, XCBGlxGetTexImage(c, gc->currentContextTag, target, level, format, type, state->storePack.swapEndian), NULL); - (void)memcpy(pixels, XCBGlxGetTexImageData(reply), XCBGlxGetTexImageDataLength(reply) * sizeof(GLvoid)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexImage, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&level), 4); - (void) memcpy((void *)(pc + 8), (void *)(&format), 4); - (void) memcpy((void *)(pc + 12), (void *)(&type), 4); - *(int32_t *)(pc + 16) = 0; - * (int8_t *)(pc + 16) = state->storePack.swapEndian; - __glXReadPixelReply(dpy, gc, 3, 0, 0, 0, format, type, pixels, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetTexParameterfv 136 -void -__indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetTexParameterfvRep *reply = XCBGlxGetTexParameterfvReply(c, XCBGlxGetTexParameterfv(c, gc->currentContextTag, target, pname), NULL); - if (XCBGlxGetTexParameterfvDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetTexParameterfvData(reply), XCBGlxGetTexParameterfvDataLength(reply) * sizeof(GLfloat)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexParameterfv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetTexParameteriv 137 -void -__indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetTexParameterivRep *reply = XCBGlxGetTexParameterivReply(c, XCBGlxGetTexParameteriv(c, gc->currentContextTag, target, pname), NULL); - if (XCBGlxGetTexParameterivDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetTexParameterivData(reply), XCBGlxGetTexParameterivDataLength(reply) * sizeof(GLint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexParameteriv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetTexLevelParameterfv 138 -void -__indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 12; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetTexLevelParameterfvRep *reply = XCBGlxGetTexLevelParameterfvReply(c, XCBGlxGetTexLevelParameterfv(c, gc->currentContextTag, target, level, pname), NULL); - if (XCBGlxGetTexLevelParameterfvDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetTexLevelParameterfvData(reply), XCBGlxGetTexLevelParameterfvDataLength(reply) * sizeof(GLfloat)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameterfv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&level), 4); - (void) memcpy((void *)(pc + 8), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetTexLevelParameteriv 139 -void -__indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 12; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetTexLevelParameterivRep *reply = XCBGlxGetTexLevelParameterivReply(c, XCBGlxGetTexLevelParameteriv(c, gc->currentContextTag, target, level, pname), NULL); - if (XCBGlxGetTexLevelParameterivDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetTexLevelParameterivData(reply), XCBGlxGetTexLevelParameterivDataLength(reply) * sizeof(GLint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameteriv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&level), 4); - (void) memcpy((void *)(pc + 8), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_IsList 141 -GLboolean -__indirect_glIsList(GLuint list) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - GLboolean retval = (GLboolean) 0; - const GLuint cmdlen = 4; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxIsListRep *reply = XCBGlxIsListReply(c, XCBGlxIsList(c, gc->currentContextTag, list), NULL); - retval = reply->ret_val; - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsList, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&list), 4); - retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return retval; -} - -#define X_GLrop_DepthRange 174 -void -__indirect_glDepthRange(GLclampd zNear, GLclampd zFar) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_DepthRange, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&zNear), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&zFar), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Frustum 175 -void -__indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 52; - emit_header(gc->pc, X_GLrop_Frustum, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&left), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&right), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&bottom), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&top), 8); - (void) memcpy((void *)(gc->pc + 36), (void *)(&zNear), 8); - (void) memcpy((void *)(gc->pc + 44), (void *)(&zFar), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_LoadIdentity 176 -void -__indirect_glLoadIdentity(void) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 4; - emit_header(gc->pc, X_GLrop_LoadIdentity, cmdlen); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_LoadMatrixf 177 -void -__indirect_glLoadMatrixf(const GLfloat * m) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 68; - emit_header(gc->pc, X_GLrop_LoadMatrixf, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(m), 64); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_LoadMatrixd 178 -void -__indirect_glLoadMatrixd(const GLdouble * m) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 132; - emit_header(gc->pc, X_GLrop_LoadMatrixd, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(m), 128); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MatrixMode 179 -void -__indirect_glMatrixMode(GLenum mode) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_MatrixMode, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultMatrixf 180 -void -__indirect_glMultMatrixf(const GLfloat * m) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 68; - emit_header(gc->pc, X_GLrop_MultMatrixf, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(m), 64); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultMatrixd 181 -void -__indirect_glMultMatrixd(const GLdouble * m) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 132; - emit_header(gc->pc, X_GLrop_MultMatrixd, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(m), 128); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Ortho 182 -void -__indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 52; - emit_header(gc->pc, X_GLrop_Ortho, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&left), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&right), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&bottom), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&top), 8); - (void) memcpy((void *)(gc->pc + 36), (void *)(&zNear), 8); - (void) memcpy((void *)(gc->pc + 44), (void *)(&zFar), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PopMatrix 183 -void -__indirect_glPopMatrix(void) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 4; - emit_header(gc->pc, X_GLrop_PopMatrix, cmdlen); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PushMatrix 184 -void -__indirect_glPushMatrix(void) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 4; - emit_header(gc->pc, X_GLrop_PushMatrix, cmdlen); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Rotated 185 -void -__indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 36; - emit_header(gc->pc, X_GLrop_Rotated, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&angle), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Rotatef 186 -void -__indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_Rotatef, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&angle), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Scaled 187 -void -__indirect_glScaled(GLdouble x, GLdouble y, GLdouble z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_Scaled, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Scalef 188 -void -__indirect_glScalef(GLfloat x, GLfloat y, GLfloat z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_Scalef, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Translated 189 -void -__indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_Translated, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Translatef 190 -void -__indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_Translatef, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Viewport 191 -void -__indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_Viewport, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_BindTexture 4117 -void -__indirect_glBindTexture(GLenum target, GLuint texture) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_BindTexture, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&texture), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Indexubv 194 -void -__indirect_glIndexub(GLubyte c) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_Indexubv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Indexubv 194 -void -__indirect_glIndexubv(const GLubyte * c) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_Indexubv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(c), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PolygonOffset 192 -void -__indirect_glPolygonOffset(GLfloat factor, GLfloat units) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_PolygonOffset, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&factor), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&units), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLsop_AreTexturesResident 143 -GLboolean -__indirect_glAreTexturesResident(GLsizei n, const GLuint * textures, GLboolean * residences) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - GLboolean retval = (GLboolean) 0; - const GLuint cmdlen = 4 + __GLX_PAD((n * 4)); - if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxAreTexturesResidentRep *reply = XCBGlxAreTexturesResidentReply(c, XCBGlxAreTexturesResident(c, gc->currentContextTag, n, textures), NULL); - (void)memcpy(residences, XCBGlxAreTexturesResidentData(reply), XCBGlxAreTexturesResidentDataLength(reply) * sizeof(GLboolean)); - retval = reply->ret_val; - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_AreTexturesResident, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&n), 4); - (void) memcpy((void *)(pc + 4), (void *)(textures), (n * 4)); - retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return retval; -} - -#define X_GLrop_CopyTexImage1D 4119 -void -__indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 32; - emit_header(gc->pc, X_GLrop_CopyTexImage1D, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 28), (void *)(&border), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_CopyTexImage2D 4120 -void -__indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 36; - emit_header(gc->pc, X_GLrop_CopyTexImage2D, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4); - (void) memcpy((void *)(gc->pc + 32), (void *)(&border), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_CopyTexSubImage1D 4121 -void -__indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_CopyTexSubImage1D, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&xoffset), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_CopyTexSubImage2D 4122 -void -__indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 36; - emit_header(gc->pc, X_GLrop_CopyTexSubImage2D, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&xoffset), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&yoffset), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 24), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 28), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 32), (void *)(&height), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLvop_DeleteTextures 12 -void -__indirect_glDeleteTextures(GLsizei n, const GLuint * textures) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 4 + __GLX_PAD((n * 4)); - if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivate, X_GLvop_DeleteTextures, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&n), 4); - (void) memcpy((void *)(pc + 4), (void *)(textures), (n * 4)); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLsop_GenTextures 145 -void -__indirect_glGenTextures(GLsizei n, GLuint * textures) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 4; - if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGenTexturesRep *reply = XCBGlxGenTexturesReply(c, XCBGlxGenTextures(c, gc->currentContextTag, n), NULL); - (void)memcpy(textures, XCBGlxGenTexturesData(reply), XCBGlxGenTexturesDataLength(reply) * sizeof(GLuint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenTextures, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&n), 4); - (void) __glXReadReply(dpy, 4, textures, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_IsTexture 146 -GLboolean -__indirect_glIsTexture(GLuint texture) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - GLboolean retval = (GLboolean) 0; - const GLuint cmdlen = 4; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxIsTextureRep *reply = XCBGlxIsTextureReply(c, XCBGlxIsTexture(c, gc->currentContextTag, texture), NULL); - retval = reply->ret_val; - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsTexture, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&texture), 4); - retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return retval; -} - -#define X_GLrop_PrioritizeTextures 4118 -void -__indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures, const GLclampf * priorities) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8 + __GLX_PAD((n * 4)) + __GLX_PAD((n * 4)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_PrioritizeTextures, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(textures), (n * 4)); - (void) memcpy((void *)(gc->pc + 8 + (n * 4)), (void *)(priorities), (n * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -static void -__glx_TexSubImage_1D2D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, 1, format, type, target) : 0; - const GLuint cmdlen = 60 + __GLX_PAD(compsize); - if (__builtin_expect(gc->currentDpy != NULL, 1)) { - if (cmdlen <= gc->maxSmallRenderCommandSize) { - if ( (gc->pc + cmdlen) > gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - emit_header(gc->pc, opcode, cmdlen); - (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 28), (void *)(&level), 4); - (void) memcpy((void *)(gc->pc + 32), (void *)(&xoffset), 4); - (void) memcpy((void *)(gc->pc + 36), (void *)(&yoffset), 4); - (void) memcpy((void *)(gc->pc + 40), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 44), (void *)(&height), 4); - (void) memcpy((void *)(gc->pc + 48), (void *)(&format), 4); - (void) memcpy((void *)(gc->pc + 52), (void *)(&type), 4); - (void) memcpy((void *)(gc->pc + 56), (void *)((pixels == NULL) ? one : zero), 4); - if (compsize > 0) { - (*gc->fillImage)(gc, dim, width, height, 1, format, type, pixels, gc->pc + 60, gc->pc + 4); - } - else { - (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size ); - } - gc->pc += cmdlen; - if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } - else { - const GLint op = opcode; - const GLuint cmdlenLarge = cmdlen + 4; - GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); - (void) memcpy((void *)(pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(pc + 28), (void *)(&target), 4); - (void) memcpy((void *)(pc + 32), (void *)(&level), 4); - (void) memcpy((void *)(pc + 36), (void *)(&xoffset), 4); - (void) memcpy((void *)(pc + 40), (void *)(&yoffset), 4); - (void) memcpy((void *)(pc + 44), (void *)(&width), 4); - (void) memcpy((void *)(pc + 48), (void *)(&height), 4); - (void) memcpy((void *)(pc + 52), (void *)(&format), 4); - (void) memcpy((void *)(pc + 56), (void *)(&type), 4); - (void) memcpy((void *)(pc + 60), zero, 4); - __glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, pixels, pc + 64, pc + 8); - } - } -} - -#define X_GLrop_TexSubImage1D 4099 -void -__indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels) -{ - __glx_TexSubImage_1D2D(X_GLrop_TexSubImage1D, 1, target, level, xoffset, 1, width, 1, format, type, pixels ); -} - -#define X_GLrop_TexSubImage2D 4100 -void -__indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels) -{ - __glx_TexSubImage_1D2D(X_GLrop_TexSubImage2D, 2, target, level, xoffset, yoffset, width, height, format, type, pixels ); -} - -#define X_GLrop_BlendColor 4096 -void -__indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_BlendColor, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_BlendEquation 4097 -void -__indirect_glBlendEquation(GLenum mode) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_BlendEquation, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ColorTable 2053 -void -__indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = (table != NULL) ? __glImageSize(width, 1, 1, format, type, target) : 0; - const GLuint cmdlen = 44 + __GLX_PAD(compsize); - if (__builtin_expect(gc->currentDpy != NULL, 1)) { - if (cmdlen <= gc->maxSmallRenderCommandSize) { - if ( (gc->pc + cmdlen) > gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - emit_header(gc->pc, X_GLrop_ColorTable, cmdlen); - (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 28), (void *)(&internalformat), 4); - (void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 36), (void *)(&format), 4); - (void) memcpy((void *)(gc->pc + 40), (void *)(&type), 4); - if (compsize > 0) { - (*gc->fillImage)(gc, 1, width, 1, 1, format, type, table, gc->pc + 44, gc->pc + 4); - } - else { - (void) memcpy( gc->pc + 4, default_pixel_store_1D, default_pixel_store_1D_size ); - } - gc->pc += cmdlen; - if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } - else { - const GLint op = X_GLrop_ColorTable; - const GLuint cmdlenLarge = cmdlen + 4; - GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); - (void) memcpy((void *)(pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(pc + 28), (void *)(&target), 4); - (void) memcpy((void *)(pc + 32), (void *)(&internalformat), 4); - (void) memcpy((void *)(pc + 36), (void *)(&width), 4); - (void) memcpy((void *)(pc + 40), (void *)(&format), 4); - (void) memcpy((void *)(pc + 44), (void *)(&type), 4); - __glXSendLargeImage(gc, compsize, 1, width, 1, 1, format, type, table, pc + 48, pc + 8); - } - } -} - -#define X_GLrop_ColorTableParameterfv 2054 -void -__indirect_glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glColorTableParameterfv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_ColorTableParameterfv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ColorTableParameteriv 2055 -void -__indirect_glColorTableParameteriv(GLenum target, GLenum pname, const GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glColorTableParameteriv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_ColorTableParameteriv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_CopyColorTable 2056 -void -__indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_CopyColorTable, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLsop_GetColorTable 147 -void -__indirect_glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid * table) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const __GLXattribute * const state = gc->client_state_private; - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 16; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetColorTableRep *reply = XCBGlxGetColorTableReply(c, XCBGlxGetColorTable(c, gc->currentContextTag, target, format, type, state->storePack.swapEndian), NULL); - (void)memcpy(table, XCBGlxGetColorTableData(reply), XCBGlxGetColorTableDataLength(reply) * sizeof(GLvoid)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTable, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&format), 4); - (void) memcpy((void *)(pc + 8), (void *)(&type), 4); - *(int32_t *)(pc + 12) = 0; - * (int8_t *)(pc + 12) = state->storePack.swapEndian; - __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetColorTableParameterfv 148 -void -__indirect_glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetColorTableParameterfvRep *reply = XCBGlxGetColorTableParameterfvReply(c, XCBGlxGetColorTableParameterfv(c, gc->currentContextTag, target, pname), NULL); - if (XCBGlxGetColorTableParameterfvDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetColorTableParameterfvData(reply), XCBGlxGetColorTableParameterfvDataLength(reply) * sizeof(GLfloat)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameterfv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetColorTableParameteriv 149 -void -__indirect_glGetColorTableParameteriv(GLenum target, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetColorTableParameterivRep *reply = XCBGlxGetColorTableParameterivReply(c, XCBGlxGetColorTableParameteriv(c, gc->currentContextTag, target, pname), NULL); - if (XCBGlxGetColorTableParameterivDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetColorTableParameterivData(reply), XCBGlxGetColorTableParameterivDataLength(reply) * sizeof(GLint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameteriv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLrop_ColorSubTable 195 -void -__indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = (data != NULL) ? __glImageSize(count, 1, 1, format, type, target) : 0; - const GLuint cmdlen = 44 + __GLX_PAD(compsize); - if (__builtin_expect(gc->currentDpy != NULL, 1)) { - if (cmdlen <= gc->maxSmallRenderCommandSize) { - if ( (gc->pc + cmdlen) > gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - emit_header(gc->pc, X_GLrop_ColorSubTable, cmdlen); - (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 28), (void *)(&start), 4); - (void) memcpy((void *)(gc->pc + 32), (void *)(&count), 4); - (void) memcpy((void *)(gc->pc + 36), (void *)(&format), 4); - (void) memcpy((void *)(gc->pc + 40), (void *)(&type), 4); - if (compsize > 0) { - (*gc->fillImage)(gc, 1, count, 1, 1, format, type, data, gc->pc + 44, gc->pc + 4); - } - else { - (void) memcpy( gc->pc + 4, default_pixel_store_1D, default_pixel_store_1D_size ); - } - gc->pc += cmdlen; - if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } - else { - const GLint op = X_GLrop_ColorSubTable; - const GLuint cmdlenLarge = cmdlen + 4; - GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); - (void) memcpy((void *)(pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(pc + 28), (void *)(&target), 4); - (void) memcpy((void *)(pc + 32), (void *)(&start), 4); - (void) memcpy((void *)(pc + 36), (void *)(&count), 4); - (void) memcpy((void *)(pc + 40), (void *)(&format), 4); - (void) memcpy((void *)(pc + 44), (void *)(&type), 4); - __glXSendLargeImage(gc, compsize, 1, count, 1, 1, format, type, data, pc + 48, pc + 8); - } - } -} - -#define X_GLrop_CopyColorSubTable 196 -void -__indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_CopyColorSubTable, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&start), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -static void -__glx_ConvolutionFilter_1D2D( unsigned opcode, unsigned dim, GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = (image != NULL) ? __glImageSize(width, height, 1, format, type, target) : 0; - const GLuint cmdlen = 48 + __GLX_PAD(compsize); - if (__builtin_expect(gc->currentDpy != NULL, 1)) { - if (cmdlen <= gc->maxSmallRenderCommandSize) { - if ( (gc->pc + cmdlen) > gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - emit_header(gc->pc, opcode, cmdlen); - (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 28), (void *)(&internalformat), 4); - (void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 36), (void *)(&height), 4); - (void) memcpy((void *)(gc->pc + 40), (void *)(&format), 4); - (void) memcpy((void *)(gc->pc + 44), (void *)(&type), 4); - if (compsize > 0) { - (*gc->fillImage)(gc, dim, width, height, 1, format, type, image, gc->pc + 48, gc->pc + 4); - } - else { - (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size ); - } - gc->pc += cmdlen; - if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } - else { - const GLint op = opcode; - const GLuint cmdlenLarge = cmdlen + 4; - GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); - (void) memcpy((void *)(pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(pc + 28), (void *)(&target), 4); - (void) memcpy((void *)(pc + 32), (void *)(&internalformat), 4); - (void) memcpy((void *)(pc + 36), (void *)(&width), 4); - (void) memcpy((void *)(pc + 40), (void *)(&height), 4); - (void) memcpy((void *)(pc + 44), (void *)(&format), 4); - (void) memcpy((void *)(pc + 48), (void *)(&type), 4); - __glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, image, pc + 52, pc + 8); - } - } -} - -#define X_GLrop_ConvolutionFilter1D 4101 -void -__indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image) -{ - __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter1D, 1, target, internalformat, width, 1, format, type, image ); -} - -#define X_GLrop_ConvolutionFilter2D 4102 -void -__indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image) -{ - __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter2D, 2, target, internalformat, width, height, format, type, image ); -} - -#define X_GLrop_ConvolutionParameterf 4103 -void -__indirect_glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_ConvolutionParameterf, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(¶ms), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ConvolutionParameterfv 4104 -void -__indirect_glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glConvolutionParameterfv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_ConvolutionParameterfv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ConvolutionParameteri 4105 -void -__indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_ConvolutionParameteri, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(¶ms), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ConvolutionParameteriv 4106 -void -__indirect_glConvolutionParameteriv(GLenum target, GLenum pname, const GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glConvolutionParameteriv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_ConvolutionParameteriv, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_CopyConvolutionFilter1D 4107 -void -__indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_CopyConvolutionFilter1D, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_CopyConvolutionFilter2D 4108 -void -__indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_CopyConvolutionFilter2D, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 24), (void *)(&height), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLsop_GetConvolutionFilter 150 -void -__indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid * image) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const __GLXattribute * const state = gc->client_state_private; - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 16; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetConvolutionFilterRep *reply = XCBGlxGetConvolutionFilterReply(c, XCBGlxGetConvolutionFilter(c, gc->currentContextTag, target, format, type, state->storePack.swapEndian), NULL); - (void)memcpy(image, XCBGlxGetConvolutionFilterData(reply), XCBGlxGetConvolutionFilterDataLength(reply) * sizeof(GLvoid)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionFilter, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&format), 4); - (void) memcpy((void *)(pc + 8), (void *)(&type), 4); - *(int32_t *)(pc + 12) = 0; - * (int8_t *)(pc + 12) = state->storePack.swapEndian; - __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetConvolutionParameterfv 151 -void -__indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetConvolutionParameterfvRep *reply = XCBGlxGetConvolutionParameterfvReply(c, XCBGlxGetConvolutionParameterfv(c, gc->currentContextTag, target, pname), NULL); - if (XCBGlxGetConvolutionParameterfvDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetConvolutionParameterfvData(reply), XCBGlxGetConvolutionParameterfvDataLength(reply) * sizeof(GLfloat)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameterfv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetConvolutionParameteriv 152 -void -__indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetConvolutionParameterivRep *reply = XCBGlxGetConvolutionParameterivReply(c, XCBGlxGetConvolutionParameteriv(c, gc->currentContextTag, target, pname), NULL); - if (XCBGlxGetConvolutionParameterivDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetConvolutionParameterivData(reply), XCBGlxGetConvolutionParameterivDataLength(reply) * sizeof(GLint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameteriv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetHistogram 154 -void -__indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const __GLXattribute * const state = gc->client_state_private; - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 16; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetHistogramRep *reply = XCBGlxGetHistogramReply(c, XCBGlxGetHistogram(c, gc->currentContextTag, target, reset, format, type, state->storePack.swapEndian), NULL); - (void)memcpy(values, XCBGlxGetHistogramData(reply), XCBGlxGetHistogramDataLength(reply) * sizeof(GLvoid)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogram, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&format), 4); - (void) memcpy((void *)(pc + 8), (void *)(&type), 4); - *(int32_t *)(pc + 12) = 0; - * (int8_t *)(pc + 12) = state->storePack.swapEndian; - * (int8_t *)(pc + 13) = reset; - __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetHistogramParameterfv 155 -void -__indirect_glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetHistogramParameterfvRep *reply = XCBGlxGetHistogramParameterfvReply(c, XCBGlxGetHistogramParameterfv(c, gc->currentContextTag, target, pname), NULL); - if (XCBGlxGetHistogramParameterfvDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetHistogramParameterfvData(reply), XCBGlxGetHistogramParameterfvDataLength(reply) * sizeof(GLfloat)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameterfv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetHistogramParameteriv 156 -void -__indirect_glGetHistogramParameteriv(GLenum target, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetHistogramParameterivRep *reply = XCBGlxGetHistogramParameterivReply(c, XCBGlxGetHistogramParameteriv(c, gc->currentContextTag, target, pname), NULL); - if (XCBGlxGetHistogramParameterivDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetHistogramParameterivData(reply), XCBGlxGetHistogramParameterivDataLength(reply) * sizeof(GLint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameteriv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetMinmax 157 -void -__indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const __GLXattribute * const state = gc->client_state_private; - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 16; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetMinmaxRep *reply = XCBGlxGetMinmaxReply(c, XCBGlxGetMinmax(c, gc->currentContextTag, target, reset, format, type, state->storePack.swapEndian), NULL); - (void)memcpy(values, XCBGlxGetMinmaxData(reply), XCBGlxGetMinmaxDataLength(reply) * sizeof(GLvoid)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmax, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&format), 4); - (void) memcpy((void *)(pc + 8), (void *)(&type), 4); - *(int32_t *)(pc + 12) = 0; - * (int8_t *)(pc + 12) = state->storePack.swapEndian; - * (int8_t *)(pc + 13) = reset; - __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetMinmaxParameterfv 158 -void -__indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetMinmaxParameterfvRep *reply = XCBGlxGetMinmaxParameterfvReply(c, XCBGlxGetMinmaxParameterfv(c, gc->currentContextTag, target, pname), NULL); - if (XCBGlxGetMinmaxParameterfvDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetMinmaxParameterfvData(reply), XCBGlxGetMinmaxParameterfvDataLength(reply) * sizeof(GLfloat)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameterfv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetMinmaxParameteriv 159 -void -__indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetMinmaxParameterivRep *reply = XCBGlxGetMinmaxParameterivReply(c, XCBGlxGetMinmaxParameteriv(c, gc->currentContextTag, target, pname), NULL); - if (XCBGlxGetMinmaxParameterivDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetMinmaxParameterivData(reply), XCBGlxGetMinmaxParameterivDataLength(reply) * sizeof(GLint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameteriv, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLrop_Histogram 4110 -void -__indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_Histogram, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&sink), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_Minmax 4111 -void -__indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_Minmax, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&sink), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ResetHistogram 4112 -void -__indirect_glResetHistogram(GLenum target) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_ResetHistogram, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ResetMinmax 4113 -void -__indirect_glResetMinmax(GLenum target) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_ResetMinmax, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -static void -__glx_TexImage_3D4D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const GLvoid * pixels ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, depth, format, type, target) : 0; - const GLuint cmdlen = 84 + __GLX_PAD(compsize); - if (__builtin_expect(gc->currentDpy != NULL, 1)) { - if (cmdlen <= gc->maxSmallRenderCommandSize) { - if ( (gc->pc + cmdlen) > gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - emit_header(gc->pc, opcode, cmdlen); - (void) memcpy((void *)(gc->pc + 40), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 44), (void *)(&level), 4); - (void) memcpy((void *)(gc->pc + 48), (void *)(&internalformat), 4); - (void) memcpy((void *)(gc->pc + 52), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 56), (void *)(&height), 4); - (void) memcpy((void *)(gc->pc + 60), (void *)(&depth), 4); - (void) memcpy((void *)(gc->pc + 64), (void *)(&extent), 4); - (void) memcpy((void *)(gc->pc + 68), (void *)(&border), 4); - (void) memcpy((void *)(gc->pc + 72), (void *)(&format), 4); - (void) memcpy((void *)(gc->pc + 76), (void *)(&type), 4); - (void) memcpy((void *)(gc->pc + 80), (void *)((pixels == NULL) ? one : zero), 4); - if (compsize > 0) { - (*gc->fillImage)(gc, dim, width, height, depth, format, type, pixels, gc->pc + 84, gc->pc + 4); - } - else { - (void) memcpy( gc->pc + 4, default_pixel_store_4D, default_pixel_store_4D_size ); - } - gc->pc += cmdlen; - if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } - else { - const GLint op = opcode; - const GLuint cmdlenLarge = cmdlen + 4; - GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); - (void) memcpy((void *)(pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(pc + 44), (void *)(&target), 4); - (void) memcpy((void *)(pc + 48), (void *)(&level), 4); - (void) memcpy((void *)(pc + 52), (void *)(&internalformat), 4); - (void) memcpy((void *)(pc + 56), (void *)(&width), 4); - (void) memcpy((void *)(pc + 60), (void *)(&height), 4); - (void) memcpy((void *)(pc + 64), (void *)(&depth), 4); - (void) memcpy((void *)(pc + 68), (void *)(&extent), 4); - (void) memcpy((void *)(pc + 72), (void *)(&border), 4); - (void) memcpy((void *)(pc + 76), (void *)(&format), 4); - (void) memcpy((void *)(pc + 80), (void *)(&type), 4); - (void) memcpy((void *)(pc + 84), zero, 4); - __glXSendLargeImage(gc, compsize, dim, width, height, depth, format, type, pixels, pc + 88, pc + 8); - } - } -} - -#define X_GLrop_TexImage3D 4114 -void -__indirect_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels) -{ - __glx_TexImage_3D4D(X_GLrop_TexImage3D, 3, target, level, internalformat, width, height, depth, 1, border, format, type, pixels ); -} - -static void -__glx_TexSubImage_3D4D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLenum format, GLenum type, const GLvoid * pixels ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, depth, format, type, target) : 0; - const GLuint cmdlen = 92 + __GLX_PAD(compsize); - if (__builtin_expect(gc->currentDpy != NULL, 1)) { - if (cmdlen <= gc->maxSmallRenderCommandSize) { - if ( (gc->pc + cmdlen) > gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - emit_header(gc->pc, opcode, cmdlen); - (void) memcpy((void *)(gc->pc + 40), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 44), (void *)(&level), 4); - (void) memcpy((void *)(gc->pc + 48), (void *)(&xoffset), 4); - (void) memcpy((void *)(gc->pc + 52), (void *)(&yoffset), 4); - (void) memcpy((void *)(gc->pc + 56), (void *)(&zoffset), 4); - (void) memcpy((void *)(gc->pc + 60), (void *)(&woffset), 4); - (void) memcpy((void *)(gc->pc + 64), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 68), (void *)(&height), 4); - (void) memcpy((void *)(gc->pc + 72), (void *)(&depth), 4); - (void) memcpy((void *)(gc->pc + 76), (void *)(&extent), 4); - (void) memcpy((void *)(gc->pc + 80), (void *)(&format), 4); - (void) memcpy((void *)(gc->pc + 84), (void *)(&type), 4); - (void) memcpy((void *)(gc->pc + 88), (void *)((pixels == NULL) ? one : zero), 4); - if (compsize > 0) { - (*gc->fillImage)(gc, dim, width, height, depth, format, type, pixels, gc->pc + 92, gc->pc + 4); - } - else { - (void) memcpy( gc->pc + 4, default_pixel_store_4D, default_pixel_store_4D_size ); - } - gc->pc += cmdlen; - if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } - else { - const GLint op = opcode; - const GLuint cmdlenLarge = cmdlen + 4; - GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); - (void) memcpy((void *)(pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(pc + 44), (void *)(&target), 4); - (void) memcpy((void *)(pc + 48), (void *)(&level), 4); - (void) memcpy((void *)(pc + 52), (void *)(&xoffset), 4); - (void) memcpy((void *)(pc + 56), (void *)(&yoffset), 4); - (void) memcpy((void *)(pc + 60), (void *)(&zoffset), 4); - (void) memcpy((void *)(pc + 64), (void *)(&woffset), 4); - (void) memcpy((void *)(pc + 68), (void *)(&width), 4); - (void) memcpy((void *)(pc + 72), (void *)(&height), 4); - (void) memcpy((void *)(pc + 76), (void *)(&depth), 4); - (void) memcpy((void *)(pc + 80), (void *)(&extent), 4); - (void) memcpy((void *)(pc + 84), (void *)(&format), 4); - (void) memcpy((void *)(pc + 88), (void *)(&type), 4); - (void) memcpy((void *)(pc + 92), zero, 4); - __glXSendLargeImage(gc, compsize, dim, width, height, depth, format, type, pixels, pc + 96, pc + 8); - } - } -} - -#define X_GLrop_TexSubImage3D 4115 -void -__indirect_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels) -{ - __glx_TexSubImage_3D4D(X_GLrop_TexSubImage3D, 3, target, level, xoffset, yoffset, zoffset, 1, width, height, depth, 1, format, type, pixels ); -} - -#define X_GLrop_CopyTexSubImage3D 4123 -void -__indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 40; - emit_header(gc->pc, X_GLrop_CopyTexSubImage3D, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&xoffset), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&yoffset), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&zoffset), 4); - (void) memcpy((void *)(gc->pc + 24), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 28), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 36), (void *)(&height), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ActiveTextureARB 197 -void -__indirect_glActiveTextureARB(GLenum texture) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_ActiveTextureARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&texture), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord1dvARB 198 -void -__indirect_glMultiTexCoord1dARB(GLenum target, GLdouble s) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&target), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord1dvARB 198 -void -__indirect_glMultiTexCoord1dvARB(GLenum target, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&target), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord1fvARB 199 -void -__indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord1fvARB 199 -void -__indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord1ivARB 200 -void -__indirect_glMultiTexCoord1iARB(GLenum target, GLint s) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord1ivARB 200 -void -__indirect_glMultiTexCoord1ivARB(GLenum target, const GLint * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord1svARB 201 -void -__indirect_glMultiTexCoord1sARB(GLenum target, GLshort s) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord1svARB 201 -void -__indirect_glMultiTexCoord1svARB(GLenum target, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord2dvARB 202 -void -__indirect_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&target), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord2dvARB 202 -void -__indirect_glMultiTexCoord2dvARB(GLenum target, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v), 16); - (void) memcpy((void *)(gc->pc + 20), (void *)(&target), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord2fvARB 203 -void -__indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord2fvARB 203 -void -__indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord2ivARB 204 -void -__indirect_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord2ivARB 204 -void -__indirect_glMultiTexCoord2ivARB(GLenum target, const GLint * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord2svARB 205 -void -__indirect_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2); - (void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord2svARB 205 -void -__indirect_glMultiTexCoord2svARB(GLenum target, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord3dvARB 206 -void -__indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 32; - emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&target), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord3dvARB 206 -void -__indirect_glMultiTexCoord3dvARB(GLenum target, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 32; - emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v), 24); - (void) memcpy((void *)(gc->pc + 28), (void *)(&target), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord3fvARB 207 -void -__indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord3fvARB 207 -void -__indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord3ivARB 208 -void -__indirect_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord3ivARB 208 -void -__indirect_glMultiTexCoord3ivARB(GLenum target, const GLint * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord3svARB 209 -void -__indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2); - (void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2); - (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord3svARB 209 -void -__indirect_glMultiTexCoord3svARB(GLenum target, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord4dvARB 210 -void -__indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 40; - emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&q), 8); - (void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord4dvARB 210 -void -__indirect_glMultiTexCoord4dvARB(GLenum target, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 40; - emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32); - (void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord4fvARB 211 -void -__indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&q), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord4fvARB 211 -void -__indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord4ivARB 212 -void -__indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&q), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord4ivARB 212 -void -__indirect_glMultiTexCoord4ivARB(GLenum target, const GLint * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord4svARB 213 -void -__indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2); - (void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2); - (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 2); - (void) memcpy((void *)(gc->pc + 14), (void *)(&q), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_MultiTexCoord4svARB 213 -void -__indirect_glMultiTexCoord4svARB(GLenum target, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_SampleCoverageARB 229 -void -__indirect_glSampleCoverageARB(GLclampf value, GLboolean invert) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_SampleCoverageARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&value), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&invert), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_DrawBuffersARB 233 -void -__indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8 + __GLX_PAD((n * 4)); - if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) { - if (cmdlen <= gc->maxSmallRenderCommandSize) { - if ( (gc->pc + cmdlen) > gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - emit_header(gc->pc, X_GLrop_DrawBuffersARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(bufs), (n * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } - else { - const GLint op = X_GLrop_DrawBuffersARB; - const GLuint cmdlenLarge = cmdlen + 4; - GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); - (void) memcpy((void *)(pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(pc + 8), (void *)(&n), 4); - __glXSendLargeCommand(gc, pc, 12, bufs, (n * 4)); - } - } -} - -#define X_GLvop_AreTexturesResidentEXT 11 -GLboolean -__indirect_glAreTexturesResidentEXT(GLsizei n, const GLuint * textures, GLboolean * residences) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - GLboolean retval = (GLboolean) 0; - const GLuint cmdlen = 4 + __GLX_PAD((n * 4)); - if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_AreTexturesResidentEXT, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&n), 4); - (void) memcpy((void *)(pc + 4), (void *)(textures), (n * 4)); - retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); - } - return retval; -} - -#define X_GLvop_GenTexturesEXT 13 -void -__indirect_glGenTexturesEXT(GLsizei n, GLuint * textures) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 4; - if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenTexturesEXT, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&n), 4); - (void) __glXReadReply(dpy, 4, textures, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLvop_IsTextureEXT 14 -GLboolean -__indirect_glIsTextureEXT(GLuint texture) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - GLboolean retval = (GLboolean) 0; - const GLuint cmdlen = 4; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsTextureEXT, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&texture), 4); - retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return retval; -} - -#define X_GLrop_SampleMaskSGIS 2048 -void -__indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_SampleMaskSGIS, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&value), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&invert), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_SamplePatternSGIS 2049 -void -__indirect_glSamplePatternSGIS(GLenum pattern) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_SamplePatternSGIS, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pattern), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PointParameterfEXT 2065 -void -__indirect_glPointParameterfEXT(GLenum pname, GLfloat param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_PointParameterfEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PointParameterfvEXT 2066 -void -__indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glPointParameterfvEXT_size(pname); - const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_PointParameterfvEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_WindowPos3fvMESA 230 -void -__indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_WindowPos3fvMESA, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_WindowPos3fvMESA 230 -void -__indirect_glWindowPos3fvMESA(const GLfloat * v) -{ - generic_12_byte( X_GLrop_WindowPos3fvMESA, v ); -} - -#define X_GLrop_BlendFuncSeparateEXT 4134 -void -__indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_BlendFuncSeparateEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&sfactorRGB), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&dfactorRGB), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&sfactorAlpha), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&dfactorAlpha), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_FogCoordfvEXT 4124 -void -__indirect_glFogCoordfEXT(GLfloat coord) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_FogCoordfvEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_FogCoordfvEXT 4124 -void -__indirect_glFogCoordfvEXT(const GLfloat * coord) -{ - generic_4_byte( X_GLrop_FogCoordfvEXT, coord ); -} - -#define X_GLrop_FogCoorddvEXT 4125 -void -__indirect_glFogCoorddEXT(GLdouble coord) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_FogCoorddvEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_FogCoorddvEXT 4125 -void -__indirect_glFogCoorddvEXT(const GLdouble * coord) -{ - generic_8_byte( X_GLrop_FogCoorddvEXT, coord ); -} - -#define X_GLrop_SecondaryColor3bvEXT 4126 -void -__indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_SecondaryColor3bvEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1); - (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1); - (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_SecondaryColor3bvEXT 4126 -void -__indirect_glSecondaryColor3bvEXT(const GLbyte * v) -{ - generic_3_byte( X_GLrop_SecondaryColor3bvEXT, v ); -} - -#define X_GLrop_SecondaryColor3dvEXT 4130 -void -__indirect_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_SecondaryColor3dvEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_SecondaryColor3dvEXT 4130 -void -__indirect_glSecondaryColor3dvEXT(const GLdouble * v) -{ - generic_24_byte( X_GLrop_SecondaryColor3dvEXT, v ); -} - -#define X_GLrop_SecondaryColor3fvEXT 4129 -void -__indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_SecondaryColor3fvEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_SecondaryColor3fvEXT 4129 -void -__indirect_glSecondaryColor3fvEXT(const GLfloat * v) -{ - generic_12_byte( X_GLrop_SecondaryColor3fvEXT, v ); -} - -#define X_GLrop_SecondaryColor3ivEXT 4128 -void -__indirect_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_SecondaryColor3ivEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_SecondaryColor3ivEXT 4128 -void -__indirect_glSecondaryColor3ivEXT(const GLint * v) -{ - generic_12_byte( X_GLrop_SecondaryColor3ivEXT, v ); -} - -#define X_GLrop_SecondaryColor3svEXT 4127 -void -__indirect_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_SecondaryColor3svEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2); - (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_SecondaryColor3svEXT 4127 -void -__indirect_glSecondaryColor3svEXT(const GLshort * v) -{ - generic_6_byte( X_GLrop_SecondaryColor3svEXT, v ); -} - -#define X_GLrop_SecondaryColor3ubvEXT 4131 -void -__indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_SecondaryColor3ubvEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1); - (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1); - (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_SecondaryColor3ubvEXT 4131 -void -__indirect_glSecondaryColor3ubvEXT(const GLubyte * v) -{ - generic_3_byte( X_GLrop_SecondaryColor3ubvEXT, v ); -} - -#define X_GLrop_SecondaryColor3uivEXT 4133 -void -__indirect_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_SecondaryColor3uivEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_SecondaryColor3uivEXT 4133 -void -__indirect_glSecondaryColor3uivEXT(const GLuint * v) -{ - generic_12_byte( X_GLrop_SecondaryColor3uivEXT, v ); -} - -#define X_GLrop_SecondaryColor3usvEXT 4132 -void -__indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_SecondaryColor3usvEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2); - (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2); - (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_SecondaryColor3usvEXT 4132 -void -__indirect_glSecondaryColor3usvEXT(const GLushort * v) -{ - generic_6_byte( X_GLrop_SecondaryColor3usvEXT, v ); -} - -#define X_GLvop_AreProgramsResidentNV 1293 -GLboolean -__indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids, GLboolean * residences) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - GLboolean retval = (GLboolean) 0; - const GLuint cmdlen = 4 + __GLX_PAD((n * 4)); - if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_AreProgramsResidentNV, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&n), 4); - (void) memcpy((void *)(pc + 4), (void *)(ids), (n * 4)); - retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return retval; -} - -#define X_GLrop_BindProgramNV 4180 -void -__indirect_glBindProgramNV(GLenum target, GLuint program) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_BindProgramNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&program), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLvop_DeleteProgramsNV 1294 -void -__indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 4 + __GLX_PAD((n * 4)); - if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivate, X_GLvop_DeleteProgramsNV, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&n), 4); - (void) memcpy((void *)(pc + 4), (void *)(programs), (n * 4)); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLrop_ExecuteProgramNV 4181 -void -__indirect_glExecuteProgramNV(GLenum target, GLuint id, const GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_ExecuteProgramNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLvop_GenProgramsNV 1295 -void -__indirect_glGenProgramsNV(GLsizei n, GLuint * programs) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 4; - if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenProgramsNV, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&n), 4); - (void) __glXReadReply(dpy, 4, programs, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLvop_GetProgramParameterdvNV 1297 -void -__indirect_glGetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 12; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramParameterdvNV, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(pc + 8), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 8, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLvop_GetProgramParameterfvNV 1296 -void -__indirect_glGetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 12; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramParameterfvNV, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(pc + 8), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLvop_GetProgramivNV 1298 -void -__indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramivNV, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&id), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLvop_GetProgramStringNV 1299 -void -__indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramStringNV, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&id), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 1, program, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLvop_GetTrackMatrixivNV 1300 -void -__indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 12; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetTrackMatrixivNV, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&address), 4); - (void) memcpy((void *)(pc + 8), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLvop_IsProgramNV 1304 -GLboolean -__indirect_glIsProgramNV(GLuint program) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - GLboolean retval = (GLboolean) 0; - const GLuint cmdlen = 4; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsProgramNV, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&program), 4); - retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return retval; -} - -#define X_GLrop_LoadProgramNV 4183 -void -__indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16 + __GLX_PAD(len); - if (__builtin_expect(len >= 0, 1)) { - emit_header(gc->pc, X_GLrop_LoadProgramNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(program), len); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_ProgramParameter4dvNV 4185 -void -__indirect_glProgramParameter4dNV(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 44; - emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8); - (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ProgramParameter4dvNV 4185 -void -__indirect_glProgramParameter4dvNV(GLenum target, GLuint index, const GLdouble * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 44; - emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ProgramParameter4fvNV 4184 -void -__indirect_glProgramParameter4fNV(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_ProgramParameter4fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4); - (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ProgramParameter4fvNV 4184 -void -__indirect_glProgramParameter4fvNV(GLenum target, GLuint index, const GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_ProgramParameter4fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ProgramParameters4dvNV 4187 -void -__indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16 + __GLX_PAD((num * 32)); - if (__builtin_expect(num >= 0, 1)) { - emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 32)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_ProgramParameters4fvNV 4186 -void -__indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num, const GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16 + __GLX_PAD((num * 16)); - if (__builtin_expect(num >= 0, 1)) { - emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 16)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_RequestResidentProgramsNV 4182 -void -__indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8 + __GLX_PAD((n * 4)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_RequestResidentProgramsNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(ids), (n * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_TrackMatrixNV 4188 -void -__indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_TrackMatrixNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&address), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&matrix), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&transform), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib1dvARB 4197 -void -__indirect_glVertexAttrib1dARB(GLuint index, GLdouble x) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib1dvARB 4197 -void -__indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib1fvARB 4193 -void -__indirect_glVertexAttrib1fARB(GLuint index, GLfloat x) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib1fvARB 4193 -void -__indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib1svARB 4189 -void -__indirect_glVertexAttrib1sARB(GLuint index, GLshort x) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib1svARB 4189 -void -__indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib2dvARB 4198 -void -__indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&index), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib2dvARB 4198 -void -__indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v), 16); - (void) memcpy((void *)(gc->pc + 20), (void *)(&index), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib2fvARB 4194 -void -__indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib2fvARB 4194 -void -__indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib2svARB 4190 -void -__indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); - (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib2svARB 4190 -void -__indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib3dvARB 4199 -void -__indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 32; - emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&index), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib3dvARB 4199 -void -__indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 32; - emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v), 24); - (void) memcpy((void *)(gc->pc + 28), (void *)(&index), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib3fvARB 4195 -void -__indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib3fvARB 4195 -void -__indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib3svARB 4191 -void -__indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); - (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); - (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib3svARB 4191 -void -__indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4dvARB 4200 -void -__indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 40; - emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8); - (void) memcpy((void *)(gc->pc + 36), (void *)(&index), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4dvARB 4200 -void -__indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 40; - emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32); - (void) memcpy((void *)(gc->pc + 36), (void *)(&index), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4fvARB 4196 -void -__indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4fvARB 4196 -void -__indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4svARB 4192 -void -__indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); - (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); - (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2); - (void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4svARB 4192 -void -__indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4NubvARB 4201 -void -__indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1); - (void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1); - (void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1); - (void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4NubvARB 4201 -void -__indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttribs1dvNV 4210 -void -__indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((n * 8)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_VertexAttribs1dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_VertexAttribs1fvNV 4206 -void -__indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((n * 4)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_VertexAttribs1fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_VertexAttribs1svNV 4202 -void -__indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((n * 2)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_VertexAttribs1svNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 2)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_VertexAttribs2dvNV 4211 -void -__indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((n * 16)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_VertexAttribs2fvNV 4207 -void -__indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((n * 8)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_VertexAttribs2svNV 4203 -void -__indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((n * 4)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_VertexAttribs3dvNV 4212 -void -__indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((n * 24)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 24)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_VertexAttribs3fvNV 4208 -void -__indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((n * 12)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 12)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_VertexAttribs3svNV 4204 -void -__indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((n * 6)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 6)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_VertexAttribs4dvNV 4213 -void -__indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((n * 32)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 32)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_VertexAttribs4fvNV 4209 -void -__indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((n * 16)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_VertexAttribs4svNV 4205 -void -__indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((n * 8)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_VertexAttribs4ubvNV 4214 -void -__indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD((n * 4)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_PointParameteriNV 4221 -void -__indirect_glPointParameteriNV(GLenum pname, GLint param) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_PointParameteriNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_PointParameterivNV 4222 -void -__indirect_glPointParameterivNV(GLenum pname, const GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glPointParameterivNV_size(pname); - const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_PointParameterivNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ActiveStencilFaceEXT 4220 -void -__indirect_glActiveStencilFaceEXT(GLenum face) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4bvARB 4230 -void -__indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib4bvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4ivARB 4231 -void -__indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_VertexAttrib4ivARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4ubvARB 4232 -void -__indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib4ubvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4usvARB 4233 -void -__indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib4usvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4uivARB 4234 -void -__indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_VertexAttrib4uivARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4NbvARB 4235 -void -__indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib4NbvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4NsvARB 4236 -void -__indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib4NsvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4NivARB 4237 -void -__indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_VertexAttrib4NivARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4NusvARB 4238 -void -__indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib4NusvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4NuivARB 4239 -void -__indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_VertexAttrib4NuivARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ProgramStringARB 4217 -void -__indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16 + __GLX_PAD(len); - if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) { - if (cmdlen <= gc->maxSmallRenderCommandSize) { - if ( (gc->pc + cmdlen) > gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - emit_header(gc->pc, X_GLrop_ProgramStringARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&format), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(string), len); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } - else { - const GLint op = X_GLrop_ProgramStringARB; - const GLuint cmdlenLarge = cmdlen + 4; - GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); - (void) memcpy((void *)(pc + 4), (void *)(&op), 4); - (void) memcpy((void *)(pc + 8), (void *)(&target), 4); - (void) memcpy((void *)(pc + 12), (void *)(&format), 4); - (void) memcpy((void *)(pc + 16), (void *)(&len), 4); - __glXSendLargeCommand(gc, pc, 20, string, len); - } - } -} - -#define X_GLrop_ProgramEnvParameter4dvARB 4185 -void -__indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 44; - emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8); - (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ProgramEnvParameter4dvARB 4185 -void -__indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdouble * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 44; - emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ProgramEnvParameter4fvARB 4184 -void -__indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4); - (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ProgramEnvParameter4fvARB 4184 -void -__indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index, const GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ProgramLocalParameter4dvARB 4216 -void -__indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 44; - emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8); - (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ProgramLocalParameter4dvARB 4216 -void -__indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdouble * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 44; - emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ProgramLocalParameter4fvARB 4215 -void -__indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4); - (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_ProgramLocalParameter4fvARB 4215 -void -__indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index, const GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLvop_GetProgramivARB 1307 -void -__indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramivARB, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLvop_GetProgramStringARB 1308 -void -__indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramStringARB, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 1, string, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLrop_ProgramNamedParameter4fvNV 4218 -void -__indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28 + __GLX_PAD(len); - if (__builtin_expect(len >= 0, 1)) { - emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4); - (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4); - (void) memcpy((void *)(gc->pc + 28), (void *)(name), len); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_ProgramNamedParameter4dvNV 4219 -void -__indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 44 + __GLX_PAD(len); - if (__builtin_expect(len >= 0, 1)) { - emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8); - (void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4); - (void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4); - (void) memcpy((void *)(gc->pc + 44), (void *)(name), len); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_ProgramNamedParameter4fvNV 4218 -void -__indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28 + __GLX_PAD(len); - if (__builtin_expect(len >= 0, 1)) { - emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), 16); - (void) memcpy((void *)(gc->pc + 28), (void *)(name), len); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLrop_ProgramNamedParameter4dvNV 4219 -void -__indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 44 + __GLX_PAD(len); - if (__builtin_expect(len >= 0, 1)) { - emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32); - (void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4); - (void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4); - (void) memcpy((void *)(gc->pc + 44), (void *)(name), len); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLvop_GetProgramNamedParameterfvNV 1310 -void -__indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8 + __GLX_PAD(len); - if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterfvNV, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&id), 4); - (void) memcpy((void *)(pc + 4), (void *)(&len), 4); - (void) memcpy((void *)(pc + 8), (void *)(name), len); - (void) __glXReadReply(dpy, 4, params, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLvop_GetProgramNamedParameterdvNV 1311 -void -__indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8 + __GLX_PAD(len); - if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterdvNV, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&id), 4); - (void) memcpy((void *)(pc + 4), (void *)(&len), 4); - (void) memcpy((void *)(pc + 8), (void *)(name), len); - (void) __glXReadReply(dpy, 8, params, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLsop_GenQueriesARB 162 -void -__indirect_glGenQueriesARB(GLsizei n, GLuint * ids) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 4; - if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGenQueriesARBRep *reply = XCBGlxGenQueriesARBReply(c, XCBGlxGenQueriesARB(c, gc->currentContextTag, n), NULL); - (void)memcpy(ids, XCBGlxGenQueriesARBData(reply), XCBGlxGenQueriesARBDataLength(reply) * sizeof(GLuint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenQueriesARB, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&n), 4); - (void) __glXReadReply(dpy, 4, ids, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_DeleteQueriesARB 161 -void -__indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 4 + __GLX_PAD((n * 4)); - if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxDeleteQueriesARB(c, gc->currentContextTag, n, ids); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteQueriesARB, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&n), 4); - (void) memcpy((void *)(pc + 4), (void *)(ids), (n * 4)); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_IsQueryARB 163 -GLboolean -__indirect_glIsQueryARB(GLuint id) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - GLboolean retval = (GLboolean) 0; - const GLuint cmdlen = 4; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxIsQueryARBRep *reply = XCBGlxIsQueryARBReply(c, XCBGlxIsQueryARB(c, gc->currentContextTag, id), NULL); - retval = reply->ret_val; - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsQueryARB, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&id), 4); - retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return retval; -} - -#define X_GLrop_BeginQueryARB 231 -void -__indirect_glBeginQueryARB(GLenum target, GLuint id) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_BeginQueryARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_EndQueryARB 232 -void -__indirect_glEndQueryARB(GLenum target) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_EndQueryARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLsop_GetQueryivARB 164 -void -__indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetQueryivARBRep *reply = XCBGlxGetQueryivARBReply(c, XCBGlxGetQueryivARB(c, gc->currentContextTag, target, pname), NULL); - if (XCBGlxGetQueryivARBDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetQueryivARBData(reply), XCBGlxGetQueryivARBDataLength(reply) * sizeof(GLint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryivARB, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetQueryObjectivARB 165 -void -__indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetQueryObjectivARBRep *reply = XCBGlxGetQueryObjectivARBReply(c, XCBGlxGetQueryObjectivARB(c, gc->currentContextTag, id, pname), NULL); - if (XCBGlxGetQueryObjectivARBDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetQueryObjectivARBData(reply), XCBGlxGetQueryObjectivARBDataLength(reply) * sizeof(GLint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectivARB, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&id), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLsop_GetQueryObjectuivARB 166 -void -__indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { -#ifdef USE_XCB - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxGetQueryObjectuivARBRep *reply = XCBGlxGetQueryObjectuivARBReply(c, XCBGlxGetQueryObjectuivARB(c, gc->currentContextTag, id, pname), NULL); - if (XCBGlxGetQueryObjectuivARBDataLength(reply) == 0) - (void)memcpy(params, &reply->datum, sizeof(reply->datum)); - else - (void)memcpy(params, XCBGlxGetQueryObjectuivARBData(reply), XCBGlxGetQueryObjectuivARBDataLength(reply) * sizeof(GLuint)); - free(reply); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuivARB, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&id), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); -#endif /* USE_XCB */ - } - return; -} - -#define X_GLvop_GetVertexAttribdvNV 1301 -void -__indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribdvNV, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&index), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 8, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLvop_GetVertexAttribfvNV 1302 -void -__indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribfvNV, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&index), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLvop_GetVertexAttribivNV 1303 -void -__indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribivNV, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&index), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLrop_VertexAttrib1dvNV 4197 -void -__indirect_glVertexAttrib1dNV(GLuint index, GLdouble x) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib1dvNV 4197 -void -__indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib1fvNV 4193 -void -__indirect_glVertexAttrib1fNV(GLuint index, GLfloat x) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib1fvNV 4193 -void -__indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib1svNV 4189 -void -__indirect_glVertexAttrib1sNV(GLuint index, GLshort x) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib1svNV 4189 -void -__indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib2dvNV 4198 -void -__indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib2dvNV 4198 -void -__indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib2fvNV 4194 -void -__indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib2fvNV 4194 -void -__indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib2svNV 4190 -void -__indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); - (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib2svNV 4190 -void -__indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib3dvNV 4199 -void -__indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 32; - emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib3dvNV 4199 -void -__indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 32; - emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 24); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib3fvNV 4195 -void -__indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib3fvNV 4195 -void -__indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib3svNV 4191 -void -__indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); - (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); - (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib3svNV 4191 -void -__indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4dvNV 4200 -void -__indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 40; - emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8); - (void) memcpy((void *)(gc->pc + 32), (void *)(&w), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4dvNV 4200 -void -__indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 40; - emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 32); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4fvNV 4196 -void -__indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4fvNV 4196 -void -__indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4svNV 4192 -void -__indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); - (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); - (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2); - (void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4svNV 4192 -void -__indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16; - emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4ubvNV 4201 -void -__indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1); - (void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1); - (void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1); - (void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_VertexAttrib4ubvNV 4201 -void -__indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLvop_IsRenderbufferEXT 1422 -GLboolean -__indirect_glIsRenderbufferEXT(GLuint renderbuffer) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - GLboolean retval = (GLboolean) 0; - const GLuint cmdlen = 4; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsRenderbufferEXT, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&renderbuffer), 4); - retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return retval; -} - -#define X_GLrop_BindRenderbufferEXT 4316 -void -__indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&renderbuffer), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_DeleteRenderbuffersEXT 4317 -void -__indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8 + __GLX_PAD((n * 4)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_DeleteRenderbuffersEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(renderbuffers), (n * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLvop_GenRenderbuffersEXT 1423 -void -__indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 4; - if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenRenderbuffersEXT, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&n), 4); - (void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLrop_RenderbufferStorageEXT 4318 -void -__indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_RenderbufferStorageEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLvop_GetRenderbufferParameterivEXT 1424 -void -__indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetRenderbufferParameterivEXT, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLvop_IsFramebufferEXT 1425 -GLboolean -__indirect_glIsFramebufferEXT(GLuint framebuffer) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - GLboolean retval = (GLboolean) 0; - const GLuint cmdlen = 4; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsFramebufferEXT, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&framebuffer), 4); - retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return retval; -} - -#define X_GLrop_BindFramebufferEXT 4319 -void -__indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&framebuffer), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_DeleteFramebuffersEXT 4320 -void -__indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8 + __GLX_PAD((n * 4)); - if (__builtin_expect(n >= 0, 1)) { - emit_header(gc->pc, X_GLrop_DeleteFramebuffersEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(framebuffers), (n * 4)); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } - } -} - -#define X_GLvop_GenFramebuffersEXT 1426 -void -__indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 4; - if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenFramebuffersEXT, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&n), 4); - (void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLvop_CheckFramebufferStatusEXT 1427 -GLenum -__indirect_glCheckFramebufferStatusEXT(GLenum target) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - GLenum retval = (GLenum) 0; - const GLuint cmdlen = 4; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_CheckFramebufferStatusEXT, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - retval = (GLenum) __glXReadReply(dpy, 0, NULL, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return retval; -} - -#define X_GLrop_FramebufferTexture1DEXT 4321 -void -__indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_FramebufferTexture1DEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_FramebufferTexture2DEXT 4322 -void -__indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 24; - emit_header(gc->pc, X_GLrop_FramebufferTexture2DEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_FramebufferTexture3DEXT 4323 -void -__indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28; - emit_header(gc->pc, X_GLrop_FramebufferTexture3DEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4); - (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4); - (void) memcpy((void *)(gc->pc + 24), (void *)(&zoffset), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLrop_FramebufferRenderbufferEXT 4324 -void -__indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 20; - emit_header(gc->pc, X_GLrop_FramebufferRenderbufferEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(&renderbuffertarget), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(&renderbuffer), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - -#define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428 -void -__indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint * params) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 12; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetFramebufferAttachmentParameterivEXT, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&target), 4); - (void) memcpy((void *)(pc + 4), (void *)(&attachment), 4); - (void) memcpy((void *)(pc + 8), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 4, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -#define X_GLrop_GenerateMipmapEXT 4325 -void -__indirect_glGenerateMipmapEXT(GLenum target) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_GenerateMipmapEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} - - -# undef FASTCALL -# undef NOINLINE diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect.h b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect.h deleted file mode 100644 index 1c45fa28a4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect.h +++ /dev/null @@ -1,707 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_send.py (from Mesa) script */ - -/* - * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * PRECISION INSIGHT, IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#if !defined( _INDIRECT_H_ ) -# define _INDIRECT_H_ - -/** - * \file - * Prototypes for indirect rendering functions. - * - * \author Kevin E. Martin - * \author Ian Romanick - */ - -# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) -# define HIDDEN __attribute__((visibility("hidden"))) -# else -# define HIDDEN -# endif -# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) -# define FASTCALL __attribute__((fastcall)) -# else -# define FASTCALL -# endif -# if defined(__GNUC__) -# define NOINLINE __attribute__((noinline)) -# else -# define NOINLINE -# endif - -#include "glxclient.h" - -extern HIDDEN NOINLINE CARD32 __glXReadReply( Display *dpy, size_t size, - void * dest, GLboolean reply_is_always_array ); - -extern HIDDEN NOINLINE void __glXReadPixelReply( Display *dpy, - __GLXcontext * gc, unsigned max_dim, GLint width, GLint height, - GLint depth, GLenum format, GLenum type, void * dest, - GLboolean dimensions_in_reply ); - -extern HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupSingleRequest( - __GLXcontext * gc, GLint sop, GLint cmdlen ); - -extern HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupVendorRequest( - __GLXcontext * gc, GLint code, GLint vop, GLint cmdlen ); - -extern HIDDEN void __indirect_glNewList(GLuint list, GLenum mode); -extern HIDDEN void __indirect_glEndList(void); -extern HIDDEN void __indirect_glCallList(GLuint list); -extern HIDDEN void __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists); -extern HIDDEN void __indirect_glDeleteLists(GLuint list, GLsizei range); -extern HIDDEN GLuint __indirect_glGenLists(GLsizei range); -extern HIDDEN void __indirect_glListBase(GLuint base); -extern HIDDEN void __indirect_glBegin(GLenum mode); -extern HIDDEN void __indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap); -extern HIDDEN void __indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue); -extern HIDDEN void __indirect_glColor3bv(const GLbyte * v); -extern HIDDEN void __indirect_glColor3d(GLdouble red, GLdouble green, GLdouble blue); -extern HIDDEN void __indirect_glColor3dv(const GLdouble * v); -extern HIDDEN void __indirect_glColor3f(GLfloat red, GLfloat green, GLfloat blue); -extern HIDDEN void __indirect_glColor3fv(const GLfloat * v); -extern HIDDEN void __indirect_glColor3i(GLint red, GLint green, GLint blue); -extern HIDDEN void __indirect_glColor3iv(const GLint * v); -extern HIDDEN void __indirect_glColor3s(GLshort red, GLshort green, GLshort blue); -extern HIDDEN void __indirect_glColor3sv(const GLshort * v); -extern HIDDEN void __indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue); -extern HIDDEN void __indirect_glColor3ubv(const GLubyte * v); -extern HIDDEN void __indirect_glColor3ui(GLuint red, GLuint green, GLuint blue); -extern HIDDEN void __indirect_glColor3uiv(const GLuint * v); -extern HIDDEN void __indirect_glColor3us(GLushort red, GLushort green, GLushort blue); -extern HIDDEN void __indirect_glColor3usv(const GLushort * v); -extern HIDDEN void __indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); -extern HIDDEN void __indirect_glColor4bv(const GLbyte * v); -extern HIDDEN void __indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); -extern HIDDEN void __indirect_glColor4dv(const GLdouble * v); -extern HIDDEN void __indirect_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -extern HIDDEN void __indirect_glColor4fv(const GLfloat * v); -extern HIDDEN void __indirect_glColor4i(GLint red, GLint green, GLint blue, GLint alpha); -extern HIDDEN void __indirect_glColor4iv(const GLint * v); -extern HIDDEN void __indirect_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha); -extern HIDDEN void __indirect_glColor4sv(const GLshort * v); -extern HIDDEN void __indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); -extern HIDDEN void __indirect_glColor4ubv(const GLubyte * v); -extern HIDDEN void __indirect_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha); -extern HIDDEN void __indirect_glColor4uiv(const GLuint * v); -extern HIDDEN void __indirect_glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha); -extern HIDDEN void __indirect_glColor4usv(const GLushort * v); -extern HIDDEN void __indirect_glEdgeFlag(GLboolean flag); -extern HIDDEN void __indirect_glEdgeFlagv(const GLboolean * flag); -extern HIDDEN void __indirect_glEnd(void); -extern HIDDEN void __indirect_glIndexd(GLdouble c); -extern HIDDEN void __indirect_glIndexdv(const GLdouble * c); -extern HIDDEN void __indirect_glIndexf(GLfloat c); -extern HIDDEN void __indirect_glIndexfv(const GLfloat * c); -extern HIDDEN void __indirect_glIndexi(GLint c); -extern HIDDEN void __indirect_glIndexiv(const GLint * c); -extern HIDDEN void __indirect_glIndexs(GLshort c); -extern HIDDEN void __indirect_glIndexsv(const GLshort * c); -extern HIDDEN void __indirect_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz); -extern HIDDEN void __indirect_glNormal3bv(const GLbyte * v); -extern HIDDEN void __indirect_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz); -extern HIDDEN void __indirect_glNormal3dv(const GLdouble * v); -extern HIDDEN void __indirect_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz); -extern HIDDEN void __indirect_glNormal3fv(const GLfloat * v); -extern HIDDEN void __indirect_glNormal3i(GLint nx, GLint ny, GLint nz); -extern HIDDEN void __indirect_glNormal3iv(const GLint * v); -extern HIDDEN void __indirect_glNormal3s(GLshort nx, GLshort ny, GLshort nz); -extern HIDDEN void __indirect_glNormal3sv(const GLshort * v); -extern HIDDEN void __indirect_glRasterPos2d(GLdouble x, GLdouble y); -extern HIDDEN void __indirect_glRasterPos2dv(const GLdouble * v); -extern HIDDEN void __indirect_glRasterPos2f(GLfloat x, GLfloat y); -extern HIDDEN void __indirect_glRasterPos2fv(const GLfloat * v); -extern HIDDEN void __indirect_glRasterPos2i(GLint x, GLint y); -extern HIDDEN void __indirect_glRasterPos2iv(const GLint * v); -extern HIDDEN void __indirect_glRasterPos2s(GLshort x, GLshort y); -extern HIDDEN void __indirect_glRasterPos2sv(const GLshort * v); -extern HIDDEN void __indirect_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z); -extern HIDDEN void __indirect_glRasterPos3dv(const GLdouble * v); -extern HIDDEN void __indirect_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z); -extern HIDDEN void __indirect_glRasterPos3fv(const GLfloat * v); -extern HIDDEN void __indirect_glRasterPos3i(GLint x, GLint y, GLint z); -extern HIDDEN void __indirect_glRasterPos3iv(const GLint * v); -extern HIDDEN void __indirect_glRasterPos3s(GLshort x, GLshort y, GLshort z); -extern HIDDEN void __indirect_glRasterPos3sv(const GLshort * v); -extern HIDDEN void __indirect_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -extern HIDDEN void __indirect_glRasterPos4dv(const GLdouble * v); -extern HIDDEN void __indirect_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -extern HIDDEN void __indirect_glRasterPos4fv(const GLfloat * v); -extern HIDDEN void __indirect_glRasterPos4i(GLint x, GLint y, GLint z, GLint w); -extern HIDDEN void __indirect_glRasterPos4iv(const GLint * v); -extern HIDDEN void __indirect_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w); -extern HIDDEN void __indirect_glRasterPos4sv(const GLshort * v); -extern HIDDEN void __indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); -extern HIDDEN void __indirect_glRectdv(const GLdouble * v1, const GLdouble * v2); -extern HIDDEN void __indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); -extern HIDDEN void __indirect_glRectfv(const GLfloat * v1, const GLfloat * v2); -extern HIDDEN void __indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2); -extern HIDDEN void __indirect_glRectiv(const GLint * v1, const GLint * v2); -extern HIDDEN void __indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2); -extern HIDDEN void __indirect_glRectsv(const GLshort * v1, const GLshort * v2); -extern HIDDEN void __indirect_glTexCoord1d(GLdouble s); -extern HIDDEN void __indirect_glTexCoord1dv(const GLdouble * v); -extern HIDDEN void __indirect_glTexCoord1f(GLfloat s); -extern HIDDEN void __indirect_glTexCoord1fv(const GLfloat * v); -extern HIDDEN void __indirect_glTexCoord1i(GLint s); -extern HIDDEN void __indirect_glTexCoord1iv(const GLint * v); -extern HIDDEN void __indirect_glTexCoord1s(GLshort s); -extern HIDDEN void __indirect_glTexCoord1sv(const GLshort * v); -extern HIDDEN void __indirect_glTexCoord2d(GLdouble s, GLdouble t); -extern HIDDEN void __indirect_glTexCoord2dv(const GLdouble * v); -extern HIDDEN void __indirect_glTexCoord2f(GLfloat s, GLfloat t); -extern HIDDEN void __indirect_glTexCoord2fv(const GLfloat * v); -extern HIDDEN void __indirect_glTexCoord2i(GLint s, GLint t); -extern HIDDEN void __indirect_glTexCoord2iv(const GLint * v); -extern HIDDEN void __indirect_glTexCoord2s(GLshort s, GLshort t); -extern HIDDEN void __indirect_glTexCoord2sv(const GLshort * v); -extern HIDDEN void __indirect_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r); -extern HIDDEN void __indirect_glTexCoord3dv(const GLdouble * v); -extern HIDDEN void __indirect_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r); -extern HIDDEN void __indirect_glTexCoord3fv(const GLfloat * v); -extern HIDDEN void __indirect_glTexCoord3i(GLint s, GLint t, GLint r); -extern HIDDEN void __indirect_glTexCoord3iv(const GLint * v); -extern HIDDEN void __indirect_glTexCoord3s(GLshort s, GLshort t, GLshort r); -extern HIDDEN void __indirect_glTexCoord3sv(const GLshort * v); -extern HIDDEN void __indirect_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q); -extern HIDDEN void __indirect_glTexCoord4dv(const GLdouble * v); -extern HIDDEN void __indirect_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q); -extern HIDDEN void __indirect_glTexCoord4fv(const GLfloat * v); -extern HIDDEN void __indirect_glTexCoord4i(GLint s, GLint t, GLint r, GLint q); -extern HIDDEN void __indirect_glTexCoord4iv(const GLint * v); -extern HIDDEN void __indirect_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q); -extern HIDDEN void __indirect_glTexCoord4sv(const GLshort * v); -extern HIDDEN void __indirect_glVertex2d(GLdouble x, GLdouble y); -extern HIDDEN void __indirect_glVertex2dv(const GLdouble * v); -extern HIDDEN void __indirect_glVertex2f(GLfloat x, GLfloat y); -extern HIDDEN void __indirect_glVertex2fv(const GLfloat * v); -extern HIDDEN void __indirect_glVertex2i(GLint x, GLint y); -extern HIDDEN void __indirect_glVertex2iv(const GLint * v); -extern HIDDEN void __indirect_glVertex2s(GLshort x, GLshort y); -extern HIDDEN void __indirect_glVertex2sv(const GLshort * v); -extern HIDDEN void __indirect_glVertex3d(GLdouble x, GLdouble y, GLdouble z); -extern HIDDEN void __indirect_glVertex3dv(const GLdouble * v); -extern HIDDEN void __indirect_glVertex3f(GLfloat x, GLfloat y, GLfloat z); -extern HIDDEN void __indirect_glVertex3fv(const GLfloat * v); -extern HIDDEN void __indirect_glVertex3i(GLint x, GLint y, GLint z); -extern HIDDEN void __indirect_glVertex3iv(const GLint * v); -extern HIDDEN void __indirect_glVertex3s(GLshort x, GLshort y, GLshort z); -extern HIDDEN void __indirect_glVertex3sv(const GLshort * v); -extern HIDDEN void __indirect_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -extern HIDDEN void __indirect_glVertex4dv(const GLdouble * v); -extern HIDDEN void __indirect_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -extern HIDDEN void __indirect_glVertex4fv(const GLfloat * v); -extern HIDDEN void __indirect_glVertex4i(GLint x, GLint y, GLint z, GLint w); -extern HIDDEN void __indirect_glVertex4iv(const GLint * v); -extern HIDDEN void __indirect_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w); -extern HIDDEN void __indirect_glVertex4sv(const GLshort * v); -extern HIDDEN void __indirect_glClipPlane(GLenum plane, const GLdouble * equation); -extern HIDDEN void __indirect_glColorMaterial(GLenum face, GLenum mode); -extern HIDDEN void __indirect_glCullFace(GLenum mode); -extern HIDDEN void __indirect_glFogf(GLenum pname, GLfloat param); -extern HIDDEN void __indirect_glFogfv(GLenum pname, const GLfloat * params); -extern HIDDEN void __indirect_glFogi(GLenum pname, GLint param); -extern HIDDEN void __indirect_glFogiv(GLenum pname, const GLint * params); -extern HIDDEN void __indirect_glFrontFace(GLenum mode); -extern HIDDEN void __indirect_glHint(GLenum target, GLenum mode); -extern HIDDEN void __indirect_glLightf(GLenum light, GLenum pname, GLfloat param); -extern HIDDEN void __indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params); -extern HIDDEN void __indirect_glLighti(GLenum light, GLenum pname, GLint param); -extern HIDDEN void __indirect_glLightiv(GLenum light, GLenum pname, const GLint * params); -extern HIDDEN void __indirect_glLightModelf(GLenum pname, GLfloat param); -extern HIDDEN void __indirect_glLightModelfv(GLenum pname, const GLfloat * params); -extern HIDDEN void __indirect_glLightModeli(GLenum pname, GLint param); -extern HIDDEN void __indirect_glLightModeliv(GLenum pname, const GLint * params); -extern HIDDEN void __indirect_glLineStipple(GLint factor, GLushort pattern); -extern HIDDEN void __indirect_glLineWidth(GLfloat width); -extern HIDDEN void __indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param); -extern HIDDEN void __indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params); -extern HIDDEN void __indirect_glMateriali(GLenum face, GLenum pname, GLint param); -extern HIDDEN void __indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params); -extern HIDDEN void __indirect_glPointSize(GLfloat size); -extern HIDDEN void __indirect_glPolygonMode(GLenum face, GLenum mode); -extern HIDDEN void __indirect_glPolygonStipple(const GLubyte * mask); -extern HIDDEN void __indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height); -extern HIDDEN void __indirect_glShadeModel(GLenum mode); -extern HIDDEN void __indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param); -extern HIDDEN void __indirect_glTexParameterfv(GLenum target, GLenum pname, const GLfloat * params); -extern HIDDEN void __indirect_glTexParameteri(GLenum target, GLenum pname, GLint param); -extern HIDDEN void __indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint * params); -extern HIDDEN void __indirect_glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels); -extern HIDDEN void __indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels); -extern HIDDEN void __indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param); -extern HIDDEN void __indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params); -extern HIDDEN void __indirect_glTexEnvi(GLenum target, GLenum pname, GLint param); -extern HIDDEN void __indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params); -extern HIDDEN void __indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param); -extern HIDDEN void __indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params); -extern HIDDEN void __indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param); -extern HIDDEN void __indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params); -extern HIDDEN void __indirect_glTexGeni(GLenum coord, GLenum pname, GLint param); -extern HIDDEN void __indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params); -extern HIDDEN void __indirect_glFeedbackBuffer(GLsizei size, GLenum type, GLfloat * buffer); -extern HIDDEN void __indirect_glSelectBuffer(GLsizei size, GLuint * buffer); -extern HIDDEN GLint __indirect_glRenderMode(GLenum mode); -extern HIDDEN void __indirect_glInitNames(void); -extern HIDDEN void __indirect_glLoadName(GLuint name); -extern HIDDEN void __indirect_glPassThrough(GLfloat token); -extern HIDDEN void __indirect_glPopName(void); -extern HIDDEN void __indirect_glPushName(GLuint name); -extern HIDDEN void __indirect_glDrawBuffer(GLenum mode); -extern HIDDEN void __indirect_glClear(GLbitfield mask); -extern HIDDEN void __indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -extern HIDDEN void __indirect_glClearIndex(GLfloat c); -extern HIDDEN void __indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -extern HIDDEN void __indirect_glClearStencil(GLint s); -extern HIDDEN void __indirect_glClearDepth(GLclampd depth); -extern HIDDEN void __indirect_glStencilMask(GLuint mask); -extern HIDDEN void __indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -extern HIDDEN void __indirect_glDepthMask(GLboolean flag); -extern HIDDEN void __indirect_glIndexMask(GLuint mask); -extern HIDDEN void __indirect_glAccum(GLenum op, GLfloat value); -extern HIDDEN void __indirect_glDisable(GLenum cap); -extern HIDDEN void __indirect_glEnable(GLenum cap); -extern HIDDEN void __indirect_glFinish(void); -extern HIDDEN void __indirect_glFlush(void); -extern HIDDEN void __indirect_glPopAttrib(void); -extern HIDDEN void __indirect_glPushAttrib(GLbitfield mask); -extern HIDDEN void __indirect_glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points); -extern HIDDEN void __indirect_glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points); -extern HIDDEN void __indirect_glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points); -extern HIDDEN void __indirect_glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points); -extern HIDDEN void __indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2); -extern HIDDEN void __indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2); -extern HIDDEN void __indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); -extern HIDDEN void __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); -extern HIDDEN void __indirect_glEvalCoord1d(GLdouble u); -extern HIDDEN void __indirect_glEvalCoord1dv(const GLdouble * u); -extern HIDDEN void __indirect_glEvalCoord1f(GLfloat u); -extern HIDDEN void __indirect_glEvalCoord1fv(const GLfloat * u); -extern HIDDEN void __indirect_glEvalCoord2d(GLdouble u, GLdouble v); -extern HIDDEN void __indirect_glEvalCoord2dv(const GLdouble * u); -extern HIDDEN void __indirect_glEvalCoord2f(GLfloat u, GLfloat v); -extern HIDDEN void __indirect_glEvalCoord2fv(const GLfloat * u); -extern HIDDEN void __indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2); -extern HIDDEN void __indirect_glEvalPoint1(GLint i); -extern HIDDEN void __indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); -extern HIDDEN void __indirect_glEvalPoint2(GLint i, GLint j); -extern HIDDEN void __indirect_glAlphaFunc(GLenum func, GLclampf ref); -extern HIDDEN void __indirect_glBlendFunc(GLenum sfactor, GLenum dfactor); -extern HIDDEN void __indirect_glLogicOp(GLenum opcode); -extern HIDDEN void __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask); -extern HIDDEN void __indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass); -extern HIDDEN void __indirect_glDepthFunc(GLenum func); -extern HIDDEN void __indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor); -extern HIDDEN void __indirect_glPixelTransferf(GLenum pname, GLfloat param); -extern HIDDEN void __indirect_glPixelTransferi(GLenum pname, GLint param); -extern HIDDEN void __indirect_glPixelStoref(GLenum pname, GLfloat param); -extern HIDDEN void __indirect_glPixelStorei(GLenum pname, GLint param); -extern HIDDEN void __indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values); -extern HIDDEN void __indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values); -extern HIDDEN void __indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values); -extern HIDDEN void __indirect_glReadBuffer(GLenum mode); -extern HIDDEN void __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); -extern HIDDEN void __indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels); -extern HIDDEN void __indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); -extern HIDDEN void __indirect_glGetBooleanv(GLenum pname, GLboolean * params); -extern HIDDEN void __indirect_glGetClipPlane(GLenum plane, GLdouble * equation); -extern HIDDEN void __indirect_glGetDoublev(GLenum pname, GLdouble * params); -extern HIDDEN GLenum __indirect_glGetError(void); -extern HIDDEN void __indirect_glGetFloatv(GLenum pname, GLfloat * params); -extern HIDDEN void __indirect_glGetIntegerv(GLenum pname, GLint * params); -extern HIDDEN void __indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params); -extern HIDDEN void __indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v); -extern HIDDEN void __indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v); -extern HIDDEN void __indirect_glGetMapiv(GLenum target, GLenum query, GLint * v); -extern HIDDEN void __indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params); -extern HIDDEN void __indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glGetPixelMapfv(GLenum map, GLfloat * values); -extern HIDDEN void __indirect_glGetPixelMapuiv(GLenum map, GLuint * values); -extern HIDDEN void __indirect_glGetPixelMapusv(GLenum map, GLushort * values); -extern HIDDEN void __indirect_glGetPolygonStipple(GLubyte * mask); -extern HIDDEN const GLubyte * __indirect_glGetString(GLenum name); -extern HIDDEN void __indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params); -extern HIDDEN void __indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params); -extern HIDDEN void __indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params); -extern HIDDEN void __indirect_glGetTexGeniv(GLenum coord, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels); -extern HIDDEN void __indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params); -extern HIDDEN void __indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat * params); -extern HIDDEN void __indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint * params); -extern HIDDEN GLboolean __indirect_glIsEnabled(GLenum cap); -extern HIDDEN GLboolean __indirect_glIsList(GLuint list); -extern HIDDEN void __indirect_glDepthRange(GLclampd zNear, GLclampd zFar); -extern HIDDEN void __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -extern HIDDEN void __indirect_glLoadIdentity(void); -extern HIDDEN void __indirect_glLoadMatrixf(const GLfloat * m); -extern HIDDEN void __indirect_glLoadMatrixd(const GLdouble * m); -extern HIDDEN void __indirect_glMatrixMode(GLenum mode); -extern HIDDEN void __indirect_glMultMatrixf(const GLfloat * m); -extern HIDDEN void __indirect_glMultMatrixd(const GLdouble * m); -extern HIDDEN void __indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -extern HIDDEN void __indirect_glPopMatrix(void); -extern HIDDEN void __indirect_glPushMatrix(void); -extern HIDDEN void __indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -extern HIDDEN void __indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -extern HIDDEN void __indirect_glScaled(GLdouble x, GLdouble y, GLdouble z); -extern HIDDEN void __indirect_glScalef(GLfloat x, GLfloat y, GLfloat z); -extern HIDDEN void __indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z); -extern HIDDEN void __indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z); -extern HIDDEN void __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height); -extern HIDDEN void __indirect_glArrayElement(GLint i); -extern HIDDEN void __indirect_glBindTexture(GLenum target, GLuint texture); -extern HIDDEN void __indirect_glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); -extern HIDDEN void __indirect_glDisableClientState(GLenum array); -extern HIDDEN void __indirect_glDrawArrays(GLenum mode, GLint first, GLsizei count); -extern HIDDEN void __indirect_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices); -extern HIDDEN void __indirect_glEdgeFlagPointer(GLsizei stride, const GLvoid * pointer); -extern HIDDEN void __indirect_glEnableClientState(GLenum array); -extern HIDDEN void __indirect_glIndexPointer(GLenum type, GLsizei stride, const GLvoid * pointer); -extern HIDDEN void __indirect_glIndexub(GLubyte c); -extern HIDDEN void __indirect_glIndexubv(const GLubyte * c); -extern HIDDEN void __indirect_glInterleavedArrays(GLenum format, GLsizei stride, const GLvoid * pointer); -extern HIDDEN void __indirect_glNormalPointer(GLenum type, GLsizei stride, const GLvoid * pointer); -extern HIDDEN void __indirect_glPolygonOffset(GLfloat factor, GLfloat units); -extern HIDDEN void __indirect_glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); -extern HIDDEN void __indirect_glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); -extern HIDDEN GLboolean __indirect_glAreTexturesResident(GLsizei n, const GLuint * textures, GLboolean * residences); -extern HIDDEN void __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -extern HIDDEN void __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -extern HIDDEN void __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -extern HIDDEN void __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -extern HIDDEN void __indirect_glDeleteTextures(GLsizei n, const GLuint * textures); -extern HIDDEN void __indirect_glGenTextures(GLsizei n, GLuint * textures); -extern HIDDEN void __indirect_glGetPointerv(GLenum pname, GLvoid ** params); -extern HIDDEN GLboolean __indirect_glIsTexture(GLuint texture); -extern HIDDEN void __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures, const GLclampf * priorities); -extern HIDDEN void __indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels); -extern HIDDEN void __indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); -extern HIDDEN void __indirect_glPopClientAttrib(void); -extern HIDDEN void __indirect_glPushClientAttrib(GLbitfield mask); -extern HIDDEN void __indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -extern HIDDEN void __indirect_glBlendEquation(GLenum mode); -extern HIDDEN void __indirect_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices); -extern HIDDEN void __indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); -extern HIDDEN void __indirect_glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat * params); -extern HIDDEN void __indirect_glColorTableParameteriv(GLenum target, GLenum pname, const GLint * params); -extern HIDDEN void __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -extern HIDDEN void __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid * table); -extern HIDDEN void __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat * params); -extern HIDDEN void __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); -extern HIDDEN void __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -extern HIDDEN void __indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image); -extern HIDDEN void __indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image); -extern HIDDEN void __indirect_glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params); -extern HIDDEN void __indirect_glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat * params); -extern HIDDEN void __indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params); -extern HIDDEN void __indirect_glConvolutionParameteriv(GLenum target, GLenum pname, const GLint * params); -extern HIDDEN void __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -extern HIDDEN void __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -extern HIDDEN void __indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid * image); -extern HIDDEN void __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat * params); -extern HIDDEN void __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glGetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); -extern HIDDEN void __indirect_glSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column); -extern HIDDEN void __indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); -extern HIDDEN void __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat * params); -extern HIDDEN void __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); -extern HIDDEN void __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat * params); -extern HIDDEN void __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -extern HIDDEN void __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink); -extern HIDDEN void __indirect_glResetHistogram(GLenum target); -extern HIDDEN void __indirect_glResetMinmax(GLenum target); -extern HIDDEN void __indirect_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); -extern HIDDEN void __indirect_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); -extern HIDDEN void __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -extern HIDDEN void __indirect_glActiveTextureARB(GLenum texture); -extern HIDDEN void __indirect_glClientActiveTextureARB(GLenum texture); -extern HIDDEN void __indirect_glMultiTexCoord1dARB(GLenum target, GLdouble s); -extern HIDDEN void __indirect_glMultiTexCoord1dvARB(GLenum target, const GLdouble * v); -extern HIDDEN void __indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s); -extern HIDDEN void __indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v); -extern HIDDEN void __indirect_glMultiTexCoord1iARB(GLenum target, GLint s); -extern HIDDEN void __indirect_glMultiTexCoord1ivARB(GLenum target, const GLint * v); -extern HIDDEN void __indirect_glMultiTexCoord1sARB(GLenum target, GLshort s); -extern HIDDEN void __indirect_glMultiTexCoord1svARB(GLenum target, const GLshort * v); -extern HIDDEN void __indirect_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t); -extern HIDDEN void __indirect_glMultiTexCoord2dvARB(GLenum target, const GLdouble * v); -extern HIDDEN void __indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t); -extern HIDDEN void __indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v); -extern HIDDEN void __indirect_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t); -extern HIDDEN void __indirect_glMultiTexCoord2ivARB(GLenum target, const GLint * v); -extern HIDDEN void __indirect_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t); -extern HIDDEN void __indirect_glMultiTexCoord2svARB(GLenum target, const GLshort * v); -extern HIDDEN void __indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r); -extern HIDDEN void __indirect_glMultiTexCoord3dvARB(GLenum target, const GLdouble * v); -extern HIDDEN void __indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r); -extern HIDDEN void __indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v); -extern HIDDEN void __indirect_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r); -extern HIDDEN void __indirect_glMultiTexCoord3ivARB(GLenum target, const GLint * v); -extern HIDDEN void __indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r); -extern HIDDEN void __indirect_glMultiTexCoord3svARB(GLenum target, const GLshort * v); -extern HIDDEN void __indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -extern HIDDEN void __indirect_glMultiTexCoord4dvARB(GLenum target, const GLdouble * v); -extern HIDDEN void __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -extern HIDDEN void __indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v); -extern HIDDEN void __indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q); -extern HIDDEN void __indirect_glMultiTexCoord4ivARB(GLenum target, const GLint * v); -extern HIDDEN void __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -extern HIDDEN void __indirect_glMultiTexCoord4svARB(GLenum target, const GLshort * v); -extern HIDDEN void __indirect_glLoadTransposeMatrixfARB(const GLfloat * m); -extern HIDDEN void __indirect_glLoadTransposeMatrixdARB(const GLdouble * m); -extern HIDDEN void __indirect_glMultTransposeMatrixfARB(const GLfloat * m); -extern HIDDEN void __indirect_glMultTransposeMatrixdARB(const GLdouble * m); -extern HIDDEN void __indirect_glSampleCoverageARB(GLclampf value, GLboolean invert); -extern HIDDEN void __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs); -extern HIDDEN GLboolean __indirect_glAreTexturesResidentEXT(GLsizei n, const GLuint * textures, GLboolean * residences); -extern HIDDEN void __indirect_glGenTexturesEXT(GLsizei n, GLuint * textures); -extern HIDDEN GLboolean __indirect_glIsTextureEXT(GLuint texture); -extern HIDDEN void __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert); -extern HIDDEN void __indirect_glSamplePatternSGIS(GLenum pattern); -extern HIDDEN void __indirect_glColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); -extern HIDDEN void __indirect_glEdgeFlagPointerEXT(GLsizei stride, GLsizei count, const GLboolean * pointer); -extern HIDDEN void __indirect_glIndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); -extern HIDDEN void __indirect_glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); -extern HIDDEN void __indirect_glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); -extern HIDDEN void __indirect_glVertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); -extern HIDDEN void __indirect_glPointParameterfEXT(GLenum pname, GLfloat param); -extern HIDDEN void __indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params); -extern HIDDEN void __indirect_glWindowPos2dMESA(GLdouble x, GLdouble y); -extern HIDDEN void __indirect_glWindowPos2dvMESA(const GLdouble * v); -extern HIDDEN void __indirect_glWindowPos2fMESA(GLfloat x, GLfloat y); -extern HIDDEN void __indirect_glWindowPos2fvMESA(const GLfloat * v); -extern HIDDEN void __indirect_glWindowPos2iMESA(GLint x, GLint y); -extern HIDDEN void __indirect_glWindowPos2ivMESA(const GLint * v); -extern HIDDEN void __indirect_glWindowPos2sMESA(GLshort x, GLshort y); -extern HIDDEN void __indirect_glWindowPos2svMESA(const GLshort * v); -extern HIDDEN void __indirect_glWindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z); -extern HIDDEN void __indirect_glWindowPos3dvMESA(const GLdouble * v); -extern HIDDEN void __indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z); -extern HIDDEN void __indirect_glWindowPos3fvMESA(const GLfloat * v); -extern HIDDEN void __indirect_glWindowPos3iMESA(GLint x, GLint y, GLint z); -extern HIDDEN void __indirect_glWindowPos3ivMESA(const GLint * v); -extern HIDDEN void __indirect_glWindowPos3sMESA(GLshort x, GLshort y, GLshort z); -extern HIDDEN void __indirect_glWindowPos3svMESA(const GLshort * v); -extern HIDDEN void __indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -extern HIDDEN void __indirect_glFogCoordfEXT(GLfloat coord); -extern HIDDEN void __indirect_glFogCoordfvEXT(const GLfloat * coord); -extern HIDDEN void __indirect_glFogCoorddEXT(GLdouble coord); -extern HIDDEN void __indirect_glFogCoorddvEXT(const GLdouble * coord); -extern HIDDEN void __indirect_glFogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid * pointer); -extern HIDDEN void __indirect_glCompressedTexImage3DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); -extern HIDDEN void __indirect_glCompressedTexImage2DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); -extern HIDDEN void __indirect_glCompressedTexImage1DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); -extern HIDDEN void __indirect_glCompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); -extern HIDDEN void __indirect_glCompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); -extern HIDDEN void __indirect_glCompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); -extern HIDDEN void __indirect_glGetCompressedTexImageARB(GLenum target, GLint level, GLvoid * img); -extern HIDDEN void __indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue); -extern HIDDEN void __indirect_glSecondaryColor3bvEXT(const GLbyte * v); -extern HIDDEN void __indirect_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue); -extern HIDDEN void __indirect_glSecondaryColor3dvEXT(const GLdouble * v); -extern HIDDEN void __indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue); -extern HIDDEN void __indirect_glSecondaryColor3fvEXT(const GLfloat * v); -extern HIDDEN void __indirect_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue); -extern HIDDEN void __indirect_glSecondaryColor3ivEXT(const GLint * v); -extern HIDDEN void __indirect_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue); -extern HIDDEN void __indirect_glSecondaryColor3svEXT(const GLshort * v); -extern HIDDEN void __indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue); -extern HIDDEN void __indirect_glSecondaryColor3ubvEXT(const GLubyte * v); -extern HIDDEN void __indirect_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue); -extern HIDDEN void __indirect_glSecondaryColor3uivEXT(const GLuint * v); -extern HIDDEN void __indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue); -extern HIDDEN void __indirect_glSecondaryColor3usvEXT(const GLushort * v); -extern HIDDEN void __indirect_glSecondaryColorPointerEXT(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); -extern HIDDEN GLboolean __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids, GLboolean * residences); -extern HIDDEN void __indirect_glBindProgramNV(GLenum target, GLuint program); -extern HIDDEN void __indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs); -extern HIDDEN void __indirect_glExecuteProgramNV(GLenum target, GLuint id, const GLfloat * params); -extern HIDDEN void __indirect_glGenProgramsNV(GLsizei n, GLuint * programs); -extern HIDDEN void __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble * params); -extern HIDDEN void __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat * params); -extern HIDDEN void __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program); -extern HIDDEN void __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glGetVertexAttribdvARB(GLuint index, GLenum pname, GLdouble * params); -extern HIDDEN void __indirect_glGetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat * params); -extern HIDDEN void __indirect_glGetVertexAttribivARB(GLuint index, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glGetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid ** params); -extern HIDDEN GLboolean __indirect_glIsProgramNV(GLuint program); -extern HIDDEN void __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program); -extern HIDDEN void __indirect_glProgramParameter4dNV(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -extern HIDDEN void __indirect_glProgramParameter4dvNV(GLenum target, GLuint index, const GLdouble * params); -extern HIDDEN void __indirect_glProgramParameter4fNV(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -extern HIDDEN void __indirect_glProgramParameter4fvNV(GLenum target, GLuint index, const GLfloat * params); -extern HIDDEN void __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble * params); -extern HIDDEN void __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num, const GLfloat * params); -extern HIDDEN void __indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids); -extern HIDDEN void __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform); -extern HIDDEN void __indirect_glVertexAttribPointerNV(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); -extern HIDDEN void __indirect_glVertexAttrib1dARB(GLuint index, GLdouble x); -extern HIDDEN void __indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v); -extern HIDDEN void __indirect_glVertexAttrib1fARB(GLuint index, GLfloat x); -extern HIDDEN void __indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v); -extern HIDDEN void __indirect_glVertexAttrib1sARB(GLuint index, GLshort x); -extern HIDDEN void __indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v); -extern HIDDEN void __indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y); -extern HIDDEN void __indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v); -extern HIDDEN void __indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y); -extern HIDDEN void __indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v); -extern HIDDEN void __indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y); -extern HIDDEN void __indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v); -extern HIDDEN void __indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z); -extern HIDDEN void __indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v); -extern HIDDEN void __indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z); -extern HIDDEN void __indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v); -extern HIDDEN void __indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z); -extern HIDDEN void __indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v); -extern HIDDEN void __indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -extern HIDDEN void __indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v); -extern HIDDEN void __indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -extern HIDDEN void __indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v); -extern HIDDEN void __indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -extern HIDDEN void __indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v); -extern HIDDEN void __indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -extern HIDDEN void __indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte * v); -extern HIDDEN void __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v); -extern HIDDEN void __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v); -extern HIDDEN void __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v); -extern HIDDEN void __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v); -extern HIDDEN void __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v); -extern HIDDEN void __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v); -extern HIDDEN void __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v); -extern HIDDEN void __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v); -extern HIDDEN void __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v); -extern HIDDEN void __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v); -extern HIDDEN void __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v); -extern HIDDEN void __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v); -extern HIDDEN void __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v); -extern HIDDEN void __indirect_glPointParameteriNV(GLenum pname, GLint param); -extern HIDDEN void __indirect_glPointParameterivNV(GLenum pname, const GLint * params); -extern HIDDEN void __indirect_glMultiDrawArraysEXT(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); -extern HIDDEN void __indirect_glMultiDrawElementsEXT(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); -extern HIDDEN void __indirect_glActiveStencilFaceEXT(GLenum face); -extern HIDDEN void __indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte * v); -extern HIDDEN void __indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v); -extern HIDDEN void __indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte * v); -extern HIDDEN void __indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v); -extern HIDDEN void __indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v); -extern HIDDEN void __indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte * v); -extern HIDDEN void __indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v); -extern HIDDEN void __indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v); -extern HIDDEN void __indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v); -extern HIDDEN void __indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v); -extern HIDDEN void __indirect_glVertexAttribPointerARB(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); -extern HIDDEN void __indirect_glEnableVertexAttribArrayARB(GLuint index); -extern HIDDEN void __indirect_glDisableVertexAttribArrayARB(GLuint index); -extern HIDDEN void __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string); -extern HIDDEN void __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -extern HIDDEN void __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdouble * params); -extern HIDDEN void __indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -extern HIDDEN void __indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index, const GLfloat * params); -extern HIDDEN void __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -extern HIDDEN void __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdouble * params); -extern HIDDEN void __indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -extern HIDDEN void __indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index, const GLfloat * params); -extern HIDDEN void __indirect_glGetProgramEnvParameterdvARB(GLenum target, GLuint index, GLdouble * params); -extern HIDDEN void __indirect_glGetProgramEnvParameterfvARB(GLenum target, GLuint index, GLfloat * params); -extern HIDDEN void __indirect_glGetProgramLocalParameterdvARB(GLenum target, GLuint index, GLdouble * params); -extern HIDDEN void __indirect_glGetProgramLocalParameterfvARB(GLenum target, GLuint index, GLfloat * params); -extern HIDDEN void __indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string); -extern HIDDEN void __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -extern HIDDEN void __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -extern HIDDEN void __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); -extern HIDDEN void __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); -extern HIDDEN void __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); -extern HIDDEN void __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); -extern HIDDEN void __indirect_glGenQueriesARB(GLsizei n, GLuint * ids); -extern HIDDEN void __indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids); -extern HIDDEN GLboolean __indirect_glIsQueryARB(GLuint id); -extern HIDDEN void __indirect_glBeginQueryARB(GLenum target, GLuint id); -extern HIDDEN void __indirect_glEndQueryARB(GLenum target); -extern HIDDEN void __indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params); -extern HIDDEN void __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble * params); -extern HIDDEN void __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params); -extern HIDDEN void __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x); -extern HIDDEN void __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v); -extern HIDDEN void __indirect_glVertexAttrib1fNV(GLuint index, GLfloat x); -extern HIDDEN void __indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v); -extern HIDDEN void __indirect_glVertexAttrib1sNV(GLuint index, GLshort x); -extern HIDDEN void __indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v); -extern HIDDEN void __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y); -extern HIDDEN void __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v); -extern HIDDEN void __indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y); -extern HIDDEN void __indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v); -extern HIDDEN void __indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y); -extern HIDDEN void __indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v); -extern HIDDEN void __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z); -extern HIDDEN void __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v); -extern HIDDEN void __indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z); -extern HIDDEN void __indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v); -extern HIDDEN void __indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z); -extern HIDDEN void __indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v); -extern HIDDEN void __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -extern HIDDEN void __indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v); -extern HIDDEN void __indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -extern HIDDEN void __indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v); -extern HIDDEN void __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -extern HIDDEN void __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v); -extern HIDDEN void __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -extern HIDDEN void __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v); -extern HIDDEN GLboolean __indirect_glIsRenderbufferEXT(GLuint renderbuffer); -extern HIDDEN void __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer); -extern HIDDEN void __indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers); -extern HIDDEN void __indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers); -extern HIDDEN void __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -extern HIDDEN void __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint * params); -extern HIDDEN GLboolean __indirect_glIsFramebufferEXT(GLuint framebuffer); -extern HIDDEN void __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer); -extern HIDDEN void __indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers); -extern HIDDEN void __indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers); -extern HIDDEN GLenum __indirect_glCheckFramebufferStatusEXT(GLenum target); -extern HIDDEN void __indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -extern HIDDEN void __indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -extern HIDDEN void __indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -extern HIDDEN void __indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -extern HIDDEN void __indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint * params); -extern HIDDEN void __indirect_glGenerateMipmapEXT(GLenum target); - -# undef HIDDEN -# undef FASTCALL -# undef NOINLINE - -#endif /* !defined( _INDIRECT_H_ ) */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_init.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_init.c deleted file mode 100644 index 6627edfebd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_init.c +++ /dev/null @@ -1,779 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_send.py (from Mesa) script */ - -/* - * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * PRECISION INSIGHT, IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * \file indirect_init.c - * Initialize indirect rendering dispatch table. - * - * \author Kevin E. Martin - * \author Brian Paul - * \author Ian Romanick - */ - -#include "indirect_init.h" -#include "indirect.h" -#include "glapi.h" - - -/** - * No-op function used to initialize functions that have no GLX protocol - * support. - */ -static int NoOp(void) -{ - return 0; -} - -/** - * Create and initialize a new GL dispatch table. The table is initialized - * with GLX indirect rendering protocol functions. - */ -__GLapi * __glXNewIndirectAPI( void ) -{ - __GLapi *glAPI; - GLuint entries; - - entries = _glapi_get_dispatch_table_size(); - glAPI = (__GLapi *) Xmalloc(entries * sizeof(void *)); - - /* first, set all entries to point to no-op functions */ - { - int i; - void **dispatch = (void **) glAPI; - for (i = 0; i < entries; i++) { - dispatch[i] = (void *) NoOp; - } - } - - /* now, initialize the entries we understand */ - - /* 1.0 */ - - glAPI->NewList = __indirect_glNewList; - glAPI->EndList = __indirect_glEndList; - glAPI->CallList = __indirect_glCallList; - glAPI->CallLists = __indirect_glCallLists; - glAPI->DeleteLists = __indirect_glDeleteLists; - glAPI->GenLists = __indirect_glGenLists; - glAPI->ListBase = __indirect_glListBase; - glAPI->Begin = __indirect_glBegin; - glAPI->Bitmap = __indirect_glBitmap; - glAPI->Color3b = __indirect_glColor3b; - glAPI->Color3bv = __indirect_glColor3bv; - glAPI->Color3d = __indirect_glColor3d; - glAPI->Color3dv = __indirect_glColor3dv; - glAPI->Color3f = __indirect_glColor3f; - glAPI->Color3fv = __indirect_glColor3fv; - glAPI->Color3i = __indirect_glColor3i; - glAPI->Color3iv = __indirect_glColor3iv; - glAPI->Color3s = __indirect_glColor3s; - glAPI->Color3sv = __indirect_glColor3sv; - glAPI->Color3ub = __indirect_glColor3ub; - glAPI->Color3ubv = __indirect_glColor3ubv; - glAPI->Color3ui = __indirect_glColor3ui; - glAPI->Color3uiv = __indirect_glColor3uiv; - glAPI->Color3us = __indirect_glColor3us; - glAPI->Color3usv = __indirect_glColor3usv; - glAPI->Color4b = __indirect_glColor4b; - glAPI->Color4bv = __indirect_glColor4bv; - glAPI->Color4d = __indirect_glColor4d; - glAPI->Color4dv = __indirect_glColor4dv; - glAPI->Color4f = __indirect_glColor4f; - glAPI->Color4fv = __indirect_glColor4fv; - glAPI->Color4i = __indirect_glColor4i; - glAPI->Color4iv = __indirect_glColor4iv; - glAPI->Color4s = __indirect_glColor4s; - glAPI->Color4sv = __indirect_glColor4sv; - glAPI->Color4ub = __indirect_glColor4ub; - glAPI->Color4ubv = __indirect_glColor4ubv; - glAPI->Color4ui = __indirect_glColor4ui; - glAPI->Color4uiv = __indirect_glColor4uiv; - glAPI->Color4us = __indirect_glColor4us; - glAPI->Color4usv = __indirect_glColor4usv; - glAPI->EdgeFlag = __indirect_glEdgeFlag; - glAPI->EdgeFlagv = __indirect_glEdgeFlagv; - glAPI->End = __indirect_glEnd; - glAPI->Indexd = __indirect_glIndexd; - glAPI->Indexdv = __indirect_glIndexdv; - glAPI->Indexf = __indirect_glIndexf; - glAPI->Indexfv = __indirect_glIndexfv; - glAPI->Indexi = __indirect_glIndexi; - glAPI->Indexiv = __indirect_glIndexiv; - glAPI->Indexs = __indirect_glIndexs; - glAPI->Indexsv = __indirect_glIndexsv; - glAPI->Normal3b = __indirect_glNormal3b; - glAPI->Normal3bv = __indirect_glNormal3bv; - glAPI->Normal3d = __indirect_glNormal3d; - glAPI->Normal3dv = __indirect_glNormal3dv; - glAPI->Normal3f = __indirect_glNormal3f; - glAPI->Normal3fv = __indirect_glNormal3fv; - glAPI->Normal3i = __indirect_glNormal3i; - glAPI->Normal3iv = __indirect_glNormal3iv; - glAPI->Normal3s = __indirect_glNormal3s; - glAPI->Normal3sv = __indirect_glNormal3sv; - glAPI->RasterPos2d = __indirect_glRasterPos2d; - glAPI->RasterPos2dv = __indirect_glRasterPos2dv; - glAPI->RasterPos2f = __indirect_glRasterPos2f; - glAPI->RasterPos2fv = __indirect_glRasterPos2fv; - glAPI->RasterPos2i = __indirect_glRasterPos2i; - glAPI->RasterPos2iv = __indirect_glRasterPos2iv; - glAPI->RasterPos2s = __indirect_glRasterPos2s; - glAPI->RasterPos2sv = __indirect_glRasterPos2sv; - glAPI->RasterPos3d = __indirect_glRasterPos3d; - glAPI->RasterPos3dv = __indirect_glRasterPos3dv; - glAPI->RasterPos3f = __indirect_glRasterPos3f; - glAPI->RasterPos3fv = __indirect_glRasterPos3fv; - glAPI->RasterPos3i = __indirect_glRasterPos3i; - glAPI->RasterPos3iv = __indirect_glRasterPos3iv; - glAPI->RasterPos3s = __indirect_glRasterPos3s; - glAPI->RasterPos3sv = __indirect_glRasterPos3sv; - glAPI->RasterPos4d = __indirect_glRasterPos4d; - glAPI->RasterPos4dv = __indirect_glRasterPos4dv; - glAPI->RasterPos4f = __indirect_glRasterPos4f; - glAPI->RasterPos4fv = __indirect_glRasterPos4fv; - glAPI->RasterPos4i = __indirect_glRasterPos4i; - glAPI->RasterPos4iv = __indirect_glRasterPos4iv; - glAPI->RasterPos4s = __indirect_glRasterPos4s; - glAPI->RasterPos4sv = __indirect_glRasterPos4sv; - glAPI->Rectd = __indirect_glRectd; - glAPI->Rectdv = __indirect_glRectdv; - glAPI->Rectf = __indirect_glRectf; - glAPI->Rectfv = __indirect_glRectfv; - glAPI->Recti = __indirect_glRecti; - glAPI->Rectiv = __indirect_glRectiv; - glAPI->Rects = __indirect_glRects; - glAPI->Rectsv = __indirect_glRectsv; - glAPI->TexCoord1d = __indirect_glTexCoord1d; - glAPI->TexCoord1dv = __indirect_glTexCoord1dv; - glAPI->TexCoord1f = __indirect_glTexCoord1f; - glAPI->TexCoord1fv = __indirect_glTexCoord1fv; - glAPI->TexCoord1i = __indirect_glTexCoord1i; - glAPI->TexCoord1iv = __indirect_glTexCoord1iv; - glAPI->TexCoord1s = __indirect_glTexCoord1s; - glAPI->TexCoord1sv = __indirect_glTexCoord1sv; - glAPI->TexCoord2d = __indirect_glTexCoord2d; - glAPI->TexCoord2dv = __indirect_glTexCoord2dv; - glAPI->TexCoord2f = __indirect_glTexCoord2f; - glAPI->TexCoord2fv = __indirect_glTexCoord2fv; - glAPI->TexCoord2i = __indirect_glTexCoord2i; - glAPI->TexCoord2iv = __indirect_glTexCoord2iv; - glAPI->TexCoord2s = __indirect_glTexCoord2s; - glAPI->TexCoord2sv = __indirect_glTexCoord2sv; - glAPI->TexCoord3d = __indirect_glTexCoord3d; - glAPI->TexCoord3dv = __indirect_glTexCoord3dv; - glAPI->TexCoord3f = __indirect_glTexCoord3f; - glAPI->TexCoord3fv = __indirect_glTexCoord3fv; - glAPI->TexCoord3i = __indirect_glTexCoord3i; - glAPI->TexCoord3iv = __indirect_glTexCoord3iv; - glAPI->TexCoord3s = __indirect_glTexCoord3s; - glAPI->TexCoord3sv = __indirect_glTexCoord3sv; - glAPI->TexCoord4d = __indirect_glTexCoord4d; - glAPI->TexCoord4dv = __indirect_glTexCoord4dv; - glAPI->TexCoord4f = __indirect_glTexCoord4f; - glAPI->TexCoord4fv = __indirect_glTexCoord4fv; - glAPI->TexCoord4i = __indirect_glTexCoord4i; - glAPI->TexCoord4iv = __indirect_glTexCoord4iv; - glAPI->TexCoord4s = __indirect_glTexCoord4s; - glAPI->TexCoord4sv = __indirect_glTexCoord4sv; - glAPI->Vertex2d = __indirect_glVertex2d; - glAPI->Vertex2dv = __indirect_glVertex2dv; - glAPI->Vertex2f = __indirect_glVertex2f; - glAPI->Vertex2fv = __indirect_glVertex2fv; - glAPI->Vertex2i = __indirect_glVertex2i; - glAPI->Vertex2iv = __indirect_glVertex2iv; - glAPI->Vertex2s = __indirect_glVertex2s; - glAPI->Vertex2sv = __indirect_glVertex2sv; - glAPI->Vertex3d = __indirect_glVertex3d; - glAPI->Vertex3dv = __indirect_glVertex3dv; - glAPI->Vertex3f = __indirect_glVertex3f; - glAPI->Vertex3fv = __indirect_glVertex3fv; - glAPI->Vertex3i = __indirect_glVertex3i; - glAPI->Vertex3iv = __indirect_glVertex3iv; - glAPI->Vertex3s = __indirect_glVertex3s; - glAPI->Vertex3sv = __indirect_glVertex3sv; - glAPI->Vertex4d = __indirect_glVertex4d; - glAPI->Vertex4dv = __indirect_glVertex4dv; - glAPI->Vertex4f = __indirect_glVertex4f; - glAPI->Vertex4fv = __indirect_glVertex4fv; - glAPI->Vertex4i = __indirect_glVertex4i; - glAPI->Vertex4iv = __indirect_glVertex4iv; - glAPI->Vertex4s = __indirect_glVertex4s; - glAPI->Vertex4sv = __indirect_glVertex4sv; - glAPI->ClipPlane = __indirect_glClipPlane; - glAPI->ColorMaterial = __indirect_glColorMaterial; - glAPI->CullFace = __indirect_glCullFace; - glAPI->Fogf = __indirect_glFogf; - glAPI->Fogfv = __indirect_glFogfv; - glAPI->Fogi = __indirect_glFogi; - glAPI->Fogiv = __indirect_glFogiv; - glAPI->FrontFace = __indirect_glFrontFace; - glAPI->Hint = __indirect_glHint; - glAPI->Lightf = __indirect_glLightf; - glAPI->Lightfv = __indirect_glLightfv; - glAPI->Lighti = __indirect_glLighti; - glAPI->Lightiv = __indirect_glLightiv; - glAPI->LightModelf = __indirect_glLightModelf; - glAPI->LightModelfv = __indirect_glLightModelfv; - glAPI->LightModeli = __indirect_glLightModeli; - glAPI->LightModeliv = __indirect_glLightModeliv; - glAPI->LineStipple = __indirect_glLineStipple; - glAPI->LineWidth = __indirect_glLineWidth; - glAPI->Materialf = __indirect_glMaterialf; - glAPI->Materialfv = __indirect_glMaterialfv; - glAPI->Materiali = __indirect_glMateriali; - glAPI->Materialiv = __indirect_glMaterialiv; - glAPI->PointSize = __indirect_glPointSize; - glAPI->PolygonMode = __indirect_glPolygonMode; - glAPI->PolygonStipple = __indirect_glPolygonStipple; - glAPI->Scissor = __indirect_glScissor; - glAPI->ShadeModel = __indirect_glShadeModel; - glAPI->TexParameterf = __indirect_glTexParameterf; - glAPI->TexParameterfv = __indirect_glTexParameterfv; - glAPI->TexParameteri = __indirect_glTexParameteri; - glAPI->TexParameteriv = __indirect_glTexParameteriv; - glAPI->TexImage1D = __indirect_glTexImage1D; - glAPI->TexImage2D = __indirect_glTexImage2D; - glAPI->TexEnvf = __indirect_glTexEnvf; - glAPI->TexEnvfv = __indirect_glTexEnvfv; - glAPI->TexEnvi = __indirect_glTexEnvi; - glAPI->TexEnviv = __indirect_glTexEnviv; - glAPI->TexGend = __indirect_glTexGend; - glAPI->TexGendv = __indirect_glTexGendv; - glAPI->TexGenf = __indirect_glTexGenf; - glAPI->TexGenfv = __indirect_glTexGenfv; - glAPI->TexGeni = __indirect_glTexGeni; - glAPI->TexGeniv = __indirect_glTexGeniv; - glAPI->FeedbackBuffer = __indirect_glFeedbackBuffer; - glAPI->SelectBuffer = __indirect_glSelectBuffer; - glAPI->RenderMode = __indirect_glRenderMode; - glAPI->InitNames = __indirect_glInitNames; - glAPI->LoadName = __indirect_glLoadName; - glAPI->PassThrough = __indirect_glPassThrough; - glAPI->PopName = __indirect_glPopName; - glAPI->PushName = __indirect_glPushName; - glAPI->DrawBuffer = __indirect_glDrawBuffer; - glAPI->Clear = __indirect_glClear; - glAPI->ClearAccum = __indirect_glClearAccum; - glAPI->ClearIndex = __indirect_glClearIndex; - glAPI->ClearColor = __indirect_glClearColor; - glAPI->ClearStencil = __indirect_glClearStencil; - glAPI->ClearDepth = __indirect_glClearDepth; - glAPI->StencilMask = __indirect_glStencilMask; - glAPI->ColorMask = __indirect_glColorMask; - glAPI->DepthMask = __indirect_glDepthMask; - glAPI->IndexMask = __indirect_glIndexMask; - glAPI->Accum = __indirect_glAccum; - glAPI->Disable = __indirect_glDisable; - glAPI->Enable = __indirect_glEnable; - glAPI->Finish = __indirect_glFinish; - glAPI->Flush = __indirect_glFlush; - glAPI->PopAttrib = __indirect_glPopAttrib; - glAPI->PushAttrib = __indirect_glPushAttrib; - glAPI->Map1d = __indirect_glMap1d; - glAPI->Map1f = __indirect_glMap1f; - glAPI->Map2d = __indirect_glMap2d; - glAPI->Map2f = __indirect_glMap2f; - glAPI->MapGrid1d = __indirect_glMapGrid1d; - glAPI->MapGrid1f = __indirect_glMapGrid1f; - glAPI->MapGrid2d = __indirect_glMapGrid2d; - glAPI->MapGrid2f = __indirect_glMapGrid2f; - glAPI->EvalCoord1d = __indirect_glEvalCoord1d; - glAPI->EvalCoord1dv = __indirect_glEvalCoord1dv; - glAPI->EvalCoord1f = __indirect_glEvalCoord1f; - glAPI->EvalCoord1fv = __indirect_glEvalCoord1fv; - glAPI->EvalCoord2d = __indirect_glEvalCoord2d; - glAPI->EvalCoord2dv = __indirect_glEvalCoord2dv; - glAPI->EvalCoord2f = __indirect_glEvalCoord2f; - glAPI->EvalCoord2fv = __indirect_glEvalCoord2fv; - glAPI->EvalMesh1 = __indirect_glEvalMesh1; - glAPI->EvalPoint1 = __indirect_glEvalPoint1; - glAPI->EvalMesh2 = __indirect_glEvalMesh2; - glAPI->EvalPoint2 = __indirect_glEvalPoint2; - glAPI->AlphaFunc = __indirect_glAlphaFunc; - glAPI->BlendFunc = __indirect_glBlendFunc; - glAPI->LogicOp = __indirect_glLogicOp; - glAPI->StencilFunc = __indirect_glStencilFunc; - glAPI->StencilOp = __indirect_glStencilOp; - glAPI->DepthFunc = __indirect_glDepthFunc; - glAPI->PixelZoom = __indirect_glPixelZoom; - glAPI->PixelTransferf = __indirect_glPixelTransferf; - glAPI->PixelTransferi = __indirect_glPixelTransferi; - glAPI->PixelStoref = __indirect_glPixelStoref; - glAPI->PixelStorei = __indirect_glPixelStorei; - glAPI->PixelMapfv = __indirect_glPixelMapfv; - glAPI->PixelMapuiv = __indirect_glPixelMapuiv; - glAPI->PixelMapusv = __indirect_glPixelMapusv; - glAPI->ReadBuffer = __indirect_glReadBuffer; - glAPI->CopyPixels = __indirect_glCopyPixels; - glAPI->ReadPixels = __indirect_glReadPixels; - glAPI->DrawPixels = __indirect_glDrawPixels; - glAPI->GetBooleanv = __indirect_glGetBooleanv; - glAPI->GetClipPlane = __indirect_glGetClipPlane; - glAPI->GetDoublev = __indirect_glGetDoublev; - glAPI->GetError = __indirect_glGetError; - glAPI->GetFloatv = __indirect_glGetFloatv; - glAPI->GetIntegerv = __indirect_glGetIntegerv; - glAPI->GetLightfv = __indirect_glGetLightfv; - glAPI->GetLightiv = __indirect_glGetLightiv; - glAPI->GetMapdv = __indirect_glGetMapdv; - glAPI->GetMapfv = __indirect_glGetMapfv; - glAPI->GetMapiv = __indirect_glGetMapiv; - glAPI->GetMaterialfv = __indirect_glGetMaterialfv; - glAPI->GetMaterialiv = __indirect_glGetMaterialiv; - glAPI->GetPixelMapfv = __indirect_glGetPixelMapfv; - glAPI->GetPixelMapuiv = __indirect_glGetPixelMapuiv; - glAPI->GetPixelMapusv = __indirect_glGetPixelMapusv; - glAPI->GetPolygonStipple = __indirect_glGetPolygonStipple; - glAPI->GetString = __indirect_glGetString; - glAPI->GetTexEnvfv = __indirect_glGetTexEnvfv; - glAPI->GetTexEnviv = __indirect_glGetTexEnviv; - glAPI->GetTexGendv = __indirect_glGetTexGendv; - glAPI->GetTexGenfv = __indirect_glGetTexGenfv; - glAPI->GetTexGeniv = __indirect_glGetTexGeniv; - glAPI->GetTexImage = __indirect_glGetTexImage; - glAPI->GetTexParameterfv = __indirect_glGetTexParameterfv; - glAPI->GetTexParameteriv = __indirect_glGetTexParameteriv; - glAPI->GetTexLevelParameterfv = __indirect_glGetTexLevelParameterfv; - glAPI->GetTexLevelParameteriv = __indirect_glGetTexLevelParameteriv; - glAPI->IsEnabled = __indirect_glIsEnabled; - glAPI->IsList = __indirect_glIsList; - glAPI->DepthRange = __indirect_glDepthRange; - glAPI->Frustum = __indirect_glFrustum; - glAPI->LoadIdentity = __indirect_glLoadIdentity; - glAPI->LoadMatrixf = __indirect_glLoadMatrixf; - glAPI->LoadMatrixd = __indirect_glLoadMatrixd; - glAPI->MatrixMode = __indirect_glMatrixMode; - glAPI->MultMatrixf = __indirect_glMultMatrixf; - glAPI->MultMatrixd = __indirect_glMultMatrixd; - glAPI->Ortho = __indirect_glOrtho; - glAPI->PopMatrix = __indirect_glPopMatrix; - glAPI->PushMatrix = __indirect_glPushMatrix; - glAPI->Rotated = __indirect_glRotated; - glAPI->Rotatef = __indirect_glRotatef; - glAPI->Scaled = __indirect_glScaled; - glAPI->Scalef = __indirect_glScalef; - glAPI->Translated = __indirect_glTranslated; - glAPI->Translatef = __indirect_glTranslatef; - glAPI->Viewport = __indirect_glViewport; - - /* 1.1 */ - - glAPI->ArrayElement = __indirect_glArrayElement; - glAPI->BindTexture = __indirect_glBindTexture; - glAPI->ColorPointer = __indirect_glColorPointer; - glAPI->DisableClientState = __indirect_glDisableClientState; - glAPI->DrawArrays = __indirect_glDrawArrays; - glAPI->DrawElements = __indirect_glDrawElements; - glAPI->EdgeFlagPointer = __indirect_glEdgeFlagPointer; - glAPI->EnableClientState = __indirect_glEnableClientState; - glAPI->IndexPointer = __indirect_glIndexPointer; - glAPI->Indexub = __indirect_glIndexub; - glAPI->Indexubv = __indirect_glIndexubv; - glAPI->InterleavedArrays = __indirect_glInterleavedArrays; - glAPI->NormalPointer = __indirect_glNormalPointer; - glAPI->PolygonOffset = __indirect_glPolygonOffset; - glAPI->TexCoordPointer = __indirect_glTexCoordPointer; - glAPI->VertexPointer = __indirect_glVertexPointer; - glAPI->AreTexturesResident = __indirect_glAreTexturesResident; - glAPI->CopyTexImage1D = __indirect_glCopyTexImage1D; - glAPI->CopyTexImage2D = __indirect_glCopyTexImage2D; - glAPI->CopyTexSubImage1D = __indirect_glCopyTexSubImage1D; - glAPI->CopyTexSubImage2D = __indirect_glCopyTexSubImage2D; - glAPI->DeleteTextures = __indirect_glDeleteTextures; - glAPI->GenTextures = __indirect_glGenTextures; - glAPI->GetPointerv = __indirect_glGetPointerv; - glAPI->IsTexture = __indirect_glIsTexture; - glAPI->PrioritizeTextures = __indirect_glPrioritizeTextures; - glAPI->TexSubImage1D = __indirect_glTexSubImage1D; - glAPI->TexSubImage2D = __indirect_glTexSubImage2D; - glAPI->PopClientAttrib = __indirect_glPopClientAttrib; - glAPI->PushClientAttrib = __indirect_glPushClientAttrib; - - /* 1.2 */ - - glAPI->BlendColor = __indirect_glBlendColor; - glAPI->BlendEquation = __indirect_glBlendEquation; - glAPI->DrawRangeElements = __indirect_glDrawRangeElements; - glAPI->ColorTable = __indirect_glColorTable; - glAPI->ColorTableParameterfv = __indirect_glColorTableParameterfv; - glAPI->ColorTableParameteriv = __indirect_glColorTableParameteriv; - glAPI->CopyColorTable = __indirect_glCopyColorTable; - glAPI->GetColorTable = __indirect_glGetColorTable; - glAPI->GetColorTableParameterfv = __indirect_glGetColorTableParameterfv; - glAPI->GetColorTableParameteriv = __indirect_glGetColorTableParameteriv; - glAPI->ColorSubTable = __indirect_glColorSubTable; - glAPI->CopyColorSubTable = __indirect_glCopyColorSubTable; - glAPI->ConvolutionFilter1D = __indirect_glConvolutionFilter1D; - glAPI->ConvolutionFilter2D = __indirect_glConvolutionFilter2D; - glAPI->ConvolutionParameterf = __indirect_glConvolutionParameterf; - glAPI->ConvolutionParameterfv = __indirect_glConvolutionParameterfv; - glAPI->ConvolutionParameteri = __indirect_glConvolutionParameteri; - glAPI->ConvolutionParameteriv = __indirect_glConvolutionParameteriv; - glAPI->CopyConvolutionFilter1D = __indirect_glCopyConvolutionFilter1D; - glAPI->CopyConvolutionFilter2D = __indirect_glCopyConvolutionFilter2D; - glAPI->GetConvolutionFilter = __indirect_glGetConvolutionFilter; - glAPI->GetConvolutionParameterfv = __indirect_glGetConvolutionParameterfv; - glAPI->GetConvolutionParameteriv = __indirect_glGetConvolutionParameteriv; - glAPI->GetSeparableFilter = __indirect_glGetSeparableFilter; - glAPI->SeparableFilter2D = __indirect_glSeparableFilter2D; - glAPI->GetHistogram = __indirect_glGetHistogram; - glAPI->GetHistogramParameterfv = __indirect_glGetHistogramParameterfv; - glAPI->GetHistogramParameteriv = __indirect_glGetHistogramParameteriv; - glAPI->GetMinmax = __indirect_glGetMinmax; - glAPI->GetMinmaxParameterfv = __indirect_glGetMinmaxParameterfv; - glAPI->GetMinmaxParameteriv = __indirect_glGetMinmaxParameteriv; - glAPI->Histogram = __indirect_glHistogram; - glAPI->Minmax = __indirect_glMinmax; - glAPI->ResetHistogram = __indirect_glResetHistogram; - glAPI->ResetMinmax = __indirect_glResetMinmax; - glAPI->TexImage3D = __indirect_glTexImage3D; - glAPI->TexSubImage3D = __indirect_glTexSubImage3D; - glAPI->CopyTexSubImage3D = __indirect_glCopyTexSubImage3D; - - /* 1. GL_ARB_multitexture */ - - glAPI->MultiTexCoord2dARB = __indirect_glMultiTexCoord2dARB; - glAPI->MultiTexCoord2dvARB = __indirect_glMultiTexCoord2dvARB; - glAPI->MultiTexCoord2fARB = __indirect_glMultiTexCoord2fARB; - glAPI->MultiTexCoord2fvARB = __indirect_glMultiTexCoord2fvARB; - glAPI->MultiTexCoord2iARB = __indirect_glMultiTexCoord2iARB; - glAPI->MultiTexCoord2ivARB = __indirect_glMultiTexCoord2ivARB; - glAPI->MultiTexCoord2sARB = __indirect_glMultiTexCoord2sARB; - glAPI->MultiTexCoord2svARB = __indirect_glMultiTexCoord2svARB; - glAPI->MultiTexCoord3dARB = __indirect_glMultiTexCoord3dARB; - glAPI->MultiTexCoord3dvARB = __indirect_glMultiTexCoord3dvARB; - glAPI->MultiTexCoord3fARB = __indirect_glMultiTexCoord3fARB; - glAPI->MultiTexCoord3fvARB = __indirect_glMultiTexCoord3fvARB; - glAPI->MultiTexCoord3iARB = __indirect_glMultiTexCoord3iARB; - glAPI->MultiTexCoord3ivARB = __indirect_glMultiTexCoord3ivARB; - glAPI->MultiTexCoord3sARB = __indirect_glMultiTexCoord3sARB; - glAPI->MultiTexCoord3svARB = __indirect_glMultiTexCoord3svARB; - glAPI->MultiTexCoord4dARB = __indirect_glMultiTexCoord4dARB; - glAPI->MultiTexCoord4dvARB = __indirect_glMultiTexCoord4dvARB; - glAPI->MultiTexCoord4fARB = __indirect_glMultiTexCoord4fARB; - glAPI->MultiTexCoord4fvARB = __indirect_glMultiTexCoord4fvARB; - glAPI->MultiTexCoord4iARB = __indirect_glMultiTexCoord4iARB; - glAPI->MultiTexCoord4ivARB = __indirect_glMultiTexCoord4ivARB; - glAPI->MultiTexCoord4sARB = __indirect_glMultiTexCoord4sARB; - glAPI->MultiTexCoord4svARB = __indirect_glMultiTexCoord4svARB; - glAPI->ActiveTextureARB = __indirect_glActiveTextureARB; - glAPI->ClientActiveTextureARB = __indirect_glClientActiveTextureARB; - glAPI->MultiTexCoord1dARB = __indirect_glMultiTexCoord1dARB; - glAPI->MultiTexCoord1dvARB = __indirect_glMultiTexCoord1dvARB; - glAPI->MultiTexCoord1fARB = __indirect_glMultiTexCoord1fARB; - glAPI->MultiTexCoord1fvARB = __indirect_glMultiTexCoord1fvARB; - glAPI->MultiTexCoord1iARB = __indirect_glMultiTexCoord1iARB; - glAPI->MultiTexCoord1ivARB = __indirect_glMultiTexCoord1ivARB; - glAPI->MultiTexCoord1sARB = __indirect_glMultiTexCoord1sARB; - glAPI->MultiTexCoord1svARB = __indirect_glMultiTexCoord1svARB; - - /* 3. GL_ARB_transpose_matrix */ - - glAPI->LoadTransposeMatrixfARB = __indirect_glLoadTransposeMatrixfARB; - glAPI->LoadTransposeMatrixdARB = __indirect_glLoadTransposeMatrixdARB; - glAPI->MultTransposeMatrixfARB = __indirect_glMultTransposeMatrixfARB; - glAPI->MultTransposeMatrixdARB = __indirect_glMultTransposeMatrixdARB; - - /* 5. GL_ARB_multisample */ - - glAPI->SampleCoverageARB = __indirect_glSampleCoverageARB; - - /* 12. GL_ARB_texture_compression */ - - glAPI->CompressedTexImage3DARB = __indirect_glCompressedTexImage3DARB; - glAPI->CompressedTexImage2DARB = __indirect_glCompressedTexImage2DARB; - glAPI->CompressedTexImage1DARB = __indirect_glCompressedTexImage1DARB; - glAPI->CompressedTexSubImage3DARB = __indirect_glCompressedTexSubImage3DARB; - glAPI->CompressedTexSubImage2DARB = __indirect_glCompressedTexSubImage2DARB; - glAPI->CompressedTexSubImage1DARB = __indirect_glCompressedTexSubImage1DARB; - glAPI->GetCompressedTexImageARB = __indirect_glGetCompressedTexImageARB; - - /* 26. GL_ARB_vertex_program */ - - glAPI->VertexAttrib4bvARB = __indirect_glVertexAttrib4bvARB; - glAPI->VertexAttrib4ivARB = __indirect_glVertexAttrib4ivARB; - glAPI->VertexAttrib4ubvARB = __indirect_glVertexAttrib4ubvARB; - glAPI->VertexAttrib4usvARB = __indirect_glVertexAttrib4usvARB; - glAPI->VertexAttrib4uivARB = __indirect_glVertexAttrib4uivARB; - glAPI->VertexAttrib4NbvARB = __indirect_glVertexAttrib4NbvARB; - glAPI->VertexAttrib4NsvARB = __indirect_glVertexAttrib4NsvARB; - glAPI->VertexAttrib4NivARB = __indirect_glVertexAttrib4NivARB; - glAPI->VertexAttrib4NusvARB = __indirect_glVertexAttrib4NusvARB; - glAPI->VertexAttrib4NuivARB = __indirect_glVertexAttrib4NuivARB; - glAPI->VertexAttribPointerARB = __indirect_glVertexAttribPointerARB; - glAPI->EnableVertexAttribArrayARB = __indirect_glEnableVertexAttribArrayARB; - glAPI->DisableVertexAttribArrayARB = __indirect_glDisableVertexAttribArrayARB; - glAPI->ProgramStringARB = __indirect_glProgramStringARB; - glAPI->ProgramEnvParameter4dARB = __indirect_glProgramEnvParameter4dARB; - glAPI->ProgramEnvParameter4dvARB = __indirect_glProgramEnvParameter4dvARB; - glAPI->ProgramEnvParameter4fARB = __indirect_glProgramEnvParameter4fARB; - glAPI->ProgramEnvParameter4fvARB = __indirect_glProgramEnvParameter4fvARB; - glAPI->ProgramLocalParameter4dARB = __indirect_glProgramLocalParameter4dARB; - glAPI->ProgramLocalParameter4dvARB = __indirect_glProgramLocalParameter4dvARB; - glAPI->ProgramLocalParameter4fARB = __indirect_glProgramLocalParameter4fARB; - glAPI->ProgramLocalParameter4fvARB = __indirect_glProgramLocalParameter4fvARB; - glAPI->GetProgramEnvParameterdvARB = __indirect_glGetProgramEnvParameterdvARB; - glAPI->GetProgramEnvParameterfvARB = __indirect_glGetProgramEnvParameterfvARB; - glAPI->GetProgramLocalParameterdvARB = __indirect_glGetProgramLocalParameterdvARB; - glAPI->GetProgramLocalParameterfvARB = __indirect_glGetProgramLocalParameterfvARB; - glAPI->GetProgramivARB = __indirect_glGetProgramivARB; - glAPI->GetProgramStringARB = __indirect_glGetProgramStringARB; - glAPI->GetVertexAttribdvARB = __indirect_glGetVertexAttribdvARB; - glAPI->GetVertexAttribfvARB = __indirect_glGetVertexAttribfvARB; - glAPI->GetVertexAttribivARB = __indirect_glGetVertexAttribivARB; - glAPI->VertexAttrib1dARB = __indirect_glVertexAttrib1dARB; - glAPI->VertexAttrib1dvARB = __indirect_glVertexAttrib1dvARB; - glAPI->VertexAttrib1fARB = __indirect_glVertexAttrib1fARB; - glAPI->VertexAttrib1fvARB = __indirect_glVertexAttrib1fvARB; - glAPI->VertexAttrib1sARB = __indirect_glVertexAttrib1sARB; - glAPI->VertexAttrib1svARB = __indirect_glVertexAttrib1svARB; - glAPI->VertexAttrib2dARB = __indirect_glVertexAttrib2dARB; - glAPI->VertexAttrib2dvARB = __indirect_glVertexAttrib2dvARB; - glAPI->VertexAttrib2fARB = __indirect_glVertexAttrib2fARB; - glAPI->VertexAttrib2fvARB = __indirect_glVertexAttrib2fvARB; - glAPI->VertexAttrib2sARB = __indirect_glVertexAttrib2sARB; - glAPI->VertexAttrib2svARB = __indirect_glVertexAttrib2svARB; - glAPI->VertexAttrib3dARB = __indirect_glVertexAttrib3dARB; - glAPI->VertexAttrib3dvARB = __indirect_glVertexAttrib3dvARB; - glAPI->VertexAttrib3fARB = __indirect_glVertexAttrib3fARB; - glAPI->VertexAttrib3fvARB = __indirect_glVertexAttrib3fvARB; - glAPI->VertexAttrib3sARB = __indirect_glVertexAttrib3sARB; - glAPI->VertexAttrib3svARB = __indirect_glVertexAttrib3svARB; - glAPI->VertexAttrib4dARB = __indirect_glVertexAttrib4dARB; - glAPI->VertexAttrib4dvARB = __indirect_glVertexAttrib4dvARB; - glAPI->VertexAttrib4fARB = __indirect_glVertexAttrib4fARB; - glAPI->VertexAttrib4fvARB = __indirect_glVertexAttrib4fvARB; - glAPI->VertexAttrib4sARB = __indirect_glVertexAttrib4sARB; - glAPI->VertexAttrib4svARB = __indirect_glVertexAttrib4svARB; - glAPI->VertexAttrib4NubARB = __indirect_glVertexAttrib4NubARB; - glAPI->VertexAttrib4NubvARB = __indirect_glVertexAttrib4NubvARB; - - /* 29. GL_ARB_occlusion_query */ - - glAPI->EndQueryARB = __indirect_glEndQueryARB; - glAPI->GetQueryivARB = __indirect_glGetQueryivARB; - glAPI->GetQueryObjectivARB = __indirect_glGetQueryObjectivARB; - glAPI->GetQueryObjectuivARB = __indirect_glGetQueryObjectuivARB; - glAPI->GenQueriesARB = __indirect_glGenQueriesARB; - glAPI->DeleteQueriesARB = __indirect_glDeleteQueriesARB; - glAPI->IsQueryARB = __indirect_glIsQueryARB; - glAPI->BeginQueryARB = __indirect_glBeginQueryARB; - - /* 37. GL_ARB_draw_buffers */ - - glAPI->DrawBuffersARB = __indirect_glDrawBuffersARB; - - /* 20. GL_EXT_texture_object */ - - glAPI->GenTexturesEXT = __indirect_glGenTexturesEXT; - glAPI->IsTextureEXT = __indirect_glIsTextureEXT; - glAPI->AreTexturesResidentEXT = __indirect_glAreTexturesResidentEXT; - - /* 25. GL_SGIS_multisample */ - - glAPI->SampleMaskSGIS = __indirect_glSampleMaskSGIS; - glAPI->SamplePatternSGIS = __indirect_glSamplePatternSGIS; - - /* 30. GL_EXT_vertex_array */ - - glAPI->ColorPointerEXT = __indirect_glColorPointerEXT; - glAPI->EdgeFlagPointerEXT = __indirect_glEdgeFlagPointerEXT; - glAPI->IndexPointerEXT = __indirect_glIndexPointerEXT; - glAPI->NormalPointerEXT = __indirect_glNormalPointerEXT; - glAPI->TexCoordPointerEXT = __indirect_glTexCoordPointerEXT; - glAPI->VertexPointerEXT = __indirect_glVertexPointerEXT; - - /* 54. GL_EXT_point_parameters */ - - glAPI->PointParameterfEXT = __indirect_glPointParameterfEXT; - glAPI->PointParameterfvEXT = __indirect_glPointParameterfvEXT; - - /* 145. GL_EXT_secondary_color */ - - glAPI->SecondaryColor3usvEXT = __indirect_glSecondaryColor3usvEXT; - glAPI->SecondaryColorPointerEXT = __indirect_glSecondaryColorPointerEXT; - glAPI->SecondaryColor3bEXT = __indirect_glSecondaryColor3bEXT; - glAPI->SecondaryColor3bvEXT = __indirect_glSecondaryColor3bvEXT; - glAPI->SecondaryColor3dEXT = __indirect_glSecondaryColor3dEXT; - glAPI->SecondaryColor3dvEXT = __indirect_glSecondaryColor3dvEXT; - glAPI->SecondaryColor3fEXT = __indirect_glSecondaryColor3fEXT; - glAPI->SecondaryColor3fvEXT = __indirect_glSecondaryColor3fvEXT; - glAPI->SecondaryColor3iEXT = __indirect_glSecondaryColor3iEXT; - glAPI->SecondaryColor3ivEXT = __indirect_glSecondaryColor3ivEXT; - glAPI->SecondaryColor3sEXT = __indirect_glSecondaryColor3sEXT; - glAPI->SecondaryColor3svEXT = __indirect_glSecondaryColor3svEXT; - glAPI->SecondaryColor3ubEXT = __indirect_glSecondaryColor3ubEXT; - glAPI->SecondaryColor3ubvEXT = __indirect_glSecondaryColor3ubvEXT; - glAPI->SecondaryColor3uiEXT = __indirect_glSecondaryColor3uiEXT; - glAPI->SecondaryColor3uivEXT = __indirect_glSecondaryColor3uivEXT; - glAPI->SecondaryColor3usEXT = __indirect_glSecondaryColor3usEXT; - - /* 148. GL_EXT_multi_draw_arrays */ - - glAPI->MultiDrawArraysEXT = __indirect_glMultiDrawArraysEXT; - glAPI->MultiDrawElementsEXT = __indirect_glMultiDrawElementsEXT; - - /* 149. GL_EXT_fog_coord */ - - glAPI->FogCoordfEXT = __indirect_glFogCoordfEXT; - glAPI->FogCoordfvEXT = __indirect_glFogCoordfvEXT; - glAPI->FogCoorddEXT = __indirect_glFogCoorddEXT; - glAPI->FogCoorddvEXT = __indirect_glFogCoorddvEXT; - glAPI->FogCoordPointerEXT = __indirect_glFogCoordPointerEXT; - - /* 173. GL_EXT_blend_func_separate */ - - glAPI->BlendFuncSeparateEXT = __indirect_glBlendFuncSeparateEXT; - - /* 197. GL_MESA_window_pos */ - - glAPI->WindowPos2dMESA = __indirect_glWindowPos2dMESA; - glAPI->WindowPos2dvMESA = __indirect_glWindowPos2dvMESA; - glAPI->WindowPos2fMESA = __indirect_glWindowPos2fMESA; - glAPI->WindowPos2fvMESA = __indirect_glWindowPos2fvMESA; - glAPI->WindowPos2iMESA = __indirect_glWindowPos2iMESA; - glAPI->WindowPos2ivMESA = __indirect_glWindowPos2ivMESA; - glAPI->WindowPos2sMESA = __indirect_glWindowPos2sMESA; - glAPI->WindowPos2svMESA = __indirect_glWindowPos2svMESA; - glAPI->WindowPos3dMESA = __indirect_glWindowPos3dMESA; - glAPI->WindowPos3dvMESA = __indirect_glWindowPos3dvMESA; - glAPI->WindowPos3fMESA = __indirect_glWindowPos3fMESA; - glAPI->WindowPos3fvMESA = __indirect_glWindowPos3fvMESA; - glAPI->WindowPos3iMESA = __indirect_glWindowPos3iMESA; - glAPI->WindowPos3ivMESA = __indirect_glWindowPos3ivMESA; - glAPI->WindowPos3sMESA = __indirect_glWindowPos3sMESA; - glAPI->WindowPos3svMESA = __indirect_glWindowPos3svMESA; - - /* 233. GL_NV_vertex_program */ - - glAPI->VertexAttribs4svNV = __indirect_glVertexAttribs4svNV; - glAPI->VertexAttribs4ubvNV = __indirect_glVertexAttribs4ubvNV; - glAPI->VertexAttrib3fNV = __indirect_glVertexAttrib3fNV; - glAPI->VertexAttrib3fvNV = __indirect_glVertexAttrib3fvNV; - glAPI->VertexAttrib3sNV = __indirect_glVertexAttrib3sNV; - glAPI->VertexAttrib3svNV = __indirect_glVertexAttrib3svNV; - glAPI->VertexAttrib4dNV = __indirect_glVertexAttrib4dNV; - glAPI->VertexAttrib3dvNV = __indirect_glVertexAttrib3dvNV; - glAPI->VertexAttrib4fNV = __indirect_glVertexAttrib4fNV; - glAPI->VertexAttrib4fvNV = __indirect_glVertexAttrib4fvNV; - glAPI->VertexAttrib4sNV = __indirect_glVertexAttrib4sNV; - glAPI->VertexAttrib4svNV = __indirect_glVertexAttrib4svNV; - glAPI->VertexAttrib4ubNV = __indirect_glVertexAttrib4ubNV; - glAPI->VertexAttrib4ubvNV = __indirect_glVertexAttrib4ubvNV; - glAPI->VertexAttrib1fvNV = __indirect_glVertexAttrib1fvNV; - glAPI->VertexAttrib3dNV = __indirect_glVertexAttrib3dNV; - glAPI->VertexAttrib4dvNV = __indirect_glVertexAttrib4dvNV; - glAPI->VertexAttrib1sNV = __indirect_glVertexAttrib1sNV; - glAPI->VertexAttrib1fNV = __indirect_glVertexAttrib1fNV; - glAPI->VertexAttrib1svNV = __indirect_glVertexAttrib1svNV; - glAPI->VertexAttrib1dvNV = __indirect_glVertexAttrib1dvNV; - glAPI->AreProgramsResidentNV = __indirect_glAreProgramsResidentNV; - glAPI->BindProgramNV = __indirect_glBindProgramNV; - glAPI->DeleteProgramsNV = __indirect_glDeleteProgramsNV; - glAPI->ExecuteProgramNV = __indirect_glExecuteProgramNV; - glAPI->GenProgramsNV = __indirect_glGenProgramsNV; - glAPI->GetProgramParameterdvNV = __indirect_glGetProgramParameterdvNV; - glAPI->GetProgramParameterfvNV = __indirect_glGetProgramParameterfvNV; - glAPI->GetProgramivNV = __indirect_glGetProgramivNV; - glAPI->GetProgramStringNV = __indirect_glGetProgramStringNV; - glAPI->GetTrackMatrixivNV = __indirect_glGetTrackMatrixivNV; - glAPI->GetVertexAttribPointervNV = __indirect_glGetVertexAttribPointervNV; - glAPI->IsProgramNV = __indirect_glIsProgramNV; - glAPI->LoadProgramNV = __indirect_glLoadProgramNV; - glAPI->ProgramParameter4dNV = __indirect_glProgramParameter4dNV; - glAPI->ProgramParameter4dvNV = __indirect_glProgramParameter4dvNV; - glAPI->ProgramParameter4fNV = __indirect_glProgramParameter4fNV; - glAPI->ProgramParameter4fvNV = __indirect_glProgramParameter4fvNV; - glAPI->ProgramParameters4dvNV = __indirect_glProgramParameters4dvNV; - glAPI->ProgramParameters4fvNV = __indirect_glProgramParameters4fvNV; - glAPI->RequestResidentProgramsNV = __indirect_glRequestResidentProgramsNV; - glAPI->TrackMatrixNV = __indirect_glTrackMatrixNV; - glAPI->VertexAttribPointerNV = __indirect_glVertexAttribPointerNV; - glAPI->VertexAttrib2dNV = __indirect_glVertexAttrib2dNV; - glAPI->VertexAttrib2sNV = __indirect_glVertexAttrib2sNV; - glAPI->VertexAttrib2dvNV = __indirect_glVertexAttrib2dvNV; - glAPI->VertexAttrib2fNV = __indirect_glVertexAttrib2fNV; - glAPI->VertexAttrib2svNV = __indirect_glVertexAttrib2svNV; - glAPI->VertexAttrib2fvNV = __indirect_glVertexAttrib2fvNV; - glAPI->GetVertexAttribdvNV = __indirect_glGetVertexAttribdvNV; - glAPI->GetVertexAttribfvNV = __indirect_glGetVertexAttribfvNV; - glAPI->GetVertexAttribivNV = __indirect_glGetVertexAttribivNV; - glAPI->VertexAttrib1dNV = __indirect_glVertexAttrib1dNV; - glAPI->VertexAttribs1dvNV = __indirect_glVertexAttribs1dvNV; - glAPI->VertexAttribs1fvNV = __indirect_glVertexAttribs1fvNV; - glAPI->VertexAttribs1svNV = __indirect_glVertexAttribs1svNV; - glAPI->VertexAttribs2dvNV = __indirect_glVertexAttribs2dvNV; - glAPI->VertexAttribs2fvNV = __indirect_glVertexAttribs2fvNV; - glAPI->VertexAttribs2svNV = __indirect_glVertexAttribs2svNV; - glAPI->VertexAttribs3dvNV = __indirect_glVertexAttribs3dvNV; - glAPI->VertexAttribs3fvNV = __indirect_glVertexAttribs3fvNV; - glAPI->VertexAttribs3svNV = __indirect_glVertexAttribs3svNV; - glAPI->VertexAttribs4dvNV = __indirect_glVertexAttribs4dvNV; - glAPI->VertexAttribs4fvNV = __indirect_glVertexAttribs4fvNV; - - /* 262. GL_NV_point_sprite */ - - glAPI->PointParameteriNV = __indirect_glPointParameteriNV; - glAPI->PointParameterivNV = __indirect_glPointParameterivNV; - - /* 268. GL_EXT_stencil_two_side */ - - glAPI->ActiveStencilFaceEXT = __indirect_glActiveStencilFaceEXT; - - /* 282. GL_NV_fragment_program */ - - glAPI->ProgramNamedParameter4fNV = __indirect_glProgramNamedParameter4fNV; - glAPI->ProgramNamedParameter4dNV = __indirect_glProgramNamedParameter4dNV; - glAPI->ProgramNamedParameter4fvNV = __indirect_glProgramNamedParameter4fvNV; - glAPI->ProgramNamedParameter4dvNV = __indirect_glProgramNamedParameter4dvNV; - glAPI->GetProgramNamedParameterfvNV = __indirect_glGetProgramNamedParameterfvNV; - glAPI->GetProgramNamedParameterdvNV = __indirect_glGetProgramNamedParameterdvNV; - - /* 310. GL_EXT_framebuffer_object */ - - glAPI->RenderbufferStorageEXT = __indirect_glRenderbufferStorageEXT; - glAPI->GetRenderbufferParameterivEXT = __indirect_glGetRenderbufferParameterivEXT; - glAPI->IsFramebufferEXT = __indirect_glIsFramebufferEXT; - glAPI->BindFramebufferEXT = __indirect_glBindFramebufferEXT; - glAPI->DeleteFramebuffersEXT = __indirect_glDeleteFramebuffersEXT; - glAPI->GenFramebuffersEXT = __indirect_glGenFramebuffersEXT; - glAPI->CheckFramebufferStatusEXT = __indirect_glCheckFramebufferStatusEXT; - glAPI->FramebufferTexture1DEXT = __indirect_glFramebufferTexture1DEXT; - glAPI->FramebufferTexture2DEXT = __indirect_glFramebufferTexture2DEXT; - glAPI->FramebufferTexture3DEXT = __indirect_glFramebufferTexture3DEXT; - glAPI->FramebufferRenderbufferEXT = __indirect_glFramebufferRenderbufferEXT; - glAPI->GetFramebufferAttachmentParameterivEXT = __indirect_glGetFramebufferAttachmentParameterivEXT; - glAPI->GenerateMipmapEXT = __indirect_glGenerateMipmapEXT; - glAPI->IsRenderbufferEXT = __indirect_glIsRenderbufferEXT; - glAPI->BindRenderbufferEXT = __indirect_glBindRenderbufferEXT; - glAPI->DeleteRenderbuffersEXT = __indirect_glDeleteRenderbuffersEXT; - glAPI->GenRenderbuffersEXT = __indirect_glGenRenderbuffersEXT; - - return glAPI; -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_init.h b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_init.h deleted file mode 100644 index 62d04ba6dc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_init.h +++ /dev/null @@ -1,42 +0,0 @@ -/* $XFree86: xc/lib/GL/glx/indirect_init.h,v 1.2 2000/02/08 17:18:33 dawes Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * - */ - -#ifndef _INDIRECT_INIT_H_ -#define _INDIRECT_INIT_H_ - -#include "glxclient.h" - -extern __GLapi *__glXNewIndirectAPI(void); - -#endif /* _INDIRECT_INIT_H_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_size.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_size.c deleted file mode 100644 index 79d57d55b6..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_size.c +++ /dev/null @@ -1,370 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - - -#include -#include "indirect_size.h" - -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define PURE __attribute__((pure)) -# else -# define PURE -# endif - -# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) -# define FASTCALL __attribute__((fastcall)) -# else -# define FASTCALL -# endif - -# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) -# define INTERNAL __attribute__((visibility("internal"))) -# else -# define INTERNAL -# endif - - -#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) -# undef HAVE_ALIAS -#endif -#ifdef HAVE_ALIAS -# define ALIAS2(from,to) \ - INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ - __attribute__ ((alias( # to ))); -# define ALIAS(from,to) ALIAS2( from, __gl ## to ## _size ) -#else -# define ALIAS(from,to) \ - INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ - { return __gl ## to ## _size( e ); } -#endif - - -INTERNAL PURE FASTCALL GLint -__glCallLists_size( GLenum e ) -{ - switch( e ) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - return 1; - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_2_BYTES: - return 2; - case GL_3_BYTES: - return 3; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - case GL_4_BYTES: - return 4; - default: return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glFogfv_size( GLenum e ) -{ - switch( e ) { - case GL_FOG_INDEX: - case GL_FOG_DENSITY: - case GL_FOG_START: - case GL_FOG_END: - case GL_FOG_MODE: - case GL_FOG_OFFSET_VALUE_SGIX: - case GL_FOG_DISTANCE_MODE_NV: - return 1; - case GL_FOG_COLOR: - return 4; - default: return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glLightfv_size( GLenum e ) -{ - switch( e ) { - case GL_SPOT_EXPONENT: - case GL_SPOT_CUTOFF: - case GL_CONSTANT_ATTENUATION: - case GL_LINEAR_ATTENUATION: - case GL_QUADRATIC_ATTENUATION: - return 1; - case GL_SPOT_DIRECTION: - return 3; - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_POSITION: - return 4; - default: return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glLightModelfv_size( GLenum e ) -{ - switch( e ) { - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - case GL_LIGHT_MODEL_COLOR_CONTROL: -/* case GL_LIGHT_MODEL_COLOR_CONTROL_EXT:*/ - return 1; - case GL_LIGHT_MODEL_AMBIENT: - return 4; - default: return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glMaterialfv_size( GLenum e ) -{ - switch( e ) { - case GL_SHININESS: - return 1; - case GL_COLOR_INDEXES: - return 3; - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_EMISSION: - case GL_AMBIENT_AND_DIFFUSE: - return 4; - default: return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glTexParameterfv_size( GLenum e ) -{ - switch( e ) { - case GL_TEXTURE_MAG_FILTER: - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_PRIORITY: - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: -/* case GL_SHADOW_AMBIENT_SGIX:*/ - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - case GL_TEXTURE_CLIPMAP_FRAME_SGIX: - case GL_TEXTURE_LOD_BIAS_S_SGIX: - case GL_TEXTURE_LOD_BIAS_T_SGIX: - case GL_TEXTURE_LOD_BIAS_R_SGIX: - case GL_GENERATE_MIPMAP: -/* case GL_GENERATE_MIPMAP_SGIS:*/ - case GL_TEXTURE_COMPARE_SGIX: - case GL_TEXTURE_COMPARE_OPERATOR_SGIX: - case GL_TEXTURE_MAX_CLAMP_S_SGIX: - case GL_TEXTURE_MAX_CLAMP_T_SGIX: - case GL_TEXTURE_MAX_CLAMP_R_SGIX: - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - case GL_TEXTURE_LOD_BIAS: -/* case GL_TEXTURE_LOD_BIAS_EXT:*/ - case GL_DEPTH_TEXTURE_MODE: -/* case GL_DEPTH_TEXTURE_MODE_ARB:*/ - case GL_TEXTURE_COMPARE_MODE: -/* case GL_TEXTURE_COMPARE_MODE_ARB:*/ - case GL_TEXTURE_COMPARE_FUNC: -/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ - case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: - return 1; - case GL_TEXTURE_CLIPMAP_CENTER_SGIX: - case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: - return 2; - case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: - return 3; - case GL_TEXTURE_BORDER_COLOR: - case GL_POST_TEXTURE_FILTER_BIAS_SGIX: - case GL_POST_TEXTURE_FILTER_SCALE_SGIX: - return 4; - default: return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glTexEnvfv_size( GLenum e ) -{ - switch( e ) { - case GL_ALPHA_SCALE: - case GL_TEXTURE_ENV_MODE: - case GL_TEXTURE_LOD_BIAS: - case GL_COMBINE_RGB: - case GL_COMBINE_ALPHA: - case GL_RGB_SCALE: - case GL_SOURCE0_RGB: - case GL_SOURCE1_RGB: - case GL_SOURCE2_RGB: - case GL_SOURCE3_RGB_NV: - case GL_SOURCE0_ALPHA: - case GL_SOURCE1_ALPHA: - case GL_SOURCE2_ALPHA: - case GL_SOURCE3_ALPHA_NV: - case GL_OPERAND0_RGB: - case GL_OPERAND1_RGB: - case GL_OPERAND2_RGB: - case GL_OPERAND3_RGB_NV: - case GL_OPERAND0_ALPHA: - case GL_OPERAND1_ALPHA: - case GL_OPERAND2_ALPHA: - case GL_OPERAND3_ALPHA_NV: - case GL_COORD_REPLACE_ARB: -/* case GL_COORD_REPLACE_NV:*/ - return 1; - case GL_TEXTURE_ENV_COLOR: - return 4; - default: return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glTexGendv_size( GLenum e ) -{ - switch( e ) { - case GL_TEXTURE_GEN_MODE: - return 1; - case GL_OBJECT_PLANE: - case GL_EYE_PLANE: - return 4; - default: return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glMap1d_size( GLenum e ) -{ - switch( e ) { - case GL_MAP1_INDEX: - case GL_MAP1_TEXTURE_COORD_1: - return 1; - case GL_MAP1_TEXTURE_COORD_2: - return 2; - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_VERTEX_3: - return 3; - case GL_MAP1_COLOR_4: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP1_VERTEX_4: - return 4; - default: return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glMap2d_size( GLenum e ) -{ - switch( e ) { - case GL_MAP2_INDEX: - case GL_MAP2_TEXTURE_COORD_1: - return 1; - case GL_MAP2_TEXTURE_COORD_2: - return 2; - case GL_MAP2_NORMAL: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_VERTEX_3: - return 3; - case GL_MAP2_COLOR_4: - case GL_MAP2_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_4: - return 4; - default: return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glColorTableParameterfv_size( GLenum e ) -{ - switch( e ) { - case GL_COLOR_TABLE_SCALE: - case GL_COLOR_TABLE_BIAS: - return 4; - default: return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glConvolutionParameterfv_size( GLenum e ) -{ - switch( e ) { - case GL_CONVOLUTION_BORDER_MODE: -/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ - return 1; - case GL_CONVOLUTION_FILTER_SCALE: -/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ - case GL_CONVOLUTION_FILTER_BIAS: -/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ - case GL_CONVOLUTION_BORDER_COLOR: -/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ - return 4; - default: return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glPointParameterfvEXT_size( GLenum e ) -{ - switch( e ) { - case GL_POINT_SIZE_MIN: -/* case GL_POINT_SIZE_MIN_ARB:*/ -/* case GL_POINT_SIZE_MIN_SGIS:*/ - case GL_POINT_SIZE_MAX: -/* case GL_POINT_SIZE_MAX_ARB:*/ -/* case GL_POINT_SIZE_MAX_SGIS:*/ - case GL_POINT_FADE_THRESHOLD_SIZE: -/* case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/ -/* case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/ - case GL_POINT_SPRITE_R_MODE_NV: - case GL_POINT_SPRITE_COORD_ORIGIN: - return 1; - case GL_POINT_DISTANCE_ATTENUATION: -/* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/ -/* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/ - return 3; - default: return 0; - } -} - -ALIAS( Fogiv, Fogfv ) -ALIAS( Lightiv, Lightfv ) -ALIAS( LightModeliv, LightModelfv ) -ALIAS( Materialiv, Materialfv ) -ALIAS( TexParameteriv, TexParameterfv ) -ALIAS( TexEnviv, TexEnvfv ) -ALIAS( TexGenfv, TexGendv ) -ALIAS( TexGeniv, TexGendv ) -ALIAS( Map1f, Map1d ) -ALIAS( Map2f, Map2d ) -ALIAS( ColorTableParameteriv, ColorTableParameterfv ) -ALIAS( ConvolutionParameteriv, ConvolutionParameterfv ) -ALIAS( PointParameterivNV, PointParameterfvEXT ) - -# undef PURE -# undef FASTCALL -# undef INTERNAL diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_size.h b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_size.h deleted file mode 100644 index 9ba0bd6907..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_size.h +++ /dev/null @@ -1,88 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#if !defined( _INDIRECT_SIZE_H_ ) -# define _INDIRECT_SIZE_H_ - -/** - * \file - * Prototypes for functions used to determine the number of data elements in - * various GLX protocol messages. - * - * \author Ian Romanick - */ - -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define PURE __attribute__((pure)) -# else -# define PURE -# endif - -# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) -# define FASTCALL __attribute__((fastcall)) -# else -# define FASTCALL -# endif - -# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) -# define INTERNAL __attribute__((visibility("internal"))) -# else -# define INTERNAL -# endif - -extern INTERNAL PURE FASTCALL GLint __glCallLists_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glFogfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glFogiv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glLightfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glLightiv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glLightModelfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glLightModeliv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glMaterialfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glMaterialiv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glTexParameterfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glTexParameteriv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glTexEnvfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glTexEnviv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glTexGendv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glTexGenfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glTexGeniv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glMap1d_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glMap1f_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glMap2d_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glMap2f_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glColorTableParameterfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glColorTableParameteriv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glConvolutionParameterfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glConvolutionParameteriv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glPointParameterfvEXT_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glPointParameterivNV_size(GLenum); - -# undef PURE -# undef FASTCALL -# undef INTERNAL - -#endif /* !defined( _INDIRECT_SIZE_H_ ) */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_transpose_matrix.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_transpose_matrix.c deleted file mode 100644 index 2144410e5a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_transpose_matrix.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include -#include "indirect.h" - -static void TransposeMatrixf(const GLfloat s[16], GLfloat d[16]) -{ - int i, j; - for (i = 0; i < 4; i++) { - for (j = 0; j < 4; j++) { - d[i*4+j] = s[j*4+i]; - } - } -} - -static void TransposeMatrixd(const GLdouble s[16], GLdouble d[16]) -{ - int i, j; - for (i = 0; i < 4; i++) { - for (j = 0; j < 4; j++) { - d[i*4+j] = s[j*4+i]; - } - } -} - - -void -__indirect_glLoadTransposeMatrixdARB( const GLdouble * m ) -{ - GLdouble mt[16]; - - TransposeMatrixd( m, mt ); - __indirect_glLoadMatrixd( mt ); -} - -void -__indirect_glLoadTransposeMatrixfARB( const GLfloat * m ) -{ - GLfloat mt[16]; - - TransposeMatrixf( m, mt ); - __indirect_glLoadMatrixf( mt ); -} - -void -__indirect_glMultTransposeMatrixdARB( const GLdouble * m ) -{ - GLdouble mt[16]; - - TransposeMatrixd( m, mt ); - __indirect_glMultMatrixd( mt ); -} - -void -__indirect_glMultTransposeMatrixfARB( const GLfloat * m ) -{ - GLfloat mt[16]; - - TransposeMatrixf( m, mt ); - __indirect_glMultMatrixf( mt ); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_va_private.h b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_va_private.h deleted file mode 100644 index ab97dc645f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_va_private.h +++ /dev/null @@ -1,308 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2004, 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef _INDIRECT_VA_PRIVATE_ -#define _INDIRECT_VA_PRIVATE_ - -/** - * \file indirect_va_private.h - * - * \author Ian Romanick - */ - -#include - -#include "glxclient.h" -#include "indirect.h" -#include - - -/** - * State descriptor for a single array of vertex data. - */ -struct array_state { - /** - * Pointer to the application supplied data. - */ - const void * data; - - /** - * Enum representing the type of the application supplied data. - */ - GLenum data_type; - - /** - * Stride value supplied by the application. This value is not used - * internally. It is only kept so that it can be queried by the - * application using glGet*v. - */ - GLsizei user_stride; - - /** - * Calculated size, in bytes, of a single element in the array. This - * is calculated based on \c count and the size of the data type - * represented by \c data_type. - */ - GLsizei element_size; - - /** - * Actual byte-stride from one element to the next. This value will - * be equal to either \c user_stride or \c element_stride. - */ - GLsizei true_stride; - - /** - * Number of data values in each element. - */ - GLint count; - - /** - * "Normalized" data is on the range [0,1] (unsigned) or [-1,1] (signed). - * This is used for mapping integral types to floating point types. - */ - GLboolean normalized; - - /** - * Pre-calculated GLX protocol command header. - */ - uint32_t header[2]; - - /** - * Size of the header data. For simple data, like glColorPointerfv, - * this is 4. For complex data that requires either a count (e.g., - * glWeightfvARB), an index (e.g., glVertexAttrib1fvARB), or a - * selector enum (e.g., glMultiTexCoord2fv) this is 8. - */ - unsigned header_size; - - /** - * Set to \c GL_TRUE if this array is enabled. Otherwise, it is set - * to \c GL_FALSE. - */ - GLboolean enabled; - - /** - * For multi-arrayed data (e.g., texture coordinates, generic vertex - * program attributes, etc.), this specifies which array this is. - */ - unsigned index; - - /** - * Per-array-type key. For most arrays, this will be the GL enum for - * that array (e.g., GL_VERTEX_ARRAY for vertex data, GL_NORMAL_ARRAY - * for normal data, GL_TEXTURE_COORD_ARRAY for texture coordinate data, - * etc.). - */ - GLenum key; - - /** - * If this array can be used with the "classic" \c glDrawArrays protocol, - * this is set to \c GL_TRUE. Otherwise, it is set to \c GL_FALSE. - */ - GLboolean old_DrawArrays_possible; -}; - - -/** - * Array state that is pushed / poped by \c glPushClientAttrib and - * \c glPopClientAttrib. - */ -struct array_stack_state { - /** - * Pointer to the application supplied data. - */ - const void * data; - - /** - * Enum representing the type of the application supplied data. - */ - GLenum data_type; - - /** - * Stride value supplied by the application. This value is not used - * internally. It is only kept so that it can be queried by the - * application using glGet*v. - */ - GLsizei user_stride; - - /** - * Number of data values in each element. - */ - GLint count; - - /** - * Per-array-type key. For most arrays, this will be the GL enum for - * that array (e.g., GL_VERTEX_ARRAY for vertex data, GL_NORMAL_ARRAY - * for normal data, GL_TEXTURE_COORD_ARRAY for texture coordinate data, - * etc.). - */ - GLenum key; - - /** - * For multi-arrayed data (e.g., texture coordinates, generic vertex - * program attributes, etc.), this specifies which array this is. - */ - unsigned index; - - /** - * Set to \c GL_TRUE if this array is enabled. Otherwise, it is set - * to \c GL_FALSE. - */ - GLboolean enabled; -}; - - -/** - * Collection of all the vertex array state. - */ -struct array_state_vector { - /** - * Number of arrays tracked by \c ::arrays. - */ - size_t num_arrays; - - /** - * Array of vertex array state. This array contains all of the valid - * vertex arrays. If a vertex array isn't in this array, then it isn't - * valid. For example, if an implementation does not support - * EXT_fog_coord, there won't be a GL_FOG_COORD_ARRAY entry in this - * array. - */ - struct array_state * arrays; - - /** - * Number of currently enabled client-side arrays. The value of this - * field is only valid if \c array_info_cache_valid is true. - */ - size_t enabled_client_array_count; - - /** - * \name ARRAY_INFO cache. - * - * These fields track the state of the ARRAY_INFO cache. The - * \c array_info_cache_size is the size of the actual data stored in - * \c array_info_cache. \c array_info_cache_buffer_size is the size of - * the buffer. This will always be greater than or equal to - * \c array_info_cache_size. - * - * \note - * There are some bytes of extra data before \c array_info_cache that is - * used to hold the header for RenderLarge commands. This is - * \b not included in \c array_info_cache_size or - * \c array_info_cache_buffer_size. \c array_info_cache_base stores a - * pointer to the true start of the buffer (i.e., what malloc returned). - */ - /*@{*/ - size_t array_info_cache_size; - size_t array_info_cache_buffer_size; - void * array_info_cache; - void * array_info_cache_base; - /*@}*/ - - - /** - * Is the cache of ARRAY_INFO data valid? The cache can become invalid - * when one of several state changes occur. Among these chages are - * modifying the array settings for an enabled array and enabling / - * disabling an array. - */ - GLboolean array_info_cache_valid; - - /** - * Is it possible to use the GL 1.1 / EXT_vertex_arrays protocol? Use - * of this protocol is disabled with really old servers (i.e., servers - * that don't support GL 1.1 or EXT_vertex_arrays) or when an environment - * variable is set. - * - * \todo - * GL 1.1 and EXT_vertex_arrays use identical protocol, but have different - * opcodes for \c glDrawArrays. For servers that advertise one or the - * other, there should be a way to select which opcode to use. - */ - GLboolean old_DrawArrays_possible; - - /** - * Is it possible to use the new GL X.X / ARB_vertex_buffer_object - * protocol? - * - * \todo - * This protocol has not yet been defined by the ARB, but is currently a - * work in progress. This field is a place-holder. - */ - GLboolean new_DrawArrays_possible; - - /** - * Active texture unit set by \c glClientActiveTexture. - * - * \sa __glXGetActiveTextureUnit - */ - unsigned active_texture_unit; - - /** - * Number of supported texture units. Even if ARB_multitexture / - * GL 1.3 are not supported, this will be at least 1. When multitexture - * is supported, this will be the value queried by calling - * \c glGetIntegerv with \c GL_MAX_TEXTURE_UNITS. - * - * \todo - * Investigate if this should be the value of \c GL_MAX_TEXTURE_COORDS - * instead (if GL 2.0 / ARB_fragment_shader / ARB_fragment_program / - * NV_fragment_program are supported). - */ - unsigned num_texture_units; - - /** - * Number of generic vertex program attribs. If GL_ARB_vertex_program - * is not supported, this will be zero. Otherwise it will be the value - * queries by calling \c glGetProgramiv with \c GL_VERTEX_PROGRAM_ARB - * and \c GL_MAX_PROGRAM_ATTRIBS_ARB. - */ - unsigned num_vertex_program_attribs; - - /** - * \n Methods for implementing various GL functions. - * - * These method pointers are only valid \c array_info_cache_valid is set. - * When each function starts, it much check \c array_info_cache_valid. - * If it is not set, it must call \c fill_array_info_cache and call - * the new method. - * - * \sa fill_array_info_cache - * - * \todo - * Write code to plug these functions directly into the dispatch table. - */ - /*@{*/ - void (*DrawArrays)( GLenum, GLint, GLsizei ); - void (*DrawElements)( GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices ); - /*@}*/ - - struct array_stack_state * stack; - unsigned active_texture_unit_stack[ __GL_CLIENT_ATTRIB_STACK_DEPTH ]; - unsigned stack_index; -}; - -#endif /* _INDIRECT_VA_PRIVATE_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_vertex_array.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_vertex_array.c deleted file mode 100644 index 62a101e665..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_vertex_array.c +++ /dev/null @@ -1,1847 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2004, 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include - -#include "glxclient.h" -#include "indirect.h" -#include -#include "glxextensions.h" -#include "indirect_vertex_array.h" -#include "indirect_va_private.h" - -#define __GLX_PAD(n) (((n)+3) & ~3) - -/** - * \file indirect_vertex_array.c - * Implement GLX protocol for vertex arrays and vertex buffer objects. - * - * The most important function in this fill is \c fill_array_info_cache. - * The \c array_state_vector contains a cache of the ARRAY_INFO data sent - * in the DrawArrays protocol. Certain operations, such as enabling or - * disabling an array, can invalidate this cache. \c fill_array_info_cache - * fills-in this data. Additionally, it examines the enabled state and - * other factors to determine what "version" of DrawArrays protocoal can be - * used. - * - * Current, only two versions of DrawArrays protocol are implemented. The - * first version is the "none" protocol. This is the fallback when the - * server does not support GL 1.1 / EXT_vertex_arrays. It is implemented - * by sending batches of immediate mode commands that are equivalent to the - * DrawArrays protocol. - * - * The other protocol that is currently implemented is the "old" protocol. - * This is the GL 1.1 DrawArrays protocol. The only difference between GL - * 1.1 and EXT_vertex_arrays is the opcode used for the DrawArrays command. - * This protocol is called "old" because the ARB is in the process of - * defining a new protocol, which will probably be called wither "new" or - * "vbo", to support multiple texture coordinate arrays, generic attributes, - * and vertex buffer objects. - * - * \author Ian Romanick - */ - -static void emit_DrawArrays_none( GLenum mode, GLint first, GLsizei count ); -static void emit_DrawArrays_old ( GLenum mode, GLint first, GLsizei count ); - -static void emit_DrawElements_none( GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices ); -static void emit_DrawElements_old ( GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices ); - - -static GLubyte * emit_element_none( GLubyte * dst, - const struct array_state_vector * arrays, unsigned index ); -static GLubyte * emit_element_old( GLubyte * dst, - const struct array_state_vector * arrays, unsigned index ); -static struct array_state * get_array_entry( - const struct array_state_vector * arrays, GLenum key, unsigned index ); -static void fill_array_info_cache( struct array_state_vector * arrays ); -static GLboolean validate_mode(__GLXcontext *gc, GLenum mode); -static GLboolean validate_count(__GLXcontext *gc, GLsizei count); -static GLboolean validate_type(__GLXcontext *gc, GLenum type); - - -/** - * Table of sizes, in bytes, of a GL types. All of the type enums are be in - * the range 0x1400 - 0x140F. That includes types added by extensions (i.e., - * \c GL_HALF_FLOAT_NV). This elements of this table correspond to the - * type enums masked with 0x0f. - * - * \notes - * \c GL_HALF_FLOAT_NV is not included. Neither are \c GL_2_BYTES, - * \c GL_3_BYTES, or \c GL_4_BYTES. - */ -const GLuint __glXTypeSize_table[16] = { - 1, 1, 2, 2, 4, 4, 4, 0, 0, 0, 8, 0, 0, 0, 0, 0 -}; - - - -/** - * Initialize vertex array state of a GLX context. - * - * \param gc GLX context whose vertex array state is to be initialized. - * - * \warning - * This function may only be called after __GLXcontext::gl_extension_bits, - * __GLXcontext::server_minor, and __GLXcontext::server_major have been - * initialized. These values are used to determine what vertex arrays are - * supported. - * - * \bug - * Return values from malloc are not properly tested. - */ -void -__glXInitVertexArrayState( __GLXcontext * gc ) -{ - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays; - - unsigned array_count; - unsigned texture_units = 1; - unsigned i; - unsigned j; - unsigned vertex_program_attribs = 0; - - GLboolean got_fog = GL_FALSE; - GLboolean got_secondary_color = GL_FALSE; - - - arrays = calloc( 1, sizeof( struct array_state_vector ) ); - state->array_state = arrays; - - arrays->old_DrawArrays_possible = !state->NoDrawArraysProtocol; - arrays->new_DrawArrays_possible = GL_FALSE; - arrays->DrawArrays = NULL; - - arrays->active_texture_unit = 0; - - - /* Determine how many arrays are actually needed. Only arrays that - * are supported by the server are create. For example, if the server - * supports only 2 texture units, then only 2 texture coordinate arrays - * are created. - * - * At the very least, GL_VERTEX_ARRAY, GL_NORMAL_ARRAY, - * GL_COLOR_ARRAY, GL_INDEX_ARRAY, GL_TEXTURE_COORD_ARRAY, and - * GL_EDGE_FLAG_ARRAY are supported. - */ - - array_count = 5; - - if ( __glExtensionBitIsEnabled( gc, GL_EXT_fog_coord_bit ) - || (gc->server_major > 1) || (gc->server_minor >= 4) ) { - got_fog = GL_TRUE; - array_count++; - } - - if ( __glExtensionBitIsEnabled( gc, GL_EXT_secondary_color_bit ) - || (gc->server_major > 1) || (gc->server_minor >= 4) ) { - got_secondary_color = GL_TRUE; - array_count++; - } - - if ( __glExtensionBitIsEnabled( gc, GL_ARB_multitexture_bit ) - || (gc->server_major > 1) || (gc->server_minor >= 3) ) { - __indirect_glGetIntegerv( GL_MAX_TEXTURE_UNITS, & texture_units ); - } - - if ( __glExtensionBitIsEnabled( gc, GL_ARB_vertex_program_bit ) ) { - __indirect_glGetProgramivARB( GL_VERTEX_PROGRAM_ARB, - GL_MAX_PROGRAM_ATTRIBS_ARB, - & vertex_program_attribs ); - } - - arrays->num_texture_units = texture_units; - arrays->num_vertex_program_attribs = vertex_program_attribs; - array_count += texture_units + vertex_program_attribs; - arrays->num_arrays = array_count; - arrays->arrays = calloc( array_count, sizeof( struct array_state ) ); - - arrays->arrays[0].data_type = GL_FLOAT; - arrays->arrays[0].count = 3; - arrays->arrays[0].key = GL_NORMAL_ARRAY; - arrays->arrays[0].normalized = GL_TRUE; - arrays->arrays[0].old_DrawArrays_possible = GL_TRUE; - - arrays->arrays[1].data_type = GL_FLOAT; - arrays->arrays[1].count = 4; - arrays->arrays[1].key = GL_COLOR_ARRAY; - arrays->arrays[1].normalized = GL_TRUE; - arrays->arrays[1].old_DrawArrays_possible = GL_TRUE; - - arrays->arrays[2].data_type = GL_FLOAT; - arrays->arrays[2].count = 1; - arrays->arrays[2].key = GL_INDEX_ARRAY; - arrays->arrays[2].old_DrawArrays_possible = GL_TRUE; - - arrays->arrays[3].data_type = GL_UNSIGNED_BYTE; - arrays->arrays[3].count = 1; - arrays->arrays[3].key = GL_EDGE_FLAG_ARRAY; - arrays->arrays[3].old_DrawArrays_possible = GL_TRUE; - - for ( i = 0 ; i < texture_units ; i++ ) { - arrays->arrays[4 + i].data_type = GL_FLOAT; - arrays->arrays[4 + i].count = 4; - arrays->arrays[4 + i].key = GL_TEXTURE_COORD_ARRAY; - - arrays->arrays[4 + i].old_DrawArrays_possible = (i == 0); - arrays->arrays[4 + i].index = i; - - arrays->arrays[4 + i].header[1] = i + GL_TEXTURE0; - } - - i = 4 + texture_units; - - if ( got_fog ) { - arrays->arrays[i].data_type = GL_FLOAT; - arrays->arrays[i].count = 1; - arrays->arrays[i].key = GL_FOG_COORDINATE_ARRAY; - arrays->arrays[i].old_DrawArrays_possible = GL_TRUE; - i++; - } - - if ( got_secondary_color ) { - arrays->arrays[i].data_type = GL_FLOAT; - arrays->arrays[i].count = 3; - arrays->arrays[i].key = GL_SECONDARY_COLOR_ARRAY; - arrays->arrays[i].old_DrawArrays_possible = GL_TRUE; - arrays->arrays[i].normalized = GL_TRUE; - i++; - } - - - for ( j = 0 ; j < vertex_program_attribs ; j++ ) { - const unsigned idx = (vertex_program_attribs - (j + 1)); - - - arrays->arrays[idx + i].data_type = GL_FLOAT; - arrays->arrays[idx + i].count = 4; - arrays->arrays[idx + i].key = GL_VERTEX_ATTRIB_ARRAY_POINTER; - - arrays->arrays[idx + i].old_DrawArrays_possible = 0; - arrays->arrays[idx + i].index = idx; - - arrays->arrays[idx + i].header[1] = idx; - } - - i += vertex_program_attribs; - - - /* Vertex array *must* be last becuase of the way that - * emit_DrawArrays_none works. - */ - - arrays->arrays[i].data_type = GL_FLOAT; - arrays->arrays[i].count = 4; - arrays->arrays[i].key = GL_VERTEX_ARRAY; - arrays->arrays[i].old_DrawArrays_possible = GL_TRUE; - - assert( (i + 1) == arrays->num_arrays ); - - arrays->stack_index = 0; - arrays->stack = malloc( sizeof( struct array_stack_state ) - * arrays->num_arrays ); -} - - -/** - * Calculate the size of a single vertex for the "none" protocol. This is - * essentially the size of all the immediate-mode commands required to - * implement the enabled vertex arrays. - */ -static size_t -calculate_single_vertex_size_none( const struct array_state_vector * arrays ) -{ - size_t single_vertex_size = 0; - unsigned i; - - - for ( i = 0 ; i < arrays->num_arrays ; i++ ) { - if ( arrays->arrays[i].enabled ) { - single_vertex_size += ((uint16_t *)arrays->arrays[i].header)[0]; - } - } - - return single_vertex_size; -} - - -/** - * Emit a single element using non-DrawArrays protocol. - */ -GLubyte * -emit_element_none( GLubyte * dst, - const struct array_state_vector * arrays, - unsigned index ) -{ - unsigned i; - - - for ( i = 0 ; i < arrays->num_arrays ; i++ ) { - if ( arrays->arrays[i].enabled ) { - const size_t offset = index * arrays->arrays[i].true_stride; - - /* The generic attributes can have more data than is in the - * elements. This is because a vertex array can be a 2 element, - * normalized, unsigned short, but the "closest" immediate mode - * protocol is for a 4Nus. Since the sizes are small, the - * performance impact on modern processors should be negligible. - */ - (void) memset( dst, 0, - ((uint16_t *)arrays->arrays[i].header)[0] ); - - (void) memcpy( dst, arrays->arrays[i].header, - arrays->arrays[i].header_size ); - - dst += arrays->arrays[i].header_size; - - (void) memcpy( dst, ((GLubyte *) arrays->arrays[i].data) + offset, - arrays->arrays[i].element_size ); - - dst += __GLX_PAD( arrays->arrays[i].element_size ); - } - } - - return dst; -} - - -/** - * Emit a single element using "old" DrawArrays protocol from - * EXT_vertex_arrays / OpenGL 1.1. - */ -GLubyte * -emit_element_old( GLubyte * dst, - const struct array_state_vector * arrays, - unsigned index ) -{ - unsigned i; - - - for ( i = 0 ; i < arrays->num_arrays ; i++ ) { - if ( arrays->arrays[i].enabled ) { - const size_t offset = index * arrays->arrays[i].true_stride; - - (void) memcpy( dst, ((GLubyte *) arrays->arrays[i].data) + offset, - arrays->arrays[i].element_size ); - - dst += __GLX_PAD( arrays->arrays[i].element_size ); - } - } - - return dst; -} - - -struct array_state * -get_array_entry( const struct array_state_vector * arrays, - GLenum key, unsigned index ) -{ - unsigned i; - - for ( i = 0 ; i < arrays->num_arrays ; i++ ) { - if ( (arrays->arrays[i].key == key) - && (arrays->arrays[i].index == index) ) { - return & arrays->arrays[i]; - } - } - - return NULL; -} - - -static GLboolean -allocate_array_info_cache( struct array_state_vector * arrays, - size_t required_size ) -{ -#define MAX_HEADER_SIZE 20 - if ( arrays->array_info_cache_buffer_size < required_size ) { - GLubyte * temp = realloc( arrays->array_info_cache_base, - required_size + MAX_HEADER_SIZE ); - - if ( temp == NULL ) { - return GL_FALSE; - } - - arrays->array_info_cache_base = temp; - arrays->array_info_cache = temp + MAX_HEADER_SIZE; - arrays->array_info_cache_buffer_size = required_size; - } - - arrays->array_info_cache_size = required_size; - return GL_TRUE; -} - - -/** - */ -void -fill_array_info_cache( struct array_state_vector * arrays ) -{ - GLboolean old_DrawArrays_possible; - unsigned i; - - - /* Determine how many arrays are enabled. - */ - - arrays->enabled_client_array_count = 0; - old_DrawArrays_possible = arrays->old_DrawArrays_possible; - for ( i = 0 ; i < arrays->num_arrays ; i++ ) { - if ( arrays->arrays[i].enabled ) { - arrays->enabled_client_array_count++; - old_DrawArrays_possible &= arrays->arrays[i].old_DrawArrays_possible; - } - } - - - if ( arrays->new_DrawArrays_possible ) { - assert( ! arrays->new_DrawArrays_possible ); - } - else if ( old_DrawArrays_possible ) { - const size_t required_size = arrays->enabled_client_array_count * 12; - uint32_t * info; - - - if ( ! allocate_array_info_cache( arrays, required_size ) ) { - return; - } - - - info = (uint32_t *) arrays->array_info_cache; - for ( i = 0 ; i < arrays->num_arrays ; i++ ) { - if ( arrays->arrays[i].enabled ) { - *(info++) = arrays->arrays[i].data_type; - *(info++) = arrays->arrays[i].count; - *(info++) = arrays->arrays[i].key; - } - } - - arrays->DrawArrays = emit_DrawArrays_old; - arrays->DrawElements = emit_DrawElements_old; - } - else { - arrays->DrawArrays = emit_DrawArrays_none; - arrays->DrawElements = emit_DrawElements_none; - } - - arrays->array_info_cache_valid = GL_TRUE; -} - - -/** - * Emit a \c glDrawArrays command using the "none" protocol. That is, - * emit immediate-mode commands that are equivalent to the requiested - * \c glDrawArrays command. This is used with servers that don't support - * the OpenGL 1.1 / EXT_vertex_arrays DrawArrays protocol or in cases where - * vertex state is enabled that is not compatible with that protocol. - */ -void -emit_DrawArrays_none( GLenum mode, GLint first, GLsizei count ) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - const __GLXattribute * state = - (const __GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - - size_t single_vertex_size; - GLubyte * pc; - unsigned i; - static const uint16_t begin_cmd[2] = { 8, X_GLrop_Begin }; - static const uint16_t end_cmd[2] = { 4, X_GLrop_End }; - - - single_vertex_size = calculate_single_vertex_size_none( arrays ); - - pc = gc->pc; - - (void) memcpy( pc, begin_cmd, 4 ); - *(int *)(pc + 4) = mode; - - pc += 8; - - for ( i = 0 ; i < count ; i++ ) { - if ( (pc + single_vertex_size) >= gc->bufEnd ) { - pc = __glXFlushRenderBuffer(gc, gc->pc); - } - - pc = emit_element_none( pc, arrays, first + i ); - } - - if ( (pc + 4) >= gc->bufEnd ) { - pc = __glXFlushRenderBuffer(gc, gc->pc); - } - - (void) memcpy( pc, end_cmd, 4 ); - pc += 4; - - gc->pc = pc; - if ( gc->pc > gc->limit ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } -} - - -/** - * Emit the header data for the GL 1.1 / EXT_vertex_arrays DrawArrays - * protocol. - * - * \param gc GLX context. - * \param arrays Array state. - * \param elements_per_request Location to store the number of elements that - * can fit in a single Render / RenderLarge - * command. - * \param total_request Total number of requests for a RenderLarge - * command. If a Render command is used, this - * will be zero. - * \param mode Drawing mode. - * \param count Number of vertices. - * - * \returns - * A pointer to the buffer for array data. - */ -static GLubyte * -emit_DrawArrays_header_old( __GLXcontext * gc, - struct array_state_vector * arrays, - size_t * elements_per_request, - size_t * total_requests, - GLenum mode, GLsizei count ) -{ - size_t command_size; - size_t single_vertex_size; - const unsigned header_size = 16; - unsigned i; - GLubyte * pc; - - - /* Determine the size of the whole command. This includes the header, - * the ARRAY_INFO data and the array data. Once this size is calculated, - * it will be known whether a Render or RenderLarge command is needed. - */ - - single_vertex_size = 0; - for ( i = 0 ; i < arrays->num_arrays ; i++ ) { - if ( arrays->arrays[i].enabled ) { - single_vertex_size += __GLX_PAD( arrays->arrays[i].element_size ); - } - } - - command_size = arrays->array_info_cache_size + header_size - + (single_vertex_size * count); - - - /* Write the header for either a Render command or a RenderLarge - * command. After the header is written, write the ARRAY_INFO data. - */ - - if ( command_size > gc->maxSmallRenderCommandSize ) { - /* maxSize is the maximum amount of data can be stuffed into a single - * packet. sz_xGLXRenderReq is added because bufSize is the maximum - * packet size minus sz_xGLXRenderReq. - */ - const size_t maxSize = (gc->bufSize + sz_xGLXRenderReq) - - sz_xGLXRenderLargeReq; - unsigned vertex_requests; - - - /* Calculate the number of data packets that will be required to send - * the whole command. To do this, the number of verticies that - * will fit in a single buffer must be calculated. - * - * The important value here is elements_per_request. This is the - * number of complete array elements that will fit in a single - * buffer. There may be some wasted space at the end of the buffer, - * but splitting elements across buffer boundries would be painful. - */ - - elements_per_request[0] = maxSize / single_vertex_size; - - vertex_requests = (count + elements_per_request[0] - 1) - / elements_per_request[0]; - - *total_requests = vertex_requests + 1; - - - __glXFlushRenderBuffer(gc, gc->pc); - - command_size += 4; - - pc = ((GLubyte *) arrays->array_info_cache) - (header_size + 4); - *(uint32_t *)(pc + 0) = command_size; - *(uint32_t *)(pc + 4) = X_GLrop_DrawArrays; - *(uint32_t *)(pc + 8) = count; - *(uint32_t *)(pc + 12) = arrays->enabled_client_array_count; - *(uint32_t *)(pc + 16) = mode; - - __glXSendLargeChunk( gc, 1, *total_requests, pc, - header_size + 4 + arrays->array_info_cache_size ); - - pc = gc->pc; - } - else { - if ( (gc->pc + command_size) >= gc->bufEnd ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - - pc = gc->pc; - *(uint16_t *)(pc + 0) = command_size; - *(uint16_t *)(pc + 2) = X_GLrop_DrawArrays; - *(uint32_t *)(pc + 4) = count; - *(uint32_t *)(pc + 8) = arrays->enabled_client_array_count; - *(uint32_t *)(pc + 12) = mode; - - pc += header_size; - - (void) memcpy( pc, arrays->array_info_cache, - arrays->array_info_cache_size ); - pc += arrays->array_info_cache_size; - - *elements_per_request = count; - *total_requests = 0; - } - - - return pc; -} - - -/** - */ -void -emit_DrawArrays_old( GLenum mode, GLint first, GLsizei count ) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - const __GLXattribute * state = - (const __GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - - GLubyte * pc; - size_t elements_per_request; - unsigned total_requests = 0; - unsigned i; - size_t total_sent = 0; - - - pc = emit_DrawArrays_header_old( gc, arrays, & elements_per_request, - & total_requests, mode, count); - - - /* Write the arrays. - */ - - if ( total_requests == 0 ) { - assert( elements_per_request >= count ); - - for ( i = 0 ; i < count ; i++ ) { - pc = emit_element_old( pc, arrays, i + first ); - } - - assert( pc <= gc->bufEnd ); - - gc->pc = pc; - if ( gc->pc > gc->limit ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - } - else { - unsigned req; - - - for ( req = 2 ; req <= total_requests ; req++ ) { - if ( count < elements_per_request ) { - elements_per_request = count; - } - - pc = gc->pc; - for ( i = 0 ; i < elements_per_request ; i++ ) { - pc = emit_element_old( pc, arrays, i + first ); - } - - first += elements_per_request; - - total_sent += (size_t) (pc - gc->pc); - __glXSendLargeChunk( gc, req, total_requests, gc->pc, - pc - gc->pc ); - - count -= elements_per_request; - } - } -} - - -void -emit_DrawElements_none( GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices ) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - const __GLXattribute * state = - (const __GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - static const uint16_t begin_cmd[2] = { 8, X_GLrop_Begin }; - static const uint16_t end_cmd[2] = { 4, X_GLrop_End }; - - GLubyte * pc; - size_t single_vertex_size; - unsigned i; - - - single_vertex_size = calculate_single_vertex_size_none( arrays ); - - - if ( (gc->pc + single_vertex_size) >= gc->bufEnd ) { - gc->pc = __glXFlushRenderBuffer(gc, gc->pc); - } - - pc = gc->pc; - - (void) memcpy( pc, begin_cmd, 4 ); - *(int *)(pc + 4) = mode; - - pc += 8; - - for ( i = 0 ; i < count ; i++ ) { - unsigned index = 0; - - if ( (pc + single_vertex_size) >= gc->bufEnd ) { - pc = __glXFlushRenderBuffer(gc, gc->pc); - } - - switch( type ) { - case GL_UNSIGNED_INT: - index = (unsigned) (((GLuint *) indices)[i]); - break; - case GL_UNSIGNED_SHORT: - index = (unsigned) (((GLushort *) indices)[i]); - break; - case GL_UNSIGNED_BYTE: - index = (unsigned) (((GLubyte *) indices)[i]); - break; - } - pc = emit_element_none( pc, arrays, index ); - } - - if ( (pc + 4) >= gc->bufEnd ) { - pc = __glXFlushRenderBuffer(gc, gc->pc); - } - - (void) memcpy( pc, end_cmd, 4 ); - pc += 4; - - gc->pc = pc; - if ( gc->pc > gc->limit ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } -} - - -/** - */ -void -emit_DrawElements_old( GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices ) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - const __GLXattribute * state = - (const __GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - - GLubyte * pc; - size_t elements_per_request; - unsigned total_requests = 0; - unsigned i; - unsigned req; - - - pc = emit_DrawArrays_header_old( gc, arrays, & elements_per_request, - & total_requests, mode, count); - - - /* Write the arrays. - */ - - req = 2; - while ( count > 0 ) { - if ( count < elements_per_request ) { - elements_per_request = count; - } - - switch( type ) { - case GL_UNSIGNED_INT: { - const GLuint * ui_ptr = (const GLuint *) indices; - - for ( i = 0 ; i < elements_per_request ; i++ ) { - const GLint index = (GLint) *(ui_ptr++); - pc = emit_element_old( pc, arrays, index ); - } - break; - } - case GL_UNSIGNED_SHORT: { - const GLushort * us_ptr = (const GLushort *) indices; - - for ( i = 0 ; i < elements_per_request ; i++ ) { - const GLint index = (GLint) *(us_ptr++); - pc = emit_element_old( pc, arrays, index ); - } - break; - } - case GL_UNSIGNED_BYTE: { - const GLubyte * ub_ptr = (const GLubyte *) indices; - - for ( i = 0 ; i < elements_per_request ; i++ ) { - const GLint index = (GLint) *(ub_ptr++); - pc = emit_element_old( pc, arrays, index ); - } - break; - } - } - - if ( total_requests != 0 ) { - __glXSendLargeChunk( gc, req, total_requests, gc->pc, - pc - gc->pc ); - pc = gc->pc; - req++; - } - - count -= elements_per_request; - } - - - assert( (total_requests == 0) || ((req - 1) == total_requests) ); - - if ( total_requests == 0 ) { - assert( pc <= gc->bufEnd ); - - gc->pc = pc; - if ( gc->pc > gc->limit ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } - } -} - - -/** - * Validate that the \c mode parameter to \c glDrawArrays, et. al. is valid. - * If it is not valid, then an error code is set in the GLX context. - * - * \returns - * \c GL_TRUE if the argument is valid, \c GL_FALSE if is not. - */ -static GLboolean -validate_mode(__GLXcontext *gc, GLenum mode) -{ - switch(mode) { - case GL_POINTS: - case GL_LINE_STRIP: - case GL_LINE_LOOP: - case GL_LINES: - case GL_TRIANGLE_STRIP: - case GL_TRIANGLE_FAN: - case GL_TRIANGLES: - case GL_QUAD_STRIP: - case GL_QUADS: - case GL_POLYGON: - break; - default: - __glXSetError(gc, GL_INVALID_ENUM); - return GL_FALSE; - } - - return GL_TRUE; -} - - -/** - * Validate that the \c count parameter to \c glDrawArrays, et. al. is valid. - * A value less than zero is invalid and will result in \c GL_INVALID_VALUE - * being set. A value of zero will not result in an error being set, but - * will result in \c GL_FALSE being returned. - * - * \returns - * \c GL_TRUE if the argument is valid, \c GL_FALSE if it is not. - */ -static GLboolean -validate_count(__GLXcontext *gc, GLsizei count) -{ - if (count < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - } - - return (count > 0); -} - - -/** - * Validate that the \c type parameter to \c glDrawElements, et. al. is - * valid. Only \c GL_UNSIGNED_BYTE, \c GL_UNSIGNED_SHORT, and - * \c GL_UNSIGNED_INT are valid. - * - * \returns - * \c GL_TRUE if the argument is valid, \c GL_FALSE if it is not. - */ -static GLboolean validate_type(__GLXcontext *gc, GLenum type) -{ - switch( type ) { - case GL_UNSIGNED_INT: - case GL_UNSIGNED_SHORT: - case GL_UNSIGNED_BYTE: - return GL_TRUE; - default: - __glXSetError(gc, GL_INVALID_ENUM); - return GL_FALSE; - } -} - - -void __indirect_glDrawArrays(GLenum mode, GLint first, GLsizei count) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - const __GLXattribute * state = - (const __GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - - - if ( validate_mode(gc, mode) && validate_count(gc, count) ) { - if ( ! arrays->array_info_cache_valid ) { - fill_array_info_cache( arrays ); - } - - arrays->DrawArrays(mode, first, count); - } -} - - -void __indirect_glArrayElement(GLint index) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - const __GLXattribute * state = - (const __GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - - size_t single_vertex_size; - - - single_vertex_size = calculate_single_vertex_size_none( arrays ); - - if ( (gc->pc + single_vertex_size) >= gc->bufEnd ) { - gc->pc = __glXFlushRenderBuffer(gc, gc->pc); - } - - gc->pc = emit_element_none( gc->pc, arrays, index ); - - if ( gc->pc > gc->limit ) { - (void) __glXFlushRenderBuffer(gc, gc->pc); - } -} - - -void __indirect_glDrawElements(GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - const __GLXattribute * state = - (const __GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - - - if ( validate_mode(gc, mode) && validate_count(gc, count) - && validate_type(gc, type) ) { - if ( ! arrays->array_info_cache_valid ) { - fill_array_info_cache( arrays ); - } - - arrays->DrawElements(mode, count, type, indices); - } -} - - -void __indirect_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, - GLsizei count, GLenum type, - const GLvoid *indices) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - const __GLXattribute * state = - (const __GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - - - if ( validate_mode(gc, mode) && validate_count(gc, count) - && validate_type(gc, type) ) { - if (end < start) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - - if ( ! arrays->array_info_cache_valid ) { - fill_array_info_cache( arrays ); - } - - arrays->DrawElements(mode, count, type, indices); - } -} - - -void __indirect_glMultiDrawArraysEXT(GLenum mode, GLint *first, GLsizei *count, - GLsizei primcount) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - const __GLXattribute * state = - (const __GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - GLsizei i; - - - if ( validate_mode(gc, mode) ) { - if ( ! arrays->array_info_cache_valid ) { - fill_array_info_cache( arrays ); - } - - for ( i = 0 ; i < primcount ; i++ ) { - if ( validate_count( gc, count[i] ) ) { - arrays->DrawArrays(mode, first[i], count[i]); - } - } - } -} - - -void __indirect_glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, - GLenum type, const GLvoid ** indices, - GLsizei primcount) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - const __GLXattribute * state = - (const __GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - GLsizei i; - - - if ( validate_mode(gc, mode) && validate_type(gc, type) ) { - if ( ! arrays->array_info_cache_valid ) { - fill_array_info_cache( arrays ); - } - - for ( i = 0 ; i < primcount ; i++ ) { - if ( validate_count( gc, count[i] ) ) { - arrays->DrawElements(mode, count[i], type, indices[i]); - } - } - } -} - - -#define COMMON_ARRAY_DATA_INIT(a, PTR, TYPE, STRIDE, COUNT, NORMALIZED, HDR_SIZE, OPCODE) \ - do { \ - (a)->data = PTR; \ - (a)->data_type = TYPE; \ - (a)->user_stride = STRIDE; \ - (a)->count = COUNT; \ - (a)->normalized = NORMALIZED; \ - \ - (a)->element_size = __glXTypeSize( TYPE ) * COUNT; \ - (a)->true_stride = (STRIDE == 0) \ - ? (a)->element_size : STRIDE; \ - \ - (a)->header_size = HDR_SIZE; \ - ((uint16_t *) (a)->header)[0] = __GLX_PAD((a)->header_size + (a)->element_size); \ - ((uint16_t *) (a)->header)[1] = OPCODE; \ - } while(0) - - -void __indirect_glVertexPointer( GLint size, GLenum type, GLsizei stride, - const GLvoid * pointer ) -{ - static const uint16_t short_ops[5] = { - 0, 0, X_GLrop_Vertex2sv, X_GLrop_Vertex3sv, X_GLrop_Vertex4sv - }; - static const uint16_t int_ops[5] = { - 0, 0, X_GLrop_Vertex2iv, X_GLrop_Vertex3iv, X_GLrop_Vertex4iv - }; - static const uint16_t float_ops[5] = { - 0, 0, X_GLrop_Vertex2fv, X_GLrop_Vertex3fv, X_GLrop_Vertex4fv - }; - static const uint16_t double_ops[5] = { - 0, 0, X_GLrop_Vertex2dv, X_GLrop_Vertex3dv, X_GLrop_Vertex4dv - }; - uint16_t opcode; - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - struct array_state * a; - - - if (size < 2 || size > 4 || stride < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - - switch ( type ) { - case GL_SHORT: opcode = short_ops[size]; break; - case GL_INT: opcode = int_ops[size]; break; - case GL_FLOAT: opcode = float_ops[size]; break; - case GL_DOUBLE: opcode = double_ops[size]; break; - default: - __glXSetError(gc, GL_INVALID_ENUM); - return; - } - - a = get_array_entry( arrays, GL_VERTEX_ARRAY, 0 ); - assert( a != NULL ); - COMMON_ARRAY_DATA_INIT( a, pointer, type, stride, size, GL_FALSE, 4, - opcode ); - - if ( a->enabled ) { - arrays->array_info_cache_valid = GL_FALSE; - } -} - - -void __indirect_glNormalPointer( GLenum type, GLsizei stride, - const GLvoid * pointer ) -{ - uint16_t opcode; - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - struct array_state * a; - - - if (stride < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - - switch ( type ) { - case GL_BYTE: opcode = X_GLrop_Normal3bv; break; - case GL_SHORT: opcode = X_GLrop_Normal3sv; break; - case GL_INT: opcode = X_GLrop_Normal3iv; break; - case GL_FLOAT: opcode = X_GLrop_Normal3fv; break; - case GL_DOUBLE: opcode = X_GLrop_Normal3dv; break; - default: - __glXSetError(gc, GL_INVALID_ENUM); - return; - } - - a = get_array_entry( arrays, GL_NORMAL_ARRAY, 0 ); - assert( a != NULL ); - COMMON_ARRAY_DATA_INIT( a, pointer, type, stride, 3, GL_TRUE, 4, - opcode ); - - if ( a->enabled ) { - arrays->array_info_cache_valid = GL_FALSE; - } -} - - -void __indirect_glColorPointer( GLint size, GLenum type, GLsizei stride, - const GLvoid * pointer ) -{ - static const uint16_t byte_ops[5] = { - 0, 0, 0, X_GLrop_Color3bv, X_GLrop_Color4bv - }; - static const uint16_t ubyte_ops[5] = { - 0, 0, 0, X_GLrop_Color3ubv, X_GLrop_Color4ubv - }; - static const uint16_t short_ops[5] = { - 0, 0, 0, X_GLrop_Color3sv, X_GLrop_Color4sv - }; - static const uint16_t ushort_ops[5] = { - 0, 0, 0, X_GLrop_Color3usv, X_GLrop_Color4usv - }; - static const uint16_t int_ops[5] = { - 0, 0, 0, X_GLrop_Color3iv, X_GLrop_Color4iv - }; - static const uint16_t uint_ops[5] = { - 0, 0, 0, X_GLrop_Color3uiv, X_GLrop_Color4uiv - }; - static const uint16_t float_ops[5] = { - 0, 0, 0, X_GLrop_Color3fv, X_GLrop_Color4fv - }; - static const uint16_t double_ops[5] = { - 0, 0, 0, X_GLrop_Color3dv, X_GLrop_Color4dv - }; - uint16_t opcode; - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - struct array_state * a; - - - if (size < 3 || size > 4 || stride < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - - switch ( type ) { - case GL_BYTE: opcode = byte_ops[size]; break; - case GL_UNSIGNED_BYTE: opcode = ubyte_ops[size]; break; - case GL_SHORT: opcode = short_ops[size]; break; - case GL_UNSIGNED_SHORT: opcode = ushort_ops[size]; break; - case GL_INT: opcode = int_ops[size]; break; - case GL_UNSIGNED_INT: opcode = uint_ops[size]; break; - case GL_FLOAT: opcode = float_ops[size]; break; - case GL_DOUBLE: opcode = double_ops[size]; break; - default: - __glXSetError(gc, GL_INVALID_ENUM); - return; - } - - a = get_array_entry( arrays, GL_COLOR_ARRAY, 0 ); - assert( a != NULL ); - COMMON_ARRAY_DATA_INIT( a, pointer, type, stride, size, GL_TRUE, 4, - opcode ); - - if ( a->enabled ) { - arrays->array_info_cache_valid = GL_FALSE; - } -} - - -void __indirect_glIndexPointer( GLenum type, GLsizei stride, - const GLvoid * pointer ) -{ - uint16_t opcode; - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - struct array_state * a; - - - if (stride < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - - switch ( type ) { - case GL_UNSIGNED_BYTE: opcode = X_GLrop_Indexubv; break; - case GL_SHORT: opcode = X_GLrop_Indexsv; break; - case GL_INT: opcode = X_GLrop_Indexiv; break; - case GL_FLOAT: opcode = X_GLrop_Indexfv; break; - case GL_DOUBLE: opcode = X_GLrop_Indexdv; break; - default: - __glXSetError(gc, GL_INVALID_ENUM); - return; - } - - a = get_array_entry( arrays, GL_INDEX_ARRAY, 0 ); - assert( a != NULL ); - COMMON_ARRAY_DATA_INIT( a, pointer, type, stride, 1, GL_FALSE, 4, - opcode ); - - if ( a->enabled ) { - arrays->array_info_cache_valid = GL_FALSE; - } -} - - -void __indirect_glEdgeFlagPointer( GLsizei stride, const GLvoid * pointer ) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - struct array_state * a; - - - if (stride < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - - - a = get_array_entry( arrays, GL_EDGE_FLAG_ARRAY, 0 ); - assert( a != NULL ); - COMMON_ARRAY_DATA_INIT( a, pointer, GL_UNSIGNED_BYTE, stride, 1, GL_FALSE, - 4, X_GLrop_EdgeFlagv ); - - if ( a->enabled ) { - arrays->array_info_cache_valid = GL_FALSE; - } -} - - -void __indirect_glTexCoordPointer( GLint size, GLenum type, GLsizei stride, - const GLvoid * pointer ) -{ - static const uint16_t short_ops[5] = { - 0, X_GLrop_TexCoord1sv, X_GLrop_TexCoord2sv, X_GLrop_TexCoord3sv, X_GLrop_TexCoord4sv - }; - static const uint16_t int_ops[5] = { - 0, X_GLrop_TexCoord1iv, X_GLrop_TexCoord2iv, X_GLrop_TexCoord3iv, X_GLrop_TexCoord4iv - }; - static const uint16_t float_ops[5] = { - 0, X_GLrop_TexCoord1dv, X_GLrop_TexCoord2fv, X_GLrop_TexCoord3fv, X_GLrop_TexCoord4fv - }; - static const uint16_t double_ops[5] = { - 0, X_GLrop_TexCoord1dv, X_GLrop_TexCoord2dv, X_GLrop_TexCoord3dv, X_GLrop_TexCoord4dv - }; - - static const uint16_t mshort_ops[5] = { - 0, X_GLrop_MultiTexCoord1svARB, X_GLrop_MultiTexCoord2svARB, X_GLrop_MultiTexCoord3svARB, X_GLrop_MultiTexCoord4svARB - }; - static const uint16_t mint_ops[5] = { - 0, X_GLrop_MultiTexCoord1ivARB, X_GLrop_MultiTexCoord2ivARB, X_GLrop_MultiTexCoord3ivARB, X_GLrop_MultiTexCoord4ivARB - }; - static const uint16_t mfloat_ops[5] = { - 0, X_GLrop_MultiTexCoord1dvARB, X_GLrop_MultiTexCoord2fvARB, X_GLrop_MultiTexCoord3fvARB, X_GLrop_MultiTexCoord4fvARB - }; - static const uint16_t mdouble_ops[5] = { - 0, X_GLrop_MultiTexCoord1dvARB, X_GLrop_MultiTexCoord2dvARB, X_GLrop_MultiTexCoord3dvARB, X_GLrop_MultiTexCoord4dvARB - }; - - uint16_t opcode; - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - struct array_state * a; - unsigned header_size; - unsigned index; - - - if (size < 1 || size > 4 || stride < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - - index = arrays->active_texture_unit; - if ( index == 0 ) { - switch ( type ) { - case GL_SHORT: opcode = short_ops[size]; break; - case GL_INT: opcode = int_ops[size]; break; - case GL_FLOAT: opcode = float_ops[size]; break; - case GL_DOUBLE: opcode = double_ops[size]; break; - default: - __glXSetError(gc, GL_INVALID_ENUM); - return; - } - - header_size = 4; - } - else { - switch ( type ) { - case GL_SHORT: opcode = mshort_ops[size]; break; - case GL_INT: opcode = mint_ops[size]; break; - case GL_FLOAT: opcode = mfloat_ops[size]; break; - case GL_DOUBLE: opcode = mdouble_ops[size]; break; - default: - __glXSetError(gc, GL_INVALID_ENUM); - return; - } - - header_size = 8; - } - - a = get_array_entry( arrays, GL_TEXTURE_COORD_ARRAY, index ); - assert( a != NULL ); - COMMON_ARRAY_DATA_INIT( a, pointer, type, stride, size, GL_FALSE, - header_size, opcode ); - - if ( a->enabled ) { - arrays->array_info_cache_valid = GL_FALSE; - } -} - - -void __indirect_glSecondaryColorPointerEXT( GLint size, GLenum type, GLsizei stride, - const GLvoid * pointer ) -{ - uint16_t opcode; - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - struct array_state * a; - - - if (size != 3 || stride < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - - switch ( type ) { - case GL_BYTE: opcode = 4126; break; - case GL_UNSIGNED_BYTE: opcode = 4131; break; - case GL_SHORT: opcode = 4127; break; - case GL_UNSIGNED_SHORT: opcode = 4132; break; - case GL_INT: opcode = 4128; break; - case GL_UNSIGNED_INT: opcode = 4133; break; - case GL_FLOAT: opcode = 4129; break; - case GL_DOUBLE: opcode = 4130; break; - default: - __glXSetError(gc, GL_INVALID_ENUM); - return; - } - - a = get_array_entry( arrays, GL_SECONDARY_COLOR_ARRAY, 0 ); - if ( a == NULL ) { - __glXSetError(gc, GL_INVALID_OPERATION); - return; - } - - COMMON_ARRAY_DATA_INIT( a, pointer, type, stride, size, GL_TRUE, 4, - opcode ); - - if ( a->enabled ) { - arrays->array_info_cache_valid = GL_FALSE; - } -} - - -void __indirect_glFogCoordPointerEXT( GLenum type, GLsizei stride, - const GLvoid * pointer ) -{ - uint16_t opcode; - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - struct array_state * a; - - - if (stride < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - - switch ( type ) { - case GL_FLOAT: opcode = 4124; break; - case GL_DOUBLE: opcode = 4125; break; - default: - __glXSetError(gc, GL_INVALID_ENUM); - return; - } - - a = get_array_entry( arrays, GL_FOG_COORD_ARRAY, 0 ); - if ( a == NULL ) { - __glXSetError(gc, GL_INVALID_OPERATION); - return; - } - - COMMON_ARRAY_DATA_INIT( a, pointer, type, stride, 1, GL_FALSE, 4, - opcode ); - - if ( a->enabled ) { - arrays->array_info_cache_valid = GL_FALSE; - } -} - - -void __indirect_glVertexAttribPointerARB(GLuint index, GLint size, - GLenum type, GLboolean normalized, - GLsizei stride, - const GLvoid * pointer) -{ - static const uint16_t short_ops[5] = { 0, 4189, 4190, 4191, 4192 }; - static const uint16_t float_ops[5] = { 0, 4193, 4194, 4195, 4196 }; - static const uint16_t double_ops[5] = { 0, 4197, 4198, 4199, 4200 }; - - uint16_t opcode; - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - struct array_state_vector * arrays = state->array_state; - struct array_state * a; - unsigned true_immediate_count; - unsigned true_immediate_size; - - - if ( (size < 1) || (size > 4) || (stride < 0) - || (index > arrays->num_vertex_program_attribs) ){ - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - - if ( normalized && (type != GL_FLOAT) && (type != GL_DOUBLE)) { - switch( type ) { - case GL_BYTE: opcode = X_GLrop_VertexAttrib4NbvARB; break; - case GL_UNSIGNED_BYTE: opcode = X_GLrop_VertexAttrib4NubvARB; break; - case GL_SHORT: opcode = X_GLrop_VertexAttrib4NsvARB; break; - case GL_UNSIGNED_SHORT: opcode = X_GLrop_VertexAttrib4NusvARB; break; - case GL_INT: opcode = X_GLrop_VertexAttrib4NivARB; break; - case GL_UNSIGNED_INT: opcode = X_GLrop_VertexAttrib4NuivARB; break; - default: - __glXSetError(gc, GL_INVALID_ENUM); - return; - } - - true_immediate_count = 4; - } - else { - true_immediate_count = size; - - switch( type ) { - case GL_BYTE: - opcode = X_GLrop_VertexAttrib4bvARB; - true_immediate_count = 4; - break; - case GL_UNSIGNED_BYTE: - opcode = X_GLrop_VertexAttrib4ubvARB; - true_immediate_count = 4; - break; - case GL_SHORT: - opcode = short_ops[size]; - break; - case GL_UNSIGNED_SHORT: - opcode = X_GLrop_VertexAttrib4usvARB; - true_immediate_count = 4; - break; - case GL_INT: - opcode = X_GLrop_VertexAttrib4ivARB; - true_immediate_count = 4; - break; - case GL_UNSIGNED_INT: - opcode = X_GLrop_VertexAttrib4uivARB; - true_immediate_count = 4; - break; - case GL_FLOAT: - opcode = float_ops[size]; - break; - case GL_DOUBLE: - opcode = double_ops[size]; - break; - default: - __glXSetError(gc, GL_INVALID_ENUM); - return; - } - } - - a = get_array_entry( arrays, GL_VERTEX_ATTRIB_ARRAY_POINTER, index ); - if ( a == NULL ) { - __glXSetError(gc, GL_INVALID_OPERATION); - return; - } - - COMMON_ARRAY_DATA_INIT( a, pointer, type, stride, size, normalized, 8, - opcode ); - - true_immediate_size = __glXTypeSize(type) * true_immediate_count; - ((uint16_t *) (a)->header)[0] = __GLX_PAD(a->header_size - + true_immediate_size); - - if ( a->enabled ) { - arrays->array_info_cache_valid = GL_FALSE; - } -} - - -/** - * I don't have 100% confidence that this is correct. The different rules - * about whether or not generic vertex attributes alias "classic" vertex - * attributes (i.e., attrib1 ?= primary color) between ARB_vertex_program, - * ARB_vertex_shader, and NV_vertex_program are a bit confusing. My - * feeling is that the client-side doesn't have to worry about it. The - * client just sends all the data to the server and lets the server deal - * with it. - */ -void __indirect_glVertexAttribPointerNV( GLuint index, GLint size, - GLenum type, GLsizei stride, - const GLvoid * pointer) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - GLboolean normalized = GL_FALSE; - - - switch( type ) { - case GL_UNSIGNED_BYTE: - if ( size != 4 ) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - normalized = GL_TRUE; - - case GL_SHORT: - case GL_FLOAT: - case GL_DOUBLE: - __indirect_glVertexAttribPointerARB(index, size, type, - normalized, - stride, pointer); - return; - default: - __glXSetError(gc, GL_INVALID_ENUM); - return; - } -} - - -void __indirect_glClientActiveTextureARB(GLenum texture) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - __GLXattribute * const state = (__GLXattribute *)(gc->client_state_private); - struct array_state_vector * const arrays = state->array_state; - const GLint unit = (GLint) texture - GL_TEXTURE0; - - - if ( (unit < 0) || (unit > arrays->num_texture_units) ) { - __glXSetError(gc, GL_INVALID_ENUM); - return; - } - - arrays->active_texture_unit = unit; -} - - -/** - */ -GLboolean -__glXSetArrayEnable( __GLXattribute * state, - GLenum key, unsigned index, GLboolean enable ) -{ - struct array_state_vector * arrays = state->array_state; - struct array_state * a; - - - if ( key == GL_TEXTURE_COORD_ARRAY ) { - index = arrays->active_texture_unit; - } - - a = get_array_entry( arrays, key, index ); - - if ( (a != NULL) && (a->enabled != enable) ) { - a->enabled = enable; - arrays->array_info_cache_valid = GL_FALSE; - } - - return (a != NULL); -} - - -void -__glXArrayDisableAll( __GLXattribute * state ) -{ - struct array_state_vector * arrays = state->array_state; - unsigned i; - - - for ( i = 0 ; i < arrays->num_arrays ; i++ ) { - arrays->arrays[i].enabled = GL_FALSE; - } - - arrays->array_info_cache_valid = GL_FALSE; -} - - -/** - */ -GLboolean -__glXGetArrayEnable( const __GLXattribute * const state, - GLenum key, unsigned index, GLintptr * dest ) -{ - const struct array_state_vector * arrays = state->array_state; - const struct array_state * a = get_array_entry( (struct array_state_vector *) arrays, - key, index ); - - if ( a != NULL ) { - *dest = (GLintptr) a->enabled; - } - - return (a != NULL); -} - - -/** - */ -GLboolean -__glXGetArrayType( const __GLXattribute * const state, - GLenum key, unsigned index, GLintptr * dest ) -{ - const struct array_state_vector * arrays = state->array_state; - const struct array_state * a = get_array_entry( (struct array_state_vector *) arrays, - key, index ); - - if ( a != NULL ) { - *dest = (GLintptr) a->enabled; - } - - return (a != NULL); -} - - -/** - */ -GLboolean -__glXGetArraySize( const __GLXattribute * const state, - GLenum key, unsigned index, GLintptr * dest ) -{ - const struct array_state_vector * arrays = state->array_state; - const struct array_state * a = get_array_entry( (struct array_state_vector *) arrays, - key, index ); - - if ( a != NULL ) { - *dest = (GLintptr) a->count; - } - - return (a != NULL); -} - - -/** - */ -GLboolean -__glXGetArrayStride( const __GLXattribute * const state, - GLenum key, unsigned index, GLintptr * dest ) -{ - const struct array_state_vector * arrays = state->array_state; - const struct array_state * a = get_array_entry( (struct array_state_vector *) arrays, - key, index ); - - if ( a != NULL ) { - *dest = (GLintptr) a->user_stride; - } - - return (a != NULL); -} - - -/** - */ -GLboolean -__glXGetArrayPointer( const __GLXattribute * const state, - GLenum key, unsigned index, void ** dest ) -{ - const struct array_state_vector * arrays = state->array_state; - const struct array_state * a = get_array_entry( (struct array_state_vector *) arrays, - key, index ); - - - if ( a != NULL ) { - *dest = (void *) (a->data); - } - - return (a != NULL); -} - - -/** - */ -GLboolean -__glXGetArrayNormalized( const __GLXattribute * const state, - GLenum key, unsigned index, GLintptr * dest ) -{ - const struct array_state_vector * arrays = state->array_state; - const struct array_state * a = get_array_entry( (struct array_state_vector *) arrays, - key, index ); - - - if ( a != NULL ) { - *dest = (GLintptr) a->normalized; - } - - return (a != NULL); -} - - -/** - */ -GLuint -__glXGetActiveTextureUnit( const __GLXattribute * const state ) -{ - return state->array_state->active_texture_unit; -} - - -void -__glXPushArrayState( __GLXattribute * state ) -{ - struct array_state_vector * arrays = state->array_state; - struct array_stack_state * stack = & arrays->stack[ (arrays->stack_index * arrays->num_arrays)]; - unsigned i; - - - for ( i = 0 ; i < arrays->num_arrays ; i++ ) { - stack[i].data = arrays->arrays[i].data; - stack[i].data_type = arrays->arrays[i].data_type; - stack[i].user_stride = arrays->arrays[i].user_stride; - stack[i].count = arrays->arrays[i].count; - stack[i].key = arrays->arrays[i].key; - stack[i].enabled = arrays->arrays[i].enabled; - } - - arrays->active_texture_unit_stack[ arrays->stack_index ] = - arrays->active_texture_unit; - - arrays->stack_index++; -} - - -void -__glXPopArrayState( __GLXattribute * state ) -{ - struct array_state_vector * arrays = state->array_state; - struct array_stack_state * stack; - unsigned i; - - - arrays->stack_index--; - stack = & arrays->stack[ (arrays->stack_index * arrays->num_arrays) ]; - - for ( i = 0 ; i < arrays->num_arrays ; i++ ) { - switch ( stack[i].key ) { - case GL_NORMAL_ARRAY: - __indirect_glNormalPointer( stack[i].data_type, - stack[i].user_stride, - stack[i].data ); - break; - case GL_COLOR_ARRAY: - __indirect_glColorPointer( stack[i].count, - stack[i].data_type, - stack[i].user_stride, - stack[i].data ); - break; - case GL_INDEX_ARRAY: - __indirect_glIndexPointer( stack[i].data_type, - stack[i].user_stride, - stack[i].data ); - break; - case GL_EDGE_FLAG_ARRAY: - __indirect_glEdgeFlagPointer( stack[i].user_stride, - stack[i].data ); - break; - case GL_TEXTURE_COORD_ARRAY: - arrays->active_texture_unit = stack[i].index; - __indirect_glTexCoordPointer( stack[i].count, - stack[i].data_type, - stack[i].user_stride, - stack[i].data ); - break; - case GL_SECONDARY_COLOR_ARRAY: - __indirect_glSecondaryColorPointerEXT( stack[i].count, - stack[i].data_type, - stack[i].user_stride, - stack[i].data ); - break; - case GL_FOG_COORDINATE_ARRAY: - __indirect_glFogCoordPointerEXT( stack[i].data_type, - stack[i].user_stride, - stack[i].data ); - break; - - } - - __glXSetArrayEnable( state, stack[i].key, stack[i].index, - stack[i].enabled ); - } - - arrays->active_texture_unit = - arrays->active_texture_unit_stack[ arrays->stack_index ]; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_vertex_array.h b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_vertex_array.h deleted file mode 100644 index caab62b672..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_vertex_array.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2004, 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef INDIRECT_VERTEX_ARRAY_H -#define INDIRECT_VERTEX_ARRAY_H - -extern const GLuint __glXTypeSize_table[16]; - -#define __glXTypeSize(e) ((((e) & ~0x0f) != 0x1400) \ - ? 0 : __glXTypeSize_table[ (e) & 0x0f ]) - -extern void __glXArrayDisableAll( __GLXattribute * state ); - -extern GLboolean __glXSetArrayEnable( __GLXattribute * state, - GLenum key, unsigned index, GLboolean enable ); - -extern GLboolean __glXGetArrayEnable( const __GLXattribute * const state, - GLenum key, unsigned index, GLintptr * dest ); -extern GLboolean __glXGetArraySize( const __GLXattribute * const state, - GLenum key, unsigned index, GLintptr * dest ); -extern GLboolean __glXGetArrayType( const __GLXattribute * const state, - GLenum key, unsigned index, GLintptr * dest ); -extern GLboolean __glXGetArrayStride( const __GLXattribute * const state, - GLenum key, unsigned index, GLintptr * dest ); -extern GLboolean __glXGetArrayPointer( const __GLXattribute * const state, - GLenum key, unsigned index, void ** dest ); -extern GLboolean __glXGetArrayNormalized( const __GLXattribute * const state, - GLenum key, unsigned index, GLintptr * dest ); - -extern void __glXPushArrayState( __GLXattribute * state ); -extern void __glXPopArrayState( __GLXattribute * state ); - -extern GLuint __glXGetActiveTextureUnit( const __GLXattribute * const state ); - -#endif /* INDIRECT_VERTEX_ARRAY_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_vertex_program.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_vertex_program.c deleted file mode 100644 index d0f0d27048..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_vertex_program.c +++ /dev/null @@ -1,272 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include "indirect.h" -#include "glxclient.h" -#include "indirect_vertex_array.h" -#include - -void do_vertex_attrib_enable( GLuint index, GLboolean val ) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - - if ( ! __glXSetArrayEnable( state, GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB, - index, val ) ) { - __glXSetError(gc, GL_INVALID_ENUM); - } -} - - -void __indirect_glEnableVertexAttribArrayARB( GLuint index ) -{ - do_vertex_attrib_enable( index, GL_TRUE ); -} - - -void __indirect_glDisableVertexAttribArrayARB( GLuint index ) -{ - do_vertex_attrib_enable( index, GL_FALSE ); -} - - -static void -get_parameter( unsigned opcode, unsigned size, GLenum target, GLuint index, - void * params ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 12; - - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupVendorRequest(gc, - X_GLXVendorPrivateWithReply, - opcode, cmdlen); - - *((GLenum *)(pc + 0)) = target; - *((GLuint *)(pc + 4)) = index; - *((GLuint *)(pc + 8)) = 0; - - (void) __glXReadReply(dpy, size, params, GL_FALSE); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - - -void __indirect_glGetProgramEnvParameterfvARB( GLenum target, GLuint index, - GLfloat * params ) -{ - get_parameter( 1296, 4, target, index, params ); -} - - -void __indirect_glGetProgramEnvParameterdvARB( GLenum target, GLuint index, - GLdouble * params ) -{ - get_parameter( 1297, 8, target, index, params ); -} - - -void __indirect_glGetProgramLocalParameterfvARB( GLenum target, GLuint index, - GLfloat * params ) -{ - get_parameter( 1305, 4, target, index, params ); -} - - -void __indirect_glGetProgramLocalParameterdvARB( GLenum target, GLuint index, - GLdouble * params ) -{ - get_parameter( 1306, 8, target, index, params ); -} - - -void __indirect_glGetVertexAttribPointervNV( GLuint index, GLenum pname, - GLvoid ** pointer ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - - if ( pname != GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB ) { - __glXSetError( gc, GL_INVALID_ENUM ); - } - - if ( ! __glXGetArrayPointer( state, GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB, - index, pointer ) ) { - __glXSetError( gc, GL_INVALID_VALUE ); - } -} - - -/** - * Get the selected attribute from the vertex array state vector. - * - * \returns - * On success \c GL_TRUE is returned. Otherwise, \c GL_FALSE is returned. - */ -static GLboolean -get_attrib_array_data( __GLXattribute * state, GLuint index, GLenum cap, - GLintptr * data ) -{ - GLboolean retval = GL_FALSE; - const GLenum attrib = GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB; - - switch( cap ) { - case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB: - retval = __glXGetArrayEnable( state, attrib, index, data ); - break; - - case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB: - retval = __glXGetArraySize( state, attrib, index, data ); - break; - - case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB: - retval = __glXGetArrayStride( state, attrib, index, data ); - break; - - case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB: - retval = __glXGetArrayType( state, attrib, index, data ); - break; - - case GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB: - retval = __glXGetArrayNormalized( state, attrib, index, data ); - break; - } - - - return retval; -} - - -static void get_vertex_attrib( __GLXcontext * gc, unsigned vop, - GLuint index, GLenum pname, - xReply * reply ) -{ - Display * const dpy = gc->currentDpy; - GLubyte * const pc = __glXSetupVendorRequest(gc, - X_GLXVendorPrivateWithReply, - vop, 8); - - *((uint32_t *)(pc + 0)) = index; - *((uint32_t *)(pc + 4)) = pname; - - (void) _XReply( dpy, reply, 0, False ); -} - - -void __indirect_glGetVertexAttribivARB( GLuint index, GLenum pname, - GLint * params ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - xGLXSingleReply reply; - - - get_vertex_attrib( gc, 1303, index, pname, (xReply *) & reply ); - - if ( reply.size != 0 ) { - if ( ! get_attrib_array_data( state, index, pname, params ) ) { - if (reply.size == 1) { - *params = (GLint) reply.pad3; - } - else { - _XRead(dpy, (void *) params, 4 * reply.size); - } - } - } - - UnlockDisplay(dpy); - SyncHandle(); -} - - -void __indirect_glGetVertexAttribfvARB( GLuint index, GLenum pname, - GLfloat * params ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - xGLXSingleReply reply; - - - get_vertex_attrib( gc, 1302, index, pname, (xReply *) & reply ); - - if ( reply.size != 0 ) { - GLintptr data; - - - if ( get_attrib_array_data( state, index, pname, & data ) ) { - *params = (GLfloat) data; - } - else { - if (reply.size == 1) { - (void) memcpy( params, & reply.pad3, sizeof( GLfloat ) ); - } - else { - _XRead(dpy, (void *) params, 4 * reply.size); - } - } - } - - UnlockDisplay(dpy); - SyncHandle(); -} - - -void __indirect_glGetVertexAttribdvARB( GLuint index, GLenum pname, - GLdouble * params ) -{ - __GLXcontext * const gc = __glXGetCurrentContext(); - Display * const dpy = gc->currentDpy; - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - xGLXSingleReply reply; - - - get_vertex_attrib( gc, 1301, index, pname, (xReply *) & reply ); - - if ( reply.size != 0 ) { - GLintptr data; - - - if ( get_attrib_array_data( state, index, pname, & data ) ) { - *params = (GLdouble) data; - } - else { - if (reply.size == 1) { - (void) memcpy( params, & reply.pad3, sizeof( GLdouble ) ); - } - else { - _XRead(dpy, (void *) params, 8 * reply.size); - } - } - } - - UnlockDisplay(dpy); - SyncHandle(); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_window_pos.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_window_pos.c deleted file mode 100644 index 533f8ef1a4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/indirect_window_pos.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * PRECISION INSIGHT, IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include "indirect.h" - -void __indirect_glWindowPos2dMESA(GLdouble x, GLdouble y) -{ - __indirect_glWindowPos3fMESA(x, y, 0.0); -} - -void __indirect_glWindowPos2iMESA(GLint x, GLint y) -{ - __indirect_glWindowPos3fMESA(x, y, 0.0); -} - -void __indirect_glWindowPos2fMESA(GLfloat x, GLfloat y) -{ - __indirect_glWindowPos3fMESA(x, y, 0.0); -} - -void __indirect_glWindowPos2sMESA(GLshort x, GLshort y) -{ - __indirect_glWindowPos3fMESA(x, y, 0.0); -} - -void __indirect_glWindowPos2dvMESA(const GLdouble * p) -{ - __indirect_glWindowPos3fMESA(p[0], p[1], 0.0); -} - -void __indirect_glWindowPos2fvMESA(const GLfloat * p) -{ - __indirect_glWindowPos3fMESA(p[0], p[1], 0.0); -} - -void __indirect_glWindowPos2ivMESA(const GLint * p) -{ - __indirect_glWindowPos3fMESA(p[0], p[1], 0.0); -} - -void __indirect_glWindowPos2svMESA(const GLshort * p) -{ - __indirect_glWindowPos3fMESA(p[0], p[1], 0.0); -} - -void __indirect_glWindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z) -{ - __indirect_glWindowPos3fMESA(x, y, z); -} - -void __indirect_glWindowPos3iMESA(GLint x, GLint y, GLint z) -{ - __indirect_glWindowPos3fMESA(x, y, z); -} - -void __indirect_glWindowPos3sMESA(GLshort x, GLshort y, GLshort z) -{ - __indirect_glWindowPos3fMESA(x, y, z); -} - -void __indirect_glWindowPos3dvMESA(const GLdouble * p) -{ - __indirect_glWindowPos3fMESA(p[0], p[1], p[2]); -} - -void __indirect_glWindowPos3ivMESA(const GLint * p) -{ - __indirect_glWindowPos3fMESA(p[0], p[1], p[2]); -} - -void __indirect_glWindowPos3svMESA(const GLshort * p) -{ - __indirect_glWindowPos3fMESA(p[0], p[1], p[2]); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/packrender.h b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/packrender.h deleted file mode 100644 index ce2a1616de..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/packrender.h +++ /dev/null @@ -1,249 +0,0 @@ -/* $XFree86: xc/lib/GL/glx/packrender.h,v 1.7tsi Exp $ */ -#ifndef __GLX_packrender_h__ -#define __GLX_packrender_h__ - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#include "glxclient.h" - -/* -** The macros in this header convert the client machine's native data types to -** wire protocol data types. The header is part of the porting layer of the -** client library, and it is intended that hardware vendors will rewrite this -** header to suit their own machines. -*/ - -/* -** Pad a count of bytes to the nearest multiple of 4. The X protocol -** transfers data in 4 byte quantities, so this macro is used to -** insure the right amount of data being sent. -*/ -#define __GLX_PAD(a) (((a)+3) & ~3) - -/* - ** Network size parameters - */ -#define sz_double 8 - -/* Setup for all commands */ -#define __GLX_DECLARE_VARIABLES() \ - __GLXcontext *gc; \ - GLubyte *pc, *pixelHeaderPC; \ - GLuint compsize, cmdlen - -#define __GLX_LOAD_VARIABLES() \ - gc = __glXGetCurrentContext(); \ - pc = gc->pc; \ - /* Muffle compilers */ \ - cmdlen = 0; (void)cmdlen; \ - compsize = 0; (void)compsize; \ - pixelHeaderPC = 0; (void)pixelHeaderPC - -/* -** Variable sized command support macro. This macro is used by calls -** that are potentially larger than __GLX_SMALL_RENDER_CMD_SIZE. -** Because of their size, they may not automatically fit in the buffer. -** If the buffer can't hold the command then it is flushed so that -** the command will fit in the next buffer. -*/ -#define __GLX_BEGIN_VARIABLE(opcode,size) \ - if (pc + (size) > gc->bufEnd) { \ - pc = __glXFlushRenderBuffer(gc, pc); \ - } \ - __GLX_PUT_SHORT(0,size); \ - __GLX_PUT_SHORT(2,opcode) - -#define __GLX_BEGIN_VARIABLE_LARGE(opcode,size) \ - pc = __glXFlushRenderBuffer(gc, pc); \ - __GLX_PUT_LONG(0,size); \ - __GLX_PUT_LONG(4,opcode) - -#define __GLX_BEGIN_VARIABLE_WITH_PIXEL(opcode,size) \ - if (pc + (size) > gc->bufEnd) { \ - pc = __glXFlushRenderBuffer(gc, pc); \ - } \ - __GLX_PUT_SHORT(0,size); \ - __GLX_PUT_SHORT(2,opcode); \ - pc += __GLX_RENDER_HDR_SIZE; \ - pixelHeaderPC = pc; \ - pc += __GLX_PIXEL_HDR_SIZE - -#define __GLX_BEGIN_VARIABLE_LARGE_WITH_PIXEL(opcode,size) \ - pc = __glXFlushRenderBuffer(gc, pc); \ - __GLX_PUT_LONG(0,size); \ - __GLX_PUT_LONG(4,opcode); \ - pc += __GLX_RENDER_LARGE_HDR_SIZE; \ - pixelHeaderPC = pc; \ - pc += __GLX_PIXEL_HDR_SIZE - -#define __GLX_BEGIN_VARIABLE_WITH_PIXEL_3D(opcode,size) \ - if (pc + (size) > gc->bufEnd) { \ - pc = __glXFlushRenderBuffer(gc, pc); \ - } \ - __GLX_PUT_SHORT(0,size); \ - __GLX_PUT_SHORT(2,opcode); \ - pc += __GLX_RENDER_HDR_SIZE; \ - pixelHeaderPC = pc; \ - pc += __GLX_PIXEL_3D_HDR_SIZE - -#define __GLX_BEGIN_VARIABLE_LARGE_WITH_PIXEL_3D(opcode,size) \ - pc = __glXFlushRenderBuffer(gc, pc); \ - __GLX_PUT_LONG(0,size); \ - __GLX_PUT_LONG(4,opcode); \ - pc += __GLX_RENDER_LARGE_HDR_SIZE; \ - pixelHeaderPC = pc; \ - pc += __GLX_PIXEL_3D_HDR_SIZE - -/* -** Fixed size command support macro. This macro is used by calls that -** are never larger than __GLX_SMALL_RENDER_CMD_SIZE. Because they -** always fit in the buffer, and because the buffer promises to -** maintain enough room for them, we don't need to check for space -** before doing the storage work. -*/ -#define __GLX_BEGIN(opcode,size) \ - __GLX_PUT_SHORT(0,size); \ - __GLX_PUT_SHORT(2,opcode) - -/* -** Finish a rendering command by advancing the pc. If the pc is now past -** the limit pointer then there is no longer room for a -** __GLX_SMALL_RENDER_CMD_SIZE sized command, which will break the -** assumptions present in the __GLX_BEGIN macro. In this case the -** rendering buffer is flushed out into the X protocol stream (which may -** or may not do I/O). -*/ -#define __GLX_END(size) \ - pc += size; \ - if (pc > gc->limit) { \ - (void) __glXFlushRenderBuffer(gc, pc); \ - } else { \ - gc->pc = pc; \ - } - -/* Array copy macros */ -#define __GLX_MEM_COPY(dest,src,bytes) \ - if (src && dest) \ - memcpy(dest, src, bytes) - -/* Single item copy macros */ -#define __GLX_PUT_CHAR(offset,a) \ - *((INT8 *) (pc + offset)) = a - -#ifndef _CRAY -#define __GLX_PUT_SHORT(offset,a) \ - *((INT16 *) (pc + offset)) = a - -#define __GLX_PUT_LONG(offset,a) \ - *((INT32 *) (pc + offset)) = a - -#define __GLX_PUT_FLOAT(offset,a) \ - *((FLOAT32 *) (pc + offset)) = a - -#else -#define __GLX_PUT_SHORT(offset,a) \ - { GLubyte *cp = (pc+offset); \ - int shift = (64-16) - ((int)(cp) >> (64-6)); \ - *(int *)cp = (*(int *)cp & ~(0xffff << shift)) | ((a & 0xffff) << shift); } - -#define __GLX_PUT_LONG(offset,a) \ - { GLubyte *cp = (pc+offset); \ - int shift = (64-32) - ((int)(cp) >> (64-6)); \ - *(int *)cp = (*(int *)cp & ~(0xffffffff << shift)) | ((a & 0xffffffff) << shift); } - -#define __GLX_PUT_FLOAT(offset,a) \ - gl_put_float((pc + offset),a) - -#define __GLX_PUT_DOUBLE(offset,a) \ - gl_put_double(pc + offset, a) - -extern void gl_put_float(/*GLubyte *, struct cray_single*/); -extern void gl_put_double(/*GLubyte *, struct cray_double*/); -#endif - -#ifndef _CRAY - -#ifdef __GLX_ALIGN64 -/* -** This can certainly be done better for a particular machine -** architecture! -*/ -#define __GLX_PUT_DOUBLE(offset,a) \ - __GLX_MEM_COPY(pc + offset, &a, 8) -#else -#define __GLX_PUT_DOUBLE(offset,a) \ - *((FLOAT64 *) (pc + offset)) = a -#endif - -#endif - -#define __GLX_PUT_CHAR_ARRAY(offset,a,alen) \ - __GLX_MEM_COPY(pc + offset, a, alen * __GLX_SIZE_INT8) - -#ifndef _CRAY -#define __GLX_PUT_SHORT_ARRAY(offset,a,alen) \ - __GLX_MEM_COPY(pc + offset, a, alen * __GLX_SIZE_INT16) - -#define __GLX_PUT_LONG_ARRAY(offset,a,alen) \ - __GLX_MEM_COPY(pc + offset, a, alen * __GLX_SIZE_INT32) - -#define __GLX_PUT_FLOAT_ARRAY(offset,a,alen) \ - __GLX_MEM_COPY(pc + offset, a, alen * __GLX_SIZE_FLOAT32) - -#define __GLX_PUT_DOUBLE_ARRAY(offset,a,alen) \ - __GLX_MEM_COPY(pc + offset, a, alen * __GLX_SIZE_FLOAT64) - -#else -#define __GLX_PUT_SHORT_ARRAY(offset,a,alen) \ - gl_put_short_array((GLubyte *)(pc + offset), a, alen * __GLX_SIZE_INT16) - -#define __GLX_PUT_LONG_ARRAY(offset,a,alen) \ - gl_put_long_array((GLubyte *)(pc + offset), (long *)a, alen * __GLX_SIZE_INT32) - -#define __GLX_PUT_FLOAT_ARRAY(offset,a,alen) \ - gl_put_float_array((GLubyte *)(pc + offset), (float *)a, alen * __GLX_SIZE_FLOAT32) - -#define __GLX_PUT_DOUBLE_ARRAY(offset,a,alen) \ - gl_put_double_array((GLubyte *)(pc + offset), (double *)a, alen * __GLX_SIZE_FLOAT64) - -extern gl_put_short_array (GLubyte *, short *, int); -extern gl_put_long_array (GLubyte *, long *, int); -extern gl_put_float_array (GLubyte *, float *, int); -extern gl_put_double_array (GLubyte *, double *, int); - -#endif /* _CRAY */ - -#endif /* !__GLX_packrender_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/packsingle.h b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/packsingle.h deleted file mode 100644 index 16b054f1e0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/packsingle.h +++ /dev/null @@ -1,219 +0,0 @@ -/* $XFree86: xc/lib/GL/glx/packsingle.h,v 1.5tsi Exp $ */ -#ifndef __GLX_packsingle_h__ -#define __GLX_packsingle_h__ - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#include "packrender.h" - -/* -** The macros in this header convert wire protocol data types to the client -** machine's native data types. The header is part of the porting layer of -** the client library, and it is intended that hardware vendors will rewrite -** this header to suit their own machines. -*/ - -/* -** Dummy define to make the GetReqExtra macro happy. The value is not -** used, but instead the code in __GLX_SINGLE_BEGIN issues its own store -** to req->reqType with the proper code (our extension code). -*/ -#define X_GLXSingle 0 - -/* Declare common variables used during a single command */ -#define __GLX_SINGLE_DECLARE_VARIABLES() \ - __GLXcontext *gc = __glXGetCurrentContext(); \ - GLubyte *pc, *pixelHeaderPC; \ - GLuint compsize, cmdlen; \ - Display *dpy = gc->currentDpy; \ - xGLXSingleReq *req - -#define __GLX_SINGLE_LOAD_VARIABLES() \ - pc = gc->pc; \ - /* Muffle compilers */ \ - pixelHeaderPC = 0; (void)pixelHeaderPC; \ - compsize = 0; (void)compsize; \ - cmdlen = 0; (void)cmdlen - -/* Start a single command */ -#define __GLX_SINGLE_BEGIN(opcode,bytes) \ - if (dpy) { \ - (void) __glXFlushRenderBuffer(gc, pc); \ - LockDisplay(dpy); \ - GetReqExtra(GLXSingle,bytes,req); \ - req->reqType = gc->majorOpcode; \ - req->glxCode = opcode; \ - req->contextTag = gc->currentContextTag; \ - pc = ((GLubyte *)(req) + sz_xGLXSingleReq) - -/* End a single command */ -#define __GLX_SINGLE_END() \ - UnlockDisplay(dpy); \ - SyncHandle(); \ - } - -/* Store data to sending for a single command */ -#define __GLX_SINGLE_PUT_CHAR(offset,a) \ - *((INT8 *) (pc + offset)) = a - -#ifndef CRAY -#define __GLX_SINGLE_PUT_SHORT(offset,a) \ - *((INT16 *) (pc + offset)) = a - -#define __GLX_SINGLE_PUT_LONG(offset,a) \ - *((INT32 *) (pc + offset)) = a - -#define __GLX_SINGLE_PUT_FLOAT(offset,a) \ - *((FLOAT32 *) (pc + offset)) = a - -#else -#define __GLX_SINGLE_PUT_SHORT(offset,a) \ - { GLubyte *cp = (pc+offset); \ - int shift = (64-16) - ((int)(cp) >> (64-6)); \ - *(int *)cp = (*(int *)cp & ~(0xffff << shift)) | ((a & 0xffff) << shift); } - -#define __GLX_SINGLE_PUT_LONG(offset,a) \ - { GLubyte *cp = (pc+offset); \ - int shift = (64-32) - ((int)(cp) >> (64-6)); \ - *(int *)cp = (*(int *)cp & ~(0xffffffff << shift)) | ((a & 0xffffffff) << shift); } - -#define __GLX_SINGLE_PUT_FLOAT(offset,a) \ - gl_put_float(pc + offset, a) -#endif - -/* Read support macros */ -#define __GLX_SINGLE_READ_XREPLY() \ - (void) _XReply(dpy, (xReply*) &reply, 0, False) - -#define __GLX_SINGLE_GET_RETVAL(a,cast) \ - a = (cast) reply.retval - -#define __GLX_SINGLE_GET_SIZE(a) \ - a = (GLint) reply.size - -#ifndef _CRAY -#define __GLX_SINGLE_GET_CHAR(p) \ - *p = *(GLbyte *)&reply.pad3; - -#define __GLX_SINGLE_GET_SHORT(p) \ - *p = *(GLshort *)&reply.pad3; - -#define __GLX_SINGLE_GET_LONG(p) \ - *p = *(GLint *)&reply.pad3; - -#define __GLX_SINGLE_GET_FLOAT(p) \ - *p = *(GLfloat *)&reply.pad3; - -#else -#define __GLX_SINGLE_GET_CHAR(p) \ - *p = reply.pad3 >> 24; - -#define __GLX_SINGLE_GET_SHORT(p) \ - {int t = reply.pad3 >> 16; \ - *p = (t & 0x8000) ? (t | ~0xffff) : (t & 0xffff);} - -#define __GLX_SINGLE_GET_LONG(p) \ - {int t = reply.pad3; \ - *p = (t & 0x80000000) ? (t | ~0xffffffff) : (t & 0xffffffff);} - -#define PAD3OFFSET 16 -#define __GLX_SINGLE_GET_FLOAT(p) \ - *p = gl_ntoh_float((GLubyte *)&reply + PAD3OFFSET); - -#define __GLX_SINGLE_GET_DOUBLE(p) \ - *p = gl_ntoh_double((GLubyte *)&reply + PAD3OFFSET); - -extern float gl_ntoh_float(GLubyte *); -extern float gl_ntoh_double(GLubyte *); -#endif - -#ifndef _CRAY - -#ifdef __GLX_ALIGN64 -#define __GLX_SINGLE_GET_DOUBLE(p) \ - __GLX_MEM_COPY(p, &reply.pad3, 8) -#else -#define __GLX_SINGLE_GET_DOUBLE(p) \ - *p = *(GLdouble *)&reply.pad3 -#endif - -#endif - -/* Get an array of typed data */ -#define __GLX_SINGLE_GET_VOID_ARRAY(a,alen) \ -{ \ - GLint slop = alen*__GLX_SIZE_INT8 & 3; \ - _XRead(dpy,(char *)a,alen*__GLX_SIZE_INT8); \ - if (slop) _XEatData(dpy,4-slop); \ -} - -#define __GLX_SINGLE_GET_CHAR_ARRAY(a,alen) \ -{ \ - GLint slop = alen*__GLX_SIZE_INT8 & 3; \ - _XRead(dpy,(char *)a,alen*__GLX_SIZE_INT8); \ - if (slop) _XEatData(dpy,4-slop); \ -} - - -#define __GLX_SINGLE_GET_SHORT_ARRAY(a,alen) \ -{ \ - GLint slop = (alen*__GLX_SIZE_INT16) & 3; \ - _XRead(dpy,(char *)a,alen*__GLX_SIZE_INT16);\ - if (slop) _XEatData(dpy,4-slop); \ -} - -#define __GLX_SINGLE_GET_LONG_ARRAY(a,alen) \ - _XRead(dpy,(char *)a,alen*__GLX_SIZE_INT32); - -#ifndef _CRAY -#define __GLX_SINGLE_GET_FLOAT_ARRAY(a,alen) \ - _XRead(dpy,(char *)a,alen*__GLX_SIZE_FLOAT32); - -#define __GLX_SINGLE_GET_DOUBLE_ARRAY(a,alen) \ - _XRead(dpy,(char *)a,alen*__GLX_SIZE_FLOAT64); - -#else -#define __GLX_SINGLE_GET_FLOAT_ARRAY(a,alen) \ - gl_get_float_array(dpy,a,alen); - -#define __GLX_SINGLE_GET_DOUBLE_ARRAY(a,alen) \ - gl_get_double_array(dpy, a, alen); - -extern void gl_get_float_array(Display *dpy, float *a, int alen); -extern void gl_get_double_array(Display *dpy, double *a, int alen); -#endif - -#endif /* !__GLX_packsingle_h__ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/pixel.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/pixel.c deleted file mode 100644 index 3b3a1811ab..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/pixel.c +++ /dev/null @@ -1,443 +0,0 @@ -/* $XFree86: xc/lib/GL/glx/pixel.c,v 1.8 2003/09/28 20:15:04 alanh Exp $ */ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#include "packrender.h" - -static const GLubyte MsbToLsbTable[256] = { - 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, - 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, - 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, - 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, - 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, - 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, - 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, - 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, - 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, - 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, - 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, - 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, - 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, - 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, - 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, - 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, - 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, - 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, - 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, - 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, - 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, - 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, - 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, - 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, - 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, - 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, - 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, - 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, - 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, - 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, - 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, - 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff, -}; - -static const GLubyte LowBitsMask[9] = { - 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff, -}; - -static const GLubyte HighBitsMask[9] = { - 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff, -}; - - -/* -** Copy bitmap data from clients packed memory applying unpacking modes as the -** data is transfered into the destImage buffer. Return in modes the -** set of pixel modes that are to be done by the server. -*/ -static void FillBitmap(__GLXcontext *gc, GLint width, GLint height, - GLenum format, const GLvoid *userdata, - GLubyte *destImage) -{ - const __GLXattribute * state = gc->client_state_private; - GLint rowLength = state->storeUnpack.rowLength; - GLint alignment = state->storeUnpack.alignment; - GLint skipPixels = state->storeUnpack.skipPixels; - GLint skipRows = state->storeUnpack.skipRows; - GLint lsbFirst = state->storeUnpack.lsbFirst; - GLint elementsLeft, bitOffset, currentByte, nextByte, highBitMask; - GLint lowBitMask, i; - GLint components, groupsPerRow, rowSize, padding, elementsPerRow; - const GLubyte *start, *iter; - - if (rowLength > 0) { - groupsPerRow = rowLength; - } else { - groupsPerRow = width; - } - components = __glElementsPerGroup(format,GL_BITMAP); - rowSize = (groupsPerRow * components + 7) >> 3; - padding = (rowSize % alignment); - if (padding) { - rowSize += alignment - padding; - } - start = ((const GLubyte*) userdata) + skipRows * rowSize + - ((skipPixels * components) >> 3); - bitOffset = (skipPixels * components) & 7; - highBitMask = LowBitsMask[8-bitOffset]; - lowBitMask = HighBitsMask[bitOffset]; - elementsPerRow = width * components; - for (i = 0; i < height; i++) { - elementsLeft = elementsPerRow; - iter = start; - while (elementsLeft) { - /* First retrieve low bits from current byte */ - if (lsbFirst) { - currentByte = MsbToLsbTable[iter[0]]; - } else { - currentByte = iter[0]; - } - if (bitOffset) { - /* Need to read next byte to finish current byte */ - if (elementsLeft > (8 - bitOffset)) { - if (lsbFirst) { - nextByte = MsbToLsbTable[iter[1]]; - } else { - nextByte = iter[1]; - } - currentByte = - ((currentByte & highBitMask) << bitOffset) | - ((nextByte & lowBitMask) >> (8 - bitOffset)); - } else { - currentByte = - ((currentByte & highBitMask) << bitOffset); - } - } - if (elementsLeft >= 8) { - *destImage = currentByte; - elementsLeft -= 8; - } else { - *destImage = currentByte & HighBitsMask[elementsLeft]; - elementsLeft = 0; - } - destImage++; - iter++; - } - start += rowSize; - } -} - -/* -** Extract array from user's data applying all pixel store modes. -** The internal packed array format used has LSB_FIRST = FALSE and -** ALIGNMENT = 1. -*/ -void __glFillImage(__GLXcontext *gc, GLint dim, GLint width, GLint height, - GLint depth, GLenum format, GLenum type, - const GLvoid *userdata, GLubyte *newimage, GLubyte *modes) -{ - const __GLXattribute * state = gc->client_state_private; - GLint rowLength = state->storeUnpack.rowLength; - GLint imageHeight = state->storeUnpack.imageHeight; - GLint alignment = state->storeUnpack.alignment; - GLint skipPixels = state->storeUnpack.skipPixels; - GLint skipRows = state->storeUnpack.skipRows; - GLint skipImages = state->storeUnpack.skipImages; - GLint swapBytes = state->storeUnpack.swapEndian; - GLint components, elementSize, rowSize, padding, groupsPerRow, groupSize; - GLint elementsPerRow, imageSize, rowsPerImage, h, i, j, k; - const GLubyte *start, *iter, *itera, *iterb, *iterc; - GLubyte *iter2; - - if (type == GL_BITMAP) { - FillBitmap(gc, width, height, format, userdata, newimage); - } else { - components = __glElementsPerGroup(format,type); - if (rowLength > 0) { - groupsPerRow = rowLength; - } else { - groupsPerRow = width; - } - if (imageHeight > 0) { - rowsPerImage = imageHeight; - } else { - rowsPerImage = height; - } - - elementSize = __glBytesPerElement(type); - groupSize = elementSize * components; - if (elementSize == 1) swapBytes = 0; - - rowSize = groupsPerRow * groupSize; - padding = (rowSize % alignment); - if (padding) { - rowSize += alignment - padding; - } - imageSize = rowSize * rowsPerImage; - start = ((const GLubyte*) userdata) + skipImages * imageSize + - skipRows * rowSize + skipPixels * groupSize; - iter2 = newimage; - elementsPerRow = width * components; - - if (swapBytes) { - itera = start; - for (h = 0; h < depth; h++) { - iterb = itera; - for (i = 0; i < height; i++) { - iterc = iterb; - for (j = 0; j < elementsPerRow; j++) { - for (k = 1; k <= elementSize; k++) { - iter2[k-1] = iterc[elementSize - k]; - } - iter2 += elementSize; - iterc += elementSize; - } - iterb += rowSize; - } - itera += imageSize; - } - } else { - itera = start; - for (h = 0; h < depth; h++) { - if (rowSize == elementsPerRow * elementSize) { - /* Ha! This is mondo easy! */ - __GLX_MEM_COPY(iter2, itera, - elementsPerRow * elementSize * height); - iter2 += elementsPerRow * elementSize * height; - } else { - iter = itera; - for (i = 0; i < height; i++) { - __GLX_MEM_COPY(iter2, iter, elementsPerRow*elementSize); - iter2 += elementsPerRow * elementSize; - iter += rowSize; - } - } - itera += imageSize; - } - } - } - - /* Setup store modes that describe what we just did */ - if (modes) { - if ( dim < 3 ) { - (void) memcpy( modes, __glXDefaultPixelStore + 4, 20 ); - } - else { - (void) memcpy( modes, __glXDefaultPixelStore + 0, 36 ); - } - } -} - -/* -** Empty a bitmap in LSB_FIRST=GL_FALSE and ALIGNMENT=4 format packing it -** into the clients memory using the pixel store PACK modes. -*/ -static void EmptyBitmap(__GLXcontext *gc, GLint width, GLint height, - GLenum format, const GLubyte *sourceImage, - GLvoid *userdata) -{ - const __GLXattribute * state = gc->client_state_private; - GLint rowLength = state->storePack.rowLength; - GLint alignment = state->storePack.alignment; - GLint skipPixels = state->storePack.skipPixels; - GLint skipRows = state->storePack.skipRows; - GLint lsbFirst = state->storePack.lsbFirst; - GLint components, groupsPerRow, rowSize, padding, elementsPerRow; - GLint sourceRowSize, sourcePadding, sourceSkip; - GLubyte *start, *iter; - GLint elementsLeft, bitOffset, currentByte, highBitMask, lowBitMask; - GLint writeMask, i; - GLubyte writeByte; - - components = __glElementsPerGroup(format,GL_BITMAP); - if (rowLength > 0) { - groupsPerRow = rowLength; - } else { - groupsPerRow = width; - } - - rowSize = (groupsPerRow * components + 7) >> 3; - padding = (rowSize % alignment); - if (padding) { - rowSize += alignment - padding; - } - sourceRowSize = (width * components + 7) >> 3; - sourcePadding = (sourceRowSize % 4); - if (sourcePadding) { - sourceSkip = 4 - sourcePadding; - } else { - sourceSkip = 0; - } - start = ((GLubyte*) userdata) + skipRows * rowSize + - ((skipPixels * components) >> 3); - bitOffset = (skipPixels * components) & 7; - highBitMask = LowBitsMask[8-bitOffset]; - lowBitMask = HighBitsMask[bitOffset]; - elementsPerRow = width * components; - for (i = 0; i < height; i++) { - elementsLeft = elementsPerRow; - iter = start; - writeMask = highBitMask; - writeByte = 0; - while (elementsLeft) { - /* Set up writeMask (to write to current byte) */ - if (elementsLeft + bitOffset < 8) { - /* Need to trim writeMask */ - writeMask &= HighBitsMask[bitOffset+elementsLeft]; - } - - if (lsbFirst) { - currentByte = MsbToLsbTable[iter[0]]; - } else { - currentByte = iter[0]; - } - - if (bitOffset) { - writeByte |= (sourceImage[0] >> bitOffset); - currentByte = (currentByte & ~writeMask) | - (writeByte & writeMask); - writeByte = (sourceImage[0] << (8 - bitOffset)); - } else { - currentByte = (currentByte & ~writeMask) | - (sourceImage[0] & writeMask); - } - - if (lsbFirst) { - iter[0] = MsbToLsbTable[currentByte]; - } else { - iter[0] = currentByte; - } - - if (elementsLeft >= 8) { - elementsLeft -= 8; - } else { - elementsLeft = 0; - } - sourceImage++; - iter++; - writeMask = 0xff; - } - if (writeByte) { - /* Some data left over that still needs writing */ - writeMask &= lowBitMask; - if (lsbFirst) { - currentByte = MsbToLsbTable[iter[0]]; - } else { - currentByte = iter[0]; - } - currentByte = (currentByte & ~writeMask) | (writeByte & writeMask); - if (lsbFirst) { - iter[0] = MsbToLsbTable[currentByte]; - } else { - iter[0] = currentByte; - } - } - start += rowSize; - sourceImage += sourceSkip; - } -} - -/* -** Insert array into user's data applying all pixel store modes. -** The packed array format from the server is LSB_FIRST = FALSE, -** SWAP_BYTES = the current pixel storage pack mode, and ALIGNMENT = 4. -** Named __glEmptyImage() because it is the opposite of __glFillImage(). -*/ -/* ARGSUSED */ -void __glEmptyImage(__GLXcontext *gc, GLint dim, GLint width, GLint height, - GLint depth, GLenum format, GLenum type, - const GLubyte *sourceImage, GLvoid *userdata) -{ - const __GLXattribute * state = gc->client_state_private; - GLint rowLength = state->storePack.rowLength; - GLint imageHeight = state->storePack.imageHeight; - GLint alignment = state->storePack.alignment; - GLint skipPixels = state->storePack.skipPixels; - GLint skipRows = state->storePack.skipRows; - GLint skipImages = state->storePack.skipImages; - GLint components, elementSize, rowSize, padding, groupsPerRow, groupSize; - GLint elementsPerRow, sourceRowSize, sourcePadding, h, i; - GLint imageSize, rowsPerImage; - GLubyte *start, *iter, *itera; - - if (type == GL_BITMAP) { - EmptyBitmap(gc, width, height, format, sourceImage, userdata); - } else { - components = __glElementsPerGroup(format,type); - if (rowLength > 0) { - groupsPerRow = rowLength; - } else { - groupsPerRow = width; - } - if (imageHeight > 0) { - rowsPerImage = imageHeight; - } else { - rowsPerImage = height; - } - elementSize = __glBytesPerElement(type); - groupSize = elementSize * components; - rowSize = groupsPerRow * groupSize; - padding = (rowSize % alignment); - if (padding) { - rowSize += alignment - padding; - } - sourceRowSize = width * groupSize; - sourcePadding = (sourceRowSize % 4); - if (sourcePadding) { - sourceRowSize += 4 - sourcePadding; - } - imageSize = sourceRowSize * rowsPerImage; - start = ((GLubyte*) userdata) + skipImages * imageSize + - skipRows * rowSize + skipPixels * groupSize; - elementsPerRow = width * components; - - itera = start; - for (h = 0; h < depth; h++) { - if ((rowSize == sourceRowSize) && (sourcePadding == 0)) { - /* Ha! This is mondo easy! */ - __GLX_MEM_COPY(itera, sourceImage, - elementsPerRow * elementSize * height); - sourceImage += elementsPerRow * elementSize * height; - } else { - iter = itera; - for (i = 0; i < height; i++) { - __GLX_MEM_COPY(iter, sourceImage, - elementsPerRow * elementSize); - sourceImage += sourceRowSize; - iter += rowSize; - } - } - itera += imageSize; - } - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/pixelstore.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/pixelstore.c deleted file mode 100644 index 3bf1b35ba3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/pixelstore.c +++ /dev/null @@ -1,337 +0,0 @@ -/* $XFree86: xc/lib/GL/glx/pixelstore.c,v 1.4 2004/01/28 18:11:43 alanh Exp $ */ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#include "glxclient.h" -#include "indirect.h" - -/** - * Send glPixelStore command to the server - * - * \param gc Current GLX context - * \param sop Either \c X_GLsop_PixelStoref or \c X_GLsop_PixelStorei - * \param pname Selector of which pixel parameter is to be set. - * \param param Value that \c pname is set to. - * - * \sa __indirect_glPixelStorei, __indirect_glPixelStoref - */ -static void -send_PixelStore( __GLXcontext * gc, unsigned sop, GLenum pname, - const void * param ) -{ - Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8; - if (__builtin_expect(dpy != NULL, 1)) { - GLubyte const * pc = __glXSetupSingleRequest(gc, sop, cmdlen); - (void) memcpy((void *)(pc + 0), (void *)(&pname), 4); - (void) memcpy((void *)(pc + 4), param, 4); - UnlockDisplay(dpy); SyncHandle(); - } - return; -} - -/* -** Specify parameters that control the storage format of pixel arrays. -*/ -void __indirect_glPixelStoref(GLenum pname, GLfloat param) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = gc->client_state_private; - Display *dpy = gc->currentDpy; - GLuint a; - - if (!dpy) return; - - switch (pname) { - case GL_PACK_ROW_LENGTH: - a = (GLuint) (param + 0.5); - if (((GLint) a) < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storePack.rowLength = a; - break; - case GL_PACK_IMAGE_HEIGHT: - a = (GLuint) (param + 0.5); - if (((GLint) a) < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storePack.imageHeight = a; - break; - case GL_PACK_SKIP_ROWS: - a = (GLuint) (param + 0.5); - if (((GLint) a) < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storePack.skipRows = a; - break; - case GL_PACK_SKIP_PIXELS: - a = (GLuint) (param + 0.5); - if (((GLint) a) < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storePack.skipPixels = a; - break; - case GL_PACK_SKIP_IMAGES: - a = (GLuint) (param + 0.5); - if (((GLint) a) < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storePack.skipImages = a; - break; - case GL_PACK_ALIGNMENT: - a = (GLint) (param + 0.5); - switch (a) { - case 1: case 2: case 4: case 8: - state->storePack.alignment = a; - break; - default: - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - break; - case GL_PACK_SWAP_BYTES: - state->storePack.swapEndian = (param != 0); - break; - case GL_PACK_LSB_FIRST: - state->storePack.lsbFirst = (param != 0); - break; - - case GL_UNPACK_ROW_LENGTH: - a = (GLuint) (param + 0.5); - if (((GLint) a) < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storeUnpack.rowLength = a; - break; - case GL_UNPACK_IMAGE_HEIGHT: - a = (GLuint) (param + 0.5); - if (((GLint) a) < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storeUnpack.imageHeight = a; - break; - case GL_UNPACK_SKIP_ROWS: - a = (GLuint) (param + 0.5); - if (((GLint) a) < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storeUnpack.skipRows = a; - break; - case GL_UNPACK_SKIP_PIXELS: - a = (GLuint) (param + 0.5); - if (((GLint) a) < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storeUnpack.skipPixels = a; - break; - case GL_UNPACK_SKIP_IMAGES: - a = (GLuint) (param + 0.5); - if (((GLint) a) < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storeUnpack.skipImages = a; - break; - case GL_UNPACK_ALIGNMENT: - a = (GLint) (param + 0.5); - switch (a) { - case 1: case 2: case 4: case 8: - state->storeUnpack.alignment = a; - break; - default: - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - break; - case GL_UNPACK_SWAP_BYTES: - state->storeUnpack.swapEndian = (param != 0); - break; - case GL_UNPACK_LSB_FIRST: - state->storeUnpack.lsbFirst = (param != 0); - break; - - /* Group all of the pixel store modes that need to be sent to the - * server here. Care must be used to only send modes to the server that - * won't affect the size of the data sent to or received from the - * server. GL_PACK_INVERT_MESA is safe in this respect, but other, - * future modes may not be. - */ - case GL_PACK_INVERT_MESA: - send_PixelStore( gc, X_GLsop_PixelStoref, pname, & param ); - break; - - default: - __glXSetError(gc, GL_INVALID_ENUM); - break; - } -} - -void __indirect_glPixelStorei(GLenum pname, GLint param) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = gc->client_state_private; - Display *dpy = gc->currentDpy; - - if (!dpy) return; - - switch (pname) { - case GL_PACK_ROW_LENGTH: - if (param < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storePack.rowLength = param; - break; - case GL_PACK_IMAGE_HEIGHT: - if (param < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storePack.imageHeight = param; - break; - case GL_PACK_SKIP_ROWS: - if (param < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storePack.skipRows = param; - break; - case GL_PACK_SKIP_PIXELS: - if (param < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storePack.skipPixels = param; - break; - case GL_PACK_SKIP_IMAGES: - if (param < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storePack.skipImages = param; - break; - case GL_PACK_ALIGNMENT: - switch (param) { - case 1: case 2: case 4: case 8: - state->storePack.alignment = param; - break; - default: - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - break; - case GL_PACK_SWAP_BYTES: - state->storePack.swapEndian = (param != 0); - break; - case GL_PACK_LSB_FIRST: - state->storePack.lsbFirst = (param != 0); - break; - - case GL_UNPACK_ROW_LENGTH: - if (param < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storeUnpack.rowLength = param; - break; - case GL_UNPACK_IMAGE_HEIGHT: - if (param < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storeUnpack.imageHeight = param; - break; - case GL_UNPACK_SKIP_ROWS: - if (param < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storeUnpack.skipRows = param; - break; - case GL_UNPACK_SKIP_PIXELS: - if (param < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storeUnpack.skipPixels = param; - break; - case GL_UNPACK_SKIP_IMAGES: - if (param < 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - state->storeUnpack.skipImages = param; - break; - case GL_UNPACK_ALIGNMENT: - switch (param) { - case 1: case 2: case 4: case 8: - state->storeUnpack.alignment = param; - break; - default: - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - break; - case GL_UNPACK_SWAP_BYTES: - state->storeUnpack.swapEndian = (param != 0); - break; - case GL_UNPACK_LSB_FIRST: - state->storeUnpack.lsbFirst = (param != 0); - break; - - /* Group all of the pixel store modes that need to be sent to the - * server here. Care must be used to only send modes to the server that - * won't affect the size of the data sent to or received from the - * server. GL_PACK_INVERT_MESA is safe in this respect, but other, - * future modes may not be. - */ - case GL_PACK_INVERT_MESA: - send_PixelStore( gc, X_GLsop_PixelStorei, pname, & param ); - break; - - default: - __glXSetError(gc, GL_INVALID_ENUM); - break; - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/render2.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/render2.c deleted file mode 100644 index 21ba270998..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/render2.c +++ /dev/null @@ -1,363 +0,0 @@ -/* $XFree86: xc/lib/GL/glx/render2.c,v 1.6 2004/01/31 09:29:33 alanh Exp $ */ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#include "packrender.h" -#include "indirect.h" -#include "indirect_size.h" - -/* -** This file contains routines that might need to be transported as -** GLXRender or GLXRenderLarge commands, and these commands don't -** use the pixel header. See renderpix.c for those routines. -*/ - -void __indirect_glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, - GLint order, const GLdouble *pnts) -{ - __GLX_DECLARE_VARIABLES(); - GLint k; - - __GLX_LOAD_VARIABLES(); - k = __glMap1d_size(target); - if (k == 0) { - __glXSetError(gc, GL_INVALID_ENUM); - return; - } else if (stride < k || order <= 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - compsize = k * order * __GLX_SIZE_FLOAT64; - cmdlen = 28+compsize; - if (!gc->currentDpy) return; - - if (cmdlen <= gc->maxSmallRenderCommandSize) { - /* Use GLXRender protocol to send small command */ - __GLX_BEGIN_VARIABLE(X_GLrop_Map1d,cmdlen); - __GLX_PUT_DOUBLE(4,u1); - __GLX_PUT_DOUBLE(12,u2); - __GLX_PUT_LONG(20,target); - __GLX_PUT_LONG(24,order); - /* - ** NOTE: the doubles that follow are not aligned because of 3 - ** longs preceeding - */ - __glFillMap1d(k, order, stride, pnts, (pc+28)); - __GLX_END(cmdlen); - } else { - /* Use GLXRenderLarge protocol to send command */ - __GLX_BEGIN_VARIABLE_LARGE(X_GLrop_Map1d,cmdlen+4); - __GLX_PUT_DOUBLE(8,u1); - __GLX_PUT_DOUBLE(16,u2); - __GLX_PUT_LONG(24,target); - __GLX_PUT_LONG(28,order); - - /* - ** NOTE: the doubles that follow are not aligned because of 3 - ** longs preceeding - */ - if (stride != k) { - GLubyte *buf; - - buf = (GLubyte *) Xmalloc(compsize); - if (!buf) { - __glXSetError(gc, GL_OUT_OF_MEMORY); - return; - } - __glFillMap1d(k, order, stride, pnts, buf); - __glXSendLargeCommand(gc, pc, 32, buf, compsize); - Xfree((char*) buf); - } else { - /* Data is already packed. Just send it out */ - __glXSendLargeCommand(gc, pc, 32, pnts, compsize); - } - } -} - -void __indirect_glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, - GLint order, const GLfloat *pnts) -{ - __GLX_DECLARE_VARIABLES(); - GLint k; - - __GLX_LOAD_VARIABLES(); - k = __glMap1f_size(target); - if (k == 0) { - __glXSetError(gc, GL_INVALID_ENUM); - return; - } else if (stride < k || order <= 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - compsize = k * order * __GLX_SIZE_FLOAT32; - cmdlen = 20+compsize; - if (!gc->currentDpy) return; - - /* - ** The order that arguments are packed is different from the order - ** for glMap1d. - */ - if (cmdlen <= gc->maxSmallRenderCommandSize) { - /* Use GLXRender protocol to send small command */ - __GLX_BEGIN_VARIABLE(X_GLrop_Map1f,cmdlen); - __GLX_PUT_LONG(4,target); - __GLX_PUT_FLOAT(8,u1); - __GLX_PUT_FLOAT(12,u2); - __GLX_PUT_LONG(16,order); - __glFillMap1f(k, order, stride, pnts, (GLubyte*) (pc+20)); - __GLX_END(cmdlen); - } else { - /* Use GLXRenderLarge protocol to send command */ - __GLX_BEGIN_VARIABLE_LARGE(X_GLrop_Map1f,cmdlen+4); - __GLX_PUT_LONG(8,target); - __GLX_PUT_FLOAT(12,u1); - __GLX_PUT_FLOAT(16,u2); - __GLX_PUT_LONG(20,order); - - if (stride != k) { - GLubyte *buf; - - buf = (GLubyte *) Xmalloc(compsize); - if (!buf) { - __glXSetError(gc, GL_OUT_OF_MEMORY); - return; - } - __glFillMap1f(k, order, stride, pnts, buf); - __glXSendLargeCommand(gc, pc, 24, buf, compsize); - Xfree((char*) buf); - } else { - /* Data is already packed. Just send it out */ - __glXSendLargeCommand(gc, pc, 24, pnts, compsize); - } - } -} - -void __indirect_glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustr, GLint uord, - GLdouble v1, GLdouble v2, GLint vstr, GLint vord, - const GLdouble *pnts) -{ - __GLX_DECLARE_VARIABLES(); - GLint k; - - __GLX_LOAD_VARIABLES(); - k = __glMap2d_size(target); - if (k == 0) { - __glXSetError(gc, GL_INVALID_ENUM); - return; - } else if (vstr < k || ustr < k || vord <= 0 || uord <= 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - compsize = k * uord * vord * __GLX_SIZE_FLOAT64; - cmdlen = 48+compsize; - if (!gc->currentDpy) return; - - if (cmdlen <= gc->maxSmallRenderCommandSize) { - /* Use GLXRender protocol to send small command */ - __GLX_BEGIN_VARIABLE(X_GLrop_Map2d,cmdlen); - __GLX_PUT_DOUBLE(4,u1); - __GLX_PUT_DOUBLE(12,u2); - __GLX_PUT_DOUBLE(20,v1); - __GLX_PUT_DOUBLE(28,v2); - __GLX_PUT_LONG(36,target); - __GLX_PUT_LONG(40,uord); - __GLX_PUT_LONG(44,vord); - /* - ** Pack into a u-major ordering. - ** NOTE: the doubles that follow are not aligned because of 5 - ** longs preceeding - */ - __glFillMap2d(k, uord, vord, ustr, vstr, pnts, (GLdouble*) (pc+48)); - __GLX_END(cmdlen); - } else { - /* Use GLXRenderLarge protocol to send command */ - __GLX_BEGIN_VARIABLE_LARGE(X_GLrop_Map2d,cmdlen+4); - __GLX_PUT_DOUBLE(8,u1); - __GLX_PUT_DOUBLE(16,u2); - __GLX_PUT_DOUBLE(24,v1); - __GLX_PUT_DOUBLE(32,v2); - __GLX_PUT_LONG(40,target); - __GLX_PUT_LONG(44,uord); - __GLX_PUT_LONG(48,vord); - - /* - ** NOTE: the doubles that follow are not aligned because of 5 - ** longs preceeding - */ - if ((vstr != k) || (ustr != k*vord)) { - GLdouble *buf; - - buf = (GLdouble *) Xmalloc(compsize); - if (!buf) { - __glXSetError(gc, GL_OUT_OF_MEMORY); - return; - } - /* - ** Pack into a u-major ordering. - */ - __glFillMap2d(k, uord, vord, ustr, vstr, pnts, buf); - __glXSendLargeCommand(gc, pc, 52, buf, compsize); - Xfree((char*) buf); - } else { - /* Data is already packed. Just send it out */ - __glXSendLargeCommand(gc, pc, 52, pnts, compsize); - } - } -} - -void __indirect_glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustr, GLint uord, - GLfloat v1, GLfloat v2, GLint vstr, GLint vord, - const GLfloat *pnts) -{ - __GLX_DECLARE_VARIABLES(); - GLint k; - - __GLX_LOAD_VARIABLES(); - k = __glMap2f_size(target); - if (k == 0) { - __glXSetError(gc, GL_INVALID_ENUM); - return; - } else if (vstr < k || ustr < k || vord <= 0 || uord <= 0) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - compsize = k * uord * vord * __GLX_SIZE_FLOAT32; - cmdlen = 32+compsize; - if (!gc->currentDpy) return; - - /* - ** The order that arguments are packed is different from the order - ** for glMap2d. - */ - if (cmdlen <= gc->maxSmallRenderCommandSize) { - /* Use GLXRender protocol to send small command */ - __GLX_BEGIN_VARIABLE(X_GLrop_Map2f,cmdlen); - __GLX_PUT_LONG(4,target); - __GLX_PUT_FLOAT(8,u1); - __GLX_PUT_FLOAT(12,u2); - __GLX_PUT_LONG(16,uord); - __GLX_PUT_FLOAT(20,v1); - __GLX_PUT_FLOAT(24,v2); - __GLX_PUT_LONG(28,vord); - /* - ** Pack into a u-major ordering. - */ - __glFillMap2f(k, uord, vord, ustr, vstr, pnts, (GLfloat*) (pc+32)); - __GLX_END(cmdlen); - } else { - /* Use GLXRenderLarge protocol to send command */ - __GLX_BEGIN_VARIABLE_LARGE(X_GLrop_Map2f,cmdlen+4); - __GLX_PUT_LONG(8,target); - __GLX_PUT_FLOAT(12,u1); - __GLX_PUT_FLOAT(16,u2); - __GLX_PUT_LONG(20,uord); - __GLX_PUT_FLOAT(24,v1); - __GLX_PUT_FLOAT(28,v2); - __GLX_PUT_LONG(32,vord); - - if ((vstr != k) || (ustr != k*vord)) { - GLfloat *buf; - - buf = (GLfloat *) Xmalloc(compsize); - if (!buf) { - __glXSetError(gc, GL_OUT_OF_MEMORY); - return; - } - /* - ** Pack into a u-major ordering. - */ - __glFillMap2f(k, uord, vord, ustr, vstr, pnts, buf); - __glXSendLargeCommand(gc, pc, 36, buf, compsize); - Xfree((char*) buf); - } else { - /* Data is already packed. Just send it out */ - __glXSendLargeCommand(gc, pc, 36, pnts, compsize); - } - } -} - -void __indirect_glEnable(GLenum cap) -{ - __GLX_DECLARE_VARIABLES(); - - __GLX_LOAD_VARIABLES(); - if (!gc->currentDpy) return; - - switch(cap) { - case GL_COLOR_ARRAY: - case GL_EDGE_FLAG_ARRAY: - case GL_INDEX_ARRAY: - case GL_NORMAL_ARRAY: - case GL_TEXTURE_COORD_ARRAY: - case GL_VERTEX_ARRAY: - case GL_SECONDARY_COLOR_ARRAY: - case GL_FOG_COORD_ARRAY: - __indirect_glEnableClientState(cap); - return; - default: - break; - } - - __GLX_BEGIN(X_GLrop_Enable,8); - __GLX_PUT_LONG(4,cap); - __GLX_END(8); -} - -void __indirect_glDisable(GLenum cap) -{ - __GLX_DECLARE_VARIABLES(); - - __GLX_LOAD_VARIABLES(); - if (!gc->currentDpy) return; - - switch(cap) { - case GL_COLOR_ARRAY: - case GL_EDGE_FLAG_ARRAY: - case GL_INDEX_ARRAY: - case GL_NORMAL_ARRAY: - case GL_TEXTURE_COORD_ARRAY: - case GL_VERTEX_ARRAY: - case GL_SECONDARY_COLOR_ARRAY: - case GL_FOG_COORD_ARRAY: - __indirect_glDisableClientState(cap); - return; - default: - break; - } - - __GLX_BEGIN(X_GLrop_Disable,8); - __GLX_PUT_LONG(4,cap); - __GLX_END(8); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/renderpix.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/renderpix.c deleted file mode 100644 index b7d01dc679..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/renderpix.c +++ /dev/null @@ -1,215 +0,0 @@ -/* $XFree86: xc/lib/GL/glx/renderpix.c,v 1.5 2003/09/28 20:15:04 alanh Exp $ */ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include "packrender.h" -#include "indirect.h" - -/** - * Send a large image to the server. If necessary, a buffer is allocated - * to hold the unpacked data that is copied from the clients memory. - * - * \param gc Current GLX context - * \param compsize Size, in bytes, of the image portion - * \param dim Number of dimensions of the image - * \param width Width of the image - * \param height Height of the image, must be 1 for 1D images - * \param depth Depth of the image, must be 1 for 1D or 2D images - * \param format Format of the image - * \param type Data type of the image - * \param src Pointer to the image data - * \param pc Pointer to end of the command header - * \param modes Pointer to the pixel unpack data - * - * \todo - * Modify this function so that \c NULL images are sent using - * \c __glXSendLargeChunk instead of __glXSendLargeCommand. Doing this - * will eliminate the need to allocate a buffer for that case. - * - * \bugs - * The \c fastImageUnpack path, which is thankfully never used, is completely - * broken. - */ -void -__glXSendLargeImage(__GLXcontext *gc, GLint compsize, GLint dim, - GLint width, GLint height, GLint depth, - GLenum format, GLenum type, const GLvoid *src, - GLubyte *pc, GLubyte *modes) -{ - if ( !gc->fastImageUnpack || (src == NULL) ) { - /* Allocate a temporary holding buffer */ - GLubyte *buf = (GLubyte *) Xmalloc(compsize); - if (!buf) { - __glXSetError(gc, GL_OUT_OF_MEMORY); - return; - } - - /* Apply pixel store unpack modes to copy data into buf */ - if ( src != NULL ) { - (*gc->fillImage)(gc, dim, width, height, depth, format, type, - src, buf, modes); - } - else { - if ( dim < 3 ) { - (void) memcpy( modes, __glXDefaultPixelStore + 4, 20 ); - } - else { - (void) memcpy( modes, __glXDefaultPixelStore + 0, 36 ); - } - } - - /* Send large command */ - __glXSendLargeCommand(gc, gc->pc, pc - gc->pc, buf, compsize); - - /* Free buffer */ - Xfree((char*) buf); - } else { - /* Just send the data straight as is */ - __glXSendLargeCommand(gc, gc->pc, pc - gc->pc, pc, compsize); - } -} - -/************************************************************************/ - -/** - * Implement GLX protocol for \c glSeparableFilter2D. - * - * \bugs - * The \c fastImageUnpack path, which is thankfully never used, is completely - * broken. - */ -void __indirect_glSeparableFilter2D(GLenum target, GLenum internalformat, - GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid *row, - const GLvoid *column) -{ - __GLX_DECLARE_VARIABLES(); - GLuint compsize2, hdrlen, totalhdrlen, image1len, image2len; - - __GLX_LOAD_VARIABLES(); - compsize = __glImageSize(width, 1, 1, format, type, 0); - compsize2 = __glImageSize(height, 1, 1, format, type, 0); - totalhdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_HDR_SIZE); - hdrlen = __GLX_PAD(__GLX_CONV_FILT_HDR_SIZE); - image1len = __GLX_PAD(compsize); - image2len = __GLX_PAD(compsize2); - cmdlen = totalhdrlen + image1len + image2len; - if (!gc->currentDpy) return; - - if (cmdlen <= gc->maxSmallRenderCommandSize) { - /* Use GLXRender protocol to send small command */ - __GLX_BEGIN_VARIABLE_WITH_PIXEL(X_GLrop_SeparableFilter2D, cmdlen); - __GLX_PUT_LONG(0,target); - __GLX_PUT_LONG(4,internalformat); - __GLX_PUT_LONG(8,width); - __GLX_PUT_LONG(12,height); - __GLX_PUT_LONG(16,format); - __GLX_PUT_LONG(20,type); - pc += hdrlen; - if (compsize > 0) { - (*gc->fillImage)(gc, 1, width, 1, 1, format, type, - row, pc, pixelHeaderPC); - pc += image1len; - } - if (compsize2 > 0) { - (*gc->fillImage)(gc, 1, height, 1, 1, format, type, - column, pc, NULL); - pc += image2len; - } - if ((compsize == 0) && (compsize2 == 0)) { - /* Setup default store modes */ - (void) memcpy( pixelHeaderPC, __glXDefaultPixelStore + 4, 20 ); - } - __GLX_END(0); - } else { - const GLint bufsize = image1len + image2len; - - /* Use GLXRenderLarge protocol to send command */ - __GLX_BEGIN_VARIABLE_LARGE_WITH_PIXEL(X_GLrop_SeparableFilter2D,cmdlen+4); - __GLX_PUT_LONG(0,target); - __GLX_PUT_LONG(4,internalformat); - __GLX_PUT_LONG(8,width); - __GLX_PUT_LONG(12,height); - __GLX_PUT_LONG(16,format); - __GLX_PUT_LONG(20,type); - pc += hdrlen; - - if (!gc->fastImageUnpack) { - /* Allocate a temporary holding buffer */ - GLubyte *buf = (GLubyte *) Xmalloc(bufsize); - if (!buf) { - __glXSetError(gc, GL_OUT_OF_MEMORY); - return; - } - (*gc->fillImage)(gc, 1, width, 1, 1, format, type, row, buf, pixelHeaderPC); - - (*gc->fillImage)(gc, 1, height, 1, 1, format, type, column, - buf + image1len, pixelHeaderPC); - - /* Send large command */ - __glXSendLargeCommand(gc, gc->pc, (GLint)(pc - gc->pc), buf, bufsize); - /* Free buffer */ - Xfree((char*) buf); - } else { - /* Just send the data straight as is */ - __glXSendLargeCommand(gc, gc->pc, (GLint)(pc - gc->pc), pc, bufsize); - } - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/single2.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/single2.c deleted file mode 100644 index 1c3b8f08ee..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/single2.c +++ /dev/null @@ -1,833 +0,0 @@ -/* $XFree86: xc/lib/GL/glx/single2.c,v 1.10 2004/02/11 19:48:16 dawes Exp $ */ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#include -#include -#include "glxclient.h" -#include "packsingle.h" -#include "glxextensions.h" -#include "indirect.h" -#include "indirect_vertex_array.h" - -/* Used for GL_ARB_transpose_matrix */ -static void TransposeMatrixf(GLfloat m[16]) -{ - int i, j; - for (i = 0; i < 4; i++) { - for (j = 0; j < i; j++) { - GLfloat tmp = m[i*4+j]; - m[i*4+j] = m[j*4+i]; - m[j*4+i] = tmp; - } - } -} - -/* Used for GL_ARB_transpose_matrix */ -static void TransposeMatrixb(GLboolean m[16]) -{ - int i, j; - for (i = 0; i < 4; i++) { - for (j = 0; j < i; j++) { - GLboolean tmp = m[i*4+j]; - m[i*4+j] = m[j*4+i]; - m[j*4+i] = tmp; - } - } -} - -/* Used for GL_ARB_transpose_matrix */ -static void TransposeMatrixd(GLdouble m[16]) -{ - int i, j; - for (i = 0; i < 4; i++) { - for (j = 0; j < i; j++) { - GLdouble tmp = m[i*4+j]; - m[i*4+j] = m[j*4+i]; - m[j*4+i] = tmp; - } - } -} - -/* Used for GL_ARB_transpose_matrix */ -static void TransposeMatrixi(GLint m[16]) -{ - int i, j; - for (i = 0; i < 4; i++) { - for (j = 0; j < i; j++) { - GLint tmp = m[i*4+j]; - m[i*4+j] = m[j*4+i]; - m[j*4+i] = tmp; - } - } -} - - -/** - * Remap a transpose-matrix enum to a non-transpose-matrix enum. Enums - * that are not transpose-matrix enums are unaffected. - */ -static GLenum -RemapTransposeEnum( GLenum e ) -{ - switch( e ) { - case GL_TRANSPOSE_MODELVIEW_MATRIX: - case GL_TRANSPOSE_PROJECTION_MATRIX: - case GL_TRANSPOSE_TEXTURE_MATRIX: - return e - (GL_TRANSPOSE_MODELVIEW_MATRIX - GL_MODELVIEW_MATRIX); - case GL_TRANSPOSE_COLOR_MATRIX: - return GL_COLOR_MATRIX; - default: - return e; - }; -} - - -GLenum __indirect_glGetError(void) -{ - __GLX_SINGLE_DECLARE_VARIABLES(); - GLuint retval = GL_NO_ERROR; - xGLXGetErrorReply reply; - - if (gc->error) { - /* Use internal error first */ - retval = gc->error; - gc->error = GL_NO_ERROR; - return retval; - } - - __GLX_SINGLE_LOAD_VARIABLES(); - __GLX_SINGLE_BEGIN(X_GLsop_GetError,0); - __GLX_SINGLE_READ_XREPLY(); - retval = reply.error; - __GLX_SINGLE_END(); - - return retval; -} - - -/** - * Get the selected attribute from the client state. - * - * \returns - * On success \c GL_TRUE is returned. Otherwise, \c GL_FALSE is returned. - */ -static GLboolean -get_client_data( __GLXattribute * state, GLenum cap, GLintptr * data ) -{ - GLboolean retval = GL_TRUE; - const GLint tex_unit = __glXGetActiveTextureUnit( state ); - - - switch( cap ) { - case GL_VERTEX_ARRAY: - case GL_NORMAL_ARRAY: - case GL_COLOR_ARRAY: - case GL_INDEX_ARRAY: - case GL_EDGE_FLAG_ARRAY: - case GL_SECONDARY_COLOR_ARRAY: - case GL_FOG_COORD_ARRAY: - retval = __glXGetArrayEnable( state, cap, 0, data ); - break; - - case GL_VERTEX_ARRAY_SIZE: - retval = __glXGetArraySize( state, GL_VERTEX_ARRAY, 0, data ); - break; - case GL_COLOR_ARRAY_SIZE: - retval = __glXGetArraySize( state, GL_COLOR_ARRAY, 0, data ); - break; - case GL_SECONDARY_COLOR_ARRAY_SIZE: - retval = __glXGetArraySize( state, GL_SECONDARY_COLOR_ARRAY, 0, data ); - break; - - case GL_VERTEX_ARRAY_TYPE: - retval = __glXGetArrayType( state, GL_VERTEX_ARRAY, 0, data ); - break; - case GL_NORMAL_ARRAY_TYPE: - retval = __glXGetArrayType( state, GL_NORMAL_ARRAY, 0, data ); - break; - case GL_INDEX_ARRAY_TYPE: - retval = __glXGetArrayType( state, GL_INDEX_ARRAY, 0, data ); - break; - case GL_COLOR_ARRAY_TYPE: - retval = __glXGetArrayType( state, GL_COLOR_ARRAY, 0, data ); - break; - case GL_SECONDARY_COLOR_ARRAY_TYPE: - retval = __glXGetArrayType( state, GL_SECONDARY_COLOR_ARRAY, 0, data ); - break; - case GL_FOG_COORD_ARRAY_TYPE: - retval = __glXGetArrayType( state, GL_FOG_COORD_ARRAY, 0, data ); - break; - - case GL_VERTEX_ARRAY_STRIDE: - retval = __glXGetArrayStride( state, GL_VERTEX_ARRAY, 0, data ); - break; - case GL_NORMAL_ARRAY_STRIDE: - retval = __glXGetArrayStride( state, GL_NORMAL_ARRAY, 0, data ); - break; - case GL_INDEX_ARRAY_STRIDE: - retval = __glXGetArrayStride( state, GL_INDEX_ARRAY, 0, data ); - break; - case GL_EDGE_FLAG_ARRAY_STRIDE: - retval = __glXGetArrayStride( state, GL_EDGE_FLAG_ARRAY, 0, data ); - break; - case GL_COLOR_ARRAY_STRIDE: - retval = __glXGetArrayStride( state, GL_COLOR_ARRAY, 0, data ); - break; - case GL_SECONDARY_COLOR_ARRAY_STRIDE: - retval = __glXGetArrayStride( state, GL_SECONDARY_COLOR_ARRAY, 0, data ); - break; - case GL_FOG_COORD_ARRAY_STRIDE: - retval = __glXGetArrayStride( state, GL_FOG_COORD_ARRAY, 0, data ); - break; - - case GL_TEXTURE_COORD_ARRAY: - retval = __glXGetArrayEnable( state, GL_TEXTURE_COORD_ARRAY, tex_unit, data ); - break; - case GL_TEXTURE_COORD_ARRAY_SIZE: - retval = __glXGetArraySize( state, GL_TEXTURE_COORD_ARRAY, tex_unit, data ); - break; - case GL_TEXTURE_COORD_ARRAY_TYPE: - retval = __glXGetArrayType( state, GL_TEXTURE_COORD_ARRAY, tex_unit, data ); - break; - case GL_TEXTURE_COORD_ARRAY_STRIDE: - retval = __glXGetArrayStride( state, GL_TEXTURE_COORD_ARRAY, tex_unit, data ); - break; - - case GL_MAX_ELEMENTS_VERTICES: - case GL_MAX_ELEMENTS_INDICES: - retval = GL_TRUE; - *data = ~0UL; - break; - - - case GL_PACK_ROW_LENGTH: - *data = (GLintptr)state->storePack.rowLength; - break; - case GL_PACK_IMAGE_HEIGHT: - *data = (GLintptr)state->storePack.imageHeight; - break; - case GL_PACK_SKIP_ROWS: - *data = (GLintptr)state->storePack.skipRows; - break; - case GL_PACK_SKIP_PIXELS: - *data = (GLintptr)state->storePack.skipPixels; - break; - case GL_PACK_SKIP_IMAGES: - *data = (GLintptr)state->storePack.skipImages; - break; - case GL_PACK_ALIGNMENT: - *data = (GLintptr)state->storePack.alignment; - break; - case GL_PACK_SWAP_BYTES: - *data = (GLintptr)state->storePack.swapEndian; - break; - case GL_PACK_LSB_FIRST: - *data = (GLintptr)state->storePack.lsbFirst; - break; - case GL_UNPACK_ROW_LENGTH: - *data = (GLintptr)state->storeUnpack.rowLength; - break; - case GL_UNPACK_IMAGE_HEIGHT: - *data = (GLintptr)state->storeUnpack.imageHeight; - break; - case GL_UNPACK_SKIP_ROWS: - *data = (GLintptr)state->storeUnpack.skipRows; - break; - case GL_UNPACK_SKIP_PIXELS: - *data = (GLintptr)state->storeUnpack.skipPixels; - break; - case GL_UNPACK_SKIP_IMAGES: - *data = (GLintptr)state->storeUnpack.skipImages; - break; - case GL_UNPACK_ALIGNMENT: - *data = (GLintptr)state->storeUnpack.alignment; - break; - case GL_UNPACK_SWAP_BYTES: - *data = (GLintptr)state->storeUnpack.swapEndian; - break; - case GL_UNPACK_LSB_FIRST: - *data = (GLintptr)state->storeUnpack.lsbFirst; - break; - case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: - *data = (GLintptr)__GL_CLIENT_ATTRIB_STACK_DEPTH; - break; - case GL_CLIENT_ACTIVE_TEXTURE: - *data = (GLintptr)(tex_unit + GL_TEXTURE0); - break; - - default: - retval = GL_FALSE; - break; - } - - - return retval; -} - - -void __indirect_glGetBooleanv(GLenum val, GLboolean *b) -{ - const GLenum origVal = val; - __GLX_SINGLE_DECLARE_VARIABLES(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - xGLXSingleReply reply; - - val = RemapTransposeEnum( val ); - - __GLX_SINGLE_LOAD_VARIABLES(); - __GLX_SINGLE_BEGIN(X_GLsop_GetBooleanv,4); - __GLX_SINGLE_PUT_LONG(0,val); - __GLX_SINGLE_READ_XREPLY(); - __GLX_SINGLE_GET_SIZE(compsize); - - if (compsize == 0) { - /* - ** Error occured; don't modify user's buffer. - */ - } else { - GLintptr data; - - /* - ** We still needed to send the request to the server in order to - ** find out whether it was legal to make a query (it's illegal, - ** for example, to call a query between glBegin() and glEnd()). - */ - - if ( get_client_data( state, val, & data ) ) { - *b = (GLboolean) data; - } - else { - /* - ** Not a local value, so use what we got from the server. - */ - if (compsize == 1) { - __GLX_SINGLE_GET_CHAR(b); - } else { - __GLX_SINGLE_GET_CHAR_ARRAY(b,compsize); - if (val != origVal) { - /* matrix transpose */ - TransposeMatrixb(b); - } - } - } - } - __GLX_SINGLE_END(); -} - -void __indirect_glGetDoublev(GLenum val, GLdouble *d) -{ - const GLenum origVal = val; - __GLX_SINGLE_DECLARE_VARIABLES(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - xGLXSingleReply reply; - - val = RemapTransposeEnum( val ); - - __GLX_SINGLE_LOAD_VARIABLES(); - __GLX_SINGLE_BEGIN(X_GLsop_GetDoublev,4); - __GLX_SINGLE_PUT_LONG(0,val); - __GLX_SINGLE_READ_XREPLY(); - __GLX_SINGLE_GET_SIZE(compsize); - - if (compsize == 0) { - /* - ** Error occured; don't modify user's buffer. - */ - } else { - GLintptr data; - - /* - ** We still needed to send the request to the server in order to - ** find out whether it was legal to make a query (it's illegal, - ** for example, to call a query between glBegin() and glEnd()). - */ - - if ( get_client_data( state, val, & data ) ) { - *d = (GLdouble) data; - } - else { - /* - ** Not a local value, so use what we got from the server. - */ - if (compsize == 1) { - __GLX_SINGLE_GET_DOUBLE(d); - } else { - __GLX_SINGLE_GET_DOUBLE_ARRAY(d,compsize); - if (val != origVal) { - /* matrix transpose */ - TransposeMatrixd(d); - } - } - } - } - __GLX_SINGLE_END(); -} - -void __indirect_glGetFloatv(GLenum val, GLfloat *f) -{ - const GLenum origVal = val; - __GLX_SINGLE_DECLARE_VARIABLES(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - xGLXSingleReply reply; - - val = RemapTransposeEnum( val ); - - __GLX_SINGLE_LOAD_VARIABLES(); - __GLX_SINGLE_BEGIN(X_GLsop_GetFloatv,4); - __GLX_SINGLE_PUT_LONG(0,val); - __GLX_SINGLE_READ_XREPLY(); - __GLX_SINGLE_GET_SIZE(compsize); - - if (compsize == 0) { - /* - ** Error occured; don't modify user's buffer. - */ - } else { - GLintptr data; - - /* - ** We still needed to send the request to the server in order to - ** find out whether it was legal to make a query (it's illegal, - ** for example, to call a query between glBegin() and glEnd()). - */ - - if ( get_client_data( state, val, & data ) ) { - *f = (GLfloat) data; - } - else { - /* - ** Not a local value, so use what we got from the server. - */ - if (compsize == 1) { - __GLX_SINGLE_GET_FLOAT(f); - } else { - __GLX_SINGLE_GET_FLOAT_ARRAY(f,compsize); - if (val != origVal) { - /* matrix transpose */ - TransposeMatrixf(f); - } - } - } - } - __GLX_SINGLE_END(); -} - -void __indirect_glGetIntegerv(GLenum val, GLint *i) -{ - const GLenum origVal = val; - __GLX_SINGLE_DECLARE_VARIABLES(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - xGLXSingleReply reply; - - val = RemapTransposeEnum( val ); - - __GLX_SINGLE_LOAD_VARIABLES(); - __GLX_SINGLE_BEGIN(X_GLsop_GetIntegerv,4); - __GLX_SINGLE_PUT_LONG(0,val); - __GLX_SINGLE_READ_XREPLY(); - __GLX_SINGLE_GET_SIZE(compsize); - - if (compsize == 0) { - /* - ** Error occured; don't modify user's buffer. - */ - } else { - GLintptr data; - - /* - ** We still needed to send the request to the server in order to - ** find out whether it was legal to make a query (it's illegal, - ** for example, to call a query between glBegin() and glEnd()). - */ - - if ( get_client_data( state, val, & data ) ) { - *i = (GLint) data; - } - else { - /* - ** Not a local value, so use what we got from the server. - */ - if (compsize == 1) { - __GLX_SINGLE_GET_LONG(i); - } else { - __GLX_SINGLE_GET_LONG_ARRAY(i,compsize); - if (val != origVal) { - /* matrix transpose */ - TransposeMatrixi(i); - } - } - } - } - __GLX_SINGLE_END(); -} - -/* -** Send all pending commands to server. -*/ -void __indirect_glFlush(void) -{ - __GLX_SINGLE_DECLARE_VARIABLES(); - - if (!dpy) return; - - __GLX_SINGLE_LOAD_VARIABLES(); - __GLX_SINGLE_BEGIN(X_GLsop_Flush,0); - __GLX_SINGLE_END(); - - /* And finally flush the X protocol data */ - XFlush(dpy); -} - -void __indirect_glFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer) -{ - __GLX_SINGLE_DECLARE_VARIABLES(); - - if (!dpy) return; - - __GLX_SINGLE_LOAD_VARIABLES(); - __GLX_SINGLE_BEGIN(X_GLsop_FeedbackBuffer,8); - __GLX_SINGLE_PUT_LONG(0,size); - __GLX_SINGLE_PUT_LONG(4,type); - __GLX_SINGLE_END(); - - gc->feedbackBuf = buffer; -} - -void __indirect_glSelectBuffer(GLsizei numnames, GLuint *buffer) -{ - __GLX_SINGLE_DECLARE_VARIABLES(); - - if (!dpy) return; - - __GLX_SINGLE_LOAD_VARIABLES(); - __GLX_SINGLE_BEGIN(X_GLsop_SelectBuffer,4); - __GLX_SINGLE_PUT_LONG(0,numnames); - __GLX_SINGLE_END(); - - gc->selectBuf = buffer; -} - -GLint __indirect_glRenderMode(GLenum mode) -{ - __GLX_SINGLE_DECLARE_VARIABLES(); - GLint retval = 0; - xGLXRenderModeReply reply; - - if (!dpy) return -1; - - __GLX_SINGLE_LOAD_VARIABLES(); - __GLX_SINGLE_BEGIN(X_GLsop_RenderMode,4); - __GLX_SINGLE_PUT_LONG(0,mode); - __GLX_SINGLE_READ_XREPLY(); - __GLX_SINGLE_GET_RETVAL(retval,GLint); - - if (reply.newMode != mode) { - /* - ** Switch to new mode did not take effect, therefore an error - ** occured. When an error happens the server won't send us any - ** other data. - */ - } else { - /* Read the feedback or selection data */ - if (gc->renderMode == GL_FEEDBACK) { - __GLX_SINGLE_GET_SIZE(compsize); - __GLX_SINGLE_GET_FLOAT_ARRAY(gc->feedbackBuf, compsize); - } else - if (gc->renderMode == GL_SELECT) { - __GLX_SINGLE_GET_SIZE(compsize); - __GLX_SINGLE_GET_LONG_ARRAY(gc->selectBuf, compsize); - } - gc->renderMode = mode; - } - __GLX_SINGLE_END(); - - return retval; -} - -void __indirect_glFinish(void) -{ - __GLX_SINGLE_DECLARE_VARIABLES(); - xGLXSingleReply reply; - - __GLX_SINGLE_LOAD_VARIABLES(); - __GLX_SINGLE_BEGIN(X_GLsop_Finish,0); - __GLX_SINGLE_READ_XREPLY(); - __GLX_SINGLE_END(); -} - - -/** - * Extract the major and minor version numbers from a version string. - */ -static void -version_from_string( const char * ver, - int * major_version, int * minor_version ) -{ - const char * end; - long major; - long minor; - - major = strtol( ver, (char **) & end, 10 ); - minor = strtol( end + 1, NULL, 10 ); - *major_version = major; - *minor_version = minor; -} - - -const GLubyte *__indirect_glGetString(GLenum name) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - Display *dpy = gc->currentDpy; - GLubyte *s = NULL; - - if (!dpy) return 0; - - /* - ** Return the cached copy if the string has already been fetched - */ - switch(name) { - case GL_VENDOR: - if (gc->vendor) return gc->vendor; - break; - case GL_RENDERER: - if (gc->renderer) return gc->renderer; - break; - case GL_VERSION: - if (gc->version) return gc->version; - break; - case GL_EXTENSIONS: - if (gc->extensions) return gc->extensions; - break; - default: - __glXSetError(gc, GL_INVALID_ENUM); - return 0; - } - - /* - ** Get requested string from server - */ - - (void) __glXFlushRenderBuffer( gc, gc->pc ); - s = (GLubyte *) __glXGetStringFromServer( dpy, gc->majorOpcode, - X_GLsop_GetString, gc->currentContextTag, - name ); - if (!s) { - /* Throw data on the floor */ - __glXSetError(gc, GL_OUT_OF_MEMORY); - } else { - /* - ** Update local cache - */ - switch(name) { - case GL_VENDOR: - gc->vendor = s; - break; - - case GL_RENDERER: - gc->renderer = s; - break; - - case GL_VERSION: { - int client_major; - int client_minor; - - version_from_string( (char *) s, - & gc->server_major, & gc->server_minor ); - __glXGetGLVersion( & client_major, & client_minor ); - - if ( (gc->server_major < client_major) - || ((gc->server_major == client_major) - && (gc->server_minor <= client_minor)) ) { - gc->version = s; - } - else { - /* Allow 7 bytes for the client-side GL version. This allows - * for upto version 999.999. I'm not holding my breath for - * that one! The extra 4 is for the ' ()\0' that will be - * added. - */ - const size_t size = 7 + strlen( (char *) s ) + 4; - - gc->version = Xmalloc( size ); - if ( gc->version == NULL ) { - /* If we couldn't allocate memory for the new string, - * make a best-effort and just copy the client-side version - * to the string and use that. It probably doesn't - * matter what is done here. If there not memory available - * for a short string, the system is probably going to die - * soon anyway. - */ - snprintf( (char *) s, strlen( (char *) s ) + 1, "%u.%u", - client_major, client_minor ); - gc->version = s; - } - else { - snprintf( (char *)gc->version, size, "%u.%u (%s)", - client_major, client_minor, s ); - Xfree( s ); - s = gc->version; - } - } - break; - } - - case GL_EXTENSIONS: { - int major = 1; - int minor = 0; - - /* This code is currently disabled. I was reminded that some - * vendors intentionally exclude some extensions from their - * extension string that are part of the core version they - * advertise. In particular, on Nvidia drivers this means that - * the functionality is supported by the driver, but is not - * hardware accelerated. For example, a TNT will show core - * version 1.5, but most of the post-1.2 functionality is a - * software fallback. - * - * I don't want to break applications that rely on this odd - * behavior. At the same time, the code is written and tested, - * so I didn't want to throw it away. Therefore, the code is here - * but disabled. In the future, we may wish to and an environment - * variable to enable it. - */ - -#if 0 - /* Call glGetString just to make sure that gc->server_major and - * gc->server_minor are set. This version may be higher than we - * can completely support, but it may imply support for some - * extensions that we can support. - * - * For example, at the time of this writing, the client-side - * library only supports upto core GL version 1.2. However, cubic - * textures, multitexture, multisampling, and some other 1.3 - * features are supported. If the server reports back version - * 1.3, but does not report all of those extensions, we will - * enable them. - */ - (void *) glGetString( GL_VERSION ); - major = gc->server_major, - minor = gc->server_minor; -#endif - - __glXCalculateUsableGLExtensions( gc, (char *) s, major, minor ); - XFree( s ); - s = gc->extensions; - break; - } - } - } - return s; -} - -GLboolean __indirect_glIsEnabled(GLenum cap) -{ - __GLX_SINGLE_DECLARE_VARIABLES(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - xGLXSingleReply reply; - GLboolean retval = 0; - GLintptr enable; - - if (!dpy) return 0; - - switch(cap) { - case GL_VERTEX_ARRAY: - case GL_NORMAL_ARRAY: - case GL_COLOR_ARRAY: - case GL_INDEX_ARRAY: - case GL_EDGE_FLAG_ARRAY: - case GL_SECONDARY_COLOR_ARRAY: - case GL_FOG_COORD_ARRAY: - retval = __glXGetArrayEnable( state, cap, 0, & enable ); - assert( retval ); - return (GLboolean) enable; - break; - case GL_TEXTURE_COORD_ARRAY: - retval = __glXGetArrayEnable( state, GL_TEXTURE_COORD_ARRAY, - __glXGetActiveTextureUnit( state ), & enable ); - assert( retval ); - return (GLboolean) enable; - break; - } - - __GLX_SINGLE_LOAD_VARIABLES(); - __GLX_SINGLE_BEGIN(X_GLsop_IsEnabled,4); - __GLX_SINGLE_PUT_LONG(0,cap); - __GLX_SINGLE_READ_XREPLY(); - __GLX_SINGLE_GET_RETVAL(retval, GLboolean); - __GLX_SINGLE_END(); - return retval; -} - -void __indirect_glGetPointerv(GLenum pname, void **params) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - Display *dpy = gc->currentDpy; - - if (!dpy) return; - - switch(pname) { - case GL_VERTEX_ARRAY_POINTER: - case GL_NORMAL_ARRAY_POINTER: - case GL_COLOR_ARRAY_POINTER: - case GL_INDEX_ARRAY_POINTER: - case GL_EDGE_FLAG_ARRAY_POINTER: - __glXGetArrayPointer( state, pname - GL_VERTEX_ARRAY_POINTER - + GL_VERTEX_ARRAY, - 0, params ); - return; - case GL_TEXTURE_COORD_ARRAY_POINTER: - __glXGetArrayPointer( state, GL_TEXTURE_COORD_ARRAY, - __glXGetActiveTextureUnit( state ), params ); - return; - case GL_SECONDARY_COLOR_ARRAY_POINTER: - case GL_FOG_COORD_ARRAY_POINTER: - __glXGetArrayPointer( state, pname - GL_FOG_COORD_ARRAY_POINTER - + GL_FOG_COORD_ARRAY, - 0, params ); - return; - case GL_FEEDBACK_BUFFER_POINTER: - *params = (void *)gc->feedbackBuf; - return; - case GL_SELECTION_BUFFER_POINTER: - *params = (void *)gc->selectBuf; - return; - default: - __glXSetError(gc, GL_INVALID_ENUM); - return; - } -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/singlepix.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/singlepix.c deleted file mode 100644 index 4a10083b8f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/singlepix.c +++ /dev/null @@ -1,105 +0,0 @@ -/* $XFree86: xc/lib/GL/glx/singlepix.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#include "packsingle.h" -#include "indirect.h" - -void __indirect_glGetSeparableFilter(GLenum target, GLenum format, GLenum type, - GLvoid *row, GLvoid *column, GLvoid *span) -{ - __GLX_SINGLE_DECLARE_VARIABLES(); - const __GLXattribute * state; - xGLXGetSeparableFilterReply reply; - GLubyte *rowBuf, *colBuf; - - if (!dpy) return; - __GLX_SINGLE_LOAD_VARIABLES(); - state = gc->client_state_private; - - /* Send request */ - __GLX_SINGLE_BEGIN(X_GLsop_GetSeparableFilter, __GLX_PAD(13)); - __GLX_SINGLE_PUT_LONG(0,target); - __GLX_SINGLE_PUT_LONG(4,format); - __GLX_SINGLE_PUT_LONG(8,type); - __GLX_SINGLE_PUT_CHAR(12,state->storePack.swapEndian); - __GLX_SINGLE_READ_XREPLY(); - compsize = reply.length << 2; - - if (compsize != 0) { - GLint width, height; - GLint widthsize, heightsize; - - width = reply.width; - height = reply.height; - - widthsize = __glImageSize(width,1,1,format, type, 0); - heightsize = __glImageSize(height,1,1,format, type, 0); - - /* Allocate a holding buffer to transform the data from */ - rowBuf = (GLubyte*) Xmalloc(widthsize); - if (!rowBuf) { - /* Throw data away */ - _XEatData(dpy, compsize); - __glXSetError(gc, GL_OUT_OF_MEMORY); - UnlockDisplay(dpy); - SyncHandle(); - return; - } else { - __GLX_SINGLE_GET_CHAR_ARRAY(((char*)rowBuf),widthsize); - __glEmptyImage(gc, 1, width, 1, 1, format, type, rowBuf, row); - Xfree((char*) rowBuf); - } - colBuf = (GLubyte*) Xmalloc(heightsize); - if (!colBuf) { - /* Throw data away */ - _XEatData(dpy, compsize - __GLX_PAD(widthsize)); - __glXSetError(gc, GL_OUT_OF_MEMORY); - UnlockDisplay(dpy); - SyncHandle(); - return; - } else { - __GLX_SINGLE_GET_CHAR_ARRAY(((char*)colBuf),heightsize); - __glEmptyImage(gc, 1, height, 1, 1, format, type, colBuf, column); - Xfree((char*) colBuf); - } - } else { - /* - ** don't modify user's buffer. - */ - } - __GLX_SINGLE_END(); - -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/vertarr.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/vertarr.c deleted file mode 100644 index 483a166ea2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/vertarr.c +++ /dev/null @@ -1,203 +0,0 @@ -/* $XFree86: xc/lib/GL/glx/vertarr.c,v 1.4 2001/03/25 05:32:00 tsi Exp $ */ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#include "glxclient.h" -#include "indirect.h" -#include "indirect_vertex_array.h" - - -/*****************************************************************************/ - -/** - * \name Vertex array pointer bridge functions - * - * When EXT_vertex_array was moved into the core GL spec, the \c count - * parameter was lost. This libGL really only wants to implement the GL 1.1 - * version, but we need to support applications that were written to the old - * interface. These bridge functions are part of the glue that makes this - * happen. - */ -/*@{*/ -void __indirect_glColorPointerEXT(GLint size, GLenum type, GLsizei stride, - GLsizei count, const GLvoid * pointer ) -{ - (void) count; __indirect_glColorPointer( size, type, stride, pointer ); -} - -void __indirect_glEdgeFlagPointerEXT(GLsizei stride, - GLsizei count, const GLboolean * pointer ) -{ - (void) count; __indirect_glEdgeFlagPointer( stride, pointer ); -} - -void __indirect_glIndexPointerEXT(GLenum type, GLsizei stride, - GLsizei count, const GLvoid * pointer ) -{ - (void) count; __indirect_glIndexPointer( type, stride, pointer ); -} - -void __indirect_glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, - const GLvoid * pointer ) -{ - (void) count; __indirect_glNormalPointer( type, stride, pointer ); -} - -void __indirect_glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, - GLsizei count, const GLvoid * pointer ) -{ - (void) count; __indirect_glTexCoordPointer( size, type, stride, pointer ); -} - -void __indirect_glVertexPointerEXT(GLint size, GLenum type, GLsizei stride, - GLsizei count, const GLvoid * pointer ) -{ - (void) count; __indirect_glVertexPointer( size, type, stride, pointer ); -} -/*@}*/ - -/*****************************************************************************/ - -void __indirect_glInterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer) -{ - __GLXcontext *gc = __glXGetCurrentContext(); - __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); - -#define NONE {0, 0, 0} -#define F(x) {GL_FLOAT, x, x * sizeof(GLfloat)} -#define UB4 {GL_UNSIGNED_BYTE, 4, 4 * sizeof(GLubyte)} - - /* Each row in this array describes the elements of a particular - * interleaved array mode. Each column describes, in the order in which - * they appear in the interleaved arrays, one of the four possible types - * of vertex data that can appear in an interleaved array. - */ - struct { - /** - * The enum describing the GL type, as would be passed to the - * appropriate gl*Pointer function. - */ - GLushort type; - - /** - * Number of elements in the subarray, as would be passed (as the - * \c size parameter) to the appropriate gl*Pointer function. - */ - GLubyte count; - - /** - * True size of a single element in the subarray, as would be passed - * (as the \c stride parameter) to the appropriate gl*Pointer - * function. - */ - GLubyte size; - } - static const modes[14][4] = { - /* texture color normal vertex */ - {NONE, NONE, NONE, F(2)}, /* GL_V2F */ - {NONE, NONE, NONE, F(3)}, /* GL_V3F */ - {NONE, UB4, NONE, F(2)}, /* GL_C4UB_V2F */ - {NONE, UB4, NONE, F(3)}, /* GL_C4UB_V3F */ - {NONE, F(3), NONE, F(3)}, /* GL_C3F_V3F */ - {NONE, NONE, F(3), F(3)}, /* GL_N3F_V3F */ - {NONE, F(4), F(3), F(3)}, /* GL_C4F_N3F_V3F */ - {F(2), NONE, NONE, F(3)}, /* GL_T2F_V3F */ - {F(4), NONE, NONE, F(4)}, /* GL_T4F_V4F */ - {F(2), UB4, NONE, F(3)}, /* GL_T2F_C4UB_V3F */ - {F(2), F(3), NONE, F(3)}, /* GL_T2F_C3F_V3F */ - {F(2), NONE, F(3), F(3)}, /* GL_T2F_N3F_V3F */ - {F(2), F(4), F(3), F(3)}, /* GL_T2F_C4F_N3F_V3F */ - {F(4), F(4), F(3), F(4)}, /* GL_T4F_C4F_N3F_V4F */ - }; -#undef NONE -#undef F -#undef UB4 - - GLint trueStride, size; - int offsets[4]; - unsigned i; - const int idx = format - GL_V2F; - - - /* All valid formats are on the range [GL_V2F, GL_V2F+0x0D]. Since idx - * is just the format biased by -GL_V2F, all valid idx values are on the - * range [0, 0x0D]. - */ - if ( (idx < 0) || (idx > 0x0D) ) { - __glXSetError(gc, GL_INVALID_ENUM); - return; - } - - if ( stride < 0 ) { - __glXSetError(gc, GL_INVALID_VALUE); - return; - } - - - /* If the 'count' for a subarray is non-zero, then the offset of its - * first element is at the currently accumulated 'size'. - */ - size = 0; - for ( i = 0 ; i < 4 ; i++ ) { - offsets[i] = (modes[idx][i].count != 0) ? size : -1; - size += modes[idx][i].size; - } - - trueStride = (stride == 0) ? size : stride; - - __glXArrayDisableAll( state ); - - if ( offsets[0] >= 0 ) { - __indirect_glEnableClientState(GL_TEXTURE_COORD_ARRAY); - __indirect_glTexCoordPointer( modes[idx][0].count, GL_FLOAT, - trueStride, - (const char *) pointer ); - } - if ( offsets[1] >= 0 ) { - __indirect_glEnableClientState(GL_COLOR_ARRAY); - __indirect_glColorPointer( modes[idx][1].count, modes[idx][1].type, - trueStride, - (const char *) pointer + offsets[1] ); - } - if ( offsets[2] >= 0 ) { - __indirect_glEnableClientState(GL_NORMAL_ARRAY); - __indirect_glNormalPointer( GL_FLOAT, trueStride, - (const char *)pointer + offsets[2] ); - } - __indirect_glEnableClientState(GL_VERTEX_ARRAY); - __indirect_glVertexPointer( modes[idx][3].count, GL_FLOAT, - trueStride, - (const char *)pointer + offsets[3] ); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/xf86dri.h b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/xf86dri.h deleted file mode 100644 index 0a2bb24971..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/xf86dri.h +++ /dev/null @@ -1,122 +0,0 @@ -/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.8 2002/10/30 12:51:25 alanh Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright 2000 VA Linux Systems, Inc. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/** - * \file xf86dri.h - * Protocol numbers and function prototypes for DRI X protocol. - * - * \author Kevin E. Martin - * \author Jens Owen - * \author Rickard E. (Rik) Faith - */ - -#ifndef _XF86DRI_H_ -#define _XF86DRI_H_ - -#include -#include - -#define X_XF86DRIQueryVersion 0 -#define X_XF86DRIQueryDirectRenderingCapable 1 -#define X_XF86DRIOpenConnection 2 -#define X_XF86DRICloseConnection 3 -#define X_XF86DRIGetClientDriverName 4 -#define X_XF86DRICreateContext 5 -#define X_XF86DRIDestroyContext 6 -#define X_XF86DRICreateDrawable 7 -#define X_XF86DRIDestroyDrawable 8 -#define X_XF86DRIGetDrawableInfo 9 -#define X_XF86DRIGetDeviceInfo 10 -#define X_XF86DRIAuthConnection 11 -#define X_XF86DRIOpenFullScreen 12 /* Deprecated */ -#define X_XF86DRICloseFullScreen 13 /* Deprecated */ - -#define XF86DRINumberEvents 0 - -#define XF86DRIClientNotLocal 0 -#define XF86DRIOperationNotSupported 1 -#define XF86DRINumberErrors (XF86DRIOperationNotSupported + 1) - -#ifndef _XF86DRI_SERVER_ - -#include - -_XFUNCPROTOBEGIN - -Bool XF86DRIQueryExtension( Display *dpy, int *event_base, int *error_base ); - -Bool XF86DRIQueryVersion( Display *dpy, int *majorVersion, int *minorVersion, - int *patchVersion ); - -Bool XF86DRIQueryDirectRenderingCapable( Display *dpy, int screen, - Bool *isCapable ); - -Bool XF86DRIOpenConnection( Display *dpy, int screen, drm_handle_t *hSAREA, - char **busIDString ); - -Bool XF86DRIAuthConnection( Display *dpy, int screen, drm_magic_t magic ); - -Bool XF86DRICloseConnection( Display *dpy, int screen ); - -Bool XF86DRIGetClientDriverName( Display *dpy, int screen, - int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, - int *ddxDriverPatchVersion, char **clientDriverName ); - -Bool XF86DRICreateContext( Display *dpy, int screen, Visual *visual, - XID *ptr_to_returned_context_id, drm_context_t *hHWContext ); - -Bool XF86DRICreateContextWithConfig( Display *dpy, int screen, int configID, - XID *ptr_to_returned_context_id, drm_context_t *hHWContext ); - -extern GLboolean XF86DRIDestroyContext( __DRInativeDisplay *dpy, int screen, - __DRIid context_id ); - -extern GLboolean XF86DRICreateDrawable( __DRInativeDisplay *dpy, int screen, - __DRIid drawable, drm_drawable_t *hHWDrawable ); - -extern GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay *dpy, int screen, - __DRIid drawable); - -Bool XF86DRIGetDrawableInfo( Display *dpy, int screen, Drawable drawable, - unsigned int *index, unsigned int *stamp, - int *X, int *Y, int *W, int *H, - int *numClipRects, drm_clip_rect_t ** pClipRects, - int *backX, int *backY, - int *numBackClipRects, drm_clip_rect_t **pBackClipRects ); - -Bool XF86DRIGetDeviceInfo( Display *dpy, int screen, - drm_handle_t *hFrameBuffer, int *fbOrigin, int *fbSize, - int *fbStride, int *devPrivateSize, void **pDevPrivate ); - -_XFUNCPROTOEND - -#endif /* _XF86DRI_SERVER_ */ - -#endif /* _XF86DRI_H_ */ - diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/xf86dristr.h b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/xf86dristr.h deleted file mode 100644 index ac05b183b3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/xf86dristr.h +++ /dev/null @@ -1,343 +0,0 @@ -/* $XFree86: xc/lib/GL/dri/xf86dristr.h,v 1.10 2002/10/30 12:51:25 alanh Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright 2000 VA Linux Systems, Inc. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Jens Owen - * Rickard E. (Rik) Fiath - * - */ - -#ifndef _XF86DRISTR_H_ -#define _XF86DRISTR_H_ - -#include "xf86dri.h" - -#define XF86DRINAME "XFree86-DRI" - -/* The DRI version number. This was originally set to be the same of the - * XFree86 version number. However, this version is really indepedent of - * the XFree86 version. - * - * Version History: - * 4.0.0: Original - * 4.0.1: Patch to bump clipstamp when windows are destroyed, 28 May 02 - * 4.1.0: Add transition from single to multi in DRMInfo rec, 24 Jun 02 - */ -#define XF86DRI_MAJOR_VERSION 4 -#define XF86DRI_MINOR_VERSION 1 -#define XF86DRI_PATCH_VERSION 0 - -typedef struct _XF86DRIQueryVersion { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIQueryVersion */ - CARD16 length B16; -} xXF86DRIQueryVersionReq; -#define sz_xXF86DRIQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of DRI protocol */ - CARD16 minorVersion B16; /* minor version of DRI protocol */ - CARD32 patchVersion B32; /* patch version of DRI protocol */ - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86DRIQueryVersionReply; -#define sz_xXF86DRIQueryVersionReply 32 - -typedef struct _XF86DRIQueryDirectRenderingCapable { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* X_DRIQueryDirectRenderingCapable */ - CARD16 length B16; - CARD32 screen B32; -} xXF86DRIQueryDirectRenderingCapableReq; -#define sz_xXF86DRIQueryDirectRenderingCapableReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - BOOL isCapable; - BOOL pad2; - BOOL pad3; - BOOL pad4; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; - CARD32 pad8 B32; - CARD32 pad9 B32; -} xXF86DRIQueryDirectRenderingCapableReply; -#define sz_xXF86DRIQueryDirectRenderingCapableReply 32 - -typedef struct _XF86DRIOpenConnection { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIOpenConnection */ - CARD16 length B16; - CARD32 screen B32; -} xXF86DRIOpenConnectionReq; -#define sz_xXF86DRIOpenConnectionReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 hSAREALow B32; - CARD32 hSAREAHigh B32; - CARD32 busIdStringLength B32; - CARD32 pad6 B32; - CARD32 pad7 B32; - CARD32 pad8 B32; -} xXF86DRIOpenConnectionReply; -#define sz_xXF86DRIOpenConnectionReply 32 - -typedef struct _XF86DRIAuthConnection { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRICloseConnection */ - CARD16 length B16; - CARD32 screen B32; - CARD32 magic B32; -} xXF86DRIAuthConnectionReq; -#define sz_xXF86DRIAuthConnectionReq 12 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 authenticated B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86DRIAuthConnectionReply; -#define zx_xXF86DRIAuthConnectionReply 32 - -typedef struct _XF86DRICloseConnection { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRICloseConnection */ - CARD16 length B16; - CARD32 screen B32; -} xXF86DRICloseConnectionReq; -#define sz_xXF86DRICloseConnectionReq 8 - -typedef struct _XF86DRIGetClientDriverName { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIGetClientDriverName */ - CARD16 length B16; - CARD32 screen B32; -} xXF86DRIGetClientDriverNameReq; -#define sz_xXF86DRIGetClientDriverNameReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 ddxDriverMajorVersion B32; - CARD32 ddxDriverMinorVersion B32; - CARD32 ddxDriverPatchVersion B32; - CARD32 clientDriverNameLength B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86DRIGetClientDriverNameReply; -#define sz_xXF86DRIGetClientDriverNameReply 32 - -typedef struct _XF86DRICreateContext { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRICreateContext */ - CARD16 length B16; - CARD32 screen B32; - CARD32 visual B32; - CARD32 context B32; -} xXF86DRICreateContextReq; -#define sz_xXF86DRICreateContextReq 16 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 hHWContext B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86DRICreateContextReply; -#define sz_xXF86DRICreateContextReply 32 - -typedef struct _XF86DRIDestroyContext { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIDestroyContext */ - CARD16 length B16; - CARD32 screen B32; - CARD32 context B32; -} xXF86DRIDestroyContextReq; -#define sz_xXF86DRIDestroyContextReq 12 - -typedef struct _XF86DRICreateDrawable { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRICreateDrawable */ - CARD16 length B16; - CARD32 screen B32; - CARD32 drawable B32; -} xXF86DRICreateDrawableReq; -#define sz_xXF86DRICreateDrawableReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 hHWDrawable B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86DRICreateDrawableReply; -#define sz_xXF86DRICreateDrawableReply 32 - -typedef struct _XF86DRIDestroyDrawable { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIDestroyDrawable */ - CARD16 length B16; - CARD32 screen B32; - CARD32 drawable B32; -} xXF86DRIDestroyDrawableReq; -#define sz_xXF86DRIDestroyDrawableReq 12 - -typedef struct _XF86DRIGetDrawableInfo { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIGetDrawableInfo */ - CARD16 length B16; - CARD32 screen B32; - CARD32 drawable B32; -} xXF86DRIGetDrawableInfoReq; -#define sz_xXF86DRIGetDrawableInfoReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 drawableTableIndex B32; - CARD32 drawableTableStamp B32; - INT16 drawableX B16; - INT16 drawableY B16; - INT16 drawableWidth B16; - INT16 drawableHeight B16; - CARD32 numClipRects B32; - INT16 backX B16; - INT16 backY B16; - CARD32 numBackClipRects B32; -} xXF86DRIGetDrawableInfoReply; - -#define sz_xXF86DRIGetDrawableInfoReply 36 - - -typedef struct _XF86DRIGetDeviceInfo { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIGetDeviceInfo */ - CARD16 length B16; - CARD32 screen B32; -} xXF86DRIGetDeviceInfoReq; -#define sz_xXF86DRIGetDeviceInfoReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 hFrameBufferLow B32; - CARD32 hFrameBufferHigh B32; - CARD32 framebufferOrigin B32; - CARD32 framebufferSize B32; - CARD32 framebufferStride B32; - CARD32 devPrivateSize B32; -} xXF86DRIGetDeviceInfoReply; -#define sz_xXF86DRIGetDeviceInfoReply 32 - -typedef struct _XF86DRIOpenFullScreen { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIOpenFullScreen */ - CARD16 length B16; - CARD32 screen B32; - CARD32 drawable B32; -} xXF86DRIOpenFullScreenReq; -#define sz_xXF86DRIOpenFullScreenReq 12 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 isFullScreen B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86DRIOpenFullScreenReply; -#define sz_xXF86DRIOpenFullScreenReply 32 - -typedef struct _XF86DRICloseFullScreen { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRICloseFullScreen */ - CARD16 length B16; - CARD32 screen B32; - CARD32 drawable B32; -} xXF86DRICloseFullScreenReq; -#define sz_xXF86DRICloseFullScreenReq 12 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXF86DRICloseFullScreenReply; -#define sz_xXF86DRICloseFullScreenReply 32 - - -#endif /* _XF86DRISTR_H_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/xfont.c b/nx-X11/extras/Mesa_6.4.2/src/glx/x11/xfont.c deleted file mode 100644 index 5f23a79622..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/glx/x11/xfont.c +++ /dev/null @@ -1,377 +0,0 @@ -/* $XFree86: xc/lib/GL/glx/xfont.c,v 1.6 2001/05/02 15:06:02 dawes Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.1 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* xfonts.c -- glXUseXFont() for Mesa written by - * Copyright (C) 1995 Thorsten.Ohl @ Physik.TH-Darmstadt.de - */ - -/* - This was take from Mesa and modified to work in the real GLX structure. - It provides a fully client side implementation of glXUseXFont and is - called by that routine when direct rendering is enabled. -*/ - - -#include "glxclient.h" - -/* Some debugging info. */ - -#ifdef DEBUG -#undef _R -#undef _G -#undef _B -#include - -int debug_xfonts = 0; - -static void -dump_char_struct (XCharStruct *ch, char *prefix) -{ - printf ("%slbearing = %d, rbearing = %d, width = %d\n", - prefix, ch->lbearing, ch->rbearing, ch->width); - printf ("%sascent = %d, descent = %d, attributes = %u\n", - prefix, ch->ascent, ch->descent, (unsigned int) ch->attributes); -} - -static void -dump_font_struct (XFontStruct *font) -{ - printf ("ascent = %d, descent = %d\n", font->ascent, font->descent); - printf ("char_or_byte2 = (%u,%u)\n", - font->min_char_or_byte2, font->max_char_or_byte2); - printf ("byte1 = (%u,%u)\n", font->min_byte1, font->max_byte1); - printf ("all_chars_exist = %s\n", font->all_chars_exist ? "True" : -"False"); - printf ("default_char = %c (\\%03o)\n", - (char) (isprint (font->default_char) ? font->default_char : ' '), - font->default_char); - dump_char_struct (&font->min_bounds, "min> "); - dump_char_struct (&font->max_bounds, "max> "); -#if 0 - for (c = font->min_char_or_byte2; c <= font->max_char_or_byte2; c++) - { - char prefix[8]; - sprintf (prefix, "%d> ", c); - dump_char_struct (&font->per_char[c], prefix); - } -#endif -} - -static void -dump_bitmap (unsigned int width, unsigned int height, GLubyte *bitmap) -{ - unsigned int x, y; - - printf (" "); - for (x = 0; x < 8*width; x++) - printf ("%o", 7 - (x % 8)); - putchar ('\n'); - for (y = 0; y < height; y++) - { - printf ("%3o:", y); - for (x = 0; x < 8*width; x++) - putchar ((bitmap[width*(height - y - 1) + x/8] & (1 << (7 - (x % -8)))) - ? '*' : '.'); - printf (" "); - for (x = 0; x < width; x++) - printf ("0x%02x, ", bitmap[width*(height - y - 1) + x]); - putchar ('\n'); - } -} -#endif /* DEBUG */ - - -/* Implementation. */ - -/* Fill a BITMAP with a character C from thew current font - in the graphics context GC. WIDTH is the width in bytes - and HEIGHT is the height in bits. - - Note that the generated bitmaps must be used with - - glPixelStorei (GL_UNPACK_SWAP_BYTES, GL_FALSE); - glPixelStorei (GL_UNPACK_LSB_FIRST, GL_FALSE); - glPixelStorei (GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei (GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei (GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei (GL_UNPACK_ALIGNMENT, 1); - - Possible optimizations: - - * use only one reusable pixmap with the maximum dimensions. - * draw the entire font into a single pixmap (careful with - proportional fonts!). -*/ - - -/* - * Generate OpenGL-compatible bitmap. - */ -static void -fill_bitmap (Display *dpy, Window win, GC gc, - unsigned int width, unsigned int height, - int x0, int y0, unsigned int c, GLubyte *bitmap) -{ - XImage *image; - unsigned int x, y; - Pixmap pixmap; - XChar2b char2b; - - pixmap = XCreatePixmap (dpy, win, 8*width, height, 1); - XSetForeground(dpy, gc, 0); - XFillRectangle (dpy, pixmap, gc, 0, 0, 8*width, height); - XSetForeground(dpy, gc, 1); - - char2b.byte1 = (c >> 8) & 0xff; - char2b.byte2 = (c & 0xff); - - XDrawString16 (dpy, pixmap, gc, x0, y0, &char2b, 1); - - image = XGetImage (dpy, pixmap, 0, 0, 8*width, height, 1, XYPixmap); - if (image) { - /* Fill the bitmap (X11 and OpenGL are upside down wrt each other). */ - for (y = 0; y < height; y++) - for (x = 0; x < 8*width; x++) - if (XGetPixel (image, x, y)) - bitmap[width*(height - y - 1) + x/8] |= (1 << (7 - (x % 8))); - XDestroyImage (image); - } - - XFreePixmap (dpy, pixmap); -} - -/* - * determine if a given glyph is valid and return the - * corresponding XCharStruct. - */ -static XCharStruct *isvalid(XFontStruct *fs, int which) -{ - unsigned int rows,pages; - int byte1 = 0, byte2 = 0; - int i,valid = 1; - - rows = fs->max_byte1 - fs->min_byte1 + 1; - pages = fs->max_char_or_byte2 - fs->min_char_or_byte2 + 1; - - if (rows == 1) { - /* "linear" fonts */ - if ((fs->min_char_or_byte2 > which) || - (fs->max_char_or_byte2 < which)) valid = 0; - } else { - /* "matrix" fonts */ - byte2 = which & 0xff; - byte1 = which >> 8; - if ((fs->min_char_or_byte2 > byte2) || - (fs->max_char_or_byte2 < byte2) || - (fs->min_byte1 > byte1) || - (fs->max_byte1 < byte1)) valid = 0; - } - - if (valid) { - if (fs->per_char) { - if (rows == 1) { - /* "linear" fonts */ - return(fs->per_char + (which-fs->min_char_or_byte2) ); - } else { - /* "matrix" fonts */ - i = ((byte1 - fs->min_byte1) * pages) + - (byte2 - fs->min_char_or_byte2); - return(fs->per_char + i); - } - } else { - return(&fs->min_bounds); - } - } - return(NULL); -} - - -void DRI_glXUseXFont( Font font, int first, int count, int listbase ) -{ - GLXContext CC; - Display *dpy; - Window win; - Pixmap pixmap; - GC gc; - XGCValues values; - unsigned long valuemask; - XFontStruct *fs; - - GLint swapbytes, lsbfirst, rowlength; - GLint skiprows, skippixels, alignment; - - unsigned int max_width, max_height, max_bm_width, max_bm_height; - GLubyte *bm; - - int i; - - CC = __glXGetCurrentContext(); - dpy = CC->currentDpy; - win = CC->currentDrawable; - - fs = XQueryFont (dpy, font); - if (!fs) - { - __glXSetError(CC, GL_INVALID_VALUE); - return; - } - - /* Allocate a bitmap that can fit all characters. */ - max_width = fs->max_bounds.rbearing - fs->min_bounds.lbearing; - max_height = fs->max_bounds.ascent + fs->max_bounds.descent; - max_bm_width = (max_width + 7) / 8; - max_bm_height = max_height; - - bm = (GLubyte *) Xmalloc((max_bm_width * max_bm_height) * sizeof -(GLubyte)); - if (!bm) { - XFreeFontInfo( NULL, fs, 1 ); - __glXSetError(CC, GL_OUT_OF_MEMORY); - return; - } - -#if 0 - /* get the page info */ - pages = fs->max_char_or_byte2 - fs->min_char_or_byte2 + 1; - firstchar = (fs->min_byte1 << 8) + fs->min_char_or_byte2; - lastchar = (fs->max_byte1 << 8) + fs->max_char_or_byte2; - rows = fs->max_byte1 - fs->min_byte1 + 1; - unsigned int first_char, last_char, pages, rows; -#endif - - /* Save the current packing mode for bitmaps. */ - glGetIntegerv (GL_UNPACK_SWAP_BYTES, &swapbytes); - glGetIntegerv (GL_UNPACK_LSB_FIRST, &lsbfirst); - glGetIntegerv (GL_UNPACK_ROW_LENGTH, &rowlength); - glGetIntegerv (GL_UNPACK_SKIP_ROWS, &skiprows); - glGetIntegerv (GL_UNPACK_SKIP_PIXELS, &skippixels); - glGetIntegerv (GL_UNPACK_ALIGNMENT, &alignment); - - /* Enforce a standard packing mode which is compatible with - fill_bitmap() from above. This is actually the default mode, - except for the (non)alignment. */ - glPixelStorei (GL_UNPACK_SWAP_BYTES, GL_FALSE); - glPixelStorei (GL_UNPACK_LSB_FIRST, GL_FALSE); - glPixelStorei (GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei (GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei (GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei (GL_UNPACK_ALIGNMENT, 1); - - pixmap = XCreatePixmap (dpy, win, 10, 10, 1); - values.foreground = BlackPixel (dpy, DefaultScreen (dpy)); - values.background = WhitePixel (dpy, DefaultScreen (dpy)); - values.font = fs->fid; - valuemask = GCForeground | GCBackground | GCFont; - gc = XCreateGC (dpy, pixmap, valuemask, &values); - XFreePixmap (dpy, pixmap); - -#ifdef DEBUG - if (debug_xfonts) - dump_font_struct (fs); -#endif - - for (i = 0; i < count; i++) - { - unsigned int width, height, bm_width, bm_height; - GLfloat x0, y0, dx, dy; - XCharStruct *ch; - int x, y; - unsigned int c = first + i; - int list = listbase + i; - int valid; - - /* check on index validity and get the bounds */ - ch = isvalid(fs, c); - if (!ch) { - ch = &fs->max_bounds; - valid = 0; - } else { - valid = 1; - } - -#ifdef DEBUG - if (debug_xfonts) { - char s[7]; - sprintf (s, isprint (c) ? "%c> " : "\\%03o> ", c); - dump_char_struct (ch, s); - } -#endif - - /* glBitmap()' parameters: - straight from the glXUseXFont(3) manpage. */ - width = ch->rbearing - ch->lbearing; - height = ch->ascent + ch->descent; - x0 = - ch->lbearing; - y0 = ch->descent - 1; - dx = ch->width; - dy = 0; - - /* X11's starting point. */ - x = - ch->lbearing; - y = ch->ascent; - - /* Round the width to a multiple of eight. We will use this also - for the pixmap for capturing the X11 font. This is slightly - inefficient, but it makes the OpenGL part real easy. */ - bm_width = (width + 7) / 8; - bm_height = height; - - glNewList (list, GL_COMPILE); - if (valid && (bm_width > 0) && (bm_height > 0)) { - - memset (bm, '\0', bm_width * bm_height); - fill_bitmap (dpy, win, gc, bm_width, bm_height, x, y, c, bm); - - glBitmap (width, height, x0, y0, dx, dy, bm); -#ifdef DEBUG - if (debug_xfonts) { - printf ("width/height = %u/%u\n", width, height); - printf ("bm_width/bm_height = %u/%u\n", bm_width, -bm_height); - dump_bitmap (bm_width, bm_height, bm); - } -#endif - } else { - glBitmap (0, 0, 0.0, 0.0, dx, dy, NULL); - } - glEndList (); - } - - Xfree(bm); - XFreeFontInfo( NULL, fs, 1 ); - XFreeGC (dpy, gc); - - /* Restore saved packing modes. */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, swapbytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, lsbfirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, rowlength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, skiprows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, skippixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, alignment); -} - -/* The End. */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/Makefile b/nx-X11/extras/Mesa_6.4.2/src/mesa/Makefile deleted file mode 100644 index b6c0b85f42..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/Makefile +++ /dev/null @@ -1,230 +0,0 @@ -# src/mesa/Makefile - -TOP = ../.. -include $(TOP)/configs/current - -include sources - - -GL_MAJOR = 1 -GL_MINOR = 5 -GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY) - - -.SUFFIXES : .cpp - -.c.o: - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ - -.cpp.o: - $(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $@ - -.S.o: - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ - - -# Figure out what to make here -default: - @if [ "${DRIVER_DIRS}" = "dri" ] ; then \ - $(MAKE) linux-solo ; \ - elif [ "${DRIVER_DIRS}" = "osmesa" ] ; then \ - $(MAKE) osmesa-only ; \ - elif [ "$(DRIVER_DIRS)" = "beos" ]; then \ - $(MAKE) beos ; \ - elif [ "$(DRIVER_DIRS)" = "directfb" ]; then \ - $(MAKE) directfb; \ - else \ - $(MAKE) stand-alone ; \ - fi - -# BeOS driver target -beos: depend subdirs mesa.a - cd drivers/beos; $(MAKE) - - -install: default - @if [ "${DRIVER_DIRS}" = "dri" ] ; then \ - cd drivers/dri ; $(MAKE) install ; \ - fi - -###################################################################### -# Linux solo DRI drivers - -SOLO_C_SOURCES = \ - $(MAIN_SOURCES) \ - $(MATH_SOURCES) \ - $(ARRAY_CACHE_SOURCES) \ - $(TNL_SOURCES) \ - $(SWRAST_SOURCES) \ - $(SWRAST_SETUP_SOURCES) \ - $(SHADER_SOURCES) \ - $(SLANG_SOURCES) \ - $(ASM_C_SOURCES) - -SOLO_OBJECTS = $(SOLO_C_SOURCES:.c=.o) \ - $(ASM_SOURCES:.S=.o) - -linux-solo: depend subdirs mesa.a drivers-dri - -# Make archive of core object files -mesa.a: $(SOLO_OBJECTS) - rm -f $@ - ar rcv $@ $(SOLO_OBJECTS) - ranlib $@ - @if [ "${CONFIG_NAME}" = "beos" ] ; then \ - mimeset -f "$@" ; \ - fi - -# note: cannot use the name of the directory ("drivers") as the -# target, otherwise make will look & see that the "drivers" directory -# already exists, so not try to rebuild it... -drivers-dri: - cd drivers/dri ; $(MAKE) - - - -##################################################################### -# Stand-alone Mesa libGL, no built-in drivers (DirectFB) - -LIBGL_CORE_SOURCES = \ - $(CORE_SOURCES) \ - $(ASM_SOURCES) - -LIBGL_CORE_OBJECTS = \ - $(CORE_OBJECTS) \ - $(ASM_SOURCES:.S=.o) - -# Make libGL from core object files -libgl-core: $(LIBGL_CORE_OBJECTS) - @ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \ - -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \ - -install $(LIB_DIR) $(MKLIB_OPTIONS) $(LIBGL_CORE_OBJECTS) $(GL_LIB_DEPS) - -# DirectFB driver target -directfb: depend subdirs libgl-core - cd drivers/directfb; $(MAKE) - - - -###################################################################### -# Stand-alone Mesa libGL and libOSMesa - -STAND_ALONE_DRIVER_SOURCES = \ - $(COMMON_DRIVER_SOURCES) \ - $(X11_DRIVER_SOURCES) \ - $(GLIDE_DRIVER_SOURCES) \ - $(SVGA_DRIVER_SOURCES) \ - $(FBDEV_DRIVER_SOURCES) - -STAND_ALONE_SOURCES = \ - $(CORE_SOURCES) \ - $(ASM_SOURCES) \ - $(STAND_ALONE_DRIVER_SOURCES) - -# ASM_SOURCES is defined in the config file -ASM_OBJECTS = $(ASM_SOURCES:.S=.o) - -STAND_ALONE_DRIVER_OBJECTS = $(STAND_ALONE_DRIVER_SOURCES:.c=.o) - -STAND_ALONE_OBJECTS = \ - $(CORE_OBJECTS) \ - $(ASM_OBJECTS) \ - $(STAND_ALONE_DRIVER_OBJECTS) - -# For libOSMesa16 or libOSMesa32 we link _all_ the objects into the library, -# not just the osmesa.o object (i.e. we don't have a libGL). -OSMESA16_OBJECTS = \ - $(CORE_OBJECTS) \ - $(ASM_OBJECTS) \ - $(COMMON_DRIVER_OBJECTS) \ - $(OSMESA_DRIVER_OBJECTS) - - -stand-alone: depend subdirs $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(OSMESA_LIB_NAME) - -osmesa-only: depend subdirs $(LIB_DIR)/$(OSMESA_LIB_NAME) - -subdirs: - @ (cd x86 ; $(MAKE)) - @ (cd x86-64 ; $(MAKE)) - -# Make the GL library -$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS) - @ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \ - -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \ - -install $(LIB_DIR) \ - $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS) - -# Make the OSMesa library -$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS) - @ if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \ - $(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \ - -major $(MESA_MAJOR) \ - -minor $(MESA_MINOR) -patch $(MESA_TINY) \ - -install $(LIB_DIR) $(MKLIB_OPTIONS) \ - $(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \ - else \ - $(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \ - -major $(MESA_MAJOR) \ - -minor $(MESA_MINOR) -patch $(GL_TINY) \ - -install $(LIB_DIR) $(MKLIB_OPTIONS) \ - $(OSMESA_LIB_DEPS) $(OSMESA_DRIVER_OBJECTS) ; \ - fi - - -###################################################################### -# 16 (or 32) bit/channel OSMesa - -# $(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA16_OBJECTS) -# $(TOP)/bin/mklib -o $(OSMESA_LIB) \ -# -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \ -# -install $(LIB_DIR) \ -# $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(OSMESA16_OBJECTS) - - - -###################################################################### -# Generic stuff - -ALL_SOURCES = \ - $(GLAPI_SOURCES) \ - $(MAIN_SOURCES) \ - $(MATH_SOURCES) \ - $(ARRAY_CACHE_SOURCES) \ - $(TNL_SOURCES) \ - $(SHADER_SOURCES) \ - $(SWRAST_SOURCES) \ - $(SWRAST_SETUP_SOURCES) \ - $(ASM_C_SOURCES) \ - $(X86_SOURCES) \ - $(COMMON_DRIVER_SOURCES)\ - $(X11_DRIVER_SOURCES) \ - $(OSMESA_DRIVER_SOURCES) - - -SUBDIRS = array_cache drivers/dri glapi main math sparc swrast swrast_setup \ - tnl tnl_dd - - -# Update dependencies -depend: $(ALL_SOURCES) - @ echo "running $(MKDEP)" - @ touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \ - > /dev/null - - -# Emacs tags -tags: - etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h - -clean: - -rm -f */*.o - -rm -f */*/*.o - -rm -f depend depend.bak mesa.a - -rm -f drivers/*/*.o - (cd drivers/dri ; $(MAKE) clean) - (cd x86 ; $(MAKE) clean) - (cd x86-64 ; $(MAKE) clean) - -include depend diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/Makefile.DJ b/nx-X11/extras/Mesa_6.4.2/src/mesa/Makefile.DJ deleted file mode 100644 index 53c4370703..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/Makefile.DJ +++ /dev/null @@ -1,168 +0,0 @@ -# Mesa 3-D graphics library -# Version: 5.1 -# -# Copyright (C) 1999-2003 Brian Paul All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -# DOS/DJGPP core makefile v1.7 for Mesa -# -# Copyright (C) 2002 - Daniel Borca -# Email : dborca@users.sourceforge.net -# Web : http://www.geocities.com/dborca - - -# -# Available options: -# -# Environment variables: -# CFLAGS -# -# GLIDE path to Glide3 SDK; used with FX. -# default = $(TOP)/glide3 -# FX=1 build for 3dfx Glide3. Note that this disables -# compilation of most DMesa code and requires fxMesa. -# As a consequence, you'll need the DJGPP Glide3 -# library to build any application. -# default = no -# X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow). -# default = no -# -# Targets: -# all: build GL -# clean: remove object files -# - - - -.PHONY: all clean -.INTERMEDIATE: x86/gen_matypes.exe - -TOP = ../.. -GLIDE ?= $(TOP)/glide3 -LIBDIR = $(TOP)/lib -GL_LIB = libgl.a -GL_DXE = gl.dxe -GL_IMP = libigl.a - -export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR);$(GLIDE)/lib - -CC = gcc -CFLAGS += $(INCLUDE_DIRS) -CFLAGS += -DUSE_EXTERNAL_DXTN_LIB=1 -ifeq ($(FX),1) -CFLAGS += -D__DOS__ -CFLAGS += -I$(GLIDE)/include -DFX -LIBNAME = "Mesa/FX DJGPP" -else -LIBNAME = "Mesa DJGPP" -endif - -AR = ar -ARFLAGS = crus - -HAVEDXE3 = $(wildcard $(DJDIR)/bin/dxe3gen.exe) - -ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) -UNLINK = del $(subst /,\,$(1)) -else -UNLINK = $(RM) $(1) -endif - -include sources - -ifeq ($(X86),1) -CFLAGS += -DUSE_X86_ASM -CFLAGS += -DUSE_MMX_ASM -CFLAGS += -DUSE_SSE_ASM -CFLAGS += -DUSE_3DNOW_ASM -X86_SOURCES += $(X86_API) -else -X86_SOURCES = -endif - -DRIVER_SOURCES = \ - drivers/dos/dmesa.c -ifeq ($(FX),1) -DRIVER_SOURCES += \ - $(GLIDE_DRIVER_SOURCES) -else -DRIVER_SOURCES += \ - drivers/dos/video.c \ - drivers/dos/virtual.S \ - drivers/dos/vesa.c \ - drivers/dos/blit.S \ - drivers/dos/vga.c \ - drivers/dos/null.c \ - drivers/dos/dpmi.c -endif - -#DRIVER_SOURCES += $(OSMESA_DRIVER_SOURCES) - -SOURCES = $(CORE_SOURCES) $(X86_SOURCES) $(COMMON_DRIVER_SOURCES) $(DRIVER_SOURCES) - -OBJECTS = $(addsuffix .o,$(basename $(SOURCES))) - -X86_OBJECTS = $(addsuffix .o,$(basename $(X86_SOURCES))) - -.c.o: - $(CC) -o $@ $(CFLAGS) -c $< -.S.o: - $(CC) -o $@ $(CFLAGS) -c $< -.s.o: - $(CC) -o $@ $(CFLAGS) -x assembler-with-cpp -c $< - -all: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP) - -$(LIBDIR)/$(GL_LIB): $(OBJECTS) - $(AR) $(ARFLAGS) $@ $^ - -$(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP): $(OBJECTS) -ifeq ($(HAVEDXE3),) - $(warning Missing DXE3 package... Skipping $(GL_DXE)) -else -ifeq ($(FX),1) - -dxe3gen -o $(LIBDIR)/$(GL_DXE) -Y $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -P glide3x.dxe -U $^ -else - -dxe3gen -o $(LIBDIR)/$(GL_DXE) -Y $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -U $^ -endif -endif - -$(X86_OBJECTS): x86/matypes.h - -x86/matypes.h: x86/gen_matypes.exe - $< > $@ - -x86/gen_matypes.exe: x86/gen_matypes.c - $(CC) -o $@ $(CFLAGS) -s $< - -clean: - -$(call UNLINK,array_cache/*.o) - -$(call UNLINK,glapi/*.o) - -$(call UNLINK,main/*.o) - -$(call UNLINK,math/*.o) - -$(call UNLINK,shader/*.o) - -$(call UNLINK,sparc/*.o) - -$(call UNLINK,ppc/*.o) - -$(call UNLINK,swrast/*.o) - -$(call UNLINK,swrast_setup/*.o) - -$(call UNLINK,tnl/*.o) - -$(call UNLINK,x86/*.o) - -$(call UNLINK,drivers/common/*.o) - -$(call UNLINK,drivers/dos/*.o) - -$(call UNLINK,drivers/glide/*.o) diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/Makefile.mgw b/nx-X11/extras/Mesa_6.4.2/src/mesa/Makefile.mgw deleted file mode 100644 index ebec5c055a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/Makefile.mgw +++ /dev/null @@ -1,206 +0,0 @@ -# Mesa 3-D graphics library -# Version: 5.1 -# -# Copyright (C) 1999-2003 Brian Paul All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -# MinGW core makefile v1.4 for Mesa -# -# Copyright (C) 2002 - Daniel Borca -# Email : dborca@users.sourceforge.net -# Web : http://www.geocities.com/dborca - - -# -# Available options: -# -# Environment variables: -# CFLAGS -# -# GLIDE path to Glide3 SDK; used with FX. -# default = $(TOP)/glide3 -# FX=1 build for 3dfx Glide3. Note that this disables -# compilation of most WMesa code and requires fxMesa. -# As a consequence, you'll need the Win32 Glide3 -# library to build any application. -# default = no -# ICD=1 build the installable client driver interface -# (windows opengl driver interface) -# default = no -# X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow). -# default = no -# -# Targets: -# all: build GL -# clean: remove object files -# - - - -.PHONY: all clean -.INTERMEDIATE: x86/gen_matypes.exe -.SUFFIXES: .rc .res - -# Set this to the prefix of your build tools, i.e. mingw32- -TOOLS_PREFIX = mingw32- - -TOP = ../.. -GLIDE ?= $(TOP)/glide3 -LIBDIR = $(TOP)/lib -ifeq ($(ICD),1) - GL_DLL = mesa32.dll - GL_IMP = libmesa32.a -else - GL_DLL = opengl32.dll - GL_IMP = libopengl32.a -endif - -LDLIBS = -lgdi32 - -CC = $(TOOLS_PREFIX)gcc -CFLAGS += -DBUILD_GL32 -D_OPENGL32_ -CFLAGS += $(INCLUDE_DIRS) -CFLAGS += -DUSE_EXTERNAL_DXTN_LIB=1 -ifeq ($(FX),1) - CFLAGS += -I$(GLIDE)/include -DFX - LDLIBS += -L$(GLIDE)/lib -lglide3x - GL_DEF = drivers/windows/fx/fxopengl.def - GL_RES = drivers/windows/fx/fx.rc -else - ifeq ($(ICD),1) - CFLAGS += -DUSE_MGL_NAMESPACE - GL_DEF = drivers/windows/icd/mesa.def - else - GL_DEF = drivers/windows/gdi/mesa.def - endif -endif - -AR = ar -ARFLAGS = crus - -UNLINK = del $(subst /,\,$(1)) -ifneq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) -UNLINK = $(RM) $(1) -endif -ifneq ($(wildcard $(addsuffix /rm,$(subst :, ,$(PATH)))),) -UNLINK = $(RM) $(1) -endif - -include sources - -ifeq ($(X86),1) -CFLAGS += -DUSE_X86_ASM -CFLAGS += -DUSE_MMX_ASM -CFLAGS += -DUSE_SSE_ASM -CFLAGS += -DUSE_3DNOW_ASM -X86_SOURCES += $(X86_API) -else -X86_SOURCES = -endif - -ifeq ($(FX),1) -DRIVER_SOURCES = \ - $(GLIDE_DRIVER_SOURCES) \ - drivers/windows/fx/fxwgl.c -else -ifeq ($(ICD),1) -DRIVER_SOURCES = \ - drivers/windows/gdi/wmesa.c \ - drivers/windows/icd/icd.c -else -DRIVER_SOURCES = \ - drivers/windows/gdi/wmesa.c \ - drivers/windows/gdi/wgl.c -endif -endif - -SOURCES = $(CORE_SOURCES) $(X86_SOURCES) $(COMMON_DRIVER_SOURCES) $(DRIVER_SOURCES) - -OBJECTS = $(addsuffix .o,$(basename $(SOURCES))) - -X86_OBJECTS = $(addsuffix .o,$(basename $(X86_SOURCES))) - -RESOURCE = $(GL_RES:.rc=.res) - -.c.o: - $(CC) -o $@ $(CFLAGS) -c $< -.S.o: - $(CC) -o $@ $(CFLAGS) -c $< -.s.o: - $(CC) -o $@ $(CFLAGS) -x assembler-with-cpp -c $< -.rc.res: - windres -o $@ -Irc -Ocoff $< - -all: $(LIBDIR) $(LIBDIR)/$(GL_DLL) $(LIBDIR)/$(GL_IMP) - -$(LIBDIR): - mkdir -p $(LIBDIR) - -$(LIBDIR)/$(GL_DLL) $(LIBDIR)/$(GL_IMP): $(OBJECTS) $(RESOURCE) - $(TOOLS_PREFIX)dllwrap -o $(LIBDIR)/$(GL_DLL) --output-lib $(LIBDIR)/$(GL_IMP) \ - --target i386-mingw32 --def $(GL_DEF) -Wl,-enable-stdcall-fixup \ - $^ $(LDLIBS) - -$(X86_OBJECTS): x86/matypes.h - -x86/matypes.h: x86/gen_matypes.exe - $(subst /,\,$< > $@) - -x86/gen_matypes.exe: x86/gen_matypes.c - $(CC) -o $@ $(CFLAGS) -s $< - -# [dBorca] -# glapi_x86.S needs some adjustments -# in order to generate correct entrypoints -# Trick: change the following condition to -# be always false if you need C entrypoints -# with USE_X86_ASM (useful for trace/debug) -ifeq (1,1) -x86/glapi_x86.o: x86/glapi_x86.S - $(CC) -o $@ $(CFLAGS) -DSTDCALL_API -c $< -else -main/dispatch.o: main/dispatch.c - $(CC) -o $@ $(CFLAGS) -UUSE_X86_ASM -c $< -glapi/glapi.o: glapi/glapi.c - $(CC) -o $@ $(CFLAGS) -UUSE_X86_ASM -c $< -endif - -# [dBorca] -# if we want codegen, we have to stdcall -tnl/t_vtx_x86_gcc.o: tnl/t_vtx_x86_gcc.S - $(CC) -o $@ $(CFLAGS) -DSTDCALL_API -c $< - -clean: - -$(call UNLINK,array_cache/*.o) - -$(call UNLINK,glapi/*.o) - -$(call UNLINK,main/*.o) - -$(call UNLINK,math/*.o) - -$(call UNLINK,shader/*.o) - -$(call UNLINK,sparc/*.o) - -$(call UNLINK,ppc/*.o) - -$(call UNLINK,swrast/*.o) - -$(call UNLINK,swrast_setup/*.o) - -$(call UNLINK,tnl/*.o) - -$(call UNLINK,x86/*.o) - -$(call UNLINK,drivers/common/*.o) - -$(call UNLINK,drivers/glide/*.o) - -$(call UNLINK,drivers/windows/fx/*.o) - -$(call UNLINK,drivers/windows/fx/*.res) - -$(call UNLINK,drivers/windows/gdi/*.o) - -$(call UNLINK,drivers/windows/icd/*.o) diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/array_cache/ac_context.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/array_cache/ac_context.c deleted file mode 100644 index ebf3a3dc47..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/array_cache/ac_context.c +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - */ - -#include "glheader.h" -#include "macros.h" -#include "imports.h" -#include "mtypes.h" - -#include "array_cache/ac_context.h" - - -/* - * Initialize the array fallbacks. That is, by default the fallback arrays - * point into the current vertex attribute values in ctx->Current.Attrib[] - */ -static void _ac_fallbacks_init( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - struct gl_client_array *cl; - GLuint i; - - cl = &ac->Fallback.Normal; - cl->Size = 3; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_NORMAL]; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - - cl = &ac->Fallback.Color; - cl->Size = 4; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_COLOR0]; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - - cl = &ac->Fallback.SecondaryColor; - cl->Size = 3; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_COLOR1]; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - - cl = &ac->Fallback.FogCoord; - cl->Size = 1; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (GLubyte *) &ctx->Current.Attrib[VERT_ATTRIB_FOG]; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - - cl = &ac->Fallback.Index; - cl->Size = 1; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (GLubyte *) &ctx->Current.Index; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - - for (i = 0 ; i < MAX_TEXTURE_COORD_UNITS ; i++) { - cl = &ac->Fallback.TexCoord[i]; - cl->Size = 4; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + i]; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - } - - cl = &ac->Fallback.EdgeFlag; - cl->Size = 1; - cl->Type = GL_UNSIGNED_BYTE; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (GLubyte *) &ctx->Current.EdgeFlag; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - - for (i = 0; i < VERT_ATTRIB_MAX; i++) { - cl = &ac->Fallback.Attrib[i]; - cl->Size = 4; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (GLubyte *) ctx->Current.Attrib[i]; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - } -} - - -/* - * Initialize the array cache pointers, types, strides, etc. - */ -static void _ac_cache_init( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - struct gl_client_array *cl; - GLuint size = ctx->Const.MaxArrayLockSize + MAX_CLIPPED_VERTICES; - GLuint i; - - cl = &ac->Cache.Vertex; - cl->Size = 4; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 4 * sizeof(GLfloat); - cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - - cl = &ac->Cache.Normal; - cl->Size = 3; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 3 * sizeof(GLfloat); - cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - - cl = &ac->Cache.Color; - cl->Size = 4; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 4 * sizeof(GLfloat); - cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - - cl = &ac->Cache.SecondaryColor; - cl->Size = 3; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 4 * sizeof(GLfloat); - cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - - cl = &ac->Cache.FogCoord; - cl->Size = 1; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = sizeof(GLfloat); - cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - - cl = &ac->Cache.Index; - cl->Size = 1; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = sizeof(GLfloat); - cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - - for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) { - cl = &ac->Cache.TexCoord[i]; - cl->Size = 4; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 4 * sizeof(GLfloat); - cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - } - - cl = &ac->Cache.EdgeFlag; - cl->Size = 1; - cl->Type = GL_UNSIGNED_BYTE; - cl->Stride = 0; - cl->StrideB = sizeof(GLubyte); - cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - - for (i = 0 ; i < VERT_ATTRIB_MAX; i++) { - cl = &ac->Cache.Attrib[i]; - cl->Size = 4; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 4 * sizeof(GLfloat); - cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; -#if FEATURE_ARB_vertex_buffer_object - cl->BufferObj = ctx->Array.NullBufferObj; -#endif - } -} - - -/* This storage used to hold translated client data if type or stride - * need to be fixed. - */ -static void _ac_elts_init( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - GLuint size = 1000; - - ac->Elts = (GLuint *)MALLOC( sizeof(GLuint) * size ); - ac->elt_size = size; -} - -static void _ac_raw_init( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - GLuint i; - - ac->Raw.Color = ac->Fallback.Color; - ac->Raw.EdgeFlag = ac->Fallback.EdgeFlag; - ac->Raw.FogCoord = ac->Fallback.FogCoord; - ac->Raw.Index = ac->Fallback.Index; - ac->Raw.Normal = ac->Fallback.Normal; - ac->Raw.SecondaryColor = ac->Fallback.SecondaryColor; - ac->Raw.Vertex = ctx->Array.Vertex; - - ac->IsCached.Color = GL_FALSE; - ac->IsCached.EdgeFlag = GL_FALSE; - ac->IsCached.FogCoord = GL_FALSE; - ac->IsCached.Index = GL_FALSE; - ac->IsCached.Normal = GL_FALSE; - ac->IsCached.SecondaryColor = GL_FALSE; - ac->IsCached.Vertex = GL_FALSE; - - for (i = 0 ; i < MAX_TEXTURE_COORD_UNITS ; i++) { - ac->Raw.TexCoord[i] = ac->Fallback.TexCoord[i]; - ac->IsCached.TexCoord[i] = GL_FALSE; - } - - for (i = 0 ; i < VERT_ATTRIB_MAX ; i++) { - ac->Raw.Attrib[i] = ac->Fallback.Attrib[i]; - ac->IsCached.Attrib[i] = GL_FALSE; - } -} - -GLboolean _ac_CreateContext( GLcontext *ctx ) -{ - ctx->acache_context = CALLOC(sizeof(ACcontext)); - if (ctx->acache_context) { - _ac_cache_init( ctx ); - _ac_fallbacks_init( ctx ); - _ac_raw_init( ctx ); - _ac_elts_init( ctx ); - return GL_TRUE; - } - return GL_FALSE; -} - -void _ac_DestroyContext( GLcontext *ctx ) -{ - struct gl_buffer_object *nullObj = ctx->Array.NullBufferObj; - ACcontext *ac = AC_CONTEXT(ctx); - GLint i; - - /* only free vertex data if it's really a pointer to vertex data and - * not an offset into a buffer object. - */ - if (ac->Cache.Vertex.Ptr && ac->Cache.Vertex.BufferObj == nullObj) - FREE( (void *) ac->Cache.Vertex.Ptr ); - if (ac->Cache.Normal.Ptr && ac->Cache.Normal.BufferObj == nullObj) - FREE( (void *) ac->Cache.Normal.Ptr ); - if (ac->Cache.Color.Ptr && ac->Cache.Color.BufferObj == nullObj) - FREE( (void *) ac->Cache.Color.Ptr ); - if (ac->Cache.SecondaryColor.Ptr && ac->Cache.SecondaryColor.BufferObj == nullObj) - FREE( (void *) ac->Cache.SecondaryColor.Ptr ); - if (ac->Cache.EdgeFlag.Ptr && ac->Cache.EdgeFlag.BufferObj == nullObj) - FREE( (void *) ac->Cache.EdgeFlag.Ptr ); - if (ac->Cache.Index.Ptr && ac->Cache.Index.BufferObj == nullObj) - FREE( (void *) ac->Cache.Index.Ptr ); - if (ac->Cache.FogCoord.Ptr && ac->Cache.FogCoord.BufferObj == nullObj) - FREE( (void *) ac->Cache.FogCoord.Ptr ); - - for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) { - if (ac->Cache.TexCoord[i].Ptr && ac->Cache.TexCoord[i].BufferObj == nullObj) - FREE( (void *) ac->Cache.TexCoord[i].Ptr ); - } - - for (i = 0; i < VERT_ATTRIB_MAX; i++) { - if (ac->Cache.Attrib[i].Ptr && ac->Cache.Attrib[i].BufferObj == nullObj) - FREE( (void *) ac->Cache.Attrib[i].Ptr ); - } - - if (ac->Elts) - FREE( ac->Elts ); - - /* Free the context structure itself */ - FREE(ac); - ctx->acache_context = NULL; -} - -void _ac_InvalidateState( GLcontext *ctx, GLuint new_state ) -{ - AC_CONTEXT(ctx)->NewState |= new_state; - AC_CONTEXT(ctx)->NewArrayState |= ctx->Array.NewState; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/array_cache/ac_context.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/array_cache/ac_context.h deleted file mode 100644 index 36aded3152..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/array_cache/ac_context.h +++ /dev/null @@ -1,99 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - */ - -#ifndef _AC_CONTEXT_H -#define _AC_CONTEXT_H - -#include "glheader.h" -#include "mtypes.h" - -#include "array_cache/acache.h" - -/* These are used to make the ctx->Current values look like - * arrays (with zero StrideB). - */ -struct ac_arrays { - struct gl_client_array Vertex; - struct gl_client_array Normal; - struct gl_client_array Color; - struct gl_client_array SecondaryColor; - struct gl_client_array FogCoord; - struct gl_client_array Index; - struct gl_client_array TexCoord[MAX_TEXTURE_COORD_UNITS]; - struct gl_client_array EdgeFlag; - struct gl_client_array Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */ -}; - -struct ac_array_pointers { - struct gl_client_array *Vertex; - struct gl_client_array *Normal; - struct gl_client_array *Color; - struct gl_client_array *SecondaryColor; - struct gl_client_array *FogCoord; - struct gl_client_array *Index; - struct gl_client_array *TexCoord[MAX_TEXTURE_COORD_UNITS]; - struct gl_client_array *EdgeFlag; - struct gl_client_array *Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */ -}; - -struct ac_array_flags { - GLboolean Vertex; - GLboolean Normal; - GLboolean Color; - GLboolean SecondaryColor; - GLboolean FogCoord; - GLboolean Index; - GLboolean TexCoord[MAX_TEXTURE_COORD_UNITS]; - GLboolean EdgeFlag; - GLboolean Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */ -}; - - -typedef struct { - GLuint NewState; /* not needed? */ - GLuint NewArrayState; - - /* Facility for importing and caching array data: - */ - struct ac_arrays Fallback; - struct ac_arrays Cache; - struct ac_arrays Raw; - struct ac_array_flags IsCached; - GLuint start; - GLuint count; - - /* Facility for importing element lists: - */ - GLuint *Elts; - GLuint elt_size; - -} ACcontext; - -#define AC_CONTEXT(ctx) ((ACcontext *)ctx->acache_context) - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/array_cache/ac_import.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/array_cache/ac_import.c deleted file mode 100644 index 1f1331c547..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/array_cache/ac_import.c +++ /dev/null @@ -1,902 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.4.2 - * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - */ - -#include "glheader.h" -#include "macros.h" -#include "imports.h" -#include "mtypes.h" - -#include "math/m_translate.h" -#include "array_cache/ac_context.h" -#include "math/m_translate.h" - -#define STRIDE_ARRAY( array, offset ) \ -do { \ - GLubyte *tmp = ADD_POINTERS( (array).BufferObj->Data, (array).Ptr ) \ - + (offset) * (array).StrideB; \ - (array).Ptr = tmp; \ -} while (0) - - -/* Set the array pointer back to its source when the cached data is - * invalidated: - */ -static void -reset_texcoord( GLcontext *ctx, GLuint unit ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (ctx->Array.TexCoord[unit].Enabled) { - ac->Raw.TexCoord[unit] = ctx->Array.TexCoord[unit]; - STRIDE_ARRAY(ac->Raw.TexCoord[unit], ac->start); - } - else { - ac->Raw.TexCoord[unit] = ac->Fallback.TexCoord[unit]; - - if (ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3] != 1.0) - ac->Raw.TexCoord[unit].Size = 4; - else if (ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2] != 0.0) - ac->Raw.TexCoord[unit].Size = 3; - else - ac->Raw.TexCoord[unit].Size = 2; - } - - ac->IsCached.TexCoord[unit] = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_TEXCOORD(unit); -} - -static void -reset_vertex( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - ASSERT(ctx->Array.Vertex.Enabled - || (ctx->VertexProgram._Enabled && ctx->Array.VertexAttrib[0].Enabled)); - ac->Raw.Vertex = ctx->Array.Vertex; - STRIDE_ARRAY(ac->Raw.Vertex, ac->start); - ac->IsCached.Vertex = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_VERTEX; -} - - -static void -reset_normal( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (ctx->Array.Normal.Enabled) { - ac->Raw.Normal = ctx->Array.Normal; - STRIDE_ARRAY(ac->Raw.Normal, ac->start); - } - else { - ac->Raw.Normal = ac->Fallback.Normal; - } - - ac->IsCached.Normal = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_NORMAL; -} - - -static void -reset_color( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (ctx->Array.Color.Enabled) { - ac->Raw.Color = ctx->Array.Color; - STRIDE_ARRAY(ac->Raw.Color, ac->start); - } - else - ac->Raw.Color = ac->Fallback.Color; - - ac->IsCached.Color = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_COLOR0; -} - - -static void -reset_secondarycolor( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (ctx->Array.SecondaryColor.Enabled) { - ac->Raw.SecondaryColor = ctx->Array.SecondaryColor; - STRIDE_ARRAY(ac->Raw.SecondaryColor, ac->start); - } - else - ac->Raw.SecondaryColor = ac->Fallback.SecondaryColor; - - ac->IsCached.SecondaryColor = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_COLOR1; -} - - -static void -reset_index( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (ctx->Array.Index.Enabled) { - ac->Raw.Index = ctx->Array.Index; - STRIDE_ARRAY(ac->Raw.Index, ac->start); - } - else - ac->Raw.Index = ac->Fallback.Index; - - ac->IsCached.Index = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_INDEX; -} - - -static void -reset_fogcoord( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (ctx->Array.FogCoord.Enabled) { - ac->Raw.FogCoord = ctx->Array.FogCoord; - STRIDE_ARRAY(ac->Raw.FogCoord, ac->start); - } - else - ac->Raw.FogCoord = ac->Fallback.FogCoord; - - ac->IsCached.FogCoord = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_FOGCOORD; -} - - -static void -reset_edgeflag( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (ctx->Array.EdgeFlag.Enabled) { - ac->Raw.EdgeFlag = ctx->Array.EdgeFlag; - STRIDE_ARRAY(ac->Raw.EdgeFlag, ac->start); - } - else - ac->Raw.EdgeFlag = ac->Fallback.EdgeFlag; - - ac->IsCached.EdgeFlag = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_EDGEFLAG; -} - - -static void -reset_attrib( GLcontext *ctx, GLuint index ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (ctx->Array.VertexAttrib[index].Enabled) { - ac->Raw.Attrib[index] = ctx->Array.VertexAttrib[index]; - STRIDE_ARRAY(ac->Raw.Attrib[index], ac->start); - } - else - ac->Raw.Attrib[index] = ac->Fallback.Attrib[index]; - - ac->IsCached.Attrib[index] = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_ATTRIB(index); -} - - -/** - * Generic import function for color data - */ -static void -import( const GLcontext *ctx, - GLenum destType, - struct gl_client_array *to, - const struct gl_client_array *from ) -{ - const ACcontext *ac = AC_CONTEXT(ctx); - - if (destType == 0) - destType = from->Type; - - switch (destType) { - case GL_FLOAT: - _math_trans_4fc( (GLfloat (*)[4]) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - from->Size, - 0, - ac->count - ac->start); - - to->StrideB = 4 * sizeof(GLfloat); - to->Type = GL_FLOAT; - break; - - case GL_UNSIGNED_BYTE: - _math_trans_4ub( (GLubyte (*)[4]) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - from->Size, - 0, - ac->count - ac->start); - - to->StrideB = 4 * sizeof(GLubyte); - to->Type = GL_UNSIGNED_BYTE; - break; - - case GL_UNSIGNED_SHORT: - _math_trans_4us( (GLushort (*)[4]) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - from->Size, - 0, - ac->count - ac->start); - - to->StrideB = 4 * sizeof(GLushort); - to->Type = GL_UNSIGNED_SHORT; - break; - - default: - _mesa_problem(ctx, "Unexpected dest format in import()"); - break; - } -} - - - -/* - * Functions to import array ranges with specified types and strides. - * For example, if the vertex data is GLshort[2] and we want GLfloat[3] - * we'll use an import function to do the data conversion. - */ - -static void -import_texcoord( GLcontext *ctx, GLuint unit, GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - const struct gl_client_array *from = &ac->Raw.TexCoord[unit]; - struct gl_client_array *to = &ac->Cache.TexCoord[unit]; - (void) type; (void) stride; - - ASSERT(unit < ctx->Const.MaxTextureCoordUnits); - - /* Limited choices at this stage: - */ - ASSERT(type == GL_FLOAT); - ASSERT(stride == 4*sizeof(GLfloat) || stride == 0); - ASSERT(ac->count - ac->start < ctx->Const.MaxArrayLockSize); - - _math_trans_4f( (GLfloat (*)[4]) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - from->Size, - 0, - ac->count - ac->start); - - to->Size = from->Size; - to->StrideB = 4 * sizeof(GLfloat); - to->Type = GL_FLOAT; - ac->IsCached.TexCoord[unit] = GL_TRUE; -} - -static void -import_vertex( GLcontext *ctx, GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - const struct gl_client_array *from = &ac->Raw.Vertex; - struct gl_client_array *to = &ac->Cache.Vertex; - (void) type; (void) stride; - - /* Limited choices at this stage: - */ - ASSERT(type == GL_FLOAT); - ASSERT(stride == 4*sizeof(GLfloat) || stride == 0); - - _math_trans_4f( (GLfloat (*)[4]) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - from->Size, - 0, - ac->count - ac->start); - - to->Size = from->Size; - to->StrideB = 4 * sizeof(GLfloat); - to->Type = GL_FLOAT; - ac->IsCached.Vertex = GL_TRUE; -} - -static void -import_normal( GLcontext *ctx, GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - const struct gl_client_array *from = &ac->Raw.Normal; - struct gl_client_array *to = &ac->Cache.Normal; - (void) type; (void) stride; - - /* Limited choices at this stage: - */ - ASSERT(type == GL_FLOAT); - ASSERT(stride == 3*sizeof(GLfloat) || stride == 0); - - _math_trans_3f( (GLfloat (*)[3]) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - 0, - ac->count - ac->start); - - to->StrideB = 3 * sizeof(GLfloat); - to->Type = GL_FLOAT; - ac->IsCached.Normal = GL_TRUE; -} - -static void -import_color( GLcontext *ctx, GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - const struct gl_client_array *from = &ac->Raw.Color; - struct gl_client_array *to = &ac->Cache.Color; - (void) stride; - - import( ctx, type, to, from ); - - ac->IsCached.Color = GL_TRUE; -} - -static void -import_index( GLcontext *ctx, GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - const struct gl_client_array *from = &ac->Raw.Index; - struct gl_client_array *to = &ac->Cache.Index; - (void) type; (void) stride; - - /* Limited choices at this stage: - */ - ASSERT(type == GL_UNSIGNED_INT); - ASSERT(stride == sizeof(GLuint) || stride == 0); - - _math_trans_1ui( (GLuint *) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - 0, - ac->count - ac->start); - - to->StrideB = sizeof(GLuint); - to->Type = GL_UNSIGNED_INT; - ac->IsCached.Index = GL_TRUE; -} - -static void -import_secondarycolor( GLcontext *ctx, GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - const struct gl_client_array *from = &ac->Raw.SecondaryColor; - struct gl_client_array *to = &ac->Cache.SecondaryColor; - (void) stride; - - import( ctx, type, to, from ); - - ac->IsCached.SecondaryColor = GL_TRUE; -} - -static void -import_fogcoord( GLcontext *ctx, GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - const struct gl_client_array *from = &ac->Raw.FogCoord; - struct gl_client_array *to = &ac->Cache.FogCoord; - (void) type; (void) stride; - - /* Limited choices at this stage: - */ - ASSERT(type == GL_FLOAT); - ASSERT(stride == sizeof(GLfloat) || stride == 0); - - _math_trans_1f( (GLfloat *) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - 0, - ac->count - ac->start); - - to->StrideB = sizeof(GLfloat); - to->Type = GL_FLOAT; - ac->IsCached.FogCoord = GL_TRUE; -} - -static void -import_edgeflag( GLcontext *ctx, GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - const struct gl_client_array *from = &ac->Raw.EdgeFlag; - struct gl_client_array *to = &ac->Cache.EdgeFlag; - (void) type; (void) stride; - - /* Limited choices at this stage: - */ - ASSERT(type == GL_UNSIGNED_BYTE); - ASSERT(stride == sizeof(GLubyte) || stride == 0); - - _math_trans_1ub( (GLubyte *) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - 0, - ac->count - ac->start); - - to->StrideB = sizeof(GLubyte); - to->Type = GL_UNSIGNED_BYTE; - ac->IsCached.EdgeFlag = GL_TRUE; -} - -static void -import_attrib( GLcontext *ctx, GLuint index, GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - const struct gl_client_array *from = &ac->Raw.Attrib[index]; - struct gl_client_array *to = &ac->Cache.Attrib[index]; - (void) type; (void) stride; - - ASSERT(index < MAX_VERTEX_PROGRAM_ATTRIBS); - - /* Limited choices at this stage: - */ - ASSERT(type == GL_FLOAT); - ASSERT(stride == 4*sizeof(GLfloat) || stride == 0); - ASSERT(ac->count - ac->start < ctx->Const.MaxArrayLockSize); - - _math_trans_4f( (GLfloat (*)[4]) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - from->Size, - 0, - ac->count - ac->start); - - to->Size = from->Size; - to->StrideB = 4 * sizeof(GLfloat); - to->Type = GL_FLOAT; - ac->IsCached.Attrib[index] = GL_TRUE; -} - - - -/* - * Externals to request arrays with specific properties: - */ - - -struct gl_client_array * -_ac_import_texcoord( GLcontext *ctx, - GLuint unit, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - ASSERT(unit < MAX_TEXTURE_COORD_UNITS); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_TEXCOORD(unit)) - reset_texcoord( ctx, unit ); - - /* Is the request impossible? - */ - if (reqsize != 0 && ac->Raw.TexCoord[unit].Size > (GLint) reqsize) - return NULL; - - /* Do we need to pull in a copy of the client data: - */ - if (ac->Raw.TexCoord[unit].Type != type || - (reqstride != 0 && ac->Raw.TexCoord[unit].StrideB != (GLint)reqstride) || - reqwriteable) - { - if (!ac->IsCached.TexCoord[unit]) - import_texcoord(ctx, unit, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.TexCoord[unit]; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.TexCoord[unit]; - } -} - -struct gl_client_array * -_ac_import_vertex( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_VERTEX) - reset_vertex( ctx ); - - /* Is the request impossible? - */ - if (reqsize != 0 && ac->Raw.Vertex.Size > (GLint) reqsize) - return NULL; - - /* Do we need to pull in a copy of the client data: - */ - if (ac->Raw.Vertex.Type != type || - (reqstride != 0 && ac->Raw.Vertex.StrideB != (GLint) reqstride) || - reqwriteable) - { - if (!ac->IsCached.Vertex) - import_vertex(ctx, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.Vertex; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.Vertex; - } -} - -struct gl_client_array * -_ac_import_normal( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_NORMAL) - reset_normal( ctx ); - - /* Do we need to pull in a copy of the client data: - */ - if (ac->Raw.Normal.Type != type || - (reqstride != 0 && ac->Raw.Normal.StrideB != (GLint) reqstride) || - reqwriteable) - { - if (!ac->IsCached.Normal) - import_normal(ctx, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.Normal; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.Normal; - } -} - -struct gl_client_array * -_ac_import_color( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_COLOR0) - reset_color( ctx ); - - /* Is the request impossible? - */ - if (reqsize != 0 && ac->Raw.Color.Size > (GLint) reqsize) { - return NULL; - } - - /* Do we need to pull in a copy of the client data: - */ - if ((type != 0 && ac->Raw.Color.Type != type) || - (reqstride != 0 && ac->Raw.Color.StrideB != (GLint) reqstride) || - reqwriteable) - { - if (!ac->IsCached.Color) { - import_color(ctx, type, reqstride ); - } - *writeable = GL_TRUE; - return &ac->Cache.Color; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.Color; - } -} - -struct gl_client_array * -_ac_import_index( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_INDEX) - reset_index( ctx ); - - - /* Do we need to pull in a copy of the client data: - */ - if (ac->Raw.Index.Type != type || - (reqstride != 0 && ac->Raw.Index.StrideB != (GLint) reqstride) || - reqwriteable) - { - if (!ac->IsCached.Index) - import_index(ctx, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.Index; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.Index; - } -} - -struct gl_client_array * -_ac_import_secondarycolor( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_COLOR1) - reset_secondarycolor( ctx ); - - /* Is the request impossible? - */ - if (reqsize != 0 && ac->Raw.SecondaryColor.Size > (GLint) reqsize) - return NULL; - - /* Do we need to pull in a copy of the client data: - */ - if ((type != 0 && ac->Raw.SecondaryColor.Type != type) || - (reqstride != 0 && ac->Raw.SecondaryColor.StrideB != (GLint)reqstride) || - reqwriteable) - { - if (!ac->IsCached.SecondaryColor) - import_secondarycolor(ctx, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.SecondaryColor; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.SecondaryColor; - } -} - -struct gl_client_array * -_ac_import_fogcoord( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_FOGCOORD) - reset_fogcoord( ctx ); - - /* Do we need to pull in a copy of the client data: - */ - if (ac->Raw.FogCoord.Type != type || - (reqstride != 0 && ac->Raw.FogCoord.StrideB != (GLint) reqstride) || - reqwriteable) - { - if (!ac->IsCached.FogCoord) - import_fogcoord(ctx, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.FogCoord; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.FogCoord; - } -} - -struct gl_client_array * -_ac_import_edgeflag( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_EDGEFLAG) - reset_edgeflag( ctx ); - - /* Do we need to pull in a copy of the client data: - */ - if (ac->Raw.EdgeFlag.Type != type || - (reqstride != 0 && ac->Raw.EdgeFlag.StrideB != (GLint) reqstride) || - reqwriteable) - { - if (!ac->IsCached.EdgeFlag) - import_edgeflag(ctx, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.EdgeFlag; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.EdgeFlag; - } -} - -/* GL_NV_vertex_program */ -struct gl_client_array * -_ac_import_attrib( GLcontext *ctx, - GLuint index, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - ASSERT(index < VERT_ATTRIB_MAX); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_ATTRIB(index)) - reset_attrib( ctx, index ); - - /* Is the request impossible? - */ - if (reqsize != 0 && ac->Raw.Attrib[index].Size > (GLint) reqsize) - return NULL; - - /* Do we need to pull in a copy of the client data: - */ - if (ac->Raw.Attrib[index].Type != type || - (reqstride != 0 && ac->Raw.Attrib[index].StrideB != (GLint)reqstride) || - reqwriteable) - { - if (!ac->IsCached.Attrib[index]) - import_attrib(ctx, index, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.Attrib[index]; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.Attrib[index]; - } -} - - -/* Clients must call this function to validate state and set bounds - * before importing any data: - */ -void -_ac_import_range( GLcontext *ctx, GLuint start, GLuint count ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (!ctx->Array.LockCount) { - /* Not locked, discard cached data. Changes to lock - * status are caught via. _ac_invalidate_state(). - */ - ac->NewArrayState = _NEW_ARRAY_ALL; - ac->start = start; - ac->count = count; - } - else { - /* Locked, discard data for any disabled arrays. Require that - * the whole locked range always be dealt with, otherwise hard to - * maintain cached data in the face of clipping. - */ - ac->NewArrayState |= ~ctx->Array._Enabled; - ac->start = ctx->Array.LockFirst; - ac->count = ctx->Array.LockCount; - ASSERT(ac->start == start); /* hmm? */ - ASSERT(ac->count == count); - } -} - - - -/* Additional convienence function for importing the element list - * for glDrawElements() and glDrawRangeElements(). - */ -CONST void * -_ac_import_elements( GLcontext *ctx, - GLenum new_type, - GLuint count, - GLenum old_type, - CONST void *indices ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (old_type == new_type) - return indices; - - if (ac->elt_size < count * sizeof(GLuint)) { - if (ac->Elts) FREE(ac->Elts); - while (ac->elt_size < count * sizeof(GLuint)) - ac->elt_size *= 2; - ac->Elts = (GLuint *) MALLOC(ac->elt_size); - } - - switch (new_type) { - case GL_UNSIGNED_BYTE: - ASSERT(0); - return NULL; - case GL_UNSIGNED_SHORT: - ASSERT(0); - return NULL; - case GL_UNSIGNED_INT: { - GLuint *out = (GLuint *)ac->Elts; - GLuint i; - - switch (old_type) { - case GL_UNSIGNED_BYTE: { - CONST GLubyte *in = (CONST GLubyte *)indices; - for (i = 0 ; i < count ; i++) - out[i] = in[i]; - break; - } - case GL_UNSIGNED_SHORT: { - CONST GLushort *in = (CONST GLushort *)indices; - for (i = 0 ; i < count ; i++) - out[i] = in[i]; - break; - } - default: - ASSERT(0); - } - - return (CONST void *)out; - } - default: - ASSERT(0); - break; - } - - return NULL; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/array_cache/acache.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/array_cache/acache.h deleted file mode 100644 index 2bb64f3656..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/array_cache/acache.h +++ /dev/null @@ -1,132 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - */ - -#ifndef _ARRAYCACHE_H -#define _ARRAYCACHE_H - -#include "mtypes.h" - - -extern GLboolean -_ac_CreateContext( GLcontext *ctx ); - -extern void -_ac_DestroyContext( GLcontext *ctx ); - -extern void -_ac_InvalidateState( GLcontext *ctx, GLuint new_state ); - -extern struct gl_client_array * -_ac_import_vertex( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_normal( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_color( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_index( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_secondarycolor( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_fogcoord( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_edgeflag( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_texcoord( GLcontext *ctx, - GLuint unit, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_attrib( GLcontext *ctx, - GLuint index, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwritable, - GLboolean *writable ); - - -/* Clients must call this function to validate state and set bounds - * before importing any data: - */ -extern void -_ac_import_range( GLcontext *ctx, GLuint start, GLuint count ); - - -/* Additional convenience function: - */ -extern CONST void * -_ac_import_elements( GLcontext *ctx, - GLenum new_type, - GLuint count, - GLenum old_type, - CONST void *indices ); - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/array_cache/descrip.mms b/nx-X11/extras/Mesa_6.4.2/src/mesa/array_cache/descrip.mms deleted file mode 100644 index 3555f83d8e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/array_cache/descrip.mms +++ /dev/null @@ -1,37 +0,0 @@ -# Makefile for core library for VMS -# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl -# Last revision : 16 June 2003 - -.first - define gl [---.include.gl] - define math [-.math] - define array_cache [-.array_cache] - -.include [---]mms-config. - -##### MACROS ##### - -VPATH = RCS - -INCDIR = [---.include],[-.main],[-.glapi] -LIBDIR = [---.lib] -CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short) - -SOURCES = ac_context.c ac_import.c - -OBJECTS = ac_context.obj,ac_import.obj -##### RULES ##### - -VERSION=Mesa V3.4 - -##### TARGETS ##### -# Make the library -$(LIBDIR)$(GL_LIB) : $(OBJECTS) - @ library $(LIBDIR)$(GL_LIB) $(OBJECTS) - -clean : - purge - delete *.obj;* - -ac_context.obj : ac_context.c -ac_import.obj : ac_import.c diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/descrip.mms b/nx-X11/extras/Mesa_6.4.2/src/mesa/descrip.mms deleted file mode 100644 index a12e3fc1b7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/descrip.mms +++ /dev/null @@ -1,26 +0,0 @@ -# Makefile for Mesa for VMS -# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl - -all : - set default [.main] - $(MMS)$(MMSQUALIFIERS) - set default [-.glapi] - $(MMS)$(MMSQUALIFIERS) - set default [-.shader] - $(MMS)$(MMSQUALIFIERS) - set default [-.drivers.common] - $(MMS)$(MMSQUALIFIERS) - set default [-.x11] - $(MMS)$(MMSQUALIFIERS) - set default [-.osmesa] - $(MMS)$(MMSQUALIFIERS) - set default [--.math] - $(MMS)$(MMSQUALIFIERS) - set default [-.tnl] - $(MMS)$(MMSQUALIFIERS) - set default [-.swrast] - $(MMS)$(MMSQUALIFIERS) - set default [-.swrast_setup] - $(MMS)$(MMSQUALIFIERS) - set default [-.array_cache] - $(MMS)$(MMSQUALIFIERS) diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/allegro/amesa.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/allegro/amesa.c deleted file mode 100644 index cb46efa56a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/allegro/amesa.c +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.0 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include "buffers.h" -#include "context.h" -#include "imports.h" -#include "matrix.h" -#include "mtypes.h" -#include "GL/amesa.h" - - -struct amesa_visual - { - GLvisual *GLVisual; /* inherit from GLvisual */ - GLboolean DBFlag; /* double buffered? */ - GLuint Depth; /* bits per pixel ( >= 15 ) */ - }; - - -struct amesa_buffer - { - GLframebuffer *GLBuffer; /* inherit from GLframebuffer */ - GLuint Width, Height; - BITMAP *Screen; - BITMAP *Background; - BITMAP *Active; - }; - - -struct amesa_context - { - GLcontext *GLContext; /* inherit from GLcontext */ - AMesaVisual Visual; - AMesaBuffer Buffer; - GLuint ClearColor; - GLuint CurrentColor; - }; - - -static void setup_dd_pointers(GLcontext *ctx); - - -/**********************************************************************/ -/***** drawing functions *****/ -/**********************************************************************/ - -#define FLIP(context, y) (context->Buffer->Height - (y) - 1) - -#include "allegro/generic.h" -#include "allegro/direct.h" - - -/**********************************************************************/ -/***** 15-bit accelerated drawing funcs *****/ -/**********************************************************************/ - -IMPLEMENT_WRITE_RGBA_SPAN(15, unsigned short) -IMPLEMENT_WRITE_RGB_SPAN(15, unsigned short) -IMPLEMENT_WRITE_MONO_RGBA_SPAN(15, unsigned short) -IMPLEMENT_READ_RGBA_SPAN(15, unsigned short) -IMPLEMENT_WRITE_RGBA_PIXELS(15, unsigned short) -IMPLEMENT_WRITE_MONO_RGBA_PIXELS(15, unsigned short) -IMPLEMENT_READ_RGBA_PIXELS(15, unsigned short) - - -/**********************************************************************/ -/***** 16-bit accelerated drawing funcs *****/ -/**********************************************************************/ - -IMPLEMENT_WRITE_RGBA_SPAN(16, unsigned short) -IMPLEMENT_WRITE_RGB_SPAN(16, unsigned short) -IMPLEMENT_WRITE_MONO_RGBA_SPAN(16, unsigned short) -IMPLEMENT_READ_RGBA_SPAN(16, unsigned short) -IMPLEMENT_WRITE_RGBA_PIXELS(16, unsigned short) -IMPLEMENT_WRITE_MONO_RGBA_PIXELS(16, unsigned short) -IMPLEMENT_READ_RGBA_PIXELS(16, unsigned short) - - -/**********************************************************************/ -/***** 32-bit accelerated drawing funcs *****/ -/**********************************************************************/ - -IMPLEMENT_WRITE_RGBA_SPAN(32, unsigned long) -IMPLEMENT_WRITE_RGB_SPAN(32, unsigned long) -IMPLEMENT_WRITE_MONO_RGBA_SPAN(32, unsigned long) -IMPLEMENT_READ_RGBA_SPAN(32, unsigned long) -IMPLEMENT_WRITE_RGBA_PIXELS(32, unsigned long) -IMPLEMENT_WRITE_MONO_RGBA_PIXELS(32, unsigned long) -IMPLEMENT_READ_RGBA_PIXELS(32, unsigned long) - - -/**********************************************************************/ -/***** Miscellaneous device driver funcs *****/ -/**********************************************************************/ - -static GLboolean set_buffer(GLcontext *ctx, GLframebuffer *buffer, GLuint bit) - { - AMesaContext context = (AMesaContext)(ctx->DriverCtx); - GLboolean ok = GL_TRUE; - - if (bit == DD_FRONT_LEFT_BIT) - context->Buffer->Active = context->Buffer->Screen; - - else if (bit == DD_BACK_LEFT) - { - if (context->Buffer->Background) - context->Buffer->Active = context->Buffer->Background; - else - ok = GL_FALSE; - } - - else - ok = GL_FALSE; - - return ok; - } - - -static void get_buffer_size(GLcontext *ctx, GLuint *width, GLuint *height) - { - AMesaContext context = (AMesaContext)(ctx->DriverCtx); - - *width = context->Buffer->Width; - *height = context->Buffer->Height; - } - - -static void viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) -{ - /* poll for window size change and realloc software Z/stencil/etc if needed */ - _mesa_ResizeBuffersMESA(); -} - - -/**********************************************************************/ -/**********************************************************************/ - -static void setup_dd_pointers(GLcontext *ctx) - { - AMesaContext context = (AMesaContext)(ctx->DriverCtx); - - /* Initialize all the pointers in the driver struct. Do this whenever */ - /* a new context is made current or we change buffers via set_buffer! */ - - ctx->Driver.UpdateState = setup_dd_pointers; - ctx->Driver.SetBuffer = set_buffer; - ctx->Driver.GetBufferSize = get_buffer_size; - ctx->Driver.Viewport = viewport; - - ctx->Driver.Color = set_color_generic; - ctx->Driver.ClearColor = clear_color_generic; - ctx->Driver.Clear = clear_generic; - ctx->Driver.WriteRGBASpan = write_rgba_span_generic; - ctx->Driver.WriteRGBSpan = write_rgb_span_generic; - ctx->Driver.WriteMonoRGBASpan = write_mono_rgba_span_generic; - ctx->Driver.WriteRGBAPixels = write_rgba_pixels_generic; - ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_generic; - ctx->Driver.ReadRGBASpan = read_rgba_span_generic; - ctx->Driver.ReadRGBAPixels = read_rgba_pixels_generic; - - if (context->Buffer->Active != screen) - { - switch (context->Visual->Depth) - { - case 15: - ctx->Driver.WriteRGBASpan = write_rgba_span_15; - ctx->Driver.WriteRGBSpan = write_rgb_span_15; - ctx->Driver.WriteMonoRGBASpan = write_mono_rgba_span_15; - ctx->Driver.WriteRGBAPixels = write_rgba_pixels_15; - ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_15; - ctx->Driver.ReadRGBASpan = read_rgba_span_15; - ctx->Driver.ReadRGBAPixels = read_rgba_pixels_15; - break; - - case 16: - ctx->Driver.WriteRGBASpan = write_rgba_span_16; - ctx->Driver.WriteRGBSpan = write_rgb_span_16; - ctx->Driver.WriteMonoRGBASpan = write_mono_rgba_span_16; - ctx->Driver.WriteRGBAPixels = write_rgba_pixels_16; - ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_16; - ctx->Driver.ReadRGBASpan = read_rgba_span_16; - ctx->Driver.ReadRGBAPixels = read_rgba_pixels_16; - break; - - case 32: - ctx->Driver.WriteRGBASpan = write_rgba_span_32; - ctx->Driver.WriteRGBSpan = write_rgb_span_32; - ctx->Driver.WriteMonoRGBASpan = write_mono_rgba_span_32; - ctx->Driver.WriteRGBAPixels = write_rgba_pixels_32; - ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_32; - ctx->Driver.ReadRGBASpan = read_rgba_span_32; - ctx->Driver.ReadRGBAPixels = read_rgba_pixels_32; - break; - } - } - } - - -/**********************************************************************/ -/***** AMesa Public API Functions *****/ -/**********************************************************************/ - - -AMesaVisual AMesaCreateVisual(GLboolean dbFlag, GLint depth, - GLint depthSize, GLint stencilSize, GLint accumSize) - { - AMesaVisual visual; - GLbyte redBits, greenBits, blueBits; - - visual = (AMesaVisual)calloc(1, sizeof(struct amesa_visual)); - if (!visual) - return NULL; - - switch (depth) - { - case 15: - redBits = 5; - greenBits = 5; - blueBits = 5; - break; - - case 16: - redBits = 5; - greenBits = 6; - blueBits = 5; - break; - - case 24: case 32: - redBits = 8; - greenBits = 8; - blueBits = 8; - break; - - default: - free(visual); - return NULL; - } - - visual->DBFlag = dbFlag; - visual->Depth = depth; - visual->GLVisual = _mesa_create_visual(GL_TRUE, /* rgb mode */ - dbFlag, /* db_flag */ - GL_FALSE, /* stereo */ - redBits, greenBits, blueBits, 8, - 0, /* index bits */ - depthSize, /* depth bits */ - stencilSize,/* stencil bits */ - accumSize, /* accum bits */ - accumSize, /* accum bits */ - accumSize, /* accum bits */ - accumSize, /* accum bits */ - 1 ); - if (!visual->GLVisual) - { - free(visual); - return NULL; - } - - return visual; - } - - -void AMesaDestroyVisual(AMesaVisual visual) - { - _mesa_destroy_visual(visual->GLVisual); - free(visual); - } - - -AMesaBuffer AMesaCreateBuffer(AMesaVisual visual, - GLint width, GLint height) - { - AMesaBuffer buffer; - - buffer = (AMesaBuffer)calloc(1, sizeof(struct amesa_buffer)); - if (!buffer) - return NULL; - - buffer->Screen = NULL; - buffer->Background = NULL; - buffer->Active = NULL; - buffer->Width = width; - buffer->Height = height; - - if (visual->DBFlag) - { - buffer->Background = create_bitmap_ex(visual->Depth, width, height); - if (!buffer->Background) - { - free(buffer); - return NULL; - } - } - - buffer->GLBuffer = _mesa_create_framebuffer(visual->GLVisual); - if (!buffer->GLBuffer) - { - if (buffer->Background) destroy_bitmap(buffer->Background); - free(buffer); - return NULL; - } - - return buffer; - } - - -void AMesaDestroyBuffer(AMesaBuffer buffer) -{ - if (buffer->Screen) destroy_bitmap(buffer->Screen); - if (buffer->Background) destroy_bitmap(buffer->Background); - _mesa_destroy_framebuffer(buffer->GLBuffer); - free(buffer); -} - - -AMesaContext AMesaCreateContext(AMesaVisual visual, - AMesaContext share) -{ - AMesaContext context; - GLboolean direct = GL_FALSE; - - context = (AMesaContext)calloc(1, sizeof(struct amesa_context)); - if (!context) - return NULL; - - context->Visual = visual; - context->Buffer = NULL; - context->ClearColor = 0; - context->CurrentColor = 0; - context->GLContext = _mesa_create_context(visual->GLVisual, - share ? share->GLContext : NULL, - (void *) context, GL_FALSE ); - if (!context->GLContext) - { - free(context); - return NULL; - } - - return context; -} - - -void AMesaDestroyContext(AMesaContext context) -{ - _mesa_destroy_context(context->GLContext); - free(context); -} - - -GLboolean AMesaMakeCurrent(AMesaContext context, AMesaBuffer buffer) -{ - if (context && buffer) { - set_color_depth(context->Visual->Depth); - if (set_gfx_mode(GFX_AUTODETECT, buffer->Width, buffer->Height, 0, 0) != 0) - return GL_FALSE; - - context->Buffer = buffer; - buffer->Screen = screen; - buffer->Active = buffer->Background ? buffer->Background : screen; - - setup_dd_pointers(context->GLContext); - _mesa_make_current(context->GLContext, buffer->GLBuffer); - } - else { - /* XXX I don't think you want to destroy anything here! */ - destroy_bitmap(context->Buffer->Screen); - context->Buffer->Screen = NULL; - context->Buffer->Active = NULL; - context->Buffer = NULL; - _mesa_make_current(NULL, NULL); - } - - return GL_TRUE; -} - - -void AMesaSwapBuffers(AMesaBuffer buffer) -{ - if (buffer->Background) { - blit(buffer->Background, buffer->Screen, - 0, 0, 0, 0, - buffer->Width, buffer->Height); - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/allegro/direct.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/allegro/direct.h deleted file mode 100644 index 3998fc19d7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/allegro/direct.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.0 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#define DESTINATION(BMP, X, Y, TYPE) \ - ({ \ - BITMAP *_bmp = BMP; \ - \ - (TYPE*)(_bmp->line[_bmp->h - (Y) - 1]) + (X); \ - }) - - -#define IMPLEMENT_WRITE_RGBA_SPAN(DEPTH, TYPE) \ -static void write_rgba_span_##DEPTH (const GLcontext *ctx, \ - GLuint n, GLint x, GLint y, \ - const GLubyte rgba[][4], \ - const GLubyte mask[]) \ - { \ - AMesaContext context = (AMesaContext)(ctx->DriverCtx); \ - TYPE *d = DESTINATION(context->Buffer->Active, x, y, TYPE); \ - \ - if (mask) \ - { \ - while (n--) \ - { \ - if (mask[0]) d[0] = makecol##DEPTH(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]); \ - d++; rgba++; mask++; \ - } \ - } \ - else \ - { \ - while (n--) \ - { \ - d[0] = makecol##DEPTH(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]); \ - d++; rgba++; \ - } \ - } \ - } - - -#define IMPLEMENT_WRITE_RGB_SPAN(DEPTH, TYPE) \ -static void write_rgb_span_##DEPTH (const GLcontext *ctx, \ - GLuint n, GLint x, GLint y, \ - const GLubyte rgb[][3], \ - const GLubyte mask[]) \ - { \ - AMesaContext context = (AMesaContext)(ctx->DriverCtx); \ - TYPE *d = DESTINATION(context->Buffer->Active, x, y, TYPE); \ - \ - if (mask) \ - { \ - while (n--) \ - { \ - if (mask[0]) d[0] = makecol##DEPTH(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]); \ - d++; rgb++; mask++; \ - } \ - } \ - else \ - { \ - while (n--) \ - { \ - d[0] = makecol##DEPTH(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]); \ - d++; rgb++; \ - } \ - } \ - } - - -#define IMPLEMENT_WRITE_MONO_RGBA_SPAN(DEPTH, TYPE) \ -static void write_mono_rgba_span_##DEPTH (const GLcontext *ctx, \ - GLuint n, GLint x, GLint y, \ - const GLubyte mask[]) \ - { \ - AMesaContext context = (AMesaContext)(ctx->DriverCtx); \ - TYPE color = context->CurrentColor; \ - TYPE *d = DESTINATION(context->Buffer->Active, x, y, TYPE); \ - \ - while (n--) \ - { \ - if (mask[0]) d[0] = color; \ - d++; mask++; \ - } \ - } - - -#define IMPLEMENT_READ_RGBA_SPAN(DEPTH, TYPE) \ -static void read_rgba_span_##DEPTH (const GLcontext *ctx, \ - GLuint n, GLint x, GLint y, \ - GLubyte rgba[][4]) \ - { \ - AMesaContext context = (AMesaContext)(ctx->DriverCtx); \ - BITMAP *bmp = context->Buffer->Active; \ - TYPE *d = DESTINATION(bmp, x, y, TYPE); \ - \ - while (n--) \ - { \ - rgba[0][RCOMP] = getr##DEPTH(d[0]); \ - rgba[0][GCOMP] = getg##DEPTH(d[0]); \ - rgba[0][BCOMP] = getb##DEPTH(d[0]); \ - rgba[0][ACOMP] = 255; \ - \ - d++; rgba++; \ - } \ - } - - -#define IMPLEMENT_WRITE_RGBA_PIXELS(DEPTH, TYPE) \ -static void write_rgba_pixels_##DEPTH (const GLcontext *ctx, \ - GLuint n, \ - const GLint x[], \ - const GLint y[], \ - const GLubyte rgba[][4], \ - const GLubyte mask[]) \ - { \ - AMesaContext context = (AMesaContext)(ctx->DriverCtx); \ - BITMAP *bmp = context->Buffer->Active; \ - \ - while (n--) \ - { \ - if (mask[0]) *DESTINATION(bmp, x[0], y[0], TYPE) = makecol##DEPTH(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]); \ - rgba++; x++; y++; mask++; \ - } \ - } - - - -#define IMPLEMENT_WRITE_MONO_RGBA_PIXELS(DEPTH, TYPE) \ -static void write_mono_rgba_pixels_##DEPTH (const GLcontext *ctx, \ - GLuint n, \ - const GLint x[], \ - const GLint y[], \ - const GLubyte mask[]) \ - { \ - AMesaContext context = (AMesaContext)(ctx->DriverCtx); \ - TYPE color = context->CurrentColor; \ - BITMAP *bmp = context->Buffer->Active; \ - \ - while (n--) \ - { \ - if (mask[0]) *DESTINATION(bmp, x[0], y[0], TYPE) = color; \ - x++; y++; mask++; \ - } \ - } - - -#define IMPLEMENT_READ_RGBA_PIXELS(DEPTH, TYPE) \ -static void read_rgba_pixels_##DEPTH (const GLcontext *ctx, \ - GLuint n, \ - const GLint x[], \ - const GLint y[], \ - GLubyte rgba[][4], \ - const GLubyte mask[]) \ - { \ - AMesaContext context = (AMesaContext)(ctx->DriverCtx); \ - BITMAP *bmp = context->Buffer->Active; \ - \ - while (n--) \ - { \ - if (mask[0]) \ - { \ - int color = *DESTINATION(bmp, x[0], y[0], TYPE); \ - \ - rgba[0][RCOMP] = getr##DEPTH(color); \ - rgba[0][GCOMP] = getg##DEPTH(color); \ - rgba[0][BCOMP] = getb##DEPTH(color); \ - rgba[0][ACOMP] = 255; \ - } \ - \ - x++; y++; rgba++; mask++; \ - } \ - } - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/allegro/generic.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/allegro/generic.h deleted file mode 100644 index cbdf5ff2b3..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/allegro/generic.h +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.0 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -static void clear_color_generic(GLcontext *ctx, const GLfloat color[4]) - { - AMesaContext context = (AMesaContext)(ctx->DriverCtx); - GLubyte r, g, b; - CLAMPED_FLOAT_TO_UBYTE(r, color[0]); - CLAMPED_FLOAT_TO_UBYTE(g, color[1]); - CLAMPED_FLOAT_TO_UBYTE(b, color[2]); - context->ClearColor = makecol(r, g, b); - } - - -static void set_color_generic(GLcontext *ctx, - GLubyte red, GLubyte green, - GLubyte blue, GLubyte alpha) - { - AMesaContext context = (AMesaContext)(ctx->DriverCtx); - - context->CurrentColor = makecol(red, green, blue); - } - - -static GLbitfield clear_generic(GLcontext *ctx, - GLbitfield mask, GLboolean all, - GLint x, GLint y, - GLint width, GLint height) - { - AMesaContext context = (AMesaContext)(ctx->DriverCtx); - - if (mask & GL_COLOR_BUFFER_BIT) - { - if (all) - clear_to_color(context->Buffer->Active, context->ClearColor); - else - rect(context->Buffer->Active, - x, y, x+width-1, y+height-1, - context->ClearColor); - } - - return mask & (~GL_COLOR_BUFFER_BIT); - } - - -static void write_rgba_span_generic(const GLcontext *ctx, - GLuint n, GLint x, GLint y, - const GLubyte rgba[][4], - const GLubyte mask[]) - { - AMesaContext context = (AMesaContext)(ctx->DriverCtx); - BITMAP *bmp = context->Buffer->Active; - - y = FLIP(context, y); - - if (mask) - { - while (n--) - { - if (mask[0]) putpixel(bmp, x, y, makecol(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP])); - x++; mask++; rgba++; - } - } - else - { - while (n--) - { - putpixel(bmp, x, y, makecol(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP])); - x++; rgba++; - } - } - } - - -static void write_rgb_span_generic(const GLcontext *ctx, - GLuint n, GLint x, GLint y, - const GLubyte rgb[][3], - const GLubyte mask[]) - { - AMesaContext context = (AMesaContext)(ctx->DriverCtx); - BITMAP *bmp = context->Buffer->Active; - - y = FLIP(context, y); - - if (mask) - { - while(n--) - { - if (mask[0]) putpixel(bmp, x, y, makecol(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP])); - x++; mask++; rgb++; - } - } - else - { - while (n--) - { - putpixel(bmp, x, y, makecol(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP])); - x++; rgb++; - } - } - } - - -static void write_mono_rgba_span_generic(const GLcontext *ctx, - GLuint n, GLint x, GLint y, - const GLubyte mask[]) - { - AMesaContext context = (AMesaContext)(ctx->DriverCtx); - BITMAP *bmp = context->Buffer->Active; - int color = context->CurrentColor; - - y = FLIP(context, y); - - if (mask) - { - while(n--) - { - if (mask[0]) putpixel(bmp, x, y, color); - x++; mask++; - } - } - else - { - while(n--) - { - putpixel(bmp, x, y, color); - x++; - } - } - } - - -static void read_rgba_span_generic(const GLcontext *ctx, - GLuint n, GLint x, GLint y, - GLubyte rgba[][4]) - { - AMesaContext context = (AMesaContext)(ctx->DriverCtx); - BITMAP *bmp = context->Buffer->Active; - - y = FLIP(context, y); - - while (n--) - { - int color = getpixel(bmp, x, y); - - rgba[0][RCOMP] = getr(color); - rgba[0][GCOMP] = getg(color); - rgba[0][BCOMP] = getb(color); - rgba[0][ACOMP] = 255; - - x++; rgba++; - } - } - - -static void write_rgba_pixels_generic(const GLcontext *ctx, - GLuint n, - const GLint x[], - const GLint y[], - const GLubyte rgba[][4], - const GLubyte mask[]) - { - AMesaContext context = (AMesaContext)(ctx->DriverCtx); - BITMAP *bmp = context->Buffer->Active; - - while (n--) - { - if (mask[0]) putpixel(bmp, x[0], FLIP(context, y[0]), makecol(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP])); - x++; y++; mask++; - } - } - - -static void write_mono_rgba_pixels_generic(const GLcontext *ctx, - GLuint n, - const GLint x[], - const GLint y[], - const GLubyte mask[]) - { - AMesaContext context = (AMesaContext)(ctx->DriverCtx); - BITMAP *bmp = context->Buffer->Active; - int color = context->CurrentColor; - - while (n--) - { - if (mask[0]) putpixel(bmp, x[0], FLIP(context, y[0]), color); - x++; y++; mask++; - } - } - - -static void read_rgba_pixels_generic(const GLcontext *ctx, - GLuint n, - const GLint x[], - const GLint y[], - GLubyte rgba[][4], - const GLubyte mask[]) - { - AMesaContext context = (AMesaContext)(ctx->DriverCtx); - BITMAP *bmp = context->Buffer->Active; - - while (n--) - { - if (mask[0]) - { - int color = getpixel(bmp, x[0], FLIP(context, y[0])); - - rgba[0][RCOMP] = getr(color); - rgba[0][GCOMP] = getg(color); - rgba[0][BCOMP] = getb(color); - rgba[0][ACOMP] = 255; - } - - x++; y++; mask++; rgba++; - } - } - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/beos/GLView.cpp b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/beos/GLView.cpp deleted file mode 100644 index 45473a8ef2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/beos/GLView.cpp +++ /dev/null @@ -1,1575 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.1 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include -#include - -extern "C" { - -#include "glheader.h" -#include "version.h" -#include "buffers.h" -#include "bufferobj.h" -#include "context.h" -#include "colormac.h" -#include "depth.h" -#include "extensions.h" -#include "macros.h" -#include "matrix.h" -#include "mtypes.h" -#include "texformat.h" -#include "texobj.h" -#include "teximage.h" -#include "texstore.h" -#include "array_cache/acache.h" -#include "swrast/swrast.h" -#include "swrast_setup/swrast_setup.h" -#include "swrast/s_context.h" -#include "swrast/s_depth.h" -#include "swrast/s_lines.h" -#include "swrast/s_triangle.h" -#include "swrast/s_trispan.h" -#include "tnl/tnl.h" -#include "tnl/t_context.h" -#include "tnl/t_pipeline.h" - -#include "drivers/common/driverfuncs.h" - -} // extern "C" - -#include -#include - -// BeOS component ordering for B_RGBA32 bitmap format -#if B_HOST_IS_LENDIAN - #define BE_RCOMP 2 - #define BE_GCOMP 1 - #define BE_BCOMP 0 - #define BE_ACOMP 3 - - #define PACK_B_RGBA32(color) (color[BCOMP] | (color[GCOMP] << 8) | \ - (color[RCOMP] << 16) | (color[ACOMP] << 24)) - - #define PACK_B_RGB32(color) (color[BCOMP] | (color[GCOMP] << 8) | \ - (color[RCOMP] << 16) | 0xFF000000) -#else - // Big Endian B_RGBA32 bitmap format - #define BE_RCOMP 1 - #define BE_GCOMP 2 - #define BE_BCOMP 3 - #define BE_ACOMP 0 - - #define PACK_B_RGBA32(color) (color[ACOMP] | (color[RCOMP] << 8) | \ - (color[GCOMP] << 16) | (color[BCOMP] << 24)) - - #define PACK_B_RGB32(color) ((color[RCOMP] << 8) | (color[GCOMP] << 16) | \ - (color[BCOMP] << 24) | 0xFF000000) -#endif - -#define FLIP(coord) (LIBGGI_MODE(ggi_ctx->ggi_visual)->visible.y-(coord) - 1) - -const char * color_space_name(color_space space); - -// -// This object hangs off of the BGLView object. We have to use -// Be's BGLView class as-is to maintain binary compatibility (we -// can't add new members to it). Instead we just put all our data -// in this class and use BGLVIew::m_gc to point to it. -// -class MesaDriver -{ -friend class BGLView; -public: - MesaDriver(); - ~MesaDriver(); - - void Init(BGLView * bglview, GLcontext * c, GLvisual * v, GLframebuffer * b); - - void LockGL(); - void UnlockGL(); - void SwapBuffers() const; - status_t CopyPixelsOut(BPoint source, BBitmap *dest); - status_t CopyPixelsIn(BBitmap *source, BPoint dest); - - void CopySubBuffer(GLint x, GLint y, GLuint width, GLuint height) const; - void Draw(BRect updateRect) const; - -private: - MesaDriver(const MesaDriver &rhs); // copy constructor illegal - MesaDriver &operator=(const MesaDriver &rhs); // assignment oper. illegal - - GLcontext * m_glcontext; - GLvisual * m_glvisual; - GLframebuffer * m_glframebuffer; - - BGLView * m_bglview; - BBitmap * m_bitmap; - - GLchan m_clear_color[4]; // buffer clear color - GLuint m_clear_index; // buffer clear color index - GLint m_bottom; // used for flipping Y coords - GLuint m_width; - GLuint m_height; - - // Mesa Device Driver callback functions - static void UpdateState(GLcontext *ctx, GLuint new_state); - static void ClearIndex(GLcontext *ctx, GLuint index); - static void ClearColor(GLcontext *ctx, const GLfloat color[4]); - static void Clear(GLcontext *ctx, GLbitfield mask, - GLboolean all, GLint x, GLint y, - GLint width, GLint height); - static void ClearFront(GLcontext *ctx, GLboolean all, GLint x, GLint y, - GLint width, GLint height); - static void ClearBack(GLcontext *ctx, GLboolean all, GLint x, GLint y, - GLint width, GLint height); - static void Index(GLcontext *ctx, GLuint index); - static void Color(GLcontext *ctx, GLubyte r, GLubyte g, - GLubyte b, GLubyte a); - static void SetBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, - GLenum mode); - static void GetBufferSize(GLframebuffer * framebuffer, GLuint *width, - GLuint *height); - static void Error(GLcontext *ctx); - static const GLubyte * GetString(GLcontext *ctx, GLenum name); - static void Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); - - // Front-buffer functions - static void WriteRGBASpanFront(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - CONST GLubyte rgba[][4], - const GLubyte mask[]); - static void WriteRGBSpanFront(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - CONST GLubyte rgba[][3], - const GLubyte mask[]); - static void WriteMonoRGBASpanFront(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - const GLchan color[4], - const GLubyte mask[]); - static void WriteRGBAPixelsFront(const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - CONST GLubyte rgba[][4], - const GLubyte mask[]); - static void WriteMonoRGBAPixelsFront(const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - const GLchan color[4], - const GLubyte mask[]); - static void WriteCI32SpanFront(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - const GLuint index[], const GLubyte mask[]); - static void WriteCI8SpanFront(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - const GLubyte index[], const GLubyte mask[]); - static void WriteMonoCISpanFront(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - GLuint colorIndex, const GLubyte mask[]); - static void WriteCI32PixelsFront(const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - const GLuint index[], const GLubyte mask[]); - static void WriteMonoCIPixelsFront(const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - GLuint colorIndex, const GLubyte mask[]); - static void ReadCI32SpanFront(const GLcontext *ctx, - GLuint n, GLint x, GLint y, GLuint index[]); - static void ReadRGBASpanFront(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - GLubyte rgba[][4]); - static void ReadCI32PixelsFront(const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - GLuint indx[], const GLubyte mask[]); - static void ReadRGBAPixelsFront(const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - GLubyte rgba[][4], const GLubyte mask[]); - - // Back buffer functions - static void WriteRGBASpanBack(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - CONST GLubyte rgba[][4], - const GLubyte mask[]); - static void WriteRGBSpanBack(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - CONST GLubyte rgba[][3], - const GLubyte mask[]); - static void WriteMonoRGBASpanBack(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - const GLchan color[4], - const GLubyte mask[]); - static void WriteRGBAPixelsBack(const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - CONST GLubyte rgba[][4], - const GLubyte mask[]); - static void WriteMonoRGBAPixelsBack(const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - const GLchan color[4], - const GLubyte mask[]); - static void WriteCI32SpanBack(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - const GLuint index[], const GLubyte mask[]); - static void WriteCI8SpanBack(const GLcontext *ctx, GLuint n, GLint x, GLint y, - const GLubyte index[], const GLubyte mask[]); - static void WriteMonoCISpanBack(const GLcontext *ctx, GLuint n, - GLint x, GLint y, GLuint colorIndex, - const GLubyte mask[]); - static void WriteCI32PixelsBack(const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - const GLuint index[], const GLubyte mask[]); - static void WriteMonoCIPixelsBack(const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - GLuint colorIndex, const GLubyte mask[]); - static void ReadCI32SpanBack(const GLcontext *ctx, - GLuint n, GLint x, GLint y, GLuint index[]); - static void ReadRGBASpanBack(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - GLubyte rgba[][4]); - static void ReadCI32PixelsBack(const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - GLuint indx[], const GLubyte mask[]); - static void ReadRGBAPixelsBack(const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - GLubyte rgba[][4], const GLubyte mask[]); - -}; - -//------------------------------------------------------------------ -// Public interface methods -//------------------------------------------------------------------ - - -// -// Input: rect - initial rectangle -// name - window name -// resizingMode - example: B_FOLLOW_NONE -// mode - usually 0 ? -// options - Bitwise-OR of BGL_* tokens -// -BGLView::BGLView(BRect rect, char *name, - ulong resizingMode, ulong mode, - ulong options) - : BView(rect, name, B_FOLLOW_ALL_SIDES, mode | B_WILL_DRAW | B_FRAME_EVENTS) // | B_FULL_UPDATE_ON_RESIZE) -{ - // We don't support single buffering (yet): double buffering forced. - options |= BGL_DOUBLE; - - const GLboolean rgbFlag = ((options & BGL_INDEX) == 0); - const GLboolean alphaFlag = ((options & BGL_ALPHA) == BGL_ALPHA); - const GLboolean dblFlag = ((options & BGL_DOUBLE) == BGL_DOUBLE); - const GLboolean stereoFlag = false; - const GLint depth = (options & BGL_DEPTH) ? 16 : 0; - const GLint stencil = (options & BGL_STENCIL) ? 8 : 0; - const GLint accum = (options & BGL_ACCUM) ? 16 : 0; - const GLint index = (options & BGL_INDEX) ? 32 : 0; - const GLint red = rgbFlag ? 8 : 0; - const GLint green = rgbFlag ? 8 : 0; - const GLint blue = rgbFlag ? 8 : 0; - const GLint alpha = alphaFlag ? 8 : 0; - - m_options = options | BGL_INDIRECT; - - struct dd_function_table functions; - - if (!rgbFlag) { - fprintf(stderr, "Mesa Warning: color index mode not supported\n"); - } - - // Allocate auxiliary data object - MesaDriver * md = new MesaDriver(); - - // examine option flags and create gl_context struct - GLvisual * visual = _mesa_create_visual( rgbFlag, - dblFlag, - stereoFlag, - red, green, blue, alpha, - index, - depth, - stencil, - accum, accum, accum, accum, - 1 - ); - - // Initialize device driver function table - _mesa_init_driver_functions(&functions); - - functions.GetString = md->GetString; - functions.UpdateState = md->UpdateState; - functions.GetBufferSize = md->GetBufferSize; - functions.Clear = md->Clear; - functions.ClearIndex = md->ClearIndex; - functions.ClearColor = md->ClearColor; - functions.Error = md->Error; - functions.Viewport = md->Viewport; - - // create core context - GLcontext *ctx = _mesa_create_context(visual, NULL, &functions, md); - if (! ctx) { - _mesa_destroy_visual(visual); - delete md; - return; - } - _mesa_enable_sw_extensions(ctx); - _mesa_enable_1_3_extensions(ctx); - _mesa_enable_1_4_extensions(ctx); - _mesa_enable_1_5_extensions(ctx); - - - // create core framebuffer - GLframebuffer * buffer = _mesa_create_framebuffer(visual, - depth > 0 ? GL_TRUE : GL_FALSE, - stencil > 0 ? GL_TRUE: GL_FALSE, - accum > 0 ? GL_TRUE : GL_FALSE, - alphaFlag - ); - - /* Initialize the software rasterizer and helper modules. - */ - _swrast_CreateContext(ctx); - _ac_CreateContext(ctx); - _tnl_CreateContext(ctx); - _swsetup_CreateContext(ctx); - _swsetup_Wakeup(ctx); - - md->Init(this, ctx, visual, buffer ); - - // Hook aux data into BGLView object - m_gc = md; - - // some stupid applications (Quake2) don't even think about calling LockGL() - // before using glGetString and friends... so make sure there is at least a - // valid context. - if (!_mesa_get_current_context()) { - LockGL(); - // not needed, we don't have a looper yet: UnlockLooper(); - } - -} - - -BGLView::~BGLView() -{ - // printf("BGLView destructor\n"); - MesaDriver * md = (MesaDriver *) m_gc; - assert(md); - delete md; -} - -void BGLView::LockGL() -{ - MesaDriver * md = (MesaDriver *) m_gc; - assert(md); - md->LockGL(); -} - -void BGLView::UnlockGL() -{ - MesaDriver * md = (MesaDriver *) m_gc; - assert(md); - md->UnlockGL(); -} - -void BGLView::SwapBuffers() -{ - SwapBuffers(false); -} - -void BGLView::SwapBuffers(bool vSync) -{ - MesaDriver * md = (MesaDriver *) m_gc; - assert(md); - md->SwapBuffers(); - - if (vSync) { - BScreen screen(Window()); - screen.WaitForRetrace(); - } -} - - -#if 0 -void BGLView::CopySubBufferMESA(GLint x, GLint y, GLuint width, GLuint height) -{ - MesaDriver * md = (MesaDriver *) m_gc; - assert(md); - md->CopySubBuffer(x, y, width, height); -} -#endif - -BView * BGLView::EmbeddedView() -{ - return NULL; -} - -status_t BGLView::CopyPixelsOut(BPoint source, BBitmap *dest) -{ - if (! dest || ! dest->Bounds().IsValid()) - return B_BAD_VALUE; - - MesaDriver * md = (MesaDriver *) m_gc; - assert(md); - return md->CopyPixelsOut(source, dest); -} - -status_t BGLView::CopyPixelsIn(BBitmap *source, BPoint dest) -{ - if (! source || ! source->Bounds().IsValid()) - return B_BAD_VALUE; - - MesaDriver * md = (MesaDriver *) m_gc; - assert(md); - return md->CopyPixelsIn(source, dest); -} - - -void BGLView::ErrorCallback(unsigned long errorCode) // Mesa's GLenum is not ulong but uint! -{ - char msg[32]; - sprintf(msg, "GL: Error code $%04lx.", errorCode); - // debugger(msg); - fprintf(stderr, "%s\n", msg); - return; -} - -void BGLView::Draw(BRect updateRect) -{ - // printf("BGLView::Draw()\n"); - MesaDriver * md = (MesaDriver *) m_gc; - assert(md); - md->Draw(updateRect); -} - -void BGLView::AttachedToWindow() -{ - BView::AttachedToWindow(); - - // don't paint window background white when resized - SetViewColor(B_TRANSPARENT_32_BIT); -} - -void BGLView::AllAttached() -{ - BView::AllAttached(); -// printf("BGLView AllAttached\n"); -} - -void BGLView::DetachedFromWindow() -{ - BView::DetachedFromWindow(); -} - -void BGLView::AllDetached() -{ - BView::AllDetached(); -// printf("BGLView AllDetached"); -} - -void BGLView::FrameResized(float width, float height) -{ - return BView::FrameResized(width, height); -} - -status_t BGLView::Perform(perform_code d, void *arg) -{ - return BView::Perform(d, arg); -} - - -status_t BGLView::Archive(BMessage *data, bool deep) const -{ - return BView::Archive(data, deep); -} - -void BGLView::MessageReceived(BMessage *msg) -{ - BView::MessageReceived(msg); -} - -void BGLView::SetResizingMode(uint32 mode) -{ - BView::SetResizingMode(mode); -} - -void BGLView::Show() -{ - BView::Show(); -} - -void BGLView::Hide() -{ - BView::Hide(); -} - -BHandler *BGLView::ResolveSpecifier(BMessage *msg, int32 index, - BMessage *specifier, int32 form, - const char *property) -{ - return BView::ResolveSpecifier(msg, index, specifier, form, property); -} - -status_t BGLView::GetSupportedSuites(BMessage *data) -{ - return BView::GetSupportedSuites(data); -} - -void BGLView::DirectConnected( direct_buffer_info *info ) -{ -#if 0 - if (! m_direct_connected && m_direct_connection_disabled) - return; - - direct_info_locker->Lock(); - switch(info->buffer_state & B_DIRECT_MODE_MASK) { - case B_DIRECT_START: - m_direct_connected = true; - case B_DIRECT_MODIFY: - // Get clipping information - if (m_clip_list) - free(m_clip_list); - m_clip_list_count = info->clip_list_count; - m_clip_list = (clipping_rect *) malloc(m_clip_list_count*sizeof(clipping_rect)); - if (m_clip_list) { - memcpy(m_clip_list, info->clip_list, m_clip_list_count*sizeof(clipping_rect)); - fBits = (uint8 *) info->bits; - fRowBytes = info->bytes_per_row; - fFormat = info->pixel_format; - fBounds = info->window_bounds; - fDirty = true; - } - break; - case B_DIRECT_STOP: - fConnected = false; - break; - } - direct_info_locker->Unlock(); -#endif -} - -void BGLView::EnableDirectMode( bool enabled ) -{ - // TODO -} - - -//---- virtual reserved methods ---------- - -void BGLView::_ReservedGLView1() {} -void BGLView::_ReservedGLView2() {} -void BGLView::_ReservedGLView3() {} -void BGLView::_ReservedGLView4() {} -void BGLView::_ReservedGLView5() {} -void BGLView::_ReservedGLView6() {} -void BGLView::_ReservedGLView7() {} -void BGLView::_ReservedGLView8() {} - -#if 0 -// Not implemented!!! - -BGLView::BGLView(const BGLView &v) - : BView(v) -{ - // XXX not sure how this should work - printf("Warning BGLView::copy constructor not implemented\n"); -} - -BGLView &BGLView::operator=(const BGLView &v) -{ - printf("Warning BGLView::operator= not implemented\n"); - return *this; -} -#endif - -void BGLView::dither_front() -{ - // no-op -} - -bool BGLView::confirm_dither() -{ - // no-op - return false; -} - -void BGLView::draw(BRect r) -{ - // XXX no-op ??? -} - -/* Direct Window stuff */ -void BGLView::drawScanline( int x1, int x2, int y, void *data ) -{ - // no-op -} - -void BGLView::scanlineHandler(struct rasStateRec *state, - GLint x1, GLint x2) -{ - // no-op -} - -void BGLView::lock_draw() -{ - // no-op -} - -void BGLView::unlock_draw() -{ - // no-op -} - -bool BGLView::validateView() -{ - // no-op - return true; -} - -// #pragma mark - - -MesaDriver::MesaDriver() -{ - m_glcontext = NULL; - m_glvisual = NULL; - m_glframebuffer = NULL; - m_bglview = NULL; - m_bitmap = NULL; - - m_clear_color[BE_RCOMP] = 0; - m_clear_color[BE_GCOMP] = 0; - m_clear_color[BE_BCOMP] = 0; - m_clear_color[BE_ACOMP] = 0; - - m_clear_index = 0; -} - - -MesaDriver::~MesaDriver() -{ - _mesa_destroy_visual(m_glvisual); - _mesa_destroy_framebuffer(m_glframebuffer); - _mesa_destroy_context(m_glcontext); - - delete m_bitmap; -} - - -void MesaDriver::Init(BGLView * bglview, GLcontext * ctx, GLvisual * visual, GLframebuffer * framebuffer) -{ - m_bglview = bglview; - m_glcontext = ctx; - m_glvisual = visual; - m_glframebuffer = framebuffer; - - MesaDriver * md = (MesaDriver *) ctx->DriverCtx; - struct swrast_device_driver * swdd = _swrast_GetDeviceDriverReference( ctx ); - TNLcontext * tnl = TNL_CONTEXT(ctx); - - assert(md->m_glcontext == ctx ); - assert(tnl); - assert(swdd); - - // Use default TCL pipeline - tnl->Driver.RunPipeline = _tnl_run_pipeline; - - swdd->SetBuffer = this->SetBuffer; -} - - -void MesaDriver::LockGL() -{ - m_bglview->LockLooper(); - - UpdateState(m_glcontext, 0); - _mesa_make_current(m_glcontext, m_glframebuffer); -} - - -void MesaDriver::UnlockGL() -{ - if (m_bglview->Looper()->IsLocked()) - m_bglview->UnlockLooper(); - // Could call _mesa_make_current(NULL, NULL) but it would just - // hinder performance -} - - -void MesaDriver::SwapBuffers() const -{ - _mesa_notifySwapBuffers(m_glcontext); - - if (m_bitmap) { - m_bglview->LockLooper(); - m_bglview->DrawBitmap(m_bitmap); - m_bglview->UnlockLooper(); - }; -} - - -void MesaDriver::CopySubBuffer(GLint x, GLint y, GLuint width, GLuint height) const -{ - if (m_bitmap) { - // Source bitmap and view's bitmap are same size. - // Source and dest rectangle are the same. - // Note (x,y) = (0,0) is the lower-left corner, have to flip Y - BRect srcAndDest; - srcAndDest.left = x; - srcAndDest.right = x + width - 1; - srcAndDest.bottom = m_bottom - y; - srcAndDest.top = srcAndDest.bottom - height + 1; - m_bglview->DrawBitmap(m_bitmap, srcAndDest, srcAndDest); - } -} - -status_t MesaDriver::CopyPixelsOut(BPoint location, BBitmap *bitmap) -{ - color_space scs = m_bitmap->ColorSpace(); - color_space dcs = bitmap->ColorSpace(); - - if (scs != dcs && (scs != B_RGBA32 || dcs != B_RGB32)) { - printf("CopyPixelsOut(): incompatible color space: %s != %s\n", - color_space_name(scs), - color_space_name(dcs)); - return B_BAD_TYPE; - } - - // debugger("CopyPixelsOut()"); - - BRect sr = m_bitmap->Bounds(); - BRect dr = bitmap->Bounds(); - - sr = sr & dr.OffsetBySelf(location); - dr = sr.OffsetByCopy(-location.x, -location.y); - - uint8 *ps = (uint8 *) m_bitmap->Bits(); - uint8 *pd = (uint8 *) bitmap->Bits(); - uint32 *s, *d; - uint32 y; - for (y = (uint32) sr.top; y <= (uint32) sr.bottom; y++) { - s = (uint32 *) (ps + y * m_bitmap->BytesPerRow()); - s += (uint32) sr.left; - - d = (uint32 *) (pd + (y + (uint32) (dr.top - sr.top)) * bitmap->BytesPerRow()); - d += (uint32) dr.left; - - memcpy(d, s, dr.IntegerWidth() * 4); - } - return B_OK; -} - -status_t MesaDriver::CopyPixelsIn(BBitmap *bitmap, BPoint location) -{ - color_space scs = bitmap->ColorSpace(); - color_space dcs = m_bitmap->ColorSpace(); - - if (scs != dcs && (dcs != B_RGBA32 || scs != B_RGB32)) { - printf("CopyPixelsIn(): incompatible color space: %s != %s\n", - color_space_name(scs), - color_space_name(dcs)); - return B_BAD_TYPE; - } - - // debugger("CopyPixelsIn()"); - - BRect sr = bitmap->Bounds(); - BRect dr = m_bitmap->Bounds(); - - sr = sr & dr.OffsetBySelf(location); - dr = sr.OffsetByCopy(-location.x, -location.y); - - uint8 *ps = (uint8 *) bitmap->Bits(); - uint8 *pd = (uint8 *) m_bitmap->Bits(); - uint32 *s, *d; - uint32 y; - for (y = (uint32) sr.top; y <= (uint32) sr.bottom; y++) { - s = (uint32 *) (ps + y * bitmap->BytesPerRow()); - s += (uint32) sr.left; - - d = (uint32 *) (pd + (y + (uint32) (dr.top - sr.top)) * m_bitmap->BytesPerRow()); - d += (uint32) dr.left; - - memcpy(d, s, dr.IntegerWidth() * 4); - } - return B_OK; -} - - -void MesaDriver::Draw(BRect updateRect) const -{ - if (m_bitmap) - m_bglview->DrawBitmap(m_bitmap, updateRect, updateRect); -} - - -void MesaDriver::Error(GLcontext *ctx) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - if (md && md->m_bglview) - md->m_bglview->ErrorCallback((unsigned long) ctx->ErrorValue); -} - -void MesaDriver::UpdateState( GLcontext *ctx, GLuint new_state ) -{ - struct swrast_device_driver * swdd = _swrast_GetDeviceDriverReference( ctx ); - - _swrast_InvalidateState( ctx, new_state ); - _swsetup_InvalidateState( ctx, new_state ); - _ac_InvalidateState( ctx, new_state ); - _tnl_InvalidateState( ctx, new_state ); - - if (ctx->Color.DrawBuffer[0] == GL_FRONT) { - /* read/write front buffer */ - swdd->WriteRGBASpan = MesaDriver::WriteRGBASpanFront; - swdd->WriteRGBSpan = MesaDriver::WriteRGBSpanFront; - swdd->WriteRGBAPixels = MesaDriver::WriteRGBAPixelsFront; - swdd->WriteMonoRGBASpan = MesaDriver::WriteMonoRGBASpanFront; - swdd->WriteMonoRGBAPixels = MesaDriver::WriteMonoRGBAPixelsFront; - swdd->WriteCI32Span = MesaDriver::WriteCI32SpanFront; - swdd->WriteCI8Span = MesaDriver::WriteCI8SpanFront; - swdd->WriteMonoCISpan = MesaDriver::WriteMonoCISpanFront; - swdd->WriteCI32Pixels = MesaDriver::WriteCI32PixelsFront; - swdd->WriteMonoCIPixels = MesaDriver::WriteMonoCIPixelsFront; - swdd->ReadRGBASpan = MesaDriver::ReadRGBASpanFront; - swdd->ReadRGBAPixels = MesaDriver::ReadRGBAPixelsFront; - swdd->ReadCI32Span = MesaDriver::ReadCI32SpanFront; - swdd->ReadCI32Pixels = MesaDriver::ReadCI32PixelsFront; - } - else { - /* read/write back buffer */ - swdd->WriteRGBASpan = MesaDriver::WriteRGBASpanBack; - swdd->WriteRGBSpan = MesaDriver::WriteRGBSpanBack; - swdd->WriteRGBAPixels = MesaDriver::WriteRGBAPixelsBack; - swdd->WriteMonoRGBASpan = MesaDriver::WriteMonoRGBASpanBack; - swdd->WriteMonoRGBAPixels = MesaDriver::WriteMonoRGBAPixelsBack; - swdd->WriteCI32Span = MesaDriver::WriteCI32SpanBack; - swdd->WriteCI8Span = MesaDriver::WriteCI8SpanBack; - swdd->WriteMonoCISpan = MesaDriver::WriteMonoCISpanBack; - swdd->WriteCI32Pixels = MesaDriver::WriteCI32PixelsBack; - swdd->WriteMonoCIPixels = MesaDriver::WriteMonoCIPixelsBack; - swdd->ReadRGBASpan = MesaDriver::ReadRGBASpanBack; - swdd->ReadRGBAPixels = MesaDriver::ReadRGBAPixelsBack; - swdd->ReadCI32Span = MesaDriver::ReadCI32SpanBack; - swdd->ReadCI32Pixels = MesaDriver::ReadCI32PixelsBack; - } -} - - -void MesaDriver::ClearIndex(GLcontext *ctx, GLuint index) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - md->m_clear_index = index; -} - - -void MesaDriver::ClearColor(GLcontext *ctx, const GLfloat color[4]) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - CLAMPED_FLOAT_TO_CHAN(md->m_clear_color[BE_RCOMP], color[0]); - CLAMPED_FLOAT_TO_CHAN(md->m_clear_color[BE_GCOMP], color[1]); - CLAMPED_FLOAT_TO_CHAN(md->m_clear_color[BE_BCOMP], color[2]); - CLAMPED_FLOAT_TO_CHAN(md->m_clear_color[BE_ACOMP], color[3]); - assert(md->m_bglview); -} - - -void MesaDriver::Clear(GLcontext *ctx, GLbitfield mask, - GLboolean all, GLint x, GLint y, - GLint width, GLint height) -{ - if (mask & DD_FRONT_LEFT_BIT) - ClearFront(ctx, all, x, y, width, height); - if (mask & DD_BACK_LEFT_BIT) - ClearBack(ctx, all, x, y, width, height); - - mask &= ~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT); - if (mask) - _swrast_Clear( ctx, mask, all, x, y, width, height ); - - return; -} - - -void MesaDriver::ClearFront(GLcontext *ctx, - GLboolean all, GLint x, GLint y, - GLint width, GLint height) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - BGLView *bglview = md->m_bglview; - assert(bglview); - - bglview->SetHighColor(md->m_clear_color[BE_RCOMP], - md->m_clear_color[BE_GCOMP], - md->m_clear_color[BE_BCOMP], - md->m_clear_color[BE_ACOMP]); - bglview->SetLowColor(md->m_clear_color[BE_RCOMP], - md->m_clear_color[BE_GCOMP], - md->m_clear_color[BE_BCOMP], - md->m_clear_color[BE_ACOMP]); - if (all) { - BRect b = bglview->Bounds(); - bglview->FillRect(b); - } - else { - // XXX untested - BRect b; - b.left = x; - b.right = x + width; - b.bottom = md->m_height - y - 1; - b.top = b.bottom - height; - bglview->FillRect(b); - } - - // restore drawing color -#if 0 - bglview->SetHighColor(md->mColor[BE_RCOMP], - md->mColor[BE_GCOMP], - md->mColor[BE_BCOMP], - md->mColor[BE_ACOMP]); - bglview->SetLowColor(md->mColor[BE_RCOMP], - md->mColor[BE_GCOMP], - md->mColor[BE_BCOMP], - md->mColor[BE_ACOMP]); -#endif -} - - -void MesaDriver::ClearBack(GLcontext *ctx, - GLboolean all, GLint x, GLint y, - GLint width, GLint height) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - BGLView *bglview = md->m_bglview; - assert(bglview); - BBitmap *bitmap = md->m_bitmap; - assert(bitmap); - GLuint *start = (GLuint *) bitmap->Bits(); - const GLuint *clearPixelPtr = (const GLuint *) md->m_clear_color; - const GLuint clearPixel = B_LENDIAN_TO_HOST_INT32(*clearPixelPtr); - - if (all) { - const int numPixels = md->m_width * md->m_height; - if (clearPixel == 0) { - memset(start, 0, numPixels * 4); - } - else { - for (int i = 0; i < numPixels; i++) { - start[i] = clearPixel; - } - } - } - else { - // XXX untested - start += y * md->m_width + x; - for (int i = 0; i < height; i++) { - for (int j = 0; j < width; j++) { - start[j] = clearPixel; - } - start += md->m_width; - } - } -} - - -void MesaDriver::SetBuffer(GLcontext *ctx, GLframebuffer *buffer, - GLenum mode) -{ - /* TODO */ - (void) ctx; - (void) buffer; - (void) mode; -} - -void MesaDriver::GetBufferSize(GLframebuffer * framebuffer, GLuint *width, - GLuint *height) -{ - GET_CURRENT_CONTEXT(ctx); - if (!ctx) - return; - - MesaDriver * md = (MesaDriver *) ctx->DriverCtx; - BGLView *bglview = md->m_bglview; - assert(bglview); - - BRect b = bglview->Bounds(); - *width = (GLuint) b.IntegerWidth() + 1; // (b.right - b.left + 1); - *height = (GLuint) b.IntegerHeight() + 1; // (b.bottom - b.top + 1); - md->m_bottom = (GLint) b.bottom; - - if (ctx->Visual.doubleBufferMode) { - if (*width != md->m_width || *height != md->m_height) { - // allocate new size of back buffer bitmap - if (md->m_bitmap) - delete md->m_bitmap; - BRect rect(0.0, 0.0, *width - 1, *height - 1); - md->m_bitmap = new BBitmap(rect, B_RGBA32); - } - } - else - { - md->m_bitmap = NULL; - } - - md->m_width = *width; - md->m_height = *height; -} - - -void MesaDriver::Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) -{ - /* poll for window size change and realloc software Z/stencil/etc if needed */ - _mesa_ResizeBuffersMESA(); -} - - -const GLubyte *MesaDriver::GetString(GLcontext *ctx, GLenum name) -{ - switch (name) { - case GL_RENDERER: - return (const GLubyte *) "Mesa " MESA_VERSION_STRING " powered BGLView (software)"; - default: - // Let core library handle all other cases - return NULL; - } -} - - -// Plot a pixel. (0,0) is upper-left corner -// This is only used when drawing to the front buffer. -inline void Plot(BGLView *bglview, int x, int y) -{ - // XXX There's got to be a better way! - BPoint p(x, y), q(x+1, y); - bglview->StrokeLine(p, q); -} - - -void MesaDriver::WriteRGBASpanFront(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - CONST GLubyte rgba[][4], - const GLubyte mask[]) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - BGLView *bglview = md->m_bglview; - assert(bglview); - int flippedY = md->m_bottom - y; - if (mask) { - for (GLuint i = 0; i < n; i++) { - if (mask[i]) { - bglview->SetHighColor(rgba[i][0], rgba[i][1], rgba[i][2], rgba[i][3]); - Plot(bglview, x++, flippedY); - } - } - } - else { - for (GLuint i = 0; i < n; i++) { - bglview->SetHighColor(rgba[i][0], rgba[i][1], rgba[i][2], rgba[i][3]); - Plot(bglview, x++, flippedY); - } - } -} - -void MesaDriver::WriteRGBSpanFront(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - CONST GLubyte rgba[][3], - const GLubyte mask[]) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - BGLView *bglview = md->m_bglview; - assert(bglview); - int flippedY = md->m_bottom - y; - if (mask) { - for (GLuint i = 0; i < n; i++) { - if (mask[i]) { - bglview->SetHighColor(rgba[i][0], rgba[i][1], rgba[i][2]); - Plot(bglview, x++, flippedY); - } - } - } - else { - for (GLuint i = 0; i < n; i++) { - bglview->SetHighColor(rgba[i][0], rgba[i][1], rgba[i][2]); - Plot(bglview, x++, flippedY); - } - } -} - -void MesaDriver::WriteMonoRGBASpanFront(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - const GLchan color[4], - const GLubyte mask[]) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - BGLView *bglview = md->m_bglview; - assert(bglview); - int flippedY = md->m_bottom - y; - bglview->SetHighColor(color[RCOMP], color[GCOMP], color[BCOMP]); - if (mask) { - for (GLuint i = 0; i < n; i++) { - if (mask[i]) { - Plot(bglview, x++, flippedY); - } - } - } - else { - for (GLuint i = 0; i < n; i++) { - Plot(bglview, x++, flippedY); - } - } -} - -void MesaDriver::WriteRGBAPixelsFront(const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - CONST GLubyte rgba[][4], - const GLubyte mask[] ) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - BGLView *bglview = md->m_bglview; - assert(bglview); - if (mask) { - for (GLuint i = 0; i < n; i++) { - if (mask[i]) { - bglview->SetHighColor(rgba[i][0], rgba[i][1], rgba[i][2]); - Plot(bglview, x[i], md->m_bottom - y[i]); - } - } - } - else { - for (GLuint i = 0; i < n; i++) { - bglview->SetHighColor(rgba[i][0], rgba[i][1], rgba[i][2]); - Plot(bglview, x[i], md->m_bottom - y[i]); - } - } -} - - -void MesaDriver::WriteMonoRGBAPixelsFront(const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - const GLchan color[4], - const GLubyte mask[]) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - BGLView *bglview = md->m_bglview; - assert(bglview); - // plot points using current color - bglview->SetHighColor(color[RCOMP], color[GCOMP], color[BCOMP]); - if (mask) { - for (GLuint i = 0; i < n; i++) { - if (mask[i]) { - Plot(bglview, x[i], md->m_bottom - y[i]); - } - } - } - else { - for (GLuint i = 0; i < n; i++) { - Plot(bglview, x[i], md->m_bottom - y[i]); - } - } -} - - -void MesaDriver::WriteCI32SpanFront( const GLcontext *ctx, GLuint n, GLint x, GLint y, - const GLuint index[], const GLubyte mask[] ) -{ - printf("WriteCI32SpanFront() not implemented yet!\n"); - // TODO -} - -void MesaDriver::WriteCI8SpanFront( const GLcontext *ctx, GLuint n, GLint x, GLint y, - const GLubyte index[], const GLubyte mask[] ) -{ - printf("WriteCI8SpanFront() not implemented yet!\n"); - // TODO -} - -void MesaDriver::WriteMonoCISpanFront( const GLcontext *ctx, GLuint n, - GLint x, GLint y, - GLuint colorIndex, const GLubyte mask[] ) -{ - printf("WriteMonoCISpanFront() not implemented yet!\n"); - // TODO -} - - -void MesaDriver::WriteCI32PixelsFront( const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - const GLuint index[], const GLubyte mask[] ) -{ - printf("WriteCI32PixelsFront() not implemented yet!\n"); - // TODO -} - -void MesaDriver::WriteMonoCIPixelsFront( const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - GLuint colorIndex, const GLubyte mask[] ) -{ - printf("WriteMonoCIPixelsFront() not implemented yet!\n"); - // TODO -} - - -void MesaDriver::ReadCI32SpanFront( const GLcontext *ctx, - GLuint n, GLint x, GLint y, GLuint index[] ) -{ - printf("ReadCI32SpanFront() not implemented yet!\n"); - // TODO -} - - -void MesaDriver::ReadRGBASpanFront( const GLcontext *ctx, GLuint n, - GLint x, GLint y, GLubyte rgba[][4] ) -{ - printf("ReadRGBASpanFront() not implemented yet!\n"); - // TODO -} - - -void MesaDriver::ReadCI32PixelsFront( const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - GLuint indx[], const GLubyte mask[] ) -{ - printf("ReadCI32PixelsFront() not implemented yet!\n"); - // TODO -} - - -void MesaDriver::ReadRGBAPixelsFront( const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - GLubyte rgba[][4], const GLubyte mask[] ) -{ - printf("ReadRGBAPixelsFront() not implemented yet!\n"); - // TODO -} - - - - -void MesaDriver::WriteRGBASpanBack(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - CONST GLubyte rgba[][4], - const GLubyte mask[]) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - BBitmap *bitmap = md->m_bitmap; - - assert(bitmap); - - int row = md->m_bottom - y; - uint8 * ptr = (uint8 *) bitmap->Bits() + (row * bitmap->BytesPerRow()) + x * 4; - uint32 * pixel = (uint32 *) ptr; - - if (mask) { - while(n--) { - if (*mask++) - *pixel = PACK_B_RGBA32(rgba[0]); - pixel++; - rgba++; - }; - } else { - while(n--) { - *pixel++ = PACK_B_RGBA32(rgba[0]); - rgba++; - }; - }; - } - - -void MesaDriver::WriteRGBSpanBack(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - CONST GLubyte rgb[][3], - const GLubyte mask[]) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - BBitmap *bitmap = md->m_bitmap; - - assert(bitmap); - - int row = md->m_bottom - y; - uint8 * ptr = (uint8 *) bitmap->Bits() + (row * bitmap->BytesPerRow()) + x * 4; - uint32 * pixel = (uint32 *) ptr; - - if (mask) { - while(n--) { - if (*mask++) - *pixel = PACK_B_RGB32(rgb[0]); - pixel++; - rgb++; - }; - } else { - while(n--) { - *pixel++ = PACK_B_RGB32(rgb[0]); - rgb++; - }; - }; -} - - - - -void MesaDriver::WriteMonoRGBASpanBack(const GLcontext *ctx, GLuint n, - GLint x, GLint y, - const GLchan color[4], const GLubyte mask[]) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - BBitmap *bitmap = md->m_bitmap; - - assert(bitmap); - - int row = md->m_bottom - y; - uint8 * ptr = (uint8 *) bitmap->Bits() + (row * bitmap->BytesPerRow()) + x * 4; - uint32 * pixel = (uint32 *) ptr; - uint32 pixel_color = PACK_B_RGBA32(color); - - if (mask) { - while(n--) { - if (*mask++) - *pixel = pixel_color; - pixel++; - }; - } else { - while(n--) { - *pixel++ = pixel_color; - }; - }; -} - - -void MesaDriver::WriteRGBAPixelsBack(const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - CONST GLubyte rgba[][4], - const GLubyte mask[] ) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - BBitmap *bitmap = md->m_bitmap; - - assert(bitmap); -#if 0 - while(n--) { - if (*mask++) { - int row = md->m_bottom - *y; - uint8 * pixel = (uint8 *) bitmap->Bits() + (row * bitmap->BytesPerRow()) + *x * 4; - *((uint32 *) pixel) = PACK_B_RGBA32(rgba[0]); - }; - x++; - y++; - rgba++; - }; -#else - if (mask) { - for (GLuint i = 0; i < n; i++) { - if (mask[i]) { - GLubyte *pixel = (GLubyte *) bitmap->Bits() - + ((md->m_bottom - y[i]) * bitmap->BytesPerRow()) + x[i] * 4; - pixel[BE_RCOMP] = rgba[i][RCOMP]; - pixel[BE_GCOMP] = rgba[i][GCOMP]; - pixel[BE_BCOMP] = rgba[i][BCOMP]; - pixel[BE_ACOMP] = rgba[i][ACOMP]; - } - } - } - else { - for (GLuint i = 0; i < n; i++) { - GLubyte *pixel = (GLubyte *) bitmap->Bits() - + ((md->m_bottom - y[i]) * bitmap->BytesPerRow()) + x[i] * 4; - pixel[BE_RCOMP] = rgba[i][RCOMP]; - pixel[BE_GCOMP] = rgba[i][GCOMP]; - pixel[BE_BCOMP] = rgba[i][BCOMP]; - pixel[BE_ACOMP] = rgba[i][ACOMP]; - } - } -#endif -} - - -void MesaDriver::WriteMonoRGBAPixelsBack(const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - const GLchan color[4], - const GLubyte mask[]) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - BBitmap *bitmap = md->m_bitmap; - - assert(bitmap); - - uint32 pixel_color = PACK_B_RGBA32(color); -#if 0 - while(n--) { - if (*mask++) { - int row = md->m_bottom - *y; - uint8 * pixel = (uint8 *) bitmap->Bits() + (row * bitmap->BytesPerRow()) + *x * 4; - - *((uint32 *) pixel) = pixel_color; - }; - x++; - y++; - }; -#else - if (mask) { - for (GLuint i = 0; i < n; i++) { - if (mask[i]) { - GLubyte * ptr = (GLubyte *) bitmap->Bits() - + ((md->m_bottom - y[i]) * bitmap->BytesPerRow()) + x[i] * 4; - *((uint32 *) ptr) = pixel_color; - } - } - } - else { - for (GLuint i = 0; i < n; i++) { - GLubyte * ptr = (GLubyte *) bitmap->Bits() - + ((md->m_bottom - y[i]) * bitmap->BytesPerRow()) + x[i] * 4; - *((uint32 *) ptr) = pixel_color; - } - } -#endif -} - - -void MesaDriver::WriteCI32SpanBack( const GLcontext *ctx, GLuint n, - GLint x, GLint y, - const GLuint index[], const GLubyte mask[] ) -{ - printf("WriteCI32SpanBack() not implemented yet!\n"); - // TODO -} - -void MesaDriver::WriteCI8SpanBack( const GLcontext *ctx, GLuint n, - GLint x, GLint y, - const GLubyte index[], const GLubyte mask[] ) -{ - printf("WriteCI8SpanBack() not implemented yet!\n"); - // TODO -} - -void MesaDriver::WriteMonoCISpanBack( const GLcontext *ctx, GLuint n, - GLint x, GLint y, - GLuint colorIndex, const GLubyte mask[] ) -{ - printf("WriteMonoCISpanBack() not implemented yet!\n"); - // TODO -} - - -void MesaDriver::WriteCI32PixelsBack( const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - const GLuint index[], const GLubyte mask[] ) -{ - printf("WriteCI32PixelsBack() not implemented yet!\n"); - // TODO -} - -void MesaDriver::WriteMonoCIPixelsBack( const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - GLuint colorIndex, const GLubyte mask[] ) -{ - printf("WriteMonoCIPixelsBack() not implemented yet!\n"); - // TODO -} - - -void MesaDriver::ReadCI32SpanBack( const GLcontext *ctx, - GLuint n, GLint x, GLint y, GLuint index[] ) -{ - printf("ReadCI32SpanBack() not implemented yet!\n"); - // TODO -} - - -void MesaDriver::ReadRGBASpanBack( const GLcontext *ctx, GLuint n, - GLint x, GLint y, GLubyte rgba[][4] ) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - const BBitmap *bitmap = md->m_bitmap; - assert(bitmap); - int row = md->m_bottom - y; - const GLubyte *pixel = (GLubyte *) bitmap->Bits() - + (row * bitmap->BytesPerRow()) + x * 4; - - for (GLuint i = 0; i < n; i++) { - rgba[i][RCOMP] = pixel[BE_RCOMP]; - rgba[i][GCOMP] = pixel[BE_GCOMP]; - rgba[i][BCOMP] = pixel[BE_BCOMP]; - rgba[i][ACOMP] = pixel[BE_ACOMP]; - pixel += 4; - } -} - - -void MesaDriver::ReadCI32PixelsBack( const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - GLuint indx[], const GLubyte mask[] ) -{ - printf("ReadCI32PixelsBack() not implemented yet!\n"); - // TODO -} - - -void MesaDriver::ReadRGBAPixelsBack( const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - GLubyte rgba[][4], const GLubyte mask[] ) -{ - MesaDriver *md = (MesaDriver *) ctx->DriverCtx; - const BBitmap *bitmap = md->m_bitmap; - assert(bitmap); - - if (mask) { - for (GLuint i = 0; i < n; i++) { - if (mask[i]) { - GLubyte *pixel = (GLubyte *) bitmap->Bits() - + ((md->m_bottom - y[i]) * bitmap->BytesPerRow()) + x[i] * 4; - rgba[i][RCOMP] = pixel[BE_RCOMP]; - rgba[i][GCOMP] = pixel[BE_GCOMP]; - rgba[i][BCOMP] = pixel[BE_BCOMP]; - rgba[i][ACOMP] = pixel[BE_ACOMP]; - }; - }; - } else { - for (GLuint i = 0; i < n; i++) { - GLubyte *pixel = (GLubyte *) bitmap->Bits() - + ((md->m_bottom - y[i]) * bitmap->BytesPerRow()) + x[i] * 4; - rgba[i][RCOMP] = pixel[BE_RCOMP]; - rgba[i][GCOMP] = pixel[BE_GCOMP]; - rgba[i][BCOMP] = pixel[BE_BCOMP]; - rgba[i][ACOMP] = pixel[BE_ACOMP]; - }; - }; -} - -const char * color_space_name(color_space space) -{ -#define C2N(a) case a: return #a - - switch (space) { - C2N(B_RGB24); - C2N(B_RGB32); - C2N(B_RGBA32); - C2N(B_RGB32_BIG); - C2N(B_RGBA32_BIG); - C2N(B_GRAY8); - C2N(B_GRAY1); - C2N(B_RGB16); - C2N(B_RGB15); - C2N(B_RGBA15); - C2N(B_CMAP8); - default: - return "Unknown!"; - }; - -#undef C2N -}; - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/beos/Makefile b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/beos/Makefile deleted file mode 100644 index 41aa3a65c1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/beos/Makefile +++ /dev/null @@ -1,195 +0,0 @@ -# src/mesa/drivers/beos/Makefile - -TOP = ../../../.. -include $(TOP)/configs/current - -include $(TOP)/src/mesa/sources - -MESA_MODULES = $(TOP)/src/mesa/mesa.a -# To switch back to old Mesa GLU implementation (but why do -# you want this!), uncomment this next line: - -# GLU_DIR = $(TOP)/src/glu/mesa -ifeq ($(GLU_DIR),) -# By default, we build the SGI GLU implementation - GLU_DIR = $(TOP)/src/glu/sgi -endif - -ifeq ($(GLU_DIR), $(TOP)/src/glu/mesa) - GLU_MODULES = \ - $(GLU_DIR)/glu.o \ - $(GLU_DIR)/mipmap.o \ - $(GLU_DIR)/nurbs.o \ - $(GLU_DIR)/nurbscrv.o \ - $(GLU_DIR)/nurbssrf.o \ - $(GLU_DIR)/nurbsutl.o \ - $(GLU_DIR)/polytest.o \ - $(GLU_DIR)/project.o \ - $(GLU_DIR)/quadric.o \ - $(GLU_DIR)/tess.o \ - $(GLU_DIR)/tesselat.o -else - GLU_MODULES = \ - $(GLU_DIR)/libutil/error.o \ - $(GLU_DIR)/libutil/glue.o \ - $(GLU_DIR)/libutil/mipmap.o \ - $(GLU_DIR)/libutil/project.o \ - $(GLU_DIR)/libutil/quad.o \ - $(GLU_DIR)/libutil/registry.o \ - $(GLU_DIR)/libtess/dict.o \ - $(GLU_DIR)/libtess/geom.o \ - $(GLU_DIR)/libtess/memalloc.o \ - $(GLU_DIR)/libtess/mesh.o \ - $(GLU_DIR)/libtess/normal.o \ - $(GLU_DIR)/libtess/priorityq.o \ - $(GLU_DIR)/libtess/render.o \ - $(GLU_DIR)/libtess/sweep.o \ - $(GLU_DIR)/libtess/tess.o \ - $(GLU_DIR)/libtess/tessmono.o \ - $(GLU_DIR)/libnurbs/interface/bezierEval.o \ - $(GLU_DIR)/libnurbs/interface/bezierPatch.o \ - $(GLU_DIR)/libnurbs/interface/bezierPatchMesh.o \ - $(GLU_DIR)/libnurbs/interface/glcurveval.o \ - $(GLU_DIR)/libnurbs/interface/glinterface.o \ - $(GLU_DIR)/libnurbs/interface/glrenderer.o \ - $(GLU_DIR)/libnurbs/interface/glsurfeval.o \ - $(GLU_DIR)/libnurbs/interface/incurveeval.o \ - $(GLU_DIR)/libnurbs/interface/insurfeval.o \ - $(GLU_DIR)/libnurbs/internals/arc.o \ - $(GLU_DIR)/libnurbs/internals/arcsorter.o \ - $(GLU_DIR)/libnurbs/internals/arctess.o \ - $(GLU_DIR)/libnurbs/internals/backend.o \ - $(GLU_DIR)/libnurbs/internals/basiccrveval.o \ - $(GLU_DIR)/libnurbs/internals/basicsurfeval.o \ - $(GLU_DIR)/libnurbs/internals/bin.o \ - $(GLU_DIR)/libnurbs/internals/bufpool.o \ - $(GLU_DIR)/libnurbs/internals/cachingeval.o \ - $(GLU_DIR)/libnurbs/internals/ccw.o \ - $(GLU_DIR)/libnurbs/internals/coveandtiler.o \ - $(GLU_DIR)/libnurbs/internals/curve.o \ - $(GLU_DIR)/libnurbs/internals/curvelist.o \ - $(GLU_DIR)/libnurbs/internals/curvesub.o \ - $(GLU_DIR)/libnurbs/internals/dataTransform.o \ - $(GLU_DIR)/libnurbs/internals/displaylist.o \ - $(GLU_DIR)/libnurbs/internals/flist.o \ - $(GLU_DIR)/libnurbs/internals/flistsorter.o \ - $(GLU_DIR)/libnurbs/internals/hull.o \ - $(GLU_DIR)/libnurbs/internals/intersect.o \ - $(GLU_DIR)/libnurbs/internals/knotvector.o \ - $(GLU_DIR)/libnurbs/internals/mapdesc.o \ - $(GLU_DIR)/libnurbs/internals/mapdescv.o \ - $(GLU_DIR)/libnurbs/internals/maplist.o \ - $(GLU_DIR)/libnurbs/internals/mesher.o \ - $(GLU_DIR)/libnurbs/internals/monoTriangulationBackend.o \ - $(GLU_DIR)/libnurbs/internals/monotonizer.o \ - $(GLU_DIR)/libnurbs/internals/mycode.o \ - $(GLU_DIR)/libnurbs/internals/nurbsinterfac.o \ - $(GLU_DIR)/libnurbs/internals/nurbstess.o \ - $(GLU_DIR)/libnurbs/internals/patch.o \ - $(GLU_DIR)/libnurbs/internals/patchlist.o \ - $(GLU_DIR)/libnurbs/internals/quilt.o \ - $(GLU_DIR)/libnurbs/internals/reader.o \ - $(GLU_DIR)/libnurbs/internals/renderhints.o \ - $(GLU_DIR)/libnurbs/internals/slicer.o \ - $(GLU_DIR)/libnurbs/internals/sorter.o \ - $(GLU_DIR)/libnurbs/internals/splitarcs.o \ - $(GLU_DIR)/libnurbs/internals/subdivider.o \ - $(GLU_DIR)/libnurbs/internals/tobezier.o \ - $(GLU_DIR)/libnurbs/internals/trimline.o \ - $(GLU_DIR)/libnurbs/internals/trimregion.o \ - $(GLU_DIR)/libnurbs/internals/trimvertpool.o \ - $(GLU_DIR)/libnurbs/internals/uarray.o \ - $(GLU_DIR)/libnurbs/internals/varray.o \ - $(GLU_DIR)/libnurbs/nurbtess/directedLine.o \ - $(GLU_DIR)/libnurbs/nurbtess/gridWrap.o \ - $(GLU_DIR)/libnurbs/nurbtess/monoChain.o \ - $(GLU_DIR)/libnurbs/nurbtess/monoPolyPart.o \ - $(GLU_DIR)/libnurbs/nurbtess/monoTriangulation.o \ - $(GLU_DIR)/libnurbs/nurbtess/partitionX.o \ - $(GLU_DIR)/libnurbs/nurbtess/partitionY.o \ - $(GLU_DIR)/libnurbs/nurbtess/polyDBG.o \ - $(GLU_DIR)/libnurbs/nurbtess/polyUtil.o \ - $(GLU_DIR)/libnurbs/nurbtess/primitiveStream.o \ - $(GLU_DIR)/libnurbs/nurbtess/quicksort.o \ - $(GLU_DIR)/libnurbs/nurbtess/rectBlock.o \ - $(GLU_DIR)/libnurbs/nurbtess/sampleComp.o \ - $(GLU_DIR)/libnurbs/nurbtess/sampleCompBot.o \ - $(GLU_DIR)/libnurbs/nurbtess/sampleCompRight.o \ - $(GLU_DIR)/libnurbs/nurbtess/sampleCompTop.o \ - $(GLU_DIR)/libnurbs/nurbtess/sampleMonoPoly.o \ - $(GLU_DIR)/libnurbs/nurbtess/sampledLine.o \ - $(GLU_DIR)/libnurbs/nurbtess/searchTree.o -endif - -INCLUDES = \ - -I../common \ - -I$(TOP)/src/mesa \ - -I$(TOP)/src/mesa/array_cache \ - -I$(TOP)/src/mesa/main \ - -I$(TOP)/src/mesa/glapi \ - -I$(TOP)/src/mesa/math \ - -I$(TOP)/src/mesa/shader \ - -I$(TOP)/src/mesa/swrast \ - -I$(TOP)/src/mesa/swrast_setup \ - -I$(TOP)/src/mesa/tnl \ - -I$(TOP)/src/mesa/tnl_dd \ - -I$(TOP)/src/mesa/x86 \ - -I. \ - -I- \ - -I$(TOP)/include - -DRIVER_SOURCES = \ - GLView.cpp \ - ../common/driverfuncs.c \ - $(addprefix ../../, $(GLAPI_SOURCES)) - -ifeq ($(CPU), x86) - DRIVER_SOURCES += $(addprefix ../../, $(X86_API)) -else -# No GL API PPC optimization yet -endif - -DRIVER_OBJECTS = $(DRIVER_SOURCES:.c=.o) -DRIVER_OBJECTS := $(DRIVER_OBJECTS:.S=.o) - -OBJECTS := $(DRIVER_OBJECTS:.cpp=.o) - - -# Rules - -.c.o: - $(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@ - -.cpp.o: - $(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@ - -.S.o: - $(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@ - - -default: depend $(LIB_DIR) $(LIB_DIR)/$(GL_LIB_NAME) - -$(MESA_MODULES): - cd $(TOP)/src/mesa; $(MAKE) mesa.a ; - -$(GLU_MODULES): - cd $(GLU_DIR); $(MAKE) $(subst $(GLU_DIR)/,,$(GLU_MODULES)) ; - -$(LIB_DIR): - mkdir $(LIB_DIR) - -$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES) - @$(TOP)/bin/mklib -o $(GL_LIB) -install $(LIB_DIR) -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \ - $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES) - -# $(GLU_OBJECTS): -# cd $(GLU_DIR); $(MAKE) $< ; - -depend: $(DRIVER_SOURCES) $(GLU_SOURCES) - touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(DRIVER_SOURCES) $(GLU_SOURCES) > /dev/null - -clean: - rm -f depend $(OBJECTS) - -include depend diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/common/descrip.mms b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/common/descrip.mms deleted file mode 100644 index aa4b8ae211..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/common/descrip.mms +++ /dev/null @@ -1,37 +0,0 @@ -# Makefile for core library for VMS -# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl -# Last revision : 16 June 2003 - -.first - define gl [----.include.gl] - define math [--.math] - define swrast [--.swrast] - -.include [----]mms-config. - -##### MACROS ##### - -VPATH = RCS - -INCDIR = [----.include],[--.main],[--.glapi],[--.shader] -LIBDIR = [----.lib] -CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short) - -SOURCES = driverfuncs.c - -OBJECTS =driverfuncs.obj - -##### RULES ##### - -VERSION=Mesa V3.4 - -##### TARGETS ##### -# Make the library -$(LIBDIR)$(GL_LIB) : $(OBJECTS) - @ library $(LIBDIR)$(GL_LIB) $(OBJECTS) - -clean : - purge - delete *.obj;* - -driverfuncs.obj : driverfuncs.c diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/common/driverfuncs.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/common/driverfuncs.c deleted file mode 100644 index 0177490f76..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/common/driverfuncs.c +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.3 - * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "imports.h" -#include "buffers.h" -#include "context.h" -#include "framebuffer.h" -#include "program.h" -#include "renderbuffer.h" -#include "texcompress.h" -#include "texformat.h" -#include "teximage.h" -#include "texobj.h" -#include "texstore.h" -#if FEATURE_ARB_vertex_buffer_object -#include "bufferobj.h" -#endif -#if FEATURE_EXT_framebuffer_object -#include "fbobject.h" -#include "texrender.h" -#endif - -#include "driverfuncs.h" -#include "swrast/swrast.h" -#include "tnl/tnl.h" - - - -/** - * Plug in default functions for all pointers in the dd_function_table - * structure. - * Device drivers should call this function and then plug in any - * functions which it wants to override. - * Some functions (pointers) MUST be implemented by all drivers (REQUIRED). - * - * \param table the dd_function_table to initialize - */ -void -_mesa_init_driver_functions(struct dd_function_table *driver) -{ - _mesa_bzero(driver, sizeof(*driver)); - - driver->GetString = NULL; /* REQUIRED! */ - driver->UpdateState = NULL; /* REQUIRED! */ - driver->GetBufferSize = NULL; /* REQUIRED! */ - driver->ResizeBuffers = _mesa_resize_framebuffer; - driver->Error = NULL; - - driver->Finish = NULL; - driver->Flush = NULL; - - /* framebuffer/image functions */ - driver->Clear = _swrast_Clear; - driver->Accum = _swrast_Accum; - driver->DrawPixels = _swrast_DrawPixels; - driver->ReadPixels = _swrast_ReadPixels; - driver->CopyPixels = _swrast_CopyPixels; - driver->Bitmap = _swrast_Bitmap; - - /* Texture functions */ - driver->ChooseTextureFormat = _mesa_choose_tex_format; - driver->TexImage1D = _mesa_store_teximage1d; - driver->TexImage2D = _mesa_store_teximage2d; - driver->TexImage3D = _mesa_store_teximage3d; - driver->TexSubImage1D = _mesa_store_texsubimage1d; - driver->TexSubImage2D = _mesa_store_texsubimage2d; - driver->TexSubImage3D = _mesa_store_texsubimage3d; - driver->GetTexImage = _mesa_get_teximage; - driver->CopyTexImage1D = _swrast_copy_teximage1d; - driver->CopyTexImage2D = _swrast_copy_teximage2d; - driver->CopyTexSubImage1D = _swrast_copy_texsubimage1d; - driver->CopyTexSubImage2D = _swrast_copy_texsubimage2d; - driver->CopyTexSubImage3D = _swrast_copy_texsubimage3d; - driver->TestProxyTexImage = _mesa_test_proxy_teximage; - driver->CompressedTexImage1D = _mesa_store_compressed_teximage1d; - driver->CompressedTexImage2D = _mesa_store_compressed_teximage2d; - driver->CompressedTexImage3D = _mesa_store_compressed_teximage3d; - driver->CompressedTexSubImage1D = _mesa_store_compressed_texsubimage1d; - driver->CompressedTexSubImage2D = _mesa_store_compressed_texsubimage2d; - driver->CompressedTexSubImage3D = _mesa_store_compressed_texsubimage3d; - driver->GetCompressedTexImage = _mesa_get_compressed_teximage; - driver->CompressedTextureSize = _mesa_compressed_texture_size; - driver->BindTexture = NULL; - driver->NewTextureObject = _mesa_new_texture_object; - driver->DeleteTexture = _mesa_delete_texture_object; - driver->NewTextureImage = _mesa_new_texture_image; - driver->FreeTexImageData = _mesa_free_texture_image_data; - driver->TextureMemCpy = _mesa_memcpy; - driver->IsTextureResident = NULL; - driver->PrioritizeTexture = NULL; - driver->ActiveTexture = NULL; - driver->UpdateTexturePalette = NULL; - - /* imaging */ - driver->CopyColorTable = _swrast_CopyColorTable; - driver->CopyColorSubTable = _swrast_CopyColorSubTable; - driver->CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D; - driver->CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; - - /* Vertex/fragment programs */ - driver->BindProgram = NULL; - driver->NewProgram = _mesa_new_program; - driver->DeleteProgram = _mesa_delete_program; - - /* simple state commands */ - driver->AlphaFunc = NULL; - driver->BlendColor = NULL; - driver->BlendEquationSeparate = NULL; - driver->BlendFuncSeparate = NULL; - driver->ClearColor = NULL; - driver->ClearDepth = NULL; - driver->ClearIndex = NULL; - driver->ClearStencil = NULL; - driver->ClipPlane = NULL; - driver->ColorMask = NULL; - driver->ColorMaterial = NULL; - driver->CullFace = NULL; - driver->DrawBuffer = _swrast_DrawBuffer; - driver->DrawBuffers = NULL; /***_swrast_DrawBuffers;***/ - driver->FrontFace = NULL; - driver->DepthFunc = NULL; - driver->DepthMask = NULL; - driver->DepthRange = NULL; - driver->Enable = NULL; - driver->Fogfv = NULL; - driver->Hint = NULL; - driver->IndexMask = NULL; - driver->Lightfv = NULL; - driver->LightModelfv = NULL; - driver->LineStipple = NULL; - driver->LineWidth = NULL; - driver->LogicOpcode = NULL; - driver->PointParameterfv = NULL; - driver->PointSize = NULL; - driver->PolygonMode = NULL; - driver->PolygonOffset = NULL; - driver->PolygonStipple = NULL; - driver->ReadBuffer = NULL; - driver->RenderMode = NULL; - driver->Scissor = NULL; - driver->ShadeModel = NULL; - driver->StencilFunc = NULL; - driver->StencilMask = NULL; - driver->StencilOp = NULL; - driver->ActiveStencilFace = NULL; - driver->TexGen = NULL; - driver->TexEnv = NULL; - driver->TexParameter = NULL; - driver->TextureMatrix = NULL; - driver->Viewport = NULL; - - /* vertex arrays */ - driver->VertexPointer = NULL; - driver->NormalPointer = NULL; - driver->ColorPointer = NULL; - driver->FogCoordPointer = NULL; - driver->IndexPointer = NULL; - driver->SecondaryColorPointer = NULL; - driver->TexCoordPointer = NULL; - driver->EdgeFlagPointer = NULL; - driver->VertexAttribPointer = NULL; - driver->LockArraysEXT = NULL; - driver->UnlockArraysEXT = NULL; - - /* state queries */ - driver->GetBooleanv = NULL; - driver->GetDoublev = NULL; - driver->GetFloatv = NULL; - driver->GetIntegerv = NULL; - driver->GetPointerv = NULL; - -#if FEATURE_ARB_vertex_buffer_object - driver->NewBufferObject = _mesa_new_buffer_object; - driver->DeleteBuffer = _mesa_delete_buffer_object; - driver->BindBuffer = NULL; - driver->BufferData = _mesa_buffer_data; - driver->BufferSubData = _mesa_buffer_subdata; - driver->GetBufferSubData = _mesa_buffer_get_subdata; - driver->MapBuffer = _mesa_buffer_map; - driver->UnmapBuffer = _mesa_buffer_unmap; -#endif - -#if FEATURE_EXT_framebuffer_object - driver->NewFramebuffer = _mesa_new_framebuffer; - driver->NewRenderbuffer = _mesa_new_soft_renderbuffer; - driver->RenderbufferTexture = _mesa_renderbuffer_texture; - driver->FramebufferRenderbuffer = _mesa_framebuffer_renderbuffer; -#endif - - /* T&L stuff */ - driver->NeedValidate = GL_FALSE; - driver->ValidateTnlModule = NULL; - driver->CurrentExecPrimitive = 0; - driver->CurrentSavePrimitive = 0; - driver->NeedFlush = 0; - driver->SaveNeedFlush = 0; - - driver->FlushVertices = NULL; - driver->SaveFlushVertices = NULL; - driver->NotifySaveBegin = NULL; - driver->LightingSpaceChange = NULL; - driver->MakeCurrent = NULL; - driver->ProgramStringNotify = _tnl_program_string; - - /* display list */ - driver->NewList = NULL; - driver->EndList = NULL; - driver->BeginCallList = NULL; - driver->EndCallList = NULL; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/common/driverfuncs.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/common/driverfuncs.h deleted file mode 100644 index 64f56d91f9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/common/driverfuncs.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.1 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef DRIVERFUNCS_H -#define DRIVERFUNCS_H - -extern void -_mesa_init_driver_functions(struct dd_function_table *driver); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DCAPS.CPP b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DCAPS.CPP deleted file mode 100644 index cd95ef0f1e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DCAPS.CPP +++ /dev/null @@ -1,250 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver Build 5 */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#include "D3DHAL.h" -/*===========================================================================*/ -/* Macros. */ -/*===========================================================================*/ -#define SRCBLEND_MAP(gl,d3d,fall) if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwSrcBlendCaps & d3d ) \ - { \ - sprintf( buffer, "SRC Blend: %s -> %s", # gl, # d3d ); \ - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \ - pShared->dwSrcBlendCaps[index] = d3d; \ - } \ - else \ - { \ - sprintf( buffer, "SRC Blend: %s -> %s", # gl, # fall ); \ - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \ - pShared->dwSrcBlendCaps[index] = fall; \ - } -#define DSTBLEND_MAP(gl,d3d,fall) if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwDestBlendCaps & d3d ) \ - { \ - sprintf( buffer, "DST Blend: %s -> %s", # gl, # d3d ); \ - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \ - pShared->dwDestBlendCaps[index] = d3d; \ - } \ - else \ - { \ - sprintf( buffer, "DST Blend: %s -> %s", # gl, # fall ); \ - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \ - pShared->dwDestBlendCaps[index] = fall; \ - } - -/*===========================================================================*/ -/* I use this function to handle the fact that the D3D texture blending and */ -/* OpenGL texture blending functions don't map one to one. Also there is the*/ -/* problem with cards not supporting all the D3D functions. So I use the CAPS*/ -/* of the card to make a table of functions that will have defaults for the */ -/* unsupported functions. */ -/* So first I fill the table with the fallback function then I check to see */ -/* if the card supports the requested function. If it does I replace the */ -/* default thats already in the array. Now order does matter as I used an */ -/* enum type in D3DShared.h so that the mapping would be a little easier. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -void AlphaBlendTableHAL( PMESAD3DHAL pHAL ) -{ - PMESAD3DSHARED pShared = &pHAL->shared; - int index; - char buffer[128]; - - DPF(( DBG_FUNC, "AlphaBlendTableHAL();" )); - - /* Make the fallback for the Source blend. */ - for( index = 0; index < 14; index++ ) - { - switch( index ) - { - case s_zero: - SRCBLEND_MAP( GL_ZERO, D3DBLEND_ZERO, D3DBLEND_ONE ); - break; - case s_one: - SRCBLEND_MAP( GL_ONE, D3DBLEND_ONE, D3DBLEND_ONE ); - break; - case s_dst_color: - SRCBLEND_MAP( GL_DST_COLOR, D3DBLEND_DESTCOLOR, D3DBLEND_ONE ); - break; - case s_one_minus_dst_color: - SRCBLEND_MAP( GL_ONE_MINUS_DST_COLOR, D3DBLEND_INVDESTCOLOR, D3DBLEND_ONE ); - break; - case s_src_alpha: - SRCBLEND_MAP( GL_SRC_ALPHA, D3DBLEND_SRCALPHA, D3DBLEND_ONE ); - break; - case s_one_minus_src_alpha: - SRCBLEND_MAP( GL_ONE_MINUS_SRC_ALPHA, D3DBLEND_INVSRCALPHA, D3DBLEND_ONE ); - break; - case s_dst_alpha: - SRCBLEND_MAP( GL_DST_ALPHA, D3DBLEND_DESTALPHA, D3DBLEND_ONE ); - break; - case s_one_minus_dst_alpha: - SRCBLEND_MAP( GL_ONE_MINUS_DST_ALPHA, D3DBLEND_INVDESTALPHA, D3DBLEND_ONE ); - break; - case s_src_alpha_saturate: - SRCBLEND_MAP( GL_SRC_ALPHA_SATURATE, D3DBLEND_SRCALPHASAT, D3DBLEND_ONE ); - break; - case s_constant_color: - SRCBLEND_MAP( GL_CONSTANT_COLOR, D3DBLEND_SRCCOLOR, D3DBLEND_ONE ); - break; - case s_one_minus_constant_color: - SRCBLEND_MAP( GL_ONE_MINUS_CONSTANT_COLOR, D3DBLEND_INVSRCCOLOR, D3DBLEND_ONE ); - break; - case s_constant_alpha: - SRCBLEND_MAP( GL_CONSTANT_ALPHA, D3DBLEND_BOTHSRCALPHA, D3DBLEND_ONE ); - break; - case s_one_minus_constant_alpha: - SRCBLEND_MAP( GL_ONE_MINUS_CONSTANT_ALPHA, D3DBLEND_BOTHINVSRCALPHA, D3DBLEND_ONE ); - break; - } - } - - /* Make the fallback for the Destination blend. */ - for( index = 0; index < 14; index++ ) - { - switch( index ) - { - case d_zero: - DSTBLEND_MAP( GL_ZERO, D3DBLEND_ZERO, D3DBLEND_ONE ); - break; - case d_one: - DSTBLEND_MAP( GL_ONE, D3DBLEND_ONE, D3DBLEND_ONE ); - break; - case d_src_color: - DSTBLEND_MAP( GL_SRC_COLOR, D3DBLEND_SRCCOLOR, D3DBLEND_ONE ); - break; - case d_one_minus_src_color: - DSTBLEND_MAP( GL_ONE_MINUS_SRC_COLOR, D3DBLEND_INVSRCCOLOR, D3DBLEND_ONE ); - break; - case d_src_alpha: - DSTBLEND_MAP( GL_SRC_ALPHA, D3DBLEND_SRCALPHA, D3DBLEND_ONE ); - break; - case d_one_minus_src_alpha: - DSTBLEND_MAP( GL_ONE_MINUS_SRC_ALPHA, D3DBLEND_INVSRCALPHA, D3DBLEND_ONE ); - break; - case d_dst_alpha: - DSTBLEND_MAP( GL_DST_ALPHA, D3DBLEND_DESTALPHA, D3DBLEND_ONE ); - break; - case d_one_minus_dst_alpha: - DSTBLEND_MAP( GL_ONE_MINUS_DST_ALPHA, D3DBLEND_INVDESTALPHA, D3DBLEND_ONE ); - break; - case d_constant_color: - DSTBLEND_MAP( GL_CONSTANT_COLOR, D3DBLEND_DESTCOLOR, D3DBLEND_ONE ); - break; - case d_one_minus_constant_color: - DSTBLEND_MAP( GL_ONE_MINUS_CONSTANT_COLOR, D3DBLEND_INVDESTCOLOR, D3DBLEND_ONE ); - break; - case d_constant_alpha: - DSTBLEND_MAP( GL_CONSTANT_ALPHAR, D3DBLEND_BOTHSRCALPHA, D3DBLEND_ONE ); - break; - case d_one_minus_constant_alpha: - DSTBLEND_MAP( GL_ONE_MINUS_CONSTANT_ALPHA, D3DBLEND_BOTHINVSRCALPHA, D3DBLEND_ONE ); - break; - } - } - - /* Make the fallbacks for the texture functions. */ - for( index = 0; index < 4; index++ ) - { - switch( index ) - { - case d3dtblend_decal: - if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL ) - { - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECAL -> D3DTBLEND_DECAL" )); - pShared->dwTexFunc[index] = D3DTBLEND_DECAL; - } - else - { - if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATE ) - { - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECAL -> D3DTBLEND_MODULATE" )); - pShared->dwTexFunc[index] = D3DTBLEND_MODULATE; - } - else - { - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECAL -> D3DTBLEND_ADD" )); - pShared->dwTexFunc[index] = D3DTBLEND_ADD; - } - } - break; - case d3dtblend_decalalpha: - if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECALALPHA ) - { - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECALALPHA -> D3DTBLEND_DECALALPHA" )); - pShared->dwTexFunc[index] = D3DTBLEND_DECALALPHA; - } - else - { - if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL ) - { - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECALALPA -> D3DTBLEND_DECAL" )); - pShared->dwTexFunc[index] = D3DTBLEND_DECAL; - } - else - { - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECALALPHA -> D3DTBLEND_ADD" )); - pShared->dwTexFunc[index] = D3DTBLEND_ADD; - } - } - break; - case d3dtblend_modulate: - if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATE ) - { - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_MODULATE" )); - pShared->dwTexFunc[index] = D3DTBLEND_MODULATE; - } - else - { - if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATEALPHA ) - { - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_MODULATEALPHA" )); - pShared->dwTexFunc[index] = D3DTBLEND_MODULATEALPHA; - } - else if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL ) - { - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_DECAL" )); - pShared->dwTexFunc[index] = D3DTBLEND_DECAL; - } - else - { - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_ADD" )); - pShared->dwTexFunc[index] = D3DTBLEND_ADD; - } - } - break; - case d3dtblend_modulatealpha: - if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATEALPHA ) - { - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_MODULATEALPHA" )); - pShared->dwTexFunc[index] = D3DTBLEND_MODULATEALPHA; - } - else - { - if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATE ) - { - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_MODULATE" )); - pShared->dwTexFunc[index] = D3DTBLEND_MODULATE; - } - else if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL ) - { - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_DECALE" )); - pShared->dwTexFunc[index] = D3DTBLEND_DECAL; - } - else - { - DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_ADD" )); - pShared->dwTexFunc[index] = D3DTBLEND_ADD; - } - } - break; - } - } -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DHAL.H b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DHAL.H deleted file mode 100644 index 5295520d7b..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DHAL.H +++ /dev/null @@ -1,68 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#ifndef _D3D_HAL_INC -#define _D3D_HAL_INC - -/*===========================================================================*/ -/* Includes. */ -/*===========================================================================*/ -#include -#include -#include -#include -#include -#include "D3DShared.h" -#include "D3DTextureMgr.h" -#include "Debug.h" -/*===========================================================================*/ -/* Defines. */ -/*===========================================================================*/ -#define DX_RESTORE(ps) if ( (ps) && (ps)->IsLost() ) (ps)->Restore(); -/*===========================================================================*/ -/* Type defines. */ -/*===========================================================================*/ -typedef struct _d3d_hal_struct -{ - MESAD3DSHARED shared; - - GUID guid; - LPDIRECTDRAW lpDD; - LPDIRECTDRAW4 lpDD4; - LPDIRECT3D3 lpD3D3; - LPDIRECT3DDEVICE3 lpD3DDevice; - D3DDEVICEDESC D3DHWDevDesc; - LPDIRECTDRAWSURFACE4 lpDDSPrimary, - lpDDSRender, - lpDDSZbuffer; - LPDIRECT3DVIEWPORT3 lpViewport; - LPDIRECTDRAWCLIPPER lpClipper; - DDPIXELFORMAT ddpf, - ddpfZBuffer; - PTM_OBJECT pTMList; - -} MESAD3DHAL, *PMESAD3DHAL; -/*===========================================================================*/ -/* External function prototypes. */ -/*===========================================================================*/ -extern BOOL InitTMgrHAL( PMESAD3DHAL pHAL ); -extern void TermTMgrHAL( PMESAD3DHAL pHAL ); -extern void AlphaBlendTableHAL( PMESAD3DHAL pHAL ); - -extern void Solve8BitChannelPixelFormat( DDPIXELFORMAT *pddpf, PPIXELINFO pPixel ); -extern char *ErrorStringD3D( HRESULT hr ); -extern void FatalShutDown( PMESAD3DHAL pHAL ); -/*===========================================================================*/ -/* Global variables. */ -/*===========================================================================*/ -extern char *errorMsg; - -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DInit.cpp b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DInit.cpp deleted file mode 100644 index ba7891612e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DInit.cpp +++ /dev/null @@ -1,891 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver Build 5 */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#include "D3DHAL.h" -/*===========================================================================*/ -/* Local function prototypes. */ -/*===========================================================================*/ -static void DestroyAllSurfaces( PMESAD3DHAL pHAL ); -static void DestroyDevice( PMESAD3DHAL pHAL ); -static void DestroyInterfaces( PMESAD3DHAL pHAL ); - -HRESULT WINAPI EnumSurfacesHook( LPDIRECTDRAWSURFACE4 lpDDS, LPDDSURFACEDESC2 lpDDSDesc, LPVOID pVoid ); -HRESULT CALLBACK EnumZBufferHook( DDPIXELFORMAT* pddpf, VOID *pVoid ); -HRESULT CALLBACK EnumDeviceHook( GUID FAR* lpGuid, LPSTR lpDesc, LPSTR lpName, LPD3DDEVICEDESC lpD3DHWDesc, LPD3DDEVICEDESC lpD3DHELDesc, void *pVoid ); -/*===========================================================================*/ -/* Globals. */ -/*===========================================================================*/ -//char *errorMsg; -/*===========================================================================*/ -/* This function is responable for allocating the actual MESAD3DHAL struct. */ -/* Each Mesa context will have its own MESAD3DHAL struct so its like a mini */ -/* context to some extent. All one time allocations/operations get done here.*/ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -extern "C" PMESAD3DSHARED InitHAL( HWND hwnd ) -{ - PMESAD3DHAL pHAL; - ULONG rc; - - DPF(( DBG_FUNC, "InitHAL();" )); - DPF(( DBG_CNTX_INFO, "hwnd: %d", hwnd )); - - /* Allocate the structure and zero it out. */ - pHAL = (PMESAD3DHAL)ALLOC( sizeof(MESAD3DHAL) ); - if ( pHAL == NULL ) - { - RIP( pHAL, "InitHAL->", "Memory Allocation" ); - return (PMESAD3DSHARED)NULL; - } - memset( pHAL, 0, sizeof(MESAD3DHAL) ); - - /* Get the texture manager going. */ - rc = InitTMgrHAL( pHAL ); - if ( rc == FALSE ) - { - RIP( pHAL, "InitTMgrHAL->", "Failed" ); - return (PMESAD3DSHARED)NULL; - } - - /* Fill in the window parameters if we can. */ - pHAL->shared.hwnd = hwnd; - - /* Parse the user's enviroment variables to generate a debug mask. */ - ReadDBGEnv(); - - return (PMESAD3DSHARED)pHAL; -} -/*===========================================================================*/ -/* This function will unload all the resources that the MESAD3DHAL struct */ -/* has bound to it. The actual structure itself will be freed. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -extern "C" void TermHAL( PMESAD3DSHARED pShared ) -{ - PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared; - - DPF(( DBG_FUNC, "TermHAL();" )); - - /* Check for an empty wrapper structure. */ - if ( pHAL == NULL ) - return; - - /* Kill this texture manager. */ - TermTMgrHAL( pHAL ); - - /* Kill any DDraw stuff if exists. */ - DestroyDevice( pHAL ); - DestroyAllSurfaces( pHAL ); - DestroyInterfaces( pHAL ); - - FREE( pHAL ); -} -/*===========================================================================*/ -/* This function is used to init and resize the rendering surface as the two*/ -/* are almost the same. First the device and all the surfaces are destoryed */ -/* if they already exist. Next we create a OffScreen rendering surface and */ -/* save some pixelformat info to do color convertions. Next we start to take */ -/* care of getting the most out of the hardware. I use bHardware to determine*/ -/* the state of the device we found in the device enumeration. The enum proc*/ -/* will try for hardware first. I next use a bForceSW to make the enum proc */ -/* choose a software device. So I will try some combinations with HW first */ -/* until I feel I have to set the bForceSW and call this function again. If */ -/* this function is called with no width or height then use the internals. */ -/* NOTE: The worst case is that all will be in SW (RGBDevice) and really */ -/* I should forget the whole thing and fall back to a DDraw span type*/ -/* rendering but what is the point. This way I always know I have a */ -/* D3DDevice and that makes things easier. I do impliment the span */ -/* rendering function for stuff that I haven't done support for such */ -/* as points and lines. */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE */ -/*===========================================================================*/ -extern "C" BOOL CreateHAL( PMESAD3DSHARED pShared ) -{ - PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared; - DDSURFACEDESC2 ddsd2; - D3DDEVICEDESC D3DSWDevDesc; - DDSCAPS2 ddscaps; - DWORD dwCoopFlags, - dwWidth, - dwHeight; - ULONG rc; - - DPF(( DBG_FUNC, "CreateHAL();" )); - -#define InitDDSD2(f) memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) ); \ - ddsd2.dwSize = sizeof( DDSURFACEDESC2 ); \ - ddsd2.dwFlags = f; - - if ( pHAL == NULL ) - return FALSE; - - /* Use the internal rectangle struct. */ - dwWidth = pShared->rectW.right - pShared->rectW.left; - dwHeight = pShared->rectW.bottom - pShared->rectW.top; - - DPF(( DBG_CNTX_INFO, "Width: %d Height: %d", dwWidth, dwHeight )); - - /* The dimensions might still be the same so just leave. */ - if ( (dwWidth == pShared->dwWidth) && (dwHeight == pShared->dwHeight) ) - { - DPF(( DBG_CNTX_WARN, "Context size hasn't changed" )); - return TRUE; - } - - /* If one of the dimensions are zero then leave. WM_SIZE should get us back here. */ - if ( (dwWidth == 0) || (dwHeight == 0) ) - return TRUE; - - /* Save the renders dimensions. */ - pShared->dwWidth = dwWidth; - pShared->dwHeight = dwHeight; - - DPF(( DBG_CNTX_INFO, "Creating Context:\n cx:%d cy:%d", pShared->dwWidth, pShared->dwHeight )); - - /*=================================*/ - /* Create all required interfaces. */ - /*=================================*/ - - /* Kill any DDraw stuff if exists. */ - DestroyDevice( pHAL ); - DestroyAllSurfaces( pHAL ); - DestroyInterfaces( pHAL ); - - /* Create a instance of DDraw using the Primary display driver. */ - rc = DirectDrawCreate( NULL, &pHAL->lpDD, NULL ); - if( FAILED(rc) ) - { - RIP( pHAL, "DirectDrawCreate->", ErrorStringD3D(rc) ); - return FALSE; - } - - /* Get the DDraw4 interface. */ - rc = pHAL->lpDD->QueryInterface( IID_IDirectDraw4, (void **)&pHAL->lpDD4 ); - if( FAILED(rc) ) - { - RIP( pHAL, "QueryInterface (IID_IDirectDraw4) ->", ErrorStringD3D(rc) ); - return FALSE; - } - - /* Get the Direct3D3 interface. */ - rc = pHAL->lpDD4->QueryInterface( IID_IDirect3D3, (void **)&pHAL->lpD3D3 ); - if( FAILED(rc) ) - { - RIP( pHAL, "QueryInterface (IID_IDirect3D3) ->", ErrorStringD3D(rc) ); - return FALSE; - } - - /* Set the Cooperative level. NOTE: we need to know if we are FS at this point.*/ - dwCoopFlags = (pShared->bWindow == TRUE) ? DDSCL_NORMAL : (DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - rc = pHAL->lpDD4->SetCooperativeLevel( pShared->hwnd, dwCoopFlags ); - if ( FAILED(rc) ) - { - RIP( pHAL, "SetCooperativeLevel->", ErrorStringD3D(rc) ); - return FALSE; - } - - /*==================================================================*/ - /* Get the best device we can and note whether its hardware or not. */ - /*==================================================================*/ - pShared->bForceSW = FALSE; - pHAL->lpD3D3->EnumDevices( EnumDeviceHook, (void *)pHAL ); - pShared->bHardware = IsEqualIID( pHAL->guid, IID_IDirect3DHALDevice ); - DPF(( DBG_CNTX_INFO, "bHardware: %s", (pShared->bHardware) ? "TRUE" : "FALSE" )); - DPF(( DBG_CNTX_INFO, "bWindowed: %s", (pShared->bWindow) ? "TRUE" : "FALSE" )); - - /*========================================================================*/ - /* HARDWARE was found. */ - /*========================================================================*/ - if ( pShared->bHardware == TRUE ) - { - /*===================================*/ - /* HARDWARE -> Z-BUFFER. */ - /*===================================*/ - - /* Get a Z-Buffer pixelformat. */ - memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) ); - ddsd2.dwSize = sizeof( DDSURFACEDESC2 ); - rc = pHAL->lpD3D3->EnumZBufferFormats( pHAL->guid, EnumZBufferHook, (VOID*)&ddsd2.ddpfPixelFormat ); - if ( FAILED(rc) ) - { - RIP( pHAL, "EnumZBufferFormatsl->", ErrorStringD3D(rc) ); - return FALSE; - } - - /* Setup our request structure for the Z-buffer surface. */ - ddsd2.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; - ddsd2.ddsCaps.dwCaps = DDSCAPS_ZBUFFER | DDSCAPS_VIDEOMEMORY; - ddsd2.dwWidth = dwWidth; - ddsd2.dwHeight = dwHeight; - rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSZbuffer, NULL ); - if ( !FAILED(rc) ) - { - DPF(( DBG_CNTX_INFO, "HW ZBuffer" )); - - /*===================================*/ - /* HARDWARE -> Z-BUFFER -> FLIPABLE */ - /*===================================*/ - if ( pShared->bWindow == FALSE ) - { - InitDDSD2( DDSD_CAPS | DDSD_BACKBUFFERCOUNT ); - ddsd2.dwBackBufferCount = 1; - ddsd2.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_3DDEVICE | DDSCAPS_FLIP | DDSCAPS_COMPLEX; - rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSPrimary, NULL ); - if ( FAILED(rc) ) - { - /* Make sure we try the next fall back. */ - DPF(( DBG_CNTX_WARN, "HW Flip/Complex not available" )); - pHAL->lpDDSPrimary = NULL; - } - else - { - /* Get the back buffer that was created. */ - ddscaps.dwCaps = DDSCAPS_BACKBUFFER; - rc = pHAL->lpDDSPrimary->GetAttachedSurface( &ddscaps, &pHAL->lpDDSRender ); - if ( FAILED(rc) ) - { - DPF(( DBG_CNTX_WARN, "GetAttachedSurface failed -> HW Flip/Complex" )); - - /* Make sure we try the next fall back. */ - pHAL->lpDDSPrimary->Release(); - pHAL->lpDDSPrimary = NULL; - } - else - { - /* I have had problems when a complex surface comes back */ - /* with the back buffer being created in SW. Not sure why */ - /* or how this is possable but I'm checking for it here. */ - memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) ); - ddsd2.dwSize = sizeof( DDSURFACEDESC2 ); - DX_RESTORE( pHAL->lpDDSRender ); - rc = pHAL->lpDDSRender->GetSurfaceDesc( &ddsd2 ); - if ( FAILED(rc) ) - { - RIP( pHAL, "GetSurfaceDesc (RENDER) ->", ErrorStringD3D(rc) ); - return FALSE; - } - - /* If the surface is in VID then we are happy with are Flipable. */ - if ( ddsd2.ddsCaps.dwCaps & DDSCAPS_LOCALVIDMEM ) - { - pShared->bFlipable = TRUE; - DPF(( DBG_CNTX_INFO, "HW Flip/Complex!" )); - } - else - { - /* Kill this setup. */ - pHAL->lpDDSPrimary->Release(); - pHAL->lpDDSPrimary = NULL; - } - } - } - } - - /*===================================*/ - /* HARDWARE -> Z-BUFFER -> BLT */ - /*===================================*/ - if ( pHAL->lpDDSPrimary == NULL ) - { - pShared->bFlipable = FALSE; - - /* Create the Primary (front buffer). */ - InitDDSD2( DDSD_CAPS ); - ddsd2.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSPrimary, NULL ); - if ( FAILED(rc) ) - { - /* This is an error as we should be able to do this at minimum. */ - RIP( pHAL, "CreateSurface (PRIMARY) ->", ErrorStringD3D(rc) ); - return FALSE; - } - - /* Create the Render (back buffer). */ - InitDDSD2( DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT ); - ddsd2.dwWidth = dwWidth; - ddsd2.dwHeight = dwHeight; - ddsd2.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE; - rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSRender, NULL ); - if ( FAILED(rc) ) - { - DPF(( DBG_CNTX_WARN, "Failed HW Offscreen surface" )); - - /* Make sure we try the next fall back. */ - pHAL->lpDDSPrimary->Release(); - pHAL->lpDDSPrimary = NULL; - } - else - { - /* Might as well check here too see if this surface is in */ - /* hardware. If nothing else just to be consistant. */ - memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) ); - ddsd2.dwSize = sizeof( DDSURFACEDESC2 ); - DX_RESTORE( pHAL->lpDDSRender ); - rc = pHAL->lpDDSRender->GetSurfaceDesc( &ddsd2 ); - if ( FAILED(rc) ) - { - RIP( pHAL, "GetSurfaceDesc (RENDER) ->", ErrorStringD3D(rc) ); - return FALSE; - } - - /* If the surface is in VID then we are happy. */ - if ( ddsd2.ddsCaps.dwCaps & DDSCAPS_LOCALVIDMEM ) - { - /* Create a clipper object so that DDraw will be able to blt windows that */ - /* have been clipped by the screen or other windows. */ - pHAL->lpDD4->CreateClipper( 0, &pHAL->lpClipper, NULL ); - pHAL->lpClipper->SetHWnd( 0, pShared->hwnd ); - pHAL->lpDDSPrimary->SetClipper( pHAL->lpClipper ); - pHAL->lpClipper->Release(); - DPF(( DBG_CNTX_INFO, "HW RENDER surface" )); - } - else - { - /* Kill this setup. */ - pHAL->lpDDSRender->Release(); - pHAL->lpDDSRender = NULL; - pHAL->lpDDSPrimary->Release(); - pHAL->lpDDSPrimary = NULL; - } - } - } - - /*===================================*/ - /* Create D3DDEVICE -> HARDWARE. */ - /*===================================*/ - if ( pHAL->lpDDSZbuffer && pHAL->lpDDSPrimary && pHAL->lpDDSRender ) - { - DX_RESTORE( pHAL->lpDDSRender ); - DX_RESTORE( pHAL->lpDDSZbuffer ); - - rc = pHAL->lpDDSRender->AddAttachedSurface( pHAL->lpDDSZbuffer ); - if ( FAILED(rc) ) - { - RIP( pHAL, "AddAttachedSurface (ZBUFFER) ->", ErrorStringD3D(rc) ); - return FALSE; - } - - rc = pHAL->lpD3D3->CreateDevice( IID_IDirect3DHALDevice, pHAL->lpDDSRender, &pHAL->lpD3DDevice, NULL ); - if ( rc != D3D_OK ) - { - DPF(( DBG_CNTX_WARN, "Failed HW Device" )); - pHAL->lpD3DDevice = NULL; - } - else - { - DPF(( DBG_CNTX_INFO, "HW Device" )); - } - } - } - } - - /*========================================================================*/ - /* SOFTWARE fallback. */ - /*========================================================================*/ - if ( pHAL->lpD3DDevice == NULL ) - { - DPF(( DBG_CNTX_INFO, "SW fallback :(" )); - - /* Make sure we have no surfaces allocated. Just incase. */ - DestroyAllSurfaces( pHAL ); - - /* Get a software device. */ - pShared->bFlipable = FALSE; - pShared->bForceSW = TRUE; - pHAL->lpD3D3->EnumDevices( EnumDeviceHook, (void *)pHAL ); - pShared->bHardware = IsEqualIID( pHAL->guid, IID_IDirect3DHALDevice ); - - /*===================================*/ - /* SOFTWARE -> Z-BUFFER. */ - /*===================================*/ - - /*===================================*/ - /* SOFTWARE -> Z-BUFFER -> FLIPABLE */ - /*===================================*/ - if ( pShared->bWindow == FALSE ) - { - InitDDSD2( DDSD_CAPS | DDSD_BACKBUFFERCOUNT ); - ddsd2.dwBackBufferCount = 1; - ddsd2.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_3DDEVICE | DDSCAPS_FLIP | DDSCAPS_COMPLEX; - ddsd2.ddpfPixelFormat.dwSize = sizeof( DDPIXELFORMAT ); - ddsd2.ddpfPixelFormat.dwFlags = (DDPF_RGB | DDPF_ALPHAPIXELS); - rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSPrimary, NULL ); - if ( FAILED(rc) ) - { - DPF(( DBG_CNTX_WARN, "Failed SW Flip/Complex" )); - - /* Make sure we try the next fall back. */ - pHAL->lpDDSPrimary = NULL; - } - else - { - ddscaps.dwCaps = DDSCAPS_BACKBUFFER; - rc = pHAL->lpDDSPrimary->GetAttachedSurface( &ddscaps, &pHAL->lpDDSRender ); - if ( FAILED(rc) ) - { - /* Make sure we try the next fall back. */ - DPF(( DBG_CNTX_WARN, "GetAttachedSurface failed -> SW Flip/Complex" )); - pHAL->lpDDSPrimary->Release(); - pHAL->lpDDSPrimary = NULL; - } - else - { - DPF(( DBG_CNTX_INFO, "SW Flip/Complex" )); - pShared->bFlipable = TRUE; - } - } - } - - /*===================================*/ - /* SOFTWARE -> Z-BUFFER -> BLT */ - /*===================================*/ - if ( pHAL->lpDDSPrimary == NULL ) - { - /* Create the Primary (front buffer). */ - InitDDSD2( DDSD_CAPS ); - ddsd2.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSPrimary, NULL ); - if ( FAILED(rc) ) - { - /* This is an error as we should be able to do this at minimum. */ - RIP( pHAL, "CreateSurface (PRIMARY) ->", ErrorStringD3D(rc) ); - return FALSE; - } - - /* Create the Render (back buffer). */ - InitDDSD2( DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT ); - ddsd2.dwWidth = dwWidth; - ddsd2.dwHeight = dwHeight; - ddsd2.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE; - ddsd2.ddpfPixelFormat.dwSize = sizeof( DDPIXELFORMAT ); - ddsd2.ddpfPixelFormat.dwFlags = (DDPF_RGB | DDPF_ALPHAPIXELS); - rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSRender, NULL ); - if ( FAILED(rc) ) - { - /* That was our last hope. */ - RIP( pHAL, "CreateSurface (RENDER) ->", ErrorStringD3D(rc) ); - return FALSE; - } - else - { - DPF(( DBG_CNTX_INFO, "SW RENDER surface" )); - - /* Create a clipper object so that DDraw will be able to blt windows that */ - /* have been clipped by the screen or other windows. */ - pHAL->lpDD4->CreateClipper( 0, &pHAL->lpClipper, NULL ); - pHAL->lpClipper->SetHWnd( 0, pShared->hwnd ); - pHAL->lpDDSPrimary->SetClipper( pHAL->lpClipper ); - pHAL->lpClipper->Release(); - } - } - - /*===================================*/ - /* Create D3DDEVICE -> SOFTWARE. */ - /*===================================*/ - if ( pHAL->lpDDSPrimary && pHAL->lpDDSRender ) - { - DX_RESTORE( pHAL->lpDDSRender ); - rc = pHAL->lpD3D3->CreateDevice( IID_IDirect3DRGBDevice, pHAL->lpDDSRender, &pHAL->lpD3DDevice, NULL ); - if ( rc != D3D_OK ) - { - /* That was our last hope. */ - RIP( pHAL, "CreateDevice (IID_IDirect3DRGBDevice) ->", ErrorStringD3D(rc) ); - return FALSE; - } - - DPF(( DBG_CNTX_INFO, "SW Device" )); - } - } - - /*==============================================================================*/ - /* Get a copy of the render pixelformat so that wgl.c can call GetPixelInfoD3D. */ - /*==============================================================================*/ - memset( &pHAL->ddpf, 0, sizeof(DDPIXELFORMAT) ); - pHAL->ddpf.dwSize = sizeof( DDPIXELFORMAT ); - rc = pHAL->lpDDSRender->GetPixelFormat( &pHAL->ddpf ); - if ( FAILED(rc) ) - { - RIP( pHAL, "GetPixelFormat ->", ErrorStringD3D(rc) ); - return FALSE; - } - DebugPixelFormat( "Using OFFSCREEN", &pHAL->ddpf ); - DebugPixelFormat( "Using ZBUFFER", &ddsd2.ddpfPixelFormat ); - - /* Get a copy of what the D3DDevice supports for later use. */ - memset( &D3DSWDevDesc, 0, sizeof(D3DDEVICEDESC) ); - memset( &pHAL->D3DHWDevDesc, 0, sizeof(D3DDEVICEDESC) ); - D3DSWDevDesc.dwSize = sizeof( D3DDEVICEDESC ); - pHAL->D3DHWDevDesc.dwSize = sizeof( D3DDEVICEDESC ); - rc = pHAL->lpD3DDevice->GetCaps( &pHAL->D3DHWDevDesc, &D3DSWDevDesc ); - if ( FAILED(rc) ) - { - RIP( pHAL, "GetCaps ->", ErrorStringD3D(rc) ); - return FALSE; - } - - /* Get a copy of the pixel convertion stuff for direct buffer access. */ - Solve8BitChannelPixelFormat( &pHAL->ddpf, &pShared->pixel ); - AlphaBlendTableHAL( pHAL ); - - /* We must prime the Begin/End scene for SwapBuffers to work. */ - rc = pHAL->lpD3DDevice->BeginScene(); - if ( FAILED(rc) ) - { - RIP( pHAL, "BeginScene ->", ErrorStringD3D(rc) ); - return FALSE; - } - -#undef InitDDSD2 - - return TRUE; -} -/*===========================================================================*/ -/* This function will make sure a viewport is created and set for the device*/ -/* in the supplied structure. If a rect is supplied then it will be used for*/ -/* the viewport otherwise the current setting in the strucute will be used. */ -/* Note that the rect is relative to the window. So left/top must be 0,0 to */ -/* use the whole window else there is scissoring going down. */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -extern "C" BOOL SetViewportHAL( PMESAD3DSHARED pShared, RECT *pRect, float minZ, float maxZ ) -{ - PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared; - D3DVIEWPORT2 vdData; - ULONG rc; - POINT pt; - - DPF(( DBG_FUNC, "SetViewportHAL();" )); - - /* Make sure we have enough info. */ - if ( !pHAL || !pHAL->lpDDSPrimary || !pHAL->lpD3DDevice ) - { - DPF(( DBG_CNTX_WARN, "SetViewport() -> NULL Pointer" )); - return FALSE; - } - - /* TODO: this is just a temp fix to stop redundant changes. */ - if ( pRect && - (pShared->rectV.left == pRect->left) && - (pShared->rectV.right == pRect->right) && - (pShared->rectV.top == pRect->top) && - (pShared->rectV.bottom == pRect->bottom) ) - { - DPF(( DBG_CNTX_WARN, "Redundant viewport" )); - return TRUE; - } - - DPF(( DBG_CNTX_INFO, "Current Viewport:" )); - DPF(( DBG_CNTX_INFO, "x: %d y: %d", pShared->rectV.left, pShared->rectV.top )); - DPF(( DBG_CNTX_INFO, "cx: %d cy: %d", (pShared->rectV.right-pShared->rectV.left), (pShared->rectV.bottom-pShared->rectV.top) )); - DPF(( DBG_CNTX_INFO, "New Viewport:" )); - DPF(( DBG_CNTX_INFO, "x: %d y: %d", pRect->left, pRect->top )); - DPF(( DBG_CNTX_INFO, "cx: %d cy: %d", (pRect->right-pRect->left), (pRect->bottom-pRect->top) )); - - /* Update the current viewport rect if one is supplied. */ - if ( pRect ) - memcpy( &pShared->rectV, pRect, sizeof(RECT) ); - - /* Build the request structure. */ - memset( &vdData, 0, sizeof(D3DVIEWPORT2) ); - vdData.dwSize = sizeof(D3DVIEWPORT2); - vdData.dwX = pShared->rectV.left; - vdData.dwY = pShared->rectV.top; - vdData.dwWidth = (pShared->rectV.right - pShared->rectV.left); - vdData.dwHeight = (pShared->rectV.bottom - pShared->rectV.top); - - if ( !vdData.dwWidth || !vdData.dwHeight ) - { - GetClientRect( pShared->hwnd, &pShared->rectW ); - pt.x = pt.y = 0; - ClientToScreen( pShared->hwnd, &pt ); - OffsetRect( &pShared->rectW, pt.x, pt.y); - vdData.dwX = pShared->rectW.left; - vdData.dwY = pShared->rectW.top; - vdData.dwWidth = (pShared->rectW.right - pShared->rectW.left); - vdData.dwHeight = (pShared->rectW.bottom - pShared->rectW.top); - memcpy( &pShared->rectV, &pShared->rectW, sizeof(RECT) ); - } - - // The dvClipX, dvClipY, dvClipWidth, dvClipHeight, dvMinZ, - // and dvMaxZ members define the non-normalized post-perspective - // 3-D view volume which is visible to the viewer. In most cases, - // dvClipX is set to -1.0 and dvClipY is set to the inverse of - // the viewport's aspect ratio on the target surface, which can be - // calculated by dividing the dwHeight member by dwWidth. Similarly, - // the dvClipWidth member is typically 2.0 and dvClipHeight is set - // to twice the aspect ratio set in dwClipY. The dvMinZ and dvMaxZ - // are usually set to 0.0 and 1.0. - vdData.dvClipX = -1.0f; - vdData.dvClipWidth = 2.0f; - vdData.dvClipY = 1.0f; - vdData.dvClipHeight = 2.0f; - vdData.dvMaxZ = maxZ; - vdData.dvMinZ = minZ; - - DPF(( DBG_CNTX_INFO, "zMin: %f zMax: %f", minZ, maxZ )); - - /* I'm going to destroy the viewport everytime as when we size we will */ - /* have a new D3DDevice. As this area doesn't need to be fast... */ - if ( pHAL->lpViewport ) - { - DPF(( DBG_CNTX_INFO, "DeleteViewport" )); - - pHAL->lpD3DDevice->DeleteViewport( pHAL->lpViewport ); - rc = pHAL->lpViewport->Release(); - pHAL->lpViewport = NULL; - } - - rc = pHAL->lpD3D3->CreateViewport( &pHAL->lpViewport, NULL ); - if ( rc != D3D_OK ) - { - DPF(( DBG_CNTX_ERROR, "CreateViewport Failed" )); - return FALSE; - } - - /* Update the device with the new viewport. */ - pHAL->lpD3DDevice->AddViewport( pHAL->lpViewport ); - pHAL->lpViewport->SetViewport2( &vdData ); - pHAL->lpD3DDevice->SetCurrentViewport( pHAL->lpViewport ); - - return TRUE; -} -/*===========================================================================*/ -/* */ -/* */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -HRESULT WINAPI EnumSurfacesHook( LPDIRECTDRAWSURFACE4 lpDDS, LPDDSURFACEDESC2 lpDDSDesc, LPVOID pVoid ) -{ - DDSURFACEDESC2 *pddsd2 = (DDSURFACEDESC2 *)pVoid; - - DPF(( DBG_FUNC, "EnumSurfacesHook();" )); - - if ( (lpDDSDesc->ddpfPixelFormat.dwFlags == pddsd2->ddpfPixelFormat.dwFlags) && (lpDDSDesc->ddsCaps.dwCaps == pddsd2->ddsCaps.dwCaps) ) - { - /* Save the pixelformat now so that we know we have one. */ - memcpy( pddsd2, lpDDSDesc, sizeof(DDSURFACEDESC2) ); - - return D3DENUMRET_CANCEL; - } - - return D3DENUMRET_OK; -} -/*===========================================================================*/ -/* This is the callback proc to get a Z-Buffer. Thats it. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -HRESULT CALLBACK EnumZBufferHook( DDPIXELFORMAT* pddpf, VOID *pVoid ) -{ - DDPIXELFORMAT *pddpfChoice = (DDPIXELFORMAT *)pVoid; - - DPF(( DBG_FUNC, "EnumZBufferHook();" )); - - /* If this is ANY type of depth-buffer, stop. */ - if( pddpf->dwFlags == DDPF_ZBUFFER ) - { - /* Save the pixelformat now so that we know we have one. */ - memcpy( pddpfChoice, pddpf, sizeof(DDPIXELFORMAT) ); - - /* I feel if the hardware supports this low then lets use it. Could get ugly. */ - if( pddpf->dwZBufferBitDepth >= 8 ) - { - return D3DENUMRET_CANCEL; - } - } - - return D3DENUMRET_OK; -} -/*===========================================================================*/ -/* This function handles the callback for the D3DDevice enumeration. Good */ -/* god who's idea was this? The D3D wrapper has two variable related to what*/ -/* kind of device we want and have. First we have a Bool that is set if we */ -/* have allocated a HW device. We always look for the HW device first. The */ -/* other variable is used to force SW. If we have run into a case that we */ -/* want to fallback to SW then we set this. We will fallback if we cannot */ -/* texture in video memory (among others). */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -HRESULT CALLBACK EnumDeviceHook( GUID FAR* lpGuid, LPSTR lpDesc, LPSTR lpName, LPD3DDEVICEDESC lpD3DHWDesc, LPD3DDEVICEDESC lpD3DHELDesc, void *pVoid ) -{ - PMESAD3DHAL pHAL = (PMESAD3DHAL)pVoid; - LPD3DDEVICEDESC pChoice = lpD3DHWDesc; - - DPF(( DBG_FUNC, "EnumDeviceHook();" )); - - /* Determine if which device description is valid. */ - if ( pChoice->dcmColorModel == 0 ) - pChoice = lpD3DHELDesc; - - /* Make sure we always have a GUID. */ - memcpy( &pHAL->guid, lpGuid, sizeof(GUID) ); - - /* This controls whether we will except HW or not. */ - if ( pHAL->shared.bForceSW == TRUE ) - { - return (pChoice == lpD3DHELDesc) ? D3DENUMRET_CANCEL : D3DENUMRET_OK; - } - - /* Always try for hardware. */ - if ( pChoice == lpD3DHWDesc ) - { - return D3DENUMRET_CANCEL; - } - - return D3DENUMRET_OK; -} -/*===========================================================================*/ -/* This function will destroy any and all surfaces that this context has */ -/* allocated. If there is a clipper object then it will also be destoryed as*/ -/* it is part of the Primary Surface. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void DestroyAllSurfaces( PMESAD3DHAL pHAL ) -{ - LONG refCount; - - DPF(( DBG_FUNC, "DestroyAllSurfaces();" )); - - DX_RESTORE( pHAL->lpDDSPrimary ); - DX_RESTORE( pHAL->lpDDSRender ); - DX_RESTORE( pHAL->lpDDSZbuffer); - - if ( pHAL->lpDDSRender ) - { - pHAL->lpDDSRender->Unlock( NULL ); - - /* If this isn't a Flipable surface then we must clean up the render. */ - if ( pHAL->shared.bFlipable == FALSE) - { - if ( pHAL->lpDDSZbuffer ) - { - DPF(( DBG_CNTX_INFO, "Remove attached surfaces from RENDER" )); - pHAL->lpDDSRender->DeleteAttachedSurface( 0, NULL ); - } - - DPF(( DBG_CNTX_INFO, "Release RENDER" )); - refCount = pHAL->lpDDSRender->Release(); - pHAL->lpDDSRender = NULL; - } - } - - if ( pHAL->lpDDSZbuffer ) - { - DPF(( DBG_CNTX_INFO, "Release ZBuffer" )); - pHAL->lpDDSZbuffer->Unlock( NULL ); - refCount = pHAL->lpDDSZbuffer->Release(); - pHAL->lpDDSZbuffer = NULL; - } - - if ( pHAL->lpClipper ) - { - DPF(( DBG_CNTX_INFO, "Release Clipper" )); - refCount = pHAL->lpClipper->Release(); - pHAL->lpClipper = NULL; - } - - if ( pHAL->lpDDSPrimary ) - { - pHAL->lpDDSPrimary->Unlock( NULL ); - - DPF(( DBG_CNTX_INFO, "Release PRIMARY" )); - refCount = pHAL->lpDDSPrimary->Release(); - pHAL->lpDDSPrimary = NULL; - } -} -/*===========================================================================*/ -/* This function will destroy the current D3DDevice and any resources that */ -/* belong to it. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void DestroyDevice( PMESAD3DHAL pHAL ) -{ - LONG refCount; - - DPF(( DBG_FUNC, "DestroyDevice();" )); - - /* Kill the D3D stuff if exists. */ - if ( pHAL->lpViewport ) - { - DPF(( DBG_CNTX_INFO, "Delete Viewport" )); - pHAL->lpD3DDevice->DeleteViewport( pHAL->lpViewport ); - - DPF(( DBG_CNTX_INFO, "Release Viewport" )); - refCount = pHAL->lpViewport->Release(); - pHAL->lpViewport = NULL; - } - - if ( pHAL->lpD3DDevice != NULL ) - { - DPF(( DBG_CNTX_INFO, "Release D3DDevice" )); - refCount = pHAL->lpD3DDevice->EndScene(); - refCount = pHAL->lpD3DDevice->Release(); - pHAL->lpD3DDevice = NULL; - } -} -/*===========================================================================*/ -/* This function will destroy the current D3DDevice and any resources that */ -/* belong to it. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void DestroyInterfaces( PMESAD3DHAL pHAL ) -{ - LONG refCount; - - DPF(( DBG_FUNC, "DestroyInterfaces();" )); - - if ( pHAL->lpD3D3 != NULL ) - { - DPF(( DBG_CNTX_INFO, "Release Direct3D3" )); - refCount = pHAL->lpD3D3->Release(); - pHAL->lpD3D3 = NULL; - } - - if ( pHAL->lpDD4 != NULL ) - { - DPF(( DBG_CNTX_INFO, "Release DDraw4" )); - refCount = pHAL->lpDD4->Release(); - pHAL->lpDD4 = NULL; - } - - if ( pHAL->lpDD != NULL ) - { - DPF(( DBG_CNTX_INFO, "Release DDraw" )); - refCount = pHAL->lpDD->Release(); - pHAL->lpDD = NULL; - } -} -/*===========================================================================*/ -/* This function will first send (not post) a message to the client window */ -/* that this context is using. The client will respond by unbinding itself */ -/* and binding the 'default' context. This allows the API to be supported */ -/* until the window can be destroyed. Finally we post the quit message to */ -/* the client in hopes to end the application. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -void FatalShutDown( PMESAD3DHAL pHAL ) -{ - /* Whip this baby in too try and support the API until we die... */ - if ( pHAL ) - SendMessage( pHAL->shared.hwnd, UM_FATALSHUTDOWN, 0L, 0L ); - - /* Close the client application down. */ - PostQuitMessage( 0 ); -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DMESA.H b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DMESA.H deleted file mode 100644 index 074ceca816..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DMESA.H +++ /dev/null @@ -1,84 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#ifndef D3D_MESA_H -#define D3D_MESA_H -/*===========================================================================*/ -/* Includes. */ -/*===========================================================================*/ -#include -#include -#include -#include "matrix.h" -#include "context.h" -#include "mtypes.h" -#include "vb.h" -#include "D3DShared.h" -#include "Debug.h" -#include "NULLProcs.h" -/*===========================================================================*/ -/* Macros. */ -/*===========================================================================*/ -#define FLIP(h,y) (h-y) -/*===========================================================================*/ -/* Magic numbers. */ -/*===========================================================================*/ -/*===========================================================================*/ -/* Type defines. */ -/*===========================================================================*/ -struct __extensions__ -{ - PROC proc; - char *name; -}; - -typedef GLbitfield (*ClearPROC)( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height ); -typedef void (*WSpanRGBPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgb[][3], const GLubyte mask[] ); -typedef void (*WSpanRGBAPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] ); -typedef void (*WSpanRGBAMonoPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte mask[] ); -typedef void (*WPixelsRGBAPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] ); -typedef void (*WPixelsRGBAMonoPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] ); -typedef void (*RSpanRGBAPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] ); -typedef void (*RPixelsRGBAPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] ); - -typedef struct D3D_mesa_context -{ - PMESAD3DSHARED pShared; - - GLcontext *gl_ctx; /* The core GL/Mesa context */ - GLvisual *gl_visual; /* Describes the buffers */ - GLframebuffer *gl_buffer; /* Depth, stencil, accum, etc buffers */ - - HDC hdc; - WNDPROC hOldProc; - - UCHAR rClear, /* Current clear colors. */ - gClear, - bClear, - aClear, - rCurrent, /* Current rendering colors. */ - gCurrent, - bCurrent, - aCurrent; - - struct D3D_mesa_context *next; - -} D3DMESACONTEXT, *PD3DMESACONTEXT; -/*===========================================================================*/ -/* Extern function prototypes. */ -/*===========================================================================*/ -extern void gl_Viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height ); -/*===========================================================================*/ -/* Global variables. */ -/*===========================================================================*/ -extern D3DTLVERTEX D3DTLVertices[(VB_MAX*6)]; - -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DRaster.cpp b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DRaster.cpp deleted file mode 100644 index 004bb77360..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DRaster.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#include "D3DHAL.h" -/*===========================================================================*/ -/* This function clears the context bound to the supplied shared context. */ -/* The function takes the D3D flags D3DCLEAR_TARGET, D3DCLEAR_STENCIL and */ -/* D3DCLEAR_ZBUFFER. Set bAll to TRUE for a full clear else supply the coord*/ -/* of the rect to be cleared relative to the window. The color is always a */ -/* 32bit value (RGBA). Fill in the z-value and stencil if needed. */ -/* */ -/* TODO: this can be redone to be called by Mesa directly. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -extern "C" void ClearHAL( PMESAD3DSHARED pShared, DWORD dwFlags, BOOL bAll, int x, int y, int cx, int cy, DWORD dwColor, float zv, DWORD dwStencil ) -{ - PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared; - D3DRECT d3dRect; - -#ifdef D3D_DEBUG - HRESULT rc; - - DPF(( DBG_FUNC, "CleaHAL();" )); - - /* Make sure we have enough info. */ - if ( (pHAL == NULL) || (pHAL->lpViewport == NULL) ) - return; -#endif - - if ( bAll ) - { - /* I assume my viewport is valid. */ - d3dRect.lX1 = pShared->rectV.left; - d3dRect.lY1 = pShared->rectV.top; - d3dRect.lX2 = pShared->rectV.right; - d3dRect.lY2 = pShared->rectV.bottom; - } - else - { - d3dRect.lX1 = pShared->rectV.left + x; - d3dRect.lY1 = pShared->rectV.top + y; - d3dRect.lX2 = d3dRect.lX1 + cx; - d3dRect.lY2 = d3dRect.lY1 + cy; - } - -#ifdef D3D_DEBUG - rc = pHAL->lpViewport->Clear2( 1, &d3dRect, dwFlags, dwColor, zv, dwStencil ); - if ( FAILED(rc) ) - { - RIP( pHAL, "Clear2 ->", ErrorStringD3D(rc) ); - } -#else - pHAL->lpViewport->Clear2( 1, &d3dRect, dwFlags, dwColor, zv, dwStencil ); -#endif -} -/*===========================================================================*/ -/* Well this is the guts of it all. Here we rasterize the primitives that */ -/* are in their final form. OpenGL has done all the lighting, transfomations*/ -/* and clipping at this point. */ -/* */ -/* TODO: I'm not sure if I want to bother to check for errors on this call. */ -/* The overhead kills me... */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -extern "C" void DrawPrimitiveHAL( PMESAD3DSHARED pShared, D3DPRIMITIVETYPE dptPrimitiveType, D3DTLVERTEX *pVertices, DWORD dwCount ) -{ - PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared; - -#ifdef D3D_DEBUG - HRESULT rc; - - DPF(( DBG_FUNC, "DrawPrimitveHAL();" )); - - /* Make sure we have enough info. */ - if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) ) - return; - - DPF(( DBG_PRIM_INFO, "DP( %d )", dwCount )); - - rc = pHAL->lpD3DDevice->DrawPrimitive( dptPrimitiveType, - D3DFVF_TLVERTEX, - (LPVOID)pVertices, - dwCount, - (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) ); - if ( FAILED(rc) ) - { - RIP( pHAL, "DrawPrimitive ->", ErrorStringD3D(rc) ); - } -#else - pHAL->lpD3DDevice->DrawPrimitive( dptPrimitiveType, - D3DFVF_TLVERTEX, - (LPVOID)pVertices, - dwCount, - (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) ); -#endif -} -/*===========================================================================*/ -/* This call will handle the swapping of the buffers. Now I didn't bother */ -/* to support single buffered so this will be used for glFlush() as its all */ -/* the same. So first we do an EndScene as we are always considered to be in*/ -/* a BeginScene because when we leave we do a BeginScene. Now note that when*/ -/* the context is created in the first place we do a BeginScene also just to */ -/* get things going. The call will use either Flip/blt based on the type of */ -/* surface was created for rendering. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -extern "C" void SwapBuffersHAL( PMESAD3DSHARED pShared ) -{ - PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared; - -#ifdef D3D_DEBUG - HRESULT rc; - - DPF(( DBG_FUNC, "SwapBuffersHAL();" )); - DPF(( DBG_ALL_PROFILE, "=================SWAP===================" )); - - /* Make sure we have enough info. */ - if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) ) - return; - - /* Make sure we have enough info. */ - if ( pHAL->lpDDSPrimary != NULL ) - { - rc = pHAL->lpD3DDevice->EndScene(); - if ( FAILED(rc) ) - { - RIP( pHAL, "EndScene ->", ErrorStringD3D(rc) ); - } - - if ( pShared->bFlipable ) - { - DPF(( DBG_CNTX_PROFILE, "Swap->FLIP" )); - rc = pHAL->lpDDSPrimary->Flip( NULL, DDFLIP_WAIT ); - } - else - { - DPF(( DBG_CNTX_PROFILE, "Swap->Blt" )); - rc = pHAL->lpDDSPrimary->Blt( &pShared->rectW, pHAL->lpDDSRender, NULL, DDBLT_WAIT, NULL ); - } - if ( FAILED(rc) ) - { - RIP( pHAL, "Blt (RENDER/PRIMARY) ->", ErrorStringD3D(rc) ); - } - - rc = pHAL->lpD3DDevice->BeginScene(); - if ( FAILED(rc) ) - { - RIP( pHAL, "BeginScene ->", ErrorStringD3D(rc) ); - } - } -#else - pHAL->lpD3DDevice->EndScene(); - - if ( pShared->bFlipable ) - pHAL->lpDDSPrimary->Flip( NULL, DDFLIP_WAIT ); - else - pHAL->lpDDSPrimary->Blt( &pShared->rectW, pHAL->lpDDSRender, NULL, DDBLT_WAIT, NULL ); - - pHAL->lpD3DDevice->BeginScene(); - -#endif -} -/*===========================================================================*/ -/* This function is a very thin wrapper for the D3D call 'SetRenderState'. */ -/* Using this function requires all the types to be defined by including the */ -/* D3D header file. */ -/* */ -/* TODO: would be much better to get ride of all these calls per VBRender. */ -/* I feel I should get this call into SetRenderStates() the RenderVB. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -extern "C" void SetStateHAL( PMESAD3DSHARED pShared, DWORD dwType, DWORD dwState ) -{ - PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared; - -#ifdef D3D_DEBUG - HRESULT rc; - - DPF(( DBG_FUNC, "SetStateHAL();" )); - - /* Make sure we have enough info. */ - if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) ) - return; - - rc = pHAL->lpD3DDevice->SetRenderState( (D3DRENDERSTATETYPE)dwType, dwState ); - if ( FAILED(rc) ) - { - RIP( pHAL, "SetRenderState ->", ErrorStringD3D(rc) ); - } - -#else - pHAL->lpD3DDevice->SetRenderState( (D3DRENDERSTATETYPE)dwType, dwState ); -#endif -} - - - - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DShared.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DShared.h deleted file mode 100644 index cc629e2111..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DShared.h +++ /dev/null @@ -1,154 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#ifndef D3D_MESA_ALL_H -#define D3D_MESA_ALL_H - -#ifdef __cplusplus -extern "C" { -#endif - -/*===========================================================================*/ -/* Includes. */ -/*===========================================================================*/ -#include -#include -/*===========================================================================*/ -/* Magic numbers. */ -/*===========================================================================*/ -#define TM_ACTION_LOAD 0x01 -#define TM_ACTION_BIND 0x02 -#define TM_ACTION_UPDATE 0x04 - -#define UM_FATALSHUTDOWN (WM_USER+42) -/*===========================================================================*/ -/* Macros defines. */ -/*===========================================================================*/ -#define ALLOC(cb) malloc( (cb) ) -#define FREE(p) { free( (p) ); (p) = NULL; } -/*===========================================================================*/ -/* Type defines. */ -/*===========================================================================*/ -typedef struct _pixel_convert -{ - int cb, /* Count in bytes of one pixel. */ - rShift, /* Shift count that postions each componet. */ - gShift, - bShift, - aShift; - float rScale, /* Value that scales a color that ranges 0.0 -> 1.0 */ - gScale, /* to this pixel format. */ - bScale, - aScale; - DWORD dwRMask, /* Color mask per component. */ - dwGMask, - dwBMask, - dwAMask; - -} PIXELINFO, *PPIXELINFO; - - -typedef struct _d3d_shared_info -{ - HWND hwnd; - BOOL bWindow, - bFlipable, - bForceSW, - bHardware; - RECT rectW, /* Window size and postion in screen space. */ - rectV; /* Viewport size and postion. */ - DWORD dwWidth, /* Current render size for quick checks. */ - dwHeight; - - PIXELINFO pixel; - DWORD dwSrcBlendCaps[14], /* See D3DCAPS.CPP */ - dwDestBlendCaps[14], - dwTexFunc[4]; - -} MESAD3DSHARED, *PMESAD3DSHARED; - -typedef struct _render_options -{ - BOOL bForceSoftware, /* TODO: Add user switches. */ - bStretchtoPrimary; - -} USER_CTRL, *PUSER_CRTL; - -enum { s_zero = 0, - s_one, - s_dst_color, - s_one_minus_dst_color, - s_src_alpha, - s_one_minus_src_alpha, - s_dst_alpha, - s_one_minus_dst_alpha, - s_src_alpha_saturate, - s_constant_color, - s_one_minus_constant_color, - s_constant_alpha, - s_one_minus_constant_alpha }; - -enum { d_zero = 0, - d_one, - d_src_color, - d_one_minus_src_color, - d_src_alpha, - d_one_minus_src_alpha, - d_dst_alpha, - d_one_minus_dst_alpha, - d_constant_color, - d_one_minus_constant_color, - d_constant_alpha, - d_one_minus_constant_alpha }; - -enum { d3dtblend_decal = 0, - d3dtblend_decalalpha, - d3dtblend_modulate, - d3dtblend_modulatealpha }; - -/*===========================================================================*/ -/* Function prototypes. */ -/*===========================================================================*/ -PMESAD3DSHARED InitHAL( HWND hwnd ); -void TermHAL( PMESAD3DSHARED pShared ); -BOOL CreateHAL( PMESAD3DSHARED pShared ); -BOOL SetViewportHAL( PMESAD3DSHARED pShared, RECT *pRect, float minZ, float maxZ ); - -void ClearHAL( PMESAD3DSHARED pShared, DWORD dwFlags, BOOL bAll, int x, int y, int cx, int cy, DWORD dwColor, float zv, DWORD dwStencil ); -void SetStateHAL( PMESAD3DSHARED pShared, DWORD dwType, DWORD dwState ); -void DrawPrimitiveHAL( PMESAD3DSHARED pShared, D3DPRIMITIVETYPE dptPrimitiveType, D3DTLVERTEX *pVertices, DWORD dwCount ); - -void SwapBuffersHAL( PMESAD3DSHARED pShared ); -DDSURFACEDESC2 *LockHAL( PMESAD3DSHARED pShared, BOOL bBack ); -void UnlockHAL( PMESAD3DSHARED pShared, BOOL bBack ); -void UpdateScreenPosHAL( PMESAD3DSHARED pShared ); -void GetPixelInfoHAL( PMESAD3DSHARED pShared, PPIXELINFO pPixel ); -BOOL CreateTMgrHAL( PMESAD3DSHARED pShared, DWORD dwName, int level, DWORD dwRequestFlags, RECT *rectDirty, DWORD dwWidth, DWORD dwHeight, DWORD dwAction, void *pPixels ); -void DisableTMgrHAL( PMESAD3DSHARED pShared ); - - -int SaveDIBitmap( char *filename, BITMAPINFO *info, void *bits ); -int ARGB_SaveBitmap( char *filename, int width, int height, unsigned char *pARGB ); -int BGRA_SaveBitmap( char *filename, int width, int height, unsigned char *pBGRA ); -int BGR_SaveBitmap( char *filename, int width, int height, unsigned char *pBGR ); -/*===========================================================================*/ -/* Global variables. */ -/*===========================================================================*/ -extern float g_DepthScale, /* Mesa needs to scale Z in SW. The HAL */ - g_MaxDepth; /* doesn't but I wanted SW still to work.*/ - -#ifdef __cplusplus -} -#endif - -#endif - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DTEXT.CPP b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DTEXT.CPP deleted file mode 100644 index e6ff864561..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DTEXT.CPP +++ /dev/null @@ -1,576 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#include "d3dText.h" - -/*============================================================================= - - 1 - ------ - | | - 6 | | 2 - | 7 | - ------ - | | - 5 | | 3 - | | - ------ - 4 - - TL_0 TR_0 -TLL TL_1 TR_1 TRR - -MLL_0 ML_0 MR_0 MRR_0 -MLL_1 ML_1 MR_1 MRR_1 - -BLL BL_0 BR_0 BRR - BL_1 BR_1 - -=============================================================================*/ - -#define TLL 0 -#define TRR 1 -#define TL_0 2 -#define TL_1 3 -#define TR_0 4 -#define TR_1 5 - -#define MLL_0 6 -#define MLL_1 7 -#define MRR_0 8 -#define MRR_1 9 - -#define ML_0 10 -#define ML_1 11 -#define MR_0 12 -#define MR_1 13 - -#define BL_0 14 -#define BL_1 15 -#define BR_0 16 -#define BR_1 17 -#define BLL 18 -#define BRR 19 - -#define BIT1 0x00000001 -#define BIT2 0x00000002 -#define BIT3 0x00000004 -#define BIT4 0x00000008 -#define BIT5 0x00000010 -#define BIT6 0x00000020 -#define BIT7 0x00000040 - -#define TOP BIT4 -#define MIDDLE BIT7 -#define BOTTOM BIT1 -#define TLEFT BIT5 -#define BLEFT BIT6 -#define LEFT (TLEFT|BLEFT) -#define TRIGHT BIT3 -#define BRIGHT BIT2 -#define RIGHT (TRIGHT|BRIGHT) -#define ALL 0xFFFFFFFF - -/*===========================================================================*/ -/* This is the static array that will map the ASCII value of the character */ -/* being draw to the bit mask that will be scan converted to the LED display.*/ -/*===========================================================================*/ -DWORD textBitMasks[] = -{ - 0xFFFFFFFF, // 000 - 0xFFFFFFFF, // 001 - 0xFFFFFFFF, // 002 - 0xFFFFFFFF, // 003 - 0xFFFFFFFF, // 004 - 0xFFFFFFFF, // 005 - 0xFFFFFFFF, // 006 - 0xFFFFFFFF, // 007 - 0xFFFFFFFF, // 008 - 0xFFFFFFFF, // 009 - 0xFFFFFFFF, // 010 - 0xFFFFFFFF, // 011 - 0xFFFFFFFF, // 012 - 0xFFFFFFFF, // 013 - 0xFFFFFFFF, // 014 - 0xFFFFFFFF, // 015 - 0xFFFFFFFF, // 016 - 0xFFFFFFFF, // 017 - 0xFFFFFFFF, // 018 - 0xFFFFFFFF, // 019 - 0xFFFFFFFF, // 020 - 0xFFFFFFFF, // 021 - 0xFFFFFFFF, // 022 - 0xFFFFFFFF, // 023 - 0xFFFFFFFF, // 024 - 0xFFFFFFFF, // 025 - 0xFFFFFFFF, // 026 - 0xFFFFFFFF, // 027 - 0xFFFFFFFF, // 028 - 0xFFFFFFFF, // 029 - 0xFFFFFFFF, // 030 - 0XFFFFFFFF, // 031 - 0x00000000, // 032 'SPC' - 0xFFFFFFFF, // 033 - 0xFFFFFFFF, // 034 - 0xFFFFFFFF, // 035 - 0xFFFFFFFF, // 036 - 0xFFFFFFFF, // 037 - 0xFFFFFFFF, // 038 - 0xFFFFFFFF, // 039 - 0xFFFFFFFF, // 040 - 0xFFFFFFFF, // 041 - 0xFFFFFFFF, // 042 - 0xFFFFFFFF, // 043 - 0xFFFFFFFF, // 044 - 0xFFFFFFFF, // 045 - 0xFFFFFFFF, // 046 - 0xFFFFFFFF, // 047 - (ALL &~ MIDDLE), // 048 '0' - (RIGHT), // 049 '1' - (ALL &~ TLEFT &~ BRIGHT), // 050 '2' - (ALL &~ LEFT), // 051 '3' - (TLEFT | MIDDLE | RIGHT), // 052 '4' - (ALL &~ TRIGHT &~ BLEFT), // 053 '5' - (ALL &~ TRIGHT), // 054 '6' - (TOP | RIGHT), // 055 '7' - (ALL), // 056 '8' - (ALL &~ BOTTOM &~ BLEFT), // 057 '9' - 0xFFFFFFFF, // 058 - 0xFFFFFFFF, // 059 - 0xFFFFFFFF, // 060 - 0XFFFFFFFF, // 061 - 0xFFFFFFFF, // 062 - 0xFFFFFFFF, // 063 - 0xFFFFFFFF, // 064 - (ALL &~ BOTTOM), // 065 'A' - (ALL), // 066 'B' - (TOP | LEFT | BOTTOM), // 067 'C' - (ALL &~ MIDDLE), // 068 'D' - (ALL &~ RIGHT), // 069 'E' - (LEFT | TOP | MIDDLE), // 070 'F' - 0x00000000, // 071 'G' - (ALL &~ TOP &~ BOTTOM), // 072 'H' - (RIGHT), // 073 'I' - (RIGHT | BOTTOM), // 074 'J' - 0x00000000, // 075 'K' - (LEFT | BOTTOM), // 076 'L' - 0x00000000, // 088 'M' - 0x00000000, // 089 'N' - (ALL &~ MIDDLE), // 090 'O' - (ALL &~ BRIGHT &~ BOTTOM),// 091 'P' - 0x00000000, // 092 'Q' - 0x00000000, // 093 'R' - (ALL &~ TRIGHT &~ BLEFT), // 094 'S' - 0X00000000, // 095 'T' - (LEFT | RIGHT | BOTTOM), // 096 'U' - 0x00000000, // 097 'V' - 0x00000000, // 098 'W' - 0x00000000, // 099 'X' - 0x00000000, // 1000 'Z' - 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, // 100 - 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, // 104 - 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, // 108 - 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, // 112 - 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, // 116 - 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, // 120 - 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF // 124 -}; - -#define CT 1.0f -#define CX 7.0f -#define CY 13.0f -#define CM ((CY-(CT*3.0f))/2.0f) - -float lCoords[][2] = -{ - /* Top outsides. */ - { 0, (CY-CT) }, - { CX, (CY-CT) }, - - /* Top Line. */ - { CT, CY }, - { CT, (CY-CT) }, - { (CX-CT), CY }, - { (CX-CT), (CY-CT) }, - - /* Middle outsides. */ - { 0.0f, (CT+CM+CT) }, - { 0.0f, (CT+CM) }, - { CX, (CT+CM+CT) }, - { CX, (CT+CM) }, - - /* Middle Line. */ - { CT, (CT+CM+CT) }, - { CT, (CT+CM) }, - { (CX-CT), (CT+CM+CT) }, - { (CX-CT), (CT+CM) }, - - /* Bottom line. */ - { CT, CT }, - { CT, 0.0f }, - { (CX-CT), CT }, - { (CX-CT), 0.0f }, - - /* Bottom outsides. */ - { 0.0f, CT}, - { CX, CT } -}; - -static int ConvertCharacter( char *c, int cIndex, PD3DFONTMETRICS pfntMetrics ); - -D3DTLVERTEX TextVertices[MAX_VERTICES]; -/*===========================================================================*/ -/* When we attach I will zero out the whole D3D vertex buffer I'm using for */ -/* the text. This way I don't need to set all the redundant values. I also */ -/* set all the oow values to 1 as I will be doing direct rendering. */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -extern "C" BOOL InitD3DText( void ) -{ - int index; - - /* Set the D3D Vertex Buffer up once so we don't do redundant changes. */ - memset( &TextVertices[0], 0, sizeof(TextVertices) ); - for( index = 0; index < MAX_VERTICES; index++ ) - TextVertices[index].rhw = D3DVAL( 1.0 ); - - return TRUE; -} -/*===========================================================================*/ -/* This function takes a single character and draw it using the supplied */ -/* fontmetrics structure. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -extern "C" void d3dTextDrawString( char *pszString, int x, int y, PD3DFONTMETRICS pfntMetrics ) -{ - int cIndex, - nIndex, - index; - float cWidth = CX, - cHeight = CY; - - /* Find the max width/height of a character and add the spacing so */ - /* that we can use this value to calculate the x,y of the character.*/ - cWidth = (cWidth * pfntMetrics->fntXScale) + pfntMetrics->fntXSpacing; - cHeight = (cHeight * pfntMetrics->fntYScale) + pfntMetrics->fntYSpacing; - - /* Walk the string. This must be NULL terminated. */ - for( cIndex = 0, nIndex = 0; *pszString; pszString++, cIndex = nIndex, x++ ) - { - /* Convert the character and get the index into the text vertex buffer. */ - nIndex = ConvertCharacter( &pszString[0], cIndex, pfntMetrics ); - if ( (nIndex - cIndex) > 2 ) - { - /* Modify the text vertex buffer based on the fntMetrics structure. */ - for( index = cIndex; index < nIndex; index++ ) - { - /* Scale the character. */ - TextVertices[index].sx *= pfntMetrics->fntXScale; - TextVertices[index].sy *= pfntMetrics->fntYScale; - - /* Move the character. */ - TextVertices[index].sx += (cWidth*x); - TextVertices[index].sy += (cHeight*y); - - /* Set the color. */ - TextVertices[index].color = pfntMetrics->dwColor; - } - } - } - - if ( nIndex < 3 ) - return; - - /* Set the states that slim things down. */ - pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_CULLMODE, D3DCULL_NONE ); - pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_FILLMODE, D3DFILL_SOLID ); - pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ZENABLE, FALSE ); - pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ZWRITEENABLE , FALSE ); - pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ALPHATESTENABLE, FALSE ); - pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ALPHABLENDENABLE, FALSE ); - - /* Blast them baby... */ - pfntMetrics->lpD3DDevice->DrawPrimitive( D3DPT_TRIANGLELIST, - D3DFVF_TLVERTEX, - (LPVOID)&TextVertices[0], - nIndex, - (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) ); -} -/*===========================================================================*/ -/* This function takes a single character and draw it directly to the screen*/ -/* unsing the supplied fntMetrics structure. The character will be drawn at */ -/* the supplied x,y. The x,y position is relative to the top left and uses */ -/* the spacing in the fntMetrics structure. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -extern "C" void d3dTextDrawCharacter( char *c, int x, int y, PD3DFONTMETRICS pfntMetrics ) -{ - int cIndex = 0, - index; - float cWidth = CX, - cHeight = CY; - - /* Convert the character and get the index into the text vertex buffer. */ - cIndex = ConvertCharacter( c, 0, pfntMetrics ); - if ( cIndex < 3 ) - return; - - /* Find the max width/height of a character and add the spacing so */ - /* that we can use this value to calculate the x,y of the character.*/ - cWidth = (cWidth * pfntMetrics->fntXScale) + pfntMetrics->fntXSpacing; - cHeight = (cHeight * pfntMetrics->fntYScale) + pfntMetrics->fntYSpacing; - - /* Modify the text vertex buffer based on the fntMetrics structure. */ - for( index = 0; index < cIndex; index++ ) - { - /* Scale the character. */ - TextVertices[index].sx *= pfntMetrics->fntXScale; - TextVertices[index].sy *= pfntMetrics->fntYScale; - - /* Move the character. */ - TextVertices[index].sx += (cWidth*x); - TextVertices[index].sy += (cHeight*y); - - /* Set the color. */ - TextVertices[index].color = pfntMetrics->dwColor; - } - - - /* Set the states that slim things down. */ - pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_CULLMODE, D3DCULL_NONE ); - pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_FILLMODE, D3DFILL_SOLID ); - pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ZENABLE, FALSE ); - pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ZWRITEENABLE , FALSE ); - pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ALPHATESTENABLE, FALSE ); - pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ALPHABLENDENABLE, FALSE ); - - /* Blast them baby... */ - pfntMetrics->lpD3DDevice->DrawPrimitive( D3DPT_TRIANGLELIST, - D3DFVF_TLVERTEX, - (LPVOID)&TextVertices[0], - cIndex, - (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) ); -} -/*===========================================================================*/ -/* This function takes a single character and draw it using the supplied */ -/* fontmetrics structure. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static int ConvertCharacter( char *c, int cIndex, PD3DFONTMETRICS pfntMetrics ) -{ - DWORD asciiChar = (int)(*c); - - /* Handle the TOP line. */ - if ( textBitMasks[asciiChar] & BIT1 ) - { - TextVertices[cIndex].sx = D3DVAL( lCoords[TL_0][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[TL_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[TR_0][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[TR_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[TR_1][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[TR_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[TR_1][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[TR_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[TL_1][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[TL_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[TL_0][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[TL_0][1] ); - } - - /* Handle the TOP/BOTTOM RIGHT lines. */ - // if ( textBitMasks[index] & (BIT2|BIT3) ) - if ( 1 == 0 ) - { - TextVertices[cIndex].sx = D3DVAL( lCoords[TR_1][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[TR_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[TRR][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[TRR][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BRR][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[BRR][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BRR][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[BRR][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BR_0][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[BR_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[TR_1][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[TR_1][1] ); - } - else - { - if ( textBitMasks[asciiChar] & BIT2 ) - { - TextVertices[cIndex].sx = D3DVAL( lCoords[TR_1][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[TR_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[TRR][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[TRR][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[MRR_0][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[MRR_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[MRR_0][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[MRR_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[MR_0][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[MR_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[TR_1][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[TR_1][1] ); - } - if ( textBitMasks[asciiChar] & BIT3 ) - { - TextVertices[cIndex].sx = D3DVAL( lCoords[MR_1][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[MR_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[MRR_1][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[MRR_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BRR][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[BRR][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BRR][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[BRR][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BR_0][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[BR_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[MR_1][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[MR_1][1] ); - } - } - - /* Handle the TOP/BOTTOM LEFT lines. */ - // if ( textBitMasks[asciiChar] & (BIT5|BIT6) ) - if ( 1 == 0 ) - { - TextVertices[cIndex].sx = D3DVAL( lCoords[TLL][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[TLL][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[TL_1][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[TL_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BL_0][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[BL_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BL_0][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[BL_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BLL][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[BLL][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[TLL][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[TLL][1] ); - } - else - { - if ( textBitMasks[asciiChar] & BIT5 ) - { - TextVertices[cIndex].sx = D3DVAL( lCoords[MLL_1][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[MLL_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[ML_1][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[ML_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BL_0][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[BL_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BL_0][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[BL_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BLL][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[BLL][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[MLL_1][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[MLL_1][1] ); - } - if ( textBitMasks[asciiChar] & BIT6 ) - { - TextVertices[cIndex].sx = D3DVAL( lCoords[TLL][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[TLL][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[TL_1][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[TL_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[ML_0][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[ML_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[ML_0][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[ML_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[MLL_0][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[MLL_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[TLL][0] ); - TextVertices[cIndex++].sy = D3DVAL( lCoords[TLL][1] ); - } - } - - /* Handle the MIDDLE line. */ - if ( textBitMasks[asciiChar] & BIT7 ) - { - TextVertices[cIndex].sx = D3DVAL( lCoords[ML_0][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[ML_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[MR_0][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[MR_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[MR_1][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[MR_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[MR_1][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[MR_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[ML_1][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[ML_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[ML_0][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[ML_0][1] ); - } - - /* Handle the BOTTOM line. */ - if ( textBitMasks[asciiChar] & BIT4 ) - { - TextVertices[cIndex].sx = D3DVAL( lCoords[BL_0][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[BL_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BR_0][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[BR_0][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BR_1][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[BR_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BR_1][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[BR_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BL_1][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[BL_1][1] ); - TextVertices[cIndex].sx = D3DVAL( lCoords[BL_0][0] ); - TextVertices[cIndex++].sy= D3DVAL( lCoords[BL_0][1] ); - } - - return cIndex; -} - -#undef CM -#undef CY -#undef CX -#undef CT - -#undef TLL -#undef TRR -#undef TL_0 -#undef TL_1 -#undef TR_0 -#undef TR_1 - -#undef MLL_0 -#undef MLL_1 -#undef MRR_0 -#undef MRR_1 - -#undef ML_0 -#undef ML_1 -#undef MR_0 -#undef MR_1 - -#undef BL_0 -#undef BL_1 -#undef BR_0 -#undef BR_1 -#undef BLL -#undef BRR - -#undef BIT1 -#undef BIT2 -#undef BIT3 -#undef BIT4 -#undef BIT5 -#undef BIT6 -#undef BIT7 - -#undef TOP -#undef MIDDLE -#undef BOTTOM -#undef TLEFT -#undef BLEFT -#undef LEFT -#undef TRIGHT -#undef BRIGHT -#undef RIGHT -#undef ALL diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DTextureMgr.cpp b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DTextureMgr.cpp deleted file mode 100644 index ac9d2621fc..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DTextureMgr.cpp +++ /dev/null @@ -1,947 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#include "D3DHAL.h" -/*===========================================================================*/ -/* Local function prototypes. */ -/*===========================================================================*/ -static void UpdateTexture( PTM_OBJECT pTMObj, BOOL bVideo, RECT *pRect, UCHAR *pixels ); -static BOOL LoadTextureInVideo( PMESAD3DHAL pHAL, PTM_OBJECT pTMObj ); -static BOOL FreeTextureMemory( PMESAD3DHAL pHAL, PTM_OBJECT pTMObject ); -static BOOL DestroyTextureObject( PMESAD3DHAL pHAL, PTM_OBJECT pTMObject ); -HRESULT CALLBACK EnumPFHook( LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext ); -/*===========================================================================*/ -/* This function will simply set the top of stack to NULL. I only used it */ -/* just incase I want to add something later. */ -/*===========================================================================*/ -/* RETURN: TRUE. */ -/*===========================================================================*/ -BOOL InitTMgrHAL( PMESAD3DHAL pHAL ) -{ - DPF(( DBG_FUNC, "InitTMgrHAL();" )); - - /* Be clean my friend. */ - pHAL->pTMList = NULL; - - return TRUE; -} -/*===========================================================================*/ -/* This function will walk the Texture Managers linked list and destroy all */ -/* surfaces (SYSTEM/VIDEO). The texture objects themselves also will be */ -/* freed. */ -/* NOTE: this is per/context. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -void TermTMgrHAL( PMESAD3DHAL pHAL ) -{ - DPF(( DBG_FUNC, "TermTMgrHAL();" )); - - if ( pHAL && pHAL->pTMList ) - { - /* Destroy the surface and remove the TMO from the stack. */ - while( DestroyTextureObject(pHAL,NULL) ); - - /* Be clean my friend. */ - pHAL->pTMList = NULL; - } -} -/*===========================================================================*/ -/* This function is a HACK as I don't know how I can disable a texture with-*/ -/* out booting it out. Is there know state change? */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -extern "C" void DisableTMgrHAL( PMESAD3DSHARED pShared ) -{ - PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared; - - DPF(( DBG_FUNC, "DisableTMgrHAL();" )); - - /* Check too see that we have a valid context. */ - if ( (pHAL == NULL) && (pHAL->lpD3DDevice != NULL) ) - { - DPF(( DBG_TXT_WARN, "Null HAL/Direct3D Device!" )); - return; - } - - // TODO: This is a hack to shut off textures. - pHAL->lpD3DDevice->SetTexture( 0, NULL ); -} -/*===========================================================================*/ -/* This function is the only entry into the TextureManager that Mesa/wgl */ -/* will see. It uses a dwAction to specify what we are doing. I did this as*/ -/* depending on the cards resources the action taken can change. */ -/* When this function is called we will always search the Texture Managers */ -/* linked list (per context remember) and try and find a structure that has */ -/* the same dwName. If we have a match we pull it out of the list and put it*/ -/* at the top of the list (TOL). If we don't find one then we create a struc*/ -/* and put it a TOL. This TOL idea makes for some caching as we will always */ -/* destroy Texture Surfaces from the bottom up... */ -/* All texture objects at this point will create a texture surface in System*/ -/* memory (SMEM). Then we will copy the Mesa texture into the surface using */ -/* the 'pixel' struc to get the translation info. So now this means that all*/ -/* textures that Mesa gives me I will have a Surface with a copy. If Mesa */ -/* changes the texture the I update the surface in (SMEM). */ -/* Now we have a texture struc and a Texture Surface in SMEM. At this point*/ -/* we create another surface on the card (VMEM). Finally we blt from the */ -/* SMEM to the VMEM and set the texture as current. Why do I need two? First*/ -/* this solves square textures. If the cards CAPS is square textures only */ -/* then I change the dimensions of the VMEM surface and the blt solves it for*/ -/* me. Second it saves me from filling D3D textures over and over if the */ -/* card needs to be creating and destroying surfaces because of low memory. */ -/* The surface in SMEM is expected to work always. When a surface has to be*/ -/* created in VMEM then we put it in a loop that tries to create the surface.*/ -/* If we create the surface ok then we brake from the loop. If we fail then */ -/* we will call 'FreeTextureMemory' that will return TRUE/FALSE as to whether*/ -/* memory was freed. If memory was freed then we can try again. If no memory*/ -/* was freed then it just can't fit. */ -/* 'FreeTextureMemory' will find the end of the list and start freeing VMEM */ -/* (never SMEM) surfaces that are not locked. */ -/* BIND - when we bind and there is a texture struct with a texture surface */ -/* in VMEM then we just make it current. If we have a struct and a surface */ -/* in SMEM but no VMEM surface then we create the surface in VMEM and blt */ -/* from the SMEM surface. If we have nothing its just like a creation... */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -extern "C" BOOL CreateTMgrHAL( PMESAD3DSHARED pShared, DWORD dwName, int level, DWORD dwRequestFlags, - RECT *rectDirty, DWORD dwWidth, DWORD dwHeight, DWORD dwAction, void *pPixels ) -{ - PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared; - PTM_OBJECT pTMObj, - pTemp; - DDSURFACEDESC2 ddsd2; - HRESULT rc; - - - DPF(( DBG_FUNC, "CreateTMgrHAL();" )); - - DPF(( DBG_TXT_INFO, "Texture:" )); - DPF(( DBG_TXT_INFO, "cx: %d cy: %d", dwWidth, dwHeight )); - DPF(( DBG_TXT_INFO, "Rect:" )); - if ( rectDirty ) - { - DPF(( DBG_TXT_INFO, "x0: %d y0: %d", rectDirty->left, rectDirty->top )); - DPF(( DBG_TXT_INFO, "x1: %d y1: %d", rectDirty->right, rectDirty->bottom )); - } - - /* Check too see that we have a valid context. */ - if ( (pHAL == NULL) && (pHAL->lpD3DDevice != NULL) ) - { - DPF(( DBG_TXT_WARN, "Null HAL/Direct3D Device!" )); - return FALSE; - } - - /*=================================================*/ - /* See if we can find this texture object by name. */ - /*=================================================*/ - for( pTMObj = pHAL->pTMList; pTMObj && (pTMObj->dwName != dwName); pTMObj = pTMObj->next ); - - /*=========================================================*/ - /* Allocate a new object if we didn't get a matching name. */ - /*=========================================================*/ - if ( pTMObj == NULL ) - { - pTMObj = (PTM_OBJECT)ALLOC( sizeof(TM_OBJECT) ); - if ( pTMObj == NULL ) - return FALSE; - memset( pTMObj, 0, sizeof(TM_OBJECT) ); - - /* Put the object at the beginning of the list. */ - pTMObj->next = pHAL->pTMList; - if ( pTMObj->next ) - { - pTemp = pTMObj->next; - pTemp->prev = pTMObj; - } - pHAL->pTMList = pTMObj; - } - else - { - /*===============================================================*/ - /* Make some caching happen by pulling this object to the front. */ - /*===============================================================*/ - if ( pHAL->pTMList != pTMObj ) - { - /* Pull the object out of the list. */ - if ( pTMObj->prev ) - { - pTemp = pTMObj->prev; - pTemp->next = pTMObj->next; - } - if ( pTMObj->next ) - { - pTemp = pTMObj->next; - pTemp->prev = pTMObj->prev; - } - - pTMObj->prev = NULL; - pTMObj->next = NULL; - - /* Put the object at the front of the list. */ - pTMObj->next = pHAL->pTMList; - if ( pTMObj->next ) - { - pTemp = pTMObj->next; - pTemp->prev = pTMObj; - } - pHAL->pTMList = pTMObj; - } - } - - /*========================================================*/ - /* If we are doing BIND and the texture is in VID memory. */ - /*========================================================*/ - if ( (dwAction == TM_ACTION_BIND) && pTMObj->lpDDS_Video ) - { - DPF(( DBG_TXT_PROFILE, "Cache HIT (%d)", dwName )); - - /* Make this the current texture. */ - rc = pHAL->lpD3DDevice->SetTexture( 0, pTMObj->lpD3DTexture2 ); - if ( FAILED(rc) ) - { - DPF(( DBG_TXT_WARN, "Failed SetTexture() (%s)", ErrorStringD3D(rc) )); - pHAL->lpD3DDevice->SetTexture( 0, NULL ); - return FALSE; - } - - return TRUE; - } - - /*=================================================================*/ - /* If we are doing BIND and the texture is at least in SYS memory. */ - /*=================================================================*/ - if ( (dwAction == TM_ACTION_BIND) && pTMObj->lpDDS_System ) - { - DPF(( DBG_TXT_PROFILE, "Cache MISS (%d)", dwName )); - - /* Create the texture on the card. */ - rc = LoadTextureInVideo( pHAL, pTMObj ); - if ( rc == FALSE ) - return FALSE; - - /* Make this the current texture. */ - rc = pHAL->lpD3DDevice->SetTexture( 0, pTMObj->lpD3DTexture2 ); - if ( FAILED(rc) ) - { - DPF(( DBG_TXT_WARN, "Failed SetTexture() (%s)", ErrorStringD3D(rc) )); - pHAL->lpD3DDevice->SetTexture( 0, NULL ); - return FALSE; - } - - return TRUE; - } - - /*=========================================================*/ - /* If we are doing UPDATE then try in VID first for speed. */ - /*=========================================================*/ - if ( (dwAction == TM_ACTION_UPDATE) && pTMObj->lpDDS_Video && - !(pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_SQUAREONLY) ) - { - DPF(( DBG_TXT_INFO, "Fix the SubTexture update Leigh!" )); - - /* Update the texture on the card. */ - UpdateTexture( pTMObj, TRUE, rectDirty, (UCHAR *)pPixels ); - - /* We updated the texture in VID so kill the SYS so we know its dirty. */ - if ( pTMObj->lpDDS_System ) - { - DPF(( DBG_TXT_INFO, "Release texture (SYS)" )); - DX_RESTORE( pTMObj->lpDDS_System ); - pTMObj->lpDDS_System->Release(); - pTMObj->lpDDS_System = NULL; - } - - /* Make this the current texture. */ - rc = pHAL->lpD3DDevice->SetTexture( 0, pTMObj->lpD3DTexture2 ); - if ( FAILED(rc) ) - { - DPF(( DBG_TXT_WARN, "Failed SetTexture() (%s)", ErrorStringD3D(rc) )); - pHAL->lpD3DDevice->SetTexture( 0, NULL ); - return FALSE; - } - - return TRUE; - } - - /*===========================================================*/ - /* If we are doing UPDATE then try in SYS still gives speed. */ - /*===========================================================*/ - if ( (dwAction == TM_ACTION_UPDATE) && pTMObj->lpDDS_System ) - { - DPF(( DBG_TXT_INFO, "Fix the SubTexture update Leigh!" )); - - /* Update the texture in SYS. */ - UpdateTexture( pTMObj, FALSE, NULL, (UCHAR *)pPixels ); - - /* We updated the SYS texture only so now blt to the VID. */ - rc = LoadTextureInVideo( pHAL, pTMObj ); - if ( rc == FALSE ) - return FALSE; - - /* Make this the current texture. */ - rc = pHAL->lpD3DDevice->SetTexture( 0, pTMObj->lpD3DTexture2 ); - if ( FAILED(rc) ) - { - DPF(( DBG_TXT_WARN, "Failed SetTexture() (%s)", ErrorStringD3D(rc) )); - pHAL->lpD3DDevice->SetTexture( 0, NULL ); - return FALSE; - } - - return TRUE; - } - - /* At this point we have a valid Texture Manager Object with updated */ - /* links. We now need to create or update a texture surface that is */ - /* in system memory. Every texture has a copy in system so we can use*/ - /* blt to solve problems with textures allocated on the card (square */ - /* only textures, pixelformats...). */ - - // TODO: make support for update also. Dirty rectangle basicly... - - /* Kill the interface if we have one no matter what. */ - if ( pTMObj->lpD3DTexture2 ) - { - DPF(( DBG_TXT_INFO, "Release Texture2" )); - pTMObj->lpD3DTexture2->Release(); - pTMObj->lpD3DTexture2 = NULL; - } - - /* Kill the system surface. TODO: should try to get the SubIMage going again */ - if ( pTMObj->lpDDS_System ) - { - DPF(( DBG_TXT_INFO, "Release texture (SYS)" )); - DX_RESTORE( pTMObj->lpDDS_System ); - pTMObj->lpDDS_System->Release(); - pTMObj->lpDDS_System = NULL; - } - - /* Kill the Video surface. TODO: need some reuse system... */ - if ( pTMObj->lpDDS_Video ) - { - DPF(( DBG_TXT_INFO, "Release texture (VID)" )); - DX_RESTORE( pTMObj->lpDDS_Video ); - pTMObj->lpDDS_Video->Release(); - pTMObj->lpDDS_Video = NULL; - } - - /*================================================================*/ - /* Translate the the Mesa/OpenGL pixel channels to the D3D flags. */ - /*================================================================*/ - switch( dwRequestFlags ) - { - case GL_ALPHA: - dwRequestFlags = DDPF_ALPHA; - DPF(( DBG_TXT_WARN, "GL_ALPHA not supported!)" )); - return FALSE; - - case GL_INTENSITY: - case GL_LUMINANCE: - DPF(( DBG_TXT_WARN, "GL_INTENSITY/GL_LUMINANCE not supported!)" )); - dwRequestFlags = DDPF_LUMINANCE; - return FALSE; - - case GL_LUMINANCE_ALPHA: - DPF(( DBG_TXT_WARN, "GL_LUMINANCE_ALPHA not supported!)" )); - dwRequestFlags = DDPF_LUMINANCE | DDPF_ALPHAPIXELS; - return FALSE; - - case GL_RGB: - DPF(( DBG_TXT_INFO, "Texture -> GL_RGB" )); - dwRequestFlags = DDPF_RGB; - break; - - case GL_RGBA: - DPF(( DBG_TXT_INFO, "Texture -> GL_RGBA" )); - dwRequestFlags = DDPF_RGB | DDPF_ALPHAPIXELS; - break; - } - - /*==============================*/ - /* Populate the texture object. */ - /*==============================*/ - pTMObj->dwName = dwName; - pTMObj->lpD3DDevice = pHAL->lpD3DDevice; - pTMObj->dwFlags = dwRequestFlags; - if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_SQUAREONLY ) - { - DPF(( DBG_TXT_INFO, "Convert to Square..." )); - pTMObj->dwSHeight = dwHeight; - pTMObj->dwSWidth = dwWidth; - - /* Shrink non-square textures. */ - pTMObj->dwVHeight = (dwHeight > dwWidth) ? dwWidth : dwHeight; - pTMObj->dwVWidth = (dwHeight > dwWidth) ? dwWidth : dwHeight; - } - else - { - pTMObj->dwSHeight = dwHeight; - pTMObj->dwSWidth = dwWidth; - pTMObj->dwVHeight = dwHeight; - pTMObj->dwVWidth = dwWidth; - } - - /*========================*/ - /* Create SYSTEM surface. */ - /*========================*/ - - /* Request a surface in system memory. */ - memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) ); - ddsd2.dwSize = sizeof( DDSURFACEDESC2 ); - ddsd2.dwWidth = pTMObj->dwSWidth; - ddsd2.dwHeight = pTMObj->dwSHeight; - ddsd2.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; - ddsd2.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY; - ddsd2.ddsCaps.dwCaps2 = 0L; - memset( &ddsd2.ddpfPixelFormat, 0, sizeof(DDPIXELFORMAT) ); - ddsd2.ddpfPixelFormat.dwSize = sizeof( DDPIXELFORMAT ); - ddsd2.ddpfPixelFormat.dwFlags = dwRequestFlags; - rc = pHAL->lpD3DDevice->EnumTextureFormats( EnumPFHook, &ddsd2.ddpfPixelFormat ); - if ( FAILED(rc) ) - { - RIP( pHAL, "EnumerTextureFormats (SYSTEM)->", ErrorStringD3D(rc) ); - return FALSE; - } - - /* Create the surface using the enumerated pixelformat. */ - rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pTMObj->lpDDS_System, NULL ); - if ( FAILED(rc) ) - { - RIP( pHAL, "CreateSurface (TEXTURE/SYSTEM)->", ErrorStringD3D(rc) ); - return FALSE; - } - - /* Solve the pixel mapping info using the surface pixelformat. */ - Solve8BitChannelPixelFormat( &ddsd2.ddpfPixelFormat, &pTMObj->pixel ); - - /*===================================================================*/ - /* Fill the texture using the PixelInfo structure to do the mapping. */ - /*===================================================================*/ - UpdateTexture( pTMObj, FALSE, NULL, (UCHAR *)pPixels ); - - /*=======================*/ - /* Create VIDEO surface. */ - /*=======================*/ - rc = LoadTextureInVideo( pHAL, pTMObj ); - if ( rc == FALSE ) - return FALSE; - - /* Make this the current texture. */ - rc = pHAL->lpD3DDevice->SetTexture( 0, pTMObj->lpD3DTexture2 ); - if ( FAILED(rc) ) - { - DPF(( DBG_TXT_WARN, "Failed SetTexture() (%s)", ErrorStringD3D(rc) )); - pHAL->lpD3DDevice->SetTexture( 0, NULL ); - return FALSE; - } - - return TRUE; -} -/*===========================================================================*/ -/* This function will handle the creation and destruction of the texture */ -/* surfaces on the card. Using the dw'V'Width/Height dimensions the call */ -/* try and create the texture on the card and keep using FreeTextureMemory */ -/* until the surace can be created. Once the surface is created we get the */ -/* interface that we will use to make it the current texture. I didn't put */ -/* the code to make the texture current in this function as BIND needs to */ -/* use the same code and this function doesn't always get called when we do a*/ -/* bind. */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -static BOOL LoadTextureInVideo( PMESAD3DHAL pHAL, PTM_OBJECT pTMObj ) -{ - DDSURFACEDESC2 ddsd2; - HRESULT rc; - - DPF(( DBG_FUNC, "LoadTextureInVideo();" )); - - /* Kill the interface if we have one no matter what. */ - if ( pTMObj->lpD3DTexture2 ) - { - DPF(( DBG_TXT_INFO, "Release Texture2" )); - pTMObj->lpD3DTexture2->Release(); - pTMObj->lpD3DTexture2 = NULL; - } - - /* Kill the Video surface. TODO: need some reuse system... */ - if ( pTMObj->lpDDS_Video ) - { - DPF(( DBG_TXT_INFO, "Release texture (VID)" )); - DX_RESTORE( pTMObj->lpDDS_Video ); - pTMObj->lpDDS_Video->Release(); - pTMObj->lpDDS_Video = NULL; - } - - /* Request a surface in Video memory. */ - memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) ); - ddsd2.dwSize = sizeof( DDSURFACEDESC2 ); - ddsd2.dwWidth = pTMObj->dwVWidth; - ddsd2.dwHeight = pTMObj->dwVHeight; - ddsd2.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; - ddsd2.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY; - ddsd2.ddsCaps.dwCaps2 = 0L; - memset( &ddsd2.ddpfPixelFormat, 0, sizeof(DDPIXELFORMAT) ); - ddsd2.ddpfPixelFormat.dwSize = sizeof( DDPIXELFORMAT ); - ddsd2.ddpfPixelFormat.dwFlags = pTMObj->dwFlags; - rc = pHAL->lpD3DDevice->EnumTextureFormats( EnumPFHook, &ddsd2.ddpfPixelFormat ); - if ( FAILED(rc) ) - { - RIP( pHAL, "EnumerTextureFormats ->", ErrorStringD3D(rc) ); - return FALSE; - } - - /* Make sure we lock so we don't nuke this texture trying to free memory for it. */ - pTMObj->bLock = TRUE; - - /* Start a loop that will free all textures until we have created the texture */ - /* surface or we can't free up more memory. */ - do - { - /* Try to create the texture surface. */ - rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pTMObj->lpDDS_Video, NULL ); - if ( !FAILED(rc) ) - break; - - DPF(( DBG_TXT_INFO, "Free Texture Memory" )); - - /* DestroyTexture will return TRUE if a surface was freed. */ - } while( FreeTextureMemory(pHAL,NULL) ); - - /* Make sure we unlock or we won't be able to nuke the TMO later. */ - pTMObj->bLock = FALSE; - - /* Did we create a valid texture surface? */ - if ( FAILED(rc) ) - { - DPF(( DBG_TXT_WARN, "Failed to load texture" )); - pHAL->lpD3DDevice->SetTexture( 0, NULL ); - return FALSE; - } - - DX_RESTORE( pTMObj->lpDDS_System ); - DX_RESTORE( pTMObj->lpDDS_Video ); - - DPF(( DBG_TXT_INFO, "Texture Blt SYSTEM -> VID" )); - - /* Now blt the texture in system memory to the card. */ - rc = pTMObj->lpDDS_Video->Blt( NULL, pTMObj->lpDDS_System, NULL, DDBLT_WAIT, NULL ); - if ( FAILED(rc) ) - { - RIP( pHAL, "Blt (TEXTURE) ->", ErrorStringD3D(rc) ); - return FALSE; - } - - /* Get the Texture interface that is used to render with. */ - pTMObj->lpDDS_Video->QueryInterface( IID_IDirect3DTexture2, (void **)&pTMObj->lpD3DTexture2 ); - if ( pTMObj->lpD3DTexture2 == NULL ) - { - DPF(( DBG_TXT_WARN, "Failed QueryTextureInterface" )); - pHAL->lpD3DDevice->SetTexture( 0, NULL ); - return FALSE; - } - - return TRUE; -} -/*===========================================================================*/ -/* If this function gets a texture object struc then we will try and free */ -/* it. If we get a NULL then we will search from the bottom up and free one */ -/* VMEM surface. I can only free when the surface isn't locked and of course*/ -/* there must be a VMEM surface. We never free SMEM surfaces as that isn't */ -/* the point. */ -/* TODO: should have a pointer to the bottom of the stack really. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static BOOL FreeTextureMemory( PMESAD3DHAL pHAL, PTM_OBJECT pTMObject ) -{ - PTM_OBJECT pCurrent; - BOOL bFreed = FALSE; - - DPF(( DBG_FUNC, "FreeTextureMemory();" )); - DPF(( DBG_TXT_WARN, "FREE TEXTURE!" )); - - /* Just to be safe. */ - if ( !pHAL || !pHAL->pTMList ) - { - DPF(( DBG_TXT_WARN, "FreeTextureMemory() -> NULL pHAL/pHAL->pTMList" )); - return FALSE; - } - - /* Free the last texture in the list. */ - if ( pTMObject == NULL ) - { - DPF(( DBG_TXT_INFO, "Free Last texture in cache" )); - - /* Find the last texture object. */ - for( pCurrent = pHAL->pTMList; pCurrent->next; pCurrent = pCurrent->next ); - - /* Now backup until we find a texture on the card. */ - while( pCurrent && (pCurrent->lpDDS_Video == NULL) && (pCurrent->bLock == FALSE) ) - pCurrent = pCurrent->prev; - - /* Didn't find anything. */ - if ( pCurrent == NULL ) - { - DPF(( DBG_TXT_INFO, "No texture memory freed" )); - return FALSE; - } - } - else - { - /* See if we can find this texture object. */ - for( pCurrent = pHAL->pTMList; pCurrent && (pCurrent != pTMObject); pCurrent = pCurrent->next ); - - /* Didn't find anything. */ - if ( pCurrent == NULL ) - { - DPF(( DBG_TXT_INFO, "Requested texture to be freed NOT FOUND" )); - return FALSE; - } - } - - /* Can't free this baby. */ - if ( pCurrent->bLock == TRUE ) - { - DPF(( DBG_TXT_WARN, "Requested texture LOCKED" )); - return FALSE; - } - - /* Free the texture memory. */ - if ( pCurrent->lpD3DTexture2 ) - { - DPF(( DBG_TXT_INFO, "Release Texture2" )); - pCurrent->lpD3DTexture2->Release(); - pCurrent->lpD3DTexture2 = NULL; - bFreed = TRUE; - } - if ( pCurrent->lpDDS_Video ) - { - DPF(( DBG_TXT_INFO, "Release texture (VID):" )); - DPF(( DBG_TXT_INFO, "dwName: %d", pCurrent->dwName )); - DPF(( DBG_TXT_INFO, "cx: %d, cy: %d", pCurrent->dwVWidth, pCurrent->dwVHeight )); - pCurrent->lpDDS_Video->Release(); - pCurrent->lpDDS_Video = NULL; - bFreed = TRUE; - } - - return bFreed; -} -/*===========================================================================*/ -/* This function searches the linked list of texture objects in the supplied*/ -/* D3Dwrapper structure. If it finds a match it will free it and pull it out*/ -/* of the linked list. The function works on the bases of a matching pointer*/ -/* to the object (not matching content). */ -/* If the function gets passed a NULL then we want to free the last texture */ -/* object in the list. Used in a loop to destory all. */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -static BOOL DestroyTextureObject( PMESAD3DHAL pHAL, PTM_OBJECT pTMObject ) -{ - PTM_OBJECT pCurrent; - - DPF(( DBG_FUNC, "DestoryTextureObject();" )); - - /* Just to be safe. */ - if ( !pHAL || !pHAL->pTMList ) - { - DPF(( DBG_TXT_WARN, "DestroyTextureObject() -> NULL pHAL/pHAL->pTMList" )); - return FALSE; - } - - /* Free the last texture in the list. */ - if ( pTMObject == NULL ) - { - /* Find the last texture object. */ - for( pCurrent = pHAL->pTMList; pCurrent->next; pCurrent = pCurrent->next ); - } - else - { - /* See if we can find this texture object. */ - for( pCurrent = pHAL->pTMList; pCurrent && (pCurrent != pTMObject); pCurrent = pCurrent->next ); - - /* Didn't find anything. */ - if ( pCurrent == NULL ) - { - DPF(( DBG_TXT_WARN, "No textures to be freed" )); - return FALSE; - } - } - - /* Can't free this baby. */ - if ( pCurrent->bLock == TRUE ) - { - DPF(( DBG_TXT_WARN, "Requested texture to be freed LOCKED" )); - return FALSE; - } - - /* Free the texture memory. */ - if ( pCurrent->lpD3DTexture2 ) - { - DPF(( DBG_TXT_INFO, "Release Texture2" )); - pCurrent->lpD3DTexture2->Release(); - pCurrent->lpD3DTexture2 = NULL; - } - if ( pCurrent->lpDDS_Video ) - { - DPF(( DBG_TXT_INFO, "Release texture (VID):" )); - pCurrent->lpDDS_Video->Release(); - pCurrent->lpDDS_Video = NULL; - } - if ( pCurrent->lpDDS_System ) - { - DPF(( DBG_TXT_INFO, "Release texture (SYS):" )); - pCurrent->lpDDS_System->Release(); - pCurrent->lpDDS_System = NULL; - } - - /* Pull this texture out of the list. */ - if ( pCurrent == pHAL->pTMList ) - pHAL->pTMList = NULL; - if ( pCurrent->prev ) - (pCurrent->prev)->next = pCurrent->next; - if ( pCurrent->next ) - (pCurrent->next)->prev = pCurrent->prev; - FREE( pCurrent ); - - return TRUE; -} -/*===========================================================================*/ -/* This function is the callback function that gets called when we are doing*/ -/* an enumeration of the texture formats supported by this device. The choice*/ -/* is made by checking to see if we have a match with the supplied D3D pixel-*/ -/* format. So the enumeration has to pass a desired D3D PF as the user var. */ -/*===========================================================================*/ -/* RETURN: D3DENUMRET_OK, D3DENUMRET_CANCEL. */ -/*===========================================================================*/ -static void UpdateTexture( PTM_OBJECT pTMObj, BOOL bVideo, RECT *pRect, UCHAR *pixels ) -{ - LPDIRECTDRAWSURFACE4 lpDDS; - DDSURFACEDESC2 ddsd2; - DWORD srcPitch, - dwHeight, - dwWidth, - dwCol, - dwColor; - UCHAR *pSrc, - *pSrcRow, - *pDest, - *pDestRow; - int rc; - - // TODO: Do I need to pass the h/w when its in the object! - DPF(( DBG_FUNC, "UpdateTexture();" )); - - /* Get the surface pointer we are looking for. */ - lpDDS = (bVideo) ? pTMObj->lpDDS_Video : pTMObj->lpDDS_System; - - /*===================================================================*/ - /* Fill the texture using the PixelInfo structure to do the mapping. */ - /*===================================================================*/ - - /* Get the surface pointer. */ - memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) ); - ddsd2.dwSize = sizeof(DDSURFACEDESC2); - rc = lpDDS->Lock( NULL, &ddsd2, DDLOCK_WAIT, NULL ); - if ( FAILED(rc) ) - { - RIP( NULL, "Lock (TEXTURE/SYSTEM)->", ErrorStringD3D(rc) ); - return; - } - - /* For now we are only updating the system surface so use its dimensions. */ - dwWidth = (bVideo) ? pTMObj->dwVWidth : pTMObj->dwSWidth; - dwHeight = (bVideo) ? pTMObj->dwVHeight : pTMObj->dwSHeight; - - /* If we are updating the whole surface then the pDest/pSrc will */ - /* always be the same. */ - if ( pRect == NULL ) - { - pDest = (UCHAR *)ddsd2.lpSurface; - pSrc = pixels; - } - - /* Fill the texture surface based on the pixelformat flags. */ - if ( pTMObj->dwFlags == (DDPF_RGB | DDPF_ALPHAPIXELS) ) - { - srcPitch = dwWidth * 4; - if ( pRect ) - { - pDest = ((UCHAR *)ddsd2.lpSurface) + (pRect->top * ddsd2.lPitch) + (pRect->left * pTMObj->pixel.cb); - pSrc = pixels + (pRect->top * dwWidth * 4) + (pRect->left * 4); - dwHeight = (pRect->bottom - pRect->top); - dwWidth = (pRect->right - pRect->left); - } - - for( pDestRow = pDest, pSrcRow = pSrc; dwHeight > 0; dwHeight--, pDestRow += ddsd2.lPitch, pSrcRow += srcPitch ) - { - for( dwCol = 0, pDest = pDestRow, pSrc = pSrcRow; dwCol < dwWidth; dwCol++ ) - { - dwColor = ( ((DWORD)(*(pSrc ) * pTMObj->pixel.rScale)) << pTMObj->pixel.rShift ); - dwColor |= ( ((DWORD)(*(pSrc+1) * pTMObj->pixel.gScale)) << pTMObj->pixel.gShift ); - dwColor |= ( ((DWORD)(*(pSrc+2) * pTMObj->pixel.bScale)) << pTMObj->pixel.bShift ); - if ( pTMObj->pixel.aScale == -1.0 ) - dwColor |= ( (*(pSrc+3) & 0x80) ? (1 << pTMObj->pixel.aShift) : 0 ); - else - dwColor |= ( ((DWORD)(*(pSrc+3) * pTMObj->pixel.aScale)) << pTMObj->pixel.aShift ); - memcpy( pDest, &dwColor, pTMObj->pixel.cb ); - pDest += pTMObj->pixel.cb; - pSrc += 4; - } - } - } - else if ( pTMObj->dwFlags == DDPF_RGB ) - { - srcPitch = dwWidth * 3; - if ( pRect ) - { - pDest = ((UCHAR *)ddsd2.lpSurface) + (pRect->top * ddsd2.lPitch) + (pRect->left * pTMObj->pixel.cb); - pSrc = pixels + (pRect->top * dwWidth * 3) + (pRect->left * 3); - dwHeight = (pRect->bottom - pRect->top); - dwWidth = (pRect->right - pRect->left); - } - - for( pDestRow = pDest, pSrcRow = pSrc; dwHeight > 0; dwHeight--, pDestRow += ddsd2.lPitch, pSrcRow += srcPitch ) - { - for( dwCol = 0, pDest = pDestRow, pSrc = pSrcRow; dwCol < dwWidth; dwCol++ ) - { - dwColor = ( ((DWORD)(*(pSrc ) * pTMObj->pixel.rScale)) << pTMObj->pixel.rShift ); - dwColor |= ( ((DWORD)(*(pSrc+1) * pTMObj->pixel.gScale)) << pTMObj->pixel.gShift ); - dwColor |= ( ((DWORD)(*(pSrc+2) * pTMObj->pixel.bScale)) << pTMObj->pixel.bShift ); - memcpy( pDest, &dwColor, pTMObj->pixel.cb ); - pDest += pTMObj->pixel.cb; - pSrc += 3; - } - } - } - else if ( pTMObj->dwFlags == (DDPF_LUMINANCE | DDPF_ALPHAPIXELS) ) - { - srcPitch = dwWidth * 2; - if ( pRect ) - { - pDest = ((UCHAR *)ddsd2.lpSurface) + (pRect->top * ddsd2.lPitch) + (pRect->left * pTMObj->pixel.cb); - pSrc = pixels + (pRect->top * dwWidth * 2) + (pRect->left * 2); - dwHeight = (pRect->bottom - pRect->top); - dwWidth = (pRect->right - pRect->left); - } - - for( pDestRow = pDest, pSrcRow = pSrc; dwHeight > 0; dwHeight--, pDestRow += ddsd2.lPitch, pSrcRow += srcPitch ) - { - for( dwCol = 0, pDest = pDestRow, pSrc = pSrcRow; dwCol < dwWidth; dwCol++ ) - { - dwColor = ( ((DWORD)(*(pSrc ) * pTMObj->pixel.rScale)) << pTMObj->pixel.rShift ); - if ( pTMObj->pixel.aScale == -1.0 ) - dwColor |= ( (*(pSrc+1) & 0x80) ? (1 << pTMObj->pixel.aShift) : 0 ); - else - dwColor |= ( ((DWORD)(*(pSrc+1) * pTMObj->pixel.aScale)) << pTMObj->pixel.aShift ); - memcpy( pDest, &dwColor, pTMObj->pixel.cb ); - pDest += pTMObj->pixel.cb; - pSrc += 2; - } - } - } - else if ( pTMObj->dwFlags == DDPF_LUMINANCE ) - { - srcPitch = dwWidth; - if ( pRect ) - { - pDest = ((UCHAR *)ddsd2.lpSurface) + (pRect->top * ddsd2.lPitch) + (pRect->left * pTMObj->pixel.cb); - pSrc = pixels + (pRect->top * dwWidth) + (pRect->left); - dwHeight = (pRect->bottom - pRect->top); - dwWidth = (pRect->right - pRect->left); - } - - for( pDestRow = pDest, pSrcRow = pSrc; dwHeight > 0; dwHeight--, pDestRow += ddsd2.lPitch, pSrcRow += srcPitch ) - { - for( dwCol = 0, pDest = pDestRow, pSrc = pSrcRow; dwCol < dwWidth; dwCol++ ) - { - dwColor = ( ((DWORD)(*pSrc * pTMObj->pixel.rScale)) << pTMObj->pixel.rShift ); - memcpy( pDest, &dwColor, pTMObj->pixel.cb ); - pDest += pTMObj->pixel.cb; - pSrc++; - } - } - } - else if ( pTMObj->dwFlags == DDPF_ALPHAPIXELS ) - { - srcPitch = dwWidth; - if ( pRect ) - { - pDest = ((UCHAR *)ddsd2.lpSurface) + (pRect->top * ddsd2.lPitch) + (pRect->left * pTMObj->pixel.cb); - pSrc = pixels + (pRect->top * dwWidth) + (pRect->left); - dwHeight = (pRect->bottom - pRect->top); - dwWidth = (pRect->right - pRect->left); - } - - for( pDestRow = pDest, pSrcRow = pSrc; dwHeight > 0; dwHeight--, pDestRow += ddsd2.lPitch, pSrcRow += srcPitch ) - { - for( dwCol = 0, pDest = pDestRow, pSrc = pSrcRow; dwCol < dwWidth; dwCol++ ) - { - if ( pTMObj->pixel.aScale == -1.0 ) - dwColor = ( (*pSrc & 0x80) ? (1 << pTMObj->pixel.aShift) : 0 ); - else - dwColor = ( ((DWORD)(*pSrc * pTMObj->pixel.aScale)) << pTMObj->pixel.aShift ); - memcpy( pDest, &dwColor, pTMObj->pixel.cb ); - pDest += pTMObj->pixel.cb; - pSrc++; - } - } - } - - /* Unlock the surface. */ - rc = lpDDS->Unlock( NULL ); - if ( FAILED(rc) ) - { - RIP( NULL, "Unlock (TEXTURE/SYSTEM)->", ErrorStringD3D(rc) ); - } -} -/*===========================================================================*/ -/* This function is the callback function that gets called when we are doing*/ -/* an enumeration of the texture formats supported by this device. The choice*/ -/* is made by checking to see if we have a match with the supplied D3D pixel-*/ -/* format. So the enumeration has to pass a desired D3D PF as the user var. */ -/*===========================================================================*/ -/* RETURN: D3DENUMRET_OK, D3DENUMRET_CANCEL. */ -/*===========================================================================*/ -HRESULT CALLBACK EnumPFHook( LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext ) -{ - LPDDPIXELFORMAT lpDDPixFmtRequest = (LPDDPIXELFORMAT)lpContext; - PIXELINFO pixel; - - DPF(( DBG_FUNC, "EnumPFHook();" )); - - if ( lpDDPixFmt->dwFlags == lpDDPixFmtRequest->dwFlags ) - { - /* Are we looking for an alpha channel? */ - if ( lpDDPixFmtRequest->dwFlags & DDPF_ALPHAPIXELS ) - { - /* Try for something that has more then 1bits of Alpha. */ - Solve8BitChannelPixelFormat( lpDDPixFmt, &pixel ); - if ( pixel.aScale == -1.0 ) - { - /* Save this format no matter what as its a match of sorts. */ - memcpy( lpDDPixFmtRequest, lpDDPixFmt, sizeof(DDPIXELFORMAT) ); - return D3DENUMRET_OK; - } - } - - /* Save this format as its a good match. */ - memcpy( lpDDPixFmtRequest, lpDDPixFmt, sizeof(DDPIXELFORMAT) ); - - /* We are happy at this point so lets leave. */ - return D3DENUMRET_CANCEL; - } - - return D3DENUMRET_OK; -} - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DTextureMgr.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DTextureMgr.h deleted file mode 100644 index f4a4154917..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DTextureMgr.h +++ /dev/null @@ -1,62 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#ifndef _TEXTURE_MGR_INC -#define _TEXTURE_MGR_INC - -/*===========================================================================*/ -/* Includes. */ -/*===========================================================================*/ -#include -#include -#include -#include -#include -#include "GL/gl.h" -/*========================================================================*/ -/* Defines. */ -/*========================================================================*/ -/*========================================================================*/ -/* Type defines. */ -/*========================================================================*/ -typedef struct _local_texture_object -{ - DWORD dwName, - dwPriority, - dwFlags, - dwSWidth, - dwSHeight, - dwVWidth, - dwVHeight; - BOOL bLock, - bDirty; /* I only update VID on SubImage calls so the system */ - /* texture can get invalid. */ - - LPDIRECT3DDEVICE3 lpD3DDevice; /* If the device changes we must get new handles... */ - LPDIRECTDRAWSURFACE4 lpDDS_System, - lpDDS_Video; - LPDIRECT3DTEXTURE2 lpD3DTexture2; - - PIXELINFO pixel; - - struct _local_texture_object *next; - struct _local_texture_object *prev; - -} TM_OBJECT, *PTM_OBJECT; -/*========================================================================*/ -/* Function prototypes. */ -/*========================================================================*/ -void APIENTRY InitTMD3D( void *pVoid ); -void APIENTRY TermTMD3D( void *pVoid ); -/*========================================================================*/ -/* Global variables declaration. */ -/*========================================================================*/ - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DUTILS.CPP b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DUTILS.CPP deleted file mode 100644 index c13d89cd71..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3DUTILS.CPP +++ /dev/null @@ -1,638 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#include "D3DHAL.h" -/*===========================================================================*/ -/* Local only functions. */ -/*===========================================================================*/ -static int CountTrailingZeros( DWORD dwMask ); -/*===========================================================================*/ -/* This function is used to get the pointer to the surface and the pitch for*/ -/* the scanline rendering functions. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -extern "C" DDSURFACEDESC2 *LockHAL( PMESAD3DSHARED pShared, BOOL bBack ) -{ - PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared; - static DDSURFACEDESC2 ddsd2; - HRESULT rc; - - DPF(( DBG_FUNC, "LockHAL();" )); - - /* Set the request structure up first. */ - memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) ); - ddsd2.dwSize = sizeof(DDSURFACEDESC2); - - /* Make sure we have enough info. */ - if ( pHAL ) - { - rc = pHAL->lpDDSRender->Lock( NULL, &ddsd2, DDLOCK_WAIT, NULL ); - if ( FAILED(rc) ) - { - RIP( pHAL, "Lock (RENDER) ->", ErrorStringD3D(rc) ); - } - } - - return &ddsd2; -} -/*===========================================================================*/ -/* This is just a simple wrapper. I probably don't need to do any error */ -/* checking as the Lock must have worked inorder to get here... */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -extern "C" void UnlockHAL( PMESAD3DSHARED pShared, BOOL bBack ) -{ - PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared; - HRESULT rc; - - DPF(( DBG_FUNC, "UnlockHAL();" )); - - /* Make sure we have enough info. */ - if ( pHAL ) - { - rc = pHAL->lpDDSRender->Unlock( NULL ); - if ( FAILED(rc) ) - { - RIP( pHAL, "Unlock (RENDER) ->", ErrorStringD3D(rc) ); - } - } -} -/*===========================================================================*/ -/* This function will track the main/Primary window that will be used as the*/ -/* target for the Blt in SwapBuffers. As a side effect the call will check */ -/* to see if the primary surface is the same size and position as the screen.*/ -/* If they are the same size we will call it fullscreen... */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -extern "C" void UpdateScreenPosHAL( PMESAD3DSHARED pShared ) -{ - PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared; - POINT pt; - DWORD dwWidth, dwHeight; - - DPF(( DBG_FUNC, "UpdateScreenPosHAL();" )); - - /* Make sure we have enough info. */ - if ( pHAL != NULL ) - { - /* Update the windows screen position. */ - GetClientRect( pShared->hwnd, &pShared->rectW ); - pt.x = pt.y = 0; - ClientToScreen( pShared->hwnd, &pt ); - OffsetRect( &pShared->rectW, pt.x, pt.y); - - /* Compare the primary to the screen. */ - dwWidth = GetSystemMetrics( SM_CXSCREEN ); - dwHeight = GetSystemMetrics( SM_CYSCREEN ); - if ( (pShared->rectW.left > 0) || (pShared->rectW.top > 0) || - (pShared->rectW.right > dwWidth) || (pShared->rectW.bottom > dwHeight) ) - pShared->bWindow = TRUE; - else - pShared->bWindow = FALSE; - } -} -/*===========================================================================*/ -/* This function will fill in the pixel info structure defined in D3Dshared.*/ -/* Basicly it will take a DirectDraw pixelformat structure and make scaling */ -/* values that will convert from 8bit channels to whatever the supplied ddpf */ -/* uses. Also we will generate shift values that will be used to get move */ -/* each component of the pixel into place. */ -/* I have now added a special case for a 1bit alpha channel. If I find a 1b*/ -/* alpha then I will set the scale to -1.0 which should be unique. Later I */ -/* can check the alpha scale value too see if its -1.0 and thus handle it. I*/ -/* was finding that the case was not working tom my advantage so this is my */ -/* HACK for the day. As a TODO I should work on this... */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -void Solve8BitChannelPixelFormat( DDPIXELFORMAT *pddpf, PPIXELINFO pPixel ) -{ - DPF(( DBG_FUNC, "Solve8BitChannelPixelFromat();" )); - - memset( pPixel, 0, sizeof(PPIXELINFO) ); - - /* Check too see if the color space is valid in the PF. */ - if ( pddpf->dwFlags & DDPF_RGB ) - { - /* Solve the red stuff. */ - pPixel->dwRMask = pddpf->dwRBitMask; - pPixel->rShift = CountTrailingZeros( pPixel->dwRMask ); - pPixel->rScale = (float)0.00392156 * (float)(pPixel->dwRMask >> pPixel->rShift); - - /* Solve the green thingy's. */ - pPixel->dwGMask = pddpf->dwGBitMask; - pPixel->gShift = CountTrailingZeros( pPixel->dwGMask ); - pPixel->gScale = (float)0.00392156 * (float)(pPixel->dwGMask >> pPixel->gShift); - - /* Solve the blues. */ - pPixel->dwBMask = pddpf->dwBBitMask; - pPixel->bShift = CountTrailingZeros( pddpf->dwBBitMask ); - pPixel->bScale = (float)0.00392156 * (float)(pddpf->dwBBitMask >> pPixel->bShift); - } - - /* Do the alpha channel if there is one. */ - if ( pddpf->dwFlags & DDPF_ALPHAPIXELS ) - { - pPixel->dwAMask = pddpf->dwRGBAlphaBitMask; - pPixel->aShift = CountTrailingZeros( pPixel->dwAMask ); - - /* Special case a 1bit alpha. */ - if ( (pPixel->dwAMask >> pPixel->aShift) == 1 ) - pPixel->aScale = -1.0; - else - pPixel->aScale = (float)0.00392156 * (float)(pPixel->dwAMask >> pPixel->aShift); - } - - /* Get the size of the pixel in bytes. Should work as dwRGBBitCount is in a union. */ - pPixel->cb = pddpf->dwRGBBitCount / 8; -} -/*===========================================================================*/ -/* See RETURN :) */ -/*===========================================================================*/ -/* RETURN: number of contiguous zeros starting from the right. */ -/*===========================================================================*/ -static int CountTrailingZeros( DWORD dwMask ) -{ - DWORD Mask; - - if ( dwMask == 0 ) - return 32; - - /* Can't take credit for this one! */ - Mask = dwMask & -(int)dwMask; - return ((Mask & 0xFFFF0000)!=0) << 4 - | ((Mask & 0xFF00FF00)!=0) << 3 - | ((Mask & 0xF0F0F0F0)!=0) << 2 - | ((Mask & 0xCCCCCCCC)!=0) << 1 - | ((Mask & 0xAAAAAAAA)!=0); -} -/*===========================================================================*/ -/* This function will convert the DDraw error code to its macro string. The*/ -/* returned pointer is static so you need not worry about memory managemnet */ -/* but the error message gets written over from call to call... */ -/*===========================================================================*/ -/* RETURN: pointer to the single static buffer that hold the error message. */ -/*===========================================================================*/ -char *ErrorStringD3D( HRESULT hr ) -{ - static char errorString[128]; - - switch( hr ) - { - case DDERR_ALREADYINITIALIZED: - strcpy( errorString, "DDERR_ALREADYINITIALIZED" ); - break; - - case DDERR_CANNOTATTACHSURFACE: - strcpy( errorString, "DDERR_CANNOTATTACHSURFACE" ); - break; - - case DDERR_CANNOTDETACHSURFACE: - strcpy( errorString, "DDERR_CANNOTDETACHSURFACE" ); - break; - - case DDERR_CURRENTLYNOTAVAIL: - strcpy( errorString, "DDERR_CURRENTLYNOTAVAIL" ); - break; - - case DDERR_EXCEPTION: - strcpy( errorString, "DDERR_EXCEPTION" ); - break; - - case DDERR_GENERIC: - strcpy( errorString, "DDERR_GENERIC" ); - break; - - case DDERR_HEIGHTALIGN: - strcpy( errorString, "DDERR_HEIGHTALIGN" ); - break; - - case DDERR_INCOMPATIBLEPRIMARY: - strcpy( errorString, "DDERR_INCOMPATIBLEPRIMARY" ); - break; - - case DDERR_INVALIDCAPS: - strcpy( errorString, "DDERR_INVALIDCAPS" ); - break; - - case DDERR_INVALIDCLIPLIST: - strcpy( errorString, "DDERR_INVALIDCLIPLIST" ); - break; - - case DDERR_INVALIDMODE: - strcpy( errorString, "DDERR_INVALIDMODE" ); - break; - - case DDERR_INVALIDOBJECT: - strcpy( errorString, "DDERR_INVALIDOBJECT" ); - break; - - case DDERR_INVALIDPARAMS: - strcpy( errorString, "DDERR_INVALIDPARAMS" ); - break; - - case DDERR_INVALIDPIXELFORMAT: - strcpy( errorString, "DDERR_INVALIDPIXELFORMAT" ); - break; - - case DDERR_INVALIDRECT: - strcpy( errorString, "DDERR_INVALIDRECT" ); - break; - - case DDERR_LOCKEDSURFACES: - strcpy( errorString, "DDERR_LOCKEDSURFACES" ); - break; - - case DDERR_NO3D: - strcpy( errorString, "DDERR_NO3D" ); - break; - - case DDERR_NOALPHAHW: - strcpy( errorString, "DDERR_NOALPHAHW" ); - break; - - case DDERR_NOCLIPLIST: - strcpy( errorString, "DDERR_NOCLIPLIST" ); - break; - - case DDERR_NOCOLORCONVHW: - strcpy( errorString, "DDERR_NOCOLORCONVHW" ); - break; - - case DDERR_NOCOOPERATIVELEVELSET: - strcpy( errorString, "DDERR_NOCOOPERATIVELEVELSET" ); - break; - - case DDERR_NOCOLORKEY: - strcpy( errorString, "DDERR_NOCOLORKEY" ); - break; - - case DDERR_NOCOLORKEYHW: - strcpy( errorString, "DDERR_NOCOLORKEYHW" ); - break; - - case DDERR_NODIRECTDRAWSUPPORT: - strcpy( errorString, "DDERR_NODIRECTDRAWSUPPORT" ); - break; - - case DDERR_NOEXCLUSIVEMODE: - strcpy( errorString, "DDERR_NOEXCLUSIVEMODE" ); - break; - - case DDERR_NOFLIPHW: - strcpy( errorString, "DDERR_NOFLIPHW" ); - break; - - case DDERR_NOGDI: - strcpy( errorString, "DDERR_NOGDI" ); - break; - - case DDERR_NOMIRRORHW: - strcpy( errorString, "DDERR_NOMIRRORHW" ); - break; - - case DDERR_NOTFOUND: - strcpy( errorString, "DDERR_NOTFOUND" ); - break; - - case DDERR_NOOVERLAYHW: - strcpy( errorString, "DDERR_NOOVERLAYHW" ); - break; - - case DDERR_OVERLAPPINGRECTS: - strcpy( errorString, "DDERR_OVERLAPPINGRECTS" ); - break; - - case DDERR_NORASTEROPHW: - strcpy( errorString, "DDERR_NORASTEROPHW" ); - break; - - case DDERR_NOROTATIONHW: - strcpy( errorString, "DDERR_NOROTATIONHW" ); - break; - - case DDERR_NOSTRETCHHW: - strcpy( errorString, "DDERR_NOSTRETCHHW" ); - break; - - case DDERR_NOT4BITCOLOR: - strcpy( errorString, "DDERR_NOT4BITCOLOR" ); - break; - - case DDERR_NOT4BITCOLORINDEX: - strcpy( errorString, "DDERR_NOT4BITCOLORINDEX" ); - break; - - case DDERR_NOT8BITCOLOR: - strcpy( errorString, "DDERR_NOT8BITCOLOR" ); - break; - - case DDERR_NOTEXTUREHW: - strcpy( errorString, "DDERR_NOTEXTUREHW" ); - break; - - case DDERR_NOVSYNCHW: - strcpy( errorString, "DDERR_NOVSYNCHW" ); - break; - - case DDERR_NOZBUFFERHW: - strcpy( errorString, "DDERR_NOZBUFFERHW" ); - break; - - case DDERR_NOZOVERLAYHW: - strcpy( errorString, "DDERR_NOZOVERLAYHW" ); - break; - - case DDERR_OUTOFCAPS: - strcpy( errorString, "DDERR_OUTOFCAPS" ); - break; - - case DDERR_OUTOFMEMORY: - strcpy( errorString, "DDERR_OUTOFMEMORY" ); - break; - - case DDERR_OUTOFVIDEOMEMORY: - strcpy( errorString, "DDERR_OUTOFVIDEOMEMORY" ); - break; - - case DDERR_OVERLAYCANTCLIP: - strcpy( errorString, "DDERR_OVERLAYCANTCLIP" ); - break; - - case DDERR_OVERLAYCOLORKEYONLYONEACTIVE: - strcpy( errorString, "DDERR_OVERLAYCOLORKEYONLYONEACTIVE" ); - break; - - case DDERR_PALETTEBUSY: - strcpy( errorString, "DDERR_PALETTEBUSY" ); - break; - - case DDERR_COLORKEYNOTSET: - strcpy( errorString, "DDERR_COLORKEYNOTSET" ); - break; - - case DDERR_SURFACEALREADYATTACHED: - strcpy( errorString, "DDERR_SURFACEALREADYATTACHED" ); - break; - - case DDERR_SURFACEALREADYDEPENDENT: - strcpy( errorString, "DDERR_SURFACEALREADYDEPENDENT" ); - break; - - case DDERR_SURFACEBUSY: - strcpy( errorString, "DDERR_SURFACEBUSY" ); - break; - - case DDERR_CANTLOCKSURFACE: - strcpy( errorString, "DDERR_CANTLOCKSURFACE" ); - break; - - case DDERR_SURFACEISOBSCURED: - strcpy( errorString, "DDERR_SURFACEISOBSCURED" ); - break; - - case DDERR_SURFACELOST: - strcpy( errorString, "DDERR_SURFACELOST" ); - break; - - case DDERR_SURFACENOTATTACHED: - strcpy( errorString, "DDERR_SURFACENOTATTACHED" ); - break; - - case DDERR_TOOBIGHEIGHT: - strcpy( errorString, "DDERR_TOOBIGHEIGHT" ); - break; - - case DDERR_TOOBIGSIZE: - strcpy( errorString, "DDERR_TOOBIGSIZE" ); - break; - - case DDERR_TOOBIGWIDTH: - strcpy( errorString, "DDERR_TOOBIGWIDTH" ); - break; - - case DDERR_UNSUPPORTED: - strcpy( errorString, "DDERR_UNSUPPORTED" ); - break; - - case DDERR_UNSUPPORTEDFORMAT: - strcpy( errorString, "DDERR_UNSUPPORTEDFORMAT" ); - break; - - case DDERR_UNSUPPORTEDMASK: - strcpy( errorString, "DDERR_UNSUPPORTEDMASK" ); - break; - - case DDERR_INVALIDSTREAM: - strcpy( errorString, "DDERR_INVALIDSTREAM" ); - break; - - case DDERR_VERTICALBLANKINPROGRESS: - strcpy( errorString, "DDERR_VERTICALBLANKINPROGRESS" ); - break; - - case DDERR_WASSTILLDRAWING: - strcpy( errorString, "DDERR_WASSTILLDRAWING" ); - break; - - case DDERR_XALIGN: - strcpy( errorString, "DDERR_XALIGN" ); - break; - - case DDERR_INVALIDDIRECTDRAWGUID: - strcpy( errorString, "DDERR_INVALIDDIRECTDRAWGUID" ); - break; - - case DDERR_DIRECTDRAWALREADYCREATED: - strcpy( errorString, "DDERR_DIRECTDRAWALREADYCREATED" ); - break; - - case DDERR_NODIRECTDRAWHW: - strcpy( errorString, "DDERR_NODIRECTDRAWHW" ); - break; - - case DDERR_PRIMARYSURFACEALREADYEXISTS: - strcpy( errorString, "DDERR_PRIMARYSURFACEALREADYEXISTS" ); - break; - - case DDERR_NOEMULATION: - strcpy( errorString, "DDERR_NOEMULATION" ); - break; - - case DDERR_REGIONTOOSMALL: - strcpy( errorString, "DDERR_REGIONTOOSMALL" ); - break; - - case DDERR_CLIPPERISUSINGHWND: - strcpy( errorString, "DDERR_CLIPPERISUSINGHWND" ); - break; - - case DDERR_NOCLIPPERATTACHED: - strcpy( errorString, "DDERR_NOCLIPPERATTACHED" ); - break; - - case DDERR_NOHWND: - strcpy( errorString, "DDERR_NOHWND" ); - break; - - case DDERR_HWNDSUBCLASSED: - strcpy( errorString, "DDERR_HWNDSUBCLASSED" ); - break; - - case DDERR_HWNDALREADYSET: - strcpy( errorString, "DDERR_HWNDALREADYSET" ); - break; - - case DDERR_NOPALETTEATTACHED: - strcpy( errorString, "DDERR_NOPALETTEATTACHED" ); - break; - - case DDERR_NOPALETTEHW: - strcpy( errorString, "DDERR_NOPALETTEHW" ); - break; - - case DDERR_BLTFASTCANTCLIP: - strcpy( errorString, "DDERR_BLTFASTCANTCLIP" ); - break; - - case DDERR_NOBLTHW: - strcpy( errorString, "DDERR_NOBLTHW" ); - break; - - case DDERR_NODDROPSHW: - strcpy( errorString, "DDERR_NODDROPSHW" ); - break; - - case DDERR_OVERLAYNOTVISIBLE: - strcpy( errorString, "DDERR_OVERLAYNOTVISIBLE" ); - break; - - case DDERR_NOOVERLAYDEST: - strcpy( errorString, "DDERR_NOOVERLAYDEST" ); - break; - - case DDERR_INVALIDPOSITION: - strcpy( errorString, "DDERR_INVALIDPOSITION" ); - break; - - case DDERR_NOTAOVERLAYSURFACE: - strcpy( errorString, "DDERR_NOTAOVERLAYSURFACE" ); - break; - - case DDERR_EXCLUSIVEMODEALREADYSET: - strcpy( errorString, "DDERR_EXCLUSIVEMODEALREADYSET" ); - break; - - case DDERR_NOTFLIPPABLE: - strcpy( errorString, "DDERR_NOTFLIPPABLE" ); - break; - - case DDERR_CANTDUPLICATE: - strcpy( errorString, "DDERR_CANTDUPLICATE" ); - break; - - case DDERR_NOTLOCKED: - strcpy( errorString, "DDERR_NOTLOCKED" ); - break; - - case DDERR_CANTCREATEDC: - strcpy( errorString, "DDERR_CANTCREATEDC" ); - break; - - case DDERR_NODC: - strcpy( errorString, "DDERR_NODC" ); - break; - - case DDERR_WRONGMODE: - strcpy( errorString, "DDERR_WRONGMODE" ); - break; - - case DDERR_IMPLICITLYCREATED: - strcpy( errorString, "DDERR_IMPLICITLYCREATED" ); - break; - - case DDERR_NOTPALETTIZED: - strcpy( errorString, "DDERR_NOTPALETTIZED" ); - break; - - case DDERR_UNSUPPORTEDMODE: - strcpy( errorString, "DDERR_UNSUPPORTEDMODE" ); - break; - - case DDERR_NOMIPMAPHW: - strcpy( errorString, "DDERR_NOMIPMAPHW" ); - break; - - case DDERR_INVALIDSURFACETYPE: - strcpy( errorString, "DDERR_INVALIDSURFACETYPE" ); - break; - - case DDERR_NOOPTIMIZEHW: - strcpy( errorString, "DDERR_NOOPTIMIZEHW" ); - break; - - case DDERR_NOTLOADED: - strcpy( errorString, "DDERR_NOTLOADED" ); - break; - - case DDERR_NOFOCUSWINDOW: - strcpy( errorString, "DDERR_NOFOCUSWINDOW" ); - break; - - case DDERR_DCALREADYCREATED: - strcpy( errorString, "DDERR_DCALREADYCREATED" ); - break; - - case DDERR_NONONLOCALVIDMEM: - strcpy( errorString, "DDERR_NONONLOCALVIDMEM" ); - break; - - case DDERR_CANTPAGELOCK: - strcpy( errorString, "DDERR_CANTPAGELOCK" ); - break; - - case DDERR_CANTPAGEUNLOCK: - strcpy( errorString, "DDERR_CANTPAGEUNLOCK" ); - break; - - case DDERR_NOTPAGELOCKED: - strcpy( errorString, "DDERR_NOTPAGELOCKED" ); - break; - - case DDERR_MOREDATA: - strcpy( errorString, "DDERR_MOREDATA" ); - break; - - case DDERR_EXPIRED: - strcpy( errorString, "DDERR_EXPIRED" ); - break; - - case DDERR_VIDEONOTACTIVE: - strcpy( errorString, "DDERR_VIDEONOTACTIVE" ); - break; - - case DDERR_DEVICEDOESNTOWNSURFACE: - strcpy( errorString, "DDERR_DEVICEDOESNTOWNSURFACE" ); - break; - - case DDERR_NOTINITIALIZED: - strcpy( errorString, "DDERR_NOTINITIALIZED" ); - break; - - default: - strcpy( errorString, "" ); - break; - } - - return &errorString[0]; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3Dvbrender.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3Dvbrender.c deleted file mode 100644 index 09857f1dc8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/D3Dvbrender.c +++ /dev/null @@ -1,2149 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#include -#include "clip.h" -#include "context.h" -#include "light.h" -#include "lines.h" -#include "macros.h" -#include "matrix.h" -#include "pb.h" -#include "points.h" -#include "mtypes.h" -#include "vb.h" -#include "vbrender.h" -#include "xform.h" -#include "D3DMesa.h" - -static void SetRenderStates( GLcontext *ctx ); -static void DebugRenderStates( GLcontext *ctx, BOOL bForce ); - -static void RenderPointsVB( GLcontext *ctx, GLuint start, GLuint end ); -static void RenderTriangleVB( GLcontext *ctx, GLuint start, GLuint end ); -static void RenderTriangleFanVB( GLcontext *ctx, GLuint start, GLuint end ); -static void RenderTriangleStripVB( GLcontext *ctx, GLuint start, GLuint end ); -static void RenderQuadVB( GLcontext *ctx, GLuint start, GLuint end ); -static void RenderQuad( GLcontext *ctx, GLuint v1, GLuint v2, GLuint v3, GLuint v4, GLuint pv ); -void RenderOneTriangle( GLcontext *ctx, GLuint v1, GLuint v2, GLuint v3, GLuint pv ); -void RenderOneLine( GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv ); - -/* I went with a D3D vertex buffer that is 6 times that of the Mesa one */ -/* instead of having the D3D one flush when its full. This way Mesa will*/ -/* handle all the flushing. I need x6 as points can use 4 vertex each. */ -D3DTLVERTEX D3DTLVertices[ (VB_MAX*6) ]; -GLuint VList[VB_SIZE]; -/*===========================================================================*/ -/* Compute Z offsets for a polygon with plane defined by (A,B,C,D) */ -/* D is not needed. TODO: Currently we are calculating this but not using it.*/ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void OffsetPolygon( GLcontext *ctx, GLfloat a, GLfloat b, GLfloat c ) -{ - GLfloat ac, - bc, - m, - offset; - - DPF(( DBG_FUNC, "OffsetPolygon();" )); - - if ( (c < 0.001F) && (c > - 0.001F) ) - { - /* Prevents underflow problems. */ - ctx->PointZoffset = 0.0F; - ctx->LineZoffset = 0.0F; - ctx->PolygonZoffset = 0.0F; - } - else - { - ac = a / c; - bc = b / c; - if ( ac < 0.0F ) - ac = -ac; - if ( bc<0.0F ) - bc = -bc; - m = MAX2( ac, bc ); /* m = sqrt( ac*ac + bc*bc ); */ - - offset = (m * ctx->Polygon.OffsetFactor + ctx->Polygon.OffsetUnits); - ctx->PointZoffset = ctx->Polygon.OffsetPoint ? offset : 0.0F; - ctx->LineZoffset = ctx->Polygon.OffsetLine ? offset : 0.0F; - ctx->PolygonZoffset = ctx->Polygon.OffsetFill ? offset : 0.0F; - } - - DPF(( DBG_PRIM_INFO, "OffsetPolygon: %f", offset )); -} -/*===========================================================================*/ -/* Compute signed area of the n-sided polgyon specified by vertices */ -/* vb->Win[] and vertex list vlist[]. */ -/* A clockwise polygon will return a negative area. A counter-clockwise */ -/* polygon will return a positive area. I have changed this function to */ -/* actually calculate twice the area as its faster and still gives the sign. */ -/*===========================================================================*/ -/* RETURN: signed area of the polgon. */ -/*===========================================================================*/ -static GLfloat PolygonArea( const struct vertex_buffer *vb, GLuint n, const GLuint vlist[] ) -{ - GLfloat area; - GLuint i; - - DPF(( DBG_FUNC, "PolygonArea();" )); - -#define j0 vlist[i] -#define j1 vlist[(i+1)%n] -#define x0 vb->Win[j0][0] -#define y0 vb->Win[j0][1] -#define x1 vb->Win[j1][0] -#define y1 vb->Win[j1][1] - - /* area = sum of trapezoids */ - for( i = 0, area = 0.0; i < n; i++ ) - area += ((x0 - x1) * (y0 + y1)); /* Note: no divide by two here! */ - -#undef x0 -#undef y0 -#undef x1 -#undef y1 -#undef j1 -#undef j0 - - // TODO: I don't see the point or * 0.5 as we just want the sign... - return area; -} -/*===========================================================================*/ -/* Render a polygon that needs clipping on at least one vertex. The function*/ -/* will first clip the polygon to any user clipping planes then clip to the */ -/* viewing volume. The final polygon will be draw as single triangles that */ -/* first need minor proccessing (culling, offset, etc) before we draw the */ -/* polygon as a fan. NOTE: the fan is draw as single triangles as its not */ -/* formed sequentaly in the VB but is in the vlist[]. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void RenderClippedPolygon( GLcontext *ctx, GLuint n, GLuint vlist[] ) -{ - struct vertex_buffer *VB = ctx->VB; - GLfloat (*win)[3] = VB->Win, - *proj = ctx->ProjectionMatrix, - ex, ey, - fx, fy, c, - wInv; - GLuint index, - pv, - facing; - - DPF(( DBG_FUNC, "RenderClippedPolygon();" )); - - DPF(( DBG_PRIM_INFO, "RenderClippedtPolygon( %d )", n )); - - /* Which vertex dictates the color when flat shading. */ - pv = (ctx->Primitive==GL_POLYGON) ? vlist[0] : vlist[n-1]; - - /* Clipping may introduce new vertices. New vertices will be stored in */ - /* the vertex buffer arrays starting with location VB->Free. After we've*/ - /* rendered the polygon, these extra vertices can be overwritten. */ - VB->Free = VB_MAX; - - /* Clip against user clipping planes in eye coord space. */ - if ( ctx->Transform.AnyClip ) - { - n = gl_userclip_polygon( ctx, n, vlist ); - if ( n < 3 ) - return; - - /* Transform vertices from eye to clip coordinates: clip = Proj * eye */ - for( index = 0; index < n; index++ ) - { - TRANSFORM_POINT( VB->Clip[vlist[index]], proj, VB->Eye[vlist[index]] ); - } - } - - /* Clip against view volume in clip coord space */ - n = gl_viewclip_polygon( ctx, n, vlist ); - if ( n < 3 ) - return; - - /* Transform new vertices from clip to ndc to window coords. */ - /* ndc = clip / W window = viewport_mapping(ndc) */ - /* Note that window Z values are scaled to the range of integer */ - /* depth buffer values. */ - - /* Only need to compute window coords for new vertices */ - for( index = VB_MAX; index < VB->Free; index++ ) - { - if ( VB->Clip[index][3] != 0.0F ) - { - wInv = 1.0F / VB->Clip[index][3]; - - win[index][0] = VB->Clip[index][0] * wInv * ctx->Viewport.Sx + ctx->Viewport.Tx; - win[index][1] = VB->Clip[index][1] * wInv * ctx->Viewport.Sy + ctx->Viewport.Ty; - win[index][2] = VB->Clip[index][2] * wInv * ctx->Viewport.Sz + ctx->Viewport.Tz; - } - else - { - /* Can't divide by zero, so... */ - win[index][0] = win[index][1] = win[index][2] = 0.0F; - } - } - - /* Draw filled polygon as a triangle fan */ - for( index = 2; index < n; index++ ) - { - /* Compute orientation of triangle */ - ex = win[vlist[index-1]][0] - win[vlist[0]][0]; - ey = win[vlist[index-1]][1] - win[vlist[0]][1]; - fx = win[vlist[index]][0] - win[vlist[0]][0]; - fy = win[vlist[index]][1] - win[vlist[0]][1]; - c = (ex * fy) - (ey * fx); - - /* polygon is perpindicular to view plane, don't draw it */ - if ( (c == 0.0F) && !ctx->Polygon.Unfilled ) - continue; - - /* Backface culling. */ - facing = (c < 0.0F) ^ ctx->Polygon.FrontBit; - if ( (facing + 1) & ctx->Polygon.CullBits ) - continue; - - if ( ctx->IndirectTriangles & DD_TRI_LIGHT_TWOSIDE ) - { - if ( facing == 1 ) - { - /* use back color */ - VB->Color = VB->Bcolor; - VB->Specular= VB->Bspec; - } - else - { - /* use front color */ - VB->Color = VB->Fcolor; - VB->Specular= VB->Fspec; - } - } - - if ( ctx->IndirectTriangles & DD_TRI_OFFSET ) - { - /* finish computing plane equation of polygon, compute offset */ - GLfloat fz = win[vlist[index]][2] - win[vlist[0]][2]; - GLfloat ez = win[vlist[index-1]][2] - win[vlist[0]][2]; - GLfloat a = (ey * fz) - (ez * fy); - GLfloat b = (ez * fx) - (ex * fz); - OffsetPolygon( ctx, a, b, c ); - } - RenderOneTriangle( ctx, vlist[0], vlist[index-1], vlist[index], pv ); - } -} -/*===========================================================================*/ -/* This function gets called when either the vertex buffer is full or glEnd */ -/* has been called. If the we aren't in rendering mode (FEEDBACK) then I */ -/* pass the vertex buffer back to Mesa to deal with by returning FALSE. */ -/* If I can render the primitive types in the buffer directly then I will */ -/* return TRUE after I render the vertex buffer and reset the vertex buffer. */ -/* */ -/* TODO: I don't handle the special case of when the vertex buffer is full */ -/* and we have a primitive that bounds this buffer and the next one to */ -/* come. I'm not sure right now if Mesa handles this for me... */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -GLboolean RenderVertexBuffer( GLcontext *ctx, GLboolean allDone ) -{ - struct vertex_buffer *VB = ctx->VB; - GLuint index, - vlist[VB_SIZE]; - - DPF(( DBG_FUNC, "RenderVertexBuffer();" )); - - /* We only need to hook actual tri's that need rendering. */ - if ( ctx->RenderMode != GL_RENDER ) - { - // (ctx->Visual->AccumBits > 0) ) - // (ctx->Visual->StencilBits > 0) ) - DPF(( DBG_PRIM_INFO, "Passing VB back to Mesa" )); - return FALSE; - } - - /* I'm going to set the states here so that all functions will */ - /* be assured to have the right states. If Mesa's vertex bufefr */ - /* function calls one of my primitive functions (TRI,POINT,LINE) */ - /* it will need the right states. So instead of doing it in the */ - /* primitive function I will always do it here at risk of some */ - /* slow down to some cases... */ - SetRenderStates( ctx ); - - switch( ctx->Primitive ) - { - case GL_POINTS: - DPF(( DBG_PRIM_INFO, "GL_POINTS( %d )", VB->Count )); - RenderPointsVB( ctx, 0, VB->Count ); - break; - - case GL_LINES: - case GL_LINE_STRIP: - case GL_LINE_LOOP: - /* Not supported functions yet so pass back that we failed to */ - /* render the vertex buffer and Mesa will have to do it. */ - DPF(( DBG_PRIM_INFO, "GL_LINE_?( %d )", VB->Count )); - return FALSE; - - case GL_TRIANGLES: - if ( VB->Count < 3 ) - { - DPF(( DBG_PRIM_WARN, "GL_TRIANGLES( %d )", VB->Count )); - return FALSE; - } - - DPF(( DBG_PRIM_INFO, "GL_TRIANGLES( %d )", VB->Count )); - RenderTriangleVB( ctx, 0, VB->Count ); - break; - - case GL_TRIANGLE_STRIP: - if ( VB->Count < 3 ) - { - DPF(( DBG_PRIM_WARN, "GL_TRIANGLE_STRIP( %d )", VB->Count )); - return FALSE; - } - - DPF(( DBG_PRIM_INFO, "GL_TRIANGLE_STRIP( %d )", VB->Count )); - RenderTriangleStripVB( ctx, 0, VB->Count ); - break; - - case GL_TRIANGLE_FAN: - if ( VB->Count < 3 ) - { - DPF(( DBG_PRIM_WARN, "GL_TRIANGLE_FAN( %d )", VB->Count )); - return FALSE; - } - - DPF(( DBG_PRIM_INFO, "GL_TRIANGLE_FAN( %d )", VB->Count )); - RenderTriangleFanVB( ctx, 0, VB->Count ); - break; - - case GL_QUADS: - if ( VB->Count < 4 ) - { - DPF(( DBG_PRIM_WARN, "GL_QUADS( %d )", VB->Count )); - return FALSE; - } - - DPF(( DBG_PRIM_INFO, "GL_QUADS( %d )", VB->Count )); - RenderQuadVB( ctx, 0, VB->Count ); - break; - - case GL_QUAD_STRIP: - if ( VB->Count < 4 ) - { - DPF(( DBG_PRIM_WARN, "GL_QUAD_STRIP( %d )", VB->Count )); - return FALSE; - } - - DPF(( DBG_PRIM_INFO, "GL_QUAD_STRIP( %d )", VB->Count )); - - if ( VB->ClipOrMask ) - { - for( index = 3; index < VB->Count; index += 2 ) - { - if ( VB->ClipMask[index-3] & VB->ClipMask[index-2] & VB->ClipMask[index-1] & VB->ClipMask[index] & CLIP_ALL_BITS ) - { - /* All points clipped by common plane */ - DPF(( DBG_PRIM_WARN, "GL_QUAD_STRIP( %d )", VB->Count )); - continue; - } - else if ( VB->ClipMask[index-3] | VB->ClipMask[index-2] | VB->ClipMask[index-1] | VB->ClipMask[index] ) - { - vlist[0] = index - 3; - vlist[1] = index - 2; - vlist[2] = index; - vlist[3] = index - 1; - RenderClippedPolygon( ctx, 4, vlist ); - } - else - { - RenderQuad( ctx, (index-3), (index-2), index, (index-1), index ); - } - } - } - else - { - /* No clipping needed */ - for( index = 3; index < VB->Count; index += 2 ) - RenderQuad( ctx, (index-3), (index-2), index, (index-1), index ); - } - break; - - case GL_POLYGON: - if ( VB->Count < 3 ) - { - DPF(( DBG_PRIM_WARN, "GL_POLYGON( %d )", VB->Count )); - return FALSE; - } - - DPF(( DBG_PRIM_INFO, "GL_POLYGON( %d )", VB->Count )); - - /* All points clipped by common plane, draw nothing */ - if ( !(VB->ClipAndMask & CLIP_ALL_BITS) ) - RenderTriangleFanVB( ctx, 0, VB->Count ); - break; - - default: - /* should never get here */ - _mesa_problem( ctx, "invalid mode in gl_render_vb" ); - } - - DPF(( DBG_PRIM_INFO, "ResetVB" )); - - /* We return TRUE to indicate we rendered the VB. */ - gl_reset_vb( ctx, allDone ); - return TRUE; -} -/*===========================================================================*/ -/* This function will render the current vertex buffer as triangles. The */ -/* buffer has to be able to be rendered directly. This means that we are */ -/* filled, no offsets, no culling and one sided rendering. Also we must be */ -/* in render mode of course. */ -/* First I will fill the global D3D vertice buffer. Next I will set all the*/ -/* states for D3D based on the current OGL state. Finally I pass the D3D VB */ -/* to the wrapper that call DrawPrimitives. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void RenderTriangleVB( GLcontext *ctx, GLuint start, GLuint end ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - struct vertex_buffer *VB = ctx->VB; - int index, - cVertex, - height = (pContext->pShared->rectW.bottom - pContext->pShared->rectW.top); - DWORD dwPVColor; - GLfloat ex, ey, - fx, fy, c; - GLuint facing; - - DPF(( DBG_FUNC, "RenderTriangleVB" )); - - if ( !VB->ClipOrMask ) - { - DPF(( DBG_PRIM_INFO, "DirectTriangles( %d )", (end-start) )); - for( index = start, cVertex = 0; index < end; ) - { - dwPVColor = (VB->Color[(index+2)][3]<<24) | (VB->Color[(index+2)][0]<<16) | (VB->Color[(index+2)][1]<<8) | VB->Color[(index+2)][2]; - - /*=====================================*/ - /* Populate the the triangle vertices. */ - /*=====================================*/ - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[index][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[index][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( VB->Win[index][2] ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[index][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[index][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[index][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[index][3]<<24) | (VB->Color[index][0]<<16) | (VB->Color[index][1]<<8) | VB->Color[index][2]; - index++; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[index][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[index][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( VB->Win[index][2] ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[index][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[index][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[index][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[index][3]<<24) | (VB->Color[index][0]<<16) | (VB->Color[index][1]<<8) | VB->Color[index][2]; - index++; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[index][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[index][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( VB->Win[index][2] ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[index][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[index][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[index][3]) ); - D3DTLVertices[cVertex++].color= dwPVColor; - index++; - } - } - else - { -#define v1 index -#define v2 (index+1) -#define v3 (index+2) - - for( index = start, cVertex = 0; index < end; index += 3 ) - { - if ( VB->ClipMask[v1] & VB->ClipMask[v2] & VB->ClipMask[v3] & CLIP_ALL_BITS ) - { - continue; - } - else if ( VB->ClipMask[v1] | VB->ClipMask[v2] | VB->ClipMask[v3] ) - { - VList[0] = v1; - VList[1] = v2; - VList[2] = v3; - RenderClippedPolygon( ctx, 3, VList ); - continue; - } - - /* Compute orientation of triangle */ - ex = VB->Win[v2][0] - VB->Win[v1][0]; - ey = VB->Win[v2][1] - VB->Win[v1][1]; - fx = VB->Win[v3][0] - VB->Win[v1][0]; - fy = VB->Win[v3][1] - VB->Win[v1][1]; - c = (ex * fy) - (ey * fx); - - /* polygon is perpindicular to view plane, don't draw it */ - if ( (c == 0.0F) && !ctx->Polygon.Unfilled ) - continue; - - /* Backface culling. */ - facing = (c < 0.0F) ^ ctx->Polygon.FrontBit; - if ( (facing + 1) & ctx->Polygon.CullBits ) - continue; - - if ( ctx->IndirectTriangles & DD_TRI_LIGHT_TWOSIDE ) - { - if ( facing == 1 ) - { - /* use back color */ - VB->Color = VB->Bcolor; - VB->Specular= VB->Bspec; - } - else - { - /* use front color */ - VB->Color = VB->Fcolor; - VB->Specular= VB->Fspec; - } - } - - if ( ctx->IndirectTriangles & DD_TRI_OFFSET ) - { - /* Finish computing plane equation of polygon, compute offset */ - GLfloat fz = VB->Win[v3][2] - VB->Win[v1][2]; - GLfloat ez = VB->Win[v2][2] - VB->Win[v1][2]; - GLfloat a = (ey * fz) - (ez * fy); - GLfloat b = (ez * fx) - (ex * fz); - OffsetPolygon( ctx, a, b, c ); - } - - /*=====================================*/ - /* Populate the the triangle vertices. */ - /*=====================================*/ - /* Solve the prevoking vertex color as we need it for the 3rd triangle and flat shading. */ - dwPVColor = (VB->Color[v3][3]<<24) | (VB->Color[v3][0]<<16) | (VB->Color[v3][1]<<8) | VB->Color[v3][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v1][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v1][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( (VB->Win[v1][2] + ctx->PolygonZoffset) ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v1][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v1][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v1][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v1][3]<<24) | (VB->Color[v1][0]<<16) | (VB->Color[v1][1]<<8) | VB->Color[v1][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v2][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v2][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( (VB->Win[v2][2] + ctx->PolygonZoffset) ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v2][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v2][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v2][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v2][3]<<24) | (VB->Color[v2][0]<<16) | (VB->Color[v2][1]<<8) | VB->Color[v2][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v3][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v3][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( (VB->Win[v3][2] + ctx->PolygonZoffset) ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v3][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v3][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v3][3]) ); - D3DTLVertices[cVertex++].color= dwPVColor; - } -#undef v1 -#undef v2 -#undef v3 - } - - /* Render the converted vertex buffer. */ - if ( cVertex > 2 ) - DrawPrimitiveHAL( pContext->pShared, D3DPT_TRIANGLELIST, &D3DTLVertices[0], cVertex ); -} -/*===========================================================================*/ -/* This function will render the current vertex buffer as a triangle fan. */ -/* The buffer has to be able to be rendered directly. This means that we are*/ -/* filled, no offsets, no culling and one sided rendering. Also we must be */ -/* in render mode of course. */ -/* First I will fill the global D3D vertice buffer. Next I will set all the*/ -/* states for D3D based on the current OGL state. Finally I pass the D3D VB */ -/* to the wrapper that call DrawPrimitives. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void RenderTriangleFanVB( GLcontext *ctx, GLuint start, GLuint end ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - struct vertex_buffer *VB = ctx->VB; - int index, - cVertex, - height = (pContext->pShared->rectW.bottom - pContext->pShared->rectW.top); - GLfloat ex, ey, - fx, fy, c; - GLuint facing; - DWORD dwPVColor; - - DPF(( DBG_FUNC, "RenderTriangleFanVB();" )); - - /* Special case that we can blast the fan without culling, offset, etc... */ - if ( !VB->ClipOrMask && (ctx->Light.ShadeModel != GL_FLAT) ) - { - DPF(( DBG_PRIM_INFO, "DirectTriangles( %d )", (end-start) )); - - /* Seed the the fan. */ - D3DTLVertices[0].sx = D3DVAL( VB->Win[start][0] ); - D3DTLVertices[0].sy = D3DVAL( (height - VB->Win[start][1]) ); - D3DTLVertices[0].sz = D3DVAL( VB->Win[start][2] ); - D3DTLVertices[0].tu = D3DVAL( VB->TexCoord[start][0] ); - D3DTLVertices[0].tv = D3DVAL( VB->TexCoord[start][1] ); - D3DTLVertices[0].rhw = D3DVAL( (1.0 / VB->Clip[start][3]) ); - D3DTLVertices[0].color= (VB->Color[start][3]<<24) | (VB->Color[start][0]<<16) | (VB->Color[start][1]<<8) | VB->Color[start][2]; - - /* Seed the the fan. */ - D3DTLVertices[1].sx = D3DVAL( VB->Win[(start+1)][0] ); - D3DTLVertices[1].sy = D3DVAL( (height - VB->Win[(start+1)][1]) ); - D3DTLVertices[1].sz = D3DVAL( VB->Win[(start+1)][2] ); - D3DTLVertices[1].tu = D3DVAL( VB->TexCoord[(start+1)][0] ); - D3DTLVertices[1].tv = D3DVAL( VB->TexCoord[(start+1)][1] ); - D3DTLVertices[1].rhw = D3DVAL( (1.0 / VB->Clip[(start+1)][3]) ); - D3DTLVertices[1].color= (VB->Color[(start+1)][3]<<24) | (VB->Color[(start+1)][0]<<16) | (VB->Color[(start+1)][1]<<8) | VB->Color[(start+1)][2]; - - for( index = (start+2), cVertex = 2; index < end; index++, cVertex++ ) - { - /*=================================*/ - /* Add the next vertex to the fan. */ - /*=================================*/ - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[index][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[index][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( VB->Win[index][2] ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[index][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[index][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[index][3]) ); - D3DTLVertices[cVertex].color = (VB->Color[index][3]<<24) | (VB->Color[index][0]<<16) | (VB->Color[index][1]<<8) | VB->Color[index][2]; - } - - /* Render the converted vertex buffer. */ - if ( cVertex ) - DrawPrimitiveHAL( pContext->pShared, D3DPT_TRIANGLEFAN, &D3DTLVertices[0], cVertex ); - } - else - { -#define v1 start -#define v2 (index-1) -#define v3 index - - for( index = (start+2), cVertex = 0; index < end; index++ ) - { - if ( VB->ClipOrMask ) - { - /* All points clipped by common plane */ - if ( VB->ClipMask[v1] & VB->ClipMask[v2] & VB->ClipMask[v3] & CLIP_ALL_BITS ) - { - continue; - } - else if ( VB->ClipMask[v1] | VB->ClipMask[v2] | VB->ClipMask[v3] ) - { - VList[0] = v1; - VList[1] = v2; - VList[2] = v3; - RenderClippedPolygon( ctx, 3, VList ); - continue; - } - } - - /* Compute orientation of triangle */ - ex = VB->Win[v2][0] - VB->Win[v1][0]; - ey = VB->Win[v2][1] - VB->Win[v1][1]; - fx = VB->Win[v3][0] - VB->Win[v1][0]; - fy = VB->Win[v3][1] - VB->Win[v1][1]; - c = (ex * fy) - (ey * fx); - - /* polygon is perpindicular to view plane, don't draw it */ - if ( (c == 0.0F) && !ctx->Polygon.Unfilled ) - continue; - - /* Backface culling. */ - facing = (c < 0.0F) ^ ctx->Polygon.FrontBit; - if ( (facing + 1) & ctx->Polygon.CullBits ) - continue; - - if ( ctx->IndirectTriangles & DD_TRI_OFFSET ) - { - /* Finish computing plane equation of polygon, compute offset */ - GLfloat fz = VB->Win[v3][2] - VB->Win[v1][2]; - GLfloat ez = VB->Win[v2][2] - VB->Win[v1][2]; - GLfloat a = (ey * fz) - (ez * fy); - GLfloat b = (ez * fx) - (ex * fz); - OffsetPolygon( ctx, a, b, c ); - } - - /*=====================================*/ - /* Populate the the triangle vertices. */ - /*=====================================*/ - dwPVColor = (VB->Color[v3][3]<<24) | (VB->Color[v3][0]<<16) | (VB->Color[v3][1]<<8) | VB->Color[v3][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v1][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v1][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( (VB->Win[v1][2] + ctx->PolygonZoffset) ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v1][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v1][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v1][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? dwPVColor : - (VB->Color[v1][3]<<24) | (VB->Color[v1][0]<<16) | (VB->Color[v1][1]<<8) | VB->Color[v1][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v2][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v2][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( (VB->Win[v2][2] + ctx->PolygonZoffset) ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v2][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v2][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v2][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? dwPVColor : - (VB->Color[v2][3]<<24) | (VB->Color[v2][0]<<16) | (VB->Color[v2][1]<<8) | VB->Color[v2][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v3][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v3][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( (VB->Win[v3][2] + ctx->PolygonZoffset) ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v3][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v3][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v3][3]) ); - D3DTLVertices[cVertex++].color= dwPVColor; - } - - /* Render the converted vertex buffer. */ - if ( cVertex ) - DrawPrimitiveHAL( pContext->pShared, D3DPT_TRIANGLELIST, &D3DTLVertices[0], cVertex ); -#undef v1 -#undef v2 -#undef v3 - } -} -/*===========================================================================*/ -/* This function will render the current vertex buffer as a triangle strip. */ -/* The buffer has to be able to be rendered directly. This means that we are*/ -/* filled, no offsets, no culling and one sided rendering. Also we must be */ -/* in render mode of course. */ -/* First I will fill the global D3D vertice buffer. Next I will set all the*/ -/* states for D3D based on the current OGL state. Finally I pass the D3D VB */ -/* to the wrapper that call DrawPrimitives. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void RenderTriangleStripVB( GLcontext *ctx, GLuint start, GLuint end ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - struct vertex_buffer *VB = ctx->VB; - int index, - cVertex = 0, - v1, v2, v3, - height = (pContext->pShared->rectW.bottom - pContext->pShared->rectW.top); - GLfloat ex, ey, - fx, fy, c; - GLuint facing; - DWORD dwPVColor; - - DPF(( DBG_FUNC, "RenderTriangleStripVB();" )); - - /* Special case that we can blast the fan without culling, offset, etc... */ - if ( !VB->ClipOrMask && (ctx->Light.ShadeModel != GL_FLAT) ) - { - DPF(( DBG_PRIM_PROFILE, "DirectTriangles" )); - - /* Seed the the strip. */ - D3DTLVertices[0].sx = D3DVAL( VB->Win[start][0] ); - D3DTLVertices[0].sy = D3DVAL( (height - VB->Win[start][1]) ); - D3DTLVertices[0].sz = D3DVAL( VB->Win[start][2] ); - D3DTLVertices[0].tu = D3DVAL( VB->TexCoord[start][0] ); - D3DTLVertices[0].tv = D3DVAL( VB->TexCoord[start][1] ); - D3DTLVertices[0].rhw = D3DVAL( (1.0 / VB->Clip[start][3]) ); - D3DTLVertices[0].color= (VB->Color[start][3]<<24) | (VB->Color[start][0]<<16) | (VB->Color[start][1]<<8) | VB->Color[start][2]; - - /* Seed the the strip. */ - D3DTLVertices[1].sx = D3DVAL( VB->Win[(start+1)][0] ); - D3DTLVertices[1].sy = D3DVAL( (height - VB->Win[(start+1)][1]) ); - D3DTLVertices[1].sz = D3DVAL( VB->Win[(start+1)][2] ); - D3DTLVertices[1].tu = D3DVAL( VB->TexCoord[(start+1)][0] ); - D3DTLVertices[1].tv = D3DVAL( VB->TexCoord[(start+1)][1] ); - D3DTLVertices[1].rhw = D3DVAL( (1.0 / VB->Clip[(start+1)][3]) ); - D3DTLVertices[1].color= (VB->Color[(start+1)][3]<<24) | (VB->Color[(start+1)][0]<<16) | (VB->Color[(start+1)][1]<<8) | VB->Color[(start+1)][2]; - - for( index = (start+2), cVertex = 2; index < end; index++, cVertex++ ) - { - /*===================================*/ - /* Add the next vertex to the strip. */ - /*===================================*/ - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[index][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[index][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( VB->Win[index][2] ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[index][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[index][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[index][3]) ); - D3DTLVertices[cVertex].color = (VB->Color[index][3]<<24) | (VB->Color[index][0]<<16) | (VB->Color[index][1]<<8) | VB->Color[index][2]; - } - - /* Render the converted vertex buffer. */ - if ( cVertex ) - DrawPrimitiveHAL( pContext->pShared, D3DPT_TRIANGLESTRIP, &D3DTLVertices[0], cVertex ); - } - else - { - for( index = (start+2); index < end; index++ ) - { - /* We need to switch order so that winding won't be a problem. */ - if ( index & 1 ) - { - v1 = index - 1; - v2 = index - 2; - v3 = index - 0; - } - else - { - v1 = index - 2; - v2 = index - 1; - v3 = index - 0; - } - - /* All vertices clipped by common plane */ - if ( VB->ClipMask[v1] & VB->ClipMask[v2] & VB->ClipMask[v3] & CLIP_ALL_BITS ) - continue; - - /* Check if any vertices need clipping. */ - if ( VB->ClipMask[v1] | VB->ClipMask[v2] | VB->ClipMask[v3] ) - { - VList[0] = v1; - VList[1] = v2; - VList[2] = v3; - RenderClippedPolygon( ctx, 3, VList ); - } - else - { - /* Compute orientation of triangle */ - ex = VB->Win[v2][0] - VB->Win[v1][0]; - ey = VB->Win[v2][1] - VB->Win[v1][1]; - fx = VB->Win[v3][0] - VB->Win[v1][0]; - fy = VB->Win[v3][1] - VB->Win[v1][1]; - c = (ex * fy) - (ey * fx); - - /* Polygon is perpindicular to view plane, don't draw it */ - if ( (c == 0.0F) && !ctx->Polygon.Unfilled ) - continue; - - /* Backface culling. */ - facing = (c < 0.0F) ^ ctx->Polygon.FrontBit; - if ( (facing + 1) & ctx->Polygon.CullBits ) - continue; - - /* Need right color if we have two sided lighting. */ - if ( ctx->IndirectTriangles & DD_TRI_LIGHT_TWOSIDE ) - { - if ( facing == 1 ) - { - /* use back color */ - VB->Color = VB->Bcolor; - VB->Specular= VB->Bspec; - } - else - { - /* use front color */ - VB->Color = VB->Fcolor; - VB->Specular= VB->Fspec; - } - } - - if ( ctx->IndirectTriangles & DD_TRI_OFFSET ) - { - /* Finish computing plane equation of polygon, compute offset */ - GLfloat fz = VB->Win[v3][2] - VB->Win[v1][2]; - GLfloat ez = VB->Win[v2][2] - VB->Win[v1][2]; - GLfloat a = (ey * fz) - (ez * fy); - GLfloat b = (ez * fx) - (ex * fz); - OffsetPolygon( ctx, a, b, c ); - } - /*=====================================*/ - /* Populate the the triangle vertices. */ - /*=====================================*/ - - /* Solve the prevoking vertex color as we need it for the 3rd triangle and flat shading. */ - dwPVColor = (VB->Color[v3][3]<<24) | (VB->Color[v3][0]<<16) | (VB->Color[v3][1]<<8) | VB->Color[v3][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v1][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v1][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( (VB->Win[v1][2] + ctx->PolygonZoffset) ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v1][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v1][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v1][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v1][3]<<24) | (VB->Color[v1][0]<<16) | (VB->Color[v1][1]<<8) | VB->Color[v1][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v2][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v2][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( (VB->Win[v2][2] + ctx->PolygonZoffset) ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v2][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v2][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v2][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v2][3]<<24) | (VB->Color[v2][0]<<16) | (VB->Color[v2][1]<<8) | VB->Color[v2][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v3][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v3][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( (VB->Win[v3][2] + ctx->PolygonZoffset) ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v3][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v3][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v3][3]) ); - D3DTLVertices[cVertex++].color= dwPVColor; - } - } - - /* Render the converted vertex buffer. */ - if ( cVertex ) - DrawPrimitiveHAL( pContext->pShared, D3DPT_TRIANGLELIST, &D3DTLVertices[0], cVertex ); - } -} -/*===========================================================================*/ -/* This function will render the current vertex buffer as Quads. The buffer*/ -/* has to be able to be rendered directly. This means that we are filled, no*/ -/* offsets, no culling and one sided rendering. Also we must be in render */ -/* mode of cource. */ -/* First I will fill the global D3D vertice buffer. Next I will set all the*/ -/* states for D3D based on the current OGL state. Finally I pass the D3D VB */ -/* to the wrapper that call DrawPrimitives. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void RenderQuadVB( GLcontext *ctx, GLuint start, GLuint end ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - struct vertex_buffer *VB = ctx->VB; - int index, - cVertex, - height = (pContext->pShared->rectW.bottom - pContext->pShared->rectW.top); - DWORD dwPVColor; - GLfloat ex, ey, - fx, fy, c; - GLuint facing; /* 0=front, 1=back */ - - DPF(( DBG_FUNC, "RenderQuadVB();" )); - -#define v1 (index) -#define v2 (index+1) -#define v3 (index+2) -#define v4 (index+3) - - if ( !VB->ClipOrMask ) - { - DPF(( DBG_PRIM_PROFILE, "DirectTriangles" )); - - for( cVertex = 0, index = start; index < end; index += 4 ) - { - if ( ctx->Light.ShadeModel == GL_FLAT ) - dwPVColor = (VB->Color[v4][3]<<24) | (VB->Color[v4][0]<<16) | (VB->Color[v4][1]<<8) | VB->Color[v4][2]; - - /*=====================================*/ - /* Populate the the triangle vertices. */ - /*=====================================*/ - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v1][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v1][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( VB->Win[v1][2] ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v1][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v1][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v1][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v1][3]<<24) | (VB->Color[v1][0]<<16) | (VB->Color[v1][1]<<8) | VB->Color[v1][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v2][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v2][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( VB->Win[v2][2] ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v2][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v2][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v2][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v2][3]<<24) | (VB->Color[v2][0]<<16) | (VB->Color[v2][1]<<8) | VB->Color[v2][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v3][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v3][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( VB->Win[v3][2] ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v3][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v3][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v3][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v3][3]<<24) | (VB->Color[v3][0]<<16) | (VB->Color[v3][1]<<8) | VB->Color[v3][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v1][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v1][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( VB->Win[v1][2] ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v1][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v1][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v1][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v1][3]<<24) | (VB->Color[v1][0]<<16) | (VB->Color[v1][1]<<8) | VB->Color[v1][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v3][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v3][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( VB->Win[v3][2] ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v3][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v3][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v3][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v3][3]<<24) | (VB->Color[v3][0]<<16) | (VB->Color[v3][1]<<8) | VB->Color[v3][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v4][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v4][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( VB->Win[v4][2] ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v4][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v4][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v4][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v4][3]<<24) | (VB->Color[v4][0]<<16) | (VB->Color[v4][1]<<8) | VB->Color[v4][2]; - } - } - else - { - for( cVertex = 0, index = start; index < end; index += 4 ) - { - if ( VB->ClipMask[v1] & VB->ClipMask[v2] & VB->ClipMask[v3] & VB->ClipMask[v4] & CLIP_ALL_BITS ) - { - continue; - } - else if ( VB->ClipMask[v1] | VB->ClipMask[v2] | VB->ClipMask[v3] | VB->ClipMask[v4] ) - { - VList[0] = v1; - VList[1] = v2; - VList[2] = v3; - VList[3] = v4; - RenderClippedPolygon( ctx, 4, VList ); - continue; - } - - /* Compute orientation of triangle */ - ex = VB->Win[v2][0] - VB->Win[v1][0]; - ey = VB->Win[v2][1] - VB->Win[v1][1]; - fx = VB->Win[v3][0] - VB->Win[v1][0]; - fy = VB->Win[v3][1] - VB->Win[v1][1]; - c = (ex * fy) - (ey * fx); - - /* polygon is perpindicular to view plane, don't draw it */ - if ( (c == 0.0F) && !ctx->Polygon.Unfilled ) - continue; - - /* Backface culling. */ - facing = (c < 0.0F) ^ ctx->Polygon.FrontBit; - if ( (facing + 1) & ctx->Polygon.CullBits ) - continue; - - if ( ctx->IndirectTriangles & DD_TRI_LIGHT_TWOSIDE ) - { - if ( facing == 1 ) - { - /* use back color */ - VB->Color = VB->Bcolor; - VB->Specular= VB->Bspec; - } - else - { - /* use front color */ - VB->Color = VB->Fcolor; - VB->Specular= VB->Fspec; - } - } - - if ( ctx->IndirectTriangles & DD_TRI_OFFSET ) - { - /* Finish computing plane equation of polygon, compute offset */ - GLfloat fz = VB->Win[v3][2] - VB->Win[v1][2]; - GLfloat ez = VB->Win[v2][2] - VB->Win[v1][2]; - GLfloat a = (ey * fz) - (ez * fy); - GLfloat b = (ez * fx) - (ex * fz); - OffsetPolygon( ctx, a, b, c ); - } - - if ( ctx->Light.ShadeModel == GL_FLAT ) - dwPVColor = (VB->Color[v4][3]<<24) | (VB->Color[v4][0]<<16) | (VB->Color[v4][1]<<8) | VB->Color[v4][2]; - - /*=====================================*/ - /* Populate the the triangle vertices. */ - /*=====================================*/ - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v1][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v1][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( (VB->Win[v1][2] + ctx->PolygonZoffset) ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v1][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v1][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v1][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v1][3]<<24) | (VB->Color[v1][0]<<16) | (VB->Color[v1][1]<<8) | VB->Color[v1][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v2][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v2][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( (VB->Win[v2][2] + ctx->PolygonZoffset) ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v2][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v2][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v2][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v2][3]<<24) | (VB->Color[v2][0]<<16) | (VB->Color[v2][1]<<8) | VB->Color[v2][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v3][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v3][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( (VB->Win[v3][2] + ctx->PolygonZoffset) ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v3][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v3][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v3][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v3][3]<<24) | (VB->Color[v3][0]<<16) | (VB->Color[v3][1]<<8) | VB->Color[v3][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v1][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v1][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( (VB->Win[v1][2] + ctx->PolygonZoffset) ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v1][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v1][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v1][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v1][3]<<24) | (VB->Color[v1][0]<<16) | (VB->Color[v1][1]<<8) | VB->Color[v1][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v3][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v3][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( (VB->Win[v3][2] + ctx->PolygonZoffset) ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v3][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v3][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v3][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v3][3]<<24) | (VB->Color[v3][0]<<16) | (VB->Color[v3][1]<<8) | VB->Color[v3][2]; - - D3DTLVertices[cVertex].sx = D3DVAL( VB->Win[v4][0] ); - D3DTLVertices[cVertex].sy = D3DVAL( (height - VB->Win[v4][1]) ); - D3DTLVertices[cVertex].sz = D3DVAL( (VB->Win[v4][2] + ctx->PolygonZoffset) ); - D3DTLVertices[cVertex].tu = D3DVAL( VB->TexCoord[v4][0] ); - D3DTLVertices[cVertex].tv = D3DVAL( VB->TexCoord[v4][1] ); - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[v4][3]) ); - D3DTLVertices[cVertex++].color= (ctx->Light.ShadeModel == GL_FLAT) ? - dwPVColor : - (VB->Color[v4][3]<<24) | (VB->Color[v4][0]<<16) | (VB->Color[v4][1]<<8) | VB->Color[v4][2]; - } - } - -#undef v4 -#undef v3 -#undef v2 -#undef v1 - - /* Render the converted vertex buffer. */ - if ( cVertex ) - DrawPrimitiveHAL( pContext->pShared, D3DPT_TRIANGLELIST, &D3DTLVertices[0], cVertex ); -} -/*===========================================================================*/ -/* */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -static void RenderQuad( GLcontext *ctx, GLuint v1, GLuint v2, GLuint v3, GLuint v4, GLuint pv ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - struct vertex_buffer *VB = ctx->VB; - int height = (pContext->pShared->rectW.bottom - pContext->pShared->rectW.top); - DWORD dwPVColor; - GLfloat ex, ey, - fx, fy, c; - GLuint facing; /* 0=front, 1=back */ - static D3DTLVERTEX TLVertices[6]; - - DPF(( DBG_FUNC, "RenderQuad" )); - DPF(( DBG_PRIM_INFO, "RenderQuad( 1 )" )); - - /* Compute orientation of triangle */ - ex = VB->Win[v2][0] - VB->Win[v1][0]; - ey = VB->Win[v2][1] - VB->Win[v1][1]; - fx = VB->Win[v3][0] - VB->Win[v1][0]; - fy = VB->Win[v3][1] - VB->Win[v1][1]; - c = (ex * fy) - (ey * fx); - - /* polygon is perpindicular to view plane, don't draw it */ - if ( (c == 0.0F) && !ctx->Polygon.Unfilled ) - return; - - /* Backface culling. */ - facing = (c < 0.0F) ^ ctx->Polygon.FrontBit; - if ( (facing + 1) & ctx->Polygon.CullBits ) - return; - - if ( ctx->IndirectTriangles & DD_TRI_LIGHT_TWOSIDE ) - { - if ( facing == 1 ) - { - /* use back color */ - VB->Color = VB->Bcolor; - VB->Specular= VB->Bspec; - } - else - { - /* use front color */ - VB->Color = VB->Fcolor; - VB->Specular= VB->Fspec; - } - } - - if ( ctx->IndirectTriangles & DD_TRI_OFFSET ) - { - /* Finish computing plane equation of polygon, compute offset */ - GLfloat fz = VB->Win[v3][2] - VB->Win[v1][2]; - GLfloat ez = VB->Win[v2][2] - VB->Win[v1][2]; - GLfloat a = (ey * fz) - (ez * fy); - GLfloat b = (ez * fx) - (ex * fz); - OffsetPolygon( ctx, a, b, c ); - } - - if ( ctx->Light.ShadeModel == GL_FLAT ) - dwPVColor = (VB->Color[pv][3]<<24) | (VB->Color[pv][0]<<16) | (VB->Color[pv][1]<<8) | VB->Color[pv][2]; - - /*=====================================*/ - /* Populate the the triangle vertices. */ - /*=====================================*/ - TLVertices[0].sx = D3DVAL( VB->Win[v1][0] ); - TLVertices[0].sy = D3DVAL( (height - VB->Win[v1][1]) ); - TLVertices[0].sz = D3DVAL( (VB->Win[v1][2] + ctx->PolygonZoffset) ); - TLVertices[0].tu = D3DVAL( VB->TexCoord[v1][0] ); - TLVertices[0].tv = D3DVAL( VB->TexCoord[v1][1] ); - TLVertices[0].rhw = D3DVAL( (1.0 / VB->Clip[v1][3]) ); - TLVertices[0].color = (ctx->Light.ShadeModel == GL_FLAT) ? dwPVColor : - (VB->Color[v1][3]<<24) | (VB->Color[v1][0]<<16) | (VB->Color[v1][1]<<8) | VB->Color[v1][2]; - - TLVertices[1].sx = D3DVAL( VB->Win[v2][0] ); - TLVertices[1].sy = D3DVAL( (height - VB->Win[v2][1]) ); - TLVertices[1].sz = D3DVAL( (VB->Win[v2][2] + ctx->PolygonZoffset) ); - TLVertices[1].tu = D3DVAL( VB->TexCoord[v2][0] ); - TLVertices[1].tv = D3DVAL( VB->TexCoord[v2][1] ); - TLVertices[1].rhw = D3DVAL( (1.0 / VB->Clip[v2][3]) ); - TLVertices[1].color = (ctx->Light.ShadeModel == GL_FLAT) ? dwPVColor : - (VB->Color[v2][3]<<24) | (VB->Color[v2][0]<<16) | (VB->Color[v2][1]<<8) | VB->Color[v2][2]; - - TLVertices[2].sx = D3DVAL( VB->Win[v3][0] ); - TLVertices[2].sy = D3DVAL( (height - VB->Win[v3][1]) ); - TLVertices[2].sz = D3DVAL( (VB->Win[v3][2] + ctx->PolygonZoffset) ); - TLVertices[2].tu = D3DVAL( VB->TexCoord[v3][0] ); - TLVertices[2].tv = D3DVAL( VB->TexCoord[v3][1] ); - TLVertices[2].rhw = D3DVAL( (1.0 / VB->Clip[v3][3]) ); - TLVertices[2].color = (ctx->Light.ShadeModel == GL_FLAT) ? dwPVColor : - (VB->Color[v3][3]<<24) | (VB->Color[v3][0]<<16) | (VB->Color[v3][1]<<8) | VB->Color[v3][2]; - - TLVertices[3].sx = D3DVAL( VB->Win[v3][0] ); - TLVertices[3].sy = D3DVAL( (height - VB->Win[v3][1]) ); - TLVertices[3].sz = D3DVAL( (VB->Win[v3][2] + ctx->PolygonZoffset) ); - TLVertices[3].tu = D3DVAL( VB->TexCoord[v3][0] ); - TLVertices[3].tv = D3DVAL( VB->TexCoord[v3][1] ); - TLVertices[3].rhw = D3DVAL( (1.0 / VB->Clip[v3][3]) ); - TLVertices[3].color = (ctx->Light.ShadeModel == GL_FLAT) ? dwPVColor : - (VB->Color[v3][3]<<24) | (VB->Color[v3][0]<<16) | (VB->Color[v3][1]<<8) | VB->Color[v3][2]; - - TLVertices[4].sx = D3DVAL( VB->Win[v4][0] ); - TLVertices[4].sy = D3DVAL( (height - VB->Win[v4][1]) ); - TLVertices[4].sz = D3DVAL( (VB->Win[v4][2] + ctx->PolygonZoffset) ); - TLVertices[4].tu = D3DVAL( VB->TexCoord[v4][0] ); - TLVertices[4].tv = D3DVAL( VB->TexCoord[v4][1] ); - TLVertices[4].rhw = D3DVAL( (1.0 / VB->Clip[v4][3]) ); - TLVertices[4].color = (ctx->Light.ShadeModel == GL_FLAT) ? dwPVColor : - (VB->Color[v4][3]<<24) | (VB->Color[v4][0]<<16) | (VB->Color[v4][1]<<8) | VB->Color[v4][2]; - - TLVertices[5].sx = D3DVAL( VB->Win[v1][0] ); - TLVertices[5].sy = D3DVAL( (height - VB->Win[v1][1]) ); - TLVertices[5].sz = D3DVAL( (VB->Win[v1][2] + ctx->PolygonZoffset) ); - TLVertices[5].tu = D3DVAL( VB->TexCoord[v1][0] ); - TLVertices[5].tv = D3DVAL( VB->TexCoord[v1][1] ); - TLVertices[5].rhw = D3DVAL( (1.0 / VB->Clip[v1][3]) ); - TLVertices[5].color = (ctx->Light.ShadeModel == GL_FLAT) ? dwPVColor : - (VB->Color[v1][3]<<24) | (VB->Color[v1][0]<<16) | (VB->Color[v1][1]<<8) | VB->Color[v1][2]; - - /* Draw the two triangles. */ - DrawPrimitiveHAL( pContext->pShared, D3DPT_TRIANGLELIST, &TLVertices[0], 6 ); -} -/*===========================================================================*/ -/* */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -void RenderOneTriangle( GLcontext *ctx, GLuint v1, GLuint v2, GLuint v3, GLuint pv ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - struct vertex_buffer *VB = ctx->VB; - int height = (pContext->pShared->rectW.bottom - pContext->pShared->rectW.top); - DWORD dwPVColor; - static D3DTLVERTEX TLVertices[3]; - - DPF(( DBG_FUNC, "RenderOneTriangle" )); - DPF(( DBG_PRIM_INFO, "RenderTriangle( 1 )" )); - - /*=====================================*/ - /* Populate the the triangle vertices. */ - /*=====================================*/ - if ( ctx->Light.ShadeModel == GL_FLAT ) - dwPVColor = (VB->Color[pv][3]<<24) | (VB->Color[pv][0]<<16) | (VB->Color[pv][1]<<8) | VB->Color[pv][2]; - - TLVertices[0].sx = D3DVAL( VB->Win[v1][0] ); - TLVertices[0].sy = D3DVAL( (height - VB->Win[v1][1]) ); - TLVertices[0].sz = D3DVAL( (VB->Win[v1][2] + ctx->PolygonZoffset) ); - TLVertices[0].tu = D3DVAL( VB->TexCoord[v1][0] ); - TLVertices[0].tv = D3DVAL( VB->TexCoord[v1][1] ); - TLVertices[0].rhw = D3DVAL( (1.0 / VB->Clip[v1][3]) ); - TLVertices[0].color = (ctx->Light.ShadeModel == GL_FLAT) ? dwPVColor : - (VB->Color[v1][3]<<24) | (VB->Color[v1][0]<<16) | (VB->Color[v1][1]<<8) | VB->Color[v1][2]; - DPF(( DBG_PRIM_INFO, "V1 -> x:%f y:%f z:%f c:%x", - TLVertices[0].sx, - TLVertices[0].sy, - TLVertices[0].sz, - TLVertices[0].color )); - - TLVertices[1].sx = D3DVAL( VB->Win[v2][0] ); - TLVertices[1].sy = D3DVAL( (height - VB->Win[v2][1]) ); - TLVertices[1].sz = D3DVAL( (VB->Win[v2][2] + ctx->PolygonZoffset) ); - TLVertices[1].tu = D3DVAL( VB->TexCoord[v2][0] ); - TLVertices[1].tv = D3DVAL( VB->TexCoord[v2][1] ); - TLVertices[1].rhw = D3DVAL( (1.0 / VB->Clip[v2][3]) ); - TLVertices[1].color = (ctx->Light.ShadeModel == GL_FLAT) ? dwPVColor : - (VB->Color[v2][3]<<24) | (VB->Color[v2][0]<<16) | (VB->Color[v2][1]<<8) | VB->Color[v2][2]; - DPF(( DBG_PRIM_INFO, "V2 -> x:%f y:%f z:%f c:%x", - TLVertices[1].sx, - TLVertices[1].sy, - TLVertices[1].sz, - TLVertices[1].color )); - - TLVertices[2].sx = D3DVAL( VB->Win[v3][0] ); - TLVertices[2].sy = D3DVAL( (height - VB->Win[v3][1]) ); - TLVertices[2].sz = D3DVAL( (VB->Win[v3][2] + ctx->PolygonZoffset) ); - TLVertices[2].tu = D3DVAL( VB->TexCoord[v3][0] ); - TLVertices[2].tv = D3DVAL( VB->TexCoord[v3][1] ); - TLVertices[2].rhw = D3DVAL( (1.0 / VB->Clip[v3][3]) ); - TLVertices[2].color = (ctx->Light.ShadeModel == GL_FLAT) ? dwPVColor : - (VB->Color[v3][3]<<24) | (VB->Color[v3][0]<<16) | (VB->Color[v3][1]<<8) | VB->Color[v3][2]; - DPF(( DBG_PRIM_INFO, "V3 -> x:%f y:%f z:%f c:%x", - TLVertices[2].sx, - TLVertices[2].sy, - TLVertices[2].sz, - TLVertices[2].color )); - - /* Draw the triangle. */ - DrawPrimitiveHAL( pContext->pShared, D3DPT_TRIANGLELIST, &TLVertices[0], 3 ); -} -/*===========================================================================*/ -/* */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -void RenderOneLine( GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - struct vertex_buffer *VB = ctx->VB; - int height = (pContext->pShared->rectW.bottom - pContext->pShared->rectW.top); - DWORD dwPVColor; - static D3DTLVERTEX TLVertices[2]; - - DPF(( DBG_FUNC, "RenderOneLine" )); - DPF(( DBG_PRIM_INFO, "RenderLine( 1 )" )); - - if ( VB->MonoColor ) - dwPVColor = (pContext->aCurrent<<24) | (pContext->rCurrent<<16) | (pContext->gCurrent<<8) | pContext->bCurrent; - else - dwPVColor = (VB->Color[pv][3]<<24) | (VB->Color[pv][0]<<16) | (VB->Color[pv][1]<<8) | VB->Color[pv][2]; - - TLVertices[0].sx = D3DVAL( VB->Win[v1][0] ); - TLVertices[0].sy = D3DVAL( (height - VB->Win[v1][1]) ); - TLVertices[0].sz = D3DVAL( (VB->Win[v1][2] + ctx->LineZoffset) ); - TLVertices[0].tu = D3DVAL( VB->TexCoord[v1][0] ); - TLVertices[0].tv = D3DVAL( VB->TexCoord[v1][1] ); - TLVertices[0].rhw = D3DVAL( (1.0 / VB->Clip[v1][3]) ); - TLVertices[0].color = (ctx->Light.ShadeModel == GL_FLAT) ? dwPVColor : - (VB->Color[v1][3]<<24) | (VB->Color[v1][0]<<16) | (VB->Color[v1][1]<<8) | VB->Color[v1][2]; - - TLVertices[1].sx = D3DVAL( VB->Win[v2][0] ); - TLVertices[1].sy = D3DVAL( (height - VB->Win[v2][1]) ); - TLVertices[1].sz = D3DVAL( (VB->Win[v2][2] + ctx->LineZoffset) ); - TLVertices[1].tu = D3DVAL( VB->TexCoord[v2][0] ); - TLVertices[1].tv = D3DVAL( VB->TexCoord[v2][1] ); - TLVertices[1].rhw = D3DVAL( (1.0 / VB->Clip[v2][3]) ); - TLVertices[1].color = (ctx->Light.ShadeModel == GL_FLAT) ? dwPVColor : - (VB->Color[v2][3]<<24) | (VB->Color[v2][0]<<16) | (VB->Color[v2][1]<<8) | VB->Color[v2][2]; - - /* Draw line from (x0,y0) to (x1,y1) with current pixel color/index */ - DrawPrimitiveHAL( pContext->pShared, D3DPT_LINELIST, &TLVertices[0], 2 ); -} -/*===========================================================================*/ -/* This function was written to convert points into triangles. I did this */ -/* as all card accelerate triangles and most drivers do this anyway. In hind*/ -/* thought this might be a bad idea as some cards do better. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void RenderPointsVB( GLcontext *ctx, GLuint start, GLuint end ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - struct vertex_buffer *VB = ctx->VB; - struct pixel_buffer *PB = ctx->PB; - GLuint index; - GLfloat radius, z, - xmin, ymin, - xmax, ymax; - GLint cVertex, - height = (pContext->pShared->rectW.bottom - pContext->pShared->rectW.top); - DWORD dwPVColor; - - DPF(( DBG_FUNC, "RenderPointsVB();" )); - - radius = CLAMP( ctx->Point.Size, MIN_POINT_SIZE, MAX_POINT_SIZE ) * 0.5F; - - for( index = start, cVertex = 0; index <= end; index++ ) - { - if ( VB->ClipMask[index] == 0 ) - { - xmin = D3DVAL( VB->Win[index][0] - radius ); - xmax = D3DVAL( VB->Win[index][0] + radius ); - ymin = D3DVAL( height - VB->Win[index][1] - radius ); - ymax = D3DVAL( height - VB->Win[index][1] + radius ); - z = D3DVAL( (VB->Win[index][2] + ctx->PointZoffset) ); - - dwPVColor = (VB->Color[index][3]<<24) | - (VB->Color[index][0]<<16) | - (VB->Color[index][1]<<8) | - VB->Color[index][2]; - - D3DTLVertices[cVertex].sx = xmin; - D3DTLVertices[cVertex].sy = ymax; - D3DTLVertices[cVertex].sz = z; - D3DTLVertices[cVertex].tu = 0.0; - D3DTLVertices[cVertex].tv = 0.0; - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[index][3]) ); - D3DTLVertices[cVertex++].color = dwPVColor; - - D3DTLVertices[cVertex].sx = xmin; - D3DTLVertices[cVertex].sy = ymin; - D3DTLVertices[cVertex].sz = z; - D3DTLVertices[cVertex].tu = 0.0; - D3DTLVertices[cVertex].tv = 0.0; - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[index][3]) ); - D3DTLVertices[cVertex++].color = dwPVColor; - - D3DTLVertices[cVertex].sx = xmax; - D3DTLVertices[cVertex].sy = ymin; - D3DTLVertices[cVertex].sz = z; - D3DTLVertices[cVertex].tu = 0.0; - D3DTLVertices[cVertex].tv = 0.0; - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[index][3]) ); - D3DTLVertices[cVertex++].color = dwPVColor; - - D3DTLVertices[cVertex].sx = xmax; - D3DTLVertices[cVertex].sy = ymin; - D3DTLVertices[cVertex].sz = z; - D3DTLVertices[cVertex].tu = 0.0; - D3DTLVertices[cVertex].tv = 0.0; - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[index][3]) ); - D3DTLVertices[cVertex++].color = dwPVColor; - - D3DTLVertices[cVertex].sx = xmax; - D3DTLVertices[cVertex].sy = ymax; - D3DTLVertices[cVertex].sz = z; - D3DTLVertices[cVertex].tu = 0.0; - D3DTLVertices[cVertex].tv = 0.0; - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[index][3]) ); - D3DTLVertices[cVertex++].color = dwPVColor; - - D3DTLVertices[cVertex].sx = xmin; - D3DTLVertices[cVertex].sy = ymax; - D3DTLVertices[cVertex].sz = z; - D3DTLVertices[cVertex].tu = 0.0; - D3DTLVertices[cVertex].tv = 0.0; - D3DTLVertices[cVertex].rhw = D3DVAL( (1.0 / VB->Clip[index][3]) ); - D3DTLVertices[cVertex++].color = dwPVColor; - } - } - - /* Render the converted vertex buffer. */ - if ( cVertex ) - DrawPrimitiveHAL( pContext->pShared, D3DPT_TRIANGLELIST, &D3DTLVertices[0], cVertex ); -} -/*===========================================================================*/ -/* This gets call before we render any primitives so that the current OGL */ -/* states will be mapped the D3D context. I'm still not sure how D3D works */ -/* but I'm finding that it doesn't act like a state machine as OGL is. It */ -/* looks like the state gets set back to the defaults after a DrawPrimitives */ -/* or an EndScene. Also I set states that are the default even though this */ -/* is redundant as the defaults seem screwed up. */ -/* TODO: make a batch call. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void SetRenderStates( GLcontext *ctx ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - DWORD dwFunc; - static BOOL bTexture = FALSE; - static int texName = -1; - - DPF(( DBG_FUNC, "SetRenderStates();" )); - - if ( g_DBGMask & DBG_STATES ) - DebugRenderStates( ctx, FALSE ); - - SetStateHAL( pContext->pShared, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE ); - SetStateHAL( pContext->pShared, D3DRENDERSTATE_DITHERENABLE, (ctx->Color.DitherFlag) ? TRUE : FALSE ); - - /*================================================*/ - /* Check too see if there are new TEXTURE states. */ - /*================================================*/ - if ( ctx->Texture._EnabledUnits ) - { - switch( ctx->Texture.Set[ctx->Texture.CurrentSet].EnvMode ) - { - case GL_MODULATE: - if ( ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0][0]->Format == GL_RGBA ) - dwFunc = pContext->pShared->dwTexFunc[d3dtblend_modulatealpha]; - else - dwFunc = pContext->pShared->dwTexFunc[d3dtblend_modulate]; - break; - - case GL_BLEND: - dwFunc = pContext->pShared->dwTexFunc[d3dtblend_decalalpha]; - break; - - case GL_REPLACE: - dwFunc = pContext->pShared->dwTexFunc[d3dtblend_decal]; - break; - - case GL_DECAL: - if ( ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0][0]->Format == GL_RGBA ) - dwFunc = pContext->pShared->dwTexFunc[d3dtblend_decalalpha]; - else - dwFunc = pContext->pShared->dwTexFunc[d3dtblend_decal]; - break; - } - SetStateHAL( pContext->pShared, D3DRENDERSTATE_TEXTUREMAPBLEND, dwFunc ); - - switch( ctx->Texture.Set[ctx->Texture.CurrentSet].Current->MagFilter ) - { - case GL_NEAREST: - dwFunc = D3DFILTER_NEAREST; - break; - case GL_LINEAR: - dwFunc = D3DFILTER_LINEAR; - break; - case GL_NEAREST_MIPMAP_NEAREST: - dwFunc = D3DFILTER_MIPNEAREST; - break; - case GL_LINEAR_MIPMAP_NEAREST: - dwFunc = D3DFILTER_LINEARMIPNEAREST; - break; - case GL_NEAREST_MIPMAP_LINEAR: - dwFunc = D3DFILTER_MIPLINEAR; - break; - case GL_LINEAR_MIPMAP_LINEAR: - dwFunc = D3DFILTER_LINEARMIPLINEAR; - break; - } - SetStateHAL( pContext->pShared, D3DRENDERSTATE_TEXTUREMAG, dwFunc ); - - switch( ctx->Texture.Set[ctx->Texture.CurrentSet].Current->MinFilter ) - { - case GL_NEAREST: - dwFunc = D3DFILTER_NEAREST; - break; - case GL_LINEAR: - dwFunc = D3DFILTER_LINEAR; - break; - case GL_NEAREST_MIPMAP_NEAREST: - dwFunc = D3DFILTER_MIPNEAREST; - break; - case GL_LINEAR_MIPMAP_NEAREST: - dwFunc = D3DFILTER_LINEARMIPNEAREST; - break; - case GL_NEAREST_MIPMAP_LINEAR: - dwFunc = D3DFILTER_MIPLINEAR; - break; - case GL_LINEAR_MIPMAP_LINEAR: - dwFunc = D3DFILTER_LINEARMIPLINEAR; - break; - } - SetStateHAL( pContext->pShared, D3DRENDERSTATE_TEXTUREMIN, dwFunc ); - - /* Another hack to cut down on redundant texture binding. */ - // if ( texName != ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Name ) - // { - texName = ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Name; - CreateTMgrHAL( pContext->pShared, - texName, - 0, - ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0][0]->Format, - (RECT *)NULL, - ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0][0]->Width, - ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0][0]->Height, - TM_ACTION_BIND, - (void *)ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0][0]->Data ); - // } - bTexture = TRUE; - } - else - { - /* This is nasty but should cut down on the number of redundant calls. */ - if ( bTexture == TRUE ) - { - DisableTMgrHAL( pContext->pShared ); - bTexture = FALSE; - } - } - - /*===============================================*/ - /* Check too see if there are new RASTER states. */ - /*===============================================*/ - - // TODO: no concept of front & back. - switch( ctx->Polygon.FrontMode ) - { - case GL_POINT: - SetStateHAL( pContext->pShared, D3DRENDERSTATE_FILLMODE, D3DFILL_POINT ); - break; - case GL_LINE: - SetStateHAL( pContext->pShared, D3DRENDERSTATE_FILLMODE, D3DFILL_WIREFRAME ); - break; - case GL_FILL: - SetStateHAL( pContext->pShared, D3DRENDERSTATE_FILLMODE, D3DFILL_SOLID ); - break; - } - - /*************/ - /* Z-Buffer. */ - /*************/ - if ( ctx->Depth.Test == GL_TRUE ) - { - switch( ctx->Depth.Func ) - { - case GL_NEVER: - dwFunc = D3DCMP_NEVER; - break; - case GL_LESS: - dwFunc = D3DCMP_LESS; - break; - case GL_GEQUAL: - dwFunc = D3DCMP_GREATEREQUAL; - break; - case GL_LEQUAL: - dwFunc = D3DCMP_LESSEQUAL; - break; - case GL_GREATER: - dwFunc = D3DCMP_GREATER; - break; - case GL_NOTEQUAL: - dwFunc = D3DCMP_NOTEQUAL; - break; - case GL_EQUAL: - dwFunc = D3DCMP_EQUAL; - break; - case GL_ALWAYS: - dwFunc = D3DCMP_ALWAYS; - break; - } - SetStateHAL( pContext->pShared, D3DRENDERSTATE_ZFUNC, dwFunc ); - SetStateHAL( pContext->pShared, D3DRENDERSTATE_ZENABLE, TRUE ); - } - else - { - SetStateHAL( pContext->pShared, D3DRENDERSTATE_ZENABLE, FALSE ); - } - - /*******************/ - /* Z-Write Enable. */ - /*******************/ - SetStateHAL( pContext->pShared, D3DRENDERSTATE_ZWRITEENABLE , (ctx->Depth.Mask == GL_TRUE) ? TRUE : FALSE ); - - /***************/ - /* Alpha test. */ - /***************/ - if ( ctx->Color.AlphaEnabled == GL_TRUE ) - { - switch( ctx->Color.AlphaFunc ) - { - case GL_NEVER: - dwFunc = D3DCMP_NEVER; - break; - case GL_LESS: - dwFunc = D3DCMP_LESS; - break; - case GL_GEQUAL: - dwFunc = D3DCMP_GREATEREQUAL; - break; - case GL_LEQUAL: - dwFunc = D3DCMP_LESSEQUAL; - break; - case GL_GREATER: - dwFunc = D3DCMP_GREATER; - break; - case GL_NOTEQUAL: - dwFunc = D3DCMP_NOTEQUAL; - break; - case GL_EQUAL: - dwFunc = D3DCMP_EQUAL; - break; - case GL_ALWAYS: - dwFunc = D3DCMP_ALWAYS; - break; - } - SetStateHAL( pContext->pShared, D3DRENDERSTATE_ALPHAFUNC , dwFunc ); - SetStateHAL( pContext->pShared, D3DRENDERSTATE_ALPHATESTENABLE, TRUE ); - } - else - { - SetStateHAL( pContext->pShared, D3DRENDERSTATE_ALPHATESTENABLE, FALSE ); - } - - /****************/ - /* Alpha blend. */ - /****************/ - if ( ctx->Color.BlendEnabled == GL_TRUE ) - { - switch( ctx->Color.BlendSrc ) - { - case GL_ZERO: - dwFunc = pContext->pShared->dwSrcBlendCaps[s_zero]; - break; - case GL_ONE: - dwFunc = pContext->pShared->dwSrcBlendCaps[s_one]; - break; - case GL_DST_COLOR: - dwFunc = pContext->pShared->dwSrcBlendCaps[s_dst_color]; - break; - case GL_ONE_MINUS_DST_COLOR: - dwFunc = pContext->pShared->dwSrcBlendCaps[s_one_minus_dst_color]; - break; - case GL_SRC_ALPHA: - dwFunc = pContext->pShared->dwSrcBlendCaps[s_src_alpha]; - break; - case GL_ONE_MINUS_SRC_ALPHA: - dwFunc = pContext->pShared->dwSrcBlendCaps[s_one_minus_src_alpha]; - break; - case GL_DST_ALPHA: - dwFunc = pContext->pShared->dwSrcBlendCaps[s_dst_alpha]; - break; - case GL_ONE_MINUS_DST_ALPHA: - dwFunc = pContext->pShared->dwSrcBlendCaps[s_one_minus_dst_alpha]; - break; - case GL_SRC_ALPHA_SATURATE: - dwFunc = pContext->pShared->dwSrcBlendCaps[s_src_alpha_saturate]; - break; - case GL_CONSTANT_COLOR: - dwFunc = pContext->pShared->dwSrcBlendCaps[s_constant_color]; - break; - case GL_ONE_MINUS_CONSTANT_COLOR: - dwFunc = pContext->pShared->dwSrcBlendCaps[s_one_minus_constant_color]; - break; - case GL_CONSTANT_ALPHA: - dwFunc = pContext->pShared->dwSrcBlendCaps[s_constant_alpha]; - break; - case GL_ONE_MINUS_CONSTANT_ALPHA: - dwFunc = pContext->pShared->dwSrcBlendCaps[s_one_minus_constant_alpha]; - break; - } - SetStateHAL( pContext->pShared, D3DRENDERSTATE_SRCBLEND, dwFunc ); - - switch( ctx->Color.BlendDst ) - { - case GL_ZERO: - dwFunc = pContext->pShared->dwDestBlendCaps[d_zero]; - break; - case GL_ONE: - dwFunc = pContext->pShared->dwDestBlendCaps[d_one]; - break; - case GL_SRC_COLOR: - dwFunc = pContext->pShared->dwDestBlendCaps[d_src_color]; - break; - case GL_ONE_MINUS_SRC_COLOR: - dwFunc = pContext->pShared->dwDestBlendCaps[d_one_minus_src_color]; - break; - case GL_SRC_ALPHA: - dwFunc = pContext->pShared->dwDestBlendCaps[d_src_alpha]; - break; - case GL_ONE_MINUS_SRC_ALPHA: - dwFunc = pContext->pShared->dwDestBlendCaps[d_one_minus_src_alpha]; - break; - case GL_DST_ALPHA: - dwFunc = pContext->pShared->dwDestBlendCaps[d_dst_alpha]; - break; - case GL_ONE_MINUS_DST_ALPHA: - dwFunc = pContext->pShared->dwDestBlendCaps[d_one_minus_dst_alpha]; - break; - case GL_CONSTANT_COLOR: - dwFunc = pContext->pShared->dwDestBlendCaps[d_constant_color]; - break; - case GL_ONE_MINUS_CONSTANT_COLOR: - dwFunc = pContext->pShared->dwDestBlendCaps[d_one_minus_constant_color]; - break; - case GL_CONSTANT_ALPHA: - dwFunc = pContext->pShared->dwDestBlendCaps[d_constant_alpha]; - break; - case GL_ONE_MINUS_CONSTANT_ALPHA: - dwFunc = pContext->pShared->dwDestBlendCaps[d_one_minus_constant_alpha]; - break; - } - SetStateHAL( pContext->pShared, D3DRENDERSTATE_DESTBLEND, dwFunc ); - SetStateHAL( pContext->pShared, D3DRENDERSTATE_ALPHABLENDENABLE, TRUE ); - } - else - { - SetStateHAL( pContext->pShared, D3DRENDERSTATE_ALPHABLENDENABLE, FALSE ); - } -} -/*===========================================================================*/ -/* If this function is called it will track the changes to the current */ -/* states that I'm setting in Direct3D. I did this so that the DPF's would */ -/* be under control! */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void DebugRenderStates( GLcontext *ctx, BOOL bForce ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - DWORD dwFunc; - static int dither = -1, - texture = -1, - textName = -1, - textEnv = -1, - textMin = -1, - textMag = -1, - polyMode = -1, - depthTest = -1, - depthFunc = -1, - depthMask = -1, - alphaTest = -1, - alphaFunc = -1, - blend = -1, - blendSrc = -1, - blendDest = -1; - - /* Force a displayed update of all current states. */ - if ( bForce ) - { - dither = texture = textName = textEnv = textMin = textMag = -1; - polyMode = depthTest = depthFunc = depthMask = -1; - alphaTest = alphaFunc = blend = blendSrc = blendDest = -1; - } - - if ( dither != ctx->Color.DitherFlag ) - { - dither = ctx->Color.DitherFlag; - DPF(( 0, "\tDither\t\t%s", (dither) ? "ENABLED" : "--------" )); - } - if ( depthTest != ctx->Depth.Test ) - { - depthTest = ctx->Depth.Test; - DPF(( 0, "\tDepth Test\t%s", (depthTest) ? "ENABLED" : "--------" )); - } - if ( alphaTest != ctx->Color.AlphaEnabled ) - { - alphaTest = ctx->Color.AlphaEnabled; - - DPF(( 0, "\tAlpha Test\t%s", (alphaTest) ? "ENABLED" : "--------" )); - } - if ( blend != ctx->Color.BlendEnabled ) - { - blend = ctx->Color.BlendEnabled; - - DPF(( 0, "\tBlending\t%s", (blend) ? "ENABLED" : "--------" )); - } - - /*================================================*/ - /* Check too see if there are new TEXTURE states. */ - /*================================================*/ - if ( texture != ctx->Texture._EnabledUnits ) - { - texture = ctx->Texture._EnabledUnits; - DPF(( 0, "\tTexture\t\t%s", (texture) ? "ENABLED" : "--------" )); - } - - if ( ctx->Texture.Set[ctx->Texture.CurrentSet].Current ) - { - if ( ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Name != textName ) - { - textName = ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Name; - DPF(( 0, "\tTexture Name:\t%d", textName )); - DPF(( 0, "\tTexture Format:\t%s", - (ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0][0]->Format == GL_RGBA) ? - "GL_RGBA" : "GLRGB" )); - } - - if ( textEnv != ctx->Texture.Set[ctx->Texture.CurrentSet].EnvMode ) - { - textEnv = ctx->Texture.Set[ctx->Texture.CurrentSet].EnvMode; - - switch( textEnv ) - { - case GL_MODULATE: - DPF(( 0, "\tTexture\tMode\tGL_MODULATE" )); - break; - case GL_BLEND: - DPF(( 0, "\tTexture\tMode\tGL_BLEND" )); - break; - case GL_REPLACE: - DPF(( 0, "\tTexture\tMode\tGL_REPLACE" )); - break; - case GL_DECAL: - DPF(( 0, "\tTexture\tMode\tGL_DECAL" )); - break; - } - } - - if ( textMag != ctx->Texture.Set[ctx->Texture.CurrentSet].Current->MagFilter ) - { - textMag = ctx->Texture.Set[ctx->Texture.CurrentSet].Current->MagFilter; - - switch( textMag ) - { - case GL_NEAREST: - DPF(( 0, "\tTexture MAG\tGL_NEAREST" )); - break; - case GL_LINEAR: - DPF(( 0, "\tTexture MAG\tGL_LINEAR" )); - break; - case GL_NEAREST_MIPMAP_NEAREST: - DPF(( 0, "\tTexture MAG\tGL_NEAREST_MIPMAP_NEAREST" )); - break; - case GL_LINEAR_MIPMAP_NEAREST: - DPF(( 0, "\tTexture MAG\tGL_LINEAR_MIPMAP_NEAREST" )); - break; - case GL_NEAREST_MIPMAP_LINEAR: - DPF(( 0, "\tTexture MAG\tGL_NEAREST_MIPMAP_LINEAR" )); - break; - case GL_LINEAR_MIPMAP_LINEAR: - DPF(( 0, "\tTexture MAG\tGL_LINEAR_MIPMAP_LINEAR" )); - break; - } - } - - if ( textMin != ctx->Texture.Set[ctx->Texture.CurrentSet].Current->MinFilter ) - { - textMin = ctx->Texture.Set[ctx->Texture.CurrentSet].Current->MinFilter; - - switch( textMin ) - { - case GL_NEAREST: - DPF(( 0, "\tTexture MIN\tGL_NEAREST" )); - break; - case GL_LINEAR: - DPF(( 0, "\tTexture MIN\tGL_LINEAR" )); - break; - case GL_NEAREST_MIPMAP_NEAREST: - DPF(( 0, "\tTexture MIN\tGL_NEAREST_MIPMAP_NEAREST" )); - break; - case GL_LINEAR_MIPMAP_NEAREST: - DPF(( 0, "\tTexture MIN\tGL_LINEAR_MIPMAP_NEAREST" )); - break; - case GL_NEAREST_MIPMAP_LINEAR: - DPF(( 0, "\tTexture MIN\tGL_LINEAR_MIPMAP_LINEAR" )); - break; - case GL_LINEAR_MIPMAP_LINEAR: - DPF(( 0, "\tTexture MIN\tGL_LINEAR_MIPMAP_LINEAR" )); - break; - } - } - } - - if ( ctx->Polygon.FrontMode != polyMode ) - { - polyMode = ctx->Polygon.FrontMode; - - switch( polyMode ) - { - case GL_POINT: - DPF(( 0, "\tMode\t\tGL_POINT" )); - break; - case GL_LINE: - DPF(( 0, "\tMode\t\tGL_LINE" )); - break; - case GL_FILL: - DPF(( 0, "\tMode\t\tGL_FILL" )); - break; - } - } - - if ( depthFunc != ctx->Depth.Func ) - { - depthFunc = ctx->Depth.Func; - - switch( depthFunc ) - { - case GL_NEVER: - DPF(( 0, "\tDepth Func\tGL_NEVER" )); - break; - case GL_LESS: - DPF(( 0, "\tDepth Func\tGL_LESS" )); - break; - case GL_GEQUAL: - DPF(( 0, "\tDepth Func\tGL_GEQUAL" )); - break; - case GL_LEQUAL: - DPF(( 0, "\tDepth Func\tGL_LEQUAL" )); - break; - case GL_GREATER: - DPF(( 0, "\tDepth Func\tGL_GREATER" )); - break; - case GL_NOTEQUAL: - DPF(( 0, "\tDepth Func\tGL_NOTEQUAL" )); - break; - case GL_EQUAL: - DPF(( 0, "\tDepth Func\tGL_EQUAL" )); - break; - case GL_ALWAYS: - DPF(( 0, "\tDepth Func\tGL_ALWAYS" )); - break; - } - } - - if ( depthMask != ctx->Depth.Mask ) - { - depthMask = ctx->Depth.Mask; - DPF(( 0, "\tZWrite\t\t%s", (depthMask) ? "ENABLED" : "--------" )); - } - - if ( alphaFunc != ctx->Color.AlphaFunc ) - { - alphaFunc = ctx->Color.AlphaFunc; - - switch( alphaFunc ) - { - case GL_NEVER: - DPF(( 0, "\tAlpha Func\tGL_NEVER" )); - break; - case GL_LESS: - DPF(( 0, "\tAlpha Func\tGL_LESS" )); - break; - case GL_GEQUAL: - DPF(( 0, "\tAlpha Func\tGL_GEQUAL" )); - break; - case GL_LEQUAL: - DPF(( 0, "\tAlpha Func\tGL_LEQUAL" )); - break; - case GL_GREATER: - DPF(( 0, "\tAlpha Func\tGL_GREATER" )); - break; - case GL_NOTEQUAL: - DPF(( 0, "\tAlpha Func\tGL_NOTEQUAL" )); - break; - case GL_EQUAL: - DPF(( 0, "\tAlpha Func\tGL_EQUAL" )); - break; - case GL_ALWAYS: - DPF(( 0, "\tAlpha Func\tGL_ALWAYS" )); - break; - } - } - - if ( blendSrc != ctx->Color.BlendSrc ) - { - blendSrc = ctx->Color.BlendSrc; - - switch( blendSrc ) - { - case GL_ZERO: - DPF(( 0, "\tSRC Blend\tGL_ZERO" )); - break; - case GL_ONE: - DPF(( 0, "\tSRC Blend\tGL_ONE" )); - break; - case GL_DST_COLOR: - DPF(( 0, "\tSRC Blend\tGL_DST_COLOR" )); - break; - case GL_ONE_MINUS_DST_COLOR: - DPF(( 0, "\tSRC Blend\tGL_ONE_MINUS_DST_COLOR" )); - break; - case GL_SRC_ALPHA: - DPF(( 0, "\tSRC Blend\tGL_SRC_ALPHA" )); - break; - case GL_ONE_MINUS_SRC_ALPHA: - DPF(( 0, "\tSRC Blend\tGL_MINUS_SRC_ALPHA" )); - break; - case GL_DST_ALPHA: - DPF(( 0, "\tSRC Blend\tGL_DST_ALPHA" )); - break; - case GL_ONE_MINUS_DST_ALPHA: - DPF(( 0, "\tSRC Blend\tGL_ONE_MINUS_DST_ALPHA" )); - break; - case GL_SRC_ALPHA_SATURATE: - DPF(( 0, "\tSRC Blend\tGL_SRC_ALPHA_SATURATE" )); - break; - case GL_CONSTANT_COLOR: - DPF(( 0, "\tSRC Blend\tGL_CONSTANT_COLOR" )); - break; - case GL_ONE_MINUS_CONSTANT_COLOR: - DPF(( 0, "\tSRC Blend\tGL_ONE_MINUS_CONSTANT_COLOR" )); - break; - case GL_CONSTANT_ALPHA: - DPF(( 0, "\tSRC Blend\tGL_CONSTANT_ALPHA" )); - break; - case GL_ONE_MINUS_CONSTANT_ALPHA: - DPF(( 0, "\tSRC Blend\tGL_ONE_MINUS_CONSTANT_ALPHA" )); - break; - } - } - - if ( blendDest != ctx->Color.BlendDst ) - { - blendDest = ctx->Color.BlendDst; - - switch( blendDest ) - { - case GL_ZERO: - DPF(( 0, "\tDST Blend\tGL_ZERO" )); - break; - case GL_ONE: - DPF(( 0, "\tDST Blend\tGL_ONE" )); - break; - case GL_SRC_COLOR: - DPF(( 0, "\tDST Blend\tGL_SRC_COLOR" )); - break; - case GL_ONE_MINUS_SRC_COLOR: - DPF(( 0, "\tDST Blend\tGL_ONE_MINUS_SRC_COLOR" )); - break; - case GL_SRC_ALPHA: - DPF(( 0, "\tDST Blend\tGL_SRC_ALPHA" )); - break; - case GL_ONE_MINUS_SRC_ALPHA: - DPF(( 0, "\tDST Blend\tGL_ONE_MINUS_SRC_ALPHA" )); - break; - case GL_DST_ALPHA: - DPF(( 0, "\tDST Blend\tGL_DST_ALPHA" )); - break; - case GL_ONE_MINUS_DST_ALPHA: - DPF(( 0, "\tDST Blend\tGL_ONE_MINUS_DST_ALPHA" )); - break; - case GL_CONSTANT_COLOR: - DPF(( 0, "\tDST Blend\tGL_CONSTANT_COLOR" )); - break; - case GL_ONE_MINUS_CONSTANT_COLOR: - DPF(( 0, "\tDST Blend\tGL_ONE_MINUS_CONSTANT_COLOR" )); - break; - case GL_CONSTANT_ALPHA: - DPF(( 0, "\tDST Blend\tGL_CONSTANT_ALPHA" )); - break; - case GL_ONE_MINUS_CONSTANT_ALPHA: - DPF(( 0, "\tDST Blend\tGL_ONE_MINUS_CONSTANT_ALPHA" )); - break; - } - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/DDrawPROCS.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/DDrawPROCS.c deleted file mode 100644 index a02a89debb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/DDrawPROCS.c +++ /dev/null @@ -1,399 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#include "D3DMesa.h" -/*===========================================================================*/ -/* This call will clear the render surface using the pixel info built from */ -/* the surface at creation time. The call uses Lock/Unlock to access the */ -/* surface. The call also special cases a full clear or a dirty rectangle. */ -/* Finally the call returns the new clear mask that reflects that the color */ -/* buffer was cleared. */ -/*===========================================================================*/ -/* RETURN: the original mask with the bits cleared that represents the buffer*/ -/* or buffers we just cleared. */ -/*===========================================================================*/ -GLbitfield ClearBuffers( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - DDSURFACEDESC2 *pddsd2; - UCHAR *pBuffer, - *pScanLine; - int index, - index2; - DWORD dwColor; - - if ( mask & GL_COLOR_BUFFER_BIT ) - { - /* Lock the surface to get the surface pointer. */ - pddsd2 = LockHAL( pContext->pShared, TRUE ); - - /* Solve the color once only. */ - dwColor = ( ((DWORD)((float)pContext->rClear * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift ); - dwColor |= ( ((DWORD)((float)pContext->gClear * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift ); - dwColor |= ( ((DWORD)((float)pContext->bClear * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift ); - - if ( all ) - { - for( index = 0, pScanLine = (UCHAR *)pddsd2->lpSurface; index < pContext->pShared->dwHeight; index++, pScanLine += pddsd2->lPitch ) - for( pBuffer = pScanLine, index2 = 0; index2 < pContext->pShared->dwWidth; index2++, pBuffer += pContext->pShared->pixel.cb ) - memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb ); - } - else - { - pScanLine = ((UCHAR *)pddsd2->lpSurface) + - ( (FLIP( pContext->pShared->dwHeight, (y+height)) * pddsd2->lPitch) + (x * pContext->pShared->pixel.cb) ); - - for( index = 0; index < height; index++, pScanLine += pddsd2->lPitch ) - { - for( index2 = 0, pBuffer = pScanLine; index2 < width; index2++, pBuffer += pContext->pShared->pixel.cb ) - memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb ); - } - } - - UnlockHAL( pContext->pShared, TRUE ); - } - - return (mask & ~GL_COLOR_BUFFER_BIT); -} -/*===========================================================================*/ -/* This proc (as all others) has been written for the general case. I use */ -/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */ -/* Screen render surface uses. The alpha is ignored as Mesa does it in SW. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -void WSpanRGB( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgb[][3], const GLubyte mask[] ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - DDSURFACEDESC2 *pddsd2; - UCHAR *pBuffer; - int index; - DWORD dwColor; - - /* Get the surface pointer and the pitch. */ - pddsd2 = LockHAL( pContext->pShared, TRUE ); - - /* Find the start of the span. Invert y for Windows. */ - pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + (x*pContext->pShared->pixel.cb); - - if ( mask ) - { - for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb ) - { - if ( mask[index] ) - { - /* Pack the color components. */ - dwColor = ( ((DWORD)((float)rgb[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift ); - dwColor |= ( ((DWORD)((float)rgb[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift ); - dwColor |= ( ((DWORD)((float)rgb[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift ); - memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb ); - } - } - } - else - { - for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb ) - { - /* Pack the color components. */ - dwColor = ( ((DWORD)((float)rgb[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift ); - dwColor |= ( ((DWORD)((float)rgb[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift ); - dwColor |= ( ((DWORD)((float)rgb[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift ); - memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb ); - } - } - - /* Giver back. */ - UnlockHAL( pContext->pShared, TRUE ); -} -/*===========================================================================*/ -/* This proc (as all others) has been written for the general case. I use */ -/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */ -/* Screen render surface uses. The alpha is ignored as Mesa does it in SW. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -void WSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - DDSURFACEDESC2 *pddsd2; - UCHAR *pBuffer; - int index; - DWORD dwColor; - - /* Get the surface pointer and the pitch. */ - pddsd2 = LockHAL( pContext->pShared, TRUE ); - - /* Find the start of the span. Invert y for Windows. */ - pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + (x*pContext->pShared->pixel.cb); - - if ( mask ) - { - for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb ) - { - if ( mask[index] ) - { - /* Pack the color components. */ - dwColor = ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift ); - dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift ); - dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift ); - memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb ); - } - } - } - else - { - for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb ) - { - /* Pack the color components. */ - dwColor = ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift ); - dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift ); - dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift ); - memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb ); - } - } - - /* Giver back. */ - UnlockHAL( pContext->pShared, TRUE ); -} -/*===========================================================================*/ -/* This proc (as all others) has been written for the general case. I use */ -/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */ -/* Screen render surface uses. The color is solved once from the current */ -/* color components. The alpha is ignored as Mesa is doing it in SW. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -void WSpanRGBAMono( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte mask[] ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - DDSURFACEDESC2 *pddsd2; - UCHAR *pBuffer; - int index; - DWORD dwColor; - - /* Lock the surface to get the surface pointer and the pitch. */ - pddsd2 = LockHAL( pContext->pShared, TRUE ); - - /* Solve the color once only. (no alpha) */ - dwColor = ( ((DWORD)((float)pContext->rCurrent * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift ); - dwColor |= ( ((DWORD)((float)pContext->gCurrent * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift ); - dwColor |= ( ((DWORD)((float)pContext->bCurrent * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift ); - - /* Find the start of the span. Invert y for Windows. */ - pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + (x*pContext->pShared->pixel.cb); - - if ( mask ) - { - for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb ) - if ( mask[index] ) - memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb ); - } - else - { - for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb ) - memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb ); - } - - /* Giver back. */ - UnlockHAL( pContext->pShared, TRUE ); -} -/*===========================================================================*/ -/* This proc (as all others) has been written for the general case. I use */ -/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */ -/* Screen render surface uses. The alpha is ignored as Mesa does it in SW. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -void WPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - DDSURFACEDESC2 *pddsd2; - UCHAR *pBuffer; - int index; - DWORD dwColor; - - /* Get the surface pointer and the pitch. */ - pddsd2 = LockHAL( pContext->pShared, TRUE ); - - if ( mask ) - { - for( index = 0; index < n; index++ ) - { - if ( mask[index] ) - { - /* Pack the color components. */ - dwColor = ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift ); - dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift ); - dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift ); - - /* Find the pixel. Invert y for Windows. */ - pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb); - memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb ); - } - } - } - else - { - for( index = 0; index < n; index++ ) - { - /* Pack the color components. */ - dwColor = ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift ); - dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift ); - dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift ); - - /* Find the pixel. Invert y for Windows. */ - pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb); - memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb ); - } - } - - /* Giver back. */ - UnlockHAL( pContext->pShared, TRUE ); -} -/*===========================================================================*/ -/* This proc (as all others) has been written for the general case. I use */ -/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */ -/* Screen render surface uses. The color is solved once from the current */ -/* color components. The alpha is ignored as Mesa is doing it in SW. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -void WPixelsRGBAMono( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - DDSURFACEDESC2 *pddsd2; - UCHAR *pBuffer; - int index; - DWORD dwColor; - - /* Get the surface pointer and the pitch. */ - pddsd2 = LockHAL( pContext->pShared, TRUE ); - - /* Solve the color once only. I don't uses the alpha. */ - dwColor = ( ((DWORD)((float)pContext->rCurrent * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift ); - dwColor |= ( ((DWORD)((float)pContext->gCurrent * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift ); - dwColor |= ( ((DWORD)((float)pContext->bCurrent * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift ); - - if ( mask ) - { - /* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */ - for( index = 0; index < n; index++ ) - { - if ( mask[index] ) - { - /* Find the pixel. Invert y for Windows. */ - pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb); - memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb ); - } - } - } - else - { - /* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */ - for( index = 0; index < n; index++ ) - { - /* Find the pixel. Invert y for Windows. */ - pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb); - memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb ); - } - } - - /* Giver back. */ - UnlockHAL( pContext->pShared, TRUE ); -} -/*===========================================================================*/ -/* This proc isn't written for speed rather its to handle the general case. */ -/* I grab each pixel from the surface and unpack the info using the PIXELINFO*/ -/* structure that was generated from the OffScreen surface pixelformat. The */ -/* function will not fill in the alpha value as Mesa I have Mesa allocate its*/ -/* own alpha channel when the context was created. I did this as I didn't */ -/* feel that it was worth the effort to try and get HW to work (bus bound). */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -void RSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - DDSURFACEDESC2 *pddsd2; - UCHAR *pBuffer; - int index; - DWORD *pdwColor; - - /* Get the surface pointer and the pitch. */ - pddsd2 = LockHAL( pContext->pShared, TRUE ); - - /* Find the start of the span. Invert y for Windows. */ - pBuffer = (UCHAR *)pddsd2->lpSurface + - (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + - (x*pContext->pShared->pixel.cb); - - /* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */ - for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb ) - { - pdwColor = (DWORD *)pBuffer; - rgba[index][RCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwRMask) >> pContext->pShared->pixel.rShift) / pContext->pShared->pixel.rScale); - rgba[index][GCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwGMask) >> pContext->pShared->pixel.gShift) / pContext->pShared->pixel.gScale); - rgba[index][BCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwBMask) >> pContext->pShared->pixel.bShift) / pContext->pShared->pixel.bScale); - } - - /* Giver back. */ - UnlockHAL( pContext->pShared, TRUE ); -} -/*===========================================================================*/ -/* This proc isn't written for speed rather its to handle the general case. */ -/* I grab each pixel from the surface and unpack the info using the PIXELINFO*/ -/* structure that was generated from the OffScreen surface pixelformat. The */ -/* function will not fill in the alpha value as Mesa I have Mesa allocate its*/ -/* own alpha channel when the context was created. I did this as I didn't */ -/* feel that it was worth the effort to try and get HW to work (bus bound). */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -void RPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - DDSURFACEDESC2 *pddsd2; - int index; - DWORD *pdwColor; - - /* Get the surface pointer and the pitch. */ - pddsd2 = LockHAL( pContext->pShared, TRUE ); - - if ( mask ) - { - /* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */ - for( index = 0; index < n; index++ ) - { - if ( mask[index] ) - { - /* Find the start of the pixel. Invert y for Windows. */ - pdwColor = (DWORD *)((UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb)); - rgba[index][RCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwRMask) >> pContext->pShared->pixel.rShift) / pContext->pShared->pixel.rScale); - rgba[index][GCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwGMask) >> pContext->pShared->pixel.gShift) / pContext->pShared->pixel.gScale); - rgba[index][BCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwBMask) >> pContext->pShared->pixel.bShift) / pContext->pShared->pixel.bScale); - } - } - } - else - { - /* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */ - for( index = 0; index < n; index++ ) - { - /* Find the start of the pixel. Invert y for Windows. */ - pdwColor = (DWORD *)((UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb)); - rgba[index][RCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwRMask) >> pContext->pShared->pixel.rShift) / pContext->pShared->pixel.rScale); - rgba[index][GCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwGMask) >> pContext->pShared->pixel.gShift) / pContext->pShared->pixel.gScale); - rgba[index][BCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwBMask) >> pContext->pShared->pixel.bShift) / pContext->pShared->pixel.bScale); - } - } - - /* Giver back. */ - UnlockHAL( pContext->pShared, TRUE ); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/DEBUG.C b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/DEBUG.C deleted file mode 100644 index dfa524bf31..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/DEBUG.C +++ /dev/null @@ -1,143 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#include "Debug.h" -/*===========================================================================*/ -/* Global variables. */ -/*===========================================================================*/ -DWORD g_DBGMask = DBG_ALL_ERROR; -/*===========================================================================*/ -/* This is your basic DPF function with printf like support. The function */ -/* also works with a global debug mask variable. I have written support that*/ -/* allows for the user's enviroment variable space to be read and set the */ -/* masks. This is done when the dll starts and is only in the debug version.*/ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -void _cdecl DebugPrint( int mask, char *pszFormat, ... ) -{ - char buffer[512]; - va_list args; - - /* A mask of 0 will always pass. Easy to remeber. */ - if ( (mask == 0) || (mask & g_DBGMask) ) - { - va_start( args, pszFormat ); - - if ( mask & DBG_ALL_ERROR ) - OutputDebugString( "MesaD3D: (ERROR)" ); - else - OutputDebugString( "MesaD3D: " ); - - vsprintf( buffer, pszFormat, args ); - strcat( buffer, "\n" ); - OutputDebugString( buffer ); - - va_end( args ); - } -} -/*===========================================================================*/ -/* This call reads the users enviroment variables and sets any debug mask */ -/* that they have set to TRUE. Now the value must be "TRUE". */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -void ReadDBGEnv( void ) -{ - g_DBGMask = DBG_ALL_ERROR; - -#define IS_VAR_SET(v) if ( getenv( # v ) && !strcmp(getenv( # v ),"TRUE") ) g_DBGMask |= v; - - IS_VAR_SET( DBG_FUNC ); - IS_VAR_SET( DBG_STATES ); - - IS_VAR_SET( DBG_CNTX_INFO ); - IS_VAR_SET( DBG_CNTX_WARN ); - IS_VAR_SET( DBG_CNTX_PROFILE ); - IS_VAR_SET( DBG_CNTX_ERROR ); - IS_VAR_SET( DBG_CNTX_ALL ); - - IS_VAR_SET( DBG_PRIM_INFO ); - IS_VAR_SET( DBG_PRIM_WARN ); - IS_VAR_SET( DBG_PRIM_PROFILE ); - IS_VAR_SET( DBG_PRIM_ERROR ); - IS_VAR_SET( DBG_PRIM_ALL ); - - IS_VAR_SET( DBG_TXT_INFO ); - IS_VAR_SET( DBG_TXT_WARN ); - IS_VAR_SET( DBG_TXT_PROFILE ); - IS_VAR_SET( DBG_TXT_ERROR ); - IS_VAR_SET( DBG_TXT_ALL ); - - IS_VAR_SET( DBG_ALL_INFO ); - IS_VAR_SET( DBG_ALL_WARN ); - IS_VAR_SET( DBG_ALL_PROFILE ); - IS_VAR_SET( DBG_ALL_ERROR ); - IS_VAR_SET( DBG_ALL ); - -#undef IS_VAR_SET -} -/*===========================================================================*/ -/* This function will take a pointer to a DDSURFACEDESC2 structure & display*/ -/* the parsed information using a DPF call. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -void DebugPixelFormat( char *pszSurfaceName, DDPIXELFORMAT *pddpf ) -{ - char buffer[256]; - - /* Parse the flag type and write the string equivalent. */ - if ( pddpf->dwFlags & DDPF_ALPHA ) - strcat( buffer, "DDPF_ALPHA " ); - if ( pddpf->dwFlags & DDPF_ALPHAPIXELS ) - strcat( buffer, "DDPF_ALPHAPIXELS " ); - if ( pddpf->dwFlags & DDPF_ALPHAPREMULT ) - strcat( buffer, "DDPF_ALPHAPREMULT " ); - if ( pddpf->dwFlags & DDPF_BUMPLUMINANCE ) - strcat( buffer, "DDPF_BUMPLUMINANCE " ); - if ( pddpf->dwFlags & DDPF_BUMPDUDV ) - strcat( buffer, "DDPF_BUMPDUDV " ); - if ( pddpf->dwFlags & DDPF_COMPRESSED ) - strcat( buffer, "DDPF_COMPRESSED " ); - if ( pddpf->dwFlags & DDPF_FOURCC ) - strcat( buffer, "DDPF_FOURCC " ); - if ( pddpf->dwFlags & DDPF_LUMINANCE ) - strcat( buffer, "DDPF_LUMINANCE " ); - if ( pddpf->dwFlags & DDPF_PALETTEINDEXED1 ) - strcat( buffer, "DDPF_PALETTEINDEXED1 " ); - if ( pddpf->dwFlags & DDPF_PALETTEINDEXED2 ) - strcat( buffer, "DDPF_PALETTEINDEXED2 " ); - if ( pddpf->dwFlags & DDPF_PALETTEINDEXED4 ) - strcat( buffer, "DDPF_PALETTEINDEXED4 " ); - if ( pddpf->dwFlags & DDPF_PALETTEINDEXED8 ) - strcat( buffer, "DDPF_PALETTEINDEXED8 " ); - if ( pddpf->dwFlags & DDPF_PALETTEINDEXEDTO8 ) - strcat( buffer, "DDPF_PALETTEINDEXEDTO8 " ); - if ( pddpf->dwFlags & DDPF_RGB ) - strcat( buffer, "DDPF_RGB " ); - if ( pddpf->dwFlags & DDPF_RGBTOYUV ) - strcat( buffer, "DDPF_RGBTOYUV " ); - if ( pddpf->dwFlags & DDPF_STENCILBUFFER ) - strcat( buffer, "DDPF_STENCILBUFFER " ); - if ( pddpf->dwFlags & DDPF_YUV ) - strcat( buffer, "DDPF_YUV " ); - if ( pddpf->dwFlags & DDPF_ZBUFFER ) - strcat( buffer, "DDPF_ZBUFFER " ); - if ( pddpf->dwFlags & DDPF_ZPIXELS ) - strcat( buffer, "DDPF_ZPIXELS " ); - - DPF(( (DBG_TXT_INFO|DBG_CNTX_INFO),"%s", buffer )); -} - - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/DEBUG.H b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/DEBUG.H deleted file mode 100644 index 76122b9121..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/DEBUG.H +++ /dev/null @@ -1,90 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#ifndef _DEBUG_H -#define _DEBUG_H - -#ifdef __cplusplus -extern "C" { -#endif - -/*===========================================================================*/ -/* Includes. */ -/*===========================================================================*/ -#include -#include -#include -#include -#include "D3DShared.h" -/*===========================================================================*/ -/* Magic numbers. */ -/*===========================================================================*/ -/*===========================================================================*/ -/* Macros defines. */ -/*===========================================================================*/ -#define DBG_FUNC 0x00000001 -#define DBG_STATES 0x00000002 - -#define DBG_CNTX_INFO 0x00000010 -#define DBG_CNTX_WARN 0x00000020 -#define DBG_CNTX_PROFILE 0x00000040 -#define DBG_CNTX_ERROR 0x00000080 -#define DBG_CNTX_ALL 0x000000F0 - -#define DBG_PRIM_INFO 0x00000100 -#define DBG_PRIM_WARN 0x00000200 -#define DBG_PRIM_PROFILE 0x00000400 -#define DBG_PRIM_ERROR 0x00000800 -#define DBG_PRIM_ALL 0x00000F00 - -#define DBG_TXT_INFO 0x00001000 -#define DBG_TXT_WARN 0x00002000 -#define DBG_TXT_PROFILE 0x00004000 -#define DBG_TXT_ERROR 0x00008000 -#define DBG_TXT_ALL 0x0000F000 - -#define DBG_ALL_INFO 0x11111110 -#define DBG_ALL_WARN 0x22222220 -#define DBG_ALL_PROFILE 0x44444440 -#define DBG_ALL_ERROR 0x88888880 -#define DBG_ALL 0xFFFFFFFF - -#ifdef D3D_DEBUG -# define DPF(arg) DebugPrint arg -# define RIP(pH,msg,err) OutputDebugString(msg); \ - OutputDebugString(err); \ - OutputDebugString("\n"); \ - FatalShutDown(pH) -#else -# define DPF(arg) -# define RIP(pH,msg,err) FatalShutDown(pH) -#endif -/*===========================================================================*/ -/* Type defines. */ -/*===========================================================================*/ -/*===========================================================================*/ -/* Function prototypes. */ -/*===========================================================================*/ -extern void ReadDBGEnv( void ); -extern void _cdecl DebugPrint( int mask, char *pszFormat, ... ); -extern void DebugPixelFormat( char *pszSurfaceName, DDPIXELFORMAT *pddpf ); -/*===========================================================================*/ -/* Global variables. */ -/*===========================================================================*/ -extern DWORD g_DBGMask; - -#ifdef __cplusplus -} -#endif - -#endif - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/DbgEnv.bat b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/DbgEnv.bat deleted file mode 100644 index 40858e6684..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/DbgEnv.bat +++ /dev/null @@ -1,25 +0,0 @@ -SET DBG_FUNC=FALSE - -SET DBG_CNTX_INFO=TRUE -SET DBG_CNTX_WARN=TRUE -SET DBG_CNTX_PROFILE=FALSE -SET DBG_CNTX_ERROR=TRUE -SET DBG_CNTX_ALL=TRUE - -SET DBG_PRIM_INFO=FALSE -SET DBG_PRIM_WARN=FALSE -SET DBG_PRIM_PROFILE=FALSE -SET DBG_PRIM_ERROR=TRUE -SET DBG_PRIM_ALL=FALSE - -SET DBG_TXT_INFO=FALSE -SET DBG_TXT_WARN=TRUE -SET DBG_TXT_PROFILE=FALSE -SET DBG_TXT_ERROR=TRUE -SET DBG_TXT_ALL=FALSE - -SET DBG_ALL_INFO=FALSE -SET DBG_ALL_WARN=TRUE -SET DBG_ALL_PROFILE=FALSE -SET DBG_ALL_ERROR=TRUE -SET DBG_ALL=FALSE diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/MAKEFILE b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/MAKEFILE deleted file mode 100644 index ad1d40dc27..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/MAKEFILE +++ /dev/null @@ -1,101 +0,0 @@ -############################################################################## -# -# Mesa-3.0 Makefile for DirectX 6 Driver -# -# By Leigh McRae -# -# http://www.altsoftware.com/ -# -# Copyright (c) 1999-1998 alt.software inc. All Rights Reserved -############################################################################## -NAME= -TARGET= WGL Driver (D3DHAL) - -D3D_DIR=$(MAKEDIR)\D3D -TARGET_DIR=e:\WinNT\System32 -TEMP_DIR=c:\Temp - -SPACE=- -LINKER=link.exe - -INCLUDE=$(SDKROOT)\include;$(INCLUDE) -LIB=$(SDKROOT)\lib;$(LIB) -############################################################################## -CFLAGS = /c /nologo /W1 /G5 /I..\ /I..\..\Include \ - /D "_WIN32" /D "WIN32" /D "_WINDOWS" /D "__WIN32__" /D "__MSC__" /D "MESAD3D" -CPPFLAGS= /c /nologo /W1 /G5 /I..\ /I..\..\Include \ - /D "_WIN32" /D "WIN32" /D "_WINDOWS" /D "__WIN32__" /D "__MSC__" /D "MESAD3D" - -!IF "$(DEBUG)" == "1" - -CFLAGS = /MTd /Od /Z7 /Yd /D "_DEBUG" /D "D3D_DEBUG" $(CFLAGS) -CPPFLAGS = /MTd /Od /Z7 /Yd /D "_DEBUG" /D "D3D_DEBUG" $(CPPFLAGS) -BUILD_TYPE=debug - -!ELSE - -CFLAGS = /MT /Ox /D "NDEBUG" $(CFLAGS) -CPPFLAGS = /MT /Ox /D "NDEBUG" $(CPPFLAGS) -BUILD_TYPE=release - -!ENDIF -############################################################################## -SRCS_WGL = wgl.c D3Dvbrender.c DDrawPROCS.c NULLProcs.c Debug.c -SRCS_HAL = D3DInit.cpp D3DRaster.cpp D3DTextureMgr.cpp D3DUtils.cpp D3DCaps.cpp -OBJS_WGL = $(SRCS_WGL:.c=.obj) -OBJS_HAL = $(SRCS_HAL:.cpp=.obj) - -WINLIBS = kernel32.lib user32.lib gdi32.lib oldnames.lib -DXLIBS = -LIBS = $(WINLIBS) $(DXLIBS) -############################################################################### -# Primary Targets # -############################################################################### - -default: header WGL HAL footer - -all: default - -WGL : $(OBJS_WGL) - -HAL : $(OBJS_HAL) - -install : forceit - @echo $(SPACE) - @echo ======================================== - @echo Install files created. - @echo ======================================== - - -############################################################################### -# Secondary Targets # -############################################################################### - -clean: - @echo ======================================== - @echo Cleaning $(TARGET) - @del *.obj - @del *.dep - @del *.exp - @del *.ncb - @del *.plg - @del *.lib - @echo ======================================== - -header: - @echo ============================================================ - @echo Building $(TARGET) ($(BUILD_TYPE) version) - @echo ============================================================ - @echo $(SPACE) - -footer: - @echo $(SPACE) - @echo ============================================================ - @echo DONE building $(TARGET) ($(BUILD_TYPE) version) - @echo ============================================================ - -forceit: - - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/NULLProcs.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/NULLProcs.h deleted file mode 100644 index f0bbd2162d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/NULLProcs.h +++ /dev/null @@ -1,49 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#ifndef NULL_MESA_PROCS_INC -#define NULL_MESA_PROCS_INC -/*===========================================================================*/ -/* Includes. */ -/*===========================================================================*/ -#include "matrix.h" -#include "context.h" -#include "types.h" -#include "vb.h" -/*===========================================================================*/ -/* Macros. */ -/*===========================================================================*/ -/*===========================================================================*/ -/* Magic numbers. */ -/*===========================================================================*/ -/*===========================================================================*/ -/* Type defines. */ -/*===========================================================================*/ -void NULLSetColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a ); -void NULLClearColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a ); -GLboolean NULLSetBuffer( GLcontext *ctx, GLenum mode ); -void NULLGetBufferSize( GLcontext *ctx, GLuint *width, GLuint *height ); -GLbitfield NULLClearBuffers( GLcontext *ctx, GLbitfield m, GLboolean a, GLint x, GLint y, GLint w, GLint h ); -void NULLWrSpRGB( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte r[][3], const GLubyte m[] ); -void NULLWrSpRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte r[][4], const GLubyte m[] ); -void NULLWrSpRGBAMono( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte m[] ); -void NULLWrPiRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte r[][4], const GLubyte m[] ); -void NULLWrPiRGBAMono( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte m[] ); -void NULLReSpRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte r[][4] ); -void NULLRePiRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte r[][4], const GLubyte m[] ); -/*===========================================================================*/ -/* Extern function prototypes. */ -/*===========================================================================*/ -/*===========================================================================*/ -/* Global variables. */ -/*===========================================================================*/ - -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/NullProcs.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/NullProcs.c deleted file mode 100644 index d6fb598074..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/NullProcs.c +++ /dev/null @@ -1,49 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 DirectX 6 Driver */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#ifndef NULL_MESA_PROCS_INC -#define NULL_MESA_PROCS_INC -/*===========================================================================*/ -/* Includes. */ -/*===========================================================================*/ -#include "matrix.h" -#include "context.h" -#include "mtypes.h" -#include "vb.h" -/*===========================================================================*/ -/* Macros. */ -/*===========================================================================*/ -/*===========================================================================*/ -/* Magic numbers. */ -/*===========================================================================*/ -/*===========================================================================*/ -/* Type defines. */ -/*===========================================================================*/ -void NULLSetColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a ); -void NULLClearColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a ); -GLboolean NULLSetBuffer( GLcontext *ctx, GLframebuffer *buffer, GLuint bit ); -void NULLGetBufferSize( GLcontext *ctx, GLuint *width, GLuint *height ); -GLbitfield NULLClearBuffers( GLcontext *ctx, GLbitfield m, GLboolean a, GLint x, GLint y, GLint w, GLint h ); -void NULLWrSpRGB( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte r[][3], const GLubyte m[] ); -void NULLWrSpRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte r[][4], const GLubyte m[] ); -void NULLWrSpRGBAMono( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte m[] ); -void NULLWrPiRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte r[][4], const GLubyte m[] ); -void NULLWrPiRGBAMono( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte m[] ); -void NULLReSpRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte r[][4] ); -void NULLRePiRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte r[][4], const GLubyte m[] ); -/*===========================================================================*/ -/* Extern function prototypes. */ -/*===========================================================================*/ -/*===========================================================================*/ -/* Global variables. */ -/*===========================================================================*/ - -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/OPENGL32.DEF b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/OPENGL32.DEF deleted file mode 100644 index b32bd1fef8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/OPENGL32.DEF +++ /dev/null @@ -1,442 +0,0 @@ -;=========================================================================== -; -; Mesa-3.0 DirectX 6 Driver -; -; By Leigh McRae -; -; http://www.altsoftware.com/ -; -; Copyright (c) 1999-1998 alt.software inc. All Rights Reserved -;=========================================================================== -NAME OpenGL32.DLL -DESCRIPTION "Mesa-3.0 DX6 Driver Version 0.5" - -EXPORTS - DllMain - glAccum - glAlphaFunc - glAreTexturesResident - glAreTexturesResidentEXT - glArrayElement - glArrayElementEXT - glBegin - glBindTexture - glBindTextureEXT - glBitmap - glBlendColorEXT - glBlendEquationEXT - glBlendFunc - glCallList - glCallLists - glClear - glClearAccum - glClearColor - glClearDepth - glClearIndex - glClearStencil - glClipPlane - glColor3b - glColor3bv - glColor3d - glColor3dv - glColor3f - glColor3fv - glColor3i - glColor3iv - glColor3s - glColor3sv - glColor3ub - glColor3ubv - glColor3ui - glColor3uiv - glColor3us - glColor3usv - glColor4b - glColor4bv - glColor4d - glColor4dv - glColor4f - glColor4fv - glColor4i - glColor4iv - glColor4s - glColor4sv - glColor4ub - glColor4ubv - glColor4ui - glColor4uiv - glColor4us - glColor4usv - glColorMask - glColorMaterial - glColorPointer - glColorPointerEXT - glColorSubTableEXT - glColorTableEXT - glCopyPixels - glCopyTexImage1D - glCopyTexImage2D - glCopyTexSubImage1D - glCopyTexSubImage2D - glCopyTexSubImage3DEXT - glCullFace - glDeleteLists - glDeleteTextures - glDeleteTexturesEXT - glDepthFunc - glDepthMask - glDepthRange - glDisable - glDisableClientState - glDrawArrays - glDrawArraysEXT - glDrawBuffer - glDrawElements - glDrawPixels - glEdgeFlag - glEdgeFlagPointer - glEdgeFlagPointerEXT - glEdgeFlagv - glEnable - glEnableClientState - glEnd - glEndList - glEvalCoord1d - glEvalCoord1dv - glEvalCoord1f - glEvalCoord1fv - glEvalCoord2d - glEvalCoord2dv - glEvalCoord2f - glEvalCoord2fv - glEvalMesh1 - glEvalMesh2 - glEvalPoint1 - glEvalPoint2 - glFeedbackBuffer - glFinish - glFlush - glFogf - glFogfv - glFogi - glFogiv - glFrontFace - glFrustum - glGenLists - glGenTextures - glGenTexturesEXT - glGetBooleanv - glGetClipPlane - glGetColorTableEXT - glGetColorTableParameterfvEXT - glGetColorTableParameterivEXT - glGetDoublev - glGetError - glGetFloatv - glGetIntegerv - glGetLightfv - glGetLightiv - glGetMapdv - glGetMapfv - glGetMapiv - glGetMaterialfv - glGetMaterialiv - glGetPixelMapfv - glGetPixelMapuiv - glGetPixelMapusv - glGetPointerv - glGetPointervEXT - glGetPolygonStipple - glGetString - glGetTexEnvfv - glGetTexEnviv - glGetTexGendv - glGetTexGenfv - glGetTexGeniv - glGetTexImage - glGetTexLevelParameterfv - glGetTexLevelParameteriv - glGetTexParameterfv - glGetTexParameteriv - glHint - glIndexd - glIndexdv - glIndexf - glIndexfv - glIndexi - glIndexiv - glIndexMask - glIndexPointer - glIndexPointerEXT - glIndexs - glIndexsv - glIndexub - glIndexubv - glInitNames - glInterleavedArrays - glIsEnabled - glIsList - glIsTexture - glIsTextureEXT - glLightf - glLightfv - glLighti - glLightiv - glLightModelf - glLightModelfv - glLightModeli - glLightModeliv - glLineStipple - glLineWidth - glListBase - glLoadIdentity - glLoadMatrixd - glLoadMatrixf - glLoadName - glLogicOp - glMap1d - glMap1f - glMap2d - glMap2f - glMapGrid1d - glMapGrid1f - glMapGrid2d - glMapGrid2f - glMaterialf - glMaterialfv - glMateriali - glMaterialiv - glMatrixMode - glMultMatrixd - glMultMatrixf - glNewList - glNormal3b - glNormal3bv - glNormal3d - glNormal3dv - glNormal3f - glNormal3fv - glNormal3i - glNormal3iv - glNormal3s - glNormal3sv - glNormalPointer - glNormalPointerEXT - glOrtho - glPassThrough - glPixelMapfv - glPixelMapuiv - glPixelMapusv - glPixelStoref - glPixelStorei - glPixelTransferf - glPixelTransferi - glPixelZoom - glPointParameterfEXT - glPointParameterfvEXT - glPointSize - glPolygonMode - glPolygonOffset - glPolygonOffsetEXT - glPolygonStipple - glPopAttrib - glPopClientAttrib - glPopMatrix - glPopName - glPrioritizeTextures - glPrioritizeTexturesEXT - glPushAttrib - glPushClientAttrib - glPushMatrix - glPushName - glRasterPos2d - glRasterPos2dv - glRasterPos2f - glRasterPos2fv - glRasterPos2i - glRasterPos2iv - glRasterPos2s - glRasterPos2sv - glRasterPos3d - glRasterPos3dv - glRasterPos3f - glRasterPos3fv - glRasterPos3i - glRasterPos3iv - glRasterPos3s - glRasterPos3sv - glRasterPos4d - glRasterPos4dv - glRasterPos4f - glRasterPos4fv - glRasterPos4i - glRasterPos4iv - glRasterPos4s - glRasterPos4sv - glReadBuffer - glReadPixels - glRectd - glRectdv - glRectf - glRectfv - glRecti - glRectiv - glRects - glRectsv - glRenderMode - glResizeBuffersMESA - glRotated - glRotatef - glScaled - glScalef - glScissor - glSelectBuffer - glShadeModel - glStencilFunc - glStencilMask - glStencilOp - glTexCoord1d - glTexCoord1dv - glTexCoord1f - glTexCoord1fv - glTexCoord1i - glTexCoord1iv - glTexCoord1s - glTexCoord1sv - glTexCoord2d - glTexCoord2dv - glTexCoord2f - glTexCoord2fv - glTexCoord2i - glTexCoord2iv - glTexCoord2s - glTexCoord2sv - glTexCoord3d - glTexCoord3dv - glTexCoord3f - glTexCoord3fv - glTexCoord3i - glTexCoord3iv - glTexCoord3s - glTexCoord3sv - glTexCoord4d - glTexCoord4dv - glTexCoord4f - glTexCoord4fv - glTexCoord4i - glTexCoord4iv - glTexCoord4s - glTexCoord4sv - glTexCoordPointer - glTexCoordPointerEXT - glTexEnvf - glTexEnvfv - glTexEnvi - glTexEnviv - glTexGend - glTexGendv - glTexGenf - glTexGenfv - glTexGeni - glTexGeniv - glTexImage1D - glTexImage2D - glTexImage3DEXT - glTexParameterf - glTexParameterfv - glTexParameteri - glTexParameteriv - glTexSubImage1D - glTexSubImage2D - glTexSubImage3DEXT - glTranslated - glTranslatef - glVertex2d - glVertex2dv - glVertex2f - glVertex2fv - glVertex2i - glVertex2iv - glVertex2s - glVertex2sv - glVertex3d - glVertex3dv - glVertex3f - glVertex3fv - glVertex3i - glVertex3iv - glVertex3s - glVertex3sv - glVertex4d - glVertex4dv - glVertex4f - glVertex4fv - glVertex4i - glVertex4iv - glVertex4s - glVertex4sv - glVertexPointer - glVertexPointerEXT - glViewport - glWindowPos2dMESA - glWindowPos2dvMESA - glWindowPos2fMESA - glWindowPos2fvMESA - glWindowPos2iMESA - glWindowPos2ivMESA - glWindowPos2sMESA - glWindowPos2svMESA - glWindowPos3dMESA - glWindowPos3dvMESA - glWindowPos3fMESA - glWindowPos3fvMESA - glWindowPos3iMESA - glWindowPos3ivMESA - glWindowPos3sMESA - glWindowPos3svMESA - glWindowPos4dMESA - glWindowPos4dvMESA - glWindowPos4fMESA - glWindowPos4fvMESA - glWindowPos4iMESA - glWindowPos4ivMESA - glWindowPos4sMESA - glWindowPos4svMESA -; WMesaCreateContext -; WMesaDestroyContext -; WMesaMakeCurrent -; WMesaPaletteChange -; WMesaSwapBuffers -; OSMesaCreateContext -; OSMesaDestroyContext -; OSMesaMakeCurrent -; OSMesaGetCurrentContext -; OSMesaPixelStore -; OSMesaGetIntegerv -; OSMesaGetDepthBuffer - wglCopyContext - wglCreateContext - wglCreateLayerContext - wglDeleteContext -; wglDescribeLayerPlane - wglGetCurrentContext - wglGetCurrentDC -; wglGetLayerPaletteEntries - wglGetProcAddress - wglMakeCurrent -; wglRealizeLayerPalette -; wglSetLayerPaletteEntries - wglShareLists - wglSwapLayerBuffers - wglUseFontBitmapsA - wglUseFontBitmapsW - wglUseFontOutlinesA - wglUseFontOutlinesW - wglChoosePixelFormat - wglDescribePixelFormat - wglGetPixelFormat - wglSetPixelFormat - wglSwapBuffers - - - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/WGL.C b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/WGL.C deleted file mode 100644 index e3b95e1de7..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/WGL.C +++ /dev/null @@ -1,1262 +0,0 @@ -/*===========================================================================*/ -/* */ -/* Mesa-3.0 Makefile for DirectX 6 */ -/* */ -/* By Leigh McRae */ -/* */ -/* http://www.altsoftware.com/ */ -/* */ -/* Copyright (c) 1998-1997 alt.software inc. All Rights Reserved */ -/*===========================================================================*/ -#include "D3DMesa.h" -/*===========================================================================*/ -/* Window managment. */ -/*===========================================================================*/ -static BOOL InitOpenGL( HINSTANCE hInst ); -static BOOL TermOpenGL( HINSTANCE hInst ); -static BOOL ResizeContext( GLcontext *ctx ); -static BOOL MakeCurrent( D3DMESACONTEXT *pContext ); -static void DestroyContext( D3DMESACONTEXT *pContext ); -static BOOL UnBindWindow( D3DMESACONTEXT *pContext ); -LONG APIENTRY wglMonitorProc( HWND hwnd, UINT message, UINT wParam, LONG lParam ); -/*===========================================================================*/ -/* Mesa hooks. */ -/*===========================================================================*/ -static void SetupDDPointers( GLcontext *ctx ); -static void SetupSWDDPointers( GLcontext *ctx ); -static void SetupHWDDPointers( GLcontext *ctx ); -static void SetupNULLDDPointers( GLcontext *ctx ); -static const char *RendererString( void ); - -/* State Management hooks. */ -static void SetColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a ); -static void ClearColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a ); -static GLboolean SetBuffer( GLcontext *ctx, GLenum buffer ); - -/* Window Management hooks. */ -static void GetBufferSize( GLcontext *ctx, GLuint *width, GLuint *height ); -static void SetViewport( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h ); -static void Flush( GLcontext *ctx ); - -/* Span rendering hooks. */ -void WSpanRGB( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgb[][3], const GLubyte mask[] ); -void WSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] ); -void WSpanRGBAMono( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte mask[] ); -void WPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] ); -void WPixelsRGBAMono( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] ); -void RSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] ); -void RPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] ); -GLbitfield ClearBuffers( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height ); - -/* Primitve rendering hooks. */ -GLboolean RenderVertexBuffer( GLcontext *ctx, GLboolean allDone ); -void RenderOneTriangle( GLcontext *ctx, GLuint v1, GLuint v2, GLuint v3, GLuint pv ); -void RenderOneLine( GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv ); -GLbitfield ClearBuffersD3D( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height ); - -/* Texture Management hooks. */ -static void TextureBind( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj ); -static void TextureLoad( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLint level, GLint internalFormat, const struct gl_texture_image *image ); -static void TextureSubImage( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLint internalFormat, const struct gl_texture_image *image ); -/*===========================================================================*/ -/* Global variables. */ -/*===========================================================================*/ -D3DMESACONTEXT *pD3DCurrent, - *pD3DDefault; /* Thin support context. */ - -struct __extensions__ ext[] = { - - { (PROC)glPolygonOffsetEXT, "glPolygonOffsetEXT" }, - { (PROC)glBlendEquationEXT, "glBlendEquationEXT" }, - { (PROC)glBlendColorEXT, "glBlendColorExt" }, - { (PROC)glVertexPointerEXT, "glVertexPointerEXT" }, - { (PROC)glNormalPointerEXT, "glNormalPointerEXT" }, - { (PROC)glColorPointerEXT, "glColorPointerEXT" }, - { (PROC)glIndexPointerEXT, "glIndexPointerEXT" }, - { (PROC)glTexCoordPointerEXT, "glTexCoordPointer" }, - { (PROC)glEdgeFlagPointerEXT, "glEdgeFlagPointerEXT" }, - { (PROC)glGetPointervEXT, "glGetPointervEXT" }, - { (PROC)glArrayElementEXT, "glArrayElementEXT" }, - { (PROC)glDrawArraysEXT, "glDrawArrayEXT" }, - { (PROC)glAreTexturesResidentEXT, "glAreTexturesResidentEXT" }, - { (PROC)glBindTextureEXT, "glBindTextureEXT" }, - { (PROC)glDeleteTexturesEXT, "glDeleteTexturesEXT" }, - { (PROC)glGenTexturesEXT, "glGenTexturesEXT" }, - { (PROC)glIsTextureEXT, "glIsTextureEXT" }, - { (PROC)glPrioritizeTexturesEXT, "glPrioritizeTexturesEXT" }, - { (PROC)glCopyTexSubImage3DEXT, "glCopyTexSubImage3DEXT" }, - { (PROC)glTexImage3DEXT, "glTexImage3DEXT" }, - { (PROC)glTexSubImage3DEXT, "glTexSubImage3DEXT" }, -}; - -int qt_ext = sizeof(ext) / sizeof(ext[0]); -float g_DepthScale, - g_MaxDepth; -/*===========================================================================*/ -/* When a process loads this DLL we will setup the linked list for context */ -/* management and create a default context that will support the API until */ -/* the user creates and binds thier own. This THIN default context is useful*/ -/* to have around. */ -/* When the process terminates we will clean up all resources here. */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -BOOL APIENTRY DllMain( HINSTANCE hInst, DWORD reason, LPVOID reserved ) -{ - switch( reason ) - { - case DLL_PROCESS_ATTACH: - return InitOpenGL( hInst ); - - case DLL_PROCESS_DETACH: - return TermOpenGL( hInst ); - } - - return TRUE; -} -/*===========================================================================*/ -/* The first thing we do when this dll is hit is connect to the dll that has*/ -/* handles all the DirectX 6 rendering. I decided to use another dll as DX6 */ -/* is all C++ and Mesa-3.0 is C (thats a good thing). This way I can write */ -/* the DX6 in C++ and Mesa-3.0 in C without having to worry about linkage. */ -/* I feel this is easy and better then using static wrappers as it is likely */ -/* faster and it allows me to just develope the one without compiling the */ -/* other. */ -/* NOTE that at this point we don't have much other than a very thin context*/ -/* that will support the API calls only to the point of not causing the app */ -/* to crash from the API table being empty. */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -static BOOL InitOpenGL( HINSTANCE hInst ) -{ - /* Allocate and clear the default context. */ - pD3DDefault = (PD3DMESACONTEXT)ALLOC( sizeof(D3DMESACONTEXT) ); - if ( pD3DDefault == NULL ) - return FALSE; - memset( pD3DDefault, 0, sizeof(D3DMESACONTEXT) ); - - /* Clear the D3D vertex buffer so that values not used will be zero. This */ - /* save me from some redundant work. */ - memset( &D3DTLVertices, 0, sizeof(D3DTLVertices) ); - - /* Update the link. We uses a circular list so that it is easy to */ - /* add and search. This context will also be used for head and tail.*/ - pD3DDefault->next = pD3DDefault; - - /*========================================================================*/ - /* Do all core Mesa stuff. */ - /*========================================================================*/ - pD3DDefault->gl_visual = _mesa_create_visual( TRUE, - FALSE, /* db_flag */ - GL_FALSE, /* stereo */ - 8,8,8,8, /* r, g, b, a bits */ - 0, /* index bits */ - 16, /* depth_bits */ - 8, /* stencil_bits */ - 8,8,8,8, /* accum_bits */ - 1 ); - - if ( pD3DDefault->gl_visual == NULL) - { - FREE( pD3DDefault ); - return FALSE; - } - - /* Allocate a new Mesa context */ - pD3DDefault->gl_ctx = _mesa_create_context( pD3DDefault->gl_visual, NULL, pD3DDefault, GL_TRUE ); - if ( pD3DDefault->gl_ctx == NULL ) - { - _mesa_destroy_visual( pD3DDefault->gl_visual ); - FREE( pD3DDefault ); - return FALSE; - } - - /* Allocate a new Mesa frame buffer */ - pD3DDefault->gl_buffer = _mesa_create_framebuffer( pD3DDefault->gl_visual ); - if ( pD3DDefault->gl_buffer == NULL ) - { - _mesa_destroy_visual( pD3DDefault->gl_visual ); - _mesa_destroy_context( pD3DDefault->gl_ctx ); - FREE( pD3DDefault ); - return FALSE; - } - SetupDDPointers( pD3DDefault->gl_ctx ); - _mesa_make_current( pD3DDefault->gl_ctx, pD3DDefault->gl_buffer ); - - return TRUE; -} -/*===========================================================================*/ -/* This function will create a new D3D context but will not create the D3D */ -/* surfaces or even an instance of D3D (see at GetBufferSize). The only stuff*/ -/* done here is the internal Mesa stuff and some Win32 handles. */ -/*===========================================================================*/ -/* RETURN: casted pointer to the context, NULL. */ -/*===========================================================================*/ -HGLRC APIENTRY wglCreateContext( HDC hdc ) -{ - D3DMESACONTEXT *pNewContext; - DWORD dwCoopFlags = DDSCL_NORMAL; - RECT rectClient; - POINT pt; - - /* ALLOC and clear the new context. */ - pNewContext = (PD3DMESACONTEXT)ALLOC( sizeof(D3DMESACONTEXT) ); - if ( pNewContext == NULL ) - { - SetLastError( 0 ); - return (HGLRC)NULL; - } - memset( pNewContext, 0, sizeof(D3DMESACONTEXT) ); - - /*========================================================================*/ - /* Do all core Mesa stuff. */ - /*========================================================================*/ - - /* TODO: support more then one visual. */ - pNewContext->gl_visual = _mesa_create_visual( TRUE, - TRUE, /* db_flag */ - GL_FALSE, /* stereo */ - 8,8,8,8, /* r, g, b, a bits */ - 0, /* index bits */ - 16, /* depth_bits */ - 8, /* stencil_bits */ - 16,16,16,16,/* accum_bits */ - 1 ); - if ( pNewContext->gl_visual == NULL) - { - FREE( pNewContext ); - SetLastError( 0 ); - return (HGLRC)NULL; - } - - /* Allocate a new Mesa context */ - pNewContext->gl_ctx = _mesa_create_context( pNewContext->gl_visual, NULL, pNewContext, GL_TRUE ); - if ( pNewContext->gl_ctx == NULL ) - { - _mesa_destroy_visual( pNewContext->gl_visual ); - FREE( pNewContext ); - SetLastError( 0 ); - return (HGLRC)NULL; - } - - /* Allocate a new Mesa frame buffer */ - pNewContext->gl_buffer = _mesa_create_framebuffer( pNewContext->gl_visual ); - if ( pNewContext->gl_buffer == NULL ) - { - _mesa_destroy_visual( pNewContext->gl_visual ); - _mesa_destroy_context( pNewContext->gl_ctx ); - FREE( pNewContext ); - SetLastError( 0 ); - return (HGLRC)NULL; - } - - /*========================================================================*/ - /* Do all the driver stuff. */ - /*========================================================================*/ - pNewContext->hdc = hdc; - pNewContext->next = pD3DDefault->next; - pD3DDefault->next = pNewContext; /* Add to circular list. */ - - /* Create the HAL for the new context. */ - pNewContext->pShared = InitHAL( WindowFromDC(hdc) ); - - return (HGLRC)pNewContext; -} -/*===========================================================================*/ -/* This is a wrapper function that is supported by MakeCurrent. */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -BOOL APIENTRY wglMakeCurrent( HDC hdc, HGLRC hglrc ) -{ - return MakeCurrent((D3DMESACONTEXT *)hglrc); -} -/*===========================================================================*/ -/* MakeCurrent will unbind whatever context is current (if any) & then bind */ -/* the supplied context. A context that is bound has it's window proc hooked*/ -/* with the wglMonitorProc and the context pointer is saved in pD3DCurrent. */ -/* Once the context is bound we update the Mesa-3.0 hooks (SetDDPointers) and*/ -/* the viewport (Mesa-.30 and DX6). */ -/* */ -/* TODO: this function can't fail. */ -/*===========================================================================*/ -/* RETURN: TRUE */ -/*===========================================================================*/ -static BOOL MakeCurrent( D3DMESACONTEXT *pContext ) -{ - D3DMESACONTEXT *pNext; - - /*====================================================================*/ - /* This is a special case that is a request to have no context bound. */ - /*====================================================================*/ - if ( pContext == NULL ) - { - /* Walk the whole list. We start and end at the Default context. */ - for( pNext = pD3DDefault->next; pNext != pD3DDefault; pNext = pNext->next ) - UnBindWindow( pNext ); - - return TRUE; - } - - /*=================================================*/ - /* Make for a fast redundant use of this function. */ - /*=================================================*/ - if ( pD3DCurrent == pContext ) - return TRUE; - - /*=============================*/ - /* Unbind the current context. */ - /*=============================*/ - UnBindWindow( pD3DCurrent ); - - /*=====================================*/ - /* Let Mesa-3.0 we have a new context. */ - /*=====================================*/ - SetupDDPointers( pContext->gl_ctx ); - _mesa_make_current( pContext->gl_ctx, pContext->gl_buffer ); - - /* We are done so set the internal current context. */ - if ( pContext != pD3DDefault ) - { - ResizeContext( pContext->gl_ctx ); - pContext->hOldProc = (WNDPROC)GetWindowLong( pContext->pShared->hwnd, GWL_WNDPROC ); - SetWindowLong( pContext->pShared->hwnd, GWL_WNDPROC, (LONG)wglMonitorProc ); - } - pD3DCurrent = pContext; - - return TRUE; -} -/*===========================================================================*/ -/* This function will only return the current window size. I have re-done */ -/* this function so that it doesn't check the current size and react to it as*/ -/* I should be able to have all the react code in the WM_SIZE message. The */ -/* old version would check the current window size and create/resize the HAL */ -/* surfaces if they have changed. I needed to delay the creation if the */ -/* surfaces because sometimes I wouldn't have a window size so this is where */ -/* I delayed it. If you are reading this then all went ok! */ -/* The default context will return a zero sized window and I'm not sure if */ -/* this is ok at this point (TODO). */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void GetBufferSize( GLcontext *ctx, GLuint *width, GLuint *height ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - - /* Fall through for the default because that is one of the uses for it. */ - if ( pContext == pD3DDefault ) - { - *width = 0; - *height = 0; - } - else - { - *width = pContext->pShared->dwWidth; - *height = pContext->pShared->dwHeight; - } -} -/*===========================================================================*/ -/* */ -/* */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static BOOL ResizeContext( GLcontext *ctx ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx, - *pCurrentTemp; - RECT rectClient; - POINT pt; - DWORD dwWidth, - dwHeight; - static BOOL bDDrawLock = FALSE; - - /* Make sure we have some values. */ - if ( (pContext->hdc == NULL ) || - (pContext->pShared->hwnd != WindowFromDC(pContext->hdc)) || - (pContext == pD3DDefault) ) - return FALSE; - - /* Having problems with DDraw sending resize messages before I was done. */ - if( bDDrawLock == TRUE ) - return FALSE; - - // TODO: don't think I need this anymore. - pCurrentTemp = pD3DCurrent; - pD3DCurrent = pD3DDefault; - bDDrawLock = TRUE; - - /* Get the current window dimentions. */ - UpdateScreenPosHAL( pContext->pShared ); - dwWidth = pContext->pShared->rectW.right - pContext->pShared->rectW.left; - dwHeight = pContext->pShared->rectW.bottom - pContext->pShared->rectW.top; - - /* Is the size of the OffScreen Render different? */ - if ( (dwWidth != pContext->pShared->dwWidth) || (dwHeight != pContext->pShared->dwHeight) ) - { - /* Create all the D3D surfaces and device. */ - CreateHAL( pContext->pShared ); - - /* I did this so that software rendering would still work as */ - /* I don't need to scale the z values twice. */ - g_DepthScale = (pContext->pShared->bHardware) ? 1.0 : ((float)0x00FFFFFF); - g_MaxDepth = (pContext->pShared->bHardware) ? 1.0 : ((float)0x00FFFFFF); - gl_DepthRange( pContext->gl_ctx, ctx->Viewport.Near, ctx->Viewport.Far ); - - /* Make sure we have a viewport. */ - gl_Viewport( pContext->gl_ctx, 0, 0, dwWidth, dwHeight ); - - /* Update Mesa as we might have changed from SW <-> HW. */ - SetupDDPointers( pContext->gl_ctx ); - _mesa_make_current( pContext->gl_ctx, pContext->gl_buffer ); - - /* If we are in HW we need to load the current texture if there is one already. */ - // if ( (ctx->Texture.Set[ctx->Texture.CurrentSet].Current != NULL) && - // (pContext->pShared->bHardware == TRUE) ) - // { - // CreateTMgrHAL( pContext->pShared, - // ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Name, - // 0, - // ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0]->Format, - // (RECT *)NULL, - // ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0]->Width, - // ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0]->Height, - // TM_ACTION_BIND, - // (void *)ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0]->Data ); - // } - } - - // TODO: don't think I need this anymore. - pD3DCurrent = pCurrentTemp; - bDDrawLock = FALSE; - - return TRUE; -} - -/*===========================================================================* -/* This function will Blt the render buffer to the PRIMARY surface. I repeat*/ -/* this code for the other SwapBuffer like functions and the flush (didn't */ -/* want the function calling overhead). Thsi could have been a macro... */ -/* */ -/* TODO: there are some problems with viewport/scissoring. */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -BOOL APIENTRY wglSwapBuffers( HDC hdc ) -{ - /* Fall through for the default because that is one of the uses for it. */ - if ( pD3DCurrent == pD3DDefault ) - return FALSE; - - SwapBuffersHAL( pD3DCurrent->pShared ); - - return TRUE; -} -/*===========================================================================*/ -/* Same as wglSwapBuffers. */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -BOOL APIENTRY SwapBuffers( HDC hdc ) -{ - /* Fall through for the default because that is one of the uses for it. */ - if ( pD3DCurrent == pD3DDefault ) - return FALSE; - - SwapBuffersHAL( pD3DCurrent->pShared ); - - return TRUE; -} -/*===========================================================================*/ -/* This should be ok as none of the SwapBuffers will cause a redundant Blt */ -/* as none of my Swap functions will call flush. This should also allow */ -/* sinlge buffered applications to work (not really worried though). Some */ -/* applications may flush then swap but then this is there fault IMHO. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void Flush( GLcontext *ctx ) -{ - /* Fall through for the default because that is one of the uses for it. */ - if ( pD3DCurrent == pD3DDefault ) - return; - - SwapBuffersHAL( pD3DCurrent->pShared ); -} -/*===========================================================================*/ -/* For now this function will ignore the supplied PF. If I'm going to allow */ -/* the user to choice the mode and device at startup I'm going to have to do */ -/* something different. */ -/* */ -/* TODO: use the linked list of modes to build a pixel format to be returned */ -/* to the caller. */ -/*===========================================================================*/ -/* RETURN: 1. */ -/*===========================================================================*/ -int APIENTRY wglChoosePixelFormat( HDC hdc, CONST PIXELFORMATDESCRIPTOR *ppfd ) -{ - return 1; -} -/*===========================================================================*/ -/* See wglChoosePixelFormat. */ -/*===========================================================================*/ -/* RETURN: 1. */ -/*===========================================================================*/ -int APIENTRY ChoosePixelFormat( HDC hdc, CONST PIXELFORMATDESCRIPTOR *ppfd ) -{ - return wglChoosePixelFormat(hdc,ppfd); -} -/*===========================================================================*/ -/* This function (for now) returns a static PF everytime. This is just to */ -/* allow things to continue. */ -/*===========================================================================*/ -/* RETURN: 1. */ -/*===========================================================================*/ -int APIENTRY wglDescribePixelFormat( HDC hdc, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd ) -{ - static PIXELFORMATDESCRIPTOR pfd = - { - sizeof(PIXELFORMATDESCRIPTOR), /* size */ - 1, /* version */ - PFD_SUPPORT_OPENGL | - PFD_DRAW_TO_WINDOW | - PFD_DOUBLEBUFFER, /* support double-buffering */ - PFD_TYPE_RGBA, /* color type */ - 16, /* prefered color depth */ - 0, 0, 0, 0, 0, 0, /* color bits (ignored) */ - 0, /* no alpha buffer */ - 0, /* alpha bits (ignored) */ - 0, /* no accumulation buffer */ - 0, 0, 0, 0, /* accum bits (ignored) */ - 16, /* depth buffer */ - 0, /* no stencil buffer */ - 0, /* no auxiliary buffers */ - PFD_MAIN_PLANE, /* main layer */ - 0, /* reserved */ - 0, 0, 0, /* no layer, visible, damage masks */ - }; - - /* Return the address of this static PF if one was requested. */ - if ( ppfd != NULL ) - memcpy( ppfd, &pfd, sizeof(PIXELFORMATDESCRIPTOR) ); - - return 1; -} -/*===========================================================================*/ -/* See wglDescribePixelFormat. */ -/*===========================================================================*/ -/* RETURN: 1. */ -/*===========================================================================*/ -int APIENTRY DescribePixelFormat( HDC hdc, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd ) -{ - return wglDescribePixelFormat(hdc,iPixelFormat,nBytes,ppfd); -} -/*===========================================================================*/ -/* This function will always return 1 for now. Just to allow for support. */ -/*===========================================================================*/ -/* RETURN: 1. */ -/*===========================================================================*/ -int APIENTRY wglGetPixelFormat( HDC hdc ) -{ - return 1; -} -/*===========================================================================*/ -/* See wglGetPixelFormat. */ -/*===========================================================================*/ -/* RETURN: 1. */ -/*===========================================================================*/ -int APIENTRY GetPixelFormat( HDC hdc ) -{ - return wglGetPixelFormat(hdc); -} -/*===========================================================================*/ -/* This will aways work for now. */ -/*===========================================================================*/ -/* RETURN: TRUE. */ -/*===========================================================================*/ -BOOL APIENTRY wglSetPixelFormat( HDC hdc, int iPixelFormat, CONST PIXELFORMATDESCRIPTOR *ppfd ) -{ - return TRUE; -} -/*===========================================================================*/ -/* See wglSetPixelFormat. */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -BOOL APIENTRY SetPixelFormat( HDC hdc, int iPixelFormat, CONST PIXELFORMATDESCRIPTOR *ppfd ) -{ - return wglSetPixelFormat(hdc,iPixelFormat,ppfd); -} -/*===========================================================================*/ -/* This is a wrapper function that is supported by my own internal function.*/ -/* that takes my own D3D Mesa context structure. This so I can reuse the */ -/* function (no need for speed). */ -/*===========================================================================*/ -/* RETURN: TRUE. */ -/*===========================================================================*/ -BOOL APIENTRY wglDeleteContext( HGLRC hglrc ) -{ - DestroyContext( (D3DMESACONTEXT *)hglrc ); - - return TRUE; -} -/*===========================================================================*/ -/* Simple getter function that uses a cast. */ -/*===========================================================================*/ -/* RETURN: casted pointer to the context, NULL. */ -/*===========================================================================*/ -HGLRC APIENTRY wglGetCurrentContext( VOID ) -{ - return (pD3DCurrent) ? (HGLRC)pD3DCurrent : (HGLRC)NULL; -} -/*===========================================================================*/ -/* No support. */ -/*===========================================================================*/ -/* RETURN: FALSE. */ -/*===========================================================================*/ -BOOL APIENTRY wglCopyContext( HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask ) -{ - SetLastError( 0 ); - return FALSE; -} -/*===========================================================================*/ -/* No support. */ -/*===========================================================================*/ -/* RETURN: NULL. */ -/*===========================================================================*/ -HGLRC APIENTRY wglCreateLayerContext( HDC hdc,int iLayerPlane ) -{ - SetLastError( 0 ); - return (HGLRC)NULL; -} -/*===========================================================================*/ -/* Simple getter function. */ -/*===========================================================================*/ -/* RETURN: FALSE. */ -/*===========================================================================*/ -HDC APIENTRY wglGetCurrentDC( VOID ) -{ - return (pD3DCurrent) ? pD3DCurrent->hdc : (HDC)NULL; -} -/*===========================================================================*/ -/* Simply call that searches the supported extensions for a match & returns */ -/* the pointer to the function that lends support. */ -/*===========================================================================*/ -/* RETURN: pointer to API call, NULL. */ -/*===========================================================================*/ -PROC APIENTRY wglGetProcAddress( LPCSTR lpszProc ) -{ - int index; - - for( index = 0; index < qt_ext; index++ ) - if( !strcmp(lpszProc,ext[index].name) ) - return ext[index].proc; - - SetLastError( 0 ); - return NULL; -} -/*===========================================================================*/ -/* No support. */ -/*===========================================================================*/ -/* RETURN: FALSE. */ -/*===========================================================================*/ -BOOL APIENTRY wglShareLists( HGLRC hglrc1, HGLRC hglrc2 ) -{ - SetLastError( 0 ); - return FALSE; -} -/*===========================================================================*/ -/* No support. */ -/*===========================================================================*/ -/* RETURN: FALSE. */ -/*===========================================================================*/ -BOOL APIENTRY wglUseFontBitmaps( HDC fontDevice, DWORD firstChar, DWORD numChars, DWORD listBase ) -{ - SetLastError( 0 ); - return FALSE; -} -/*===========================================================================*/ -/* No support. */ -/*===========================================================================*/ -/* RETURN: FALSE. */ -/*===========================================================================*/ -BOOL APIENTRY wglUseFontBitmapsW( HDC hdc,DWORD first,DWORD count,DWORD listBase ) -{ - SetLastError( 0 ); - return FALSE; -} -/*===========================================================================*/ -/* No support. */ -/*===========================================================================*/ -/* RETURN: FALSE. */ -/*===========================================================================*/ -BOOL APIENTRY wglUseFontOutlinesA( HDC hdc, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf ) -{ - SetLastError( 0 ); - return FALSE; -} -/*===========================================================================*/ -/* No support. */ -/*===========================================================================*/ -/* RETURN: FALSE. */ -/*===========================================================================*/ -BOOL APIENTRY wglUseFontOutlinesW( HDC hdc,DWORD first,DWORD count, DWORD listBase,FLOAT deviation, FLOAT extrusion,int format, LPGLYPHMETRICSFLOAT lpgmf ) -{ - SetLastError( 0 ); - return FALSE ; -} -/*===========================================================================*/ -/* No support. */ -/*===========================================================================*/ -/* RETURN: FALSE. */ -/*===========================================================================*/ -BOOL APIENTRY wglSwapLayerBuffers( HDC hdc, UINT fuPlanes ) -{ - SetLastError( 0 ); - return FALSE; -} -/*===========================================================================*/ -/* This function will be hooked into the window that has been bound. Right */ -/* now it is used to track the window size and position. Also the we clean */ -/* up the currrent context when the window is close/destroyed. */ -/* */ -/* TODO: there might be something wrong here as some games (Heretic II) don't*/ -/* track the window quit right. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -LONG APIENTRY wglMonitorProc( HWND hwnd, UINT message, UINT wParam, LONG lParam ) -{ - WNDPROC hOldProc; - GLint width, - height; - - switch( message ) - { -// case WM_PAINT: -// break; -// case WM_ACTIVATE: -// break; -// case WM_SHOWWINDOW: -// break; - - case UM_FATALSHUTDOWN: - /* Support the API until we die... */ - MakeCurrent( pD3DDefault ); - break; - - case WM_MOVE: - case WM_DISPLAYCHANGE: - case WM_SIZE: - ResizeContext( pD3DCurrent->gl_ctx ); - break; - - case WM_CLOSE: - case WM_DESTROY: - /* Support the API until we die... */ - hOldProc = pD3DCurrent->hOldProc; - DestroyContext( pD3DCurrent ); - return (hOldProc)(hwnd,message,wParam,lParam); - } - - return (pD3DCurrent->hOldProc)(hwnd,message,wParam,lParam); -} - -/**********************************************************************/ -/***** Miscellaneous device driver funcs *****/ -/**********************************************************************/ - -/*===========================================================================*/ -/* Not reacting to this as I'm only supporting drawing to the back buffer */ -/* right now. */ -/*===========================================================================*/ -/* RETURN: TRUE. */ -/*===========================================================================*/ -static GLboolean SetBuffer( GLcontext *ctx, GLenum buffer ) -{ - if (buffer == GL_BACK_LEFT) - return GL_TRUE; - else - return GL_FALSE; -} -/*===========================================================================*/ -/* This proc will be called by Mesa when the viewport has been set. So if */ -/* we have a context and it isn't the default then we should let D3D know of */ -/* the change. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void SetViewport( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - RECT rect; - - /* Make sure we can set a viewport. */ - if ( pContext->pShared && (pContext != pD3DDefault) ) - { - // TODO: might be needed. - UpdateScreenPosHAL( pContext->pShared ); - rect.left = x; - rect.right = x + w; - rect.top = y; - rect.bottom = y + h; - - // TODO: shared struct should make this call smaller - SetViewportHAL( pContext->pShared, &rect, 0.0F, 1.0F ); - } -} -/*===========================================================================*/ -/* This function could be better I guess but I decided just to grab the four*/ -/* components and store then seperately. Makes it easier to use IMHO. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void ClearColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - - pContext->aClear = a; - pContext->bClear = b; - pContext->gClear = g; - pContext->rClear = r; -} -/*===========================================================================*/ -/* This function could be better I guess but I decided just to grab the four*/ -/* components and store then seperately. Makes it easier to use IMHO. */ -/* (is there an echo in here?) */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void SetColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - - pContext->aCurrent = a; - pContext->bCurrent = b; - pContext->gCurrent = g; - pContext->rCurrent = r; -} -/*===========================================================================*/ -/* */ -/* */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static const char *RendererString( void ) -{ - static char pszRender[64]; - - strcpy( pszRender, "altD3D " ); - - if ( pD3DCurrent->pShared->bHardware ) - strcat( pszRender, "(HW)"); - else - strcat( pszRender, "(SW)"); - - return (const char *)pszRender; -} -/*===========================================================================*/ -/* This function will choose which set of pointers Mesa will use based on */ -/* whether we hard using hardware or software. I have added another set of */ -/* pointers that will do nothing but stop the API from crashing. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void SetupDDPointers( GLcontext *ctx ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - - // TODO: write a generic NULL support for the span render. - if ( pContext->pShared && pContext->pShared->bHardware ) - { - ctx->Driver.UpdateState = SetupHWDDPointers; - } - else if ( pContext == pD3DDefault ) - { - ctx->Driver.UpdateState = SetupNULLDDPointers; - } - else - { - ctx->Driver.UpdateState = SetupSWDDPointers; - } -} -/*===========================================================================*/ -/* This function will populate all the Mesa driver hooks. This version of */ -/* hooks will do nothing but support the API when we don't have a valid */ -/* context bound. This is mostly for applications that don't behave right */ -/* and also to help exit as clean as possable when we have a FatalError. */ -/*===========================================================================*/ -/* RETURN: pointer to the specific function. */ -/*===========================================================================*/ -static void SetupNULLDDPointers( GLcontext *ctx ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - - /* Initialize all the pointers in the DD struct. Do this whenever */ - /* a new context is made current or we change buffers via set_buffer! */ - ctx->Driver.UpdateState = SetupNULLDDPointers; - - /* State management hooks. */ - ctx->Driver.Color = NULLSetColor; - ctx->Driver.ClearColor = NULLClearColor; - ctx->Driver.Clear = NULLClearBuffers; - ctx->Driver.SetBuffer = NULLSetBuffer; - - /* Window management hooks. */ - ctx->Driver.GetBufferSize = NULLGetBufferSize; - - /* Primitive rendering hooks. */ - ctx->Driver.TriangleFunc = NULL; - ctx->Driver.RenderVB = NULL; - - /* Pixel/span writing functions: */ - ctx->Driver.WriteRGBASpan = NULLWrSpRGBA; - ctx->Driver.WriteRGBSpan = NULLWrSpRGB; - ctx->Driver.WriteMonoRGBASpan = NULLWrSpRGBAMono; - ctx->Driver.WriteRGBAPixels = NULLWrPiRGBA; - ctx->Driver.WriteMonoRGBAPixels = NULLWrPiRGBAMono; - - /* Pixel/span reading functions: */ - ctx->Driver.ReadRGBASpan = NULLReSpRGBA; - ctx->Driver.ReadRGBAPixels = NULLRePiRGBA; - - /* Misc. hooks. */ - ctx->Driver.RendererString = RendererString; -} -/*===========================================================================*/ -/* This function will populate all the Mesa driver hooks. There are two of */ -/* these functions. One if we have hardware support and one is there is only*/ -/* software. These functions will be called by Mesa and by the wgl.c when we*/ -/* have resized (or created) the buffers. The thing is that if a window gets*/ -/* resized we may loose hardware support or gain it... */ -/*===========================================================================*/ -/* RETURN: pointer to the specific function. */ -/*===========================================================================*/ -static void SetupSWDDPointers( GLcontext *ctx ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - - /* Initialize all the pointers in the DD struct. Do this whenever */ - /* a new context is made current or we change buffers via set_buffer! */ - ctx->Driver.UpdateState = SetupSWDDPointers; - - /* State management hooks. */ - ctx->Driver.Color = SetColor; - ctx->Driver.ClearColor = ClearColor; - ctx->Driver.Clear = ClearBuffers; - ctx->Driver.SetBuffer = SetBuffer; - - /* Window management hooks. */ - ctx->Driver.GetBufferSize = GetBufferSize; - ctx->Driver.Viewport = SetViewport; - - /* Primitive rendering hooks. */ - ctx->Driver.TriangleFunc = NULL; - ctx->Driver.RenderVB = NULL; - - /* Texture management hooks. */ - - /* Pixel/span writing functions: */ - ctx->Driver.WriteRGBASpan = WSpanRGBA; - ctx->Driver.WriteRGBSpan = WSpanRGB; - ctx->Driver.WriteMonoRGBASpan = WSpanRGBAMono; - ctx->Driver.WriteRGBAPixels = WPixelsRGBA; - ctx->Driver.WriteMonoRGBAPixels = WPixelsRGBAMono; - - /* Pixel/span reading functions: */ - ctx->Driver.ReadRGBASpan = RSpanRGBA; - ctx->Driver.ReadRGBAPixels = RPixelsRGBA; - - /* Misc. hooks. */ - ctx->Driver.Flush = Flush; - ctx->Driver.RendererString = RendererString; -} -/*===========================================================================*/ -/* This function will populate all the Mesa driver hooks. There are two of */ -/* these functions. One if we have hardware support and one is there is only*/ -/* software. These functions will be called by Mesa and by the wgl.c when we*/ -/* have resized (or created) the buffers. The thing is that if a window gets*/ -/* resized we may loose hardware support or gain it... */ -/*===========================================================================*/ -/* RETURN: pointer to the specific function. */ -/*===========================================================================*/ -static void SetupHWDDPointers( GLcontext *ctx ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - - /* Initialize all the pointers in the DD struct. Do this whenever */ - /* a new context is made current or we change buffers via set_buffer! */ - ctx->Driver.UpdateState = SetupHWDDPointers; - - /* State management hooks. */ - ctx->Driver.Color = SetColor; - ctx->Driver.ClearColor = ClearColor; - ctx->Driver.Clear = ClearBuffersD3D; - ctx->Driver.SetBuffer = SetBuffer; - - /* Window management hooks. */ - ctx->Driver.GetBufferSize = GetBufferSize; - ctx->Driver.Viewport = SetViewport; - - /* Primitive rendering hooks. */ - ctx->Driver.TriangleFunc = RenderOneTriangle; - ctx->Driver.LineFunc = RenderOneLine; - ctx->Driver.RenderVB = RenderVertexBuffer; - - /* Pixel/span writing functions: */ - ctx->Driver.WriteRGBASpan = WSpanRGBA; - ctx->Driver.WriteRGBSpan = WSpanRGB; - ctx->Driver.WriteMonoRGBASpan = WSpanRGBAMono; - ctx->Driver.WriteRGBAPixels = WPixelsRGBA; - ctx->Driver.WriteMonoRGBAPixels = WPixelsRGBAMono; - - /* Pixel/span reading functions: */ - ctx->Driver.ReadRGBASpan = RSpanRGBA; - ctx->Driver.ReadRGBAPixels = RPixelsRGBA; - - /* Texture management hooks. */ - // ctx->Driver.BindTexture = TextureBind; - ctx->Driver.TexImage = TextureLoad; - ctx->Driver.TexSubImage = TextureSubImage; - - /* Misc. hooks. */ - ctx->Driver.Flush = Flush; - ctx->Driver.RendererString = RendererString; -} -/*===========================================================================*/ -/* This function will release all resources used by the DLL. Every context */ -/* will be clobbered by releaseing all driver desources and then freeing the */ -/* context memory. Most all the work is done in DestroyContext. */ -/*===========================================================================*/ -/* RETURN: TRUE. */ -/*===========================================================================*/ -static BOOL TermOpenGL( HINSTANCE hInst ) -{ - D3DMESACONTEXT *pTmp, - *pNext; - - /* Just incase we are still getting paint msg. */ - MakeCurrent( pD3DDefault ); - - /* Walk the list until we get back to the default context. */ - for( pTmp = pD3DDefault->next; pTmp != pD3DDefault; pTmp = pNext ) - { - pNext = pTmp->next; - DestroyContext( pTmp ); - } - DestroyContext( pD3DDefault ); - - return TRUE; -} -/*===========================================================================*/ -/* This function is an internal function that will clean up all the Mesa */ -/* context bound to this D3D context. Also any D3D stuff that this context */ -/* uses will be unloaded. */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -static void DestroyContext( D3DMESACONTEXT *pContext ) -{ - D3DMESACONTEXT *pTmp; - - /* Walk the list until we find the context before this one. */ - for( pTmp = pD3DDefault; pTmp && (pTmp->next != pContext); pTmp = pTmp->next ) - if ( pTmp == pTmp->next ) - break; - - /* If we never found it it must already be deleted. */ - if ( pTmp->next != pContext ) - return; - - /* Make sure we are not using this context. */ - if ( pContext == pD3DCurrent ) - MakeCurrent( pD3DDefault ); - - /* Free the Mesa stuff. */ - if ( pContext->gl_visual ) - { - _mesa_destroy_visual( pContext->gl_visual ); - pContext->gl_visual = NULL; - } - if ( pContext->gl_buffer ) - { - _mesa_destroy_framebuffer( pContext->gl_buffer ); - pContext->gl_buffer = NULL; - } - if ( pContext->gl_ctx ) - { - _mesa_destroy_context( pContext->gl_ctx ); - pContext->gl_ctx = NULL; - } - - /* Now dump the D3D. */ - if ( pContext->pShared ) - TermHAL( pContext->pShared ); - - /* Update the previous context's link. */ - pTmp->next = pContext->next; - - /* Gonzo. */ - FREE( pContext ); -} -/*===========================================================================*/ -/* This function will pull the supplied context away from Win32. Basicly it*/ -/* will remove the hook from the window Proc. */ -/* */ -/* TODO: might want to serialize this stuff... */ -/*===========================================================================*/ -/* RETURN: TRUE, FALSE. */ -/*===========================================================================*/ -static BOOL UnBindWindow( D3DMESACONTEXT *pContext ) -{ - if ( pContext == NULL ) - return FALSE; - - if ( pContext == pD3DDefault ) - return TRUE; - - /* Make sure we always have a context bound. */ - if ( pContext == pD3DCurrent ) - pD3DCurrent = pD3DDefault; - - SetWindowLong( pContext->pShared->hwnd, GWL_WNDPROC, (LONG)pContext->hOldProc ); - pContext->hOldProc = NULL; - - return TRUE; -} -/*===========================================================================*/ -/* There are two cases that allow for a faster clear when we know that the */ -/* whole buffer is cleared and that there is no clipping. */ -/*===========================================================================*/ -/* RETURN: the original mask with the bits cleared that represents the buffer* -/* or buffers we just cleared. */ -/*===========================================================================*/ -GLbitfield ClearBuffersD3D( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - DWORD dwFlags = 0; - - if ( mask & GL_COLOR_BUFFER_BIT ) - { - dwFlags |= D3DCLEAR_TARGET; - mask &= ~GL_COLOR_BUFFER_BIT; - } - if ( mask & GL_DEPTH_BUFFER_BIT ) - { - dwFlags |= D3DCLEAR_ZBUFFER; - mask &= ~GL_DEPTH_BUFFER_BIT; - } - if ( dwFlags == 0 ) - return mask; - - ClearHAL( pContext->pShared, - dwFlags, - all, - x, y, - width, height, - ((pContext->aClear<<24) | (pContext->rClear<<16) | (pContext->gClear<<8) | (pContext->bClear)), - ctx->Depth.Clear, - 0 ); - - return mask; -} - - - -/*===========================================================================*/ -/* TEXTURE MANAGER: ok here is how I did textures. Mesa-3.0 will keep track*/ -/* of all the textures for us. So this means that at anytime we can go to */ -/* the Mesa context and get the current texture. With this in mind this is */ -/* what I did. I really don't care about what textures get or are loaded */ -/* until I actually have to draw a tri that is textured. At this point I */ -/* must have the texture so I demand the texture by destorying all other */ -/* texture surfaces if need be and load the current one. This allows for the*/ -/* best preformance on low memory cards as time is not wasted loading and */ -/* unload textures. */ -/*===========================================================================*/ - - - - - -/*===========================================================================*/ -/* TextureLoad will try and create a D3D surface from the supplied texture */ -/* object if its level 0 (first). The surface will be fully filled with the */ -/* texture. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void TextureLoad( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLint level, GLint internalFormat, const struct gl_texture_image *image ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - - /* TODO: only doing first LOD. */ - if ( (ctx->DriverCtx == NULL) || (level != 0) ) - return; - - CreateTMgrHAL( pContext->pShared, - tObj->Name, - level, - tObj->Image[level]->Format, - (RECT *)NULL, - tObj->Image[level]->Width, - tObj->Image[level]->Height, - TM_ACTION_LOAD, - (void *)tObj->Image[level]->Data ); -} -/*===========================================================================*/ -/* TextureBind make sure that the texture is on the card. Thats it. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void TextureBind( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - - /* TODO: only doing first LOD. */ - if ( (tObj->Image[0] == NULL) || (ctx->DriverCtx == NULL) ) - return; - - CreateTMgrHAL( pContext->pShared, - tObj->Name, - 0, - tObj->Image[0]->Format, - (RECT *)NULL, - tObj->Image[0]->Width, - tObj->Image[0]->Height, - TM_ACTION_BIND, - (void *)tObj->Image[0]->Data ); -} -/*===========================================================================*/ -/* TextureSubImage will make sure that the texture being updated is updated */ -/* if its on the card. */ -/*===========================================================================*/ -/* RETURN: */ -/*===========================================================================*/ -static void TextureSubImage( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLint internalFormat, const struct gl_texture_image *image ) -{ - D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx; - RECT rect; - - /* TODO: only doing first LOD. */ - if ( (ctx->DriverCtx == NULL) || (level > 0) ) - return; - - /* Create a dirty rectangle structure. */ - rect.left = xoffset; - rect.right = xoffset + width; - rect.top = yoffset; - rect.bottom = yoffset + height; - - CreateTMgrHAL( pContext->pShared, - tObj->Name, - 0, - tObj->Image[0]->Format, - &rect, - tObj->Image[0]->Width, - tObj->Image[0]->Height, - TM_ACTION_UPDATE, - (void *)tObj->Image[0]->Data ); -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/d3dText.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/d3dText.h deleted file mode 100644 index 9ff0650518..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/d3d/d3dText.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef D3D_TEXT_H -#define D3D_TEXT_H - - -#ifdef __cplusplus -extern "C" { -#endif - -/*===========================================================================*/ -/* Includes. */ -/*===========================================================================*/ -#include -#include -#include -/*===========================================================================*/ -/* Magic numbers. */ -/*===========================================================================*/ -#define D3DLTEXT_BITSUSED 0xFFFFFFFF -#define MAX_VERTICES 700 // (14*40) 14 per character, 40 characters -/*===========================================================================*/ -/* Macros defines. */ -/*===========================================================================*/ -/*===========================================================================*/ -/* Type defines. */ -/*===========================================================================*/ -typedef struct _d3dText_metrics -{ - float fntYScale, - fntXScale; - - int fntXSpacing, - fntYSpacing; - - DWORD dwColor; - LPDIRECT3DDEVICE3 lpD3DDevice; - -} D3DFONTMETRICS, *PD3DFONTMETRICS; -/*===========================================================================*/ -/* Function prototypes. */ -/*===========================================================================*/ -extern BOOL InitD3DText( void ); -extern void d3dTextDrawCharacter( char *c, int x, int y, PD3DFONTMETRICS pfntMetrics ); -extern void d3dTextDrawString( char *pszString, int x, int y, PD3DFONTMETRICS pfntMetrics ); -/*===========================================================================*/ -/* Global variables. */ -/*===========================================================================*/ - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/directfb/Makefile b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/directfb/Makefile deleted file mode 100644 index 56f7eac7ca..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/directfb/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# src/mesa/drivers/directfb/Makefile - -TOP = ../../../.. - -include $(TOP)/configs/current - - -INCLUDE_DIRS = \ - -I$(TOP)/include \ - -I$(TOP)/src/mesa \ - -I$(TOP)/src/mesa/main \ - -I$(TOP)/src/mesa/glapi \ - -I$(TOP)/src/mesa/math \ - -I$(TOP)/src/mesa/tnl \ - -I$(TOP)/src/mesa/shader \ - -I$(TOP)/src/mesa/swrast \ - -I$(TOP)/src/mesa/swrast_setup - -DFB_CFLAGS = $(shell pkg-config --cflags directfb) -DFB_MODULEDIR = $(shell pkg-config --variable=moduledir directfb-internal) - -DIRECTFBGL_MESA_SOURCES = ../common/driverfuncs.c idirectfbgl_mesa.c - -DIRECTFBGL_MESA_OBJECTS = $(DIRECTFBGL_MESA_SOURCES:.c=.o) - -DIRECTFBGL_MESA = libidirectfbgl_mesa.so - -.c.o: - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DFB_CFLAGS) $< -o $@ - - -default: directfbgl_mesa - -# Mesa DirectFBGL module -directfbgl_mesa: $(DIRECTFBGL_MESA_OBJECTS) - $(CC) -shared $(CFLAGS) $(DIRECTFBGL_MESA_OBJECTS) -o $(DIRECTFBGL_MESA) \ - -Wl,-soname -Wl,$(DIRECTFBGL_MESA) -L$(TOP)/lib -lGL -lm - - -install: - @if test -d $(DFB_MODULEDIR); then \ - echo "Installing DirectFBGL module."; \ - else \ - echo "*** Failed to determine DirectFB module's directory."; \ - echo "*** Installation aborted."; \ - exit 1; \ - fi; - test -d $(DFB_MODULEDIR)/interfaces/IDirectFBGL/ || mkdir $(DFB_MODULEDIR)/interfaces/IDirectFBGL/ - install -m 755 $(DIRECTFBGL_MESA) $(DFB_MODULEDIR)/interfaces/IDirectFBGL/ - - -clean: - rm -f *.o *.so - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/directfb/idirectfbgl_mesa.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/directfb/idirectfbgl_mesa.c deleted file mode 100644 index 1c481af3f2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/directfb/idirectfbgl_mesa.c +++ /dev/null @@ -1,665 +0,0 @@ -/* - * Copyright (C) 2004-2005 Claudio Ciccani - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * - * Based on glfbdev.c, written by Brian Paul. - * - */ - -#include -#include -#include - -#include - -#include -#include -#include - -#ifdef CLAMP -# undef CLAMP -#endif - -#include "GL/directfbgl.h" -#include "glheader.h" -#include "buffers.h" -#include "context.h" -#include "extensions.h" -#include "framebuffer.h" -#include "renderbuffer.h" -#include "imports.h" -#include "texformat.h" -#include "teximage.h" -#include "texstore.h" -#include "array_cache/acache.h" -#include "swrast/swrast.h" -#include "swrast_setup/swrast_setup.h" -#include "tnl/tnl.h" -#include "tnl/t_context.h" -#include "tnl/t_pipeline.h" -#include "drivers/common/driverfuncs.h" - - -static DFBResult -Probe( void *data ); - -static DFBResult -Construct( IDirectFBGL *thiz, - IDirectFBSurface *surface ); - -#include - -DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBGL, Mesa ) - -/* - * private data struct of IDirectFBGL - */ -typedef struct { - int ref; /* reference counter */ - - bool locked; - - IDirectFBSurface *surface; - DFBSurfacePixelFormat format; - int width; - int height; - - struct { - __u8 *start; - __u8 *end; - int pitch; - } video; - - GLvisual visual; - GLframebuffer framebuffer; - GLcontext context; - struct gl_renderbuffer render; -} IDirectFBGL_data; - - -static bool dfb_mesa_setup_visual ( GLvisual *visual, - DFBSurfacePixelFormat format ); -static bool dfb_mesa_create_context ( GLcontext *context, - GLframebuffer *framebuffer, - GLvisual *visual, - DFBSurfacePixelFormat format, - IDirectFBGL_data *data ); -static void dfb_mesa_destroy_context( GLcontext *context, - GLframebuffer *framebuffer ); - - -static void -IDirectFBGL_Destruct( IDirectFBGL *thiz ) -{ - IDirectFBGL_data *data = (IDirectFBGL_data*) thiz->priv; - - dfb_mesa_destroy_context( &data->context, &data->framebuffer ); - - data->surface->Release( data->surface ); - - DIRECT_DEALLOCATE_INTERFACE( thiz ); -} - -static DFBResult -IDirectFBGL_AddRef( IDirectFBGL *thiz ) -{ - DIRECT_INTERFACE_GET_DATA( IDirectFBGL ); - - data->ref++; - - return DFB_OK; -} - -static DFBResult -IDirectFBGL_Release( IDirectFBGL *thiz ) -{ - DIRECT_INTERFACE_GET_DATA( IDirectFBGL ) - - if (--data->ref == 0) { - IDirectFBGL_Destruct( thiz ); - } - - return DFB_OK; -} - -static DFBResult -IDirectFBGL_Lock( IDirectFBGL *thiz ) -{ - IDirectFBSurface *surface; - int width = 0; - int height = 0; - DFBResult err; - - DIRECT_INTERFACE_GET_DATA( IDirectFBGL ); - - if (data->locked) - return DFB_LOCKED; - - surface = data->surface; - surface->GetSize( surface, &width, &height ); - - err = surface->Lock( surface, DSLF_READ | DSLF_WRITE, - (void**) &data->video.start, &data->video.pitch ); - if (err != DFB_OK) { - D_ERROR( "DirectFBGL/Mesa: couldn't lock surface.\n" ); - return err; - } - data->video.end = data->video.start + (height-1) * data->video.pitch; - - data->render.Data = data->video.start; - - if (data->width != width || data->height != height) { - data->width = width; - data->height = height; - _mesa_ResizeBuffersMESA(); - } - - data->locked = true; - - return DFB_OK; -} - -static DFBResult -IDirectFBGL_Unlock( IDirectFBGL *thiz ) -{ - DIRECT_INTERFACE_GET_DATA( IDirectFBGL ); - - if (!data->locked) - return DFB_OK; - - data->surface->Unlock( data->surface ); - data->video.start = NULL; - data->video.end = NULL; - - data->locked = false; - - return DFB_OK; -} - -static DFBResult -IDirectFBGL_GetAttributes( IDirectFBGL *thiz, - DFBGLAttributes *attributes ) -{ - GLvisual *visual; - - DIRECT_INTERFACE_GET_DATA( IDirectFBGL ); - - if (!attributes) - return DFB_INVARG; - - visual = &data->visual; - - attributes->buffer_size = visual->rgbBits ? : visual->indexBits; - attributes->depth_size = visual->depthBits; - attributes->stencil_size = visual->stencilBits; - attributes->aux_buffers = visual->numAuxBuffers; - attributes->red_size = visual->redBits; - attributes->green_size = visual->greenBits; - attributes->blue_size = visual->blueBits; - attributes->alpha_size = visual->alphaBits; - attributes->accum_red_size = visual->accumRedBits; - attributes->accum_green_size = visual->accumGreenBits; - attributes->accum_blue_size = visual->accumBlueBits; - attributes->accum_alpha_size = visual->accumAlphaBits; - attributes->double_buffer = (visual->doubleBufferMode != 0); - attributes->stereo = (visual->stereoMode != 0); - - return DFB_OK; -} - - -/* exported symbols */ - -static DFBResult -Probe( void *data ) -{ - return DFB_OK; -} - -static DFBResult -Construct( IDirectFBGL *thiz, - IDirectFBSurface *surface ) -{ - /* Allocate interface data. */ - DIRECT_ALLOCATE_INTERFACE_DATA( thiz, IDirectFBGL ); - - /* Initialize interface data. */ - data->ref = 1; - data->surface = surface; - - surface->AddRef( surface ); - surface->GetPixelFormat( surface, &data->format ); - surface->GetSize( surface, &data->width, &data->height ); - - /* Configure visual. */ - if (!dfb_mesa_setup_visual( &data->visual, data->format )) { - D_ERROR( "DirectFBGL/Mesa: failed to initialize visual.\n" ); - surface->Release( surface ); - return DFB_UNSUPPORTED; - } - - /* Create context. */ - if (!dfb_mesa_create_context( &data->context, &data->framebuffer, - &data->visual, data->format, data )) { - D_ERROR( "DirectFBGL/Mesa: failed to create context.\n" ); - surface->Release( surface ); - return DFB_UNSUPPORTED; - } - - /* Assign interface pointers. */ - thiz->AddRef = IDirectFBGL_AddRef; - thiz->Release = IDirectFBGL_Release; - thiz->Lock = IDirectFBGL_Lock; - thiz->Unlock = IDirectFBGL_Unlock; - thiz->GetAttributes = IDirectFBGL_GetAttributes; - - return DFB_OK; -} - - -/* internal functions */ - -static const GLubyte* -get_string( GLcontext *ctx, GLenum pname ) -{ - switch (pname) { - case GL_VENDOR: - return "Claudio Ciccani"; - case GL_VERSION: - return "1.0"; - default: - return NULL; - } -} - -static void -update_state( GLcontext *ctx, GLuint new_state ) -{ - _swrast_InvalidateState( ctx, new_state ); - _swsetup_InvalidateState( ctx, new_state ); - _ac_InvalidateState( ctx, new_state ); - _tnl_InvalidateState( ctx, new_state ); -} - -static void -get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height ) -{ - GLcontext *ctx = _mesa_get_current_context(); - IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx; - - *width = (GLuint) data->width; - *height = (GLuint) data->height; -} - -static void -set_viewport( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h ) -{ - _mesa_ResizeBuffersMESA(); -} - -/* required but not used */ -static void -set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit ) -{ - return; -} - -static void -delete_renderbuffer( struct gl_renderbuffer *render ) -{ - return; -} - -static GLboolean -renderbuffer_storage( GLcontext *ctx, struct gl_renderbuffer *render, - GLenum internalFormat, GLuint width, GLuint height ) -{ - return GL_TRUE; -} - - -/* RGB332 */ -#define NAME(PREFIX) PREFIX##_RGB332 -#define FORMAT GL_RGBA8 -#define SPAN_VARS \ - IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx; -#define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = data->video.end - (Y) * data->video.pitch + (X); -#define INC_PIXEL_PTR(P) P += 1 -#define STORE_PIXEL(P, X, Y, S) \ - *P = ( (((S[RCOMP]) & 0xe0)) | (((S[GCOMP]) & 0xe0) >> 3) | ((S[BCOMP]) >> 6) ) -#define FETCH_PIXEL(D, P) \ - D[RCOMP] = ((*P & 0xe0) ); \ - D[GCOMP] = ((*P & 0x1c) << 3); \ - D[BCOMP] = ((*P & 0x03) << 6); \ - D[ACOMP] = 0xff - -#include "swrast/s_spantemp.h" - -/* ARGB1555 */ -#define NAME(PREFIX) PREFIX##_ARGB1555 -#define FORMAT GL_RGBA8 -#define SPAN_VARS \ - IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx; -#define INIT_PIXEL_PTR(P, X, Y) \ - GLushort *P = (GLushort *) (data->video.end - (Y) * data->video.pitch + (X) * 2); -#define INC_PIXEL_PTR(P) P += 1 -#define STORE_PIXEL(P, X, Y, S) \ - *P = ( (((S[RCOMP]) & 0xf8) << 7) | (((S[GCOMP]) & 0xf8) << 2) | ((S[BCOMP]) >> 3) ) -#define FETCH_PIXEL(D, P) \ - D[RCOMP] = ((*P & 0x7c00) >> 7); \ - D[GCOMP] = ((*P & 0x03e0) >> 2); \ - D[BCOMP] = ((*P & 0x001f) << 3); \ - D[ACOMP] = ((*P & 0x8000) ? 0xff : 0) - -#include "swrast/s_spantemp.h" - -/* RGB16 */ -#define NAME(PREFIX) PREFIX##_RGB16 -#define FORMAT GL_RGBA8 -#define SPAN_VARS \ - IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx; -#define INIT_PIXEL_PTR(P, X, Y) \ - GLushort *P = (GLushort *) (data->video.end - (Y) * data->video.pitch + (X) * 2); -#define INC_PIXEL_PTR(P) P += 1 -#define STORE_PIXEL(P, X, Y, S) \ - *P = ( (((S[RCOMP]) & 0xf8) << 8) | (((S[GCOMP]) & 0xfc) << 3) | ((S[BCOMP]) >> 3) ) -#define FETCH_PIXEL(D, P) \ - D[RCOMP] = ((*P & 0xf800) >> 8); \ - D[GCOMP] = ((*P & 0x07e0) >> 3); \ - D[BCOMP] = ((*P & 0x001f) << 3); \ - D[ACOMP] = 0xff - -#include "swrast/s_spantemp.h" - -/* RGB24 */ -#define NAME(PREFIX) PREFIX##_RGB24 -#define FORMAT GL_RGBA8 -#define SPAN_VARS \ - IDirectFBGL_data *data = ctx->DriverCtx; -#define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = data->video.end - (Y) * data->video.pitch + (X) * 3; -#define INC_PIXEL_PTR(P) P += 3 -#define STORE_PIXEL(P, X, Y, S) \ - P[0] = S[BCOMP]; P[1] = S[GCOMP]; P[2] = S[BCOMP] -#define FETCH_PIXEL(D, P) \ - D[RCOMP] = P[2]; D[GCOMP] = P[1]; D[BCOMP] = P[0]; D[ACOMP] = 0xff - -#include "swrast/s_spantemp.h" - -/* RGB32 */ -#define NAME(PREFIX) PREFIX##_RGB32 -#define FORMAT GL_RGBA8 -#define SPAN_VARS \ - IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx; -#define INIT_PIXEL_PTR(P, X, Y) \ - GLuint *P = (GLuint*) (data->video.end - (Y) * data->video.pitch + (X) * 4); -#define INC_PIXEL_PTR(P) P += 1 -#define STORE_PIXEL(P, X, Y, S) \ - *P = ( ((S[RCOMP]) << 16) | ((S[GCOMP]) << 8) | (S[BCOMP]) ) -#define FETCH_PIXEL(D, P) \ - D[RCOMP] = ((*P & 0x00ff0000) >> 16); \ - D[GCOMP] = ((*P & 0x0000ff00) >> 8); \ - D[BCOMP] = ((*P & 0x000000ff) ); \ - D[ACOMP] = 0xff - -#include "swrast/s_spantemp.h" - -/* ARGB */ -#define NAME(PREFIX) PREFIX##_ARGB -#define FORMAT GL_RGBA8 -#define SPAN_VARS \ - IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx; -#define INIT_PIXEL_PTR(P, X, Y) \ - GLuint *P = (GLuint*) (data->video.end - (Y) * data->video.pitch + (X) * 4); -#define INC_PIXEL_PTR(P) P += 1 -#define STORE_PIXEL_RGB(P, X, Y, S) \ - *P = ( 0xff000000 | ((S[RCOMP]) << 16) | ((S[GCOMP]) << 8) | (S[BCOMP]) ) -#define STORE_PIXEL(P, X, Y, S) \ - *P = ( ((S[ACOMP]) << 24) | ((S[RCOMP]) << 16) | ((S[GCOMP]) << 8) | (S[BCOMP]) ) -#define FETCH_PIXEL(D, P) \ - D[RCOMP] = ((*P & 0x00ff0000) >> 16); \ - D[GCOMP] = ((*P & 0x0000ff00) >> 8); \ - D[BCOMP] = ((*P & 0x000000ff) ); \ - D[ACOMP] = ((*P & 0xff000000) >> 24) - -#include "swrast/s_spantemp.h" - -/* AiRGB */ -#define NAME(PREFIX) PREFIX##_AiRGB -#define FORMAT GL_RGBA8 -#define SPAN_VARS \ - IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx; -#define INIT_PIXEL_PTR(P, X, Y) \ - GLuint *P = (GLuint*) (data->video.end - (Y) * data->video.pitch + (X) * 4); -#define INC_PIXEL_PTR(P) P += 1 -#define STORE_PIXEL_RGB(P, X, Y, S) \ - *P = ( ((S[RCOMP]) << 16) | ((S[GCOMP]) << 8) | (S[BCOMP]) ) -#define STORE_PIXEL(P, X, Y, S) \ - *P = ( ((0xff - (S[ACOMP])) << 24) | ((S[RCOMP]) << 16) | ((S[GCOMP]) << 8) | (S[BCOMP]) ) -#define FETCH_PIXEL(D, P) \ - D[RCOMP] = ((*P & 0x00ff0000) >> 16); \ - D[GCOMP] = ((*P & 0x0000ff00) >> 8); \ - D[BCOMP] = ((*P & 0x000000ff) ); \ - D[ACOMP] = (0xff - ((*P & 0xff000000) >> 24)) - -#include "swrast/s_spantemp.h" - - -static bool -dfb_mesa_setup_visual( GLvisual *visual, - DFBSurfacePixelFormat format ) -{ - GLboolean rgbFlag = GL_TRUE; - GLboolean dbFlag = GL_FALSE; - GLboolean stereoFlag = GL_FALSE; - GLint redBits = 0; - GLint blueBits = 0; - GLint greenBits = 0; - GLint alphaBits = 0; - GLint indexBits = 0; - GLint depthBits = 0; - GLint stencilBits = 0; - GLint accumRedBits = 0; - GLint accumGreenBits = 0; - GLint accumBlueBits = 0; - GLint accumAlphaBits = 0; - GLint numSamples = 0; - - /* FIXME: LUT8 support. */ - switch (format) { - case DSPF_RGB332: - redBits = 3; - greenBits = 3; - blueBits = 2; - break; - case DSPF_ARGB1555: - redBits = 5; - greenBits = 5; - blueBits = 5; - alphaBits = 1; - break; - case DSPF_RGB16: - redBits = 5; - greenBits = 6; - blueBits = 5; - break; - case DSPF_ARGB: - case DSPF_AiRGB: - alphaBits = 8; - case DSPF_RGB24: - case DSPF_RGB32: - redBits = 8; - greenBits = 8; - blueBits = 8; - break; - default: - D_WARN( "unsupported pixelformat" ); - return false; - } - - if (rgbFlag) { - accumRedBits = redBits; - accumGreenBits = greenBits; - accumBlueBits = blueBits; - accumAlphaBits = alphaBits; - depthBits = redBits + greenBits + blueBits; - stencilBits = alphaBits; - } else - depthBits = 8; - - return _mesa_initialize_visual( visual, - rgbFlag, dbFlag, stereoFlag, - redBits, greenBits, blueBits, alphaBits, - indexBits, depthBits, stencilBits, - accumRedBits, accumGreenBits, - accumBlueBits, accumAlphaBits, - numSamples ); -} - -static bool -dfb_mesa_create_context( GLcontext *context, - GLframebuffer *framebuffer, - GLvisual *visual, - DFBSurfacePixelFormat format, - IDirectFBGL_data *data ) -{ - struct dd_function_table functions; - struct swrast_device_driver *swdd; - - _mesa_initialize_framebuffer( framebuffer, visual ); - - _mesa_init_driver_functions( &functions ); - functions.GetString = get_string; - functions.UpdateState = update_state; - functions.GetBufferSize = get_buffer_size; - functions.Viewport = set_viewport; - - if (!_mesa_initialize_context( context, visual, NULL, - &functions, (void*) data )) { - D_DEBUG( "DirectFBGL/Mesa: _mesa_initialize_context() failed.\n" ); - _mesa_free_framebuffer_data( framebuffer ); - return false; - } - - _swrast_CreateContext( context ); - _ac_CreateContext( context ); - _tnl_CreateContext( context ); - _swsetup_CreateContext( context ); - _swsetup_Wakeup( context ); - - swdd = _swrast_GetDeviceDriverReference( context ); - swdd->SetBuffer = set_buffer; - - _mesa_init_renderbuffer( &data->render, 0 ); - data->render.InternalFormat = GL_RGBA; - data->render._BaseFormat = GL_RGBA; - data->render.DataType = GL_UNSIGNED_BYTE; - data->render.Data = data->video.start; - data->render.Delete = delete_renderbuffer; - data->render.AllocStorage = renderbuffer_storage; - - switch (format) { - case DSPF_RGB332: - data->render.GetRow = get_row_RGB332; - data->render.GetValues = get_values_RGB332; - data->render.PutRow = put_row_RGB332; - data->render.PutMonoRow = put_mono_row_RGB332; - data->render.PutValues = put_values_RGB332; - data->render.PutMonoValues = put_mono_values_RGB332; - break; - case DSPF_ARGB1555: - data->render.GetRow = get_row_ARGB1555; - data->render.GetValues = get_values_ARGB1555; - data->render.PutRow = put_row_ARGB1555; - data->render.PutMonoRow = put_mono_row_ARGB1555; - data->render.PutValues = put_values_ARGB1555; - data->render.PutMonoValues = put_mono_values_ARGB1555; - break; - case DSPF_RGB16: - data->render.GetRow = get_row_RGB16; - data->render.GetValues = get_values_RGB16; - data->render.PutRow = put_row_RGB16; - data->render.PutMonoRow = put_mono_row_RGB16; - data->render.PutValues = put_values_RGB16; - data->render.PutMonoValues = put_mono_values_RGB16; - break; - case DSPF_RGB24: - data->render.GetRow = get_row_RGB24; - data->render.GetValues = get_values_RGB24; - data->render.PutRow = put_row_RGB24; - data->render.PutMonoRow = put_mono_row_RGB24; - data->render.PutValues = put_values_RGB24; - data->render.PutMonoValues = put_mono_values_RGB24; - break; - case DSPF_RGB32: - data->render.GetRow = get_row_RGB32; - data->render.GetValues = get_values_RGB32; - data->render.PutRow = put_row_RGB32; - data->render.PutMonoRow = put_mono_row_RGB32; - data->render.PutValues = put_values_RGB32; - data->render.PutMonoValues = put_mono_values_RGB32; - break; - case DSPF_ARGB: - data->render.GetRow = get_row_ARGB; - data->render.GetValues = get_values_ARGB; - data->render.PutRow = put_row_ARGB; - data->render.PutMonoRow = put_mono_row_ARGB; - data->render.PutValues = put_values_ARGB; - data->render.PutMonoValues = put_mono_values_ARGB; - break; - case DSPF_AiRGB: - data->render.GetRow = get_row_AiRGB; - data->render.GetValues = get_values_AiRGB; - data->render.PutRow = put_row_AiRGB; - data->render.PutMonoRow = put_mono_row_AiRGB; - data->render.PutValues = put_values_AiRGB; - data->render.PutMonoValues = put_mono_values_AiRGB; - break; - default: - D_BUG( "unexpected pixelformat" ); - return false; - } - - _mesa_add_renderbuffer( framebuffer, BUFFER_FRONT_LEFT, &data->render ); - - _mesa_add_soft_renderbuffers( framebuffer, - GL_FALSE, - visual->haveDepthBuffer, - visual->haveStencilBuffer, - visual->haveAccumBuffer, - GL_FALSE, - GL_FALSE ); - - TNL_CONTEXT( context )->Driver.RunPipeline = _tnl_run_pipeline; - - _mesa_enable_sw_extensions( context ); - - _mesa_make_current( context, framebuffer, framebuffer ); - - return true; -} - -static void -dfb_mesa_destroy_context( GLcontext *context, - GLframebuffer *framebuffer ) -{ - _mesa_make_current( NULL, NULL, NULL ); - _mesa_free_framebuffer_data( framebuffer ); - _mesa_notifyDestroy( context ); - _mesa_free_context_data( context ); -} - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/blit.S b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/blit.S deleted file mode 100644 index f5888c7e39..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/blit.S +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * DOS/DJGPP device driver v1.3 for Mesa - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - - .file "blit.S" - -/* - * extern unsigned int vesa_gran_mask, vesa_gran_shift; - * extern int vl_video_selector; - - * extern void *vl_current_draw_buffer; - * extern int vl_current_stride, vl_current_height; - * extern int vl_current_offset, vl_current_delta; - */ - - .text - -/* Desc: VESA bank switching routine (BIOS) - * - * In : EBX=0, EDX = bank number - * Out : - - * - * Note: thrashes EAX - */ - .p2align 5,,31 -_vesa_swbankBIOS: - movw $0x4f05, %ax - int $0x10 - ret - - .p2align 2,,3 - .global _vesa_swbank -_vesa_swbank: .long _vesa_swbankBIOS - -/* Desc: void vesa_b_dump_virtual (void); - * - * In : - - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _vesa_b_dump_virtual -_vesa_b_dump_virtual: - cld - pushl %es - pushl %ebx - pushl %esi - pushl %edi - pushl %ebp - movl _vl_video_selector, %es - movl _vl_current_draw_buffer, %esi - movl _vl_current_offset, %edi - movl _vesa_gran_shift, %ecx - movl _vesa_gran_mask, %ebp - movl %edi, %edx - xorl %ebx, %ebx - andl %ebp, %edi - shrl %cl, %edx - incl %ebp - call *_vesa_swbank - movl _vl_current_stride, %ecx - movl _vl_current_height, %eax - movl _vl_current_delta, %ebx - shrl $2, %ecx - .balign 4 - 0: - pushl %ecx - .balign 4 - 1: - cmpl %ebp, %edi - jb 2f - pushl %eax - pushl %ebx - incl %edx - xorl %ebx, %ebx - call *_vesa_swbank - popl %ebx - popl %eax - subl %ebp, %edi - .balign 4 - 2: - movsl - decl %ecx - jnz 1b - popl %ecx - addl %ebx, %edi - decl %eax - jnz 0b - popl %ebp - popl %edi - popl %esi - popl %ebx - popl %es - ret - -/* Desc: void vesa_l_dump_virtual (void); - * - * In : - - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _vesa_l_dump_virtual -_vesa_l_dump_virtual: - cld - pushl %es - pushl %esi - pushl %edi - movl _vl_video_selector, %es - movl _vl_current_draw_buffer, %esi - movl _vl_current_offset, %edi - movl _vl_current_stride, %ecx - movl _vl_current_height, %edx - movl _vl_current_delta, %eax - shrl $2, %ecx - .balign 4 - 0: - pushl %ecx - rep; movsl - popl %ecx - addl %eax, %edi - decl %edx - jnz 0b - popl %edi - popl %esi - popl %es - ret - -/* Desc: void vesa_l_dump_virtual_mmx (void); - * - * In : - - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _vesa_l_dump_virtual_mmx -_vesa_l_dump_virtual_mmx: -#ifdef USE_MMX_ASM - pushl %esi - pushl %edi - movl _vl_video_selector, %fs - movl _vl_current_draw_buffer, %esi - movl _vl_current_offset, %edi - movl _vl_current_stride, %ecx - movl _vl_current_height, %edx - movl _vl_current_delta, %eax - shrl $3, %ecx - .balign 4 - 0: - pushl %ecx - .balign 4 - 1: - movq (%esi), %mm0 - addl $8, %esi - movq %mm0, %fs:(%edi) - addl $8, %edi - decl %ecx - jnz 1b - popl %ecx - addl %eax, %edi - decl %edx - jnz 0b - popl %edi - popl %esi - emms -#endif - ret diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/dmesa.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/dmesa.c deleted file mode 100644 index d7c8477091..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/dmesa.c +++ /dev/null @@ -1,1430 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.3 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * DOS/DJGPP device driver v1.7 for Mesa - * - * Copyright (c) 2003 - Daniel Borca - * Email : dborca@users.sourceforge.net - * Web : http://www.geocities.com/dborca - */ - - -#include "glheader.h" -#include "context.h" -#include "imports.h" -#ifndef FX -#include "bufferobj.h" -#include "buffers.h" -#include "extensions.h" -#include "macros.h" -#include "matrix.h" -#include "mtypes.h" -#include "texformat.h" -#include "teximage.h" -#include "texstore.h" -#include "array_cache/acache.h" -#include "swrast/s_context.h" -#include "swrast/s_depth.h" -#include "swrast/s_lines.h" -#include "swrast/s_triangle.h" -#include "swrast/swrast.h" -#include "swrast_setup/swrast_setup.h" -#include "tnl/tnl.h" -#include "tnl/t_context.h" -#include "tnl/t_pipeline.h" -#include "drivers/common/driverfuncs.h" -#include "video.h" -#else /* FX */ -#include "GL/fxmesa.h" -#endif /* FX */ - -#include "GL/dmesa.h" - - -#define SWTC 0 /* SW texture compression */ - - -/* - * In C++ terms, this class derives from the GLvisual class. - * Add system-specific fields to it. - */ -struct dmesa_visual { - GLvisual gl_visual; - GLboolean sw_alpha; /* use Mesa's alpha buffer? */ - int z_buffer; /* Z=buffer: 0=no, 1=SW, -1=HW */ -}; - -/* - * In C++ terms, this class derives from the GLframebuffer class. - * Add system-specific fields to it. - */ -struct dmesa_buffer { - GLframebuffer gl_buffer; /* The depth, stencil, accum, etc buffers */ - void *the_window; /* your window handle, etc */ - - int xpos, ypos; /* position */ - int width, height; /* size in pixels */ -}; - -/* - * In C++ terms, this class derives from the GLcontext class. - * Add system-specific fields to it. - */ -struct dmesa_context { - GLcontext gl_ctx; /* the core library context */ - DMesaVisual visual; - DMesaBuffer buffer; - GLuint ClearColor; - GLuint ClearIndex; - /* etc... */ -}; - - -#ifndef FX -/**************************************************************************** - * Read/Write pixels - ***************************************************************************/ -#define FLIP(y) (dmesa->buffer->height - (y) - 1) -#define FLIP2(y) (_b_ - (y)) - -#define DSTRIDE dmesa->buffer->width - -/**************************************************************************** - * RGB[A] - ***************************************************************************/ -static void -write_rgba_span (const GLcontext *ctx, GLuint n, GLint x, GLint y, - const GLubyte rgba[][4], const GLubyte mask[]) -{ - const DMesaContext dmesa = (DMesaContext)ctx; - GLuint i, offset; - - offset = DSTRIDE * FLIP(y) + x; - if (mask) { - /* draw some pixels */ - for (i = 0; i < n; i++, offset++) { - if (mask[i]) { - vl_putpixel(offset, vl_mixrgba(rgba[i])); - } - } - } else { - /* draw all pixels */ - for (i = 0; i < n; i++, offset++) { - vl_putpixel(offset, vl_mixrgba(rgba[i])); - } - } -} - - -static void -write_rgb_span (const GLcontext *ctx, GLuint n, GLint x, GLint y, - const GLubyte rgb[][3], const GLubyte mask[]) -{ - const DMesaContext dmesa = (DMesaContext)ctx; - GLuint i, offset; - - offset = DSTRIDE * FLIP(y) + x; - if (mask) { - /* draw some pixels */ - for (i = 0; i < n; i++, offset++) { - if (mask[i]) { - vl_putpixel(offset, vl_mixrgb(rgb[i])); - } - } - } else { - /* draw all pixels */ - for (i = 0; i < n; i++, offset++) { - vl_putpixel(offset, vl_mixrgb(rgb[i])); - } - } -} - - -static void -write_mono_rgba_span (const GLcontext *ctx, - GLuint n, GLint x, GLint y, - const GLchan color[4], const GLubyte mask[]) -{ - const DMesaContext dmesa = (DMesaContext)ctx; - GLuint i, offset, rgba = vl_mixrgba(color); - - offset = DSTRIDE * FLIP(y) + x; - if (mask) { - /* draw some pixels */ - for (i = 0; i < n; i++, offset++) { - if (mask[i]) { - vl_putpixel(offset, rgba); - } - } - } else { - /* draw all pixels */ - for (i = 0; i < n; i++, offset++) { - vl_putpixel(offset, rgba); - } - } -} - - -static void -read_rgba_span (const GLcontext *ctx, GLuint n, GLint x, GLint y, - GLubyte rgba[][4]) -{ - const DMesaContext dmesa = (DMesaContext)ctx; - GLuint i, offset; - - offset = DSTRIDE * FLIP(y) + x; - /* read all pixels */ - for (i = 0; i < n; i++, offset++) { - vl_getrgba(offset, rgba[i]); - } -} - - -static void -write_rgba_pixels (const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - const GLubyte rgba[][4], const GLubyte mask[]) -{ - const DMesaContext dmesa = (DMesaContext)ctx; - GLuint i, _w_ = DSTRIDE, _b_ = dmesa->buffer->height - 1; - - if (mask) { - /* draw some pixels */ - for (i = 0; i < n; i++) { - if (mask[i]) { - vl_putpixel(FLIP2(y[i])*_w_ + x[i], vl_mixrgba(rgba[i])); - } - } - } else { - /* draw all pixels */ - for (i = 0; i < n; i++) { - vl_putpixel(FLIP2(y[i])*_w_ + x[i], vl_mixrgba(rgba[i])); - } - } -} - - -static void -write_mono_rgba_pixels (const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - const GLchan color[4], const GLubyte mask[]) -{ - const DMesaContext dmesa = (DMesaContext)ctx; - GLuint i, _w_ = DSTRIDE, _b_ = dmesa->buffer->height - 1, rgba = vl_mixrgba(color); - - if (mask) { - /* draw some pixels */ - for (i = 0; i < n; i++) { - if (mask[i]) { - vl_putpixel(FLIP2(y[i])*_w_ + x[i], rgba); - } - } - } else { - /* draw all pixels */ - for (i = 0; i < n; i++) { - vl_putpixel(FLIP2(y[i])*_w_ + x[i], rgba); - } - } -} - - -static void -read_rgba_pixels (const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - GLubyte rgba[][4], const GLubyte mask[]) -{ - const DMesaContext dmesa = (DMesaContext)ctx; - GLuint i, _w_ = DSTRIDE, _b_ = dmesa->buffer->height - 1; - - if (mask) { - /* read some pixels */ - for (i = 0; i < n; i++) { - if (mask[i]) { - vl_getrgba(FLIP2(y[i])*_w_ + x[i], rgba[i]); - } - } - } else { - /* read all pixels */ - for (i = 0; i < n; i++) { - vl_getrgba(FLIP2(y[i])*_w_ + x[i], rgba[i]); - } - } -} - - -/**************************************************************************** - * Index - ***************************************************************************/ -static void -write_index_span (const GLcontext *ctx, struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const GLuint index[], const GLubyte mask[]) -{ - const DMesaContext dmesa = (DMesaContext)ctx; - GLuint i, offset; - - offset = DSTRIDE * FLIP(y) + x; - if (mask) { - /* draw some pixels */ - for (i = 0; i < n; i++, offset++) { - if (mask[i]) { - vl_putpixel(offset, index[i]); - } - } - } else { - /* draw all pixels */ - for (i = 0; i < n; i++, offset++) { - vl_putpixel(offset, index[i]); - } - } -} - - -static void -write_index8_span (const GLcontext *ctx, struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const GLubyte index[], const GLubyte mask[]) -{ - const DMesaContext dmesa = (DMesaContext)ctx; - GLuint i, offset; - - offset = DSTRIDE * FLIP(y) + x; - if (mask) { - /* draw some pixels */ - for (i = 0; i < n; i++, offset++) { - if (mask[i]) { - vl_putpixel(offset, index[i]); - } - } - } else { - /* draw all pixels */ - for (i = 0; i < n; i++, offset++) { - vl_putpixel(offset, index[i]); - } - } -} - - -static void -write_mono_index_span (const GLcontext *ctx, struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - GLuint colorIndex, const GLubyte mask[]) -{ - const DMesaContext dmesa = (DMesaContext)ctx; - GLuint i, offset; - - offset = DSTRIDE * FLIP(y) + x; - if (mask) { - /* draw some pixels */ - for (i = 0; i < n; i++, offset++) { - if (mask[i]) { - vl_putpixel(offset, colorIndex); - } - } - } else { - /* draw all pixels */ - for (i = 0; i < n; i++, offset++) { - vl_putpixel(offset, colorIndex); - } - } -} - - -static void -read_index_span (const GLcontext *ctx, struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, GLuint index[]) -{ - const DMesaContext dmesa = (DMesaContext)ctx; - GLuint i, offset; - - offset = DSTRIDE * FLIP(y) + x; - /* read all pixels */ - for (i = 0; i < n; i++, offset++) { - index[i] = vl_getpixel(offset); - } -} - - -static void -write_index_pixels (const GLcontext *ctx, struct gl_renderbuffer *rb, - GLuint n, const GLint x[], const GLint y[], - const GLuint index[], const GLubyte mask[]) -{ - const DMesaContext dmesa = (DMesaContext)ctx; - GLuint i, _w_ = DSTRIDE, _b_ = dmesa->buffer->height - 1; - - if (mask) { - /* draw some pixels */ - for (i = 0; i < n; i++) { - if (mask[i]) { - vl_putpixel(FLIP2(y[i])*_w_ + x[i], index[i]); - } - } - } else { - /* draw all pixels */ - for (i = 0; i < n; i++) { - vl_putpixel(FLIP2(y[i])*_w_ + x[i], index[i]); - } - } -} - - -static void -write_mono_index_pixels (const GLcontext *ctx, struct gl_renderbuffer *rb, - GLuint n, const GLint x[], const GLint y[], - GLuint colorIndex, const GLubyte mask[]) -{ - const DMesaContext dmesa = (DMesaContext)ctx; - GLuint i, _w_ = DSTRIDE, _b_ = dmesa->buffer->height - 1; - - if (mask) { - /* draw some pixels */ - for (i = 0; i < n; i++) { - if (mask[i]) { - vl_putpixel(FLIP2(y[i])*_w_ + x[i], colorIndex); - } - } - } else { - /* draw all pixels */ - for (i = 0; i < n; i++) { - vl_putpixel(FLIP2(y[i])*_w_ + x[i], colorIndex); - } - } -} - - -static void -read_index_pixels (const GLcontext *ctx, struct gl_renderbuffer *rb, - GLuint n, const GLint x[], const GLint y[], - GLuint index[], const GLubyte mask[]) -{ - const DMesaContext dmesa = (DMesaContext)ctx; - GLuint i, _w_ = DSTRIDE, _b_ = dmesa->buffer->height - 1; - - if (mask) { - /* read some pixels */ - for (i = 0; i < n; i++) { - if (mask[i]) { - index[i] = vl_getpixel(FLIP2(y[i])*_w_ + x[i]); - } - } - } else { - /* read all pixels */ - for (i = 0; i < n; i++) { - index[i] = vl_getpixel(FLIP2(y[i])*_w_ + x[i]); - } - } -} - - -/**************************************************************************** - * Z-buffer - ***************************************************************************/ - - -/**************************************************************************** - * Optimized triangle rendering - ***************************************************************************/ - -/* - * NON-depth-buffered flat triangle. - */ -#define NAME tri_rgb_flat - -#define SETUP_CODE \ - const DMesaContext dmesa = (DMesaContext)ctx;\ - GLuint _b_ = dmesa->buffer->height - 1; \ - GLuint _w_ = dmesa->buffer->width; \ - GLuint rgb = vl_mixrgb(v2->color); - -#define RENDER_SPAN(span) \ - GLuint i, offset = FLIP2(span.y)*_w_ + span.x;\ - for (i = 0; i < span.end; i++, offset++) { \ - vl_putpixel(offset, rgb); \ - } - -#include "swrast/s_tritemp.h" - - -/* - * Z-less flat triangle. - */ -#define NAME tri_rgb_flat_zless - -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE - -#define SETUP_CODE \ - const DMesaContext dmesa = (DMesaContext)ctx; \ - GLuint _b_ = dmesa->buffer->height - 1; \ - GLuint _w_ = dmesa->buffer->width; \ - GLuint rgb = vl_mixrgb(v2->color); - -#define RENDER_SPAN(span) \ - GLuint i, offset = FLIP2(span.y)*_w_ + span.x;\ - for (i = 0; i < span.end; i++, offset++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z);\ - if (z < zRow[i]) { \ - vl_putpixel(offset, rgb); \ - zRow[i] = z; \ - } \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" - - -/* - * NON-depth-buffered iterated triangle. - */ -#define NAME tri_rgb_iter - -#define INTERP_RGB 1 - -#define SETUP_CODE \ - const DMesaContext dmesa = (DMesaContext)ctx;\ - GLuint _b_ = dmesa->buffer->height - 1; \ - GLuint _w_ = dmesa->buffer->width; - -#define RENDER_SPAN(span) \ - GLuint i, offset = FLIP2(span.y)*_w_ + span.x; \ - for (i = 0; i < span.end; i++, offset++) { \ - vl_putpixel(offset, vl_mixfix(span.red, span.green, span.blue)); \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - } - -#include "swrast/s_tritemp.h" - - -/* - * Z-less iterated triangle. - */ -#define NAME tri_rgb_iter_zless - -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define INTERP_RGB 1 - -#define SETUP_CODE \ - const DMesaContext dmesa = (DMesaContext)ctx;\ - GLuint _b_ = dmesa->buffer->height - 1; \ - GLuint _w_ = dmesa->buffer->width; - -#define RENDER_SPAN(span) \ - GLuint i, offset = FLIP2(span.y)*_w_ + span.x; \ - for (i = 0; i < span.end; i++, offset++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - vl_putpixel(offset, vl_mixfix(span.red, span.green, span.blue));\ - zRow[i] = z; \ - } \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" - - -/* - * Analyze context state to see if we can provide a fast triangle function - * Otherwise, return NULL. - */ -static swrast_tri_func -dmesa_choose_tri_function (GLcontext *ctx) -{ - const SWcontext *swrast = SWRAST_CONTEXT(ctx); - - if ((ctx->RenderMode != GL_RENDER) - || (ctx->Polygon.SmoothFlag) - || (ctx->Polygon.StippleFlag) - || (ctx->Texture._EnabledUnits) - || (swrast->_RasterMask & MULTI_DRAW_BIT) - || (ctx->Polygon.CullFlag && ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK)) { - return (swrast_tri_func)NULL; - } - - if (swrast->_RasterMask==DEPTH_BIT - && ctx->Depth.Func==GL_LESS - && ctx->Depth.Mask==GL_TRUE - && ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS) { - return (ctx->Light.ShadeModel==GL_SMOOTH) ? tri_rgb_iter_zless : tri_rgb_flat_zless; - } - - if (swrast->_RasterMask==0) { /* no depth test */ - return (ctx->Light.ShadeModel==GL_SMOOTH) ? tri_rgb_iter : tri_rgb_flat; - } - - return (swrast_tri_func)NULL; -} - - -/* Override for the swrast triangle-selection function. Try to use one - * of our internal triangle functions, otherwise fall back to the - * standard swrast functions. - */ -static void -dmesa_choose_tri (GLcontext *ctx) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - - if (!(swrast->Triangle=dmesa_choose_tri_function(ctx))) { - _swrast_choose_triangle(ctx); - } -} - - -/**************************************************************************** - * Optimized line rendering - ***************************************************************************/ - -/* - * NON-depth-buffered flat line. - */ -#define NAME line_rgb_flat - -#define INTERP_XY 1 -#define CLIP_HACK 1 - -#define SETUP_CODE \ - const DMesaContext dmesa = (DMesaContext)ctx;\ - GLuint _b_ = dmesa->buffer->height - 1; \ - GLuint _w_ = dmesa->buffer->width; \ - GLuint rgb = vl_mixrgb(vert1->color); - -#define PLOT(X,Y) vl_putpixel(FLIP2(Y) * _w_ + X, rgb); - -#include "swrast/s_linetemp.h" - - -/* - * Z-less flat line. - */ -#define NAME line_rgb_flat_zless - -#define INTERP_XY 1 -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define CLIP_HACK 1 - -#define SETUP_CODE \ - const DMesaContext dmesa = (DMesaContext)ctx;\ - GLuint _b_ = dmesa->buffer->height - 1; \ - GLuint _w_ = dmesa->buffer->width; \ - GLuint rgb = vl_mixrgb(vert1->color); - -#define PLOT(X,Y) \ - if (Z < *zPtr) { \ - *zPtr = Z; \ - vl_putpixel(FLIP2(Y) * _w_ + X, rgb); \ - } - -#include "swrast/s_linetemp.h" - - -/* - * NON-depth-buffered iterated line. - */ -#define line_rgb_iter NULL - - -/* - * Z-less iterated line. - */ -#define line_rgb_iter_zless NULL - - -/* - * Analyze context state to see if we can provide a fast line function - * Otherwise, return NULL. - */ -static swrast_line_func -dmesa_choose_line_function (GLcontext *ctx) -{ - const SWcontext *swrast = SWRAST_CONTEXT(ctx); - - if ((ctx->RenderMode != GL_RENDER) - || (ctx->Line.SmoothFlag) - || (ctx->Texture._EnabledUnits) - || (ctx->Line.StippleFlag) - || (swrast->_RasterMask & MULTI_DRAW_BIT) - || (ctx->Line.Width!=1.0F)) { - return (swrast_line_func)NULL; - } - - if (swrast->_RasterMask==DEPTH_BIT - && ctx->Depth.Func==GL_LESS - && ctx->Depth.Mask==GL_TRUE - && ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS) { - return (ctx->Light.ShadeModel==GL_SMOOTH) ? line_rgb_iter_zless : line_rgb_flat_zless; - } - - if (swrast->_RasterMask==0) { /* no depth test */ - return (ctx->Light.ShadeModel==GL_SMOOTH) ? line_rgb_iter : line_rgb_flat; - } - - return (swrast_line_func)NULL; -} - - -/* Override for the swrast line-selection function. Try to use one - * of our internal line functions, otherwise fall back to the - * standard swrast functions. - */ -static void -dmesa_choose_line (GLcontext *ctx) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - - if (!(swrast->Line=dmesa_choose_line_function(ctx))) { - _swrast_choose_line(ctx); - } -} - - -/**************************************************************************** - * Miscellaneous device driver funcs - ***************************************************************************/ -static const struct gl_texture_format * -choose_tex_format (GLcontext *ctx, GLint internalFormat, - GLenum format, GLenum type) -{ - switch (internalFormat) { - case GL_COMPRESSED_RGB_ARB: - return &_mesa_texformat_rgb; - case GL_COMPRESSED_RGBA_ARB: - return &_mesa_texformat_rgba; - default: - return _mesa_choose_tex_format(ctx, internalFormat, format, type); - } -} - - -static void -clear_index (GLcontext *ctx, GLuint index) -{ - ((DMesaContext)ctx)->ClearIndex = index; -} - - -static void -clear_color (GLcontext *ctx, const GLfloat color[4]) -{ - GLubyte col[4]; - CLAMPED_FLOAT_TO_UBYTE(col[0], color[0]); - CLAMPED_FLOAT_TO_UBYTE(col[1], color[1]); - CLAMPED_FLOAT_TO_UBYTE(col[2], color[2]); - CLAMPED_FLOAT_TO_UBYTE(col[3], color[3]); - ((DMesaContext)ctx)->ClearColor = vl_mixrgba(col); -} - - -static void -clear (GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint x, GLint y, GLint width, GLint height) -{ - const DMesaContext c = (DMesaContext)ctx; - const GLuint *colorMask = (GLuint *)&ctx->Color.ColorMask; - - /* - * Clear the specified region of the buffers indicated by 'mask' - * using the clear color or index as specified by one of the two - * functions above. - * If all==GL_TRUE, clear whole buffer, else just clear region defined - * by x,y,width,height - */ - - /* we can't handle color or index masking */ - if ((*colorMask == 0xffffffff) && (ctx->Color.IndexMask == 0xffffffff)) { - if (mask & DD_BACK_LEFT_BIT) { - int color = ((GLvisual *)(c->visual))->rgbMode ? c->ClearColor : c->ClearIndex; - - if (all) { - vl_clear(color); - } else { - vl_rect(x, c->buffer->height - y - height, width, height, color); - } - - mask &= ~DD_BACK_LEFT_BIT; - } - } - - if (mask) { - _swrast_Clear(ctx, mask, all, x, y, width, height); - } -} - - -/* - * This function is called to specify which buffer to read and write - * for software rasterization (swrast) fallbacks. This doesn't necessarily - * correspond to glDrawBuffer() or glReadBuffer() calls. - */ -static void -set_buffer (GLcontext *ctx, GLframebuffer *colorBuffer, GLuint bufferBit) -{ - /* - * XXX todo - examine bufferBit and set read/write pointers - */ - /* Normally, we would have - * ctx->Driver.ReadBuffer == set_read_buffer - * ctx->Driver.DrawBuffer == set_draw_buffer - * and make sure set_draw_buffer calls _swrast_DrawBuffer, - * which in turn will call this routine via dd->SetBuffer. - */ -} - - -/* - * Return the width and height of the current buffer. - * If anything special has to been done when the buffer/window is - * resized, do it now. - */ -static void -get_buffer_size (GLframebuffer *buffer, GLuint *width, GLuint *height) -{ - DMesaBuffer b = (DMesaBuffer)buffer; - - *width = b->width; - *height = b->height; -} - - -static void -viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) -{ - /* poll for window size change and realloc software Z/stencil/etc if needed */ - _mesa_ResizeBuffersMESA(); -} - - -static const GLubyte * -get_string (GLcontext *ctx, GLenum name) -{ - switch (name) { - case GL_RENDERER: - return (const GLubyte *)"Mesa DJGPP"; - default: - return NULL; - } -} - - -static void -finish (GLcontext *ctx) -{ - /* - * XXX todo - OPTIONAL FUNCTION: implements glFinish if possible - */ -} - - -static void -flush (GLcontext *ctx) -{ - /* - * XXX todo - OPTIONAL FUNCTION: implements glFlush if possible - */ -} - - -/**************************************************************************** - * State - ***************************************************************************/ -#define DMESA_NEW_LINE (_NEW_LINE | \ - _NEW_TEXTURE | \ - _NEW_LIGHT | \ - _NEW_DEPTH | \ - _NEW_RENDERMODE | \ - _SWRAST_NEW_RASTERMASK) - -#define DMESA_NEW_TRIANGLE (_NEW_POLYGON | \ - _NEW_TEXTURE | \ - _NEW_LIGHT | \ - _NEW_DEPTH | \ - _NEW_RENDERMODE | \ - _SWRAST_NEW_RASTERMASK) - -/* Extend the software rasterizer with our line and triangle - * functions. - */ -static void -dmesa_register_swrast_functions (GLcontext *ctx) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - - swrast->choose_line = dmesa_choose_line; - swrast->choose_triangle = dmesa_choose_tri; - - swrast->invalidate_line |= DMESA_NEW_LINE; - swrast->invalidate_triangle |= DMESA_NEW_TRIANGLE; -} - - -static void -dmesa_update_state (GLcontext *ctx, GLuint new_state) -{ - /* Propagate statechange information to swrast and swrast_setup - * modules. The DMesa driver has no internal GL-dependent state. - */ - _swrast_InvalidateState( ctx, new_state ); - _ac_InvalidateState( ctx, new_state ); - _tnl_InvalidateState( ctx, new_state ); - _swsetup_InvalidateState( ctx, new_state ); -} - - -/* Initialize the device driver function table with the functions - * we implement in this driver. - */ -static void -dmesa_init_driver_functions (DMesaVisual visual, - struct dd_function_table *driver) -{ - driver->UpdateState = dmesa_update_state; - driver->GetString = get_string; - driver->GetBufferSize = get_buffer_size; - driver->Viewport = viewport; - driver->Flush = flush; - driver->Finish = finish; - driver->Clear = clear; - driver->ClearColor = clear_color; - driver->ClearIndex = clear_index; -#if SWTC - driver->ChooseTextureFormat = choose_tex_format; -#endif -} - - -/* Setup pointers and other driver state that is constant for the life - * of a context. - */ -static void -dmesa_init_pointers (GLcontext *ctx) -{ - struct swrast_device_driver *dd = _swrast_GetDeviceDriverReference(ctx); - - dd->SetBuffer = set_buffer; - - /* The span functions should be in `dmesa_update_state', but I'm - * pretty sure they will never change during the life of the Visual - */ - - /* Index span/pixel functions */ - dd->WriteCI32Span = write_index_span; - dd->WriteCI8Span = write_index8_span; - dd->WriteMonoCISpan = write_mono_index_span; - dd->WriteCI32Pixels = write_index_pixels; - dd->WriteMonoCIPixels = write_mono_index_pixels; - dd->ReadCI32Span = read_index_span; - dd->ReadCI32Pixels = read_index_pixels; - - /* RGB(A) span/pixel functions */ - dd->WriteRGBASpan = write_rgba_span; - dd->WriteRGBSpan = write_rgb_span; - dd->WriteMonoRGBASpan = write_mono_rgba_span; - dd->WriteRGBAPixels = write_rgba_pixels; - dd->WriteMonoRGBAPixels = write_mono_rgba_pixels; - dd->ReadRGBASpan = read_rgba_span; - dd->ReadRGBAPixels = read_rgba_pixels; -} -#endif /* FX */ - - -/**************************************************************************** - * DMesa Public API Functions - ***************************************************************************/ - -/* - * The exact arguments to this function will depend on your window system - */ -DMesaVisual -DMesaCreateVisual (GLint width, - GLint height, - GLint colDepth, - GLint refresh, - GLboolean dbFlag, - GLboolean rgbFlag, - GLint alphaSize, - GLint depthSize, - GLint stencilSize, - GLint accumSize) -{ - DMesaVisual v; - GLint redBits, greenBits, blueBits, alphaBits, indexBits; - GLboolean sw_alpha; - - alphaBits = 0; - - if (!rgbFlag) { - indexBits = 8; - redBits = 0; - greenBits = 0; - blueBits = 0; - } else { - indexBits = 0; - switch (colDepth) { - case 8: - redBits = 8; - greenBits = 8; - blueBits = 8; - break; - case 15: - alphaBits = 1; - redBits = 5; - greenBits = 5; - blueBits = 5; - break; - case 16: - redBits = 5; - greenBits = 6; - blueBits = 5; - break; - case 32: - alphaBits = 8; - case 24: - redBits = 8; - greenBits = 8; - blueBits = 8; - break; - default: - return NULL; - } - } - - /* Okay, - * `alphaBits' is what we can provide - * `alphaSize' is what app requests - * - * Note that alpha buffering is required only if destination alpha is used - * in alpha blending; alpha blending modes that do not use destination alpha - * can be used w/o alpha buffer. - * - * We will use whatever ALPHA app requests. Later, in `CreateBuffer' we'll - * instruct Mesa to use its own ALPHA buffer, by passing a non-FALSE value - * for ALPHA to `_mesa_initialize_framebuffer'. - * - * Basically, 32bit modes provide ALPHA storage, but can we rely on this? - */ - alphaBits = alphaSize; - sw_alpha = (alphaBits > 0); - -#ifndef FX - if (!dbFlag) { - return NULL; - } - if ((colDepth=vl_video_init(width, height, colDepth, rgbFlag, refresh)) <= 0) { - return NULL; - } -#else /* FX */ - if (!rgbFlag) { - return NULL; - } else { - char *env; - - if ((env = getenv("MESA_FX_INFO")) && (env[0] == 'r')) { - freopen("MESA.LOG", "w", stderr); - } - - if (refresh && (((env = getenv("FX_GLIDE_REFRESH")) == NULL) || !atoi(env))) { - /* if we are passed non-zero value for refresh, we need to override - * default refresh rate. However, if FX_GLIDE_REFRESH is already set - * to 0, we won't override it, because it has a special meaning for - * DJGPP Glide3x (switch via VESA, using BIOS default refresh). - */ - char tmp[32]; - sprintf(tmp, "FX_GLIDE_REFRESH=%u", refresh); - putenv(tmp); - } - } -#endif /* FX */ - - if ((v=(DMesaVisual)CALLOC_STRUCT(dmesa_visual)) != NULL) { - /* Create core visual */ - _mesa_initialize_visual((GLvisual *)v, - rgbFlag, /* rgb */ - dbFlag, - GL_FALSE, /* stereo */ - redBits, - greenBits, - blueBits, - alphaBits, - indexBits, /* indexBits */ - depthSize, - stencilSize, - accumSize, /* accumRed */ - accumSize, /* accumGreen */ - accumSize, /* accumBlue */ - alphaBits?accumSize:0, /* accumAlpha */ - 1); /* numSamples */ - -#ifndef FX - v->sw_alpha = sw_alpha; - v->z_buffer = (depthSize > 0) ? 1 : 0; -#endif - } - - return v; -} - - -void -DMesaDestroyVisual (DMesaVisual v) -{ -#ifndef FX - vl_video_exit(); -#endif - _mesa_destroy_visual((GLvisual *)v); -} - - -DMesaBuffer -DMesaCreateBuffer (DMesaVisual visual, - GLint xpos, GLint ypos, - GLint width, GLint height) -{ -#ifndef FX - DMesaBuffer b; - - if ((b=(DMesaBuffer)CALLOC_STRUCT(dmesa_buffer)) != NULL) { - _mesa_initialize_framebuffer((GLframebuffer *)b, - (GLvisual *)visual, - visual->z_buffer == 1, - ((GLvisual *)visual)->stencilBits > 0, - ((GLvisual *)visual)->accumRedBits > 0, - visual->sw_alpha); - b->xpos = xpos; - b->ypos = ypos; - b->width = width; - b->height = height; - } - - return b; -#else /* FX */ - - GLvisual *v = (GLvisual *)visual; - int i = 0, fx_attrib[32]; - - if (v->doubleBufferMode) fx_attrib[i++] = FXMESA_DOUBLEBUFFER; - if (v->depthBits > 0) { fx_attrib[i++] = FXMESA_DEPTH_SIZE; fx_attrib[i++] = v->depthBits; } - if (v->stencilBits > 0) { fx_attrib[i++] = FXMESA_STENCIL_SIZE; fx_attrib[i++] = v->stencilBits; } - if (v->accumRedBits > 0) { fx_attrib[i++] = FXMESA_ACCUM_SIZE; fx_attrib[i++] = v->accumRedBits; } - if (v->alphaBits) { fx_attrib[i++] = FXMESA_ALPHA_SIZE; fx_attrib[i++] = v->alphaBits; } - fx_attrib[i++] = FXMESA_COLORDEPTH; - fx_attrib[i++] = v->redBits + v->greenBits + v->blueBits; - fx_attrib[i] = FXMESA_NONE; - - return (DMesaBuffer)fxMesaCreateBestContext(-1, width, height, fx_attrib); -#endif /* FX */ -} - - -void -DMesaDestroyBuffer (DMesaBuffer b) -{ -#ifndef FX - if (b->the_window != NULL) { - free(b->the_window); - } - _mesa_destroy_framebuffer((GLframebuffer *)b); -#else - fxMesaDestroyContext((fxMesaContext)b); -#endif -} - - -DMesaContext -DMesaCreateContext (DMesaVisual visual, DMesaContext share) -{ - GLcontext *c; -#ifndef FX - TNLcontext *tnl; - struct dd_function_table functions; - - if ((c=(GLcontext *)CALLOC_STRUCT(dmesa_context)) != NULL) { - /* Initialize device driver function table */ - _mesa_init_driver_functions(&functions); - /* override with our functions */ - dmesa_init_driver_functions(visual, &functions); - - _mesa_initialize_context(c, - (GLvisual *)visual, - (GLcontext *)share, - &functions, - (void *)c); - - _mesa_enable_sw_extensions(c); - _mesa_enable_1_3_extensions(c); - _mesa_enable_1_4_extensions(c); - _mesa_enable_1_5_extensions(c); - _mesa_enable_2_0_extensions(c); -#if SWTC - if (c->Mesa_DXTn) { - _mesa_enable_extension(c, "GL_EXT_texture_compression_s3tc"); - _mesa_enable_extension(c, "GL_S3_s3tc"); - } - _mesa_enable_extension(c, "GL_3DFX_texture_compression_FXT1"); -#endif - - /* you probably have to do a bunch of other initializations here. */ - ((DMesaContext)c)->visual = visual; - - /* Initialize the software rasterizer and helper modules. - */ - _swrast_CreateContext(c); - _ac_CreateContext(c); - _tnl_CreateContext(c); - _swsetup_CreateContext(c); - /* tnl setup */ - tnl = TNL_CONTEXT(c); - tnl->Driver.RunPipeline = _tnl_run_pipeline; - /* swrast setup */ - if (((GLvisual *)visual)->rgbMode) dmesa_register_swrast_functions(c); - dmesa_init_pointers(c); - _swsetup_Wakeup(c); - } - -#else /* FX */ - c = (GLcontext *)0xdeadbeef; -#endif /* FX */ - - return (DMesaContext)c; -} - - -void -DMesaDestroyContext (DMesaContext c) -{ -#ifndef FX - if (c) { - _swsetup_DestroyContext((GLcontext *)c); - _swrast_DestroyContext((GLcontext *)c); - _tnl_DestroyContext((GLcontext *)c); - _ac_DestroyContext((GLcontext *)c); - _mesa_destroy_context((GLcontext *)c); - } -#endif -} - - -GLboolean -DMesaMoveBuffer (GLint xpos, GLint ypos) -{ -#ifndef FX - GET_CURRENT_CONTEXT(ctx); - DMesaBuffer b = ((DMesaContext)ctx)->buffer; - - if (vl_sync_buffer(&b->the_window, xpos, ypos, b->width, b->height) == 0) { - b->xpos = xpos; - b->ypos = ypos; - return GL_TRUE; - } -#endif - - return GL_FALSE; -} - - -GLboolean -DMesaResizeBuffer (GLint width, GLint height) -{ -#ifndef FX - GET_CURRENT_CONTEXT(ctx); - DMesaBuffer b = ((DMesaContext)ctx)->buffer; - - if (vl_sync_buffer(&b->the_window, b->xpos, b->ypos, width, height) == 0) { - b->width = width; - b->height = height; - return GL_TRUE; - } -#endif - - return GL_FALSE; -} - - -/* - * Make the specified context and buffer the current one. - */ -GLboolean -DMesaMakeCurrent (DMesaContext c, DMesaBuffer b) -{ -#ifndef FX - if ((c != NULL) && (b != NULL)) { - if (vl_sync_buffer(&b->the_window, b->xpos, b->ypos, b->width, b->height) != 0) { - return GL_FALSE; - } - - c->buffer = b; - - _mesa_make_current((GLcontext *)c, (GLframebuffer *)b); - } - else { - /* Detach */ - _mesa_make_current(NULL, NULL); - } - -#else - fxMesaMakeCurrent((fxMesaContext)b); -#endif - - return GL_TRUE; -} - - -void -DMesaSwapBuffers (DMesaBuffer b) -{ - /* copy/swap back buffer to front if applicable */ -#ifndef FX - GET_CURRENT_CONTEXT(ctx); - _mesa_notifySwapBuffers(ctx); - vl_flip(); -#else - fxMesaSwapBuffers(); -#endif -} - - -void -DMesaSetCI (int ndx, GLfloat red, GLfloat green, GLfloat blue) -{ -#ifndef FX - vl_setCI(ndx, red, green, blue); -#endif -} - - -DMesaContext -DMesaGetCurrentContext (void) -{ - GET_CURRENT_CONTEXT(ctx); - -#ifndef FX -#else - if (ctx != NULL) { - ctx = (GLcontext *)0xdeadbeef; - } -#endif - - return (DMesaContext)ctx; -} - - -DMesaBuffer -DMesaGetCurrentBuffer (void) -{ - const DMesaContext dmesa = DMesaGetCurrentContext(); - - if (dmesa == NULL) { - return NULL; - } - -#ifndef FX - return dmesa->buffer; -#else - return (DMesaBuffer)fxMesaGetCurrentContext(); -#endif -} - - -DMesaProc -DMesaGetProcAddress (const char *name) -{ - DMesaProc p = (DMesaProc)_glapi_get_proc_address(name); - - /* TODO: handle DMesa* namespace - if (p == NULL) { - } - */ - - return p; -} - - -int -DMesaGetIntegerv (GLenum pname, GLint *params) -{ - switch (pname) { - case DMESA_GET_SCREEN_SIZE: - #ifndef FX - vl_get(VL_GET_SCREEN_SIZE, params); - #else - fxGetScreenGeometry(¶ms[0], ¶ms[1]); - #endif - break; - case DMESA_GET_DRIVER_CAPS: - #ifndef FX - params[0] = DMESA_DRIVER_SWDB_BIT; - #else - params[0] = DMESA_DRIVER_LLWO_BIT; - #endif - break; - case DMESA_GET_VIDEO_MODES: - #ifndef FX - return vl_get(VL_GET_VIDEO_MODES, params); - #else - return -1; /* TODO */ - #endif - case DMESA_GET_BUFFER_ADDR: { - #ifndef FX - DMesaContext c = (DMesaContext)DMesaGetCurrentContext(); - if (c != NULL) { - DMesaBuffer b = c->buffer; - if (b != NULL) { - params[0] = (GLint)b->the_window; - } - } - break; - #else - return -1; - #endif - } - default: - return -1; - } - - return 0; -} - - -#if SWTC && (((__DJGPP__ << 8) | __DJGPP_MINOR__) >= 0x204) -#include - -extern_asm(___dj_assert); -extern_asm(_free); -extern_asm(_malloc); -extern_asm(_memset); - -DXE_EXPORT_TABLE_AUTO (___dxe_eta___dxtn) - DXE_EXPORT_ASM (___dj_assert) - DXE_EXPORT_ASM (_free) - DXE_EXPORT_ASM (_malloc) - DXE_EXPORT_ASM (_memset) -DXE_EXPORT_END -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/dpmi.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/dpmi.c deleted file mode 100644 index b2cef04ac8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/dpmi.c +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * DOS/DJGPP device driver v1.5 for Mesa - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#include - -#include "internal.h" - - -#ifndef MAX -#define MAX(x, y) (((x) < (y)) ? (y) : (x)) -#endif - - -/* _create_linear_mapping: - * Maps a physical address range into linear memory. - */ -int -_create_linear_mapping (unsigned long *linear, unsigned long physaddr, int size) -{ - __dpmi_meminfo meminfo; - - if (physaddr >= 0x100000) { - /* map into linear memory */ - meminfo.address = physaddr; - meminfo.size = size; - if (__dpmi_physical_address_mapping(&meminfo) != 0) { - return -1; - } - - *linear = meminfo.address; - } else { - /* exploit 1 -> 1 physical to linear mapping in low megabyte */ - *linear = physaddr; - } - - return 0; -} - - -/* _remove_linear_mapping: - * Frees the DPMI resources being used to map a linear address range. - */ -void -_remove_linear_mapping (unsigned long *linear) -{ - __dpmi_meminfo meminfo; - - if (*linear) { - if (*linear >= 0x100000) { - meminfo.address = *linear; - __dpmi_free_physical_address_mapping(&meminfo); - } - - *linear = 0; - } -} - - -/* _create_selector: - * Allocates a selector to access a region of linear memory. - */ -int -_create_selector (int *segment, unsigned long base, int size) -{ - /* allocate an ldt descriptor */ - if ((*segment=__dpmi_allocate_ldt_descriptors(1)) < 0) { - *segment = 0; - return -1; - } - - /* create the linear mapping */ - if (_create_linear_mapping(&base, base, size)) { - __dpmi_free_ldt_descriptor(*segment); - *segment = 0; - return -1; - } - - /* set the descriptor base and limit */ - __dpmi_set_segment_base_address(*segment, base); - __dpmi_set_segment_limit(*segment, MAX(size-1, 0xFFFF)); - - return 0; -} - - -/* _remove_selector: - * Frees a DPMI segment selector. - */ -void -_remove_selector (int *segment) -{ - if (*segment) { - unsigned long base; - __dpmi_get_segment_base_address(*segment, &base); - _remove_linear_mapping(&base); - __dpmi_free_ldt_descriptor(*segment); - *segment = 0; - } -} - - -/* Desc: retrieve CPU MMX capability - * - * In : - - * Out : FALSE if CPU cannot do MMX - * - * Note: - - */ -int -_can_mmx (void) -{ -#ifdef USE_MMX_ASM - int x86_cpu_features = 0; - __asm("\n\ - pushfl \n\ - popl %%eax \n\ - movl %%eax, %%ecx \n\ - xorl $0x200000, %%eax\n\ - pushl %%eax \n\ - popfl \n\ - pushfl \n\ - popl %%eax \n\ - pushl %%ecx \n\ - popfl \n\ - xorl %%ecx, %%eax \n\ - jz 0f \n\ - movl $1, %%eax \n\ - cpuid \n\ - movl %%edx, %0 \n\ - 0: \n\ - ":"=g"(x86_cpu_features)::"%eax", "%ebx", "%ecx", "%edx"); - return (x86_cpu_features & 0x00800000); -#else - return 0; -#endif -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/internal.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/internal.h deleted file mode 100644 index 85b94d3773..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/internal.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * DOS/DJGPP device driver v1.6 for Mesa - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@users.sourceforge.net - * Web : http://www.geocities.com/dborca - */ - - -#ifndef INTERNAL_H_included -#define INTERNAL_H_included - -#include "../main/mtypes.h" - - -/* - * general purpose defines, etc. - */ -#ifndef FALSE -#define FALSE 0 -#define TRUE !FALSE -#endif - -#define __PACKED__ __attribute__((packed)) - -typedef unsigned char word8; -typedef unsigned short word16; -typedef unsigned long word32; - -#define _16_ *(word16 *)& -#define _32_ *(word32 *)& - - -/* - * video mode structure - */ -typedef struct vl_mode { - int xres, yres; - int bpp; - - int mode; - int scanlen; - - int sel; - int gran; -} vl_mode; - - -/* - * video driver structure - */ -typedef struct { - vl_mode *(*init) (void); - int (*entermode) (vl_mode *p, int refresh); - void (*blit) (void); - void (*setCI_f) (int index, float red, float green, float blue); - void (*setCI_i) (int index, int red, int green, int blue); - int (*get) (int pname, int *params); - void (*restore) (void); - void (*fini) (void); -} vl_driver; - - -/* - * memory mapping - */ -int _create_linear_mapping (unsigned long *linear, unsigned long physaddr, int size); -void _remove_linear_mapping (unsigned long *linear); -int _create_selector (int *segment, unsigned long base, int size); -void _remove_selector (int *segment); - - -/* - * system routines - */ -int _can_mmx (void); - - -/* - * asm routines to deal with virtual buffering - */ -extern void v_clear8 (int color); -#define v_clear15 v_clear16 -extern void v_clear16 (int color); -extern void v_clear24 (int color); -extern void v_clear32 (int color); - -extern void v_clear8_mmx (int color); -#define v_clear15_mmx v_clear16_mmx -extern void v_clear16_mmx (int color); -extern void v_clear24_mmx (int color); -extern void v_clear32_mmx (int color); - -extern void v_rect8 (int x, int y, int width, int height, int color); -#define v_rect15 v_rect16 -extern void v_rect16 (int x, int y, int width, int height, int color); -extern void v_rect24 (int x, int y, int width, int height, int color); -extern void v_rect32 (int x, int y, int width, int height, int color); - -extern void v_putpixel8 (unsigned int offset, int color); -#define v_putpixel15 v_putpixel16 -extern void v_putpixel16 (unsigned int offset, int color); -extern void v_putpixel24 (unsigned int offset, int color); -extern void v_putpixel32 (unsigned int offset, int color); - - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/null.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/null.c deleted file mode 100644 index 369255a422..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/null.c +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * DOS/DJGPP device driver v1.7 for Mesa - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@users.sourceforge.net - * Web : http://www.geocities.com/dborca - */ - - -#include -#include - -#include "video.h" -#include "null.h" - - -static vl_mode *modes; - -#define null_color_precision 8 - - -static void -null_blit_nop (void) -{ -} - - -/* Desc: Attempts to detect NUL, check video modes and create selectors. - * - * In : - - * Out : mode array - * - * Note: - - */ -static vl_mode * -null_init (void) -{ - static int m[][2] = { - { 320, 200 }, - { 320, 240 }, - { 400, 300 }, - { 512, 384 }, - { 640, 400 }, - { 640, 480 }, - { 800, 600 }, - { 1024, 768 }, - { 1280, 1024 }, - { 1600, 1200 } - }; - static int b[] = { - 8, - 15, - 16, - 24, - 32 - }; - const unsigned int m_count = sizeof(m) / sizeof(m[0]); - const unsigned int b_count = sizeof(b) / sizeof(b[0]); - - unsigned int i, j, k; - - if (modes == NULL) { - modes = malloc(sizeof(vl_mode) * (1 + m_count * b_count)); - - if (modes != NULL) { - for (k = 0, i = 0; i < m_count; i++) { - for (j = 0; j < b_count; j++, k++) { - modes[k].xres = m[i][0]; - modes[k].yres = m[i][1]; - modes[k].bpp = b[j]; - modes[k].mode = 0x4000; - modes[k].scanlen = m[i][0] * ((b[j] + 7) / 8); - modes[k].sel = -1; - modes[k].gran = -1; - } - } - modes[k].xres = -1; - modes[k].yres = -1; - modes[k].bpp = -1; - modes[k].mode = 0xffff; - modes[k].scanlen = -1; - modes[k].sel = -1; - modes[k].gran = -1; - } - } - - return modes; -} - - -/* Desc: Frees all resources allocated by NUL init code. - * - * In : - - * Out : - - * - * Note: - - */ -static void -null_fini (void) -{ - if (modes != NULL) { - free(modes); - modes = NULL; - } -} - - -/* Desc: Attempts to enter specified video mode. - * - * In : ptr to mode structure, refresh rate - * Out : 0 if success - * - * Note: - - */ -static int -null_entermode (vl_mode *p, int refresh) -{ - NUL.blit = null_blit_nop; - - return 0; - - (void)(p && refresh); /* silence compiler warning */ -} - - -/* Desc: Restores to the mode prior to first call to null_entermode. - * - * In : - - * Out : - - * - * Note: - - */ -static void -null_restore (void) -{ -} - - -/* Desc: set one palette entry - * - * In : color index, R, G, B - * Out : - - * - * Note: uses integer values - */ -static void -null_setCI_i (int index, int red, int green, int blue) -{ - (void)(index && red && green && blue); /* silence compiler warning */ -} - - -/* Desc: set one palette entry - * - * In : color index, R, G, B - * Out : - - * - * Note: uses normalized values - */ -static void -null_setCI_f (int index, float red, float green, float blue) -{ - float max = (1 << null_color_precision) - 1; - - null_setCI_i(index, (int)(red * max), (int)(green * max), (int)(blue * max)); -} - - -/* Desc: state retrieval - * - * In : parameter name, ptr to storage - * Out : 0 if request successfully processed - * - * Note: - - */ -static int -null_get (int pname, int *params) -{ - switch (pname) { - default: - params[0] = params[0]; /* silence compiler warning */ - return -1; - } - return 0; -} - - -/* - * the driver - */ -vl_driver NUL = { - null_init, - null_entermode, - NULL, - null_setCI_f, - null_setCI_i, - null_get, - null_restore, - null_fini -}; diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/null.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/null.h deleted file mode 100644 index a38accc857..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/null.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * DOS/DJGPP device driver v1.6 for Mesa - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#ifndef NULL_H_included -#define NULL_H_included - -#include "internal.h" - -extern vl_driver NUL; - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/vesa.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/vesa.c deleted file mode 100644 index cd48a24bfb..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/vesa.c +++ /dev/null @@ -1,531 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * DOS/DJGPP device driver v1.6 for Mesa - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@users.sourceforge.net - * Web : http://www.geocities.com/dborca - */ - - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "video.h" -#include "vesa.h" - - -static vl_mode modes[128]; - -static word16 vesa_ver; -static int banked_selector, linear_selector; -static int oldmode = -1; - -static int vesa_color_precision = 6; - -static word16 *vesa_pmcode; -unsigned int vesa_gran_mask, vesa_gran_shift; - - -/* - * VESA info - */ -#define V_SIGN 0 -#define V_MINOR 4 -#define V_MAJOR 5 -#define V_OEM_OFS 6 -#define V_OEM_SEG 8 -#define V_MODE_OFS 14 -#define V_MODE_SEG 16 -#define V_MEMORY 18 - -/* - * mode info - */ -#define M_ATTR 0 -#define M_GRAN 4 -#define M_SCANLEN 16 -#define M_XRES 18 -#define M_YRES 20 -#define M_BPP 25 -#define M_RED 31 -#define M_GREEN 33 -#define M_BLUE 35 -#define M_PHYS_PTR 40 - -/* - * VESA 3.0 CRTC timings structure - */ -typedef struct CRTCInfoBlock { - unsigned short HorizontalTotal; - unsigned short HorizontalSyncStart; - unsigned short HorizontalSyncEnd; - unsigned short VerticalTotal; - unsigned short VerticalSyncStart; - unsigned short VerticalSyncEnd; - unsigned char Flags; - unsigned long PixelClock; /* units of Hz */ - unsigned short RefreshRate; /* units of 0.01 Hz */ - unsigned char reserved[40]; -} __PACKED__ CRTCInfoBlock; - -#define HNEG (1 << 2) -#define VNEG (1 << 3) -#define DOUBLESCAN (1 << 0) - - -/* Desc: Attempts to detect VESA, check video modes and create selectors. - * - * In : - - * Out : mode array - * - * Note: - - */ -static vl_mode * -vesa_init (void) -{ - __dpmi_regs r; - word16 *p; - vl_mode *q; - char vesa_info[512], tmp[512]; - int maxsize = 0; - word32 linearfb = 0; - - if (vesa_ver) { - return modes; - } - - _farpokel(_stubinfo->ds_selector, 0, 0x32454256); - r.x.ax = 0x4f00; - r.x.di = 0; - r.x.es = _stubinfo->ds_segment; - __dpmi_int(0x10, &r); - movedata(_stubinfo->ds_selector, 0, _my_ds(), (unsigned)vesa_info, 512); - if ((r.x.ax != 0x004f) || ((_32_ vesa_info[V_SIGN]) != 0x41534556)) { - return NULL; - } - - p = (word16 *)(((_16_ vesa_info[V_MODE_SEG])<<4) + (_16_ vesa_info[V_MODE_OFS])); - q = modes; - do { - if ((q->mode=_farpeekw(__djgpp_dos_sel, (unsigned long)(p++))) == 0xffff) { - break; - } - - r.x.ax = 0x4f01; - r.x.cx = q->mode; - r.x.di = 512; - r.x.es = _stubinfo->ds_segment; - __dpmi_int(0x10, &r); - movedata(_stubinfo->ds_selector, 512, _my_ds(), (unsigned)tmp, 256); - switch (tmp[M_BPP]) { - case 16: - q->bpp = tmp[M_RED] + tmp[M_GREEN] + tmp[M_BLUE]; - break; - case 8: - case 15: - case 24: - case 32: - q->bpp = tmp[M_BPP]; - break; - default: - q->bpp = 0; - } - if ((r.x.ax == 0x004f) && ((tmp[M_ATTR] & 0x11) == 0x11) && q->bpp) { - q->xres = _16_ tmp[M_XRES]; - q->yres = _16_ tmp[M_YRES]; - q->scanlen = _16_ tmp[M_SCANLEN]; - q->gran = (_16_ tmp[M_GRAN])<<10; - if (tmp[M_ATTR] & 0x80) { - vl_mode *q1 = q + 1; - *q1 = *q++; - linearfb = _32_ tmp[M_PHYS_PTR]; - q->mode |= 0x4000; - } - if (maxsize < (q->scanlen * q->yres)) { - maxsize = q->scanlen * q->yres; - } - q++; - } - } while (TRUE); - - if (q == modes) { - return NULL; - } - if (linearfb) { - maxsize = (maxsize + 0xfffUL) & ~0xfffUL; - if (_create_selector(&linear_selector, linearfb, maxsize)) { - return NULL; - } - } - if (_create_selector(&banked_selector, 0xa0000, modes[0].gran)) { - _remove_selector(&linear_selector); - return NULL; - } - - for (q = modes; q->mode != 0xffff; q++) { - q->sel = (q->mode & 0x4000) ? linear_selector : banked_selector; - } - - if (vesa_info[V_MAJOR] >= 2) { - r.x.ax = 0x4f0a; - r.x.bx = 0; - __dpmi_int(0x10, &r); - if (r.x.ax == 0x004f) { - vesa_pmcode = (word16 *)malloc(r.x.cx); - if (vesa_pmcode != NULL) { - movedata(__djgpp_dos_sel, (r.x.es << 4) + r.x.di, _my_ds(), (unsigned)vesa_pmcode, r.x.cx); - if (vesa_pmcode[3]) { - p = (word16 *)((long)vesa_pmcode + vesa_pmcode[3]); - while (*p++ != 0xffff) { - } - } else { - p = NULL; - } - if (p && (*p != 0xffff)) { - free(vesa_pmcode); - vesa_pmcode = NULL; - } else { - vesa_swbank = (void *)((long)vesa_pmcode + vesa_pmcode[0]); - } - } - } - } - - vesa_ver = _16_ vesa_info[V_MINOR]; - return modes; -} - - -/* Desc: Frees all resources allocated by VESA init code. - * - * In : - - * Out : - - * - * Note: - - */ -static void -vesa_fini (void) -{ - if (vesa_ver) { - _remove_selector(&linear_selector); - _remove_selector(&banked_selector); - if (vesa_pmcode != NULL) { - free(vesa_pmcode); - vesa_pmcode = NULL; - } - } -} - - -/* Desc: Uses VESA 3.0 function 0x4F0B to find the closest pixel clock to the requested value. - * - * In : mode, clock - * Out : desired clock - * - * Note: - - */ -static unsigned long -_closest_pixclk (int mode_no, unsigned long vclk) -{ - __dpmi_regs r; - - r.x.ax = 0x4F0B; - r.h.bl = 0; - r.d.ecx = vclk; - r.x.dx = mode_no; - __dpmi_int(0x10, &r); - - return (r.x.ax == 0x004f) ? r.d.ecx : 0; -} - - -/* Desc: Calculates CRTC mode timings. - * - * In : crtc block, geometry, adjust - * Out : - * - * Note: - */ -static void -_crtc_timing (CRTCInfoBlock *crtc, int xres, int yres, int xadjust, int yadjust) -{ - int HTotal, VTotal; - int HDisp, VDisp; - int HSS, VSS; - int HSE, VSE; - int HSWidth, VSWidth; - int SS, SE; - int doublescan = FALSE; - - if (yres < 400) { - doublescan = TRUE; - yres *= 2; - } - - HDisp = xres; - HTotal = (int)(HDisp * 1.27) & ~0x7; - HSWidth = (int)((HTotal - HDisp) / 5) & ~0x7; - HSS = HDisp + 16; - HSE = HSS + HSWidth; - VDisp = yres; - VTotal = VDisp * 1.07; - VSWidth = (VTotal / 100) + 1; - VSS = VDisp + ((int)(VTotal - VDisp) / 5) + 1; - VSE = VSS + VSWidth; - - SS = HSS + xadjust; - SE = HSE + xadjust; - - if (xadjust < 0) { - if (SS < (HDisp + 8)) { - SS = HDisp + 8; - SE = SS + HSWidth; - } - } else { - if ((HTotal - 24) < SE) { - SE = HTotal - 24; - SS = SE - HSWidth; - } - } - - HSS = SS; - HSE = SE; - - SS = VSS + yadjust; - SE = VSE + yadjust; - - if (yadjust < 0) { - if (SS < (VDisp + 3)) { - SS = VDisp + 3; - SE = SS + VSWidth; - } - } else { - if ((VTotal - 4) < SE) { - SE = VTotal - 4; - SS = SE - VSWidth; - } - } - - VSS = SS; - VSE = SE; - - crtc->HorizontalTotal = HTotal; - crtc->HorizontalSyncStart = HSS; - crtc->HorizontalSyncEnd = HSE; - crtc->VerticalTotal = VTotal; - crtc->VerticalSyncStart = VSS; - crtc->VerticalSyncEnd = VSE; - crtc->Flags = HNEG | VNEG; - - if (doublescan) { - crtc->Flags |= DOUBLESCAN; - } -} - - -/* Desc: Attempts to enter specified video mode. - * - * In : ptr to mode structure, refresh rate - * Out : 0 if success - * - * Note: - - */ -static int -vesa_entermode (vl_mode *p, int refresh) -{ - __dpmi_regs r; - - if (p->mode & 0x4000) { - VESA.blit = _can_mmx() ? vesa_l_dump_virtual_mmx : vesa_l_dump_virtual; - } else { - VESA.blit = vesa_b_dump_virtual; - { int n; for (vesa_gran_shift=0, n=p->gran; n; vesa_gran_shift++, n>>=1) ; } - vesa_gran_mask = (1 << (--vesa_gran_shift)) - 1; - if ((unsigned)p->gran != (vesa_gran_mask+1)) { - return !0; - } - } - - if (oldmode == -1) { - r.x.ax = 0x4f03; - __dpmi_int(0x10, &r); - oldmode = r.x.bx; - } - - r.x.ax = 0x4f02; - r.x.bx = p->mode; - - if (refresh && ((vesa_ver>>8) >= 3)) { - /* VESA 3.0 stuff for controlling the refresh rate */ - CRTCInfoBlock crtc; - unsigned long vclk; - double f0; - - _crtc_timing(&crtc, p->xres, p->yres, 0, 0); - - vclk = (double)crtc.HorizontalTotal * crtc.VerticalTotal * refresh; - vclk = _closest_pixclk(p->mode, vclk); - - if (vclk != 0) { - f0 = (double)vclk / (crtc.HorizontalTotal * crtc.VerticalTotal); - /*_current_refresh_rate = (int)(f0 + 0.5);*/ - - crtc.PixelClock = vclk; - crtc.RefreshRate = refresh * 100; - - movedata(_my_ds(), (unsigned)&crtc, _stubinfo->ds_selector, 0, sizeof(crtc)); - - r.x.di = 0; - r.x.es = _stubinfo->ds_segment; - r.x.bx |= 0x0800; - } - } - - __dpmi_int(0x10, &r); - if (r.x.ax != 0x004f) { - return !0; - } - - if (p->bpp == 8) { - r.x.ax = 0x4f08; - r.x.bx = 0x0800; - __dpmi_int(0x10, &r); - if (r.x.ax == 0x004f) { - r.x.ax = 0x4f08; - r.h.bl = 0x01; - __dpmi_int(0x10, &r); - vesa_color_precision = r.h.bh; - } - } - - return 0; -} - - -/* Desc: Restores to the mode prior to first call to vesa_entermode. - * - * In : - - * Out : - - * - * Note: - - */ -static void -vesa_restore (void) -{ - __dpmi_regs r; - - if (oldmode != -1) { - r.x.ax = 0x4f02; - r.x.bx = oldmode; - __dpmi_int(0x10, &r); - oldmode = -1; - } -} - - -/* Desc: set one palette entry - * - * In : color index, R, G, B - * Out : - - * - * Note: uses integer values - */ -static void -vesa_setCI_i (int index, int red, int green, int blue) -{ -#if 0 - __asm("\n\ - movw $0x1010, %%ax \n\ - movb %1, %%dh \n\ - movb %2, %%ch \n\ - int $0x10 \n\ - "::"b"(index), "m"(red), "m"(green), "c"(blue):"%eax", "%edx"); -#else - outportb(0x03C8, index); - outportb(0x03C9, red); - outportb(0x03C9, green); - outportb(0x03C9, blue); -#endif -} - - -/* Desc: set one palette entry - * - * In : color index, R, G, B - * Out : - - * - * Note: uses normalized values - */ -static void -vesa_setCI_f (int index, float red, float green, float blue) -{ - float max = (1 << vesa_color_precision) - 1; - - vesa_setCI_i(index, (int)(red * max), (int)(green * max), (int)(blue * max)); -} - - -/* Desc: state retrieval - * - * In : parameter name, ptr to storage - * Out : 0 if request successfully processed - * - * Note: - - */ -static int -vesa_get (int pname, int *params) -{ - switch (pname) { - case VL_GET_CI_PREC: - params[0] = vesa_color_precision; - break; - default: - return -1; - } - return 0; -} - - -/* - * the driver - */ -vl_driver VESA = { - vesa_init, - vesa_entermode, - NULL, - vesa_setCI_f, - vesa_setCI_i, - vesa_get, - vesa_restore, - vesa_fini -}; diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/vesa.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/vesa.h deleted file mode 100644 index 9287697c37..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/vesa.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * DOS/DJGPP device driver v1.3 for Mesa - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#ifndef VESA_H_included -#define VESA_H_included - -#include "internal.h" - -extern void *vesa_swbank; - -extern void vesa_b_dump_virtual (void); -extern void vesa_l_dump_virtual (void); -extern void vesa_l_dump_virtual_mmx (void); - -extern vl_driver VESA; - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/vga.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/vga.c deleted file mode 100644 index 27758f14d2..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/vga.c +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * DOS/DJGPP device driver v1.7 for Mesa - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@users.sourceforge.net - * Web : http://www.geocities.com/dborca - */ - - -#include -#include - -#include "video.h" -#include "vga.h" - - -static vl_mode modes[] = { - { - /* .xres = */ 320, - /* .yres = */ 200, - /* .bpp = */ 8, - /* .mode = */ 0x13 | 0x4000, - /* .scanlen = */ 320, - /* .sel = */ -1, - /* .gran = */ 320*200 - }, - { - /* .xres = */ -1, - /* .yres = */ -1, - /* .bpp = */ -1, - /* .mode = */ 0xffff, - /* .scanlen = */ -1, - /* .sel = */ -1, - /* .gran = */ -1 - } -}; - -static word16 vga_ver; -static int linear_selector; -static int oldmode = -1; - -#define vga_color_precision 6 - - -/* Desc: Attempts to detect VGA, check video modes and create selectors. - * - * In : - - * Out : mode array - * - * Note: - - */ -static vl_mode * -vga_init (void) -{ - int rv = 0; - - if (vga_ver) { - return modes; - } - - __asm("\n\ - movw $0x1a00, %%ax \n\ - int $0x10 \n\ - cmpb $0x1a, %%al \n\ - jne 0f \n\ - cmpb $0x07, %%bl \n\ - jb 0f \n\ - andl $0xff, %%ebx \n\ - movl %%ebx, %0 \n\ - 0:":"=g"(rv)::"%eax", "%ebx"); - if (rv == 0) { - return NULL; - } - - if (_create_selector(&linear_selector, 0xa0000, 0x10000)) { - return NULL; - } - - modes[0].sel = linear_selector; - - vga_ver = rv; - return modes; -} - - -/* Desc: Frees all resources allocated by VGA init code. - * - * In : - - * Out : - - * - * Note: - - */ -static void -vga_fini (void) -{ - if (vga_ver) { - _remove_selector(&linear_selector); - } -} - - -/* Desc: Attempts to enter specified video mode. - * - * In : ptr to mode structure, refresh rate - * Out : 0 if success - * - * Note: - - */ -static int -vga_entermode (vl_mode *p, int refresh) -{ - if (!(p->mode & 0x4000)) { - return -1; - } - VGA.blit = _can_mmx() ? vesa_l_dump_virtual_mmx : vesa_l_dump_virtual; - - if (oldmode == -1) { - __asm("\n\ - movb $0x0f, %%ah \n\ - int $0x10 \n\ - andl $0xff, %%eax \n\ - movl %%eax, %0 \n\ - ":"=g"(oldmode)::"%eax", "%ebx"); - } - - __asm("int $0x10"::"a"(p->mode&0xff)); - - return 0; - - (void)refresh; /* silence compiler warning */ -} - - -/* Desc: Restores to the mode prior to first call to vga_entermode. - * - * In : - - * Out : - - * - * Note: - - */ -static void -vga_restore (void) -{ - if (oldmode != -1) { - __asm("int $0x10"::"a"(oldmode)); - oldmode = -1; - } -} - - -/* Desc: set one palette entry - * - * In : color index, R, G, B - * Out : - - * - * Note: uses integer values - */ -static void -vga_setCI_i (int index, int red, int green, int blue) -{ -#if 0 - __asm("\n\ - movw $0x1010, %%ax \n\ - movb %1, %%dh \n\ - movb %2, %%ch \n\ - int $0x10 \n\ - "::"b"(index), "m"(red), "m"(green), "c"(blue):"%eax", "%edx"); -#else - outportb(0x03C8, index); - outportb(0x03C9, red); - outportb(0x03C9, green); - outportb(0x03C9, blue); -#endif -} - - -/* Desc: set one palette entry - * - * In : color index, R, G, B - * Out : - - * - * Note: uses normalized values - */ -static void -vga_setCI_f (int index, float red, float green, float blue) -{ - float max = (1 << vga_color_precision) - 1; - - vga_setCI_i(index, (int)(red * max), (int)(green * max), (int)(blue * max)); -} - - -/* Desc: state retrieval - * - * In : parameter name, ptr to storage - * Out : 0 if request successfully processed - * - * Note: - - */ -static int -vga_get (int pname, int *params) -{ - switch (pname) { - case VL_GET_CI_PREC: - params[0] = vga_color_precision; - break; - default: - return -1; - } - return 0; -} - - -/* - * the driver - */ -vl_driver VGA = { - vga_init, - vga_entermode, - NULL, - vga_setCI_f, - vga_setCI_i, - vga_get, - vga_restore, - vga_fini -}; diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/vga.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/vga.h deleted file mode 100644 index aeb8faddae..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/vga.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * DOS/DJGPP device driver v1.3 for Mesa - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - -#ifndef VGA_H_included -#define VGA_H_included - -#include "internal.h" -#include "vesa.h" - -extern vl_driver VGA; - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/video.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/video.c deleted file mode 100644 index 60370afc8e..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/video.c +++ /dev/null @@ -1,669 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * DOS/DJGPP device driver v1.6 for Mesa - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@users.sourceforge.net - * Web : http://www.geocities.com/dborca - * - * Thanks to CrazyPyro (Neil Funk) for FakeColor - */ - - -#include - -#include "internal.h" -#include "vesa.h" -#include "vga.h" -#include "null.h" -#include "video.h" - - -static vl_driver *drv; -/* based upon mode specific data: valid entire session */ -int vl_video_selector; -static vl_mode *video_mode; -static int video_scanlen, video_bypp; -/* valid until next buffer */ -void *vl_current_draw_buffer, *vl_current_read_buffer; -int vl_current_stride, vl_current_width, vl_current_height, vl_current_bytes; -int vl_current_offset, vl_current_delta; - - -#if HUGE_LOOKUP -/* These lookup tables are used to extract RGB values in [0,255] - * from 15/16-bit pixel values. - */ -static unsigned char pix15r[0x8000]; -static unsigned char pix15g[0x8000]; -static unsigned char pix15b[0x8000]; -static unsigned char pix16r[0x10000]; -static unsigned char pix16g[0x10000]; -static unsigned char pix16b[0x10000]; -#else -/* lookup table for scaling 5 bit colors up to 8 bits */ -static int _rgb_scale_5[32] = { - 0, 8, 16, 25, 33, 41, 49, 58, - 66, 74, 82, 90, 99, 107, 115, 123, - 132, 140, 148, 156, 165, 173, 181, 189, - 197, 206, 214, 222, 230, 239, 247, 255 -}; -#endif - -/* lookup table for scaling 6 bit colors up to 8 bits */ -static int _rgb_scale_6[64] = { - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 45, 49, 53, 57, 61, - 65, 69, 73, 77, 81, 85, 89, 93, - 97, 101, 105, 109, 113, 117, 121, 125, - 130, 134, 138, 142, 146, 150, 154, 158, - 162, 166, 170, 174, 178, 182, 186, 190, - 194, 198, 202, 206, 210, 215, 219, 223, - 227, 231, 235, 239, 243, 247, 251, 255 -}; - -/* FakeColor data */ -#define R_CNT 6 -#define G_CNT 6 -#define B_CNT 6 - -#define R_BIAS 7 -#define G_BIAS 7 -#define B_BIAS 7 - -static word32 VGAPalette[256]; -static word8 array_r[256]; -static word8 array_g[256]; -static word8 array_b[256]; - - -int (*vl_mixfix) (fixed r, fixed g, fixed b); -int (*vl_mixrgb) (const unsigned char rgb[]); -int (*vl_mixrgba) (const unsigned char rgba[]); -void (*vl_getrgba) (unsigned int offset, unsigned char rgba[4]); -int (*vl_getpixel) (unsigned int offset); -void (*vl_clear) (int color); -void (*vl_rect) (int x, int y, int width, int height, int color); -void (*vl_flip) (void); -void (*vl_putpixel) (unsigned int offset, int color); - - -/* Desc: color composition (w/o ALPHA) - * - * In : R, G, B - * Out : color - * - * Note: - - */ -static int -vl_mixfix8fake (fixed r, fixed g, fixed b) -{ - return array_b[b>>FIXED_SHIFT]*G_CNT*R_CNT - + array_g[g>>FIXED_SHIFT]*R_CNT - + array_r[r>>FIXED_SHIFT]; -} -#define vl_mixfix8 vl_mixfix8fake -static int -vl_mixfix15 (fixed r, fixed g, fixed b) -{ - return ((r>>(3+FIXED_SHIFT))<<10) - |((g>>(3+FIXED_SHIFT))<<5) - | (b>>(3+FIXED_SHIFT)); -} -static int -vl_mixfix16 (fixed r, fixed g, fixed b) -{ - return ((r>>(3+FIXED_SHIFT))<<11) - |((g>>(2+FIXED_SHIFT))<<5) - | (b>>(3+FIXED_SHIFT)); -} -#define vl_mixfix24 vl_mixfix32 -static int -vl_mixfix32 (fixed r, fixed g, fixed b) -{ - return ((r>>FIXED_SHIFT)<<16) - |((g>>FIXED_SHIFT)<<8) - | (b>>FIXED_SHIFT); -} - - -/* Desc: color composition (w/ ALPHA) - * - * In : array of integers (R, G, B, A) - * Out : color - * - * Note: - - */ -#define vl_mixrgba8 vl_mixrgb8fake -#define vl_mixrgba15 vl_mixrgb15 -#define vl_mixrgba16 vl_mixrgb16 -#define vl_mixrgba24 vl_mixrgb24 -static int -vl_mixrgba32 (const unsigned char rgba[]) -{ - /* Hack alert: - * currently, DMesa uses Mesa's alpha buffer; - * so we don't really care about alpha value here... - */ - return /*(rgba[3]<<24) | */(rgba[0]<<16) | (rgba[1]<<8) | (rgba[2]); -} - - -/* Desc: color composition (w/o ALPHA) - * - * In : array of integers (R, G, B) - * Out : color - * - * Note: - - */ -static int -vl_mixrgb8fake (const unsigned char rgb[]) -{ - return array_b[rgb[2]]*G_CNT*R_CNT - + array_g[rgb[1]]*R_CNT - + array_r[rgb[0]]; -} -#define vl_mixrgb8 vl_mixrgb8fake -static int -vl_mixrgb15 (const unsigned char rgb[]) -{ - return ((rgb[0]>>3)<<10) | ((rgb[1]>>3)<<5) | (rgb[2]>>3); -} -static int -vl_mixrgb16 (const unsigned char rgb[]) -{ - return ((rgb[0]>>3)<<11) | ((rgb[1]>>2)<<5) | (rgb[2]>>3); -} -#define vl_mixrgb24 vl_mixrgb32 -static int -vl_mixrgb32 (const unsigned char rgb[]) -{ - return (rgb[0]<<16) | (rgb[1]<<8) | (rgb[2]); -} - - -/* Desc: color decomposition - * - * In : pixel offset, array of integers to hold color components (R, G, B, A) - * Out : - - * - * Note: uses current read buffer - */ -static void -v_getrgba8fake6 (unsigned int offset, unsigned char rgba[4]) -{ - word32 c = VGAPalette[((word8 *)vl_current_read_buffer)[offset]]; - rgba[0] = _rgb_scale_6[(c >> 16) & 0x3F]; - rgba[1] = _rgb_scale_6[(c >> 8) & 0x3F]; - rgba[2] = _rgb_scale_6[ c & 0x3F]; - /*rgba[3] = c >> 24;*/ /* dummy alpha; we have separate SW alpha, so ignore */ -} -static void -v_getrgba8fake8 (unsigned int offset, unsigned char rgba[4]) -{ - word32 c = VGAPalette[((word8 *)vl_current_read_buffer)[offset]]; - rgba[0] = c >> 16; - rgba[1] = c >> 8; - rgba[2] = c; - /*rgba[3] = c >> 24;*/ /* dummy alpha; we have separate SW alpha, so ignore */ -} -#define v_getrgba8 v_getrgba8fake6 -static void -v_getrgba15 (unsigned int offset, unsigned char rgba[4]) -{ - word32 c = ((word16 *)vl_current_read_buffer)[offset]; -#if HUGE_LOOKUP - c &= 0x7fff; - rgba[0] = pix15r[c]; - rgba[1] = pix15g[c]; - rgba[2] = pix15b[c]; -#else - rgba[0] = _rgb_scale_5[(c >> 10) & 0x1F]; - rgba[1] = _rgb_scale_5[(c >> 5) & 0x1F]; - rgba[2] = _rgb_scale_5[ c & 0x1F]; -#endif - /*rgba[3] = 255;*/ /* dummy alpha; we have separate SW alpha, so ignore */ -} -static void -v_getrgba16 (unsigned int offset, unsigned char rgba[4]) -{ - word32 c = ((word16 *)vl_current_read_buffer)[offset]; -#if HUGE_LOOKUP - rgba[0] = pix16r[c]; - rgba[1] = pix16g[c]; - rgba[2] = pix16b[c]; -#else - rgba[0] = _rgb_scale_5[(c >> 11) & 0x1F]; - rgba[1] = _rgb_scale_6[(c >> 5) & 0x3F]; - rgba[2] = _rgb_scale_5[ c & 0x1F]; -#endif - /*rgba[3] = 255;*/ /* dummy alpha; we have separate SW alpha, so ignore */ -} -static void -v_getrgba24 (unsigned int offset, unsigned char rgba[4]) -{ - word32 c = *(word32 *)((long)vl_current_read_buffer+offset*3); - rgba[0] = c >> 16; - rgba[1] = c >> 8; - rgba[2] = c; - /*rgba[3] = 255;*/ /* dummy alpha; we have separate SW alpha, so ignore */ -} -static void -v_getrgba32 (unsigned int offset, unsigned char rgba[4]) -{ - word32 c = ((word32 *)vl_current_read_buffer)[offset]; - rgba[0] = c >> 16; - rgba[1] = c >> 8; - rgba[2] = c; - /*rgba[3] = c >> 24;*/ /* dummy alpha; we have separate SW alpha, so ignore */ -} - - -/* Desc: pixel retrieval - * - * In : pixel offset - * Out : pixel value - * - * Note: uses current read buffer - */ -static int -v_getpixel8 (unsigned int offset) -{ - return ((word8 *)vl_current_read_buffer)[offset]; -} -#define v_getpixel15 v_getpixel16 -static int -v_getpixel16 (unsigned int offset) -{ - return ((word16 *)vl_current_read_buffer)[offset]; -} -static int -v_getpixel24 (unsigned int offset) -{ - return *(word32 *)((long)vl_current_read_buffer+offset*3); -} -static int -v_getpixel32 (unsigned int offset) -{ - return ((word32 *)vl_current_read_buffer)[offset]; -} - - -/* Desc: set one palette entry - * - * In : index, R, G, B - * Out : - - * - * Note: color components are in range [0.0 .. 1.0] - */ -void -vl_setCI (int index, float red, float green, float blue) -{ - drv->setCI_f(index, red, green, blue); -} - - -/* Desc: set one palette entry - * - * In : color, R, G, B - * Out : - - * - * Note: - - */ -static void -fake_setcolor (int c, int r, int g, int b) -{ - VGAPalette[c] = 0xff000000 | (r<<16) | (g<<8) | b; - - drv->setCI_i(c, r, g, b); -} - - -/* Desc: build FakeColor palette - * - * In : CI precision in bits - * Out : - - * - * Note: - - */ -static void -fake_buildpalette (int bits) -{ - double c_r, c_g, c_b; - int r, g, b, color = 0; - - double max = (1 << bits) - 1; - - for (b = 0; b < B_CNT; ++b) { - for (g = 0; g < G_CNT; ++g) { - for (r = 0; r < R_CNT; ++r) { - c_r = 0.5 + (double)r * (max-R_BIAS) / (R_CNT-1.) + R_BIAS; - c_g = 0.5 + (double)g * (max-G_BIAS) / (G_CNT-1.) + G_BIAS; - c_b = 0.5 + (double)b * (max-B_BIAS) / (B_CNT-1.) + B_BIAS; - fake_setcolor(color++, (int)c_r, (int)c_g, (int)c_b); - } - } - } - - for (color = 0; color < 256; color++) { - c_r = (double)color * R_CNT / 256.; - c_g = (double)color * G_CNT / 256.; - c_b = (double)color * B_CNT / 256.; - array_r[color] = (int)c_r; - array_g[color] = (int)c_g; - array_b[color] = (int)c_b; - } -} - - -#if HUGE_LOOKUP -/* Desc: initialize lookup arrays - * - * In : - - * Out : - - * - * Note: - - */ -void -v_init_pixeltables (void) -{ - unsigned int pixel; - - for (pixel = 0; pixel <= 0xffff; pixel++) { - unsigned int r, g, b; - - if (pixel <= 0x7fff) { - /* 15bit */ - r = (pixel & 0x7c00) >> 8; - g = (pixel & 0x03E0) >> 3; - b = (pixel & 0x001F) << 2; - - r = (unsigned int)(((double)r * 255. / 0x7c) + 0.5); - g = (unsigned int)(((double)g * 255. / 0x7c) + 0.5); - b = (unsigned int)(((double)b * 255. / 0x7c) + 0.5); - - pix15r[pixel] = r; - pix15g[pixel] = g; - pix15b[pixel] = b; - } - - /* 16bit */ - r = (pixel & 0xF800) >> 8; - g = (pixel & 0x07E0) >> 3; - b = (pixel & 0x001F) << 3; - - r = (unsigned int)(((double)r * 255. / 0xF8) + 0.5); - g = (unsigned int)(((double)g * 255. / 0xFC) + 0.5); - b = (unsigned int)(((double)b * 255. / 0xF8) + 0.5); - - pix16r[pixel] = r; - pix16g[pixel] = g; - pix16b[pixel] = b; - } -} -#endif - - -/* Desc: initialize hardware - * - * In : - - * Out : list of available modes - * - * Note: when returning non-NULL, global variable `drv' is guaranteed to be ok - */ -static vl_mode * -v_init_hw (void) -{ - static vl_mode *q = NULL; - - if (q == NULL) { - /* are we forced to NUL driver? */ - if (getenv("DMESA_NULDRV")) { - if ((q = NUL.init()) != NULL) { - drv = &NUL; - } - return q; - } - /* initialize hardware */ - if ((q = VESA.init()) != NULL) { - drv = &VESA; - } else if ((q = VGA.init()) != NULL) { - drv = &VGA; - } else { - drv = NULL; - } - } - - return q; -} - - -/* Desc: sync buffer with video hardware - * - * In : ptr to old buffer, position, size - * Out : 0 if success - * - * Note: - - */ -int -vl_sync_buffer (void **buffer, int x, int y, int width, int height) -{ - if ((width & 7) || (x < 0) || (y < 0) || (x+width > video_mode->xres) || (y+height > video_mode->yres)) { - return -1; - } else { - void *newbuf = *buffer; - - if ((newbuf == NULL) || (vl_current_width != width) || (vl_current_height != height)) { - newbuf = realloc(newbuf, width * height * video_bypp); - } - - if (newbuf == NULL) { - return -2; - } - - vl_current_width = width; - vl_current_height = height; - vl_current_stride = vl_current_width * video_bypp; - vl_current_bytes = vl_current_stride * height; - - vl_current_offset = video_scanlen * y + video_bypp * x; - vl_current_delta = video_scanlen - vl_current_stride; - - vl_current_draw_buffer = vl_current_read_buffer = *buffer = newbuf; - return 0; - } -} - - -/* Desc: state retrieval - * - * In : name, storage - * Out : -1 for an error - * - * Note: - - */ -int -vl_get (int pname, int *params) -{ - switch (pname) { - case VL_GET_SCREEN_SIZE: - params[0] = video_mode->xres; - params[1] = video_mode->yres; - break; - case VL_GET_VIDEO_MODES: { - int n; - vl_mode *q; - if ((q = v_init_hw()) == NULL) { - return -1; - } - /* count available visuals */ - for (n = 0; q->mode != 0xffff; q++) { - if ((q + 1)->mode == (q->mode | 0x4000)) { - /* same mode, but linear */ - q++; - } - if (params) { - params[n] = (int)q; - } - n++; - } - return n; - } - default: - return (drv != NULL) ? drv->get(pname, params) : -1; - } - return 0; -} - - -/* Desc: setup mode - * - * In : ptr to mode definition - * Out : 0 if success - * - * Note: - - */ -static int -vl_setup_mode (vl_mode *p) -{ - if (p == NULL) { - return -1; - } - -#define INITPTR(bpp) \ - vl_putpixel = v_putpixel##bpp; \ - vl_getrgba = v_getrgba##bpp; \ - vl_getpixel = v_getpixel##bpp; \ - vl_rect = v_rect##bpp; \ - vl_mixfix = vl_mixfix##bpp; \ - vl_mixrgb = vl_mixrgb##bpp; \ - vl_mixrgba = vl_mixrgba##bpp; \ - vl_clear = _can_mmx() ? v_clear##bpp##_mmx : v_clear##bpp - - switch (p->bpp) { - case 8: - INITPTR(8); - break; - case 15: - INITPTR(15); - break; - case 16: - INITPTR(16); - break; - case 24: - INITPTR(24); - break; - case 32: - INITPTR(32); - break; - default: - return -1; - } - -#undef INITPTR - - video_mode = p; - video_bypp = (p->bpp+7)/8; - video_scanlen = p->scanlen; - vl_video_selector = p->sel; - - return 0; -} - - -/* Desc: restore to the mode prior to first call to `vl_video_init'. - * - * In : - - * Out : - - * - * Note: - - */ -void -vl_video_exit (void) -{ - drv->restore(); - drv->fini(); - video_mode = NULL; -} - - -/* Desc: enter mode - * - * In : xres, yres, bits/pixel, RGB, refresh rate - * Out : pixel width in bits if success - * - * Note: - - */ -int -vl_video_init (int width, int height, int bpp, int rgb, int refresh) -{ - int fake; - vl_mode *p, *q; - unsigned int min; - - fake = 0; - if (!rgb) { - bpp = 8; - } else if (bpp == 8) { - fake = 1; - } -#if HUGE_LOOKUP - else if (bpp < 24) { - v_init_pixeltables(); - } -#endif - - /* initialize hardware */ - if ((q = v_init_hw()) == NULL) { - return 0; - } - - /* search for a mode that fits our request */ - for (min = -1, p = NULL; q->mode != 0xffff; q++) { - if ((q->xres >= width) && (q->yres >= height) && (q->bpp == bpp)) { - if (min >= (unsigned)(q->xres * q->yres)) { - min = q->xres * q->yres; - p = q; - } - } - } - - /* setup and enter mode */ - if ((vl_setup_mode(p) == 0) && (drv->entermode(p, refresh) == 0)) { - vl_flip = drv->blit; - if (fake) { - drv->get(VL_GET_CI_PREC, (int *)(&min)); - fake_buildpalette(min); - if (min == 8) { - vl_getrgba = v_getrgba8fake8; - } - } - return bpp; - } - - /* abort */ - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/video.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/video.h deleted file mode 100644 index e928f19c37..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/video.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * DOS/DJGPP device driver v1.5 for Mesa - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@users.sourceforge.net - * Web : http://www.geocities.com/dborca - */ - - -#ifndef VIDEO_H_included -#define VIDEO_H_included - -typedef int fixed; - -#define VL_GET_CARD_NAME 0x0100 -#define VL_GET_VRAM 0x0101 -#define VL_GET_CI_PREC 0x0200 -#define VL_GET_HPIXELS 0x0201 -#define VL_GET_SCREEN_SIZE 0x0202 -#define VL_GET_VIDEO_MODES 0x0300 - -extern int (*vl_mixfix) (fixed r, fixed g, fixed b); -extern int (*vl_mixrgb) (const unsigned char rgb[]); -extern int (*vl_mixrgba) (const unsigned char rgba[]); -extern void (*vl_getrgba) (unsigned int offset, unsigned char rgba[4]); - -extern void (*vl_clear) (int color); -extern void (*vl_rect) (int x, int y, int width, int height, int color); -extern void (*vl_flip) (void); -extern void (*vl_putpixel) (unsigned int offset, int color); -extern int (*vl_getpixel) (unsigned int offset); - -void vl_setCI (int index, float red, float green, float blue); - -int vl_sync_buffer (void **buffer, int x, int y, int width, int height); -int vl_get (int pname, int *params); - -void vl_video_exit (void); -int vl_video_init (int width, int height, int bpp, int rgb, int refresh); - -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/virtual.S b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/virtual.S deleted file mode 100644 index c5cc1fe86f..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dos/virtual.S +++ /dev/null @@ -1,489 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * DOS/DJGPP device driver v1.3 for Mesa - * - * Copyright (C) 2002 - Borca Daniel - * Email : dborca@yahoo.com - * Web : http://www.geocities.com/dborca - */ - - - .file "virtual.S" - -/* - * extern void *vl_current_draw_buffer; - * extern int vl_current_width, vl_current_bytes; - */ - - .text - -/* Desc: void v_clear8 (int color); - * - * In : color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_clear8 -_v_clear8: - movl 4(%esp), %eax - movb %al, %ah - pushw %ax - pushw %ax - popl %eax - jmp _v_clear_common - -/* Desc: void v_clear16 (int color); - * - * In : color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_clear16 -_v_clear16: - movl 4(%esp), %eax - pushw %ax - pushw %ax - popl %eax - jmp _v_clear_common - -/* Desc: void v_clear32 (int color); - * - * In : color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_clear32 -_v_clear32: - movl 4(%esp), %eax - .balign 4 -_v_clear_common: - movl _vl_current_bytes, %ecx - movl _vl_current_draw_buffer, %edx - shrl $2, %ecx - .balign 4 - 0: - movl %eax, (%edx) - addl $4, %edx - decl %ecx - jnz 0b - ret - -/* Desc: void v_clear8_mmx (int color); - * - * In : color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_clear8_mmx -_v_clear8_mmx: -#ifdef USE_MMX_ASM - movd 4(%esp), %mm0 - punpcklbw %mm0, %mm0 - punpcklwd %mm0, %mm0 - jmp _v_clear_common_mmx -#endif - -/* Desc: void v_clear16_mmx (int color); - * - * In : color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_clear16_mmx -_v_clear16_mmx: -#ifdef USE_MMX_ASM - movd 4(%esp), %mm0 - punpcklwd %mm0, %mm0 - jmp _v_clear_common_mmx -#endif - -/* Desc: void v_clear32_mmx (int color); - * - * In : color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_clear32_mmx -_v_clear32_mmx: -#ifdef USE_MMX_ASM - movd 4(%esp), %mm0 - .balign 4 -_v_clear_common_mmx: - punpckldq %mm0, %mm0 - movl _vl_current_bytes, %ecx - movl _vl_current_draw_buffer, %edx - shrl $3, %ecx - .balign 4 - 0: - movq %mm0, (%edx) - addl $8, %edx - decl %ecx - jnz 0b - emms -#endif - ret - -/* Desc: void v_clear24 (int color); - * - * In : color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_clear24 -_v_clear24: - movl $0xaaaaaaab, %eax - mull _vl_current_bytes - movl 4(%esp), %eax - movl %edx, %ecx - pushl %ebx - movl _vl_current_draw_buffer, %edx - shrl %ecx - movb 10(%esp), %bl - .balign 4 - 0: - movw %ax, (%edx) - movb %bl, 2(%edx) - addl $3, %edx - decl %ecx - jnz 0b - popl %ebx - ret - -/* Desc: void v_clear24_mmx (int color); - * - * In : color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_clear24_mmx -_v_clear24_mmx: -#ifdef USE_MMX_ASM - movl 4(%esp), %eax - movl %eax, %edx - movl %eax, %ecx - shll $16, %edx - rorl $8, %ecx - movw %cx, %dx - rorl $16, %ecx - movb %dh, %cl - shll $8, %eax - movb %ch, %al - rorl $8, %eax - - pushl %edx - pushl %eax - movq (%esp), %mm0 - pushl %ecx - movq (%esp), %mm1 - pushl %edx - movq (%esp), %mm2 - - movl $0xaaaaaaab, %eax - mull _vl_current_bytes - movl %edx, %ecx - movl _vl_current_draw_buffer, %edx - shrl $4, %ecx - .balign 4 - 0: - movq %mm0, (%edx) - movq %mm1, 8(%edx) - movq %mm2, 16(%edx) - addl $24, %edx - decl %ecx - jnz 0b - emms - addl $16, %esp -#endif - ret - -/* Desc: void v_rect8 (int color); - * - * In : color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_rect8 -_v_rect8: - cld - pushl %esi - pushl %edi - movl 28(%esp), %eax - movl _vl_current_width, %esi - movl 16(%esp), %edi - movb %al, %ah - movl 20(%esp), %ecx - imull %esi, %edi - movl 24(%esp), %edx - subl %ecx, %esi - addl 12(%esp), %edi - pushw %ax - pushw %ax - pushl %ds - popl %es - addl _vl_current_draw_buffer, %edi - popl %eax - pushl %ebx - movl %ecx, %ebx - andl $3, %ebx - .balign 4 - 0: - pushl %ecx - .balign 4 - 1: - shrl $2, %ecx - rep; stosl - testl %ebx, %ebx - jz 2f - movl %ebx, %ecx - rep; stosb - .balign 4 - 2: - popl %ecx - addl %esi, %edi - decl %edx - jnz 0b - popl %ebx - popl %edi - popl %esi - ret - -/* Desc: void v_rect16 (int color); - * - * In : color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_rect16 -_v_rect16: - cld - pushl %esi - pushl %edi - movl 28(%esp), %eax - movl _vl_current_width, %esi - movl 16(%esp), %edi - movl 20(%esp), %ecx - imull %esi, %edi - movl 24(%esp), %edx - subl %ecx, %esi - addl 12(%esp), %edi - pushw %ax - shll %esi - pushw %ax - shll %edi - pushl %ds - popl %es - addl _vl_current_draw_buffer, %edi - popl %eax - .balign 4 - 0: - pushl %ecx - .balign 4 - 1: - shrl %ecx - rep; stosl - jnc 2f - stosw - .balign 4 - 2: - popl %ecx - addl %esi, %edi - decl %edx - jnz 0b - popl %edi - popl %esi - ret - -/* Desc: void v_rect24 (int color); - * - * In : color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_rect24 -_v_rect24: - pushl %esi - pushl %edi - movl 28(%esp), %eax - movl _vl_current_width, %esi - movl 16(%esp), %edi - movl 20(%esp), %ecx - imull %esi, %edi - movl 24(%esp), %edx - subl %ecx, %esi - addl 12(%esp), %edi - leal (%esi, %esi, 2), %esi - pushl %ebx - leal (%edi, %edi, 2), %edi - movl %eax, %ebx - addl _vl_current_draw_buffer, %edi - shrl $16, %ebx - .balign 4 - 0: - pushl %ecx - .balign 4 - 1: - movw %ax, (%edi) - movb %bl, 2(%edi) - addl $3, %edi - decl %ecx - jnz 1b - popl %ecx - addl %esi, %edi - decl %edx - jnz 0b - popl %ebx - popl %edi - popl %esi - ret - -/* Desc: void v_rect32 (int color); - * - * In : color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_rect32 -_v_rect32: - pushl %esi - pushl %edi - movl _vl_current_width, %esi - movl 16(%esp), %edi - movl 20(%esp), %ecx - imull %esi, %edi - movl 24(%esp), %edx - subl %ecx, %esi - addl 12(%esp), %edi - shll $2, %esi - shll $2, %edi - movl 28(%esp), %eax - addl _vl_current_draw_buffer, %edi - .balign 4 - 0: - pushl %ecx - .balign 4 - 1: - movl %eax, (%edi) - addl $4, %edi - decl %ecx - jnz 1b - popl %ecx - addl %esi, %edi - decl %edx - jnz 0b - popl %edi - popl %esi - ret - -/* Desc: void v_putpixel8 (unsigned int offset, int color); - * - * In : offset within buffer, color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_putpixel8 -_v_putpixel8: - movl 8(%esp), %ecx - movl 4(%esp), %edx - movl _vl_current_draw_buffer, %eax - movb %cl, (%eax,%edx) - ret - -/* Desc: void v_putpixel16 (unsigned int offset, int color); - * - * In : offset within buffer, color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_putpixel16 -_v_putpixel16: - movl 8(%esp), %ecx - movl 4(%esp), %edx - movl _vl_current_draw_buffer, %eax - movw %cx, (%eax,%edx,2) - ret - -/* Desc: void v_putpixel24 (unsigned int offset, int color); - * - * In : offset within buffer, color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_putpixel24 -_v_putpixel24: - movl 4(%esp), %eax - movl 8(%esp), %edx - movl _vl_current_draw_buffer, %ecx - leal (%eax,%eax,2), %eax - movw %dx, (%ecx,%eax) - shrl $16, %edx - movb %dl, 2(%ecx,%eax) - ret - -/* Desc: void v_putpixel32 (unsigned int offset, int color); - * - * In : offset within buffer, color - * Out : - - * - * Note: uses current draw buffer - */ - .p2align 5,,31 - .global _v_putpixel32 -_v_putpixel32: - movl 8(%esp), %ecx - movl 4(%esp), %edx - movl _vl_current_draw_buffer, %eax - movl %ecx, (%eax,%edx,4) - ret diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/Makefile b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/Makefile deleted file mode 100644 index 8db675431d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# src/mesa/drivers/dri/Makefile - -TOP = ../../../.. - -include $(TOP)/configs/current - - - -default: $(LIB_DIR) subdirs - - -$(LIB_DIR): - -mkdir $(LIB_DIR) - - -subdirs: - echo $(DRI_DIRS) - @for dir in $(DRI_DIRS) ; do \ - echo $$dir ; \ - (cd $$dir ; $(MAKE)) || exit 1; \ - done - - -install: - @for dir in $(DRI_DIRS) ; do \ - (cd $$dir ; $(MAKE) install) || exit 1; \ - done - - -clean: - @for dir in $(DRI_DIRS) ; do \ - (cd $$dir ; $(MAKE) clean) ; \ - done - -rm -f common/*.o diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/Makefile.template b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/Makefile.template deleted file mode 100644 index c8fef8aac9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/Makefile.template +++ /dev/null @@ -1,109 +0,0 @@ -# -*-makefile-*- - -MESA_MODULES = $(TOP)/src/mesa/mesa.a - -COMMON_SOURCES = \ - ../../common/driverfuncs.c \ - ../common/utils.c \ - ../common/texmem.c \ - ../common/vblank.c \ - ../common/dri_util.c \ - ../common/xmlconfig.c \ - ../common/drirenderbuffer.c - -ifeq ($(WINDOW_SYSTEM),dri) -WINOBJ= -WINLIB= -INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES) \ - `pkg-config --cflags libdrm` - -OBJECTS = $(C_SOURCES:.c=.o) \ - $(ASM_SOURCES:.S=.o) - -else -WINOBJ= -WINLIB=-L$(MESA)/src/glx/mini -MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini -INCLUDES = $(MINIGLX_INCLUDES) \ - -I$(DRM_SOURCE_PATH)/shared-core \ - -I$(DRM_SOURCE_PATH)/libdrm \ - $(SHARED_INCLUDES) - -OBJECTS = $(C_SOURCES:.c=.o) \ - $(MINIGLX_SOURCES:.c=.o) \ - $(ASM_SOURCES:.S=.o) -endif - - -### Include directories -SHARED_INCLUDES = \ - -I. \ - -I$(TOP)/src/mesa/drivers/dri/common \ - -Iserver \ - -I$(DRM_SOURCE_PATH)/shared-core \ - -I$(TOP)/include \ - -I$(TOP)/include/GL/internal \ - -I$(TOP)/src/mesa \ - -I$(TOP)/src/mesa/main \ - -I$(TOP)/src/mesa/glapi \ - -I$(TOP)/src/mesa/math \ - -I$(TOP)/src/mesa/transform \ - -I$(TOP)/src/mesa/shader \ - -I$(TOP)/src/mesa/swrast \ - -I$(TOP)/src/mesa/swrast_setup \ - -I$(TOP)/src/egl/main \ - -I$(TOP)/src/egl/drivers/dri - -##### RULES ##### - -.c.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ - -.S.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ - - -##### TARGETS ##### - -default: depend symlinks $(LIBNAME) $(LIB_DIR)/$(LIBNAME) - - -#$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile -# @echo BUILDING FOR: $(WINDOW_SYSTEM) -# $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \ -# $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS) - -# XXX we should use the mklib script here -$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template - rm -f $@ - $(CC) $(ARCH_FLAGS) -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS) - - -$(LIB_DIR)/$(LIBNAME): $(LIBNAME) - install $(LIBNAME) $(LIB_DIR) - - - -# Run 'make depend' to update the dependencies if you change -# what's included by any source file. -.PHONY: depend -depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS) - touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES) \ - > /dev/null - - -# Emacs tags -tags: - etags `find . -name \*.[ch]` `find ../include` - - -# Remove .o and backup files -clean: - -rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS) - -rm -f depend depend.bak - -install: $(LIBNAME) - install $(LIBNAME) /usr/X11R6/lib/modules/dri/$(LIBNAME) - -include depend diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/depthtmp.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/depthtmp.h deleted file mode 100644 index 1875d157b4..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/depthtmp.h +++ /dev/null @@ -1,253 +0,0 @@ - -/* - * Notes: - * 1. These functions plug into the gl_renderbuffer structure. - * 2. The 'values' parameter always points to GLuint values, regardless of - * the actual Z buffer depth. - */ - - -#include "spantmp_common.h" - -#ifndef DBG -#define DBG 0 -#endif - -#ifndef HAVE_HW_DEPTH_SPANS -#define HAVE_HW_DEPTH_SPANS 0 -#endif - -#ifndef HAVE_HW_DEPTH_PIXELS -#define HAVE_HW_DEPTH_PIXELS 0 -#endif - -static void TAG(WriteDepthSpan)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const void *values, - const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLuint *depth = (const GLuint *) values; - GLint x1; - GLint n1; - LOCAL_DEPTH_VARS; - - y = Y_FLIP( y ); - -#if HAVE_HW_DEPTH_SPANS - (void) x1; (void) n1; - - if ( DBG ) fprintf( stderr, "WriteDepthSpan 0..%d (x1 %d)\n", - (int)n, (int)x ); - - WRITE_DEPTH_SPAN(); -#else - HW_CLIPLOOP() - { - GLint i = 0; - CLIPSPAN( x, y, n, x1, n1, i ); - - if ( DBG ) fprintf( stderr, "WriteDepthSpan %d..%d (x1 %d) (mask %p)\n", - (int)i, (int)n1, (int)x1, mask ); - - if ( mask ) { - for ( ; n1>0 ; i++, x1++, n1-- ) { - if ( mask[i] ) WRITE_DEPTH( x1, y, depth[i] ); - } - } else { - for ( ; n1>0 ; i++, x1++, n1-- ) { - WRITE_DEPTH( x1, y, depth[i] ); - } - } - } - HW_ENDCLIPLOOP(); -#endif - } - HW_WRITE_UNLOCK(); -} - - -#if HAVE_HW_DEPTH_SPANS -/* implement MonoWriteDepthSpan() in terms of WriteDepthSpan() */ -static void -TAG(WriteMonoDepthSpan)( GLcontext *ctx, struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const void *value, const GLubyte mask[] ) -{ - const GLuint depthVal = *((GLuint *) value); - GLuint depths[MAX_WIDTH]; - GLuint i; - for (i = 0; i < n; i++) - depths[i] = depthVal; - TAG(WriteDepthSpan)(ctx, rb, n, x, y, depths, mask); -} -#else -static void TAG(WriteMonoDepthSpan)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const void *value, - const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLuint depth = *((GLuint *) value); - GLint x1; - GLint n1; - LOCAL_DEPTH_VARS; - - y = Y_FLIP( y ); - - HW_CLIPLOOP() - { - GLint i = 0; - CLIPSPAN( x, y, n, x1, n1, i ); - - if ( DBG ) fprintf( stderr, "%s %d..%d (x1 %d) = %u\n", - __FUNCTION__, (int)i, (int)n1, (int)x1, (GLuint)depth ); - - if ( mask ) { - for ( ; n1>0 ; i++, x1++, n1-- ) { - if ( mask[i] ) WRITE_DEPTH( x1, y, depth ); - } - } else { - for ( ; n1>0 ; x1++, n1-- ) { - WRITE_DEPTH( x1, y, depth ); - } - } - } - HW_ENDCLIPLOOP(); - } - HW_WRITE_UNLOCK(); -} -#endif - - -static void TAG(WriteDepthPixels)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, - const GLint x[], - const GLint y[], - const void *values, - const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLuint *depth = (const GLuint *) values; - GLuint i; - LOCAL_DEPTH_VARS; - - if ( DBG ) fprintf( stderr, "WriteDepthPixels\n" ); - -#if HAVE_HW_DEPTH_PIXELS - (void) i; - - WRITE_DEPTH_PIXELS(); -#else - HW_CLIPLOOP() - { - if ( mask ) { - for ( i = 0 ; i < n ; i++ ) { - if ( mask[i] ) { - const int fy = Y_FLIP( y[i] ); - if ( CLIPPIXEL( x[i], fy ) ) - WRITE_DEPTH( x[i], fy, depth[i] ); - } - } - } - else { - for ( i = 0 ; i < n ; i++ ) { - const int fy = Y_FLIP( y[i] ); - if ( CLIPPIXEL( x[i], fy ) ) - WRITE_DEPTH( x[i], fy, depth[i] ); - } - } - } - HW_ENDCLIPLOOP(); -#endif - } - HW_WRITE_UNLOCK(); -} - - -/* Read depth spans and pixels - */ -static void TAG(ReadDepthSpan)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - void *values ) -{ - HW_READ_LOCK() - { - GLuint *depth = (GLuint *) values; - GLint x1, n1; - LOCAL_DEPTH_VARS; - - y = Y_FLIP( y ); - - if ( DBG ) fprintf( stderr, "ReadDepthSpan\n" ); - -#if HAVE_HW_DEPTH_SPANS - (void) x1; (void) n1; - - READ_DEPTH_SPAN(); -#else - HW_CLIPLOOP() - { - GLint i = 0; - CLIPSPAN( x, y, n, x1, n1, i ); - for ( ; n1>0 ; i++, n1-- ) { - READ_DEPTH( depth[i], x+i, y ); - } - } - HW_ENDCLIPLOOP(); -#endif - } - HW_READ_UNLOCK(); -} - -static void TAG(ReadDepthPixels)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, - const GLint x[], const GLint y[], - void *values ) -{ - HW_READ_LOCK() - { - GLuint *depth = (GLuint *) values; - GLuint i; - LOCAL_DEPTH_VARS; - - if ( DBG ) fprintf( stderr, "ReadDepthPixels\n" ); - -#if HAVE_HW_DEPTH_PIXELS - (void) i; - - READ_DEPTH_PIXELS(); -#else - HW_CLIPLOOP() - { - for ( i = 0 ; i < n ;i++ ) { - int fy = Y_FLIP( y[i] ); - if ( CLIPPIXEL( x[i], fy ) ) - READ_DEPTH( depth[i], x[i], fy ); - } - } - HW_ENDCLIPLOOP(); -#endif - } - HW_READ_UNLOCK(); -} - - -#if HAVE_HW_DEPTH_SPANS -#undef WRITE_DEPTH_SPAN -#undef WRITE_DEPTH_PIXELS -#undef READ_DEPTH_SPAN -#undef READ_DEPTH_PIXELS -#else -#undef WRITE_DEPTH -#undef READ_DEPTH -#endif -#undef TAG diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/dri_util.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/dri_util.c deleted file mode 100644 index 3edeb03f99..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/dri_util.c +++ /dev/null @@ -1,1073 +0,0 @@ -/* $XFree86: xc/lib/GL/dri/dri_util.c,v 1.7 2003/04/28 17:01:25 dawes Exp $ */ -/** - * \file dri_util.c - * DRI utility functions. - * - * This module acts as glue between GLX and the actual hardware driver. A DRI - * driver doesn't really \e have to use any of this - it's optional. But, some - * useful stuff is done here that otherwise would have to be duplicated in most - * drivers. - * - * Basically, these utility functions take care of some of the dirty details of - * screen initialization, context creation, context binding, DRM setup, etc. - * - * These functions are compiled into each DRI driver so libGL.so knows nothing - * about them. - */ - - -#include -#include -#include -#include -#include - -#ifndef MAP_FAILED -#define MAP_FAILED ((void *)-1) -#endif - -#include "imports.h" -#define None 0 - -#include "dri_util.h" -#include "drm_sarea.h" - -#ifndef GLX_OML_sync_control -typedef GLboolean ( * PFNGLXGETMSCRATEOMLPROC) (__DRInativeDisplay *dpy, __DRIid drawable, int32_t *numerator, int32_t *denominator); -#endif - -/* This pointer *must* be set by the driver's __driCreateNewScreen funciton! - */ -const __DRIinterfaceMethods * dri_interface = NULL; - -/** - * This is used in a couple of places that call \c driCreateNewDrawable. - */ -static const int empty_attribute_list[1] = { None }; - - -/** - * Cached copy of the internal API version used by libGL and the client-side - * DRI driver. - */ -static int api_ver = 0; - -/* forward declarations */ -static int driQueryFrameTracking( __DRInativeDisplay * dpy, void * priv, - int64_t * sbc, int64_t * missedFrames, float * lastMissedUsage, - float * usage ); - -static void *driCreateNewDrawable(__DRInativeDisplay *dpy, const __GLcontextModes *modes, - __DRIid draw, __DRIdrawable *pdraw, int renderType, const int *attrs); - -static void driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate); - - -/** - * Print message to \c stderr if the \c LIBGL_DEBUG environment variable - * is set. - * - * Is called from the drivers. - * - * \param f \c printf like format string. - */ -void -__driUtilMessage(const char *f, ...) -{ - va_list args; - - if (getenv("LIBGL_DEBUG")) { - fprintf(stderr, "libGL error: \n"); - va_start(args, f); - vfprintf(stderr, f, args); - va_end(args); - fprintf(stderr, "\n"); - } -} - - -/*****************************************************************/ -/** \name Drawable list management */ -/*****************************************************************/ -/*@{*/ - -static GLboolean __driAddDrawable(void *drawHash, __DRIdrawable *pdraw) -{ - __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private; - - if (drmHashInsert(drawHash, pdp->draw, pdraw)) - return GL_FALSE; - - return GL_TRUE; -} - -static __DRIdrawable *__driFindDrawable(void *drawHash, __DRIid draw) -{ - int retcode; - __DRIdrawable *pdraw; - - retcode = drmHashLookup(drawHash, draw, (void *)&pdraw); - if (retcode) - return NULL; - - return pdraw; -} - - -/** - * Find drawables in the local hash that have been destroyed on the - * server. - * - * \param drawHash Hash-table containing all know drawables. - */ -static void __driGarbageCollectDrawables(void *drawHash) -{ - __DRIid draw; - __DRInativeDisplay *dpy; - __DRIdrawable *pdraw; - - if (drmHashFirst(drawHash, &draw, (void *)&pdraw) == 1) { - do { - __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private; - dpy = pdp->driScreenPriv->display; - if (! (*dri_interface->windowExists)(dpy, draw)) { - /* Destroy the local drawable data, if the drawable no - longer exists in the Xserver */ - (*pdraw->destroyDrawable)(dpy, pdraw->private); - _mesa_free(pdraw); - } - } while (drmHashNext(drawHash, &draw, (void *)&pdraw) == 1); - } -} - -/*@}*/ - - -/*****************************************************************/ -/** \name Context (un)binding functions */ -/*****************************************************************/ -/*@{*/ - -/** - * Unbind context. - * - * \param dpy the display handle. - * \param scrn the screen number. - * \param draw drawable. - * \param read Current reading drawable. - * \param gc context. - * - * \return \c GL_TRUE on success, or \c GL_FALSE on failure. - * - * \internal - * This function calls __DriverAPIRec::UnbindContext, and then decrements - * __DRIdrawablePrivateRec::refcount which must be non-zero for a successful - * return. - * - * While casting the opaque private pointers associated with the parameters - * into their respective real types it also assures they are not \c NULL. - */ -static GLboolean driUnbindContext(__DRInativeDisplay *dpy, int scrn, - __DRIid draw, __DRIid read, - __DRIcontext *ctx) -{ - __DRIscreen *pDRIScreen; - __DRIdrawable *pdraw; - __DRIdrawable *pread; - __DRIcontextPrivate *pcp; - __DRIscreenPrivate *psp; - __DRIdrawablePrivate *pdp; - __DRIdrawablePrivate *prp; - - /* - ** Assume error checking is done properly in glXMakeCurrent before - ** calling driUnbindContext. - */ - - if (ctx == NULL || draw == None || read == None) { - /* ERROR!!! */ - return GL_FALSE; - } - - pDRIScreen = (*dri_interface->getScreen)(dpy, scrn); - if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { - /* ERROR!!! */ - return GL_FALSE; - } - - psp = (__DRIscreenPrivate *)pDRIScreen->private; - pcp = (__DRIcontextPrivate *)ctx->private; - - pdraw = __driFindDrawable(psp->drawHash, draw); - if (!pdraw) { - /* ERROR!!! */ - return GL_FALSE; - } - pdp = (__DRIdrawablePrivate *)pdraw->private; - - pread = __driFindDrawable(psp->drawHash, read); - if (!pread) { - /* ERROR!!! */ - return GL_FALSE; - } - prp = (__DRIdrawablePrivate *)pread->private; - - - /* Let driver unbind drawable from context */ - (*psp->DriverAPI.UnbindContext)(pcp); - - - if (pdp->refcount == 0) { - /* ERROR!!! */ - return GL_FALSE; - } - - pdp->refcount--; - - if (prp != pdp) { - if (prp->refcount == 0) { - /* ERROR!!! */ - return GL_FALSE; - } - - prp->refcount--; - } - - - /* XXX this is disabled so that if we call SwapBuffers on an unbound - * window we can determine the last context bound to the window and - * use that context's lock. (BrianP, 2-Dec-2000) - */ -#if 0 - /* Unbind the drawable */ - pcp->driDrawablePriv = NULL; - pdp->driContextPriv = &psp->dummyContextPriv; -#endif - - return GL_TRUE; -} - - -/** - * This function takes both a read buffer and a draw buffer. This is needed - * for \c glXMakeCurrentReadSGI or GLX 1.3's \c glXMakeContextCurrent - * function. - * - * \bug This function calls \c driCreateNewDrawable in two places with the - * \c renderType hard-coded to \c GLX_WINDOW_BIT. Some checking might - * be needed in those places when support for pbuffers and / or pixmaps - * is added. Is it safe to assume that the drawable is a window? - */ -static GLboolean DoBindContext(__DRInativeDisplay *dpy, - __DRIid draw, __DRIid read, - __DRIcontext *ctx, const __GLcontextModes * modes, - __DRIscreenPrivate *psp) -{ - __DRIdrawable *pdraw; - __DRIdrawablePrivate *pdp; - __DRIdrawable *pread; - __DRIdrawablePrivate *prp; - __DRIcontextPrivate * const pcp = ctx->private; - - - /* Find the _DRIdrawable which corresponds to the writing drawable. */ - pdraw = __driFindDrawable(psp->drawHash, draw); - if (!pdraw) { - /* Allocate a new drawable */ - pdraw = (__DRIdrawable *)_mesa_malloc(sizeof(__DRIdrawable)); - if (!pdraw) { - /* ERROR!!! */ - return GL_FALSE; - } - - /* Create a new drawable */ - driCreateNewDrawable(dpy, modes, draw, pdraw, GLX_WINDOW_BIT, - empty_attribute_list); - if (!pdraw->private) { - /* ERROR!!! */ - _mesa_free(pdraw); - return GL_FALSE; - } - - } - pdp = (__DRIdrawablePrivate *) pdraw->private; - - /* Find the _DRIdrawable which corresponds to the reading drawable. */ - if (read == draw) { - /* read buffer == draw buffer */ - prp = pdp; - } - else { - pread = __driFindDrawable(psp->drawHash, read); - if (!pread) { - /* Allocate a new drawable */ - pread = (__DRIdrawable *)_mesa_malloc(sizeof(__DRIdrawable)); - if (!pread) { - /* ERROR!!! */ - return GL_FALSE; - } - - /* Create a new drawable */ - driCreateNewDrawable(dpy, modes, read, pread, GLX_WINDOW_BIT, - empty_attribute_list); - if (!pread->private) { - /* ERROR!!! */ - _mesa_free(pread); - return GL_FALSE; - } - } - prp = (__DRIdrawablePrivate *) pread->private; - } - - /* Bind the drawable to the context */ - pcp->driDrawablePriv = pdp; - pdp->driContextPriv = pcp; - pdp->refcount++; - if ( pdp != prp ) { - prp->refcount++; - } - - /* - ** Now that we have a context associated with this drawable, we can - ** initialize the drawable information if has not been done before. - */ - if (!pdp->pStamp || *pdp->pStamp != pdp->lastStamp) { - DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); - __driUtilUpdateDrawableInfo(pdp); - DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); - } - - /* Call device-specific MakeCurrent */ - (*psp->DriverAPI.MakeCurrent)(pcp, pdp, prp); - - return GL_TRUE; -} - - -/** - * This function takes both a read buffer and a draw buffer. This is needed - * for \c glXMakeCurrentReadSGI or GLX 1.3's \c glXMakeContextCurrent - * function. - */ -static GLboolean driBindContext(__DRInativeDisplay *dpy, int scrn, - __DRIid draw, __DRIid read, - __DRIcontext * ctx) -{ - __DRIscreen *pDRIScreen; - - /* - ** Assume error checking is done properly in glXMakeCurrent before - ** calling driBindContext. - */ - - if (ctx == NULL || draw == None || read == None) { - /* ERROR!!! */ - return GL_FALSE; - } - - pDRIScreen = (*dri_interface->getScreen)(dpy, scrn); - if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { - /* ERROR!!! */ - return GL_FALSE; - } - - return DoBindContext( dpy, draw, read, ctx, ctx->mode, - (__DRIscreenPrivate *)pDRIScreen->private ); -} -/*@}*/ - - -/*****************************************************************/ -/** \name Drawable handling functions */ -/*****************************************************************/ -/*@{*/ - -/** - * Update private drawable information. - * - * \param pdp pointer to the private drawable information to update. - * - * This function basically updates the __DRIdrawablePrivate struct's - * cliprect information by calling \c __DRIinterfaceMethods::getDrawableInfo. - * This is usually called by the DRI_VALIDATE_DRAWABLE_INFO macro which - * compares the __DRIdrwablePrivate pStamp and lastStamp values. If - * the values are different that means we have to update the clipping - * info. - */ -void -__driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp) -{ - __DRIscreenPrivate *psp; - __DRIcontextPrivate *pcp = pdp->driContextPriv; - - if (!pcp || (pdp != pcp->driDrawablePriv)) { - /* ERROR!!! */ - return; - } - - psp = pdp->driScreenPriv; - if (!psp) { - /* ERROR!!! */ - return; - } - - if (pdp->pClipRects) { - _mesa_free(pdp->pClipRects); - } - - if (pdp->pBackClipRects) { - _mesa_free(pdp->pBackClipRects); - } - - DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); - - if (!__driFindDrawable(psp->drawHash, pdp->draw) || - ! (*dri_interface->getDrawableInfo)(pdp->display, pdp->screen, pdp->draw, - &pdp->index, &pdp->lastStamp, - &pdp->x, &pdp->y, &pdp->w, &pdp->h, - &pdp->numClipRects, &pdp->pClipRects, - &pdp->backX, - &pdp->backY, - &pdp->numBackClipRects, - &pdp->pBackClipRects )) { - /* Error -- eg the window may have been destroyed. Keep going - * with no cliprects. - */ - pdp->pStamp = &pdp->lastStamp; /* prevent endless loop */ - pdp->numClipRects = 0; - pdp->pClipRects = NULL; - pdp->numBackClipRects = 0; - pdp->pBackClipRects = NULL; - } - else - pdp->pStamp = &(psp->pSAREA->drawableTable[pdp->index].stamp); - - DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); - -} - -/*@}*/ - -/*****************************************************************/ -/** \name GLX callbacks */ -/*****************************************************************/ -/*@{*/ - -/** - * Swap buffers. - * - * \param dpy the display handle. - * \param drawablePrivate opaque pointer to the per-drawable private info. - * - * \internal - * This function calls __DRIdrawablePrivate::swapBuffers. - * - * Is called directly from glXSwapBuffers(). - */ -static void driSwapBuffers( __DRInativeDisplay *dpy, void *drawablePrivate ) -{ - __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate; - dPriv->swapBuffers(dPriv); - (void) dpy; -} - -/** - * Called directly from a number of higher-level GLX functions. - */ -static int driGetMSC( void *screenPrivate, int64_t *msc ) -{ - __DRIscreenPrivate *sPriv = (__DRIscreenPrivate *) screenPrivate; - - return sPriv->DriverAPI.GetMSC( sPriv, msc ); -} - -/** - * Called directly from a number of higher-level GLX functions. - */ -static int driGetSBC( __DRInativeDisplay *dpy, void *drawablePrivate, int64_t *sbc ) -{ - __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate; - __DRIswapInfo sInfo; - int status; - - - status = dPriv->driScreenPriv->DriverAPI.GetSwapInfo( dPriv, & sInfo ); - *sbc = sInfo.swap_count; - - return status; -} - -static int driWaitForSBC( __DRInativeDisplay * dpy, void *drawablePriv, - int64_t target_sbc, - int64_t * msc, int64_t * sbc ) -{ - __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePriv; - - return dPriv->driScreenPriv->DriverAPI.WaitForSBC( dPriv, target_sbc, - msc, sbc ); -} - -static int driWaitForMSC( __DRInativeDisplay * dpy, void *drawablePriv, - int64_t target_msc, - int64_t divisor, int64_t remainder, - int64_t * msc, int64_t * sbc ) -{ - __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePriv; - __DRIswapInfo sInfo; - int status; - - - status = dPriv->driScreenPriv->DriverAPI.WaitForMSC( dPriv, target_msc, - divisor, remainder, - msc ); - - /* GetSwapInfo() may not be provided by the driver if GLX_SGI_video_sync - * is supported but GLX_OML_sync_control is not. Therefore, don't return - * an error value if GetSwapInfo() is not implemented. - */ - if ( status == 0 - && dPriv->driScreenPriv->DriverAPI.GetSwapInfo ) { - status = dPriv->driScreenPriv->DriverAPI.GetSwapInfo( dPriv, & sInfo ); - *sbc = sInfo.swap_count; - } - - return status; -} - -static int64_t driSwapBuffersMSC( __DRInativeDisplay * dpy, void *drawablePriv, - int64_t target_msc, - int64_t divisor, int64_t remainder ) -{ - __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePriv; - - return dPriv->driScreenPriv->DriverAPI.SwapBuffersMSC( dPriv, target_msc, - divisor, - remainder ); -} - - -/** - * This is called via __DRIscreenRec's createNewDrawable pointer. - */ -static void *driCreateNewDrawable(__DRInativeDisplay *dpy, - const __GLcontextModes *modes, - __DRIid draw, - __DRIdrawable *pdraw, - int renderType, - const int *attrs) -{ - __DRIscreen * const pDRIScreen = (*dri_interface->getScreen)(dpy, modes->screen); - __DRIscreenPrivate *psp; - __DRIdrawablePrivate *pdp; - - - pdraw->private = NULL; - - /* Since pbuffers are not yet supported, no drawable attributes are - * supported either. - */ - (void) attrs; - - if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { - return NULL; - } - - pdp = (__DRIdrawablePrivate *)_mesa_malloc(sizeof(__DRIdrawablePrivate)); - if (!pdp) { - return NULL; - } - - if (!(*dri_interface->createDrawable)(dpy, modes->screen, draw, &pdp->hHWDrawable)) { - _mesa_free(pdp); - return NULL; - } - - pdp->draw = draw; - pdp->pdraw = pdraw; - pdp->refcount = 0; - pdp->pStamp = NULL; - pdp->lastStamp = 0; - pdp->index = 0; - pdp->x = 0; - pdp->y = 0; - pdp->w = 0; - pdp->h = 0; - pdp->numClipRects = 0; - pdp->numBackClipRects = 0; - pdp->pClipRects = NULL; - pdp->pBackClipRects = NULL; - pdp->display = dpy; - pdp->screen = modes->screen; - - psp = (__DRIscreenPrivate *)pDRIScreen->private; - pdp->driScreenPriv = psp; - pdp->driContextPriv = &psp->dummyContextPriv; - - if (!(*psp->DriverAPI.CreateBuffer)(psp, pdp, modes, - renderType == GLX_PIXMAP_BIT)) { - (void)(*dri_interface->destroyDrawable)(dpy, modes->screen, pdp->draw); - _mesa_free(pdp); - return NULL; - } - - pdraw->private = pdp; - pdraw->destroyDrawable = driDestroyDrawable; - pdraw->swapBuffers = driSwapBuffers; /* called by glXSwapBuffers() */ - - pdraw->getSBC = driGetSBC; - pdraw->waitForSBC = driWaitForSBC; - pdraw->waitForMSC = driWaitForMSC; - pdraw->swapBuffersMSC = driSwapBuffersMSC; - pdraw->frameTracking = NULL; - pdraw->queryFrameTracking = driQueryFrameTracking; - - /* This special default value is replaced with the configured - * default value when the drawable is first bound to a direct - * rendering context. - */ - pdraw->swap_interval = (unsigned)-1; - - pdp->swapBuffers = psp->DriverAPI.SwapBuffers; - - /* Add pdraw to drawable list */ - if (!__driAddDrawable(psp->drawHash, pdraw)) { - /* ERROR!!! */ - (*pdraw->destroyDrawable)(dpy, pdp); - _mesa_free(pdp); - pdp = NULL; - pdraw->private = NULL; - } - - return (void *) pdp; -} - -static __DRIdrawable *driGetDrawable(__DRInativeDisplay *dpy, __DRIid draw, - void *screenPrivate) -{ - __DRIscreenPrivate *psp = (__DRIscreenPrivate *) screenPrivate; - - /* - ** Make sure this routine returns NULL if the drawable is not bound - ** to a direct rendering context! - */ - return __driFindDrawable(psp->drawHash, draw); -} - -static void driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate) -{ - __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *) drawablePrivate; - __DRIscreenPrivate *psp = pdp->driScreenPriv; - int scrn = psp->myNum; - - if (pdp) { - (*psp->DriverAPI.DestroyBuffer)(pdp); - if ((*dri_interface->windowExists)(dpy, pdp->draw)) - (void)(*dri_interface->destroyDrawable)(dpy, scrn, pdp->draw); - drmHashDelete(psp->drawHash, pdp->draw); - if (pdp->pClipRects) { - _mesa_free(pdp->pClipRects); - pdp->pClipRects = NULL; - } - if (pdp->pBackClipRects) { - _mesa_free(pdp->pBackClipRects); - pdp->pBackClipRects = NULL; - } - _mesa_free(pdp); - } -} - -/*@}*/ - - -/*****************************************************************/ -/** \name Context handling functions */ -/*****************************************************************/ -/*@{*/ - -/** - * Destroy the per-context private information. - * - * \param dpy the display handle. - * \param scrn the screen number. - * \param contextPrivate opaque pointer to the per-drawable private info. - * - * \internal - * This function calls __DriverAPIRec::DestroyContext on \p contextPrivate, calls - * drmDestroyContext(), and finally frees \p contextPrivate. - */ -static void driDestroyContext(__DRInativeDisplay *dpy, int scrn, void *contextPrivate) -{ - __DRIcontextPrivate *pcp = (__DRIcontextPrivate *) contextPrivate; - - if (pcp) { - (*pcp->driScreenPriv->DriverAPI.DestroyContext)(pcp); - __driGarbageCollectDrawables(pcp->driScreenPriv->drawHash); - (void) (*dri_interface->destroyContext)(dpy, scrn, pcp->contextID); - _mesa_free(pcp); - } -} - - -/** - * Create the per-drawable private driver information. - * - * \param dpy The display handle. - * \param modes Mode used to create the new context. - * \param render_type Type of rendering target. \c GLX_RGBA is the only - * type likely to ever be supported for direct-rendering. - * \param sharedPrivate The shared context dependent methods or \c NULL if - * non-existent. - * \param pctx DRI context to receive the context dependent methods. - * - * \returns An opaque pointer to the per-context private information on - * success, or \c NULL on failure. - * - * \internal - * This function allocates and fills a __DRIcontextPrivateRec structure. It - * performs some device independent initialization and passes all the - * relevent information to __DriverAPIRec::CreateContext to create the - * context. - * - */ -static void * -driCreateNewContext(__DRInativeDisplay *dpy, const __GLcontextModes *modes, - int render_type, void *sharedPrivate, __DRIcontext *pctx) -{ - __DRIscreen *pDRIScreen; - __DRIcontextPrivate *pcp; - __DRIcontextPrivate *pshare = (__DRIcontextPrivate *) sharedPrivate; - __DRIscreenPrivate *psp; - void * const shareCtx = (pshare != NULL) ? pshare->driverPrivate : NULL; - - pDRIScreen = (*dri_interface->getScreen)(dpy, modes->screen); - if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { - /* ERROR!!! */ - return NULL; - } - - psp = (__DRIscreenPrivate *)pDRIScreen->private; - - pcp = (__DRIcontextPrivate *)_mesa_malloc(sizeof(__DRIcontextPrivate)); - if (!pcp) { - return NULL; - } - - if (! (*dri_interface->createContext)(dpy, modes->screen, modes->fbconfigID, - &pcp->contextID, &pcp->hHWContext)) { - _mesa_free(pcp); - return NULL; - } - - pcp->display = dpy; - pcp->driScreenPriv = psp; - pcp->driDrawablePriv = NULL; - - /* When the first context is created for a screen, initialize a "dummy" - * context. - */ - - if (!psp->dummyContextPriv.driScreenPriv) { - psp->dummyContextPriv.contextID = 0; - psp->dummyContextPriv.hHWContext = psp->pSAREA->dummy_context; - psp->dummyContextPriv.driScreenPriv = psp; - psp->dummyContextPriv.driDrawablePriv = NULL; - psp->dummyContextPriv.driverPrivate = NULL; - /* No other fields should be used! */ - } - - pctx->destroyContext = driDestroyContext; - pctx->bindContext = driBindContext; - pctx->unbindContext = driUnbindContext; - - if ( !(*psp->DriverAPI.CreateContext)(modes, pcp, shareCtx) ) { - (void) (*dri_interface->destroyContext)(dpy, modes->screen, - pcp->contextID); - _mesa_free(pcp); - return NULL; - } - - __driGarbageCollectDrawables(pcp->driScreenPriv->drawHash); - - return pcp; -} -/*@}*/ - - -/*****************************************************************/ -/** \name Screen handling functions */ -/*****************************************************************/ -/*@{*/ - -/** - * Destroy the per-screen private information. - * - * \param dpy the display handle. - * \param scrn the screen number. - * \param screenPrivate opaque pointer to the per-screen private information. - * - * \internal - * This function calls __DriverAPIRec::DestroyScreen on \p screenPrivate, calls - * drmClose(), and finally frees \p screenPrivate. - */ -static void driDestroyScreen(__DRInativeDisplay *dpy, int scrn, void *screenPrivate) -{ - __DRIscreenPrivate *psp = (__DRIscreenPrivate *) screenPrivate; - - if (psp) { - /* No interaction with the X-server is possible at this point. This - * routine is called after XCloseDisplay, so there is no protocol - * stream open to the X-server anymore. - */ - - if (psp->DriverAPI.DestroyScreen) - (*psp->DriverAPI.DestroyScreen)(psp); - - (void)drmUnmap((drmAddress)psp->pSAREA, SAREA_MAX); - (void)drmUnmap((drmAddress)psp->pFB, psp->fbSize); - _mesa_free(psp->pDevPriv); - (void)drmClose(psp->fd); - if ( psp->modes != NULL ) { - (*dri_interface->destroyContextModes)( psp->modes ); - } - _mesa_free(psp); - } -} - - -/** - * Utility function used to create a new driver-private screen structure. - * - * \param dpy Display pointer - * \param scrn Index of the screen - * \param psc DRI screen data (not driver private) - * \param modes Linked list of known display modes. This list is, at a - * minimum, a list of modes based on the current display mode. - * These roughly match the set of available X11 visuals, but it - * need not be limited to X11! The calling libGL should create - * a list that will inform the driver of the current display - * mode (i.e., color buffer depth, depth buffer depth, etc.). - * \param ddx_version Version of the 2D DDX. This may not be meaningful for - * all drivers. - * \param dri_version Version of the "server-side" DRI. - * \param drm_version Version of the kernel DRM. - * \param frame_buffer Data describing the location and layout of the - * framebuffer. - * \param pSAREA Pointer the the SAREA. - * \param fd Device handle for the DRM. - * \param internal_api_version Version of the internal interface between the - * driver and libGL. - * \param driverAPI Driver API functions used by other routines in dri_util.c. - * - * \note - * There is no need to check the minimum API version in this function. Since - * the \c __driCreateNewScreen function is versioned, it is impossible for a - * loader that is too old to even load this driver. - */ -__DRIscreenPrivate * -__driUtilCreateNewScreen(__DRInativeDisplay *dpy, int scrn, __DRIscreen *psc, - __GLcontextModes * modes, - const __DRIversion * ddx_version, - const __DRIversion * dri_version, - const __DRIversion * drm_version, - const __DRIframebuffer * frame_buffer, - drm_sarea_t *pSAREA, - int fd, - int internal_api_version, - const struct __DriverAPIRec *driverAPI) -{ - __DRIscreenPrivate *psp; - - - api_ver = internal_api_version; - - psp = (__DRIscreenPrivate *)_mesa_malloc(sizeof(__DRIscreenPrivate)); - if (!psp) { - return NULL; - } - - /* Create the hash table */ - psp->drawHash = drmHashCreate(); - if ( psp->drawHash == NULL ) { - _mesa_free( psp ); - return NULL; - } - - psp->display = dpy; - psp->myNum = scrn; - psp->psc = psc; - psp->modes = modes; - - /* - ** NOT_DONE: This is used by the X server to detect when the client - ** has died while holding the drawable lock. The client sets the - ** drawable lock to this value. - */ - psp->drawLockID = 1; - - psp->drmMajor = drm_version->major; - psp->drmMinor = drm_version->minor; - psp->drmPatch = drm_version->patch; - psp->ddxMajor = ddx_version->major; - psp->ddxMinor = ddx_version->minor; - psp->ddxPatch = ddx_version->patch; - psp->driMajor = dri_version->major; - psp->driMinor = dri_version->minor; - psp->driPatch = dri_version->patch; - - /* install driver's callback functions */ - memcpy( &psp->DriverAPI, driverAPI, sizeof(struct __DriverAPIRec) ); - - psp->pSAREA = pSAREA; - - psp->pFB = frame_buffer->base; - psp->fbSize = frame_buffer->size; - psp->fbStride = frame_buffer->stride; - psp->fbWidth = frame_buffer->width; - psp->fbHeight = frame_buffer->height; - psp->devPrivSize = frame_buffer->dev_priv_size; - psp->pDevPriv = frame_buffer->dev_priv; - psp->fbBPP = psp->fbStride * 8 / frame_buffer->width; - - psp->fd = fd; - - /* - ** Do not init dummy context here; actual initialization will be - ** done when the first DRI context is created. Init screen priv ptr - ** to NULL to let CreateContext routine that it needs to be inited. - */ - psp->dummyContextPriv.driScreenPriv = NULL; - - psc->destroyScreen = driDestroyScreen; - psc->createNewDrawable = driCreateNewDrawable; - psc->getDrawable = driGetDrawable; - psc->getMSC = driGetMSC; - psc->createNewContext = driCreateNewContext; - - if ( (psp->DriverAPI.InitDriver != NULL) - && !(*psp->DriverAPI.InitDriver)(psp) ) { - _mesa_free( psp ); - return NULL; - } - - - return psp; -} - - -/** - * Compare the current GLX API version with a driver supplied required version. - * - * The minimum required version is compared with the API version exported by - * the \c __glXGetInternalVersion function (in libGL.so). - * - * \param required_version Minimum required internal GLX API version. - * \return A tri-value return, as from strcmp is returned. A value less - * than, equal to, or greater than zero will be returned if the - * internal GLX API version is less than, equal to, or greater - * than \c required_version. - * - * \sa __glXGetInternalVersion(). - */ -int driCompareGLXAPIVersion( GLint required_version ) -{ - if ( api_ver > required_version ) { - return 1; - } - else if ( api_ver == required_version ) { - return 0; - } - - return -1; -} - - -static int -driQueryFrameTracking( __DRInativeDisplay * dpy, void * priv, - int64_t * sbc, int64_t * missedFrames, - float * lastMissedUsage, float * usage ) -{ - __DRIswapInfo sInfo; - int status; - int64_t ust; - __DRIdrawablePrivate * dpriv = (__DRIdrawablePrivate *) priv; - - - status = dpriv->driScreenPriv->DriverAPI.GetSwapInfo( dpriv, & sInfo ); - if ( status == 0 ) { - *sbc = sInfo.swap_count; - *missedFrames = sInfo.swap_missed_count; - *lastMissedUsage = sInfo.swap_missed_usage; - - (*dri_interface->getUST)( & ust ); - *usage = driCalculateSwapUsage( dpriv, sInfo.swap_ust, ust ); - } - - return status; -} - - -/** - * Calculate amount of swap interval used between GLX buffer swaps. - * - * The usage value, on the range [0,max], is the fraction of total swap - * interval time used between GLX buffer swaps is calculated. - * - * \f$p = t_d / (i * t_r)\f$ - * - * Where \f$t_d\f$ is the time since the last GLX buffer swap, \f$i\f$ is the - * swap interval (as set by \c glXSwapIntervalSGI), and \f$t_r\f$ time - * required for a single vertical refresh period (as returned by \c - * glXGetMscRateOML). - * - * See the documentation for the GLX_MESA_swap_frame_usage extension for more - * details. - * - * \param dPriv Pointer to the private drawable structure. - * \return If less than a single swap interval time period was required - * between GLX buffer swaps, a number greater than 0 and less than - * 1.0 is returned. If exactly one swap interval time period is - * required, 1.0 is returned, and if more than one is required then - * a number greater than 1.0 will be returned. - * - * \sa glXSwapIntervalSGI glXGetMscRateOML - * - * \todo Instead of caching the \c glXGetMscRateOML function pointer, would it - * be possible to cache the sync rate? - */ -float -driCalculateSwapUsage( __DRIdrawablePrivate *dPriv, int64_t last_swap_ust, - int64_t current_ust ) -{ - int32_t n; - int32_t d; - int interval; - float usage = 1.0; - - - if ( (*dri_interface->getMSCRate)( dPriv->display, dPriv->draw, &n, &d ) ) { - interval = (dPriv->pdraw->swap_interval != 0) - ? dPriv->pdraw->swap_interval : 1; - - - /* We want to calculate - * (current_UST - last_swap_UST) / (interval * us_per_refresh). We get - * current_UST by calling __glXGetUST. last_swap_UST is stored in - * dPriv->swap_ust. interval has already been calculated. - * - * The only tricky part is us_per_refresh. us_per_refresh is - * 1000000 / MSC_rate. We know the MSC_rate is n / d. We can flip it - * around and say us_per_refresh = 1000000 * d / n. Since this goes in - * the denominator of the final calculation, we calculate - * (interval * 1000000 * d) and move n into the numerator. - */ - - usage = (current_ust - last_swap_ust); - usage *= n; - usage /= (interval * d); - usage /= 1000000.0; - } - - return usage; -} - -/*@}*/ diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/dri_util.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/dri_util.h deleted file mode 100644 index b9b38f39cd..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/dri_util.h +++ /dev/null @@ -1,555 +0,0 @@ -/* $XFree86: xc/lib/GL/dri/dri_util.h,v 1.1 2002/02/22 21:32:52 dawes Exp $ */ -/** - * \file dri_util.h - * DRI utility functions definitions. - * - * This module acts as glue between GLX and the actual hardware driver. A DRI - * driver doesn't really \e have to use any of this - it's optional. But, some - * useful stuff is done here that otherwise would have to be duplicated in most - * drivers. - * - * Basically, these utility functions take care of some of the dirty details of - * screen initialization, context creation, context binding, DRM setup, etc. - * - * These functions are compiled into each DRI driver so libGL.so knows nothing - * about them. - * - * \sa dri_util.c. - * - * \author Kevin E. Martin - * \author Brian Paul - */ - -/* - * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef _DRI_UTIL_H_ -#define _DRI_UTIL_H_ - -#define CAPI /* XXX this should be globally defined somewhere */ - -#include -#include "drm.h" -#include "drm_sarea.h" -#include "xf86drm.h" -#include "GL/internal/glcore.h" -#include "GL/internal/dri_interface.h" - -#define GLX_BAD_CONTEXT 5 - -typedef struct __DRIdisplayPrivateRec __DRIdisplayPrivate; -typedef struct __DRIscreenPrivateRec __DRIscreenPrivate; -typedef struct __DRIcontextPrivateRec __DRIcontextPrivate; -typedef struct __DRIdrawablePrivateRec __DRIdrawablePrivate; -typedef struct __DRIswapInfoRec __DRIswapInfo; -typedef struct __DRIutilversionRec2 __DRIutilversion2; - - -/** - * Used by DRI_VALIDATE_DRAWABLE_INFO - */ -#define DRI_VALIDATE_DRAWABLE_INFO_ONCE(pDrawPriv) \ - do { \ - if (*(pDrawPriv->pStamp) != pDrawPriv->lastStamp) { \ - __driUtilUpdateDrawableInfo(pDrawPriv); \ - } \ - } while (0) - - -/** - * Utility macro to validate the drawable information. - * - * See __DRIdrawablePrivate::pStamp and __DRIdrawablePrivate::lastStamp. - */ -#define DRI_VALIDATE_DRAWABLE_INFO(psp, pdp) \ -do { \ - while (*(pdp->pStamp) != pdp->lastStamp) { \ - DRM_UNLOCK(psp->fd, &psp->pSAREA->lock, \ - pdp->driContextPriv->hHWContext); \ - \ - DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \ - DRI_VALIDATE_DRAWABLE_INFO_ONCE(pdp); \ - DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \ - \ - DRM_LIGHT_LOCK(psp->fd, &psp->pSAREA->lock, \ - pdp->driContextPriv->hHWContext); \ - } \ -} while (0) - - -/** - * Driver callback functions. - * - * Each DRI driver must have one of these structures with all the pointers set - * to appropriate functions within the driver. - * - * When glXCreateContext() is called, for example, it'll call a helper function - * dri_util.c which in turn will jump through the \a CreateContext pointer in - * this structure. - */ -struct __DriverAPIRec { - /** - * Driver initialization callback - */ - GLboolean (*InitDriver)(__DRIscreenPrivate *driScrnPriv); - - /** - * Screen destruction callback - */ - void (*DestroyScreen)(__DRIscreenPrivate *driScrnPriv); - - /** - * Context creation callback - */ - GLboolean (*CreateContext)(const __GLcontextModes *glVis, - __DRIcontextPrivate *driContextPriv, - void *sharedContextPrivate); - - /** - * Context destruction callback - */ - void (*DestroyContext)(__DRIcontextPrivate *driContextPriv); - - /** - * Buffer (drawable) creation callback - */ - GLboolean (*CreateBuffer)(__DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, - const __GLcontextModes *glVis, - GLboolean pixmapBuffer); - - /** - * Buffer (drawable) destruction callback - */ - void (*DestroyBuffer)(__DRIdrawablePrivate *driDrawPriv); - - /** - * Buffer swapping callback - */ - void (*SwapBuffers)(__DRIdrawablePrivate *driDrawPriv); - - /** - * Context activation callback - */ - GLboolean (*MakeCurrent)(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv); - - /** - * Context unbinding callback - */ - GLboolean (*UnbindContext)(__DRIcontextPrivate *driContextPriv); - - /** - * Retrieves statistics about buffer swap operations. Required if - * GLX_OML_sync_control or GLX_MESA_swap_frame_usage is supported. - */ - int (*GetSwapInfo)( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo ); - - - /** - * Required if GLX_SGI_video_sync or GLX_OML_sync_control is - * supported. - */ - int (*GetMSC)( __DRIscreenPrivate * priv, int64_t * count ); - - /** - * These are required if GLX_OML_sync_control is supported. - */ - /*@{*/ - int (*WaitForMSC)( __DRIdrawablePrivate *priv, int64_t target_msc, - int64_t divisor, int64_t remainder, - int64_t * msc ); - int (*WaitForSBC)( __DRIdrawablePrivate *priv, int64_t target_sbc, - int64_t * msc, int64_t * sbc ); - - int64_t (*SwapBuffersMSC)( __DRIdrawablePrivate *priv, int64_t target_msc, - int64_t divisor, int64_t remainder ); - /*@}*/ -}; - - -struct __DRIswapInfoRec { - /** - * Number of swapBuffers operations that have been *completed*. - */ - u_int64_t swap_count; - - /** - * Unadjusted system time of the last buffer swap. This is the time - * when the swap completed, not the time when swapBuffers was called. - */ - int64_t swap_ust; - - /** - * Number of swap operations that occurred after the swap deadline. That - * is if a swap happens more than swap_interval frames after the previous - * swap, it has missed its deadline. If swap_interval is 0, then the - * swap deadline is 1 frame after the previous swap. - */ - u_int64_t swap_missed_count; - - /** - * Amount of time used by the last swap that missed its deadline. This - * is calculated as (__glXGetUST() - swap_ust) / (swap_interval * - * time_for_single_vrefresh)). If the actual value of swap_interval is - * 0, then 1 is used instead. If swap_missed_count is non-zero, this - * should be greater-than 1.0. - */ - float swap_missed_usage; -}; - - -/** - * Per-drawable private DRI driver information. - */ -struct __DRIdrawablePrivateRec { - /** - * Kernel drawable handle - */ - drm_drawable_t hHWDrawable; - - /** - * Driver's private drawable information. - * - * This structure is opaque. - */ - void *driverPrivate; - - /** - * X's drawable ID associated with this private drawable. - */ - __DRIid draw; - __DRIdrawable *pdraw; - - /** - * Reference count for number of context's currently bound to this - * drawable. - * - * Once it reaches zero, the drawable can be destroyed. - * - * \note This behavior will change with GLX 1.3. - */ - int refcount; - - /** - * Index of this drawable information in the SAREA. - */ - unsigned int index; - - /** - * Pointer to the "drawable has changed ID" stamp in the SAREA. - */ - unsigned int *pStamp; - - /** - * Last value of the stamp. - * - * If this differs from the value stored at __DRIdrawablePrivate::pStamp, - * then the drawable information has been modified by the X server, and the - * drawable information (below) should be retrieved from the X server. - */ - unsigned int lastStamp; - - /** - * \name Drawable - * - * Drawable information used in software fallbacks. - */ - /*@{*/ - int x; - int y; - int w; - int h; - int numClipRects; - drm_clip_rect_t *pClipRects; - /*@}*/ - - /** - * \name Back and depthbuffer - * - * Information about the back and depthbuffer where different from above. - */ - /*@{*/ - int backX; - int backY; - int backClipRectType; - int numBackClipRects; - drm_clip_rect_t *pBackClipRects; - /*@}*/ - - /** - * Pointer to context to which this drawable is currently bound. - */ - __DRIcontextPrivate *driContextPriv; - - /** - * Pointer to screen on which this drawable was created. - */ - __DRIscreenPrivate *driScreenPriv; - - /** - * \name Display and screen information. - * - * Basically just need these for when the locking code needs to call - * \c __driUtilUpdateDrawableInfo. - */ - /*@{*/ - __DRInativeDisplay *display; - int screen; - /*@}*/ - - /** - * Called via glXSwapBuffers(). - */ - void (*swapBuffers)( __DRIdrawablePrivate *dPriv ); -}; - -/** - * Per-context private driver information. - */ -struct __DRIcontextPrivateRec { - /** - * Kernel context handle used to access the device lock. - */ - __DRIid contextID; - - /** - * Kernel context handle used to access the device lock. - */ - drm_context_t hHWContext; - - /** - * Device driver's private context data. This structure is opaque. - */ - void *driverPrivate; - - /** - * This context's display pointer. - */ - __DRInativeDisplay *display; - - /** - * Pointer to drawable currently bound to this context. - */ - __DRIdrawablePrivate *driDrawablePriv; - - /** - * Pointer to screen on which this context was created. - */ - __DRIscreenPrivate *driScreenPriv; -}; - -/** - * Per-screen private driver information. - */ -struct __DRIscreenPrivateRec { - /** - * Display for this screen - */ - __DRInativeDisplay *display; - - /** - * Current screen's number - */ - int myNum; - - /** - * Callback functions into the hardware-specific DRI driver code. - */ - struct __DriverAPIRec DriverAPI; - - /** - * \name DDX version - * DDX / 2D driver version information. - * \todo Replace these fields with a \c __DRIversionRec. - */ - /*@{*/ - int ddxMajor; - int ddxMinor; - int ddxPatch; - /*@}*/ - - /** - * \name DRI version - * DRI X extension version information. - * \todo Replace these fields with a \c __DRIversionRec. - */ - /*@{*/ - int driMajor; - int driMinor; - int driPatch; - /*@}*/ - - /** - * \name DRM version - * DRM (kernel module) version information. - * \todo Replace these fields with a \c __DRIversionRec. - */ - /*@{*/ - int drmMajor; - int drmMinor; - int drmPatch; - /*@}*/ - - /** - * ID used when the client sets the drawable lock. - * - * The X server uses this value to detect if the client has died while - * holding the drawable lock. - */ - int drawLockID; - - /** - * File descriptor returned when the kernel device driver is opened. - * - * Used to: - * - authenticate client to kernel - * - map the frame buffer, SAREA, etc. - * - close the kernel device driver - */ - int fd; - - /** - * SAREA pointer - * - * Used to access: - * - the device lock - * - the device-independent per-drawable and per-context(?) information - */ - drm_sarea_t *pSAREA; - - /** - * \name Direct frame buffer access information - * Used for software fallbacks. - */ - /*@{*/ - unsigned char *pFB; - int fbSize; - int fbOrigin; - int fbStride; - int fbWidth; - int fbHeight; - int fbBPP; - /*@}*/ - - /** - * \name Device-dependent private information (stored in the SAREA). - * - * This data is accessed by the client driver only. - */ - /*@{*/ - void *pDevPriv; - int devPrivSize; - /*@}*/ - - /** - * Dummy context to which drawables are bound when not bound to any - * other context. - * - * A dummy hHWContext is created for this context, and is used by the GL - * core when a hardware lock is required but the drawable is not currently - * bound (e.g., potentially during a SwapBuffers request). The dummy - * context is created when the first "real" context is created on this - * screen. - */ - __DRIcontextPrivate dummyContextPriv; - - /** - * Hash table to hold the drawable information for this screen. - */ - void *drawHash; - - /** - * Device-dependent private information (not stored in the SAREA). - * - * This pointer is never touched by the DRI layer. - */ - void *private; - - /** - * GLX visuals / FBConfigs for this screen. These are stored as a - * linked list. - * - * \note - * This field is \b only used in conjunction with the old interfaces. If - * the new interfaces are used, this field will be set to \c NULL and will - * not be dereferenced. - */ - __GLcontextModes *modes; - - /** - * Pointer back to the \c __DRIscreen that contains this structure. - */ - - __DRIscreen *psc; -}; - - -/** - * Used to store a version which includes a major range instead of a single - * major version number. - */ -struct __DRIutilversionRec2 { - int major_min; /** min allowed Major version number. */ - int major_max; /** max allowed Major version number. */ - int minor; /**< Minor version number. */ - int patch; /**< Patch-level. */ -}; - - -extern void -__driUtilMessage(const char *f, ...); - - -extern void -__driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp); - - -extern __DRIscreenPrivate * __driUtilCreateNewScreen( __DRInativeDisplay *dpy, - int scrn, __DRIscreen *psc, __GLcontextModes * modes, - const __DRIversion * ddx_version, const __DRIversion * dri_version, - const __DRIversion * drm_version, const __DRIframebuffer * frame_buffer, - drm_sarea_t *pSAREA, int fd, int internal_api_version, - const struct __DriverAPIRec *driverAPI ); - -/* Test the version of the internal GLX API. Returns a value like strcmp. */ -extern int -driCompareGLXAPIVersion( GLint required_version ); - -extern float -driCalculateSwapUsage( __DRIdrawablePrivate *dPriv, - int64_t last_swap_ust, int64_t current_ust ); - -/** - * Pointer to the \c __DRIinterfaceMethods passed to the driver by the loader. - * - * This pointer is set in the driver's \c __driCreateNewScreen function and - * is defined in dri_util.c. - */ -extern const __DRIinterfaceMethods * dri_interface; - -#endif /* _DRI_UTIL_H_ */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/drirenderbuffer.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/drirenderbuffer.c deleted file mode 100644 index 44826958d0..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/drirenderbuffer.c +++ /dev/null @@ -1,98 +0,0 @@ - -#include "mtypes.h" -#include "drirenderbuffer.h" -#include "renderbuffer.h" -#include "imports.h" - - -/** - * This will get called when a window is resized. - * Just update width, height and internal format fields for now. - * There's usually no memory allocation above because the present - * DRI drivers use statically-allocated full-screen buffers. - */ -static GLboolean -driRenderbufferStorage(GLcontext *ctx, struct gl_renderbuffer *rb, - GLenum internalFormat, GLuint width, GLuint height) -{ - rb->Width = width; - rb->Height = height; - rb->InternalFormat = internalFormat; - return GL_TRUE; -} - - -/** - * Allocate a new driRenderbuffer object. - * Individual drivers are free to implement different versions of - * this function. - * \param format Either GL_RGBA, GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT24, - * GL_DEPTH_COMPONENT32, or GL_STENCIL_INDEX8_EXT (for now). - * \param cpp chars or bytes per pixel - * \param offset start of buffer with respect to framebuffer address - * \param pitch pixels per row - */ -driRenderbuffer * -driNewRenderbuffer(GLenum format, GLint cpp, GLint offset, GLint pitch) -{ - driRenderbuffer *drb; - - assert(format == GL_RGBA || - format == GL_DEPTH_COMPONENT16 || - format == GL_DEPTH_COMPONENT24 || - format == GL_DEPTH_COMPONENT32 || - format == GL_STENCIL_INDEX8_EXT); - - assert(cpp > 0); - assert(pitch > 0); - - drb = _mesa_calloc(sizeof(driRenderbuffer)); - if (drb) { - const GLuint name = 0; - - _mesa_init_renderbuffer(&drb->Base, name); - - /* Make sure we're using a null-valued GetPointer routine */ - assert(drb->Base.GetPointer(NULL, &drb->Base, 0, 0) == NULL); - - drb->Base.InternalFormat = format; - - if (format == GL_RGBA) { - /* Color */ - drb->Base._BaseFormat = GL_RGBA; - drb->Base.DataType = GL_UNSIGNED_BYTE; - } - else if (format == GL_DEPTH_COMPONENT16) { - /* Depth */ - drb->Base._BaseFormat = GL_DEPTH_COMPONENT; - /* we always Get/Put 32-bit Z values */ - drb->Base.DataType = GL_UNSIGNED_INT; - } - else if (format == GL_DEPTH_COMPONENT24) { - /* Depth */ - drb->Base._BaseFormat = GL_DEPTH_COMPONENT; - /* we always Get/Put 32-bit Z values */ - drb->Base.DataType = GL_UNSIGNED_INT; - } - else { - /* Stencil */ - ASSERT(format == GL_STENCIL_INDEX8); - drb->Base._BaseFormat = GL_STENCIL_INDEX; - drb->Base.DataType = GL_UNSIGNED_BYTE; - } - - /* XXX if we were allocating a user-created renderbuffer, we'd have - * to fill in the ComponentSizes[] array too. - */ - - drb->Base.AllocStorage = driRenderbufferStorage; - /* using default Delete function */ - - - /* DRI renderbuffer-specific fields: */ - drb->offset = offset; - drb->pitch = pitch; - drb->cpp = cpp; - } - return drb; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/drirenderbuffer.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/drirenderbuffer.h deleted file mode 100644 index 627f1d41d9..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/drirenderbuffer.h +++ /dev/null @@ -1,39 +0,0 @@ - -/** - * A driRenderbuffer is dervied from gl_renderbuffer. - * It describes a color buffer (front or back), a depth buffer, or stencil - * buffer etc. - * Specific to DRI drivers are the offset and pitch fields. - */ - - -#ifndef DRIRENDERBUFFER_H -#define DRIRENDERBUFFER_H - -#include "mtypes.h" - -typedef struct { - struct gl_renderbuffer Base; - - /* Chars or bytes per pixel. If Z and Stencil are stored together this - * will typically be 32 whether this a depth or stencil renderbuffer. - */ - GLint cpp; - - /* Buffer position and pitch (row stride). Recall that for today's DRI - * drivers, we have statically allocated color/depth/stencil buffers. - * So this information describes the whole screen, not just a window. - * To address pixels in a window, we need to know the window's position - * and size with respect to the screen. - */ - GLint offset; /* in bytes */ - GLint pitch; /* in pixels */ - -} driRenderbuffer; - - -driRenderbuffer * -driNewRenderbuffer(GLenum format, GLint cpp, GLint offset, GLint pitch); - - -#endif /* DRIRENDERBUFFER_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/extension_helper.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/extension_helper.h deleted file mode 100644 index 4a6606819c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/extension_helper.h +++ /dev/null @@ -1,5887 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by extension_helper.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include "utils.h" -#include "dispatch.h" - -#ifndef NULL -# define NULL 0 -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char UniformMatrix3fvARB_names[] = - "iiip\0" /* Parameter signature */ - "glUniformMatrix3fvARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char ProgramParameter4fNV_names[] = - "iiffff\0" /* Parameter signature */ - "glProgramParameter4fNV\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_multisample) -static const char SampleCoverageARB_names[] = - "fi\0" /* Parameter signature */ - "glSampleCoverage\0" - "glSampleCoverageARB\0" - ""; -#endif - -#if defined(need_GL_EXT_convolution) -static const char ConvolutionFilter1D_names[] = - "iiiiip\0" /* Parameter signature */ - "glConvolutionFilter1D\0" - "glConvolutionFilter1DEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query) -static const char BeginQueryARB_names[] = - "ii\0" /* Parameter signature */ - "glBeginQuery\0" - "glBeginQueryARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_NV_point_sprite) -static const char PointParameteriNV_names[] = - "ii\0" /* Parameter signature */ - "glPointParameteri\0" - "glPointParameteriNV\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord3sARB_names[] = - "iiii\0" /* Parameter signature */ - "glMultiTexCoord3s\0" - "glMultiTexCoord3sARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3iEXT_names[] = - "iii\0" /* Parameter signature */ - "glSecondaryColor3i\0" - "glSecondaryColor3iEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos3fMESA_names[] = - "fff\0" /* Parameter signature */ - "glWindowPos3f\0" - "glWindowPos3fARB\0" - "glWindowPos3fMESA\0" - ""; -#endif - -#if defined(need_GL_SGIS_pixel_texture) -static const char PixelTexGenParameterfvSGIS_names[] = - "ip\0" /* Parameter signature */ - "glPixelTexGenParameterfvSGIS\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char ActiveTextureARB_names[] = - "i\0" /* Parameter signature */ - "glActiveTexture\0" - "glActiveTextureARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib4ubvNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4ubvNV\0" - ""; -#endif - -#if defined(need_GL_SGI_color_table) -static const char GetColorTableParameterfvSGI_names[] = - "iip\0" /* Parameter signature */ - "glGetColorTableParameterfvSGI\0" - ""; -#endif - -#if defined(need_GL_NV_fragment_program) -static const char GetProgramNamedParameterdvNV_names[] = - "iipp\0" /* Parameter signature */ - "glGetProgramNamedParameterdvNV\0" - ""; -#endif - -#if defined(need_GL_EXT_histogram) -static const char Histogram_names[] = - "iiii\0" /* Parameter signature */ - "glHistogram\0" - "glHistogramEXT\0" - ""; -#endif - -#if defined(need_GL_SGIS_texture4D) -static const char TexImage4DSGIS_names[] = - "iiiiiiiiiip\0" /* Parameter signature */ - "glTexImage4DSGIS\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos2dvMESA_names[] = - "p\0" /* Parameter signature */ - "glWindowPos2dv\0" - "glWindowPos2dvARB\0" - "glWindowPos2dvMESA\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiColor3fVertex3fvSUN_names[] = - "ppp\0" /* Parameter signature */ - "glReplacementCodeuiColor3fVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_EXT_paletted_texture) -static const char GetColorTableParameterivEXT_names[] = - "iip\0" /* Parameter signature */ - "glGetColorTableParameterivEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_blend_equation_separate) || defined(need_GL_ATI_blend_equation_separate) -static const char BlendEquationSeparateEXT_names[] = - "ii\0" /* Parameter signature */ - "glBlendEquationSeparateEXT\0" - "glBlendEquationSeparateATI\0" - ""; -#endif - -#if defined(need_GL_SGIX_list_priority) -static const char ListParameterfSGIX_names[] = - "iif\0" /* Parameter signature */ - "glListParameterfSGIX\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3bEXT_names[] = - "iii\0" /* Parameter signature */ - "glSecondaryColor3b\0" - "glSecondaryColor3bEXT\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char TexCoord4fColor4fNormal3fVertex4fvSUN_names[] = - "pppp\0" /* Parameter signature */ - "glTexCoord4fColor4fNormal3fVertex4fvSUN\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib4svNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4svNV\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object) -static const char GetBufferSubDataARB_names[] = - "iiip\0" /* Parameter signature */ - "glGetBufferSubData\0" - "glGetBufferSubDataARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object) -static const char BufferSubDataARB_names[] = - "iiip\0" /* Parameter signature */ - "glBufferSubData\0" - "glBufferSubDataARB\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char TexCoord2fColor4ubVertex3fvSUN_names[] = - "ppp\0" /* Parameter signature */ - "glTexCoord2fColor4ubVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char ProgramEnvParameter4dvARB_names[] = - "iip\0" /* Parameter signature */ - "glProgramEnvParameter4dvARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib2fARB_names[] = - "iff\0" /* Parameter signature */ - "glVertexAttrib2fARB\0" - ""; -#endif - -#if defined(need_GL_EXT_histogram) -static const char GetHistogramParameterivEXT_names[] = - "iip\0" /* Parameter signature */ - "glGetHistogramParameterivEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib3fARB_names[] = - "ifff\0" /* Parameter signature */ - "glVertexAttrib3fARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query) -static const char GetQueryivARB_names[] = - "iip\0" /* Parameter signature */ - "glGetQueryiv\0" - "glGetQueryivARB\0" - ""; -#endif - -#if defined(need_GL_EXT_texture3D) -static const char TexImage3D_names[] = - "iiiiiiiiip\0" /* Parameter signature */ - "glTexImage3D\0" - "glTexImage3DEXT\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiVertex3fvSUN_names[] = - "pp\0" /* Parameter signature */ - "glReplacementCodeuiVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query) -static const char GetQueryObjectivARB_names[] = - "iip\0" /* Parameter signature */ - "glGetQueryObjectiv\0" - "glGetQueryObjectivARB\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiTexCoord2fVertex3fvSUN_names[] = - "ppp\0" /* Parameter signature */ - "glReplacementCodeuiTexCoord2fVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_texture_compression) -static const char CompressedTexSubImage2DARB_names[] = - "iiiiiiiip\0" /* Parameter signature */ - "glCompressedTexSubImage2D\0" - "glCompressedTexSubImage2DARB\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform2fARB_names[] = - "iff\0" /* Parameter signature */ - "glUniform2fARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib1svARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib1svARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttribs1dvNV_names[] = - "iip\0" /* Parameter signature */ - "glVertexAttribs1dvNV\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform2ivARB_names[] = - "iip\0" /* Parameter signature */ - "glUniform2ivARB\0" - ""; -#endif - -#if defined(need_GL_HP_image_transform) -static const char GetImageTransformParameterfvHP_names[] = - "iip\0" /* Parameter signature */ - "glGetImageTransformParameterfvHP\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_blend) -static const char WeightubvARB_names[] = - "ip\0" /* Parameter signature */ - "glWeightubvARB\0" - ""; -#endif - -#if defined(need_GL_EXT_convolution) -static const char CopyConvolutionFilter1D_names[] = - "iiiii\0" /* Parameter signature */ - "glCopyConvolutionFilter1D\0" - "glCopyConvolutionFilter1DEXT\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiNormal3fVertex3fSUN_names[] = - "iffffff\0" /* Parameter signature */ - "glReplacementCodeuiNormal3fVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char FragmentMaterialfvSGIX_names[] = - "iip\0" /* Parameter signature */ - "glFragmentMaterialfvSGIX\0" - ""; -#endif - -#if defined(need_GL_EXT_blend_color) -static const char BlendColor_names[] = - "ffff\0" /* Parameter signature */ - "glBlendColor\0" - "glBlendColorEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char UniformMatrix4fvARB_names[] = - "iiip\0" /* Parameter signature */ - "glUniformMatrix4fvARB\0" - ""; -#endif - -#if defined(need_GL_SGIX_instruments) -static const char ReadInstrumentsSGIX_names[] = - "i\0" /* Parameter signature */ - "glReadInstrumentsSGIX\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char Color4ubVertex3fvSUN_names[] = - "pp\0" /* Parameter signature */ - "glColor4ubVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_SGIX_list_priority) -static const char GetListParameterivSGIX_names[] = - "iip\0" /* Parameter signature */ - "glGetListParameterivSGIX\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4NusvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4NusvARB\0" - ""; -#endif - -#if defined(need_GL_MESA_window_pos) -static const char WindowPos4svMESA_names[] = - "p\0" /* Parameter signature */ - "glWindowPos4svMESA\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char CreateProgramObjectARB_names[] = - "\0" /* Parameter signature */ - "glCreateProgramObjectARB\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char FragmentLightModelivSGIX_names[] = - "ip\0" /* Parameter signature */ - "glFragmentLightModelivSGIX\0" - ""; -#endif - -#if defined(need_GL_ATI_fragment_shader) -static const char ColorFragmentOp3ATI_names[] = - "iiiiiiiiiiiii\0" /* Parameter signature */ - "glColorFragmentOp3ATI\0" - ""; -#endif - -#if defined(need_GL_EXT_texture_object) -static const char PrioritizeTextures_names[] = - "ipp\0" /* Parameter signature */ - "glPrioritizeTextures\0" - "glPrioritizeTexturesEXT\0" - ""; -#endif - -#if defined(need_GL_SGIX_async) -static const char AsyncMarkerSGIX_names[] = - "i\0" /* Parameter signature */ - "glAsyncMarkerSGIX\0" - ""; -#endif - -#if defined(need_GL_SUN_global_alpha) -static const char GlobalAlphaFactorubSUN_names[] = - "i\0" /* Parameter signature */ - "glGlobalAlphaFactorubSUN\0" - ""; -#endif - -#if defined(need_GL_EXT_histogram) -static const char ResetHistogram_names[] = - "i\0" /* Parameter signature */ - "glResetHistogram\0" - "glResetHistogramEXT\0" - ""; -#endif - -#if defined(need_GL_NV_fragment_program) -static const char GetProgramNamedParameterfvNV_names[] = - "iipp\0" /* Parameter signature */ - "glGetProgramNamedParameterfvNV\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_point_parameters) || defined(need_GL_EXT_point_parameters) || defined(need_GL_SGIS_point_parameters) -static const char PointParameterfEXT_names[] = - "if\0" /* Parameter signature */ - "glPointParameterf\0" - "glPointParameterfARB\0" - "glPointParameterfEXT\0" - "glPointParameterfSGIS\0" - ""; -#endif - -#if defined(need_GL_SGIX_polynomial_ffd) -static const char LoadIdentityDeformationMapSGIX_names[] = - "i\0" /* Parameter signature */ - "glLoadIdentityDeformationMapSGIX\0" - ""; -#endif - -#if defined(need_GL_NV_fence) -static const char GenFencesNV_names[] = - "ip\0" /* Parameter signature */ - "glGenFencesNV\0" - ""; -#endif - -#if defined(need_GL_HP_image_transform) -static const char ImageTransformParameterfHP_names[] = - "iif\0" /* Parameter signature */ - "glImageTransformParameterfHP\0" - ""; -#endif - -#if defined(need_GL_ARB_matrix_palette) -static const char MatrixIndexusvARB_names[] = - "ip\0" /* Parameter signature */ - "glMatrixIndexusvARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char ProgramParameter4dvNV_names[] = - "iip\0" /* Parameter signature */ - "glProgramParameter4dvNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char DisableVertexAttribArrayARB_names[] = - "i\0" /* Parameter signature */ - "glDisableVertexAttribArrayARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_2_0) -static const char StencilMaskSeparate_names[] = - "ii\0" /* Parameter signature */ - "glStencilMaskSeparate\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char ProgramLocalParameter4dARB_names[] = - "iidddd\0" /* Parameter signature */ - "glProgramLocalParameter4dARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_texture_compression) -static const char CompressedTexImage3DARB_names[] = - "iiiiiiiip\0" /* Parameter signature */ - "glCompressedTexImage3D\0" - "glCompressedTexImage3DARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib1fARB_names[] = - "if\0" /* Parameter signature */ - "glVertexAttrib1fARB\0" - ""; -#endif - -#if defined(need_GL_NV_fence) -static const char TestFenceNV_names[] = - "i\0" /* Parameter signature */ - "glTestFenceNV\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord1fvARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord1fv\0" - "glMultiTexCoord1fvARB\0" - ""; -#endif - -#if defined(need_GL_ATI_fragment_shader) -static const char ColorFragmentOp2ATI_names[] = - "iiiiiiiiii\0" /* Parameter signature */ - "glColorFragmentOp2ATI\0" - ""; -#endif - -#if defined(need_GL_IBM_vertex_array_lists) -static const char SecondaryColorPointerListIBM_names[] = - "iiipi\0" /* Parameter signature */ - "glSecondaryColorPointerListIBM\0" - ""; -#endif - -#if defined(need_GL_SGIS_pixel_texture) -static const char GetPixelTexGenParameterivSGIS_names[] = - "ip\0" /* Parameter signature */ - "glGetPixelTexGenParameterivSGIS\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib4fNV_names[] = - "iffff\0" /* Parameter signature */ - "glVertexAttrib4fNV\0" - ""; -#endif - -#if defined(need_GL_SUN_triangle_list) -static const char ReplacementCodeubSUN_names[] = - "i\0" /* Parameter signature */ - "glReplacementCodeubSUN\0" - ""; -#endif - -#if defined(need_GL_SGIX_async) -static const char FinishAsyncSGIX_names[] = - "p\0" /* Parameter signature */ - "glFinishAsyncSGIX\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_fog_coord) -static const char FogCoorddEXT_names[] = - "d\0" /* Parameter signature */ - "glFogCoordd\0" - "glFogCoorddEXT\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char Color4ubVertex3fSUN_names[] = - "iiiifff\0" /* Parameter signature */ - "glColor4ubVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_fog_coord) -static const char FogCoordfEXT_names[] = - "f\0" /* Parameter signature */ - "glFogCoordf\0" - "glFogCoordfEXT\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char TexCoord2fVertex3fSUN_names[] = - "fffff\0" /* Parameter signature */ - "glTexCoord2fVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_SUN_global_alpha) -static const char GlobalAlphaFactoriSUN_names[] = - "i\0" /* Parameter signature */ - "glGlobalAlphaFactoriSUN\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib2dNV_names[] = - "idd\0" /* Parameter signature */ - "glVertexAttrib2dNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4NbvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4NbvARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_shader) -static const char GetActiveAttribARB_names[] = - "iiipppp\0" /* Parameter signature */ - "glGetActiveAttribARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib4ubNV_names[] = - "iiiii\0" /* Parameter signature */ - "glVertexAttrib4ubNV\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char TexCoord2fColor4fNormal3fVertex3fSUN_names[] = - "ffffffffffff\0" /* Parameter signature */ - "glTexCoord2fColor4fNormal3fVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_EXT_histogram) -static const char GetMinmaxEXT_names[] = - "iiiip\0" /* Parameter signature */ - "glGetMinmaxEXT\0" - ""; -#endif - -#if defined(need_GL_NV_register_combiners) -static const char CombinerParameterfvNV_names[] = - "ip\0" /* Parameter signature */ - "glCombinerParameterfvNV\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttribs3dvNV_names[] = - "iip\0" /* Parameter signature */ - "glVertexAttribs3dvNV\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttribs4fvNV_names[] = - "iip\0" /* Parameter signature */ - "glVertexAttribs4fvNV\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char FragmentLightiSGIX_names[] = - "iii\0" /* Parameter signature */ - "glFragmentLightiSGIX\0" - ""; -#endif - -#if defined(need_GL_EXT_polygon_offset) -static const char PolygonOffsetEXT_names[] = - "ff\0" /* Parameter signature */ - "glPolygonOffsetEXT\0" - ""; -#endif - -#if defined(need_GL_SGIX_async) -static const char PollAsyncSGIX_names[] = - "p\0" /* Parameter signature */ - "glPollAsyncSGIX\0" - ""; -#endif - -#if defined(need_GL_ATI_fragment_shader) -static const char DeleteFragmentShaderATI_names[] = - "i\0" /* Parameter signature */ - "glDeleteFragmentShaderATI\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char TexCoord2fNormal3fVertex3fvSUN_names[] = - "ppp\0" /* Parameter signature */ - "glTexCoord2fNormal3fVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_transpose_matrix) -static const char MultTransposeMatrixdARB_names[] = - "p\0" /* Parameter signature */ - "glMultTransposeMatrixd\0" - "glMultTransposeMatrixdARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos2svMESA_names[] = - "p\0" /* Parameter signature */ - "glWindowPos2sv\0" - "glWindowPos2svARB\0" - "glWindowPos2svMESA\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_texture_compression) -static const char CompressedTexImage1DARB_names[] = - "iiiiiip\0" /* Parameter signature */ - "glCompressedTexImage1D\0" - "glCompressedTexImage1DARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib2sNV_names[] = - "iii\0" /* Parameter signature */ - "glVertexAttrib2sNV\0" - ""; -#endif - -#if defined(need_GL_IBM_vertex_array_lists) -static const char NormalPointerListIBM_names[] = - "iipi\0" /* Parameter signature */ - "glNormalPointerListIBM\0" - ""; -#endif - -#if defined(need_GL_EXT_vertex_array) -static const char IndexPointerEXT_names[] = - "iiip\0" /* Parameter signature */ - "glIndexPointerEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_vertex_array) -static const char NormalPointerEXT_names[] = - "iiip\0" /* Parameter signature */ - "glNormalPointerEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord3dARB_names[] = - "iddd\0" /* Parameter signature */ - "glMultiTexCoord3d\0" - "glMultiTexCoord3dARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord2iARB_names[] = - "iii\0" /* Parameter signature */ - "glMultiTexCoord2i\0" - "glMultiTexCoord2iARB\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN_names[] = - "iffffffff\0" /* Parameter signature */ - "glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord2svARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord2sv\0" - "glMultiTexCoord2svARB\0" - ""; -#endif - -#if defined(need_GL_SUN_triangle_list) -static const char ReplacementCodeubvSUN_names[] = - "p\0" /* Parameter signature */ - "glReplacementCodeubvSUN\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform3iARB_names[] = - "iiii\0" /* Parameter signature */ - "glUniform3iARB\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char GetFragmentMaterialfvSGIX_names[] = - "iip\0" /* Parameter signature */ - "glGetFragmentMaterialfvSGIX\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Binormal3fEXT_names[] = - "fff\0" /* Parameter signature */ - "glBinormal3fEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_blend) -static const char WeightivARB_names[] = - "ip\0" /* Parameter signature */ - "glWeightivARB\0" - ""; -#endif - -#if defined(need_GL_SUN_global_alpha) -static const char GlobalAlphaFactordSUN_names[] = - "d\0" /* Parameter signature */ - "glGlobalAlphaFactordSUN\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttribs3fvNV_names[] = - "iip\0" /* Parameter signature */ - "glVertexAttribs3fvNV\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char GenerateMipmapEXT_names[] = - "i\0" /* Parameter signature */ - "glGenerateMipmapEXT\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char ProgramParameter4dNV_names[] = - "iidddd\0" /* Parameter signature */ - "glProgramParameter4dNV\0" - ""; -#endif - -#if defined(need_GL_ATI_fragment_shader) -static const char SetFragmentShaderConstantATI_names[] = - "ip\0" /* Parameter signature */ - "glSetFragmentShaderConstantATI\0" - ""; -#endif - -#if defined(need_GL_NV_evaluators) -static const char GetMapAttribParameterivNV_names[] = - "iiip\0" /* Parameter signature */ - "glGetMapAttribParameterivNV\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char CreateShaderObjectARB_names[] = - "i\0" /* Parameter signature */ - "glCreateShaderObjectARB\0" - ""; -#endif - -#if defined(need_GL_SGIS_sharpen_texture) -static const char GetSharpenTexFuncSGIS_names[] = - "ip\0" /* Parameter signature */ - "glGetSharpenTexFuncSGIS\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object) -static const char BufferDataARB_names[] = - "iipi\0" /* Parameter signature */ - "glBufferData\0" - "glBufferDataARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_array_range) -static const char FlushVertexArrayRangeNV_names[] = - "\0" /* Parameter signature */ - "glFlushVertexArrayRangeNV\0" - ""; -#endif - -#if defined(need_GL_ATI_fragment_shader) -static const char SampleMapATI_names[] = - "iii\0" /* Parameter signature */ - "glSampleMapATI\0" - ""; -#endif - -#if defined(need_GL_EXT_vertex_array) -static const char VertexPointerEXT_names[] = - "iiiip\0" /* Parameter signature */ - "glVertexPointerEXT\0" - ""; -#endif - -#if defined(need_GL_SGIS_texture_filter4) -static const char GetTexFilterFuncSGIS_names[] = - "iip\0" /* Parameter signature */ - "glGetTexFilterFuncSGIS\0" - ""; -#endif - -#if defined(need_GL_NV_register_combiners) -static const char GetCombinerOutputParameterfvNV_names[] = - "iiip\0" /* Parameter signature */ - "glGetCombinerOutputParameterfvNV\0" - ""; -#endif - -#if defined(need_GL_EXT_subtexture) -static const char TexSubImage1D_names[] = - "iiiiiip\0" /* Parameter signature */ - "glTexSubImage1D\0" - "glTexSubImage1DEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib1sARB_names[] = - "ii\0" /* Parameter signature */ - "glVertexAttrib1sARB\0" - ""; -#endif - -#if defined(need_GL_NV_register_combiners) -static const char FinalCombinerInputNV_names[] = - "iiii\0" /* Parameter signature */ - "glFinalCombinerInputNV\0" - ""; -#endif - -#if defined(need_GL_EXT_histogram) -static const char GetHistogramParameterfvEXT_names[] = - "iip\0" /* Parameter signature */ - "glGetHistogramParameterfvEXT\0" - ""; -#endif - -#if defined(need_GL_SGIX_flush_raster) -static const char FlushRasterSGIX_names[] = - "\0" /* Parameter signature */ - "glFlushRasterSGIX\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiTexCoord2fVertex3fSUN_names[] = - "ifffff\0" /* Parameter signature */ - "glReplacementCodeuiTexCoord2fVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_ARB_draw_buffers) || defined(need_GL_ATI_draw_buffers) -static const char DrawBuffersARB_names[] = - "ip\0" /* Parameter signature */ - "glDrawBuffersARB\0" - "glDrawBuffersATI\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char IsRenderbufferEXT_names[] = - "i\0" /* Parameter signature */ - "glIsRenderbufferEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_2_0) -static const char StencilOpSeparate_names[] = - "iiii\0" /* Parameter signature */ - "glStencilOpSeparate\0" - ""; -#endif - -#if defined(need_GL_SGI_color_table) -static const char ColorTableParameteriv_names[] = - "iip\0" /* Parameter signature */ - "glColorTableParameteriv\0" - "glColorTableParameterivSGI\0" - ""; -#endif - -#if defined(need_GL_IBM_vertex_array_lists) -static const char FogCoordPointerListIBM_names[] = - "iipi\0" /* Parameter signature */ - "glFogCoordPointerListIBM\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos3dMESA_names[] = - "ddd\0" /* Parameter signature */ - "glWindowPos3d\0" - "glWindowPos3dARB\0" - "glWindowPos3dMESA\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_point_parameters) || defined(need_GL_EXT_point_parameters) || defined(need_GL_SGIS_point_parameters) -static const char PointParameterfvEXT_names[] = - "ip\0" /* Parameter signature */ - "glPointParameterfv\0" - "glPointParameterfvARB\0" - "glPointParameterfvEXT\0" - "glPointParameterfvSGIS\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos2fvMESA_names[] = - "p\0" /* Parameter signature */ - "glWindowPos2fv\0" - "glWindowPos2fvARB\0" - "glWindowPos2fvMESA\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3bvEXT_names[] = - "p\0" /* Parameter signature */ - "glSecondaryColor3bv\0" - "glSecondaryColor3bvEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_histogram) -static const char GetHistogramEXT_names[] = - "iiiip\0" /* Parameter signature */ - "glGetHistogramEXT\0" - ""; -#endif - -#if defined(need_GL_IBM_vertex_array_lists) -static const char VertexPointerListIBM_names[] = - "iiipi\0" /* Parameter signature */ - "glVertexPointerListIBM\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char GetProgramLocalParameterfvARB_names[] = - "iip\0" /* Parameter signature */ - "glGetProgramLocalParameterfvARB\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char FragmentMaterialfSGIX_names[] = - "iif\0" /* Parameter signature */ - "glFragmentMaterialfSGIX\0" - ""; -#endif - -#if defined(need_GL_EXT_paletted_texture) -static const char GetColorTableEXT_names[] = - "iiip\0" /* Parameter signature */ - "glGetColorTableEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char RenderbufferStorageEXT_names[] = - "iiii\0" /* Parameter signature */ - "glRenderbufferStorageEXT\0" - ""; -#endif - -#if defined(need_GL_NV_fence) -static const char IsFenceNV_names[] = - "i\0" /* Parameter signature */ - "glIsFenceNV\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char AttachObjectARB_names[] = - "ii\0" /* Parameter signature */ - "glAttachObjectARB\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char GetFragmentLightivSGIX_names[] = - "iip\0" /* Parameter signature */ - "glGetFragmentLightivSGIX\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char UniformMatrix2fvARB_names[] = - "iiip\0" /* Parameter signature */ - "glUniformMatrix2fvARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord2fARB_names[] = - "iff\0" /* Parameter signature */ - "glMultiTexCoord2f\0" - "glMultiTexCoord2fARB\0" - ""; -#endif - -#if defined(need_GL_SGI_color_table) || defined(need_GL_EXT_paletted_texture) -static const char ColorTable_names[] = - "iiiiip\0" /* Parameter signature */ - "glColorTable\0" - "glColorTableSGI\0" - "glColorTableEXT\0" - ""; -#endif - -#if defined(need_GL_NV_evaluators) -static const char MapControlPointsNV_names[] = - "iiiiiiiip\0" /* Parameter signature */ - "glMapControlPointsNV\0" - ""; -#endif - -#if defined(need_GL_EXT_convolution) -static const char ConvolutionFilter2D_names[] = - "iiiiiip\0" /* Parameter signature */ - "glConvolutionFilter2D\0" - "glConvolutionFilter2DEXT\0" - ""; -#endif - -#if defined(need_GL_NV_evaluators) -static const char MapParameterfvNV_names[] = - "iip\0" /* Parameter signature */ - "glMapParameterfvNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib3dvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib3dvARB\0" - ""; -#endif - -#if defined(need_GL_PGI_misc_hints) -static const char HintPGI_names[] = - "ii\0" /* Parameter signature */ - "glHintPGI\0" - ""; -#endif - -#if defined(need_GL_EXT_convolution) -static const char ConvolutionParameteriv_names[] = - "iip\0" /* Parameter signature */ - "glConvolutionParameteriv\0" - "glConvolutionParameterivEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_cull_vertex) -static const char CullParameterdvEXT_names[] = - "ip\0" /* Parameter signature */ - "glCullParameterdvEXT\0" - ""; -#endif - -#if defined(need_GL_NV_fragment_program) -static const char ProgramNamedParameter4fNV_names[] = - "iipffff\0" /* Parameter signature */ - "glProgramNamedParameter4fNV\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char Color3fVertex3fSUN_names[] = - "ffffff\0" /* Parameter signature */ - "glColor3fVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char ProgramEnvParameter4fvARB_names[] = - "iip\0" /* Parameter signature */ - "glProgramEnvParameter4fvARB\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char FragmentLightModeliSGIX_names[] = - "ii\0" /* Parameter signature */ - "glFragmentLightModeliSGIX\0" - ""; -#endif - -#if defined(need_GL_EXT_convolution) -static const char ConvolutionParameterfv_names[] = - "iip\0" /* Parameter signature */ - "glConvolutionParameterfv\0" - "glConvolutionParameterfvEXT\0" - ""; -#endif - -#if defined(need_GL_3DFX_tbuffer) -static const char TbufferMask3DFX_names[] = - "i\0" /* Parameter signature */ - "glTbufferMask3DFX\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char LoadProgramNV_names[] = - "iiip\0" /* Parameter signature */ - "glLoadProgramNV\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib4fvNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4fvNV\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char GetAttachedObjectsARB_names[] = - "iipp\0" /* Parameter signature */ - "glGetAttachedObjectsARB\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform3fvARB_names[] = - "iip\0" /* Parameter signature */ - "glUniform3fvARB\0" - ""; -#endif - -#if defined(need_GL_EXT_draw_range_elements) -static const char DrawRangeElements_names[] = - "iiiiip\0" /* Parameter signature */ - "glDrawRangeElements\0" - "glDrawRangeElementsEXT\0" - ""; -#endif - -#if defined(need_GL_SGIX_sprite) -static const char SpriteParameterfvSGIX_names[] = - "ip\0" /* Parameter signature */ - "glSpriteParameterfvSGIX\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char CheckFramebufferStatusEXT_names[] = - "i\0" /* Parameter signature */ - "glCheckFramebufferStatusEXT\0" - ""; -#endif - -#if defined(need_GL_SUN_global_alpha) -static const char GlobalAlphaFactoruiSUN_names[] = - "i\0" /* Parameter signature */ - "glGlobalAlphaFactoruiSUN\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char GetHandleARB_names[] = - "i\0" /* Parameter signature */ - "glGetHandleARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char GetVertexAttribivARB_names[] = - "iip\0" /* Parameter signature */ - "glGetVertexAttribivARB\0" - ""; -#endif - -#if defined(need_GL_NV_register_combiners) -static const char GetCombinerInputParameterfvNV_names[] = - "iiiip\0" /* Parameter signature */ - "glGetCombinerInputParameterfvNV\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiNormal3fVertex3fvSUN_names[] = - "ppp\0" /* Parameter signature */ - "glReplacementCodeuiNormal3fVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_transpose_matrix) -static const char LoadTransposeMatrixdARB_names[] = - "p\0" /* Parameter signature */ - "glLoadTransposeMatrixd\0" - "glLoadTransposeMatrixdARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_2_0) -static const char StencilFuncSeparate_names[] = - "iiii\0" /* Parameter signature */ - "glStencilFuncSeparate\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3sEXT_names[] = - "iii\0" /* Parameter signature */ - "glSecondaryColor3s\0" - "glSecondaryColor3sEXT\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char Color3fVertex3fvSUN_names[] = - "pp\0" /* Parameter signature */ - "glColor3fVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_SUN_global_alpha) -static const char GlobalAlphaFactorbSUN_names[] = - "i\0" /* Parameter signature */ - "glGlobalAlphaFactorbSUN\0" - ""; -#endif - -#if defined(need_GL_HP_image_transform) -static const char ImageTransformParameterfvHP_names[] = - "iip\0" /* Parameter signature */ - "glImageTransformParameterfvHP\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4ivARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4ivARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib3fNV_names[] = - "ifff\0" /* Parameter signature */ - "glVertexAttrib3fNV\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttribs2dvNV_names[] = - "iip\0" /* Parameter signature */ - "glVertexAttribs2dvNV\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord3fvARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord3fv\0" - "glMultiTexCoord3fvARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3dEXT_names[] = - "ddd\0" /* Parameter signature */ - "glSecondaryColor3d\0" - "glSecondaryColor3dEXT\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char GetProgramParameterfvNV_names[] = - "iiip\0" /* Parameter signature */ - "glGetProgramParameterfvNV\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char TangentPointerEXT_names[] = - "iip\0" /* Parameter signature */ - "glTangentPointerEXT\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char Color4fNormal3fVertex3fvSUN_names[] = - "ppp\0" /* Parameter signature */ - "glColor4fNormal3fVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_SGIX_instruments) -static const char GetInstrumentsSGIX_names[] = - "\0" /* Parameter signature */ - "glGetInstrumentsSGIX\0" - ""; -#endif - -#if defined(need_GL_NV_evaluators) -static const char EvalMapsNV_names[] = - "ii\0" /* Parameter signature */ - "glEvalMapsNV\0" - ""; -#endif - -#if defined(need_GL_EXT_subtexture) -static const char TexSubImage2D_names[] = - "iiiiiiiip\0" /* Parameter signature */ - "glTexSubImage2D\0" - "glTexSubImage2DEXT\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char FragmentLightivSGIX_names[] = - "iip\0" /* Parameter signature */ - "glFragmentLightivSGIX\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char DeleteRenderbuffersEXT_names[] = - "ip\0" /* Parameter signature */ - "glDeleteRenderbuffersEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_pixel_transform) -static const char PixelTransformParameterfvEXT_names[] = - "iip\0" /* Parameter signature */ - "glPixelTransformParameterfvEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4bvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4bvARB\0" - ""; -#endif - -#if defined(need_GL_ATI_fragment_shader) -static const char AlphaFragmentOp2ATI_names[] = - "iiiiiiiii\0" /* Parameter signature */ - "glAlphaFragmentOp2ATI\0" - ""; -#endif - -#if defined(need_GL_EXT_convolution) -static const char GetSeparableFilterEXT_names[] = - "iiippp\0" /* Parameter signature */ - "glGetSeparableFilterEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord4sARB_names[] = - "iiiii\0" /* Parameter signature */ - "glMultiTexCoord4s\0" - "glMultiTexCoord4sARB\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char GetFragmentMaterialivSGIX_names[] = - "iip\0" /* Parameter signature */ - "glGetFragmentMaterialivSGIX\0" - ""; -#endif - -#if defined(need_GL_MESA_window_pos) -static const char WindowPos4dMESA_names[] = - "dddd\0" /* Parameter signature */ - "glWindowPos4dMESA\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_blend) -static const char WeightPointerARB_names[] = - "iiip\0" /* Parameter signature */ - "glWeightPointerARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos2dMESA_names[] = - "dd\0" /* Parameter signature */ - "glWindowPos2d\0" - "glWindowPos2dARB\0" - "glWindowPos2dMESA\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char FramebufferTexture3DEXT_names[] = - "iiiiii\0" /* Parameter signature */ - "glFramebufferTexture3DEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_blend_minmax) -static const char BlendEquation_names[] = - "i\0" /* Parameter signature */ - "glBlendEquation\0" - "glBlendEquationEXT\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib3dNV_names[] = - "iddd\0" /* Parameter signature */ - "glVertexAttrib3dNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib3dARB_names[] = - "iddd\0" /* Parameter signature */ - "glVertexAttrib3dARB\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN_names[] = - "ppppp\0" /* Parameter signature */ - "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4fARB_names[] = - "iffff\0" /* Parameter signature */ - "glVertexAttrib4fARB\0" - ""; -#endif - -#if defined(need_GL_EXT_index_func) -static const char IndexFuncEXT_names[] = - "if\0" /* Parameter signature */ - "glIndexFuncEXT\0" - ""; -#endif - -#if defined(need_GL_SGIX_list_priority) -static const char GetListParameterfvSGIX_names[] = - "iip\0" /* Parameter signature */ - "glGetListParameterfvSGIX\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord2dvARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord2dv\0" - "glMultiTexCoord2dvARB\0" - ""; -#endif - -#if defined(need_GL_EXT_cull_vertex) -static const char CullParameterfvEXT_names[] = - "ip\0" /* Parameter signature */ - "glCullParameterfvEXT\0" - ""; -#endif - -#if defined(need_GL_NV_fragment_program) -static const char ProgramNamedParameter4fvNV_names[] = - "iipp\0" /* Parameter signature */ - "glProgramNamedParameter4fvNV\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColorPointerEXT_names[] = - "iiip\0" /* Parameter signature */ - "glSecondaryColorPointer\0" - "glSecondaryColorPointerEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4fvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4fvARB\0" - ""; -#endif - -#if defined(need_GL_IBM_vertex_array_lists) -static const char ColorPointerListIBM_names[] = - "iiipi\0" /* Parameter signature */ - "glColorPointerListIBM\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char GetActiveUniformARB_names[] = - "iiipppp\0" /* Parameter signature */ - "glGetActiveUniformARB\0" - ""; -#endif - -#if defined(need_GL_HP_image_transform) -static const char ImageTransformParameteriHP_names[] = - "iii\0" /* Parameter signature */ - "glImageTransformParameteriHP\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord1svARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord1sv\0" - "glMultiTexCoord1svARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query) -static const char EndQueryARB_names[] = - "i\0" /* Parameter signature */ - "glEndQuery\0" - "glEndQueryARB\0" - ""; -#endif - -#if defined(need_GL_NV_fence) -static const char DeleteFencesNV_names[] = - "ip\0" /* Parameter signature */ - "glDeleteFencesNV\0" - ""; -#endif - -#if defined(need_GL_SGIX_polynomial_ffd) -static const char DeformationMap3dSGIX_names[] = - "iddiiddiiddiip\0" /* Parameter signature */ - "glDeformationMap3dSGIX\0" - ""; -#endif - -#if defined(need_GL_HP_image_transform) -static const char GetImageTransformParameterivHP_names[] = - "iip\0" /* Parameter signature */ - "glGetImageTransformParameterivHP\0" - ""; -#endif - -#if defined(need_GL_MESA_window_pos) -static const char WindowPos4ivMESA_names[] = - "p\0" /* Parameter signature */ - "glWindowPos4ivMESA\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord3svARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord3sv\0" - "glMultiTexCoord3svARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord4iARB_names[] = - "iiiii\0" /* Parameter signature */ - "glMultiTexCoord4i\0" - "glMultiTexCoord4iARB\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Binormal3ivEXT_names[] = - "p\0" /* Parameter signature */ - "glBinormal3ivEXT\0" - ""; -#endif - -#if defined(need_GL_MESA_resize_buffers) -static const char ResizeBuffersMESA_names[] = - "\0" /* Parameter signature */ - "glResizeBuffersMESA\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char GetUniformivARB_names[] = - "iip\0" /* Parameter signature */ - "glGetUniformivARB\0" - ""; -#endif - -#if defined(need_GL_SGIS_pixel_texture) -static const char PixelTexGenParameteriSGIS_names[] = - "ii\0" /* Parameter signature */ - "glPixelTexGenParameteriSGIS\0" - ""; -#endif - -#if defined(need_GL_INTEL_parallel_arrays) -static const char VertexPointervINTEL_names[] = - "iip\0" /* Parameter signature */ - "glVertexPointervINTEL\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiColor4fNormal3fVertex3fvSUN_names[] = - "pppp\0" /* Parameter signature */ - "glReplacementCodeuiColor4fNormal3fVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3uiEXT_names[] = - "iii\0" /* Parameter signature */ - "glSecondaryColor3ui\0" - "glSecondaryColor3uiEXT\0" - ""; -#endif - -#if defined(need_GL_SGIX_instruments) -static const char StartInstrumentsSGIX_names[] = - "\0" /* Parameter signature */ - "glStartInstrumentsSGIX\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3usvEXT_names[] = - "p\0" /* Parameter signature */ - "glSecondaryColor3usv\0" - "glSecondaryColor3usvEXT\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib2fvNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib2fvNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char ProgramLocalParameter4dvARB_names[] = - "iip\0" /* Parameter signature */ - "glProgramLocalParameter4dvARB\0" - ""; -#endif - -#if defined(need_GL_ARB_matrix_palette) -static const char MatrixIndexuivARB_names[] = - "ip\0" /* Parameter signature */ - "glMatrixIndexuivARB\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Tangent3sEXT_names[] = - "iii\0" /* Parameter signature */ - "glTangent3sEXT\0" - ""; -#endif - -#if defined(need_GL_SUN_global_alpha) -static const char GlobalAlphaFactorfSUN_names[] = - "f\0" /* Parameter signature */ - "glGlobalAlphaFactorfSUN\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord3iARB_names[] = - "iiii\0" /* Parameter signature */ - "glMultiTexCoord3i\0" - "glMultiTexCoord3iARB\0" - ""; -#endif - -#if defined(need_GL_EXT_convolution) -static const char GetConvolutionFilterEXT_names[] = - "iiip\0" /* Parameter signature */ - "glGetConvolutionFilterEXT\0" - ""; -#endif - -#if defined(need_GL_IBM_vertex_array_lists) -static const char TexCoordPointerListIBM_names[] = - "iiipi\0" /* Parameter signature */ - "glTexCoordPointerListIBM\0" - ""; -#endif - -#if defined(need_GL_SUN_global_alpha) -static const char GlobalAlphaFactorusSUN_names[] = - "i\0" /* Parameter signature */ - "glGlobalAlphaFactorusSUN\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib2dvNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib2dvNV\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char FramebufferRenderbufferEXT_names[] = - "iiii\0" /* Parameter signature */ - "glFramebufferRenderbufferEXT\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib1dvNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib1dvNV\0" - ""; -#endif - -#if defined(need_GL_NV_fence) -static const char SetFenceNV_names[] = - "ii\0" /* Parameter signature */ - "glSetFenceNV\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char FramebufferTexture1DEXT_names[] = - "iiiii\0" /* Parameter signature */ - "glFramebufferTexture1DEXT\0" - ""; -#endif - -#if defined(need_GL_NV_register_combiners) -static const char GetCombinerOutputParameterivNV_names[] = - "iiip\0" /* Parameter signature */ - "glGetCombinerOutputParameterivNV\0" - ""; -#endif - -#if defined(need_GL_SGIS_pixel_texture) -static const char PixelTexGenParameterivSGIS_names[] = - "ip\0" /* Parameter signature */ - "glPixelTexGenParameterivSGIS\0" - ""; -#endif - -#if defined(need_GL_EXT_texture_perturb_normal) -static const char TextureNormalEXT_names[] = - "i\0" /* Parameter signature */ - "glTextureNormalEXT\0" - ""; -#endif - -#if defined(need_GL_IBM_vertex_array_lists) -static const char IndexPointerListIBM_names[] = - "iipi\0" /* Parameter signature */ - "glIndexPointerListIBM\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_blend) -static const char WeightfvARB_names[] = - "ip\0" /* Parameter signature */ - "glWeightfvARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char ProgramParameter4fvNV_names[] = - "iip\0" /* Parameter signature */ - "glProgramParameter4fvNV\0" - ""; -#endif - -#if defined(need_GL_MESA_window_pos) -static const char WindowPos4fMESA_names[] = - "ffff\0" /* Parameter signature */ - "glWindowPos4fMESA\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos3dvMESA_names[] = - "p\0" /* Parameter signature */ - "glWindowPos3dv\0" - "glWindowPos3dvARB\0" - "glWindowPos3dvMESA\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord1dARB_names[] = - "id\0" /* Parameter signature */ - "glMultiTexCoord1d\0" - "glMultiTexCoord1dARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_NV_point_sprite) -static const char PointParameterivNV_names[] = - "ip\0" /* Parameter signature */ - "glPointParameteriv\0" - "glPointParameterivNV\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform2fvARB_names[] = - "iip\0" /* Parameter signature */ - "glUniform2fvARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord3dvARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord3dv\0" - "glMultiTexCoord3dvARB\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN_names[] = - "pppp\0" /* Parameter signature */ - "glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char DeleteObjectARB_names[] = - "i\0" /* Parameter signature */ - "glDeleteObjectARB\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char UseProgramObjectARB_names[] = - "i\0" /* Parameter signature */ - "glUseProgramObjectARB\0" - ""; -#endif - -#if defined(need_GL_NV_fragment_program) -static const char ProgramNamedParameter4dvNV_names[] = - "iipp\0" /* Parameter signature */ - "glProgramNamedParameter4dvNV\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Tangent3fvEXT_names[] = - "p\0" /* Parameter signature */ - "glTangent3fvEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char BindFramebufferEXT_names[] = - "ii\0" /* Parameter signature */ - "glBindFramebufferEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4usvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4usvARB\0" - ""; -#endif - -#if defined(need_GL_EXT_compiled_vertex_array) -static const char UnlockArraysEXT_names[] = - "\0" /* Parameter signature */ - "glUnlockArraysEXT\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char TexCoord2fColor3fVertex3fSUN_names[] = - "ffffffff\0" /* Parameter signature */ - "glTexCoord2fColor3fVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos3fvMESA_names[] = - "p\0" /* Parameter signature */ - "glWindowPos3fv\0" - "glWindowPos3fvARB\0" - "glWindowPos3fvMESA\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib1svNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib1svNV\0" - ""; -#endif - -#if defined(need_GL_EXT_copy_texture) -static const char CopyTexSubImage3D_names[] = - "iiiiiiiii\0" /* Parameter signature */ - "glCopyTexSubImage3D\0" - "glCopyTexSubImage3DEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib2dARB_names[] = - "idd\0" /* Parameter signature */ - "glVertexAttrib2dARB\0" - ""; -#endif - -#if defined(need_GL_SGIS_texture_color_mask) -static const char TextureColorMaskSGIS_names[] = - "iiii\0" /* Parameter signature */ - "glTextureColorMaskSGIS\0" - ""; -#endif - -#if defined(need_GL_SGI_color_table) -static const char CopyColorTable_names[] = - "iiiii\0" /* Parameter signature */ - "glCopyColorTable\0" - "glCopyColorTableSGI\0" - ""; -#endif - -#if defined(need_GL_INTEL_parallel_arrays) -static const char ColorPointervINTEL_names[] = - "iip\0" /* Parameter signature */ - "glColorPointervINTEL\0" - ""; -#endif - -#if defined(need_GL_ATI_fragment_shader) -static const char AlphaFragmentOp1ATI_names[] = - "iiiiii\0" /* Parameter signature */ - "glAlphaFragmentOp1ATI\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord3ivARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord3iv\0" - "glMultiTexCoord3ivARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord2sARB_names[] = - "iii\0" /* Parameter signature */ - "glMultiTexCoord2s\0" - "glMultiTexCoord2sARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib1dvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib1dvARB\0" - ""; -#endif - -#if defined(need_GL_EXT_texture_object) -static const char DeleteTextures_names[] = - "ip\0" /* Parameter signature */ - "glDeleteTextures\0" - "glDeleteTexturesEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_vertex_array) -static const char TexCoordPointerEXT_names[] = - "iiiip\0" /* Parameter signature */ - "glTexCoordPointerEXT\0" - ""; -#endif - -#if defined(need_GL_SGIS_texture4D) -static const char TexSubImage4DSGIS_names[] = - "iiiiiiiiiiiip\0" /* Parameter signature */ - "glTexSubImage4DSGIS\0" - ""; -#endif - -#if defined(need_GL_NV_register_combiners2) -static const char CombinerStageParameterfvNV_names[] = - "iip\0" /* Parameter signature */ - "glCombinerStageParameterfvNV\0" - ""; -#endif - -#if defined(need_GL_SGIX_instruments) -static const char StopInstrumentsSGIX_names[] = - "i\0" /* Parameter signature */ - "glStopInstrumentsSGIX\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char TexCoord4fColor4fNormal3fVertex4fSUN_names[] = - "fffffffffffffff\0" /* Parameter signature */ - "glTexCoord4fColor4fNormal3fVertex4fSUN\0" - ""; -#endif - -#if defined(need_GL_SGIX_polynomial_ffd) -static const char DeformSGIX_names[] = - "i\0" /* Parameter signature */ - "glDeformSGIX\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char GetVertexAttribfvARB_names[] = - "iip\0" /* Parameter signature */ - "glGetVertexAttribfvARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3ivEXT_names[] = - "p\0" /* Parameter signature */ - "glSecondaryColor3iv\0" - "glSecondaryColor3ivEXT\0" - ""; -#endif - -#if defined(need_GL_SGIS_detail_texture) -static const char GetDetailTexFuncSGIS_names[] = - "ip\0" /* Parameter signature */ - "glGetDetailTexFuncSGIS\0" - ""; -#endif - -#if defined(need_GL_NV_register_combiners2) -static const char GetCombinerStageParameterfvNV_names[] = - "iip\0" /* Parameter signature */ - "glGetCombinerStageParameterfvNV\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char Color4ubVertex2fvSUN_names[] = - "pp\0" /* Parameter signature */ - "glColor4ubVertex2fvSUN\0" - ""; -#endif - -#if defined(need_GL_SGIS_texture_filter4) -static const char TexFilterFuncSGIS_names[] = - "iiip\0" /* Parameter signature */ - "glTexFilterFuncSGIS\0" - ""; -#endif - -#if defined(need_GL_SGIS_multisample) || defined(need_GL_EXT_multisample) -static const char SampleMaskSGIS_names[] = - "fi\0" /* Parameter signature */ - "glSampleMaskSGIS\0" - "glSampleMaskEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_shader) -static const char GetAttribLocationARB_names[] = - "ip\0" /* Parameter signature */ - "glGetAttribLocationARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4ubvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4ubvARB\0" - ""; -#endif - -#if defined(need_GL_SGIS_detail_texture) -static const char DetailTexFuncSGIS_names[] = - "iip\0" /* Parameter signature */ - "glDetailTexFuncSGIS\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char Normal3fVertex3fSUN_names[] = - "ffffff\0" /* Parameter signature */ - "glNormal3fVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_EXT_copy_texture) -static const char CopyTexImage2D_names[] = - "iiiiiiii\0" /* Parameter signature */ - "glCopyTexImage2D\0" - "glCopyTexImage2DEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object) -static const char GetBufferPointervARB_names[] = - "iip\0" /* Parameter signature */ - "glGetBufferPointerv\0" - "glGetBufferPointervARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char ProgramEnvParameter4fARB_names[] = - "iiffff\0" /* Parameter signature */ - "glProgramEnvParameter4fARB\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform3ivARB_names[] = - "iip\0" /* Parameter signature */ - "glUniform3ivARB\0" - ""; -#endif - -#if defined(need_GL_NV_fence) -static const char GetFenceivNV_names[] = - "iip\0" /* Parameter signature */ - "glGetFenceivNV\0" - ""; -#endif - -#if defined(need_GL_MESA_window_pos) -static const char WindowPos4dvMESA_names[] = - "p\0" /* Parameter signature */ - "glWindowPos4dvMESA\0" - ""; -#endif - -#if defined(need_GL_EXT_color_subtable) -static const char ColorSubTable_names[] = - "iiiiip\0" /* Parameter signature */ - "glColorSubTable\0" - "glColorSubTableEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord4ivARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord4iv\0" - "glMultiTexCoord4ivARB\0" - ""; -#endif - -#if defined(need_GL_NV_evaluators) -static const char GetMapAttribParameterfvNV_names[] = - "iiip\0" /* Parameter signature */ - "glGetMapAttribParameterfvNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4sARB_names[] = - "iiiii\0" /* Parameter signature */ - "glVertexAttrib4sARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query) -static const char GetQueryObjectuivARB_names[] = - "iip\0" /* Parameter signature */ - "glGetQueryObjectuiv\0" - "glGetQueryObjectuivARB\0" - ""; -#endif - -#if defined(need_GL_NV_evaluators) -static const char MapParameterivNV_names[] = - "iip\0" /* Parameter signature */ - "glMapParameterivNV\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char GenRenderbuffersEXT_names[] = - "ip\0" /* Parameter signature */ - "glGenRenderbuffersEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_convolution) -static const char GetConvolutionParameterfvEXT_names[] = - "iip\0" /* Parameter signature */ - "glGetConvolutionParameterfvEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_histogram) -static const char GetMinmaxParameterfvEXT_names[] = - "iip\0" /* Parameter signature */ - "glGetMinmaxParameterfvEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib2dvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib2dvARB\0" - ""; -#endif - -#if defined(need_GL_EXT_vertex_array) -static const char EdgeFlagPointerEXT_names[] = - "iip\0" /* Parameter signature */ - "glEdgeFlagPointerEXT\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttribs2svNV_names[] = - "iip\0" /* Parameter signature */ - "glVertexAttribs2svNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_blend) -static const char WeightbvARB_names[] = - "ip\0" /* Parameter signature */ - "glWeightbvARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib2fvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib2fvARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object) -static const char GetBufferParameterivARB_names[] = - "iip\0" /* Parameter signature */ - "glGetBufferParameteriv\0" - "glGetBufferParameterivARB\0" - ""; -#endif - -#if defined(need_GL_SGIX_list_priority) -static const char ListParameteriSGIX_names[] = - "iii\0" /* Parameter signature */ - "glListParameteriSGIX\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiColor4fNormal3fVertex3fSUN_names[] = - "iffffffffff\0" /* Parameter signature */ - "glReplacementCodeuiColor4fNormal3fVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_SGIX_instruments) -static const char InstrumentsBufferSGIX_names[] = - "ip\0" /* Parameter signature */ - "glInstrumentsBufferSGIX\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4NivARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4NivARB\0" - ""; -#endif - -#if defined(need_GL_SUN_triangle_list) -static const char ReplacementCodeuivSUN_names[] = - "p\0" /* Parameter signature */ - "glReplacementCodeuivSUN\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos2iMESA_names[] = - "ii\0" /* Parameter signature */ - "glWindowPos2i\0" - "glWindowPos2iARB\0" - "glWindowPos2iMESA\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3fvEXT_names[] = - "p\0" /* Parameter signature */ - "glSecondaryColor3fv\0" - "glSecondaryColor3fvEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_texture_compression) -static const char CompressedTexSubImage1DARB_names[] = - "iiiiiip\0" /* Parameter signature */ - "glCompressedTexSubImage1D\0" - "glCompressedTexSubImage1DARB\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char TexCoord2fNormal3fVertex3fSUN_names[] = - "ffffffff\0" /* Parameter signature */ - "glTexCoord2fNormal3fVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char GetVertexAttribivNV_names[] = - "iip\0" /* Parameter signature */ - "glGetVertexAttribivNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char GetProgramStringARB_names[] = - "iip\0" /* Parameter signature */ - "glGetProgramStringARB\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char CompileShaderARB_names[] = - "i\0" /* Parameter signature */ - "glCompileShaderARB\0" - ""; -#endif - -#if defined(need_GL_NV_register_combiners) -static const char CombinerOutputNV_names[] = - "iiiiiiiiii\0" /* Parameter signature */ - "glCombinerOutputNV\0" - ""; -#endif - -#if defined(need_GL_SGIX_list_priority) -static const char ListParameterfvSGIX_names[] = - "iip\0" /* Parameter signature */ - "glListParameterfvSGIX\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Tangent3dvEXT_names[] = - "p\0" /* Parameter signature */ - "glTangent3dvEXT\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char GetVertexAttribfvNV_names[] = - "iip\0" /* Parameter signature */ - "glGetVertexAttribfvNV\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos3sMESA_names[] = - "iii\0" /* Parameter signature */ - "glWindowPos3s\0" - "glWindowPos3sARB\0" - "glWindowPos3sMESA\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib2svNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib2svNV\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttribs1fvNV_names[] = - "iip\0" /* Parameter signature */ - "glVertexAttribs1fvNV\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char TexCoord2fVertex3fvSUN_names[] = - "pp\0" /* Parameter signature */ - "glTexCoord2fVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_MESA_window_pos) -static const char WindowPos4sMESA_names[] = - "iiii\0" /* Parameter signature */ - "glWindowPos4sMESA\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4NuivARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4NuivARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char ClientActiveTextureARB_names[] = - "i\0" /* Parameter signature */ - "glClientActiveTexture\0" - "glClientActiveTextureARB\0" - ""; -#endif - -#if defined(need_GL_SGIX_pixel_texture) -static const char PixelTexGenSGIX_names[] = - "i\0" /* Parameter signature */ - "glPixelTexGenSGIX\0" - ""; -#endif - -#if defined(need_GL_SUN_triangle_list) -static const char ReplacementCodeusvSUN_names[] = - "p\0" /* Parameter signature */ - "glReplacementCodeusvSUN\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform4fARB_names[] = - "iffff\0" /* Parameter signature */ - "glUniform4fARB\0" - ""; -#endif - -#if defined(need_GL_IBM_multimode_draw_arrays) -static const char MultiModeDrawArraysIBM_names[] = - "pppii\0" /* Parameter signature */ - "glMultiModeDrawArraysIBM\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program) -static const char IsProgramNV_names[] = - "i\0" /* Parameter signature */ - "glIsProgramARB\0" - "glIsProgramNV\0" - ""; -#endif - -#if defined(need_GL_SUN_triangle_list) -static const char ReplacementCodePointerSUN_names[] = - "iip\0" /* Parameter signature */ - "glReplacementCodePointerSUN\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char ProgramEnvParameter4dARB_names[] = - "iidddd\0" /* Parameter signature */ - "glProgramEnvParameter4dARB\0" - ""; -#endif - -#if defined(need_GL_SGI_color_table) -static const char ColorTableParameterfv_names[] = - "iip\0" /* Parameter signature */ - "glColorTableParameterfv\0" - "glColorTableParameterfvSGI\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char FragmentLightModelfSGIX_names[] = - "if\0" /* Parameter signature */ - "glFragmentLightModelfSGIX\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Binormal3bvEXT_names[] = - "p\0" /* Parameter signature */ - "glBinormal3bvEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_vertex_weighting) -static const char VertexWeightfvEXT_names[] = - "p\0" /* Parameter signature */ - "glVertexWeightfvEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib1dARB_names[] = - "id\0" /* Parameter signature */ - "glVertexAttrib1dARB\0" - ""; -#endif - -#if defined(need_GL_HP_image_transform) -static const char ImageTransformParameterivHP_names[] = - "iip\0" /* Parameter signature */ - "glImageTransformParameterivHP\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query) -static const char DeleteQueriesARB_names[] = - "ip\0" /* Parameter signature */ - "glDeleteQueries\0" - "glDeleteQueriesARB\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char Color4ubVertex2fSUN_names[] = - "iiiiff\0" /* Parameter signature */ - "glColor4ubVertex2fSUN\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char FragmentColorMaterialSGIX_names[] = - "ii\0" /* Parameter signature */ - "glFragmentColorMaterialSGIX\0" - ""; -#endif - -#if defined(need_GL_ARB_matrix_palette) -static const char CurrentPaletteMatrixARB_names[] = - "i\0" /* Parameter signature */ - "glCurrentPaletteMatrixARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib4sNV_names[] = - "iiiii\0" /* Parameter signature */ - "glVertexAttrib4sNV\0" - ""; -#endif - -#if defined(need_GL_SGIS_multisample) || defined(need_GL_EXT_multisample) -static const char SamplePatternSGIS_names[] = - "i\0" /* Parameter signature */ - "glSamplePatternSGIS\0" - "glSamplePatternEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query) -static const char IsQueryARB_names[] = - "i\0" /* Parameter signature */ - "glIsQuery\0" - "glIsQueryARB\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiColor4ubVertex3fSUN_names[] = - "iiiiifff\0" /* Parameter signature */ - "glReplacementCodeuiColor4ubVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char LinkProgramARB_names[] = - "i\0" /* Parameter signature */ - "glLinkProgramARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib2fNV_names[] = - "iff\0" /* Parameter signature */ - "glVertexAttrib2fNV\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char ShaderSourceARB_names[] = - "iipp\0" /* Parameter signature */ - "glShaderSourceARB\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char FragmentMaterialiSGIX_names[] = - "iii\0" /* Parameter signature */ - "glFragmentMaterialiSGIX\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib3svARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib3svARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_texture_compression) -static const char CompressedTexSubImage3DARB_names[] = - "iiiiiiiiiip\0" /* Parameter signature */ - "glCompressedTexSubImage3D\0" - "glCompressedTexSubImage3DARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos2ivMESA_names[] = - "p\0" /* Parameter signature */ - "glWindowPos2iv\0" - "glWindowPos2ivARB\0" - "glWindowPos2ivMESA\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char IsFramebufferEXT_names[] = - "i\0" /* Parameter signature */ - "glIsFramebufferEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform4ivARB_names[] = - "iip\0" /* Parameter signature */ - "glUniform4ivARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char GetVertexAttribdvARB_names[] = - "iip\0" /* Parameter signature */ - "glGetVertexAttribdvARB\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Binormal3dEXT_names[] = - "ddd\0" /* Parameter signature */ - "glBinormal3dEXT\0" - ""; -#endif - -#if defined(need_GL_SGIX_sprite) -static const char SpriteParameteriSGIX_names[] = - "ii\0" /* Parameter signature */ - "glSpriteParameteriSGIX\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char RequestResidentProgramsNV_names[] = - "ip\0" /* Parameter signature */ - "glRequestResidentProgramsNV\0" - ""; -#endif - -#if defined(need_GL_SGIX_tag_sample_buffer) -static const char TagSampleBufferSGIX_names[] = - "\0" /* Parameter signature */ - "glTagSampleBufferSGIX\0" - ""; -#endif - -#if defined(need_GL_SUN_triangle_list) -static const char ReplacementCodeusSUN_names[] = - "i\0" /* Parameter signature */ - "glReplacementCodeusSUN\0" - ""; -#endif - -#if defined(need_GL_SGIX_list_priority) -static const char ListParameterivSGIX_names[] = - "iip\0" /* Parameter signature */ - "glListParameterivSGIX\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_multi_draw_arrays) -static const char MultiDrawElementsEXT_names[] = - "ipipi\0" /* Parameter signature */ - "glMultiDrawElements\0" - "glMultiDrawElementsEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform1ivARB_names[] = - "iip\0" /* Parameter signature */ - "glUniform1ivARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos2sMESA_names[] = - "ii\0" /* Parameter signature */ - "glWindowPos2s\0" - "glWindowPos2sARB\0" - "glWindowPos2sMESA\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_blend) -static const char WeightusvARB_names[] = - "ip\0" /* Parameter signature */ - "glWeightusvARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_fog_coord) -static const char FogCoordPointerEXT_names[] = - "iip\0" /* Parameter signature */ - "glFogCoordPointer\0" - "glFogCoordPointerEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_index_material) -static const char IndexMaterialEXT_names[] = - "ii\0" /* Parameter signature */ - "glIndexMaterialEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3ubvEXT_names[] = - "p\0" /* Parameter signature */ - "glSecondaryColor3ubv\0" - "glSecondaryColor3ubvEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4dvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4dvARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_shader) -static const char BindAttribLocationARB_names[] = - "iip\0" /* Parameter signature */ - "glBindAttribLocationARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord2dARB_names[] = - "idd\0" /* Parameter signature */ - "glMultiTexCoord2d\0" - "glMultiTexCoord2dARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char ExecuteProgramNV_names[] = - "iip\0" /* Parameter signature */ - "glExecuteProgramNV\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char LightEnviSGIX_names[] = - "ii\0" /* Parameter signature */ - "glLightEnviSGIX\0" - ""; -#endif - -#if defined(need_GL_SGI_color_table) -static const char GetColorTableParameterivSGI_names[] = - "iip\0" /* Parameter signature */ - "glGetColorTableParameterivSGI\0" - ""; -#endif - -#if defined(need_GL_SUN_triangle_list) -static const char ReplacementCodeuiSUN_names[] = - "i\0" /* Parameter signature */ - "glReplacementCodeuiSUN\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char FramebufferTexture2DEXT_names[] = - "iiiii\0" /* Parameter signature */ - "glFramebufferTexture2DEXT\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttribPointerNV_names[] = - "iiiip\0" /* Parameter signature */ - "glVertexAttribPointerNV\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char GetFramebufferAttachmentParameterivEXT_names[] = - "iiip\0" /* Parameter signature */ - "glGetFramebufferAttachmentParameterivEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord4dvARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord4dv\0" - "glMultiTexCoord4dvARB\0" - ""; -#endif - -#if defined(need_GL_EXT_pixel_transform) -static const char PixelTransformParameteriEXT_names[] = - "iii\0" /* Parameter signature */ - "glPixelTransformParameteriEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char ValidateProgramARB_names[] = - "i\0" /* Parameter signature */ - "glValidateProgramARB\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char TexCoord2fColor4ubVertex3fSUN_names[] = - "ffiiiifff\0" /* Parameter signature */ - "glTexCoord2fColor4ubVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform1iARB_names[] = - "ii\0" /* Parameter signature */ - "glUniform1iARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttribPointerARB_names[] = - "iiiiip\0" /* Parameter signature */ - "glVertexAttribPointerARB\0" - ""; -#endif - -#if defined(need_GL_SGIS_sharpen_texture) -static const char SharpenTexFuncSGIS_names[] = - "iip\0" /* Parameter signature */ - "glSharpenTexFuncSGIS\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord4fvARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord4fv\0" - "glMultiTexCoord4fvARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char TrackMatrixNV_names[] = - "iiii\0" /* Parameter signature */ - "glTrackMatrixNV\0" - ""; -#endif - -#if defined(need_GL_NV_register_combiners) -static const char CombinerParameteriNV_names[] = - "ii\0" /* Parameter signature */ - "glCombinerParameteriNV\0" - ""; -#endif - -#if defined(need_GL_SGIX_async) -static const char DeleteAsyncMarkersSGIX_names[] = - "ii\0" /* Parameter signature */ - "glDeleteAsyncMarkersSGIX\0" - ""; -#endif - -#if defined(need_GL_SGIX_async) -static const char IsAsyncMarkerSGIX_names[] = - "i\0" /* Parameter signature */ - "glIsAsyncMarkerSGIX\0" - ""; -#endif - -#if defined(need_GL_SGIX_framezoom) -static const char FrameZoomSGIX_names[] = - "i\0" /* Parameter signature */ - "glFrameZoomSGIX\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char Normal3fVertex3fvSUN_names[] = - "pp\0" /* Parameter signature */ - "glNormal3fVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4NsvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4NsvARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib3fvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib3fvARB\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char DeleteFramebuffersEXT_names[] = - "ip\0" /* Parameter signature */ - "glDeleteFramebuffersEXT\0" - ""; -#endif - -#if defined(need_GL_SUN_global_alpha) -static const char GlobalAlphaFactorsSUN_names[] = - "i\0" /* Parameter signature */ - "glGlobalAlphaFactorsSUN\0" - ""; -#endif - -#if defined(need_GL_EXT_texture3D) -static const char TexSubImage3D_names[] = - "iiiiiiiiiip\0" /* Parameter signature */ - "glTexSubImage3D\0" - "glTexSubImage3DEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Tangent3fEXT_names[] = - "fff\0" /* Parameter signature */ - "glTangent3fEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3uivEXT_names[] = - "p\0" /* Parameter signature */ - "glSecondaryColor3uiv\0" - "glSecondaryColor3uivEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_matrix_palette) -static const char MatrixIndexubvARB_names[] = - "ip\0" /* Parameter signature */ - "glMatrixIndexubvARB\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char Color4fNormal3fVertex3fSUN_names[] = - "ffffffffff\0" /* Parameter signature */ - "glColor4fNormal3fVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_SGIS_pixel_texture) -static const char PixelTexGenParameterfSGIS_names[] = - "if\0" /* Parameter signature */ - "glPixelTexGenParameterfSGIS\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char TexCoord2fColor4fNormal3fVertex3fvSUN_names[] = - "pppp\0" /* Parameter signature */ - "glTexCoord2fColor4fNormal3fVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char FragmentLightModelfvSGIX_names[] = - "ip\0" /* Parameter signature */ - "glFragmentLightModelfvSGIX\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord3fARB_names[] = - "ifff\0" /* Parameter signature */ - "glMultiTexCoord3f\0" - "glMultiTexCoord3fARB\0" - ""; -#endif - -#if defined(need_GL_SGIS_pixel_texture) -static const char GetPixelTexGenParameterfvSGIS_names[] = - "ip\0" /* Parameter signature */ - "glGetPixelTexGenParameterfvSGIS\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char GenFramebuffersEXT_names[] = - "ip\0" /* Parameter signature */ - "glGenFramebuffersEXT\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char GetProgramParameterdvNV_names[] = - "iiip\0" /* Parameter signature */ - "glGetProgramParameterdvNV\0" - ""; -#endif - -#if defined(need_GL_EXT_pixel_transform) -static const char PixelTransformParameterfEXT_names[] = - "iif\0" /* Parameter signature */ - "glPixelTransformParameterfEXT\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char FragmentLightfvSGIX_names[] = - "iip\0" /* Parameter signature */ - "glFragmentLightfvSGIX\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib3sNV_names[] = - "iiii\0" /* Parameter signature */ - "glVertexAttrib3sNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4NubARB_names[] = - "iiiii\0" /* Parameter signature */ - "glVertexAttrib4NubARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char GetProgramEnvParameterfvARB_names[] = - "iip\0" /* Parameter signature */ - "glGetProgramEnvParameterfvARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char GetTrackMatrixivNV_names[] = - "iiip\0" /* Parameter signature */ - "glGetTrackMatrixivNV\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib3svNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib3svNV\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform4fvARB_names[] = - "iip\0" /* Parameter signature */ - "glUniform4fvARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_transpose_matrix) -static const char MultTransposeMatrixfARB_names[] = - "p\0" /* Parameter signature */ - "glMultTransposeMatrixf\0" - "glMultTransposeMatrixfARB\0" - ""; -#endif - -#if defined(need_GL_ATI_fragment_shader) -static const char ColorFragmentOp1ATI_names[] = - "iiiiiii\0" /* Parameter signature */ - "glColorFragmentOp1ATI\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char GetUniformfvARB_names[] = - "iip\0" /* Parameter signature */ - "glGetUniformfvARB\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN_names[] = - "iffffffffffff\0" /* Parameter signature */ - "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char DetachObjectARB_names[] = - "ii\0" /* Parameter signature */ - "glDetachObjectARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_blend) -static const char VertexBlendARB_names[] = - "i\0" /* Parameter signature */ - "glVertexBlendARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos3iMESA_names[] = - "iii\0" /* Parameter signature */ - "glWindowPos3i\0" - "glWindowPos3iARB\0" - "glWindowPos3iMESA\0" - ""; -#endif - -#if defined(need_GL_EXT_convolution) -static const char SeparableFilter2D_names[] = - "iiiiiipp\0" /* Parameter signature */ - "glSeparableFilter2D\0" - "glSeparableFilter2DEXT\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiColor4ubVertex3fvSUN_names[] = - "ppp\0" /* Parameter signature */ - "glReplacementCodeuiColor4ubVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_texture_compression) -static const char CompressedTexImage2DARB_names[] = - "iiiiiiip\0" /* Parameter signature */ - "glCompressedTexImage2D\0" - "glCompressedTexImage2DARB\0" - ""; -#endif - -#if defined(need_GL_EXT_vertex_array) -static const char ArrayElement_names[] = - "i\0" /* Parameter signature */ - "glArrayElement\0" - "glArrayElementEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_depth_bounds_test) -static const char DepthBoundsEXT_names[] = - "dd\0" /* Parameter signature */ - "glDepthBoundsEXT\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char ProgramParameters4fvNV_names[] = - "iiip\0" /* Parameter signature */ - "glProgramParameters4fvNV\0" - ""; -#endif - -#if defined(need_GL_SGIX_polynomial_ffd) -static const char DeformationMap3fSGIX_names[] = - "iffiiffiiffiip\0" /* Parameter signature */ - "glDeformationMap3fSGIX\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char GetProgramivNV_names[] = - "iip\0" /* Parameter signature */ - "glGetProgramivNV\0" - ""; -#endif - -#if defined(need_GL_EXT_copy_texture) -static const char CopyTexImage1D_names[] = - "iiiiiii\0" /* Parameter signature */ - "glCopyTexImage1D\0" - "glCopyTexImage1DEXT\0" - ""; -#endif - -#if defined(need_GL_ATI_fragment_shader) -static const char AlphaFragmentOp3ATI_names[] = - "iiiiiiiiiiii\0" /* Parameter signature */ - "glAlphaFragmentOp3ATI\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char GetVertexAttribdvNV_names[] = - "iip\0" /* Parameter signature */ - "glGetVertexAttribdvNV\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib3fvNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib3fvNV\0" - ""; -#endif - -#if defined(need_GL_NV_register_combiners) -static const char GetFinalCombinerInputParameterivNV_names[] = - "iip\0" /* Parameter signature */ - "glGetFinalCombinerInputParameterivNV\0" - ""; -#endif - -#if defined(need_GL_NV_evaluators) -static const char GetMapParameterivNV_names[] = - "iip\0" /* Parameter signature */ - "glGetMapParameterivNV\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform4iARB_names[] = - "iiiii\0" /* Parameter signature */ - "glUniform4iARB\0" - ""; -#endif - -#if defined(need_GL_EXT_convolution) -static const char ConvolutionParameteri_names[] = - "iii\0" /* Parameter signature */ - "glConvolutionParameteri\0" - "glConvolutionParameteriEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Binormal3sEXT_names[] = - "iii\0" /* Parameter signature */ - "glBinormal3sEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_convolution) -static const char ConvolutionParameterf_names[] = - "iif\0" /* Parameter signature */ - "glConvolutionParameterf\0" - "glConvolutionParameterfEXT\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttribs2fvNV_names[] = - "iip\0" /* Parameter signature */ - "glVertexAttribs2fvNV\0" - ""; -#endif - -#if defined(need_GL_ARB_matrix_palette) -static const char MatrixIndexPointerARB_names[] = - "iiip\0" /* Parameter signature */ - "glMatrixIndexPointerARB\0" - ""; -#endif - -#if defined(need_GL_NV_evaluators) -static const char GetMapParameterfvNV_names[] = - "iip\0" /* Parameter signature */ - "glGetMapParameterfvNV\0" - ""; -#endif - -#if defined(need_GL_ATI_fragment_shader) -static const char PassTexCoordATI_names[] = - "iii\0" /* Parameter signature */ - "glPassTexCoordATI\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib1fvNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib1fvNV\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Tangent3ivEXT_names[] = - "p\0" /* Parameter signature */ - "glTangent3ivEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Tangent3dEXT_names[] = - "ddd\0" /* Parameter signature */ - "glTangent3dEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3dvEXT_names[] = - "p\0" /* Parameter signature */ - "glSecondaryColor3dv\0" - "glSecondaryColor3dvEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_multi_draw_arrays) -static const char MultiDrawArraysEXT_names[] = - "ippi\0" /* Parameter signature */ - "glMultiDrawArrays\0" - "glMultiDrawArraysEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char BindRenderbufferEXT_names[] = - "ii\0" /* Parameter signature */ - "glBindRenderbufferEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord4dARB_names[] = - "idddd\0" /* Parameter signature */ - "glMultiTexCoord4d\0" - "glMultiTexCoord4dARB\0" - ""; -#endif - -#if defined(need_GL_SGI_color_table) -static const char GetColorTableSGI_names[] = - "iiip\0" /* Parameter signature */ - "glGetColorTableSGI\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3usEXT_names[] = - "iii\0" /* Parameter signature */ - "glSecondaryColor3us\0" - "glSecondaryColor3usEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char ProgramLocalParameter4fvARB_names[] = - "iip\0" /* Parameter signature */ - "glProgramLocalParameter4fvARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program) -static const char DeleteProgramsNV_names[] = - "ip\0" /* Parameter signature */ - "glDeleteProgramsARB\0" - "glDeleteProgramsNV\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord1sARB_names[] = - "ii\0" /* Parameter signature */ - "glMultiTexCoord1s\0" - "glMultiTexCoord1sARB\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiColor3fVertex3fSUN_names[] = - "iffffff\0" /* Parameter signature */ - "glReplacementCodeuiColor3fVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program) -static const char GetVertexAttribPointervNV_names[] = - "iip\0" /* Parameter signature */ - "glGetVertexAttribPointervARB\0" - "glGetVertexAttribPointervNV\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord1dvARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord1dv\0" - "glMultiTexCoord1dvARB\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform2iARB_names[] = - "iii\0" /* Parameter signature */ - "glUniform2iARB\0" - ""; -#endif - -#if defined(need_GL_EXT_convolution) -static const char GetConvolutionParameterivEXT_names[] = - "iip\0" /* Parameter signature */ - "glGetConvolutionParameterivEXT\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char GetProgramStringNV_names[] = - "iip\0" /* Parameter signature */ - "glGetProgramStringNV\0" - ""; -#endif - -#if defined(need_GL_EXT_vertex_array) -static const char ColorPointerEXT_names[] = - "iiiip\0" /* Parameter signature */ - "glColorPointerEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object) -static const char MapBufferARB_names[] = - "ii\0" /* Parameter signature */ - "glMapBuffer\0" - "glMapBufferARB\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Binormal3svEXT_names[] = - "p\0" /* Parameter signature */ - "glBinormal3svEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_light_texture) -static const char ApplyTextureEXT_names[] = - "i\0" /* Parameter signature */ - "glApplyTextureEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_light_texture) -static const char TextureMaterialEXT_names[] = - "ii\0" /* Parameter signature */ - "glTextureMaterialEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_light_texture) -static const char TextureLightEXT_names[] = - "i\0" /* Parameter signature */ - "glTextureLightEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_histogram) -static const char ResetMinmax_names[] = - "i\0" /* Parameter signature */ - "glResetMinmax\0" - "glResetMinmaxEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_texture_object) -static const char GenTexturesEXT_names[] = - "ip\0" /* Parameter signature */ - "glGenTexturesEXT\0" - ""; -#endif - -#if defined(need_GL_SGIX_sprite) -static const char SpriteParameterfSGIX_names[] = - "if\0" /* Parameter signature */ - "glSpriteParameterfSGIX\0" - ""; -#endif - -#if defined(need_GL_EXT_histogram) -static const char GetMinmaxParameterivEXT_names[] = - "iip\0" /* Parameter signature */ - "glGetMinmaxParameterivEXT\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttribs4dvNV_names[] = - "iip\0" /* Parameter signature */ - "glVertexAttribs4dvNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4dARB_names[] = - "idddd\0" /* Parameter signature */ - "glVertexAttrib4dARB\0" - ""; -#endif - -#if defined(need_GL_NV_fragment_program) -static const char ProgramNamedParameter4dNV_names[] = - "iipdddd\0" /* Parameter signature */ - "glProgramNamedParameter4dNV\0" - ""; -#endif - -#if defined(need_GL_EXT_vertex_weighting) -static const char VertexWeightfEXT_names[] = - "f\0" /* Parameter signature */ - "glVertexWeightfEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_fog_coord) -static const char FogCoordfvEXT_names[] = - "p\0" /* Parameter signature */ - "glFogCoordfv\0" - "glFogCoordfvEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord1ivARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord1iv\0" - "glMultiTexCoord1ivARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3ubEXT_names[] = - "iii\0" /* Parameter signature */ - "glSecondaryColor3ub\0" - "glSecondaryColor3ubEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord2ivARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord2iv\0" - "glMultiTexCoord2ivARB\0" - ""; -#endif - -#if defined(need_GL_SGIS_fog_function) -static const char FogFuncSGIS_names[] = - "ip\0" /* Parameter signature */ - "glFogFuncSGIS\0" - ""; -#endif - -#if defined(need_GL_EXT_copy_texture) -static const char CopyTexSubImage2D_names[] = - "iiiiiiii\0" /* Parameter signature */ - "glCopyTexSubImage2D\0" - "glCopyTexSubImage2DEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char GetObjectParameterivARB_names[] = - "iip\0" /* Parameter signature */ - "glGetObjectParameterivARB\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char TexCoord4fVertex4fSUN_names[] = - "ffffffff\0" /* Parameter signature */ - "glTexCoord4fVertex4fSUN\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char GetProgramLocalParameterdvARB_names[] = - "iip\0" /* Parameter signature */ - "glGetProgramLocalParameterdvARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord1iARB_names[] = - "ii\0" /* Parameter signature */ - "glMultiTexCoord1i\0" - "glMultiTexCoord1iARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char GetProgramivARB_names[] = - "iip\0" /* Parameter signature */ - "glGetProgramivARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_blend_func_separate) || defined(need_GL_INGR_blend_func_separate) -static const char BlendFuncSeparateEXT_names[] = - "iiii\0" /* Parameter signature */ - "glBlendFuncSeparate\0" - "glBlendFuncSeparateEXT\0" - "glBlendFuncSeparateINGR\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char ProgramParameters4dvNV_names[] = - "iiip\0" /* Parameter signature */ - "glProgramParameters4dvNV\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char TexCoord2fColor3fVertex3fvSUN_names[] = - "ppp\0" /* Parameter signature */ - "glTexCoord2fColor3fVertex3fvSUN\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Binormal3dvEXT_names[] = - "p\0" /* Parameter signature */ - "glBinormal3dvEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_texture_object) -static const char AreTexturesResidentEXT_names[] = - "ipp\0" /* Parameter signature */ - "glAreTexturesResidentEXT\0" - ""; -#endif - -#if defined(need_GL_SGIS_fog_function) -static const char GetFogFuncSGIS_names[] = - "p\0" /* Parameter signature */ - "glGetFogFuncSGIS\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char GetUniformLocationARB_names[] = - "ip\0" /* Parameter signature */ - "glGetUniformLocationARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3fEXT_names[] = - "fff\0" /* Parameter signature */ - "glSecondaryColor3f\0" - "glSecondaryColor3fEXT\0" - ""; -#endif - -#if defined(need_GL_NV_register_combiners) -static const char CombinerInputNV_names[] = - "iiiiii\0" /* Parameter signature */ - "glCombinerInputNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib3sARB_names[] = - "iiii\0" /* Parameter signature */ - "glVertexAttrib3sARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char ProgramStringARB_names[] = - "iiip\0" /* Parameter signature */ - "glProgramStringARB\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char TexCoord4fVertex4fvSUN_names[] = - "pp\0" /* Parameter signature */ - "glTexCoord4fVertex4fvSUN\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib1fNV_names[] = - "if\0" /* Parameter signature */ - "glVertexAttrib1fNV\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char FragmentLightfSGIX_names[] = - "iif\0" /* Parameter signature */ - "glFragmentLightfSGIX\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_texture_compression) -static const char GetCompressedTexImageARB_names[] = - "iip\0" /* Parameter signature */ - "glGetCompressedTexImage\0" - "glGetCompressedTexImageARB\0" - ""; -#endif - -#if defined(need_GL_EXT_vertex_weighting) -static const char VertexWeightPointerEXT_names[] = - "iiip\0" /* Parameter signature */ - "glVertexWeightPointerEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_stencil_two_side) -static const char ActiveStencilFaceEXT_names[] = - "i\0" /* Parameter signature */ - "glActiveStencilFaceEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_paletted_texture) -static const char GetColorTableParameterfvEXT_names[] = - "iip\0" /* Parameter signature */ - "glGetColorTableParameterfvEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char GetShaderSourceARB_names[] = - "iipp\0" /* Parameter signature */ - "glGetShaderSourceARB\0" - ""; -#endif - -#if defined(need_GL_SGIX_igloo_interface) -static const char IglooInterfaceSGIX_names[] = - "ip\0" /* Parameter signature */ - "glIglooInterfaceSGIX\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib4dNV_names[] = - "idddd\0" /* Parameter signature */ - "glVertexAttrib4dNV\0" - ""; -#endif - -#if defined(need_GL_IBM_multimode_draw_arrays) -static const char MultiModeDrawElementsIBM_names[] = - "ppipii\0" /* Parameter signature */ - "glMultiModeDrawElementsIBM\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord4svARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord4sv\0" - "glMultiTexCoord4svARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query) -static const char GenQueriesARB_names[] = - "ip\0" /* Parameter signature */ - "glGenQueries\0" - "glGenQueriesARB\0" - ""; -#endif - -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiVertex3fSUN_names[] = - "ifff\0" /* Parameter signature */ - "glReplacementCodeuiVertex3fSUN\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Tangent3iEXT_names[] = - "iii\0" /* Parameter signature */ - "glTangent3iEXT\0" - ""; -#endif - -#if defined(need_GL_SUN_mesh_array) -static const char DrawMeshArraysSUN_names[] = - "iiii\0" /* Parameter signature */ - "glDrawMeshArraysSUN\0" - ""; -#endif - -#if defined(need_GL_NV_evaluators) -static const char GetMapControlPointsNV_names[] = - "iiiiiip\0" /* Parameter signature */ - "glGetMapControlPointsNV\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform1fARB_names[] = - "if\0" /* Parameter signature */ - "glUniform1fARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char ProgramLocalParameter4fARB_names[] = - "iiffff\0" /* Parameter signature */ - "glProgramLocalParameter4fARB\0" - ""; -#endif - -#if defined(need_GL_SGIX_sprite) -static const char SpriteParameterivSGIX_names[] = - "ip\0" /* Parameter signature */ - "glSpriteParameterivSGIX\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord1fARB_names[] = - "if\0" /* Parameter signature */ - "glMultiTexCoord1f\0" - "glMultiTexCoord1fARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttribs4ubvNV_names[] = - "iip\0" /* Parameter signature */ - "glVertexAttribs4ubvNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_blend) -static const char WeightsvARB_names[] = - "ip\0" /* Parameter signature */ - "glWeightsvARB\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform1fvARB_names[] = - "iip\0" /* Parameter signature */ - "glUniform1fvARB\0" - ""; -#endif - -#if defined(need_GL_EXT_copy_texture) -static const char CopyTexSubImage1D_names[] = - "iiiiii\0" /* Parameter signature */ - "glCopyTexSubImage1D\0" - "glCopyTexSubImage1DEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_texture_object) -static const char BindTexture_names[] = - "ii\0" /* Parameter signature */ - "glBindTexture\0" - "glBindTextureEXT\0" - ""; -#endif - -#if defined(need_GL_ATI_fragment_shader) -static const char BeginFragmentShaderATI_names[] = - "\0" /* Parameter signature */ - "glBeginFragmentShaderATI\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord4fARB_names[] = - "iffff\0" /* Parameter signature */ - "glMultiTexCoord4f\0" - "glMultiTexCoord4fARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttribs3svNV_names[] = - "iip\0" /* Parameter signature */ - "glVertexAttribs3svNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char EnableVertexAttribArrayARB_names[] = - "i\0" /* Parameter signature */ - "glEnableVertexAttribArrayARB\0" - ""; -#endif - -#if defined(need_GL_INTEL_parallel_arrays) -static const char NormalPointervINTEL_names[] = - "ip\0" /* Parameter signature */ - "glNormalPointervINTEL\0" - ""; -#endif - -#if defined(need_GL_EXT_convolution) -static const char CopyConvolutionFilter2D_names[] = - "iiiiii\0" /* Parameter signature */ - "glCopyConvolutionFilter2D\0" - "glCopyConvolutionFilter2DEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos3ivMESA_names[] = - "p\0" /* Parameter signature */ - "glWindowPos3iv\0" - "glWindowPos3ivARB\0" - "glWindowPos3ivMESA\0" - ""; -#endif - -#if defined(need_GL_NV_fence) -static const char FinishFenceNV_names[] = - "i\0" /* Parameter signature */ - "glFinishFenceNV\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object) -static const char IsBufferARB_names[] = - "i\0" /* Parameter signature */ - "glIsBuffer\0" - "glIsBufferARB\0" - ""; -#endif - -#if defined(need_GL_MESA_window_pos) -static const char WindowPos4iMESA_names[] = - "iiii\0" /* Parameter signature */ - "glWindowPos4iMESA\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4uivARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4uivARB\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Tangent3bvEXT_names[] = - "p\0" /* Parameter signature */ - "glTangent3bvEXT\0" - ""; -#endif - -#if defined(need_GL_SGIX_reference_plane) -static const char ReferencePlaneSGIX_names[] = - "p\0" /* Parameter signature */ - "glReferencePlaneSGIX\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Binormal3fvEXT_names[] = - "p\0" /* Parameter signature */ - "glBinormal3fvEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_texture_object) -static const char IsTextureEXT_names[] = - "i\0" /* Parameter signature */ - "glIsTextureEXT\0" - ""; -#endif - -#if defined(need_GL_INTEL_parallel_arrays) -static const char TexCoordPointervINTEL_names[] = - "iip\0" /* Parameter signature */ - "glTexCoordPointervINTEL\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object) -static const char DeleteBuffersARB_names[] = - "ip\0" /* Parameter signature */ - "glDeleteBuffers\0" - "glDeleteBuffersARB\0" - ""; -#endif - -#if defined(need_GL_MESA_window_pos) -static const char WindowPos4fvMESA_names[] = - "p\0" /* Parameter signature */ - "glWindowPos4fvMESA\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib1sNV_names[] = - "ii\0" /* Parameter signature */ - "glVertexAttrib1sNV\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color) -static const char SecondaryColor3svEXT_names[] = - "p\0" /* Parameter signature */ - "glSecondaryColor3sv\0" - "glSecondaryColor3svEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_transpose_matrix) -static const char LoadTransposeMatrixfARB_names[] = - "p\0" /* Parameter signature */ - "glLoadTransposeMatrixf\0" - "glLoadTransposeMatrixfARB\0" - ""; -#endif - -#if defined(need_GL_EXT_vertex_array) -static const char GetPointerv_names[] = - "ip\0" /* Parameter signature */ - "glGetPointerv\0" - "glGetPointervEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Tangent3bEXT_names[] = - "iii\0" /* Parameter signature */ - "glTangent3bEXT\0" - ""; -#endif - -#if defined(need_GL_NV_register_combiners) -static const char CombinerParameterfNV_names[] = - "if\0" /* Parameter signature */ - "glCombinerParameterfNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program) -static const char BindProgramNV_names[] = - "ii\0" /* Parameter signature */ - "glBindProgramARB\0" - "glBindProgramNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4svARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4svARB\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char Uniform3fARB_names[] = - "ifff\0" /* Parameter signature */ - "glUniform3fARB\0" - ""; -#endif - -#if defined(need_GL_ATI_fragment_shader) -static const char BindFragmentShaderATI_names[] = - "i\0" /* Parameter signature */ - "glBindFragmentShaderATI\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object) -static const char UnmapBufferARB_names[] = - "i\0" /* Parameter signature */ - "glUnmapBuffer\0" - "glUnmapBufferARB\0" - ""; -#endif - -#if defined(need_GL_EXT_histogram) -static const char Minmax_names[] = - "iii\0" /* Parameter signature */ - "glMinmax\0" - "glMinmaxEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_fog_coord) -static const char FogCoorddvEXT_names[] = - "p\0" /* Parameter signature */ - "glFogCoorddv\0" - "glFogCoorddvEXT\0" - ""; -#endif - -#if defined(need_GL_SUNX_constant_data) -static const char FinishTextureSUNX_names[] = - "\0" /* Parameter signature */ - "glFinishTextureSUNX\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char GetFragmentLightfvSGIX_names[] = - "iip\0" /* Parameter signature */ - "glGetFragmentLightfvSGIX\0" - ""; -#endif - -#if defined(need_GL_NV_register_combiners) -static const char GetFinalCombinerInputParameterfvNV_names[] = - "iip\0" /* Parameter signature */ - "glGetFinalCombinerInputParameterfvNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib2svARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib2svARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char AreProgramsResidentNV_names[] = - "ipp\0" /* Parameter signature */ - "glAreProgramsResidentNV\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos3svMESA_names[] = - "p\0" /* Parameter signature */ - "glWindowPos3sv\0" - "glWindowPos3svARB\0" - "glWindowPos3svMESA\0" - ""; -#endif - -#if defined(need_GL_EXT_color_subtable) -static const char CopyColorSubTable_names[] = - "iiiii\0" /* Parameter signature */ - "glCopyColorSubTable\0" - "glCopyColorSubTableEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_blend) -static const char WeightdvARB_names[] = - "ip\0" /* Parameter signature */ - "glWeightdvARB\0" - ""; -#endif - -#if defined(need_GL_SGIX_instruments) -static const char PollInstrumentsSGIX_names[] = - "p\0" /* Parameter signature */ - "glPollInstrumentsSGIX\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4NubvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4NubvARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib3dvNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib3dvNV\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char GetObjectParameterfvARB_names[] = - "iip\0" /* Parameter signature */ - "glGetObjectParameterfvARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char GetProgramEnvParameterdvARB_names[] = - "iip\0" /* Parameter signature */ - "glGetProgramEnvParameterdvARB\0" - ""; -#endif - -#if defined(need_GL_EXT_compiled_vertex_array) -static const char LockArraysEXT_names[] = - "ii\0" /* Parameter signature */ - "glLockArraysEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_pixel_transform) -static const char PixelTransformParameterivEXT_names[] = - "iip\0" /* Parameter signature */ - "glPixelTransformParameterivEXT\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char BinormalPointerEXT_names[] = - "iip\0" /* Parameter signature */ - "glBinormalPointerEXT\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib1dNV_names[] = - "id\0" /* Parameter signature */ - "glVertexAttrib1dNV\0" - ""; -#endif - -#if defined(need_GL_NV_register_combiners) -static const char GetCombinerInputParameterivNV_names[] = - "iiiip\0" /* Parameter signature */ - "glGetCombinerInputParameterivNV\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_3) -static const char MultiTexCoord2fvARB_names[] = - "ip\0" /* Parameter signature */ - "glMultiTexCoord2fv\0" - "glMultiTexCoord2fvARB\0" - ""; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const char GetRenderbufferParameterivEXT_names[] = - "iip\0" /* Parameter signature */ - "glGetRenderbufferParameterivEXT\0" - ""; -#endif - -#if defined(need_GL_NV_register_combiners) -static const char CombinerParameterivNV_names[] = - "ip\0" /* Parameter signature */ - "glCombinerParameterivNV\0" - ""; -#endif - -#if defined(need_GL_ATI_fragment_shader) -static const char GenFragmentShadersATI_names[] = - "i\0" /* Parameter signature */ - "glGenFragmentShadersATI\0" - ""; -#endif - -#if defined(need_GL_EXT_vertex_array) -static const char DrawArrays_names[] = - "iii\0" /* Parameter signature */ - "glDrawArrays\0" - "glDrawArraysEXT\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_blend) -static const char WeightuivARB_names[] = - "ip\0" /* Parameter signature */ - "glWeightuivARB\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib2sARB_names[] = - "iii\0" /* Parameter signature */ - "glVertexAttrib2sARB\0" - ""; -#endif - -#if defined(need_GL_SGIX_async) -static const char GenAsyncMarkersSGIX_names[] = - "i\0" /* Parameter signature */ - "glGenAsyncMarkersSGIX\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Tangent3svEXT_names[] = - "p\0" /* Parameter signature */ - "glTangent3svEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object) -static const char BindBufferARB_names[] = - "ii\0" /* Parameter signature */ - "glBindBuffer\0" - "glBindBufferARB\0" - ""; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const char GetInfoLogARB_names[] = - "iipp\0" /* Parameter signature */ - "glGetInfoLogARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttribs4svNV_names[] = - "iip\0" /* Parameter signature */ - "glVertexAttribs4svNV\0" - ""; -#endif - -#if defined(need_GL_IBM_vertex_array_lists) -static const char EdgeFlagPointerListIBM_names[] = - "ipi\0" /* Parameter signature */ - "glEdgeFlagPointerListIBM\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib1fvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib1fvARB\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object) -static const char GenBuffersARB_names[] = - "ip\0" /* Parameter signature */ - "glGenBuffers\0" - "glGenBuffersARB\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttribs1svNV_names[] = - "iip\0" /* Parameter signature */ - "glVertexAttribs1svNV\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Binormal3bEXT_names[] = - "iii\0" /* Parameter signature */ - "glBinormal3bEXT\0" - ""; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const char FragmentMaterialivSGIX_names[] = - "iip\0" /* Parameter signature */ - "glFragmentMaterialivSGIX\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_array_range) -static const char VertexArrayRangeNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexArrayRangeNV\0" - ""; -#endif - -#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program) -static const char GenProgramsNV_names[] = - "ip\0" /* Parameter signature */ - "glGenProgramsARB\0" - "glGenProgramsNV\0" - ""; -#endif - -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib4dvNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4dvNV\0" - ""; -#endif - -#if defined(need_GL_ATI_fragment_shader) -static const char EndFragmentShaderATI_names[] = - "\0" /* Parameter signature */ - "glEndFragmentShaderATI\0" - ""; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const char Binormal3iEXT_names[] = - "iii\0" /* Parameter signature */ - "glBinormal3iEXT\0" - ""; -#endif - -#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) -static const char WindowPos2fMESA_names[] = - "ff\0" /* Parameter signature */ - "glWindowPos2f\0" - "glWindowPos2fARB\0" - "glWindowPos2fMESA\0" - ""; -#endif - -#if defined(need_GL_3DFX_tbuffer) -static const struct dri_extension_function GL_3DFX_tbuffer_functions[] = { - { TbufferMask3DFX_names, TbufferMask3DFX_remap_index, 553 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ARB_draw_buffers) -static const struct dri_extension_function GL_ARB_draw_buffers_functions[] = { - { DrawBuffersARB_names, DrawBuffersARB_remap_index, 413 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ARB_matrix_palette) -static const struct dri_extension_function GL_ARB_matrix_palette_functions[] = { - { MatrixIndexusvARB_names, MatrixIndexusvARB_remap_index, -1 }, - { MatrixIndexuivARB_names, MatrixIndexuivARB_remap_index, -1 }, - { CurrentPaletteMatrixARB_names, CurrentPaletteMatrixARB_remap_index, -1 }, - { MatrixIndexubvARB_names, MatrixIndexubvARB_remap_index, -1 }, - { MatrixIndexPointerARB_names, MatrixIndexPointerARB_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ARB_multisample) -static const struct dri_extension_function GL_ARB_multisample_functions[] = { - { SampleCoverageARB_names, SampleCoverageARB_remap_index, 412 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ARB_occlusion_query) -static const struct dri_extension_function GL_ARB_occlusion_query_functions[] = { - { BeginQueryARB_names, BeginQueryARB_remap_index, 703 }, - { GetQueryivARB_names, GetQueryivARB_remap_index, 705 }, - { GetQueryObjectivARB_names, GetQueryObjectivARB_remap_index, 706 }, - { EndQueryARB_names, EndQueryARB_remap_index, 704 }, - { GetQueryObjectuivARB_names, GetQueryObjectuivARB_remap_index, 707 }, - { DeleteQueriesARB_names, DeleteQueriesARB_remap_index, 701 }, - { IsQueryARB_names, IsQueryARB_remap_index, 702 }, - { GenQueriesARB_names, GenQueriesARB_remap_index, 700 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ARB_point_parameters) -static const struct dri_extension_function GL_ARB_point_parameters_functions[] = { - { PointParameterfEXT_names, PointParameterfEXT_remap_index, 458 }, - { PointParameterfvEXT_names, PointParameterfvEXT_remap_index, 459 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ARB_shader_objects) -static const struct dri_extension_function GL_ARB_shader_objects_functions[] = { - { UniformMatrix3fvARB_names, UniformMatrix3fvARB_remap_index, 739 }, - { Uniform2fARB_names, Uniform2fARB_remap_index, 723 }, - { Uniform2ivARB_names, Uniform2ivARB_remap_index, 735 }, - { UniformMatrix4fvARB_names, UniformMatrix4fvARB_remap_index, 740 }, - { CreateProgramObjectARB_names, CreateProgramObjectARB_remap_index, 717 }, - { Uniform3iARB_names, Uniform3iARB_remap_index, 728 }, - { CreateShaderObjectARB_names, CreateShaderObjectARB_remap_index, 714 }, - { AttachObjectARB_names, AttachObjectARB_remap_index, 718 }, - { UniformMatrix2fvARB_names, UniformMatrix2fvARB_remap_index, 738 }, - { GetAttachedObjectsARB_names, GetAttachedObjectsARB_remap_index, 744 }, - { Uniform3fvARB_names, Uniform3fvARB_remap_index, 732 }, - { GetHandleARB_names, GetHandleARB_remap_index, 712 }, - { GetActiveUniformARB_names, GetActiveUniformARB_remap_index, 746 }, - { GetUniformivARB_names, GetUniformivARB_remap_index, 748 }, - { Uniform2fvARB_names, Uniform2fvARB_remap_index, 731 }, - { DeleteObjectARB_names, DeleteObjectARB_remap_index, 711 }, - { UseProgramObjectARB_names, UseProgramObjectARB_remap_index, 720 }, - { Uniform3ivARB_names, Uniform3ivARB_remap_index, 736 }, - { CompileShaderARB_names, CompileShaderARB_remap_index, 716 }, - { Uniform4fARB_names, Uniform4fARB_remap_index, 725 }, - { LinkProgramARB_names, LinkProgramARB_remap_index, 719 }, - { ShaderSourceARB_names, ShaderSourceARB_remap_index, 715 }, - { Uniform4ivARB_names, Uniform4ivARB_remap_index, 737 }, - { Uniform1ivARB_names, Uniform1ivARB_remap_index, 734 }, - { ValidateProgramARB_names, ValidateProgramARB_remap_index, 721 }, - { Uniform1iARB_names, Uniform1iARB_remap_index, 726 }, - { Uniform4fvARB_names, Uniform4fvARB_remap_index, 733 }, - { GetUniformfvARB_names, GetUniformfvARB_remap_index, 747 }, - { DetachObjectARB_names, DetachObjectARB_remap_index, 713 }, - { Uniform4iARB_names, Uniform4iARB_remap_index, 729 }, - { Uniform2iARB_names, Uniform2iARB_remap_index, 727 }, - { GetObjectParameterivARB_names, GetObjectParameterivARB_remap_index, 742 }, - { GetUniformLocationARB_names, GetUniformLocationARB_remap_index, 745 }, - { GetShaderSourceARB_names, GetShaderSourceARB_remap_index, 749 }, - { Uniform1fARB_names, Uniform1fARB_remap_index, 722 }, - { Uniform1fvARB_names, Uniform1fvARB_remap_index, 730 }, - { Uniform3fARB_names, Uniform3fARB_remap_index, 724 }, - { GetObjectParameterfvARB_names, GetObjectParameterfvARB_remap_index, 741 }, - { GetInfoLogARB_names, GetInfoLogARB_remap_index, 743 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ARB_texture_compression) -static const struct dri_extension_function GL_ARB_texture_compression_functions[] = { - { CompressedTexSubImage2DARB_names, CompressedTexSubImage2DARB_remap_index, 558 }, - { CompressedTexImage3DARB_names, CompressedTexImage3DARB_remap_index, 554 }, - { CompressedTexImage1DARB_names, CompressedTexImage1DARB_remap_index, 556 }, - { CompressedTexSubImage1DARB_names, CompressedTexSubImage1DARB_remap_index, 559 }, - { CompressedTexSubImage3DARB_names, CompressedTexSubImage3DARB_remap_index, 557 }, - { CompressedTexImage2DARB_names, CompressedTexImage2DARB_remap_index, 555 }, - { GetCompressedTexImageARB_names, GetCompressedTexImageARB_remap_index, 560 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ARB_transpose_matrix) -static const struct dri_extension_function GL_ARB_transpose_matrix_functions[] = { - { MultTransposeMatrixdARB_names, MultTransposeMatrixdARB_remap_index, 411 }, - { LoadTransposeMatrixdARB_names, LoadTransposeMatrixdARB_remap_index, 409 }, - { MultTransposeMatrixfARB_names, MultTransposeMatrixfARB_remap_index, 410 }, - { LoadTransposeMatrixfARB_names, LoadTransposeMatrixfARB_remap_index, 408 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ARB_vertex_blend) -static const struct dri_extension_function GL_ARB_vertex_blend_functions[] = { - { WeightubvARB_names, WeightubvARB_remap_index, -1 }, - { WeightivARB_names, WeightivARB_remap_index, -1 }, - { WeightPointerARB_names, WeightPointerARB_remap_index, -1 }, - { WeightfvARB_names, WeightfvARB_remap_index, -1 }, - { WeightbvARB_names, WeightbvARB_remap_index, -1 }, - { WeightusvARB_names, WeightusvARB_remap_index, -1 }, - { VertexBlendARB_names, VertexBlendARB_remap_index, -1 }, - { WeightsvARB_names, WeightsvARB_remap_index, -1 }, - { WeightdvARB_names, WeightdvARB_remap_index, -1 }, - { WeightuivARB_names, WeightuivARB_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ARB_vertex_buffer_object) -static const struct dri_extension_function GL_ARB_vertex_buffer_object_functions[] = { - { GetBufferSubDataARB_names, GetBufferSubDataARB_remap_index, 695 }, - { BufferSubDataARB_names, BufferSubDataARB_remap_index, 690 }, - { BufferDataARB_names, BufferDataARB_remap_index, 689 }, - { GetBufferPointervARB_names, GetBufferPointervARB_remap_index, 694 }, - { GetBufferParameterivARB_names, GetBufferParameterivARB_remap_index, 693 }, - { MapBufferARB_names, MapBufferARB_remap_index, 697 }, - { IsBufferARB_names, IsBufferARB_remap_index, 696 }, - { DeleteBuffersARB_names, DeleteBuffersARB_remap_index, 691 }, - { UnmapBufferARB_names, UnmapBufferARB_remap_index, 698 }, - { BindBufferARB_names, BindBufferARB_remap_index, 688 }, - { GenBuffersARB_names, GenBuffersARB_remap_index, 692 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ARB_vertex_program) -static const struct dri_extension_function GL_ARB_vertex_program_functions[] = { - { ProgramEnvParameter4dvARB_names, ProgramEnvParameter4dvARB_remap_index, 669 }, - { VertexAttrib2fARB_names, VertexAttrib2fARB_remap_index, 611 }, - { VertexAttrib3fARB_names, VertexAttrib3fARB_remap_index, 617 }, - { VertexAttrib1svARB_names, VertexAttrib1svARB_remap_index, 608 }, - { VertexAttrib4NusvARB_names, VertexAttrib4NusvARB_remap_index, 662 }, - { DisableVertexAttribArrayARB_names, DisableVertexAttribArrayARB_remap_index, 666 }, - { ProgramLocalParameter4dARB_names, ProgramLocalParameter4dARB_remap_index, 672 }, - { VertexAttrib1fARB_names, VertexAttrib1fARB_remap_index, 605 }, - { VertexAttrib4NbvARB_names, VertexAttrib4NbvARB_remap_index, 659 }, - { VertexAttrib1sARB_names, VertexAttrib1sARB_remap_index, 607 }, - { GetProgramLocalParameterfvARB_names, GetProgramLocalParameterfvARB_remap_index, 679 }, - { VertexAttrib3dvARB_names, VertexAttrib3dvARB_remap_index, 616 }, - { ProgramEnvParameter4fvARB_names, ProgramEnvParameter4fvARB_remap_index, 671 }, - { GetVertexAttribivARB_names, GetVertexAttribivARB_remap_index, 590 }, - { VertexAttrib4ivARB_names, VertexAttrib4ivARB_remap_index, 655 }, - { VertexAttrib4bvARB_names, VertexAttrib4bvARB_remap_index, 654 }, - { VertexAttrib3dARB_names, VertexAttrib3dARB_remap_index, 615 }, - { VertexAttrib4fARB_names, VertexAttrib4fARB_remap_index, 623 }, - { VertexAttrib4fvARB_names, VertexAttrib4fvARB_remap_index, 624 }, - { ProgramLocalParameter4dvARB_names, ProgramLocalParameter4dvARB_remap_index, 673 }, - { VertexAttrib4usvARB_names, VertexAttrib4usvARB_remap_index, 657 }, - { VertexAttrib2dARB_names, VertexAttrib2dARB_remap_index, 609 }, - { VertexAttrib1dvARB_names, VertexAttrib1dvARB_remap_index, 604 }, - { GetVertexAttribfvARB_names, GetVertexAttribfvARB_remap_index, 589 }, - { VertexAttrib4ubvARB_names, VertexAttrib4ubvARB_remap_index, 656 }, - { ProgramEnvParameter4fARB_names, ProgramEnvParameter4fARB_remap_index, 670 }, - { VertexAttrib4sARB_names, VertexAttrib4sARB_remap_index, 625 }, - { VertexAttrib2dvARB_names, VertexAttrib2dvARB_remap_index, 610 }, - { VertexAttrib2fvARB_names, VertexAttrib2fvARB_remap_index, 612 }, - { VertexAttrib4NivARB_names, VertexAttrib4NivARB_remap_index, 661 }, - { GetProgramStringARB_names, GetProgramStringARB_remap_index, 681 }, - { VertexAttrib4NuivARB_names, VertexAttrib4NuivARB_remap_index, 663 }, - { IsProgramNV_names, IsProgramNV_remap_index, 592 }, - { ProgramEnvParameter4dARB_names, ProgramEnvParameter4dARB_remap_index, 668 }, - { VertexAttrib1dARB_names, VertexAttrib1dARB_remap_index, 603 }, - { VertexAttrib3svARB_names, VertexAttrib3svARB_remap_index, 620 }, - { GetVertexAttribdvARB_names, GetVertexAttribdvARB_remap_index, 588 }, - { VertexAttrib4dvARB_names, VertexAttrib4dvARB_remap_index, 622 }, - { VertexAttribPointerARB_names, VertexAttribPointerARB_remap_index, 664 }, - { VertexAttrib4NsvARB_names, VertexAttrib4NsvARB_remap_index, 660 }, - { VertexAttrib3fvARB_names, VertexAttrib3fvARB_remap_index, 618 }, - { VertexAttrib4NubARB_names, VertexAttrib4NubARB_remap_index, 627 }, - { GetProgramEnvParameterfvARB_names, GetProgramEnvParameterfvARB_remap_index, 677 }, - { ProgramLocalParameter4fvARB_names, ProgramLocalParameter4fvARB_remap_index, 675 }, - { DeleteProgramsNV_names, DeleteProgramsNV_remap_index, 580 }, - { GetVertexAttribPointervNV_names, GetVertexAttribPointervNV_remap_index, 591 }, - { VertexAttrib4dARB_names, VertexAttrib4dARB_remap_index, 621 }, - { GetProgramLocalParameterdvARB_names, GetProgramLocalParameterdvARB_remap_index, 678 }, - { GetProgramivARB_names, GetProgramivARB_remap_index, 680 }, - { VertexAttrib3sARB_names, VertexAttrib3sARB_remap_index, 619 }, - { ProgramStringARB_names, ProgramStringARB_remap_index, 667 }, - { ProgramLocalParameter4fARB_names, ProgramLocalParameter4fARB_remap_index, 674 }, - { EnableVertexAttribArrayARB_names, EnableVertexAttribArrayARB_remap_index, 665 }, - { VertexAttrib4uivARB_names, VertexAttrib4uivARB_remap_index, 658 }, - { BindProgramNV_names, BindProgramNV_remap_index, 579 }, - { VertexAttrib4svARB_names, VertexAttrib4svARB_remap_index, 626 }, - { VertexAttrib2svARB_names, VertexAttrib2svARB_remap_index, 614 }, - { VertexAttrib4NubvARB_names, VertexAttrib4NubvARB_remap_index, 628 }, - { GetProgramEnvParameterdvARB_names, GetProgramEnvParameterdvARB_remap_index, 676 }, - { VertexAttrib2sARB_names, VertexAttrib2sARB_remap_index, 613 }, - { VertexAttrib1fvARB_names, VertexAttrib1fvARB_remap_index, 606 }, - { GenProgramsNV_names, GenProgramsNV_remap_index, 582 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ARB_vertex_shader) -static const struct dri_extension_function GL_ARB_vertex_shader_functions[] = { - { GetActiveAttribARB_names, GetActiveAttribARB_remap_index, 751 }, - { GetAttribLocationARB_names, GetAttribLocationARB_remap_index, 752 }, - { BindAttribLocationARB_names, BindAttribLocationARB_remap_index, 750 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ARB_window_pos) -static const struct dri_extension_function GL_ARB_window_pos_functions[] = { - { WindowPos3fMESA_names, WindowPos3fMESA_remap_index, 523 }, - { WindowPos2dvMESA_names, WindowPos2dvMESA_remap_index, 514 }, - { WindowPos2svMESA_names, WindowPos2svMESA_remap_index, 520 }, - { WindowPos3dMESA_names, WindowPos3dMESA_remap_index, 521 }, - { WindowPos2fvMESA_names, WindowPos2fvMESA_remap_index, 516 }, - { WindowPos2dMESA_names, WindowPos2dMESA_remap_index, 513 }, - { WindowPos3dvMESA_names, WindowPos3dvMESA_remap_index, 522 }, - { WindowPos3fvMESA_names, WindowPos3fvMESA_remap_index, 524 }, - { WindowPos2iMESA_names, WindowPos2iMESA_remap_index, 517 }, - { WindowPos3sMESA_names, WindowPos3sMESA_remap_index, 527 }, - { WindowPos2ivMESA_names, WindowPos2ivMESA_remap_index, 518 }, - { WindowPos2sMESA_names, WindowPos2sMESA_remap_index, 519 }, - { WindowPos3iMESA_names, WindowPos3iMESA_remap_index, 525 }, - { WindowPos3ivMESA_names, WindowPos3ivMESA_remap_index, 526 }, - { WindowPos3svMESA_names, WindowPos3svMESA_remap_index, 528 }, - { WindowPos2fMESA_names, WindowPos2fMESA_remap_index, 515 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ATI_blend_equation_separate) -static const struct dri_extension_function GL_ATI_blend_equation_separate_functions[] = { - { BlendEquationSeparateEXT_names, BlendEquationSeparateEXT_remap_index, 710 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ATI_draw_buffers) -static const struct dri_extension_function GL_ATI_draw_buffers_functions[] = { - { DrawBuffersARB_names, DrawBuffersARB_remap_index, 413 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_ATI_fragment_shader) -static const struct dri_extension_function GL_ATI_fragment_shader_functions[] = { - { ColorFragmentOp3ATI_names, ColorFragmentOp3ATI_remap_index, 791 }, - { ColorFragmentOp2ATI_names, ColorFragmentOp2ATI_remap_index, 790 }, - { DeleteFragmentShaderATI_names, DeleteFragmentShaderATI_remap_index, 784 }, - { SetFragmentShaderConstantATI_names, SetFragmentShaderConstantATI_remap_index, 795 }, - { SampleMapATI_names, SampleMapATI_remap_index, 788 }, - { AlphaFragmentOp2ATI_names, AlphaFragmentOp2ATI_remap_index, 793 }, - { AlphaFragmentOp1ATI_names, AlphaFragmentOp1ATI_remap_index, 792 }, - { ColorFragmentOp1ATI_names, ColorFragmentOp1ATI_remap_index, 789 }, - { AlphaFragmentOp3ATI_names, AlphaFragmentOp3ATI_remap_index, 794 }, - { PassTexCoordATI_names, PassTexCoordATI_remap_index, 787 }, - { BeginFragmentShaderATI_names, BeginFragmentShaderATI_remap_index, 785 }, - { BindFragmentShaderATI_names, BindFragmentShaderATI_remap_index, 783 }, - { GenFragmentShadersATI_names, GenFragmentShadersATI_remap_index, 782 }, - { EndFragmentShaderATI_names, EndFragmentShaderATI_remap_index, 786 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_blend_color) -static const struct dri_extension_function GL_EXT_blend_color_functions[] = { - { BlendColor_names, -1, 336 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_blend_equation_separate) -static const struct dri_extension_function GL_EXT_blend_equation_separate_functions[] = { - { BlendEquationSeparateEXT_names, BlendEquationSeparateEXT_remap_index, 710 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_blend_func_separate) -static const struct dri_extension_function GL_EXT_blend_func_separate_functions[] = { - { BlendFuncSeparateEXT_names, BlendFuncSeparateEXT_remap_index, 537 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_blend_minmax) -static const struct dri_extension_function GL_EXT_blend_minmax_functions[] = { - { BlendEquation_names, -1, 337 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_color_subtable) -static const struct dri_extension_function GL_EXT_color_subtable_functions[] = { - { ColorSubTable_names, -1, 346 }, - { CopyColorSubTable_names, -1, 347 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_compiled_vertex_array) -static const struct dri_extension_function GL_EXT_compiled_vertex_array_functions[] = { - { UnlockArraysEXT_names, UnlockArraysEXT_remap_index, 541 }, - { LockArraysEXT_names, LockArraysEXT_remap_index, 540 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_convolution) -static const struct dri_extension_function GL_EXT_convolution_functions[] = { - { ConvolutionFilter1D_names, -1, 348 }, - { CopyConvolutionFilter1D_names, -1, 354 }, - { ConvolutionFilter2D_names, -1, 349 }, - { ConvolutionParameteriv_names, -1, 353 }, - { ConvolutionParameterfv_names, -1, 351 }, - { GetSeparableFilterEXT_names, GetSeparableFilterEXT_remap_index, 426 }, - { GetConvolutionFilterEXT_names, GetConvolutionFilterEXT_remap_index, 423 }, - { GetConvolutionParameterfvEXT_names, GetConvolutionParameterfvEXT_remap_index, 424 }, - { SeparableFilter2D_names, -1, 360 }, - { ConvolutionParameteri_names, -1, 352 }, - { ConvolutionParameterf_names, -1, 350 }, - { GetConvolutionParameterivEXT_names, GetConvolutionParameterivEXT_remap_index, 425 }, - { CopyConvolutionFilter2D_names, -1, 355 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const struct dri_extension_function GL_EXT_coordinate_frame_functions[] = { - { Binormal3fEXT_names, Binormal3fEXT_remap_index, -1 }, - { TangentPointerEXT_names, TangentPointerEXT_remap_index, -1 }, - { Binormal3ivEXT_names, Binormal3ivEXT_remap_index, -1 }, - { Tangent3sEXT_names, Tangent3sEXT_remap_index, -1 }, - { Tangent3fvEXT_names, Tangent3fvEXT_remap_index, -1 }, - { Tangent3dvEXT_names, Tangent3dvEXT_remap_index, -1 }, - { Binormal3bvEXT_names, Binormal3bvEXT_remap_index, -1 }, - { Binormal3dEXT_names, Binormal3dEXT_remap_index, -1 }, - { Tangent3fEXT_names, Tangent3fEXT_remap_index, -1 }, - { Binormal3sEXT_names, Binormal3sEXT_remap_index, -1 }, - { Tangent3ivEXT_names, Tangent3ivEXT_remap_index, -1 }, - { Tangent3dEXT_names, Tangent3dEXT_remap_index, -1 }, - { Binormal3svEXT_names, Binormal3svEXT_remap_index, -1 }, - { Binormal3dvEXT_names, Binormal3dvEXT_remap_index, -1 }, - { Tangent3iEXT_names, Tangent3iEXT_remap_index, -1 }, - { Tangent3bvEXT_names, Tangent3bvEXT_remap_index, -1 }, - { Binormal3fvEXT_names, Binormal3fvEXT_remap_index, -1 }, - { Tangent3bEXT_names, Tangent3bEXT_remap_index, -1 }, - { BinormalPointerEXT_names, BinormalPointerEXT_remap_index, -1 }, - { Tangent3svEXT_names, Tangent3svEXT_remap_index, -1 }, - { Binormal3bEXT_names, Binormal3bEXT_remap_index, -1 }, - { Binormal3iEXT_names, Binormal3iEXT_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_copy_texture) -static const struct dri_extension_function GL_EXT_copy_texture_functions[] = { - { CopyTexSubImage3D_names, -1, 373 }, - { CopyTexImage2D_names, -1, 324 }, - { CopyTexImage1D_names, -1, 323 }, - { CopyTexSubImage2D_names, -1, 326 }, - { CopyTexSubImage1D_names, -1, 325 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_cull_vertex) -static const struct dri_extension_function GL_EXT_cull_vertex_functions[] = { - { CullParameterdvEXT_names, CullParameterdvEXT_remap_index, 542 }, - { CullParameterfvEXT_names, CullParameterfvEXT_remap_index, 543 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_depth_bounds_test) -static const struct dri_extension_function GL_EXT_depth_bounds_test_functions[] = { - { DepthBoundsEXT_names, DepthBoundsEXT_remap_index, 699 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_draw_range_elements) -static const struct dri_extension_function GL_EXT_draw_range_elements_functions[] = { - { DrawRangeElements_names, -1, 338 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_fog_coord) -static const struct dri_extension_function GL_EXT_fog_coord_functions[] = { - { FogCoorddEXT_names, FogCoorddEXT_remap_index, 547 }, - { FogCoordfEXT_names, FogCoordfEXT_remap_index, 545 }, - { FogCoordPointerEXT_names, FogCoordPointerEXT_remap_index, 549 }, - { FogCoordfvEXT_names, FogCoordfvEXT_remap_index, 546 }, - { FogCoorddvEXT_names, FogCoorddvEXT_remap_index, 548 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -static const struct dri_extension_function GL_EXT_framebuffer_object_functions[] = { - { GenerateMipmapEXT_names, GenerateMipmapEXT_remap_index, 812 }, - { IsRenderbufferEXT_names, IsRenderbufferEXT_remap_index, 796 }, - { RenderbufferStorageEXT_names, RenderbufferStorageEXT_remap_index, 800 }, - { CheckFramebufferStatusEXT_names, CheckFramebufferStatusEXT_remap_index, 806 }, - { DeleteRenderbuffersEXT_names, DeleteRenderbuffersEXT_remap_index, 798 }, - { FramebufferTexture3DEXT_names, FramebufferTexture3DEXT_remap_index, 809 }, - { FramebufferRenderbufferEXT_names, FramebufferRenderbufferEXT_remap_index, 810 }, - { FramebufferTexture1DEXT_names, FramebufferTexture1DEXT_remap_index, 807 }, - { BindFramebufferEXT_names, BindFramebufferEXT_remap_index, 803 }, - { GenRenderbuffersEXT_names, GenRenderbuffersEXT_remap_index, 799 }, - { IsFramebufferEXT_names, IsFramebufferEXT_remap_index, 802 }, - { FramebufferTexture2DEXT_names, FramebufferTexture2DEXT_remap_index, 808 }, - { GetFramebufferAttachmentParameterivEXT_names, GetFramebufferAttachmentParameterivEXT_remap_index, 811 }, - { DeleteFramebuffersEXT_names, DeleteFramebuffersEXT_remap_index, 804 }, - { GenFramebuffersEXT_names, GenFramebuffersEXT_remap_index, 805 }, - { BindRenderbufferEXT_names, BindRenderbufferEXT_remap_index, 797 }, - { GetRenderbufferParameterivEXT_names, GetRenderbufferParameterivEXT_remap_index, 801 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_histogram) -static const struct dri_extension_function GL_EXT_histogram_functions[] = { - { Histogram_names, -1, 367 }, - { GetHistogramParameterivEXT_names, GetHistogramParameterivEXT_remap_index, 419 }, - { ResetHistogram_names, -1, 369 }, - { GetMinmaxEXT_names, GetMinmaxEXT_remap_index, 420 }, - { GetHistogramParameterfvEXT_names, GetHistogramParameterfvEXT_remap_index, 418 }, - { GetHistogramEXT_names, GetHistogramEXT_remap_index, 417 }, - { GetMinmaxParameterfvEXT_names, GetMinmaxParameterfvEXT_remap_index, 421 }, - { ResetMinmax_names, -1, 370 }, - { GetMinmaxParameterivEXT_names, GetMinmaxParameterivEXT_remap_index, 422 }, - { Minmax_names, -1, 368 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_index_func) -static const struct dri_extension_function GL_EXT_index_func_functions[] = { - { IndexFuncEXT_names, IndexFuncEXT_remap_index, 539 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_index_material) -static const struct dri_extension_function GL_EXT_index_material_functions[] = { - { IndexMaterialEXT_names, IndexMaterialEXT_remap_index, 538 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_light_texture) -static const struct dri_extension_function GL_EXT_light_texture_functions[] = { - { ApplyTextureEXT_names, ApplyTextureEXT_remap_index, -1 }, - { TextureMaterialEXT_names, TextureMaterialEXT_remap_index, -1 }, - { TextureLightEXT_names, TextureLightEXT_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_multi_draw_arrays) -static const struct dri_extension_function GL_EXT_multi_draw_arrays_functions[] = { - { MultiDrawElementsEXT_names, MultiDrawElementsEXT_remap_index, 645 }, - { MultiDrawArraysEXT_names, MultiDrawArraysEXT_remap_index, 644 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_multisample) -static const struct dri_extension_function GL_EXT_multisample_functions[] = { - { SampleMaskSGIS_names, SampleMaskSGIS_remap_index, 446 }, - { SamplePatternSGIS_names, SamplePatternSGIS_remap_index, 447 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_paletted_texture) -static const struct dri_extension_function GL_EXT_paletted_texture_functions[] = { - { GetColorTableParameterivEXT_names, GetColorTableParameterivEXT_remap_index, 551 }, - { GetColorTableEXT_names, GetColorTableEXT_remap_index, 550 }, - { ColorTable_names, -1, 339 }, - { GetColorTableParameterfvEXT_names, GetColorTableParameterfvEXT_remap_index, 552 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_pixel_transform) -static const struct dri_extension_function GL_EXT_pixel_transform_functions[] = { - { PixelTransformParameterfvEXT_names, PixelTransformParameterfvEXT_remap_index, -1 }, - { PixelTransformParameteriEXT_names, PixelTransformParameteriEXT_remap_index, -1 }, - { PixelTransformParameterfEXT_names, PixelTransformParameterfEXT_remap_index, -1 }, - { PixelTransformParameterivEXT_names, PixelTransformParameterivEXT_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_point_parameters) -static const struct dri_extension_function GL_EXT_point_parameters_functions[] = { - { PointParameterfEXT_names, PointParameterfEXT_remap_index, 458 }, - { PointParameterfvEXT_names, PointParameterfvEXT_remap_index, 459 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_polygon_offset) -static const struct dri_extension_function GL_EXT_polygon_offset_functions[] = { - { PolygonOffsetEXT_names, PolygonOffsetEXT_remap_index, 414 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_secondary_color) -static const struct dri_extension_function GL_EXT_secondary_color_functions[] = { - { SecondaryColor3iEXT_names, SecondaryColor3iEXT_remap_index, 567 }, - { SecondaryColor3bEXT_names, SecondaryColor3bEXT_remap_index, 561 }, - { SecondaryColor3bvEXT_names, SecondaryColor3bvEXT_remap_index, 562 }, - { SecondaryColor3sEXT_names, SecondaryColor3sEXT_remap_index, 569 }, - { SecondaryColor3dEXT_names, SecondaryColor3dEXT_remap_index, 563 }, - { SecondaryColorPointerEXT_names, SecondaryColorPointerEXT_remap_index, 577 }, - { SecondaryColor3uiEXT_names, SecondaryColor3uiEXT_remap_index, 573 }, - { SecondaryColor3usvEXT_names, SecondaryColor3usvEXT_remap_index, 576 }, - { SecondaryColor3ivEXT_names, SecondaryColor3ivEXT_remap_index, 568 }, - { SecondaryColor3fvEXT_names, SecondaryColor3fvEXT_remap_index, 566 }, - { SecondaryColor3ubvEXT_names, SecondaryColor3ubvEXT_remap_index, 572 }, - { SecondaryColor3uivEXT_names, SecondaryColor3uivEXT_remap_index, 574 }, - { SecondaryColor3dvEXT_names, SecondaryColor3dvEXT_remap_index, 564 }, - { SecondaryColor3usEXT_names, SecondaryColor3usEXT_remap_index, 575 }, - { SecondaryColor3ubEXT_names, SecondaryColor3ubEXT_remap_index, 571 }, - { SecondaryColor3fEXT_names, SecondaryColor3fEXT_remap_index, 565 }, - { SecondaryColor3svEXT_names, SecondaryColor3svEXT_remap_index, 570 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_stencil_two_side) -static const struct dri_extension_function GL_EXT_stencil_two_side_functions[] = { - { ActiveStencilFaceEXT_names, ActiveStencilFaceEXT_remap_index, 646 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_subtexture) -static const struct dri_extension_function GL_EXT_subtexture_functions[] = { - { TexSubImage1D_names, -1, 332 }, - { TexSubImage2D_names, -1, 333 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_texture3D) -static const struct dri_extension_function GL_EXT_texture3D_functions[] = { - { TexImage3D_names, -1, 371 }, - { TexSubImage3D_names, -1, 372 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_texture_object) -static const struct dri_extension_function GL_EXT_texture_object_functions[] = { - { PrioritizeTextures_names, -1, 331 }, - { DeleteTextures_names, -1, 327 }, - { GenTexturesEXT_names, GenTexturesEXT_remap_index, 440 }, - { AreTexturesResidentEXT_names, AreTexturesResidentEXT_remap_index, 439 }, - { BindTexture_names, -1, 307 }, - { IsTextureEXT_names, IsTextureEXT_remap_index, 441 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_texture_perturb_normal) -static const struct dri_extension_function GL_EXT_texture_perturb_normal_functions[] = { - { TextureNormalEXT_names, TextureNormalEXT_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_vertex_array) -static const struct dri_extension_function GL_EXT_vertex_array_functions[] = { - { IndexPointerEXT_names, IndexPointerEXT_remap_index, 450 }, - { NormalPointerEXT_names, NormalPointerEXT_remap_index, 451 }, - { VertexPointerEXT_names, VertexPointerEXT_remap_index, 453 }, - { TexCoordPointerEXT_names, TexCoordPointerEXT_remap_index, 452 }, - { EdgeFlagPointerEXT_names, EdgeFlagPointerEXT_remap_index, 449 }, - { ArrayElement_names, -1, 306 }, - { ColorPointerEXT_names, ColorPointerEXT_remap_index, 448 }, - { GetPointerv_names, -1, 329 }, - { DrawArrays_names, -1, 310 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_EXT_vertex_weighting) -static const struct dri_extension_function GL_EXT_vertex_weighting_functions[] = { - { VertexWeightfvEXT_names, VertexWeightfvEXT_remap_index, 495 }, - { VertexWeightfEXT_names, VertexWeightfEXT_remap_index, 494 }, - { VertexWeightPointerEXT_names, VertexWeightPointerEXT_remap_index, 496 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_HP_image_transform) -static const struct dri_extension_function GL_HP_image_transform_functions[] = { - { GetImageTransformParameterfvHP_names, GetImageTransformParameterfvHP_remap_index, -1 }, - { ImageTransformParameterfHP_names, ImageTransformParameterfHP_remap_index, -1 }, - { ImageTransformParameterfvHP_names, ImageTransformParameterfvHP_remap_index, -1 }, - { ImageTransformParameteriHP_names, ImageTransformParameteriHP_remap_index, -1 }, - { GetImageTransformParameterivHP_names, GetImageTransformParameterivHP_remap_index, -1 }, - { ImageTransformParameterivHP_names, ImageTransformParameterivHP_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_IBM_multimode_draw_arrays) -static const struct dri_extension_function GL_IBM_multimode_draw_arrays_functions[] = { - { MultiModeDrawArraysIBM_names, MultiModeDrawArraysIBM_remap_index, 708 }, - { MultiModeDrawElementsIBM_names, MultiModeDrawElementsIBM_remap_index, 709 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_IBM_vertex_array_lists) -static const struct dri_extension_function GL_IBM_vertex_array_lists_functions[] = { - { SecondaryColorPointerListIBM_names, SecondaryColorPointerListIBM_remap_index, -1 }, - { NormalPointerListIBM_names, NormalPointerListIBM_remap_index, -1 }, - { FogCoordPointerListIBM_names, FogCoordPointerListIBM_remap_index, -1 }, - { VertexPointerListIBM_names, VertexPointerListIBM_remap_index, -1 }, - { ColorPointerListIBM_names, ColorPointerListIBM_remap_index, -1 }, - { TexCoordPointerListIBM_names, TexCoordPointerListIBM_remap_index, -1 }, - { IndexPointerListIBM_names, IndexPointerListIBM_remap_index, -1 }, - { EdgeFlagPointerListIBM_names, EdgeFlagPointerListIBM_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_INGR_blend_func_separate) -static const struct dri_extension_function GL_INGR_blend_func_separate_functions[] = { - { BlendFuncSeparateEXT_names, BlendFuncSeparateEXT_remap_index, 537 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_INTEL_parallel_arrays) -static const struct dri_extension_function GL_INTEL_parallel_arrays_functions[] = { - { VertexPointervINTEL_names, VertexPointervINTEL_remap_index, -1 }, - { ColorPointervINTEL_names, ColorPointervINTEL_remap_index, -1 }, - { NormalPointervINTEL_names, NormalPointervINTEL_remap_index, -1 }, - { TexCoordPointervINTEL_names, TexCoordPointervINTEL_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_MESA_resize_buffers) -static const struct dri_extension_function GL_MESA_resize_buffers_functions[] = { - { ResizeBuffersMESA_names, ResizeBuffersMESA_remap_index, 512 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_MESA_window_pos) -static const struct dri_extension_function GL_MESA_window_pos_functions[] = { - { WindowPos3fMESA_names, WindowPos3fMESA_remap_index, 523 }, - { WindowPos2dvMESA_names, WindowPos2dvMESA_remap_index, 514 }, - { WindowPos4svMESA_names, WindowPos4svMESA_remap_index, 536 }, - { WindowPos2svMESA_names, WindowPos2svMESA_remap_index, 520 }, - { WindowPos3dMESA_names, WindowPos3dMESA_remap_index, 521 }, - { WindowPos2fvMESA_names, WindowPos2fvMESA_remap_index, 516 }, - { WindowPos4dMESA_names, WindowPos4dMESA_remap_index, 529 }, - { WindowPos2dMESA_names, WindowPos2dMESA_remap_index, 513 }, - { WindowPos4ivMESA_names, WindowPos4ivMESA_remap_index, 534 }, - { WindowPos4fMESA_names, WindowPos4fMESA_remap_index, 531 }, - { WindowPos3dvMESA_names, WindowPos3dvMESA_remap_index, 522 }, - { WindowPos3fvMESA_names, WindowPos3fvMESA_remap_index, 524 }, - { WindowPos4dvMESA_names, WindowPos4dvMESA_remap_index, 530 }, - { WindowPos2iMESA_names, WindowPos2iMESA_remap_index, 517 }, - { WindowPos3sMESA_names, WindowPos3sMESA_remap_index, 527 }, - { WindowPos4sMESA_names, WindowPos4sMESA_remap_index, 535 }, - { WindowPos2ivMESA_names, WindowPos2ivMESA_remap_index, 518 }, - { WindowPos2sMESA_names, WindowPos2sMESA_remap_index, 519 }, - { WindowPos3iMESA_names, WindowPos3iMESA_remap_index, 525 }, - { WindowPos3ivMESA_names, WindowPos3ivMESA_remap_index, 526 }, - { WindowPos4iMESA_names, WindowPos4iMESA_remap_index, 533 }, - { WindowPos4fvMESA_names, WindowPos4fvMESA_remap_index, 532 }, - { WindowPos3svMESA_names, WindowPos3svMESA_remap_index, 528 }, - { WindowPos2fMESA_names, WindowPos2fMESA_remap_index, 515 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_NV_evaluators) -static const struct dri_extension_function GL_NV_evaluators_functions[] = { - { GetMapAttribParameterivNV_names, GetMapAttribParameterivNV_remap_index, -1 }, - { MapControlPointsNV_names, MapControlPointsNV_remap_index, -1 }, - { MapParameterfvNV_names, MapParameterfvNV_remap_index, -1 }, - { EvalMapsNV_names, EvalMapsNV_remap_index, -1 }, - { GetMapAttribParameterfvNV_names, GetMapAttribParameterfvNV_remap_index, -1 }, - { MapParameterivNV_names, MapParameterivNV_remap_index, -1 }, - { GetMapParameterivNV_names, GetMapParameterivNV_remap_index, -1 }, - { GetMapParameterfvNV_names, GetMapParameterfvNV_remap_index, -1 }, - { GetMapControlPointsNV_names, GetMapControlPointsNV_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_NV_fence) -static const struct dri_extension_function GL_NV_fence_functions[] = { - { GenFencesNV_names, GenFencesNV_remap_index, 648 }, - { TestFenceNV_names, TestFenceNV_remap_index, 650 }, - { IsFenceNV_names, IsFenceNV_remap_index, 649 }, - { DeleteFencesNV_names, DeleteFencesNV_remap_index, 647 }, - { SetFenceNV_names, SetFenceNV_remap_index, 653 }, - { GetFenceivNV_names, GetFenceivNV_remap_index, 651 }, - { FinishFenceNV_names, FinishFenceNV_remap_index, 652 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_NV_fragment_program) -static const struct dri_extension_function GL_NV_fragment_program_functions[] = { - { GetProgramNamedParameterdvNV_names, GetProgramNamedParameterdvNV_remap_index, 687 }, - { GetProgramNamedParameterfvNV_names, GetProgramNamedParameterfvNV_remap_index, 686 }, - { ProgramNamedParameter4fNV_names, ProgramNamedParameter4fNV_remap_index, 682 }, - { ProgramNamedParameter4fvNV_names, ProgramNamedParameter4fvNV_remap_index, 684 }, - { ProgramNamedParameter4dvNV_names, ProgramNamedParameter4dvNV_remap_index, 685 }, - { ProgramNamedParameter4dNV_names, ProgramNamedParameter4dNV_remap_index, 683 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_NV_point_sprite) -static const struct dri_extension_function GL_NV_point_sprite_functions[] = { - { PointParameteriNV_names, PointParameteriNV_remap_index, 642 }, - { PointParameterivNV_names, PointParameterivNV_remap_index, 643 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_NV_register_combiners) -static const struct dri_extension_function GL_NV_register_combiners_functions[] = { - { CombinerParameterfvNV_names, CombinerParameterfvNV_remap_index, 499 }, - { GetCombinerOutputParameterfvNV_names, GetCombinerOutputParameterfvNV_remap_index, 508 }, - { FinalCombinerInputNV_names, FinalCombinerInputNV_remap_index, 505 }, - { GetCombinerInputParameterfvNV_names, GetCombinerInputParameterfvNV_remap_index, 506 }, - { GetCombinerOutputParameterivNV_names, GetCombinerOutputParameterivNV_remap_index, 509 }, - { CombinerOutputNV_names, CombinerOutputNV_remap_index, 504 }, - { CombinerParameteriNV_names, CombinerParameteriNV_remap_index, 502 }, - { GetFinalCombinerInputParameterivNV_names, GetFinalCombinerInputParameterivNV_remap_index, 511 }, - { CombinerInputNV_names, CombinerInputNV_remap_index, 503 }, - { CombinerParameterfNV_names, CombinerParameterfNV_remap_index, 500 }, - { GetFinalCombinerInputParameterfvNV_names, GetFinalCombinerInputParameterfvNV_remap_index, 510 }, - { GetCombinerInputParameterivNV_names, GetCombinerInputParameterivNV_remap_index, 507 }, - { CombinerParameterivNV_names, CombinerParameterivNV_remap_index, 501 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_NV_register_combiners2) -static const struct dri_extension_function GL_NV_register_combiners2_functions[] = { - { CombinerStageParameterfvNV_names, CombinerStageParameterfvNV_remap_index, -1 }, - { GetCombinerStageParameterfvNV_names, GetCombinerStageParameterfvNV_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_NV_vertex_array_range) -static const struct dri_extension_function GL_NV_vertex_array_range_functions[] = { - { FlushVertexArrayRangeNV_names, FlushVertexArrayRangeNV_remap_index, 497 }, - { VertexArrayRangeNV_names, VertexArrayRangeNV_remap_index, 498 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_NV_vertex_program) -static const struct dri_extension_function GL_NV_vertex_program_functions[] = { - { ProgramParameter4fNV_names, ProgramParameter4fNV_remap_index, 596 }, - { VertexAttrib4ubvNV_names, VertexAttrib4ubvNV_remap_index, 781 }, - { VertexAttrib4svNV_names, VertexAttrib4svNV_remap_index, 779 }, - { VertexAttribs1dvNV_names, VertexAttribs1dvNV_remap_index, 629 }, - { ProgramParameter4dvNV_names, ProgramParameter4dvNV_remap_index, 595 }, - { VertexAttrib4fNV_names, VertexAttrib4fNV_remap_index, 776 }, - { VertexAttrib2dNV_names, VertexAttrib2dNV_remap_index, 762 }, - { VertexAttrib4ubNV_names, VertexAttrib4ubNV_remap_index, 780 }, - { VertexAttribs3dvNV_names, VertexAttribs3dvNV_remap_index, 635 }, - { VertexAttribs4fvNV_names, VertexAttribs4fvNV_remap_index, 639 }, - { VertexAttrib2sNV_names, VertexAttrib2sNV_remap_index, 766 }, - { VertexAttribs3fvNV_names, VertexAttribs3fvNV_remap_index, 636 }, - { ProgramParameter4dNV_names, ProgramParameter4dNV_remap_index, 594 }, - { LoadProgramNV_names, LoadProgramNV_remap_index, 593 }, - { VertexAttrib4fvNV_names, VertexAttrib4fvNV_remap_index, 777 }, - { VertexAttrib3fNV_names, VertexAttrib3fNV_remap_index, 770 }, - { VertexAttribs2dvNV_names, VertexAttribs2dvNV_remap_index, 632 }, - { GetProgramParameterfvNV_names, GetProgramParameterfvNV_remap_index, 584 }, - { VertexAttrib3dNV_names, VertexAttrib3dNV_remap_index, 768 }, - { VertexAttrib2fvNV_names, VertexAttrib2fvNV_remap_index, 765 }, - { VertexAttrib2dvNV_names, VertexAttrib2dvNV_remap_index, 763 }, - { VertexAttrib1dvNV_names, VertexAttrib1dvNV_remap_index, 757 }, - { ProgramParameter4fvNV_names, ProgramParameter4fvNV_remap_index, 597 }, - { VertexAttrib1svNV_names, VertexAttrib1svNV_remap_index, 761 }, - { VertexAttribs2svNV_names, VertexAttribs2svNV_remap_index, 634 }, - { GetVertexAttribivNV_names, GetVertexAttribivNV_remap_index, 755 }, - { GetVertexAttribfvNV_names, GetVertexAttribfvNV_remap_index, 754 }, - { VertexAttrib2svNV_names, VertexAttrib2svNV_remap_index, 767 }, - { VertexAttribs1fvNV_names, VertexAttribs1fvNV_remap_index, 630 }, - { IsProgramNV_names, IsProgramNV_remap_index, 592 }, - { VertexAttrib4sNV_names, VertexAttrib4sNV_remap_index, 778 }, - { VertexAttrib2fNV_names, VertexAttrib2fNV_remap_index, 764 }, - { RequestResidentProgramsNV_names, RequestResidentProgramsNV_remap_index, 600 }, - { ExecuteProgramNV_names, ExecuteProgramNV_remap_index, 581 }, - { VertexAttribPointerNV_names, VertexAttribPointerNV_remap_index, 602 }, - { TrackMatrixNV_names, TrackMatrixNV_remap_index, 601 }, - { GetProgramParameterdvNV_names, GetProgramParameterdvNV_remap_index, 583 }, - { VertexAttrib3sNV_names, VertexAttrib3sNV_remap_index, 772 }, - { GetTrackMatrixivNV_names, GetTrackMatrixivNV_remap_index, 587 }, - { VertexAttrib3svNV_names, VertexAttrib3svNV_remap_index, 773 }, - { ProgramParameters4fvNV_names, ProgramParameters4fvNV_remap_index, 599 }, - { GetProgramivNV_names, GetProgramivNV_remap_index, 585 }, - { GetVertexAttribdvNV_names, GetVertexAttribdvNV_remap_index, 753 }, - { VertexAttrib3fvNV_names, VertexAttrib3fvNV_remap_index, 771 }, - { VertexAttribs2fvNV_names, VertexAttribs2fvNV_remap_index, 633 }, - { VertexAttrib1fvNV_names, VertexAttrib1fvNV_remap_index, 759 }, - { DeleteProgramsNV_names, DeleteProgramsNV_remap_index, 580 }, - { GetVertexAttribPointervNV_names, GetVertexAttribPointervNV_remap_index, 591 }, - { GetProgramStringNV_names, GetProgramStringNV_remap_index, 586 }, - { VertexAttribs4dvNV_names, VertexAttribs4dvNV_remap_index, 638 }, - { ProgramParameters4dvNV_names, ProgramParameters4dvNV_remap_index, 598 }, - { VertexAttrib1fNV_names, VertexAttrib1fNV_remap_index, 758 }, - { VertexAttrib4dNV_names, VertexAttrib4dNV_remap_index, 774 }, - { VertexAttribs4ubvNV_names, VertexAttribs4ubvNV_remap_index, 641 }, - { VertexAttribs3svNV_names, VertexAttribs3svNV_remap_index, 637 }, - { VertexAttrib1sNV_names, VertexAttrib1sNV_remap_index, 760 }, - { BindProgramNV_names, BindProgramNV_remap_index, 579 }, - { AreProgramsResidentNV_names, AreProgramsResidentNV_remap_index, 578 }, - { VertexAttrib3dvNV_names, VertexAttrib3dvNV_remap_index, 769 }, - { VertexAttrib1dNV_names, VertexAttrib1dNV_remap_index, 756 }, - { VertexAttribs4svNV_names, VertexAttribs4svNV_remap_index, 640 }, - { VertexAttribs1svNV_names, VertexAttribs1svNV_remap_index, 631 }, - { GenProgramsNV_names, GenProgramsNV_remap_index, 582 }, - { VertexAttrib4dvNV_names, VertexAttrib4dvNV_remap_index, 775 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_PGI_misc_hints) -static const struct dri_extension_function GL_PGI_misc_hints_functions[] = { - { HintPGI_names, HintPGI_remap_index, 544 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIS_detail_texture) -static const struct dri_extension_function GL_SGIS_detail_texture_functions[] = { - { GetDetailTexFuncSGIS_names, GetDetailTexFuncSGIS_remap_index, 443 }, - { DetailTexFuncSGIS_names, DetailTexFuncSGIS_remap_index, 442 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIS_fog_function) -static const struct dri_extension_function GL_SGIS_fog_function_functions[] = { - { FogFuncSGIS_names, FogFuncSGIS_remap_index, -1 }, - { GetFogFuncSGIS_names, GetFogFuncSGIS_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIS_multisample) -static const struct dri_extension_function GL_SGIS_multisample_functions[] = { - { SampleMaskSGIS_names, SampleMaskSGIS_remap_index, 446 }, - { SamplePatternSGIS_names, SamplePatternSGIS_remap_index, 447 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIS_pixel_texture) -static const struct dri_extension_function GL_SGIS_pixel_texture_functions[] = { - { PixelTexGenParameterfvSGIS_names, PixelTexGenParameterfvSGIS_remap_index, 434 }, - { GetPixelTexGenParameterivSGIS_names, GetPixelTexGenParameterivSGIS_remap_index, 435 }, - { PixelTexGenParameteriSGIS_names, PixelTexGenParameteriSGIS_remap_index, 431 }, - { PixelTexGenParameterivSGIS_names, PixelTexGenParameterivSGIS_remap_index, 432 }, - { PixelTexGenParameterfSGIS_names, PixelTexGenParameterfSGIS_remap_index, 433 }, - { GetPixelTexGenParameterfvSGIS_names, GetPixelTexGenParameterfvSGIS_remap_index, 436 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIS_point_parameters) -static const struct dri_extension_function GL_SGIS_point_parameters_functions[] = { - { PointParameterfEXT_names, PointParameterfEXT_remap_index, 458 }, - { PointParameterfvEXT_names, PointParameterfvEXT_remap_index, 459 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIS_sharpen_texture) -static const struct dri_extension_function GL_SGIS_sharpen_texture_functions[] = { - { GetSharpenTexFuncSGIS_names, GetSharpenTexFuncSGIS_remap_index, 445 }, - { SharpenTexFuncSGIS_names, SharpenTexFuncSGIS_remap_index, 444 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIS_texture4D) -static const struct dri_extension_function GL_SGIS_texture4D_functions[] = { - { TexImage4DSGIS_names, TexImage4DSGIS_remap_index, 437 }, - { TexSubImage4DSGIS_names, TexSubImage4DSGIS_remap_index, 438 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIS_texture_color_mask) -static const struct dri_extension_function GL_SGIS_texture_color_mask_functions[] = { - { TextureColorMaskSGIS_names, TextureColorMaskSGIS_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIS_texture_filter4) -static const struct dri_extension_function GL_SGIS_texture_filter4_functions[] = { - { GetTexFilterFuncSGIS_names, GetTexFilterFuncSGIS_remap_index, 415 }, - { TexFilterFuncSGIS_names, TexFilterFuncSGIS_remap_index, 416 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIX_async) -static const struct dri_extension_function GL_SGIX_async_functions[] = { - { AsyncMarkerSGIX_names, AsyncMarkerSGIX_remap_index, -1 }, - { FinishAsyncSGIX_names, FinishAsyncSGIX_remap_index, -1 }, - { PollAsyncSGIX_names, PollAsyncSGIX_remap_index, -1 }, - { DeleteAsyncMarkersSGIX_names, DeleteAsyncMarkersSGIX_remap_index, -1 }, - { IsAsyncMarkerSGIX_names, IsAsyncMarkerSGIX_remap_index, -1 }, - { GenAsyncMarkersSGIX_names, GenAsyncMarkersSGIX_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIX_flush_raster) -static const struct dri_extension_function GL_SGIX_flush_raster_functions[] = { - { FlushRasterSGIX_names, FlushRasterSGIX_remap_index, 469 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const struct dri_extension_function GL_SGIX_fragment_lighting_functions[] = { - { FragmentMaterialfvSGIX_names, FragmentMaterialfvSGIX_remap_index, 486 }, - { FragmentLightModelivSGIX_names, FragmentLightModelivSGIX_remap_index, 484 }, - { FragmentLightiSGIX_names, FragmentLightiSGIX_remap_index, 479 }, - { GetFragmentMaterialfvSGIX_names, GetFragmentMaterialfvSGIX_remap_index, 491 }, - { FragmentMaterialfSGIX_names, FragmentMaterialfSGIX_remap_index, 485 }, - { GetFragmentLightivSGIX_names, GetFragmentLightivSGIX_remap_index, 490 }, - { FragmentLightModeliSGIX_names, FragmentLightModeliSGIX_remap_index, 483 }, - { FragmentLightivSGIX_names, FragmentLightivSGIX_remap_index, 480 }, - { GetFragmentMaterialivSGIX_names, GetFragmentMaterialivSGIX_remap_index, 492 }, - { FragmentLightModelfSGIX_names, FragmentLightModelfSGIX_remap_index, 481 }, - { FragmentColorMaterialSGIX_names, FragmentColorMaterialSGIX_remap_index, 476 }, - { FragmentMaterialiSGIX_names, FragmentMaterialiSGIX_remap_index, 487 }, - { LightEnviSGIX_names, LightEnviSGIX_remap_index, 493 }, - { FragmentLightModelfvSGIX_names, FragmentLightModelfvSGIX_remap_index, 482 }, - { FragmentLightfvSGIX_names, FragmentLightfvSGIX_remap_index, 478 }, - { FragmentLightfSGIX_names, FragmentLightfSGIX_remap_index, 477 }, - { GetFragmentLightfvSGIX_names, GetFragmentLightfvSGIX_remap_index, 489 }, - { FragmentMaterialivSGIX_names, FragmentMaterialivSGIX_remap_index, 488 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIX_framezoom) -static const struct dri_extension_function GL_SGIX_framezoom_functions[] = { - { FrameZoomSGIX_names, FrameZoomSGIX_remap_index, 466 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIX_igloo_interface) -static const struct dri_extension_function GL_SGIX_igloo_interface_functions[] = { - { IglooInterfaceSGIX_names, IglooInterfaceSGIX_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIX_instruments) -static const struct dri_extension_function GL_SGIX_instruments_functions[] = { - { ReadInstrumentsSGIX_names, ReadInstrumentsSGIX_remap_index, 463 }, - { GetInstrumentsSGIX_names, GetInstrumentsSGIX_remap_index, 460 }, - { StartInstrumentsSGIX_names, StartInstrumentsSGIX_remap_index, 464 }, - { StopInstrumentsSGIX_names, StopInstrumentsSGIX_remap_index, 465 }, - { InstrumentsBufferSGIX_names, InstrumentsBufferSGIX_remap_index, 461 }, - { PollInstrumentsSGIX_names, PollInstrumentsSGIX_remap_index, 462 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIX_list_priority) -static const struct dri_extension_function GL_SGIX_list_priority_functions[] = { - { ListParameterfSGIX_names, ListParameterfSGIX_remap_index, 472 }, - { GetListParameterivSGIX_names, GetListParameterivSGIX_remap_index, 471 }, - { GetListParameterfvSGIX_names, GetListParameterfvSGIX_remap_index, 470 }, - { ListParameteriSGIX_names, ListParameteriSGIX_remap_index, 474 }, - { ListParameterfvSGIX_names, ListParameterfvSGIX_remap_index, 473 }, - { ListParameterivSGIX_names, ListParameterivSGIX_remap_index, 475 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIX_pixel_texture) -static const struct dri_extension_function GL_SGIX_pixel_texture_functions[] = { - { PixelTexGenSGIX_names, PixelTexGenSGIX_remap_index, 430 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIX_polynomial_ffd) -static const struct dri_extension_function GL_SGIX_polynomial_ffd_functions[] = { - { LoadIdentityDeformationMapSGIX_names, LoadIdentityDeformationMapSGIX_remap_index, -1 }, - { DeformationMap3dSGIX_names, DeformationMap3dSGIX_remap_index, -1 }, - { DeformSGIX_names, DeformSGIX_remap_index, -1 }, - { DeformationMap3fSGIX_names, DeformationMap3fSGIX_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIX_reference_plane) -static const struct dri_extension_function GL_SGIX_reference_plane_functions[] = { - { ReferencePlaneSGIX_names, ReferencePlaneSGIX_remap_index, 468 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIX_sprite) -static const struct dri_extension_function GL_SGIX_sprite_functions[] = { - { SpriteParameterfvSGIX_names, SpriteParameterfvSGIX_remap_index, 455 }, - { SpriteParameteriSGIX_names, SpriteParameteriSGIX_remap_index, 456 }, - { SpriteParameterfSGIX_names, SpriteParameterfSGIX_remap_index, 454 }, - { SpriteParameterivSGIX_names, SpriteParameterivSGIX_remap_index, 457 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGIX_tag_sample_buffer) -static const struct dri_extension_function GL_SGIX_tag_sample_buffer_functions[] = { - { TagSampleBufferSGIX_names, TagSampleBufferSGIX_remap_index, 467 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SGI_color_table) -static const struct dri_extension_function GL_SGI_color_table_functions[] = { - { GetColorTableParameterfvSGI_names, GetColorTableParameterfvSGI_remap_index, 428 }, - { ColorTableParameteriv_names, -1, 341 }, - { ColorTable_names, -1, 339 }, - { CopyColorTable_names, -1, 342 }, - { ColorTableParameterfv_names, -1, 340 }, - { GetColorTableParameterivSGI_names, GetColorTableParameterivSGI_remap_index, 429 }, - { GetColorTableSGI_names, GetColorTableSGI_remap_index, 427 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SUNX_constant_data) -static const struct dri_extension_function GL_SUNX_constant_data_functions[] = { - { FinishTextureSUNX_names, FinishTextureSUNX_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SUN_global_alpha) -static const struct dri_extension_function GL_SUN_global_alpha_functions[] = { - { GlobalAlphaFactorubSUN_names, GlobalAlphaFactorubSUN_remap_index, -1 }, - { GlobalAlphaFactoriSUN_names, GlobalAlphaFactoriSUN_remap_index, -1 }, - { GlobalAlphaFactordSUN_names, GlobalAlphaFactordSUN_remap_index, -1 }, - { GlobalAlphaFactoruiSUN_names, GlobalAlphaFactoruiSUN_remap_index, -1 }, - { GlobalAlphaFactorbSUN_names, GlobalAlphaFactorbSUN_remap_index, -1 }, - { GlobalAlphaFactorfSUN_names, GlobalAlphaFactorfSUN_remap_index, -1 }, - { GlobalAlphaFactorusSUN_names, GlobalAlphaFactorusSUN_remap_index, -1 }, - { GlobalAlphaFactorsSUN_names, GlobalAlphaFactorsSUN_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SUN_mesh_array) -static const struct dri_extension_function GL_SUN_mesh_array_functions[] = { - { DrawMeshArraysSUN_names, DrawMeshArraysSUN_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SUN_triangle_list) -static const struct dri_extension_function GL_SUN_triangle_list_functions[] = { - { ReplacementCodeubSUN_names, ReplacementCodeubSUN_remap_index, -1 }, - { ReplacementCodeubvSUN_names, ReplacementCodeubvSUN_remap_index, -1 }, - { ReplacementCodeuivSUN_names, ReplacementCodeuivSUN_remap_index, -1 }, - { ReplacementCodeusvSUN_names, ReplacementCodeusvSUN_remap_index, -1 }, - { ReplacementCodePointerSUN_names, ReplacementCodePointerSUN_remap_index, -1 }, - { ReplacementCodeusSUN_names, ReplacementCodeusSUN_remap_index, -1 }, - { ReplacementCodeuiSUN_names, ReplacementCodeuiSUN_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_SUN_vertex) -static const struct dri_extension_function GL_SUN_vertex_functions[] = { - { ReplacementCodeuiColor3fVertex3fvSUN_names, ReplacementCodeuiColor3fVertex3fvSUN_remap_index, -1 }, - { TexCoord4fColor4fNormal3fVertex4fvSUN_names, TexCoord4fColor4fNormal3fVertex4fvSUN_remap_index, -1 }, - { TexCoord2fColor4ubVertex3fvSUN_names, TexCoord2fColor4ubVertex3fvSUN_remap_index, -1 }, - { ReplacementCodeuiVertex3fvSUN_names, ReplacementCodeuiVertex3fvSUN_remap_index, -1 }, - { ReplacementCodeuiTexCoord2fVertex3fvSUN_names, ReplacementCodeuiTexCoord2fVertex3fvSUN_remap_index, -1 }, - { ReplacementCodeuiNormal3fVertex3fSUN_names, ReplacementCodeuiNormal3fVertex3fSUN_remap_index, -1 }, - { Color4ubVertex3fvSUN_names, Color4ubVertex3fvSUN_remap_index, -1 }, - { Color4ubVertex3fSUN_names, Color4ubVertex3fSUN_remap_index, -1 }, - { TexCoord2fVertex3fSUN_names, TexCoord2fVertex3fSUN_remap_index, -1 }, - { TexCoord2fColor4fNormal3fVertex3fSUN_names, TexCoord2fColor4fNormal3fVertex3fSUN_remap_index, -1 }, - { TexCoord2fNormal3fVertex3fvSUN_names, TexCoord2fNormal3fVertex3fvSUN_remap_index, -1 }, - { ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN_names, ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN_remap_index, -1 }, - { ReplacementCodeuiTexCoord2fVertex3fSUN_names, ReplacementCodeuiTexCoord2fVertex3fSUN_remap_index, -1 }, - { Color3fVertex3fSUN_names, Color3fVertex3fSUN_remap_index, -1 }, - { ReplacementCodeuiNormal3fVertex3fvSUN_names, ReplacementCodeuiNormal3fVertex3fvSUN_remap_index, -1 }, - { Color3fVertex3fvSUN_names, Color3fVertex3fvSUN_remap_index, -1 }, - { Color4fNormal3fVertex3fvSUN_names, Color4fNormal3fVertex3fvSUN_remap_index, -1 }, - { ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN_names, ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN_remap_index, -1 }, - { ReplacementCodeuiColor4fNormal3fVertex3fvSUN_names, ReplacementCodeuiColor4fNormal3fVertex3fvSUN_remap_index, -1 }, - { ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN_names, ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN_remap_index, -1 }, - { TexCoord2fColor3fVertex3fSUN_names, TexCoord2fColor3fVertex3fSUN_remap_index, -1 }, - { TexCoord4fColor4fNormal3fVertex4fSUN_names, TexCoord4fColor4fNormal3fVertex4fSUN_remap_index, -1 }, - { Color4ubVertex2fvSUN_names, Color4ubVertex2fvSUN_remap_index, -1 }, - { Normal3fVertex3fSUN_names, Normal3fVertex3fSUN_remap_index, -1 }, - { ReplacementCodeuiColor4fNormal3fVertex3fSUN_names, ReplacementCodeuiColor4fNormal3fVertex3fSUN_remap_index, -1 }, - { TexCoord2fNormal3fVertex3fSUN_names, TexCoord2fNormal3fVertex3fSUN_remap_index, -1 }, - { TexCoord2fVertex3fvSUN_names, TexCoord2fVertex3fvSUN_remap_index, -1 }, - { Color4ubVertex2fSUN_names, Color4ubVertex2fSUN_remap_index, -1 }, - { ReplacementCodeuiColor4ubVertex3fSUN_names, ReplacementCodeuiColor4ubVertex3fSUN_remap_index, -1 }, - { TexCoord2fColor4ubVertex3fSUN_names, TexCoord2fColor4ubVertex3fSUN_remap_index, -1 }, - { Normal3fVertex3fvSUN_names, Normal3fVertex3fvSUN_remap_index, -1 }, - { Color4fNormal3fVertex3fSUN_names, Color4fNormal3fVertex3fSUN_remap_index, -1 }, - { TexCoord2fColor4fNormal3fVertex3fvSUN_names, TexCoord2fColor4fNormal3fVertex3fvSUN_remap_index, -1 }, - { ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN_names, ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN_remap_index, -1 }, - { ReplacementCodeuiColor4ubVertex3fvSUN_names, ReplacementCodeuiColor4ubVertex3fvSUN_remap_index, -1 }, - { ReplacementCodeuiColor3fVertex3fSUN_names, ReplacementCodeuiColor3fVertex3fSUN_remap_index, -1 }, - { TexCoord4fVertex4fSUN_names, TexCoord4fVertex4fSUN_remap_index, -1 }, - { TexCoord2fColor3fVertex3fvSUN_names, TexCoord2fColor3fVertex3fvSUN_remap_index, -1 }, - { TexCoord4fVertex4fvSUN_names, TexCoord4fVertex4fvSUN_remap_index, -1 }, - { ReplacementCodeuiVertex3fSUN_names, ReplacementCodeuiVertex3fSUN_remap_index, -1 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_VERSION_1_3) -static const struct dri_extension_function GL_VERSION_1_3_functions[] = { - { SampleCoverageARB_names, SampleCoverageARB_remap_index, 412 }, - { MultiTexCoord3sARB_names, -1, 398 }, - { ActiveTextureARB_names, -1, 374 }, - { CompressedTexSubImage2DARB_names, CompressedTexSubImage2DARB_remap_index, 558 }, - { CompressedTexImage3DARB_names, CompressedTexImage3DARB_remap_index, 554 }, - { MultiTexCoord1fvARB_names, -1, 379 }, - { MultTransposeMatrixdARB_names, MultTransposeMatrixdARB_remap_index, 411 }, - { CompressedTexImage1DARB_names, CompressedTexImage1DARB_remap_index, 556 }, - { MultiTexCoord3dARB_names, -1, 392 }, - { MultiTexCoord2iARB_names, -1, 388 }, - { MultiTexCoord2svARB_names, -1, 391 }, - { MultiTexCoord2fARB_names, -1, 386 }, - { LoadTransposeMatrixdARB_names, LoadTransposeMatrixdARB_remap_index, 409 }, - { MultiTexCoord3fvARB_names, -1, 395 }, - { MultiTexCoord4sARB_names, -1, 406 }, - { MultiTexCoord2dvARB_names, -1, 385 }, - { MultiTexCoord1svARB_names, -1, 383 }, - { MultiTexCoord3svARB_names, -1, 399 }, - { MultiTexCoord4iARB_names, -1, 404 }, - { MultiTexCoord3iARB_names, -1, 396 }, - { MultiTexCoord1dARB_names, -1, 376 }, - { MultiTexCoord3dvARB_names, -1, 393 }, - { MultiTexCoord3ivARB_names, -1, 397 }, - { MultiTexCoord2sARB_names, -1, 390 }, - { MultiTexCoord4ivARB_names, -1, 405 }, - { CompressedTexSubImage1DARB_names, CompressedTexSubImage1DARB_remap_index, 559 }, - { ClientActiveTextureARB_names, -1, 375 }, - { CompressedTexSubImage3DARB_names, CompressedTexSubImage3DARB_remap_index, 557 }, - { MultiTexCoord2dARB_names, -1, 384 }, - { MultiTexCoord4dvARB_names, -1, 401 }, - { MultiTexCoord4fvARB_names, -1, 403 }, - { MultiTexCoord3fARB_names, -1, 394 }, - { MultTransposeMatrixfARB_names, MultTransposeMatrixfARB_remap_index, 410 }, - { CompressedTexImage2DARB_names, CompressedTexImage2DARB_remap_index, 555 }, - { MultiTexCoord4dARB_names, -1, 400 }, - { MultiTexCoord1sARB_names, -1, 382 }, - { MultiTexCoord1dvARB_names, -1, 377 }, - { MultiTexCoord1ivARB_names, -1, 381 }, - { MultiTexCoord2ivARB_names, -1, 389 }, - { MultiTexCoord1iARB_names, -1, 380 }, - { GetCompressedTexImageARB_names, GetCompressedTexImageARB_remap_index, 560 }, - { MultiTexCoord4svARB_names, -1, 407 }, - { MultiTexCoord1fARB_names, -1, 378 }, - { MultiTexCoord4fARB_names, -1, 402 }, - { LoadTransposeMatrixfARB_names, LoadTransposeMatrixfARB_remap_index, 408 }, - { MultiTexCoord2fvARB_names, -1, 387 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_VERSION_1_4) -static const struct dri_extension_function GL_VERSION_1_4_functions[] = { - { PointParameteriNV_names, PointParameteriNV_remap_index, 642 }, - { SecondaryColor3iEXT_names, SecondaryColor3iEXT_remap_index, 567 }, - { WindowPos3fMESA_names, WindowPos3fMESA_remap_index, 523 }, - { WindowPos2dvMESA_names, WindowPos2dvMESA_remap_index, 514 }, - { SecondaryColor3bEXT_names, SecondaryColor3bEXT_remap_index, 561 }, - { PointParameterfEXT_names, PointParameterfEXT_remap_index, 458 }, - { FogCoorddEXT_names, FogCoorddEXT_remap_index, 547 }, - { FogCoordfEXT_names, FogCoordfEXT_remap_index, 545 }, - { WindowPos2svMESA_names, WindowPos2svMESA_remap_index, 520 }, - { WindowPos3dMESA_names, WindowPos3dMESA_remap_index, 521 }, - { PointParameterfvEXT_names, PointParameterfvEXT_remap_index, 459 }, - { WindowPos2fvMESA_names, WindowPos2fvMESA_remap_index, 516 }, - { SecondaryColor3bvEXT_names, SecondaryColor3bvEXT_remap_index, 562 }, - { SecondaryColor3sEXT_names, SecondaryColor3sEXT_remap_index, 569 }, - { SecondaryColor3dEXT_names, SecondaryColor3dEXT_remap_index, 563 }, - { WindowPos2dMESA_names, WindowPos2dMESA_remap_index, 513 }, - { SecondaryColorPointerEXT_names, SecondaryColorPointerEXT_remap_index, 577 }, - { SecondaryColor3uiEXT_names, SecondaryColor3uiEXT_remap_index, 573 }, - { SecondaryColor3usvEXT_names, SecondaryColor3usvEXT_remap_index, 576 }, - { WindowPos3dvMESA_names, WindowPos3dvMESA_remap_index, 522 }, - { PointParameterivNV_names, PointParameterivNV_remap_index, 643 }, - { WindowPos3fvMESA_names, WindowPos3fvMESA_remap_index, 524 }, - { SecondaryColor3ivEXT_names, SecondaryColor3ivEXT_remap_index, 568 }, - { WindowPos2iMESA_names, WindowPos2iMESA_remap_index, 517 }, - { SecondaryColor3fvEXT_names, SecondaryColor3fvEXT_remap_index, 566 }, - { WindowPos3sMESA_names, WindowPos3sMESA_remap_index, 527 }, - { WindowPos2ivMESA_names, WindowPos2ivMESA_remap_index, 518 }, - { MultiDrawElementsEXT_names, MultiDrawElementsEXT_remap_index, 645 }, - { WindowPos2sMESA_names, WindowPos2sMESA_remap_index, 519 }, - { FogCoordPointerEXT_names, FogCoordPointerEXT_remap_index, 549 }, - { SecondaryColor3ubvEXT_names, SecondaryColor3ubvEXT_remap_index, 572 }, - { SecondaryColor3uivEXT_names, SecondaryColor3uivEXT_remap_index, 574 }, - { WindowPos3iMESA_names, WindowPos3iMESA_remap_index, 525 }, - { SecondaryColor3dvEXT_names, SecondaryColor3dvEXT_remap_index, 564 }, - { MultiDrawArraysEXT_names, MultiDrawArraysEXT_remap_index, 644 }, - { SecondaryColor3usEXT_names, SecondaryColor3usEXT_remap_index, 575 }, - { FogCoordfvEXT_names, FogCoordfvEXT_remap_index, 546 }, - { SecondaryColor3ubEXT_names, SecondaryColor3ubEXT_remap_index, 571 }, - { BlendFuncSeparateEXT_names, BlendFuncSeparateEXT_remap_index, 537 }, - { SecondaryColor3fEXT_names, SecondaryColor3fEXT_remap_index, 565 }, - { WindowPos3ivMESA_names, WindowPos3ivMESA_remap_index, 526 }, - { SecondaryColor3svEXT_names, SecondaryColor3svEXT_remap_index, 570 }, - { FogCoorddvEXT_names, FogCoorddvEXT_remap_index, 548 }, - { WindowPos3svMESA_names, WindowPos3svMESA_remap_index, 528 }, - { WindowPos2fMESA_names, WindowPos2fMESA_remap_index, 515 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_VERSION_1_5) -static const struct dri_extension_function GL_VERSION_1_5_functions[] = { - { BeginQueryARB_names, BeginQueryARB_remap_index, 703 }, - { GetBufferSubDataARB_names, GetBufferSubDataARB_remap_index, 695 }, - { BufferSubDataARB_names, BufferSubDataARB_remap_index, 690 }, - { GetQueryivARB_names, GetQueryivARB_remap_index, 705 }, - { GetQueryObjectivARB_names, GetQueryObjectivARB_remap_index, 706 }, - { BufferDataARB_names, BufferDataARB_remap_index, 689 }, - { EndQueryARB_names, EndQueryARB_remap_index, 704 }, - { GetBufferPointervARB_names, GetBufferPointervARB_remap_index, 694 }, - { GetQueryObjectuivARB_names, GetQueryObjectuivARB_remap_index, 707 }, - { GetBufferParameterivARB_names, GetBufferParameterivARB_remap_index, 693 }, - { DeleteQueriesARB_names, DeleteQueriesARB_remap_index, 701 }, - { IsQueryARB_names, IsQueryARB_remap_index, 702 }, - { MapBufferARB_names, MapBufferARB_remap_index, 697 }, - { GenQueriesARB_names, GenQueriesARB_remap_index, 700 }, - { IsBufferARB_names, IsBufferARB_remap_index, 696 }, - { DeleteBuffersARB_names, DeleteBuffersARB_remap_index, 691 }, - { UnmapBufferARB_names, UnmapBufferARB_remap_index, 698 }, - { BindBufferARB_names, BindBufferARB_remap_index, 688 }, - { GenBuffersARB_names, GenBuffersARB_remap_index, 692 }, - { NULL, 0, 0 } -}; -#endif - -#if defined(need_GL_VERSION_2_0) -static const struct dri_extension_function GL_VERSION_2_0_functions[] = { - { StencilMaskSeparate_names, StencilMaskSeparate_remap_index, 815 }, - { StencilOpSeparate_names, StencilOpSeparate_remap_index, 814 }, - { StencilFuncSeparate_names, StencilFuncSeparate_remap_index, 813 }, - { NULL, 0, 0 } -}; -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/glcontextmodes.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/glcontextmodes.c deleted file mode 100644 index 5e9e352f2c..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/glcontextmodes.c +++ /dev/null @@ -1,496 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2003 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file glcontextmodes.c - * Utility routines for working with \c __GLcontextModes structures. At - * some point most or all of these functions will be moved to the Mesa - * code base. - * - * \author Ian Romanick - */ - -#if defined(IN_MINI_GLX) -# include -# include -# include -# include "GL/internal/dri_interface.h" -# include "imports.h" -# define __glXMemset memset -#else -# include -# include -# include "GL/glxint.h" - -# ifdef XFree86Server -# include "GL/glx_ansic.h" -extern void * __glXMalloc( size_t size ); -extern void __glXFree( void * ptr ); -# define _mesa_malloc(b) __glXMalloc(b) -# define _mesa_free(m) __glXFree(m) -# else -# include -# define __glXMemset memset -# define _mesa_malloc(b) Xmalloc(b) -# define _mesa_free(m) Xfree(m) -# endif /* XFree86Server */ -#endif /* !defined(IN_MINI_GLX) */ - -#include "glcontextmodes.h" - -#if !defined(IN_MINI_GLX) -#define NUM_VISUAL_TYPES 6 - -/** - * Convert an X visual type to a GLX visual type. - * - * \param visualType X visual type (i.e., \c TrueColor, \c StaticGray, etc.) - * to be converted. - * \return If \c visualType is a valid X visual type, a GLX visual type will - * be returned. Otherwise \c GLX_NONE will be returned. - */ -GLint -_gl_convert_from_x_visual_type( int visualType ) -{ - static const int glx_visual_types[ NUM_VISUAL_TYPES ] = { - GLX_STATIC_GRAY, GLX_GRAY_SCALE, - GLX_STATIC_COLOR, GLX_PSEUDO_COLOR, - GLX_TRUE_COLOR, GLX_DIRECT_COLOR - }; - - return ( (unsigned) visualType < NUM_VISUAL_TYPES ) - ? glx_visual_types[ visualType ] : GLX_NONE; -} - - -/** - * Convert a GLX visual type to an X visual type. - * - * \param visualType GLX visual type (i.e., \c GLX_TRUE_COLOR, - * \c GLX_STATIC_GRAY, etc.) to be converted. - * \return If \c visualType is a valid GLX visual type, an X visual type will - * be returned. Otherwise -1 will be returned. - */ -GLint -_gl_convert_to_x_visual_type( int visualType ) -{ - static const int x_visual_types[ NUM_VISUAL_TYPES ] = { - TrueColor, DirectColor, - PseudoColor, StaticColor, - GrayScale, StaticGray - }; - - return ( (unsigned) (visualType - GLX_TRUE_COLOR) <= NUM_VISUAL_TYPES ) - ? x_visual_types[ visualType - GLX_TRUE_COLOR ] : -1; -} - - -/** - * Copy a GLX visual config structure to a GL context mode structure. All - * of the fields in \c config are copied to \c mode. Additional fields in - * \c mode that can be derrived from the fields of \c config (i.e., - * \c haveDepthBuffer) are also filled in. The remaining fields in \c mode - * that cannot be derrived are set to default values. - * - * \param mode Destination GL context mode. - * \param config Source GLX visual config. - * - * \note - * The \c fbconfigID and \c visualID fields of the \c __GLcontextModes - * structure will be set to the \c vid of the \c __GLXvisualConfig structure. - */ -void -_gl_copy_visual_to_context_mode( __GLcontextModes * mode, - const __GLXvisualConfig * config ) -{ - __GLcontextModes * const next = mode->next; - - (void) __glXMemset( mode, 0, sizeof( __GLcontextModes ) ); - mode->next = next; - - mode->visualID = config->vid; - mode->visualType = _gl_convert_from_x_visual_type( config->class ); - mode->xRenderable = GL_TRUE; - mode->fbconfigID = config->vid; - mode->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT; - - mode->rgbMode = (config->rgba != 0); - mode->renderType = (mode->rgbMode) ? GLX_RGBA_BIT : GLX_COLOR_INDEX_BIT; - - mode->colorIndexMode = !(mode->rgbMode); - mode->doubleBufferMode = (config->doubleBuffer != 0); - mode->stereoMode = (config->stereo != 0); - - mode->haveAccumBuffer = ((config->accumRedSize + - config->accumGreenSize + - config->accumBlueSize + - config->accumAlphaSize) > 0); - mode->haveDepthBuffer = (config->depthSize > 0); - mode->haveStencilBuffer = (config->stencilSize > 0); - - mode->redBits = config->redSize; - mode->greenBits = config->greenSize; - mode->blueBits = config->blueSize; - mode->alphaBits = config->alphaSize; - mode->redMask = config->redMask; - mode->greenMask = config->greenMask; - mode->blueMask = config->blueMask; - mode->alphaMask = config->alphaMask; - mode->rgbBits = mode->rgbMode ? config->bufferSize : 0; - mode->indexBits = mode->colorIndexMode ? config->bufferSize : 0; - - mode->accumRedBits = config->accumRedSize; - mode->accumGreenBits = config->accumGreenSize; - mode->accumBlueBits = config->accumBlueSize; - mode->accumAlphaBits = config->accumAlphaSize; - mode->depthBits = config->depthSize; - mode->stencilBits = config->stencilSize; - - mode->numAuxBuffers = config->auxBuffers; - mode->level = config->level; - - mode->visualRating = config->visualRating; - mode->transparentPixel = config->transparentPixel; - mode->transparentRed = config->transparentRed; - mode->transparentGreen = config->transparentGreen; - mode->transparentBlue = config->transparentBlue; - mode->transparentAlpha = config->transparentAlpha; - mode->transparentIndex = config->transparentIndex; - - mode->swapMethod = GLX_SWAP_UNDEFINED_OML; -} - - -/** - * Get data from a GL context mode. - * - * \param mode GL context mode whose data is to be returned. - * \param attribute Attribute of \c mode that is to be returned. - * \param value_return Location to store the data member of \c mode. - * \return If \c attribute is a valid attribute of \c mode, zero is - * returned. Otherwise \c GLX_BAD_ATTRIBUTE is returned. - */ -int -_gl_get_context_mode_data(const __GLcontextModes *mode, int attribute, - int *value_return) -{ - switch (attribute) { - case GLX_USE_GL: - *value_return = GL_TRUE; - return 0; - case GLX_BUFFER_SIZE: - *value_return = mode->rgbBits; - return 0; - case GLX_RGBA: - *value_return = mode->rgbMode; - return 0; - case GLX_RED_SIZE: - *value_return = mode->redBits; - return 0; - case GLX_GREEN_SIZE: - *value_return = mode->greenBits; - return 0; - case GLX_BLUE_SIZE: - *value_return = mode->blueBits; - return 0; - case GLX_ALPHA_SIZE: - *value_return = mode->alphaBits; - return 0; - case GLX_DOUBLEBUFFER: - *value_return = mode->doubleBufferMode; - return 0; - case GLX_STEREO: - *value_return = mode->stereoMode; - return 0; - case GLX_AUX_BUFFERS: - *value_return = mode->numAuxBuffers; - return 0; - case GLX_DEPTH_SIZE: - *value_return = mode->depthBits; - return 0; - case GLX_STENCIL_SIZE: - *value_return = mode->stencilBits; - return 0; - case GLX_ACCUM_RED_SIZE: - *value_return = mode->accumRedBits; - return 0; - case GLX_ACCUM_GREEN_SIZE: - *value_return = mode->accumGreenBits; - return 0; - case GLX_ACCUM_BLUE_SIZE: - *value_return = mode->accumBlueBits; - return 0; - case GLX_ACCUM_ALPHA_SIZE: - *value_return = mode->accumAlphaBits; - return 0; - case GLX_LEVEL: - *value_return = mode->level; - return 0; - case GLX_TRANSPARENT_TYPE_EXT: - *value_return = mode->transparentPixel; - return 0; - case GLX_TRANSPARENT_RED_VALUE: - *value_return = mode->transparentRed; - return 0; - case GLX_TRANSPARENT_GREEN_VALUE: - *value_return = mode->transparentGreen; - return 0; - case GLX_TRANSPARENT_BLUE_VALUE: - *value_return = mode->transparentBlue; - return 0; - case GLX_TRANSPARENT_ALPHA_VALUE: - *value_return = mode->transparentAlpha; - return 0; - case GLX_TRANSPARENT_INDEX_VALUE: - *value_return = mode->transparentIndex; - return 0; - case GLX_X_VISUAL_TYPE: - *value_return = mode->visualType; - return 0; - case GLX_CONFIG_CAVEAT: - *value_return = mode->visualRating; - return 0; - case GLX_VISUAL_ID: - *value_return = mode->visualID; - return 0; - case GLX_DRAWABLE_TYPE: - *value_return = mode->drawableType; - return 0; - case GLX_RENDER_TYPE: - *value_return = mode->renderType; - return 0; - case GLX_X_RENDERABLE: - *value_return = mode->xRenderable; - return 0; - case GLX_FBCONFIG_ID: - *value_return = mode->fbconfigID; - return 0; - case GLX_MAX_PBUFFER_WIDTH: - *value_return = mode->maxPbufferWidth; - return 0; - case GLX_MAX_PBUFFER_HEIGHT: - *value_return = mode->maxPbufferHeight; - return 0; - case GLX_MAX_PBUFFER_PIXELS: - *value_return = mode->maxPbufferPixels; - return 0; - case GLX_OPTIMAL_PBUFFER_WIDTH_SGIX: - *value_return = mode->optimalPbufferWidth; - return 0; - case GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX: - *value_return = mode->optimalPbufferHeight; - return 0; - case GLX_SWAP_METHOD_OML: - *value_return = mode->swapMethod; - return 0; - case GLX_SAMPLE_BUFFERS_SGIS: - *value_return = mode->sampleBuffers; - return 0; - case GLX_SAMPLES_SGIS: - *value_return = mode->samples; - return 0; - - /* Applications are NOT allowed to query GLX_VISUAL_SELECT_GROUP_SGIX. - * It is ONLY for communication between the GLX client and the GLX - * server. - */ - case GLX_VISUAL_SELECT_GROUP_SGIX: - default: - return GLX_BAD_ATTRIBUTE; - } -} -#endif /* !defined(IN_MINI_GLX) */ - - -/** - * Allocate a linked list of \c __GLcontextModes structures. The fields of - * each structure will be initialized to "reasonable" default values. In - * most cases this is the default value defined by table 3.4 of the GLX - * 1.3 specification. This means that most values are either initialized to - * zero or \c GLX_DONT_CARE (which is -1). As support for additional - * extensions is added, the new values will be initialized to appropriate - * values from the extension specification. - * - * \param count Number of structures to allocate. - * \param minimum_size Minimum size of a structure to allocate. This allows - * for differences in the version of the - * \c __GLcontextModes stucture used in libGL and in a - * DRI-based driver. - * \returns A pointer to the first element in a linked list of \c count - * stuctures on success, or \c NULL on failure. - * - * \warning Use of \c minimum_size does \b not guarantee binary compatibility. - * The fundamental assumption is that if the \c minimum_size - * specified by the driver and the size of the \c __GLcontextModes - * structure in libGL is the same, then the meaning of each byte in - * the structure is the same in both places. \b Be \b careful! - * Basically this means that fields have to be added in libGL and - * then propagated to drivers. Drivers should \b never arbitrarilly - * extend the \c __GLcontextModes data-structure. - */ -__GLcontextModes * -_gl_context_modes_create( unsigned count, size_t minimum_size ) -{ - const size_t size = (minimum_size > sizeof( __GLcontextModes )) - ? minimum_size : sizeof( __GLcontextModes ); - __GLcontextModes * base = NULL; - __GLcontextModes ** next; - unsigned i; - - next = & base; - for ( i = 0 ; i < count ; i++ ) { - *next = (__GLcontextModes *) _mesa_malloc( size ); - if ( *next == NULL ) { - _gl_context_modes_destroy( base ); - base = NULL; - break; - } - - (void) __glXMemset( *next, 0, size ); - (*next)->visualID = GLX_DONT_CARE; - (*next)->visualType = GLX_DONT_CARE; - (*next)->visualRating = GLX_NONE; - (*next)->transparentPixel = GLX_NONE; - (*next)->transparentRed = GLX_DONT_CARE; - (*next)->transparentGreen = GLX_DONT_CARE; - (*next)->transparentBlue = GLX_DONT_CARE; - (*next)->transparentAlpha = GLX_DONT_CARE; - (*next)->transparentIndex = GLX_DONT_CARE; - (*next)->xRenderable = GLX_DONT_CARE; - (*next)->fbconfigID = GLX_DONT_CARE; - (*next)->swapMethod = GLX_SWAP_UNDEFINED_OML; - - next = & ((*next)->next); - } - - return base; -} - - -/** - * Destroy a linked list of \c __GLcontextModes structures created by - * \c _gl_context_modes_create. - * - * \param modes Linked list of structures to be destroyed. All structres - * in the list will be freed. - */ -void -_gl_context_modes_destroy( __GLcontextModes * modes ) -{ - while ( modes != NULL ) { - __GLcontextModes * const next = modes->next; - - _mesa_free( modes ); - modes = next; - } -} - - -/** - * Find a context mode matching a Visual ID. - * - * \param modes List list of context-mode structures to be searched. - * \param vid Visual ID to be found. - * \returns A pointer to a context-mode in \c modes if \c vid was found in - * the list, or \c NULL if it was not. - */ - -__GLcontextModes * -_gl_context_modes_find_visual( __GLcontextModes * modes, int vid ) -{ - while ( modes != NULL ) { - if ( modes->visualID == vid ) { - break; - } - - modes = modes->next; - } - - return modes; -} - - -/** - * Determine if two context-modes are the same. This is intended to be used - * by libGL implementations to compare to sets of driver generated FBconfigs. - * - * \param a Context-mode to be compared. - * \param b Context-mode to be compared. - * \returns \c GL_TRUE if the two context-modes are the same. \c GL_FALSE is - * returned otherwise. - */ -GLboolean -_gl_context_modes_are_same( const __GLcontextModes * a, - const __GLcontextModes * b ) -{ - return( (a->rgbMode == b->rgbMode) && - (a->floatMode == b->floatMode) && - (a->colorIndexMode == b->colorIndexMode) && - (a->doubleBufferMode == b->doubleBufferMode) && - (a->stereoMode == b->stereoMode) && - (a->redBits == b->redBits) && - (a->greenBits == b->greenBits) && - (a->blueBits == b->blueBits) && - (a->alphaBits == b->alphaBits) && -#if 0 /* For some reason these don't get set on the client-side in libGL. */ - (a->redMask == b->redMask) && - (a->greenMask == b->greenMask) && - (a->blueMask == b->blueMask) && - (a->alphaMask == b->alphaMask) && -#endif - (a->rgbBits == b->rgbBits) && - (a->indexBits == b->indexBits) && - (a->accumRedBits == b->accumRedBits) && - (a->accumGreenBits == b->accumGreenBits) && - (a->accumBlueBits == b->accumBlueBits) && - (a->accumAlphaBits == b->accumAlphaBits) && - (a->depthBits == b->depthBits) && - (a->stencilBits == b->stencilBits) && - (a->numAuxBuffers == b->numAuxBuffers) && - (a->level == b->level) && - (a->pixmapMode == b->pixmapMode) && - (a->visualRating == b->visualRating) && - - (a->transparentPixel == b->transparentPixel) && - - ((a->transparentPixel != GLX_TRANSPARENT_RGB) || - ((a->transparentRed == b->transparentRed) && - (a->transparentGreen == b->transparentGreen) && - (a->transparentBlue == b->transparentBlue) && - (a->transparentAlpha == b->transparentAlpha))) && - - ((a->transparentPixel != GLX_TRANSPARENT_INDEX) || - (a->transparentIndex == b->transparentIndex)) && - - (a->sampleBuffers == b->sampleBuffers) && - (a->samples == b->samples) && - ((a->drawableType & b->drawableType) != 0) && - (a->renderType == b->renderType) && - (a->maxPbufferWidth == b->maxPbufferWidth) && - (a->maxPbufferHeight == b->maxPbufferHeight) && - (a->maxPbufferPixels == b->maxPbufferPixels) && - (a->optimalPbufferWidth == b->optimalPbufferWidth) && - (a->optimalPbufferHeight == b->optimalPbufferHeight) && - (a->swapMethod == b->swapMethod) ); -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/glcontextmodes.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/glcontextmodes.h deleted file mode 100644 index 4b5c6f68b8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/glcontextmodes.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2003 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file glcontextmodes.h - * \author Ian Romanick - */ - -#ifndef GLCONTEXTMODES_H -#define GLCONTEXTMODES_H - -#include "GL/internal/glcore.h" - -#if !defined(IN_MINI_GLX) -extern GLint _gl_convert_from_x_visual_type( int visualType ); -extern GLint _gl_convert_to_x_visual_type( int visualType ); -extern void _gl_copy_visual_to_context_mode( __GLcontextModes * mode, - const __GLXvisualConfig * config ); -extern int _gl_get_context_mode_data( const __GLcontextModes *mode, - int attribute, int *value_return ); -#endif /* !defined(IN_MINI_GLX) */ - -extern __GLcontextModes * _gl_context_modes_create( unsigned count, - size_t minimum_size ); -extern void _gl_context_modes_destroy( __GLcontextModes * modes ); -extern __GLcontextModes * _gl_context_modes_find_visual( - __GLcontextModes * modes, int vid ); -extern GLboolean _gl_context_modes_are_same( const __GLcontextModes * a, - const __GLcontextModes * b ); - -#endif /* GLCONTEXTMODES_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/memops.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/memops.h deleted file mode 100644 index 4952d788e8..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/memops.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef DRIMEMSETIO_H -#define DRIMEMSETIO_H -/* -* memset an area in I/O space -* We need to be careful about this on some archs -*/ -static __inline__ void drimemsetio(void* address, int c, int size) -{ -#if defined(__powerpc__) || defined(__ia64__) - int i; - for(i=0;i - */ - - -#ifndef MMIO_H -#define MMIO_H - -#include "glheader.h" - -#if defined( __powerpc__ ) - -static __inline__ u_int32_t -read_MMIO_LE32( volatile void * base, unsigned long offset ) -{ - u_int32_t val; - - __asm__ __volatile__( "lwbrx %0, %1, %2 ; eieio" - : "=r" (val) - : "b" (base), "r" (offset) ); - return val; -} - -#else - -static __inline__ u_int32_t -read_MMIO_LE32( volatile void * base, unsigned long offset ) -{ - volatile u_int32_t * p = (volatile u_int32_t *) (((volatile char *) base) + offset); - return LE32_TO_CPU( p[0] ); -} - -#endif - -#endif /* MMIO_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/mmx.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/mmx.h deleted file mode 100644 index 49ce7e3e34..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/mmx.h +++ /dev/null @@ -1,560 +0,0 @@ -/* mmx.h - - MultiMedia eXtensions GCC interface library for IA32. - - To use this library, simply include this header file - and compile with GCC. You MUST have inlining enabled - in order for mmx_ok() to work; this can be done by - simply using -O on the GCC command line. - - Compiling with -DMMX_TRACE will cause detailed trace - output to be sent to stderr for each mmx operation. - This adds lots of code, and obviously slows execution to - a crawl, but can be very useful for debugging. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT - LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR ANY PARTICULAR PURPOSE. - - 1997-98 by H. Dietz and R. Fisher - - History: - 97-98* R.Fisher Early versions - 980501 R.Fisher Original Release - 980611* H.Dietz Rewrite, correctly implementing inlines, and - R.Fisher including direct register accesses. - 980616 R.Fisher Release of 980611 as 980616. - 980714 R.Fisher Minor corrections to Makefile, etc. - 980715 R.Fisher mmx_ok() now prevents optimizer from using - clobbered values. - mmx_ok() now checks if cpuid instruction is - available before trying to use it. - 980726* R.Fisher mm_support() searches for AMD 3DNow, Cyrix - Extended MMX, and standard MMX. It returns a - value which is positive if any of these are - supported, and can be masked with constants to - see which. mmx_ok() is now a call to this - 980726* R.Fisher Added i2r support for shift functions - 980919 R.Fisher Fixed AMD extended feature recognition bug. - 980921 R.Fisher Added definition/check for _MMX_H. - Added "float s[2]" to mmx_t for use with - 3DNow and EMMX. So same mmx_t can be used. - 981013 R.Fisher Fixed cpuid function 1 bug (looked at wrong reg) - Fixed psllq_i2r error in mmxtest.c - - * Unreleased (internal or interim) versions - - Notes: - It appears that the latest gas has the pand problem fixed, therefore - I'll undefine BROKEN_PAND by default. - String compares may be quicker than the multiple test/jumps in vendor - test sequence in mmx_ok(), but I'm not concerned with that right now. - - Acknowledgments: - Jussi Laako for pointing out the errors ultimately found to be - connected to the failure to notify the optimizer of clobbered values. - Roger Hardiman for reminding us that CPUID isn't everywhere, and that - someone may actually try to use this on a machine without CPUID. - Also for suggesting code for checking this. - Robert Dale for pointing out the AMD recognition bug. - Jimmy Mayfield and Carl Witty for pointing out the Intel recognition - bug. - Carl Witty for pointing out the psllq_i2r test bug. -*/ - -#ifndef _MMX_H -#define _MMX_H - -//#define MMX_TRACE - -/* Warning: at this writing, the version of GAS packaged - with most Linux distributions does not handle the - parallel AND operation mnemonic correctly. If the - symbol BROKEN_PAND is defined, a slower alternative - coding will be used. If execution of mmxtest results - in an illegal instruction fault, define this symbol. -*/ -#undef BROKEN_PAND - - -/* The type of an value that fits in an MMX register - (note that long long constant values MUST be suffixed - by LL and unsigned long long values by ULL, lest - they be truncated by the compiler) -*/ -typedef union { - long long q; /* Quadword (64-bit) value */ - unsigned long long uq; /* Unsigned Quadword */ - int d[2]; /* 2 Doubleword (32-bit) values */ - unsigned int ud[2]; /* 2 Unsigned Doubleword */ - short w[4]; /* 4 Word (16-bit) values */ - unsigned short uw[4]; /* 4 Unsigned Word */ - char b[8]; /* 8 Byte (8-bit) values */ - unsigned char ub[8]; /* 8 Unsigned Byte */ - float s[2]; /* Single-precision (32-bit) value */ -} mmx_t; - -/* Helper functions for the instruction macros that follow... - (note that memory-to-register, m2r, instructions are nearly - as efficient as register-to-register, r2r, instructions; - however, memory-to-memory instructions are really simulated - as a convenience, and are only 1/3 as efficient) -*/ -#ifdef MMX_TRACE - -/* Include the stuff for printing a trace to stderr... -*/ - -#include - -#define mmx_i2r(op, imm, reg) \ - { \ - mmx_t mmx_trace; \ - mmx_trace = (imm); \ - fprintf(stderr, #op "_i2r(" #imm "=0x%016llx, ", mmx_trace.q); \ - __asm__ __volatile__ ("movq %%" #reg ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #reg "=0x%016llx) => ", mmx_trace.q); \ - __asm__ __volatile__ (#op " %0, %%" #reg \ - : /* nothing */ \ - : "X" (imm)); \ - __asm__ __volatile__ ("movq %%" #reg ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #reg "=0x%016llx\n", mmx_trace.q); \ - } - -#define mmx_m2r(op, mem, reg) \ - { \ - mmx_t mmx_trace; \ - mmx_trace = (mem); \ - fprintf(stderr, #op "_m2r(" #mem "=0x%016llx, ", mmx_trace.q); \ - __asm__ __volatile__ ("movq %%" #reg ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #reg "=0x%016llx) => ", mmx_trace.q); \ - __asm__ __volatile__ (#op " %0, %%" #reg \ - : /* nothing */ \ - : "X" (mem)); \ - __asm__ __volatile__ ("movq %%" #reg ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #reg "=0x%016llx\n", mmx_trace.q); \ - } - -#define mmx_r2m(op, reg, mem) \ - { \ - mmx_t mmx_trace; \ - __asm__ __volatile__ ("movq %%" #reg ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #op "_r2m(" #reg "=0x%016llx, ", mmx_trace.q); \ - mmx_trace = (mem); \ - fprintf(stderr, #mem "=0x%016llx) => ", mmx_trace.q); \ - __asm__ __volatile__ (#op " %%" #reg ", %0" \ - : "=X" (mem) \ - : /* nothing */ ); \ - mmx_trace = (mem); \ - fprintf(stderr, #mem "=0x%016llx\n", mmx_trace.q); \ - } - -#define mmx_r2r(op, regs, regd) \ - { \ - mmx_t mmx_trace; \ - __asm__ __volatile__ ("movq %%" #regs ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #op "_r2r(" #regs "=0x%016llx, ", mmx_trace.q); \ - __asm__ __volatile__ ("movq %%" #regd ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #regd "=0x%016llx) => ", mmx_trace.q); \ - __asm__ __volatile__ (#op " %" #regs ", %" #regd); \ - __asm__ __volatile__ ("movq %%" #regd ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #regd "=0x%016llx\n", mmx_trace.q); \ - } - -#define mmx_m2m(op, mems, memd) \ - { \ - mmx_t mmx_trace; \ - mmx_trace = (mems); \ - fprintf(stderr, #op "_m2m(" #mems "=0x%016llx, ", mmx_trace.q); \ - mmx_trace = (memd); \ - fprintf(stderr, #memd "=0x%016llx) => ", mmx_trace.q); \ - __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ - #op " %1, %%mm0\n\t" \ - "movq %%mm0, %0" \ - : "=X" (memd) \ - : "X" (mems)); \ - mmx_trace = (memd); \ - fprintf(stderr, #memd "=0x%016llx\n", mmx_trace.q); \ - } - -#else - -/* These macros are a lot simpler without the tracing... -*/ - -#define mmx_i2r(op, imm, reg) \ - __asm__ __volatile__ (#op " $" #imm ", %%" #reg \ - : /* nothing */ \ - : /* nothing */); - -#define mmx_m2r(op, mem, reg) \ - __asm__ __volatile__ (#op " %0, %%" #reg \ - : /* nothing */ \ - : "X" (mem)) - -#define mmx_r2m(op, reg, mem) \ - __asm__ __volatile__ (#op " %%" #reg ", %0" \ - : "=X" (mem) \ - : /* nothing */ ) - -#define mmx_r2r(op, regs, regd) \ - __asm__ __volatile__ (#op " %" #regs ", %" #regd) - -#define mmx_m2m(op, mems, memd) \ - __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ - #op " %1, %%mm0\n\t" \ - "movq %%mm0, %0" \ - : "=X" (memd) \ - : "X" (mems)) - -#endif - - -/* 1x64 MOVe Quadword - (this is both a load and a store... - in fact, it is the only way to store) -*/ -#define movq_m2r(var, reg) mmx_m2r(movq, var, reg) -#define movq_r2m(reg, var) mmx_r2m(movq, reg, var) -#define movq_r2r(regs, regd) mmx_r2r(movq, regs, regd) -#define movq(vars, vard) \ - __asm__ __volatile__ ("movq %1, %%mm0\n\t" \ - "movq %%mm0, %0" \ - : "=X" (vard) \ - : "X" (vars)) - - -/* 1x32 MOVe Doubleword - (like movq, this is both load and store... - but is most useful for moving things between - mmx registers and ordinary registers) -*/ -#define movd_m2r(var, reg) mmx_m2r(movd, var, reg) -#define movd_r2m(reg, var) mmx_r2m(movd, reg, var) -#define movd_r2r(regs, regd) mmx_r2r(movd, regs, regd) -#define movd(vars, vard) \ - __asm__ __volatile__ ("movd %1, %%mm0\n\t" \ - "movd %%mm0, %0" \ - : "=X" (vard) \ - : "X" (vars)) - - -/* 2x32, 4x16, and 8x8 Parallel ADDs -*/ -#define paddd_m2r(var, reg) mmx_m2r(paddd, var, reg) -#define paddd_r2r(regs, regd) mmx_r2r(paddd, regs, regd) -#define paddd(vars, vard) mmx_m2m(paddd, vars, vard) - -#define paddw_m2r(var, reg) mmx_m2r(paddw, var, reg) -#define paddw_r2r(regs, regd) mmx_r2r(paddw, regs, regd) -#define paddw(vars, vard) mmx_m2m(paddw, vars, vard) - -#define paddb_m2r(var, reg) mmx_m2r(paddb, var, reg) -#define paddb_r2r(regs, regd) mmx_r2r(paddb, regs, regd) -#define paddb(vars, vard) mmx_m2m(paddb, vars, vard) - - -/* 4x16 and 8x8 Parallel ADDs using Saturation arithmetic -*/ -#define paddsw_m2r(var, reg) mmx_m2r(paddsw, var, reg) -#define paddsw_r2r(regs, regd) mmx_r2r(paddsw, regs, regd) -#define paddsw(vars, vard) mmx_m2m(paddsw, vars, vard) - -#define paddsb_m2r(var, reg) mmx_m2r(paddsb, var, reg) -#define paddsb_r2r(regs, regd) mmx_r2r(paddsb, regs, regd) -#define paddsb(vars, vard) mmx_m2m(paddsb, vars, vard) - - -/* 4x16 and 8x8 Parallel ADDs using Unsigned Saturation arithmetic -*/ -#define paddusw_m2r(var, reg) mmx_m2r(paddusw, var, reg) -#define paddusw_r2r(regs, regd) mmx_r2r(paddusw, regs, regd) -#define paddusw(vars, vard) mmx_m2m(paddusw, vars, vard) - -#define paddusb_m2r(var, reg) mmx_m2r(paddusb, var, reg) -#define paddusb_r2r(regs, regd) mmx_r2r(paddusb, regs, regd) -#define paddusb(vars, vard) mmx_m2m(paddusb, vars, vard) - - -/* 2x32, 4x16, and 8x8 Parallel SUBs -*/ -#define psubd_m2r(var, reg) mmx_m2r(psubd, var, reg) -#define psubd_r2r(regs, regd) mmx_r2r(psubd, regs, regd) -#define psubd(vars, vard) mmx_m2m(psubd, vars, vard) - -#define psubw_m2r(var, reg) mmx_m2r(psubw, var, reg) -#define psubw_r2r(regs, regd) mmx_r2r(psubw, regs, regd) -#define psubw(vars, vard) mmx_m2m(psubw, vars, vard) - -#define psubb_m2r(var, reg) mmx_m2r(psubb, var, reg) -#define psubb_r2r(regs, regd) mmx_r2r(psubb, regs, regd) -#define psubb(vars, vard) mmx_m2m(psubb, vars, vard) - - -/* 4x16 and 8x8 Parallel SUBs using Saturation arithmetic -*/ -#define psubsw_m2r(var, reg) mmx_m2r(psubsw, var, reg) -#define psubsw_r2r(regs, regd) mmx_r2r(psubsw, regs, regd) -#define psubsw(vars, vard) mmx_m2m(psubsw, vars, vard) - -#define psubsb_m2r(var, reg) mmx_m2r(psubsb, var, reg) -#define psubsb_r2r(regs, regd) mmx_r2r(psubsb, regs, regd) -#define psubsb(vars, vard) mmx_m2m(psubsb, vars, vard) - - -/* 4x16 and 8x8 Parallel SUBs using Unsigned Saturation arithmetic -*/ -#define psubusw_m2r(var, reg) mmx_m2r(psubusw, var, reg) -#define psubusw_r2r(regs, regd) mmx_r2r(psubusw, regs, regd) -#define psubusw(vars, vard) mmx_m2m(psubusw, vars, vard) - -#define psubusb_m2r(var, reg) mmx_m2r(psubusb, var, reg) -#define psubusb_r2r(regs, regd) mmx_r2r(psubusb, regs, regd) -#define psubusb(vars, vard) mmx_m2m(psubusb, vars, vard) - - -/* 4x16 Parallel MULs giving Low 4x16 portions of results -*/ -#define pmullw_m2r(var, reg) mmx_m2r(pmullw, var, reg) -#define pmullw_r2r(regs, regd) mmx_r2r(pmullw, regs, regd) -#define pmullw(vars, vard) mmx_m2m(pmullw, vars, vard) - - -/* 4x16 Parallel MULs giving High 4x16 portions of results -*/ -#define pmulhw_m2r(var, reg) mmx_m2r(pmulhw, var, reg) -#define pmulhw_r2r(regs, regd) mmx_r2r(pmulhw, regs, regd) -#define pmulhw(vars, vard) mmx_m2m(pmulhw, vars, vard) - - -/* 4x16->2x32 Parallel Mul-ADD - (muls like pmullw, then adds adjacent 16-bit fields - in the multiply result to make the final 2x32 result) -*/ -#define pmaddwd_m2r(var, reg) mmx_m2r(pmaddwd, var, reg) -#define pmaddwd_r2r(regs, regd) mmx_r2r(pmaddwd, regs, regd) -#define pmaddwd(vars, vard) mmx_m2m(pmaddwd, vars, vard) - - -/* 1x64 bitwise AND -*/ -#ifdef BROKEN_PAND -#define pand_m2r(var, reg) \ - { \ - mmx_m2r(pandn, (mmx_t) -1LL, reg); \ - mmx_m2r(pandn, var, reg); \ - } -#define pand_r2r(regs, regd) \ - { \ - mmx_m2r(pandn, (mmx_t) -1LL, regd); \ - mmx_r2r(pandn, regs, regd) \ - } -#define pand(vars, vard) \ - { \ - movq_m2r(vard, mm0); \ - mmx_m2r(pandn, (mmx_t) -1LL, mm0); \ - mmx_m2r(pandn, vars, mm0); \ - movq_r2m(mm0, vard); \ - } -#else -#define pand_m2r(var, reg) mmx_m2r(pand, var, reg) -#define pand_r2r(regs, regd) mmx_r2r(pand, regs, regd) -#define pand(vars, vard) mmx_m2m(pand, vars, vard) -#endif - - -/* 1x64 bitwise AND with Not the destination -*/ -#define pandn_m2r(var, reg) mmx_m2r(pandn, var, reg) -#define pandn_r2r(regs, regd) mmx_r2r(pandn, regs, regd) -#define pandn(vars, vard) mmx_m2m(pandn, vars, vard) - - -/* 1x64 bitwise OR -*/ -#define por_m2r(var, reg) mmx_m2r(por, var, reg) -#define por_r2r(regs, regd) mmx_r2r(por, regs, regd) -#define por(vars, vard) mmx_m2m(por, vars, vard) - - -/* 1x64 bitwise eXclusive OR -*/ -#define pxor_m2r(var, reg) mmx_m2r(pxor, var, reg) -#define pxor_r2r(regs, regd) mmx_r2r(pxor, regs, regd) -#define pxor(vars, vard) mmx_m2m(pxor, vars, vard) - - -/* 2x32, 4x16, and 8x8 Parallel CoMPare for EQuality - (resulting fields are either 0 or -1) -*/ -#define pcmpeqd_m2r(var, reg) mmx_m2r(pcmpeqd, var, reg) -#define pcmpeqd_r2r(regs, regd) mmx_r2r(pcmpeqd, regs, regd) -#define pcmpeqd(vars, vard) mmx_m2m(pcmpeqd, vars, vard) - -#define pcmpeqw_m2r(var, reg) mmx_m2r(pcmpeqw, var, reg) -#define pcmpeqw_r2r(regs, regd) mmx_r2r(pcmpeqw, regs, regd) -#define pcmpeqw(vars, vard) mmx_m2m(pcmpeqw, vars, vard) - -#define pcmpeqb_m2r(var, reg) mmx_m2r(pcmpeqb, var, reg) -#define pcmpeqb_r2r(regs, regd) mmx_r2r(pcmpeqb, regs, regd) -#define pcmpeqb(vars, vard) mmx_m2m(pcmpeqb, vars, vard) - - -/* 2x32, 4x16, and 8x8 Parallel CoMPare for Greater Than - (resulting fields are either 0 or -1) -*/ -#define pcmpgtd_m2r(var, reg) mmx_m2r(pcmpgtd, var, reg) -#define pcmpgtd_r2r(regs, regd) mmx_r2r(pcmpgtd, regs, regd) -#define pcmpgtd(vars, vard) mmx_m2m(pcmpgtd, vars, vard) - -#define pcmpgtw_m2r(var, reg) mmx_m2r(pcmpgtw, var, reg) -#define pcmpgtw_r2r(regs, regd) mmx_r2r(pcmpgtw, regs, regd) -#define pcmpgtw(vars, vard) mmx_m2m(pcmpgtw, vars, vard) - -#define pcmpgtb_m2r(var, reg) mmx_m2r(pcmpgtb, var, reg) -#define pcmpgtb_r2r(regs, regd) mmx_r2r(pcmpgtb, regs, regd) -#define pcmpgtb(vars, vard) mmx_m2m(pcmpgtb, vars, vard) - - -/* 1x64, 2x32, and 4x16 Parallel Shift Left Logical -*/ -#define psllq_i2r(imm, reg) mmx_i2r(psllq, imm, reg) -#define psllq_m2r(var, reg) mmx_m2r(psllq, var, reg) -#define psllq_r2r(regs, regd) mmx_r2r(psllq, regs, regd) -#define psllq(vars, vard) mmx_m2m(psllq, vars, vard) - -#define pslld_i2r(imm, reg) mmx_i2r(pslld, imm, reg) -#define pslld_m2r(var, reg) mmx_m2r(pslld, var, reg) -#define pslld_r2r(regs, regd) mmx_r2r(pslld, regs, regd) -#define pslld(vars, vard) mmx_m2m(pslld, vars, vard) - -#define psllw_i2r(imm, reg) mmx_i2r(psllw, imm, reg) -#define psllw_m2r(var, reg) mmx_m2r(psllw, var, reg) -#define psllw_r2r(regs, regd) mmx_r2r(psllw, regs, regd) -#define psllw(vars, vard) mmx_m2m(psllw, vars, vard) - - -/* 1x64, 2x32, and 4x16 Parallel Shift Right Logical -*/ -#define psrlq_i2r(imm, reg) mmx_i2r(psrlq, imm, reg) -#define psrlq_m2r(var, reg) mmx_m2r(psrlq, var, reg) -#define psrlq_r2r(regs, regd) mmx_r2r(psrlq, regs, regd) -#define psrlq(vars, vard) mmx_m2m(psrlq, vars, vard) - -#define psrld_i2r(imm, reg) mmx_i2r(psrld, imm, reg) -#define psrld_m2r(var, reg) mmx_m2r(psrld, var, reg) -#define psrld_r2r(regs, regd) mmx_r2r(psrld, regs, regd) -#define psrld(vars, vard) mmx_m2m(psrld, vars, vard) - -#define psrlw_i2r(imm, reg) mmx_i2r(psrlw, imm, reg) -#define psrlw_m2r(var, reg) mmx_m2r(psrlw, var, reg) -#define psrlw_r2r(regs, regd) mmx_r2r(psrlw, regs, regd) -#define psrlw(vars, vard) mmx_m2m(psrlw, vars, vard) - - -/* 2x32 and 4x16 Parallel Shift Right Arithmetic -*/ -#define psrad_i2r(imm, reg) mmx_i2r(psrad, imm, reg) -#define psrad_m2r(var, reg) mmx_m2r(psrad, var, reg) -#define psrad_r2r(regs, regd) mmx_r2r(psrad, regs, regd) -#define psrad(vars, vard) mmx_m2m(psrad, vars, vard) - -#define psraw_i2r(imm, reg) mmx_i2r(psraw, imm, reg) -#define psraw_m2r(var, reg) mmx_m2r(psraw, var, reg) -#define psraw_r2r(regs, regd) mmx_r2r(psraw, regs, regd) -#define psraw(vars, vard) mmx_m2m(psraw, vars, vard) - - -/* 2x32->4x16 and 4x16->8x8 PACK and Signed Saturate - (packs source and dest fields into dest in that order) -*/ -#define packssdw_m2r(var, reg) mmx_m2r(packssdw, var, reg) -#define packssdw_r2r(regs, regd) mmx_r2r(packssdw, regs, regd) -#define packssdw(vars, vard) mmx_m2m(packssdw, vars, vard) - -#define packsswb_m2r(var, reg) mmx_m2r(packsswb, var, reg) -#define packsswb_r2r(regs, regd) mmx_r2r(packsswb, regs, regd) -#define packsswb(vars, vard) mmx_m2m(packsswb, vars, vard) - - -/* 4x16->8x8 PACK and Unsigned Saturate - (packs source and dest fields into dest in that order) -*/ -#define packuswb_m2r(var, reg) mmx_m2r(packuswb, var, reg) -#define packuswb_r2r(regs, regd) mmx_r2r(packuswb, regs, regd) -#define packuswb(vars, vard) mmx_m2m(packuswb, vars, vard) - - -/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK Low - (interleaves low half of dest with low half of source - as padding in each result field) -*/ -#define punpckldq_m2r(var, reg) mmx_m2r(punpckldq, var, reg) -#define punpckldq_r2r(regs, regd) mmx_r2r(punpckldq, regs, regd) -#define punpckldq(vars, vard) mmx_m2m(punpckldq, vars, vard) - -#define punpcklwd_m2r(var, reg) mmx_m2r(punpcklwd, var, reg) -#define punpcklwd_r2r(regs, regd) mmx_r2r(punpcklwd, regs, regd) -#define punpcklwd(vars, vard) mmx_m2m(punpcklwd, vars, vard) - -#define punpcklbw_m2r(var, reg) mmx_m2r(punpcklbw, var, reg) -#define punpcklbw_r2r(regs, regd) mmx_r2r(punpcklbw, regs, regd) -#define punpcklbw(vars, vard) mmx_m2m(punpcklbw, vars, vard) - - -/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK High - (interleaves high half of dest with high half of source - as padding in each result field) -*/ -#define punpckhdq_m2r(var, reg) mmx_m2r(punpckhdq, var, reg) -#define punpckhdq_r2r(regs, regd) mmx_r2r(punpckhdq, regs, regd) -#define punpckhdq(vars, vard) mmx_m2m(punpckhdq, vars, vard) - -#define punpckhwd_m2r(var, reg) mmx_m2r(punpckhwd, var, reg) -#define punpckhwd_r2r(regs, regd) mmx_r2r(punpckhwd, regs, regd) -#define punpckhwd(vars, vard) mmx_m2m(punpckhwd, vars, vard) - -#define punpckhbw_m2r(var, reg) mmx_m2r(punpckhbw, var, reg) -#define punpckhbw_r2r(regs, regd) mmx_r2r(punpckhbw, regs, regd) -#define punpckhbw(vars, vard) mmx_m2m(punpckhbw, vars, vard) - - -/* Empty MMx State - (used to clean-up when going from mmx to float use - of the registers that are shared by both; note that - there is no float-to-mmx operation needed, because - only the float tag word info is corruptible) -*/ -#ifdef MMX_TRACE - -#define emms() \ - { \ - fprintf(stderr, "emms()\n"); \ - __asm__ __volatile__ ("emms"); \ - } - -#else - -#define emms() __asm__ __volatile__ ("emms") - -#endif - -#endif - diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/spantmp.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/spantmp.h deleted file mode 100644 index f726e83053..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/spantmp.h +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Copyright 2000-2001 VA Linux Systems, Inc. - * (C) Copyright IBM Corporation 2002, 2003 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - * Gareth Hughes - */ - -#include "spantmp_common.h" - -#ifndef DBG -#define DBG 0 -#endif - -#ifndef HW_READ_CLIPLOOP -#define HW_READ_CLIPLOOP() HW_CLIPLOOP() -#endif - -#ifndef HW_WRITE_CLIPLOOP -#define HW_WRITE_CLIPLOOP() HW_CLIPLOOP() -#endif - - -static void TAG(WriteRGBASpan)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const void *values, const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - GLint x1; - GLint n1; - LOCAL_VARS; - - y = Y_FLIP(y); - - HW_WRITE_CLIPLOOP() - { - GLint i = 0; - CLIPSPAN(x,y,n,x1,n1,i); - - if (DBG) fprintf(stderr, "WriteRGBASpan %d..%d (x1 %d)\n", - (int)i, (int)n1, (int)x1); - - if (mask) - { - for (;n1>0;i++,x1++,n1--) - if (mask[i]) - WRITE_RGBA( x1, y, - rgba[i][0], rgba[i][1], - rgba[i][2], rgba[i][3] ); - } - else - { - for (;n1>0;i++,x1++,n1--) - WRITE_RGBA( x1, y, - rgba[i][0], rgba[i][1], - rgba[i][2], rgba[i][3] ); - } - } - HW_ENDCLIPLOOP(); - } - HW_WRITE_UNLOCK(); -} - -static void TAG(WriteRGBSpan)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const void *values, const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; - GLint x1; - GLint n1; - LOCAL_VARS; - - y = Y_FLIP(y); - - HW_WRITE_CLIPLOOP() - { - GLint i = 0; - CLIPSPAN(x,y,n,x1,n1,i); - - if (DBG) fprintf(stderr, "WriteRGBSpan %d..%d (x1 %d)\n", - (int)i, (int)n1, (int)x1); - - if (mask) - { - for (;n1>0;i++,x1++,n1--) - if (mask[i]) - WRITE_RGBA( x1, y, rgb[i][0], rgb[i][1], rgb[i][2], 255 ); - } - else - { - for (;n1>0;i++,x1++,n1--) - WRITE_RGBA( x1, y, rgb[i][0], rgb[i][1], rgb[i][2], 255 ); - } - } - HW_ENDCLIPLOOP(); - } - HW_WRITE_UNLOCK(); -} - -static void TAG(WriteRGBAPixels)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, const GLint x[], const GLint y[], - const void *values, const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - GLuint i; - LOCAL_VARS; - - if (DBG) fprintf(stderr, "WriteRGBAPixels\n"); - - HW_WRITE_CLIPLOOP() - { - if (mask) - { - for (i=0;i0;i++,x1++,n1--) - if (mask[i]) - WRITE_PIXEL( x1, y, p ); - } - else - { - for (;n1>0;i++,x1++,n1--) - WRITE_PIXEL( x1, y, p ); - } - } - HW_ENDCLIPLOOP(); - } - HW_WRITE_UNLOCK(); -} - - -static void TAG(WriteMonoRGBAPixels)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, - const GLint x[], const GLint y[], - const void *value, - const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLubyte *color = (const GLubyte *) value; - GLuint i; - LOCAL_VARS; - INIT_MONO_PIXEL(p, color); - - if (DBG) fprintf(stderr, "WriteMonoRGBAPixels\n"); - - HW_WRITE_CLIPLOOP() - { - if (mask) - { - for (i=0;i0;i++,x1++,n1--) - READ_RGBA( rgba[i], x1, y ); - } - HW_ENDCLIPLOOP(); - } - HW_READ_UNLOCK(); -} - - -static void TAG(ReadRGBAPixels)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, const GLint x[], const GLint y[], - void *values ) -{ - HW_READ_LOCK() - { - GLubyte (*rgba)[4] = (GLubyte (*)[4]) values; - const GLubyte *mask = NULL; /* remove someday */ - GLuint i; - LOCAL_VARS; - - if (DBG) fprintf(stderr, "ReadRGBAPixels\n"); - - HW_READ_CLIPLOOP() - { - if (mask) - { - for (i=0;i - * \author Gareth Hughes - * \author Ian Romanick - */ - -#include "colormac.h" -#include "spantmp_common.h" - -#ifndef DBG -#define DBG 0 -#endif - -#ifndef HW_READ_CLIPLOOP -#define HW_READ_CLIPLOOP() HW_CLIPLOOP() -#endif - -#ifndef HW_WRITE_CLIPLOOP -#define HW_WRITE_CLIPLOOP() HW_CLIPLOOP() -#endif - -#if (SPANTMP_PIXEL_FMT == GL_RGB) && (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_SHORT_5_6_5) - -#ifndef GET_SRC_PTR -#define GET_SRC_PTR(_x, _y) (read_buf + (_x) * 2 + (_y) * pitch) -#endif - -#ifndef GET_DST_PTR -#define GET_DST_PTR(_x, _y) ( buf + (_x) * 2 + (_y) * pitch) -#endif - -#define INIT_MONO_PIXEL(p, color) \ - p = PACK_COLOR_565( color[0], color[1], color[2] ) - -#define WRITE_RGBA( _x, _y, r, g, b, a ) \ - do { \ - GLshort * _p = (GLshort *) GET_DST_PTR(_x, _y); \ - _p[0] = ((((int)r & 0xf8) << 8) | (((int)g & 0xfc) << 3) | \ - (((int)b & 0xf8) >> 3)); \ - } while(0) - -#define WRITE_PIXEL( _x, _y, p ) \ - do { \ - GLushort * _p = (GLushort *) GET_DST_PTR(_x, _y); \ - _p[0] = p; \ - } while(0) - -#define READ_RGBA( rgba, _x, _y ) \ - do { \ - GLushort p = *(volatile GLshort *) GET_SRC_PTR(_x, _y); \ - rgba[0] = ((p >> 8) & 0xf8) * 255 / 0xf8; \ - rgba[1] = ((p >> 3) & 0xfc) * 255 / 0xfc; \ - rgba[2] = ((p << 3) & 0xf8) * 255 / 0xf8; \ - rgba[3] = 0xff; \ - } while (0) - -#elif (SPANTMP_PIXEL_FMT == GL_BGRA) && (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV) - -#ifndef GET_SRC_PTR -#define GET_SRC_PTR(_x, _y) (read_buf + (_x) * 4 + (_y) * pitch) -#endif - -#ifndef GET_DST_PTR -#define GET_DST_PTR(_x, _y) ( buf + (_x) * 4 + (_y) * pitch) -#endif - -# define INIT_MONO_PIXEL(p, color) \ - p = PACK_COLOR_8888(color[3], color[0], color[1], color[2]) - -# define WRITE_RGBA(_x, _y, r, g, b, a) \ - do { \ - GLuint * _p = (GLuint *) GET_DST_PTR(_x, _y); \ - _p[0] = ((r << 16) | (g << 8) | (b << 0) | (a << 24)); \ - } while(0) - -#define WRITE_PIXEL(_x, _y, p) \ - do { \ - GLuint * _p = (GLuint *) GET_DST_PTR(_x, _y); \ - _p[0] = p; \ - } while(0) - -# if defined( USE_X86_ASM ) -# define READ_RGBA(rgba, _x, _y) \ - do { \ - GLuint p = *(volatile GLuint *) GET_SRC_PTR(_x, _y); \ - __asm__ __volatile__( "bswap %0; rorl $8, %0" \ - : "=r" (p) : "r" (p) ); \ - ((GLuint *)rgba)[0] = p; \ - } while (0) -# elif defined( MESA_BIG_ENDIAN ) - /* On PowerPC with GCC 3.4.2 the shift madness below becomes a single - * rotlwi instruction. It also produces good code on SPARC. - */ -# define READ_RGBA( rgba, _x, _y ) \ - do { \ - GLuint p = *(volatile GLuint *) GET_SRC_PTR(_x, _y); \ - GLuint t = p; \ - *((uint32_t *) rgba) = (t >> 24) | (p << 8); \ - } while (0) -# else -# define READ_RGBA( rgba, _x, _y ) \ - do { \ - GLuint p = *(volatile GLuint *) GET_SRC_PTR(_x, _y); \ - rgba[0] = (p >> 16) & 0xff; \ - rgba[1] = (p >> 8) & 0xff; \ - rgba[2] = (p >> 0) & 0xff; \ - rgba[3] = (p >> 24) & 0xff; \ - } while (0) -# endif - -#else -#error SPANTMP_PIXEL_FMT must be set to a valid value! -#endif - -#if defined( USE_MMX_ASM ) || defined( USE_SSE_ASM ) -#include "x86/read_rgba_span_x86.h" -#include "x86/common_x86_asm.h" -#endif - -static void TAG(WriteRGBASpan)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const void *values, const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - GLint x1; - GLint n1; - LOCAL_VARS; - - y = Y_FLIP(y); - - HW_WRITE_CLIPLOOP() - { - GLint i = 0; - CLIPSPAN(x,y,n,x1,n1,i); - - if (DBG) fprintf(stderr, "WriteRGBASpan %d..%d (x1 %d)\n", - (int)i, (int)n1, (int)x1); - - if (mask) - { - for (;n1>0;i++,x1++,n1--) - if (mask[i]) - WRITE_RGBA( x1, y, - rgba[i][0], rgba[i][1], - rgba[i][2], rgba[i][3] ); - } - else - { - for (;n1>0;i++,x1++,n1--) - WRITE_RGBA( x1, y, - rgba[i][0], rgba[i][1], - rgba[i][2], rgba[i][3] ); - } - } - HW_ENDCLIPLOOP(); - } - HW_WRITE_UNLOCK(); -} - -static void TAG(WriteRGBSpan)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const void *values, const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; - GLint x1; - GLint n1; - LOCAL_VARS; - - y = Y_FLIP(y); - - HW_WRITE_CLIPLOOP() - { - GLint i = 0; - CLIPSPAN(x,y,n,x1,n1,i); - - if (DBG) fprintf(stderr, "WriteRGBSpan %d..%d (x1 %d)\n", - (int)i, (int)n1, (int)x1); - - if (mask) - { - for (;n1>0;i++,x1++,n1--) - if (mask[i]) - WRITE_RGBA( x1, y, rgb[i][0], rgb[i][1], rgb[i][2], 255 ); - } - else - { - for (;n1>0;i++,x1++,n1--) - WRITE_RGBA( x1, y, rgb[i][0], rgb[i][1], rgb[i][2], 255 ); - } - } - HW_ENDCLIPLOOP(); - } - HW_WRITE_UNLOCK(); -} - -static void TAG(WriteRGBAPixels)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, const GLint x[], const GLint y[], - const void *values, const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - GLint i; - LOCAL_VARS; - - if (DBG) fprintf(stderr, "WriteRGBAPixels\n"); - - HW_WRITE_CLIPLOOP() - { - if (mask) - { - for (i=0;i0;i++,x1++,n1--) - if (mask[i]) - WRITE_PIXEL( x1, y, p ); - } - else - { - for (;n1>0;i++,x1++,n1--) - WRITE_PIXEL( x1, y, p ); - } - } - HW_ENDCLIPLOOP(); - } - HW_WRITE_UNLOCK(); -} - - -static void TAG(WriteMonoRGBAPixels)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, - const GLint x[], const GLint y[], - const void *value, - const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLubyte *color = (const GLubyte *) value; - GLint i; - LOCAL_VARS; - INIT_MONO_PIXEL(p, color); - - if (DBG) fprintf(stderr, "WriteMonoRGBAPixels\n"); - - HW_WRITE_CLIPLOOP() - { - if (mask) - { - for (i=0;i0;i++,x1++,n1--) - READ_RGBA( rgba[i], x1, y ); - } - HW_ENDCLIPLOOP(); - } - HW_READ_UNLOCK(); -} - - -#if defined(USE_MMX_ASM) && \ - (((SPANTMP_PIXEL_FMT == GL_BGRA) && \ - (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV)) || \ - ((SPANTMP_PIXEL_FMT == GL_RGB) && \ - (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_SHORT_5_6_5))) -static void TAG2(ReadRGBASpan,_MMX)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, void *values) -{ -#ifndef USE_INNER_EMMS - /* The EMMS instruction is directly in-lined here because using GCC's - * built-in _mm_empty function was found to utterly destroy performance. - */ - __asm__ __volatile__( "emms" ); -#endif - - HW_READ_LOCK() - { - GLubyte (*rgba)[4] = (GLubyte (*)[4]) values; - GLint x1,n1; - LOCAL_VARS; - - y = Y_FLIP(y); - - if (DBG) fprintf(stderr, "ReadRGBASpan\n"); - - HW_READ_CLIPLOOP() - { - GLint i = 0; - CLIPSPAN(x,y,n,x1,n1,i); - - { - const char * src = GET_SRC_PTR( x1, y ); -#if (SPANTMP_PIXEL_FMT == GL_RGB) && \ - (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_SHORT_5_6_5) - _generic_read_RGBA_span_RGB565_MMX( src, rgba[i], n1 ); -#else - _generic_read_RGBA_span_BGRA8888_REV_MMX( src, rgba[i], n1 ); -#endif - } - } - HW_ENDCLIPLOOP(); - } - HW_READ_UNLOCK(); -#ifndef USE_INNER_EMMS - __asm__ __volatile__( "emms" ); -#endif -} -#endif - - -#if defined(USE_SSE_ASM) && \ - (SPANTMP_PIXEL_FMT == GL_BGRA) && \ - (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV) -static void TAG2(ReadRGBASpan,_SSE2)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - void *values) -{ - HW_READ_LOCK() - { - GLubyte (*rgba)[4] = (GLubyte (*)[4]) values; - GLint x1,n1; - LOCAL_VARS; - - y = Y_FLIP(y); - - if (DBG) fprintf(stderr, "ReadRGBASpan\n"); - - HW_READ_CLIPLOOP() - { - GLint i = 0; - CLIPSPAN(x,y,n,x1,n1,i); - - { - const char * src = GET_SRC_PTR( x1, y ); - _generic_read_RGBA_span_BGRA8888_REV_SSE2( src, rgba[i], n1 ); - } - } - HW_ENDCLIPLOOP(); - } - HW_READ_UNLOCK(); -} -#endif - -#if defined(USE_SSE_ASM) && \ - (SPANTMP_PIXEL_FMT == GL_BGRA) && \ - (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV) -static void TAG2(ReadRGBASpan,_SSE)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - void *values) -{ -#ifndef USE_INNER_EMMS - /* The EMMS instruction is directly in-lined here because using GCC's - * built-in _mm_empty function was found to utterly destroy performance. - */ - __asm__ __volatile__( "emms" ); -#endif - - HW_READ_LOCK() - { - GLubyte (*rgba)[4] = (GLubyte (*)[4]) values; - GLint x1,n1; - LOCAL_VARS; - - y = Y_FLIP(y); - - if (DBG) fprintf(stderr, "ReadRGBASpan\n"); - - HW_READ_CLIPLOOP() - { - GLint i = 0; - CLIPSPAN(x,y,n,x1,n1,i); - - { - const char * src = GET_SRC_PTR( x1, y ); - _generic_read_RGBA_span_BGRA8888_REV_SSE( src, rgba[i], n1 ); - } - } - HW_ENDCLIPLOOP(); - } - HW_READ_UNLOCK(); -#ifndef USE_INNER_EMMS - __asm__ __volatile__( "emms" ); -#endif -} -#endif - - -static void TAG(ReadRGBAPixels)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, const GLint x[], const GLint y[], - void *values ) -{ - HW_READ_LOCK() - { - GLubyte (*rgba)[4] = (GLubyte (*)[4]) values; - GLubyte *mask = NULL; /* remove someday */ - GLint i; - LOCAL_VARS; - - if (DBG) fprintf(stderr, "ReadRGBAPixels\n"); - - HW_READ_CLIPLOOP() - { - if (mask) - { - for (i=0;iPutRow = TAG(WriteRGBASpan); - rb->PutRowRGB = TAG(WriteRGBSpan); - rb->PutMonoRow = TAG(WriteMonoRGBASpan); - rb->PutValues = TAG(WriteRGBAPixels); - rb->PutMonoValues = TAG(WriteMonoRGBAPixels); - rb->GetValues = TAG(ReadRGBAPixels); - -#if defined(USE_SSE_ASM) && \ - (SPANTMP_PIXEL_FMT == GL_BGRA) && \ - (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV) - if ( cpu_has_xmm2 ) { - if (DBG) fprintf( stderr, "Using %s version of GetRow\n", "SSE2" ); - rb->GetRow = TAG2(ReadRGBASpan, _SSE2); - } - else -#endif -#if defined(USE_SSE_ASM) && \ - (SPANTMP_PIXEL_FMT == GL_BGRA) && \ - (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV) - if ( cpu_has_xmm ) { - if (DBG) fprintf( stderr, "Using %s version of GetRow\n", "SSE" ); - rb->GetRow = TAG2(ReadRGBASpan, _SSE); - } - else -#endif -#if defined(USE_MMX_ASM) && \ - (((SPANTMP_PIXEL_FMT == GL_BGRA) && \ - (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV)) || \ - ((SPANTMP_PIXEL_FMT == GL_RGB) && \ - (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_SHORT_5_6_5))) - if ( cpu_has_mmx ) { - if (DBG) fprintf( stderr, "Using %s version of GetRow\n", "MMX" ); - rb->GetRow = TAG2(ReadRGBASpan, _MMX); - } - else -#endif - { - if (DBG) fprintf( stderr, "Using %s version of GetRow\n", "C" ); - rb->GetRow = TAG(ReadRGBASpan); - } - -} - - -#undef INIT_MONO_PIXEL -#undef WRITE_PIXEL -#undef WRITE_RGBA -#undef READ_RGBA -#undef TAG -#undef TAG2 -#undef GET_SRC_PTR -#undef GET_DST_PTR -#undef SPANTMP_PIXEL_FMT -#undef SPANTMP_PIXEL_TYPE diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/spantmp_common.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/spantmp_common.h deleted file mode 100644 index a4509a569d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/spantmp_common.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2000-2001 VA Linux Systems, Inc. - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file spantmp_common.h - * - * common macros for span read / write functions to be used in the depth, - * stencil and pixel span templates. - */ - -#ifndef HW_WRITE_LOCK -#define HW_WRITE_LOCK() HW_LOCK() -#endif - -#ifndef HW_WRITE_UNLOCK -#define HW_WRITE_UNLOCK() HW_UNLOCK() -#endif - -#ifndef HW_READ_LOCK -#define HW_READ_LOCK() HW_LOCK() -#endif - -#ifndef HW_READ_UNLOCK -#define HW_READ_UNLOCK() HW_UNLOCK() -#endif - -#ifndef HW_CLIPLOOP -#define HW_CLIPLOOP() \ - do { \ - int _nc = dPriv->numClipRects; \ - while ( _nc-- ) { \ - int minx = dPriv->pClipRects[_nc].x1 - dPriv->x; \ - int miny = dPriv->pClipRects[_nc].y1 - dPriv->y; \ - int maxx = dPriv->pClipRects[_nc].x2 - dPriv->x; \ - int maxy = dPriv->pClipRects[_nc].y2 - dPriv->y; -#endif - -#ifndef HW_ENDCLIPLOOP -#define HW_ENDCLIPLOOP() \ - } \ - } while (0) -#endif - -#ifndef CLIPPIXEL -#define CLIPPIXEL( _x, _y ) \ - ((_x >= minx) && (_x < maxx) && (_y >= miny) && (_y < maxy)) -#endif - -#ifndef CLIPSPAN -#define CLIPSPAN( _x, _y, _n, _x1, _n1, _i ) \ - if ( _y < miny || _y >= maxy /*|| _x + n < minx || _x >=maxx*/ ) { \ - _n1 = 0, _x1 = x; \ - } else { \ - _n1 = _n; \ - _x1 = _x; \ - if ( _x1 < minx ) _i += (minx-_x1), n1 -= (minx-_x1), _x1 = minx; \ - if ( _x1 + _n1 >= maxx ) n1 -= (_x1 + n1 - maxx); \ - } -#endif diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/stenciltmp.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/stenciltmp.h deleted file mode 100644 index dccab0660d..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/stenciltmp.h +++ /dev/null @@ -1,182 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/common/stenciltmp.h,v 1.3 2001/03/21 16:14:20 dawes Exp $ */ - -#include "spantmp_common.h" - -#ifndef DBG -#define DBG 0 -#endif - -static void TAG(WriteStencilSpan)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const void *values, const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLubyte *stencil = (const GLubyte *) values; - GLint x1; - GLint n1; - LOCAL_STENCIL_VARS; - - y = Y_FLIP(y); - - HW_CLIPLOOP() - { - GLint i = 0; - CLIPSPAN(x,y,n,x1,n1,i); - - if (DBG) fprintf(stderr, "WriteStencilSpan %d..%d (x1 %d)\n", - (int)i, (int)n1, (int)x1); - - if (mask) - { - for (;n1>0;i++,x1++,n1--) - if (mask[i]) - WRITE_STENCIL( x1, y, stencil[i] ); - } - else - { - for (;n1>0;i++,x1++,n1--) - WRITE_STENCIL( x1, y, stencil[i] ); - } - } - HW_ENDCLIPLOOP(); - } - HW_WRITE_UNLOCK(); -} - - -static void TAG(WriteMonoStencilSpan)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const void *value, - const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLubyte stencil = *((const GLubyte *) value); - GLint x1; - GLint n1; - LOCAL_STENCIL_VARS; - - y = Y_FLIP(y); - - HW_CLIPLOOP() - { - GLint i = 0; - CLIPSPAN(x,y,n,x1,n1,i); - - if (DBG) fprintf(stderr, "WriteStencilSpan %d..%d (x1 %d)\n", - (int)i, (int)n1, (int)x1); - - if (mask) - { - for (;n1>0;i++,x1++,n1--) - if (mask[i]) - WRITE_STENCIL( x1, y, stencil ); - } - else - { - for (;n1>0;i++,x1++,n1--) - WRITE_STENCIL( x1, y, stencil ); - } - } - HW_ENDCLIPLOOP(); - } - HW_WRITE_UNLOCK(); -} - - - -static void TAG(WriteStencilPixels)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, - const GLint x[], const GLint y[], - const void *values, const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLubyte *stencil = (const GLubyte *) values; - GLuint i; - LOCAL_STENCIL_VARS; - - if (DBG) fprintf(stderr, "WriteStencilPixels\n"); - - HW_CLIPLOOP() - { - for (i=0;i0;i++,n1--) - READ_STENCIL( stencil[i], (x+i), y ); - } - HW_ENDCLIPLOOP(); - } - HW_READ_UNLOCK(); -} - -static void TAG(ReadStencilPixels)( GLcontext *ctx, - struct gl_renderbuffer *rb, - GLuint n, const GLint x[], const GLint y[], - void *values ) -{ - HW_READ_LOCK() - { - GLubyte *stencil = (GLubyte *) values; - GLuint i; - LOCAL_STENCIL_VARS; - - if (DBG) fprintf(stderr, "ReadStencilPixels\n"); - - HW_CLIPLOOP() - { - for (i=0;i - * Keith Whitwell - * Kevin E. Martin - * Gareth Hughes - */ -/* $XFree86:$ */ - -/** \file texmem.c - * Implements all of the device-independent texture memory management. - * - * Currently, only a simple LRU texture memory management policy is - * implemented. In the (hopefully very near) future, better policies will be - * implemented. The idea is that the DRI should be able to run in one of two - * modes. In the default mode the DRI will dynamically attempt to discover - * the best texture management policy for the running application. In the - * other mode, the user (via some sort of as yet TBD mechanism) will select - * a texture management policy that is known to work well with the - * application. - */ - -#include "texmem.h" -#include "simple_list.h" -#include "imports.h" -#include "macros.h" -#include "texformat.h" - -#include - - - -static unsigned dummy_swap_counter; - - -/** - * Calculate \f$\log_2\f$ of a value. This is a particularly poor - * implementation of this function. However, since system performance is in - * no way dependent on this function, the slowness of the implementation is - * irrelevent. - * - * \param n Value whose \f$\log_2\f$ is to be calculated - */ - -static GLuint -driLog2( GLuint n ) -{ - GLuint log2; - - for ( log2 = 1 ; n > 1 ; log2++ ) { - n >>= 1; - } - - return log2; -} - - - - -/** - * Determine if a texture is resident in textureable memory. Depending on - * the driver, this may or may not be on-card memory. It could be AGP memory - * or anyother type of memory from which the hardware can directly read - * texels. - * - * This function is intended to be used as the \c IsTextureResident function - * in the device's \c dd_function_table. - * - * \param ctx GL context pointer (currently unused) - * \param texObj Texture object to be tested - */ - -GLboolean -driIsTextureResident( GLcontext * ctx, - struct gl_texture_object * texObj ) -{ - driTextureObject * t; - - - t = (driTextureObject *) texObj->DriverData; - return( (t != NULL) && (t->memBlock != NULL) ); -} - - - - -/** - * (Re)initialize the global circular LRU list. The last element - * in the array (\a heap->nrRegions) is the sentinal. Keeping it - * at the end of the array allows the other elements of the array - * to be addressed rationally when looking up objects at a particular - * location in texture memory. - * - * \param heap Texture heap to be reset - */ - -static void resetGlobalLRU( driTexHeap * heap ) -{ - drmTextureRegionPtr list = heap->global_regions; - unsigned sz = 1U << heap->logGranularity; - unsigned i; - - for (i = 0 ; (i+1) * sz <= heap->size ; i++) { - list[i].prev = i-1; - list[i].next = i+1; - list[i].age = 0; - } - - i--; - list[0].prev = heap->nrRegions; - list[i].prev = i-1; - list[i].next = heap->nrRegions; - list[heap->nrRegions].prev = i; - list[heap->nrRegions].next = 0; - heap->global_age[0] = 0; -} - -/** - * Print out debugging information about the local texture LRU. - * - * \param heap Texture heap to be printed - * \param callername Name of calling function - */ -static void printLocalLRU( driTexHeap * heap, const char *callername ) -{ - driTextureObject *t; - unsigned sz = 1U << heap->logGranularity; - - fprintf( stderr, "%s in %s:\nLocal LRU, heap %d:\n", - __FUNCTION__, callername, heap->heapId ); - - foreach ( t, &heap->texture_objects ) { - if (!t->memBlock) - continue; - if (!t->tObj) { - fprintf( stderr, "Placeholder (%p) %d at 0x%x sz 0x%x\n", - (void *)t, - t->memBlock->ofs / sz, - t->memBlock->ofs, - t->memBlock->size ); - } else { - fprintf( stderr, "Texture (%p) at 0x%x sz 0x%x\n", - (void *)t, - t->memBlock->ofs, - t->memBlock->size ); - } - } - foreach ( t, heap->swapped_objects ) { - if (!t->tObj) { - fprintf( stderr, "Swapped Placeholder (%p)\n", (void *)t ); - } else { - fprintf( stderr, "Swapped Texture (%p)\n", (void *)t ); - } - } - - fprintf( stderr, "\n" ); -} - -/** - * Print out debugging information about the global texture LRU. - * - * \param heap Texture heap to be printed - * \param callername Name of calling function - */ -static void printGlobalLRU( driTexHeap * heap, const char *callername ) -{ - drmTextureRegionPtr list = heap->global_regions; - unsigned int i, j; - - fprintf( stderr, "%s in %s:\nGlobal LRU, heap %d list %p:\n", - __FUNCTION__, callername, heap->heapId, (void *)list ); - - for ( i = 0, j = heap->nrRegions ; i < heap->nrRegions ; i++ ) { - fprintf( stderr, "list[%d] age %d next %d prev %d in_use %d\n", - j, list[j].age, list[j].next, list[j].prev, list[j].in_use ); - j = list[j].next; - if ( j == heap->nrRegions ) break; - } - - if ( j != heap->nrRegions ) { - fprintf( stderr, "Loop detected in global LRU\n" ); - for ( i = 0 ; i < heap->nrRegions ; i++ ) { - fprintf( stderr, "list[%d] age %d next %d prev %d in_use %d\n", - i, list[i].age, list[i].next, list[i].prev, list[i].in_use ); - } - } - - fprintf( stderr, "\n" ); -} - - -/** - * Called by the client whenever it touches a local texture. - * - * \param t Texture object that the client has accessed - */ - -void driUpdateTextureLRU( driTextureObject * t ) -{ - driTexHeap * heap; - drmTextureRegionPtr list; - unsigned shift; - unsigned start; - unsigned end; - unsigned i; - - - heap = t->heap; - if ( heap != NULL ) { - shift = heap->logGranularity; - start = t->memBlock->ofs >> shift; - end = (t->memBlock->ofs + t->memBlock->size - 1) >> shift; - - - heap->local_age = ++heap->global_age[0]; - list = heap->global_regions; - - - /* Update the context's local LRU - */ - - move_to_head( & heap->texture_objects, t ); - - - for (i = start ; i <= end ; i++) { - list[i].age = heap->local_age; - - /* remove_from_list(i) - */ - list[(unsigned)list[i].next].prev = list[i].prev; - list[(unsigned)list[i].prev].next = list[i].next; - - /* insert_at_head(list, i) - */ - list[i].prev = heap->nrRegions; - list[i].next = list[heap->nrRegions].next; - list[(unsigned)list[heap->nrRegions].next].prev = i; - list[heap->nrRegions].next = i; - } - - if ( 0 ) { - printGlobalLRU( heap, __FUNCTION__ ); - printLocalLRU( heap, __FUNCTION__ ); - } - } -} - - - - -/** - * Keep track of swapped out texture objects. - * - * \param t Texture object to be "swapped" out of its texture heap - */ - -void driSwapOutTextureObject( driTextureObject * t ) -{ - unsigned face; - - - if ( t->memBlock != NULL ) { - assert( t->heap != NULL ); - mmFreeMem( t->memBlock ); - t->memBlock = NULL; - - if (t->timestamp > t->heap->timestamp) - t->heap->timestamp = t->timestamp; - - t->heap->texture_swaps[0]++; - move_to_tail( t->heap->swapped_objects, t ); - t->heap = NULL; - } - else { - assert( t->heap == NULL ); - } - - - for ( face = 0 ; face < 6 ; face++ ) { - t->dirty_images[face] = ~0; - } -} - - - - -/** - * Destroy hardware state associated with texture \a t. Calls the - * \a destroy_texture_object method associated with the heap from which - * \a t was allocated. - * - * \param t Texture object to be destroyed - */ - -void driDestroyTextureObject( driTextureObject * t ) -{ - driTexHeap * heap; - - - if ( 0 ) { - fprintf( stderr, "[%s:%d] freeing %p (tObj = %p, DriverData = %p)\n", - __FILE__, __LINE__, - (void *)t, - (void *)((t != NULL) ? t->tObj : NULL), - (void *)((t != NULL && t->tObj != NULL) ? t->tObj->DriverData : NULL )); - } - - if ( t != NULL ) { - if ( t->memBlock ) { - heap = t->heap; - assert( heap != NULL ); - - heap->texture_swaps[0]++; - - mmFreeMem( t->memBlock ); - t->memBlock = NULL; - - if (t->timestamp > t->heap->timestamp) - t->heap->timestamp = t->timestamp; - - heap->destroy_texture_object( heap->driverContext, t ); - t->heap = NULL; - } - - if ( t->tObj != NULL ) { - assert( t->tObj->DriverData == t ); - t->tObj->DriverData = NULL; - } - - remove_from_list( t ); - FREE( t ); - } - - if ( 0 ) { - fprintf( stderr, "[%s:%d] done freeing %p\n", __FILE__, __LINE__, (void *)t ); - } -} - - - - -/** - * Update the local heap's representation of texture memory based on - * data in the SAREA. This is done each time it is detected that some other - * direct rendering client has held the lock. This pertains to both our local - * textures and the textures belonging to other clients. Keep track of other - * client's textures by pushing a placeholder texture onto the LRU list -- - * these are denoted by \a tObj being \a NULL. - * - * \param heap Heap whose state is to be updated - * \param offset Byte offset in the heap that has been stolen - * \param size Size, in bytes, of the stolen block - * \param in_use Non-zero if the block is pinned/reserved by the kernel - */ - -static void driTexturesGone( driTexHeap * heap, int offset, int size, - int in_use ) -{ - driTextureObject * t; - driTextureObject * tmp; - - - foreach_s ( t, tmp, & heap->texture_objects ) { - if ( (t->memBlock->ofs < (offset + size)) - && ((t->memBlock->ofs + t->memBlock->size) > offset) ) { - /* It overlaps - kick it out. If the texture object is just a - * place holder, then destroy it all together. Otherwise, mark - * it as being swapped out. - */ - - if ( t->tObj != NULL ) { - driSwapOutTextureObject( t ); - } - else { - driDestroyTextureObject( t ); - } - } - } - - - { - t = (driTextureObject *) CALLOC( heap->texture_object_size ); - if ( t == NULL ) return; - - t->memBlock = mmAllocMem( heap->memory_heap, size, 0, offset ); - if ( t->memBlock == NULL ) { - fprintf( stderr, "Couldn't alloc placeholder: heap %u sz %x ofs %x\n", heap->heapId, - (int)size, (int)offset ); - mmDumpMemInfo( heap->memory_heap ); - return; - } - t->heap = heap; - if (in_use) - t->bound = 99; - insert_at_head( & heap->texture_objects, t ); - } -} - - - - -/** - * Called by the client on lock contention to determine whether textures have - * been stolen. If another client has modified a region in which we have - * textures, then we need to figure out which of our textures have been - * removed and update our global LRU. - * - * \param heap Texture heap to be updated - */ - -void driAgeTextures( driTexHeap * heap ) -{ - drmTextureRegionPtr list = heap->global_regions; - unsigned sz = 1U << (heap->logGranularity); - unsigned i, nr = 0; - - - /* Have to go right round from the back to ensure stuff ends up - * LRU in the local list... Fix with a cursor pointer. - */ - - for (i = list[heap->nrRegions].prev ; - i != heap->nrRegions && nr < heap->nrRegions ; - i = list[i].prev, nr++) { - /* If switching texturing schemes, then the SAREA might not have been - * properly cleared, so we need to reset the global texture LRU. - */ - - if ( (i * sz) > heap->size ) { - nr = heap->nrRegions; - break; - } - - if (list[i].age > heap->local_age) - driTexturesGone( heap, i * sz, sz, list[i].in_use); - } - - /* Loop or uninitialized heap detected. Reset. - */ - - if (nr == heap->nrRegions) { - driTexturesGone( heap, 0, heap->size, 0); - resetGlobalLRU( heap ); - } - - if ( 0 ) { - printGlobalLRU( heap, __FUNCTION__ ); - printLocalLRU( heap, __FUNCTION__ ); - } - - heap->local_age = heap->global_age[0]; -} - - - - -#define INDEX_ARRAY_SIZE 6 /* I'm not aware of driver with more than 2 heaps */ - -/** - * Allocate memory from a texture heap to hold a texture object. This - * routine will attempt to allocate memory for the texture from the heaps - * specified by \c heap_array in order. That is, first it will try to - * allocate from \c heap_array[0], then \c heap_array[1], and so on. - * - * \param heap_array Array of pointers to texture heaps to use - * \param nr_heaps Number of heap pointer in \a heap_array - * \param t Texture object for which space is needed - * \return The ID of the heap from which memory was allocated, or -1 if - * memory could not be allocated. - * - * \bug The replacement policy implemented by this function is horrible. - */ - - -int -driAllocateTexture( driTexHeap * const * heap_array, unsigned nr_heaps, - driTextureObject * t ) -{ - driTexHeap * heap; - driTextureObject * temp; - driTextureObject * cursor; - unsigned id; - - - /* In case it already has texture space, initialize heap. This also - * prevents GCC from issuing a warning that heap might be used - * uninitialized. - */ - - heap = t->heap; - - - /* Run through each of the existing heaps and try to allocate a buffer - * to hold the texture. - */ - - for ( id = 0 ; (t->memBlock == NULL) && (id < nr_heaps) ; id++ ) { - heap = heap_array[ id ]; - if ( heap != NULL ) { - t->memBlock = mmAllocMem( heap->memory_heap, t->totalSize, - heap->alignmentShift, 0 ); - } - } - - - /* Kick textures out until the requested texture fits. - */ - - if ( t->memBlock == NULL ) { - unsigned index[INDEX_ARRAY_SIZE]; - unsigned nrGoodHeaps = 0; - - /* Trying to avoid dynamic memory allocation. If you have more - * heaps, increase INDEX_ARRAY_SIZE. I'm not aware of any - * drivers with more than 2 tex heaps. */ - assert( nr_heaps < INDEX_ARRAY_SIZE ); - - /* Sort large enough heaps by duty. Insertion sort should be - * fast enough for such a short array. */ - for ( id = 0 ; id < nr_heaps ; id++ ) { - heap = heap_array[ id ]; - - if ( heap != NULL && t->totalSize <= heap->size ) { - unsigned j; - - for ( j = 0 ; j < nrGoodHeaps; j++ ) { - if ( heap->duty > heap_array[ index[ j ] ]->duty ) - break; - } - - if ( j < nrGoodHeaps ) { - memmove( &index[ j+1 ], &index[ j ], - sizeof(index[ 0 ]) * (nrGoodHeaps - j) ); - } - - index[ j ] = id; - - nrGoodHeaps++; - } - } - - for ( id = 0 ; (t->memBlock == NULL) && (id < nrGoodHeaps) ; id++ ) { - heap = heap_array[ index[ id ] ]; - - for ( cursor = heap->texture_objects.prev, temp = cursor->prev; - cursor != &heap->texture_objects ; - cursor = temp, temp = cursor->prev ) { - - /* The the LRU element. If the texture is bound to one of - * the texture units, then we cannot kick it out. - */ - if ( cursor->bound /* || cursor->reserved */ ) { - continue; - } - - if ( cursor->memBlock ) - heap->duty -= cursor->memBlock->size; - - /* If this is a placeholder, there's no need to keep it */ - if (cursor->tObj) - driSwapOutTextureObject( cursor ); - else - driDestroyTextureObject( cursor ); - - t->memBlock = mmAllocMem( heap->memory_heap, t->totalSize, - heap->alignmentShift, 0 ); - - if (t->memBlock) - break; - } - } - - /* Rebalance duties. If a heap kicked more data than its duty, - * then all other heaps get that amount multiplied with their - * relative weight added to their duty. The negative duty is - * reset to 0. In the end all heaps have a duty >= 0. - * - * CAUTION: we must not change the heap pointer here, because it - * is used below to update the texture object. - */ - for ( id = 0 ; id < nr_heaps ; id++ ) - if ( heap_array[ id ] != NULL && heap_array[ id ]->duty < 0) { - int duty = -heap_array[ id ]->duty; - double weight = heap_array[ id ]->weight; - unsigned j; - - for ( j = 0 ; j < nr_heaps ; j++ ) - if ( j != id && heap_array[ j ] != NULL ) { - heap_array[ j ]->duty += (double) duty * - heap_array[ j ]->weight / weight; - } - - heap_array[ id ]->duty = 0; - } - } - - - if ( t->memBlock != NULL ) { - /* id and heap->heapId may or may not be the same value here. - */ - - assert( heap != NULL ); - assert( (t->heap == NULL) || (t->heap == heap) ); - - t->heap = heap; - return heap->heapId; - } - else { - assert( t->heap == NULL ); - - fprintf( stderr, "[%s:%d] unable to allocate texture\n", - __FUNCTION__, __LINE__ ); - return -1; - } -} - - - - - - -/** - * Set the location where the texture-swap counter is stored. - */ - -void -driSetTextureSwapCounterLocation( driTexHeap * heap, unsigned * counter ) -{ - heap->texture_swaps = (counter == NULL) ? & dummy_swap_counter : counter; -} - - - - -/** - * Create a new heap for texture data. - * - * \param heap_id Device-dependent heap identifier. This value - * will returned by driAllocateTexture when memory - * is allocated from this heap. - * \param context Device-dependent driver context. This is - * supplied as the first parameter to the - * \c destroy_tex_obj function. - * \param size Size, in bytes, of the texture region - * \param alignmentShift Alignment requirement for textures. If textures - * must be allocated on a 4096 byte boundry, this - * would be 12. - * \param nr_regions Number of regions into which this texture space - * should be partitioned - * \param global_regions Array of \c drmTextureRegion structures in the SAREA - * \param global_age Pointer to the global texture age in the SAREA - * \param swapped_objects Pointer to the list of texture objects that are - * not in texture memory (i.e., have been swapped - * out). - * \param texture_object_size Size, in bytes, of a device-dependent texture - * object - * \param destroy_tex_obj Function used to destroy a device-dependent - * texture object - * - * \sa driDestroyTextureHeap - */ - -driTexHeap * -driCreateTextureHeap( unsigned heap_id, void * context, unsigned size, - unsigned alignmentShift, unsigned nr_regions, - drmTextureRegionPtr global_regions, unsigned * global_age, - driTextureObject * swapped_objects, - unsigned texture_object_size, - destroy_texture_object_t * destroy_tex_obj - ) -{ - driTexHeap * heap; - unsigned l; - - - if ( 0 ) - fprintf( stderr, "%s( %u, %p, %u, %u, %u )\n", - __FUNCTION__, - heap_id, (void *)context, size, alignmentShift, nr_regions ); - - heap = (driTexHeap *) CALLOC( sizeof( driTexHeap ) ); - if ( heap != NULL ) { - l = driLog2( (size - 1) / nr_regions ); - if ( l < alignmentShift ) - { - l = alignmentShift; - } - - heap->logGranularity = l; - heap->size = size & ~((1L << l) - 1); - - heap->memory_heap = mmInit( 0, heap->size ); - if ( heap->memory_heap != NULL ) { - heap->heapId = heap_id; - heap->driverContext = context; - - heap->alignmentShift = alignmentShift; - heap->nrRegions = nr_regions; - heap->global_regions = global_regions; - heap->global_age = global_age; - heap->swapped_objects = swapped_objects; - heap->texture_object_size = texture_object_size; - heap->destroy_texture_object = destroy_tex_obj; - - /* Force global heap init */ - if (heap->global_age[0] == 0) - heap->local_age = ~0; - else - heap->local_age = 0; - - make_empty_list( & heap->texture_objects ); - driSetTextureSwapCounterLocation( heap, NULL ); - - heap->weight = heap->size; - heap->duty = 0; - } - else { - FREE( heap ); - heap = NULL; - } - } - - - if ( 0 ) - fprintf( stderr, "%s returning %p\n", __FUNCTION__, (void *)heap ); - - return heap; -} - - - - -/** Destroys a texture heap - * - * \param heap Texture heap to be destroyed - */ - -void -driDestroyTextureHeap( driTexHeap * heap ) -{ - driTextureObject * t; - driTextureObject * temp; - - - if ( heap != NULL ) { - foreach_s( t, temp, & heap->texture_objects ) { - driDestroyTextureObject( t ); - } - foreach_s( t, temp, heap->swapped_objects ) { - driDestroyTextureObject( t ); - } - - mmDestroy( heap->memory_heap ); - FREE( heap ); - } -} - - - - -/****************************************************************************/ -/** - * Determine how many texels (including all mipmap levels) would be required - * for a texture map of size \f$2^^\c base_size_log2\f$ would require. - * - * \param base_size_log2 \f$log_2\f$ of the size of a side of the texture - * \param dimensions Number of dimensions of the texture. Either 2 or 3. - * \param faces Number of faces of the texture. Either 1 or 6 (for cube maps). - * \return Number of texels - */ - -static unsigned -texels_this_map_size( int base_size_log2, unsigned dimensions, unsigned faces ) -{ - unsigned texels; - - - assert( (faces == 1) || (faces == 6) ); - assert( (dimensions == 2) || (dimensions == 3) ); - - texels = 0; - if ( base_size_log2 >= 0 ) { - texels = (1U << (dimensions * base_size_log2)); - - /* See http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg03636.html - * for the complete explaination of why this formulation is used. - * Basically, the smaller mipmap levels sum to 0.333 the size of the - * level 0 map. The total size is therefore the size of the map - * multipled by 1.333. The +2 is there to round up. - */ - - texels = (texels * 4 * faces + 2) / 3; - } - - return texels; -} - - - - -struct maps_per_heap { - unsigned c[32]; -}; - -static void -fill_in_maximums( driTexHeap * const * heaps, unsigned nr_heaps, - unsigned max_bytes_per_texel, unsigned max_size, - unsigned mipmaps_at_once, unsigned dimensions, - unsigned faces, struct maps_per_heap * max_textures ) -{ - unsigned heap; - unsigned log2_size; - unsigned mask; - - - /* Determine how many textures of each size can be stored in each - * texture heap. - */ - - for ( heap = 0 ; heap < nr_heaps ; heap++ ) { - if ( heaps[ heap ] == NULL ) { - (void) memset( max_textures[ heap ].c, 0, - sizeof( max_textures[ heap ].c ) ); - continue; - } - - mask = (1U << heaps[ heap ]->logGranularity) - 1; - - if ( 0 ) { - fprintf( stderr, "[%s:%d] heap[%u] = %u bytes, mask = 0x%08x\n", - __FILE__, __LINE__, - heap, heaps[ heap ]->size, mask ); - } - - for ( log2_size = max_size ; log2_size > 0 ; log2_size-- ) { - unsigned total; - - - /* Determine the total number of bytes required by a texture of - * size log2_size. - */ - - total = texels_this_map_size( log2_size, dimensions, faces ) - - texels_this_map_size( log2_size - mipmaps_at_once, - dimensions, faces ); - total *= max_bytes_per_texel; - total = (total + mask) & ~mask; - - /* The number of textures of a given size that will fit in a heap - * is equal to the size of the heap divided by the size of the - * texture. - */ - - max_textures[ heap ].c[ log2_size ] = heaps[ heap ]->size / total; - - if ( 0 ) { - fprintf( stderr, "[%s:%d] max_textures[%u].c[%02u] " - "= 0x%08x / 0x%08x " - "= %u (%u)\n", - __FILE__, __LINE__, - heap, log2_size, - heaps[ heap ]->size, total, - heaps[ heap ]->size / total, - max_textures[ heap ].c[ log2_size ] ); - } - } - } -} - - -static unsigned -get_max_size( unsigned nr_heaps, - unsigned texture_units, - unsigned max_size, - int all_textures_one_heap, - struct maps_per_heap * max_textures ) -{ - unsigned heap; - unsigned log2_size; - - - /* Determine the largest texture size such that a texture of that size - * can be bound to each texture unit at the same time. Some hardware - * may require that all textures be in the same texture heap for - * multitexturing. - */ - - for ( log2_size = max_size ; log2_size > 0 ; log2_size-- ) { - unsigned total = 0; - - for ( heap = 0 ; heap < nr_heaps ; heap++ ) - { - total += max_textures[ heap ].c[ log2_size ]; - - if ( 0 ) { - fprintf( stderr, "[%s:%d] max_textures[%u].c[%02u] = %u, " - "total = %u\n", __FILE__, __LINE__, heap, log2_size, - max_textures[ heap ].c[ log2_size ], total ); - } - - if ( (max_textures[ heap ].c[ log2_size ] >= texture_units) - || (!all_textures_one_heap && (total >= texture_units)) ) { - /* The number of mipmap levels is the log-base-2 of the - * maximum texture size plus 1. If the maximum texture size - * is 1x1, the log-base-2 is 0 and 1 mipmap level (the base - * level) is available. - */ - - return log2_size + 1; - } - } - } - - /* This should NEVER happen. It should always be possible to have at - * *least* a 1x1 texture in memory! - */ - assert( log2_size != 0 ); - return 0; -} - -#define SET_MAX(f,v) \ - do { if ( max_sizes[v] != 0 ) { limits-> f = max_sizes[v]; } } while( 0 ) - -#define SET_MAX_RECT(f,v) \ - do { if ( max_sizes[v] != 0 ) { limits-> f = 1 << max_sizes[v]; } } while( 0 ) - - -/** - * Given the amount of texture memory, the number of texture units, and the - * maximum size of a texel, calculate the maximum texture size the driver can - * advertise. - * - * \param heaps Texture heaps for this card - * \param nr_heap Number of texture heaps - * \param limits OpenGL contants. MaxTextureUnits must be set. - * \param max_bytes_per_texel Maximum size of a single texel, in bytes - * \param max_2D_size \f$\log_2\f$ of the maximum 2D texture size (i.e., - * 1024x1024 textures, this would be 10) - * \param max_3D_size \f$\log_2\f$ of the maximum 3D texture size (i.e., - * 1024x1024x1024 textures, this would be 10) - * \param max_cube_size \f$\log_2\f$ of the maximum cube texture size (i.e., - * 1024x1024 textures, this would be 10) - * \param max_rect_size \f$\log_2\f$ of the maximum texture rectangle size - * (i.e., 1024x1024 textures, this would be 10). This is a power-of-2 - * even though texture rectangles need not be a power-of-2. - * \param mipmaps_at_once Total number of mipmaps that can be used - * at one time. For most hardware this will be \f$\c max_size + 1\f$. - * For hardware that does not support mipmapping, this will be 1. - * \param all_textures_one_heap True if the hardware requires that all - * textures be in a single texture heap for multitexturing. - */ - -void -driCalculateMaxTextureLevels( driTexHeap * const * heaps, - unsigned nr_heaps, - struct gl_constants * limits, - unsigned max_bytes_per_texel, - unsigned max_2D_size, - unsigned max_3D_size, - unsigned max_cube_size, - unsigned max_rect_size, - unsigned mipmaps_at_once, - int all_textures_one_heap ) -{ - struct maps_per_heap max_textures[8]; - unsigned i; - const unsigned dimensions[4] = { 2, 3, 2, 2 }; - const unsigned faces[4] = { 1, 1, 6, 1 }; - unsigned max_sizes[4]; - unsigned mipmaps[4]; - - - max_sizes[0] = max_2D_size; - max_sizes[1] = max_3D_size; - max_sizes[2] = max_cube_size; - max_sizes[3] = max_rect_size; - - mipmaps[0] = mipmaps_at_once; - mipmaps[1] = mipmaps_at_once; - mipmaps[2] = 1; - mipmaps[3] = mipmaps_at_once; - - - /* Calculate the maximum number of texture levels in two passes. The - * first pass determines how many textures of each power-of-two size - * (including all mipmap levels for that size) can fit in each texture - * heap. The second pass finds the largest texture size that allows - * a texture of that size to be bound to every texture unit. - */ - - for ( i = 0 ; i < 4 ; i++ ) { - if ( max_sizes[ i ] != 0 ) { - fill_in_maximums( heaps, nr_heaps, max_bytes_per_texel, - max_sizes[ i ], mipmaps[ i ], - dimensions[ i ], faces[ i ], - max_textures ); - - max_sizes[ i ] = get_max_size( nr_heaps, - limits->MaxTextureUnits, - max_sizes[ i ], - all_textures_one_heap, - max_textures ); - } - } - - SET_MAX( MaxTextureLevels, 0 ); - SET_MAX( Max3DTextureLevels, 1 ); - SET_MAX( MaxCubeTextureLevels, 2 ); - SET_MAX_RECT( MaxTextureRectSize, 3 ); -} - - - - -/** - * Perform initial binding of default textures objects on a per unit, per - * texture target basis. - * - * \param ctx Current OpenGL context - * \param swapped List of swapped-out textures - * \param targets Bit-mask of value texture targets - */ - -void driInitTextureObjects( GLcontext *ctx, driTextureObject * swapped, - GLuint targets ) -{ - struct gl_texture_object *texObj; - GLuint tmp = ctx->Texture.CurrentUnit; - unsigned i; - - - for ( i = 0 ; i < ctx->Const.MaxTextureUnits ; i++ ) { - ctx->Texture.CurrentUnit = i; - - if ( (targets & DRI_TEXMGR_DO_TEXTURE_1D) != 0 ) { - texObj = ctx->Texture.Unit[i].Current1D; - ctx->Driver.BindTexture( ctx, GL_TEXTURE_1D, texObj ); - move_to_tail( swapped, (driTextureObject *) texObj->DriverData ); - } - - if ( (targets & DRI_TEXMGR_DO_TEXTURE_2D) != 0 ) { - texObj = ctx->Texture.Unit[i].Current2D; - ctx->Driver.BindTexture( ctx, GL_TEXTURE_2D, texObj ); - move_to_tail( swapped, (driTextureObject *) texObj->DriverData ); - } - - if ( (targets & DRI_TEXMGR_DO_TEXTURE_3D) != 0 ) { - texObj = ctx->Texture.Unit[i].Current3D; - ctx->Driver.BindTexture( ctx, GL_TEXTURE_3D, texObj ); - move_to_tail( swapped, (driTextureObject *) texObj->DriverData ); - } - - if ( (targets & DRI_TEXMGR_DO_TEXTURE_CUBE) != 0 ) { - texObj = ctx->Texture.Unit[i].CurrentCubeMap; - ctx->Driver.BindTexture( ctx, GL_TEXTURE_CUBE_MAP_ARB, texObj ); - move_to_tail( swapped, (driTextureObject *) texObj->DriverData ); - } - - if ( (targets & DRI_TEXMGR_DO_TEXTURE_RECT) != 0 ) { - texObj = ctx->Texture.Unit[i].CurrentRect; - ctx->Driver.BindTexture( ctx, GL_TEXTURE_RECTANGLE_NV, texObj ); - move_to_tail( swapped, (driTextureObject *) texObj->DriverData ); - } - } - - ctx->Texture.CurrentUnit = tmp; -} - - - - -/** - * Verify that the specified texture is in the specificed heap. - * - * \param tex Texture to be tested. - * \param heap Texture memory heap to be tested. - * \return True if the texture is in the heap, false otherwise. - */ - -static GLboolean -check_in_heap( const driTextureObject * tex, const driTexHeap * heap ) -{ -#if 1 - return tex->heap == heap; -#else - driTextureObject * curr; - - foreach( curr, & heap->texture_objects ) { - if ( curr == tex ) { - break; - } - } - - return curr == tex; -#endif -} - - - -/****************************************************************************/ -/** - * Validate the consistency of a set of texture heaps. - * Original version by Keith Whitwell in r200/r200_sanity.c. - */ - -GLboolean -driValidateTextureHeaps( driTexHeap * const * texture_heaps, - unsigned nr_heaps, const driTextureObject * swapped ) -{ - driTextureObject *t; - unsigned i; - - for ( i = 0 ; i < nr_heaps ; i++ ) { - int last_end = 0; - unsigned textures_in_heap = 0; - unsigned blocks_in_mempool = 0; - const driTexHeap * heap = texture_heaps[i]; - const memHeap_t * p = heap->memory_heap; - - /* Check each texture object has a MemBlock, and is linked into - * the correct heap. - * - * Check the texobj base address corresponds to the MemBlock - * range. Check the texobj size (recalculate?) fits within - * the MemBlock. - * - * Count the number of texobj's using this heap. - */ - - foreach ( t, &heap->texture_objects ) { - if ( !check_in_heap( t, heap ) ) { - fprintf( stderr, "%s memory block for texture object @ %p not " - "found in heap #%d\n", - __FUNCTION__, (void *)t, i ); - return GL_FALSE; - } - - - if ( t->totalSize > t->memBlock->size ) { - fprintf( stderr, "%s: Memory block for texture object @ %p is " - "only %u bytes, but %u are required\n", - __FUNCTION__, (void *)t, t->totalSize, t->memBlock->size ); - return GL_FALSE; - } - - textures_in_heap++; - } - - /* Validate the contents of the heap: - * - Ordering - * - Overlaps - * - Bounds - */ - - while ( p != NULL ) { - if (p->reserved) { - fprintf( stderr, "%s: Block (%08x,%x), is reserved?!\n", - __FUNCTION__, p->ofs, p->size ); - return GL_FALSE; - } - - if (p->ofs != last_end) { - fprintf( stderr, "%s: blocks_in_mempool = %d, last_end = %d, p->ofs = %d\n", - __FUNCTION__, blocks_in_mempool, last_end, p->ofs ); - return GL_FALSE; - } - - if (!p->reserved && !p->free) { - blocks_in_mempool++; - } - - last_end = p->ofs + p->size; - p = p->next; - } - - if (textures_in_heap != blocks_in_mempool) { - fprintf( stderr, "%s: Different number of textures objects (%u) and " - "inuse memory blocks (%u)\n", - __FUNCTION__, textures_in_heap, blocks_in_mempool ); - return GL_FALSE; - } - -#if 0 - fprintf( stderr, "%s: textures_in_heap = %u\n", - __FUNCTION__, textures_in_heap ); -#endif - } - - - /* Check swapped texobj's have zero memblocks - */ - i = 0; - foreach ( t, swapped ) { - if ( t->memBlock != NULL ) { - fprintf( stderr, "%s: Swapped texobj %p has non-NULL memblock %p\n", - __FUNCTION__, (void *)t, (void *)t->memBlock ); - return GL_FALSE; - } - i++; - } - -#if 0 - fprintf( stderr, "%s: swapped texture count = %u\n", __FUNCTION__, i ); -#endif - - return GL_TRUE; -} - - - - -/****************************************************************************/ -/** - * Compute which mipmap levels that really need to be sent to the hardware. - * This depends on the base image size, GL_TEXTURE_MIN_LOD, - * GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, and GL_TEXTURE_MAX_LEVEL. - */ - -void -driCalculateTextureFirstLastLevel( driTextureObject * t ) -{ - struct gl_texture_object * const tObj = t->tObj; - const struct gl_texture_image * const baseImage = - tObj->Image[0][tObj->BaseLevel]; - - /* These must be signed values. MinLod and MaxLod can be negative numbers, - * and having firstLevel and lastLevel as signed prevents the need for - * extra sign checks. - */ - int firstLevel; - int lastLevel; - - /* Yes, this looks overly complicated, but it's all needed. - */ - - switch (tObj->Target) { - case GL_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_TEXTURE_3D: - case GL_TEXTURE_CUBE_MAP: - if (tObj->MinFilter == GL_NEAREST || tObj->MinFilter == GL_LINEAR) { - /* GL_NEAREST and GL_LINEAR only care about GL_TEXTURE_BASE_LEVEL. - */ - - firstLevel = lastLevel = tObj->BaseLevel; - } - else { - firstLevel = tObj->BaseLevel + (GLint)(tObj->MinLod + 0.5); - firstLevel = MAX2(firstLevel, tObj->BaseLevel); - lastLevel = tObj->BaseLevel + (GLint)(tObj->MaxLod + 0.5); - lastLevel = MAX2(lastLevel, t->tObj->BaseLevel); - lastLevel = MIN2(lastLevel, t->tObj->BaseLevel + baseImage->MaxLog2); - lastLevel = MIN2(lastLevel, t->tObj->MaxLevel); - lastLevel = MAX2(firstLevel, lastLevel); /* need at least one level */ - } - break; - case GL_TEXTURE_RECTANGLE_NV: - case GL_TEXTURE_4D_SGIS: - firstLevel = lastLevel = 0; - break; - default: - return; - } - - /* save these values */ - t->firstLevel = firstLevel; - t->lastLevel = lastLevel; -} - - - - -/** - * \name DRI texture formats. Pointers initialized to either the big- or - * little-endian Mesa formats. - */ -/*@{*/ -const struct gl_texture_format *_dri_texformat_rgba8888 = NULL; -const struct gl_texture_format *_dri_texformat_argb8888 = NULL; -const struct gl_texture_format *_dri_texformat_rgb565 = NULL; -const struct gl_texture_format *_dri_texformat_argb4444 = NULL; -const struct gl_texture_format *_dri_texformat_argb1555 = NULL; -const struct gl_texture_format *_dri_texformat_al88 = NULL; -const struct gl_texture_format *_dri_texformat_a8 = &_mesa_texformat_a8; -const struct gl_texture_format *_dri_texformat_ci8 = &_mesa_texformat_ci8; -const struct gl_texture_format *_dri_texformat_i8 = &_mesa_texformat_i8; -const struct gl_texture_format *_dri_texformat_l8 = &_mesa_texformat_l8; -/*@}*/ - - -/** - * Initialize little endian target, host byte order independent texture formats - */ -void -driInitTextureFormats(void) -{ - const GLuint ui = 1; - const GLubyte littleEndian = *((const GLubyte *) &ui); - - if (littleEndian) { - _dri_texformat_rgba8888 = &_mesa_texformat_rgba8888; - _dri_texformat_argb8888 = &_mesa_texformat_argb8888; - _dri_texformat_rgb565 = &_mesa_texformat_rgb565; - _dri_texformat_argb4444 = &_mesa_texformat_argb4444; - _dri_texformat_argb1555 = &_mesa_texformat_argb1555; - _dri_texformat_al88 = &_mesa_texformat_al88; - } - else { - _dri_texformat_rgba8888 = &_mesa_texformat_rgba8888_rev; - _dri_texformat_argb8888 = &_mesa_texformat_argb8888_rev; - _dri_texformat_rgb565 = &_mesa_texformat_rgb565_rev; - _dri_texformat_argb4444 = &_mesa_texformat_argb4444_rev; - _dri_texformat_argb1555 = &_mesa_texformat_argb1555_rev; - _dri_texformat_al88 = &_mesa_texformat_al88_rev; - } -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/texmem.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/texmem.h deleted file mode 100644 index 705cd4d344..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/texmem.h +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Copyright 2000-2001 VA Linux Systems, Inc. - * (c) Copyright IBM Corporation 2002 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Ian Romanick - * Keith Whitwell - * Kevin E. Martin - * Gareth Hughes - */ -/* $XFree86:$ */ - -/** \file texmem.h - * Public interface to the DRI texture memory management routines. - * - * \sa texmem.c - */ - -#ifndef DRI_TEXMEM_H -#define DRI_TEXMEM_H - -#include "mtypes.h" -#include "mm.h" -#include "xf86drm.h" - -struct dri_tex_heap; -typedef struct dri_tex_heap driTexHeap; - -struct dri_texture_object; -typedef struct dri_texture_object driTextureObject; - - -/** - * Base texture object type. Each driver will extend this type with its own - * private data members. - */ - -struct dri_texture_object { - struct dri_texture_object * next; - struct dri_texture_object * prev; - - driTexHeap * heap; /**< Texture heap currently stored in */ - struct gl_texture_object * tObj;/**< Pointer to Mesa texture object - * If NULL, this texture object is a - * "placeholder" object representing - * texture memory in use by another context. - * A placeholder should have a heap and a memBlock. - */ - PMemBlock memBlock; /**< Memory block containing texture */ - unsigned bound; /**< Texture unit currently bound to */ - - unsigned totalSize; /**< Total size of the texture, - * including all mipmap levels - */ - - unsigned dirty_images[6]; /**< Flags for whether or not images - * need to be uploaded to local or - * AGP texture space. One flag set - * for each cube face for cubic - * textures. Bit zero corresponds to - * the base-level, which may or may - * not be the level zero mipmap. - */ - - unsigned timestamp; /**< Timestamp used to - * synchronize with 3d engine - * in hardware where textures - * are uploaded directly to - * the framebuffer. - */ - - unsigned firstLevel; /**< Image in \c tObj->Image[0] that - * corresponds to the base-level of - * this texture object. - */ - - unsigned lastLevel; /**< Last image in \c tObj->Image[0] - * used by the - * current LOD settings of - * this texture object. This - * value must be greater than - * or equal to \c firstLevel. - */ -}; - - -typedef void (destroy_texture_object_t)( void * driverContext, - driTextureObject * t ); - -/** - * Client-private representation of texture memory state. - * - * Clients will place one or more of these structs in their driver - * context struct to manage one or more global texture heaps. - */ - -struct dri_tex_heap { - - /** Client-supplied heap identifier - */ - unsigned heapId; - - /** Pointer to the client's private context - */ - void *driverContext; - - /** Total size of the heap, in bytes - */ - unsigned size; - - /** \brief \f$log_2\f$ of size of single heap region - * - * Each context takes memory from the global texture heap in - * \f$2^{logGranularity}\f$ byte blocks. The value of - * \a logGranularity is based on the amount of memory represented - * by the heap and the maximum number of regions in the SAREA. Given - * \a b bytes of texture memory an \a n regions in the SAREA, - * \a logGranularity will be \f$\lfloor\log_2( b / n )\rfloor\f$. - */ - unsigned logGranularity; - - /** \brief Required alignment of allocations in this heap - * - * The alignment shift is supplied to \a mmAllocMem when memory is - * allocated from this heap. The value of \a alignmentShift will - * typically reflect some require of the hardware. This value has - * \b no \b relation to \a logGranularity. \a alignmentShift is a - * per-context value. - * - * \sa mmAllocMem - */ - unsigned alignmentShift; - - /** Number of elements in global list (the SAREA). - */ - unsigned nrRegions; - - /** Pointer to SAREA \a driTexRegion array - */ - drmTextureRegionPtr global_regions; - - /** Pointer to the texture state age (generation number) in the SAREA - */ - unsigned * global_age; - - /** Local age (generation number) of texture state - */ - unsigned local_age; - - /** Memory heap used to manage texture memory represented by - * this texture heap. - */ - memHeap_t * memory_heap; - - /** List of objects that we currently believe to be in texture - * memory. - */ - driTextureObject texture_objects; - - /** Pointer to the list of texture objects that are not in - * texture memory. - */ - driTextureObject * swapped_objects; - - /** Size of the driver-speicific texture object. - */ - unsigned texture_object_size; - - - /** - * \brief Function to destroy driver-specific texture object data. - * - * This function is supplied by the driver so that the texture manager - * can release all resources associated with a texture object. This - * function should only release driver-specific data. That is, - * \a driDestroyTextureObject will release the texture memory - * associated with the texture object, it will release the memory - * for the texture object itself, and it will unlink the texture - * object from the texture object lists. - * - * \param driverContext Pointer to the driver supplied context - * \param t Texture object that is to be destroyed - * \sa driDestroyTextureObject - */ - - destroy_texture_object_t * destroy_texture_object; - - - /** - */ - unsigned * texture_swaps; - - /** - * Timestamp used to synchronize with 3d engine in hardware - * where textures are uploaded directly to the - * framebuffer. - */ - unsigned timestamp; - - /** \brief Kick/upload weight - * - * When not enough free space is available this weight - * influences the choice of the heap from which textures are - * kicked. By default the weight is equal to the heap size. - */ - double weight; - - /** \brief Kick/upload duty - * - * The heap with the highest duty will be chosen for kicking - * textures if not enough free space is available. The duty is - * reduced by the amount of data kicked. Rebalancing of - * negative duties takes the weights into account. - */ - int duty; -}; - - - - -/** - * Called by the client on lock contention to determine whether textures have - * been stolen. If another client has modified a region in which we have - * textures, then we need to figure out which of our textures have been - * removed and update our global LRU. - * - * \param heap Texture heap to be updated - * \hideinitializer - */ - -#define DRI_AGE_TEXTURES( heap ) \ - do { \ - if ( ((heap) != NULL) \ - && ((heap)->local_age != (heap)->global_age[0]) ) \ - driAgeTextures( heap ); \ - } while( 0 ) - - - - -/* This should be called whenever there has been contention on the hardware - * lock. driAgeTextures should not be called directly. Instead, clients - * should use DRI_AGE_TEXTURES, above. - */ - -void driAgeTextures( driTexHeap * heap ); - -void driUpdateTextureLRU( driTextureObject * t ); -void driSwapOutTextureObject( driTextureObject * t ); -void driDestroyTextureObject( driTextureObject * t ); -int driAllocateTexture( driTexHeap * const * heap_array, unsigned nr_heaps, - driTextureObject * t ); - -GLboolean driIsTextureResident( GLcontext * ctx, - struct gl_texture_object * texObj ); - -driTexHeap * driCreateTextureHeap( unsigned heap_id, void * context, - unsigned size, unsigned alignmentShift, unsigned nr_regions, - drmTextureRegionPtr global_regions, unsigned * global_age, - driTextureObject * swapped_objects, unsigned texture_object_size, - destroy_texture_object_t * destroy_tex_obj ); -void driDestroyTextureHeap( driTexHeap * heap ); - -void -driCalculateMaxTextureLevels( driTexHeap * const * heaps, - unsigned nr_heaps, - struct gl_constants * limits, - unsigned max_bytes_per_texel, - unsigned max_2D_size, - unsigned max_3D_size, - unsigned max_cube_size, - unsigned max_rect_size, - unsigned mipmaps_at_once, - int all_textures_one_heap ); - -void -driSetTextureSwapCounterLocation( driTexHeap * heap, unsigned * counter ); - -#define DRI_TEXMGR_DO_TEXTURE_1D 0x0001 -#define DRI_TEXMGR_DO_TEXTURE_2D 0x0002 -#define DRI_TEXMGR_DO_TEXTURE_3D 0x0004 -#define DRI_TEXMGR_DO_TEXTURE_CUBE 0x0008 -#define DRI_TEXMGR_DO_TEXTURE_RECT 0x0010 - -void driInitTextureObjects( GLcontext *ctx, driTextureObject * swapped, - GLuint targets ); - -GLboolean driValidateTextureHeaps( driTexHeap * const * texture_heaps, - unsigned nr_heaps, const driTextureObject * swapped ); - -extern void driCalculateTextureFirstLastLevel( driTextureObject * t ); - - -extern const struct gl_texture_format *_dri_texformat_rgba8888; -extern const struct gl_texture_format *_dri_texformat_argb8888; -extern const struct gl_texture_format *_dri_texformat_rgb565; -extern const struct gl_texture_format *_dri_texformat_argb4444; -extern const struct gl_texture_format *_dri_texformat_argb1555; -extern const struct gl_texture_format *_dri_texformat_al88; -extern const struct gl_texture_format *_dri_texformat_a8; -extern const struct gl_texture_format *_dri_texformat_ci8; -extern const struct gl_texture_format *_dri_texformat_i8; -extern const struct gl_texture_format *_dri_texformat_l8; - -extern void driInitTextureFormats( void ); - -#endif /* DRI_TEXMEM_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/utils.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/utils.c deleted file mode 100644 index fbe1991fa5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/utils.c +++ /dev/null @@ -1,695 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2002, 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file utils.c - * Utility functions for DRI drivers. - * - * \author Ian Romanick - */ - -#include -#include -#include "mtypes.h" -#include "extensions.h" -#include "utils.h" -#include "dispatch.h" - -int driDispatchRemapTable[ driDispatchRemapTable_size ]; - -#if defined(USE_X86_ASM) -#include "x86/common_x86_asm.h" -#endif - -#if defined(USE_PPC_ASM) -#include "ppc/common_ppc_features.h" -#endif - -unsigned -driParseDebugString( const char * debug, - const struct dri_debug_control * control ) -{ - unsigned flag; - - - flag = 0; - if ( debug != NULL ) { - while( control->string != NULL ) { - if ( !strcmp( debug, "all" ) || - strstr( debug, control->string ) != NULL ) { - flag |= control->flag; - } - - control++; - } - } - - return flag; -} - - - -/** - * Create the \c GL_RENDERER string for DRI drivers. - * - * Almost all DRI drivers use a \c GL_RENDERER string of the form: - * - * "Mesa DRI " - * - * Using the supplied chip name, driver data, and AGP speed, this function - * creates the string. - * - * \param buffer Buffer to hold the \c GL_RENDERER string. - * \param hardware_name Name of the hardware. - * \param driver_date Driver date. - * \param agp_mode AGP mode (speed). - * - * \returns - * The length of the string stored in \c buffer. This does \b not include - * the terminating \c NUL character. - */ -unsigned -driGetRendererString( char * buffer, const char * hardware_name, - const char * driver_date, GLuint agp_mode ) -{ -#define MAX_INFO 4 - const char * cpu[MAX_INFO]; - unsigned next = 0; - unsigned i; - unsigned offset; - - - offset = sprintf( buffer, "Mesa DRI %s %s", hardware_name, driver_date ); - - /* Append any AGP-specific information. - */ - switch ( agp_mode ) { - case 1: - case 2: - case 4: - case 8: - offset += sprintf( & buffer[ offset ], " AGP %ux", agp_mode ); - break; - - default: - break; - } - - /* Append any CPU-specific information. - */ -#ifdef USE_X86_ASM - if ( _mesa_x86_cpu_features ) { - cpu[next] = " x86"; - next++; - } -# ifdef USE_MMX_ASM - if ( cpu_has_mmx ) { - cpu[next] = (cpu_has_mmxext) ? "/MMX+" : "/MMX"; - next++; - } -# endif -# ifdef USE_3DNOW_ASM - if ( cpu_has_3dnow ) { - cpu[next] = (cpu_has_3dnowext) ? "/3DNow!+" : "/3DNow!"; - next++; - } -# endif -# ifdef USE_SSE_ASM - if ( cpu_has_xmm ) { - cpu[next] = (cpu_has_xmm2) ? "/SSE2" : "/SSE"; - next++; - } -# endif - -#elif defined(USE_SPARC_ASM) - - cpu[0] = " SPARC"; - next = 1; - -#elif defined(USE_PPC_ASM) - if ( _mesa_ppc_cpu_features ) { - cpu[next] = (cpu_has_64) ? " PowerPC 64" : " PowerPC"; - next++; - } - -# ifdef USE_VMX_ASM - if ( cpu_has_vmx ) { - cpu[next] = "/Altivec"; - next++; - } -# endif - - if ( ! cpu_has_fpu ) { - cpu[next] = "/No FPU"; - next++; - } -#endif - - for ( i = 0 ; i < next ; i++ ) { - const size_t len = strlen( cpu[i] ); - - strncpy( & buffer[ offset ], cpu[i], len ); - offset += len; - } - - return offset; -} - - - - -#define need_GL_ARB_multisample -#define need_GL_ARB_transpose_matrix -#define need_GL_ARB_window_pos -#define need_GL_EXT_compiled_vertex_array -#define need_GL_EXT_polygon_offset -#define need_GL_EXT_texture_object -#define need_GL_EXT_vertex_array -#define need_GL_MESA_window_pos - -/* These are needed in *all* drivers because Mesa internally implements - * certain functionality in terms of functions provided by these extensions. - * For example, glBlendFunc is implemented by calling glBlendFuncSeparateEXT. - */ -#define need_GL_EXT_blend_func_separate -#define need_GL_NV_vertex_program - -#include "extension_helper.h" - -static const struct dri_extension all_mesa_extensions[] = { - { "GL_ARB_multisample", GL_ARB_multisample_functions }, - { "GL_ARB_transpose_matrix", GL_ARB_transpose_matrix_functions }, - { "GL_ARB_window_pos", GL_ARB_window_pos_functions }, - { "GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions }, - { "GL_EXT_compiled_vertex_array", GL_EXT_compiled_vertex_array_functions }, - { "GL_EXT_polygon_offset", GL_EXT_polygon_offset_functions }, - { "GL_EXT_texture_object", GL_EXT_texture_object_functions }, - { "GL_EXT_vertex_array", GL_EXT_vertex_array_functions }, - { "GL_MESA_window_pos", GL_MESA_window_pos_functions }, - { "GL_NV_vertex_program", GL_NV_vertex_program_functions }, - { NULL, NULL } -}; - - -/** - * Enable extensions supported by the driver. - * - * \bug - * ARB_imaging isn't handled properly. In Mesa, enabling ARB_imaging also - * enables all the sub-extensions that are folded into it. This means that - * we need to add entry-points (via \c driInitSingleExtension) for those - * new functions here. - */ -void driInitExtensions( GLcontext * ctx, - const struct dri_extension * extensions_to_enable, - GLboolean enable_imaging ) -{ - static int first_time = 1; - unsigned i; - - if ( first_time ) { - for ( i = 0 ; i < driDispatchRemapTable_size ; i++ ) { - driDispatchRemapTable[i] = -1; - } - - first_time = 0; - driInitExtensions( ctx, all_mesa_extensions, GL_FALSE ); - } - - if ( (ctx != NULL) && enable_imaging ) { - _mesa_enable_imaging_extensions( ctx ); - } - - for ( i = 0 ; extensions_to_enable[i].name != NULL ; i++ ) { - driInitSingleExtension( ctx, & extensions_to_enable[i] ); - } -} - - - - -/** - * Enable and add dispatch functions for a single extension - * - * \param ctx Context where extension is to be enabled. - * \param ext Extension that is to be enabled. - * - * \sa driInitExtensions, _mesa_enable_extension, _glapi_add_entrypoint - * - * \todo - * Determine if it would be better to use \c strlen instead of the hardcoded - * for-loops. - */ -void driInitSingleExtension( GLcontext * ctx, - const struct dri_extension * ext ) -{ - unsigned i; - - - if ( ext->functions != NULL ) { - for ( i = 0 ; ext->functions[i].strings != NULL ; i++ ) { - const char * functions[16]; - const char * parameter_signature; - const char * str = ext->functions[i].strings; - unsigned j; - unsigned offset; - - - /* Separate the parameter signature from the rest of the string. - * If the parameter signature is empty (i.e., the string starts - * with a NUL character), then the function has a void parameter - * list. - */ - parameter_signature = str; - while ( str[0] != '\0' ) { - str++; - } - str++; - - - /* Divide the string into the substrings that name each - * entry-point for the function. - */ - for ( j = 0 ; j < 16 ; j++ ) { - if ( str[0] == '\0' ) { - functions[j] = NULL; - break; - } - - functions[j] = str; - - while ( str[0] != '\0' ) { - str++; - } - str++; - } - - - /* Add each entry-point to the dispatch table. - */ - offset = _glapi_add_dispatch( functions, parameter_signature ); - if ( ext->functions[i].remap_index != -1 ) { - driDispatchRemapTable[ ext->functions[i].remap_index ] = offset; - } - - if ( (ext->functions[i].offset != -1) - && (ext->functions[i].offset != offset) ) { - fprintf(stderr, "DISPATCH ERROR! %s -> %u != %u\n", functions[0], - driDispatchRemapTable[ ext->functions[i].remap_index ], - ext->functions[i].offset); - } - } - } - - if ( ctx != NULL ) { - _mesa_enable_extension( ctx, ext->name ); - } -} - - -/** - * Utility function used by drivers to test the verions of other components. - * - * If one of the version requirements is not met, a message is logged using - * \c __driUtilMessage. - * - * \param driver_name Name of the driver. Used in error messages. - * \param driActual Actual DRI version supplied __driCreateNewScreen. - * \param driExpected Minimum DRI version required by the driver. - * \param ddxActual Actual DDX version supplied __driCreateNewScreen. - * \param ddxExpected Minimum DDX minor and range of DDX major version required by the driver. - * \param drmActual Actual DRM version supplied __driCreateNewScreen. - * \param drmExpected Minimum DRM version required by the driver. - * - * \returns \c GL_TRUE if all version requirements are met. Otherwise, - * \c GL_FALSE is returned. - * - * \sa __driCreateNewScreen, driCheckDriDdxDrmVersions2, __driUtilMessage - * - * \todo - * Now that the old \c driCheckDriDdxDrmVersions function is gone, this - * function and \c driCheckDriDdxDrmVersions2 should be renamed. - */ -GLboolean -driCheckDriDdxDrmVersions3(const char * driver_name, - const __DRIversion * driActual, - const __DRIversion * driExpected, - const __DRIversion * ddxActual, - const __DRIutilversion2 * ddxExpected, - const __DRIversion * drmActual, - const __DRIversion * drmExpected) -{ - static const char format[] = "%s DRI driver expected %s version %d.%d.x " - "but got version %d.%d.%d"; - static const char format2[] = "%s DRI driver expected %s version %d-%d.%d.x " - "but got version %d.%d.%d"; - - - /* Check the DRI version */ - if ( (driActual->major != driExpected->major) - || (driActual->minor < driExpected->minor) ) { - __driUtilMessage(format, driver_name, "DRI", - driExpected->major, driExpected->minor, - driActual->major, driActual->minor, driActual->patch); - return GL_FALSE; - } - - /* Check that the DDX driver version is compatible */ - if ( (ddxActual->major < ddxExpected->major_min) - || (ddxActual->major > ddxExpected->major_max) - || (ddxActual->minor < ddxExpected->minor) ) { - __driUtilMessage(format2, driver_name, "DDX", - ddxExpected->major_min, ddxExpected->major_max, ddxExpected->minor, - ddxActual->major, ddxActual->minor, ddxActual->patch); - return GL_FALSE; - } - - /* Check that the DRM driver version is compatible */ - if ( (drmActual->major != drmExpected->major) - || (drmActual->minor < drmExpected->minor) ) { - __driUtilMessage(format, driver_name, "DRM", - drmExpected->major, drmExpected->minor, - drmActual->major, drmActual->minor, drmActual->patch); - return GL_FALSE; - } - - return GL_TRUE; -} - -GLboolean -driCheckDriDdxDrmVersions2(const char * driver_name, - const __DRIversion * driActual, - const __DRIversion * driExpected, - const __DRIversion * ddxActual, - const __DRIversion * ddxExpected, - const __DRIversion * drmActual, - const __DRIversion * drmExpected) -{ - __DRIutilversion2 ddx_expected; - ddx_expected.major_min = ddxExpected->major; - ddx_expected.major_max = ddxExpected->major; - ddx_expected.minor = ddxExpected->minor; - ddx_expected.patch = ddxExpected->patch; - return driCheckDriDdxDrmVersions3(driver_name, driActual, - driExpected, ddxActual, & ddx_expected, - drmActual, drmExpected); -} - - - -GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer, - GLint *x, GLint *y, - GLsizei *width, GLsizei *height ) -{ - /* left clipping */ - if (*x < buffer->_Xmin) { - *width -= (buffer->_Xmin - *x); - *x = buffer->_Xmin; - } - - /* right clipping */ - if (*x + *width > buffer->_Xmax) - *width -= (*x + *width - buffer->_Xmax - 1); - - if (*width <= 0) - return GL_FALSE; - - /* bottom clipping */ - if (*y < buffer->_Ymin) { - *height -= (buffer->_Ymin - *y); - *y = buffer->_Ymin; - } - - /* top clipping */ - if (*y + *height > buffer->_Ymax) - *height -= (*y + *height - buffer->_Ymax - 1); - - if (*height <= 0) - return GL_FALSE; - - return GL_TRUE; -} - - - -/** - * Creates a set of \c __GLcontextModes that a driver will expose. - * - * A set of \c __GLcontextModes will be created based on the supplied - * parameters. The number of modes processed will be 2 * - * \c num_depth_stencil_bits * \c num_db_modes. - * - * For the most part, data is just copied from \c depth_bits, \c stencil_bits, - * \c db_modes, and \c visType into each \c __GLcontextModes element. - * However, the meanings of \c fb_format and \c fb_type require further - * explanation. The \c fb_format specifies which color components are in - * each pixel and what the default order is. For example, \c GL_RGB specifies - * that red, green, blue are available and red is in the "most significant" - * position and blue is in the "least significant". The \c fb_type specifies - * the bit sizes of each component and the actual ordering. For example, if - * \c GL_UNSIGNED_SHORT_5_6_5_REV is specified with \c GL_RGB, bits [15:11] - * are the blue value, bits [10:5] are the green value, and bits [4:0] are - * the red value. - * - * One sublte issue is the combination of \c GL_RGB or \c GL_BGR and either - * of the \c GL_UNSIGNED_INT_8_8_8_8 modes. The resulting mask values in the - * \c __GLcontextModes structure is \b identical to the \c GL_RGBA or - * \c GL_BGRA case, except the \c alphaMask is zero. This means that, as - * far as this routine is concerned, \c GL_RGB with \c GL_UNSIGNED_INT_8_8_8_8 - * still uses 32-bits. - * - * If in doubt, look at the tables used in the function. - * - * \param ptr_to_modes Pointer to a pointer to a linked list of - * \c __GLcontextModes. Upon completion, a pointer to - * the next element to be process will be stored here. - * If the function fails and returns \c GL_FALSE, this - * value will be unmodified, but some elements in the - * linked list may be modified. - * \param fb_format Format of the framebuffer. Currently only \c GL_RGB, - * \c GL_RGBA, \c GL_BGR, and \c GL_BGRA are supported. - * \param fb_type Type of the pixels in the framebuffer. Currently only - * \c GL_UNSIGNED_SHORT_5_6_5, - * \c GL_UNSIGNED_SHORT_5_6_5_REV, - * \c GL_UNSIGNED_INT_8_8_8_8, and - * \c GL_UNSIGNED_INT_8_8_8_8_REV are supported. - * \param depth_bits Array of depth buffer sizes to be exposed. - * \param stencil_bits Array of stencil buffer sizes to be exposed. - * \param num_depth_stencil_bits Number of entries in both \c depth_bits and - * \c stencil_bits. - * \param db_modes Array of buffer swap modes. If an element has a - * value of \c GLX_NONE, then it represents a - * single-buffered mode. Other valid values are - * \c GLX_SWAP_EXCHANGE_OML, \c GLX_SWAP_COPY_OML, and - * \c GLX_SWAP_UNDEFINED_OML. See the - * GLX_OML_swap_method extension spec for more details. - * \param num_db_modes Number of entries in \c db_modes. - * \param visType GLX visual type. Usually either \c GLX_TRUE_COLOR or - * \c GLX_DIRECT_COLOR. - * - * \returns - * \c GL_TRUE on success or \c GL_FALSE on failure. Currently the only - * cause of failure is a bad parameter (i.e., unsupported \c fb_format or - * \c fb_type). - * - * \todo - * There is currently no way to support packed RGB modes (i.e., modes with - * exactly 3 bytes per pixel) or floating-point modes. This could probably - * be done by creating some new, private enums with clever names likes - * \c GL_UNSIGNED_3BYTE_8_8_8, \c GL_4FLOAT_32_32_32_32, - * \c GL_4HALF_16_16_16_16, etc. We can cross that bridge when we come to it. - */ -GLboolean -driFillInModes( __GLcontextModes ** ptr_to_modes, - GLenum fb_format, GLenum fb_type, - const u_int8_t * depth_bits, const u_int8_t * stencil_bits, - unsigned num_depth_stencil_bits, - const GLenum * db_modes, unsigned num_db_modes, - int visType ) -{ - static const u_int8_t bits_table[3][4] = { - /* R G B A */ - { 5, 6, 5, 0 }, /* Any GL_UNSIGNED_SHORT_5_6_5 */ - { 8, 8, 8, 0 }, /* Any RGB with any GL_UNSIGNED_INT_8_8_8_8 */ - { 8, 8, 8, 8 } /* Any RGBA with any GL_UNSIGNED_INT_8_8_8_8 */ - }; - - /* The following arrays are all indexed by the fb_type masked with 0x07. - * Given the four supported fb_type values, this results in valid array - * indices of 3, 4, 5, and 7. - */ - static const u_int32_t masks_table_rgb[8][4] = { - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5 */ - { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5_REV */ - { 0xFF000000, 0x00FF0000, 0x0000FF00, 0x00000000 }, /* 8_8_8_8 */ - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x000000FF, 0x0000FF00, 0x00FF0000, 0x00000000 } /* 8_8_8_8_REV */ - }; - - static const u_int32_t masks_table_rgba[8][4] = { - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5 */ - { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5_REV */ - { 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF }, /* 8_8_8_8 */ - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 }, /* 8_8_8_8_REV */ - }; - - static const u_int32_t masks_table_bgr[8][4] = { - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5 */ - { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5_REV */ - { 0x0000FF00, 0x00FF0000, 0xFF000000, 0x00000000 }, /* 8_8_8_8 */ - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 }, /* 8_8_8_8_REV */ - }; - - static const u_int32_t masks_table_bgra[8][4] = { - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5 */ - { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5_REV */ - { 0x0000FF00, 0x00FF0000, 0xFF000000, 0x000000FF }, /* 8_8_8_8 */ - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 }, /* 8_8_8_8_REV */ - }; - - static const u_int8_t bytes_per_pixel[8] = { - 0, 0, 0, 2, 2, 4, 0, 4 - }; - - const u_int8_t * bits; - const u_int32_t * masks; - const int index = fb_type & 0x07; - __GLcontextModes * modes = *ptr_to_modes; - unsigned i; - unsigned j; - unsigned k; - - - if ( bytes_per_pixel[ index ] == 0 ) { - fprintf( stderr, "[%s:%u] Framebuffer type 0x%04x has 0 bytes per pixel.\n", - __FUNCTION__, __LINE__, fb_type ); - return GL_FALSE; - } - - - /* Valid types are GL_UNSIGNED_SHORT_5_6_5 and GL_UNSIGNED_INT_8_8_8_8 and - * the _REV versions. - * - * Valid formats are GL_RGBA, GL_RGB, and GL_BGRA. - */ - - switch ( fb_format ) { - case GL_RGB: - bits = (bytes_per_pixel[ index ] == 2) - ? bits_table[0] : bits_table[1]; - masks = masks_table_rgb[ index ]; - break; - - case GL_RGBA: - bits = (bytes_per_pixel[ index ] == 2) - ? bits_table[0] : bits_table[2]; - masks = masks_table_rgba[ index ]; - break; - - case GL_BGR: - bits = (bytes_per_pixel[ index ] == 2) - ? bits_table[0] : bits_table[1]; - masks = masks_table_bgr[ index ]; - break; - - case GL_BGRA: - bits = (bytes_per_pixel[ index ] == 2) - ? bits_table[0] : bits_table[2]; - masks = masks_table_bgra[ index ]; - break; - - default: - fprintf( stderr, "[%s:%u] Framebuffer format 0x%04x is not GL_RGB, GL_RGBA, GL_BGR, or GL_BGRA.\n", - __FUNCTION__, __LINE__, fb_format ); - return GL_FALSE; - } - - - for ( k = 0 ; k < num_depth_stencil_bits ; k++ ) { - for ( i = 0 ; i < num_db_modes ; i++ ) { - for ( j = 0 ; j < 2 ; j++ ) { - - modes->redBits = bits[0]; - modes->greenBits = bits[1]; - modes->blueBits = bits[2]; - modes->alphaBits = bits[3]; - modes->redMask = masks[0]; - modes->greenMask = masks[1]; - modes->blueMask = masks[2]; - modes->alphaMask = masks[3]; - modes->rgbBits = modes->redBits + modes->greenBits - + modes->blueBits + modes->alphaBits; - - modes->accumRedBits = 16 * j; - modes->accumGreenBits = 16 * j; - modes->accumBlueBits = 16 * j; - modes->accumAlphaBits = (masks[3] != 0) ? 16 * j : 0; - modes->visualRating = (j == 0) ? GLX_NONE : GLX_SLOW_CONFIG; - - modes->stencilBits = stencil_bits[k]; - modes->depthBits = depth_bits[k]; - - modes->visualType = visType; - modes->renderType = GLX_RGBA_BIT; - modes->drawableType = GLX_WINDOW_BIT; - modes->rgbMode = GL_TRUE; - - if ( db_modes[i] == GLX_NONE ) { - modes->doubleBufferMode = GL_FALSE; - } - else { - modes->doubleBufferMode = GL_TRUE; - modes->swapMethod = db_modes[i]; - } - - modes->haveAccumBuffer = ((modes->accumRedBits + - modes->accumGreenBits + - modes->accumBlueBits + - modes->accumAlphaBits) > 0); - modes->haveDepthBuffer = (modes->depthBits > 0); - modes->haveStencilBuffer = (modes->stencilBits > 0); - - modes = modes->next; - } - } - } - - *ptr_to_modes = modes; - return GL_TRUE; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/utils.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/utils.h deleted file mode 100644 index 26d178f747..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/utils.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2002, 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Ian Romanick - */ -/* $XFree86:$ */ - -#ifndef DRI_DEBUG_H -#define DRI_DEBUG_H - -#include "context.h" -#include "dri_util.h" - -struct dri_debug_control { - const char * string; - unsigned flag; -}; - -/** - * Description of the entry-points and parameters for an OpenGL function. - */ -struct dri_extension_function { - /** - * \brief - * Packed string describing the parameter signature and the entry-point - * names. - * - * The parameter signature and the names of the entry-points for this - * function are packed into a single string. The substrings are - * separated by NUL characters. The whole string is terminated by - * two consecutive NUL characters. - */ - const char * strings; - - - /** - * Location in the remap table where the dispatch offset should be - * stored. - */ - int remap_index; - - /** - * Offset of the function in the dispatch table. - */ - int offset; -}; - -/** - * Description of the API for an extension to OpenGL. - */ -struct dri_extension { - /** - * Name of the extension. - */ - const char * name; - - - /** - * Pointer to a list of \c dri_extension_function structures. The list - * is terminated by a structure with a \c NULL - * \c dri_extension_function::strings pointer. - */ - const struct dri_extension_function * functions; -}; - -extern unsigned driParseDebugString( const char * debug, - const struct dri_debug_control * control ); - -extern unsigned driGetRendererString( char * buffer, - const char * hardware_name, const char * driver_date, GLuint agp_mode ); - -extern void driInitExtensions( GLcontext * ctx, - const struct dri_extension * card_extensions, GLboolean enable_imaging ); - -extern void driInitSingleExtension( GLcontext * ctx, - const struct dri_extension * ext ); - -extern GLboolean driCheckDriDdxDrmVersions2(const char * driver_name, - const __DRIversion * driActual, const __DRIversion * driExpected, - const __DRIversion * ddxActual, const __DRIversion * ddxExpected, - const __DRIversion * drmActual, const __DRIversion * drmExpected); - -extern GLboolean driCheckDriDdxDrmVersions3(const char * driver_name, - const __DRIversion * driActual, const __DRIversion * driExpected, - const __DRIversion * ddxActual, const __DRIutilversion2 * ddxExpected, - const __DRIversion * drmActual, const __DRIversion * drmExpected); - -extern GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer, - GLint *x, GLint *y, - GLsizei *width, GLsizei *height ); - -extern GLboolean driFillInModes( __GLcontextModes ** modes, - GLenum fb_format, GLenum fb_type, - const u_int8_t * depth_bits, const u_int8_t * stencil_bits, - unsigned num_depth_stencil_bits, - const GLenum * db_modes, unsigned num_db_modes, int visType ); - -#endif /* DRI_DEBUG_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/vblank.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/vblank.c deleted file mode 100644 index eebe42d96a..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/vblank.c +++ /dev/null @@ -1,347 +0,0 @@ -/* -*- mode: c; c-basic-offset: 3 -*- */ -/* - * (c) Copyright IBM Corporation 2002 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Ian Romanick - */ -/* $XFree86:$ */ - -#include "glheader.h" -#include "xf86drm.h" -#include "mtypes.h" -#include "macros.h" -#include "dd.h" -#include "vblank.h" -#include "xmlpool.h" - - -/****************************************************************************/ -/** - * Get the current MSC refresh counter. - * - * Stores the 64-bit count of vertical refreshes since some (arbitrary) - * point in time in \c count. Unless the value wraps around, which it - * may, it will never decrease. - * - * \warning This function is called from \c glXGetVideoSyncSGI, which expects - * a \c count of type \c unsigned (32-bit), and \c glXGetSyncValuesOML, which - * expects a \c count of type \c int64_t (signed 64-bit). The kernel ioctl - * currently always returns a \c sequence of type \c unsigned. - * - * \param priv Pointer to the DRI screen private struct. - * \param count Storage to hold MSC counter. - * \return Zero is returned on success. A negative errno value - * is returned on failure. - */ -int driGetMSC32( __DRIscreenPrivate * priv, int64_t * count ) -{ - drmVBlank vbl; - int ret; - - /* Don't wait for anything. Just get the current refresh count. */ - - vbl.request.type = DRM_VBLANK_RELATIVE; - vbl.request.sequence = 0; - - ret = drmWaitVBlank( priv->fd, &vbl ); - *count = (int64_t)vbl.reply.sequence; - - return ret; -} - - -/****************************************************************************/ -/** - * Wait for a specified refresh count. This implements most of the - * functionality of \c glXWaitForMscOML from the GLX_OML_sync_control spec. - * Waits for the \c target_msc refresh. If that has already passed, it - * waits until \f$(MSC \bmod divisor)\f$ is equal to \c remainder. If - * \c target_msc is 0, use the behavior of glXWaitVideoSyncSGI(), which - * omits the initial check against a target MSC value. - * - * This function is actually something of a hack. The problem is that, at - * the time of this writing, none of the existing DRM modules support an - * ioctl that returns a 64-bit count (at least not on 32-bit platforms). - * However, this function exists to support a GLX function that requires - * the use of 64-bit counts. As such, there is a little bit of ugly - * hackery at the end of this function to make the 32-bit count act like - * a 64-bit count. There are still some cases where this will break, but - * I believe it catches the most common cases. - * - * The real solution is to provide an ioctl that uses a 64-bit count. - * - * \param dpy Pointer to the \c Display. - * \param priv Pointer to the DRI drawable private. - * \param target_msc Desired refresh count to wait for. A value of 0 - * means to use the glXWaitVideoSyncSGI() behavior. - * \param divisor MSC divisor if \c target_msc is already reached. - * \param remainder Desired MSC remainder if \c target_msc is already - * reached. - * \param msc Buffer to hold MSC when done waiting. - * - * \return Zero on success or \c GLX_BAD_CONTEXT on failure. - */ - -int driWaitForMSC32( __DRIdrawablePrivate *priv, - int64_t target_msc, int64_t divisor, int64_t remainder, - int64_t * msc ) -{ - drmVBlank vbl; - - - if ( divisor != 0 ) { - unsigned int target = (unsigned int)target_msc; - unsigned int next = target; - unsigned int r; - int dont_wait = (target_msc == 0); - - do { - /* dont_wait means we're using the glXWaitVideoSyncSGI() behavior. - * The first time around, just get the current count and proceed - * to the test for (MSC % divisor) == remainder. - */ - vbl.request.type = dont_wait ? DRM_VBLANK_RELATIVE : - DRM_VBLANK_ABSOLUTE; - vbl.request.sequence = next; - - if ( drmWaitVBlank( priv->driScreenPriv->fd, &vbl ) != 0 ) { - /* FIXME: This doesn't seem like the right thing to return here. - */ - return GLX_BAD_CONTEXT; - } - - dont_wait = 0; - if (target_msc != 0 && vbl.reply.sequence == target) - break; - - /* Assuming the wait-done test fails, the next refresh to wait for - * will be one that satisfies (MSC % divisor) == remainder. The - * value (MSC - (MSC % divisor) + remainder) is the refresh value - * closest to the current value that would satisfy the equation. - * If this refresh has already happened, we add divisor to obtain - * the next refresh after the current one that will satisfy it. - */ - r = (vbl.reply.sequence % (unsigned int)divisor); - next = (vbl.reply.sequence - r + (unsigned int)remainder); - if (next <= vbl.reply.sequence) next += (unsigned int)divisor; - - } while ( r != (unsigned int)remainder ); - } - else { - /* If the \c divisor is zero, just wait until the MSC is greater - * than or equal to \c target_msc. - */ - - vbl.request.type = DRM_VBLANK_ABSOLUTE; - vbl.request.sequence = target_msc; - - if ( drmWaitVBlank( priv->driScreenPriv->fd, &vbl ) != 0 ) { - /* FIXME: This doesn't seem like the right thing to return here. - */ - return GLX_BAD_CONTEXT; - } - } - - *msc = (target_msc & 0xffffffff00000000LL); - *msc |= vbl.reply.sequence; - if ( *msc < target_msc ) { - *msc += 0x0000000100000000LL; - } - - return 0; -} - - -/****************************************************************************/ -/** - * Gets a set of default vertical-blank-wait flags based on the internal GLX - * API version and several configuration options. - */ - -GLuint driGetDefaultVBlankFlags( const driOptionCache *optionCache ) -{ - GLuint flags = VBLANK_FLAG_INTERVAL; - int vblank_mode; - - - if ( driCheckOption( optionCache, "vblank_mode", DRI_ENUM ) ) - vblank_mode = driQueryOptioni( optionCache, "vblank_mode" ); - else - vblank_mode = DRI_CONF_VBLANK_DEF_INTERVAL_1; - - switch (vblank_mode) { - case DRI_CONF_VBLANK_NEVER: - flags = 0; - break; - case DRI_CONF_VBLANK_DEF_INTERVAL_0: - break; - case DRI_CONF_VBLANK_DEF_INTERVAL_1: - flags |= VBLANK_FLAG_THROTTLE; - break; - case DRI_CONF_VBLANK_ALWAYS_SYNC: - flags |= VBLANK_FLAG_SYNC; - break; - } - - return flags; -} - - -/****************************************************************************/ -/** - * Sets the default swap interval when the drawable is first bound to a - * direct rendering context. - */ - -void driDrawableInitVBlank( __DRIdrawablePrivate *priv, GLuint flags ) -{ - if ( priv->pdraw->swap_interval == (unsigned)-1 ) { - priv->pdraw->swap_interval = (flags & VBLANK_FLAG_THROTTLE) != 0 ? 1 : 0; - } -} - - -/****************************************************************************/ -/** - * Wrapper to call \c drmWaitVBlank. The main purpose of this function is to - * wrap the error message logging. The error message should only be logged - * the first time the \c drmWaitVBlank fails. If \c drmWaitVBlank is - * successful, \c vbl_seq will be set the sequence value in the reply. - * - * \param vbl Pointer to drmVBlank packet desribing how to wait. - * \param vbl_seq Location to store the current refresh counter. - * \param fd File descriptor use to call into the DRM. - * \return Zero on success or -1 on failure. - */ - -static int do_wait( drmVBlank * vbl, GLuint * vbl_seq, int fd ) -{ - int ret; - - - ret = drmWaitVBlank( fd, vbl ); - if ( ret != 0 ) { - static GLboolean first_time = GL_TRUE; - - if ( first_time ) { - fprintf(stderr, - "%s: drmWaitVBlank returned %d, IRQs don't seem to be" - " working correctly.\nTry running with LIBGL_THROTTLE_REFRESH" - " and LIBL_SYNC_REFRESH unset.\n", __FUNCTION__, ret); - first_time = GL_FALSE; - } - - return -1; - } - - *vbl_seq = vbl->reply.sequence; - return 0; -} - - -/****************************************************************************/ -/** - * Waits for the vertical blank for use with glXSwapBuffers. - * - * \param vbl_seq Vertical blank sequence number (MSC) after the last buffer - * swap. Updated after this wait. - * \param flags \c VBLANK_FLAG bits that control how long to wait. - * \param missed_deadline Set to \c GL_TRUE if the MSC after waiting is later - * than the "target" based on \c flags. The idea is that if - * \c missed_deadline is set, then the application is not - * achieving its desired framerate. - * \return Zero on success, -1 on error. - */ - -int -driWaitForVBlank( const __DRIdrawablePrivate *priv, GLuint * vbl_seq, - GLuint flags, GLboolean * missed_deadline ) -{ - drmVBlank vbl; - unsigned original_seq; - unsigned deadline; - unsigned interval; - - - *missed_deadline = GL_FALSE; - if ( (flags & (VBLANK_FLAG_INTERVAL | - VBLANK_FLAG_THROTTLE | - VBLANK_FLAG_SYNC)) == 0 || - (flags & VBLANK_FLAG_NO_IRQ) != 0 ) { - return 0; - } - - - /* VBLANK_FLAG_SYNC means to wait for at least one vertical blank. If - * that flag is not set, do a fake wait for zero vertical blanking - * periods so that we can get the current MSC. - * - * VBLANK_FLAG_INTERVAL and VBLANK_FLAG_THROTTLE mean to wait for at - * least one vertical blank since the last wait. Since do_wait modifies - * vbl_seq, we have to save the original value of vbl_seq for the - * VBLANK_FLAG_INTERVAL / VBLANK_FLAG_THROTTLE calculation later. - */ - - original_seq = *vbl_seq; - - vbl.request.sequence = ((flags & VBLANK_FLAG_SYNC) != 0) ? 1 : 0; - vbl.request.type = DRM_VBLANK_RELATIVE; - - if ( do_wait( & vbl, vbl_seq, priv->driScreenPriv->fd ) != 0 ) { - return -1; - } - - - vbl.request.type = DRM_VBLANK_ABSOLUTE; - - if ( (flags & VBLANK_FLAG_INTERVAL) != 0 ) { - interval = priv->pdraw->swap_interval; - /* this must have been initialized when the drawable was first bound - * to a direct rendering context. */ - assert ( interval != (unsigned)-1 ); - } - else if ( (flags & VBLANK_FLAG_THROTTLE) != 0 ) { - interval = 1; - } - else { - interval = 0; - } - - - /* Wait until the next vertical blank. If the interval is zero, then - * the deadline is one vertical blank after the previous wait. - */ - - vbl.request.sequence = original_seq + interval; - if ( *vbl_seq < vbl.request.sequence ) { - if ( do_wait( & vbl, vbl_seq, priv->driScreenPriv->fd ) != 0 ) { - return -1; - } - } - - deadline = original_seq + ((interval == 0) ? 1 : interval); - *missed_deadline = ( *vbl_seq > deadline ); - - return 0; -} diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/vblank.h b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/vblank.h deleted file mode 100644 index 3dc965def1..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/vblank.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- mode: c; c-basic-offset: 3 -*- */ -/* - * (c) Copyright IBM Corporation 2002 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Ian Romanick - */ -/* $XFree86:$ */ - -#ifndef DRI_VBLANK_H -#define DRI_VBLANK_H - -#include "context.h" -#include "dri_util.h" -#include "xmlconfig.h" - -#define VBLANK_FLAG_INTERVAL (1U << 0) /* Respect the swap_interval setting - */ -#define VBLANK_FLAG_THROTTLE (1U << 1) /* Wait 1 refresh since last call. - */ -#define VBLANK_FLAG_SYNC (1U << 2) /* Sync to the next refresh. - */ -#define VBLANK_FLAG_NO_IRQ (1U << 7) /* DRM has no IRQ to wait on. - */ - -extern int driGetMSC32( __DRIscreenPrivate * priv, int64_t * count ); -extern int driWaitForMSC32( __DRIdrawablePrivate *priv, - int64_t target_msc, int64_t divisor, int64_t remainder, int64_t * msc ); -extern GLuint driGetDefaultVBlankFlags( const driOptionCache *optionCache ); -extern void driDrawableInitVBlank ( __DRIdrawablePrivate *priv, GLuint flags ); -extern int driWaitForVBlank( const __DRIdrawablePrivate *priv, - GLuint * vbl_seq, GLuint flags, GLboolean * missed_deadline ); - -#undef usleep -#include /* for usleep() */ -#include /* for sched_yield() */ - -#ifdef linux -#include /* for sched_yield() */ -#endif - -#define DO_USLEEP(nr) \ - do { \ - if (0) fprintf(stderr, "%s: usleep for %u\n", __FUNCTION__, nr ); \ - if (1) usleep( nr ); \ - sched_yield(); \ - } while( 0 ) - -#endif /* DRI_VBLANK_H */ diff --git a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/xmlconfig.c b/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/xmlconfig.c deleted file mode 100644 index b635894fe5..0000000000 --- a/nx-X11/extras/Mesa_6.4.2/src/mesa/drivers/dri/common/xmlconfig.c +++ /dev/null @@ -1,1002 +0,0 @@ -/* - * XML DRI client-side driver configuration - * Copyright (C) 2003 Felix Kuehling - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ -/** - * \file xmlconfig.c - * \brief Driver-independent client-side part of the XML configuration - * \author Felix Kuehling - */ - -#include "glheader.h" - -#include -#include -#include -#include -#include -#include -#include "imports.h" -#include "dri_util.h" -#include "xmlconfig.h" - -/* - * OS dependent ways of getting the name of the running program - */ -#if (defined(__unix__) || defined(unix)) && !defined(USG) -#include -#endif - -#undef GET_PROGRAM_NAME - -#if (defined(__GNU_LIBRARY__) || defined(__GLIBC__)) && !defined(__UCLIBC__) -# if !defined(__GLIBC__) || (__GLIBC__ < 2) -/* These aren't declared in any libc5 header */ -extern char *program_invocation_name, *program_invocation_short_name; -# endif -# define GET_PROGRAM_NAME() program_invocation_short_name -#elif defined(__FreeBSD__) && (__FreeBSD__ >= 2) -# include -# if (__FreeBSD_version >= 440000) -# include -# define GET_PROGRAM_NAME() getprogname() -# endif -#elif defined(__NetBSD__) && defined(__NetBSD_Version) && (__NetBSD_Version >= 106000100) -# include -# define GET_PROGRAM_NAME() getprogname() -#endif - -#if !defined(GET_PROGRAM_NAME) -# if defined(OpenBSD) || defined(NetBSD) || defined(__UCLIBC__) -/* This is a hack. It's said to work on OpenBSD, NetBSD and GNU. - * Rogelio M.Serrano Jr. reported it's also working with UCLIBC. It's - * used as a last resort, if there is no documented facility available. */ -static const char *__getProgramName () { - extern const char *__progname; - char * arg = strrchr(__progname, '/'); - if (arg) - return arg+1; - else - return __progname; -} -# define GET_PROGRAM_NAME() __getProgramName() -# else -# define GET_PROGRAM_NAME() "" -# warning "Per application configuration won't work with your OS version." -# endif -#endif - -/** \brief Find an option in an option cache with the name as key */ -static GLuint findOption (const driOptionCache *cache, const char *name) { - GLuint len = strlen (name); - GLuint size = 1 << cache->tableSize, mask = size - 1; - GLuint hash = 0; - GLuint i, shift; - - /* compute a hash from the variable length name */ - for (i = 0, shift = 0; i < len; ++i, shift = (shift+8) & 31) - hash += (GLuint)name[i] << shift; - hash *= hash; - hash = (hash >> (16-cache->tableSize/2)) & mask; - - /* this is just the starting point of the linear search for the option */ - for (i = 0; i < size; ++i, hash = (hash+1) & mask) { - /* if we hit an empty entry then the option is not defined (yet) */ - if (cache->info[hash].name == 0) - break; - else if (!strcmp (name, cache->info[hash].name)) - break; - } - /* this assertion fails if the hash table is full */ - assert (i < size); - - return hash; -} - -/** \brief Count the real number of options in an option cache */ -static GLuint countOptions (const driOptionCache *cache) { - GLuint size = 1 << cache->tableSize; - GLuint i, count = 0; - for (i = 0; i < size; ++i) - if (cache->info[i].name) - count++; - return count; -} - -/** \brief Like strdup but using MALLOC and with error checking. */ -#define XSTRDUP(dest,source) do { \ - GLuint len = strlen (source); \ - if (!(dest = MALLOC (len+1))) { \ - fprintf (stderr, "%s: %d: out of memory.\n", __FILE__, __LINE__); \ - abort(); \ - } \ - memcpy (dest, source, len+1); \ -} while (0) - -static int compare (const void *a, const void *b) { - return strcmp (*(char *const*)a, *(char *const*)b); -} -/** \brief Binary search in a string array. */ -static GLuint bsearchStr (const XML_Char *name, - const XML_Char *elems[], GLuint count) { - const XML_Char **found; - found = bsearch (&name, elems, count, sizeof (XML_Char *), compare); - if (found) - return found - elems; - else - return count; -} - -/** \brief Locale-independent integer parser. - * - * Works similar to strtol. Leading space is NOT skipped. The input - * number may have an optional sign. Radix is specified by base. If - * base is 0 then decimal is assumed unless the input number is - * prefixed by 0x or 0X for hexadecimal or 0 for octal. After - * returning tail points to the first character that is not part of - * the integer number. If no number was found then tail points to the - * start of the input string. */ -static GLint strToI (const XML_Char *string, const XML_Char **tail, int base) { - GLint radix = base == 0 ? 10 : base; - GLint result = 0; - GLint sign = 1; - GLboolean numberFound = GL_FALSE; - const XML_Char *start = string; - - assert (radix >= 2 && radix <= 36); - - if (*string == '-') { - sign = -1; - string++; - } else if (*string == '+') - string++; - if (base == 0 && *string == '0') { - numberFound = GL_TRUE; - if (*(string+1) == 'x' || *(string+1) == 'X') { - radix = 16; - string += 2; - } else { - radix = 8; - string++; - } - } - do { - GLint digit = -1; - if (radix <= 10) { - if (*string >= '0' && *string < '0' + radix) - digit = *string - '0'; - } else { - if (*string >= '0' && *string <= '9') - digit = *string - '0'; - else if (*string >= 'a' && *string < 'a' + radix - 10) - digit = *string - 'a' + 10; - else if (*string >= 'A' && *string < 'A' + radix - 10) - digit = *string - 'A' + 10; - } - if (digit != -1) { - numberFound = GL_TRUE; - result = radix*result + digit; - string++; - } else - break; - } while (GL_TRUE); - *tail = numberFound ? string : start; - return sign * result; -} - -/** \brief Locale-independent floating-point parser. - * - * Works similar to strtod. Leading space is NOT skipped. The input - * number may have an optional sign. '.' is interpreted as decimal - * point and may occor at most once. Optionally the number may end in - * [eE], where is an integer as recognized by - * strToI. In that case the result is number * 10^exponent. After - * returning tail points to the first character that is not part of - * the floating point number. If no number was found then tail points - * to the start of the input string. - * - * Uses two passes for maximum accuracy. */ -static GLfloat strToF (const XML_Char *string, const XML_Char **tail) { - GLint nDigits = 0, pointPos, exponent; - GLfloat sign = 1.0f, result = 0.0f, scale; - const XML_Char *start = string, *numStart; - - /* sign */ - if (*string == '-') { - sign = -1.0f; - string++; - } else if (*string == '+') - string++; - - /* first pass: determine position of decimal point, number of - * digits, exponent and the end of the number. */ - numStart = string; - while (*string >= '0' && *string <= '9') { - string++; - nDigits++; - } - pointPos = nDigits; - if (*string == '.') { - string++; - while (*string >= '0' && *string <= '9') { - string++; - nDigits++; - } - } - if (nDigits == 0) { - /* no digits, no number */ - *tail = start; - return 0.0f; - } - *tail = string; - if (*string == 'e' || *string == 'E') { - const XML_Char *expTail; - exponent = strToI (string+1, &expTail, 10); - if (expTail == string+1) - exponent = 0; - else - *tail = expTail; - } else - exponent = 0; - string = numStart; - - /* scale of the first digit */ - scale = sign * (GLfloat)pow (10.0, (GLdouble)(pointPos-1 + exponent)); - - /* second pass: parse digits */ - do { - if (*string != '.') { - assert (*string >= '0' && *string <= '9'); - result += scale * (GLfloat)(*string - '0'); - scale *= 0.1f; - nDigits--; - } - string++; - } while (nDigits > 0); - - return result; -} - -/** \brief Parse a value of a given type. */ -static GLboolean parseValue (driOptionValue *v, driOptionType type, - const XML_Char *string) { - const XML_Char *tail; - /* skip leading white-space */ - string += strspn (string, " \f\n\r\t\v"); - switch (type) { - case DRI_BOOL: - if (!strcmp (string, "false")) { - v->_bool = GL_FALSE; - tail = string + 5; - } else if (!strcmp (string, "true")) { - v->_bool = GL_TRUE; - tail = string + 4; - } - else - return GL_FALSE; - break; - case DRI_ENUM: /* enum is just a special integer */ - case DRI_INT: - v->_int = strToI (string, &tail, 0); - break; - case DRI_FLOAT: - v->_float = strToF (string, &tail); - break; - } - - if (tail == string) - return GL_FALSE; /* empty string (or containing only white-space) */ - /* skip trailing white space */ - if (*tail) - tail += strspn (tail, " \f\n\r\t\v"); - if (*tail) - return GL_FALSE; /* something left over that is not part of value */ - - return GL_TRUE; -} - -/** \brief Parse a list of ranges of type info->type. */ -static GLboolean parseRanges (driOptionInfo *info, const XML_Char *string) { - XML_Char *cp, *range; - GLuint nRanges, i; - driOptionRange *ranges; - - XSTRDUP (cp, string); - /* pass 1: determine the number of ranges (number of commas + 1) */ - range = cp; - for (nRanges = 1; *range; ++range) - if (*range == ',') - ++nRanges; - - if ((ranges = MALLOC (nRanges*sizeof(driOptionRange))) == NULL) { - fprintf (stderr, "%s: %d: out of memory.\n", __FILE__, __LINE__); - abort(); - } - - /* pass 2: parse all ranges into preallocated array */ - range = cp; - for (i = 0; i < nRanges; ++i) { - XML_Char *end, *sep; - assert (range); - end = strchr (range, ','); - if (end) - *end = '\0'; - sep = strchr (range, ':'); - if (sep) { /* non-empty interval */ - *sep = '\0'; - if (!parseValue (&ranges[i].start, info->type, range) || - !parseValue (&ranges[i].end, info->type, sep+1)) - break; - if (info->type == DRI_INT && - ranges[i].start._int > ranges[i].end._int) - break; - if (info->type == DRI_FLOAT && - ranges[i].start._float > ranges[i].end._float) - break; - } else { /* empty interval */ - if (!parseValue (&ranges[i].start, info->type, range)) - break; - ranges[i].end = ranges[i].start; - } - if (end) - range = end+1; - else - range = NULL; - } - FREE (cp); - if (i < nRanges) { - FREE (ranges); - return GL_FALSE; - } else - assert (range == NULL); - - info->nRanges = nRanges; - info->ranges = ranges; - return GL_TRUE; -} - -/** \brief Check if a value is in one of info->ranges. */ -static GLboolean checkValue (const driOptionValue *v, const driOptionInfo *info) { - GLuint i; - assert (info->type != DRI_BOOL); /* should be caught by the parser */ - if (info->nRanges == 0) - return GL_TRUE; - switch (info->type) { - case DRI_ENUM: /* enum is just a special integer */ - case DRI_INT: - for (i = 0; i < info->nRanges; ++i) - if (v->_int >= info->ranges[i].start._int && - v->_int <= info->ranges[i].end._int) - return GL_TRUE; - break; - case DRI_FLOAT: - for (i = 0; i < info->nRanges; ++i) - if (v->_float >= info->ranges[i].start._float && - v->_float <= info->ranges[i].end._float) - return GL_TRUE; - break; - default: - assert (0); /* should never happen */ - } - return GL_FALSE; -} - -/** \brief Output a warning message. */ -#define XML_WARNING1(msg) do {\ - __driUtilMessage ("Warning in %s line %d, column %d: "msg, data->name, \ - XML_GetCurrentLineNumber(data->parser), \ - XML_GetCurrentColumnNumber(data->parser)); \ -} while (0) -#define XML_WARNING(msg,args...) do { \ - __driUtilMessage ("Warning in %s line %d, column %d: "msg, data->name, \ - XML_GetCurrentLineNumber(data->parser), \ - XML_GetCurrentColumnNumber(data->parser), \ - args); \ -} while (0) -/** \brief Output an error message. */ -#define XML_ERROR1(msg) do { \ - __driUtilMessage ("Error in %s line %d, column %d: "msg, data->name, \ - XML_GetCurrentLineNumber(data->parser), \ - XML_GetCurrentColumnNumber(data->parser)); \ -} while (0) -#define XML_ERROR(msg,args...) do { \ - __driUtilMessage ("Error in %s line %d, column %d: "msg, data->name, \ - XML_GetCurrentLineNumber(data->parser), \ - XML_GetCurrentColumnNumber(data->parser), \ - args); \ -} while (0) -/** \brief Output a fatal error message and abort. */ -#define XML_FATAL1(msg) do { \ - fprintf (stderr, "Fatal error in %s line %d, column %d: "msg"\n", \ - data->name, \ - XML_GetCurrentLineNumber(data->parser), \ - XML_GetCurrentColumnNumber(data->parser)); \ - abort();\ -} while (0) -#define XML_FATAL(msg,args...) do { \ - fprintf (stderr, "Fatal error in %s line %d, column %d: "msg"\n", \ - data->name, \ - XML_GetCurrentLineNumber(data->parser), \ - XML_GetCurrentColumnNumber(data->parser), \ - args); \ - abort();\ -} while (0) - -/** \brief Parser context for __driConfigOptions. */ -struct OptInfoData { - const char *name; - XML_Parser parser; - driOptionCache *cache; - GLboolean inDriInfo; - GLboolean inSection; - GLboolean inDesc; - GLboolean inOption; - GLboolean inEnum; - int curOption; -}; - -/** \brief Elements in __driConfigOptions. */ -enum OptInfoElem { - OI_DESCRIPTION = 0, OI_DRIINFO, OI_ENUM, OI_OPTION, OI_SECTION, OI_COUNT -}; -static const XML_Char *OptInfoElems[] = { - "description", "driinfo", "enum", "option", "section" -}; - -/** \brief Parse attributes of an enum element. - * - * We're not actually interested in the data. Just make sure this is ok - * for external configuration tools. - */ -static void parseEnumAttr (struct OptInfoData *data, const XML_Char **attr) { - GLuint i; - const XML_Char *value = NULL, *text = NULL; - driOptionValue v; - GLuint opt = data->curOption; - for (i = 0; attr[i]; i += 2) { - if (!strcmp (attr[i], "value")) value = attr[i+1]; - else if (!strcmp (attr[i], "text")) text = attr[i+1]; - else XML_FATAL("illegal enum attribute: %s.", attr[i]); - } - if (!value) XML_FATAL1 ("value attribute missing in enum."); - if (!text) XML_FATAL1 ("text attribute missing in enum."); - if (!parseValue (&v, data->cache->info[opt].type, value)) - XML_FATAL ("illegal enum value: %s.", value); - if (!checkValue (&v, &data->cache->info[opt])) - XML_FATAL ("enum value out of valid range: %s.", value); -} - -/** \brief Parse attributes of a description element. - * - * We're not actually interested in the data. Just make sure this is ok - * for external configuration tools. - */ -static void parseDescAttr (struct OptInfoData *data, const XML_Char **attr) { - GLuint i; - const XML_Char *lang = NULL, *text = NULL; - for (i = 0; attr[i]; i += 2) { - if (!strcmp (attr[i], "lang")) lang = attr[i+1]; - else if (!strcmp (attr[i], "text")) text = attr[i+1]; - else XML_FATAL("illegal description attribute: %s.", attr[i]); - } - if (!lang) XML_FATAL1 ("lang attribute missing in description."); - if (!text) XML_FATAL1 ("text attribute missing in description."); -} - -/** \brief Parse attributes of an option element. */ -static void parseOptInfoAttr (struct OptInfoData *data, const XML_Char **attr) { - enum OptAttr {OA_DEFAULT = 0, OA_NAME, OA_TYPE, OA_VALID, OA_COUNT}; - static const XML_Char *optAttr[] = {"default", "name", "type", "valid"}; - const XML_Char *attrVal[OA_COUNT] = {NULL, NULL, NULL, NULL}; - const char *defaultVal; - driOptionCache *cache = data->cache; - GLuint opt, i; - for (i = 0; attr[i]; i += 2) { - GLuint attrName = bsearchStr (attr[i], optAttr, OA_COUNT); - if (attrName >= OA_COUNT) - XML_FATAL ("illegal option attribute: %s", attr[i]); - attrVal[attrName] = attr[i+1]; - } - if (!attrVal[OA_NAME]) XML_FATAL1 ("name attribute missing in option."); - if (!attrVal[OA_TYPE]) XML_FATAL1 ("type attribute missing in option."); - if (!attrVal[OA_DEFAULT]) XML_FATAL1 ("default attribute missing in option."); - - opt = findOption (cache, attrVal[OA_NAME]); - if (cache->info[opt].name) - XML_FATAL ("option %s redefined.", attrVal[OA_NAME]); - data->curOption = opt; - - XSTRDUP (cache->info[opt].name, attrVal[OA_NAME]); - - if (!strcmp (attrVal[OA_TYPE], "bool")) - cache->info[opt].type = DRI_BOOL; - else if (!strcmp (attrVal[OA_TYPE], "enum")) - cache->info[opt].type = DRI_ENUM; - else if (!strcmp (attrVal[OA_TYPE], "int")) - cache->info[opt].type = DRI_INT; - else if (!strcmp (attrVal[OA_TYPE], "float")) - cache->info[opt].type = DRI_FLOAT; - else - XML_FATAL ("illegal type in option: %s.", attrVal[OA_TYPE]); - - defaultVal = getenv (cache->info[opt].name); - if (defaultVal != NULL) { - /* don't use XML_WARNING, we want the user to see this! */ - fprintf (stderr, - "ATTENTION: default value of option %s overridden by environment.\n", - cache->info[opt].name); - } else - defaultVal = attrVal[OA_DEFAULT]; - if (!parseValue (&cache->values[opt], cache->info[opt].type, defaultVal)) - XML_FATAL ("illegal default value: %s.", defaultVal); - - if (attrVal[OA_VALID]) { - if (cache->info[opt].type == DRI_BOOL) - XML_FATAL1 ("boolean option with valid attribute."); - if (!parseRanges (&cache->info[opt], attrVal[OA_VALID])) - XML_FATAL ("illegal valid attribute: %s.", attrVal[OA_VALID]); - if (!checkValue (&cache->values[opt], &cache->info[opt])) - XML_FATAL ("default value out of valid range '%s': %s.", - attrVal[OA_VALID], defaultVal); - } else if (cache->info[opt].type == DRI_ENUM) { - XML_FATAL1 ("valid attribute missing in option (mandatory for enums)."); - } else { - cache->info[opt].nRanges = 0; - cache->info[opt].ranges = NULL; - } -} - -/** \brief Handler for start element events. */ -static void optInfoStartElem (void *userData, const XML_Char *name, - const XML_Char **attr) { - struct OptInfoData *data = (struct OptInfoData *)userData; - enum OptInfoElem elem = bsearchStr (name, OptInfoElems, OI_COUNT); - switch (elem) { - case OI_DRIINFO: - if (data->inDriInfo) - XML_FATAL1 ("nested elements."); - if (attr[0]) - XML_FATAL1 ("attributes specified on element."); - data->inDriInfo = GL_TRUE; - break; - case OI_SECTION: - if (!data->inDriInfo) - XML_FATAL1 ("
must be inside ."); - if (data->inSection) - XML_FATAL1 ("nested
elements."); - if (attr[0]) - XML_FATAL1 ("attributes specified on
element."); - data->inSection = GL_TRUE; - break; - case OI_DESCRIPTION: - if (!data->inSection && !data->inOption) - XML_FATAL1 (" must be inside or inDesc) - XML_FATAL1 ("nested elements."); - data->inDesc = GL_TRUE; - parseDescAttr (data, attr); - break; - case OI_OPTION: - if (!data->inSection) - XML_FATAL1 ("